@nowline/embed 0.0.0-dev.20261020002921.g70f418b → 0.0.0-dev.20261020015516.g0053ade

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
@@ -4908,7 +4908,7 @@
4908
4908
  "format": "esm"
4909
4909
  },
4910
4910
  "../layout/dist/capacity.js": {
4911
- "bytes": 8839,
4911
+ "bytes": 8827,
4912
4912
  "imports": [
4913
4913
  {
4914
4914
  "path": "../core/dist/internal.js",
@@ -5035,7 +5035,7 @@
5035
5035
  "format": "esm"
5036
5036
  },
5037
5037
  "../layout/dist/frame-tab-geometry.js": {
5038
- "bytes": 5033,
5038
+ "bytes": 5765,
5039
5039
  "imports": [],
5040
5040
  "format": "esm"
5041
5041
  },
@@ -6291,8 +6291,13 @@
6291
6291
  "format": "esm"
6292
6292
  },
6293
6293
  "../layout/dist/layout-context.js": {
6294
- "bytes": 3490,
6294
+ "bytes": 4220,
6295
6295
  "imports": [
6296
+ {
6297
+ "path": "../core/dist/index.js",
6298
+ "kind": "import-statement",
6299
+ "original": "@nowline/core"
6300
+ },
6296
6301
  {
6297
6302
  "path": "../layout/dist/calendar.js",
6298
6303
  "kind": "import-statement",
@@ -6328,7 +6333,7 @@
6328
6333
  "format": "esm"
6329
6334
  },
6330
6335
  "../layout/dist/nodes/item-measure.js": {
6331
- "bytes": 24908,
6336
+ "bytes": 25246,
6332
6337
  "imports": [
6333
6338
  {
6334
6339
  "path": "../layout/dist/calendar.js",
@@ -6698,7 +6703,7 @@
6698
6703
  "format": "esm"
6699
6704
  },
6700
6705
  "../layout/dist/nodes/swimlane-node.js": {
6701
- "bytes": 10707,
6706
+ "bytes": 10428,
6702
6707
  "imports": [
6703
6708
  {
6704
6709
  "path": "../layout/dist/capacity.js",
@@ -9899,7 +9904,7 @@
9899
9904
  "format": "esm"
9900
9905
  },
9901
9906
  "../layout/dist/index.js": {
9902
- "bytes": 5046,
9907
+ "bytes": 5102,
9903
9908
  "imports": [
9904
9909
  {
9905
9910
  "path": "../layout/dist/calendar-resolver.js",
@@ -10226,7 +10231,7 @@
10226
10231
  "format": "esm"
10227
10232
  },
10228
10233
  "../renderer/dist/svg/item.js": {
10229
- "bytes": 25642,
10234
+ "bytes": 25891,
10230
10235
  "imports": [
10231
10236
  {
10232
10237
  "path": "../layout/dist/index.js",
@@ -10262,13 +10267,18 @@
10262
10267
  "format": "esm"
10263
10268
  },
10264
10269
  "../renderer/dist/svg/swimlanes.js": {
10265
- "bytes": 10852,
10270
+ "bytes": 10947,
10266
10271
  "imports": [
10267
10272
  {
10268
10273
  "path": "../layout/dist/index.js",
10269
10274
  "kind": "import-statement",
10270
10275
  "original": "@nowline/layout"
10271
10276
  },
10277
+ {
10278
+ "path": "../renderer/dist/svg/icons.js",
10279
+ "kind": "import-statement",
10280
+ "original": "./icons.js"
10281
+ },
10272
10282
  {
10273
10283
  "path": "../renderer/dist/svg/item.js",
10274
10284
  "kind": "import-statement",
@@ -10636,7 +10646,7 @@
10636
10646
  "imports": [],
10637
10647
  "exports": [],
10638
10648
  "inputs": {},
10639
- "bytes": 3704853
10649
+ "bytes": 3707866
10640
10650
  },
10641
10651
  "dist/nowline.min.js": {
10642
10652
  "imports": [],
@@ -11451,7 +11461,7 @@
11451
11461
  "bytesInOutput": 474
11452
11462
  },
11453
11463
  "../layout/dist/capacity.js": {
11454
- "bytesInOutput": 1013
11464
+ "bytesInOutput": 1036
11455
11465
  },
11456
11466
  "../layout/dist/dsl-utils.js": {
11457
11467
  "bytesInOutput": 50
@@ -11484,7 +11494,7 @@
11484
11494
  "bytesInOutput": 3272
11485
11495
  },
11486
11496
  "../layout/dist/frame-tab-geometry.js": {
11487
- "bytesInOutput": 357
11497
+ "bytesInOutput": 374
11488
11498
  },
11489
11499
  "../layout/dist/header-logo.js": {
11490
11500
  "bytesInOutput": 450
@@ -11649,13 +11659,13 @@
11649
11659
  "bytesInOutput": 100
11650
11660
  },
11651
11661
  "../layout/dist/layout-context.js": {
11652
- "bytesInOutput": 1132
11662
+ "bytesInOutput": 1290
11653
11663
  },
11654
11664
  "../layout/dist/nodes/item-node.js": {
11655
11665
  "bytesInOutput": 1704
11656
11666
  },
11657
11667
  "../layout/dist/nodes/item-measure.js": {
11658
- "bytesInOutput": 4804
11668
+ "bytesInOutput": 4828
11659
11669
  },
11660
11670
  "../layout/dist/nodes/sequence-item.js": {
11661
11671
  "bytesInOutput": 3064
@@ -11685,7 +11695,7 @@
11685
11695
  "bytesInOutput": 1503
11686
11696
  },
11687
11697
  "../layout/dist/nodes/swimlane-node.js": {
11688
- "bytesInOutput": 1866
11698
+ "bytesInOutput": 1878
11689
11699
  },
11690
11700
  "../layout/dist/nodes/include-node.js": {
11691
11701
  "bytesInOutput": 1433
@@ -11814,10 +11824,10 @@
11814
11824
  "bytesInOutput": 5375
11815
11825
  },
11816
11826
  "../renderer/dist/svg/item.js": {
11817
- "bytesInOutput": 6255
11827
+ "bytesInOutput": 6308
11818
11828
  },
11819
11829
  "../renderer/dist/svg/swimlanes.js": {
11820
- "bytesInOutput": 2943
11830
+ "bytesInOutput": 3086
11821
11831
  },
11822
11832
  "../renderer/dist/svg/timeline.js": {
11823
11833
  "bytesInOutput": 2753
@@ -11856,7 +11866,7 @@
11856
11866
  "bytesInOutput": 257
11857
11867
  }
11858
11868
  },
11859
- "bytes": 674913
11869
+ "bytes": 675343
11860
11870
  }
11861
11871
  }
11862
11872
  }
@@ -1,4 +1,4 @@
1
- /*! @nowline/embed 0.0.0-dev.20261020002921.g70f418b sha=70f418b built=2026-10-20T00:24:12Z */
1
+ /*! @nowline/embed 0.0.0-dev.20261020015516.g0053ade sha=0053ade built=2026-10-20T01:49:32Z */
2
2
  var __create = Object.create;
3
3
  var __defProp = Object.defineProperty;
4
4
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
@@ -21897,19 +21897,22 @@ function estimateCapacitySuffixWidth(text, icon, fontSizePx) {
21897
21897
  return (text.length + 1) * fontSizePx * 0.58;
21898
21898
  }
21899
21899
  const glyphWidthEm = 1;
21900
- const gapEm = 0.1;
21900
+ const gapEm = icon.kind === "builtin" ? CAPACITY_ICON_GAP_EM : 0.1;
21901
21901
  return text.length * fontSizePx * 0.58 + (gapEm + glyphWidthEm) * fontSizePx;
21902
21902
  }
21903
21903
  var META_SUFFIX_DX_EM = 0.6;
21904
- var META_ICON_EM_PER_CHAR = 0.5;
21905
- var CAPACITY_ICON_GAP_EM = 0.1;
21904
+ var CAPACITY_ICON_GAP_EM = 0.25;
21906
21905
  function capacityIconDxTerms(text, icon, fontSizePx, metaText) {
21907
21906
  if (icon?.kind !== "builtin" || icon.name === "multiplier")
21908
21907
  return void 0;
21909
21908
  const gapPx = fontSizePx * CAPACITY_ICON_GAP_EM;
21910
21909
  if (metaText) {
21911
- const tightWidth = (s) => s.length * fontSizePx * META_ICON_EM_PER_CHAR;
21912
- return [tightWidth(metaText), fontSizePx * META_SUFFIX_DX_EM, tightWidth(text), gapPx];
21910
+ return [
21911
+ estimateTextWidth(metaText, fontSizePx),
21912
+ fontSizePx * META_SUFFIX_DX_EM,
21913
+ estimateTextWidth(text, fontSizePx),
21914
+ gapPx
21915
+ ];
21913
21916
  }
21914
21917
  return [estimateTextWidth(text, fontSizePx), gapPx];
21915
21918
  }
@@ -23270,6 +23273,8 @@ function routeDependencies(requests, obstacles, pixelsPerDay) {
23270
23273
  // ../layout/dist/frame-tab-geometry.js
23271
23274
  var FRAME_TAB_TITLE_PX_PER_CHAR = 6.5;
23272
23275
  var FRAME_TAB_OWNER_PX_PER_CHAR = 5;
23276
+ var FRAME_TAB_OWNER_GLYPH_PX = 10;
23277
+ var FRAME_TAB_OWNER_GLYPH_GAP_PX = 3;
23273
23278
  var FRAME_TAB_INNER_GAP_PX = 6;
23274
23279
  var FRAME_TAB_LEFT_INSET_PX = 12;
23275
23280
  var FRAME_TAB_RIGHT_INSET_PX = 12;
@@ -23282,9 +23287,11 @@ function frameTabGeometry(boxX, title, owner, capacityBadgeWidth = 0, footnoteIn
23282
23287
  let cursorX = titleX + titleTextWidth;
23283
23288
  let ownerTextWidth = 0;
23284
23289
  let ownerX = 0;
23290
+ let ownerTextX = 0;
23285
23291
  if (owner) {
23286
- ownerTextWidth = `owner: ${owner}`.length * FRAME_TAB_OWNER_PX_PER_CHAR;
23292
+ ownerTextWidth = FRAME_TAB_OWNER_GLYPH_PX + FRAME_TAB_OWNER_GLYPH_GAP_PX + owner.length * FRAME_TAB_OWNER_PX_PER_CHAR;
23287
23293
  ownerX = cursorX + FRAME_TAB_INNER_GAP_PX;
23294
+ ownerTextX = ownerX + FRAME_TAB_OWNER_GLYPH_PX + FRAME_TAB_OWNER_GLYPH_GAP_PX;
23288
23295
  cursorX = ownerX + ownerTextWidth;
23289
23296
  }
23290
23297
  let badgeX = 0;
@@ -23306,6 +23313,7 @@ function frameTabGeometry(boxX, title, owner, capacityBadgeWidth = 0, footnoteIn
23306
23313
  footnoteIndicatorWidth,
23307
23314
  titleX,
23308
23315
  ownerX,
23316
+ ownerTextX,
23309
23317
  badgeX,
23310
23318
  footnoteRightX,
23311
23319
  tabX,
@@ -32764,6 +32772,21 @@ function scheduledItemDays(ctx, item) {
32764
32772
  }
32765
32773
  return scheduled.days;
32766
32774
  }
32775
+ function withNestedTeams(teams) {
32776
+ const out = new Map(teams);
32777
+ const visit = (team) => {
32778
+ for (const member of team.content) {
32779
+ if (!isTeamDeclaration(member))
32780
+ continue;
32781
+ if (member.name && !out.has(member.name))
32782
+ out.set(member.name, member);
32783
+ visit(member);
32784
+ }
32785
+ };
32786
+ for (const team of teams.values())
32787
+ visit(team);
32788
+ return out;
32789
+ }
32767
32790
  function createLayoutContext(source, shared, chart, init2) {
32768
32791
  return {
32769
32792
  cal: shared.cal,
@@ -32779,7 +32802,7 @@ function createLayoutContext(source, shared, chart, init2) {
32779
32802
  // pixels-per-day scale.
32780
32803
  sizes: resolveSizes(source.content.sizes, shared.cal),
32781
32804
  labels: source.content.labels,
32782
- teams: source.content.teams,
32805
+ teams: withNestedTeams(source.content.teams),
32783
32806
  persons: source.content.persons,
32784
32807
  symbols: source.config.symbols,
32785
32808
  footnoteIndex: init2.footnotes?.index ?? /* @__PURE__ */ new Map(),
@@ -33044,7 +33067,8 @@ function resolveItemMeta(props, ctx, sizeResolved, status, progress, capacityIco
33044
33067
  icon: capacityIcon,
33045
33068
  ...iconDxTerms !== void 0 ? { iconDxTerms } : {}
33046
33069
  };
33047
- const separatorWidth = metaText ? estimateTextWidth(" ", META_FONT_SIZE_PX_LOCAL) : 0;
33070
+ const separatorPx = iconDxTerms !== void 0 ? META_FONT_SIZE_PX_LOCAL * META_SUFFIX_DX_EM : estimateTextWidth(" ", META_FONT_SIZE_PX_LOCAL);
33071
+ const separatorWidth = metaText ? separatorPx : 0;
33048
33072
  capacityTrailingWidth = separatorWidth + estimateCapacitySuffixWidth(capacityText, capacityIcon, META_FONT_SIZE_PX_LOCAL);
33049
33073
  }
33050
33074
  return { metaText, ownerDisplay, capacity, capacityTrailingWidth };
@@ -34494,12 +34518,17 @@ function resolveLaneCapacity(lane, style, symbols) {
34494
34518
  var TAB_TOP_Y = 10;
34495
34519
  var TAB_BOTTOM_Y = 38;
34496
34520
  var TAB_GUTTER_PX = 8;
34497
- function computeLaneTabRightX(lane, capacityBadgeWidthPx, footnoteIndicatorWidthPx) {
34498
- const title = lane.title ?? lane.name ?? "";
34499
- if (!title)
34500
- return 0;
34521
+ function resolveLaneOwner(lane, ctx) {
34501
34522
  const ownerRaw = propValue(lane.properties, "owner");
34502
- return frameTabGeometry(0, title, ownerRaw ?? void 0, capacityBadgeWidthPx, footnoteIndicatorWidthPx).rightX;
34523
+ if (!ownerRaw)
34524
+ return void 0;
34525
+ const team = ctx.teams.get(ownerRaw);
34526
+ if (team)
34527
+ return { text: team.title ?? ownerRaw, kind: "team" };
34528
+ const person = ctx.persons.get(ownerRaw);
34529
+ if (person)
34530
+ return { text: person.title ?? ownerRaw, kind: "person" };
34531
+ return { text: ownerRaw, kind: "team" };
34503
34532
  }
34504
34533
  function collectFootnoteIndicators(lane, ctx) {
34505
34534
  if (!lane.name)
@@ -34544,7 +34573,11 @@ var SwimlaneNode = class {
34544
34573
  const { capacity, badgeWidthPx } = resolveLaneCapacity(lane, style, ctx.symbols);
34545
34574
  const footnoteIndicators = collectFootnoteIndicators(lane, ctx);
34546
34575
  const footnoteIndicatorWidthPx = footnoteIndicators.length > 0 ? estimateTextWidth(footnoteIndicators.join(","), LANE_CAPACITY_BADGE_FONT_SIZE_PX) : 0;
34547
- const tabRightX = computeLaneTabRightX(lane, badgeWidthPx, footnoteIndicatorWidthPx);
34576
+ const boxX = 0;
34577
+ const owner = resolveLaneOwner(lane, ctx);
34578
+ const title = lane.title ?? lane.name ?? "";
34579
+ const tab = title ? frameTabGeometry(boxX, title, owner?.text, badgeWidthPx, footnoteIndicatorWidthPx) : null;
34580
+ const tabRightX = tab?.rightX ?? 0;
34548
34581
  const firstChildDesiredX = firstChildStartX(lane, laneLeftX, ctx);
34549
34582
  const canAlignFirstRowWithTab = !lane.title || firstChildDesiredX === void 0 || firstChildDesiredX >= tabRightX + TAB_GUTTER_PX;
34550
34583
  const startY = origin.y + (canAlignFirstRowWithTab ? TAB_TOP_Y : TAB_BOTTOM_Y);
@@ -34554,18 +34587,11 @@ var SwimlaneNode = class {
34554
34587
  const bandHeight = Math.max(step + 32, tabOffset + track.packer.usedHeight() + 16);
34555
34588
  const usedRightX = Math.max(track.packer.usedRightX(), tabRightX);
34556
34589
  const box = {
34557
- x: 0,
34590
+ x: boxX,
34558
34591
  y: origin.y,
34559
34592
  width: 0,
34560
34593
  height: bandHeight
34561
34594
  };
34562
- const ownerRaw = propValue(lane.properties, "owner");
34563
- let ownerDisplay;
34564
- if (ownerRaw) {
34565
- const team = ctx.teams.get(ownerRaw);
34566
- const person = ctx.persons.get(ownerRaw);
34567
- ownerDisplay = team?.title ?? person?.title ?? ownerRaw;
34568
- }
34569
34595
  const utilization = capacity ? (() => {
34570
34596
  const { warn, over } = resolveLaneUtilizationThresholds(lane, ctx.styleCtx.defaults);
34571
34597
  return computeLaneUtilization({
@@ -34579,17 +34605,17 @@ var SwimlaneNode = class {
34579
34605
  return {
34580
34606
  positioned: {
34581
34607
  id: lane.name,
34582
- title: lane.title ?? lane.name ?? "",
34608
+ title,
34583
34609
  box,
34584
34610
  bandIndex,
34585
34611
  children,
34586
34612
  nested: [],
34587
34613
  style,
34588
- owner: ownerDisplay,
34614
+ owner: owner?.text,
34615
+ ownerKind: owner?.kind,
34589
34616
  footnoteIndicators,
34590
34617
  capacity,
34591
- capacityBadgeWidth: badgeWidthPx,
34592
- footnoteIndicatorWidth: footnoteIndicatorWidthPx,
34618
+ tab,
34593
34619
  utilization
34594
34620
  },
34595
34621
  usedHeight: bandHeight,
@@ -39119,11 +39145,15 @@ function renderItemMetaLine(opts) {
39119
39145
  const glyphDx = num(fontSize * 0.1);
39120
39146
  return openText + escText(metaText) + `<tspan dx="${sepDx}">${escText(numberStr)}</tspan><tspan dx="${glyphDx}">${escText(icon.text)}</tspan></text>`;
39121
39147
  }
39148
+ const terms = capacity.iconDxTerms ?? [];
39149
+ let numberX = x2;
39150
+ for (const term of terms.slice(0, 2))
39151
+ numberX += term;
39122
39152
  const def = CAPACITY_ICON_SVG[icon.name];
39123
39153
  const iconSize = fontSize;
39124
39154
  const iconX = iconXFrom(x2, capacity);
39125
39155
  const iconY = baselineY - fontSize * 0.85;
39126
- const textPart = openText + escText(metaText) + `<tspan dx="${sepDx}">${escText(numberStr)}</tspan></text>`;
39156
+ const textPart = openText + escText(metaText) + "</text>" + textTag({ x: num(numberX), y: num(baselineY), ...baseAttrs }, numberStr);
39127
39157
  const iconPart = `<svg x="${num(iconX)}" y="${num(iconY)}" width="${num(iconSize)}" height="${num(iconSize)}" viewBox="${def.viewBox}" style="color:${escAttr(color)}" aria-hidden="true">${def.body}</svg>`;
39128
39158
  return textPart + iconPart;
39129
39159
  }
@@ -39492,10 +39522,10 @@ function renderSwimlane(s, options, idPrefix, palette, fonts) {
39492
39522
  const ownerText3 = palette.swimlane.ownerText;
39493
39523
  const footnoteColor = palette.swimlane.footnoteIndicator;
39494
39524
  const parts = [];
39495
- if (s.title) {
39525
+ const tab = s.tab;
39526
+ if (tab) {
39496
39527
  const LANE_BADGE_FONT_SIZE_PX = 10;
39497
39528
  const footnoteIndicatorText = s.footnoteIndicators.length > 0 ? s.footnoteIndicators.join(",") : "";
39498
- const tab = frameTabGeometry(s.box.x, s.title, s.owner, s.capacityBadgeWidth, s.footnoteIndicatorWidth);
39499
39529
  const tabH = FRAME_TAB_HEIGHT_PX;
39500
39530
  const tabY = s.box.y + 10;
39501
39531
  const labelY = tabY + FRAME_TAB_LABEL_BASELINE_OFFSET_PX;
@@ -39519,13 +39549,16 @@ function renderSwimlane(s, options, idPrefix, palette, fonts) {
39519
39549
  fill: tabText
39520
39550
  }, s.title));
39521
39551
  if (s.owner) {
39552
+ const glyph = CAPACITY_ICON_SVG[s.ownerKind === "person" ? "person" : "people"];
39553
+ const glyphSize = FRAME_TAB_OWNER_GLYPH_PX;
39554
+ parts.push(`<svg x="${num(tab.ownerX)}" y="${num(labelY - glyphSize * 0.85)}" width="${num(glyphSize)}" height="${num(glyphSize)}" viewBox="${glyph.viewBox}" style="color:${escAttr(ownerText3)}" aria-hidden="true">${glyph.body}</svg>`);
39522
39555
  parts.push(textTag({
39523
- x: num(tab.ownerX),
39556
+ x: num(tab.ownerTextX),
39524
39557
  y: num(labelY),
39525
39558
  "font-family": fonts[s.style.font],
39526
39559
  "font-size": 10,
39527
39560
  fill: ownerText3
39528
- }, `owner: ${s.owner}`));
39561
+ }, s.owner));
39529
39562
  }
39530
39563
  if (s.capacity) {
39531
39564
  parts.push(renderCapacitySuffix(s.capacity, tab.badgeX, labelY, LANE_BADGE_FONT_SIZE_PX, fonts[s.style.font], ownerText3));
@@ -40874,8 +40907,8 @@ function effectiveTheme(theme, systemTheme) {
40874
40907
  }
40875
40908
 
40876
40909
  // src/index.ts
40877
- var version = true ? "0.0.0-dev.20261020002921.g70f418b" : "0.0.0";
40878
- var sha = true ? "70f418b" : "unknown";
40910
+ var version = true ? "0.0.0-dev.20261020015516.g0053ade" : "0.0.0";
40911
+ var sha = true ? "0053ade" : "unknown";
40879
40912
  var DEFAULT_SELECTOR = "pre code.language-nowline, code.language-nowline";
40880
40913
  var initialConfig = {
40881
40914
  theme: "auto",