import { ModelColumnMetadata, ModelDef, ModelRelationMetadata, RowOf } from '@xylex-group/athena/browser'; import { ReactNode } from 'react'; import { AthenaTableColumn } from './components/auth/table/core/data-table.js'; import { AthenaTableChipConfig } from './components/auth/table/utils/table-value-utils.js'; export { type AthenaReadQueryClient, type AthenaReadQueryColumn, type AthenaReadQueryDefinition, type AthenaReadQueryExecutionInput, type AthenaReadQueryExecutionResult, type AthenaReadQueryFilter, type AthenaReadQueryFilterOperator, type AthenaReadQueryFilterValue, type AthenaReadQueryFlatRow, type AthenaReadQueryMode, type AthenaReadQueryOrder, type AthenaReadQueryOrderByInput, type AthenaReadQueryOrderDirection, type AthenaReadQueryRelationRef, type AthenaTableOrderByInput, applyAthenaReadQueryFilters, applyAthenaReadQuerySelectLimit, applyAthenaReadQuerySelectOrder, applyAthenaTableFilters, applyAthenaTableSelectLimit, applyAthenaTableSelectOrder, buildAthenaReadQueryFindManyOrderBy, buildAthenaReadQueryFindManySelect, buildAthenaReadQueryFindManyWhere, buildAthenaReadQuerySelectString, buildAthenaTableFindManyOrderBy, buildAthenaTableFindManySelect, buildAthenaTableFindManyWhere, buildAthenaTableSelectString, clampAthenaReadQueryTotalItems, clampAthenaTableTotalItems, executeAthenaReadQuery, executeAthenaTableQuery, flattenAthenaReadQueryRows, flattenAthenaRows, normalizeAthenaReadQueryOrderBy, normalizeAthenaTableOrderBy } from './athena/table-query-executor.js'; export { type AthenaTableQueryRouteAuthorizeContext, type AthenaTableQueryRouteBody, type CreateAthenaTableQueryRouteOptions, createAthenaTableQueryRoute, handleAthenaTableQueryPost, isAthenaTableQueryDefinition } from './athena/table-query-route.js'; export { FoldedCodeBlock, type FoldedCodeBlockProps, formatCodeJson, ShikiCodeBlock, type ShikiCodeBlockProps } from './components/auth/code/highlighted-code-block.js'; export { AuthEmptyState, type AuthEmptyStateProps, WorkspaceEmptyState, type WorkspaceEmptyStateProps } from './components/auth/empty-state/auth-empty-state.js'; export { TableEmptyState, type TableEmptyStateProps } from './components/auth/empty-state/table-empty-state.js'; export { NetworkRequestRunner, type NetworkRequestRunnerMessages, type NetworkRequestRunnerProps, type NetworkRequestRunnerRenderState, type RunNetworkRequestOptions, runNetworkRequest } from './components/auth/network-request-runner.js'; export type { AthenaTableActionBarProps } from './components/auth/table/actions/data-table-action-bar.js'; export { AthenaTableActionBar } from './components/auth/table/actions/data-table-action-bar.js'; export type { IconAction, IconActionButtonProps, IconActionIcon } from './components/auth/table/actions/icon-action-button.js'; export { IconActionButton } from './components/auth/table/actions/icon-action-button.js'; export type { AthenaTableAction, AthenaTableActionContext, AthenaTableActionTone } from './components/auth/table/actions/table-actions.js'; export { canRunAthenaTableAction, invokeAthenaTableAction, isAthenaTableActionDisabled, resolveAthenaTableActionBoolean } from './components/auth/table/actions/table-actions.js'; export { type AthenaTableBuilderClientConfig, type AthenaTableBuilderPackageVersions, type AthenaTableDataSourceMode, type AthenaTableDesktopBreakpoint, type AthenaTableShowcaseConfig, type BuilderActionConfig, type BuilderActionFeedbackConfig, type BuilderActionIcon, type BuilderActionKind, type BuilderActionTone, type BuilderColumnChipConfig, type BuilderColumnConfig, type BuilderColumnFormatConfig, type BuilderFilterConfig, type BuilderFormatKind, type BuilderSortStrategyName, type BuildTableBuilderPresetInput, buildGeneratedCode, buildTableBuilderPreset, buildTableBuilderPresetMetadata, createColumnTranslationKey, createConfigIdentity, DEFAULT_DATA_PROXY_PATH, detectFeatures, escapeTsString, type GeneratedCodeFeatures, type GeneratedCodeInput, type GeneratedEmptyStateMode, getImportedArray, getImportedBoolean, getImportedChip, getImportedDesktopBreakpoint, getImportedEmptyStateMode, getImportedFormat, getImportedNumber, getImportedOrderBy, getImportedOrderDirection, getImportedQueryMode, getImportedSortStrategy, getImportedString, getImportedValue, type ImportedPresetAction, type ImportedPresetColumn, type ImportedPresetFilter, type ImportedTableBuilderPreset, indentBlock, joinLines, joinSections, normalizeAction, normalizePresetAction, normalizePresetColumn, normalizePresetColumns, normalizePresetFilter, parseConfigSeed, parseTableColumnObjectPath, parseTableObjectPath, serializePresetAction, serializePresetColumn, serializePresetFilter, serializeTsObject, serializeTsValue, stableConfigStringify, TABLE_BUILDER_PRESET_KIND, type TableBuilderOrderByEntry, type TableBuilderPreset, type TableBuilderPresetAction, type TableBuilderPresetColumn, type TableBuilderPresetFilter, type TableBuilderPresetMetadata, type TableCatalogColumn, type TableCatalogRelation, type TableCatalogResponse, type TableCatalogTable, type TableColumnObjectPath, type TableColumnOption, type TableObjectPath, tableCatalogToObjectPath, tableColumnObjectPathToDisplayPath, tableObjectPathToId } from './components/auth/table/builder/index.js'; export type { AuthTableBodyProps, AuthTableProps } from './components/auth/table/core/auth-table.js'; export { AuthTable } from './components/auth/table/core/auth-table.js'; export type { AthenaTableEmptyStateConfig, AthenaTableEmptyStateContext, AthenaTableEmptyStateInput } from './components/auth/table/core/auth-table-empty-state.js'; export { createAthenaTableEmptyState, isAthenaTableEmptyStateConfig, resolveAthenaTableEmptyStateContent } from './components/auth/table/core/auth-table-empty-state.js'; export type { AthenaTableAsyncLoadingConfig, AthenaTableAsyncLoadingState, AthenaTableColumn, AthenaTableColumnAlign, AthenaTableColumnDefaultWidth, AthenaTableColumnMinWidth, AthenaTableProps, AthenaTableSearchConfig, AthenaTableSortConfig, AthenaTableSortingMode, AthenaTableStatusFilterConfig, AthenaTableVirtualizationConfig, AthenaTableVirtualizationLayoutOptions } from './components/auth/table/core/data-table.js'; export { AthenaTable, compareSortValues, isAthenaTableAsyncLoadingEnabled, isAthenaTableColumnResizable, isAthenaTableVirtualizationEnabled, resolveAthenaTableAlignClassName, resolveAthenaTableCellClassName, resolveAthenaTableHeaderContentClassName, resolveAthenaTableHeaderLabelClassName, resolveAthenaTableHeaderSortIcon, shouldTruncateAthenaTableCell, wrapAthenaTableCellContent } from './components/auth/table/core/data-table.js'; export type { AthenaTableErrorProps, AthenaTableErrorSize, AthenaTableErrorVariant } from './components/auth/table/core/table-error.js'; export { AthenaTableError, hasAthenaTableErrorContent } from './components/auth/table/core/table-error.js'; export type { TableSkeletonProps } from './components/auth/table/core/table-skeleton.js'; export { TableSkeleton } from './components/auth/table/core/table-skeleton.js'; export type { AthenaTableFilter, AthenaTableFilterOperator, AthenaTableFilterValue, AthenaTableFlatRow, AthenaTableOrder, AthenaTableOrderDirection, AthenaTableQueryClient, AthenaTableQueryColumn, AthenaTableQueryDefinition, AthenaTableQueryExecutionInput, AthenaTableQueryExecutionResult, AthenaTableQueryMode, AthenaTableRelationRef, UseAthenaInfiniteQueryOptions, UseAthenaInfiniteQueryResult, UseAthenaInfiniteTableQueryOptions, UseAthenaInfiniteTableQueryResult, UseAthenaQueryOptions, UseAthenaQueryResult, UseAthenaTableQueryOptions, UseAthenaTableQueryResult } from './components/auth/table/hooks/use-athena-query.js'; export { useAthenaInfiniteQuery, useAthenaInfiniteTableQuery, useAthenaQuery, useAthenaTableQuery } from './components/auth/table/hooks/use-athena-query.js'; export type { UseAthenaTableViewOptions, UseAthenaTableViewResult } from './components/auth/table/hooks/use-athena-table-view.js'; export { useAthenaTableView } from './components/auth/table/hooks/use-athena-table-view.js'; export { type PaginationSummaryInfo, type UseDataTablePaginationOptions, type UseDataTablePaginationResult, useClientPagination, useDataTablePagination } from './components/auth/table/hooks/use-data-table-pagination.js'; export type { TableSelection } from './components/auth/table/hooks/use-table-selection.js'; export { toTanstackRowSelection, useTableSelection, useTableSelectionStore } from './components/auth/table/hooks/use-table-selection.js'; export type { AthenaTableSortDescriptor, AthenaTableSortDirection, AthenaTableSortingState, UseTableSortingOptions } from './components/auth/table/hooks/use-table-sorting.js'; export { useTableSorting, useTableSortingStore } from './components/auth/table/hooks/use-table-sorting.js'; export type { AuthTableMobileRowsProps } from './components/auth/table/rows/auth-table-mobile-rows.js'; export { AuthTableMobileRows } from './components/auth/table/rows/auth-table-mobile-rows.js'; export type { TableRowActionItem, TableRowActionTone } from './components/auth/table/rows/table-row-actions-menu.js'; export { TableRowActionsMenu } from './components/auth/table/rows/table-row-actions-menu.js'; export type { AuthTableMobileColumn, AuthTableMobileColumnRole } from './components/auth/table/utils/auth-table-column-utils.js'; export { resolveAuthTableMobileColumnRole } from './components/auth/table/utils/auth-table-column-utils.js'; export type { AthenaTableActionConfig, AthenaTableActionConfigField, AthenaTableActionIconName, AthenaTableActionKind, AthenaTableActionToneName, UpdateAthenaTableActionPatch } from './components/auth/table/utils/table-action-config.js'; export { appendAthenaTableAction, createDefaultAthenaTableActionConfig, DEFAULT_ATHENA_TABLE_ACTION_ICON, DEFAULT_ATHENA_TABLE_ACTION_TONE, nextAthenaTableActionId, normalizeAthenaTableActionConfig, removeAthenaTableAction, resolveAthenaTableActionValueColumnKey, updateAthenaTableAction } from './components/auth/table/utils/table-action-config.js'; export type { AthenaTableActionFeedbackConfig, AthenaTableFeedbackMessage, AthenaTableFeedbackText, AthenaTableToastAdapter, AthenaTableToastPayload, AthenaTableToastVariant, CopyWithAthenaTableFeedbackOptions, RunAthenaTableActionFeedbackOptions } from './components/auth/table/utils/table-action-feedback.js'; export { applyAthenaTableFeedbackTemplate, copyWithAthenaTableFeedback, createCopyActionFeedback, defaultAthenaTableToastAdapter, feedbackConfigToCopyOptions, getAthenaTableToastAdapter, resolveAthenaTableFeedbackMessage, runAthenaTableActionWithFeedback, setAthenaTableToastAdapter, showAthenaTableFeedback, showAthenaTableToast } from './components/auth/table/utils/table-action-feedback.js'; export { resolveColumnRender } from './components/auth/table/utils/table-column-render.js'; export { createCopyTableRowAction, createDownloadTableRowAction, createHrefTableRowAction, withTableRowActionFeedback } from './components/auth/table/utils/table-row-action-helpers.js'; export type { AthenaTableSortNulls, AthenaTableSortStrategy, AthenaTableSortStrategyConfig, AthenaTableSortStrategyName, AthenaTableSortValue } from './components/auth/table/utils/table-sort-strategies.js'; export { compareSortValues as compareSortValuesWithStrategy, resolveColumnSortValueFromRow } from './components/auth/table/utils/table-sort-strategies.js'; export { denormalizeSortingState, getColumnSortDirection, getColumnSortPriority, isSortingStateEqual, normalizeSortingState, orderByToSortingState, sortingStateToOrderBy, toggleColumnSortingState } from './components/auth/table/utils/table-sorting-state.js'; export type { AthenaTableFormatConfig, AthenaTableFormatKind, AthenaTableFormatOptions } from './components/auth/table/utils/table-value-formatters.js'; export { formatTableValue, getTableFormatKind, normalizeTableFormat } from './components/auth/table/utils/table-value-formatters.js'; export { type AthenaTableChipConfig, type AthenaTableChipDescriptor, type AthenaTableChipItemConfig, type AthenaTableChipOptions, type AthenaTableChipSize, type AthenaTableChipVariant, type AthenaTableChipWhen, type AthenaTableThumbnailOptions, buildTemplateValue, type CreateChipRendererFromConfigContext, chipConfigToOptions, computeCurrentPageEndIndex, computeHasMoreTotalItems, copyText, createChipRenderer, createChipRendererFromConfig, createDefaultAthenaTableChipConfig, createTableId, createThumbnailRenderer, downloadText, FileThumbnail, type FileThumbnailProps, type FileThumbnailSize, type FileThumbnailSource, type HasMorePaginationInput, isImageLikeValue, isImageMimeOrName, isPdfMimeOrName, isVideoMimeOrName, matchesChipWhen, normalizeAthenaTableChipConfig, openLink, type ResolveAthenaTableChipDescriptorsContext, renderChip, resolveAthenaTableChipDescriptors, resolveAthenaTableChipToneClassName, resolveBooleanColor, resolveFileThumbnailUrl, resolveStatusColor, type StatusColorVariant, serializeAthenaTableChipConfig, shouldShowPagination, statusChipRenderer, stringifyValue } from './components/auth/table/utils/table-value-utils.js'; export type { AthenaTableViewColumn, ToAthenaTableColumnsOptions } from './components/auth/table/utils/to-athena-table-columns.js'; export { toAthenaTableColumns, toReadQueryColumns } from './components/auth/table/utils/to-athena-table-columns.js'; export type { ToTableRowActionsOptions } from './components/auth/table/utils/to-table-row-actions.js'; export { toTableRowActions } from './components/auth/table/utils/to-table-row-actions.js'; export type { AthenaTableDef, FormValuesOf as AthenaFormValues, InsertOf as AthenaInsert, RowOf as AthenaRow, UpdateOf as AthenaUpdate } from '@xylex-group/athena/browser'; interface AnyAthenaModelMetadata { columns?: Partial>; database?: string; model?: string; nullable?: Partial>; primaryKey: string[]; relations?: Record; schema?: string; tableName?: string; } type AnyAthenaModel = ModelDef, Record, Record, AnyAthenaModelMetadata>; /** * Strongly typed row for an Athena table model (`RowOf`). * * Use with live `table(...).columns(...).primaryKey()` models and * {@link columnsFromAthenaModel} to keep showcase and production tables * aligned with the model contract. * * @example * const tasks = table('tasks').schema('public').columns({ ... }).primaryKey() * type TaskRow = AthenaModelRow */ export type AthenaModelRow = RowOf; /** * Derive basic {@link AthenaTableColumn} definitions from an Athena model. * * Reads column ids from `model.meta.columns` (table DSL) or the runtime * `model.columns` map. Override labels, mark row headers, then layer custom * `render` / chip columns on top — including in the Tables showcase. * * @example * const baseColumns = columnsFromAthenaModel(tasks, { * labels: { title: "Task" }, * rowHeaders: ["title"], * chips: { * status: { color: "status", variant: "soft" }, * active: { color: "boolean", variant: "soft" }, * }, * }) */ export declare function columnsFromAthenaModel(model: TModel, options?: { /** * Declarative chip configs layered on model columns (portable; * use with builder export/import `chip` field). */ chips?: Partial, AthenaTableChipConfig>>; /** Map of column id -> label override */ labels?: Partial, ReactNode>>; /** Columns to treat as row headers (title in mobile) */ rowHeaders?: Array>; }): AthenaTableColumn>[];