@cardenelabs/dragon 0.45.3 → 0.46.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli.cjs +97 -104
- package/dist/cli.cjs.map +1 -1
- package/dist/cli.js +97 -104
- package/dist/cli.js.map +1 -1
- package/dist/export.cjs +91 -104
- package/dist/export.cjs.map +1 -1
- package/dist/export.js +91 -104
- package/dist/export.js.map +1 -1
- package/dist/index.cjs +55 -62
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +55 -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 +358 -372
- package/dist/light/index.cjs.map +1 -1
- package/dist/light/index.js +43 -57
- 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-PQCPVQOE.cjs → time-EXRPI34B.cjs} +90 -88
- package/dist/light/time-EXRPI34B.cjs.map +1 -0
- package/dist/light/{time-6WEMD4FQ.js → time-M3EGEFDU.js} +10 -8
- package/dist/light/{time-6WEMD4FQ.js.map → time-M3EGEFDU.js.map} +1 -1
- 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 +27 -48
- package/dist/node.cjs.map +1 -1
- package/dist/node.js +27 -48
- package/dist/node.js.map +1 -1
- package/dist/player.global.js +3 -3
- package/package.json +1 -1
- package/src/look/values.ts +5 -1
- package/src/messages.ts +4 -1
- package/src/parser.ts +4 -2
- package/src/render/draw.ts +2 -1
- package/src/render/parts.ts +28 -7
- package/src/render/time.ts +13 -6
- package/src/schema.ts +6 -0
- 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-PQCPVQOE.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/{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
|
|
|
@@ -211,7 +212,7 @@ function ucs2length(str) {
|
|
|
211
212
|
return length;
|
|
212
213
|
}
|
|
213
214
|
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" } } } } };
|
|
215
|
+
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
216
|
function validate11(data, { instancePath = "", parentData, parentDataProperty, rootData = data } = {}) {
|
|
216
217
|
let vErrors = null;
|
|
217
218
|
let errors = 0;
|
|
@@ -1175,6 +1176,7 @@ function validate25(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
1175
1176
|
return errors === 0;
|
|
1176
1177
|
}
|
|
1177
1178
|
var schema79 = { "enum": ["blue", "amber", "green", "violet", "rose", "slate", "coin"] };
|
|
1179
|
+
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
1180
|
var pattern0 = new RegExp("^[^\\s\\[\\]\u300C\u300D=:]+$", "u");
|
|
1179
1181
|
var func3 = ucs2length;
|
|
1180
1182
|
function validate30(data, { instancePath = "", parentData, parentDataProperty, rootData = data } = {}) {
|
|
@@ -1290,32 +1292,22 @@ function validate30(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
1290
1292
|
}
|
|
1291
1293
|
if (data.icon !== void 0) {
|
|
1292
1294
|
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" };
|
|
1295
|
+
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")) {
|
|
1296
|
+
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
1297
|
if (vErrors === null) {
|
|
1306
|
-
vErrors = [
|
|
1298
|
+
vErrors = [err10];
|
|
1307
1299
|
} else {
|
|
1308
|
-
vErrors.push(
|
|
1300
|
+
vErrors.push(err10);
|
|
1309
1301
|
}
|
|
1310
1302
|
errors++;
|
|
1311
1303
|
}
|
|
1312
1304
|
}
|
|
1313
1305
|
} else {
|
|
1314
|
-
const
|
|
1306
|
+
const err11 = { instancePath, schemaPath: "#/type", keyword: "type", params: { type: "object" }, message: "must be object" };
|
|
1315
1307
|
if (vErrors === null) {
|
|
1316
|
-
vErrors = [
|
|
1308
|
+
vErrors = [err11];
|
|
1317
1309
|
} else {
|
|
1318
|
-
vErrors.push(
|
|
1310
|
+
vErrors.push(err11);
|
|
1319
1311
|
}
|
|
1320
1312
|
errors++;
|
|
1321
1313
|
}
|
|
@@ -1436,22 +1428,12 @@ function validate32(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
1436
1428
|
}
|
|
1437
1429
|
if (data.icon !== void 0) {
|
|
1438
1430
|
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" };
|
|
1431
|
+
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")) {
|
|
1432
|
+
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
1433
|
if (vErrors === null) {
|
|
1452
|
-
vErrors = [
|
|
1434
|
+
vErrors = [err10];
|
|
1453
1435
|
} else {
|
|
1454
|
-
vErrors.push(
|
|
1436
|
+
vErrors.push(err10);
|
|
1455
1437
|
}
|
|
1456
1438
|
errors++;
|
|
1457
1439
|
}
|
|
@@ -1460,20 +1442,20 @@ function validate32(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
1460
1442
|
let data5 = data.region;
|
|
1461
1443
|
if (typeof data5 === "string") {
|
|
1462
1444
|
if (!pattern0.test(data5)) {
|
|
1463
|
-
const
|
|
1445
|
+
const err11 = { instancePath: instancePath + "/region", schemaPath: "#/definitions/id/pattern", keyword: "pattern", params: { pattern: "^[^\\s\\[\\]\u300C\u300D=:]+$" }, message: 'must match pattern "^[^\\s\\[\\]\u300C\u300D=:]+$"' };
|
|
1464
1446
|
if (vErrors === null) {
|
|
1465
|
-
vErrors = [
|
|
1447
|
+
vErrors = [err11];
|
|
1466
1448
|
} else {
|
|
1467
|
-
vErrors.push(
|
|
1449
|
+
vErrors.push(err11);
|
|
1468
1450
|
}
|
|
1469
1451
|
errors++;
|
|
1470
1452
|
}
|
|
1471
1453
|
} else {
|
|
1472
|
-
const
|
|
1454
|
+
const err12 = { instancePath: instancePath + "/region", schemaPath: "#/definitions/id/type", keyword: "type", params: { type: "string" }, message: "must be string" };
|
|
1473
1455
|
if (vErrors === null) {
|
|
1474
|
-
vErrors = [
|
|
1456
|
+
vErrors = [err12];
|
|
1475
1457
|
} else {
|
|
1476
|
-
vErrors.push(
|
|
1458
|
+
vErrors.push(err12);
|
|
1477
1459
|
}
|
|
1478
1460
|
errors++;
|
|
1479
1461
|
}
|
|
@@ -1482,30 +1464,30 @@ function validate32(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
1482
1464
|
let data6 = data.link;
|
|
1483
1465
|
if (typeof data6 === "string") {
|
|
1484
1466
|
if (!pattern3.test(data6)) {
|
|
1485
|
-
const
|
|
1467
|
+
const err13 = { instancePath: instancePath + "/link", schemaPath: "#/definitions/url/pattern", keyword: "pattern", params: { pattern: "^(/|https?://)" }, message: 'must match pattern "^(/|https?://)"' };
|
|
1486
1468
|
if (vErrors === null) {
|
|
1487
|
-
vErrors = [
|
|
1469
|
+
vErrors = [err13];
|
|
1488
1470
|
} else {
|
|
1489
|
-
vErrors.push(
|
|
1471
|
+
vErrors.push(err13);
|
|
1490
1472
|
}
|
|
1491
1473
|
errors++;
|
|
1492
1474
|
}
|
|
1493
1475
|
} else {
|
|
1494
|
-
const
|
|
1476
|
+
const err14 = { instancePath: instancePath + "/link", schemaPath: "#/definitions/url/type", keyword: "type", params: { type: "string" }, message: "must be string" };
|
|
1495
1477
|
if (vErrors === null) {
|
|
1496
|
-
vErrors = [
|
|
1478
|
+
vErrors = [err14];
|
|
1497
1479
|
} else {
|
|
1498
|
-
vErrors.push(
|
|
1480
|
+
vErrors.push(err14);
|
|
1499
1481
|
}
|
|
1500
1482
|
errors++;
|
|
1501
1483
|
}
|
|
1502
1484
|
}
|
|
1503
1485
|
} else {
|
|
1504
|
-
const
|
|
1486
|
+
const err15 = { instancePath, schemaPath: "#/type", keyword: "type", params: { type: "object" }, message: "must be object" };
|
|
1505
1487
|
if (vErrors === null) {
|
|
1506
|
-
vErrors = [
|
|
1488
|
+
vErrors = [err15];
|
|
1507
1489
|
} else {
|
|
1508
|
-
vErrors.push(
|
|
1490
|
+
vErrors.push(err15);
|
|
1509
1491
|
}
|
|
1510
1492
|
errors++;
|
|
1511
1493
|
}
|
|
@@ -6565,6 +6547,7 @@ function validate10(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
6565
6547
|
|
|
6566
6548
|
// src/schema.ts
|
|
6567
6549
|
var COLORS = ["blue", "amber", "green", "violet", "rose", "slate", "coin"];
|
|
6550
|
+
var ICON_NAMES = Object.keys(_chunkV34DCH34cjs.ICONS);
|
|
6568
6551
|
var EVENT_TYPES = ["edge", "action", "swap", "strip", "commit", "branch", "now", "mark", "span", "leaf", "node", "line", "seal", "open", "pick", "stamp"];
|
|
6569
6552
|
var ABSENT = "#/definitions/absent/not";
|
|
6570
6553
|
var ABSENT_KINDS = {
|
|
@@ -6741,6 +6724,7 @@ var ja2 = () => {
|
|
|
6741
6724
|
attrTwice: (key2) => `${key2} \u306F 1 \u3064\u306E\u884C\u306B 1 \u3064\u307E\u3067`,
|
|
6742
6725
|
badAttr: (key2, allowed) => `${key2} \u306F\u3053\u306E\u884C\u306B\u66F8\u3051\u306A\u3044\u5C5E\u6027\u3002\u66F8\u3051\u308B\u306E\u306F ${list(allowed)}`,
|
|
6743
6726
|
badColor: `color \u306F ${list(COLORS)} \u306E\u3069\u308C\u304B`,
|
|
6727
|
+
badIcon: `icon \u306F ${list(ICON_NAMES)} \u306E\u3069\u308C\u304B`,
|
|
6744
6728
|
badView: `view \u306F ${list(_chunkCLS6JVKKcjs.VIEWS)} \u306E\u3069\u308C\u304B`,
|
|
6745
6729
|
badCarry: `carry \u306F ${list(_chunkCLS6JVKKcjs.CARRIES)} \u306E\u3069\u308C\u304B\u3002\u672D\u306F tag: <\u5024> \u3067\u66F8\u304F`,
|
|
6746
6730
|
badSide: `side \u306F ${list(_chunkCLS6JVKKcjs.SIDES)} \u306E\u3069\u308C\u304B`,
|
|
@@ -6879,6 +6863,7 @@ var en2 = () => {
|
|
|
6879
6863
|
attrTwice: (key2) => `Write ${key2} only once on a line`,
|
|
6880
6864
|
badAttr: (key2, allowed) => `${key2} cannot be written on this line. Write ${list(allowed)}`,
|
|
6881
6865
|
badColor: `color is one of ${list(COLORS)}`,
|
|
6866
|
+
badIcon: `icon is one of ${list(ICON_NAMES)}`,
|
|
6882
6867
|
badView: `view is one of ${list(_chunkCLS6JVKKcjs.VIEWS)}`,
|
|
6883
6868
|
badCarry: `carry is one of ${list(_chunkCLS6JVKKcjs.CARRIES)}. Write a tag as tag: <value>`,
|
|
6884
6869
|
badSide: `side is one of ${list(_chunkCLS6JVKKcjs.SIDES)}`,
|
|
@@ -7138,12 +7123,13 @@ function readDeclared(source, word, allowed, m) {
|
|
|
7138
7123
|
function lookOf(source, attrs2, m) {
|
|
7139
7124
|
const color = attrs2.get("color");
|
|
7140
7125
|
if (color && !isOneOf(COLORS, color.value)) throw fail(source, color.at, m.badColor);
|
|
7126
|
+
const icon = attrs2.get("icon");
|
|
7127
|
+
if (icon && !ICON_NAMES.includes(icon.value)) throw fail(source, icon.at, m.badIcon);
|
|
7141
7128
|
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
7129
|
return {
|
|
7144
7130
|
...note !== void 0 ? { note } : {},
|
|
7145
7131
|
...color ? { color: color.value } : {},
|
|
7146
|
-
...icon
|
|
7132
|
+
...icon ? { icon: icon.value } : {}
|
|
7147
7133
|
};
|
|
7148
7134
|
}
|
|
7149
7135
|
function oldForm(text, inStep) {
|
|
@@ -7172,7 +7158,7 @@ function parseLines(lines, m) {
|
|
|
7172
7158
|
const title = titled.value;
|
|
7173
7159
|
const shown2 = titled.rest < head.text.length ? readAttrs(head, titled.rest, _chunkCLS6JVKKcjs.ATTRS.diagram, m).get("view") : void 0;
|
|
7174
7160
|
if (shown2 && !isOneOf(_chunkCLS6JVKKcjs.VIEWS, shown2.value)) throw fail(head, shown2.at, m.badView);
|
|
7175
|
-
const view = _optionalChain([shown2, 'optionalAccess',
|
|
7161
|
+
const view = _optionalChain([shown2, 'optionalAccess', _15 => _15.value]);
|
|
7176
7162
|
const isState = kind === "state";
|
|
7177
7163
|
const isGit = kind === "git";
|
|
7178
7164
|
const isTime = kind === "time";
|
|
@@ -7450,7 +7436,7 @@ function parseLines(lines, m) {
|
|
|
7450
7436
|
if (firstBox && !zoom) throw fail(firstBox, 0, m.boxNeedsZoom);
|
|
7451
7437
|
}
|
|
7452
7438
|
function countOf() {
|
|
7453
|
-
return _nullishCoalesce(_optionalChain([scale, 'optionalAccess',
|
|
7439
|
+
return _nullishCoalesce(_optionalChain([scale, 'optionalAccess', _16 => _16.count]), () => ( 0));
|
|
7454
7440
|
}
|
|
7455
7441
|
function unitAt(source, at, text) {
|
|
7456
7442
|
if (!NUMBER.test(text) || Number(text) >= countOf()) throw fail(source, at, m.badUnit(text, countOf()));
|
|
@@ -7458,8 +7444,8 @@ function parseLines(lines, m) {
|
|
|
7458
7444
|
}
|
|
7459
7445
|
function rangeAt(source, at, text) {
|
|
7460
7446
|
const found = RANGE.exec(text);
|
|
7461
|
-
const from = Number(_optionalChain([found, 'optionalAccess',
|
|
7462
|
-
const to = Number(_nullishCoalesce(_optionalChain([found, 'optionalAccess',
|
|
7447
|
+
const from = Number(_optionalChain([found, 'optionalAccess', _17 => _17[1]]));
|
|
7448
|
+
const to = Number(_nullishCoalesce(_optionalChain([found, 'optionalAccess', _18 => _18[2]]), () => ( _optionalChain([found, 'optionalAccess', _19 => _19[1]]))));
|
|
7463
7449
|
if (!found || from > to || to >= countOf()) throw fail(source, at, m.badUnit(text, countOf()));
|
|
7464
7450
|
return { from, to };
|
|
7465
7451
|
}
|
|
@@ -7468,7 +7454,7 @@ function parseLines(lines, m) {
|
|
|
7468
7454
|
if (scale) throw fail(source, 0, m.timeTwice("scale"));
|
|
7469
7455
|
const text = source.text;
|
|
7470
7456
|
const found = SCALE.exec(text);
|
|
7471
|
-
const at = (k) => _nullishCoalesce(_optionalChain([found, 'optionalAccess',
|
|
7457
|
+
const at = (k) => _nullishCoalesce(_optionalChain([found, 'optionalAccess', _20 => _20.indices, 'optionalAccess', _21 => _21[k], 'optionalAccess', _22 => _22[0]]), () => ( 0));
|
|
7472
7458
|
if (!found) throw fail(source, 0, m.scaleShape);
|
|
7473
7459
|
const rest2 = skipSpaces(text, found[0].length);
|
|
7474
7460
|
if (rest2 < text.length && text[rest2] !== "[") throw fail(source, rest2, m.scaleShape);
|
|
@@ -7489,7 +7475,7 @@ function parseLines(lines, m) {
|
|
|
7489
7475
|
const rest2 = skipSpaces(text, found[0].length);
|
|
7490
7476
|
if (rest2 < text.length && text[rest2] !== "[") throw fail(source, rest2, m.periodShape);
|
|
7491
7477
|
const length = _nullishCoalesce(found[2], () => ( ""));
|
|
7492
|
-
if (!COUNT.test(length)) throw fail(source, _nullishCoalesce(_optionalChain([found, 'access',
|
|
7478
|
+
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
7479
|
const first = rest2 < text.length ? readAttrs(source, rest2, _chunkCLS6JVKKcjs.ATTRS.period, m).get("from") : void 0;
|
|
7494
7480
|
if (first && !NUMBER.test(first.value)) throw fail(source, first.at, m.periodShape);
|
|
7495
7481
|
period = { name: _nullishCoalesce(found[1], () => ( "")), length: Number(length), ...first ? { from: Number(first.value) } : {} };
|
|
@@ -7515,11 +7501,11 @@ function parseLines(lines, m) {
|
|
|
7515
7501
|
function readPoint(source) {
|
|
7516
7502
|
beforeSteps(source);
|
|
7517
7503
|
const found = POINT.exec(source.text);
|
|
7518
|
-
const id = _optionalChain([found, 'optionalAccess',
|
|
7519
|
-
const unit = _optionalChain([found, 'optionalAccess',
|
|
7504
|
+
const id = _optionalChain([found, 'optionalAccess', _26 => _26[1]]);
|
|
7505
|
+
const unit = _optionalChain([found, 'optionalAccess', _27 => _27[2]]);
|
|
7520
7506
|
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',
|
|
7507
|
+
const idAt = _nullishCoalesce(_optionalChain([found, 'access', _28 => _28.indices, 'optionalAccess', _29 => _29[1], 'optionalAccess', _30 => _30[0]]), () => ( 0));
|
|
7508
|
+
const unitStart = _nullishCoalesce(_optionalChain([found, 'access', _31 => _31.indices, 'optionalAccess', _32 => _32[2], 'optionalAccess', _33 => _33[0]]), () => ( 0));
|
|
7523
7509
|
if (!ID.test(id)) throw fail(source, idAt, m.badId(id));
|
|
7524
7510
|
notReserved(source, id, idAt);
|
|
7525
7511
|
if (rows.some((row) => row.id === id)) throw fail(source, idAt, m.duplicate(id));
|
|
@@ -7534,9 +7520,9 @@ function parseLines(lines, m) {
|
|
|
7534
7520
|
beforeSteps(source);
|
|
7535
7521
|
if (zoom) throw fail(source, 0, m.timeTwice("zoom"));
|
|
7536
7522
|
const found = ZOOM.exec(source.text);
|
|
7537
|
-
const range2 = _optionalChain([found, 'optionalAccess',
|
|
7523
|
+
const range2 = _optionalChain([found, 'optionalAccess', _34 => _34[1]]);
|
|
7538
7524
|
if (!found || range2 === void 0) throw fail(source, 0, m.zoomShape);
|
|
7539
|
-
const rangeStart = _nullishCoalesce(_optionalChain([found, 'access',
|
|
7525
|
+
const rangeStart = _nullishCoalesce(_optionalChain([found, 'access', _35 => _35.indices, 'optionalAccess', _36 => _36[1], 'optionalAccess', _37 => _37[0]]), () => ( 0));
|
|
7540
7526
|
const placed = { from: 0, to: 0 };
|
|
7541
7527
|
zoom = placed;
|
|
7542
7528
|
pending.push(() => {
|
|
@@ -7545,9 +7531,9 @@ function parseLines(lines, m) {
|
|
|
7545
7531
|
}
|
|
7546
7532
|
function readNow(source) {
|
|
7547
7533
|
const found = NOW_LINE.exec(source.text);
|
|
7548
|
-
const unit = _optionalChain([found, 'optionalAccess',
|
|
7534
|
+
const unit = _optionalChain([found, 'optionalAccess', _38 => _38[1]]);
|
|
7549
7535
|
if (!found || unit === void 0) throw fail(source, 0, m.nowShape);
|
|
7550
|
-
const at = _nullishCoalesce(_optionalChain([found, 'access',
|
|
7536
|
+
const at = _nullishCoalesce(_optionalChain([found, 'access', _39 => _39.indices, 'optionalAccess', _40 => _40[1], 'optionalAccess', _41 => _41[0]]), () => ( 0));
|
|
7551
7537
|
const to = unitAt(source, at, unit);
|
|
7552
7538
|
if (to + 1 <= needle) throw fail(source, at, m.nowBack(unit, needle - 1));
|
|
7553
7539
|
needle = to + 1;
|
|
@@ -7556,11 +7542,11 @@ function parseLines(lines, m) {
|
|
|
7556
7542
|
function readMark(source) {
|
|
7557
7543
|
const text = source.text;
|
|
7558
7544
|
const found = MARK.exec(text);
|
|
7559
|
-
const row = _optionalChain([found, 'optionalAccess',
|
|
7560
|
-
const range2 = _optionalChain([found, 'optionalAccess',
|
|
7545
|
+
const row = _optionalChain([found, 'optionalAccess', _42 => _42[1]]);
|
|
7546
|
+
const range2 = _optionalChain([found, 'optionalAccess', _43 => _43[2]]);
|
|
7561
7547
|
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',
|
|
7548
|
+
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));
|
|
7549
|
+
const { from, to } = rangeAt(source, _nullishCoalesce(_optionalChain([found, 'access', _47 => _47.indices, 'optionalAccess', _48 => _48[2], 'optionalAccess', _49 => _49[0]]), () => ( 0)), range2);
|
|
7564
7550
|
const rest2 = skipSpaces(text, found[0].length);
|
|
7565
7551
|
if (rest2 >= text.length || text[rest2] !== "[") throw fail(source, rest2, m.markShape);
|
|
7566
7552
|
const color = readAttrs(source, rest2, _chunkCLS6JVKKcjs.ATTRS.mark, m).get("color");
|
|
@@ -7570,9 +7556,9 @@ function parseLines(lines, m) {
|
|
|
7570
7556
|
}
|
|
7571
7557
|
function readSpan(source) {
|
|
7572
7558
|
const found = SPAN.exec(source.text);
|
|
7573
|
-
const range2 = _optionalChain([found, 'optionalAccess',
|
|
7559
|
+
const range2 = _optionalChain([found, 'optionalAccess', _50 => _50[1]]);
|
|
7574
7560
|
if (!found || range2 === void 0) throw fail(source, 0, m.spanShape);
|
|
7575
|
-
const { from, to } = rangeAt(source, _nullishCoalesce(_optionalChain([found, 'access',
|
|
7561
|
+
const { from, to } = rangeAt(source, _nullishCoalesce(_optionalChain([found, 'access', _51 => _51.indices, 'optionalAccess', _52 => _52[1], 'optionalAccess', _53 => _53[0]]), () => ( 0)), range2);
|
|
7576
7562
|
const named = readName(source, found[0].length, m);
|
|
7577
7563
|
if (named.value === "") throw fail(source, 0, m.spanShape);
|
|
7578
7564
|
const attrs2 = named.rest < source.text.length ? readAttrs(source, named.rest, _chunkCLS6JVKKcjs.ATTRS.span, m) : /* @__PURE__ */ new Map();
|
|
@@ -7584,9 +7570,9 @@ function parseLines(lines, m) {
|
|
|
7584
7570
|
}
|
|
7585
7571
|
function readTimeNote(source) {
|
|
7586
7572
|
const found = /^note\s+([^\s:]+)\s*:/du.exec(source.text);
|
|
7587
|
-
const id = _optionalChain([found, 'optionalAccess',
|
|
7573
|
+
const id = _optionalChain([found, 'optionalAccess', _54 => _54[1]]);
|
|
7588
7574
|
if (!found || id === void 0) throw fail(source, 0, m.noteShape);
|
|
7589
|
-
const idAt = _nullishCoalesce(_optionalChain([found, 'access',
|
|
7575
|
+
const idAt = _nullishCoalesce(_optionalChain([found, 'access', _55 => _55.indices, 'optionalAccess', _56 => _56[1], 'optionalAccess', _57 => _57[0]]), () => ( 0));
|
|
7590
7576
|
const isPoint = points.some((point) => point.id === id);
|
|
7591
7577
|
if (!isPoint && !boxes.some((box) => box.id === id)) throw fail(source, idAt, m.undeclaredNote(id));
|
|
7592
7578
|
const named = readName(source, found[0].length, m);
|
|
@@ -7645,16 +7631,16 @@ function parseLines(lines, m) {
|
|
|
7645
7631
|
if (declared.name !== void 0) throw fail(source, 0, m.branchShape);
|
|
7646
7632
|
notReserved(source, declared.id, declared.idAt);
|
|
7647
7633
|
declare(source, declared.id, declared.idAt);
|
|
7648
|
-
const note = _optionalChain([declared, 'access',
|
|
7634
|
+
const note = _optionalChain([declared, 'access', _58 => _58.attrs, 'access', _59 => _59.get, 'call', _60 => _60("note"), 'optionalAccess', _61 => _61.value]);
|
|
7649
7635
|
branches.push({ id: declared.id, ...note !== void 0 ? { note } : {} });
|
|
7650
7636
|
tips.set(declared.id, null);
|
|
7651
7637
|
}
|
|
7652
7638
|
function readCommit(source) {
|
|
7653
7639
|
const text = source.text;
|
|
7654
7640
|
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',
|
|
7641
|
+
const at = (k) => _nullishCoalesce(_optionalChain([found, 'optionalAccess', _62 => _62.indices, 'optionalAccess', _63 => _63[k], 'optionalAccess', _64 => _64[0]]), () => ( 0));
|
|
7642
|
+
const id = _optionalChain([found, 'optionalAccess', _65 => _65[1]]);
|
|
7643
|
+
const on = _optionalChain([found, 'optionalAccess', _66 => _66[2]]);
|
|
7658
7644
|
if (!found || id === void 0 || on === void 0) throw fail(source, 0, m.commitShape);
|
|
7659
7645
|
const rest2 = skipSpaces(text, found[0].length);
|
|
7660
7646
|
if (rest2 < text.length && text[rest2] !== "[") throw fail(source, rest2, m.commitShape);
|
|
@@ -7667,7 +7653,7 @@ function parseLines(lines, m) {
|
|
|
7667
7653
|
const attrs2 = rest2 < text.length ? readAttrs(source, rest2, _chunkCLS6JVKKcjs.ATTRS.commit, m) : /* @__PURE__ */ new Map();
|
|
7668
7654
|
const hash = attrs2.get("hash");
|
|
7669
7655
|
if (hash && !HASH.test(hash.value)) throw fail(source, hash.at, m.badHash);
|
|
7670
|
-
const note = _optionalChain([attrs2, 'access',
|
|
7656
|
+
const note = _optionalChain([attrs2, 'access', _67 => _67.get, 'call', _68 => _68("note"), 'optionalAccess', _69 => _69.value]);
|
|
7671
7657
|
commits.add(id);
|
|
7672
7658
|
if (copy === void 0) tips.set(branch, id);
|
|
7673
7659
|
return {
|
|
@@ -7688,19 +7674,19 @@ function parseLines(lines, m) {
|
|
|
7688
7674
|
}
|
|
7689
7675
|
function readCut(source) {
|
|
7690
7676
|
const found = CUT.exec(source.text);
|
|
7691
|
-
const branch = _optionalChain([found, 'optionalAccess',
|
|
7692
|
-
const from = _optionalChain([found, 'optionalAccess',
|
|
7677
|
+
const branch = _optionalChain([found, 'optionalAccess', _70 => _70[1]]);
|
|
7678
|
+
const from = _optionalChain([found, 'optionalAccess', _71 => _71[2]]);
|
|
7693
7679
|
if (!found || branch === void 0 || from === void 0) throw fail(source, 0, m.fromShape);
|
|
7694
|
-
commitAt(source, from, _nullishCoalesce(_optionalChain([found, 'access',
|
|
7680
|
+
commitAt(source, from, _nullishCoalesce(_optionalChain([found, 'access', _72 => _72.indices, 'optionalAccess', _73 => _73[2], 'optionalAccess', _74 => _74[0]]), () => ( 0)));
|
|
7695
7681
|
tips.set(branch, from);
|
|
7696
7682
|
return { type: "branch", branch, from };
|
|
7697
7683
|
}
|
|
7698
7684
|
function readLeaf(source) {
|
|
7699
7685
|
const text = source.text;
|
|
7700
7686
|
const found = LEAF.exec(text);
|
|
7701
|
-
const id = _optionalChain([found, 'optionalAccess',
|
|
7687
|
+
const id = _optionalChain([found, 'optionalAccess', _75 => _75[1]]);
|
|
7702
7688
|
if (!found || id === void 0) throw fail(source, 0, m.leafShape);
|
|
7703
|
-
const idAt = _nullishCoalesce(_optionalChain([found, 'access',
|
|
7689
|
+
const idAt = _nullishCoalesce(_optionalChain([found, 'access', _76 => _76.indices, 'optionalAccess', _77 => _77[1], 'optionalAccess', _78 => _78[0]]), () => ( 0));
|
|
7704
7690
|
if (!ID.test(id)) throw fail(source, idAt, m.badId(id));
|
|
7705
7691
|
declare(source, id, idAt);
|
|
7706
7692
|
trees.set(id, { source, at: idAt });
|
|
@@ -7712,9 +7698,9 @@ function parseLines(lines, m) {
|
|
|
7712
7698
|
function readNode(source) {
|
|
7713
7699
|
const text = source.text;
|
|
7714
7700
|
const found = NODE.exec(text);
|
|
7715
|
-
const id = _optionalChain([found, 'optionalAccess',
|
|
7701
|
+
const id = _optionalChain([found, 'optionalAccess', _79 => _79[1]]);
|
|
7716
7702
|
if (!found || id === void 0) throw fail(source, 0, m.nodeShape);
|
|
7717
|
-
const idAt = _nullishCoalesce(_optionalChain([found, 'access',
|
|
7703
|
+
const idAt = _nullishCoalesce(_optionalChain([found, 'access', _80 => _80.indices, 'optionalAccess', _81 => _81[1], 'optionalAccess', _82 => _82[0]]), () => ( 0));
|
|
7718
7704
|
if (!ID.test(id)) throw fail(source, idAt, m.badId(id));
|
|
7719
7705
|
declare(source, id, idAt);
|
|
7720
7706
|
const children = [];
|
|
@@ -7740,7 +7726,7 @@ function parseLines(lines, m) {
|
|
|
7740
7726
|
if (at >= source.text.length) return void 0;
|
|
7741
7727
|
const hash = readAttrs(source, at, keys, m).get("hash");
|
|
7742
7728
|
if (hash && !HASH.test(hash.value)) throw fail(source, hash.at, m.badHash);
|
|
7743
|
-
return _optionalChain([hash, 'optionalAccess',
|
|
7729
|
+
return _optionalChain([hash, 'optionalAccess', _83 => _83.value]);
|
|
7744
7730
|
}
|
|
7745
7731
|
function namesAt(source, from, to, shape) {
|
|
7746
7732
|
const text = source.text;
|
|
@@ -7773,9 +7759,9 @@ function parseLines(lines, m) {
|
|
|
7773
7759
|
}
|
|
7774
7760
|
function readOrder(source) {
|
|
7775
7761
|
const found = ORDER.exec(source.text);
|
|
7776
|
-
const lane = _optionalChain([found, 'optionalAccess',
|
|
7762
|
+
const lane = _optionalChain([found, 'optionalAccess', _84 => _84[1]]);
|
|
7777
7763
|
if (!found || lane === void 0) throw fail(source, 0, m.lineShape);
|
|
7778
|
-
const at = _nullishCoalesce(_optionalChain([found, 'access',
|
|
7764
|
+
const at = _nullishCoalesce(_optionalChain([found, 'access', _85 => _85.indices, 'optionalAccess', _86 => _86[1], 'optionalAccess', _87 => _87[0]]), () => ( 0));
|
|
7779
7765
|
const box = boxAt(source, lane, at);
|
|
7780
7766
|
if (sealed.has(box)) throw fail(source, at, m.lineOnSealed(box));
|
|
7781
7767
|
const chips = namesAt(source, found[0].length, source.text.length, m.lineShape);
|
|
@@ -7790,9 +7776,9 @@ function parseLines(lines, m) {
|
|
|
7790
7776
|
}
|
|
7791
7777
|
function readOnLane(source, word) {
|
|
7792
7778
|
const found = ON_LANE.exec(source.text);
|
|
7793
|
-
const lane = _optionalChain([found, 'optionalAccess',
|
|
7779
|
+
const lane = _optionalChain([found, 'optionalAccess', _88 => _88[1]]);
|
|
7794
7780
|
if (!found || lane === void 0) throw fail(source, 0, m.laneShape(word));
|
|
7795
|
-
const at = _nullishCoalesce(_optionalChain([found, 'access',
|
|
7781
|
+
const at = _nullishCoalesce(_optionalChain([found, 'access', _89 => _89.indices, 'optionalAccess', _90 => _90[1], 'optionalAccess', _91 => _91[0]]), () => ( 0));
|
|
7796
7782
|
const box = boxAt(source, lane, at);
|
|
7797
7783
|
if (word === "seal") {
|
|
7798
7784
|
if (sealed.has(box)) throw fail(source, at, m.sealTwice(box));
|
|
@@ -7803,9 +7789,9 @@ function parseLines(lines, m) {
|
|
|
7803
7789
|
}
|
|
7804
7790
|
function readStamp(source) {
|
|
7805
7791
|
const found = STAMP.exec(source.text);
|
|
7806
|
-
const lane = _optionalChain([found, 'optionalAccess',
|
|
7792
|
+
const lane = _optionalChain([found, 'optionalAccess', _92 => _92[1]]);
|
|
7807
7793
|
if (!found || lane === void 0) throw fail(source, 0, m.stampShape);
|
|
7808
|
-
const box = boxAt(source, lane, _nullishCoalesce(_optionalChain([found, 'access',
|
|
7794
|
+
const box = boxAt(source, lane, _nullishCoalesce(_optionalChain([found, 'access', _93 => _93.indices, 'optionalAccess', _94 => _94[1], 'optionalAccess', _95 => _95[0]]), () => ( 0)));
|
|
7809
7795
|
const named = readName(source, found[0].length, m);
|
|
7810
7796
|
if (named.value === "" || named.rest < source.text.length) throw fail(source, 0, m.stampShape);
|
|
7811
7797
|
return { type: "stamp", box, text: named.value };
|
|
@@ -7895,14 +7881,14 @@ function parseLines(lines, m) {
|
|
|
7895
7881
|
}
|
|
7896
7882
|
function readOnBox(source, word, shape) {
|
|
7897
7883
|
const found = new RegExp(`^${word}\\s+([^\\s:]+)\\s*:\\s*(.*)$`, "du").exec(source.text);
|
|
7898
|
-
const idAt = _optionalChain([found, 'optionalAccess',
|
|
7884
|
+
const idAt = _optionalChain([found, 'optionalAccess', _96 => _96.indices, 'optionalAccess', _97 => _97[1], 'optionalAccess', _98 => _98[0]]);
|
|
7899
7885
|
if (!found || idAt === void 0 || (_nullishCoalesce(found[2], () => ( ""))) === "") throw fail(source, 0, shape);
|
|
7900
7886
|
return { box: boxAt(source, _nullishCoalesce(found[1], () => ( "")), idAt), text: _nullishCoalesce(found[2], () => ( "")) };
|
|
7901
7887
|
}
|
|
7902
7888
|
function readLine(source, edge2) {
|
|
7903
7889
|
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',
|
|
7890
|
+
const from = endAt(source, _nullishCoalesce(edge2[1], () => ( "")), _nullishCoalesce(_optionalChain([edge2, 'access', _99 => _99.indices, 'optionalAccess', _100 => _100[1], 'optionalAccess', _101 => _101[0]]), () => ( 0)), "from");
|
|
7891
|
+
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
7892
|
const at = skipSpaces(text, edge2[0].length);
|
|
7907
7893
|
if (text[at] !== ":") return { from, to, at };
|
|
7908
7894
|
const named = readName(source, at + 1, m);
|
|
@@ -7992,7 +7978,7 @@ function parseLines(lines, m) {
|
|
|
7992
7978
|
at = named.rest;
|
|
7993
7979
|
}
|
|
7994
7980
|
if (at < text.length && text[at] !== "[") throw fail(source, at, m.stripNeedsValue);
|
|
7995
|
-
const tag = at < text.length ? _optionalChain([readAttrs, 'call',
|
|
7981
|
+
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
7982
|
if (value2 === void 0 && tag === void 0) throw fail(source, 0, m.stripNeedsValue);
|
|
7997
7983
|
if (value2 !== void 0 && meters.some((meter) => meter.field === field2) && !RATIO2.test(value2)) throw fail(source, start, m.meterValue(field2));
|
|
7998
7984
|
return {
|
|
@@ -8084,13 +8070,13 @@ function itemLines(items) {
|
|
|
8084
8070
|
const rows = [];
|
|
8085
8071
|
for (const item of items) {
|
|
8086
8072
|
const row = rows.at(-1);
|
|
8087
|
-
if (row && item.label === void 0 && _optionalChain([row, 'access',
|
|
8073
|
+
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
8074
|
else rows.push([item]);
|
|
8089
8075
|
}
|
|
8090
8076
|
return rows.map(
|
|
8091
8077
|
(row) => `item ${row.map((item) => item.id).join(", ")}${attrs([
|
|
8092
|
-
["color", _optionalChain([row, 'access',
|
|
8093
|
-
["label", _optionalChain([row, 'access',
|
|
8078
|
+
["color", _optionalChain([row, 'access', _113 => _113[0], 'optionalAccess', _114 => _114.color])],
|
|
8079
|
+
["label", _optionalChain([row, 'access', _115 => _115[0], 'optionalAccess', _116 => _116.label])]
|
|
8094
8080
|
])}`
|
|
8095
8081
|
).join("\n");
|
|
8096
8082
|
}
|
|
@@ -8117,7 +8103,7 @@ function declarations(diagram) {
|
|
|
8117
8103
|
else runs.push({ ...b.region !== void 0 ? { region: b.region } : {}, boxes: [b] });
|
|
8118
8104
|
}
|
|
8119
8105
|
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',
|
|
8106
|
+
const inOrder = opened.length === regions.length && opened.every((id, i) => _optionalChain([regions, 'access', _117 => _117[i], 'optionalAccess', _118 => _118.id]) === id);
|
|
8121
8107
|
const declared = /* @__PURE__ */ new Set();
|
|
8122
8108
|
const blocks = [];
|
|
8123
8109
|
if (!inOrder) {
|
|
@@ -8141,7 +8127,7 @@ end`);
|
|
|
8141
8127
|
return blocks;
|
|
8142
8128
|
}
|
|
8143
8129
|
function printNotation(diagram) {
|
|
8144
|
-
const branches = (_nullishCoalesce(_optionalChain([diagram, 'access',
|
|
8130
|
+
const branches = (_nullishCoalesce(_optionalChain([diagram, 'access', _119 => _119.git, 'optionalAccess', _120 => _120.branches]), () => ( []))).map((b) => `branch ${b.id}${attrs([["note", b.note]])}`);
|
|
8145
8131
|
const time = diagram.kind === "time";
|
|
8146
8132
|
const blocks = [
|
|
8147
8133
|
`${diagram.kind} ${name(diagram.title)}${attrs([["view", diagram.view]])}`,
|
|
@@ -8192,8 +8178,8 @@ function groupsOf(diagram) {
|
|
|
8192
8178
|
}
|
|
8193
8179
|
var vertical = (side2) => side2 === "left" || side2 === "right";
|
|
8194
8180
|
function placeBoxes(diagram, groups) {
|
|
8195
|
-
const columns =
|
|
8196
|
-
const edges =
|
|
8181
|
+
const columns = _chunkSUL4AJLIcjs.LOOK.architecture.columns;
|
|
8182
|
+
const edges = _chunkSUL4AJLIcjs.edgesOf.call(void 0, diagram).map((e) => e.edge);
|
|
8197
8183
|
const slots = /* @__PURE__ */ new Map();
|
|
8198
8184
|
groups.forEach((group, g) => {
|
|
8199
8185
|
const inGroup = new Set(group.members);
|
|
@@ -8225,7 +8211,7 @@ function placeBoxes(diagram, groups) {
|
|
|
8225
8211
|
const anchorOf = (id) => {
|
|
8226
8212
|
for (let i = 0; i < edges.length; i++) {
|
|
8227
8213
|
const edge2 = edges[i];
|
|
8228
|
-
const partner = _optionalChain([edge2, 'optionalAccess',
|
|
8214
|
+
const partner = _optionalChain([edge2, 'optionalAccess', _121 => _121.from]) === id ? edge2.to : _optionalChain([edge2, 'optionalAccess', _122 => _122.to]) === id ? edge2.from : void 0;
|
|
8229
8215
|
const slot = partner === void 0 ? void 0 : slots.get(partner);
|
|
8230
8216
|
if (slot && slot.group < g) return { order: i, col: slot.col };
|
|
8231
8217
|
}
|
|
@@ -8236,9 +8222,9 @@ function placeBoxes(diagram, groups) {
|
|
|
8236
8222
|
const rest = group.members.filter((id) => !slots.has(id));
|
|
8237
8223
|
if (rest.length === 0) break;
|
|
8238
8224
|
const anchored = rest.map((id) => ({ id, anchor: anchorOf(id) })).filter((a) => a.anchor !== void 0);
|
|
8239
|
-
anchored.sort((a, b) => (_nullishCoalesce(_optionalChain([a, 'access',
|
|
8225
|
+
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
8226
|
const pick = _nullishCoalesce(anchored[0], () => ( { id: rest[0], anchor: void 0 }));
|
|
8241
|
-
const want = _nullishCoalesce(_optionalChain([pick, 'access',
|
|
8227
|
+
const want = _nullishCoalesce(_optionalChain([pick, 'access', _127 => _127.anchor, 'optionalAccess', _128 => _128.col]), () => ( 0));
|
|
8242
8228
|
if (placed === 0) dir = want >= (columns - 1) / 2 ? -1 : 1;
|
|
8243
8229
|
const [c, r] = free(want, 0) ? [want, 0] : near(want, 0);
|
|
8244
8230
|
put(pick.id, c, r);
|
|
@@ -8257,27 +8243,27 @@ function nameLines(name2) {
|
|
|
8257
8243
|
return [name2.slice(0, at), name2.slice(at + 1)];
|
|
8258
8244
|
}
|
|
8259
8245
|
function headerSize(region) {
|
|
8260
|
-
const { icon, nameY, line: line2, inset } =
|
|
8246
|
+
const { icon, nameY, line: line2, inset } = _chunkSUL4AJLIcjs.LOOK.region;
|
|
8261
8247
|
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) +
|
|
8248
|
+
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));
|
|
8249
|
+
const h = nameY - inset + (lines.length - 1) * line2 + (region.note ? line2 : 0) + _chunkSUL4AJLIcjs.LOOK.gap / 2;
|
|
8264
8250
|
return { w, h, lines };
|
|
8265
8251
|
}
|
|
8266
8252
|
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 =
|
|
8253
|
+
const { box: B, region: R, architecture: A, margin, gap } = _chunkSUL4AJLIcjs.LOOK;
|
|
8254
|
+
const colors = _chunkSUL4AJLIcjs.boxColors.call(void 0, diagram);
|
|
8255
|
+
const regionColor = _chunkSUL4AJLIcjs.regionColors.call(void 0, diagram);
|
|
8256
|
+
const edges = _chunkSUL4AJLIcjs.edgesOf.call(void 0, diagram);
|
|
8271
8257
|
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(
|
|
8258
|
+
const carriedIn = _chunkSUL4AJLIcjs.slotRooms.call(void 0, diagram);
|
|
8259
|
+
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
8260
|
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
8261
|
const between = Array.from({ length: Math.max(0, columnCount - 1) }, () => A.columnGap);
|
|
8276
8262
|
for (const { edge: edge2 } of edges) {
|
|
8277
8263
|
const a = slots.get(edge2.from);
|
|
8278
8264
|
const b = slots.get(edge2.to);
|
|
8279
8265
|
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 =
|
|
8266
|
+
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
8267
|
const i = Math.min(a.col, b.col);
|
|
8282
8268
|
if (need <= A.maxColumnGap) between[i] = Math.max(_nullishCoalesce(between[i], () => ( 0)), need);
|
|
8283
8269
|
}
|
|
@@ -8291,12 +8277,12 @@ function arrange(diagram, groups, slots, rooms) {
|
|
|
8291
8277
|
const slot = slots.get(id);
|
|
8292
8278
|
return slot ? [`${slot.group}:${slot.row}`] : [];
|
|
8293
8279
|
}));
|
|
8294
|
-
const loopRoom = (g, row) => loopRows.has(`${g}:${row}`) ?
|
|
8280
|
+
const loopRoom = (g, row) => loopRows.has(`${g}:${row}`) ? _chunkSUL4AJLIcjs.LOOP_ROOM : 0;
|
|
8295
8281
|
const boxes = [];
|
|
8296
8282
|
const bands = [];
|
|
8297
8283
|
let cursor = margin;
|
|
8298
8284
|
groups.forEach((group, g) => {
|
|
8299
|
-
const rows = Math.max(1, ...group.members.map((id) => (_nullishCoalesce(_optionalChain([slots, 'access',
|
|
8285
|
+
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
8286
|
const room = rooms[g];
|
|
8301
8287
|
const top = cursor + R.pad + room.top;
|
|
8302
8288
|
const rowTop = [0];
|
|
@@ -8309,9 +8295,9 @@ function arrange(diagram, groups, slots, rooms) {
|
|
|
8309
8295
|
const y = top + rowTop[slot.row];
|
|
8310
8296
|
boxes.push({
|
|
8311
8297
|
id,
|
|
8312
|
-
name: _nullishCoalesce(_optionalChain([source, 'optionalAccess',
|
|
8313
|
-
..._optionalChain([source, 'optionalAccess',
|
|
8314
|
-
..._optionalChain([source, 'optionalAccess',
|
|
8298
|
+
name: _nullishCoalesce(_optionalChain([source, 'optionalAccess', _132 => _132.name]), () => ( id)),
|
|
8299
|
+
..._optionalChain([source, 'optionalAccess', _133 => _133.sub]) !== void 0 ? { sub: source.sub } : {},
|
|
8300
|
+
..._optionalChain([source, 'optionalAccess', _134 => _134.icon]) !== void 0 ? { icon: source.icon } : {},
|
|
8315
8301
|
color: _nullishCoalesce(colors.get(id), () => ( "slate")),
|
|
8316
8302
|
x: cx - w / 2,
|
|
8317
8303
|
y,
|
|
@@ -8328,9 +8314,9 @@ function arrange(diagram, groups, slots, rooms) {
|
|
|
8328
8314
|
cursor += h + R.gap;
|
|
8329
8315
|
});
|
|
8330
8316
|
const bandsBottom = cursor - R.gap;
|
|
8331
|
-
for (const box of boxes)
|
|
8317
|
+
for (const box of boxes) _chunkSUL4AJLIcjs.placeSlot.call(void 0, box, carriedIn.get(box.id));
|
|
8332
8318
|
const byId = new Map(boxes.map((b) => [b.id, b]));
|
|
8333
|
-
const bandOf = (id) => bands[_nullishCoalesce(_optionalChain([slots, 'access',
|
|
8319
|
+
const bandOf = (id) => bands[_nullishCoalesce(_optionalChain([slots, 'access', _135 => _135.get, 'call', _136 => _136(id), 'optionalAccess', _137 => _137.group]), () => ( 0))];
|
|
8334
8320
|
const crosses = (points, rect, pad2) => {
|
|
8335
8321
|
for (let i = 1; i < points.length; i++) {
|
|
8336
8322
|
const [x1, y1] = points[i - 1];
|
|
@@ -8341,28 +8327,28 @@ function arrange(diagram, groups, slots, rooms) {
|
|
|
8341
8327
|
};
|
|
8342
8328
|
const loopZones = [...looped].flatMap((id) => {
|
|
8343
8329
|
const box = byId.get(id);
|
|
8344
|
-
return box ? [{ x: box.x, y: box.y + box.h, w: box.w, h:
|
|
8330
|
+
return box ? [{ x: box.x, y: box.y + box.h, w: box.w, h: _chunkSUL4AJLIcjs.LOOP_ROOM }] : [];
|
|
8345
8331
|
});
|
|
8346
8332
|
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,
|
|
8333
|
+
const blocked = (points, a, b) => boxes.some((box) => box.id !== a && box.id !== b && crosses(points, box, _chunkSUL4AJLIcjs.LOOK.label.search)) || onLoop(points);
|
|
8348
8334
|
const laneBelow = (id) => {
|
|
8349
8335
|
const box = byId.get(id);
|
|
8350
8336
|
const band2 = bandOf(id);
|
|
8351
8337
|
const slot = slots.get(id);
|
|
8352
8338
|
const under = box.y + box.h + (slot ? loopRoom(slot.group, slot.row) : 0);
|
|
8353
|
-
return (_nullishCoalesce(_optionalChain([slot, 'optionalAccess',
|
|
8339
|
+
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
8340
|
};
|
|
8355
8341
|
const laneAbove = (id) => {
|
|
8356
8342
|
const box = byId.get(id);
|
|
8357
8343
|
const band2 = bandOf(id);
|
|
8358
|
-
return (_nullishCoalesce(_optionalChain([slots, 'access',
|
|
8344
|
+
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
8345
|
};
|
|
8360
|
-
const inset =
|
|
8346
|
+
const inset = _chunkSUL4AJLIcjs.LOOK.edge.inset;
|
|
8361
8347
|
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
8348
|
const route = (from, to) => {
|
|
8363
8349
|
const a = byId.get(from);
|
|
8364
8350
|
const b = byId.get(to);
|
|
8365
|
-
if (from === to) return
|
|
8351
|
+
if (from === to) return _chunkSUL4AJLIcjs.loopUnder.call(void 0, a);
|
|
8366
8352
|
const sa = slots.get(from);
|
|
8367
8353
|
const sb = slots.get(to);
|
|
8368
8354
|
if (sa.group === sb.group && sa.row === sb.row) {
|
|
@@ -8433,10 +8419,10 @@ function arrange(diagram, groups, slots, rooms) {
|
|
|
8433
8419
|
from: edge2.from,
|
|
8434
8420
|
to: edge2.to,
|
|
8435
8421
|
points: route(edge2.from, edge2.to),
|
|
8436
|
-
color:
|
|
8422
|
+
color: _chunkSUL4AJLIcjs.edgeColor.call(void 0, edge2, colors),
|
|
8437
8423
|
carry: edge2.carry
|
|
8438
8424
|
}));
|
|
8439
|
-
|
|
8425
|
+
_chunkSUL4AJLIcjs.seatCarriers.call(void 0, sceneEdges, byId, carriedIn);
|
|
8440
8426
|
const outward = /* @__PURE__ */ new Map();
|
|
8441
8427
|
for (const edge2 of sceneEdges) {
|
|
8442
8428
|
if (edge2.points.length !== 2) continue;
|
|
@@ -8444,7 +8430,7 @@ function arrange(diagram, groups, slots, rooms) {
|
|
|
8444
8430
|
if (!back) continue;
|
|
8445
8431
|
const [p, q] = edge2.points;
|
|
8446
8432
|
const flat = Math.abs(q[1] - p[1]) < Math.abs(q[0] - p[0]);
|
|
8447
|
-
const d = (edge2.from < edge2.to ? 1 : -1) *
|
|
8433
|
+
const d = (edge2.from < edge2.to ? 1 : -1) * _chunkSUL4AJLIcjs.LOOK.edge.parallel;
|
|
8448
8434
|
edge2.points = edge2.points.map(([x, y]) => flat ? [x, y + d] : [x + d, y]);
|
|
8449
8435
|
outward.set(edge2, flat ? d > 0 ? "below" : "above" : d > 0 ? "right" : "left");
|
|
8450
8436
|
}
|
|
@@ -8466,39 +8452,39 @@ function arrange(diagram, groups, slots, rooms) {
|
|
|
8466
8452
|
header: { x: margin + R.inset, y: band2.y + R.inset, w: header.w, h: header.h }
|
|
8467
8453
|
});
|
|
8468
8454
|
});
|
|
8469
|
-
const badgeAt = (edge2, taken, lines2) => edge2.from === edge2.to ?
|
|
8470
|
-
const early =
|
|
8455
|
+
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);
|
|
8456
|
+
const early = _chunkSUL4AJLIcjs.lineBadges.call(void 0, sceneEdges, diagram.steps.length, badgeAt);
|
|
8471
8457
|
const labels = [];
|
|
8472
8458
|
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]) =>
|
|
8459
|
+
const source = _optionalChain([diagram, 'access', _142 => _142.steps, 'access', _143 => _143[edge2.step], 'optionalAccess', _144 => _144.events, 'access', _145 => _145[edge2.event]]);
|
|
8460
|
+
if (_optionalChain([source, 'optionalAccess', _146 => _146.type]) !== "edge" || source.label === void 0) continue;
|
|
8461
|
+
const seen = [...early].filter(([s]) => s <= edge2.step).map(([, b]) => _chunkSUL4AJLIcjs.badgeRect.call(void 0, b.point));
|
|
8476
8462
|
const soft = [...regions.map((r) => r.header), ...labels.filter((l) => l.step === edge2.step)];
|
|
8477
8463
|
const side2 = _nullishCoalesce(source.labelSide, () => ( outward.get(edge2)));
|
|
8478
|
-
const below = edge2.from === edge2.to ? { side: "below", base:
|
|
8464
|
+
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
8465
|
labels.push(
|
|
8480
|
-
|
|
8466
|
+
_chunkSUL4AJLIcjs.placeLabel.call(void 0,
|
|
8481
8467
|
{ step: edge2.step, event: edge2.event, text: source.label, points: edge2.points, color: edge2.color, ..._nullishCoalesce(below, () => ( (side2 ? { side: side2 } : { flip: true }))) },
|
|
8482
8468
|
{ hard: boxes, soft, touch: seen }
|
|
8483
8469
|
)
|
|
8484
8470
|
);
|
|
8485
8471
|
}
|
|
8486
8472
|
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,
|
|
8473
|
+
const shift = labels.length > 0 ? Math.max(0, margin + _chunkSUL4AJLIcjs.LOOK.label.soft - Math.min(...labels.map((l) => l.x))) : 0;
|
|
8474
|
+
if (shift > 0) _chunkSUL4AJLIcjs.shiftContent.call(void 0, layout, shift, 0);
|
|
8475
|
+
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)));
|
|
8476
|
+
const width = Math.max(contentRight + margin, _chunkSUL4AJLIcjs.stripNeed.call(void 0, diagram) + margin * 2);
|
|
8491
8477
|
for (const region of regions) region.w = width - margin * 2;
|
|
8492
8478
|
const contentBottom = Math.max(bandsBottom, ...labels.map((l) => l.y + l.h));
|
|
8493
|
-
const strip2 =
|
|
8479
|
+
const strip2 = _chunkSUL4AJLIcjs.layoutStrip.call(void 0, diagram, margin, contentBottom + gap, width - margin * 2);
|
|
8494
8480
|
layout.width = width;
|
|
8495
8481
|
layout.height = (strip2 ? strip2.y + strip2.h : contentBottom) + margin;
|
|
8496
8482
|
if (strip2) layout.strip = strip2;
|
|
8497
|
-
const lines =
|
|
8498
|
-
layout.badges =
|
|
8483
|
+
const lines = _chunkSUL4AJLIcjs.lineBadges.call(void 0, sceneEdges, diagram.steps.length, badgeAt);
|
|
8484
|
+
layout.badges = _chunkSUL4AJLIcjs.replaceSameSpot.call(void 0,
|
|
8499
8485
|
diagram.steps.map((step, s) => {
|
|
8500
8486
|
const line2 = lines.get(s);
|
|
8501
|
-
if (!line2) return
|
|
8487
|
+
if (!line2) return _chunkSUL4AJLIcjs.cornerBadge.call(void 0, step.events, s, layout);
|
|
8502
8488
|
return { step: s, x: line2.point[0], y: line2.point[1], color: line2.edge.color };
|
|
8503
8489
|
})
|
|
8504
8490
|
);
|
|
@@ -8506,13 +8492,13 @@ function arrange(diagram, groups, slots, rooms) {
|
|
|
8506
8492
|
}
|
|
8507
8493
|
function grow(layout, groups, slots, rooms) {
|
|
8508
8494
|
let grown = false;
|
|
8509
|
-
const soft =
|
|
8495
|
+
const soft = _chunkSUL4AJLIcjs.LOOK.label.soft;
|
|
8510
8496
|
for (const label2 of layout.labels) {
|
|
8511
8497
|
const edge2 = layout.edges.find((e) => e.step === label2.step && e.event === label2.event);
|
|
8512
8498
|
const a = edge2 && slots.get(edge2.from);
|
|
8513
8499
|
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',
|
|
8500
|
+
if (!a || !b || a.group !== b.group || !_optionalChain([groups, 'access', _147 => _147[a.group], 'optionalAccess', _148 => _148.region])) continue;
|
|
8501
|
+
const region = layout.regions.find((r) => r.id === _optionalChain([groups, 'access', _149 => _149[a.group], 'optionalAccess', _150 => _150.region, 'optionalAccess', _151 => _151.id]));
|
|
8516
8502
|
const room = rooms[a.group];
|
|
8517
8503
|
if (!region || !room) continue;
|
|
8518
8504
|
const over = region.y + soft - label2.y;
|
|
@@ -8531,12 +8517,12 @@ function grow(layout, groups, slots, rooms) {
|
|
|
8531
8517
|
|
|
8532
8518
|
// src/layout/sequence.ts
|
|
8533
8519
|
function layoutSequence(diagram) {
|
|
8534
|
-
const { box: B, sequence: Q, label: L, margin, gap } =
|
|
8535
|
-
const colors =
|
|
8536
|
-
const listed = _nullishCoalesce(_optionalChain([diagram, 'access',
|
|
8520
|
+
const { box: B, sequence: Q, label: L, margin, gap } = _chunkSUL4AJLIcjs.LOOK;
|
|
8521
|
+
const colors = _chunkSUL4AJLIcjs.boxColors.call(void 0, diagram);
|
|
8522
|
+
const listed = _nullishCoalesce(_optionalChain([diagram, 'access', _152 => _152.sequence, 'optionalAccess', _153 => _153.lifelines]), () => ( []));
|
|
8537
8523
|
const order = [...listed, ...diagram.boxes.map((b) => b.id).filter((id) => !listed.includes(id))];
|
|
8538
8524
|
const column = new Map(order.map((id, i) => [id, i]));
|
|
8539
|
-
const widths = order.map((id) =>
|
|
8525
|
+
const widths = order.map((id) => _chunkSUL4AJLIcjs.boxWidth.call(void 0, diagram, id, false));
|
|
8540
8526
|
const spacing = widths.slice(1).map((w, i) => widths[i] / 2 + w / 2 + Q.columnGap);
|
|
8541
8527
|
const needs = [];
|
|
8542
8528
|
for (const step of diagram.steps) {
|
|
@@ -8544,7 +8530,7 @@ function layoutSequence(diagram) {
|
|
|
8544
8530
|
if (event2.type !== "edge" || event2.label === void 0) continue;
|
|
8545
8531
|
const a = _nullishCoalesce(column.get(event2.from), () => ( 0));
|
|
8546
8532
|
const b = _nullishCoalesce(column.get(event2.to), () => ( 0));
|
|
8547
|
-
const w =
|
|
8533
|
+
const w = _chunkSUL4AJLIcjs.textWidth.call(void 0, event2.label, _chunkSUL4AJLIcjs.labelStyle.call(void 0, event2.label)) + L.padX * 2;
|
|
8548
8534
|
if (a === b) {
|
|
8549
8535
|
if (a < spacing.length) needs.push({ from: a, to: a + 1, need: Q.selfW + L.side + w + Q.labelRoom });
|
|
8550
8536
|
} else {
|
|
@@ -8568,9 +8554,9 @@ function layoutSequence(diagram) {
|
|
|
8568
8554
|
const cx = xs[i];
|
|
8569
8555
|
return {
|
|
8570
8556
|
id,
|
|
8571
|
-
name: _nullishCoalesce(_optionalChain([source, 'optionalAccess',
|
|
8572
|
-
..._optionalChain([source, 'optionalAccess',
|
|
8573
|
-
..._optionalChain([source, 'optionalAccess',
|
|
8557
|
+
name: _nullishCoalesce(_optionalChain([source, 'optionalAccess', _154 => _154.name]), () => ( id)),
|
|
8558
|
+
..._optionalChain([source, 'optionalAccess', _155 => _155.sub]) !== void 0 ? { sub: source.sub } : {},
|
|
8559
|
+
..._optionalChain([source, 'optionalAccess', _156 => _156.icon]) !== void 0 ? { icon: source.icon } : {},
|
|
8574
8560
|
color: _nullishCoalesce(colors.get(id), () => ( "slate")),
|
|
8575
8561
|
x: cx - w / 2,
|
|
8576
8562
|
y: margin,
|
|
@@ -8599,8 +8585,8 @@ function layoutSequence(diagram) {
|
|
|
8599
8585
|
above = named && side2 === "above" ? Q.labelOffset + L.h / 2 : gap;
|
|
8600
8586
|
under = self ? Q.selfH + gap : named && side2 === "below" ? Q.labelOffset + L.h / 2 : gap;
|
|
8601
8587
|
} else {
|
|
8602
|
-
above =
|
|
8603
|
-
under =
|
|
8588
|
+
above = _chunkSUL4AJLIcjs.LOOK.action.h / 2;
|
|
8589
|
+
under = _chunkSUL4AJLIcjs.LOOK.action.h / 2;
|
|
8604
8590
|
}
|
|
8605
8591
|
y = first ? y + above : y + Math.max(Q.minPitch, below + Q.rowGap + above) + (e === 0 && s > 0 ? Q.stepGap : 0);
|
|
8606
8592
|
first = false;
|
|
@@ -8613,15 +8599,15 @@ function layoutSequence(diagram) {
|
|
|
8613
8599
|
[xf, y],
|
|
8614
8600
|
[xf + Q.selfW, y],
|
|
8615
8601
|
[xf + Q.selfW, y + Q.selfH],
|
|
8616
|
-
[xf +
|
|
8602
|
+
[xf + _chunkSUL4AJLIcjs.LOOK.edge.inset, y + Q.selfH]
|
|
8617
8603
|
] : [
|
|
8618
8604
|
[xf, y],
|
|
8619
|
-
[xt - dir *
|
|
8605
|
+
[xt - dir * _chunkSUL4AJLIcjs.LOOK.edge.inset, y]
|
|
8620
8606
|
];
|
|
8621
|
-
const color =
|
|
8607
|
+
const color = _chunkSUL4AJLIcjs.edgeColor.call(void 0, event2, colors);
|
|
8622
8608
|
const seats = {};
|
|
8623
8609
|
if (event2.carry.kind !== "none") {
|
|
8624
|
-
const reach =
|
|
8610
|
+
const reach = _chunkSUL4AJLIcjs.LOOK.slot.lifeline + _chunkSUL4AJLIcjs.carrierHalf.call(void 0, event2.carry)[0];
|
|
8625
8611
|
const [p0, p1] = points;
|
|
8626
8612
|
const [q0, q1] = points.slice(-2);
|
|
8627
8613
|
const out = Math.sign(p1[0] - p0[0]) || 1;
|
|
@@ -8643,27 +8629,27 @@ function layoutSequence(diagram) {
|
|
|
8643
8629
|
}
|
|
8644
8630
|
} else {
|
|
8645
8631
|
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 +
|
|
8632
|
+
const w = _chunkSUL4AJLIcjs.textWidth.call(void 0, event2.label, _chunkSUL4AJLIcjs.TYPE.action) + _chunkSUL4AJLIcjs.LOOK.action.padX * 2;
|
|
8633
|
+
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
8634
|
}
|
|
8649
8635
|
});
|
|
8650
8636
|
});
|
|
8651
8637
|
const bottom = (first ? headBottom : y + below) + Q.tail;
|
|
8652
8638
|
const lifelines = order.map((id, i) => ({ id, x: xs[i], y1: headBottom, y2: bottom }));
|
|
8653
|
-
const early =
|
|
8639
|
+
const early = _chunkSUL4AJLIcjs.lineBadges.call(void 0, edges, diagram.steps.length);
|
|
8654
8640
|
const labels = [];
|
|
8655
8641
|
for (const request of requests) {
|
|
8656
|
-
const seen = [...early].filter(([s]) => s <= request.step).map(([, b]) =>
|
|
8642
|
+
const seen = [...early].filter(([s]) => s <= request.step).map(([, b]) => _chunkSUL4AJLIcjs.badgeRect.call(void 0, b.point));
|
|
8657
8643
|
const soft = [...labels.filter((l) => l.step === request.step), ...actions];
|
|
8658
|
-
labels.push(
|
|
8644
|
+
labels.push(_chunkSUL4AJLIcjs.placeLabel.call(void 0, request, { hard: boxes, soft, touch: seen }));
|
|
8659
8645
|
}
|
|
8660
8646
|
const layout = { kind: "sequence", width: 0, height: 0, regions: [], boxes, lifelines, edges, labels, actions, badges: [], paths: [], ends: [] };
|
|
8661
8647
|
const lefts = [...boxes.map((b) => b.x), ...labels.map((l) => l.x), ...actions.map((a) => a.x)];
|
|
8662
8648
|
const shift = Math.max(0, margin - Math.min(...lefts));
|
|
8663
|
-
if (shift > 0)
|
|
8649
|
+
if (shift > 0) _chunkSUL4AJLIcjs.shiftContent.call(void 0, layout, shift, 0);
|
|
8664
8650
|
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 =
|
|
8651
|
+
const width = Math.max(Math.max(...rights) + margin, _chunkSUL4AJLIcjs.stripNeed.call(void 0, diagram) + margin * 2);
|
|
8652
|
+
const strip2 = _chunkSUL4AJLIcjs.layoutStrip.call(void 0, diagram, margin, bottom + gap, width - margin * 2);
|
|
8667
8653
|
layout.width = width;
|
|
8668
8654
|
layout.height = (strip2 ? strip2.y + strip2.h : bottom) + margin;
|
|
8669
8655
|
if (strip2) layout.strip = strip2;
|
|
@@ -8671,47 +8657,47 @@ function layoutSequence(diagram) {
|
|
|
8671
8657
|
return layout;
|
|
8672
8658
|
}
|
|
8673
8659
|
function badges(diagram, layout) {
|
|
8674
|
-
const lines =
|
|
8660
|
+
const lines = _chunkSUL4AJLIcjs.lineBadges.call(void 0, layout.edges, diagram.steps.length);
|
|
8675
8661
|
const placed = diagram.steps.map((step, s) => {
|
|
8676
8662
|
const line2 = lines.get(s);
|
|
8677
8663
|
if (line2) return { step: s, x: line2.point[0], y: line2.point[1], color: line2.edge.color };
|
|
8678
8664
|
const action2 = layout.actions.find((a) => a.step === s);
|
|
8679
8665
|
const lifeline2 = action2 && layout.lifelines.find((l) => l.id === action2.box);
|
|
8680
8666
|
if (action2 && lifeline2) return { step: s, x: lifeline2.x, y: action2.y + action2.h / 2, color: action2.color };
|
|
8681
|
-
return
|
|
8667
|
+
return _chunkSUL4AJLIcjs.cornerBadge.call(void 0, step.events, s, layout);
|
|
8682
8668
|
});
|
|
8683
|
-
return
|
|
8669
|
+
return _chunkSUL4AJLIcjs.replaceSameSpot.call(void 0, placed);
|
|
8684
8670
|
}
|
|
8685
8671
|
|
|
8686
8672
|
// src/timeline.ts
|
|
8687
|
-
var LINEUP_LENGTH = { line:
|
|
8673
|
+
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
8674
|
function plan(step, needle) {
|
|
8689
8675
|
const out = { edges: [], events: [], busy: 0 };
|
|
8690
|
-
let cursor =
|
|
8676
|
+
let cursor = _chunkSUL4AJLIcjs.MOTION.edgeAt;
|
|
8691
8677
|
let arrived;
|
|
8692
8678
|
let changes = 0;
|
|
8693
8679
|
let settled = Number.NEGATIVE_INFINITY;
|
|
8694
8680
|
const line2 = (e, event2, a) => {
|
|
8695
8681
|
const carries = event2.carry.kind !== "none";
|
|
8696
|
-
const b = a + (carries ?
|
|
8682
|
+
const b = a + (carries ? _chunkSUL4AJLIcjs.MOTION.drawCarry : _chunkSUL4AJLIcjs.MOTION.draw);
|
|
8697
8683
|
out.edges.push({ event: e, a, b, carries, coin: event2.carry.kind === "coin", named: event2.label !== void 0 });
|
|
8698
8684
|
out.busy = Math.max(out.busy, b);
|
|
8699
8685
|
return b;
|
|
8700
8686
|
};
|
|
8701
8687
|
const nows = needle ? step.events.flatMap((event2, e) => event2.type === "now" ? [{ e, to: event2.to }] : []) : [];
|
|
8702
|
-
const p0 = _nullishCoalesce(_optionalChain([needle, 'optionalAccess',
|
|
8688
|
+
const p0 = _nullishCoalesce(_optionalChain([needle, 'optionalAccess', _157 => _157.from]), () => ( 0));
|
|
8703
8689
|
const p1 = Math.max(p0, ...nows.map((n) => n.to + 1));
|
|
8704
8690
|
const pulled = (event2) => event2.type === "edge" && event2.at !== void 0 && event2.at >= p0 && event2.at < p1;
|
|
8705
8691
|
step.events.forEach((event2, e) => {
|
|
8706
|
-
if (needle && e === _optionalChain([nows, 'access',
|
|
8707
|
-
let t = Math.max(cursor, settled +
|
|
8692
|
+
if (needle && e === _optionalChain([nows, 'access', _158 => _158[0], 'optionalAccess', _159 => _159.e])) {
|
|
8693
|
+
let t = Math.max(cursor, settled + _chunkSUL4AJLIcjs.MOTION.change);
|
|
8708
8694
|
const keys = [[t, p0]];
|
|
8709
8695
|
const passed = [];
|
|
8710
8696
|
for (let u = p0; u < p1; u++) {
|
|
8711
8697
|
const entry = t;
|
|
8712
8698
|
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 +
|
|
8699
|
+
const done = lines.reduce((latest, l, j) => Math.max(latest, line2(l.k, l.ev, entry + _chunkSUL4AJLIcjs.MOTION.stagger * j)), entry);
|
|
8700
|
+
const end = Math.max(entry + needle.speed, lines.length > 0 ? done + _chunkSUL4AJLIcjs.MOTION.time.wait : entry);
|
|
8715
8701
|
if (end - needle.speed > entry + 1e-9) keys.push([end - needle.speed, u]);
|
|
8716
8702
|
keys.push([end, u + 1]);
|
|
8717
8703
|
passed.push({ unit: u, at: end });
|
|
@@ -8719,7 +8705,7 @@ function plan(step, needle) {
|
|
|
8719
8705
|
}
|
|
8720
8706
|
out.sweep = { keys, passed };
|
|
8721
8707
|
out.busy = Math.max(out.busy, t);
|
|
8722
|
-
cursor = t +
|
|
8708
|
+
cursor = t + _chunkSUL4AJLIcjs.MOTION.time.after;
|
|
8723
8709
|
arrived = t;
|
|
8724
8710
|
changes = 0;
|
|
8725
8711
|
return;
|
|
@@ -8729,7 +8715,7 @@ function plan(step, needle) {
|
|
|
8729
8715
|
const a = cursor;
|
|
8730
8716
|
const b = a + LINEUP_LENGTH[event2.type];
|
|
8731
8717
|
out.edges.push({ event: e, a, b, carries: false, coin: false, named: false });
|
|
8732
|
-
cursor = a +
|
|
8718
|
+
cursor = a + _chunkSUL4AJLIcjs.MOTION.lineup.stagger;
|
|
8733
8719
|
arrived = b;
|
|
8734
8720
|
changes = 0;
|
|
8735
8721
|
out.busy = Math.max(out.busy, b);
|
|
@@ -8737,24 +8723,24 @@ function plan(step, needle) {
|
|
|
8737
8723
|
}
|
|
8738
8724
|
if (event2.type === "commit" || event2.type === "branch" || event2.type === "leaf" || event2.type === "node") {
|
|
8739
8725
|
const a = cursor;
|
|
8740
|
-
const b = a +
|
|
8726
|
+
const b = a + _chunkSUL4AJLIcjs.MOTION.draw;
|
|
8741
8727
|
out.edges.push({ event: e, a, b, carries: false, coin: false, named: false });
|
|
8742
|
-
cursor = a +
|
|
8728
|
+
cursor = a + _chunkSUL4AJLIcjs.MOTION.stagger;
|
|
8743
8729
|
arrived = b;
|
|
8744
8730
|
changes = 0;
|
|
8745
8731
|
out.busy = Math.max(out.busy, b);
|
|
8746
8732
|
} else if (event2.type === "edge") {
|
|
8747
8733
|
const a = cursor;
|
|
8748
8734
|
arrived = line2(e, event2, a);
|
|
8749
|
-
cursor = a +
|
|
8735
|
+
cursor = a + _chunkSUL4AJLIcjs.MOTION.stagger;
|
|
8750
8736
|
changes = 0;
|
|
8751
8737
|
} else if (event2.type === "action") {
|
|
8752
8738
|
out.events.push({ event: e, at: cursor });
|
|
8753
|
-
out.busy = Math.max(out.busy, cursor +
|
|
8754
|
-
cursor +=
|
|
8739
|
+
out.busy = Math.max(out.busy, cursor + _chunkSUL4AJLIcjs.MOTION.action);
|
|
8740
|
+
cursor += _chunkSUL4AJLIcjs.MOTION.action;
|
|
8755
8741
|
changes = 0;
|
|
8756
8742
|
} else {
|
|
8757
|
-
const at = (_nullishCoalesce(arrived, () => ( cursor))) +
|
|
8743
|
+
const at = (_nullishCoalesce(arrived, () => ( cursor))) + _chunkSUL4AJLIcjs.MOTION.change * changes++;
|
|
8758
8744
|
out.events.push({ event: e, at });
|
|
8759
8745
|
out.busy = Math.max(out.busy, at);
|
|
8760
8746
|
settled = Math.max(settled, at);
|
|
@@ -8765,29 +8751,29 @@ function plan(step, needle) {
|
|
|
8765
8751
|
}
|
|
8766
8752
|
function buildTimeline(diagram, still = false) {
|
|
8767
8753
|
const time = diagram.kind === "time" ? diagram.time : void 0;
|
|
8768
|
-
const T =
|
|
8754
|
+
const T = _chunkSUL4AJLIcjs.MOTION.time;
|
|
8769
8755
|
const speed = time ? Math.min(T.unitMax, Math.max(T.unitMin, T.axis / Math.max(1, time.scale.count))) : 0;
|
|
8770
8756
|
let at = 0;
|
|
8771
8757
|
const plans = diagram.steps.map((step) => {
|
|
8772
8758
|
if (!time) return plan(step);
|
|
8773
8759
|
const p = plan(step, { from: at, speed });
|
|
8774
|
-
at = _nullishCoalesce(_optionalChain([p, 'access',
|
|
8760
|
+
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
8761
|
return p;
|
|
8776
8762
|
});
|
|
8777
8763
|
const steps = [];
|
|
8778
|
-
let t =
|
|
8764
|
+
let t = _chunkSUL4AJLIcjs.MOTION.intro;
|
|
8779
8765
|
diagram.steps.forEach((step, s) => {
|
|
8780
|
-
const read = Math.min(
|
|
8781
|
-
const length = Math.max(read, (_nullishCoalesce(_optionalChain([plans, 'access',
|
|
8766
|
+
const read = Math.min(_chunkSUL4AJLIcjs.MOTION.stepMax, Math.max(_chunkSUL4AJLIcjs.MOTION.stepMin, _chunkSUL4AJLIcjs.MOTION.stepBase + [...step.body].length * _chunkSUL4AJLIcjs.MOTION.perChar));
|
|
8767
|
+
const length = Math.max(read, (_nullishCoalesce(_optionalChain([plans, 'access', _164 => _164[s], 'optionalAccess', _165 => _165.busy]), () => ( 0))) + _chunkSUL4AJLIcjs.MOTION.dwell);
|
|
8782
8768
|
steps.push({ start: t, end: t + length });
|
|
8783
8769
|
t += length;
|
|
8784
8770
|
});
|
|
8785
8771
|
const end = t;
|
|
8786
|
-
const total = Math.ceil(end +
|
|
8787
|
-
const last = total -
|
|
8772
|
+
const total = Math.ceil(end + _chunkSUL4AJLIcjs.MOTION.outro);
|
|
8773
|
+
const last = total - _chunkSUL4AJLIcjs.MOTION.tail;
|
|
8788
8774
|
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',
|
|
8775
|
+
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;
|
|
8776
|
+
const faint = _nullishCoalesce(_optionalChain([whole, 'optionalAccess', _168 => _168.start]), () => ( last));
|
|
8791
8777
|
const edges = [];
|
|
8792
8778
|
const labels = [];
|
|
8793
8779
|
const events = [];
|
|
@@ -8798,10 +8784,10 @@ function buildTimeline(diagram, still = false) {
|
|
|
8798
8784
|
for (const edge2 of p.edges) {
|
|
8799
8785
|
const a = span.start + edge2.a;
|
|
8800
8786
|
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',
|
|
8787
|
+
const event2 = _optionalChain([diagram, 'access', _169 => _169.steps, 'access', _170 => _170[s], 'optionalAccess', _171 => _171.events, 'access', _172 => _172[edge2.event]]);
|
|
8788
|
+
const own = diagram.kind === "git" && _optionalChain([event2, 'optionalAccess', _173 => _173.type]) === "edge" && event2.carry.kind === "tag" && event2.carry.text === event2.from;
|
|
8803
8789
|
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 +
|
|
8790
|
+
if (edge2.named) named.push({ step: s, event: edge2.event, start: a + _chunkSUL4AJLIcjs.MOTION.labelDelay, end: span.end });
|
|
8805
8791
|
}
|
|
8806
8792
|
named.forEach((label2, k) => {
|
|
8807
8793
|
const later = named[k + 2];
|
|
@@ -8817,7 +8803,7 @@ function buildTimeline(diagram, still = false) {
|
|
|
8817
8803
|
labels.push(...named);
|
|
8818
8804
|
for (const event2 of p.events) events.push({ step: s, event: event2.event, at: span.start + event2.at });
|
|
8819
8805
|
});
|
|
8820
|
-
const first = _nullishCoalesce(_optionalChain([steps, 'access',
|
|
8806
|
+
const first = _nullishCoalesce(_optionalChain([steps, 'access', _174 => _174[0], 'optionalAccess', _175 => _175.start]), () => ( 0));
|
|
8821
8807
|
const hasMain = departures.some((d) => d.who === "main");
|
|
8822
8808
|
const carriers = [];
|
|
8823
8809
|
for (const who of ["main", "coin"]) {
|
|
@@ -8842,8 +8828,8 @@ function buildTimeline(diagram, still = false) {
|
|
|
8842
8828
|
const units = [];
|
|
8843
8829
|
plans.forEach((p, s) => {
|
|
8844
8830
|
const start = steps[s].start;
|
|
8845
|
-
for (const [t2, position] of _nullishCoalesce(_optionalChain([p, 'access',
|
|
8846
|
-
for (const u of _nullishCoalesce(_optionalChain([p, 'access',
|
|
8831
|
+
for (const [t2, position] of _nullishCoalesce(_optionalChain([p, 'access', _176 => _176.sweep, 'optionalAccess', _177 => _177.keys]), () => ( []))) needle.push([start + t2, position]);
|
|
8832
|
+
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
8833
|
});
|
|
8848
8834
|
needle.push([total, at]);
|
|
8849
8835
|
return {
|
|
@@ -8855,26 +8841,26 @@ function buildTimeline(diagram, still = false) {
|
|
|
8855
8841
|
labels,
|
|
8856
8842
|
badges: steps.map((span, s) => ({ step: s, appears: span.start })),
|
|
8857
8843
|
events,
|
|
8858
|
-
stills: steps.map((span) => span.end -
|
|
8844
|
+
stills: steps.map((span) => span.end - _chunkSUL4AJLIcjs.MOTION.still),
|
|
8859
8845
|
...whole ? { whole } : {},
|
|
8860
8846
|
...states ? { states } : {},
|
|
8861
8847
|
...time ? { needle, units, meters: meterTimes(diagram, plans, steps) } : {}
|
|
8862
8848
|
};
|
|
8863
8849
|
}
|
|
8864
8850
|
function meterTimes(diagram, plans, steps) {
|
|
8865
|
-
const length = _optionalChain([diagram, 'access',
|
|
8866
|
-
return (_nullishCoalesce(_optionalChain([diagram, 'access',
|
|
8851
|
+
const length = _optionalChain([diagram, 'access', _180 => _180.time, 'optionalAccess', _181 => _181.period, 'optionalAccess', _182 => _182.length]);
|
|
8852
|
+
return (_nullishCoalesce(_optionalChain([diagram, 'access', _183 => _183.strip, 'optionalAccess', _184 => _184.meters]), () => ( []))).map(({ field: field2 }) => {
|
|
8867
8853
|
const keys = [[0, 0]];
|
|
8868
8854
|
let value2 = 0;
|
|
8869
8855
|
plans.forEach((p, s) => {
|
|
8870
8856
|
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 ?
|
|
8857
|
+
const sets = (_nullishCoalesce(_optionalChain([diagram, 'access', _185 => _185.steps, 'access', _186 => _186[s], 'optionalAccess', _187 => _187.events]), () => ( []))).flatMap((event2, e) => {
|
|
8858
|
+
const ratio = event2.type === "strip" && event2.field === field2 && event2.value !== void 0 ? _chunkSUL4AJLIcjs.ratioOf.call(void 0, event2.value) : void 0;
|
|
8873
8859
|
return ratio === void 0 ? [] : [{ e, ratio }];
|
|
8874
8860
|
});
|
|
8875
8861
|
const set = sets[sets.length - 1];
|
|
8876
8862
|
if (!set) return;
|
|
8877
|
-
const sweep = _nullishCoalesce(_optionalChain([p, 'access',
|
|
8863
|
+
const sweep = _nullishCoalesce(_optionalChain([p, 'access', _188 => _188.sweep, 'optionalAccess', _189 => _189.keys]), () => ( []));
|
|
8878
8864
|
const first = sweep[0];
|
|
8879
8865
|
const lastKey = sweep[sweep.length - 1];
|
|
8880
8866
|
if (first && lastKey && lastKey[1] > first[1]) {
|
|
@@ -8883,16 +8869,16 @@ function meterTimes(diagram, plans, steps) {
|
|
|
8883
8869
|
let from = p0;
|
|
8884
8870
|
const boundary = length ? Math.floor((p1 - 1e-9) / length) * length : 0;
|
|
8885
8871
|
if (boundary > 0 && boundary >= p0) {
|
|
8886
|
-
const tb = start + (_nullishCoalesce(_optionalChain([sweep, 'access',
|
|
8872
|
+
const tb = start + (_nullishCoalesce(_optionalChain([sweep, 'access', _190 => _190.find, 'call', _191 => _191(([, position]) => position === boundary), 'optionalAccess', _192 => _192[0]]), () => ( first[0])));
|
|
8887
8873
|
const prev = keys[keys.length - 1][0];
|
|
8888
|
-
keys.push([Math.max(prev, tb -
|
|
8874
|
+
keys.push([Math.max(prev, tb - _chunkSUL4AJLIcjs.MOTION.time.reset), value2], [tb, 0]);
|
|
8889
8875
|
base = 0;
|
|
8890
8876
|
from = boundary;
|
|
8891
8877
|
}
|
|
8892
8878
|
for (const [t, position] of sweep) if (position >= from) keys.push([start + t, base + (set.ratio - base) * (position - from) / (p1 - from)]);
|
|
8893
8879
|
} else {
|
|
8894
|
-
const at = start + (_nullishCoalesce(_optionalChain([p, 'access',
|
|
8895
|
-
keys.push([at, value2], [at +
|
|
8880
|
+
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)));
|
|
8881
|
+
keys.push([at, value2], [at + _chunkSUL4AJLIcjs.MOTION.fade, set.ratio]);
|
|
8896
8882
|
}
|
|
8897
8883
|
value2 = set.ratio;
|
|
8898
8884
|
});
|
|
@@ -8909,12 +8895,12 @@ function stateTimes(diagram, edges, last) {
|
|
|
8909
8895
|
};
|
|
8910
8896
|
let on;
|
|
8911
8897
|
for (const edge2 of edges) {
|
|
8912
|
-
const event2 = _optionalChain([diagram, 'access',
|
|
8913
|
-
if (_optionalChain([event2, 'optionalAccess',
|
|
8898
|
+
const event2 = _optionalChain([diagram, 'access', _197 => _197.steps, 'access', _198 => _198[edge2.step], 'optionalAccess', _199 => _199.events, 'access', _200 => _200[edge2.event]]);
|
|
8899
|
+
if (_optionalChain([event2, 'optionalAccess', _201 => _201.type]) !== "edge" || event2.from === event2.to) continue;
|
|
8914
8900
|
if (on) {
|
|
8915
8901
|
const left = of(on.box);
|
|
8916
8902
|
left.lit.push({ start: on.since, end: edge2.start });
|
|
8917
|
-
if (on.box === event2.from && left.done === void 0) left.done = edge2.start +
|
|
8903
|
+
if (on.box === event2.from && left.done === void 0) left.done = edge2.start + _chunkSUL4AJLIcjs.MOTION.done;
|
|
8918
8904
|
on = void 0;
|
|
8919
8905
|
}
|
|
8920
8906
|
if (!isEnd(event2.to)) on = { box: event2.to, since: edge2.drawn };
|
|
@@ -8960,33 +8946,33 @@ var Motion = (_class = class {
|
|
|
8960
8946
|
}
|
|
8961
8947
|
/** `a` で出て `b` から消える。`within` を立てると `b` までに消え終わる。 */
|
|
8962
8948
|
vis(a, b = this.last, o = {}) {
|
|
8963
|
-
const f = _nullishCoalesce(o.f, () => (
|
|
8949
|
+
const f = _nullishCoalesce(o.f, () => ( _chunkSUL4AJLIcjs.MOTION.fade));
|
|
8964
8950
|
const on = _nullishCoalesce(o.on, () => ( {}));
|
|
8965
8951
|
const off = _nullishCoalesce(o.off, () => ( {}));
|
|
8966
8952
|
const out = o.within ? Math.max(a + f, b - f) : b;
|
|
8967
8953
|
return this.kf([
|
|
8968
8954
|
[0, { opacity: 0, ...off }],
|
|
8969
|
-
[a, { opacity: 0, ...off }, _nullishCoalesce(o.ein, () => (
|
|
8955
|
+
[a, { opacity: 0, ...off }, _nullishCoalesce(o.ein, () => ( _chunkSUL4AJLIcjs.EASE.out))],
|
|
8970
8956
|
[a + f, { opacity: 1, ...on }],
|
|
8971
|
-
[out, { opacity: 1, ...on },
|
|
8957
|
+
[out, { opacity: 1, ...on }, _chunkSUL4AJLIcjs.EASE.inOut],
|
|
8972
8958
|
[Math.min(out + f, this.total), { opacity: 0, ...off }],
|
|
8973
8959
|
[this.total, { opacity: 0, ...off }]
|
|
8974
8960
|
]);
|
|
8975
8961
|
}
|
|
8976
8962
|
/** 少し下から浮いて出る。 */
|
|
8977
8963
|
rise(a, b = this.last, within = false) {
|
|
8978
|
-
return this.vis(a, b, { on: { transform: "translateY(0)" }, off: { transform: `translateY(${
|
|
8964
|
+
return this.vis(a, b, { on: { transform: "translateY(0)" }, off: { transform: `translateY(${_chunkSUL4AJLIcjs.LOOK.rise}px)` }, within });
|
|
8979
8965
|
}
|
|
8980
8966
|
/** 小さな所から弾んで出る。 */
|
|
8981
8967
|
pop(a, b = this.last) {
|
|
8982
|
-
return this.vis(a, b, { f:
|
|
8968
|
+
return this.vis(a, b, { f: _chunkSUL4AJLIcjs.MOTION.popFade, ein: _chunkSUL4AJLIcjs.EASE.pop, on: { transform: "scale(1)" }, off: { transform: `scale(${_chunkSUL4AJLIcjs.LOOK.popFrom})` } });
|
|
8983
8969
|
}
|
|
8984
8970
|
/** 初めから出ていて `b` で消える。 */
|
|
8985
8971
|
until(b) {
|
|
8986
|
-
const f =
|
|
8972
|
+
const f = _chunkSUL4AJLIcjs.MOTION.untilFade;
|
|
8987
8973
|
return this.kf([
|
|
8988
8974
|
[0, { opacity: 1 }],
|
|
8989
|
-
[b, { opacity: 1 },
|
|
8975
|
+
[b, { opacity: 1 }, _chunkSUL4AJLIcjs.EASE.inOut],
|
|
8990
8976
|
[b + f, { opacity: 0 }],
|
|
8991
8977
|
[this.last, { opacity: 0 }],
|
|
8992
8978
|
[this.total, { opacity: 1 }]
|
|
@@ -9018,8 +9004,8 @@ var isTimeLayout = (layout) => layout.kind === "time";
|
|
|
9018
9004
|
var isTreeLayout = (layout) => layout.kind === "tree";
|
|
9019
9005
|
var font = (t) => `font:${t.weight} ${t.size}px var(--${t.family})`;
|
|
9020
9006
|
var mix = (pct, base = "var(--surf)") => `color-mix(in srgb,var(--c) ${pct}%,${base})`;
|
|
9021
|
-
var S =
|
|
9022
|
-
var X =
|
|
9007
|
+
var S = _chunkSUL4AJLIcjs.LOOK.stroke;
|
|
9008
|
+
var X = _chunkSUL4AJLIcjs.LOOK.mix;
|
|
9023
9009
|
var PAST = `color-mix(in srgb,var(--mute) ${X.past}%,var(--bg))`;
|
|
9024
9010
|
var PART_CSS = [
|
|
9025
9011
|
".dg{display:block;width:100%;height:auto;overflow:visible}",
|
|
@@ -9028,83 +9014,83 @@ var PART_CSS = [
|
|
|
9028
9014
|
".dg-bg{fill:var(--bg)}",
|
|
9029
9015
|
".dg-band{fill:color-mix(in srgb,var(--c) var(--tint),var(--bg));stroke:color-mix(in srgb,var(--c) var(--edge),transparent)}",
|
|
9030
9016
|
`.dg-bi{fill:${mix(X.regionIcon)};stroke:${mix(X.regionIconEdge, "transparent")}}`,
|
|
9031
|
-
`.dg-bz{${font(
|
|
9032
|
-
`.dg-bx{${font(
|
|
9017
|
+
`.dg-bz{${font(_chunkSUL4AJLIcjs.TYPE.regionName)};fill:var(--ct)}`,
|
|
9018
|
+
`.dg-bx{${font(_chunkSUL4AJLIcjs.TYPE.regionNote)};fill:var(--mute)}`,
|
|
9033
9019
|
".dg-st{fill:var(--surf);stroke:var(--hair)}",
|
|
9034
9020
|
`.dg-halo{fill:none;stroke:var(--c);stroke-width:${S.halo};stroke-opacity:.16}`,
|
|
9035
9021
|
`.dg-on{fill:none;stroke:var(--c);stroke-width:${S.on}}`,
|
|
9036
9022
|
`.dg-ic{fill:${mix(X.icon)}}`,
|
|
9037
9023
|
`.dg-slot{fill:none;stroke:${mix(X.slot, "transparent")};stroke-width:${S.slot};stroke-dasharray:3 3}`,
|
|
9038
9024
|
`.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(
|
|
9025
|
+
`.dg-sn{${font(_chunkSUL4AJLIcjs.TYPE.boxName)};fill:var(--ink)}`,
|
|
9026
|
+
`.dg-ss{${font(_chunkSUL4AJLIcjs.TYPE.boxSub)};fill:var(--mute)}`,
|
|
9027
|
+
`.dg-ss-ok{${font(_chunkSUL4AJLIcjs.TYPE.boxSubStrong)};fill:var(--ct)}`,
|
|
9028
|
+
`.dg-ss-act{${font(_chunkSUL4AJLIcjs.TYPE.boxSubStrong)};fill:var(--ink)}`,
|
|
9043
9029
|
`.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 ${
|
|
9030
|
+
`.dg-e{fill:none;stroke:var(--line);stroke-width:${S.edge};stroke-linecap:round;stroke-dasharray:0 ${_chunkSUL4AJLIcjs.LOOK.edge.ghostDash}}`,
|
|
9045
9031
|
`.dg-eh{fill:none;stroke:var(--line);stroke-width:${S.arrow};stroke-linecap:round;stroke-linejoin:round}`,
|
|
9046
9032
|
`.dg-e-on{fill:none;stroke:var(--c);stroke-width:${S.edgeOn};stroke-linecap:round;stroke-dasharray:1 2}`,
|
|
9047
9033
|
`.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 ${
|
|
9034
|
+
`.dg-flow{fill:none;stroke:var(--surf);stroke-width:${S.flow};stroke-linecap:round;stroke-dasharray:1.5 ${_chunkSUL4AJLIcjs.LOOK.edge.flowDash}}`,
|
|
9049
9035
|
`.dg-e-past{fill:none;stroke:${PAST};stroke-width:${S.edge};stroke-linecap:round}`,
|
|
9050
9036
|
`.dg-eh-past{fill:none;stroke:${PAST};stroke-width:${S.arrow};stroke-linecap:round;stroke-linejoin:round}`,
|
|
9051
9037
|
".dg-bd{cursor:pointer}",
|
|
9052
9038
|
".dg-bdf{fill:var(--c)}",
|
|
9053
|
-
`.dg-bdft{${font(
|
|
9039
|
+
`.dg-bdft{${font(_chunkSUL4AJLIcjs.TYPE.badge)};fill:var(--on-c)}`,
|
|
9054
9040
|
`.dg-bdr{fill:none;stroke:var(--c);stroke-width:${S.badgeRing};pointer-events:none}`,
|
|
9055
9041
|
`.dg-bdp{fill:${mix(X.badgePast)};stroke:${mix(X.badgePastEdge, "transparent")};stroke-width:${S.hair}}`,
|
|
9056
|
-
`.dg-bdpt{${font(
|
|
9042
|
+
`.dg-bdpt{${font(_chunkSUL4AJLIcjs.TYPE.badge)};fill:var(--ct)}`,
|
|
9057
9043
|
`.dg-bdp-g{fill:var(--surf);stroke:${PAST};stroke-width:${S.hair}}`,
|
|
9058
|
-
`.dg-bdpt-g{${font(
|
|
9044
|
+
`.dg-bdpt-g{${font(_chunkSUL4AJLIcjs.TYPE.badge)};fill:var(--mute)}`,
|
|
9059
9045
|
`.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(
|
|
9046
|
+
`.dg-cap text{${font(_chunkSUL4AJLIcjs.TYPE.label)};fill:var(--ct)}`,
|
|
9047
|
+
`.dg-capj text{${font(_chunkSUL4AJLIcjs.TYPE.labelJa)}}`,
|
|
9048
|
+
`.dg-cap-past text{${font(_chunkSUL4AJLIcjs.TYPE.label)};fill:var(--mute);fill-opacity:${_chunkSUL4AJLIcjs.LOOK.state.pastLabel}}`,
|
|
9049
|
+
`.dg-cap-pastj text{${font(_chunkSUL4AJLIcjs.TYPE.labelJa)}}`,
|
|
9050
|
+
`.dg-act text{${font(_chunkSUL4AJLIcjs.TYPE.action)};fill:var(--ct)}`,
|
|
9065
9051
|
".dg-car{fill:var(--carry,var(--ink))}",
|
|
9066
|
-
`.dg-car-t{${font(
|
|
9067
|
-
`.dg-car-tj{${font(
|
|
9052
|
+
`.dg-car-t{${font(_chunkSUL4AJLIcjs.TYPE.carrier)};fill:var(--bg)}`,
|
|
9053
|
+
`.dg-car-tj{${font(_chunkSUL4AJLIcjs.TYPE.carrierJa)}}`,
|
|
9068
9054
|
`.dg-env{fill:var(--carry,var(--ink));stroke:var(--surf);stroke-width:${S.envelope}}`,
|
|
9069
9055
|
`.dg-env-in{fill:none;stroke:var(--surf);stroke-width:${S.flow};stroke-linejoin:round;stroke-linecap:round}`,
|
|
9070
9056
|
".dg-coin{fill:var(--coin);stroke:var(--surf);stroke-width:1.2}",
|
|
9071
9057
|
".dg-coin-in{fill:none;stroke:var(--coinin);stroke-width:1.1}",
|
|
9072
9058
|
".dg-strip{fill:var(--surf);stroke:var(--hair)}",
|
|
9073
9059
|
`.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(
|
|
9060
|
+
`.dg-sh{${font(_chunkSUL4AJLIcjs.TYPE.stripTitle)};fill:var(--ink)}`,
|
|
9061
|
+
`.dg-fl{${font(_chunkSUL4AJLIcjs.TYPE.fieldName)};fill:var(--mute)}`,
|
|
9062
|
+
`.dg-fv{${font(_chunkSUL4AJLIcjs.TYPE.fieldValue)};fill:var(--ink)}`,
|
|
9063
|
+
`.dg-fvj{${font(_chunkSUL4AJLIcjs.TYPE.fieldValueJa)};fill:var(--ink)}`,
|
|
9078
9064
|
".dg-fv-c{fill:var(--ct)}",
|
|
9079
9065
|
".dg-fl-now{fill:var(--c)}",
|
|
9080
9066
|
`.dg-tr-ring{fill:none;stroke:var(--line);stroke-width:${S.trail}}`,
|
|
9081
9067
|
".dg-tr-fill{fill:var(--c)}",
|
|
9082
9068
|
".dg-tg rect{fill:var(--c)}",
|
|
9083
|
-
`.dg-tg text{${font(
|
|
9069
|
+
`.dg-tg text{${font(_chunkSUL4AJLIcjs.TYPE.tag)};fill:var(--on-c)}`,
|
|
9084
9070
|
`.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(
|
|
9071
|
+
`.dg-side-t{${font(_chunkSUL4AJLIcjs.TYPE.regionName)};fill:var(--ct)}`,
|
|
9072
|
+
`.dg-side-n{${font(_chunkSUL4AJLIcjs.TYPE.regionNote)};fill:var(--mute)}`,
|
|
9087
9073
|
`.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 ${
|
|
9074
|
+
`.dg-path{fill:none;stroke:${mix(X.path, "transparent")};stroke-width:${S.path};stroke-linecap:round;stroke-dasharray:0 ${_chunkSUL4AJLIcjs.LOOK.edge.ghostDash}}`,
|
|
9089
9075
|
`.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(
|
|
9076
|
+
`.dg-path-t{${font(_chunkSUL4AJLIcjs.TYPE.label)};fill:var(--ct)}`,
|
|
9077
|
+
`.dg-path-tj{${font(_chunkSUL4AJLIcjs.TYPE.labelJa)}}`,
|
|
9092
9078
|
".dg-start{fill:var(--ink)}",
|
|
9093
9079
|
`.dg-end{fill:var(--bg);stroke:var(--ink);stroke-width:${S.end}}`,
|
|
9094
9080
|
".dg-end-in{fill:var(--ink)}",
|
|
9095
9081
|
`.dg-end-x{fill:var(--bg);stroke:${mix(X.path, "transparent")};stroke-width:${S.arrow};stroke-dasharray:2 2.5}`,
|
|
9096
9082
|
`.dg-end-xi{fill:${mix(X.path, "transparent")}}`,
|
|
9097
|
-
`.dg-mark{${font(
|
|
9083
|
+
`.dg-mark{${font(_chunkSUL4AJLIcjs.TYPE.regionNote)};fill:var(--mute)}`,
|
|
9098
9084
|
`.dg-done{fill:var(--ink);stroke:var(--surf);stroke-width:${S.done}}`,
|
|
9099
9085
|
`.dg-done-ck{fill:none;stroke:var(--surf);stroke-width:${S.glyph};stroke-linecap:round;stroke-linejoin:round}`,
|
|
9100
9086
|
`.dg-git-l{fill:none;stroke:var(--c);stroke-width:${S.git};stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:1 2}`,
|
|
9101
9087
|
`.dg-git-cp{fill:none;stroke:var(--c);stroke-width:${S.gitOrphan};stroke-linecap:round;stroke-dasharray:3 3;stroke-opacity:.7}`,
|
|
9102
9088
|
`.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(
|
|
9089
|
+
`.dg-git-id{${font(_chunkSUL4AJLIcjs.TYPE.gitId)};fill:var(--ct)}`,
|
|
9090
|
+
`.dg-git-h{${font(_chunkSUL4AJLIcjs.TYPE.gitHash)};fill:var(--mute)}`,
|
|
9091
|
+
`.dg-git-n{${font(_chunkSUL4AJLIcjs.TYPE.gitNote)};fill:var(--ink2)}`,
|
|
9106
9092
|
`.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(
|
|
9093
|
+
`.dg-git-oldl{${font(_chunkSUL4AJLIcjs.TYPE.gitId)};fill:var(--ct);opacity:.55}`,
|
|
9108
9094
|
// 木の図 (#3233)。木の線は線の灰で、運ぶ物が通った跡は運ぶ物の色で引く
|
|
9109
9095
|
`.dg-tree-l{fill:none;stroke:var(--line);stroke-width:${S.tree};stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:1 2}`,
|
|
9110
9096
|
`.dg-tree-tr{fill:none;stroke:var(--c);stroke-width:${S.treeTrail};stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:1 2}`,
|
|
@@ -9112,66 +9098,66 @@ var PART_CSS = [
|
|
|
9112
9098
|
`.dg-tree-con{fill:none;stroke:var(--line);stroke-width:${S.treeCon};stroke-linecap:round;stroke-dasharray:2 3.5}`,
|
|
9113
9099
|
`.dg-tree-card{fill:var(--surf);stroke:var(--hair);stroke-width:${S.hair}}`,
|
|
9114
9100
|
`.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(
|
|
9101
|
+
`.dg-tree-ct{${font(_chunkSUL4AJLIcjs.TYPE.treeCard)};fill:var(--ink)}`,
|
|
9102
|
+
`.dg-tree-hash{${font(_chunkSUL4AJLIcjs.TYPE.treeHash)};fill:var(--ink)}`,
|
|
9103
|
+
`.dg-tree-name{${font(_chunkSUL4AJLIcjs.TYPE.treeName)};fill:var(--mute)}`,
|
|
9104
|
+
`.dg-tree-one{${font(_chunkSUL4AJLIcjs.TYPE.boxName)};fill:var(--ink)}`,
|
|
9105
|
+
`.dg-tree-rh{${font(_chunkSUL4AJLIcjs.TYPE.rootHash)};fill:var(--ink)}`,
|
|
9106
|
+
`.dg-tree-rn{${font(_chunkSUL4AJLIcjs.TYPE.rootName)};fill:var(--mute)}`,
|
|
9121
9107
|
// 列の図 (#3239)。封は列の左端から右へ伸びる
|
|
9122
9108
|
".dg-ln-chip{fill:var(--c)}",
|
|
9123
9109
|
`.dg-ln-plain{fill:color-mix(in srgb,var(--mute) ${X.chipPlain}%,var(--surf))}`,
|
|
9124
|
-
`.dg-ln-t{${font(
|
|
9125
|
-
`.dg-ln-tp{${font(
|
|
9110
|
+
`.dg-ln-t{${font(_chunkSUL4AJLIcjs.TYPE.chip)};fill:var(--on-c)}`,
|
|
9111
|
+
`.dg-ln-tp{${font(_chunkSUL4AJLIcjs.TYPE.chip)};fill:var(--ink)}`,
|
|
9126
9112
|
".dg-ln-seal{transform-box:fill-box;transform-origin:0 50%}",
|
|
9127
9113
|
`.dg-ln-sd{fill:color-mix(in srgb,var(--mute) ${X.sealDark}%,var(--surf))}`,
|
|
9128
9114
|
`.dg-ln-sl{fill:color-mix(in srgb,var(--mute) ${X.sealLight}%,var(--surf))}`,
|
|
9129
9115
|
`.dg-ln-stamp{fill:var(--surf);stroke:var(--c);stroke-width:${S.stamp}}`,
|
|
9130
|
-
`.dg-ln-st{${font(
|
|
9116
|
+
`.dg-ln-st{${font(_chunkSUL4AJLIcjs.TYPE.stamp)};fill:var(--ct)}`,
|
|
9131
9117
|
// 時間軸の図 (#3165)。和文を含む字は、末尾に j を付けた class で同じ大きさと太さの和文の字にする
|
|
9132
9118
|
`.dg-tm-ep{fill:color-mix(in srgb,var(--ink) ${X.timeShade}%,transparent)}`,
|
|
9133
9119
|
`.dg-tm-sep{stroke:var(--hair);stroke-width:${S.hair};stroke-dasharray:2 4}`,
|
|
9134
|
-
`.dg-tm-hd{${font(
|
|
9135
|
-
`.dg-tm-hdj{${font(
|
|
9120
|
+
`.dg-tm-hd{${font(_chunkSUL4AJLIcjs.TYPE.timeHead)};fill:var(--ink)}`,
|
|
9121
|
+
`.dg-tm-hdj{${font(_chunkV34DCH34cjs.sansOf.call(void 0, _chunkSUL4AJLIcjs.TYPE.timeHead))}}`,
|
|
9136
9122
|
`.dg-tm-slot{fill:none;stroke:var(--line);stroke-width:${S.timeSlot};opacity:.55}`,
|
|
9137
9123
|
".dg-tm-m{fill:var(--c)}",
|
|
9138
9124
|
".dg-tm-x{fill:var(--c-slate)}",
|
|
9139
9125
|
`.dg-tm-fr{fill:none;stroke:var(--c-blue);stroke-width:${S.timeFrame};stroke-dasharray:3 2}`,
|
|
9140
9126
|
`.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
9127
|
`.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(
|
|
9128
|
+
`.dg-tm-tk{${font(_chunkSUL4AJLIcjs.TYPE.timeTick)};fill:var(--mute)}`,
|
|
9129
|
+
`.dg-tm-tkj{${font(_chunkV34DCH34cjs.sansOf.call(void 0, _chunkSUL4AJLIcjs.TYPE.timeTick))}}`,
|
|
9130
|
+
`.dg-tm-en{${font(_chunkSUL4AJLIcjs.TYPE.timePeriod)};fill:var(--ink2)}`,
|
|
9131
|
+
`.dg-tm-er{${font(_chunkSUL4AJLIcjs.TYPE.timeRange)};fill:var(--mute)}`,
|
|
9132
|
+
`.dg-tm-erj{${font(_chunkV34DCH34cjs.sansOf.call(void 0, _chunkSUL4AJLIcjs.TYPE.timeRange))}}`,
|
|
9133
|
+
`.dg-tm-rn{${font(_chunkSUL4AJLIcjs.TYPE.timeRow)};fill:var(--ink2)}`,
|
|
9148
9134
|
`.dg-tm-br{fill:none;stroke:var(--c);stroke-width:${S.timeSpan};stroke-linecap:round;stroke-linejoin:round}`,
|
|
9149
|
-
`.dg-tm-bt{${font(
|
|
9135
|
+
`.dg-tm-bt{${font(_chunkSUL4AJLIcjs.TYPE.spanText)};fill:var(--ct)}`,
|
|
9150
9136
|
`.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
9137
|
`.dg-tm-con{fill:none;stroke:var(--line);stroke-width:${S.timeDrop};stroke-linecap:round;stroke-dasharray:0 3.5}`,
|
|
9152
9138
|
".dg-tm-pg{fill:var(--surf);stroke:var(--line);stroke-dasharray:2 2.5}",
|
|
9153
9139
|
`.dg-tm-pgl{fill:none;stroke:var(--mute);stroke-width:${S.timeFlag};stroke-linecap:round;stroke-linejoin:round}`,
|
|
9154
9140
|
`.dg-tm-pc{fill:var(--surf);stroke:var(--c);stroke-width:${S.timePoint}}`,
|
|
9155
9141
|
`.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(
|
|
9142
|
+
`.dg-tm-pn{${font(_chunkSUL4AJLIcjs.TYPE.pointName)};fill:var(--ink)}`,
|
|
9143
|
+
`.dg-tm-pnj{${font(_chunkV34DCH34cjs.sansOf.call(void 0, _chunkSUL4AJLIcjs.TYPE.pointName))}}`,
|
|
9158
9144
|
".dg-tm-pn-g{fill:var(--mute)}",
|
|
9159
|
-
`.dg-tm-ps{${font(
|
|
9145
|
+
`.dg-tm-ps{${font(_chunkSUL4AJLIcjs.TYPE.pointState)};fill:var(--ct)}`,
|
|
9160
9146
|
`.dg-tm-ln{fill:none;stroke:var(--c);stroke-width:${S.edgeOn};stroke-linecap:round;stroke-dasharray:1 2}`,
|
|
9161
9147
|
`.dg-tm-nd{stroke:var(--ink);stroke-width:${S.timeNeedle};opacity:.55}`,
|
|
9162
9148
|
".dg-tm-nh{fill:var(--ink)}",
|
|
9163
9149
|
".dg-tm-ph{fill:none;stroke:var(--line);stroke-dasharray:3 3}",
|
|
9164
9150
|
`.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(
|
|
9151
|
+
`.dg-tm-ext{${font(_chunkSUL4AJLIcjs.TYPE.emptyText)};fill:var(--t-slate)}`,
|
|
9166
9152
|
".dg-tm-mt{fill:var(--hair)}",
|
|
9167
9153
|
".dg-tm-mf{fill:var(--c);transform-box:fill-box;transform-origin:0 50%}",
|
|
9168
9154
|
`.dg-tm-mk{stroke:var(--ink2);stroke-width:${S.timeMeter}}`,
|
|
9169
|
-
`.dg-tm-ml{${font(
|
|
9155
|
+
`.dg-tm-ml{${font(_chunkSUL4AJLIcjs.TYPE.meterLine)};fill:var(--ink2)}`,
|
|
9170
9156
|
".dg-vp-bg{fill:var(--bg)}",
|
|
9171
9157
|
".dg-vp-frame{fill:none;stroke:var(--hair)}",
|
|
9172
9158
|
".dg-hd-bg{fill:var(--bg)}",
|
|
9173
9159
|
".dg-mm-bg{fill:var(--surf);stroke:var(--hair)}",
|
|
9174
|
-
`.dg-mm-t{${font(
|
|
9160
|
+
`.dg-mm-t{${font(_chunkSUL4AJLIcjs.TYPE.miniTitle)};fill:var(--mute)}`,
|
|
9175
9161
|
".dg-mm-world{fill:var(--sunk);stroke:var(--hair)}",
|
|
9176
9162
|
`.dg-mm-band{fill:${mix(X.miniBand)};stroke:${mix(X.miniBandEdge, "transparent")};stroke-width:.6}`,
|
|
9177
9163
|
`.dg-mm-card{fill:${mix(X.mini)}}`,
|
|
@@ -9205,9 +9191,9 @@ function subChanges(diagram, timeline, actionsInBox) {
|
|
|
9205
9191
|
const { whole } = timeline;
|
|
9206
9192
|
let order = 0;
|
|
9207
9193
|
for (const time of timeline.events) {
|
|
9208
|
-
const event2 = _optionalChain([diagram, 'access',
|
|
9209
|
-
if (_optionalChain([event2, 'optionalAccess',
|
|
9210
|
-
if (actionsInBox && _optionalChain([event2, 'optionalAccess',
|
|
9194
|
+
const event2 = _optionalChain([diagram, 'access', _202 => _202.steps, 'access', _203 => _203[time.step], 'optionalAccess', _204 => _204.events, 'access', _205 => _205[time.event]]);
|
|
9195
|
+
if (_optionalChain([event2, 'optionalAccess', _206 => _206.type]) === "swap") raw.push({ t: time.at, order: order++, box: event2.box, set: event2.text });
|
|
9196
|
+
if (actionsInBox && _optionalChain([event2, 'optionalAccess', _207 => _207.type]) === "action") {
|
|
9211
9197
|
raw.push({ t: time.at, order: order++, box: event2.box, act: event2.label });
|
|
9212
9198
|
const end = timeline.steps[time.step].end;
|
|
9213
9199
|
if (!whole || end <= whole.start) raw.push({ t: end, order: order++, box: event2.box, act: null });
|
|
@@ -9222,7 +9208,7 @@ function subChanges(diagram, timeline, actionsInBox) {
|
|
|
9222
9208
|
const list2 = [];
|
|
9223
9209
|
const changes = raw.filter((r) => r.box === box.id);
|
|
9224
9210
|
const latest = [...changes].reverse().find((r) => r.set !== void 0 || typeof r.act === "string");
|
|
9225
|
-
if (whole && typeof _optionalChain([latest, 'optionalAccess',
|
|
9211
|
+
if (whole && typeof _optionalChain([latest, 'optionalAccess', _208 => _208.act]) === "string") changes.push({ t: whole.start, order: order++, box: box.id, act: latest.act });
|
|
9226
9212
|
for (const change of changes) {
|
|
9227
9213
|
if (change.set !== void 0) {
|
|
9228
9214
|
base = [change.set, "dg-ss-ok"];
|
|
@@ -9236,7 +9222,7 @@ function subChanges(diagram, timeline, actionsInBox) {
|
|
|
9236
9222
|
}
|
|
9237
9223
|
const kept = list2.filter((change, k) => {
|
|
9238
9224
|
const next = list2[k + 1];
|
|
9239
|
-
return next === void 0 || next[0] - change[0] >=
|
|
9225
|
+
return next === void 0 || next[0] - change[0] >= _chunkSUL4AJLIcjs.MOTION.minShow;
|
|
9240
9226
|
});
|
|
9241
9227
|
out.set(box.id, kept);
|
|
9242
9228
|
}
|
|
@@ -9245,9 +9231,9 @@ function subChanges(diagram, timeline, actionsInBox) {
|
|
|
9245
9231
|
function fieldChanges(diagram, timeline, layout) {
|
|
9246
9232
|
const out = /* @__PURE__ */ new Map();
|
|
9247
9233
|
for (const time of timeline.events) {
|
|
9248
|
-
const event2 = _optionalChain([diagram, 'access',
|
|
9249
|
-
if (_optionalChain([event2, 'optionalAccess',
|
|
9250
|
-
const color = _nullishCoalesce(_optionalChain([layout, 'access',
|
|
9234
|
+
const event2 = _optionalChain([diagram, 'access', _209 => _209.steps, 'access', _210 => _210[time.step], 'optionalAccess', _211 => _211.events, 'access', _212 => _212[time.event]]);
|
|
9235
|
+
if (_optionalChain([event2, 'optionalAccess', _213 => _213.type]) !== "strip") continue;
|
|
9236
|
+
const color = _nullishCoalesce(_optionalChain([layout, 'access', _214 => _214.badges, 'access', _215 => _215[time.step], 'optionalAccess', _216 => _216.color]), () => ( "slate"));
|
|
9251
9237
|
const list2 = _nullishCoalesce(out.get(event2.field), () => ( []));
|
|
9252
9238
|
const until = timeline.steps[time.step].end;
|
|
9253
9239
|
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 +9249,26 @@ function fadeBefore(l, time, steps) {
|
|
|
9263
9249
|
return cut > after.start ? { ...rest, after: { start: after.start, end: Math.min(after.end, cut) } } : rest;
|
|
9264
9250
|
}
|
|
9265
9251
|
function drawSvg(diagram, layout, timeline, palette, theme, follow, ink = [], traces = []) {
|
|
9266
|
-
const vars =
|
|
9252
|
+
const vars = _chunkSUL4AJLIcjs.paletteVars.call(void 0, palette, theme);
|
|
9267
9253
|
const id = nameOf(`${JSON.stringify(diagram)}|${vars}|${follow ? `${follow.width}|${follow.lang}` : ""}`);
|
|
9268
9254
|
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 };
|
|
9255
|
+
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
9256
|
const on = involved(diagram);
|
|
9271
9257
|
const subs = subChanges(diagram, timeline, layout.kind !== "sequence");
|
|
9272
9258
|
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(
|
|
9259
|
+
for (const region of layout.regions) L.band.push(_chunkV34DCH34cjs.band.call(void 0, region, ink));
|
|
9260
|
+
const ghostColor = _nullishCoalesce(_optionalChain([layout, 'access', _217 => _217.boxes, 'access', _218 => _218.find, 'call', _219 => _219((b) => b.ghost), 'optionalAccess', _220 => _220.color]), () => ( "slate"));
|
|
9261
|
+
if (layout.side) L.band.push(_chunkV34DCH34cjs.side.call(void 0, layout.side, ghostColor, ink));
|
|
9262
|
+
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]);
|
|
9263
|
+
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));
|
|
9264
|
+
for (const e of layout.ends) L.node.push(_chunkV34DCH34cjs.endMark.call(void 0, e, ghostColor, ink));
|
|
9279
9265
|
const isState = layout.kind === "state";
|
|
9280
9266
|
const arrivals = new Map((_nullishCoalesce(timeline.states, () => ( []))).flatMap((s) => s.lit[0] ? [[s.box, s.lit[0].start]] : []));
|
|
9281
9267
|
const meters = new Map((_nullishCoalesce(timeline.meters, () => ( []))).map((meter) => [meter.field, meter.keys]));
|
|
9282
9268
|
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) =>
|
|
9269
|
+
const drawStrip = (s) => _chunkV34DCH34cjs.strip.call(void 0, s, fieldChanges(diagram, timeline, layout), ctx, isState, arrivals, gauge);
|
|
9284
9270
|
if (layout.strip && !follow) L.band.push(drawStrip(layout.strip));
|
|
9285
|
-
for (const line2 of layout.lifelines) L.base.push(
|
|
9271
|
+
for (const line2 of layout.lifelines) L.base.push(_chunkV34DCH34cjs.lifeline.call(void 0, line2.x, line2.y1, line2.y2));
|
|
9286
9272
|
if (isGitLayout(layout)) {
|
|
9287
9273
|
const git = kindParts("git").drawGit(layout, diagram, timeline, ctx);
|
|
9288
9274
|
L.base.push(git.links);
|
|
@@ -9297,7 +9283,7 @@ function drawSvg(diagram, layout, timeline, palette, theme, follow, ink = [], tr
|
|
|
9297
9283
|
L.lit.push(tree.trails);
|
|
9298
9284
|
L.node.push(tree.nodes);
|
|
9299
9285
|
}
|
|
9300
|
-
const runs = new Set((_nullishCoalesce(_optionalChain([treeLayout, 'optionalAccess',
|
|
9286
|
+
const runs = new Set((_nullishCoalesce(_optionalChain([treeLayout, 'optionalAccess', _225 => _225.runs]), () => ( []))).map((r) => `${r.step}/${r.event}`));
|
|
9301
9287
|
const lineupLayout = isLineupLayout(layout) ? layout : void 0;
|
|
9302
9288
|
if (lineupLayout) {
|
|
9303
9289
|
const lineup = kindParts("lineup").drawLineup(lineupLayout, diagram, timeline, ctx, subs);
|
|
@@ -9312,51 +9298,51 @@ function drawSvg(diagram, layout, timeline, palette, theme, follow, ink = [], tr
|
|
|
9312
9298
|
L.node.push(drawn.node);
|
|
9313
9299
|
L.top.push(drawn.top);
|
|
9314
9300
|
}
|
|
9315
|
-
const wired = new Set((_nullishCoalesce(_optionalChain([timeLayout, 'optionalAccess',
|
|
9301
|
+
const wired = new Set((_nullishCoalesce(_optionalChain([timeLayout, 'optionalAccess', _226 => _226.wires]), () => ( []))).map((w) => `${w.step}/${w.event}`));
|
|
9316
9302
|
for (const e of layout.edges) {
|
|
9317
9303
|
const time = timeline.edges.find((t) => t.step === e.step && t.event === e.event);
|
|
9318
9304
|
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 =
|
|
9305
|
+
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)));
|
|
9306
|
+
const drawn = _chunkV34DCH34cjs.edge.call(void 0, e, time, ctx, isState, since);
|
|
9321
9307
|
L.base.push(drawn.base);
|
|
9322
9308
|
L.lit.push(drawn.lit);
|
|
9323
9309
|
}
|
|
9324
9310
|
const states = new Map((_nullishCoalesce(timeline.states, () => ( []))).map((s) => [s.box, s]));
|
|
9325
9311
|
const links = new Map(diagram.boxes.flatMap((b) => b.link === void 0 ? [] : [[b.id, b.link]]));
|
|
9326
|
-
const linked = (id2, markup) =>
|
|
9312
|
+
const linked = (id2, markup) => _chunkV34DCH34cjs.linkTo.call(void 0, links.get(id2), markup);
|
|
9327
9313
|
for (const box of timeLayout || lineupLayout ? [] : layout.boxes) {
|
|
9328
9314
|
if (box.ghost) {
|
|
9329
|
-
L.node.push(linked(box.id,
|
|
9315
|
+
L.node.push(linked(box.id, _chunkV34DCH34cjs.ghostCard.call(void 0, box, ink)));
|
|
9330
9316
|
continue;
|
|
9331
9317
|
}
|
|
9332
9318
|
const state = states.get(box.id);
|
|
9333
|
-
L.node.push(linked(box.id,
|
|
9334
|
-
if (_optionalChain([state, 'optionalAccess',
|
|
9319
|
+
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)));
|
|
9320
|
+
if (_optionalChain([state, 'optionalAccess', _234 => _234.done]) !== void 0) L.node.push(_chunkV34DCH34cjs.doneMark.call(void 0, box, state.done, ctx));
|
|
9335
9321
|
}
|
|
9336
|
-
for (const b of layout.badges) if (!(follow && onStrip(layout, b))) L.badge.push(
|
|
9322
|
+
for (const b of layout.badges) if (!(follow && onStrip(layout, b))) L.badge.push(_chunkV34DCH34cjs.badge.call(void 0, b, ctx, isState));
|
|
9337
9323
|
for (const l of layout.labels) {
|
|
9338
9324
|
const time = timeline.labels.find((t) => t.step === l.step && t.event === l.event);
|
|
9339
|
-
if (time) L.top.push(
|
|
9325
|
+
if (time) L.top.push(_chunkV34DCH34cjs.label.call(void 0, l, fadeBefore(l, time, timeline.steps), ctx));
|
|
9340
9326
|
}
|
|
9341
9327
|
const { whole } = timeline;
|
|
9342
9328
|
for (const a of layout.actions) {
|
|
9343
9329
|
const time = timeline.events.find((t) => t.step === a.step && t.event === a.event);
|
|
9344
9330
|
if (!time) continue;
|
|
9345
9331
|
const until = timeline.steps[a.step].end;
|
|
9346
|
-
L.top.push(whole && until > whole.start ?
|
|
9332
|
+
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
9333
|
}
|
|
9348
9334
|
for (const time of timeline.carriers) {
|
|
9349
9335
|
const e = layout.edges.find((x) => x.step === time.step && x.event === time.event);
|
|
9350
|
-
if (e) L.top.push(
|
|
9336
|
+
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
9337
|
}
|
|
9352
9338
|
const content = Object.values(L).map((parts) => parts.join("")).join("");
|
|
9353
|
-
const { near, far, nearY, farY } =
|
|
9339
|
+
const { near, far, nearY, farY } = _chunkSUL4AJLIcjs.LOOK.shadow;
|
|
9354
9340
|
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="${
|
|
9341
|
+
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("") : "";
|
|
9342
|
+
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("");
|
|
9343
|
+
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 };
|
|
9344
|
+
const css = `.dg-${id}{${_chunkSUL4AJLIcjs.FONT_VARS};--T:${timeline.total}s;${vars}}${PART_CSS}${m.frames.join("")}`;
|
|
9345
|
+
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
9346
|
}
|
|
9361
9347
|
function union(rects) {
|
|
9362
9348
|
const x = Math.min(...rects.map((r) => r.x));
|
|
@@ -9371,7 +9357,7 @@ function focusOf(layout, diagram, step) {
|
|
|
9371
9357
|
return rects.length === 0 ? void 0 : union(rects);
|
|
9372
9358
|
}
|
|
9373
9359
|
function badgeFocus(badge2, parts, vw, vh) {
|
|
9374
|
-
const room =
|
|
9360
|
+
const room = _chunkSUL4AJLIcjs.LOOK.badge.r + _chunkSUL4AJLIcjs.LOOK.follow.badgeRoom;
|
|
9375
9361
|
const { x: bx, y: by } = badge2;
|
|
9376
9362
|
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
9363
|
let held = { x: bx - room, y: by - room, w: room * 2, h: room * 2 };
|
|
@@ -9390,7 +9376,7 @@ function focusParts(layout, diagram, step) {
|
|
|
9390
9376
|
}
|
|
9391
9377
|
rects.push(...layout.labels.filter((l) => l.step === step), ...layout.actions.filter((a) => a.step === step));
|
|
9392
9378
|
if (isTreeLayout(layout)) {
|
|
9393
|
-
const ends = new Set((_nullishCoalesce(_optionalChain([diagram, 'access',
|
|
9379
|
+
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
9380
|
rects.push(...layout.nodes.filter((n) => n.step === step || ends.has(n.id)));
|
|
9395
9381
|
for (const l of layout.links.filter((x) => x.step === step)) {
|
|
9396
9382
|
const xs = l.points.map((p) => p[0]);
|
|
@@ -9399,10 +9385,10 @@ function focusParts(layout, diagram, step) {
|
|
|
9399
9385
|
}
|
|
9400
9386
|
}
|
|
9401
9387
|
if (isLineupLayout(layout)) {
|
|
9402
|
-
const changed = new Set((_nullishCoalesce(_optionalChain([diagram, 'access',
|
|
9388
|
+
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
9389
|
rects.push(...layout.lanes.filter((lane) => changed.has(lane.id)));
|
|
9404
9390
|
}
|
|
9405
|
-
for (const event2 of _nullishCoalesce(_optionalChain([diagram, 'access',
|
|
9391
|
+
for (const event2 of _nullishCoalesce(_optionalChain([diagram, 'access', _241 => _241.steps, 'access', _242 => _242[step], 'optionalAccess', _243 => _243.events]), () => ( []))) {
|
|
9406
9392
|
const ids = event2.type === "edge" ? [event2.from, event2.to] : event2.type === "action" || event2.type === "swap" ? [event2.box] : [];
|
|
9407
9393
|
for (const id of ids) {
|
|
9408
9394
|
const box = layout.boxes.find((b) => b.id === id);
|
|
@@ -9412,22 +9398,22 @@ function focusParts(layout, diagram, step) {
|
|
|
9412
9398
|
return rects;
|
|
9413
9399
|
}
|
|
9414
9400
|
function followView(layout, timeline, diagram, m, id, content, follow, heads, drawTable) {
|
|
9415
|
-
const F =
|
|
9416
|
-
const M =
|
|
9401
|
+
const F = _chunkSUL4AJLIcjs.LOOK.follow;
|
|
9402
|
+
const M = _chunkSUL4AJLIcjs.LOOK.mini;
|
|
9417
9403
|
const frameWidth = Math.max(1, follow.width);
|
|
9418
9404
|
const full = Math.min(layout.width, frameWidth);
|
|
9419
9405
|
const worldH = layout.strip ? layout.strip.y : layout.height;
|
|
9420
|
-
const title =
|
|
9406
|
+
const title = _chunkSUL4AJLIcjs.FIGURE_TEXT[follow.lang].overview;
|
|
9421
9407
|
const sized = (vh2) => {
|
|
9422
9408
|
const mw2 = Math.min(M.w, full * 0.4, vh2 * 0.4 / layout.height * layout.width);
|
|
9423
9409
|
const k2 = mw2 / layout.width;
|
|
9424
9410
|
const mh2 = worldH * k2;
|
|
9425
|
-
const bw2 = Math.max(mw2, Math.ceil(
|
|
9411
|
+
const bw2 = Math.max(mw2, Math.ceil(_chunkSUL4AJLIcjs.textWidth.call(void 0, title, _chunkSUL4AJLIcjs.TYPE.miniTitle)));
|
|
9426
9412
|
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
9413
|
};
|
|
9428
9414
|
const natural = sized(Math.min(worldH, Math.max(F.minH, full * F.aspect)));
|
|
9429
9415
|
const bare = frameWidth < F.narrow && (natural.beside || layout.strip !== void 0);
|
|
9430
|
-
const tableH = layout.strip ?
|
|
9416
|
+
const tableH = layout.strip ? _chunkSUL4AJLIcjs.rewrapStrip.call(void 0, layout.strip, 0, 0, full).h + M.inset : 0;
|
|
9431
9417
|
const room = follow.height === void 0 ? Number.POSITIVE_INFINITY : (natural.beside || bare ? follow.height : follow.height - natural.bgH - M.inset) - tableH;
|
|
9432
9418
|
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
9419
|
const vw = beside && !bare ? Math.min(layout.width, frameWidth - bgW - M.inset) : full;
|
|
@@ -9436,7 +9422,7 @@ function followView(layout, timeline, diagram, m, id, content, follow, heads, dr
|
|
|
9436
9422
|
const strip2 = heads === "" ? 0 : F.head.pad * 2 + F.head.h;
|
|
9437
9423
|
const below = vh - strip2;
|
|
9438
9424
|
const clampY = (y) => Math.min(worldH - below / 2, Math.max(top + below / 2, y));
|
|
9439
|
-
const r =
|
|
9425
|
+
const r = _chunkSUL4AJLIcjs.LOOK.badge.r;
|
|
9440
9426
|
let prev = [layout.width / 2, worldH / 2];
|
|
9441
9427
|
const middles = timeline.steps.map((_, s) => {
|
|
9442
9428
|
if (isTimeLayout(layout)) {
|
|
@@ -9463,10 +9449,10 @@ function followView(layout, timeline, diagram, m, id, content, follow, heads, dr
|
|
|
9463
9449
|
if (s === 0) return;
|
|
9464
9450
|
const before = centers[s - 1];
|
|
9465
9451
|
const start = timeline.steps[s].start;
|
|
9466
|
-
cam.push([start, before[0], before[1], 1,
|
|
9452
|
+
cam.push([start, before[0], before[1], 1, _chunkSUL4AJLIcjs.EASE.inOut], [start + F.ease, c[0], c[1]]);
|
|
9467
9453
|
});
|
|
9468
9454
|
const cl = centers[centers.length - 1];
|
|
9469
|
-
cam.push([timeline.last, cl[0], cl[1], 1,
|
|
9455
|
+
cam.push([timeline.last, cl[0], cl[1], 1, _chunkSUL4AJLIcjs.EASE.inOut], [timeline.total, c0[0], c0[1]]);
|
|
9470
9456
|
const camKf = m.move(cam.map(([t, cx, cy, s, e]) => [t, vw / 2 - cx, vh / 2 - cy, s, e]));
|
|
9471
9457
|
const bgX = beside ? vw + M.inset : vw - bgW - M.inset;
|
|
9472
9458
|
const bgY = beside ? 0 : vh + M.inset;
|
|
@@ -9475,9 +9461,9 @@ function followView(layout, timeline, diagram, m, id, content, follow, heads, dr
|
|
|
9475
9461
|
const my = bgY + M.pad + M.title;
|
|
9476
9462
|
const overview = () => {
|
|
9477
9463
|
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="${
|
|
9464
|
+
...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"/>`),
|
|
9465
|
+
...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"/>`),
|
|
9466
|
+
...(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
9467
|
].join("");
|
|
9482
9468
|
const vp = m.move(cam.map(([t, cx, cy, , e]) => [t, mx + (cx - vw / 2) * k, my + (cy - vh / 2) * k, 1, e]));
|
|
9483
9469
|
return {
|
|
@@ -9487,25 +9473,25 @@ function followView(layout, timeline, diagram, m, id, content, follow, heads, dr
|
|
|
9487
9473
|
};
|
|
9488
9474
|
const mini = bare ? { clip: "", body: "" } : overview();
|
|
9489
9475
|
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="${
|
|
9476
|
+
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
9477
|
const w = beside && !bare ? vw + M.inset + bgW : full;
|
|
9492
9478
|
const bottom = beside || bare ? vh : bgY + bgH;
|
|
9493
9479
|
if (!layout.strip) return { body, w, h: bottom };
|
|
9494
|
-
const table =
|
|
9480
|
+
const table = _chunkSUL4AJLIcjs.rewrapStrip.call(void 0, layout.strip, 0, bottom + M.inset, full);
|
|
9495
9481
|
return { body: body + drawTable(table, layout.strip), w, h: table.y + table.h };
|
|
9496
9482
|
}
|
|
9497
9483
|
function paletteOf(options, theme) {
|
|
9498
|
-
const palette =
|
|
9484
|
+
const palette = _chunkSUL4AJLIcjs.resolvePalette.call(void 0, options.palette);
|
|
9499
9485
|
if (!options.colors) return palette;
|
|
9500
|
-
const words =
|
|
9501
|
-
const errors = Object.entries(options.colors).flatMap(([name2, value2]) => !
|
|
9486
|
+
const words = _chunkSUL4AJLIcjs.FIGURE_TEXT[_nullishCoalesce(options.lang, () => ( "ja"))];
|
|
9487
|
+
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
9488
|
if (errors.length > 0) throw new Error(words.cannotDraw(errors.join(" / ")));
|
|
9503
9489
|
return { ...palette, [theme]: { ...palette[theme], ...options.colors } };
|
|
9504
9490
|
}
|
|
9505
9491
|
function renderDiagram(input, options = {}) {
|
|
9506
9492
|
const lang = _nullishCoalesce(options.lang, () => ( "ja"));
|
|
9507
9493
|
const read = readDiagram(input, { lang });
|
|
9508
|
-
if (!read.ok) throw new Error(
|
|
9494
|
+
if (!read.ok) throw new Error(_chunkSUL4AJLIcjs.FIGURE_TEXT[lang].cannotDraw(read.errors.map((e) => `${e.pointer} ${e.message}`).join(" / ")));
|
|
9509
9495
|
const diagram = read.diagram;
|
|
9510
9496
|
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
9497
|
return renderLayout(diagram, layout, buildTimeline(diagram, options.still === true), options);
|
|
@@ -9521,11 +9507,11 @@ function renderLayout(diagram, layout, timeline, options = {}) {
|
|
|
9521
9507
|
palette: palette.id,
|
|
9522
9508
|
theme,
|
|
9523
9509
|
...diagram.view ? { view: diagram.view } : {},
|
|
9524
|
-
fonts: { ...
|
|
9510
|
+
fonts: { ..._chunkSUL4AJLIcjs.FONTS },
|
|
9525
9511
|
layout,
|
|
9526
9512
|
timeline,
|
|
9527
9513
|
diagram,
|
|
9528
|
-
overlaps:
|
|
9514
|
+
overlaps: _chunkV34DCH34cjs.findOverlaps.call(void 0, ink, timeline.stills, traces)
|
|
9529
9515
|
};
|
|
9530
9516
|
}
|
|
9531
9517
|
|
|
@@ -9533,16 +9519,16 @@ function renderLayout(diagram, layout, timeline, options = {}) {
|
|
|
9533
9519
|
function chooseView(rendered, frameWidth, frameHeight) {
|
|
9534
9520
|
const byWidth = Math.max(0, frameWidth) / rendered.layout.width;
|
|
9535
9521
|
const scale = frameHeight === void 0 ? byWidth : Math.min(byWidth, Math.max(0, frameHeight) / rendered.layout.height);
|
|
9536
|
-
const textPx = scale *
|
|
9522
|
+
const textPx = scale * _chunkSUL4AJLIcjs.TYPE.boxName.size;
|
|
9537
9523
|
if (rendered.view) return { mode: rendered.view, textPx };
|
|
9538
|
-
return { mode: textPx >=
|
|
9524
|
+
return { mode: textPx >= _chunkSUL4AJLIcjs.READABLE_PX ? "fixed" : "follow", textPx };
|
|
9539
9525
|
}
|
|
9540
9526
|
|
|
9541
9527
|
// src/player.ts
|
|
9542
9528
|
var font2 = (t) => `font:${t.weight} ${t.size}px var(--${t.family})`;
|
|
9543
9529
|
var px = (v) => `${v}px`;
|
|
9544
9530
|
function playerCss() {
|
|
9545
|
-
const P =
|
|
9531
|
+
const P = _chunkSUL4AJLIcjs.LOOK.player;
|
|
9546
9532
|
const hidden = px(P.hidden);
|
|
9547
9533
|
return [
|
|
9548
9534
|
`.dg-player{display:flex;flex-direction:column;gap:${px(P.gap)};color:var(--ink)}`,
|
|
@@ -9551,15 +9537,15 @@ function playerCss() {
|
|
|
9551
9537
|
`.dg-bar{container:dg-bar/inline-size}`,
|
|
9552
9538
|
`.dg-row{display:flex;align-items:flex-start;gap:${px(P.gap)}}`,
|
|
9553
9539
|
`.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(
|
|
9540
|
+
`.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
9541
|
`.dg-btn:focus-visible{outline:${px(P.focus)} solid var(--c-blue);outline-offset:${px(P.focus)}}`,
|
|
9556
9542
|
`.dg-say{display:flex;gap:${px(P.gap)};min-width:0}`,
|
|
9557
|
-
`.dg-no{${font2(
|
|
9543
|
+
`.dg-no{${font2(_chunkSUL4AJLIcjs.TYPE.stepNo)};color:var(--mute);padding-top:${px(P.focus)}}`,
|
|
9558
9544
|
`.dg-txt{display:grid;grid-template-columns:minmax(0,1fr);min-width:0}`,
|
|
9559
9545
|
`.dg-txt>*{grid-area:1/1}`,
|
|
9560
9546
|
`.dg-room{visibility:hidden}`,
|
|
9561
|
-
`.dg-tt{${font2(
|
|
9562
|
-
`.dg-tb{${font2(
|
|
9547
|
+
`.dg-tt{${font2(_chunkSUL4AJLIcjs.TYPE.stepTitle)};margin:0}`,
|
|
9548
|
+
`.dg-tb{${font2(_chunkSUL4AJLIcjs.TYPE.stepBody)};color:var(--ink2);margin:0;white-space:pre-line}`,
|
|
9563
9549
|
`.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
9550
|
// 狭い帯 (携帯の幅) では、段を送る釦を指で押せる大きさにし、その横に番号を置き、
|
|
9565
9551
|
// 題を 2 段目、本文を 3 段目に置いてどちらも帯の全幅を使う (#3057、#3069)。
|
|
@@ -9570,7 +9556,7 @@ function playerCss() {
|
|
|
9570
9556
|
// 指で触る時は、広い帯でも段を送る釦を指で押せる大きさにする (#3076)。並びは横 1 列のまま変えない。
|
|
9571
9557
|
// 広い帯は本文が 2 行あれば帯の高さが変わらず、本文の無い帯だけが釦の分だけ高くなる
|
|
9572
9558
|
`@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(
|
|
9559
|
+
`.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
9560
|
].join("");
|
|
9575
9561
|
}
|
|
9576
9562
|
function ensureCss(doc) {
|
|
@@ -9587,10 +9573,10 @@ var stepNo = (step, count) => `${pad(step + 1)}/${pad(count)}`;
|
|
|
9587
9573
|
function mountDiagram(host, diagram, options = {}) {
|
|
9588
9574
|
const doc = host.ownerDocument;
|
|
9589
9575
|
const win = doc.defaultView;
|
|
9590
|
-
const reduce = Boolean(_optionalChain([win, 'optionalAccess',
|
|
9576
|
+
const reduce = Boolean(_optionalChain([win, 'optionalAccess', _244 => _244.matchMedia, 'optionalCall', _245 => _245("(prefers-reduced-motion: reduce)"), 'access', _246 => _246.matches]));
|
|
9591
9577
|
const rendered = renderDiagram(diagram, options);
|
|
9592
9578
|
const lang = _nullishCoalesce(options.lang, () => ( "ja"));
|
|
9593
|
-
const words =
|
|
9579
|
+
const words = _chunkSUL4AJLIcjs.FIGURE_TEXT[lang];
|
|
9594
9580
|
const palette = paletteOf(options, rendered.theme);
|
|
9595
9581
|
const { timeline } = rendered;
|
|
9596
9582
|
const steps = rendered.diagram.steps;
|
|
@@ -9599,7 +9585,7 @@ function mountDiagram(host, diagram, options = {}) {
|
|
|
9599
9585
|
const root = doc.createElement("div");
|
|
9600
9586
|
root.className = "dg-player";
|
|
9601
9587
|
root.dataset.dragon = "player";
|
|
9602
|
-
root.setAttribute("style", `${
|
|
9588
|
+
root.setAttribute("style", `${_chunkSUL4AJLIcjs.FONT_VARS};${_chunkSUL4AJLIcjs.paletteVars.call(void 0, palette, rendered.theme)}`);
|
|
9603
9589
|
const frame = doc.createElement("div");
|
|
9604
9590
|
frame.className = "dg-frame";
|
|
9605
9591
|
const button = (name2, label2, text2) => {
|
|
@@ -9707,7 +9693,7 @@ function mountDiagram(host, diagram, options = {}) {
|
|
|
9707
9693
|
if (!svg) return;
|
|
9708
9694
|
for (const old of svg.querySelectorAll(".dg-spots")) old.remove();
|
|
9709
9695
|
if (marked.length === 0) return;
|
|
9710
|
-
const M =
|
|
9696
|
+
const M = _chunkSUL4AJLIcjs.LOOK.mark;
|
|
9711
9697
|
const group = doc.createElementNS(SVG_NS, "g");
|
|
9712
9698
|
group.setAttribute("class", "dg-spots");
|
|
9713
9699
|
for (const r of marked) {
|
|
@@ -9756,11 +9742,11 @@ function mountDiagram(host, diagram, options = {}) {
|
|
|
9756
9742
|
const show = () => {
|
|
9757
9743
|
const current = steps[step];
|
|
9758
9744
|
no.textContent = stepNo(step, count);
|
|
9759
|
-
title.textContent = _nullishCoalesce(_optionalChain([current, 'optionalAccess',
|
|
9760
|
-
body.textContent = _nullishCoalesce(_optionalChain([current, 'optionalAccess',
|
|
9745
|
+
title.textContent = _nullishCoalesce(_optionalChain([current, 'optionalAccess', _247 => _247.title]), () => ( ""));
|
|
9746
|
+
body.textContent = _nullishCoalesce(_optionalChain([current, 'optionalAccess', _248 => _248.body]), () => ( ""));
|
|
9761
9747
|
toggleButton.setAttribute("aria-label", playing ? words.pause : words.play);
|
|
9762
9748
|
toggleButton.textContent = playing ? BUTTON_TEXT.pause : BUTTON_TEXT.play;
|
|
9763
|
-
_optionalChain([options, 'access',
|
|
9749
|
+
_optionalChain([options, 'access', _249 => _249.onStep, 'optionalCall', _250 => _250(step)]);
|
|
9764
9750
|
};
|
|
9765
9751
|
const restart = (t, play) => {
|
|
9766
9752
|
at = t;
|
|
@@ -9782,7 +9768,7 @@ function mountDiagram(host, diagram, options = {}) {
|
|
|
9782
9768
|
};
|
|
9783
9769
|
place(markup());
|
|
9784
9770
|
show();
|
|
9785
|
-
const timer = _optionalChain([win, 'optionalAccess',
|
|
9771
|
+
const timer = _optionalChain([win, 'optionalAccess', _251 => _251.setInterval, 'call', _252 => _252(() => {
|
|
9786
9772
|
if (!playing) return;
|
|
9787
9773
|
if (options.playOnce && at + (Date.now() - born) / 1e3 >= lastStill) {
|
|
9788
9774
|
step = count - 1;
|
|
@@ -9799,7 +9785,7 @@ function mountDiagram(host, diagram, options = {}) {
|
|
|
9799
9785
|
const onNext = () => go(step + 1);
|
|
9800
9786
|
const onToggle = () => playing ? restart(now(), false) : resume();
|
|
9801
9787
|
const onFigure = (event2) => {
|
|
9802
|
-
const target = _optionalChain([event2, 'access',
|
|
9788
|
+
const target = _optionalChain([event2, 'access', _253 => _253.target, 'optionalAccess', _254 => _254.closest, 'optionalCall', _255 => _255("[data-step]")]);
|
|
9803
9789
|
const s = target ? Number(target.getAttribute("data-step")) : Number.NaN;
|
|
9804
9790
|
if (Number.isInteger(s)) go(s);
|
|
9805
9791
|
};
|
|
@@ -9807,7 +9793,7 @@ function mountDiagram(host, diagram, options = {}) {
|
|
|
9807
9793
|
nextButton.addEventListener("click", onNext);
|
|
9808
9794
|
toggleButton.addEventListener("click", onToggle);
|
|
9809
9795
|
frame.addEventListener("click", onFigure);
|
|
9810
|
-
const Observer = _optionalChain([win, 'optionalAccess',
|
|
9796
|
+
const Observer = _optionalChain([win, 'optionalAccess', _256 => _256.ResizeObserver]);
|
|
9811
9797
|
const observer = Observer ? new Observer(() => {
|
|
9812
9798
|
const w = frameWidth();
|
|
9813
9799
|
const h = frameHeight();
|
|
@@ -9820,7 +9806,7 @@ function mountDiagram(host, diagram, options = {}) {
|
|
|
9820
9806
|
at = t;
|
|
9821
9807
|
place(markup());
|
|
9822
9808
|
}) : void 0;
|
|
9823
|
-
_optionalChain([observer, 'optionalAccess',
|
|
9809
|
+
_optionalChain([observer, 'optionalAccess', _257 => _257.observe, 'call', _258 => _258(frame)]);
|
|
9824
9810
|
return {
|
|
9825
9811
|
get step() {
|
|
9826
9812
|
return step;
|
|
@@ -9845,8 +9831,8 @@ function mountDiagram(host, diagram, options = {}) {
|
|
|
9845
9831
|
drawMarks();
|
|
9846
9832
|
},
|
|
9847
9833
|
destroy: () => {
|
|
9848
|
-
if (timer !== void 0) _optionalChain([win, 'optionalAccess',
|
|
9849
|
-
_optionalChain([observer, 'optionalAccess',
|
|
9834
|
+
if (timer !== void 0) _optionalChain([win, 'optionalAccess', _259 => _259.clearInterval, 'call', _260 => _260(timer)]);
|
|
9835
|
+
_optionalChain([observer, 'optionalAccess', _261 => _261.disconnect, 'call', _262 => _262()]);
|
|
9850
9836
|
prevButton.removeEventListener("click", onPrev);
|
|
9851
9837
|
nextButton.removeEventListener("click", onNext);
|
|
9852
9838
|
toggleButton.removeEventListener("click", onToggle);
|
|
@@ -9858,11 +9844,11 @@ function mountDiagram(host, diagram, options = {}) {
|
|
|
9858
9844
|
|
|
9859
9845
|
// src/light.ts
|
|
9860
9846
|
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-
|
|
9847
|
+
git: () => Promise.resolve().then(() => _interopRequireWildcard(require("./git-WBGFDRBD.cjs"))),
|
|
9848
|
+
lineup: () => Promise.resolve().then(() => _interopRequireWildcard(require("./lineup-WLGNGTFX.cjs"))),
|
|
9849
|
+
state: () => Promise.resolve().then(() => _interopRequireWildcard(require("./state-JVAH4TSM.cjs"))),
|
|
9850
|
+
time: () => Promise.resolve().then(() => _interopRequireWildcard(require("./time-EXRPI34B.cjs"))),
|
|
9851
|
+
tree: () => Promise.resolve().then(() => _interopRequireWildcard(require("./tree-DECHTXFU.cjs")))
|
|
9866
9852
|
};
|
|
9867
9853
|
var isLater = (kind) => LATER_KINDS.includes(kind);
|
|
9868
9854
|
async function loadKind(kind) {
|
|
@@ -9893,5 +9879,5 @@ async function register(kind) {
|
|
|
9893
9879
|
|
|
9894
9880
|
|
|
9895
9881
|
|
|
9896
|
-
exports.DEFAULT_PALETTE =
|
|
9882
|
+
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
9883
|
//# sourceMappingURL=index.cjs.map
|