@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 checklist from "./checklist/block.js";
2
+ import code from "./code/block.js";
3
+ import diff from "./diff/block.js";
4
+ import transcript from "./transcript/block.js";
5
+ import program from "./program/block.js";
6
+ import compare from "./compare/block.js";
7
+ export const BLOCKS = [
8
+ checklist,
9
+ code,
10
+ diff,
11
+ transcript,
12
+ program,
13
+ compare,
14
+ ];
15
+ /** This group's MOS block types still being ported. */
16
+ export const PENDING = [];
@@ -0,0 +1,10 @@
1
+ /**
2
+ * The data blocks (block task jatui-d4lyd). This barrel is the ONLY shared
3
+ * file that task edits: add a block by importing its def and appending it to
4
+ * BLOCKS, and remove its type from PENDING in the same change. builtins.ts
5
+ * concatenates the four group barrels; nothing else lists blocks.
6
+ */
7
+ import type { ArtifactBlockDef } from "../types.js";
8
+ export declare const BLOCKS: ArtifactBlockDef<any>[];
9
+ /** This group's MOS block types still being ported. */
10
+ export declare const PENDING: readonly string[];
@@ -0,0 +1,7 @@
1
+ import chart from "./chart/block.js";
2
+ import stats from "./stats/block.js";
3
+ import table from "./table/block.js";
4
+ import timeline from "./timeline/block.js";
5
+ export const BLOCKS = [chart, stats, table, timeline];
6
+ /** This group's MOS block types still being ported. */
7
+ export const PENDING = [];
@@ -0,0 +1,10 @@
1
+ /**
2
+ * The review / interactive blocks (block task jatui-n5z1x). This barrel is the ONLY shared
3
+ * file that task edits: add a block by importing its def and appending it to
4
+ * BLOCKS, and remove its type from PENDING in the same change. builtins.ts
5
+ * concatenates the four group barrels; nothing else lists blocks.
6
+ */
7
+ import type { ArtifactBlockDef } from "../types.js";
8
+ export declare const BLOCKS: ArtifactBlockDef<any>[];
9
+ /** This group's MOS block types still being ported. */
10
+ export declare const PENDING: readonly string[];
@@ -0,0 +1,12 @@
1
+ import callout from "./callout/block.js";
2
+ import actions from "./actions/block.js";
3
+ import diffReview from "./diff-review/block.js";
4
+ import mediaPicker from "./media-picker/block.js";
5
+ export const BLOCKS = [
6
+ callout,
7
+ actions,
8
+ diffReview,
9
+ mediaPicker,
10
+ ];
11
+ /** This group's MOS block types still being ported. */
12
+ export const PENDING = [];
@@ -0,0 +1,17 @@
1
+ /**
2
+ * The visual blocks (block task jatui-399p2). This barrel is the ONLY shared
3
+ * file that task edits: add a block by importing its def and appending it to
4
+ * BLOCKS, and remove its type from PENDING in the same change. builtins.ts
5
+ * concatenates the four group barrels; nothing else lists blocks.
6
+ *
7
+ * Host services these blocks read (HostAdapter.services, all optional):
8
+ * - map `loadGoogleMaps` — absent → the same data as a list;
9
+ * - explainer `explorer3d` (+ `parseExplorerSpec`) — absent → poster and a
10
+ * "not available here" notice;
11
+ * - mockup `sandboxAttr` — an override of the frame's token list;
12
+ * `allow-same-origin` is always stripped.
13
+ */
14
+ import type { ArtifactBlockDef } from "../types.js";
15
+ export declare const BLOCKS: ArtifactBlockDef<any>[];
16
+ /** This group's MOS block types still being ported. */
17
+ export declare const PENDING: readonly string[];
@@ -0,0 +1,14 @@
1
+ import diagram from "./diagram/block.js";
2
+ import collage from "./collage/block.js";
3
+ import map from "./map/block.js";
4
+ import explainer from "./explainer/block.js";
5
+ import mockup from "./mockup/block.js";
6
+ export const BLOCKS = [
7
+ diagram,
8
+ collage,
9
+ map,
10
+ explainer,
11
+ mockup,
12
+ ];
13
+ /** This group's MOS block types still being ported. */
14
+ export const PENDING = [];
@@ -0,0 +1,413 @@
1
+ <script lang="ts">
2
+ /**
3
+ * MapBlock — Google map of markers (+ optional route polylines), block
4
+ * type "map".
5
+ *
6
+ * The Maps JS API comes from the HOST: `ctx.services.loadGoogleMaps`
7
+ * (HostAdapter.services — jatui's loadGoogleMapsAPI with the host's key
8
+ * fits). jatui holds no key and reads no env. jatui's MapView
9
+ * itself is dispatch-shaped — fixed MapJob/MapAgent statuses, a dispatch
10
+ * legend, no polylines — so this block builds its markers, popup bubbles
11
+ * and polylines on the SAME loader + Maps primitives instead of forcing
12
+ * dispatch semantics onto artifact data.
13
+ *
14
+ * Without a loader (or a failed load) it renders the SAME data as a
15
+ * styled list — never a broken map, never a fake screenshot. The list is
16
+ * also the screen-reader surface when the map renders (sr-only), so the
17
+ * data is never locked inside Google's canvas.
18
+ *
19
+ * Colors inside the page (list, popup cards, pin DOM) reference theme
20
+ * CSS vars directly — the overlay lives in this document so vars resolve
21
+ * and a tenant reskin repaints the map furniture. The one exception is
22
+ * the polyline stroke: the Maps API paints it on a canvas and needs a
23
+ * concrete color string, so that value is resolved from the same vars at
24
+ * draw time (getComputedStyle), with a base-content fallback.
25
+ */
26
+ import type { BlockProps } from "../../types.js"
27
+ import {
28
+ boundsOf,
29
+ coordCaption,
30
+ MAP_DEFAULTS,
31
+ mapSchema,
32
+ normalizeMap,
33
+ toneOfMarker,
34
+ toneOfRoute,
35
+ type MapParams,
36
+ } from "./schema.js"
37
+
38
+ let { params: rawParams, ctx }: BlockProps<MapParams> = $props()
39
+
40
+ /** Parsed params (defaults filled); corrupt params → empty state. The host
41
+ * validates at publish, so this is belt-and-braces for direct mounts. */
42
+ const EMPTY_PARAMS: MapParams = { markers: [], routes: [] }
43
+ const parsed = $derived(mapSchema.safeParse(rawParams))
44
+ const params = $derived(parsed.success ? parsed.data : EMPTY_PARAMS)
45
+ const view = $derived(normalizeMap(params))
46
+
47
+ // ── the host's Maps loader (absent → the list is the whole block) ────────
48
+ const loadMaps = $derived(ctx?.services?.loadGoogleMaps)
49
+ const hasKey = $derived(typeof loadMaps === "function")
50
+
51
+ /** "list" until a map is confirmed; SSR and keyless render the list. */
52
+ let status = $state<"map" | "list">("list")
53
+ let failed = $state(false)
54
+
55
+ let containerEl = $state<HTMLDivElement | null>(null)
56
+ // Maps SDK objects are typed loosely (no @types/google.maps; see googleMapsLoader.ts).
57
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
58
+ let map: any = null
59
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
60
+ let overlays: any[] = []
61
+ // ── tone → CSS var (page-side furniture uses var() directly) ─────────────
62
+ const TONE_VAR: Record<string, string> = {
63
+ primary: "--color-primary",
64
+ secondary: "--color-secondary",
65
+ accent: "--color-accent",
66
+ neutral: "--color-neutral",
67
+ info: "--color-info",
68
+ success: "--color-success",
69
+ warning: "--color-warning",
70
+ error: "--color-error",
71
+ }
72
+
73
+ /** Concrete color for canvas-painted ink (polylines) — resolved from the
74
+ * same theme vars the DOM furniture uses. */
75
+ function cssVarColor(varName: string): string | null {
76
+ if (typeof window === "undefined") return null
77
+ const v = getComputedStyle(document.documentElement)
78
+ .getPropertyValue(varName)
79
+ .trim()
80
+ return v || null
81
+ }
82
+
83
+ function toneColor(tone: string): string | null {
84
+ return (
85
+ cssVarColor(TONE_VAR[tone] ?? TONE_VAR["primary"]) ??
86
+ cssVarColor(TONE_VAR["info"])
87
+ )
88
+ }
89
+
90
+ // ── init: load the Maps JS API, then swap the list for the map ───────────
91
+ $effect(() => {
92
+ const load = loadMaps
93
+ if (typeof load !== "function") return
94
+ let cancelled = false
95
+ ;(async () => {
96
+ try {
97
+ await load({ libraries: ["marker"] })
98
+ } catch {
99
+ /* handled below */
100
+ }
101
+ if (cancelled) return
102
+ if (typeof window !== "undefined" && window.google?.maps?.Map) {
103
+ status = "map"
104
+ } else {
105
+ failed = true
106
+ }
107
+ })()
108
+ return () => {
109
+ cancelled = true
110
+ }
111
+ })
112
+
113
+ // ── map construction once the container exists ────────────────────────────
114
+ $effect(() => {
115
+ const node = containerEl
116
+ if (!node || status !== "map") return
117
+ const g = window.google?.maps
118
+ if (!g?.Map) return
119
+
120
+ const firstMarker = view.markers[0]
121
+ const center =
122
+ view.center ??
123
+ (firstMarker
124
+ ? { lat: firstMarker.lat, lng: firstMarker.lng }
125
+ : { lat: 20, lng: 0 })
126
+ // An explicit zoom is respected; the default zoom is for a DATA view —
127
+ // an empty map at street zoom is an ocean, so fall back to a world view.
128
+ const zoom = view.zoom !== MAP_DEFAULTS.zoom || hasData ? view.zoom : 3
129
+ try {
130
+ map = new g.Map(node, {
131
+ center,
132
+ zoom,
133
+ mapId: "jatui-map-view",
134
+ mapTypeId: g.MapTypeId?.ROADMAP,
135
+ // Same quiet-tiles choice as jatui MapView: points of interest add
136
+ // noise an artifact map does not need.
137
+ styles: [
138
+ {
139
+ featureType: "poi",
140
+ elementType: "labels",
141
+ stylers: [{ visibility: "off" }],
142
+ },
143
+ ],
144
+ })
145
+ drawData(g)
146
+ if (view.fit) fitToData(g)
147
+ } catch {
148
+ failed = true
149
+ status = "list"
150
+ }
151
+
152
+ return () => {
153
+ for (const o of overlays) {
154
+ try {
155
+ if ("setMap" in o) o.setMap(null)
156
+ else if ("map" in o) o.map = null
157
+ if (typeof o.close === "function") o.close()
158
+ } catch {
159
+ /* overlay already gone */
160
+ }
161
+ }
162
+ overlays = []
163
+ map = null
164
+ }
165
+ })
166
+
167
+ // New params (republish) redraw the overlays on the live map.
168
+ $effect(() => {
169
+ const g = window.google?.maps
170
+ if (!map || !g) return
171
+ drawData(g)
172
+ if (view.fit) fitToData(g)
173
+ })
174
+
175
+ // ── markers + polylines + popups ──────────────────────────────────────────
176
+ function clearOverlays() {
177
+ for (const o of overlays) {
178
+ try {
179
+ if ("setMap" in o) o.setMap(null)
180
+ else if ("map" in o) o.map = null
181
+ if (typeof o.close === "function") o.close()
182
+ } catch {
183
+ /* overlay already gone */
184
+ }
185
+ }
186
+ overlays = []
187
+ }
188
+
189
+ function popupCard(label: string, m: { popup?: string; address?: string }) {
190
+ // Text-only node (textContent) — popup strings are untrusted agent input
191
+ // and are never parsed as HTML.
192
+ const card = document.createElement("div")
193
+ card.style.cssText =
194
+ "min-width:160px;max-width:280px;background:var(--color-base-100);color:var(--color-base-content);" +
195
+ "padding:10px 12px;border-radius:var(--jatui-radius-box, 0.5rem);" +
196
+ "font-family:inherit;font-size:0.875rem;line-height:1.4"
197
+ const head = document.createElement("div")
198
+ head.style.cssText = "font-weight:600;margin-bottom:2px"
199
+ head.textContent = label
200
+ card.appendChild(head)
201
+ if (m.popup) {
202
+ const body = document.createElement("div")
203
+ body.style.cssText =
204
+ "color:color-mix(in oklch, var(--color-base-content) 80%, transparent)"
205
+ body.textContent = m.popup
206
+ card.appendChild(body)
207
+ }
208
+ if (m.address) {
209
+ const addr = document.createElement("div")
210
+ addr.style.cssText =
211
+ "color:color-mix(in oklch, var(--color-base-content) 60%, transparent);font-size:0.8125rem;margin-top:2px"
212
+ addr.textContent = m.address
213
+ card.appendChild(addr)
214
+ }
215
+ return card
216
+ }
217
+
218
+ // Maps SDK objects are typed loosely (no @types/google.maps; see googleMapsLoader.ts).
219
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
220
+ function drawData(g: any) {
221
+ if (!map) return
222
+ clearOverlays()
223
+ const advanced = g.marker?.AdvancedMarkerElement
224
+ const infoClass = g.InfoWindow
225
+
226
+ for (const m of view.markers) {
227
+ const tone = toneOfMarker(m)
228
+ const position = { lat: m.lat, lng: m.lng }
229
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
230
+ let marker: any
231
+ try {
232
+ if (advanced) {
233
+ const pin = document.createElement("div")
234
+ pin.style.cssText = `width:24px;height:24px;border-radius:50%;background:var(${
235
+ TONE_VAR[tone] ?? TONE_VAR.primary
236
+ });border:2px solid var(--color-base-100)`
237
+ marker = new advanced({
238
+ position,
239
+ map,
240
+ title: m.label,
241
+ content: pin,
242
+ })
243
+ } else {
244
+ marker = new g.Marker({ position, map, title: m.label })
245
+ }
246
+ } catch {
247
+ try {
248
+ marker = new g.Marker({ position, map, title: m.label })
249
+ } catch {
250
+ continue
251
+ }
252
+ }
253
+ overlays.push(marker)
254
+ if (infoClass && (m.popup || m.address)) {
255
+ const info = new infoClass({ content: popupCard(m.label, m) })
256
+ overlays.push(info)
257
+ marker.addListener("click", () => info.open(map, marker))
258
+ }
259
+ }
260
+
261
+ for (const r of view.routes) {
262
+ const tone = toneOfRoute(r)
263
+ const color = toneColor(tone)
264
+ if (!color) continue // unstyled environment (tests): skip canvas ink
265
+ try {
266
+ const line = new g.Polyline({
267
+ path: r.points.map((p) => ({ lat: p.lat, lng: p.lng })),
268
+ map,
269
+ strokeColor: color,
270
+ strokeOpacity: 0.85,
271
+ strokeWeight: 4,
272
+ })
273
+ overlays.push(line)
274
+ } catch {
275
+ /* a bad route never breaks the map */
276
+ }
277
+ }
278
+ }
279
+
280
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
281
+ function fitToData(g: any) {
282
+ if (!map) return
283
+ const b = boundsOf(view.markers, view.routes)
284
+ if (!b) return
285
+ try {
286
+ const bounds = new g.LatLngBounds()
287
+ for (const m of view.markers) bounds.extend({ lat: m.lat, lng: m.lng })
288
+ for (const r of view.routes) for (const p of r.points) bounds.extend(p)
289
+ map.fitBounds(bounds, 60)
290
+ // A single-pin fit can zoom absurdly close — cap like jatui MapView.
291
+ const listener = g.event.addListener(map, "idle", () => {
292
+ if ((map.getZoom() ?? 0) > 15) map.setZoom(15)
293
+ g.event.removeListener(listener)
294
+ })
295
+ } catch {
296
+ /* leave the manual view */
297
+ }
298
+ }
299
+
300
+ // ── list (fallback + screen-reader surface) ──────────────────────────────
301
+ const DOT_CLASS: Record<string, string> = {
302
+ primary: "bg-primary",
303
+ secondary: "bg-secondary",
304
+ accent: "bg-accent",
305
+ neutral: "bg-neutral",
306
+ info: "bg-info",
307
+ success: "bg-success",
308
+ warning: "bg-warning",
309
+ error: "bg-error",
310
+ }
311
+ const LINE_CLASS: Record<string, string> = {
312
+ primary: "bg-primary/70",
313
+ secondary: "bg-secondary/70",
314
+ accent: "bg-accent/70",
315
+ neutral: "bg-neutral/70",
316
+ info: "bg-info/70",
317
+ success: "bg-success/70",
318
+ warning: "bg-warning/70",
319
+ error: "bg-error/70",
320
+ }
321
+ const hasData = $derived(view.markers.length > 0 || view.routes.length > 0)
322
+ </script>
323
+
324
+ <section class="artifact-map w-full">
325
+ {#if view.title}
326
+ <div class="mb-2 text-sm font-medium text-base-content/70">
327
+ {view.title}
328
+ </div>
329
+ {/if}
330
+
331
+ {#if status === "map"}
332
+ <div
333
+ bind:this={containerEl}
334
+ class="w-full overflow-hidden rounded-box border border-base-300"
335
+ style="height: {view.height}px"
336
+ aria-hidden="true"
337
+ ></div>
338
+ {/if}
339
+
340
+ <!-- The list is the no-key fallback AND the screen-reader mirror of the map. -->
341
+ <div class={status === "map" ? "sr-only" : "mt-3"}>
342
+ {#if !hasData}
343
+ <p class="text-sm text-base-content/50">
344
+ No markers or routes published for this map.
345
+ </p>
346
+ {:else}
347
+ {#if view.markers.length > 0}
348
+ <ul class="flex flex-col gap-2">
349
+ {#each view.markers as m, i (i)}
350
+ <li class="flex items-start gap-2.5 text-sm">
351
+ <span
352
+ class="mt-1 inline-block size-3 shrink-0 rounded-full {DOT_CLASS[
353
+ toneOfMarker(m)
354
+ ]}"
355
+ aria-hidden="true"
356
+ ></span>
357
+ <span class="min-w-0">
358
+ <span class="font-medium">{m.label}</span>
359
+ <span class="text-2xs text-base-content/45">
360
+ {coordCaption(m.lat, m.lng)}</span
361
+ >
362
+ {#if m.popup}
363
+ <span class="block text-base-content/75">{m.popup}</span>
364
+ {/if}
365
+ {#if m.address}
366
+ <span class="block text-base-content/55">{m.address}</span>
367
+ {/if}
368
+ </span>
369
+ </li>
370
+ {/each}
371
+ </ul>
372
+ {/if}
373
+ {#if view.routes.length > 0}
374
+ <ul class="mt-3 flex flex-col gap-2">
375
+ {#each view.routes as r, i (i)}
376
+ {@const tone = toneOfRoute(r)}
377
+ <li class="flex items-start gap-2.5 text-sm">
378
+ <span
379
+ class="mt-1.5 inline-block h-1 w-6 shrink-0 rounded-full {LINE_CLASS[
380
+ tone
381
+ ]}"
382
+ aria-hidden="true"
383
+ ></span>
384
+ <span class="min-w-0">
385
+ <span class="font-medium">{r.label ?? "Route"}</span>
386
+ <span class="text-2xs text-base-content/45">
387
+ {r.points.length} point{r.points.length === 1 ? "" : "s"}
388
+ · {coordCaption(r.points[0].lat, r.points[0].lng)} →
389
+ {coordCaption(
390
+ r.points.at(-1)!.lat,
391
+ r.points.at(-1)!.lng,
392
+ )}</span
393
+ >
394
+ </span>
395
+ </li>
396
+ {/each}
397
+ </ul>
398
+ {/if}
399
+ {#if status === "list"}
400
+ <p class="mt-3 text-2xs text-base-content/45">
401
+ {#if !hasKey}
402
+ The map view is not available here; the same data is listed
403
+ here.
404
+ {:else if failed}
405
+ The map could not load; the same data is listed here.
406
+ {:else}
407
+ Loading map…
408
+ {/if}
409
+ </p>
410
+ {/if}
411
+ {/if}
412
+ </div>
413
+ </section>
@@ -0,0 +1,53 @@
1
+ /**
2
+ * MapBlock — Google map of markers (+ optional route polylines), block
3
+ * type "map".
4
+ *
5
+ * The Maps JS API comes from the HOST: `ctx.services.loadGoogleMaps`
6
+ * (HostAdapter.services — jatui's loadGoogleMapsAPI with the host's key
7
+ * fits). jatui holds no key and reads no env. jatui's MapView
8
+ * itself is dispatch-shaped — fixed MapJob/MapAgent statuses, a dispatch
9
+ * legend, no polylines — so this block builds its markers, popup bubbles
10
+ * and polylines on the SAME loader + Maps primitives instead of forcing
11
+ * dispatch semantics onto artifact data.
12
+ *
13
+ * Without a loader (or a failed load) it renders the SAME data as a
14
+ * styled list — never a broken map, never a fake screenshot. The list is
15
+ * also the screen-reader surface when the map renders (sr-only), so the
16
+ * data is never locked inside Google's canvas.
17
+ *
18
+ * Colors inside the page (list, popup cards, pin DOM) reference theme
19
+ * CSS vars directly — the overlay lives in this document so vars resolve
20
+ * and a tenant reskin repaints the map furniture. The one exception is
21
+ * the polyline stroke: the Maps API paints it on a canvas and needs a
22
+ * concrete color string, so that value is resolved from the same vars at
23
+ * draw time (getComputedStyle), with a base-content fallback.
24
+ */
25
+ import type { BlockProps } from "../../types.js";
26
+ declare const MapBlock: import("svelte").Component<BlockProps<{
27
+ title?: string | undefined;
28
+ height?: number | undefined;
29
+ center?: {
30
+ lat: number;
31
+ lng: number;
32
+ } | undefined;
33
+ zoom?: number | undefined;
34
+ fit?: boolean | undefined;
35
+ markers?: {
36
+ label: string;
37
+ lat: number;
38
+ lng: number;
39
+ tone?: "error" | "warning" | "info" | "success" | "primary" | "secondary" | "neutral" | "accent" | undefined;
40
+ popup?: string | undefined;
41
+ address?: string | undefined;
42
+ }[] | undefined;
43
+ routes?: {
44
+ points: {
45
+ lat: number;
46
+ lng: number;
47
+ }[];
48
+ label?: string | undefined;
49
+ tone?: "error" | "warning" | "info" | "success" | "primary" | "secondary" | "neutral" | "accent" | undefined;
50
+ }[] | undefined;
51
+ }>, {}, "">;
52
+ type MapBlock = ReturnType<typeof MapBlock>;
53
+ export default MapBlock;
@@ -0,0 +1,9 @@
1
+ /**
2
+ * map block — a Google map of labeled, toned markers with popup text,
3
+ * optional route polylines, auto-fit bounds; falls back to a styled list
4
+ * without a Maps key.
5
+ */
6
+ import type { ArtifactBlockDef } from "../../types";
7
+ import { type MapParams } from "./schema";
8
+ declare const def: ArtifactBlockDef<MapParams>;
9
+ export default def;
@@ -0,0 +1,62 @@
1
+ import MapBlock from "./MapBlock.svelte";
2
+ import { mapSchema } from "./schema";
3
+ const EXAMPLE = {
4
+ title: "Tuesday route — cedar park loop",
5
+ height: 460,
6
+ markers: [
7
+ {
8
+ label: "Depot — load out 7:30",
9
+ lat: 30.5052,
10
+ lng: -97.6781,
11
+ tone: "primary",
12
+ popup: "Crew A loads water + salt here. Gate code 4417.",
13
+ address: "1401 Bell Springs Rd",
14
+ },
15
+ {
16
+ label: "Stop 1 — refill (late start)",
17
+ lat: 30.4487,
18
+ lng: -97.7145,
19
+ tone: "warning",
20
+ popup: "Customer flagged a 10:00-not-before window — rescheduled twice.",
21
+ address: "900 Great Oaks Dr",
22
+ },
23
+ {
24
+ label: "Stop 2 — new install",
25
+ lat: 30.4618,
26
+ lng: -97.6406,
27
+ tone: "success",
28
+ popup: "Softener install confirmed; photos due before leaving site.",
29
+ address: "2701 Arrowhead Dr",
30
+ },
31
+ {
32
+ label: "Stop 3 — billing pickup",
33
+ lat: 30.5226,
34
+ lng: -97.6905,
35
+ tone: "secondary",
36
+ popup: "Collect cheque for invoice #2041 (2 attempts made).",
37
+ address: "301 Discovery Blvd",
38
+ },
39
+ ],
40
+ routes: [
41
+ {
42
+ label: "Planned loop",
43
+ tone: "info",
44
+ points: [
45
+ { lat: 30.5052, lng: -97.6781 },
46
+ { lat: 30.4487, lng: -97.7145 },
47
+ { lat: 30.4618, lng: -97.6406 },
48
+ { lat: 30.5226, lng: -97.6905 },
49
+ { lat: 30.5052, lng: -97.6781 },
50
+ ],
51
+ },
52
+ ],
53
+ };
54
+ const def = {
55
+ type: "map",
56
+ title: "Map (markers + routes)",
57
+ description: "A Google map of labeled, toned markers with click popup text, optional route polylines, and bounds auto-fitted to everything (or a manual center/zoom). Uses the workspace's PUBLIC_GOOGLE_MAPS_API_KEY — the same key the booking panel and dispatch map use; WITHOUT a key it renders the identical data as a styled list instead, so never substitute a screenshot. markers: {label, lat, lng, tone (theme token: primary/secondary/accent/neutral/info/success/warning/error — color-codes meaning like 'problem stop' warning), popup (text in the click bubble), address}. routes: {label, tone, points: [{lat,lng}]} drawn as polylines (2–500 points each). fit (default true) frames every marker + route point; set fit:false and give center {lat,lng} + zoom (1–20) to control the view yourself. height 220–800px (default 420). Caps: 50 markers, 10 routes. Coordinates are WGS-84 decimals — geocode addresses BEFORE publishing (an address string is not accepted). Tip: keep ≤ 20 markers for readable pins; tone the one problematic stop warning/error and everything else neutral/primary so the map reads at a glance; put turn-by-turn detail in a markdown block beside the map.",
58
+ schema: mapSchema,
59
+ component: MapBlock,
60
+ example: EXAMPLE,
61
+ };
62
+ export default def;