@diagrammo/dgmo 0.58.0 → 0.59.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/advanced.js +89 -89
- package/dist/auto.js +123 -123
- package/dist/auto.mjs +166 -64
- package/dist/block.js +46 -46
- package/dist/{calculator-BBKAAQGD.js → calculator-ORAKSL5D.js} +4 -2
- package/dist/chart-meta.js +42 -42
- package/dist/{charts-d3-K5M5J5ZM.js → charts-d3-JBNDV6TY.js} +5 -5
- package/dist/{chunk-4CE2GOC2.js → chunk-2NSR6INI.js} +3 -3
- package/dist/{chunk-E55OZDFH.js → chunk-2SUUYIFC.js} +2 -2
- package/dist/{chunk-W2RU24DD.js → chunk-3T2PKOTK.js} +4 -4
- package/dist/{chunk-NSUAU6JQ.js → chunk-4IFPX4J6.js} +2 -2
- package/dist/{chunk-DWMJLEBT.js → chunk-4KRYJGBY.js} +4 -4
- package/dist/{chunk-SBQXLX6Y.js → chunk-4YQI7ELC.js} +3 -3
- package/dist/{chunk-GAFNYUNJ.js → chunk-5XV3Z3UJ.js} +32 -12
- package/dist/{chunk-S3AZMBK7.js → chunk-65AMRH2N.js} +3 -3
- package/dist/{chunk-OMOU2V3W.js → chunk-6F74K4JL.js} +51 -14
- package/dist/{chunk-52KLHCXQ.js → chunk-6KWE5553.js} +30 -17
- package/dist/{chunk-NGGVVTP2.js → chunk-6M3QPUHL.js} +5 -5
- package/dist/{chunk-5RPSN32F.js → chunk-6XWZKCVS.js} +3 -3
- package/dist/{chunk-PH5WK6G5.js → chunk-6YY56KU2.js} +7 -5
- package/dist/{chunk-CZIFUXI2.js → chunk-75LW3IUQ.js} +3 -3
- package/dist/{chunk-UPTAWSCG.js → chunk-7XTJGMH6.js} +2 -2
- package/dist/{chunk-N7PF5IRF.js → chunk-A6L6W43V.js} +2 -2
- package/dist/{chunk-HBIGEWRC.js → chunk-AFBQEBKL.js} +3 -3
- package/dist/{chunk-VBSKNQUO.js → chunk-BFAU3OPW.js} +4 -4
- package/dist/{chunk-W22JRLNA.js → chunk-BG23Y7JD.js} +3 -3
- package/dist/{chunk-MF4FDLFG.js → chunk-BGBGWFUI.js} +3 -3
- package/dist/{chunk-NQGE76NC.js → chunk-BGT6SAR2.js} +3 -3
- package/dist/{chunk-6KTRV3O5.js → chunk-BVPRRSMX.js} +3 -3
- package/dist/{chunk-PIIORN3Q.js → chunk-CRE3BAKN.js} +3 -3
- package/dist/{chunk-4ESLORPX.js → chunk-DD6EA4DU.js} +3 -3
- package/dist/{chunk-RB3AFVPT.js → chunk-DDQ47BMP.js} +3 -3
- package/dist/{chunk-VJYERZ2Q.js → chunk-DH3NCG4B.js} +3 -3
- package/dist/{chunk-DUI5SMFX.js → chunk-DKG2ADEN.js} +8 -5
- package/dist/{chunk-7UZFAIKI.js → chunk-E6QWV2G4.js} +4 -4
- package/dist/{chunk-6F3MVYUW.js → chunk-EIRNPTLH.js} +3 -3
- package/dist/{chunk-KNCY7YHC.js → chunk-EKKS325Q.js} +2 -2
- package/dist/{chunk-YILSSUEL.js → chunk-EQGLGTU2.js} +3 -3
- package/dist/{chunk-B4U7RRQ4.js → chunk-EYP34TFP.js} +2 -2
- package/dist/{chunk-RDHZRHDG.js → chunk-GCZQAT4Z.js} +3 -3
- package/dist/{chunk-X3YNX4DR.js → chunk-GSVHOF3J.js} +2 -2
- package/dist/{chunk-7SGR7A5K.js → chunk-HQI7S72D.js} +4 -4
- package/dist/{chunk-TXQXPJTG.js → chunk-HSVVQZLC.js} +2 -2
- package/dist/{chunk-E6CCWMTT.js → chunk-I24URUTV.js} +5 -5
- package/dist/{chunk-2UBTPFIF.js → chunk-I53E3L5M.js} +9 -7
- package/dist/{chunk-W6T5QRIR.js → chunk-IH3GHOHU.js} +7 -6
- package/dist/{chunk-7Q6HX7ON.js → chunk-IMEWQLRD.js} +2 -2
- package/dist/{chunk-E7HANW62.js → chunk-IXY2IPOW.js} +19 -2
- package/dist/{chunk-4UNGFVVY.js → chunk-KJ3FIMPA.js} +2 -2
- package/dist/{chunk-AU4AQYOA.js → chunk-KZFAEMQQ.js} +3 -3
- package/dist/{chunk-FWNJ45NW.js → chunk-LBEZKYAR.js} +2 -2
- package/dist/{chunk-3LMUMAUS.js → chunk-LLA5C2TM.js} +14 -3
- package/dist/{chunk-QS37VUFZ.js → chunk-MM4Z32EH.js} +2 -2
- package/dist/{chunk-STYJ6EOV.js → chunk-NCW6NQPD.js} +84 -84
- package/dist/{chunk-DZUDSGGQ.js → chunk-O66TS32B.js} +5 -5
- package/dist/{chunk-X4JEAY73.js → chunk-OANGI4EI.js} +5 -5
- package/dist/{chunk-JM65HLBZ.js → chunk-OBWIIXSZ.js} +6 -6
- package/dist/{chunk-CBPFVH3N.js → chunk-OIL6MTVH.js} +4 -4
- package/dist/{chunk-FXIG472W.js → chunk-OJD4FU6H.js} +2 -2
- package/dist/{chunk-DWAQXY6T.js → chunk-OSXJY6SY.js} +3 -3
- package/dist/{chunk-YKMOI6ZG.js → chunk-PH36NIGK.js} +4 -4
- package/dist/{chunk-XHTRLRZ5.js → chunk-PNCACNE5.js} +3 -3
- package/dist/{chunk-WYGLKR4I.js → chunk-PSWWCLLI.js} +3 -3
- package/dist/{chunk-WYG5VJY2.js → chunk-QG3RU7YT.js} +2 -2
- package/dist/{chunk-QDOSCTL5.js → chunk-QTJZRAXM.js} +2 -2
- package/dist/{chunk-ATKB7VEN.js → chunk-R53THUTP.js} +4 -4
- package/dist/{chunk-5RY4W7J6.js → chunk-RVCBPDCK.js} +3 -3
- package/dist/{chunk-HUYAMTCD.js → chunk-S5OQWV54.js} +2 -2
- package/dist/{chunk-NPBAV3QU.js → chunk-SEPM6JZV.js} +5 -5
- package/dist/{chunk-6JYE3SDK.js → chunk-SJT4W23S.js} +2 -2
- package/dist/{chunk-MPPOQOCF.js → chunk-SLGHGT76.js} +2 -2
- package/dist/{chunk-WQWVLAA5.js → chunk-SQLVM3G7.js} +4 -4
- package/dist/{chunk-TQC2SUMJ.js → chunk-TDZRLG7I.js} +2 -2
- package/dist/{chunk-NYCBN7YE.js → chunk-TJV3J74Y.js} +3 -3
- package/dist/{chunk-UFDLQKCR.js → chunk-TL6WZWSZ.js} +2 -2
- package/dist/{chunk-IRN5GBBO.js → chunk-TLJPI6WL.js} +6 -6
- package/dist/{chunk-SQK4EKOW.js → chunk-TR7WNZFJ.js} +3 -3
- package/dist/{chunk-LYQMN35H.js → chunk-U5UKFXHB.js} +2 -2
- package/dist/{chunk-EDJYIQZM.js → chunk-UF7WAYBH.js} +2 -2
- package/dist/{chunk-C7IKQOEQ.js → chunk-UWJNAEMY.js} +6 -6
- package/dist/{chunk-LLDNNANC.js → chunk-UYY7MVJK.js} +3 -3
- package/dist/{chunk-3DY7TNZ7.js → chunk-V5PHEH2M.js} +2 -2
- package/dist/{chunk-HXTS54OV.js → chunk-VGFUVFJA.js} +17 -12
- package/dist/{chunk-L5DQB4C7.js → chunk-VIFFJOOR.js} +5 -5
- package/dist/{chunk-KAG5JCZV.js → chunk-W2Z4KS72.js} +6 -4
- package/dist/{chunk-YAG7WAQE.js → chunk-WBALHD3K.js} +6 -6
- package/dist/{chunk-ZW7LTYW2.js → chunk-WCSVZW2W.js} +2 -2
- package/dist/{chunk-BFYPHZ5M.js → chunk-XS7CL7NX.js} +2 -2
- package/dist/{chunk-XXAHWYQU.js → chunk-XVOGT46C.js} +2 -2
- package/dist/{chunk-OXANJRNK.js → chunk-Y7KHN3MQ.js} +2 -2
- package/dist/{chunk-GGKWKNOL.js → chunk-YOK3BMEW.js} +4 -4
- package/dist/{chunk-ILZHMKYQ.js → chunk-YPEMNAC7.js} +3 -3
- package/dist/{chunk-2JPEBOUQ.js → chunk-YURNIF7Q.js} +40 -40
- package/dist/{chunk-NW2K6UU2.js → chunk-ZBOSGLES.js} +8 -7
- package/dist/{chunk-EEF7BUX7.js → chunk-ZED4URQK.js} +6 -6
- package/dist/{chunk-ZKNSLC35.js → chunk-ZTSBP3AH.js} +8 -5
- package/dist/cli.cjs +147 -147
- package/dist/completion-registry.js +3 -3
- package/dist/dgmo-router-I2LJOEAQ.js +90 -0
- package/dist/{dimensions-HSIQYP5Z.js → dimensions-3IMJDSTT.js} +5 -5
- package/dist/element.js +124 -124
- package/dist/element.mjs +166 -64
- package/dist/{flowchart-parser-I2TEUWAP.js → flowchart-parser-PZQY2UC4.js} +4 -4
- package/dist/{flowchart-renderer-ER66DNCI.js → flowchart-renderer-CKUW63MB.js} +5 -5
- package/dist/index.js +46 -46
- package/dist/{layout-VNEBCYPX.js → layout-2NWRELPU.js} +4 -4
- package/dist/{layout-V5X3U3WB.js → layout-47LIQXNX.js} +4 -4
- package/dist/{layout-HTDK3DMG.js → layout-IXNU33JR.js} +4 -4
- package/dist/{layout-3QMCSW6B.js → layout-LH6LNIUV.js} +3 -3
- package/dist/{layout-VFUHKLTS.js → layout-MAMV4RZF.js} +3 -3
- package/dist/{layout-K4S54TX7.js → layout-NHNIMAHX.js} +4 -4
- package/dist/{parser-3M3QQRCZ.js → parser-2OJSWKXO.js} +4 -4
- package/dist/{parser-6I3NOLKL.js → parser-3QHLZK6F.js} +3 -3
- package/dist/{parser-X3TCE7P5.js → parser-453DEZ4P.js} +4 -4
- package/dist/{parser-67JHR6I6.js → parser-4QYDFXV2.js} +4 -4
- package/dist/{parser-S6QH3QIK.js → parser-55CSWK3N.js} +4 -4
- package/dist/{parser-QVX4FR3J.js → parser-56HMQG5C.js} +5 -5
- package/dist/{parser-AE7RC4IJ.js → parser-5BHZMV3O.js} +4 -4
- package/dist/{parser-FLCLHHOM.js → parser-5I7W54EA.js} +4 -4
- package/dist/{parser-J3FUTZAQ.js → parser-5KOJWHOR.js} +3 -3
- package/dist/{parser-ISJJO7TJ.js → parser-63LK7YBR.js} +5 -5
- package/dist/{parser-2RTQF2LA.js → parser-6HT34DZ3.js} +4 -4
- package/dist/{parser-MKJ52TD7.js → parser-6S65S3DX.js} +4 -4
- package/dist/{parser-6GXEHNZD.js → parser-7C5GZCAU.js} +4 -4
- package/dist/{parser-UVS6OHCO.js → parser-7W7DPIGR.js} +4 -4
- package/dist/{parser-KKBW25LM.js → parser-AD5OAVX6.js} +3 -3
- package/dist/{parser-MPQTXCBQ.js → parser-AWO3N6YH.js} +3 -3
- package/dist/{parser-N7SSE4SK.js → parser-BLCDJB7N.js} +4 -4
- package/dist/{parser-XXYB4TRG.js → parser-BNGLB2VS.js} +4 -4
- package/dist/{parser-BVHECXAJ.js → parser-BVC642CN.js} +4 -4
- package/dist/{parser-GH2Y6CR4.js → parser-CXLR6MAY.js} +3 -3
- package/dist/{parser-7VNCLF77.js → parser-DROHJTBZ.js} +4 -4
- package/dist/{parser-GUUNA7WE.js → parser-G7KP6LZH.js} +3 -3
- package/dist/{parser-4WSJVVG6.js → parser-IWQQY5VU.js} +4 -4
- package/dist/{parser-JY7ZU5PP.js → parser-NJGZF5MK.js} +5 -5
- package/dist/{parser-BDGMJSZB.js → parser-QCSDU4FU.js} +3 -3
- package/dist/{parser-FSSAJO2M.js → parser-QCYEJOLZ.js} +4 -4
- package/dist/{parser-UODHU3EP.js → parser-QJ7XK7AB.js} +4 -4
- package/dist/{parser-2VTOUMJY.js → parser-RMUGOZO3.js} +4 -4
- package/dist/{parser-N3AAAGTA.js → parser-TABGTEHH.js} +3 -3
- package/dist/{parser-NKHBUGAX.js → parser-TPCKCQ4Z.js} +4 -4
- package/dist/{parser-M74SVSPT.js → parser-UB6XGLTC.js} +4 -4
- package/dist/{parser-XQKSQBOT.js → parser-WI2B7IL3.js} +3 -3
- package/dist/{parser-NH6IAVZJ.js → parser-WXZU47Z4.js} +3 -3
- package/dist/{renderer-I7Q5U2TU.js → renderer-2OQMYNQD.js} +5 -5
- package/dist/{renderer-SL5LE7MU.js → renderer-4S5LOABJ.js} +7 -7
- package/dist/{renderer-VDCGDJ6L.js → renderer-6NQZLBMX.js} +5 -5
- package/dist/{renderer-2IO3H53I.js → renderer-73L6XERY.js} +5 -5
- package/dist/{renderer-CUXXNHFU.js → renderer-7EAS7J35.js} +6 -6
- package/dist/{renderer-2SK7UM4O.js → renderer-A2APCS6I.js} +5 -5
- package/dist/{renderer-LXIIZ3BH.js → renderer-AWFHCLXQ.js} +7 -7
- package/dist/{renderer-ZLJ5CCSO.js → renderer-CQBLODU3.js} +5 -5
- package/dist/{renderer-SL5IQJKB.js → renderer-F5YIKPAC.js} +7 -7
- package/dist/{renderer-QGZ2BOJG.js → renderer-G24W6J6H.js} +4 -4
- package/dist/{renderer-7AVFPE3Q.js → renderer-I3WY546K.js} +4 -4
- package/dist/{renderer-MTX6PLPA.js → renderer-KYWN5KRD.js} +6 -6
- package/dist/{renderer-Y64MT4JM.js → renderer-LDSHG26O.js} +6 -6
- package/dist/{renderer-44EXXXRC.js → renderer-LOTDM5WH.js} +7 -7
- package/dist/{renderer-BLPXBLUP.js → renderer-M225GOP2.js} +5 -5
- package/dist/{renderer-XRC5R3OP.js → renderer-NTKY64DL.js} +5 -5
- package/dist/{renderer-JIUVU3PF.js → renderer-PQXPBXKE.js} +3 -3
- package/dist/{renderer-C7LFE5CB.js → renderer-QFWLXG6G.js} +7 -7
- package/dist/{renderer-ZY5TXTS5.js → renderer-QGZBFYMZ.js} +5 -5
- package/dist/{renderer-34GG6RHO.js → renderer-QMOSWMHK.js} +6 -6
- package/dist/{renderer-BA6WTWVL.js → renderer-R7JEM7R7.js} +5 -5
- package/dist/{renderer-SXZBGMEH.js → renderer-RB3DGCF4.js} +3 -3
- package/dist/{renderer-4SH6U6WF.js → renderer-RNTCDM5N.js} +6 -6
- package/dist/{renderer-4WQRF2SK.js → renderer-RRIXAQSF.js} +5 -5
- package/dist/renderer-T3JBQLLW.js +77 -0
- package/dist/{renderer-DVUKHOFB.js → renderer-VHYLVS2K.js} +7 -7
- package/dist/{renderer-XJFRVCF6.js → renderer-VN3RCFHI.js} +7 -7
- package/dist/{renderer-DRNJJNAE.js → renderer-WAXZMPYS.js} +3 -3
- package/dist/{renderer-UPANX7XK.js → renderer-X75XWLQS.js} +7 -7
- package/dist/{renderer-2KDW3TWO.js → renderer-ZHGAY3Y6.js} +5 -5
- package/dist/{renderer-radial-4YKK4JNW.js → renderer-radial-C67KGADM.js} +6 -6
- package/dist/{state-parser-3PFFJO5M.js → state-parser-PNC2IHIA.js} +5 -5
- package/dist/{state-renderer-2HDVRUNG.js → state-renderer-U4QW5YMY.js} +7 -7
- package/package.json +1 -1
- package/dist/dgmo-router-2637N4DY.js +0 -90
- package/dist/renderer-2G7Q3L5W.js +0 -77
package/dist/element.mjs
CHANGED
|
@@ -861,7 +861,12 @@ function staticRegistry(keys) {
|
|
|
861
861
|
return { keys: new Set(keys), tagAliases: /* @__PURE__ */ new Set() };
|
|
862
862
|
}
|
|
863
863
|
function withTagAliases(base, aliases) {
|
|
864
|
-
|
|
864
|
+
const withSlugs = new Set(aliases);
|
|
865
|
+
for (const alias of aliases) withSlugs.add(tagSlug(alias));
|
|
866
|
+
return { keys: base.keys, tagAliases: withSlugs };
|
|
867
|
+
}
|
|
868
|
+
function tagSlug(name) {
|
|
869
|
+
return name.trim().toLowerCase().replace(/[^a-z0-9_-]+/g, "-").replace(/^-+|-+$/g, "");
|
|
865
870
|
}
|
|
866
871
|
function isReservedKey(registry, key) {
|
|
867
872
|
return registry.keys.has(key) || registry.tagAliases.has(key);
|
|
@@ -1156,6 +1161,17 @@ function stripQuotes(token) {
|
|
|
1156
1161
|
}
|
|
1157
1162
|
return token;
|
|
1158
1163
|
}
|
|
1164
|
+
function peelQuotedName(name) {
|
|
1165
|
+
const trimmed = name.trim();
|
|
1166
|
+
if (trimmed.length < 2) return name;
|
|
1167
|
+
const first = trimmed[0];
|
|
1168
|
+
const last = trimmed[trimmed.length - 1];
|
|
1169
|
+
if ((first !== '"' || last !== '"') && (first !== "'" || last !== "'"))
|
|
1170
|
+
return name;
|
|
1171
|
+
const inner = trimmed.slice(1, -1);
|
|
1172
|
+
if (inner.length === 0 || inner.includes(first)) return name;
|
|
1173
|
+
return inner;
|
|
1174
|
+
}
|
|
1159
1175
|
function tokenizeQuoteAware(input) {
|
|
1160
1176
|
const tokens = [];
|
|
1161
1177
|
let i = 0;
|
|
@@ -1600,7 +1616,17 @@ function assignAutoTagColors(group, palette) {
|
|
|
1600
1616
|
}
|
|
1601
1617
|
}
|
|
1602
1618
|
function finalizeAutoTagColors(groups, palette) {
|
|
1603
|
-
for (const g of groups)
|
|
1619
|
+
for (const g of groups) {
|
|
1620
|
+
for (let i = 0; i < g.entries.length; i++) {
|
|
1621
|
+
const entry = g.entries[i];
|
|
1622
|
+
const peeled = peelQuotedName(entry.value);
|
|
1623
|
+
if (peeled !== entry.value) g.entries[i] = { ...entry, value: peeled };
|
|
1624
|
+
}
|
|
1625
|
+
if (g.defaultValue !== void 0) {
|
|
1626
|
+
g.defaultValue = peelQuotedName(g.defaultValue);
|
|
1627
|
+
}
|
|
1628
|
+
assignAutoTagColors(g, palette);
|
|
1629
|
+
}
|
|
1604
1630
|
}
|
|
1605
1631
|
function isAliasToken(token) {
|
|
1606
1632
|
return /^[A-Za-z][A-Za-z0-9_]{0,11}$/.test(token);
|
|
@@ -8459,7 +8485,7 @@ function parseNoteLine(trimmed, participants, participantIds, sortedParticipants
|
|
|
8459
8485
|
if (!lastMsgFrom) return { kind: "skip" };
|
|
8460
8486
|
participantId = lastMsgFrom;
|
|
8461
8487
|
}
|
|
8462
|
-
const lookupKey = normalizeName(participantId);
|
|
8488
|
+
const lookupKey = normalizeName(peelQuotedName(participantId));
|
|
8463
8489
|
if (participantIds.has(lookupKey)) {
|
|
8464
8490
|
const found = participants.find((p) => normalizeName(p.id) === lookupKey);
|
|
8465
8491
|
return {
|
|
@@ -8623,8 +8649,9 @@ function parseSequenceDgmo(content, palette) {
|
|
|
8623
8649
|
const participantIds = /* @__PURE__ */ new Set();
|
|
8624
8650
|
const idByKey = /* @__PURE__ */ new Map();
|
|
8625
8651
|
const addParticipant = (name, lineNumber, extras) => {
|
|
8626
|
-
const
|
|
8627
|
-
const
|
|
8652
|
+
const peeled = peelQuotedName(name);
|
|
8653
|
+
const key = normalizeName(peeled);
|
|
8654
|
+
const trimmed = peeled.trim();
|
|
8628
8655
|
const incomingLabel = extras?.label ?? trimmed;
|
|
8629
8656
|
if (participantIds.has(key)) {
|
|
8630
8657
|
const existing = result.participants.find(
|
|
@@ -8656,7 +8683,7 @@ function parseSequenceDgmo(content, palette) {
|
|
|
8656
8683
|
result.participants.push({
|
|
8657
8684
|
id: trimmed,
|
|
8658
8685
|
label: incomingLabel,
|
|
8659
|
-
type: extras?.type ?? inferParticipantType(
|
|
8686
|
+
type: extras?.type ?? inferParticipantType(peeled),
|
|
8660
8687
|
lineNumber,
|
|
8661
8688
|
...extras?.position !== void 0 ? { position: extras.position } : {},
|
|
8662
8689
|
// takePosition() may have emptied the metadata record (position was
|
|
@@ -12312,6 +12339,7 @@ function parseOrg(content, palette) {
|
|
|
12312
12339
|
const containerMatch = trimmed.match(CONTAINER_RE);
|
|
12313
12340
|
const metadataMatch = (() => {
|
|
12314
12341
|
if (trimmed.includes("|")) return null;
|
|
12342
|
+
if (trimmed.startsWith('"') || trimmed.startsWith("'")) return null;
|
|
12315
12343
|
const m = trimmed.match(METADATA_RE);
|
|
12316
12344
|
if (!m) return null;
|
|
12317
12345
|
const keyRegion = m[1].trim();
|
|
@@ -12323,7 +12351,7 @@ function parseOrg(content, palette) {
|
|
|
12323
12351
|
const asMatch = rawLabel.match(
|
|
12324
12352
|
/^(.*?)\s+as\s+([A-Za-z][A-Za-z0-9_]{0,11})\s*$/
|
|
12325
12353
|
);
|
|
12326
|
-
const label = asMatch ? asMatch[1].trim() : rawLabel;
|
|
12354
|
+
const label = peelQuotedName(asMatch ? asMatch[1].trim() : rawLabel);
|
|
12327
12355
|
containerCounter++;
|
|
12328
12356
|
const containerId = `container-${containerCounter}`;
|
|
12329
12357
|
if (asMatch) nameAliasMap.set(asMatch[2], containerId);
|
|
@@ -12421,7 +12449,8 @@ function parseNodeLabel(trimmed, _indent, lineNumber, _palette, counter, metaAli
|
|
|
12421
12449
|
(msg) => diagnostics?.push(makeDgmoError(lineNumber, msg, "warning")),
|
|
12422
12450
|
split.name
|
|
12423
12451
|
);
|
|
12424
|
-
const
|
|
12452
|
+
const peeled = peelQuotedName(split.name);
|
|
12453
|
+
const label = split.color !== void 0 ? `${peeled} ${split.color}` : peeled;
|
|
12425
12454
|
if (split.alias) {
|
|
12426
12455
|
nameAliasMap?.set(normalizeName(split.alias), id);
|
|
12427
12456
|
}
|
|
@@ -12528,7 +12557,7 @@ function parseArrowLine(trimmed, _palette, _lineNumber, _diagnostics) {
|
|
|
12528
12557
|
const rawTarget = bareMatch[1].trim();
|
|
12529
12558
|
const groupMatch = rawTarget.match(/^\[(.+)\]$/);
|
|
12530
12559
|
return {
|
|
12531
|
-
target: groupMatch ? groupMatch[1].trim() : rawTarget,
|
|
12560
|
+
target: peelQuotedName(groupMatch ? groupMatch[1].trim() : rawTarget),
|
|
12532
12561
|
targetIsGroup: !!groupMatch
|
|
12533
12562
|
};
|
|
12534
12563
|
}
|
|
@@ -12539,7 +12568,7 @@ function parseArrowLine(trimmed, _palette, _lineNumber, _diagnostics) {
|
|
|
12539
12568
|
const groupMatch = rawTarget.match(/^\[(.+)\]$/);
|
|
12540
12569
|
return {
|
|
12541
12570
|
...label !== void 0 && { label },
|
|
12542
|
-
target: groupMatch ? groupMatch[1].trim() : rawTarget,
|
|
12571
|
+
target: peelQuotedName(groupMatch ? groupMatch[1].trim() : rawTarget),
|
|
12543
12572
|
targetIsGroup: !!groupMatch
|
|
12544
12573
|
};
|
|
12545
12574
|
}
|
|
@@ -12740,7 +12769,7 @@ function parseSitemap(content, palette) {
|
|
|
12740
12769
|
const asMatch = rawLabel.match(
|
|
12741
12770
|
/^(.*?)\s+as\s+([A-Za-z][A-Za-z0-9_]{0,11})\s*$/
|
|
12742
12771
|
);
|
|
12743
|
-
const label = asMatch ? asMatch[1].trim() : rawLabel;
|
|
12772
|
+
const label = peelQuotedName(asMatch ? asMatch[1].trim() : rawLabel);
|
|
12744
12773
|
const tail = (containerMatch[2] ?? "").trim();
|
|
12745
12774
|
const containerMetadata = {};
|
|
12746
12775
|
if (tail.length > 0) {
|
|
@@ -12921,7 +12950,7 @@ function parseNodeLabel2(trimmed, lineNumber, _palette, counter, metaAliasMap =
|
|
|
12921
12950
|
split.name
|
|
12922
12951
|
);
|
|
12923
12952
|
}
|
|
12924
|
-
const label = split.name;
|
|
12953
|
+
const label = peelQuotedName(split.name);
|
|
12925
12954
|
if (split.alias) nameAliasMap?.set(normalizeName(split.alias), id);
|
|
12926
12955
|
const metadata = { ...split.meta };
|
|
12927
12956
|
if (split.color !== void 0) metadata["color"] = split.color;
|
|
@@ -13507,6 +13536,7 @@ function tokenizeActivityLine(line11, diagnostics, lineNumber, metaAliasMap) {
|
|
|
13507
13536
|
name = rawTokens.slice(0, firstNumIdx).join(" ").trim();
|
|
13508
13537
|
durationTokens = rawTokens.slice(firstNumIdx);
|
|
13509
13538
|
}
|
|
13539
|
+
name = peelQuotedName(name);
|
|
13510
13540
|
return {
|
|
13511
13541
|
name,
|
|
13512
13542
|
durationTokens,
|
|
@@ -13734,7 +13764,7 @@ function parsePert(content, parseOpts = {}) {
|
|
|
13734
13764
|
if (groupMatch) {
|
|
13735
13765
|
contentStarted = true;
|
|
13736
13766
|
currentTagGroup = null;
|
|
13737
|
-
const name = groupMatch[1].trim();
|
|
13767
|
+
const name = peelQuotedName(groupMatch[1].trim());
|
|
13738
13768
|
let tail = (groupMatch[2] ?? "").trim();
|
|
13739
13769
|
let bareCollapsed = false;
|
|
13740
13770
|
const barePeel = peelTrailingCollapsedFlag(tail);
|
|
@@ -17327,7 +17357,7 @@ function parseKanban(content, palette) {
|
|
|
17327
17357
|
}
|
|
17328
17358
|
currentCard = null;
|
|
17329
17359
|
columnCounter++;
|
|
17330
|
-
const colName = columnMatch[1].trim();
|
|
17360
|
+
const colName = peelQuotedName(columnMatch[1].trim());
|
|
17331
17361
|
let tail = (columnMatch[2] ?? "").trim();
|
|
17332
17362
|
let colCollapsed = false;
|
|
17333
17363
|
const barePeel = peelTrailingCollapsedFlag(tail);
|
|
@@ -17506,7 +17536,8 @@ function parseCardLine(trimmed, lineNumber, counter, metaAliasMap, _palette, dia
|
|
|
17506
17536
|
(msg) => diagnostics?.push(makeDgmoError(lineNumber, msg, "warning")),
|
|
17507
17537
|
split.name
|
|
17508
17538
|
);
|
|
17509
|
-
const
|
|
17539
|
+
const name = peelQuotedName(split.name);
|
|
17540
|
+
const title = split.color !== void 0 ? `${name} ${split.color}` : name;
|
|
17510
17541
|
const tags = { ...split.meta };
|
|
17511
17542
|
return {
|
|
17512
17543
|
id: `card-${counter}`,
|
|
@@ -17639,7 +17670,8 @@ function parseC4(content, palette) {
|
|
|
17639
17670
|
const metaAliasMap = /* @__PURE__ */ new Map();
|
|
17640
17671
|
const nameAliasMap = /* @__PURE__ */ new Map();
|
|
17641
17672
|
function resolveNameRef(rawName) {
|
|
17642
|
-
|
|
17673
|
+
const trimmed = rawName.trim();
|
|
17674
|
+
return nameAliasMap.get(trimmed) ?? peelQuotedName(trimmed);
|
|
17643
17675
|
}
|
|
17644
17676
|
const knownNames = /* @__PURE__ */ new Map();
|
|
17645
17677
|
const elementMetadata = /* @__PURE__ */ new WeakMap();
|
|
@@ -17766,7 +17798,7 @@ function parseC4(content, palette) {
|
|
|
17766
17798
|
} else {
|
|
17767
17799
|
const refMatch = trimmed.match(CONTAINER_REF_RE);
|
|
17768
17800
|
if (refMatch) {
|
|
17769
|
-
const refName = refMatch[1].trim();
|
|
17801
|
+
const refName = peelQuotedName(refMatch[1].trim());
|
|
17770
17802
|
if (deployStack.length > 0) {
|
|
17771
17803
|
deployStack[deployStack.length - 1].node.containerRefs.push(
|
|
17772
17804
|
refName
|
|
@@ -17779,10 +17811,9 @@ function parseC4(content, palette) {
|
|
|
17779
17811
|
}
|
|
17780
17812
|
continue;
|
|
17781
17813
|
}
|
|
17782
|
-
const
|
|
17783
|
-
|
|
17784
|
-
|
|
17785
|
-
);
|
|
17814
|
+
const parsedNode = parseC4NameAndMeta(trimmed, metaAliasMap);
|
|
17815
|
+
const nodeName = peelQuotedName(parsedNode.name);
|
|
17816
|
+
const metadata = parsedNode.metadata;
|
|
17786
17817
|
warnUnknownMetaKeys(
|
|
17787
17818
|
metadata,
|
|
17788
17819
|
withTagAliases(C4_REGISTRY, new Set(metaAliasMap.keys())),
|
|
@@ -17964,11 +17995,12 @@ function parseC4(content, palette) {
|
|
|
17964
17995
|
let namePart = isATypeMatch[1].trim();
|
|
17965
17996
|
const rawType = isATypeMatch[2].toLowerCase();
|
|
17966
17997
|
let remainder = isATypeMatch[3];
|
|
17998
|
+
let declaredAlias;
|
|
17967
17999
|
const asPostfix = remainder.match(
|
|
17968
18000
|
/^(.*?)\s+as\s+([A-Za-z][A-Za-z0-9_]{0,11})\s*(\|.*)?$/
|
|
17969
18001
|
);
|
|
17970
18002
|
if (asPostfix) {
|
|
17971
|
-
|
|
18003
|
+
declaredAlias = asPostfix[2];
|
|
17972
18004
|
remainder = (asPostfix[1] + (asPostfix[3] ?? "")).trim();
|
|
17973
18005
|
} else {
|
|
17974
18006
|
const asInName = namePart.match(
|
|
@@ -17976,9 +18008,12 @@ function parseC4(content, palette) {
|
|
|
17976
18008
|
);
|
|
17977
18009
|
if (asInName) {
|
|
17978
18010
|
namePart = asInName[1].trim();
|
|
17979
|
-
|
|
18011
|
+
declaredAlias = asInName[2];
|
|
17980
18012
|
}
|
|
17981
18013
|
}
|
|
18014
|
+
namePart = peelQuotedName(namePart);
|
|
18015
|
+
if (declaredAlias !== void 0)
|
|
18016
|
+
nameAliasMap.set(declaredAlias, namePart);
|
|
17982
18017
|
let elementType;
|
|
17983
18018
|
let explicitShape = null;
|
|
17984
18019
|
if (rawType === "external") {
|
|
@@ -18073,7 +18108,7 @@ function parseC4(content, palette) {
|
|
|
18073
18108
|
(msg) => pushError(lineNumber, msg, "warning"),
|
|
18074
18109
|
parsed.name
|
|
18075
18110
|
);
|
|
18076
|
-
let namePart = parsed.name;
|
|
18111
|
+
let namePart = peelQuotedName(parsed.name);
|
|
18077
18112
|
const metadata = parsed.metadata;
|
|
18078
18113
|
let explicitShape = null;
|
|
18079
18114
|
const isAMatch = namePart.match(IS_A_RE);
|
|
@@ -18367,6 +18402,23 @@ __export(parser_exports11, {
|
|
|
18367
18402
|
extractSymbols: () => extractSymbols4,
|
|
18368
18403
|
parseInfra: () => parseInfra
|
|
18369
18404
|
});
|
|
18405
|
+
function assignAutoTagColorNames(groups) {
|
|
18406
|
+
for (const group of groups) {
|
|
18407
|
+
const explicit = new Set(
|
|
18408
|
+
group.values.filter((v) => v.color !== void 0).map((v) => v.color.toLowerCase())
|
|
18409
|
+
);
|
|
18410
|
+
let cursor = 0;
|
|
18411
|
+
for (const value of group.values) {
|
|
18412
|
+
if (value.color !== void 0) continue;
|
|
18413
|
+
while (cursor < autoTagColorCycle.length && explicit.has(autoTagColorCycle[cursor].toLowerCase())) {
|
|
18414
|
+
cursor++;
|
|
18415
|
+
}
|
|
18416
|
+
const name = autoTagColorCycle[cursor % autoTagColorCycle.length];
|
|
18417
|
+
cursor++;
|
|
18418
|
+
value.color = name;
|
|
18419
|
+
}
|
|
18420
|
+
}
|
|
18421
|
+
}
|
|
18370
18422
|
function nodeId2(name) {
|
|
18371
18423
|
return normalizeName(name);
|
|
18372
18424
|
}
|
|
@@ -18468,6 +18520,16 @@ function parseInfra(content) {
|
|
|
18468
18520
|
...peeled.alias !== void 0 && { alias: peeled.alias }
|
|
18469
18521
|
};
|
|
18470
18522
|
}
|
|
18523
|
+
function warnMisplacedProperties(tags, label, lineNumber) {
|
|
18524
|
+
for (const key of Object.keys(tags)) {
|
|
18525
|
+
if (!INFRA_BEHAVIOR_KEYS.has(key) && !EDGE_ONLY_KEYS.has(key)) continue;
|
|
18526
|
+
warn(
|
|
18527
|
+
lineNumber,
|
|
18528
|
+
`'${key}' is a node property \u2014 indent it under '${label}' as '${key}: ${tags[key]}', not on the declaration line.`
|
|
18529
|
+
);
|
|
18530
|
+
delete tags[key];
|
|
18531
|
+
}
|
|
18532
|
+
}
|
|
18471
18533
|
function resolveTargetId(rawName) {
|
|
18472
18534
|
const aliasResolved = nameAliasMap.get(rawName.trim());
|
|
18473
18535
|
if (aliasResolved !== void 0) return aliasResolved;
|
|
@@ -18643,13 +18705,14 @@ function parseInfra(content) {
|
|
|
18643
18705
|
if (compMatch) {
|
|
18644
18706
|
finishCurrentNode();
|
|
18645
18707
|
finishCurrentTagGroup();
|
|
18646
|
-
const { qname, uname, alias: asAlias, meta } = compMatch.groups;
|
|
18647
|
-
const rawName = (qname ?? uname ?? "").trim();
|
|
18708
|
+
const { qname, uname, isa, alias: asAlias, meta } = compMatch.groups;
|
|
18709
|
+
const rawName = ((qname ?? uname ?? "") + (isa ?? "")).trim();
|
|
18648
18710
|
const peeled = peelInfraDecorations(rawName, lineNumber);
|
|
18649
18711
|
const name = peeled.label;
|
|
18650
18712
|
const alias = asAlias ?? peeled.alias;
|
|
18651
18713
|
const rest = meta ?? "";
|
|
18652
18714
|
const { tags } = extractPipeMetadata(rest);
|
|
18715
|
+
warnMisplacedProperties(tags, name, lineNumber);
|
|
18653
18716
|
warnUnknownMetaKeys(
|
|
18654
18717
|
tags,
|
|
18655
18718
|
withTagAliases(INFRA_REGISTRY, tagAliasSet),
|
|
@@ -18685,8 +18748,11 @@ function parseInfra(content) {
|
|
|
18685
18748
|
valueName = cleanEntry.substring(0, lastSpaceIdx).trimEnd();
|
|
18686
18749
|
}
|
|
18687
18750
|
}
|
|
18751
|
+
const peeledValue = peelQuotedName(valueName);
|
|
18752
|
+
const wasQuoted = peeledValue !== valueName;
|
|
18753
|
+
valueName = peeledValue;
|
|
18688
18754
|
const tvMatch = valueName.match(TAG_VALUE_RE);
|
|
18689
|
-
if (tvMatch || /^\w+$/.test(valueName)) {
|
|
18755
|
+
if (wasQuoted || tvMatch || /^\w+$/.test(valueName)) {
|
|
18690
18756
|
currentTagGroup.values.push({
|
|
18691
18757
|
name: valueName,
|
|
18692
18758
|
...rawColor !== void 0 && { color: rawColor }
|
|
@@ -18746,13 +18812,14 @@ function parseInfra(content) {
|
|
|
18746
18812
|
const compMatch = trimmed.match(COMPONENT_RE);
|
|
18747
18813
|
if (compMatch) {
|
|
18748
18814
|
finishCurrentTagGroup();
|
|
18749
|
-
const { qname, uname, alias: asAlias, meta } = compMatch.groups;
|
|
18750
|
-
const rawName = (qname ?? uname ?? "").trim();
|
|
18815
|
+
const { qname, uname, isa, alias: asAlias, meta } = compMatch.groups;
|
|
18816
|
+
const rawName = ((qname ?? uname ?? "") + (isa ?? "")).trim();
|
|
18751
18817
|
const peeled = peelInfraDecorations(rawName, lineNumber);
|
|
18752
18818
|
const name = peeled.label;
|
|
18753
18819
|
const alias = asAlias ?? peeled.alias;
|
|
18754
18820
|
const rest = meta ?? "";
|
|
18755
18821
|
const { tags: nodeTags } = extractPipeMetadata(rest);
|
|
18822
|
+
warnMisplacedProperties(nodeTags, name, lineNumber);
|
|
18756
18823
|
warnUnknownMetaKeys(
|
|
18757
18824
|
nodeTags,
|
|
18758
18825
|
withTagAliases(INFRA_REGISTRY, tagAliasSet),
|
|
@@ -18999,13 +19066,14 @@ function parseInfra(content) {
|
|
|
18999
19066
|
finishCurrentNode();
|
|
19000
19067
|
const compMatch = trimmed.match(COMPONENT_RE);
|
|
19001
19068
|
if (compMatch) {
|
|
19002
|
-
const { qname, uname, alias: asAlias, meta } = compMatch.groups;
|
|
19003
|
-
const rawName = (qname ?? uname ?? "").trim();
|
|
19069
|
+
const { qname, uname, isa, alias: asAlias, meta } = compMatch.groups;
|
|
19070
|
+
const rawName = ((qname ?? uname ?? "") + (isa ?? "")).trim();
|
|
19004
19071
|
const peeled = peelInfraDecorations(rawName, lineNumber);
|
|
19005
19072
|
const name = peeled.label;
|
|
19006
19073
|
const alias = asAlias ?? peeled.alias;
|
|
19007
19074
|
const rest = meta ?? "";
|
|
19008
19075
|
const { tags: nodeTags } = extractPipeMetadata(rest);
|
|
19076
|
+
warnMisplacedProperties(nodeTags, name, lineNumber);
|
|
19009
19077
|
warnUnknownMetaKeys(
|
|
19010
19078
|
nodeTags,
|
|
19011
19079
|
withTagAliases(INFRA_REGISTRY, tagAliasSet),
|
|
@@ -19034,13 +19102,14 @@ function parseInfra(content) {
|
|
|
19034
19102
|
finishCurrentNode();
|
|
19035
19103
|
finishCurrentTagGroup();
|
|
19036
19104
|
currentGroup = null;
|
|
19037
|
-
const { qname, uname, alias: asAlias, meta } = compMatch.groups;
|
|
19038
|
-
const rawName = (qname ?? uname ?? "").trim();
|
|
19105
|
+
const { qname, uname, isa, alias: asAlias, meta } = compMatch.groups;
|
|
19106
|
+
const rawName = ((qname ?? uname ?? "") + (isa ?? "")).trim();
|
|
19039
19107
|
const peeled = peelInfraDecorations(rawName, lineNumber);
|
|
19040
19108
|
const name = peeled.label;
|
|
19041
19109
|
const alias = asAlias ?? peeled.alias;
|
|
19042
19110
|
const rest = meta ?? "";
|
|
19043
19111
|
const { tags } = extractPipeMetadata(rest);
|
|
19112
|
+
warnMisplacedProperties(tags, name, lineNumber);
|
|
19044
19113
|
warnUnknownMetaKeys(
|
|
19045
19114
|
tags,
|
|
19046
19115
|
withTagAliases(INFRA_REGISTRY, tagAliasSet),
|
|
@@ -19101,6 +19170,7 @@ function parseInfra(content) {
|
|
|
19101
19170
|
}
|
|
19102
19171
|
}
|
|
19103
19172
|
}
|
|
19173
|
+
assignAutoTagColorNames(result.tagGroups);
|
|
19104
19174
|
validateTagGroupNames(result.tagGroups, warn, setError);
|
|
19105
19175
|
checkReachability(result);
|
|
19106
19176
|
checkSplitSums(result);
|
|
@@ -19265,9 +19335,9 @@ var init_parser17 = __esm({
|
|
|
19265
19335
|
DEPRECATED_FANOUT_RE = /\bx(\d+)\s*$/;
|
|
19266
19336
|
GROUP_RE = /^\[([^\]]+)\]\s*(?:as\s+([A-Za-z][A-Za-z0-9_]{0,11})\s*)?(?:(collapsed)(?!\s*:)\s*)?((?:\|.*)|(?:[a-zA-Z_]\w*\s*:.*))?$/;
|
|
19267
19337
|
TAG_VALUE_RE = /^(\w[\w\s]+?)\s*$/;
|
|
19268
|
-
COMPONENT_RE = /^(?:"(?<qname>[^"]+)"|(?<uname>[a-zA-Z_][\w -]*?))(?:\s+as\s+(?<alias>[A-Za-z][A-Za-z0-9_]{0,11}))?\s*(?<meta>(?:\|.*)|(?:[a-zA-Z_]\w*\s*:.*))?$/;
|
|
19338
|
+
COMPONENT_RE = /^(?:"(?<qname>[^"]+)"|(?<uname>[a-zA-Z_][\w -]*?))(?<isa>\s+is\s+an?\s+[A-Za-z][\w-]*)?(?:\s+as\s+(?<alias>[A-Za-z][A-Za-z0-9_]{0,11}))?\s*(?<meta>(?:\|.*)|(?:[a-zA-Z_][\w-]*\s*:.*))?$/;
|
|
19269
19339
|
PIPE_META_RE = /[|,]\s*(\w+)\s*:\s*([^|,]+)/g;
|
|
19270
|
-
SAMELINE_META_RE = /(?:^|[\s,])(\w+)\s*:\s*([^,]+?)(?=\s*,|\s*$)/g;
|
|
19340
|
+
SAMELINE_META_RE = /(?:^|[\s,])([\w-]+)\s*:\s*([^,]+?)(?=\s*,|\s*$)/g;
|
|
19271
19341
|
PROPERTY_RE = /^([\w-]+):\s*(.+)$/;
|
|
19272
19342
|
PERCENT_RE = /^([\d.]+)%$/;
|
|
19273
19343
|
RANGE_RE = /^(\d+)-(\d+)$/;
|
|
@@ -19538,7 +19608,9 @@ function parseGantt(content, palette) {
|
|
|
19538
19608
|
result.eras.push({
|
|
19539
19609
|
startDate: eraEntryMatch.start,
|
|
19540
19610
|
endDate: eraEntryMatch.end,
|
|
19541
|
-
|
|
19611
|
+
// Peel after extractColor — the quotes are what keep a trailing
|
|
19612
|
+
// color word inside the label (§2.2).
|
|
19613
|
+
label: peelQuotedName(eraExtracted.label),
|
|
19542
19614
|
color: eraExtracted.color || null,
|
|
19543
19615
|
lineNumber
|
|
19544
19616
|
});
|
|
@@ -19567,7 +19639,9 @@ function parseGantt(content, palette) {
|
|
|
19567
19639
|
);
|
|
19568
19640
|
result.markers.push({
|
|
19569
19641
|
date: markerEntryMatch.iso,
|
|
19570
|
-
|
|
19642
|
+
// Peel after extractColor — the quotes are what keep a trailing
|
|
19643
|
+
// color word inside the label (§2.2).
|
|
19644
|
+
label: peelQuotedName(markerExtracted.label),
|
|
19571
19645
|
color: markerExtracted.color || null,
|
|
19572
19646
|
lineNumber
|
|
19573
19647
|
});
|
|
@@ -19651,10 +19725,11 @@ function parseGantt(content, palette) {
|
|
|
19651
19725
|
content2.explicitStart,
|
|
19652
19726
|
content2.preExtracted
|
|
19653
19727
|
);
|
|
19728
|
+
if (content2.alias) nameAliasMap.set(content2.alias, task.label);
|
|
19654
19729
|
const taskNode = { kind: "task", ...task };
|
|
19655
19730
|
if (lastTaskNode) {
|
|
19656
19731
|
lastTaskNode.dependencies.push({
|
|
19657
|
-
targetName:
|
|
19732
|
+
targetName: task.label,
|
|
19658
19733
|
...arrowResult.label !== void 0 && {
|
|
19659
19734
|
label: arrowResult.label
|
|
19660
19735
|
},
|
|
@@ -19695,7 +19770,9 @@ function parseGantt(content, palette) {
|
|
|
19695
19770
|
targetSegment = split.name;
|
|
19696
19771
|
meta = split.meta;
|
|
19697
19772
|
}
|
|
19698
|
-
const targetName = resolveAliasTarget(
|
|
19773
|
+
const targetName = resolveAliasTarget(
|
|
19774
|
+
peelQuotedName(targetSegment)
|
|
19775
|
+
);
|
|
19699
19776
|
let offset = arrowResult.lag;
|
|
19700
19777
|
if (meta["lag"] || meta["lead"]) {
|
|
19701
19778
|
const key = meta["lag"] ? "lag" : "lead";
|
|
@@ -19788,7 +19865,7 @@ function parseGantt(content, palette) {
|
|
|
19788
19865
|
result.eras.push({
|
|
19789
19866
|
startDate: "",
|
|
19790
19867
|
endDate: "",
|
|
19791
|
-
label: eraExtracted.label,
|
|
19868
|
+
label: peelQuotedName(eraExtracted.label),
|
|
19792
19869
|
color: eraExtracted.color || null,
|
|
19793
19870
|
lineNumber,
|
|
19794
19871
|
...startOff && { offsetStart: startOff },
|
|
@@ -19808,7 +19885,7 @@ function parseGantt(content, palette) {
|
|
|
19808
19885
|
);
|
|
19809
19886
|
result.markers.push({
|
|
19810
19887
|
date: "",
|
|
19811
|
-
label: markerExtracted.label,
|
|
19888
|
+
label: peelQuotedName(markerExtracted.label),
|
|
19812
19889
|
color: markerExtracted.color || null,
|
|
19813
19890
|
lineNumber,
|
|
19814
19891
|
...dateOff && { offsetDate: dateOff }
|
|
@@ -19891,7 +19968,7 @@ function parseGantt(content, palette) {
|
|
|
19891
19968
|
result.eras.push({
|
|
19892
19969
|
startDate: eraMatch.start,
|
|
19893
19970
|
endDate: eraMatch.end,
|
|
19894
|
-
label: eraExtracted.label,
|
|
19971
|
+
label: peelQuotedName(eraExtracted.label),
|
|
19895
19972
|
color: eraExtracted.color || null,
|
|
19896
19973
|
lineNumber
|
|
19897
19974
|
});
|
|
@@ -19916,7 +19993,7 @@ function parseGantt(content, palette) {
|
|
|
19916
19993
|
);
|
|
19917
19994
|
result.markers.push({
|
|
19918
19995
|
date: markerMatch.iso,
|
|
19919
|
-
label: markerExtracted.label,
|
|
19996
|
+
label: peelQuotedName(markerExtracted.label),
|
|
19920
19997
|
color: markerExtracted.color || null,
|
|
19921
19998
|
lineNumber
|
|
19922
19999
|
});
|
|
@@ -19977,7 +20054,6 @@ function parseGantt(content, palette) {
|
|
|
19977
20054
|
softError(lineNumber, `Task name cannot be empty.`);
|
|
19978
20055
|
continue;
|
|
19979
20056
|
}
|
|
19980
|
-
if (split.alias) nameAliasMap.set(split.alias, taskName);
|
|
19981
20057
|
const preExtracted = { ...split.meta };
|
|
19982
20058
|
delete preExtracted["duration"];
|
|
19983
20059
|
delete preExtracted["start"];
|
|
@@ -19990,6 +20066,7 @@ function parseGantt(content, palette) {
|
|
|
19990
20066
|
explicitStart,
|
|
19991
20067
|
preExtracted
|
|
19992
20068
|
);
|
|
20069
|
+
if (split.alias) nameAliasMap.set(split.alias, task.label);
|
|
19993
20070
|
const taskNode = { kind: "task", ...task };
|
|
19994
20071
|
currentContainer().push(taskNode);
|
|
19995
20072
|
const writableTaskN = taskNode;
|
|
@@ -20215,10 +20292,10 @@ function parseGantt(content, palette) {
|
|
|
20215
20292
|
delete metadata["collapsed"];
|
|
20216
20293
|
}
|
|
20217
20294
|
const groupPeeled = peelAlias2(gm[1]);
|
|
20218
|
-
|
|
20219
|
-
|
|
20295
|
+
const groupName = peelQuotedName(groupPeeled.label);
|
|
20296
|
+
if (groupPeeled.alias) nameAliasMap.set(groupPeeled.alias, groupName);
|
|
20220
20297
|
const group = {
|
|
20221
|
-
name:
|
|
20298
|
+
name: groupName,
|
|
20222
20299
|
color: null,
|
|
20223
20300
|
metadata,
|
|
20224
20301
|
...lineOffset && { offset: lineOffset },
|
|
@@ -20254,6 +20331,7 @@ function parseGantt(content, palette) {
|
|
|
20254
20331
|
content2.explicitStart,
|
|
20255
20332
|
content2.preExtracted
|
|
20256
20333
|
);
|
|
20334
|
+
if (content2.alias) nameAliasMap.set(content2.alias, task.label);
|
|
20257
20335
|
if (lineOffset) {
|
|
20258
20336
|
task.offset = lineOffset;
|
|
20259
20337
|
}
|
|
@@ -20280,6 +20358,7 @@ function parseGantt(content, palette) {
|
|
|
20280
20358
|
if (currentTagGroup) {
|
|
20281
20359
|
result.tagGroups.push(currentTagGroup);
|
|
20282
20360
|
}
|
|
20361
|
+
finalizeAutoTagColors(result.tagGroups, palette);
|
|
20283
20362
|
if (result.options.sort === "tag" && result.tagGroups.length === 0) {
|
|
20284
20363
|
warn(0, "sort tag has no effect \u2014 no tag groups defined.");
|
|
20285
20364
|
result.options.sort = "default";
|
|
@@ -20401,7 +20480,8 @@ function parseGantt(content, palette) {
|
|
|
20401
20480
|
duration,
|
|
20402
20481
|
uncertain,
|
|
20403
20482
|
explicitStart,
|
|
20404
|
-
preExtracted
|
|
20483
|
+
preExtracted,
|
|
20484
|
+
alias: split.alias
|
|
20405
20485
|
};
|
|
20406
20486
|
}
|
|
20407
20487
|
function findOwningTask(stack, metaIndent) {
|
|
@@ -20416,7 +20496,6 @@ function parseGantt(content, palette) {
|
|
|
20416
20496
|
function makeTask(labelRaw, duration, uncertain, ln, explicitStart, preExtractedMeta) {
|
|
20417
20497
|
const peeled = peelAlias2(labelRaw);
|
|
20418
20498
|
let label = peeled.label;
|
|
20419
|
-
if (peeled.alias) nameAliasMap.set(peeled.alias, label);
|
|
20420
20499
|
if (label.toLowerCase() === "parallel") {
|
|
20421
20500
|
softError(
|
|
20422
20501
|
ln,
|
|
@@ -20448,6 +20527,8 @@ function parseGantt(content, palette) {
|
|
|
20448
20527
|
Object.assign(metadata, split.meta);
|
|
20449
20528
|
}
|
|
20450
20529
|
}
|
|
20530
|
+
label = peelQuotedName(label);
|
|
20531
|
+
if (peeled.alias) nameAliasMap.set(peeled.alias, label);
|
|
20451
20532
|
if (preExtractedMeta) {
|
|
20452
20533
|
Object.assign(metadata, preExtractedMeta);
|
|
20453
20534
|
}
|
|
@@ -21814,7 +21895,7 @@ function parseNodeLine(trimmed, lineNum, metaAliasMap, diagnostics, nameAliasMap
|
|
|
21814
21895
|
(msg) => diagnostics.push(makeDgmoError(lineNum, msg, "warning")),
|
|
21815
21896
|
split.name
|
|
21816
21897
|
);
|
|
21817
|
-
let label = split.name;
|
|
21898
|
+
let label = peelQuotedName(split.name);
|
|
21818
21899
|
const metadata = { ...split.meta };
|
|
21819
21900
|
let description;
|
|
21820
21901
|
if (split.color !== void 0) {
|
|
@@ -21868,7 +21949,7 @@ function resolveEndpoint(name, nameAliasMap) {
|
|
|
21868
21949
|
const aliased = nameAliasMap.get(name.trim());
|
|
21869
21950
|
if (aliased !== void 0) return aliased;
|
|
21870
21951
|
}
|
|
21871
|
-
return name;
|
|
21952
|
+
return peelQuotedName(name);
|
|
21872
21953
|
}
|
|
21873
21954
|
function parseEdgeLine(trimmed, lineNum, metaAliasMap, diagnostics, nameAliasMap) {
|
|
21874
21955
|
const edgeRegistry = withTagAliases(
|
|
@@ -44804,25 +44885,45 @@ function splitCamelCase(word) {
|
|
|
44804
44885
|
parts.push(word.slice(start));
|
|
44805
44886
|
return parts.length > 1 ? parts : [word];
|
|
44806
44887
|
}
|
|
44888
|
+
function splitLabelChunks(label) {
|
|
44889
|
+
const chunks = [];
|
|
44890
|
+
const words = label.split(/\s+/).filter((w) => w.length > 0);
|
|
44891
|
+
for (let wi = 0; wi < words.length; wi++) {
|
|
44892
|
+
const word = words[wi];
|
|
44893
|
+
const hyphenParts = [];
|
|
44894
|
+
let start = 0;
|
|
44895
|
+
for (let i = 0; i < word.length; i++) {
|
|
44896
|
+
if (word[i] === "-") {
|
|
44897
|
+
hyphenParts.push(word.slice(start, i + 1));
|
|
44898
|
+
start = i + 1;
|
|
44899
|
+
}
|
|
44900
|
+
}
|
|
44901
|
+
if (start < word.length) hyphenParts.push(word.slice(start));
|
|
44902
|
+
let firstOfWord = true;
|
|
44903
|
+
for (const part of hyphenParts) {
|
|
44904
|
+
for (const camel of splitCamelCase(part)) {
|
|
44905
|
+
chunks.push({ text: camel, spaceBefore: wi > 0 && firstOfWord });
|
|
44906
|
+
firstOfWord = false;
|
|
44907
|
+
}
|
|
44908
|
+
}
|
|
44909
|
+
}
|
|
44910
|
+
return chunks;
|
|
44911
|
+
}
|
|
44807
44912
|
function fitLabelToHeader(label, nodeWidth, maxLines) {
|
|
44808
44913
|
const maxTextWidth = nodeWidth - NODE_TEXT_PADDING * 2;
|
|
44809
|
-
const
|
|
44810
|
-
const words = [];
|
|
44811
|
-
for (const part of rawParts) {
|
|
44812
|
-
if (!part || /^\s+$/.test(part) || part === "-") continue;
|
|
44813
|
-
words.push(...splitCamelCase(part));
|
|
44814
|
-
}
|
|
44914
|
+
const words = splitLabelChunks(label);
|
|
44815
44915
|
for (let fontSize = NODE_FONT_SIZE; fontSize >= MIN_NODE_FONT_SIZE; fontSize--) {
|
|
44816
44916
|
if (maxTextWidth < measureText("MM", fontSize)) continue;
|
|
44817
44917
|
const lines = [];
|
|
44818
44918
|
let current = "";
|
|
44819
44919
|
for (const word of words) {
|
|
44820
|
-
const
|
|
44920
|
+
const joiner = current && word.spaceBefore ? " " : "";
|
|
44921
|
+
const test = current ? `${current}${joiner}${word.text}` : word.text;
|
|
44821
44922
|
if (measureText(test, fontSize) <= maxTextWidth) {
|
|
44822
44923
|
current = test;
|
|
44823
44924
|
} else {
|
|
44824
44925
|
if (current) lines.push(current);
|
|
44825
|
-
current = word;
|
|
44926
|
+
current = word.text;
|
|
44826
44927
|
}
|
|
44827
44928
|
}
|
|
44828
44929
|
if (current) lines.push(current);
|
|
@@ -62221,10 +62322,10 @@ function ambiguousTaskMessage(trimmed, suggestions) {
|
|
|
62221
62322
|
return `Multiple tasks match "${trimmed}". Did you mean ${suggestions.map((s) => `\`${s}\``).join(" or ")}?`;
|
|
62222
62323
|
}
|
|
62223
62324
|
function resolveTaskName(name, allTasks2) {
|
|
62224
|
-
let trimmed = name.trim();
|
|
62325
|
+
let trimmed = peelQuotedName(name.trim()).trim();
|
|
62225
62326
|
const bracketMatch = trimmed.match(BRACKET_GROUP_RE);
|
|
62226
62327
|
if (bracketMatch) {
|
|
62227
|
-
trimmed = `${bracketMatch[1]}.${bracketMatch[2]}`;
|
|
62328
|
+
trimmed = `${peelQuotedName(bracketMatch[1])}.${bracketMatch[2]}`;
|
|
62228
62329
|
}
|
|
62229
62330
|
const normTrimmed = normalizeName(trimmed);
|
|
62230
62331
|
const exactMatches = allTasks2.filter(
|
|
@@ -62244,8 +62345,8 @@ function resolveTaskName(name, allTasks2) {
|
|
|
62244
62345
|
}
|
|
62245
62346
|
const lastDotIdx = trimmed.lastIndexOf(".");
|
|
62246
62347
|
if (lastDotIdx > 0) {
|
|
62247
|
-
const groupPrefix = trimmed.substring(0, lastDotIdx);
|
|
62248
|
-
const taskLabel = trimmed.substring(lastDotIdx + 1);
|
|
62348
|
+
const groupPrefix = peelQuotedName(trimmed.substring(0, lastDotIdx));
|
|
62349
|
+
const taskLabel = peelQuotedName(trimmed.substring(lastDotIdx + 1));
|
|
62249
62350
|
const normTaskLabel = normalizeName(taskLabel);
|
|
62250
62351
|
const matches = allTasks2.filter((t) => {
|
|
62251
62352
|
if (normalizeName(t.label) !== normTaskLabel) return false;
|
|
@@ -62282,6 +62383,7 @@ var init_resolver = __esm({
|
|
|
62282
62383
|
"src/gantt/resolver.ts"() {
|
|
62283
62384
|
"use strict";
|
|
62284
62385
|
init_name_normalize();
|
|
62386
|
+
init_parsing();
|
|
62285
62387
|
BRACKET_GROUP_RE = /^\[(.+?)\]\.(.+)$/;
|
|
62286
62388
|
}
|
|
62287
62389
|
});
|
|
@@ -87723,7 +87825,7 @@ var CSS = AUTO_BASE_CSS + "\n" + BLOCK_CSS + "\n" + darkScopedBlockCss(BLOCK_CSS
|
|
|
87723
87825
|
|
|
87724
87826
|
// src/auto/shared.ts
|
|
87725
87827
|
init_safe_href();
|
|
87726
|
-
var VERSION = "0.
|
|
87828
|
+
var VERSION = "0.59.0";
|
|
87727
87829
|
var ARIA_LABEL_MAX = 200;
|
|
87728
87830
|
var COPIED_INTERACTION_MS = 1500;
|
|
87729
87831
|
var LOG_PREFIX = "[dgmo]";
|
|
@@ -2,14 +2,14 @@ import {
|
|
|
2
2
|
extractSymbols,
|
|
3
3
|
looksLikeFlowchart,
|
|
4
4
|
parseFlowchart
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-GCZQAT4Z.js";
|
|
6
6
|
import "./chunk-7TF3QOOD.js";
|
|
7
7
|
import "./chunk-NXMESY4J.js";
|
|
8
|
-
import "./chunk-
|
|
8
|
+
import "./chunk-SJT4W23S.js";
|
|
9
9
|
import "./chunk-7NK42OIB.js";
|
|
10
10
|
import "./chunk-RRX4Z4TH.js";
|
|
11
11
|
import "./chunk-NOTA6TEI.js";
|
|
12
|
-
import "./chunk-
|
|
12
|
+
import "./chunk-IXY2IPOW.js";
|
|
13
13
|
import "./chunk-EXNKNJ65.js";
|
|
14
14
|
import "./chunk-OLMWTJVU.js";
|
|
15
15
|
import "./chunk-5WRI5ZAA.js";
|
|
@@ -18,4 +18,4 @@ export {
|
|
|
18
18
|
looksLikeFlowchart,
|
|
19
19
|
parseFlowchart
|
|
20
20
|
};
|
|
21
|
-
//# sourceMappingURL=flowchart-parser-
|
|
21
|
+
//# sourceMappingURL=flowchart-parser-PZQY2UC4.js.map
|