@12ui/design 0.2.80 → 0.2.81

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 (276) hide show
  1. package/README.md +1 -3
  2. package/SKILL.md +2 -8
  3. package/dist/cli-help/design.d.ts +1 -1
  4. package/dist/cli-help/design.d.ts.map +1 -1
  5. package/dist/cli-help/design.js +0 -1
  6. package/dist/cli-help/design.js.map +1 -1
  7. package/dist/cli-help/index.d.ts +1 -1
  8. package/dist/cli-workspace-draw.d.ts.map +1 -1
  9. package/dist/cli-workspace-draw.js +2 -0
  10. package/dist/cli-workspace-draw.js.map +1 -1
  11. package/dist/cli-workspace-runner.d.ts.map +1 -1
  12. package/dist/cli-workspace-runner.js +2 -1
  13. package/dist/cli-workspace-runner.js.map +1 -1
  14. package/dist/corpus-client.d.ts +3 -0
  15. package/dist/corpus-client.d.ts.map +1 -1
  16. package/dist/corpus-client.js +2 -0
  17. package/dist/corpus-client.js.map +1 -1
  18. package/dist/corpus-public-renditions.d.ts +33 -0
  19. package/dist/corpus-public-renditions.d.ts.map +1 -0
  20. package/dist/corpus-public-renditions.js +55 -0
  21. package/dist/corpus-public-renditions.js.map +1 -0
  22. package/dist/legacy-skill-catalog.d.ts.map +1 -1
  23. package/dist/legacy-skill-catalog.js +11 -0
  24. package/dist/legacy-skill-catalog.js.map +1 -1
  25. package/dist/mcp-slate-command.d.ts +0 -2
  26. package/dist/mcp-slate-command.d.ts.map +1 -1
  27. package/dist/mcp-slate-command.js +0 -4
  28. package/dist/mcp-slate-command.js.map +1 -1
  29. package/dist/mcp-slate-resource.d.ts.map +1 -1
  30. package/dist/mcp-slate-resource.js +6 -4
  31. package/dist/mcp-slate-resource.js.map +1 -1
  32. package/dist/mcp-slate-tool-defs.d.ts.map +1 -1
  33. package/dist/mcp-slate-tool-defs.js +8 -6
  34. package/dist/mcp-slate-tool-defs.js.map +1 -1
  35. package/dist/mcp-slate-tools.d.ts.map +1 -1
  36. package/dist/mcp-slate-tools.js +8 -1
  37. package/dist/mcp-slate-tools.js.map +1 -1
  38. package/dist/mcp-slate-ui-copy.d.ts +88 -208
  39. package/dist/mcp-slate-ui-copy.d.ts.map +1 -1
  40. package/dist/mcp-slate-ui-copy.js +58 -159
  41. package/dist/mcp-slate-ui-copy.js.map +1 -1
  42. package/dist/mcp-slate-ui-locales/de-DE.d.ts.map +1 -1
  43. package/dist/mcp-slate-ui-locales/de-DE.js +44 -83
  44. package/dist/mcp-slate-ui-locales/de-DE.js.map +1 -1
  45. package/dist/mcp-slate-ui-locales/es-419.d.ts.map +1 -1
  46. package/dist/mcp-slate-ui-locales/es-419.js +44 -83
  47. package/dist/mcp-slate-ui-locales/es-419.js.map +1 -1
  48. package/dist/mcp-slate-ui-locales/es-ES.d.ts.map +1 -1
  49. package/dist/mcp-slate-ui-locales/es-ES.js +44 -83
  50. package/dist/mcp-slate-ui-locales/es-ES.js.map +1 -1
  51. package/dist/mcp-slate-ui-locales/fr-FR.d.ts.map +1 -1
  52. package/dist/mcp-slate-ui-locales/fr-FR.js +44 -83
  53. package/dist/mcp-slate-ui-locales/fr-FR.js.map +1 -1
  54. package/dist/mcp-slate-ui-locales/hi-IN.d.ts.map +1 -1
  55. package/dist/mcp-slate-ui-locales/hi-IN.js +44 -83
  56. package/dist/mcp-slate-ui-locales/hi-IN.js.map +1 -1
  57. package/dist/mcp-slate-ui-locales/it-IT.d.ts.map +1 -1
  58. package/dist/mcp-slate-ui-locales/it-IT.js +44 -83
  59. package/dist/mcp-slate-ui-locales/it-IT.js.map +1 -1
  60. package/dist/mcp-slate-ui-locales/ja-JP.d.ts.map +1 -1
  61. package/dist/mcp-slate-ui-locales/ja-JP.js +44 -83
  62. package/dist/mcp-slate-ui-locales/ja-JP.js.map +1 -1
  63. package/dist/mcp-slate-ui-locales/ko-KR.d.ts.map +1 -1
  64. package/dist/mcp-slate-ui-locales/ko-KR.js +44 -83
  65. package/dist/mcp-slate-ui-locales/ko-KR.js.map +1 -1
  66. package/dist/mcp-slate-ui-locales/pt-BR.d.ts.map +1 -1
  67. package/dist/mcp-slate-ui-locales/pt-BR.js +44 -83
  68. package/dist/mcp-slate-ui-locales/pt-BR.js.map +1 -1
  69. package/dist/mcp-slate-ui-locales/zh-CN.d.ts.map +1 -1
  70. package/dist/mcp-slate-ui-locales/zh-CN.js +44 -83
  71. package/dist/mcp-slate-ui-locales/zh-CN.js.map +1 -1
  72. package/dist/mcp-slate-ui-locales/zh-TW.d.ts.map +1 -1
  73. package/dist/mcp-slate-ui-locales/zh-TW.js +44 -83
  74. package/dist/mcp-slate-ui-locales/zh-TW.js.map +1 -1
  75. package/dist/mcp-slate-ui-script-bridge.d.ts.map +1 -1
  76. package/dist/mcp-slate-ui-script-bridge.js +19 -7
  77. package/dist/mcp-slate-ui-script-bridge.js.map +1 -1
  78. package/dist/mcp-slate-ui-script-browser.d.ts.map +1 -1
  79. package/dist/mcp-slate-ui-script-browser.js +0 -3
  80. package/dist/mcp-slate-ui-script-browser.js.map +1 -1
  81. package/dist/mcp-slate-ui-script-designs.d.ts +17 -0
  82. package/dist/mcp-slate-ui-script-designs.d.ts.map +1 -0
  83. package/dist/mcp-slate-ui-script-designs.js +365 -0
  84. package/dist/mcp-slate-ui-script-designs.js.map +1 -0
  85. package/dist/mcp-slate-ui-script-edit.d.ts +9 -0
  86. package/dist/mcp-slate-ui-script-edit.d.ts.map +1 -0
  87. package/dist/mcp-slate-ui-script-edit.js +71 -0
  88. package/dist/mcp-slate-ui-script-edit.js.map +1 -0
  89. package/dist/mcp-slate-ui-script-inline.d.ts +3 -9
  90. package/dist/mcp-slate-ui-script-inline.d.ts.map +1 -1
  91. package/dist/mcp-slate-ui-script-inline.js +28 -155
  92. package/dist/mcp-slate-ui-script-inline.js.map +1 -1
  93. package/dist/mcp-slate-ui-script-inspiration-collage.d.ts +13 -12
  94. package/dist/mcp-slate-ui-script-inspiration-collage.d.ts.map +1 -1
  95. package/dist/mcp-slate-ui-script-inspiration-collage.js +24 -24
  96. package/dist/mcp-slate-ui-script-inspiration-collage.js.map +1 -1
  97. package/dist/mcp-slate-ui-script-inspiration-gallery.d.ts +23 -0
  98. package/dist/mcp-slate-ui-script-inspiration-gallery.d.ts.map +1 -0
  99. package/dist/mcp-slate-ui-script-inspiration-gallery.js +221 -0
  100. package/dist/mcp-slate-ui-script-inspiration-gallery.js.map +1 -0
  101. package/dist/mcp-slate-ui-script-inspiration-grid.d.ts +14 -21
  102. package/dist/mcp-slate-ui-script-inspiration-grid.d.ts.map +1 -1
  103. package/dist/mcp-slate-ui-script-inspiration-grid.js +124 -196
  104. package/dist/mcp-slate-ui-script-inspiration-grid.js.map +1 -1
  105. package/dist/mcp-slate-ui-script-inspiration.d.ts +8 -9
  106. package/dist/mcp-slate-ui-script-inspiration.d.ts.map +1 -1
  107. package/dist/mcp-slate-ui-script-inspiration.js +213 -130
  108. package/dist/mcp-slate-ui-script-inspiration.js.map +1 -1
  109. package/dist/mcp-slate-ui-script-l10n.d.ts.map +1 -1
  110. package/dist/mcp-slate-ui-script-l10n.js +2 -0
  111. package/dist/mcp-slate-ui-script-l10n.js.map +1 -1
  112. package/dist/mcp-slate-ui-script-more.d.ts +4 -33
  113. package/dist/mcp-slate-ui-script-more.d.ts.map +1 -1
  114. package/dist/mcp-slate-ui-script-more.js +6 -279
  115. package/dist/mcp-slate-ui-script-more.js.map +1 -1
  116. package/dist/mcp-slate-ui-script-pause.d.ts +10 -6
  117. package/dist/mcp-slate-ui-script-pause.d.ts.map +1 -1
  118. package/dist/mcp-slate-ui-script-pause.js +45 -30
  119. package/dist/mcp-slate-ui-script-pause.js.map +1 -1
  120. package/dist/mcp-slate-ui-script-references.d.ts +19 -0
  121. package/dist/mcp-slate-ui-script-references.d.ts.map +1 -0
  122. package/dist/mcp-slate-ui-script-references.js +102 -0
  123. package/dist/mcp-slate-ui-script-references.js.map +1 -0
  124. package/dist/mcp-slate-ui-script-remote.d.ts +13 -12
  125. package/dist/mcp-slate-ui-script-remote.d.ts.map +1 -1
  126. package/dist/mcp-slate-ui-script-remote.js +46 -27
  127. package/dist/mcp-slate-ui-script-remote.js.map +1 -1
  128. package/dist/mcp-slate-ui-script-scribble.d.ts +2 -2
  129. package/dist/mcp-slate-ui-script-scribble.js +7 -7
  130. package/dist/mcp-slate-ui-script-select.d.ts +4 -9
  131. package/dist/mcp-slate-ui-script-select.d.ts.map +1 -1
  132. package/dist/mcp-slate-ui-script-select.js +13 -37
  133. package/dist/mcp-slate-ui-script-select.js.map +1 -1
  134. package/dist/mcp-slate-ui-script-stage.d.ts +4 -10
  135. package/dist/mcp-slate-ui-script-stage.d.ts.map +1 -1
  136. package/dist/mcp-slate-ui-script-stage.js +28 -141
  137. package/dist/mcp-slate-ui-script-stage.js.map +1 -1
  138. package/dist/mcp-slate-ui-script-state.d.ts +1 -1
  139. package/dist/mcp-slate-ui-script-state.d.ts.map +1 -1
  140. package/dist/mcp-slate-ui-script-state.js +9 -4
  141. package/dist/mcp-slate-ui-script-state.js.map +1 -1
  142. package/dist/mcp-slate-ui-script-viewer.d.ts +18 -0
  143. package/dist/mcp-slate-ui-script-viewer.d.ts.map +1 -0
  144. package/dist/mcp-slate-ui-script-viewer.js +405 -0
  145. package/dist/mcp-slate-ui-script-viewer.js.map +1 -0
  146. package/dist/mcp-slate-ui-script.d.ts +4 -5
  147. package/dist/mcp-slate-ui-script.d.ts.map +1 -1
  148. package/dist/mcp-slate-ui-script.js +12 -13
  149. package/dist/mcp-slate-ui-script.js.map +1 -1
  150. package/dist/mcp-slate-ui-styles-designs.d.ts +10 -0
  151. package/dist/mcp-slate-ui-styles-designs.d.ts.map +1 -0
  152. package/dist/mcp-slate-ui-styles-designs.js +121 -0
  153. package/dist/mcp-slate-ui-styles-designs.js.map +1 -0
  154. package/dist/mcp-slate-ui-styles-inspiration.d.ts +13 -13
  155. package/dist/mcp-slate-ui-styles-inspiration.d.ts.map +1 -1
  156. package/dist/mcp-slate-ui-styles-inspiration.js +67 -33
  157. package/dist/mcp-slate-ui-styles-inspiration.js.map +1 -1
  158. package/dist/mcp-slate-ui-styles-pause.d.ts +2 -2
  159. package/dist/mcp-slate-ui-styles-pause.d.ts.map +1 -1
  160. package/dist/mcp-slate-ui-styles-pause.js +4 -8
  161. package/dist/mcp-slate-ui-styles-pause.js.map +1 -1
  162. package/dist/mcp-slate-ui-styles-stage.d.ts +3 -22
  163. package/dist/mcp-slate-ui-styles-stage.d.ts.map +1 -1
  164. package/dist/mcp-slate-ui-styles-stage.js +6 -74
  165. package/dist/mcp-slate-ui-styles-stage.js.map +1 -1
  166. package/dist/mcp-slate-ui-styles.d.ts +12 -19
  167. package/dist/mcp-slate-ui-styles.d.ts.map +1 -1
  168. package/dist/mcp-slate-ui-styles.js +97 -100
  169. package/dist/mcp-slate-ui-styles.js.map +1 -1
  170. package/dist/mcp-slate-ui.d.ts +12 -12
  171. package/dist/mcp-slate-ui.d.ts.map +1 -1
  172. package/dist/mcp-slate-ui.js +24 -23
  173. package/dist/mcp-slate-ui.js.map +1 -1
  174. package/dist/server.d.ts.map +1 -1
  175. package/dist/server.js +2 -0
  176. package/dist/server.js.map +1 -1
  177. package/dist/slate-actions.d.ts +22 -1
  178. package/dist/slate-actions.d.ts.map +1 -1
  179. package/dist/slate-actions.js +46 -2
  180. package/dist/slate-actions.js.map +1 -1
  181. package/dist/slate-browser-host.d.ts +8 -7
  182. package/dist/slate-browser-host.d.ts.map +1 -1
  183. package/dist/slate-browser-host.js +13 -10
  184. package/dist/slate-browser-host.js.map +1 -1
  185. package/dist/slate-browser-server.d.ts.map +1 -1
  186. package/dist/slate-browser-server.js +10 -4
  187. package/dist/slate-browser-server.js.map +1 -1
  188. package/dist/slate-commit.d.ts.map +1 -1
  189. package/dist/slate-commit.js +12 -5
  190. package/dist/slate-commit.js.map +1 -1
  191. package/dist/slate-handoff.d.ts.map +1 -1
  192. package/dist/slate-handoff.js +2 -3
  193. package/dist/slate-handoff.js.map +1 -1
  194. package/dist/slate-ids.d.ts +2 -1
  195. package/dist/slate-ids.d.ts.map +1 -1
  196. package/dist/slate-ids.js +3 -2
  197. package/dist/slate-ids.js.map +1 -1
  198. package/dist/slate-reference-ids.d.ts.map +1 -1
  199. package/dist/slate-reference-ids.js +1 -0
  200. package/dist/slate-reference-ids.js.map +1 -1
  201. package/dist/slate-round-prompt.d.ts +19 -0
  202. package/dist/slate-round-prompt.d.ts.map +1 -1
  203. package/dist/slate-round-prompt.js +22 -0
  204. package/dist/slate-round-prompt.js.map +1 -1
  205. package/dist/slate-round-runner.d.ts.map +1 -1
  206. package/dist/slate-round-runner.js +16 -12
  207. package/dist/slate-round-runner.js.map +1 -1
  208. package/dist/slate-round-search.d.ts.map +1 -1
  209. package/dist/slate-round-search.js +2 -0
  210. package/dist/slate-round-search.js.map +1 -1
  211. package/dist/slate-runtime.d.ts +3 -0
  212. package/dist/slate-runtime.d.ts.map +1 -1
  213. package/dist/slate-runtime.js +1 -0
  214. package/dist/slate-runtime.js.map +1 -1
  215. package/dist/slate-site-references-capture.d.ts +20 -0
  216. package/dist/slate-site-references-capture.d.ts.map +1 -0
  217. package/dist/slate-site-references-capture.js +119 -0
  218. package/dist/slate-site-references-capture.js.map +1 -0
  219. package/dist/slate-site-references-client.d.ts +35 -0
  220. package/dist/slate-site-references-client.d.ts.map +1 -0
  221. package/dist/slate-site-references-client.js +36 -0
  222. package/dist/slate-site-references-client.js.map +1 -0
  223. package/dist/slate-site-references-local.d.ts +6 -0
  224. package/dist/slate-site-references-local.d.ts.map +1 -0
  225. package/dist/slate-site-references-local.js +63 -0
  226. package/dist/slate-site-references-local.js.map +1 -0
  227. package/dist/slate-site-references-suggest.d.ts +36 -0
  228. package/dist/slate-site-references-suggest.d.ts.map +1 -0
  229. package/dist/slate-site-references-suggest.js +144 -0
  230. package/dist/slate-site-references-suggest.js.map +1 -0
  231. package/dist/slate-site-references.d.ts +57 -0
  232. package/dist/slate-site-references.d.ts.map +1 -0
  233. package/dist/slate-site-references.js +129 -0
  234. package/dist/slate-site-references.js.map +1 -0
  235. package/dist/slate-view-contract.d.ts +29 -1
  236. package/dist/slate-view-contract.d.ts.map +1 -1
  237. package/dist/slate-view.d.ts.map +1 -1
  238. package/dist/slate-view.js +5 -0
  239. package/dist/slate-view.js.map +1 -1
  240. package/dist/slate-workspace-parse.d.ts +2 -0
  241. package/dist/slate-workspace-parse.d.ts.map +1 -1
  242. package/dist/slate-workspace-parse.js +20 -3
  243. package/dist/slate-workspace-parse.js.map +1 -1
  244. package/dist/slate-workspace-types.d.ts +17 -2
  245. package/dist/slate-workspace-types.d.ts.map +1 -1
  246. package/dist/workspace-draw-messages.d.ts +27 -5
  247. package/dist/workspace-draw-messages.d.ts.map +1 -1
  248. package/dist/workspace-draw-messages.js +29 -3
  249. package/dist/workspace-draw-messages.js.map +1 -1
  250. package/dist/workspace-draw-run.d.ts +12 -0
  251. package/dist/workspace-draw-run.d.ts.map +1 -1
  252. package/dist/workspace-draw-run.js +47 -18
  253. package/dist/workspace-draw-run.js.map +1 -1
  254. package/dist/workspace-draw-types.d.ts +2 -1
  255. package/dist/workspace-draw-types.d.ts.map +1 -1
  256. package/dist/workspace-draw-types.js +1 -0
  257. package/dist/workspace-draw-types.js.map +1 -1
  258. package/dist/workspace-runner-main.d.ts +5 -0
  259. package/dist/workspace-runner-main.d.ts.map +1 -1
  260. package/dist/workspace-runner-main.js +15 -3
  261. package/dist/workspace-runner-main.js.map +1 -1
  262. package/open-design.json +2 -13
  263. package/package.json +1 -1
  264. package/skills/12ui-design/SKILL.md +7 -8
  265. package/dist/mcp-slate-ui-script-dialog.d.ts +0 -21
  266. package/dist/mcp-slate-ui-script-dialog.d.ts.map +0 -1
  267. package/dist/mcp-slate-ui-script-dialog.js +0 -351
  268. package/dist/mcp-slate-ui-script-dialog.js.map +0 -1
  269. package/dist/mcp-slate-ui-script-progress.d.ts +0 -7
  270. package/dist/mcp-slate-ui-script-progress.d.ts.map +0 -1
  271. package/dist/mcp-slate-ui-script-progress.js +0 -9
  272. package/dist/mcp-slate-ui-script-progress.js.map +0 -1
  273. package/dist/mcp-slate-ui-styles-dialog.d.ts +0 -20
  274. package/dist/mcp-slate-ui-styles-dialog.d.ts.map +0 -1
  275. package/dist/mcp-slate-ui-styles-dialog.js +0 -87
  276. package/dist/mcp-slate-ui-styles-dialog.js.map +0 -1
@@ -1,298 +1,25 @@
1
1
  /**
2
- * Generate more: a dashed tile with a plus and the words Generate more, and
3
- * the panel it opens directly below it. In the card it is the last tile of the
4
- * strip, whose thumbnails wrap rather than scroll sideways, and the panel
5
- * opens below the strip; in the workspace it is a slim bar on top of the
6
- * selection, before the newest round in the column's flow (rounds are newest
7
- * first, so it sits where the next round will land), and the panel opens under
8
- * the bar. Either way it is in view without a scroll from where the thumbnails
9
- * rest. The panel is the only way to start a round, and it says what it will
10
- * do:
11
- *
12
- * - a heading and one helper line that follows the state (fresh references,
13
- * the selected inspiration, or close to the shown design);
14
- * - a switch, with a picture of the design at its left, "Based on <code>", off by default: off draws new options, on
15
- * draws options close to the design that is shown (mode "like" from the
16
- * shown version at the moment of Generate);
17
- * - the selected inspiration as small chips, each with a remove button that is
18
- * the same selection write as the Inspiration tab's toggle (adding is done
19
- * in that tab);
20
- * - an optional note, how many (1, 2, 4, 6, 8 or 12, default 6) and Cancel and
21
- * Generate.
22
- *
23
- * Clicking the tile again, Cancel or Escape collapses it. While a round runs
24
- * (or the request is in flight) the tile is off; the new round's pending
25
- * options are already in the thumbnails, because the returned view carries
26
- * them.
27
- *
28
- * In the card the panel takes its room from the large image rather than
29
- * growing the frame. The host grows the frame downward and does not scroll
30
- * the thread, so a panel added below the thumbnails lands under the host's
31
- * composer, out of sight (the frame's own document has nothing to scroll).
32
- * While the panel is open the image is shortened by the panel's height, and
33
- * folded away when what would be left is too small to read, so the card keeps
34
- * its height and the panel sits where the bottom of the card already was.
2
+ * How a new round starts. The Designs tab's More (with its 6 or 12, mcp-slate-ui-script-designs.ts) and the
3
+ * Inspiration tab's Generate both come here: the inspiration selection is committed first, so the round uses what the
4
+ * person sees, then the run is recorded and the returned view already carries the round's loading tiles. While a round
5
+ * runs, or the request is in flight, More and Branch are off.
35
6
  */
36
7
  export const SLATE_UI_MORE = String.raw `
37
8
  var MORE = __MORE__;
38
- var ICON_PLUS = "M12 5v14M5 12h14";
39
9
 
40
- // A round that is running, or the panel's own request still in flight, keeps the tile off until it settles.
41
10
  function moreBusy() {
42
- return (!!state.view && runningOps().some(function (o) { return o.kind === "round"; })) || !!(state.more && state.more.committing);
11
+ return (!!state.view && runningOps().some(function (o) { return o.kind === "round"; })) || designs.filling;
43
12
  }
44
13
 
45
- // One tile per place: the card's strip and the workspace's selection each build their own.
46
- function moreTile() {
47
- var b = button("", "moretile", toggleMore);
48
- b.setAttribute("aria-label", t("generateMore"));
49
- b.setAttribute("aria-expanded", "false");
50
- b.setAttribute("aria-controls", "morepanel");
51
- b.title = t("generateMore");
52
- b.innerHTML = '<svg viewBox="0 0 24 24" width="28" height="28" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" aria-hidden="true"><path d="' + ICON_PLUS + '"/></svg>';
53
- b.appendChild(el("span", "", t("generateMore")));
54
- return b;
55
- }
56
- function moreTiles() { return Array.prototype.slice.call(document.querySelectorAll(".moretile")); }
57
- function moreHosts() { return [$("more"), stageEls && stageEls.more].filter(Boolean); }
58
-
59
- function toggleMore() {
60
- if (state.more) { closeMore(true); return; }
61
- openMore();
62
- }
63
- function openMore() {
64
- if (!state.view || state.view.candidates.length === 0 || moreBusy()) return;
65
- if (state.more) resetMore();
66
- state.more = { id: uuid4(), like: false, note: "", count: MORE.initial, committing: false, error: "", sig: "", els: {} };
67
- buildMore();
68
- syncMore();
69
- state.more.els.note.focus();
70
- }
71
- // The shortest the card's image gets while the panel is open; below this it folds away, and the thumbnails stay.
72
- var HERO_FLOOR_PX = 120;
73
- function fitMore() {
74
- var hero = $("hero");
75
- if (!hero) return;
76
- hero.style.removeProperty("--cap");
77
- hero.classList.remove("folded");
78
- var m = state.more;
79
- if (!m || isFullscreen() || m.els.box.parentNode !== $("more")) return;
80
- // The panel's host holds the panel and the gap above it, so its height is all the room the panel takes.
81
- var natural = hero.getBoundingClientRect().height;
82
- var need = $("more").getBoundingClientRect().height;
83
- if (!(natural > 0) || !(need > 0)) return;
84
- var left = Math.floor(natural - need);
85
- if (left >= HERO_FLOOR_PX) hero.style.setProperty("--cap", left + "px");
86
- else hero.classList.add("folded");
87
- }
88
- function closeMore(refocus) {
89
- var m = state.more;
90
- if (!m || m.committing) return;
91
- state.more = null;
92
- moreHosts().forEach(function (host) { host.textContent = ""; });
93
- syncMore();
94
- fitMore();
95
- if (refocus) {
96
- var back = moreTiles().filter(function (t) { return !t.disabled && !isHiddenNode(t); })[0];
97
- if (back) back.focus();
98
- }
99
- reportSize();
100
- }
101
- // A different run replaces the workspace: whatever was typed belongs to the old one.
102
- function resetMore() {
103
- state.more = null;
104
- moreHosts().forEach(function (host) { host.textContent = ""; });
105
- fitMore();
106
- }
107
- function isHiddenNode(node) {
108
- for (var n = node; n && n.classList; n = n.parentElement) if (n.classList.contains("hidden")) return true;
109
- return false;
110
- }
111
-
112
- // The design the switch is about: the one that is shown when Generate is clicked, so it follows the selection.
113
- function moreBase() { var v = selectedVersion(); return pickable(v) ? v : null; }
114
-
115
- function buildMore() {
116
- var m = state.more;
117
- var box = el("div", "morepanel");
118
- box.id = "morepanel";
119
- box.setAttribute("role", "group");
120
- var title = el("h2", "morehead", t("generateMore"));
121
- title.id = "morehead";
122
- box.setAttribute("aria-labelledby", "morehead");
123
- box.appendChild(title);
124
- m.els.help = el("p", "help");
125
- box.appendChild(m.els.help);
126
-
127
- // The switch: a native checkbox that reads as a switch, with a picture of the design it is about.
128
- var label = el("label", "moreswitch");
129
- m.els.toggle = el("input");
130
- m.els.toggle.type = "checkbox";
131
- m.els.toggle.setAttribute("role", "switch");
132
- m.els.toggle.addEventListener("change", function () { m.like = m.els.toggle.checked; syncMore(); });
133
- m.els.thumb = el("img", "morethumb empty");
134
- m.els.thumb.alt = "";
135
- m.els.switchText = el("span", "moreswitchtext");
136
- label.appendChild(m.els.thumb);
137
- label.appendChild(m.els.switchText);
138
- label.appendChild(m.els.toggle);
139
- box.appendChild(label);
140
-
141
- // The inspiration that is selected, read back from the view; removing one is the tab's own selection write.
142
- m.els.chipsWrap = el("div", "morechips hidden");
143
- m.els.chipsWrap.appendChild(el("span", "lbl", t("moreInspirationLabel")));
144
- m.els.chips = el("div", "refchips");
145
- m.els.chipsWrap.appendChild(m.els.chips);
146
- box.appendChild(m.els.chipsWrap);
147
-
148
- var note = el("textarea");
149
- note.setAttribute("rows", "2");
150
- note.setAttribute("maxlength", "600");
151
- note.setAttribute("placeholder", t("moreNotePlaceholder"));
152
- note.setAttribute("aria-label", t("moreNotePlaceholder"));
153
- note.addEventListener("input", function () { m.note = note.value; });
154
- // The wrapper's hidden twin of the placeholder gives the field the height its words need at this width.
155
- var noteWrap = el("div", "notewrap");
156
- noteWrap.setAttribute("data-placeholder", t("moreNotePlaceholder"));
157
- noteWrap.appendChild(note);
158
- box.appendChild(noteWrap);
159
- var row = el("div", "morerow");
160
- var seg = el("div", "seg");
161
- seg.setAttribute("role", "radiogroup");
162
- seg.setAttribute("aria-label", t("moreCountLabel"));
163
- MORE.choices.forEach(function (n) {
164
- var option = el("label", "segopt");
165
- var input = el("input");
166
- input.type = "radio";
167
- input.name = "morecount";
168
- input.value = String(n);
169
- input.checked = n === m.count;
170
- input.addEventListener("change", function () { m.count = n; });
171
- option.appendChild(input);
172
- option.appendChild(el("span", "", String(n)));
173
- seg.appendChild(option);
174
- });
175
- row.appendChild(seg);
176
- // Cancel and Generate stay together: on a narrow card they drop to the next line as a pair, at the right.
177
- var buttons = el("span", "morebtns");
178
- buttons.appendChild(button(t("cancel"), "", function () { closeMore(true); }));
179
- m.els.primary = button(t("generate"), "primary", commitMore);
180
- buttons.appendChild(m.els.primary);
181
- row.appendChild(buttons);
182
- box.appendChild(row);
183
- m.els.alert = el("p", "alert hidden");
184
- m.els.alert.setAttribute("role", "alert");
185
- box.appendChild(m.els.alert);
186
- m.els.box = box;
187
- m.els.note = note;
188
- }
189
-
190
- // The chips follow the selection, the switch follows the shown design; each is rebuilt only when what it shows changed.
191
- function syncMoreBody(m) {
192
- var base = moreBase();
193
- var likeOn = m.like && !!base;
194
- var selected = currentSelected().slice(0, MAX_SELECTED);
195
- m.els.toggle.checked = likeOn;
196
- m.els.toggle.disabled = !base || m.committing;
197
- m.els.switchText.textContent = t("moreBasedOn", { label: base ? base.label : (selectedVersion() ? selectedVersion().label : "") });
198
- m.els.switchText.parentNode.title = base ? "" : t("moreLikeUnavailable");
199
- m.els.help.textContent = likeOn ? t("moreHelpLike", { label: base.label }) : selected.length > 0 ? t("moreHelpSelected") : t("moreHelpFresh");
200
- var shown = base || selectedVersion();
201
- var thumbSig = shown ? shown.versionId + ":" + shown.sha256 : "";
202
- if (m.thumbSig !== thumbSig) {
203
- m.thumbSig = thumbSig;
204
- var fresh = el("img", "morethumb empty");
205
- fresh.alt = "";
206
- m.els.thumb.parentNode.replaceChild(fresh, m.els.thumb);
207
- m.els.thumb = fresh;
208
- if (shown) {
209
- var cached = state.thumbs[imageKey(shown, "thumb")];
210
- if (cached) { fresh.src = cached; fresh.classList.remove("empty"); }
211
- else bindImage(fresh, shown, "thumb", false);
212
- }
213
- }
214
- var chipSig = JSON.stringify(selected);
215
- if (m.chipSig !== chipSig) {
216
- m.chipSig = chipSig;
217
- m.els.chips.textContent = "";
218
- selected.forEach(function (id) {
219
- var chip = el("span", "refchip");
220
- var img = el("img", "refchipimg empty shimmer");
221
- img.alt = "";
222
- chip.appendChild(img);
223
- bindReference(img, id, "thumb");
224
- var remove = button("", "refchipx", function () { toggleRef(id); });
225
- remove.setAttribute("aria-label", t("removeReference", { name: refDescription(id) }));
226
- remove.title = t("removeReference", { name: refDescription(id) });
227
- remove.innerHTML = '<svg viewBox="0 0 24 24" width="12" height="12" fill="none" stroke="currentColor" stroke-width="3" stroke-linecap="round" aria-hidden="true"><path d="M6 6l12 12M18 6L6 18"/></svg>';
228
- chip.appendChild(remove);
229
- m.els.chips.appendChild(chip);
230
- });
231
- }
232
- m.els.chipsWrap.classList.toggle("hidden", selected.length === 0);
233
- }
234
-
235
- // The one way a round starts: the selection is committed first, so the round uses the inspiration the person sees.
236
14
  function roundAction(request) {
237
15
  var action = { kind: "round", mode: request.mode, count: request.count };
238
16
  var note = (request.note || "").trim();
239
17
  if (note) action.note = note;
240
18
  if (request.mode === "like") action.fromVersionId = request.fromVersionId;
241
- return action;
19
+ return withBrief(action);
242
20
  }
243
21
  function startRound(opId, request) {
244
22
  return whenSelectionSettled().then(function () { return runAction(roundAction(request), opId); });
245
23
  }
246
-
247
- function commitMore() {
248
- var m = state.more;
249
- if (!m || m.committing || moreBusy() || !localImage().ready) return;
250
- var base = m.like ? moreBase() : null;
251
- m.committing = true;
252
- m.error = "";
253
- syncMore();
254
- startRound(m.id, { mode: base ? "like" : "new", note: m.note, count: m.count, fromVersionId: base ? base.versionId : undefined }).then(function () {
255
- m.committing = false;
256
- if (state.more === m) closeMore(false);
257
- syncMore();
258
- }, function (err) {
259
- m.committing = false;
260
- if (state.more !== m) return;
261
- m.error = errText(err);
262
- syncMore();
263
- });
264
- }
265
-
266
- // The tiles follow the view; the panel sits in the host of the current mode, and keeps what was typed across polls and modes.
267
- function syncMore() {
268
- if (!state.view) return;
269
- var m = state.more;
270
- if (m && state.view.candidates.length === 0) { m.committing = false; closeMore(false); m = state.more; }
271
- var busy = moreBusy();
272
- moreTiles().forEach(function (t) {
273
- t.disabled = busy;
274
- t.setAttribute("aria-expanded", m ? "true" : "false");
275
- });
276
- if (!m) return;
277
- var host = isFullscreen() ? stageEls.more : $("more");
278
- if (host && m.els.box.parentNode !== host) {
279
- moreHosts().forEach(function (h) { if (h !== host) h.textContent = ""; });
280
- host.appendChild(m.els.box);
281
- }
282
- syncMoreBody(m);
283
- var local = localImage();
284
- m.els.primary.disabled = m.committing || busy || !local.ready;
285
- m.els.alert.textContent = m.error || (!local.ready ? localReason() : "");
286
- m.els.alert.classList.toggle("hidden", !m.els.alert.textContent);
287
- // Fitted before the size report, so the host never sees the taller card.
288
- fitMore();
289
- reportSize();
290
- }
291
- window.addEventListener("resize", function () { if (state.more) { fitMore(); reportSize(); } });
292
-
293
- document.addEventListener("keydown", function (e) {
294
- if (e.key !== "Escape" || !state.more || state.dialog || state.more.committing) return;
295
- closeMore(true);
296
- });
297
24
  `;
298
25
  //# sourceMappingURL=mcp-slate-ui-script-more.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"mcp-slate-ui-script-more.js","sourceRoot":"","sources":["../src/mcp-slate-ui-script-more.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG,MAAM,CAAC,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAqQtC,CAAC"}
1
+ {"version":3,"file":"mcp-slate-ui-script-more.js","sourceRoot":"","sources":["../src/mcp-slate-ui-script-more.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG,MAAM,CAAC,GAAG,CAAA;;;;;;;;;;;;;;;;;CAiBtC,CAAC"}
@@ -3,22 +3,26 @@
3
3
  * before it is drawn while this screen is in sight. The server owns every rule (workers/api/src/slate/store/pause.ts);
4
4
  * this fragment shows the wait and sends the person's two answers.
5
5
  *
6
- * - The pause bar (in the card above the large image, in the workspace above the picture, and in the Inspiration tab
7
- * in place of Generate) says "Starting in 42 s. Change any reference, or press Continue." and counts down calmly:
8
- * the words change once a second (a timer role, so assistive technology is not told every second) and a thin line
9
- * shortens with them, without animation when motion is reduced. Change opens the Inspiration tab; Continue goes on.
6
+ * - A new wait opens the Inspiration tab (unless the person chose a tab since), with the round's references picked;
7
+ * when the wait ends (Continue, or the countdown on the server) the screen moves back to Designs, where the options
8
+ * now draw. Moving on to Designs by hand continues the round with the picks (`setTab`).
9
+ * - In the Inspiration tab the tray carries the countdown ("Starts in 42 s") beside Continue. On Designs (the
10
+ * workspace's picture, or the card when the person went there) the pause bar says "Starts in 42 s" beside Change and
11
+ * Continue, and counts down calmly: the words change once a second (a timer role, so assistive
12
+ * technology is not told every second) and a thin line shortens with them, without animation when motion is
13
+ * reduced. Change opens the Inspiration tab; Continue goes on.
10
14
  * - Each option of the round shows the reference it will be drawn from, on its tile and in the large image, instead
11
15
  * of the drawing shimmer: nothing is being drawn yet.
12
16
  * - Any touch of the screen (a press or click, a key, a wheel or touch scroll of the picker, focus in the search box)
13
17
  * holds the round. A wheel or touch counts only inside the picker's scrolling lists (the Inspiration results, the
14
18
  * workspace's selection): elsewhere, the inline card's large image say, it is the conversation being scrolled past
15
19
  * the card, which must not hold a round nobody then sees. A hold stops the countdown for good and the bar says
16
- * "Paused. Press Continue when ready." One hold is sent to the server. A scroll the page makes by itself (a grid
20
+ * "Paused". One hold is sent to the server. A scroll the page makes by itself (a grid
17
21
  * laid out again) is not a touch, so `scroll` is not listened to; the person's scrolling arrives as a wheel, a touch
18
22
  * or a key.
19
23
  * - In the Inspiration tab the round's references are the round's own list until the person changes it: a tile there
20
24
  * adds or removes a reference (at most one per option), and Continue sends the list when it differs, which the
21
- * server gives the options in order.
25
+ * server gives the options in order, and the design prompt when the person edited it.
22
26
  * - A round that awaits a screen (`awaiting`, recorded before this screen existed) is seen at once with one status
23
27
  * call, which starts its countdown on the server.
24
28
  *
@@ -1 +1 @@
1
- {"version":3,"file":"mcp-slate-ui-script-pause.d.ts","sourceRoot":"","sources":["../src/mcp-slate-ui-script-pause.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,eAAO,MAAM,cAAc,QA4K1B,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,iBAAiB,QAY7B,CAAC"}
1
+ {"version":3,"file":"mcp-slate-ui-script-pause.d.ts","sourceRoot":"","sources":["../src/mcp-slate-ui-script-pause.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,eAAO,MAAM,cAAc,QAuL1B,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,iBAAiB,QAY7B,CAAC"}
@@ -3,22 +3,26 @@
3
3
  * before it is drawn while this screen is in sight. The server owns every rule (workers/api/src/slate/store/pause.ts);
4
4
  * this fragment shows the wait and sends the person's two answers.
5
5
  *
6
- * - The pause bar (in the card above the large image, in the workspace above the picture, and in the Inspiration tab
7
- * in place of Generate) says "Starting in 42 s. Change any reference, or press Continue." and counts down calmly:
8
- * the words change once a second (a timer role, so assistive technology is not told every second) and a thin line
9
- * shortens with them, without animation when motion is reduced. Change opens the Inspiration tab; Continue goes on.
6
+ * - A new wait opens the Inspiration tab (unless the person chose a tab since), with the round's references picked;
7
+ * when the wait ends (Continue, or the countdown on the server) the screen moves back to Designs, where the options
8
+ * now draw. Moving on to Designs by hand continues the round with the picks (`setTab`).
9
+ * - In the Inspiration tab the tray carries the countdown ("Starts in 42 s") beside Continue. On Designs (the
10
+ * workspace's picture, or the card when the person went there) the pause bar says "Starts in 42 s" beside Change and
11
+ * Continue, and counts down calmly: the words change once a second (a timer role, so assistive
12
+ * technology is not told every second) and a thin line shortens with them, without animation when motion is
13
+ * reduced. Change opens the Inspiration tab; Continue goes on.
10
14
  * - Each option of the round shows the reference it will be drawn from, on its tile and in the large image, instead
11
15
  * of the drawing shimmer: nothing is being drawn yet.
12
16
  * - Any touch of the screen (a press or click, a key, a wheel or touch scroll of the picker, focus in the search box)
13
17
  * holds the round. A wheel or touch counts only inside the picker's scrolling lists (the Inspiration results, the
14
18
  * workspace's selection): elsewhere, the inline card's large image say, it is the conversation being scrolled past
15
19
  * the card, which must not hold a round nobody then sees. A hold stops the countdown for good and the bar says
16
- * "Paused. Press Continue when ready." One hold is sent to the server. A scroll the page makes by itself (a grid
20
+ * "Paused". One hold is sent to the server. A scroll the page makes by itself (a grid
17
21
  * laid out again) is not a touch, so `scroll` is not listened to; the person's scrolling arrives as a wheel, a touch
18
22
  * or a key.
19
23
  * - In the Inspiration tab the round's references are the round's own list until the person changes it: a tile there
20
24
  * adds or removes a reference (at most one per option), and Continue sends the list when it differs, which the
21
- * server gives the options in order.
25
+ * server gives the options in order, and the design prompt when the person edited it.
22
26
  * - A round that awaits a screen (`awaiting`, recorded before this screen existed) is seen at once with one status
23
27
  * call, which starts its countdown on the server.
24
28
  *
@@ -27,7 +31,7 @@
27
31
  export const SLATE_UI_PAUSE = String.raw `
28
32
  var PAUSE_COUNTDOWN_MS = 60000;
29
33
  var PAUSE_TICK_MS = 1000;
30
- var pause = { opId: null, roundId: null, endsAt: 0, held: false, chosen: null, sending: false, error: "", timer: null, asked: false, sighted: false };
34
+ var pause = { opId: null, roundId: null, endsAt: 0, held: false, chosen: null, sending: false, error: "", timer: null, asked: false, sighted: false, autoTab: false };
31
35
  function pauseClock() { return typeof performance !== "undefined" && performance.now ? performance.now() : Date.now(); }
32
36
 
33
37
  function waitingRound() {
@@ -49,6 +53,9 @@ export const SLATE_UI_PAUSE = String.raw `
49
53
  endPause();
50
54
  pause.opId = op.opId;
51
55
  pause.roundId = round.roundId;
56
+ // The person chooses the references of a waiting round in Inspiration: it opens there (no event, so no hold).
57
+ if (state.tab !== "inspiration") { state.tab = "inspiration"; syncTabs(); }
58
+ pause.autoTab = true;
52
59
  }
53
60
  if (round.pause.state === "held") pause.held = true;
54
61
  else if (!pause.held && round.pause.state === "countdown") { pause.endsAt = pauseClock() + round.pause.remainingMs; pause.asked = false; }
@@ -60,7 +67,9 @@ export const SLATE_UI_PAUSE = String.raw `
60
67
  }
61
68
  function endPause() {
62
69
  if (pause.timer !== null) clearInterval(pause.timer);
63
- pause = { opId: null, roundId: null, endsAt: 0, held: false, chosen: null, sending: false, error: "", timer: null, asked: false, sighted: false };
70
+ // The wait is over and the options draw: show them, unless the person chose a tab of their own meanwhile.
71
+ if (pause.opId && pause.autoTab && state.tab === "inspiration") { state.tab = "designs"; syncTabs(); }
72
+ pause = { opId: null, roundId: null, endsAt: 0, held: false, chosen: null, sending: false, error: "", timer: null, asked: false, sighted: false, autoTab: false };
64
73
  }
65
74
  function pauseLeftMs() { return Math.max(0, pause.endsAt - pauseClock()); }
66
75
  function pauseText() {
@@ -68,7 +77,7 @@ export const SLATE_UI_PAUSE = String.raw `
68
77
  if (pause.sending) return t("pauseStarting");
69
78
  if (pause.held) return t("pauseHeld");
70
79
  var left = Math.ceil(pauseLeftMs() / 1000);
71
- return left > 0 ? t("pauseCountdown", { n: left }) : t("pauseStarting");
80
+ return left > 0 ? t("startsIn", { n: left }) : t("pauseStarting");
72
81
  }
73
82
  function tickPause() {
74
83
  if (!pause.opId) return;
@@ -77,16 +86,22 @@ export const SLATE_UI_PAUSE = String.raw `
77
86
  }
78
87
  function syncPauseBars() {
79
88
  var words = pauseText();
89
+ var left = Math.ceil(pauseLeftMs() / 1000);
90
+ // The tray's clock: the seconds left, nothing once held, and "Starting." when the round goes.
91
+ var clock = pause.error ? pause.error : pause.sending || (!pause.held && left <= 0) ? t("pauseStarting") : pause.held ? "" : t("startsIn", { n: left });
92
+ var clocks = document.querySelectorAll("[data-pause-clock]");
93
+ for (var c = 0; c < clocks.length; c++) if (clocks[c].textContent !== clock) clocks[c].textContent = clock;
80
94
  var share = pause.held ? 0 : pauseLeftMs() / PAUSE_COUNTDOWN_MS;
81
- var nodes = document.querySelectorAll("[data-pause-text]");
82
- for (var i = 0; i < nodes.length; i++) if (nodes[i].textContent !== words) nodes[i].textContent = words;
83
- var lines = document.querySelectorAll(".pauseline > span");
84
- for (var j = 0; j < lines.length; j++) lines[j].style.transform = "scaleX(" + (Math.round(share * 1000) / 1000) + ")";
85
- var lineBoxes = document.querySelectorAll(".pauseline");
86
- for (var k = 0; k < lineBoxes.length; k++) lineBoxes[k].classList.toggle("hidden", pause.held || pause.sending);
87
- var goes = document.querySelectorAll("[data-continue]");
88
- for (var m = 0; m < goes.length; m++) goes[m].disabled = pause.sending || pauseChosen().length === 0;
95
+ // Only the bars themselves are walked, never the whole document: this runs every second while a round waits.
96
+ pauseBoxes = pauseBoxes.filter(function (box) { return box.isConnected !== false; });
97
+ pauseBoxes.forEach(function (box) {
98
+ if (box.__words.textContent !== words) box.__words.textContent = words;
99
+ box.__line.firstChild.style.transform = "scaleX(" + (Math.round(share * 1000) / 1000) + ")";
100
+ box.__line.classList.toggle("hidden", pause.held || pause.sending);
101
+ box.__go.disabled = pause.sending || pauseChosen().length === 0;
102
+ });
89
103
  }
104
+ var pauseBoxes = [];
90
105
 
91
106
  function pauseChosen() {
92
107
  if (pause.chosen) return pause.chosen;
@@ -105,7 +120,7 @@ export const SLATE_UI_PAUSE = String.raw `
105
120
  if (cur.length >= round.count) { setInspStatus(t("pauseAtMost", { n: round.count }), ""); return; }
106
121
  cur.push(id);
107
122
  }
108
- setInspStatus(cur.length === 0 ? t("pauseNone") : "", "");
123
+ setInspStatus("", "");
109
124
  pause.chosen = cur;
110
125
  renderAll();
111
126
  }
@@ -129,14 +144,17 @@ export const SLATE_UI_PAUSE = String.raw `
129
144
  }
130
145
  function continuePause() {
131
146
  if (!pause.opId || pause.sending || pauseChosen().length === 0) return;
132
- var action = { kind: "continue" };
147
+ var action = withBrief({ kind: "continue" });
133
148
  if (pauseChanged()) action.referenceIds = pause.chosen.slice();
134
149
  pause.sending = true;
135
150
  pause.error = "";
136
151
  syncPauseBars();
137
- callTool(TOOLS.run, { runDir: state.view.runDir, opId: pause.opId, action: action }).then(function (result) {
152
+ var opId = pause.opId;
153
+ callTool(TOOLS.run, { runDir: state.view.runDir, opId: opId, action: action }).then(function (result) {
138
154
  var sc = result.structuredContent || {};
139
155
  if (sc.view) applyView(sc.view, true);
156
+ // The workspace runner draws the round now; the agent is told only if no runner has taken it after its grace.
157
+ if (TARGET === "remote") remoteAfterRun({ kind: "continue" }, opId, { alive: true });
140
158
  }, function (err) {
141
159
  pause.sending = false;
142
160
  pause.error = errText(err);
@@ -145,7 +163,7 @@ export const SLATE_UI_PAUSE = String.raw `
145
163
  }
146
164
  // A wheel or a touch counts only where it scrolls the picker: the Inspiration results and the workspace's
147
165
  // selection. Anywhere else (the card's large image, say) it is the person scrolling the conversation past the card.
148
- var PICKER_SCROLLERS = ".results, .rail";
166
+ var PICKER_SCROLLERS = ".results, #stage .designs";
149
167
  function onScreenTouch(e) {
150
168
  if (!pause.opId || pause.held || pause.sending) return;
151
169
  var t = e.target;
@@ -177,6 +195,10 @@ export const SLATE_UI_PAUSE = String.raw `
177
195
  line.setAttribute("aria-hidden", "true");
178
196
  line.appendChild(el("span"));
179
197
  bar.appendChild(line);
198
+ bar.__words = words;
199
+ bar.__line = line;
200
+ bar.__go = go;
201
+ pauseBoxes.push(bar);
180
202
  return bar;
181
203
  }
182
204
  function syncPauseHost(host, withChange) {
@@ -189,21 +211,15 @@ export const SLATE_UI_PAUSE = String.raw `
189
211
  if (pause.opId) host.appendChild(pauseBar(withChange));
190
212
  }
191
213
  }
192
- function pauseChoiceText() {
193
- var round = pauseRound();
194
- var chosen = pauseChosen();
195
- if (!round) return "";
196
- if (chosen.length === 0) return t("pauseNone");
197
- return t("pauseFrom", { n: round.count, m: chosen.length });
198
- }
199
214
  `;
200
215
  /**
201
216
  * The local plugin's and the browser page's screens: their views never carry `rounds[].pause` (only the hosted server
202
217
  * pauses), so the same names answer that nothing waits, and the document does not carry the pause's code.
203
218
  */
204
219
  export const SLATE_UI_NO_PAUSE = String.raw `
205
- var pause = { opId: null };
220
+ var pause = { opId: null, autoTab: false };
206
221
  function pauseActive() { return false; }
222
+ function continuePause() {}
207
223
  function pauseRound() { return null; }
208
224
  function pauseChosen() { return []; }
209
225
  function pausedFor() { return false; }
@@ -212,6 +228,5 @@ export const SLATE_UI_NO_PAUSE = String.raw `
212
228
  function syncPause() {}
213
229
  function syncPauseBars() {}
214
230
  function syncPauseHost(host) { if (host) host.classList.add("hidden"); }
215
- function pauseChoiceText() { return ""; }
216
231
  `;
217
232
  //# sourceMappingURL=mcp-slate-ui-script-pause.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"mcp-slate-ui-script-pause.js","sourceRoot":"","sources":["../src/mcp-slate-ui-script-pause.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG,MAAM,CAAC,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4KvC,CAAC;AAEF;;;GAGG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG,MAAM,CAAC,GAAG,CAAA;;;;;;;;;;;;CAY1C,CAAC"}
1
+ {"version":3,"file":"mcp-slate-ui-script-pause.js","sourceRoot":"","sources":["../src/mcp-slate-ui-script-pause.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG,MAAM,CAAC,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAuLvC,CAAC;AAEF;;;GAGG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG,MAAM,CAAC,GAAG,CAAA;;;;;;;;;;;;CAY1C,CAAC"}
@@ -0,0 +1,19 @@
1
+ /**
2
+ * The References tab: live screenshots of real, relevant websites (`view.sites`), gathered by the person's own agents
3
+ * and captured by the 12ui command line while a round waits on them. It is the Inspiration tab's gallery, large view
4
+ * and tray (mcp-slate-ui-script-inspiration-gallery.ts, mcp-slate-ui-script-inspiration-grid.ts) over the sites:
5
+ *
6
+ * - The sites arrive one by one while the tab is open (the status poll brings each, or the tab's own short watch below)
7
+ * and join the end of the grid; nothing already shown moves.
8
+ * - A click selects or deselects a site exactly like an Inspiration reference (`toggleRef`: the selection for the next
9
+ * round, or, while a round waits on the person, that round's references), with the same ring, check and tray.
10
+ * - The large view adds Open site, which opens the live page through the host.
11
+ * - Pictures load straight from their URLs (`imageUrl`, `thumbUrl`); where a server gives none (the local plugin) they
12
+ * come through the reference tool like any reference.
13
+ * - Nothing yet: one short line, "Finding sites…" only while gathering is possible (the gather window is open and a
14
+ * runner or the draw command holds a running round), else "No websites".
15
+ *
16
+ * Fragment of the view's script; String.raw, no backtick, no dollar-brace.
17
+ */
18
+ export declare const SLATE_UI_REFERENCES: string;
19
+ //# sourceMappingURL=mcp-slate-ui-script-references.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mcp-slate-ui-script-references.d.ts","sourceRoot":"","sources":["../src/mcp-slate-ui-script-references.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,mBAAmB,QAmF/B,CAAC"}