@12ui/design 0.2.72 → 0.2.73

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 (589) hide show
  1. package/README.md +242 -54
  2. package/SKILL.md +28 -33
  3. package/dist/cli-arguments.d.ts.map +1 -1
  4. package/dist/cli-arguments.js +3 -0
  5. package/dist/cli-arguments.js.map +1 -1
  6. package/dist/cli-branch-command.d.ts.map +1 -1
  7. package/dist/cli-branch-command.js +4 -0
  8. package/dist/cli-branch-command.js.map +1 -1
  9. package/dist/cli-capabilities.d.ts +26 -1
  10. package/dist/cli-capabilities.d.ts.map +1 -1
  11. package/dist/cli-capabilities.js +26 -1
  12. package/dist/cli-capabilities.js.map +1 -1
  13. package/dist/cli-corpus-command.d.ts +5 -4
  14. package/dist/cli-corpus-command.d.ts.map +1 -1
  15. package/dist/cli-corpus-command.js +17 -26
  16. package/dist/cli-corpus-command.js.map +1 -1
  17. package/dist/cli-corpus-run.js +1 -1
  18. package/dist/cli-corpus-run.js.map +1 -1
  19. package/dist/cli-draft-command.js +1 -1
  20. package/dist/cli-draft-command.js.map +1 -1
  21. package/dist/cli-help/design.d.ts +26 -6
  22. package/dist/cli-help/design.d.ts.map +1 -1
  23. package/dist/cli-help/design.js +39 -7
  24. package/dist/cli-help/design.js.map +1 -1
  25. package/dist/cli-help/index.d.ts +113 -7
  26. package/dist/cli-help/index.d.ts.map +1 -1
  27. package/dist/cli-help/index.js +2 -0
  28. package/dist/cli-help/index.js.map +1 -1
  29. package/dist/cli-help/meta.d.ts +1 -1
  30. package/dist/cli-help/meta.d.ts.map +1 -1
  31. package/dist/cli-help/meta.js +2 -1
  32. package/dist/cli-help/meta.js.map +1 -1
  33. package/dist/cli-help/workflow.d.ts +90 -0
  34. package/dist/cli-help/workflow.d.ts.map +1 -0
  35. package/dist/cli-help/workflow.js +89 -0
  36. package/dist/cli-help/workflow.js.map +1 -0
  37. package/dist/cli-open-browser.d.ts +7 -0
  38. package/dist/cli-open-browser.d.ts.map +1 -0
  39. package/dist/cli-open-browser.js +25 -0
  40. package/dist/cli-open-browser.js.map +1 -0
  41. package/dist/cli-prototype-command.d.ts +3 -1
  42. package/dist/cli-prototype-command.d.ts.map +1 -1
  43. package/dist/cli-prototype-command.js +33 -7
  44. package/dist/cli-prototype-command.js.map +1 -1
  45. package/dist/cli-review-command.d.ts.map +1 -1
  46. package/dist/cli-review-command.js +1 -16
  47. package/dist/cli-review-command.js.map +1 -1
  48. package/dist/cli-run.d.ts.map +1 -1
  49. package/dist/cli-run.js +35 -3
  50. package/dist/cli-run.js.map +1 -1
  51. package/dist/cli-usage.d.ts.map +1 -1
  52. package/dist/cli-usage.js +39 -5
  53. package/dist/cli-usage.js.map +1 -1
  54. package/dist/cli-workflow-command.d.ts +8 -0
  55. package/dist/cli-workflow-command.d.ts.map +1 -0
  56. package/dist/cli-workflow-command.js +97 -0
  57. package/dist/cli-workflow-command.js.map +1 -0
  58. package/dist/cli-workspace-command.d.ts +25 -0
  59. package/dist/cli-workspace-command.d.ts.map +1 -0
  60. package/dist/cli-workspace-command.js +95 -0
  61. package/dist/cli-workspace-command.js.map +1 -0
  62. package/dist/config.d.ts +6 -0
  63. package/dist/config.d.ts.map +1 -1
  64. package/dist/config.js +12 -4
  65. package/dist/config.js.map +1 -1
  66. package/dist/corpus-access.d.ts +11 -0
  67. package/dist/corpus-access.d.ts.map +1 -0
  68. package/dist/corpus-access.js +18 -0
  69. package/dist/corpus-access.js.map +1 -0
  70. package/dist/corpus-client.d.ts +11 -11
  71. package/dist/corpus-client.d.ts.map +1 -1
  72. package/dist/corpus-client.js +17 -6
  73. package/dist/corpus-client.js.map +1 -1
  74. package/dist/corpus-inspiration-failure.d.ts +1 -1
  75. package/dist/corpus-inspiration-failure.js +2 -2
  76. package/dist/corpus-inspiration-failure.js.map +1 -1
  77. package/dist/corpus-reference-download-retry.d.ts.map +1 -1
  78. package/dist/corpus-reference-download-retry.js +11 -1
  79. package/dist/corpus-reference-download-retry.js.map +1 -1
  80. package/dist/corpus-request-error.d.ts +2 -0
  81. package/dist/corpus-request-error.d.ts.map +1 -1
  82. package/dist/corpus-request-error.js +2 -0
  83. package/dist/corpus-request-error.js.map +1 -1
  84. package/dist/corpus-retry-guidance.d.ts +5 -0
  85. package/dist/corpus-retry-guidance.d.ts.map +1 -0
  86. package/dist/corpus-retry-guidance.js +18 -0
  87. package/dist/corpus-retry-guidance.js.map +1 -0
  88. package/dist/improve-pricing-plan.d.ts.map +1 -1
  89. package/dist/improve-pricing-plan.js +2 -4
  90. package/dist/improve-pricing-plan.js.map +1 -1
  91. package/dist/index.d.ts +10 -1
  92. package/dist/index.d.ts.map +1 -1
  93. package/dist/index.js +10 -1
  94. package/dist/index.js.map +1 -1
  95. package/dist/legacy-skill-catalog.d.ts.map +1 -1
  96. package/dist/legacy-skill-catalog.js +41 -0
  97. package/dist/legacy-skill-catalog.js.map +1 -1
  98. package/dist/mcp-slate-command.d.ts +31 -0
  99. package/dist/mcp-slate-command.d.ts.map +1 -0
  100. package/dist/mcp-slate-command.js +118 -0
  101. package/dist/mcp-slate-command.js.map +1 -0
  102. package/dist/mcp-slate-image.d.ts +22 -0
  103. package/dist/mcp-slate-image.d.ts.map +1 -0
  104. package/dist/mcp-slate-image.js +28 -0
  105. package/dist/mcp-slate-image.js.map +1 -0
  106. package/dist/mcp-slate-latest.d.ts +13 -0
  107. package/dist/mcp-slate-latest.d.ts.map +1 -0
  108. package/dist/mcp-slate-latest.js +34 -0
  109. package/dist/mcp-slate-latest.js.map +1 -0
  110. package/dist/mcp-slate-names.d.ts +25 -0
  111. package/dist/mcp-slate-names.d.ts.map +1 -0
  112. package/dist/mcp-slate-names.js +49 -0
  113. package/dist/mcp-slate-names.js.map +1 -0
  114. package/dist/mcp-slate-resource.d.ts +5 -0
  115. package/dist/mcp-slate-resource.d.ts.map +1 -0
  116. package/dist/mcp-slate-resource.js +37 -0
  117. package/dist/mcp-slate-resource.js.map +1 -0
  118. package/dist/mcp-slate-run.d.ts +41 -0
  119. package/dist/mcp-slate-run.d.ts.map +1 -0
  120. package/dist/mcp-slate-run.js +88 -0
  121. package/dist/mcp-slate-run.js.map +1 -0
  122. package/dist/mcp-slate-tool-defs.d.ts +61 -0
  123. package/dist/mcp-slate-tool-defs.d.ts.map +1 -0
  124. package/dist/mcp-slate-tool-defs.js +247 -0
  125. package/dist/mcp-slate-tool-defs.js.map +1 -0
  126. package/dist/mcp-slate-tools.d.ts +8 -0
  127. package/dist/mcp-slate-tools.d.ts.map +1 -0
  128. package/dist/mcp-slate-tools.js +45 -0
  129. package/dist/mcp-slate-tools.js.map +1 -0
  130. package/dist/mcp-slate-ui-copy.d.ts +134 -0
  131. package/dist/mcp-slate-ui-copy.d.ts.map +1 -0
  132. package/dist/mcp-slate-ui-copy.js +136 -0
  133. package/dist/mcp-slate-ui-copy.js.map +1 -0
  134. package/dist/mcp-slate-ui-script-bridge.d.ts +18 -0
  135. package/dist/mcp-slate-ui-script-bridge.d.ts.map +1 -0
  136. package/dist/mcp-slate-ui-script-bridge.js +137 -0
  137. package/dist/mcp-slate-ui-script-bridge.js.map +1 -0
  138. package/dist/mcp-slate-ui-script-browser.d.ts +12 -0
  139. package/dist/mcp-slate-ui-script-browser.d.ts.map +1 -0
  140. package/dist/mcp-slate-ui-script-browser.js +19 -0
  141. package/dist/mcp-slate-ui-script-browser.js.map +1 -0
  142. package/dist/mcp-slate-ui-script-dialog.d.ts +20 -0
  143. package/dist/mcp-slate-ui-script-dialog.d.ts.map +1 -0
  144. package/dist/mcp-slate-ui-script-dialog.js +332 -0
  145. package/dist/mcp-slate-ui-script-dialog.js.map +1 -0
  146. package/dist/mcp-slate-ui-script-inline.d.ts +10 -0
  147. package/dist/mcp-slate-ui-script-inline.d.ts.map +1 -0
  148. package/dist/mcp-slate-ui-script-inline.js +221 -0
  149. package/dist/mcp-slate-ui-script-inline.js.map +1 -0
  150. package/dist/mcp-slate-ui-script-inspiration.d.ts +12 -0
  151. package/dist/mcp-slate-ui-script-inspiration.d.ts.map +1 -0
  152. package/dist/mcp-slate-ui-script-inspiration.js +216 -0
  153. package/dist/mcp-slate-ui-script-inspiration.js.map +1 -0
  154. package/dist/mcp-slate-ui-script-more.d.ts +30 -0
  155. package/dist/mcp-slate-ui-script-more.d.ts.map +1 -0
  156. package/dist/mcp-slate-ui-script-more.js +225 -0
  157. package/dist/mcp-slate-ui-script-more.js.map +1 -0
  158. package/dist/mcp-slate-ui-script-progress.d.ts +7 -0
  159. package/dist/mcp-slate-ui-script-progress.d.ts.map +1 -0
  160. package/dist/mcp-slate-ui-script-progress.js +9 -0
  161. package/dist/mcp-slate-ui-script-progress.js.map +1 -0
  162. package/dist/mcp-slate-ui-script-remote.d.ts +28 -0
  163. package/dist/mcp-slate-ui-script-remote.d.ts.map +1 -0
  164. package/dist/mcp-slate-ui-script-remote.js +147 -0
  165. package/dist/mcp-slate-ui-script-remote.js.map +1 -0
  166. package/dist/mcp-slate-ui-script-scribble.d.ts +19 -0
  167. package/dist/mcp-slate-ui-script-scribble.d.ts.map +1 -0
  168. package/dist/mcp-slate-ui-script-scribble.js +114 -0
  169. package/dist/mcp-slate-ui-script-scribble.js.map +1 -0
  170. package/dist/mcp-slate-ui-script-select.d.ts +16 -0
  171. package/dist/mcp-slate-ui-script-select.d.ts.map +1 -0
  172. package/dist/mcp-slate-ui-script-select.js +73 -0
  173. package/dist/mcp-slate-ui-script-select.js.map +1 -0
  174. package/dist/mcp-slate-ui-script-stage.d.ts +11 -0
  175. package/dist/mcp-slate-ui-script-stage.d.ts.map +1 -0
  176. package/dist/mcp-slate-ui-script-stage.js +181 -0
  177. package/dist/mcp-slate-ui-script-stage.js.map +1 -0
  178. package/dist/mcp-slate-ui-script-state.d.ts +13 -0
  179. package/dist/mcp-slate-ui-script-state.d.ts.map +1 -0
  180. package/dist/mcp-slate-ui-script-state.js +306 -0
  181. package/dist/mcp-slate-ui-script-state.js.map +1 -0
  182. package/dist/mcp-slate-ui-script-thumbtools.d.ts +23 -0
  183. package/dist/mcp-slate-ui-script-thumbtools.d.ts.map +1 -0
  184. package/dist/mcp-slate-ui-script-thumbtools.js +103 -0
  185. package/dist/mcp-slate-ui-script-thumbtools.js.map +1 -0
  186. package/dist/mcp-slate-ui-script.d.ts +28 -0
  187. package/dist/mcp-slate-ui-script.d.ts.map +1 -0
  188. package/dist/mcp-slate-ui-script.js +58 -0
  189. package/dist/mcp-slate-ui-script.js.map +1 -0
  190. package/dist/mcp-slate-ui-styles-dialog.d.ts +17 -0
  191. package/dist/mcp-slate-ui-styles-dialog.d.ts.map +1 -0
  192. package/dist/mcp-slate-ui-styles-dialog.js +73 -0
  193. package/dist/mcp-slate-ui-styles-dialog.js.map +1 -0
  194. package/dist/mcp-slate-ui-styles-stage.d.ts +12 -0
  195. package/dist/mcp-slate-ui-styles-stage.d.ts.map +1 -0
  196. package/dist/mcp-slate-ui-styles-stage.js +53 -0
  197. package/dist/mcp-slate-ui-styles-stage.js.map +1 -0
  198. package/dist/mcp-slate-ui-styles-thumbtools.d.ts +10 -0
  199. package/dist/mcp-slate-ui-styles-thumbtools.d.ts.map +1 -0
  200. package/dist/mcp-slate-ui-styles-thumbtools.js +25 -0
  201. package/dist/mcp-slate-ui-styles-thumbtools.js.map +1 -0
  202. package/dist/mcp-slate-ui-styles.d.ts +13 -0
  203. package/dist/mcp-slate-ui-styles.d.ts.map +1 -0
  204. package/dist/mcp-slate-ui-styles.js +117 -0
  205. package/dist/mcp-slate-ui-styles.js.map +1 -0
  206. package/dist/mcp-slate-ui.d.ts +16 -0
  207. package/dist/mcp-slate-ui.d.ts.map +1 -0
  208. package/dist/mcp-slate-ui.js +58 -0
  209. package/dist/mcp-slate-ui.js.map +1 -0
  210. package/dist/mcp-slate-workspace-tools.d.ts +15 -0
  211. package/dist/mcp-slate-workspace-tools.d.ts.map +1 -0
  212. package/dist/mcp-slate-workspace-tools.js +155 -0
  213. package/dist/mcp-slate-workspace-tools.js.map +1 -0
  214. package/dist/mcp-tool-definitions.d.ts.map +1 -1
  215. package/dist/mcp-tool-definitions.js +9 -7
  216. package/dist/mcp-tool-definitions.js.map +1 -1
  217. package/dist/mcp-tool-handler.d.ts +8 -2
  218. package/dist/mcp-tool-handler.d.ts.map +1 -1
  219. package/dist/mcp-tool-handler.js +34 -13
  220. package/dist/mcp-tool-handler.js.map +1 -1
  221. package/dist/mcp-workflow-tools.d.ts +6 -0
  222. package/dist/mcp-workflow-tools.d.ts.map +1 -0
  223. package/dist/mcp-workflow-tools.js +108 -0
  224. package/dist/mcp-workflow-tools.js.map +1 -0
  225. package/dist/prototype-label-client.d.ts +5 -0
  226. package/dist/prototype-label-client.d.ts.map +1 -1
  227. package/dist/prototype-label-client.js.map +1 -1
  228. package/dist/prototype-poststep.d.ts +2 -2
  229. package/dist/prototype-poststep.d.ts.map +1 -1
  230. package/dist/prototype-poststep.js +3 -0
  231. package/dist/prototype-poststep.js.map +1 -1
  232. package/dist/prototype-run-record.d.ts +6 -2
  233. package/dist/prototype-run-record.d.ts.map +1 -1
  234. package/dist/prototype-run-record.js +6 -0
  235. package/dist/prototype-run-record.js.map +1 -1
  236. package/dist/prototype-runner.d.ts +2 -2
  237. package/dist/prototype-runner.d.ts.map +1 -1
  238. package/dist/prototype-runner.js +5 -2
  239. package/dist/prototype-runner.js.map +1 -1
  240. package/dist/prototype-workflow-contract.d.ts +13 -0
  241. package/dist/prototype-workflow-contract.d.ts.map +1 -0
  242. package/dist/prototype-workflow-contract.js +82 -0
  243. package/dist/prototype-workflow-contract.js.map +1 -0
  244. package/dist/prototype-workflow-labels.d.ts +29 -0
  245. package/dist/prototype-workflow-labels.d.ts.map +1 -0
  246. package/dist/prototype-workflow-labels.js +93 -0
  247. package/dist/prototype-workflow-labels.js.map +1 -0
  248. package/dist/run-journal-commands.d.ts.map +1 -1
  249. package/dist/run-journal-commands.js +18 -5
  250. package/dist/run-journal-commands.js.map +1 -1
  251. package/dist/server.d.ts +22 -2
  252. package/dist/server.d.ts.map +1 -1
  253. package/dist/server.js +44 -8
  254. package/dist/server.js.map +1 -1
  255. package/dist/slate-actions.d.ts +38 -0
  256. package/dist/slate-actions.d.ts.map +1 -0
  257. package/dist/slate-actions.js +102 -0
  258. package/dist/slate-actions.js.map +1 -0
  259. package/dist/slate-annotate.d.ts +36 -0
  260. package/dist/slate-annotate.d.ts.map +1 -0
  261. package/dist/slate-annotate.js +71 -0
  262. package/dist/slate-annotate.js.map +1 -0
  263. package/dist/slate-approvals.d.ts +61 -0
  264. package/dist/slate-approvals.d.ts.map +1 -0
  265. package/dist/slate-approvals.js +153 -0
  266. package/dist/slate-approvals.js.map +1 -0
  267. package/dist/slate-browser-decision.d.ts +30 -0
  268. package/dist/slate-browser-decision.d.ts.map +1 -0
  269. package/dist/slate-browser-decision.js +24 -0
  270. package/dist/slate-browser-decision.js.map +1 -0
  271. package/dist/slate-browser-host-script.d.ts +14 -0
  272. package/dist/slate-browser-host-script.d.ts.map +1 -0
  273. package/dist/slate-browser-host-script.js +125 -0
  274. package/dist/slate-browser-host-script.js.map +1 -0
  275. package/dist/slate-browser-host.d.ts +9 -0
  276. package/dist/slate-browser-host.d.ts.map +1 -0
  277. package/dist/slate-browser-host.js +37 -0
  278. package/dist/slate-browser-host.js.map +1 -0
  279. package/dist/slate-browser-server.d.ts +37 -0
  280. package/dist/slate-browser-server.d.ts.map +1 -0
  281. package/dist/slate-browser-server.js +186 -0
  282. package/dist/slate-browser-server.js.map +1 -0
  283. package/dist/slate-commit.d.ts +28 -0
  284. package/dist/slate-commit.d.ts.map +1 -0
  285. package/dist/slate-commit.js +218 -0
  286. package/dist/slate-commit.js.map +1 -0
  287. package/dist/slate-corpus.d.ts +14 -0
  288. package/dist/slate-corpus.d.ts.map +1 -0
  289. package/dist/slate-corpus.js +32 -0
  290. package/dist/slate-corpus.js.map +1 -0
  291. package/dist/slate-edit-prompt.d.ts +18 -0
  292. package/dist/slate-edit-prompt.d.ts.map +1 -0
  293. package/dist/slate-edit-prompt.js +41 -0
  294. package/dist/slate-edit-prompt.js.map +1 -0
  295. package/dist/slate-edit-runner.d.ts +4 -0
  296. package/dist/slate-edit-runner.d.ts.map +1 -0
  297. package/dist/slate-edit-runner.js +90 -0
  298. package/dist/slate-edit-runner.js.map +1 -0
  299. package/dist/slate-editability.d.ts +20 -0
  300. package/dist/slate-editability.d.ts.map +1 -0
  301. package/dist/slate-editability.js +19 -0
  302. package/dist/slate-editability.js.map +1 -0
  303. package/dist/slate-errors.d.ts +15 -0
  304. package/dist/slate-errors.d.ts.map +1 -0
  305. package/dist/slate-errors.js +21 -0
  306. package/dist/slate-errors.js.map +1 -0
  307. package/dist/slate-handoff-options.d.ts +40 -0
  308. package/dist/slate-handoff-options.d.ts.map +1 -0
  309. package/dist/slate-handoff-options.js +127 -0
  310. package/dist/slate-handoff-options.js.map +1 -0
  311. package/dist/slate-handoff.d.ts +11 -0
  312. package/dist/slate-handoff.d.ts.map +1 -0
  313. package/dist/slate-handoff.js +56 -0
  314. package/dist/slate-handoff.js.map +1 -0
  315. package/dist/slate-ids.d.ts +33 -0
  316. package/dist/slate-ids.d.ts.map +1 -0
  317. package/dist/slate-ids.js +47 -0
  318. package/dist/slate-ids.js.map +1 -0
  319. package/dist/slate-image-executor.d.ts +39 -0
  320. package/dist/slate-image-executor.d.ts.map +1 -0
  321. package/dist/slate-image-executor.js +52 -0
  322. package/dist/slate-image-executor.js.map +1 -0
  323. package/dist/slate-inspiration.d.ts +22 -0
  324. package/dist/slate-inspiration.d.ts.map +1 -0
  325. package/dist/slate-inspiration.js +112 -0
  326. package/dist/slate-inspiration.js.map +1 -0
  327. package/dist/slate-labels.d.ts +11 -0
  328. package/dist/slate-labels.d.ts.map +1 -0
  329. package/dist/slate-labels.js +32 -0
  330. package/dist/slate-labels.js.map +1 -0
  331. package/dist/slate-ledger.d.ts +29 -0
  332. package/dist/slate-ledger.d.ts.map +1 -0
  333. package/dist/slate-ledger.js +65 -0
  334. package/dist/slate-ledger.js.map +1 -0
  335. package/dist/slate-liveness.d.ts +26 -0
  336. package/dist/slate-liveness.d.ts.map +1 -0
  337. package/dist/slate-liveness.js +49 -0
  338. package/dist/slate-liveness.js.map +1 -0
  339. package/dist/slate-local-image.d.ts +19 -0
  340. package/dist/slate-local-image.d.ts.map +1 -0
  341. package/dist/slate-local-image.js +36 -0
  342. package/dist/slate-local-image.js.map +1 -0
  343. package/dist/slate-lock.d.ts +64 -0
  344. package/dist/slate-lock.d.ts.map +1 -0
  345. package/dist/slate-lock.js +178 -0
  346. package/dist/slate-lock.js.map +1 -0
  347. package/dist/slate-paths.d.ts +45 -0
  348. package/dist/slate-paths.d.ts.map +1 -0
  349. package/dist/slate-paths.js +132 -0
  350. package/dist/slate-paths.js.map +1 -0
  351. package/dist/slate-pick.d.ts +29 -0
  352. package/dist/slate-pick.d.ts.map +1 -0
  353. package/dist/slate-pick.js +55 -0
  354. package/dist/slate-pick.js.map +1 -0
  355. package/dist/slate-reference-ids.d.ts +6 -0
  356. package/dist/slate-reference-ids.d.ts.map +1 -0
  357. package/dist/slate-reference-ids.js +17 -0
  358. package/dist/slate-reference-ids.js.map +1 -0
  359. package/dist/slate-reference-store.d.ts +23 -0
  360. package/dist/slate-reference-store.d.ts.map +1 -0
  361. package/dist/slate-reference-store.js +46 -0
  362. package/dist/slate-reference-store.js.map +1 -0
  363. package/dist/slate-resume.d.ts +19 -0
  364. package/dist/slate-resume.d.ts.map +1 -0
  365. package/dist/slate-resume.js +94 -0
  366. package/dist/slate-resume.js.map +1 -0
  367. package/dist/slate-round-params.d.ts +20 -0
  368. package/dist/slate-round-params.d.ts.map +1 -0
  369. package/dist/slate-round-params.js +32 -0
  370. package/dist/slate-round-params.js.map +1 -0
  371. package/dist/slate-round-prompt.d.ts +18 -0
  372. package/dist/slate-round-prompt.d.ts.map +1 -0
  373. package/dist/slate-round-prompt.js +20 -0
  374. package/dist/slate-round-prompt.js.map +1 -0
  375. package/dist/slate-round-runner.d.ts +4 -0
  376. package/dist/slate-round-runner.d.ts.map +1 -0
  377. package/dist/slate-round-runner.js +125 -0
  378. package/dist/slate-round-runner.js.map +1 -0
  379. package/dist/slate-round-search.d.ts +7 -0
  380. package/dist/slate-round-search.d.ts.map +1 -0
  381. package/dist/slate-round-search.js +77 -0
  382. package/dist/slate-round-search.js.map +1 -0
  383. package/dist/slate-run-action.d.ts +14 -0
  384. package/dist/slate-run-action.d.ts.map +1 -0
  385. package/dist/slate-run-action.js +81 -0
  386. package/dist/slate-run-action.js.map +1 -0
  387. package/dist/slate-runner-context.d.ts +57 -0
  388. package/dist/slate-runner-context.d.ts.map +1 -0
  389. package/dist/slate-runner-context.js +79 -0
  390. package/dist/slate-runner-context.js.map +1 -0
  391. package/dist/slate-runner-failure.d.ts +8 -0
  392. package/dist/slate-runner-failure.d.ts.map +1 -0
  393. package/dist/slate-runner-failure.js +17 -0
  394. package/dist/slate-runner-failure.js.map +1 -0
  395. package/dist/slate-runner-flag.d.ts +3 -0
  396. package/dist/slate-runner-flag.d.ts.map +1 -0
  397. package/dist/slate-runner-flag.js +3 -0
  398. package/dist/slate-runner-flag.js.map +1 -0
  399. package/dist/slate-runner-main.d.ts +31 -0
  400. package/dist/slate-runner-main.d.ts.map +1 -0
  401. package/dist/slate-runner-main.js +132 -0
  402. package/dist/slate-runner-main.js.map +1 -0
  403. package/dist/slate-runner-spawn.d.ts +23 -0
  404. package/dist/slate-runner-spawn.d.ts.map +1 -0
  405. package/dist/slate-runner-spawn.js +27 -0
  406. package/dist/slate-runner-spawn.js.map +1 -0
  407. package/dist/slate-runtime.d.ts +38 -0
  408. package/dist/slate-runtime.d.ts.map +1 -0
  409. package/dist/slate-runtime.js +48 -0
  410. package/dist/slate-runtime.js.map +1 -0
  411. package/dist/slate-versions.d.ts +26 -0
  412. package/dist/slate-versions.d.ts.map +1 -0
  413. package/dist/slate-versions.js +110 -0
  414. package/dist/slate-versions.js.map +1 -0
  415. package/dist/slate-view-contract.d.ts +233 -0
  416. package/dist/slate-view-contract.d.ts.map +1 -0
  417. package/dist/slate-view-contract.js +17 -0
  418. package/dist/slate-view-contract.js.map +1 -0
  419. package/dist/slate-view-types.d.ts +2 -0
  420. package/dist/slate-view-types.d.ts.map +1 -0
  421. package/dist/slate-view-types.js +2 -0
  422. package/dist/slate-view-types.js.map +1 -0
  423. package/dist/slate-view.d.ts +19 -0
  424. package/dist/slate-view.d.ts.map +1 -0
  425. package/dist/slate-view.js +184 -0
  426. package/dist/slate-view.js.map +1 -0
  427. package/dist/slate-workspace-parse.d.ts +20 -0
  428. package/dist/slate-workspace-parse.d.ts.map +1 -0
  429. package/dist/slate-workspace-parse.js +437 -0
  430. package/dist/slate-workspace-parse.js.map +1 -0
  431. package/dist/slate-workspace-store.d.ts +44 -0
  432. package/dist/slate-workspace-store.d.ts.map +1 -0
  433. package/dist/slate-workspace-store.js +270 -0
  434. package/dist/slate-workspace-store.js.map +1 -0
  435. package/dist/slate-workspace-types.d.ts +176 -0
  436. package/dist/slate-workspace-types.d.ts.map +1 -0
  437. package/dist/slate-workspace-types.js +13 -0
  438. package/dist/slate-workspace-types.js.map +1 -0
  439. package/dist/workflow/adapter-12ui.d.ts +4 -0
  440. package/dist/workflow/adapter-12ui.d.ts.map +1 -0
  441. package/dist/workflow/adapter-12ui.js +147 -0
  442. package/dist/workflow/adapter-12ui.js.map +1 -0
  443. package/dist/workflow/adapter-layerdoc.d.ts +16 -0
  444. package/dist/workflow/adapter-layerdoc.d.ts.map +1 -0
  445. package/dist/workflow/adapter-layerdoc.js +116 -0
  446. package/dist/workflow/adapter-layerdoc.js.map +1 -0
  447. package/dist/workflow/adapter-openai.d.ts +4 -0
  448. package/dist/workflow/adapter-openai.d.ts.map +1 -0
  449. package/dist/workflow/adapter-openai.js +166 -0
  450. package/dist/workflow/adapter-openai.js.map +1 -0
  451. package/dist/workflow/adapter-process.d.ts +7 -0
  452. package/dist/workflow/adapter-process.d.ts.map +1 -0
  453. package/dist/workflow/adapter-process.js +174 -0
  454. package/dist/workflow/adapter-process.js.map +1 -0
  455. package/dist/workflow/adapter-prototype-labels.d.ts +15 -0
  456. package/dist/workflow/adapter-prototype-labels.d.ts.map +1 -0
  457. package/dist/workflow/adapter-prototype-labels.js +71 -0
  458. package/dist/workflow/adapter-prototype-labels.js.map +1 -0
  459. package/dist/workflow/adapter-types.d.ts +40 -0
  460. package/dist/workflow/adapter-types.d.ts.map +1 -0
  461. package/dist/workflow/adapter-types.js +2 -0
  462. package/dist/workflow/adapter-types.js.map +1 -0
  463. package/dist/workflow/adapter-utils.d.ts +11 -0
  464. package/dist/workflow/adapter-utils.d.ts.map +1 -0
  465. package/dist/workflow/adapter-utils.js +72 -0
  466. package/dist/workflow/adapter-utils.js.map +1 -0
  467. package/dist/workflow/adapters.d.ts +6 -0
  468. package/dist/workflow/adapters.d.ts.map +1 -0
  469. package/dist/workflow/adapters.js +25 -0
  470. package/dist/workflow/adapters.js.map +1 -0
  471. package/dist/workflow/artifact.d.ts +11 -0
  472. package/dist/workflow/artifact.d.ts.map +1 -0
  473. package/dist/workflow/artifact.js +94 -0
  474. package/dist/workflow/artifact.js.map +1 -0
  475. package/dist/workflow/bundle-collect.d.ts +8 -0
  476. package/dist/workflow/bundle-collect.d.ts.map +1 -0
  477. package/dist/workflow/bundle-collect.js +56 -0
  478. package/dist/workflow/bundle-collect.js.map +1 -0
  479. package/dist/workflow/bundle-export.d.ts +16 -0
  480. package/dist/workflow/bundle-export.d.ts.map +1 -0
  481. package/dist/workflow/bundle-export.js +174 -0
  482. package/dist/workflow/bundle-export.js.map +1 -0
  483. package/dist/workflow/bundle-paths.d.ts +7 -0
  484. package/dist/workflow/bundle-paths.d.ts.map +1 -0
  485. package/dist/workflow/bundle-paths.js +35 -0
  486. package/dist/workflow/bundle-paths.js.map +1 -0
  487. package/dist/workflow/bundle.d.ts +4 -0
  488. package/dist/workflow/bundle.d.ts.map +1 -0
  489. package/dist/workflow/bundle.js +4 -0
  490. package/dist/workflow/bundle.js.map +1 -0
  491. package/dist/workflow/capture.d.ts +36 -0
  492. package/dist/workflow/capture.d.ts.map +1 -0
  493. package/dist/workflow/capture.js +81 -0
  494. package/dist/workflow/capture.js.map +1 -0
  495. package/dist/workflow/continuation-branch.d.ts +15 -0
  496. package/dist/workflow/continuation-branch.d.ts.map +1 -0
  497. package/dist/workflow/continuation-branch.js +103 -0
  498. package/dist/workflow/continuation-branch.js.map +1 -0
  499. package/dist/workflow/continuation-plans.d.ts +38 -0
  500. package/dist/workflow/continuation-plans.d.ts.map +1 -0
  501. package/dist/workflow/continuation-plans.js +78 -0
  502. package/dist/workflow/continuation-plans.js.map +1 -0
  503. package/dist/workflow/continuation.d.ts +25 -0
  504. package/dist/workflow/continuation.d.ts.map +1 -0
  505. package/dist/workflow/continuation.js +89 -0
  506. package/dist/workflow/continuation.js.map +1 -0
  507. package/dist/workflow/layerdoc-reader.d.ts +27 -0
  508. package/dist/workflow/layerdoc-reader.d.ts.map +1 -0
  509. package/dist/workflow/layerdoc-reader.js +81 -0
  510. package/dist/workflow/layerdoc-reader.js.map +1 -0
  511. package/dist/workflow/project-evidence.d.ts +48 -0
  512. package/dist/workflow/project-evidence.d.ts.map +1 -0
  513. package/dist/workflow/project-evidence.js +200 -0
  514. package/dist/workflow/project-evidence.js.map +1 -0
  515. package/dist/workflow/providers.d.ts +35 -0
  516. package/dist/workflow/providers.d.ts.map +1 -0
  517. package/dist/workflow/providers.js +110 -0
  518. package/dist/workflow/providers.js.map +1 -0
  519. package/dist/workflow/recipes-layerdoc-validation.d.ts +4 -0
  520. package/dist/workflow/recipes-layerdoc-validation.d.ts.map +1 -0
  521. package/dist/workflow/recipes-layerdoc-validation.js +98 -0
  522. package/dist/workflow/recipes-layerdoc-validation.js.map +1 -0
  523. package/dist/workflow/recipes-result-validation.d.ts +6 -0
  524. package/dist/workflow/recipes-result-validation.d.ts.map +1 -0
  525. package/dist/workflow/recipes-result-validation.js +38 -0
  526. package/dist/workflow/recipes-result-validation.js.map +1 -0
  527. package/dist/workflow/recipes-schemas.d.ts +7 -0
  528. package/dist/workflow/recipes-schemas.d.ts.map +1 -0
  529. package/dist/workflow/recipes-schemas.js +67 -0
  530. package/dist/workflow/recipes-schemas.js.map +1 -0
  531. package/dist/workflow/recipes-validation.d.ts +14 -0
  532. package/dist/workflow/recipes-validation.d.ts.map +1 -0
  533. package/dist/workflow/recipes-validation.js +68 -0
  534. package/dist/workflow/recipes-validation.js.map +1 -0
  535. package/dist/workflow/recipes.d.ts +20 -0
  536. package/dist/workflow/recipes.d.ts.map +1 -0
  537. package/dist/workflow/recipes.js +167 -0
  538. package/dist/workflow/recipes.js.map +1 -0
  539. package/dist/workflow/routing.d.ts +4 -0
  540. package/dist/workflow/routing.d.ts.map +1 -0
  541. package/dist/workflow/routing.js +28 -0
  542. package/dist/workflow/routing.js.map +1 -0
  543. package/dist/workflow/schema.d.ts +5 -0
  544. package/dist/workflow/schema.d.ts.map +1 -0
  545. package/dist/workflow/schema.js +29 -0
  546. package/dist/workflow/schema.js.map +1 -0
  547. package/dist/workflow/service.d.ts +59 -0
  548. package/dist/workflow/service.d.ts.map +1 -0
  549. package/dist/workflow/service.js +170 -0
  550. package/dist/workflow/service.js.map +1 -0
  551. package/dist/workflow/store-json.d.ts +5 -0
  552. package/dist/workflow/store-json.d.ts.map +1 -0
  553. package/dist/workflow/store-json.js +35 -0
  554. package/dist/workflow/store-json.js.map +1 -0
  555. package/dist/workflow/store-lock.d.ts +3 -0
  556. package/dist/workflow/store-lock.d.ts.map +1 -0
  557. package/dist/workflow/store-lock.js +85 -0
  558. package/dist/workflow/store-lock.js.map +1 -0
  559. package/dist/workflow/store-paths.d.ts +17 -0
  560. package/dist/workflow/store-paths.d.ts.map +1 -0
  561. package/dist/workflow/store-paths.js +67 -0
  562. package/dist/workflow/store-paths.js.map +1 -0
  563. package/dist/workflow/store-validation.d.ts +7 -0
  564. package/dist/workflow/store-validation.d.ts.map +1 -0
  565. package/dist/workflow/store-validation.js +119 -0
  566. package/dist/workflow/store-validation.js.map +1 -0
  567. package/dist/workflow/store.d.ts +10 -0
  568. package/dist/workflow/store.d.ts.map +1 -0
  569. package/dist/workflow/store.js +193 -0
  570. package/dist/workflow/store.js.map +1 -0
  571. package/dist/workflow/types.d.ts +120 -0
  572. package/dist/workflow/types.d.ts.map +1 -0
  573. package/dist/workflow/types.js +15 -0
  574. package/dist/workflow/types.js.map +1 -0
  575. package/dist/workflow-transport.d.ts +28 -0
  576. package/dist/workflow-transport.d.ts.map +1 -0
  577. package/dist/workflow-transport.js +184 -0
  578. package/dist/workflow-transport.js.map +1 -0
  579. package/open-design.json +2 -2
  580. package/package.json +2 -1
  581. package/prototype-kit/tests/rules-check.mjs +9 -0
  582. package/runtime/codex-conversion/src/images/native-invoke.mjs +1 -1
  583. package/runtime/codex-conversion/src/images/native.mjs +8 -4
  584. package/runtime/layerdoc-validator.mjs +1860 -0
  585. package/skills/12ui-design/SKILL.md +17 -63
  586. package/skills/12ui-design/improve.md +5 -1
  587. package/skills/12ui-design/inspire.md +8 -5
  588. package/skills/12ui-design/outputs.md +23 -2
  589. package/skills/12ui-design/session.md +161 -0
@@ -0,0 +1,306 @@
1
+ /**
2
+ * View state, the image loader queue and the status polling controller.
3
+ *
4
+ * Host limits, measured or derived (see the step-0 probe): about five
5
+ * concurrent app requests app-wide, so a view keeps at most three image loads
6
+ * in flight, version pictures and reference pictures together (leaving room
7
+ * for status and an action); it polls only while something is running and the
8
+ * document is visible, with backoff from two to ten seconds and a `since`
9
+ * stamp so an unchanged answer costs no re-render. A hidden view issues no
10
+ * calls at all.
11
+ */
12
+ export const SLATE_UI_STATE = String.raw `
13
+ var state = {
14
+ host: {}, view: null,
15
+ sel: { candidateId: null, versionId: null, followLatest: true },
16
+ tab: "designs", query: "", dialog: null, more: null, wantEdit: null,
17
+ busy: false, status: { text: "", kind: "", source: "", phase: "" }, lastOpText: "", lastBandOp: "",
18
+ thumbs: {}, fulls: {}, refs: {}, lastOpStates: {}, opBusy: {}, awaitEdit: null,
19
+ insp: { local: null, writing: false, dirty: false, searching: false, waiters: [] }
20
+ };
21
+
22
+ // ---- small helpers ----
23
+ function el(tag, cls, text) {
24
+ var e = document.createElement(tag);
25
+ if (cls) e.className = cls;
26
+ if (text !== undefined) e.textContent = text;
27
+ return e;
28
+ }
29
+ function button(label, cls, onclick) {
30
+ var b = el("button", cls || "", label);
31
+ b.type = "button";
32
+ if (onclick) b.addEventListener("click", onclick);
33
+ return b;
34
+ }
35
+ function uuid4() {
36
+ var b = new Uint8Array(16);
37
+ if (typeof crypto !== "undefined" && crypto.getRandomValues) crypto.getRandomValues(b);
38
+ else for (var i = 0; i < 16; i++) b[i] = Math.floor(Math.random() * 256);
39
+ b[6] = (b[6] & 15) | 64;
40
+ b[8] = (b[8] & 63) | 128;
41
+ var h = Array.prototype.map.call(b, function (x) { return (x + 256).toString(16).slice(1); }).join("");
42
+ return h.slice(0, 8) + "-" + h.slice(8, 12) + "-" + h.slice(12, 16) + "-" + h.slice(16, 20) + "-" + h.slice(20);
43
+ }
44
+ function visible() { return document.visibilityState !== "hidden"; }
45
+ function errText(err) { return err && err.message ? err.message : String(err); }
46
+ // "source" is "op" for a line the screen derives from the ops' own state, "" for a message about a click.
47
+ function setStatus(text, kind, source, phase) {
48
+ state.status = { text: text || "", kind: kind || "", source: source || "", phase: phase || "" };
49
+ var nodes = document.querySelectorAll("[data-status]");
50
+ for (var i = 0; i < nodes.length; i++) {
51
+ nodes[i].textContent = state.status.text;
52
+ nodes[i].className = "status" + (kind ? " " + kind : "");
53
+ }
54
+ }
55
+
56
+ // ---- lookups over the current view ----
57
+ function cand(id) { return state.view && state.view.candidates.find(function (c) { return c.candidateId === id; }); }
58
+ function ver(id) { return state.view && state.view.versions.find(function (v) { return v.versionId === id; }); }
59
+ function latestVersion(c) { return c && c.latestVersionId ? ver(c.latestVersionId) : undefined; }
60
+ function roundById(id) { return state.view && state.view.rounds.find(function (r) { return r.roundId === id; }); }
61
+ function byLabel(a, b) { return a.label.length - b.label.length || (a.label < b.label ? -1 : a.label > b.label ? 1 : 0); }
62
+ // Newest round first, then by letter: the order of the strip and of the selection.
63
+ function optionOrder(a, b) {
64
+ var ra = roundById(a.roundId);
65
+ var rb = roundById(b.roundId);
66
+ return ((rb ? rb.index : 0) - (ra ? ra.index : 0)) || byLabel(a, b);
67
+ }
68
+ function orderedCandidates() { return state.view.candidates.slice().sort(optionOrder); }
69
+ // The card's strip: the newest round only, plus the option the pick belongs to and the one being viewed when they are
70
+ // older, so the large image always has its thumbnail. The workspace still lists every round.
71
+ function inlineCandidates() {
72
+ var all = orderedCandidates();
73
+ if (all.length === 0) return all;
74
+ var newest = all[0].roundId;
75
+ var picked = state.view.pick && ver(state.view.pick.versionId);
76
+ var keep = {};
77
+ keep[newest] = true;
78
+ if (picked) keep[picked.candidateId] = true;
79
+ if (state.sel.candidateId) keep[state.sel.candidateId] = true;
80
+ return all.filter(function (c) { return c.roundId === newest || keep[c.candidateId]; });
81
+ }
82
+ function versionsOf(c) { return c.versionIds.map(ver).filter(Boolean); }
83
+ function runningOps() { return state.view.ops.filter(function (o) { return o.state === "starting" || o.state === "running"; }); }
84
+ function selectedCandidate() { return cand(state.sel.candidateId); }
85
+ function selectedVersion() { return ver(state.sel.versionId); }
86
+ function optionName(c) { return COPY.optionPrefix + c.label + (c.state === "failed" ? COPY.failedSuffix : ""); }
87
+
88
+ function ensureSelection() {
89
+ var v = state.view;
90
+ if (!v || v.candidates.length === 0) { state.sel = { candidateId: null, versionId: null, followLatest: true }; return; }
91
+ var c = cand(state.sel.candidateId);
92
+ if (!c) {
93
+ var picked = v.pick && ver(v.pick.versionId);
94
+ var ordered = orderedCandidates();
95
+ c = (picked && cand(picked.candidateId)) || ordered.find(function (x) { return x.state === "ready"; }) || ordered[0];
96
+ state.sel = { candidateId: c.candidateId, versionId: null, followLatest: true };
97
+ }
98
+ var current = state.sel.versionId && c.versionIds.indexOf(state.sel.versionId) >= 0 ? state.sel.versionId : null;
99
+ if (state.sel.followLatest || !current) { state.sel.versionId = c.latestVersionId; state.sel.followLatest = true; }
100
+ }
101
+ // Choosing the option that is already shown, at the version already shown, changes nothing.
102
+ function selectCandidate(id, versionId) {
103
+ var c = cand(id);
104
+ if (!c) return;
105
+ var target = versionId || c.latestVersionId;
106
+ if (state.sel.candidateId === id && state.sel.versionId === target) return;
107
+ state.awaitEdit = null;
108
+ state.sel.candidateId = id;
109
+ state.sel.versionId = target;
110
+ state.sel.followLatest = !versionId || versionId === c.latestVersionId;
111
+ renderAll();
112
+ }
113
+
114
+ // ---- pictures through the app-only tools, at most three at a time; the workspace jumps the queue ----
115
+ var loader = { queue: [], active: 0, max: 3, inflight: {} };
116
+ function imageKey(version, size) { return size + ":" + version.versionId + ":" + version.sha256; }
117
+ function enqueue(key, cache, tool, args, urgent) {
118
+ if (cache[key]) return Promise.resolve(cache[key]);
119
+ if (loader.inflight[key]) {
120
+ if (urgent) {
121
+ var at = loader.queue.findIndex(function (j) { return j.key === key; });
122
+ if (at > 0) loader.queue.unshift(loader.queue.splice(at, 1)[0]);
123
+ }
124
+ return loader.inflight[key].promise;
125
+ }
126
+ var job = { key: key, cache: cache, tool: tool, args: args };
127
+ job.promise = new Promise(function (resolve, reject) { job.resolve = resolve; job.reject = reject; });
128
+ loader.inflight[key] = job;
129
+ if (urgent) loader.queue.unshift(job); else loader.queue.push(job);
130
+ pump();
131
+ return job.promise;
132
+ }
133
+ function wantImage(version, size, urgent) {
134
+ var cache = size === "full" ? state.fulls : state.thumbs;
135
+ return enqueue(imageKey(version, size), cache, TOOLS.image, { runDir: state.view.runDir, versionId: version.versionId, size: size }, urgent);
136
+ }
137
+ function wantReference(id, size, urgent) {
138
+ return enqueue("ref:" + size + ":" + id, state.refs, TOOLS.reference, { runDir: state.view.runDir, referenceId: id, size: size }, urgent);
139
+ }
140
+ function pump() {
141
+ while (visible() && loader.active < loader.max && loader.queue.length > 0) {
142
+ var job = loader.queue.shift();
143
+ loader.active++;
144
+ run(job);
145
+ }
146
+ }
147
+ function run(job) {
148
+ callTool(job.tool, job.args).then(function (result) {
149
+ var block = (result.content || []).find(function (b) { return b.type === "image"; });
150
+ if (!block) throw new Error("no image block returned");
151
+ var src = "data:" + block.mimeType + ";base64," + block.data;
152
+ job.cache[job.key] = src;
153
+ job.resolve(src);
154
+ }).catch(function (err) { job.reject(err); }).then(function () {
155
+ delete loader.inflight[job.key];
156
+ loader.active--;
157
+ pump();
158
+ });
159
+ }
160
+ function fillImage(img, promise) {
161
+ promise.then(function (src) {
162
+ if (img.isConnected === false) return;
163
+ img.src = src;
164
+ img.classList.remove("empty");
165
+ }, function (err) {
166
+ // An error is shown in place of the picture, never thrown.
167
+ img.alt = errText(err);
168
+ img.setAttribute("data-error", errText(err));
169
+ });
170
+ }
171
+ function bindImage(img, version, size, urgent) { if (version) fillImage(img, wantImage(version, size, urgent)); }
172
+ function bindReference(img, id, size) { fillImage(img, wantReference(id, size, false)); }
173
+
174
+ // ---- status polling ----
175
+ var DELAYS = [2000, 3000, 5000, 8000, 10000];
176
+ var poll = { timer: null, step: 0, inFlight: false };
177
+ function wantsPolling() { return !!state.view && !!state.view.runDir && visible() && runningOps().length > 0; }
178
+ function clearPoll() { if (poll.timer !== null) { clearTimeout(poll.timer); poll.timer = null; } }
179
+ function schedulePoll() {
180
+ clearPoll();
181
+ if (!wantsPolling() || poll.inFlight) return;
182
+ poll.timer = setTimeout(runPoll, DELAYS[Math.min(poll.step, DELAYS.length - 1)]);
183
+ }
184
+ function runPoll() {
185
+ poll.timer = null;
186
+ if (!wantsPolling()) return;
187
+ poll.inFlight = true;
188
+ callTool(TOOLS.status, { runDir: state.view.runDir, since: state.view.stamp }).then(function (result) {
189
+ var sc = result.structuredContent || {};
190
+ if (sc.unchanged) poll.step++;
191
+ else if (sc.schema) { poll.step = 0; applyView(sc, true); }
192
+ }).catch(function () { poll.step++; }).then(function () { poll.inFlight = false; schedulePoll(); });
193
+ }
194
+ // One refresh when the view becomes visible again.
195
+ function refreshOnce() {
196
+ if (!state.view || !state.view.runDir || poll.inFlight) return;
197
+ poll.inFlight = true;
198
+ callTool(TOOLS.status, { runDir: state.view.runDir, since: state.view.stamp }).then(function (result) {
199
+ var sc = result.structuredContent || {};
200
+ if (sc.schema) applyView(sc, true);
201
+ }).catch(function () {}).then(function () { poll.inFlight = false; schedulePoll(); });
202
+ }
203
+ document.addEventListener("visibilitychange", function () {
204
+ if (visible()) { pump(); refreshOnce(); schedulePoll(); }
205
+ else clearPoll();
206
+ });
207
+
208
+ // ---- what the ops say: the band of the workspace, the status line of the card ----
209
+ function opLabel(op) {
210
+ var parent = op.edit && ver(op.edit.parentVersionId);
211
+ var c = parent && cand(parent.candidateId);
212
+ return c ? c.label : (op.target || "");
213
+ }
214
+ function roundOfOp(op) {
215
+ var rounds = state.view.rounds;
216
+ var named = rounds.filter(function (r) { return COPY.roundPrefix + r.index === op.target; })[0];
217
+ if (named) return named;
218
+ var running = rounds.filter(function (r) { return r.state === "running"; });
219
+ return running.length ? running[running.length - 1] : null;
220
+ }
221
+ function progressText(op) {
222
+ // The hosted server has no runner of its own: a running op is waiting for the person's agent to draw and upload.
223
+ if (TARGET === "remote" && op.phase === "agent") return COPY.waitingForAgent;
224
+ if (op.kind === "round") {
225
+ var r = roundOfOp(op);
226
+ return r ? tpl(COPY.designingProgress, { n: r.readyCount, m: r.count }) : COPY.designing;
227
+ }
228
+ return tpl(COPY.editing, { label: opLabel(op) });
229
+ }
230
+ // The newest op. The local plugin stamps every op with a time; the hosted server sends none (data minimization), so
231
+ // its ops are already oldest first and the last one is the newest.
232
+ function latestOp(view) {
233
+ if (TARGET === "remote") return view.ops[view.ops.length - 1];
234
+ return view.ops.slice().sort(function (a, b) { return Date.parse(a.startedAt) - Date.parse(b.startedAt); }).pop();
235
+ }
236
+ // The one thing worth a band: work that is running, else work that stopped or failed as the newest word.
237
+ function activeBand(view) {
238
+ var running = view.ops.filter(function (o) { return o.state === "starting" || o.state === "running"; });
239
+ if (running.length) { var op = running[running.length - 1]; return { kind: "run", op: op, text: progressText(op) }; }
240
+ var last = latestOp(view);
241
+ if (last && last.state === "interrupted") return { kind: "stopped", op: last, text: TARGET === "remote" && last.error && last.error.message ? last.error.message : COPY.interrupted };
242
+ if (last && last.state === "failed" && last.error) return { kind: "failed", op: last, text: last.error.message };
243
+ return null;
244
+ }
245
+
246
+ // The card has one status line, so it also carries the running, stopped and failed words; the workspace has a band.
247
+ function syncProgressLine(view) {
248
+ var band = activeBand(view);
249
+ // The workspace's band speaks for running work, so a line about an earlier click ("Selected E.") is stale the
250
+ // moment a new op starts; a refusal stays, because the person has not read it away.
251
+ var bandOp = band && band.kind === "run" ? band.op.opId : "";
252
+ if (bandOp && bandOp !== state.lastBandOp && isFullscreen() && state.status.kind !== "err") setStatus("", "");
253
+ state.lastBandOp = bandOp;
254
+ if (isFullscreen() || !band) {
255
+ state.lastOpText = "";
256
+ if (state.status.source === "op" && state.status.phase === "progress") setStatus("", "");
257
+ return;
258
+ }
259
+ // A message about a click stays until these words themselves change.
260
+ if (band.text !== state.lastOpText) { state.lastOpText = band.text; setStatus(band.text, band.kind === "failed" ? "err" : "", "op", "progress"); }
261
+ }
262
+ // What a finished op produced. A failure is the band's to say in the workspace.
263
+ function syncDoneLine(prev, view) {
264
+ var was = {};
265
+ if (prev) prev.ops.forEach(function (o) { was[o.opId] = o.state; });
266
+ var finished = view.ops.filter(function (o) {
267
+ return (was[o.opId] === "starting" || was[o.opId] === "running") && (o.state === "succeeded" || o.state === "failed");
268
+ }).pop();
269
+ if (!finished) return;
270
+ if (finished.state === "failed") return;
271
+ var made = view.versions.filter(function (v) { return finished.resultVersionIds.indexOf(v.versionId) >= 0; });
272
+ if (finished.kind === "round") {
273
+ var n = made.length;
274
+ if (n === 0) return;
275
+ var round = roundOfOp(finished);
276
+ var failedCount = round ? view.candidates.filter(function (c) { return c.roundId === round.roundId && c.state === "failed"; }).length : 0;
277
+ var text = (n === 1 ? COPY.roundReadyOne : tpl(COPY.roundReadyMany, { n: n })) + (failedCount ? " " + tpl(COPY.roundFailed, { n: failedCount }) : "");
278
+ setStatus(text, failedCount ? "" : "ok", "op", "done");
279
+ } else {
280
+ setStatus(tpl(COPY.editReady, { label: made.length ? made[made.length - 1].label : opLabel(finished) }), "ok", "op", "done");
281
+ }
282
+ }
283
+ function syncOpStatus(prev, view) { syncProgressLine(view); syncDoneLine(prev, view); }
284
+
285
+ // ---- tell the agent, best effort, when work that was running has finished ----
286
+ function announceSettled(prev, next) {
287
+ next.ops.forEach(function (op) {
288
+ var was = state.lastOpStates[op.opId];
289
+ state.lastOpStates[op.opId] = op.state;
290
+ if (was !== "starting" && was !== "running") return;
291
+ if (op.state !== "succeeded" && op.state !== "failed") return;
292
+ var head = TARGET === "remote" ? "Design workspace: " : "Design workspace rev " + next.rev + ": ";
293
+ var text;
294
+ if (op.state === "failed") text = head + "the " + op.kind + " " + (op.target ? "for " + op.target + " " : "") + "failed" + (op.error ? " (" + op.error.code + ")" : "") + ".";
295
+ else if (op.kind === "round") {
296
+ var labels = next.candidates.filter(function (c) { return c.versionIds.some(function (id) { return op.resultVersionIds.indexOf(id) >= 0; }); }).map(function (c) { return c.label; });
297
+ text = head + (op.target || "the round") + " is ready" + (labels.length ? " (" + labels[0] + " to " + labels[labels.length - 1] + ")" : "") + ".";
298
+ } else {
299
+ var made = next.versions.find(function (v) { return op.resultVersionIds.indexOf(v.versionId) >= 0; });
300
+ text = head + (made ? made.label : opLabel(op)) + " was created.";
301
+ }
302
+ updateModelContext(text + " Confirm with " + TOOLS.data + ".");
303
+ });
304
+ }
305
+ `;
306
+ //# sourceMappingURL=mcp-slate-ui-script-state.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mcp-slate-ui-script-state.js","sourceRoot":"","sources":["../src/mcp-slate-ui-script-state.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG,MAAM,CAAC,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAqSvC,CAAC"}
@@ -0,0 +1,23 @@
1
+ /**
2
+ * The two small controls on a design's thumbnail, in the card's strip and in
3
+ * the workspace's selection: a plus (More like this) and an edit pencil
4
+ * (Edit). They are siblings of the thumbnail button inside one cell (a button
5
+ * cannot hold buttons), revealed by CSS on hover and on keyboard focus within
6
+ * the cell, and on a device with no hover only on the selected thumbnail. A
7
+ * click on either never reaches the thumbnail, so it never swaps the large
8
+ * image by itself.
9
+ *
10
+ * The plus opens the Generate more panel for variations of that design
11
+ * (openMoreLike, in mcp-slate-ui-script-more.ts). Edit selects that design and
12
+ * opens the Edit dialog. The dialog lives in the workspace; the card has no
13
+ * room for the drawing surface, so in the card Edit opens the workspace and the
14
+ * dialog opens as soon as it shows (wantEdit). A host that cannot show the
15
+ * workspace has no place for the dialog, so there Edit is hidden in the card.
16
+ *
17
+ * Not on the Generate more tile, and not on an option that has no picture yet.
18
+ * Whether each control is on follows the view (syncThumbTools): the plus is off
19
+ * while a round runs (the tile's rule), Edit while that design has an edit in
20
+ * flight or its version cannot be edited.
21
+ */
22
+ export declare const SLATE_UI_THUMBTOOLS: string;
23
+ //# sourceMappingURL=mcp-slate-ui-script-thumbtools.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mcp-slate-ui-script-thumbtools.d.ts","sourceRoot":"","sources":["../src/mcp-slate-ui-script-thumbtools.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,eAAO,MAAM,mBAAmB,QAgF/B,CAAC"}
@@ -0,0 +1,103 @@
1
+ /**
2
+ * The two small controls on a design's thumbnail, in the card's strip and in
3
+ * the workspace's selection: a plus (More like this) and an edit pencil
4
+ * (Edit). They are siblings of the thumbnail button inside one cell (a button
5
+ * cannot hold buttons), revealed by CSS on hover and on keyboard focus within
6
+ * the cell, and on a device with no hover only on the selected thumbnail. A
7
+ * click on either never reaches the thumbnail, so it never swaps the large
8
+ * image by itself.
9
+ *
10
+ * The plus opens the Generate more panel for variations of that design
11
+ * (openMoreLike, in mcp-slate-ui-script-more.ts). Edit selects that design and
12
+ * opens the Edit dialog. The dialog lives in the workspace; the card has no
13
+ * room for the drawing surface, so in the card Edit opens the workspace and the
14
+ * dialog opens as soon as it shows (wantEdit). A host that cannot show the
15
+ * workspace has no place for the dialog, so there Edit is hidden in the card.
16
+ *
17
+ * Not on the Generate more tile, and not on an option that has no picture yet.
18
+ * Whether each control is on follows the view (syncThumbTools): the plus is off
19
+ * while a round runs (the tile's rule), Edit while that design has an edit in
20
+ * flight or its version cannot be edited.
21
+ */
22
+ export const SLATE_UI_THUMBTOOLS = String.raw `
23
+ var ICON_PENCIL = "M4 20l1-4L16.5 4.5a2.1 2.1 0 0 1 3 3L8 19l-4 1zM14 7l3 3";
24
+
25
+ function thumbToolButton(action, label, path, c, onclick) {
26
+ var b = button("", "thumbtool", function (e) {
27
+ if (e && e.stopPropagation) e.stopPropagation();
28
+ onclick(c.candidateId);
29
+ });
30
+ b.setAttribute("aria-label", label);
31
+ b.title = label;
32
+ b.setAttribute("data-action", action);
33
+ b.setAttribute("data-candidate", c.candidateId);
34
+ b.innerHTML = '<svg viewBox="0 0 24 24" width="14" height="14" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="' + path + '"/></svg>';
35
+ return b;
36
+ }
37
+
38
+ // One cell per option: the thumbnail button and, when there is a picture to work from, its two controls.
39
+ function thumbCell(c, cls) {
40
+ var cell = el("span", "thumbcell");
41
+ var thumb = thumbButton(c, cls);
42
+ if (thumb.classList.contains("selected")) cell.classList.add("selected");
43
+ cell.appendChild(thumb);
44
+ if (c.state === "ready" && latestVersion(c)) {
45
+ var tools = el("span", "thumbtools");
46
+ tools.appendChild(thumbToolButton("more", COPY.moreLikeThis, ICON_PLUS, c, openMoreLike));
47
+ tools.appendChild(thumbToolButton("edit", COPY.edit, ICON_PENCIL, c, editFromThumb));
48
+ cell.appendChild(tools);
49
+ }
50
+ return cell;
51
+ }
52
+
53
+ // Whether Edit has a dialog to open in this host: the workspace itself, or a card that can open the workspace.
54
+ function canEditHere() { return isFullscreen() || canFullscreen(); }
55
+
56
+ function thumbToolNodes() { return Array.prototype.slice.call(document.querySelectorAll(".thumbtool")); }
57
+ function thumbToolFor(action, candidateId) {
58
+ return thumbToolNodes().filter(function (t) {
59
+ return t.getAttribute("data-action") === action && t.getAttribute("data-candidate") === candidateId && !t.disabled && !isHiddenNode(t);
60
+ })[0];
61
+ }
62
+
63
+ function syncThumbTools() {
64
+ if (!state.view) return;
65
+ var busy = moreBusy();
66
+ var edit = canEditHere();
67
+ var likeId = state.more && state.more.mode === "like" ? state.more.fromCandidateId : null;
68
+ thumbToolNodes().forEach(function (t) {
69
+ var c = cand(t.getAttribute("data-candidate"));
70
+ var v = latestVersion(c);
71
+ if (t.getAttribute("data-action") === "more") {
72
+ t.disabled = busy || !pickable(v);
73
+ t.setAttribute("aria-expanded", likeId !== null && likeId === t.getAttribute("data-candidate") ? "true" : "false");
74
+ } else {
75
+ t.classList.toggle("hidden", !edit);
76
+ t.disabled = !v || !v.editable || !!(c && c.busy);
77
+ }
78
+ });
79
+ }
80
+
81
+ // Edit: that design is selected, then the Edit dialog opens on it, exactly as the workspace's Edit button does.
82
+ function editFromThumb(candidateId) {
83
+ var c = cand(candidateId);
84
+ var v = latestVersion(c);
85
+ if (!c || !v || !v.editable || c.busy || state.dialog) return;
86
+ selectCandidate(candidateId);
87
+ if (isFullscreen()) { openDialog("edit", thumbToolFor("edit", candidateId) || stageEls.edit); return; }
88
+ if (!canFullscreen()) return;
89
+ state.wantEdit = v.versionId;
90
+ request("ui/request-display-mode", { mode: "fullscreen" }).then(function (result) {
91
+ if (result && result.mode && result.mode !== "fullscreen") state.wantEdit = null;
92
+ }, function () { state.wantEdit = null; });
93
+ }
94
+ // The workspace has just shown: the dialog that was asked for in the card opens now, on the version that was asked for.
95
+ function openWantedEdit() {
96
+ var want = state.wantEdit;
97
+ if (!want || !stageBuilt || state.dialog) return;
98
+ state.wantEdit = null;
99
+ var v = selectedVersion();
100
+ if (v && v.versionId === want && v.editable) openDialog("edit", stageEls.edit);
101
+ }
102
+ `;
103
+ //# sourceMappingURL=mcp-slate-ui-script-thumbtools.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mcp-slate-ui-script-thumbtools.js","sourceRoot":"","sources":["../src/mcp-slate-ui-script-thumbtools.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG,MAAM,CAAC,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgF5C,CAAC"}
@@ -0,0 +1,28 @@
1
+ /**
2
+ * The workspace view's script, assembled from single-purpose fragments that
3
+ * share one scope: bridge (host protocol), state (view state, picture queue,
4
+ * polling, what the ops say), progress, inline (the card), select (Select and
5
+ * the hand-offs), inspiration (the tabs and the Inspiration tab), stage
6
+ * (fullscreen), dialog (Design, Edit, Branch and Convert), more (the Generate more tile and panel), thumbtools (the
7
+ * plus and the pencil on a thumbnail), scribble (the drawing layer of Edit), the hosted and browser targets' words, then the handshake, last, so every function and
8
+ * variable exists before the first message can arrive. The tool names come
9
+ * from the view contract (SLATE_UI_TOOLS), not from the server's own module.
10
+ *
11
+ * The fragments are String.raw, so escape sequences reach the browser
12
+ * unchanged; the assembled script must therefore contain no backtick and no
13
+ * dollar-brace (a test asserts it).
14
+ */
15
+ /**
16
+ * Which host the screen is for: the local plugin's own tools, the hosted server (design.12ui.com), or a browser page
17
+ * opened by `12ui workspace open` when the plugin's tools are not available (the local plugin's tools, reached
18
+ * through a host shim in the page in place of an MCP Apps host).
19
+ */
20
+ export type SlateUiTarget = 'local' | 'remote' | 'browser';
21
+ /**
22
+ * The script for one target. The fragments are the same for both; the target is a constant they read (`TARGET`), and
23
+ * only the places the two servers differ branch on it: what the agent is told, how a running op reads, which Convert
24
+ * outputs exist and what the edit carries.
25
+ */
26
+ export declare const buildSlateUiScript: (target: SlateUiTarget) => string;
27
+ export declare const SLATE_UI_SCRIPT: string;
28
+ //# sourceMappingURL=mcp-slate-ui-script.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mcp-slate-ui-script.d.ts","sourceRoot":"","sources":["../src/mcp-slate-ui-script.ts"],"names":[],"mappings":"AAgBA;;;;;;;;;;;;;GAaG;AAEH;;;;GAIG;AACH,MAAM,MAAM,aAAa,GAAG,OAAO,GAAG,QAAQ,GAAG,SAAS,CAAC;AAgB3D;;;;GAIG;AACH,eAAO,MAAM,kBAAkB,GAAI,QAAQ,aAAa,KAAG,MAsB/C,CAAC;AAEb,eAAO,MAAM,eAAe,QAA8B,CAAC"}
@@ -0,0 +1,58 @@
1
+ import { SLATE_CONVERT_CHOICES, SLATE_CONVERT_MAX_WIDTH, SLATE_MORE_COUNTS, SLATE_REMOTE_CONVERT_CHOICES, SLATE_UI_COPY } from './mcp-slate-ui-copy.js';
2
+ import { SLATE_UI_TOOLS } from './slate-view-contract.js';
3
+ import { SLATE_UI_BRIDGE } from './mcp-slate-ui-script-bridge.js';
4
+ import { SLATE_UI_BROWSER } from './mcp-slate-ui-script-browser.js';
5
+ import { SLATE_UI_DIALOG } from './mcp-slate-ui-script-dialog.js';
6
+ import { SLATE_UI_INLINE } from './mcp-slate-ui-script-inline.js';
7
+ import { SLATE_UI_INSPIRATION } from './mcp-slate-ui-script-inspiration.js';
8
+ import { SLATE_UI_MORE } from './mcp-slate-ui-script-more.js';
9
+ import { SLATE_UI_PROGRESS } from './mcp-slate-ui-script-progress.js';
10
+ import { SLATE_UI_REMOTE } from './mcp-slate-ui-script-remote.js';
11
+ import { SLATE_UI_SCRIBBLE } from './mcp-slate-ui-script-scribble.js';
12
+ import { SLATE_UI_SELECT } from './mcp-slate-ui-script-select.js';
13
+ import { SLATE_UI_STAGE } from './mcp-slate-ui-script-stage.js';
14
+ import { SLATE_UI_STATE } from './mcp-slate-ui-script-state.js';
15
+ import { SLATE_UI_THUMBTOOLS } from './mcp-slate-ui-script-thumbtools.js';
16
+ const HANDSHAKE = String.raw `
17
+ // ---- connect: handlers are registered above, before the handshake ----
18
+ if (window.parent === window) {
19
+ fatal(COPY.needsHost);
20
+ } else {
21
+ request("ui/initialize", { appCapabilities: {}, appInfo: { name: "12ui-slate", version: "3.0.0" }, protocolVersion: PROTOCOL })
22
+ .then(function (init) {
23
+ applyHost((init && init.hostContext) || {});
24
+ notify("ui/notifications/initialized", {});
25
+ })
26
+ .catch(function (err) { fatal(COPY.noConnection + errText(err)); });
27
+ }
28
+ `;
29
+ /**
30
+ * The script for one target. The fragments are the same for both; the target is a constant they read (`TARGET`), and
31
+ * only the places the two servers differ branch on it: what the agent is told, how a running op reads, which Convert
32
+ * outputs exist and what the edit carries.
33
+ */
34
+ export const buildSlateUiScript = (target) => [
35
+ '"use strict";',
36
+ '(function () {',
37
+ SLATE_UI_BRIDGE
38
+ .replace('__TOOLS__', () => JSON.stringify(SLATE_UI_TOOLS))
39
+ .replace('__COPY__', () => JSON.stringify(SLATE_UI_COPY))
40
+ .replace('__TARGET__', () => JSON.stringify(target))
41
+ .replace('__CONVERT__', () => JSON.stringify({ choices: target === 'remote' ? SLATE_REMOTE_CONVERT_CHOICES : SLATE_CONVERT_CHOICES, maxWidth: SLATE_CONVERT_MAX_WIDTH })),
42
+ SLATE_UI_STATE,
43
+ SLATE_UI_PROGRESS,
44
+ SLATE_UI_INLINE,
45
+ SLATE_UI_SELECT,
46
+ SLATE_UI_INSPIRATION,
47
+ SLATE_UI_STAGE,
48
+ SLATE_UI_DIALOG,
49
+ SLATE_UI_MORE.replace('__MORE__', () => JSON.stringify(SLATE_MORE_COUNTS)),
50
+ SLATE_UI_THUMBTOOLS,
51
+ SLATE_UI_SCRIBBLE,
52
+ SLATE_UI_REMOTE,
53
+ SLATE_UI_BROWSER,
54
+ HANDSHAKE,
55
+ '})();',
56
+ ].join('\n');
57
+ export const SLATE_UI_SCRIPT = buildSlateUiScript('local');
58
+ //# sourceMappingURL=mcp-slate-ui-script.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mcp-slate-ui-script.js","sourceRoot":"","sources":["../src/mcp-slate-ui-script.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,uBAAuB,EAAE,iBAAiB,EAAE,4BAA4B,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AACxJ,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAC1D,OAAO,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAClE,OAAO,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAC;AACpE,OAAO,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAClE,OAAO,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAClE,OAAO,EAAE,oBAAoB,EAAE,MAAM,sCAAsC,CAAC;AAC5E,OAAO,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAC9D,OAAO,EAAE,iBAAiB,EAAE,MAAM,mCAAmC,CAAC;AACtE,OAAO,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAClE,OAAO,EAAE,iBAAiB,EAAE,MAAM,mCAAmC,CAAC;AACtE,OAAO,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAClE,OAAO,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAC;AAChE,OAAO,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAC;AAChE,OAAO,EAAE,mBAAmB,EAAE,MAAM,qCAAqC,CAAC;AAwB1E,MAAM,SAAS,GAAG,MAAM,CAAC,GAAG,CAAA;;;;;;;;;;;;CAY3B,CAAC;AAEF;;;;GAIG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,MAAqB,EAAU,EAAE,CAAC;IACnE,eAAe;IACf,gBAAgB;IAChB,eAAe;SACZ,OAAO,CAAC,WAAW,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,SAAS,CAAC,cAAc,CAAC,CAAC;SAC1D,OAAO,CAAC,UAAU,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,SAAS,CAAC,aAAa,CAAC,CAAC;SACxD,OAAO,CAAC,YAAY,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;SACnD,OAAO,CAAC,aAAa,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,SAAS,CAAC,EAAE,OAAO,EAAE,MAAM,KAAK,QAAQ,CAAC,CAAC,CAAC,4BAA4B,CAAC,CAAC,CAAC,qBAAqB,EAAE,QAAQ,EAAE,uBAAuB,EAAE,CAAC,CAAC;IAC3K,cAAc;IACd,iBAAiB;IACjB,eAAe;IACf,eAAe;IACf,oBAAoB;IACpB,cAAc;IACd,eAAe;IACf,aAAa,CAAC,OAAO,CAAC,UAAU,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,SAAS,CAAC,iBAAiB,CAAC,CAAC;IAC1E,mBAAmB;IACnB,iBAAiB;IACjB,eAAe;IACf,gBAAgB;IAChB,SAAS;IACT,OAAO;CACR,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAEb,MAAM,CAAC,MAAM,eAAe,GAAG,kBAAkB,CAAC,OAAO,CAAC,CAAC"}
@@ -0,0 +1,17 @@
1
+ /**
2
+ * The dialogs (Design, Edit, Branch, Convert), the scribble layer of Edit and
3
+ * the Inspiration tab. A dialog is a centred box over a dimmed workspace; it
4
+ * scrolls inside itself when the window is short, and fills the width on a
5
+ * phone.
6
+ */
7
+ export declare const SLATE_UI_DIALOG_STYLES: string;
8
+ /**
9
+ * The Generate more tile and its panel. The tile is deliberately quiet: a
10
+ * hairline dashed border, a muted plus, no fill, no words; it takes the size
11
+ * of the thumbnails around it (56 px in the card's strip, 72 px in the
12
+ * selection). The panel is one bordered block under the thumbnails. In the
13
+ * card, the script shortens the large image by the panel's height while it is
14
+ * open (an inline --cap), or folds it when too little would be left.
15
+ */
16
+ export declare const SLATE_UI_MORE_STYLES: string;
17
+ //# sourceMappingURL=mcp-slate-ui-styles-dialog.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mcp-slate-ui-styles-dialog.d.ts","sourceRoot":"","sources":["../src/mcp-slate-ui-styles-dialog.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,eAAO,MAAM,sBAAsB,QAgClC,CAAC;AAEF;;;;;;;GAOG;AACH,eAAO,MAAM,oBAAoB,QAwBhC,CAAC"}
@@ -0,0 +1,73 @@
1
+ /**
2
+ * The dialogs (Design, Edit, Branch, Convert), the scribble layer of Edit and
3
+ * the Inspiration tab. A dialog is a centred box over a dimmed workspace; it
4
+ * scrolls inside itself when the window is short, and fills the width on a
5
+ * phone.
6
+ */
7
+ export const SLATE_UI_DIALOG_STYLES = String.raw `
8
+ .modal { position: fixed; inset: 0; z-index: 20; display: grid; place-items: center; padding: 16px; background: rgba(0, 0, 0, .45); overflow: auto; }
9
+ .modalbox { display: flex; flex-direction: column; gap: 12px; width: min(520px, 100%); max-height: calc(100vh - 32px); min-width: 0; padding: 16px; overflow: auto; border: 1px solid var(--border); border-radius: calc(var(--radius) + 4px); background: var(--bg); color: var(--text); }
10
+ .modalbox.wide { width: min(880px, 100%); }
11
+ .modalbox h2 { margin: 0; font-size: 15px; }
12
+ .modalbox textarea { width: 100%; min-width: 0; padding: 8px 10px; font: inherit; color: var(--text); background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); resize: vertical; }
13
+ .modalbox textarea:focus-visible { outline: 2px solid var(--ring); outline-offset: 1px; }
14
+ .radios { display: flex; flex-wrap: wrap; gap: 6px 14px; }
15
+ .radio { display: inline-flex; align-items: center; gap: 6px; }
16
+ .refline { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 12px; color: var(--text2); }
17
+ .refthumbs { display: flex; flex-wrap: wrap; gap: 4px; }
18
+ .refmini { display: block; width: 36px; height: 36px; border-radius: 4px; background: var(--bg3); object-fit: cover; object-position: top; }
19
+ .alert { margin: 0; color: var(--danger); font-size: 12px; overflow-wrap: anywhere; }
20
+ .dialogbtns, .dialogtools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
21
+ .dialogbtns button, .dialogtools button { padding: 8px 12px; }
22
+ /* The image of Edit, sized to the picture itself (a height cap of 60 percent of the window), so the scribble layer over it is exactly over the picture. */
23
+ .imgwrap { position: relative; width: min(100%, calc(60vh * var(--ar, 1.5))); aspect-ratio: var(--ar, 1.5); margin: 0 auto; min-width: 0; border-radius: var(--radius); background: var(--bg3); overflow: hidden; touch-action: none; }
24
+ .stageimg { display: block; width: 100%; height: 100%; object-fit: fill; user-select: none; -webkit-user-drag: none; }
25
+ .scribble { position: absolute; inset: 0; width: 100%; height: 100%; cursor: crosshair; touch-action: none; }
26
+ .searchrow { display: flex; gap: 8px; min-width: 0; }
27
+ .searchrow .query { flex: 1 1 0; min-width: 0; }
28
+ .insp.card { --refsize: 96px; }
29
+ .insp.stage { --refsize: 128px; }
30
+ .results { display: flex; flex-direction: column; gap: 16px; margin-top: 12px; }
31
+ .refhead { margin: 0 0 6px; font-size: 13px; font-weight: 600; }
32
+ .refgrid { display: grid; grid-template-columns: repeat(auto-fill, var(--refsize)); gap: 8px; }
33
+ .refbtn { width: var(--refsize); height: var(--refsize); }
34
+ .refbtn .thumb { object-position: center; }
35
+ .refbtn[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--text); }
36
+ .check { position: absolute; top: 6px; right: 6px; display: none; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--inverse); color: var(--inverse-text); }
37
+ .refbtn[aria-pressed="true"] .check { display: grid; }
38
+ .placeholder { display: grid; place-items: center; min-height: 160px; border: 1px dashed var(--border); border-radius: var(--radius); color: var(--text2); padding: 16px; text-align: center; }
39
+ `;
40
+ /**
41
+ * The Generate more tile and its panel. The tile is deliberately quiet: a
42
+ * hairline dashed border, a muted plus, no fill, no words; it takes the size
43
+ * of the thumbnails around it (56 px in the card's strip, 72 px in the
44
+ * selection). The panel is one bordered block under the thumbnails. In the
45
+ * card, the script shortens the large image by the panel's height while it is
46
+ * open (an inline --cap), or folds it when too little would be left.
47
+ */
48
+ export const SLATE_UI_MORE_STYLES = String.raw `
49
+ button.moretile { display: grid; place-items: center; flex: none; padding: 0; border: 1px dashed var(--border); border-radius: 6px; background: none; color: var(--text2); opacity: .75; }
50
+ button.moretile:hover:not(:disabled), button.moretile[aria-expanded="true"] { opacity: 1; border-color: var(--text2); }
51
+ button.moretile:disabled { opacity: .35; }
52
+ .strip .moretile { width: 56px; height: 56px; }
53
+ .rail .moretile { width: 72px; height: 72px; }
54
+ .morepanel { display: flex; flex-direction: column; gap: 10px; min-width: 0; padding: 12px; border: 1px solid var(--border); border-radius: var(--radius); }
55
+ #more:not(:empty) { padding-top: 10px; }
56
+ #card .hero.folded { display: none; }
57
+ .morehead { margin: 0; font-size: 13px; font-weight: 600; }
58
+ .moreheadrow { display: flex; align-items: center; gap: 8px; min-width: 0; }
59
+ .morethumb { display: block; flex: none; width: 28px; height: 28px; border-radius: 4px; background: var(--bg3); object-fit: cover; object-position: top; }
60
+ .morepanel textarea { width: 100%; min-width: 0; padding: 8px 10px; font: inherit; color: var(--text); background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); resize: vertical; }
61
+ .morepanel textarea:focus-visible { outline: 2px solid var(--ring); outline-offset: 1px; }
62
+ .morerow { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; min-width: 0; }
63
+ .morebtns { display: flex; gap: 8px; margin-left: auto; }
64
+ .morerow button { padding: 8px 10px; }
65
+ .seg { display: inline-flex; flex: none; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
66
+ .segopt { position: relative; display: block; }
67
+ .segopt input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
68
+ .segopt span { display: block; min-width: 30px; padding: 7px 8px; text-align: center; font-weight: 600; }
69
+ .segopt input:checked + span { background: var(--inverse); color: var(--inverse-text); }
70
+ .segopt input:focus-visible + span { outline: 2px solid var(--ring); outline-offset: -2px; }
71
+ .morepanel .alert { margin: 0; }
72
+ `;
73
+ //# sourceMappingURL=mcp-slate-ui-styles-dialog.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mcp-slate-ui-styles-dialog.js","sourceRoot":"","sources":["../src/mcp-slate-ui-styles-dialog.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAG,MAAM,CAAC,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgC/C,CAAC;AAEF;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,MAAM,CAAC,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;CAwB7C,CAAC"}