react-semaphor 0.1.564 → 0.1.566

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 (138) 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 +53 -49
  7. package/dist/chunks/{assistant-chat-D1BEEHUF.js → assistant-chat-DNKAYSQL.js} +204 -204
  8. package/dist/chunks/{bookmark-impact-XOsVUAqW.js → bookmark-impact-BeUbq0jc.js} +2 -2
  9. package/dist/chunks/bookmark-state-ByODVqee.js +1613 -0
  10. package/dist/chunks/card-filter-builder-SXaRWbKr.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-Cni7nGhg.js} +1 -1
  14. package/dist/chunks/dashboard-briefing-launcher-CXeXRTem.js +4910 -0
  15. package/dist/chunks/{dashboard-controls-CJ8Dz50D.js → dashboard-controls-CsqKybrf.js} +685 -675
  16. package/dist/chunks/{dashboard-json-D3uZxGO-.js → dashboard-json-WWmw3Piu.js} +4 -4
  17. package/dist/chunks/{dates-EvDtT25n.js → dates-DJRUS-he.js} +12 -12
  18. package/dist/chunks/{edit-dashboard-visual-CgHJXBQv.js → edit-dashboard-visual-BrIEaBhc.js} +7724 -10341
  19. package/dist/chunks/filter-reach-copy-D5LqgrUf.js +4667 -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-Bq9UbCGk.js} +653 -574
  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-CeHioJwL.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-CwS-2r-b.js +21419 -0
  35. package/dist/chunks/{save-CHV1B1fL.js → save-D6pHmSSP.js} +1 -1
  36. package/dist/chunks/saved-dashboard-context-c-MZZTx2.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-B2NpYRE-.js} +81034 -80950
  39. package/dist/chunks/{shelf-drop-preview-context-cEyVkKTF.js → shelf-drop-preview-context-DM7yypwC.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-DTWc2pzt.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-DFizFCJu.js +241 -0
  48. package/dist/dashboard/index.js +2 -2
  49. package/dist/dashboard-authoring/index.js +2324 -1796
  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/briefings/delivery-outcome.d.ts +37 -0
  62. package/dist/types/briefings/index.d.ts +2 -0
  63. package/dist/types/briefings/run-outcomes.d.ts +6 -0
  64. package/dist/types/components/briefings/briefing-author/run-model.d.ts +9 -0
  65. package/dist/types/components/dashboard-variables/data-variables-menu.d.ts +8 -0
  66. package/dist/types/components/dashboard-variables/variable-editor-host.d.ts +1 -0
  67. package/dist/types/components/index.d.ts +2 -0
  68. package/dist/types/index.js +5 -5
  69. package/dist/types/lib/dashboard-inputs/build-normalized-dashboard-inputs.d.ts +62 -0
  70. package/dist/types/lib/dashboard-inputs/dashboard-filter-mapping-authoring.d.ts +33 -2
  71. package/dist/types/lib/dashboard-inputs/filter-settings.d.ts +7 -2
  72. package/dist/types/lib/dashboard-inputs/prepare-loaded-dashboard.d.ts +4 -2
  73. package/dist/types/lib/dashboard-variables/data-text.d.ts +33 -0
  74. package/dist/types/lib/dashboard-variables/types.d.ts +207 -0
  75. package/dist/types/lib/document/document-edits.d.ts +16 -1
  76. package/dist/types/lib/document/document-panel-target.d.ts +1 -1
  77. package/dist/types/lib/document/document-section-query-options.d.ts +29 -0
  78. package/dist/types/lib/document/document-table-data-policy.d.ts +0 -1
  79. package/dist/types/lib/hooks/use-dashboard-frame-query.d.ts +92 -0
  80. package/dist/types/lib/query-context/build-card-query-context.d.ts +6 -0
  81. package/dist/types/lib/query-context/dashboard-filter-mapping-resolution.d.ts +15 -3
  82. package/dist/types/lib/query-context/describe-card-execution-snapshot.d.ts +1 -0
  83. package/dist/types/lib/query-context/use-semantic-execution-payload-for-cards.d.ts +24 -0
  84. package/dist/types/lib/stores/dashboard-store.d.ts +36 -0
  85. package/dist/types/lib/text-variables/temporal-input-text.d.ts +28 -0
  86. package/dist/types/lib/text-variables/text-variable-types.d.ts +72 -0
  87. package/dist/types/lib/types/common-types.d.ts +155 -51
  88. package/dist/types/lib/utils/card-definition.d.ts +2 -2
  89. package/dist/types/shared/assistant-context/index.d.ts +1 -1
  90. package/dist/types/shared/assistant-context/saved-dashboard-context.d.ts +51 -1
  91. package/dist/types/shared/dashboard-authoring/card-query-request.d.ts +7 -1
  92. package/dist/types/shared/dashboard-authoring/card-settings/resolve-card-highlights.d.ts +10 -0
  93. package/dist/types/shared/dashboard-authoring/changes/card-query-part.d.ts +1 -0
  94. package/dist/types/shared/dashboard-authoring/changes/dashboard-change.d.ts +1087 -430
  95. package/dist/types/shared/dashboard-authoring/changes/diagnostics.d.ts +20 -1
  96. package/dist/types/shared/dashboard-authoring/changes/resolve-dashboard-changes.d.ts +1 -1
  97. package/dist/types/shared/dashboard-authoring/conditional-formatting/kpi.d.ts +10 -0
  98. package/dist/types/shared/dashboard-authoring/conditional-formatting/schema.d.ts +40 -40
  99. package/dist/types/shared/dashboard-authoring/control-execution-contract.d.ts +16 -16
  100. package/dist/types/shared/dashboard-authoring/dashboard-card-source-index.d.ts +1 -0
  101. package/dist/types/shared/dashboard-authoring/dashboard-filter-sql-subscription.d.ts +24 -0
  102. package/dist/types/shared/dashboard-authoring/dashboard-filter-targets.d.ts +29 -0
  103. package/dist/types/shared/dashboard-authoring/dashboard-input-scope.d.ts +7 -4
  104. package/dist/types/shared/dashboard-authoring/dashboard-variable-card.d.ts +159 -0
  105. package/dist/types/shared/dashboard-authoring/dashboard-variable-changes.d.ts +61 -0
  106. package/dist/types/shared/dashboard-authoring/document-section-cards.d.ts +7 -0
  107. package/dist/types/shared/dashboard-authoring/filter-model/index.d.ts +2 -0
  108. package/dist/types/shared/dashboard-authoring/filter-model/read-dashboard-filter-model.d.ts +10 -0
  109. package/dist/types/shared/dashboard-authoring/index.d.ts +6 -0
  110. package/dist/types/shared/dashboard-authoring/measure-calculations/comparison.d.ts +2 -0
  111. package/dist/types/shared/dashboard-authoring/operations/operation-sentences.d.ts +1 -1
  112. package/dist/types/shared/dashboard-authoring/operations/operation-types.d.ts +50 -3
  113. package/dist/types/shared/dashboard-authoring/outline/outline-dashboard.d.ts +48 -1
  114. package/dist/types/shared/dashboard-authoring/outline/outline-filters.d.ts +22 -6
  115. package/dist/types/shared/dashboard-authoring/text-card-words/blocks.d.ts +87 -13
  116. package/dist/types/shared/dashboard-authoring/text-card-words/chip-colors.d.ts +23 -0
  117. package/dist/types/shared/dashboard-authoring/text-card-words/index.d.ts +90 -8
  118. package/dist/types/shared/dashboard-authoring/text-card-words/rich-content.d.ts +31 -3
  119. package/dist/types/shared/dashboard-authoring/text-card-words/variable-words.d.ts +8 -0
  120. package/dist/types/shared/dashboard-authoring/variable-draft.d.ts +125 -0
  121. package/dist/types/shared/dashboard-authoring/variable-editability.d.ts +24 -0
  122. package/dist/types/shared/dashboard-authoring/variable-references.d.ts +39 -0
  123. package/dist/types/shared/format-utils/document-print.d.ts +4 -2
  124. package/dist/types/shared/format-utils/index.d.ts +1 -0
  125. package/dist/types/shared/format-utils/pdf-capacity-lines.d.ts +17 -0
  126. package/dist/types/shared/format-utils/pdf-delivery.d.ts +8 -1
  127. package/dist/types/shared/format-utils/pdf-export-policy.d.ts +74 -6
  128. package/dist/types/shared/format-utils/presentation-execution.d.ts +9 -0
  129. package/package.json +2 -2
  130. package/src/data-app-sdk/README.md +3 -3
  131. package/dist/chunks/bookmark-state-CWeoGbrx.js +0 -743
  132. package/dist/chunks/braces-DzgoQC64.js +0 -23
  133. package/dist/chunks/dashboard-briefing-launcher-lvYfJoUQ.js +0 -3878
  134. package/dist/chunks/filter-reach-copy-Cmb05jlE.js +0 -3965
  135. package/dist/chunks/global-date-filter-utils-ruJYwjgZ.js +0 -16733
  136. package/dist/chunks/resolve-dashboard-input-context-i_jCSYae.js +0 -8214
  137. package/dist/chunks/saved-dashboard-context-Dg3oDmH_.js +0 -564
  138. package/dist/chunks/use-create-flow-overlay-state-Dl6DCxh8.js +0 -1436
@@ -1,17 +1,85 @@
1
1
  /**
2
- * Shared structured Fast PDF routing and safety policy.
2
+ * Shared PDF policy: the PDF capacity contract and the structured Fast PDF
3
+ * path's own routing limits.
3
4
  *
4
5
  * These values are product policy, not deployment configuration. Keep this
5
6
  * module React-free so browser, app, and renderer adapters can enforce the
6
7
  * same limits at their trust boundaries.
7
8
  */
9
+ /**
10
+ * The PDF capacity contract (PDF capacity contract PC-D1): what one PDF
11
+ * holds, whatever path builds it (the fast path, the rendered path, a
12
+ * Document print, an all-sheets PDF, a delivery). Every enforcement point
13
+ * reads these values; none keeps its own copy (PC-INV-2).
14
+ */
15
+ export declare const PDF_CAPACITY: Readonly<{
16
+ /**
17
+ * Pages in one paginated PDF, a table or a Document, whatever its paper
18
+ * size or orientation (PC-D3, PC-D11). Measured on the worker (plan
19
+ * Phase 0).
20
+ */
21
+ maxPages: 300;
22
+ /**
23
+ * Rows in one table of a PDF, whatever prints it: a Table or Detail Table
24
+ * card, a scheduled table, a Matrix and a Document's Table section (PC-D2,
25
+ * PC-D9). Phase 0 measured 5,000 fitting every path on a 6 GB worker
26
+ * (PC-D15); more needs printing from data (PC-D16).
27
+ */
28
+ maxTableRows: 5000;
29
+ /**
30
+ * Bytes in one PDF file as a recipient gets it, encrypted or not, merged
31
+ * or not (PC-D5): 50 MiB, the delivery guard's size.
32
+ */
33
+ maxFileBytes: 52428800;
34
+ }>;
35
+ /**
36
+ * The structured fast path's own routing limit: the request it posts. Over
37
+ * it, the rendered path prints the table (PC-D14).
38
+ */
8
39
  export declare const FAST_PDF_POLICY: Readonly<{
9
- maxRows: 5000;
10
40
  maxRequestBytes: 2621440;
11
- maxPages: 100;
12
- maxOutputBytes: 52428800;
13
41
  }>;
42
+ /**
43
+ * The fast path's code before the capacity contract's typed codes (below). An
44
+ * older worker still sends it for a row, page or size refusal; readers treat
45
+ * it as a capacity refusal without facts.
46
+ */
14
47
  export declare const PDF_SAFETY_LIMIT_EXCEEDED: "PDF_SAFETY_LIMIT_EXCEEDED";
48
+ /**
49
+ * Why a PDF over the capacity contract was refused (PDF capacity contract
50
+ * PC-D8, PC-INV-3): one code per limit, the same on every path. The first
51
+ * three are also the delivery omission codes, so a delivery reads them
52
+ * straight through. A Document reports its own codes for the same limits
53
+ * (`document_row_limit_exceeded`, `document_page_limit_exceeded`), whose lines
54
+ * read the same.
55
+ */
56
+ export declare const PDF_CAPACITY_REFUSAL_CODES: readonly ["PDF_ROW_LIMIT_EXCEEDED", "PDF_PAGE_LIMIT_EXCEEDED", "PDF_SIZE_LIMIT_EXCEEDED", "PDF_CAPTURE_TOO_TALL"];
57
+ export type PdfCapacityRefusalCode = (typeof PDF_CAPACITY_REFUSAL_CODES)[number];
58
+ export declare function isPdfCapacityRefusalCode(value: unknown): value is PdfCapacityRefusalCode;
59
+ /**
60
+ * A table's numbers cannot fit its PDF columns without clipping: a layout
61
+ * failure, not a capacity one, with its own code.
62
+ */
63
+ export declare const PDF_NUMBER_COLUMN_TOO_WIDE: "PDF_NUMBER_COLUMN_TOO_WIDE";
64
+ /** What a capacity refusal says: the measure and its limit, counts only. */
65
+ export type PdfCapacityFacts = {
66
+ rowCount?: number;
67
+ rowLimit?: number;
68
+ pageCount?: number;
69
+ pageLimit?: number;
70
+ bytes?: number;
71
+ byteLimit?: number;
72
+ /** Logs only. */
73
+ heightPx?: number;
74
+ /** Logs only. */
75
+ heightLimitPx?: number;
76
+ };
77
+ /**
78
+ * The one parser of capacity facts: reads the JSON (or an object) and keeps
79
+ * only whole, non-negative counts of the known keys. Every reader parses with
80
+ * it; every writer writes its output.
81
+ */
82
+ export declare function readPdfCapacityFacts(value: unknown): PdfCapacityFacts;
15
83
  /**
16
84
  * Card types a PDF prints as a table, across pages, in table mode. The one
17
85
  * list every reader uses: the interactive download and export dialog, the
@@ -25,5 +93,5 @@ export declare function isPdfTableCardType(cardType: unknown): cardType is PdfTa
25
93
  export declare function getUtf8ByteLength(value: string): number;
26
94
  export declare function isFastPdfRowCountEligible(rowCount: number): boolean;
27
95
  export declare function isFastPdfRequestSizeEligible(byteLength: number): boolean;
28
- export declare function isFastPdfPageCountEligible(pageCount: number): boolean;
29
- export declare function isFastPdfOutputSizeEligible(byteLength: number): boolean;
96
+ /** A paginated PDF's page count within the contract's page cap (PC-D3). */
97
+ export declare function isPdfPageCountWithinCapacity(pageCount: number): boolean;
@@ -83,6 +83,15 @@ export declare function createPresentationExecutionSnapshot(input: {
83
83
  reportContext: ReportRuntimeContext;
84
84
  resolvedFormats: readonly ResolvedPresentationEntry[];
85
85
  }): PresentationExecutionSnapshot;
86
+ /**
87
+ * The snapshot with `entries` added only where it holds no entry for the same
88
+ * scope and target: its own entries always win, so nothing it already
89
+ * formats changes. For a recurring report whose dashboard now shows cards or
90
+ * columns its saved snapshot never captured; the caller resolves `entries`
91
+ * from the snapshot's own report context, never live preferences (value
92
+ * formatting Plan 05). Returns the snapshot itself when nothing is missing.
93
+ */
94
+ export declare function withMissingPresentationEntries(snapshot: PresentationExecutionSnapshot, entries: readonly ResolvedPresentationEntry[]): PresentationExecutionSnapshot;
86
95
  export declare function findResolvedNumericFormat(input: {
87
96
  snapshot: PresentationExecutionSnapshot;
88
97
  scope: PresentationScope;
package/package.json CHANGED
@@ -5,7 +5,7 @@
5
5
  "email": "support@semaphor.cloud"
6
6
  },
7
7
  "license": "MIT",
8
- "version": "0.1.564",
8
+ "version": "0.1.566",
9
9
  "description": "Fully interactive and customizable dashboards for your apps.",
10
10
  "keywords": [
11
11
  "react",
@@ -127,7 +127,7 @@
127
127
  "build": "node scripts/build.mjs",
128
128
  "lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
129
129
  "lint:regressions": "node scripts/lint-regressions.mjs",
130
- "check:guards": "node scripts/card-config-consumers.mjs && node scripts/components-entry-imports.mjs && node scripts/types-entry-imports.mjs && node scripts/card-query-assembly-imports.mjs && node scripts/matrix-conversion-imports.mjs && node scripts/legacy-table-type-references.mjs && node scripts/assistant-chat-imports.mjs && node scripts/filter-model-reads.mjs && node scripts/kpi-figure-reads.mjs && node scripts/layout-engine.mjs",
130
+ "check:guards": "node scripts/card-config-consumers.mjs && node scripts/components-entry-imports.mjs && node scripts/types-entry-imports.mjs && node scripts/card-query-assembly-imports.mjs && node scripts/matrix-conversion-imports.mjs && node scripts/legacy-table-type-references.mjs && node scripts/assistant-chat-imports.mjs && node scripts/filter-model-reads.mjs && node scripts/kpi-figure-reads.mjs && node scripts/layout-engine.mjs && node scripts/text-variable-refs.mjs && node scripts/data-variable-derivation.mjs && node scripts/variable-name-allocation.mjs",
131
131
  "preview": "vite preview",
132
132
  "test": "vitest run",
133
133
  "test:changed": "vitest run --changed",
@@ -1,8 +1,8 @@
1
1
  # Data App SDK Quick Reference
2
2
 
3
- > Frozen: no new work goes into this SDK. A replacement built on the shared
4
- > analytics protocol replaces it in place (semaphor-app
5
- > `docs/implementation-plans/analytics-mcp-and-sdk/PLAN-3-ANALYTICS-SDK.md`).
3
+ > Frozen: no new work goes into this SDK. A false start, to be retired; no
4
+ > replacement SDK is planned for custom looks (they go through the dashboard
5
+ > runtime).
6
6
 
7
7
  Use this file as the public contract quick reference for Data App SDK code.
8
8
  Do not inspect SDK implementation internals to discover these patterns.