@joewinke/jatui 0.36.3 → 0.38.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 (271) hide show
  1. package/dist/artifact-blocks/AttachmentChip.svelte +66 -0
  2. package/dist/artifact-blocks/AttachmentChip.svelte.d.ts +7 -0
  3. package/dist/artifact-blocks/BlockComments.svelte +309 -0
  4. package/dist/artifact-blocks/BlockComments.svelte.d.ts +33 -0
  5. package/dist/artifact-blocks/BlockRenderer.svelte +674 -0
  6. package/dist/artifact-blocks/BlockRenderer.svelte.d.ts +55 -0
  7. package/dist/artifact-blocks/BlockVerdict.svelte +151 -0
  8. package/dist/artifact-blocks/BlockVerdict.svelte.d.ts +13 -0
  9. package/dist/artifact-blocks/BlocksArtifactView.svelte +1616 -0
  10. package/dist/artifact-blocks/BlocksArtifactView.svelte.d.ts +113 -0
  11. package/dist/artifact-blocks/CONTRACT.md +225 -0
  12. package/dist/artifact-blocks/CommentPill.svelte +49 -0
  13. package/dist/artifact-blocks/CommentPill.svelte.d.ts +16 -0
  14. package/dist/artifact-blocks/FoldedRounds.svelte +95 -0
  15. package/dist/artifact-blocks/FoldedRounds.svelte.d.ts +9 -0
  16. package/dist/artifact-blocks/Glyph.svelte +54 -0
  17. package/dist/artifact-blocks/Glyph.svelte.d.ts +10 -0
  18. package/dist/artifact-blocks/HistoryScrubber.svelte +500 -0
  19. package/dist/artifact-blocks/HistoryScrubber.svelte.d.ts +15 -0
  20. package/dist/artifact-blocks/Markdown.svelte +186 -0
  21. package/dist/artifact-blocks/Markdown.svelte.d.ts +30 -0
  22. package/dist/artifact-blocks/NoteComposer.svelte +31 -0
  23. package/dist/artifact-blocks/NoteComposer.svelte.d.ts +8 -0
  24. package/dist/artifact-blocks/PlainComposer.svelte +200 -0
  25. package/dist/artifact-blocks/PlainComposer.svelte.d.ts +15 -0
  26. package/dist/artifact-blocks/SectionTools.svelte +102 -0
  27. package/dist/artifact-blocks/SectionTools.svelte.d.ts +19 -0
  28. package/dist/artifact-blocks/adapter.d.ts +13 -0
  29. package/dist/artifact-blocks/adapter.js +31 -0
  30. package/dist/artifact-blocks/autoSend.d.ts +49 -0
  31. package/dist/artifact-blocks/autoSend.js +103 -0
  32. package/dist/artifact-blocks/blocks/actions/ActionsBlock.svelte +557 -0
  33. package/dist/artifact-blocks/blocks/actions/ActionsBlock.svelte.d.ts +48 -0
  34. package/dist/artifact-blocks/blocks/actions/block.d.ts +8 -0
  35. package/dist/artifact-blocks/blocks/actions/block.js +74 -0
  36. package/dist/artifact-blocks/blocks/actions/requests.d.ts +62 -0
  37. package/dist/artifact-blocks/blocks/actions/requests.js +26 -0
  38. package/dist/artifact-blocks/blocks/actions/schema.d.ts +168 -0
  39. package/dist/artifact-blocks/blocks/actions/schema.js +253 -0
  40. package/dist/artifact-blocks/blocks/callout/CalloutBlock.svelte +779 -0
  41. package/dist/artifact-blocks/blocks/callout/CalloutBlock.svelte.d.ts +40 -0
  42. package/dist/artifact-blocks/blocks/callout/block.d.ts +7 -0
  43. package/dist/artifact-blocks/blocks/callout/block.js +39 -0
  44. package/dist/artifact-blocks/blocks/callout/schema.d.ts +72 -0
  45. package/dist/artifact-blocks/blocks/callout/schema.js +115 -0
  46. package/dist/artifact-blocks/blocks/chart/ChartBlock.svelte +875 -0
  47. package/dist/artifact-blocks/blocks/chart/ChartBlock.svelte.d.ts +59 -0
  48. package/dist/artifact-blocks/blocks/chart/block.d.ts +9 -0
  49. package/dist/artifact-blocks/blocks/chart/block.js +70 -0
  50. package/dist/artifact-blocks/blocks/chart/schema.d.ts +171 -0
  51. package/dist/artifact-blocks/blocks/chart/schema.js +498 -0
  52. package/dist/artifact-blocks/blocks/chart/thumb.d.ts +2 -0
  53. package/dist/artifact-blocks/blocks/chart/thumb.js +201 -0
  54. package/dist/artifact-blocks/blocks/checklist/ChecklistBlock.svelte +1048 -0
  55. package/dist/artifact-blocks/blocks/checklist/ChecklistBlock.svelte.d.ts +16 -0
  56. package/dist/artifact-blocks/blocks/checklist/Icon.svelte +105 -0
  57. package/dist/artifact-blocks/blocks/checklist/Icon.svelte.d.ts +17 -0
  58. package/dist/artifact-blocks/blocks/checklist/block.d.ts +10 -0
  59. package/dist/artifact-blocks/blocks/checklist/block.js +63 -0
  60. package/dist/artifact-blocks/blocks/checklist/itemReview.d.ts +16 -0
  61. package/dist/artifact-blocks/blocks/checklist/itemReview.js +63 -0
  62. package/dist/artifact-blocks/blocks/checklist/labels.d.ts +62 -0
  63. package/dist/artifact-blocks/blocks/checklist/labels.js +96 -0
  64. package/dist/artifact-blocks/blocks/checklist/retest.d.ts +43 -0
  65. package/dist/artifact-blocks/blocks/checklist/retest.js +68 -0
  66. package/dist/artifact-blocks/blocks/checklist/schema.d.ts +84 -0
  67. package/dist/artifact-blocks/blocks/checklist/schema.js +91 -0
  68. package/dist/artifact-blocks/blocks/code/CodeBlock.svelte +128 -0
  69. package/dist/artifact-blocks/blocks/code/CodeBlock.svelte.d.ts +12 -0
  70. package/dist/artifact-blocks/blocks/code/block.d.ts +8 -0
  71. package/dist/artifact-blocks/blocks/code/block.js +31 -0
  72. package/dist/artifact-blocks/blocks/code/highlight.d.ts +34 -0
  73. package/dist/artifact-blocks/blocks/code/highlight.js +280 -0
  74. package/dist/artifact-blocks/blocks/code/schema.d.ts +32 -0
  75. package/dist/artifact-blocks/blocks/code/schema.js +39 -0
  76. package/dist/artifact-blocks/blocks/collage/CollageBlock.svelte +290 -0
  77. package/dist/artifact-blocks/blocks/collage/CollageBlock.svelte.d.ts +29 -0
  78. package/dist/artifact-blocks/blocks/collage/block.d.ts +9 -0
  79. package/dist/artifact-blocks/blocks/collage/block.js +29 -0
  80. package/dist/artifact-blocks/blocks/collage/schema.d.ts +52 -0
  81. package/dist/artifact-blocks/blocks/collage/schema.js +86 -0
  82. package/dist/artifact-blocks/blocks/compare/CompareBlock.svelte +484 -0
  83. package/dist/artifact-blocks/blocks/compare/CompareBlock.svelte.d.ts +25 -0
  84. package/dist/artifact-blocks/blocks/compare/block.d.ts +9 -0
  85. package/dist/artifact-blocks/blocks/compare/block.js +32 -0
  86. package/dist/artifact-blocks/blocks/compare/schema.d.ts +74 -0
  87. package/dist/artifact-blocks/blocks/compare/schema.js +148 -0
  88. package/dist/artifact-blocks/blocks/diagram/DiagramBlock.svelte +392 -0
  89. package/dist/artifact-blocks/blocks/diagram/DiagramBlock.svelte.d.ts +30 -0
  90. package/dist/artifact-blocks/blocks/diagram/block.d.ts +9 -0
  91. package/dist/artifact-blocks/blocks/diagram/block.js +50 -0
  92. package/dist/artifact-blocks/blocks/diagram/constants.d.ts +48 -0
  93. package/dist/artifact-blocks/blocks/diagram/constants.js +53 -0
  94. package/dist/artifact-blocks/blocks/diagram/schema.d.ts +161 -0
  95. package/dist/artifact-blocks/blocks/diagram/schema.js +621 -0
  96. package/dist/artifact-blocks/blocks/diagram/thumb.d.ts +2 -0
  97. package/dist/artifact-blocks/blocks/diagram/thumb.js +157 -0
  98. package/dist/artifact-blocks/blocks/diagram/types.d.ts +74 -0
  99. package/dist/artifact-blocks/blocks/diagram/types.js +1 -0
  100. package/dist/artifact-blocks/blocks/diff/DiffBlock.svelte +81 -0
  101. package/dist/artifact-blocks/blocks/diff/DiffBlock.svelte.d.ts +10 -0
  102. package/dist/artifact-blocks/blocks/diff/block.d.ts +7 -0
  103. package/dist/artifact-blocks/blocks/diff/block.js +36 -0
  104. package/dist/artifact-blocks/blocks/diff/schema.d.ts +18 -0
  105. package/dist/artifact-blocks/blocks/diff/schema.js +35 -0
  106. package/dist/artifact-blocks/blocks/diff-review/DiffReviewBlock.svelte +1055 -0
  107. package/dist/artifact-blocks/blocks/diff-review/DiffReviewBlock.svelte.d.ts +5 -0
  108. package/dist/artifact-blocks/blocks/diff-review/block.d.ts +15 -0
  109. package/dist/artifact-blocks/blocks/diff-review/block.js +64 -0
  110. package/dist/artifact-blocks/blocks/diff-review/decisions.d.ts +57 -0
  111. package/dist/artifact-blocks/blocks/diff-review/decisions.js +80 -0
  112. package/dist/artifact-blocks/blocks/diff-review/schema.d.ts +13 -0
  113. package/dist/artifact-blocks/blocks/diff-review/schema.js +84 -0
  114. package/dist/artifact-blocks/blocks/diff-review/types.d.ts +35 -0
  115. package/dist/artifact-blocks/blocks/diff-review/types.js +1 -0
  116. package/dist/artifact-blocks/blocks/explainer/ExplainerBlock.svelte +145 -0
  117. package/dist/artifact-blocks/blocks/explainer/ExplainerBlock.svelte.d.ts +5 -0
  118. package/dist/artifact-blocks/blocks/explainer/block.d.ts +8 -0
  119. package/dist/artifact-blocks/blocks/explainer/block.js +21 -0
  120. package/dist/artifact-blocks/blocks/explainer/schema.d.ts +26 -0
  121. package/dist/artifact-blocks/blocks/explainer/schema.js +69 -0
  122. package/dist/artifact-blocks/blocks/group-content.d.ts +10 -0
  123. package/dist/artifact-blocks/blocks/group-content.js +16 -0
  124. package/dist/artifact-blocks/blocks/group-data.d.ts +10 -0
  125. package/dist/artifact-blocks/blocks/group-data.js +7 -0
  126. package/dist/artifact-blocks/blocks/group-review.d.ts +10 -0
  127. package/dist/artifact-blocks/blocks/group-review.js +12 -0
  128. package/dist/artifact-blocks/blocks/group-visual.d.ts +17 -0
  129. package/dist/artifact-blocks/blocks/group-visual.js +14 -0
  130. package/dist/artifact-blocks/blocks/map/MapBlock.svelte +413 -0
  131. package/dist/artifact-blocks/blocks/map/MapBlock.svelte.d.ts +53 -0
  132. package/dist/artifact-blocks/blocks/map/block.d.ts +9 -0
  133. package/dist/artifact-blocks/blocks/map/block.js +62 -0
  134. package/dist/artifact-blocks/blocks/map/schema.d.ts +123 -0
  135. package/dist/artifact-blocks/blocks/map/schema.js +113 -0
  136. package/dist/artifact-blocks/blocks/map/thumb.d.ts +2 -0
  137. package/dist/artifact-blocks/blocks/map/thumb.js +69 -0
  138. package/dist/artifact-blocks/blocks/markdown/MarkdownBlock.svelte +33 -0
  139. package/dist/artifact-blocks/blocks/markdown/MarkdownBlock.svelte.d.ts +15 -0
  140. package/dist/artifact-blocks/blocks/markdown/block.d.ts +7 -0
  141. package/dist/artifact-blocks/blocks/markdown/block.js +28 -0
  142. package/dist/artifact-blocks/blocks/markdown/render.d.ts +17 -0
  143. package/dist/artifact-blocks/blocks/markdown/render.js +115 -0
  144. package/dist/artifact-blocks/blocks/markdown/schema.d.ts +10 -0
  145. package/dist/artifact-blocks/blocks/markdown/schema.js +23 -0
  146. package/dist/artifact-blocks/blocks/media-picker/MediaPickerBlock.svelte +2112 -0
  147. package/dist/artifact-blocks/blocks/media-picker/MediaPickerBlock.svelte.d.ts +5 -0
  148. package/dist/artifact-blocks/blocks/media-picker/block.d.ts +24 -0
  149. package/dist/artifact-blocks/blocks/media-picker/block.js +137 -0
  150. package/dist/artifact-blocks/blocks/media-picker/choices.d.ts +28 -0
  151. package/dist/artifact-blocks/blocks/media-picker/choices.js +35 -0
  152. package/dist/artifact-blocks/blocks/media-picker/decisions.d.ts +51 -0
  153. package/dist/artifact-blocks/blocks/media-picker/decisions.js +75 -0
  154. package/dist/artifact-blocks/blocks/media-picker/schema.d.ts +7 -0
  155. package/dist/artifact-blocks/blocks/media-picker/schema.js +199 -0
  156. package/dist/artifact-blocks/blocks/media-picker/types.d.ts +92 -0
  157. package/dist/artifact-blocks/blocks/media-picker/types.js +1 -0
  158. package/dist/artifact-blocks/blocks/media-picker/versions.d.ts +51 -0
  159. package/dist/artifact-blocks/blocks/media-picker/versions.js +118 -0
  160. package/dist/artifact-blocks/blocks/mockup/MockupBlock.svelte +213 -0
  161. package/dist/artifact-blocks/blocks/mockup/MockupBlock.svelte.d.ts +5 -0
  162. package/dist/artifact-blocks/blocks/mockup/block.d.ts +26 -0
  163. package/dist/artifact-blocks/blocks/mockup/block.js +52 -0
  164. package/dist/artifact-blocks/blocks/mockup/doc.d.ts +24 -0
  165. package/dist/artifact-blocks/blocks/mockup/doc.js +44 -0
  166. package/dist/artifact-blocks/blocks/mockup/sandbox.d.ts +21 -0
  167. package/dist/artifact-blocks/blocks/mockup/sandbox.js +27 -0
  168. package/dist/artifact-blocks/blocks/mockup/schema.d.ts +7 -0
  169. package/dist/artifact-blocks/blocks/mockup/schema.js +90 -0
  170. package/dist/artifact-blocks/blocks/mockup/types.d.ts +36 -0
  171. package/dist/artifact-blocks/blocks/mockup/types.js +17 -0
  172. package/dist/artifact-blocks/blocks/program/ProgramBlock.svelte +359 -0
  173. package/dist/artifact-blocks/blocks/program/ProgramBlock.svelte.d.ts +32 -0
  174. package/dist/artifact-blocks/blocks/program/block.d.ts +35 -0
  175. package/dist/artifact-blocks/blocks/program/block.js +68 -0
  176. package/dist/artifact-blocks/blocks/program/schema.d.ts +132 -0
  177. package/dist/artifact-blocks/blocks/program/schema.js +268 -0
  178. package/dist/artifact-blocks/blocks/stats/StatsBlock.svelte +315 -0
  179. package/dist/artifact-blocks/blocks/stats/StatsBlock.svelte.d.ts +24 -0
  180. package/dist/artifact-blocks/blocks/stats/block.d.ts +7 -0
  181. package/dist/artifact-blocks/blocks/stats/block.js +49 -0
  182. package/dist/artifact-blocks/blocks/stats/schema.d.ts +82 -0
  183. package/dist/artifact-blocks/blocks/stats/schema.js +43 -0
  184. package/dist/artifact-blocks/blocks/stats/thumb.d.ts +2 -0
  185. package/dist/artifact-blocks/blocks/stats/thumb.js +102 -0
  186. package/dist/artifact-blocks/blocks/table/TableBlock.svelte +490 -0
  187. package/dist/artifact-blocks/blocks/table/TableBlock.svelte.d.ts +28 -0
  188. package/dist/artifact-blocks/blocks/table/block.d.ts +9 -0
  189. package/dist/artifact-blocks/blocks/table/block.js +100 -0
  190. package/dist/artifact-blocks/blocks/table/schema.d.ts +143 -0
  191. package/dist/artifact-blocks/blocks/table/schema.js +278 -0
  192. package/dist/artifact-blocks/blocks/timeline/TimelineBlock.svelte +347 -0
  193. package/dist/artifact-blocks/blocks/timeline/TimelineBlock.svelte.d.ts +42 -0
  194. package/dist/artifact-blocks/blocks/timeline/block.d.ts +9 -0
  195. package/dist/artifact-blocks/blocks/timeline/block.js +96 -0
  196. package/dist/artifact-blocks/blocks/timeline/constants.d.ts +26 -0
  197. package/dist/artifact-blocks/blocks/timeline/constants.js +27 -0
  198. package/dist/artifact-blocks/blocks/timeline/schema.d.ts +102 -0
  199. package/dist/artifact-blocks/blocks/timeline/schema.js +405 -0
  200. package/dist/artifact-blocks/blocks/timeline/thumb.d.ts +2 -0
  201. package/dist/artifact-blocks/blocks/timeline/thumb.js +117 -0
  202. package/dist/artifact-blocks/blocks/timeline/types.d.ts +66 -0
  203. package/dist/artifact-blocks/blocks/timeline/types.js +1 -0
  204. package/dist/artifact-blocks/blocks/transcript/TranscriptBlock.svelte +169 -0
  205. package/dist/artifact-blocks/blocks/transcript/TranscriptBlock.svelte.d.ts +26 -0
  206. package/dist/artifact-blocks/blocks/transcript/block.d.ts +9 -0
  207. package/dist/artifact-blocks/blocks/transcript/block.js +86 -0
  208. package/dist/artifact-blocks/blocks/transcript/schema.d.ts +114 -0
  209. package/dist/artifact-blocks/blocks/transcript/schema.js +126 -0
  210. package/dist/artifact-blocks/builtins.d.ts +40 -0
  211. package/dist/artifact-blocks/builtins.js +22 -0
  212. package/dist/artifact-blocks/contractBlocks.d.ts +92 -0
  213. package/dist/artifact-blocks/contractBlocks.js +279 -0
  214. package/dist/artifact-blocks/history.d.ts +140 -0
  215. package/dist/artifact-blocks/history.js +363 -0
  216. package/dist/artifact-blocks/index.d.ts +40 -0
  217. package/dist/artifact-blocks/index.js +46 -0
  218. package/dist/artifact-blocks/listen/context.d.ts +30 -0
  219. package/dist/artifact-blocks/listen/context.js +30 -0
  220. package/dist/artifact-blocks/liveData.d.ts +78 -0
  221. package/dist/artifact-blocks/liveData.js +137 -0
  222. package/dist/artifact-blocks/liveDataPoller.d.ts +41 -0
  223. package/dist/artifact-blocks/liveDataPoller.js +140 -0
  224. package/dist/artifact-blocks/openNav.d.ts +46 -0
  225. package/dist/artifact-blocks/openNav.js +106 -0
  226. package/dist/artifact-blocks/pageReviewKeys.d.ts +17 -0
  227. package/dist/artifact-blocks/pageReviewKeys.js +115 -0
  228. package/dist/artifact-blocks/params.d.ts +98 -0
  229. package/dist/artifact-blocks/params.js +159 -0
  230. package/dist/artifact-blocks/registry.d.ts +27 -0
  231. package/dist/artifact-blocks/registry.js +83 -0
  232. package/dist/artifact-blocks/review/BlockIcon.svelte +99 -0
  233. package/dist/artifact-blocks/review/BlockIcon.svelte.d.ts +17 -0
  234. package/dist/artifact-blocks/review/BulkRejectForm.svelte +94 -0
  235. package/dist/artifact-blocks/review/BulkRejectForm.svelte.d.ts +11 -0
  236. package/dist/artifact-blocks/review/BulkUndoBar.svelte +40 -0
  237. package/dist/artifact-blocks/review/BulkUndoBar.svelte.d.ts +9 -0
  238. package/dist/artifact-blocks/review/ItemNote.svelte +193 -0
  239. package/dist/artifact-blocks/review/ItemNote.svelte.d.ts +33 -0
  240. package/dist/artifact-blocks/review/NoteToggle.svelte +52 -0
  241. package/dist/artifact-blocks/review/NoteToggle.svelte.d.ts +12 -0
  242. package/dist/artifact-blocks/review/TeamChip.svelte +71 -0
  243. package/dist/artifact-blocks/review/TeamChip.svelte.d.ts +8 -0
  244. package/dist/artifact-blocks/review/attachments.d.ts +10 -0
  245. package/dist/artifact-blocks/review/attachments.js +37 -0
  246. package/dist/artifact-blocks/review/bulk.d.ts +52 -0
  247. package/dist/artifact-blocks/review/bulk.js +61 -0
  248. package/dist/artifact-blocks/review/itemReview.d.ts +33 -0
  249. package/dist/artifact-blocks/review/itemReview.js +112 -0
  250. package/dist/artifact-blocks/review/roundLines.d.ts +14 -0
  251. package/dist/artifact-blocks/review/roundLines.js +20 -0
  252. package/dist/artifact-blocks/review/rounds.d.ts +86 -0
  253. package/dist/artifact-blocks/review/rounds.js +302 -0
  254. package/dist/artifact-blocks/review/saver.d.ts +23 -0
  255. package/dist/artifact-blocks/review/saver.js +48 -0
  256. package/dist/artifact-blocks/review/team.d.ts +31 -0
  257. package/dist/artifact-blocks/review/team.js +42 -0
  258. package/dist/artifact-blocks/review/visualOrder.d.ts +29 -0
  259. package/dist/artifact-blocks/review/visualOrder.js +66 -0
  260. package/dist/artifact-blocks/review.d.ts +180 -0
  261. package/dist/artifact-blocks/review.js +716 -0
  262. package/dist/artifact-blocks/thumb-kit.d.ts +80 -0
  263. package/dist/artifact-blocks/thumb-kit.js +149 -0
  264. package/dist/artifact-blocks/types.d.ts +513 -0
  265. package/dist/artifact-blocks/types.js +1 -0
  266. package/dist/components/Button.svelte +8 -0
  267. package/dist/components/TextInput.svelte +39 -6
  268. package/dist/components/TextInput.svelte.d.ts +15 -7
  269. package/dist/components/basic/Checkbox.svelte +52 -14
  270. package/dist/components/basic/Checkbox.svelte.d.ts +11 -1
  271. package/package.json +11 -2
@@ -0,0 +1,347 @@
1
+ <script lang="ts">
2
+ /**
3
+ * TimelineBlock — SVG gantt / milestone renderer (block type "timeline").
4
+ *
5
+ * Layout lives in ./schema.ts (pure, unit-tested): UTC-day domain, tick
6
+ * ladders per zoom, lane rows with greedy sub-rows for overlapping bars,
7
+ * dependency elbows. This file is the render layer.
8
+ *
9
+ * Token discipline: colors are DaisyUI token classes resolved through a
10
+ * STATIC map (no dynamic `text-${tone}` — that breaks Tailwind extraction).
11
+ * Text is text; no {@html} anywhere. The today line renders client-side
12
+ * only (browser flag) so SSR and hydration never disagree on geometry.
13
+ */
14
+ import type { BlockProps } from "../../types.js"
15
+ import type { ToneToken } from "../../params.js"
16
+ import {
17
+ timelineParamsSchema,
18
+ layoutTimeline,
19
+ dependencyPoints,
20
+ timelineRows,
21
+ type TimelineParams,
22
+ type ToneToken as ToneTokenType,
23
+ } from "./schema.js"
24
+ import { LANE_W, PLOT_W, BAR_H, MS_R } from "./constants.js"
25
+ import SectionTools from "../../SectionTools.svelte"
26
+
27
+ const browser = typeof window !== "undefined"
28
+
29
+ let { params: rawParams, ctx }: BlockProps<TimelineParams> = $props()
30
+
31
+ /** Params are parsed here, not assumed pre-parsed: the host validates at
32
+ * publish but stores what was sent. Corrupt params fall back to an empty
33
+ * render — a bad agent payload must never throw inside the artifact page. */
34
+ const EMPTY_PARAMS: TimelineParams = {
35
+ zoom: "month",
36
+ showToday: true,
37
+ milestones: [],
38
+ bars: [],
39
+ dependencies: [],
40
+ }
41
+ const parsed = $derived(timelineParamsSchema.safeParse(rawParams))
42
+ const params = $derived(parsed.success ? parsed.data : EMPTY_PARAMS)
43
+
44
+ // ── Tone classes (STATIC maps — token-only theming, no dynamic classes) ──
45
+ const BAR_FILL: Record<ToneTokenType, string> = {
46
+ primary: "fill-primary/25",
47
+ secondary: "fill-secondary/25",
48
+ accent: "fill-accent/25",
49
+ neutral: "fill-base-content/15",
50
+ info: "fill-info/25",
51
+ success: "fill-success/30",
52
+ warning: "fill-warning/30",
53
+ error: "fill-error/25",
54
+ }
55
+ const BAR_STROKE: Record<ToneTokenType, string> = {
56
+ primary: "stroke-primary/70",
57
+ secondary: "stroke-secondary/70",
58
+ accent: "stroke-accent/70",
59
+ neutral: "stroke-base-content/35",
60
+ info: "stroke-info/70",
61
+ success: "stroke-success/70",
62
+ warning: "stroke-warning/80",
63
+ error: "stroke-error/70",
64
+ }
65
+ const PROGRESS_FILL: Record<ToneTokenType, string> = {
66
+ primary: "fill-primary/60",
67
+ secondary: "fill-secondary/60",
68
+ accent: "fill-accent/60",
69
+ neutral: "fill-base-content/40",
70
+ info: "fill-info/60",
71
+ success: "fill-success/65",
72
+ warning: "fill-warning/70",
73
+ error: "fill-error/60",
74
+ }
75
+ const HEAD_FILL: Record<ToneTokenType, string> = {
76
+ primary: "fill-primary/80",
77
+ secondary: "fill-secondary/80",
78
+ accent: "fill-accent/80",
79
+ neutral: "fill-base-content/50",
80
+ info: "fill-info/80",
81
+ success: "fill-success/80",
82
+ warning: "fill-warning/90",
83
+ error: "fill-error/80",
84
+ }
85
+ const barTone = (t?: ToneToken): ToneTokenType => t ?? "primary"
86
+ const msTone = (t?: ToneToken): ToneTokenType => t ?? "accent"
87
+
88
+ // ── Layout ────────────────────────────────────────────────────────────────
89
+ // The today line is client-only: SSR passes nowMs=null so the rendered
90
+ // geometry (domain, bars, ticks) is byte-identical on both sides.
91
+ const nowMs = $derived(browser ? Date.now() : null)
92
+ const layout = $derived(
93
+ layoutTimeline(params, { plotW: PLOT_W, laneW: LANE_W, nowMs }),
94
+ )
95
+ const W = $derived(Math.max(240, layout.width))
96
+ const H = $derived(Math.max(60, layout.height))
97
+
98
+ const ariaLabel = $derived(
99
+ `timeline${params.title ? `: ${params.title}` : ""}. ${params.bars.length} bars, ${params.milestones.length} milestones, ${params.bars.reduce((n, b) => n + (b.progress != null ? 1 : 0), 0)} with progress, zoom ${params.zoom}.`,
100
+ )
101
+
102
+ // ── Path helpers ──────────────────────────────────────────────────────────
103
+ const r1 = (n: number) => Math.round(n * 10) / 10
104
+
105
+ // ── Bar labels: inside when the box fits the estimate, else outside ──────
106
+ function barLabelInside(label: string, w: number): boolean {
107
+ return label.length * 6.2 <= w - 10
108
+ }
109
+ function truncate(s: string, n: number): string {
110
+ return s.length > n ? `${s.slice(0, n - 1)}…` : s
111
+ }
112
+
113
+ // ── A11y data fallback ────────────────────────────────────────────────────
114
+ let dataOpen = $state(false)
115
+ const tableId = $derived(`block-data-${ctx.blockId || "timeline"}`)
116
+ const rows = $derived(timelineRows(params))
117
+ </script>
118
+
119
+ <figure class="w-full" data-block-type="timeline">
120
+ {#if params.title || params.subtitle}
121
+ <div class="mb-1">
122
+ {#if params.title}
123
+ <div class="flex items-center gap-2">
124
+ <h4 class="min-w-0 text-sm font-semibold text-base-content">
125
+ {params.title}
126
+ </h4>
127
+ <SectionTools {ctx} inline />
128
+ </div>
129
+ {/if}
130
+ {#if params.subtitle}
131
+ <p class="text-xs text-base-content/60">{params.subtitle}</p>
132
+ {/if}
133
+ </div>
134
+ {/if}
135
+
136
+ {#if params.bars.length === 0 && params.milestones.length === 0}
137
+ <p class="text-sm text-base-content/45">No timeline to show.</p>
138
+ {:else}
139
+ <div class="w-full overflow-x-auto">
140
+ <svg
141
+ viewBox="0 0 {W} {H}"
142
+ class="block h-auto w-full"
143
+ role="img"
144
+ aria-label={ariaLabel}
145
+ >
146
+ <!-- tick grid: vertical recessive lines + labels on top -->
147
+ {#each layout.ticks as t, ti (ti)}
148
+ <line
149
+ x1={r1(t.x)}
150
+ x2={r1(t.x)}
151
+ y1={12}
152
+ y2={H - 4}
153
+ class="stroke-base-content/10"
154
+ stroke-width="1"
155
+ shape-rendering="crispEdges"
156
+ ></line>
157
+ <text
158
+ x={r1(t.x)}
159
+ y={10}
160
+ text-anchor="middle"
161
+ class="fill-base-content/45 text-2xs tabular-nums"
162
+ >
163
+ {t.label}
164
+ </text>
165
+ {/each}
166
+
167
+ <!-- today line (client-only; dashed + labeled) -->
168
+ {#if layout.today}
169
+ <line
170
+ x1={r1(layout.today.x)}
171
+ x2={r1(layout.today.x)}
172
+ y1={12}
173
+ y2={H - 4}
174
+ class="stroke-warning/80"
175
+ stroke-width="1.5"
176
+ stroke-dasharray="4 4"
177
+ ></line>
178
+ <text
179
+ x={r1(layout.today.x + 5)}
180
+ y={20}
181
+ class="fill-warning text-2xs font-medium"
182
+ >
183
+ today
184
+ </text>
185
+ {/if}
186
+
187
+ <!-- lane rows: alternating tint + label + marks -->
188
+ {#each layout.rows as row, ri (row.id + ri)}
189
+ <rect
190
+ x={0}
191
+ y={r1(row.y)}
192
+ width={W}
193
+ height={r1(row.height)}
194
+ class={ri % 2 === 0
195
+ ? "fill-base-content/[0.03]"
196
+ : "fill-transparent"}
197
+ ></rect>
198
+ <text
199
+ x={8}
200
+ y={r1(row.y + row.height / 2 + 3)}
201
+ class="fill-base-content/55 text-2xs font-medium"
202
+ >
203
+ {truncate(row.label, Math.floor(LANE_W / 6.2))}
204
+ </text>
205
+
206
+ {#each row.bars as b (b.id)}
207
+ {@const tone = barTone(b.tone)}
208
+ {@const yTop = b.y - BAR_H / 2}
209
+ <rect
210
+ x={r1(b.x)}
211
+ y={r1(yTop)}
212
+ width={r1(b.w)}
213
+ height={BAR_H}
214
+ rx="4"
215
+ class="{BAR_FILL[tone]} {BAR_STROKE[tone]}"
216
+ stroke-width="1"
217
+ ></rect>
218
+ {#if b.progress != null && b.progress > 0}
219
+ <rect
220
+ x={r1(b.x)}
221
+ y={r1(yTop)}
222
+ width={r1((b.w * b.progress) / 100)}
223
+ height={BAR_H}
224
+ rx="4"
225
+ class={PROGRESS_FILL[tone]}
226
+ ></rect>
227
+ {/if}
228
+ {#if barLabelInside(b.label, b.w)}
229
+ <text
230
+ x={r1(b.x + 6)}
231
+ y={r1(b.y + 3.5)}
232
+ class="fill-base-content text-2xs font-medium"
233
+ >
234
+ {truncate(b.label, Math.max(1, Math.floor((b.w - 10) / 6.2)))}
235
+ </text>
236
+ {:else}
237
+ <text
238
+ x={r1(b.x + b.w + 6)}
239
+ y={r1(b.y + 3.5)}
240
+ class="fill-base-content/70 text-2xs"
241
+ >
242
+ {truncate(b.label, 24)}
243
+ </text>
244
+ {/if}
245
+ <title>{b.label}: {b.start} → {b.end}</title>
246
+ {/each}
247
+
248
+ {#each row.milestones as m, mi (m.id + mi)}
249
+ {@const tone = msTone(m.tone)}
250
+ <polygon
251
+ points="{r1(m.x)},{r1(m.y - MS_R)} {r1(m.x + MS_R)},{r1(m.y)} {r1(
252
+ m.x,
253
+ )},{r1(m.y + MS_R)} {r1(m.x - MS_R)},{r1(m.y)}"
254
+ class="{BAR_FILL[tone]} {BAR_STROKE[tone]}"
255
+ stroke-width="1.5"
256
+ ></polygon>
257
+ <text
258
+ x={r1(m.x + MS_R + 5)}
259
+ y={r1(m.y + 3.5)}
260
+ class="fill-base-content/70 text-2xs"
261
+ >
262
+ {truncate(m.label, 20)}
263
+ </text>
264
+ <title>{m.label}: {m.date}</title>
265
+ {/each}
266
+ {/each}
267
+
268
+ <!-- dependency elbows -->
269
+ {#each params.dependencies as d, di (di)}
270
+ {@const a = layout.rows
271
+ .flatMap((r) => r.bars)
272
+ .find((b) => b.id === d.from)}
273
+ {@const b = layout.rows
274
+ .flatMap((r) => r.bars)
275
+ .find((bar) => bar.id === d.to)}
276
+ {#if a && b}
277
+ {@const pts = dependencyPoints(
278
+ { xEnd: a.x + a.w, y: a.y },
279
+ { xStart: b.x, y: b.y },
280
+ )}
281
+ <polyline
282
+ points={pts.map((p) => `${r1(p.x)},${r1(p.y)}`).join(" ")}
283
+ fill="none"
284
+ class="stroke-base-content/45"
285
+ stroke-width="1"
286
+ ></polyline>
287
+ {@const last = pts[pts.length - 1]}
288
+ {@const prev = pts[pts.length - 2]}
289
+ {@const ang = Math.atan2(last.y - prev.y, last.x - prev.x)}
290
+ <polygon
291
+ points="{r1(last.x)},{r1(last.y)} {r1(
292
+ last.x - 7 * Math.cos(ang - 0.45),
293
+ )},{r1(last.y - 7 * Math.sin(ang - 0.45))} {r1(
294
+ last.x - 7 * Math.cos(ang + 0.45),
295
+ )},{r1(last.y - 7 * Math.sin(ang + 0.45))}"
296
+ class="fill-base-content/50"
297
+ ></polygon>
298
+ {/if}
299
+ {/each}
300
+ </svg>
301
+ </div>
302
+ {/if}
303
+
304
+ <!-- accessible data fallback: sr-only table always; expandable -->
305
+ <div class="mt-1.5 flex items-center justify-between gap-2">
306
+ <span class="text-2xs text-base-content/45">
307
+ {params.bars.length} bars · {params.milestones.length} milestones · zoom
308
+ {params.zoom}
309
+ </span>
310
+ <button
311
+ type="button"
312
+ class="btn btn-ghost btn-xs text-base-content/70"
313
+ aria-expanded={dataOpen}
314
+ aria-controls={tableId}
315
+ onclick={() => (dataOpen = !dataOpen)}
316
+ >
317
+ {dataOpen ? "Hide data" : "View data"}
318
+ </button>
319
+ </div>
320
+ <div
321
+ class={dataOpen
322
+ ? "mt-1 max-h-64 overflow-auto rounded-box border border-base-content/10"
323
+ : "sr-only"}
324
+ >
325
+ <!-- sr-only sits on the wrapper: a <table> ignores width:1px and grows to
326
+ its content, so on the table itself it widened the page at 390px. -->
327
+ <table id={tableId} class={dataOpen ? "table table-sm" : undefined}>
328
+ <caption class="sr-only">
329
+ Timeline data{params.title ? `: ${params.title}` : ""}
330
+ </caption>
331
+ <thead>
332
+ <tr>
333
+ <th scope="col" class="text-left">Item</th>
334
+ <th scope="col" class="text-left">Schedule</th>
335
+ </tr>
336
+ </thead>
337
+ <tbody>
338
+ {#each rows as row, ri (ri)}
339
+ <tr>
340
+ <th scope="row" class="text-left font-normal">{row.label}</th>
341
+ <td class="text-left">{row.detail}</td>
342
+ </tr>
343
+ {/each}
344
+ </tbody>
345
+ </table>
346
+ </div>
347
+ </figure>
@@ -0,0 +1,42 @@
1
+ /**
2
+ * TimelineBlock — SVG gantt / milestone renderer (block type "timeline").
3
+ *
4
+ * Layout lives in ./schema.ts (pure, unit-tested): UTC-day domain, tick
5
+ * ladders per zoom, lane rows with greedy sub-rows for overlapping bars,
6
+ * dependency elbows. This file is the render layer.
7
+ *
8
+ * Token discipline: colors are DaisyUI token classes resolved through a
9
+ * STATIC map (no dynamic `text-${tone}` — that breaks Tailwind extraction).
10
+ * Text is text; no {@html} anywhere. The today line renders client-side
11
+ * only (browser flag) so SSR and hydration never disagree on geometry.
12
+ */
13
+ import type { BlockProps } from "../../types.js";
14
+ declare const TimelineBlock: import("svelte").Component<BlockProps<{
15
+ zoom: "month" | "week" | "day";
16
+ showToday: boolean;
17
+ milestones: {
18
+ label: string;
19
+ date: string;
20
+ id?: string | undefined;
21
+ tone?: "error" | "warning" | "info" | "success" | "primary" | "secondary" | "neutral" | "accent" | undefined;
22
+ lane?: string | undefined;
23
+ }[];
24
+ bars: {
25
+ id: string;
26
+ label: string;
27
+ start: string;
28
+ end: string;
29
+ lane?: string | undefined;
30
+ tone?: "error" | "warning" | "info" | "success" | "primary" | "secondary" | "neutral" | "accent" | undefined;
31
+ progress?: number | undefined;
32
+ }[];
33
+ dependencies: {
34
+ from: string;
35
+ to: string;
36
+ }[];
37
+ title?: string | undefined;
38
+ subtitle?: string | undefined;
39
+ lanes?: string[] | undefined;
40
+ }>, {}, "">;
41
+ type TimelineBlock = ReturnType<typeof TimelineBlock>;
42
+ export default TimelineBlock;
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Timeline block definition (block type "timeline").
3
+ * Contract: src/lib/artifact-blocks/CONTRACT.md — registry.ts discovers this
4
+ * folder; nothing else registers a block.
5
+ */
6
+ import type { ArtifactBlockDef } from "../../types.js";
7
+ import { type TimelineParams } from "./schema.js";
8
+ declare const def: ArtifactBlockDef<TimelineParams>;
9
+ export default def;
@@ -0,0 +1,96 @@
1
+ import { timelineParamsSchema as timelineSchema, } from "./schema.js";
2
+ import TimelineBlock from "./TimelineBlock.svelte";
3
+ const EXAMPLE = {
4
+ title: "Q4 launch plan",
5
+ subtitle: "Design → build → rollout",
6
+ zoom: "month",
7
+ showToday: true,
8
+ lanes: ["Design", "Build", "Go-live"],
9
+ milestones: [
10
+ { id: "kickoff", label: "Kickoff", date: "2026-10-05", tone: "accent" },
11
+ { id: "beta", label: "Private beta", date: "2026-11-20", tone: "info" },
12
+ { id: "launch", label: "Launch", date: "2026-12-18", tone: "success" },
13
+ ],
14
+ bars: [
15
+ {
16
+ id: "design-system",
17
+ label: "Design system",
18
+ start: "2026-10-05",
19
+ end: "2026-10-23",
20
+ lane: "Design",
21
+ tone: "secondary",
22
+ progress: 60,
23
+ },
24
+ {
25
+ id: "landing",
26
+ label: "Landing page",
27
+ start: "2026-10-19",
28
+ end: "2026-11-06",
29
+ lane: "Design",
30
+ tone: "secondary",
31
+ },
32
+ {
33
+ id: "api",
34
+ label: "API + data model",
35
+ start: "2026-10-12",
36
+ end: "2026-11-13",
37
+ lane: "Build",
38
+ tone: "primary",
39
+ },
40
+ {
41
+ id: "web",
42
+ label: "Web app",
43
+ start: "2026-10-26",
44
+ end: "2026-12-04",
45
+ lane: "Build",
46
+ tone: "primary",
47
+ progress: 15,
48
+ },
49
+ {
50
+ id: "qa",
51
+ label: "QA + fixes",
52
+ start: "2026-11-30",
53
+ end: "2026-12-11",
54
+ lane: "Build",
55
+ tone: "warning",
56
+ },
57
+ {
58
+ id: "rollout",
59
+ label: "Phased rollout",
60
+ start: "2026-12-07",
61
+ end: "2026-12-18",
62
+ lane: "Go-live",
63
+ tone: "success",
64
+ },
65
+ ],
66
+ dependencies: [
67
+ { from: "design-system", to: "landing" },
68
+ { from: "api", to: "web" },
69
+ { from: "web", to: "qa" },
70
+ { from: "qa", to: "rollout" },
71
+ ],
72
+ };
73
+ const def = {
74
+ type: "timeline",
75
+ title: "Timeline / Gantt",
76
+ description: "Dated milestones and gantt bars with dependencies on a UTC-day-anchored time axis — " +
77
+ "launch plans, sprints, project schedules. bars are { id, label, start, end, lane?, tone?, " +
78
+ "progress? } (id is REQUIRED kebab-case — dependencies reference it; end >= start; progress " +
79
+ "0-100 renders a darker completion fill); milestones are { id?, label, date, tone?, lane? } " +
80
+ "drawn as diamonds on their lane (lane-less milestones collect on a top 'Milestones' lane). " +
81
+ "dependencies are { from, to } bar-id pairs routed as elbow arrows from a bar's end to its " +
82
+ "successor's start. lanes orders the rows explicitly (first-seen order otherwise; lane-less " +
83
+ "bars share a 'Tasks' row). zoom day/week/month picks the axis granularity (day ticks, " +
84
+ "Monday ticks, month ticks — the step widens automatically past ~46 ticks so a 2-year plan " +
85
+ "still reads). showToday (default true) draws a dashed today line when today falls inside " +
86
+ "the range (it renders client-side only — SSR shows the plan without it, so no hydration " +
87
+ "drift). Caps: 50 milestones, 80 bars, 120 dependencies, labels ≤200 chars. An accessible " +
88
+ "data table is built in ('View data') — don't pair a timeline with a duplicate schedule " +
89
+ "list. Tip: give every bar a stable id and chain the critical path through dependencies.",
90
+ schema: timelineSchema,
91
+ component: TimelineBlock,
92
+ // mos-8fvt9: the section's Listen + comment sit on the heading row.
93
+ hostsTools: (p) => Boolean(p.title),
94
+ example: EXAMPLE,
95
+ };
96
+ export default def;
@@ -0,0 +1,26 @@
1
+ /**
2
+ * Timeline block — caps and layout constants (pure numbers, no colors).
3
+ * The renderer maps tones to theme-token classes; schema.ts computes all
4
+ * geometry from these.
5
+ */
6
+ export declare const MAX_MILESTONES = 50;
7
+ export declare const MAX_BARS = 80;
8
+ export declare const MAX_DEPS = 120;
9
+ export declare const MAX_LANES = 24;
10
+ /** Bar / milestone label text cap (chars). */
11
+ export declare const BAR_TEXT_MAX = 200;
12
+ export declare const ID_MAX = 64;
13
+ export declare const LANE_MAX = 80;
14
+ export type ToneTokenT = "primary" | "secondary" | "accent" | "neutral" | "info" | "success" | "warning" | "error";
15
+ /** Left column that carries the lane labels. */
16
+ export declare const LANE_W = 130;
17
+ /** Plot width of the time axis at natural (unscaled) size. */
18
+ export declare const PLOT_W = 720;
19
+ /** Height of the tick header strip. */
20
+ export declare const TICK_H = 22;
21
+ export declare const ROW_PAD = 9;
22
+ export declare const BAR_H = 16;
23
+ /** Vertical pitch of a bar sub-row (bar + gap). */
24
+ export declare const SUB_ROW_H: number;
25
+ /** Milestone diamond size (half-diagonal). */
26
+ export declare const MS_R = 5.5;
@@ -0,0 +1,27 @@
1
+ /**
2
+ * Timeline block — caps and layout constants (pure numbers, no colors).
3
+ * The renderer maps tones to theme-token classes; schema.ts computes all
4
+ * geometry from these.
5
+ */
6
+ // ── Caps (untrusted-input bounds) ─────────────────────────────────────────
7
+ export const MAX_MILESTONES = 50;
8
+ export const MAX_BARS = 80;
9
+ export const MAX_DEPS = 120;
10
+ export const MAX_LANES = 24;
11
+ /** Bar / milestone label text cap (chars). */
12
+ export const BAR_TEXT_MAX = 200;
13
+ export const ID_MAX = 64;
14
+ export const LANE_MAX = 80;
15
+ // ── Layout constants (px) ─────────────────────────────────────────────────
16
+ /** Left column that carries the lane labels. */
17
+ export const LANE_W = 130;
18
+ /** Plot width of the time axis at natural (unscaled) size. */
19
+ export const PLOT_W = 720;
20
+ /** Height of the tick header strip. */
21
+ export const TICK_H = 22;
22
+ export const ROW_PAD = 9;
23
+ export const BAR_H = 16;
24
+ /** Vertical pitch of a bar sub-row (bar + gap). */
25
+ export const SUB_ROW_H = BAR_H + 7;
26
+ /** Milestone diamond size (half-diagonal). */
27
+ export const MS_R = 5.5;
@@ -0,0 +1,102 @@
1
+ /**
2
+ * Timeline block — params schema, validation, date scale and layout
3
+ * (mos-d70v4).
4
+ *
5
+ * Pure functions only (no DOM): dates parse to UTC-midnight epoch ms (a
6
+ * date-only ISO string parses identically in every timezone), the domain,
7
+ * ticks, lane rows and dependency elbows are computed here, and colors
8
+ * NEVER appear — the renderer maps tones to theme-token classes.
9
+ *
10
+ * Untrusted-input rules (CONTRACT.md): text params are length-capped
11
+ * strings, dates are ISO-validated (impossible calendar dates are refused
12
+ * at publish), arrays are capped (50 milestones / 80 bars / 120 deps).
13
+ */
14
+ import { z } from "zod";
15
+ import { type ToneTokenT } from "./constants.js";
16
+ import type { TimelineParams, Point, Tick, TimelineLayout } from "./types.js";
17
+ export declare const timelineParamsSchema: z.ZodObject<{
18
+ title: z.ZodOptional<z.ZodString>;
19
+ subtitle: z.ZodOptional<z.ZodString>;
20
+ zoom: z.ZodDefault<z.ZodEnum<{
21
+ month: "month";
22
+ week: "week";
23
+ day: "day";
24
+ }>>;
25
+ showToday: z.ZodDefault<z.ZodBoolean>;
26
+ milestones: z.ZodDefault<z.ZodArray<z.ZodObject<{
27
+ id: z.ZodOptional<z.ZodString>;
28
+ label: z.ZodString;
29
+ date: z.ZodString;
30
+ tone: z.ZodOptional<z.ZodEnum<{
31
+ error: "error";
32
+ warning: "warning";
33
+ info: "info";
34
+ success: "success";
35
+ primary: "primary";
36
+ secondary: "secondary";
37
+ neutral: "neutral";
38
+ accent: "accent";
39
+ }>>;
40
+ lane: z.ZodOptional<z.ZodString>;
41
+ }, z.core.$strip>>>;
42
+ bars: z.ZodDefault<z.ZodArray<z.ZodObject<{
43
+ id: z.ZodString;
44
+ label: z.ZodString;
45
+ start: z.ZodString;
46
+ end: z.ZodString;
47
+ lane: z.ZodOptional<z.ZodString>;
48
+ tone: z.ZodOptional<z.ZodEnum<{
49
+ error: "error";
50
+ warning: "warning";
51
+ info: "info";
52
+ success: "success";
53
+ primary: "primary";
54
+ secondary: "secondary";
55
+ neutral: "neutral";
56
+ accent: "accent";
57
+ }>>;
58
+ progress: z.ZodOptional<z.ZodNumber>;
59
+ }, z.core.$strip>>>;
60
+ dependencies: z.ZodDefault<z.ZodArray<z.ZodObject<{
61
+ from: z.ZodString;
62
+ to: z.ZodString;
63
+ }, z.core.$strip>>>;
64
+ lanes: z.ZodOptional<z.ZodArray<z.ZodString>>;
65
+ }, z.core.$strip>;
66
+ export type TimelineParamsInput = z.input<typeof timelineParamsSchema>;
67
+ export type TimelineParams = z.output<typeof timelineParamsSchema>;
68
+ export type { ToneTokenT as ToneToken };
69
+ export declare const DAY_MS = 86400000;
70
+ /** ISO date(-time) → epoch ms. Date-only strings are UTC midnight. */
71
+ export declare function parseDay(v: string): number;
72
+ export declare function addDays(ms: number, days: number): number;
73
+ /** Calendar-aware ticks for the domain at the chosen zoom, snapped to real
74
+ * day/week/month boundaries (never "Mar 34"). Returns ≤ ~48 ticks; the step
75
+ * widens when the span is too long for the zoom. */
76
+ export declare function timeTicks(d0: number, d1: number, zoom: "day" | "week" | "month"): Tick[];
77
+ /** Full layout for the renderer. `nowMs` (client-only) adds the today line
78
+ * when it falls inside the domain; SSR passes null and the line is skipped
79
+ * — no hydration mismatch. */
80
+ export declare function layoutTimeline(p: TimelineParams, opts?: {
81
+ plotW: number;
82
+ laneW: number;
83
+ nowMs?: number | null;
84
+ }): TimelineLayout;
85
+ /** Dependency elbow path: from the END of bar A to the START of bar B,
86
+ * routed through the row gap. Points (not a path string) so the renderer
87
+ * draws + head-triangles it like every other polyline here. */
88
+ export declare function dependencyPoints(from: {
89
+ xEnd: number;
90
+ y: number;
91
+ }, to: {
92
+ xStart: number;
93
+ y: number;
94
+ }): Point[];
95
+ export interface TimelineRow {
96
+ kind: "milestone" | "bar";
97
+ label: string;
98
+ detail: string;
99
+ }
100
+ /** Flat rows for the accessible data fallback (sr-only table). */
101
+ export declare function timelineRows(p: TimelineParams): TimelineRow[];
102
+ export type { ToneTokenT } from "./constants.js";