@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 -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B,UAAU,EAAE,mBAAmB,EAAE,CAAC;IAClC,KAAK,EAAE,wBAAwB,EAAE,CAAC;IAClC,SAAS,EAAE,sBAAsB,CAAC;IAClC,QAAQ,EAAE,uBAAuB,EAAE,CAAC;IAEpC,QAAQ,EAAE,WAAW,CAAC;IACtB;;;;OAIG;IACH,SAAS,CAAC,EAAE;QAAE,MAAM,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,OAAO,CAAA;KAAE,CAAC;IAChD,oFAAoF;IACpF,KAAK,CAAC,EAAE,cAAc,EAAE,CAAC;IACzB,uEAAuE;IACvE,cAAc,CAAC,EAAE,sBAAsB,EAAE,CAAC;IAC1C,mFAAmF;IACnF,aAAa,CAAC,EAAE,sBAAsB,EAAE,CAAC;IACzC,2EAA2E;IAC3E,UAAU,CAAC,EAAE,oBAAoB,CAAC;CACrC"}
@@ -1,7 +1,7 @@
1
1
  import type { NowlineFile, ScaleBlock } from '@nowline/core';
2
2
  import type { TimeScale } from './time-scale.js';
3
- import type { PositionedTick } from './types.js';
4
- import type { WorkingCalendar } from './working-calendar.js';
3
+ import type { PositionedNonWorkingRun, PositionedTick, PositionedWorkingException } from './types.js';
4
+ import { type NonWorkingRun, type WorkingCalendar, type WorkingExceptionRun } from './working-calendar.js';
5
5
  export type ScaleUnit = 'days' | 'weeks' | 'months' | 'quarters' | 'years';
6
6
  export interface ViewPreset {
7
7
  /** Tick stride unit (each tick is one `unit` apart). */
@@ -10,14 +10,69 @@ export interface ViewPreset {
10
10
  labelEvery: number;
11
11
  /** Pixels per `1 unit` worth of working days. */
12
12
  pixelsPerUnit: number;
13
+ /**
14
+ * Set when `labelEvery` came from the default thinning
15
+ * (`LABEL_THINNING`) rather than a `scale:` literal or `label-every:`.
16
+ * Under `hide` the default days thinning labels week starts instead.
17
+ */
18
+ labelEveryDefault?: true;
13
19
  }
14
20
  export type ScaleConfig = ViewPreset;
15
21
  export declare function resolveScale(file: NowlineFile, scaleBlock: ScaleBlock | undefined): ViewPreset;
16
22
  /**
17
- * Build header ticks for the chart. The ith tick sits at
18
- * `originX + i * stridePx`. The last tick is rendered (so the chart
19
- * has a closing edge) but its label is suppressed because there's no
20
- * following column.
23
+ * Day offset from `start` of the first tick boundary at or after
24
+ * `start + days`. Used to pad the date window so the chart's right
25
+ * edge lands on a column boundary. Day and week units round up to a
26
+ * multiple of the fixed stride (`tickDays`); month, quarter, and year
27
+ * units round up to the next real month / quarter / year start.
28
+ *
29
+ * With a `calendar` that has non-working days, `days` and the result
30
+ * are working-day indices (specs/working-calendar.md §7.2): the content
31
+ * ends before the first date whose index is `ceil(days)`, and the
32
+ * boundary is the first day, week start or unit start at or after it.
33
+ * A zero or negative count pads to the start (index 0) for days and
34
+ * weeks, and to the first unit start at or after the start otherwise.
35
+ */
36
+ export declare function tickBoundaryAtOrAfter(start: Date, days: number, unit: ScaleUnit, tickDays: number, calendar?: WorkingCalendar): number;
37
+ /**
38
+ * Build header ticks for the chart. The last tick is rendered (so the
39
+ * chart has a closing edge) but its label is suppressed because there's
40
+ * no following column.
41
+ *
42
+ * Day and week ticks use a fixed stride: the ith tick sits at
43
+ * `originX + i * stridePx`. Month, quarter, and year ticks sit on real
44
+ * calendar boundaries; see `buildCalendarAlignedTicks`. When the scale's
45
+ * calendar has non-working days the axis hides them and every unit
46
+ * takes the boundary path; see `buildHiddenDayTicks`.
21
47
  */
22
48
  export declare function buildHeaderTicks(scale: TimeScale, preset: ViewPreset, calendar: WorkingCalendar, locale?: string): PositionedTick[];
49
+ /**
50
+ * The window's non-working runs for the model (specs/working-calendar.md
51
+ * §7.5), or undefined when the window holds no non-working day (always
52
+ * the case on the identity path). Under `hide` a run has zero width at the
53
+ * x of the next working day. At the days scale a run is marked `seam` when
54
+ * it lies strictly inside the chart and no grid line falls at its x: no
55
+ * major tick there, and no tick at all when the minor grid is on. Under
56
+ * `show` a run spans its days instead; see `shownNonWorkingRun`.
57
+ */
58
+ export declare function buildNonWorkingRuns(scale: TimeScale, ticks: ReadonlyArray<PositionedTick>, unit: ScaleUnit, minorGrid: boolean): PositionedNonWorkingRun[] | undefined;
59
+ /**
60
+ * The window's working exceptions for the model (specs/working-calendar.md
61
+ * §7.4), or undefined when there are none. Each sits at its first day's x,
62
+ * the same under either view since a working day always has width, clamped
63
+ * to the window for a run that starts before it.
64
+ */
65
+ export declare function buildWorkingExceptions(scale: TimeScale): PositionedWorkingException[] | undefined;
66
+ /**
67
+ * The marker-row label of a working exception: its titles joined with `, `,
68
+ * then ` · +Nd` for the N days it puts back, every day of the run.
69
+ */
70
+ export declare function workingExceptionLabel(run: Pick<WorkingExceptionRun, 'from' | 'through' | 'titles'>): string;
71
+ /**
72
+ * The marker-row label of a titled run (specs/working-calendar.md §7.4):
73
+ * its titles joined with `, `, then ` · Nd`, where N counts the days of
74
+ * `[from, through]` the open-ended week would work, so the closure's cost
75
+ * reads in the DSL's working-day `d`. The suffix is dropped when N is 0.
76
+ */
77
+ export declare function nonWorkingRunLabel(run: Pick<NonWorkingRun, 'from' | 'through' | 'titles'>, workingWeekdays: ReadonlySet<number>): string;
23
78
  //# sourceMappingURL=view-preset.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"view-preset.d.ts","sourceRoot":"","sources":["../src/view-preset.ts"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAI7D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AACjD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AACjD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAE7D,MAAM,MAAM,SAAS,GAAG,MAAM,GAAG,OAAO,GAAG,QAAQ,GAAG,UAAU,GAAG,OAAO,CAAC;AAE3E,MAAM,WAAW,UAAU;IACvB,wDAAwD;IACxD,IAAI,EAAE,SAAS,CAAC;IAChB,gEAAgE;IAChE,UAAU,EAAE,MAAM,CAAC;IACnB,iDAAiD;IAC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AAK,EAAE,IAAI,EACX,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,SAAS,EACf,QAAQ,EAAE,MAAM,EAChB,QAAQ,CAAC,EAAE,eAAe,GAC3B,MAAM,CAmBR;AAqBD;;;;;;;;;;GAUG;AACH,wBAAgB,gBAAgB,CAC5B,KAAK,EAAE,SAAS,EAChB,MAAM,EAAE,UAAU,EAClB,QAAQ,EAAE,eAAe,EACzB,MAAM,GAAE,MAAuB,GAChC,cAAc,EAAE,CA4BlB;AA6LD;;;;;;;;GAQG;AACH,wBAAgB,mBAAmB,CAC/B,KAAK,EAAE,SAAS,EAChB,KAAK,EAAE,aAAa,CAAC,cAAc,CAAC,EACpC,IAAI,EAAE,SAAS,EACf,SAAS,EAAE,OAAO,GACnB,uBAAuB,EAAE,GAAG,SAAS,CA0BvC;AAED;;;;;GAKG;AACH,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,SAAS,GAAG,0BAA0B,EAAE,GAAG,SAAS,CAWjG;AAED;;;GAGG;AACH,wBAAgB,qBAAqB,CACjC,GAAG,EAAE,IAAI,CAAC,mBAAmB,EAAE,MAAM,GAAG,SAAS,GAAG,QAAQ,CAAC,GAC9D,MAAM,CAGR;AAKD;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAC9B,GAAG,EAAE,IAAI,CAAC,aAAa,EAAE,MAAM,GAAG,SAAS,GAAG,QAAQ,CAAC,EACvD,eAAe,EAAE,WAAW,CAAC,MAAM,CAAC,GACrC,MAAM,CAOR"}
@@ -5,17 +5,21 @@
5
5
  //
6
6
  // `resolveScale` parses the DSL `scale:` property (and any nested
7
7
  // `scale` block) into a `ViewPreset`. `buildHeaderTicks` produces
8
- // the `PositionedTick[]` byte-stable with the legacy generator: same
9
- // x positions, same labelX positions, same major/minor flags, same
10
- // label text.
11
- import { addDays } from './calendar.js';
8
+ // the `PositionedTick[]`. Day and week ticks keep the legacy fixed
9
+ // stride (byte-stable with the legacy generator); month, quarter, and
10
+ // year ticks sit on real calendar boundaries, because a fixed day
11
+ // count (30d, 22d, 65d, ...) drifts across month edges and mislabels
12
+ // columns once the span runs long enough. Under a calendar with
13
+ // non-working days (`hide`) every unit takes real boundaries: days,
14
+ // week starts, or unit starts on the working-day axis.
15
+ import { findProp } from '@nowline/core/internal';
16
+ import { addDays, daysBetween } from './calendar.js';
12
17
  import { DEFAULT_LOCALE, localeStrings } from './i18n.js';
13
- import { DEFAULT_PIXELS_PER_DAY, LABEL_THINNING } from './themes/shared.js';
14
- function stripColon(key) {
15
- return key.endsWith(':') ? key.slice(0, -1) : key;
16
- }
18
+ import { estimateTextWidth } from './text-measure.js';
19
+ import { DEFAULT_PIXELS_PER_DAY, LABEL_THINNING, TIMELINE_TICK_LABEL_FONT_SIZE_PX, } from './themes/shared.js';
20
+ import { continuousDaysPerUnit, } from './working-calendar.js';
17
21
  export function resolveScale(file, scaleBlock) {
18
- const scaleProp = file.roadmapDecl?.properties.find((p) => stripColon(p.key) === 'scale');
22
+ const scaleProp = findProp(file.roadmapDecl?.properties ?? [], 'scale');
19
23
  // `scale:` accepts a unit name (`days`/`weeks`/`months`/`quarters`/`years`)
20
24
  // OR a duration literal (`1w`, `2w`, `1m`, `1q`, `1y`). The literal form
21
25
  // is the documented default in the DSL spec; it picks the unit and uses
@@ -61,23 +65,25 @@ export function resolveScale(file, scaleBlock) {
61
65
  }
62
66
  }
63
67
  const defaultLabelEvery = labelEveryOverride ?? LABEL_THINNING[unit] ?? 4;
68
+ // Spread into the result only when the thinning is the default one.
69
+ const defaultFlag = (hasLabelEvery) => labelEveryOverride === undefined && !hasLabelEvery ? { labelEveryDefault: true } : {};
64
70
  if (scaleBlock) {
65
- const unitProp = scaleBlock.properties.find((p) => stripColon(p.key) === 'unit');
66
- const resolvedUnit = unitProp?.value ?? unit;
67
- const labelProp = scaleBlock.properties.find((p) => stripColon(p.key) === 'label-every');
68
- const pxProp = scaleBlock.properties.find((p) => stripColon(p.key) === 'pixels-per-unit');
69
- const labelEvery = labelProp
70
- ? Math.max(1, parseInt(labelProp.value, 10) || defaultLabelEvery)
71
- : defaultLabelEvery;
72
- const pixelsPerUnit = pxProp
73
- ? Math.max(1, parseInt(pxProp.value, 10) || unitPx(resolvedUnit))
74
- : (pixelsPerUnitOverride ?? unitPx(resolvedUnit));
75
- return { unit: resolvedUnit, labelEvery, pixelsPerUnit };
71
+ // Unit and column width come from `scale:` alone; the block only sets display.
72
+ const labelProp = findProp(scaleBlock.properties, 'label-every');
73
+ const explicitLabelEvery = labelProp ? parseInt(labelProp.value, 10) || 0 : 0;
74
+ const labelEvery = explicitLabelEvery !== 0 ? Math.max(1, explicitLabelEvery) : defaultLabelEvery;
75
+ return {
76
+ unit,
77
+ labelEvery,
78
+ pixelsPerUnit: pixelsPerUnitOverride ?? unitPx(unit),
79
+ ...defaultFlag(explicitLabelEvery !== 0),
80
+ };
76
81
  }
77
82
  return {
78
83
  unit,
79
84
  labelEvery: defaultLabelEvery,
80
85
  pixelsPerUnit: pixelsPerUnitOverride ?? unitPx(unit),
86
+ ...defaultFlag(false),
81
87
  };
82
88
  }
83
89
  function unitPx(unit) {
@@ -96,13 +102,113 @@ function unitPx(unit) {
96
102
  return 320;
97
103
  }
98
104
  }
105
+ /** Half a pixel: a column this close to a full unit counts as full. */
106
+ const NARROW_COLUMN_TOLERANCE_PX = 0.5;
107
+ /** Two working-day boundaries closer than this share one grid line. */
108
+ const SAME_X_TOLERANCE_PX = 0.5;
109
+ const DAYS_PER_WEEK = 7;
110
+ // Months, quarters, and years vary in length (28-31d, 90-92d,
111
+ // 365-366d), so their ticks follow the real calendar instead of the
112
+ // `calendar:` preset's `days-per-*` count. That count is duration
113
+ // arithmetic for `1m` / `1q` / `1y` literals, not the length of a
114
+ // month on the date axis.
115
+ function isCalendarAligned(unit) {
116
+ return unit === 'months' || unit === 'quarters' || unit === 'years';
117
+ }
118
+ /** First month / quarter / year start strictly after `date` (UTC). */
119
+ function nextUnitStart(date, unit) {
120
+ const year = date.getUTCFullYear();
121
+ const month = date.getUTCMonth();
122
+ switch (unit) {
123
+ case 'months':
124
+ return new Date(Date.UTC(year, month + 1, 1));
125
+ case 'quarters':
126
+ return new Date(Date.UTC(year, month - (month % 3) + 3, 1));
127
+ case 'years':
128
+ return new Date(Date.UTC(year + 1, 0, 1));
129
+ }
130
+ }
131
+ function isUnitStart(date, unit) {
132
+ if (date.getUTCDate() !== 1)
133
+ return false;
134
+ const month = date.getUTCMonth();
135
+ switch (unit) {
136
+ case 'months':
137
+ return true;
138
+ case 'quarters':
139
+ return month % 3 === 0;
140
+ case 'years':
141
+ return month === 0;
142
+ }
143
+ }
144
+ /**
145
+ * Day offset from `start` of the first tick boundary at or after
146
+ * `start + days`. Used to pad the date window so the chart's right
147
+ * edge lands on a column boundary. Day and week units round up to a
148
+ * multiple of the fixed stride (`tickDays`); month, quarter, and year
149
+ * units round up to the next real month / quarter / year start.
150
+ *
151
+ * With a `calendar` that has non-working days, `days` and the result
152
+ * are working-day indices (specs/working-calendar.md §7.2): the content
153
+ * ends before the first date whose index is `ceil(days)`, and the
154
+ * boundary is the first day, week start or unit start at or after it.
155
+ * A zero or negative count pads to the start (index 0) for days and
156
+ * weeks, and to the first unit start at or after the start otherwise.
157
+ */
158
+ export function tickBoundaryAtOrAfter(start, days, unit, tickDays, calendar) {
159
+ // `days` can arrive from pixel arithmetic (`x / pixelsPerDay`), so
160
+ // absorb float noise before rounding up; otherwise content that ends
161
+ // exactly on a boundary would pad out a whole extra column.
162
+ const count = Math.ceil(days - 1e-6);
163
+ if (calendar?.hasNonWorkingDays) {
164
+ if (!isCalendarAligned(unit) && count <= 0)
165
+ return 0;
166
+ const contentEnd = count <= 0 ? start : addDays(calendar.dateAtWorkingIndex(start, count - 1), 1);
167
+ const boundary = isCalendarAligned(unit)
168
+ ? unitStartAtOrAfter(contentEnd, unit)
169
+ : unit === 'weeks'
170
+ ? weekStartAtOrAfter(contentEnd, start, calendar.weekStart)
171
+ : contentEnd;
172
+ return calendar.workingIndexOf(start, boundary);
173
+ }
174
+ if (!isCalendarAligned(unit))
175
+ return Math.ceil(days / tickDays) * tickDays;
176
+ const target = addDays(start, count);
177
+ return daysBetween(start, unitStartAtOrAfter(target, unit));
178
+ }
179
+ function unitStartAtOrAfter(date, unit) {
180
+ return isUnitStart(date, unit) ? date : nextUnitStart(date, unit);
181
+ }
182
+ /**
183
+ * The first week start at or after `date`: the calendar's `weekStart`
184
+ * weekday, or, with none, a 7-day stride from the window start.
185
+ */
186
+ function weekStartAtOrAfter(date, windowStart, weekStart) {
187
+ const offset = weekStart === undefined ? -daysBetween(windowStart, date) : weekStart - date.getUTCDay();
188
+ return addDays(date, ((offset % DAYS_PER_WEEK) + DAYS_PER_WEEK) % DAYS_PER_WEEK);
189
+ }
190
+ /** The first week start strictly after `date`; see `weekStartAtOrAfter`. */
191
+ function nextWeekStart(date, windowStart, weekStart) {
192
+ return weekStartAtOrAfter(addDays(date, 1), windowStart, weekStart);
193
+ }
99
194
  /**
100
- * Build header ticks for the chart. The ith tick sits at
101
- * `originX + i * stridePx`. The last tick is rendered (so the chart
102
- * has a closing edge) but its label is suppressed because there's no
103
- * following column.
195
+ * Build header ticks for the chart. The last tick is rendered (so the
196
+ * chart has a closing edge) but its label is suppressed because there's
197
+ * no following column.
198
+ *
199
+ * Day and week ticks use a fixed stride: the ith tick sits at
200
+ * `originX + i * stridePx`. Month, quarter, and year ticks sit on real
201
+ * calendar boundaries; see `buildCalendarAlignedTicks`. When the scale's
202
+ * calendar has non-working days the axis hides them and every unit
203
+ * takes the boundary path; see `buildHiddenDayTicks`.
104
204
  */
105
205
  export function buildHeaderTicks(scale, preset, calendar, locale = DEFAULT_LOCALE) {
206
+ if (scale.calendar?.hasNonWorkingDays) {
207
+ return buildHiddenDayTicks(scale, preset, scale.calendar, locale);
208
+ }
209
+ if (isCalendarAligned(preset.unit)) {
210
+ return buildCalendarAlignedTicks(scale, preset, preset.unit, locale);
211
+ }
106
212
  const dayPerTick = calendar.daysPerUnit(preset.unit);
107
213
  const stridePx = dayPerTick * scale.pixelsPerDay;
108
214
  const totalDays = Math.max(1, Math.round(scale.widthPx / scale.pixelsPerDay));
@@ -124,6 +230,315 @@ export function buildHeaderTicks(scale, preset, calendar, locale = DEFAULT_LOCAL
124
230
  }
125
231
  return ticks;
126
232
  }
233
+ /**
234
+ * Ticks under `hide` (specs/working-calendar.md §7.2). Candidate
235
+ * boundaries are the window start plus every day (days), every week start
236
+ * (weeks), or every unit start (months and up), and the window end always
237
+ * closes the axis; x comes from the working-day scale, so a boundary on a
238
+ * hidden day shares the next working day's x. A column of zero width is
239
+ * dropped with its label.
240
+ *
241
+ * Thinning counts the kept columns. Under the default days thinning the
242
+ * majors are the week starts instead (the first tick only when it is
243
+ * one); under `hide` that is the first working day of each week, so a
244
+ * hidden Monday moves its week's label to Tuesday. The closing tick never
245
+ * has a label; its `major` flag follows the same rule, as on the
246
+ * fixed-stride path.
247
+ *
248
+ * At days and weeks a label is dropped only when it is wider than its
249
+ * column and the column is narrower than a full unit (a partial week at
250
+ * either edge); a full business week keeps a label wider than its 40 px.
251
+ * Months and up keep the #92 rule: an edge column drops a label it cannot
252
+ * hold. A dropped label keeps its `labelX`. Inside a run of two or more
253
+ * narrowed columns, a dropped label is restored when it fits its column
254
+ * plus half of each neighbour whose label is absent; see
255
+ * `restoreLabelsInNarrowRuns`.
256
+ *
257
+ * Under `show` the same boundaries apply on the calendar-day scale, so no
258
+ * column has zero width: week ticks still fall on week starts, a full unit
259
+ * counts calendar days, and at months and up a closing column with no
260
+ * working day merges into the one before it.
261
+ */
262
+ function buildHiddenDayTicks(scale, preset, calendar, locale) {
263
+ const { unit } = preset;
264
+ const [start, end] = scale.domain;
265
+ const next = (date) => {
266
+ if (isCalendarAligned(unit))
267
+ return nextUnitStart(date, unit);
268
+ if (unit === 'weeks')
269
+ return nextWeekStart(date, start, calendar.weekStart);
270
+ return addDays(date, 1);
271
+ };
272
+ const candidates = [start];
273
+ for (let d = next(start); d < end; d = next(d))
274
+ candidates.push(d);
275
+ // Keep the boundaries that open a column of positive width.
276
+ const endX = scale.forward(end);
277
+ const kept = [];
278
+ candidates.forEach((date, i) => {
279
+ const x = scale.forward(date);
280
+ const nextX = i + 1 < candidates.length ? scale.forward(candidates[i + 1]) : endX;
281
+ if (nextX > x && !isShownEmptyClosingColumn(scale, unit, candidates, i)) {
282
+ kept.push({ date, x });
283
+ }
284
+ });
285
+ const weekStartMajors = unit === 'days' && preset.labelEveryDefault === true && calendar.weekStart !== undefined;
286
+ const isMajor = (date, column) => weekStartMajors
287
+ ? isFirstVisibleDayOfWeek(date, calendar, scale.showsNonWorking)
288
+ : column % preset.labelEvery === 0;
289
+ // A full unit is its working days under `hide` and its calendar days
290
+ // under `show`, where every day has width.
291
+ const fullUnitDays = scale.showsNonWorking
292
+ ? continuousDaysPerUnit(unit)
293
+ : calendar.daysPerUnit(unit);
294
+ const fullUnitPx = fullUnitDays * scale.pixelsPerDay;
295
+ const columns = kept.map(({ date, x }, column) => {
296
+ const columnPx = (column + 1 < kept.length ? kept[column + 1].x : endX) - x;
297
+ const major = isMajor(date, column);
298
+ const label = major ? formatTickLabel(unit, date, column, locale) : undefined;
299
+ const labelPx = label === undefined ? 0 : estimateTextWidth(label, TIMELINE_TICK_LABEL_FONT_SIZE_PX);
300
+ const isNarrowed = isCalendarAligned(unit)
301
+ ? column === 0 || column === kept.length - 1
302
+ : columnPx < fullUnitPx - NARROW_COLUMN_TOLERANCE_PX;
303
+ const isShown = label !== undefined && !(labelPx > columnPx && isNarrowed);
304
+ return { x, columnPx, major, label, labelPx, isNarrowed, isShown };
305
+ });
306
+ if (!isCalendarAligned(unit))
307
+ restoreLabelsInNarrowRuns(columns);
308
+ const ticks = columns.map((c) => ({
309
+ x: c.x,
310
+ labelX: c.x + c.columnPx / 2,
311
+ major: c.major,
312
+ label: c.isShown ? c.label : undefined,
313
+ }));
314
+ if (end > start) {
315
+ ticks.push({
316
+ x: endX,
317
+ labelX: undefined,
318
+ major: isMajor(end, kept.length),
319
+ label: undefined,
320
+ });
321
+ }
322
+ return ticks;
323
+ }
324
+ /**
325
+ * Days and weeks: inside a run of two or more consecutive narrowed
326
+ * columns (specs/working-calendar.md §7.2), a label the narrow-column rule
327
+ * dropped comes back when, centred on its column, it fits the column plus
328
+ * half of each neighbouring column whose label is absent (thinned or
329
+ * dropped). A neighbour with a label, or the chart edge, lends nothing.
330
+ *
331
+ * A bounded recurrence (Summer Fridays) narrows every week in its window,
332
+ * so dropping each label blanks the axis for the whole stretch. Read left
333
+ * to right, the run's labels alternate instead: the first one after a
334
+ * labelled full week stays dropped, the next borrows from it, and so on.
335
+ * A label that needs to borrow cannot sit next to a restored one, so the
336
+ * greedy pass never has to revisit a decision.
337
+ *
338
+ * A lone narrowed column (one holiday week) is not a run and keeps the
339
+ * plain rule. So does a run of two at `label-every` 1: each of its columns
340
+ * has a labelled full week on one side.
341
+ */
342
+ function restoreLabelsInNarrowRuns(columns) {
343
+ const roomBeside = (j) => {
344
+ const neighbour = columns[j];
345
+ if (neighbour === undefined || neighbour.isShown)
346
+ return 0;
347
+ return neighbour.columnPx / 2;
348
+ };
349
+ columns.forEach((c, i) => {
350
+ if (c.label === undefined || c.isShown || !c.isNarrowed)
351
+ return;
352
+ const isInRun = columns[i - 1]?.isNarrowed === true || columns[i + 1]?.isNarrowed === true;
353
+ if (!isInRun)
354
+ return;
355
+ const halfLabel = c.labelPx / 2;
356
+ const halfColumn = c.columnPx / 2;
357
+ c.isShown =
358
+ halfLabel <= halfColumn + roomBeside(i - 1) &&
359
+ halfLabel <= halfColumn + roomBeside(i + 1);
360
+ });
361
+ }
362
+ /**
363
+ * The days scale's default majors: a week start (the recurring weekend's
364
+ * next day). Under `hide` a hidden week start has no column, so the week's
365
+ * first working day takes its label instead: a Monday holiday, or a
366
+ * recurrence that takes Mondays out for a stretch, would otherwise leave
367
+ * those weeks unlabelled.
368
+ */
369
+ function isFirstVisibleDayOfWeek(date, calendar, showsNonWorking) {
370
+ const weekStart = calendar.weekStart;
371
+ if (showsNonWorking)
372
+ return date.getUTCDay() === weekStart;
373
+ const sinceWeekStart = (date.getUTCDay() - weekStart + DAYS_PER_WEEK) % DAYS_PER_WEEK;
374
+ for (let back = 1; back <= sinceWeekStart; back++) {
375
+ if (calendar.isWorkingDay(addDays(date, -back)))
376
+ return false;
377
+ }
378
+ return true;
379
+ }
380
+ /**
381
+ * True under `show` for the last candidate boundary at months and up when
382
+ * its closing column holds no working day (a Sunday Feb 1 before a window
383
+ * that ends Mon Feb 2). That column is merged into the one before it, as
384
+ * `hide` drops it for having zero width. A leading sliver keeps its tick.
385
+ */
386
+ function isShownEmptyClosingColumn(scale, unit, candidates, i) {
387
+ const calendar = scale.calendar;
388
+ if (!scale.showsNonWorking || !calendar || !isCalendarAligned(unit))
389
+ return false;
390
+ if (i === 0 || i !== candidates.length - 1)
391
+ return false;
392
+ const [start, end] = scale.domain;
393
+ return calendar.workingIndexOf(start, candidates[i]) >= calendar.workingIndexOf(start, end);
394
+ }
395
+ /**
396
+ * The window's non-working runs for the model (specs/working-calendar.md
397
+ * §7.5), or undefined when the window holds no non-working day (always
398
+ * the case on the identity path). Under `hide` a run has zero width at the
399
+ * x of the next working day. At the days scale a run is marked `seam` when
400
+ * it lies strictly inside the chart and no grid line falls at its x: no
401
+ * major tick there, and no tick at all when the minor grid is on. Under
402
+ * `show` a run spans its days instead; see `shownNonWorkingRun`.
403
+ */
404
+ export function buildNonWorkingRuns(scale, ticks, unit, minorGrid) {
405
+ const calendar = scale.calendar;
406
+ if (!calendar?.hasNonWorkingDays)
407
+ return undefined;
408
+ const runs = calendar.nonWorkingRuns(scale.domain[0], scale.domain[1]);
409
+ if (runs.length === 0)
410
+ return undefined;
411
+ const [left, right] = scale.range;
412
+ if (scale.showsNonWorking)
413
+ return runs.map((run) => shownNonWorkingRun(scale, run, unit));
414
+ const hasGridLineAt = (x) => ticks.some((t) => Math.abs(t.x - x) < SAME_X_TOLERANCE_PX && (t.major || minorGrid));
415
+ return runs.map((run) => {
416
+ const x = scale.forward(run.from);
417
+ const out = {
418
+ x,
419
+ width: scale.forward(addDays(run.through, 1)) - x,
420
+ from: run.from,
421
+ through: run.through,
422
+ };
423
+ if (run.titles.length > 0) {
424
+ out.titles = run.titles;
425
+ out.label = nonWorkingRunLabel(run, calendar.workingWeekdays);
426
+ out.cut = true;
427
+ }
428
+ const isInside = x - left > SAME_X_TOLERANCE_PX && right - x > SAME_X_TOLERANCE_PX;
429
+ if (unit === 'days' && isInside && !hasGridLineAt(x))
430
+ out.seam = true;
431
+ return out;
432
+ });
433
+ }
434
+ /**
435
+ * The window's working exceptions for the model (specs/working-calendar.md
436
+ * §7.4), or undefined when there are none. Each sits at its first day's x,
437
+ * the same under either view since a working day always has width, clamped
438
+ * to the window for a run that starts before it.
439
+ */
440
+ export function buildWorkingExceptions(scale) {
441
+ const runs = scale.calendar?.workingExceptionRuns(scale.domain[0], scale.domain[1]) ?? [];
442
+ if (runs.length === 0)
443
+ return undefined;
444
+ const [left] = scale.range;
445
+ return runs.map((run) => ({
446
+ x: Math.max(left, scale.forward(run.from)),
447
+ from: run.from,
448
+ through: run.through,
449
+ titles: run.titles,
450
+ label: workingExceptionLabel(run),
451
+ }));
452
+ }
453
+ /**
454
+ * The marker-row label of a working exception: its titles joined with `, `,
455
+ * then ` · +Nd` for the N days it puts back, every day of the run.
456
+ */
457
+ export function workingExceptionLabel(run) {
458
+ const days = daysBetween(run.from, run.through) + 1;
459
+ return `${run.titles.join(', ')}${RUN_LABEL_DAY_SEPARATOR}+${days}d`;
460
+ }
461
+ /** Separator between a run's titles and its day count: U+00B7 with a space each side. */
462
+ const RUN_LABEL_DAY_SEPARATOR = ' \u00b7 ';
463
+ /**
464
+ * The marker-row label of a titled run (specs/working-calendar.md §7.4):
465
+ * its titles joined with `, `, then ` · Nd`, where N counts the days of
466
+ * `[from, through]` the open-ended week would work, so the closure's cost
467
+ * reads in the DSL's working-day `d`. The suffix is dropped when N is 0.
468
+ */
469
+ export function nonWorkingRunLabel(run, workingWeekdays) {
470
+ let workingDays = 0;
471
+ for (let day = run.from; day <= run.through; day = addDays(day, 1)) {
472
+ if (workingWeekdays.has(day.getUTCDay()))
473
+ workingDays++;
474
+ }
475
+ const text = run.titles.join(', ');
476
+ return workingDays > 0 ? `${text}${RUN_LABEL_DAY_SEPARATOR}${workingDays}d` : text;
477
+ }
478
+ /**
479
+ * A run under `show` (specs/working-calendar.md §7.3): it spans its days,
480
+ * clamped to the window, and never has a seam. At the days and weeks
481
+ * scales, or when it has titles, it is flagged `band` for the renderer to
482
+ * shade; a plain weekend at months and up stays unpainted.
483
+ */
484
+ function shownNonWorkingRun(scale, run, unit) {
485
+ const [left, right] = scale.range;
486
+ const x = Math.max(left, scale.forward(run.from));
487
+ const rightX = Math.min(right, scale.forward(addDays(run.through, 1)));
488
+ const out = {
489
+ x,
490
+ width: rightX - x,
491
+ from: run.from,
492
+ through: run.through,
493
+ };
494
+ if (run.titles.length > 0) {
495
+ out.titles = run.titles;
496
+ if (scale.calendar)
497
+ out.label = nonWorkingRunLabel(run, scale.calendar.workingWeekdays);
498
+ }
499
+ if (unit === 'days' || unit === 'weeks' || run.titles.length > 0)
500
+ out.band = true;
501
+ return out;
502
+ }
503
+ /**
504
+ * Ticks at the chart's left edge, every real month / quarter / year
505
+ * start inside the window, and the chart's right edge. The first and
506
+ * last columns can be partial (a roadmap starting Jan 5 opens with a
507
+ * Jan 5 - Feb 1 column); each column is labelled from its own start
508
+ * date, so a partial column still names the month it sits in.
509
+ * Thinning (`labelEvery`) counts ticks from the left edge, as the
510
+ * fixed-stride generator does.
511
+ */
512
+ function buildCalendarAlignedTicks(scale, preset, unit, locale) {
513
+ const [start, end] = scale.domain;
514
+ const dates = [start];
515
+ for (let d = nextUnitStart(start, unit); d < end; d = nextUnitStart(d, unit)) {
516
+ dates.push(d);
517
+ }
518
+ if (end > start)
519
+ dates.push(end);
520
+ const xs = dates.map((d) => scale.forward(d));
521
+ const lastIndex = dates.length - 1;
522
+ return dates.map((date, i) => {
523
+ const x = xs[i];
524
+ const isMajor = i % preset.labelEvery === 0;
525
+ if (i === lastIndex)
526
+ return { x, labelX: undefined, major: isMajor, label: undefined };
527
+ const columnPx = xs[i + 1] - x;
528
+ let label = isMajor ? formatTickLabel(unit, date, i, locale) : undefined;
529
+ // A partial edge column can be a sliver (a roadmap starting Mar
530
+ // 29, or `length:` ending just past a month start). Its centered
531
+ // label would spill past the chart edge, so drop the label when
532
+ // it doesn't fit; the tick and grid line stay.
533
+ const isEdgeColumn = i === 0 || i === lastIndex - 1;
534
+ if (label !== undefined &&
535
+ isEdgeColumn &&
536
+ estimateTextWidth(label, TIMELINE_TICK_LABEL_FONT_SIZE_PX) > columnPx) {
537
+ label = undefined;
538
+ }
539
+ return { x, labelX: x + columnPx / 2, major: isMajor, label };
540
+ });
541
+ }
127
542
  function formatTickLabel(unit, date, _index, locale) {
128
543
  switch (unit) {
129
544
  case 'days':