@cardenelabs/dragon 0.45.5 → 0.46.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli.cjs +90 -99
- package/dist/cli.cjs.map +1 -1
- package/dist/cli.js +90 -99
- package/dist/cli.js.map +1 -1
- package/dist/export.cjs +84 -99
- package/dist/export.cjs.map +1 -1
- package/dist/export.js +84 -99
- package/dist/export.js.map +1 -1
- package/dist/index.cjs +48 -57
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +48 -57
- package/dist/index.js.map +1 -1
- package/dist/light/chunk-CLS6JVKK.cjs.map +1 -1
- package/dist/light/{chunk-EHTQUCW4.js → chunk-DVGDEPCV.js} +6 -2
- package/dist/light/chunk-DVGDEPCV.js.map +1 -0
- package/dist/light/{chunk-5OQV42W3.cjs → chunk-SUL4AJLI.cjs} +6 -2
- package/dist/light/chunk-SUL4AJLI.cjs.map +1 -0
- package/dist/light/{chunk-JCEKXALJ.cjs → chunk-V34DCH34.cjs} +90 -87
- package/dist/light/chunk-V34DCH34.cjs.map +1 -0
- package/dist/light/{chunk-YEQSLVIN.js → chunk-YO3UBEC3.js} +12 -9
- package/dist/light/chunk-YO3UBEC3.js.map +1 -0
- package/dist/light/{git-K3KAAAWW.cjs → git-WBGFDRBD.cjs} +59 -59
- package/dist/light/git-WBGFDRBD.cjs.map +1 -0
- package/dist/light/{git-GESUYKGR.js → git-WEJL6VAY.js} +3 -3
- package/dist/light/index.cjs +358 -372
- package/dist/light/index.cjs.map +1 -1
- package/dist/light/index.js +43 -57
- package/dist/light/index.js.map +1 -1
- package/dist/light/{lineup-2V2U7HZH.js → lineup-6LN6Z5T2.js} +3 -3
- package/dist/light/{lineup-623J25LU.cjs → lineup-WLGNGTFX.cjs} +40 -40
- package/dist/light/lineup-WLGNGTFX.cjs.map +1 -0
- package/dist/light/{state-T4OTVING.js → state-DFYTMQI7.js} +2 -2
- package/dist/light/{state-OZVCHX7H.cjs → state-JVAH4TSM.cjs} +41 -41
- package/dist/light/state-JVAH4TSM.cjs.map +1 -0
- package/dist/light/{time-KVMZIKYF.cjs → time-EXRPI34B.cjs} +84 -84
- package/dist/light/time-EXRPI34B.cjs.map +1 -0
- package/dist/light/{time-O4CMTUV5.js → time-M3EGEFDU.js} +3 -3
- package/dist/light/{tree-6D7KI57H.cjs → tree-DECHTXFU.cjs} +62 -62
- package/dist/light/tree-DECHTXFU.cjs.map +1 -0
- package/dist/light/{tree-ZJZQI5QT.js → tree-MFU54QKY.js} +3 -3
- package/dist/node.cjs +27 -48
- package/dist/node.cjs.map +1 -1
- package/dist/node.js +27 -48
- package/dist/node.js.map +1 -1
- package/dist/player.global.js +3 -3
- package/package.json +1 -1
- package/src/look/values.ts +5 -1
- package/src/messages.ts +4 -1
- package/src/parser.ts +4 -2
- package/src/render/draw.ts +2 -1
- package/src/render/parts.ts +28 -7
- package/src/schema.ts +6 -0
- package/src/schemas/diagram.schema.json +3 -2
- package/src/schemas/validate-diagram.js +1 -1
- package/dist/light/chunk-5OQV42W3.cjs.map +0 -1
- package/dist/light/chunk-EHTQUCW4.js.map +0 -1
- package/dist/light/chunk-JCEKXALJ.cjs.map +0 -1
- package/dist/light/chunk-YEQSLVIN.js.map +0 -1
- package/dist/light/git-K3KAAAWW.cjs.map +0 -1
- package/dist/light/lineup-623J25LU.cjs.map +0 -1
- package/dist/light/state-OZVCHX7H.cjs.map +0 -1
- package/dist/light/time-KVMZIKYF.cjs.map +0 -1
- package/dist/light/tree-6D7KI57H.cjs.map +0 -1
- /package/dist/light/{git-GESUYKGR.js.map → git-WEJL6VAY.js.map} +0 -0
- /package/dist/light/{lineup-2V2U7HZH.js.map → lineup-6LN6Z5T2.js.map} +0 -0
- /package/dist/light/{state-T4OTVING.js.map → state-DFYTMQI7.js.map} +0 -0
- /package/dist/light/{time-O4CMTUV5.js.map → time-M3EGEFDU.js.map} +0 -0
- /package/dist/light/{tree-ZJZQI5QT.js.map → tree-MFU54QKY.js.map} +0 -0
package/dist/index.cjs
CHANGED
|
@@ -321,7 +321,11 @@ var LOOK = {
|
|
|
321
321
|
gap: 10,
|
|
322
322
|
/** 図の外周の余白 */
|
|
323
323
|
margin: 14,
|
|
324
|
-
|
|
324
|
+
/**
|
|
325
|
+
* 箱。`iconY` と `nameY` と `subY` は箱の真ん中から絵柄の真ん中と名前と下の字の基準線まで。
|
|
326
|
+
* `nameMid` と `subMid` はアイコンも置き場の枠も持つ箱が無い図の名前と下の字の基準線で、名前を箱の真ん中に置き、下の字を名前から `subY - nameY` と同じ間で置く (#3307、#3309)
|
|
327
|
+
*/
|
|
328
|
+
box: { h: 72, minW: 92, padX: 12, radius: 12, icon: 24, iconRadius: 7, iconY: -16, iconScale: 0.74, nameY: 12, nameMid: 5, subY: 27, subMid: 20 },
|
|
325
329
|
region: { pad: 18, gap: 10, radius: 14, inset: 14, icon: 24, iconRadius: 7, iconScale: 0.68, nameY: 58, line: 16, minH: 108 },
|
|
326
330
|
architecture: { columns: 4, columnGap: 56, maxColumnGap: 160, rowGap: 44, labelRoom: 16 },
|
|
327
331
|
/**
|
|
@@ -1752,7 +1756,7 @@ var linkTo = (link, markup) => link === void 0 ? markup : `<a href="${esc(link)}
|
|
|
1752
1756
|
var r1 = (v) => Math.round(v * 100) / 100;
|
|
1753
1757
|
var cs = (k) => k === "coin" ? "--c:var(--coin);--ct:var(--coint)" : `--c:var(--c-${k});--ct:var(--t-${k})`;
|
|
1754
1758
|
function glyph(name2, x, y, scale, cls = "dg-gl") {
|
|
1755
|
-
const d = name2
|
|
1759
|
+
const d = name2 !== void 0 && drawsIcon(name2) ? ICONS[name2] : void 0;
|
|
1756
1760
|
return d ? `<path class="${cls}" transform="translate(${r1(x)} ${r1(y)}) scale(${scale})" d="${d}"/>` : "";
|
|
1757
1761
|
}
|
|
1758
1762
|
function iconSvg(name2) {
|
|
@@ -1788,6 +1792,8 @@ function arrowHead(points) {
|
|
|
1788
1792
|
const { arrow: a, arrowHalf: h } = LOOK.edge;
|
|
1789
1793
|
return `M ${r1(ex - dx * a - dy * h)} ${r1(ey - dy * a + dx * h)} L ${r1(ex)} ${r1(ey)} L ${r1(ex - dx * a + dy * h)} ${r1(ey - dy * a - dx * h)}`;
|
|
1790
1794
|
}
|
|
1795
|
+
var drawsIcon = (name2) => name2 !== void 0 && Object.hasOwn(ICONS, name2);
|
|
1796
|
+
var boxTextY = (boxes) => boxes.some((b) => drawsIcon(b.icon) || b.slot !== void 0) ? { name: LOOK.box.nameY, sub: LOOK.box.subY } : { name: LOOK.box.nameMid, sub: LOOK.box.subMid };
|
|
1791
1797
|
var sansOf = (t) => ({ ...t, family: "sans" });
|
|
1792
1798
|
function write(ink, cls, x, y, text2, style, shown2 = ALWAYS, anchor) {
|
|
1793
1799
|
ink?.push({ text: text2, rect: textBox(text2, x, y, style, anchor), shown: shown2 });
|
|
@@ -1814,7 +1820,7 @@ function band(region, ink) {
|
|
|
1814
1820
|
const { x, y } = region.header;
|
|
1815
1821
|
const lines = region.lines.map((t, k) => write(ink, "dg-bz", x, region.y + nameY + k * line2, t, TYPE.regionName)).join("");
|
|
1816
1822
|
const note = region.note ? write(ink, "dg-bx", x, region.y + nameY + region.lines.length * line2 + 1, region.note, TYPE.regionNote) : "";
|
|
1817
|
-
const mark = region.icon
|
|
1823
|
+
const mark = drawsIcon(region.icon) ? `<rect class="dg-bi" x="${r1(x)}" y="${r1(y)}" width="${icon}" height="${icon}" rx="${iconRadius}"/>${glyph(region.icon, x + icon / 2, y + icon / 2, iconScale)}` : "";
|
|
1818
1824
|
return `<g style="${cs(region.color)}"><rect class="dg-band" x="${r1(region.x + 0.5)}" y="${r1(region.y + 0.5)}" width="${r1(region.w - 1)}" height="${r1(region.h - 1)}" rx="${radius}"/>${mark}${lines}${note}</g>`;
|
|
1819
1825
|
}
|
|
1820
1826
|
function subLines(box, m, changes, y, ink, right) {
|
|
@@ -1834,18 +1840,18 @@ function cardFrame(box, ctx, act, y, h) {
|
|
|
1834
1840
|
return `${act ? `<g class="dg-a" style="${act}">${rect("dg-halo")}</g>` : ""}${rect("dg-st", ` ${ctx.sh}`)}${act ? `<g class="dg-a" style="${act}">${rect("dg-on")}</g>` : ""}`;
|
|
1835
1841
|
}
|
|
1836
1842
|
function card(box, ctx, on, changes, lit) {
|
|
1837
|
-
const { icon, iconRadius, iconScale, iconY
|
|
1838
|
-
const subs = subLines(box, ctx.m, changes, box.cy +
|
|
1843
|
+
const { icon, iconRadius, iconScale, iconY } = LOOK.box;
|
|
1844
|
+
const subs = subLines(box, ctx.m, changes, box.cy + ctx.boxText.sub, ctx.ink);
|
|
1839
1845
|
const act = lit ? lit.length > 0 ? rangeKf(ctx.m, lit.map((s) => [s.start, s.end])) : void 0 : on.length > 0 ? activeKf(ctx, on) : void 0;
|
|
1840
1846
|
const ix = box.iconX ?? box.cx;
|
|
1841
1847
|
const slot = box.slot ? `<rect class="dg-slot" x="${r1(box.slot.x)}" y="${r1(box.slot.y)}" width="${r1(box.slot.w)}" height="${r1(box.slot.h)}" rx="${LOOK.slot.radius}"/>` : "";
|
|
1842
1848
|
let mark = "";
|
|
1843
|
-
if (box.icon
|
|
1849
|
+
if (drawsIcon(box.icon)) {
|
|
1844
1850
|
const rect = { x: ix - icon / 2, y: box.cy + iconY - icon / 2, w: icon, h: icon };
|
|
1845
1851
|
ctx.ink.push({ text: `${box.name} \u306E\u7D75\u67C4`, rect, shown: ALWAYS, boxed: true, part: { kind: "icon", box: box.name } });
|
|
1846
1852
|
mark = `<rect class="dg-ic" x="${r1(rect.x)}" y="${r1(rect.y)}" width="${icon}" height="${icon}" rx="${iconRadius}"/>${glyph(box.icon, ix, box.cy + iconY, iconScale)}`;
|
|
1847
1853
|
}
|
|
1848
|
-
return `<g style="${cs(box.color)}">${cardFrame(box, ctx, act, box.y, box.h)}${slot}${mark}${write(ctx.ink, "dg-sn", box.cx, box.cy +
|
|
1854
|
+
return `<g style="${cs(box.color)}">${cardFrame(box, ctx, act, box.y, box.h)}${slot}${mark}${write(ctx.ink, "dg-sn", box.cx, box.cy + ctx.boxText.name, box.name, TYPE.boxName, ALWAYS, "middle")}${subs}</g>`;
|
|
1849
1855
|
}
|
|
1850
1856
|
function headCard(box, ctx, on, changes) {
|
|
1851
1857
|
const { pad: pad2, h, nameY, subY } = LOOK.follow.head;
|
|
@@ -1858,7 +1864,7 @@ function ghostCard(box, ink) {
|
|
|
1858
1864
|
const G = LOOK.state.ghost;
|
|
1859
1865
|
const ix = box.x + G.pad + icon / 2;
|
|
1860
1866
|
const tx = box.x + G.pad + icon + G.gap;
|
|
1861
|
-
const mark = box.icon
|
|
1867
|
+
const mark = drawsIcon(box.icon) ? `<rect class="dg-ic" x="${r1(ix - icon / 2)}" y="${r1(box.cy - icon / 2)}" width="${icon}" height="${icon}" rx="${iconRadius}"/>${glyph(box.icon, ix, box.cy, iconScale)}` : "";
|
|
1862
1868
|
const nameY = box.sub ? G.nameY : LOOK.baseline.mark;
|
|
1863
1869
|
const sub = box.sub ? write(ink, "dg-ss", tx, box.cy + G.subY, box.sub, TYPE.boxSub, ALWAYS, "start") : "";
|
|
1864
1870
|
return `<g data-ghost="${esc(box.id)}" style="${cs(box.color)}"><rect class="dg-ghost" x="${r1(box.x)}" y="${r1(box.y)}" width="${r1(box.w)}" height="${box.h}" rx="${radius}"/>${mark}${write(ink, "dg-sn", tx, box.cy + nameY, box.name, TYPE.boxName, ALWAYS, "start")}${sub}</g>`;
|
|
@@ -4996,6 +5002,7 @@ function validate25(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
4996
5002
|
return errors === 0;
|
|
4997
5003
|
}
|
|
4998
5004
|
var schema79 = { "enum": ["blue", "amber", "green", "violet", "rose", "slate", "coin"] };
|
|
5005
|
+
var schema80 = { "enum": ["app", "router", "on", "off", "pool", "db", "exe", "idx", "sign", "env", "lock", "check", "flag", "x", "chain", "net", "user", "server", "key", "shield", "globe", "bolt", "doc", "box", "truck", "card", "cart", "clock", "branch", "cloud", "refresh", "undo", "yen", "layers", "code", "paint", "tree", "block"] };
|
|
4999
5006
|
var pattern0 = new RegExp("^[^\\s\\[\\]\u300C\u300D=:]+$", "u");
|
|
5000
5007
|
var func3 = ucs2length;
|
|
5001
5008
|
function validate30(data, { instancePath = "", parentData, parentDataProperty, rootData = data } = {}) {
|
|
@@ -5111,32 +5118,22 @@ function validate30(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
5111
5118
|
}
|
|
5112
5119
|
if (data.icon !== void 0) {
|
|
5113
5120
|
let data4 = data.icon;
|
|
5114
|
-
if (
|
|
5115
|
-
|
|
5116
|
-
const err10 = { instancePath: instancePath + "/icon", schemaPath: "#/definitions/text/minLength", keyword: "minLength", params: { limit: 1 }, message: "must NOT have fewer than 1 characters" };
|
|
5117
|
-
if (vErrors === null) {
|
|
5118
|
-
vErrors = [err10];
|
|
5119
|
-
} else {
|
|
5120
|
-
vErrors.push(err10);
|
|
5121
|
-
}
|
|
5122
|
-
errors++;
|
|
5123
|
-
}
|
|
5124
|
-
} else {
|
|
5125
|
-
const err11 = { instancePath: instancePath + "/icon", schemaPath: "#/definitions/text/type", keyword: "type", params: { type: "string" }, message: "must be string" };
|
|
5121
|
+
if (!(data4 === "app" || data4 === "router" || data4 === "on" || data4 === "off" || data4 === "pool" || data4 === "db" || data4 === "exe" || data4 === "idx" || data4 === "sign" || data4 === "env" || data4 === "lock" || data4 === "check" || data4 === "flag" || data4 === "x" || data4 === "chain" || data4 === "net" || data4 === "user" || data4 === "server" || data4 === "key" || data4 === "shield" || data4 === "globe" || data4 === "bolt" || data4 === "doc" || data4 === "box" || data4 === "truck" || data4 === "card" || data4 === "cart" || data4 === "clock" || data4 === "branch" || data4 === "cloud" || data4 === "refresh" || data4 === "undo" || data4 === "yen" || data4 === "layers" || data4 === "code" || data4 === "paint" || data4 === "tree" || data4 === "block")) {
|
|
5122
|
+
const err10 = { instancePath: instancePath + "/icon", schemaPath: "#/definitions/icon/enum", keyword: "enum", params: { allowedValues: schema80.enum }, message: "must be equal to one of the allowed values" };
|
|
5126
5123
|
if (vErrors === null) {
|
|
5127
|
-
vErrors = [
|
|
5124
|
+
vErrors = [err10];
|
|
5128
5125
|
} else {
|
|
5129
|
-
vErrors.push(
|
|
5126
|
+
vErrors.push(err10);
|
|
5130
5127
|
}
|
|
5131
5128
|
errors++;
|
|
5132
5129
|
}
|
|
5133
5130
|
}
|
|
5134
5131
|
} else {
|
|
5135
|
-
const
|
|
5132
|
+
const err11 = { instancePath, schemaPath: "#/type", keyword: "type", params: { type: "object" }, message: "must be object" };
|
|
5136
5133
|
if (vErrors === null) {
|
|
5137
|
-
vErrors = [
|
|
5134
|
+
vErrors = [err11];
|
|
5138
5135
|
} else {
|
|
5139
|
-
vErrors.push(
|
|
5136
|
+
vErrors.push(err11);
|
|
5140
5137
|
}
|
|
5141
5138
|
errors++;
|
|
5142
5139
|
}
|
|
@@ -5257,22 +5254,12 @@ function validate32(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
5257
5254
|
}
|
|
5258
5255
|
if (data.icon !== void 0) {
|
|
5259
5256
|
let data4 = data.icon;
|
|
5260
|
-
if (
|
|
5261
|
-
|
|
5262
|
-
const err10 = { instancePath: instancePath + "/icon", schemaPath: "#/definitions/text/minLength", keyword: "minLength", params: { limit: 1 }, message: "must NOT have fewer than 1 characters" };
|
|
5263
|
-
if (vErrors === null) {
|
|
5264
|
-
vErrors = [err10];
|
|
5265
|
-
} else {
|
|
5266
|
-
vErrors.push(err10);
|
|
5267
|
-
}
|
|
5268
|
-
errors++;
|
|
5269
|
-
}
|
|
5270
|
-
} else {
|
|
5271
|
-
const err11 = { instancePath: instancePath + "/icon", schemaPath: "#/definitions/text/type", keyword: "type", params: { type: "string" }, message: "must be string" };
|
|
5257
|
+
if (!(data4 === "app" || data4 === "router" || data4 === "on" || data4 === "off" || data4 === "pool" || data4 === "db" || data4 === "exe" || data4 === "idx" || data4 === "sign" || data4 === "env" || data4 === "lock" || data4 === "check" || data4 === "flag" || data4 === "x" || data4 === "chain" || data4 === "net" || data4 === "user" || data4 === "server" || data4 === "key" || data4 === "shield" || data4 === "globe" || data4 === "bolt" || data4 === "doc" || data4 === "box" || data4 === "truck" || data4 === "card" || data4 === "cart" || data4 === "clock" || data4 === "branch" || data4 === "cloud" || data4 === "refresh" || data4 === "undo" || data4 === "yen" || data4 === "layers" || data4 === "code" || data4 === "paint" || data4 === "tree" || data4 === "block")) {
|
|
5258
|
+
const err10 = { instancePath: instancePath + "/icon", schemaPath: "#/definitions/icon/enum", keyword: "enum", params: { allowedValues: schema80.enum }, message: "must be equal to one of the allowed values" };
|
|
5272
5259
|
if (vErrors === null) {
|
|
5273
|
-
vErrors = [
|
|
5260
|
+
vErrors = [err10];
|
|
5274
5261
|
} else {
|
|
5275
|
-
vErrors.push(
|
|
5262
|
+
vErrors.push(err10);
|
|
5276
5263
|
}
|
|
5277
5264
|
errors++;
|
|
5278
5265
|
}
|
|
@@ -5281,20 +5268,20 @@ function validate32(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
5281
5268
|
let data5 = data.region;
|
|
5282
5269
|
if (typeof data5 === "string") {
|
|
5283
5270
|
if (!pattern0.test(data5)) {
|
|
5284
|
-
const
|
|
5271
|
+
const err11 = { instancePath: instancePath + "/region", schemaPath: "#/definitions/id/pattern", keyword: "pattern", params: { pattern: "^[^\\s\\[\\]\u300C\u300D=:]+$" }, message: 'must match pattern "^[^\\s\\[\\]\u300C\u300D=:]+$"' };
|
|
5285
5272
|
if (vErrors === null) {
|
|
5286
|
-
vErrors = [
|
|
5273
|
+
vErrors = [err11];
|
|
5287
5274
|
} else {
|
|
5288
|
-
vErrors.push(
|
|
5275
|
+
vErrors.push(err11);
|
|
5289
5276
|
}
|
|
5290
5277
|
errors++;
|
|
5291
5278
|
}
|
|
5292
5279
|
} else {
|
|
5293
|
-
const
|
|
5280
|
+
const err12 = { instancePath: instancePath + "/region", schemaPath: "#/definitions/id/type", keyword: "type", params: { type: "string" }, message: "must be string" };
|
|
5294
5281
|
if (vErrors === null) {
|
|
5295
|
-
vErrors = [
|
|
5282
|
+
vErrors = [err12];
|
|
5296
5283
|
} else {
|
|
5297
|
-
vErrors.push(
|
|
5284
|
+
vErrors.push(err12);
|
|
5298
5285
|
}
|
|
5299
5286
|
errors++;
|
|
5300
5287
|
}
|
|
@@ -5303,30 +5290,30 @@ function validate32(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
5303
5290
|
let data6 = data.link;
|
|
5304
5291
|
if (typeof data6 === "string") {
|
|
5305
5292
|
if (!pattern3.test(data6)) {
|
|
5306
|
-
const
|
|
5293
|
+
const err13 = { instancePath: instancePath + "/link", schemaPath: "#/definitions/url/pattern", keyword: "pattern", params: { pattern: "^(/|https?://)" }, message: 'must match pattern "^(/|https?://)"' };
|
|
5307
5294
|
if (vErrors === null) {
|
|
5308
|
-
vErrors = [
|
|
5295
|
+
vErrors = [err13];
|
|
5309
5296
|
} else {
|
|
5310
|
-
vErrors.push(
|
|
5297
|
+
vErrors.push(err13);
|
|
5311
5298
|
}
|
|
5312
5299
|
errors++;
|
|
5313
5300
|
}
|
|
5314
5301
|
} else {
|
|
5315
|
-
const
|
|
5302
|
+
const err14 = { instancePath: instancePath + "/link", schemaPath: "#/definitions/url/type", keyword: "type", params: { type: "string" }, message: "must be string" };
|
|
5316
5303
|
if (vErrors === null) {
|
|
5317
|
-
vErrors = [
|
|
5304
|
+
vErrors = [err14];
|
|
5318
5305
|
} else {
|
|
5319
|
-
vErrors.push(
|
|
5306
|
+
vErrors.push(err14);
|
|
5320
5307
|
}
|
|
5321
5308
|
errors++;
|
|
5322
5309
|
}
|
|
5323
5310
|
}
|
|
5324
5311
|
} else {
|
|
5325
|
-
const
|
|
5312
|
+
const err15 = { instancePath, schemaPath: "#/type", keyword: "type", params: { type: "object" }, message: "must be object" };
|
|
5326
5313
|
if (vErrors === null) {
|
|
5327
|
-
vErrors = [
|
|
5314
|
+
vErrors = [err15];
|
|
5328
5315
|
} else {
|
|
5329
|
-
vErrors.push(
|
|
5316
|
+
vErrors.push(err15);
|
|
5330
5317
|
}
|
|
5331
5318
|
errors++;
|
|
5332
5319
|
}
|
|
@@ -10378,6 +10365,7 @@ function validate10(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
10378
10365
|
|
|
10379
10366
|
// src/schema.ts
|
|
10380
10367
|
var COLORS = ["blue", "amber", "green", "violet", "rose", "slate", "coin"];
|
|
10368
|
+
var ICON_NAMES = Object.keys(ICONS);
|
|
10381
10369
|
var EVENT_TYPES = ["edge", "action", "swap", "strip", "commit", "branch", "now", "mark", "span", "leaf", "node", "line", "seal", "open", "pick", "stamp"];
|
|
10382
10370
|
var ABSENT = "#/definitions/absent/not";
|
|
10383
10371
|
var ABSENT_KINDS = {
|
|
@@ -10554,6 +10542,7 @@ var ja3 = () => {
|
|
|
10554
10542
|
attrTwice: (key2) => `${key2} \u306F 1 \u3064\u306E\u884C\u306B 1 \u3064\u307E\u3067`,
|
|
10555
10543
|
badAttr: (key2, allowed) => `${key2} \u306F\u3053\u306E\u884C\u306B\u66F8\u3051\u306A\u3044\u5C5E\u6027\u3002\u66F8\u3051\u308B\u306E\u306F ${list(allowed)}`,
|
|
10556
10544
|
badColor: `color \u306F ${list(COLORS)} \u306E\u3069\u308C\u304B`,
|
|
10545
|
+
badIcon: `icon \u306F ${list(ICON_NAMES)} \u306E\u3069\u308C\u304B`,
|
|
10557
10546
|
badView: `view \u306F ${list(VIEWS)} \u306E\u3069\u308C\u304B`,
|
|
10558
10547
|
badCarry: `carry \u306F ${list(CARRIES)} \u306E\u3069\u308C\u304B\u3002\u672D\u306F tag: <\u5024> \u3067\u66F8\u304F`,
|
|
10559
10548
|
badSide: `side \u306F ${list(SIDES)} \u306E\u3069\u308C\u304B`,
|
|
@@ -10692,6 +10681,7 @@ var en2 = () => {
|
|
|
10692
10681
|
attrTwice: (key2) => `Write ${key2} only once on a line`,
|
|
10693
10682
|
badAttr: (key2, allowed) => `${key2} cannot be written on this line. Write ${list(allowed)}`,
|
|
10694
10683
|
badColor: `color is one of ${list(COLORS)}`,
|
|
10684
|
+
badIcon: `icon is one of ${list(ICON_NAMES)}`,
|
|
10695
10685
|
badView: `view is one of ${list(VIEWS)}`,
|
|
10696
10686
|
badCarry: `carry is one of ${list(CARRIES)}. Write a tag as tag: <value>`,
|
|
10697
10687
|
badSide: `side is one of ${list(SIDES)}`,
|
|
@@ -10951,12 +10941,13 @@ function readDeclared(source, word, allowed, m) {
|
|
|
10951
10941
|
function lookOf(source, attrs2, m) {
|
|
10952
10942
|
const color = attrs2.get("color");
|
|
10953
10943
|
if (color && !isOneOf(COLORS, color.value)) throw fail(source, color.at, m.badColor);
|
|
10944
|
+
const icon = attrs2.get("icon");
|
|
10945
|
+
if (icon && !ICON_NAMES.includes(icon.value)) throw fail(source, icon.at, m.badIcon);
|
|
10954
10946
|
const note = attrs2.get("note")?.value;
|
|
10955
|
-
const icon = attrs2.get("icon")?.value;
|
|
10956
10947
|
return {
|
|
10957
10948
|
...note !== void 0 ? { note } : {},
|
|
10958
10949
|
...color ? { color: color.value } : {},
|
|
10959
|
-
...icon
|
|
10950
|
+
...icon ? { icon: icon.value } : {}
|
|
10960
10951
|
};
|
|
10961
10952
|
}
|
|
10962
10953
|
function oldForm(text2, inStep) {
|
|
@@ -13079,7 +13070,7 @@ function drawSvg(diagram, layout, timeline, palette, theme, follow, ink = [], tr
|
|
|
13079
13070
|
const vars = paletteVars(palette, theme);
|
|
13080
13071
|
const id = nameOf(`${JSON.stringify(diagram)}|${vars}|${follow ? `${follow.width}|${follow.lang}` : ""}`);
|
|
13081
13072
|
const m = new Motion(`dg${id}`, timeline.total, timeline.last);
|
|
13082
|
-
const ctx = { m, t: timeline, id, sh: `filter="url(#dg-sh-${id})"`, end: timeline.steps[timeline.steps.length - 1].end, ink, traces };
|
|
13073
|
+
const ctx = { m, t: timeline, id, sh: `filter="url(#dg-sh-${id})"`, end: timeline.steps[timeline.steps.length - 1].end, ink, traces, boxText: boxTextY(layout.boxes) };
|
|
13083
13074
|
const on = involved(diagram);
|
|
13084
13075
|
const subs = subChanges(diagram, timeline, layout.kind !== "sequence");
|
|
13085
13076
|
const L = { band: [], base: [], lit: [], node: [], badge: [], top: [] };
|