react-semaphor 0.1.560 → 0.1.561

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 (107) hide show
  1. package/dist/analytics-protocol/index.js +353 -349
  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-CB3oFAXk.js} +199 -171
  7. package/dist/chunks/{assistant-chat-Bu2fFm_I.js → assistant-chat-DiVHY3Hw.js} +27 -28
  8. package/dist/chunks/bookmark-impact-CR09dpkn.js +75 -0
  9. package/dist/chunks/bookmark-state-BusLpkb7.js +743 -0
  10. package/dist/chunks/{braces-Da41xfUd.js → braces-u8VorWJc.js} +1 -1
  11. package/dist/chunks/{comparison-window-caption-4FNkMrzE.js → comparison-window-caption-DDsIWJYT.js} +108 -108
  12. package/dist/chunks/{context-BgPDzLHZ.js → context-TUjw9eqr.js} +1 -1
  13. package/dist/chunks/{custom-visual-inputs-Dz-enUNR.js → custom-visual-inputs-DfolidZ9.js} +1 -1
  14. package/dist/chunks/{dashboard-_MeBuy67.js → dashboard-BRdZBPqr.js} +1 -1
  15. package/dist/chunks/{dashboard-briefing-launcher-CEi4Pr_v.js → dashboard-briefing-launcher-CgvTLndW.js} +161 -162
  16. package/dist/chunks/{dashboard-controls-Bi7fyG-4.js → dashboard-controls-B4vfSzTF.js} +881 -945
  17. package/dist/chunks/{dashboard-json-B1mU_OMa.js → dashboard-json-Y3MF59g7.js} +5 -5
  18. package/dist/chunks/document-dashboard-inputs-CvBbFTUA.js +1718 -0
  19. package/dist/chunks/{edit-dashboard-visual-0CJN31Y3.js → edit-dashboard-visual-DwjZcxj-.js} +6112 -6146
  20. package/dist/chunks/{filter-reach-copy-BF4w4kI2.js → filter-reach-copy-bijwf_-b.js} +1250 -1392
  21. package/dist/chunks/{filter-value-text-CRC-K_l_.js → filter-value-text-DFnhwuEW.js} +3 -3
  22. package/dist/chunks/global-date-filter-utils-BXgCpvQM.js +15142 -0
  23. package/dist/chunks/{index-DtHidOPV.js → index-ClwbY3BL.js} +197 -198
  24. package/dist/chunks/{layout-grid-BvsH4RY2.js → layout-grid-CtvCBfOm.js} +1 -1
  25. package/dist/chunks/{list-filter-Dg0otx5E.js → list-filter-BklYgciR.js} +1 -1
  26. package/dist/chunks/{matrix-analytical-definition-CM18W8w6.js → matrix-analytical-definition-pU51-JmY.js} +4 -4
  27. package/dist/chunks/{matrix-card-HPskLaPy.js → matrix-card-CUorIB7Q.js} +3 -3
  28. package/dist/chunks/{matrix-member-presentation-Bbrfrke4.js → matrix-member-presentation-Df5UgCGN.js} +1 -1
  29. package/dist/chunks/{matrix-operation-contract-WPv4R-H_.js → matrix-operation-contract-BSiGEXVC.js} +255 -248
  30. package/dist/chunks/{metric-comparison-ljMKYZKa.js → metric-comparison-95aC0uEO.js} +6 -6
  31. package/dist/chunks/{model-change-Ccn1zaxl.js → model-change-B5wQhg5G.js} +1 -1
  32. package/dist/chunks/{palette-Bsh376zO.js → palette-DTnMhipt.js} +1 -1
  33. package/dist/chunks/pivot-result-contract-expectations-Bo-86vwS.js +56 -0
  34. package/dist/chunks/{pivot-result-identity-vS9TSh4f.js → pivot-result-identity-olvXJoB9.js} +1 -1
  35. package/dist/chunks/{report-preferences-dialog-BV8L0SeS.js → report-preferences-dialog-C2YUIwKG.js} +14 -14
  36. package/dist/chunks/{report-runtime-context-BZQh9ywy.js → report-runtime-context-DoIUr3MP.js} +2 -2
  37. package/dist/chunks/resolve-dashboard-input-context-q_iiNXE1.js +6503 -0
  38. package/dist/chunks/{save-B5EAsgQF.js → save-DH4RyrnG.js} +1 -1
  39. package/dist/chunks/{saved-dashboard-context-n2Wn11cV.js → saved-dashboard-context-8jqfI7hI.js} +12 -12
  40. package/dist/chunks/{selection-reducer-D0YnaAD9.js → selection-reducer-CV7K4FI6.js} +1 -1
  41. package/dist/chunks/{semaphor-ready-indicator-XLBLOJ2V.js → semaphor-ready-indicator-E2XWyibu.js} +30253 -31076
  42. package/dist/chunks/{shelf-drop-preview-context-DHMa54a-.js → shelf-drop-preview-context-C29EUzDp.js} +7 -7
  43. package/dist/chunks/{source-entity-resolution-dUG5VWRm.js → source-entity-resolution-BXI3nQ5Z.js} +1 -1
  44. package/dist/chunks/{switch-ByxH4M7t.js → switch-balDSHc7.js} +3 -3
  45. package/dist/chunks/{table-export-sheet-C_GdeTYU.js → table-export-sheet-CK8tvh4d.js} +1 -1
  46. package/dist/chunks/temporal-input-presentation-B77JsAzU.js +5002 -0
  47. package/dist/chunks/{token-types-CQtXUVMy.js → token-types-DhYH5YKb.js} +1 -1
  48. package/dist/chunks/{upload-wbR-NVzq.js → upload-Ufj8vjyn.js} +1 -1
  49. package/dist/chunks/{use-create-flow-overlay-state-CEBaLOKC.js → use-create-flow-overlay-state-9WsnzEO5.js} +6 -6
  50. package/dist/chunks/{validators-CXTneCA4.js → validators-BtaCFIEB.js} +37 -37
  51. package/dist/chunks/{zoned-wall-clock-B1n_WjW3.js → zoned-wall-clock-CGLVI40Q.js} +1 -1
  52. package/dist/dashboard/index.js +2 -2
  53. package/dist/dashboard-authoring/index.js +2400 -1856
  54. package/dist/data-app-sdk/index.js +20 -20
  55. package/dist/data-app-sdk-adapters/index.js +3 -3
  56. package/dist/data-app-sdk-validation/index.js +10 -10
  57. package/dist/format-utils/index.js +257 -256
  58. package/dist/index.js +214 -215
  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/components/dashboard/summary-number-formatter.d.ts +6 -0
  63. package/dist/types/index.js +50 -51
  64. package/dist/types/lib/formatters/kpi-number-formatter.d.ts +41 -0
  65. package/dist/types/lib/stores/editor-store.d.ts +9 -1
  66. package/dist/types/lib/stores/table-actions.d.ts +0 -2
  67. package/dist/types/shared/analytics-protocol/analytics-base-schemas.d.ts +10 -0
  68. package/dist/types/shared/analytics-protocol/measure-aggregation-profile.d.ts +12 -0
  69. package/dist/types/shared/dashboard-authoring/card-settings/apply-card-settings.d.ts +11 -0
  70. package/dist/types/shared/dashboard-authoring/card-settings/card-display-write.d.ts +52 -0
  71. package/dist/types/shared/dashboard-authoring/card-settings/card-kinds.d.ts +14 -0
  72. package/dist/types/shared/dashboard-authoring/card-settings/carry-column-settings.d.ts +3 -0
  73. package/dist/types/shared/dashboard-authoring/card-settings/column-format-write.d.ts +8 -0
  74. package/dist/types/shared/dashboard-authoring/card-settings/column-names.d.ts +51 -0
  75. package/dist/types/shared/dashboard-authoring/card-settings/column-sources.d.ts +14 -0
  76. package/dist/types/shared/dashboard-authoring/card-settings/confirm-class.d.ts +9 -0
  77. package/dist/types/shared/dashboard-authoring/card-settings/highlight-inputs.d.ts +19 -0
  78. package/dist/types/shared/dashboard-authoring/card-settings/index.d.ts +15 -0
  79. package/dist/types/shared/dashboard-authoring/card-settings/inputs.d.ts +102 -0
  80. package/dist/types/shared/dashboard-authoring/card-settings/read-card-settings.d.ts +10 -0
  81. package/dist/types/shared/dashboard-authoring/card-settings/resolve-card-highlights.d.ts +14 -0
  82. package/dist/types/shared/dashboard-authoring/card-settings/resolve-card-settings.d.ts +59 -0
  83. package/dist/types/shared/dashboard-authoring/card-settings/resolved.d.ts +40 -0
  84. package/dist/types/shared/dashboard-authoring/card-settings/views.d.ts +28 -0
  85. package/dist/types/shared/dashboard-authoring/changes/card-query-part.d.ts +6 -0
  86. package/dist/types/shared/dashboard-authoring/changes/card-types.d.ts +32 -0
  87. package/dist/types/shared/dashboard-authoring/changes/dashboard-change.d.ts +539 -22
  88. package/dist/types/shared/dashboard-authoring/changes/diagnostics.d.ts +27 -8
  89. package/dist/types/shared/dashboard-authoring/changes/resolve-dashboard-changes.d.ts +25 -1
  90. package/dist/types/shared/dashboard-authoring/conditional-formatting/kpi.d.ts +1 -8
  91. package/dist/types/shared/dashboard-authoring/conditional-formatting/schema.d.ts +10 -10
  92. package/dist/types/shared/dashboard-authoring/index.d.ts +3 -0
  93. package/dist/types/shared/dashboard-authoring/kpi-figure.d.ts +123 -0
  94. package/dist/types/shared/dashboard-authoring/operations/operation-types.d.ts +21 -1
  95. package/dist/types/shared/dashboard-authoring/outline/outline-dashboard.d.ts +10 -4
  96. package/dist/types/shared/dashboard-viewer/bookmark-impact.d.ts +33 -0
  97. package/dist/types/shared/format-utils/formatters/matrix-formatter.d.ts +8 -1
  98. package/dist/types/shared/format-utils/raw-temporal.d.ts +16 -0
  99. package/package.json +2 -2
  100. package/dist/chunks/bookmark-state-BFY9oNmr.js +0 -111
  101. package/dist/chunks/document-dashboard-inputs-CkWfDB8c.js +0 -3010
  102. package/dist/chunks/global-date-filter-utils-D8365uPH.js +0 -12889
  103. package/dist/chunks/pivot-result-contract-expectations-Bl5suy4-.js +0 -1832
  104. package/dist/chunks/raw-temporal-presentation-BHm7s-hz.js +0 -540
  105. package/dist/chunks/resolve-dashboard-input-context-CAMiWvyR.js +0 -5280
  106. package/dist/chunks/table-settings-Imz0FgWi.js +0 -637
  107. package/dist/chunks/temporal-input-presentation-uvNK_tM0.js +0 -3228
@@ -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,40 @@
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 { LegendPosition } 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
+ };
12
+ export type ResolvedAxis = {
13
+ title?: string | null;
14
+ min?: number | null;
15
+ max?: number | null;
16
+ };
17
+ export type ResolvedCardSettings = {
18
+ /** A variant within the card's family (SPEC 4.6); a family change is a retype. */
19
+ variant?: CardVariant;
20
+ columns?: ResolvedColumnSettings[];
21
+ totals?: {
22
+ row: boolean;
23
+ };
24
+ /** Only the fields that change. */
25
+ dataLabels?: {
26
+ show?: boolean;
27
+ format?: SemaphorValueFormat | null;
28
+ };
29
+ legend?: {
30
+ show?: boolean;
31
+ position?: LegendPosition;
32
+ };
33
+ /** By stored config, on the card after its variant: `xAxisConfig` is the horizontal axis on screen (V-2). */
34
+ axes?: Partial<Record<AxisConfigKey, ResolvedAxis>>;
35
+ /** Rules added (ids minted at resolve, S-7) and rule ids removed; other rules are kept. */
36
+ highlights?: {
37
+ add?: ConditionalRule[];
38
+ remove?: string[];
39
+ };
40
+ };
@@ -0,0 +1,28 @@
1
+ import { SemaphorValueFormat } from '../../analytics-protocol/contracts.js';
2
+ import { CardSettingsInput, HighlightStyleInput } 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
+ /** What the column takes from the model (CA-D5). Read-only. */
14
+ inherits?: Array<'label' | 'format'>;
15
+ };
16
+ export type HighlightView = {
17
+ ruleId: string;
18
+ column: string;
19
+ apply: 'cell' | 'row';
20
+ enabled: boolean;
21
+ } & HighlightStyleInput;
22
+ export type CardSettingsView = Omit<CardSettingsInput, 'columns'> & {
23
+ /** Keyed by column name (SPEC 3.3). */
24
+ columns: Record<string, ColumnSettingsView>;
25
+ highlights: HighlightView[];
26
+ /** In the editor's words, each setting the card has that inputs can't state (CA-INV-3). */
27
+ editorOnly: string[];
28
+ };
@@ -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;