import { C as Column, Q as Query, A as AliasBinding, H as HostDataPort } from '../types-KMDy-tWr.js'; export { a as AnyAlias, b as CUSTOM_ROW_TOKEN, D as DataEvents, c as DataPort, d as DataPortEventName, e as DataSource, f as EntityAlias, E as EntityRef, L as Lane, P as Page, R as Row, g as RowsEvent, T as TableAlias, V as Values, W as WhereClause, h as WhereOp } from '../types-KMDy-tWr.js'; import { RecordsClient } from '../core/index.js'; import { Field } from '../core/index.js'; import { U as Uuid } from '../record-C3thPhpR.js'; import { RecordsResult, RecordPageSort, ReadRow } from '../core/index.js'; import { RuleExpression } from '../core/index.js'; import '../relation-B00lR6BX.js'; import '../ports-uIDHLgZN.js'; import '../subscription-DSnIFqdB.js'; import '../doors-DZzgZBEf.js'; import '../pickListDoors-DcCN4k-W.js'; import '../portal-CHEQEjS7.js'; import '../table-kind/index.js'; interface TableShape { columns: Column[]; /** Column key → the store's Field, for filters (by id) and sorts (by type). */ fields: ReadonlyMap; } /** The word a Column carries: a range says which kind of range it is (number, date, datetime, currency…). */ declare function columnTypeOf(field: Field): string; /** One table's live columns. Choice words come from each choice column's own options, in one round trip each, in parallel. */ declare function readTableShape(client: RecordsClient, tableId: Uuid): Promise>; /** * The ids a link cell holds, in order, whatever shape it arrived in: one id, a list of ids, or * `{ id }` objects (the `EntityRef[]` a read returns). Empty strings and shapes without an id are * skipped; a numeric id is written as text. */ declare function linkIds(value: unknown): string[]; /** A literal, matched anywhere, ignoring case: the regex `matches` takes, with every special character escaped. */ declare function containsPattern(value: string): string; /** `Query.where` → the store's filter, or `undefined` for none. Every clause must hold. */ declare function compileWhere(where: Query["where"], shape: TableShape): RecordsResult; /** `Query.sort` → the store's sort keys, typed so numbers sort as numbers and dates as dates. */ declare function compileSort(sort: Query["sort"], shape: TableShape): RecordsResult; /** The most rows one page holds; a larger `pageSize` is held to it (the store's own page ceiling decides below that). */ declare const DATA_PAGE_CEILING = 500; declare const DATA_PAGE_DEFAULT = 50; /** A row as the keyset door answers it: the masked document plus the version and organization it was read at. */ type VersionedReadRow = ReadRow & { version: number; organization_id: Uuid; }; interface CreateTableDataPortOptions { /** The host's client for the signed-in person (its realtime port, if bound, feeds the event streams). */ client: RecordsClient; /** The Applet's aliases, resolved at build time. A name is never looked up at run time. */ aliases: Readonly>; } declare function createTableDataPort({ client, aliases }: CreateTableDataPortOptions): HostDataPort; export { AliasBinding, Column, DATA_PAGE_CEILING, DATA_PAGE_DEFAULT, HostDataPort, Query, Uuid, columnTypeOf, compileSort, compileWhere, containsPattern, createTableDataPort, linkIds, readTableShape }; export type { CreateTableDataPortOptions, TableShape, VersionedReadRow };