@littlepress/renderer-web 0.0.0-stage → 1.0.0
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 +202 -0
- package/NOTICE +20 -0
- package/README.md +229 -2
- package/dist/answer/answerComponents.d.ts +107 -0
- package/dist/answer/answerComponents.js +637 -0
- package/dist/answer/download.d.ts +63 -0
- package/dist/answer/download.js +109 -0
- package/dist/answer/downloadExport.d.ts +44 -0
- package/dist/answer/downloadExport.js +266 -0
- package/dist/answer/hostValues.d.ts +28 -0
- package/dist/answer/hostValues.js +379 -0
- package/dist/answer/mapComponent.d.ts +6 -0
- package/dist/answer/mapComponent.js +213 -0
- package/dist/answer/math.d.ts +57 -0
- package/dist/answer/math.js +168 -0
- package/dist/answer/surfaceStream.d.ts +51 -0
- package/dist/answer/surfaceStream.js +260 -0
- package/dist/answer/tableLayout.d.ts +42 -0
- package/dist/answer/tableLayout.js +89 -0
- package/dist/controls/ActionFeedback.d.ts +5 -0
- package/dist/controls/ActionFeedback.js +43 -0
- package/dist/controls/actionDispatch.d.ts +51 -0
- package/dist/controls/actionDispatch.js +211 -0
- package/dist/controls/actionOutcome.generated.d.ts +64 -0
- package/dist/controls/actionOutcome.generated.js +64 -0
- package/dist/controls/calculationPublisher.d.ts +14 -0
- package/dist/controls/calculationPublisher.js +6 -0
- package/dist/controls/calculations.d.ts +20 -0
- package/dist/controls/calculations.generated.d.ts +73 -0
- package/dist/controls/calculations.generated.js +85 -0
- package/dist/controls/calculations.js +208 -0
- package/dist/controls/controlState.d.ts +84 -0
- package/dist/controls/controlState.js +256 -0
- package/dist/controls/fieldMessages.d.ts +41 -0
- package/dist/controls/fieldMessages.js +81 -0
- package/dist/controls/fieldValidation.d.ts +19 -0
- package/dist/controls/fieldValidation.js +98 -0
- package/dist/controls/formComponents.d.ts +23 -0
- package/dist/controls/formComponents.js +738 -0
- package/dist/controls/formProgress.d.ts +63 -0
- package/dist/controls/formProgress.js +122 -0
- package/dist/controls/inputDrafts.d.ts +55 -0
- package/dist/controls/inputDrafts.js +183 -0
- package/dist/controls/inputValidation.d.ts +33 -0
- package/dist/controls/inputValidation.js +119 -0
- package/dist/controls/localWrites.d.ts +9 -0
- package/dist/controls/localWrites.js +29 -0
- package/dist/core/A2uiSurface.d.ts +13 -0
- package/dist/core/A2uiSurface.js +15 -0
- package/dist/core/AtlasIcon.d.ts +18 -0
- package/dist/core/AtlasIcon.js +22 -0
- package/dist/core/AtlasMedia.d.ts +22 -0
- package/dist/core/AtlasMedia.js +45 -0
- package/dist/core/Carousel.d.ts +61 -0
- package/dist/core/Carousel.js +183 -0
- package/dist/core/CoreMedia.d.ts +19 -0
- package/dist/core/CoreMedia.js +25 -0
- package/dist/core/FoundationA2uiSurface.d.ts +86 -0
- package/dist/core/FoundationA2uiSurface.js +440 -0
- package/dist/core/ImagePreview.d.ts +42 -0
- package/dist/core/ImagePreview.js +73 -0
- package/dist/core/LucideIcon.d.ts +19 -0
- package/dist/core/LucideIcon.js +42 -0
- package/dist/core/SurfaceLink.d.ts +35 -0
- package/dist/core/SurfaceLink.js +60 -0
- package/dist/core/appearance/aegis.d.ts +49 -0
- package/dist/core/appearance/aegis.js +34 -0
- package/dist/core/appearance/colour.d.ts +24 -0
- package/dist/core/appearance/colour.js +103 -0
- package/dist/core/appearance/css.d.ts +17 -0
- package/dist/core/appearance/css.js +153 -0
- package/dist/core/appearance/presets.generated.d.ts +4 -0
- package/dist/core/appearance/presets.generated.js +1184 -0
- package/dist/core/appearance/react.d.ts +29 -0
- package/dist/core/appearance/react.js +110 -0
- package/dist/core/appearance/resolve.d.ts +76 -0
- package/dist/core/appearance/resolve.js +127 -0
- package/dist/core/appearance/textScale.d.ts +11 -0
- package/dist/core/appearance/textScale.js +51 -0
- package/dist/core/appearance/theme.d.ts +138 -0
- package/dist/core/appearance/theme.js +274 -0
- package/dist/core/baseComponents.d.ts +53 -0
- package/dist/core/baseComponents.js +480 -0
- package/dist/core/binding.d.ts +46 -0
- package/dist/core/binding.js +118 -0
- package/dist/core/bundle.d.ts +23 -0
- package/dist/core/bundle.js +75 -0
- package/dist/core/catalog/catalog-index.generated.d.ts +44 -0
- package/dist/core/catalog/catalog-index.generated.js +79 -0
- package/dist/core/catalog/icons.generated.d.ts +6 -0
- package/dist/core/catalog/icons.generated.js +1788 -0
- package/dist/core/catalog.d.ts +6 -0
- package/dist/core/catalog.generated.d.ts +50 -0
- package/dist/core/catalog.generated.js +2174 -0
- package/dist/core/catalog.js +8 -0
- package/dist/core/chartRows.d.ts +7 -0
- package/dist/core/chartRows.js +38 -0
- package/dist/core/component-support.d.ts +39 -0
- package/dist/core/component-support.js +127 -0
- package/dist/core/components/actions.d.ts +4 -0
- package/dist/core/components/actions.js +21 -0
- package/dist/core/components/cards.d.ts +9 -0
- package/dist/core/components/cards.js +227 -0
- package/dist/core/components/charts.d.ts +18 -0
- package/dist/core/components/charts.js +412 -0
- package/dist/core/components/comparisonTable.d.ts +50 -0
- package/dist/core/components/comparisonTable.js +89 -0
- package/dist/core/components/content.d.ts +13 -0
- package/dist/core/components/content.js +108 -0
- package/dist/core/components/seriesCharts.d.ts +531 -0
- package/dist/core/components/seriesCharts.js +1053 -0
- package/dist/core/components/stepFlow.d.ts +7 -0
- package/dist/core/components/stepFlow.js +13 -0
- package/dist/core/components.full.d.ts +10 -0
- package/dist/core/components.full.js +41 -0
- package/dist/core/context.d.ts +207 -0
- package/dist/core/context.js +172 -0
- package/dist/core/coverage.d.ts +30 -0
- package/dist/core/coverage.js +93 -0
- package/dist/core/foundation.d.ts +21 -0
- package/dist/core/foundation.js +22 -0
- package/dist/core/fullTheme.d.ts +5 -0
- package/dist/core/fullTheme.js +9 -0
- package/dist/core/iconNodes.generated.d.ts +7 -0
- package/dist/core/iconNodes.generated.js +5 -0
- package/dist/core/lucideIcons.d.ts +5 -0
- package/dist/core/lucideIcons.js +7 -0
- package/dist/core/messages.d.ts +111 -0
- package/dist/core/messages.js +134 -0
- package/dist/core/pointer.d.ts +17 -0
- package/dist/core/pointer.js +104 -0
- package/dist/core/registry.d.ts +12 -0
- package/dist/core/registry.js +114 -0
- package/dist/core/runtime.d.ts +8 -0
- package/dist/core/runtime.js +6 -0
- package/dist/core/state.d.ts +73 -0
- package/dist/core/state.js +274 -0
- package/dist/core/surfaceMotion.d.ts +5 -0
- package/dist/core/surfaceMotion.js +46 -0
- package/dist/core/theme.d.ts +5 -0
- package/dist/core/theme.js +7 -0
- package/dist/core/useSurfaceImage.d.ts +20 -0
- package/dist/core/useSurfaceImage.js +65 -0
- package/dist/graph/RelationshipGraph.d.ts +14 -0
- package/dist/graph/RelationshipGraph.js +206 -0
- package/dist/graph/model.d.ts +20 -0
- package/dist/graph/model.js +36 -0
- package/dist/graph/program/assets.d.ts +3 -0
- package/dist/graph/program/assets.js +3 -0
- package/dist/graph/program/bridge.d.ts +6 -0
- package/dist/graph/program/bridge.generated.d.ts +136 -0
- package/dist/graph/program/bridge.generated.js +1 -0
- package/dist/graph/program/bridge.js +24 -0
- package/dist/graph/program/bridge.schema.json +717 -0
- package/dist/graph/program/bridgeValidator.cjs +2 -0
- package/dist/graph/program/bridgeValidator.d.cts +4 -0
- package/dist/graph/program/runner.d.ts +1 -0
- package/dist/graph/program/runner.html +2193 -0
- package/dist/graph/program/runner.js +157 -0
- package/dist/graph/program/runtime-manifest.json +1 -0
- package/dist/graph/program/view.d.ts +11 -0
- package/dist/graph/program/view.js +210 -0
- package/dist/graph/program/worker.d.ts +1 -0
- package/dist/graph/program/worker.js +2186 -0
- package/dist/index.d.ts +20 -0
- package/dist/index.js +45 -0
- package/dist/internal/dsh.d.ts +4 -0
- package/dist/internal/dsh.js +3 -0
- package/dist/internal/relationship-graph.d.ts +4 -0
- package/dist/internal/relationship-graph.js +7202 -0
- package/dist/page/layoutComponents.d.ts +6 -0
- package/dist/page/layoutComponents.js +123 -0
- package/dist/page/layoutGeometry.d.ts +68 -0
- package/dist/page/layoutGeometry.js +174 -0
- package/dist/page/pageFormat.d.ts +34 -0
- package/dist/page/pageFormat.js +119 -0
- package/dist/page/printFit.d.ts +81 -0
- package/dist/page/printFit.js +338 -0
- package/dist/react/index.d.ts +5 -0
- package/dist/react/index.js +2 -0
- package/dist/report/locate.d.ts +42 -0
- package/dist/report/locate.js +34 -0
- package/dist/styles/renderer.css +4580 -0
- package/licenses/LUCIDE-LICENSE.txt +43 -0
- package/licenses/QUICKJS-EMSCRIPTEN-LICENSE.txt +21 -0
- package/licenses/QUICKJS-VARIANT-LICENSE.txt +47 -0
- package/package.json +68 -3
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/** Data for the fixed, repository-owned graph program; never executable content. */
|
|
2
|
+
export type RelationshipGraphData = {
|
|
3
|
+
nodes: readonly {
|
|
4
|
+
id: string;
|
|
5
|
+
label: string;
|
|
6
|
+
}[];
|
|
7
|
+
edges: readonly {
|
|
8
|
+
from: string;
|
|
9
|
+
to: string;
|
|
10
|
+
}[];
|
|
11
|
+
};
|
|
12
|
+
export type GraphValidation = {
|
|
13
|
+
graph: RelationshipGraphData;
|
|
14
|
+
error?: never;
|
|
15
|
+
} | {
|
|
16
|
+
graph?: never;
|
|
17
|
+
error: string;
|
|
18
|
+
};
|
|
19
|
+
/** Check before creating a frame, and copy only fields used by the graph. */
|
|
20
|
+
export declare function validateGraph(value: unknown): GraphValidation;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/** Check before creating a frame, and copy only fields used by the graph. */
|
|
2
|
+
export function validateGraph(value) {
|
|
3
|
+
if (!value || typeof value !== "object" || Array.isArray(value))
|
|
4
|
+
return { error: "graph" };
|
|
5
|
+
const input = value;
|
|
6
|
+
if (!Array.isArray(input.nodes) || input.nodes.length < 1 || input.nodes.length > 24)
|
|
7
|
+
return { error: "nodes" };
|
|
8
|
+
if (!Array.isArray(input.edges) || input.edges.length > 64)
|
|
9
|
+
return { error: "edges" };
|
|
10
|
+
const ids = new Set();
|
|
11
|
+
const nodes = [];
|
|
12
|
+
for (const item of input.nodes) {
|
|
13
|
+
if (!item || typeof item !== "object" || Array.isArray(item))
|
|
14
|
+
return { error: "nodes" };
|
|
15
|
+
if (typeof item.id !== "string" || !/^[a-zA-Z0-9_-]{1,64}$/.test(item.id) || ids.has(item.id))
|
|
16
|
+
return { error: "node.id" };
|
|
17
|
+
if (typeof item.label !== "string" || !item.label.trim() || item.label.length > 160)
|
|
18
|
+
return { error: "node.label" };
|
|
19
|
+
ids.add(item.id);
|
|
20
|
+
nodes.push({ id: item.id, label: item.label });
|
|
21
|
+
}
|
|
22
|
+
const pairs = new Set();
|
|
23
|
+
const edges = [];
|
|
24
|
+
for (const item of input.edges) {
|
|
25
|
+
if (!item || typeof item !== "object" || Array.isArray(item))
|
|
26
|
+
return { error: "edges" };
|
|
27
|
+
if (typeof item.from !== "string" || typeof item.to !== "string" || !ids.has(item.from) || !ids.has(item.to) || item.from === item.to)
|
|
28
|
+
return { error: "edge.reference" };
|
|
29
|
+
const pair = JSON.stringify([item.from, item.to]);
|
|
30
|
+
if (pairs.has(pair))
|
|
31
|
+
return { error: "edge.duplicate" };
|
|
32
|
+
pairs.add(pair);
|
|
33
|
+
edges.push({ from: item.from, to: item.to });
|
|
34
|
+
}
|
|
35
|
+
return { graph: { nodes, edges } };
|
|
36
|
+
}
|