react-semaphor 0.1.605 → 0.1.607

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 (151) hide show
  1. package/dist/analytics-protocol/index.js +1 -1
  2. package/dist/appearance-runtime/index.js +1 -1
  3. package/dist/assistant-context/index.js +1 -1
  4. package/dist/assistant-protocol/index.js +1 -1
  5. package/dist/brand-studio/index.js +2 -2
  6. package/dist/briefings/index.js +1 -1
  7. package/dist/chunks/add-to-dashboard-Bu3M9DpP.js +12 -0
  8. package/dist/chunks/appearance-provider-C4lPZcaN.js +613 -0
  9. package/dist/chunks/appearance-runtime-provider-De2VZS4F.js +1 -0
  10. package/dist/chunks/assistant-chat-B7Fngg8U.js +53 -0
  11. package/dist/chunks/attachment-filter-line-wJRB0GSP.js +1 -0
  12. package/dist/chunks/{bookmark-impact-BAtemeyK.js → bookmark-impact-DjrrJomS.js} +1 -1
  13. package/dist/chunks/bookmark-state-x9hJS83D.js +1 -0
  14. package/dist/chunks/{brand-C9APUFaP.js → brand-DgFcvKJI.js} +1 -1
  15. package/dist/chunks/{card-filter-builder-ClWrXB7P.js → card-filter-builder-CvxygmsE.js} +8 -3
  16. package/dist/chunks/check-input-7DVPUuco.js +1 -0
  17. package/dist/chunks/{comparison-window-caption-tguyN24S.js → comparison-window-caption-zUZDe4tL.js} +1 -1
  18. package/dist/chunks/compiler-XErOfUUx.js +1 -0
  19. package/dist/chunks/context-Cwj8Axgd.js +2 -0
  20. package/dist/chunks/currency-presentation-binding-w9WDUk3b.js +1 -0
  21. package/dist/chunks/custom-visual-inputs-D8U98aBz.js +1 -0
  22. package/dist/chunks/{dashboard-ChIcbVTx.js → dashboard-BEd6i29E.js} +1 -1
  23. package/dist/chunks/{dashboard-briefing-launcher-CwMlhkxV.js → dashboard-briefing-launcher-DMDYM9IA.js} +9 -14
  24. package/dist/chunks/{dashboard-controls-UCSAFCGA.js → dashboard-controls-5B2vCIjJ.js} +8 -8
  25. package/dist/chunks/{dashboard-json-B120hYDa.js → dashboard-json-C6r30x-5.js} +1 -1
  26. package/dist/chunks/dashboard-temporal-snapshot-Wki-YACw.js +1 -0
  27. package/dist/chunks/edit-dashboard-visual-F2w7v4iB.js +83 -0
  28. package/dist/chunks/{filter-line-WwUV5JzN.js → filter-line-COFQaF4_.js} +1 -1
  29. package/dist/chunks/filter-reach-preview-BWRGfSmb.js +1 -0
  30. package/dist/chunks/filter-value-text-BSAMEgve.js +1 -0
  31. package/dist/chunks/kpi-trend-rule-BcnKbY7d.js +1 -0
  32. package/dist/chunks/{layout-grid-CFzqJ7GC.js → layout-grid-DahW4ClC.js} +1 -1
  33. package/dist/chunks/matrix-analytical-definition-Bd-dXB8q.js +1 -0
  34. package/dist/chunks/{matrix-member-presentation-vVAv-aqg.js → matrix-member-presentation-CfvxPV-i.js} +1 -1
  35. package/dist/chunks/matrix-operation-contract-Cw7U53Ao.js +1 -0
  36. package/dist/chunks/metric-formatting-QDqXfQGY.js +1 -0
  37. package/dist/chunks/{numeric-range-options-C8tr-Bls.js → numeric-range-options-s6i_nDXg.js} +1 -1
  38. package/dist/chunks/{palette-NvEIuXHN.js → palette-CYvJHSqP.js} +1 -1
  39. package/dist/chunks/pivot-result-contract-expectations-BX5gLcze.js +1 -0
  40. package/dist/chunks/{pivot-result-identity-B0eWVMXg.js → pivot-result-identity-DOISzHU4.js} +1 -1
  41. package/dist/chunks/{raw-temporal-value-BHQ-ldpW.js → raw-temporal-value-Cssny3RJ.js} +1 -1
  42. package/dist/chunks/report-preferences-dialog-BNpB9byP.js +1 -0
  43. package/dist/chunks/{report-runtime-context-Cd1b5pku.js → report-runtime-context-B8HuY0bu.js} +1 -1
  44. package/dist/chunks/resolve-dashboard-input-context-B-0tONJg.js +8 -0
  45. package/dist/chunks/sandbox-host-Drf58_oU.js +197 -0
  46. package/dist/chunks/saved-dashboard-context-dbdbQ5bB.js +1 -0
  47. package/dist/chunks/{selection-filter-compiler-kYsRugss.js → selection-filter-compiler-DK8KkS9g.js} +1 -1
  48. package/dist/chunks/semaphor-ready-indicator-BSFsqsBJ.js +617 -0
  49. package/dist/chunks/set-oJDaJdtI.js +1 -0
  50. package/dist/chunks/slider-DAvAdfMC.js +599 -0
  51. package/dist/chunks/stored-dashboard-DmgJQcyZ.js +1 -0
  52. package/dist/chunks/table-cell-text-2x6r_oHO.js +1 -0
  53. package/dist/chunks/{table-export-sheet-xaczzWZF.js → table-export-sheet-CWqKiQu4.js} +1 -1
  54. package/dist/chunks/{token-types-1vzMWjI-.js → token-types-BSyWn2pb.js} +1 -1
  55. package/dist/chunks/{validators-Dg2kyF4_.js → validators-BPGmPz8-.js} +1 -1
  56. package/dist/chunks/{variable-draft-B4_xqr4Y.js → variable-draft-DGA22H2g.js} +1 -1
  57. package/dist/chunks/visual-contract-DQPKg5QW.js +143 -0
  58. package/dist/dashboard/index.js +1 -1
  59. package/dist/dashboard-authoring/index.js +1 -1
  60. package/dist/extensions/index.js +1 -0
  61. package/dist/format-utils/index.js +1 -1
  62. package/dist/index.js +1 -1
  63. package/dist/report-runtime-context/index.js +1 -1
  64. package/dist/style.css +1 -1
  65. package/dist/surfboard/index.js +1 -1
  66. package/dist/types/components/assistant/assistant-store.d.ts +19 -0
  67. package/dist/types/components/assistant/use-assistant.d.ts +4 -0
  68. package/dist/types/components/visual/data-table/hooks/use-data-table-logic.d.ts +2 -3
  69. package/dist/types/components/visual/data-table/table-cell-text.d.ts +93 -0
  70. package/dist/types/components/visual/data-table/types/data-table.d.ts +0 -1
  71. package/dist/types/extensions.d.ts +2 -0
  72. package/dist/types/index.js +1 -1
  73. package/dist/types/lib/charts/types.d.ts +3 -1
  74. package/dist/types/lib/dashboard/semantic-dataset-references.d.ts +0 -2
  75. package/dist/types/lib/matrix-table/matrix-card-adapter.d.ts +12 -12
  76. package/dist/types/lib/matrix-table/matrix-delivery.d.ts +25 -25
  77. package/dist/types/lib/stores/dashboard-store.d.ts +33 -2
  78. package/dist/types/lib/stores/editor-store.d.ts +8 -0
  79. package/dist/types/lib/types/common-types.d.ts +3 -0
  80. package/dist/types/lib/utils/card-definition.d.ts +12 -12
  81. package/dist/types/lib/utils/card-type-change.d.ts +9 -0
  82. package/dist/types/shared/analytics-protocol/analytics-base-schemas.d.ts +6 -6
  83. package/dist/types/shared/analytics-protocol/execution-input-schemas.d.ts +10 -10
  84. package/dist/types/shared/analytics-protocol/matrix-definition-contract.d.ts +248 -248
  85. package/dist/types/shared/analytics-protocol/matrix-operation-contract.d.ts +10 -10
  86. package/dist/types/shared/analytics-protocol/matrix-operation-request.d.ts +8 -8
  87. package/dist/types/shared/analytics-protocol/matrix-window-contract.d.ts +2 -2
  88. package/dist/types/shared/assistant-protocol/context.d.ts +26 -26
  89. package/dist/types/shared/assistant-protocol/parts.d.ts +4 -0
  90. package/dist/types/shared/assistant-protocol/request.d.ts +2 -1
  91. package/dist/types/shared/dashboard-authoring/card-data-source/card-base.d.ts +16 -6
  92. package/dist/types/shared/dashboard-authoring/card-settings/custom-visual-write.d.ts +44 -0
  93. package/dist/types/shared/dashboard-authoring/card-settings/index.d.ts +1 -0
  94. package/dist/types/shared/dashboard-authoring/changes/card-query-part.d.ts +1 -0
  95. package/dist/types/shared/dashboard-authoring/changes/card-types.d.ts +2 -2
  96. package/dist/types/shared/dashboard-authoring/changes/custom-visual-change.d.ts +57 -0
  97. package/dist/types/shared/dashboard-authoring/changes/dashboard-change.d.ts +61 -54
  98. package/dist/types/shared/dashboard-authoring/changes/diagnostics.d.ts +5 -1
  99. package/dist/types/shared/dashboard-authoring/changes/read-card-query.d.ts +5 -1
  100. package/dist/types/shared/dashboard-authoring/changes/resolve-dashboard-changes.d.ts +10 -0
  101. package/dist/types/shared/dashboard-authoring/conditional-formatting/schema.d.ts +60 -60
  102. package/dist/types/shared/dashboard-authoring/control-execution-contract.d.ts +4 -4
  103. package/dist/types/shared/dashboard-authoring/matrix-delivery.d.ts +48 -48
  104. package/dist/types/shared/dashboard-authoring/measure-calculations/index.d.ts +1 -1
  105. package/dist/types/shared/dashboard-authoring/measure-calculations/window-transforms.d.ts +2 -0
  106. package/dist/types/shared/dashboard-authoring/operations/operation-sentences.d.ts +8 -2
  107. package/dist/types/shared/dashboard-authoring/operations/operation-types.d.ts +11 -0
  108. package/dist/types/shared/dashboard-authoring/outline/outline-dashboard.d.ts +7 -0
  109. package/dist/types/shared/extensions/check-audits.d.ts +30 -0
  110. package/dist/types/shared/extensions/check-findings.d.ts +46 -0
  111. package/dist/types/shared/extensions/check-input.d.ts +23 -0
  112. package/dist/types/shared/extensions/check-renders.d.ts +44 -0
  113. package/dist/types/shared/extensions/check-runner.d.ts +19 -0
  114. package/dist/types/shared/extensions/index.d.ts +17 -0
  115. package/dist/types/shared/extensions/read-document.d.ts +18 -0
  116. package/dist/types/shared/extensions/sandbox-host.d.ts +63 -0
  117. package/dist/types/shared/extensions/saved-refs.d.ts +33 -0
  118. package/dist/types/shared/extensions/script-policy.d.ts +11 -0
  119. package/dist/types/shared/extensions/types.d.ts +186 -0
  120. package/dist/types/shared/extensions/visual-contract.d.ts +36 -0
  121. package/dist/types/shared/extensions/visual-payload.d.ts +75 -0
  122. package/dist/types/shared/extensions/visual-theme.d.ts +21 -0
  123. package/dist/types/shared/format-utils/formatters/number-formatter.d.ts +13 -6
  124. package/dist/types/shared/format-utils/matrix-continuation.d.ts +2 -2
  125. package/dist/types/shared/format-utils/matrix-export-presentation.d.ts +24 -24
  126. package/dist/types/shared/usage-events/details.d.ts +4 -4
  127. package/dist/types/shared/usage-events/envelope.d.ts +2 -2
  128. package/dist/usage-events/index.js +1 -1
  129. package/package.json +7 -2
  130. package/dist/chunks/add-to-dashboard-CEmZUf9o.js +0 -12
  131. package/dist/chunks/appearance-provider-CfoAVQuG.js +0 -608
  132. package/dist/chunks/appearance-runtime-provider-Bx8H-moR.js +0 -1
  133. package/dist/chunks/assistant-chat-DgUaCE9k.js +0 -51
  134. package/dist/chunks/attachment-filter-line-C_zHMhGh.js +0 -1
  135. package/dist/chunks/bookmark-state-DScd31KT.js +0 -1
  136. package/dist/chunks/context-CntvtZwC.js +0 -2
  137. package/dist/chunks/dashboard-temporal-snapshot-BFJKbp_6.js +0 -1
  138. package/dist/chunks/edit-dashboard-visual-DvHp03h_.js +0 -73
  139. package/dist/chunks/filter-reach-preview-C5M5_hf_.js +0 -1
  140. package/dist/chunks/filter-value-text-DqTHe_vu.js +0 -1
  141. package/dist/chunks/kpi-trend-rule-B87LNzcz.js +0 -1
  142. package/dist/chunks/matrix-analytical-definition-5T-2euHZ.js +0 -1
  143. package/dist/chunks/matrix-operation-contract-CWvcEsQ0.js +0 -1
  144. package/dist/chunks/pivot-result-contract-expectations-BNWhS8mv.js +0 -1
  145. package/dist/chunks/report-preferences-dialog-Bseb2Rlg.js +0 -1
  146. package/dist/chunks/resolve-dashboard-input-context-BDY7KwRe.js +0 -8
  147. package/dist/chunks/saved-dashboard-context-C3lWc4Dx.js +0 -1
  148. package/dist/chunks/semaphor-ready-indicator-BQarSo6S.js +0 -612
  149. package/dist/chunks/set-6mOnfQeH.js +0 -1
  150. package/dist/chunks/slider-BPnHdMGq.js +0 -4
  151. package/dist/chunks/stored-dashboard-DfrxDLhR.js +0 -1
@@ -75,8 +75,8 @@ export declare const matrixRuntimeInputsSchema: z.ZodObject<{
75
75
  }[];
76
76
  };
77
77
  levelId: string;
78
- axis: "columns" | "rows";
79
78
  direction: "asc" | "desc";
79
+ axis: "columns" | "rows";
80
80
  nulls: "last" | "first";
81
81
  }, {
82
82
  target: import('./matrix-definition-contract.js').MatrixSortTarget;
@@ -100,8 +100,8 @@ export declare const matrixRuntimeInputsSchema: z.ZodObject<{
100
100
  }[];
101
101
  };
102
102
  levelId: string;
103
- axis: "columns" | "rows";
104
103
  direction: "asc" | "desc";
104
+ axis: "columns" | "rows";
105
105
  nulls: "last" | "first";
106
106
  }>, "many">>>;
107
107
  }, "strip", z.ZodTypeAny, {
@@ -127,8 +127,8 @@ export declare const matrixRuntimeInputsSchema: z.ZodObject<{
127
127
  }[];
128
128
  };
129
129
  levelId: string;
130
- axis: "columns" | "rows";
131
130
  direction: "asc" | "desc";
131
+ axis: "columns" | "rows";
132
132
  nulls: "last" | "first";
133
133
  }[] | undefined;
134
134
  runtimeFilters?: import('../../components/index.js').FilterGroup | undefined;
@@ -155,8 +155,8 @@ export declare const matrixRuntimeInputsSchema: z.ZodObject<{
155
155
  }[];
156
156
  };
157
157
  levelId: string;
158
- axis: "columns" | "rows";
159
158
  direction: "asc" | "desc";
159
+ axis: "columns" | "rows";
160
160
  nulls: "last" | "first";
161
161
  }[] | undefined;
162
162
  runtimeFilters?: import('../../components/index.js').FilterGroup | undefined;
@@ -373,8 +373,8 @@ declare const matrixExecutionShape: {
373
373
  }[];
374
374
  };
375
375
  levelId: string;
376
- axis: "columns" | "rows";
377
376
  direction: "asc" | "desc";
377
+ axis: "columns" | "rows";
378
378
  nulls: "last" | "first";
379
379
  }, {
380
380
  target: import('./matrix-definition-contract.js').MatrixSortTarget;
@@ -398,8 +398,8 @@ declare const matrixExecutionShape: {
398
398
  }[];
399
399
  };
400
400
  levelId: string;
401
- axis: "columns" | "rows";
402
401
  direction: "asc" | "desc";
402
+ axis: "columns" | "rows";
403
403
  nulls: "last" | "first";
404
404
  }>, "many">>;
405
405
  rankings: z.ZodReadonly<z.ZodArray<z.ZodType<import('./matrix-definition-contract.js').MatrixRanking, z.ZodTypeDef, import('./matrix-definition-contract.js').MatrixRanking>, "many">>;
@@ -478,8 +478,8 @@ declare const matrixExecutionShape: {
478
478
  }[];
479
479
  };
480
480
  levelId: string;
481
- axis: "columns" | "rows";
482
481
  direction: "asc" | "desc";
482
+ axis: "columns" | "rows";
483
483
  nulls: "last" | "first";
484
484
  }[];
485
485
  rankings: readonly import('./matrix-definition-contract.js').MatrixRanking[];
@@ -561,8 +561,8 @@ declare const matrixExecutionShape: {
561
561
  }[];
562
562
  };
563
563
  levelId: string;
564
- axis: "columns" | "rows";
565
564
  direction: "asc" | "desc";
565
+ axis: "columns" | "rows";
566
566
  nulls: "last" | "first";
567
567
  }[];
568
568
  rankings: readonly import('./matrix-definition-contract.js').MatrixRanking[];
@@ -644,8 +644,8 @@ declare const matrixExecutionShape: {
644
644
  }[];
645
645
  };
646
646
  levelId: string;
647
- axis: "columns" | "rows";
648
647
  direction: "asc" | "desc";
648
+ axis: "columns" | "rows";
649
649
  nulls: "last" | "first";
650
650
  }[];
651
651
  rankings: readonly import('./matrix-definition-contract.js').MatrixRanking[];
@@ -727,8 +727,8 @@ declare const matrixExecutionShape: {
727
727
  }[];
728
728
  };
729
729
  levelId: string;
730
- axis: "columns" | "rows";
731
730
  direction: "asc" | "desc";
731
+ axis: "columns" | "rows";
732
732
  nulls: "last" | "first";
733
733
  }[];
734
734
  rankings: readonly import('./matrix-definition-contract.js').MatrixRanking[];
@@ -207,8 +207,8 @@ export declare const matrixOperationRequestSchema: z.ZodObject<{
207
207
  }[];
208
208
  };
209
209
  levelId: string;
210
- axis: "columns" | "rows";
211
210
  direction: "asc" | "desc";
211
+ axis: "columns" | "rows";
212
212
  nulls: "last" | "first";
213
213
  }, {
214
214
  target: import('./matrix-definition-contract.js').MatrixSortTarget;
@@ -232,8 +232,8 @@ export declare const matrixOperationRequestSchema: z.ZodObject<{
232
232
  }[];
233
233
  };
234
234
  levelId: string;
235
- axis: "columns" | "rows";
236
235
  direction: "asc" | "desc";
236
+ axis: "columns" | "rows";
237
237
  nulls: "last" | "first";
238
238
  }>, "many">>;
239
239
  rankings: z.ZodReadonly<z.ZodArray<z.ZodType<import('./matrix-definition-contract.js').MatrixRanking, z.ZodTypeDef, import('./matrix-definition-contract.js').MatrixRanking>, "many">>;
@@ -312,8 +312,8 @@ export declare const matrixOperationRequestSchema: z.ZodObject<{
312
312
  }[];
313
313
  };
314
314
  levelId: string;
315
- axis: "columns" | "rows";
316
315
  direction: "asc" | "desc";
316
+ axis: "columns" | "rows";
317
317
  nulls: "last" | "first";
318
318
  }[];
319
319
  rankings: readonly import('./matrix-definition-contract.js').MatrixRanking[];
@@ -395,8 +395,8 @@ export declare const matrixOperationRequestSchema: z.ZodObject<{
395
395
  }[];
396
396
  };
397
397
  levelId: string;
398
- axis: "columns" | "rows";
399
398
  direction: "asc" | "desc";
399
+ axis: "columns" | "rows";
400
400
  nulls: "last" | "first";
401
401
  }[];
402
402
  rankings: readonly import('./matrix-definition-contract.js').MatrixRanking[];
@@ -478,8 +478,8 @@ export declare const matrixOperationRequestSchema: z.ZodObject<{
478
478
  }[];
479
479
  };
480
480
  levelId: string;
481
- axis: "columns" | "rows";
482
481
  direction: "asc" | "desc";
482
+ axis: "columns" | "rows";
483
483
  nulls: "last" | "first";
484
484
  }[];
485
485
  rankings: readonly import('./matrix-definition-contract.js').MatrixRanking[];
@@ -561,8 +561,8 @@ export declare const matrixOperationRequestSchema: z.ZodObject<{
561
561
  }[];
562
562
  };
563
563
  levelId: string;
564
- axis: "columns" | "rows";
565
564
  direction: "asc" | "desc";
565
+ axis: "columns" | "rows";
566
566
  nulls: "last" | "first";
567
567
  }[];
568
568
  rankings: readonly import('./matrix-definition-contract.js').MatrixRanking[];
@@ -647,8 +647,8 @@ export declare const matrixOperationRequestSchema: z.ZodObject<{
647
647
  }[];
648
648
  };
649
649
  levelId: string;
650
- axis: "columns" | "rows";
651
650
  direction: "asc" | "desc";
651
+ axis: "columns" | "rows";
652
652
  nulls: "last" | "first";
653
653
  }[];
654
654
  rankings: readonly import('./matrix-definition-contract.js').MatrixRanking[];
@@ -733,8 +733,8 @@ export declare const matrixOperationRequestSchema: z.ZodObject<{
733
733
  }[];
734
734
  };
735
735
  levelId: string;
736
- axis: "columns" | "rows";
737
736
  direction: "asc" | "desc";
737
+ axis: "columns" | "rows";
738
738
  nulls: "last" | "first";
739
739
  }[];
740
740
  rankings: readonly import('./matrix-definition-contract.js').MatrixRanking[];
@@ -159,13 +159,13 @@ export declare const matrixDescriptorSchema: z.ZodObject<{
159
159
  semanticFormat: z.ZodOptional<z.ZodType<SemaphorValueFormat, z.ZodTypeDef, SemaphorValueFormat>>;
160
160
  }, "strict", z.ZodTypeAny, {
161
161
  id: string;
162
- nativeDataType: string;
163
162
  column: SemaphorResultColumn;
163
+ nativeDataType: string;
164
164
  semanticFormat?: SemaphorValueFormat | undefined;
165
165
  }, {
166
166
  id: string;
167
- nativeDataType: string;
168
167
  column: SemaphorResultColumn;
168
+ nativeDataType: string;
169
169
  semanticFormat?: SemaphorValueFormat | undefined;
170
170
  }>;
171
171
  export declare const matrixFailureSchema: z.ZodType<MatrixFailure>;
@@ -188,13 +188,13 @@ export declare const assistantCardFieldSchema: z.ZodObject<{
188
188
  }, "strict", z.ZodTypeAny, {
189
189
  label: string;
190
190
  name: string;
191
- role: "measure" | "row" | "detail" | "column";
191
+ role: "measure" | "row" | "column" | "detail";
192
192
  granularity?: string | undefined;
193
193
  aggregate?: string | undefined;
194
194
  }, {
195
195
  label: string;
196
196
  name: string;
197
- role: "measure" | "row" | "detail" | "column";
197
+ role: "measure" | "row" | "column" | "detail";
198
198
  granularity?: string | undefined;
199
199
  aggregate?: string | undefined;
200
200
  }>;
@@ -320,13 +320,13 @@ export declare const assistantContextSchema: z.ZodEffects<z.ZodObject<{
320
320
  }, "strict", z.ZodTypeAny, {
321
321
  label: string;
322
322
  name: string;
323
- role: "measure" | "row" | "detail" | "column";
323
+ role: "measure" | "row" | "column" | "detail";
324
324
  granularity?: string | undefined;
325
325
  aggregate?: string | undefined;
326
326
  }, {
327
327
  label: string;
328
328
  name: string;
329
- role: "measure" | "row" | "detail" | "column";
329
+ role: "measure" | "row" | "column" | "detail";
330
330
  granularity?: string | undefined;
331
331
  aggregate?: string | undefined;
332
332
  }>, "many">;
@@ -336,11 +336,11 @@ export declare const assistantContextSchema: z.ZodEffects<z.ZodObject<{
336
336
  omittedValues: z.ZodOptional<z.ZodNumber>;
337
337
  }, "strict", z.ZodTypeAny, {
338
338
  text: string;
339
- origin: "selection" | "card" | "drill" | "dashboard_input" | "card_input";
339
+ origin: "card" | "selection" | "drill" | "dashboard_input" | "card_input";
340
340
  omittedValues?: number | undefined;
341
341
  }, {
342
342
  text: string;
343
- origin: "selection" | "card" | "drill" | "dashboard_input" | "card_input";
343
+ origin: "card" | "selection" | "drill" | "dashboard_input" | "card_input";
344
344
  omittedValues?: number | undefined;
345
345
  }>, "many">;
346
346
  controls: z.ZodArray<z.ZodObject<{
@@ -399,13 +399,13 @@ export declare const assistantContextSchema: z.ZodEffects<z.ZodObject<{
399
399
  status: "described";
400
400
  filters: {
401
401
  text: string;
402
- origin: "selection" | "card" | "drill" | "dashboard_input" | "card_input";
402
+ origin: "card" | "selection" | "drill" | "dashboard_input" | "card_input";
403
403
  omittedValues?: number | undefined;
404
404
  }[];
405
405
  fields: {
406
406
  label: string;
407
407
  name: string;
408
- role: "measure" | "row" | "detail" | "column";
408
+ role: "measure" | "row" | "column" | "detail";
409
409
  granularity?: string | undefined;
410
410
  aggregate?: string | undefined;
411
411
  }[];
@@ -434,13 +434,13 @@ export declare const assistantContextSchema: z.ZodEffects<z.ZodObject<{
434
434
  status: "described";
435
435
  filters: {
436
436
  text: string;
437
- origin: "selection" | "card" | "drill" | "dashboard_input" | "card_input";
437
+ origin: "card" | "selection" | "drill" | "dashboard_input" | "card_input";
438
438
  omittedValues?: number | undefined;
439
439
  }[];
440
440
  fields: {
441
441
  label: string;
442
442
  name: string;
443
- role: "measure" | "row" | "detail" | "column";
443
+ role: "measure" | "row" | "column" | "detail";
444
444
  granularity?: string | undefined;
445
445
  aggregate?: string | undefined;
446
446
  }[];
@@ -488,13 +488,13 @@ export declare const assistantContextSchema: z.ZodEffects<z.ZodObject<{
488
488
  status: "described";
489
489
  filters: {
490
490
  text: string;
491
- origin: "selection" | "card" | "drill" | "dashboard_input" | "card_input";
491
+ origin: "card" | "selection" | "drill" | "dashboard_input" | "card_input";
492
492
  omittedValues?: number | undefined;
493
493
  }[];
494
494
  fields: {
495
495
  label: string;
496
496
  name: string;
497
- role: "measure" | "row" | "detail" | "column";
497
+ role: "measure" | "row" | "column" | "detail";
498
498
  granularity?: string | undefined;
499
499
  aggregate?: string | undefined;
500
500
  }[];
@@ -534,13 +534,13 @@ export declare const assistantContextSchema: z.ZodEffects<z.ZodObject<{
534
534
  status: "described";
535
535
  filters: {
536
536
  text: string;
537
- origin: "selection" | "card" | "drill" | "dashboard_input" | "card_input";
537
+ origin: "card" | "selection" | "drill" | "dashboard_input" | "card_input";
538
538
  omittedValues?: number | undefined;
539
539
  }[];
540
540
  fields: {
541
541
  label: string;
542
542
  name: string;
543
- role: "measure" | "row" | "detail" | "column";
543
+ role: "measure" | "row" | "column" | "detail";
544
544
  granularity?: string | undefined;
545
545
  aggregate?: string | undefined;
546
546
  }[];
@@ -593,13 +593,13 @@ export declare const assistantContextSchema: z.ZodEffects<z.ZodObject<{
593
593
  }>>;
594
594
  timeZone: z.ZodString;
595
595
  }, "strict", z.ZodTypeAny, {
596
+ timeZone: string;
596
597
  cards: {
597
598
  id: string;
598
599
  title: string;
599
600
  visualType: string;
600
601
  source?: SemaphorSourceRef | undefined;
601
602
  }[];
602
- timeZone: string;
603
603
  version: 1;
604
604
  surface: "none" | "dashboard" | "editor";
605
605
  otherSheets: {
@@ -640,13 +640,13 @@ export declare const assistantContextSchema: z.ZodEffects<z.ZodObject<{
640
640
  status: "described";
641
641
  filters: {
642
642
  text: string;
643
- origin: "selection" | "card" | "drill" | "dashboard_input" | "card_input";
643
+ origin: "card" | "selection" | "drill" | "dashboard_input" | "card_input";
644
644
  omittedValues?: number | undefined;
645
645
  }[];
646
646
  fields: {
647
647
  label: string;
648
648
  name: string;
649
- role: "measure" | "row" | "detail" | "column";
649
+ role: "measure" | "row" | "column" | "detail";
650
650
  granularity?: string | undefined;
651
651
  aggregate?: string | undefined;
652
652
  }[];
@@ -685,13 +685,13 @@ export declare const assistantContextSchema: z.ZodEffects<z.ZodObject<{
685
685
  mode: "sql" | "visual";
686
686
  } | undefined;
687
687
  }, {
688
+ timeZone: string;
688
689
  cards: {
689
690
  id: string;
690
691
  title: string;
691
692
  visualType: string;
692
693
  source?: SemaphorSourceRef | undefined;
693
694
  }[];
694
- timeZone: string;
695
695
  version: 1;
696
696
  surface: "none" | "dashboard" | "editor";
697
697
  otherSheets: {
@@ -732,13 +732,13 @@ export declare const assistantContextSchema: z.ZodEffects<z.ZodObject<{
732
732
  status: "described";
733
733
  filters: {
734
734
  text: string;
735
- origin: "selection" | "card" | "drill" | "dashboard_input" | "card_input";
735
+ origin: "card" | "selection" | "drill" | "dashboard_input" | "card_input";
736
736
  omittedValues?: number | undefined;
737
737
  }[];
738
738
  fields: {
739
739
  label: string;
740
740
  name: string;
741
- role: "measure" | "row" | "detail" | "column";
741
+ role: "measure" | "row" | "column" | "detail";
742
742
  granularity?: string | undefined;
743
743
  aggregate?: string | undefined;
744
744
  }[];
@@ -777,13 +777,13 @@ export declare const assistantContextSchema: z.ZodEffects<z.ZodObject<{
777
777
  mode: "sql" | "visual";
778
778
  } | undefined;
779
779
  }>, {
780
+ timeZone: string;
780
781
  cards: {
781
782
  id: string;
782
783
  title: string;
783
784
  visualType: string;
784
785
  source?: SemaphorSourceRef | undefined;
785
786
  }[];
786
- timeZone: string;
787
787
  version: 1;
788
788
  surface: "none" | "dashboard" | "editor";
789
789
  otherSheets: {
@@ -824,13 +824,13 @@ export declare const assistantContextSchema: z.ZodEffects<z.ZodObject<{
824
824
  status: "described";
825
825
  filters: {
826
826
  text: string;
827
- origin: "selection" | "card" | "drill" | "dashboard_input" | "card_input";
827
+ origin: "card" | "selection" | "drill" | "dashboard_input" | "card_input";
828
828
  omittedValues?: number | undefined;
829
829
  }[];
830
830
  fields: {
831
831
  label: string;
832
832
  name: string;
833
- role: "measure" | "row" | "detail" | "column";
833
+ role: "measure" | "row" | "column" | "detail";
834
834
  granularity?: string | undefined;
835
835
  aggregate?: string | undefined;
836
836
  }[];
@@ -869,13 +869,13 @@ export declare const assistantContextSchema: z.ZodEffects<z.ZodObject<{
869
869
  mode: "sql" | "visual";
870
870
  } | undefined;
871
871
  }, {
872
+ timeZone: string;
872
873
  cards: {
873
874
  id: string;
874
875
  title: string;
875
876
  visualType: string;
876
877
  source?: SemaphorSourceRef | undefined;
877
878
  }[];
878
- timeZone: string;
879
879
  version: 1;
880
880
  surface: "none" | "dashboard" | "editor";
881
881
  otherSheets: {
@@ -916,13 +916,13 @@ export declare const assistantContextSchema: z.ZodEffects<z.ZodObject<{
916
916
  status: "described";
917
917
  filters: {
918
918
  text: string;
919
- origin: "selection" | "card" | "drill" | "dashboard_input" | "card_input";
919
+ origin: "card" | "selection" | "drill" | "dashboard_input" | "card_input";
920
920
  omittedValues?: number | undefined;
921
921
  }[];
922
922
  fields: {
923
923
  label: string;
924
924
  name: string;
925
- role: "measure" | "row" | "detail" | "column";
925
+ role: "measure" | "row" | "column" | "detail";
926
926
  granularity?: string | undefined;
927
927
  aggregate?: string | undefined;
928
928
  }[];
@@ -56,7 +56,11 @@ export type AssistantProposalPart = {
56
56
  warnings: ChangeDiagnostic[];
57
57
  risk: 'low' | 'medium';
58
58
  created: CreatedEntity[];
59
+ /** Asked from the card editor: the change is to the card being edited ("Editor changes"); absent on the dashboard. */
60
+ inEditor?: true;
59
61
  };
62
+ /** A change block's title: where the change goes (Rohit, 2026-11-16). */
63
+ export declare function proposalTitle(proposal: Pick<AssistantProposalPart, 'inEditor'>): string;
60
64
  export type AssistantProposalChange = {
61
65
  op: string;
62
66
  sentence: string;
@@ -42,7 +42,8 @@ export type AssistantTurnRequest = {
42
42
  * The dashboard document on screen, as the store holds it (Phase 7,
43
43
  * D7-11, D7-12): propose works from it, so a change is made to what the
44
44
  * person sees, unsaved edits included. Sent on the dashboard surface where
45
- * the person may change it (`useCanChangeOpenDashboard`). Outside
45
+ * the person may change it (`useCanChangeOpenDashboard`), and in the editor
46
+ * with the card being edited as its draft (custom visuals EXT-D25). Outside
46
47
  * `requestBytes`, with its own cap; never read by the model, never stored.
47
48
  */
48
49
  openDashboard?: TDashboard;
@@ -6,12 +6,21 @@ type Entity = DatabaseEntityReference;
6
6
  export declare function cardSelectedEntities<E extends {
7
7
  name: string;
8
8
  }>(base: E, reads: readonly E[], same?: (a: E, b: E) => boolean): E[];
9
+ type BaseCard = Pick<TCard, 'type' | 'config' | 'dataSource'>;
9
10
  /**
10
- * The card's base as it is saved (OB-D11, OB-D17): the selected entity
11
- * `queryBaseSource` names, else its own join plan's base, else the base the
12
- * server resolved for its last query, else the first selected.
11
+ * The base the card states (OB-D11): the selected entity `queryBaseSource`
12
+ * names, else its own join plan's base, by name and then by alias (a
13
+ * semantic card's join set up from the plan its query resolved names the
14
+ * physical table, its alias the selected dataset). Undefined when it states
15
+ * neither.
13
16
  */
14
- export declare function cardBaseEntity(card: Pick<TCard, 'type' | 'config' | 'dataSource'>, resolvedBaseName?: string): Entity | undefined;
17
+ export declare function statedCardBaseEntity(card: BaseCard): Entity | undefined;
18
+ /**
19
+ * The card's base as it is saved (OB-D11, OB-D17): the base it states
20
+ * (`statedCardBaseEntity`), else the base the server resolved for its last
21
+ * query, else the first selected.
22
+ */
23
+ export declare function cardBaseEntity(card: BaseCard, resolvedBaseName?: string): Entity | undefined;
15
24
  /**
16
25
  * A dataset the base reaches, as a selected entity: the base's connection
17
26
  * and domain, the dataset's own name, label and table (the joinability
@@ -90,8 +99,9 @@ export declare function switchCardBase(input: {
90
99
  * card didn't read before the write are added, so a sort or format change
91
100
  * adds nothing, and nothing is ever removed (OB-INV-1; ledger P4-09). The
92
101
  * entity takes the dataset's table coordinates from the field's own catalog
93
- * identity. Matrix and direct cards (whose joins write their selection) are
94
- * left as they are. A card is semantic by its base, a dataset, whether or not
102
+ * identity, and the card states its base (`queryBaseSource`) when it didn't.
103
+ * Matrix and direct cards (whose joins write their selection) are left as
104
+ * they are. A card is semantic by its base, a dataset, whether or not
95
105
  * its source states a mode (a new visual's states none; ledger P7-01).
96
106
  */
97
107
  export declare function withReadDatasetsSelected(card: TCard, previous: TCard | undefined,
@@ -0,0 +1,44 @@
1
+ import { TCard } from '../../../lib/types/common-types.js';
2
+ import { FieldRef, SettingId, SettingValue, SlotId, VisualManifest } from '../../extensions/types.js';
3
+ import { ChangeDiagnostic } from '../changes/diagnostics.js';
4
+ /** One change to a custom visual card, as the editor's panel and the MCP state it. */
5
+ export type CustomVisualChange = {
6
+ /** New HTML. The card holds it as a draft until the dashboard saves (EXT-D3). */
7
+ html?: string;
8
+ /** Slot overrides by slot id; `null` returns a slot to its place by position (EXT-D6). */
9
+ slots?: Record<SlotId, FieldRef | null>;
10
+ /** Setting values by id; `null` returns a setting to the manifest's default. */
11
+ settings?: Record<SettingId, SettingValue | null>;
12
+ /**
13
+ * Takes the visual off the card, which stays a custom visual card with no
14
+ * visual: the editor's Start over, back to the three ways to start
15
+ * (custom visuals EXT-D33). Nothing else may be stated with it.
16
+ */
17
+ clear?: true;
18
+ };
19
+ export type CustomVisualWrite<T> = {
20
+ ok: true;
21
+ card: T;
22
+ manifest: VisualManifest | undefined;
23
+ } | {
24
+ ok: false;
25
+ problem: ChangeDiagnostic;
26
+ };
27
+ /**
28
+ * The one writer of a custom visual card (EXT-D14, spec §3.7): the editor's
29
+ * panel and the MCP resolver both call it, so the two save the same card.
30
+ * Pure; the card is returned unchanged (the same object) when nothing changed.
31
+ *
32
+ * - It sets `type: 'customVisual'`.
33
+ * - New HTML is read with the shared reader and becomes a draft, dropping the
34
+ * pinned version (a draft never pins one) and keeping `extensionId`, so the
35
+ * save adds a version to the same visual. Overrides the new manifest no
36
+ * longer has are dropped.
37
+ * - Slots and settings are checked against the manifest: the new HTML's, or
38
+ * for a saved visual the one the caller passes. Unknown ids and values the
39
+ * definition doesn't take are refused; a setting equal to its default and
40
+ * `null` both remove the override; an empty map is left out.
41
+ */
42
+ export declare function writeCustomVisual<T extends Pick<TCard, 'type' | 'customVisual'>>(card: T, change: CustomVisualChange, context?: {
43
+ manifest?: VisualManifest;
44
+ }): CustomVisualWrite<T>;
@@ -16,3 +16,4 @@ export type { ResolvedCardSettings, ResolvedColumnSettings, ResolvedComparisonDi
16
16
  export { SETTINGS_BY_KIND, cardSettingsKind, type CardSettingsKind, type SettingName } from './card-kinds.js';
17
17
  export type { AxisInput, CardSettingsInput, ColumnSettingsInput, ComparisonDisplayInput, DashboardUpdateChange, FormatInput, FormatPatch, HighlightAddChange, HighlightColor, HighlightCondition, HighlightRemoveChange, HighlightStyleInput, LegendPosition, Polarity, } from './inputs.js';
18
18
  export type { CardSettingsView, ColumnSettingsRole, ColumnSettingsView, HighlightView } from './views.js';
19
+ export { writeCustomVisual, type CustomVisualChange, type CustomVisualWrite } from './custom-visual-write.js';
@@ -133,6 +133,7 @@ export declare const CARD_KEY_CLASSES: {
133
133
  readonly customCfg: "presentation";
134
134
  readonly preferences: "presentation";
135
135
  readonly customCardPreferences: "presentation";
136
+ readonly customVisual: "presentation";
136
137
  readonly lastSelectedDatabase: "presentation";
137
138
  readonly lastSelectedDatamodelId: "presentation";
138
139
  readonly lastSelectedSchema: "presentation";
@@ -5,7 +5,7 @@ import { TCard } from '../../../lib/types/common-types.js';
5
5
  * DE-D20, DE-D43). Public names are snake_case; each maps to one stored chart
6
6
  * type. Every other chart type still has a public name, for reading.
7
7
  */
8
- export declare const CARD_TYPES: readonly ["kpi", "bar", "line", "area", "pie", "table", "detail_table", "matrix"];
8
+ export declare const CARD_TYPES: readonly ["kpi", "bar", "line", "area", "pie", "table", "detail_table", "matrix", "custom_visual"];
9
9
  export type CardType = (typeof CARD_TYPES)[number];
10
10
  /** The three query forms a card can be written in. */
11
11
  export type CardQueryForm = 'measures' | 'records' | 'sql';
@@ -29,7 +29,7 @@ export declare function isCardType(value: unknown): value is CardType;
29
29
  export declare function toChartType(type: CardType): TChartType;
30
30
  /** Every chart type's public snake_case name (`detailTable` is `detail_table`, `matrixTable` is `matrix`). */
31
31
  export declare function toPublicCardType(chartType: TChartType | string | undefined): string;
32
- /** The settable card type a chart type is, or undefined when it is not one of the eight. */
32
+ /** The settable card type a chart type is, or undefined when it is not a settable one. */
33
33
  export declare function settableCardType(chartType: TChartType | string | undefined): CardType | undefined;
34
34
  /** A chart variant as properties of its base type (card appearance CA-D6, CV-1). */
35
35
  export type CardTypeProperties = {
@@ -0,0 +1,57 @@
1
+ import { TCard } from '../../../lib/types/common-types.js';
2
+ import { SettingValue, VisualManifest } from '../../extensions/types.js';
3
+ import { ChangeDiagnostic } from './diagnostics.js';
4
+ /** A custom visual change as an agent states it: slots by the query's field names (EXT-D12). */
5
+ export type StatedCustomVisual = {
6
+ html?: string;
7
+ slots?: Record<string, string | null>;
8
+ settings?: Record<string, SettingValue | null>;
9
+ };
10
+ /** What changed, for the change's sentences: the operation words it (custom visuals Plan 1, Phase 3). */
11
+ export type CustomVisualWording = {
12
+ /** The visual's name when its code changed. */
13
+ code?: string;
14
+ settings?: {
15
+ label: string;
16
+ value: string;
17
+ }[];
18
+ slots?: {
19
+ label: string;
20
+ field: string | null;
21
+ }[];
22
+ };
23
+ /**
24
+ * One custom visual change on a card (card.add and card.update): slot field
25
+ * names become the card's own field refs, then the one writer
26
+ * (`writeCustomVisual`, EXT-D14) checks and writes it. `manifest` is the
27
+ * saved visual's, for a slot or setting change without new HTML. A SQL
28
+ * card's names are checked against `sqlColumns` when they are known.
29
+ */
30
+ export declare function resolveCustomVisualChange(input: {
31
+ card: TCard;
32
+ stated: StatedCustomVisual;
33
+ manifest?: VisualManifest;
34
+ sqlColumns?: readonly string[] | null;
35
+ path: string;
36
+ }): {
37
+ ok: true;
38
+ card: TCard;
39
+ wording: CustomVisualWording;
40
+ } | {
41
+ ok: false;
42
+ problem: ChangeDiagnostic;
43
+ };
44
+ /** The manifest of a card's draft, when it has one. */
45
+ export declare function draftManifest(card: Pick<TCard, 'customVisual'>): VisualManifest | undefined;
46
+ /** A custom visual card in the outline (EXT-D13): its visual by name and reference, and the overrides an agent can change. */
47
+ export type OutlineCustomVisual = {
48
+ name?: string;
49
+ extensionId?: string;
50
+ version?: number;
51
+ /** Unsaved: the code changed since the dashboard was saved. */
52
+ unsaved?: true;
53
+ /** Slots moved from their place in order: slot id to the query field it shows. */
54
+ slots?: Record<string, string>;
55
+ settings?: Record<string, SettingValue>;
56
+ };
57
+ export declare function outlineCustomVisual(card: TCard, names: Readonly<Record<string, string>> | undefined): OutlineCustomVisual;