@nowline/embed 0.0.0-dev.20261018161512.gdb10ecc → 0.0.0-dev.20261019024645.g95fa9ba

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
@@ -6106,6 +6106,11 @@
6106
6106
  ],
6107
6107
  "format": "esm"
6108
6108
  },
6109
+ "../layout/dist/chart-translation.js": {
6110
+ "bytes": 3081,
6111
+ "imports": [],
6112
+ "format": "esm"
6113
+ },
6109
6114
  "../layout/dist/nodes/marker-geometry.js": {
6110
6115
  "bytes": 1922,
6111
6116
  "imports": [],
@@ -6260,7 +6265,7 @@
6260
6265
  "format": "esm"
6261
6266
  },
6262
6267
  "../layout/dist/layout-context.js": {
6263
- "bytes": 3388,
6268
+ "bytes": 3798,
6264
6269
  "imports": [
6265
6270
  {
6266
6271
  "path": "../layout/dist/calendar.js",
@@ -6490,11 +6495,6 @@
6490
6495
  ],
6491
6496
  "format": "esm"
6492
6497
  },
6493
- "../layout/dist/positioned-shift.js": {
6494
- "bytes": 2621,
6495
- "imports": [],
6496
- "format": "esm"
6497
- },
6498
6498
  "../layout/dist/nodes/marker-band.js": {
6499
6499
  "bytes": 9564,
6500
6500
  "imports": [
@@ -6517,7 +6517,7 @@
6517
6517
  "format": "esm"
6518
6518
  },
6519
6519
  "../layout/dist/nodes/milestone-node.js": {
6520
- "bytes": 14669,
6520
+ "bytes": 14950,
6521
6521
  "imports": [
6522
6522
  {
6523
6523
  "path": "../layout/dist/dsl-utils.js",
@@ -6529,6 +6529,11 @@
6529
6529
  "kind": "import-statement",
6530
6530
  "original": "../item-port-geometry.js"
6531
6531
  },
6532
+ {
6533
+ "path": "../layout/dist/layout-context.js",
6534
+ "kind": "import-statement",
6535
+ "original": "../layout-context.js"
6536
+ },
6532
6537
  {
6533
6538
  "path": "../layout/dist/style-resolution.js",
6534
6539
  "kind": "import-statement",
@@ -6713,8 +6718,13 @@
6713
6718
  "format": "esm"
6714
6719
  },
6715
6720
  "../layout/dist/nodes/include-node.js": {
6716
- "bytes": 7090,
6721
+ "bytes": 7155,
6717
6722
  "imports": [
6723
+ {
6724
+ "path": "../layout/dist/chart-translation.js",
6725
+ "kind": "import-statement",
6726
+ "original": "../chart-translation.js"
6727
+ },
6718
6728
  {
6719
6729
  "path": "../layout/dist/include-chrome-geometry.js",
6720
6730
  "kind": "import-statement",
@@ -6725,11 +6735,6 @@
6725
6735
  "kind": "import-statement",
6726
6736
  "original": "../layout-context.js"
6727
6737
  },
6728
- {
6729
- "path": "../layout/dist/positioned-shift.js",
6730
- "kind": "import-statement",
6731
- "original": "../positioned-shift.js"
6732
- },
6733
6738
  {
6734
6739
  "path": "../layout/dist/style-resolution.js",
6735
6740
  "kind": "import-statement",
@@ -6959,7 +6964,7 @@
6959
6964
  "format": "esm"
6960
6965
  },
6961
6966
  "../layout/dist/phases/finalize.js": {
6962
- "bytes": 40512,
6967
+ "bytes": 40739,
6963
6968
  "imports": [
6964
6969
  {
6965
6970
  "path": "../layout/dist/axis-columns.js",
@@ -6971,6 +6976,11 @@
6971
6976
  "kind": "import-statement",
6972
6977
  "original": "../calendar.js"
6973
6978
  },
6979
+ {
6980
+ "path": "../layout/dist/chart-translation.js",
6981
+ "kind": "import-statement",
6982
+ "original": "../chart-translation.js"
6983
+ },
6974
6984
  {
6975
6985
  "path": "../layout/dist/i18n.js",
6976
6986
  "kind": "import-statement",
@@ -7031,11 +7041,6 @@
7031
7041
  "kind": "import-statement",
7032
7042
  "original": "../nodes/wave-node.js"
7033
7043
  },
7034
- {
7035
- "path": "../layout/dist/positioned-shift.js",
7036
- "kind": "import-statement",
7037
- "original": "../positioned-shift.js"
7038
- },
7039
7044
  {
7040
7045
  "path": "../layout/dist/text-measure.js",
7041
7046
  "kind": "import-statement",
@@ -9544,7 +9549,7 @@
9544
9549
  "format": "esm"
9545
9550
  },
9546
9551
  "../layout/dist/phases/place.js": {
9547
- "bytes": 10387,
9552
+ "bytes": 10643,
9548
9553
  "imports": [
9549
9554
  {
9550
9555
  "path": "../layout/dist/axis-columns.js",
@@ -10304,7 +10309,7 @@
10304
10309
  "imports": [],
10305
10310
  "exports": [],
10306
10311
  "inputs": {},
10307
- "bytes": 3667964
10312
+ "bytes": 3671548
10308
10313
  },
10309
10314
  "dist/nowline.min.js": {
10310
10315
  "imports": [],
@@ -11280,6 +11285,9 @@
11280
11285
  "../layout/dist/axis-columns.js": {
11281
11286
  "bytesInOutput": 917
11282
11287
  },
11288
+ "../layout/dist/chart-translation.js": {
11289
+ "bytesInOutput": 690
11290
+ },
11283
11291
  "../layout/dist/nodes/anchor-node.js": {
11284
11292
  "bytesInOutput": 916
11285
11293
  },
@@ -11308,7 +11316,7 @@
11308
11316
  "bytesInOutput": 100
11309
11317
  },
11310
11318
  "../layout/dist/layout-context.js": {
11311
- "bytesInOutput": 1052
11319
+ "bytesInOutput": 1139
11312
11320
  },
11313
11321
  "../layout/dist/nodes/item-node.js": {
11314
11322
  "bytesInOutput": 1704
@@ -11325,14 +11333,11 @@
11325
11333
  "../layout/dist/nodes/footnote-node.js": {
11326
11334
  "bytesInOutput": 1361
11327
11335
  },
11328
- "../layout/dist/positioned-shift.js": {
11329
- "bytesInOutput": 606
11330
- },
11331
11336
  "../layout/dist/nodes/marker-band.js": {
11332
11337
  "bytesInOutput": 1869
11333
11338
  },
11334
11339
  "../layout/dist/nodes/milestone-node.js": {
11335
- "bytesInOutput": 3201
11340
+ "bytesInOutput": 3250
11336
11341
  },
11337
11342
  "../layout/dist/nodes/region-markers.js": {
11338
11343
  "bytesInOutput": 1265
@@ -11350,7 +11355,7 @@
11350
11355
  "bytesInOutput": 1774
11351
11356
  },
11352
11357
  "../layout/dist/nodes/include-node.js": {
11353
- "bytesInOutput": 1433
11358
+ "bytesInOutput": 1473
11354
11359
  },
11355
11360
  "../layout/dist/nodes/nowline-node.js": {
11356
11361
  "bytesInOutput": 506
@@ -11371,7 +11376,7 @@
11371
11376
  "bytesInOutput": 1893
11372
11377
  },
11373
11378
  "../layout/dist/phases/finalize.js": {
11374
- "bytesInOutput": 11703
11379
+ "bytesInOutput": 11784
11375
11380
  },
11376
11381
  "../../node_modules/.pnpm/internmap@2.0.3/node_modules/internmap/src/index.js": {
11377
11382
  "bytesInOutput": 633
@@ -11398,7 +11403,7 @@
11398
11403
  "bytesInOutput": 727
11399
11404
  },
11400
11405
  "../layout/dist/phases/place.js": {
11401
- "bytesInOutput": 2228
11406
+ "bytesInOutput": 2213
11402
11407
  },
11403
11408
  "../layout/dist/nodes/group-node.js": {
11404
11409
  "bytesInOutput": 1240
@@ -11485,7 +11490,7 @@
11485
11490
  "bytesInOutput": 257
11486
11491
  }
11487
11492
  },
11488
- "bytes": 671559
11493
+ "bytes": 671885
11489
11494
  }
11490
11495
  }
11491
11496
  }
@@ -1,4 +1,4 @@
1
- /*! @nowline/embed 0.0.0-dev.20261018161512.gdb10ecc sha=db10ecc built=2026-10-18T16:09:47Z */
1
+ /*! @nowline/embed 0.0.0-dev.20261019024645.g95fa9ba sha=95fa9ba built=2026-10-19T02:41:07Z */
2
2
  var __create = Object.create;
3
3
  var __defProp = Object.defineProperty;
4
4
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
@@ -32160,6 +32160,54 @@ var AxisColumns = class {
32160
32160
  }
32161
32161
  };
32162
32162
 
32163
+ // ../layout/dist/chart-translation.js
32164
+ function translateTrackChildY(child, dy) {
32165
+ child.box.y += dy;
32166
+ for (const pin of child.inlineDatePins ?? [])
32167
+ pin.glyphTopLeft.y += dy;
32168
+ if (child.kind === "item") {
32169
+ for (const chip of child.labelChips)
32170
+ chip.box.y += dy;
32171
+ if (child.overflowBox)
32172
+ child.overflowBox.y += dy;
32173
+ return;
32174
+ }
32175
+ for (const c of child.children)
32176
+ translateTrackChildY(c, dy);
32177
+ }
32178
+ function translateSwimlaneY(lane, dy) {
32179
+ lane.box.y += dy;
32180
+ for (const child of lane.children)
32181
+ translateTrackChildY(child, dy);
32182
+ for (const nested of lane.nested)
32183
+ translateSwimlaneY(nested, dy);
32184
+ }
32185
+ function translateIncludeY(region, dy) {
32186
+ region.box.y += dy;
32187
+ for (const lane of region.nestedSwimlanes)
32188
+ translateSwimlaneY(lane, dy);
32189
+ for (const marker of [...region.anchors ?? [], ...region.milestones ?? []]) {
32190
+ marker.center.y += dy;
32191
+ marker.labelBox.y += dy;
32192
+ marker.cutTopY += dy;
32193
+ marker.cutBottomY += dy;
32194
+ }
32195
+ for (const milestone of region.milestones ?? []) {
32196
+ for (const arrow of milestone.slackArrows ?? [])
32197
+ arrow.y += dy;
32198
+ }
32199
+ for (const edge of region.edges ?? []) {
32200
+ for (const point2 of edge.waypoints)
32201
+ point2.y += dy;
32202
+ }
32203
+ }
32204
+ function translateMilestoneChartY(milestone, dy) {
32205
+ milestone.cutTopY += dy;
32206
+ milestone.cutBottomY += dy;
32207
+ for (const arrow of milestone.slackArrows ?? [])
32208
+ arrow.y += dy;
32209
+ }
32210
+
32163
32211
  // ../layout/dist/nodes/marker-geometry.js
32164
32212
  var MARKER_ROW_PITCH_PX = 26;
32165
32213
  var MARKER_ROW_CENTER_OFFSET_PX = MARKER_ROW_PITCH_PX / 2;
@@ -32690,6 +32738,7 @@ function createLayoutContext(source, shared, chart, init2) {
32690
32738
  slackCorridors: [],
32691
32739
  markerRowPlacements: init2.markerRowPlacements ?? /* @__PURE__ */ new Map(),
32692
32740
  chartTopY: chart.chartTopY,
32741
+ estimatedChartTopY: chart.estimatedChartTopY,
32693
32742
  chartBottomY: chart.chartBottomY,
32694
32743
  swimlaneBottomY: chart.swimlaneBottomY,
32695
32744
  nextParallelId: 0,
@@ -32700,6 +32749,9 @@ function createLayoutContext(source, shared, chart, init2) {
32700
32749
  ...shared.waves ? { waves: shared.waves } : {}
32701
32750
  };
32702
32751
  }
32752
+ function chartFrameY(canvasY, ctx) {
32753
+ return canvasY - ctx.estimatedChartTopY;
32754
+ }
32703
32755
 
32704
32756
  // ../layout/dist/nodes/item-node.js
32705
32757
  var TEXT_INSET_PX = 12;
@@ -33513,48 +33565,6 @@ function fitsOrWraps(text, width, firstWidth) {
33513
33565
  return rows.length > 0 ? rows : [text];
33514
33566
  }
33515
33567
 
33516
- // ../layout/dist/positioned-shift.js
33517
- function shiftTrackChildY(child, dy) {
33518
- child.box.y += dy;
33519
- for (const pin of child.inlineDatePins ?? [])
33520
- pin.glyphTopLeft.y += dy;
33521
- if (child.kind === "item") {
33522
- for (const chip of child.labelChips)
33523
- chip.box.y += dy;
33524
- if (child.overflowBox)
33525
- child.overflowBox.y += dy;
33526
- return;
33527
- }
33528
- for (const c of child.children)
33529
- shiftTrackChildY(c, dy);
33530
- }
33531
- function shiftSwimlaneY(lane, dy) {
33532
- lane.box.y += dy;
33533
- for (const child of lane.children)
33534
- shiftTrackChildY(child, dy);
33535
- for (const nested of lane.nested)
33536
- shiftSwimlaneY(nested, dy);
33537
- }
33538
- function shiftIncludeY(region, dy) {
33539
- region.box.y += dy;
33540
- for (const lane of region.nestedSwimlanes)
33541
- shiftSwimlaneY(lane, dy);
33542
- for (const marker of [...region.anchors ?? [], ...region.milestones ?? []]) {
33543
- marker.center.y += dy;
33544
- marker.labelBox.y += dy;
33545
- marker.cutTopY += dy;
33546
- marker.cutBottomY += dy;
33547
- }
33548
- for (const milestone of region.milestones ?? []) {
33549
- for (const arrow of milestone.slackArrows ?? [])
33550
- arrow.y += dy;
33551
- }
33552
- for (const edge of region.edges ?? []) {
33553
- for (const point2 of edge.waypoints)
33554
- point2.y += dy;
33555
- }
33556
- }
33557
-
33558
33568
  // ../layout/dist/nodes/marker-band.js
33559
33569
  function datePinnedMarkerEntries(anchors2, milestones, scale) {
33560
33570
  const entries = [];
@@ -33698,7 +33708,8 @@ function collectMilestonePredecessors(refs, ctx) {
33698
33708
  const endX = ctx.entityRightEdges.get(ref);
33699
33709
  if (endX === void 0)
33700
33710
  continue;
33701
- const y = item ? itemSlackAttachY(item, ctx.bandScale.bandwidth()) : ctx.entityMidpoints.get(ref)?.y ?? 0;
33711
+ const markerY = item ? void 0 : ctx.entityMidpoints.get(ref)?.y;
33712
+ const y = item ? itemSlackAttachY(item, ctx.bandScale.bandwidth()) : markerY === void 0 ? void 0 : chartFrameY(markerY, ctx);
33702
33713
  if (!item && ctx.waves?.plan.index.has(ref)) {
33703
33714
  out.push({ ref, endX, y, flowKey: `wave:${ref}`, wave: ref });
33704
33715
  continue;
@@ -33718,7 +33729,7 @@ function lastPredecessorPerFlow(preds) {
33718
33729
  return Array.from(m.values());
33719
33730
  }
33720
33731
  function hasSlackArrow(p, maxEnd) {
33721
- return p.endX < maxEnd && p.y > 0 && p.wave === void 0;
33732
+ return p.endX < maxEnd && p.y !== void 0 && p.wave === void 0;
33722
33733
  }
33723
33734
  function latestArrowPredecessor(preds) {
33724
33735
  let maxPred = null;
@@ -33791,7 +33802,7 @@ var MilestoneNode = class {
33791
33802
  slackArrows = [
33792
33803
  {
33793
33804
  x: maxPred.endX,
33794
- y: maxPred.y > 0 ? maxPred.y : estimatedCenterY
33805
+ y: maxPred.y ?? chartFrameY(estimatedCenterY, ctx)
33795
33806
  }
33796
33807
  ];
33797
33808
  }
@@ -33899,7 +33910,7 @@ function collectSlackCorridors(milestones, ctx) {
33899
33910
  if (milestoneX === null)
33900
33911
  continue;
33901
33912
  const maxPred = latestArrowPredecessor(dedupedPreds);
33902
- if (maxPred && maxPred.endX > milestoneX && maxPred.y > 0) {
33913
+ if (maxPred && maxPred.endX > milestoneX && maxPred.y !== void 0) {
33903
33914
  out.push({
33904
33915
  xStart: Math.min(maxPred.endX, milestoneX),
33905
33916
  xEnd: Math.max(maxPred.endX, milestoneX),
@@ -34476,6 +34487,7 @@ function buildIncludeRegions(regions, ctx, startY, helpers, chartRightX) {
34476
34487
  waves: ctx.waves
34477
34488
  }, {
34478
34489
  chartTopY: innerStartY,
34490
+ estimatedChartTopY: ctx.estimatedChartTopY,
34479
34491
  chartBottomY: innerStartY,
34480
34492
  swimlaneBottomY: innerStartY
34481
34493
  }, { footnotes: indexFootnotes(region.content.footnotes, footnotesBefore) });
@@ -34499,7 +34511,7 @@ function buildIncludeRegions(regions, ctx, startY, helpers, chartRightX) {
34499
34511
  const markers = placeRegionMarkers(region, childCtx, y, innerStartY, cursorY, chartRightX);
34500
34512
  if (markers.laneShift !== 0) {
34501
34513
  for (const lane of nestedSwimlanes)
34502
- shiftSwimlaneY(lane, markers.laneShift);
34514
+ translateSwimlaneY(lane, markers.laneShift);
34503
34515
  cursorY += markers.laneShift;
34504
34516
  }
34505
34517
  const innerEndY = cursorY;
@@ -35530,6 +35542,17 @@ function extendTimeline(fx) {
35530
35542
  else
35531
35543
  afterRightX = Math.max(afterRightX, m.x + m.radius);
35532
35544
  }
35545
+ for (const inc of includes) {
35546
+ for (const a of inc.anchors ?? []) {
35547
+ datedRightX = Math.max(datedRightX, a.center.x + a.radius);
35548
+ }
35549
+ for (const m of inc.milestones ?? []) {
35550
+ if (m.fixed)
35551
+ datedRightX = Math.max(datedRightX, m.center.x + m.radius);
35552
+ else
35553
+ afterRightX = Math.max(afterRightX, m.center.x + m.radius);
35554
+ }
35555
+ }
35533
35556
  const maxContentRightX = Math.max(barRightX, datedRightX, afterRightX);
35534
35557
  const tickDays = calendar.daysPerUnit(scale.unit);
35535
35558
  const overflowDays = fx.scale.showsNonWorking ? fx.scale.indexAtX(maxContentRightX) : (maxContentRightX - originX) / ppd;
@@ -35680,7 +35703,6 @@ function growHeaderRows(fx) {
35680
35703
  const timeline = ctx.timeline;
35681
35704
  let changed = false;
35682
35705
  if (rowsTop.pillRowHeight !== bands.pillRowHeight) {
35683
- timeline.box.height += timeline.box.y - rowsTop.timelineY;
35684
35706
  timeline.box.y = rowsTop.timelineY;
35685
35707
  timeline.pillRowHeight = rowsTop.pillRowHeight;
35686
35708
  timeline.tickPanelY = rowsTop.tickPanelY;
@@ -35697,25 +35719,18 @@ function growHeaderRows(fx) {
35697
35719
  changed = true;
35698
35720
  }
35699
35721
  fx.setHeaderRowsBottom(rowsTop.markerRowY + timeline.markerRow.height);
35700
- if (deltaY === 0)
35701
- return changed;
35702
- timeline.box.height += deltaY;
35703
- fx.chartY.top += deltaY;
35704
- fx.chartY.bottom += deltaY;
35705
- fx.chartY.swimlaneBottom += deltaY;
35722
+ const topY = ctx.estimatedChartTopY + deltaY;
35723
+ fx.chartY.top = topY;
35724
+ fx.chartY.bottom += topY;
35725
+ fx.chartY.swimlaneBottom += topY;
35726
+ timeline.box.height = fx.chartY.bottom - timeline.box.y;
35706
35727
  for (const lane of fx.chart.swimlanes)
35707
- shiftSwimlaneY(lane, deltaY);
35728
+ translateSwimlaneY(lane, topY);
35708
35729
  for (const inc of fx.chart.includes)
35709
- shiftIncludeY(inc, deltaY);
35710
- for (const m of need(fx.draft.milestones, "the milestones")) {
35711
- m.cutTopY = fx.chartY.top;
35712
- m.cutBottomY = fx.chartY.swimlaneBottom;
35713
- if (m.slackArrows) {
35714
- for (const arrow of m.slackArrows)
35715
- arrow.y += deltaY;
35716
- }
35717
- }
35718
- return true;
35730
+ translateIncludeY(inc, topY);
35731
+ for (const m of need(fx.draft.milestones, "the milestones"))
35732
+ translateMilestoneChartY(m, topY);
35733
+ return changed;
35719
35734
  }
35720
35735
  function bottomTickPanel(fx) {
35721
35736
  const height = fx.measured.bands.bottomTickPanelHeight;
@@ -36207,7 +36222,8 @@ function placeChart(resolved, scope, window, measured, helpers) {
36207
36222
  bandScale: defaultRowBand(),
36208
36223
  waves: plan ? createWaveLayoutState(plan, timeScale, originX, localeStrings(scope.locale).waveBackgroundItem) : void 0
36209
36224
  }, {
36210
- chartTopY: bands.chartTopY,
36225
+ chartTopY: 0,
36226
+ estimatedChartTopY: bands.chartTopY,
36211
36227
  chartBottomY: 0,
36212
36228
  swimlaneBottomY: 0
36213
36229
  }, {
@@ -36301,7 +36317,6 @@ function placeChart(resolved, scope, window, measured, helpers) {
36301
36317
  }
36302
36318
  ctx.chartBottomY = y;
36303
36319
  ctx.swimlaneBottomY = y;
36304
- timeline.box.height = ctx.chartBottomY - timeline.box.y;
36305
36320
  const milestones = buildMilestones(resolved.content.milestones, ctx);
36306
36321
  return {
36307
36322
  ctx,
@@ -40640,8 +40655,8 @@ function effectiveTheme(theme, systemTheme) {
40640
40655
  }
40641
40656
 
40642
40657
  // src/index.ts
40643
- var version = true ? "0.0.0-dev.20261018161512.gdb10ecc" : "0.0.0";
40644
- var sha = true ? "db10ecc" : "unknown";
40658
+ var version = true ? "0.0.0-dev.20261019024645.g95fa9ba" : "0.0.0";
40659
+ var sha = true ? "95fa9ba" : "unknown";
40645
40660
  var DEFAULT_SELECTOR = "pre code.language-nowline, code.language-nowline";
40646
40661
  var initialConfig = {
40647
40662
  theme: "auto",