react-semaphor 0.1.449 → 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 (147) hide show
  1. package/dist/analytics-protocol/index.cjs +1 -1
  2. package/dist/analytics-protocol/index.js +119 -112
  3. package/dist/appearance/index.cjs +1 -1
  4. package/dist/appearance/index.js +1 -1
  5. package/dist/brand-studio/index.cjs +4 -4
  6. package/dist/brand-studio/index.js +15 -13
  7. package/dist/briefings/index.cjs +1 -1
  8. package/dist/briefings/index.js +39 -2131
  9. package/dist/chunks/{analyze-result-contract-T-0Ntzys.js → analyze-result-contract-BbRJ-C06.js} +1 -1
  10. package/dist/chunks/{analyze-result-contract-BHb7sUUW.cjs → analyze-result-contract-LPDNldic.cjs} +1 -1
  11. package/dist/chunks/canonical-result-keys-BA0HCP4e.cjs +1 -0
  12. package/dist/chunks/canonical-result-keys-D6avdjpA.js +467 -0
  13. package/dist/chunks/color-CJvdlFM_.js +2162 -0
  14. package/dist/chunks/color-CyB5o13F.cjs +4 -0
  15. package/dist/chunks/{common-types-CQ6SHfLk.cjs → common-types-C57kJ59w.cjs} +1 -1
  16. package/dist/chunks/{common-types-B7Jk3Rtj.js → common-types-H51FLKB7.js} +1 -1
  17. package/dist/chunks/contracts-CoCOpd_i.js +11 -0
  18. package/dist/chunks/contracts-CtB2VONT.cjs +1 -0
  19. package/dist/chunks/dashboard-briefing-launcher-Dwj1i7lr.cjs +26 -0
  20. package/dist/chunks/{dashboard-briefing-launcher-DCHiEkLE.js → dashboard-briefing-launcher-SYroFdae.js} +86 -84
  21. package/dist/chunks/{dashboard-controls-DwRFCcHV.js → dashboard-controls-1LpeU2sz.js} +15 -13
  22. package/dist/chunks/{dashboard-controls-CaFioayc.cjs → dashboard-controls-CpFoh7-A.cjs} +1 -1
  23. package/dist/chunks/dashboard-date-comparison-definition-Ces4alFm.cjs +1 -0
  24. package/dist/chunks/{dashboard-date-comparison-definition-Ba-clViK.js → dashboard-date-comparison-definition-DC3ekV2S.js} +1 -1
  25. package/dist/chunks/{dashboard-json-WoILbfTe.js → dashboard-json-D-T-sQxU.js} +25 -23
  26. package/dist/chunks/dashboard-json-DwSQopc_.cjs +1 -0
  27. package/dist/chunks/edit-dashboard-visual-BEmoQAET.cjs +172 -0
  28. package/dist/chunks/{edit-dashboard-visual-ciFhxqaI.js → edit-dashboard-visual-DqxUq4Bs.js} +6925 -6947
  29. package/dist/chunks/editor-action-buttons-18r2xwei.cjs +16 -0
  30. package/dist/chunks/{editor-action-buttons-BPo_45pM.js → editor-action-buttons-B2l3WIRC.js} +41 -39
  31. package/dist/chunks/format-types-CFHQoIuk.js +1350 -0
  32. package/dist/chunks/format-types-PSZZ7hG8.cjs +1 -0
  33. package/dist/chunks/index-Bn5wlkHt.cjs +4 -0
  34. package/dist/chunks/index-ByFbacH7.cjs +1 -0
  35. package/dist/chunks/index-CACdoqu3.js +318 -0
  36. package/dist/chunks/index-CLB_NGZ8.cjs +1392 -0
  37. package/dist/chunks/index-Ca784dpx.js +3714 -0
  38. package/dist/chunks/{index-CPuawpXJ.js → index-DAoS4BNU.js} +48514 -48484
  39. package/dist/chunks/index-DSKR3nKn.js +421 -0
  40. package/dist/chunks/index-F25jnH0p.cjs +1 -0
  41. package/dist/chunks/matrix-result-contract-CofATICL.js +437 -0
  42. package/dist/chunks/matrix-result-contract-zamd9euI.cjs +1 -0
  43. package/dist/chunks/pivot-header-presentation-DhyQXxKq.cjs +4 -0
  44. package/dist/chunks/pivot-header-presentation-ckYOQ4aZ.js +557 -0
  45. package/dist/chunks/{pivot-result-identity-CDLRT-YG.cjs → pivot-result-identity-Bb4EixVN.cjs} +1 -1
  46. package/dist/chunks/{pivot-result-identity-CwJWpKI7.js → pivot-result-identity-DU1v-5Xk.js} +1 -1
  47. package/dist/chunks/pivot-result-lifecycle-DmcF1ris.cjs +1 -0
  48. package/dist/chunks/pivot-result-lifecycle-sjzIOpvp.js +1641 -0
  49. package/dist/chunks/raw-temporal-contract-BtjH_G-d.cjs +1 -0
  50. package/dist/chunks/raw-temporal-contract-CxncLze5.js +64 -0
  51. package/dist/chunks/report-preferences-dialog-BgSvlDXa.cjs +1 -0
  52. package/dist/chunks/report-preferences-dialog-DDc2WUa0.js +723 -0
  53. package/dist/chunks/{report-runtime-context-C8LZFsqV.cjs → report-runtime-context-DqxS4wbi.cjs} +1 -1
  54. package/dist/chunks/{report-runtime-context-bCy3CVzK.js → report-runtime-context-SM6YO61_.js} +5 -5
  55. package/dist/chunks/saved-temporal-bucket-format-CFfWXRl9.cjs +1 -0
  56. package/dist/chunks/saved-temporal-bucket-format-SGAV0ivR.js +922 -0
  57. package/dist/chunks/{switch-BXet-Sno.js → switch-BeZW-HnS.js} +4350 -5249
  58. package/dist/chunks/switch-D-CCcfhc.cjs +138 -0
  59. package/dist/chunks/temporal-bucket-5UYEotyQ.js +810 -0
  60. package/dist/chunks/temporal-bucket-DHY1y9lq.cjs +1 -0
  61. package/dist/chunks/temporal-bucket-authoring-K1kE6R_z.js +222 -0
  62. package/dist/chunks/temporal-bucket-authoring-o3Emn05L.cjs +1 -0
  63. package/dist/chunks/{temporal-bucket-contract-ChDBWX8I.cjs → temporal-bucket-contract-D2-93DGr.cjs} +1 -1
  64. package/dist/chunks/{temporal-bucket-contract-_F6vNhhH.js → temporal-bucket-contract-D5d-xEl3.js} +1 -1
  65. package/dist/chunks/{token-types-BdQ8kHBm.cjs → token-types-D7CaaI80.cjs} +1 -1
  66. package/dist/chunks/{token-types-BHR58aTy.js → token-types-GbxRUozo.js} +1 -1
  67. package/dist/chunks/{update-policy-BxvYMYz0.cjs → update-policy-BmiOd0PB.cjs} +1 -1
  68. package/dist/chunks/{update-policy-g0rCQ9BM.js → update-policy-hednMF-0.js} +1 -1
  69. package/dist/chunks/validators-BDYprKI9.cjs +1 -0
  70. package/dist/chunks/{validators-Cs74WVie.js → validators-DEmd8Sin.js} +1561 -1197
  71. package/dist/dashboard/index.cjs +1 -1
  72. package/dist/dashboard/index.js +2 -2
  73. package/dist/dashboard-authoring/index.cjs +3 -3
  74. package/dist/dashboard-authoring/index.js +35 -32
  75. package/dist/data-app-builder/index.cjs +1 -1
  76. package/dist/data-app-builder/index.js +2 -2
  77. package/dist/data-app-codegen/index.cjs +1 -1
  78. package/dist/data-app-codegen/index.js +2 -2
  79. package/dist/data-app-codegen-node/index.cjs +1 -1
  80. package/dist/data-app-codegen-node/index.js +3 -3
  81. package/dist/data-app-sdk/index.cjs +1 -1
  82. package/dist/data-app-sdk/index.js +78 -77
  83. package/dist/data-app-sdk-adapters/index.cjs +1 -1
  84. package/dist/data-app-sdk-adapters/index.js +29 -30
  85. package/dist/data-app-sdk-validation/index.cjs +1 -1
  86. package/dist/data-app-sdk-validation/index.js +21 -21
  87. package/dist/format-utils/index.cjs +3 -3
  88. package/dist/format-utils/index.js +156 -140
  89. package/dist/index.cjs +1 -1
  90. package/dist/index.js +157 -155
  91. package/dist/report-runtime-context/index.cjs +1 -1
  92. package/dist/report-runtime-context/index.js +2 -2
  93. package/dist/style.css +1 -1
  94. package/dist/surfboard/index.cjs +1 -1
  95. package/dist/surfboard/index.js +3 -3
  96. package/dist/types/analytics-protocol.d.ts +81 -11
  97. package/dist/types/briefings.d.ts +727 -19
  98. package/dist/types/dashboard-assistant.d.ts +37 -17
  99. package/dist/types/dashboard-authoring.d.ts +61 -14
  100. package/dist/types/dashboard.d.ts +137 -12
  101. package/dist/types/data-app-builder.d.ts +28 -2
  102. package/dist/types/data-app-codegen-node.d.ts +29 -3
  103. package/dist/types/data-app-codegen.d.ts +29 -3
  104. package/dist/types/data-app-sdk-adapters.d.ts +28 -2
  105. package/dist/types/data-app-sdk-validation.d.ts +51 -7
  106. package/dist/types/data-app-sdk.d.ts +55 -10
  107. package/dist/types/format-utils.d.ts +190 -3
  108. package/dist/types/index.cjs +1 -1
  109. package/dist/types/index.js +4 -4
  110. package/dist/types/main.d.ts +128 -33
  111. package/dist/types/shared.d.ts +14 -12
  112. package/dist/types/surfboard.d.ts +138 -13
  113. package/dist/types/types.d.ts +117 -23
  114. package/dist/types/value-format-preferences.d.ts +3 -0
  115. package/package.json +2 -1
  116. package/dist/chunks/card-config-utils-15sRtebL.cjs +0 -1
  117. package/dist/chunks/card-config-utils-BYZ5MJOh.js +0 -16
  118. package/dist/chunks/catalog-field-grounding-Bnx-3tE0.cjs +0 -1
  119. package/dist/chunks/catalog-field-grounding-S2jKwKGD.js +0 -100
  120. package/dist/chunks/dashboard-briefing-launcher-DDgDr2s3.cjs +0 -26
  121. package/dist/chunks/dashboard-date-comparison-definition-DZq0htjG.cjs +0 -1
  122. package/dist/chunks/dashboard-input-contract-DSt8dGzP.js +0 -18
  123. package/dist/chunks/dashboard-input-contract-DV3cshjz.cjs +0 -1
  124. package/dist/chunks/dashboard-json-CYtvwtvj.cjs +0 -1
  125. package/dist/chunks/edit-dashboard-visual-DwKcvlsF.cjs +0 -177
  126. package/dist/chunks/editor-action-buttons-BVmsk0Aj.cjs +0 -16
  127. package/dist/chunks/format-types-CSv0V7mm.cjs +0 -1
  128. package/dist/chunks/format-types-DZGgYj39.js +0 -1663
  129. package/dist/chunks/index-CJdxSyQq.js +0 -2578
  130. package/dist/chunks/index-DPv8_Ild.cjs +0 -1395
  131. package/dist/chunks/index-DRlMUglg.cjs +0 -4
  132. package/dist/chunks/metric-comparison-97zHGEx5.js +0 -387
  133. package/dist/chunks/metric-comparison-CUAJ8n4y.cjs +0 -1
  134. package/dist/chunks/pivot-result-lifecycle-BBabQ_da.js +0 -914
  135. package/dist/chunks/pivot-result-lifecycle-DPc0ANwk.cjs +0 -4
  136. package/dist/chunks/presentation-execution-BLfPTGX_.js +0 -637
  137. package/dist/chunks/presentation-execution-BTV-Q43g.cjs +0 -1
  138. package/dist/chunks/report-preferences-dialog-D9ZCGh9l.js +0 -691
  139. package/dist/chunks/report-preferences-dialog-DaqTEcac.cjs +0 -1
  140. package/dist/chunks/switch-Cjk6G06r.cjs +0 -138
  141. package/dist/chunks/temporal-bucket-BnPxGrAi.js +0 -446
  142. package/dist/chunks/temporal-bucket-authoring-CPTwHzvs.cjs +0 -1
  143. package/dist/chunks/temporal-bucket-authoring-CgOuakGW.js +0 -205
  144. package/dist/chunks/temporal-bucket-pMnV-4Nj.cjs +0 -1
  145. package/dist/chunks/temporal-result-owner-6peubmhU.js +0 -443
  146. package/dist/chunks/temporal-result-owner-f6-i65Fb.cjs +0 -1
  147. package/dist/chunks/validators-9D4KBqKD.cjs +0 -1
@@ -351,6 +351,11 @@ declare type DateFormatValue = (typeof DATE_FORMAT_VALUES)[number];
351
351
  */
352
352
  declare interface DetailField extends Omit<Field, 'role' | 'granularity'> {
353
353
  role: 'detail';
354
+ /**
355
+ * Query transport policy for ungrouped temporal values. This marker is
356
+ * projected into executable config and is never persisted authoring state.
357
+ */
358
+ dateValueMode?: 'canonical' | 'formatted';
354
359
  dateFormat?: DateFormatValue;
355
360
  customFormat?: string;
356
361
  /**
@@ -533,11 +538,6 @@ declare type FormatSpec = {
533
538
  declare interface GroupByField extends Field {
534
539
  role: 'groupby';
535
540
  granularity?: TimeGranularity;
536
- /**
537
- * Query transport policy for grouped temporal values. This is projected
538
- * into executable card config and is not persisted authoring state.
539
- */
540
- dateValueMode?: 'canonical' | 'formatted';
541
541
  /**
542
542
  * Optional SQL expression for grouping (e.g., DATE_TRUNC('month', order_date)).
543
543
  * If present, used in SELECT and GROUP BY instead of just the column name.
@@ -624,6 +624,7 @@ declare type MatrixAxisLevelDescriptor = {
624
624
  label: string;
625
625
  field: SemaphorFieldRef;
626
626
  grain?: SemaphorMatrixTimeGrain;
627
+ temporalBucket?: TemporalBucketMetadata;
627
628
  subtotal?: SemaphorMatrixSubtotalOptions;
628
629
  };
629
630
 
@@ -698,7 +699,8 @@ declare type MatrixFormattingContext = {
698
699
 
699
700
  declare type MatrixGridColumn = {
700
701
  id: string;
701
- label: string;
702
+ /** Present only for measure and explicit total headings. */
703
+ label?: string;
702
704
  columnNodeId?: string;
703
705
  columnPath: MatrixMemberPathSegment[];
704
706
  measureInstanceId: string;
@@ -707,7 +709,8 @@ declare type MatrixGridColumn = {
707
709
 
708
710
  declare type MatrixGridHeaderCell = {
709
711
  id: string;
710
- label: string;
712
+ /** Present only for non-member headings and explicit total labels. */
713
+ label?: string;
711
714
  role: 'rowHeader' | 'columnHeader' | 'measureHeader' | 'subtotal' | 'grandTotal';
712
715
  colSpan: number;
713
716
  rowSpan: number;
@@ -769,7 +772,8 @@ declare type MatrixMemberPathSegment = {
769
772
  instanceId: string;
770
773
  fieldKey: string;
771
774
  value: unknown;
772
- label: string;
775
+ /** Display-only source label for non-temporal members. */
776
+ label?: string;
773
777
  };
774
778
 
775
779
  declare type MatrixNode = {
@@ -777,7 +781,8 @@ declare type MatrixNode = {
777
781
  axis: 'row' | 'column';
778
782
  path: MatrixMemberPathSegment[];
779
783
  level: number;
780
- label: string;
784
+ /** Present only for non-temporal members and explicit total labels. */
785
+ label?: string;
781
786
  value: unknown;
782
787
  parentId?: string;
783
788
  hasChildren: boolean;
@@ -929,11 +934,6 @@ declare interface PivotByField extends Field {
929
934
  * so existing cards need no migration.
930
935
  */
931
936
  memberOrder?: PivotMemberOrder;
932
- /**
933
- * Query transport policy for grouped temporal pivot members. This is
934
- * projected into executable config and is never persisted authoring state.
935
- */
936
- dateValueMode?: 'canonical' | 'formatted';
937
937
  }
938
938
 
939
939
  /**
@@ -973,6 +973,18 @@ declare interface QueryColumnKeyMapEntry {
973
973
 
974
974
  declare type QueryColumnKeyRole = 'groupby' | 'metric' | 'pivotby' | 'detail';
975
975
 
976
+ /** Authoritative meaning of one ungrouped temporal result column. */
977
+ declare type RawTemporalValueKind = 'date' | 'wall_datetime' | 'instant';
978
+
979
+ /**
980
+ * Result-column metadata for an ungrouped temporal value. This descriptor is
981
+ * mutually exclusive with grouped `temporalBucket` metadata.
982
+ */
983
+ declare type RawTemporalValueMetadata = {
984
+ kind: 'raw_temporal';
985
+ valueKind: RawTemporalValueKind;
986
+ };
987
+
976
988
  declare type SelectedEntities = SelectedEntity[];
977
989
 
978
990
  declare type SelectedEntity = DatabaseEntityReference | DataModelEntityReference | DatasetEntityReference | FileEntityReference;
@@ -1272,6 +1284,8 @@ declare type SemaphorMatrixAxisLevel = {
1272
1284
  id?: string;
1273
1285
  field: SemaphorFieldRef;
1274
1286
  grain?: SemaphorMatrixTimeGrain;
1287
+ format?: TemporalBucketFormat;
1288
+ semanticTemporalPresentation?: SemaphorMatrixSemanticTemporalPresentation;
1275
1289
  label?: string;
1276
1290
  subtotal?: boolean | SemaphorMatrixSubtotalOptions;
1277
1291
  sortBy?: SemaphorMatrixAxisSortRule;
@@ -1280,7 +1294,7 @@ declare type SemaphorMatrixAxisLevel = {
1280
1294
  declare type SemaphorMatrixAxisSortRule = {
1281
1295
  direction: 'asc' | 'desc';
1282
1296
  by: {
1283
- kind: 'label';
1297
+ kind: 'member';
1284
1298
  } | {
1285
1299
  kind: 'field';
1286
1300
  field: SemaphorFieldRef;
@@ -1337,7 +1351,7 @@ declare type SemaphorMatrixMemberPathSegment = {
1337
1351
 
1338
1352
  declare type SemaphorMatrixResult = SemaphorAnalyticsResultBase & {
1339
1353
  kind: 'matrix';
1340
- schemaVersion: 1;
1354
+ schemaVersion: 2;
1341
1355
  intent?: SemaphorMatrixIntent;
1342
1356
  shape: MatrixShape;
1343
1357
  capabilities: MatrixCapability[];
@@ -1359,12 +1373,17 @@ declare type SemaphorMatrixResult = SemaphorAnalyticsResultBase & {
1359
1373
  expansion?: MatrixExpansionResponseHints;
1360
1374
  };
1361
1375
 
1376
+ declare type SemaphorMatrixSemanticTemporalPresentation = {
1377
+ granularity: SemaphorMatrixTimeGrain;
1378
+ format: TemporalBucketFormat;
1379
+ };
1380
+
1362
1381
  declare type SemaphorMatrixSortRule = {
1363
1382
  axis: 'row' | 'column';
1364
1383
  targetId?: string;
1365
1384
  direction: 'asc' | 'desc';
1366
1385
  by: {
1367
- kind: 'label';
1386
+ kind: 'member';
1368
1387
  } | {
1369
1388
  kind: 'field';
1370
1389
  field: SemaphorFieldRef;
@@ -1633,6 +1652,7 @@ declare type SemaphorResultColumn = {
1633
1652
  source?: SemaphorFieldRef['source'];
1634
1653
  derivedField?: SemaphorDerivedFieldDefinition;
1635
1654
  temporalBucket?: TemporalBucketMetadata;
1655
+ rawTemporal?: RawTemporalValueMetadata;
1636
1656
  pivotIdentity?: SemaphorPivotResultColumnIdentity;
1637
1657
  };
1638
1658
 
@@ -140,6 +140,18 @@ declare type CalendarContext = {
140
140
  fiscalCalendar?: MonthAlignedFiscalCalendar;
141
141
  };
142
142
 
143
+ export declare type CanonicalDetailResultFieldIdentity = {
144
+ name: string;
145
+ label?: string;
146
+ alias?: string;
147
+ entityName?: string;
148
+ role?: string;
149
+ aggregate?: string;
150
+ expression?: string;
151
+ };
152
+
153
+ export declare type CanonicalResultFieldRole = 'groupby' | 'metric' | 'pivotby' | 'detail';
154
+
143
155
  declare interface CardConfig {
144
156
  /**
145
157
  * Matrix table is the shared analytics-spine successor for pivot and
@@ -974,6 +986,11 @@ declare type DefaultDateFilter = RelativeDateFilter | FixedMonthDefaultDateFilte
974
986
  */
975
987
  declare interface DetailField extends Omit<Field, 'role' | 'granularity'> {
976
988
  role: 'detail';
989
+ /**
990
+ * Query transport policy for ungrouped temporal values. This marker is
991
+ * projected into executable config and is never persisted authoring state.
992
+ */
993
+ dateValueMode?: 'canonical' | 'formatted';
977
994
  dateFormat?: DateFormatValue;
978
995
  customFormat?: string;
979
996
  /**
@@ -1611,7 +1628,7 @@ export declare type GeneratedDashboardCardArtifact = {
1611
1628
 
1612
1629
  export declare function getDashboardAuthoringCardSource(card: Pick<DashboardPlanCard, 'analyticsIntent'>): SemaphorSourceRef | undefined;
1613
1630
 
1614
- export declare function getTemporalBucketAuthoringOptions(granularity: SemaphorTimeGrain, preservedFormat?: TemporalBucketFormat): readonly TemporalBucketAuthoringOption[];
1631
+ export declare function getTemporalBucketAuthoringOptions(granularity: SemaphorTimeGrain, preservedFormat?: TemporalBucketFormat, preferences?: ResolvedTemporalValueFormatPreferences): readonly TemporalBucketAuthoringOption[];
1615
1632
 
1616
1633
  export declare function getTemporalBucketAuthoringSelection(format: TemporalBucketFormat, granularity: SemaphorTimeGrain): TemporalBucketAuthoringSelection;
1617
1634
 
@@ -1633,11 +1650,6 @@ declare interface GroupByColumn extends BaseColumn {
1633
1650
  declare interface GroupByField extends Field {
1634
1651
  role: 'groupby';
1635
1652
  granularity?: TimeGranularity;
1636
- /**
1637
- * Query transport policy for grouped temporal values. This is projected
1638
- * into executable card config and is not persisted authoring state.
1639
- */
1640
- dateValueMode?: 'canonical' | 'formatted';
1641
1653
  /**
1642
1654
  * Optional SQL expression for grouping (e.g., DATE_TRUNC('month', order_date)).
1643
1655
  * If present, used in SELECT and GROUP BY instead of just the column name.
@@ -1769,6 +1781,8 @@ declare interface LinkFormat {
1769
1781
  openInNewTab: boolean;
1770
1782
  }
1771
1783
 
1784
+ declare type LocaleStyle = 'short' | 'medium' | 'long';
1785
+
1772
1786
  declare type LogicalOperator = 'AND' | 'OR';
1773
1787
 
1774
1788
  export declare type MaterializableDashboardAuthoringSource = Extract<SemaphorSourceRef, {
@@ -1947,11 +1961,6 @@ declare interface PivotByField extends Field {
1947
1961
  * so existing cards need no migration.
1948
1962
  */
1949
1963
  memberOrder?: PivotMemberOrder;
1950
- /**
1951
- * Query transport policy for grouped temporal pivot members. This is
1952
- * projected into executable config and is never persisted authoring state.
1953
- */
1954
- dateValueMode?: 'canonical' | 'formatted';
1955
1964
  }
1956
1965
 
1957
1966
  /**
@@ -1967,7 +1976,7 @@ export declare function preferDashboardAuthoringSourceMetadata(current: Semaphor
1967
1976
 
1968
1977
  export declare function preferredDashboardAuthoringSource(sources: readonly SemaphorSourceRef[]): SemaphorSourceRef | undefined;
1969
1978
 
1970
- export declare function previewTemporalBucketAuthoringFormat(format: TemporalBucketFormat, granularity: SemaphorTimeGrain): string;
1979
+ export declare function previewTemporalBucketAuthoringFormat(format: TemporalBucketFormat, granularity: SemaphorTimeGrain, preferences?: ResolvedTemporalValueFormatPreferences): string;
1971
1980
 
1972
1981
  declare interface QueryConfig {
1973
1982
  groupByColumns?: GroupByColumn[];
@@ -2017,6 +2026,24 @@ declare type RelativeDateFilter = {
2017
2026
  to: number;
2018
2027
  };
2019
2028
 
2029
+ /** Physical SQL/result alias used by config-owned detail projections. */
2030
+ export declare function resolveCanonicalDetailResultRawKey(field: CanonicalDetailResultFieldIdentity): string;
2031
+
2032
+ /**
2033
+ * Deterministic canonical response-key policy shared by the query producer and
2034
+ * recurring snapshot capture. A unique display label may become the physical
2035
+ * output key only when it cannot hide another raw result key.
2036
+ */
2037
+ export declare function resolveCanonicalResultOutputKey(input: {
2038
+ label?: string;
2039
+ labelCount: number;
2040
+ rawKey: string;
2041
+ rawKeys: ReadonlySet<string>;
2042
+ }): string;
2043
+
2044
+ /** Role-aware physical key policy used by the canonical query key map. */
2045
+ export declare function resolveCanonicalResultRawKey(field: CanonicalDetailResultFieldIdentity, role: CanonicalResultFieldRole, emittedAliasOverride?: string): string;
2046
+
2020
2047
  export declare function resolveDashboardAuthoringSource({ explicitSource, field, defaultSource, fallbackSources, }: {
2021
2048
  explicitSource?: unknown;
2022
2049
  field?: SemaphorFieldRef;
@@ -2024,6 +2051,19 @@ export declare function resolveDashboardAuthoringSource({ explicitSource, field,
2024
2051
  fallbackSources?: readonly SemaphorSourceRef[];
2025
2052
  }): MaterializableDashboardAuthoringSource | undefined;
2026
2053
 
2054
+ /** Viewer preferences that affect temporal presentation without numeric currency policy. */
2055
+ declare type ResolvedTemporalValueFormatPreferences = Pick<ResolvedValueFormatPreferences, 'locale' | 'dateStyle' | 'dateTime'>;
2056
+
2057
+ declare type ResolvedValueFormatPreferences = {
2058
+ locale: string;
2059
+ dateStyle: LocaleStyle;
2060
+ dateTime: {
2061
+ dateStyle: LocaleStyle;
2062
+ timeStyle: LocaleStyle;
2063
+ };
2064
+ defaultCurrency: string;
2065
+ };
2066
+
2027
2067
  export declare function resolveTemporalBucketAuthoringFormat(granularity: SemaphorTimeGrain, value: string, customPattern?: string): TemporalBucketFormat;
2028
2068
 
2029
2069
  /**
@@ -2230,6 +2270,8 @@ declare type SemaphorMatrixAxisLevel = {
2230
2270
  id?: string;
2231
2271
  field: SemaphorFieldRef;
2232
2272
  grain?: SemaphorMatrixTimeGrain;
2273
+ format?: TemporalBucketFormat;
2274
+ semanticTemporalPresentation?: SemaphorMatrixSemanticTemporalPresentation;
2233
2275
  label?: string;
2234
2276
  subtotal?: boolean | SemaphorMatrixSubtotalOptions;
2235
2277
  sortBy?: SemaphorMatrixAxisSortRule;
@@ -2238,7 +2280,7 @@ declare type SemaphorMatrixAxisLevel = {
2238
2280
  declare type SemaphorMatrixAxisSortRule = {
2239
2281
  direction: 'asc' | 'desc';
2240
2282
  by: {
2241
- kind: 'label';
2283
+ kind: 'member';
2242
2284
  } | {
2243
2285
  kind: 'field';
2244
2286
  field: SemaphorFieldRef;
@@ -2293,12 +2335,17 @@ declare type SemaphorMatrixMemberPathSegment = {
2293
2335
  value: unknown;
2294
2336
  };
2295
2337
 
2338
+ declare type SemaphorMatrixSemanticTemporalPresentation = {
2339
+ granularity: SemaphorMatrixTimeGrain;
2340
+ format: TemporalBucketFormat;
2341
+ };
2342
+
2296
2343
  declare type SemaphorMatrixSortRule = {
2297
2344
  axis: 'row' | 'column';
2298
2345
  targetId?: string;
2299
2346
  direction: 'asc' | 'desc';
2300
2347
  by: {
2301
- kind: 'label';
2348
+ kind: 'member';
2302
2349
  } | {
2303
2350
  kind: 'field';
2304
2351
  field: SemaphorFieldRef;
@@ -898,6 +898,8 @@ export declare type DashboardProps = {
898
898
  * points. Ordinary dashboard consumers should leave this unset.
899
899
  */
900
900
  interactionExecutionSnapshot?: Record<string, InteractionState>;
901
+ /** Server-resolved immutable presentation snapshot for internal print views. */
902
+ presentationExecutionSnapshot?: PresentationExecutionSnapshot;
901
903
  /**
902
904
  * Render target for print entry points. Generic dashboard PDF exports also
903
905
  * use cardDisplay.mode="print"; document-specific print handling must only
@@ -1001,6 +1003,11 @@ declare type DefaultDateFilter = RelativeDateFilter | FixedMonthDefaultDateFilte
1001
1003
  */
1002
1004
  declare interface DetailField extends Omit<Field, 'role' | 'granularity'> {
1003
1005
  role: 'detail';
1006
+ /**
1007
+ * Query transport policy for ungrouped temporal values. This marker is
1008
+ * projected into executable config and is never persisted authoring state.
1009
+ */
1010
+ dateValueMode?: 'canonical' | 'formatted';
1004
1011
  dateFormat?: DateFormatValue;
1005
1012
  customFormat?: string;
1006
1013
  /**
@@ -1756,11 +1763,6 @@ declare interface GroupByColumn extends BaseColumn {
1756
1763
  declare interface GroupByField extends Field {
1757
1764
  role: 'groupby';
1758
1765
  granularity?: TimeGranularity;
1759
- /**
1760
- * Query transport policy for grouped temporal values. This is projected
1761
- * into executable card config and is not persisted authoring state.
1762
- */
1763
- dateValueMode?: 'canonical' | 'formatted';
1764
1766
  /**
1765
1767
  * Optional SQL expression for grouping (e.g., DATE_TRUNC('month', order_date)).
1766
1768
  * If present, used in SELECT and GROUP BY instead of just the column name.
@@ -2088,6 +2090,32 @@ export declare type NumberOptions = {
2088
2090
  colorRanges?: ColorRange[];
2089
2091
  };
2090
2092
 
2093
+ declare type NumericCanonicalFormat = {
2094
+ type: 'number' | 'currency' | 'percent' | 'scientific';
2095
+ locale?: string;
2096
+ minimumFractionDigits?: number;
2097
+ maximumFractionDigits?: number;
2098
+ useGrouping?: boolean;
2099
+ prefix?: string;
2100
+ suffix?: string;
2101
+ negativeStyle?: 'minus' | 'parentheses';
2102
+ compact?: boolean;
2103
+ scale?: number;
2104
+ currency?: string;
2105
+ percentValueMode?: 'fraction' | 'whole';
2106
+ };
2107
+
2108
+ declare type NumericPresentationTarget = {
2109
+ kind: 'metric';
2110
+ metricId: string;
2111
+ } | {
2112
+ kind: 'column';
2113
+ columnKey: string;
2114
+ } | {
2115
+ kind: 'matrix_measure';
2116
+ measureId: string;
2117
+ };
2118
+
2091
2119
  declare type OldFilterValue = string | number | null | (string | number)[] | RangeValue;
2092
2120
 
2093
2121
  declare type Operation = '=' | '>' | '<' | '>=' | '<=' | '!=' | 'in' | 'not in' | 'like' | 'not like' | 'between' | 'not between' | 'is null' | 'is not null';
@@ -2136,11 +2164,6 @@ declare interface PivotByField extends Field {
2136
2164
  * so existing cards need no migration.
2137
2165
  */
2138
2166
  memberOrder?: PivotMemberOrder;
2139
- /**
2140
- * Query transport policy for grouped temporal pivot members. This is
2141
- * projected into executable config and is never persisted authoring state.
2142
- */
2143
- dateValueMode?: 'canonical' | 'formatted';
2144
2167
  }
2145
2168
 
2146
2169
  /**
@@ -2165,6 +2188,18 @@ export declare type Placeholders = {
2165
2188
 
2166
2189
  export declare type PluginType = 'custom' | 'standard';
2167
2190
 
2191
+ declare type PresentationExecutionSnapshot = {
2192
+ version: 1;
2193
+ reportContext: ReportRuntimeContext;
2194
+ resolvedFormats: ResolvedPresentationEntry[];
2195
+ };
2196
+
2197
+ declare type PresentationScope = {
2198
+ dashboardId: string;
2199
+ cardId?: string;
2200
+ attachmentIndex?: number;
2201
+ };
2202
+
2168
2203
  declare interface QueryConfig {
2169
2204
  groupByColumns?: GroupByColumn[];
2170
2205
  pivotColumns?: GroupByColumn[];
@@ -2187,6 +2222,13 @@ declare type RangeValue = {
2187
2222
  gt?: string | number;
2188
2223
  };
2189
2224
 
2225
+ declare type RawTemporalPatternDialect = 'semaphor_tokens' | 'date_fns';
2226
+
2227
+ declare type RawTemporalPresentationTarget = {
2228
+ kind: 'column';
2229
+ columnKey: string;
2230
+ };
2231
+
2190
2232
  declare type RelativeDateFilter = {
2191
2233
  mode: 'last';
2192
2234
  n: number;
@@ -2288,6 +2330,14 @@ export declare type ResolvedDocumentInput = {
2288
2330
  exports: Record<string, string | number | boolean | null>;
2289
2331
  };
2290
2332
 
2333
+ declare type ResolvedNumericPresentationEntry = {
2334
+ scope: PresentationScope;
2335
+ target: NumericPresentationTarget;
2336
+ format: NumericCanonicalFormat;
2337
+ };
2338
+
2339
+ declare type ResolvedPresentationEntry = ResolvedNumericPresentationEntry | ResolvedTemporalBucketPresentationEntry | ResolvedRawTemporalPresentationEntry;
2340
+
2291
2341
  declare type ResolvedPrimaryDateField = (ResolvedPrimaryDateFieldBase & ({
2292
2342
  defaultGranularity?: SemaphorTimeGrain;
2293
2343
  format?: undefined;
@@ -2311,6 +2361,61 @@ declare type ResolvedPrimaryDateFieldBase = {
2311
2361
  supportedGranularities?: SemaphorTimeGrain[];
2312
2362
  };
2313
2363
 
2364
+ declare type ResolvedRawTemporalFormat = {
2365
+ type: 'raw_temporal';
2366
+ locale: string;
2367
+ calendarTimezone: string;
2368
+ /** Resolved source timezone for timezone-less wall datetimes, when authored. */
2369
+ sourceTimezone?: string;
2370
+ presentation: {
2371
+ mode: 'auto';
2372
+ styles: ResolvedTemporalStyleSet;
2373
+ } | {
2374
+ mode: 'pattern';
2375
+ dialect: RawTemporalPatternDialect;
2376
+ pattern: string;
2377
+ };
2378
+ };
2379
+
2380
+ declare type ResolvedRawTemporalPresentationEntry = {
2381
+ scope: PresentationScope;
2382
+ target: RawTemporalPresentationTarget;
2383
+ format: ResolvedRawTemporalFormat;
2384
+ };
2385
+
2386
+ declare type ResolvedTemporalBucketFormat = {
2387
+ type: 'temporal_bucket';
2388
+ locale: string;
2389
+ presentation: {
2390
+ mode: 'auto';
2391
+ styles: ResolvedTemporalStyleSet;
2392
+ };
2393
+ } | {
2394
+ type: 'temporal_bucket';
2395
+ locale: string;
2396
+ presentation: {
2397
+ mode: 'preset';
2398
+ preset: TemporalBucketPreset;
2399
+ } | {
2400
+ mode: 'pattern';
2401
+ pattern: string;
2402
+ };
2403
+ };
2404
+
2405
+ declare type ResolvedTemporalBucketPresentationEntry = {
2406
+ scope: PresentationScope;
2407
+ target: TemporalBucketPresentationTarget;
2408
+ format: ResolvedTemporalBucketFormat;
2409
+ };
2410
+
2411
+ declare type ResolvedTemporalStyleSet = {
2412
+ dateStyle: LocaleStyle;
2413
+ dateTime: {
2414
+ dateStyle: LocaleStyle;
2415
+ timeStyle: LocaleStyle;
2416
+ };
2417
+ };
2418
+
2314
2419
  declare type ResolvedValueFormatPreferences = {
2315
2420
  locale: string;
2316
2421
  dateStyle: LocaleStyle;
@@ -2459,6 +2564,8 @@ declare type SemaphorMatrixAxisLevel = {
2459
2564
  id?: string;
2460
2565
  field: SemaphorFieldRef;
2461
2566
  grain?: SemaphorMatrixTimeGrain;
2567
+ format?: TemporalBucketFormat;
2568
+ semanticTemporalPresentation?: SemaphorMatrixSemanticTemporalPresentation;
2462
2569
  label?: string;
2463
2570
  subtotal?: boolean | SemaphorMatrixSubtotalOptions;
2464
2571
  sortBy?: SemaphorMatrixAxisSortRule;
@@ -2467,7 +2574,7 @@ declare type SemaphorMatrixAxisLevel = {
2467
2574
  declare type SemaphorMatrixAxisSortRule = {
2468
2575
  direction: 'asc' | 'desc';
2469
2576
  by: {
2470
- kind: 'label';
2577
+ kind: 'member';
2471
2578
  } | {
2472
2579
  kind: 'field';
2473
2580
  field: SemaphorFieldRef;
@@ -2522,12 +2629,17 @@ declare type SemaphorMatrixMemberPathSegment = {
2522
2629
  value: unknown;
2523
2630
  };
2524
2631
 
2632
+ declare type SemaphorMatrixSemanticTemporalPresentation = {
2633
+ granularity: SemaphorMatrixTimeGrain;
2634
+ format: TemporalBucketFormat;
2635
+ };
2636
+
2525
2637
  declare type SemaphorMatrixSortRule = {
2526
2638
  axis: 'row' | 'column';
2527
2639
  targetId?: string;
2528
2640
  direction: 'asc' | 'desc';
2529
2641
  by: {
2530
- kind: 'label';
2642
+ kind: 'member';
2531
2643
  } | {
2532
2644
  kind: 'field';
2533
2645
  field: SemaphorFieldRef;
@@ -3403,6 +3515,19 @@ declare type TemporalBucketPresentation = {
3403
3515
  pattern: string;
3404
3516
  };
3405
3517
 
3518
+ declare type TemporalBucketPresentationTarget = {
3519
+ kind: 'field';
3520
+ fieldId: string;
3521
+ /** Distinguishes one semantic field used on both pivot axes. */
3522
+ role?: 'groupby' | 'pivotby';
3523
+ } | {
3524
+ kind: 'column';
3525
+ columnKey: string;
3526
+ } | {
3527
+ kind: 'matrix_axis';
3528
+ axisInstanceId: string;
3529
+ };
3530
+
3406
3531
  declare type TemporalBucketPreset = (typeof TEMPORAL_BUCKET_PRESETS)[number];
3407
3532
 
3408
3533
  declare type TemporalPrecision = 'minute';
@@ -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): {