@joewinke/jatui 0.37.0 → 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 (266) 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/package.json +11 -2
@@ -0,0 +1,16 @@
1
+ import type { BlockProps } from "../../types.js";
2
+ declare const ChecklistBlock: import("svelte").Component<BlockProps<{
3
+ rows: {
4
+ id: string;
5
+ title: string;
6
+ url?: string | undefined;
7
+ owner?: string | undefined;
8
+ note?: string | undefined;
9
+ status?: "in_progress" | "blocked" | "pass" | "fail" | "untested" | "ready" | undefined;
10
+ retestSince?: string | undefined;
11
+ }[];
12
+ title?: string | undefined;
13
+ teamMode?: boolean | undefined;
14
+ }>, {}, "">;
15
+ type ChecklistBlock = ReturnType<typeof ChecklistBlock>;
16
+ export default ChecklistBlock;
@@ -0,0 +1,105 @@
1
+ <script lang="ts" module>
2
+ /**
3
+ * The icons the content blocks draw (checklist, code, compare) — lucide
4
+ * paths (ISC), inline so jatui carries no icon-library dependency (MOS
5
+ * imported lucide-svelte). Renders the same `lucide lucide-<name>` classes
6
+ * the lucide components did, so selectors and tests keep working.
7
+ */
8
+ export type ContentIconName =
9
+ | "check"
10
+ | "copy"
11
+ | "play"
12
+ | "pause"
13
+ | "circle-check"
14
+ | "circle-x"
15
+ | "circle-pause"
16
+ | "circle-dashed"
17
+ | "circle-dot-dashed"
18
+ | "chevron-down"
19
+ | "external-link"
20
+ | "message-square-plus"
21
+ | "rotate-ccw"
22
+ </script>
23
+
24
+ <script lang="ts">
25
+ import type { SVGAttributes } from "svelte/elements"
26
+
27
+ let {
28
+ name,
29
+ size = 24,
30
+ strokeWidth = 2,
31
+ class: klass = "",
32
+ ...rest
33
+ }: {
34
+ name: ContentIconName
35
+ size?: number | string
36
+ strokeWidth?: number | string
37
+ class?: string
38
+ } & Omit<SVGAttributes<SVGSVGElement>, "class"> = $props()
39
+ </script>
40
+
41
+ <svg
42
+ xmlns="http://www.w3.org/2000/svg"
43
+ width={size}
44
+ height={size}
45
+ viewBox="0 0 24 24"
46
+ fill="none"
47
+ stroke="currentColor"
48
+ stroke-width={strokeWidth}
49
+ stroke-linecap="round"
50
+ stroke-linejoin="round"
51
+ class="lucide lucide-{name} {klass}"
52
+ {...rest}
53
+ >
54
+ {#if name === "check"}
55
+ <path d="M20 6 9 17l-5-5" />
56
+ {:else if name === "copy"}
57
+ <rect width="14" height="14" x="8" y="8" rx="2" ry="2" /><path
58
+ d="M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"
59
+ />
60
+ {:else if name === "play"}
61
+ <polygon points="6 3 20 12 6 21 6 3" />
62
+ {:else if name === "pause"}
63
+ <rect x="14" y="4" width="4" height="16" rx="1" /><rect
64
+ x="6"
65
+ y="4"
66
+ width="4"
67
+ height="16"
68
+ rx="1"
69
+ />
70
+ {:else if name === "circle-check"}
71
+ <circle cx="12" cy="12" r="10" /><path d="m9 12 2 2 4-4" />
72
+ {:else if name === "circle-x"}
73
+ <circle cx="12" cy="12" r="10" /><path d="m15 9-6 6" /><path d="m9 9 6 6" />
74
+ {:else if name === "circle-pause"}
75
+ <circle cx="12" cy="12" r="10" /><line x1="10" x2="10" y1="15" y2="9" /><line
76
+ x1="14"
77
+ x2="14"
78
+ y1="15"
79
+ y2="9"
80
+ />
81
+ {:else if name === "circle-dashed" || name === "circle-dot-dashed"}
82
+ <path d="M10.1 2.18a9.93 9.93 0 0 1 3.8 0" /><path
83
+ d="M17.6 3.71a9.95 9.95 0 0 1 2.69 2.7"
84
+ /><path d="M21.82 10.1a9.93 9.93 0 0 1 0 3.8" /><path
85
+ d="M20.29 17.6a9.95 9.95 0 0 1-2.7 2.69"
86
+ /><path d="M13.9 21.82a9.94 9.94 0 0 1-3.8 0" /><path
87
+ d="M6.4 20.29a9.95 9.95 0 0 1-2.69-2.7"
88
+ /><path d="M2.18 13.9a9.93 9.93 0 0 1 0-3.8" /><path
89
+ d="M3.71 6.4a9.95 9.95 0 0 1 2.7-2.69"
90
+ />
91
+ {#if name === "circle-dot-dashed"}<circle cx="12" cy="12" r="1" />{/if}
92
+ {:else if name === "chevron-down"}
93
+ <path d="m6 9 6 6 6-6" />
94
+ {:else if name === "external-link"}
95
+ <path d="M15 3h6v6" /><path d="M10 14 21 3" /><path
96
+ d="M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"
97
+ />
98
+ {:else if name === "message-square-plus"}
99
+ <path d="M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z" /><path
100
+ d="M12 7v6"
101
+ /><path d="M9 10h6" />
102
+ {:else}
103
+ <path d="M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8" /><path d="M3 3v5h5" />
104
+ {/if}
105
+ </svg>
@@ -0,0 +1,17 @@
1
+ /**
2
+ * The icons the content blocks draw (checklist, code, compare) — lucide
3
+ * paths (ISC), inline so jatui carries no icon-library dependency (MOS
4
+ * imported lucide-svelte). Renders the same `lucide lucide-<name>` classes
5
+ * the lucide components did, so selectors and tests keep working.
6
+ */
7
+ export type ContentIconName = "check" | "copy" | "play" | "pause" | "circle-check" | "circle-x" | "circle-pause" | "circle-dashed" | "circle-dot-dashed" | "chevron-down" | "external-link" | "message-square-plus" | "rotate-ccw";
8
+ import type { SVGAttributes } from "svelte/elements";
9
+ type $$ComponentProps = {
10
+ name: ContentIconName;
11
+ size?: number | string;
12
+ strokeWidth?: number | string;
13
+ class?: string;
14
+ } & Omit<SVGAttributes<SVGSVGElement>, "class">;
15
+ declare const Icon: import("svelte").Component<$$ComponentProps, {}, "">;
16
+ type Icon = ReturnType<typeof Icon>;
17
+ export default Icon;
@@ -0,0 +1,10 @@
1
+ /**
2
+ * checklist block — the living UAT / test checklist: rows with title, test
3
+ * URL, owner, per-viewer status + note.
4
+ */
5
+ import type { ArtifactBlockDef } from "../../types.js";
6
+ import { type ChecklistParams, type ChecklistRow } from "./schema.js";
7
+ declare const def: ArtifactBlockDef<ChecklistParams>;
8
+ export default def;
9
+ /** Re-exported for tests that build state payloads keyed by row. */
10
+ export type { ChecklistRow };
@@ -0,0 +1,63 @@
1
+ import ChecklistBlock from "./ChecklistBlock.svelte";
2
+ import { checklistItemReview } from "./itemReview.js";
3
+ import { checklistSchema, } from "./schema.js";
4
+ const EXAMPLE = {
5
+ title: "2026-10-08 deploy: UAT",
6
+ teamMode: true,
7
+ rows: [
8
+ {
9
+ id: "board-day-move",
10
+ title: "Scheduling board day-move gestures + bulk move",
11
+ url: "/admin/scheduling/board",
12
+ owner: "LateClay769",
13
+ note: "Drag a card to another day (spring arrows), then bulk-move 3 cards; expect the undo toast.",
14
+ status: "untested",
15
+ },
16
+ {
17
+ id: "team-roles",
18
+ title: "Per-member app roles (multi-role, primary)",
19
+ url: "/admin/team/members",
20
+ owner: "jw",
21
+ note: "Give a member two roles, change the primary, sign in as them and check the sidebar.",
22
+ status: "pass",
23
+ },
24
+ {
25
+ id: "blocks-phase1",
26
+ title: "Blocks artifacts render at /a/<slug>",
27
+ url: "/a/blocks-smoke",
28
+ owner: "agent",
29
+ note: "Publish a markdown + stats + callout page as blocks; open its URL signed in.",
30
+ status: "untested",
31
+ },
32
+ {
33
+ id: "caller-id-trusthub",
34
+ title: "Caller ID card shows real Trust Hub caller-NAME state",
35
+ url: "/admin/voice/calls",
36
+ owner: "agent",
37
+ status: "blocked",
38
+ },
39
+ {
40
+ id: "pe-booking-confirm",
41
+ title: "Booking confirmation email shows the visit window",
42
+ url: "/admin/scheduling/bookings",
43
+ owner: "agent",
44
+ note: "Fixed the timezone on the window; book a slot and check the email.",
45
+ status: "ready",
46
+ retestSince: "2026-10-11T15:00:00Z",
47
+ },
48
+ ],
49
+ };
50
+ const def = {
51
+ type: "checklist",
52
+ title: "Checklist (UAT / test rounds)",
53
+ description: "The living test checklist — a UAT table with URLs as a block: rows of { id, title, url, owner, note, status } where status is pass|fail|blocked|untested and url is the page that proves the row (https:// or root-relative). Viewers flip statuses and add notes on the page; that per-viewer state persists through saveState keyed on the row id, so keep row ids stable across republishes or verdicts lose their row. With teamMode:true the authored status renders as a shared 'Team' badge column (what the agents last recorded — update it by republishing the same slug, which is how agents append to the page as things deploy) beside the viewer's own private status. In teamMode the Team status also takes two team-only progress values: 'in_progress' (the team is working it) and 'ready' (fixed, ready for the viewer to retest) — pair 'ready' with retestSince (ISO timestamp of when it became ready) so a verdict saved before the fix counts as stale. A ready row the viewer has not re-verdicted shows a Retest chip and puts the page under Needs you in the host's inbox ('4 to retest'), with or without a jat task link — so record agent progress as structured statuses, never as 'READY TO RETEST' in the title. Retests are ROUNDS: when you mark a row ready with a NEW retestSince, the viewer's previous verdict and note lock into that row's history (shown read-only as 'Round 1 · Fail · …') and the new round starts blank, so a pass never sits beside a stale failure note; saved rows carry { status, note, at, statusAt, round, history[] }, where round is the retestSince the verdict answers. 1-200 rows; the progress line under the heading reads 'N of M decided · pass · fail · blocked · to retest', with filter chips (All / Needs you / Undecided / per verdict / Retest). Rows are keyboard cards: j/k move, a pass, x fail, b blocked, u undo, n note, Enter opens the test link, ? lists every key. Viewers can also sort (authored order default / status worst-first / owner / title) and group (none default / status / owner / Team-vs-You mismatch, with collapsible counted headers) — those layout choices live in the viewer's browser, not in block state. Use it for UAT lists, review rounds, deploy go/no-go boards and incident runbooks — anything a human works through top to bottom. Tip: one row per verifiable thing, link directly to the surface, put what-to-test in the note (multi-line notes render with their line breaks).",
54
+ schema: checklistSchema,
55
+ component: ChecklistBlock,
56
+ // mos-8fvt9: the section's Listen + comment sit on the heading row.
57
+ hostsTools: (p) => Boolean(p.title),
58
+ example: EXAMPLE,
59
+ interactive: true,
60
+ // The rows are the review units (the core census reads them here).
61
+ itemReview: checklistItemReview,
62
+ };
63
+ export default def;
@@ -0,0 +1,16 @@
1
+ /**
2
+ * The checklist's item-review hook (jatui-zy9n5): its rows are the review
3
+ * units the core census, still-open walk and Send read (types.ts
4
+ * BlockItemReview). Ported from MOS feedbackReview.ts `reviewItemsOf`'s
5
+ * checklist branch, so "is this row decided?" has the answer the block
6
+ * renders: an unsaved row shows its authored seed (untested in teamMode,
7
+ * where the seed is the TEAM's verdict), and a teamMode `ready` row the
8
+ * viewer has not re-verdicted since is undecided ("to retest"). MOS's
9
+ * census still seeded teamMode rows from the team status; this follows the
10
+ * component instead, so the page never counts the team's answer as yours.
11
+ *
12
+ * Params and state are the STORED JSON (untrusted, server-side too) — every
13
+ * field is checked, nothing here trusts the schema ran.
14
+ */
15
+ import type { BlockItemReview } from "../../types.js";
16
+ export declare const checklistItemReview: BlockItemReview;
@@ -0,0 +1,63 @@
1
+ import { rowAwaitsViewer, seedStatus } from "./retest.js";
2
+ const isObj = (v) => typeof v === "object" && v !== null && !Array.isArray(v);
3
+ const ROW_STATUSES = new Set(["pass", "fail", "blocked", "untested"]);
4
+ const VERDICT_OF = {
5
+ pass: "approved",
6
+ fail: "needs-work",
7
+ blocked: "needs-work",
8
+ };
9
+ /** Matches the schema's per-row note cap. */
10
+ const MAX_NOTE = 2000;
11
+ function rowsOf(params) {
12
+ const p = isObj(params) ? params : {};
13
+ return (Array.isArray(p.rows) ? p.rows : []).filter((r) => isObj(r) && typeof r.id === "string");
14
+ }
15
+ function items(params, state) {
16
+ const p = isObj(params) ? params : {};
17
+ const st = isObj(state) ? state : {};
18
+ const saved = isObj(st.rows) ? st.rows : {};
19
+ const out = [];
20
+ for (const row of rowsOf(params)) {
21
+ const id = row.id;
22
+ const teamRow = {
23
+ status: typeof row.status === "string" ? row.status : undefined,
24
+ retestSince: typeof row.retestSince === "string" ? row.retestSince : undefined,
25
+ };
26
+ const raw = saved[id];
27
+ const s = isObj(raw) ? raw : null;
28
+ const savedStatus = s && typeof s.status === "string" && ROW_STATUSES.has(s.status)
29
+ ? s.status
30
+ : null;
31
+ // An unsaved row: in teamMode the viewer starts untested (the Team
32
+ // column holds the team's verdict — ChecklistBlock viewerStatus, MOS
33
+ // mos-lsmve.16 F8); a solo checklist's authored status seeds it.
34
+ const status = savedStatus ?? (p.teamMode === true ? "untested" : seedStatus(teamRow));
35
+ const awaits = p.teamMode === true && rowAwaitsViewer(teamRow, s);
36
+ const item = {
37
+ id,
38
+ verdict: awaits ? null : (VERDICT_OF[status] ?? null),
39
+ raw: awaits || status === "untested" ? null : status,
40
+ explicit: savedStatus !== null,
41
+ retest: awaits,
42
+ };
43
+ if (s && typeof s.note === "string" && s.note.trim())
44
+ item.note = s.note.trim().slice(0, MAX_NOTE);
45
+ if (s && Array.isArray(s.attachments) && s.attachments.length > 0)
46
+ item.attachments = s.attachments;
47
+ out.push(item);
48
+ }
49
+ return out;
50
+ }
51
+ export const checklistItemReview = {
52
+ vocabulary: [
53
+ { id: "pass", label: "Pass", tone: "success" },
54
+ { id: "fail", label: "Fail", tone: "error" },
55
+ { id: "blocked", label: "Blocked", tone: "warning" },
56
+ ],
57
+ name: "Checklist",
58
+ items,
59
+ itemLabel(params, itemId) {
60
+ const row = rowsOf(params).find((r) => r.id === itemId);
61
+ return typeof row?.title === "string" ? row.title : itemId;
62
+ },
63
+ };
@@ -0,0 +1,62 @@
1
+ /**
2
+ * Checklist labels + tone maps (token classes only), shared by the component
3
+ * and tests. Kept out of the .svelte so both script blocks stay simple.
4
+ *
5
+ * Also home of the viewer's sort/group vocabulary (mos-iwmjz): those choices
6
+ * are browser-local UI preferences (localStorage), never block state — see
7
+ * ChecklistBlock.svelte.
8
+ */
9
+ import type { VerdictOption } from "../../../actions/reviewKeys.js";
10
+ import type { ChecklistStatus, ChecklistTeamStatus } from "./schema.js";
11
+ /** Row ordering choices for the header Sort control (authored = default). */
12
+ export declare const CHECKLIST_SORTS: readonly ["authored", "status", "owner", "title"];
13
+ export type ChecklistSort = (typeof CHECKLIST_SORTS)[number];
14
+ /** Row grouping choices for the header Group control (none = default). */
15
+ export declare const CHECKLIST_GROUPS: readonly ["none", "status", "owner", "mismatch"];
16
+ export type ChecklistGroup = (typeof CHECKLIST_GROUPS)[number];
17
+ /** Priority order for status sorts and status groups: worst first. */
18
+ export declare const STATUS_RANK: Record<ChecklistStatus, number>;
19
+ /** The Sort / Group menu choices inside ReviewFilterBar. */
20
+ export declare const SORT_OPTIONS: {
21
+ id: string;
22
+ label: string;
23
+ }[];
24
+ export declare const GROUP_OPTIONS: {
25
+ id: string;
26
+ label: string;
27
+ }[];
28
+ /**
29
+ * The viewer's verdicts, in the shared review vocabulary (Joe D4 = A): one
30
+ * array feeds VerdictControl (always-labelled buttons), ReviewNote
31
+ * (`opensNote`), reviewKeys (`key`: a pass, x fail, b blocked) and the
32
+ * ReviewProgress / ReviewFilterBar tones. "Untested" is not a verdict — it
33
+ * is what Undo returns a row to.
34
+ */
35
+ export declare const VERDICT_OPTIONS: VerdictOption[];
36
+ /**
37
+ * The checklist's old letters, accepted for ONE release (mos-lsmve.7) with
38
+ * a deprecation hint in the shortcuts modal. `u` is not here: it is Undo now.
39
+ * `f` is not here either (mos-lsmve.11): it is the shared "next item that
40
+ * needs you" key, and a reviewer who learned it on Gallery or Redline must
41
+ * never fail a row (and type into its note) by pressing it here.
42
+ */
43
+ export declare const LEGACY_KEYS: Record<string, ChecklistStatus>;
44
+ export declare const LABEL: Record<ChecklistStatus, string>;
45
+ export declare const ICON_TONE: Record<ChecklistStatus, string>;
46
+ /** The Team column's labels: the verdicts plus the team-only progress
47
+ * states (mos-mssz0). "Ready to retest" is the one that asks the viewer. */
48
+ export declare const TEAM_LABEL: Record<ChecklistTeamStatus, string>;
49
+ export declare const TEAM_ICON_TONE: Record<ChecklistTeamStatus, string>;
50
+ /** Read-only chips. Solid for the three verdicts (DESIGN.md: solid is the
51
+ * only variant that clears AA on every tone); untested is the QUIET ghost
52
+ * chip — a solid neutral made "not checked yet" the loudest thing on the
53
+ * list. */
54
+ export declare const STATUS_BADGE: Record<ChecklistStatus, string>;
55
+ /**
56
+ * Row title links. No outline on focus: the link is INLINE, and an inline
57
+ * outline paints once per line fragment, boxing every wrapped line (Joe,
58
+ * 2026-10-10). Focus is a cloned highlight + a 2px primary underline instead,
59
+ * which wraps cleanly. The resting underline keeps a link distinguishable
60
+ * from a plain (url-less) title without relying on colour.
61
+ */
62
+ export declare const TITLE_LINK = "underline decoration-base-content/30 underline-offset-[3px] box-decoration-clone hover:decoration-base-content focus-visible:outline-none focus-visible:bg-primary/15 focus-visible:decoration-primary focus-visible:decoration-2";
@@ -0,0 +1,96 @@
1
+ /** Row ordering choices for the header Sort control (authored = default). */
2
+ export const CHECKLIST_SORTS = ["authored", "status", "owner", "title"];
3
+ /** Row grouping choices for the header Group control (none = default). */
4
+ export const CHECKLIST_GROUPS = ["none", "status", "owner", "mismatch"];
5
+ /** Priority order for status sorts and status groups: worst first. */
6
+ export const STATUS_RANK = {
7
+ fail: 0,
8
+ blocked: 1,
9
+ untested: 2,
10
+ pass: 3,
11
+ };
12
+ const SORT_LABEL = {
13
+ authored: "Authored order",
14
+ status: "Status",
15
+ owner: "Owner",
16
+ title: "Title",
17
+ };
18
+ const GROUP_LABEL = {
19
+ none: "None",
20
+ status: "Status",
21
+ owner: "Owner",
22
+ mismatch: "Mismatch",
23
+ };
24
+ /** The Sort / Group menu choices inside ReviewFilterBar. */
25
+ export const SORT_OPTIONS = CHECKLIST_SORTS.map((id) => ({ id, label: SORT_LABEL[id] }));
26
+ export const GROUP_OPTIONS = CHECKLIST_GROUPS.map((id) => ({ id, label: GROUP_LABEL[id] }));
27
+ /**
28
+ * The viewer's verdicts, in the shared review vocabulary (Joe D4 = A): one
29
+ * array feeds VerdictControl (always-labelled buttons), ReviewNote
30
+ * (`opensNote`), reviewKeys (`key`: a pass, x fail, b blocked) and the
31
+ * ReviewProgress / ReviewFilterBar tones. "Untested" is not a verdict — it
32
+ * is what Undo returns a row to.
33
+ */
34
+ export const VERDICT_OPTIONS = [
35
+ { id: "pass", label: "Pass", tone: "success", key: "a" },
36
+ { id: "fail", label: "Fail", tone: "error", key: "x", opensNote: true },
37
+ {
38
+ id: "blocked",
39
+ label: "Blocked",
40
+ tone: "warning",
41
+ key: "b",
42
+ opensNote: true,
43
+ },
44
+ ];
45
+ /**
46
+ * The checklist's old letters, accepted for ONE release (mos-lsmve.7) with
47
+ * a deprecation hint in the shortcuts modal. `u` is not here: it is Undo now.
48
+ * `f` is not here either (mos-lsmve.11): it is the shared "next item that
49
+ * needs you" key, and a reviewer who learned it on Gallery or Redline must
50
+ * never fail a row (and type into its note) by pressing it here.
51
+ */
52
+ export const LEGACY_KEYS = {
53
+ p: "pass",
54
+ };
55
+ export const LABEL = {
56
+ pass: "Pass",
57
+ fail: "Fail",
58
+ blocked: "Blocked",
59
+ untested: "Untested",
60
+ };
61
+ export const ICON_TONE = {
62
+ pass: "text-success",
63
+ fail: "text-error",
64
+ blocked: "text-warning",
65
+ untested: "text-base-content/50",
66
+ };
67
+ /** The Team column's labels: the verdicts plus the team-only progress
68
+ * states (mos-mssz0). "Ready to retest" is the one that asks the viewer. */
69
+ export const TEAM_LABEL = {
70
+ ...LABEL,
71
+ ready: "Ready to retest",
72
+ in_progress: "In progress",
73
+ };
74
+ export const TEAM_ICON_TONE = {
75
+ ...ICON_TONE,
76
+ ready: "text-info",
77
+ in_progress: "text-base-content/70",
78
+ };
79
+ /** Read-only chips. Solid for the three verdicts (DESIGN.md: solid is the
80
+ * only variant that clears AA on every tone); untested is the QUIET ghost
81
+ * chip — a solid neutral made "not checked yet" the loudest thing on the
82
+ * list. */
83
+ export const STATUS_BADGE = {
84
+ pass: "badge-success",
85
+ fail: "badge-error",
86
+ blocked: "badge-warning",
87
+ untested: "badge-ghost",
88
+ };
89
+ /**
90
+ * Row title links. No outline on focus: the link is INLINE, and an inline
91
+ * outline paints once per line fragment, boxing every wrapped line (Joe,
92
+ * 2026-10-10). Focus is a cloned highlight + a 2px primary underline instead,
93
+ * which wraps cleanly. The resting underline keeps a link distinguishable
94
+ * from a plain (url-less) title without relying on colour.
95
+ */
96
+ export const TITLE_LINK = "underline decoration-base-content/30 underline-offset-[3px] box-decoration-clone hover:decoration-base-content focus-visible:outline-none focus-visible:bg-primary/15 focus-visible:decoration-primary focus-visible:decoration-2";
@@ -0,0 +1,43 @@
1
+ import { type ChecklistStatus } from "./schema.js";
2
+ /** The two authored row fields the team semantics read. Loose on purpose:
3
+ * the needs-you census hands in rows straight from stored spec JSON. */
4
+ interface TeamRow {
5
+ status?: string;
6
+ retestSince?: string;
7
+ }
8
+ /**
9
+ * The checklist's round model: verdicts live in `status` ("untested" is no
10
+ * verdict), and `statusAt` belongs to the round. A legacy save (no `round`)
11
+ * is measured by its statusAt, then its at — the same reading this module
12
+ * always made.
13
+ */
14
+ export declare const CHECKLIST_ROUNDS: {
15
+ roundOf: (entry: unknown) => string | null;
16
+ roundLabel: (round: string | null | undefined) => string;
17
+ sameRound: (a: string | null | undefined, b: string | null | undefined) => boolean;
18
+ isStale: (entry: unknown, current: string | null | undefined) => boolean;
19
+ parseHistory: (raw: unknown) => import("../../review/rounds.js").RoundLine[];
20
+ view: (raw: unknown, current: string | null | undefined, publisherHistory?: unknown) => import("../../review/rounds.js").RoundView;
21
+ save: (stored: unknown, patch: Record<string, unknown>, current: string | null | undefined) => Record<string, unknown>;
22
+ };
23
+ /** The round a row's verdict answers: its retestSince (null = no rounds). */
24
+ export declare function rowRound(row: TeamRow): string | null;
25
+ /**
26
+ * The status a viewer STARTS a row at. The authored status seeds it, except
27
+ * the team-only progress states (`ready`, `in_progress`): those describe the
28
+ * team, never a verdict, so the viewer starts untested.
29
+ */
30
+ export declare function seedStatus(row: TeamRow): ChecklistStatus;
31
+ /**
32
+ * Does this row wait on the viewer's (re)test? Only a `ready` team status
33
+ * asks. It is answered by a saved verdict other than untested in the
34
+ * CURRENT round: a save stamped with `round` answers it when that round is
35
+ * the row's retestSince (identity, so client clock skew cannot move it); an
36
+ * older, unstamped save answers it when its statusAt (else at) is at or
37
+ * after retestSince. A verdict with no timestamp at all cannot prove it is
38
+ * newer and leaves the row waiting.
39
+ *
40
+ * `saved` is untrusted stored JSON — every field is checked.
41
+ */
42
+ export declare function rowAwaitsViewer(row: TeamRow, saved: unknown): boolean;
43
+ export {};
@@ -0,0 +1,68 @@
1
+ /**
2
+ * Team-status + round semantics for the checklist block (mos-mssz0,
3
+ * mos-lsmve.7), shared by the component and the artifact-level needs-you
4
+ * derivation (src/lib/modules/artifacts/needsYou.ts) so "does this row await
5
+ * the viewer?" has exactly one answer.
6
+ *
7
+ * Rounds (docs/review-ux/proposal.md, Joe D1 = D2 = A): a row's round is its
8
+ * `retestSince`. The team marking the row ready with a new retestSince opens
9
+ * a round; the viewer's first save in it locks the previous {status, note,
10
+ * at} into `history[]` and starts blank. The move happens in
11
+ * `CHECKLIST_ROUNDS.save` (review/rounds.ts), on the viewer's own save.
12
+ */
13
+ import { useRounds } from "../../review/rounds.js";
14
+ import { CHECKLIST_STATUSES, } from "./schema.js";
15
+ function isViewerStatus(v) {
16
+ return (typeof v === "string" &&
17
+ CHECKLIST_STATUSES.includes(v));
18
+ }
19
+ /**
20
+ * The checklist's round model: verdicts live in `status` ("untested" is no
21
+ * verdict), and `statusAt` belongs to the round. A legacy save (no `round`)
22
+ * is measured by its statusAt, then its at — the same reading this module
23
+ * always made.
24
+ */
25
+ export const CHECKLIST_ROUNDS = useRounds({
26
+ verdictKey: "status",
27
+ verdicts: CHECKLIST_STATUSES,
28
+ emptyVerdict: "untested",
29
+ roundFields: ["statusAt"],
30
+ }, { stampKeys: ["statusAt", "at"] });
31
+ /** The round a row's verdict answers: its retestSince (null = no rounds). */
32
+ export function rowRound(row) {
33
+ return typeof row.retestSince === "string" && row.retestSince !== ""
34
+ ? row.retestSince
35
+ : null;
36
+ }
37
+ /**
38
+ * The status a viewer STARTS a row at. The authored status seeds it, except
39
+ * the team-only progress states (`ready`, `in_progress`): those describe the
40
+ * team, never a verdict, so the viewer starts untested.
41
+ */
42
+ export function seedStatus(row) {
43
+ return isViewerStatus(row.status) ? row.status : "untested";
44
+ }
45
+ /**
46
+ * Does this row wait on the viewer's (re)test? Only a `ready` team status
47
+ * asks. It is answered by a saved verdict other than untested in the
48
+ * CURRENT round: a save stamped with `round` answers it when that round is
49
+ * the row's retestSince (identity, so client clock skew cannot move it); an
50
+ * older, unstamped save answers it when its statusAt (else at) is at or
51
+ * after retestSince. A verdict with no timestamp at all cannot prove it is
52
+ * newer and leaves the row waiting.
53
+ *
54
+ * `saved` is untrusted stored JSON — every field is checked.
55
+ */
56
+ export function rowAwaitsViewer(row, saved) {
57
+ if (row.status !== "ready")
58
+ return false;
59
+ const s = typeof saved === "object" && saved !== null
60
+ ? saved
61
+ : null;
62
+ if (!s || !isViewerStatus(s.status) || s.status === "untested")
63
+ return true;
64
+ const round = rowRound(row);
65
+ if (!round || Number.isNaN(Date.parse(round)))
66
+ return false;
67
+ return CHECKLIST_ROUNDS.isStale(s, round);
68
+ }
@@ -0,0 +1,84 @@
1
+ /**
2
+ * Params schema for the checklist block (the living UAT / test checklist).
3
+ * Imported by block.ts (def), ChecklistBlock.svelte (props typing) and the
4
+ * tests — keeps them cycle-free.
5
+ */
6
+ import { z } from "zod";
7
+ import type { RoundLine } from "../../review/rounds.js";
8
+ export declare const CHECKLIST_STATUSES: readonly ["pass", "fail", "blocked", "untested"];
9
+ export type ChecklistStatus = (typeof CHECKLIST_STATUSES)[number];
10
+ /**
11
+ * The TEAM status vocabulary (teamMode only, mos-mssz0): the viewer's four
12
+ * verdicts plus two agent-side progress states a viewer never sets —
13
+ * `in_progress` (the team is working the row) and `ready` (fixed, ready for
14
+ * the viewer to retest). A `ready` row is what makes a page "need you" on
15
+ * /admin/artifacts without any jat task link.
16
+ */
17
+ declare const CHECKLIST_TEAM_STATUSES: readonly ["pass", "fail", "blocked", "untested", "ready", "in_progress"];
18
+ export type ChecklistTeamStatus = (typeof CHECKLIST_TEAM_STATUSES)[number];
19
+ declare const rowSchema: z.ZodObject<{
20
+ id: z.ZodString;
21
+ title: z.ZodString;
22
+ url: z.ZodOptional<z.ZodString>;
23
+ owner: z.ZodOptional<z.ZodString>;
24
+ note: z.ZodOptional<z.ZodString>;
25
+ status: z.ZodOptional<z.ZodEnum<{
26
+ in_progress: "in_progress";
27
+ blocked: "blocked";
28
+ pass: "pass";
29
+ fail: "fail";
30
+ untested: "untested";
31
+ ready: "ready";
32
+ }>>;
33
+ retestSince: z.ZodOptional<z.ZodISODateTime>;
34
+ }, z.core.$strip>;
35
+ export declare const checklistSchema: z.ZodObject<{
36
+ title: z.ZodOptional<z.ZodString>;
37
+ rows: z.ZodArray<z.ZodObject<{
38
+ id: z.ZodString;
39
+ title: z.ZodString;
40
+ url: z.ZodOptional<z.ZodString>;
41
+ owner: z.ZodOptional<z.ZodString>;
42
+ note: z.ZodOptional<z.ZodString>;
43
+ status: z.ZodOptional<z.ZodEnum<{
44
+ in_progress: "in_progress";
45
+ blocked: "blocked";
46
+ pass: "pass";
47
+ fail: "fail";
48
+ untested: "untested";
49
+ ready: "ready";
50
+ }>>;
51
+ retestSince: z.ZodOptional<z.ZodISODateTime>;
52
+ }, z.core.$strip>>;
53
+ teamMode: z.ZodOptional<z.ZodBoolean>;
54
+ }, z.core.$strip>;
55
+ /** Per-row state one viewer saves through ctx.saveState. */
56
+ export interface ChecklistRowState {
57
+ status?: ChecklistStatus;
58
+ note?: string;
59
+ /** ISO timestamp of the last change to this row. */
60
+ at?: string;
61
+ /** ISO timestamp of the last change to this row's STATUS (a note edit
62
+ * leaves it alone) — what a retest is measured against. */
63
+ statusAt?: string;
64
+ /** The round this verdict answers: the row's retestSince when it was set
65
+ * (mos-lsmve.7). Absent = round 1 (legacy) or a row without rounds. */
66
+ round?: string;
67
+ /** Earlier rounds, locked and newest first: { round, verdict, note, at }.
68
+ * Written by the viewer's first save in a new round (review/rounds.ts). */
69
+ history?: RoundLine[];
70
+ }
71
+ /**
72
+ * Per-viewer state the checklist block saves through ctx.saveState. A type
73
+ * alias, not an interface: only aliases get the implicit index signature that
74
+ * makes them assignable to BlockState (Record<string, unknown>).
75
+ */
76
+ export type ChecklistState = {
77
+ /** Keyed by row id; a row absent from the map uses its authored status. */
78
+ rows?: Record<string, ChecklistRowState>;
79
+ /** ISO timestamp of the last save. */
80
+ at?: string;
81
+ };
82
+ export type ChecklistRow = z.infer<typeof rowSchema>;
83
+ export type ChecklistParams = z.infer<typeof checklistSchema>;
84
+ export {};