@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,63 +1,184 @@
1
1
  import { PUBLIC_CORPUS_MAX_COUNT } from './corpus-access.js';
2
2
  import { SLATE_UI_INSPIRATION_COLLAGE } from './mcp-slate-ui-script-inspiration-collage.js';
3
+ import { SLATE_UI_INSPIRATION_GALLERY } from './mcp-slate-ui-script-inspiration-gallery.js';
3
4
  import { SLATE_UI_INSPIRATION_GRID } from './mcp-slate-ui-script-inspiration-grid.js';
4
5
  /**
5
- * How many references the Inspiration tab asks one search for: the most the free corpus returns for one query (the
6
- * public tier's cap, which both servers' inspire tools also cap at). The corpus has no paging, so this is all one search
7
- * can show; the tab says so next to the results.
8
- */
9
- export const SLATE_INSPIRATION_SEARCH_COUNT = PUBLIC_CORPUS_MAX_COUNT;
10
- /**
11
- * The longest words one search takes, in characters (code points): both servers' inspire tools refuse longer. A round
12
- * searches with the whole brief and its note, which can be longer, so the box shows the round's words in full and the
13
- * search takes their first 500 characters, cut at a space, and the tab says so.
6
+ * How many references one Inspiration search asks for, per server: the hosted server's searches carry a depth grant
7
+ * and return a window the grid reveals a page at a time as the person scrolls (`SLATE_LIMITS.searchCountMax` there);
8
+ * the local plugin asks the public tier, which returns at most 24.
14
9
  */
10
+ export const SLATE_INSPIRATION_SEARCH_COUNT = { remote: 96, local: PUBLIC_CORPUS_MAX_COUNT };
11
+ /** The longest words one search takes, in characters (code points): both servers' inspire tools refuse longer. */
15
12
  export const SLATE_INSPIRATION_QUERY_CHARS = 500;
16
13
  /**
17
- * The tabs (Designs and Inspiration, in the card and the workspace) and the
18
- * Inspiration tab's words and work, which are the same in both places: the
19
- * search box, the search, and the selection. The tab's grid, its badges and
20
- * Generate are in mcp-slate-ui-script-inspiration-grid.ts.
14
+ * The shell's shared parts and the Inspiration tab's words and work, the same in the card and the workspace:
21
15
  *
22
- * - The search box opens with the words that produced this workspace's
23
- * references: the newest round's own search words, which the server states
24
- * in `inspiration.roundQueries` (stored or derived, never searched again),
25
- * else the newest recorded search. A line under it says whose words they are,
26
- * and when rounds searched different words, that these are the newest. Once
27
- * the person types, the box is theirs.
28
- * - The grid shows the search of the words in the box. When the record has no
29
- * search of the newest round's words, opening the tab runs that one search
30
- * (free, at most once per workspace and words; an identical search is
31
- * answered from the record by both servers). Every search asks for the most
32
- * one search returns.
33
- * - Every reference is a toggle. The selection lives in the view
34
- * (`inspiration.selected`, at most eight, in click order) and is written
35
- * whole through the inspiration tool, one write in flight at a time, last
36
- * click wins locally; the next round reads it at commit. Nothing here starts
37
- * a round: Generate does, through the same request as Generate more.
16
+ * - The prompt card: the screen's one input, an expanding field above the tabs with Search inside its right edge,
17
+ * showing the workspace's prompt (`brief.concept`). Its words are both the design prompt and the inspiration search:
18
+ * Search (or Enter; Shift+Enter is a new line) searches with them, keeps the picks, and saves them as the prompt.
19
+ * What the person types is theirs until the server's prompt matches it; the next round they start, or the Continue
20
+ * of a round that waits for them, carries it (`action.brief`), and the agent is told when they leave the field or
21
+ * search with it.
22
+ * - The tabs, in flow order: Inspiration, References, Designs. Moving on to Designs while a round waits for its
23
+ * references continues it with the picks (mcp-slate-ui-script-pause.ts).
24
+ * - The search the grid shows: the one the person ran, else the newest recorded search (on the hosted server the root
25
+ * round's own search, recorded when the workspace was made); a workspace with no search yet searches the newest
26
+ * round's words once. Every search asks for the most one search returns.
27
+ * - The selection: every reference is a toggle. Outside a pause the selection lives in the view
28
+ * (`inspiration.selected`, at most eight, in click order), written whole through the inspiration tool, one write in
29
+ * flight at a time, last click wins locally; the next round reads it at commit. While a round waits, a toggle changes
30
+ * that round's references instead (the pause's own list).
31
+ * - The tab row says how many are selected, quietly, at its right while Inspiration or References is open.
32
+ * - The References tab (mcp-slate-ui-script-references.ts) reuses the gallery, the large view and the tray.
33
+ *
34
+ * The grid, the tray and Generate are in mcp-slate-ui-script-inspiration-grid.ts; the gallery and its large view in
35
+ * mcp-slate-ui-script-inspiration-gallery.ts.
38
36
  */
39
- const SEARCH_AND_SELECTION = String.raw `
37
+ const SHELL_SEARCH_AND_SELECTION = String.raw `
40
38
  var MAX_SELECTED = 8;
41
- var SEARCH_COUNT = ${JSON.stringify(SLATE_INSPIRATION_SEARCH_COUNT)};
39
+ var SEARCH_COUNT = TARGET === "remote" ? ${JSON.stringify(SLATE_INSPIRATION_SEARCH_COUNT.remote)} : ${JSON.stringify(SLATE_INSPIRATION_SEARCH_COUNT.local)};
42
40
  var QUERY_CHARS = ${JSON.stringify(SLATE_INSPIRATION_QUERY_CHARS)};
43
- // Per workspace: whether the person typed in the box, the search the grid shows, the automatic searches already asked.
41
+ var TABS = ["inspiration", "references", "designs"];
42
+ // Per workspace: the search the grid shows, the automatic searches already asked.
44
43
  state.insp.runDir = null;
45
- state.insp.typed = false;
46
- state.insp.shownQuery = null;
47
44
  state.insp.searchId = "";
48
45
  state.insp.auto = {};
49
46
  state.insp.generating = false;
47
+ state.brief = { runDir: null, text: "", edited: false, told: "" };
48
+
49
+ // ---- words ----
50
+ // Two sets of words are the same search when both servers would key them alike: whitespace collapsed, case ignored.
51
+ function norm(text) { return String(text || "").replace(/\s+/g, " ").trim().toLowerCase(); }
52
+ function collapsed(text) { return String(text || "").replace(/\s+/g, " ").trim(); }
53
+ // What one search can take of these words: all of them, or the first QUERY_CHARS characters, cut at the last space.
54
+ function searchable(text) {
55
+ var chars = Array.from(collapsed(text));
56
+ if (chars.length <= QUERY_CHARS) return chars.join("");
57
+ var cut = chars.slice(0, QUERY_CHARS).join("");
58
+ var space = cut.lastIndexOf(" ");
59
+ return (chars[QUERY_CHARS] === " " || space < 0 ? cut : cut.slice(0, space)).trim();
60
+ }
61
+
62
+ // ---- an expanding field: one line, growing with its words up to a cap (__max px), then scrolling ----
63
+ // A field with __fold shows at most two lines, faded, until it has focus (a click gives it focus): then it opens to its cap.
64
+ var pointerDown = false;
65
+ document.addEventListener("pointerdown", function () { pointerDown = true; }, true);
66
+ document.addEventListener("pointerup", function () { pointerDown = false; }, true);
67
+ function fitField(field) {
68
+ if (!field.isConnected || field.offsetParent === null) return;
69
+ field.style.height = "auto";
70
+ if (!(field.scrollHeight > 0)) { field.style.height = ""; return; }
71
+ var max = field.__max || 200;
72
+ var want = field.scrollHeight + (field.offsetHeight - field.clientHeight);
73
+ var folded = !!field.__fold && document.activeElement !== field;
74
+ if (folded) {
75
+ var cs = getComputedStyle(field);
76
+ var fold = 2 * parseFloat(cs.lineHeight) + parseFloat(cs.paddingTop);
77
+ if (fold > 0 && fold < max) max = Math.ceil(fold);
78
+ }
79
+ field.style.height = Math.min(want, max) + "px";
80
+ field.style.overflowY = want > max && !folded ? "auto" : "hidden";
81
+ field.classList.toggle("folded", folded && want > max);
82
+ }
83
+
84
+ // ---- the design prompt ----
85
+ function briefConcept() { return (state.view && state.view.brief && state.view.brief.concept) || ""; }
86
+ function briefFields() { return document.querySelectorAll("textarea.brief"); }
87
+ function syncBrief() {
88
+ var b = state.brief;
89
+ if (!state.view) return;
90
+ if (b.runDir !== state.view.runDir) { b.runDir = state.view.runDir; b.edited = false; b.told = ""; }
91
+ if (b.edited && norm(b.text) === norm(briefConcept())) b.edited = false;
92
+ if (!b.edited) b.text = briefConcept();
93
+ var fields = briefFields();
94
+ for (var i = 0; i < fields.length; i++) {
95
+ if (fields[i] !== document.activeElement && fields[i].value !== b.text) fields[i].value = b.text;
96
+ fitField(fields[i]);
97
+ }
98
+ syncPromptButtons();
99
+ }
100
+ // The agent reads the workspace's prompt from the server; until the next round carries the edit, it is told here.
101
+ function briefMessage(words) { return "Design workspace: the person edited the design prompt on the screen. The next round they start draws from it: " + words; }
102
+ function tellBrief() {
103
+ var b = state.brief;
104
+ var words = collapsed(b.text);
105
+ if (!b.edited || !words || b.told === words) return;
106
+ b.told = words;
107
+ updateModelContext(briefMessage(words));
108
+ }
109
+ function bindBrief(field) {
110
+ field.maxLength = 2000;
111
+ field.__max = 176;
112
+ field.__fold = true;
113
+ field.addEventListener("input", function () {
114
+ var b = state.brief;
115
+ b.text = field.value;
116
+ b.edited = norm(field.value) !== norm(briefConcept());
117
+ var fields = briefFields();
118
+ for (var i = 0; i < fields.length; i++) { if (fields[i] !== field) fields[i].value = field.value; fitField(fields[i]); }
119
+ syncPromptButtons();
120
+ });
121
+ field.addEventListener("keydown", function (e) {
122
+ if (e.key === "Enter" && !e.shiftKey && !e.isComposing) { e.preventDefault(); submitPrompt(); }
123
+ });
124
+ field.addEventListener("focus", function () { fitField(field); });
125
+ // A press that began elsewhere (a tab) lets go before the card folds, so the click still lands where it began.
126
+ field.addEventListener("blur", function () {
127
+ tellBrief();
128
+ if (!pointerDown) { fitField(field); return; }
129
+ document.addEventListener("pointerup", function () { setTimeout(function () { fitField(field); }, 0); }, { capture: true, once: true });
130
+ });
131
+ }
132
+ function buildBriefField() {
133
+ var wrap = el("div", "briefwrap");
134
+ var field = el("textarea", "brief");
135
+ field.setAttribute("rows", "1");
136
+ field.spellcheck = false;
137
+ field.placeholder = t("briefPlaceholder");
138
+ field.setAttribute("aria-label", t("briefLabel"));
139
+ field.value = state.brief.text;
140
+ bindBrief(field);
141
+ wrap.appendChild(field);
142
+ wrap.appendChild(button(t("search"), "primary promptgo", submitPrompt));
143
+ return wrap;
144
+ }
145
+ // The prompt's button searches with the prompt's words: off while there are none or a search is in flight.
146
+ function syncPromptButtons() {
147
+ var off = !searchable(state.brief.text) || !!state.insp.searching || !state.view;
148
+ var buttons = document.querySelectorAll(".promptgo");
149
+ for (var i = 0; i < buttons.length; i++) buttons[i].disabled = off;
150
+ }
151
+ // Search with the prompt: the picks stay, the words become the design prompt, and the results show in Inspiration.
152
+ function submitPrompt() {
153
+ var q = searchable(state.brief.text);
154
+ if (!q || state.insp.searching || !state.view) return;
155
+ tellBrief();
156
+ if (state.tab === "designs") {
157
+ if (pause.opId) pause.autoTab = false;
158
+ setTab("inspiration");
159
+ }
160
+ runSearch(q);
161
+ }
162
+ // A request that starts drawing carries the prompt the person edited, so the server adopts it first.
163
+ function withBrief(action) {
164
+ var words = collapsed(state.brief.text);
165
+ if (state.brief.edited && words) action.brief = Array.from(words).slice(0, 2000).join("");
166
+ return action;
167
+ }
168
+ bindBrief($("brief"));
169
+ $("briefgo").addEventListener("click", submitPrompt);
50
170
 
171
+ // ---- the tabs ----
51
172
  // A tab strip for the workspace header. The card's own strip is static markup; both carry data-tab.
52
173
  function buildTabs() {
53
174
  var tabs = el("div", "tabs");
54
175
  tabs.setAttribute("role", "tablist");
55
176
  tabs.setAttribute("aria-label", t("title"));
56
- [["designs", t("tabDesigns")], ["inspiration", t("tabInspiration")]].forEach(function (t) {
57
- var b = button(t[1], "tab");
177
+ [["inspiration", t("tabInspiration")], ["references", t("tabReferences")], ["designs", t("tabDesigns")]].forEach(function (pair) {
178
+ var b = button(pair[1], "tab");
58
179
  b.setAttribute("role", "tab");
59
- b.setAttribute("data-tab", t[0]);
60
- b.setAttribute("aria-selected", state.tab === t[0] ? "true" : "false");
180
+ b.setAttribute("data-tab", pair[0]);
181
+ b.setAttribute("aria-selected", state.tab === pair[0] ? "true" : "false");
61
182
  bindTab(b);
62
183
  tabs.appendChild(b);
63
184
  });
@@ -66,26 +187,56 @@ const SEARCH_AND_SELECTION = String.raw `
66
187
  function syncTabs() {
67
188
  var tabs = document.querySelectorAll("[data-tab]");
68
189
  for (var i = 0; i < tabs.length; i++) tabs[i].setAttribute("aria-selected", tabs[i].getAttribute("data-tab") === state.tab ? "true" : "false");
190
+ // How many are picked, quietly at the row's right, while the person picks them (Inspiration and References).
191
+ var n = state.view && state.tab !== "designs" ? activeSelection().length : 0;
192
+ var words = n > 0 ? t("selectedCount", { n: n }) : "";
193
+ var counts = document.querySelectorAll("[data-selcount]");
194
+ for (var c = 0; c < counts.length; c++) if (counts[c].textContent !== words) counts[c].textContent = words;
69
195
  }
70
196
  function setTab(tab) {
71
- if ((tab !== "designs" && tab !== "inspiration") || state.tab === tab) return;
197
+ if (TABS.indexOf(tab) < 0 || state.tab === tab) return;
198
+ // Moving on to Designs while a round waits for its references: it is drawn from the picks the person sees.
199
+ if (tab === "designs" && pauseActive()) continuePause();
72
200
  state.tab = tab;
73
201
  syncTabs();
74
202
  if (state.view) renderAll();
75
203
  }
76
- function bindTab(b) { b.addEventListener("click", function () { setTab(b.getAttribute("data-tab")); }); }
204
+ function bindTab(b) {
205
+ b.addEventListener("click", function () {
206
+ // The person chose a tab: the pause never moves them again.
207
+ if (pause.opId) pause.autoTab = false;
208
+ setTab(b.getAttribute("data-tab"));
209
+ });
210
+ }
77
211
  Array.prototype.forEach.call(document.querySelectorAll("[data-tab]"), bindTab);
78
212
 
79
213
  // ---- what the view says about references ----
80
214
  function currentSelected() {
81
215
  return state.insp.local || (state.view && state.view.inspiration ? state.view.inspiration.selected : []);
82
216
  }
217
+ // The picks the next drawing uses: a waiting round's own list, else the selection.
218
+ function activeSelection() { return pauseActive() ? pauseChosen() : currentSelected(); }
83
219
  function refMeta(id) { return (state.view.references && state.view.references[id]) || null; }
84
220
  function refDescription(id) {
85
221
  var m = refMeta(id);
86
- return String((m && m.description) || id).slice(0, 40);
222
+ var site = m ? null : siteById(id);
223
+ var named = (m && m.description) || (site && site.title);
224
+ // A reference with no words reads as its place in the list, never as its id.
225
+ return String(named || Math.max(1, Object.keys(state.view.references || {}).indexOf(id) + 1)).slice(0, 40);
87
226
  }
88
227
  function refName(id) { return t("referenceName", { description: refDescription(id) }); }
228
+ // A reference as the gallery shows it: straight from the public rendition origin when the server gave its URLs,
229
+ // else through the reference tool (a logo reference, or a workspace recorded before the URLs).
230
+ function refItem(id) {
231
+ var site = refMeta(id) ? null : siteById(id);
232
+ if (site) return siteItem(site);
233
+ var m = refMeta(id) || {};
234
+ var item = { id: id, label: refName(id), title: m.description || "", width: m.width || null, height: m.height || null, aspect: m.aspect || "landscape",
235
+ thumbUrl: m.thumbUrl || null, imageUrl: m.refUrl || m.thumbUrl || null, srcset: "" };
236
+ if (item.thumbUrl && m.refUrl) item.srcset = item.thumbUrl + " 384w, " + m.refUrl + " 1280w";
237
+ if (!item.thumbUrl) item.load = function (img, size) { bindReference(img, id, size); };
238
+ return item;
239
+ }
89
240
  function searchList() { return (state.view.inspiration && state.view.inspiration.searches) || []; }
90
241
  function newestSearch() {
91
242
  var searches = searchList();
@@ -100,88 +251,29 @@ const SEARCH_AND_SELECTION = String.raw `
100
251
  if (round.kind === "like") { var from = ver(round.fromVersionId); return t("likeTitle", { label: from ? from.label : "" }); }
101
252
  return "";
102
253
  }
103
-
104
- // ---- whose words are in the box ----
105
- // Two sets of words are the same search when both servers would key them alike: whitespace collapsed, case ignored.
106
- function norm(text) { return String(text || "").replace(/\s+/g, " ").trim().toLowerCase(); }
107
- function collapsed(text) { return String(text || "").replace(/\s+/g, " ").trim(); }
108
- // What one search can take of these words: all of them, or the first QUERY_CHARS characters, cut at the last space.
109
- function searchable(text) {
110
- var chars = Array.from(collapsed(text));
111
- if (chars.length <= QUERY_CHARS) return chars.join("");
112
- var cut = chars.slice(0, QUERY_CHARS).join("");
113
- var space = cut.lastIndexOf(" ");
114
- return (chars[QUERY_CHARS] === " " || space < 0 ? cut : cut.slice(0, space)).trim();
115
- }
116
- function tooLong(text) { return Array.from(collapsed(text)).length > QUERY_CHARS; }
117
- // The newest round's search words, the rounds that searched them, and the rounds that searched other words.
254
+ // The newest round's search words, as the server states them (stored or derived, never searched again).
118
255
  function roundWords() {
119
256
  var queries = (state.view.inspiration && state.view.inspiration.roundQueries) || [];
120
- if (queries.length === 0) return null;
121
- var latest = queries.reduce(function (a, b) { return b.roundIndex > a.roundIndex ? b : a; });
122
- var key = norm(latest.query);
123
- var byIndex = function (a, b) { return a - b; };
124
- return {
125
- query: latest.query,
126
- same: queries.filter(function (q) { return norm(q.query) === key; }).map(function (q) { return q.roundIndex; }).sort(byIndex),
127
- other: queries.filter(function (q) { return norm(q.query) !== key; }).map(function (q) { return q.roundIndex; }).sort(byIndex)
128
- };
129
- }
130
- function defaultQuery() {
131
- var words = roundWords();
132
- if (words) return words.query;
133
- var newest = newestSearch();
134
- return newest ? newest.query : "";
135
- }
136
- function howText() {
137
- var shown = norm(state.query);
138
- if (!shown) return "";
139
- var words = roundWords();
140
- var line = "";
141
- if (words && norm(words.query) === shown) {
142
- line = words.other.length === 0
143
- ? t("queryFrom", { count: words.same.length, rounds: listOf(words.same) })
144
- : t("queryNewestOthers", { count: words.same.length, rounds: listOf(words.same), otherCount: words.other.length, others: listOf(words.other) });
145
- } else {
146
- var newest = newestSearch();
147
- if (!state.insp.typed && newest && norm(newest.query) === shown) line = t("queryLastSearch");
148
- }
149
- if (tooLong(state.query)) line = sentences(line, t("queryCut", { n: QUERY_CHARS }));
150
- return line;
151
- }
152
- // A new workspace starts clean; until the person types, the box follows the workspace's own words, and the grid with it.
153
- function syncQuery() {
154
- var v = state.view;
155
- var i = state.insp;
156
- if (i.runDir !== v.runDir) {
157
- i.runDir = v.runDir;
158
- i.typed = false;
159
- i.shownQuery = null;
160
- i.searchId = "";
161
- i.noMatch = "";
162
- }
163
- if (i.typed) return;
164
- var words = defaultQuery();
165
- if (norm(words) !== norm(state.query)) { i.shownQuery = null; i.searchId = ""; }
166
- state.query = words;
257
+ if (queries.length === 0) return "";
258
+ return queries.reduce(function (a, b) { return b.roundIndex > a.roundIndex ? b : a; }).query;
167
259
  }
168
260
 
169
- // ---- the search the grid shows: the one the person ran, else the record's search of the words in the box ----
170
- function findSearch(words) {
171
- var key = norm(words);
172
- var hit = null;
173
- searchList().forEach(function (s) { if (norm(s.query) === key) hit = s; });
174
- return hit;
175
- }
261
+ // ---- the search the grid shows: the one the person ran, else the newest recorded search ----
176
262
  function shownSearch() {
177
263
  var i = state.insp;
178
264
  var ran = i.searchId ? searchList().filter(function (s) { return s.searchId === i.searchId; })[0] : null;
179
- if (ran) return ran;
180
- var words = i.shownQuery !== null ? i.shownQuery : defaultQuery();
181
- return words ? findSearch(searchable(words)) : newestSearch();
265
+ return ran || newestSearch();
266
+ }
267
+ // A new workspace starts clean: the grid follows its own newest search.
268
+ function syncSearchRun() {
269
+ var i = state.insp;
270
+ if (i.runDir === state.view.runDir) return;
271
+ i.runDir = state.view.runDir;
272
+ i.searchId = "";
273
+ i.noMatch = "";
182
274
  }
183
275
 
184
- // ---- the status line of this tab ----
276
+ // ---- the status line of this tab: what went wrong ----
185
277
  function setInspStatus(text, kind) {
186
278
  var nodes = document.querySelectorAll("[data-istatus]");
187
279
  for (var i = 0; i < nodes.length; i++) { nodes[i].textContent = text || ""; nodes[i].className = "status" + (kind ? " " + kind : ""); }
@@ -233,24 +325,16 @@ const SEARCH_AND_SELECTION = String.raw `
233
325
  }
234
326
 
235
327
  // ---- search ----
236
- function syncSearchButton(pane) {
237
- if (pane.__search) pane.__search.disabled = !state.query.trim() || state.insp.searching;
238
- }
239
- function doSearch() {
240
- var q = searchable(state.query);
241
- if (!q || state.insp.searching || !state.view) return;
242
- runSearch(q);
243
- }
244
328
  function runSearch(q) {
245
329
  var i = state.insp;
246
330
  i.searching = true;
247
331
  i.noMatch = "";
248
- setInspStatus(t("searching"), "");
332
+ setInspStatus("", "");
249
333
  renderAll();
250
334
  callTool(TOOLS.inspire, { runDir: state.view.runDir, query: q, count: SEARCH_COUNT }).then(function (result) {
251
335
  var sc = result.structuredContent || {};
252
336
  // The grid shows what this search found from now on, even when the view's newest search is another one.
253
- if (sc.search) { i.searchId = sc.search.searchId; i.shownQuery = sc.search.query; }
337
+ if (sc.search) i.searchId = sc.search.searchId;
254
338
  if (sc.view) applyView(sc.view, true);
255
339
  setInspStatus("", "");
256
340
  var found = sc.search || newestSearch();
@@ -259,19 +343,18 @@ const SEARCH_AND_SELECTION = String.raw `
259
343
  setInspStatus(err.code === "rate_limited" && err.retryAfterSeconds !== undefined ? t("tryAgain", { n: err.retryAfterSeconds }) : t("searchFailed", { message: errText(err) }), "err");
260
344
  }).then(function () { i.searching = false; renderAll(); });
261
345
  }
262
- // Opening the tab shows the newest round's words with their results: when the record has none, it asks once.
346
+ // A workspace with no search yet shows its newest round's words with their results: it asks once.
263
347
  function autoSearch() {
264
348
  var v = state.view;
265
349
  var i = state.insp;
266
- if (!v || !v.runDir || i.searching || i.typed || !visible()) return;
267
- var words = roundWords();
268
- var q = words ? searchable(words.query) : "";
269
- if (!q || findSearch(q)) return;
350
+ if (!v || !v.runDir || i.searching || !visible() || searchList().length > 0) return;
351
+ var q = searchable(roundWords());
352
+ if (!q) return;
270
353
  var key = v.runDir + "\n" + norm(q);
271
354
  if (i.auto[key]) return;
272
355
  i.auto[key] = true;
273
356
  runSearch(q);
274
357
  }
275
358
  `;
276
- export const SLATE_UI_INSPIRATION = `${SEARCH_AND_SELECTION}\n${SLATE_UI_INSPIRATION_COLLAGE}\n${SLATE_UI_INSPIRATION_GRID}`;
359
+ export const SLATE_UI_INSPIRATION = `${SHELL_SEARCH_AND_SELECTION}\n${SLATE_UI_INSPIRATION_COLLAGE}\n${SLATE_UI_INSPIRATION_GALLERY}\n${SLATE_UI_INSPIRATION_GRID}`;
277
360
  //# sourceMappingURL=mcp-slate-ui-script-inspiration.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"mcp-slate-ui-script-inspiration.js","sourceRoot":"","sources":["../src/mcp-slate-ui-script-inspiration.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,MAAM,oBAAoB,CAAC;AAC7D,OAAO,EAAE,4BAA4B,EAAE,MAAM,8CAA8C,CAAC;AAC5F,OAAO,EAAE,yBAAyB,EAAE,MAAM,2CAA2C,CAAC;AAEtF;;;;GAIG;AACH,MAAM,CAAC,MAAM,8BAA8B,GAAG,uBAAuB,CAAC;AAEtE;;;;GAIG;AACH,MAAM,CAAC,MAAM,6BAA6B,GAAG,GAAG,CAAC;AAEjD;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,MAAM,oBAAoB,GAAG,MAAM,CAAC,GAAG,CAAA;;uBAEhB,IAAI,CAAC,SAAS,CAAC,8BAA8B,CAAC;sBAC/C,IAAI,CAAC,SAAS,CAAC,6BAA6B,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAyOlE,CAAC;AAEF,MAAM,CAAC,MAAM,oBAAoB,GAAG,GAAG,oBAAoB,KAAK,4BAA4B,KAAK,yBAAyB,EAAE,CAAC"}
1
+ {"version":3,"file":"mcp-slate-ui-script-inspiration.js","sourceRoot":"","sources":["../src/mcp-slate-ui-script-inspiration.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,MAAM,oBAAoB,CAAC;AAC7D,OAAO,EAAE,4BAA4B,EAAE,MAAM,8CAA8C,CAAC;AAC5F,OAAO,EAAE,4BAA4B,EAAE,MAAM,8CAA8C,CAAC;AAC5F,OAAO,EAAE,yBAAyB,EAAE,MAAM,2CAA2C,CAAC;AAEtF;;;;GAIG;AACH,MAAM,CAAC,MAAM,8BAA8B,GAAG,EAAE,MAAM,EAAE,EAAE,EAAE,KAAK,EAAE,uBAAuB,EAAW,CAAC;AAEtG,kHAAkH;AAClH,MAAM,CAAC,MAAM,6BAA6B,GAAG,GAAG,CAAC;AAEjD;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,MAAM,0BAA0B,GAAG,MAAM,CAAC,GAAG,CAAA;;6CAEA,IAAI,CAAC,SAAS,CAAC,8BAA8B,CAAC,MAAM,CAAC,MAAM,IAAI,CAAC,SAAS,CAAC,8BAA8B,CAAC,KAAK,CAAC;sBACtI,IAAI,CAAC,SAAS,CAAC,6BAA6B,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA8TlE,CAAC;AAEF,MAAM,CAAC,MAAM,oBAAoB,GAAG,GAAG,0BAA0B,KAAK,4BAA4B,KAAK,4BAA4B,KAAK,yBAAyB,EAAE,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"mcp-slate-ui-script-l10n.d.ts","sourceRoot":"","sources":["../src/mcp-slate-ui-script-l10n.ts"],"names":[],"mappings":"AAGA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,eAAO,MAAM,aAAa,QAmGzB,CAAC;AAEF,gFAAgF;AAChF,eAAO,MAAM,gBAAgB,GAAI,UAAU,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,KAAG,MAKjB,CAAC"}
1
+ {"version":3,"file":"mcp-slate-ui-script-l10n.d.ts","sourceRoot":"","sources":["../src/mcp-slate-ui-script-l10n.ts"],"names":[],"mappings":"AAGA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,eAAO,MAAM,aAAa,QAqGzB,CAAC;AAEF,gFAAgF;AAChF,eAAO,MAAM,gBAAgB,GAAI,UAAU,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,KAAG,MAKjB,CAAC"}
@@ -94,6 +94,8 @@ export const SLATE_UI_L10N = String.raw `
94
94
  for (var i = 0; i < words.length; i++) words[i].textContent = t(words[i].getAttribute("data-l10n"));
95
95
  var named = root.querySelectorAll("[data-l10n-aria]");
96
96
  for (var j = 0; j < named.length; j++) named[j].setAttribute("aria-label", t(named[j].getAttribute("data-l10n-aria")));
97
+ var placeheld = root.querySelectorAll("[data-l10n-placeholder]");
98
+ for (var p = 0; p < placeheld.length; p++) placeheld[p].setAttribute("placeholder", t(placeheld[p].getAttribute("data-l10n-placeholder")));
97
99
  var labelled = root.querySelectorAll("[data-l10n-label]");
98
100
  for (var k = 0; k < labelled.length; k++) {
99
101
  var label = t(labelled[k].getAttribute("data-l10n-label"));
@@ -1 +1 @@
1
- {"version":3,"file":"mcp-slate-ui-script-l10n.js","sourceRoot":"","sources":["../src/mcp-slate-ui-script-l10n.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AACvE,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AAEpE;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG,MAAM,CAAC,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAmGtC,CAAC;AAEF,gFAAgF;AAChF,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,QAAgD,EAAU,EAAE,CAAC,aAAa;KACxG,OAAO,CAAC,cAAc,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,CAAC;KACvD,OAAO,CAAC,eAAe,EAAE,GAAG,EAAE,CAAC,QAAQ,CAAC,QAAQ,EAAE,CAAC;KACnD,OAAO,CAAC,gBAAgB,EAAE,GAAG,EAAE,CAAC,SAAS,CAAC,QAAQ,EAAE,CAAC;KACrD,OAAO,CAAC,gBAAgB,EAAE,GAAG,EAAE,CAAC,SAAS,CAAC,QAAQ,EAAE,CAAC;KACrD,OAAO,CAAC,kBAAkB,EAAE,GAAG,EAAE,CAAC,kBAAkB,CAAC,QAAQ,EAAE,CAAC,CAAC"}
1
+ {"version":3,"file":"mcp-slate-ui-script-l10n.js","sourceRoot":"","sources":["../src/mcp-slate-ui-script-l10n.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AACvE,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AAEpE;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG,MAAM,CAAC,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAqGtC,CAAC;AAEF,gFAAgF;AAChF,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,QAAgD,EAAU,EAAE,CAAC,aAAa;KACxG,OAAO,CAAC,cAAc,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,CAAC;KACvD,OAAO,CAAC,eAAe,EAAE,GAAG,EAAE,CAAC,QAAQ,CAAC,QAAQ,EAAE,CAAC;KACnD,OAAO,CAAC,gBAAgB,EAAE,GAAG,EAAE,CAAC,SAAS,CAAC,QAAQ,EAAE,CAAC;KACrD,OAAO,CAAC,gBAAgB,EAAE,GAAG,EAAE,CAAC,SAAS,CAAC,QAAQ,EAAE,CAAC;KACrD,OAAO,CAAC,kBAAkB,EAAE,GAAG,EAAE,CAAC,kBAAkB,CAAC,QAAQ,EAAE,CAAC,CAAC"}
@@ -1,37 +1,8 @@
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 declare const SLATE_UI_MORE: string;
37
8
  //# sourceMappingURL=mcp-slate-ui-script-more.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"mcp-slate-ui-script-more.d.ts","sourceRoot":"","sources":["../src/mcp-slate-ui-script-more.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AACH,eAAO,MAAM,aAAa,QAqQzB,CAAC"}
1
+ {"version":3,"file":"mcp-slate-ui-script-more.d.ts","sourceRoot":"","sources":["../src/mcp-slate-ui-script-more.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,eAAO,MAAM,aAAa,QAiBzB,CAAC"}