react-semaphor 0.1.564 → 0.1.565

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 (132) hide show
  1. package/DATA_APP_SDK.md +3 -3
  2. package/README.md +2 -2
  3. package/dist/analytics-protocol/index.js +8 -8
  4. package/dist/assistant-context/index.js +3 -2
  5. package/dist/brand-studio/index.js +28 -29
  6. package/dist/briefings/index.js +4 -4
  7. package/dist/chunks/{assistant-chat-D1BEEHUF.js → assistant-chat-DNfb5fbF.js} +204 -204
  8. package/dist/chunks/{bookmark-impact-XOsVUAqW.js → bookmark-impact-CHr7b1J2.js} +2 -2
  9. package/dist/chunks/bookmark-state-ByODVqee.js +1613 -0
  10. package/dist/chunks/card-filter-builder-CcEcfaYz.js +4100 -0
  11. package/dist/chunks/{switch-BW4yXSYs.js → code-editor-DJNOsgJH.js} +463 -442
  12. package/dist/chunks/{comparison-window-caption-D1EUXzaR.js → comparison-window-caption-CMLb3mut.js} +451 -419
  13. package/dist/chunks/{dashboard-DfYsASNd.js → dashboard-CtIfxycc.js} +1 -1
  14. package/dist/chunks/dashboard-briefing-launcher-D3mc6peE.js +4910 -0
  15. package/dist/chunks/{dashboard-controls-CJ8Dz50D.js → dashboard-controls-BFv0zdws.js} +692 -682
  16. package/dist/chunks/{dashboard-json-D3uZxGO-.js → dashboard-json-CXn_3OYb.js} +4 -4
  17. package/dist/chunks/{dates-EvDtT25n.js → dates-DcRxw17S.js} +12 -12
  18. package/dist/chunks/{edit-dashboard-visual-CgHJXBQv.js → edit-dashboard-visual-Y6HatqBd.js} +7704 -10337
  19. package/dist/chunks/filter-reach-copy-DbggA5B7.js +4673 -0
  20. package/dist/chunks/{filter-value-text-CPwFkrMz.js → filter-value-text-7zhmth1S.js} +2 -2
  21. package/dist/chunks/{index-CAgf2x4E.js → index-DDa_rklN.js} +68 -63
  22. package/dist/chunks/{layout-grid-BM65viQh.js → layout-grid-0hIlqEtk.js} +1 -1
  23. package/dist/chunks/{list-filter-BoeLBfL3.js → list-filter-DkgoCeBm.js} +1 -1
  24. package/dist/chunks/{matrix-analytical-definition-hEucouWM.js → matrix-analytical-definition-C9xB_T84.js} +18 -18
  25. package/dist/chunks/{matrix-card-CCh9JjP1.js → matrix-card-BSUeSXpD.js} +2 -2
  26. package/dist/chunks/{matrix-member-presentation-DsAUbuoL.js → matrix-member-presentation-DZNgQpUq.js} +1 -1
  27. package/dist/chunks/{matrix-operation-contract-DsLdFdSa.js → matrix-operation-contract-Eb6elidS.js} +1 -1
  28. package/dist/chunks/{metric-comparison-Bnso1cm1.js → metric-comparison-ChXUFaZu.js} +1 -1
  29. package/dist/chunks/{palette-p1XSJFgB.js → palette-4vf2BEEg.js} +1 -1
  30. package/dist/chunks/{pivot-result-contract-expectations-B53jqszr.js → pivot-result-contract-expectations-Ddh1rNz5.js} +4 -4
  31. package/dist/chunks/{pivot-result-identity-Dq5jm-EC.js → pivot-result-identity-BlbLrqaC.js} +1 -1
  32. package/dist/chunks/{report-preferences-dialog-DMqxSU4X.js → report-preferences-dialog-Db-b04B4.js} +122 -131
  33. package/dist/chunks/{report-runtime-context-BITkNSDa.js → report-runtime-context-DnA_PiKo.js} +1 -1
  34. package/dist/chunks/resolve-dashboard-input-context-C18J-YZC.js +21394 -0
  35. package/dist/chunks/{save-CHV1B1fL.js → save-D6pHmSSP.js} +1 -1
  36. package/dist/chunks/saved-dashboard-context-DhC_EVus.js +629 -0
  37. package/dist/chunks/{selection-reducer-Bz5aywT4.js → selection-reducer-OaJ-N5uN.js} +1 -1
  38. package/dist/chunks/{semaphor-ready-indicator-CFeCIuaw.js → semaphor-ready-indicator-T6TsiBMT.js} +80634 -80503
  39. package/dist/chunks/{shelf-drop-preview-context-cEyVkKTF.js → shelf-drop-preview-context-CNWL_b0S.js} +407 -407
  40. package/dist/chunks/{source-entity-resolution-DdDVXFB8.js → source-entity-resolution-DF6GulDn.js} +1 -1
  41. package/dist/chunks/stored-dashboard-IdmtrNkA.js +5026 -0
  42. package/dist/chunks/{table-export-sheet-bSXxGn-v.js → table-export-sheet--DUKWk6o.js} +1 -1
  43. package/dist/chunks/{temporal-input-presentation-sk9gqLi6.js → temporal-input-presentation--2r9BLr0.js} +392 -377
  44. package/dist/chunks/{token-types-BUK06hU2.js → token-types-C8JymO8s.js} +1 -1
  45. package/dist/chunks/{upload-BnmuyPqW.js → upload-Cf3wXZT8.js} +1 -1
  46. package/dist/chunks/{validators-BIM0FE31.js → validators-wtjw0aw6.js} +7 -7
  47. package/dist/chunks/variable-draft-3xseULxR.js +241 -0
  48. package/dist/dashboard/index.js +2 -2
  49. package/dist/dashboard-authoring/index.js +2206 -1705
  50. package/dist/data-app-sdk/index.js +4 -4
  51. package/dist/data-app-sdk-adapters/index.js +2 -2
  52. package/dist/data-app-sdk-validation/index.js +5 -5
  53. package/dist/format-utils/index.js +174 -167
  54. package/dist/index.js +189 -187
  55. package/dist/pdf-export-policy/index.js +80 -28
  56. package/dist/pdf-table-layout/index.js +65 -65
  57. package/dist/report-runtime-context/index.js +1 -1
  58. package/dist/style.css +1 -1
  59. package/dist/surfboard/index.js +2 -2
  60. package/dist/types/briefings/attachment-outcomes.d.ts +1 -1
  61. package/dist/types/components/dashboard-variables/data-variables-menu.d.ts +8 -0
  62. package/dist/types/components/dashboard-variables/variable-editor-host.d.ts +1 -0
  63. package/dist/types/components/index.d.ts +2 -0
  64. package/dist/types/index.js +5 -5
  65. package/dist/types/lib/dashboard-inputs/build-normalized-dashboard-inputs.d.ts +62 -0
  66. package/dist/types/lib/dashboard-inputs/dashboard-filter-mapping-authoring.d.ts +33 -2
  67. package/dist/types/lib/dashboard-inputs/filter-settings.d.ts +7 -2
  68. package/dist/types/lib/dashboard-inputs/prepare-loaded-dashboard.d.ts +4 -2
  69. package/dist/types/lib/dashboard-variables/data-text.d.ts +33 -0
  70. package/dist/types/lib/dashboard-variables/types.d.ts +207 -0
  71. package/dist/types/lib/document/document-edits.d.ts +16 -1
  72. package/dist/types/lib/document/document-panel-target.d.ts +1 -1
  73. package/dist/types/lib/document/document-section-query-options.d.ts +29 -0
  74. package/dist/types/lib/document/document-table-data-policy.d.ts +0 -1
  75. package/dist/types/lib/hooks/use-dashboard-frame-query.d.ts +92 -0
  76. package/dist/types/lib/query-context/build-card-query-context.d.ts +6 -0
  77. package/dist/types/lib/query-context/describe-card-execution-snapshot.d.ts +1 -0
  78. package/dist/types/lib/query-context/use-semantic-execution-payload-for-cards.d.ts +24 -0
  79. package/dist/types/lib/stores/dashboard-store.d.ts +36 -0
  80. package/dist/types/lib/text-variables/temporal-input-text.d.ts +28 -0
  81. package/dist/types/lib/text-variables/text-variable-types.d.ts +72 -0
  82. package/dist/types/lib/types/common-types.d.ts +155 -51
  83. package/dist/types/lib/utils/card-definition.d.ts +2 -2
  84. package/dist/types/shared/assistant-context/index.d.ts +1 -1
  85. package/dist/types/shared/assistant-context/saved-dashboard-context.d.ts +51 -1
  86. package/dist/types/shared/dashboard-authoring/card-query-request.d.ts +7 -1
  87. package/dist/types/shared/dashboard-authoring/card-settings/resolve-card-highlights.d.ts +10 -0
  88. package/dist/types/shared/dashboard-authoring/changes/card-query-part.d.ts +1 -0
  89. package/dist/types/shared/dashboard-authoring/changes/dashboard-change.d.ts +1087 -430
  90. package/dist/types/shared/dashboard-authoring/changes/diagnostics.d.ts +18 -1
  91. package/dist/types/shared/dashboard-authoring/changes/resolve-dashboard-changes.d.ts +1 -1
  92. package/dist/types/shared/dashboard-authoring/conditional-formatting/kpi.d.ts +10 -0
  93. package/dist/types/shared/dashboard-authoring/conditional-formatting/schema.d.ts +40 -40
  94. package/dist/types/shared/dashboard-authoring/control-execution-contract.d.ts +16 -16
  95. package/dist/types/shared/dashboard-authoring/dashboard-card-source-index.d.ts +1 -0
  96. package/dist/types/shared/dashboard-authoring/dashboard-filter-targets.d.ts +29 -0
  97. package/dist/types/shared/dashboard-authoring/dashboard-input-scope.d.ts +7 -4
  98. package/dist/types/shared/dashboard-authoring/dashboard-variable-card.d.ts +159 -0
  99. package/dist/types/shared/dashboard-authoring/dashboard-variable-changes.d.ts +61 -0
  100. package/dist/types/shared/dashboard-authoring/document-section-cards.d.ts +7 -0
  101. package/dist/types/shared/dashboard-authoring/filter-model/index.d.ts +2 -0
  102. package/dist/types/shared/dashboard-authoring/filter-model/read-dashboard-filter-model.d.ts +10 -0
  103. package/dist/types/shared/dashboard-authoring/index.d.ts +6 -0
  104. package/dist/types/shared/dashboard-authoring/measure-calculations/comparison.d.ts +2 -0
  105. package/dist/types/shared/dashboard-authoring/operations/operation-sentences.d.ts +1 -1
  106. package/dist/types/shared/dashboard-authoring/operations/operation-types.d.ts +50 -3
  107. package/dist/types/shared/dashboard-authoring/outline/outline-dashboard.d.ts +48 -1
  108. package/dist/types/shared/dashboard-authoring/outline/outline-filters.d.ts +2 -2
  109. package/dist/types/shared/dashboard-authoring/text-card-words/blocks.d.ts +87 -13
  110. package/dist/types/shared/dashboard-authoring/text-card-words/chip-colors.d.ts +23 -0
  111. package/dist/types/shared/dashboard-authoring/text-card-words/index.d.ts +90 -8
  112. package/dist/types/shared/dashboard-authoring/text-card-words/rich-content.d.ts +31 -3
  113. package/dist/types/shared/dashboard-authoring/text-card-words/variable-words.d.ts +8 -0
  114. package/dist/types/shared/dashboard-authoring/variable-draft.d.ts +125 -0
  115. package/dist/types/shared/dashboard-authoring/variable-editability.d.ts +24 -0
  116. package/dist/types/shared/dashboard-authoring/variable-references.d.ts +39 -0
  117. package/dist/types/shared/format-utils/document-print.d.ts +4 -2
  118. package/dist/types/shared/format-utils/index.d.ts +1 -0
  119. package/dist/types/shared/format-utils/pdf-capacity-lines.d.ts +17 -0
  120. package/dist/types/shared/format-utils/pdf-delivery.d.ts +8 -1
  121. package/dist/types/shared/format-utils/pdf-export-policy.d.ts +74 -6
  122. package/dist/types/shared/format-utils/presentation-execution.d.ts +9 -0
  123. package/package.json +2 -2
  124. package/src/data-app-sdk/README.md +3 -3
  125. package/dist/chunks/bookmark-state-CWeoGbrx.js +0 -743
  126. package/dist/chunks/braces-DzgoQC64.js +0 -23
  127. package/dist/chunks/dashboard-briefing-launcher-lvYfJoUQ.js +0 -3878
  128. package/dist/chunks/filter-reach-copy-Cmb05jlE.js +0 -3965
  129. package/dist/chunks/global-date-filter-utils-ruJYwjgZ.js +0 -16733
  130. package/dist/chunks/resolve-dashboard-input-context-i_jCSYae.js +0 -8214
  131. package/dist/chunks/saved-dashboard-context-Dg3oDmH_.js +0 -564
  132. package/dist/chunks/use-create-flow-overlay-state-Dl6DCxh8.js +0 -1436
@@ -1,4 +1,4 @@
1
- import { TCard, TDashboard } from '../../lib/types/common-types.js';
1
+ import { DataVariable, TCard, TDashboard } from '../../lib/types/common-types.js';
2
2
  import { CardViewStateMap } from '../../lib/dashboard-view-state/index.js';
3
3
  import { ControlContractOverrides } from '../../lib/dashboard-inputs/control-contract-overrides.js';
4
4
  import { SemanticExecutionPayload } from '../../lib/types/semantic-runtime-types.js';
@@ -149,3 +149,53 @@ export declare function buildSavedCardRequest(input: {
149
149
  reason: SavedCardRequestRefusal;
150
150
  message?: string;
151
151
  };
152
+ /** Why a saved variable has no request to run at the place asked (data variables spec S-3). */
153
+ export type SavedVariableRequestRefusal = {
154
+ reason: 'variable_unknown';
155
+ message: string;
156
+ available: string[];
157
+ } | {
158
+ reason: 'place_unknown';
159
+ message: string;
160
+ available: string[];
161
+ }
162
+ /** A required input has no value: nothing runs, never an earlier value (DV-D7). */
163
+ | {
164
+ reason: 'held';
165
+ message: string;
166
+ missingRequired: string[];
167
+ }
168
+ /** The query no longer compiles against its mapping, or the given inputs don't fit. */
169
+ | {
170
+ reason: 'broken';
171
+ message: string;
172
+ };
173
+ /**
174
+ * A data variable's request for a server replay at a tab or a Document
175
+ * (data variables DV-D29, spec S-3, `semaphor_analyze { fromVariable }`): the
176
+ * variable's card from the one target list (DV-INV-2), run at the sheet as a
177
+ * fresh viewer opens it, as `buildSavedCardRequest` runs a card. At a Document
178
+ * the card runs in the Document's runtime with no section, as the page runs
179
+ * its text (DV-D29). A Document's inputs are dashboard inputs scoped to it
180
+ * (the filter model folds a Document's own, ledger P2-31), so the values
181
+ * `inputs` gives by name replay as a Document's capture does
182
+ * (`resolveCapturedRuntimeValues`, one filter model SPEC 5.9): every input's
183
+ * default as a slot, the given values as slots over them. Pure; the caller
184
+ * loads the dashboard, its semantic payload and calendar, and checks access.
185
+ */
186
+ export declare function buildSavedVariableRequest(input: {
187
+ dashboard: TDashboard;
188
+ name: string;
189
+ sheetId: string;
190
+ /** Values for the inputs that reach a Document, by variable name: a control's value, or a filter's values. */
191
+ inputs?: Record<string, unknown>;
192
+ semanticExecutionPayload: SemanticExecutionPayload | undefined;
193
+ calendar: CalendarContext;
194
+ }): {
195
+ status: 'ready';
196
+ variable: DataVariable;
197
+ place: 'sheet' | 'document';
198
+ request: AssistantCardRequest;
199
+ } | ({
200
+ status: 'refused';
201
+ } & SavedVariableRequestRefusal);
@@ -36,9 +36,15 @@ export type DashboardCardQueryRequestPayloadBase = {
36
36
  resolvedPrimaryDateField?: ResolvedPrimaryDateField;
37
37
  globalDateComparison?: GlobalDateComparisonContext;
38
38
  calendarContext: CalendarContext;
39
+ /**
40
+ * A data variable's SQL query: the rows it may return (P1a-08), and the
41
+ * server returns the result's column types with it (P1a-18). Never set for
42
+ * a card's own request.
43
+ */
44
+ sqlRowLimit?: number;
39
45
  };
40
46
  /** The fields the server runs a card with. */
41
- export declare const CARD_QUERY_REQUEST_EXECUTED_FIELDS: readonly ["cardType", "sql", "python", "resultOwner", "cardConfig", "cardDataSource", "active_filters", "controlValues", "controlDefinitions", "cardControlDefinitions", "controlBindings", "resolvedPrimaryDateField", "globalDateComparison", "calendarContext"];
47
+ export declare const CARD_QUERY_REQUEST_EXECUTED_FIELDS: readonly ["cardType", "sql", "python", "resultOwner", "cardConfig", "cardDataSource", "active_filters", "controlValues", "controlDefinitions", "cardControlDefinitions", "controlBindings", "resolvedPrimaryDateField", "globalDateComparison", "calendarContext", "sqlRowLimit"];
42
48
  /**
43
49
  * The fields that describe the card for its own view and logs; the server
44
50
  * does not run with them (the result cache `cache_config` names is off).
@@ -8,6 +8,16 @@ export type HighlightsRequest = {
8
8
  add?: HighlightRuleInput[];
9
9
  remove?: string[];
10
10
  };
11
+ export declare const COLORS_ALLOWED: string[];
12
+ /** A color a highlight takes: a theme name or `#rrggbb` (CA-D11); a chip's colours take the same (P3b-08). */
13
+ export declare function isHighlightColor(color: string): boolean;
14
+ /**
15
+ * A stored colour in the words a highlight takes, or undefined when it has
16
+ * none: a theme name as it is, a hex as `#rrggbb` (the rule panel's colour
17
+ * picker may store `#fff`). Read through it, a colour sent back is one the
18
+ * writer takes (data variables P3b-17).
19
+ */
20
+ export declare function highlightColorWords(color: string): string | undefined;
11
21
  export declare function resolveCardHighlights(card: TCard, kind: CardSettingsKind, named: readonly NamedColumn[], request: HighlightsRequest, context: {
12
22
  path: string;
13
23
  newId?: () => string;
@@ -121,6 +121,7 @@ export declare const CARD_KEY_CLASSES: {
121
121
  readonly linkedInteractionTargetOverrides: "presentation";
122
122
  readonly clickToFilter: "presentation";
123
123
  readonly respondsToSelections: "presentation";
124
+ readonly dataVariableId: "presentation";
124
125
  readonly linkedClickToFilterOverrides: "presentation";
125
126
  readonly paginationConfig: "presentation";
126
127
  readonly queryConfig: "presentation";