@universe-platform/ui 0.1.0-beta.1 → 0.1.0-beta.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.mts CHANGED
@@ -1,7 +1,39 @@
1
1
  import { ClassValue } from 'clsx';
2
+ import { ColumnDef } from './columns';
3
+ export { BaseColumnDef, COLUMN_CAPABILITIES, COLUMN_DEFAULT_INPUT_CONFIG, COLUMN_TYPES, COLUMN_TYPE_LABELS, ColumnCapabilities, ColumnConfig, ColumnConfigMap, ColumnDef, ColumnDefaultInputConfig, ColumnInfo, ColumnType, CurrencyConfig, ExtendedColumnInfo, GoogleContactConfig, GoogleContactNamePart, PhoneConfig, RelationConfig, SubTableConfig, TEXT_REPRESENTABLE_TYPES, TextRepresentableColumnType, TypedColumnDef, isTextRepresentable } from './columns';
4
+ import { RecordData, CellValue } from './records';
5
+ export { CellValue, ColumnValueMap, DriveFileValue, GoogleContactValue, LinkValue, RecordData, SubTableEntryValue, SubTableResolvedEntryValue } from './records';
6
+ export { BaseComponent, ComponentType, EditorApp, EditorPage, PageComponent, PageInput, TableComponent } from './pages';
7
+ import { SchemaDef } from './schema';
8
+ export { SchemaDef, TableMeta } from './schema';
9
+ import * as react_jsx_runtime from 'react/jsx-runtime';
10
+ import * as react from 'react';
11
+ import react__default, { ReactNode } from 'react';
2
12
 
3
13
  declare function cn(...inputs: ClassValue[]): string;
4
14
 
15
+ /**
16
+ * WhatsApp opener and phone formatting utilities.
17
+ */
18
+ /**
19
+ * Robust WhatsApp Opener (Desktop App with Web Fallback).
20
+ * Tries the direct protocol first (whatsapp://) and falls back to WhatsApp Web
21
+ * if the app is not installed (window didn't lose focus).
22
+ */
23
+ declare function openWhatsAppChat(phone: string, defaultCountryCode?: string): void;
24
+ /**
25
+ * Formats a phone number for local UI display (e.g. Israeli 05X-XXX-XXXX format).
26
+ */
27
+ declare function formatPhoneDisplay(phone: string): string;
28
+
29
+ interface PastelPalette {
30
+ bg: string;
31
+ text: string;
32
+ border: string;
33
+ }
34
+ declare const PASTEL_PALETTES: PastelPalette[];
35
+ declare function getDeterministicPastelBadge(key: string): PastelPalette;
36
+
5
37
  /**
6
38
  * Core definitions for Universe UI components.
7
39
  * These interfaces define the standard contract that all generic visual components
@@ -41,6 +73,216 @@ interface BaseComponentProps<TData = any, TConfig = Record<string, any>> extends
41
73
  "data-testid"?: string;
42
74
  }
43
75
 
44
- declare const isUiLibraryReady = true;
76
+ interface TableConfig extends SchemaDef {
77
+ }
78
+ type TableData = RecordData[];
79
+ interface TableBlockProps extends BaseComponentProps<TableData, TableConfig> {
80
+ exportAction?: (payload: any) => Promise<any>;
81
+ }
82
+ interface CreateRecordPayload {
83
+ records: RecordData[];
84
+ }
85
+ interface UpdateRecordPayload {
86
+ modifications: Record<string, Record<string, any>>;
87
+ }
88
+ interface DeleteRecordPayload {
89
+ ids: string[];
90
+ }
91
+
92
+ declare function TableBlock(props: TableBlockProps): react_jsx_runtime.JSX.Element;
93
+
94
+ interface UseColumnResizeOptions {
95
+ storageKey: string;
96
+ defaultWidth?: number;
97
+ minWidth?: number;
98
+ maxWidth?: number;
99
+ getMinColWidth?: (colName: string) => number;
100
+ }
101
+ declare function useColumnResize({ storageKey, defaultWidth, minWidth, maxWidth, getMinColWidth, }: UseColumnResizeOptions): {
102
+ columnWidths: Record<string, number>;
103
+ setColumnWidths: react.Dispatch<react.SetStateAction<Record<string, number>>>;
104
+ resizingCol: {
105
+ name: string;
106
+ startWidth: number;
107
+ startX: number;
108
+ minWidth: number;
109
+ } | null;
110
+ startResize: (colName: string, currentWidth: number, clientX: number, customMinWidth?: number) => void;
111
+ getWidth: (colName: string, fallback?: number) => number;
112
+ minWidth: number;
113
+ };
114
+
115
+ interface UseColumnReorderOptions {
116
+ onReorder: (draggedName: string, dropTargetName: string) => void | Promise<void>;
117
+ disabled?: boolean;
118
+ }
119
+ declare function useColumnReorder({ onReorder, disabled, }: UseColumnReorderOptions): {
120
+ draggedColName: string | null;
121
+ dragOverColName: string | null;
122
+ isDragging: (colName: string) => boolean;
123
+ isDragOver: (colName: string) => boolean;
124
+ getHeaderDragProps: (colName: string) => {
125
+ draggable: boolean;
126
+ onDragStart?: undefined;
127
+ onDragOver?: undefined;
128
+ onDragLeave?: undefined;
129
+ onDrop?: undefined;
130
+ onDragEnd?: undefined;
131
+ } | {
132
+ draggable: boolean;
133
+ onDragStart: (e: React.DragEvent) => void;
134
+ onDragOver: (e: React.DragEvent) => void;
135
+ onDragLeave: () => void;
136
+ onDrop: (e: React.DragEvent) => void;
137
+ onDragEnd: () => void;
138
+ };
139
+ };
140
+
141
+ /**
142
+ * Measure the width of a given text string in canvas 2D context using the specified font.
143
+ */
144
+ declare function measureTextWidth(text: string, font?: string): number;
145
+ interface SplitTitleResult {
146
+ isSingleWord: boolean;
147
+ line1: string;
148
+ line2?: string;
149
+ }
150
+ /**
151
+ * Splits a header title:
152
+ * - 1 word: stays on 1 line.
153
+ * - 2 or more words: divided as equally as possible between 2 lines without cutting any word.
154
+ */
155
+ declare function splitHeaderTitle(name: string): SplitTitleResult;
156
+ /**
157
+ * Calculate the minimum column width needed to display the header title cleanly:
158
+ * - If 1 word: minimum width is that word + padding + icon.
159
+ * - If 2+ words: minimum width is the longest line + padding + icon.
160
+ * - For specialized field types like GOOGLE_CONTACT: ensures room for button.
161
+ * Words are NEVER cut or truncated with ellipsis.
162
+ */
163
+ declare function calculateMinColumnWidth(name: string, isSubTable?: boolean, colType?: string): number;
164
+ interface ColumnHeaderTitleProps {
165
+ name: string;
166
+ width?: number;
167
+ isSubTable?: boolean;
168
+ }
169
+ /**
170
+ * Header title component:
171
+ * - Default / when enough width: takes up entire line on 1 single row.
172
+ * - When column is shrunk below full-line width: divides evenly into 2 rows without cutting any word.
173
+ * - Single words always stay on 1 row.
174
+ */
175
+ declare function ColumnHeaderTitle({ name, width, isSubTable }: ColumnHeaderTitleProps): react_jsx_runtime.JSX.Element;
176
+
177
+ declare function formatConflictCellValue(rawVal: any, colDef?: ColumnDef | {
178
+ name: string;
179
+ type?: string;
180
+ config?: any;
181
+ }, relationOptionsMap?: Record<string, any[]>): react__default.ReactNode;
182
+
183
+ interface DatePickerCellProps {
184
+ value: CellValue<'DATE'> | Date | number;
185
+ onChange: (value: CellValue<'DATE'>) => void;
186
+ column?: ColumnDef;
187
+ readOnly?: boolean;
188
+ }
189
+ declare function DatePickerCell({ value, onChange, readOnly }: DatePickerCellProps): react_jsx_runtime.JSX.Element;
190
+
191
+ interface TimePickerCellProps {
192
+ value: CellValue<'TIME'> | Date;
193
+ onChange: (value: CellValue<'TIME'>) => void;
194
+ column?: ColumnDef;
195
+ readOnly?: boolean;
196
+ }
197
+ declare function parseTimeParts(val: any): {
198
+ hour: number;
199
+ minute: number;
200
+ } | null;
201
+ declare function formatTimeIso(hour: number, minute: number): string;
202
+ declare function formatTimeInput(input: string | null | undefined): string;
203
+ declare function TimePickerCell({ value, onChange, readOnly }: TimePickerCellProps): react_jsx_runtime.JSX.Element;
204
+
205
+ interface LinkPickerCellProps {
206
+ value: CellValue<'LINK'> | string;
207
+ onChange: (value: CellValue<'LINK'>) => void;
208
+ column?: ColumnDef;
209
+ readOnly?: boolean;
210
+ }
211
+ declare function parseLinkValue(val: CellValue<'LINK'> | string): {
212
+ url: string;
213
+ label: string;
214
+ };
215
+ declare function resolveProtocol(url: string): string;
216
+ declare function LinkPickerCell({ value, onChange, readOnly }: LinkPickerCellProps): react_jsx_runtime.JSX.Element;
217
+
218
+ interface RelationPickerCellProps {
219
+ value: CellValue<'RELATION'> | string;
220
+ onChange: (value: CellValue<'RELATION'>) => void;
221
+ column: ColumnDef<'RELATION'> | ColumnDef;
222
+ context?: any;
223
+ rowId?: string;
224
+ readOnly?: boolean;
225
+ }
226
+ /**
227
+ * Normalizes any relation value into a canonical string[] of record IDs.
228
+ * Handles legacy single-string records, empty strings, null/undefined, and object shapes.
229
+ */
230
+ declare function normalizeRelationValue(val: any): string[];
231
+ declare function RelationPickerCell({ value, onChange, column, context, rowId, readOnly, }: RelationPickerCellProps): react_jsx_runtime.JSX.Element;
232
+
233
+ interface RelationFilterOption {
234
+ id: string;
235
+ label: string;
236
+ }
237
+ type RelationFilterPayload = string[] | {
238
+ operator: 'notIn';
239
+ values: string[];
240
+ } | undefined;
241
+ interface RelationFilterPopoverProps {
242
+ isOpen: boolean;
243
+ onClose: () => void;
244
+ column: ColumnDef;
245
+ triggerRect: DOMRect | null;
246
+ options: RelationFilterOption[];
247
+ filterValue?: string[] | {
248
+ operator: 'notIn';
249
+ values: string[];
250
+ };
251
+ selectedValues?: string[];
252
+ onSelectionChange: (payload: RelationFilterPayload) => void;
253
+ isLoading?: boolean;
254
+ }
255
+ declare function RelationFilterPopover({ isOpen, onClose, column, triggerRect, options, filterValue, selectedValues, onSelectionChange, isLoading, }: RelationFilterPopoverProps): react_jsx_runtime.JSX.Element | null;
256
+
257
+ /**
258
+ * UNIVERSE_COMPONENTS
259
+ * Dynamic Component Registry dictionary mapping component type strings (e.g., "TABLE")
260
+ * to their respective React component implementation.
261
+ */
262
+ declare const UNIVERSE_COMPONENTS: {
263
+ readonly TABLE: typeof TableBlock;
264
+ };
265
+ type ComponentRegistry = typeof UNIVERSE_COMPONENTS;
266
+ type UniverseComponentType = keyof ComponentRegistry;
267
+
268
+ interface ToastItem {
269
+ id: string;
270
+ message: string;
271
+ type?: "error" | "success" | "info" | "warning";
272
+ title?: string;
273
+ duration?: number;
274
+ }
275
+ interface ToastContextType {
276
+ toasts: ToastItem[];
277
+ addToast: (toast: Omit<ToastItem, "id">) => string;
278
+ showError: (error: string | Error | null | undefined, title?: string) => void;
279
+ removeToast: (id: string) => void;
280
+ }
281
+ declare const ToastContext: react__default.Context<ToastContextType | undefined>;
282
+ declare function ToastProvider({ children }: {
283
+ children: ReactNode;
284
+ }): react_jsx_runtime.JSX.Element;
285
+
286
+ declare function useToast(): ToastContextType;
45
287
 
46
- export { type BaseComponentProps, type ComponentCommunication, type ComponentConfig, type ComponentData, type ComponentPermissions, type ComponentState, cn, isUiLibraryReady };
288
+ export { type BaseComponentProps, ColumnHeaderTitle, type ColumnHeaderTitleProps, type ComponentCommunication, type ComponentConfig, type ComponentData, type ComponentPermissions, type ComponentRegistry, type ComponentState, type CreateRecordPayload, DatePickerCell, type DeleteRecordPayload, LinkPickerCell, PASTEL_PALETTES, type PastelPalette, type RelationFilterOption, type RelationFilterPayload, RelationFilterPopover, type RelationFilterPopoverProps, RelationPickerCell, type SplitTitleResult, TableBlock, type TableBlockProps, type TableConfig, type TableData, TimePickerCell, ToastContext, type ToastContextType, type ToastItem, ToastProvider, UNIVERSE_COMPONENTS, type UniverseComponentType, type UpdateRecordPayload, type UseColumnReorderOptions, type UseColumnResizeOptions, calculateMinColumnWidth, cn, formatConflictCellValue, formatPhoneDisplay, formatTimeInput, formatTimeIso, getDeterministicPastelBadge, measureTextWidth, normalizeRelationValue, openWhatsAppChat, parseLinkValue, parseTimeParts, resolveProtocol, splitHeaderTitle, useColumnReorder, useColumnResize, useToast };
package/dist/index.d.ts CHANGED
@@ -1,7 +1,39 @@
1
1
  import { ClassValue } from 'clsx';
2
+ import { ColumnDef } from './columns';
3
+ export { BaseColumnDef, COLUMN_CAPABILITIES, COLUMN_DEFAULT_INPUT_CONFIG, COLUMN_TYPES, COLUMN_TYPE_LABELS, ColumnCapabilities, ColumnConfig, ColumnConfigMap, ColumnDef, ColumnDefaultInputConfig, ColumnInfo, ColumnType, CurrencyConfig, ExtendedColumnInfo, GoogleContactConfig, GoogleContactNamePart, PhoneConfig, RelationConfig, SubTableConfig, TEXT_REPRESENTABLE_TYPES, TextRepresentableColumnType, TypedColumnDef, isTextRepresentable } from './columns';
4
+ import { RecordData, CellValue } from './records';
5
+ export { CellValue, ColumnValueMap, DriveFileValue, GoogleContactValue, LinkValue, RecordData, SubTableEntryValue, SubTableResolvedEntryValue } from './records';
6
+ export { BaseComponent, ComponentType, EditorApp, EditorPage, PageComponent, PageInput, TableComponent } from './pages';
7
+ import { SchemaDef } from './schema';
8
+ export { SchemaDef, TableMeta } from './schema';
9
+ import * as react_jsx_runtime from 'react/jsx-runtime';
10
+ import * as react from 'react';
11
+ import react__default, { ReactNode } from 'react';
2
12
 
3
13
  declare function cn(...inputs: ClassValue[]): string;
4
14
 
15
+ /**
16
+ * WhatsApp opener and phone formatting utilities.
17
+ */
18
+ /**
19
+ * Robust WhatsApp Opener (Desktop App with Web Fallback).
20
+ * Tries the direct protocol first (whatsapp://) and falls back to WhatsApp Web
21
+ * if the app is not installed (window didn't lose focus).
22
+ */
23
+ declare function openWhatsAppChat(phone: string, defaultCountryCode?: string): void;
24
+ /**
25
+ * Formats a phone number for local UI display (e.g. Israeli 05X-XXX-XXXX format).
26
+ */
27
+ declare function formatPhoneDisplay(phone: string): string;
28
+
29
+ interface PastelPalette {
30
+ bg: string;
31
+ text: string;
32
+ border: string;
33
+ }
34
+ declare const PASTEL_PALETTES: PastelPalette[];
35
+ declare function getDeterministicPastelBadge(key: string): PastelPalette;
36
+
5
37
  /**
6
38
  * Core definitions for Universe UI components.
7
39
  * These interfaces define the standard contract that all generic visual components
@@ -41,6 +73,216 @@ interface BaseComponentProps<TData = any, TConfig = Record<string, any>> extends
41
73
  "data-testid"?: string;
42
74
  }
43
75
 
44
- declare const isUiLibraryReady = true;
76
+ interface TableConfig extends SchemaDef {
77
+ }
78
+ type TableData = RecordData[];
79
+ interface TableBlockProps extends BaseComponentProps<TableData, TableConfig> {
80
+ exportAction?: (payload: any) => Promise<any>;
81
+ }
82
+ interface CreateRecordPayload {
83
+ records: RecordData[];
84
+ }
85
+ interface UpdateRecordPayload {
86
+ modifications: Record<string, Record<string, any>>;
87
+ }
88
+ interface DeleteRecordPayload {
89
+ ids: string[];
90
+ }
91
+
92
+ declare function TableBlock(props: TableBlockProps): react_jsx_runtime.JSX.Element;
93
+
94
+ interface UseColumnResizeOptions {
95
+ storageKey: string;
96
+ defaultWidth?: number;
97
+ minWidth?: number;
98
+ maxWidth?: number;
99
+ getMinColWidth?: (colName: string) => number;
100
+ }
101
+ declare function useColumnResize({ storageKey, defaultWidth, minWidth, maxWidth, getMinColWidth, }: UseColumnResizeOptions): {
102
+ columnWidths: Record<string, number>;
103
+ setColumnWidths: react.Dispatch<react.SetStateAction<Record<string, number>>>;
104
+ resizingCol: {
105
+ name: string;
106
+ startWidth: number;
107
+ startX: number;
108
+ minWidth: number;
109
+ } | null;
110
+ startResize: (colName: string, currentWidth: number, clientX: number, customMinWidth?: number) => void;
111
+ getWidth: (colName: string, fallback?: number) => number;
112
+ minWidth: number;
113
+ };
114
+
115
+ interface UseColumnReorderOptions {
116
+ onReorder: (draggedName: string, dropTargetName: string) => void | Promise<void>;
117
+ disabled?: boolean;
118
+ }
119
+ declare function useColumnReorder({ onReorder, disabled, }: UseColumnReorderOptions): {
120
+ draggedColName: string | null;
121
+ dragOverColName: string | null;
122
+ isDragging: (colName: string) => boolean;
123
+ isDragOver: (colName: string) => boolean;
124
+ getHeaderDragProps: (colName: string) => {
125
+ draggable: boolean;
126
+ onDragStart?: undefined;
127
+ onDragOver?: undefined;
128
+ onDragLeave?: undefined;
129
+ onDrop?: undefined;
130
+ onDragEnd?: undefined;
131
+ } | {
132
+ draggable: boolean;
133
+ onDragStart: (e: React.DragEvent) => void;
134
+ onDragOver: (e: React.DragEvent) => void;
135
+ onDragLeave: () => void;
136
+ onDrop: (e: React.DragEvent) => void;
137
+ onDragEnd: () => void;
138
+ };
139
+ };
140
+
141
+ /**
142
+ * Measure the width of a given text string in canvas 2D context using the specified font.
143
+ */
144
+ declare function measureTextWidth(text: string, font?: string): number;
145
+ interface SplitTitleResult {
146
+ isSingleWord: boolean;
147
+ line1: string;
148
+ line2?: string;
149
+ }
150
+ /**
151
+ * Splits a header title:
152
+ * - 1 word: stays on 1 line.
153
+ * - 2 or more words: divided as equally as possible between 2 lines without cutting any word.
154
+ */
155
+ declare function splitHeaderTitle(name: string): SplitTitleResult;
156
+ /**
157
+ * Calculate the minimum column width needed to display the header title cleanly:
158
+ * - If 1 word: minimum width is that word + padding + icon.
159
+ * - If 2+ words: minimum width is the longest line + padding + icon.
160
+ * - For specialized field types like GOOGLE_CONTACT: ensures room for button.
161
+ * Words are NEVER cut or truncated with ellipsis.
162
+ */
163
+ declare function calculateMinColumnWidth(name: string, isSubTable?: boolean, colType?: string): number;
164
+ interface ColumnHeaderTitleProps {
165
+ name: string;
166
+ width?: number;
167
+ isSubTable?: boolean;
168
+ }
169
+ /**
170
+ * Header title component:
171
+ * - Default / when enough width: takes up entire line on 1 single row.
172
+ * - When column is shrunk below full-line width: divides evenly into 2 rows without cutting any word.
173
+ * - Single words always stay on 1 row.
174
+ */
175
+ declare function ColumnHeaderTitle({ name, width, isSubTable }: ColumnHeaderTitleProps): react_jsx_runtime.JSX.Element;
176
+
177
+ declare function formatConflictCellValue(rawVal: any, colDef?: ColumnDef | {
178
+ name: string;
179
+ type?: string;
180
+ config?: any;
181
+ }, relationOptionsMap?: Record<string, any[]>): react__default.ReactNode;
182
+
183
+ interface DatePickerCellProps {
184
+ value: CellValue<'DATE'> | Date | number;
185
+ onChange: (value: CellValue<'DATE'>) => void;
186
+ column?: ColumnDef;
187
+ readOnly?: boolean;
188
+ }
189
+ declare function DatePickerCell({ value, onChange, readOnly }: DatePickerCellProps): react_jsx_runtime.JSX.Element;
190
+
191
+ interface TimePickerCellProps {
192
+ value: CellValue<'TIME'> | Date;
193
+ onChange: (value: CellValue<'TIME'>) => void;
194
+ column?: ColumnDef;
195
+ readOnly?: boolean;
196
+ }
197
+ declare function parseTimeParts(val: any): {
198
+ hour: number;
199
+ minute: number;
200
+ } | null;
201
+ declare function formatTimeIso(hour: number, minute: number): string;
202
+ declare function formatTimeInput(input: string | null | undefined): string;
203
+ declare function TimePickerCell({ value, onChange, readOnly }: TimePickerCellProps): react_jsx_runtime.JSX.Element;
204
+
205
+ interface LinkPickerCellProps {
206
+ value: CellValue<'LINK'> | string;
207
+ onChange: (value: CellValue<'LINK'>) => void;
208
+ column?: ColumnDef;
209
+ readOnly?: boolean;
210
+ }
211
+ declare function parseLinkValue(val: CellValue<'LINK'> | string): {
212
+ url: string;
213
+ label: string;
214
+ };
215
+ declare function resolveProtocol(url: string): string;
216
+ declare function LinkPickerCell({ value, onChange, readOnly }: LinkPickerCellProps): react_jsx_runtime.JSX.Element;
217
+
218
+ interface RelationPickerCellProps {
219
+ value: CellValue<'RELATION'> | string;
220
+ onChange: (value: CellValue<'RELATION'>) => void;
221
+ column: ColumnDef<'RELATION'> | ColumnDef;
222
+ context?: any;
223
+ rowId?: string;
224
+ readOnly?: boolean;
225
+ }
226
+ /**
227
+ * Normalizes any relation value into a canonical string[] of record IDs.
228
+ * Handles legacy single-string records, empty strings, null/undefined, and object shapes.
229
+ */
230
+ declare function normalizeRelationValue(val: any): string[];
231
+ declare function RelationPickerCell({ value, onChange, column, context, rowId, readOnly, }: RelationPickerCellProps): react_jsx_runtime.JSX.Element;
232
+
233
+ interface RelationFilterOption {
234
+ id: string;
235
+ label: string;
236
+ }
237
+ type RelationFilterPayload = string[] | {
238
+ operator: 'notIn';
239
+ values: string[];
240
+ } | undefined;
241
+ interface RelationFilterPopoverProps {
242
+ isOpen: boolean;
243
+ onClose: () => void;
244
+ column: ColumnDef;
245
+ triggerRect: DOMRect | null;
246
+ options: RelationFilterOption[];
247
+ filterValue?: string[] | {
248
+ operator: 'notIn';
249
+ values: string[];
250
+ };
251
+ selectedValues?: string[];
252
+ onSelectionChange: (payload: RelationFilterPayload) => void;
253
+ isLoading?: boolean;
254
+ }
255
+ declare function RelationFilterPopover({ isOpen, onClose, column, triggerRect, options, filterValue, selectedValues, onSelectionChange, isLoading, }: RelationFilterPopoverProps): react_jsx_runtime.JSX.Element | null;
256
+
257
+ /**
258
+ * UNIVERSE_COMPONENTS
259
+ * Dynamic Component Registry dictionary mapping component type strings (e.g., "TABLE")
260
+ * to their respective React component implementation.
261
+ */
262
+ declare const UNIVERSE_COMPONENTS: {
263
+ readonly TABLE: typeof TableBlock;
264
+ };
265
+ type ComponentRegistry = typeof UNIVERSE_COMPONENTS;
266
+ type UniverseComponentType = keyof ComponentRegistry;
267
+
268
+ interface ToastItem {
269
+ id: string;
270
+ message: string;
271
+ type?: "error" | "success" | "info" | "warning";
272
+ title?: string;
273
+ duration?: number;
274
+ }
275
+ interface ToastContextType {
276
+ toasts: ToastItem[];
277
+ addToast: (toast: Omit<ToastItem, "id">) => string;
278
+ showError: (error: string | Error | null | undefined, title?: string) => void;
279
+ removeToast: (id: string) => void;
280
+ }
281
+ declare const ToastContext: react__default.Context<ToastContextType | undefined>;
282
+ declare function ToastProvider({ children }: {
283
+ children: ReactNode;
284
+ }): react_jsx_runtime.JSX.Element;
285
+
286
+ declare function useToast(): ToastContextType;
45
287
 
46
- export { type BaseComponentProps, type ComponentCommunication, type ComponentConfig, type ComponentData, type ComponentPermissions, type ComponentState, cn, isUiLibraryReady };
288
+ export { type BaseComponentProps, ColumnHeaderTitle, type ColumnHeaderTitleProps, type ComponentCommunication, type ComponentConfig, type ComponentData, type ComponentPermissions, type ComponentRegistry, type ComponentState, type CreateRecordPayload, DatePickerCell, type DeleteRecordPayload, LinkPickerCell, PASTEL_PALETTES, type PastelPalette, type RelationFilterOption, type RelationFilterPayload, RelationFilterPopover, type RelationFilterPopoverProps, RelationPickerCell, type SplitTitleResult, TableBlock, type TableBlockProps, type TableConfig, type TableData, TimePickerCell, ToastContext, type ToastContextType, type ToastItem, ToastProvider, UNIVERSE_COMPONENTS, type UniverseComponentType, type UpdateRecordPayload, type UseColumnReorderOptions, type UseColumnResizeOptions, calculateMinColumnWidth, cn, formatConflictCellValue, formatPhoneDisplay, formatTimeInput, formatTimeIso, getDeterministicPastelBadge, measureTextWidth, normalizeRelationValue, openWhatsAppChat, parseLinkValue, parseTimeParts, resolveProtocol, splitHeaderTitle, useColumnReorder, useColumnResize, useToast };