@lumerahq/ui 0.5.0

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.
Files changed (122) hide show
  1. package/README.md +69 -0
  2. package/dist/api-BNY_eNKa.js +262 -0
  3. package/dist/automations-DU4weMpK.js +369 -0
  4. package/dist/components/ApiDemo.d.ts +2 -0
  5. package/dist/components/ApiDemo.d.ts.map +1 -0
  6. package/dist/components/automation/AutomationRunList.d.ts +38 -0
  7. package/dist/components/automation/AutomationRunList.d.ts.map +1 -0
  8. package/dist/components/automation/AutomationRunner.d.ts +43 -0
  9. package/dist/components/automation/AutomationRunner.d.ts.map +1 -0
  10. package/dist/components/component-example.d.ts +2 -0
  11. package/dist/components/component-example.d.ts.map +1 -0
  12. package/dist/components/data-table/DataTable.d.ts +49 -0
  13. package/dist/components/data-table/DataTable.d.ts.map +1 -0
  14. package/dist/components/data-table/DataTableFilters.d.ts +17 -0
  15. package/dist/components/data-table/DataTableFilters.d.ts.map +1 -0
  16. package/dist/components/data-table/DataTablePagination.d.ts +12 -0
  17. package/dist/components/data-table/DataTablePagination.d.ts.map +1 -0
  18. package/dist/components/data-table/RecordSheet.d.ts +24 -0
  19. package/dist/components/data-table/RecordSheet.d.ts.map +1 -0
  20. package/dist/components/data-table/index.d.ts +5 -0
  21. package/dist/components/data-table/index.d.ts.map +1 -0
  22. package/dist/components/example.d.ts +7 -0
  23. package/dist/components/example.d.ts.map +1 -0
  24. package/dist/components/index.d.ts +23 -0
  25. package/dist/components/index.d.ts.map +1 -0
  26. package/dist/components/index.js +61 -0
  27. package/dist/components/ui/alert-dialog.d.ts +19 -0
  28. package/dist/components/ui/alert-dialog.d.ts.map +1 -0
  29. package/dist/components/ui/avatar.d.ts +12 -0
  30. package/dist/components/ui/avatar.d.ts.map +1 -0
  31. package/dist/components/ui/badge.d.ts +8 -0
  32. package/dist/components/ui/badge.d.ts.map +1 -0
  33. package/dist/components/ui/button.d.ts +9 -0
  34. package/dist/components/ui/button.d.ts.map +1 -0
  35. package/dist/components/ui/card.d.ts +12 -0
  36. package/dist/components/ui/card.d.ts.map +1 -0
  37. package/dist/components/ui/checkbox.d.ts +4 -0
  38. package/dist/components/ui/checkbox.d.ts.map +1 -0
  39. package/dist/components/ui/combobox.d.ts +25 -0
  40. package/dist/components/ui/combobox.d.ts.map +1 -0
  41. package/dist/components/ui/dialog.d.ts +18 -0
  42. package/dist/components/ui/dialog.d.ts.map +1 -0
  43. package/dist/components/ui/dropdown-menu.d.ts +26 -0
  44. package/dist/components/ui/dropdown-menu.d.ts.map +1 -0
  45. package/dist/components/ui/field.d.ts +25 -0
  46. package/dist/components/ui/field.d.ts.map +1 -0
  47. package/dist/components/ui/file-dropzone.d.ts +23 -0
  48. package/dist/components/ui/file-dropzone.d.ts.map +1 -0
  49. package/dist/components/ui/input-group.d.ts +19 -0
  50. package/dist/components/ui/input-group.d.ts.map +1 -0
  51. package/dist/components/ui/input.d.ts +4 -0
  52. package/dist/components/ui/input.d.ts.map +1 -0
  53. package/dist/components/ui/label.d.ts +4 -0
  54. package/dist/components/ui/label.d.ts.map +1 -0
  55. package/dist/components/ui/popover.d.ts +10 -0
  56. package/dist/components/ui/popover.d.ts.map +1 -0
  57. package/dist/components/ui/progress.d.ts +8 -0
  58. package/dist/components/ui/progress.d.ts.map +1 -0
  59. package/dist/components/ui/scroll-area.d.ts +5 -0
  60. package/dist/components/ui/scroll-area.d.ts.map +1 -0
  61. package/dist/components/ui/select.d.ts +16 -0
  62. package/dist/components/ui/select.d.ts.map +1 -0
  63. package/dist/components/ui/separator.d.ts +4 -0
  64. package/dist/components/ui/separator.d.ts.map +1 -0
  65. package/dist/components/ui/sheet.d.ts +15 -0
  66. package/dist/components/ui/sheet.d.ts.map +1 -0
  67. package/dist/components/ui/sidebar.d.ts +64 -0
  68. package/dist/components/ui/sidebar.d.ts.map +1 -0
  69. package/dist/components/ui/skeleton.d.ts +3 -0
  70. package/dist/components/ui/skeleton.d.ts.map +1 -0
  71. package/dist/components/ui/status-badge.d.ts +21 -0
  72. package/dist/components/ui/status-badge.d.ts.map +1 -0
  73. package/dist/components/ui/table.d.ts +11 -0
  74. package/dist/components/ui/table.d.ts.map +1 -0
  75. package/dist/components/ui/tabs.d.ts +11 -0
  76. package/dist/components/ui/tabs.d.ts.map +1 -0
  77. package/dist/components/ui/textarea.d.ts +4 -0
  78. package/dist/components/ui/textarea.d.ts.map +1 -0
  79. package/dist/components/ui/tooltip.d.ts +7 -0
  80. package/dist/components/ui/tooltip.d.ts.map +1 -0
  81. package/dist/formatters-Baj7FkeG.js +3217 -0
  82. package/dist/hooks/index.d.ts +6 -0
  83. package/dist/hooks/index.d.ts.map +1 -0
  84. package/dist/hooks/index.js +11 -0
  85. package/dist/hooks/use-automation-agent.d.ts +60 -0
  86. package/dist/hooks/use-automation-agent.d.ts.map +1 -0
  87. package/dist/hooks/use-automation-run.d.ts +65 -0
  88. package/dist/hooks/use-automation-run.d.ts.map +1 -0
  89. package/dist/hooks/use-file-upload.d.ts +57 -0
  90. package/dist/hooks/use-file-upload.d.ts.map +1 -0
  91. package/dist/hooks/use-lumera-api.d.ts +14 -0
  92. package/dist/hooks/use-lumera-api.d.ts.map +1 -0
  93. package/dist/hooks/use-mobile.d.ts +2 -0
  94. package/dist/hooks/use-mobile.d.ts.map +1 -0
  95. package/dist/hooks/use-sql-table.d.ts +52 -0
  96. package/dist/hooks/use-sql-table.d.ts.map +1 -0
  97. package/dist/index.d.ts +4 -0
  98. package/dist/index.d.ts.map +1 -0
  99. package/dist/index.js +134 -0
  100. package/dist/lib/api.d.ts +307 -0
  101. package/dist/lib/api.d.ts.map +1 -0
  102. package/dist/lib/automations.d.ts +274 -0
  103. package/dist/lib/automations.d.ts.map +1 -0
  104. package/dist/lib/bridge.d.ts +137 -0
  105. package/dist/lib/bridge.d.ts.map +1 -0
  106. package/dist/lib/formatters.d.ts +92 -0
  107. package/dist/lib/formatters.d.ts.map +1 -0
  108. package/dist/lib/index.d.ts +12 -0
  109. package/dist/lib/index.d.ts.map +1 -0
  110. package/dist/lib/index.js +66 -0
  111. package/dist/lib/query-client.d.ts +3 -0
  112. package/dist/lib/query-client.d.ts.map +1 -0
  113. package/dist/lib/utils.d.ts +3 -0
  114. package/dist/lib/utils.d.ts.map +1 -0
  115. package/dist/logo.png +0 -0
  116. package/dist/lumera-logo.png +0 -0
  117. package/dist/query-client-DdOWay4_.js +17 -0
  118. package/dist/tooltip-BMqvkb5u.js +17305 -0
  119. package/dist/ui.css +4911 -0
  120. package/dist/use-automation-run-CbhXCKvM.js +134 -0
  121. package/dist/use-sql-table-DuIu8eMY.js +343 -0
  122. package/package.json +79 -0
@@ -0,0 +1,6 @@
1
+ export { useAutomationAgent } from './use-automation-agent';
2
+ export { useAutomationRun } from './use-automation-run';
3
+ export { type UploadStatus, type UseFileUploadOptions, type UseFileUploadReturn, useFileUpload, } from './use-file-upload';
4
+ export { useLumeraUser, usePbSql, usePbUpdate } from './use-lumera-api';
5
+ export { type SortDirection, type TableFilter, type TableSort, type UseSqlTableOptions, type UseSqlTableResult, useSqlTable, } from './use-sql-table';
6
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/hooks/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAC5D,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AACxD,OAAO,EACL,KAAK,YAAY,EACjB,KAAK,oBAAoB,EACzB,KAAK,mBAAmB,EACxB,aAAa,GACd,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AACxE,OAAO,EACL,KAAK,aAAa,EAClB,KAAK,WAAW,EAChB,KAAK,SAAS,EACd,KAAK,kBAAkB,EACvB,KAAK,iBAAiB,EACtB,WAAW,GACZ,MAAM,iBAAiB,CAAC"}
@@ -0,0 +1,11 @@
1
+ import { u, a, b, c, d, e } from "../use-sql-table-DuIu8eMY.js";
2
+ import { u as u2 } from "../use-automation-run-CbhXCKvM.js";
3
+ export {
4
+ u as useAutomationAgent,
5
+ u2 as useAutomationRun,
6
+ a as useFileUpload,
7
+ b as useLumeraUser,
8
+ c as usePbSql,
9
+ d as usePbUpdate,
10
+ e as useSqlTable
11
+ };
@@ -0,0 +1,60 @@
1
+ import { AutomationRun } from '../lib/automations';
2
+ type UseAutomationAgentOptions = {
3
+ /** The ID of the agent to manage. If undefined, queries are disabled. */
4
+ agentId: string;
5
+ /** Number of runs to fetch per page. Defaults to 5. */
6
+ limit?: number;
7
+ /** Polling interval in ms when a run is active. Defaults to 3000ms. */
8
+ pollInterval?: number;
9
+ /** Whether to enable fetching. Defaults to true. */
10
+ enabled?: boolean;
11
+ };
12
+ /**
13
+ * Hook for managing an automation agent's state and run history.
14
+ *
15
+ * This hook is designed for "Dashboard" or "List" views where you need to:
16
+ * 1. Display a paginated list of past runs.
17
+ * 2. Automatically poll the list when any run is in an active state.
18
+ * 3. Start a new run and have the list update immediately.
19
+ *
20
+ * @example
21
+ * ```tsx
22
+ * const { runs, startRun, isStarting } = useAutomationAgent({
23
+ * agentId: 'agent-123'
24
+ * });
25
+ *
26
+ * // Start a run
27
+ * <button onClick={() => startRun({ some: 'input' })}>Run</button>
28
+ *
29
+ * // Render history
30
+ * <AutomationRunList runs={runs} />
31
+ * ```
32
+ */
33
+ export declare function useAutomationAgent({ agentId, limit, pollInterval, enabled, }: UseAutomationAgentOptions): {
34
+ /** The list of automation runs for the current page. */
35
+ runs: AutomationRun[];
36
+ /** Whether the initial runs are loading. */
37
+ isLoading: boolean;
38
+ /** Error from fetching runs. */
39
+ fetchError: Error | null;
40
+ /** Whether a startRun request is in progress. */
41
+ isStarting: boolean;
42
+ /** Error from the last startRun attempt. */
43
+ startError: string | null;
44
+ /** Current page index (0-based). */
45
+ page: number;
46
+ /** Set the current page index. */
47
+ setPage: import('react').Dispatch<import('react').SetStateAction<number>>;
48
+ /** Function to start a new run. */
49
+ startRun: (inputs: Record<string, unknown>, options?: {
50
+ metadata?: Record<string, unknown>;
51
+ onSuccess?: (run: AutomationRun) => void;
52
+ onError?: (error: unknown) => void;
53
+ }) => Promise<AutomationRun>;
54
+ /** Manually refresh the list. */
55
+ refresh: () => Promise<void>;
56
+ /** Whether there are more items (heuristic based on limit). */
57
+ hasMore: boolean;
58
+ };
59
+ export {};
60
+ //# sourceMappingURL=use-automation-agent.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-automation-agent.d.ts","sourceRoot":"","sources":["../../src/hooks/use-automation-agent.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,aAAa,EAA4D,MAAM,mBAAmB,CAAC;AAEjH,KAAK,yBAAyB,GAAG;IAC/B,yEAAyE;IACzE,OAAO,EAAE,MAAM,CAAC;IAChB,uDAAuD;IACvD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,uEAAuE;IACvE,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,oDAAoD;IACpD,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,kBAAkB,CAAC,EACjC,OAAO,EACP,KAAS,EACT,YAAmB,EACnB,OAAc,GACf,EAAE,yBAAyB;IA8ExB,wDAAwD;;IAExD,4CAA4C;;IAE5C,gCAAgC;;IAEhC,iDAAiD;;IAEjD,4CAA4C;;IAE5C,oCAAoC;;IAEpC,kCAAkC;;IAElC,mCAAmC;uBAxDzB,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,YACrB;QACR,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;QACnC,SAAS,CAAC,EAAE,CAAC,GAAG,EAAE,aAAa,KAAK,IAAI,CAAC;QACzC,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;KACpC;IAqDH,iCAAiC;;IAEjC,+DAA+D;;EAGlE"}
@@ -0,0 +1,65 @@
1
+ import { AutomationRun } from '../lib/automations';
2
+ type UseAutomationRunOptions = {
3
+ /** ID of the agent to run. */
4
+ agentId: string;
5
+ /** JSON-serializable inputs for the agent. */
6
+ inputs: Record<string, unknown>;
7
+ /** Optional external ID for idempotency/deduplication. */
8
+ externalId?: string;
9
+ /** Whether to start running immediately on mount. Defaults to true. */
10
+ autoStart?: boolean;
11
+ /** Polling interval in ms while active. Defaults to 2000. */
12
+ pollIntervalMs?: number;
13
+ /** Max time to poll before timing out. Defaults to 5 minutes. (Not enforced by react-query directly, but we can stop polling). */
14
+ pollTimeoutMs?: number;
15
+ /** If true, checks for an existing run with `externalId` before creating a new one. */
16
+ dedupeWithExternalId?: boolean;
17
+ /** Callback fired when the run reaches a terminal state (succeeded/failed/cancelled). */
18
+ onComplete?: (run: AutomationRun) => void;
19
+ /** Callback fired immediately when the run is created (before polling). */
20
+ onCreated?: (run: AutomationRun) => void;
21
+ /** Callback fired whenever the run updates (including terminal states). */
22
+ onUpdate?: (run: AutomationRun) => void;
23
+ };
24
+ type UseAutomationRunState = {
25
+ /** The current state of the run. */
26
+ run: AutomationRun | null;
27
+ /**
28
+ * The current status of the run.
29
+ * - 'idle': Not started.
30
+ * - 'running'/'queued'/'preparing': Active.
31
+ * - 'succeeded'/'failed'/'cancelled': Terminal.
32
+ */
33
+ status: AutomationRun['status'] | 'idle';
34
+ /** Whether an operation (start, refresh, cancel) is in progress. */
35
+ isLoading: boolean;
36
+ /** Error message from the last operation. */
37
+ error: string | null;
38
+ /** Starts the automation. Returns the initial run state (not the final result). */
39
+ start: () => Promise<AutomationRun | null>;
40
+ /** Refreshes the current run status. */
41
+ refresh: () => Promise<AutomationRun | null>;
42
+ /** Cancels the current run. */
43
+ cancel: () => Promise<AutomationRun | null>;
44
+ };
45
+ /**
46
+ * Hook for managing a single automation run.
47
+ *
48
+ * Use this when you want to execute a specific task and track its lifecycle
49
+ * from start to finish. It handles creating the run, polling for updates,
50
+ * and cleaning up when the component unmounts.
51
+ *
52
+ * @example
53
+ * ```tsx
54
+ * const { status, start, run } = useAutomationRun({
55
+ * agentId: 'agent-123',
56
+ * inputs: { prompt: 'do something' },
57
+ * autoStart: false,
58
+ * });
59
+ *
60
+ * return <button onClick={start}>Start ({status})</button>
61
+ * ```
62
+ */
63
+ export declare function useAutomationRun(options: UseAutomationRunOptions): UseAutomationRunState;
64
+ export {};
65
+ //# sourceMappingURL=use-automation-run.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-automation-run.d.ts","sourceRoot":"","sources":["../../src/hooks/use-automation-run.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,KAAK,aAAa,EAMnB,MAAM,oBAAoB,CAAC;AAE5B,KAAK,uBAAuB,GAAG;IAC7B,8BAA8B;IAC9B,OAAO,EAAE,MAAM,CAAC;IAChB,8CAA8C;IAC9C,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAChC,0DAA0D;IAC1D,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,uEAAuE;IACvE,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,6DAA6D;IAC7D,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,kIAAkI;IAClI,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,uFAAuF;IACvF,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,yFAAyF;IACzF,UAAU,CAAC,EAAE,CAAC,GAAG,EAAE,aAAa,KAAK,IAAI,CAAC;IAC1C,2EAA2E;IAC3E,SAAS,CAAC,EAAE,CAAC,GAAG,EAAE,aAAa,KAAK,IAAI,CAAC;IACzC,2EAA2E;IAC3E,QAAQ,CAAC,EAAE,CAAC,GAAG,EAAE,aAAa,KAAK,IAAI,CAAC;CACzC,CAAC;AAEF,KAAK,qBAAqB,GAAG;IAC3B,oCAAoC;IACpC,GAAG,EAAE,aAAa,GAAG,IAAI,CAAC;IAC1B;;;;;OAKG;IACH,MAAM,EAAE,aAAa,CAAC,QAAQ,CAAC,GAAG,MAAM,CAAC;IACzC,oEAAoE;IACpE,SAAS,EAAE,OAAO,CAAC;IACnB,6CAA6C;IAC7C,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,mFAAmF;IACnF,KAAK,EAAE,MAAM,OAAO,CAAC,aAAa,GAAG,IAAI,CAAC,CAAC;IAC3C,wCAAwC;IACxC,OAAO,EAAE,MAAM,OAAO,CAAC,aAAa,GAAG,IAAI,CAAC,CAAC;IAC7C,+BAA+B;IAC/B,MAAM,EAAE,MAAM,OAAO,CAAC,aAAa,GAAG,IAAI,CAAC,CAAC;CAC7C,CAAC;AAEF;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,uBAAuB,GAAG,qBAAqB,CA2JxF"}
@@ -0,0 +1,57 @@
1
+ import { FileDescriptor } from '../lib/api';
2
+ export type UploadStatus = 'idle' | 'uploading' | 'success' | 'error';
3
+ export type UseFileUploadOptions = {
4
+ /** Collection ID for the file field */
5
+ collectionId: string;
6
+ /** Field name in the collection schema */
7
+ fieldName: string;
8
+ /** Called on successful upload */
9
+ onSuccess?: (result: {
10
+ objectKey: string;
11
+ descriptor: FileDescriptor;
12
+ }) => void;
13
+ /** Called on error */
14
+ onError?: (error: Error) => void;
15
+ };
16
+ export type UseFileUploadReturn = {
17
+ /** Current upload status */
18
+ status: UploadStatus;
19
+ /** Error message if status is 'error' */
20
+ error: string | null;
21
+ /** Upload result with object key and file descriptor */
22
+ result: {
23
+ objectKey: string;
24
+ descriptor: FileDescriptor;
25
+ } | null;
26
+ /** Upload a file */
27
+ upload: (file: File) => Promise<void>;
28
+ /** Reset state to idle */
29
+ reset: () => void;
30
+ /** Whether an upload is in progress */
31
+ isUploading: boolean;
32
+ };
33
+ /**
34
+ * Hook for uploading files to Lumera storage.
35
+ *
36
+ * Wraps the uploadFile API with simple state management for status, errors, and results.
37
+ * Use with FileDropzone for a complete upload UI.
38
+ *
39
+ * @example
40
+ * ```tsx
41
+ * const { upload, status, result } = useFileUpload({
42
+ * collectionId: 'documents',
43
+ * fieldName: 'file',
44
+ * onSuccess: (result) => console.log('Uploaded:', result.descriptor),
45
+ * });
46
+ *
47
+ * return (
48
+ * <FileDropzone
49
+ * accept=".csv"
50
+ * disabled={status === 'uploading'}
51
+ * onFilesSelected={(files) => upload(files[0])}
52
+ * />
53
+ * );
54
+ * ```
55
+ */
56
+ export declare function useFileUpload(options: UseFileUploadOptions): UseFileUploadReturn;
57
+ //# sourceMappingURL=use-file-upload.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-file-upload.d.ts","sourceRoot":"","sources":["../../src/hooks/use-file-upload.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,cAAc,EAAc,MAAM,YAAY,CAAC;AAE7D,MAAM,MAAM,YAAY,GAAG,MAAM,GAAG,WAAW,GAAG,SAAS,GAAG,OAAO,CAAC;AAEtE,MAAM,MAAM,oBAAoB,GAAG;IACjC,uCAAuC;IACvC,YAAY,EAAE,MAAM,CAAC;IACrB,0CAA0C;IAC1C,SAAS,EAAE,MAAM,CAAC;IAClB,kCAAkC;IAClC,SAAS,CAAC,EAAE,CAAC,MAAM,EAAE;QAAE,SAAS,EAAE,MAAM,CAAC;QAAC,UAAU,EAAE,cAAc,CAAA;KAAE,KAAK,IAAI,CAAC;IAChF,sBAAsB;IACtB,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;CAClC,CAAC;AAEF,MAAM,MAAM,mBAAmB,GAAG;IAChC,4BAA4B;IAC5B,MAAM,EAAE,YAAY,CAAC;IACrB,yCAAyC;IACzC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,wDAAwD;IACxD,MAAM,EAAE;QAAE,SAAS,EAAE,MAAM,CAAC;QAAC,UAAU,EAAE,cAAc,CAAA;KAAE,GAAG,IAAI,CAAC;IACjE,oBAAoB;IACpB,MAAM,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IACtC,0BAA0B;IAC1B,KAAK,EAAE,MAAM,IAAI,CAAC;IAClB,uCAAuC;IACvC,WAAW,EAAE,OAAO,CAAC;CACtB,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAgB,aAAa,CAAC,OAAO,EAAE,oBAAoB,GAAG,mBAAmB,CA0ChF"}
@@ -0,0 +1,14 @@
1
+ import { UseMutationOptions, UseQueryOptions } from '@tanstack/react-query';
2
+ import { PbSqlRequest, PbSqlResponse } from '../lib/api';
3
+ import { HostPayload } from '../lib/bridge';
4
+ type UsePbSqlOptions<TData> = Omit<UseQueryOptions<PbSqlResponse<TData>, Error, PbSqlResponse<TData>, [string, PbSqlRequest]>, 'queryKey' | 'queryFn'>;
5
+ export declare function usePbSql<TData = unknown>(request: PbSqlRequest, options?: UsePbSqlOptions<TData>): import('@tanstack/react-query').UseQueryResult<PbSqlResponse<TData>, Error>;
6
+ type UpdateRecordVariables = {
7
+ collectionId: string;
8
+ recordId: string;
9
+ data: Record<string, unknown>;
10
+ };
11
+ export declare function usePbUpdate<TData extends Record<string, unknown> = Record<string, unknown>>(options?: UseMutationOptions<TData, Error, UpdateRecordVariables>): import('@tanstack/react-query').UseMutationResult<TData, Error, UpdateRecordVariables, unknown>;
12
+ export declare function useLumeraUser(): HostPayload | null;
13
+ export {};
14
+ //# sourceMappingURL=use-lumera-api.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-lumera-api.d.ts","sourceRoot":"","sources":["../../src/hooks/use-lumera-api.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,kBAAkB,EACvB,KAAK,eAAe,EAIrB,MAAM,uBAAuB,CAAC;AAE/B,OAAO,EAAE,KAAK,YAAY,EAAE,KAAK,aAAa,EAAyB,MAAM,YAAY,CAAC;AAC1F,OAAO,EAAE,KAAK,WAAW,EAAiB,MAAM,eAAe,CAAC;AAIhE,KAAK,eAAe,CAAC,KAAK,IAAI,IAAI,CAChC,eAAe,CAAC,aAAa,CAAC,KAAK,CAAC,EAAE,KAAK,EAAE,aAAa,CAAC,KAAK,CAAC,EAAE,CAAC,MAAM,EAAE,YAAY,CAAC,CAAC,EAC1F,UAAU,GAAG,SAAS,CACvB,CAAC;AAEF,wBAAgB,QAAQ,CAAC,KAAK,GAAG,OAAO,EAAE,OAAO,EAAE,YAAY,EAAE,OAAO,CAAC,EAAE,eAAe,CAAC,KAAK,CAAC,+EAMhG;AAID,KAAK,qBAAqB,GAAG;IAC3B,YAAY,EAAE,MAAM,CAAC;IACrB,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CAC/B,CAAC;AAEF,wBAAgB,WAAW,CAAC,KAAK,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EACzF,OAAO,CAAC,EAAE,kBAAkB,CAAC,KAAK,EAAE,KAAK,EAAE,qBAAqB,CAAC,mGAelE;AAID,wBAAgB,aAAa,uBAgB5B"}
@@ -0,0 +1,2 @@
1
+ export declare function useIsMobile(): boolean;
2
+ //# sourceMappingURL=use-mobile.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-mobile.d.ts","sourceRoot":"","sources":["../../src/hooks/use-mobile.ts"],"names":[],"mappings":"AAIA,wBAAgB,WAAW,YAc1B"}
@@ -0,0 +1,52 @@
1
+ export type SortDirection = 'asc' | 'desc';
2
+ export type TableSort = {
3
+ column: string;
4
+ direction: SortDirection;
5
+ };
6
+ export type TableFilter = {
7
+ column: string;
8
+ operator: 'eq' | 'neq' | 'gt' | 'gte' | 'lt' | 'lte' | 'like' | 'in';
9
+ value: string | number | boolean | (string | number)[];
10
+ };
11
+ export type UseSqlTableOptions<TRow = Record<string, unknown>> = {
12
+ /** Base SQL query (without ORDER BY, LIMIT, OFFSET) */
13
+ baseSql: string;
14
+ /** Query key prefix for React Query */
15
+ queryKey?: string;
16
+ /** Initial page (1-indexed) */
17
+ initialPage?: number;
18
+ /** Initial page size */
19
+ initialPageSize?: number;
20
+ /** Initial sort */
21
+ initialSort?: TableSort;
22
+ /** Initial filters */
23
+ initialFilters?: TableFilter[];
24
+ /** Enable the query */
25
+ enabled?: boolean;
26
+ /** Transform row data */
27
+ transformRow?: (row: Record<string, unknown>) => TRow;
28
+ };
29
+ export type UseSqlTableResult<TRow = Record<string, unknown>> = {
30
+ rows: TRow[];
31
+ columns: string[];
32
+ totalCount: number;
33
+ page: number;
34
+ pageSize: number;
35
+ totalPages: number;
36
+ setPage: (page: number) => void;
37
+ setPageSize: (size: number) => void;
38
+ sort: TableSort | null;
39
+ setSort: (sort: TableSort | null) => void;
40
+ toggleSort: (column: string) => void;
41
+ filters: TableFilter[];
42
+ addFilter: (filter: TableFilter) => void;
43
+ removeFilter: (column: string, operator?: string) => void;
44
+ clearFilters: () => void;
45
+ setFilters: (filters: TableFilter[]) => void;
46
+ isLoading: boolean;
47
+ isFetching: boolean;
48
+ error: Error | null;
49
+ refresh: () => void;
50
+ };
51
+ export declare function useSqlTable<TRow = Record<string, unknown>>(options: UseSqlTableOptions<TRow>): UseSqlTableResult<TRow>;
52
+ //# sourceMappingURL=use-sql-table.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-sql-table.d.ts","sourceRoot":"","sources":["../../src/hooks/use-sql-table.ts"],"names":[],"mappings":"AAIA,MAAM,MAAM,aAAa,GAAG,KAAK,GAAG,MAAM,CAAC;AAE3C,MAAM,MAAM,SAAS,GAAG;IACtB,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,aAAa,CAAC;CAC1B,CAAC;AAEF,MAAM,MAAM,WAAW,GAAG;IACxB,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,IAAI,GAAG,KAAK,GAAG,IAAI,GAAG,KAAK,GAAG,IAAI,GAAG,KAAK,GAAG,MAAM,GAAG,IAAI,CAAC;IACrE,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,CAAC,MAAM,GAAG,MAAM,CAAC,EAAE,CAAC;CACxD,CAAC;AAEF,MAAM,MAAM,kBAAkB,CAAC,IAAI,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,IAAI;IAC/D,uDAAuD;IACvD,OAAO,EAAE,MAAM,CAAC;IAChB,uCAAuC;IACvC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,+BAA+B;IAC/B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,wBAAwB;IACxB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,mBAAmB;IACnB,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB,sBAAsB;IACtB,cAAc,CAAC,EAAE,WAAW,EAAE,CAAC;IAC/B,uBAAuB;IACvB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,yBAAyB;IACzB,YAAY,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,IAAI,CAAC;CACvD,CAAC;AAEF,MAAM,MAAM,iBAAiB,CAAC,IAAI,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,IAAI;IAE9D,IAAI,EAAE,IAAI,EAAE,CAAC;IACb,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;IAGnB,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IAChC,WAAW,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IAGpC,IAAI,EAAE,SAAS,GAAG,IAAI,CAAC;IACvB,OAAO,EAAE,CAAC,IAAI,EAAE,SAAS,GAAG,IAAI,KAAK,IAAI,CAAC;IAC1C,UAAU,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;IAGrC,OAAO,EAAE,WAAW,EAAE,CAAC;IACvB,SAAS,EAAE,CAAC,MAAM,EAAE,WAAW,KAAK,IAAI,CAAC;IACzC,YAAY,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IAC1D,YAAY,EAAE,MAAM,IAAI,CAAC;IACzB,UAAU,EAAE,CAAC,OAAO,EAAE,WAAW,EAAE,KAAK,IAAI,CAAC;IAG7C,SAAS,EAAE,OAAO,CAAC;IACnB,UAAU,EAAE,OAAO,CAAC;IACpB,KAAK,EAAE,KAAK,GAAG,IAAI,CAAC;IAGpB,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB,CAAC;AA8DF,wBAAgB,WAAW,CAAC,IAAI,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EACxD,OAAO,EAAE,kBAAkB,CAAC,IAAI,CAAC,GAChC,iBAAiB,CAAC,IAAI,CAAC,CAuJzB"}
@@ -0,0 +1,4 @@
1
+ export * from './components';
2
+ export * from './hooks';
3
+ export * from './lib';
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,aAAa,CAAC;AAGrB,cAAc,cAAc,CAAC;AAC7B,cAAc,SAAS,CAAC;AACxB,cAAc,OAAO,CAAC"}
package/dist/index.js ADDED
@@ -0,0 +1,134 @@
1
+ import { A, a, d, e, f, B, h, C, j, k, l, m, n, o, Q, D, b, c, p, q, r, s, t, u, v, w, T, F, I, L, P, R, S, x, y, z, E, G, H, J, K, M, N, O, U, W, X, Y, Z, $, a0, a1, a2, a3, g, i, V, _ } from "./tooltip-BMqvkb5u.js";
2
+ import { u as u2, a as a4, b as b2, c as c2, d as d2, e as e2 } from "./use-sql-table-DuIu8eMY.js";
3
+ import { u as u3 } from "./use-automation-run-CbhXCKvM.js";
4
+ import { B as B2, E as E2, b as b3, c as c3, d as d3, e as e3, f as f2, g as g2, h as h2, j as j2, k as k2, l as l2, m as m2, n as n2, r as r2, q as q2, s as s2, i as i2, t as t2, u as u4, v as v2, w as w2, x as x2, o as o2, p as p2, y as y2, z as z2, a as a5 } from "./automations-DU4weMpK.js";
5
+ import { g as g3, a as a6, p as p3, b as b4, c as c4, d as d4, e as e4, f as f3, h as h3, i as i3, j as j3, k as k3, l as l3, s as s3, u as u5 } from "./api-BNY_eNKa.js";
6
+ import { o as o3, f as f4, a as a7, b as b5, c as c5, d as d5, e as e5, g as g4, h as h4, i as i4, j as j4, k as k4, l as l4, m as m3, n as n3, s as s4 } from "./formatters-Baj7FkeG.js";
7
+ import { q as q3 } from "./query-client-DdOWay4_.js";
8
+ export {
9
+ A as AutomationRunList,
10
+ a as AutomationRunner,
11
+ d as Avatar,
12
+ e as AvatarFallback,
13
+ f as AvatarImage,
14
+ B as Badge,
15
+ B2 as BridgeError,
16
+ h as Button,
17
+ C as Card,
18
+ j as CardContent,
19
+ k as CardDescription,
20
+ l as CardFooter,
21
+ m as CardHeader,
22
+ n as CardTitle,
23
+ o as Checkbox,
24
+ Q as ConfidenceBadge,
25
+ D as DataTable,
26
+ b as DataTableFilters,
27
+ c as DataTablePagination,
28
+ p as Dialog,
29
+ q as DialogClose,
30
+ r as DialogContent,
31
+ s as DialogDescription,
32
+ t as DialogFooter,
33
+ u as DialogHeader,
34
+ v as DialogTitle,
35
+ w as DialogTrigger,
36
+ E2 as EXPECTED_PARENT_ORIGIN,
37
+ T as EncodingStatusBadge,
38
+ F as FileDropzone,
39
+ I as Input,
40
+ L as Label,
41
+ P as Progress,
42
+ R as RecordSheet,
43
+ S as ScrollArea,
44
+ x as ScrollBar,
45
+ y as Separator,
46
+ z as Sheet,
47
+ E as SheetClose,
48
+ G as SheetContent,
49
+ H as SheetDescription,
50
+ J as SheetFooter,
51
+ K as SheetHeader,
52
+ M as SheetTitle,
53
+ N as SheetTrigger,
54
+ O as Skeleton,
55
+ U as StatusBadge,
56
+ W as Tabs,
57
+ X as TabsContent,
58
+ Y as TabsList,
59
+ Z as TabsTrigger,
60
+ $ as Textarea,
61
+ a0 as Tooltip,
62
+ a1 as TooltipContent,
63
+ a2 as TooltipProvider,
64
+ a3 as TooltipTrigger,
65
+ b3 as automationStatuses,
66
+ g as badgeVariants,
67
+ i as buttonVariants,
68
+ c3 as cancelAutomationRun,
69
+ d3 as cancelRun,
70
+ e3 as clearAutomationCache,
71
+ o3 as cn,
72
+ f2 as createAutomationRun,
73
+ g2 as createRun,
74
+ h2 as ensureAutomationRun,
75
+ j2 as ensureRun,
76
+ f4 as formatBoolean,
77
+ a7 as formatCellValue,
78
+ b5 as formatCurrency,
79
+ c5 as formatDate,
80
+ d5 as formatDateTime,
81
+ e5 as formatEditor,
82
+ g4 as formatFile,
83
+ h4 as formatFileSize,
84
+ i4 as formatJson,
85
+ j4 as formatNumber,
86
+ k4 as formatPercent,
87
+ l4 as formatRelation,
88
+ m3 as formatSelect,
89
+ n3 as formatText,
90
+ k2 as getAutomationByExternalId,
91
+ l2 as getAutomationRun,
92
+ m2 as getAutomationRunFileDownloadUrl,
93
+ g3 as getDownloadUrl,
94
+ n2 as getRun,
95
+ r2 as getRunFileUrl,
96
+ q2 as getRunFiles,
97
+ a6 as getUploadUrl,
98
+ s2 as isActiveStatus,
99
+ i2 as isEmbedded,
100
+ t2 as isTerminalStatus,
101
+ u4 as listAutomationRunFiles,
102
+ v2 as listRuns,
103
+ w2 as listRunsByAgent,
104
+ x2 as listRunsByExternalId,
105
+ o2 as onInitMessage,
106
+ p2 as parentApiRequest,
107
+ p3 as pbBulkDelete,
108
+ b4 as pbBulkUpdate,
109
+ c4 as pbCreate,
110
+ d4 as pbDelete,
111
+ e4 as pbGet,
112
+ f3 as pbList,
113
+ h3 as pbSearch,
114
+ i3 as pbSql,
115
+ j3 as pbUpdate,
116
+ k3 as pbUpdateRecord,
117
+ l3 as pbUpsert,
118
+ y2 as pollAutomationRun,
119
+ z2 as pollRun,
120
+ a5 as postReadyMessage,
121
+ q3 as queryClient,
122
+ s3 as sendEmail,
123
+ V as statusBadgeVariants,
124
+ s4 as stripHtml,
125
+ _ as tabsListVariants,
126
+ u5 as uploadFile,
127
+ u2 as useAutomationAgent,
128
+ u3 as useAutomationRun,
129
+ a4 as useFileUpload,
130
+ b2 as useLumeraUser,
131
+ c2 as usePbSql,
132
+ d2 as usePbUpdate,
133
+ e2 as useSqlTable
134
+ };