@nowline/layout 0.8.6 → 0.10.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.
Files changed (338) hide show
  1. package/dist/axis-columns.d.ts +70 -0
  2. package/dist/axis-columns.d.ts.map +1 -0
  3. package/dist/axis-columns.js +104 -0
  4. package/dist/axis-columns.js.map +1 -0
  5. package/dist/calendar-resolver.d.ts +27 -0
  6. package/dist/calendar-resolver.d.ts.map +1 -0
  7. package/dist/calendar-resolver.js +132 -0
  8. package/dist/calendar-resolver.js.map +1 -0
  9. package/dist/calendar.d.ts +0 -19
  10. package/dist/calendar.d.ts.map +1 -1
  11. package/dist/calendar.js +4 -44
  12. package/dist/calendar.js.map +1 -1
  13. package/dist/canvas-width.d.ts +23 -0
  14. package/dist/canvas-width.d.ts.map +1 -0
  15. package/dist/canvas-width.js +26 -0
  16. package/dist/canvas-width.js.map +1 -0
  17. package/dist/capacity.d.ts +28 -0
  18. package/dist/capacity.d.ts.map +1 -1
  19. package/dist/capacity.js +64 -29
  20. package/dist/capacity.js.map +1 -1
  21. package/dist/chart-translation.d.ts +22 -0
  22. package/dist/chart-translation.d.ts.map +1 -0
  23. package/dist/chart-translation.js +83 -0
  24. package/dist/chart-translation.js.map +1 -0
  25. package/dist/container-header-geometry.d.ts +64 -0
  26. package/dist/container-header-geometry.d.ts.map +1 -0
  27. package/dist/container-header-geometry.js +89 -0
  28. package/dist/container-header-geometry.js.map +1 -0
  29. package/dist/dsl-utils.d.ts +3 -4
  30. package/dist/dsl-utils.d.ts.map +1 -1
  31. package/dist/dsl-utils.js +8 -25
  32. package/dist/dsl-utils.js.map +1 -1
  33. package/dist/edge-routing.d.ts +69 -78
  34. package/dist/edge-routing.d.ts.map +1 -1
  35. package/dist/edge-routing.js +271 -401
  36. package/dist/edge-routing.js.map +1 -1
  37. package/dist/frame-tab-geometry.d.ts +24 -14
  38. package/dist/frame-tab-geometry.d.ts.map +1 -1
  39. package/dist/frame-tab-geometry.js +69 -23
  40. package/dist/frame-tab-geometry.js.map +1 -1
  41. package/dist/header-card-geometry.d.ts +12 -0
  42. package/dist/header-card-geometry.d.ts.map +1 -1
  43. package/dist/header-card-geometry.js +14 -2
  44. package/dist/header-card-geometry.js.map +1 -1
  45. package/dist/header-logo.d.ts +28 -0
  46. package/dist/header-logo.d.ts.map +1 -0
  47. package/dist/header-logo.js +51 -0
  48. package/dist/header-logo.js.map +1 -0
  49. package/dist/i18n.d.ts +11 -0
  50. package/dist/i18n.d.ts.map +1 -1
  51. package/dist/i18n.js +11 -1
  52. package/dist/i18n.js.map +1 -1
  53. package/dist/index.d.ts +20 -8
  54. package/dist/index.d.ts.map +1 -1
  55. package/dist/index.js +17 -7
  56. package/dist/index.js.map +1 -1
  57. package/dist/inline-date-pin-geometry.d.ts +19 -11
  58. package/dist/inline-date-pin-geometry.d.ts.map +1 -1
  59. package/dist/inline-date-pin-geometry.js +45 -46
  60. package/dist/inline-date-pin-geometry.js.map +1 -1
  61. package/dist/item-bar-geometry.d.ts +192 -4
  62. package/dist/item-bar-geometry.d.ts.map +1 -1
  63. package/dist/item-bar-geometry.js +258 -5
  64. package/dist/item-bar-geometry.js.map +1 -1
  65. package/dist/item-port-geometry.d.ts +13 -0
  66. package/dist/item-port-geometry.d.ts.map +1 -0
  67. package/dist/item-port-geometry.js +63 -0
  68. package/dist/item-port-geometry.js.map +1 -0
  69. package/dist/layout-context.d.ts +115 -51
  70. package/dist/layout-context.d.ts.map +1 -1
  71. package/dist/layout-context.js +96 -5
  72. package/dist/layout-context.js.map +1 -1
  73. package/dist/layout-insights.d.ts.map +1 -1
  74. package/dist/layout-insights.js +73 -1
  75. package/dist/layout-insights.js.map +1 -1
  76. package/dist/layout.d.ts +35 -0
  77. package/dist/layout.d.ts.map +1 -1
  78. package/dist/layout.js +18 -1315
  79. package/dist/layout.js.map +1 -1
  80. package/dist/nodes/anchor-node.d.ts.map +1 -1
  81. package/dist/nodes/anchor-node.js +11 -4
  82. package/dist/nodes/anchor-node.js.map +1 -1
  83. package/dist/nodes/content-extent.d.ts +24 -0
  84. package/dist/nodes/content-extent.d.ts.map +1 -0
  85. package/dist/nodes/content-extent.js +100 -0
  86. package/dist/nodes/content-extent.js.map +1 -0
  87. package/dist/nodes/dependency-edges.d.ts +6 -0
  88. package/dist/nodes/dependency-edges.d.ts.map +1 -0
  89. package/dist/nodes/dependency-edges.js +148 -0
  90. package/dist/nodes/dependency-edges.js.map +1 -0
  91. package/dist/nodes/footnote-node.d.ts +24 -3
  92. package/dist/nodes/footnote-node.d.ts.map +1 -1
  93. package/dist/nodes/footnote-node.js +129 -25
  94. package/dist/nodes/footnote-node.js.map +1 -1
  95. package/dist/nodes/group-node.d.ts +10 -21
  96. package/dist/nodes/group-node.d.ts.map +1 -1
  97. package/dist/nodes/group-node.js +79 -152
  98. package/dist/nodes/group-node.js.map +1 -1
  99. package/dist/nodes/header-node.d.ts +56 -0
  100. package/dist/nodes/header-node.d.ts.map +1 -0
  101. package/dist/nodes/header-node.js +163 -0
  102. package/dist/nodes/header-node.js.map +1 -0
  103. package/dist/nodes/include-node.d.ts +22 -12
  104. package/dist/nodes/include-node.d.ts.map +1 -1
  105. package/dist/nodes/include-node.js +95 -62
  106. package/dist/nodes/include-node.js.map +1 -1
  107. package/dist/nodes/item-measure.d.ts +135 -0
  108. package/dist/nodes/item-measure.d.ts.map +1 -0
  109. package/dist/nodes/item-measure.js +514 -0
  110. package/dist/nodes/item-measure.js.map +1 -0
  111. package/dist/nodes/item-node.d.ts +162 -9
  112. package/dist/nodes/item-node.d.ts.map +1 -1
  113. package/dist/nodes/item-node.js +256 -69
  114. package/dist/nodes/item-node.js.map +1 -1
  115. package/dist/nodes/marker-band.d.ts +118 -0
  116. package/dist/nodes/marker-band.d.ts.map +1 -0
  117. package/dist/nodes/marker-band.js +303 -0
  118. package/dist/nodes/marker-band.js.map +1 -0
  119. package/dist/nodes/marker-geometry.js +1 -1
  120. package/dist/nodes/marker-geometry.js.map +1 -1
  121. package/dist/nodes/milestone-node.d.ts +112 -15
  122. package/dist/nodes/milestone-node.d.ts.map +1 -1
  123. package/dist/nodes/milestone-node.js +246 -95
  124. package/dist/nodes/milestone-node.js.map +1 -1
  125. package/dist/nodes/nowline-node.d.ts +8 -0
  126. package/dist/nodes/nowline-node.d.ts.map +1 -0
  127. package/dist/nodes/nowline-node.js +74 -0
  128. package/dist/nodes/nowline-node.js.map +1 -0
  129. package/dist/nodes/parallel-node.d.ts +7 -12
  130. package/dist/nodes/parallel-node.d.ts.map +1 -1
  131. package/dist/nodes/parallel-node.js +66 -30
  132. package/dist/nodes/parallel-node.js.map +1 -1
  133. package/dist/nodes/region-markers.d.ts +41 -0
  134. package/dist/nodes/region-markers.d.ts.map +1 -0
  135. package/dist/nodes/region-markers.js +130 -0
  136. package/dist/nodes/region-markers.js.map +1 -0
  137. package/dist/nodes/roadmap-node.d.ts +9 -72
  138. package/dist/nodes/roadmap-node.d.ts.map +1 -1
  139. package/dist/nodes/roadmap-node.js +38 -788
  140. package/dist/nodes/roadmap-node.js.map +1 -1
  141. package/dist/nodes/row-track.d.ts +33 -0
  142. package/dist/nodes/row-track.d.ts.map +1 -0
  143. package/dist/nodes/row-track.js +170 -0
  144. package/dist/nodes/row-track.js.map +1 -0
  145. package/dist/nodes/sequence-item.d.ts +25 -0
  146. package/dist/nodes/sequence-item.d.ts.map +1 -0
  147. package/dist/nodes/sequence-item.js +396 -0
  148. package/dist/nodes/sequence-item.js.map +1 -0
  149. package/dist/nodes/sequence-one.d.ts +5 -0
  150. package/dist/nodes/sequence-one.d.ts.map +1 -0
  151. package/dist/nodes/sequence-one.js +26 -0
  152. package/dist/nodes/sequence-one.js.map +1 -0
  153. package/dist/nodes/swimlane-node.d.ts +5 -17
  154. package/dist/nodes/swimlane-node.d.ts.map +1 -1
  155. package/dist/nodes/swimlane-node.js +62 -145
  156. package/dist/nodes/swimlane-node.js.map +1 -1
  157. package/dist/nodes/wave-node.d.ts +52 -0
  158. package/dist/nodes/wave-node.d.ts.map +1 -0
  159. package/dist/nodes/wave-node.js +483 -0
  160. package/dist/nodes/wave-node.js.map +1 -0
  161. package/dist/non-working-display.d.ts +14 -0
  162. package/dist/non-working-display.d.ts.map +1 -0
  163. package/dist/non-working-display.js +28 -0
  164. package/dist/non-working-display.js.map +1 -0
  165. package/dist/phases/date-window.d.ts +48 -0
  166. package/dist/phases/date-window.d.ts.map +1 -0
  167. package/dist/phases/date-window.js +130 -0
  168. package/dist/phases/date-window.js.map +1 -0
  169. package/dist/phases/finalize.d.ts +198 -0
  170. package/dist/phases/finalize.d.ts.map +1 -0
  171. package/dist/phases/finalize.js +1058 -0
  172. package/dist/phases/finalize.js.map +1 -0
  173. package/dist/phases/measure.d.ts +77 -0
  174. package/dist/phases/measure.d.ts.map +1 -0
  175. package/dist/phases/measure.js +222 -0
  176. package/dist/phases/measure.js.map +1 -0
  177. package/dist/phases/place.d.ts +28 -0
  178. package/dist/phases/place.d.ts.map +1 -0
  179. package/dist/phases/place.js +225 -0
  180. package/dist/phases/place.js.map +1 -0
  181. package/dist/renderable.d.ts.map +1 -1
  182. package/dist/renderable.js +23 -3
  183. package/dist/renderable.js.map +1 -1
  184. package/dist/resolve-today.d.ts +11 -1
  185. package/dist/resolve-today.d.ts.map +1 -1
  186. package/dist/resolve-today.js +26 -12
  187. package/dist/resolve-today.js.map +1 -1
  188. package/dist/row-packer.d.ts +42 -16
  189. package/dist/row-packer.d.ts.map +1 -1
  190. package/dist/row-packer.js +51 -78
  191. package/dist/row-packer.js.map +1 -1
  192. package/dist/schedule.d.ts +58 -1
  193. package/dist/schedule.d.ts.map +1 -1
  194. package/dist/schedule.js +280 -106
  195. package/dist/schedule.js.map +1 -1
  196. package/dist/start-rules.d.ts +27 -0
  197. package/dist/start-rules.d.ts.map +1 -0
  198. package/dist/start-rules.js +91 -0
  199. package/dist/start-rules.js.map +1 -0
  200. package/dist/start-terms.d.ts +23 -0
  201. package/dist/start-terms.d.ts.map +1 -0
  202. package/dist/start-terms.js +27 -0
  203. package/dist/start-terms.js.map +1 -0
  204. package/dist/status-dot.d.ts +46 -0
  205. package/dist/status-dot.d.ts.map +1 -0
  206. package/dist/status-dot.js +78 -0
  207. package/dist/status-dot.js.map +1 -0
  208. package/dist/style-resolution.d.ts.map +1 -1
  209. package/dist/style-resolution.js +23 -43
  210. package/dist/style-resolution.js.map +1 -1
  211. package/dist/text-measure.d.ts +28 -0
  212. package/dist/text-measure.d.ts.map +1 -0
  213. package/dist/text-measure.js +70 -0
  214. package/dist/text-measure.js.map +1 -0
  215. package/dist/themes/contrast.d.ts +4 -0
  216. package/dist/themes/contrast.d.ts.map +1 -0
  217. package/dist/themes/contrast.js +32 -0
  218. package/dist/themes/contrast.js.map +1 -0
  219. package/dist/themes/dark.d.ts.map +1 -1
  220. package/dist/themes/dark.js +28 -1
  221. package/dist/themes/dark.js.map +1 -1
  222. package/dist/themes/grayscale.d.ts.map +1 -1
  223. package/dist/themes/grayscale.js +28 -1
  224. package/dist/themes/grayscale.js.map +1 -1
  225. package/dist/themes/index.d.ts +4 -11
  226. package/dist/themes/index.d.ts.map +1 -1
  227. package/dist/themes/index.js +6 -4
  228. package/dist/themes/index.js.map +1 -1
  229. package/dist/themes/light.d.ts.map +1 -1
  230. package/dist/themes/light.js +28 -1
  231. package/dist/themes/light.js.map +1 -1
  232. package/dist/themes/shape.d.ts +31 -0
  233. package/dist/themes/shape.d.ts.map +1 -1
  234. package/dist/themes/shared.d.ts +44 -50
  235. package/dist/themes/shared.d.ts.map +1 -1
  236. package/dist/themes/shared.js +79 -83
  237. package/dist/themes/shared.js.map +1 -1
  238. package/dist/time-scale.d.ts +42 -6
  239. package/dist/time-scale.d.ts.map +1 -1
  240. package/dist/time-scale.js +109 -17
  241. package/dist/time-scale.js.map +1 -1
  242. package/dist/types.d.ts +528 -11
  243. package/dist/types.d.ts.map +1 -1
  244. package/dist/view-preset.d.ts +61 -6
  245. package/dist/view-preset.d.ts.map +1 -1
  246. package/dist/view-preset.js +439 -24
  247. package/dist/view-preset.js.map +1 -1
  248. package/dist/wave-barrier.d.ts +107 -0
  249. package/dist/wave-barrier.d.ts.map +1 -0
  250. package/dist/wave-barrier.js +174 -0
  251. package/dist/wave-barrier.js.map +1 -0
  252. package/dist/wave-hatch.d.ts +4 -0
  253. package/dist/wave-hatch.d.ts.map +1 -0
  254. package/dist/wave-hatch.js +21 -0
  255. package/dist/wave-hatch.js.map +1 -0
  256. package/dist/wave-layout.d.ts +99 -0
  257. package/dist/wave-layout.d.ts.map +1 -0
  258. package/dist/wave-layout.js +130 -0
  259. package/dist/wave-layout.js.map +1 -0
  260. package/dist/working-calendar.d.ts +128 -4
  261. package/dist/working-calendar.d.ts.map +1 -1
  262. package/dist/working-calendar.js +725 -51
  263. package/dist/working-calendar.js.map +1 -1
  264. package/dist/working-span.d.ts +11 -0
  265. package/dist/working-span.d.ts.map +1 -0
  266. package/dist/working-span.js +18 -0
  267. package/dist/working-span.js.map +1 -0
  268. package/package.json +4 -4
  269. package/src/axis-columns.ts +140 -0
  270. package/src/calendar-resolver.ts +161 -0
  271. package/src/calendar.ts +4 -45
  272. package/src/canvas-width.ts +36 -0
  273. package/src/capacity.ts +71 -30
  274. package/src/chart-translation.ts +88 -0
  275. package/src/container-header-geometry.ts +116 -0
  276. package/src/dsl-utils.ts +8 -26
  277. package/src/edge-routing.ts +347 -491
  278. package/src/frame-tab-geometry.ts +78 -25
  279. package/src/header-card-geometry.ts +17 -2
  280. package/src/header-logo.ts +67 -0
  281. package/src/i18n.ts +22 -1
  282. package/src/index.ts +97 -12
  283. package/src/inline-date-pin-geometry.ts +55 -58
  284. package/src/item-bar-geometry.ts +341 -5
  285. package/src/item-port-geometry.ts +69 -0
  286. package/src/layout-context.ts +210 -72
  287. package/src/layout-insights.ts +109 -2
  288. package/src/layout.ts +57 -1530
  289. package/src/nodes/anchor-node.ts +11 -4
  290. package/src/nodes/content-extent.ts +107 -0
  291. package/src/nodes/dependency-edges.ts +171 -0
  292. package/src/nodes/footnote-node.ts +171 -31
  293. package/src/nodes/group-node.ts +92 -214
  294. package/src/nodes/header-node.ts +255 -0
  295. package/src/nodes/include-node.ts +124 -110
  296. package/src/nodes/item-measure.ts +723 -0
  297. package/src/nodes/item-node.ts +358 -80
  298. package/src/nodes/marker-band.ts +406 -0
  299. package/src/nodes/marker-geometry.ts +1 -1
  300. package/src/nodes/milestone-node.ts +321 -136
  301. package/src/nodes/nowline-node.ts +87 -0
  302. package/src/nodes/parallel-node.ts +69 -38
  303. package/src/nodes/region-markers.ts +194 -0
  304. package/src/nodes/roadmap-node.ts +46 -950
  305. package/src/nodes/row-track.ts +217 -0
  306. package/src/nodes/sequence-item.ts +433 -0
  307. package/src/nodes/sequence-one.ts +40 -0
  308. package/src/nodes/swimlane-node.ts +66 -205
  309. package/src/nodes/wave-node.ts +609 -0
  310. package/src/non-working-display.ts +32 -0
  311. package/src/phases/date-window.ts +191 -0
  312. package/src/phases/finalize.ts +1303 -0
  313. package/src/phases/measure.ts +329 -0
  314. package/src/phases/place.ts +318 -0
  315. package/src/renderable.ts +23 -3
  316. package/src/resolve-today.ts +28 -25
  317. package/src/row-packer.ts +85 -84
  318. package/src/schedule.ts +362 -114
  319. package/src/start-rules.ts +113 -0
  320. package/src/start-terms.ts +38 -0
  321. package/src/status-dot.ts +81 -0
  322. package/src/style-resolution.ts +27 -57
  323. package/src/text-measure.ts +71 -0
  324. package/src/themes/contrast.ts +34 -0
  325. package/src/themes/dark.ts +28 -1
  326. package/src/themes/grayscale.ts +28 -1
  327. package/src/themes/index.ts +10 -7
  328. package/src/themes/light.ts +28 -1
  329. package/src/themes/shape.ts +38 -0
  330. package/src/themes/shared.ts +85 -93
  331. package/src/time-scale.ts +117 -19
  332. package/src/types.ts +529 -20
  333. package/src/view-preset.ts +520 -27
  334. package/src/wave-barrier.ts +242 -0
  335. package/src/wave-hatch.ts +25 -0
  336. package/src/wave-layout.ts +203 -0
  337. package/src/working-calendar.ts +875 -57
  338. package/src/working-span.ts +19 -0
@@ -13,6 +13,7 @@
13
13
  // `box`** (`box.x` for X, `box.y` for Y), with `box.height` /
14
14
  // `box.width` used as the "right edge" / "bottom edge" anchor where
15
15
  // noted.
16
+ import { estimateTextWidth } from './text-measure.js';
16
17
  // ---- Caption (title + meta text) ---------------------------------
17
18
  /** Horizontal inset (px) for the caption's left edge inside the bar. */
18
19
  export const ITEM_CAPTION_INSET_X_PX = 12;
@@ -31,6 +32,55 @@ export const ITEM_CAPTION_META_BASELINE_OFFSET_PX = 38;
31
32
  export const ITEM_CAPTION_TITLE_FONT_SIZE_PX = 13;
32
33
  /** Font size (px) of the meta text. */
33
34
  export const ITEM_CAPTION_META_FONT_SIZE_PX = 11;
35
+ /**
36
+ * Baseline-to-baseline pitch (px) between consecutive TITLE lines when
37
+ * a long title word-wraps inside the bar. The meta line sits one more
38
+ * pitch below the last title line for every extra title line, see
39
+ * `itemCaptionMetaBaselineOffset`.
40
+ */
41
+ export const ITEM_CAPTION_TITLE_LINE_HEIGHT_PX = 16;
42
+ /**
43
+ * Most title lines layout will wrap a title onto inside the bar. A
44
+ * title that needs more than this spills to the right of the bar as a
45
+ * single line instead.
46
+ */
47
+ export const ITEM_CAPTION_TITLE_MAX_LINES = 2;
48
+ /**
49
+ * Baseline Y (px from the bar's top) of the meta line when the title
50
+ * occupies `lineCount` lines. One line gives the classic
51
+ * `ITEM_CAPTION_META_BASELINE_OFFSET_PX`; each extra title line pushes
52
+ * the meta baseline down by `ITEM_CAPTION_TITLE_LINE_HEIGHT_PX`.
53
+ */
54
+ export function itemCaptionMetaBaselineOffset(lineCount) {
55
+ return (ITEM_CAPTION_META_BASELINE_OFFSET_PX +
56
+ (Math.max(1, lineCount) - 1) * ITEM_CAPTION_TITLE_LINE_HEIGHT_PX);
57
+ }
58
+ /**
59
+ * Baseline Y (px from the bar's top) of the LAST caption line: the
60
+ * meta line when the item has one, otherwise the final title line.
61
+ * Anything stacked below the caption (label chips) must clear this.
62
+ */
63
+ export function itemCaptionLastBaselineOffset(lineCount, hasMeta) {
64
+ if (hasMeta)
65
+ return itemCaptionMetaBaselineOffset(lineCount);
66
+ return (ITEM_CAPTION_TITLE_BASELINE_OFFSET_PX +
67
+ (Math.max(1, lineCount) - 1) * ITEM_CAPTION_TITLE_LINE_HEIGHT_PX);
68
+ }
69
+ /**
70
+ * Extra bar height (px) a wrapped title needs on top of the default
71
+ * `bandwidth`. The default bar is sized so the caption's last baseline
72
+ * is at most `ITEM_CAPTION_META_BASELINE_OFFSET_PX`; anything below
73
+ * that grows the bar by the overshoot:
74
+ *
75
+ * - 1 title line (with or without meta): 0.
76
+ * - 2 title lines, no meta: line 2 lands at baseline 36, so 0.
77
+ * - 2 title lines + meta: meta baseline 54, so 16.
78
+ *
79
+ * The same number is the row-pitch increase for the bar's row.
80
+ */
81
+ export function computeTitleBarExtra(lineCount, hasMeta) {
82
+ return Math.max(0, itemCaptionLastBaselineOffset(lineCount, hasMeta) - ITEM_CAPTION_META_BASELINE_OFFSET_PX);
83
+ }
34
84
  // ---- Status dot (upper-right glyph) ------------------------------
35
85
  /** Distance (px) from the bar's right edge to the dot's center. */
36
86
  export const ITEM_STATUS_DOT_INSET_RIGHT_PX = 12;
@@ -46,6 +96,12 @@ export const ITEM_STATUS_DOT_RADIUS_PX = 5;
46
96
  export const ITEM_FOOTNOTE_INDICATOR_INSET_RIGHT_PX = 22;
47
97
  /** Baseline Y (px from bar's top) for footnote indicator digits. */
48
98
  export const ITEM_FOOTNOTE_INDICATOR_BASELINE_OFFSET_PX = 14;
99
+ /**
100
+ * Font size (px) of the footnote indicator digits. The renderer paints
101
+ * them at this size and layout measures them with it (to find the
102
+ * cluster's left edge), so both read the same constant.
103
+ */
104
+ export const ITEM_FOOTNOTE_INDICATOR_FONT_SIZE_PX = 10;
49
105
  /**
50
106
  * Horizontal step (px) between consecutive footnote indicators when
51
107
  * an item carries more than one footnote — they walk LEFT from the
@@ -57,6 +113,48 @@ export const ITEM_FOOTNOTE_INDICATOR_STEP_PX = 8;
57
113
  export const ITEM_LINK_ICON_TILE_SIZE_PX = 14;
58
114
  /** Distance (px) from the bar's right/bottom edges to the tile's edge. */
59
115
  export const ITEM_LINK_ICON_INSET_PX = 6;
116
+ /**
117
+ * Horizontal gap (px) between the link-icon tile's right edge and the
118
+ * start of the caption text when both render inside the bar.
119
+ */
120
+ export const ITEM_LINK_ICON_TO_CAPTION_GAP_PX = 4;
121
+ /**
122
+ * Left inset (px) of the in-bar caption from the bar's left edge. It is
123
+ * `ITEM_CAPTION_INSET_X_PX` normally, pushed right past the link-icon
124
+ * tile (and its gap) when the bar carries a link icon, and pushed right
125
+ * past the `after:` inline-date glyph (and a gap) when the bar carries
126
+ * one INSIDE it:
127
+ *
128
+ * - no link icon, no glyph: 12
129
+ * - link icon, no glyph: 24
130
+ * - glyph, no link icon: 22 (the glyph spans 6..18, plus a 4 px gap)
131
+ * - glyph and link icon: 40 (the glyph spans 24..36, plus a 4 px gap)
132
+ *
133
+ * A glyph on a bar narrower than `MIN_BAR_WIDTH_FOR_INLINE_DATE_PX`
134
+ * spills out of the bar to the left and reserves nothing.
135
+ *
136
+ * `hasLinkIcon` is the same flag `computeItemInlineDatePins` places the
137
+ * glyph with, and the glyph's right edge comes from the same helper
138
+ * (`itemAfterGlyphInsideLeftX`), so the inset and the glyph can't
139
+ * disagree. The inset applies to every caption line, not only line 1,
140
+ * so the caption's left edge stays straight.
141
+ */
142
+ export function itemCaptionInsetX(hasLinkIcon, afterGlyph) {
143
+ let inset = ITEM_CAPTION_INSET_X_PX;
144
+ if (hasLinkIcon) {
145
+ const linkColumn = ITEM_LINK_ICON_INSET_PX +
146
+ ITEM_LINK_ICON_TILE_SIZE_PX +
147
+ ITEM_LINK_ICON_TO_CAPTION_GAP_PX -
148
+ ITEM_CAPTION_INSET_X_PX;
149
+ inset = ITEM_CAPTION_INSET_X_PX + Math.max(0, linkColumn);
150
+ }
151
+ if (afterGlyph && !inlineDateGlyphSpills(afterGlyph.barWidth)) {
152
+ // Offsets from a left edge of 0, so the numbers are exact integers.
153
+ const glyphRight = itemAfterGlyphInsideLeftX(0, hasLinkIcon) + INLINE_DATE_GLYPH_TILE_SIZE_PX;
154
+ inset = Math.max(inset, glyphRight + ITEM_DECORATION_SPILL_GAP_PX);
155
+ }
156
+ return inset;
157
+ }
60
158
  // ---- Narrow-bar decoration spill --------------------------------
61
159
  /**
62
160
  * Horizontal gap (px) between consecutive decorations (status dot,
@@ -65,12 +163,14 @@ export const ITEM_LINK_ICON_INSET_PX = 6;
65
163
  */
66
164
  export const ITEM_DECORATION_SPILL_GAP_PX = 4;
67
165
  /**
68
- * Minimum bar width (px) needed to host the status dot inside the
69
- * bar with its full inset. Below this, the dot would have to
70
- * extend past the bar's left edge, so the dot spills into the
71
- * caption column to the right of the bar instead.
166
+ * Minimum bar width (px) at which the status dot sits INSIDE the bar:
167
+ * the dot's centre is `ITEM_STATUS_DOT_INSET_RIGHT_PX` from the right
168
+ * edge, so a bar of twice that width has the same air on both sides
169
+ * of it (the centre sits mid-bar). A narrower bar would crowd the
170
+ * dot against its left edge, so the dot spills into the caption
171
+ * column to the right of the bar instead.
72
172
  */
73
- export const MIN_BAR_WIDTH_FOR_DOT_PX = ITEM_STATUS_DOT_INSET_RIGHT_PX + ITEM_STATUS_DOT_RADIUS_PX;
173
+ export const MIN_BAR_WIDTH_FOR_DOT_PX = 2 * ITEM_STATUS_DOT_INSET_RIGHT_PX;
74
174
  /**
75
175
  * Minimum bar width (px) needed to host the link-icon tile AND the
76
176
  * status dot inside the bar with at least
@@ -91,6 +191,49 @@ export const MIN_BAR_WIDTH_FOR_LINK_AND_DOT_PX = ITEM_LINK_ICON_INSET_PX +
91
191
  * for one digit is 8px (font-size 10, bold).
92
192
  */
93
193
  export const MIN_BAR_WIDTH_FOR_FOOTNOTE_PX = ITEM_FOOTNOTE_INDICATOR_INSET_RIGHT_PX + 1;
194
+ /**
195
+ * Lay out a bar's spill column `[icon?] [caption?] [¹²?] [dot?]` from
196
+ * `ITEM_CAPTION_SPILL_GAP_PX` past the bar, one `ITEM_DECORATION_SPILL_GAP_PX`
197
+ * between the parts that are present and none after the last. The item
198
+ * measure reads it to cap a caption at the chart's end, and `sequenceItem`
199
+ * places the parts with it.
200
+ */
201
+ export function layoutSpillCluster(input) {
202
+ let cursor = input.barRightX + ITEM_CAPTION_SPILL_GAP_PX;
203
+ // A gap goes in only once something is already in the column, so the
204
+ // cluster leaves no dangling gap past its last part.
205
+ let needGap = false;
206
+ let iconSpillX = null;
207
+ if (input.iconSpills) {
208
+ iconSpillX = cursor;
209
+ cursor = iconSpillX + ITEM_LINK_ICON_TILE_SIZE_PX;
210
+ needGap = true;
211
+ }
212
+ let captionX = null;
213
+ if (input.captionWidth !== null) {
214
+ if (needGap)
215
+ cursor += ITEM_DECORATION_SPILL_GAP_PX;
216
+ captionX = cursor;
217
+ cursor += input.captionWidth;
218
+ needGap = true;
219
+ }
220
+ let footnoteSpillStartX = null;
221
+ if (input.footnoteCount > 0) {
222
+ if (needGap)
223
+ cursor += ITEM_DECORATION_SPILL_GAP_PX;
224
+ footnoteSpillStartX = cursor;
225
+ cursor += input.footnoteCount * ITEM_FOOTNOTE_INDICATOR_STEP_PX;
226
+ needGap = true;
227
+ }
228
+ let dotSpillCx = null;
229
+ if (input.dotSpills) {
230
+ if (needGap)
231
+ cursor += ITEM_DECORATION_SPILL_GAP_PX;
232
+ dotSpillCx = cursor + ITEM_STATUS_DOT_RADIUS_PX;
233
+ cursor = dotSpillCx + ITEM_STATUS_DOT_RADIUS_PX;
234
+ }
235
+ return { iconSpillX, captionX, footnoteSpillStartX, dotSpillCx, rightX: cursor };
236
+ }
94
237
  // ---- Inline-date glyph (after:DATE / before:DATE corner badge) ---
95
238
  //
96
239
  // Renders the renderer's built-in `calendar` SVG at top-LEFT (`after`)
@@ -132,6 +275,116 @@ export const MIN_BAR_WIDTH_FOR_INLINE_DATE_PX = INLINE_DATE_GLYPH_INSET_LEFT_PX
132
275
  INLINE_DATE_GLYPH_GAP_PX +
133
276
  INLINE_DATE_GLYPH_TILE_SIZE_PX +
134
277
  INLINE_DATE_GLYPH_INSET_RIGHT_PX;
278
+ /**
279
+ * True when a bar of painted width `barWidth` is too narrow to host the
280
+ * inline-date glyph inside, so it spills (`before:` right, `after:` left).
281
+ * The one threshold behind the glyph's `spilled` flag and the caption
282
+ * inset's decision to reserve room for it.
283
+ */
284
+ export function inlineDateGlyphSpills(barWidth) {
285
+ return barWidth < MIN_BAR_WIDTH_FOR_INLINE_DATE_PX;
286
+ }
287
+ /**
288
+ * Left x of the `after:` inline-date glyph when it sits INSIDE the bar,
289
+ * for a bar whose left edge is at `leftEdge`:
290
+ *
291
+ * - no link icon: the glyph sits at the leftmost top-decoration slot,
292
+ * `INLINE_DATE_GLYPH_INSET_LEFT_PX` (6) from the edge
293
+ * - link icon: one `INLINE_DATE_GLYPH_GAP_PX` right of the tile's right
294
+ * edge (6 + 14 + 4 = 24 from the edge)
295
+ *
296
+ * The one formula behind both the glyph placement
297
+ * (`computeItemInlineDatePins`) and the caption's left inset
298
+ * (`itemCaptionInsetX`), so the two can never disagree. Pass
299
+ * `leftEdge = 0` to get the offset from the bar's left edge.
300
+ */
301
+ export function itemAfterGlyphInsideLeftX(leftEdge, hasLinkIcon) {
302
+ return hasLinkIcon
303
+ ? leftEdge +
304
+ ITEM_LINK_ICON_INSET_PX +
305
+ ITEM_LINK_ICON_TILE_SIZE_PX +
306
+ INLINE_DATE_GLYPH_GAP_PX
307
+ : leftEdge + INLINE_DATE_GLYPH_INSET_LEFT_PX;
308
+ }
309
+ /**
310
+ * Left x of the `before:` inline-date glyph when it sits INSIDE the bar,
311
+ * for a bar whose right edge is at `rightEdge`. The glyph walks LEFT
312
+ * from the rightmost top-decoration slot:
313
+ *
314
+ * - rightmost footnote anchors at (rightEdge - INSET_RIGHT_PX)
315
+ * - the leftmost footnote sits one step further left per extra digit
316
+ * - the status dot's left edge sits at (rightEdge - INSET_RIGHT - DOT_RADIUS)
317
+ * - the glyph sits one `INLINE_DATE_GLYPH_GAP_PX` further left than
318
+ * whichever of those is leftmost (footnotes win when present, since
319
+ * they are always left of the dot)
320
+ *
321
+ * The one formula behind both the glyph placement
322
+ * (`computeItemInlineDatePins`) and the title first-line clearance
323
+ * (`itemTitleFirstLineRightReservePx`), so the two can never disagree.
324
+ * Pass `rightEdge = 0` to get the offset from the bar's right edge
325
+ * (negative, inside the bar) with exact integer arithmetic.
326
+ */
327
+ export function itemBeforeGlyphInsideLeftX(rightEdge, footnoteCount) {
328
+ let anchorRightX;
329
+ if (footnoteCount > 0) {
330
+ const leftmostFootnoteCenter = rightEdge -
331
+ ITEM_FOOTNOTE_INDICATOR_INSET_RIGHT_PX -
332
+ (footnoteCount - 1) * ITEM_FOOTNOTE_INDICATOR_STEP_PX;
333
+ anchorRightX = leftmostFootnoteCenter - INLINE_DATE_GLYPH_GAP_PX;
334
+ }
335
+ else {
336
+ const dotLeftEdge = rightEdge - ITEM_STATUS_DOT_INSET_RIGHT_PX - ITEM_STATUS_DOT_RADIUS_PX;
337
+ anchorRightX = dotLeftEdge - INLINE_DATE_GLYPH_GAP_PX;
338
+ }
339
+ return anchorRightX - INLINE_DATE_GLYPH_TILE_SIZE_PX;
340
+ }
341
+ /**
342
+ * Right-side space (px) the FIRST title line must leave free, measured
343
+ * from the bar's right edge: the larger of the plain right inset
344
+ * (`ITEM_CAPTION_INSET_X_PX`) and the distance to the top-right
345
+ * cluster's left edge plus `ITEM_DECORATION_SPILL_GAP_PX` of air.
346
+ *
347
+ * The cluster is the leftmost of three parts, each counted only when it
348
+ * renders INSIDE the bar (a narrow bar spills it into the column to the
349
+ * right instead, where it can't touch the title):
350
+ *
351
+ * - status dot: left edge at (right - 17); absent below
352
+ * `MIN_BAR_WIDTH_FOR_DOT_PX` (24). Dot only gives 21.
353
+ * - footnote digits: leftmost digit's left edge at
354
+ * (right - 22 - (n-1) * 8 - width); absent when they spill
355
+ * (`MIN_BAR_WIDTH_FOR_FOOTNOTE_PX`).
356
+ * - `before:` glyph: its left x, from `itemBeforeGlyphInsideLeftX`;
357
+ * absent when it spills (`MIN_BAR_WIDTH_FOR_INLINE_DATE_PX`).
358
+ *
359
+ * Offsets are computed from a right edge of 0 (inside the bar is
360
+ * negative) so the common cases are exact integers.
361
+ */
362
+ export function itemTitleFirstLineRightReservePx(opts) {
363
+ const { barWidth, footnoteLabels, hasBeforeGlyph } = opts;
364
+ let clusterLeft = Number.POSITIVE_INFINITY;
365
+ if (barWidth >= MIN_BAR_WIDTH_FOR_DOT_PX) {
366
+ clusterLeft = Math.min(clusterLeft, -(ITEM_STATUS_DOT_INSET_RIGHT_PX + ITEM_STATUS_DOT_RADIUS_PX));
367
+ }
368
+ const footnoteCount = footnoteLabels.length;
369
+ const footnotesInside = footnoteCount > 0 && barWidth >= MIN_BAR_WIDTH_FOR_FOOTNOTE_PX;
370
+ if (footnotesInside) {
371
+ // Digit `k` (0 = leftmost) anchors its RIGHT end at
372
+ // `-22 - (n-1-k) * 8`, so its left edge is that minus its width.
373
+ // Normally digit 0 reaches furthest left; checking all of them
374
+ // also covers a wide late digit (e.g. footnote 100 next to 9).
375
+ for (let k = 0; k < footnoteCount; k += 1) {
376
+ const anchorX = -ITEM_FOOTNOTE_INDICATOR_INSET_RIGHT_PX -
377
+ (footnoteCount - 1 - k) * ITEM_FOOTNOTE_INDICATOR_STEP_PX;
378
+ const left = anchorX -
379
+ estimateTextWidth(footnoteLabels[k], ITEM_FOOTNOTE_INDICATOR_FONT_SIZE_PX);
380
+ clusterLeft = Math.min(clusterLeft, left);
381
+ }
382
+ }
383
+ if (hasBeforeGlyph && barWidth >= MIN_BAR_WIDTH_FOR_INLINE_DATE_PX) {
384
+ clusterLeft = Math.min(clusterLeft, itemBeforeGlyphInsideLeftX(0, footnoteCount));
385
+ }
386
+ return Math.max(ITEM_CAPTION_INSET_X_PX, -clusterLeft + ITEM_DECORATION_SPILL_GAP_PX);
387
+ }
135
388
  // ---- Label chips (along the bar's bottom) ------------------------
136
389
  /** Height (px) of a label chip rectangle. */
137
390
  export const LABEL_CHIP_HEIGHT_PX = 13;
@@ -1 +1 @@
1
- {"version":3,"file":"item-bar-geometry.js","sourceRoot":"","sources":["../src/item-bar-geometry.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,oEAAoE;AACpE,oEAAoE;AACpE,8CAA8C;AAC9C,EAAE;AACF,iEAAiE;AACjE,sEAAsE;AACtE,qEAAqE;AACrE,oEAAoE;AACpE,wCAAwC;AACxC,EAAE;AACF,kEAAkE;AAClE,8DAA8D;AAC9D,oEAAoE;AACpE,SAAS;AAET,qEAAqE;AAErE,wEAAwE;AACxE,MAAM,CAAC,MAAM,uBAAuB,GAAG,EAAE,CAAC;AAE1C;;;;;GAKG;AACH,MAAM,CAAC,MAAM,yBAAyB,GAAG,CAAC,CAAC;AAE3C,8DAA8D;AAC9D,MAAM,CAAC,MAAM,qCAAqC,GAAG,EAAE,CAAC;AAExD,2EAA2E;AAC3E,MAAM,CAAC,MAAM,oCAAoC,GAAG,EAAE,CAAC;AAEvD,wCAAwC;AACxC,MAAM,CAAC,MAAM,+BAA+B,GAAG,EAAE,CAAC;AAElD,uCAAuC;AACvC,MAAM,CAAC,MAAM,8BAA8B,GAAG,EAAE,CAAC;AAEjD,qEAAqE;AAErE,mEAAmE;AACnE,MAAM,CAAC,MAAM,8BAA8B,GAAG,EAAE,CAAC;AAEjD,iEAAiE;AACjE,MAAM,CAAC,MAAM,4BAA4B,GAAG,EAAE,CAAC;AAE/C,qCAAqC;AACrC,MAAM,CAAC,MAAM,yBAAyB,GAAG,CAAC,CAAC;AAE3C,qEAAqE;AAErE;;;GAGG;AACH,MAAM,CAAC,MAAM,sCAAsC,GAAG,EAAE,CAAC;AAEzD,oEAAoE;AACpE,MAAM,CAAC,MAAM,0CAA0C,GAAG,EAAE,CAAC;AAE7D;;;;GAIG;AACH,MAAM,CAAC,MAAM,+BAA+B,GAAG,CAAC,CAAC;AAEjD,qEAAqE;AAErE,qDAAqD;AACrD,MAAM,CAAC,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GAAG,GAAG,IAAI,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;QAClC,MAAM,MAAM,GAAG,CAAC,GAAG,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,yBAAyB,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC;QAC/E,MAAM,OAAO,GAAG,IAAI,GAAG,MAAM,CAAC;QAC9B,IAAI,OAAO,IAAI,MAAM,EAAE,CAAC;YACpB,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;YACf,IAAI,GAAG,OAAO,CAAC;YACf,SAAS;QACb,CAAC;QACD,IAAI,GAAG,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YACnB,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;YACf,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC;YAClB,SAAS;QACb,CAAC;QACD,MAAM,QAAQ,GAAG,OAAO,GAAG,MAAM,CAAC;QAClC,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,GAAG,wBAAwB,CAAC;QACpD,IAAI,CAAC,QAAQ,IAAI,QAAQ,IAAI,KAAK,EAAE,CAAC;YACjC,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;YACf,IAAI,GAAG,OAAO,CAAC;YACf,MAAM,GAAG,OAAO,CAAC;YACjB,QAAQ,GAAG,IAAI,CAAC;YAChB,SAAS;QACb,CAAC;QACD,IAAI,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC;QAClB,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC;QAClB,MAAM,GAAG,cAAc,CAAC;IAC5B,CAAC;IACD,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC;AAC9B,CAAC"}
@@ -0,0 +1,13 @@
1
+ import type { ArrowEnd } from './edge-routing.js';
2
+ import type { PositionedGroup, PositionedItem, PositionedParallel } from './types.js';
3
+ /** An item as an arrow end. */
4
+ export declare function itemArrowEnd(item: PositionedItem, bandwidth: number): ArrowEnd;
5
+ /** A group or parallel as an arrow source: its box spans exactly its dates. */
6
+ export declare function containerArrowEnd(container: PositionedGroup | PositionedParallel): ArrowEnd;
7
+ /**
8
+ * Y where a milestone slack line leaves `item`: the row's nominal midline,
9
+ * or the progress strip's center when the caption spilled (so the line
10
+ * runs under the spilled title / meta text). Its x is the item's end date.
11
+ */
12
+ export declare function itemSlackAttachY(item: PositionedItem, bandwidth: number): number;
13
+ //# sourceMappingURL=item-port-geometry.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"item-port-geometry.d.ts","sourceRoot":"","sources":["../src/item-port-geometry.ts"],"names":[],"mappings":"AAwBA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAElD,OAAO,KAAK,EAAE,eAAe,EAAE,cAAc,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAOtF,+BAA+B;AAC/B,wBAAgB,YAAY,CAAC,IAAI,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,GAAG,QAAQ,CAY9E;AAED,+EAA+E;AAC/E,wBAAgB,iBAAiB,CAAC,SAAS,EAAE,eAAe,GAAG,kBAAkB,GAAG,QAAQ,CAU3F;AAED;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,GAAG,MAAM,CAEhF"}
@@ -0,0 +1,63 @@
1
+ // Arrow ends: where dependency arrows and milestone slack lines meet an
2
+ // item bar or a container.
3
+ //
4
+ // Every end is a pure function of the entity's FINAL geometry (its box,
5
+ // plus an item's `dateSpan` and the row bandwidth), read when the arrows
6
+ // are built, never captured while the entity is placed. Layout moves
7
+ // placed content down afterwards (a marker band that outgrows its sizing
8
+ // pushes the whole chart down), and a port captured at placement time
9
+ // would stay behind at the old y. Nothing moves horizontally, so the
10
+ // dates in x an item records at placement stay true.
11
+ //
12
+ // Rules (specs/true-width-layout.md §3.4, §3.5):
13
+ //
14
+ // - x comes from the dates: the router puts the port in the middle of
15
+ // the source's last day and the target's first day (`edge-routing.ts`).
16
+ // - y comes from the painted edges: top and bottom of the bar, or of the
17
+ // container (its header's top to its body's bottom).
18
+ // - On its own row an arrow runs at the row's NOMINAL midline,
19
+ // `box.y + bandwidth / 2`, so a bar grown by a wrapped title or a chip
20
+ // column shares the line with its un-grown row neighbours. A source
21
+ // whose caption spills right leaves at the centre of its bottom
22
+ // progress strip instead, so the leg runs under the caption; milestone
23
+ // slack lines leave on the same y.
24
+ import { PROGRESS_STRIP_HEIGHT_PX } from './themes/shared.js';
25
+ /** Y of the bottom progress strip's vertical center. */
26
+ function progressStripMidY(item) {
27
+ return item.box.y + item.box.height - PROGRESS_STRIP_HEIGHT_PX / 2;
28
+ }
29
+ /** An item as an arrow end. */
30
+ export function itemArrowEnd(item, bandwidth) {
31
+ const { box } = item;
32
+ return {
33
+ startX: item.dateSpan.startX,
34
+ endX: item.dateSpan.endX,
35
+ paintedX: box.x,
36
+ paintedWidth: box.width,
37
+ top: box.y,
38
+ bottom: box.y + box.height,
39
+ rowY: box.y + bandwidth / 2,
40
+ exitY: itemSlackAttachY(item, bandwidth),
41
+ };
42
+ }
43
+ /** A group or parallel as an arrow source: its box spans exactly its dates. */
44
+ export function containerArrowEnd(container) {
45
+ const { box } = container;
46
+ return {
47
+ startX: box.x,
48
+ endX: box.x + box.width,
49
+ paintedX: box.x,
50
+ paintedWidth: box.width,
51
+ top: box.y,
52
+ bottom: box.y + box.height,
53
+ };
54
+ }
55
+ /**
56
+ * Y where a milestone slack line leaves `item`: the row's nominal midline,
57
+ * or the progress strip's center when the caption spilled (so the line
58
+ * runs under the spilled title / meta text). Its x is the item's end date.
59
+ */
60
+ export function itemSlackAttachY(item, bandwidth) {
61
+ return item.textSpills ? progressStripMidY(item) : item.box.y + bandwidth / 2;
62
+ }
63
+ //# sourceMappingURL=item-port-geometry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"item-port-geometry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