@sentropic/design-system-elements 0.1.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.
- package/LICENSE.THIRD-PARTY.md +44 -1
- package/README.md +123 -12
- package/catalog.json +401 -7
- package/dist/browser/chunks/{Modeler-BfAmwsmK.js → Modeler-D87tL_OJ.js} +4 -4
- package/dist/browser/chunks/Viewer-D9zjRrp2.js +4 -0
- package/dist/browser/chunks/bpmn-canvas-BevbP_6a.js +1 -0
- package/dist/browser/chunks/bpmn-mount-BhO_zb0S.js +2202 -0
- package/dist/browser/chunks/dist-DRauAwm2.js +6 -0
- package/dist/browser/chunks/{entropic-CM5BHERN.js → entropic-MwNVEq6w.js} +639 -0
- package/dist/browser/chunks/focus-renderer-BWm7DlQD.js +55 -0
- package/dist/browser/chunks/{forge-B8hrW4lA.js → forge-CzwO8Hbe.js} +639 -0
- package/dist/browser/chunks/layout-T3X333Za.js +1 -0
- package/dist/browser/elements.js +671 -6
- package/dist/browser/sri.json +52 -45
- package/dist/contracts/bar-chart.js +2 -2
- package/dist/contracts/decision-dossier.d.ts +4 -8
- package/dist/contracts/decision-dossier.js +8 -12
- package/dist/contracts/index.d.ts +1 -0
- package/dist/contracts/index.js +2 -0
- package/dist/contracts/time-series-chart.d.ts +49 -0
- package/dist/contracts/time-series-chart.js +37 -0
- package/dist/dossier/dossier-mount.js +845 -0
- package/dist/dossier/renderer/dossier.css +2 -0
- package/dist/element/bpmn-mount.d.ts +11 -0
- package/dist/element/bpmn-mount.js +56 -0
- package/dist/element/bpmn-types.d.ts +27 -0
- package/dist/element/bpmn-types.js +12 -0
- package/dist/element/bpmn.d.ts +10 -0
- package/dist/element/bpmn.js +39 -0
- package/dist/element/dom/dossier-mount.d.ts +25 -0
- package/dist/element/dom/dossier-review-mount.d.ts +25 -0
- package/dist/element/dom/dossier-review-state.svelte.d.ts +13 -0
- package/dist/element/dom/engines/bpmn-canvas.d.ts +11 -0
- package/dist/element/dom/engines/bpmn-canvas.js +11 -0
- package/dist/element/dom/engines/dossier-diagrams.d.ts +5 -0
- package/dist/element/dom/engines/dossier-evidence.d.ts +9 -0
- package/dist/element/dom/engines/dossier-styles.d.ts +21 -0
- package/dist/element/dom/engines/focus-renderer.d.ts +60 -0
- package/dist/element/dom/engines/focus-snapshot.d.ts +3 -0
- package/dist/element/dom/intents.d.ts +20 -0
- package/dist/element/markdown/minimal-markdown.d.ts +1 -2
- package/dist/element/markdown/minimal-markdown.js +19 -1
- package/dist/element/validator.d.ts +26 -0
- package/dist/element/validator.js +54 -0
- package/dist/focus-diagrams/diagram-layout.d.ts +140 -0
- package/dist/focus-diagrams/diagram-layout.js +190 -0
- package/dist/focus-diagrams/diagram-source.d.ts +11 -0
- package/dist/focus-diagrams/diagram-source.js +147 -0
- package/dist/focus-diagrams/dossier-views.d.ts +21 -0
- package/dist/focus-diagrams/dossier-views.js +57 -0
- package/dist/focus-diagrams/ecosystem.json +853 -0
- package/dist/focus-kit/index.html +13 -0
- package/dist/focus-kit/renderer/dossier.css +2 -0
- package/dist/focus-kit/renderer/dossier.js +845 -0
- package/dist/focus-kit-manifest.json +1 -0
- package/dist/focus-kit.d.ts +9 -0
- package/dist/focus-kit.js +30 -0
- package/dist/format-time-series-markdown.d.ts +5 -0
- package/dist/format-time-series-markdown.js +24 -0
- package/dist/generator/parity.js +6 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.js +1 -0
- package/dist/ports/dossier-views.d.ts +3 -0
- package/dist/ports/dossier-views.js +3 -0
- package/dist/ports/focus.d.ts +0 -1
- package/dist/ports/types.d.ts +0 -1
- package/dist/shells/BarChart.html +8494 -0
- package/dist/shells/BarChart.js +8482 -0
- package/dist/shells/DecisionDossier.html +8502 -0
- package/dist/shells/DecisionDossier.js +8490 -0
- package/dist/shells/TimeSeriesChart.html +8475 -0
- package/dist/shells/TimeSeriesChart.js +8463 -0
- package/dist/shells/manifest.json +108 -0
- package/dist/structure/interpreter.d.ts +1 -1
- package/dist/structure/interpreter.js +14 -4
- package/dist/time-series.d.ts +13 -0
- package/dist/time-series.js +15 -0
- package/dist/validate/envelope.js +5 -1
- package/dist/validate/time-series.d.ts +5 -0
- package/dist/validate/time-series.js +28 -0
- package/fixtures/time-series-multi.json +46 -0
- package/fixtures/time-series-single.json +28 -0
- package/fixtures/time-series-thresholds.json +52 -0
- package/package.json +40 -6
- package/schemas/BarChart.v1.json +2 -2
- package/schemas/DecisionDossier.v1.json +155 -5
- package/schemas/TimeSeriesChart.v1.json +287 -0
- package/skill/SKILL.md +27 -0
- package/dist/browser/chunks/Viewer-eYLzc3fD.js +0 -4
- package/dist/browser/chunks/bpmn-canvas-DeAWdJFy.js +0 -2207
- package/dist/browser/chunks/dist-O6_2ByYB.js +0 -1
- package/dist/browser/chunks/focus-renderer-BgsZGo7n.js +0 -8
- package/dist/browser/chunks/layout-q0TR9-aY.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"capabilities":["decision-v1","decision-v2","deep-links","embedded-evidence","focus-views/1","report-v2"],"entrypoint":"index.html","files":[{"mimeType":"text/html","path":"index.html","sha256":"sha256:f4084f6731495493c425b82918b16fb3e00d906e280c47e157a6de4033b9a0a1","size":416},{"mimeType":"text/css","path":"renderer/dossier.css","sha256":"sha256:7f6dd74718542ac30143b1ee25096242005a2cb3a5418fd5b94cbb3f2c7aeda3","size":212480},{"mimeType":"text/javascript","path":"renderer/dossier.js","sha256":"sha256:c5bb3da114a1b16eb3c819f6f2a99cde9dcd01b55ec15b705b870285f1ffde56","size":681587}],"name":"@sentropic/design-system-elements","version":"0.3.2"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export interface StandaloneDossier {
|
|
2
|
+
/** Canonical UTF-8 JSON as supplied by the publisher. */
|
|
3
|
+
readonly document: string;
|
|
4
|
+
readonly manifest?: string;
|
|
5
|
+
readonly views?: string;
|
|
6
|
+
}
|
|
7
|
+
/** Inline the packaged renderer and canonical input bytes for a file:// reader. */
|
|
8
|
+
export declare function assembleStandaloneDossier({ document, manifest, views }: StandaloneDossier): string;
|
|
9
|
+
//# sourceMappingURL=focus-kit.d.ts.map
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { createHash } from "node:crypto";
|
|
2
|
+
import { readFileSync } from "node:fs";
|
|
3
|
+
function readKit(path) {
|
|
4
|
+
return readFileSync(new URL(`./focus-kit/${path}`, import.meta.url), "utf8").replace(/\r\n?/g, "\n");
|
|
5
|
+
}
|
|
6
|
+
function cspHash(text) {
|
|
7
|
+
return `'sha256-${createHash("sha256").update(text).digest("base64")}'`;
|
|
8
|
+
}
|
|
9
|
+
/** Inline the packaged renderer and canonical input bytes for a file:// reader. */
|
|
10
|
+
export function assembleStandaloneDossier({ document, manifest, views }) {
|
|
11
|
+
const module = readKit("renderer/dossier.js").replace(/<\/script/gi, "<\\/script");
|
|
12
|
+
const css = readKit("renderer/dossier.css");
|
|
13
|
+
const csp = [
|
|
14
|
+
"default-src 'none'",
|
|
15
|
+
`script-src ${cspHash(module)}`,
|
|
16
|
+
`style-src ${cspHash(css)}`,
|
|
17
|
+
"img-src data:",
|
|
18
|
+
"worker-src 'none'",
|
|
19
|
+
"base-uri 'none'",
|
|
20
|
+
"form-action 'none'",
|
|
21
|
+
].join("; ");
|
|
22
|
+
const islands = [["document", document], ["manifest", manifest], ["views", views]]
|
|
23
|
+
.flatMap(([name, value]) => value === undefined ? [] : [
|
|
24
|
+
`<script type="application/octet-stream" data-st-dossier-${name}>${Buffer.from(value).toString("base64")}</script>`,
|
|
25
|
+
]);
|
|
26
|
+
return readKit("index.html")
|
|
27
|
+
.replace('<link rel="stylesheet" href="./renderer/dossier.css">', () => `<meta http-equiv="Content-Security-Policy" content="${csp}">\n <style>${css}</style>`)
|
|
28
|
+
.replace('<script type="module" src="./renderer/dossier.js"></script>', () => [...islands, `<script type="module">${module}</script>`].join("\n "));
|
|
29
|
+
}
|
|
30
|
+
//# sourceMappingURL=focus-kit.js.map
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { TimeSeriesChartProps } from "./contracts/time-series-chart.js";
|
|
2
|
+
export declare const TIME_SERIES_FALLBACK_LIMIT_BYTES = 4096;
|
|
3
|
+
/** Markdown fallback for validated props. Fails if the complete table exceeds 4 KiB. */
|
|
4
|
+
export declare function formatTimeSeriesMarkdown(props: TimeSeriesChartProps): string;
|
|
5
|
+
//# sourceMappingURL=format-time-series-markdown.d.ts.map
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { formatTimeSeriesId, formatTimeSeriesInstant, timeSeriesRows } from "./time-series.js";
|
|
2
|
+
import { utf8ByteLength } from "./validate/envelope.js";
|
|
3
|
+
export const TIME_SERIES_FALLBACK_LIMIT_BYTES = 4096;
|
|
4
|
+
function markdownCell(value) {
|
|
5
|
+
return value
|
|
6
|
+
.replace(/[&<>|\\`*_\[\]~!]/g, (character) => `&#${character.charCodeAt(0)};`)
|
|
7
|
+
.replace(/\r\n|[\r\n]/g, " ");
|
|
8
|
+
}
|
|
9
|
+
/** Markdown fallback for validated props. Fails if the complete table exceeds 4 KiB. */
|
|
10
|
+
export function formatTimeSeriesMarkdown(props) {
|
|
11
|
+
const header = "| Time (UTC) | Series | Series ID | Value |\n| --- | --- | --- | --- |";
|
|
12
|
+
const lines = [header];
|
|
13
|
+
let bytes = utf8ByteLength(header);
|
|
14
|
+
for (const { x, seriesId, seriesLabel, y } of timeSeriesRows(props)) {
|
|
15
|
+
const line = `| ${formatTimeSeriesInstant(x)} | ${markdownCell(seriesLabel)} | ${markdownCell(formatTimeSeriesId(seriesId))} | ${y} |`;
|
|
16
|
+
bytes += 1 + utf8ByteLength(line);
|
|
17
|
+
if (bytes > TIME_SERIES_FALLBACK_LIMIT_BYTES) {
|
|
18
|
+
throw new RangeError(`TimeSeriesChart Markdown table exceeds ${TIME_SERIES_FALLBACK_LIMIT_BYTES} UTF-8 bytes`);
|
|
19
|
+
}
|
|
20
|
+
lines.push(line);
|
|
21
|
+
}
|
|
22
|
+
return lines.join("\n");
|
|
23
|
+
}
|
|
24
|
+
//# sourceMappingURL=format-time-series-markdown.js.map
|
package/dist/generator/parity.js
CHANGED
|
@@ -162,7 +162,12 @@ export function runParityGuard(contract, catalogProps, catalogRequired, repoRoot
|
|
|
162
162
|
};
|
|
163
163
|
continue;
|
|
164
164
|
}
|
|
165
|
-
|
|
165
|
+
// SFC props are exported by vue-tsc's declarations; keep the recorded
|
|
166
|
+
// source path pointing at the component consumers and reviewers compare.
|
|
167
|
+
const schemaFile = source.framework === "vue" && source.file.endsWith(".vue")
|
|
168
|
+
? source.file.replace("/src/", "/dist/") + ".d.ts"
|
|
169
|
+
: source.file;
|
|
170
|
+
const frameworkPath = `${repoRoot}/${schemaFile}`;
|
|
166
171
|
if (source.role === "no-counterpart") {
|
|
167
172
|
rows[source.framework] = {
|
|
168
173
|
status: "no-counterpart",
|
package/dist/index.d.ts
CHANGED
|
@@ -7,5 +7,7 @@
|
|
|
7
7
|
*/
|
|
8
8
|
export { contracts, CATALOG_ID, ENVELOPE_ID, standaloneId, A2UI_COMMON_TYPES_ID, A2UI_PROTOCOL_VERSION, } from "./contracts/index.js";
|
|
9
9
|
export type { ContractModule } from "./contracts/index.js";
|
|
10
|
+
export type { EpochMilliseconds, TimeSeries, TimeSeriesChartProps, TimeSeriesPoint } from "./contracts/index.js";
|
|
11
|
+
export { formatTimeSeriesMarkdown, TIME_SERIES_FALLBACK_LIMIT_BYTES } from "./format-time-series-markdown.js";
|
|
10
12
|
export * from "./validate/index.js";
|
|
11
13
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.js
CHANGED
|
@@ -6,5 +6,6 @@
|
|
|
6
6
|
* re-exported separately.
|
|
7
7
|
*/
|
|
8
8
|
export { contracts, CATALOG_ID, ENVELOPE_ID, standaloneId, A2UI_COMMON_TYPES_ID, A2UI_PROTOCOL_VERSION, } from "./contracts/index.js";
|
|
9
|
+
export { formatTimeSeriesMarkdown, TIME_SERIES_FALLBACK_LIMIT_BYTES } from "./format-time-series-markdown.js";
|
|
9
10
|
export * from "./validate/index.js";
|
|
10
11
|
//# sourceMappingURL=index.js.map
|
package/dist/ports/focus.d.ts
CHANGED
|
@@ -37,4 +37,3 @@ export type FocusValidate = (value: unknown) => FocusValidationResult;
|
|
|
37
37
|
export declare function focusPathToPointer(path: string): string;
|
|
38
38
|
/** Wraps a focus validator as the injected `focus` semantic port. */
|
|
39
39
|
export declare function createFocusPort(validate: FocusValidate): SemanticPort;
|
|
40
|
-
//# sourceMappingURL=focus.d.ts.map
|
package/dist/ports/types.d.ts
CHANGED