react-semaphor 0.1.453 → 0.1.454

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 (115) hide show
  1. package/dist/analytics-protocol/index.cjs +1 -1
  2. package/dist/analytics-protocol/index.js +100 -99
  3. package/dist/brand-studio/index.cjs +1 -1
  4. package/dist/brand-studio/index.js +4 -4
  5. package/dist/briefings/index.cjs +1 -1
  6. package/dist/briefings/index.js +4 -4
  7. package/dist/chunks/{analyze-result-contract-GHKFwThg.js → analyze-result-contract-BbRJ-C06.js} +1 -1
  8. package/dist/chunks/{analyze-result-contract-Dxw66nUG.cjs → analyze-result-contract-LPDNldic.cjs} +1 -1
  9. package/dist/chunks/canonical-result-keys-BA0HCP4e.cjs +1 -0
  10. package/dist/chunks/{canonical-result-keys-KLk__J_O.js → canonical-result-keys-D6avdjpA.js} +14 -13
  11. package/dist/chunks/{common-types-Ci66eflG.cjs → common-types-C57kJ59w.cjs} +1 -1
  12. package/dist/chunks/{common-types-F6qk6PPS.js → common-types-H51FLKB7.js} +1 -1
  13. package/dist/chunks/{dashboard-briefing-launcher-mUXWuiOZ.cjs → dashboard-briefing-launcher-Dwj1i7lr.cjs} +1 -1
  14. package/dist/chunks/{dashboard-briefing-launcher-CFpX0WX3.js → dashboard-briefing-launcher-SYroFdae.js} +10 -10
  15. package/dist/chunks/{dashboard-controls-BeYAmOJc.js → dashboard-controls-1LpeU2sz.js} +10 -10
  16. package/dist/chunks/{dashboard-controls-SoNubIu1.cjs → dashboard-controls-CpFoh7-A.cjs} +1 -1
  17. package/dist/chunks/dashboard-date-comparison-definition-Ces4alFm.cjs +1 -0
  18. package/dist/chunks/{dashboard-date-comparison-definition-Ba-clViK.js → dashboard-date-comparison-definition-DC3ekV2S.js} +1 -1
  19. package/dist/chunks/{dashboard-json-DeLUagVV.js → dashboard-json-D-T-sQxU.js} +8 -8
  20. package/dist/chunks/{dashboard-json-BublPnQ4.cjs → dashboard-json-DwSQopc_.cjs} +1 -1
  21. package/dist/chunks/{edit-dashboard-visual-CrvPcO7A.cjs → edit-dashboard-visual-BEmoQAET.cjs} +1 -1
  22. package/dist/chunks/{edit-dashboard-visual-Go0h82DR.js → edit-dashboard-visual-DqxUq4Bs.js} +12 -12
  23. package/dist/chunks/{editor-action-buttons-1Lo0fIh7.cjs → editor-action-buttons-18r2xwei.cjs} +1 -1
  24. package/dist/chunks/{editor-action-buttons-BFNtjFzO.js → editor-action-buttons-B2l3WIRC.js} +6 -6
  25. package/dist/chunks/index-Bn5wlkHt.cjs +4 -0
  26. package/dist/chunks/{index-q12_nNUS.cjs → index-CLB_NGZ8.cjs} +231 -231
  27. package/dist/chunks/{index-B3ZugihZ.js → index-Ca784dpx.js} +93 -92
  28. package/dist/chunks/{index-BsH32bn1.js → index-DAoS4BNU.js} +36188 -35785
  29. package/dist/chunks/matrix-result-contract-CofATICL.js +437 -0
  30. package/dist/chunks/matrix-result-contract-zamd9euI.cjs +1 -0
  31. package/dist/chunks/{pivot-header-presentation-DcfPaCiy.cjs → pivot-header-presentation-DhyQXxKq.cjs} +1 -1
  32. package/dist/chunks/{pivot-header-presentation-nk604qc1.js → pivot-header-presentation-ckYOQ4aZ.js} +2 -2
  33. package/dist/chunks/{pivot-result-identity-CRUokNgm.cjs → pivot-result-identity-Bb4EixVN.cjs} +1 -1
  34. package/dist/chunks/{pivot-result-identity-C43Ai5Kr.js → pivot-result-identity-DU1v-5Xk.js} +1 -1
  35. package/dist/chunks/pivot-result-lifecycle-DmcF1ris.cjs +1 -0
  36. package/dist/chunks/{pivot-result-lifecycle-4kSe0Hk1.js → pivot-result-lifecycle-sjzIOpvp.js} +57 -58
  37. package/dist/chunks/{raw-temporal-contract-CxbRFwnd.cjs → raw-temporal-contract-BtjH_G-d.cjs} +1 -1
  38. package/dist/chunks/{raw-temporal-contract-BF7PjBY9.js → raw-temporal-contract-CxncLze5.js} +1 -1
  39. package/dist/chunks/{report-preferences-dialog-BEVZAE3m.cjs → report-preferences-dialog-BgSvlDXa.cjs} +1 -1
  40. package/dist/chunks/{report-preferences-dialog-BNV7qXYH.js → report-preferences-dialog-DDc2WUa0.js} +6 -6
  41. package/dist/chunks/{report-runtime-context-DjYqLV-c.cjs → report-runtime-context-DqxS4wbi.cjs} +1 -1
  42. package/dist/chunks/{report-runtime-context-BJQDu2fV.js → report-runtime-context-SM6YO61_.js} +5 -5
  43. package/dist/chunks/saved-temporal-bucket-format-CFfWXRl9.cjs +1 -0
  44. package/dist/chunks/{saved-temporal-bucket-format-DiZdQXOL.js → saved-temporal-bucket-format-SGAV0ivR.js} +33 -35
  45. package/dist/chunks/{switch-DgLwr7O-.js → switch-BeZW-HnS.js} +367 -369
  46. package/dist/chunks/{switch-CjJ6FHYJ.cjs → switch-D-CCcfhc.cjs} +28 -28
  47. package/dist/chunks/temporal-bucket-5UYEotyQ.js +810 -0
  48. package/dist/chunks/temporal-bucket-DHY1y9lq.cjs +1 -0
  49. package/dist/chunks/{temporal-bucket-authoring-FIRnJz0e.js → temporal-bucket-authoring-K1kE6R_z.js} +28 -27
  50. package/dist/chunks/temporal-bucket-authoring-o3Emn05L.cjs +1 -0
  51. package/dist/chunks/{temporal-bucket-contract-anl4h-vg.cjs → temporal-bucket-contract-D2-93DGr.cjs} +1 -1
  52. package/dist/chunks/{temporal-bucket-contract-BQOj6Frl.js → temporal-bucket-contract-D5d-xEl3.js} +1 -1
  53. package/dist/chunks/{token-types-D0i0IUX3.cjs → token-types-D7CaaI80.cjs} +1 -1
  54. package/dist/chunks/{token-types-CRpQJ4kv.js → token-types-GbxRUozo.js} +1 -1
  55. package/dist/chunks/{update-policy-C1i9bgsy.cjs → update-policy-BmiOd0PB.cjs} +1 -1
  56. package/dist/chunks/{update-policy-CaJz9aPG.js → update-policy-hednMF-0.js} +1 -1
  57. package/dist/chunks/validators-BDYprKI9.cjs +1 -0
  58. package/dist/chunks/{validators-DeMXwRON.js → validators-DEmd8Sin.js} +1544 -1200
  59. package/dist/dashboard/index.cjs +1 -1
  60. package/dist/dashboard/index.js +2 -2
  61. package/dist/dashboard-authoring/index.cjs +3 -3
  62. package/dist/dashboard-authoring/index.js +7 -7
  63. package/dist/data-app-builder/index.cjs +1 -1
  64. package/dist/data-app-builder/index.js +2 -2
  65. package/dist/data-app-codegen/index.cjs +1 -1
  66. package/dist/data-app-codegen/index.js +2 -2
  67. package/dist/data-app-codegen-node/index.cjs +1 -1
  68. package/dist/data-app-codegen-node/index.js +3 -3
  69. package/dist/data-app-sdk/index.cjs +1 -1
  70. package/dist/data-app-sdk/index.js +78 -77
  71. package/dist/data-app-sdk-adapters/index.cjs +1 -1
  72. package/dist/data-app-sdk-adapters/index.js +29 -30
  73. package/dist/data-app-sdk-validation/index.cjs +1 -1
  74. package/dist/data-app-sdk-validation/index.js +21 -21
  75. package/dist/format-utils/index.cjs +3 -3
  76. package/dist/format-utils/index.js +39 -40
  77. package/dist/index.cjs +1 -1
  78. package/dist/index.js +15 -15
  79. package/dist/report-runtime-context/index.cjs +1 -1
  80. package/dist/report-runtime-context/index.js +2 -2
  81. package/dist/surfboard/index.cjs +1 -1
  82. package/dist/surfboard/index.js +3 -3
  83. package/dist/types/analytics-protocol.d.ts +44 -11
  84. package/dist/types/briefings.d.ts +9 -12
  85. package/dist/types/dashboard-assistant.d.ts +19 -17
  86. package/dist/types/dashboard-authoring.d.ts +9 -12
  87. package/dist/types/dashboard.d.ts +9 -12
  88. package/dist/types/data-app-builder.d.ts +28 -2
  89. package/dist/types/data-app-codegen-node.d.ts +29 -3
  90. package/dist/types/data-app-codegen.d.ts +29 -3
  91. package/dist/types/data-app-sdk-adapters.d.ts +28 -2
  92. package/dist/types/data-app-sdk-validation.d.ts +38 -7
  93. package/dist/types/data-app-sdk.d.ts +42 -10
  94. package/dist/types/index.cjs +1 -1
  95. package/dist/types/index.js +4 -4
  96. package/dist/types/main.d.ts +25 -21
  97. package/dist/types/shared.d.ts +9 -12
  98. package/dist/types/surfboard.d.ts +9 -12
  99. package/dist/types/types.d.ts +19 -17
  100. package/package.json +1 -1
  101. package/dist/chunks/canonical-result-keys-Drc2x-lf.cjs +0 -1
  102. package/dist/chunks/catalog-field-grounding-Bnx-3tE0.cjs +0 -1
  103. package/dist/chunks/catalog-field-grounding-S2jKwKGD.js +0 -100
  104. package/dist/chunks/dashboard-date-comparison-definition-DZq0htjG.cjs +0 -1
  105. package/dist/chunks/dashboard-input-contract-DSt8dGzP.js +0 -18
  106. package/dist/chunks/dashboard-input-contract-DV3cshjz.cjs +0 -1
  107. package/dist/chunks/index-DjiIh_9n.cjs +0 -4
  108. package/dist/chunks/metric-comparison-D0T0MKRK.js +0 -387
  109. package/dist/chunks/metric-comparison-DYR3RXam.cjs +0 -1
  110. package/dist/chunks/pivot-result-lifecycle-BiJepH5S.cjs +0 -1
  111. package/dist/chunks/saved-temporal-bucket-format-Gfbh4IiP.cjs +0 -1
  112. package/dist/chunks/temporal-bucket-Dnj8qT9l.cjs +0 -1
  113. package/dist/chunks/temporal-bucket-FBZGrDCe.js +0 -560
  114. package/dist/chunks/temporal-bucket-authoring-7hv2laOG.cjs +0 -1
  115. package/dist/chunks/validators-Dm7Kpz6p.cjs +0 -1
@@ -235,6 +235,7 @@ export declare type MatrixAxisLevelDescriptor = {
235
235
  label: string;
236
236
  field: SemaphorFieldRef;
237
237
  grain?: SemaphorMatrixTimeGrain;
238
+ temporalBucket?: TemporalBucketMetadata;
238
239
  subtotal?: SemaphorMatrixSubtotalOptions;
239
240
  };
240
241
 
@@ -355,7 +356,8 @@ export declare type MatrixGridCell = {
355
356
 
356
357
  export declare type MatrixGridColumn = {
357
358
  id: string;
358
- label: string;
359
+ /** Present only for measure and explicit total headings. */
360
+ label?: string;
359
361
  columnNodeId?: string;
360
362
  columnPath: MatrixMemberPathSegment[];
361
363
  measureInstanceId: string;
@@ -364,7 +366,8 @@ export declare type MatrixGridColumn = {
364
366
 
365
367
  export declare type MatrixGridHeaderCell = {
366
368
  id: string;
367
- label: string;
369
+ /** Present only for non-member headings and explicit total labels. */
370
+ label?: string;
368
371
  role: 'rowHeader' | 'columnHeader' | 'measureHeader' | 'subtotal' | 'grandTotal';
369
372
  colSpan: number;
370
373
  rowSpan: number;
@@ -378,7 +381,7 @@ export declare type MatrixGridHeaderRow = {
378
381
  };
379
382
 
380
383
  export declare type MatrixGridProjection = {
381
- schemaVersion: 1;
384
+ schemaVersion: 2;
382
385
  shape: MatrixShape;
383
386
  rowHeaderLevels: MatrixGridRowHeaderLevel[];
384
387
  columnHeaderRows: MatrixGridHeaderRow[];
@@ -391,7 +394,8 @@ export declare type MatrixGridRow = {
391
394
  rowNodeId: string;
392
395
  rowPath: MatrixMemberPathSegment[];
393
396
  depth: number;
394
- label: string;
397
+ /** Present only for non-temporal members and explicit total labels. */
398
+ label?: string;
395
399
  role: 'value' | 'rowSubtotal' | 'rowGrandTotal';
396
400
  isExpanded?: boolean;
397
401
  hasChildren?: boolean;
@@ -447,7 +451,8 @@ export declare type MatrixMemberPathSegment = {
447
451
  instanceId: string;
448
452
  fieldKey: string;
449
453
  value: unknown;
450
- label: string;
454
+ /** Display-only source label for non-temporal members. */
455
+ label?: string;
451
456
  };
452
457
 
453
458
  export declare type MatrixNode = {
@@ -455,7 +460,8 @@ export declare type MatrixNode = {
455
460
  axis: 'row' | 'column';
456
461
  path: MatrixMemberPathSegment[];
457
462
  level: number;
458
- label: string;
463
+ /** Present only for non-temporal members and explicit total labels. */
464
+ label?: string;
459
465
  value: unknown;
460
466
  parentId?: string;
461
467
  hasChildren: boolean;
@@ -484,7 +490,7 @@ export declare type MatrixPageInfo = {
484
490
 
485
491
  export declare type MatrixPayload = {
486
492
  kind: 'matrixPayload';
487
- schemaVersion: 1;
493
+ schemaVersion: 2;
488
494
  shape: MatrixShape;
489
495
  capabilities: MatrixCapability[];
490
496
  executionMetadata: MatrixExecutionMetadata;
@@ -527,6 +533,18 @@ export declare type MatrixResultCell = {
527
533
  calculationId?: string;
528
534
  };
529
535
 
536
+ export declare class MatrixResultContractError extends Error {
537
+ readonly code: MatrixResultContractErrorCode;
538
+ readonly path?: string;
539
+ constructor(input: {
540
+ code: MatrixResultContractErrorCode;
541
+ message: string;
542
+ path?: string;
543
+ });
544
+ }
545
+
546
+ export declare type MatrixResultContractErrorCode = 'invalid_matrix_result_contract' | 'unsupported_matrix_result_version';
547
+
530
548
  export declare type MatrixShape = 'hierarchical' | 'pivot';
531
549
 
532
550
  export declare type MatrixTotals = {
@@ -669,6 +687,14 @@ export declare function normalizeSemaphorDialect(input: string | undefined): Sem
669
687
 
670
688
  export declare function normalizeSemaphorInputOperator(value: SemaphorInputOperator | string | null | undefined): SemaphorInputOperator | undefined;
671
689
 
690
+ /**
691
+ * The only serialized Matrix result boundary. It validates the structural
692
+ * schema and the cross-field identity invariants that a shape-only schema
693
+ * cannot express. Callers pass the returned object to downstream consumers;
694
+ * they do not inspect or reconstruct unparsed Matrix envelopes.
695
+ */
696
+ export declare function parseCanonicalMatrixResult(input: unknown): SemaphorMatrixResult;
697
+
672
698
  /** Strictly parses one raw temporal descriptor at a result boundary. */
673
699
  export declare function parseRawTemporalValueMetadata(input: unknown): RawTemporalValueMetadata;
674
700
 
@@ -2677,7 +2703,7 @@ export declare type SemaphorDataAppCodegenMatrixIntent = {
2677
2703
 
2678
2704
  export declare type SemaphorDataAppCodegenMatrixSortRule = Omit<SemaphorMatrixSortRule, 'by'> & {
2679
2705
  by: {
2680
- kind: 'label';
2706
+ kind: 'member';
2681
2707
  } | {
2682
2708
  kind: 'field';
2683
2709
  field: SemaphorDataAppCodegenFieldRef;
@@ -3244,6 +3270,8 @@ export declare type SemaphorMatrixAxisLevel = {
3244
3270
  id?: string;
3245
3271
  field: SemaphorFieldRef;
3246
3272
  grain?: SemaphorMatrixTimeGrain;
3273
+ format?: TemporalBucketFormat;
3274
+ semanticTemporalPresentation?: SemaphorMatrixSemanticTemporalPresentation;
3247
3275
  label?: string;
3248
3276
  subtotal?: boolean | SemaphorMatrixSubtotalOptions;
3249
3277
  sortBy?: SemaphorMatrixAxisSortRule;
@@ -3252,7 +3280,7 @@ export declare type SemaphorMatrixAxisLevel = {
3252
3280
  export declare type SemaphorMatrixAxisSortRule = {
3253
3281
  direction: 'asc' | 'desc';
3254
3282
  by: {
3255
- kind: 'label';
3283
+ kind: 'member';
3256
3284
  } | {
3257
3285
  kind: 'field';
3258
3286
  field: SemaphorFieldRef;
@@ -3309,7 +3337,7 @@ export declare type SemaphorMatrixMemberPathSegment = {
3309
3337
 
3310
3338
  export declare type SemaphorMatrixResult = SemaphorAnalyticsResultBase & {
3311
3339
  kind: 'matrix';
3312
- schemaVersion: 1;
3340
+ schemaVersion: 2;
3313
3341
  intent?: SemaphorMatrixIntent;
3314
3342
  shape: MatrixShape;
3315
3343
  capabilities: MatrixCapability[];
@@ -3333,12 +3361,17 @@ export declare type SemaphorMatrixResult = SemaphorAnalyticsResultBase & {
3333
3361
 
3334
3362
  export declare const semaphorMatrixResultSchema: z.ZodType<SemaphorMatrixResult>;
3335
3363
 
3364
+ export declare type SemaphorMatrixSemanticTemporalPresentation = {
3365
+ granularity: SemaphorMatrixTimeGrain;
3366
+ format: TemporalBucketFormat;
3367
+ };
3368
+
3336
3369
  export declare type SemaphorMatrixSortRule = {
3337
3370
  axis: 'row' | 'column';
3338
3371
  targetId?: string;
3339
3372
  direction: 'asc' | 'desc';
3340
3373
  by: {
3341
- kind: 'label';
3374
+ kind: 'member';
3342
3375
  } | {
3343
3376
  kind: 'field';
3344
3377
  field: SemaphorFieldRef;
@@ -1917,11 +1917,6 @@ declare interface GroupByColumn extends BaseColumn {
1917
1917
  declare interface GroupByField extends Field {
1918
1918
  role: 'groupby';
1919
1919
  granularity?: TimeGranularity;
1920
- /**
1921
- * Query transport policy for grouped temporal values. This is projected
1922
- * into executable card config and is not persisted authoring state.
1923
- */
1924
- dateValueMode?: 'canonical' | 'formatted';
1925
1920
  /**
1926
1921
  * Optional SQL expression for grouping (e.g., DATE_TRUNC('month', order_date)).
1927
1922
  * If present, used in SELECT and GROUP BY instead of just the column name.
@@ -2256,11 +2251,6 @@ declare interface PivotByField extends Field {
2256
2251
  * so existing cards need no migration.
2257
2252
  */
2258
2253
  memberOrder?: PivotMemberOrder;
2259
- /**
2260
- * Query transport policy for grouped temporal pivot members. This is
2261
- * projected into executable config and is never persisted authoring state.
2262
- */
2263
- dateValueMode?: 'canonical' | 'formatted';
2264
2254
  }
2265
2255
 
2266
2256
  /**
@@ -2558,6 +2548,8 @@ declare type SemaphorMatrixAxisLevel = {
2558
2548
  id?: string;
2559
2549
  field: SemaphorFieldRef;
2560
2550
  grain?: SemaphorMatrixTimeGrain;
2551
+ format?: TemporalBucketFormat;
2552
+ semanticTemporalPresentation?: SemaphorMatrixSemanticTemporalPresentation;
2561
2553
  label?: string;
2562
2554
  subtotal?: boolean | SemaphorMatrixSubtotalOptions;
2563
2555
  sortBy?: SemaphorMatrixAxisSortRule;
@@ -2566,7 +2558,7 @@ declare type SemaphorMatrixAxisLevel = {
2566
2558
  declare type SemaphorMatrixAxisSortRule = {
2567
2559
  direction: 'asc' | 'desc';
2568
2560
  by: {
2569
- kind: 'label';
2561
+ kind: 'member';
2570
2562
  } | {
2571
2563
  kind: 'field';
2572
2564
  field: SemaphorFieldRef;
@@ -2621,12 +2613,17 @@ declare type SemaphorMatrixMemberPathSegment = {
2621
2613
  value: unknown;
2622
2614
  };
2623
2615
 
2616
+ declare type SemaphorMatrixSemanticTemporalPresentation = {
2617
+ granularity: SemaphorMatrixTimeGrain;
2618
+ format: TemporalBucketFormat;
2619
+ };
2620
+
2624
2621
  declare type SemaphorMatrixSortRule = {
2625
2622
  axis: 'row' | 'column';
2626
2623
  targetId?: string;
2627
2624
  direction: 'asc' | 'desc';
2628
2625
  by: {
2629
- kind: 'label';
2626
+ kind: 'member';
2630
2627
  } | {
2631
2628
  kind: 'field';
2632
2629
  field: SemaphorFieldRef;
@@ -538,11 +538,6 @@ declare type FormatSpec = {
538
538
  declare interface GroupByField extends Field {
539
539
  role: 'groupby';
540
540
  granularity?: TimeGranularity;
541
- /**
542
- * Query transport policy for grouped temporal values. This is projected
543
- * into executable card config and is not persisted authoring state.
544
- */
545
- dateValueMode?: 'canonical' | 'formatted';
546
541
  /**
547
542
  * Optional SQL expression for grouping (e.g., DATE_TRUNC('month', order_date)).
548
543
  * If present, used in SELECT and GROUP BY instead of just the column name.
@@ -629,6 +624,7 @@ declare type MatrixAxisLevelDescriptor = {
629
624
  label: string;
630
625
  field: SemaphorFieldRef;
631
626
  grain?: SemaphorMatrixTimeGrain;
627
+ temporalBucket?: TemporalBucketMetadata;
632
628
  subtotal?: SemaphorMatrixSubtotalOptions;
633
629
  };
634
630
 
@@ -703,7 +699,8 @@ declare type MatrixFormattingContext = {
703
699
 
704
700
  declare type MatrixGridColumn = {
705
701
  id: string;
706
- label: string;
702
+ /** Present only for measure and explicit total headings. */
703
+ label?: string;
707
704
  columnNodeId?: string;
708
705
  columnPath: MatrixMemberPathSegment[];
709
706
  measureInstanceId: string;
@@ -712,7 +709,8 @@ declare type MatrixGridColumn = {
712
709
 
713
710
  declare type MatrixGridHeaderCell = {
714
711
  id: string;
715
- label: string;
712
+ /** Present only for non-member headings and explicit total labels. */
713
+ label?: string;
716
714
  role: 'rowHeader' | 'columnHeader' | 'measureHeader' | 'subtotal' | 'grandTotal';
717
715
  colSpan: number;
718
716
  rowSpan: number;
@@ -774,7 +772,8 @@ declare type MatrixMemberPathSegment = {
774
772
  instanceId: string;
775
773
  fieldKey: string;
776
774
  value: unknown;
777
- label: string;
775
+ /** Display-only source label for non-temporal members. */
776
+ label?: string;
778
777
  };
779
778
 
780
779
  declare type MatrixNode = {
@@ -782,7 +781,8 @@ declare type MatrixNode = {
782
781
  axis: 'row' | 'column';
783
782
  path: MatrixMemberPathSegment[];
784
783
  level: number;
785
- label: string;
784
+ /** Present only for non-temporal members and explicit total labels. */
785
+ label?: string;
786
786
  value: unknown;
787
787
  parentId?: string;
788
788
  hasChildren: boolean;
@@ -934,11 +934,6 @@ declare interface PivotByField extends Field {
934
934
  * so existing cards need no migration.
935
935
  */
936
936
  memberOrder?: PivotMemberOrder;
937
- /**
938
- * Query transport policy for grouped temporal pivot members. This is
939
- * projected into executable config and is never persisted authoring state.
940
- */
941
- dateValueMode?: 'canonical' | 'formatted';
942
937
  }
943
938
 
944
939
  /**
@@ -1289,6 +1284,8 @@ declare type SemaphorMatrixAxisLevel = {
1289
1284
  id?: string;
1290
1285
  field: SemaphorFieldRef;
1291
1286
  grain?: SemaphorMatrixTimeGrain;
1287
+ format?: TemporalBucketFormat;
1288
+ semanticTemporalPresentation?: SemaphorMatrixSemanticTemporalPresentation;
1292
1289
  label?: string;
1293
1290
  subtotal?: boolean | SemaphorMatrixSubtotalOptions;
1294
1291
  sortBy?: SemaphorMatrixAxisSortRule;
@@ -1297,7 +1294,7 @@ declare type SemaphorMatrixAxisLevel = {
1297
1294
  declare type SemaphorMatrixAxisSortRule = {
1298
1295
  direction: 'asc' | 'desc';
1299
1296
  by: {
1300
- kind: 'label';
1297
+ kind: 'member';
1301
1298
  } | {
1302
1299
  kind: 'field';
1303
1300
  field: SemaphorFieldRef;
@@ -1354,7 +1351,7 @@ declare type SemaphorMatrixMemberPathSegment = {
1354
1351
 
1355
1352
  declare type SemaphorMatrixResult = SemaphorAnalyticsResultBase & {
1356
1353
  kind: 'matrix';
1357
- schemaVersion: 1;
1354
+ schemaVersion: 2;
1358
1355
  intent?: SemaphorMatrixIntent;
1359
1356
  shape: MatrixShape;
1360
1357
  capabilities: MatrixCapability[];
@@ -1376,12 +1373,17 @@ declare type SemaphorMatrixResult = SemaphorAnalyticsResultBase & {
1376
1373
  expansion?: MatrixExpansionResponseHints;
1377
1374
  };
1378
1375
 
1376
+ declare type SemaphorMatrixSemanticTemporalPresentation = {
1377
+ granularity: SemaphorMatrixTimeGrain;
1378
+ format: TemporalBucketFormat;
1379
+ };
1380
+
1379
1381
  declare type SemaphorMatrixSortRule = {
1380
1382
  axis: 'row' | 'column';
1381
1383
  targetId?: string;
1382
1384
  direction: 'asc' | 'desc';
1383
1385
  by: {
1384
- kind: 'label';
1386
+ kind: 'member';
1385
1387
  } | {
1386
1388
  kind: 'field';
1387
1389
  field: SemaphorFieldRef;
@@ -1650,11 +1650,6 @@ declare interface GroupByColumn extends BaseColumn {
1650
1650
  declare interface GroupByField extends Field {
1651
1651
  role: 'groupby';
1652
1652
  granularity?: TimeGranularity;
1653
- /**
1654
- * Query transport policy for grouped temporal values. This is projected
1655
- * into executable card config and is not persisted authoring state.
1656
- */
1657
- dateValueMode?: 'canonical' | 'formatted';
1658
1653
  /**
1659
1654
  * Optional SQL expression for grouping (e.g., DATE_TRUNC('month', order_date)).
1660
1655
  * If present, used in SELECT and GROUP BY instead of just the column name.
@@ -1966,11 +1961,6 @@ declare interface PivotByField extends Field {
1966
1961
  * so existing cards need no migration.
1967
1962
  */
1968
1963
  memberOrder?: PivotMemberOrder;
1969
- /**
1970
- * Query transport policy for grouped temporal pivot members. This is
1971
- * projected into executable config and is never persisted authoring state.
1972
- */
1973
- dateValueMode?: 'canonical' | 'formatted';
1974
1964
  }
1975
1965
 
1976
1966
  /**
@@ -2280,6 +2270,8 @@ declare type SemaphorMatrixAxisLevel = {
2280
2270
  id?: string;
2281
2271
  field: SemaphorFieldRef;
2282
2272
  grain?: SemaphorMatrixTimeGrain;
2273
+ format?: TemporalBucketFormat;
2274
+ semanticTemporalPresentation?: SemaphorMatrixSemanticTemporalPresentation;
2283
2275
  label?: string;
2284
2276
  subtotal?: boolean | SemaphorMatrixSubtotalOptions;
2285
2277
  sortBy?: SemaphorMatrixAxisSortRule;
@@ -2288,7 +2280,7 @@ declare type SemaphorMatrixAxisLevel = {
2288
2280
  declare type SemaphorMatrixAxisSortRule = {
2289
2281
  direction: 'asc' | 'desc';
2290
2282
  by: {
2291
- kind: 'label';
2283
+ kind: 'member';
2292
2284
  } | {
2293
2285
  kind: 'field';
2294
2286
  field: SemaphorFieldRef;
@@ -2343,12 +2335,17 @@ declare type SemaphorMatrixMemberPathSegment = {
2343
2335
  value: unknown;
2344
2336
  };
2345
2337
 
2338
+ declare type SemaphorMatrixSemanticTemporalPresentation = {
2339
+ granularity: SemaphorMatrixTimeGrain;
2340
+ format: TemporalBucketFormat;
2341
+ };
2342
+
2346
2343
  declare type SemaphorMatrixSortRule = {
2347
2344
  axis: 'row' | 'column';
2348
2345
  targetId?: string;
2349
2346
  direction: 'asc' | 'desc';
2350
2347
  by: {
2351
- kind: 'label';
2348
+ kind: 'member';
2352
2349
  } | {
2353
2350
  kind: 'field';
2354
2351
  field: SemaphorFieldRef;
@@ -1763,11 +1763,6 @@ declare interface GroupByColumn extends BaseColumn {
1763
1763
  declare interface GroupByField extends Field {
1764
1764
  role: 'groupby';
1765
1765
  granularity?: TimeGranularity;
1766
- /**
1767
- * Query transport policy for grouped temporal values. This is projected
1768
- * into executable card config and is not persisted authoring state.
1769
- */
1770
- dateValueMode?: 'canonical' | 'formatted';
1771
1766
  /**
1772
1767
  * Optional SQL expression for grouping (e.g., DATE_TRUNC('month', order_date)).
1773
1768
  * If present, used in SELECT and GROUP BY instead of just the column name.
@@ -2169,11 +2164,6 @@ declare interface PivotByField extends Field {
2169
2164
  * so existing cards need no migration.
2170
2165
  */
2171
2166
  memberOrder?: PivotMemberOrder;
2172
- /**
2173
- * Query transport policy for grouped temporal pivot members. This is
2174
- * projected into executable config and is never persisted authoring state.
2175
- */
2176
- dateValueMode?: 'canonical' | 'formatted';
2177
2167
  }
2178
2168
 
2179
2169
  /**
@@ -2574,6 +2564,8 @@ declare type SemaphorMatrixAxisLevel = {
2574
2564
  id?: string;
2575
2565
  field: SemaphorFieldRef;
2576
2566
  grain?: SemaphorMatrixTimeGrain;
2567
+ format?: TemporalBucketFormat;
2568
+ semanticTemporalPresentation?: SemaphorMatrixSemanticTemporalPresentation;
2577
2569
  label?: string;
2578
2570
  subtotal?: boolean | SemaphorMatrixSubtotalOptions;
2579
2571
  sortBy?: SemaphorMatrixAxisSortRule;
@@ -2582,7 +2574,7 @@ declare type SemaphorMatrixAxisLevel = {
2582
2574
  declare type SemaphorMatrixAxisSortRule = {
2583
2575
  direction: 'asc' | 'desc';
2584
2576
  by: {
2585
- kind: 'label';
2577
+ kind: 'member';
2586
2578
  } | {
2587
2579
  kind: 'field';
2588
2580
  field: SemaphorFieldRef;
@@ -2637,12 +2629,17 @@ declare type SemaphorMatrixMemberPathSegment = {
2637
2629
  value: unknown;
2638
2630
  };
2639
2631
 
2632
+ declare type SemaphorMatrixSemanticTemporalPresentation = {
2633
+ granularity: SemaphorMatrixTimeGrain;
2634
+ format: TemporalBucketFormat;
2635
+ };
2636
+
2640
2637
  declare type SemaphorMatrixSortRule = {
2641
2638
  axis: 'row' | 'column';
2642
2639
  targetId?: string;
2643
2640
  direction: 'asc' | 'desc';
2644
2641
  by: {
2645
- kind: 'label';
2642
+ kind: 'member';
2646
2643
  } | {
2647
2644
  kind: 'field';
2648
2645
  field: SemaphorFieldRef;
@@ -675,6 +675,8 @@ declare type SemaphorMatrixAxisLevel = {
675
675
  id?: string;
676
676
  field: SemaphorFieldRef;
677
677
  grain?: SemaphorMatrixTimeGrain;
678
+ format?: TemporalBucketFormat;
679
+ semanticTemporalPresentation?: SemaphorMatrixSemanticTemporalPresentation;
678
680
  label?: string;
679
681
  subtotal?: boolean | SemaphorMatrixSubtotalOptions;
680
682
  sortBy?: SemaphorMatrixAxisSortRule;
@@ -683,7 +685,7 @@ declare type SemaphorMatrixAxisLevel = {
683
685
  declare type SemaphorMatrixAxisSortRule = {
684
686
  direction: 'asc' | 'desc';
685
687
  by: {
686
- kind: 'label';
688
+ kind: 'member';
687
689
  } | {
688
690
  kind: 'field';
689
691
  field: SemaphorFieldRef;
@@ -738,12 +740,17 @@ declare type SemaphorMatrixMemberPathSegment = {
738
740
  value: unknown;
739
741
  };
740
742
 
743
+ declare type SemaphorMatrixSemanticTemporalPresentation = {
744
+ granularity: SemaphorMatrixTimeGrain;
745
+ format: TemporalBucketFormat;
746
+ };
747
+
741
748
  declare type SemaphorMatrixSortRule = {
742
749
  axis: 'row' | 'column';
743
750
  targetId?: string;
744
751
  direction: 'asc' | 'desc';
745
752
  by: {
746
- kind: 'label';
753
+ kind: 'member';
747
754
  } | {
748
755
  kind: 'field';
749
756
  field: SemaphorFieldRef;
@@ -990,6 +997,25 @@ declare type SemaphorTimeGrain = (typeof SEMAPHOR_TIME_GRAINS)[number];
990
997
 
991
998
  declare type SemaphorTimeWindow = SemaphorRelativeTimeWindow | SemaphorAbsoluteTimeWindow;
992
999
 
1000
+ declare const TEMPORAL_BUCKET_PRESETS: readonly ["week_of_short", "week_of_long", "quarter_short", "quarter_long", "fiscal_quarter_short", "fiscal_year"];
1001
+
1002
+ declare type TemporalBucketFormat = {
1003
+ type: 'temporal_bucket';
1004
+ presentation: TemporalBucketPresentation;
1005
+ };
1006
+
1007
+ declare type TemporalBucketPresentation = {
1008
+ mode: 'auto';
1009
+ } | {
1010
+ mode: 'preset';
1011
+ preset: TemporalBucketPreset;
1012
+ } | {
1013
+ mode: 'pattern';
1014
+ pattern: string;
1015
+ };
1016
+
1017
+ declare type TemporalBucketPreset = (typeof TEMPORAL_BUCKET_PRESETS)[number];
1018
+
993
1019
  export declare type WorkspaceContext = {
994
1020
  projectRoot?: string;
995
1021
  framework?: string;
@@ -307,7 +307,7 @@ declare type SemaphorDataAppCodegenMatrixIntent = {
307
307
 
308
308
  declare type SemaphorDataAppCodegenMatrixSortRule = Omit<SemaphorMatrixSortRule, 'by'> & {
309
309
  by: {
310
- kind: 'label';
310
+ kind: 'member';
311
311
  } | {
312
312
  kind: 'field';
313
313
  field: SemaphorDataAppCodegenFieldRef;
@@ -825,6 +825,8 @@ declare type SemaphorMatrixAxisLevel = {
825
825
  id?: string;
826
826
  field: SemaphorFieldRef;
827
827
  grain?: SemaphorMatrixTimeGrain;
828
+ format?: TemporalBucketFormat;
829
+ semanticTemporalPresentation?: SemaphorMatrixSemanticTemporalPresentation;
828
830
  label?: string;
829
831
  subtotal?: boolean | SemaphorMatrixSubtotalOptions;
830
832
  sortBy?: SemaphorMatrixAxisSortRule;
@@ -833,7 +835,7 @@ declare type SemaphorMatrixAxisLevel = {
833
835
  declare type SemaphorMatrixAxisSortRule = {
834
836
  direction: 'asc' | 'desc';
835
837
  by: {
836
- kind: 'label';
838
+ kind: 'member';
837
839
  } | {
838
840
  kind: 'field';
839
841
  field: SemaphorFieldRef;
@@ -888,12 +890,17 @@ declare type SemaphorMatrixMemberPathSegment = {
888
890
  value: unknown;
889
891
  };
890
892
 
893
+ declare type SemaphorMatrixSemanticTemporalPresentation = {
894
+ granularity: SemaphorMatrixTimeGrain;
895
+ format: TemporalBucketFormat;
896
+ };
897
+
891
898
  declare type SemaphorMatrixSortRule = {
892
899
  axis: 'row' | 'column';
893
900
  targetId?: string;
894
901
  direction: 'asc' | 'desc';
895
902
  by: {
896
- kind: 'label';
903
+ kind: 'member';
897
904
  } | {
898
905
  kind: 'field';
899
906
  field: SemaphorFieldRef;
@@ -1142,6 +1149,25 @@ declare type SemaphorTimeGrain = (typeof SEMAPHOR_TIME_GRAINS)[number];
1142
1149
 
1143
1150
  declare type SemaphorTimeWindow = SemaphorRelativeTimeWindow | SemaphorAbsoluteTimeWindow;
1144
1151
 
1152
+ declare const TEMPORAL_BUCKET_PRESETS: readonly ["week_of_short", "week_of_long", "quarter_short", "quarter_long", "fiscal_quarter_short", "fiscal_year"];
1153
+
1154
+ declare type TemporalBucketFormat = {
1155
+ type: 'temporal_bucket';
1156
+ presentation: TemporalBucketPresentation;
1157
+ };
1158
+
1159
+ declare type TemporalBucketPresentation = {
1160
+ mode: 'auto';
1161
+ } | {
1162
+ mode: 'preset';
1163
+ preset: TemporalBucketPreset;
1164
+ } | {
1165
+ mode: 'pattern';
1166
+ pattern: string;
1167
+ };
1168
+
1169
+ declare type TemporalBucketPreset = (typeof TEMPORAL_BUCKET_PRESETS)[number];
1170
+
1145
1171
  export declare function validateCodegenSummary(value: unknown): string[];
1146
1172
 
1147
1173
  export declare function validateSemaphorDataAppCodegenSummary(value: unknown): {
@@ -303,7 +303,7 @@ declare type SemaphorDataAppCodegenMatrixIntent = {
303
303
 
304
304
  declare type SemaphorDataAppCodegenMatrixSortRule = Omit<SemaphorMatrixSortRule, 'by'> & {
305
305
  by: {
306
- kind: 'label';
306
+ kind: 'member';
307
307
  } | {
308
308
  kind: 'field';
309
309
  field: SemaphorDataAppCodegenFieldRef;
@@ -797,6 +797,8 @@ declare type SemaphorMatrixAxisLevel = {
797
797
  id?: string;
798
798
  field: SemaphorFieldRef;
799
799
  grain?: SemaphorMatrixTimeGrain;
800
+ format?: TemporalBucketFormat;
801
+ semanticTemporalPresentation?: SemaphorMatrixSemanticTemporalPresentation;
800
802
  label?: string;
801
803
  subtotal?: boolean | SemaphorMatrixSubtotalOptions;
802
804
  sortBy?: SemaphorMatrixAxisSortRule;
@@ -805,7 +807,7 @@ declare type SemaphorMatrixAxisLevel = {
805
807
  declare type SemaphorMatrixAxisSortRule = {
806
808
  direction: 'asc' | 'desc';
807
809
  by: {
808
- kind: 'label';
810
+ kind: 'member';
809
811
  } | {
810
812
  kind: 'field';
811
813
  field: SemaphorFieldRef;
@@ -860,12 +862,17 @@ declare type SemaphorMatrixMemberPathSegment = {
860
862
  value: unknown;
861
863
  };
862
864
 
865
+ declare type SemaphorMatrixSemanticTemporalPresentation = {
866
+ granularity: SemaphorMatrixTimeGrain;
867
+ format: TemporalBucketFormat;
868
+ };
869
+
863
870
  declare type SemaphorMatrixSortRule = {
864
871
  axis: 'row' | 'column';
865
872
  targetId?: string;
866
873
  direction: 'asc' | 'desc';
867
874
  by: {
868
- kind: 'label';
875
+ kind: 'member';
869
876
  } | {
870
877
  kind: 'field';
871
878
  field: SemaphorFieldRef;
@@ -1114,6 +1121,25 @@ declare type SemaphorTimeGrain = (typeof SEMAPHOR_TIME_GRAINS)[number];
1114
1121
 
1115
1122
  declare type SemaphorTimeWindow = SemaphorRelativeTimeWindow | SemaphorAbsoluteTimeWindow;
1116
1123
 
1124
+ declare const TEMPORAL_BUCKET_PRESETS: readonly ["week_of_short", "week_of_long", "quarter_short", "quarter_long", "fiscal_quarter_short", "fiscal_year"];
1125
+
1126
+ declare type TemporalBucketFormat = {
1127
+ type: 'temporal_bucket';
1128
+ presentation: TemporalBucketPresentation;
1129
+ };
1130
+
1131
+ declare type TemporalBucketPresentation = {
1132
+ mode: 'auto';
1133
+ } | {
1134
+ mode: 'preset';
1135
+ preset: TemporalBucketPreset;
1136
+ } | {
1137
+ mode: 'pattern';
1138
+ pattern: string;
1139
+ };
1140
+
1141
+ declare type TemporalBucketPreset = (typeof TEMPORAL_BUCKET_PRESETS)[number];
1142
+
1117
1143
  export declare function validateCodegenSummary(value: unknown): string[];
1118
1144
 
1119
1145
  export declare function validateSemaphorDataAppCodegenSummary(value: unknown): {