@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,137 @@
1
+ /**
2
+ * Bridge module for parent-child iframe communication.
3
+ *
4
+ * This module handles all communication between a Lumera custom app (iframe)
5
+ * and the Lumera parent application. It provides:
6
+ * - Authentication handshake (ready/init messages)
7
+ * - API request proxying through the parent
8
+ * - Standalone dev mode for local development
9
+ *
10
+ * @module bridge
11
+ */
12
+ /**
13
+ * Expected parent origin for security validation.
14
+ * Supports wildcards like `https://*.lumerahq.com`
15
+ */
16
+ export declare const EXPECTED_PARENT_ORIGIN: any;
17
+ /**
18
+ * Payload received from the parent during initialization.
19
+ * Contains company, user, and session information.
20
+ */
21
+ export type HostPayload = {
22
+ company?: {
23
+ id: string;
24
+ name?: string;
25
+ apiName?: string;
26
+ };
27
+ user?: {
28
+ id: string;
29
+ name: string;
30
+ email: string;
31
+ role?: string;
32
+ };
33
+ message?: string;
34
+ session?: {
35
+ token?: string;
36
+ };
37
+ };
38
+ /**
39
+ * Request payload sent to the parent for API calls.
40
+ */
41
+ export type BridgeRequest = {
42
+ /** HTTP method */
43
+ method: string;
44
+ /** API URL (relative to /api) */
45
+ url: string;
46
+ /** Optional HTTP headers */
47
+ headers?: Record<string, string>;
48
+ /** Optional request body */
49
+ body?: unknown;
50
+ /** If true, body is base64-encoded binary data (for file uploads) */
51
+ isBase64?: boolean;
52
+ /** Request timeout in milliseconds (default: 15000) */
53
+ timeout?: number;
54
+ };
55
+ /**
56
+ * Response payload received from the parent.
57
+ */
58
+ export type BridgeResponse = {
59
+ /** Request ID for correlation */
60
+ id: string;
61
+ /** Whether the request succeeded (2xx status) */
62
+ ok: boolean;
63
+ /** HTTP status code */
64
+ status: number;
65
+ /** Response body (parsed JSON or string) */
66
+ body?: unknown;
67
+ /** Error message if request failed */
68
+ error?: string;
69
+ };
70
+ /**
71
+ * Custom error class for bridge-related errors.
72
+ */
73
+ export declare class BridgeError extends Error {
74
+ readonly status?: number;
75
+ readonly response?: BridgeResponse;
76
+ constructor(message: string, status?: number, response?: BridgeResponse);
77
+ }
78
+ /**
79
+ * Check if the app is running embedded in an iframe.
80
+ *
81
+ * @returns `true` if running in an iframe, `false` otherwise
82
+ *
83
+ * @example
84
+ * if (!isEmbedded()) {
85
+ * console.log('App must run inside Lumera');
86
+ * }
87
+ */
88
+ export declare const isEmbedded: () => boolean;
89
+ /**
90
+ * Send a "ready" message to the parent to initiate the handshake.
91
+ * In standalone dev mode, this triggers a mock init payload instead.
92
+ *
93
+ * @example
94
+ * // In main.tsx
95
+ * useEffect(() => {
96
+ * postReadyMessage();
97
+ * }, []);
98
+ */
99
+ export declare const postReadyMessage: () => void;
100
+ /**
101
+ * Register a listener for the init message from the parent.
102
+ * The callback receives the host payload with company, user, and session data.
103
+ *
104
+ * @param listener - Callback function receiving the HostPayload
105
+ * @returns Cleanup function to remove the listener
106
+ *
107
+ * @example
108
+ * useEffect(() => {
109
+ * const cleanup = onInitMessage((payload) => {
110
+ * setUser(payload?.user);
111
+ * setCompany(payload?.company);
112
+ * });
113
+ * return cleanup;
114
+ * }, []);
115
+ */
116
+ export declare const onInitMessage: (listener: (payload: HostPayload | undefined) => void) => (() => void);
117
+ /**
118
+ * Make an API request through the parent application.
119
+ * The parent handles authentication and proxies the request to the backend.
120
+ *
121
+ * @param request - The request configuration
122
+ * @returns Promise resolving to the response
123
+ * @throws {BridgeError} If the request times out or the app is not embedded
124
+ *
125
+ * @example
126
+ * const response = await parentApiRequest({
127
+ * method: 'POST',
128
+ * url: '/api/pb/sql',
129
+ * body: { sql: 'SELECT * FROM users' },
130
+ * });
131
+ *
132
+ * if (response.ok) {
133
+ * console.log(response.body);
134
+ * }
135
+ */
136
+ export declare const parentApiRequest: (request: BridgeRequest) => Promise<BridgeResponse>;
137
+ //# sourceMappingURL=bridge.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bridge.d.ts","sourceRoot":"","sources":["../../src/lib/bridge.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAYH;;;GAGG;AACH,eAAO,MAAM,sBAAsB,KAC+E,CAAC;AAMnH;;;GAGG;AACH,MAAM,MAAM,WAAW,GAAG;IACxB,OAAO,CAAC,EAAE;QACR,EAAE,EAAE,MAAM,CAAC;QACX,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,OAAO,CAAC,EAAE,MAAM,CAAC;KAClB,CAAC;IACF,IAAI,CAAC,EAAE;QACL,EAAE,EAAE,MAAM,CAAC;QACX,IAAI,EAAE,MAAM,CAAC;QACb,KAAK,EAAE,MAAM,CAAC;QACd,IAAI,CAAC,EAAE,MAAM,CAAC;KACf,CAAC;IACF,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE;QACR,KAAK,CAAC,EAAE,MAAM,CAAC;KAChB,CAAC;CACH,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,aAAa,GAAG;IAC1B,kBAAkB;IAClB,MAAM,EAAE,MAAM,CAAC;IACf,iCAAiC;IACjC,GAAG,EAAE,MAAM,CAAC;IACZ,4BAA4B;IAC5B,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACjC,4BAA4B;IAC5B,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,qEAAqE;IACrE,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,uDAAuD;IACvD,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,cAAc,GAAG;IAC3B,iCAAiC;IACjC,EAAE,EAAE,MAAM,CAAC;IACX,iDAAiD;IACjD,EAAE,EAAE,OAAO,CAAC;IACZ,uBAAuB;IACvB,MAAM,EAAE,MAAM,CAAC;IACf,4CAA4C;IAC5C,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,sCAAsC;IACtC,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF;;GAEG;AACH,qBAAa,WAAY,SAAQ,KAAK;IACpC,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,QAAQ,CAAC,EAAE,cAAc,CAAC;gBAEvB,OAAO,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,cAAc;CAMxE;AAqMD;;;;;;;;;GASG;AACH,eAAO,MAAM,UAAU,QAAO,OAAsE,CAAC;AAErG;;;;;;;;;GASG;AACH,eAAO,MAAM,gBAAgB,QAAO,IAYnC,CAAC;AAEF;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,aAAa,GAAI,UAAU,CAAC,OAAO,EAAE,WAAW,GAAG,SAAS,KAAK,IAAI,KAAG,CAAC,MAAM,IAAI,CAU/F,CAAC;AAEF;;;;;;;;;;;;;;;;;;GAkBG;AACH,eAAO,MAAM,gBAAgB,GAAU,SAAS,aAAa,KAAG,OAAO,CAAC,cAAc,CAwCrF,CAAC"}
@@ -0,0 +1,92 @@
1
+ import { ReactNode } from 'react';
2
+ /**
3
+ * Format options for different cell types
4
+ */
5
+ export type FormatOptions = {
6
+ locale?: string;
7
+ currency?: string;
8
+ dateStyle?: 'full' | 'long' | 'medium' | 'short';
9
+ timeStyle?: 'full' | 'long' | 'medium' | 'short';
10
+ relativeTime?: boolean;
11
+ maxLength?: number;
12
+ nullDisplay?: string;
13
+ };
14
+ /**
15
+ * Format null/undefined values
16
+ */
17
+ export declare function formatNull(options?: FormatOptions): string;
18
+ /**
19
+ * Format a boolean value
20
+ */
21
+ export declare function formatBoolean(value: boolean, _options?: FormatOptions): string;
22
+ /**
23
+ * Format a number with locale
24
+ */
25
+ export declare function formatNumber(value: number, options?: FormatOptions): string;
26
+ /**
27
+ * Format currency
28
+ */
29
+ export declare function formatCurrency(value: number, options?: FormatOptions): string;
30
+ /**
31
+ * Format percentage
32
+ */
33
+ export declare function formatPercent(value: number, options?: FormatOptions): string;
34
+ /**
35
+ * Format a date value
36
+ */
37
+ export declare function formatDate(value: unknown, options?: FormatOptions): string;
38
+ /**
39
+ * Format a datetime value
40
+ */
41
+ export declare function formatDateTime(value: unknown, options?: FormatOptions): string;
42
+ /**
43
+ * Format text with optional truncation
44
+ */
45
+ export declare function formatText(value: string, options?: FormatOptions): string;
46
+ /**
47
+ * Strip HTML tags from text
48
+ */
49
+ export declare function stripHtml(html: string): string;
50
+ /**
51
+ * Format editor/rich text content (strip HTML, truncate)
52
+ */
53
+ export declare function formatEditor(value: string, options?: FormatOptions): string;
54
+ /**
55
+ * Format JSON as a preview string
56
+ */
57
+ export declare function formatJson(value: unknown, options?: FormatOptions): string;
58
+ /**
59
+ * Lumera file descriptor type
60
+ */
61
+ export type FileDescriptor = {
62
+ object_key: string;
63
+ original_name?: string;
64
+ size?: number;
65
+ content_type?: string;
66
+ };
67
+ /**
68
+ * Format file size in human-readable format
69
+ */
70
+ export declare function formatFileSize(bytes: number): string;
71
+ /**
72
+ * Format a file descriptor for display
73
+ */
74
+ export declare function formatFile(value: FileDescriptor | FileDescriptor[] | null | undefined): string;
75
+ /**
76
+ * Format select values (could be single or multi-select)
77
+ */
78
+ export declare function formatSelect(value: unknown): string;
79
+ /**
80
+ * Format relation IDs (shows count or single ID)
81
+ * For actual relation label display, use a custom cell renderer with fetched data
82
+ */
83
+ export declare function formatRelation(value: unknown): string;
84
+ /**
85
+ * Column types supported by auto-formatting
86
+ */
87
+ export type ColumnType = 'text' | 'number' | 'currency' | 'percent' | 'boolean' | 'date' | 'datetime' | 'json' | 'editor' | 'file' | 'select' | 'relation';
88
+ /**
89
+ * Auto-format a value based on its column type
90
+ */
91
+ export declare function formatCellValue(value: unknown, type?: ColumnType, options?: FormatOptions): ReactNode;
92
+ //# sourceMappingURL=formatters.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"formatters.d.ts","sourceRoot":"","sources":["../../src/lib/formatters.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC;;GAEG;AACH,MAAM,MAAM,aAAa,GAAG;IAC1B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,QAAQ,GAAG,OAAO,CAAC;IACjD,SAAS,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,QAAQ,GAAG,OAAO,CAAC;IACjD,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,CAAC;AAIF;;GAEG;AACH,wBAAgB,UAAU,CAAC,OAAO,CAAC,EAAE,aAAa,GAAG,MAAM,CAE1D;AAED;;GAEG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,OAAO,EAAE,QAAQ,CAAC,EAAE,aAAa,GAAG,MAAM,CAE9E;AAED;;GAEG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,aAAa,GAAG,MAAM,CAG3E;AAED;;GAEG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,aAAa,GAAG,MAAM,CAO7E;AAED;;GAEG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,aAAa,GAAG,MAAM,CAO5E;AAsCD;;G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,UAAU,GACV,MAAM,GACN,QAAQ,GACR,MAAM,GACN,QAAQ,GACR,UAAU,CAAC;AAEf;;GAEG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,OAAO,EAAE,IAAI,CAAC,EAAE,UAAU,EAAE,OAAO,CAAC,EAAE,aAAa,GAAG,SAAS,CAoCrG"}
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Lumera custom app library exports.
3
+ *
4
+ * @module @lumerahq/ui/lib
5
+ */
6
+ export { BridgeError, type BridgeRequest, type BridgeResponse, EXPECTED_PARENT_ORIGIN, type HostPayload, isEmbedded, onInitMessage, parentApiRequest, postReadyMessage, } from './bridge';
7
+ export { type EmailSendRequest, type EmailSendResult, type FileDescriptor, getDownloadUrl, getUploadUrl, type PbBulkResult, type PbListOptions, type PbListResponse, type PbRecord, type PbSqlRequest, type PbSqlResponse, pbBulkDelete, pbBulkUpdate, pbCreate, pbDelete, pbGet, pbList, pbSearch, pbSql, pbUpdate, pbUpdateRecord, pbUpsert, sendEmail, type UploadOptions, type UploadUrlResponse, uploadFile, } from './api';
8
+ export { type Automation, type AutomationRun, type AutomationRunFile, type AutomationStatus, automationStatuses, type CreateRunOptions, cancelAutomationRun, cancelRun, clearAutomationCache, createAutomationRun, createRun, ensureAutomationRun, ensureRun, getAutomationByExternalId, getAutomationRun, getAutomationRunFileDownloadUrl, getRun, getRunFiles, getRunFileUrl, isActiveStatus, isTerminalStatus, type LegacyCreateRunOptions, type ListRunsOptions, listAutomationRunFiles, listRuns, listRunsByAgent, listRunsByExternalId, type PollOptions, pollAutomationRun, pollRun, } from './automations';
9
+ export { type ColumnType, type FileDescriptor as FormatterFileDescriptor, type FormatOptions, formatBoolean, formatCellValue, formatCurrency, formatDate, formatDateTime, formatEditor, formatFile, formatFileSize, formatJson, formatNumber, formatPercent, formatRelation, formatSelect, formatText, stripHtml, } from './formatters';
10
+ export { queryClient } from './query-client';
11
+ export { cn } from './utils';
12
+ //# sourceMappingURL=index.d.ts.map
@@ -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AK,aAAa,EAClB,aAAa,EACb,eAAe,EACf,cAAc,EACd,UAAU,EACV,cAAc,EACd,YAAY,EACZ,UAAU,EACV,cAAc,EACd,UAAU,EACV,YAAY,EACZ,aAAa,EACb,cAAc,EACd,YAAY,EACZ,UAAU,EACV,SAAS,GACV,MAAM,cAAc,CAAC;AAMtB,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAM7C,OAAO,EAAE,EAAE,EAAE,MAAM,SAAS,CAAC"}
@@ -0,0 +1,66 @@
1
+ import { B, E, b, c, d, e, f, g, h, j, k, l, m, n, r, q, s, i, t, u, v, w, x, o, p, y, z, a } from "../automations-DU4weMpK.js";
2
+ import { g as g2, a as a2, p as p2, b as b2, c as c2, d as d2, e as e2, f as f2, h as h2, i as i2, j as j2, k as k2, l as l2, s as s2, u as u2 } from "../api-BNY_eNKa.js";
3
+ import { o as o2, f as f3, a as a3, b as b3, c as c3, d as d3, e as e3, g as g3, h as h3, i as i3, j as j3, k as k3, l as l3, m as m2, n as n2, s as s3 } from "../formatters-Baj7FkeG.js";
4
+ import { q as q2 } from "../query-client-DdOWay4_.js";
5
+ export {
6
+ B as BridgeError,
7
+ E as EXPECTED_PARENT_ORIGIN,
8
+ b as automationStatuses,
9
+ c as cancelAutomationRun,
10
+ d as cancelRun,
11
+ e as clearAutomationCache,
12
+ o2 as cn,
13
+ f as createAutomationRun,
14
+ g as createRun,
15
+ h as ensureAutomationRun,
16
+ j as ensureRun,
17
+ f3 as formatBoolean,
18
+ a3 as formatCellValue,
19
+ b3 as formatCurrency,
20
+ c3 as formatDate,
21
+ d3 as formatDateTime,
22
+ e3 as formatEditor,
23
+ g3 as formatFile,
24
+ h3 as formatFileSize,
25
+ i3 as formatJson,
26
+ j3 as formatNumber,
27
+ k3 as formatPercent,
28
+ l3 as formatRelation,
29
+ m2 as formatSelect,
30
+ n2 as formatText,
31
+ k as getAutomationByExternalId,
32
+ l as getAutomationRun,
33
+ m as getAutomationRunFileDownloadUrl,
34
+ g2 as getDownloadUrl,
35
+ n as getRun,
36
+ r as getRunFileUrl,
37
+ q as getRunFiles,
38
+ a2 as getUploadUrl,
39
+ s as isActiveStatus,
40
+ i as isEmbedded,
41
+ t as isTerminalStatus,
42
+ u as listAutomationRunFiles,
43
+ v as listRuns,
44
+ w as listRunsByAgent,
45
+ x as listRunsByExternalId,
46
+ o as onInitMessage,
47
+ p as parentApiRequest,
48
+ p2 as pbBulkDelete,
49
+ b2 as pbBulkUpdate,
50
+ c2 as pbCreate,
51
+ d2 as pbDelete,
52
+ e2 as pbGet,
53
+ f2 as pbList,
54
+ h2 as pbSearch,
55
+ i2 as pbSql,
56
+ j2 as pbUpdate,
57
+ k2 as pbUpdateRecord,
58
+ l2 as pbUpsert,
59
+ y as pollAutomationRun,
60
+ z as pollRun,
61
+ a as postReadyMessage,
62
+ q2 as queryClient,
63
+ s2 as sendEmail,
64
+ s3 as stripHtml,
65
+ u2 as uploadFile
66
+ };
@@ -0,0 +1,3 @@
1
+ import { QueryClient } from '@tanstack/react-query';
2
+ export declare const queryClient: QueryClient;
3
+ //# sourceMappingURL=query-client.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"query-client.d.ts","sourceRoot":"","sources":["../../src/lib/query-client.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAEpD,eAAO,MAAM,WAAW,aAYtB,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { ClassValue } from 'clsx';
2
+ export declare function cn(...inputs: ClassValue[]): string;
3
+ //# sourceMappingURL=utils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/lib/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,UAAU,EAAQ,MAAM,MAAM,CAAC;AAG7C,wBAAgB,EAAE,CAAC,GAAG,MAAM,EAAE,UAAU,EAAE,UAEzC"}
package/dist/logo.png ADDED
Binary file
Binary file
@@ -0,0 +1,17 @@
1
+ import { QueryClient } from "@tanstack/react-query";
2
+ const queryClient = new QueryClient({
3
+ defaultOptions: {
4
+ queries: {
5
+ // Data in this app (finance/ops) often changes, but we don't want to over-fetch.
6
+ // 30 seconds stale time seems like a reasonable default.
7
+ staleTime: 30 * 1e3,
8
+ // Retry failed queries once before showing error
9
+ retry: 1,
10
+ // Don't refetch on window focus automatically to avoid jarring updates
11
+ refetchOnWindowFocus: false
12
+ }
13
+ }
14
+ });
15
+ export {
16
+ queryClient as q
17
+ };