@diagrammo/dgmo 0.18.0 → 0.18.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -4
- package/dist/advanced.cjs +5 -5
- package/dist/advanced.js +5 -5
- package/dist/auto.cjs +6 -6
- package/dist/auto.js +25 -25
- package/dist/auto.mjs +6 -6
- package/dist/cli.cjs +26 -26
- package/dist/index.cjs +5 -5
- package/dist/index.js +5 -5
- package/dist/internal.cjs +5 -5
- package/dist/internal.js +5 -5
- package/docs/language-reference.md +672 -42
- package/package.json +1 -1
- package/src/d3.ts +10 -7
- package/src/utils/legend-layout.ts +5 -2
package/README.md
CHANGED
|
@@ -344,8 +344,8 @@ Alex Chen
|
|
|
344
344
|
[Platform Team]
|
|
345
345
|
goal: Core infrastructure
|
|
346
346
|
|
|
347
|
-
Alice Park
|
|
348
|
-
Bob Torres
|
|
347
|
+
Alice Park role: Senior Engineer, location: NY
|
|
348
|
+
Bob Torres role: Junior Engineer, location: SF
|
|
349
349
|
`;
|
|
350
350
|
|
|
351
351
|
const parsed = parseOrg(content, colors);
|
|
@@ -366,10 +366,10 @@ Jane Smith
|
|
|
366
366
|
location: NY
|
|
367
367
|
```
|
|
368
368
|
|
|
369
|
-
Or single-line with
|
|
369
|
+
Or single-line with same-line metadata:
|
|
370
370
|
|
|
371
371
|
```
|
|
372
|
-
Jane Smith
|
|
372
|
+
Jane Smith role: CEO, location: NY
|
|
373
373
|
```
|
|
374
374
|
|
|
375
375
|
**Team containers** — grouping constructs rendered as labeled boxes:
|
package/dist/advanced.cjs
CHANGED
|
@@ -3301,7 +3301,7 @@ function capsuleWidth(name, entries, containerWidth, addonWidth = 0) {
|
|
|
3301
3301
|
const baseW = LEGEND_CAPSULE_PAD * 2 + pw + 4 + addonWidth;
|
|
3302
3302
|
const ew = entriesWidth(entries);
|
|
3303
3303
|
const singleRowW = baseW + ew;
|
|
3304
|
-
if (singleRowW <= maxCapsuleW) {
|
|
3304
|
+
if (singleRowW <= maxCapsuleW + 0.5) {
|
|
3305
3305
|
return {
|
|
3306
3306
|
width: singleRowW,
|
|
3307
3307
|
entryRows: 1,
|
|
@@ -50008,7 +50008,7 @@ function renderMarkers(g, markers, scale, isVertical, innerWidth, innerHeight, o
|
|
|
50008
50008
|
});
|
|
50009
50009
|
} else {
|
|
50010
50010
|
const labelY = useReservedRow ? reservedLabelY : 6;
|
|
50011
|
-
const diamondY = useReservedRow ? -
|
|
50011
|
+
const diamondY = useReservedRow ? -(diamondSize + 1) : labelY + 14;
|
|
50012
50012
|
const lineTop = diamondY + diamondSize;
|
|
50013
50013
|
let displayLabel = marker.label;
|
|
50014
50014
|
let truncated = false;
|
|
@@ -50993,7 +50993,7 @@ function renderTimelineHorizontalGrouped(container, parsed, palette, isDark, set
|
|
|
50993
50993
|
const bandX = -margin.left + 5;
|
|
50994
50994
|
const bandW = margin.left - 7;
|
|
50995
50995
|
const bandY = curY;
|
|
50996
|
-
const bandH =
|
|
50996
|
+
const bandH = sBarH;
|
|
50997
50997
|
const sBandRx = ctx.structural(4);
|
|
50998
50998
|
const sBandAccentW = ctx.structural(4);
|
|
50999
50999
|
const clipId = `tl-band-clip-${tlBandClipCounter++}`;
|
|
@@ -51001,7 +51001,7 @@ function renderTimelineHorizontalGrouped(container, parsed, palette, isDark, set
|
|
|
51001
51001
|
g.append("rect").attr("class", "tl-group-header-bg").attr("data-group", lane.name).attr("x", bandX).attr("y", bandY).attr("width", bandW).attr("height", bandH).attr("rx", sBandRx).attr("fill", shapeFill(palette, laneColor, isDark, { solid })).style("pointer-events", "none");
|
|
51002
51002
|
g.append("rect").attr("class", "tl-group-header-accent").attr("data-group", lane.name).attr("x", bandX).attr("y", bandY).attr("width", sBandAccentW).attr("height", bandH).attr("fill", laneColor).attr("clip-path", `url(#${clipId})`).style("pointer-events", "none");
|
|
51003
51003
|
const headerG = g.append("g").attr("class", "tl-group-header").attr("data-group", lane.name).style("cursor", "pointer").on("mouseenter", () => fadeToGroup(g, lane.name)).on("mouseleave", () => fadeReset(g)).on("click", () => toggleGroup(lane.name));
|
|
51004
|
-
headerG.append("text").attr("x", -margin.left + ctx.aesthetic(10)).attr("y", curY +
|
|
51004
|
+
headerG.append("text").attr("x", -margin.left + ctx.aesthetic(10)).attr("y", curY + sBarH / 2).attr("dy", "0.35em").attr("text-anchor", "start").attr("fill", textColor).attr("font-size", `${sLaneHeaderFont}px`).attr("font-weight", "600").text(`${toggleIcon} ${lane.name}`);
|
|
51005
51005
|
if (lane.events.length > 0) {
|
|
51006
51006
|
const evDates = lane.events.map((ev) => parseTimelineDate(ev.date));
|
|
51007
51007
|
const evEndDates = lane.events.filter((ev) => ev.endDate).map((ev) => parseTimelineDate(ev.endDate));
|
|
@@ -51011,7 +51011,7 @@ function renderTimelineHorizontalGrouped(container, parsed, palette, isDark, set
|
|
|
51011
51011
|
const sx2 = xScale(laneMaxD);
|
|
51012
51012
|
const groupBarW = Math.max(sx2 - sx1, ctx.structural(20));
|
|
51013
51013
|
const groupBarG = g.append("g").attr("class", isCollapsed ? "tl-group-summary" : "tl-group-bar").attr("data-group", lane.name).style("cursor", "pointer").on("mouseenter", () => fadeToGroup(g, lane.name)).on("mouseleave", () => fadeReset(g)).on("click", () => toggleGroup(lane.name));
|
|
51014
|
-
groupBarG.append("rect").attr("x", sx1).attr("y", curY).attr("width", groupBarW).attr("height",
|
|
51014
|
+
groupBarG.append("rect").attr("x", sx1).attr("y", curY).attr("width", groupBarW).attr("height", sBarH).attr("rx", sBarRx).attr("fill", shapeFill(palette, laneColor, isDark, { solid })).attr("stroke", laneColor).attr("stroke-width", sBarStroke);
|
|
51015
51015
|
}
|
|
51016
51016
|
if (isCollapsed) {
|
|
51017
51017
|
curY += rowH + sGroupGap;
|
package/dist/advanced.js
CHANGED
|
@@ -3299,7 +3299,7 @@ function capsuleWidth(name, entries, containerWidth, addonWidth = 0) {
|
|
|
3299
3299
|
const baseW = LEGEND_CAPSULE_PAD * 2 + pw + 4 + addonWidth;
|
|
3300
3300
|
const ew = entriesWidth(entries);
|
|
3301
3301
|
const singleRowW = baseW + ew;
|
|
3302
|
-
if (singleRowW <= maxCapsuleW) {
|
|
3302
|
+
if (singleRowW <= maxCapsuleW + 0.5) {
|
|
3303
3303
|
return {
|
|
3304
3304
|
width: singleRowW,
|
|
3305
3305
|
entryRows: 1,
|
|
@@ -50029,7 +50029,7 @@ function renderMarkers(g, markers, scale, isVertical, innerWidth, innerHeight, o
|
|
|
50029
50029
|
});
|
|
50030
50030
|
} else {
|
|
50031
50031
|
const labelY = useReservedRow ? reservedLabelY : 6;
|
|
50032
|
-
const diamondY = useReservedRow ? -
|
|
50032
|
+
const diamondY = useReservedRow ? -(diamondSize + 1) : labelY + 14;
|
|
50033
50033
|
const lineTop = diamondY + diamondSize;
|
|
50034
50034
|
let displayLabel = marker.label;
|
|
50035
50035
|
let truncated = false;
|
|
@@ -51014,7 +51014,7 @@ function renderTimelineHorizontalGrouped(container, parsed, palette, isDark, set
|
|
|
51014
51014
|
const bandX = -margin.left + 5;
|
|
51015
51015
|
const bandW = margin.left - 7;
|
|
51016
51016
|
const bandY = curY;
|
|
51017
|
-
const bandH =
|
|
51017
|
+
const bandH = sBarH;
|
|
51018
51018
|
const sBandRx = ctx.structural(4);
|
|
51019
51019
|
const sBandAccentW = ctx.structural(4);
|
|
51020
51020
|
const clipId = `tl-band-clip-${tlBandClipCounter++}`;
|
|
@@ -51022,7 +51022,7 @@ function renderTimelineHorizontalGrouped(container, parsed, palette, isDark, set
|
|
|
51022
51022
|
g.append("rect").attr("class", "tl-group-header-bg").attr("data-group", lane.name).attr("x", bandX).attr("y", bandY).attr("width", bandW).attr("height", bandH).attr("rx", sBandRx).attr("fill", shapeFill(palette, laneColor, isDark, { solid })).style("pointer-events", "none");
|
|
51023
51023
|
g.append("rect").attr("class", "tl-group-header-accent").attr("data-group", lane.name).attr("x", bandX).attr("y", bandY).attr("width", sBandAccentW).attr("height", bandH).attr("fill", laneColor).attr("clip-path", `url(#${clipId})`).style("pointer-events", "none");
|
|
51024
51024
|
const headerG = g.append("g").attr("class", "tl-group-header").attr("data-group", lane.name).style("cursor", "pointer").on("mouseenter", () => fadeToGroup(g, lane.name)).on("mouseleave", () => fadeReset(g)).on("click", () => toggleGroup(lane.name));
|
|
51025
|
-
headerG.append("text").attr("x", -margin.left + ctx.aesthetic(10)).attr("y", curY +
|
|
51025
|
+
headerG.append("text").attr("x", -margin.left + ctx.aesthetic(10)).attr("y", curY + sBarH / 2).attr("dy", "0.35em").attr("text-anchor", "start").attr("fill", textColor).attr("font-size", `${sLaneHeaderFont}px`).attr("font-weight", "600").text(`${toggleIcon} ${lane.name}`);
|
|
51026
51026
|
if (lane.events.length > 0) {
|
|
51027
51027
|
const evDates = lane.events.map((ev) => parseTimelineDate(ev.date));
|
|
51028
51028
|
const evEndDates = lane.events.filter((ev) => ev.endDate).map((ev) => parseTimelineDate(ev.endDate));
|
|
@@ -51032,7 +51032,7 @@ function renderTimelineHorizontalGrouped(container, parsed, palette, isDark, set
|
|
|
51032
51032
|
const sx2 = xScale(laneMaxD);
|
|
51033
51033
|
const groupBarW = Math.max(sx2 - sx1, ctx.structural(20));
|
|
51034
51034
|
const groupBarG = g.append("g").attr("class", isCollapsed ? "tl-group-summary" : "tl-group-bar").attr("data-group", lane.name).style("cursor", "pointer").on("mouseenter", () => fadeToGroup(g, lane.name)).on("mouseleave", () => fadeReset(g)).on("click", () => toggleGroup(lane.name));
|
|
51035
|
-
groupBarG.append("rect").attr("x", sx1).attr("y", curY).attr("width", groupBarW).attr("height",
|
|
51035
|
+
groupBarG.append("rect").attr("x", sx1).attr("y", curY).attr("width", groupBarW).attr("height", sBarH).attr("rx", sBarRx).attr("fill", shapeFill(palette, laneColor, isDark, { solid })).attr("stroke", laneColor).attr("stroke-width", sBarStroke);
|
|
51036
51036
|
}
|
|
51037
51037
|
if (isCollapsed) {
|
|
51038
51038
|
curY += rowH + sGroupGap;
|
package/dist/auto.cjs
CHANGED
|
@@ -3204,7 +3204,7 @@ function capsuleWidth(name, entries, containerWidth, addonWidth = 0) {
|
|
|
3204
3204
|
const baseW = LEGEND_CAPSULE_PAD * 2 + pw + 4 + addonWidth;
|
|
3205
3205
|
const ew = entriesWidth(entries);
|
|
3206
3206
|
const singleRowW = baseW + ew;
|
|
3207
|
-
if (singleRowW <= maxCapsuleW) {
|
|
3207
|
+
if (singleRowW <= maxCapsuleW + 0.5) {
|
|
3208
3208
|
return {
|
|
3209
3209
|
width: singleRowW,
|
|
3210
3210
|
entryRows: 1,
|
|
@@ -49646,7 +49646,7 @@ function renderMarkers(g, markers, scale, isVertical, innerWidth, innerHeight, o
|
|
|
49646
49646
|
});
|
|
49647
49647
|
} else {
|
|
49648
49648
|
const labelY = useReservedRow ? reservedLabelY : 6;
|
|
49649
|
-
const diamondY = useReservedRow ? -
|
|
49649
|
+
const diamondY = useReservedRow ? -(diamondSize + 1) : labelY + 14;
|
|
49650
49650
|
const lineTop = diamondY + diamondSize;
|
|
49651
49651
|
let displayLabel = marker.label;
|
|
49652
49652
|
let truncated = false;
|
|
@@ -50631,7 +50631,7 @@ function renderTimelineHorizontalGrouped(container, parsed, palette, isDark, set
|
|
|
50631
50631
|
const bandX = -margin.left + 5;
|
|
50632
50632
|
const bandW = margin.left - 7;
|
|
50633
50633
|
const bandY = curY;
|
|
50634
|
-
const bandH =
|
|
50634
|
+
const bandH = sBarH;
|
|
50635
50635
|
const sBandRx = ctx.structural(4);
|
|
50636
50636
|
const sBandAccentW = ctx.structural(4);
|
|
50637
50637
|
const clipId = `tl-band-clip-${tlBandClipCounter++}`;
|
|
@@ -50639,7 +50639,7 @@ function renderTimelineHorizontalGrouped(container, parsed, palette, isDark, set
|
|
|
50639
50639
|
g.append("rect").attr("class", "tl-group-header-bg").attr("data-group", lane.name).attr("x", bandX).attr("y", bandY).attr("width", bandW).attr("height", bandH).attr("rx", sBandRx).attr("fill", shapeFill(palette, laneColor, isDark, { solid })).style("pointer-events", "none");
|
|
50640
50640
|
g.append("rect").attr("class", "tl-group-header-accent").attr("data-group", lane.name).attr("x", bandX).attr("y", bandY).attr("width", sBandAccentW).attr("height", bandH).attr("fill", laneColor).attr("clip-path", `url(#${clipId})`).style("pointer-events", "none");
|
|
50641
50641
|
const headerG = g.append("g").attr("class", "tl-group-header").attr("data-group", lane.name).style("cursor", "pointer").on("mouseenter", () => fadeToGroup(g, lane.name)).on("mouseleave", () => fadeReset(g)).on("click", () => toggleGroup(lane.name));
|
|
50642
|
-
headerG.append("text").attr("x", -margin.left + ctx.aesthetic(10)).attr("y", curY +
|
|
50642
|
+
headerG.append("text").attr("x", -margin.left + ctx.aesthetic(10)).attr("y", curY + sBarH / 2).attr("dy", "0.35em").attr("text-anchor", "start").attr("fill", textColor).attr("font-size", `${sLaneHeaderFont}px`).attr("font-weight", "600").text(`${toggleIcon} ${lane.name}`);
|
|
50643
50643
|
if (lane.events.length > 0) {
|
|
50644
50644
|
const evDates = lane.events.map((ev) => parseTimelineDate(ev.date));
|
|
50645
50645
|
const evEndDates = lane.events.filter((ev) => ev.endDate).map((ev) => parseTimelineDate(ev.endDate));
|
|
@@ -50649,7 +50649,7 @@ function renderTimelineHorizontalGrouped(container, parsed, palette, isDark, set
|
|
|
50649
50649
|
const sx2 = xScale(laneMaxD);
|
|
50650
50650
|
const groupBarW = Math.max(sx2 - sx1, ctx.structural(20));
|
|
50651
50651
|
const groupBarG = g.append("g").attr("class", isCollapsed ? "tl-group-summary" : "tl-group-bar").attr("data-group", lane.name).style("cursor", "pointer").on("mouseenter", () => fadeToGroup(g, lane.name)).on("mouseleave", () => fadeReset(g)).on("click", () => toggleGroup(lane.name));
|
|
50652
|
-
groupBarG.append("rect").attr("x", sx1).attr("y", curY).attr("width", groupBarW).attr("height",
|
|
50652
|
+
groupBarG.append("rect").attr("x", sx1).attr("y", curY).attr("width", groupBarW).attr("height", sBarH).attr("rx", sBarRx).attr("fill", shapeFill(palette, laneColor, isDark, { solid })).attr("stroke", laneColor).attr("stroke-width", sBarStroke);
|
|
50653
50653
|
}
|
|
50654
50654
|
if (isCollapsed) {
|
|
50655
50655
|
curY += rowH + sGroupGap;
|
|
@@ -54512,7 +54512,7 @@ pre.dgmo, code.language-dgmo, pre > code.language-dgmo,
|
|
|
54512
54512
|
|
|
54513
54513
|
// src/auto/index.ts
|
|
54514
54514
|
init_safe_href();
|
|
54515
|
-
var VERSION = "0.18.
|
|
54515
|
+
var VERSION = "0.18.1";
|
|
54516
54516
|
var DEFAULTS = {
|
|
54517
54517
|
theme: "auto",
|
|
54518
54518
|
palette: "nord",
|