@nowline/embed 0.11.0 → 0.12.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/dist/meta.json CHANGED
@@ -5366,13 +5366,29 @@
5366
5366
  ],
5367
5367
  "format": "esm"
5368
5368
  },
5369
+ "../core/dist/language/include-swimlanes.js": {
5370
+ "bytes": 2118,
5371
+ "imports": [
5372
+ {
5373
+ "path": "../core/dist/i18n/index.js",
5374
+ "kind": "import-statement",
5375
+ "original": "../i18n/index.js"
5376
+ },
5377
+ {
5378
+ "path": "../core/dist/language/include-waves.js",
5379
+ "kind": "import-statement",
5380
+ "original": "./include-waves.js"
5381
+ }
5382
+ ],
5383
+ "format": "esm"
5384
+ },
5369
5385
  "stub-node-read-file:../util/node-read-file.js": {
5370
5386
  "bytes": 125,
5371
5387
  "imports": [],
5372
5388
  "format": "esm"
5373
5389
  },
5374
5390
  "../core/dist/language/include-resolver.js": {
5375
- "bytes": 25389,
5391
+ "bytes": 25717,
5376
5392
  "imports": [
5377
5393
  {
5378
5394
  "path": "../../node_modules/.pnpm/langium@4.4.0/node_modules/langium/lib/index.js",
@@ -5409,6 +5425,11 @@
5409
5425
  "kind": "import-statement",
5410
5426
  "original": "./include-references.js"
5411
5427
  },
5428
+ {
5429
+ "path": "../core/dist/language/include-swimlanes.js",
5430
+ "kind": "import-statement",
5431
+ "original": "./include-swimlanes.js"
5432
+ },
5412
5433
  {
5413
5434
  "path": "../core/dist/language/include-waves.js",
5414
5435
  "kind": "import-statement",
@@ -5624,7 +5645,7 @@
5624
5645
  "format": "esm"
5625
5646
  },
5626
5647
  "../core/dist/language/validator/structure.js": {
5627
- "bytes": 6747,
5648
+ "bytes": 7021,
5628
5649
  "imports": [
5629
5650
  {
5630
5651
  "path": "../../node_modules/.pnpm/langium@4.4.0/node_modules/langium/lib/index.js",
@@ -5646,6 +5667,11 @@
5646
5667
  "kind": "import-statement",
5647
5668
  "original": "../ast-walk.js"
5648
5669
  },
5670
+ {
5671
+ "path": "../core/dist/language/include-swimlanes.js",
5672
+ "kind": "import-statement",
5673
+ "original": "../include-swimlanes.js"
5674
+ },
5649
5675
  {
5650
5676
  "path": "../core/dist/language/validator/support.js",
5651
5677
  "kind": "import-statement",
@@ -6343,7 +6369,7 @@
6343
6369
  "format": "esm"
6344
6370
  },
6345
6371
  "../layout/dist/nodes/item-measure.js": {
6346
- "bytes": 25269,
6372
+ "bytes": 25372,
6347
6373
  "imports": [
6348
6374
  {
6349
6375
  "path": "../layout/dist/calendar.js",
@@ -10671,7 +10697,7 @@
10671
10697
  "imports": [],
10672
10698
  "exports": [],
10673
10699
  "inputs": {},
10674
- "bytes": 3728511
10700
+ "bytes": 3732651
10675
10701
  },
10676
10702
  "dist/nowline.min.js": {
10677
10703
  "imports": [],
@@ -11578,8 +11604,11 @@
11578
11604
  "../core/dist/language/include-references.js": {
11579
11605
  "bytesInOutput": 375
11580
11606
  },
11607
+ "../core/dist/language/include-swimlanes.js": {
11608
+ "bytesInOutput": 383
11609
+ },
11581
11610
  "../core/dist/language/include-resolver.js": {
11582
- "bytesInOutput": 8116
11611
+ "bytesInOutput": 8163
11583
11612
  },
11584
11613
  "../core/dist/language/validator/support.js": {
11585
11614
  "bytesInOutput": 580
@@ -11600,7 +11629,7 @@
11600
11629
  "bytesInOutput": 2786
11601
11630
  },
11602
11631
  "../core/dist/language/validator/structure.js": {
11603
- "bytesInOutput": 2030
11632
+ "bytesInOutput": 2046
11604
11633
  },
11605
11634
  "../core/dist/language/validator/style.js": {
11606
11635
  "bytesInOutput": 1489
@@ -11891,7 +11920,7 @@
11891
11920
  "bytesInOutput": 257
11892
11921
  }
11893
11922
  },
11894
- "bytes": 679263
11923
+ "bytes": 679709
11895
11924
  }
11896
11925
  }
11897
11926
  }
@@ -1,4 +1,4 @@
1
- /*! @nowline/embed 0.11.0 sha=d8d931f built=2026-10-26T06:05:00Z */
1
+ /*! @nowline/embed 0.12.1 sha=fd731a2 built=2026-11-04T04:03:36Z */
2
2
  var __create = Object.create;
3
3
  var __defProp = Object.defineProperty;
4
4
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
@@ -28568,6 +28568,34 @@ function checkIncludedReferences(rootAbs, edges) {
28568
28568
  return out;
28569
28569
  }
28570
28570
 
28571
+ // ../core/dist/language/include-swimlanes.js
28572
+ function swimlaneRuleNeedsIncludes(file) {
28573
+ return file.includes.some((inc) => inc.options.find((o) => o.key === "roadmap")?.value !== "ignore");
28574
+ }
28575
+ function rendersSwimlane(content) {
28576
+ return content.swimlanes.size > 0 || content.isolatedRegions.some((r) => rendersSwimlane(r.content));
28577
+ }
28578
+ function checkMergedSwimlanes(rootFile, rootAbs, rootContent, diagnostics) {
28579
+ const roadmap = rootFile.roadmapDecl;
28580
+ if (!roadmap || !swimlaneRuleNeedsIncludes(rootFile))
28581
+ return [];
28582
+ if (diagnostics.some((d) => d.severity === "error"))
28583
+ return [];
28584
+ if (rendersSwimlane(rootContent))
28585
+ return [];
28586
+ return [
28587
+ {
28588
+ severity: "error",
28589
+ message: tr("en-US", "NL.E0004"),
28590
+ sourcePath: rootAbs,
28591
+ // The validator reports NL.E0004 on the whole declaration.
28592
+ ...nodeLocation(roadmap),
28593
+ code: "NL.E0004",
28594
+ args: []
28595
+ }
28596
+ ];
28597
+ }
28598
+
28571
28599
  // ../core/dist/language/include-resolver.js
28572
28600
  function readStartProp(decl) {
28573
28601
  const prop = decl?.properties.find((p) => p.key === "start");
@@ -28636,6 +28664,7 @@ async function resolveIncludes(file, filePath, options) {
28636
28664
  failed: ctx.failedWaves
28637
28665
  }));
28638
28666
  ctx.diagnostics.push(...checkIncludedReferences(absPath, ctx.edges));
28667
+ ctx.diagnostics.push(...checkMergedSwimlanes(file, absPath, content, ctx.diagnostics));
28639
28668
  return {
28640
28669
  config: config2,
28641
28670
  content,
@@ -30186,6 +30215,8 @@ function checkIndentationConsistency(file, accept) {
30186
30215
  }
30187
30216
  }
30188
30217
  function checkSwimlaneRequired(file, accept) {
30218
+ if (swimlaneRuleNeedsIncludes(file))
30219
+ return;
30189
30220
  const hasSwimlane = file.roadmapEntries.some(isSwimlaneDeclaration);
30190
30221
  if (file.roadmapDecl && !hasSwimlane) {
30191
30222
  acceptTr(accept, "error", { node: file.roadmapDecl }, "NL.E0004");
@@ -33188,7 +33219,7 @@ function parseLinkIcon(link) {
33188
33219
  }
33189
33220
  function buildLabelChip(label, ctx, x2, y, maxWidth) {
33190
33221
  const style = resolveLabelChipStyle(label, ctx);
33191
- const text = label.name ?? label.title ?? "";
33222
+ const text = label.title ?? label.name ?? "";
33192
33223
  const padKey = style.padding === "none" ? "xs" : style.padding;
33193
33224
  const pad = PADDING_PX[padKey];
33194
33225
  let width = Math.max(20, Math.round(text.length * 5.5 + pad * 2));
@@ -41037,8 +41068,8 @@ function effectiveTheme(theme, systemTheme) {
41037
41068
  }
41038
41069
 
41039
41070
  // src/index.ts
41040
- var version = true ? "0.11.0" : "0.0.0";
41041
- var sha = true ? "d8d931f" : "unknown";
41071
+ var version = true ? "0.12.1" : "0.0.0";
41072
+ var sha = true ? "fd731a2" : "unknown";
41042
41073
  var DEFAULT_SELECTOR = "pre code.language-nowline, code.language-nowline";
41043
41074
  var initialConfig = {
41044
41075
  theme: "auto",