@nowline/layout 0.8.6 → 0.9.0
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/axis-columns.d.ts +70 -0
- package/dist/axis-columns.d.ts.map +1 -0
- package/dist/axis-columns.js +104 -0
- package/dist/axis-columns.js.map +1 -0
- package/dist/calendar-resolver.d.ts +27 -0
- package/dist/calendar-resolver.d.ts.map +1 -0
- package/dist/calendar-resolver.js +132 -0
- package/dist/calendar-resolver.js.map +1 -0
- package/dist/calendar.d.ts +0 -19
- package/dist/calendar.d.ts.map +1 -1
- package/dist/calendar.js +4 -44
- package/dist/calendar.js.map +1 -1
- package/dist/canvas-width.d.ts +23 -0
- package/dist/canvas-width.d.ts.map +1 -0
- package/dist/canvas-width.js +26 -0
- package/dist/canvas-width.js.map +1 -0
- package/dist/capacity.d.ts +28 -0
- package/dist/capacity.d.ts.map +1 -1
- package/dist/capacity.js +64 -29
- package/dist/capacity.js.map +1 -1
- package/dist/chart-translation.d.ts +22 -0
- package/dist/chart-translation.d.ts.map +1 -0
- package/dist/chart-translation.js +83 -0
- package/dist/chart-translation.js.map +1 -0
- package/dist/container-header-geometry.d.ts +64 -0
- package/dist/container-header-geometry.d.ts.map +1 -0
- package/dist/container-header-geometry.js +89 -0
- package/dist/container-header-geometry.js.map +1 -0
- package/dist/dsl-utils.d.ts +3 -4
- package/dist/dsl-utils.d.ts.map +1 -1
- package/dist/dsl-utils.js +8 -25
- package/dist/dsl-utils.js.map +1 -1
- package/dist/edge-routing.d.ts +69 -78
- package/dist/edge-routing.d.ts.map +1 -1
- package/dist/edge-routing.js +271 -401
- package/dist/edge-routing.js.map +1 -1
- package/dist/frame-tab-geometry.d.ts +24 -14
- package/dist/frame-tab-geometry.d.ts.map +1 -1
- package/dist/frame-tab-geometry.js +69 -23
- package/dist/frame-tab-geometry.js.map +1 -1
- package/dist/header-card-geometry.d.ts +12 -0
- package/dist/header-card-geometry.d.ts.map +1 -1
- package/dist/header-card-geometry.js +14 -2
- package/dist/header-card-geometry.js.map +1 -1
- package/dist/header-logo.d.ts +28 -0
- package/dist/header-logo.d.ts.map +1 -0
- package/dist/header-logo.js +51 -0
- package/dist/header-logo.js.map +1 -0
- package/dist/i18n.d.ts +11 -0
- package/dist/i18n.d.ts.map +1 -1
- package/dist/i18n.js +11 -1
- package/dist/i18n.js.map +1 -1
- package/dist/index.d.ts +20 -8
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +17 -7
- package/dist/index.js.map +1 -1
- package/dist/inline-date-pin-geometry.d.ts +19 -11
- package/dist/inline-date-pin-geometry.d.ts.map +1 -1
- package/dist/inline-date-pin-geometry.js +45 -46
- package/dist/inline-date-pin-geometry.js.map +1 -1
- package/dist/item-bar-geometry.d.ts +192 -4
- package/dist/item-bar-geometry.d.ts.map +1 -1
- package/dist/item-bar-geometry.js +258 -5
- package/dist/item-bar-geometry.js.map +1 -1
- package/dist/item-port-geometry.d.ts +13 -0
- package/dist/item-port-geometry.d.ts.map +1 -0
- package/dist/item-port-geometry.js +63 -0
- package/dist/item-port-geometry.js.map +1 -0
- package/dist/layout-context.d.ts +115 -51
- package/dist/layout-context.d.ts.map +1 -1
- package/dist/layout-context.js +96 -5
- package/dist/layout-context.js.map +1 -1
- package/dist/layout-insights.d.ts.map +1 -1
- package/dist/layout-insights.js +73 -1
- package/dist/layout-insights.js.map +1 -1
- package/dist/layout.d.ts +35 -0
- package/dist/layout.d.ts.map +1 -1
- package/dist/layout.js +18 -1315
- package/dist/layout.js.map +1 -1
- package/dist/nodes/anchor-node.d.ts.map +1 -1
- package/dist/nodes/anchor-node.js +11 -4
- package/dist/nodes/anchor-node.js.map +1 -1
- package/dist/nodes/content-extent.d.ts +24 -0
- package/dist/nodes/content-extent.d.ts.map +1 -0
- package/dist/nodes/content-extent.js +100 -0
- package/dist/nodes/content-extent.js.map +1 -0
- package/dist/nodes/dependency-edges.d.ts +6 -0
- package/dist/nodes/dependency-edges.d.ts.map +1 -0
- package/dist/nodes/dependency-edges.js +148 -0
- package/dist/nodes/dependency-edges.js.map +1 -0
- package/dist/nodes/footnote-node.d.ts +24 -3
- package/dist/nodes/footnote-node.d.ts.map +1 -1
- package/dist/nodes/footnote-node.js +129 -25
- package/dist/nodes/footnote-node.js.map +1 -1
- package/dist/nodes/group-node.d.ts +10 -21
- package/dist/nodes/group-node.d.ts.map +1 -1
- package/dist/nodes/group-node.js +79 -152
- package/dist/nodes/group-node.js.map +1 -1
- package/dist/nodes/header-node.d.ts +56 -0
- package/dist/nodes/header-node.d.ts.map +1 -0
- package/dist/nodes/header-node.js +163 -0
- package/dist/nodes/header-node.js.map +1 -0
- package/dist/nodes/include-node.d.ts +22 -12
- package/dist/nodes/include-node.d.ts.map +1 -1
- package/dist/nodes/include-node.js +95 -62
- package/dist/nodes/include-node.js.map +1 -1
- package/dist/nodes/item-measure.d.ts +135 -0
- package/dist/nodes/item-measure.d.ts.map +1 -0
- package/dist/nodes/item-measure.js +514 -0
- package/dist/nodes/item-measure.js.map +1 -0
- package/dist/nodes/item-node.d.ts +162 -9
- package/dist/nodes/item-node.d.ts.map +1 -1
- package/dist/nodes/item-node.js +256 -69
- package/dist/nodes/item-node.js.map +1 -1
- package/dist/nodes/marker-band.d.ts +118 -0
- package/dist/nodes/marker-band.d.ts.map +1 -0
- package/dist/nodes/marker-band.js +303 -0
- package/dist/nodes/marker-band.js.map +1 -0
- package/dist/nodes/marker-geometry.js +1 -1
- package/dist/nodes/marker-geometry.js.map +1 -1
- package/dist/nodes/milestone-node.d.ts +112 -15
- package/dist/nodes/milestone-node.d.ts.map +1 -1
- package/dist/nodes/milestone-node.js +246 -95
- package/dist/nodes/milestone-node.js.map +1 -1
- package/dist/nodes/nowline-node.d.ts +8 -0
- package/dist/nodes/nowline-node.d.ts.map +1 -0
- package/dist/nodes/nowline-node.js +74 -0
- package/dist/nodes/nowline-node.js.map +1 -0
- package/dist/nodes/parallel-node.d.ts +7 -12
- package/dist/nodes/parallel-node.d.ts.map +1 -1
- package/dist/nodes/parallel-node.js +66 -30
- package/dist/nodes/parallel-node.js.map +1 -1
- package/dist/nodes/region-markers.d.ts +41 -0
- package/dist/nodes/region-markers.d.ts.map +1 -0
- package/dist/nodes/region-markers.js +130 -0
- package/dist/nodes/region-markers.js.map +1 -0
- package/dist/nodes/roadmap-node.d.ts +9 -72
- package/dist/nodes/roadmap-node.d.ts.map +1 -1
- package/dist/nodes/roadmap-node.js +38 -788
- package/dist/nodes/roadmap-node.js.map +1 -1
- package/dist/nodes/row-track.d.ts +33 -0
- package/dist/nodes/row-track.d.ts.map +1 -0
- package/dist/nodes/row-track.js +170 -0
- package/dist/nodes/row-track.js.map +1 -0
- package/dist/nodes/sequence-item.d.ts +25 -0
- package/dist/nodes/sequence-item.d.ts.map +1 -0
- package/dist/nodes/sequence-item.js +396 -0
- package/dist/nodes/sequence-item.js.map +1 -0
- package/dist/nodes/sequence-one.d.ts +5 -0
- package/dist/nodes/sequence-one.d.ts.map +1 -0
- package/dist/nodes/sequence-one.js +26 -0
- package/dist/nodes/sequence-one.js.map +1 -0
- package/dist/nodes/swimlane-node.d.ts +5 -17
- package/dist/nodes/swimlane-node.d.ts.map +1 -1
- package/dist/nodes/swimlane-node.js +62 -145
- package/dist/nodes/swimlane-node.js.map +1 -1
- package/dist/nodes/wave-node.d.ts +52 -0
- package/dist/nodes/wave-node.d.ts.map +1 -0
- package/dist/nodes/wave-node.js +483 -0
- package/dist/nodes/wave-node.js.map +1 -0
- package/dist/non-working-display.d.ts +14 -0
- package/dist/non-working-display.d.ts.map +1 -0
- package/dist/non-working-display.js +28 -0
- package/dist/non-working-display.js.map +1 -0
- package/dist/phases/date-window.d.ts +48 -0
- package/dist/phases/date-window.d.ts.map +1 -0
- package/dist/phases/date-window.js +130 -0
- package/dist/phases/date-window.js.map +1 -0
- package/dist/phases/finalize.d.ts +198 -0
- package/dist/phases/finalize.d.ts.map +1 -0
- package/dist/phases/finalize.js +1058 -0
- package/dist/phases/finalize.js.map +1 -0
- package/dist/phases/measure.d.ts +77 -0
- package/dist/phases/measure.d.ts.map +1 -0
- package/dist/phases/measure.js +222 -0
- package/dist/phases/measure.js.map +1 -0
- package/dist/phases/place.d.ts +28 -0
- package/dist/phases/place.d.ts.map +1 -0
- package/dist/phases/place.js +225 -0
- package/dist/phases/place.js.map +1 -0
- package/dist/renderable.d.ts.map +1 -1
- package/dist/renderable.js +23 -3
- package/dist/renderable.js.map +1 -1
- package/dist/resolve-today.d.ts +11 -1
- package/dist/resolve-today.d.ts.map +1 -1
- package/dist/resolve-today.js +26 -12
- package/dist/resolve-today.js.map +1 -1
- package/dist/row-packer.d.ts +42 -16
- package/dist/row-packer.d.ts.map +1 -1
- package/dist/row-packer.js +51 -78
- package/dist/row-packer.js.map +1 -1
- package/dist/schedule.d.ts +58 -1
- package/dist/schedule.d.ts.map +1 -1
- package/dist/schedule.js +280 -106
- package/dist/schedule.js.map +1 -1
- package/dist/start-rules.d.ts +27 -0
- package/dist/start-rules.d.ts.map +1 -0
- package/dist/start-rules.js +91 -0
- package/dist/start-rules.js.map +1 -0
- package/dist/start-terms.d.ts +23 -0
- package/dist/start-terms.d.ts.map +1 -0
- package/dist/start-terms.js +27 -0
- package/dist/start-terms.js.map +1 -0
- package/dist/status-dot.d.ts +46 -0
- package/dist/status-dot.d.ts.map +1 -0
- package/dist/status-dot.js +78 -0
- package/dist/status-dot.js.map +1 -0
- package/dist/style-resolution.d.ts.map +1 -1
- package/dist/style-resolution.js +23 -43
- package/dist/style-resolution.js.map +1 -1
- package/dist/text-measure.d.ts +28 -0
- package/dist/text-measure.d.ts.map +1 -0
- package/dist/text-measure.js +70 -0
- package/dist/text-measure.js.map +1 -0
- package/dist/themes/contrast.d.ts +4 -0
- package/dist/themes/contrast.d.ts.map +1 -0
- package/dist/themes/contrast.js +32 -0
- package/dist/themes/contrast.js.map +1 -0
- package/dist/themes/dark.d.ts.map +1 -1
- package/dist/themes/dark.js +28 -1
- package/dist/themes/dark.js.map +1 -1
- package/dist/themes/grayscale.d.ts.map +1 -1
- package/dist/themes/grayscale.js +28 -1
- package/dist/themes/grayscale.js.map +1 -1
- package/dist/themes/index.d.ts +4 -11
- package/dist/themes/index.d.ts.map +1 -1
- package/dist/themes/index.js +6 -4
- package/dist/themes/index.js.map +1 -1
- package/dist/themes/light.d.ts.map +1 -1
- package/dist/themes/light.js +28 -1
- package/dist/themes/light.js.map +1 -1
- package/dist/themes/shape.d.ts +31 -0
- package/dist/themes/shape.d.ts.map +1 -1
- package/dist/themes/shared.d.ts +44 -50
- package/dist/themes/shared.d.ts.map +1 -1
- package/dist/themes/shared.js +79 -83
- package/dist/themes/shared.js.map +1 -1
- package/dist/time-scale.d.ts +42 -6
- package/dist/time-scale.d.ts.map +1 -1
- package/dist/time-scale.js +109 -17
- package/dist/time-scale.js.map +1 -1
- package/dist/types.d.ts +528 -11
- package/dist/types.d.ts.map +1 -1
- package/dist/view-preset.d.ts +61 -6
- package/dist/view-preset.d.ts.map +1 -1
- package/dist/view-preset.js +439 -24
- package/dist/view-preset.js.map +1 -1
- package/dist/wave-barrier.d.ts +107 -0
- package/dist/wave-barrier.d.ts.map +1 -0
- package/dist/wave-barrier.js +174 -0
- package/dist/wave-barrier.js.map +1 -0
- package/dist/wave-hatch.d.ts +4 -0
- package/dist/wave-hatch.d.ts.map +1 -0
- package/dist/wave-hatch.js +21 -0
- package/dist/wave-hatch.js.map +1 -0
- package/dist/wave-layout.d.ts +99 -0
- package/dist/wave-layout.d.ts.map +1 -0
- package/dist/wave-layout.js +130 -0
- package/dist/wave-layout.js.map +1 -0
- package/dist/working-calendar.d.ts +128 -4
- package/dist/working-calendar.d.ts.map +1 -1
- package/dist/working-calendar.js +725 -51
- package/dist/working-calendar.js.map +1 -1
- package/dist/working-span.d.ts +11 -0
- package/dist/working-span.d.ts.map +1 -0
- package/dist/working-span.js +18 -0
- package/dist/working-span.js.map +1 -0
- package/package.json +4 -4
- package/src/axis-columns.ts +140 -0
- package/src/calendar-resolver.ts +161 -0
- package/src/calendar.ts +4 -45
- package/src/canvas-width.ts +36 -0
- package/src/capacity.ts +71 -30
- package/src/chart-translation.ts +88 -0
- package/src/container-header-geometry.ts +116 -0
- package/src/dsl-utils.ts +8 -26
- package/src/edge-routing.ts +347 -491
- package/src/frame-tab-geometry.ts +78 -25
- package/src/header-card-geometry.ts +17 -2
- package/src/header-logo.ts +67 -0
- package/src/i18n.ts +22 -1
- package/src/index.ts +97 -12
- package/src/inline-date-pin-geometry.ts +55 -58
- package/src/item-bar-geometry.ts +341 -5
- package/src/item-port-geometry.ts +69 -0
- package/src/layout-context.ts +210 -72
- package/src/layout-insights.ts +109 -2
- package/src/layout.ts +57 -1530
- package/src/nodes/anchor-node.ts +11 -4
- package/src/nodes/content-extent.ts +107 -0
- package/src/nodes/dependency-edges.ts +171 -0
- package/src/nodes/footnote-node.ts +171 -31
- package/src/nodes/group-node.ts +92 -214
- package/src/nodes/header-node.ts +255 -0
- package/src/nodes/include-node.ts +124 -110
- package/src/nodes/item-measure.ts +723 -0
- package/src/nodes/item-node.ts +358 -80
- package/src/nodes/marker-band.ts +406 -0
- package/src/nodes/marker-geometry.ts +1 -1
- package/src/nodes/milestone-node.ts +321 -136
- package/src/nodes/nowline-node.ts +87 -0
- package/src/nodes/parallel-node.ts +69 -38
- package/src/nodes/region-markers.ts +194 -0
- package/src/nodes/roadmap-node.ts +46 -950
- package/src/nodes/row-track.ts +217 -0
- package/src/nodes/sequence-item.ts +433 -0
- package/src/nodes/sequence-one.ts +40 -0
- package/src/nodes/swimlane-node.ts +66 -205
- package/src/nodes/wave-node.ts +609 -0
- package/src/non-working-display.ts +32 -0
- package/src/phases/date-window.ts +191 -0
- package/src/phases/finalize.ts +1303 -0
- package/src/phases/measure.ts +329 -0
- package/src/phases/place.ts +318 -0
- package/src/renderable.ts +23 -3
- package/src/resolve-today.ts +28 -25
- package/src/row-packer.ts +85 -84
- package/src/schedule.ts +362 -114
- package/src/start-rules.ts +113 -0
- package/src/start-terms.ts +38 -0
- package/src/status-dot.ts +81 -0
- package/src/style-resolution.ts +27 -57
- package/src/text-measure.ts +71 -0
- package/src/themes/contrast.ts +34 -0
- package/src/themes/dark.ts +28 -1
- package/src/themes/grayscale.ts +28 -1
- package/src/themes/index.ts +10 -7
- package/src/themes/light.ts +28 -1
- package/src/themes/shape.ts +38 -0
- package/src/themes/shared.ts +85 -93
- package/src/time-scale.ts +117 -19
- package/src/types.ts +529 -20
- package/src/view-preset.ts +520 -27
- package/src/wave-barrier.ts +242 -0
- package/src/wave-hatch.ts +25 -0
- package/src/wave-layout.ts +203 -0
- package/src/working-calendar.ts +875 -57
- package/src/working-span.ts +19 -0
|
@@ -0,0 +1,396 @@
|
|
|
1
|
+
// sequenceItem — place one item on its track: resolve its start (pins,
|
|
2
|
+
// `after:` chains, the wave floor), take its measure (`measureItem`, the
|
|
3
|
+
// row track hands in the one it packed the row with), apply the `before:`
|
|
4
|
+
// caps, build its `ItemNode` and lay out the chips and the spill column,
|
|
5
|
+
// then register it in the context's entity maps.
|
|
6
|
+
import { parseIsoDate, propValue, propValues } from '../dsl-utils.js';
|
|
7
|
+
import { computeItemInlineDatePins, pickInlineDate } from '../inline-date-pin-geometry.js';
|
|
8
|
+
import { ITEM_CAPTION_INSET_X_PX, ITEM_CAPTION_META_BASELINE_OFFSET_PX, ITEM_CAPTION_SPILL_GAP_PX, ITEM_CAPTION_TITLE_FONT_SIZE_PX, LABEL_CHIP_GAP_ABOVE_PROGRESS_STRIP_PX, LABEL_CHIP_GAP_BETWEEN_PX, LABEL_CHIP_HEIGHT_PX, LABEL_CHIP_ROW_STEP_PX, layoutSpillCluster, MIN_BAR_WIDTH_FOR_DOT_PX, MIN_BAR_WIDTH_FOR_FOOTNOTE_PX, } from '../item-bar-geometry.js';
|
|
9
|
+
import { nonWorkingPinOf, resolvePinnedOrSequentialStart } from '../start-rules.js';
|
|
10
|
+
import { statusDotColor } from '../status-dot.js';
|
|
11
|
+
import { estimateTextWidth } from '../text-measure.js';
|
|
12
|
+
import { PROGRESS_STRIP_HEIGHT_PX } from '../themes/shared.js';
|
|
13
|
+
import { waveHatchKind } from '../wave-hatch.js';
|
|
14
|
+
import { accumulateWaveMember, waveFloorX, waveRoleOf } from '../wave-layout.js';
|
|
15
|
+
import { itemSpanPx } from '../working-span.js';
|
|
16
|
+
import { buildLabelChip, measureItem } from './item-measure.js';
|
|
17
|
+
import { ItemNode, traceItemNode } from './item-node.js';
|
|
18
|
+
/**
|
|
19
|
+
* Place `node` at `cursor` and advance the cursor: `cursor.x` to its
|
|
20
|
+
* duration end.
|
|
21
|
+
* `measured` is the item's measure at the snapped start it is placed at,
|
|
22
|
+
* when the caller (a lane or group row track) already took it to pack the
|
|
23
|
+
* row; a parallel track's child is measured here.
|
|
24
|
+
*/
|
|
25
|
+
export function sequenceItem(node, cursor, ctx, measured) {
|
|
26
|
+
const props = node.properties;
|
|
27
|
+
const afterRaw = propValues(props, 'after');
|
|
28
|
+
const beforeRaw = propValues(props, 'before');
|
|
29
|
+
// Resolve start x with the swimlane child rule: the latest of the
|
|
30
|
+
// after-chain and the cursor position. A lane or group child's cursor
|
|
31
|
+
// already sits at that start; a direct parallel track's cursor sits at
|
|
32
|
+
// the block's start, so this is where its `after:` applies.
|
|
33
|
+
let startX = resolvePinnedOrSequentialStart(props, cursor.x, ctx);
|
|
34
|
+
// Wave barrier (specs/waves.md §5.1, §8.4): the floor is one more term
|
|
35
|
+
// in the max, after the `after:` logic. Parallel tracks reach this
|
|
36
|
+
// function directly, so this is where their floor applies.
|
|
37
|
+
if (ctx.waves)
|
|
38
|
+
startX = waveFloorX(node, startX, ctx);
|
|
39
|
+
const nonWorkingPin = nonWorkingPinOf(props, startX, ctx);
|
|
40
|
+
// Under `show` a start that lands in a non-working day moves to the next
|
|
41
|
+
// working day. The floor and NL.I1008 above read the unsnapped start,
|
|
42
|
+
// so their ties and texts match `hide`; the identity under `hide`.
|
|
43
|
+
const placedStartX = ctx.scale.startX(startX);
|
|
44
|
+
// Width, style and tint, progress, meta line, chips, caption fit and
|
|
45
|
+
// the bar's growth (specs/layout-phases.md §3.6). A lane or group row
|
|
46
|
+
// track measured the item at this same start to size its row (the
|
|
47
|
+
// cursor sits at `resolveChildStart`, which an `after:` chain and the
|
|
48
|
+
// wave floor both return unchanged); a parallel track measures here.
|
|
49
|
+
const measure = measured ?? measureItem(node, placedStartX, ctx);
|
|
50
|
+
if (measure.startX !== placedStartX) {
|
|
51
|
+
throw new Error(`layout: item "${node.name ?? node.title ?? '(unnamed)'}" was measured at x ${measure.startX} but placed at x ${placedStartX}`);
|
|
52
|
+
}
|
|
53
|
+
const { naturalWidth, style, status, progress, footnoteIndicators, caption } = measure;
|
|
54
|
+
const { metaText, ownerDisplay, capacity, capacityTrailingWidth } = measure.meta;
|
|
55
|
+
const linkInfo = measure.link;
|
|
56
|
+
const hasLinkIcon = linkInfo.icon !== 'none';
|
|
57
|
+
const chipSamples = measure.chips.samples;
|
|
58
|
+
const chipsOutside = measure.chips.outside;
|
|
59
|
+
// Logical extent: the item's span in time; the bar box is inset from it
|
|
60
|
+
// by its seams (specs/true-width-layout.md §3.1).
|
|
61
|
+
const logicalLeft = placedStartX;
|
|
62
|
+
const logicalRight = placedStartX + naturalWidth;
|
|
63
|
+
// Duration end: where the item ends in time. The time paths take it
|
|
64
|
+
// (the cursor, `after:` references, the wave barrier), so what follows
|
|
65
|
+
// starts on its date, as in engine C; the bar is drawn inside it
|
|
66
|
+
// (specs/true-width-layout.md §3.1).
|
|
67
|
+
const durationEndX = placedStartX + itemSpanPx(ctx, placedStartX, measure.durationDays);
|
|
68
|
+
// Handle `before:` — item must end by the earliest cap. Each cap is
|
|
69
|
+
// either an entity id (looked up in entityLeftEdges) or an inline ISO
|
|
70
|
+
// date literal (resolved through the time scale). The validator enforces
|
|
71
|
+
// "at most one inline date per direction" so at most one element per
|
|
72
|
+
// before-list will hit the date path. The cap is a time path: the item
|
|
73
|
+
// overflows when its duration end passes it; the red tail runs to the
|
|
74
|
+
// painted end.
|
|
75
|
+
let hasOverflow = false;
|
|
76
|
+
let overflowBox;
|
|
77
|
+
let overflowAnchorId;
|
|
78
|
+
if (beforeRaw.length > 0) {
|
|
79
|
+
let earliestCapX;
|
|
80
|
+
let earliestCapRef;
|
|
81
|
+
for (const ref of beforeRaw) {
|
|
82
|
+
const inlineDate = parseIsoDate(ref);
|
|
83
|
+
const capX = inlineDate
|
|
84
|
+
? (ctx.scale.forwardWithinDomain(inlineDate) ?? undefined)
|
|
85
|
+
: ctx.entityLeftEdges.get(ref);
|
|
86
|
+
if (capX === undefined)
|
|
87
|
+
continue;
|
|
88
|
+
if (earliestCapX === undefined || capX < earliestCapX) {
|
|
89
|
+
earliestCapX = capX;
|
|
90
|
+
earliestCapRef = ref;
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
if (earliestCapX !== undefined && durationEndX > earliestCapX) {
|
|
94
|
+
hasOverflow = true;
|
|
95
|
+
overflowBox = {
|
|
96
|
+
x: earliestCapX,
|
|
97
|
+
y: cursor.y,
|
|
98
|
+
width: logicalRight - earliestCapX,
|
|
99
|
+
height: ctx.bandScale.bandwidth(),
|
|
100
|
+
};
|
|
101
|
+
overflowAnchorId = earliestCapRef;
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
// The bar box (grown by `measure.barExtra`) and the caption's x, inset
|
|
105
|
+
// from the logical extent logicalLeft/logicalRight.
|
|
106
|
+
const titleStr = caption.title;
|
|
107
|
+
const itemNode = new ItemNode(measure);
|
|
108
|
+
const placeCtx = { time: ctx.scale, bands: ctx.bandScale, style };
|
|
109
|
+
const placed = itemNode.place({ x: logicalLeft, y: cursor.y }, placeCtx);
|
|
110
|
+
const itemBox = placed.box;
|
|
111
|
+
const bandwidth = ctx.bandScale.bandwidth();
|
|
112
|
+
// Narrow-bar decoration spill — when a bar is too narrow to host
|
|
113
|
+
// the dot, link icon, or footnote with its full inset, those
|
|
114
|
+
// glyphs render in the same spill column as the (already-
|
|
115
|
+
// spilling) caption text, in reading order
|
|
116
|
+
// `[bar][dot][icon][title][footnote#…][meta]`. Each decoration's
|
|
117
|
+
// threshold is independent (a 20-px-wide bar can host the dot
|
|
118
|
+
// but not the icon, etc.); see the `MIN_BAR_WIDTH_FOR_*`
|
|
119
|
+
// constants in `item-bar-geometry`.
|
|
120
|
+
//
|
|
121
|
+
// Forcing `textSpills` when `iconSpills` keeps the icon and
|
|
122
|
+
// title visually adjacent — otherwise a spilled icon would
|
|
123
|
+
// float at `bar.right + 6` while the title stayed inside the
|
|
124
|
+
// bar, breaking the icon→title affordance.
|
|
125
|
+
const dotSpills = itemBox.width < MIN_BAR_WIDTH_FOR_DOT_PX;
|
|
126
|
+
// Measured on the same box width as the other two.
|
|
127
|
+
const iconSpills = caption.iconSpills;
|
|
128
|
+
const footnoteSpillsForNarrow = itemBox.width < MIN_BAR_WIDTH_FOR_FOOTNOTE_PX;
|
|
129
|
+
const textSpills = placed.textSpills || iconSpills;
|
|
130
|
+
// The lines the title paints on (`resolveCaptionTitleLines`).
|
|
131
|
+
const captionLines = caption.lines;
|
|
132
|
+
// Label chips lay out left → right at natural text width.
|
|
133
|
+
//
|
|
134
|
+
// INSIDE the bar (chipsOutside === false): single row,
|
|
135
|
+
// left-aligned at the caption inset, anchored just above the
|
|
136
|
+
// bottom progress strip.
|
|
137
|
+
//
|
|
138
|
+
// OUTSIDE the bar (chipsOutside === true): the whole chip set
|
|
139
|
+
// moves to the spill column at `bar.right + 6`. Within the
|
|
140
|
+
// column, chips pack into rows capped at the bar's visual
|
|
141
|
+
// width — see `packSpillChips`. Row 0 sits at the same y the
|
|
142
|
+
// single-row would have used; subsequent rows stack DOWNWARD by
|
|
143
|
+
// one `LABEL_CHIP_ROW_STEP_PX`.
|
|
144
|
+
//
|
|
145
|
+
// When chips spill OR the title wrapped over a meta line, the BAR
|
|
146
|
+
// ITSELF GROWS DOWNWARD so the chip column (or the second title
|
|
147
|
+
// line plus meta) reads as enclosed by the bar — the painted
|
|
148
|
+
// footprint of the bar is `bandwidth + barExtra` (the larger of
|
|
149
|
+
// the title and chip growth, `measure.barExtra`, which `ItemNode`
|
|
150
|
+
// has already applied to the box) and the bottom progress strip
|
|
151
|
+
// moves with the new bottom edge. Chip Y is anchored to the
|
|
152
|
+
// ORIGINAL bandwidth (relative to the bar's top), not to the grown
|
|
153
|
+
// box.height, so row 0 stays where a single-row chip would
|
|
154
|
+
// naturally render and rows 1..N grow downward into the new bar
|
|
155
|
+
// area.
|
|
156
|
+
//
|
|
157
|
+
// When the caption ALSO spills (`textSpills && chipsOutside`),
|
|
158
|
+
// row 0's y drops below the meta baseline so the spilled stack
|
|
159
|
+
// reads `title → meta → chip-row-0 → chip-row-1 → ...` at a
|
|
160
|
+
// single column inside the (now-taller) bar.
|
|
161
|
+
const chipPack = measure.chips.pack;
|
|
162
|
+
// Baseline (px from the bar's top) of the caption's last line: the
|
|
163
|
+
// meta line when present, else the last title line. Chips stacked
|
|
164
|
+
// inside the bar must clear it.
|
|
165
|
+
const captionLastBaseline = caption.lastBaseline;
|
|
166
|
+
const barExtra = measure.barExtra;
|
|
167
|
+
const labelChips = [];
|
|
168
|
+
const baseChipY = itemBox.y +
|
|
169
|
+
bandwidth -
|
|
170
|
+
PROGRESS_STRIP_HEIGHT_PX -
|
|
171
|
+
LABEL_CHIP_HEIGHT_PX -
|
|
172
|
+
LABEL_CHIP_GAP_ABOVE_PROGRESS_STRIP_PX;
|
|
173
|
+
// Chips under a SPILLED caption clear the classic meta baseline (38),
|
|
174
|
+
// or the caption's own last baseline when explicit breaks make the
|
|
175
|
+
// spilled block taller than that; an in-bar caption is cleared at its
|
|
176
|
+
// own last baseline (which a wrapped title pushes down).
|
|
177
|
+
const captionStackChipY = itemBox.y +
|
|
178
|
+
(chipsOutside && textSpills
|
|
179
|
+
? Math.max(ITEM_CAPTION_META_BASELINE_OFFSET_PX, captionLastBaseline)
|
|
180
|
+
: captionLastBaseline) +
|
|
181
|
+
LABEL_CHIP_GAP_ABOVE_PROGRESS_STRIP_PX;
|
|
182
|
+
// Inside-bar chips need to clear the caption's last baseline —
|
|
183
|
+
// the natural `baseChipY` (anchored to bar bottom) sits above
|
|
184
|
+
// the meta line at typical bandwidths, and above line 2 of a
|
|
185
|
+
// wrapped title, so the chip rect would overlap the text
|
|
186
|
+
// vertically. Use whichever Y is lower. With no meta and a
|
|
187
|
+
// single-line title the caption bottom is above `baseChipY`, so
|
|
188
|
+
// this resolves to `baseChipY` as before.
|
|
189
|
+
// Outside-bar chips already reuse `captionStackChipY` when the
|
|
190
|
+
// caption ALSO spills; with caption inside we don't need to
|
|
191
|
+
// shift them since they're horizontally separated from the meta.
|
|
192
|
+
const stackBelowCaption = (chipsOutside && textSpills) || (!chipsOutside && chipSamples.length > 0);
|
|
193
|
+
const chipRow0Y = stackBelowCaption ? Math.max(baseChipY, captionStackChipY) : baseChipY;
|
|
194
|
+
const chipStartX = chipsOutside
|
|
195
|
+
? itemBox.x + itemBox.width + ITEM_CAPTION_SPILL_GAP_PX
|
|
196
|
+
: itemBox.x + ITEM_CAPTION_INSET_X_PX;
|
|
197
|
+
let chipsRightX = chipStartX;
|
|
198
|
+
if (chipPack) {
|
|
199
|
+
for (let r = 0; r < chipPack.rows.length; r += 1) {
|
|
200
|
+
const rowY = chipRow0Y + r * LABEL_CHIP_ROW_STEP_PX;
|
|
201
|
+
let rowCursorX = chipStartX;
|
|
202
|
+
for (const sample of chipPack.rows[r]) {
|
|
203
|
+
const chip = buildLabelChip(sample.id, ctx.styleCtx, rowCursorX, rowY);
|
|
204
|
+
labelChips.push(chip);
|
|
205
|
+
rowCursorX += chip.box.width + LABEL_CHIP_GAP_BETWEEN_PX;
|
|
206
|
+
}
|
|
207
|
+
const rowRight = rowCursorX - LABEL_CHIP_GAP_BETWEEN_PX;
|
|
208
|
+
if (rowRight > chipsRightX)
|
|
209
|
+
chipsRightX = rowRight;
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
else {
|
|
213
|
+
let rowCursorX = chipStartX;
|
|
214
|
+
for (const sample of chipSamples) {
|
|
215
|
+
const chip = buildLabelChip(sample.id, ctx.styleCtx, rowCursorX, chipRow0Y);
|
|
216
|
+
labelChips.push(chip);
|
|
217
|
+
rowCursorX += chip.box.width + LABEL_CHIP_GAP_BETWEEN_PX;
|
|
218
|
+
}
|
|
219
|
+
chipsRightX = chipSamples.length > 0 ? rowCursorX - LABEL_CHIP_GAP_BETWEEN_PX : chipStartX;
|
|
220
|
+
}
|
|
221
|
+
// `footnoteIndicators` (one superscript per footnote that names this
|
|
222
|
+
// item) was resolved above, before the caption fit.
|
|
223
|
+
const owner = ownerDisplay ?? propValue(props, 'owner');
|
|
224
|
+
const description = node.description?.text;
|
|
225
|
+
// Footnote glyphs only need to spill when there's at least one
|
|
226
|
+
// indicator AND the bar is too narrow to host them at the inset-
|
|
227
|
+
// right anchor. Compute the final boolean here once we know the
|
|
228
|
+
// indicator count.
|
|
229
|
+
const footnoteSpills = footnoteIndicators.length > 0 && footnoteSpillsForNarrow;
|
|
230
|
+
// Spill-column x positions for the decorations. The cluster
|
|
231
|
+
// mirrors the in-bar reading order so users see the same visual
|
|
232
|
+
// hierarchy whether everything fits inside or trails off to the
|
|
233
|
+
// right:
|
|
234
|
+
//
|
|
235
|
+
// In-bar (default): [icon] [title] [¹²] [dot]
|
|
236
|
+
// Spilled (narrow): [bar] [icon?] [title][¹²?] [dot?]
|
|
237
|
+
//
|
|
238
|
+
// The dot lives at the trailing edge in BOTH cases — pushing it
|
|
239
|
+
// to the LEFT of the title (with the title trailing it) read as
|
|
240
|
+
// the dot belonging to the next item, not this one. A missing
|
|
241
|
+
// decoration just collapses out of the row; e.g. an item with
|
|
242
|
+
// no link AND a too-narrow bar gives `[bar] [title] [dot]`.
|
|
243
|
+
//
|
|
244
|
+
// `decorationsRightX` is the furthest right edge any spilled
|
|
245
|
+
// glyph reaches; the row-packer uses it (alongside spilled-chip
|
|
246
|
+
// width) to reserve x-extent so the next chained item bumps to
|
|
247
|
+
// a fresh row instead of landing under the spilled cluster.
|
|
248
|
+
let captionSpillWidth = null;
|
|
249
|
+
if (textSpills) {
|
|
250
|
+
// The widest title LINE: a multi-line spill is as wide as its
|
|
251
|
+
// longest line, not as the raw string (newlines included). A
|
|
252
|
+
// caption capped at the chart's end arrives with its lines already
|
|
253
|
+
// truncated (`measureItem`).
|
|
254
|
+
const titleW = Math.max(...captionLines.map((line) => estimateTextWidth(line, ITEM_CAPTION_TITLE_FONT_SIZE_PX)));
|
|
255
|
+
// Spill column width is the wider of the title and the *full* meta
|
|
256
|
+
// line (text + capacity suffix). `capacityTrailingWidth` is 0 when
|
|
257
|
+
// no capacity suffix is rendered, so this stays a no-op for items
|
|
258
|
+
// without `capacity:`.
|
|
259
|
+
const metaW = (metaText ? estimateTextWidth(metaText, 11) : 0) + capacityTrailingWidth;
|
|
260
|
+
captionSpillWidth = Math.max(titleW, metaW);
|
|
261
|
+
}
|
|
262
|
+
const spill = layoutSpillCluster({
|
|
263
|
+
barRightX: itemBox.x + itemBox.width,
|
|
264
|
+
iconSpills,
|
|
265
|
+
captionWidth: captionSpillWidth,
|
|
266
|
+
footnoteCount: footnoteSpills ? footnoteIndicators.length : 0,
|
|
267
|
+
dotSpills,
|
|
268
|
+
});
|
|
269
|
+
const { iconSpillX, footnoteSpillStartX, dotSpillCx } = spill;
|
|
270
|
+
const decorationsRightX = Math.max(itemBox.x + itemBox.width, spill.rightX);
|
|
271
|
+
const id = node.name;
|
|
272
|
+
// Reference-target edges resolve `after:` / `before:` lookups, so only
|
|
273
|
+
// EXPLICIT ids register here — an id-less item never becomes a
|
|
274
|
+
// referenceable target. Entity edges live in LOGICAL space so chained
|
|
275
|
+
// items / `after:` references sit on the column boundary, not on the
|
|
276
|
+
// visually inset bar edge. The visible 12 px gutter between bars then
|
|
277
|
+
// becomes a clean attach corridor. The right edge is the duration end:
|
|
278
|
+
// `after:` is a time path (decision 6). Items attach their arrows off
|
|
279
|
+
// their final box (`placedItems`), never off this map.
|
|
280
|
+
if (id) {
|
|
281
|
+
ctx.entityLeftEdges.set(id, logicalLeft);
|
|
282
|
+
ctx.entityRightEdges.set(id, durationEndX);
|
|
283
|
+
}
|
|
284
|
+
// A member's end feeds its wave's barrier: its duration end, the lane
|
|
285
|
+
// cursor's advance in `sequenceRowTrack`, never a group box or a
|
|
286
|
+
// caption spill (specs/waves.md §8.4).
|
|
287
|
+
accumulateWaveMember(node, durationEndX, ctx);
|
|
288
|
+
// Drawing / flow maps key on a registration handle EVERY item has: the
|
|
289
|
+
// explicit id when present, else a synthetic, non-referenceable handle
|
|
290
|
+
// (see `syntheticItemKey`). This lets a title-only item register its own
|
|
291
|
+
// dependency-arrow target geometry and join flow-key dedup without
|
|
292
|
+
// entering the human-referenceable namespace above. The item itself is
|
|
293
|
+
// registered in `ctx.placedItems` once it is built (below); its arrow
|
|
294
|
+
// and slack-arrow attach points are derived from its final box later.
|
|
295
|
+
const drawKey = id ?? syntheticItemKey(node);
|
|
296
|
+
ctx.itemFlowKey.set(drawKey, ctx.currentFlowKey);
|
|
297
|
+
// A parallel track joins, and its container's bracket spans, from
|
|
298
|
+
// `cursor.startX` to `cursor.x`.
|
|
299
|
+
cursor.startX = logicalLeft;
|
|
300
|
+
cursor.x = durationEndX;
|
|
301
|
+
// The next row in a parallel/group/lane starts at
|
|
302
|
+
// `cursor.y + cursor.height`. Default pitch is `bandScale.step()`
|
|
303
|
+
// (bandwidth + inter-row gap). When the bar grew to enclose a
|
|
304
|
+
// spilled chip column or a wrapped title, the pitch grows by the
|
|
305
|
+
// SAME amount so the inter-row gap stays constant — the next row's
|
|
306
|
+
// bar starts `step − bandwidth` px below the (now-taller) bar bottom.
|
|
307
|
+
cursor.height = Math.max(cursor.height, ctx.bandScale.step() + barExtra);
|
|
308
|
+
const inlineDatePins = computeItemInlineDatePins({
|
|
309
|
+
box: itemBox,
|
|
310
|
+
afterDate: pickInlineDate(afterRaw),
|
|
311
|
+
beforeDate: pickInlineDate(beforeRaw),
|
|
312
|
+
hasLinkIcon,
|
|
313
|
+
footnoteCount: footnoteIndicators.length,
|
|
314
|
+
});
|
|
315
|
+
const result = {
|
|
316
|
+
kind: 'item',
|
|
317
|
+
id,
|
|
318
|
+
title: titleStr,
|
|
319
|
+
// Only present when the painted lines differ from `[title]`: an
|
|
320
|
+
// auto-wrap, explicit breaks, or a stray leading/trailing break
|
|
321
|
+
// that was trimmed away. A plain one-line title carries no key.
|
|
322
|
+
...(captionLines.length >= 2 || captionLines[0] !== titleStr
|
|
323
|
+
? { titleLines: captionLines }
|
|
324
|
+
: {}),
|
|
325
|
+
box: itemBox,
|
|
326
|
+
dateSpan: { startX: logicalLeft, endX: logicalRight },
|
|
327
|
+
status,
|
|
328
|
+
statusDotColor: statusDotColor(status, style.bg, ctx.styleCtx.theme),
|
|
329
|
+
progressFraction: progress,
|
|
330
|
+
footnoteIndicators,
|
|
331
|
+
labelChips,
|
|
332
|
+
chipsOutside,
|
|
333
|
+
chipsRightX,
|
|
334
|
+
linkIcon: linkInfo.icon,
|
|
335
|
+
linkHref: linkInfo.href,
|
|
336
|
+
hasOverflow,
|
|
337
|
+
overflowBox,
|
|
338
|
+
overflowAnchorId,
|
|
339
|
+
owner,
|
|
340
|
+
description,
|
|
341
|
+
metaText,
|
|
342
|
+
textSpills,
|
|
343
|
+
dotSpills,
|
|
344
|
+
iconSpills,
|
|
345
|
+
footnoteSpills,
|
|
346
|
+
dotSpillCx,
|
|
347
|
+
iconSpillX,
|
|
348
|
+
footnoteSpillStartX,
|
|
349
|
+
decorationsRightX,
|
|
350
|
+
capacity,
|
|
351
|
+
size: measure.size,
|
|
352
|
+
style,
|
|
353
|
+
inlineDatePins: inlineDatePins.length > 0 ? inlineDatePins : undefined,
|
|
354
|
+
};
|
|
355
|
+
// Wave fields exist only in a roadmap with waves (omitted, never
|
|
356
|
+
// undefined, so wave-free models keep their exact shape).
|
|
357
|
+
const waveRole = waveRoleOf(node, ctx);
|
|
358
|
+
if (waveRole !== undefined)
|
|
359
|
+
result.waveRole = waveRole;
|
|
360
|
+
if (waveRole === 'background')
|
|
361
|
+
result.waveHatch = waveHatchKind(style.bg);
|
|
362
|
+
if (nonWorkingPin !== undefined)
|
|
363
|
+
result.nonWorkingPin = nonWorkingPin;
|
|
364
|
+
// The caption cap at the chart's end truncated a title line; the full
|
|
365
|
+
// title stays the bar's tooltip.
|
|
366
|
+
if (caption.truncated)
|
|
367
|
+
result.titleTruncated = true;
|
|
368
|
+
// A background item carries its localized hover line from placement
|
|
369
|
+
// on (specs/waves.md §9.3); members and wave-free items carry none.
|
|
370
|
+
if (waveRole === 'background' && ctx.waves) {
|
|
371
|
+
result.waveTooltip = ctx.waves.backgroundTooltip;
|
|
372
|
+
}
|
|
373
|
+
// Register the item object itself, not coordinates sampled from it:
|
|
374
|
+
// the row packer and the marker-band shift may still move this box
|
|
375
|
+
// down, and every attach port is read off the final box (see
|
|
376
|
+
// `item-port-geometry.ts`).
|
|
377
|
+
ctx.placedItems.set(drawKey, result);
|
|
378
|
+
traceItemNode(itemNode, placeCtx, result);
|
|
379
|
+
return result;
|
|
380
|
+
}
|
|
381
|
+
/**
|
|
382
|
+
* Internal drawing handle for an id-less item. Title-only items have no
|
|
383
|
+
* `node.name`, yet they still need a stable key to register their own
|
|
384
|
+
* dependency-arrow target geometry and join flow-key dedup. The handle is
|
|
385
|
+
* derived from the item's source position so it is deterministic and
|
|
386
|
+
* byte-stable, and the `#item@line:col` form cannot be produced by the
|
|
387
|
+
* grammar's id rule — so `after:` / `before:` / `on:` can never resolve to it
|
|
388
|
+
* (an id-less item stays non-referenceable; declare an explicit id to
|
|
389
|
+
* reference it). Distinct items always start at distinct positions, so the
|
|
390
|
+
* handle is unique within a file.
|
|
391
|
+
*/
|
|
392
|
+
export function syntheticItemKey(node) {
|
|
393
|
+
const start = node.$cstNode?.range.start;
|
|
394
|
+
return `#item@${start ? start.line + 1 : 0}:${start ? start.character + 1 : 0}`;
|
|
395
|
+
}
|
|
396
|
+
//# sourceMappingURL=sequence-item.js.map
|
|
@@ -0,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AC;QACzC,MAAM,CAAC,WAAW,GAAG,GAAG,CAAC,KAAK,CAAC,iBAAiB,CAAC;IACrD,CAAC;IACD,oEAAoE;IACpE,mEAAmE;IACnE,6DAA6D;IAC7D,4BAA4B;IAC5B,GAAG,CAAC,WAAW,CAAC,GAAG,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;IACrC,aAAa,CAAC,QAAQ,EAAE,QAAQ,EAAE,MAAM,CAAC,CAAC;IAC1C,OAAO,MAAM,CAAC;AAClB,CAAC;AAED;;;;;;;;;;GAUG;AACH,MAAM,UAAU,gBAAgB,CAAC,IAAqB;IAClD,MAAM,KAAK,GAAG,IAAI,CAAC,QAAQ,EAAE,KAAK,CAAC,KAAK,CAAC;IACzC,OAAO,SAAS,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,SAAS,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;AACpF,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { GroupBlock, ItemDeclaration, ParallelBlock } from '@nowline/core';
|
|
2
|
+
import type { LayoutContext, TrackCursor } from '../layout-context.js';
|
|
3
|
+
import type { PositionedTrackChild } from '../types.js';
|
|
4
|
+
export declare function sequenceOne(node: ItemDeclaration | GroupBlock | ParallelBlock, cursor: TrackCursor, ctx: LayoutContext): PositionedTrackChild;
|
|
5
|
+
//# sourceMappingURL=sequence-one.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sequence-one.d.ts","sourceRoot":"","sources":["../../src/nodes/sequence-one.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,UAAU,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAEhF,OAAO,KAAK,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACvE,OAAO,KAAK,EAAuC,oBAAoB,EAAE,MAAM,aAAa,CAAC;AAkB7F,wBAAgB,WAAW,CACvB,IAAI,EAAE,eAAe,GAAG,UAAU,GAAG,aAAa,EAClD,MAAM,EAAE,WAAW,EACnB,GAAG,EAAE,aAAa,GACnB,oBAAoB,CAOtB"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
// sequenceOne — the dispatcher a track calls for each child: an item goes
|
|
2
|
+
// to `sequenceItem`, a parallel block to `ParallelNode`, a group to
|
|
3
|
+
// `GroupNode`. It is the one helper the nodes still take injected
|
|
4
|
+
// (`LayoutHelpers`): the group and parallel nodes call it for their nested
|
|
5
|
+
// blocks, so importing it there would form a cycle (specs/layout-phases.md
|
|
6
|
+
// §8, decision 4).
|
|
7
|
+
import { isGroupBlock, isItemDeclaration, isParallelBlock } from '@nowline/core';
|
|
8
|
+
import { GroupNode } from './group-node.js';
|
|
9
|
+
import { ParallelNode } from './parallel-node.js';
|
|
10
|
+
import { sequenceItem } from './sequence-item.js';
|
|
11
|
+
function sequenceParallel(node, cursor, ctx) {
|
|
12
|
+
return new ParallelNode(node, { sequenceOne }).place(cursor, ctx);
|
|
13
|
+
}
|
|
14
|
+
function sequenceGroup(node, cursor, ctx) {
|
|
15
|
+
return new GroupNode(node, { sequenceOne }).place(cursor, ctx);
|
|
16
|
+
}
|
|
17
|
+
export function sequenceOne(node, cursor, ctx) {
|
|
18
|
+
if (isItemDeclaration(node))
|
|
19
|
+
return sequenceItem(node, cursor, ctx);
|
|
20
|
+
if (isParallelBlock(node))
|
|
21
|
+
return sequenceParallel(node, cursor, ctx);
|
|
22
|
+
if (isGroupBlock(node))
|
|
23
|
+
return sequenceGroup(node, cursor, ctx);
|
|
24
|
+
throw new Error(`Unknown swimlane child type: ${node.$type ?? 'unknown'}`);
|
|
25
|
+
}
|
|
26
|
+
//# sourceMappingURL=sequence-one.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sequence-one.js","sourceRoot":"","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
|
1
|
-
import type {
|
|
2
|
-
import type { LayoutContext,
|
|
3
|
-
import type {
|
|
4
|
-
/** Helpers that SwimlaneNode delegates to until the rest of m2.5c lands. */
|
|
5
|
-
export interface SwimlaneNodeDeps {
|
|
6
|
-
sequenceItem: (child: ItemDeclaration, cursor: TrackCursor, ctx: LayoutContext, ownerOverride?: string) => PositionedItem;
|
|
7
|
-
sequenceOne: (child: ItemDeclaration | GroupBlock | ParallelBlock, cursor: TrackCursor, ctx: LayoutContext) => PositionedTrackChild;
|
|
8
|
-
resolveChildStart: (props: EntityProperty[], seqDefault: number, laneLeftX: number, ctx: LayoutContext) => number;
|
|
9
|
-
newCursor: (x: number, y: number) => TrackCursor;
|
|
10
|
-
estimateTextWidth: (text: string, fontSize: number) => number;
|
|
11
|
-
/** Predict the extra vertical height an item's wrapped label-chip
|
|
12
|
-
* rows will add to its bar; used to size the row-packer's row
|
|
13
|
-
* pitch ahead of the call to `sequenceItem`. */
|
|
14
|
-
predictItemChipExtraHeight: (item: ItemDeclaration, ctx: LayoutContext) => number;
|
|
15
|
-
}
|
|
1
|
+
import type { SwimlaneDeclaration } from '@nowline/core';
|
|
2
|
+
import type { LayoutContext, LayoutHelpers } from '../layout-context.js';
|
|
3
|
+
import type { PositionedSwimlane } from '../types.js';
|
|
16
4
|
export interface SwimlaneNodeInput {
|
|
17
5
|
lane: SwimlaneDeclaration;
|
|
18
6
|
bandIndex: number;
|
|
@@ -30,8 +18,8 @@ export interface SwimlaneOrigin {
|
|
|
30
18
|
}
|
|
31
19
|
export declare class SwimlaneNode {
|
|
32
20
|
readonly input: SwimlaneNodeInput;
|
|
33
|
-
private readonly
|
|
34
|
-
constructor(input: SwimlaneNodeInput,
|
|
21
|
+
private readonly helpers;
|
|
22
|
+
constructor(input: SwimlaneNodeInput, helpers: LayoutHelpers);
|
|
35
23
|
get id(): string;
|
|
36
24
|
place(origin: SwimlaneOrigin, ctx: LayoutContext): PlacedSwimlaneGeometry;
|
|
37
25
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"swimlane-node.d.ts","sourceRoot":"","sources":["../../src/nodes/swimlane-node.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"swimlane-node.d.ts","sourceRoot":"","sources":["../../src/nodes/swimlane-node.ts"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAIR,mBAAmB,EACtB,MAAM,eAAe,CAAC;AAWvB,OAAO,KAAK,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAIzE,OAAO,KAAK,EAAmC,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAoCvF,MAAM,WAAW,iBAAiB;IAC9B,IAAI,EAAE,mBAAmB,CAAC;IAC1B,SAAS,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,sBAAsB;IACnC,UAAU,EAAE,kBAAkB,CAAC;IAC/B,UAAU,EAAE,MAAM,CAAC;IACnB,8DAA8D;IAC9D,UAAU,EAAE,MAAM,CAAC;CACtB;AAED,mDAAmD;AACnD,MAAM,WAAW,cAAc;IAC3B,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACb;AAoED,qBAAa,YAAY;aAED,KAAK,EAAE,iBAAiB;IACxC,OAAO,CAAC,QAAQ,CAAC,OAAO;IAF5B,YACoB,KAAK,EAAE,iBAAiB,EACvB,OAAO,EAAE,aAAa,EACvC;IAEJ,IAAI,EAAE,IAAI,MAAM,CAEf;IAED,KAAK,CAAC,MAAM,EAAE,cAAc,EAAE,GAAG,EAAE,aAAa,GAAG,sBAAsB,CAsHxE;CACJ"}
|