# @zerotal/flow — public API surface

<!-- AUTO-GENERATED by scripts/api-surface.ts. Do not edit by hand.
     Run `bun run api:surface` to regenerate after an intentional API change. -->

> Not a guide — this is a flat, alphabetical snapshot used to detect unintended
> API changes. For how to use these, read the [documentation](https://zerotal.dev/docs).

## .  `(./src/index.ts)`

class Component = {
  new (): Component
  static durable?: boolean | {    ttl?: string;    scope?: 'user' | 'session';}
  static interactive?: boolean
  static readonly __isFlowPage: true
  static title?: string | ((component: never) => string)
  static using: Compose
  $: (strings: TemplateStringsArray, ...values: unknown[]) => void
  $refresh: () => void
  $set: (key: string, value: unknown) => void
  _applyClientUpdate: (key: string, value: unknown, arrayKey?: string) => Promise<void>
  _buildSchema: (builders: Map<string, ValidateBuilder>) => Schema
  _childIds: string[]
  _clearDurable: boolean
  _clientScripts: string[]
  _downloads: {    filename: string;    content: string;    mime: string;}[]
  _drainEffects: () => FlowEffects
  _emitUpdateHook: (base: 'onUpdating' | 'onUpdated', prop: string, value: unknown, key?: string) => Promise<void>
  _errors: Record<string, string[]>
  _events: {    name: string;    data: Record<string, unknown>;    to?: string;    self?: boolean;}[]
  _exposedData: () => Record<string, unknown>
  _flashes: FlashMessage[]
  _flowId: string
  _flowPath: string
  _flowSlots: Record<string, string>
  _isHydrated: boolean
  _prevChildIds: string[]
  _redirectStatus: number | null
  _redirectUrl: string | null
  _renderStaticChild: <C extends Component>(ChildClass: new () => C, opts: {    props?: Partial<C>;    slots?: Record<string, string>;}) => Promise<string>
  _resolveTitle: () => string | null
  _shouldRefresh: boolean
  _streamSender: ((ref: string, content: string, replace: boolean) => void) | null
  _taskSignal: AbortSignal | null
  _validateField: (field: string) => Promise<void>
  addError: (field: string, message: string) => void
  bind: (key: string, optionValue?: string) => Record<string, unknown>
  cancelled: boolean
  child: <C extends Component>(ChildClass: new () => C, opts?: {    key?: string | number;    props?: Partial<C>;    lazy?: boolean;    defer?: boolean;    stream?: boolean;    slots?: Record<string, string>;}) => Promise<HtmlNode>
  clearDurable: () => void
  currentUrl: (options?: CurrentUrlOptions) => string
  dispatch: <K extends string>(name: K, ...args: K extends EventName ? EventArgs<FlowEvents[K]> : [payload?: Record<string, unknown>]) => void
  dispatchSelf: <K extends string>(name: K, ...args: K extends EventName ? EventArgs<FlowEvents[K]> : [payload?: Record<string, unknown>]) => void
  dispatchTo: <K extends string>(component: string, name: K, ...args: K extends EventName ? EventArgs<FlowEvents[K]> : [payload?: Record<string, unknown>]) => void
  download: (filename: string, content: string | Uint8Array, mime?: string) => void
  errors: ErrorsProxy
  flash: (message: string, optionsOrLevel?: FlashLevel | FlashOptions) => FlashBuilder
  hasSlot: (name?: string) => boolean
  isInteractive: boolean
  layout: (page: HtmlNode) => HtmlNode | Promise<HtmlNode>
  navigateCurrent: (options?: CurrentUrlOptions) => Promise<void>
  onBoot: (_ctx?: HttpContext) => Promise<void>
  onDehydrate: () => Promise<void>
  onError: (error: Error) => Promise<void>
  onHydrate: () => Promise<void>
  onMount: (_ctx?: HttpContext) => Promise<void>
  onRendered: (_html: string) => Promise<void>
  onRendering: () => Promise<void>
  onUpdate: () => Promise<void>
  onUpdated: (_prop: string, _value: unknown, _key?: string) => Promise<void>
  onUpdating: (_prop: string, _value: unknown, _key?: string) => Promise<void>
  placeholder: () => HtmlNode
  redirect: (url: string, status?: number) => RedirectFlash
  redirectIntended: (fallback?: string, status?: number) => RedirectFlash
  redirectRoute: <N extends RouteTarget>(name: N, params?: RouteParamsArg<N>, status?: number) => RedirectFlash
  refresh: () => Promise<void>
  render: () => Promise<HtmlNode>
  resetValidation: (field?: string) => void
  signal: AbortSignal
  slot: (name?: string) => HtmlNode
  stream: (ref: string, content: string, opts?: {    replace?: boolean;}) => void
  validate: (rulesOrForm?: ValidationRules | {    __isFlowForm: true;    _validateToErrors(): Record<string, string[]>;}) => Promise<void>
}

class ErrorField = {
  new (field: string, messages: string[]): ErrorField
  readonly __field: string
  readonly __isErrorField: true
  readonly __value: string
}

class FlowActionHandled = {
  new (component: string, action: string, durationMs: number, ok: boolean, ip: string | null, ctx: object | undefined): FlowActionHandled
  readonly action: string
  readonly component: string
  readonly ctx: object | undefined
  readonly durationMs: number
  readonly ip: string | null
  readonly ok: boolean
}

class FlowProvider = {
  new (app: Application): FlowProvider
  static dependsOn?: (new (app: Application) => ServiceProvider)[]
  static environments: AppEnvironment[]
  static persistMiddleware: (...middleware: (string | MiddlewareClass)[]) => void
  static persistentMiddleware: (string | MiddlewareClass)[]
  static priority?: number
  static provides?: readonly (keyof ContainerBindings)[]
  static registerSynth: (synth: Synth) => void
  devProcesses: () => DevProcessDefinition[]
  doctorChecks: () => DoctorCheck[]
  onBooted: () => Promise<void>
  onBooting: () => Promise<void>
  onRegister: () => void
  onRequestProcessed: (_ctx: HttpContext) => Promise<void>
  onRequestReceived: (_ctx: HttpContext) => Promise<void>
  onResponseSent: (_ctx: HttpContext) => Promise<void>
  onStarted: () => Promise<void>
  onStarting: () => Promise<void>
  onStopped: () => Promise<void>
  onStopping: () => Promise<void>
  replContext: () => Record<string, unknown>
}

class Form = {
  new (): Form
  _validateToErrors: () => Record<string, string[]>
  data: () => Record<string, unknown>
  fill: (values: Record<string, unknown>) => Form
  readonly __isFlowForm: true
  reset: (...fields: string[]) => Form
  rules: (_v: RuleBuilder) => Record<string, FieldRule>
  validate: () => Record<string, unknown>
}

class Layout = {
  new (): Layout
  static head?: string
  render: (slot: HtmlNode) => HtmlNode | Promise<HtmlNode>
}

class TemporaryUploadedFile = {
  new (d: TufData): TemporaryUploadedFile
  static fromSignedRef: (ref: UploadRef) => TemporaryUploadedFile | null
  static fromTrustedRef: (data: TufData) => TemporaryUploadedFile
  bytes: () => Promise<Uint8Array>
  extension: () => string
  isImage: () => boolean
  name: string
  readonly mime: string
  readonly originalName: string
  readonly size: number
  readonly tempDisk?: string | undefined
  readonly tmpPath: string
  store: (directory: string, diskName?: string, filename?: string) => Promise<string>
  temporaryUrl: (ttlSeconds?: number) => Promise<string>
  toRef: () => TufData
}

class ValidationError = {
  new (errors: Record<string, string[]>): ValidationError
  readonly code: string
  readonly context?: Record<string, unknown> | undefined
  readonly errors: Record<string, string[]>
  readonly status: number
}

class WebSocketConnected = {
  new (url: string): WebSocketConnected
  readonly url: string
}

class WebSocketDisconnected = {
  new (url: string): WebSocketDisconnected
  readonly url: string
}

const FLOW_ENHANCE_PATH = '/__flow/enhance.js'

const locked = (value: unknown, context: ClassFieldDecoratorContext) => void

const modelable = (value: unknown, context: ClassFieldDecoratorContext) => void

const reactive = (value: unknown, context: ClassFieldDecoratorContext) => void

const transient = (value: unknown, context: ClassFieldDecoratorContext) => void

function Accordion = (props: AccordionProps) => HtmlNode

function Alert = (props: AlertProps) => HtmlNode

function Calendar = (props: CalendarProps) => HtmlNode

function Checkbox = (props: CheckboxProps) => HtmlNode

function Combobox = (props: ComboboxProps) => HtmlNode

function computed = <This, Return>(getter: (this: This) => Return, context: ClassGetterDecoratorContext<This, Return>) => (this: This) => Return

function defineStore = (initial: Record<string, unknown>) => void

function Description = (props: DescriptionProps) => HtmlNode

function Disclosure = (props: DisclosureProps) => HtmlNode

function Drawer = (props: DrawerProps) => HtmlNode

function Dropdown = (props: DropdownProps) => HtmlNode

function ErrorBoundary = (props: ErrorBoundaryProps) => HtmlNode

function ErrorMessage = (props: ErrorProps) => HtmlNode

function Errors = (props?: ErrorsProps) => HtmlNode

function expose = (_value: unknown, context: ExposeContext) => void

function Field = (props: FieldProps) => HtmlNode

function Fieldset = (props: FieldsetProps) => HtmlNode

function FileUpload = (props: FileUploadProps) => HtmlNode

function FileUploads = <TBase extends AbstractComponentCtor>(Base: TBase) => ((abstract new (...args: any[]) => WithUploads) & {    prototype: FileUploads<any>.WithUploads;}) & TBase

function Flash = (props?: FlashProps) => HtmlNode

function flow = <T>(target: T) => FlowChain<T>

function FlowConfig = (options?: Partial<FlowConfigShape>) => FlowConfigShape

function flowEnhanceTag = () => string

function For = <T>(props: ForProps<T>) => HtmlNode

function Head = (props: {    children?: unknown;}) => HtmlNode

function InfiniteScroll = (props: InfiniteScrollProps) => HtmlNode

function Label = (props: LabelProps) => HtmlNode

function Legend = (props: LegendProps) => HtmlNode

function Link = (props: LinkProps & {    children?: unknown;}) => HtmlNode

function Listbox = (props: ListboxProps) => HtmlNode

function Loading = (props: LoadingProps) => HtmlNode

function Modal = (props: ModalProps) => HtmlNode

function on = (eventName: ListenerName) => (fn: unknown, context: ClassMethodDecoratorContext) => void

function Pager = (props: PagerProps) => HtmlNode

function paginate = <T>(items: T[], page?: number, perPage?: number) => Paginator<T>

function Pagination = <TBase extends AbstractComponentCtor>(Base: TBase) => ((abstract new (...args: any[]) => Paginated) & {    prototype: Pagination<any>.Paginated;}) & TBase

function param = {    (value: unknown, context: ClassFieldDecoratorContext): void;    (source?: string | ParamModel): ParamDecorator;}

function Persist = (props: {    name: string;    children?: unknown;}) => HtmlNode

function Popover = (props: PopoverProps) => HtmlNode

function presence = (channel: PresenceChannel) => (value: unknown, context: ClassFieldDecoratorContext) => void

function RadioGroup = (props: RadioGroupProps) => HtmlNode

function registerFlowEvent = <K extends EventName>(name: K, guard: (payload: unknown) => payload is FlowEvents[K]) => void

function renderless = (_fn: unknown, context: ClassMethodDecoratorContext) => void

function SectionContent = (props: SectionContentProps) => HtmlNode

function SectionOutlet = (props: SectionOutletProps) => HtmlNode

function Select = (props: SelectProps) => HtmlNode

function session = {    (value: unknown, context: ClassFieldDecoratorContext): void;    (opts?: SessionOptions): SessionDecorator;}

function setDurableStore = (store: DurableStore) => void

function setSharedStore = (store: SharedStore) => void

function shared = (channel: SharedChannel) => (value: unknown, context: ClassFieldDecoratorContext) => void

function Skeleton = (props: SkeletonProps) => HtmlNode

function Slider = (props: SliderProps) => HtmlNode

function Switch = (props: SwitchProps) => HtmlNode

function Table = <T extends Record<string, unknown>>(props: TableProps<T>) => HtmlNode

function Tabs = (props: TabsProps) => HtmlNode

function task = (_fn: unknown, context: ClassMethodDecoratorContext) => void

function Title = (props: {    children?: unknown;}) => HtmlNode

function ToggleGroup = (props: ToggleGroupProps) => HtmlNode

function Tooltip = (props: TooltipProps) => HtmlNode

function url = {    (value: unknown, context: ClassFieldDecoratorContext): void;    (opts?: UrlOptions): UrlDecorator;}

function validate = (build: ValidateBuilder) => (value: unknown, context: ClassFieldDecoratorContext) => void

function Virtualize = <T>(props: VirtualizeProps<T>) => HtmlNode

interface AccordionItem = {
  content: unknown
  label: unknown
}

interface AccordionProps = {
  [key: string]: unknown
  buttonClass?: string
  class?: string
  defaultIndex?: number
  itemClass?: string
  items: AccordionItem[]
  multiple?: boolean
  panelClass?: string
}

interface AlertProps = {
  [key: string]: unknown
  children?: unknown
  class?: string
  dismissible?: boolean
  title?: unknown
  variant?: 'success' | 'error' | 'warning' | 'info'
}

interface CalendarProps = {
  [key: string]: unknown
  bind?: unknown
  class?: string
  dayClass?: string
  gridClass?: string
  headerClass?: string
  max?: string
  min?: string
  month?: string
  name?: string
  navClass?: string
  sundayFirst?: boolean
  weekdayClass?: string
}

interface CheckboxProps = {
  [key: string]: unknown
  bind: unknown
  children?: unknown
  class?: string
}

interface ComboboxOption = {
  label: string
  value: string | number
}

interface ComboboxProps = {
  [key: string]: unknown
  bind?: unknown
  class?: string
  inputClass?: string
  name?: string
  optionClass?: string
  options: ComboboxOption[]
  optionsClass?: string
  placeholder?: string
  query?: unknown
  queryName?: string
}

interface Compose = {
  <TBase extends Constructor, A extends Constructor, B extends Constructor, C extends Constructor, D extends Constructor, E extends Constructor, F extends Constructor, G extends Constructor, H extends Constructor>(this: TBase, a: (base: TBase) => A, b: (base: A) => B, c: (base: B) => C, d: (base: C) => D, e: (base: D) => E, f: (base: E) => F, g: (base: F) => G, h: (base: G) => H): H
  <TBase extends Constructor, A extends Constructor, B extends Constructor, C extends Constructor, D extends Constructor, E extends Constructor, F extends Constructor, G extends Constructor>(this: TBase, a: (base: TBase) => A, b: (base: A) => B, c: (base: B) => C, d: (base: C) => D, e: (base: D) => E, f: (base: E) => F, g: (base: F) => G): G
  <TBase extends Constructor, A extends Constructor, B extends Constructor, C extends Constructor, D extends Constructor, E extends Constructor, F extends Constructor>(this: TBase, a: (base: TBase) => A, b: (base: A) => B, c: (base: B) => C, d: (base: C) => D, e: (base: D) => E, f: (base: E) => F): F
  <TBase extends Constructor, A extends Constructor, B extends Constructor, C extends Constructor, D extends Constructor, E extends Constructor>(this: TBase, a: (base: TBase) => A, b: (base: A) => B, c: (base: B) => C, d: (base: C) => D, e: (base: D) => E): E
  <TBase extends Constructor, A extends Constructor, B extends Constructor, C extends Constructor, D extends Constructor>(this: TBase, a: (base: TBase) => A, b: (base: A) => B, c: (base: B) => C, d: (base: C) => D): D
  <TBase extends Constructor, A extends Constructor, B extends Constructor, C extends Constructor>(this: TBase, a: (base: TBase) => A, b: (base: A) => B, c: (base: B) => C): C
  <TBase extends Constructor, A extends Constructor, B extends Constructor>(this: TBase, a: (base: TBase) => A, b: (base: A) => B): B
  <TBase extends Constructor, A extends Constructor>(this: TBase, a: (base: TBase) => A): A
}

interface DescriptionProps = {
  [key: string]: unknown
  children?: unknown
  class?: string
}

interface DisclosureProps = {
  [key: string]: unknown
  buttonClass?: string
  children?: unknown
  class?: string
  defaultOpen?: boolean
  label?: unknown
  panelClass?: string
  trigger?: unknown
}

interface DrawerProps = {
  [key: string]: unknown
  children?: unknown
  class?: string
  closable?: boolean
  name?: string
  onClose?: unknown
  show?: unknown
  side?: 'left' | 'right' | 'top' | 'bottom'
  title?: unknown
}

interface DropdownProps = {
  [key: string]: unknown
  align?: 'left' | 'right'
  children?: unknown
  class?: string
  label?: unknown
  panelClass?: string
  trigger?: unknown
}

interface ErrorBoundaryProps = {
  [key: string]: unknown
  children?: unknown
  class?: string
  fallback?: HtmlNode | ((error: unknown) => HtmlNode)
  onError?: (error: unknown) => void
  tag?: string
}

interface ErrorProps = {
  [key: string]: unknown
  class?: string
  for?: unknown
}

interface ErrorsProps = {
  [key: string]: unknown
  class?: string
  only?: string | string[]
}

interface FieldProps = {
  [key: string]: unknown
  children?: unknown
  class?: string
  description?: unknown
  error?: unknown
  label?: unknown
}

interface FieldsetProps = {
  [key: string]: unknown
  children?: unknown
  class?: string
  disabled?: boolean
  legend?: unknown
}

interface FileUploadProps = {
  [key: string]: unknown
  accept?: string
  bind: unknown
  children?: unknown
  class?: string
  label?: string
  multiple?: boolean
}

interface FlashAction = {
  args?: unknown[]
  color?: string
  label: string
  method: string
  uppercase?: boolean
  variant?: FlashActionVariant
}

interface FlashActionStyle = {
  color?: string
  uppercase?: boolean
  variant?: FlashActionVariant
}

interface FlashBuilder = {
  action: (label: string, method: string, args?: unknown[], style?: string | FlashActionStyle) => FlashBuilder
  dismissible: (value?: boolean) => FlashBuilder
  duration: (ms: number) => FlashBuilder
  error: () => FlashBuilder
  icon: (icon: string | false) => FlashBuilder
  info: () => FlashBuilder
  level: (level: FlashLevel) => FlashBuilder
  noAutoDismiss: () => FlashBuilder
  onClose: (method: string, args?: unknown[]) => FlashBuilder
  position: (position: FlashPosition) => FlashBuilder
  progressBar: (value?: boolean) => FlashBuilder
  success: () => FlashBuilder
  title: (title: string) => FlashBuilder
  warning: () => FlashBuilder
}

interface FlashCallback = {
  args?: unknown[]
  method: string
}

interface FlashMessage = {
  actions?: FlashAction[]
  dismissible?: boolean
  duration?: number
  icon?: string | false
  level: 'success' | 'error' | 'warning' | 'info'
  message: string
  onClose?: FlashCallback
  position?: FlashPosition
  progressBar?: boolean
  title?: string
}

interface FlashOptions = {
  actions?: FlashAction[] | undefined
  dismissible?: boolean | undefined
  duration?: number | undefined
  icon?: string | false | undefined
  level?: 'success' | 'error' | 'warning' | 'info' | undefined
  onClose?: FlashCallback | undefined
  position?: FlashPosition | undefined
  progressBar?: boolean | undefined
  title?: string | undefined
  type?: 'success' | 'error' | 'warning' | 'info' | undefined
}

interface FlashProps = {
  [key: string]: unknown
  duration?: number
  position?: 'top-right' | 'top-left' | 'bottom-right' | 'bottom-left' | 'top-center' | 'bottom-center'
}

interface FlowChain = {
  confirm: (message: string) => FlowChain<T>
  debounce: (ms: string | number) => FlowChain<T>
  readonly __isFlow: true
  readonly __key: string | undefined
  readonly __modifiers: string[]
  readonly __target: T
  readonly blur: FlowChain<T>
  readonly camel: FlowChain<T>
  readonly capture: FlowChain<T>
  readonly document: FlowChain<T>
  readonly fill: FlowChain<T>
  readonly lazy: FlowChain<T>
  readonly live: FlowChain<T>
  readonly once: FlowChain<T>
  readonly outside: FlowChain<T>
  readonly passive: FlowChain<T>
  readonly prevent: FlowChain<T>
  readonly self: FlowChain<T>
  readonly stop: FlowChain<T>
  readonly window: FlowChain<T>
  throttle: (ms: string | number) => FlowChain<T>
}

interface FlowConfigShape = {
  cspSafe: boolean
  persistentMiddleware: (string | MiddlewareClass)[]
}

interface FlowEvents = {}

interface FlowStore = {}

interface ForProps = {
  children: (item: T, index: number) => HtmlNode
  each: readonly T[]
  keyBy?: string
}

interface InfiniteScrollProps = {
  [key: string]: unknown
  children?: unknown
  class?: string
  onMore: unknown
  show?: boolean
}

interface LabelProps = {
  [key: string]: unknown
  children?: unknown
  class?: string
}

interface LegendProps = {
  [key: string]: unknown
  children?: unknown
  class?: string
}

interface LinkProps = {
  [key: string]: unknown
  current?: boolean
  down?: boolean
  exact?: boolean
  hover?: boolean
  href: string
  preserveScroll?: boolean
}

interface ListboxOption = {
  label: unknown
  value: string | number
}

interface ListboxProps = {
  [key: string]: unknown
  bind: unknown
  buttonClass?: string
  class?: string
  multiple?: boolean
  optionClass?: string
  options: ListboxOption[]
  optionsClass?: string
  placeholder?: string
}

interface LoadingProps = {
  [key: string]: unknown
  children?: unknown
  class?: string
  delay?: boolean
  hide?: boolean
  skeleton?: boolean | SkeletonProps
  tag?: string
  target?: string | string[]
}

interface ModalProps = {
  [key: string]: unknown
  children?: unknown
  class?: string
  closable?: boolean
  name?: string
  onClose?: unknown
  show?: unknown
  title?: unknown
}

interface PagerProps = {
  [key: string]: unknown
  activeClass?: string
  class?: string
  hover?: boolean
  linkClass?: string
  nextLabel?: string
  paginator: PagerLike
  params?: Record<string, string | number | null | undefined>
  prevLabel?: string
}

interface Paginator = {
  data: T[]
  elements: (each?: number) => (number | '...')[]
  from: number
  hasMorePages: boolean
  lastPage: number
  onFirstPage: boolean
  page: number
  perPage: number
  to: number
  total: number
}

interface PopoverProps = {
  [key: string]: unknown
  buttonClass?: string
  children?: unknown
  class?: string
  label?: unknown
  panelClass?: string
  trigger?: unknown
}

interface PresenceMember = {
  [key: string]: unknown
  id: string | number
}

interface RadioGroupProps = {
  [key: string]: unknown
  bind: unknown
  class?: string
  optionClass?: string
  options: RadioOption[]
}

interface RadioOption = {
  label: unknown
  value: string | number
}

interface RedirectFlash = {
  with: (message: string, level: FlashLevel) => RedirectFlash
  withError: (message: string) => RedirectFlash
  withInfo: (message: string) => RedirectFlash
  withSuccess: (message: string) => RedirectFlash
  withWarning: (message: string) => RedirectFlash
}

interface SectionContentProps = {
  children?: unknown
  name: string
}

interface SectionOutletProps = {
  children?: unknown
  name: string
}

interface SelectOption = {
  label: unknown
  value: string | number
}

interface SelectProps = {
  [key: string]: unknown
  bind: unknown
  class?: string
  options: SelectOption[]
  placeholder?: string
}

interface SessionOptions = {
  key?: string | undefined
  scoped?: boolean | undefined
}

interface SkeletonProps = {
  [key: string]: unknown
  class?: string
  height?: string
  lines?: number
  rounded?: string | boolean
  width?: string
}

interface SliderProps = {
  [key: string]: unknown
  bind?: unknown
  children?: unknown
  class?: string
  inputClass?: string
  inputStyle?: string
  inputStyleExpression?: string
  max?: number
  min?: number
  name?: string
  step?: number
}

interface Snapshot = {
  checksum: string
  data: SnapshotData
  memo: SnapshotMemo
}

interface SwitchProps = {
  [key: string]: unknown
  bind: unknown
  children?: unknown
  class?: string
}

interface TabItem = {
  content: unknown
  label: unknown
  name?: string
}

interface TableColumn = {
  class?: string
  key: string
  label: unknown
  render?: (row: T) => unknown
  sortable?: boolean
}

interface TableProps = {
  [key: string]: unknown
  class?: string
  columns: TableColumn<T>[]
  hover?: boolean
  params?: Record<string, string | number | null | undefined>
  rowKey?: string
  rows: T[]
  sortBy?: string
  sortDir?: 'asc' | 'desc'
  theadClass?: string
}

interface TabsProps = {
  [key: string]: unknown
  class?: string
  items: TabItem[]
}

interface ToggleGroupProps = {
  [key: string]: unknown
  bind?: unknown
  class?: string
  multiple?: boolean
  name?: string
  optionClass?: string
  options: ToggleOption[]
}

interface ToggleOption = {
  disabled?: boolean
  label?: unknown
  value: string
}

interface TooltipProps = {
  [key: string]: unknown
  children?: unknown
  class?: string
  content?: unknown
  placement?: 'top' | 'bottom'
  text?: unknown
  tooltipClass?: string
}

interface UploadRef = {
  __flow_upload: true
  mime: string
  originalName: string
  sig: string
  size: number
  tempDisk?: string | undefined
  tmpPath: string
}

interface UrlOptions = {
  as?: string | undefined
  history?: 'replace' | 'push' | undefined
}

interface VirtualizeProps = {
  children: (item: T, index: number) => HtmlNode
  class?: string
  height?: number
  itemHeight: number
  items: readonly T[]
  onWindow?: unknown
  overscan?: number
  start?: number
  total?: number
}

type Constructor = abstract new (...args: any[]) => T

type DurableOption = boolean | { ttl?: string; scope?: 'user' | 'session' }

type EventName = never

type EventPayload = FlowEvents[K]

type FlashActionVariant = 'solid' | 'soft' | 'ghost'

type FlashLevel = 'success' | 'error' | 'warning' | 'info'

type FlashPosition = 'top-right' | 'top-left' | 'bottom-right' | 'bottom-left' | 'top-center' | 'bottom-center'

type HtmlNode = {    html: string;}

type ListenerName = LooseEventName | ((self: Record<string, any>) => string)

type Mixin = (Base: TIn) => TOut

type PresenceChannel = string | ((self: Record<string, any>) => string)

type ValidationRules = {    [x: string]: (rule: RuleBuilder) => FieldRule;}

## ./browser  `(./src/browser/index.ts)`

class FlowBrowser = {
  new (_browser: LaunchedBrowser, _session: CdpSession): FlowBrowser
  static available: () => boolean
  static open: (url: string, options?: OpenOptions) => Promise<FlowBrowser>
  attr: (selector: string, name: string) => Promise<string | null>
  click: (selector: string) => Promise<void>
  close: () => Promise<void>
  consoleErrors: () => string[]
  evaluate: <T = unknown>(expression: string) => Promise<T>
  fill: (selector: string, value: string) => Promise<void>
  goto: (url: string, options?: OpenOptions) => Promise<void>
  html: () => Promise<string>
  pageErrors: () => string[]
  text: (selector: string) => Promise<string>
  value: (selector: string) => Promise<string>
  waitForSelector: (selector: string, timeoutMs?: number) => Promise<void>
  waitForText: (selector: string, text: string, timeoutMs?: number) => Promise<void>
  waitUntil: (expression: string, label: string, timeoutMs?: number) => Promise<void>
}

## ./compiler-helpers  `(./src/compiler/helpers.ts)`

_(no exports)_

## ./store  `(./src/store.ts)`

function defineStore = (initial: Record<string, unknown>) => void

interface FlowStore = {}

## ./testing  `(./src/testing.ts)`

class FlowTest = {
  new <T extends Component>(page: T, name: string): FlowTest<T>
  static mount: <T extends Component>(PageClass: PageClass<T>, props?: Partial<T>) => Promise<FlowTest<T>>
  assertDispatched: (eventName: string) => FlowTest<T>
  assertDontSee: (text: string) => FlowTest<T>
  assertErrored: (match?: string | RegExp) => FlowTest<T>
  assertFlashed: (level?: string, message?: string) => FlowTest<T>
  assertHasErrors: (field: string, message?: string) => FlowTest<T>
  assertNoErrors: () => FlowTest<T>
  assertNotRedirected: () => FlowTest<T>
  assertRedirectedTo: (url: string) => FlowTest<T>
  assertSee: (text: string) => FlowTest<T>
  call: (method: string, ...args: unknown[]) => Promise<FlowTest<T>>
  effects: () => FlowEffects | null
  errors: () => Record<string, string[]>
  flashes: () => FlowEffects['flashes']
  html: () => string
  lastError: () => Error | null
  page: () => T
  render: () => Promise<FlowTest<T>>
  seed: (prop: keyof T, value: unknown) => Promise<FlowTest<T>>
  set: (prop: keyof T, value: unknown) => Promise<FlowTest<T>>
  snapshot: () => Snapshot | null
  tolerateErrors: () => FlowTest<T>
  update: (prop: keyof T, value: unknown) => Promise<FlowTest<T>>
}

function hydrate = <T extends Component>(snapshot: Snapshot, PageClass: new () => T) => Promise<T>
