react-semaphor 0.1.327 → 0.1.329

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 (64) hide show
  1. package/dist/analytics-protocol/index.cjs +1 -1
  2. package/dist/analytics-protocol/index.js +211 -72
  3. package/dist/brand-studio/index.cjs +5 -5
  4. package/dist/brand-studio/index.js +23 -24
  5. package/dist/chunks/_commonjsHelpers-BVfed4GL.js +28 -0
  6. package/dist/chunks/_commonjsHelpers-DwTZ_eVU.js +1 -0
  7. package/dist/chunks/{braces-BGWZEnQJ.js → braces-CG8viaD2.js} +1 -1
  8. package/dist/chunks/{braces-B6qRDu1H.js → braces-DSaa_4Oc.js} +1 -1
  9. package/dist/chunks/{calendar-preferences-dialog-fkLUMJyR.js → calendar-preferences-dialog-DD_qAthL.js} +1 -1
  10. package/dist/chunks/{calendar-preferences-dialog-CjwbE_82.js → calendar-preferences-dialog-JRmNJptJ.js} +3 -3
  11. package/dist/chunks/{chevrons-up-down-xG-bVFD9.js → chevrons-up-down-CBa0uh0X.js} +1 -1
  12. package/dist/chunks/{chevrons-up-down-BpsogQvv.js → chevrons-up-down-ChDNqVP7.js} +1 -1
  13. package/dist/chunks/dashboard-briefing-launcher-BKdJFwH5.js +106 -0
  14. package/dist/chunks/{dashboard-briefing-launcher-Cy1nWZRW.js → dashboard-briefing-launcher-BfyNkd8i.js} +1141 -1137
  15. package/dist/chunks/{dashboard-controls-BWnVEFJq.js → dashboard-controls-0pZDLvFL.js} +218 -218
  16. package/dist/chunks/{dashboard-controls-C7rOGZO-.js → dashboard-controls-C0xm1QMR.js} +10 -10
  17. package/dist/chunks/dashboard-json-BW5OVZ6m.js +1 -0
  18. package/dist/chunks/{dashboard-json-BpRNSsF3.js → dashboard-json-DsruhRPD.js} +14 -13
  19. package/dist/chunks/{edit-dashboard-visual-B2vkIKEa.js → edit-dashboard-visual-DQyJ7SSv.js} +1 -1
  20. package/dist/chunks/{edit-dashboard-visual-CYf26co_.js → edit-dashboard-visual-g5SZZahJ.js} +9 -8
  21. package/dist/chunks/index-1JWDPCun.js +1935 -0
  22. package/dist/chunks/index-BdjXTQt4.js +1444 -0
  23. package/dist/chunks/{index-DTlbYpxd.js → index-BmKr-K7J.js} +116971 -113296
  24. package/dist/chunks/index-C1l78BIx.js +3247 -0
  25. package/dist/chunks/lib-Ce3zosXY.js +38 -0
  26. package/dist/chunks/lib-DFvr9fM4.js +5500 -0
  27. package/dist/chunks/{palette-CSF7IVJn.js → palette-D0YmAqBS.js} +1 -1
  28. package/dist/chunks/{palette-CWgEPBoG.js → palette-DQgq3edH.js} +1 -1
  29. package/dist/chunks/{resource-management-panel-D6nbfJY3.js → resource-management-panel-CIfBh46E.js} +1 -1
  30. package/dist/chunks/{resource-management-panel-D893Onv8.js → resource-management-panel-Cj19pw9M.js} +145 -145
  31. package/dist/chunks/{switch-DJJJD_g1.js → switch-BvTzw2AW.js} +39 -34
  32. package/dist/chunks/{switch-DKf6vHfP.js → switch-De31SR3q.js} +878 -885
  33. package/dist/chunks/typescript-Cmizj1hi.js +446 -0
  34. package/dist/chunks/typescript-H1EwZsOb.js +159820 -0
  35. package/dist/chunks/use-create-flow-overlay-state-BTQiKRD1.js +26 -0
  36. package/dist/chunks/{use-create-flow-overlay-state-p21zs2p6.js → use-create-flow-overlay-state-IcHP0l39.js} +150 -151
  37. package/dist/chunks/{use-visual-utils-BKBua6o4.js → use-visual-utils-DQ5zGYD2.js} +13 -13
  38. package/dist/chunks/{use-visual-utils-BqWm0QeW.js → use-visual-utils-XF-AqV8o.js} +1 -1
  39. package/dist/dashboard/index.cjs +1 -1
  40. package/dist/dashboard/index.js +1 -1
  41. package/dist/data-app-builder/index.cjs +1 -0
  42. package/dist/data-app-builder/index.js +4 -0
  43. package/dist/data-app-builder-browser-runtime/index.cjs +1 -0
  44. package/dist/data-app-builder-browser-runtime/index.js +10 -0
  45. package/dist/data-app-sdk/index.cjs +1 -1
  46. package/dist/data-app-sdk/index.js +208 -196
  47. package/dist/index.cjs +1 -1
  48. package/dist/index.js +14 -14
  49. package/dist/style.css +1 -1
  50. package/dist/surfboard/index.cjs +1 -1
  51. package/dist/surfboard/index.js +2 -2
  52. package/dist/types/analytics-protocol.d.ts +76 -1
  53. package/dist/types/dashboard-authoring.d.ts +2 -1
  54. package/dist/types/data-app-builder-browser-runtime.d.ts +185 -0
  55. package/dist/types/data-app-builder.d.ts +631 -0
  56. package/dist/types/data-app-sdk.d.ts +16 -2
  57. package/dist/types/main.d.ts +4 -1
  58. package/package.json +11 -1
  59. package/dist/chunks/dashboard-briefing-launcher-Co57xBfS.js +0 -106
  60. package/dist/chunks/dashboard-json-DBPMknGo.js +0 -1
  61. package/dist/chunks/index-BD90s-wf.js +0 -1309
  62. package/dist/chunks/save-CtQbSub2.js +0 -6
  63. package/dist/chunks/save-DRdFKF57.js +0 -21
  64. package/dist/chunks/use-create-flow-overlay-state-C4LgoK8q.js +0 -26
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("../chunks/index-BD90s-wf.js"),e=require("../chunks/common-types-C73-Ud1-.js"),a=require("../chunks/calendar-preferences-dialog-fkLUMJyR.js");exports.Surfboard=r.DashboardPlus;exports.CONTROL_CARD_DEFAULT_VALUE=e.CONTROL_CARD_DEFAULT_VALUE;exports.EMPTY_SELECTION=e.EMPTY_SELECTION;exports.CalendarPreferencesDialog=a.CalendarPreferencesDialog;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("../chunks/index-BdjXTQt4.js"),e=require("../chunks/common-types-C73-Ud1-.js"),a=require("../chunks/calendar-preferences-dialog-DD_qAthL.js");exports.Surfboard=r.DashboardPlus;exports.CONTROL_CARD_DEFAULT_VALUE=e.CONTROL_CARD_DEFAULT_VALUE;exports.EMPTY_SELECTION=e.EMPTY_SELECTION;exports.CalendarPreferencesDialog=a.CalendarPreferencesDialog;
@@ -1,6 +1,6 @@
1
- import { a as e } from "../chunks/index-DTlbYpxd.js";
1
+ import { a as e } from "../chunks/index-BmKr-K7J.js";
2
2
  import { C, E } from "../chunks/common-types-4bjoIgvm.js";
3
- import { C as s } from "../chunks/calendar-preferences-dialog-CjwbE_82.js";
3
+ import { C as s } from "../chunks/calendar-preferences-dialog-JRmNJptJ.js";
4
4
  export {
5
5
  C as CONTROL_CARD_DEFAULT_VALUE,
6
6
  s as CalendarPreferencesDialog,
@@ -48,10 +48,20 @@ export declare type AnalyticsMetricFormat = {
48
48
 
49
49
  export declare function buildAnalyticsCatalogFieldSummary(fields: AnalyticsCatalogField[]): AnalyticsCatalogFieldSummary;
50
50
 
51
+ export declare function buildSemaphorQualifiedSourcePath(input: {
52
+ capabilities: Pick<SemaphorConnectionCapabilities, 'prefixLevels' | 'dialect'>;
53
+ source: SemaphorSourceCoordinateInput;
54
+ quoteIdentifier?: (value: string, dialect: SemaphorDialect) => string;
55
+ }): string;
56
+
51
57
  export declare function getAnalyticsCatalogFieldCandidates(field: AnalyticsCatalogField): string[];
52
58
 
53
59
  export declare function getAnalyticsCatalogFieldName(field: AnalyticsCatalogField): string;
54
60
 
61
+ export declare function getSemaphorConnectionCapabilities(connectionType: string | undefined, options?: {
62
+ connectionId?: string;
63
+ }): SemaphorConnectionCapabilities;
64
+
55
65
  export declare function inferAnalyticsMetricFormat(field: AnalyticsCatalogField): AnalyticsMetricFormat | undefined;
56
66
 
57
67
  export declare function isAnalyticsCatalogDateField(field: AnalyticsCatalogField): boolean;
@@ -72,6 +82,8 @@ export declare function normalizeAnalyticsCatalogDataType(value: unknown): Analy
72
82
 
73
83
  export declare function normalizeAnalyticsCatalogName(value: unknown): string;
74
84
 
85
+ export declare function normalizeSemaphorDialect(input: string | undefined): SemaphorDialect;
86
+
75
87
  export declare const SEMAPHOR_ANALYTICS_INTENT_FIXTURES: {
76
88
  revenueKpi: {
77
89
  version: 1;
@@ -217,6 +229,18 @@ export declare const SEMAPHOR_ANALYTICS_INTENT_FIXTURES: {
217
229
  };
218
230
  };
219
231
 
232
+ export declare type SemaphorAnalyticsExecutionResult = {
233
+ intentId?: string;
234
+ queryId?: string;
235
+ status: SemaphorAnalyticsExecutionStatus;
236
+ result?: SemaphorAnalyticsResult;
237
+ validation: SemaphorAnalyticsValidationResult;
238
+ missingFields?: string[];
239
+ warnings?: string[];
240
+ };
241
+
242
+ export declare type SemaphorAnalyticsExecutionStatus = 'answered' | 'partial' | 'failed';
243
+
220
244
  export declare type SemaphorAnalyticsFieldRole = 'metric' | 'dateField' | 'dimension' | 'input' | 'source' | 'sql';
221
245
 
222
246
  export declare type SemaphorAnalyticsIntent = SemaphorMetricIntent | SemaphorRecordsIntent | SemaphorInputOptionsIntent | SemaphorSqlIntent;
@@ -260,6 +284,43 @@ export declare type SemaphorAnalyticsValidationResult = {
260
284
  repairHints: SemaphorAnalyticsRepairHint[];
261
285
  };
262
286
 
287
+ export declare type SemaphorCompiledQuery = {
288
+ kind: 'config';
289
+ queryId: string;
290
+ source: SemaphorSourceRef;
291
+ cardType: string;
292
+ connectionId: string;
293
+ cardConfig: unknown;
294
+ cardDataSource: unknown;
295
+ activeFilters?: unknown[];
296
+ rowLimit: number;
297
+ analyticsIntent?: SemaphorAnalyticsIntent;
298
+ } | {
299
+ kind: 'sql';
300
+ queryId: string;
301
+ source: Extract<SemaphorSourceRef, {
302
+ kind: 'physical' | 'sql';
303
+ }>;
304
+ connectionId: string;
305
+ dialect: SemaphorDialect;
306
+ sql: string;
307
+ parameters?: Record<string, unknown>;
308
+ pythonCode?: string;
309
+ activeFilters?: unknown[];
310
+ rowLimit: number;
311
+ analyticsIntent?: SemaphorAnalyticsIntent;
312
+ };
313
+
314
+ export declare type SemaphorConnectionCapabilities = {
315
+ connectionId?: string;
316
+ connectionType?: string;
317
+ dialect: SemaphorDialect;
318
+ path: SemaphorSourceLevel[];
319
+ labels: Partial<Record<SemaphorSourceLevel, string>>;
320
+ prefixLevels: SemaphorSourceLevel[];
321
+ supportsFilterClause: boolean;
322
+ };
323
+
263
324
  export declare type SemaphorDashboardIntent = {
264
325
  version: SemaphorProtocolVersion;
265
326
  kind: 'dashboard';
@@ -285,7 +346,7 @@ export declare type SemaphorDashboardViewIntent = {
285
346
  text?: string;
286
347
  };
287
348
 
288
- export declare type SemaphorDialect = 'semantic' | 'postgres' | 'mysql' | 'snowflake' | 'bigquery' | 'redshift' | 'duckdb' | 'sqlite' | 'unknown';
349
+ export declare type SemaphorDialect = 'semantic' | 'postgres' | 'mysql' | 'mssql' | 'snowflake' | 'clickhouse' | 'bigquery' | 'redshift' | 'duckdb' | 'sqlite' | 'unknown';
289
350
 
290
351
  export declare type SemaphorExperienceIntent = SemaphorDashboardIntent;
291
352
 
@@ -416,6 +477,19 @@ export declare type SemaphorRecordsResult = SemaphorAnalyticsResultBase & {
416
477
  records: Array<Record<string, unknown>>;
417
478
  };
418
479
 
480
+ export declare type SemaphorSourceCoordinateInput = {
481
+ databaseName?: string;
482
+ schemaName?: string;
483
+ tableName?: string;
484
+ };
485
+
486
+ export declare function semaphorSourceHasRequiredCoordinates(input: {
487
+ capabilities: Pick<SemaphorConnectionCapabilities, 'prefixLevels'>;
488
+ source: SemaphorSourceCoordinateInput;
489
+ }): boolean;
490
+
491
+ export declare type SemaphorSourceLevel = 'database' | 'schema' | 'table';
492
+
419
493
  export declare type SemaphorSourceRef = {
420
494
  kind: 'semantic';
421
495
  domainId: string;
@@ -426,6 +500,7 @@ export declare type SemaphorSourceRef = {
426
500
  } | {
427
501
  kind: 'physical';
428
502
  connectionId: string;
503
+ connectionType?: string;
429
504
  tableName: string;
430
505
  databaseName?: string;
431
506
  schemaName?: string;
@@ -1854,7 +1854,7 @@ declare type SemaphorDashboardViewIntent = {
1854
1854
  text?: string;
1855
1855
  };
1856
1856
 
1857
- declare type SemaphorDialect = 'semantic' | 'postgres' | 'mysql' | 'snowflake' | 'bigquery' | 'redshift' | 'duckdb' | 'sqlite' | 'unknown';
1857
+ declare type SemaphorDialect = 'semantic' | 'postgres' | 'mysql' | 'mssql' | 'snowflake' | 'clickhouse' | 'bigquery' | 'redshift' | 'duckdb' | 'sqlite' | 'unknown';
1858
1858
 
1859
1859
  declare type SemaphorFieldRef = {
1860
1860
  name: string;
@@ -1955,6 +1955,7 @@ declare type SemaphorSourceRef = {
1955
1955
  } | {
1956
1956
  kind: 'physical';
1957
1957
  connectionId: string;
1958
+ connectionType?: string;
1958
1959
  tableName: string;
1959
1960
  databaseName?: string;
1960
1961
  schemaName?: string;
@@ -0,0 +1,185 @@
1
+ export declare type BrowserRuntimeLoader = <TModule = BrowserRuntimeModule>(specifier?: string) => Promise<TModule>;
2
+
3
+ export declare type BrowserRuntimeModule = BrowserSandboxRuntimeModule;
4
+
5
+ export declare type BrowserSandboxFile = {
6
+ path: string;
7
+ contents: string;
8
+ };
9
+
10
+ export declare type BrowserSandboxFilePlan = {
11
+ intent: string;
12
+ files: Array<{
13
+ path: string;
14
+ purpose: string;
15
+ action: 'create' | 'edit';
16
+ }>;
17
+ };
18
+
19
+ export declare type BrowserSandboxResult = {
20
+ ok: boolean;
21
+ projectRoot?: string;
22
+ provider?: string;
23
+ validation?: 'typecheck' | 'build' | 'write-policy-validation' | 'import-validation' | 'data-api-validation';
24
+ changedFiles?: string[];
25
+ summary?: string;
26
+ changes?: BrowserSandboxRevision['changes'];
27
+ files?: Array<{
28
+ path: string;
29
+ size: number;
30
+ }>;
31
+ generationMeta?: BrowserSandboxRevision['generationMeta'];
32
+ attempts?: Array<{
33
+ label: string;
34
+ ok: boolean;
35
+ command: {
36
+ command: string;
37
+ durationMs: number;
38
+ exitCode: number;
39
+ ok: boolean;
40
+ stdout: string;
41
+ stderr: string;
42
+ };
43
+ }>;
44
+ command?: {
45
+ command: string;
46
+ durationMs: number;
47
+ exitCode: number;
48
+ ok: boolean;
49
+ stdout: string;
50
+ stderr: string;
51
+ };
52
+ importValidation?: {
53
+ ok: boolean;
54
+ diagnostics: string[];
55
+ };
56
+ writePolicyValidation?: {
57
+ ok: boolean;
58
+ diagnostics: string[];
59
+ };
60
+ dataApiValidation?: {
61
+ ok: boolean;
62
+ diagnostics: string[];
63
+ };
64
+ telemetry?: {
65
+ contextFileCount?: number;
66
+ contextChars?: number;
67
+ generatedFileCount?: number;
68
+ generatedChars?: number;
69
+ repairAttempts?: number;
70
+ };
71
+ error?: string;
72
+ };
73
+
74
+ export declare type BrowserSandboxRevision = {
75
+ provider?: string;
76
+ summary?: string;
77
+ changes?: Array<{
78
+ kind: 'add' | 'edit' | 'remove';
79
+ label: string;
80
+ }>;
81
+ files: BrowserSandboxFile[];
82
+ plan?: BrowserSandboxFilePlan;
83
+ replaceExistingFiles?: boolean;
84
+ generationMeta?: {
85
+ model: string;
86
+ strategy: string;
87
+ reasoningEffort?: string;
88
+ durationMs: number;
89
+ outputChars?: number;
90
+ fallbackFrom?: {
91
+ strategy: string;
92
+ reason: string;
93
+ };
94
+ };
95
+ attemptLabel?: string;
96
+ };
97
+
98
+ export declare type BrowserSandboxRuntimeManifest = {
99
+ id: string;
100
+ name: string;
101
+ execution: 'browser-sandbox';
102
+ moduleSystem: string;
103
+ cssPipeline: {
104
+ mode: string;
105
+ status: string;
106
+ };
107
+ packages: Array<{
108
+ name: string;
109
+ source: 'host' | 'runtime' | 'shim' | 'fallback';
110
+ status: 'supported' | 'partial';
111
+ }>;
112
+ components: Array<{
113
+ name: string;
114
+ importPath: string;
115
+ sourceFile: string;
116
+ implementation: 'source' | 'shim';
117
+ dependencies: string[];
118
+ }>;
119
+ limits: {
120
+ writeScope: string[];
121
+ editableGlobs: string[];
122
+ unsupported: string[];
123
+ };
124
+ };
125
+
126
+ export declare type BrowserSandboxRuntimeModule = {
127
+ resetBrowserSandbox: (templateId?: string) => void;
128
+ readBrowserSandboxWorkspaceContext: () => BrowserSandboxWorkspaceContext;
129
+ readBrowserSandboxFiles: (paths: string[]) => BrowserSandboxFile[];
130
+ listBrowserSandboxFiles: () => Array<{
131
+ path: string;
132
+ size: number;
133
+ }>;
134
+ applyBrowserSandboxRevision: (revision: BrowserSandboxRevision) => BrowserSandboxResult;
135
+ compileBrowserSandboxPreviewHtml: () => Promise<{
136
+ html: string;
137
+ diagnostics: string[];
138
+ warnings?: string[];
139
+ cssMode?: 'tailwind' | 'fallback';
140
+ }>;
141
+ };
142
+
143
+ export declare type BrowserSandboxWorkspaceContext = {
144
+ projectRoot?: string;
145
+ framework?: string;
146
+ packageManager?: string;
147
+ runtimeManifest?: BrowserSandboxRuntimeManifest;
148
+ packageJson?: {
149
+ dependencies?: Record<string, string>;
150
+ devDependencies?: Record<string, string>;
151
+ scripts?: Record<string, string>;
152
+ };
153
+ componentsJson?: unknown;
154
+ tsconfig?: {
155
+ baseUrl?: string | null;
156
+ paths?: Record<string, string[]>;
157
+ jsx?: string | null;
158
+ strict?: boolean | null;
159
+ noUnusedLocals?: boolean | null;
160
+ noUnusedParameters?: boolean | null;
161
+ };
162
+ files?: {
163
+ source?: string[];
164
+ root?: string[];
165
+ editable?: string[];
166
+ editableGlobs?: string[];
167
+ approvalRequiredGlobs?: string[];
168
+ styleEntries?: string[];
169
+ localModules?: string[];
170
+ };
171
+ validation?: {
172
+ typecheck?: string | null;
173
+ build?: string | null;
174
+ };
175
+ capabilities?: unknown;
176
+ };
177
+
178
+ /**
179
+ * Lazily loads the browser execution runtime only when the user chooses
180
+ * in-browser app building. Keep this behind a dedicated subpath so ordinary
181
+ * dashboard and Analytics Hub consumers do not pay for runtime code.
182
+ */
183
+ export declare const loadSemaphorBrowserRuntime: BrowserRuntimeLoader;
184
+
185
+ export { }