react-semaphor 0.1.560 → 0.1.562

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 (168) hide show
  1. package/dist/analytics-protocol/index.js +450 -423
  2. package/dist/assistant-context/index.js +1 -1
  3. package/dist/assistant-protocol/index.js +5 -5
  4. package/dist/brand-studio/index.js +9 -9
  5. package/dist/briefings/index.js +5 -5
  6. package/dist/chunks/{analytics-base-schemas-CHLxsPfX.js → analytics-base-schemas-BaIQrEzX.js} +221 -188
  7. package/dist/chunks/{assistant-chat-Bu2fFm_I.js → assistant-chat-R_yT8xH4.js} +116 -117
  8. package/dist/chunks/bookmark-impact-D4Kl4amw.js +75 -0
  9. package/dist/chunks/bookmark-state-CWeoGbrx.js +743 -0
  10. package/dist/chunks/{braces-Da41xfUd.js → braces-DzgoQC64.js} +1 -1
  11. package/dist/chunks/{comparison-window-caption-4FNkMrzE.js → comparison-window-caption-D1EUXzaR.js} +550 -425
  12. package/dist/chunks/{context-BgPDzLHZ.js → context-R31TSL5V.js} +1 -1
  13. package/dist/chunks/{dashboard-_MeBuy67.js → dashboard-Bp1y5oun.js} +1 -1
  14. package/dist/chunks/{dashboard-briefing-launcher-CEi4Pr_v.js → dashboard-briefing-launcher-S5FB3aUW.js} +236 -236
  15. package/dist/chunks/dashboard-controls-CfC_6Ztn.js +2277 -0
  16. package/dist/chunks/{dashboard-json-B1mU_OMa.js → dashboard-json-gYZT7ZQY.js} +5 -5
  17. package/dist/chunks/dates-DFY7Gfss.js +91 -0
  18. package/dist/chunks/{edit-dashboard-visual-0CJN31Y3.js → edit-dashboard-visual-u7OI_g8Q.js} +7119 -7198
  19. package/dist/chunks/filter-reach-copy-CvV7W5dd.js +3965 -0
  20. package/dist/chunks/{filter-value-text-CRC-K_l_.js → filter-value-text-CPwFkrMz.js} +11 -10
  21. package/dist/chunks/global-date-filter-utils-N1kcsOFE.js +16722 -0
  22. package/dist/chunks/{index-DtHidOPV.js → index-CNGkfUp4.js} +269 -264
  23. package/dist/chunks/{layout-grid-BvsH4RY2.js → layout-grid-BM65viQh.js} +1 -1
  24. package/dist/chunks/{list-filter-Dg0otx5E.js → list-filter-BoeLBfL3.js} +1 -1
  25. package/dist/chunks/{matrix-analytical-definition-CM18W8w6.js → matrix-analytical-definition-hEucouWM.js} +4 -4
  26. package/dist/chunks/{matrix-card-HPskLaPy.js → matrix-card-CCh9JjP1.js} +3 -3
  27. package/dist/chunks/{matrix-member-presentation-Bbrfrke4.js → matrix-member-presentation-DsAUbuoL.js} +1 -1
  28. package/dist/chunks/{matrix-operation-contract-WPv4R-H_.js → matrix-operation-contract-DsLdFdSa.js} +365 -349
  29. package/dist/chunks/{metric-comparison-ljMKYZKa.js → metric-comparison-Bnso1cm1.js} +6 -6
  30. package/dist/chunks/{model-change-Ccn1zaxl.js → model-change-T1cRkh3m.js} +1 -1
  31. package/dist/chunks/{palette-Bsh376zO.js → palette-p1XSJFgB.js} +1 -1
  32. package/dist/chunks/pivot-result-contract-expectations-B53jqszr.js +56 -0
  33. package/dist/chunks/{pivot-result-identity-vS9TSh4f.js → pivot-result-identity-Dq5jm-EC.js} +1 -1
  34. package/dist/chunks/{zoned-wall-clock-B1n_WjW3.js → raw-temporal-value-Bqz8wc7L.js} +97 -46
  35. package/dist/chunks/{report-preferences-dialog-BV8L0SeS.js → report-preferences-dialog-C4RAR8u5.js} +68 -63
  36. package/dist/chunks/{report-runtime-context-BZQh9ywy.js → report-runtime-context-BITkNSDa.js} +2 -2
  37. package/dist/chunks/resolve-dashboard-input-context-DaDrZGuA.js +8214 -0
  38. package/dist/chunks/{save-B5EAsgQF.js → save-CHV1B1fL.js} +1 -1
  39. package/dist/chunks/{saved-dashboard-context-n2Wn11cV.js → saved-dashboard-context-DFYBrE6O.js} +93 -94
  40. package/dist/chunks/{selection-filter-compiler-BKXmyLrS.js → selection-filter-compiler-CUDRnUxc.js} +19 -18
  41. package/dist/chunks/{selection-reducer-D0YnaAD9.js → selection-reducer-Bz5aywT4.js} +1 -1
  42. package/dist/chunks/{semaphor-ready-indicator-XLBLOJ2V.js → semaphor-ready-indicator-Cfuafnem.js} +38188 -40344
  43. package/dist/chunks/{shelf-drop-preview-context-DHMa54a-.js → shelf-drop-preview-context-BR2GEYog.js} +81 -82
  44. package/dist/chunks/{source-entity-resolution-dUG5VWRm.js → source-entity-resolution-DdDVXFB8.js} +6 -6
  45. package/dist/chunks/{switch-ByxH4M7t.js → switch-BW4yXSYs.js} +3 -3
  46. package/dist/chunks/{table-export-sheet-C_GdeTYU.js → table-export-sheet-bSXxGn-v.js} +1 -1
  47. package/dist/chunks/temporal-input-presentation-sk9gqLi6.js +4960 -0
  48. package/dist/chunks/{token-types-CQtXUVMy.js → token-types-BUK06hU2.js} +1 -1
  49. package/dist/chunks/{upload-wbR-NVzq.js → upload-BnmuyPqW.js} +1 -1
  50. package/dist/chunks/{use-create-flow-overlay-state-CEBaLOKC.js → use-create-flow-overlay-state-DyzhWvRJ.js} +6 -6
  51. package/dist/chunks/{validators-CXTneCA4.js → validators-BIM0FE31.js} +774 -895
  52. package/dist/dashboard/index.js +2 -2
  53. package/dist/dashboard-authoring/index.js +2477 -2685
  54. package/dist/data-app-sdk/index.js +30 -30
  55. package/dist/data-app-sdk-adapters/index.js +3 -3
  56. package/dist/data-app-sdk-validation/index.js +25 -25
  57. package/dist/format-utils/index.js +274 -267
  58. package/dist/index.js +59 -59
  59. package/dist/report-runtime-context/index.js +2 -2
  60. package/dist/style.css +1 -1
  61. package/dist/surfboard/index.js +2 -2
  62. package/dist/types/briefings/attachment-outcomes.d.ts +1 -1
  63. package/dist/types/components/dashboard/dashboard-create-dialog.d.ts +23 -0
  64. package/dist/types/components/dashboard/summary-number-formatter.d.ts +6 -0
  65. package/dist/types/components/index.d.ts +1 -2
  66. package/dist/types/components/surfboard/filter/types.d.ts +3 -1
  67. package/dist/types/index.js +50 -51
  68. package/dist/types/lib/formatters/kpi-number-formatter.d.ts +41 -0
  69. package/dist/types/lib/formatters/raw-temporal-presentation.d.ts +59 -2
  70. package/dist/types/lib/interactions/get-click-context-from-matrix.d.ts +5 -0
  71. package/dist/types/lib/interactions/get-click-context-from-table.d.ts +45 -0
  72. package/dist/types/lib/print/print-inputs.d.ts +2 -1
  73. package/dist/types/lib/query-context/assemble-card-query.d.ts +2 -0
  74. package/dist/types/lib/query-context/build-dashboard-execution-snapshot.d.ts +5 -0
  75. package/dist/types/lib/selection/selection-from-click-context.d.ts +41 -0
  76. package/dist/types/lib/stores/editor-store.d.ts +9 -1
  77. package/dist/types/lib/stores/table-actions.d.ts +0 -2
  78. package/dist/types/lib/types/common-types.d.ts +6 -0
  79. package/dist/types/lib/types/explorer-types.d.ts +7 -1
  80. package/dist/types/lib/types/interaction-types.d.ts +3 -1
  81. package/dist/types/lib/types/token-types.d.ts +0 -1
  82. package/dist/types/shared/analytics-protocol/analytics-base-schemas.d.ts +13 -1
  83. package/dist/types/shared/analytics-protocol/contracts.d.ts +9 -40
  84. package/dist/types/shared/analytics-protocol/measure-aggregation-profile.d.ts +12 -0
  85. package/dist/types/shared/analytics-protocol/selection-contract.d.ts +12 -2
  86. package/dist/types/shared/analytics-protocol/validators.d.ts +1 -2
  87. package/dist/types/shared/assistant-protocol/context.d.ts +8 -8
  88. package/dist/types/shared/dashboard-authoring/card-formats/sql-date-pattern.d.ts +7 -1
  89. package/dist/types/shared/dashboard-authoring/card-settings/apply-card-settings.d.ts +11 -0
  90. package/dist/types/shared/dashboard-authoring/card-settings/card-display-write.d.ts +76 -0
  91. package/dist/types/shared/dashboard-authoring/card-settings/card-kinds.d.ts +14 -0
  92. package/dist/types/shared/dashboard-authoring/card-settings/carry-column-settings.d.ts +3 -0
  93. package/dist/types/shared/dashboard-authoring/card-settings/column-format-write.d.ts +8 -0
  94. package/dist/types/shared/dashboard-authoring/card-settings/column-names.d.ts +51 -0
  95. package/dist/types/shared/dashboard-authoring/card-settings/column-polarity-write.d.ts +5 -0
  96. package/dist/types/shared/dashboard-authoring/card-settings/column-sources.d.ts +14 -0
  97. package/dist/types/shared/dashboard-authoring/card-settings/confirm-class.d.ts +9 -0
  98. package/dist/types/shared/dashboard-authoring/card-settings/highlight-inputs.d.ts +19 -0
  99. package/dist/types/shared/dashboard-authoring/card-settings/index.d.ts +17 -0
  100. package/dist/types/shared/dashboard-authoring/card-settings/inputs.d.ts +117 -0
  101. package/dist/types/shared/dashboard-authoring/card-settings/read-card-settings.d.ts +10 -0
  102. package/dist/types/shared/dashboard-authoring/card-settings/resolve-card-highlights.d.ts +14 -0
  103. package/dist/types/shared/dashboard-authoring/card-settings/resolve-card-settings.d.ts +59 -0
  104. package/dist/types/shared/dashboard-authoring/card-settings/resolved.d.ts +51 -0
  105. package/dist/types/shared/dashboard-authoring/card-settings/views.d.ts +30 -0
  106. package/dist/types/shared/dashboard-authoring/changes/card-query-part.d.ts +6 -0
  107. package/dist/types/shared/dashboard-authoring/changes/card-types.d.ts +32 -0
  108. package/dist/types/shared/dashboard-authoring/changes/dashboard-change.d.ts +3402 -4313
  109. package/dist/types/shared/dashboard-authoring/changes/diagnostics.d.ts +49 -8
  110. package/dist/types/shared/dashboard-authoring/changes/field-ref.d.ts +91 -0
  111. package/dist/types/shared/dashboard-authoring/changes/read-card-query.d.ts +7 -0
  112. package/dist/types/shared/dashboard-authoring/changes/resolve-dashboard-changes.d.ts +52 -2
  113. package/dist/types/shared/dashboard-authoring/changes/resolve-dashboard-create.d.ts +26 -0
  114. package/dist/types/shared/dashboard-authoring/click-to-filter-settings.d.ts +2 -1
  115. package/dist/types/shared/dashboard-authoring/conditional-formatting/kpi.d.ts +1 -8
  116. package/dist/types/shared/dashboard-authoring/conditional-formatting/schema.d.ts +20 -20
  117. package/dist/types/shared/dashboard-authoring/detail-date-presentation.d.ts +9 -0
  118. package/dist/types/shared/dashboard-authoring/index.d.ts +11 -6
  119. package/dist/types/shared/dashboard-authoring/kpi-figure.d.ts +123 -0
  120. package/dist/types/shared/dashboard-authoring/measure-calculations/apply.d.ts +8 -0
  121. package/dist/types/shared/dashboard-authoring/measure-calculations/comparison.d.ts +16 -0
  122. package/dist/types/shared/dashboard-authoring/measure-calculations/dates.d.ts +41 -0
  123. package/dist/types/shared/dashboard-authoring/measure-calculations/index.d.ts +17 -0
  124. package/dist/types/shared/dashboard-authoring/measure-calculations/options.d.ts +63 -0
  125. package/dist/types/shared/dashboard-authoring/measure-calculations/read.d.ts +16 -0
  126. package/dist/types/shared/dashboard-authoring/measure-calculations/resolve.d.ts +79 -0
  127. package/dist/types/shared/dashboard-authoring/measure-calculations/schemas.d.ts +934 -0
  128. package/dist/types/shared/dashboard-authoring/measure-calculations/sentences.d.ts +4 -0
  129. package/dist/types/shared/dashboard-authoring/measure-calculations/set.d.ts +11 -0
  130. package/dist/types/shared/dashboard-authoring/measure-calculations/transform.d.ts +63 -0
  131. package/dist/types/shared/dashboard-authoring/measure-calculations/window-transforms.d.ts +60 -0
  132. package/dist/types/shared/dashboard-authoring/new-card.d.ts +12 -1
  133. package/dist/types/shared/dashboard-authoring/operations/apply-dashboard-operations.d.ts +2 -1
  134. package/dist/types/shared/dashboard-authoring/operations/operation-sentences.d.ts +46 -0
  135. package/dist/types/shared/dashboard-authoring/operations/operation-types.d.ts +73 -3
  136. package/dist/types/shared/dashboard-authoring/outline/outline-dashboard.d.ts +21 -3
  137. package/dist/types/shared/dashboard-authoring/text-card-words/blocks.d.ts +58 -0
  138. package/dist/types/shared/dashboard-authoring/text-card-words/index.d.ts +55 -0
  139. package/dist/types/shared/dashboard-authoring/text-card-words/rich-content.d.ts +18 -0
  140. package/dist/types/shared/dashboard-viewer/bookmark-impact.d.ts +33 -0
  141. package/dist/types/shared/format-utils/document-print.d.ts +82 -0
  142. package/dist/types/shared/format-utils/formatters/matrix-formatter.d.ts +8 -1
  143. package/dist/types/shared/format-utils/index.d.ts +1 -0
  144. package/dist/types/shared/format-utils/raw-temporal.d.ts +18 -7
  145. package/dist/types/shared/temporal/index.d.ts +1 -0
  146. package/dist/types/shared/temporal/raw-temporal-equality.d.ts +19 -0
  147. package/dist/types/shared/temporal/raw-temporal-value.d.ts +29 -0
  148. package/dist/types/shared/temporal/zoned-wall-clock.d.ts +6 -0
  149. package/package.json +2 -2
  150. package/dist/chunks/bookmark-state-BFY9oNmr.js +0 -111
  151. package/dist/chunks/custom-visual-inputs-Dz-enUNR.js +0 -292
  152. package/dist/chunks/dashboard-controls-Bi7fyG-4.js +0 -2339
  153. package/dist/chunks/document-dashboard-inputs-CkWfDB8c.js +0 -3010
  154. package/dist/chunks/filter-reach-copy-BF4w4kI2.js +0 -3738
  155. package/dist/chunks/global-date-filter-utils-D8365uPH.js +0 -12889
  156. package/dist/chunks/pivot-result-contract-expectations-Bl5suy4-.js +0 -1832
  157. package/dist/chunks/raw-temporal-presentation-BHm7s-hz.js +0 -540
  158. package/dist/chunks/resolve-dashboard-input-context-CAMiWvyR.js +0 -5280
  159. package/dist/chunks/table-settings-Imz0FgWi.js +0 -637
  160. package/dist/chunks/temporal-input-presentation-uvNK_tM0.js +0 -3228
  161. package/dist/types/components/dashboard/ai-dashboard-create-dialog.d.ts +0 -38
  162. package/dist/types/components/dashboard/dashboard-create-template.d.ts +0 -10
  163. package/dist/types/lib/hooks/use-dashboard-authoring.d.ts +0 -49
  164. package/dist/types/shared/dashboard-authoring/artifact-compiler.d.ts +0 -6
  165. package/dist/types/shared/dashboard-authoring/contracts.d.ts +0 -106
  166. package/dist/types/shared/dashboard-authoring/protocol-adapter.d.ts +0 -7
  167. package/dist/types/shared/dashboard-authoring/source-matching.d.ts +0 -34
  168. package/dist/types/shared/dashboard-authoring/validators.d.ts +0 -2
@@ -0,0 +1,59 @@
1
+ import { TCard } from '../../../lib/types/common-types.js';
2
+ import { ModelFormats } from '../../format-utils/resolve-column-format.js';
3
+ import { StatedLabel } from '../changes/card-query-part.js';
4
+ import { ChangeDiagnostic } from '../changes/diagnostics.js';
5
+ import { ColumnCatalogs } from './column-sources.js';
6
+ import { CardSettingsInput } from './inputs.js';
7
+ import { ResolvedCardSettings } from './resolved.js';
8
+ import { HighlightsRequest } from './resolve-card-highlights.js';
9
+ export type CardSettingsRequest = {
10
+ /** Column settings and the card's own (Phase 3). */
11
+ settings?: CardSettingsInput;
12
+ /** Highlights added and removed (Phase 4). */
13
+ highlights?: HighlightsRequest;
14
+ };
15
+ /** The model formats a change's columns show: read, or unavailable when they couldn't be read (never confused with "none"). */
16
+ export type ModelFormatsRead = {
17
+ status: 'read';
18
+ formats: ModelFormats;
19
+ } | {
20
+ status: 'unavailable';
21
+ };
22
+ export type CardSettingsContext = {
23
+ /** Where the change sits in the request, for problem paths (`changes[3]`). */
24
+ path: string;
25
+ /** The card as the change names it (an id or a `$handle`), for suggested changes. */
26
+ cardRef: string;
27
+ /**
28
+ * The catalog of each semantic dataset the card's columns come from (model
29
+ * labels and formats), keyed by `columnSourceKey`; absent for SQL cards or
30
+ * when the change needs none. A column is looked up in its own source's
31
+ * catalog (ledger P2-15).
32
+ */
33
+ catalogs?: ColumnCatalogs;
34
+ /**
35
+ * The model format each column shows, by column id (a config field's id, a
36
+ * Matrix level's or measure's), as the query gives it to the renderer
37
+ * (`ChangeServices.readModelFormats`): read, or unavailable when it couldn't
38
+ * be read. Absent when the change states no format. A format patch merges
39
+ * onto what the card shows; the catalogs are never read for formats
40
+ * (ledger P2-20).
41
+ */
42
+ modelFormats?: ModelFormatsRead;
43
+ /** A SQL table's result keys, read before this call when the request names its columns. */
44
+ sqlResultColumns?: readonly string[];
45
+ /** Mints a highlight rule's id at resolve (S-7). */
46
+ newId?: () => string;
47
+ };
48
+ export type CardSettingsResolution = {
49
+ ok: true;
50
+ /** Labels go to the label owner's `relabel` operation (SPEC 4.7). */
51
+ labels: StatedLabel[];
52
+ /** Null when nothing but labels (or nothing at all) changes. */
53
+ settings: ResolvedCardSettings | null;
54
+ warnings: ChangeDiagnostic[];
55
+ } | {
56
+ ok: false;
57
+ problems: ChangeDiagnostic[];
58
+ };
59
+ export declare function resolveCardSettings(card: TCard, request: CardSettingsRequest, context: CardSettingsContext): CardSettingsResolution;
@@ -0,0 +1,51 @@
1
+ import { SemaphorValueFormat } from '../../analytics-protocol/contracts.js';
2
+ import { CardColumnRef, ConditionalRule } from '../conditional-formatting/types.js';
3
+ import { AxisConfigKey, CardVariant } from './card-display-write.js';
4
+ import { ComparisonDisplayInput, LegendPosition, Polarity } from './inputs.js';
5
+ export type ResolvedColumnSettings = {
6
+ column: CardColumnRef;
7
+ hidden?: boolean;
8
+ width?: number | null;
9
+ /** Whole and validated; null removes the override. */
10
+ format?: SemaphorValueFormat | null;
11
+ /** The card's own polarity; null removes it (RC-D3). */
12
+ polarity?: Polarity | null;
13
+ };
14
+ /** Only the comparison display fields that change; precision null removes the stored precision (RC-D4). */
15
+ export type ResolvedComparisonDisplay = {
16
+ show?: boolean;
17
+ mode?: ComparisonDisplayInput['mode'];
18
+ precision?: number | null;
19
+ };
20
+ export type ResolvedAxis = {
21
+ title?: string | null;
22
+ min?: number | null;
23
+ max?: number | null;
24
+ };
25
+ export type ResolvedCardSettings = {
26
+ /** A variant within the card's family (SPEC 4.6); a family change is a retype. */
27
+ variant?: CardVariant;
28
+ columns?: ResolvedColumnSettings[];
29
+ totals?: {
30
+ row: boolean;
31
+ };
32
+ /** Only the fields that change. */
33
+ dataLabels?: {
34
+ show?: boolean;
35
+ format?: SemaphorValueFormat | null;
36
+ };
37
+ legend?: {
38
+ show?: boolean;
39
+ position?: LegendPosition;
40
+ };
41
+ /** By stored config, on the card after its variant: `xAxisConfig` is the horizontal axis on screen (V-2). */
42
+ axes?: Partial<Record<AxisConfigKey, ResolvedAxis>>;
43
+ /** Rules added (ids minted at resolve, S-7) and rule ids removed; other rules are kept. */
44
+ highlights?: {
45
+ add?: ConditionalRule[];
46
+ remove?: string[];
47
+ };
48
+ comparisonDisplay?: ResolvedComparisonDisplay;
49
+ /** Whether measures without a comparison of their own follow the dashboard's (RC-D16). */
50
+ inheritComparison?: boolean;
51
+ };
@@ -0,0 +1,30 @@
1
+ import { SemaphorValueFormat } from '../../analytics-protocol/contracts.js';
2
+ import { CardSettingsInput, HighlightStyleInput, Polarity } from './inputs.js';
3
+ export type ColumnSettingsRole = 'measure' | 'dimension' | 'detail' | 'result' | 'value';
4
+ export type ColumnSettingsView = {
5
+ /** The column's field; absent for SQL result columns. Read-only. */
6
+ field?: string;
7
+ role: ColumnSettingsRole;
8
+ label: string;
9
+ hidden?: true;
10
+ width?: number;
11
+ /** The card's override only; absent when the column follows the model. */
12
+ format?: SemaphorValueFormat;
13
+ /** Shown when the card or the model sets it; absent means higher is better (RC-D3). */
14
+ polarity?: Polarity;
15
+ /** What the column takes from the model (CA-D5); 'polarity' when the model sets it. Read-only. */
16
+ inherits?: Array<'label' | 'format' | 'polarity'>;
17
+ };
18
+ export type HighlightView = {
19
+ ruleId: string;
20
+ column: string;
21
+ apply: 'cell' | 'row';
22
+ enabled: boolean;
23
+ } & HighlightStyleInput;
24
+ export type CardSettingsView = Omit<CardSettingsInput, 'columns'> & {
25
+ /** Keyed by column name (SPEC 3.3). */
26
+ columns: Record<string, ColumnSettingsView>;
27
+ highlights: HighlightView[];
28
+ /** In the editor's words, each setting the card has that inputs can't state (CA-INV-3). */
29
+ editorOnly: string[];
30
+ };
@@ -404,6 +404,12 @@ export declare function isGroupedDate(field: {
404
404
  export type StatedLabel = {
405
405
  key: ColumnKey;
406
406
  label: string;
407
+ /**
408
+ * `semantic` writes the model's label as a refreshable one (a column's
409
+ * `labelOrigin: 'semantic'`; on a Matrix, its presentation label removed):
410
+ * a label returned to the model (card appearance CA-D5). Default `override`.
411
+ */
412
+ origin?: 'override' | 'semantic';
407
413
  };
408
414
  /**
409
415
  * Every label a query states, each on its ColumnKey, counted over every ref
@@ -1,4 +1,5 @@
1
1
  import { TChartType } from '../../../lib/charts/types.js';
2
+ import { TCard } from '../../../lib/types/common-types.js';
2
3
  /**
3
4
  * The card types an agent may set, and their rules (MCP dashboard editing
4
5
  * DE-D20, DE-D43). Public names are snake_case; each maps to one stored chart
@@ -30,5 +31,36 @@ export declare function toChartType(type: CardType): TChartType;
30
31
  export declare function toPublicCardType(chartType: TChartType | string | undefined): string;
31
32
  /** The settable card type a chart type is, or undefined when it is not one of the eight. */
32
33
  export declare function settableCardType(chartType: TChartType | string | undefined): CardType | undefined;
34
+ /** A chart variant as properties of its base type (card appearance CA-D6, CV-1). */
35
+ export type CardTypeProperties = {
36
+ orientation?: 'vertical' | 'horizontal';
37
+ stack?: 'none' | 'stacked';
38
+ donut?: boolean;
39
+ };
40
+ /**
41
+ * A card's type as one of the eight, with its variant as properties: a
42
+ * stacked bar is `bar` with `stack: 'stacked'`, a doughnut `pie` with
43
+ * `donut: true`. A bar is horizontal when it is stored as `horizontalBar` or
44
+ * draws along `chartOptions.indexAxis: 'y'`. Each base type reports only the
45
+ * properties it takes (bar: orientation and stack; line and area: stack; pie:
46
+ * donut). Undefined for a type outside the eight and their five variants.
47
+ */
48
+ export declare function readCardTypeProperties(card: Pick<TCard, 'type' | 'preferences'>): {
49
+ type: CardType;
50
+ properties: CardTypeProperties;
51
+ } | undefined;
52
+ /**
53
+ * The stored type a base type and its properties are (card appearance SPEC
54
+ * 4.6), and the axis it draws along when that isn't the type's own: a
55
+ * horizontal bar is `horizontalBar`, as the chart type picker writes it; a
56
+ * horizontal stacked bar is `stackedBar` drawn along `y`, as the orientation
57
+ * control writes it. A vertical variant asks for `x`, so a bar the
58
+ * orientation control turned comes back. A property the base type doesn't
59
+ * take is ignored.
60
+ */
61
+ export declare function storedCardTypeFor(type: CardType, properties: CardTypeProperties): {
62
+ type: TChartType;
63
+ indexAxis?: 'x' | 'y';
64
+ };
33
65
  /** A chart type as a sentence names it ("bar chart", "detail table", "KPI"). */
34
66
  export declare function cardTypeSentenceName(chartType: TChartType | string | undefined): string;