react-semaphor 0.1.423 → 0.1.425

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 (105) hide show
  1. package/dist/analytics-protocol/index.cjs +1 -1
  2. package/dist/analytics-protocol/index.js +243 -91
  3. package/dist/appearance/index.cjs +1 -1
  4. package/dist/appearance/index.js +1 -1
  5. package/dist/brand-studio/index.cjs +2 -2
  6. package/dist/brand-studio/index.js +8 -8
  7. package/dist/chunks/{analyze-result-contract-D7pjjYPy.js → analyze-result-contract-DnfF8kBb.js} +434 -427
  8. package/dist/chunks/analyze-result-contract-ege_u6Nl.js +1 -0
  9. package/dist/chunks/{braces-8TRlDwDw.js → braces-BdbUk_r9.js} +1 -1
  10. package/dist/chunks/{braces-D2tStQjF.js → braces-CbO-aIwH.js} +1 -1
  11. package/dist/chunks/calendar-preferences-dialog-BLaSWhLl.js +1 -0
  12. package/dist/chunks/{calendar-preferences-dialog-t5ET6MON.js → calendar-preferences-dialog-DJwV0aqn.js} +4 -4
  13. package/dist/chunks/{catalog-field-grounding-CJKAqtiC.js → catalog-field-grounding-DcxPLns0.js} +10 -10
  14. package/dist/chunks/{switch-2bh3Hka1.js → code-editor-Bkk7s8hI.js} +7382 -6809
  15. package/dist/chunks/code-editor-CkXyNgYc.js +138 -0
  16. package/dist/chunks/{common-types-4bjoIgvm.js → common-types-ClkOI-3O.js} +4 -4
  17. package/dist/chunks/comparison-document-migration-CQJ0DZlL.js +414 -0
  18. package/dist/chunks/comparison-document-migration-Db64RWYD.js +1 -0
  19. package/dist/chunks/{index-yHe0SeLO.js → dashboard-5agU0G_D.js} +56752 -55440
  20. package/dist/chunks/dashboard-MKIqgGDp.js +1402 -0
  21. package/dist/chunks/{dashboard-briefing-launcher-S2akO-ub.js → dashboard-briefing-launcher-CII8-4qo.js} +11 -6
  22. package/dist/chunks/{dashboard-briefing-launcher-Cavd0QJb.js → dashboard-briefing-launcher-qyEVfuOm.js} +226 -209
  23. package/dist/chunks/dashboard-controls-PJpeYZHw.js +36 -0
  24. package/dist/chunks/dashboard-controls-aJY0FNPP.js +2196 -0
  25. package/dist/chunks/dashboard-input-contract-BFpERluO.js +18 -0
  26. package/dist/chunks/dashboard-input-contract-DV3cshjz.js +1 -0
  27. package/dist/chunks/{dashboard-json-Do2-pdPZ.js → dashboard-json-CzHSP6Fa.js} +16 -15
  28. package/dist/chunks/dashboard-json-DtmR5yCf.js +1 -0
  29. package/dist/chunks/date-formatter-BTTYdAik.js +1 -0
  30. package/dist/chunks/date-formatter-D-89jTjG.js +514 -0
  31. package/dist/chunks/{edit-dashboard-visual-Cw6bq4_w.js → edit-dashboard-visual-AkZzwBCV.js} +8892 -8996
  32. package/dist/chunks/edit-dashboard-visual-Cif6uDqN.js +182 -0
  33. package/dist/chunks/{index-CjzRe2su.js → index-CnujJ3fa.js} +3 -3
  34. package/dist/chunks/{index-DRlMUglg.js → index-Dpm_VET4.js} +2 -2
  35. package/dist/chunks/{index-CJdxSyQq.js → index-If0wlXGi.js} +308 -308
  36. package/dist/chunks/index-jSrCwPQz.js +31 -0
  37. package/dist/chunks/{x-CXDkqdur.js → index-xHCrHprY.js} +59 -59
  38. package/dist/chunks/{layout-grid-C0OI-MRn.js → layout-grid-B08pP7v6.js} +1 -1
  39. package/dist/chunks/{layout-grid-CiubineE.js → layout-grid-D5tYJg1-.js} +1 -1
  40. package/dist/chunks/metric-comparison-4oA4ouU9.js +354 -0
  41. package/dist/chunks/metric-comparison-nQKquVnx.js +1 -0
  42. package/dist/chunks/{palette-C4KTXOug.js → palette-C0yjT5Tv.js} +1 -1
  43. package/dist/chunks/{palette-Cp1hqZtm.js → palette-jqaAcwiQ.js} +1 -1
  44. package/dist/chunks/{save-DgMfP0j8.js → save-HCJjjzdX.js} +1 -1
  45. package/dist/chunks/{save-C__QggEE.js → save-Xdc4pnys.js} +1 -1
  46. package/dist/chunks/{search-BHsQIWBV.js → search-DHZCro8B.js} +1 -1
  47. package/dist/chunks/{search-DNCejM7Z.js → search-Dcud9ajy.js} +1 -1
  48. package/dist/chunks/{update-policy-C1pmhLz9.js → update-policy-BgONreNd.js} +1 -1
  49. package/dist/chunks/{update-policy-BCJc0oI5.js → update-policy-CY2k-pJP.js} +9 -9
  50. package/dist/chunks/{use-create-flow-overlay-state-5MDbZcs1.js → use-create-flow-overlay-state-ByOKVV2K.js} +62 -62
  51. package/dist/chunks/{use-create-flow-overlay-state-BNczg9Gj.js → use-create-flow-overlay-state-DmuReEnk.js} +2 -2
  52. package/dist/chunks/validators-B4VMLX3_.js +1 -0
  53. package/dist/chunks/{validators-PXkij33j.js → validators-Cz-XuORM.js} +123 -119
  54. package/dist/dashboard/index.cjs +1 -1
  55. package/dist/dashboard/index.js +2 -2
  56. package/dist/dashboard-authoring/index.cjs +2 -2
  57. package/dist/dashboard-authoring/index.js +6 -4
  58. package/dist/data-app-builder/index.cjs +6 -6
  59. package/dist/data-app-builder/index.js +5 -5
  60. package/dist/data-app-codegen/index.cjs +1 -1
  61. package/dist/data-app-codegen/index.js +2 -2
  62. package/dist/data-app-codegen-node/index.cjs +1 -1
  63. package/dist/data-app-codegen-node/index.js +3 -3
  64. package/dist/data-app-sdk/index.cjs +1 -1
  65. package/dist/data-app-sdk/index.js +6 -6
  66. package/dist/data-app-sdk-adapters/index.cjs +1 -1
  67. package/dist/data-app-sdk-adapters/index.js +1 -1
  68. package/dist/data-app-sdk-validation/index.cjs +1 -1
  69. package/dist/data-app-sdk-validation/index.js +65 -68
  70. package/dist/format-utils/index.cjs +2 -2
  71. package/dist/format-utils/index.js +59 -58
  72. package/dist/index.cjs +1 -1
  73. package/dist/index.js +19 -19
  74. package/dist/style.css +1 -1
  75. package/dist/surfboard/index.cjs +1 -1
  76. package/dist/surfboard/index.js +3 -3
  77. package/dist/types/analytics-protocol.d.ts +299 -3
  78. package/dist/types/brand-studio.d.ts +2 -2
  79. package/dist/types/briefings.d.ts +65 -41
  80. package/dist/types/dashboard-assistant.d.ts +28 -7
  81. package/dist/types/dashboard-authoring.d.ts +123 -43
  82. package/dist/types/dashboard.d.ts +97 -48
  83. package/dist/types/data-app-builder.d.ts +2 -2
  84. package/dist/types/data-app-sdk.d.ts +1 -1
  85. package/dist/types/format-utils.d.ts +98 -10
  86. package/dist/types/index.js +1 -1
  87. package/dist/types/main.d.ts +229 -95
  88. package/dist/types/shared.d.ts +84 -43
  89. package/dist/types/surfboard.d.ts +99 -49
  90. package/dist/types/types.d.ts +110 -50
  91. package/package.json +2 -1
  92. package/dist/chunks/analyze-result-contract-DpDcImgk.js +0 -1
  93. package/dist/chunks/calendar-preferences-dialog-CTmeASaM.js +0 -1
  94. package/dist/chunks/contracts-CoCOpd_i.js +0 -11
  95. package/dist/chunks/contracts-CtB2VONT.js +0 -1
  96. package/dist/chunks/dashboard-controls-BJLrErjW.js +0 -2322
  97. package/dist/chunks/dashboard-controls-DzbP8AXA.js +0 -52
  98. package/dist/chunks/dashboard-json-5tWb5KD6.js +0 -1
  99. package/dist/chunks/date-formatter-B4EBSe9C.js +0 -1
  100. package/dist/chunks/date-formatter-BlhBftA9.js +0 -416
  101. package/dist/chunks/edit-dashboard-visual-Yh5YFgMF.js +0 -178
  102. package/dist/chunks/index-BPM3gDRw.js +0 -1406
  103. package/dist/chunks/switch-DMT7qf_R.js +0 -138
  104. package/dist/chunks/validators-DMlVbd1p.js +0 -1
  105. package/dist/chunks/x-B6ghREd2.js +0 -31
@@ -26,6 +26,10 @@ export declare function arrayToCSV(rows: (string | number | null | undefined)[][
26
26
  */
27
27
  export declare function arrayToCSVRow(values: (string | number | null | undefined)[], delimiter?: string): string;
28
28
 
29
+ export declare type CanonicalDurationUnit = 'millisecond' | 'second' | 'minute' | 'hour' | 'day';
30
+
31
+ export declare type CanonicalFormatSpec = NumericCanonicalFormat | DateCanonicalFormat | DurationCanonicalFormat | StringCanonicalFormat;
32
+
29
33
  export declare interface ColorRange {
30
34
  min: number;
31
35
  max: number;
@@ -90,6 +94,17 @@ export declare interface CSVExportOptions {
90
94
  lineEnding: '\n' | '\r\n';
91
95
  }
92
96
 
97
+ export declare type DateCanonicalFormat = {
98
+ type: 'date';
99
+ locale?: string;
100
+ pattern?: string;
101
+ relative?: boolean;
102
+ timezone?: string;
103
+ sourceTimezone?: string;
104
+ prefix?: string;
105
+ suffix?: string;
106
+ };
107
+
93
108
  export declare interface DateFormatOptions {
94
109
  /** date-fns format pattern (e.g., "MM/dd/yyyy") */
95
110
  format: string;
@@ -107,6 +122,18 @@ export declare interface DateFormatOptions {
107
122
  locale?: string;
108
123
  }
109
124
 
125
+ export declare type DurationCanonicalFormat = {
126
+ type: 'duration';
127
+ inputUnit?: CanonicalDurationUnit;
128
+ outputStyle?: 'compact' | 'digital' | 'long';
129
+ largestUnit?: CanonicalDurationUnit;
130
+ smallestUnit?: CanonicalDurationUnit;
131
+ maxUnits?: number;
132
+ prefix?: string;
133
+ suffix?: string;
134
+ negativeStyle?: 'minus' | 'parentheses';
135
+ };
136
+
110
137
  export declare type DurationDisplayStyle = 'compact' | 'digital' | 'long';
111
138
 
112
139
  export declare interface DurationFormatOptions {
@@ -128,7 +155,7 @@ export declare interface DurationFormatOptions {
128
155
  negativeInParentheses?: boolean;
129
156
  }
130
157
 
131
- export declare type DurationUnit = 'millisecond' | 'second' | 'minute' | 'hour' | 'day';
158
+ export declare type DurationUnit = CanonicalDurationUnit;
132
159
 
133
160
  /**
134
161
  * Escape a value for CSV output (RFC 4180 compliant)
@@ -206,6 +233,15 @@ export declare const formatDate: (dateString: string | null | undefined, formatP
206
233
 
207
234
  export declare function formatDuration(value: number | string | null | undefined, options?: DurationFormatOptions): string;
208
235
 
236
+ export declare function formatMetricComparison(evaluation: MetricComparisonEvaluation, options: FormatMetricComparisonOptions): FormattedMetricComparison;
237
+
238
+ export declare type FormatMetricComparisonOptions = {
239
+ displayMode: MetricComparisonDisplayMode;
240
+ metricFormat?: CanonicalFormatSpec;
241
+ locale?: string;
242
+ precision?: number;
243
+ };
244
+
209
245
  /**
210
246
  * Format a number with locale-aware formatting
211
247
  */
@@ -286,6 +322,20 @@ export declare function formatScientific(value: number | null | undefined, optio
286
322
  */
287
323
  export declare function formatTableForCSV(data: Record<string, unknown>[], config: ExportFormattingConfig): string[];
288
324
 
325
+ export declare type FormattedMetricComparison = {
326
+ mode: MetricComparisonDisplayMode;
327
+ current: FormattedMetricComparisonPart;
328
+ comparison: FormattedMetricComparisonPart;
329
+ difference?: FormattedMetricComparisonPart;
330
+ percentChange?: FormattedMetricComparisonPart;
331
+ ratio?: FormattedMetricComparisonPart;
332
+ };
333
+
334
+ export declare type FormattedMetricComparisonPart = {
335
+ value: number | null;
336
+ text: string | null;
337
+ };
338
+
289
339
  /**
290
340
  * Generate headers for aggregate table export
291
341
  */
@@ -317,15 +367,23 @@ export declare interface GroupByField {
317
367
  label?: string;
318
368
  }
319
369
 
320
- /**
321
- * Shared format types for export system
322
- * IMPORTANT: No React imports allowed in this file
323
- *
324
- * These types are used by:
325
- * - react-semaphor (browser) for client-side exports
326
- * - semaphor-app (Next.js) for API routes
327
- * - Lambda (Node.js) for async export processing
328
- */
370
+ declare type MetricComparisonDirection = 'increase' | 'decrease' | 'no_change' | 'unknown';
371
+
372
+ export declare type MetricComparisonDisplayMode = 'difference' | 'percent_change' | 'both' | 'ratio';
373
+
374
+ declare type MetricComparisonEvaluation = {
375
+ status: 'available' | 'insufficient_history';
376
+ currentValue: number | null;
377
+ comparisonValue: number | null;
378
+ delta: number | null;
379
+ percentChange: number | null;
380
+ ratio: number | null;
381
+ direction: MetricComparisonDirection;
382
+ sentiment: MetricComparisonSentiment;
383
+ };
384
+
385
+ declare type MetricComparisonSentiment = 'favorable' | 'unfavorable' | 'neutral';
386
+
329
387
  export declare interface NumberFormatOptions {
330
388
  style: 'decimal' | 'currency' | 'percent' | 'scientific';
331
389
  locale?: string;
@@ -346,6 +404,30 @@ export declare interface NumberFormatOptions {
346
404
  useSuffix?: boolean;
347
405
  }
348
406
 
407
+ /**
408
+ * Shared format types for export system
409
+ * IMPORTANT: No React imports allowed in this file
410
+ *
411
+ * These types are used by:
412
+ * - react-semaphor (browser) for client-side exports
413
+ * - semaphor-app (Next.js) for API routes
414
+ * - Lambda (Node.js) for async export processing
415
+ */
416
+ export declare type NumericCanonicalFormat = {
417
+ type: 'number' | 'currency' | 'percent' | 'scientific';
418
+ locale?: string;
419
+ minimumFractionDigits?: number;
420
+ maximumFractionDigits?: number;
421
+ useGrouping?: boolean;
422
+ prefix?: string;
423
+ suffix?: string;
424
+ negativeStyle?: 'minus' | 'parentheses';
425
+ compact?: boolean;
426
+ scale?: number;
427
+ currency?: string;
428
+ percentValueMode?: 'fraction' | 'whole';
429
+ };
430
+
349
431
  /**
350
432
  * Convert an array of objects to CSV string
351
433
  */
@@ -425,4 +507,10 @@ export declare interface RowAggregate {
425
507
  label?: string;
426
508
  }
427
509
 
510
+ export declare type StringCanonicalFormat = {
511
+ type: 'string';
512
+ prefix?: string;
513
+ suffix?: string;
514
+ };
515
+
428
516
  export { }
@@ -1,4 +1,4 @@
1
- import { a as C, C as l, D as t, E as A, P as T, g as _, d as i, h as o, b as r, c as D, i as L } from "../chunks/common-types-4bjoIgvm.js";
1
+ import { a as C, C as l, D as t, E as A, P as T, g as _, h as i, b as o, i as r, c as D, d as L } from "../chunks/common-types-ClkOI-3O.js";
2
2
  const a = {
3
3
  mode: "all"
4
4
  }, e = {