react-semaphor 0.1.603 → 0.1.605

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 (208) hide show
  1. package/dist/activity/index.js +1 -73
  2. package/dist/analytics-protocol/index.js +1 -1491
  3. package/dist/appearance/index.js +1 -12
  4. package/dist/appearance-runtime/index.js +1 -5
  5. package/dist/assistant-context/index.js +1 -11
  6. package/dist/assistant-protocol/index.js +1 -152
  7. package/dist/brand-studio/index.js +3 -1598
  8. package/dist/briefings/index.js +1 -70
  9. package/dist/chunks/add-to-dashboard-CEmZUf9o.js +12 -0
  10. package/dist/chunks/analytics-base-schemas-DMFrDqn_.js +1 -0
  11. package/dist/chunks/appearance-provider-CfoAVQuG.js +608 -0
  12. package/dist/chunks/appearance-runtime-provider-Bx8H-moR.js +1 -0
  13. package/dist/chunks/applied-constraints-CinevlKD.js +1 -0
  14. package/dist/chunks/assistant-chat-DgUaCE9k.js +51 -0
  15. package/dist/chunks/attachment-filter-line-C_zHMhGh.js +1 -0
  16. package/dist/chunks/attribution-BEFSsbNn.js +1 -0
  17. package/dist/chunks/availability-3AIOf6Z-.js +1 -0
  18. package/dist/chunks/bookmark-impact-BAtemeyK.js +1 -0
  19. package/dist/chunks/bookmark-state-DScd31KT.js +1 -0
  20. package/dist/chunks/brand-C9APUFaP.js +1 -0
  21. package/dist/chunks/card-filter-builder-ClWrXB7P.js +11 -0
  22. package/dist/chunks/column-bands-DwxbZ6UI.js +1 -0
  23. package/dist/chunks/comparison-window-caption-tguyN24S.js +1 -0
  24. package/dist/chunks/context-CntvtZwC.js +2 -0
  25. package/dist/chunks/conversation-JMK2kyTK.js +1 -0
  26. package/dist/chunks/dashboard-ChIcbVTx.js +1 -0
  27. package/dist/chunks/dashboard-briefing-launcher-CwMlhkxV.js +42 -0
  28. package/dist/chunks/dashboard-controls-UCSAFCGA.js +42 -0
  29. package/dist/chunks/dashboard-json-B120hYDa.js +1 -0
  30. package/dist/chunks/dashboard-temporal-snapshot-BFJKbp_6.js +1 -0
  31. package/dist/chunks/edit-dashboard-visual-DvHp03h_.js +73 -0
  32. package/dist/chunks/export-file-format-B-wQNHIn.js +4 -0
  33. package/dist/chunks/filter-line-WwUV5JzN.js +1 -0
  34. package/dist/chunks/filter-reach-preview-C5M5_hf_.js +1 -0
  35. package/dist/chunks/filter-value-text-DqTHe_vu.js +1 -0
  36. package/dist/chunks/index-DViPGDFj.js +1 -0
  37. package/dist/chunks/index-bkP6SnYu.js +1 -0
  38. package/dist/chunks/kpi-trend-rule-B87LNzcz.js +1 -0
  39. package/dist/chunks/layout-grid-CFzqJ7GC.js +6 -0
  40. package/dist/chunks/matrix-analytical-definition-5T-2euHZ.js +1 -0
  41. package/dist/chunks/matrix-member-presentation-vVAv-aqg.js +1 -0
  42. package/dist/chunks/matrix-operation-contract-CWvcEsQ0.js +1 -0
  43. package/dist/chunks/normalize-dashboard-for-dirty-check-ILKfqgL3.js +1 -0
  44. package/dist/chunks/numeric-range-options-C8tr-Bls.js +1 -0
  45. package/dist/chunks/palette-NvEIuXHN.js +6 -0
  46. package/dist/chunks/pivot-result-contract-expectations-BNWhS8mv.js +1 -0
  47. package/dist/chunks/pivot-result-identity-B0eWVMXg.js +1 -0
  48. package/dist/chunks/raw-temporal-value-BHQ-ldpW.js +1 -0
  49. package/dist/chunks/rendered-file-BbvwaU6z.js +1 -0
  50. package/dist/chunks/report-preferences-dialog-Bseb2Rlg.js +1 -0
  51. package/dist/chunks/report-runtime-context-Cd1b5pku.js +1 -0
  52. package/dist/chunks/resolve-dashboard-input-context-BDY7KwRe.js +8 -0
  53. package/dist/chunks/resolver-CjsW8Rz0.js +1 -0
  54. package/dist/chunks/saved-dashboard-context-C3lWc4Dx.js +1 -0
  55. package/dist/chunks/schema-O1Y3WTGF.js +4 -0
  56. package/dist/chunks/selection-filter-compiler-kYsRugss.js +1 -0
  57. package/dist/chunks/semaphor-ready-indicator-BQarSo6S.js +612 -0
  58. package/dist/chunks/set-6mOnfQeH.js +1 -0
  59. package/dist/chunks/slider-BPnHdMGq.js +4 -0
  60. package/dist/chunks/stored-dashboard-DfrxDLhR.js +1 -0
  61. package/dist/chunks/table-export-sheet-xaczzWZF.js +2 -0
  62. package/dist/chunks/token-types-1vzMWjI-.js +1 -0
  63. package/dist/chunks/validators-Dg2kyF4_.js +1 -0
  64. package/dist/chunks/variable-draft-B4_xqr4Y.js +1 -0
  65. package/dist/chunks/visual-choice-DgEFfkE-.js +1 -0
  66. package/dist/dashboard/index.js +1 -7
  67. package/dist/dashboard-authoring/index.js +1 -4614
  68. package/dist/format-utils/index.js +1 -425
  69. package/dist/index.js +1 -554
  70. package/dist/layouts/index.js +1 -7
  71. package/dist/live-channel/index.js +1 -124
  72. package/dist/pdf-export-policy/index.js +1 -92
  73. package/dist/pdf-table-layout/index.js +1 -993
  74. package/dist/report-runtime-context/index.js +1 -9
  75. package/dist/shared/index.js +1 -6
  76. package/dist/style.css +1 -1
  77. package/dist/surfboard/index.js +1 -9
  78. package/dist/types/brand-studio/brand-studio-draft.d.ts +45 -13
  79. package/dist/types/brand-studio/brand-studio-editor.d.ts +13 -2
  80. package/dist/types/components/index.d.ts +1 -0
  81. package/dist/types/components/visual/data-table/hooks/use-data-table-logic.d.ts +17 -6
  82. package/dist/types/components/visual/data-table/types/data-table.d.ts +52 -42
  83. package/dist/types/index.js +1 -88
  84. package/dist/types/lib/appearance/aliases.d.ts +3 -0
  85. package/dist/types/lib/appearance/index.d.ts +1 -0
  86. package/dist/types/lib/appearance/table-density.d.ts +18 -0
  87. package/dist/types/lib/appearance/types.d.ts +39 -1
  88. package/dist/types/lib/dashboard-viewer/column-header-actions.d.ts +100 -0
  89. package/dist/types/lib/dashboard-viewer/table-view-edit.d.ts +0 -27
  90. package/dist/types/lib/dashboard-viewer/table-view.d.ts +26 -2
  91. package/dist/types/lib/dashboard-viewer/use-table-view.d.ts +2 -0
  92. package/dist/types/lib/filter-values/build-card-filter-definition.d.ts +32 -0
  93. package/dist/types/lib/hooks/use-add-new-frame.d.ts +7 -0
  94. package/dist/types/lib/hooks/use-dashboard-card.d.ts +4 -0
  95. package/dist/types/lib/interactions/get-click-context-from-chartjs.d.ts +8 -0
  96. package/dist/types/lib/query-context/dashboard-filter-mapping-resolution.d.ts +9 -0
  97. package/dist/types/lib/stores/dashboard-store.d.ts +14 -2
  98. package/dist/types/lib/stores/explorer-actions.d.ts +7 -10
  99. package/dist/types/lib/types/common-types.d.ts +1 -2
  100. package/dist/types/lib/types/semantic-types.d.ts +6 -10
  101. package/dist/types/lib/utils/card-config-utils.d.ts +13 -0
  102. package/dist/types/lib/utils/field-placement.d.ts +17 -0
  103. package/dist/types/lib/utils/field-state-calculator.d.ts +7 -19
  104. package/dist/types/shared/analytics-protocol/analytics-refusal.d.ts +21 -1
  105. package/dist/types/shared/analytics-protocol/field-provenance.d.ts +7 -4
  106. package/dist/types/shared/dashboard-authoring/calculations/definition.d.ts +13 -0
  107. package/dist/types/shared/dashboard-authoring/card-data-source/card-base.d.ts +125 -0
  108. package/dist/types/shared/dashboard-authoring/card-data-source/card-field-folders.d.ts +55 -0
  109. package/dist/types/shared/dashboard-authoring/card-data-source/card-joins.d.ts +114 -0
  110. package/dist/types/shared/dashboard-authoring/card-data-source/card-prune.d.ts +12 -0
  111. package/dist/types/shared/dashboard-authoring/card-data-source/filter-field-catalog.d.ts +60 -0
  112. package/dist/types/shared/dashboard-authoring/card-data-source/filter-field-folders.d.ts +180 -0
  113. package/dist/types/shared/dashboard-authoring/card-data-source/index.d.ts +7 -0
  114. package/dist/types/shared/dashboard-authoring/card-data-source/join-reach.d.ts +42 -0
  115. package/dist/types/shared/dashboard-authoring/card-field-places.d.ts +28 -0
  116. package/dist/types/shared/dashboard-authoring/card-settings/card-display-write.d.ts +2 -8
  117. package/dist/types/shared/dashboard-authoring/card-settings/card-kinds.d.ts +1 -1
  118. package/dist/types/shared/dashboard-authoring/card-settings/column-display-values.d.ts +5 -0
  119. package/dist/types/shared/dashboard-authoring/card-settings/column-display.d.ts +52 -0
  120. package/dist/types/shared/dashboard-authoring/card-settings/index.d.ts +1 -0
  121. package/dist/types/shared/dashboard-authoring/card-settings/inputs.d.ts +9 -0
  122. package/dist/types/shared/dashboard-authoring/card-settings/resolved.d.ts +4 -0
  123. package/dist/types/shared/dashboard-authoring/card-settings/table-viewer-switches.d.ts +15 -0
  124. package/dist/types/shared/dashboard-authoring/card-settings/views.d.ts +5 -0
  125. package/dist/types/shared/dashboard-authoring/changes/card-query-part.d.ts +6 -0
  126. package/dist/types/shared/dashboard-authoring/changes/dashboard-change.d.ts +132 -3
  127. package/dist/types/shared/dashboard-authoring/changes/diagnostics.d.ts +3 -1
  128. package/dist/types/shared/dashboard-authoring/conditional-formatting/schema.d.ts +10 -10
  129. package/dist/types/shared/dashboard-authoring/conditional-formatting/store.d.ts +10 -1
  130. package/dist/types/shared/dashboard-authoring/field-aggregations.d.ts +9 -2
  131. package/dist/types/shared/dashboard-authoring/field-folders/field-folders.d.ts +116 -0
  132. package/dist/types/shared/dashboard-authoring/field-folders/index.d.ts +1 -0
  133. package/dist/types/shared/dashboard-authoring/filter-reach-decision.d.ts +11 -0
  134. package/dist/types/shared/dashboard-authoring/index.d.ts +7 -1
  135. package/dist/types/shared/dashboard-authoring/operations/card-operations.d.ts +2 -0
  136. package/dist/types/shared/dashboard-authoring/operations/operation-types.d.ts +7 -2
  137. package/dist/types/shared/dashboard-authoring/outline/outline-dashboard.d.ts +6 -2
  138. package/dist/types/shared/dashboard-authoring/outline/outline-filters.d.ts +2 -0
  139. package/dist/types/shared/dashboard-authoring/see-records/result.d.ts +7 -22
  140. package/dist/types/shared/dashboard-authoring/sheet-kinds.d.ts +36 -0
  141. package/dist/types/shared/dashboard-authoring/table-sheet-shape.d.ts +140 -0
  142. package/dist/types/shared/dashboard-viewer/table-column-move.d.ts +15 -0
  143. package/dist/types/shared/dashboard-viewer/table-settings.d.ts +8 -2
  144. package/dist/types/shared/format-utils/types/format-types.d.ts +1 -1
  145. package/dist/usage-events/index.js +1 -285
  146. package/dist/value-format-preferences/index.js +1 -635
  147. package/package.json +5 -2
  148. package/dist/chunks/add-to-dashboard-CFF-wFU-.js +0 -291
  149. package/dist/chunks/analytics-base-schemas-DsUh5Q3C.js +0 -680
  150. package/dist/chunks/appearance-context-BwBp25ZG.js +0 -162
  151. package/dist/chunks/appearance-runtime-provider-BRHYELkC.js +0 -80
  152. package/dist/chunks/applied-constraints-DU-wndZ7.js +0 -47
  153. package/dist/chunks/assistant-chat-B6hNQI1t.js +0 -6115
  154. package/dist/chunks/attribution-BvoKvhcj.js +0 -32
  155. package/dist/chunks/availability-Bp5Gfu1I.js +0 -44
  156. package/dist/chunks/bookmark-impact-Ba2PLcGp.js +0 -76
  157. package/dist/chunks/bookmark-state-n7AaNzR_.js +0 -1667
  158. package/dist/chunks/brand-BoUV0iHF.js +0 -54
  159. package/dist/chunks/card-filter-builder-Y22HizVx.js +0 -4069
  160. package/dist/chunks/column-bands-RdM-kjDe.js +0 -47
  161. package/dist/chunks/comparison-window-caption-Ck2TIbnR.js +0 -741
  162. package/dist/chunks/context-UCQ7sere.js +0 -369
  163. package/dist/chunks/conversation-sQiWYUOb.js +0 -16
  164. package/dist/chunks/dashboard-BghI99oY.js +0 -14
  165. package/dist/chunks/dashboard-briefing-launcher-DtBAnGiH.js +0 -4875
  166. package/dist/chunks/dashboard-controls-CtFXlyjV.js +0 -2290
  167. package/dist/chunks/dashboard-json-DfGBUtCd.js +0 -66
  168. package/dist/chunks/dates-BnrXF4bb.js +0 -185
  169. package/dist/chunks/edit-9df1zOWe.js +0 -226
  170. package/dist/chunks/edit-dashboard-visual-oxt3x1wb.js +0 -18397
  171. package/dist/chunks/export-file-format-C-tJsxsf.js +0 -111
  172. package/dist/chunks/filter-line-Cy5YYqRL.js +0 -703
  173. package/dist/chunks/filter-reach-copy-CE_ZX147.js +0 -5111
  174. package/dist/chunks/filter-value-text-fWvSDwkl.js +0 -153
  175. package/dist/chunks/index-BVKzKl5d.js +0 -90
  176. package/dist/chunks/index-CV_Kzou0.js +0 -595
  177. package/dist/chunks/index-D5rxbtS4.js +0 -2795
  178. package/dist/chunks/layout-grid-9LndRoLa.js +0 -16
  179. package/dist/chunks/matrix-analytical-definition-CCp48UCw.js +0 -1233
  180. package/dist/chunks/matrix-member-presentation-zNehruXR.js +0 -391
  181. package/dist/chunks/matrix-operation-contract-DPBj69D8.js +0 -1413
  182. package/dist/chunks/metric-comparison-B0FR-Q8I.js +0 -600
  183. package/dist/chunks/normalize-dashboard-for-dirty-check-XKgH3GFX.js +0 -119
  184. package/dist/chunks/paintbrush-58FQYY-y.js +0 -27
  185. package/dist/chunks/palette-Be62Tkoa.js +0 -23
  186. package/dist/chunks/pickers-DkqmtnTL.js +0 -2403
  187. package/dist/chunks/pivot-result-contract-expectations-BYqAmG9n.js +0 -5092
  188. package/dist/chunks/pivot-result-identity-CAP4--iq.js +0 -77
  189. package/dist/chunks/raw-temporal-value-Dg_MTFF7.js +0 -3778
  190. package/dist/chunks/rendered-file-D8xEuVVx.js +0 -108
  191. package/dist/chunks/report-preferences-dialog-uJp9GBTM.js +0 -1651
  192. package/dist/chunks/report-runtime-context-c77_KF9v.js +0 -388
  193. package/dist/chunks/resolve-dashboard-input-context-Rtl1ffmE.js +0 -25324
  194. package/dist/chunks/resolver-DG_tfEpt.js +0 -156
  195. package/dist/chunks/save-C5A0JnEV.js +0 -21
  196. package/dist/chunks/saved-dashboard-context-tcyTU8jm.js +0 -618
  197. package/dist/chunks/schema-C9NPiIru.js +0 -2568
  198. package/dist/chunks/selection-filter-compiler-DNijjI5y.js +0 -150
  199. package/dist/chunks/semaphor-ready-indicator-FBvunj6S.js +0 -145603
  200. package/dist/chunks/shelf-drop-preview-context-QKStrcK9.js +0 -2466
  201. package/dist/chunks/stored-dashboard-CHozcAY9.js +0 -4075
  202. package/dist/chunks/style-sheet-parts-CDCG-8Ej.js +0 -8681
  203. package/dist/chunks/table-export-sheet-ZFIvs6Sj.js +0 -949
  204. package/dist/chunks/token-types-XbM6QByy.js +0 -8
  205. package/dist/chunks/upload-H15d7uHK.js +0 -15
  206. package/dist/chunks/validators-Baf3VIf5.js +0 -3686
  207. package/dist/chunks/variable-draft-C2y8Jp6Z.js +0 -242
  208. package/dist/chunks/visual-choice-DDfHfHvY.js +0 -172
@@ -1,9 +1 @@
1
- import { a, R as s, D as o } from "../chunks/report-preferences-dialog-uJp9GBTM.js";
2
- import { C as f, E as D } from "../chunks/bookmark-state-n7AaNzR_.js";
3
- export {
4
- f as CONTROL_CARD_DEFAULT_VALUE,
5
- a as DisplayFormatPreferencesFields,
6
- D as EMPTY_SELECTION,
7
- s as ReportPreferencesDialog,
8
- o as Surfboard
9
- };
1
+ import{a,R as s,D as o}from"../chunks/report-preferences-dialog-Bseb2Rlg.js";import{C as f,E as D}from"../chunks/bookmark-state-DScd31KT.js";export{f as CONTROL_CARD_DEFAULT_VALUE,a as DisplayFormatPreferencesFields,D as EMPTY_SELECTION,s as ReportPreferencesDialog,o as Surfboard};
@@ -1,12 +1,13 @@
1
+ import { AppearanceValidationIssue } from '../lib/appearance/types.js';
1
2
  import { APPEARANCE_SPEC_VERSION, AppearanceSpec } from '../lib/appearance/index.js';
2
3
  type AppearanceMode = 'light' | 'dark' | 'system';
3
4
  type AppearanceSchemeName = 'light' | 'dark';
4
- type AppearanceDensity = 'compact' | 'comfortable' | 'spacious';
5
5
  type AppearanceScheme = NonNullable<NonNullable<AppearanceSpec['schemes']>[AppearanceSchemeName]>;
6
6
  type AppearanceTokens = NonNullable<AppearanceScheme['tokens']>;
7
7
  type AppearanceComponents = NonNullable<AppearanceScheme['components']>;
8
8
  type AppearanceColorTokens = NonNullable<AppearanceTokens['color']>;
9
9
  type AppearanceTable = NonNullable<AppearanceComponents['table']>;
10
+ type AppearanceDocumentTable = NonNullable<AppearanceComponents['documentTable']>;
10
11
  export type BrandStudioDraft = {
11
12
  version: typeof APPEARANCE_SPEC_VERSION;
12
13
  mode: AppearanceMode;
@@ -33,19 +34,15 @@ type RequiredBrandStudioComponents = {
33
34
  card: NonNullable<AppearanceComponents['card']>;
34
35
  interactive: NonNullable<AppearanceComponents['interactive']>;
35
36
  chart: Required<NonNullable<AppearanceComponents['chart']>>;
36
- table: RequiredTableAppearance;
37
+ /**
38
+ * The tables' look as the brand and the defaults set it, nothing filled in: the
39
+ * Tables section reads what renders through `resolveTableStyle` and writes fields
40
+ * here (table style SPEC §2.6), so an untouched save stores nothing for tables.
41
+ */
42
+ table: AppearanceTable;
43
+ documentTable: AppearanceDocumentTable;
37
44
  pagination: NonNullable<AppearanceComponents['pagination']>;
38
45
  };
39
- type RequiredTableAppearance = {
40
- density: AppearanceDensity;
41
- container: NonNullable<AppearanceTable['container']>;
42
- header: Required<NonNullable<AppearanceTable['header']>>;
43
- row: Required<Omit<NonNullable<AppearanceTable['row']>, 'selectedBackground'>>;
44
- cell: Required<NonNullable<AppearanceTable['cell']>>;
45
- subtotal: Required<NonNullable<AppearanceTable['subtotal']>>;
46
- grandTotal: Required<NonNullable<AppearanceTable['grandTotal']>>;
47
- pagination: Required<NonNullable<AppearanceTable['pagination']>>;
48
- };
49
46
  type BrandStudioPreset = {
50
47
  id: string;
51
48
  name: string;
@@ -74,9 +71,21 @@ type PresetScheme = {
74
71
  export declare const BRAND_STUDIO_PRESETS: BrandStudioPreset[];
75
72
  export declare function createBrandStudioDraft(appearance?: AppearanceSpec | null): BrandStudioDraft;
76
73
  export declare function buildAppearanceSpecFromDraft(draft: BrandStudioDraft): AppearanceSpec;
74
+ /** A draft that doesn't validate, carrying the validator's first issue so the editor can name the field. */
75
+ export declare class BrandStudioDraftError extends Error {
76
+ readonly issue: AppearanceValidationIssue;
77
+ constructor(issue: AppearanceValidationIssue);
78
+ }
79
+ /**
80
+ * The draft as the product will draw it once saved: what Save writes (`brandStudioSaveSpec`,
81
+ * sparse), over the defaults, as the runtime loads a saved brand. Every Brand Studio read of
82
+ * what renders goes through this (the Tables controls and preview, the Dashboards controls,
83
+ * the preview pane), so none can show what doesn't save (review hotspot H-BS-1).
84
+ */
85
+ export declare function resolveBrandStudioDraft(draft: BrandStudioDraft): import('../lib/appearance/index.js').NormalizedAppearanceSpec;
77
86
  /**
78
87
  * The brand as it is saved: what differs from the defaults, on one path each
79
- * (dashboard style API-3). A component colour the draft only copied from its token
88
+ * (dashboard style API-3). A component color the draft only copied from its token
80
89
  * on the dashboard canvas or the card frame (the editor's shape fills them) is left
81
90
  * to the token, so a later token change still reaches that surface.
82
91
  */
@@ -84,4 +93,27 @@ export declare function brandStudioSaveSpec(draft: BrandStudioDraft): Appearance
84
93
  export declare function applyBrandStudioPreset(draft: BrandStudioDraft, presetId: string): BrandStudioDraft;
85
94
  export declare function applyBrandStudioColorToken(scheme: RequiredBrandStudioScheme, token: BrandStudioColorToken, value: string): void;
86
95
  export declare function applyBrandStudioRadiusToken(scheme: RequiredBrandStudioScheme, token: BrandStudioRadiusToken, value: number): void;
96
+ /** Whether two colors are the same, whatever their notation (`#18181b`, `hsl(240 5.9% 10%)`). */
97
+ export declare function sameColor(a: string | undefined, b: string | undefined): boolean;
98
+ /** The default value of a color token in a scheme, for a color's reset. */
99
+ export declare function defaultColorToken(scheme: AppearanceSchemeName, token: BrandStudioColorToken): string | undefined;
100
+ /**
101
+ * How many settings differ between the draft and the saved brand, for "Save 3
102
+ * changes": the leaves each would save, less a token's copies, with a setting both
103
+ * schemes now share counted once. Undefined while the draft is invalid.
104
+ */
105
+ export declare function countDraftChanges(draft: BrandStudioDraft, saved: AppearanceSpec | null | undefined): number | undefined;
106
+ /**
107
+ * Table colors an earlier Brand Studio copied from the color tokens (table style
108
+ * ledger P3-11): a field it filled, without a control now, equal to one of its
109
+ * scheme's color tokens. They no
110
+ * longer follow the tokens; `followTokenColors` removes them so they do.
111
+ */
112
+ export declare function copiedTableColors(draft: BrandStudioDraft): Array<{
113
+ scheme: AppearanceSchemeName;
114
+ part: string;
115
+ key: string;
116
+ }>;
117
+ /** The draft with every copied table color removed, so tables follow the color tokens again. */
118
+ export declare function followTokenColors(draft: BrandStudioDraft): BrandStudioDraft;
87
119
  export {};
@@ -2,7 +2,12 @@ import { default as React } from 'react';
2
2
  import { AppearanceSpec } from '../lib/appearance/index.js';
3
3
  export type BrandStudioEditorProps = {
4
4
  appearance?: AppearanceSpec | null;
5
- previewTitle?: string;
5
+ /**
6
+ * `page`: a section list, one section and a live preview side by side (the
7
+ * organization's Brand Studio page). `panel`: a narrow side panel beside a live
8
+ * dashboard, which is the preview (the default).
9
+ */
10
+ layout?: 'page' | 'panel';
6
11
  isLoading?: boolean;
7
12
  isSaving?: boolean;
8
13
  error?: string | null;
@@ -12,4 +17,10 @@ export type BrandStudioEditorProps = {
12
17
  onClearConfig?: () => void | Promise<void>;
13
18
  onCancel?: () => void;
14
19
  };
15
- export declare function BrandStudioEditor({ appearance, previewTitle, isLoading, isSaving, error, className, onDraftChange, onSave, onClearConfig, onCancel, }: BrandStudioEditorProps): React.JSX.Element;
20
+ /**
21
+ * Brand Studio (mock /design/admin/brand-studio): one section at a time, beside a
22
+ * live preview. Brand sets the look in four choices; the other sections fine-tune
23
+ * it. Colors belong to the scheme being edited; every other setting applies to
24
+ * both. Save names how many settings changed.
25
+ */
26
+ export declare function BrandStudioEditor({ appearance, layout, isLoading, isSaving, error, className, onDraftChange, onSave, onClearConfig, onCancel, }: BrandStudioEditorProps): React.JSX.Element;
@@ -35,6 +35,7 @@ export { VisualEditingControls } from './editor/editor-main/visual-editing-contr
35
35
  export { AdvancedModeToggle } from './editor/editor-main/advanced-mode-toggle.js';
36
36
  export { AssistantProvider } from './assistant/assistant-provider.js';
37
37
  export { AssistantPanel, AssistantToolbarButton } from './assistant/assistant-entry-points.js';
38
+ export { isGridSheet, isTableSheet, sheetKindOf } from '../shared/dashboard-authoring/sheet-kinds.js';
38
39
  export { ArrangeLayoutButton } from './surfboard/arrange-layout-button.js';
39
40
  export { ScreenSizePreviewButton } from './surfboard/screen-size-preview-button.js';
40
41
  export { DashboardFavoriteToggle } from './dashboard/favorites/dashboard-favorite-toggle.js';
@@ -1,4 +1,5 @@
1
- import { ColumnSettings, ColumnSettingsMap, TableColumnOrderChange } from '../types/data-table.js';
1
+ import { ColumnShapes, ColumnHeaderAction } from '../../../../lib/dashboard-viewer/column-header-actions.js';
2
+ import { DataTableRow, ColumnSettings, ColumnSettingsMap } from '../types/data-table.js';
2
3
  import { default as React } from 'react';
3
4
  import { SortingState, RowSelectionState, VisibilityState, ColumnSizingState } from '@tanstack/react-table';
4
5
  import { ComparisonMetadataMap } from '../../../../lib/types/query-types.js';
@@ -7,13 +8,14 @@ import { RawTemporalValueKind, SemaphorResultColumn } from '../../../../shared/a
7
8
  import { ConditionalFormattingRenderContext, TableBaseFormatting, TableBaseStyle } from '../../../../lib/table-formatting/index.js';
8
9
  import { RawTemporalPresentation } from '../../../../lib/formatters/raw-temporal-presentation.js';
9
10
  import { ViewerDataTable } from '../../../../lib/dashboard-viewer/use-table-view.js';
11
+ import { TableView } from '../../../../lib/dashboard-viewer/table-view.js';
10
12
  /**
11
13
  * A dashboard table seen by a viewer (dashboard bookmarks): the viewer's table
12
14
  * settings shape the columns and the sort is controlled by them. Absent in the
13
15
  * editor and while the dashboard is edited.
14
16
  */
15
17
  export type DataTableViewerContext = ViewerDataTable;
16
- interface DataTableLogicProps {
18
+ export interface DataTableLogicProps {
17
19
  data: any[];
18
20
  resultColumns?: SemaphorResultColumn[];
19
21
  columnKeyMap?: QueryColumnKeyMap;
@@ -37,7 +39,6 @@ interface DataTableLogicProps {
37
39
  onColumnVisibilityChange?: (columnId: string, isVisible: boolean) => void;
38
40
  onSortChange?: (sorting: SortingState) => void;
39
41
  sortState?: SortingState;
40
- onColumnOrderChange?: (change: TableColumnOrderChange) => void;
41
42
  columnSizing?: ColumnSizingState;
42
43
  onColumnSizingChange?: (updater: ColumnSizingState | ((old: ColumnSizingState) => ColumnSizingState)) => void;
43
44
  card?: any;
@@ -50,10 +51,21 @@ interface DataTableLogicProps {
50
51
  headerWrapText?: boolean;
51
52
  appearanceWrapText?: boolean;
52
53
  viewerTable?: DataTableViewerContext;
54
+ /**
55
+ * Hold the view's pinned columns at the left edge (table sheets PIN-3): on
56
+ * screen only, never in print or a download's render.
57
+ */
58
+ pinColumns?: boolean;
59
+ /** An author's Pin or Move from the header menu (the card editor, a Table sheet in edit mode): writes the card. */
60
+ onAuthorColumnHeaderAction?: (outputKey: string, action: ColumnHeaderAction, view: TableView) => void;
61
+ /** The author's menu offers Group rows by, Spread across and Remove (a Table sheet's table, TS-D30), with its date fields. */
62
+ authorShapes?: ColumnShapes;
63
+ /** A Table sheet author's "add a column" control, drawn after the last header and held at the right edge (option C). */
64
+ addColumn?: React.ReactNode;
53
65
  }
54
66
  export declare function useDataTableLogic(props: DataTableLogicProps): {
55
67
  table: import('@tanstack/table-core').Table<any>;
56
- tableView: import('../../../../lib/dashboard-viewer/table-view.js').TableView;
68
+ tableView: TableView;
57
69
  columnSettingsToUse: ColumnSettingsMap;
58
70
  selectColumnVisible: boolean;
59
71
  columnVisibilityToUse: VisibilityState;
@@ -83,7 +95,7 @@ export declare function useDataTableLogic(props: DataTableLogicProps): {
83
95
  internalSelectColumnVisible: boolean;
84
96
  getRowStyle: (_row: any) => React.CSSProperties;
85
97
  setColumnSettingsOpen: React.Dispatch<React.SetStateAction<boolean>>;
86
- columns: import('@tanstack/table-core').ColumnDef<import('../types/data-table.js').DataTableRow>[];
98
+ columns: import('@tanstack/table-core').ColumnDef<DataTableRow>[];
87
99
  internalColumnVisibility: VisibilityState;
88
100
  totalColumns: number;
89
101
  totalRows: number;
@@ -104,4 +116,3 @@ export declare function useDataTableLogic(props: DataTableLogicProps): {
104
116
  rawTemporalPresentation: RawTemporalPresentation | undefined;
105
117
  usesDeclaredSqlRawTemporalPresentation: boolean;
106
118
  };
107
- export {};
@@ -1,6 +1,8 @@
1
+ import { MonospaceLines, StatusTone } from '../../../../shared/dashboard-authoring/card-settings/column-display-values.js';
1
2
  import { SeeRecordsOfferFor } from '../../../../lib/see-records/use-see-records-offer.js';
3
+ import { ColumnShapes } from '../../../../lib/dashboard-viewer/column-header-actions.js';
2
4
  import { TCard } from '../../../../lib/types/common-types.js';
3
- import { CSSProperties } from 'react';
5
+ import { CSSProperties, ReactNode } from 'react';
4
6
  import { Column, SortingState, ColumnSizingState } from '@tanstack/react-table';
5
7
  import { PaginationMetadata, QueryColumnKeyMap } from '../../../../lib/types/explorer-types.js';
6
8
  import { Interaction } from '../../../../lib/types/interaction-types.js';
@@ -12,14 +14,6 @@ import { ConditionalFormattingRenderContext, TableBaseFormatting, TableBaseStyle
12
14
  import { ColumnTextWrap } from '../../../../lib/table-formatting/table-text-flow.js';
13
15
  import { RawTemporalValueKind, SemaphorResultColumn } from '../../../../shared/analytics-protocol/index.js';
14
16
  import { TableColumnId } from '../../../../shared/dashboard-viewer/table-settings.js';
15
- /** A header drag's result, ready for `writeTableColumnOrder(card, order, baseline)`. */
16
- export type TableColumnOrderChange = {
17
- readonly order: readonly TableColumnId[];
18
- readonly baseline: {
19
- readonly fieldOrder: readonly TableColumnId[];
20
- readonly pivoted: boolean;
21
- };
22
- };
23
17
  export type { ColumnTextWrap } from '../../../../lib/table-formatting/table-text-flow.js';
24
18
  export interface LinkFormat {
25
19
  urlTemplate: string;
@@ -27,9 +21,26 @@ export interface LinkFormat {
27
21
  staticLabel?: string;
28
22
  labelColumn?: string;
29
23
  openInNewTab: boolean;
24
+ /** An external-link icon after the label (table style TS-D18); off by default. */
25
+ showIcon?: boolean;
30
26
  }
27
+ export type { MonospaceLines, StatusTone };
31
28
  export interface ColumnSettings {
32
- type: 'none' | 'text' | 'number' | 'date' | 'badge' | 'link' | 'progress';
29
+ /**
30
+ * How the column shows its values ("Display as", table style TS-D15). `badge` is
31
+ * shown as Status (its saved id kept); `mono` is Monospace. Written for Text,
32
+ * Monospace, Status and Link through `writeColumnDisplay` only.
33
+ */
34
+ type: 'none' | 'text' | 'mono' | 'number' | 'date' | 'badge' | 'link' | 'progress';
35
+ /** Monospace: lines shown before Show more (default 3); print shows every line (TS-D16). */
36
+ mono?: {
37
+ maxLines: MonospaceLines;
38
+ };
39
+ /** Status: a pill or a dot, and a tone per value; a value with none is grey (TS-D17). */
40
+ badge?: {
41
+ style: 'pill' | 'dot';
42
+ tones: Record<string, StatusTone>;
43
+ };
33
44
  inheritMetricFormat?: boolean;
34
45
  textAlign: 'left' | 'center' | 'right';
35
46
  width: number;
@@ -69,26 +80,11 @@ export interface ColumnSettings {
69
80
  linkFormat: LinkFormat;
70
81
  }
71
82
  /**
72
- * Row rhythm for the whole table. Authors pick one per card; undefined
73
- * falls back to 'compact' (the canonical default — dense scanning, matches
74
- * the Linear-style spec). Drives row padding, cell font size, and header
75
- * font size via a shared density spec in DataTable.
83
+ * Whether a table's totals row shows, and each measure's total. How it looks is
84
+ * the theme's (table style TS-D12); a saved look field is never read.
76
85
  */
77
- export type TableDensity = 'dense' | 'compact' | 'standard' | 'comfortable' | 'spacious';
78
- export type TableHeaderStyle = 'plain' | 'filled' | 'accent';
79
- export type TableGridLines = 'none' | 'outer' | 'inner' | 'horizontal' | 'vertical' | 'top' | 'right' | 'bottom' | 'left' | 'full';
80
- export type TableTotalsFontWeight = 'normal' | 'medium' | 'semibold' | 'bold';
81
- /** How the totals row looks. */
82
- export type TableTotalsRowStyle = {
86
+ export type TableTotalsStylePreferences = {
83
87
  enabled?: boolean;
84
- backgroundColor?: string;
85
- textColor?: string;
86
- fontWeight?: TableTotalsFontWeight;
87
- borderTop?: boolean;
88
- borderTopStyle?: 'solid' | 'dashed' | 'dotted' | 'double';
89
- borderTopColor?: string;
90
- };
91
- export type TableTotalsStylePreferences = TableTotalsRowStyle & {
92
88
  /**
93
89
  * Each measure's total, keyed by the measure instance's result alias
94
90
  * (`resolveMetricResultAlias`). Missing means overall (table overall totals
@@ -96,13 +92,14 @@ export type TableTotalsStylePreferences = TableTotalsRowStyle & {
96
92
  */
97
93
  measures?: Record<string, TableMeasureTotal>;
98
94
  };
95
+ /**
96
+ * A table's own display settings (table style TS-D12): Wrap text, which depends
97
+ * on the content (unset follows the theme), and the totals row. Every other look
98
+ * setting is the theme's; saved cards may still hold the old fields (`density`,
99
+ * `headerStyle`, colours, `gridLines`, `stripedRows`, the totals look), which
100
+ * nothing reads (TS-D2, TS-D13).
101
+ */
99
102
  export type TableStylePreferences = {
100
- headerStyle?: TableHeaderStyle;
101
- headerBackgroundColor?: string;
102
- headerTextColor?: string;
103
- headerWrapText?: boolean;
104
- stripedRows?: boolean;
105
- gridLines?: TableGridLines;
106
103
  wrapText?: boolean;
107
104
  totals?: TableTotalsStylePreferences;
108
105
  };
@@ -115,7 +112,6 @@ export type TablePreferences = {
115
112
  pageSize?: number;
116
113
  enableDevModePagination?: boolean;
117
114
  forceClientPagination?: boolean;
118
- density?: TableDensity;
119
115
  tableStyle?: TableStylePreferences;
120
116
  /**
121
117
  * Viewers may hide, reorder and rename this table's columns for themselves,
@@ -143,6 +139,14 @@ export type TablePreferences = {
143
139
  * Unknown ids are ignored on read. Display only: the query never reads it.
144
140
  */
145
141
  columnOrder?: TableColumnId[];
142
+ /**
143
+ * The author's pinned columns (table sheets TS-D9): held at the left edge,
144
+ * in the table's column order, while it scrolls sideways. By column id;
145
+ * absent when none. A viewer's own pins replace them. Display only: the
146
+ * query, the column order and downloads never read it. Written only by
147
+ * `writeTableColumnPinned`.
148
+ */
149
+ pinnedColumns?: TableColumnId[];
146
150
  };
147
151
  export type PersistedColumnSettings = Omit<Partial<ColumnSettings>, 'numberFormat' | 'dateFormat'> & {
148
152
  numberFormat?: Partial<ColumnSettings['numberFormat']>;
@@ -209,13 +213,12 @@ export interface DataTableProps {
209
213
  * table settings shape the columns and control the sort.
210
214
  */
211
215
  viewerTable?: import('../hooks/use-data-table-logic.js').DataTableViewerContext;
212
- /**
213
- * The author dragged a column header to a place the move rule allows
214
- * (table column order TCO-D7, TCO-D9): `order` is the next author order and
215
- * `baseline` what `writeTableColumnOrder` stores it against. Set only in the
216
- * editor; its presence turns on the grips of movable columns.
217
- */
218
- onColumnOrderChange?: (change: TableColumnOrderChange) => void;
216
+ /** An author's Pin or Move from the header menu (table sheets spec M5): the card editor's or a Table sheet's card write. */
217
+ onAuthorColumnHeaderAction?: import('../hooks/use-data-table-logic.js').DataTableLogicProps['onAuthorColumnHeaderAction'];
218
+ /** The author's menu offers Group rows by, Spread across and Remove (a Table sheet's table, TS-D30), with its date fields. */
219
+ authorShapes?: ColumnShapes;
220
+ /** A Table sheet author's "add a column" control at the end of the header row (option C). */
221
+ addColumn?: ReactNode;
219
222
  paginationMetadata?: PaginationMetadata;
220
223
  onPaginationChange?: (pageIndex: number, pageSize: number) => void;
221
224
  isLoading?: boolean;
@@ -231,9 +234,16 @@ export interface DataTableProps {
231
234
  seeRecordsOffer?: SeeRecordsOfferFor;
232
235
  }
233
236
  export interface DataTableColumnSettingsProps {
237
+ /**
238
+ * Whether the column takes Display as (Text, Monospace, Status, Link): false for a
239
+ * measure, by the shared rule an agent's change applies (`columnTakesDisplay`).
240
+ */
241
+ takesDisplay?: boolean;
234
242
  column: Column<any, unknown> | null;
235
243
  settings: ColumnSettings;
236
244
  onSettingsChange: (settings: ColumnSettings) => void;
245
+ /** The column's values in the loaded rows, for Status colours per value. */
246
+ columnValues?: string[];
237
247
  baseStyle?: TableBaseStyle;
238
248
  onBaseStyleChange?: (style: TableBaseStyle) => void;
239
249
  onApply?: () => void;
@@ -1,88 +1 @@
1
- import { B as t, z as r, C as l, E as o, V as i, j as n, c as d, g as m, f as u, b as c, e as E, d as C, a as T, y as p, x as D, o as A, h as I, q as _, w as F, v as S, m as b, n as L, l as f, p as N, k as y, s as R, u as h, i as g, r as x, t as M } from "../chunks/bookmark-state-n7AaNzR_.js";
2
- import { C as V, D as w, L as z, d as U, g as k, e as B, h as K, f as v, c as Y, a as q, i as G, b as P, n as Q, s as W } from "../chunks/validators-Baf3VIf5.js";
3
- import { D as J } from "../chunks/token-types-XbM6QByy.js";
4
- import { r as H, a as Z } from "../chunks/pivot-result-identity-CAP4--iq.js";
5
- import { D as ee } from "../chunks/report-runtime-context-c77_KF9v.js";
6
- const e = [
7
- "concatenate",
8
- "conditional-category",
9
- "date-part",
10
- "date-difference",
11
- "null-to-zero",
12
- "safe-ratio",
13
- "nested-conditional",
14
- "membership-test",
15
- "uppercase",
16
- "lowercase",
17
- "trim-whitespace",
18
- "replace-text",
19
- "first-characters",
20
- "character-count",
21
- "starts-with",
22
- "number-to-text",
23
- "start-of-month",
24
- "start-of-quarter",
25
- "start-of-year",
26
- "year-number",
27
- "add-days",
28
- "round-number",
29
- "round-down",
30
- "round-up",
31
- "absolute-value",
32
- "cap-maximum",
33
- "floor-minimum",
34
- "fill-blanks",
35
- "null-if-zero",
36
- "is-blank"
37
- ];
38
- export {
39
- t as BOOKMARK_STATE_VERSION,
40
- r as BOOKMARK_VISIBILITIES,
41
- V as CALCULATED_FIELD_ENTITY_MARKER,
42
- e as CALCULATED_FIELD_TEMPLATE_IDS,
43
- l as CONTROL_CARD_DEFAULT_VALUE,
44
- w as DATE_FORMAT_VALUES,
45
- ee as DEFAULT_CALENDAR_CONTEXT,
46
- J as DEFAULT_SEMANTIC_DOMAIN_ACCESS,
47
- o as EMPTY_SELECTION,
48
- z as LEGACY_CALCULATED_FIELD_ENTITY_MARKER,
49
- i as VIEWER_LIMITS,
50
- n as VIEWER_TABLE_SETTINGS_VERSION,
51
- d as collectDatasetNamesFromExplorerField,
52
- m as collectDatasetNamesFromFilterGroup,
53
- u as collectExecutionDatasetNamesFromExplorerField,
54
- c as collectPreferredDatasetNamesFromExplorerField,
55
- E as collectQualifiedDatasetNamesFromExplorerField,
56
- C as datasetRefFromSource,
57
- T as dependencyDisplayIdentity,
58
- U as getCalculatedFieldComputeStage,
59
- p as getCustomizableTableCardIds,
60
- k as getFieldRuntimeColumnName,
61
- D as getSortableTableCardIds,
62
- B as hasCalculatedFieldMarker,
63
- K as hasCalculatedFormulaInputs,
64
- A as hasColumnCustomization,
65
- v as hasSyntheticCalculatedFieldOwner,
66
- I as humanizeDatasetName,
67
- Y as inspectCalculatedField,
68
- q as isCalculatedDimension,
69
- G as isCalculatedMetric,
70
- P as isDerivedField,
71
- _ as isEmptyViewerTableSettings,
72
- F as isTableCardCustomizable,
73
- S as isTableCardSortable,
74
- b as measureJsonBytes,
75
- Q as normalizeCalculatedFieldRepresentation,
76
- L as normalizeTableColumnOrder,
77
- f as normalizeViewerTableSettings,
78
- N as parseBookmarkState,
79
- y as parseTableColumnId,
80
- R as parseViewerTableSettings,
81
- h as parseViewerTableSettingsMap,
82
- g as readBookmarkState,
83
- x as resolveFieldDatasetDependencies,
84
- H as resolveQueryColumnKeyMapEntry,
85
- Z as resolveUniqueQueryColumnKeyMapEntry,
86
- W as shouldDropInheritedCalculationAggregate,
87
- M as toTableColumnId
88
- };
1
+ import{B as t,z as r,C as l,E as o,V as i,j as n,c as d,g as m,f as u,b as c,e as E,d as C,a as T,y as p,x as D,o as A,h as I,q as _,w as F,v as S,m as b,n as L,l as f,p as N,k as y,s as R,u as h,i as g,r as x,t as M}from"../chunks/bookmark-state-DScd31KT.js";import{C as V,D as w,L as z,d as U,g as k,e as B,h as K,f as v,c as Y,a as q,i as G,b as P,n as Q,s as W}from"../chunks/validators-Dg2kyF4_.js";import{D as J}from"../chunks/token-types-1vzMWjI-.js";import{r as H,a as Z}from"../chunks/pivot-result-identity-B0eWVMXg.js";import{D as ee}from"../chunks/report-runtime-context-Cd1b5pku.js";const e=["concatenate","conditional-category","date-part","date-difference","null-to-zero","safe-ratio","nested-conditional","membership-test","uppercase","lowercase","trim-whitespace","replace-text","first-characters","character-count","starts-with","number-to-text","start-of-month","start-of-quarter","start-of-year","year-number","add-days","round-number","round-down","round-up","absolute-value","cap-maximum","floor-minimum","fill-blanks","null-if-zero","is-blank"];export{t as BOOKMARK_STATE_VERSION,r as BOOKMARK_VISIBILITIES,V as CALCULATED_FIELD_ENTITY_MARKER,e as CALCULATED_FIELD_TEMPLATE_IDS,l as CONTROL_CARD_DEFAULT_VALUE,w as DATE_FORMAT_VALUES,ee as DEFAULT_CALENDAR_CONTEXT,J as DEFAULT_SEMANTIC_DOMAIN_ACCESS,o as EMPTY_SELECTION,z as LEGACY_CALCULATED_FIELD_ENTITY_MARKER,i as VIEWER_LIMITS,n as VIEWER_TABLE_SETTINGS_VERSION,d as collectDatasetNamesFromExplorerField,m as collectDatasetNamesFromFilterGroup,u as collectExecutionDatasetNamesFromExplorerField,c as collectPreferredDatasetNamesFromExplorerField,E as collectQualifiedDatasetNamesFromExplorerField,C as datasetRefFromSource,T as dependencyDisplayIdentity,U as getCalculatedFieldComputeStage,p as getCustomizableTableCardIds,k as getFieldRuntimeColumnName,D as getSortableTableCardIds,B as hasCalculatedFieldMarker,K as hasCalculatedFormulaInputs,A as hasColumnCustomization,v as hasSyntheticCalculatedFieldOwner,I as humanizeDatasetName,Y as inspectCalculatedField,q as isCalculatedDimension,G as isCalculatedMetric,P as isDerivedField,_ as isEmptyViewerTableSettings,F as isTableCardCustomizable,S as isTableCardSortable,b as measureJsonBytes,Q as normalizeCalculatedFieldRepresentation,L as normalizeTableColumnOrder,f as normalizeViewerTableSettings,N as parseBookmarkState,y as parseTableColumnId,R as parseViewerTableSettings,h as parseViewerTableSettingsMap,g as readBookmarkState,x as resolveFieldDatasetDependencies,H as resolveQueryColumnKeyMapEntry,Z as resolveUniqueQueryColumnKeyMapEntry,W as shouldDropInheritedCalculationAggregate,M as toTableColumnId};
@@ -12,6 +12,9 @@ export declare const APPEARANCE_ALIASES: readonly [{
12
12
  }, {
13
13
  readonly alias: readonly ["components", "card", "borderRadius"];
14
14
  readonly canonical: readonly ["tokens", "radius", "card"];
15
+ }, {
16
+ readonly alias: readonly ["components", "table", "container", "borderRadius"];
17
+ readonly canonical: readonly ["tokens", "radius", "table"];
15
18
  }, {
16
19
  readonly alias: readonly ["components", "card", "shadow"];
17
20
  readonly canonical: readonly ["tokens", "shadow", "card"];
@@ -7,3 +7,4 @@ export * from './normalize-organization.js';
7
7
  export * from './resolver.js';
8
8
  export * from './schema.js';
9
9
  export * from './types.js';
10
+ export * from './table-density.js';
@@ -0,0 +1,18 @@
1
+ import { AppearanceDensity, AppearanceScheme } from './types.js';
2
+ /**
3
+ * What the table `density` shorthand stands for (table style SPEC §2.2, TS-D7):
4
+ * row padding and text sizes. Saved brands and tokens minted by customers'
5
+ * servers may still carry it.
6
+ */
7
+ export declare const TABLE_DENSITY_SHORTHAND: Record<AppearanceDensity, {
8
+ cellPaddingY: number;
9
+ cellFontSize: number;
10
+ headerFontSize: number;
11
+ }>;
12
+ /**
13
+ * One layer's table components with `density` turned into values: each value the
14
+ * same layer doesn't set is filled from the shorthand, and `density` is removed.
15
+ * Runs per layer before layers merge, so a layer's density beats the layers below
16
+ * it and its own explicit values beat its density.
17
+ */
18
+ export declare function expandTableDensityShorthand(scheme: AppearanceScheme): AppearanceScheme;
@@ -5,7 +5,9 @@ export type ResolvedAppearanceMode = 'light' | 'dark';
5
5
  export type AppearanceDensity = 'compact' | 'comfortable' | 'spacious';
6
6
  export type AppearanceColorToken = 'background' | 'foreground' | 'muted' | 'mutedForeground' | 'border' | 'input' | 'primary' | 'primaryForeground' | 'accent' | 'accentForeground'
7
7
  /** What a viewer selected to filter by: table rows, matrix cells. */
8
- | 'selection' | 'card' | 'cardForeground' | 'positive' | 'negative' | 'warning' | 'info' | 'destructive' | 'destructiveForeground';
8
+ | 'selection' | 'card' | 'cardForeground' | 'positive' | 'negative' | 'warning' | 'info' | 'destructive' | 'destructiveForeground'
9
+ /** Link text in table cells (table style TS-D18). */
10
+ | 'link';
9
11
  export type AppearanceColorTokens = Partial<Record<AppearanceColorToken, string>>;
10
12
  export type AppearanceTokens = {
11
13
  color?: AppearanceColorTokens;
@@ -60,8 +62,24 @@ export type ChartAppearance = {
60
62
  gridColor?: string;
61
63
  axisColor?: string;
62
64
  };
65
+ /**
66
+ * Which lines a table draws (table style SPEC §1.1): `full` frame, row and column
67
+ * lines; `horizontal` frame and row lines (the default); `vertical` frame and column
68
+ * lines; `inner` row and column lines without a frame; `outer` the frame only; `none`.
69
+ */
70
+ export type TableBorders = 'full' | 'outer' | 'inner' | 'horizontal' | 'vertical' | 'none';
71
+ export type TableTotalsBorderTop = 'none' | 'solid' | 'dashed' | 'dotted' | 'double';
72
+ /**
73
+ * A table's look in the theme (table style SPEC §1.1). Every table surface reads it
74
+ * through `resolveTableStyle`; nothing on a card or a Document section overrides it.
75
+ */
63
76
  export type TableAppearance = {
77
+ /**
78
+ * Shorthand kept for saved brands and tokens (TS-D7): expanded into cell and header
79
+ * values per layer before layers merge, so no renderer reads it.
80
+ */
64
81
  density?: AppearanceDensity;
82
+ borders?: TableBorders;
65
83
  container?: {
66
84
  background?: string;
67
85
  borderColor?: string;
@@ -69,14 +87,22 @@ export type TableAppearance = {
69
87
  shadow?: string;
70
88
  };
71
89
  header?: {
90
+ /** `transparent` draws no band. */
72
91
  background?: string;
73
92
  foreground?: string;
74
93
  dividerColor?: string;
75
94
  fontWeight?: number;
95
+ /** Also sets 0.08em letter spacing. */
76
96
  uppercase?: boolean;
77
97
  sticky?: boolean;
98
+ /** 9 to 18 px. */
99
+ fontSize?: number;
100
+ /** 0 to 16 px; the header's side padding is `cell.paddingX`. */
101
+ paddingY?: number;
102
+ wrap?: boolean;
78
103
  };
79
104
  row?: {
105
+ /** A minimum row height, px. Brand Studio no longer writes it; a saved brand has it. */
80
106
  height?: number;
81
107
  dividerColor?: string;
82
108
  zebra?: boolean;
@@ -85,8 +111,12 @@ export type TableAppearance = {
85
111
  selectedBackground?: string;
86
112
  };
87
113
  cell?: {
114
+ /** 0 to 24 px; falls back to `tokens.spacing.tableCellX`. */
88
115
  paddingX?: number;
116
+ /** 0 to 16 px; falls back to `tokens.spacing.tableCellY`. */
89
117
  paddingY?: number;
118
+ /** 9 to 18 px. */
119
+ fontSize?: number;
90
120
  verticalAlign?: 'top' | 'middle' | 'bottom';
91
121
  wrap?: 'wrap' | 'nowrap';
92
122
  };
@@ -95,11 +125,13 @@ export type TableAppearance = {
95
125
  foreground?: string;
96
126
  fontWeight?: number;
97
127
  };
128
+ /** The table's totals row and Matrix's grand total. */
98
129
  grandTotal?: {
99
130
  background?: string;
100
131
  foreground?: string;
101
132
  fontWeight?: number;
102
133
  borderColor?: string;
134
+ borderTop?: TableTotalsBorderTop;
103
135
  };
104
136
  pagination?: {
105
137
  background?: string;
@@ -107,6 +139,11 @@ export type TableAppearance = {
107
139
  borderColor?: string;
108
140
  };
109
141
  };
142
+ /** Document tables' own look (TS-D3). */
143
+ export type DocumentTableAppearance = TableAppearance & {
144
+ /** On: Document tables use `components.table`, and every other field here is ignored (TS-INV-4). */
145
+ sameAsDashboards?: boolean;
146
+ };
110
147
  export type AppearanceScheme = {
111
148
  tokens?: AppearanceTokens;
112
149
  components?: {
@@ -118,6 +155,7 @@ export type AppearanceScheme = {
118
155
  pivotTable?: TableAppearance;
119
156
  matrixTable?: TableAppearance;
120
157
  aggregateTable?: TableAppearance;
158
+ documentTable?: DocumentTableAppearance;
121
159
  pagination?: BaseSurfaceAppearance;
122
160
  };
123
161
  };