@cardenelabs/dragon 0.46.3 → 0.47.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/README.ja.md +4 -2
- package/README.md +4 -2
- package/dist/cli.cjs +71 -70
- package/dist/cli.cjs.map +1 -1
- package/dist/cli.js +71 -70
- package/dist/cli.js.map +1 -1
- package/dist/export.cjs +13 -10
- package/dist/export.cjs.map +1 -1
- package/dist/export.d.cts +2 -2
- package/dist/export.d.ts +2 -2
- package/dist/export.js +13 -10
- package/dist/export.js.map +1 -1
- package/dist/index.cjs +18 -12
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +5 -5
- package/dist/index.d.ts +5 -5
- package/dist/index.js +18 -12
- package/dist/index.js.map +1 -1
- package/dist/{ink-DeDtzaTL.d.cts → ink-Sz5_zWte.d.cts} +1 -1
- package/dist/{ink-DeDtzaTL.d.ts → ink-Sz5_zWte.d.ts} +1 -1
- package/dist/light/{chunk-YO3UBEC3.js → chunk-AHUJ37R3.js} +4 -3
- package/dist/light/chunk-AHUJ37R3.js.map +1 -0
- package/dist/light/{chunk-SUL4AJLI.cjs → chunk-KNA5HH2H.cjs} +85 -2
- package/dist/light/chunk-KNA5HH2H.cjs.map +1 -0
- package/dist/light/{chunk-V34DCH34.cjs → chunk-O7RQ6R54.cjs} +84 -83
- package/dist/light/chunk-O7RQ6R54.cjs.map +1 -0
- package/dist/light/{chunk-DVGDEPCV.js → chunk-VUVRSYH6.js} +84 -1
- package/dist/light/chunk-VUVRSYH6.js.map +1 -0
- package/dist/light/{git-WBGFDRBD.cjs → git-M63KYUUK.cjs} +66 -68
- package/dist/light/git-M63KYUUK.cjs.map +1 -0
- package/dist/light/{git-WEJL6VAY.js → git-NMPPSCRM.js} +4 -6
- package/dist/light/{git-WEJL6VAY.js.map → git-NMPPSCRM.js.map} +1 -1
- package/dist/light/index.cjs +300 -296
- package/dist/light/index.cjs.map +1 -1
- package/dist/light/index.d.cts +4 -4
- package/dist/light/index.d.ts +4 -4
- package/dist/light/index.js +49 -45
- package/dist/light/index.js.map +1 -1
- package/dist/light/{lineup-WLGNGTFX.cjs → lineup-2VWQ74CU.cjs} +42 -44
- package/dist/light/lineup-2VWQ74CU.cjs.map +1 -0
- package/dist/light/{lineup-6LN6Z5T2.js → lineup-HZ5YTQ36.js} +4 -6
- package/dist/light/{lineup-6LN6Z5T2.js.map → lineup-HZ5YTQ36.js.map} +1 -1
- package/dist/light/{state-JVAH4TSM.cjs → state-MFCHMESP.cjs} +42 -44
- package/dist/light/state-MFCHMESP.cjs.map +1 -0
- package/dist/light/{state-DFYTMQI7.js → state-RRAJPRO3.js} +3 -5
- package/dist/light/{state-DFYTMQI7.js.map → state-RRAJPRO3.js.map} +1 -1
- package/dist/light/{time-M3EGEFDU.js → time-7V7RUEYS.js} +5 -4
- package/dist/light/time-7V7RUEYS.js.map +1 -0
- package/dist/light/{time-EXRPI34B.cjs → time-RISQEAB7.cjs} +86 -85
- package/dist/light/time-RISQEAB7.cjs.map +1 -0
- package/dist/light/{tree-MFU54QKY.js → tree-PWSU7R6R.js} +3 -3
- package/dist/light/{tree-DECHTXFU.cjs → tree-S23P2PW7.cjs} +62 -62
- package/dist/light/{tree-DECHTXFU.cjs.map → tree-S23P2PW7.cjs.map} +1 -1
- package/dist/node.cjs +5 -2
- package/dist/node.cjs.map +1 -1
- package/dist/node.js +5 -2
- package/dist/node.js.map +1 -1
- package/dist/player.global.js +3 -3
- package/package.json +1 -1
- package/src/cli.ts +10 -10
- package/src/export/index.ts +3 -3
- package/src/figure-text.ts +2 -2
- package/src/kinds/registry.ts +2 -2
- package/src/layout/time.ts +2 -2
- package/src/messages.ts +1 -1
- package/src/parser.ts +3 -2
- package/src/player.ts +13 -5
- package/src/render/draw.ts +4 -4
- package/src/render/ink.ts +2 -2
- package/src/schema.ts +4 -4
- package/src/version.ts +3 -3
- package/src/words.ts +6 -0
- package/dist/light/chunk-CLS6JVKK.cjs +0 -84
- package/dist/light/chunk-CLS6JVKK.cjs.map +0 -1
- package/dist/light/chunk-DVGDEPCV.js.map +0 -1
- package/dist/light/chunk-SUL4AJLI.cjs.map +0 -1
- package/dist/light/chunk-V34DCH34.cjs.map +0 -1
- package/dist/light/chunk-YDKPEKGZ.js +0 -84
- package/dist/light/chunk-YDKPEKGZ.js.map +0 -1
- package/dist/light/chunk-YO3UBEC3.js.map +0 -1
- package/dist/light/git-WBGFDRBD.cjs.map +0 -1
- package/dist/light/lineup-WLGNGTFX.cjs.map +0 -1
- package/dist/light/state-JVAH4TSM.cjs.map +0 -1
- package/dist/light/time-EXRPI34B.cjs.map +0 -1
- package/dist/light/time-M3EGEFDU.js.map +0 -1
- /package/dist/light/{tree-MFU54QKY.js.map → tree-PWSU7R6R.js.map} +0 -0
package/dist/light/index.cjs
CHANGED
|
@@ -23,9 +23,9 @@
|
|
|
23
23
|
|
|
24
24
|
|
|
25
25
|
|
|
26
|
+
var _chunkO7RQ6R54cjs = require('./chunk-O7RQ6R54.cjs');
|
|
26
27
|
|
|
27
28
|
|
|
28
|
-
var _chunkCLS6JVKKcjs = require('./chunk-CLS6JVKK.cjs');
|
|
29
29
|
|
|
30
30
|
|
|
31
31
|
|
|
@@ -51,7 +51,6 @@ var _chunkCLS6JVKKcjs = require('./chunk-CLS6JVKK.cjs');
|
|
|
51
51
|
|
|
52
52
|
|
|
53
53
|
|
|
54
|
-
var _chunkV34DCH34cjs = require('./chunk-V34DCH34.cjs');
|
|
55
54
|
|
|
56
55
|
|
|
57
56
|
|
|
@@ -94,7 +93,7 @@ var _chunkV34DCH34cjs = require('./chunk-V34DCH34.cjs');
|
|
|
94
93
|
|
|
95
94
|
|
|
96
95
|
|
|
97
|
-
var
|
|
96
|
+
var _chunkKNA5HH2Hcjs = require('./chunk-KNA5HH2H.cjs');
|
|
98
97
|
|
|
99
98
|
// src/kinds/registry.ts
|
|
100
99
|
var LATER_KINDS = ["git", "lineup", "state", "time", "tree"];
|
|
@@ -105,9 +104,9 @@ function registerKind(kind, parts) {
|
|
|
105
104
|
function kindLoaded(kind) {
|
|
106
105
|
return !LATER_KINDS.includes(kind) || registered[kind] !== void 0;
|
|
107
106
|
}
|
|
108
|
-
function kindParts(kind, lang =
|
|
107
|
+
function kindParts(kind, lang = _chunkKNA5HH2Hcjs.DEFAULT_LANG) {
|
|
109
108
|
const parts = registered[kind];
|
|
110
|
-
if (parts === void 0) throw new Error(
|
|
109
|
+
if (parts === void 0) throw new Error(_chunkKNA5HH2Hcjs.FIGURE_TEXT[lang].kindNotLoaded(kind));
|
|
111
110
|
return parts;
|
|
112
111
|
}
|
|
113
112
|
|
|
@@ -6576,7 +6575,7 @@ function validate10(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
6576
6575
|
|
|
6577
6576
|
// src/schema.ts
|
|
6578
6577
|
var COLORS = ["blue", "amber", "green", "violet", "rose", "slate", "coin"];
|
|
6579
|
-
var ICON_NAMES = Object.keys(
|
|
6578
|
+
var ICON_NAMES = Object.keys(_chunkO7RQ6R54cjs.ICONS);
|
|
6580
6579
|
var EVENT_TYPES = ["edge", "action", "swap", "strip", "commit", "branch", "now", "mark", "span", "leaf", "node", "line", "seal", "open", "pick", "stamp"];
|
|
6581
6580
|
var ABSENT = "#/definitions/absent/not";
|
|
6582
6581
|
var ABSENT_KINDS = {
|
|
@@ -6639,7 +6638,7 @@ function toFieldError(error, errors, m, input) {
|
|
|
6639
6638
|
return { pointer: `${at}/${escape(key2)}`, message: m.required(key2) };
|
|
6640
6639
|
}
|
|
6641
6640
|
case "not": {
|
|
6642
|
-
if (RESERVED_ID.test(error.schemaPath)) return { pointer: at, message: m.reserved(
|
|
6641
|
+
if (RESERVED_ID.test(error.schemaPath)) return { pointer: at, message: m.reserved(_chunkKNA5HH2Hcjs.STATE_ENDS) };
|
|
6643
6642
|
if (GIT_EVENT.test(error.schemaPath)) return { pointer: at, message: m.kindOnly(GIT_EVENTS, "git") };
|
|
6644
6643
|
if (TIME_EVENT.test(error.schemaPath)) return { pointer: `${at}/type`, message: m.kindOnly(TIME_EVENTS, "time") };
|
|
6645
6644
|
if (TREE_EVENT.test(error.schemaPath)) return { pointer: `${at}/type`, message: m.kindOnly(TREE_EVENTS, "tree") };
|
|
@@ -6699,7 +6698,7 @@ function validateDiagram(input, options = {}) {
|
|
|
6699
6698
|
if (validate_diagram_default(input)) return { ok: true };
|
|
6700
6699
|
const all = _nullishCoalesce(validate_diagram_default.errors, () => ( []));
|
|
6701
6700
|
const inBranch = new Set(all.filter((error) => error.keyword === "anyOf").flatMap((anyOf) => branchesOf(anyOf, all)));
|
|
6702
|
-
const m = FIELD_MESSAGES[_nullishCoalesce(options.lang, () => (
|
|
6701
|
+
const m = FIELD_MESSAGES[_nullishCoalesce(options.lang, () => ( _chunkKNA5HH2Hcjs.DEFAULT_LANG))];
|
|
6703
6702
|
const errors = all.filter((error) => error.keyword !== "if" && !inBranch.has(error)).map((error) => toFieldError(error, all, m, input));
|
|
6704
6703
|
return { ok: false, errors };
|
|
6705
6704
|
}
|
|
@@ -6726,10 +6725,10 @@ var ja2 = () => {
|
|
|
6726
6725
|
set: "set <\u6B04>: <\u5024> [tag: <\u672D>]"
|
|
6727
6726
|
};
|
|
6728
6727
|
return {
|
|
6729
|
-
noHead: `\u6700\u521D\u306E\u884C\u306B\u56F3\u306E\u7A2E\u985E (${list(
|
|
6730
|
-
badHead: `\u6700\u521D\u306E\u884C\u306F ${
|
|
6728
|
+
noHead: `\u6700\u521D\u306E\u884C\u306B\u56F3\u306E\u7A2E\u985E (${list(_chunkKNA5HH2Hcjs.KINDS)}) \u3068\u984C\u3092\u66F8\u304F`,
|
|
6729
|
+
badHead: `\u6700\u521D\u306E\u884C\u306F ${_chunkKNA5HH2Hcjs.KINDS.join(" \u304B ")} \u3067\u59CB\u3081\u3001\u7D9A\u3051\u3066\u984C\u3092\u66F8\u304F`,
|
|
6731
6730
|
oldForm: (word, shape) => `${word} \u306F\u524D\u306E\u5F62\u306E\u66F8\u304D\u65B9\u3002\u65B0\u3057\u3044\u5F62\u3067\u306F ${shapes[shape]} \u3068\u66F8\u304F`,
|
|
6732
|
-
unknownHead: (word) => `${word} \u306F\u884C\u306E\u982D\u306B\u66F8\u3051\u306A\u3044\u3002\u884C\u306F ${list(
|
|
6731
|
+
unknownHead: (word) => `${word} \u306F\u884C\u306E\u982D\u306B\u66F8\u3051\u306A\u3044\u3002\u884C\u306F ${list(_chunkKNA5HH2Hcjs.HEADS)} \u304B\u3001<\u540D\u672D> -> <\u540D\u672D> \u3067\u59CB\u3081\u308B`,
|
|
6733
6732
|
duplicate: (id) => `${id} \u306F\u65E2\u306B\u5BA3\u8A00\u3057\u305F\u540D\u672D`,
|
|
6734
6733
|
needsId: (word) => `${word} \u306E\u5F8C\u308D\u306B\u540D\u672D\u3092\u66F8\u304F`,
|
|
6735
6734
|
badId: (id) => `${id} \u306F\u540D\u672D\u306B\u4F7F\u3048\u306A\u3044\u3002\u540D\u672D\u306B\u306F\u7A7A\u767D\u3068 [ ] \u300C \u300D = : \u3092\u542B\u3081\u306A\u3044`,
|
|
@@ -6771,9 +6770,9 @@ var ja2 = () => {
|
|
|
6771
6770
|
badAttr: (key2, allowed) => `${key2} \u306F\u3053\u306E\u884C\u306B\u66F8\u3051\u306A\u3044\u5C5E\u6027\u3002\u66F8\u3051\u308B\u306E\u306F ${list(allowed)}`,
|
|
6772
6771
|
badColor: `color \u306F ${list(COLORS)} \u306E\u3069\u308C\u304B`,
|
|
6773
6772
|
badIcon: (value2) => withNear(value2, (near) => `${value2} \u3068\u3044\u3046 icon \u306F\u7121\u3044\u3002\u8FD1\u3044\u540D\u524D\u306F ${near}`, `icon \u306F ${list(ICON_NAMES)} \u306E\u3069\u308C\u304B`),
|
|
6774
|
-
badView: `view \u306F ${list(
|
|
6775
|
-
badCarry: `carry \u306F ${list(
|
|
6776
|
-
badSide: `side \u306F ${list(
|
|
6773
|
+
badView: `view \u306F ${list(_chunkKNA5HH2Hcjs.VIEWS)} \u306E\u3069\u308C\u304B`,
|
|
6774
|
+
badCarry: `carry \u306F ${list(_chunkKNA5HH2Hcjs.CARRIES)} \u306E\u3069\u308C\u304B\u3002\u672D\u306F tag: <\u5024> \u3067\u66F8\u304F`,
|
|
6775
|
+
badSide: `side \u306F ${list(_chunkKNA5HH2Hcjs.SIDES)} \u306E\u3069\u308C\u304B`,
|
|
6777
6776
|
badUrl: (key2) => `${key2} \u306B\u306F / \u3067\u59CB\u307E\u308B path \u304B\u3001http:// \u304B https:// \u3067\u59CB\u307E\u308B URL \u3092\u66F8\u304F`,
|
|
6778
6777
|
carryTwice: "\u904B\u3076\u7269\u306F 1 \u672C\u306E\u7DDA\u306B 1 \u3064\u307E\u3067\u3002carry \u3068 tag \u306F\u4E00\u7DD2\u306B\u66F8\u304B\u306A\u3044",
|
|
6779
6778
|
reservedId: (id) => `${id} \u306F\u72B6\u614B\u9077\u79FB\u56F3\u306E\u59CB\u307E\u308A\u3068\u7D42\u308F\u308A\u306E\u5370\u306E\u540D\u524D\u3067\u3001\u7BB1\u306E\u540D\u672D\u306B\u4F7F\u3048\u306A\u3044`,
|
|
@@ -6829,8 +6828,8 @@ var ja2 = () => {
|
|
|
6829
6828
|
zoomShape: "zoom \u306F zoom <\u76EE\u76DB\u308A>-<\u76EE\u76DB\u308A> \u306E\u5F62\u3067\u66F8\u304F",
|
|
6830
6829
|
nowShape: "\u91DD\u3092\u9032\u3081\u308B\u884C\u306F now -> <\u76EE\u76DB\u308A> \u306E\u5F62\u3067\u66F8\u304F",
|
|
6831
6830
|
markShape: "mark \u306F mark <\u5217> <\u76EE\u76DB\u308A>-<\u76EE\u76DB\u308A> [color: <\u8272>] \u306E\u5F62\u3067\u66F8\u304F",
|
|
6832
|
-
spanShape: `span \u306F span <\u76EE\u76DB\u308A>-<\u76EE\u76DB\u308A>: <\u5B57> [shape: ${list(
|
|
6833
|
-
badLength: `\u9577\u3055\u306F\u6570\u3068\u5358\u4F4D (${list(
|
|
6831
|
+
spanShape: `span \u306F span <\u76EE\u76DB\u308A>-<\u76EE\u76DB\u308A>: <\u5B57> [shape: ${list(_chunkKNA5HH2Hcjs.SPAN_SHAPES)}, color: <\u8272>] \u306E\u5F62\u3067\u66F8\u304F`,
|
|
6832
|
+
badLength: `\u9577\u3055\u306F\u6570\u3068\u5358\u4F4D (${list(_chunkKNA5HH2Hcjs.DURATION_UNITS)}) \u306E\u7D44\u3067\u66F8\u304F (12s \u306A\u3069)`,
|
|
6834
6833
|
badCount: (word) => `${word} \u306E\u76EE\u76DB\u308A\u306E\u6570\u306F 1 \u4EE5\u4E0A\u306E\u6574\u6570\u306B\u3059\u308B`,
|
|
6835
6834
|
badUnit: (text, count) => `${text} \u306F\u76EE\u76DB\u308A\u306E\u4F4D\u7F6E\u306B\u3067\u304D\u306A\u3044\u30020 \u304B\u3089 ${count - 1} \u306E\u6570\u304B\u3001\u305D\u306E\u7BC4\u56F2 (0-3 \u306A\u3069) \u3092\u66F8\u304F`,
|
|
6836
6835
|
nowBack: (text, at) => `now -> ${text} \u306F\u91DD\u3092\u9032\u3081\u306A\u3044\u3002\u524D\u306E now (${at}) \u3088\u308A\u5F8C\u306E\u76EE\u76DB\u308A\u3092\u66F8\u304F`,
|
|
@@ -6844,7 +6843,7 @@ var ja2 = () => {
|
|
|
6844
6843
|
undeclaredNote: (id) => `${id} \u3068\u3044\u3046\u7BB1\u304B\u7BC0\u76EE\u306F\u5BA3\u8A00\u3057\u3066\u3044\u306A\u3044`,
|
|
6845
6844
|
nowReserved: (name2) => `${name2} \u306F\u6642\u9593\u8EF8\u306E\u56F3\u3067\u91DD\u3092\u9032\u3081\u308B\u884C\u306E\u8A9E\u3067\u3001\u540D\u672D\u306B\u4F7F\u3048\u306A\u3044`,
|
|
6846
6845
|
noteColorPointOnly: "note \u306E color \u306F\u7BC0\u76EE\u306E\u4E38\u306E\u8272\u3067\u3001\u7BC0\u76EE\u306E note \u306B\u3060\u3051\u66F8\u3051\u308B",
|
|
6847
|
-
badShape: `shape \u306F ${list(
|
|
6846
|
+
badShape: `shape \u306F ${list(_chunkKNA5HH2Hcjs.SPAN_SHAPES)} \u3060\u3051\u66F8\u3051\u308B\u3002\u62EC\u5F27\u306F shape \u3092\u66F8\u304B\u306A\u3044`,
|
|
6848
6847
|
badRatio: "\u7269\u5DEE\u3057\u306E\u7DDA\u306F\u5206\u6570 (2/3) \u304B\u767E\u5206\u7387 (97%) \u3067\u66F8\u304F",
|
|
6849
6848
|
meterValue: (field2) => `${field2} \u306F\u7269\u5DEE\u3057\u306E\u6B04\u306A\u306E\u3067\u3001\u5024\u3092\u5206\u6570 (2/3) \u304B\u767E\u5206\u7387 (97%) \u3067\u66F8\u304F`
|
|
6850
6849
|
};
|
|
@@ -6865,10 +6864,10 @@ var en2 = () => {
|
|
|
6865
6864
|
set: "set <field>: <value> [tag: <tag>]"
|
|
6866
6865
|
};
|
|
6867
6866
|
return {
|
|
6868
|
-
noHead: `Write the diagram kind (${list(
|
|
6869
|
-
badHead: `Start the first line with ${
|
|
6867
|
+
noHead: `Write the diagram kind (${list(_chunkKNA5HH2Hcjs.KINDS)}) and a title on the first line`,
|
|
6868
|
+
badHead: `Start the first line with ${_chunkKNA5HH2Hcjs.KINDS.join(" or ")}, followed by the title`,
|
|
6870
6869
|
oldForm: (word, shape) => `${word} is the old notation. Write ${shapes[shape]} instead`,
|
|
6871
|
-
unknownHead: (word) => `A line cannot start with ${word}. Start a line with ${list(
|
|
6870
|
+
unknownHead: (word) => `A line cannot start with ${word}. Start a line with ${list(_chunkKNA5HH2Hcjs.HEADS)}, or <id> -> <id>`,
|
|
6872
6871
|
duplicate: (id) => `${id} is already declared`,
|
|
6873
6872
|
needsId: (word) => `Write an id after ${word}`,
|
|
6874
6873
|
badId: (id) => `${id} cannot be an id. An id has no spaces and none of [ ] \u300C \u300D = :`,
|
|
@@ -6910,9 +6909,9 @@ var en2 = () => {
|
|
|
6910
6909
|
badAttr: (key2, allowed) => `${key2} cannot be written on this line. Write ${list(allowed)}`,
|
|
6911
6910
|
badColor: `color is one of ${list(COLORS)}`,
|
|
6912
6911
|
badIcon: (value2) => withNear(value2, (near) => `There is no icon named ${value2}. The closest is ${near}`, `icon is one of ${list(ICON_NAMES)}`),
|
|
6913
|
-
badView: `view is one of ${list(
|
|
6914
|
-
badCarry: `carry is one of ${list(
|
|
6915
|
-
badSide: `side is one of ${list(
|
|
6912
|
+
badView: `view is one of ${list(_chunkKNA5HH2Hcjs.VIEWS)}`,
|
|
6913
|
+
badCarry: `carry is one of ${list(_chunkKNA5HH2Hcjs.CARRIES)}. Write a tag as tag: <value>`,
|
|
6914
|
+
badSide: `side is one of ${list(_chunkKNA5HH2Hcjs.SIDES)}`,
|
|
6916
6915
|
badUrl: (key2) => `Write a path that starts with / or a URL that starts with http:// or https:// for ${key2}`,
|
|
6917
6916
|
carryTwice: "A line carries one thing. Do not write carry and tag together",
|
|
6918
6917
|
reservedId: (id) => `${id} names the start or end mark of a state diagram and cannot be a box id`,
|
|
@@ -6968,8 +6967,8 @@ var en2 = () => {
|
|
|
6968
6967
|
zoomShape: "Write a zoom as zoom <unit>-<unit>",
|
|
6969
6968
|
nowShape: "Write a needle line as now -> <unit>",
|
|
6970
6969
|
markShape: "Write a mark as mark <row> <unit>-<unit> [color: <color>]",
|
|
6971
|
-
spanShape: `Write a span as span <unit>-<unit>: <text> [shape: ${list(
|
|
6972
|
-
badLength: `Write a length as a number and a unit (${list(
|
|
6970
|
+
spanShape: `Write a span as span <unit>-<unit>: <text> [shape: ${list(_chunkKNA5HH2Hcjs.SPAN_SHAPES)}, color: <color>]`,
|
|
6971
|
+
badLength: `Write a length as a number and a unit (${list(_chunkKNA5HH2Hcjs.DURATION_UNITS)}), such as 12s`,
|
|
6973
6972
|
badCount: (word) => `The unit count of ${word} is a whole number of 1 or more`,
|
|
6974
6973
|
badUnit: (text, count) => `${text} cannot be a unit. Write a number from 0 to ${count - 1}, or a range such as 0-3`,
|
|
6975
6974
|
nowBack: (text, at) => `now -> ${text} does not move the needle forward. Write a unit after the previous now (${at})`,
|
|
@@ -6983,7 +6982,7 @@ var en2 = () => {
|
|
|
6983
6982
|
undeclaredNote: (id) => `No box or point named ${id} is declared`,
|
|
6984
6983
|
nowReserved: (name2) => `${name2} starts the needle line of a time diagram and cannot be an id`,
|
|
6985
6984
|
noteColorPointOnly: "The color of a note colors the circle of a point, so write it only on the note of a point",
|
|
6986
|
-
badShape: `shape takes only ${list(
|
|
6985
|
+
badShape: `shape takes only ${list(_chunkKNA5HH2Hcjs.SPAN_SHAPES)}. A bracket takes no shape`,
|
|
6987
6986
|
badRatio: "Write the meter line as a fraction (2/3) or a percentage (97%)",
|
|
6988
6987
|
meterValue: (field2) => `${field2} is a meter, so write its value as a fraction (2/3) or a percentage (97%)`
|
|
6989
6988
|
};
|
|
@@ -7016,7 +7015,7 @@ var newerError = (version, lang) => ({
|
|
|
7016
7015
|
});
|
|
7017
7016
|
function readDiagram(input, options = {}) {
|
|
7018
7017
|
const newer = newerThanTool(input);
|
|
7019
|
-
if (newer !== void 0) return { ok: false, errors: [newerError(newer, _nullishCoalesce(options.lang, () => (
|
|
7018
|
+
if (newer !== void 0) return { ok: false, errors: [newerError(newer, _nullishCoalesce(options.lang, () => ( _chunkKNA5HH2Hcjs.DEFAULT_LANG)))] };
|
|
7020
7019
|
const checked = validateDiagram(input, options);
|
|
7021
7020
|
if (!checked.ok) return checked;
|
|
7022
7021
|
return { ok: true, diagram: input, warnings: [] };
|
|
@@ -7035,10 +7034,10 @@ var NotationError = class extends Error {
|
|
|
7035
7034
|
var fail = (source, index, message) => new NotationError(source.line, columnOf(source, index), message);
|
|
7036
7035
|
var ID = /^[^\s[\]「」=:]+$/u;
|
|
7037
7036
|
var EDGE = /^([^\s:[\]]+?)\s*->\s*([^\s:[\]]+)/du;
|
|
7038
|
-
var COMMIT = new RegExp(`^commit\\s+([^\\s[]+)(?:\\s+${
|
|
7039
|
-
var CUT = new RegExp(`^([^\\s[]+)\\s+${
|
|
7037
|
+
var COMMIT = new RegExp(`^commit\\s+([^\\s[]+)(?:\\s+${_chunkKNA5HH2Hcjs.ON}\\s+([^\\s[]+))?(?:\\s+${_chunkKNA5HH2Hcjs.COPY}\\s+([^\\s[]+))?(?:\\s+${_chunkKNA5HH2Hcjs.MERGE}\\s+([^\\s[]+))?`, "du");
|
|
7038
|
+
var CUT = new RegExp(`^([^\\s[]+)\\s+${_chunkKNA5HH2Hcjs.FROM}(?:\\s+([^\\s[]+))?\\s*$`, "du");
|
|
7040
7039
|
var LEAF = /^leaf\s+([^\s[]+)/du;
|
|
7041
|
-
var NODE = new RegExp(`^node\\s+([^\\s[]+)\\s+${
|
|
7040
|
+
var NODE = new RegExp(`^node\\s+([^\\s[]+)\\s+${_chunkKNA5HH2Hcjs.OF}\\s+`, "du");
|
|
7042
7041
|
var ORDER = /^line\s+([^\s:[]+)\s*:/du;
|
|
7043
7042
|
var STAMP = /^stamp\s+([^\s:[]+)\s*:/du;
|
|
7044
7043
|
var ON_LANE = /^(?:seal|open|pick)\s+(\S+)\s*$/du;
|
|
@@ -7046,10 +7045,10 @@ var HASH = /^[0-9a-f]{4,40}$/u;
|
|
|
7046
7045
|
var URL_FORM = /^(\/|https?:\/\/)/u;
|
|
7047
7046
|
var SCALE = /^scale\s+(\S+)\s+(\S+)\s+([^\s[]+)/du;
|
|
7048
7047
|
var PERIOD = /^period\s+(\S+)\s+([^\s[]+)/du;
|
|
7049
|
-
var POINT = new RegExp(`^point\\s+(\\S+)\\s+${
|
|
7048
|
+
var POINT = new RegExp(`^point\\s+(\\S+)\\s+${_chunkKNA5HH2Hcjs.AT}\\s+(\\S+)\\s*$`, "du");
|
|
7050
7049
|
var ZOOM = /^zoom\s+(\S+)\s*$/du;
|
|
7051
|
-
var NEEDLE = new RegExp(`^${
|
|
7052
|
-
var NOW_LINE = new RegExp(`^${
|
|
7050
|
+
var NEEDLE = new RegExp(`^${_chunkKNA5HH2Hcjs.NOW}\\s*->`, "u");
|
|
7051
|
+
var NOW_LINE = new RegExp(`^${_chunkKNA5HH2Hcjs.NOW}\\s*->\\s*(\\S+)\\s*$`, "du");
|
|
7053
7052
|
var MARK = /^mark\s+([^\s[]+)\s+([^\s[]+)/du;
|
|
7054
7053
|
var SPAN = /^span\s+([^\s:[]+)\s*:/du;
|
|
7055
7054
|
var LENGTH = /^[0-9]+(\.[0-9]+)?(ms|s|min|h|d)$/u;
|
|
@@ -7156,8 +7155,8 @@ function readDeclared(source, word, allowed, m) {
|
|
|
7156
7155
|
if (!ID.test(id)) throw fail(source, start, m.badId(id));
|
|
7157
7156
|
let rest = skipSpaces(text, start + id.length);
|
|
7158
7157
|
let name2;
|
|
7159
|
-
if (text.startsWith(
|
|
7160
|
-
const named = readName(source, rest +
|
|
7158
|
+
if (text.startsWith(_chunkKNA5HH2Hcjs.AS, rest) && /^(\s|$)/u.test(text.slice(rest + _chunkKNA5HH2Hcjs.AS.length, rest + _chunkKNA5HH2Hcjs.AS.length + 1))) {
|
|
7159
|
+
const named = readName(source, rest + _chunkKNA5HH2Hcjs.AS.length, m);
|
|
7161
7160
|
if (named.value === "") throw fail(source, rest, m.emptyName(id));
|
|
7162
7161
|
name2 = named.value;
|
|
7163
7162
|
rest = named.rest;
|
|
@@ -7181,7 +7180,7 @@ function lookOf(source, attrs2, m) {
|
|
|
7181
7180
|
function oldForm(text, inStep) {
|
|
7182
7181
|
const first = _nullishCoalesce(text.split(/\s/u)[0], () => ( ""));
|
|
7183
7182
|
if (first === "\u5E2F") return { word: first, shape: inStep ? "set" : "strip" };
|
|
7184
|
-
if (Object.hasOwn(
|
|
7183
|
+
if (Object.hasOwn(_chunkKNA5HH2Hcjs.OLD_HEADS, first)) return { word: first, shape: _chunkKNA5HH2Hcjs.OLD_HEADS[first] };
|
|
7185
7184
|
if (text.startsWith("#")) return { word: "#", shape: "step" };
|
|
7186
7185
|
if (text.startsWith(">")) return { word: ">", shape: "say" };
|
|
7187
7186
|
if (text.startsWith("`")) return { word: "`", shape: "code" };
|
|
@@ -7195,15 +7194,15 @@ function parseLines(lines, m) {
|
|
|
7195
7194
|
const head = lines[headAt];
|
|
7196
7195
|
if (!head) throw new NotationError(1, 1, m.noHead);
|
|
7197
7196
|
const kind = _nullishCoalesce(head.text.split(/\s/u)[0], () => ( ""));
|
|
7198
|
-
if (!isOneOf(
|
|
7197
|
+
if (!isOneOf(_chunkKNA5HH2Hcjs.KINDS, kind)) {
|
|
7199
7198
|
const old = oldForm(head.text, false);
|
|
7200
7199
|
throw fail(head, 0, old ? m.oldForm(old.word, old.shape) : m.badHead);
|
|
7201
7200
|
}
|
|
7202
7201
|
const titled = readName(head, kind.length, m);
|
|
7203
7202
|
if (titled.value === "") throw fail(head, 0, m.badHead);
|
|
7204
7203
|
const title = titled.value;
|
|
7205
|
-
const shown2 = titled.rest < head.text.length ? readAttrs(head, titled.rest,
|
|
7206
|
-
if (shown2 && !isOneOf(
|
|
7204
|
+
const shown2 = titled.rest < head.text.length ? readAttrs(head, titled.rest, _chunkKNA5HH2Hcjs.ATTRS.diagram, m).get("view") : void 0;
|
|
7205
|
+
if (shown2 && !isOneOf(_chunkKNA5HH2Hcjs.VIEWS, shown2.value)) throw fail(head, shown2.at, m.badView);
|
|
7207
7206
|
const view = _optionalChain([shown2, 'optionalAccess', _15 => _15.value]);
|
|
7208
7207
|
const isState = kind === "state";
|
|
7209
7208
|
const isGit = kind === "git";
|
|
@@ -7254,7 +7253,7 @@ function parseLines(lines, m) {
|
|
|
7254
7253
|
const endAt = (source, id, at, side2) => {
|
|
7255
7254
|
if (isGit) {
|
|
7256
7255
|
if (side2 === "to") return commitAt(source, id, at);
|
|
7257
|
-
if (id !==
|
|
7256
|
+
if (id !== _chunkKNA5HH2Hcjs.HEAD && !tips.has(id)) throw fail(source, at, m.undeclaredRef(id));
|
|
7258
7257
|
return id;
|
|
7259
7258
|
}
|
|
7260
7259
|
if (isTime) {
|
|
@@ -7262,14 +7261,14 @@ function parseLines(lines, m) {
|
|
|
7262
7261
|
return id;
|
|
7263
7262
|
}
|
|
7264
7263
|
if (isTree && trees.has(id)) return id;
|
|
7265
|
-
if (!isState || !isOneOf(
|
|
7264
|
+
if (!isState || !isOneOf(_chunkKNA5HH2Hcjs.STATE_ENDS, id)) return boxAt(source, id, at);
|
|
7266
7265
|
if (id === "start" !== (side2 === "from")) throw fail(source, at, id === "start" ? m.intoStart : m.outOfFinish);
|
|
7267
7266
|
return id;
|
|
7268
7267
|
};
|
|
7269
7268
|
const notReserved = (source, id, at) => {
|
|
7270
|
-
if (isState && isOneOf(
|
|
7271
|
-
if (isGit && id ===
|
|
7272
|
-
if (isTime && id ===
|
|
7269
|
+
if (isState && isOneOf(_chunkKNA5HH2Hcjs.STATE_ENDS, id)) throw fail(source, at, m.reservedId(id));
|
|
7270
|
+
if (isGit && id === _chunkKNA5HH2Hcjs.HEAD) throw fail(source, at, m.headReserved(id));
|
|
7271
|
+
if (isTime && id === _chunkKNA5HH2Hcjs.NOW) throw fail(source, at, m.nowReserved(id));
|
|
7273
7272
|
};
|
|
7274
7273
|
const inStep = (source) => {
|
|
7275
7274
|
if (!building) throw fail(source, 0, m.stepLineBeforeStep);
|
|
@@ -7306,16 +7305,16 @@ function parseLines(lines, m) {
|
|
|
7306
7305
|
continue;
|
|
7307
7306
|
}
|
|
7308
7307
|
const [word = "", second] = text.split(/\s+/u);
|
|
7309
|
-
if (isGit && tips.has(word) && second ===
|
|
7308
|
+
if (isGit && tips.has(word) && second === _chunkKNA5HH2Hcjs.FROM) {
|
|
7310
7309
|
const step = inStep(source);
|
|
7311
7310
|
step.events.push(readCut(source));
|
|
7312
7311
|
continue;
|
|
7313
7312
|
}
|
|
7314
7313
|
if (!isGit && (word === "branch" || word === "commit")) throw fail(source, 0, m.gitOnly(word));
|
|
7315
|
-
if (!isTime && isOneOf(
|
|
7316
|
-
if (!isTree && isOneOf(
|
|
7317
|
-
if (!isLineup && isOneOf(
|
|
7318
|
-
if (!isOneOf(
|
|
7314
|
+
if (!isTime && isOneOf(_chunkKNA5HH2Hcjs.TIME_HEADS, word)) throw fail(source, 0, m.timeOnly(word));
|
|
7315
|
+
if (!isTree && isOneOf(_chunkKNA5HH2Hcjs.TREE_HEADS, word)) throw fail(source, 0, m.treeOnly(word));
|
|
7316
|
+
if (!isLineup && isOneOf(_chunkKNA5HH2Hcjs.LINEUP_HEADS, word)) throw fail(source, 0, m.lineupOnly(word));
|
|
7317
|
+
if (!isOneOf(_chunkKNA5HH2Hcjs.HEADS, word)) {
|
|
7319
7318
|
const old = oldForm(text, building !== void 0);
|
|
7320
7319
|
throw fail(source, 0, old ? m.oldForm(old.word, old.shape) : m.unknownHead(word));
|
|
7321
7320
|
}
|
|
@@ -7508,7 +7507,7 @@ function parseLines(lines, m) {
|
|
|
7508
7507
|
if (!LENGTH.test(length)) throw fail(source, at(2), m.badLength);
|
|
7509
7508
|
const count = _nullishCoalesce(found[3], () => ( ""));
|
|
7510
7509
|
if (!COUNT.test(count)) throw fail(source, at(3), m.badCount("scale"));
|
|
7511
|
-
const first = rest2 < text.length ? readAttrs(source, rest2,
|
|
7510
|
+
const first = rest2 < text.length ? readAttrs(source, rest2, _chunkKNA5HH2Hcjs.ATTRS.scale, m).get("from") : void 0;
|
|
7512
7511
|
if (first && !NUMBER.test(first.value)) throw fail(source, first.at, m.scaleShape);
|
|
7513
7512
|
scale = { unit: _nullishCoalesce(found[1], () => ( "")), length, count: Number(count), ...first ? { from: Number(first.value) } : {} };
|
|
7514
7513
|
}
|
|
@@ -7522,13 +7521,13 @@ function parseLines(lines, m) {
|
|
|
7522
7521
|
if (rest2 < text.length && text[rest2] !== "[") throw fail(source, rest2, m.periodShape);
|
|
7523
7522
|
const length = _nullishCoalesce(found[2], () => ( ""));
|
|
7524
7523
|
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"));
|
|
7525
|
-
const first = rest2 < text.length ? readAttrs(source, rest2,
|
|
7524
|
+
const first = rest2 < text.length ? readAttrs(source, rest2, _chunkKNA5HH2Hcjs.ATTRS.period, m).get("from") : void 0;
|
|
7526
7525
|
if (first && !NUMBER.test(first.value)) throw fail(source, first.at, m.periodShape);
|
|
7527
7526
|
period = { name: _nullishCoalesce(found[1], () => ( "")), length: Number(length), ...first ? { from: Number(first.value) } : {} };
|
|
7528
7527
|
}
|
|
7529
7528
|
function readRow(source) {
|
|
7530
7529
|
beforeSteps(source);
|
|
7531
|
-
const declared = readDeclared(source, "row",
|
|
7530
|
+
const declared = readDeclared(source, "row", _chunkKNA5HH2Hcjs.ATTRS.row, m);
|
|
7532
7531
|
notReserved(source, declared.id, declared.idAt);
|
|
7533
7532
|
if (rows.some((row2) => row2.id === declared.id) || points.some((point) => point.id === declared.id)) throw fail(source, declared.idAt, m.duplicate(declared.id));
|
|
7534
7533
|
const color = declared.attrs.get("color");
|
|
@@ -7595,7 +7594,7 @@ function parseLines(lines, m) {
|
|
|
7595
7594
|
const { from, to } = rangeAt(source, _nullishCoalesce(_optionalChain([found, 'access', _47 => _47.indices, 'optionalAccess', _48 => _48[2], 'optionalAccess', _49 => _49[0]]), () => ( 0)), range2);
|
|
7596
7595
|
const rest2 = skipSpaces(text, found[0].length);
|
|
7597
7596
|
if (rest2 >= text.length || text[rest2] !== "[") throw fail(source, rest2, m.markShape);
|
|
7598
|
-
const color = readAttrs(source, rest2,
|
|
7597
|
+
const color = readAttrs(source, rest2, _chunkKNA5HH2Hcjs.ATTRS.mark, m).get("color");
|
|
7599
7598
|
if (!color) throw fail(source, rest2, m.markShape);
|
|
7600
7599
|
if (!isOneOf(COLORS, color.value)) throw fail(source, color.at, m.badColor);
|
|
7601
7600
|
return { type: "mark", row, from, to, color: color.value };
|
|
@@ -7607,9 +7606,9 @@ function parseLines(lines, m) {
|
|
|
7607
7606
|
const { from, to } = rangeAt(source, _nullishCoalesce(_optionalChain([found, 'access', _51 => _51.indices, 'optionalAccess', _52 => _52[1], 'optionalAccess', _53 => _53[0]]), () => ( 0)), range2);
|
|
7608
7607
|
const named = readName(source, found[0].length, m);
|
|
7609
7608
|
if (named.value === "") throw fail(source, 0, m.spanShape);
|
|
7610
|
-
const attrs2 = named.rest < source.text.length ? readAttrs(source, named.rest,
|
|
7609
|
+
const attrs2 = named.rest < source.text.length ? readAttrs(source, named.rest, _chunkKNA5HH2Hcjs.ATTRS.span, m) : /* @__PURE__ */ new Map();
|
|
7611
7610
|
const shape = attrs2.get("shape");
|
|
7612
|
-
if (shape && !isOneOf(
|
|
7611
|
+
if (shape && !isOneOf(_chunkKNA5HH2Hcjs.SPAN_SHAPES, shape.value)) throw fail(source, shape.at, m.badShape);
|
|
7613
7612
|
const color = attrs2.get("color");
|
|
7614
7613
|
if (color && !isOneOf(COLORS, color.value)) throw fail(source, color.at, m.badColor);
|
|
7615
7614
|
return { type: "span", from, to, text: named.value, ...shape ? { shape: "box" } : {}, ...color ? { color: color.value } : {} };
|
|
@@ -7623,7 +7622,7 @@ function parseLines(lines, m) {
|
|
|
7623
7622
|
if (!isPoint && !boxes.some((box) => box.id === id)) throw fail(source, idAt, m.undeclaredNote(id));
|
|
7624
7623
|
const named = readName(source, found[0].length, m);
|
|
7625
7624
|
if (named.value === "") throw fail(source, 0, m.noteShape);
|
|
7626
|
-
const color = named.rest < source.text.length ? readAttrs(source, named.rest,
|
|
7625
|
+
const color = named.rest < source.text.length ? readAttrs(source, named.rest, _chunkKNA5HH2Hcjs.ATTRS.note, m).get("color") : void 0;
|
|
7627
7626
|
if (color && !isPoint) throw fail(source, color.at, m.noteColorPointOnly);
|
|
7628
7627
|
if (color && !isOneOf(COLORS, color.value)) throw fail(source, color.at, m.badColor);
|
|
7629
7628
|
return { type: "swap", box: id, text: named.value, ...color ? { color: color.value } : {} };
|
|
@@ -7634,7 +7633,7 @@ function parseLines(lines, m) {
|
|
|
7634
7633
|
if (isTree) throw fail(source, 0, m.treeNoGroup);
|
|
7635
7634
|
if (isLineup) throw fail(source, 0, m.lineupNoGroup);
|
|
7636
7635
|
if (group) throw fail(source, 0, m.nestedGroup);
|
|
7637
|
-
const declared = readDeclared(source, "group",
|
|
7636
|
+
const declared = readDeclared(source, "group", _chunkKNA5HH2Hcjs.ATTRS.group, m);
|
|
7638
7637
|
if (regions.some((region) => region.id === declared.id)) {
|
|
7639
7638
|
if (declared.name !== void 0 || declared.attrs.size > 0) throw fail(source, 0, m.regionReopened(declared.id));
|
|
7640
7639
|
} else {
|
|
@@ -7646,7 +7645,7 @@ function parseLines(lines, m) {
|
|
|
7646
7645
|
}
|
|
7647
7646
|
function readBox(source) {
|
|
7648
7647
|
beforeSteps(source);
|
|
7649
|
-
const declared = readDeclared(source, "box", isLineup ?
|
|
7648
|
+
const declared = readDeclared(source, "box", isLineup ? _chunkKNA5HH2Hcjs.LANE_ATTRS : _chunkKNA5HH2Hcjs.ATTRS.box, m);
|
|
7650
7649
|
notReserved(source, declared.id, declared.idAt);
|
|
7651
7650
|
declare(source, declared.id, declared.idAt);
|
|
7652
7651
|
firstBox ??= source;
|
|
@@ -7663,7 +7662,7 @@ function parseLines(lines, m) {
|
|
|
7663
7662
|
}
|
|
7664
7663
|
function readSource(source) {
|
|
7665
7664
|
const named = readName(source, "source".length, m);
|
|
7666
|
-
const url = named.rest < source.text.length ? readAttrs(source, named.rest,
|
|
7665
|
+
const url = named.rest < source.text.length ? readAttrs(source, named.rest, _chunkKNA5HH2Hcjs.ATTRS.source, m).get("url") : void 0;
|
|
7667
7666
|
if (named.value === "" || !url) throw fail(source, 0, m.sourceShape);
|
|
7668
7667
|
return { name: named.value, url: urlOf(source, "url", url) };
|
|
7669
7668
|
}
|
|
@@ -7673,7 +7672,7 @@ function parseLines(lines, m) {
|
|
|
7673
7672
|
}
|
|
7674
7673
|
function readBranch(source) {
|
|
7675
7674
|
beforeSteps(source);
|
|
7676
|
-
const declared = readDeclared(source, "branch",
|
|
7675
|
+
const declared = readDeclared(source, "branch", _chunkKNA5HH2Hcjs.ATTRS.branch, m);
|
|
7677
7676
|
if (declared.name !== void 0) throw fail(source, 0, m.branchShape);
|
|
7678
7677
|
notReserved(source, declared.id, declared.idAt);
|
|
7679
7678
|
declare(source, declared.id, declared.idAt);
|
|
@@ -7696,7 +7695,7 @@ function parseLines(lines, m) {
|
|
|
7696
7695
|
const branch = branchAt(source, on, at(2));
|
|
7697
7696
|
const copy = found[3] === void 0 ? void 0 : commitAt(source, found[3], at(3));
|
|
7698
7697
|
const merge = found[4] === void 0 ? void 0 : mergedAt(source, found[4], at(4), branch);
|
|
7699
|
-
const attrs2 = rest2 < text.length ? readAttrs(source, rest2,
|
|
7698
|
+
const attrs2 = rest2 < text.length ? readAttrs(source, rest2, _chunkKNA5HH2Hcjs.ATTRS.commit, m) : /* @__PURE__ */ new Map();
|
|
7700
7699
|
const hash = attrs2.get("hash");
|
|
7701
7700
|
if (hash && !HASH.test(hash.value)) throw fail(source, hash.at, m.badHash);
|
|
7702
7701
|
const note = _optionalChain([attrs2, 'access', _67 => _67.get, 'call', _68 => _68("note"), 'optionalAccess', _69 => _69.value]);
|
|
@@ -7738,7 +7737,7 @@ function parseLines(lines, m) {
|
|
|
7738
7737
|
trees.set(id, { source, at: idAt });
|
|
7739
7738
|
const rest2 = skipSpaces(text, found[0].length);
|
|
7740
7739
|
if (rest2 < text.length && text[rest2] !== "[") throw fail(source, rest2, m.leafShape);
|
|
7741
|
-
const hash = treeHash(source, rest2,
|
|
7740
|
+
const hash = treeHash(source, rest2, _chunkKNA5HH2Hcjs.ATTRS.leaf);
|
|
7742
7741
|
return { type: "leaf", id, ...hash !== void 0 ? { hash } : {} };
|
|
7743
7742
|
}
|
|
7744
7743
|
function readNode(source) {
|
|
@@ -7764,7 +7763,7 @@ function parseLines(lines, m) {
|
|
|
7764
7763
|
if (text[end] !== ",") break;
|
|
7765
7764
|
end++;
|
|
7766
7765
|
}
|
|
7767
|
-
const hash = treeHash(source, end,
|
|
7766
|
+
const hash = treeHash(source, end, _chunkKNA5HH2Hcjs.ATTRS.node);
|
|
7768
7767
|
trees.set(id, { source, at: idAt });
|
|
7769
7768
|
return { type: "node", id, children, ...hash !== void 0 ? { hash } : {} };
|
|
7770
7769
|
}
|
|
@@ -7793,11 +7792,11 @@ function parseLines(lines, m) {
|
|
|
7793
7792
|
beforeSteps(source);
|
|
7794
7793
|
const open = source.text.indexOf("[");
|
|
7795
7794
|
const end = open < 0 ? source.text.length : open;
|
|
7796
|
-
const attrs2 = open < 0 ? /* @__PURE__ */ new Map() : readAttrs(source, open,
|
|
7795
|
+
const attrs2 = open < 0 ? /* @__PURE__ */ new Map() : readAttrs(source, open, _chunkKNA5HH2Hcjs.ATTRS.item, m);
|
|
7797
7796
|
const color = attrs2.get("color");
|
|
7798
7797
|
if (color && !isOneOf(COLORS, color.value)) throw fail(source, color.at, m.badColor);
|
|
7799
7798
|
const label2 = attrs2.get("label");
|
|
7800
|
-
if (label2 && [...label2.value].length >
|
|
7799
|
+
if (label2 && [...label2.value].length > _chunkKNA5HH2Hcjs.LABEL_MOST) throw fail(source, label2.at, m.labelTooLong(_chunkKNA5HH2Hcjs.LABEL_MOST));
|
|
7801
7800
|
for (const { value: value2, at } of namesAt(source, "item".length, end, m.itemShape)) {
|
|
7802
7801
|
declare(source, value2, at);
|
|
7803
7802
|
items.push({ id: value2, ...color ? { color: color.value } : {}, ...label2 ? { label: label2.value } : {} });
|
|
@@ -7815,7 +7814,7 @@ function parseLines(lines, m) {
|
|
|
7815
7814
|
chips.forEach(({ value: value2, at: chipAt }, k) => {
|
|
7816
7815
|
if (!items.some((item) => item.id === value2)) throw fail(source, chipAt, m.noSuchItem(value2));
|
|
7817
7816
|
if (seen.has(value2)) throw fail(source, chipAt, m.itemTwice(value2));
|
|
7818
|
-
if (k >=
|
|
7817
|
+
if (k >= _chunkKNA5HH2Hcjs.LANE_MOST) throw fail(source, chipAt, m.laneFull(box, _chunkKNA5HH2Hcjs.LANE_MOST));
|
|
7819
7818
|
seen.add(value2);
|
|
7820
7819
|
});
|
|
7821
7820
|
return { type: "line", box, items: chips.map((chip) => chip.value) };
|
|
@@ -7891,7 +7890,7 @@ function parseLines(lines, m) {
|
|
|
7891
7890
|
const inner = /^\s*([a-z]*)\s*:\s*(.*?)\s*$/u.exec(inside);
|
|
7892
7891
|
if (!inner) throw fail(source, end + 1, m.attrNoColon(inside.trim()));
|
|
7893
7892
|
const key2 = _nullishCoalesce(inner[1], () => ( ""));
|
|
7894
|
-
if (!
|
|
7893
|
+
if (!_chunkKNA5HH2Hcjs.ATTRS.strip.includes(key2)) throw fail(source, end + 1, m.badAttr(key2, _chunkKNA5HH2Hcjs.ATTRS.strip));
|
|
7895
7894
|
if (!RATIO2.test(_nullishCoalesce(inner[2], () => ( "")))) throw fail(source, end + 1, m.badRatio);
|
|
7896
7895
|
meters.push({ field: value2, line: _nullishCoalesce(inner[2], () => ( "")) });
|
|
7897
7896
|
end = skipSpaces(text, close + 1);
|
|
@@ -7950,18 +7949,18 @@ function parseLines(lines, m) {
|
|
|
7950
7949
|
const text = source.text;
|
|
7951
7950
|
const { from, to, label: label2, at } = readLine(source, edge2);
|
|
7952
7951
|
if (at < text.length && text[at] !== "[") throw fail(source, at, m.edgeShape);
|
|
7953
|
-
const attrs2 = at < text.length ? readAttrs(source, at,
|
|
7952
|
+
const attrs2 = at < text.length ? readAttrs(source, at, _chunkKNA5HH2Hcjs.ATTRS.edge, m) : /* @__PURE__ */ new Map();
|
|
7954
7953
|
const tag = attrs2.get("tag");
|
|
7955
7954
|
const carried = attrs2.get("carry");
|
|
7956
7955
|
if (tag && carried) throw fail(source, Math.max(tag.at, carried.at), m.carryTwice);
|
|
7957
|
-
if (carried && !isOneOf(
|
|
7956
|
+
if (carried && !isOneOf(_chunkKNA5HH2Hcjs.CARRIES, carried.value)) throw fail(source, carried.at, m.badCarry);
|
|
7958
7957
|
const side2 = attrs2.get("side");
|
|
7959
|
-
if (side2 && !isOneOf(
|
|
7958
|
+
if (side2 && !isOneOf(_chunkKNA5HH2Hcjs.SIDES, side2.value)) throw fail(source, side2.at, m.badSide);
|
|
7960
7959
|
const columns = readColumns(source, from, to, attrs2, at);
|
|
7961
7960
|
let carry = isGit ? { kind: "tag", text: from } : { kind: "envelope" };
|
|
7962
7961
|
if (tag) carry = { kind: "tag", text: tag.value };
|
|
7963
7962
|
else if (carried) carry = carried.value === "coin" ? { kind: "coin" } : { kind: "none" };
|
|
7964
|
-
if (isGit && from !==
|
|
7963
|
+
if (isGit && from !== _chunkKNA5HH2Hcjs.HEAD) tips.set(from, to);
|
|
7965
7964
|
return {
|
|
7966
7965
|
type: "edge",
|
|
7967
7966
|
from,
|
|
@@ -7973,7 +7972,7 @@ function parseLines(lines, m) {
|
|
|
7973
7972
|
};
|
|
7974
7973
|
}
|
|
7975
7974
|
function readColumns(source, from, to, attrs2, end) {
|
|
7976
|
-
const given =
|
|
7975
|
+
const given = _chunkKNA5HH2Hcjs.TIME_EDGE_ATTRS.flatMap((key2) => {
|
|
7977
7976
|
const attr = attrs2.get(key2);
|
|
7978
7977
|
return attr ? [{ key: key2, attr }] : [];
|
|
7979
7978
|
});
|
|
@@ -8024,7 +8023,7 @@ function parseLines(lines, m) {
|
|
|
8024
8023
|
at = named.rest;
|
|
8025
8024
|
}
|
|
8026
8025
|
if (at < text.length && text[at] !== "[") throw fail(source, at, m.stripNeedsValue);
|
|
8027
|
-
const tag = at < text.length ? _optionalChain([readAttrs, 'call', _105 => _105(source, at,
|
|
8026
|
+
const tag = at < text.length ? _optionalChain([readAttrs, 'call', _105 => _105(source, at, _chunkKNA5HH2Hcjs.ATTRS.set, m), 'access', _106 => _106.get, 'call', _107 => _107("tag"), 'optionalAccess', _108 => _108.value]) : void 0;
|
|
8028
8027
|
if (value2 === void 0 && tag === void 0) throw fail(source, 0, m.stripNeedsValue);
|
|
8029
8028
|
if (value2 !== void 0 && meters.some((meter) => meter.field === field2) && !RATIO2.test(value2)) throw fail(source, start, m.meterValue(field2));
|
|
8030
8029
|
return {
|
|
@@ -8037,7 +8036,7 @@ function parseLines(lines, m) {
|
|
|
8037
8036
|
}
|
|
8038
8037
|
function parseNotation(notation, options = {}) {
|
|
8039
8038
|
try {
|
|
8040
|
-
return { ok: true, diagram: parseLines(tokenize(notation), messagesFor(_nullishCoalesce(options.lang, () => (
|
|
8039
|
+
return { ok: true, diagram: parseLines(tokenize(notation), messagesFor(_nullishCoalesce(options.lang, () => ( _chunkKNA5HH2Hcjs.DEFAULT_LANG)))) };
|
|
8041
8040
|
} catch (error) {
|
|
8042
8041
|
if (!(error instanceof NotationError)) throw error;
|
|
8043
8042
|
return { ok: false, errors: [{ line: error.line, column: error.column, message: error.message }] };
|
|
@@ -8081,7 +8080,7 @@ function event(e, kind) {
|
|
|
8081
8080
|
case "swap":
|
|
8082
8081
|
return kind === "time" ? `note ${e.box}: ${name(e.text)}${attrs([["color", e.color]])}` : `note ${e.box}: ${e.text}`;
|
|
8083
8082
|
case "now":
|
|
8084
|
-
return `${
|
|
8083
|
+
return `${_chunkKNA5HH2Hcjs.NOW} -> ${e.to}`;
|
|
8085
8084
|
case "mark":
|
|
8086
8085
|
return `mark ${e.row} ${range(e.from, e.to)}${attrs([["color", e.color]])}`;
|
|
8087
8086
|
case "span":
|
|
@@ -8092,16 +8091,16 @@ function event(e, kind) {
|
|
|
8092
8091
|
case "strip":
|
|
8093
8092
|
return `set ${key(e.field)}${e.value === void 0 ? "" : `: ${name(e.value)}`}${attrs([["tag", e.tag]])}`;
|
|
8094
8093
|
case "commit":
|
|
8095
|
-
return `commit ${e.id} ${
|
|
8094
|
+
return `commit ${e.id} ${_chunkKNA5HH2Hcjs.ON} ${e.branch}${e.copy === void 0 ? "" : ` ${_chunkKNA5HH2Hcjs.COPY} ${e.copy}`}${e.merge === void 0 ? "" : ` ${_chunkKNA5HH2Hcjs.MERGE} ${e.merge}`}${attrs([
|
|
8096
8095
|
["hash", e.hash],
|
|
8097
8096
|
["note", e.note]
|
|
8098
8097
|
])}`;
|
|
8099
8098
|
case "branch":
|
|
8100
|
-
return `${e.branch} ${
|
|
8099
|
+
return `${e.branch} ${_chunkKNA5HH2Hcjs.FROM} ${e.from}`;
|
|
8101
8100
|
case "leaf":
|
|
8102
8101
|
return `leaf ${e.id}${attrs([["hash", e.hash]])}`;
|
|
8103
8102
|
case "node":
|
|
8104
|
-
return `node ${e.id} ${
|
|
8103
|
+
return `node ${e.id} ${_chunkKNA5HH2Hcjs.OF} ${e.children.join(", ")}${attrs([["hash", e.hash]])}`;
|
|
8105
8104
|
case "line":
|
|
8106
8105
|
return `line ${e.box}: ${e.items.join(", ")}`;
|
|
8107
8106
|
case "seal":
|
|
@@ -8137,7 +8136,7 @@ function timeBlocks(time) {
|
|
|
8137
8136
|
["empty", r.empty && r.empty.length > 0 ? r.empty.join(" ") : void 0]
|
|
8138
8137
|
])}`
|
|
8139
8138
|
);
|
|
8140
|
-
const points = (_nullishCoalesce(time.points, () => ( []))).map((p) => `point ${p.id} ${
|
|
8139
|
+
const points = (_nullishCoalesce(time.points, () => ( []))).map((p) => `point ${p.id} ${_chunkKNA5HH2Hcjs.AT} ${p.at}`);
|
|
8141
8140
|
return [head.join("\n"), rows.join("\n"), ...points.length > 0 ? [points.join("\n")] : [], ...time.zoom ? [`zoom ${range(time.zoom.from, time.zoom.to)}`] : []];
|
|
8142
8141
|
}
|
|
8143
8142
|
function declarations(diagram) {
|
|
@@ -8224,8 +8223,8 @@ function groupsOf(diagram) {
|
|
|
8224
8223
|
}
|
|
8225
8224
|
var vertical = (side2) => side2 === "left" || side2 === "right";
|
|
8226
8225
|
function placeBoxes(diagram, groups) {
|
|
8227
|
-
const columns =
|
|
8228
|
-
const edges =
|
|
8226
|
+
const columns = _chunkKNA5HH2Hcjs.LOOK.architecture.columns;
|
|
8227
|
+
const edges = _chunkKNA5HH2Hcjs.edgesOf.call(void 0, diagram).map((e) => e.edge);
|
|
8229
8228
|
const slots = /* @__PURE__ */ new Map();
|
|
8230
8229
|
groups.forEach((group, g) => {
|
|
8231
8230
|
const inGroup = new Set(group.members);
|
|
@@ -8289,27 +8288,27 @@ function nameLines(name2) {
|
|
|
8289
8288
|
return [name2.slice(0, at), name2.slice(at + 1)];
|
|
8290
8289
|
}
|
|
8291
8290
|
function headerSize(region) {
|
|
8292
|
-
const { icon, nameY, line: line2, inset } =
|
|
8291
|
+
const { icon, nameY, line: line2, inset } = _chunkKNA5HH2Hcjs.LOOK.region;
|
|
8293
8292
|
const lines = nameLines(region.name);
|
|
8294
|
-
const w = Math.max(icon, ...lines.map((l) =>
|
|
8295
|
-
const h = nameY - inset + (lines.length - 1) * line2 + (region.note ? line2 : 0) +
|
|
8293
|
+
const w = Math.max(icon, ...lines.map((l) => _chunkKNA5HH2Hcjs.textWidth.call(void 0, l, _chunkKNA5HH2Hcjs.TYPE.regionName)), _chunkKNA5HH2Hcjs.textWidth.call(void 0, _nullishCoalesce(region.note, () => ( "")), _chunkKNA5HH2Hcjs.TYPE.regionNote));
|
|
8294
|
+
const h = nameY - inset + (lines.length - 1) * line2 + (region.note ? line2 : 0) + _chunkKNA5HH2Hcjs.LOOK.gap / 2;
|
|
8296
8295
|
return { w, h, lines };
|
|
8297
8296
|
}
|
|
8298
8297
|
function arrange(diagram, groups, slots, rooms) {
|
|
8299
|
-
const { box: B, region: R, architecture: A, margin, gap } =
|
|
8300
|
-
const colors =
|
|
8301
|
-
const regionColor =
|
|
8302
|
-
const edges =
|
|
8298
|
+
const { box: B, region: R, architecture: A, margin, gap } = _chunkKNA5HH2Hcjs.LOOK;
|
|
8299
|
+
const colors = _chunkKNA5HH2Hcjs.boxColors.call(void 0, diagram);
|
|
8300
|
+
const regionColor = _chunkKNA5HH2Hcjs.regionColors.call(void 0, diagram);
|
|
8301
|
+
const edges = _chunkKNA5HH2Hcjs.edgesOf.call(void 0, diagram);
|
|
8303
8302
|
const columnCount = Math.max(1, ...[...slots.values()].map((s) => s.col + 1));
|
|
8304
|
-
const carriedIn =
|
|
8305
|
-
const widths = new Map(diagram.boxes.map((b) => [b.id, Math.max(
|
|
8303
|
+
const carriedIn = _chunkKNA5HH2Hcjs.slotRooms.call(void 0, diagram);
|
|
8304
|
+
const widths = new Map(diagram.boxes.map((b) => [b.id, Math.max(_chunkKNA5HH2Hcjs.boxWidth.call(void 0, diagram, b.id, true), _chunkKNA5HH2Hcjs.slotBoxWidth.call(void 0, carriedIn.get(b.id), b.icon !== void 0, B.padX))]));
|
|
8306
8305
|
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)))));
|
|
8307
8306
|
const between = Array.from({ length: Math.max(0, columnCount - 1) }, () => A.columnGap);
|
|
8308
8307
|
for (const { edge: edge2 } of edges) {
|
|
8309
8308
|
const a = slots.get(edge2.from);
|
|
8310
8309
|
const b = slots.get(edge2.to);
|
|
8311
8310
|
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;
|
|
8312
|
-
const need =
|
|
8311
|
+
const need = _chunkKNA5HH2Hcjs.textWidth.call(void 0, edge2.label, _chunkKNA5HH2Hcjs.labelStyle.call(void 0, edge2.label)) + _chunkKNA5HH2Hcjs.LOOK.label.padX * 2 + A.labelRoom * 2;
|
|
8313
8312
|
const i = Math.min(a.col, b.col);
|
|
8314
8313
|
if (need <= A.maxColumnGap) between[i] = Math.max(_nullishCoalesce(between[i], () => ( 0)), need);
|
|
8315
8314
|
}
|
|
@@ -8323,7 +8322,7 @@ function arrange(diagram, groups, slots, rooms) {
|
|
|
8323
8322
|
const slot = slots.get(id);
|
|
8324
8323
|
return slot ? [`${slot.group}:${slot.row}`] : [];
|
|
8325
8324
|
}));
|
|
8326
|
-
const loopRoom = (g, row) => loopRows.has(`${g}:${row}`) ?
|
|
8325
|
+
const loopRoom = (g, row) => loopRows.has(`${g}:${row}`) ? _chunkKNA5HH2Hcjs.LOOP_ROOM : 0;
|
|
8327
8326
|
const boxes = [];
|
|
8328
8327
|
const bands = [];
|
|
8329
8328
|
let cursor = margin;
|
|
@@ -8360,7 +8359,7 @@ function arrange(diagram, groups, slots, rooms) {
|
|
|
8360
8359
|
cursor += h + R.gap;
|
|
8361
8360
|
});
|
|
8362
8361
|
const bandsBottom = cursor - R.gap;
|
|
8363
|
-
for (const box of boxes)
|
|
8362
|
+
for (const box of boxes) _chunkKNA5HH2Hcjs.placeSlot.call(void 0, box, carriedIn.get(box.id));
|
|
8364
8363
|
const byId = new Map(boxes.map((b) => [b.id, b]));
|
|
8365
8364
|
const bandOf = (id) => bands[_nullishCoalesce(_optionalChain([slots, 'access', _135 => _135.get, 'call', _136 => _136(id), 'optionalAccess', _137 => _137.group]), () => ( 0))];
|
|
8366
8365
|
const crosses = (points, rect, pad2) => {
|
|
@@ -8373,28 +8372,28 @@ function arrange(diagram, groups, slots, rooms) {
|
|
|
8373
8372
|
};
|
|
8374
8373
|
const loopZones = [...looped].flatMap((id) => {
|
|
8375
8374
|
const box = byId.get(id);
|
|
8376
|
-
return box ? [{ x: box.x, y: box.y + box.h, w: box.w, h:
|
|
8375
|
+
return box ? [{ x: box.x, y: box.y + box.h, w: box.w, h: _chunkKNA5HH2Hcjs.LOOP_ROOM }] : [];
|
|
8377
8376
|
});
|
|
8378
8377
|
const onLoop = (points) => loopZones.some((zone) => crosses(points, zone, 0));
|
|
8379
|
-
const blocked = (points, a, b) => boxes.some((box) => box.id !== a && box.id !== b && crosses(points, box,
|
|
8378
|
+
const blocked = (points, a, b) => boxes.some((box) => box.id !== a && box.id !== b && crosses(points, box, _chunkKNA5HH2Hcjs.LOOK.label.search)) || onLoop(points);
|
|
8380
8379
|
const laneBelow = (id) => {
|
|
8381
8380
|
const box = byId.get(id);
|
|
8382
8381
|
const band2 = bandOf(id);
|
|
8383
8382
|
const slot = slots.get(id);
|
|
8384
8383
|
const under = box.y + box.h + (slot ? loopRoom(slot.group, slot.row) : 0);
|
|
8385
|
-
return (_nullishCoalesce(_optionalChain([slot, 'optionalAccess', _138 => _138.row]), () => ( 0))) < band2.rows - 1 ? under + A.rowGap / 2 : Math.min(under + R.pad / 2, band2.y + band2.h -
|
|
8384
|
+
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 - _chunkKNA5HH2Hcjs.LOOK.edge.inset);
|
|
8386
8385
|
};
|
|
8387
8386
|
const laneAbove = (id) => {
|
|
8388
8387
|
const box = byId.get(id);
|
|
8389
8388
|
const band2 = bandOf(id);
|
|
8390
|
-
return (_nullishCoalesce(_optionalChain([slots, 'access', _139 => _139.get, 'call', _140 => _140(id), 'optionalAccess', _141 => _141.row]), () => ( 0))) > 0 ? box.y - A.rowGap / 2 : Math.max(box.y - R.pad / 2, band2.y +
|
|
8389
|
+
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 + _chunkKNA5HH2Hcjs.LOOK.edge.inset);
|
|
8391
8390
|
};
|
|
8392
|
-
const inset =
|
|
8391
|
+
const inset = _chunkKNA5HH2Hcjs.LOOK.edge.inset;
|
|
8393
8392
|
const gapX = (col, toRight) => toRight ? colLeft[col] + colW[col] + (_nullishCoalesce(between[col], () => ( A.columnGap))) / 2 : colLeft[col] - (_nullishCoalesce(between[col - 1], () => ( A.columnGap))) / 2;
|
|
8394
8393
|
const route = (from, to) => {
|
|
8395
8394
|
const a = byId.get(from);
|
|
8396
8395
|
const b = byId.get(to);
|
|
8397
|
-
if (from === to) return
|
|
8396
|
+
if (from === to) return _chunkKNA5HH2Hcjs.loopUnder.call(void 0, a);
|
|
8398
8397
|
const sa = slots.get(from);
|
|
8399
8398
|
const sb = slots.get(to);
|
|
8400
8399
|
if (sa.group === sb.group && sa.row === sb.row) {
|
|
@@ -8465,10 +8464,10 @@ function arrange(diagram, groups, slots, rooms) {
|
|
|
8465
8464
|
from: edge2.from,
|
|
8466
8465
|
to: edge2.to,
|
|
8467
8466
|
points: route(edge2.from, edge2.to),
|
|
8468
|
-
color:
|
|
8467
|
+
color: _chunkKNA5HH2Hcjs.edgeColor.call(void 0, edge2, colors),
|
|
8469
8468
|
carry: edge2.carry
|
|
8470
8469
|
}));
|
|
8471
|
-
|
|
8470
|
+
_chunkKNA5HH2Hcjs.seatCarriers.call(void 0, sceneEdges, byId, carriedIn);
|
|
8472
8471
|
const outward = /* @__PURE__ */ new Map();
|
|
8473
8472
|
for (const edge2 of sceneEdges) {
|
|
8474
8473
|
if (edge2.points.length !== 2) continue;
|
|
@@ -8476,7 +8475,7 @@ function arrange(diagram, groups, slots, rooms) {
|
|
|
8476
8475
|
if (!back) continue;
|
|
8477
8476
|
const [p, q] = edge2.points;
|
|
8478
8477
|
const flat = Math.abs(q[1] - p[1]) < Math.abs(q[0] - p[0]);
|
|
8479
|
-
const d = (edge2.from < edge2.to ? 1 : -1) *
|
|
8478
|
+
const d = (edge2.from < edge2.to ? 1 : -1) * _chunkKNA5HH2Hcjs.LOOK.edge.parallel;
|
|
8480
8479
|
edge2.points = edge2.points.map(([x, y]) => flat ? [x, y + d] : [x + d, y]);
|
|
8481
8480
|
outward.set(edge2, flat ? d > 0 ? "below" : "above" : d > 0 ? "right" : "left");
|
|
8482
8481
|
}
|
|
@@ -8498,39 +8497,39 @@ function arrange(diagram, groups, slots, rooms) {
|
|
|
8498
8497
|
header: { x: margin + R.inset, y: band2.y + R.inset, w: header.w, h: header.h }
|
|
8499
8498
|
});
|
|
8500
8499
|
});
|
|
8501
|
-
const badgeAt = (edge2, taken, lines2) => edge2.from === edge2.to ?
|
|
8502
|
-
const early =
|
|
8500
|
+
const badgeAt = (edge2, taken, lines2) => edge2.from === edge2.to ? _chunkKNA5HH2Hcjs.loopBadge.call(void 0, edge2.points) : _chunkKNA5HH2Hcjs.badgeOnPath.call(void 0, edge2.points, taken, lines2);
|
|
8501
|
+
const early = _chunkKNA5HH2Hcjs.lineBadges.call(void 0, sceneEdges, diagram.steps.length, badgeAt);
|
|
8503
8502
|
const labels = [];
|
|
8504
8503
|
for (const edge2 of sceneEdges) {
|
|
8505
8504
|
const source = _optionalChain([diagram, 'access', _142 => _142.steps, 'access', _143 => _143[edge2.step], 'optionalAccess', _144 => _144.events, 'access', _145 => _145[edge2.event]]);
|
|
8506
8505
|
if (_optionalChain([source, 'optionalAccess', _146 => _146.type]) !== "edge" || source.label === void 0) continue;
|
|
8507
|
-
const seen = [...early].filter(([s]) => s <= edge2.step).map(([, b]) =>
|
|
8506
|
+
const seen = [...early].filter(([s]) => s <= edge2.step).map(([, b]) => _chunkKNA5HH2Hcjs.badgeRect.call(void 0, b.point));
|
|
8508
8507
|
const soft = [...regions.map((r) => r.header), ...labels.filter((l) => l.step === edge2.step)];
|
|
8509
8508
|
const side2 = _nullishCoalesce(source.labelSide, () => ( outward.get(edge2)));
|
|
8510
|
-
const below = edge2.from === edge2.to ? { side: "below", base:
|
|
8509
|
+
const below = edge2.from === edge2.to ? { side: "below", base: _chunkKNA5HH2Hcjs.loopLabelBase.call(void 0, edge2.points, _chunkKNA5HH2Hcjs.textWidth.call(void 0, source.label, _chunkKNA5HH2Hcjs.labelStyle.call(void 0, source.label)) + _chunkKNA5HH2Hcjs.LOOK.label.padX * 2) } : void 0;
|
|
8511
8510
|
labels.push(
|
|
8512
|
-
|
|
8511
|
+
_chunkKNA5HH2Hcjs.placeLabel.call(void 0,
|
|
8513
8512
|
{ step: edge2.step, event: edge2.event, text: source.label, points: edge2.points, color: edge2.color, ..._nullishCoalesce(below, () => ( (side2 ? { side: side2 } : { flip: true }))) },
|
|
8514
8513
|
{ hard: boxes, soft, touch: seen }
|
|
8515
8514
|
)
|
|
8516
8515
|
);
|
|
8517
8516
|
}
|
|
8518
8517
|
const layout = { kind: "architecture", width: 0, height: 0, regions, boxes, lifelines: [], edges: sceneEdges, labels, actions: [], badges: [], paths: [], ends: [] };
|
|
8519
|
-
const shift = labels.length > 0 ? Math.max(0, margin +
|
|
8520
|
-
if (shift > 0)
|
|
8521
|
-
const contentRight = Math.max(...boxes.map((b) => b.x + b.w + R.pad), ...labels.map((l) => l.x + l.w +
|
|
8522
|
-
const width = Math.max(contentRight + margin,
|
|
8518
|
+
const shift = labels.length > 0 ? Math.max(0, margin + _chunkKNA5HH2Hcjs.LOOK.label.soft - Math.min(...labels.map((l) => l.x))) : 0;
|
|
8519
|
+
if (shift > 0) _chunkKNA5HH2Hcjs.shiftContent.call(void 0, layout, shift, 0);
|
|
8520
|
+
const contentRight = Math.max(...boxes.map((b) => b.x + b.w + R.pad), ...labels.map((l) => l.x + l.w + _chunkKNA5HH2Hcjs.LOOK.label.soft), ...sceneEdges.flatMap((e) => e.points.map((p) => p[0] + R.pad)));
|
|
8521
|
+
const width = Math.max(contentRight + margin, _chunkKNA5HH2Hcjs.stripNeed.call(void 0, diagram) + margin * 2);
|
|
8523
8522
|
for (const region of regions) region.w = width - margin * 2;
|
|
8524
8523
|
const contentBottom = Math.max(bandsBottom, ...labels.map((l) => l.y + l.h));
|
|
8525
|
-
const strip2 =
|
|
8524
|
+
const strip2 = _chunkKNA5HH2Hcjs.layoutStrip.call(void 0, diagram, margin, contentBottom + gap, width - margin * 2);
|
|
8526
8525
|
layout.width = width;
|
|
8527
8526
|
layout.height = (strip2 ? strip2.y + strip2.h : contentBottom) + margin;
|
|
8528
8527
|
if (strip2) layout.strip = strip2;
|
|
8529
|
-
const lines =
|
|
8530
|
-
layout.badges =
|
|
8528
|
+
const lines = _chunkKNA5HH2Hcjs.lineBadges.call(void 0, sceneEdges, diagram.steps.length, badgeAt);
|
|
8529
|
+
layout.badges = _chunkKNA5HH2Hcjs.replaceSameSpot.call(void 0,
|
|
8531
8530
|
diagram.steps.map((step, s) => {
|
|
8532
8531
|
const line2 = lines.get(s);
|
|
8533
|
-
if (!line2) return
|
|
8532
|
+
if (!line2) return _chunkKNA5HH2Hcjs.cornerBadge.call(void 0, step.events, s, layout);
|
|
8534
8533
|
return { step: s, x: line2.point[0], y: line2.point[1], color: line2.edge.color };
|
|
8535
8534
|
})
|
|
8536
8535
|
);
|
|
@@ -8538,7 +8537,7 @@ function arrange(diagram, groups, slots, rooms) {
|
|
|
8538
8537
|
}
|
|
8539
8538
|
function grow(layout, groups, slots, rooms) {
|
|
8540
8539
|
let grown = false;
|
|
8541
|
-
const soft =
|
|
8540
|
+
const soft = _chunkKNA5HH2Hcjs.LOOK.label.soft;
|
|
8542
8541
|
for (const label2 of layout.labels) {
|
|
8543
8542
|
const edge2 = layout.edges.find((e) => e.step === label2.step && e.event === label2.event);
|
|
8544
8543
|
const a = edge2 && slots.get(edge2.from);
|
|
@@ -8563,12 +8562,12 @@ function grow(layout, groups, slots, rooms) {
|
|
|
8563
8562
|
|
|
8564
8563
|
// src/layout/sequence.ts
|
|
8565
8564
|
function layoutSequence(diagram) {
|
|
8566
|
-
const { box: B, sequence: Q, label: L, margin, gap } =
|
|
8567
|
-
const colors =
|
|
8565
|
+
const { box: B, sequence: Q, label: L, margin, gap } = _chunkKNA5HH2Hcjs.LOOK;
|
|
8566
|
+
const colors = _chunkKNA5HH2Hcjs.boxColors.call(void 0, diagram);
|
|
8568
8567
|
const listed = _nullishCoalesce(_optionalChain([diagram, 'access', _152 => _152.sequence, 'optionalAccess', _153 => _153.lifelines]), () => ( []));
|
|
8569
8568
|
const order = [...listed, ...diagram.boxes.map((b) => b.id).filter((id) => !listed.includes(id))];
|
|
8570
8569
|
const column = new Map(order.map((id, i) => [id, i]));
|
|
8571
|
-
const widths = order.map((id) =>
|
|
8570
|
+
const widths = order.map((id) => _chunkKNA5HH2Hcjs.boxWidth.call(void 0, diagram, id, false));
|
|
8572
8571
|
const spacing = widths.slice(1).map((w, i) => widths[i] / 2 + w / 2 + Q.columnGap);
|
|
8573
8572
|
const needs = [];
|
|
8574
8573
|
for (const step of diagram.steps) {
|
|
@@ -8576,7 +8575,7 @@ function layoutSequence(diagram) {
|
|
|
8576
8575
|
if (event2.type !== "edge" || event2.label === void 0) continue;
|
|
8577
8576
|
const a = _nullishCoalesce(column.get(event2.from), () => ( 0));
|
|
8578
8577
|
const b = _nullishCoalesce(column.get(event2.to), () => ( 0));
|
|
8579
|
-
const w =
|
|
8578
|
+
const w = _chunkKNA5HH2Hcjs.textWidth.call(void 0, event2.label, _chunkKNA5HH2Hcjs.labelStyle.call(void 0, event2.label)) + L.padX * 2;
|
|
8580
8579
|
if (a === b) {
|
|
8581
8580
|
if (a < spacing.length) needs.push({ from: a, to: a + 1, need: Q.selfW + L.side + w + Q.labelRoom });
|
|
8582
8581
|
} else {
|
|
@@ -8631,8 +8630,8 @@ function layoutSequence(diagram) {
|
|
|
8631
8630
|
above = named && side2 === "above" ? Q.labelOffset + L.h / 2 : gap;
|
|
8632
8631
|
under = self ? Q.selfH + gap : named && side2 === "below" ? Q.labelOffset + L.h / 2 : gap;
|
|
8633
8632
|
} else {
|
|
8634
|
-
above =
|
|
8635
|
-
under =
|
|
8633
|
+
above = _chunkKNA5HH2Hcjs.LOOK.action.h / 2;
|
|
8634
|
+
under = _chunkKNA5HH2Hcjs.LOOK.action.h / 2;
|
|
8636
8635
|
}
|
|
8637
8636
|
y = first ? y + above : y + Math.max(Q.minPitch, below + Q.rowGap + above) + (e === 0 && s > 0 ? Q.stepGap : 0);
|
|
8638
8637
|
first = false;
|
|
@@ -8645,15 +8644,15 @@ function layoutSequence(diagram) {
|
|
|
8645
8644
|
[xf, y],
|
|
8646
8645
|
[xf + Q.selfW, y],
|
|
8647
8646
|
[xf + Q.selfW, y + Q.selfH],
|
|
8648
|
-
[xf +
|
|
8647
|
+
[xf + _chunkKNA5HH2Hcjs.LOOK.edge.inset, y + Q.selfH]
|
|
8649
8648
|
] : [
|
|
8650
8649
|
[xf, y],
|
|
8651
|
-
[xt - dir *
|
|
8650
|
+
[xt - dir * _chunkKNA5HH2Hcjs.LOOK.edge.inset, y]
|
|
8652
8651
|
];
|
|
8653
|
-
const color =
|
|
8652
|
+
const color = _chunkKNA5HH2Hcjs.edgeColor.call(void 0, event2, colors);
|
|
8654
8653
|
const seats = {};
|
|
8655
8654
|
if (event2.carry.kind !== "none") {
|
|
8656
|
-
const reach =
|
|
8655
|
+
const reach = _chunkKNA5HH2Hcjs.LOOK.slot.lifeline + _chunkKNA5HH2Hcjs.carrierHalf.call(void 0, event2.carry)[0];
|
|
8657
8656
|
const [p0, p1] = points;
|
|
8658
8657
|
const [q0, q1] = points.slice(-2);
|
|
8659
8658
|
const out = Math.sign(p1[0] - p0[0]) || 1;
|
|
@@ -8675,27 +8674,27 @@ function layoutSequence(diagram) {
|
|
|
8675
8674
|
}
|
|
8676
8675
|
} else {
|
|
8677
8676
|
const x = xs[_nullishCoalesce(column.get(event2.box), () => ( 0))];
|
|
8678
|
-
const w =
|
|
8679
|
-
actions.push({ step: s, event: e, box: event2.box, text: event2.label, color: _nullishCoalesce(colors.get(event2.box), () => ( "slate")), x: x +
|
|
8677
|
+
const w = _chunkKNA5HH2Hcjs.textWidth.call(void 0, event2.label, _chunkKNA5HH2Hcjs.TYPE.action) + _chunkKNA5HH2Hcjs.LOOK.action.padX * 2;
|
|
8678
|
+
actions.push({ step: s, event: e, box: event2.box, text: event2.label, color: _nullishCoalesce(colors.get(event2.box), () => ( "slate")), x: x + _chunkKNA5HH2Hcjs.LOOK.badge.r + 4, y: y - _chunkKNA5HH2Hcjs.LOOK.action.h / 2, w, h: _chunkKNA5HH2Hcjs.LOOK.action.h });
|
|
8680
8679
|
}
|
|
8681
8680
|
});
|
|
8682
8681
|
});
|
|
8683
8682
|
const bottom = (first ? headBottom : y + below) + Q.tail;
|
|
8684
8683
|
const lifelines = order.map((id, i) => ({ id, x: xs[i], y1: headBottom, y2: bottom }));
|
|
8685
|
-
const early =
|
|
8684
|
+
const early = _chunkKNA5HH2Hcjs.lineBadges.call(void 0, edges, diagram.steps.length);
|
|
8686
8685
|
const labels = [];
|
|
8687
8686
|
for (const request of requests) {
|
|
8688
|
-
const seen = [...early].filter(([s]) => s <= request.step).map(([, b]) =>
|
|
8687
|
+
const seen = [...early].filter(([s]) => s <= request.step).map(([, b]) => _chunkKNA5HH2Hcjs.badgeRect.call(void 0, b.point));
|
|
8689
8688
|
const soft = [...labels.filter((l) => l.step === request.step), ...actions];
|
|
8690
|
-
labels.push(
|
|
8689
|
+
labels.push(_chunkKNA5HH2Hcjs.placeLabel.call(void 0, request, { hard: boxes, soft, touch: seen }));
|
|
8691
8690
|
}
|
|
8692
8691
|
const layout = { kind: "sequence", width: 0, height: 0, regions: [], boxes, lifelines, edges, labels, actions, badges: [], paths: [], ends: [] };
|
|
8693
8692
|
const lefts = [...boxes.map((b) => b.x), ...labels.map((l) => l.x), ...actions.map((a) => a.x)];
|
|
8694
8693
|
const shift = Math.max(0, margin - Math.min(...lefts));
|
|
8695
|
-
if (shift > 0)
|
|
8694
|
+
if (shift > 0) _chunkKNA5HH2Hcjs.shiftContent.call(void 0, layout, shift, 0);
|
|
8696
8695
|
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]))];
|
|
8697
|
-
const width = Math.max(Math.max(...rights) + margin,
|
|
8698
|
-
const strip2 =
|
|
8696
|
+
const width = Math.max(Math.max(...rights) + margin, _chunkKNA5HH2Hcjs.stripNeed.call(void 0, diagram) + margin * 2);
|
|
8697
|
+
const strip2 = _chunkKNA5HH2Hcjs.layoutStrip.call(void 0, diagram, margin, bottom + gap, width - margin * 2);
|
|
8699
8698
|
layout.width = width;
|
|
8700
8699
|
layout.height = (strip2 ? strip2.y + strip2.h : bottom) + margin;
|
|
8701
8700
|
if (strip2) layout.strip = strip2;
|
|
@@ -8703,29 +8702,29 @@ function layoutSequence(diagram) {
|
|
|
8703
8702
|
return layout;
|
|
8704
8703
|
}
|
|
8705
8704
|
function badges(diagram, layout) {
|
|
8706
|
-
const lines =
|
|
8705
|
+
const lines = _chunkKNA5HH2Hcjs.lineBadges.call(void 0, layout.edges, diagram.steps.length);
|
|
8707
8706
|
const placed = diagram.steps.map((step, s) => {
|
|
8708
8707
|
const line2 = lines.get(s);
|
|
8709
8708
|
if (line2) return { step: s, x: line2.point[0], y: line2.point[1], color: line2.edge.color };
|
|
8710
8709
|
const action2 = layout.actions.find((a) => a.step === s);
|
|
8711
8710
|
const lifeline2 = action2 && layout.lifelines.find((l) => l.id === action2.box);
|
|
8712
8711
|
if (action2 && lifeline2) return { step: s, x: lifeline2.x, y: action2.y + action2.h / 2, color: action2.color };
|
|
8713
|
-
return
|
|
8712
|
+
return _chunkKNA5HH2Hcjs.cornerBadge.call(void 0, step.events, s, layout);
|
|
8714
8713
|
});
|
|
8715
|
-
return
|
|
8714
|
+
return _chunkKNA5HH2Hcjs.replaceSameSpot.call(void 0, placed);
|
|
8716
8715
|
}
|
|
8717
8716
|
|
|
8718
8717
|
// src/timeline.ts
|
|
8719
|
-
var LINEUP_LENGTH = { line:
|
|
8718
|
+
var LINEUP_LENGTH = { line: _chunkKNA5HH2Hcjs.MOTION.lineup.slide, seal: _chunkKNA5HH2Hcjs.MOTION.lineup.seal, open: _chunkKNA5HH2Hcjs.MOTION.fade, pick: _chunkKNA5HH2Hcjs.MOTION.fade, stamp: _chunkKNA5HH2Hcjs.MOTION.popFade };
|
|
8720
8719
|
function plan(step, needle) {
|
|
8721
8720
|
const out = { edges: [], events: [], busy: 0 };
|
|
8722
|
-
let cursor =
|
|
8721
|
+
let cursor = _chunkKNA5HH2Hcjs.MOTION.edgeAt;
|
|
8723
8722
|
let arrived;
|
|
8724
8723
|
let changes = 0;
|
|
8725
8724
|
let settled = Number.NEGATIVE_INFINITY;
|
|
8726
8725
|
const line2 = (e, event2, a) => {
|
|
8727
8726
|
const carries = event2.carry.kind !== "none";
|
|
8728
|
-
const b = a + (carries ?
|
|
8727
|
+
const b = a + (carries ? _chunkKNA5HH2Hcjs.MOTION.drawCarry : _chunkKNA5HH2Hcjs.MOTION.draw);
|
|
8729
8728
|
out.edges.push({ event: e, a, b, carries, coin: event2.carry.kind === "coin", named: event2.label !== void 0 });
|
|
8730
8729
|
out.busy = Math.max(out.busy, b);
|
|
8731
8730
|
return b;
|
|
@@ -8736,14 +8735,14 @@ function plan(step, needle) {
|
|
|
8736
8735
|
const pulled = (event2) => event2.type === "edge" && event2.at !== void 0 && event2.at >= p0 && event2.at < p1;
|
|
8737
8736
|
step.events.forEach((event2, e) => {
|
|
8738
8737
|
if (needle && e === _optionalChain([nows, 'access', _158 => _158[0], 'optionalAccess', _159 => _159.e])) {
|
|
8739
|
-
let t = Math.max(cursor, settled +
|
|
8738
|
+
let t = Math.max(cursor, settled + _chunkKNA5HH2Hcjs.MOTION.change);
|
|
8740
8739
|
const keys = [[t, p0]];
|
|
8741
8740
|
const passed = [];
|
|
8742
8741
|
for (let u = p0; u < p1; u++) {
|
|
8743
8742
|
const entry = t;
|
|
8744
8743
|
const lines = step.events.flatMap((ev, k) => pulled(ev) && ev.at === u ? [{ k, ev }] : []);
|
|
8745
|
-
const done = lines.reduce((latest, l, j) => Math.max(latest, line2(l.k, l.ev, entry +
|
|
8746
|
-
const end = Math.max(entry + needle.speed, lines.length > 0 ? done +
|
|
8744
|
+
const done = lines.reduce((latest, l, j) => Math.max(latest, line2(l.k, l.ev, entry + _chunkKNA5HH2Hcjs.MOTION.stagger * j)), entry);
|
|
8745
|
+
const end = Math.max(entry + needle.speed, lines.length > 0 ? done + _chunkKNA5HH2Hcjs.MOTION.time.wait : entry);
|
|
8747
8746
|
if (end - needle.speed > entry + 1e-9) keys.push([end - needle.speed, u]);
|
|
8748
8747
|
keys.push([end, u + 1]);
|
|
8749
8748
|
passed.push({ unit: u, at: end });
|
|
@@ -8751,7 +8750,7 @@ function plan(step, needle) {
|
|
|
8751
8750
|
}
|
|
8752
8751
|
out.sweep = { keys, passed };
|
|
8753
8752
|
out.busy = Math.max(out.busy, t);
|
|
8754
|
-
cursor = t +
|
|
8753
|
+
cursor = t + _chunkKNA5HH2Hcjs.MOTION.time.after;
|
|
8755
8754
|
arrived = t;
|
|
8756
8755
|
changes = 0;
|
|
8757
8756
|
return;
|
|
@@ -8761,7 +8760,7 @@ function plan(step, needle) {
|
|
|
8761
8760
|
const a = cursor;
|
|
8762
8761
|
const b = a + LINEUP_LENGTH[event2.type];
|
|
8763
8762
|
out.edges.push({ event: e, a, b, carries: false, coin: false, named: false });
|
|
8764
|
-
cursor = a +
|
|
8763
|
+
cursor = a + _chunkKNA5HH2Hcjs.MOTION.lineup.stagger;
|
|
8765
8764
|
arrived = b;
|
|
8766
8765
|
changes = 0;
|
|
8767
8766
|
out.busy = Math.max(out.busy, b);
|
|
@@ -8769,24 +8768,24 @@ function plan(step, needle) {
|
|
|
8769
8768
|
}
|
|
8770
8769
|
if (event2.type === "commit" || event2.type === "branch" || event2.type === "leaf" || event2.type === "node") {
|
|
8771
8770
|
const a = cursor;
|
|
8772
|
-
const b = a +
|
|
8771
|
+
const b = a + _chunkKNA5HH2Hcjs.MOTION.draw;
|
|
8773
8772
|
out.edges.push({ event: e, a, b, carries: false, coin: false, named: false });
|
|
8774
|
-
cursor = a +
|
|
8773
|
+
cursor = a + _chunkKNA5HH2Hcjs.MOTION.stagger;
|
|
8775
8774
|
arrived = b;
|
|
8776
8775
|
changes = 0;
|
|
8777
8776
|
out.busy = Math.max(out.busy, b);
|
|
8778
8777
|
} else if (event2.type === "edge") {
|
|
8779
8778
|
const a = cursor;
|
|
8780
8779
|
arrived = line2(e, event2, a);
|
|
8781
|
-
cursor = a +
|
|
8780
|
+
cursor = a + _chunkKNA5HH2Hcjs.MOTION.stagger;
|
|
8782
8781
|
changes = 0;
|
|
8783
8782
|
} else if (event2.type === "action") {
|
|
8784
8783
|
out.events.push({ event: e, at: cursor });
|
|
8785
|
-
out.busy = Math.max(out.busy, cursor +
|
|
8786
|
-
cursor +=
|
|
8784
|
+
out.busy = Math.max(out.busy, cursor + _chunkKNA5HH2Hcjs.MOTION.action);
|
|
8785
|
+
cursor += _chunkKNA5HH2Hcjs.MOTION.action;
|
|
8787
8786
|
changes = 0;
|
|
8788
8787
|
} else {
|
|
8789
|
-
const at = (_nullishCoalesce(arrived, () => ( cursor))) +
|
|
8788
|
+
const at = (_nullishCoalesce(arrived, () => ( cursor))) + _chunkKNA5HH2Hcjs.MOTION.change * changes++;
|
|
8790
8789
|
out.events.push({ event: e, at });
|
|
8791
8790
|
out.busy = Math.max(out.busy, at);
|
|
8792
8791
|
settled = Math.max(settled, at);
|
|
@@ -8797,7 +8796,7 @@ function plan(step, needle) {
|
|
|
8797
8796
|
}
|
|
8798
8797
|
function buildTimeline(diagram, still = false) {
|
|
8799
8798
|
const time = diagram.kind === "time" ? diagram.time : void 0;
|
|
8800
|
-
const T =
|
|
8799
|
+
const T = _chunkKNA5HH2Hcjs.MOTION.time;
|
|
8801
8800
|
const speed = time ? Math.min(T.unitMax, Math.max(T.unitMin, T.axis / Math.max(1, time.scale.count))) : 0;
|
|
8802
8801
|
let at = 0;
|
|
8803
8802
|
const plans = diagram.steps.map((step) => {
|
|
@@ -8807,16 +8806,16 @@ function buildTimeline(diagram, still = false) {
|
|
|
8807
8806
|
return p;
|
|
8808
8807
|
});
|
|
8809
8808
|
const steps = [];
|
|
8810
|
-
let t =
|
|
8809
|
+
let t = _chunkKNA5HH2Hcjs.MOTION.intro;
|
|
8811
8810
|
diagram.steps.forEach((step, s) => {
|
|
8812
|
-
const read = Math.min(
|
|
8813
|
-
const length = Math.max(read, (_nullishCoalesce(_optionalChain([plans, 'access', _164 => _164[s], 'optionalAccess', _165 => _165.busy]), () => ( 0))) +
|
|
8811
|
+
const read = Math.min(_chunkKNA5HH2Hcjs.MOTION.stepMax, Math.max(_chunkKNA5HH2Hcjs.MOTION.stepMin, _chunkKNA5HH2Hcjs.MOTION.stepBase + [...step.body].length * _chunkKNA5HH2Hcjs.MOTION.perChar));
|
|
8812
|
+
const length = Math.max(read, (_nullishCoalesce(_optionalChain([plans, 'access', _164 => _164[s], 'optionalAccess', _165 => _165.busy]), () => ( 0))) + _chunkKNA5HH2Hcjs.MOTION.dwell);
|
|
8814
8813
|
steps.push({ start: t, end: t + length });
|
|
8815
8814
|
t += length;
|
|
8816
8815
|
});
|
|
8817
8816
|
const end = t;
|
|
8818
|
-
const total = Math.ceil(end +
|
|
8819
|
-
const last = total -
|
|
8817
|
+
const total = Math.ceil(end + _chunkKNA5HH2Hcjs.MOTION.outro);
|
|
8818
|
+
const last = total - _chunkKNA5HH2Hcjs.MOTION.tail;
|
|
8820
8819
|
const lastSpan = steps[steps.length - 1];
|
|
8821
8820
|
const whole = still && lastSpan ? { start: lastSpan.start + (_nullishCoalesce(_optionalChain([plans, 'access', _166 => _166[plans.length - 1], 'optionalAccess', _167 => _167.busy]), () => ( 0))), end: last } : void 0;
|
|
8822
8821
|
const faint = _nullishCoalesce(_optionalChain([whole, 'optionalAccess', _168 => _168.start]), () => ( last));
|
|
@@ -8833,7 +8832,7 @@ function buildTimeline(diagram, still = false) {
|
|
|
8833
8832
|
const event2 = _optionalChain([diagram, 'access', _169 => _169.steps, 'access', _170 => _170[s], 'optionalAccess', _171 => _171.events, 'access', _172 => _172[edge2.event]]);
|
|
8834
8833
|
const own = diagram.kind === "git" && _optionalChain([event2, 'optionalAccess', _173 => _173.type]) === "edge" && event2.carry.kind === "tag" && event2.carry.text === event2.from;
|
|
8835
8834
|
if (edge2.carries && !own) departures.push({ step: s, event: edge2.event, who: edge2.coin ? "coin" : "main", a, b: span.start + edge2.b });
|
|
8836
|
-
if (edge2.named) named.push({ step: s, event: edge2.event, start: a +
|
|
8835
|
+
if (edge2.named) named.push({ step: s, event: edge2.event, start: a + _chunkKNA5HH2Hcjs.MOTION.labelDelay, end: span.end });
|
|
8837
8836
|
}
|
|
8838
8837
|
named.forEach((label2, k) => {
|
|
8839
8838
|
const later = named[k + 2];
|
|
@@ -8887,7 +8886,7 @@ function buildTimeline(diagram, still = false) {
|
|
|
8887
8886
|
labels,
|
|
8888
8887
|
badges: steps.map((span, s) => ({ step: s, appears: span.start })),
|
|
8889
8888
|
events,
|
|
8890
|
-
stills: steps.map((span) => span.end -
|
|
8889
|
+
stills: steps.map((span) => span.end - _chunkKNA5HH2Hcjs.MOTION.still),
|
|
8891
8890
|
...whole ? { whole } : {},
|
|
8892
8891
|
...states ? { states } : {},
|
|
8893
8892
|
...time ? { needle, units, meters: meterTimes(diagram, plans, steps) } : {}
|
|
@@ -8901,7 +8900,7 @@ function meterTimes(diagram, plans, steps) {
|
|
|
8901
8900
|
plans.forEach((p, s) => {
|
|
8902
8901
|
const start = steps[s].start;
|
|
8903
8902
|
const sets = (_nullishCoalesce(_optionalChain([diagram, 'access', _185 => _185.steps, 'access', _186 => _186[s], 'optionalAccess', _187 => _187.events]), () => ( []))).flatMap((event2, e) => {
|
|
8904
|
-
const ratio = event2.type === "strip" && event2.field === field2 && event2.value !== void 0 ?
|
|
8903
|
+
const ratio = event2.type === "strip" && event2.field === field2 && event2.value !== void 0 ? _chunkKNA5HH2Hcjs.ratioOf.call(void 0, event2.value) : void 0;
|
|
8905
8904
|
return ratio === void 0 ? [] : [{ e, ratio }];
|
|
8906
8905
|
});
|
|
8907
8906
|
const set = sets[sets.length - 1];
|
|
@@ -8917,21 +8916,21 @@ function meterTimes(diagram, plans, steps) {
|
|
|
8917
8916
|
if (boundary > 0 && boundary >= p0) {
|
|
8918
8917
|
const tb = start + (_nullishCoalesce(_optionalChain([sweep, 'access', _190 => _190.find, 'call', _191 => _191(([, position]) => position === boundary), 'optionalAccess', _192 => _192[0]]), () => ( first[0])));
|
|
8919
8918
|
const prev = keys[keys.length - 1][0];
|
|
8920
|
-
keys.push([Math.max(prev, tb -
|
|
8919
|
+
keys.push([Math.max(prev, tb - _chunkKNA5HH2Hcjs.MOTION.time.reset), value2], [tb, 0]);
|
|
8921
8920
|
base = 0;
|
|
8922
8921
|
from = boundary;
|
|
8923
8922
|
}
|
|
8924
8923
|
for (const [t, position] of sweep) if (position >= from) keys.push([start + t, base + (set.ratio - base) * (position - from) / (p1 - from)]);
|
|
8925
8924
|
} else {
|
|
8926
8925
|
const at = start + (_nullishCoalesce(_optionalChain([p, 'access', _193 => _193.events, 'access', _194 => _194.find, 'call', _195 => _195((x) => x.event === set.e), 'optionalAccess', _196 => _196.at]), () => ( 0)));
|
|
8927
|
-
keys.push([at, value2], [at +
|
|
8926
|
+
keys.push([at, value2], [at + _chunkKNA5HH2Hcjs.MOTION.fade, set.ratio]);
|
|
8928
8927
|
}
|
|
8929
8928
|
value2 = set.ratio;
|
|
8930
8929
|
});
|
|
8931
8930
|
return { field: field2, keys };
|
|
8932
8931
|
});
|
|
8933
8932
|
}
|
|
8934
|
-
var isEnd = (id) =>
|
|
8933
|
+
var isEnd = (id) => _chunkKNA5HH2Hcjs.STATE_ENDS.includes(id);
|
|
8935
8934
|
function stateTimes(diagram, edges, last) {
|
|
8936
8935
|
const times = /* @__PURE__ */ new Map();
|
|
8937
8936
|
const of = (box) => {
|
|
@@ -8946,7 +8945,7 @@ function stateTimes(diagram, edges, last) {
|
|
|
8946
8945
|
if (on) {
|
|
8947
8946
|
const left = of(on.box);
|
|
8948
8947
|
left.lit.push({ start: on.since, end: edge2.start });
|
|
8949
|
-
if (on.box === event2.from && left.done === void 0) left.done = edge2.start +
|
|
8948
|
+
if (on.box === event2.from && left.done === void 0) left.done = edge2.start + _chunkKNA5HH2Hcjs.MOTION.done;
|
|
8950
8949
|
on = void 0;
|
|
8951
8950
|
}
|
|
8952
8951
|
if (!isEnd(event2.to)) on = { box: event2.to, since: edge2.drawn };
|
|
@@ -8992,33 +8991,33 @@ var Motion = (_class = class {
|
|
|
8992
8991
|
}
|
|
8993
8992
|
/** `a` で出て `b` から消える。`within` を立てると `b` までに消え終わる。 */
|
|
8994
8993
|
vis(a, b = this.last, o = {}) {
|
|
8995
|
-
const f = _nullishCoalesce(o.f, () => (
|
|
8994
|
+
const f = _nullishCoalesce(o.f, () => ( _chunkKNA5HH2Hcjs.MOTION.fade));
|
|
8996
8995
|
const on = _nullishCoalesce(o.on, () => ( {}));
|
|
8997
8996
|
const off = _nullishCoalesce(o.off, () => ( {}));
|
|
8998
8997
|
const out = o.within ? Math.max(a + f, b - f) : b;
|
|
8999
8998
|
return this.kf([
|
|
9000
8999
|
[0, { opacity: 0, ...off }],
|
|
9001
|
-
[a, { opacity: 0, ...off }, _nullishCoalesce(o.ein, () => (
|
|
9000
|
+
[a, { opacity: 0, ...off }, _nullishCoalesce(o.ein, () => ( _chunkKNA5HH2Hcjs.EASE.out))],
|
|
9002
9001
|
[a + f, { opacity: 1, ...on }],
|
|
9003
|
-
[out, { opacity: 1, ...on },
|
|
9002
|
+
[out, { opacity: 1, ...on }, _chunkKNA5HH2Hcjs.EASE.inOut],
|
|
9004
9003
|
[Math.min(out + f, this.total), { opacity: 0, ...off }],
|
|
9005
9004
|
[this.total, { opacity: 0, ...off }]
|
|
9006
9005
|
]);
|
|
9007
9006
|
}
|
|
9008
9007
|
/** 少し下から浮いて出る。 */
|
|
9009
9008
|
rise(a, b = this.last, within = false) {
|
|
9010
|
-
return this.vis(a, b, { on: { transform: "translateY(0)" }, off: { transform: `translateY(${
|
|
9009
|
+
return this.vis(a, b, { on: { transform: "translateY(0)" }, off: { transform: `translateY(${_chunkKNA5HH2Hcjs.LOOK.rise}px)` }, within });
|
|
9011
9010
|
}
|
|
9012
9011
|
/** 小さな所から弾んで出る。 */
|
|
9013
9012
|
pop(a, b = this.last) {
|
|
9014
|
-
return this.vis(a, b, { f:
|
|
9013
|
+
return this.vis(a, b, { f: _chunkKNA5HH2Hcjs.MOTION.popFade, ein: _chunkKNA5HH2Hcjs.EASE.pop, on: { transform: "scale(1)" }, off: { transform: `scale(${_chunkKNA5HH2Hcjs.LOOK.popFrom})` } });
|
|
9015
9014
|
}
|
|
9016
9015
|
/** 初めから出ていて `b` で消える。 */
|
|
9017
9016
|
until(b) {
|
|
9018
|
-
const f =
|
|
9017
|
+
const f = _chunkKNA5HH2Hcjs.MOTION.untilFade;
|
|
9019
9018
|
return this.kf([
|
|
9020
9019
|
[0, { opacity: 1 }],
|
|
9021
|
-
[b, { opacity: 1 },
|
|
9020
|
+
[b, { opacity: 1 }, _chunkKNA5HH2Hcjs.EASE.inOut],
|
|
9022
9021
|
[b + f, { opacity: 0 }],
|
|
9023
9022
|
[this.last, { opacity: 0 }],
|
|
9024
9023
|
[this.total, { opacity: 1 }]
|
|
@@ -9050,8 +9049,8 @@ var isTimeLayout = (layout) => layout.kind === "time";
|
|
|
9050
9049
|
var isTreeLayout = (layout) => layout.kind === "tree";
|
|
9051
9050
|
var font = (t) => `font:${t.weight} ${t.size}px var(--${t.family})`;
|
|
9052
9051
|
var mix = (pct, base = "var(--surf)") => `color-mix(in srgb,var(--c) ${pct}%,${base})`;
|
|
9053
|
-
var S =
|
|
9054
|
-
var X =
|
|
9052
|
+
var S = _chunkKNA5HH2Hcjs.LOOK.stroke;
|
|
9053
|
+
var X = _chunkKNA5HH2Hcjs.LOOK.mix;
|
|
9055
9054
|
var PAST = `color-mix(in srgb,var(--mute) ${X.past}%,var(--bg))`;
|
|
9056
9055
|
var PART_CSS = [
|
|
9057
9056
|
".dg{display:block;width:100%;height:auto;overflow:visible}",
|
|
@@ -9060,83 +9059,83 @@ var PART_CSS = [
|
|
|
9060
9059
|
".dg-bg{fill:var(--bg)}",
|
|
9061
9060
|
".dg-band{fill:color-mix(in srgb,var(--c) var(--tint),var(--bg));stroke:color-mix(in srgb,var(--c) var(--edge),transparent)}",
|
|
9062
9061
|
`.dg-bi{fill:${mix(X.regionIcon)};stroke:${mix(X.regionIconEdge, "transparent")}}`,
|
|
9063
|
-
`.dg-bz{${font(
|
|
9064
|
-
`.dg-bx{${font(
|
|
9062
|
+
`.dg-bz{${font(_chunkKNA5HH2Hcjs.TYPE.regionName)};fill:var(--ct)}`,
|
|
9063
|
+
`.dg-bx{${font(_chunkKNA5HH2Hcjs.TYPE.regionNote)};fill:var(--mute)}`,
|
|
9065
9064
|
".dg-st{fill:var(--surf);stroke:var(--hair)}",
|
|
9066
9065
|
`.dg-halo{fill:none;stroke:var(--c);stroke-width:${S.halo};stroke-opacity:.16}`,
|
|
9067
9066
|
`.dg-on{fill:none;stroke:var(--c);stroke-width:${S.on}}`,
|
|
9068
9067
|
`.dg-ic{fill:${mix(X.icon)}}`,
|
|
9069
9068
|
`.dg-slot{fill:none;stroke:${mix(X.slot, "transparent")};stroke-width:${S.slot};stroke-dasharray:3 3}`,
|
|
9070
9069
|
`.dg-gl{fill:none;stroke:var(--c);stroke-width:${S.glyph};stroke-linecap:round;stroke-linejoin:round}`,
|
|
9071
|
-
`.dg-sn{${font(
|
|
9072
|
-
`.dg-ss{${font(
|
|
9073
|
-
`.dg-ss-ok{${font(
|
|
9074
|
-
`.dg-ss-act{${font(
|
|
9070
|
+
`.dg-sn{${font(_chunkKNA5HH2Hcjs.TYPE.boxName)};fill:var(--ink)}`,
|
|
9071
|
+
`.dg-ss{${font(_chunkKNA5HH2Hcjs.TYPE.boxSub)};fill:var(--mute)}`,
|
|
9072
|
+
`.dg-ss-ok{${font(_chunkKNA5HH2Hcjs.TYPE.boxSubStrong)};fill:var(--ct)}`,
|
|
9073
|
+
`.dg-ss-act{${font(_chunkKNA5HH2Hcjs.TYPE.boxSubStrong)};fill:var(--ink)}`,
|
|
9075
9074
|
`.dg-ll{stroke:var(--line);stroke-width:${S.lifeline};stroke-dasharray:3 4}`,
|
|
9076
|
-
`.dg-e{fill:none;stroke:var(--line);stroke-width:${S.edge};stroke-linecap:round;stroke-dasharray:0 ${
|
|
9075
|
+
`.dg-e{fill:none;stroke:var(--line);stroke-width:${S.edge};stroke-linecap:round;stroke-dasharray:0 ${_chunkKNA5HH2Hcjs.LOOK.edge.ghostDash}}`,
|
|
9077
9076
|
`.dg-eh{fill:none;stroke:var(--line);stroke-width:${S.arrow};stroke-linecap:round;stroke-linejoin:round}`,
|
|
9078
9077
|
`.dg-e-on{fill:none;stroke:var(--c);stroke-width:${S.edgeOn};stroke-linecap:round;stroke-dasharray:1 2}`,
|
|
9079
9078
|
`.dg-eh-on{fill:none;stroke:var(--c);stroke-width:${S.edgeOn};stroke-linecap:round;stroke-linejoin:round}`,
|
|
9080
|
-
`.dg-flow{fill:none;stroke:var(--surf);stroke-width:${S.flow};stroke-linecap:round;stroke-dasharray:1.5 ${
|
|
9079
|
+
`.dg-flow{fill:none;stroke:var(--surf);stroke-width:${S.flow};stroke-linecap:round;stroke-dasharray:1.5 ${_chunkKNA5HH2Hcjs.LOOK.edge.flowDash}}`,
|
|
9081
9080
|
`.dg-e-past{fill:none;stroke:${PAST};stroke-width:${S.edge};stroke-linecap:round}`,
|
|
9082
9081
|
`.dg-eh-past{fill:none;stroke:${PAST};stroke-width:${S.arrow};stroke-linecap:round;stroke-linejoin:round}`,
|
|
9083
9082
|
".dg-bd{cursor:pointer}",
|
|
9084
9083
|
".dg-bdf{fill:var(--c)}",
|
|
9085
|
-
`.dg-bdft{${font(
|
|
9084
|
+
`.dg-bdft{${font(_chunkKNA5HH2Hcjs.TYPE.badge)};fill:var(--on-c)}`,
|
|
9086
9085
|
`.dg-bdr{fill:none;stroke:var(--c);stroke-width:${S.badgeRing};pointer-events:none}`,
|
|
9087
9086
|
`.dg-bdp{fill:${mix(X.badgePast)};stroke:${mix(X.badgePastEdge, "transparent")};stroke-width:${S.hair}}`,
|
|
9088
|
-
`.dg-bdpt{${font(
|
|
9087
|
+
`.dg-bdpt{${font(_chunkKNA5HH2Hcjs.TYPE.badge)};fill:var(--ct)}`,
|
|
9089
9088
|
`.dg-bdp-g{fill:var(--surf);stroke:${PAST};stroke-width:${S.hair}}`,
|
|
9090
|
-
`.dg-bdpt-g{${font(
|
|
9089
|
+
`.dg-bdpt-g{${font(_chunkKNA5HH2Hcjs.TYPE.badge)};fill:var(--mute)}`,
|
|
9091
9090
|
`.dg-cap rect,.dg-act rect{fill:${mix(X.cap)};stroke:${mix(X.capEdge, "transparent")}}`,
|
|
9092
|
-
`.dg-cap text{${font(
|
|
9093
|
-
`.dg-capj text{${font(
|
|
9094
|
-
`.dg-cap-past text{${font(
|
|
9095
|
-
`.dg-cap-pastj text{${font(
|
|
9096
|
-
`.dg-act text{${font(
|
|
9091
|
+
`.dg-cap text{${font(_chunkKNA5HH2Hcjs.TYPE.label)};fill:var(--ct)}`,
|
|
9092
|
+
`.dg-capj text{${font(_chunkKNA5HH2Hcjs.TYPE.labelJa)}}`,
|
|
9093
|
+
`.dg-cap-past text{${font(_chunkKNA5HH2Hcjs.TYPE.label)};fill:var(--mute);fill-opacity:${_chunkKNA5HH2Hcjs.LOOK.state.pastLabel}}`,
|
|
9094
|
+
`.dg-cap-pastj text{${font(_chunkKNA5HH2Hcjs.TYPE.labelJa)}}`,
|
|
9095
|
+
`.dg-act text{${font(_chunkKNA5HH2Hcjs.TYPE.action)};fill:var(--ct)}`,
|
|
9097
9096
|
".dg-car{fill:var(--carry,var(--ink))}",
|
|
9098
|
-
`.dg-car-t{${font(
|
|
9099
|
-
`.dg-car-tj{${font(
|
|
9097
|
+
`.dg-car-t{${font(_chunkKNA5HH2Hcjs.TYPE.carrier)};fill:var(--bg)}`,
|
|
9098
|
+
`.dg-car-tj{${font(_chunkKNA5HH2Hcjs.TYPE.carrierJa)}}`,
|
|
9100
9099
|
`.dg-env{fill:var(--carry,var(--ink));stroke:var(--surf);stroke-width:${S.envelope}}`,
|
|
9101
9100
|
`.dg-env-in{fill:none;stroke:var(--surf);stroke-width:${S.flow};stroke-linejoin:round;stroke-linecap:round}`,
|
|
9102
9101
|
".dg-coin{fill:var(--coin);stroke:var(--surf);stroke-width:1.2}",
|
|
9103
9102
|
".dg-coin-in{fill:none;stroke:var(--coinin);stroke-width:1.1}",
|
|
9104
9103
|
".dg-strip{fill:var(--surf);stroke:var(--hair)}",
|
|
9105
9104
|
`.dg-sep{stroke:var(--hair);stroke-width:${S.hair}}`,
|
|
9106
|
-
`.dg-sh{${font(
|
|
9107
|
-
`.dg-fl{${font(
|
|
9108
|
-
`.dg-fv{${font(
|
|
9109
|
-
`.dg-fvj{${font(
|
|
9105
|
+
`.dg-sh{${font(_chunkKNA5HH2Hcjs.TYPE.stripTitle)};fill:var(--ink)}`,
|
|
9106
|
+
`.dg-fl{${font(_chunkKNA5HH2Hcjs.TYPE.fieldName)};fill:var(--mute)}`,
|
|
9107
|
+
`.dg-fv{${font(_chunkKNA5HH2Hcjs.TYPE.fieldValue)};fill:var(--ink)}`,
|
|
9108
|
+
`.dg-fvj{${font(_chunkKNA5HH2Hcjs.TYPE.fieldValueJa)};fill:var(--ink)}`,
|
|
9110
9109
|
".dg-fv-c{fill:var(--ct)}",
|
|
9111
9110
|
".dg-fl-now{fill:var(--c)}",
|
|
9112
9111
|
`.dg-tr-ring{fill:none;stroke:var(--line);stroke-width:${S.trail}}`,
|
|
9113
9112
|
".dg-tr-fill{fill:var(--c)}",
|
|
9114
9113
|
".dg-tg rect{fill:var(--c)}",
|
|
9115
|
-
`.dg-tg text{${font(
|
|
9114
|
+
`.dg-tg text{${font(_chunkKNA5HH2Hcjs.TYPE.tag)};fill:var(--on-c)}`,
|
|
9116
9115
|
`.dg-side{fill:color-mix(in srgb,var(--c) ${X.side}%,var(--bg));stroke:${mix(X.sideEdge, "transparent")};stroke-dasharray:4 4}`,
|
|
9117
|
-
`.dg-side-t{${font(
|
|
9118
|
-
`.dg-side-n{${font(
|
|
9116
|
+
`.dg-side-t{${font(_chunkKNA5HH2Hcjs.TYPE.regionName)};fill:var(--ct)}`,
|
|
9117
|
+
`.dg-side-n{${font(_chunkKNA5HH2Hcjs.TYPE.regionNote)};fill:var(--mute)}`,
|
|
9119
9118
|
`.dg-ghost{fill:var(--surf);stroke:${mix(X.ghostEdge, "transparent")};stroke-dasharray:4 3}`,
|
|
9120
|
-
`.dg-path{fill:none;stroke:${mix(X.path, "transparent")};stroke-width:${S.path};stroke-linecap:round;stroke-dasharray:0 ${
|
|
9119
|
+
`.dg-path{fill:none;stroke:${mix(X.path, "transparent")};stroke-width:${S.path};stroke-linecap:round;stroke-dasharray:0 ${_chunkKNA5HH2Hcjs.LOOK.edge.ghostDash}}`,
|
|
9121
9120
|
`.dg-path-h{fill:none;stroke:${mix(X.path, "transparent")};stroke-width:${S.arrow};stroke-linecap:round;stroke-linejoin:round}`,
|
|
9122
|
-
`.dg-path-t{${font(
|
|
9123
|
-
`.dg-path-tj{${font(
|
|
9121
|
+
`.dg-path-t{${font(_chunkKNA5HH2Hcjs.TYPE.label)};fill:var(--ct)}`,
|
|
9122
|
+
`.dg-path-tj{${font(_chunkKNA5HH2Hcjs.TYPE.labelJa)}}`,
|
|
9124
9123
|
".dg-start{fill:var(--ink)}",
|
|
9125
9124
|
`.dg-end{fill:var(--bg);stroke:var(--ink);stroke-width:${S.end}}`,
|
|
9126
9125
|
".dg-end-in{fill:var(--ink)}",
|
|
9127
9126
|
`.dg-end-x{fill:var(--bg);stroke:${mix(X.path, "transparent")};stroke-width:${S.arrow};stroke-dasharray:2 2.5}`,
|
|
9128
9127
|
`.dg-end-xi{fill:${mix(X.path, "transparent")}}`,
|
|
9129
|
-
`.dg-mark{${font(
|
|
9128
|
+
`.dg-mark{${font(_chunkKNA5HH2Hcjs.TYPE.regionNote)};fill:var(--mute)}`,
|
|
9130
9129
|
`.dg-done{fill:var(--ink);stroke:var(--surf);stroke-width:${S.done}}`,
|
|
9131
9130
|
`.dg-done-ck{fill:none;stroke:var(--surf);stroke-width:${S.glyph};stroke-linecap:round;stroke-linejoin:round}`,
|
|
9132
9131
|
`.dg-git-l{fill:none;stroke:var(--c);stroke-width:${S.git};stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:1 2}`,
|
|
9133
9132
|
`.dg-git-cp{fill:none;stroke:var(--c);stroke-width:${S.gitOrphan};stroke-linecap:round;stroke-dasharray:3 3;stroke-opacity:.7}`,
|
|
9134
9133
|
`.dg-git-c{fill:var(--surf);stroke:var(--c);stroke-width:${S.git}}`,
|
|
9135
|
-
`.dg-git-id{${font(
|
|
9136
|
-
`.dg-git-h{${font(
|
|
9137
|
-
`.dg-git-n{${font(
|
|
9134
|
+
`.dg-git-id{${font(_chunkKNA5HH2Hcjs.TYPE.gitId)};fill:var(--ct)}`,
|
|
9135
|
+
`.dg-git-h{${font(_chunkKNA5HH2Hcjs.TYPE.gitHash)};fill:var(--mute)}`,
|
|
9136
|
+
`.dg-git-n{${font(_chunkKNA5HH2Hcjs.TYPE.gitNote)};fill:var(--ink2)}`,
|
|
9138
9137
|
`.dg-git-old{fill:var(--surf);stroke:var(--c);stroke-width:${S.gitOrphan};stroke-dasharray:3 3;stroke-opacity:.6}`,
|
|
9139
|
-
`.dg-git-oldl{${font(
|
|
9138
|
+
`.dg-git-oldl{${font(_chunkKNA5HH2Hcjs.TYPE.gitId)};fill:var(--ct);opacity:.55}`,
|
|
9140
9139
|
// 木の図 (#3233)。木の線は線の灰で、運ぶ物が通った跡は運ぶ物の色で引く
|
|
9141
9140
|
`.dg-tree-l{fill:none;stroke:var(--line);stroke-width:${S.tree};stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:1 2}`,
|
|
9142
9141
|
`.dg-tree-tr{fill:none;stroke:var(--c);stroke-width:${S.treeTrail};stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:1 2}`,
|
|
@@ -9144,66 +9143,66 @@ var PART_CSS = [
|
|
|
9144
9143
|
`.dg-tree-con{fill:none;stroke:var(--line);stroke-width:${S.treeCon};stroke-linecap:round;stroke-dasharray:2 3.5}`,
|
|
9145
9144
|
`.dg-tree-card{fill:var(--surf);stroke:var(--hair);stroke-width:${S.hair}}`,
|
|
9146
9145
|
`.dg-tree-cg{fill:none;stroke:var(--mute);stroke-width:${S.glyph};stroke-linecap:round;stroke-linejoin:round}`,
|
|
9147
|
-
`.dg-tree-ct{${font(
|
|
9148
|
-
`.dg-tree-hash{${font(
|
|
9149
|
-
`.dg-tree-name{${font(
|
|
9150
|
-
`.dg-tree-one{${font(
|
|
9151
|
-
`.dg-tree-rh{${font(
|
|
9152
|
-
`.dg-tree-rn{${font(
|
|
9146
|
+
`.dg-tree-ct{${font(_chunkKNA5HH2Hcjs.TYPE.treeCard)};fill:var(--ink)}`,
|
|
9147
|
+
`.dg-tree-hash{${font(_chunkKNA5HH2Hcjs.TYPE.treeHash)};fill:var(--ink)}`,
|
|
9148
|
+
`.dg-tree-name{${font(_chunkKNA5HH2Hcjs.TYPE.treeName)};fill:var(--mute)}`,
|
|
9149
|
+
`.dg-tree-one{${font(_chunkKNA5HH2Hcjs.TYPE.boxName)};fill:var(--ink)}`,
|
|
9150
|
+
`.dg-tree-rh{${font(_chunkKNA5HH2Hcjs.TYPE.rootHash)};fill:var(--ink)}`,
|
|
9151
|
+
`.dg-tree-rn{${font(_chunkKNA5HH2Hcjs.TYPE.rootName)};fill:var(--mute)}`,
|
|
9153
9152
|
// 列の図 (#3239)。封は列の左端から右へ伸びる
|
|
9154
9153
|
".dg-ln-chip{fill:var(--c)}",
|
|
9155
9154
|
`.dg-ln-plain{fill:color-mix(in srgb,var(--mute) ${X.chipPlain}%,var(--surf))}`,
|
|
9156
|
-
`.dg-ln-t{${font(
|
|
9157
|
-
`.dg-ln-tp{${font(
|
|
9155
|
+
`.dg-ln-t{${font(_chunkKNA5HH2Hcjs.TYPE.chip)};fill:var(--on-c)}`,
|
|
9156
|
+
`.dg-ln-tp{${font(_chunkKNA5HH2Hcjs.TYPE.chip)};fill:var(--ink)}`,
|
|
9158
9157
|
".dg-ln-seal{transform-box:fill-box;transform-origin:0 50%}",
|
|
9159
9158
|
`.dg-ln-sd{fill:color-mix(in srgb,var(--mute) ${X.sealDark}%,var(--surf))}`,
|
|
9160
9159
|
`.dg-ln-sl{fill:color-mix(in srgb,var(--mute) ${X.sealLight}%,var(--surf))}`,
|
|
9161
9160
|
`.dg-ln-stamp{fill:var(--surf);stroke:var(--c);stroke-width:${S.stamp}}`,
|
|
9162
|
-
`.dg-ln-st{${font(
|
|
9161
|
+
`.dg-ln-st{${font(_chunkKNA5HH2Hcjs.TYPE.stamp)};fill:var(--ct)}`,
|
|
9163
9162
|
// 時間軸の図 (#3165)。和文を含む字は、末尾に j を付けた class で同じ大きさと太さの和文の字にする
|
|
9164
9163
|
`.dg-tm-ep{fill:color-mix(in srgb,var(--ink) ${X.timeShade}%,transparent)}`,
|
|
9165
9164
|
`.dg-tm-sep{stroke:var(--hair);stroke-width:${S.hair};stroke-dasharray:2 4}`,
|
|
9166
|
-
`.dg-tm-hd{${font(
|
|
9167
|
-
`.dg-tm-hdj{${font(
|
|
9165
|
+
`.dg-tm-hd{${font(_chunkKNA5HH2Hcjs.TYPE.timeHead)};fill:var(--ink)}`,
|
|
9166
|
+
`.dg-tm-hdj{${font(_chunkO7RQ6R54cjs.sansOf.call(void 0, _chunkKNA5HH2Hcjs.TYPE.timeHead))}}`,
|
|
9168
9167
|
`.dg-tm-slot{fill:none;stroke:var(--line);stroke-width:${S.timeSlot};opacity:.55}`,
|
|
9169
9168
|
".dg-tm-m{fill:var(--c)}",
|
|
9170
9169
|
".dg-tm-x{fill:var(--c-slate)}",
|
|
9171
9170
|
`.dg-tm-fr{fill:none;stroke:var(--c-blue);stroke-width:${S.timeFrame};stroke-dasharray:3 2}`,
|
|
9172
9171
|
`.dg-tm-gd{fill:none;stroke:color-mix(in srgb,var(--c-blue) ${X.timeGuide}%,transparent);stroke-width:${S.hair};stroke-dasharray:2 3}`,
|
|
9173
9172
|
`.dg-tm-ax{fill:none;stroke:var(--line);stroke-width:${S.timeAxis}}`,
|
|
9174
|
-
`.dg-tm-tk{${font(
|
|
9175
|
-
`.dg-tm-tkj{${font(
|
|
9176
|
-
`.dg-tm-en{${font(
|
|
9177
|
-
`.dg-tm-er{${font(
|
|
9178
|
-
`.dg-tm-erj{${font(
|
|
9179
|
-
`.dg-tm-rn{${font(
|
|
9173
|
+
`.dg-tm-tk{${font(_chunkKNA5HH2Hcjs.TYPE.timeTick)};fill:var(--mute)}`,
|
|
9174
|
+
`.dg-tm-tkj{${font(_chunkO7RQ6R54cjs.sansOf.call(void 0, _chunkKNA5HH2Hcjs.TYPE.timeTick))}}`,
|
|
9175
|
+
`.dg-tm-en{${font(_chunkKNA5HH2Hcjs.TYPE.timePeriod)};fill:var(--ink2)}`,
|
|
9176
|
+
`.dg-tm-er{${font(_chunkKNA5HH2Hcjs.TYPE.timeRange)};fill:var(--mute)}`,
|
|
9177
|
+
`.dg-tm-erj{${font(_chunkO7RQ6R54cjs.sansOf.call(void 0, _chunkKNA5HH2Hcjs.TYPE.timeRange))}}`,
|
|
9178
|
+
`.dg-tm-rn{${font(_chunkKNA5HH2Hcjs.TYPE.timeRow)};fill:var(--ink2)}`,
|
|
9180
9179
|
`.dg-tm-br{fill:none;stroke:var(--c);stroke-width:${S.timeSpan};stroke-linecap:round;stroke-linejoin:round}`,
|
|
9181
|
-
`.dg-tm-bt{${font(
|
|
9180
|
+
`.dg-tm-bt{${font(_chunkKNA5HH2Hcjs.TYPE.spanText)};fill:var(--ct)}`,
|
|
9182
9181
|
`.dg-tm-bx{fill:color-mix(in srgb,var(--c) ${X.timeSpan}%,transparent);stroke:var(--c);stroke-width:${S.timeSpan};stroke-dasharray:4 3}`,
|
|
9183
9182
|
`.dg-tm-con{fill:none;stroke:var(--line);stroke-width:${S.timeDrop};stroke-linecap:round;stroke-dasharray:0 3.5}`,
|
|
9184
9183
|
".dg-tm-pg{fill:var(--surf);stroke:var(--line);stroke-dasharray:2 2.5}",
|
|
9185
9184
|
`.dg-tm-pgl{fill:none;stroke:var(--mute);stroke-width:${S.timeFlag};stroke-linecap:round;stroke-linejoin:round}`,
|
|
9186
9185
|
`.dg-tm-pc{fill:var(--surf);stroke:var(--c);stroke-width:${S.timePoint}}`,
|
|
9187
9186
|
`.dg-tm-pcg{fill:none;stroke:var(--c);stroke-width:${S.timeFlag};stroke-linecap:round;stroke-linejoin:round}`,
|
|
9188
|
-
`.dg-tm-pn{${font(
|
|
9189
|
-
`.dg-tm-pnj{${font(
|
|
9187
|
+
`.dg-tm-pn{${font(_chunkKNA5HH2Hcjs.TYPE.pointName)};fill:var(--ink)}`,
|
|
9188
|
+
`.dg-tm-pnj{${font(_chunkO7RQ6R54cjs.sansOf.call(void 0, _chunkKNA5HH2Hcjs.TYPE.pointName))}}`,
|
|
9190
9189
|
".dg-tm-pn-g{fill:var(--mute)}",
|
|
9191
|
-
`.dg-tm-ps{${font(
|
|
9190
|
+
`.dg-tm-ps{${font(_chunkKNA5HH2Hcjs.TYPE.pointState)};fill:var(--ct)}`,
|
|
9192
9191
|
`.dg-tm-ln{fill:none;stroke:var(--c);stroke-width:${S.edgeOn};stroke-linecap:round;stroke-dasharray:1 2}`,
|
|
9193
9192
|
`.dg-tm-nd{stroke:var(--ink);stroke-width:${S.timeNeedle};opacity:.55}`,
|
|
9194
9193
|
".dg-tm-nh{fill:var(--ink)}",
|
|
9195
9194
|
".dg-tm-ph{fill:none;stroke:var(--line);stroke-dasharray:3 3}",
|
|
9196
9195
|
`.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}`,
|
|
9197
|
-
`.dg-tm-ext{${font(
|
|
9196
|
+
`.dg-tm-ext{${font(_chunkKNA5HH2Hcjs.TYPE.emptyText)};fill:var(--t-slate)}`,
|
|
9198
9197
|
".dg-tm-mt{fill:var(--hair)}",
|
|
9199
9198
|
".dg-tm-mf{fill:var(--c);transform-box:fill-box;transform-origin:0 50%}",
|
|
9200
9199
|
`.dg-tm-mk{stroke:var(--ink2);stroke-width:${S.timeMeter}}`,
|
|
9201
|
-
`.dg-tm-ml{${font(
|
|
9200
|
+
`.dg-tm-ml{${font(_chunkKNA5HH2Hcjs.TYPE.meterLine)};fill:var(--ink2)}`,
|
|
9202
9201
|
".dg-vp-bg{fill:var(--bg)}",
|
|
9203
9202
|
".dg-vp-frame{fill:none;stroke:var(--hair)}",
|
|
9204
9203
|
".dg-hd-bg{fill:var(--bg)}",
|
|
9205
9204
|
".dg-mm-bg{fill:var(--surf);stroke:var(--hair)}",
|
|
9206
|
-
`.dg-mm-t{${font(
|
|
9205
|
+
`.dg-mm-t{${font(_chunkKNA5HH2Hcjs.TYPE.miniTitle)};fill:var(--mute)}`,
|
|
9207
9206
|
".dg-mm-world{fill:var(--sunk);stroke:var(--hair)}",
|
|
9208
9207
|
`.dg-mm-band{fill:${mix(X.miniBand)};stroke:${mix(X.miniBandEdge, "transparent")};stroke-width:.6}`,
|
|
9209
9208
|
`.dg-mm-card{fill:${mix(X.mini)}}`,
|
|
@@ -9268,7 +9267,7 @@ function subChanges(diagram, timeline, actionsInBox) {
|
|
|
9268
9267
|
}
|
|
9269
9268
|
const kept = list2.filter((change, k) => {
|
|
9270
9269
|
const next = list2[k + 1];
|
|
9271
|
-
return next === void 0 || next[0] - change[0] >=
|
|
9270
|
+
return next === void 0 || next[0] - change[0] >= _chunkKNA5HH2Hcjs.MOTION.minShow;
|
|
9272
9271
|
});
|
|
9273
9272
|
out.set(box.id, kept);
|
|
9274
9273
|
}
|
|
@@ -9295,26 +9294,26 @@ function fadeBefore(l, time, steps) {
|
|
|
9295
9294
|
return cut > after.start ? { ...rest, after: { start: after.start, end: Math.min(after.end, cut) } } : rest;
|
|
9296
9295
|
}
|
|
9297
9296
|
function drawSvg(diagram, layout, timeline, palette, theme, follow, ink = [], traces = []) {
|
|
9298
|
-
const vars =
|
|
9297
|
+
const vars = _chunkKNA5HH2Hcjs.paletteVars.call(void 0, palette, theme);
|
|
9299
9298
|
const id = nameOf(`${JSON.stringify(diagram)}|${vars}|${follow ? `${follow.width}|${follow.lang}` : ""}`);
|
|
9300
9299
|
const m = new Motion(`dg${id}`, timeline.total, timeline.last);
|
|
9301
|
-
const ctx = { m, t: timeline, id, sh: `filter="url(#dg-sh-${id})"`, end: timeline.steps[timeline.steps.length - 1].end, ink, traces, boxText:
|
|
9300
|
+
const ctx = { m, t: timeline, id, sh: `filter="url(#dg-sh-${id})"`, end: timeline.steps[timeline.steps.length - 1].end, ink, traces, boxText: _chunkO7RQ6R54cjs.boxTextY.call(void 0, layout.boxes) };
|
|
9302
9301
|
const on = involved(diagram);
|
|
9303
9302
|
const subs = subChanges(diagram, timeline, layout.kind !== "sequence");
|
|
9304
9303
|
const L = { band: [], base: [], lit: [], node: [], badge: [], top: [] };
|
|
9305
|
-
for (const region of layout.regions) L.band.push(
|
|
9304
|
+
for (const region of layout.regions) L.band.push(_chunkO7RQ6R54cjs.band.call(void 0, region, ink));
|
|
9306
9305
|
const ghostColor = _nullishCoalesce(_optionalChain([layout, 'access', _217 => _217.boxes, 'access', _218 => _218.find, 'call', _219 => _219((b) => b.ghost), 'optionalAccess', _220 => _220.color]), () => ( "slate"));
|
|
9307
|
-
if (layout.side) L.band.push(
|
|
9306
|
+
if (layout.side) L.band.push(_chunkO7RQ6R54cjs.side.call(void 0, layout.side, ghostColor, ink));
|
|
9308
9307
|
const boxColor = (id2, ghost) => _optionalChain([layout, 'access', _221 => _221.boxes, 'access', _222 => _222.find, 'call', _223 => _223((b) => b.id === id2 && (ghost === void 0 || b.ghost === ghost)), 'optionalAccess', _224 => _224.color]);
|
|
9309
|
-
for (const p of layout.paths) L.base.push(
|
|
9310
|
-
for (const e of layout.ends) L.node.push(
|
|
9308
|
+
for (const p of layout.paths) L.base.push(_chunkO7RQ6R54cjs.path.call(void 0, p, _nullishCoalesce(_nullishCoalesce(boxColor(p.to, true), () => ( boxColor(p.from))), () => ( ghostColor)), ink, traces));
|
|
9309
|
+
for (const e of layout.ends) L.node.push(_chunkO7RQ6R54cjs.endMark.call(void 0, e, ghostColor, ink));
|
|
9311
9310
|
const isState = layout.kind === "state";
|
|
9312
9311
|
const arrivals = new Map((_nullishCoalesce(timeline.states, () => ( []))).flatMap((s) => s.lit[0] ? [[s.box, s.lit[0].start]] : []));
|
|
9313
9312
|
const meters = new Map((_nullishCoalesce(timeline.meters, () => ( []))).map((meter) => [meter.field, meter.keys]));
|
|
9314
9313
|
const gauge = (field2) => field2.meter ? kindParts("time").meterField({ ...field2, meter: field2.meter }, _nullishCoalesce(meters.get(field2.name), () => ( [[0, 0]])), ctx) : void 0;
|
|
9315
|
-
const drawStrip = (s) =>
|
|
9314
|
+
const drawStrip = (s) => _chunkO7RQ6R54cjs.strip.call(void 0, s, fieldChanges(diagram, timeline, layout), ctx, isState, arrivals, gauge);
|
|
9316
9315
|
if (layout.strip && !follow) L.band.push(drawStrip(layout.strip));
|
|
9317
|
-
for (const line2 of layout.lifelines) L.base.push(
|
|
9316
|
+
for (const line2 of layout.lifelines) L.base.push(_chunkO7RQ6R54cjs.lifeline.call(void 0, line2.x, line2.y1, line2.y2));
|
|
9318
9317
|
if (isGitLayout(layout)) {
|
|
9319
9318
|
const git = kindParts("git").drawGit(layout, diagram, timeline, ctx);
|
|
9320
9319
|
L.base.push(git.links);
|
|
@@ -9349,46 +9348,46 @@ function drawSvg(diagram, layout, timeline, palette, theme, follow, ink = [], tr
|
|
|
9349
9348
|
const time = timeline.edges.find((t) => t.step === e.step && t.event === e.event);
|
|
9350
9349
|
if (!time || timeLayout && !wired.has(`${e.step}/${e.event}`) || runs.has(`${e.step}/${e.event}`)) continue;
|
|
9351
9350
|
const since = Math.max(_nullishCoalesce(_optionalChain([tree, 'optionalAccess', _227 => _227.appear, 'access', _228 => _228.get, 'call', _229 => _229(e.from)]), () => ( 0)), _nullishCoalesce(_optionalChain([tree, 'optionalAccess', _230 => _230.appear, 'access', _231 => _231.get, 'call', _232 => _232(e.to)]), () => ( 0)));
|
|
9352
|
-
const drawn =
|
|
9351
|
+
const drawn = _chunkO7RQ6R54cjs.edge.call(void 0, e, time, ctx, isState, since);
|
|
9353
9352
|
L.base.push(drawn.base);
|
|
9354
9353
|
L.lit.push(drawn.lit);
|
|
9355
9354
|
}
|
|
9356
9355
|
const states = new Map((_nullishCoalesce(timeline.states, () => ( []))).map((s) => [s.box, s]));
|
|
9357
9356
|
const links = new Map(diagram.boxes.flatMap((b) => b.link === void 0 ? [] : [[b.id, b.link]]));
|
|
9358
|
-
const linked = (id2, markup) =>
|
|
9357
|
+
const linked = (id2, markup) => _chunkO7RQ6R54cjs.linkTo.call(void 0, links.get(id2), markup);
|
|
9359
9358
|
for (const box of timeLayout || lineupLayout ? [] : layout.boxes) {
|
|
9360
9359
|
if (box.ghost) {
|
|
9361
|
-
L.node.push(linked(box.id,
|
|
9360
|
+
L.node.push(linked(box.id, _chunkO7RQ6R54cjs.ghostCard.call(void 0, box, ink)));
|
|
9362
9361
|
continue;
|
|
9363
9362
|
}
|
|
9364
9363
|
const state = states.get(box.id);
|
|
9365
|
-
L.node.push(linked(box.id,
|
|
9366
|
-
if (_optionalChain([state, 'optionalAccess', _234 => _234.done]) !== void 0) L.node.push(
|
|
9364
|
+
L.node.push(linked(box.id, _chunkO7RQ6R54cjs.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)));
|
|
9365
|
+
if (_optionalChain([state, 'optionalAccess', _234 => _234.done]) !== void 0) L.node.push(_chunkO7RQ6R54cjs.doneMark.call(void 0, box, state.done, ctx));
|
|
9367
9366
|
}
|
|
9368
|
-
for (const b of layout.badges) if (!(follow && onStrip(layout, b))) L.badge.push(
|
|
9367
|
+
for (const b of layout.badges) if (!(follow && onStrip(layout, b))) L.badge.push(_chunkO7RQ6R54cjs.badge.call(void 0, b, ctx, isState));
|
|
9369
9368
|
for (const l of layout.labels) {
|
|
9370
9369
|
const time = timeline.labels.find((t) => t.step === l.step && t.event === l.event);
|
|
9371
|
-
if (time) L.top.push(
|
|
9370
|
+
if (time) L.top.push(_chunkO7RQ6R54cjs.label.call(void 0, l, fadeBefore(l, time, timeline.steps), ctx));
|
|
9372
9371
|
}
|
|
9373
9372
|
const { whole } = timeline;
|
|
9374
9373
|
for (const a of layout.actions) {
|
|
9375
9374
|
const time = timeline.events.find((t) => t.step === a.step && t.event === a.event);
|
|
9376
9375
|
if (!time) continue;
|
|
9377
9376
|
const until = timeline.steps[a.step].end;
|
|
9378
|
-
L.top.push(whole && until > whole.start ?
|
|
9377
|
+
L.top.push(whole && until > whole.start ? _chunkO7RQ6R54cjs.action.call(void 0, a, time.at, whole.end, ctx) : _chunkO7RQ6R54cjs.action.call(void 0, a, time.at, until, ctx, whole));
|
|
9379
9378
|
}
|
|
9380
9379
|
for (const time of timeline.carriers) {
|
|
9381
9380
|
const e = layout.edges.find((x) => x.step === time.step && x.event === time.event);
|
|
9382
|
-
if (e) L.top.push(
|
|
9381
|
+
if (e) L.top.push(_chunkO7RQ6R54cjs.carrier.call(void 0, e, treeLayout ? { ...time, start: time.depart, end: time.arrive + _chunkKNA5HH2Hcjs.MOTION.fade } : time, ctx));
|
|
9383
9382
|
}
|
|
9384
9383
|
const content = Object.values(L).map((parts) => parts.join("")).join("");
|
|
9385
|
-
const { near, far, nearY, farY } =
|
|
9384
|
+
const { near, far, nearY, farY } = _chunkKNA5HH2Hcjs.LOOK.shadow;
|
|
9386
9385
|
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>`;
|
|
9387
|
-
const heads = follow && layout.kind === "sequence" ? layout.boxes.map((box) => linked(box.id,
|
|
9388
|
-
const drawTable = (s, from) => drawStrip(s) + layout.badges.filter((b) => onStrip(layout, b)).map((b) =>
|
|
9389
|
-
const view = follow ? followView(layout, timeline, diagram, m, id, content, follow, heads, drawTable) : { body: `<rect class="dg-bg" width="${layout.width}" height="${layout.height}" rx="${
|
|
9390
|
-
const css = `.dg-${id}{${
|
|
9391
|
-
return `<svg xmlns="http://www.w3.org/2000/svg" class="dg dg-${id}" viewBox="0 0 ${Math.ceil(view.w)} ${Math.ceil(view.h)}" width="${Math.ceil(view.w)}" height="${Math.ceil(view.h)}" role="img" aria-label="${
|
|
9386
|
+
const heads = follow && layout.kind === "sequence" ? layout.boxes.map((box) => linked(box.id, _chunkO7RQ6R54cjs.headCard.call(void 0, box, ctx, _nullishCoalesce(on.get(box.id), () => ( [])), _nullishCoalesce(subs.get(box.id), () => ( []))))).join("") : "";
|
|
9387
|
+
const drawTable = (s, from) => drawStrip(s) + layout.badges.filter((b) => onStrip(layout, b)).map((b) => _chunkO7RQ6R54cjs.badge.call(void 0, { ...b, x: b.x - from.x + s.x + _chunkKNA5HH2Hcjs.LOOK.badge.r, y: b.y - from.y + s.y }, ctx, isState)).join("");
|
|
9388
|
+
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="${_chunkKNA5HH2Hcjs.LOOK.region.radius}"/>${content}`, w: layout.width, h: layout.height };
|
|
9389
|
+
const css = `.dg-${id}{${_chunkKNA5HH2Hcjs.FONT_VARS};--T:${timeline.total}s;${vars}}${PART_CSS}${m.frames.join("")}`;
|
|
9390
|
+
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="${_chunkO7RQ6R54cjs.esc.call(void 0, diagram.title)}" data-dragon="figure" data-view="${follow ? "follow" : "fixed"}"><style>${css}</style><defs>${shadow}</defs>${view.body}</svg>`;
|
|
9392
9391
|
}
|
|
9393
9392
|
function union(rects) {
|
|
9394
9393
|
const x = Math.min(...rects.map((r) => r.x));
|
|
@@ -9403,7 +9402,7 @@ function focusOf(layout, diagram, step) {
|
|
|
9403
9402
|
return rects.length === 0 ? void 0 : union(rects);
|
|
9404
9403
|
}
|
|
9405
9404
|
function badgeFocus(badge2, parts, vw, vh) {
|
|
9406
|
-
const room =
|
|
9405
|
+
const room = _chunkKNA5HH2Hcjs.LOOK.badge.r + _chunkKNA5HH2Hcjs.LOOK.follow.badgeRoom;
|
|
9407
9406
|
const { x: bx, y: by } = badge2;
|
|
9408
9407
|
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));
|
|
9409
9408
|
let held = { x: bx - room, y: by - room, w: room * 2, h: room * 2 };
|
|
@@ -9444,22 +9443,22 @@ function focusParts(layout, diagram, step) {
|
|
|
9444
9443
|
return rects;
|
|
9445
9444
|
}
|
|
9446
9445
|
function followView(layout, timeline, diagram, m, id, content, follow, heads, drawTable) {
|
|
9447
|
-
const F =
|
|
9448
|
-
const M =
|
|
9446
|
+
const F = _chunkKNA5HH2Hcjs.LOOK.follow;
|
|
9447
|
+
const M = _chunkKNA5HH2Hcjs.LOOK.mini;
|
|
9449
9448
|
const frameWidth = Math.max(1, follow.width);
|
|
9450
9449
|
const full = Math.min(layout.width, frameWidth);
|
|
9451
9450
|
const worldH = layout.strip ? layout.strip.y : layout.height;
|
|
9452
|
-
const title =
|
|
9451
|
+
const title = _chunkKNA5HH2Hcjs.FIGURE_TEXT[follow.lang].overview;
|
|
9453
9452
|
const sized = (vh2) => {
|
|
9454
9453
|
const mw2 = Math.min(M.w, full * 0.4, vh2 * 0.4 / layout.height * layout.width);
|
|
9455
9454
|
const k2 = mw2 / layout.width;
|
|
9456
9455
|
const mh2 = worldH * k2;
|
|
9457
|
-
const bw2 = Math.max(mw2, Math.ceil(
|
|
9456
|
+
const bw2 = Math.max(mw2, Math.ceil(_chunkKNA5HH2Hcjs.textWidth.call(void 0, title, _chunkKNA5HH2Hcjs.TYPE.miniTitle)));
|
|
9458
9457
|
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 };
|
|
9459
9458
|
};
|
|
9460
9459
|
const natural = sized(Math.min(worldH, Math.max(F.minH, full * F.aspect)));
|
|
9461
9460
|
const bare = frameWidth < F.narrow && (natural.beside || layout.strip !== void 0);
|
|
9462
|
-
const tableH = layout.strip ?
|
|
9461
|
+
const tableH = layout.strip ? _chunkKNA5HH2Hcjs.rewrapStrip.call(void 0, layout.strip, 0, 0, full).h + M.inset : 0;
|
|
9463
9462
|
const room = follow.height === void 0 ? Number.POSITIVE_INFINITY : (natural.beside || bare ? follow.height : follow.height - natural.bgH - M.inset) - tableH;
|
|
9464
9463
|
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 };
|
|
9465
9464
|
const vw = beside && !bare ? Math.min(layout.width, frameWidth - bgW - M.inset) : full;
|
|
@@ -9468,7 +9467,7 @@ function followView(layout, timeline, diagram, m, id, content, follow, heads, dr
|
|
|
9468
9467
|
const strip2 = heads === "" ? 0 : F.head.pad * 2 + F.head.h;
|
|
9469
9468
|
const below = vh - strip2;
|
|
9470
9469
|
const clampY = (y) => Math.min(worldH - below / 2, Math.max(top + below / 2, y));
|
|
9471
|
-
const r =
|
|
9470
|
+
const r = _chunkKNA5HH2Hcjs.LOOK.badge.r;
|
|
9472
9471
|
let prev = [layout.width / 2, worldH / 2];
|
|
9473
9472
|
const middles = timeline.steps.map((_, s) => {
|
|
9474
9473
|
if (isTimeLayout(layout)) {
|
|
@@ -9495,10 +9494,10 @@ function followView(layout, timeline, diagram, m, id, content, follow, heads, dr
|
|
|
9495
9494
|
if (s === 0) return;
|
|
9496
9495
|
const before = centers[s - 1];
|
|
9497
9496
|
const start = timeline.steps[s].start;
|
|
9498
|
-
cam.push([start, before[0], before[1], 1,
|
|
9497
|
+
cam.push([start, before[0], before[1], 1, _chunkKNA5HH2Hcjs.EASE.inOut], [start + F.ease, c[0], c[1]]);
|
|
9499
9498
|
});
|
|
9500
9499
|
const cl = centers[centers.length - 1];
|
|
9501
|
-
cam.push([timeline.last, cl[0], cl[1], 1,
|
|
9500
|
+
cam.push([timeline.last, cl[0], cl[1], 1, _chunkKNA5HH2Hcjs.EASE.inOut], [timeline.total, c0[0], c0[1]]);
|
|
9502
9501
|
const camKf = m.move(cam.map(([t, cx, cy, s, e]) => [t, vw / 2 - cx, vh / 2 - cy, s, e]));
|
|
9503
9502
|
const bgX = beside ? vw + M.inset : vw - bgW - M.inset;
|
|
9504
9503
|
const bgY = beside ? 0 : vh + M.inset;
|
|
@@ -9507,9 +9506,9 @@ function followView(layout, timeline, diagram, m, id, content, follow, heads, dr
|
|
|
9507
9506
|
const my = bgY + M.pad + M.title;
|
|
9508
9507
|
const overview = () => {
|
|
9509
9508
|
const shapes = [
|
|
9510
|
-
...layout.regions.map((r3) => `<rect class="dg-mm-band" style="${
|
|
9511
|
-
...layout.boxes.map((b) => `<rect class="dg-mm-card" style="${
|
|
9512
|
-
...(isTreeLayout(layout) ? layout.nodes : []).map((n) => `<rect class="dg-mm-card" style="${
|
|
9509
|
+
...layout.regions.map((r3) => `<rect class="dg-mm-band" style="${_chunkO7RQ6R54cjs.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"/>`),
|
|
9510
|
+
...layout.boxes.map((b) => `<rect class="dg-mm-card" style="${_chunkO7RQ6R54cjs.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"/>`),
|
|
9511
|
+
...(isTreeLayout(layout) ? layout.nodes : []).map((n) => `<rect class="dg-mm-card" style="${_chunkO7RQ6R54cjs.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"/>`)
|
|
9513
9512
|
].join("");
|
|
9514
9513
|
const vp = m.move(cam.map(([t, cx, cy, , e]) => [t, mx + (cx - vw / 2) * k, my + (cy - vh / 2) * k, 1, e]));
|
|
9515
9514
|
return {
|
|
@@ -9519,25 +9518,25 @@ function followView(layout, timeline, diagram, m, id, content, follow, heads, dr
|
|
|
9519
9518
|
};
|
|
9520
9519
|
const mini = bare ? { clip: "", body: "" } : overview();
|
|
9521
9520
|
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>`;
|
|
9522
|
-
const body = `<defs><clipPath id="dg-vp-${id}"><rect width="${vw}" height="${vh}" rx="${
|
|
9521
|
+
const body = `<defs><clipPath id="dg-vp-${id}"><rect width="${vw}" height="${vh}" rx="${_chunkKNA5HH2Hcjs.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="${_chunkKNA5HH2Hcjs.LOOK.region.radius}"/>${mini.body}`;
|
|
9523
9522
|
const w = beside && !bare ? vw + M.inset + bgW : full;
|
|
9524
9523
|
const bottom = beside || bare ? vh : bgY + bgH;
|
|
9525
9524
|
if (!layout.strip) return { body, w, h: bottom };
|
|
9526
|
-
const table =
|
|
9525
|
+
const table = _chunkKNA5HH2Hcjs.rewrapStrip.call(void 0, layout.strip, 0, bottom + M.inset, full);
|
|
9527
9526
|
return { body: body + drawTable(table, layout.strip), w, h: table.y + table.h };
|
|
9528
9527
|
}
|
|
9529
9528
|
function paletteOf(options, theme) {
|
|
9530
|
-
const palette =
|
|
9529
|
+
const palette = _chunkKNA5HH2Hcjs.resolvePalette.call(void 0, options.palette);
|
|
9531
9530
|
if (!options.colors) return palette;
|
|
9532
|
-
const words =
|
|
9533
|
-
const errors = Object.entries(options.colors).flatMap(([name2, value2]) => !
|
|
9531
|
+
const words = _chunkKNA5HH2Hcjs.FIGURE_TEXT[_nullishCoalesce(options.lang, () => ( _chunkKNA5HH2Hcjs.DEFAULT_LANG))];
|
|
9532
|
+
const errors = Object.entries(options.colors).flatMap(([name2, value2]) => !_chunkKNA5HH2Hcjs.isColorName.call(void 0, name2) ? [words.unknownColor(name2)] : _chunkKNA5HH2Hcjs.isColorValue.call(void 0, value2) ? [] : [words.unreadableColor(name2)]);
|
|
9534
9533
|
if (errors.length > 0) throw new Error(words.cannotDraw(errors.join(" / ")));
|
|
9535
9534
|
return { ...palette, [theme]: { ...palette[theme], ...options.colors } };
|
|
9536
9535
|
}
|
|
9537
9536
|
function renderDiagram(input, options = {}) {
|
|
9538
|
-
const lang = _nullishCoalesce(options.lang, () => (
|
|
9537
|
+
const lang = _nullishCoalesce(options.lang, () => ( _chunkKNA5HH2Hcjs.DEFAULT_LANG));
|
|
9539
9538
|
const read = readDiagram(input, { lang });
|
|
9540
|
-
if (!read.ok) throw new Error(
|
|
9539
|
+
if (!read.ok) throw new Error(_chunkKNA5HH2Hcjs.FIGURE_TEXT[lang].cannotDraw(read.errors.map((e) => `${e.pointer} ${e.message}`).join(" / ")));
|
|
9541
9540
|
const diagram = read.diagram;
|
|
9542
9541
|
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);
|
|
9543
9542
|
return renderLayout(diagram, layout, buildTimeline(diagram, options.still === true), options);
|
|
@@ -9553,11 +9552,11 @@ function renderLayout(diagram, layout, timeline, options = {}) {
|
|
|
9553
9552
|
palette: palette.id,
|
|
9554
9553
|
theme,
|
|
9555
9554
|
...diagram.view ? { view: diagram.view } : {},
|
|
9556
|
-
fonts: { ...
|
|
9555
|
+
fonts: { ..._chunkKNA5HH2Hcjs.FONTS },
|
|
9557
9556
|
layout,
|
|
9558
9557
|
timeline,
|
|
9559
9558
|
diagram,
|
|
9560
|
-
overlaps:
|
|
9559
|
+
overlaps: _chunkO7RQ6R54cjs.findOverlaps.call(void 0, ink, timeline.stills, traces)
|
|
9561
9560
|
};
|
|
9562
9561
|
}
|
|
9563
9562
|
|
|
@@ -9565,16 +9564,16 @@ function renderLayout(diagram, layout, timeline, options = {}) {
|
|
|
9565
9564
|
function chooseView(rendered, frameWidth, frameHeight) {
|
|
9566
9565
|
const byWidth = Math.max(0, frameWidth) / rendered.layout.width;
|
|
9567
9566
|
const scale = frameHeight === void 0 ? byWidth : Math.min(byWidth, Math.max(0, frameHeight) / rendered.layout.height);
|
|
9568
|
-
const textPx = scale *
|
|
9567
|
+
const textPx = scale * _chunkKNA5HH2Hcjs.TYPE.boxName.size;
|
|
9569
9568
|
if (rendered.view) return { mode: rendered.view, textPx };
|
|
9570
|
-
return { mode: textPx >=
|
|
9569
|
+
return { mode: textPx >= _chunkKNA5HH2Hcjs.READABLE_PX ? "fixed" : "follow", textPx };
|
|
9571
9570
|
}
|
|
9572
9571
|
|
|
9573
9572
|
// src/player.ts
|
|
9574
9573
|
var font2 = (t) => `font:${t.weight} ${t.size}px var(--${t.family})`;
|
|
9575
9574
|
var px = (v) => `${v}px`;
|
|
9576
9575
|
function playerCss() {
|
|
9577
|
-
const P =
|
|
9576
|
+
const P = _chunkKNA5HH2Hcjs.LOOK.player;
|
|
9578
9577
|
const hidden = px(P.hidden);
|
|
9579
9578
|
return [
|
|
9580
9579
|
`.dg-player{display:flex;flex-direction:column;gap:${px(P.gap)};color:var(--ink)}`,
|
|
@@ -9583,15 +9582,15 @@ function playerCss() {
|
|
|
9583
9582
|
`.dg-bar{container:dg-bar/inline-size}`,
|
|
9584
9583
|
`.dg-row{display:flex;align-items:flex-start;gap:${px(P.gap)}}`,
|
|
9585
9584
|
`.dg-btns{display:flex;gap:${px(P.gap / 2)};flex:none}`,
|
|
9586
|
-
`.dg-btn{width:${px(P.button)};height:${px(P.button)};border-radius:${px(P.radius)};border:${px(
|
|
9585
|
+
`.dg-btn{width:${px(P.button)};height:${px(P.button)};border-radius:${px(P.radius)};border:${px(_chunkKNA5HH2Hcjs.LOOK.stroke.hair)} solid var(--hair);background:var(--surf);color:var(--ink);${font2(_chunkKNA5HH2Hcjs.TYPE.button)};cursor:pointer}`,
|
|
9587
9586
|
`.dg-btn:focus-visible{outline:${px(P.focus)} solid var(--c-blue);outline-offset:${px(P.focus)}}`,
|
|
9588
9587
|
`.dg-say{display:flex;gap:${px(P.gap)};min-width:0}`,
|
|
9589
|
-
`.dg-no{${font2(
|
|
9588
|
+
`.dg-no{${font2(_chunkKNA5HH2Hcjs.TYPE.stepNo)};color:var(--mute);padding-top:${px(P.focus)}}`,
|
|
9590
9589
|
`.dg-txt{display:grid;grid-template-columns:minmax(0,1fr);min-width:0}`,
|
|
9591
9590
|
`.dg-txt>*{grid-area:1/1}`,
|
|
9592
9591
|
`.dg-room{visibility:hidden}`,
|
|
9593
|
-
`.dg-tt{${font2(
|
|
9594
|
-
`.dg-tb{${font2(
|
|
9592
|
+
`.dg-tt{${font2(_chunkKNA5HH2Hcjs.TYPE.stepTitle)};margin:0}`,
|
|
9593
|
+
`.dg-tb{${font2(_chunkKNA5HH2Hcjs.TYPE.stepBody)};color:var(--ink2);margin:0;white-space:pre-line}`,
|
|
9595
9594
|
`.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}`,
|
|
9596
9595
|
// 狭い帯 (携帯の幅) では、段を送る釦を指で押せる大きさにし、その横に番号を置き、
|
|
9597
9596
|
// 題を 2 段目、本文を 3 段目に置いてどちらも帯の全幅を使う (#3057、#3069)。
|
|
@@ -9602,7 +9601,7 @@ function playerCss() {
|
|
|
9602
9601
|
// 指で触る時は、広い帯でも段を送る釦を指で押せる大きさにする (#3076)。並びは横 1 列のまま変えない。
|
|
9603
9602
|
// 広い帯は本文が 2 行あれば帯の高さが変わらず、本文の無い帯だけが釦の分だけ高くなる
|
|
9604
9603
|
`@media (pointer: coarse){.dg-btn{width:${px(P.touch)};height:${px(P.touch)}}}`,
|
|
9605
|
-
`.dg-spot{fill:none;stroke:var(--t-amber);stroke-width:${px(
|
|
9604
|
+
`.dg-spot{fill:none;stroke:var(--t-amber);stroke-width:${px(_chunkKNA5HH2Hcjs.LOOK.stroke.mark)};stroke-dasharray:${_chunkKNA5HH2Hcjs.LOOK.mark.dash} ${_chunkKNA5HH2Hcjs.LOOK.mark.gap};pointer-events:none}`
|
|
9606
9605
|
].join("");
|
|
9607
9606
|
}
|
|
9608
9607
|
function ensureCss(doc) {
|
|
@@ -9621,8 +9620,8 @@ function mountDiagram(host, diagram, options = {}) {
|
|
|
9621
9620
|
const win = doc.defaultView;
|
|
9622
9621
|
const reduce = Boolean(_optionalChain([win, 'optionalAccess', _244 => _244.matchMedia, 'optionalCall', _245 => _245("(prefers-reduced-motion: reduce)"), 'access', _246 => _246.matches]));
|
|
9623
9622
|
const rendered = renderDiagram(diagram, options);
|
|
9624
|
-
const lang = _nullishCoalesce(options.lang, () => (
|
|
9625
|
-
const words =
|
|
9623
|
+
const lang = _nullishCoalesce(options.lang, () => ( _chunkKNA5HH2Hcjs.DEFAULT_LANG));
|
|
9624
|
+
const words = _chunkKNA5HH2Hcjs.FIGURE_TEXT[lang];
|
|
9626
9625
|
const palette = paletteOf(options, rendered.theme);
|
|
9627
9626
|
const { timeline } = rendered;
|
|
9628
9627
|
const steps = rendered.diagram.steps;
|
|
@@ -9631,7 +9630,7 @@ function mountDiagram(host, diagram, options = {}) {
|
|
|
9631
9630
|
const root = doc.createElement("div");
|
|
9632
9631
|
root.className = "dg-player";
|
|
9633
9632
|
root.dataset.dragon = "player";
|
|
9634
|
-
root.setAttribute("style", `${
|
|
9633
|
+
root.setAttribute("style", `${_chunkKNA5HH2Hcjs.FONT_VARS};${_chunkKNA5HH2Hcjs.paletteVars.call(void 0, palette, rendered.theme)}`);
|
|
9635
9634
|
const frame = doc.createElement("div");
|
|
9636
9635
|
frame.className = "dg-frame";
|
|
9637
9636
|
const button = (name2, label2, text2) => {
|
|
@@ -9739,7 +9738,7 @@ function mountDiagram(host, diagram, options = {}) {
|
|
|
9739
9738
|
if (!svg) return;
|
|
9740
9739
|
for (const old of svg.querySelectorAll(".dg-spots")) old.remove();
|
|
9741
9740
|
if (marked.length === 0) return;
|
|
9742
|
-
const M =
|
|
9741
|
+
const M = _chunkKNA5HH2Hcjs.LOOK.mark;
|
|
9743
9742
|
const group = doc.createElementNS(SVG_NS, "g");
|
|
9744
9743
|
group.setAttribute("class", "dg-spots");
|
|
9745
9744
|
for (const r of marked) {
|
|
@@ -9764,9 +9763,14 @@ function mountDiagram(host, diagram, options = {}) {
|
|
|
9764
9763
|
next = svg ? svg.cloneNode(true) : null;
|
|
9765
9764
|
}
|
|
9766
9765
|
if (!next) return;
|
|
9767
|
-
next.
|
|
9768
|
-
|
|
9769
|
-
|
|
9766
|
+
if (next.querySelector("a[href]")) {
|
|
9767
|
+
next.removeAttribute("aria-hidden");
|
|
9768
|
+
next.setAttribute("role", "group");
|
|
9769
|
+
} else {
|
|
9770
|
+
next.setAttribute("aria-hidden", "true");
|
|
9771
|
+
next.removeAttribute("role");
|
|
9772
|
+
next.removeAttribute("aria-label");
|
|
9773
|
+
}
|
|
9770
9774
|
next.style.setProperty("--at", String(at));
|
|
9771
9775
|
next.style.setProperty("--play", playing ? "running" : "paused");
|
|
9772
9776
|
next.dataset.motion = playing ? "play" : "still";
|
|
@@ -9890,11 +9894,11 @@ function mountDiagram(host, diagram, options = {}) {
|
|
|
9890
9894
|
|
|
9891
9895
|
// src/light.ts
|
|
9892
9896
|
var LOADERS = {
|
|
9893
|
-
git: () => Promise.resolve().then(() => _interopRequireWildcard(require("./git-
|
|
9894
|
-
lineup: () => Promise.resolve().then(() => _interopRequireWildcard(require("./lineup-
|
|
9895
|
-
state: () => Promise.resolve().then(() => _interopRequireWildcard(require("./state-
|
|
9896
|
-
time: () => Promise.resolve().then(() => _interopRequireWildcard(require("./time-
|
|
9897
|
-
tree: () => Promise.resolve().then(() => _interopRequireWildcard(require("./tree-
|
|
9897
|
+
git: () => Promise.resolve().then(() => _interopRequireWildcard(require("./git-M63KYUUK.cjs"))),
|
|
9898
|
+
lineup: () => Promise.resolve().then(() => _interopRequireWildcard(require("./lineup-2VWQ74CU.cjs"))),
|
|
9899
|
+
state: () => Promise.resolve().then(() => _interopRequireWildcard(require("./state-MFCHMESP.cjs"))),
|
|
9900
|
+
time: () => Promise.resolve().then(() => _interopRequireWildcard(require("./time-RISQEAB7.cjs"))),
|
|
9901
|
+
tree: () => Promise.resolve().then(() => _interopRequireWildcard(require("./tree-S23P2PW7.cjs")))
|
|
9898
9902
|
};
|
|
9899
9903
|
var isLater = (kind) => LATER_KINDS.includes(kind);
|
|
9900
9904
|
async function loadKind(kind) {
|
|
@@ -9925,5 +9929,5 @@ async function register(kind) {
|
|
|
9925
9929
|
|
|
9926
9930
|
|
|
9927
9931
|
|
|
9928
|
-
exports.DEFAULT_PALETTE =
|
|
9932
|
+
exports.DEFAULT_PALETTE = _chunkKNA5HH2Hcjs.DEFAULT_PALETTE; exports.FONTS = _chunkKNA5HH2Hcjs.FONTS; exports.FORMAT_VERSION = FORMAT_VERSION; exports.ICONS = _chunkO7RQ6R54cjs.ICONS; exports.LATER_KINDS = LATER_KINDS; exports.PALETTES = _chunkKNA5HH2Hcjs.PALETTES; exports.READABLE_PX = _chunkKNA5HH2Hcjs.READABLE_PX; exports.chooseView = chooseView; exports.describeOverlap = _chunkO7RQ6R54cjs.describeOverlap; exports.extractDiagrams = extractDiagrams; exports.iconSvg = _chunkO7RQ6R54cjs.iconSvg; exports.kindLoaded = kindLoaded; exports.loadKind = loadKind; exports.mountDiagram = mountDiagram; exports.parseNotation = parseNotation; exports.printNotation = printNotation; exports.readDiagram = readDiagram; exports.renderDiagram = renderDiagram; exports.resolvePalette = _chunkKNA5HH2Hcjs.resolvePalette; exports.validateDiagram = validateDiagram;
|
|
9929
9933
|
//# sourceMappingURL=index.cjs.map
|