@nowline/embed 0.0.0-dev.20260601071750.g04bdff9 → 0.0.0-dev.20260603150914.g70caedb

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/meta.json CHANGED
@@ -5618,7 +5618,7 @@
5618
5618
  "format": "esm"
5619
5619
  },
5620
5620
  "../core/dist/language/include-resolver.js": {
5621
- "bytes": 12311,
5621
+ "bytes": 15335,
5622
5622
  "imports": [
5623
5623
  {
5624
5624
  "path": "../../node_modules/.pnpm/langium@4.2.4/node_modules/langium/lib/index.js",
@@ -5909,7 +5909,7 @@
5909
5909
  "format": "esm"
5910
5910
  },
5911
5911
  "../layout/dist/nodes/group-node.js": {
5912
- "bytes": 9999,
5912
+ "bytes": 10052,
5913
5913
  "imports": [
5914
5914
  {
5915
5915
  "path": "../core/dist/index.js",
@@ -5976,7 +5976,7 @@
5976
5976
  "format": "esm"
5977
5977
  },
5978
5978
  "../layout/dist/nodes/parallel-node.js": {
5979
- "bytes": 3683,
5979
+ "bytes": 3745,
5980
5980
  "imports": [
5981
5981
  {
5982
5982
  "path": "../layout/dist/dsl-utils.js",
@@ -8653,7 +8653,7 @@
8653
8653
  "format": "esm"
8654
8654
  },
8655
8655
  "../layout/dist/nodes/include-node.js": {
8656
- "bytes": 5295,
8656
+ "bytes": 5433,
8657
8657
  "imports": [
8658
8658
  {
8659
8659
  "path": "../layout/dist/calendar.js",
@@ -8705,7 +8705,7 @@
8705
8705
  "format": "esm"
8706
8706
  },
8707
8707
  "../layout/dist/nodes/roadmap-node.js": {
8708
- "bytes": 39173,
8708
+ "bytes": 39301,
8709
8709
  "imports": [
8710
8710
  {
8711
8711
  "path": "../layout/dist/band-scale.js",
@@ -8791,7 +8791,7 @@
8791
8791
  "format": "esm"
8792
8792
  },
8793
8793
  "../layout/dist/layout.js": {
8794
- "bytes": 60192,
8794
+ "bytes": 61508,
8795
8795
  "imports": [
8796
8796
  {
8797
8797
  "path": "../core/dist/index.js",
@@ -9179,7 +9179,7 @@
9179
9179
  "imports": [],
9180
9180
  "exports": [],
9181
9181
  "inputs": {},
9182
- "bytes": 3328462
9182
+ "bytes": 3336282
9183
9183
  },
9184
9184
  "dist/nowline.min.js": {
9185
9185
  "imports": [],
@@ -10141,7 +10141,7 @@
10141
10141
  "bytesInOutput": 924
10142
10142
  },
10143
10143
  "../core/dist/language/include-resolver.js": {
10144
- "bytesInOutput": 5142
10144
+ "bytesInOutput": 5776
10145
10145
  },
10146
10146
  "../core/dist/language/nowline-validator.js": {
10147
10147
  "bytesInOutput": 26567
@@ -10210,13 +10210,13 @@
10210
10210
  "bytesInOutput": 786
10211
10211
  },
10212
10212
  "../layout/dist/nodes/group-node.js": {
10213
- "bytesInOutput": 1979
10213
+ "bytesInOutput": 2017
10214
10214
  },
10215
10215
  "../layout/dist/nodes/item-node.js": {
10216
10216
  "bytesInOutput": 713
10217
10217
  },
10218
10218
  "../layout/dist/nodes/parallel-node.js": {
10219
- "bytesInOutput": 914
10219
+ "bytesInOutput": 965
10220
10220
  },
10221
10221
  "../../node_modules/.pnpm/d3-array@3.2.4/node_modules/d3-array/src/ascending.js": {
10222
10222
  "bytesInOutput": 69
@@ -10390,16 +10390,16 @@
10390
10390
  "bytesInOutput": 2861
10391
10391
  },
10392
10392
  "../layout/dist/nodes/include-node.js": {
10393
- "bytesInOutput": 1412
10393
+ "bytesInOutput": 1478
10394
10394
  },
10395
10395
  "../layout/dist/nodes/milestone-node.js": {
10396
10396
  "bytesInOutput": 2017
10397
10397
  },
10398
10398
  "../layout/dist/nodes/roadmap-node.js": {
10399
- "bytesInOutput": 8308
10399
+ "bytesInOutput": 8374
10400
10400
  },
10401
10401
  "../layout/dist/layout.js": {
10402
- "bytesInOutput": 12512
10402
+ "bytesInOutput": 12623
10403
10403
  },
10404
10404
  "../renderer/dist/svg/icons.js": {
10405
10405
  "bytesInOutput": 2290
@@ -10444,7 +10444,7 @@
10444
10444
  "bytesInOutput": 257
10445
10445
  }
10446
10446
  },
10447
- "bytes": 662420
10447
+ "bytes": 663391
10448
10448
  }
10449
10449
  }
10450
10450
  }
@@ -1,4 +1,4 @@
1
- /*! @nowline/embed 0.0.0-dev.20260601071750.g04bdff9 sha=04bdff9 built=2026-06-01T06:46:51Z */
1
+ /*! @nowline/embed 0.0.0-dev.20260603150914.g70caedb sha=70caedb built=2026-06-02T23:57:20-07:00 */
2
2
  var __create = Object.create;
3
3
  var __defProp = Object.defineProperty;
4
4
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
@@ -29140,15 +29140,15 @@ function applyRoadmapMode(target, child, childConfig, mode, childPath, childRelP
29140
29140
  message: `${category} "${name}" from ${basename(childPath)} is shadowed by the parent's definition.`,
29141
29141
  sourcePath: childPath
29142
29142
  });
29143
- mergeMap(target.persons, child.persons, (name) => warn(name, "Person"));
29144
- mergeMap(target.teams, child.teams, (name) => warn(name, "Team"));
29145
- mergeMap(target.anchors, child.anchors, (name) => warn(name, "Anchor"));
29146
- mergeMap(target.labels, child.labels, (name) => warn(name, "Label"));
29147
- mergeMap(target.sizes, child.sizes, (name) => warn(name, "Size"));
29148
- mergeMap(target.statuses, child.statuses, (name) => warn(name, "Status"));
29149
- mergeMap(target.swimlanes, child.swimlanes, (name) => warn(name, "Swimlane"));
29150
- mergeMap(target.milestones, child.milestones, (name) => warn(name, "Milestone"));
29151
- mergeMap(target.footnotes, child.footnotes, (name) => warn(name, "Footnote"));
29143
+ mergeContentMap(target.persons, child.persons, (name) => warn(name, "Person"));
29144
+ mergeContentMap(target.teams, child.teams, (name) => warn(name, "Team"));
29145
+ mergeContentMap(target.anchors, child.anchors, (name) => warn(name, "Anchor"));
29146
+ mergeContentMap(target.labels, child.labels, (name) => warn(name, "Label"));
29147
+ mergeContentMap(target.sizes, child.sizes, (name) => warn(name, "Size"));
29148
+ mergeContentMap(target.statuses, child.statuses, (name) => warn(name, "Status"));
29149
+ mergeContentMap(target.swimlanes, child.swimlanes, (name) => warn(name, "Swimlane"));
29150
+ mergeContentMap(target.milestones, child.milestones, (name) => warn(name, "Milestone"));
29151
+ mergeContentMap(target.footnotes, child.footnotes, (name) => warn(name, "Footnote"));
29152
29152
  if (child.roadmap && !target.roadmap) {
29153
29153
  target.roadmap = child.roadmap;
29154
29154
  }
@@ -29162,6 +29162,19 @@ function mergeMap(target, source, onConflict) {
29162
29162
  target.set(name, value);
29163
29163
  }
29164
29164
  }
29165
+ function mergeContentMap(target, source, onConflict) {
29166
+ for (const [name, value] of source) {
29167
+ if (!value.name && value.title) {
29168
+ target.set(uniqueMapKey(target, slugifyTitle(value.title)), value);
29169
+ continue;
29170
+ }
29171
+ if (target.has(name)) {
29172
+ onConflict(name);
29173
+ continue;
29174
+ }
29175
+ target.set(name, value);
29176
+ }
29177
+ }
29165
29178
  function mergeLocalConfig(config2, file) {
29166
29179
  for (const entry of file.configEntries) {
29167
29180
  addConfigEntry(config2, entry);
@@ -29188,51 +29201,92 @@ function addConfigEntry(config2, entry) {
29188
29201
  }
29189
29202
  }
29190
29203
  }
29204
+ function collectExplicitRoadmapIds(entries) {
29205
+ const reserved = {
29206
+ swimlanes: /* @__PURE__ */ new Set(),
29207
+ persons: /* @__PURE__ */ new Set(),
29208
+ teams: /* @__PURE__ */ new Set(),
29209
+ anchors: /* @__PURE__ */ new Set(),
29210
+ labels: /* @__PURE__ */ new Set(),
29211
+ sizes: /* @__PURE__ */ new Set(),
29212
+ statuses: /* @__PURE__ */ new Set(),
29213
+ milestones: /* @__PURE__ */ new Set(),
29214
+ footnotes: /* @__PURE__ */ new Set()
29215
+ };
29216
+ for (const entry of entries) {
29217
+ const name = entry.name;
29218
+ if (!name)
29219
+ continue;
29220
+ if (isSwimlaneDeclaration(entry))
29221
+ reserved.swimlanes.add(name);
29222
+ else if (isPersonDeclaration(entry))
29223
+ reserved.persons.add(name);
29224
+ else if (isTeamDeclaration(entry))
29225
+ reserved.teams.add(name);
29226
+ else if (isAnchorDeclaration(entry))
29227
+ reserved.anchors.add(name);
29228
+ else if (isLabelDeclaration(entry))
29229
+ reserved.labels.add(name);
29230
+ else if (isSizeDeclaration(entry))
29231
+ reserved.sizes.add(name);
29232
+ else if (isStatusDeclaration(entry))
29233
+ reserved.statuses.add(name);
29234
+ else if (isMilestoneDeclaration(entry))
29235
+ reserved.milestones.add(name);
29236
+ else if (isFootnoteDeclaration(entry))
29237
+ reserved.footnotes.add(name);
29238
+ }
29239
+ return reserved;
29240
+ }
29191
29241
  function mergeLocalContent(content, file) {
29192
29242
  if (file.roadmapDecl && !content.roadmap) {
29193
29243
  content.roadmap = file.roadmapDecl;
29194
29244
  }
29245
+ const reserved = collectExplicitRoadmapIds(file.roadmapEntries);
29195
29246
  for (const entry of file.roadmapEntries) {
29196
- addRoadmapEntry(content, entry);
29247
+ addRoadmapEntry(content, entry, reserved);
29197
29248
  }
29198
29249
  }
29199
- function addRoadmapEntry(content, entry) {
29200
- if (isSwimlaneDeclaration(entry)) {
29201
- if (entry.name && !content.swimlanes.has(entry.name)) {
29202
- content.swimlanes.set(entry.name, entry);
29250
+ function slugifyTitle(title) {
29251
+ return title.toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-+|-+$/g, "") || "entity";
29252
+ }
29253
+ function uniqueMapKey(map2, base, reserved) {
29254
+ const taken = (key) => map2.has(key) || (reserved?.has(key) ?? false);
29255
+ if (!taken(base))
29256
+ return base;
29257
+ let n = 2;
29258
+ while (taken(`${base}-${n}`))
29259
+ n++;
29260
+ return `${base}-${n}`;
29261
+ }
29262
+ function addByKey(map2, entry, reserved) {
29263
+ if (entry.name) {
29264
+ if (!map2.has(entry.name)) {
29265
+ map2.set(entry.name, entry);
29203
29266
  }
29267
+ } else if (entry.title) {
29268
+ map2.set(uniqueMapKey(map2, slugifyTitle(entry.title), reserved), entry);
29269
+ }
29270
+ }
29271
+ function addRoadmapEntry(content, entry, reserved) {
29272
+ if (isSwimlaneDeclaration(entry)) {
29273
+ addByKey(content.swimlanes, entry, reserved.swimlanes);
29204
29274
  } else if (isPersonDeclaration(entry)) {
29205
- if (entry.name && !content.persons.has(entry.name)) {
29206
- content.persons.set(entry.name, entry);
29207
- }
29275
+ addByKey(content.persons, entry, reserved.persons);
29208
29276
  } else if (isTeamDeclaration(entry)) {
29209
- if (entry.name && !content.teams.has(entry.name)) {
29210
- content.teams.set(entry.name, entry);
29211
- }
29277
+ addByKey(content.teams, entry, reserved.teams);
29212
29278
  } else if (isAnchorDeclaration(entry)) {
29213
- if (entry.name && !content.anchors.has(entry.name)) {
29214
- content.anchors.set(entry.name, entry);
29215
- }
29279
+ addByKey(content.anchors, entry, reserved.anchors);
29216
29280
  } else if (isLabelDeclaration(entry)) {
29217
- if (entry.name && !content.labels.has(entry.name)) {
29218
- content.labels.set(entry.name, entry);
29219
- }
29281
+ addByKey(content.labels, entry, reserved.labels);
29220
29282
  } else if (isSizeDeclaration(entry)) {
29221
- if (entry.name && !content.sizes.has(entry.name)) {
29222
- content.sizes.set(entry.name, entry);
29223
- }
29283
+ addByKey(content.sizes, entry, reserved.sizes);
29224
29284
  } else if (isStatusDeclaration(entry)) {
29225
- if (entry.name && !content.statuses.has(entry.name)) {
29226
- content.statuses.set(entry.name, entry);
29227
- }
29285
+ addByKey(content.statuses, entry, reserved.statuses);
29228
29286
  } else if (isMilestoneDeclaration(entry)) {
29229
- if (entry.name && !content.milestones.has(entry.name)) {
29230
- content.milestones.set(entry.name, entry);
29231
- }
29287
+ addByKey(content.milestones, entry, reserved.milestones);
29232
29288
  } else if (isFootnoteDeclaration(entry)) {
29233
- if (entry.name && !content.footnotes.has(entry.name)) {
29234
- content.footnotes.set(entry.name, entry);
29235
- }
29289
+ addByKey(content.footnotes, entry, reserved.footnotes);
29236
29290
  }
29237
29291
  }
29238
29292
 
@@ -32942,7 +32996,8 @@ var GroupNode = class {
32942
32996
  const startX = cursor.x;
32943
32997
  const title = node.title ?? node.name;
32944
32998
  const previousFlowKey = ctx.currentFlowKey;
32945
- ctx.currentFlowKey = `${previousFlowKey}/group:${node.name ?? "g"}`;
32999
+ ctx.nextGroupId += 1;
33000
+ ctx.currentFlowKey = `${previousFlowKey}/group:${node.name ?? `group-${ctx.nextGroupId}`}`;
32946
33001
  const hasChiclet = style.bg !== "none" && style.bg !== "#ffffff" && Boolean(title);
32947
33002
  const topPad = hasChiclet ? GROUP_TITLE_TAB_HEIGHT_PX + GROUP_TITLE_TAB_GUTTER_PX : 0;
32948
33003
  const bottomPad = hasChiclet ? GROUP_BOTTOM_PAD_PX : 0;
@@ -33131,7 +33186,8 @@ var ParallelNode = class {
33131
33186
  let maxRight = startX;
33132
33187
  let accumulatedHeight = 0;
33133
33188
  const previousFlowKey = ctx.currentFlowKey;
33134
- const parId = node.name ?? "p";
33189
+ ctx.nextParallelId += 1;
33190
+ const parId = node.name ?? `parallel-${ctx.nextParallelId}`;
33135
33191
  let childIndex = 0;
33136
33192
  for (const child of node.content) {
33137
33193
  if (child.$type === "DescriptionDirective")
@@ -35727,13 +35783,17 @@ function buildIncludeRegions(regions, ctx, startY, deps) {
35727
35783
  chartTopY: innerStartY,
35728
35784
  chartBottomY: innerStartY,
35729
35785
  swimlaneBottomY: innerStartY,
35730
- chartRightX: ctx.chartRightX
35786
+ chartRightX: ctx.chartRightX,
35787
+ nextParallelId: 0,
35788
+ nextGroupId: 0
35731
35789
  };
35732
35790
  const nestedSwimlanes = [];
35733
35791
  let cursorY = innerStartY;
35734
35792
  let bandIndex = 0;
35735
35793
  let nestedContentRightX = childCtx.timeline.originX;
35736
35794
  for (const lane of region.content.swimlanes.values()) {
35795
+ childCtx.nextParallelId = 0;
35796
+ childCtx.nextGroupId = 0;
35737
35797
  const { positioned, usedHeight, usedRightX } = new SwimlaneNode({ lane, bandIndex }, deps).place({ x: childCtx.timeline.originX, y: cursorY }, childCtx);
35738
35798
  nestedSwimlanes.push(positioned);
35739
35799
  cursorY += usedHeight;
@@ -36081,7 +36141,9 @@ var RoadmapNode = class {
36081
36141
  chartTopY: timelineY + timelineHeightBudget,
36082
36142
  chartBottomY: 0,
36083
36143
  swimlaneBottomY: 0,
36084
- chartRightX: finalChartRightX
36144
+ chartRightX: finalChartRightX,
36145
+ nextParallelId: 0,
36146
+ nextGroupId: 0
36085
36147
  };
36086
36148
  for (const e of datePinnedEntries) {
36087
36149
  const placement = markerRowPlacements.get(e.id);
@@ -36101,6 +36163,8 @@ var RoadmapNode = class {
36101
36163
  const swimlaneDefaultStyle = resolveStyle("swimlane", [], styleCtx);
36102
36164
  const interBandGapPx = SPACING_PX[swimlaneDefaultStyle.spacing] ?? 0;
36103
36165
  const runSwimlaneLoop = () => {
36166
+ ctx.nextParallelId = 0;
36167
+ ctx.nextGroupId = 0;
36104
36168
  const out = [];
36105
36169
  let cursorY = ctx.chartTopY;
36106
36170
  let bIndex = 0;
@@ -36779,24 +36843,25 @@ function sequenceItem(node, cursor, ctx, ownerOverride) {
36779
36843
  if (id) {
36780
36844
  ctx.entityLeftEdges.set(id, logicalLeft);
36781
36845
  ctx.entityRightEdges.set(id, logicalRight);
36782
- ctx.entityMidpoints.set(id, {
36783
- x: (logicalLeft + logicalRight) / 2,
36784
- y: itemBox.y + itemBox.height / 2
36785
- });
36786
- ctx.entityVisualLeftX.set(id, itemBox.x);
36787
- ctx.entityVisualRightX.set(id, itemBox.x + itemBox.width);
36788
- const arrowSource = textSpills ? {
36789
- x: itemBox.x + itemBox.width,
36790
- y: itemBox.y + itemBox.height - PROGRESS_STRIP_HEIGHT_PX / 2
36791
- } : {
36792
- x: itemBox.x + itemBox.width,
36793
- y: itemBox.y + itemBox.height / 2
36794
- };
36795
- ctx.itemArrowSource.set(id, arrowSource);
36796
- ctx.itemFlowKey.set(id, ctx.currentFlowKey);
36797
- const slackAttachY = textSpills ? itemBox.y + itemBox.height - PROGRESS_STRIP_HEIGHT_PX / 2 : itemBox.y + itemBox.height / 2;
36798
- ctx.itemSlackAttachY.set(id, slackAttachY);
36799
36846
  }
36847
+ const drawKey = id ?? syntheticItemKey(node);
36848
+ ctx.entityMidpoints.set(drawKey, {
36849
+ x: (logicalLeft + logicalRight) / 2,
36850
+ y: itemBox.y + itemBox.height / 2
36851
+ });
36852
+ ctx.entityVisualLeftX.set(drawKey, itemBox.x);
36853
+ ctx.entityVisualRightX.set(drawKey, itemBox.x + itemBox.width);
36854
+ const arrowSource = textSpills ? {
36855
+ x: itemBox.x + itemBox.width,
36856
+ y: itemBox.y + itemBox.height - PROGRESS_STRIP_HEIGHT_PX / 2
36857
+ } : {
36858
+ x: itemBox.x + itemBox.width,
36859
+ y: itemBox.y + itemBox.height / 2
36860
+ };
36861
+ ctx.itemArrowSource.set(drawKey, arrowSource);
36862
+ ctx.itemFlowKey.set(drawKey, ctx.currentFlowKey);
36863
+ const slackAttachY = textSpills ? itemBox.y + itemBox.height - PROGRESS_STRIP_HEIGHT_PX / 2 : itemBox.y + itemBox.height / 2;
36864
+ ctx.itemSlackAttachY.set(drawKey, slackAttachY);
36800
36865
  cursor.x = logicalRight;
36801
36866
  cursor.maxX = Math.max(cursor.maxX, cursor.x);
36802
36867
  cursor.height = Math.max(cursor.height, ctx.bandScale.step() + chipBarExtra);
@@ -36866,6 +36931,10 @@ function sequenceOne(node, cursor, ctx) {
36866
36931
  function estimateTextWidth2(text, fontSize) {
36867
36932
  return text.length * fontSize * 0.58;
36868
36933
  }
36934
+ function syntheticItemKey(node) {
36935
+ const start = node.$cstNode?.range.start;
36936
+ return `#item@${start ? start.line + 1 : 0}:${start ? start.character + 1 : 0}`;
36937
+ }
36869
36938
  function computeChipBarExtra(chipsOutside, captionSpills, chipRowCount, bandwidth, hasMeta) {
36870
36939
  if (chipRowCount === 0)
36871
36940
  return 0;
@@ -37221,8 +37290,7 @@ function collectItems(swimlanes) {
37221
37290
  const out = /* @__PURE__ */ new Map();
37222
37291
  const walk2 = (node) => {
37223
37292
  if (isItemDeclaration(node)) {
37224
- if (node.name)
37225
- out.set(node.name, node);
37293
+ out.set(node.name ?? syntheticItemKey(node), node);
37226
37294
  return;
37227
37295
  }
37228
37296
  if (isParallelBlock(node)) {
@@ -39819,8 +39887,8 @@ function effectiveTheme(theme, systemTheme) {
39819
39887
  }
39820
39888
 
39821
39889
  // src/index.ts
39822
- var version = true ? "0.0.0-dev.20260601071750.g04bdff9" : "0.0.0";
39823
- var sha = true ? "04bdff9" : "unknown";
39890
+ var version = true ? "0.0.0-dev.20260603150914.g70caedb" : "0.0.0";
39891
+ var sha = true ? "70caedb" : "unknown";
39824
39892
  var DEFAULT_SELECTOR = "pre code.language-nowline, code.language-nowline";
39825
39893
  var initialConfig = {
39826
39894
  theme: "auto",