@jxsuite/studio 6.1.2 → 8.0.1

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 (522) hide show
  1. package/README.md +5 -5
  2. package/dist/chunks/2020-5wtzce5g.js +4 -0
  3. package/dist/chunks/adapter-5tphg7xe.js +4 -0
  4. package/dist/chunks/add-new-flow-psym14sn.js +4 -0
  5. package/dist/chunks/cf-account-picker-haqazq5r.js +4 -0
  6. package/dist/chunks/cf-settings-h2wrh6hq.js +4 -0
  7. package/dist/chunks/{color-area-0fj8a4ga.js → color-area-6rbra5dy.js} +2 -2
  8. package/dist/chunks/{color-field-xch8kx2g.js → color-field-gy56c94g.js} +3 -3
  9. package/dist/chunks/color-m7r1vk54.js +4 -0
  10. package/dist/chunks/{color-slider-jxd8v350.js → color-slider-sqqdyf6c.js} +2 -2
  11. package/dist/chunks/{combobox-p0efwjke.js → combobox-72h32ejk.js} +3 -3
  12. package/dist/chunks/components-r22xca09.js +4 -0
  13. package/dist/chunks/content-source-mmppmcyg.js +4 -0
  14. package/dist/chunks/convert-to-repeater-he70fc2b.js +4 -0
  15. package/dist/chunks/editor-ccd9jwsa.js +4 -0
  16. package/dist/chunks/entry-commands-6qxz9e8p.js +4 -0
  17. package/dist/chunks/extension-sections-0egb88dm.js +4 -0
  18. package/dist/chunks/file-ops-qnab36ek.js +4 -0
  19. package/dist/chunks/files-rcn56qvm.js +4 -0
  20. package/dist/chunks/format-host-yxz0kjjs.js +4 -0
  21. package/dist/chunks/fs-events-d1qxq4z4.js +4 -0
  22. package/dist/chunks/grid-open-4z1g062t.js +4 -0
  23. package/dist/chunks/{grid-view-d2wq9ezg.js → grid-view-qg1b5eqx.js} +25 -25
  24. package/dist/chunks/{icons-pnfz478q.js → icons-63bjtbs7.js} +2 -2
  25. package/dist/chunks/{iframe-entry-jdcktez8.js → iframe-entry-2zggzajv.js} +4 -4
  26. package/dist/chunks/{iframe-entry-zap785cw.js → iframe-entry-76j8vwwx.js} +4 -4
  27. package/dist/chunks/iframe-entry-99nr5zfb.js +5 -0
  28. package/dist/chunks/{iframe-entry-x0ygf2yr.js → iframe-entry-pkgmcgp0.js} +4 -4
  29. package/dist/chunks/iframe-host-ssv7kyj0.js +4 -0
  30. package/dist/chunks/{index-zpjmzqfk.js → index-32eqzv1k.js} +3 -3
  31. package/dist/chunks/index-f0jn7nnp.js +4 -0
  32. package/dist/chunks/{javascript-m54mnwp6.js → javascript-pjp734q4.js} +3 -3
  33. package/dist/chunks/jsonMode-njkvsa02.js +13 -0
  34. package/dist/chunks/jx-validate-ttasrbh7.js +4 -0
  35. package/dist/chunks/layers-bgyr11tr.js +4 -0
  36. package/dist/chunks/layers-panel-7ez66zeq.js +4 -0
  37. package/dist/chunks/{listbox-e74qjyq6.js → listbox-c421cf8c.js} +2 -2
  38. package/dist/chunks/lit-html-v9gh687x.js +4 -0
  39. package/dist/chunks/media-library-sq468wts.js +4 -0
  40. package/dist/chunks/media-picker-shfe59pt.js +4 -0
  41. package/dist/chunks/{menu-n6yzswmy.js → menu-bdpzbfvs.js} +2 -2
  42. package/dist/chunks/{monaco-binding-7gx83x3r.js → monaco-binding-vq1hgnn0.js} +3 -3
  43. package/dist/chunks/monaco-buffer-3afgwvbp.js +4 -0
  44. package/dist/chunks/monaco-setup-xrd2cbkp.js +4 -0
  45. package/dist/chunks/notify-kzrjr3fv.js +4 -0
  46. package/dist/chunks/parse-v77xtwv7.js +4 -0
  47. package/dist/chunks/platform-7v4rtd7m.js +4 -0
  48. package/dist/chunks/popover-b89sfej7.js +4 -0
  49. package/dist/chunks/publish-panel-2z9gw8ee.js +4 -0
  50. package/dist/chunks/publish-quick-qx2455cj.js +4 -0
  51. package/dist/chunks/publish-workspace-wrc1dgwx.js +4 -0
  52. package/dist/chunks/quick-search-n0t0eqxb.js +4 -0
  53. package/dist/chunks/references-9547rg5s.js +4 -0
  54. package/dist/chunks/right-panel-wsgnr9pn.js +4 -0
  55. package/dist/chunks/source-control-kwktr9y6.js +4 -0
  56. package/dist/chunks/{split-n2gfpm5m.js → split-c9zfdgxf.js} +2 -2
  57. package/dist/chunks/studio-03ct6yfv.js +9 -0
  58. package/dist/chunks/studio-07rcfje3.js +5 -0
  59. package/dist/chunks/studio-3e54qh39.js +7 -0
  60. package/dist/chunks/studio-3exxhz5g.js +5 -0
  61. package/dist/chunks/studio-3q40e3rj.js +5 -0
  62. package/dist/chunks/studio-3qeh9t0h.js +6 -0
  63. package/dist/chunks/studio-3qqjeep5.js +6 -0
  64. package/dist/chunks/studio-43sd2mam.js +4 -0
  65. package/dist/chunks/studio-4hp8pkyt.js +5 -0
  66. package/dist/chunks/studio-58xg6j2q.js +9 -0
  67. package/dist/chunks/studio-5g0rprdt.js +7 -0
  68. package/dist/chunks/{studio-2j1cb95x.js → studio-6m380wp7.js} +4 -4
  69. package/dist/chunks/studio-80jyh1xh.js +4 -0
  70. package/dist/chunks/studio-83mk4bgg.js +9 -0
  71. package/dist/chunks/{studio-v0jzqdjm.js → studio-881z1xrx.js} +4 -4
  72. package/dist/chunks/studio-8m0y2qe7.js +5 -0
  73. package/dist/chunks/{studio-d81xfh1g.js → studio-8tr6cfrc.js} +4 -4
  74. package/dist/chunks/studio-8vcvfs7r.js +6 -0
  75. package/dist/chunks/studio-9tmebf0s.js +5 -0
  76. package/dist/chunks/studio-a2bvaptz.js +5 -0
  77. package/dist/chunks/studio-b7y5mr30.js +5 -0
  78. package/dist/chunks/studio-bavb31r0.js +5 -0
  79. package/dist/chunks/{studio-dgz8d0c1.js → studio-bbe4c90a.js} +4 -4
  80. package/dist/chunks/studio-c05wdnt3.js +5 -0
  81. package/dist/chunks/studio-ccv2svc6.js +5 -0
  82. package/dist/chunks/studio-d5grtb9e.js +16 -0
  83. package/dist/chunks/studio-df0baea9.js +5 -0
  84. package/dist/chunks/studio-dgk4dqtx.js +7 -0
  85. package/dist/chunks/studio-e1g64q43.js +5 -0
  86. package/dist/chunks/studio-ed1hp6zf.js +6 -0
  87. package/dist/chunks/studio-ed3xx40h.js +7 -0
  88. package/dist/chunks/studio-f14e1zdj.js +5 -0
  89. package/dist/chunks/studio-fbhxxc5f.js +5 -0
  90. package/dist/chunks/studio-fyh0jc96.js +5 -0
  91. package/dist/chunks/studio-gcxk20n7.js +5 -0
  92. package/dist/chunks/studio-jaaz8ce9.js +5 -0
  93. package/dist/chunks/{studio-90pq9km1.js → studio-jcnsdaep.js} +4 -4
  94. package/dist/chunks/studio-jsgf2q5k.js +7 -0
  95. package/dist/chunks/{studio-0q988f9w.js → studio-k3xxbagr.js} +3 -3
  96. package/dist/chunks/{studio-5ve6bbep.js → studio-k7evxqh4.js} +4 -4
  97. package/dist/chunks/studio-kt3pjkwd.js +5 -0
  98. package/dist/chunks/studio-m8g16bgz.js +5 -0
  99. package/dist/chunks/studio-mn0476ag.js +5 -0
  100. package/dist/chunks/studio-mx1smyq0.js +5 -0
  101. package/dist/chunks/studio-n0c5h6mf.js +5 -0
  102. package/dist/chunks/{studio-485046te.js → studio-nh6d342n.js} +7 -7
  103. package/dist/chunks/studio-nqxqf8p2.js +4 -0
  104. package/dist/chunks/studio-p4nrkvqr.js +5 -0
  105. package/dist/chunks/{studio-1fxkaaea.js → studio-pbxa5fpc.js} +4 -4
  106. package/dist/chunks/studio-pgmvdv7z.js +7 -0
  107. package/dist/chunks/studio-ph84avkf.js +5 -0
  108. package/dist/chunks/{studio-tq0rtfwj.js → studio-q0mvbaq6.js} +4 -4
  109. package/dist/chunks/studio-q0tccd43.js +5 -0
  110. package/dist/chunks/studio-q7rtx6zq.js +14 -0
  111. package/dist/chunks/{studio-a3g98wjr.js → studio-qgh13jtz.js} +4 -4
  112. package/dist/chunks/studio-qmn1xc24.js +5 -0
  113. package/dist/chunks/studio-qwdqwkj0.js +5 -0
  114. package/dist/chunks/studio-r5qy30vx.js +5 -0
  115. package/dist/chunks/studio-rj9eamf8.js +5 -0
  116. package/dist/chunks/studio-rptgsk96.js +5 -0
  117. package/dist/chunks/studio-rthyg42z.js +928 -0
  118. package/dist/chunks/studio-s19tp1xr.js +5 -0
  119. package/dist/chunks/studio-s32578pn.js +5 -0
  120. package/dist/chunks/studio-svb7yyve.js +5 -0
  121. package/dist/chunks/studio-syreb644.js +5 -0
  122. package/dist/chunks/studio-tf9jryb1.js +10 -0
  123. package/dist/chunks/studio-tfkznv39.js +5 -0
  124. package/dist/chunks/studio-tft6r105.js +5 -0
  125. package/dist/chunks/studio-txf2kysx.js +5 -0
  126. package/dist/chunks/studio-v8867ddv.js +12 -0
  127. package/dist/chunks/studio-vxq7fcvv.js +5 -0
  128. package/dist/chunks/studio-w4rz9hdk.js +5 -0
  129. package/dist/chunks/studio-wbcjbhy1.js +9 -0
  130. package/dist/chunks/studio-wc649wss.js +5 -0
  131. package/dist/chunks/studio-wys23mxz.js +5 -0
  132. package/dist/chunks/studio-x1x167jh.js +5 -0
  133. package/dist/chunks/studio-x9hsze61.js +5 -0
  134. package/dist/chunks/studio-y0n7yxea.js +9 -0
  135. package/dist/chunks/studio-y3ahhdpx.js +5 -0
  136. package/dist/chunks/studio-z97c48fk.js +5 -0
  137. package/dist/chunks/studio-zat62m0c.js +5 -0
  138. package/dist/chunks/studio-zcd2e7yz.js +5 -0
  139. package/dist/chunks/studio-zz9qe3rw.js +64 -0
  140. package/dist/chunks/toast-1gv0h53h.js +4 -0
  141. package/dist/chunks/{toast-host-ke5z4ng7.js → toast-host-1yg5ar8d.js} +3 -3
  142. package/dist/chunks/{tooltip-5v8ngwj2.js → tooltip-yypz28gq.js} +3 -3
  143. package/dist/chunks/{tree-mdq3v5cw.js → tree-9xa4hm7n.js} +2 -2
  144. package/dist/chunks/tsMode-epyfz1hv.js +14 -0
  145. package/dist/chunks/workspace-dz7nxfhv.js +4 -0
  146. package/dist/chunks/workspace-home-xsd7hkjw.js +4 -0
  147. package/dist/chunks/{ws-client-nze0k6mv.js → ws-client-bv552sfx.js} +3 -3
  148. package/dist/iframe-entry.js +20 -16
  149. package/dist/manifest.json +77 -63
  150. package/dist/studio.js +103 -104
  151. package/dist/workers/ts.worker.js +3 -3
  152. package/package.json +12 -11
  153. package/src/browse/component-examples.ts +272 -0
  154. package/src/browse/library-commands.ts +64 -104
  155. package/src/browse/library-layouts.ts +263 -49
  156. package/src/browse/library-model.ts +181 -133
  157. package/src/browse/library-pane.ts +738 -446
  158. package/src/browse/library-preview.ts +149 -19
  159. package/src/browse/library-source.ts +308 -41
  160. package/src/browse/preview-root.ts +78 -0
  161. package/src/browse/preview-style.ts +155 -0
  162. package/src/canvas/asset-refs.ts +16 -1
  163. package/src/canvas/canvas-live-render.ts +222 -30
  164. package/src/canvas/canvas-origin.ts +37 -12
  165. package/src/canvas/canvas-page-context.ts +112 -0
  166. package/src/canvas/canvas-render.ts +113 -107
  167. package/src/canvas/canvas-utils.ts +57 -12
  168. package/src/canvas/iframe-drop.ts +107 -0
  169. package/src/canvas/iframe-entry.ts +24 -12
  170. package/src/canvas/iframe-host.ts +134 -62
  171. package/src/canvas/iframe-keys.ts +11 -0
  172. package/src/canvas/iframe-patch.ts +8 -7
  173. package/src/canvas/iframe-protocol.ts +24 -5
  174. package/src/canvas/iframe-render.ts +48 -1
  175. package/src/canvas/iframe-subtree.ts +5 -2
  176. package/src/canvas/npm-modules.ts +22 -0
  177. package/src/canvas/preview-navigate.ts +16 -0
  178. package/src/canvas/repeater-sources.ts +200 -0
  179. package/src/canvas/stage-scrollbar.ts +5 -1
  180. package/src/canvas/surface-registry.ts +6 -0
  181. package/src/commands/app-commands.ts +16 -6
  182. package/src/commands/budget.ts +10 -8
  183. package/src/commands/context.ts +35 -10
  184. package/src/commands/defaults.ts +69 -45
  185. package/src/commands/keymap.ts +9 -0
  186. package/src/commands/levels.ts +11 -5
  187. package/src/commands/live-context.ts +2 -0
  188. package/src/commands/registry.ts +10 -1
  189. package/src/content/collection-match.ts +6 -5
  190. package/src/content/collection-pages.ts +412 -0
  191. package/src/content/content-collections.ts +270 -0
  192. package/src/content/entry-commands.ts +51 -60
  193. package/src/content/entry-editor.ts +111 -18
  194. package/src/content/entry-fields.ts +13 -1
  195. package/src/content/entry-inspector.ts +225 -0
  196. package/src/content/entry-model.ts +17 -3
  197. package/src/content/entry-open.ts +80 -0
  198. package/src/content/entry-summaries.ts +440 -0
  199. package/src/content/file-record-ids.ts +80 -0
  200. package/src/content/file-records.ts +125 -0
  201. package/src/content/page-summaries.ts +129 -0
  202. package/src/content/record-entry.ts +201 -0
  203. package/src/content/writing-banner.ts +177 -0
  204. package/src/create/add-new-commands.ts +185 -0
  205. package/src/create/add-new-flow.ts +1116 -0
  206. package/src/create/add-new.ts +1014 -0
  207. package/src/create/element-name.ts +121 -0
  208. package/src/editor/convert-to-component.ts +67 -43
  209. package/src/editor/file-drop-action.ts +9 -1
  210. package/src/editor/inline-edit-apply.ts +44 -0
  211. package/src/editor/inline-edit.ts +10 -0
  212. package/src/editor/insert-component.ts +91 -0
  213. package/src/editor/insert-zone-action.ts +13 -4
  214. package/src/editor/shortcuts.ts +44 -22
  215. package/src/editor/slash-menu.ts +51 -8
  216. package/src/files/components.ts +74 -10
  217. package/src/files/file-ops.ts +15 -5
  218. package/src/files/files.ts +164 -150
  219. package/src/files/fs-events.ts +18 -7
  220. package/src/files/media-meta.ts +95 -1
  221. package/src/files/media-types.ts +55 -0
  222. package/src/files/media-upload.ts +209 -52
  223. package/src/files/new-file-name.ts +156 -0
  224. package/src/files/serialize-document.ts +13 -3
  225. package/src/format/format-host.ts +15 -0
  226. package/src/github/github-auth.ts +2 -2
  227. package/src/github/github-publish.ts +4 -3
  228. package/src/grid/grid-controller.ts +5 -1
  229. package/src/grid/grid-open.ts +0 -27
  230. package/src/grid/grid-panel.ts +54 -2
  231. package/src/grid/grid-reveal.ts +34 -0
  232. package/src/grid/grid-source.ts +3 -25
  233. package/src/grid/grid-view.ts +31 -6
  234. package/src/grid/sources/content-source.ts +75 -7
  235. package/src/grid/tabulator-tables.d.ts +6 -0
  236. package/src/hosting/document.ts +2 -2
  237. package/src/i18n/i18n-commands.ts +2 -1
  238. package/src/media/media-commands.ts +181 -0
  239. package/src/media/media-library-model.ts +232 -0
  240. package/src/media/media-library.ts +1283 -0
  241. package/src/media/media-pane.ts +47 -19
  242. package/src/packages/pull-package-sync.ts +1 -1
  243. package/src/panels/activity-panel.ts +21 -5
  244. package/src/panels/ai-chat/chat-markdown.ts +8 -8
  245. package/src/panels/block-action-bar.ts +11 -11
  246. package/src/panels/canvas-dnd-bridge.ts +5 -2
  247. package/src/panels/chat-panel.ts +6 -6
  248. package/src/panels/collections-panel.ts +306 -0
  249. package/src/panels/component-preview.ts +35 -13
  250. package/src/panels/data-explorer.ts +1 -1
  251. package/src/panels/data-grid.ts +4 -0
  252. package/src/panels/dnd.ts +17 -30
  253. package/src/panels/elements-panel.ts +9 -2
  254. package/src/panels/empty-state.ts +2 -2
  255. package/src/panels/formula-workspace.ts +2 -3
  256. package/src/panels/frontmatter-fields.ts +9 -9
  257. package/src/panels/git-diff-open.ts +9 -5
  258. package/src/panels/head-panel.ts +369 -103
  259. package/src/panels/i18n-panel.ts +11 -10
  260. package/src/panels/imports-panel.ts +2 -0
  261. package/src/panels/jump-bar.ts +27 -2
  262. package/src/panels/layers-panel.ts +36 -30
  263. package/src/panels/left-panel.ts +22 -8
  264. package/src/panels/navigator-panels.ts +23 -11
  265. package/src/panels/pane-context.ts +111 -29
  266. package/src/panels/pane-grid.ts +6 -6
  267. package/src/panels/panel-registry.ts +14 -9
  268. package/src/panels/properties-panel.ts +7 -3
  269. package/src/panels/right-panel.ts +199 -43
  270. package/src/panels/seo-modal.ts +41 -108
  271. package/src/panels/settings-menu.ts +52 -50
  272. package/src/panels/settings-pane.ts +268 -162
  273. package/src/panels/signals-panel.ts +3 -4
  274. package/src/panels/site-model.ts +367 -0
  275. package/src/panels/site-panel.ts +638 -0
  276. package/src/panels/style-panel.ts +37 -3
  277. package/src/panels/stylebook-doc.ts +142 -10
  278. package/src/panels/stylebook-layers-panel.ts +39 -80
  279. package/src/panels/stylebook-panel.ts +47 -10
  280. package/src/panels/styles-panel.ts +327 -0
  281. package/src/panels/tab-strip.ts +109 -25
  282. package/src/platform.ts +1 -1
  283. package/src/platforms/cloud.ts +28 -1
  284. package/src/platforms/default-platform.ts +4 -4
  285. package/src/platforms/devserver.ts +51 -25
  286. package/src/publish/deploy-checklist.ts +12 -7
  287. package/src/publish/pages-service.ts +38 -14
  288. package/src/publish/publish-changes.ts +491 -0
  289. package/src/publish/publish-commands.ts +83 -18
  290. package/src/publish/publish-ids.ts +49 -0
  291. package/src/publish/publish-quick.ts +148 -0
  292. package/src/publish/publish-workspace.ts +926 -0
  293. package/src/publish/source-control.ts +907 -0
  294. package/src/services/automation.ts +16 -20
  295. package/src/services/cf-settings.ts +4 -4
  296. package/src/services/connection.ts +2 -2
  297. package/src/services/directory-picker.ts +2 -2
  298. package/src/services/references.ts +0 -0
  299. package/src/services/render-critic.ts +21 -2
  300. package/src/services/settings/definitions.ts +25 -14
  301. package/src/settings/contributed-section.ts +49 -10
  302. package/src/settings/css-vars-editor.ts +93 -27
  303. package/src/settings/developer-panels.ts +43 -0
  304. package/src/settings/extension-sections.ts +20 -2
  305. package/src/settings/general-settings.ts +91 -21
  306. package/src/settings/preferences-dialog.ts +8 -1
  307. package/src/settings/project-sections.ts +27 -10
  308. package/src/settings/schema-field-ui.ts +3 -1
  309. package/src/settings/section-registry.ts +116 -11
  310. package/src/settings/settings-dialog.ts +192 -0
  311. package/src/settings/settings-document.ts +182 -162
  312. package/src/shell.ts +467 -431
  313. package/src/site-context.ts +64 -10
  314. package/src/state.ts +28 -9
  315. package/src/studio.ts +194 -41
  316. package/src/style/project-styles.ts +34 -0
  317. package/src/style/stylebook-specimens.ts +89 -0
  318. package/src/style/stylebook-target.ts +26 -0
  319. package/src/style/tag-inheritance.ts +105 -0
  320. package/src/style/variables-focus.ts +61 -0
  321. package/src/style/variables-view.ts +235 -0
  322. package/src/surfaces/add-new.json +1482 -0
  323. package/src/surfaces/add-new.ts +325 -0
  324. package/src/surfaces/ai-chat.ts +2 -2
  325. package/src/surfaces/boot-failure.json +4 -3
  326. package/src/surfaces/bottom-dock.json +1 -1
  327. package/src/surfaces/canvas-stage.json +30 -19
  328. package/src/surfaces/canvas-stage.ts +5 -5
  329. package/src/surfaces/collections-panel.json +615 -0
  330. package/src/surfaces/collections-panel.ts +168 -0
  331. package/src/surfaces/commandbar.json +241 -96
  332. package/src/surfaces/commandbar.ts +134 -99
  333. package/src/surfaces/empty-state.json +1 -1
  334. package/src/surfaces/entry-editor.json +136 -0
  335. package/src/surfaces/entry-editor.ts +21 -0
  336. package/src/surfaces/entry-inspector.json +371 -0
  337. package/src/surfaces/entry-inspector.ts +143 -0
  338. package/src/surfaces/inspector-dock.json +162 -14
  339. package/src/surfaces/inspector-dock.ts +46 -19
  340. package/src/surfaces/library-pane.json +670 -437
  341. package/src/surfaces/library-pane.ts +94 -59
  342. package/src/surfaces/media-browser.json +62 -6
  343. package/src/surfaces/media-browser.ts +15 -1
  344. package/src/surfaces/media-field.json +1 -1
  345. package/src/surfaces/media-library.json +1586 -0
  346. package/src/surfaces/media-library.ts +282 -0
  347. package/src/surfaces/media-pick-dialog.json +71 -0
  348. package/src/surfaces/media-pick-dialog.ts +132 -0
  349. package/src/surfaces/menu.ts +18 -0
  350. package/src/surfaces/pane-context.json +144 -77
  351. package/src/surfaces/pane-context.ts +24 -0
  352. package/src/surfaces/panel-deploy-checklist.json +12 -6
  353. package/src/surfaces/panel-deploy-checklist.ts +3 -1
  354. package/src/surfaces/panel-page.json +72 -2
  355. package/src/surfaces/panel-page.ts +38 -7
  356. package/src/surfaces/panel-signals.json +1 -1
  357. package/src/surfaces/panel-signals.ts +5 -5
  358. package/src/surfaces/panel-stylebook-layers.json +71 -204
  359. package/src/surfaces/panel-stylebook-layers.ts +0 -21
  360. package/src/surfaces/preferences.json +120 -48
  361. package/src/surfaces/preferences.ts +8 -0
  362. package/src/surfaces/publish-quick.json +428 -0
  363. package/src/surfaces/publish-quick.ts +165 -0
  364. package/src/surfaces/publish-workspace.json +2892 -0
  365. package/src/surfaces/publish-workspace.ts +391 -0
  366. package/src/surfaces/rail.json +1 -159
  367. package/src/surfaces/rail.ts +18 -75
  368. package/src/surfaces/schema-form.json +10 -2
  369. package/src/surfaces/schema-form.ts +2 -0
  370. package/src/surfaces/seo.json +1 -1
  371. package/src/surfaces/settings-contributed.json +5 -5
  372. package/src/surfaces/settings-contributed.ts +18 -2
  373. package/src/surfaces/settings-css-vars.json +44 -36
  374. package/src/surfaces/settings-css-vars.ts +77 -4
  375. package/src/surfaces/settings-deploy.json +2 -15
  376. package/src/surfaces/settings-deploy.ts +1 -1
  377. package/src/surfaces/settings-dialog.json +51 -0
  378. package/src/surfaces/settings-dialog.ts +169 -0
  379. package/src/surfaces/settings-overview.json +3 -3
  380. package/src/surfaces/settings-overview.ts +9 -2
  381. package/src/surfaces/settings-pane.json +269 -46
  382. package/src/surfaces/settings-pane.ts +85 -24
  383. package/src/surfaces/shell.json +2 -1
  384. package/src/surfaces/site-panel.json +1029 -0
  385. package/src/surfaces/site-panel.ts +233 -0
  386. package/src/surfaces/slash-menu.json +63 -21
  387. package/src/surfaces/slash-menu.ts +23 -0
  388. package/src/surfaces/statusbar.ts +39 -15
  389. package/src/surfaces/styles-panel.json +735 -0
  390. package/src/surfaces/styles-panel.ts +195 -0
  391. package/src/surfaces/styles-variables.json +149 -0
  392. package/src/surfaces/styles-variables.ts +145 -0
  393. package/src/surfaces/tab-strip.json +4 -4
  394. package/src/surfaces/welcome.ts +1 -1
  395. package/src/surfaces/writing-banner.json +94 -0
  396. package/src/surfaces/writing-banner.ts +80 -0
  397. package/src/tabs/bare-repeaters.ts +101 -0
  398. package/src/tabs/tab.ts +47 -7
  399. package/src/types.ts +21 -26
  400. package/src/ui/form-controls.ts +47 -8
  401. package/src/ui/layers.ts +13 -0
  402. package/src/ui/media-picker.ts +284 -40
  403. package/src/ui/regions.ts +7 -6
  404. package/src/ui/schema-form.ts +259 -27
  405. package/src/ui/virtual-window.ts +26 -1
  406. package/src/utils/base64.ts +3 -3
  407. package/src/utils/edit-display.ts +322 -67
  408. package/src/utils/local-day.ts +18 -0
  409. package/src/workspace/pane-derive.ts +4 -4
  410. package/src/workspace/session.ts +28 -7
  411. package/src/workspace/tab-workspace.ts +137 -0
  412. package/src/workspace/workspace-back.ts +189 -0
  413. package/src/workspace/workspace-home.ts +133 -0
  414. package/src/workspace/workspace-ids.ts +129 -0
  415. package/src/workspace/workspace-switch.ts +372 -0
  416. package/src/workspace/workspace.ts +125 -11
  417. package/styles/shell-frame.css +30 -7
  418. package/styles/shell-frame.json +15 -3
  419. package/dist/chunks/2020-f2gkpy8d.js +0 -4
  420. package/dist/chunks/adapter-4912g339.js +0 -4
  421. package/dist/chunks/cf-account-picker-wccaenh6.js +0 -4
  422. package/dist/chunks/cf-settings-br6105tr.js +0 -4
  423. package/dist/chunks/color-28ksk2qm.js +0 -4
  424. package/dist/chunks/components-db68vsn7.js +0 -4
  425. package/dist/chunks/content-source-1449qesq.js +0 -4
  426. package/dist/chunks/convert-to-repeater-5h457egj.js +0 -4
  427. package/dist/chunks/editor-x9jn86a7.js +0 -4
  428. package/dist/chunks/entry-commands-may24cpt.js +0 -4
  429. package/dist/chunks/extension-sections-pvr14vxr.js +0 -4
  430. package/dist/chunks/file-ops-x9v54pcj.js +0 -4
  431. package/dist/chunks/files-j3knqf0s.js +0 -4
  432. package/dist/chunks/format-host-tyre2trb.js +0 -4
  433. package/dist/chunks/fs-events-64ma9htc.js +0 -4
  434. package/dist/chunks/git-panel-84ps5dex.js +0 -4
  435. package/dist/chunks/iframe-entry-fvbk89gm.js +0 -5
  436. package/dist/chunks/iframe-host-ck6vejt5.js +0 -4
  437. package/dist/chunks/index-b8xw3vy9.js +0 -4
  438. package/dist/chunks/jsonMode-w15cmrcm.js +0 -13
  439. package/dist/chunks/jx-validate-at3zn8wa.js +0 -4
  440. package/dist/chunks/layers-h4xp1pss.js +0 -4
  441. package/dist/chunks/layers-panel-m5hw1d7g.js +0 -4
  442. package/dist/chunks/lit-html-8t8t3dnr.js +0 -4
  443. package/dist/chunks/media-picker-2cweexc5.js +0 -4
  444. package/dist/chunks/menu-ynw13y0s.js +0 -4
  445. package/dist/chunks/monaco-buffer-qzxn567r.js +0 -4
  446. package/dist/chunks/monaco-setup-gxf6656g.js +0 -4
  447. package/dist/chunks/notify-cj5zbrs2.js +0 -4
  448. package/dist/chunks/parse-b7ddhr8m.js +0 -4
  449. package/dist/chunks/platform-3dfws9js.js +0 -4
  450. package/dist/chunks/popover-jt2gxmzs.js +0 -4
  451. package/dist/chunks/publish-panel-1gvxbj21.js +0 -4
  452. package/dist/chunks/quick-search-0dajrwqg.js +0 -4
  453. package/dist/chunks/references-49qgt404.js +0 -4
  454. package/dist/chunks/right-panel-jm1bwe53.js +0 -4
  455. package/dist/chunks/section-registry-6kwc4fky.js +0 -4
  456. package/dist/chunks/studio-0rt52vpq.js +0 -5
  457. package/dist/chunks/studio-18vgbhs5.js +0 -5
  458. package/dist/chunks/studio-24mccdrj.js +0 -5
  459. package/dist/chunks/studio-2eh507zk.js +0 -9
  460. package/dist/chunks/studio-2hcbccfv.js +0 -5
  461. package/dist/chunks/studio-2jbs3rxv.js +0 -5
  462. package/dist/chunks/studio-4h8k4dw9.js +0 -5
  463. package/dist/chunks/studio-5f6n18kx.js +0 -5
  464. package/dist/chunks/studio-5gthpky6.js +0 -5
  465. package/dist/chunks/studio-6ep3js6b.js +0 -9
  466. package/dist/chunks/studio-6wkmf3wz.js +0 -9
  467. package/dist/chunks/studio-841rf3cg.js +0 -5
  468. package/dist/chunks/studio-8gmwgheg.js +0 -5
  469. package/dist/chunks/studio-8qm0ep50.js +0 -5
  470. package/dist/chunks/studio-924p1tm1.js +0 -6
  471. package/dist/chunks/studio-a3shpz9y.js +0 -5
  472. package/dist/chunks/studio-amsbaaar.js +0 -6
  473. package/dist/chunks/studio-at5spjbc.js +0 -7
  474. package/dist/chunks/studio-b2xv945e.js +0 -5
  475. package/dist/chunks/studio-bn5nkafw.js +0 -5
  476. package/dist/chunks/studio-bw6q5xjf.js +0 -9
  477. package/dist/chunks/studio-c7q0t9x1.js +0 -5
  478. package/dist/chunks/studio-camnhc96.js +0 -6
  479. package/dist/chunks/studio-cffqvnzd.js +0 -5
  480. package/dist/chunks/studio-efvfrsf8.js +0 -5
  481. package/dist/chunks/studio-er30bpcx.js +0 -5
  482. package/dist/chunks/studio-ezscgr64.js +0 -5
  483. package/dist/chunks/studio-ffrrncvz.js +0 -5
  484. package/dist/chunks/studio-fpphgn8y.js +0 -10
  485. package/dist/chunks/studio-j1kvhdjk.js +0 -4
  486. package/dist/chunks/studio-j430n16g.js +0 -7
  487. package/dist/chunks/studio-jjkg84nj.js +0 -5
  488. package/dist/chunks/studio-m0q32ars.js +0 -4
  489. package/dist/chunks/studio-m6bdst11.js +0 -5
  490. package/dist/chunks/studio-nv2cptd4.js +0 -64
  491. package/dist/chunks/studio-nwfrc98n.js +0 -5
  492. package/dist/chunks/studio-p1wgvp7r.js +0 -5
  493. package/dist/chunks/studio-pag2wncm.js +0 -5
  494. package/dist/chunks/studio-qvanvzfd.js +0 -5
  495. package/dist/chunks/studio-qwa64kt7.js +0 -5
  496. package/dist/chunks/studio-rk1zc4x3.js +0 -928
  497. package/dist/chunks/studio-se2r3ptc.js +0 -5
  498. package/dist/chunks/studio-sg2a0dh0.js +0 -5
  499. package/dist/chunks/studio-tjzjhe68.js +0 -5
  500. package/dist/chunks/studio-v2w7q8r1.js +0 -7
  501. package/dist/chunks/studio-v5vjq1h0.js +0 -4
  502. package/dist/chunks/studio-v8aga3vp.js +0 -14
  503. package/dist/chunks/studio-vfcdrfmv.js +0 -5
  504. package/dist/chunks/studio-vmfkgdjf.js +0 -5
  505. package/dist/chunks/studio-wt1816jj.js +0 -5
  506. package/dist/chunks/studio-wz73q5kq.js +0 -4
  507. package/dist/chunks/studio-y04qtxvp.js +0 -7
  508. package/dist/chunks/studio-y21g8zzg.js +0 -5
  509. package/dist/chunks/studio-y64hrt8p.js +0 -12
  510. package/dist/chunks/studio-ynn90f58.js +0 -16
  511. package/dist/chunks/studio-yxz682sx.js +0 -5
  512. package/dist/chunks/studio-zp7snvkq.js +0 -5
  513. package/dist/chunks/studio-zq4z6tm6.js +0 -5
  514. package/dist/chunks/toast-c9fn075p.js +0 -4
  515. package/dist/chunks/tsMode-sf49ee9x.js +0 -14
  516. package/dist/chunks/workspace-jtfahpee.js +0 -4
  517. package/src/panels/frontmatter-panel.ts +0 -711
  518. package/src/panels/git-panel.ts +0 -1108
  519. package/src/surfaces/doc-header.json +0 -776
  520. package/src/surfaces/doc-header.ts +0 -222
  521. package/src/surfaces/git-panel.json +0 -1880
  522. package/src/surfaces/git-panel.ts +0 -264
@@ -11,38 +11,27 @@
11
11
  * whose only name is a hover tooltip is the accessibility failure studio-ui-guidelines.md §12.3
12
12
  * names — and `aria-pressed` states the toggle-focus semantics honestly: re-picking the open panel
13
13
  * collapses its dock, which is a two-state control, not a one-way selection. The label is the
14
- * record's `railLabel` when it declares one (Source Control's is "Source", because the full title
15
- * ellipsed in the 48px label box), and the full `title` stays the accessible name and the tooltip.
14
+ * record's `railLabel` when it declares one (none does today: Source Control's "Source" left the
15
+ * rail with it), and the full `title` stays the accessible name and the tooltip.
16
16
  *
17
- * The foot holds the two buttons that open no Navigator panel. **Library** runs `library.open`: the
18
- * Library is a canvas tab, not a panel, and its button is pressed while that tab is the focused
19
- * one. Below it is the ⚙ **Settings** menu, a menu button rendered from the `settings/menu`
20
- * placement: a record joins the gear by declaring the placement and there is nothing here to update
21
- * in step. With no registry, or one that declares nothing for either, the foot is empty.
17
+ * **The rail has no foot.** It is drawn only in the Design workspace (the frame hides its column
18
+ * everywhere else, `shell.ts`'s `applyDockLayout`), so a control every workspace needs cannot live
19
+ * here: the ⚙ Settings menu moved to the top bar, and the Library button left with the Library,
20
+ * which the Content workspace replaces.
22
21
  *
23
- * What this adapter owns is the projection and the two decisions: which panel a button toggles, and
24
- * where the gear's menu opens. The scope is reactive, so the surface follows `shell` through one
25
- * effect that recomputes the projection; nothing repaints.
22
+ * What this adapter owns is the projection and the one decision: which panel a button toggles. The
23
+ * scope is reactive, so the surface follows `shell` through one effect that recomputes the
24
+ * projection; nothing repaints.
26
25
  *
27
26
  * @docs studio/interface
28
27
  */
29
28
  import { activityBar } from "../store";
30
29
  import { effect, effectScope, reactive } from "../reactivity";
31
30
  import { requireNavigatorPanelId, shell, toggleActivityTab } from "../shell";
32
- import { refreshGitStatus } from "../panels/git-panel";
31
+ import { refreshGitStatus } from "../publish/source-control";
33
32
  import { panelContext, railGroups } from "../panels/panel-registry";
34
33
  import { registerNavigatorPanels } from "../panels/navigator-panels";
35
- import { activeRegistry } from "../commands/active-registry";
36
- import { runActiveReported } from "../commands/run-reported";
37
- import {
38
- dismissSettingsMenu,
39
- isSettingsMenuOpen,
40
- openSettingsMenu,
41
- SETTINGS_MENU_PLACEMENT,
42
- } from "../panels/settings-menu";
43
34
  import { mountSurface, registerSurface } from "../ui/surface";
44
- import { libraryTabId } from "../browse/library-source";
45
- import { activeTab } from "../workspace/workspace";
46
35
  import railDoc from "./rail.json";
47
36
 
48
37
  import type { EffectScope } from "@vue/reactivity";
@@ -71,21 +60,9 @@ interface RailGroupProjection {
71
60
  panels: RailButton[];
72
61
  }
73
62
 
74
- /** The parts of the rail's scope recomputed from the registry and the shell on every render. */
75
- type RailProjection = Pick<
76
- RailScope,
77
- "groups" | "libraryOpen" | "libraryVisible" | "settingsVisible"
78
- >;
79
-
80
63
  interface RailScope {
81
64
  groups: RailGroupProjection[];
82
- settingsVisible: boolean;
83
- settingsOpen: boolean;
84
- libraryVisible: boolean;
85
- libraryOpen: boolean;
86
- openLibrary: () => void;
87
65
  toggle: (id: string) => void;
88
- openSettings: (anchor: EventTarget | null) => void;
89
66
  }
90
67
 
91
68
  let _scope: EffectScope | null = null;
@@ -117,9 +94,9 @@ export function toggleRailPanel(panel: PanelRecord): void {
117
94
  }
118
95
 
119
96
  /** The rail, as the surface reads it, from the registry and the shell as they stand now. */
120
- function project(): RailProjection {
97
+ function project(): RailGroupProjection[] {
121
98
  const ctx = panelContext();
122
- const groups = railGroups(ctx).map((group, index) => ({
99
+ return railGroups(ctx).map((group, index) => ({
123
100
  dividerAbove: index > 0,
124
101
  label: group.label,
125
102
  level: group.level,
@@ -132,41 +109,12 @@ function project(): RailProjection {
132
109
  title: panel.title,
133
110
  })),
134
111
  }));
135
- const registry = activeRegistry();
136
- const settingsVisible =
137
- registry !== null && registry.forPlacement(SETTINGS_MENU_PLACEMENT).length > 0;
138
- const libraryVisible =
139
- registry?.get(LIBRARY_COMMAND) !== undefined && registry.isVisible(LIBRARY_COMMAND);
140
- const libraryOpen = activeTab.value?.id === libraryTabId();
141
- return { groups, libraryOpen, libraryVisible, settingsVisible };
142
112
  }
143
113
 
144
- /** The command the Library button runs: the record decides when it can, and what opening means. */
145
- const LIBRARY_COMMAND = "library.open";
146
-
147
114
  /** The reactive scope the surface reads, made once. */
148
115
  function state(): RailScope {
149
116
  _state ??= reactive<RailScope>({
150
117
  groups: [],
151
- libraryOpen: false,
152
- libraryVisible: false,
153
- openLibrary: () => {
154
- void runActiveReported(LIBRARY_COMMAND, undefined, "Navigator rail");
155
- },
156
- openSettings: (anchor: EventTarget | null) => {
157
- if (!(anchor instanceof HTMLElement)) {
158
- return;
159
- }
160
- openSettingsMenu(anchor, {
161
- rerender: () => {
162
- if (_state) {
163
- _state.settingsOpen = isSettingsMenuOpen();
164
- }
165
- },
166
- });
167
- },
168
- settingsOpen: false,
169
- settingsVisible: false,
170
118
  toggle: (id: string) => {
171
119
  const panel = railGroups(panelContext())
172
120
  .flatMap((group) => group.panels)
@@ -181,13 +129,7 @@ function state(): RailScope {
181
129
 
182
130
  /** Recompute the projection from the registry and the shell; the surface follows. */
183
131
  export function renderActivityBar(): void {
184
- const scope = state();
185
- const next = project();
186
- scope.groups = next.groups;
187
- scope.settingsVisible = next.settingsVisible;
188
- scope.libraryVisible = next.libraryVisible;
189
- scope.libraryOpen = next.libraryOpen;
190
- scope.settingsOpen = isSettingsMenuOpen();
132
+ state().groups = project();
191
133
  ensureMounted();
192
134
  }
193
135
 
@@ -209,9 +151,11 @@ export function mount(): void {
209
151
  _scope = effectScope();
210
152
  _scope.run(() => {
211
153
  effect(() => {
212
- // Source control is PROJECT state, so the badge is fetched and drawn without reference to
213
- // Any tab. The badge needs a status once. A refresh that already failed must not re-arm this:
214
- // The effect re-runs on the very state the failure writes, so retrying here spins.
154
+ // Source control is PROJECT state, so its status is fetched without reference to any tab.
155
+ // No rail button draws it now; the Command Bar's Publish count does, and this is the fetch
156
+ // That count reads (`ctx.git.dirtyCount`). It needs a status once. A refresh that already
157
+ // Failed must not re-arm this: the effect re-runs on the very state the failure writes, so
158
+ // Retrying here spins.
215
159
  const { error, loading, status } = shell.git;
216
160
  if (!status && !loading && !error) {
217
161
  void refreshGitStatus();
@@ -222,7 +166,6 @@ export function mount(): void {
222
166
  }
223
167
 
224
168
  export function unmount(): void {
225
- dismissSettingsMenu();
226
169
  _scope?.stop();
227
170
  _scope = null;
228
171
  const pending = _mount;
@@ -80,6 +80,11 @@
80
80
  "gap": "var(--jx-space-1)",
81
81
  "minWidth": "0"
82
82
  },
83
+ "& [part=\"row\"] > [part=\"cell\"]:only-of-type > *": {
84
+ "$description": "A row of one cell (an item of a list of single values: a category, a picture) gives that cell the row's width, so a list reads as the fields around it do rather than as a column of stubs.",
85
+ "flex": "1",
86
+ "minWidth": "0"
87
+ },
83
88
  "& [part=\"row-add\"]": {
84
89
  "alignSelf": "flex-start"
85
90
  },
@@ -236,6 +241,9 @@
236
241
  },
237
242
  "multiline": {
238
243
  "$ref": "$map/item/multiline"
244
+ },
245
+ "type": {
246
+ "$ref": "$map/item/inputType"
239
247
  }
240
248
  },
241
249
  "oninput": {
@@ -621,7 +629,7 @@
621
629
  ]
622
630
  },
623
631
  "rows": {
624
- "$description": "An array whose items are objects with a declared shape: one row per item, one cell per declared property, a remove beside each and one add below. The alternative was the raw-JSON editor, which is what an array of anything else still gets — a shape the schema states is a shape the form can draw.",
632
+ "$description": "An array whose items have a declared shape: one row per item, one cell per declared property of an object item, or one cell for a single-value item (a list of categories, a gallery of pictures), with a remove beside each and one add below. The alternative was the raw-JSON editor, which is what an array of anything else still gets: a shape the schema states is a shape the form can draw.",
625
633
  "tagName": "span",
626
634
  "attributes": {
627
635
  "part": "rows",
@@ -858,7 +866,7 @@
858
866
  }
859
867
  },
860
868
  "control": {
861
- "$description": "A cell a registered control owns — a relationship to another collection is the one that reaches here. The document draws the empty host and nothing inside it; `ui/schema-form.ts` mounts the control into it, by the same dispatch a FIELD host gets. An extension's control is its own surface rather than part of this one, and the seam between them is this empty node.",
869
+ "$description": "A cell a registered control owns: a relationship to another collection, or a picture (the media field). The document draws the empty host and nothing inside it; `ui/schema-form.ts` mounts the control into it, by the same dispatch a FIELD host gets. An extension's control is its own surface rather than part of this one, and the seam between them is this empty node.",
862
870
  "tagName": "span",
863
871
  "attributes": {
864
872
  "part": "cell-control-host",
@@ -106,6 +106,8 @@ export interface SchemaFormFieldView {
106
106
  mono: boolean;
107
107
  /** Draw the text control as a text area. */
108
108
  multiline: boolean;
109
+ /** The native input type of the text control: `date` for a `format: "date"` field, else `text`. */
110
+ inputType: string;
109
111
  /** Why this value is refused (§16.1's inline tier). Empty draws nothing. */
110
112
  error: string;
111
113
  /** Whether there is a refusal to announce. A document branches on a flag, never on a length. */
@@ -244,7 +244,7 @@
244
244
  "color": "var(--warning)"
245
245
  },
246
246
  "& [part=\"empty\"]": {
247
- "$description": "A fully-described page says so rather than printing an empty list. It borrowed `.doc-header-empty` from the card this block used to live in; the card still writes that class, so the rule stays where it is and this surface stops reaching across for it.",
247
+ "$description": "A fully-described page says so rather than printing an empty list.",
248
248
  "margin": "0",
249
249
  "padding": "0 0 var(--jx-space-3)",
250
250
  "fontSize": "var(--jx-text-md)",
@@ -214,7 +214,7 @@
214
214
  "part": "new-open"
215
215
  },
216
216
  "$props": {
217
- "label": "New Entry",
217
+ "label": "${state.newLabel}",
218
218
  "icon": "plus",
219
219
  "quiet": true,
220
220
  "size": "sm"
@@ -234,7 +234,7 @@
234
234
  "children": [
235
235
  {
236
236
  "tagName": "span",
237
- "textContent": "New Entry"
237
+ "textContent": "${state.newLabel}"
238
238
  }
239
239
  ]
240
240
  },
@@ -250,8 +250,8 @@
250
250
  "part": "new-field"
251
251
  },
252
252
  "$props": {
253
- "label": "New entry name",
254
- "placeholder": "entry-name",
253
+ "label": "${state.newFieldLabel}",
254
+ "placeholder": "${state.newPlaceholder}",
255
255
  "size": "sm",
256
256
  "value": {
257
257
  "$ref": "#/state/newName"
@@ -361,7 +361,7 @@
361
361
  "attributes": {
362
362
  "part": "empty"
363
363
  },
364
- "textContent": "Select or create an entry"
364
+ "textContent": "${state.emptyText}"
365
365
  },
366
366
  "editing": {
367
367
  "tagName": "div",
@@ -41,7 +41,7 @@ export interface ContributedEntryView {
41
41
  /** The key in the section's map on disk — the row's identity and its `data-entry`. */
42
42
  key: string;
43
43
  selected: boolean;
44
- /** `pane.primary/entry:<key>`, so a shot can name the row without a selector. */
44
+ /** `overlay.dialog:settings/entry:<key>`, so a shot can name the row without a selector. */
45
45
  region: string;
46
46
  }
47
47
 
@@ -61,8 +61,16 @@ export interface ContributedView {
61
61
  editorState: "empty" | "editing";
62
62
  /** What the rename field holds — the key on disk, or what the reader has just typed. */
63
63
  entryName: string;
64
- /** `pane.primary/editor`. */
64
+ /** `overlay.dialog:settings/editor`. */
65
65
  editorRegion: string;
66
+ /** The new-entry button: "New content type", or "New entry" when the section names none. */
67
+ newLabel: string;
68
+ /** The new-entry field's accessible label. */
69
+ newFieldLabel: string;
70
+ /** The new-entry field's placeholder, a slug of the noun. */
71
+ newPlaceholder: string;
72
+ /** What the right column says while nothing is selected. */
73
+ emptyText: string;
66
74
  }
67
75
 
68
76
  /** What the reader may do here. Each one is a decision the section makes. */
@@ -116,6 +124,10 @@ function emptyView(): ContributedView {
116
124
  newName: "",
117
125
  newState: "closed",
118
126
  title: "",
127
+ emptyText: "",
128
+ newFieldLabel: "",
129
+ newLabel: "",
130
+ newPlaceholder: "",
119
131
  };
120
132
  }
121
133
 
@@ -199,6 +211,10 @@ export function mountContributedSurface(
199
211
  scope.newName = view.newName;
200
212
  scope.newState = view.newState;
201
213
  scope.title = view.title;
214
+ scope.emptyText = view.emptyText;
215
+ scope.newFieldLabel = view.newFieldLabel;
216
+ scope.newLabel = view.newLabel;
217
+ scope.newPlaceholder = view.newPlaceholder;
202
218
  },
203
219
  };
204
220
  }
@@ -1,29 +1,30 @@
1
1
  {
2
2
  "$schema": "https://jxsuite.com/schema/v1",
3
3
  "$id": "StudioSettingsCssVars",
4
- "$description": "Project Settings › CSS Variables: the project's design tokens, grouped by what they name, each editable in place and each able to carry a different value in any rendering context the project declares. The adapter (`surfaces/settings-css-vars.ts`) hands in the groups already grouped, each token already resolved — its swatch colour, the chip it wears when its value follows another token, the override rows it has and the contexts it could still be given one in — and the document draws them. Nothing here reads `project.json` and nothing here decides what a token IS: `style/project-styles.ts` owns the vocabulary and `settings/css-vars-editor.ts` owns the writes. A context is DEFINED in Contexts and only overridden here, which is why the one thing the colour group says when no scheme exists is where to go and say it.",
4
+ "$description": "The Styles workspace's Variables view, its editor (studio.md §7.1): the project's design tokens, grouped by what they name, each editable in place and each able to carry a different value in any rendering context the project declares. The view's own frame (`surfaces/styles-variables.json`) draws the heading and mounts this document into its `editor` island. The adapter (`surfaces/settings-css-vars.ts`) hands in the groups already grouped, each token already resolved — its swatch colour, the chip it wears when its value follows another token, the override rows it has, the contexts it could still be given one in and whether it is the token the Outline pointed at — and the document draws them. Nothing here reads `project.json` and nothing here decides what a token IS: `style/project-styles.ts` owns the vocabulary and `settings/css-vars-editor.ts` owns the writes. A context is DEFINED in Project Settings › Contexts and only overridden here, which is why the one thing the colour group says when no scheme exists is where to go and say it.",
5
5
  "tagName": "section",
6
6
  "attributes": {
7
7
  "part": "cssvars"
8
8
  },
9
9
  "style": {
10
- "$description": "This section's whole look, keyed on `part`. Six of the rules it used to borrow are gone rather than moved: `.settings-section` never had a rule anywhere (it was on the orphan ledger), and `.css-var-swatch input[type=\"color\"]` plus the two chip spans are drawn here now because the lit helper that emitted them is drawn here now. Every `--spectrum-font-size-*` reference is re-pointed at the kit's scale: a document is mounted in the pane rather than inside `<sp-theme>`, so each of those would have silently taken its hard-coded fallback.",
10
+ "$description": "This section's whole look, keyed on `part`. Six of the rules it used to borrow are gone rather than moved: `.settings-section` never had a rule anywhere (it was on the orphan ledger), and `.css-var-swatch input[type=\"color\"]` plus the two chip spans are drawn here now because the lit helper that emitted them is drawn here now. Every `--spectrum-font-size-*` reference is re-pointed at the kit's scale: a document is mounted in the pane rather than inside `<sp-theme>`, so each of those would have silently taken its hard-coded fallback. Two part names are this document's own on purpose: the colour well is `well` and a font token's specimen is `font-preview`, because `swatch` and `preview` are parts INSIDE `jx-select` (its options' colour chip and its closed-state value), and this section draws a `jx-select` per token. The kit is light DOM, so `& [part=\"preview\"]` reached the Add override picker's own value and gave it this sheet's 108px indent, bottom padding and 13px type: a 36px control under a 20px field. The name column is a fixed width (`--name-col`) so every value field in a group starts at the same x, and the override list indents to that same column rather than to a literal that guessed it.",
11
+ "--name-col": "12rem",
11
12
  "display": "block",
12
- "& [part=\"title\"]": {
13
- "margin": "0 0 16px",
14
- "fontSize": "16px",
15
- "fontWeight": "600",
16
- "color": "var(--fg)"
17
- },
18
13
  "& [part=\"section-error\"]": {
19
14
  "$description": "A write that failed, said under the section title rather than pinned to a control. This section saves on change and the predecessor dropped every rejection on the floor, so a read-only file made each edit look as though it had been taken and then quietly forgotten. It is `section-error` rather than `error` because every text field and select in the section draws a permanent `[part=\"error\"]` of its own in this same light-DOM tree, and a rule on that name would give their refusal sentences this margin and size too.",
20
15
  "margin": "0 0 12px",
21
16
  "fontSize": "var(--jx-text-md)",
22
17
  "color": "var(--danger)"
23
18
  },
24
- "& [part=\"group\"]": {
19
+ "& [part=\"token-group\"]": {
25
20
  "marginBottom": "24px"
26
21
  },
22
+ "& [part=\"token\"][aria-current=\"true\"]": {
23
+ "$description": "The token the Outline pointed the view at: a tinted band with the accent edge the Outline's own selected row wears, so the two say the same thing about one property.",
24
+ "borderRadius": "var(--radius)",
25
+ "background": "var(--accent-20)",
26
+ "boxShadow": "inset 2px 0 0 var(--accent)"
27
+ },
27
28
  "& [part=\"group-title\"]": {
28
29
  "margin": "0 0 8px",
29
30
  "fontSize": "13px",
@@ -39,14 +40,18 @@
39
40
  "padding": "4px 0"
40
41
  },
41
42
  "& [part=\"name\"]": {
43
+ "$description": "A fixed column, not a minimum: with `minWidth` the value field started wherever its name ended, so a long name pushed its field out of line with every field above it. A name longer than the column is cut with an ellipsis and carries its whole self in `title`.",
44
+ "flex": "0 0 var(--name-col)",
45
+ "overflow": "hidden",
46
+ "textOverflow": "ellipsis",
47
+ "whiteSpace": "nowrap",
42
48
  "fontSize": "var(--jx-text-md)",
43
- "color": "var(--fg-dim)",
44
- "minWidth": "100px"
49
+ "color": "var(--fg-dim)"
45
50
  },
46
51
  "& [part=\"swatch-slot\"], & [part=\"chip-slot\"]": {
47
52
  "display": "contents"
48
53
  },
49
- "& [part=\"swatch\"]": {
54
+ "& [part=\"well\"]": {
50
55
  "$description": "The colour well. Its background is the value the token RESOLVES to, so an alias token is a colour rather than a blank square, and the native input over it is transparent — the well is what the reader sees and the input is only what they operate.",
51
56
  "position": "relative",
52
57
  "width": "24px",
@@ -66,15 +71,14 @@
66
71
  "cursor": "pointer"
67
72
  },
68
73
  "& [part=\"value\"]": {
69
- "flex": "1",
74
+ "flex": "0 1 16rem",
70
75
  "minWidth": "0"
71
76
  },
72
77
  "& [data-group=\"color\"] [part=\"value\"]": {
73
- "maxWidth": "160px"
78
+ "flexBasis": "10rem"
74
79
  },
75
80
  "& [data-group=\"size\"] [part=\"value\"]": {
76
- "flex": "none",
77
- "maxWidth": "120px"
81
+ "flexBasis": "8rem"
78
82
  },
79
83
  "& [part=\"chip\"]": {
80
84
  "$description": "A value that is exactly `var(--token)` is a reference, and raw text is the one rendering that hides both which token and what it currently is. The chip says both. It is a span, not a button: it states, it does not navigate. Same border, same size and same radius as the provenance chips in the Inspector, because \"this value comes from somewhere else\" is the same sentence in both places.",
@@ -103,16 +107,20 @@
103
107
  "overflow": "hidden",
104
108
  "textOverflow": "ellipsis"
105
109
  },
106
- "& [part=\"preview\"]": {
107
- "$description": "A font token is the one kind whose value cannot be read: `'Georgia', serif` is a name for a shape, so the shape is drawn. Indented to the value column, because it belongs to the field above it rather than to the section.",
108
- "padding": "4px 0 12px 108px",
110
+ "& [part=\"font-preview\"]": {
111
+ "$description": "A font token is the one kind whose value cannot be read: `'Georgia', serif` is a name for a shape, so the shape is drawn. Indented to the value column (the name column and the gap after it), because it belongs to the field above it rather than to the section.",
112
+ "padding": "4px 0 12px calc(var(--name-col) + 8px)",
109
113
  "fontSize": "13px",
110
114
  "color": "var(--fg-dim)"
111
115
  },
112
116
  "& [part=\"overrides\"]": {
113
- "paddingLeft": "108px",
117
+ "$description": "Indented to the value column: past the name column and its gap, and in the colour group past the well too, so an override value sits under the base value it overrides.",
118
+ "paddingLeft": "calc(var(--name-col) + 8px)",
114
119
  "marginBottom": "8px"
115
120
  },
121
+ "& [data-group=\"color\"] [part=\"overrides\"]": {
122
+ "paddingLeft": "calc(var(--name-col) + 40px)"
123
+ },
116
124
  "& [part=\"override\"]": {
117
125
  "display": "flex",
118
126
  "alignItems": "center",
@@ -138,6 +146,11 @@
138
146
  "alignItems": "center",
139
147
  "padding": "2px 0"
140
148
  },
149
+ "& [part=\"add-picker\"]": {
150
+ "$description": "As compact as the fields beside it: sized to its own label rather than stretched, since it is a verb on the list above it and not a value of its own.",
151
+ "flex": "none",
152
+ "width": "auto"
153
+ },
141
154
  "& [part=\"add\"]": {
142
155
  "display": "flex",
143
156
  "alignItems": "center",
@@ -162,13 +175,6 @@
162
175
  }
163
176
  },
164
177
  "children": [
165
- {
166
- "tagName": "h3",
167
- "attributes": {
168
- "part": "title"
169
- },
170
- "textContent": "CSS Variables"
171
- },
172
178
  {
173
179
  "tagName": "div",
174
180
  "attributes": {
@@ -200,12 +206,12 @@
200
206
  "map": {
201
207
  "tagName": "div",
202
208
  "attributes": {
203
- "part": "group",
209
+ "part": "token-group",
204
210
  "data-group": "${$map.item.id}"
205
211
  },
206
212
  "children": [
207
213
  {
208
- "tagName": "h4",
214
+ "tagName": "h3",
209
215
  "attributes": {
210
216
  "part": "group-title"
211
217
  },
@@ -223,7 +229,8 @@
223
229
  "tagName": "div",
224
230
  "attributes": {
225
231
  "part": "token",
226
- "data-token": "${$map.item.name}"
232
+ "data-token": "${$map.item.name}",
233
+ "aria-current": "${$map.item.current ? 'true' : null}"
227
234
  },
228
235
  "children": [
229
236
  {
@@ -245,7 +252,7 @@
245
252
  "swatch": {
246
253
  "tagName": "div",
247
254
  "attributes": {
248
- "part": "swatch"
255
+ "part": "well"
249
256
  },
250
257
  "style": {
251
258
  "background": {
@@ -290,7 +297,8 @@
290
297
  {
291
298
  "tagName": "span",
292
299
  "attributes": {
293
- "part": "name"
300
+ "part": "name",
301
+ "title": "${$map.item.label}"
294
302
  },
295
303
  "textContent": "${$map.item.label}"
296
304
  },
@@ -433,7 +441,7 @@
433
441
  "font": {
434
442
  "tagName": "div",
435
443
  "attributes": {
436
- "part": "preview"
444
+ "part": "font-preview"
437
445
  },
438
446
  "style": {
439
447
  "fontFamily": {
@@ -498,7 +506,7 @@
498
506
  "swatch": {
499
507
  "tagName": "div",
500
508
  "attributes": {
501
- "part": "swatch"
509
+ "part": "well"
502
510
  },
503
511
  "style": {
504
512
  "background": {
@@ -788,7 +796,7 @@
788
796
  "children": [
789
797
  {
790
798
  "tagName": "span",
791
- "textContent": "No colour scheme is defined yet, so these tokens have one value each."
799
+ "textContent": "No color scheme is defined yet, so these tokens have one value each."
792
800
  },
793
801
  {
794
802
  "tagName": "jx-action-button",
@@ -797,7 +805,7 @@
797
805
  },
798
806
  "$props": {
799
807
  "size": "sm",
800
- "hint": "Define a colour scheme in Project Settings › Contexts"
808
+ "hint": "Define a color scheme in Project Settings › Contexts"
801
809
  },
802
810
  "onclick": {
803
811
  "$ref": "#/state/manageContexts"
@@ -1,6 +1,8 @@
1
1
  /// <reference lib="dom" />
2
2
  /**
3
- * The CSS Variables settings section, as a mounted document.
3
+ * The CSS Variables editor, as a mounted document: the body of the Styles workspace's Variables
4
+ * view (`surfaces/styles-variables.json` is its frame). The file keeps the `settings-` name it had
5
+ * while the editor was a Project Settings section.
4
6
  *
5
7
  * `settings/css-vars-editor.ts` is the flow — it reads the project's root style block, decides what
6
8
  * an edit writes and pushes the result at every live canvas — and this is the surface it draws
@@ -19,11 +21,11 @@
19
21
  * inventing one to be photographed is what the screenshot policy forbids. It is the one place a
20
22
  * document reaches past the kit, and it reaches for a platform element rather than a Spectrum one.
21
23
  *
22
- * **Keyed by host, not by module.** Project Settings is a pane document and a pane can be split, so
23
- * two containers may be showing this section at once; a single module-level mount would take the
24
+ * **Keyed by host, not by module.** The Variables view is a pane document and a pane can be split,
25
+ * so two containers may be showing this section at once; a single module-level mount would take the
24
26
  * first one's surface away from it the moment the second drew.
25
27
  *
26
- * @docs studio/projects/settings
28
+ * @docs studio/design/tokens
27
29
  */
28
30
 
29
31
  import { reactive } from "../reactivity";
@@ -60,6 +62,8 @@ export interface OverrideRowView {
60
62
  export interface TokenRowView {
61
63
  /** The custom property. The row's key, and every handler's first argument. */
62
64
  name: string;
65
+ /** Whether this is the token the Outline pointed the view at. Drawn as `aria-current`. */
66
+ current: boolean;
63
67
  label: string;
64
68
  value: string;
65
69
  removeLabel: string;
@@ -190,3 +194,72 @@ export function renderCssVarsSurface(
190
194
  record.handle = handle;
191
195
  });
192
196
  }
197
+
198
+ /**
199
+ * Bring one token's row on screen and put the keyboard on its value.
200
+ *
201
+ * The adapter's half of pointing the editor at a token: the flow marks the row through the scope
202
+ * (`current`), and only the surface knows where the row it draws is. It waits a turn, because the
203
+ * mark is a scope write and the row it marks is drawn by the binding that write schedules, and it
204
+ * searches the mounted root as it stands then, so a section redrawn since the call is the one
205
+ * searched. A host with no surface, or a name with no row, moves nothing.
206
+ *
207
+ * @param {HTMLElement} host The section container the editor was rendered into.
208
+ * @param {string} name A custom property, `--accent`.
209
+ */
210
+ export function revealCssVarsToken(host: HTMLElement, name: string): void {
211
+ const record = mounts.get(host);
212
+ if (!record) {
213
+ return;
214
+ }
215
+ setTimeout(() => {
216
+ const root = record.handle?.root;
217
+ if (!(root instanceof HTMLElement) || !root.isConnected) {
218
+ return;
219
+ }
220
+ const row = [...root.querySelectorAll<HTMLElement>('[part="token"]')].find(
221
+ (candidate) => candidate.dataset["token"] === name,
222
+ );
223
+ if (!row) {
224
+ return;
225
+ }
226
+ row.scrollIntoView({ behavior: "smooth", block: "nearest" });
227
+ // The NATIVE input: the kit's text field does not delegate focus from its host.
228
+ row.querySelector<HTMLElement>('[part="value"] input')?.focus();
229
+ }, 0);
230
+ }
231
+
232
+ /**
233
+ * Bring one group's heading on screen, and with `add` put the keyboard on its Add row's name field.
234
+ *
235
+ * The Styles panel's group headings and its "Add variable" land here. It waits a turn for the
236
+ * reason {@link revealCssVarsToken} does. A host with no surface, or a group the section does not
237
+ * draw (an empty Other), moves nothing.
238
+ *
239
+ * @param {HTMLElement} host The section container the editor was rendered into.
240
+ * @param {string} group A token group id: `color`, `font`, `size` or `other`.
241
+ * @param {boolean} add Whether to focus the group's Add row.
242
+ */
243
+ export function revealCssVarsGroup(host: HTMLElement, group: string, add: boolean): void {
244
+ const record = mounts.get(host);
245
+ if (!record) {
246
+ return;
247
+ }
248
+ setTimeout(() => {
249
+ const root = record.handle?.root;
250
+ if (!(root instanceof HTMLElement) || !root.isConnected) {
251
+ return;
252
+ }
253
+ const section = [...root.querySelectorAll<HTMLElement>("[data-group]")].find(
254
+ (candidate) => candidate.dataset["group"] === group,
255
+ );
256
+ if (!section) {
257
+ return;
258
+ }
259
+ section.scrollIntoView({ behavior: "smooth", block: "start" });
260
+ if (add) {
261
+ // The NATIVE input, for the reason `revealCssVarsToken` gives.
262
+ section.querySelector<HTMLElement>('[part="add-name"] input')?.focus();
263
+ }
264
+ }, 0);
265
+ }