@cardenelabs/dragon 0.45.5 → 0.46.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/README.ja.md +331 -0
- package/README.md +200 -188
- package/dist/cli.cjs +148 -111
- package/dist/cli.cjs.map +1 -1
- package/dist/cli.js +148 -111
- package/dist/cli.js.map +1 -1
- package/dist/export.cjs +139 -109
- package/dist/export.cjs.map +1 -1
- package/dist/export.js +139 -109
- package/dist/export.js.map +1 -1
- package/dist/index.cjs +99 -62
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +99 -62
- package/dist/index.js.map +1 -1
- package/dist/light/chunk-CLS6JVKK.cjs.map +1 -1
- package/dist/light/{chunk-EHTQUCW4.js → chunk-DVGDEPCV.js} +6 -2
- package/dist/light/chunk-DVGDEPCV.js.map +1 -0
- package/dist/light/{chunk-5OQV42W3.cjs → chunk-SUL4AJLI.cjs} +6 -2
- package/dist/light/chunk-SUL4AJLI.cjs.map +1 -0
- package/dist/light/{chunk-JCEKXALJ.cjs → chunk-V34DCH34.cjs} +90 -87
- package/dist/light/chunk-V34DCH34.cjs.map +1 -0
- package/dist/light/{chunk-YEQSLVIN.js → chunk-YO3UBEC3.js} +12 -9
- package/dist/light/chunk-YO3UBEC3.js.map +1 -0
- package/dist/light/{git-K3KAAAWW.cjs → git-WBGFDRBD.cjs} +59 -59
- package/dist/light/git-WBGFDRBD.cjs.map +1 -0
- package/dist/light/{git-GESUYKGR.js → git-WEJL6VAY.js} +3 -3
- package/dist/light/index.cjs +407 -375
- package/dist/light/index.cjs.map +1 -1
- package/dist/light/index.js +92 -60
- package/dist/light/index.js.map +1 -1
- package/dist/light/{lineup-2V2U7HZH.js → lineup-6LN6Z5T2.js} +3 -3
- package/dist/light/{lineup-623J25LU.cjs → lineup-WLGNGTFX.cjs} +40 -40
- package/dist/light/lineup-WLGNGTFX.cjs.map +1 -0
- package/dist/light/{state-T4OTVING.js → state-DFYTMQI7.js} +2 -2
- package/dist/light/{state-OZVCHX7H.cjs → state-JVAH4TSM.cjs} +41 -41
- package/dist/light/state-JVAH4TSM.cjs.map +1 -0
- package/dist/light/{time-KVMZIKYF.cjs → time-EXRPI34B.cjs} +84 -84
- package/dist/light/time-EXRPI34B.cjs.map +1 -0
- package/dist/light/{time-O4CMTUV5.js → time-M3EGEFDU.js} +3 -3
- package/dist/light/{tree-6D7KI57H.cjs → tree-DECHTXFU.cjs} +62 -62
- package/dist/light/tree-DECHTXFU.cjs.map +1 -0
- package/dist/light/{tree-ZJZQI5QT.js → tree-MFU54QKY.js} +3 -3
- package/dist/node.cjs +115 -49
- package/dist/node.cjs.map +1 -1
- package/dist/node.js +115 -49
- package/dist/node.js.map +1 -1
- package/dist/player.global.js +3 -3
- package/package.json +1 -1
- package/src/field-messages.ts +4 -0
- package/src/look/values.ts +5 -1
- package/src/messages.ts +11 -1
- package/src/nearest.ts +37 -0
- package/src/parser.ts +4 -2
- package/src/render/draw.ts +2 -1
- package/src/render/parts.ts +28 -7
- package/src/schema.ts +27 -3
- package/src/schemas/diagram.schema.json +3 -2
- package/src/schemas/validate-diagram.js +1 -1
- package/dist/light/chunk-5OQV42W3.cjs.map +0 -1
- package/dist/light/chunk-EHTQUCW4.js.map +0 -1
- package/dist/light/chunk-JCEKXALJ.cjs.map +0 -1
- package/dist/light/chunk-YEQSLVIN.js.map +0 -1
- package/dist/light/git-K3KAAAWW.cjs.map +0 -1
- package/dist/light/lineup-623J25LU.cjs.map +0 -1
- package/dist/light/state-OZVCHX7H.cjs.map +0 -1
- package/dist/light/time-KVMZIKYF.cjs.map +0 -1
- package/dist/light/tree-6D7KI57H.cjs.map +0 -1
- /package/dist/light/{git-GESUYKGR.js.map → git-WEJL6VAY.js.map} +0 -0
- /package/dist/light/{lineup-2V2U7HZH.js.map → lineup-6LN6Z5T2.js.map} +0 -0
- /package/dist/light/{state-T4OTVING.js.map → state-DFYTMQI7.js.map} +0 -0
- /package/dist/light/{time-O4CMTUV5.js.map → time-M3EGEFDU.js.map} +0 -0
- /package/dist/light/{tree-ZJZQI5QT.js.map → tree-MFU54QKY.js.map} +0 -0
package/dist/light/index.cjs
CHANGED
|
@@ -50,8 +50,8 @@ var _chunkCLS6JVKKcjs = require('./chunk-CLS6JVKK.cjs');
|
|
|
50
50
|
|
|
51
51
|
|
|
52
52
|
|
|
53
|
-
var _chunkJCEKXALJcjs = require('./chunk-JCEKXALJ.cjs');
|
|
54
53
|
|
|
54
|
+
var _chunkV34DCH34cjs = require('./chunk-V34DCH34.cjs');
|
|
55
55
|
|
|
56
56
|
|
|
57
57
|
|
|
@@ -93,7 +93,8 @@ var _chunkJCEKXALJcjs = require('./chunk-JCEKXALJ.cjs');
|
|
|
93
93
|
|
|
94
94
|
|
|
95
95
|
|
|
96
|
-
|
|
96
|
+
|
|
97
|
+
var _chunkSUL4AJLIcjs = require('./chunk-SUL4AJLI.cjs');
|
|
97
98
|
|
|
98
99
|
// src/kinds/registry.ts
|
|
99
100
|
var LATER_KINDS = ["git", "lineup", "state", "time", "tree"];
|
|
@@ -106,7 +107,7 @@ function kindLoaded(kind) {
|
|
|
106
107
|
}
|
|
107
108
|
function kindParts(kind, lang = "ja") {
|
|
108
109
|
const parts = registered[kind];
|
|
109
|
-
if (parts === void 0) throw new Error(
|
|
110
|
+
if (parts === void 0) throw new Error(_chunkSUL4AJLIcjs.FIGURE_TEXT[lang].kindNotLoaded(kind));
|
|
110
111
|
return parts;
|
|
111
112
|
}
|
|
112
113
|
|
|
@@ -134,6 +135,33 @@ function extractDiagrams(markdown) {
|
|
|
134
135
|
return fences;
|
|
135
136
|
}
|
|
136
137
|
|
|
138
|
+
// src/nearest.ts
|
|
139
|
+
var MAX_DISTANCE = 2;
|
|
140
|
+
function nearest(word, candidates) {
|
|
141
|
+
const written = [...word.toLowerCase()];
|
|
142
|
+
let limit = Math.min(MAX_DISTANCE, written.length - 1);
|
|
143
|
+
let best;
|
|
144
|
+
for (const candidate of candidates) {
|
|
145
|
+
const d = distance(written, [...candidate.toLowerCase()]);
|
|
146
|
+
if (d > limit) continue;
|
|
147
|
+
best = candidate;
|
|
148
|
+
limit = d - 1;
|
|
149
|
+
}
|
|
150
|
+
return best;
|
|
151
|
+
}
|
|
152
|
+
function distance(a, b) {
|
|
153
|
+
let previous = Array.from({ length: b.length + 1 }, (_, j) => j);
|
|
154
|
+
for (let i = 1; i <= a.length; i++) {
|
|
155
|
+
const current = [i];
|
|
156
|
+
for (let j = 1; j <= b.length; j++) {
|
|
157
|
+
const replace = previous[j - 1] + (a[i - 1] === b[j - 1] ? 0 : 1);
|
|
158
|
+
current.push(Math.min(previous[j] + 1, current[j - 1] + 1, replace));
|
|
159
|
+
}
|
|
160
|
+
previous = current;
|
|
161
|
+
}
|
|
162
|
+
return previous[b.length];
|
|
163
|
+
}
|
|
164
|
+
|
|
137
165
|
// src/field-messages.ts
|
|
138
166
|
var TYPES_JA = {
|
|
139
167
|
string: "\u6587\u5B57\u5217\u306B\u3059\u308B",
|
|
@@ -158,6 +186,7 @@ var ja = {
|
|
|
158
186
|
additionalProperties: (key2) => `${key2} \u3068\u3044\u3046\u6B04\u306F\u66F8\u3051\u306A\u3044`,
|
|
159
187
|
required: (key2) => `${key2} \u306E\u6B04\u304C\u8981\u308B`,
|
|
160
188
|
enum: (values) => `${values.join(" / ")} \u306E\u3069\u308C\u304B\u306B\u3059\u308B`,
|
|
189
|
+
unknownIcon: (value2, near) => `${value2} \u3068\u3044\u3046 icon \u306F\u7121\u3044\u3002\u8FD1\u3044\u540D\u524D\u306F ${near}`,
|
|
161
190
|
type: (type) => _nullishCoalesce(TYPES_JA[type], () => ( `${type} \u306B\u3059\u308B`)),
|
|
162
191
|
minLength: (limit) => `${limit} \u5B57\u4EE5\u4E0A\u66F8\u304F`,
|
|
163
192
|
maxLength: (limit) => `${limit} \u5B57\u307E\u3067\u306B\u3059\u308B`,
|
|
@@ -182,6 +211,7 @@ var en = {
|
|
|
182
211
|
additionalProperties: (key2) => `The ${key2} field is not allowed`,
|
|
183
212
|
required: (key2) => `The ${key2} field is required`,
|
|
184
213
|
enum: (values) => `Use one of ${values.join(" / ")}`,
|
|
214
|
+
unknownIcon: (value2, near) => `There is no icon named ${value2}. The closest is ${near}`,
|
|
185
215
|
type: (type) => _nullishCoalesce(TYPES_EN[type], () => ( `Use ${type}`)),
|
|
186
216
|
minLength: (limit) => `Write at least ${plural(limit, "character")}`,
|
|
187
217
|
maxLength: (limit) => `Write at most ${plural(limit, "character")}`,
|
|
@@ -211,7 +241,7 @@ function ucs2length(str) {
|
|
|
211
241
|
return length;
|
|
212
242
|
}
|
|
213
243
|
var validate_diagram_default = validate10;
|
|
214
|
-
var schema11 = { "title": "dragon \u306E\u56F3\u306E\u539F\u672C", "description": "\u533A\u753B\u3001\u7BB1\u3001\u7DDA\u3001\u904B\u3076\u7269\u3001\u6BB5\u3001\u4E2D\u8EAB\u306E\u5E2F\u306E 6 \u90E8\u54C1\u3092\u5171\u901A\u306E\u9AA8\u7D44\u307F\u306B\u7F6E\u304D\u3001\u56F3\u306E\u7A2E\u985E\u3060\u3051\u306E\u7269\u306F\u7A2E\u985E\u306E\u6B04\u306B\u7F6E\u304F\u3002\u5EA7\u6A19\u306F\u6301\u305F\u306A\u3044\u3002\u7BB1\u306F\u679D\u5206\u304B\u308C\u306E\u56F3\u3068\u6642\u9593\u8EF8\u306E\u56F3\u3068\u6728\u306E\u56F3\u3060\u3051\u304C\u6301\u305F\u306A\u304F\u3066\u3088\u3044\u3002\u5217\u306E\u56F3\u306E\u7BB1\u306F\u5217\u306B\u306A\u308B\u3002", "type": "object", "additionalProperties": false, "required": ["version", "kind", "title", "boxes", "steps"], "properties": { "version": { "description": "\u5F62\u5F0F\u306E\u7248", "type": "integer", "minimum": 1 }, "kind": { "description": "\u56F3\u306E\u7A2E\u985E", "enum": ["sequence", "architecture", "state", "git", "time", "tree", "lineup"] }, "title": { "$ref": "#/definitions/text" }, "view": { "description": "\u898B\u305B\u65B9\u3002\u66F8\u304B\u306A\u3051\u308C\u3070\u5B57\u306E\u5927\u304D\u3055\u3067\u9078\u3076\u3002fixed \u306F\u5168\u4F53\u3092\u6B62\u3081\u3066\u4E2D\u3060\u3051\u52D5\u304B\u3057\u3001follow \u306F\u5BC4\u3063\u3066\u52D5\u304B\u3057\u5168\u4F53\u56F3\u3067\u4ECA\u3069\u3053\u304B\u3092\u793A\u3059", "enum": ["fixed", "follow"] }, "regions": { "type": "array", "items": { "$ref": "#/definitions/region" } }, "boxes": { "type": "array", "items": { "$ref": "#/definitions/box" } }, "strip": { "$ref": "#/definitions/strip" }, "steps": { "type": "array", "minItems": 1, "items": { "$ref": "#/definitions/step" } }, "sequence": { "$ref": "#/definitions/sequence" }, "state": { "$ref": "#/definitions/state" }, "git": { "$ref": "#/definitions/git" }, "time": { "$ref": "#/definitions/time" }, "lineup": { "$ref": "#/definitions/lineup" } }, "if": { "required": ["kind"], "properties": { "kind": { "const": "sequence" } } }, "then": { "required": ["sequence"], "properties": { "boxes": { "minItems": 1 }, "steps": { "$ref": "#/definitions/plainSteps" }, "strip": { "$ref": "#/definitions/plainStrip" }, "state": { "$ref": "#/definitions/absent" }, "git": { "$ref": "#/definitions/absent" }, "time": { "$ref": "#/definitions/absent" }, "lineup": { "$ref": "#/definitions/absent" } } }, "else": { "properties": { "sequence": { "$ref": "#/definitions/absent" } }, "if": { "required": ["kind"], "properties": { "kind": { "const": "state" } } }, "then": { "properties": { "boxes": { "minItems": 1, "items": { "properties": { "id": { "description": "\u59CB\u307E\u308A\u3068\u7D42\u308F\u308A\u306E\u5370\u306E\u540D\u524D\u306F\u7BB1\u306E\u540D\u672D\u306B\u4F7F\u3048\u306A\u3044", "not": { "enum": ["start", "finish"] } } } } }, "steps": { "$ref": "#/definitions/plainSteps" }, "strip": { "$ref": "#/definitions/plainStrip" }, "git": { "$ref": "#/definitions/absent" }, "time": { "$ref": "#/definitions/absent" }, "lineup": { "$ref": "#/definitions/absent" } } }, "else": { "if": { "required": ["kind"], "properties": { "kind": { "const": "git" } } }, "then": { "required": ["git"], "properties": { "steps": { "$ref": "#/definitions/gitSteps" }, "strip": { "$ref": "#/definitions/plainStrip" }, "state": { "$ref": "#/definitions/absent" }, "regions": { "$ref": "#/definitions/absent" }, "time": { "$ref": "#/definitions/absent" }, "lineup": { "$ref": "#/definitions/absent" } } }, "else": { "if": { "required": ["kind"], "properties": { "kind": { "const": "time" } } }, "then": { "required": ["time"], "properties": { "steps": { "$ref": "#/definitions/timeSteps" }, "state": { "$ref": "#/definitions/absent" }, "git": { "$ref": "#/definitions/absent" }, "regions": { "$ref": "#/definitions/absent" }, "lineup": { "$ref": "#/definitions/absent" } } }, "else": { "if": { "required": ["kind"], "properties": { "kind": { "const": "tree" } } }, "then": { "properties": { "steps": { "$ref": "#/definitions/treeSteps" }, "strip": { "$ref": "#/definitions/plainStrip" }, "state": { "$ref": "#/definitions/absent" }, "git": { "$ref": "#/definitions/absent" }, "time": { "$ref": "#/definitions/absent" }, "regions": { "$ref": "#/definitions/absent" }, "lineup": { "$ref": "#/definitions/absent" } } }, "else": { "if": { "required": ["kind"], "properties": { "kind": { "const": "lineup" } } }, "then": { "required": ["lineup"], "properties": { "boxes": { "minItems": 1, "items": { "properties": { "icon": { "$ref": "#/definitions/absent" }, "link": { "$ref": "#/definitions/absent" }, "region": { "$ref": "#/definitions/absent" } } } }, "steps": { "$ref": "#/definitions/lineupSteps" }, "strip": { "$ref": "#/definitions/plainStrip" }, "state": { "$ref": "#/definitions/absent" }, "git": { "$ref": "#/definitions/absent" }, "time": { "$ref": "#/definitions/absent" }, "regions": { "$ref": "#/definitions/absent" } } }, "else": { "properties": { "boxes": { "minItems": 1 }, "steps": { "$ref": "#/definitions/plainSteps" }, "strip": { "$ref": "#/definitions/plainStrip" }, "state": { "$ref": "#/definitions/absent" }, "git": { "$ref": "#/definitions/absent" }, "time": { "$ref": "#/definitions/absent" }, "lineup": { "$ref": "#/definitions/absent" } } } } } } } }, "definitions": { "text": { "type": "string", "minLength": 1 }, "absent": { "description": "\u3053\u306E\u56F3\u306E\u7A2E\u985E\u3067\u306F\u66F8\u3051\u306A\u3044\u6B04", "not": {} }, "plainSteps": { "description": "\u679D\u5206\u304B\u308C\u306E\u56F3\u3067\u3082\u6642\u9593\u8EF8\u306E\u56F3\u3067\u3082\u6728\u306E\u56F3\u3067\u3082\u5217\u306E\u56F3\u3067\u3082\u306A\u3044\u56F3\u306E\u6BB5\u3002\u679D\u5206\u304B\u308C\u306E\u56F3\u3060\u3051\u306E\u51FA\u6765\u4E8B (commit \u3068 branch) \u3068\u3001\u6642\u9593\u8EF8\u306E\u56F3\u3060\u3051\u306E\u51FA\u6765\u4E8B (now \u3068 mark \u3068 span) \u3068\u6B04 (at \u3068 into \u3068 color) \u3068\u3001\u6728\u306E\u56F3\u3060\u3051\u306E\u51FA\u6765\u4E8B (leaf \u3068 node) \u3068\u3001\u5217\u306E\u56F3\u3060\u3051\u306E\u51FA\u6765\u4E8B (line \u3068 seal \u3068 open \u3068 pick \u3068 stamp) \u3092\u66F8\u3051\u306A\u3044", "items": { "properties": { "events": { "items": { "not": { "$ref": "#/definitions/timeEvent" }, "allOf": [{ "not": { "$ref": "#/definitions/treeEvent" } }, { "$ref": "#/definitions/notLineupEvent" }], "properties": { "type": { "not": { "enum": ["commit", "branch"] } }, "at": { "$ref": "#/definitions/absent" }, "into": { "$ref": "#/definitions/absent" }, "color": { "$ref": "#/definitions/absent" } } } } } } }, "gitSteps": { "description": "\u679D\u5206\u304B\u308C\u306E\u56F3\u306E\u6BB5\u3002\u6642\u9593\u8EF8\u306E\u56F3\u3060\u3051\u306E\u51FA\u6765\u4E8B (now \u3068 mark \u3068 span) \u3068\u6B04 (at \u3068 into \u3068 color) \u3068\u3001\u6728\u306E\u56F3\u3060\u3051\u306E\u51FA\u6765\u4E8B (leaf \u3068 node) \u3068\u3001\u5217\u306E\u56F3\u3060\u3051\u306E\u51FA\u6765\u4E8B (line \u3068 seal \u3068 open \u3068 pick \u3068 stamp) \u3092\u66F8\u3051\u306A\u3044", "items": { "properties": { "events": { "items": { "not": { "$ref": "#/definitions/timeEvent" }, "allOf": [{ "not": { "$ref": "#/definitions/treeEvent" } }, { "$ref": "#/definitions/notLineupEvent" }], "properties": { "at": { "$ref": "#/definitions/absent" }, "into": { "$ref": "#/definitions/absent" }, "color": { "$ref": "#/definitions/absent" } } } } } } }, "timeSteps": { "description": "\u6642\u9593\u8EF8\u306E\u56F3\u306E\u6BB5\u3002\u679D\u5206\u304B\u308C\u306E\u56F3\u3060\u3051\u306E\u51FA\u6765\u4E8B (commit \u3068 branch) \u3068\u3001\u6728\u306E\u56F3\u3060\u3051\u306E\u51FA\u6765\u4E8B (leaf \u3068 node) \u3068\u3001\u5217\u306E\u56F3\u3060\u3051\u306E\u51FA\u6765\u4E8B (line \u3068 seal \u3068 open \u3068 pick \u3068 stamp) \u3092\u66F8\u3051\u306A\u3044", "items": { "properties": { "events": { "items": { "allOf": [{ "not": { "$ref": "#/definitions/treeEvent" } }, { "$ref": "#/definitions/notLineupEvent" }], "properties": { "type": { "not": { "enum": ["commit", "branch"] } } } } } } } }, "treeSteps": { "description": "\u6728\u306E\u56F3\u306E\u6BB5\u3002\u679D\u5206\u304B\u308C\u306E\u56F3\u3060\u3051\u306E\u51FA\u6765\u4E8B (commit \u3068 branch) \u3068\u3001\u6642\u9593\u8EF8\u306E\u56F3\u3060\u3051\u306E\u51FA\u6765\u4E8B (now \u3068 mark \u3068 span) \u3068\u6B04 (at \u3068 into \u3068 color) \u3068\u3001\u5217\u306E\u56F3\u3060\u3051\u306E\u51FA\u6765\u4E8B (line \u3068 seal \u3068 open \u3068 pick \u3068 stamp) \u3092\u66F8\u3051\u306A\u3044", "items": { "properties": { "events": { "items": { "not": { "$ref": "#/definitions/timeEvent" }, "allOf": [{ "$ref": "#/definitions/notLineupEvent" }], "properties": { "type": { "not": { "enum": ["commit", "branch"] } }, "at": { "$ref": "#/definitions/absent" }, "into": { "$ref": "#/definitions/absent" }, "color": { "$ref": "#/definitions/absent" } } } } } } }, "lineupSteps": { "description": "\u5217\u306E\u56F3\u306E\u6BB5\u3002\u7DDA\u3068\u51E6\u7406\u3068\u3001\u679D\u5206\u304B\u308C\u306E\u56F3\u3060\u3051\u306E\u51FA\u6765\u4E8B (commit \u3068 branch) \u3068\u3001\u6642\u9593\u8EF8\u306E\u56F3\u3060\u3051\u306E\u51FA\u6765\u4E8B (now \u3068 mark \u3068 span) \u3068\u6B04 (color) \u3068\u3001\u6728\u306E\u56F3\u3060\u3051\u306E\u51FA\u6765\u4E8B (leaf \u3068 node) \u3092\u66F8\u3051\u306A\u3044", "items": { "properties": { "events": { "items": { "not": { "$ref": "#/definitions/timeEvent" }, "allOf": [{ "not": { "$ref": "#/definitions/treeEvent" } }, { "$ref": "#/definitions/notWiredEvent" }], "properties": { "type": { "not": { "enum": ["commit", "branch"] } }, "color": { "$ref": "#/definitions/absent" } } } } } } }, "treeEvent": { "description": "\u6728\u306E\u56F3\u3060\u3051\u304C\u66F8\u3051\u308B\u51FA\u6765\u4E8B", "required": ["type"], "properties": { "type": { "enum": ["leaf", "node"] } } }, "notLineupEvent": { "description": "\u5217\u306E\u56F3\u3060\u3051\u304C\u66F8\u3051\u308B\u51FA\u6765\u4E8B\u3092\u66F8\u3051\u306A\u3044", "not": { "required": ["type"], "properties": { "type": { "enum": ["line", "seal", "open", "pick", "stamp"] } } } }, "notWiredEvent": { "description": "\u7BB1\u3068\u7DDA\u306E\u56F3\u306E\u51FA\u6765\u4E8B\u3092\u66F8\u3051\u306A\u3044", "not": { "required": ["type"], "properties": { "type": { "enum": ["edge", "action"] } } } }, "timeEvent": { "description": "\u6642\u9593\u8EF8\u306E\u56F3\u3060\u3051\u304C\u66F8\u3051\u308B\u51FA\u6765\u4E8B", "required": ["type"], "properties": { "type": { "enum": ["now", "mark", "span"] } } }, "plainStrip": { "description": "\u6642\u9593\u8EF8\u306E\u56F3\u3067\u306A\u3044\u56F3\u306E\u4E2D\u8EAB\u306E\u5E2F\u3002\u7269\u5DEE\u3057\u3092\u66F8\u3051\u306A\u3044", "properties": { "meters": { "$ref": "#/definitions/absent" } } }, "id": { "type": "string", "pattern": "^[^\\s\\[\\]\u300C\u300D=:]+$" }, "color": { "enum": ["blue", "amber", "green", "violet", "rose", "slate", "coin"] }, "region": { "type": "object", "additionalProperties": false, "required": ["id", "name"], "properties": { "id": { "$ref": "#/definitions/id" }, "name": { "$ref": "#/definitions/text" }, "note": { "$ref": "#/definitions/text" }, "color": { "$ref": "#/definitions/color" }, "icon": { "$ref": "#/definitions/text" } } }, "box": { "type": "object", "additionalProperties": false, "required": ["id", "name"], "properties": { "id": { "$ref": "#/definitions/id" }, "name": { "$ref": "#/definitions/text" }, "sub": { "$ref": "#/definitions/text" }, "color": { "$ref": "#/definitions/color" }, "icon": { "$ref": "#/definitions/text" }, "region": { "$ref": "#/definitions/id" }, "link": { "description": "\u98DB\u3073\u5148\u3002\u63CF\u3044\u305F\u56F3\u3067\u306F\u3053\u306E\u7BB1\u304C\u3053\u3053\u3078\u306E link \u306B\u306A\u308B", "$ref": "#/definitions/url" } } }, "strip": { "type": "object", "additionalProperties": false, "required": ["title", "fields"], "properties": { "title": { "$ref": "#/definitions/text" }, "fields": { "type": "array", "minItems": 1, "items": { "$ref": "#/definitions/text" } }, "meters": { "description": "\u7269\u5DEE\u3057\u306B\u3059\u308B\u6B04\u3002\u6642\u9593\u8EF8\u306E\u56F3\u3060\u3051\u304C\u66F8\u3051\u308B", "type": "array", "minItems": 1, "items": { "$ref": "#/definitions/meter" } } } }, "meter": { "description": "\u7269\u5DEE\u3057\u306E\u6B04\u3002line \u306E\u5272\u5408\u306E\u6240\u306B\u7DDA\u3092\u5F15\u304D\u3001set \u306E\u5024\u307E\u3067\u91DD\u3068\u4E00\u7DD2\u306B\u6E80\u3061\u308B", "type": "object", "additionalProperties": false, "required": ["field", "line"], "properties": { "field": { "$ref": "#/definitions/text" }, "line": { "$ref": "#/definitions/ratio" } } }, "ratio": { "description": "\u5272\u5408\u3002\u5206\u6570 (2/3) \u304B\u767E\u5206\u7387 (97%)", "type": "string", "pattern": "^([0-9]+/[0-9]+|[0-9]+(\\.[0-9]+)?%)$" }, "step": { "type": "object", "additionalProperties": false, "required": ["title", "body", "events"], "properties": { "title": { "$ref": "#/definitions/text" }, "body": { "$ref": "#/definitions/text" }, "code": { "$ref": "#/definitions/text" }, "sources": { "description": "\u6BB5\u306E\u51FA\u5178\u3002\u8AAD\u307F\u4E0A\u3052\u306E\u6BB5\u306E\u4E00\u89A7\u306B\u3001\u540D\u524D\u3092 URL \u3078\u306E link \u306B\u3057\u3066\u66F8\u3044\u305F\u9806\u306B\u51FA\u3059", "type": "array", "minItems": 1, "items": { "$ref": "#/definitions/source" } }, "events": { "type": "array", "items": { "$ref": "#/definitions/event" } } } }, "source": { "type": "object", "additionalProperties": false, "required": ["name", "url"], "properties": { "name": { "$ref": "#/definitions/text" }, "url": { "$ref": "#/definitions/url" } } }, "url": { "description": "\u9801\u3092\u79FB\u308B\u5F62\u3002/ \u3067\u59CB\u307E\u308B path \u304B\u3001http:// \u304B https:// \u3067\u59CB\u307E\u308B URL", "type": "string", "pattern": "^(/|https?://)" }, "event": { "description": "\u6BB5\u306E\u4E2D\u3067\u8D77\u304D\u308B\u3053\u3068\u3002\u8D77\u304D\u308B\u9806\u306B\u4E26\u3079\u308B", "type": "object", "required": ["type"], "discriminator": { "propertyName": "type" }, "oneOf": [{ "description": "\u7DDA\u3002\u904B\u3076\u7269\u3092\u8F09\u305B\u3066\u9001\u308B\u5074\u304B\u3089\u53D7\u3051\u308B\u5074\u3078\u8D70\u308B", "type": "object", "additionalProperties": false, "required": ["type", "from", "to", "carry"], "properties": { "type": { "const": "edge" }, "from": { "$ref": "#/definitions/id" }, "to": { "$ref": "#/definitions/id" }, "label": { "$ref": "#/definitions/text" }, "carry": { "$ref": "#/definitions/carry" }, "labelSide": { "description": "\u7DDA\u306E\u540D\u524D\u3092\u7F6E\u304F\u5074 (\u5BC4\u305B\u306E\u6307\u793A)", "enum": ["above", "below", "left", "right"] }, "at": { "description": "\u6642\u9593\u8EF8\u306E\u56F3\u306E\u62E1\u5927\u306E\u5E2F\u3067\u3001\u7DDA\u3092\u5F15\u304F\u5217\u306E\u76EE\u76DB\u308A", "$ref": "#/definitions/unit" }, "into": { "description": "\u6642\u9593\u8EF8\u306E\u56F3\u306E\u62E1\u5927\u306E\u5E2F\u3067\u3001\u53D7\u3051\u308B\u7BB1\u3092\u9078\u3076\u5217\u306E\u76EE\u76DB\u308A\u3002\u66F8\u304B\u306A\u3051\u308C\u3070 at \u306E\u5217", "$ref": "#/definitions/unit" } } }, { "description": "\u7BB1\u306E\u4E2D\u306E\u51E6\u7406", "type": "object", "additionalProperties": false, "required": ["type", "box", "label"], "properties": { "type": { "const": "action" }, "box": { "$ref": "#/definitions/id" }, "label": { "$ref": "#/definitions/text" } } }, { "description": "\u7BB1\u306E\u4E0B\u306E\u5C0F\u3055\u306A\u5B57\u306E\u66F8\u304D\u63DB\u3048", "type": "object", "additionalProperties": false, "required": ["type", "box", "text"], "properties": { "type": { "const": "swap" }, "box": { "$ref": "#/definitions/id" }, "text": { "$ref": "#/definitions/text" }, "color": { "description": "\u6642\u9593\u8EF8\u306E\u56F3\u306E\u7BC0\u76EE\u306E\u4E38\u306E\u8272", "$ref": "#/definitions/color" } } }, { "description": "commit \u3092\u7A4D\u3080\u3002\u679D\u5206\u304B\u308C\u306E\u56F3\u3060\u3051\u304C\u66F8\u3051\u308B\u3002\u7A4D\u3093\u3060\u679D\u306E\u672D\u3068\u3001\u305D\u306E\u679D\u3092\u6307\u3059 HEAD \u304C\u9032\u3080\u3002\u5F53\u3066\u76F4\u3057 (copy) \u306F\u679D\u306E\u672D\u3092\u52D5\u304B\u3055\u305A\u3001merge commit (merge) \u306F\u53D6\u308A\u8FBC\u3080\u679D\u306E\u5148\u7AEF\u3082\u89AA\u306B\u6301\u3064", "type": "object", "additionalProperties": false, "required": ["type", "id", "branch"], "properties": { "type": { "const": "commit" }, "id": { "$ref": "#/definitions/id" }, "branch": { "$ref": "#/definitions/id" }, "copy": { "$ref": "#/definitions/id" }, "merge": { "$ref": "#/definitions/id" }, "hash": { "$ref": "#/definitions/hash" }, "note": { "$ref": "#/definitions/text" } } }, { "description": "\u679D\u3092\u5207\u308B\u3002\u679D\u5206\u304B\u308C\u306E\u56F3\u3060\u3051\u304C\u66F8\u3051\u308B\u3002\u679D\u306E\u672D\u3092 from \u306E commit \u3078\u7F6E\u304D\u3001HEAD \u3092\u305D\u306E\u679D\u3078\u79FB\u3059", "type": "object", "additionalProperties": false, "required": ["type", "branch", "from"], "properties": { "type": { "const": "branch" }, "branch": { "$ref": "#/definitions/id" }, "from": { "$ref": "#/definitions/id" } } }, { "description": "\u6642\u9593\u8EF8\u306E\u56F3\u306E\u4ECA\u306E\u6642\u523B\u306E\u91DD\u3092\u3001to \u306E\u76EE\u76DB\u308A\u306E\u7D42\u308F\u308A\u307E\u3067\u9032\u3081\u308B", "type": "object", "additionalProperties": false, "required": ["type", "to"], "properties": { "type": { "const": "now" }, "to": { "$ref": "#/definitions/unit" } } }, { "description": "\u6642\u9593\u8EF8\u306E\u56F3\u306E\u5370\u306E\u5217 row \u306E\u3001from \u304B\u3089 to \u306E\u76EE\u76DB\u308A\u306E\u5370\u306E\u8272\u3092\u5909\u3048\u308B", "type": "object", "additionalProperties": false, "required": ["type", "row", "from", "to", "color"], "properties": { "type": { "const": "mark" }, "row": { "$ref": "#/definitions/id" }, "from": { "$ref": "#/definitions/unit" }, "to": { "$ref": "#/definitions/unit" }, "color": { "$ref": "#/definitions/color" } } }, { "description": "\u6642\u9593\u8EF8\u306E\u56F3\u306E from \u304B\u3089 to \u306E\u76EE\u76DB\u308A\u306B\u3001\u62EC\u5F27\u3068\u5B57\u3092\u51FA\u3059\u3002shape \u304C box \u306A\u3089\u5370\u306E\u5217\u3092\u56F2\u307F\u3001\u5B57\u3092\u7E01\u306E\u672D\u306B\u3059\u308B", "type": "object", "additionalProperties": false, "required": ["type", "from", "to", "text"], "properties": { "type": { "const": "span" }, "from": { "$ref": "#/definitions/unit" }, "to": { "$ref": "#/definitions/unit" }, "text": { "$ref": "#/definitions/text" }, "shape": { "enum": ["box"] }, "color": { "$ref": "#/definitions/color" } } }, { "description": "\u8449\u3092\u51FA\u3059\u3002\u6728\u306E\u56F3\u3060\u3051\u304C\u66F8\u3051\u308B\u3002\u66F8\u3044\u305F\u6BB5\u3067\u8449\u306E\u7BB1\u304C\u73FE\u308C\u308B\u3002hash \u3092\u66F8\u304F\u3068\u7BB1\u306B\u5024\u3092\u51FA\u3057\u3001\u540D\u672D\u3092\u8449\u306E\u4E0B\u306E\u672D\u306B\u51FA\u3059", "type": "object", "additionalProperties": false, "required": ["type", "id"], "properties": { "type": { "const": "leaf" }, "id": { "$ref": "#/definitions/id" }, "hash": { "$ref": "#/definitions/hash" } } }, { "description": "1 \u3064\u4EE5\u4E0A\u306E\u5B50\u304B\u3089\u89AA\u3092\u7D44\u3080\u3002\u6728\u306E\u56F3\u3060\u3051\u304C\u66F8\u3051\u308B\u3002\u66F8\u3044\u305F\u6BB5\u3067\u89AA\u306E\u7BB1\u3068\u3001\u5B50\u304B\u3089\u89AA\u3078\u306E\u6728\u306E\u7DDA\u304C\u73FE\u308C\u308B", "type": "object", "additionalProperties": false, "required": ["type", "id", "children"], "properties": { "type": { "const": "node" }, "id": { "$ref": "#/definitions/id" }, "children": { "type": "array", "minItems": 1, "items": { "$ref": "#/definitions/id" } }, "hash": { "$ref": "#/definitions/hash" } } }, { "description": "\u5217\u306E box \u306E\u4E26\u3073\u3092 items \u306B\u66F8\u304D\u63DB\u3048\u308B\u3002\u5217\u306E\u56F3\u3060\u3051\u304C\u66F8\u3051\u308B\u3002\u30C1\u30C3\u30D7\u306F\u524D\u306B\u5C45\u305F\u5217\u304B\u3089\u6ED1\u308A\u3001\u3069\u306E\u5217\u306B\u3082\u5C45\u306A\u304B\u3063\u305F\u30C1\u30C3\u30D7\u306F\u5F3E\u3093\u3067\u73FE\u308C\u3001\u5217\u304B\u3089\u5916\u308C\u305F\u30C1\u30C3\u30D7\u306F\u6D88\u3048\u308B", "type": "object", "additionalProperties": false, "required": ["type", "box", "items"], "properties": { "type": { "const": "line" }, "box": { "$ref": "#/definitions/id" }, "items": { "type": "array", "minItems": 1, "maxItems": 12, "items": { "$ref": "#/definitions/id" } } } }, { "description": "\u5217 box \u306B\u5C01\u3092\u3057\u3066\u3001\u30C1\u30C3\u30D7\u3092\u96A0\u3059\u3002\u5217\u306E\u56F3\u3060\u3051\u304C\u66F8\u3051\u308B", "type": "object", "additionalProperties": false, "required": ["type", "box"], "properties": { "type": { "const": "seal" }, "box": { "$ref": "#/definitions/id" } } }, { "description": "\u5217 box \u306E\u5C01\u3092\u958B\u3051\u308B\u3002\u5217\u306E\u56F3\u3060\u3051\u304C\u66F8\u3051\u308B", "type": "object", "additionalProperties": false, "required": ["type", "box"], "properties": { "type": { "const": "open" }, "box": { "$ref": "#/definitions/id" } } }, { "description": "\u5217 box \u3092\u9078\u3076\u3002\u5217\u306E\u56F3\u3060\u3051\u304C\u66F8\u3051\u308B\u3002\u5217\u306E\u7E01\u306B\u8272\u304C\u4ED8\u304D\u3001\u307B\u304B\u306E\u5217\u304C\u8584\u304F\u306A\u308B", "type": "object", "additionalProperties": false, "required": ["type", "box"], "properties": { "type": { "const": "pick" }, "box": { "$ref": "#/definitions/id" } } }, { "description": "\u5217 box \u306E\u53F3\u306B text \u306E\u672D\u3092\u62BC\u3059\u3002\u5217\u306E\u56F3\u3060\u3051\u304C\u66F8\u3051\u308B", "type": "object", "additionalProperties": false, "required": ["type", "box", "text"], "properties": { "type": { "const": "stamp" }, "box": { "$ref": "#/definitions/id" }, "text": { "$ref": "#/definitions/text" } } }, { "description": "\u4E2D\u8EAB\u306E\u5E2F\u306E\u6B04\u306E\u5024\u3068\u672D", "type": "object", "additionalProperties": false, "required": ["type", "field"], "anyOf": [{ "required": ["value"] }, { "required": ["tag"] }], "properties": { "type": { "const": "strip" }, "field": { "$ref": "#/definitions/text" }, "value": { "$ref": "#/definitions/text" }, "tag": { "$ref": "#/definitions/text" } } }] }, "carry": { "description": "\u7DDA\u306E\u4E0A\u3092\u8D70\u308B\u7269\u3002\u5C01\u7B52 (\u30E1\u30C3\u30BB\u30FC\u30B8\u3084\u8981\u6C42)\u3001\u672D (\u540D\u524D\u306E\u3042\u308B\u5024)\u3001\u786C\u8CA8 (\u4FA1\u5024)\u3001\u7121\u3057", "type": "object", "additionalProperties": false, "required": ["kind"], "properties": { "kind": { "enum": ["envelope", "tag", "coin", "none"] }, "text": { "$ref": "#/definitions/text" } }, "if": { "required": ["kind"], "properties": { "kind": { "const": "tag" } } }, "then": { "required": ["text"] }, "else": { "not": { "required": ["text"] } } }, "sequence": { "description": "\u6642\u7CFB\u5217\u56F3\u306E\u7A2E\u985E\u306E\u6B04\u3002\u751F\u5B58\u7DDA\u3092\u5DE6\u304B\u3089\u4E26\u3079\u308B\u9806", "type": "object", "additionalProperties": false, "required": ["lifelines"], "properties": { "lifelines": { "type": "array", "minItems": 1, "items": { "$ref": "#/definitions/id" } } } }, "state": { "description": "\u72B6\u614B\u9077\u79FB\u56F3\u306E\u7A2E\u985E\u306E\u6B04\u3002\u6700\u521D\u306E\u6BB5\u3088\u308A\u524D\u306B\u66F8\u3044\u305F\u3001\u79FB\u308C\u308B\u304C\u6BB5\u3067\u901A\u308B\u3068\u306F\u9650\u3089\u306A\u3044\u7DDA", "type": "object", "additionalProperties": false, "required": ["paths"], "properties": { "paths": { "type": "array", "minItems": 1, "items": { "$ref": "#/definitions/path" } } } }, "git": { "description": "\u679D\u5206\u304B\u308C\u306E\u56F3\u306E\u7A2E\u985E\u306E\u6B04\u3002\u679D\u3092\u4E0A\u304B\u3089\u5E2F\u306B\u4E26\u3079\u308B\u9806", "type": "object", "additionalProperties": false, "required": ["branches"], "properties": { "branches": { "type": "array", "minItems": 1, "items": { "$ref": "#/definitions/branch" } } } }, "branch": { "description": "\u679D\u3002\u5E2F\u306E\u5DE6\u306B\u540D\u672D\u3068\u6DFB\u3048\u66F8\u304D\u3092\u7F6E\u304F", "type": "object", "additionalProperties": false, "required": ["id"], "properties": { "id": { "$ref": "#/definitions/id" }, "note": { "$ref": "#/definitions/text" } } }, "hash": { "description": "commit \u3068\u6728\u306E\u7BB1\u306E hash\u300216 \u9032\u306E\u5B57\u3067 4 \u304B\u3089 40 \u5B57", "type": "string", "pattern": "^[0-9a-f]{4,40}$" }, "lineup": { "description": "\u5217\u306E\u56F3\u306E\u7A2E\u985E\u306E\u6B04\u3002\u5217\u306B\u4E26\u3079\u308B\u30C1\u30C3\u30D7", "type": "object", "additionalProperties": false, "required": ["items"], "properties": { "items": { "type": "array", "minItems": 1, "items": { "$ref": "#/definitions/item" } } } }, "item": { "description": "\u30C1\u30C3\u30D7\u3002color \u3092\u66F8\u304B\u306A\u3044\u30C1\u30C3\u30D7\u306F\u8584\u3044\u8272\u3067\u3001label \u3092\u66F8\u304B\u306A\u3044\u30C1\u30C3\u30D7\u306F\u8272\u3060\u3051\u3067\u51FA\u3059", "type": "object", "additionalProperties": false, "required": ["id"], "properties": { "id": { "$ref": "#/definitions/id" }, "color": { "$ref": "#/definitions/color" }, "label": { "description": "\u30C1\u30C3\u30D7\u306B\u8F09\u305B\u308B\u5B57", "type": "string", "minLength": 1, "maxLength": 4 } } }, "time": { "description": "\u6642\u9593\u8EF8\u306E\u56F3\u306E\u7A2E\u985E\u306E\u6B04\u3002\u76EE\u76DB\u308A\u3001\u533A\u5207\u308A\u3001\u5370\u306E\u5217\u3001\u7BC0\u76EE\u3001\u62E1\u5927\u306E\u7BC4\u56F2", "type": "object", "additionalProperties": false, "required": ["scale", "rows"], "properties": { "scale": { "$ref": "#/definitions/scale" }, "period": { "$ref": "#/definitions/period" }, "rows": { "type": "array", "minItems": 1, "items": { "$ref": "#/definitions/row" } }, "points": { "type": "array", "items": { "$ref": "#/definitions/point" } }, "zoom": { "$ref": "#/definitions/zoom" } } }, "scale": { "description": "\u76EE\u76DB\u308A\u3002unit \u306E\u540D\u524D\u306E\u76EE\u76DB\u308A\u3092 length \u306E\u9577\u3055\u3067 count \u500B\u4E26\u3079\u3001\u6700\u521D\u306E\u76EE\u76DB\u308A\u306E\u756A\u53F7\u3092 from \u306B\u3059\u308B", "type": "object", "additionalProperties": false, "required": ["unit", "length", "count"], "properties": { "unit": { "$ref": "#/definitions/text" }, "length": { "$ref": "#/definitions/duration" }, "count": { "type": "integer", "minimum": 1 }, "from": { "type": "integer", "minimum": 0 } } }, "duration": { "description": "\u9577\u3055\u3002\u6570\u3068\u5358\u4F4D (ms\u3001s\u3001min\u3001h\u3001d) \u306E\u7D44", "type": "string", "pattern": "^[0-9]+(\\.[0-9]+)?(ms|s|min|h|d)$" }, "unit": { "description": "\u76EE\u76DB\u308A\u306E\u4F4D\u7F6E\u30020 \u304B\u3089\u6570\u3048\u308B", "type": "integer", "minimum": 0 }, "period": { "description": "\u533A\u5207\u308A\u3002\u76EE\u76DB\u308A length \u500B\u3054\u3068\u306B name \u306E\u533A\u5207\u308A\u3092\u7F6E\u304D\u3001\u6700\u521D\u306E\u533A\u5207\u308A\u306E\u756A\u53F7\u3092 from \u306B\u3059\u308B", "type": "object", "additionalProperties": false, "required": ["name", "length"], "properties": { "name": { "$ref": "#/definitions/text" }, "length": { "type": "integer", "minimum": 1 }, "from": { "type": "integer", "minimum": 0 } } }, "row": { "description": "\u5370\u306E\u5217\u3002\u76EE\u76DB\u308A\u3054\u3068\u306B\u5370\u3092 1 \u3064\u7F6E\u304D\u3001empty \u306E\u76EE\u76DB\u308A\u306F\u7A7A\u304D\u306E\u5370\u306B\u3059\u308B", "type": "object", "additionalProperties": false, "required": ["id", "name"], "properties": { "id": { "$ref": "#/definitions/id" }, "name": { "$ref": "#/definitions/text" }, "color": { "$ref": "#/definitions/color" }, "empty": { "type": "array", "items": { "$ref": "#/definitions/unit" } } } }, "point": { "description": "\u7BC0\u76EE\u3002at \u306E\u76EE\u76DB\u308A\u306E\u5370\u306E\u4E0B\u306B\u65D7\u306E\u4E38\u3068\u540D\u672D\u3092\u7F6E\u304F", "type": "object", "additionalProperties": false, "required": ["id", "at"], "properties": { "id": { "$ref": "#/definitions/id" }, "at": { "$ref": "#/definitions/unit" } } }, "zoom": { "description": "\u62E1\u5927\u306E\u7BC4\u56F2\u3002from \u304B\u3089 to \u306E\u76EE\u76DB\u308A\u3054\u3068\u306B\u62E1\u5927\u306E\u5E2F\u306B\u5217\u3092\u4F5C\u308B", "type": "object", "additionalProperties": false, "required": ["from", "to"], "properties": { "from": { "$ref": "#/definitions/unit" }, "to": { "$ref": "#/definitions/unit" } } }, "path": { "description": "\u79FB\u308C\u308B\u9053\u3002\u9001\u308B\u5074\u306B\u59CB\u307E\u308A\u306E\u5370 start\u3001\u53D7\u3051\u308B\u5074\u306B\u7D42\u308F\u308A\u306E\u5370 finish \u3092\u66F8\u3051\u308B\u3002\u3069\u306E\u6BB5\u306B\u3082\u51FA\u306A\u3044\u9053\u306F\u70B9\u7DDA\u3067\u63CF\u304D\u3001\u904B\u3076\u7269\u3092\u8D70\u3089\u305B\u306A\u3044", "type": "object", "additionalProperties": false, "required": ["from", "to"], "properties": { "from": { "$ref": "#/definitions/id" }, "to": { "$ref": "#/definitions/id" }, "label": { "$ref": "#/definitions/text" } } } } };
|
|
244
|
+
var schema11 = { "title": "dragon \u306E\u56F3\u306E\u539F\u672C", "description": "\u533A\u753B\u3001\u7BB1\u3001\u7DDA\u3001\u904B\u3076\u7269\u3001\u6BB5\u3001\u4E2D\u8EAB\u306E\u5E2F\u306E 6 \u90E8\u54C1\u3092\u5171\u901A\u306E\u9AA8\u7D44\u307F\u306B\u7F6E\u304D\u3001\u56F3\u306E\u7A2E\u985E\u3060\u3051\u306E\u7269\u306F\u7A2E\u985E\u306E\u6B04\u306B\u7F6E\u304F\u3002\u5EA7\u6A19\u306F\u6301\u305F\u306A\u3044\u3002\u7BB1\u306F\u679D\u5206\u304B\u308C\u306E\u56F3\u3068\u6642\u9593\u8EF8\u306E\u56F3\u3068\u6728\u306E\u56F3\u3060\u3051\u304C\u6301\u305F\u306A\u304F\u3066\u3088\u3044\u3002\u5217\u306E\u56F3\u306E\u7BB1\u306F\u5217\u306B\u306A\u308B\u3002", "type": "object", "additionalProperties": false, "required": ["version", "kind", "title", "boxes", "steps"], "properties": { "version": { "description": "\u5F62\u5F0F\u306E\u7248", "type": "integer", "minimum": 1 }, "kind": { "description": "\u56F3\u306E\u7A2E\u985E", "enum": ["sequence", "architecture", "state", "git", "time", "tree", "lineup"] }, "title": { "$ref": "#/definitions/text" }, "view": { "description": "\u898B\u305B\u65B9\u3002\u66F8\u304B\u306A\u3051\u308C\u3070\u5B57\u306E\u5927\u304D\u3055\u3067\u9078\u3076\u3002fixed \u306F\u5168\u4F53\u3092\u6B62\u3081\u3066\u4E2D\u3060\u3051\u52D5\u304B\u3057\u3001follow \u306F\u5BC4\u3063\u3066\u52D5\u304B\u3057\u5168\u4F53\u56F3\u3067\u4ECA\u3069\u3053\u304B\u3092\u793A\u3059", "enum": ["fixed", "follow"] }, "regions": { "type": "array", "items": { "$ref": "#/definitions/region" } }, "boxes": { "type": "array", "items": { "$ref": "#/definitions/box" } }, "strip": { "$ref": "#/definitions/strip" }, "steps": { "type": "array", "minItems": 1, "items": { "$ref": "#/definitions/step" } }, "sequence": { "$ref": "#/definitions/sequence" }, "state": { "$ref": "#/definitions/state" }, "git": { "$ref": "#/definitions/git" }, "time": { "$ref": "#/definitions/time" }, "lineup": { "$ref": "#/definitions/lineup" } }, "if": { "required": ["kind"], "properties": { "kind": { "const": "sequence" } } }, "then": { "required": ["sequence"], "properties": { "boxes": { "minItems": 1 }, "steps": { "$ref": "#/definitions/plainSteps" }, "strip": { "$ref": "#/definitions/plainStrip" }, "state": { "$ref": "#/definitions/absent" }, "git": { "$ref": "#/definitions/absent" }, "time": { "$ref": "#/definitions/absent" }, "lineup": { "$ref": "#/definitions/absent" } } }, "else": { "properties": { "sequence": { "$ref": "#/definitions/absent" } }, "if": { "required": ["kind"], "properties": { "kind": { "const": "state" } } }, "then": { "properties": { "boxes": { "minItems": 1, "items": { "properties": { "id": { "description": "\u59CB\u307E\u308A\u3068\u7D42\u308F\u308A\u306E\u5370\u306E\u540D\u524D\u306F\u7BB1\u306E\u540D\u672D\u306B\u4F7F\u3048\u306A\u3044", "not": { "enum": ["start", "finish"] } } } } }, "steps": { "$ref": "#/definitions/plainSteps" }, "strip": { "$ref": "#/definitions/plainStrip" }, "git": { "$ref": "#/definitions/absent" }, "time": { "$ref": "#/definitions/absent" }, "lineup": { "$ref": "#/definitions/absent" } } }, "else": { "if": { "required": ["kind"], "properties": { "kind": { "const": "git" } } }, "then": { "required": ["git"], "properties": { "steps": { "$ref": "#/definitions/gitSteps" }, "strip": { "$ref": "#/definitions/plainStrip" }, "state": { "$ref": "#/definitions/absent" }, "regions": { "$ref": "#/definitions/absent" }, "time": { "$ref": "#/definitions/absent" }, "lineup": { "$ref": "#/definitions/absent" } } }, "else": { "if": { "required": ["kind"], "properties": { "kind": { "const": "time" } } }, "then": { "required": ["time"], "properties": { "steps": { "$ref": "#/definitions/timeSteps" }, "state": { "$ref": "#/definitions/absent" }, "git": { "$ref": "#/definitions/absent" }, "regions": { "$ref": "#/definitions/absent" }, "lineup": { "$ref": "#/definitions/absent" } } }, "else": { "if": { "required": ["kind"], "properties": { "kind": { "const": "tree" } } }, "then": { "properties": { "steps": { "$ref": "#/definitions/treeSteps" }, "strip": { "$ref": "#/definitions/plainStrip" }, "state": { "$ref": "#/definitions/absent" }, "git": { "$ref": "#/definitions/absent" }, "time": { "$ref": "#/definitions/absent" }, "regions": { "$ref": "#/definitions/absent" }, "lineup": { "$ref": "#/definitions/absent" } } }, "else": { "if": { "required": ["kind"], "properties": { "kind": { "const": "lineup" } } }, "then": { "required": ["lineup"], "properties": { "boxes": { "minItems": 1, "items": { "properties": { "icon": { "$ref": "#/definitions/absent" }, "link": { "$ref": "#/definitions/absent" }, "region": { "$ref": "#/definitions/absent" } } } }, "steps": { "$ref": "#/definitions/lineupSteps" }, "strip": { "$ref": "#/definitions/plainStrip" }, "state": { "$ref": "#/definitions/absent" }, "git": { "$ref": "#/definitions/absent" }, "time": { "$ref": "#/definitions/absent" }, "regions": { "$ref": "#/definitions/absent" } } }, "else": { "properties": { "boxes": { "minItems": 1 }, "steps": { "$ref": "#/definitions/plainSteps" }, "strip": { "$ref": "#/definitions/plainStrip" }, "state": { "$ref": "#/definitions/absent" }, "git": { "$ref": "#/definitions/absent" }, "time": { "$ref": "#/definitions/absent" }, "lineup": { "$ref": "#/definitions/absent" } } } } } } } }, "definitions": { "text": { "type": "string", "minLength": 1 }, "absent": { "description": "\u3053\u306E\u56F3\u306E\u7A2E\u985E\u3067\u306F\u66F8\u3051\u306A\u3044\u6B04", "not": {} }, "plainSteps": { "description": "\u679D\u5206\u304B\u308C\u306E\u56F3\u3067\u3082\u6642\u9593\u8EF8\u306E\u56F3\u3067\u3082\u6728\u306E\u56F3\u3067\u3082\u5217\u306E\u56F3\u3067\u3082\u306A\u3044\u56F3\u306E\u6BB5\u3002\u679D\u5206\u304B\u308C\u306E\u56F3\u3060\u3051\u306E\u51FA\u6765\u4E8B (commit \u3068 branch) \u3068\u3001\u6642\u9593\u8EF8\u306E\u56F3\u3060\u3051\u306E\u51FA\u6765\u4E8B (now \u3068 mark \u3068 span) \u3068\u6B04 (at \u3068 into \u3068 color) \u3068\u3001\u6728\u306E\u56F3\u3060\u3051\u306E\u51FA\u6765\u4E8B (leaf \u3068 node) \u3068\u3001\u5217\u306E\u56F3\u3060\u3051\u306E\u51FA\u6765\u4E8B (line \u3068 seal \u3068 open \u3068 pick \u3068 stamp) \u3092\u66F8\u3051\u306A\u3044", "items": { "properties": { "events": { "items": { "not": { "$ref": "#/definitions/timeEvent" }, "allOf": [{ "not": { "$ref": "#/definitions/treeEvent" } }, { "$ref": "#/definitions/notLineupEvent" }], "properties": { "type": { "not": { "enum": ["commit", "branch"] } }, "at": { "$ref": "#/definitions/absent" }, "into": { "$ref": "#/definitions/absent" }, "color": { "$ref": "#/definitions/absent" } } } } } } }, "gitSteps": { "description": "\u679D\u5206\u304B\u308C\u306E\u56F3\u306E\u6BB5\u3002\u6642\u9593\u8EF8\u306E\u56F3\u3060\u3051\u306E\u51FA\u6765\u4E8B (now \u3068 mark \u3068 span) \u3068\u6B04 (at \u3068 into \u3068 color) \u3068\u3001\u6728\u306E\u56F3\u3060\u3051\u306E\u51FA\u6765\u4E8B (leaf \u3068 node) \u3068\u3001\u5217\u306E\u56F3\u3060\u3051\u306E\u51FA\u6765\u4E8B (line \u3068 seal \u3068 open \u3068 pick \u3068 stamp) \u3092\u66F8\u3051\u306A\u3044", "items": { "properties": { "events": { "items": { "not": { "$ref": "#/definitions/timeEvent" }, "allOf": [{ "not": { "$ref": "#/definitions/treeEvent" } }, { "$ref": "#/definitions/notLineupEvent" }], "properties": { "at": { "$ref": "#/definitions/absent" }, "into": { "$ref": "#/definitions/absent" }, "color": { "$ref": "#/definitions/absent" } } } } } } }, "timeSteps": { "description": "\u6642\u9593\u8EF8\u306E\u56F3\u306E\u6BB5\u3002\u679D\u5206\u304B\u308C\u306E\u56F3\u3060\u3051\u306E\u51FA\u6765\u4E8B (commit \u3068 branch) \u3068\u3001\u6728\u306E\u56F3\u3060\u3051\u306E\u51FA\u6765\u4E8B (leaf \u3068 node) \u3068\u3001\u5217\u306E\u56F3\u3060\u3051\u306E\u51FA\u6765\u4E8B (line \u3068 seal \u3068 open \u3068 pick \u3068 stamp) \u3092\u66F8\u3051\u306A\u3044", "items": { "properties": { "events": { "items": { "allOf": [{ "not": { "$ref": "#/definitions/treeEvent" } }, { "$ref": "#/definitions/notLineupEvent" }], "properties": { "type": { "not": { "enum": ["commit", "branch"] } } } } } } } }, "treeSteps": { "description": "\u6728\u306E\u56F3\u306E\u6BB5\u3002\u679D\u5206\u304B\u308C\u306E\u56F3\u3060\u3051\u306E\u51FA\u6765\u4E8B (commit \u3068 branch) \u3068\u3001\u6642\u9593\u8EF8\u306E\u56F3\u3060\u3051\u306E\u51FA\u6765\u4E8B (now \u3068 mark \u3068 span) \u3068\u6B04 (at \u3068 into \u3068 color) \u3068\u3001\u5217\u306E\u56F3\u3060\u3051\u306E\u51FA\u6765\u4E8B (line \u3068 seal \u3068 open \u3068 pick \u3068 stamp) \u3092\u66F8\u3051\u306A\u3044", "items": { "properties": { "events": { "items": { "not": { "$ref": "#/definitions/timeEvent" }, "allOf": [{ "$ref": "#/definitions/notLineupEvent" }], "properties": { "type": { "not": { "enum": ["commit", "branch"] } }, "at": { "$ref": "#/definitions/absent" }, "into": { "$ref": "#/definitions/absent" }, "color": { "$ref": "#/definitions/absent" } } } } } } }, "lineupSteps": { "description": "\u5217\u306E\u56F3\u306E\u6BB5\u3002\u7DDA\u3068\u51E6\u7406\u3068\u3001\u679D\u5206\u304B\u308C\u306E\u56F3\u3060\u3051\u306E\u51FA\u6765\u4E8B (commit \u3068 branch) \u3068\u3001\u6642\u9593\u8EF8\u306E\u56F3\u3060\u3051\u306E\u51FA\u6765\u4E8B (now \u3068 mark \u3068 span) \u3068\u6B04 (color) \u3068\u3001\u6728\u306E\u56F3\u3060\u3051\u306E\u51FA\u6765\u4E8B (leaf \u3068 node) \u3092\u66F8\u3051\u306A\u3044", "items": { "properties": { "events": { "items": { "not": { "$ref": "#/definitions/timeEvent" }, "allOf": [{ "not": { "$ref": "#/definitions/treeEvent" } }, { "$ref": "#/definitions/notWiredEvent" }], "properties": { "type": { "not": { "enum": ["commit", "branch"] } }, "color": { "$ref": "#/definitions/absent" } } } } } } }, "treeEvent": { "description": "\u6728\u306E\u56F3\u3060\u3051\u304C\u66F8\u3051\u308B\u51FA\u6765\u4E8B", "required": ["type"], "properties": { "type": { "enum": ["leaf", "node"] } } }, "notLineupEvent": { "description": "\u5217\u306E\u56F3\u3060\u3051\u304C\u66F8\u3051\u308B\u51FA\u6765\u4E8B\u3092\u66F8\u3051\u306A\u3044", "not": { "required": ["type"], "properties": { "type": { "enum": ["line", "seal", "open", "pick", "stamp"] } } } }, "notWiredEvent": { "description": "\u7BB1\u3068\u7DDA\u306E\u56F3\u306E\u51FA\u6765\u4E8B\u3092\u66F8\u3051\u306A\u3044", "not": { "required": ["type"], "properties": { "type": { "enum": ["edge", "action"] } } } }, "timeEvent": { "description": "\u6642\u9593\u8EF8\u306E\u56F3\u3060\u3051\u304C\u66F8\u3051\u308B\u51FA\u6765\u4E8B", "required": ["type"], "properties": { "type": { "enum": ["now", "mark", "span"] } } }, "plainStrip": { "description": "\u6642\u9593\u8EF8\u306E\u56F3\u3067\u306A\u3044\u56F3\u306E\u4E2D\u8EAB\u306E\u5E2F\u3002\u7269\u5DEE\u3057\u3092\u66F8\u3051\u306A\u3044", "properties": { "meters": { "$ref": "#/definitions/absent" } } }, "id": { "type": "string", "pattern": "^[^\\s\\[\\]\u300C\u300D=:]+$" }, "color": { "enum": ["blue", "amber", "green", "violet", "rose", "slate", "coin"] }, "icon": { "description": "\u7BB1\u3068\u533A\u753B\u306E\u30A2\u30A4\u30B3\u30F3\u540D\u3002\u63CF\u304F\u90E8\u54C1\u306E\u30A2\u30A4\u30B3\u30F3\u306E\u8868 (ICONS) \u306B\u5728\u308B\u540D\u524D\u3060\u3051", "enum": ["app", "router", "on", "off", "pool", "db", "exe", "idx", "sign", "env", "lock", "check", "flag", "x", "chain", "net", "user", "server", "key", "shield", "globe", "bolt", "doc", "box", "truck", "card", "cart", "clock", "branch", "cloud", "refresh", "undo", "yen", "layers", "code", "paint", "tree", "block"] }, "region": { "type": "object", "additionalProperties": false, "required": ["id", "name"], "properties": { "id": { "$ref": "#/definitions/id" }, "name": { "$ref": "#/definitions/text" }, "note": { "$ref": "#/definitions/text" }, "color": { "$ref": "#/definitions/color" }, "icon": { "$ref": "#/definitions/icon" } } }, "box": { "type": "object", "additionalProperties": false, "required": ["id", "name"], "properties": { "id": { "$ref": "#/definitions/id" }, "name": { "$ref": "#/definitions/text" }, "sub": { "$ref": "#/definitions/text" }, "color": { "$ref": "#/definitions/color" }, "icon": { "$ref": "#/definitions/icon" }, "region": { "$ref": "#/definitions/id" }, "link": { "description": "\u98DB\u3073\u5148\u3002\u63CF\u3044\u305F\u56F3\u3067\u306F\u3053\u306E\u7BB1\u304C\u3053\u3053\u3078\u306E link \u306B\u306A\u308B", "$ref": "#/definitions/url" } } }, "strip": { "type": "object", "additionalProperties": false, "required": ["title", "fields"], "properties": { "title": { "$ref": "#/definitions/text" }, "fields": { "type": "array", "minItems": 1, "items": { "$ref": "#/definitions/text" } }, "meters": { "description": "\u7269\u5DEE\u3057\u306B\u3059\u308B\u6B04\u3002\u6642\u9593\u8EF8\u306E\u56F3\u3060\u3051\u304C\u66F8\u3051\u308B", "type": "array", "minItems": 1, "items": { "$ref": "#/definitions/meter" } } } }, "meter": { "description": "\u7269\u5DEE\u3057\u306E\u6B04\u3002line \u306E\u5272\u5408\u306E\u6240\u306B\u7DDA\u3092\u5F15\u304D\u3001set \u306E\u5024\u307E\u3067\u91DD\u3068\u4E00\u7DD2\u306B\u6E80\u3061\u308B", "type": "object", "additionalProperties": false, "required": ["field", "line"], "properties": { "field": { "$ref": "#/definitions/text" }, "line": { "$ref": "#/definitions/ratio" } } }, "ratio": { "description": "\u5272\u5408\u3002\u5206\u6570 (2/3) \u304B\u767E\u5206\u7387 (97%)", "type": "string", "pattern": "^([0-9]+/[0-9]+|[0-9]+(\\.[0-9]+)?%)$" }, "step": { "type": "object", "additionalProperties": false, "required": ["title", "body", "events"], "properties": { "title": { "$ref": "#/definitions/text" }, "body": { "$ref": "#/definitions/text" }, "code": { "$ref": "#/definitions/text" }, "sources": { "description": "\u6BB5\u306E\u51FA\u5178\u3002\u8AAD\u307F\u4E0A\u3052\u306E\u6BB5\u306E\u4E00\u89A7\u306B\u3001\u540D\u524D\u3092 URL \u3078\u306E link \u306B\u3057\u3066\u66F8\u3044\u305F\u9806\u306B\u51FA\u3059", "type": "array", "minItems": 1, "items": { "$ref": "#/definitions/source" } }, "events": { "type": "array", "items": { "$ref": "#/definitions/event" } } } }, "source": { "type": "object", "additionalProperties": false, "required": ["name", "url"], "properties": { "name": { "$ref": "#/definitions/text" }, "url": { "$ref": "#/definitions/url" } } }, "url": { "description": "\u9801\u3092\u79FB\u308B\u5F62\u3002/ \u3067\u59CB\u307E\u308B path \u304B\u3001http:// \u304B https:// \u3067\u59CB\u307E\u308B URL", "type": "string", "pattern": "^(/|https?://)" }, "event": { "description": "\u6BB5\u306E\u4E2D\u3067\u8D77\u304D\u308B\u3053\u3068\u3002\u8D77\u304D\u308B\u9806\u306B\u4E26\u3079\u308B", "type": "object", "required": ["type"], "discriminator": { "propertyName": "type" }, "oneOf": [{ "description": "\u7DDA\u3002\u904B\u3076\u7269\u3092\u8F09\u305B\u3066\u9001\u308B\u5074\u304B\u3089\u53D7\u3051\u308B\u5074\u3078\u8D70\u308B", "type": "object", "additionalProperties": false, "required": ["type", "from", "to", "carry"], "properties": { "type": { "const": "edge" }, "from": { "$ref": "#/definitions/id" }, "to": { "$ref": "#/definitions/id" }, "label": { "$ref": "#/definitions/text" }, "carry": { "$ref": "#/definitions/carry" }, "labelSide": { "description": "\u7DDA\u306E\u540D\u524D\u3092\u7F6E\u304F\u5074 (\u5BC4\u305B\u306E\u6307\u793A)", "enum": ["above", "below", "left", "right"] }, "at": { "description": "\u6642\u9593\u8EF8\u306E\u56F3\u306E\u62E1\u5927\u306E\u5E2F\u3067\u3001\u7DDA\u3092\u5F15\u304F\u5217\u306E\u76EE\u76DB\u308A", "$ref": "#/definitions/unit" }, "into": { "description": "\u6642\u9593\u8EF8\u306E\u56F3\u306E\u62E1\u5927\u306E\u5E2F\u3067\u3001\u53D7\u3051\u308B\u7BB1\u3092\u9078\u3076\u5217\u306E\u76EE\u76DB\u308A\u3002\u66F8\u304B\u306A\u3051\u308C\u3070 at \u306E\u5217", "$ref": "#/definitions/unit" } } }, { "description": "\u7BB1\u306E\u4E2D\u306E\u51E6\u7406", "type": "object", "additionalProperties": false, "required": ["type", "box", "label"], "properties": { "type": { "const": "action" }, "box": { "$ref": "#/definitions/id" }, "label": { "$ref": "#/definitions/text" } } }, { "description": "\u7BB1\u306E\u4E0B\u306E\u5C0F\u3055\u306A\u5B57\u306E\u66F8\u304D\u63DB\u3048", "type": "object", "additionalProperties": false, "required": ["type", "box", "text"], "properties": { "type": { "const": "swap" }, "box": { "$ref": "#/definitions/id" }, "text": { "$ref": "#/definitions/text" }, "color": { "description": "\u6642\u9593\u8EF8\u306E\u56F3\u306E\u7BC0\u76EE\u306E\u4E38\u306E\u8272", "$ref": "#/definitions/color" } } }, { "description": "commit \u3092\u7A4D\u3080\u3002\u679D\u5206\u304B\u308C\u306E\u56F3\u3060\u3051\u304C\u66F8\u3051\u308B\u3002\u7A4D\u3093\u3060\u679D\u306E\u672D\u3068\u3001\u305D\u306E\u679D\u3092\u6307\u3059 HEAD \u304C\u9032\u3080\u3002\u5F53\u3066\u76F4\u3057 (copy) \u306F\u679D\u306E\u672D\u3092\u52D5\u304B\u3055\u305A\u3001merge commit (merge) \u306F\u53D6\u308A\u8FBC\u3080\u679D\u306E\u5148\u7AEF\u3082\u89AA\u306B\u6301\u3064", "type": "object", "additionalProperties": false, "required": ["type", "id", "branch"], "properties": { "type": { "const": "commit" }, "id": { "$ref": "#/definitions/id" }, "branch": { "$ref": "#/definitions/id" }, "copy": { "$ref": "#/definitions/id" }, "merge": { "$ref": "#/definitions/id" }, "hash": { "$ref": "#/definitions/hash" }, "note": { "$ref": "#/definitions/text" } } }, { "description": "\u679D\u3092\u5207\u308B\u3002\u679D\u5206\u304B\u308C\u306E\u56F3\u3060\u3051\u304C\u66F8\u3051\u308B\u3002\u679D\u306E\u672D\u3092 from \u306E commit \u3078\u7F6E\u304D\u3001HEAD \u3092\u305D\u306E\u679D\u3078\u79FB\u3059", "type": "object", "additionalProperties": false, "required": ["type", "branch", "from"], "properties": { "type": { "const": "branch" }, "branch": { "$ref": "#/definitions/id" }, "from": { "$ref": "#/definitions/id" } } }, { "description": "\u6642\u9593\u8EF8\u306E\u56F3\u306E\u4ECA\u306E\u6642\u523B\u306E\u91DD\u3092\u3001to \u306E\u76EE\u76DB\u308A\u306E\u7D42\u308F\u308A\u307E\u3067\u9032\u3081\u308B", "type": "object", "additionalProperties": false, "required": ["type", "to"], "properties": { "type": { "const": "now" }, "to": { "$ref": "#/definitions/unit" } } }, { "description": "\u6642\u9593\u8EF8\u306E\u56F3\u306E\u5370\u306E\u5217 row \u306E\u3001from \u304B\u3089 to \u306E\u76EE\u76DB\u308A\u306E\u5370\u306E\u8272\u3092\u5909\u3048\u308B", "type": "object", "additionalProperties": false, "required": ["type", "row", "from", "to", "color"], "properties": { "type": { "const": "mark" }, "row": { "$ref": "#/definitions/id" }, "from": { "$ref": "#/definitions/unit" }, "to": { "$ref": "#/definitions/unit" }, "color": { "$ref": "#/definitions/color" } } }, { "description": "\u6642\u9593\u8EF8\u306E\u56F3\u306E from \u304B\u3089 to \u306E\u76EE\u76DB\u308A\u306B\u3001\u62EC\u5F27\u3068\u5B57\u3092\u51FA\u3059\u3002shape \u304C box \u306A\u3089\u5370\u306E\u5217\u3092\u56F2\u307F\u3001\u5B57\u3092\u7E01\u306E\u672D\u306B\u3059\u308B", "type": "object", "additionalProperties": false, "required": ["type", "from", "to", "text"], "properties": { "type": { "const": "span" }, "from": { "$ref": "#/definitions/unit" }, "to": { "$ref": "#/definitions/unit" }, "text": { "$ref": "#/definitions/text" }, "shape": { "enum": ["box"] }, "color": { "$ref": "#/definitions/color" } } }, { "description": "\u8449\u3092\u51FA\u3059\u3002\u6728\u306E\u56F3\u3060\u3051\u304C\u66F8\u3051\u308B\u3002\u66F8\u3044\u305F\u6BB5\u3067\u8449\u306E\u7BB1\u304C\u73FE\u308C\u308B\u3002hash \u3092\u66F8\u304F\u3068\u7BB1\u306B\u5024\u3092\u51FA\u3057\u3001\u540D\u672D\u3092\u8449\u306E\u4E0B\u306E\u672D\u306B\u51FA\u3059", "type": "object", "additionalProperties": false, "required": ["type", "id"], "properties": { "type": { "const": "leaf" }, "id": { "$ref": "#/definitions/id" }, "hash": { "$ref": "#/definitions/hash" } } }, { "description": "1 \u3064\u4EE5\u4E0A\u306E\u5B50\u304B\u3089\u89AA\u3092\u7D44\u3080\u3002\u6728\u306E\u56F3\u3060\u3051\u304C\u66F8\u3051\u308B\u3002\u66F8\u3044\u305F\u6BB5\u3067\u89AA\u306E\u7BB1\u3068\u3001\u5B50\u304B\u3089\u89AA\u3078\u306E\u6728\u306E\u7DDA\u304C\u73FE\u308C\u308B", "type": "object", "additionalProperties": false, "required": ["type", "id", "children"], "properties": { "type": { "const": "node" }, "id": { "$ref": "#/definitions/id" }, "children": { "type": "array", "minItems": 1, "items": { "$ref": "#/definitions/id" } }, "hash": { "$ref": "#/definitions/hash" } } }, { "description": "\u5217\u306E box \u306E\u4E26\u3073\u3092 items \u306B\u66F8\u304D\u63DB\u3048\u308B\u3002\u5217\u306E\u56F3\u3060\u3051\u304C\u66F8\u3051\u308B\u3002\u30C1\u30C3\u30D7\u306F\u524D\u306B\u5C45\u305F\u5217\u304B\u3089\u6ED1\u308A\u3001\u3069\u306E\u5217\u306B\u3082\u5C45\u306A\u304B\u3063\u305F\u30C1\u30C3\u30D7\u306F\u5F3E\u3093\u3067\u73FE\u308C\u3001\u5217\u304B\u3089\u5916\u308C\u305F\u30C1\u30C3\u30D7\u306F\u6D88\u3048\u308B", "type": "object", "additionalProperties": false, "required": ["type", "box", "items"], "properties": { "type": { "const": "line" }, "box": { "$ref": "#/definitions/id" }, "items": { "type": "array", "minItems": 1, "maxItems": 12, "items": { "$ref": "#/definitions/id" } } } }, { "description": "\u5217 box \u306B\u5C01\u3092\u3057\u3066\u3001\u30C1\u30C3\u30D7\u3092\u96A0\u3059\u3002\u5217\u306E\u56F3\u3060\u3051\u304C\u66F8\u3051\u308B", "type": "object", "additionalProperties": false, "required": ["type", "box"], "properties": { "type": { "const": "seal" }, "box": { "$ref": "#/definitions/id" } } }, { "description": "\u5217 box \u306E\u5C01\u3092\u958B\u3051\u308B\u3002\u5217\u306E\u56F3\u3060\u3051\u304C\u66F8\u3051\u308B", "type": "object", "additionalProperties": false, "required": ["type", "box"], "properties": { "type": { "const": "open" }, "box": { "$ref": "#/definitions/id" } } }, { "description": "\u5217 box \u3092\u9078\u3076\u3002\u5217\u306E\u56F3\u3060\u3051\u304C\u66F8\u3051\u308B\u3002\u5217\u306E\u7E01\u306B\u8272\u304C\u4ED8\u304D\u3001\u307B\u304B\u306E\u5217\u304C\u8584\u304F\u306A\u308B", "type": "object", "additionalProperties": false, "required": ["type", "box"], "properties": { "type": { "const": "pick" }, "box": { "$ref": "#/definitions/id" } } }, { "description": "\u5217 box \u306E\u53F3\u306B text \u306E\u672D\u3092\u62BC\u3059\u3002\u5217\u306E\u56F3\u3060\u3051\u304C\u66F8\u3051\u308B", "type": "object", "additionalProperties": false, "required": ["type", "box", "text"], "properties": { "type": { "const": "stamp" }, "box": { "$ref": "#/definitions/id" }, "text": { "$ref": "#/definitions/text" } } }, { "description": "\u4E2D\u8EAB\u306E\u5E2F\u306E\u6B04\u306E\u5024\u3068\u672D", "type": "object", "additionalProperties": false, "required": ["type", "field"], "anyOf": [{ "required": ["value"] }, { "required": ["tag"] }], "properties": { "type": { "const": "strip" }, "field": { "$ref": "#/definitions/text" }, "value": { "$ref": "#/definitions/text" }, "tag": { "$ref": "#/definitions/text" } } }] }, "carry": { "description": "\u7DDA\u306E\u4E0A\u3092\u8D70\u308B\u7269\u3002\u5C01\u7B52 (\u30E1\u30C3\u30BB\u30FC\u30B8\u3084\u8981\u6C42)\u3001\u672D (\u540D\u524D\u306E\u3042\u308B\u5024)\u3001\u786C\u8CA8 (\u4FA1\u5024)\u3001\u7121\u3057", "type": "object", "additionalProperties": false, "required": ["kind"], "properties": { "kind": { "enum": ["envelope", "tag", "coin", "none"] }, "text": { "$ref": "#/definitions/text" } }, "if": { "required": ["kind"], "properties": { "kind": { "const": "tag" } } }, "then": { "required": ["text"] }, "else": { "not": { "required": ["text"] } } }, "sequence": { "description": "\u6642\u7CFB\u5217\u56F3\u306E\u7A2E\u985E\u306E\u6B04\u3002\u751F\u5B58\u7DDA\u3092\u5DE6\u304B\u3089\u4E26\u3079\u308B\u9806", "type": "object", "additionalProperties": false, "required": ["lifelines"], "properties": { "lifelines": { "type": "array", "minItems": 1, "items": { "$ref": "#/definitions/id" } } } }, "state": { "description": "\u72B6\u614B\u9077\u79FB\u56F3\u306E\u7A2E\u985E\u306E\u6B04\u3002\u6700\u521D\u306E\u6BB5\u3088\u308A\u524D\u306B\u66F8\u3044\u305F\u3001\u79FB\u308C\u308B\u304C\u6BB5\u3067\u901A\u308B\u3068\u306F\u9650\u3089\u306A\u3044\u7DDA", "type": "object", "additionalProperties": false, "required": ["paths"], "properties": { "paths": { "type": "array", "minItems": 1, "items": { "$ref": "#/definitions/path" } } } }, "git": { "description": "\u679D\u5206\u304B\u308C\u306E\u56F3\u306E\u7A2E\u985E\u306E\u6B04\u3002\u679D\u3092\u4E0A\u304B\u3089\u5E2F\u306B\u4E26\u3079\u308B\u9806", "type": "object", "additionalProperties": false, "required": ["branches"], "properties": { "branches": { "type": "array", "minItems": 1, "items": { "$ref": "#/definitions/branch" } } } }, "branch": { "description": "\u679D\u3002\u5E2F\u306E\u5DE6\u306B\u540D\u672D\u3068\u6DFB\u3048\u66F8\u304D\u3092\u7F6E\u304F", "type": "object", "additionalProperties": false, "required": ["id"], "properties": { "id": { "$ref": "#/definitions/id" }, "note": { "$ref": "#/definitions/text" } } }, "hash": { "description": "commit \u3068\u6728\u306E\u7BB1\u306E hash\u300216 \u9032\u306E\u5B57\u3067 4 \u304B\u3089 40 \u5B57", "type": "string", "pattern": "^[0-9a-f]{4,40}$" }, "lineup": { "description": "\u5217\u306E\u56F3\u306E\u7A2E\u985E\u306E\u6B04\u3002\u5217\u306B\u4E26\u3079\u308B\u30C1\u30C3\u30D7", "type": "object", "additionalProperties": false, "required": ["items"], "properties": { "items": { "type": "array", "minItems": 1, "items": { "$ref": "#/definitions/item" } } } }, "item": { "description": "\u30C1\u30C3\u30D7\u3002color \u3092\u66F8\u304B\u306A\u3044\u30C1\u30C3\u30D7\u306F\u8584\u3044\u8272\u3067\u3001label \u3092\u66F8\u304B\u306A\u3044\u30C1\u30C3\u30D7\u306F\u8272\u3060\u3051\u3067\u51FA\u3059", "type": "object", "additionalProperties": false, "required": ["id"], "properties": { "id": { "$ref": "#/definitions/id" }, "color": { "$ref": "#/definitions/color" }, "label": { "description": "\u30C1\u30C3\u30D7\u306B\u8F09\u305B\u308B\u5B57", "type": "string", "minLength": 1, "maxLength": 4 } } }, "time": { "description": "\u6642\u9593\u8EF8\u306E\u56F3\u306E\u7A2E\u985E\u306E\u6B04\u3002\u76EE\u76DB\u308A\u3001\u533A\u5207\u308A\u3001\u5370\u306E\u5217\u3001\u7BC0\u76EE\u3001\u62E1\u5927\u306E\u7BC4\u56F2", "type": "object", "additionalProperties": false, "required": ["scale", "rows"], "properties": { "scale": { "$ref": "#/definitions/scale" }, "period": { "$ref": "#/definitions/period" }, "rows": { "type": "array", "minItems": 1, "items": { "$ref": "#/definitions/row" } }, "points": { "type": "array", "items": { "$ref": "#/definitions/point" } }, "zoom": { "$ref": "#/definitions/zoom" } } }, "scale": { "description": "\u76EE\u76DB\u308A\u3002unit \u306E\u540D\u524D\u306E\u76EE\u76DB\u308A\u3092 length \u306E\u9577\u3055\u3067 count \u500B\u4E26\u3079\u3001\u6700\u521D\u306E\u76EE\u76DB\u308A\u306E\u756A\u53F7\u3092 from \u306B\u3059\u308B", "type": "object", "additionalProperties": false, "required": ["unit", "length", "count"], "properties": { "unit": { "$ref": "#/definitions/text" }, "length": { "$ref": "#/definitions/duration" }, "count": { "type": "integer", "minimum": 1 }, "from": { "type": "integer", "minimum": 0 } } }, "duration": { "description": "\u9577\u3055\u3002\u6570\u3068\u5358\u4F4D (ms\u3001s\u3001min\u3001h\u3001d) \u306E\u7D44", "type": "string", "pattern": "^[0-9]+(\\.[0-9]+)?(ms|s|min|h|d)$" }, "unit": { "description": "\u76EE\u76DB\u308A\u306E\u4F4D\u7F6E\u30020 \u304B\u3089\u6570\u3048\u308B", "type": "integer", "minimum": 0 }, "period": { "description": "\u533A\u5207\u308A\u3002\u76EE\u76DB\u308A length \u500B\u3054\u3068\u306B name \u306E\u533A\u5207\u308A\u3092\u7F6E\u304D\u3001\u6700\u521D\u306E\u533A\u5207\u308A\u306E\u756A\u53F7\u3092 from \u306B\u3059\u308B", "type": "object", "additionalProperties": false, "required": ["name", "length"], "properties": { "name": { "$ref": "#/definitions/text" }, "length": { "type": "integer", "minimum": 1 }, "from": { "type": "integer", "minimum": 0 } } }, "row": { "description": "\u5370\u306E\u5217\u3002\u76EE\u76DB\u308A\u3054\u3068\u306B\u5370\u3092 1 \u3064\u7F6E\u304D\u3001empty \u306E\u76EE\u76DB\u308A\u306F\u7A7A\u304D\u306E\u5370\u306B\u3059\u308B", "type": "object", "additionalProperties": false, "required": ["id", "name"], "properties": { "id": { "$ref": "#/definitions/id" }, "name": { "$ref": "#/definitions/text" }, "color": { "$ref": "#/definitions/color" }, "empty": { "type": "array", "items": { "$ref": "#/definitions/unit" } } } }, "point": { "description": "\u7BC0\u76EE\u3002at \u306E\u76EE\u76DB\u308A\u306E\u5370\u306E\u4E0B\u306B\u65D7\u306E\u4E38\u3068\u540D\u672D\u3092\u7F6E\u304F", "type": "object", "additionalProperties": false, "required": ["id", "at"], "properties": { "id": { "$ref": "#/definitions/id" }, "at": { "$ref": "#/definitions/unit" } } }, "zoom": { "description": "\u62E1\u5927\u306E\u7BC4\u56F2\u3002from \u304B\u3089 to \u306E\u76EE\u76DB\u308A\u3054\u3068\u306B\u62E1\u5927\u306E\u5E2F\u306B\u5217\u3092\u4F5C\u308B", "type": "object", "additionalProperties": false, "required": ["from", "to"], "properties": { "from": { "$ref": "#/definitions/unit" }, "to": { "$ref": "#/definitions/unit" } } }, "path": { "description": "\u79FB\u308C\u308B\u9053\u3002\u9001\u308B\u5074\u306B\u59CB\u307E\u308A\u306E\u5370 start\u3001\u53D7\u3051\u308B\u5074\u306B\u7D42\u308F\u308A\u306E\u5370 finish \u3092\u66F8\u3051\u308B\u3002\u3069\u306E\u6BB5\u306B\u3082\u51FA\u306A\u3044\u9053\u306F\u70B9\u7DDA\u3067\u63CF\u304D\u3001\u904B\u3076\u7269\u3092\u8D70\u3089\u305B\u306A\u3044", "type": "object", "additionalProperties": false, "required": ["from", "to"], "properties": { "from": { "$ref": "#/definitions/id" }, "to": { "$ref": "#/definitions/id" }, "label": { "$ref": "#/definitions/text" } } } } };
|
|
215
245
|
function validate11(data, { instancePath = "", parentData, parentDataProperty, rootData = data } = {}) {
|
|
216
246
|
let vErrors = null;
|
|
217
247
|
let errors = 0;
|
|
@@ -1175,6 +1205,7 @@ function validate25(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
1175
1205
|
return errors === 0;
|
|
1176
1206
|
}
|
|
1177
1207
|
var schema79 = { "enum": ["blue", "amber", "green", "violet", "rose", "slate", "coin"] };
|
|
1208
|
+
var schema80 = { "description": "\u7BB1\u3068\u533A\u753B\u306E\u30A2\u30A4\u30B3\u30F3\u540D\u3002\u63CF\u304F\u90E8\u54C1\u306E\u30A2\u30A4\u30B3\u30F3\u306E\u8868 (ICONS) \u306B\u5728\u308B\u540D\u524D\u3060\u3051", "enum": ["app", "router", "on", "off", "pool", "db", "exe", "idx", "sign", "env", "lock", "check", "flag", "x", "chain", "net", "user", "server", "key", "shield", "globe", "bolt", "doc", "box", "truck", "card", "cart", "clock", "branch", "cloud", "refresh", "undo", "yen", "layers", "code", "paint", "tree", "block"] };
|
|
1178
1209
|
var pattern0 = new RegExp("^[^\\s\\[\\]\u300C\u300D=:]+$", "u");
|
|
1179
1210
|
var func3 = ucs2length;
|
|
1180
1211
|
function validate30(data, { instancePath = "", parentData, parentDataProperty, rootData = data } = {}) {
|
|
@@ -1290,32 +1321,22 @@ function validate30(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
1290
1321
|
}
|
|
1291
1322
|
if (data.icon !== void 0) {
|
|
1292
1323
|
let data4 = data.icon;
|
|
1293
|
-
if (
|
|
1294
|
-
|
|
1295
|
-
const err10 = { instancePath: instancePath + "/icon", schemaPath: "#/definitions/text/minLength", keyword: "minLength", params: { limit: 1 }, message: "must NOT have fewer than 1 characters" };
|
|
1296
|
-
if (vErrors === null) {
|
|
1297
|
-
vErrors = [err10];
|
|
1298
|
-
} else {
|
|
1299
|
-
vErrors.push(err10);
|
|
1300
|
-
}
|
|
1301
|
-
errors++;
|
|
1302
|
-
}
|
|
1303
|
-
} else {
|
|
1304
|
-
const err11 = { instancePath: instancePath + "/icon", schemaPath: "#/definitions/text/type", keyword: "type", params: { type: "string" }, message: "must be string" };
|
|
1324
|
+
if (!(data4 === "app" || data4 === "router" || data4 === "on" || data4 === "off" || data4 === "pool" || data4 === "db" || data4 === "exe" || data4 === "idx" || data4 === "sign" || data4 === "env" || data4 === "lock" || data4 === "check" || data4 === "flag" || data4 === "x" || data4 === "chain" || data4 === "net" || data4 === "user" || data4 === "server" || data4 === "key" || data4 === "shield" || data4 === "globe" || data4 === "bolt" || data4 === "doc" || data4 === "box" || data4 === "truck" || data4 === "card" || data4 === "cart" || data4 === "clock" || data4 === "branch" || data4 === "cloud" || data4 === "refresh" || data4 === "undo" || data4 === "yen" || data4 === "layers" || data4 === "code" || data4 === "paint" || data4 === "tree" || data4 === "block")) {
|
|
1325
|
+
const err10 = { instancePath: instancePath + "/icon", schemaPath: "#/definitions/icon/enum", keyword: "enum", params: { allowedValues: schema80.enum }, message: "must be equal to one of the allowed values" };
|
|
1305
1326
|
if (vErrors === null) {
|
|
1306
|
-
vErrors = [
|
|
1327
|
+
vErrors = [err10];
|
|
1307
1328
|
} else {
|
|
1308
|
-
vErrors.push(
|
|
1329
|
+
vErrors.push(err10);
|
|
1309
1330
|
}
|
|
1310
1331
|
errors++;
|
|
1311
1332
|
}
|
|
1312
1333
|
}
|
|
1313
1334
|
} else {
|
|
1314
|
-
const
|
|
1335
|
+
const err11 = { instancePath, schemaPath: "#/type", keyword: "type", params: { type: "object" }, message: "must be object" };
|
|
1315
1336
|
if (vErrors === null) {
|
|
1316
|
-
vErrors = [
|
|
1337
|
+
vErrors = [err11];
|
|
1317
1338
|
} else {
|
|
1318
|
-
vErrors.push(
|
|
1339
|
+
vErrors.push(err11);
|
|
1319
1340
|
}
|
|
1320
1341
|
errors++;
|
|
1321
1342
|
}
|
|
@@ -1436,22 +1457,12 @@ function validate32(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
1436
1457
|
}
|
|
1437
1458
|
if (data.icon !== void 0) {
|
|
1438
1459
|
let data4 = data.icon;
|
|
1439
|
-
if (
|
|
1440
|
-
|
|
1441
|
-
const err10 = { instancePath: instancePath + "/icon", schemaPath: "#/definitions/text/minLength", keyword: "minLength", params: { limit: 1 }, message: "must NOT have fewer than 1 characters" };
|
|
1442
|
-
if (vErrors === null) {
|
|
1443
|
-
vErrors = [err10];
|
|
1444
|
-
} else {
|
|
1445
|
-
vErrors.push(err10);
|
|
1446
|
-
}
|
|
1447
|
-
errors++;
|
|
1448
|
-
}
|
|
1449
|
-
} else {
|
|
1450
|
-
const err11 = { instancePath: instancePath + "/icon", schemaPath: "#/definitions/text/type", keyword: "type", params: { type: "string" }, message: "must be string" };
|
|
1460
|
+
if (!(data4 === "app" || data4 === "router" || data4 === "on" || data4 === "off" || data4 === "pool" || data4 === "db" || data4 === "exe" || data4 === "idx" || data4 === "sign" || data4 === "env" || data4 === "lock" || data4 === "check" || data4 === "flag" || data4 === "x" || data4 === "chain" || data4 === "net" || data4 === "user" || data4 === "server" || data4 === "key" || data4 === "shield" || data4 === "globe" || data4 === "bolt" || data4 === "doc" || data4 === "box" || data4 === "truck" || data4 === "card" || data4 === "cart" || data4 === "clock" || data4 === "branch" || data4 === "cloud" || data4 === "refresh" || data4 === "undo" || data4 === "yen" || data4 === "layers" || data4 === "code" || data4 === "paint" || data4 === "tree" || data4 === "block")) {
|
|
1461
|
+
const err10 = { instancePath: instancePath + "/icon", schemaPath: "#/definitions/icon/enum", keyword: "enum", params: { allowedValues: schema80.enum }, message: "must be equal to one of the allowed values" };
|
|
1451
1462
|
if (vErrors === null) {
|
|
1452
|
-
vErrors = [
|
|
1463
|
+
vErrors = [err10];
|
|
1453
1464
|
} else {
|
|
1454
|
-
vErrors.push(
|
|
1465
|
+
vErrors.push(err10);
|
|
1455
1466
|
}
|
|
1456
1467
|
errors++;
|
|
1457
1468
|
}
|
|
@@ -1460,20 +1471,20 @@ function validate32(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
1460
1471
|
let data5 = data.region;
|
|
1461
1472
|
if (typeof data5 === "string") {
|
|
1462
1473
|
if (!pattern0.test(data5)) {
|
|
1463
|
-
const
|
|
1474
|
+
const err11 = { instancePath: instancePath + "/region", schemaPath: "#/definitions/id/pattern", keyword: "pattern", params: { pattern: "^[^\\s\\[\\]\u300C\u300D=:]+$" }, message: 'must match pattern "^[^\\s\\[\\]\u300C\u300D=:]+$"' };
|
|
1464
1475
|
if (vErrors === null) {
|
|
1465
|
-
vErrors = [
|
|
1476
|
+
vErrors = [err11];
|
|
1466
1477
|
} else {
|
|
1467
|
-
vErrors.push(
|
|
1478
|
+
vErrors.push(err11);
|
|
1468
1479
|
}
|
|
1469
1480
|
errors++;
|
|
1470
1481
|
}
|
|
1471
1482
|
} else {
|
|
1472
|
-
const
|
|
1483
|
+
const err12 = { instancePath: instancePath + "/region", schemaPath: "#/definitions/id/type", keyword: "type", params: { type: "string" }, message: "must be string" };
|
|
1473
1484
|
if (vErrors === null) {
|
|
1474
|
-
vErrors = [
|
|
1485
|
+
vErrors = [err12];
|
|
1475
1486
|
} else {
|
|
1476
|
-
vErrors.push(
|
|
1487
|
+
vErrors.push(err12);
|
|
1477
1488
|
}
|
|
1478
1489
|
errors++;
|
|
1479
1490
|
}
|
|
@@ -1482,30 +1493,30 @@ function validate32(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
1482
1493
|
let data6 = data.link;
|
|
1483
1494
|
if (typeof data6 === "string") {
|
|
1484
1495
|
if (!pattern3.test(data6)) {
|
|
1485
|
-
const
|
|
1496
|
+
const err13 = { instancePath: instancePath + "/link", schemaPath: "#/definitions/url/pattern", keyword: "pattern", params: { pattern: "^(/|https?://)" }, message: 'must match pattern "^(/|https?://)"' };
|
|
1486
1497
|
if (vErrors === null) {
|
|
1487
|
-
vErrors = [
|
|
1498
|
+
vErrors = [err13];
|
|
1488
1499
|
} else {
|
|
1489
|
-
vErrors.push(
|
|
1500
|
+
vErrors.push(err13);
|
|
1490
1501
|
}
|
|
1491
1502
|
errors++;
|
|
1492
1503
|
}
|
|
1493
1504
|
} else {
|
|
1494
|
-
const
|
|
1505
|
+
const err14 = { instancePath: instancePath + "/link", schemaPath: "#/definitions/url/type", keyword: "type", params: { type: "string" }, message: "must be string" };
|
|
1495
1506
|
if (vErrors === null) {
|
|
1496
|
-
vErrors = [
|
|
1507
|
+
vErrors = [err14];
|
|
1497
1508
|
} else {
|
|
1498
|
-
vErrors.push(
|
|
1509
|
+
vErrors.push(err14);
|
|
1499
1510
|
}
|
|
1500
1511
|
errors++;
|
|
1501
1512
|
}
|
|
1502
1513
|
}
|
|
1503
1514
|
} else {
|
|
1504
|
-
const
|
|
1515
|
+
const err15 = { instancePath, schemaPath: "#/type", keyword: "type", params: { type: "object" }, message: "must be object" };
|
|
1505
1516
|
if (vErrors === null) {
|
|
1506
|
-
vErrors = [
|
|
1517
|
+
vErrors = [err15];
|
|
1507
1518
|
} else {
|
|
1508
|
-
vErrors.push(
|
|
1519
|
+
vErrors.push(err15);
|
|
1509
1520
|
}
|
|
1510
1521
|
errors++;
|
|
1511
1522
|
}
|
|
@@ -6565,6 +6576,7 @@ function validate10(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
6565
6576
|
|
|
6566
6577
|
// src/schema.ts
|
|
6567
6578
|
var COLORS = ["blue", "amber", "green", "violet", "rose", "slate", "coin"];
|
|
6579
|
+
var ICON_NAMES = Object.keys(_chunkV34DCH34cjs.ICONS);
|
|
6568
6580
|
var EVENT_TYPES = ["edge", "action", "swap", "strip", "commit", "branch", "now", "mark", "span", "leaf", "node", "line", "seal", "open", "pick", "stamp"];
|
|
6569
6581
|
var ABSENT = "#/definitions/absent/not";
|
|
6570
6582
|
var ABSENT_KINDS = {
|
|
@@ -6594,7 +6606,16 @@ var WIRED_EVENTS = ["edge", "action"];
|
|
|
6594
6606
|
var DURATION = /^\^\[0-9\]\+\(\\\.\[0-9\]\+\)\?\(([a-z|]+)\)\$$/u;
|
|
6595
6607
|
var RATIO = /%\)\$$/u;
|
|
6596
6608
|
var escape = (key2) => key2.replaceAll("~", "~0").replaceAll("/", "~1");
|
|
6609
|
+
function valueAt(input, pointer) {
|
|
6610
|
+
let value2 = input;
|
|
6611
|
+
for (const raw of pointer.split("/").slice(1)) {
|
|
6612
|
+
if (typeof value2 !== "object" || value2 === null) return void 0;
|
|
6613
|
+
value2 = value2[raw.replaceAll("~1", "/").replaceAll("~0", "~")];
|
|
6614
|
+
}
|
|
6615
|
+
return value2;
|
|
6616
|
+
}
|
|
6597
6617
|
var URL_RULE = "#/definitions/url/pattern";
|
|
6618
|
+
var ICON_RULE = "#/definitions/icon/enum";
|
|
6598
6619
|
var HEX = /^\^\[0-9a-f\]\{(\d+),(\d+)\}\$$/u;
|
|
6599
6620
|
function forbiddenOf(pattern) {
|
|
6600
6621
|
const inside = _optionalChain([/^\^\[\^(.+)\]\+\$$/u, 'access', _6 => _6.exec, 'call', _7 => _7(pattern), 'optionalAccess', _8 => _8[1]]);
|
|
@@ -6605,7 +6626,7 @@ function forbiddenOf(pattern) {
|
|
|
6605
6626
|
var branchesOf = (anyOf, errors) => errors.filter(
|
|
6606
6627
|
(error) => error !== anyOf && error.schemaPath.startsWith(`${anyOf.schemaPath}/`) && (error.instancePath === anyOf.instancePath || error.instancePath.startsWith(`${anyOf.instancePath}/`))
|
|
6607
6628
|
);
|
|
6608
|
-
function toFieldError(error, errors, m) {
|
|
6629
|
+
function toFieldError(error, errors, m, input) {
|
|
6609
6630
|
const params = error.params;
|
|
6610
6631
|
const at = error.instancePath;
|
|
6611
6632
|
switch (error.keyword) {
|
|
@@ -6638,8 +6659,12 @@ function toFieldError(error, errors, m) {
|
|
|
6638
6659
|
const tag = String(params.tag);
|
|
6639
6660
|
return { pointer: `${at}/${escape(tag)}`, message: m.discriminator(tag, EVENT_TYPES) };
|
|
6640
6661
|
}
|
|
6641
|
-
case "enum":
|
|
6662
|
+
case "enum": {
|
|
6663
|
+
const written = error.schemaPath === ICON_RULE ? valueAt(input, at) : void 0;
|
|
6664
|
+
const near = typeof written === "string" ? nearest(written, ICON_NAMES) : void 0;
|
|
6665
|
+
if (typeof written === "string" && near !== void 0) return { pointer: at, message: m.unknownIcon(written, near) };
|
|
6642
6666
|
return { pointer: at, message: m.enum(params.allowedValues.map(String)) };
|
|
6667
|
+
}
|
|
6643
6668
|
case "type":
|
|
6644
6669
|
return { pointer: at, message: m.type(String(params.type)) };
|
|
6645
6670
|
case "minLength":
|
|
@@ -6675,12 +6700,16 @@ function validateDiagram(input, options = {}) {
|
|
|
6675
6700
|
const all = _nullishCoalesce(validate_diagram_default.errors, () => ( []));
|
|
6676
6701
|
const inBranch = new Set(all.filter((error) => error.keyword === "anyOf").flatMap((anyOf) => branchesOf(anyOf, all)));
|
|
6677
6702
|
const m = FIELD_MESSAGES[_nullishCoalesce(options.lang, () => ( "ja"))];
|
|
6678
|
-
const errors = all.filter((error) => error.keyword !== "if" && !inBranch.has(error)).map((error) => toFieldError(error, all, m));
|
|
6703
|
+
const errors = all.filter((error) => error.keyword !== "if" && !inBranch.has(error)).map((error) => toFieldError(error, all, m, input));
|
|
6679
6704
|
return { ok: false, errors };
|
|
6680
6705
|
}
|
|
6681
6706
|
|
|
6682
6707
|
// src/messages.ts
|
|
6683
6708
|
var list = (words) => words.join(" / ");
|
|
6709
|
+
var withNear = (value2, near, none) => {
|
|
6710
|
+
const name2 = nearest(value2, ICON_NAMES);
|
|
6711
|
+
return name2 === void 0 ? none : near(name2);
|
|
6712
|
+
};
|
|
6684
6713
|
var ja2 = () => {
|
|
6685
6714
|
const shapes = {
|
|
6686
6715
|
sequence: "sequence <\u984C>",
|
|
@@ -6741,6 +6770,7 @@ var ja2 = () => {
|
|
|
6741
6770
|
attrTwice: (key2) => `${key2} \u306F 1 \u3064\u306E\u884C\u306B 1 \u3064\u307E\u3067`,
|
|
6742
6771
|
badAttr: (key2, allowed) => `${key2} \u306F\u3053\u306E\u884C\u306B\u66F8\u3051\u306A\u3044\u5C5E\u6027\u3002\u66F8\u3051\u308B\u306E\u306F ${list(allowed)}`,
|
|
6743
6772
|
badColor: `color \u306F ${list(COLORS)} \u306E\u3069\u308C\u304B`,
|
|
6773
|
+
badIcon: (value2) => withNear(value2, (near) => `${value2} \u3068\u3044\u3046 icon \u306F\u7121\u3044\u3002\u8FD1\u3044\u540D\u524D\u306F ${near}`, `icon \u306F ${list(ICON_NAMES)} \u306E\u3069\u308C\u304B`),
|
|
6744
6774
|
badView: `view \u306F ${list(_chunkCLS6JVKKcjs.VIEWS)} \u306E\u3069\u308C\u304B`,
|
|
6745
6775
|
badCarry: `carry \u306F ${list(_chunkCLS6JVKKcjs.CARRIES)} \u306E\u3069\u308C\u304B\u3002\u672D\u306F tag: <\u5024> \u3067\u66F8\u304F`,
|
|
6746
6776
|
badSide: `side \u306F ${list(_chunkCLS6JVKKcjs.SIDES)} \u306E\u3069\u308C\u304B`,
|
|
@@ -6879,6 +6909,7 @@ var en2 = () => {
|
|
|
6879
6909
|
attrTwice: (key2) => `Write ${key2} only once on a line`,
|
|
6880
6910
|
badAttr: (key2, allowed) => `${key2} cannot be written on this line. Write ${list(allowed)}`,
|
|
6881
6911
|
badColor: `color is one of ${list(COLORS)}`,
|
|
6912
|
+
badIcon: (value2) => withNear(value2, (near) => `There is no icon named ${value2}. The closest is ${near}`, `icon is one of ${list(ICON_NAMES)}`),
|
|
6882
6913
|
badView: `view is one of ${list(_chunkCLS6JVKKcjs.VIEWS)}`,
|
|
6883
6914
|
badCarry: `carry is one of ${list(_chunkCLS6JVKKcjs.CARRIES)}. Write a tag as tag: <value>`,
|
|
6884
6915
|
badSide: `side is one of ${list(_chunkCLS6JVKKcjs.SIDES)}`,
|
|
@@ -7138,12 +7169,13 @@ function readDeclared(source, word, allowed, m) {
|
|
|
7138
7169
|
function lookOf(source, attrs2, m) {
|
|
7139
7170
|
const color = attrs2.get("color");
|
|
7140
7171
|
if (color && !isOneOf(COLORS, color.value)) throw fail(source, color.at, m.badColor);
|
|
7172
|
+
const icon = attrs2.get("icon");
|
|
7173
|
+
if (icon && !ICON_NAMES.includes(icon.value)) throw fail(source, icon.at, m.badIcon(icon.value));
|
|
7141
7174
|
const note = _optionalChain([attrs2, 'access', _12 => _12.get, 'call', _13 => _13("note"), 'optionalAccess', _14 => _14.value]);
|
|
7142
|
-
const icon = _optionalChain([attrs2, 'access', _15 => _15.get, 'call', _16 => _16("icon"), 'optionalAccess', _17 => _17.value]);
|
|
7143
7175
|
return {
|
|
7144
7176
|
...note !== void 0 ? { note } : {},
|
|
7145
7177
|
...color ? { color: color.value } : {},
|
|
7146
|
-
...icon
|
|
7178
|
+
...icon ? { icon: icon.value } : {}
|
|
7147
7179
|
};
|
|
7148
7180
|
}
|
|
7149
7181
|
function oldForm(text, inStep) {
|
|
@@ -7172,7 +7204,7 @@ function parseLines(lines, m) {
|
|
|
7172
7204
|
const title = titled.value;
|
|
7173
7205
|
const shown2 = titled.rest < head.text.length ? readAttrs(head, titled.rest, _chunkCLS6JVKKcjs.ATTRS.diagram, m).get("view") : void 0;
|
|
7174
7206
|
if (shown2 && !isOneOf(_chunkCLS6JVKKcjs.VIEWS, shown2.value)) throw fail(head, shown2.at, m.badView);
|
|
7175
|
-
const view = _optionalChain([shown2, 'optionalAccess',
|
|
7207
|
+
const view = _optionalChain([shown2, 'optionalAccess', _15 => _15.value]);
|
|
7176
7208
|
const isState = kind === "state";
|
|
7177
7209
|
const isGit = kind === "git";
|
|
7178
7210
|
const isTime = kind === "time";
|
|
@@ -7450,7 +7482,7 @@ function parseLines(lines, m) {
|
|
|
7450
7482
|
if (firstBox && !zoom) throw fail(firstBox, 0, m.boxNeedsZoom);
|
|
7451
7483
|
}
|
|
7452
7484
|
function countOf() {
|
|
7453
|
-
return _nullishCoalesce(_optionalChain([scale, 'optionalAccess',
|
|
7485
|
+
return _nullishCoalesce(_optionalChain([scale, 'optionalAccess', _16 => _16.count]), () => ( 0));
|
|
7454
7486
|
}
|
|
7455
7487
|
function unitAt(source, at, text) {
|
|
7456
7488
|
if (!NUMBER.test(text) || Number(text) >= countOf()) throw fail(source, at, m.badUnit(text, countOf()));
|
|
@@ -7458,8 +7490,8 @@ function parseLines(lines, m) {
|
|
|
7458
7490
|
}
|
|
7459
7491
|
function rangeAt(source, at, text) {
|
|
7460
7492
|
const found = RANGE.exec(text);
|
|
7461
|
-
const from = Number(_optionalChain([found, 'optionalAccess',
|
|
7462
|
-
const to = Number(_nullishCoalesce(_optionalChain([found, 'optionalAccess',
|
|
7493
|
+
const from = Number(_optionalChain([found, 'optionalAccess', _17 => _17[1]]));
|
|
7494
|
+
const to = Number(_nullishCoalesce(_optionalChain([found, 'optionalAccess', _18 => _18[2]]), () => ( _optionalChain([found, 'optionalAccess', _19 => _19[1]]))));
|
|
7463
7495
|
if (!found || from > to || to >= countOf()) throw fail(source, at, m.badUnit(text, countOf()));
|
|
7464
7496
|
return { from, to };
|
|
7465
7497
|
}
|
|
@@ -7468,7 +7500,7 @@ function parseLines(lines, m) {
|
|
|
7468
7500
|
if (scale) throw fail(source, 0, m.timeTwice("scale"));
|
|
7469
7501
|
const text = source.text;
|
|
7470
7502
|
const found = SCALE.exec(text);
|
|
7471
|
-
const at = (k) => _nullishCoalesce(_optionalChain([found, 'optionalAccess',
|
|
7503
|
+
const at = (k) => _nullishCoalesce(_optionalChain([found, 'optionalAccess', _20 => _20.indices, 'optionalAccess', _21 => _21[k], 'optionalAccess', _22 => _22[0]]), () => ( 0));
|
|
7472
7504
|
if (!found) throw fail(source, 0, m.scaleShape);
|
|
7473
7505
|
const rest2 = skipSpaces(text, found[0].length);
|
|
7474
7506
|
if (rest2 < text.length && text[rest2] !== "[") throw fail(source, rest2, m.scaleShape);
|
|
@@ -7489,7 +7521,7 @@ function parseLines(lines, m) {
|
|
|
7489
7521
|
const rest2 = skipSpaces(text, found[0].length);
|
|
7490
7522
|
if (rest2 < text.length && text[rest2] !== "[") throw fail(source, rest2, m.periodShape);
|
|
7491
7523
|
const length = _nullishCoalesce(found[2], () => ( ""));
|
|
7492
|
-
if (!COUNT.test(length)) throw fail(source, _nullishCoalesce(_optionalChain([found, 'access',
|
|
7524
|
+
if (!COUNT.test(length)) throw fail(source, _nullishCoalesce(_optionalChain([found, 'access', _23 => _23.indices, 'optionalAccess', _24 => _24[2], 'optionalAccess', _25 => _25[0]]), () => ( 0)), m.badCount("period"));
|
|
7493
7525
|
const first = rest2 < text.length ? readAttrs(source, rest2, _chunkCLS6JVKKcjs.ATTRS.period, m).get("from") : void 0;
|
|
7494
7526
|
if (first && !NUMBER.test(first.value)) throw fail(source, first.at, m.periodShape);
|
|
7495
7527
|
period = { name: _nullishCoalesce(found[1], () => ( "")), length: Number(length), ...first ? { from: Number(first.value) } : {} };
|
|
@@ -7515,11 +7547,11 @@ function parseLines(lines, m) {
|
|
|
7515
7547
|
function readPoint(source) {
|
|
7516
7548
|
beforeSteps(source);
|
|
7517
7549
|
const found = POINT.exec(source.text);
|
|
7518
|
-
const id = _optionalChain([found, 'optionalAccess',
|
|
7519
|
-
const unit = _optionalChain([found, 'optionalAccess',
|
|
7550
|
+
const id = _optionalChain([found, 'optionalAccess', _26 => _26[1]]);
|
|
7551
|
+
const unit = _optionalChain([found, 'optionalAccess', _27 => _27[2]]);
|
|
7520
7552
|
if (!found || id === void 0 || unit === void 0) throw fail(source, 0, m.pointShape);
|
|
7521
|
-
const idAt = _nullishCoalesce(_optionalChain([found, 'access',
|
|
7522
|
-
const unitStart = _nullishCoalesce(_optionalChain([found, 'access',
|
|
7553
|
+
const idAt = _nullishCoalesce(_optionalChain([found, 'access', _28 => _28.indices, 'optionalAccess', _29 => _29[1], 'optionalAccess', _30 => _30[0]]), () => ( 0));
|
|
7554
|
+
const unitStart = _nullishCoalesce(_optionalChain([found, 'access', _31 => _31.indices, 'optionalAccess', _32 => _32[2], 'optionalAccess', _33 => _33[0]]), () => ( 0));
|
|
7523
7555
|
if (!ID.test(id)) throw fail(source, idAt, m.badId(id));
|
|
7524
7556
|
notReserved(source, id, idAt);
|
|
7525
7557
|
if (rows.some((row) => row.id === id)) throw fail(source, idAt, m.duplicate(id));
|
|
@@ -7534,9 +7566,9 @@ function parseLines(lines, m) {
|
|
|
7534
7566
|
beforeSteps(source);
|
|
7535
7567
|
if (zoom) throw fail(source, 0, m.timeTwice("zoom"));
|
|
7536
7568
|
const found = ZOOM.exec(source.text);
|
|
7537
|
-
const range2 = _optionalChain([found, 'optionalAccess',
|
|
7569
|
+
const range2 = _optionalChain([found, 'optionalAccess', _34 => _34[1]]);
|
|
7538
7570
|
if (!found || range2 === void 0) throw fail(source, 0, m.zoomShape);
|
|
7539
|
-
const rangeStart = _nullishCoalesce(_optionalChain([found, 'access',
|
|
7571
|
+
const rangeStart = _nullishCoalesce(_optionalChain([found, 'access', _35 => _35.indices, 'optionalAccess', _36 => _36[1], 'optionalAccess', _37 => _37[0]]), () => ( 0));
|
|
7540
7572
|
const placed = { from: 0, to: 0 };
|
|
7541
7573
|
zoom = placed;
|
|
7542
7574
|
pending.push(() => {
|
|
@@ -7545,9 +7577,9 @@ function parseLines(lines, m) {
|
|
|
7545
7577
|
}
|
|
7546
7578
|
function readNow(source) {
|
|
7547
7579
|
const found = NOW_LINE.exec(source.text);
|
|
7548
|
-
const unit = _optionalChain([found, 'optionalAccess',
|
|
7580
|
+
const unit = _optionalChain([found, 'optionalAccess', _38 => _38[1]]);
|
|
7549
7581
|
if (!found || unit === void 0) throw fail(source, 0, m.nowShape);
|
|
7550
|
-
const at = _nullishCoalesce(_optionalChain([found, 'access',
|
|
7582
|
+
const at = _nullishCoalesce(_optionalChain([found, 'access', _39 => _39.indices, 'optionalAccess', _40 => _40[1], 'optionalAccess', _41 => _41[0]]), () => ( 0));
|
|
7551
7583
|
const to = unitAt(source, at, unit);
|
|
7552
7584
|
if (to + 1 <= needle) throw fail(source, at, m.nowBack(unit, needle - 1));
|
|
7553
7585
|
needle = to + 1;
|
|
@@ -7556,11 +7588,11 @@ function parseLines(lines, m) {
|
|
|
7556
7588
|
function readMark(source) {
|
|
7557
7589
|
const text = source.text;
|
|
7558
7590
|
const found = MARK.exec(text);
|
|
7559
|
-
const row = _optionalChain([found, 'optionalAccess',
|
|
7560
|
-
const range2 = _optionalChain([found, 'optionalAccess',
|
|
7591
|
+
const row = _optionalChain([found, 'optionalAccess', _42 => _42[1]]);
|
|
7592
|
+
const range2 = _optionalChain([found, 'optionalAccess', _43 => _43[2]]);
|
|
7561
7593
|
if (!found || row === void 0 || range2 === void 0) throw fail(source, 0, m.markShape);
|
|
7562
|
-
if (!rows.some((r) => r.id === row)) throw fail(source, _nullishCoalesce(_optionalChain([found, 'access',
|
|
7563
|
-
const { from, to } = rangeAt(source, _nullishCoalesce(_optionalChain([found, 'access',
|
|
7594
|
+
if (!rows.some((r) => r.id === row)) throw fail(source, _nullishCoalesce(_optionalChain([found, 'access', _44 => _44.indices, 'optionalAccess', _45 => _45[1], 'optionalAccess', _46 => _46[0]]), () => ( 0)), m.undeclaredRow(row));
|
|
7595
|
+
const { from, to } = rangeAt(source, _nullishCoalesce(_optionalChain([found, 'access', _47 => _47.indices, 'optionalAccess', _48 => _48[2], 'optionalAccess', _49 => _49[0]]), () => ( 0)), range2);
|
|
7564
7596
|
const rest2 = skipSpaces(text, found[0].length);
|
|
7565
7597
|
if (rest2 >= text.length || text[rest2] !== "[") throw fail(source, rest2, m.markShape);
|
|
7566
7598
|
const color = readAttrs(source, rest2, _chunkCLS6JVKKcjs.ATTRS.mark, m).get("color");
|
|
@@ -7570,9 +7602,9 @@ function parseLines(lines, m) {
|
|
|
7570
7602
|
}
|
|
7571
7603
|
function readSpan(source) {
|
|
7572
7604
|
const found = SPAN.exec(source.text);
|
|
7573
|
-
const range2 = _optionalChain([found, 'optionalAccess',
|
|
7605
|
+
const range2 = _optionalChain([found, 'optionalAccess', _50 => _50[1]]);
|
|
7574
7606
|
if (!found || range2 === void 0) throw fail(source, 0, m.spanShape);
|
|
7575
|
-
const { from, to } = rangeAt(source, _nullishCoalesce(_optionalChain([found, 'access',
|
|
7607
|
+
const { from, to } = rangeAt(source, _nullishCoalesce(_optionalChain([found, 'access', _51 => _51.indices, 'optionalAccess', _52 => _52[1], 'optionalAccess', _53 => _53[0]]), () => ( 0)), range2);
|
|
7576
7608
|
const named = readName(source, found[0].length, m);
|
|
7577
7609
|
if (named.value === "") throw fail(source, 0, m.spanShape);
|
|
7578
7610
|
const attrs2 = named.rest < source.text.length ? readAttrs(source, named.rest, _chunkCLS6JVKKcjs.ATTRS.span, m) : /* @__PURE__ */ new Map();
|
|
@@ -7584,9 +7616,9 @@ function parseLines(lines, m) {
|
|
|
7584
7616
|
}
|
|
7585
7617
|
function readTimeNote(source) {
|
|
7586
7618
|
const found = /^note\s+([^\s:]+)\s*:/du.exec(source.text);
|
|
7587
|
-
const id = _optionalChain([found, 'optionalAccess',
|
|
7619
|
+
const id = _optionalChain([found, 'optionalAccess', _54 => _54[1]]);
|
|
7588
7620
|
if (!found || id === void 0) throw fail(source, 0, m.noteShape);
|
|
7589
|
-
const idAt = _nullishCoalesce(_optionalChain([found, 'access',
|
|
7621
|
+
const idAt = _nullishCoalesce(_optionalChain([found, 'access', _55 => _55.indices, 'optionalAccess', _56 => _56[1], 'optionalAccess', _57 => _57[0]]), () => ( 0));
|
|
7590
7622
|
const isPoint = points.some((point) => point.id === id);
|
|
7591
7623
|
if (!isPoint && !boxes.some((box) => box.id === id)) throw fail(source, idAt, m.undeclaredNote(id));
|
|
7592
7624
|
const named = readName(source, found[0].length, m);
|
|
@@ -7645,16 +7677,16 @@ function parseLines(lines, m) {
|
|
|
7645
7677
|
if (declared.name !== void 0) throw fail(source, 0, m.branchShape);
|
|
7646
7678
|
notReserved(source, declared.id, declared.idAt);
|
|
7647
7679
|
declare(source, declared.id, declared.idAt);
|
|
7648
|
-
const note = _optionalChain([declared, 'access',
|
|
7680
|
+
const note = _optionalChain([declared, 'access', _58 => _58.attrs, 'access', _59 => _59.get, 'call', _60 => _60("note"), 'optionalAccess', _61 => _61.value]);
|
|
7649
7681
|
branches.push({ id: declared.id, ...note !== void 0 ? { note } : {} });
|
|
7650
7682
|
tips.set(declared.id, null);
|
|
7651
7683
|
}
|
|
7652
7684
|
function readCommit(source) {
|
|
7653
7685
|
const text = source.text;
|
|
7654
7686
|
const found = COMMIT.exec(text);
|
|
7655
|
-
const at = (k) => _nullishCoalesce(_optionalChain([found, 'optionalAccess',
|
|
7656
|
-
const id = _optionalChain([found, 'optionalAccess',
|
|
7657
|
-
const on = _optionalChain([found, 'optionalAccess',
|
|
7687
|
+
const at = (k) => _nullishCoalesce(_optionalChain([found, 'optionalAccess', _62 => _62.indices, 'optionalAccess', _63 => _63[k], 'optionalAccess', _64 => _64[0]]), () => ( 0));
|
|
7688
|
+
const id = _optionalChain([found, 'optionalAccess', _65 => _65[1]]);
|
|
7689
|
+
const on = _optionalChain([found, 'optionalAccess', _66 => _66[2]]);
|
|
7658
7690
|
if (!found || id === void 0 || on === void 0) throw fail(source, 0, m.commitShape);
|
|
7659
7691
|
const rest2 = skipSpaces(text, found[0].length);
|
|
7660
7692
|
if (rest2 < text.length && text[rest2] !== "[") throw fail(source, rest2, m.commitShape);
|
|
@@ -7667,7 +7699,7 @@ function parseLines(lines, m) {
|
|
|
7667
7699
|
const attrs2 = rest2 < text.length ? readAttrs(source, rest2, _chunkCLS6JVKKcjs.ATTRS.commit, m) : /* @__PURE__ */ new Map();
|
|
7668
7700
|
const hash = attrs2.get("hash");
|
|
7669
7701
|
if (hash && !HASH.test(hash.value)) throw fail(source, hash.at, m.badHash);
|
|
7670
|
-
const note = _optionalChain([attrs2, 'access',
|
|
7702
|
+
const note = _optionalChain([attrs2, 'access', _67 => _67.get, 'call', _68 => _68("note"), 'optionalAccess', _69 => _69.value]);
|
|
7671
7703
|
commits.add(id);
|
|
7672
7704
|
if (copy === void 0) tips.set(branch, id);
|
|
7673
7705
|
return {
|
|
@@ -7688,19 +7720,19 @@ function parseLines(lines, m) {
|
|
|
7688
7720
|
}
|
|
7689
7721
|
function readCut(source) {
|
|
7690
7722
|
const found = CUT.exec(source.text);
|
|
7691
|
-
const branch = _optionalChain([found, 'optionalAccess',
|
|
7692
|
-
const from = _optionalChain([found, 'optionalAccess',
|
|
7723
|
+
const branch = _optionalChain([found, 'optionalAccess', _70 => _70[1]]);
|
|
7724
|
+
const from = _optionalChain([found, 'optionalAccess', _71 => _71[2]]);
|
|
7693
7725
|
if (!found || branch === void 0 || from === void 0) throw fail(source, 0, m.fromShape);
|
|
7694
|
-
commitAt(source, from, _nullishCoalesce(_optionalChain([found, 'access',
|
|
7726
|
+
commitAt(source, from, _nullishCoalesce(_optionalChain([found, 'access', _72 => _72.indices, 'optionalAccess', _73 => _73[2], 'optionalAccess', _74 => _74[0]]), () => ( 0)));
|
|
7695
7727
|
tips.set(branch, from);
|
|
7696
7728
|
return { type: "branch", branch, from };
|
|
7697
7729
|
}
|
|
7698
7730
|
function readLeaf(source) {
|
|
7699
7731
|
const text = source.text;
|
|
7700
7732
|
const found = LEAF.exec(text);
|
|
7701
|
-
const id = _optionalChain([found, 'optionalAccess',
|
|
7733
|
+
const id = _optionalChain([found, 'optionalAccess', _75 => _75[1]]);
|
|
7702
7734
|
if (!found || id === void 0) throw fail(source, 0, m.leafShape);
|
|
7703
|
-
const idAt = _nullishCoalesce(_optionalChain([found, 'access',
|
|
7735
|
+
const idAt = _nullishCoalesce(_optionalChain([found, 'access', _76 => _76.indices, 'optionalAccess', _77 => _77[1], 'optionalAccess', _78 => _78[0]]), () => ( 0));
|
|
7704
7736
|
if (!ID.test(id)) throw fail(source, idAt, m.badId(id));
|
|
7705
7737
|
declare(source, id, idAt);
|
|
7706
7738
|
trees.set(id, { source, at: idAt });
|
|
@@ -7712,9 +7744,9 @@ function parseLines(lines, m) {
|
|
|
7712
7744
|
function readNode(source) {
|
|
7713
7745
|
const text = source.text;
|
|
7714
7746
|
const found = NODE.exec(text);
|
|
7715
|
-
const id = _optionalChain([found, 'optionalAccess',
|
|
7747
|
+
const id = _optionalChain([found, 'optionalAccess', _79 => _79[1]]);
|
|
7716
7748
|
if (!found || id === void 0) throw fail(source, 0, m.nodeShape);
|
|
7717
|
-
const idAt = _nullishCoalesce(_optionalChain([found, 'access',
|
|
7749
|
+
const idAt = _nullishCoalesce(_optionalChain([found, 'access', _80 => _80.indices, 'optionalAccess', _81 => _81[1], 'optionalAccess', _82 => _82[0]]), () => ( 0));
|
|
7718
7750
|
if (!ID.test(id)) throw fail(source, idAt, m.badId(id));
|
|
7719
7751
|
declare(source, id, idAt);
|
|
7720
7752
|
const children = [];
|
|
@@ -7740,7 +7772,7 @@ function parseLines(lines, m) {
|
|
|
7740
7772
|
if (at >= source.text.length) return void 0;
|
|
7741
7773
|
const hash = readAttrs(source, at, keys, m).get("hash");
|
|
7742
7774
|
if (hash && !HASH.test(hash.value)) throw fail(source, hash.at, m.badHash);
|
|
7743
|
-
return _optionalChain([hash, 'optionalAccess',
|
|
7775
|
+
return _optionalChain([hash, 'optionalAccess', _83 => _83.value]);
|
|
7744
7776
|
}
|
|
7745
7777
|
function namesAt(source, from, to, shape) {
|
|
7746
7778
|
const text = source.text;
|
|
@@ -7773,9 +7805,9 @@ function parseLines(lines, m) {
|
|
|
7773
7805
|
}
|
|
7774
7806
|
function readOrder(source) {
|
|
7775
7807
|
const found = ORDER.exec(source.text);
|
|
7776
|
-
const lane = _optionalChain([found, 'optionalAccess',
|
|
7808
|
+
const lane = _optionalChain([found, 'optionalAccess', _84 => _84[1]]);
|
|
7777
7809
|
if (!found || lane === void 0) throw fail(source, 0, m.lineShape);
|
|
7778
|
-
const at = _nullishCoalesce(_optionalChain([found, 'access',
|
|
7810
|
+
const at = _nullishCoalesce(_optionalChain([found, 'access', _85 => _85.indices, 'optionalAccess', _86 => _86[1], 'optionalAccess', _87 => _87[0]]), () => ( 0));
|
|
7779
7811
|
const box = boxAt(source, lane, at);
|
|
7780
7812
|
if (sealed.has(box)) throw fail(source, at, m.lineOnSealed(box));
|
|
7781
7813
|
const chips = namesAt(source, found[0].length, source.text.length, m.lineShape);
|
|
@@ -7790,9 +7822,9 @@ function parseLines(lines, m) {
|
|
|
7790
7822
|
}
|
|
7791
7823
|
function readOnLane(source, word) {
|
|
7792
7824
|
const found = ON_LANE.exec(source.text);
|
|
7793
|
-
const lane = _optionalChain([found, 'optionalAccess',
|
|
7825
|
+
const lane = _optionalChain([found, 'optionalAccess', _88 => _88[1]]);
|
|
7794
7826
|
if (!found || lane === void 0) throw fail(source, 0, m.laneShape(word));
|
|
7795
|
-
const at = _nullishCoalesce(_optionalChain([found, 'access',
|
|
7827
|
+
const at = _nullishCoalesce(_optionalChain([found, 'access', _89 => _89.indices, 'optionalAccess', _90 => _90[1], 'optionalAccess', _91 => _91[0]]), () => ( 0));
|
|
7796
7828
|
const box = boxAt(source, lane, at);
|
|
7797
7829
|
if (word === "seal") {
|
|
7798
7830
|
if (sealed.has(box)) throw fail(source, at, m.sealTwice(box));
|
|
@@ -7803,9 +7835,9 @@ function parseLines(lines, m) {
|
|
|
7803
7835
|
}
|
|
7804
7836
|
function readStamp(source) {
|
|
7805
7837
|
const found = STAMP.exec(source.text);
|
|
7806
|
-
const lane = _optionalChain([found, 'optionalAccess',
|
|
7838
|
+
const lane = _optionalChain([found, 'optionalAccess', _92 => _92[1]]);
|
|
7807
7839
|
if (!found || lane === void 0) throw fail(source, 0, m.stampShape);
|
|
7808
|
-
const box = boxAt(source, lane, _nullishCoalesce(_optionalChain([found, 'access',
|
|
7840
|
+
const box = boxAt(source, lane, _nullishCoalesce(_optionalChain([found, 'access', _93 => _93.indices, 'optionalAccess', _94 => _94[1], 'optionalAccess', _95 => _95[0]]), () => ( 0)));
|
|
7809
7841
|
const named = readName(source, found[0].length, m);
|
|
7810
7842
|
if (named.value === "" || named.rest < source.text.length) throw fail(source, 0, m.stampShape);
|
|
7811
7843
|
return { type: "stamp", box, text: named.value };
|
|
@@ -7895,14 +7927,14 @@ function parseLines(lines, m) {
|
|
|
7895
7927
|
}
|
|
7896
7928
|
function readOnBox(source, word, shape) {
|
|
7897
7929
|
const found = new RegExp(`^${word}\\s+([^\\s:]+)\\s*:\\s*(.*)$`, "du").exec(source.text);
|
|
7898
|
-
const idAt = _optionalChain([found, 'optionalAccess',
|
|
7930
|
+
const idAt = _optionalChain([found, 'optionalAccess', _96 => _96.indices, 'optionalAccess', _97 => _97[1], 'optionalAccess', _98 => _98[0]]);
|
|
7899
7931
|
if (!found || idAt === void 0 || (_nullishCoalesce(found[2], () => ( ""))) === "") throw fail(source, 0, shape);
|
|
7900
7932
|
return { box: boxAt(source, _nullishCoalesce(found[1], () => ( "")), idAt), text: _nullishCoalesce(found[2], () => ( "")) };
|
|
7901
7933
|
}
|
|
7902
7934
|
function readLine(source, edge2) {
|
|
7903
7935
|
const text = source.text;
|
|
7904
|
-
const from = endAt(source, _nullishCoalesce(edge2[1], () => ( "")), _nullishCoalesce(_optionalChain([edge2, 'access',
|
|
7905
|
-
const to = endAt(source, _nullishCoalesce(edge2[2], () => ( "")), _nullishCoalesce(_optionalChain([edge2, 'access',
|
|
7936
|
+
const from = endAt(source, _nullishCoalesce(edge2[1], () => ( "")), _nullishCoalesce(_optionalChain([edge2, 'access', _99 => _99.indices, 'optionalAccess', _100 => _100[1], 'optionalAccess', _101 => _101[0]]), () => ( 0)), "from");
|
|
7937
|
+
const to = endAt(source, _nullishCoalesce(edge2[2], () => ( "")), _nullishCoalesce(_optionalChain([edge2, 'access', _102 => _102.indices, 'optionalAccess', _103 => _103[2], 'optionalAccess', _104 => _104[0]]), () => ( 0)), "to");
|
|
7906
7938
|
const at = skipSpaces(text, edge2[0].length);
|
|
7907
7939
|
if (text[at] !== ":") return { from, to, at };
|
|
7908
7940
|
const named = readName(source, at + 1, m);
|
|
@@ -7992,7 +8024,7 @@ function parseLines(lines, m) {
|
|
|
7992
8024
|
at = named.rest;
|
|
7993
8025
|
}
|
|
7994
8026
|
if (at < text.length && text[at] !== "[") throw fail(source, at, m.stripNeedsValue);
|
|
7995
|
-
const tag = at < text.length ? _optionalChain([readAttrs, 'call',
|
|
8027
|
+
const tag = at < text.length ? _optionalChain([readAttrs, 'call', _105 => _105(source, at, _chunkCLS6JVKKcjs.ATTRS.set, m), 'access', _106 => _106.get, 'call', _107 => _107("tag"), 'optionalAccess', _108 => _108.value]) : void 0;
|
|
7996
8028
|
if (value2 === void 0 && tag === void 0) throw fail(source, 0, m.stripNeedsValue);
|
|
7997
8029
|
if (value2 !== void 0 && meters.some((meter) => meter.field === field2) && !RATIO2.test(value2)) throw fail(source, start, m.meterValue(field2));
|
|
7998
8030
|
return {
|
|
@@ -8084,13 +8116,13 @@ function itemLines(items) {
|
|
|
8084
8116
|
const rows = [];
|
|
8085
8117
|
for (const item of items) {
|
|
8086
8118
|
const row = rows.at(-1);
|
|
8087
|
-
if (row && item.label === void 0 && _optionalChain([row, 'access',
|
|
8119
|
+
if (row && item.label === void 0 && _optionalChain([row, 'access', _109 => _109[0], 'optionalAccess', _110 => _110.label]) === void 0 && _optionalChain([row, 'access', _111 => _111[0], 'optionalAccess', _112 => _112.color]) === item.color) row.push(item);
|
|
8088
8120
|
else rows.push([item]);
|
|
8089
8121
|
}
|
|
8090
8122
|
return rows.map(
|
|
8091
8123
|
(row) => `item ${row.map((item) => item.id).join(", ")}${attrs([
|
|
8092
|
-
["color", _optionalChain([row, 'access',
|
|
8093
|
-
["label", _optionalChain([row, 'access',
|
|
8124
|
+
["color", _optionalChain([row, 'access', _113 => _113[0], 'optionalAccess', _114 => _114.color])],
|
|
8125
|
+
["label", _optionalChain([row, 'access', _115 => _115[0], 'optionalAccess', _116 => _116.label])]
|
|
8094
8126
|
])}`
|
|
8095
8127
|
).join("\n");
|
|
8096
8128
|
}
|
|
@@ -8117,7 +8149,7 @@ function declarations(diagram) {
|
|
|
8117
8149
|
else runs.push({ ...b.region !== void 0 ? { region: b.region } : {}, boxes: [b] });
|
|
8118
8150
|
}
|
|
8119
8151
|
const opened = [...new Set(runs.flatMap((run) => run.region === void 0 ? [] : [run.region]))];
|
|
8120
|
-
const inOrder = opened.length === regions.length && opened.every((id, i) => _optionalChain([regions, 'access',
|
|
8152
|
+
const inOrder = opened.length === regions.length && opened.every((id, i) => _optionalChain([regions, 'access', _117 => _117[i], 'optionalAccess', _118 => _118.id]) === id);
|
|
8121
8153
|
const declared = /* @__PURE__ */ new Set();
|
|
8122
8154
|
const blocks = [];
|
|
8123
8155
|
if (!inOrder) {
|
|
@@ -8141,7 +8173,7 @@ end`);
|
|
|
8141
8173
|
return blocks;
|
|
8142
8174
|
}
|
|
8143
8175
|
function printNotation(diagram) {
|
|
8144
|
-
const branches = (_nullishCoalesce(_optionalChain([diagram, 'access',
|
|
8176
|
+
const branches = (_nullishCoalesce(_optionalChain([diagram, 'access', _119 => _119.git, 'optionalAccess', _120 => _120.branches]), () => ( []))).map((b) => `branch ${b.id}${attrs([["note", b.note]])}`);
|
|
8145
8177
|
const time = diagram.kind === "time";
|
|
8146
8178
|
const blocks = [
|
|
8147
8179
|
`${diagram.kind} ${name(diagram.title)}${attrs([["view", diagram.view]])}`,
|
|
@@ -8192,8 +8224,8 @@ function groupsOf(diagram) {
|
|
|
8192
8224
|
}
|
|
8193
8225
|
var vertical = (side2) => side2 === "left" || side2 === "right";
|
|
8194
8226
|
function placeBoxes(diagram, groups) {
|
|
8195
|
-
const columns =
|
|
8196
|
-
const edges =
|
|
8227
|
+
const columns = _chunkSUL4AJLIcjs.LOOK.architecture.columns;
|
|
8228
|
+
const edges = _chunkSUL4AJLIcjs.edgesOf.call(void 0, diagram).map((e) => e.edge);
|
|
8197
8229
|
const slots = /* @__PURE__ */ new Map();
|
|
8198
8230
|
groups.forEach((group, g) => {
|
|
8199
8231
|
const inGroup = new Set(group.members);
|
|
@@ -8225,7 +8257,7 @@ function placeBoxes(diagram, groups) {
|
|
|
8225
8257
|
const anchorOf = (id) => {
|
|
8226
8258
|
for (let i = 0; i < edges.length; i++) {
|
|
8227
8259
|
const edge2 = edges[i];
|
|
8228
|
-
const partner = _optionalChain([edge2, 'optionalAccess',
|
|
8260
|
+
const partner = _optionalChain([edge2, 'optionalAccess', _121 => _121.from]) === id ? edge2.to : _optionalChain([edge2, 'optionalAccess', _122 => _122.to]) === id ? edge2.from : void 0;
|
|
8229
8261
|
const slot = partner === void 0 ? void 0 : slots.get(partner);
|
|
8230
8262
|
if (slot && slot.group < g) return { order: i, col: slot.col };
|
|
8231
8263
|
}
|
|
@@ -8236,9 +8268,9 @@ function placeBoxes(diagram, groups) {
|
|
|
8236
8268
|
const rest = group.members.filter((id) => !slots.has(id));
|
|
8237
8269
|
if (rest.length === 0) break;
|
|
8238
8270
|
const anchored = rest.map((id) => ({ id, anchor: anchorOf(id) })).filter((a) => a.anchor !== void 0);
|
|
8239
|
-
anchored.sort((a, b) => (_nullishCoalesce(_optionalChain([a, 'access',
|
|
8271
|
+
anchored.sort((a, b) => (_nullishCoalesce(_optionalChain([a, 'access', _123 => _123.anchor, 'optionalAccess', _124 => _124.order]), () => ( 0))) - (_nullishCoalesce(_optionalChain([b, 'access', _125 => _125.anchor, 'optionalAccess', _126 => _126.order]), () => ( 0))));
|
|
8240
8272
|
const pick = _nullishCoalesce(anchored[0], () => ( { id: rest[0], anchor: void 0 }));
|
|
8241
|
-
const want = _nullishCoalesce(_optionalChain([pick, 'access',
|
|
8273
|
+
const want = _nullishCoalesce(_optionalChain([pick, 'access', _127 => _127.anchor, 'optionalAccess', _128 => _128.col]), () => ( 0));
|
|
8242
8274
|
if (placed === 0) dir = want >= (columns - 1) / 2 ? -1 : 1;
|
|
8243
8275
|
const [c, r] = free(want, 0) ? [want, 0] : near(want, 0);
|
|
8244
8276
|
put(pick.id, c, r);
|
|
@@ -8257,27 +8289,27 @@ function nameLines(name2) {
|
|
|
8257
8289
|
return [name2.slice(0, at), name2.slice(at + 1)];
|
|
8258
8290
|
}
|
|
8259
8291
|
function headerSize(region) {
|
|
8260
|
-
const { icon, nameY, line: line2, inset } =
|
|
8292
|
+
const { icon, nameY, line: line2, inset } = _chunkSUL4AJLIcjs.LOOK.region;
|
|
8261
8293
|
const lines = nameLines(region.name);
|
|
8262
|
-
const w = Math.max(icon, ...lines.map((l) =>
|
|
8263
|
-
const h = nameY - inset + (lines.length - 1) * line2 + (region.note ? line2 : 0) +
|
|
8294
|
+
const w = Math.max(icon, ...lines.map((l) => _chunkSUL4AJLIcjs.textWidth.call(void 0, l, _chunkSUL4AJLIcjs.TYPE.regionName)), _chunkSUL4AJLIcjs.textWidth.call(void 0, _nullishCoalesce(region.note, () => ( "")), _chunkSUL4AJLIcjs.TYPE.regionNote));
|
|
8295
|
+
const h = nameY - inset + (lines.length - 1) * line2 + (region.note ? line2 : 0) + _chunkSUL4AJLIcjs.LOOK.gap / 2;
|
|
8264
8296
|
return { w, h, lines };
|
|
8265
8297
|
}
|
|
8266
8298
|
function arrange(diagram, groups, slots, rooms) {
|
|
8267
|
-
const { box: B, region: R, architecture: A, margin, gap } =
|
|
8268
|
-
const colors =
|
|
8269
|
-
const regionColor =
|
|
8270
|
-
const edges =
|
|
8299
|
+
const { box: B, region: R, architecture: A, margin, gap } = _chunkSUL4AJLIcjs.LOOK;
|
|
8300
|
+
const colors = _chunkSUL4AJLIcjs.boxColors.call(void 0, diagram);
|
|
8301
|
+
const regionColor = _chunkSUL4AJLIcjs.regionColors.call(void 0, diagram);
|
|
8302
|
+
const edges = _chunkSUL4AJLIcjs.edgesOf.call(void 0, diagram);
|
|
8271
8303
|
const columnCount = Math.max(1, ...[...slots.values()].map((s) => s.col + 1));
|
|
8272
|
-
const carriedIn =
|
|
8273
|
-
const widths = new Map(diagram.boxes.map((b) => [b.id, Math.max(
|
|
8304
|
+
const carriedIn = _chunkSUL4AJLIcjs.slotRooms.call(void 0, diagram);
|
|
8305
|
+
const widths = new Map(diagram.boxes.map((b) => [b.id, Math.max(_chunkSUL4AJLIcjs.boxWidth.call(void 0, diagram, b.id, true), _chunkSUL4AJLIcjs.slotBoxWidth.call(void 0, carriedIn.get(b.id), b.icon !== void 0, B.padX))]));
|
|
8274
8306
|
const colW = Array.from({ length: columnCount }, (_, c) => Math.max(B.minW, ...[...slots].filter(([, s]) => s.col === c).map(([id]) => _nullishCoalesce(widths.get(id), () => ( B.minW)))));
|
|
8275
8307
|
const between = Array.from({ length: Math.max(0, columnCount - 1) }, () => A.columnGap);
|
|
8276
8308
|
for (const { edge: edge2 } of edges) {
|
|
8277
8309
|
const a = slots.get(edge2.from);
|
|
8278
8310
|
const b = slots.get(edge2.to);
|
|
8279
8311
|
if (!a || !b || edge2.label === void 0 || a.group !== b.group || a.row !== b.row || Math.abs(a.col - b.col) !== 1 || vertical(edge2.labelSide)) continue;
|
|
8280
|
-
const need =
|
|
8312
|
+
const need = _chunkSUL4AJLIcjs.textWidth.call(void 0, edge2.label, _chunkSUL4AJLIcjs.labelStyle.call(void 0, edge2.label)) + _chunkSUL4AJLIcjs.LOOK.label.padX * 2 + A.labelRoom * 2;
|
|
8281
8313
|
const i = Math.min(a.col, b.col);
|
|
8282
8314
|
if (need <= A.maxColumnGap) between[i] = Math.max(_nullishCoalesce(between[i], () => ( 0)), need);
|
|
8283
8315
|
}
|
|
@@ -8291,12 +8323,12 @@ function arrange(diagram, groups, slots, rooms) {
|
|
|
8291
8323
|
const slot = slots.get(id);
|
|
8292
8324
|
return slot ? [`${slot.group}:${slot.row}`] : [];
|
|
8293
8325
|
}));
|
|
8294
|
-
const loopRoom = (g, row) => loopRows.has(`${g}:${row}`) ?
|
|
8326
|
+
const loopRoom = (g, row) => loopRows.has(`${g}:${row}`) ? _chunkSUL4AJLIcjs.LOOP_ROOM : 0;
|
|
8295
8327
|
const boxes = [];
|
|
8296
8328
|
const bands = [];
|
|
8297
8329
|
let cursor = margin;
|
|
8298
8330
|
groups.forEach((group, g) => {
|
|
8299
|
-
const rows = Math.max(1, ...group.members.map((id) => (_nullishCoalesce(_optionalChain([slots, 'access',
|
|
8331
|
+
const rows = Math.max(1, ...group.members.map((id) => (_nullishCoalesce(_optionalChain([slots, 'access', _129 => _129.get, 'call', _130 => _130(id), 'optionalAccess', _131 => _131.row]), () => ( 0))) + 1));
|
|
8300
8332
|
const room = rooms[g];
|
|
8301
8333
|
const top = cursor + R.pad + room.top;
|
|
8302
8334
|
const rowTop = [0];
|
|
@@ -8309,9 +8341,9 @@ function arrange(diagram, groups, slots, rooms) {
|
|
|
8309
8341
|
const y = top + rowTop[slot.row];
|
|
8310
8342
|
boxes.push({
|
|
8311
8343
|
id,
|
|
8312
|
-
name: _nullishCoalesce(_optionalChain([source, 'optionalAccess',
|
|
8313
|
-
..._optionalChain([source, 'optionalAccess',
|
|
8314
|
-
..._optionalChain([source, 'optionalAccess',
|
|
8344
|
+
name: _nullishCoalesce(_optionalChain([source, 'optionalAccess', _132 => _132.name]), () => ( id)),
|
|
8345
|
+
..._optionalChain([source, 'optionalAccess', _133 => _133.sub]) !== void 0 ? { sub: source.sub } : {},
|
|
8346
|
+
..._optionalChain([source, 'optionalAccess', _134 => _134.icon]) !== void 0 ? { icon: source.icon } : {},
|
|
8315
8347
|
color: _nullishCoalesce(colors.get(id), () => ( "slate")),
|
|
8316
8348
|
x: cx - w / 2,
|
|
8317
8349
|
y,
|
|
@@ -8328,9 +8360,9 @@ function arrange(diagram, groups, slots, rooms) {
|
|
|
8328
8360
|
cursor += h + R.gap;
|
|
8329
8361
|
});
|
|
8330
8362
|
const bandsBottom = cursor - R.gap;
|
|
8331
|
-
for (const box of boxes)
|
|
8363
|
+
for (const box of boxes) _chunkSUL4AJLIcjs.placeSlot.call(void 0, box, carriedIn.get(box.id));
|
|
8332
8364
|
const byId = new Map(boxes.map((b) => [b.id, b]));
|
|
8333
|
-
const bandOf = (id) => bands[_nullishCoalesce(_optionalChain([slots, 'access',
|
|
8365
|
+
const bandOf = (id) => bands[_nullishCoalesce(_optionalChain([slots, 'access', _135 => _135.get, 'call', _136 => _136(id), 'optionalAccess', _137 => _137.group]), () => ( 0))];
|
|
8334
8366
|
const crosses = (points, rect, pad2) => {
|
|
8335
8367
|
for (let i = 1; i < points.length; i++) {
|
|
8336
8368
|
const [x1, y1] = points[i - 1];
|
|
@@ -8341,28 +8373,28 @@ function arrange(diagram, groups, slots, rooms) {
|
|
|
8341
8373
|
};
|
|
8342
8374
|
const loopZones = [...looped].flatMap((id) => {
|
|
8343
8375
|
const box = byId.get(id);
|
|
8344
|
-
return box ? [{ x: box.x, y: box.y + box.h, w: box.w, h:
|
|
8376
|
+
return box ? [{ x: box.x, y: box.y + box.h, w: box.w, h: _chunkSUL4AJLIcjs.LOOP_ROOM }] : [];
|
|
8345
8377
|
});
|
|
8346
8378
|
const onLoop = (points) => loopZones.some((zone) => crosses(points, zone, 0));
|
|
8347
|
-
const blocked = (points, a, b) => boxes.some((box) => box.id !== a && box.id !== b && crosses(points, box,
|
|
8379
|
+
const blocked = (points, a, b) => boxes.some((box) => box.id !== a && box.id !== b && crosses(points, box, _chunkSUL4AJLIcjs.LOOK.label.search)) || onLoop(points);
|
|
8348
8380
|
const laneBelow = (id) => {
|
|
8349
8381
|
const box = byId.get(id);
|
|
8350
8382
|
const band2 = bandOf(id);
|
|
8351
8383
|
const slot = slots.get(id);
|
|
8352
8384
|
const under = box.y + box.h + (slot ? loopRoom(slot.group, slot.row) : 0);
|
|
8353
|
-
return (_nullishCoalesce(_optionalChain([slot, 'optionalAccess',
|
|
8385
|
+
return (_nullishCoalesce(_optionalChain([slot, 'optionalAccess', _138 => _138.row]), () => ( 0))) < band2.rows - 1 ? under + A.rowGap / 2 : Math.min(under + R.pad / 2, band2.y + band2.h - _chunkSUL4AJLIcjs.LOOK.edge.inset);
|
|
8354
8386
|
};
|
|
8355
8387
|
const laneAbove = (id) => {
|
|
8356
8388
|
const box = byId.get(id);
|
|
8357
8389
|
const band2 = bandOf(id);
|
|
8358
|
-
return (_nullishCoalesce(_optionalChain([slots, 'access',
|
|
8390
|
+
return (_nullishCoalesce(_optionalChain([slots, 'access', _139 => _139.get, 'call', _140 => _140(id), 'optionalAccess', _141 => _141.row]), () => ( 0))) > 0 ? box.y - A.rowGap / 2 : Math.max(box.y - R.pad / 2, band2.y + _chunkSUL4AJLIcjs.LOOK.edge.inset);
|
|
8359
8391
|
};
|
|
8360
|
-
const inset =
|
|
8392
|
+
const inset = _chunkSUL4AJLIcjs.LOOK.edge.inset;
|
|
8361
8393
|
const gapX = (col, toRight) => toRight ? colLeft[col] + colW[col] + (_nullishCoalesce(between[col], () => ( A.columnGap))) / 2 : colLeft[col] - (_nullishCoalesce(between[col - 1], () => ( A.columnGap))) / 2;
|
|
8362
8394
|
const route = (from, to) => {
|
|
8363
8395
|
const a = byId.get(from);
|
|
8364
8396
|
const b = byId.get(to);
|
|
8365
|
-
if (from === to) return
|
|
8397
|
+
if (from === to) return _chunkSUL4AJLIcjs.loopUnder.call(void 0, a);
|
|
8366
8398
|
const sa = slots.get(from);
|
|
8367
8399
|
const sb = slots.get(to);
|
|
8368
8400
|
if (sa.group === sb.group && sa.row === sb.row) {
|
|
@@ -8433,10 +8465,10 @@ function arrange(diagram, groups, slots, rooms) {
|
|
|
8433
8465
|
from: edge2.from,
|
|
8434
8466
|
to: edge2.to,
|
|
8435
8467
|
points: route(edge2.from, edge2.to),
|
|
8436
|
-
color:
|
|
8468
|
+
color: _chunkSUL4AJLIcjs.edgeColor.call(void 0, edge2, colors),
|
|
8437
8469
|
carry: edge2.carry
|
|
8438
8470
|
}));
|
|
8439
|
-
|
|
8471
|
+
_chunkSUL4AJLIcjs.seatCarriers.call(void 0, sceneEdges, byId, carriedIn);
|
|
8440
8472
|
const outward = /* @__PURE__ */ new Map();
|
|
8441
8473
|
for (const edge2 of sceneEdges) {
|
|
8442
8474
|
if (edge2.points.length !== 2) continue;
|
|
@@ -8444,7 +8476,7 @@ function arrange(diagram, groups, slots, rooms) {
|
|
|
8444
8476
|
if (!back) continue;
|
|
8445
8477
|
const [p, q] = edge2.points;
|
|
8446
8478
|
const flat = Math.abs(q[1] - p[1]) < Math.abs(q[0] - p[0]);
|
|
8447
|
-
const d = (edge2.from < edge2.to ? 1 : -1) *
|
|
8479
|
+
const d = (edge2.from < edge2.to ? 1 : -1) * _chunkSUL4AJLIcjs.LOOK.edge.parallel;
|
|
8448
8480
|
edge2.points = edge2.points.map(([x, y]) => flat ? [x, y + d] : [x + d, y]);
|
|
8449
8481
|
outward.set(edge2, flat ? d > 0 ? "below" : "above" : d > 0 ? "right" : "left");
|
|
8450
8482
|
}
|
|
@@ -8466,39 +8498,39 @@ function arrange(diagram, groups, slots, rooms) {
|
|
|
8466
8498
|
header: { x: margin + R.inset, y: band2.y + R.inset, w: header.w, h: header.h }
|
|
8467
8499
|
});
|
|
8468
8500
|
});
|
|
8469
|
-
const badgeAt = (edge2, taken, lines2) => edge2.from === edge2.to ?
|
|
8470
|
-
const early =
|
|
8501
|
+
const badgeAt = (edge2, taken, lines2) => edge2.from === edge2.to ? _chunkSUL4AJLIcjs.loopBadge.call(void 0, edge2.points) : _chunkSUL4AJLIcjs.badgeOnPath.call(void 0, edge2.points, taken, lines2);
|
|
8502
|
+
const early = _chunkSUL4AJLIcjs.lineBadges.call(void 0, sceneEdges, diagram.steps.length, badgeAt);
|
|
8471
8503
|
const labels = [];
|
|
8472
8504
|
for (const edge2 of sceneEdges) {
|
|
8473
|
-
const source = _optionalChain([diagram, 'access',
|
|
8474
|
-
if (_optionalChain([source, 'optionalAccess',
|
|
8475
|
-
const seen = [...early].filter(([s]) => s <= edge2.step).map(([, b]) =>
|
|
8505
|
+
const source = _optionalChain([diagram, 'access', _142 => _142.steps, 'access', _143 => _143[edge2.step], 'optionalAccess', _144 => _144.events, 'access', _145 => _145[edge2.event]]);
|
|
8506
|
+
if (_optionalChain([source, 'optionalAccess', _146 => _146.type]) !== "edge" || source.label === void 0) continue;
|
|
8507
|
+
const seen = [...early].filter(([s]) => s <= edge2.step).map(([, b]) => _chunkSUL4AJLIcjs.badgeRect.call(void 0, b.point));
|
|
8476
8508
|
const soft = [...regions.map((r) => r.header), ...labels.filter((l) => l.step === edge2.step)];
|
|
8477
8509
|
const side2 = _nullishCoalesce(source.labelSide, () => ( outward.get(edge2)));
|
|
8478
|
-
const below = edge2.from === edge2.to ? { side: "below", base:
|
|
8510
|
+
const below = edge2.from === edge2.to ? { side: "below", base: _chunkSUL4AJLIcjs.loopLabelBase.call(void 0, edge2.points, _chunkSUL4AJLIcjs.textWidth.call(void 0, source.label, _chunkSUL4AJLIcjs.labelStyle.call(void 0, source.label)) + _chunkSUL4AJLIcjs.LOOK.label.padX * 2) } : void 0;
|
|
8479
8511
|
labels.push(
|
|
8480
|
-
|
|
8512
|
+
_chunkSUL4AJLIcjs.placeLabel.call(void 0,
|
|
8481
8513
|
{ step: edge2.step, event: edge2.event, text: source.label, points: edge2.points, color: edge2.color, ..._nullishCoalesce(below, () => ( (side2 ? { side: side2 } : { flip: true }))) },
|
|
8482
8514
|
{ hard: boxes, soft, touch: seen }
|
|
8483
8515
|
)
|
|
8484
8516
|
);
|
|
8485
8517
|
}
|
|
8486
8518
|
const layout = { kind: "architecture", width: 0, height: 0, regions, boxes, lifelines: [], edges: sceneEdges, labels, actions: [], badges: [], paths: [], ends: [] };
|
|
8487
|
-
const shift = labels.length > 0 ? Math.max(0, margin +
|
|
8488
|
-
if (shift > 0)
|
|
8489
|
-
const contentRight = Math.max(...boxes.map((b) => b.x + b.w + R.pad), ...labels.map((l) => l.x + l.w +
|
|
8490
|
-
const width = Math.max(contentRight + margin,
|
|
8519
|
+
const shift = labels.length > 0 ? Math.max(0, margin + _chunkSUL4AJLIcjs.LOOK.label.soft - Math.min(...labels.map((l) => l.x))) : 0;
|
|
8520
|
+
if (shift > 0) _chunkSUL4AJLIcjs.shiftContent.call(void 0, layout, shift, 0);
|
|
8521
|
+
const contentRight = Math.max(...boxes.map((b) => b.x + b.w + R.pad), ...labels.map((l) => l.x + l.w + _chunkSUL4AJLIcjs.LOOK.label.soft), ...sceneEdges.flatMap((e) => e.points.map((p) => p[0] + R.pad)));
|
|
8522
|
+
const width = Math.max(contentRight + margin, _chunkSUL4AJLIcjs.stripNeed.call(void 0, diagram) + margin * 2);
|
|
8491
8523
|
for (const region of regions) region.w = width - margin * 2;
|
|
8492
8524
|
const contentBottom = Math.max(bandsBottom, ...labels.map((l) => l.y + l.h));
|
|
8493
|
-
const strip2 =
|
|
8525
|
+
const strip2 = _chunkSUL4AJLIcjs.layoutStrip.call(void 0, diagram, margin, contentBottom + gap, width - margin * 2);
|
|
8494
8526
|
layout.width = width;
|
|
8495
8527
|
layout.height = (strip2 ? strip2.y + strip2.h : contentBottom) + margin;
|
|
8496
8528
|
if (strip2) layout.strip = strip2;
|
|
8497
|
-
const lines =
|
|
8498
|
-
layout.badges =
|
|
8529
|
+
const lines = _chunkSUL4AJLIcjs.lineBadges.call(void 0, sceneEdges, diagram.steps.length, badgeAt);
|
|
8530
|
+
layout.badges = _chunkSUL4AJLIcjs.replaceSameSpot.call(void 0,
|
|
8499
8531
|
diagram.steps.map((step, s) => {
|
|
8500
8532
|
const line2 = lines.get(s);
|
|
8501
|
-
if (!line2) return
|
|
8533
|
+
if (!line2) return _chunkSUL4AJLIcjs.cornerBadge.call(void 0, step.events, s, layout);
|
|
8502
8534
|
return { step: s, x: line2.point[0], y: line2.point[1], color: line2.edge.color };
|
|
8503
8535
|
})
|
|
8504
8536
|
);
|
|
@@ -8506,13 +8538,13 @@ function arrange(diagram, groups, slots, rooms) {
|
|
|
8506
8538
|
}
|
|
8507
8539
|
function grow(layout, groups, slots, rooms) {
|
|
8508
8540
|
let grown = false;
|
|
8509
|
-
const soft =
|
|
8541
|
+
const soft = _chunkSUL4AJLIcjs.LOOK.label.soft;
|
|
8510
8542
|
for (const label2 of layout.labels) {
|
|
8511
8543
|
const edge2 = layout.edges.find((e) => e.step === label2.step && e.event === label2.event);
|
|
8512
8544
|
const a = edge2 && slots.get(edge2.from);
|
|
8513
8545
|
const b = edge2 && slots.get(edge2.to);
|
|
8514
|
-
if (!a || !b || a.group !== b.group || !_optionalChain([groups, 'access',
|
|
8515
|
-
const region = layout.regions.find((r) => r.id === _optionalChain([groups, 'access',
|
|
8546
|
+
if (!a || !b || a.group !== b.group || !_optionalChain([groups, 'access', _147 => _147[a.group], 'optionalAccess', _148 => _148.region])) continue;
|
|
8547
|
+
const region = layout.regions.find((r) => r.id === _optionalChain([groups, 'access', _149 => _149[a.group], 'optionalAccess', _150 => _150.region, 'optionalAccess', _151 => _151.id]));
|
|
8516
8548
|
const room = rooms[a.group];
|
|
8517
8549
|
if (!region || !room) continue;
|
|
8518
8550
|
const over = region.y + soft - label2.y;
|
|
@@ -8531,12 +8563,12 @@ function grow(layout, groups, slots, rooms) {
|
|
|
8531
8563
|
|
|
8532
8564
|
// src/layout/sequence.ts
|
|
8533
8565
|
function layoutSequence(diagram) {
|
|
8534
|
-
const { box: B, sequence: Q, label: L, margin, gap } =
|
|
8535
|
-
const colors =
|
|
8536
|
-
const listed = _nullishCoalesce(_optionalChain([diagram, 'access',
|
|
8566
|
+
const { box: B, sequence: Q, label: L, margin, gap } = _chunkSUL4AJLIcjs.LOOK;
|
|
8567
|
+
const colors = _chunkSUL4AJLIcjs.boxColors.call(void 0, diagram);
|
|
8568
|
+
const listed = _nullishCoalesce(_optionalChain([diagram, 'access', _152 => _152.sequence, 'optionalAccess', _153 => _153.lifelines]), () => ( []));
|
|
8537
8569
|
const order = [...listed, ...diagram.boxes.map((b) => b.id).filter((id) => !listed.includes(id))];
|
|
8538
8570
|
const column = new Map(order.map((id, i) => [id, i]));
|
|
8539
|
-
const widths = order.map((id) =>
|
|
8571
|
+
const widths = order.map((id) => _chunkSUL4AJLIcjs.boxWidth.call(void 0, diagram, id, false));
|
|
8540
8572
|
const spacing = widths.slice(1).map((w, i) => widths[i] / 2 + w / 2 + Q.columnGap);
|
|
8541
8573
|
const needs = [];
|
|
8542
8574
|
for (const step of diagram.steps) {
|
|
@@ -8544,7 +8576,7 @@ function layoutSequence(diagram) {
|
|
|
8544
8576
|
if (event2.type !== "edge" || event2.label === void 0) continue;
|
|
8545
8577
|
const a = _nullishCoalesce(column.get(event2.from), () => ( 0));
|
|
8546
8578
|
const b = _nullishCoalesce(column.get(event2.to), () => ( 0));
|
|
8547
|
-
const w =
|
|
8579
|
+
const w = _chunkSUL4AJLIcjs.textWidth.call(void 0, event2.label, _chunkSUL4AJLIcjs.labelStyle.call(void 0, event2.label)) + L.padX * 2;
|
|
8548
8580
|
if (a === b) {
|
|
8549
8581
|
if (a < spacing.length) needs.push({ from: a, to: a + 1, need: Q.selfW + L.side + w + Q.labelRoom });
|
|
8550
8582
|
} else {
|
|
@@ -8568,9 +8600,9 @@ function layoutSequence(diagram) {
|
|
|
8568
8600
|
const cx = xs[i];
|
|
8569
8601
|
return {
|
|
8570
8602
|
id,
|
|
8571
|
-
name: _nullishCoalesce(_optionalChain([source, 'optionalAccess',
|
|
8572
|
-
..._optionalChain([source, 'optionalAccess',
|
|
8573
|
-
..._optionalChain([source, 'optionalAccess',
|
|
8603
|
+
name: _nullishCoalesce(_optionalChain([source, 'optionalAccess', _154 => _154.name]), () => ( id)),
|
|
8604
|
+
..._optionalChain([source, 'optionalAccess', _155 => _155.sub]) !== void 0 ? { sub: source.sub } : {},
|
|
8605
|
+
..._optionalChain([source, 'optionalAccess', _156 => _156.icon]) !== void 0 ? { icon: source.icon } : {},
|
|
8574
8606
|
color: _nullishCoalesce(colors.get(id), () => ( "slate")),
|
|
8575
8607
|
x: cx - w / 2,
|
|
8576
8608
|
y: margin,
|
|
@@ -8599,8 +8631,8 @@ function layoutSequence(diagram) {
|
|
|
8599
8631
|
above = named && side2 === "above" ? Q.labelOffset + L.h / 2 : gap;
|
|
8600
8632
|
under = self ? Q.selfH + gap : named && side2 === "below" ? Q.labelOffset + L.h / 2 : gap;
|
|
8601
8633
|
} else {
|
|
8602
|
-
above =
|
|
8603
|
-
under =
|
|
8634
|
+
above = _chunkSUL4AJLIcjs.LOOK.action.h / 2;
|
|
8635
|
+
under = _chunkSUL4AJLIcjs.LOOK.action.h / 2;
|
|
8604
8636
|
}
|
|
8605
8637
|
y = first ? y + above : y + Math.max(Q.minPitch, below + Q.rowGap + above) + (e === 0 && s > 0 ? Q.stepGap : 0);
|
|
8606
8638
|
first = false;
|
|
@@ -8613,15 +8645,15 @@ function layoutSequence(diagram) {
|
|
|
8613
8645
|
[xf, y],
|
|
8614
8646
|
[xf + Q.selfW, y],
|
|
8615
8647
|
[xf + Q.selfW, y + Q.selfH],
|
|
8616
|
-
[xf +
|
|
8648
|
+
[xf + _chunkSUL4AJLIcjs.LOOK.edge.inset, y + Q.selfH]
|
|
8617
8649
|
] : [
|
|
8618
8650
|
[xf, y],
|
|
8619
|
-
[xt - dir *
|
|
8651
|
+
[xt - dir * _chunkSUL4AJLIcjs.LOOK.edge.inset, y]
|
|
8620
8652
|
];
|
|
8621
|
-
const color =
|
|
8653
|
+
const color = _chunkSUL4AJLIcjs.edgeColor.call(void 0, event2, colors);
|
|
8622
8654
|
const seats = {};
|
|
8623
8655
|
if (event2.carry.kind !== "none") {
|
|
8624
|
-
const reach =
|
|
8656
|
+
const reach = _chunkSUL4AJLIcjs.LOOK.slot.lifeline + _chunkSUL4AJLIcjs.carrierHalf.call(void 0, event2.carry)[0];
|
|
8625
8657
|
const [p0, p1] = points;
|
|
8626
8658
|
const [q0, q1] = points.slice(-2);
|
|
8627
8659
|
const out = Math.sign(p1[0] - p0[0]) || 1;
|
|
@@ -8643,27 +8675,27 @@ function layoutSequence(diagram) {
|
|
|
8643
8675
|
}
|
|
8644
8676
|
} else {
|
|
8645
8677
|
const x = xs[_nullishCoalesce(column.get(event2.box), () => ( 0))];
|
|
8646
|
-
const w =
|
|
8647
|
-
actions.push({ step: s, event: e, box: event2.box, text: event2.label, color: _nullishCoalesce(colors.get(event2.box), () => ( "slate")), x: x +
|
|
8678
|
+
const w = _chunkSUL4AJLIcjs.textWidth.call(void 0, event2.label, _chunkSUL4AJLIcjs.TYPE.action) + _chunkSUL4AJLIcjs.LOOK.action.padX * 2;
|
|
8679
|
+
actions.push({ step: s, event: e, box: event2.box, text: event2.label, color: _nullishCoalesce(colors.get(event2.box), () => ( "slate")), x: x + _chunkSUL4AJLIcjs.LOOK.badge.r + 4, y: y - _chunkSUL4AJLIcjs.LOOK.action.h / 2, w, h: _chunkSUL4AJLIcjs.LOOK.action.h });
|
|
8648
8680
|
}
|
|
8649
8681
|
});
|
|
8650
8682
|
});
|
|
8651
8683
|
const bottom = (first ? headBottom : y + below) + Q.tail;
|
|
8652
8684
|
const lifelines = order.map((id, i) => ({ id, x: xs[i], y1: headBottom, y2: bottom }));
|
|
8653
|
-
const early =
|
|
8685
|
+
const early = _chunkSUL4AJLIcjs.lineBadges.call(void 0, edges, diagram.steps.length);
|
|
8654
8686
|
const labels = [];
|
|
8655
8687
|
for (const request of requests) {
|
|
8656
|
-
const seen = [...early].filter(([s]) => s <= request.step).map(([, b]) =>
|
|
8688
|
+
const seen = [...early].filter(([s]) => s <= request.step).map(([, b]) => _chunkSUL4AJLIcjs.badgeRect.call(void 0, b.point));
|
|
8657
8689
|
const soft = [...labels.filter((l) => l.step === request.step), ...actions];
|
|
8658
|
-
labels.push(
|
|
8690
|
+
labels.push(_chunkSUL4AJLIcjs.placeLabel.call(void 0, request, { hard: boxes, soft, touch: seen }));
|
|
8659
8691
|
}
|
|
8660
8692
|
const layout = { kind: "sequence", width: 0, height: 0, regions: [], boxes, lifelines, edges, labels, actions, badges: [], paths: [], ends: [] };
|
|
8661
8693
|
const lefts = [...boxes.map((b) => b.x), ...labels.map((l) => l.x), ...actions.map((a) => a.x)];
|
|
8662
8694
|
const shift = Math.max(0, margin - Math.min(...lefts));
|
|
8663
|
-
if (shift > 0)
|
|
8695
|
+
if (shift > 0) _chunkSUL4AJLIcjs.shiftContent.call(void 0, layout, shift, 0);
|
|
8664
8696
|
const rights = [...boxes.map((b) => b.x + b.w), ...labels.map((l) => l.x + l.w), ...actions.map((a) => a.x + a.w), ...edges.flatMap((edge2) => edge2.points.map((p) => p[0]))];
|
|
8665
|
-
const width = Math.max(Math.max(...rights) + margin,
|
|
8666
|
-
const strip2 =
|
|
8697
|
+
const width = Math.max(Math.max(...rights) + margin, _chunkSUL4AJLIcjs.stripNeed.call(void 0, diagram) + margin * 2);
|
|
8698
|
+
const strip2 = _chunkSUL4AJLIcjs.layoutStrip.call(void 0, diagram, margin, bottom + gap, width - margin * 2);
|
|
8667
8699
|
layout.width = width;
|
|
8668
8700
|
layout.height = (strip2 ? strip2.y + strip2.h : bottom) + margin;
|
|
8669
8701
|
if (strip2) layout.strip = strip2;
|
|
@@ -8671,47 +8703,47 @@ function layoutSequence(diagram) {
|
|
|
8671
8703
|
return layout;
|
|
8672
8704
|
}
|
|
8673
8705
|
function badges(diagram, layout) {
|
|
8674
|
-
const lines =
|
|
8706
|
+
const lines = _chunkSUL4AJLIcjs.lineBadges.call(void 0, layout.edges, diagram.steps.length);
|
|
8675
8707
|
const placed = diagram.steps.map((step, s) => {
|
|
8676
8708
|
const line2 = lines.get(s);
|
|
8677
8709
|
if (line2) return { step: s, x: line2.point[0], y: line2.point[1], color: line2.edge.color };
|
|
8678
8710
|
const action2 = layout.actions.find((a) => a.step === s);
|
|
8679
8711
|
const lifeline2 = action2 && layout.lifelines.find((l) => l.id === action2.box);
|
|
8680
8712
|
if (action2 && lifeline2) return { step: s, x: lifeline2.x, y: action2.y + action2.h / 2, color: action2.color };
|
|
8681
|
-
return
|
|
8713
|
+
return _chunkSUL4AJLIcjs.cornerBadge.call(void 0, step.events, s, layout);
|
|
8682
8714
|
});
|
|
8683
|
-
return
|
|
8715
|
+
return _chunkSUL4AJLIcjs.replaceSameSpot.call(void 0, placed);
|
|
8684
8716
|
}
|
|
8685
8717
|
|
|
8686
8718
|
// src/timeline.ts
|
|
8687
|
-
var LINEUP_LENGTH = { line:
|
|
8719
|
+
var LINEUP_LENGTH = { line: _chunkSUL4AJLIcjs.MOTION.lineup.slide, seal: _chunkSUL4AJLIcjs.MOTION.lineup.seal, open: _chunkSUL4AJLIcjs.MOTION.fade, pick: _chunkSUL4AJLIcjs.MOTION.fade, stamp: _chunkSUL4AJLIcjs.MOTION.popFade };
|
|
8688
8720
|
function plan(step, needle) {
|
|
8689
8721
|
const out = { edges: [], events: [], busy: 0 };
|
|
8690
|
-
let cursor =
|
|
8722
|
+
let cursor = _chunkSUL4AJLIcjs.MOTION.edgeAt;
|
|
8691
8723
|
let arrived;
|
|
8692
8724
|
let changes = 0;
|
|
8693
8725
|
let settled = Number.NEGATIVE_INFINITY;
|
|
8694
8726
|
const line2 = (e, event2, a) => {
|
|
8695
8727
|
const carries = event2.carry.kind !== "none";
|
|
8696
|
-
const b = a + (carries ?
|
|
8728
|
+
const b = a + (carries ? _chunkSUL4AJLIcjs.MOTION.drawCarry : _chunkSUL4AJLIcjs.MOTION.draw);
|
|
8697
8729
|
out.edges.push({ event: e, a, b, carries, coin: event2.carry.kind === "coin", named: event2.label !== void 0 });
|
|
8698
8730
|
out.busy = Math.max(out.busy, b);
|
|
8699
8731
|
return b;
|
|
8700
8732
|
};
|
|
8701
8733
|
const nows = needle ? step.events.flatMap((event2, e) => event2.type === "now" ? [{ e, to: event2.to }] : []) : [];
|
|
8702
|
-
const p0 = _nullishCoalesce(_optionalChain([needle, 'optionalAccess',
|
|
8734
|
+
const p0 = _nullishCoalesce(_optionalChain([needle, 'optionalAccess', _157 => _157.from]), () => ( 0));
|
|
8703
8735
|
const p1 = Math.max(p0, ...nows.map((n) => n.to + 1));
|
|
8704
8736
|
const pulled = (event2) => event2.type === "edge" && event2.at !== void 0 && event2.at >= p0 && event2.at < p1;
|
|
8705
8737
|
step.events.forEach((event2, e) => {
|
|
8706
|
-
if (needle && e === _optionalChain([nows, 'access',
|
|
8707
|
-
let t = Math.max(cursor, settled +
|
|
8738
|
+
if (needle && e === _optionalChain([nows, 'access', _158 => _158[0], 'optionalAccess', _159 => _159.e])) {
|
|
8739
|
+
let t = Math.max(cursor, settled + _chunkSUL4AJLIcjs.MOTION.change);
|
|
8708
8740
|
const keys = [[t, p0]];
|
|
8709
8741
|
const passed = [];
|
|
8710
8742
|
for (let u = p0; u < p1; u++) {
|
|
8711
8743
|
const entry = t;
|
|
8712
8744
|
const lines = step.events.flatMap((ev, k) => pulled(ev) && ev.at === u ? [{ k, ev }] : []);
|
|
8713
|
-
const done = lines.reduce((latest, l, j) => Math.max(latest, line2(l.k, l.ev, entry +
|
|
8714
|
-
const end = Math.max(entry + needle.speed, lines.length > 0 ? done +
|
|
8745
|
+
const done = lines.reduce((latest, l, j) => Math.max(latest, line2(l.k, l.ev, entry + _chunkSUL4AJLIcjs.MOTION.stagger * j)), entry);
|
|
8746
|
+
const end = Math.max(entry + needle.speed, lines.length > 0 ? done + _chunkSUL4AJLIcjs.MOTION.time.wait : entry);
|
|
8715
8747
|
if (end - needle.speed > entry + 1e-9) keys.push([end - needle.speed, u]);
|
|
8716
8748
|
keys.push([end, u + 1]);
|
|
8717
8749
|
passed.push({ unit: u, at: end });
|
|
@@ -8719,7 +8751,7 @@ function plan(step, needle) {
|
|
|
8719
8751
|
}
|
|
8720
8752
|
out.sweep = { keys, passed };
|
|
8721
8753
|
out.busy = Math.max(out.busy, t);
|
|
8722
|
-
cursor = t +
|
|
8754
|
+
cursor = t + _chunkSUL4AJLIcjs.MOTION.time.after;
|
|
8723
8755
|
arrived = t;
|
|
8724
8756
|
changes = 0;
|
|
8725
8757
|
return;
|
|
@@ -8729,7 +8761,7 @@ function plan(step, needle) {
|
|
|
8729
8761
|
const a = cursor;
|
|
8730
8762
|
const b = a + LINEUP_LENGTH[event2.type];
|
|
8731
8763
|
out.edges.push({ event: e, a, b, carries: false, coin: false, named: false });
|
|
8732
|
-
cursor = a +
|
|
8764
|
+
cursor = a + _chunkSUL4AJLIcjs.MOTION.lineup.stagger;
|
|
8733
8765
|
arrived = b;
|
|
8734
8766
|
changes = 0;
|
|
8735
8767
|
out.busy = Math.max(out.busy, b);
|
|
@@ -8737,24 +8769,24 @@ function plan(step, needle) {
|
|
|
8737
8769
|
}
|
|
8738
8770
|
if (event2.type === "commit" || event2.type === "branch" || event2.type === "leaf" || event2.type === "node") {
|
|
8739
8771
|
const a = cursor;
|
|
8740
|
-
const b = a +
|
|
8772
|
+
const b = a + _chunkSUL4AJLIcjs.MOTION.draw;
|
|
8741
8773
|
out.edges.push({ event: e, a, b, carries: false, coin: false, named: false });
|
|
8742
|
-
cursor = a +
|
|
8774
|
+
cursor = a + _chunkSUL4AJLIcjs.MOTION.stagger;
|
|
8743
8775
|
arrived = b;
|
|
8744
8776
|
changes = 0;
|
|
8745
8777
|
out.busy = Math.max(out.busy, b);
|
|
8746
8778
|
} else if (event2.type === "edge") {
|
|
8747
8779
|
const a = cursor;
|
|
8748
8780
|
arrived = line2(e, event2, a);
|
|
8749
|
-
cursor = a +
|
|
8781
|
+
cursor = a + _chunkSUL4AJLIcjs.MOTION.stagger;
|
|
8750
8782
|
changes = 0;
|
|
8751
8783
|
} else if (event2.type === "action") {
|
|
8752
8784
|
out.events.push({ event: e, at: cursor });
|
|
8753
|
-
out.busy = Math.max(out.busy, cursor +
|
|
8754
|
-
cursor +=
|
|
8785
|
+
out.busy = Math.max(out.busy, cursor + _chunkSUL4AJLIcjs.MOTION.action);
|
|
8786
|
+
cursor += _chunkSUL4AJLIcjs.MOTION.action;
|
|
8755
8787
|
changes = 0;
|
|
8756
8788
|
} else {
|
|
8757
|
-
const at = (_nullishCoalesce(arrived, () => ( cursor))) +
|
|
8789
|
+
const at = (_nullishCoalesce(arrived, () => ( cursor))) + _chunkSUL4AJLIcjs.MOTION.change * changes++;
|
|
8758
8790
|
out.events.push({ event: e, at });
|
|
8759
8791
|
out.busy = Math.max(out.busy, at);
|
|
8760
8792
|
settled = Math.max(settled, at);
|
|
@@ -8765,29 +8797,29 @@ function plan(step, needle) {
|
|
|
8765
8797
|
}
|
|
8766
8798
|
function buildTimeline(diagram, still = false) {
|
|
8767
8799
|
const time = diagram.kind === "time" ? diagram.time : void 0;
|
|
8768
|
-
const T =
|
|
8800
|
+
const T = _chunkSUL4AJLIcjs.MOTION.time;
|
|
8769
8801
|
const speed = time ? Math.min(T.unitMax, Math.max(T.unitMin, T.axis / Math.max(1, time.scale.count))) : 0;
|
|
8770
8802
|
let at = 0;
|
|
8771
8803
|
const plans = diagram.steps.map((step) => {
|
|
8772
8804
|
if (!time) return plan(step);
|
|
8773
8805
|
const p = plan(step, { from: at, speed });
|
|
8774
|
-
at = _nullishCoalesce(_optionalChain([p, 'access',
|
|
8806
|
+
at = _nullishCoalesce(_optionalChain([p, 'access', _160 => _160.sweep, 'optionalAccess', _161 => _161.keys, 'access', _162 => _162[p.sweep.keys.length - 1], 'optionalAccess', _163 => _163[1]]), () => ( at));
|
|
8775
8807
|
return p;
|
|
8776
8808
|
});
|
|
8777
8809
|
const steps = [];
|
|
8778
|
-
let t =
|
|
8810
|
+
let t = _chunkSUL4AJLIcjs.MOTION.intro;
|
|
8779
8811
|
diagram.steps.forEach((step, s) => {
|
|
8780
|
-
const read = Math.min(
|
|
8781
|
-
const length = Math.max(read, (_nullishCoalesce(_optionalChain([plans, 'access',
|
|
8812
|
+
const read = Math.min(_chunkSUL4AJLIcjs.MOTION.stepMax, Math.max(_chunkSUL4AJLIcjs.MOTION.stepMin, _chunkSUL4AJLIcjs.MOTION.stepBase + [...step.body].length * _chunkSUL4AJLIcjs.MOTION.perChar));
|
|
8813
|
+
const length = Math.max(read, (_nullishCoalesce(_optionalChain([plans, 'access', _164 => _164[s], 'optionalAccess', _165 => _165.busy]), () => ( 0))) + _chunkSUL4AJLIcjs.MOTION.dwell);
|
|
8782
8814
|
steps.push({ start: t, end: t + length });
|
|
8783
8815
|
t += length;
|
|
8784
8816
|
});
|
|
8785
8817
|
const end = t;
|
|
8786
|
-
const total = Math.ceil(end +
|
|
8787
|
-
const last = total -
|
|
8818
|
+
const total = Math.ceil(end + _chunkSUL4AJLIcjs.MOTION.outro);
|
|
8819
|
+
const last = total - _chunkSUL4AJLIcjs.MOTION.tail;
|
|
8788
8820
|
const lastSpan = steps[steps.length - 1];
|
|
8789
|
-
const whole = still && lastSpan ? { start: lastSpan.start + (_nullishCoalesce(_optionalChain([plans, 'access',
|
|
8790
|
-
const faint = _nullishCoalesce(_optionalChain([whole, 'optionalAccess',
|
|
8821
|
+
const whole = still && lastSpan ? { start: lastSpan.start + (_nullishCoalesce(_optionalChain([plans, 'access', _166 => _166[plans.length - 1], 'optionalAccess', _167 => _167.busy]), () => ( 0))), end: last } : void 0;
|
|
8822
|
+
const faint = _nullishCoalesce(_optionalChain([whole, 'optionalAccess', _168 => _168.start]), () => ( last));
|
|
8791
8823
|
const edges = [];
|
|
8792
8824
|
const labels = [];
|
|
8793
8825
|
const events = [];
|
|
@@ -8798,10 +8830,10 @@ function buildTimeline(diagram, still = false) {
|
|
|
8798
8830
|
for (const edge2 of p.edges) {
|
|
8799
8831
|
const a = span.start + edge2.a;
|
|
8800
8832
|
edges.push({ step: s, event: edge2.event, start: a, drawn: span.start + edge2.b, end: span.end });
|
|
8801
|
-
const event2 = _optionalChain([diagram, 'access',
|
|
8802
|
-
const own = diagram.kind === "git" && _optionalChain([event2, 'optionalAccess',
|
|
8833
|
+
const event2 = _optionalChain([diagram, 'access', _169 => _169.steps, 'access', _170 => _170[s], 'optionalAccess', _171 => _171.events, 'access', _172 => _172[edge2.event]]);
|
|
8834
|
+
const own = diagram.kind === "git" && _optionalChain([event2, 'optionalAccess', _173 => _173.type]) === "edge" && event2.carry.kind === "tag" && event2.carry.text === event2.from;
|
|
8803
8835
|
if (edge2.carries && !own) departures.push({ step: s, event: edge2.event, who: edge2.coin ? "coin" : "main", a, b: span.start + edge2.b });
|
|
8804
|
-
if (edge2.named) named.push({ step: s, event: edge2.event, start: a +
|
|
8836
|
+
if (edge2.named) named.push({ step: s, event: edge2.event, start: a + _chunkSUL4AJLIcjs.MOTION.labelDelay, end: span.end });
|
|
8805
8837
|
}
|
|
8806
8838
|
named.forEach((label2, k) => {
|
|
8807
8839
|
const later = named[k + 2];
|
|
@@ -8817,7 +8849,7 @@ function buildTimeline(diagram, still = false) {
|
|
|
8817
8849
|
labels.push(...named);
|
|
8818
8850
|
for (const event2 of p.events) events.push({ step: s, event: event2.event, at: span.start + event2.at });
|
|
8819
8851
|
});
|
|
8820
|
-
const first = _nullishCoalesce(_optionalChain([steps, 'access',
|
|
8852
|
+
const first = _nullishCoalesce(_optionalChain([steps, 'access', _174 => _174[0], 'optionalAccess', _175 => _175.start]), () => ( 0));
|
|
8821
8853
|
const hasMain = departures.some((d) => d.who === "main");
|
|
8822
8854
|
const carriers = [];
|
|
8823
8855
|
for (const who of ["main", "coin"]) {
|
|
@@ -8842,8 +8874,8 @@ function buildTimeline(diagram, still = false) {
|
|
|
8842
8874
|
const units = [];
|
|
8843
8875
|
plans.forEach((p, s) => {
|
|
8844
8876
|
const start = steps[s].start;
|
|
8845
|
-
for (const [t2, position] of _nullishCoalesce(_optionalChain([p, 'access',
|
|
8846
|
-
for (const u of _nullishCoalesce(_optionalChain([p, 'access',
|
|
8877
|
+
for (const [t2, position] of _nullishCoalesce(_optionalChain([p, 'access', _176 => _176.sweep, 'optionalAccess', _177 => _177.keys]), () => ( []))) needle.push([start + t2, position]);
|
|
8878
|
+
for (const u of _nullishCoalesce(_optionalChain([p, 'access', _178 => _178.sweep, 'optionalAccess', _179 => _179.passed]), () => ( []))) units.push({ unit: u.unit, passed: start + u.at });
|
|
8847
8879
|
});
|
|
8848
8880
|
needle.push([total, at]);
|
|
8849
8881
|
return {
|
|
@@ -8855,26 +8887,26 @@ function buildTimeline(diagram, still = false) {
|
|
|
8855
8887
|
labels,
|
|
8856
8888
|
badges: steps.map((span, s) => ({ step: s, appears: span.start })),
|
|
8857
8889
|
events,
|
|
8858
|
-
stills: steps.map((span) => span.end -
|
|
8890
|
+
stills: steps.map((span) => span.end - _chunkSUL4AJLIcjs.MOTION.still),
|
|
8859
8891
|
...whole ? { whole } : {},
|
|
8860
8892
|
...states ? { states } : {},
|
|
8861
8893
|
...time ? { needle, units, meters: meterTimes(diagram, plans, steps) } : {}
|
|
8862
8894
|
};
|
|
8863
8895
|
}
|
|
8864
8896
|
function meterTimes(diagram, plans, steps) {
|
|
8865
|
-
const length = _optionalChain([diagram, 'access',
|
|
8866
|
-
return (_nullishCoalesce(_optionalChain([diagram, 'access',
|
|
8897
|
+
const length = _optionalChain([diagram, 'access', _180 => _180.time, 'optionalAccess', _181 => _181.period, 'optionalAccess', _182 => _182.length]);
|
|
8898
|
+
return (_nullishCoalesce(_optionalChain([diagram, 'access', _183 => _183.strip, 'optionalAccess', _184 => _184.meters]), () => ( []))).map(({ field: field2 }) => {
|
|
8867
8899
|
const keys = [[0, 0]];
|
|
8868
8900
|
let value2 = 0;
|
|
8869
8901
|
plans.forEach((p, s) => {
|
|
8870
8902
|
const start = steps[s].start;
|
|
8871
|
-
const sets = (_nullishCoalesce(_optionalChain([diagram, 'access',
|
|
8872
|
-
const ratio = event2.type === "strip" && event2.field === field2 && event2.value !== void 0 ?
|
|
8903
|
+
const sets = (_nullishCoalesce(_optionalChain([diagram, 'access', _185 => _185.steps, 'access', _186 => _186[s], 'optionalAccess', _187 => _187.events]), () => ( []))).flatMap((event2, e) => {
|
|
8904
|
+
const ratio = event2.type === "strip" && event2.field === field2 && event2.value !== void 0 ? _chunkSUL4AJLIcjs.ratioOf.call(void 0, event2.value) : void 0;
|
|
8873
8905
|
return ratio === void 0 ? [] : [{ e, ratio }];
|
|
8874
8906
|
});
|
|
8875
8907
|
const set = sets[sets.length - 1];
|
|
8876
8908
|
if (!set) return;
|
|
8877
|
-
const sweep = _nullishCoalesce(_optionalChain([p, 'access',
|
|
8909
|
+
const sweep = _nullishCoalesce(_optionalChain([p, 'access', _188 => _188.sweep, 'optionalAccess', _189 => _189.keys]), () => ( []));
|
|
8878
8910
|
const first = sweep[0];
|
|
8879
8911
|
const lastKey = sweep[sweep.length - 1];
|
|
8880
8912
|
if (first && lastKey && lastKey[1] > first[1]) {
|
|
@@ -8883,16 +8915,16 @@ function meterTimes(diagram, plans, steps) {
|
|
|
8883
8915
|
let from = p0;
|
|
8884
8916
|
const boundary = length ? Math.floor((p1 - 1e-9) / length) * length : 0;
|
|
8885
8917
|
if (boundary > 0 && boundary >= p0) {
|
|
8886
|
-
const tb = start + (_nullishCoalesce(_optionalChain([sweep, 'access',
|
|
8918
|
+
const tb = start + (_nullishCoalesce(_optionalChain([sweep, 'access', _190 => _190.find, 'call', _191 => _191(([, position]) => position === boundary), 'optionalAccess', _192 => _192[0]]), () => ( first[0])));
|
|
8887
8919
|
const prev = keys[keys.length - 1][0];
|
|
8888
|
-
keys.push([Math.max(prev, tb -
|
|
8920
|
+
keys.push([Math.max(prev, tb - _chunkSUL4AJLIcjs.MOTION.time.reset), value2], [tb, 0]);
|
|
8889
8921
|
base = 0;
|
|
8890
8922
|
from = boundary;
|
|
8891
8923
|
}
|
|
8892
8924
|
for (const [t, position] of sweep) if (position >= from) keys.push([start + t, base + (set.ratio - base) * (position - from) / (p1 - from)]);
|
|
8893
8925
|
} else {
|
|
8894
|
-
const at = start + (_nullishCoalesce(_optionalChain([p, 'access',
|
|
8895
|
-
keys.push([at, value2], [at +
|
|
8926
|
+
const at = start + (_nullishCoalesce(_optionalChain([p, 'access', _193 => _193.events, 'access', _194 => _194.find, 'call', _195 => _195((x) => x.event === set.e), 'optionalAccess', _196 => _196.at]), () => ( 0)));
|
|
8927
|
+
keys.push([at, value2], [at + _chunkSUL4AJLIcjs.MOTION.fade, set.ratio]);
|
|
8896
8928
|
}
|
|
8897
8929
|
value2 = set.ratio;
|
|
8898
8930
|
});
|
|
@@ -8909,12 +8941,12 @@ function stateTimes(diagram, edges, last) {
|
|
|
8909
8941
|
};
|
|
8910
8942
|
let on;
|
|
8911
8943
|
for (const edge2 of edges) {
|
|
8912
|
-
const event2 = _optionalChain([diagram, 'access',
|
|
8913
|
-
if (_optionalChain([event2, 'optionalAccess',
|
|
8944
|
+
const event2 = _optionalChain([diagram, 'access', _197 => _197.steps, 'access', _198 => _198[edge2.step], 'optionalAccess', _199 => _199.events, 'access', _200 => _200[edge2.event]]);
|
|
8945
|
+
if (_optionalChain([event2, 'optionalAccess', _201 => _201.type]) !== "edge" || event2.from === event2.to) continue;
|
|
8914
8946
|
if (on) {
|
|
8915
8947
|
const left = of(on.box);
|
|
8916
8948
|
left.lit.push({ start: on.since, end: edge2.start });
|
|
8917
|
-
if (on.box === event2.from && left.done === void 0) left.done = edge2.start +
|
|
8949
|
+
if (on.box === event2.from && left.done === void 0) left.done = edge2.start + _chunkSUL4AJLIcjs.MOTION.done;
|
|
8918
8950
|
on = void 0;
|
|
8919
8951
|
}
|
|
8920
8952
|
if (!isEnd(event2.to)) on = { box: event2.to, since: edge2.drawn };
|
|
@@ -8960,33 +8992,33 @@ var Motion = (_class = class {
|
|
|
8960
8992
|
}
|
|
8961
8993
|
/** `a` で出て `b` から消える。`within` を立てると `b` までに消え終わる。 */
|
|
8962
8994
|
vis(a, b = this.last, o = {}) {
|
|
8963
|
-
const f = _nullishCoalesce(o.f, () => (
|
|
8995
|
+
const f = _nullishCoalesce(o.f, () => ( _chunkSUL4AJLIcjs.MOTION.fade));
|
|
8964
8996
|
const on = _nullishCoalesce(o.on, () => ( {}));
|
|
8965
8997
|
const off = _nullishCoalesce(o.off, () => ( {}));
|
|
8966
8998
|
const out = o.within ? Math.max(a + f, b - f) : b;
|
|
8967
8999
|
return this.kf([
|
|
8968
9000
|
[0, { opacity: 0, ...off }],
|
|
8969
|
-
[a, { opacity: 0, ...off }, _nullishCoalesce(o.ein, () => (
|
|
9001
|
+
[a, { opacity: 0, ...off }, _nullishCoalesce(o.ein, () => ( _chunkSUL4AJLIcjs.EASE.out))],
|
|
8970
9002
|
[a + f, { opacity: 1, ...on }],
|
|
8971
|
-
[out, { opacity: 1, ...on },
|
|
9003
|
+
[out, { opacity: 1, ...on }, _chunkSUL4AJLIcjs.EASE.inOut],
|
|
8972
9004
|
[Math.min(out + f, this.total), { opacity: 0, ...off }],
|
|
8973
9005
|
[this.total, { opacity: 0, ...off }]
|
|
8974
9006
|
]);
|
|
8975
9007
|
}
|
|
8976
9008
|
/** 少し下から浮いて出る。 */
|
|
8977
9009
|
rise(a, b = this.last, within = false) {
|
|
8978
|
-
return this.vis(a, b, { on: { transform: "translateY(0)" }, off: { transform: `translateY(${
|
|
9010
|
+
return this.vis(a, b, { on: { transform: "translateY(0)" }, off: { transform: `translateY(${_chunkSUL4AJLIcjs.LOOK.rise}px)` }, within });
|
|
8979
9011
|
}
|
|
8980
9012
|
/** 小さな所から弾んで出る。 */
|
|
8981
9013
|
pop(a, b = this.last) {
|
|
8982
|
-
return this.vis(a, b, { f:
|
|
9014
|
+
return this.vis(a, b, { f: _chunkSUL4AJLIcjs.MOTION.popFade, ein: _chunkSUL4AJLIcjs.EASE.pop, on: { transform: "scale(1)" }, off: { transform: `scale(${_chunkSUL4AJLIcjs.LOOK.popFrom})` } });
|
|
8983
9015
|
}
|
|
8984
9016
|
/** 初めから出ていて `b` で消える。 */
|
|
8985
9017
|
until(b) {
|
|
8986
|
-
const f =
|
|
9018
|
+
const f = _chunkSUL4AJLIcjs.MOTION.untilFade;
|
|
8987
9019
|
return this.kf([
|
|
8988
9020
|
[0, { opacity: 1 }],
|
|
8989
|
-
[b, { opacity: 1 },
|
|
9021
|
+
[b, { opacity: 1 }, _chunkSUL4AJLIcjs.EASE.inOut],
|
|
8990
9022
|
[b + f, { opacity: 0 }],
|
|
8991
9023
|
[this.last, { opacity: 0 }],
|
|
8992
9024
|
[this.total, { opacity: 1 }]
|
|
@@ -9018,8 +9050,8 @@ var isTimeLayout = (layout) => layout.kind === "time";
|
|
|
9018
9050
|
var isTreeLayout = (layout) => layout.kind === "tree";
|
|
9019
9051
|
var font = (t) => `font:${t.weight} ${t.size}px var(--${t.family})`;
|
|
9020
9052
|
var mix = (pct, base = "var(--surf)") => `color-mix(in srgb,var(--c) ${pct}%,${base})`;
|
|
9021
|
-
var S =
|
|
9022
|
-
var X =
|
|
9053
|
+
var S = _chunkSUL4AJLIcjs.LOOK.stroke;
|
|
9054
|
+
var X = _chunkSUL4AJLIcjs.LOOK.mix;
|
|
9023
9055
|
var PAST = `color-mix(in srgb,var(--mute) ${X.past}%,var(--bg))`;
|
|
9024
9056
|
var PART_CSS = [
|
|
9025
9057
|
".dg{display:block;width:100%;height:auto;overflow:visible}",
|
|
@@ -9028,83 +9060,83 @@ var PART_CSS = [
|
|
|
9028
9060
|
".dg-bg{fill:var(--bg)}",
|
|
9029
9061
|
".dg-band{fill:color-mix(in srgb,var(--c) var(--tint),var(--bg));stroke:color-mix(in srgb,var(--c) var(--edge),transparent)}",
|
|
9030
9062
|
`.dg-bi{fill:${mix(X.regionIcon)};stroke:${mix(X.regionIconEdge, "transparent")}}`,
|
|
9031
|
-
`.dg-bz{${font(
|
|
9032
|
-
`.dg-bx{${font(
|
|
9063
|
+
`.dg-bz{${font(_chunkSUL4AJLIcjs.TYPE.regionName)};fill:var(--ct)}`,
|
|
9064
|
+
`.dg-bx{${font(_chunkSUL4AJLIcjs.TYPE.regionNote)};fill:var(--mute)}`,
|
|
9033
9065
|
".dg-st{fill:var(--surf);stroke:var(--hair)}",
|
|
9034
9066
|
`.dg-halo{fill:none;stroke:var(--c);stroke-width:${S.halo};stroke-opacity:.16}`,
|
|
9035
9067
|
`.dg-on{fill:none;stroke:var(--c);stroke-width:${S.on}}`,
|
|
9036
9068
|
`.dg-ic{fill:${mix(X.icon)}}`,
|
|
9037
9069
|
`.dg-slot{fill:none;stroke:${mix(X.slot, "transparent")};stroke-width:${S.slot};stroke-dasharray:3 3}`,
|
|
9038
9070
|
`.dg-gl{fill:none;stroke:var(--c);stroke-width:${S.glyph};stroke-linecap:round;stroke-linejoin:round}`,
|
|
9039
|
-
`.dg-sn{${font(
|
|
9040
|
-
`.dg-ss{${font(
|
|
9041
|
-
`.dg-ss-ok{${font(
|
|
9042
|
-
`.dg-ss-act{${font(
|
|
9071
|
+
`.dg-sn{${font(_chunkSUL4AJLIcjs.TYPE.boxName)};fill:var(--ink)}`,
|
|
9072
|
+
`.dg-ss{${font(_chunkSUL4AJLIcjs.TYPE.boxSub)};fill:var(--mute)}`,
|
|
9073
|
+
`.dg-ss-ok{${font(_chunkSUL4AJLIcjs.TYPE.boxSubStrong)};fill:var(--ct)}`,
|
|
9074
|
+
`.dg-ss-act{${font(_chunkSUL4AJLIcjs.TYPE.boxSubStrong)};fill:var(--ink)}`,
|
|
9043
9075
|
`.dg-ll{stroke:var(--line);stroke-width:${S.lifeline};stroke-dasharray:3 4}`,
|
|
9044
|
-
`.dg-e{fill:none;stroke:var(--line);stroke-width:${S.edge};stroke-linecap:round;stroke-dasharray:0 ${
|
|
9076
|
+
`.dg-e{fill:none;stroke:var(--line);stroke-width:${S.edge};stroke-linecap:round;stroke-dasharray:0 ${_chunkSUL4AJLIcjs.LOOK.edge.ghostDash}}`,
|
|
9045
9077
|
`.dg-eh{fill:none;stroke:var(--line);stroke-width:${S.arrow};stroke-linecap:round;stroke-linejoin:round}`,
|
|
9046
9078
|
`.dg-e-on{fill:none;stroke:var(--c);stroke-width:${S.edgeOn};stroke-linecap:round;stroke-dasharray:1 2}`,
|
|
9047
9079
|
`.dg-eh-on{fill:none;stroke:var(--c);stroke-width:${S.edgeOn};stroke-linecap:round;stroke-linejoin:round}`,
|
|
9048
|
-
`.dg-flow{fill:none;stroke:var(--surf);stroke-width:${S.flow};stroke-linecap:round;stroke-dasharray:1.5 ${
|
|
9080
|
+
`.dg-flow{fill:none;stroke:var(--surf);stroke-width:${S.flow};stroke-linecap:round;stroke-dasharray:1.5 ${_chunkSUL4AJLIcjs.LOOK.edge.flowDash}}`,
|
|
9049
9081
|
`.dg-e-past{fill:none;stroke:${PAST};stroke-width:${S.edge};stroke-linecap:round}`,
|
|
9050
9082
|
`.dg-eh-past{fill:none;stroke:${PAST};stroke-width:${S.arrow};stroke-linecap:round;stroke-linejoin:round}`,
|
|
9051
9083
|
".dg-bd{cursor:pointer}",
|
|
9052
9084
|
".dg-bdf{fill:var(--c)}",
|
|
9053
|
-
`.dg-bdft{${font(
|
|
9085
|
+
`.dg-bdft{${font(_chunkSUL4AJLIcjs.TYPE.badge)};fill:var(--on-c)}`,
|
|
9054
9086
|
`.dg-bdr{fill:none;stroke:var(--c);stroke-width:${S.badgeRing};pointer-events:none}`,
|
|
9055
9087
|
`.dg-bdp{fill:${mix(X.badgePast)};stroke:${mix(X.badgePastEdge, "transparent")};stroke-width:${S.hair}}`,
|
|
9056
|
-
`.dg-bdpt{${font(
|
|
9088
|
+
`.dg-bdpt{${font(_chunkSUL4AJLIcjs.TYPE.badge)};fill:var(--ct)}`,
|
|
9057
9089
|
`.dg-bdp-g{fill:var(--surf);stroke:${PAST};stroke-width:${S.hair}}`,
|
|
9058
|
-
`.dg-bdpt-g{${font(
|
|
9090
|
+
`.dg-bdpt-g{${font(_chunkSUL4AJLIcjs.TYPE.badge)};fill:var(--mute)}`,
|
|
9059
9091
|
`.dg-cap rect,.dg-act rect{fill:${mix(X.cap)};stroke:${mix(X.capEdge, "transparent")}}`,
|
|
9060
|
-
`.dg-cap text{${font(
|
|
9061
|
-
`.dg-capj text{${font(
|
|
9062
|
-
`.dg-cap-past text{${font(
|
|
9063
|
-
`.dg-cap-pastj text{${font(
|
|
9064
|
-
`.dg-act text{${font(
|
|
9092
|
+
`.dg-cap text{${font(_chunkSUL4AJLIcjs.TYPE.label)};fill:var(--ct)}`,
|
|
9093
|
+
`.dg-capj text{${font(_chunkSUL4AJLIcjs.TYPE.labelJa)}}`,
|
|
9094
|
+
`.dg-cap-past text{${font(_chunkSUL4AJLIcjs.TYPE.label)};fill:var(--mute);fill-opacity:${_chunkSUL4AJLIcjs.LOOK.state.pastLabel}}`,
|
|
9095
|
+
`.dg-cap-pastj text{${font(_chunkSUL4AJLIcjs.TYPE.labelJa)}}`,
|
|
9096
|
+
`.dg-act text{${font(_chunkSUL4AJLIcjs.TYPE.action)};fill:var(--ct)}`,
|
|
9065
9097
|
".dg-car{fill:var(--carry,var(--ink))}",
|
|
9066
|
-
`.dg-car-t{${font(
|
|
9067
|
-
`.dg-car-tj{${font(
|
|
9098
|
+
`.dg-car-t{${font(_chunkSUL4AJLIcjs.TYPE.carrier)};fill:var(--bg)}`,
|
|
9099
|
+
`.dg-car-tj{${font(_chunkSUL4AJLIcjs.TYPE.carrierJa)}}`,
|
|
9068
9100
|
`.dg-env{fill:var(--carry,var(--ink));stroke:var(--surf);stroke-width:${S.envelope}}`,
|
|
9069
9101
|
`.dg-env-in{fill:none;stroke:var(--surf);stroke-width:${S.flow};stroke-linejoin:round;stroke-linecap:round}`,
|
|
9070
9102
|
".dg-coin{fill:var(--coin);stroke:var(--surf);stroke-width:1.2}",
|
|
9071
9103
|
".dg-coin-in{fill:none;stroke:var(--coinin);stroke-width:1.1}",
|
|
9072
9104
|
".dg-strip{fill:var(--surf);stroke:var(--hair)}",
|
|
9073
9105
|
`.dg-sep{stroke:var(--hair);stroke-width:${S.hair}}`,
|
|
9074
|
-
`.dg-sh{${font(
|
|
9075
|
-
`.dg-fl{${font(
|
|
9076
|
-
`.dg-fv{${font(
|
|
9077
|
-
`.dg-fvj{${font(
|
|
9106
|
+
`.dg-sh{${font(_chunkSUL4AJLIcjs.TYPE.stripTitle)};fill:var(--ink)}`,
|
|
9107
|
+
`.dg-fl{${font(_chunkSUL4AJLIcjs.TYPE.fieldName)};fill:var(--mute)}`,
|
|
9108
|
+
`.dg-fv{${font(_chunkSUL4AJLIcjs.TYPE.fieldValue)};fill:var(--ink)}`,
|
|
9109
|
+
`.dg-fvj{${font(_chunkSUL4AJLIcjs.TYPE.fieldValueJa)};fill:var(--ink)}`,
|
|
9078
9110
|
".dg-fv-c{fill:var(--ct)}",
|
|
9079
9111
|
".dg-fl-now{fill:var(--c)}",
|
|
9080
9112
|
`.dg-tr-ring{fill:none;stroke:var(--line);stroke-width:${S.trail}}`,
|
|
9081
9113
|
".dg-tr-fill{fill:var(--c)}",
|
|
9082
9114
|
".dg-tg rect{fill:var(--c)}",
|
|
9083
|
-
`.dg-tg text{${font(
|
|
9115
|
+
`.dg-tg text{${font(_chunkSUL4AJLIcjs.TYPE.tag)};fill:var(--on-c)}`,
|
|
9084
9116
|
`.dg-side{fill:color-mix(in srgb,var(--c) ${X.side}%,var(--bg));stroke:${mix(X.sideEdge, "transparent")};stroke-dasharray:4 4}`,
|
|
9085
|
-
`.dg-side-t{${font(
|
|
9086
|
-
`.dg-side-n{${font(
|
|
9117
|
+
`.dg-side-t{${font(_chunkSUL4AJLIcjs.TYPE.regionName)};fill:var(--ct)}`,
|
|
9118
|
+
`.dg-side-n{${font(_chunkSUL4AJLIcjs.TYPE.regionNote)};fill:var(--mute)}`,
|
|
9087
9119
|
`.dg-ghost{fill:var(--surf);stroke:${mix(X.ghostEdge, "transparent")};stroke-dasharray:4 3}`,
|
|
9088
|
-
`.dg-path{fill:none;stroke:${mix(X.path, "transparent")};stroke-width:${S.path};stroke-linecap:round;stroke-dasharray:0 ${
|
|
9120
|
+
`.dg-path{fill:none;stroke:${mix(X.path, "transparent")};stroke-width:${S.path};stroke-linecap:round;stroke-dasharray:0 ${_chunkSUL4AJLIcjs.LOOK.edge.ghostDash}}`,
|
|
9089
9121
|
`.dg-path-h{fill:none;stroke:${mix(X.path, "transparent")};stroke-width:${S.arrow};stroke-linecap:round;stroke-linejoin:round}`,
|
|
9090
|
-
`.dg-path-t{${font(
|
|
9091
|
-
`.dg-path-tj{${font(
|
|
9122
|
+
`.dg-path-t{${font(_chunkSUL4AJLIcjs.TYPE.label)};fill:var(--ct)}`,
|
|
9123
|
+
`.dg-path-tj{${font(_chunkSUL4AJLIcjs.TYPE.labelJa)}}`,
|
|
9092
9124
|
".dg-start{fill:var(--ink)}",
|
|
9093
9125
|
`.dg-end{fill:var(--bg);stroke:var(--ink);stroke-width:${S.end}}`,
|
|
9094
9126
|
".dg-end-in{fill:var(--ink)}",
|
|
9095
9127
|
`.dg-end-x{fill:var(--bg);stroke:${mix(X.path, "transparent")};stroke-width:${S.arrow};stroke-dasharray:2 2.5}`,
|
|
9096
9128
|
`.dg-end-xi{fill:${mix(X.path, "transparent")}}`,
|
|
9097
|
-
`.dg-mark{${font(
|
|
9129
|
+
`.dg-mark{${font(_chunkSUL4AJLIcjs.TYPE.regionNote)};fill:var(--mute)}`,
|
|
9098
9130
|
`.dg-done{fill:var(--ink);stroke:var(--surf);stroke-width:${S.done}}`,
|
|
9099
9131
|
`.dg-done-ck{fill:none;stroke:var(--surf);stroke-width:${S.glyph};stroke-linecap:round;stroke-linejoin:round}`,
|
|
9100
9132
|
`.dg-git-l{fill:none;stroke:var(--c);stroke-width:${S.git};stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:1 2}`,
|
|
9101
9133
|
`.dg-git-cp{fill:none;stroke:var(--c);stroke-width:${S.gitOrphan};stroke-linecap:round;stroke-dasharray:3 3;stroke-opacity:.7}`,
|
|
9102
9134
|
`.dg-git-c{fill:var(--surf);stroke:var(--c);stroke-width:${S.git}}`,
|
|
9103
|
-
`.dg-git-id{${font(
|
|
9104
|
-
`.dg-git-h{${font(
|
|
9105
|
-
`.dg-git-n{${font(
|
|
9135
|
+
`.dg-git-id{${font(_chunkSUL4AJLIcjs.TYPE.gitId)};fill:var(--ct)}`,
|
|
9136
|
+
`.dg-git-h{${font(_chunkSUL4AJLIcjs.TYPE.gitHash)};fill:var(--mute)}`,
|
|
9137
|
+
`.dg-git-n{${font(_chunkSUL4AJLIcjs.TYPE.gitNote)};fill:var(--ink2)}`,
|
|
9106
9138
|
`.dg-git-old{fill:var(--surf);stroke:var(--c);stroke-width:${S.gitOrphan};stroke-dasharray:3 3;stroke-opacity:.6}`,
|
|
9107
|
-
`.dg-git-oldl{${font(
|
|
9139
|
+
`.dg-git-oldl{${font(_chunkSUL4AJLIcjs.TYPE.gitId)};fill:var(--ct);opacity:.55}`,
|
|
9108
9140
|
// 木の図 (#3233)。木の線は線の灰で、運ぶ物が通った跡は運ぶ物の色で引く
|
|
9109
9141
|
`.dg-tree-l{fill:none;stroke:var(--line);stroke-width:${S.tree};stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:1 2}`,
|
|
9110
9142
|
`.dg-tree-tr{fill:none;stroke:var(--c);stroke-width:${S.treeTrail};stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:1 2}`,
|
|
@@ -9112,66 +9144,66 @@ var PART_CSS = [
|
|
|
9112
9144
|
`.dg-tree-con{fill:none;stroke:var(--line);stroke-width:${S.treeCon};stroke-linecap:round;stroke-dasharray:2 3.5}`,
|
|
9113
9145
|
`.dg-tree-card{fill:var(--surf);stroke:var(--hair);stroke-width:${S.hair}}`,
|
|
9114
9146
|
`.dg-tree-cg{fill:none;stroke:var(--mute);stroke-width:${S.glyph};stroke-linecap:round;stroke-linejoin:round}`,
|
|
9115
|
-
`.dg-tree-ct{${font(
|
|
9116
|
-
`.dg-tree-hash{${font(
|
|
9117
|
-
`.dg-tree-name{${font(
|
|
9118
|
-
`.dg-tree-one{${font(
|
|
9119
|
-
`.dg-tree-rh{${font(
|
|
9120
|
-
`.dg-tree-rn{${font(
|
|
9147
|
+
`.dg-tree-ct{${font(_chunkSUL4AJLIcjs.TYPE.treeCard)};fill:var(--ink)}`,
|
|
9148
|
+
`.dg-tree-hash{${font(_chunkSUL4AJLIcjs.TYPE.treeHash)};fill:var(--ink)}`,
|
|
9149
|
+
`.dg-tree-name{${font(_chunkSUL4AJLIcjs.TYPE.treeName)};fill:var(--mute)}`,
|
|
9150
|
+
`.dg-tree-one{${font(_chunkSUL4AJLIcjs.TYPE.boxName)};fill:var(--ink)}`,
|
|
9151
|
+
`.dg-tree-rh{${font(_chunkSUL4AJLIcjs.TYPE.rootHash)};fill:var(--ink)}`,
|
|
9152
|
+
`.dg-tree-rn{${font(_chunkSUL4AJLIcjs.TYPE.rootName)};fill:var(--mute)}`,
|
|
9121
9153
|
// 列の図 (#3239)。封は列の左端から右へ伸びる
|
|
9122
9154
|
".dg-ln-chip{fill:var(--c)}",
|
|
9123
9155
|
`.dg-ln-plain{fill:color-mix(in srgb,var(--mute) ${X.chipPlain}%,var(--surf))}`,
|
|
9124
|
-
`.dg-ln-t{${font(
|
|
9125
|
-
`.dg-ln-tp{${font(
|
|
9156
|
+
`.dg-ln-t{${font(_chunkSUL4AJLIcjs.TYPE.chip)};fill:var(--on-c)}`,
|
|
9157
|
+
`.dg-ln-tp{${font(_chunkSUL4AJLIcjs.TYPE.chip)};fill:var(--ink)}`,
|
|
9126
9158
|
".dg-ln-seal{transform-box:fill-box;transform-origin:0 50%}",
|
|
9127
9159
|
`.dg-ln-sd{fill:color-mix(in srgb,var(--mute) ${X.sealDark}%,var(--surf))}`,
|
|
9128
9160
|
`.dg-ln-sl{fill:color-mix(in srgb,var(--mute) ${X.sealLight}%,var(--surf))}`,
|
|
9129
9161
|
`.dg-ln-stamp{fill:var(--surf);stroke:var(--c);stroke-width:${S.stamp}}`,
|
|
9130
|
-
`.dg-ln-st{${font(
|
|
9162
|
+
`.dg-ln-st{${font(_chunkSUL4AJLIcjs.TYPE.stamp)};fill:var(--ct)}`,
|
|
9131
9163
|
// 時間軸の図 (#3165)。和文を含む字は、末尾に j を付けた class で同じ大きさと太さの和文の字にする
|
|
9132
9164
|
`.dg-tm-ep{fill:color-mix(in srgb,var(--ink) ${X.timeShade}%,transparent)}`,
|
|
9133
9165
|
`.dg-tm-sep{stroke:var(--hair);stroke-width:${S.hair};stroke-dasharray:2 4}`,
|
|
9134
|
-
`.dg-tm-hd{${font(
|
|
9135
|
-
`.dg-tm-hdj{${font(
|
|
9166
|
+
`.dg-tm-hd{${font(_chunkSUL4AJLIcjs.TYPE.timeHead)};fill:var(--ink)}`,
|
|
9167
|
+
`.dg-tm-hdj{${font(_chunkV34DCH34cjs.sansOf.call(void 0, _chunkSUL4AJLIcjs.TYPE.timeHead))}}`,
|
|
9136
9168
|
`.dg-tm-slot{fill:none;stroke:var(--line);stroke-width:${S.timeSlot};opacity:.55}`,
|
|
9137
9169
|
".dg-tm-m{fill:var(--c)}",
|
|
9138
9170
|
".dg-tm-x{fill:var(--c-slate)}",
|
|
9139
9171
|
`.dg-tm-fr{fill:none;stroke:var(--c-blue);stroke-width:${S.timeFrame};stroke-dasharray:3 2}`,
|
|
9140
9172
|
`.dg-tm-gd{fill:none;stroke:color-mix(in srgb,var(--c-blue) ${X.timeGuide}%,transparent);stroke-width:${S.hair};stroke-dasharray:2 3}`,
|
|
9141
9173
|
`.dg-tm-ax{fill:none;stroke:var(--line);stroke-width:${S.timeAxis}}`,
|
|
9142
|
-
`.dg-tm-tk{${font(
|
|
9143
|
-
`.dg-tm-tkj{${font(
|
|
9144
|
-
`.dg-tm-en{${font(
|
|
9145
|
-
`.dg-tm-er{${font(
|
|
9146
|
-
`.dg-tm-erj{${font(
|
|
9147
|
-
`.dg-tm-rn{${font(
|
|
9174
|
+
`.dg-tm-tk{${font(_chunkSUL4AJLIcjs.TYPE.timeTick)};fill:var(--mute)}`,
|
|
9175
|
+
`.dg-tm-tkj{${font(_chunkV34DCH34cjs.sansOf.call(void 0, _chunkSUL4AJLIcjs.TYPE.timeTick))}}`,
|
|
9176
|
+
`.dg-tm-en{${font(_chunkSUL4AJLIcjs.TYPE.timePeriod)};fill:var(--ink2)}`,
|
|
9177
|
+
`.dg-tm-er{${font(_chunkSUL4AJLIcjs.TYPE.timeRange)};fill:var(--mute)}`,
|
|
9178
|
+
`.dg-tm-erj{${font(_chunkV34DCH34cjs.sansOf.call(void 0, _chunkSUL4AJLIcjs.TYPE.timeRange))}}`,
|
|
9179
|
+
`.dg-tm-rn{${font(_chunkSUL4AJLIcjs.TYPE.timeRow)};fill:var(--ink2)}`,
|
|
9148
9180
|
`.dg-tm-br{fill:none;stroke:var(--c);stroke-width:${S.timeSpan};stroke-linecap:round;stroke-linejoin:round}`,
|
|
9149
|
-
`.dg-tm-bt{${font(
|
|
9181
|
+
`.dg-tm-bt{${font(_chunkSUL4AJLIcjs.TYPE.spanText)};fill:var(--ct)}`,
|
|
9150
9182
|
`.dg-tm-bx{fill:color-mix(in srgb,var(--c) ${X.timeSpan}%,transparent);stroke:var(--c);stroke-width:${S.timeSpan};stroke-dasharray:4 3}`,
|
|
9151
9183
|
`.dg-tm-con{fill:none;stroke:var(--line);stroke-width:${S.timeDrop};stroke-linecap:round;stroke-dasharray:0 3.5}`,
|
|
9152
9184
|
".dg-tm-pg{fill:var(--surf);stroke:var(--line);stroke-dasharray:2 2.5}",
|
|
9153
9185
|
`.dg-tm-pgl{fill:none;stroke:var(--mute);stroke-width:${S.timeFlag};stroke-linecap:round;stroke-linejoin:round}`,
|
|
9154
9186
|
`.dg-tm-pc{fill:var(--surf);stroke:var(--c);stroke-width:${S.timePoint}}`,
|
|
9155
9187
|
`.dg-tm-pcg{fill:none;stroke:var(--c);stroke-width:${S.timeFlag};stroke-linecap:round;stroke-linejoin:round}`,
|
|
9156
|
-
`.dg-tm-pn{${font(
|
|
9157
|
-
`.dg-tm-pnj{${font(
|
|
9188
|
+
`.dg-tm-pn{${font(_chunkSUL4AJLIcjs.TYPE.pointName)};fill:var(--ink)}`,
|
|
9189
|
+
`.dg-tm-pnj{${font(_chunkV34DCH34cjs.sansOf.call(void 0, _chunkSUL4AJLIcjs.TYPE.pointName))}}`,
|
|
9158
9190
|
".dg-tm-pn-g{fill:var(--mute)}",
|
|
9159
|
-
`.dg-tm-ps{${font(
|
|
9191
|
+
`.dg-tm-ps{${font(_chunkSUL4AJLIcjs.TYPE.pointState)};fill:var(--ct)}`,
|
|
9160
9192
|
`.dg-tm-ln{fill:none;stroke:var(--c);stroke-width:${S.edgeOn};stroke-linecap:round;stroke-dasharray:1 2}`,
|
|
9161
9193
|
`.dg-tm-nd{stroke:var(--ink);stroke-width:${S.timeNeedle};opacity:.55}`,
|
|
9162
9194
|
".dg-tm-nh{fill:var(--ink)}",
|
|
9163
9195
|
".dg-tm-ph{fill:none;stroke:var(--line);stroke-dasharray:3 3}",
|
|
9164
9196
|
`.dg-tm-ex{fill:color-mix(in srgb,var(--c-slate) ${X.timeEmpty}%,var(--surf));stroke:var(--c-slate);stroke-width:${S.timeFrame};stroke-dasharray:3 3}`,
|
|
9165
|
-
`.dg-tm-ext{${font(
|
|
9197
|
+
`.dg-tm-ext{${font(_chunkSUL4AJLIcjs.TYPE.emptyText)};fill:var(--t-slate)}`,
|
|
9166
9198
|
".dg-tm-mt{fill:var(--hair)}",
|
|
9167
9199
|
".dg-tm-mf{fill:var(--c);transform-box:fill-box;transform-origin:0 50%}",
|
|
9168
9200
|
`.dg-tm-mk{stroke:var(--ink2);stroke-width:${S.timeMeter}}`,
|
|
9169
|
-
`.dg-tm-ml{${font(
|
|
9201
|
+
`.dg-tm-ml{${font(_chunkSUL4AJLIcjs.TYPE.meterLine)};fill:var(--ink2)}`,
|
|
9170
9202
|
".dg-vp-bg{fill:var(--bg)}",
|
|
9171
9203
|
".dg-vp-frame{fill:none;stroke:var(--hair)}",
|
|
9172
9204
|
".dg-hd-bg{fill:var(--bg)}",
|
|
9173
9205
|
".dg-mm-bg{fill:var(--surf);stroke:var(--hair)}",
|
|
9174
|
-
`.dg-mm-t{${font(
|
|
9206
|
+
`.dg-mm-t{${font(_chunkSUL4AJLIcjs.TYPE.miniTitle)};fill:var(--mute)}`,
|
|
9175
9207
|
".dg-mm-world{fill:var(--sunk);stroke:var(--hair)}",
|
|
9176
9208
|
`.dg-mm-band{fill:${mix(X.miniBand)};stroke:${mix(X.miniBandEdge, "transparent")};stroke-width:.6}`,
|
|
9177
9209
|
`.dg-mm-card{fill:${mix(X.mini)}}`,
|
|
@@ -9205,9 +9237,9 @@ function subChanges(diagram, timeline, actionsInBox) {
|
|
|
9205
9237
|
const { whole } = timeline;
|
|
9206
9238
|
let order = 0;
|
|
9207
9239
|
for (const time of timeline.events) {
|
|
9208
|
-
const event2 = _optionalChain([diagram, 'access',
|
|
9209
|
-
if (_optionalChain([event2, 'optionalAccess',
|
|
9210
|
-
if (actionsInBox && _optionalChain([event2, 'optionalAccess',
|
|
9240
|
+
const event2 = _optionalChain([diagram, 'access', _202 => _202.steps, 'access', _203 => _203[time.step], 'optionalAccess', _204 => _204.events, 'access', _205 => _205[time.event]]);
|
|
9241
|
+
if (_optionalChain([event2, 'optionalAccess', _206 => _206.type]) === "swap") raw.push({ t: time.at, order: order++, box: event2.box, set: event2.text });
|
|
9242
|
+
if (actionsInBox && _optionalChain([event2, 'optionalAccess', _207 => _207.type]) === "action") {
|
|
9211
9243
|
raw.push({ t: time.at, order: order++, box: event2.box, act: event2.label });
|
|
9212
9244
|
const end = timeline.steps[time.step].end;
|
|
9213
9245
|
if (!whole || end <= whole.start) raw.push({ t: end, order: order++, box: event2.box, act: null });
|
|
@@ -9222,7 +9254,7 @@ function subChanges(diagram, timeline, actionsInBox) {
|
|
|
9222
9254
|
const list2 = [];
|
|
9223
9255
|
const changes = raw.filter((r) => r.box === box.id);
|
|
9224
9256
|
const latest = [...changes].reverse().find((r) => r.set !== void 0 || typeof r.act === "string");
|
|
9225
|
-
if (whole && typeof _optionalChain([latest, 'optionalAccess',
|
|
9257
|
+
if (whole && typeof _optionalChain([latest, 'optionalAccess', _208 => _208.act]) === "string") changes.push({ t: whole.start, order: order++, box: box.id, act: latest.act });
|
|
9226
9258
|
for (const change of changes) {
|
|
9227
9259
|
if (change.set !== void 0) {
|
|
9228
9260
|
base = [change.set, "dg-ss-ok"];
|
|
@@ -9236,7 +9268,7 @@ function subChanges(diagram, timeline, actionsInBox) {
|
|
|
9236
9268
|
}
|
|
9237
9269
|
const kept = list2.filter((change, k) => {
|
|
9238
9270
|
const next = list2[k + 1];
|
|
9239
|
-
return next === void 0 || next[0] - change[0] >=
|
|
9271
|
+
return next === void 0 || next[0] - change[0] >= _chunkSUL4AJLIcjs.MOTION.minShow;
|
|
9240
9272
|
});
|
|
9241
9273
|
out.set(box.id, kept);
|
|
9242
9274
|
}
|
|
@@ -9245,9 +9277,9 @@ function subChanges(diagram, timeline, actionsInBox) {
|
|
|
9245
9277
|
function fieldChanges(diagram, timeline, layout) {
|
|
9246
9278
|
const out = /* @__PURE__ */ new Map();
|
|
9247
9279
|
for (const time of timeline.events) {
|
|
9248
|
-
const event2 = _optionalChain([diagram, 'access',
|
|
9249
|
-
if (_optionalChain([event2, 'optionalAccess',
|
|
9250
|
-
const color = _nullishCoalesce(_optionalChain([layout, 'access',
|
|
9280
|
+
const event2 = _optionalChain([diagram, 'access', _209 => _209.steps, 'access', _210 => _210[time.step], 'optionalAccess', _211 => _211.events, 'access', _212 => _212[time.event]]);
|
|
9281
|
+
if (_optionalChain([event2, 'optionalAccess', _213 => _213.type]) !== "strip") continue;
|
|
9282
|
+
const color = _nullishCoalesce(_optionalChain([layout, 'access', _214 => _214.badges, 'access', _215 => _215[time.step], 'optionalAccess', _216 => _216.color]), () => ( "slate"));
|
|
9251
9283
|
const list2 = _nullishCoalesce(out.get(event2.field), () => ( []));
|
|
9252
9284
|
const until = timeline.steps[time.step].end;
|
|
9253
9285
|
list2.push({ at: time.at, color, step: time.step, until, ...event2.value !== void 0 ? { value: event2.value } : {}, ...event2.tag !== void 0 ? { tag: event2.tag } : {} });
|
|
@@ -9263,26 +9295,26 @@ function fadeBefore(l, time, steps) {
|
|
|
9263
9295
|
return cut > after.start ? { ...rest, after: { start: after.start, end: Math.min(after.end, cut) } } : rest;
|
|
9264
9296
|
}
|
|
9265
9297
|
function drawSvg(diagram, layout, timeline, palette, theme, follow, ink = [], traces = []) {
|
|
9266
|
-
const vars =
|
|
9298
|
+
const vars = _chunkSUL4AJLIcjs.paletteVars.call(void 0, palette, theme);
|
|
9267
9299
|
const id = nameOf(`${JSON.stringify(diagram)}|${vars}|${follow ? `${follow.width}|${follow.lang}` : ""}`);
|
|
9268
9300
|
const m = new Motion(`dg${id}`, timeline.total, timeline.last);
|
|
9269
|
-
const ctx = { m, t: timeline, id, sh: `filter="url(#dg-sh-${id})"`, end: timeline.steps[timeline.steps.length - 1].end, ink, traces };
|
|
9301
|
+
const ctx = { m, t: timeline, id, sh: `filter="url(#dg-sh-${id})"`, end: timeline.steps[timeline.steps.length - 1].end, ink, traces, boxText: _chunkV34DCH34cjs.boxTextY.call(void 0, layout.boxes) };
|
|
9270
9302
|
const on = involved(diagram);
|
|
9271
9303
|
const subs = subChanges(diagram, timeline, layout.kind !== "sequence");
|
|
9272
9304
|
const L = { band: [], base: [], lit: [], node: [], badge: [], top: [] };
|
|
9273
|
-
for (const region of layout.regions) L.band.push(
|
|
9274
|
-
const ghostColor = _nullishCoalesce(_optionalChain([layout, 'access',
|
|
9275
|
-
if (layout.side) L.band.push(
|
|
9276
|
-
const boxColor = (id2, ghost) => _optionalChain([layout, 'access',
|
|
9277
|
-
for (const p of layout.paths) L.base.push(
|
|
9278
|
-
for (const e of layout.ends) L.node.push(
|
|
9305
|
+
for (const region of layout.regions) L.band.push(_chunkV34DCH34cjs.band.call(void 0, region, ink));
|
|
9306
|
+
const ghostColor = _nullishCoalesce(_optionalChain([layout, 'access', _217 => _217.boxes, 'access', _218 => _218.find, 'call', _219 => _219((b) => b.ghost), 'optionalAccess', _220 => _220.color]), () => ( "slate"));
|
|
9307
|
+
if (layout.side) L.band.push(_chunkV34DCH34cjs.side.call(void 0, layout.side, ghostColor, ink));
|
|
9308
|
+
const boxColor = (id2, ghost) => _optionalChain([layout, 'access', _221 => _221.boxes, 'access', _222 => _222.find, 'call', _223 => _223((b) => b.id === id2 && (ghost === void 0 || b.ghost === ghost)), 'optionalAccess', _224 => _224.color]);
|
|
9309
|
+
for (const p of layout.paths) L.base.push(_chunkV34DCH34cjs.path.call(void 0, p, _nullishCoalesce(_nullishCoalesce(boxColor(p.to, true), () => ( boxColor(p.from))), () => ( ghostColor)), ink, traces));
|
|
9310
|
+
for (const e of layout.ends) L.node.push(_chunkV34DCH34cjs.endMark.call(void 0, e, ghostColor, ink));
|
|
9279
9311
|
const isState = layout.kind === "state";
|
|
9280
9312
|
const arrivals = new Map((_nullishCoalesce(timeline.states, () => ( []))).flatMap((s) => s.lit[0] ? [[s.box, s.lit[0].start]] : []));
|
|
9281
9313
|
const meters = new Map((_nullishCoalesce(timeline.meters, () => ( []))).map((meter) => [meter.field, meter.keys]));
|
|
9282
9314
|
const gauge = (field2) => field2.meter ? kindParts("time").meterField({ ...field2, meter: field2.meter }, _nullishCoalesce(meters.get(field2.name), () => ( [[0, 0]])), ctx) : void 0;
|
|
9283
|
-
const drawStrip = (s) =>
|
|
9315
|
+
const drawStrip = (s) => _chunkV34DCH34cjs.strip.call(void 0, s, fieldChanges(diagram, timeline, layout), ctx, isState, arrivals, gauge);
|
|
9284
9316
|
if (layout.strip && !follow) L.band.push(drawStrip(layout.strip));
|
|
9285
|
-
for (const line2 of layout.lifelines) L.base.push(
|
|
9317
|
+
for (const line2 of layout.lifelines) L.base.push(_chunkV34DCH34cjs.lifeline.call(void 0, line2.x, line2.y1, line2.y2));
|
|
9286
9318
|
if (isGitLayout(layout)) {
|
|
9287
9319
|
const git = kindParts("git").drawGit(layout, diagram, timeline, ctx);
|
|
9288
9320
|
L.base.push(git.links);
|
|
@@ -9297,7 +9329,7 @@ function drawSvg(diagram, layout, timeline, palette, theme, follow, ink = [], tr
|
|
|
9297
9329
|
L.lit.push(tree.trails);
|
|
9298
9330
|
L.node.push(tree.nodes);
|
|
9299
9331
|
}
|
|
9300
|
-
const runs = new Set((_nullishCoalesce(_optionalChain([treeLayout, 'optionalAccess',
|
|
9332
|
+
const runs = new Set((_nullishCoalesce(_optionalChain([treeLayout, 'optionalAccess', _225 => _225.runs]), () => ( []))).map((r) => `${r.step}/${r.event}`));
|
|
9301
9333
|
const lineupLayout = isLineupLayout(layout) ? layout : void 0;
|
|
9302
9334
|
if (lineupLayout) {
|
|
9303
9335
|
const lineup = kindParts("lineup").drawLineup(lineupLayout, diagram, timeline, ctx, subs);
|
|
@@ -9312,51 +9344,51 @@ function drawSvg(diagram, layout, timeline, palette, theme, follow, ink = [], tr
|
|
|
9312
9344
|
L.node.push(drawn.node);
|
|
9313
9345
|
L.top.push(drawn.top);
|
|
9314
9346
|
}
|
|
9315
|
-
const wired = new Set((_nullishCoalesce(_optionalChain([timeLayout, 'optionalAccess',
|
|
9347
|
+
const wired = new Set((_nullishCoalesce(_optionalChain([timeLayout, 'optionalAccess', _226 => _226.wires]), () => ( []))).map((w) => `${w.step}/${w.event}`));
|
|
9316
9348
|
for (const e of layout.edges) {
|
|
9317
9349
|
const time = timeline.edges.find((t) => t.step === e.step && t.event === e.event);
|
|
9318
9350
|
if (!time || timeLayout && !wired.has(`${e.step}/${e.event}`) || runs.has(`${e.step}/${e.event}`)) continue;
|
|
9319
|
-
const since = Math.max(_nullishCoalesce(_optionalChain([tree, 'optionalAccess',
|
|
9320
|
-
const drawn =
|
|
9351
|
+
const since = Math.max(_nullishCoalesce(_optionalChain([tree, 'optionalAccess', _227 => _227.appear, 'access', _228 => _228.get, 'call', _229 => _229(e.from)]), () => ( 0)), _nullishCoalesce(_optionalChain([tree, 'optionalAccess', _230 => _230.appear, 'access', _231 => _231.get, 'call', _232 => _232(e.to)]), () => ( 0)));
|
|
9352
|
+
const drawn = _chunkV34DCH34cjs.edge.call(void 0, e, time, ctx, isState, since);
|
|
9321
9353
|
L.base.push(drawn.base);
|
|
9322
9354
|
L.lit.push(drawn.lit);
|
|
9323
9355
|
}
|
|
9324
9356
|
const states = new Map((_nullishCoalesce(timeline.states, () => ( []))).map((s) => [s.box, s]));
|
|
9325
9357
|
const links = new Map(diagram.boxes.flatMap((b) => b.link === void 0 ? [] : [[b.id, b.link]]));
|
|
9326
|
-
const linked = (id2, markup) =>
|
|
9358
|
+
const linked = (id2, markup) => _chunkV34DCH34cjs.linkTo.call(void 0, links.get(id2), markup);
|
|
9327
9359
|
for (const box of timeLayout || lineupLayout ? [] : layout.boxes) {
|
|
9328
9360
|
if (box.ghost) {
|
|
9329
|
-
L.node.push(linked(box.id,
|
|
9361
|
+
L.node.push(linked(box.id, _chunkV34DCH34cjs.ghostCard.call(void 0, box, ink)));
|
|
9330
9362
|
continue;
|
|
9331
9363
|
}
|
|
9332
9364
|
const state = states.get(box.id);
|
|
9333
|
-
L.node.push(linked(box.id,
|
|
9334
|
-
if (_optionalChain([state, 'optionalAccess',
|
|
9365
|
+
L.node.push(linked(box.id, _chunkV34DCH34cjs.card.call(void 0, box, ctx, _nullishCoalesce(on.get(box.id), () => ( [])), _nullishCoalesce(subs.get(box.id), () => ( [])), isState ? _nullishCoalesce(_optionalChain([state, 'optionalAccess', _233 => _233.lit]), () => ( [])) : void 0)));
|
|
9366
|
+
if (_optionalChain([state, 'optionalAccess', _234 => _234.done]) !== void 0) L.node.push(_chunkV34DCH34cjs.doneMark.call(void 0, box, state.done, ctx));
|
|
9335
9367
|
}
|
|
9336
|
-
for (const b of layout.badges) if (!(follow && onStrip(layout, b))) L.badge.push(
|
|
9368
|
+
for (const b of layout.badges) if (!(follow && onStrip(layout, b))) L.badge.push(_chunkV34DCH34cjs.badge.call(void 0, b, ctx, isState));
|
|
9337
9369
|
for (const l of layout.labels) {
|
|
9338
9370
|
const time = timeline.labels.find((t) => t.step === l.step && t.event === l.event);
|
|
9339
|
-
if (time) L.top.push(
|
|
9371
|
+
if (time) L.top.push(_chunkV34DCH34cjs.label.call(void 0, l, fadeBefore(l, time, timeline.steps), ctx));
|
|
9340
9372
|
}
|
|
9341
9373
|
const { whole } = timeline;
|
|
9342
9374
|
for (const a of layout.actions) {
|
|
9343
9375
|
const time = timeline.events.find((t) => t.step === a.step && t.event === a.event);
|
|
9344
9376
|
if (!time) continue;
|
|
9345
9377
|
const until = timeline.steps[a.step].end;
|
|
9346
|
-
L.top.push(whole && until > whole.start ?
|
|
9378
|
+
L.top.push(whole && until > whole.start ? _chunkV34DCH34cjs.action.call(void 0, a, time.at, whole.end, ctx) : _chunkV34DCH34cjs.action.call(void 0, a, time.at, until, ctx, whole));
|
|
9347
9379
|
}
|
|
9348
9380
|
for (const time of timeline.carriers) {
|
|
9349
9381
|
const e = layout.edges.find((x) => x.step === time.step && x.event === time.event);
|
|
9350
|
-
if (e) L.top.push(
|
|
9382
|
+
if (e) L.top.push(_chunkV34DCH34cjs.carrier.call(void 0, e, treeLayout ? { ...time, start: time.depart, end: time.arrive + _chunkSUL4AJLIcjs.MOTION.fade } : time, ctx));
|
|
9351
9383
|
}
|
|
9352
9384
|
const content = Object.values(L).map((parts) => parts.join("")).join("");
|
|
9353
|
-
const { near, far, nearY, farY } =
|
|
9385
|
+
const { near, far, nearY, farY } = _chunkSUL4AJLIcjs.LOOK.shadow;
|
|
9354
9386
|
const shadow = `<filter id="dg-sh-${id}" x="-20%" y="-30%" width="140%" height="180%"><feDropShadow dx="0" dy="${nearY}" stdDeviation="${near}" style="flood-color:var(--sh);flood-opacity:var(--shA)"/><feDropShadow dx="0" dy="${farY}" stdDeviation="${far}" style="flood-color:var(--sh);flood-opacity:var(--shB)"/></filter>`;
|
|
9355
|
-
const heads = follow && layout.kind === "sequence" ? layout.boxes.map((box) => linked(box.id,
|
|
9356
|
-
const drawTable = (s, from) => drawStrip(s) + layout.badges.filter((b) => onStrip(layout, b)).map((b) =>
|
|
9357
|
-
const view = follow ? followView(layout, timeline, diagram, m, id, content, follow, heads, drawTable) : { body: `<rect class="dg-bg" width="${layout.width}" height="${layout.height}" rx="${
|
|
9358
|
-
const css = `.dg-${id}{${
|
|
9359
|
-
return `<svg xmlns="http://www.w3.org/2000/svg" class="dg dg-${id}" viewBox="0 0 ${Math.ceil(view.w)} ${Math.ceil(view.h)}" width="${Math.ceil(view.w)}" height="${Math.ceil(view.h)}" role="img" aria-label="${
|
|
9387
|
+
const heads = follow && layout.kind === "sequence" ? layout.boxes.map((box) => linked(box.id, _chunkV34DCH34cjs.headCard.call(void 0, box, ctx, _nullishCoalesce(on.get(box.id), () => ( [])), _nullishCoalesce(subs.get(box.id), () => ( []))))).join("") : "";
|
|
9388
|
+
const drawTable = (s, from) => drawStrip(s) + layout.badges.filter((b) => onStrip(layout, b)).map((b) => _chunkV34DCH34cjs.badge.call(void 0, { ...b, x: b.x - from.x + s.x + _chunkSUL4AJLIcjs.LOOK.badge.r, y: b.y - from.y + s.y }, ctx, isState)).join("");
|
|
9389
|
+
const view = follow ? followView(layout, timeline, diagram, m, id, content, follow, heads, drawTable) : { body: `<rect class="dg-bg" width="${layout.width}" height="${layout.height}" rx="${_chunkSUL4AJLIcjs.LOOK.region.radius}"/>${content}`, w: layout.width, h: layout.height };
|
|
9390
|
+
const css = `.dg-${id}{${_chunkSUL4AJLIcjs.FONT_VARS};--T:${timeline.total}s;${vars}}${PART_CSS}${m.frames.join("")}`;
|
|
9391
|
+
return `<svg xmlns="http://www.w3.org/2000/svg" class="dg dg-${id}" viewBox="0 0 ${Math.ceil(view.w)} ${Math.ceil(view.h)}" width="${Math.ceil(view.w)}" height="${Math.ceil(view.h)}" role="img" aria-label="${_chunkV34DCH34cjs.esc.call(void 0, diagram.title)}" data-dragon="figure" data-view="${follow ? "follow" : "fixed"}"><style>${css}</style><defs>${shadow}</defs>${view.body}</svg>`;
|
|
9360
9392
|
}
|
|
9361
9393
|
function union(rects) {
|
|
9362
9394
|
const x = Math.min(...rects.map((r) => r.x));
|
|
@@ -9371,7 +9403,7 @@ function focusOf(layout, diagram, step) {
|
|
|
9371
9403
|
return rects.length === 0 ? void 0 : union(rects);
|
|
9372
9404
|
}
|
|
9373
9405
|
function badgeFocus(badge2, parts, vw, vh) {
|
|
9374
|
-
const room =
|
|
9406
|
+
const room = _chunkSUL4AJLIcjs.LOOK.badge.r + _chunkSUL4AJLIcjs.LOOK.follow.badgeRoom;
|
|
9375
9407
|
const { x: bx, y: by } = badge2;
|
|
9376
9408
|
const away = (p) => Math.hypot(Math.max(0, p.x - bx, bx - p.x - p.w), Math.max(0, p.y - by, by - p.y - p.h));
|
|
9377
9409
|
let held = { x: bx - room, y: by - room, w: room * 2, h: room * 2 };
|
|
@@ -9390,7 +9422,7 @@ function focusParts(layout, diagram, step) {
|
|
|
9390
9422
|
}
|
|
9391
9423
|
rects.push(...layout.labels.filter((l) => l.step === step), ...layout.actions.filter((a) => a.step === step));
|
|
9392
9424
|
if (isTreeLayout(layout)) {
|
|
9393
|
-
const ends = new Set((_nullishCoalesce(_optionalChain([diagram, 'access',
|
|
9425
|
+
const ends = new Set((_nullishCoalesce(_optionalChain([diagram, 'access', _235 => _235.steps, 'access', _236 => _236[step], 'optionalAccess', _237 => _237.events]), () => ( []))).flatMap((e) => e.type === "edge" ? [e.from, e.to] : []));
|
|
9394
9426
|
rects.push(...layout.nodes.filter((n) => n.step === step || ends.has(n.id)));
|
|
9395
9427
|
for (const l of layout.links.filter((x) => x.step === step)) {
|
|
9396
9428
|
const xs = l.points.map((p) => p[0]);
|
|
@@ -9399,10 +9431,10 @@ function focusParts(layout, diagram, step) {
|
|
|
9399
9431
|
}
|
|
9400
9432
|
}
|
|
9401
9433
|
if (isLineupLayout(layout)) {
|
|
9402
|
-
const changed = new Set((_nullishCoalesce(_optionalChain([diagram, 'access',
|
|
9434
|
+
const changed = new Set((_nullishCoalesce(_optionalChain([diagram, 'access', _238 => _238.steps, 'access', _239 => _239[step], 'optionalAccess', _240 => _240.events]), () => ( []))).flatMap((e) => "box" in e ? [e.box] : []));
|
|
9403
9435
|
rects.push(...layout.lanes.filter((lane) => changed.has(lane.id)));
|
|
9404
9436
|
}
|
|
9405
|
-
for (const event2 of _nullishCoalesce(_optionalChain([diagram, 'access',
|
|
9437
|
+
for (const event2 of _nullishCoalesce(_optionalChain([diagram, 'access', _241 => _241.steps, 'access', _242 => _242[step], 'optionalAccess', _243 => _243.events]), () => ( []))) {
|
|
9406
9438
|
const ids = event2.type === "edge" ? [event2.from, event2.to] : event2.type === "action" || event2.type === "swap" ? [event2.box] : [];
|
|
9407
9439
|
for (const id of ids) {
|
|
9408
9440
|
const box = layout.boxes.find((b) => b.id === id);
|
|
@@ -9412,22 +9444,22 @@ function focusParts(layout, diagram, step) {
|
|
|
9412
9444
|
return rects;
|
|
9413
9445
|
}
|
|
9414
9446
|
function followView(layout, timeline, diagram, m, id, content, follow, heads, drawTable) {
|
|
9415
|
-
const F =
|
|
9416
|
-
const M =
|
|
9447
|
+
const F = _chunkSUL4AJLIcjs.LOOK.follow;
|
|
9448
|
+
const M = _chunkSUL4AJLIcjs.LOOK.mini;
|
|
9417
9449
|
const frameWidth = Math.max(1, follow.width);
|
|
9418
9450
|
const full = Math.min(layout.width, frameWidth);
|
|
9419
9451
|
const worldH = layout.strip ? layout.strip.y : layout.height;
|
|
9420
|
-
const title =
|
|
9452
|
+
const title = _chunkSUL4AJLIcjs.FIGURE_TEXT[follow.lang].overview;
|
|
9421
9453
|
const sized = (vh2) => {
|
|
9422
9454
|
const mw2 = Math.min(M.w, full * 0.4, vh2 * 0.4 / layout.height * layout.width);
|
|
9423
9455
|
const k2 = mw2 / layout.width;
|
|
9424
9456
|
const mh2 = worldH * k2;
|
|
9425
|
-
const bw2 = Math.max(mw2, Math.ceil(
|
|
9457
|
+
const bw2 = Math.max(mw2, Math.ceil(_chunkSUL4AJLIcjs.textWidth.call(void 0, title, _chunkSUL4AJLIcjs.TYPE.miniTitle)));
|
|
9426
9458
|
return { vh: vh2, mw: mw2, k: k2, mh: mh2, bw: bw2, bgW: bw2 + M.pad * 2, bgH: mh2 + M.pad * 2 + M.title, beside: mh2 > mw2 };
|
|
9427
9459
|
};
|
|
9428
9460
|
const natural = sized(Math.min(worldH, Math.max(F.minH, full * F.aspect)));
|
|
9429
9461
|
const bare = frameWidth < F.narrow && (natural.beside || layout.strip !== void 0);
|
|
9430
|
-
const tableH = layout.strip ?
|
|
9462
|
+
const tableH = layout.strip ? _chunkSUL4AJLIcjs.rewrapStrip.call(void 0, layout.strip, 0, 0, full).h + M.inset : 0;
|
|
9431
9463
|
const room = follow.height === void 0 ? Number.POSITIVE_INFINITY : (natural.beside || bare ? follow.height : follow.height - natural.bgH - M.inset) - tableH;
|
|
9432
9464
|
const { vh, mw, k, mh, bw, bgW, bgH, beside } = room < natural.vh ? sized(Math.max(F.fitMinH, room)) : { ...natural, vh: Number.isFinite(room) ? Math.min(worldH, room) : natural.vh };
|
|
9433
9465
|
const vw = beside && !bare ? Math.min(layout.width, frameWidth - bgW - M.inset) : full;
|
|
@@ -9436,7 +9468,7 @@ function followView(layout, timeline, diagram, m, id, content, follow, heads, dr
|
|
|
9436
9468
|
const strip2 = heads === "" ? 0 : F.head.pad * 2 + F.head.h;
|
|
9437
9469
|
const below = vh - strip2;
|
|
9438
9470
|
const clampY = (y) => Math.min(worldH - below / 2, Math.max(top + below / 2, y));
|
|
9439
|
-
const r =
|
|
9471
|
+
const r = _chunkSUL4AJLIcjs.LOOK.badge.r;
|
|
9440
9472
|
let prev = [layout.width / 2, worldH / 2];
|
|
9441
9473
|
const middles = timeline.steps.map((_, s) => {
|
|
9442
9474
|
if (isTimeLayout(layout)) {
|
|
@@ -9463,10 +9495,10 @@ function followView(layout, timeline, diagram, m, id, content, follow, heads, dr
|
|
|
9463
9495
|
if (s === 0) return;
|
|
9464
9496
|
const before = centers[s - 1];
|
|
9465
9497
|
const start = timeline.steps[s].start;
|
|
9466
|
-
cam.push([start, before[0], before[1], 1,
|
|
9498
|
+
cam.push([start, before[0], before[1], 1, _chunkSUL4AJLIcjs.EASE.inOut], [start + F.ease, c[0], c[1]]);
|
|
9467
9499
|
});
|
|
9468
9500
|
const cl = centers[centers.length - 1];
|
|
9469
|
-
cam.push([timeline.last, cl[0], cl[1], 1,
|
|
9501
|
+
cam.push([timeline.last, cl[0], cl[1], 1, _chunkSUL4AJLIcjs.EASE.inOut], [timeline.total, c0[0], c0[1]]);
|
|
9470
9502
|
const camKf = m.move(cam.map(([t, cx, cy, s, e]) => [t, vw / 2 - cx, vh / 2 - cy, s, e]));
|
|
9471
9503
|
const bgX = beside ? vw + M.inset : vw - bgW - M.inset;
|
|
9472
9504
|
const bgY = beside ? 0 : vh + M.inset;
|
|
@@ -9475,9 +9507,9 @@ function followView(layout, timeline, diagram, m, id, content, follow, heads, dr
|
|
|
9475
9507
|
const my = bgY + M.pad + M.title;
|
|
9476
9508
|
const overview = () => {
|
|
9477
9509
|
const shapes = [
|
|
9478
|
-
...layout.regions.map((r3) => `<rect class="dg-mm-band" style="${
|
|
9479
|
-
...layout.boxes.map((b) => `<rect class="dg-mm-card" style="${
|
|
9480
|
-
...(isTreeLayout(layout) ? layout.nodes : []).map((n) => `<rect class="dg-mm-card" style="${
|
|
9510
|
+
...layout.regions.map((r3) => `<rect class="dg-mm-band" style="${_chunkV34DCH34cjs.cs.call(void 0, r3.color)}" x="${mx + r3.x * k}" y="${my + r3.y * k}" width="${r3.w * k}" height="${r3.h * k}" rx="3"/>`),
|
|
9511
|
+
...layout.boxes.map((b) => `<rect class="dg-mm-card" style="${_chunkV34DCH34cjs.cs.call(void 0, b.color)}" x="${mx + b.x * k}" y="${my + b.y * k}" width="${b.w * k}" height="${b.h * k}" rx="1.5"/>`),
|
|
9512
|
+
...(isTreeLayout(layout) ? layout.nodes : []).map((n) => `<rect class="dg-mm-card" style="${_chunkV34DCH34cjs.cs.call(void 0, n.color)}" x="${mx + n.x * k}" y="${my + n.y * k}" width="${n.w * k}" height="${n.h * k}" rx="1.5"/>`)
|
|
9481
9513
|
].join("");
|
|
9482
9514
|
const vp = m.move(cam.map(([t, cx, cy, , e]) => [t, mx + (cx - vw / 2) * k, my + (cy - vh / 2) * k, 1, e]));
|
|
9483
9515
|
return {
|
|
@@ -9487,25 +9519,25 @@ function followView(layout, timeline, diagram, m, id, content, follow, heads, dr
|
|
|
9487
9519
|
};
|
|
9488
9520
|
const mini = bare ? { clip: "", body: "" } : overview();
|
|
9489
9521
|
const head = strip2 === 0 ? "" : `<g class="dg-hd"><rect class="dg-hd-bg" width="${vw}" height="${strip2}"/><line class="dg-sep" x1="0" y1="${strip2}" x2="${vw}" y2="${strip2}"/><g class="dg-a" style="${m.move(cam.map(([t, cx, , s, e]) => [t, vw / 2 - cx, 0, s, e]))}">${heads}</g></g>`;
|
|
9490
|
-
const body = `<defs><clipPath id="dg-vp-${id}"><rect width="${vw}" height="${vh}" rx="${
|
|
9522
|
+
const body = `<defs><clipPath id="dg-vp-${id}"><rect width="${vw}" height="${vh}" rx="${_chunkSUL4AJLIcjs.LOOK.region.radius}"/></clipPath>${mini.clip}</defs><g clip-path="url(#dg-vp-${id})"><rect class="dg-vp-bg" width="${vw}" height="${vh}"/><g class="dg-a" style="${camKf}">${content}</g>${head}</g><rect class="dg-vp-frame" x="0.5" y="0.5" width="${vw - 1}" height="${vh - 1}" rx="${_chunkSUL4AJLIcjs.LOOK.region.radius}"/>${mini.body}`;
|
|
9491
9523
|
const w = beside && !bare ? vw + M.inset + bgW : full;
|
|
9492
9524
|
const bottom = beside || bare ? vh : bgY + bgH;
|
|
9493
9525
|
if (!layout.strip) return { body, w, h: bottom };
|
|
9494
|
-
const table =
|
|
9526
|
+
const table = _chunkSUL4AJLIcjs.rewrapStrip.call(void 0, layout.strip, 0, bottom + M.inset, full);
|
|
9495
9527
|
return { body: body + drawTable(table, layout.strip), w, h: table.y + table.h };
|
|
9496
9528
|
}
|
|
9497
9529
|
function paletteOf(options, theme) {
|
|
9498
|
-
const palette =
|
|
9530
|
+
const palette = _chunkSUL4AJLIcjs.resolvePalette.call(void 0, options.palette);
|
|
9499
9531
|
if (!options.colors) return palette;
|
|
9500
|
-
const words =
|
|
9501
|
-
const errors = Object.entries(options.colors).flatMap(([name2, value2]) => !
|
|
9532
|
+
const words = _chunkSUL4AJLIcjs.FIGURE_TEXT[_nullishCoalesce(options.lang, () => ( "ja"))];
|
|
9533
|
+
const errors = Object.entries(options.colors).flatMap(([name2, value2]) => !_chunkSUL4AJLIcjs.isColorName.call(void 0, name2) ? [words.unknownColor(name2)] : _chunkSUL4AJLIcjs.isColorValue.call(void 0, value2) ? [] : [words.unreadableColor(name2)]);
|
|
9502
9534
|
if (errors.length > 0) throw new Error(words.cannotDraw(errors.join(" / ")));
|
|
9503
9535
|
return { ...palette, [theme]: { ...palette[theme], ...options.colors } };
|
|
9504
9536
|
}
|
|
9505
9537
|
function renderDiagram(input, options = {}) {
|
|
9506
9538
|
const lang = _nullishCoalesce(options.lang, () => ( "ja"));
|
|
9507
9539
|
const read = readDiagram(input, { lang });
|
|
9508
|
-
if (!read.ok) throw new Error(
|
|
9540
|
+
if (!read.ok) throw new Error(_chunkSUL4AJLIcjs.FIGURE_TEXT[lang].cannotDraw(read.errors.map((e) => `${e.pointer} ${e.message}`).join(" / ")));
|
|
9509
9541
|
const diagram = read.diagram;
|
|
9510
9542
|
const layout = diagram.kind === "sequence" ? layoutSequence(diagram) : diagram.kind === "state" ? kindParts("state", lang).layoutState(diagram, lang) : diagram.kind === "git" ? kindParts("git", lang).layoutGit(diagram) : diagram.kind === "time" ? kindParts("time", lang).layoutTime(diagram, lang) : diagram.kind === "tree" ? kindParts("tree", lang).layoutTree(diagram) : diagram.kind === "lineup" ? kindParts("lineup", lang).layoutLineup(diagram) : layoutArchitecture(diagram);
|
|
9511
9543
|
return renderLayout(diagram, layout, buildTimeline(diagram, options.still === true), options);
|
|
@@ -9521,11 +9553,11 @@ function renderLayout(diagram, layout, timeline, options = {}) {
|
|
|
9521
9553
|
palette: palette.id,
|
|
9522
9554
|
theme,
|
|
9523
9555
|
...diagram.view ? { view: diagram.view } : {},
|
|
9524
|
-
fonts: { ...
|
|
9556
|
+
fonts: { ..._chunkSUL4AJLIcjs.FONTS },
|
|
9525
9557
|
layout,
|
|
9526
9558
|
timeline,
|
|
9527
9559
|
diagram,
|
|
9528
|
-
overlaps:
|
|
9560
|
+
overlaps: _chunkV34DCH34cjs.findOverlaps.call(void 0, ink, timeline.stills, traces)
|
|
9529
9561
|
};
|
|
9530
9562
|
}
|
|
9531
9563
|
|
|
@@ -9533,16 +9565,16 @@ function renderLayout(diagram, layout, timeline, options = {}) {
|
|
|
9533
9565
|
function chooseView(rendered, frameWidth, frameHeight) {
|
|
9534
9566
|
const byWidth = Math.max(0, frameWidth) / rendered.layout.width;
|
|
9535
9567
|
const scale = frameHeight === void 0 ? byWidth : Math.min(byWidth, Math.max(0, frameHeight) / rendered.layout.height);
|
|
9536
|
-
const textPx = scale *
|
|
9568
|
+
const textPx = scale * _chunkSUL4AJLIcjs.TYPE.boxName.size;
|
|
9537
9569
|
if (rendered.view) return { mode: rendered.view, textPx };
|
|
9538
|
-
return { mode: textPx >=
|
|
9570
|
+
return { mode: textPx >= _chunkSUL4AJLIcjs.READABLE_PX ? "fixed" : "follow", textPx };
|
|
9539
9571
|
}
|
|
9540
9572
|
|
|
9541
9573
|
// src/player.ts
|
|
9542
9574
|
var font2 = (t) => `font:${t.weight} ${t.size}px var(--${t.family})`;
|
|
9543
9575
|
var px = (v) => `${v}px`;
|
|
9544
9576
|
function playerCss() {
|
|
9545
|
-
const P =
|
|
9577
|
+
const P = _chunkSUL4AJLIcjs.LOOK.player;
|
|
9546
9578
|
const hidden = px(P.hidden);
|
|
9547
9579
|
return [
|
|
9548
9580
|
`.dg-player{display:flex;flex-direction:column;gap:${px(P.gap)};color:var(--ink)}`,
|
|
@@ -9551,15 +9583,15 @@ function playerCss() {
|
|
|
9551
9583
|
`.dg-bar{container:dg-bar/inline-size}`,
|
|
9552
9584
|
`.dg-row{display:flex;align-items:flex-start;gap:${px(P.gap)}}`,
|
|
9553
9585
|
`.dg-btns{display:flex;gap:${px(P.gap / 2)};flex:none}`,
|
|
9554
|
-
`.dg-btn{width:${px(P.button)};height:${px(P.button)};border-radius:${px(P.radius)};border:${px(
|
|
9586
|
+
`.dg-btn{width:${px(P.button)};height:${px(P.button)};border-radius:${px(P.radius)};border:${px(_chunkSUL4AJLIcjs.LOOK.stroke.hair)} solid var(--hair);background:var(--surf);color:var(--ink);${font2(_chunkSUL4AJLIcjs.TYPE.button)};cursor:pointer}`,
|
|
9555
9587
|
`.dg-btn:focus-visible{outline:${px(P.focus)} solid var(--c-blue);outline-offset:${px(P.focus)}}`,
|
|
9556
9588
|
`.dg-say{display:flex;gap:${px(P.gap)};min-width:0}`,
|
|
9557
|
-
`.dg-no{${font2(
|
|
9589
|
+
`.dg-no{${font2(_chunkSUL4AJLIcjs.TYPE.stepNo)};color:var(--mute);padding-top:${px(P.focus)}}`,
|
|
9558
9590
|
`.dg-txt{display:grid;grid-template-columns:minmax(0,1fr);min-width:0}`,
|
|
9559
9591
|
`.dg-txt>*{grid-area:1/1}`,
|
|
9560
9592
|
`.dg-room{visibility:hidden}`,
|
|
9561
|
-
`.dg-tt{${font2(
|
|
9562
|
-
`.dg-tb{${font2(
|
|
9593
|
+
`.dg-tt{${font2(_chunkSUL4AJLIcjs.TYPE.stepTitle)};margin:0}`,
|
|
9594
|
+
`.dg-tb{${font2(_chunkSUL4AJLIcjs.TYPE.stepBody)};color:var(--ink2);margin:0;white-space:pre-line}`,
|
|
9563
9595
|
`.dg-sr{position:absolute;width:${hidden};height:${hidden};margin:-${hidden};padding:0;overflow:hidden;clip:rect(0 0 0 0);clip-path:inset(50%);white-space:nowrap;border:0}`,
|
|
9564
9596
|
// 狭い帯 (携帯の幅) では、段を送る釦を指で押せる大きさにし、その横に番号を置き、
|
|
9565
9597
|
// 題を 2 段目、本文を 3 段目に置いてどちらも帯の全幅を使う (#3057、#3069)。
|
|
@@ -9570,7 +9602,7 @@ function playerCss() {
|
|
|
9570
9602
|
// 指で触る時は、広い帯でも段を送る釦を指で押せる大きさにする (#3076)。並びは横 1 列のまま変えない。
|
|
9571
9603
|
// 広い帯は本文が 2 行あれば帯の高さが変わらず、本文の無い帯だけが釦の分だけ高くなる
|
|
9572
9604
|
`@media (pointer: coarse){.dg-btn{width:${px(P.touch)};height:${px(P.touch)}}}`,
|
|
9573
|
-
`.dg-spot{fill:none;stroke:var(--t-amber);stroke-width:${px(
|
|
9605
|
+
`.dg-spot{fill:none;stroke:var(--t-amber);stroke-width:${px(_chunkSUL4AJLIcjs.LOOK.stroke.mark)};stroke-dasharray:${_chunkSUL4AJLIcjs.LOOK.mark.dash} ${_chunkSUL4AJLIcjs.LOOK.mark.gap};pointer-events:none}`
|
|
9574
9606
|
].join("");
|
|
9575
9607
|
}
|
|
9576
9608
|
function ensureCss(doc) {
|
|
@@ -9587,10 +9619,10 @@ var stepNo = (step, count) => `${pad(step + 1)}/${pad(count)}`;
|
|
|
9587
9619
|
function mountDiagram(host, diagram, options = {}) {
|
|
9588
9620
|
const doc = host.ownerDocument;
|
|
9589
9621
|
const win = doc.defaultView;
|
|
9590
|
-
const reduce = Boolean(_optionalChain([win, 'optionalAccess',
|
|
9622
|
+
const reduce = Boolean(_optionalChain([win, 'optionalAccess', _244 => _244.matchMedia, 'optionalCall', _245 => _245("(prefers-reduced-motion: reduce)"), 'access', _246 => _246.matches]));
|
|
9591
9623
|
const rendered = renderDiagram(diagram, options);
|
|
9592
9624
|
const lang = _nullishCoalesce(options.lang, () => ( "ja"));
|
|
9593
|
-
const words =
|
|
9625
|
+
const words = _chunkSUL4AJLIcjs.FIGURE_TEXT[lang];
|
|
9594
9626
|
const palette = paletteOf(options, rendered.theme);
|
|
9595
9627
|
const { timeline } = rendered;
|
|
9596
9628
|
const steps = rendered.diagram.steps;
|
|
@@ -9599,7 +9631,7 @@ function mountDiagram(host, diagram, options = {}) {
|
|
|
9599
9631
|
const root = doc.createElement("div");
|
|
9600
9632
|
root.className = "dg-player";
|
|
9601
9633
|
root.dataset.dragon = "player";
|
|
9602
|
-
root.setAttribute("style", `${
|
|
9634
|
+
root.setAttribute("style", `${_chunkSUL4AJLIcjs.FONT_VARS};${_chunkSUL4AJLIcjs.paletteVars.call(void 0, palette, rendered.theme)}`);
|
|
9603
9635
|
const frame = doc.createElement("div");
|
|
9604
9636
|
frame.className = "dg-frame";
|
|
9605
9637
|
const button = (name2, label2, text2) => {
|
|
@@ -9707,7 +9739,7 @@ function mountDiagram(host, diagram, options = {}) {
|
|
|
9707
9739
|
if (!svg) return;
|
|
9708
9740
|
for (const old of svg.querySelectorAll(".dg-spots")) old.remove();
|
|
9709
9741
|
if (marked.length === 0) return;
|
|
9710
|
-
const M =
|
|
9742
|
+
const M = _chunkSUL4AJLIcjs.LOOK.mark;
|
|
9711
9743
|
const group = doc.createElementNS(SVG_NS, "g");
|
|
9712
9744
|
group.setAttribute("class", "dg-spots");
|
|
9713
9745
|
for (const r of marked) {
|
|
@@ -9756,11 +9788,11 @@ function mountDiagram(host, diagram, options = {}) {
|
|
|
9756
9788
|
const show = () => {
|
|
9757
9789
|
const current = steps[step];
|
|
9758
9790
|
no.textContent = stepNo(step, count);
|
|
9759
|
-
title.textContent = _nullishCoalesce(_optionalChain([current, 'optionalAccess',
|
|
9760
|
-
body.textContent = _nullishCoalesce(_optionalChain([current, 'optionalAccess',
|
|
9791
|
+
title.textContent = _nullishCoalesce(_optionalChain([current, 'optionalAccess', _247 => _247.title]), () => ( ""));
|
|
9792
|
+
body.textContent = _nullishCoalesce(_optionalChain([current, 'optionalAccess', _248 => _248.body]), () => ( ""));
|
|
9761
9793
|
toggleButton.setAttribute("aria-label", playing ? words.pause : words.play);
|
|
9762
9794
|
toggleButton.textContent = playing ? BUTTON_TEXT.pause : BUTTON_TEXT.play;
|
|
9763
|
-
_optionalChain([options, 'access',
|
|
9795
|
+
_optionalChain([options, 'access', _249 => _249.onStep, 'optionalCall', _250 => _250(step)]);
|
|
9764
9796
|
};
|
|
9765
9797
|
const restart = (t, play) => {
|
|
9766
9798
|
at = t;
|
|
@@ -9782,7 +9814,7 @@ function mountDiagram(host, diagram, options = {}) {
|
|
|
9782
9814
|
};
|
|
9783
9815
|
place(markup());
|
|
9784
9816
|
show();
|
|
9785
|
-
const timer = _optionalChain([win, 'optionalAccess',
|
|
9817
|
+
const timer = _optionalChain([win, 'optionalAccess', _251 => _251.setInterval, 'call', _252 => _252(() => {
|
|
9786
9818
|
if (!playing) return;
|
|
9787
9819
|
if (options.playOnce && at + (Date.now() - born) / 1e3 >= lastStill) {
|
|
9788
9820
|
step = count - 1;
|
|
@@ -9799,7 +9831,7 @@ function mountDiagram(host, diagram, options = {}) {
|
|
|
9799
9831
|
const onNext = () => go(step + 1);
|
|
9800
9832
|
const onToggle = () => playing ? restart(now(), false) : resume();
|
|
9801
9833
|
const onFigure = (event2) => {
|
|
9802
|
-
const target = _optionalChain([event2, 'access',
|
|
9834
|
+
const target = _optionalChain([event2, 'access', _253 => _253.target, 'optionalAccess', _254 => _254.closest, 'optionalCall', _255 => _255("[data-step]")]);
|
|
9803
9835
|
const s = target ? Number(target.getAttribute("data-step")) : Number.NaN;
|
|
9804
9836
|
if (Number.isInteger(s)) go(s);
|
|
9805
9837
|
};
|
|
@@ -9807,7 +9839,7 @@ function mountDiagram(host, diagram, options = {}) {
|
|
|
9807
9839
|
nextButton.addEventListener("click", onNext);
|
|
9808
9840
|
toggleButton.addEventListener("click", onToggle);
|
|
9809
9841
|
frame.addEventListener("click", onFigure);
|
|
9810
|
-
const Observer = _optionalChain([win, 'optionalAccess',
|
|
9842
|
+
const Observer = _optionalChain([win, 'optionalAccess', _256 => _256.ResizeObserver]);
|
|
9811
9843
|
const observer = Observer ? new Observer(() => {
|
|
9812
9844
|
const w = frameWidth();
|
|
9813
9845
|
const h = frameHeight();
|
|
@@ -9820,7 +9852,7 @@ function mountDiagram(host, diagram, options = {}) {
|
|
|
9820
9852
|
at = t;
|
|
9821
9853
|
place(markup());
|
|
9822
9854
|
}) : void 0;
|
|
9823
|
-
_optionalChain([observer, 'optionalAccess',
|
|
9855
|
+
_optionalChain([observer, 'optionalAccess', _257 => _257.observe, 'call', _258 => _258(frame)]);
|
|
9824
9856
|
return {
|
|
9825
9857
|
get step() {
|
|
9826
9858
|
return step;
|
|
@@ -9845,8 +9877,8 @@ function mountDiagram(host, diagram, options = {}) {
|
|
|
9845
9877
|
drawMarks();
|
|
9846
9878
|
},
|
|
9847
9879
|
destroy: () => {
|
|
9848
|
-
if (timer !== void 0) _optionalChain([win, 'optionalAccess',
|
|
9849
|
-
_optionalChain([observer, 'optionalAccess',
|
|
9880
|
+
if (timer !== void 0) _optionalChain([win, 'optionalAccess', _259 => _259.clearInterval, 'call', _260 => _260(timer)]);
|
|
9881
|
+
_optionalChain([observer, 'optionalAccess', _261 => _261.disconnect, 'call', _262 => _262()]);
|
|
9850
9882
|
prevButton.removeEventListener("click", onPrev);
|
|
9851
9883
|
nextButton.removeEventListener("click", onNext);
|
|
9852
9884
|
toggleButton.removeEventListener("click", onToggle);
|
|
@@ -9858,11 +9890,11 @@ function mountDiagram(host, diagram, options = {}) {
|
|
|
9858
9890
|
|
|
9859
9891
|
// src/light.ts
|
|
9860
9892
|
var LOADERS = {
|
|
9861
|
-
git: () => Promise.resolve().then(() => _interopRequireWildcard(require("./git-
|
|
9862
|
-
lineup: () => Promise.resolve().then(() => _interopRequireWildcard(require("./lineup-
|
|
9863
|
-
state: () => Promise.resolve().then(() => _interopRequireWildcard(require("./state-
|
|
9864
|
-
time: () => Promise.resolve().then(() => _interopRequireWildcard(require("./time-
|
|
9865
|
-
tree: () => Promise.resolve().then(() => _interopRequireWildcard(require("./tree-
|
|
9893
|
+
git: () => Promise.resolve().then(() => _interopRequireWildcard(require("./git-WBGFDRBD.cjs"))),
|
|
9894
|
+
lineup: () => Promise.resolve().then(() => _interopRequireWildcard(require("./lineup-WLGNGTFX.cjs"))),
|
|
9895
|
+
state: () => Promise.resolve().then(() => _interopRequireWildcard(require("./state-JVAH4TSM.cjs"))),
|
|
9896
|
+
time: () => Promise.resolve().then(() => _interopRequireWildcard(require("./time-EXRPI34B.cjs"))),
|
|
9897
|
+
tree: () => Promise.resolve().then(() => _interopRequireWildcard(require("./tree-DECHTXFU.cjs")))
|
|
9866
9898
|
};
|
|
9867
9899
|
var isLater = (kind) => LATER_KINDS.includes(kind);
|
|
9868
9900
|
async function loadKind(kind) {
|
|
@@ -9893,5 +9925,5 @@ async function register(kind) {
|
|
|
9893
9925
|
|
|
9894
9926
|
|
|
9895
9927
|
|
|
9896
|
-
exports.DEFAULT_PALETTE =
|
|
9928
|
+
exports.DEFAULT_PALETTE = _chunkSUL4AJLIcjs.DEFAULT_PALETTE; exports.FONTS = _chunkSUL4AJLIcjs.FONTS; exports.FORMAT_VERSION = FORMAT_VERSION; exports.ICONS = _chunkV34DCH34cjs.ICONS; exports.LATER_KINDS = LATER_KINDS; exports.PALETTES = _chunkSUL4AJLIcjs.PALETTES; exports.READABLE_PX = _chunkSUL4AJLIcjs.READABLE_PX; exports.chooseView = chooseView; exports.describeOverlap = _chunkV34DCH34cjs.describeOverlap; exports.extractDiagrams = extractDiagrams; exports.iconSvg = _chunkV34DCH34cjs.iconSvg; exports.kindLoaded = kindLoaded; exports.loadKind = loadKind; exports.mountDiagram = mountDiagram; exports.parseNotation = parseNotation; exports.printNotation = printNotation; exports.readDiagram = readDiagram; exports.renderDiagram = renderDiagram; exports.resolvePalette = _chunkSUL4AJLIcjs.resolvePalette; exports.validateDiagram = validateDiagram;
|
|
9897
9929
|
//# sourceMappingURL=index.cjs.map
|