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.
- package/dist/analytics-protocol/index.cjs +1 -1
- package/dist/analytics-protocol/index.js +243 -91
- package/dist/appearance/index.cjs +1 -1
- package/dist/appearance/index.js +1 -1
- package/dist/brand-studio/index.cjs +2 -2
- package/dist/brand-studio/index.js +8 -8
- package/dist/chunks/{analyze-result-contract-D7pjjYPy.js → analyze-result-contract-DnfF8kBb.js} +434 -427
- package/dist/chunks/analyze-result-contract-ege_u6Nl.js +1 -0
- package/dist/chunks/{braces-8TRlDwDw.js → braces-BdbUk_r9.js} +1 -1
- package/dist/chunks/{braces-D2tStQjF.js → braces-CbO-aIwH.js} +1 -1
- package/dist/chunks/calendar-preferences-dialog-BLaSWhLl.js +1 -0
- package/dist/chunks/{calendar-preferences-dialog-t5ET6MON.js → calendar-preferences-dialog-DJwV0aqn.js} +4 -4
- package/dist/chunks/{catalog-field-grounding-CJKAqtiC.js → catalog-field-grounding-DcxPLns0.js} +10 -10
- package/dist/chunks/{switch-2bh3Hka1.js → code-editor-Bkk7s8hI.js} +7382 -6809
- package/dist/chunks/code-editor-CkXyNgYc.js +138 -0
- package/dist/chunks/{common-types-4bjoIgvm.js → common-types-ClkOI-3O.js} +4 -4
- package/dist/chunks/comparison-document-migration-CQJ0DZlL.js +414 -0
- package/dist/chunks/comparison-document-migration-Db64RWYD.js +1 -0
- package/dist/chunks/{index-yHe0SeLO.js → dashboard-5agU0G_D.js} +56752 -55440
- package/dist/chunks/dashboard-MKIqgGDp.js +1402 -0
- package/dist/chunks/{dashboard-briefing-launcher-S2akO-ub.js → dashboard-briefing-launcher-CII8-4qo.js} +11 -6
- package/dist/chunks/{dashboard-briefing-launcher-Cavd0QJb.js → dashboard-briefing-launcher-qyEVfuOm.js} +226 -209
- package/dist/chunks/dashboard-controls-PJpeYZHw.js +36 -0
- package/dist/chunks/dashboard-controls-aJY0FNPP.js +2196 -0
- package/dist/chunks/dashboard-input-contract-BFpERluO.js +18 -0
- package/dist/chunks/dashboard-input-contract-DV3cshjz.js +1 -0
- package/dist/chunks/{dashboard-json-Do2-pdPZ.js → dashboard-json-CzHSP6Fa.js} +16 -15
- package/dist/chunks/dashboard-json-DtmR5yCf.js +1 -0
- package/dist/chunks/date-formatter-BTTYdAik.js +1 -0
- package/dist/chunks/date-formatter-D-89jTjG.js +514 -0
- package/dist/chunks/{edit-dashboard-visual-Cw6bq4_w.js → edit-dashboard-visual-AkZzwBCV.js} +8892 -8996
- package/dist/chunks/edit-dashboard-visual-Cif6uDqN.js +182 -0
- package/dist/chunks/{index-CjzRe2su.js → index-CnujJ3fa.js} +3 -3
- package/dist/chunks/{index-DRlMUglg.js → index-Dpm_VET4.js} +2 -2
- package/dist/chunks/{index-CJdxSyQq.js → index-If0wlXGi.js} +308 -308
- package/dist/chunks/index-jSrCwPQz.js +31 -0
- package/dist/chunks/{x-CXDkqdur.js → index-xHCrHprY.js} +59 -59
- package/dist/chunks/{layout-grid-C0OI-MRn.js → layout-grid-B08pP7v6.js} +1 -1
- package/dist/chunks/{layout-grid-CiubineE.js → layout-grid-D5tYJg1-.js} +1 -1
- package/dist/chunks/metric-comparison-4oA4ouU9.js +354 -0
- package/dist/chunks/metric-comparison-nQKquVnx.js +1 -0
- package/dist/chunks/{palette-C4KTXOug.js → palette-C0yjT5Tv.js} +1 -1
- package/dist/chunks/{palette-Cp1hqZtm.js → palette-jqaAcwiQ.js} +1 -1
- package/dist/chunks/{save-DgMfP0j8.js → save-HCJjjzdX.js} +1 -1
- package/dist/chunks/{save-C__QggEE.js → save-Xdc4pnys.js} +1 -1
- package/dist/chunks/{search-BHsQIWBV.js → search-DHZCro8B.js} +1 -1
- package/dist/chunks/{search-DNCejM7Z.js → search-Dcud9ajy.js} +1 -1
- package/dist/chunks/{update-policy-C1pmhLz9.js → update-policy-BgONreNd.js} +1 -1
- package/dist/chunks/{update-policy-BCJc0oI5.js → update-policy-CY2k-pJP.js} +9 -9
- package/dist/chunks/{use-create-flow-overlay-state-5MDbZcs1.js → use-create-flow-overlay-state-ByOKVV2K.js} +62 -62
- package/dist/chunks/{use-create-flow-overlay-state-BNczg9Gj.js → use-create-flow-overlay-state-DmuReEnk.js} +2 -2
- package/dist/chunks/validators-B4VMLX3_.js +1 -0
- package/dist/chunks/{validators-PXkij33j.js → validators-Cz-XuORM.js} +123 -119
- package/dist/dashboard/index.cjs +1 -1
- package/dist/dashboard/index.js +2 -2
- package/dist/dashboard-authoring/index.cjs +2 -2
- package/dist/dashboard-authoring/index.js +6 -4
- package/dist/data-app-builder/index.cjs +6 -6
- package/dist/data-app-builder/index.js +5 -5
- package/dist/data-app-codegen/index.cjs +1 -1
- package/dist/data-app-codegen/index.js +2 -2
- package/dist/data-app-codegen-node/index.cjs +1 -1
- package/dist/data-app-codegen-node/index.js +3 -3
- package/dist/data-app-sdk/index.cjs +1 -1
- package/dist/data-app-sdk/index.js +6 -6
- package/dist/data-app-sdk-adapters/index.cjs +1 -1
- package/dist/data-app-sdk-adapters/index.js +1 -1
- package/dist/data-app-sdk-validation/index.cjs +1 -1
- package/dist/data-app-sdk-validation/index.js +65 -68
- package/dist/format-utils/index.cjs +2 -2
- package/dist/format-utils/index.js +59 -58
- package/dist/index.cjs +1 -1
- package/dist/index.js +19 -19
- package/dist/style.css +1 -1
- package/dist/surfboard/index.cjs +1 -1
- package/dist/surfboard/index.js +3 -3
- package/dist/types/analytics-protocol.d.ts +299 -3
- package/dist/types/brand-studio.d.ts +2 -2
- package/dist/types/briefings.d.ts +65 -41
- package/dist/types/dashboard-assistant.d.ts +28 -7
- package/dist/types/dashboard-authoring.d.ts +123 -43
- package/dist/types/dashboard.d.ts +97 -48
- package/dist/types/data-app-builder.d.ts +2 -2
- package/dist/types/data-app-sdk.d.ts +1 -1
- package/dist/types/format-utils.d.ts +98 -10
- package/dist/types/index.js +1 -1
- package/dist/types/main.d.ts +229 -95
- package/dist/types/shared.d.ts +84 -43
- package/dist/types/surfboard.d.ts +99 -49
- package/dist/types/types.d.ts +110 -50
- package/package.json +2 -1
- package/dist/chunks/analyze-result-contract-DpDcImgk.js +0 -1
- package/dist/chunks/calendar-preferences-dialog-CTmeASaM.js +0 -1
- package/dist/chunks/contracts-CoCOpd_i.js +0 -11
- package/dist/chunks/contracts-CtB2VONT.js +0 -1
- package/dist/chunks/dashboard-controls-BJLrErjW.js +0 -2322
- package/dist/chunks/dashboard-controls-DzbP8AXA.js +0 -52
- package/dist/chunks/dashboard-json-5tWb5KD6.js +0 -1
- package/dist/chunks/date-formatter-B4EBSe9C.js +0 -1
- package/dist/chunks/date-formatter-BlhBftA9.js +0 -416
- package/dist/chunks/edit-dashboard-visual-Yh5YFgMF.js +0 -178
- package/dist/chunks/index-BPM3gDRw.js +0 -1406
- package/dist/chunks/switch-DMT7qf_R.js +0 -138
- package/dist/chunks/validators-DMlVbd1p.js +0 -1
- 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 =
|
|
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
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
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 { }
|
package/dist/types/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as C, C as l, D as t, E as A, P as T, g as _,
|
|
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 = {
|