@sentropic/design-system-elements 0.2.0 → 0.3.2

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 (93) hide show
  1. package/LICENSE.THIRD-PARTY.md +44 -1
  2. package/README.md +81 -13
  3. package/catalog.json +401 -7
  4. package/dist/browser/chunks/{Modeler-BfAmwsmK.js → Modeler-D87tL_OJ.js} +4 -4
  5. package/dist/browser/chunks/Viewer-D9zjRrp2.js +4 -0
  6. package/dist/browser/chunks/bpmn-canvas-BevbP_6a.js +1 -0
  7. package/dist/browser/chunks/bpmn-mount-BhO_zb0S.js +2202 -0
  8. package/dist/browser/chunks/dist-DRauAwm2.js +6 -0
  9. package/dist/browser/chunks/{entropic-CM5BHERN.js → entropic-MwNVEq6w.js} +639 -0
  10. package/dist/browser/chunks/focus-renderer-BWm7DlQD.js +55 -0
  11. package/dist/browser/chunks/{forge-B8hrW4lA.js → forge-CzwO8Hbe.js} +639 -0
  12. package/dist/browser/chunks/layout-T3X333Za.js +1 -0
  13. package/dist/browser/elements.js +671 -6
  14. package/dist/browser/sri.json +52 -45
  15. package/dist/contracts/bar-chart.js +2 -2
  16. package/dist/contracts/decision-dossier.d.ts +4 -8
  17. package/dist/contracts/decision-dossier.js +8 -12
  18. package/dist/contracts/index.d.ts +1 -0
  19. package/dist/contracts/index.js +2 -0
  20. package/dist/contracts/time-series-chart.d.ts +49 -0
  21. package/dist/contracts/time-series-chart.js +37 -0
  22. package/dist/dossier/dossier-mount.js +845 -0
  23. package/dist/dossier/renderer/dossier.css +2 -0
  24. package/dist/element/bpmn-mount.d.ts +11 -0
  25. package/dist/element/bpmn-mount.js +56 -0
  26. package/dist/element/bpmn-types.d.ts +27 -0
  27. package/dist/element/bpmn-types.js +12 -0
  28. package/dist/element/bpmn.d.ts +10 -0
  29. package/dist/element/bpmn.js +39 -0
  30. package/dist/element/dom/dossier-mount.d.ts +25 -0
  31. package/dist/element/dom/dossier-review-mount.d.ts +25 -0
  32. package/dist/element/dom/dossier-review-state.svelte.d.ts +13 -0
  33. package/dist/element/dom/engines/bpmn-canvas.d.ts +11 -0
  34. package/dist/element/dom/engines/bpmn-canvas.js +11 -0
  35. package/dist/element/dom/engines/dossier-diagrams.d.ts +5 -0
  36. package/dist/element/dom/engines/dossier-evidence.d.ts +9 -0
  37. package/dist/element/dom/engines/dossier-styles.d.ts +21 -0
  38. package/dist/element/dom/engines/focus-renderer.d.ts +60 -0
  39. package/dist/element/dom/engines/focus-snapshot.d.ts +3 -0
  40. package/dist/element/dom/intents.d.ts +20 -0
  41. package/dist/element/markdown/minimal-markdown.d.ts +1 -2
  42. package/dist/element/markdown/minimal-markdown.js +19 -1
  43. package/dist/element/validator.d.ts +26 -0
  44. package/dist/element/validator.js +54 -0
  45. package/dist/focus-diagrams/diagram-layout.d.ts +140 -0
  46. package/dist/focus-diagrams/diagram-layout.js +190 -0
  47. package/dist/focus-diagrams/diagram-source.d.ts +11 -0
  48. package/dist/focus-diagrams/diagram-source.js +147 -0
  49. package/dist/focus-diagrams/dossier-views.d.ts +21 -0
  50. package/dist/focus-diagrams/dossier-views.js +57 -0
  51. package/dist/focus-diagrams/ecosystem.json +853 -0
  52. package/dist/focus-kit/index.html +13 -0
  53. package/dist/focus-kit/renderer/dossier.css +2 -0
  54. package/dist/focus-kit/renderer/dossier.js +845 -0
  55. package/dist/focus-kit-manifest.json +1 -0
  56. package/dist/focus-kit.d.ts +9 -0
  57. package/dist/focus-kit.js +30 -0
  58. package/dist/format-time-series-markdown.d.ts +5 -0
  59. package/dist/format-time-series-markdown.js +24 -0
  60. package/dist/generator/parity.js +6 -1
  61. package/dist/index.d.ts +2 -0
  62. package/dist/index.js +1 -0
  63. package/dist/ports/dossier-views.d.ts +3 -0
  64. package/dist/ports/dossier-views.js +3 -0
  65. package/dist/ports/focus.d.ts +0 -1
  66. package/dist/ports/types.d.ts +0 -1
  67. package/dist/shells/BarChart.html +8494 -0
  68. package/dist/shells/BarChart.js +8482 -0
  69. package/dist/shells/DecisionDossier.html +8502 -0
  70. package/dist/shells/DecisionDossier.js +8490 -0
  71. package/dist/shells/TimeSeriesChart.html +8475 -0
  72. package/dist/shells/TimeSeriesChart.js +8463 -0
  73. package/dist/shells/manifest.json +108 -0
  74. package/dist/structure/interpreter.d.ts +1 -1
  75. package/dist/structure/interpreter.js +14 -4
  76. package/dist/time-series.d.ts +13 -0
  77. package/dist/time-series.js +15 -0
  78. package/dist/validate/envelope.js +5 -1
  79. package/dist/validate/time-series.d.ts +5 -0
  80. package/dist/validate/time-series.js +28 -0
  81. package/fixtures/time-series-multi.json +46 -0
  82. package/fixtures/time-series-single.json +28 -0
  83. package/fixtures/time-series-thresholds.json +52 -0
  84. package/package.json +40 -6
  85. package/schemas/BarChart.v1.json +2 -2
  86. package/schemas/DecisionDossier.v1.json +155 -5
  87. package/schemas/TimeSeriesChart.v1.json +287 -0
  88. package/skill/SKILL.md +27 -0
  89. package/dist/browser/chunks/Viewer-eYLzc3fD.js +0 -4
  90. package/dist/browser/chunks/bpmn-canvas-DeAWdJFy.js +0 -2207
  91. package/dist/browser/chunks/dist-O6_2ByYB.js +0 -1
  92. package/dist/browser/chunks/focus-renderer-0elVToA2.js +0 -10
  93. package/dist/browser/chunks/layout-q0TR9-aY.js +0 -1
@@ -179,7 +179,7 @@ présente dans `dist/browser` est nommée ici.
179
179
  ## 2. Dépendances installées avec ce paquet
180
180
 
181
181
  Fermeture **transitive** de `dependencies` et `optionalDependencies`, dérivée
182
- de `package-lock.json` : 142 paquet(s), 7 famille(s) de licences.
182
+ de `package-lock.json` : 143 paquet(s), 7 famille(s) de licences.
183
183
  Ces paquets ne sont pas recopiés dans notre tarball — npm les récupère du
184
184
  registre avec leurs propres fichiers de licence. Ils sont recensés ici parce
185
185
  qu'ils arrivent dans le `node_modules` du consommateur de notre fait.
@@ -196,6 +196,7 @@ qu'ils arrivent dans le `node_modules` du consommateur de notre fait.
196
196
  | `@lezer/common` | 1.5.2 | MIT |
197
197
  | `@lezer/highlight` | 1.2.3 | MIT |
198
198
  | `@lezer/markdown` | 1.8.0 | MIT |
199
+ | `@lucide/svelte` | 0.562.0 | ISC |
199
200
  | `@modelcontextprotocol/sdk` | 1.32.2 | MIT |
200
201
  | `@noble/hashes` | 2.0.1 | MIT |
201
202
  | `@sveltejs/acorn-typescript` | 1.0.9 | MIT |
@@ -569,6 +570,48 @@ qu'ils arrivent dans le `node_modules` du consommateur de notre fait.
569
570
  > OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
570
571
  > THE SOFTWARE.
571
572
 
573
+ #### `@lucide/svelte` 0.562.0 — ISC
574
+
575
+ > ISC License
576
+ >
577
+ > Copyright (c) for portions of Lucide are held by Cole Bemis 2013-2023 as part of Feather (MIT). All other copyright (c) for Lucide are held by Lucide Contributors 2025.
578
+ >
579
+ > Permission to use, copy, modify, and/or distribute this software for any
580
+ > purpose with or without fee is hereby granted, provided that the above
581
+ > copyright notice and this permission notice appear in all copies.
582
+ >
583
+ > THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
584
+ > WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
585
+ > MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
586
+ > ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
587
+ > WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
588
+ > ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
589
+ > OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
590
+ >
591
+ > ---
592
+ >
593
+ > The MIT License (MIT) (for portions derived from Feather)
594
+ >
595
+ > Copyright (c) 2013-2023 Cole Bemis
596
+ >
597
+ > Permission is hereby granted, free of charge, to any person obtaining a copy
598
+ > of this software and associated documentation files (the "Software"), to deal
599
+ > in the Software without restriction, including without limitation the rights
600
+ > to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
601
+ > copies of the Software, and to permit persons to whom the Software is
602
+ > furnished to do so, subject to the following conditions:
603
+ >
604
+ > The above copyright notice and this permission notice shall be included in all
605
+ > copies or substantial portions of the Software.
606
+ >
607
+ > THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
608
+ > IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
609
+ > FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
610
+ > AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
611
+ > LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
612
+ > OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
613
+ > SOFTWARE.
614
+
572
615
  #### `@modelcontextprotocol/sdk` 1.32.2 — MIT
573
616
 
574
617
  > MIT License
package/README.md CHANGED
@@ -2,14 +2,15 @@
2
2
 
3
3
  JSON-render standard, lots L2/L6: thin Svelte custom-element wrappers over the
4
4
  catalogue components of the sentropic design system. One ESM browser bundle
5
- registers three elements (lot L6 imposes the Focus renderer defaults
5
+ registers four elements (lot L6 imposes the Focus renderer defaults
6
6
  F-R0–F-R7 on the dossier engine chunk; see below):
7
7
 
8
8
  | Element | Catalogue component | Engine chunk (§6.6) |
9
9
  | --- | --- | --- |
10
10
  | `<st-bar-chart>` | `BarChart` | none — in the core chunk |
11
- | `<st-bpmn-canvas>` | `BpmnCanvas` | `chunks/bpmn-canvas-*.js` (lazy, first mount) |
11
+ | `<st-bpmn-canvas>` | `BpmnCanvas` | `chunks/bpmn-canvas-*.js` validates F1, then `chunks/bpmn-mount-*.js` loads the view |
12
12
  | `<st-decision-dossier>` | `DecisionDossier` | `chunks/focus-renderer-*.js` (lazy, first mount) |
13
+ | `<st-time-series-chart>` | `TimeSeriesChart` | none — in the core chunk |
13
14
 
14
15
  Each wrapper: shadow DOM `open`, envelope validation through the L1
15
16
  validator, the §4.5 error panel on refusal (never a blank element), props
@@ -17,6 +18,28 @@ mapping to the underlying component, and component callbacks translated to
17
18
  §4.6 `st-intent` events. Every component in the bundle is compiled with
18
19
  `css: "injected"` (§6.2 known risk: styles ship inside the chunk).
19
20
 
21
+ ## Focus artifact kit
22
+
23
+ The `./focus-kit/manifest.json` export lists the fixed payload by relative
24
+ path, MIME type, byte size and SHA-256. Copy the files exposed under
25
+ `./focus-kit/<path>` next to the canonical `dossier.json` and serve
26
+ `index.html`. The SHA-256 of the manifest's canonical bytes identifies the
27
+ renderer.
28
+
29
+ Applications with their own page can import `mountDossier(host)` from
30
+ `@sentropic/design-system-elements/dossier-mount` and load
31
+ `./focus-kit/renderer/dossier.css` as an external stylesheet. Set
32
+ `data-st-theme="sent-tech"` on the host or an ancestor. Call
33
+ `mount.render(document)` with a Focus decision or report. The host emits
34
+ `st-dossier-ready` with `detail.reviewRoot` after each completed render, and
35
+ `st-intent` when an option is chosen. `mount.destroy()` removes the root and
36
+ the listeners.
37
+
38
+ For a single offline HTML file, use `assembleStandaloneDossier({ document })`
39
+ from `@sentropic/design-system-elements/focus-kit` with the canonical JSON
40
+ text. It embeds the document, stylesheet and module with a CSP based on the
41
+ inline assets' hashes.
42
+
20
43
  ## Using the elements
21
44
 
22
45
  ```html
@@ -75,6 +98,37 @@ interface IntentDetail {
75
98
  | `onSelectKey(key)` — keyboard activation | `st-intent` `select`, `target = key`; `null` key (no selected bar) dispatches nothing |
76
99
  | `onHoverKeyChange(key)` | local state only — no intent (hover is not an §4.6 intent) |
77
100
 
101
+ ### `st-time-series-chart` (`TimeSeriesChart`)
102
+
103
+ Select `TimeSeriesChart` when an MCP result reports numeric measurements over
104
+ time. Use `BarChart` for categorical measurements. Pass the data envelope
105
+ to the design-system element, which draws each series with `LineChart`.
106
+ The packaged [rendering skill](skill/SKILL.md) guides MCP tool selection.
107
+
108
+ Send a chart label and at least one series with a unique `id`, a label and
109
+ its `data` array. Each point carries `x` as whole UTC Unix epoch
110
+ milliseconds and `y` as a finite number. Timestamps must increase strictly
111
+ within each series. A timestamp may recur in different series. Normalize
112
+ source dates with a known timezone to milliseconds before calling the
113
+ renderer. The chart uses one time domain across all series and displays UTC
114
+ ISO timestamps with millisecond precision. The common `referenceLines`,
115
+ `bands` and `goalLine` use value units, with whole UTC epoch milliseconds
116
+ for any reference line on the x axis.
117
+
118
+ The element exposes the observations in an accessible table with columns for
119
+ time, series label, series ID and value. Rows sort by ascending time, with
120
+ input series order breaking ties. The series ID identifies each series even
121
+ when labels collide.
122
+ For the transcript, validate the envelope against the pinned catalogue, then
123
+ call `formatTimeSeriesMarkdown(envelope.root)` with the validated props.
124
+ It formats the same rows, escapes Markdown delimiters and fails with a
125
+ `RangeError` if the complete table exceeds 4096 UTF-8 bytes.
126
+
127
+ The package ships three temporal fixtures under `@sentropic/design-system-elements/fixtures/`.
128
+ They cover [one series](fixtures/time-series-single.json),
129
+ [sparse aligned series](fixtures/time-series-multi.json) and
130
+ [thresholds and bands](fixtures/time-series-thresholds.json).
131
+
78
132
  ### `st-decision-dossier` (`DecisionDossier`)
79
133
 
80
134
  | Interaction | Element behaviour |
@@ -139,20 +193,34 @@ the wrappers define no font of their own (the content inherits the page's).
139
193
  ## Build, sizes, integrity
140
194
 
141
195
  `npm run build` runs the Node build and then the browser bundle, so
142
- `dist/browser/` and `dist/browser/sri.json` are produced together
143
- (`npm run build:browser` re-runs the bundle step alone). `sri.json` lists
144
- every file with raw / gzip / brotli sizes and a sha384 integrity hash
145
- (`sri.json` never lists itself). The §6.6 core budget — the entry closure
146
- that renders `<st-bar-chart>` — is 53,920 B gzip of the 153,600 B budget
147
- (53,919 B at L7a, +1 B rebuild variance; 23 files pinned by `sri.json`).
148
- The L6 `focus` chunk is 21,174 B gzip (19,073 B at L7a, +2,101 B for the
149
- stylesheet, fold/layout and selection logic); core + focus raw bytes stay
150
- far under the §8.3 2 MiB `ui://` resource budget.
196
+ `dist/browser/`, its `sri.json` and `dist/shells/` are produced together.
197
+ `npm run build:browser` re-runs those builds. The browser SRI manifest
198
+ lists every payload file with raw, gzip and brotli sizes and a SHA-384
199
+ integrity hash. The CDN entry closure still has a 153,600-byte gzip budget.
151
200
  The bundle is eval-free (§6.4: no `eval`, no `new Function` in any chunk —
152
201
  enforced by `scripts/elements-browser-artifacts.test.mjs`), works mounted
153
202
  under any subpath (no document-anchored preload hints), and needs no
154
203
  per-chunk CSS assets.
155
204
 
205
+ The packaged `dist/shells/manifest.json` (exported as `./shells/manifest.json`)
206
+ lists per-component capabilities, complete HTML sizes, and SHA-256
207
+ fingerprints for the shell files, module entries and input schemas. The
208
+ limits are strictly below 960 KiB raw and at most 150 KiB gzip (fflate
209
+ level 6, mtime 0). Consumers can pin the standalone temporal schema for
210
+ FA-H9 and read the qualified module and shell files relative to the
211
+ manifest for CK-H1a. Provide the envelope through the element property
212
+ or insert a child JSON island at
213
+ `<!-- st-envelope -->` in the HTML template. Escape every `<` in the island
214
+ JSON as `\u003c` when embedding it in HTML. Keep the inline module bytes
215
+ for the shell's CSP hash, and measure the final HTML again if the host adds
216
+ data or protocol code.
217
+
218
+ A `partial` BPMN entry records the measured complete candidate and requests
219
+ the text fallback with a URL supplied by the host when available. The
220
+ chunked browser entry still supports the full canvas. See the
221
+ [EZ-1 build evidence](https://github.com/rhanka/sent-tech-design-system/blob/main/packages/elements/docs/ez-1-evidence.md)
222
+ for measurements and fixtures.
223
+
156
224
  ## CDN (§7)
157
225
 
158
226
  The published tarball is served from the CDN base with the exact version
@@ -160,7 +228,7 @@ pinned — never a range, never `latest` (the version segment is bumped with
160
228
  each release):
161
229
 
162
230
  ```
163
- https://cdn.jsdelivr.net/npm/@sentropic/design-system-elements@0.2.0/dist/browser/
231
+ https://cdn.jsdelivr.net/npm/@sentropic/design-system-elements@0.3.2/dist/browser/
164
232
  ```
165
233
 
166
234
  Load the entry with its integrity hash (the sha384 from
@@ -168,7 +236,7 @@ Load the entry with its integrity hash (the sha384 from
168
236
 
169
237
  ```html
170
238
  <script type="module"
171
- src="https://cdn.jsdelivr.net/npm/@sentropic/design-system-elements@0.2.0/dist/browser/elements.js"
239
+ src="https://cdn.jsdelivr.net/npm/@sentropic/design-system-elements@0.3.2/dist/browser/elements.js"
172
240
  integrity="sha384-<hash from dist/browser/sri.json>"
173
241
  crossorigin="anonymous"></script>
174
242
  ```