@pioneer_zmc/dsh-workbench 0.2.1
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 +21 -0
- package/README.md +98 -0
- package/README.zh.md +100 -0
- package/client.js +122 -0
- package/cordis.patch.yml +8 -0
- package/dist/check-building.js +1669 -0
- package/dist/check-room.js +980 -0
- package/dist/index.js +2873 -0
- package/package.json +60 -0
- package/skills/specdev-building/SKILL.md +85 -0
- package/skills/specdev-building/assets/layouts/court.json +53 -0
- package/skills/specdev-building/assets/layouts/row.json +48 -0
- package/skills/specdev-building/assets/layouts/single.json +27 -0
- package/skills/specdev-building/assets/layouts/tower-9.json +71 -0
- package/skills/specdev-building/assets/layouts/tower.json +59 -0
- package/skills/specdev-building/references/blueprint-contract.md +126 -0
- package/skills/specdev-building/references/diagnostics.md +101 -0
- package/skills/specdev-building/references/layouts.md +112 -0
- package/skills/specdev-business/SKILL.md +91 -0
- package/skills/specdev-business/assets/plan-template.md +66 -0
- package/skills/specdev-business/assets/spec-template.md +111 -0
- package/skills/specdev-business/assets/tasks-template.md +36 -0
- package/skills/specdev-business/references/change.md +117 -0
- package/skills/specdev-business/references/evidence-review.md +125 -0
- package/skills/specdev-business/references/implementation.md +67 -0
- package/skills/specdev-business/references/project-contract.md +211 -0
- package/skills/specdev-business/references/source-map.md +110 -0
- package/skills/specdev-business/references/specification.md +93 -0
- package/skills/specdev-business/references/workflow.md +126 -0
- package/skills/specdev-room/SKILL.md +77 -0
- package/skills/specdev-room/assets/intro-room.json +14 -0
- package/skills/specdev-room/references/diagnostics.md +21 -0
- package/skills/specdev-room/references/room-contract.md +59 -0
- package/vendor/archify-renderer/VERSION.md +52 -0
- package/vendor/archify-renderer/archify/LICENSE +22 -0
- package/vendor/archify-renderer/archify/THIRD_PARTY_NOTICES.md +56 -0
- package/vendor/archify-renderer/archify/assets/template.html +14787 -0
- package/vendor/archify-renderer/archify/bin/archify.mjs +1990 -0
- package/vendor/archify-renderer/archify/renderers/shared/brand-marks.mjs +563 -0
- package/vendor/archify-renderer/archify/renderers/shared/cli.mjs +218 -0
- package/vendor/archify-renderer/archify/renderers/shared/desktop-readability.mjs +26 -0
- package/vendor/archify-renderer/archify/renderers/shared/diagnostics.mjs +127 -0
- package/vendor/archify-renderer/archify/renderers/shared/engineering-profiles.mjs +157 -0
- package/vendor/archify-renderer/archify/renderers/shared/generated-brand-marks.mjs +2003 -0
- package/vendor/archify-renderer/archify/renderers/shared/generated-validators.mjs +13 -0
- package/vendor/archify-renderer/archify/renderers/shared/geometry.mjs +1423 -0
- package/vendor/archify-renderer/archify/renderers/shared/i18n.mjs +594 -0
- package/vendor/archify-renderer/archify/renderers/shared/legend.mjs +217 -0
- package/vendor/archify-renderer/archify/renderers/shared/output-path.mjs +321 -0
- package/vendor/archify-renderer/archify/renderers/shared/repository-evidence.mjs +235 -0
- package/vendor/archify-renderer/archify/renderers/shared/text-fit.mjs +49 -0
- package/vendor/archify-renderer/archify/renderers/shared/utils.mjs +232 -0
- package/vendor/archify-renderer/archify/renderers/shared/validator.mjs +86 -0
- package/vendor/archify-renderer/archify/renderers/workflow/render-workflow.mjs +35 -0
- package/vendor/archify-renderer/archify/renderers/workflow/workflow-compiler.mjs +4400 -0
- package/vendor/archify-renderer/archify/renderers/workflow/workflow-migration-geometry.mjs +144 -0
- package/vendor/archify-renderer/archify/schemas/common.schema.json +115 -0
- package/vendor/archify-renderer/archify/schemas/workflow.schema.json +428 -0
- package/vendor/archify-renderer/archify/scripts/check-render-output.mjs +835 -0
- package/vendor/archify-renderer/shims/process.mjs +18 -0
- package/vendor/archify-renderer/stubs/child_process.mjs +2 -0
- package/vendor/archify-renderer/stubs/crypto.mjs +3 -0
- package/vendor/archify-renderer/stubs/dns-promises.mjs +2 -0
- package/vendor/archify-renderer/stubs/fs.mjs +3 -0
- package/vendor/archify-renderer/stubs/http.mjs +3 -0
- package/vendor/archify-renderer/stubs/https.mjs +3 -0
- package/vendor/archify-renderer/stubs/net.mjs +3 -0
- package/vendor/archify-renderer/stubs/path.mjs +3 -0
- package/vendor/archify-renderer/stubs/url.mjs +3 -0
- package/web/assets/building-kit.js +1157 -0
- package/web/assets/building-look.js +185 -0
- package/web/assets/building-plan.js +495 -0
- package/web/assets/building-scene.js +529 -0
- package/web/assets/building-walk.js +248 -0
- package/web/assets/building.js +859 -0
- package/web/assets/business.js +124 -0
- package/web/assets/chart-link.js +165 -0
- package/web/assets/common.js +302 -0
- package/web/assets/details.js +197 -0
- package/web/assets/evidence.js +30 -0
- package/web/assets/furniture/SOURCES.md +24 -0
- package/web/assets/furniture/assets/ceramic-display-stand-01/asset.json +25 -0
- package/web/assets/furniture/assets/ceramic-display-stand-01/model.js +116 -0
- package/web/assets/furniture/assets/ceramic-display-stand-01/preview.webp +0 -0
- package/web/assets/furniture/assets/ceramic-floor-lamp-01/asset.json +61 -0
- package/web/assets/furniture/assets/ceramic-floor-lamp-01/model.js +56 -0
- package/web/assets/furniture/assets/ceramic-floor-lamp-01/preview.webp +0 -0
- package/web/assets/furniture/assets/ceramic-low-cabinet-01/asset.json +81 -0
- package/web/assets/furniture/assets/ceramic-low-cabinet-01/model.js +67 -0
- package/web/assets/furniture/assets/ceramic-low-cabinet-01/preview.webp +0 -0
- package/web/assets/furniture/assets/ceramic-vase-01/asset.json +21 -0
- package/web/assets/furniture/assets/ceramic-vase-01/model.js +119 -0
- package/web/assets/furniture/assets/ceramic-vase-01/preview.webp +0 -0
- package/web/assets/furniture/assets/fairy-bed-01/asset.json +61 -0
- package/web/assets/furniture/assets/fairy-bed-01/model.js +63 -0
- package/web/assets/furniture/assets/fairy-bed-01/preview.webp +0 -0
- package/web/assets/furniture/assets/fairy-book-stack-01/asset.json +21 -0
- package/web/assets/furniture/assets/fairy-book-stack-01/model.js +71 -0
- package/web/assets/furniture/assets/fairy-book-stack-01/preview.webp +0 -0
- package/web/assets/furniture/assets/fairy-bookshelf-01/asset.json +32 -0
- package/web/assets/furniture/assets/fairy-bookshelf-01/model.js +168 -0
- package/web/assets/furniture/assets/fairy-bookshelf-01/preview.webp +0 -0
- package/web/assets/furniture/assets/fairy-desk-01/asset.json +25 -0
- package/web/assets/furniture/assets/fairy-desk-01/model.js +132 -0
- package/web/assets/furniture/assets/fairy-desk-01/preview.webp +0 -0
- package/web/assets/furniture/assets/fairy-notice-board-01/asset.json +23 -0
- package/web/assets/furniture/assets/fairy-notice-board-01/model.js +125 -0
- package/web/assets/furniture/assets/fairy-notice-board-01/preview.webp +0 -0
- package/web/assets/furniture/assets/fairy-potted-plant-01/asset.json +21 -0
- package/web/assets/furniture/assets/fairy-potted-plant-01/model.js +128 -0
- package/web/assets/furniture/assets/fairy-potted-plant-01/preview.webp +0 -0
- package/web/assets/furniture/assets/fairy-reading-chair-01/asset.json +61 -0
- package/web/assets/furniture/assets/fairy-reading-chair-01/model.js +66 -0
- package/web/assets/furniture/assets/fairy-reading-chair-01/preview.webp +0 -0
- package/web/assets/furniture/assets/fairy-table-lamp-01/asset.json +21 -0
- package/web/assets/furniture/assets/fairy-table-lamp-01/model.js +182 -0
- package/web/assets/furniture/assets/fairy-table-lamp-01/preview.webp +0 -0
- package/web/assets/furniture/catalog.js +137 -0
- package/web/assets/furniture/index.json +110 -0
- package/web/assets/furniture/registry.js +72 -0
- package/web/assets/furniture-page.css +68 -0
- package/web/assets/furniture-page.js +302 -0
- package/web/assets/home.js +65 -0
- package/web/assets/node-detail.js +148 -0
- package/web/assets/panel-link.js +47 -0
- package/web/assets/read.js +746 -0
- package/web/assets/room-scene.js +386 -0
- package/web/assets/room.css +287 -0
- package/web/assets/room.js +437 -0
- package/web/assets/rooms/bindings.js +449 -0
- package/web/assets/rooms/ceramic-reflection.js +193 -0
- package/web/assets/rooms/ceramic-room.js +302 -0
- package/web/assets/rooms/door.js +35 -0
- package/web/assets/rooms/fairy-room.js +492 -0
- package/web/assets/rooms/furniture-assembly.js +113 -0
- package/web/assets/rooms/navigation.js +262 -0
- package/web/assets/rooms/placeholder-catalog.json +71 -0
- package/web/assets/rooms/placeholder-furniture.js +76 -0
- package/web/assets/rooms/placement.js +588 -0
- package/web/assets/rooms/reader.js +441 -0
- package/web/assets/rooms/reading-gate.js +157 -0
- package/web/assets/rooms/room-lighting.js +50 -0
- package/web/assets/rooms/templates.json +50 -0
- package/web/assets/rooms/walk-frame.js +64 -0
- package/web/assets/rooms/walk-session.js +138 -0
- package/web/assets/save-result.js +89 -0
- package/web/assets/screenshots/business.png +0 -0
- package/web/assets/screenshots/node-detail.png +0 -0
- package/web/assets/screenshots/project-home.png +0 -0
- package/web/assets/screenshots/workflow.png +0 -0
- package/web/assets/showcase.js +232 -0
- package/web/assets/style.css +836 -0
- package/web/assets/template.js +7 -0
- package/web/assets/theme.js +29 -0
- package/web/assets/three/OrbitControls.js +1972 -0
- package/web/assets/three/VERSION.md +12 -0
- package/web/assets/three/three.core.js +60586 -0
- package/web/assets/three/three.module.js +19719 -0
- package/web/assets/workspaces.css +21 -0
- package/web/assets/workspaces.js +81 -0
- package/web/building.html +131 -0
- package/web/business.html +43 -0
- package/web/furniture.html +47 -0
- package/web/index.html +57 -0
- package/web/read.html +107 -0
- package/web/room.html +146 -0
- package/web/showcase.html +50 -0
- package/web/workspaces.html +32 -0
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
const TARGET_SCHEMA_VERSION = 2;
|
|
2
|
+
|
|
3
|
+
function clone(value) {
|
|
4
|
+
return JSON.parse(JSON.stringify(value));
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Return the authored workflow as a schema-v2 document without its capacity
|
|
9
|
+
* override. The compiler can use this projection to discover the intrinsic v2
|
|
10
|
+
* rank plan before deciding whether an explicit viewBox needs to grow.
|
|
11
|
+
*/
|
|
12
|
+
export function intrinsicWorkflow(workflow) {
|
|
13
|
+
const intrinsic = clone(workflow);
|
|
14
|
+
intrinsic.schema_version = TARGET_SCHEMA_VERSION;
|
|
15
|
+
intrinsic.meta = { ...intrinsic.meta };
|
|
16
|
+
delete intrinsic.meta.viewBox;
|
|
17
|
+
return intrinsic;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* Return a schema-v2 planning projection that removes authored route geometry
|
|
22
|
+
* which may only become valid after its legacy X coordinates are remapped.
|
|
23
|
+
* Rank-affecting automatic and straight relationships remain in the projection.
|
|
24
|
+
*/
|
|
25
|
+
export function planningWorkflow(workflow) {
|
|
26
|
+
const planned = intrinsicWorkflow(workflow);
|
|
27
|
+
planned.edges = planned.edges.flatMap((edge) => {
|
|
28
|
+
const hasRoutedGeometry = Array.isArray(edge.via)
|
|
29
|
+
|| (edge.route && !['auto', 'straight'].includes(edge.route))
|
|
30
|
+
|| edge.channelX !== undefined
|
|
31
|
+
|| edge.channelY !== undefined;
|
|
32
|
+
if (hasRoutedGeometry) return [];
|
|
33
|
+
|
|
34
|
+
const automatic = {};
|
|
35
|
+
for (const property of ['id', 'from', 'to', 'variant', 'role', 'width']) {
|
|
36
|
+
if (edge[property] !== undefined) automatic[property] = edge[property];
|
|
37
|
+
}
|
|
38
|
+
if (edge.route === 'straight') automatic.route = 'straight';
|
|
39
|
+
if (edge.labelAt === undefined && edge.label !== undefined) automatic.label = edge.label;
|
|
40
|
+
return [automatic];
|
|
41
|
+
});
|
|
42
|
+
|
|
43
|
+
if (Array.isArray(planned.mainPath)) {
|
|
44
|
+
const projectedPairs = new Set(planned.edges.map((edge) => `${edge.from}\u0000${edge.to}`));
|
|
45
|
+
const projectionBreaksMainPath = planned.mainPath.some((from, index) => (
|
|
46
|
+
index < planned.mainPath.length - 1
|
|
47
|
+
&& !projectedPairs.has(`${from}\u0000${planned.mainPath[index + 1]}`)
|
|
48
|
+
));
|
|
49
|
+
if (projectionBreaksMainPath) delete planned.mainPath;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
return planned;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
function mappedNumber(value) {
|
|
56
|
+
return Number(value.toFixed(6));
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* Build a deterministic piecewise-linear mapping between corresponding legacy
|
|
61
|
+
* and readable rank centers. Coordinates outside the rank span are extrapolated
|
|
62
|
+
* using the nearest segment so explicitly authored outside corridors retain
|
|
63
|
+
* their relative offset.
|
|
64
|
+
*/
|
|
65
|
+
export function createHorizontalRankMapper(oldColumns, newColumns) {
|
|
66
|
+
if (
|
|
67
|
+
!Array.isArray(oldColumns)
|
|
68
|
+
|| !Array.isArray(newColumns)
|
|
69
|
+
|| oldColumns.length !== newColumns.length
|
|
70
|
+
|| oldColumns.length < 2
|
|
71
|
+
|| !oldColumns.every(Number.isFinite)
|
|
72
|
+
|| !newColumns.every(Number.isFinite)
|
|
73
|
+
) {
|
|
74
|
+
throw new TypeError('Horizontal rank mapping requires matching finite column arrays.');
|
|
75
|
+
}
|
|
76
|
+
for (let index = 1; index < oldColumns.length; index += 1) {
|
|
77
|
+
if (oldColumns[index] <= oldColumns[index - 1] || newColumns[index] <= newColumns[index - 1]) {
|
|
78
|
+
throw new TypeError('Horizontal rank mapping requires strictly increasing columns.');
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
return (x) => {
|
|
83
|
+
if (!Number.isFinite(x)) throw new TypeError('Horizontal rank mapping requires a finite x coordinate.');
|
|
84
|
+
let segment = oldColumns.length - 2;
|
|
85
|
+
if (x <= oldColumns[0]) {
|
|
86
|
+
segment = 0;
|
|
87
|
+
} else {
|
|
88
|
+
for (let index = 0; index < oldColumns.length - 1; index += 1) {
|
|
89
|
+
if (x <= oldColumns[index + 1]) {
|
|
90
|
+
segment = index;
|
|
91
|
+
break;
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
const oldSpan = oldColumns[segment + 1] - oldColumns[segment];
|
|
96
|
+
const newSpan = newColumns[segment + 1] - newColumns[segment];
|
|
97
|
+
const ratio = (x - oldColumns[segment]) / oldSpan;
|
|
98
|
+
return mappedNumber(newColumns[segment] + ratio * newSpan);
|
|
99
|
+
};
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
/**
|
|
103
|
+
* Apply one horizontal coordinate mapping to every schema-v1 absolute X pin.
|
|
104
|
+
* The caller owns the supplied workflow; this function reports an audit trail
|
|
105
|
+
* for each changed coordinate in stable document order.
|
|
106
|
+
*/
|
|
107
|
+
export function mapExplicitCoordinates(workflow, mapX) {
|
|
108
|
+
const changedCoordinates = [];
|
|
109
|
+
const record = (path, owner, property) => {
|
|
110
|
+
const from = owner[property];
|
|
111
|
+
const to = mapX(from);
|
|
112
|
+
owner[property] = to;
|
|
113
|
+
if (to !== from) changedCoordinates.push({ path, from, to });
|
|
114
|
+
};
|
|
115
|
+
|
|
116
|
+
for (const [edgeIndex, edge] of workflow.edges.entries()) {
|
|
117
|
+
if (Array.isArray(edge.via)) {
|
|
118
|
+
for (const [pointIndex, point] of edge.via.entries()) {
|
|
119
|
+
if (Array.isArray(point) && Number.isFinite(point[0])) {
|
|
120
|
+
record(`/edges/${edgeIndex}/via/${pointIndex}/0`, point, 0);
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
if (Array.isArray(edge.labelAt) && Number.isFinite(edge.labelAt[0])) {
|
|
125
|
+
record(`/edges/${edgeIndex}/labelAt/0`, edge.labelAt, 0);
|
|
126
|
+
}
|
|
127
|
+
if (Number.isFinite(edge.channelX)) {
|
|
128
|
+
record(`/edges/${edgeIndex}/channelX`, edge, 'channelX');
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
return changedCoordinates;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
/**
|
|
135
|
+
* Construct an independently owned schema-v2 candidate with all authored
|
|
136
|
+
* absolute X pins mapped to the readable rank plan.
|
|
137
|
+
*/
|
|
138
|
+
export function createMappedWorkflowCandidate(workflow, oldColumns, newColumns) {
|
|
139
|
+
const document = clone(workflow);
|
|
140
|
+
document.schema_version = TARGET_SCHEMA_VERSION;
|
|
141
|
+
const mapX = createHorizontalRankMapper(oldColumns, newColumns);
|
|
142
|
+
const changedCoordinates = mapExplicitCoordinates(document, mapX);
|
|
143
|
+
return { document, changedCoordinates };
|
|
144
|
+
}
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://github.com/tt-a1i/archify/schemas/common.schema.json",
|
|
4
|
+
"title": "Archify Shared Definitions",
|
|
5
|
+
"$defs": {
|
|
6
|
+
"id": {
|
|
7
|
+
"type": "string",
|
|
8
|
+
"pattern": "^[a-zA-Z][a-zA-Z0-9_-]*$"
|
|
9
|
+
},
|
|
10
|
+
"locale": {
|
|
11
|
+
"enum": ["en", "zh-CN"]
|
|
12
|
+
},
|
|
13
|
+
"animation": {
|
|
14
|
+
"enum": ["trace", "none"]
|
|
15
|
+
},
|
|
16
|
+
"visualPreset": {
|
|
17
|
+
"enum": ["classic", "signal-flow", "blueprint", "editorial"]
|
|
18
|
+
},
|
|
19
|
+
"qualityProfile": {
|
|
20
|
+
"enum": ["standard", "showcase"]
|
|
21
|
+
},
|
|
22
|
+
"side": {
|
|
23
|
+
"enum": ["left", "right", "top", "bottom"]
|
|
24
|
+
},
|
|
25
|
+
"relationshipWidth": {
|
|
26
|
+
"type": "number",
|
|
27
|
+
"minimum": 0.5
|
|
28
|
+
},
|
|
29
|
+
"point": {
|
|
30
|
+
"type": "array",
|
|
31
|
+
"prefixItems": [
|
|
32
|
+
{ "type": "number" },
|
|
33
|
+
{ "type": "number" }
|
|
34
|
+
],
|
|
35
|
+
"items": false,
|
|
36
|
+
"minItems": 2,
|
|
37
|
+
"maxItems": 2
|
|
38
|
+
},
|
|
39
|
+
"componentType": {
|
|
40
|
+
"enum": ["frontend", "backend", "database", "cloud", "security", "messagebus", "external"]
|
|
41
|
+
},
|
|
42
|
+
"brandMark": {
|
|
43
|
+
"oneOf": [
|
|
44
|
+
{
|
|
45
|
+
"type": "string",
|
|
46
|
+
"minLength": 1,
|
|
47
|
+
"maxLength": 2048,
|
|
48
|
+
"anyOf": [
|
|
49
|
+
{ "maxLength": 80, "pattern": "^[^\\r\\n]+$" },
|
|
50
|
+
{ "pattern": "^https?://" }
|
|
51
|
+
]
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
"type": "object",
|
|
55
|
+
"additionalProperties": false,
|
|
56
|
+
"required": ["url", "sha256"],
|
|
57
|
+
"properties": {
|
|
58
|
+
"url": { "type": "string", "minLength": 8, "maxLength": 2048, "pattern": "^https?://" },
|
|
59
|
+
"sha256": { "type": "string", "pattern": "^[a-f0-9]{64}$" }
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
]
|
|
63
|
+
},
|
|
64
|
+
"variant": {
|
|
65
|
+
"enum": ["default", "emphasis", "security", "dashed"]
|
|
66
|
+
},
|
|
67
|
+
"legendMode": {
|
|
68
|
+
"enum": ["auto", "all", "hidden"]
|
|
69
|
+
},
|
|
70
|
+
"legendEntry": {
|
|
71
|
+
"type": "object",
|
|
72
|
+
"additionalProperties": false,
|
|
73
|
+
"minProperties": 1,
|
|
74
|
+
"properties": {
|
|
75
|
+
"label": { "type": "string", "minLength": 1, "maxLength": 80 },
|
|
76
|
+
"visible": { "type": "boolean" }
|
|
77
|
+
}
|
|
78
|
+
},
|
|
79
|
+
"guidedViews": {
|
|
80
|
+
"type": "array",
|
|
81
|
+
"maxItems": 5,
|
|
82
|
+
"items": {
|
|
83
|
+
"type": "object",
|
|
84
|
+
"additionalProperties": false,
|
|
85
|
+
"required": ["id", "label", "focus"],
|
|
86
|
+
"properties": {
|
|
87
|
+
"id": { "$ref": "#/$defs/id" },
|
|
88
|
+
"label": { "type": "string", "minLength": 1, "maxLength": 48 },
|
|
89
|
+
"focus": {
|
|
90
|
+
"type": "array",
|
|
91
|
+
"minItems": 1,
|
|
92
|
+
"items": { "$ref": "#/$defs/id" }
|
|
93
|
+
},
|
|
94
|
+
"note": { "type": "string", "maxLength": 140 }
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
},
|
|
98
|
+
"cards": {
|
|
99
|
+
"type": "array",
|
|
100
|
+
"items": {
|
|
101
|
+
"type": "object",
|
|
102
|
+
"additionalProperties": false,
|
|
103
|
+
"required": ["dot", "title", "items"],
|
|
104
|
+
"properties": {
|
|
105
|
+
"dot": { "enum": ["cyan", "emerald", "violet", "amber", "rose", "orange", "slate"] },
|
|
106
|
+
"title": { "type": "string", "minLength": 1 },
|
|
107
|
+
"items": {
|
|
108
|
+
"type": "array",
|
|
109
|
+
"items": { "type": "string" }
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
}
|
|
@@ -0,0 +1,428 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://github.com/tt-a1i/archify/schemas/workflow.schema.json",
|
|
4
|
+
"title": "Archify Workflow Diagram",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"additionalProperties": false,
|
|
7
|
+
"required": [
|
|
8
|
+
"schema_version",
|
|
9
|
+
"diagram_type",
|
|
10
|
+
"meta",
|
|
11
|
+
"lanes",
|
|
12
|
+
"nodes",
|
|
13
|
+
"edges"
|
|
14
|
+
],
|
|
15
|
+
"properties": {
|
|
16
|
+
"schema_version": {
|
|
17
|
+
"enum": [
|
|
18
|
+
1,
|
|
19
|
+
2
|
|
20
|
+
]
|
|
21
|
+
},
|
|
22
|
+
"diagram_type": {
|
|
23
|
+
"const": "workflow"
|
|
24
|
+
},
|
|
25
|
+
"meta": {
|
|
26
|
+
"type": "object",
|
|
27
|
+
"additionalProperties": false,
|
|
28
|
+
"required": [
|
|
29
|
+
"title"
|
|
30
|
+
],
|
|
31
|
+
"properties": {
|
|
32
|
+
"title": {
|
|
33
|
+
"type": "string",
|
|
34
|
+
"minLength": 1
|
|
35
|
+
},
|
|
36
|
+
"locale": {
|
|
37
|
+
"$ref": "common.schema.json#/$defs/locale"
|
|
38
|
+
},
|
|
39
|
+
"subtitle": {
|
|
40
|
+
"type": "string"
|
|
41
|
+
},
|
|
42
|
+
"output": {
|
|
43
|
+
"type": "string"
|
|
44
|
+
},
|
|
45
|
+
"animation": {
|
|
46
|
+
"enum": [
|
|
47
|
+
"trace",
|
|
48
|
+
"none"
|
|
49
|
+
]
|
|
50
|
+
},
|
|
51
|
+
"visual_preset": {
|
|
52
|
+
"enum": [
|
|
53
|
+
"classic",
|
|
54
|
+
"signal-flow",
|
|
55
|
+
"blueprint",
|
|
56
|
+
"editorial"
|
|
57
|
+
]
|
|
58
|
+
},
|
|
59
|
+
"quality_profile": {
|
|
60
|
+
"enum": [
|
|
61
|
+
"standard",
|
|
62
|
+
"showcase"
|
|
63
|
+
]
|
|
64
|
+
},
|
|
65
|
+
"views": {
|
|
66
|
+
"$ref": "common.schema.json#/$defs/guidedViews"
|
|
67
|
+
},
|
|
68
|
+
"legend": {
|
|
69
|
+
"type": "object",
|
|
70
|
+
"additionalProperties": false,
|
|
71
|
+
"properties": {
|
|
72
|
+
"mode": { "$ref": "common.schema.json#/$defs/legendMode" },
|
|
73
|
+
"entries": {
|
|
74
|
+
"type": "object",
|
|
75
|
+
"additionalProperties": false,
|
|
76
|
+
"properties": {
|
|
77
|
+
"frontend": { "$ref": "common.schema.json#/$defs/legendEntry" },
|
|
78
|
+
"backend": { "$ref": "common.schema.json#/$defs/legendEntry" },
|
|
79
|
+
"database": { "$ref": "common.schema.json#/$defs/legendEntry" },
|
|
80
|
+
"cloud": { "$ref": "common.schema.json#/$defs/legendEntry" },
|
|
81
|
+
"security": { "$ref": "common.schema.json#/$defs/legendEntry" },
|
|
82
|
+
"messagebus": { "$ref": "common.schema.json#/$defs/legendEntry" },
|
|
83
|
+
"external": { "$ref": "common.schema.json#/$defs/legendEntry" }
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
},
|
|
88
|
+
"viewBox": {
|
|
89
|
+
"type": "array",
|
|
90
|
+
"prefixItems": [
|
|
91
|
+
{
|
|
92
|
+
"type": "number",
|
|
93
|
+
"minimum": 700
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
"type": "number",
|
|
97
|
+
"minimum": 240
|
|
98
|
+
}
|
|
99
|
+
],
|
|
100
|
+
"items": false,
|
|
101
|
+
"minItems": 2,
|
|
102
|
+
"maxItems": 2
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
},
|
|
106
|
+
"lanes": {
|
|
107
|
+
"type": "array",
|
|
108
|
+
"minItems": 1,
|
|
109
|
+
"items": {
|
|
110
|
+
"type": "object",
|
|
111
|
+
"additionalProperties": false,
|
|
112
|
+
"required": [
|
|
113
|
+
"id",
|
|
114
|
+
"label"
|
|
115
|
+
],
|
|
116
|
+
"properties": {
|
|
117
|
+
"id": {
|
|
118
|
+
"$ref": "common.schema.json#/$defs/id"
|
|
119
|
+
},
|
|
120
|
+
"label": {
|
|
121
|
+
"type": "string",
|
|
122
|
+
"minLength": 1
|
|
123
|
+
},
|
|
124
|
+
"variant": {
|
|
125
|
+
"enum": [
|
|
126
|
+
"normal",
|
|
127
|
+
"exception"
|
|
128
|
+
]
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
},
|
|
133
|
+
"phases": {
|
|
134
|
+
"type": "array",
|
|
135
|
+
"items": {
|
|
136
|
+
"type": "object",
|
|
137
|
+
"additionalProperties": false,
|
|
138
|
+
"required": [
|
|
139
|
+
"id",
|
|
140
|
+
"label",
|
|
141
|
+
"fromCol",
|
|
142
|
+
"toCol"
|
|
143
|
+
],
|
|
144
|
+
"properties": {
|
|
145
|
+
"id": {
|
|
146
|
+
"$ref": "common.schema.json#/$defs/id"
|
|
147
|
+
},
|
|
148
|
+
"label": {
|
|
149
|
+
"type": "string",
|
|
150
|
+
"minLength": 1
|
|
151
|
+
},
|
|
152
|
+
"fromCol": {
|
|
153
|
+
"type": "integer",
|
|
154
|
+
"minimum": 0,
|
|
155
|
+
"maximum": 5
|
|
156
|
+
},
|
|
157
|
+
"toCol": {
|
|
158
|
+
"type": "integer",
|
|
159
|
+
"minimum": 0,
|
|
160
|
+
"maximum": 5
|
|
161
|
+
},
|
|
162
|
+
"variant": {
|
|
163
|
+
"enum": [
|
|
164
|
+
"default",
|
|
165
|
+
"emphasis",
|
|
166
|
+
"security",
|
|
167
|
+
"dashed"
|
|
168
|
+
]
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
},
|
|
173
|
+
"groups": {
|
|
174
|
+
"type": "array",
|
|
175
|
+
"items": {
|
|
176
|
+
"type": "object",
|
|
177
|
+
"additionalProperties": false,
|
|
178
|
+
"required": [
|
|
179
|
+
"id",
|
|
180
|
+
"label",
|
|
181
|
+
"lane",
|
|
182
|
+
"fromCol",
|
|
183
|
+
"toCol"
|
|
184
|
+
],
|
|
185
|
+
"properties": {
|
|
186
|
+
"id": {
|
|
187
|
+
"$ref": "common.schema.json#/$defs/id"
|
|
188
|
+
},
|
|
189
|
+
"label": {
|
|
190
|
+
"type": "string",
|
|
191
|
+
"minLength": 1
|
|
192
|
+
},
|
|
193
|
+
"lane": {
|
|
194
|
+
"$ref": "common.schema.json#/$defs/id"
|
|
195
|
+
},
|
|
196
|
+
"fromCol": {
|
|
197
|
+
"type": "integer",
|
|
198
|
+
"minimum": 0,
|
|
199
|
+
"maximum": 5
|
|
200
|
+
},
|
|
201
|
+
"toCol": {
|
|
202
|
+
"type": "integer",
|
|
203
|
+
"minimum": 0,
|
|
204
|
+
"maximum": 5
|
|
205
|
+
},
|
|
206
|
+
"variant": {
|
|
207
|
+
"enum": [
|
|
208
|
+
"default",
|
|
209
|
+
"emphasis",
|
|
210
|
+
"security",
|
|
211
|
+
"dashed"
|
|
212
|
+
]
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
},
|
|
217
|
+
"mainPath": {
|
|
218
|
+
"type": "array",
|
|
219
|
+
"minItems": 2,
|
|
220
|
+
"items": {
|
|
221
|
+
"$ref": "common.schema.json#/$defs/id"
|
|
222
|
+
}
|
|
223
|
+
},
|
|
224
|
+
"semanticChecks": {
|
|
225
|
+
"type": "object",
|
|
226
|
+
"additionalProperties": false,
|
|
227
|
+
"minProperties": 1,
|
|
228
|
+
"properties": {
|
|
229
|
+
"allowedRoots": {
|
|
230
|
+
"type": "array",
|
|
231
|
+
"items": {
|
|
232
|
+
"$ref": "common.schema.json#/$defs/id"
|
|
233
|
+
}
|
|
234
|
+
},
|
|
235
|
+
"allowedTerminals": {
|
|
236
|
+
"type": "array",
|
|
237
|
+
"items": {
|
|
238
|
+
"$ref": "common.schema.json#/$defs/id"
|
|
239
|
+
}
|
|
240
|
+
},
|
|
241
|
+
"requiredEdges": {
|
|
242
|
+
"type": "array",
|
|
243
|
+
"items": {
|
|
244
|
+
"$ref": "#/$defs/semanticRelation"
|
|
245
|
+
}
|
|
246
|
+
},
|
|
247
|
+
"requiredPaths": {
|
|
248
|
+
"type": "array",
|
|
249
|
+
"items": {
|
|
250
|
+
"$ref": "#/$defs/semanticRelation"
|
|
251
|
+
}
|
|
252
|
+
}
|
|
253
|
+
}
|
|
254
|
+
},
|
|
255
|
+
"nodes": {
|
|
256
|
+
"type": "array",
|
|
257
|
+
"minItems": 1,
|
|
258
|
+
"items": {
|
|
259
|
+
"type": "object",
|
|
260
|
+
"additionalProperties": false,
|
|
261
|
+
"required": [
|
|
262
|
+
"id",
|
|
263
|
+
"lane",
|
|
264
|
+
"col",
|
|
265
|
+
"type",
|
|
266
|
+
"label"
|
|
267
|
+
],
|
|
268
|
+
"properties": {
|
|
269
|
+
"id": {
|
|
270
|
+
"$ref": "common.schema.json#/$defs/id"
|
|
271
|
+
},
|
|
272
|
+
"lane": {
|
|
273
|
+
"$ref": "common.schema.json#/$defs/id"
|
|
274
|
+
},
|
|
275
|
+
"col": {
|
|
276
|
+
"type": "integer",
|
|
277
|
+
"minimum": 0,
|
|
278
|
+
"maximum": 5
|
|
279
|
+
},
|
|
280
|
+
"type": {
|
|
281
|
+
"$ref": "common.schema.json#/$defs/componentType"
|
|
282
|
+
},
|
|
283
|
+
"label": {
|
|
284
|
+
"type": "string",
|
|
285
|
+
"minLength": 1
|
|
286
|
+
},
|
|
287
|
+
"sublabel": {
|
|
288
|
+
"type": "string"
|
|
289
|
+
},
|
|
290
|
+
"tag": {
|
|
291
|
+
"type": "string"
|
|
292
|
+
},
|
|
293
|
+
"brand": {
|
|
294
|
+
"$ref": "common.schema.json#/$defs/brandMark"
|
|
295
|
+
},
|
|
296
|
+
"width": {
|
|
297
|
+
"type": "number",
|
|
298
|
+
"minimum": 32
|
|
299
|
+
},
|
|
300
|
+
"height": {
|
|
301
|
+
"type": "number",
|
|
302
|
+
"minimum": 32
|
|
303
|
+
},
|
|
304
|
+
"yOffset": {
|
|
305
|
+
"type": "number"
|
|
306
|
+
}
|
|
307
|
+
}
|
|
308
|
+
}
|
|
309
|
+
},
|
|
310
|
+
"edges": {
|
|
311
|
+
"type": "array",
|
|
312
|
+
"items": {
|
|
313
|
+
"type": "object",
|
|
314
|
+
"additionalProperties": false,
|
|
315
|
+
"required": [
|
|
316
|
+
"from",
|
|
317
|
+
"to"
|
|
318
|
+
],
|
|
319
|
+
"properties": {
|
|
320
|
+
"id": {
|
|
321
|
+
"$ref": "common.schema.json#/$defs/id"
|
|
322
|
+
},
|
|
323
|
+
"from": {
|
|
324
|
+
"$ref": "common.schema.json#/$defs/id"
|
|
325
|
+
},
|
|
326
|
+
"to": {
|
|
327
|
+
"$ref": "common.schema.json#/$defs/id"
|
|
328
|
+
},
|
|
329
|
+
"label": {
|
|
330
|
+
"type": "string"
|
|
331
|
+
},
|
|
332
|
+
"variant": {
|
|
333
|
+
"$ref": "common.schema.json#/$defs/variant"
|
|
334
|
+
},
|
|
335
|
+
"role": {
|
|
336
|
+
"enum": [
|
|
337
|
+
"main",
|
|
338
|
+
"branch",
|
|
339
|
+
"async",
|
|
340
|
+
"return",
|
|
341
|
+
"error"
|
|
342
|
+
]
|
|
343
|
+
},
|
|
344
|
+
"fromSide": {
|
|
345
|
+
"$ref": "#/$defs/side"
|
|
346
|
+
},
|
|
347
|
+
"toSide": {
|
|
348
|
+
"$ref": "#/$defs/side"
|
|
349
|
+
},
|
|
350
|
+
"route": {
|
|
351
|
+
"enum": [
|
|
352
|
+
"auto",
|
|
353
|
+
"straight",
|
|
354
|
+
"drop",
|
|
355
|
+
"outside-right",
|
|
356
|
+
"return-left",
|
|
357
|
+
"bottom-channel",
|
|
358
|
+
"up-channel"
|
|
359
|
+
]
|
|
360
|
+
},
|
|
361
|
+
"via": {
|
|
362
|
+
"type": "array",
|
|
363
|
+
"items": {
|
|
364
|
+
"$ref": "common.schema.json#/$defs/point"
|
|
365
|
+
}
|
|
366
|
+
},
|
|
367
|
+
"labelAt": {
|
|
368
|
+
"$ref": "common.schema.json#/$defs/point"
|
|
369
|
+
},
|
|
370
|
+
"labelDx": {
|
|
371
|
+
"type": "number"
|
|
372
|
+
},
|
|
373
|
+
"labelDy": {
|
|
374
|
+
"type": "number"
|
|
375
|
+
},
|
|
376
|
+
"labelSegment": {
|
|
377
|
+
"type": "integer",
|
|
378
|
+
"minimum": 0
|
|
379
|
+
},
|
|
380
|
+
"channelX": {
|
|
381
|
+
"type": "number"
|
|
382
|
+
},
|
|
383
|
+
"channelY": {
|
|
384
|
+
"type": "number"
|
|
385
|
+
},
|
|
386
|
+
"bias": {
|
|
387
|
+
"type": "number",
|
|
388
|
+
"minimum": 0,
|
|
389
|
+
"maximum": 1
|
|
390
|
+
},
|
|
391
|
+
"width": {
|
|
392
|
+
"type": "number",
|
|
393
|
+
"minimum": 0.5
|
|
394
|
+
}
|
|
395
|
+
}
|
|
396
|
+
}
|
|
397
|
+
},
|
|
398
|
+
"cards": {
|
|
399
|
+
"$ref": "common.schema.json#/$defs/cards"
|
|
400
|
+
}
|
|
401
|
+
},
|
|
402
|
+
"$defs": {
|
|
403
|
+
"semanticRelation": {
|
|
404
|
+
"type": "object",
|
|
405
|
+
"additionalProperties": false,
|
|
406
|
+
"required": [
|
|
407
|
+
"from",
|
|
408
|
+
"to"
|
|
409
|
+
],
|
|
410
|
+
"properties": {
|
|
411
|
+
"from": {
|
|
412
|
+
"$ref": "common.schema.json#/$defs/id"
|
|
413
|
+
},
|
|
414
|
+
"to": {
|
|
415
|
+
"$ref": "common.schema.json#/$defs/id"
|
|
416
|
+
}
|
|
417
|
+
}
|
|
418
|
+
},
|
|
419
|
+
"side": {
|
|
420
|
+
"enum": [
|
|
421
|
+
"left",
|
|
422
|
+
"right",
|
|
423
|
+
"top",
|
|
424
|
+
"bottom"
|
|
425
|
+
]
|
|
426
|
+
}
|
|
427
|
+
}
|
|
428
|
+
}
|