@nowline/embed 0.0.0-dev.20261020011950.gce8a91f → 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",
@@ -6333,7 +6333,7 @@
6333
6333
  "format": "esm"
6334
6334
  },
6335
6335
  "../layout/dist/nodes/item-measure.js": {
6336
- "bytes": 24908,
6336
+ "bytes": 25246,
6337
6337
  "imports": [
6338
6338
  {
6339
6339
  "path": "../layout/dist/calendar.js",
@@ -10231,7 +10231,7 @@
10231
10231
  "format": "esm"
10232
10232
  },
10233
10233
  "../renderer/dist/svg/item.js": {
10234
- "bytes": 25642,
10234
+ "bytes": 25891,
10235
10235
  "imports": [
10236
10236
  {
10237
10237
  "path": "../layout/dist/index.js",
@@ -10646,7 +10646,7 @@
10646
10646
  "imports": [],
10647
10647
  "exports": [],
10648
10648
  "inputs": {},
10649
- "bytes": 3707043
10649
+ "bytes": 3707866
10650
10650
  },
10651
10651
  "dist/nowline.min.js": {
10652
10652
  "imports": [],
@@ -11461,7 +11461,7 @@
11461
11461
  "bytesInOutput": 474
11462
11462
  },
11463
11463
  "../layout/dist/capacity.js": {
11464
- "bytesInOutput": 1013
11464
+ "bytesInOutput": 1036
11465
11465
  },
11466
11466
  "../layout/dist/dsl-utils.js": {
11467
11467
  "bytesInOutput": 50
@@ -11665,7 +11665,7 @@
11665
11665
  "bytesInOutput": 1704
11666
11666
  },
11667
11667
  "../layout/dist/nodes/item-measure.js": {
11668
- "bytesInOutput": 4804
11668
+ "bytesInOutput": 4828
11669
11669
  },
11670
11670
  "../layout/dist/nodes/sequence-item.js": {
11671
11671
  "bytesInOutput": 3064
@@ -11824,7 +11824,7 @@
11824
11824
  "bytesInOutput": 5375
11825
11825
  },
11826
11826
  "../renderer/dist/svg/item.js": {
11827
- "bytesInOutput": 6255
11827
+ "bytesInOutput": 6308
11828
11828
  },
11829
11829
  "../renderer/dist/svg/swimlanes.js": {
11830
11830
  "bytesInOutput": 3086
@@ -11866,7 +11866,7 @@
11866
11866
  "bytesInOutput": 257
11867
11867
  }
11868
11868
  },
11869
- "bytes": 675243
11869
+ "bytes": 675343
11870
11870
  }
11871
11871
  }
11872
11872
  }
@@ -1,4 +1,4 @@
1
- /*! @nowline/embed 0.0.0-dev.20261020011950.gce8a91f sha=ce8a91f built=2026-10-20T01:14:35Z */
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
  }
@@ -33064,7 +33067,8 @@ function resolveItemMeta(props, ctx, sizeResolved, status, progress, capacityIco
33064
33067
  icon: capacityIcon,
33065
33068
  ...iconDxTerms !== void 0 ? { iconDxTerms } : {}
33066
33069
  };
33067
- 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;
33068
33072
  capacityTrailingWidth = separatorWidth + estimateCapacitySuffixWidth(capacityText, capacityIcon, META_FONT_SIZE_PX_LOCAL);
33069
33073
  }
33070
33074
  return { metaText, ownerDisplay, capacity, capacityTrailingWidth };
@@ -39141,11 +39145,15 @@ function renderItemMetaLine(opts) {
39141
39145
  const glyphDx = num(fontSize * 0.1);
39142
39146
  return openText + escText(metaText) + `<tspan dx="${sepDx}">${escText(numberStr)}</tspan><tspan dx="${glyphDx}">${escText(icon.text)}</tspan></text>`;
39143
39147
  }
39148
+ const terms = capacity.iconDxTerms ?? [];
39149
+ let numberX = x2;
39150
+ for (const term of terms.slice(0, 2))
39151
+ numberX += term;
39144
39152
  const def = CAPACITY_ICON_SVG[icon.name];
39145
39153
  const iconSize = fontSize;
39146
39154
  const iconX = iconXFrom(x2, capacity);
39147
39155
  const iconY = baselineY - fontSize * 0.85;
39148
- 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);
39149
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>`;
39150
39158
  return textPart + iconPart;
39151
39159
  }
@@ -40899,8 +40907,8 @@ function effectiveTheme(theme, systemTheme) {
40899
40907
  }
40900
40908
 
40901
40909
  // src/index.ts
40902
- var version = true ? "0.0.0-dev.20261020011950.gce8a91f" : "0.0.0";
40903
- var sha = true ? "ce8a91f" : "unknown";
40910
+ var version = true ? "0.0.0-dev.20261020015516.g0053ade" : "0.0.0";
40911
+ var sha = true ? "0053ade" : "unknown";
40904
40912
  var DEFAULT_SELECTOR = "pre code.language-nowline, code.language-nowline";
40905
40913
  var initialConfig = {
40906
40914
  theme: "auto",