@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
@@ -0,0 +1,4 @@
1
+ import{tt,v$,Wb,y$,Ko,gC,xi,Xs,Vb,w$}from"./studio-x9hsze61.js";import"./studio-k3xxbagr.js";import"./studio-q7rtx6zq.js";import"./studio-8tr6cfrc.js";import"./studio-43sd2mam.js";import"./studio-nqxqf8p2.js";export{Vb as clearLayerSlot,Xs as getLayerSlot,v$ as initLayers,Wb as isModalOpen,y$ as isPopoverOpen,tt as layerHost,w$ as overlayIdleBlockers,Ko as showConfirmDialog,xi as showPromptDialog,gC as showSaveDiscardDialog};
2
+
3
+ //# debugId=0276DB44A812559B64756E2164756E21
4
+ //# sourceMappingURL=layers-bgyr11tr.js.map
@@ -0,0 +1,4 @@
1
+ import{S2,Ok}from"./studio-ed1hp6zf.js";import"./studio-58xg6j2q.js";import"./studio-3qqjeep5.js";import"./studio-zat62m0c.js";import"./studio-mn0476ag.js";import"./studio-ccv2svc6.js";import"./studio-07rcfje3.js";import"./studio-wys23mxz.js";import"./studio-pbxa5fpc.js";import"./studio-8vcvfs7r.js";import"./studio-n0c5h6mf.js";import"./studio-9tmebf0s.js";import"./studio-q0tccd43.js";import"./studio-3qeh9t0h.js";import"./studio-y0n7yxea.js";import"./studio-3e54qh39.js";import"./studio-5g0rprdt.js";import"./studio-rj9eamf8.js";import"./studio-fbhxxc5f.js";import"./studio-d5grtb9e.js";import"./studio-nh6d342n.js";import"./studio-3exxhz5g.js";import"./studio-ph84avkf.js";import"./studio-4hp8pkyt.js";import"./studio-s32578pn.js";import"./studio-x9hsze61.js";import"./studio-k3xxbagr.js";import"./studio-q7rtx6zq.js";import"./studio-r5qy30vx.js";import"./studio-fyh0jc96.js";import"./studio-8m0y2qe7.js";import"./studio-c05wdnt3.js";import"./studio-kt3pjkwd.js";import"./studio-8tr6cfrc.js";import"./studio-43sd2mam.js";import"./studio-nqxqf8p2.js";import"./studio-z97c48fk.js";import"./studio-w4rz9hdk.js";import"./studio-k1wvtp03.js";export{Ok as registerLayersPanel,S2 as startLayerTitleEdit};
2
+
3
+ //# debugId=97975D17FE1853C664756E2164756E21
4
+ //# sourceMappingURL=layers-panel-7ez66zeq.js.map
@@ -1,4 +1,4 @@
1
- import{t}from"./iframe-entry-fvbk89gm.js";var c="jx-option",u="jx-listbox";function a(i){return[...i.querySelectorAll(c)].filter((e)=>e.closest(u)===i)}function s(i,e){let n=null,o=!1;for(let l of a(i)){let r=e!==""&&l.id===e;if(r)n=l,o=l.selected!==!0;if(l.selected!==r)l.selected=r}if(n&&o&&t(n.scrollIntoView))n.scrollIntoView({block:"nearest"});return n}function b(i,e){s(e,String(i.active??""));let n=null,o=()=>{if(n!==null)return;n=requestAnimationFrame(()=>{if(n=null,e.isConnected)s(e,String(i.active??""))})};new MutationObserver(()=>{if(t(globalThis.requestAnimationFrame))o();else s(e,String(i.active??""))}).observe(e,{attributeFilter:["data-active"],attributes:!0,childList:!0,subtree:!0})}export{b as mountListbox,a as optionsOf,s as syncListbox};
1
+ import{t}from"./iframe-entry-99nr5zfb.js";var c="jx-option",u="jx-listbox";function a(i){return[...i.querySelectorAll(c)].filter((e)=>e.closest(u)===i)}function s(i,e){let n=null,o=!1;for(let l of a(i)){let r=e!==""&&l.id===e;if(r)n=l,o=l.selected!==!0;if(l.selected!==r)l.selected=r}if(n&&o&&t(n.scrollIntoView))n.scrollIntoView({block:"nearest"});return n}function b(i,e){s(e,String(i.active??""));let n=null,o=()=>{if(n!==null)return;n=requestAnimationFrame(()=>{if(n=null,e.isConnected)s(e,String(i.active??""))})};new MutationObserver(()=>{if(t(globalThis.requestAnimationFrame))o();else s(e,String(i.active??""))}).observe(e,{attributeFilter:["data-active"],attributes:!0,childList:!0,subtree:!0})}export{b as mountListbox,a as optionsOf,s as syncListbox};
2
2
 
3
3
  //# debugId=8B09FB3F45C9053064756E2164756E21
4
- //# sourceMappingURL=listbox-e74qjyq6.js.map
4
+ //# sourceMappingURL=listbox-c421cf8c.js.map
@@ -0,0 +1,4 @@
1
+ import{qr,Jc,mt,x$,io}from"./studio-k3xxbagr.js";export{x$ as _$LH,qr as html,Jc as noChange,mt as nothing,io as render};
2
+
3
+ //# debugId=D734930A4B614EE164756E2164756E21
4
+ //# sourceMappingURL=lit-html-v9gh687x.js.map
@@ -0,0 +1,4 @@
1
+ import{Q2,ww,N2,hS,xw,LT,$T,A2,eP,tP,pS,nP,IT}from"./studio-qwdqwkj0.js";import"./studio-8vcvfs7r.js";import"./studio-n0c5h6mf.js";import"./studio-x1x167jh.js";import"./studio-9tmebf0s.js";import"./studio-q0tccd43.js";import"./studio-3qeh9t0h.js";import"./studio-y0n7yxea.js";import"./studio-3e54qh39.js";import"./studio-5g0rprdt.js";import"./studio-rj9eamf8.js";import"./studio-fbhxxc5f.js";import"./studio-d5grtb9e.js";import"./studio-nh6d342n.js";import"./studio-3exxhz5g.js";import"./studio-ph84avkf.js";import"./studio-4hp8pkyt.js";import"./studio-s32578pn.js";import"./studio-x9hsze61.js";import"./studio-k3xxbagr.js";import"./studio-q7rtx6zq.js";import"./studio-r5qy30vx.js";import"./studio-fyh0jc96.js";import"./studio-8m0y2qe7.js";import"./studio-c05wdnt3.js";import"./studio-kt3pjkwd.js";import"./studio-8tr6cfrc.js";import"./studio-43sd2mam.js";import"./studio-nqxqf8p2.js";import"./studio-z97c48fk.js";import"./studio-w4rz9hdk.js";export{Q2 as MEDIA_HOME_MODE,A2 as applyMediaBrowse,pS as closeMediaPickDialog,N2 as deleteMediaFile,xw as detachMediaLibrary,$T as focusMediaHome,hS as mediaLibraryMounted,nP as openMediaPickDialog,LT as renderMediaLibrary,tP as requestMediaReplace,eP as requestMediaUpload,IT as resetMediaLibrary,ww as selectedEntry};
2
+
3
+ //# debugId=4BDA9C7EB25EF86164756E2164756E21
4
+ //# sourceMappingURL=media-library-sq468wts.js.map
@@ -0,0 +1,4 @@
1
+ import{DT,NT,Uu,kw,O2,gS,M2,bS,Hl,pm}from"./studio-n0c5h6mf.js";import"./studio-9tmebf0s.js";import"./studio-3exxhz5g.js";import"./studio-ph84avkf.js";import"./studio-x9hsze61.js";import"./studio-k3xxbagr.js";import"./studio-q7rtx6zq.js";import"./studio-fyh0jc96.js";import"./studio-8m0y2qe7.js";import"./studio-c05wdnt3.js";import"./studio-kt3pjkwd.js";import"./studio-8tr6cfrc.js";import"./studio-43sd2mam.js";import"./studio-nqxqf8p2.js";import"./studio-z97c48fk.js";import"./studio-w4rz9hdk.js";export{kw as invalidateMediaCache,DT as isMediaScanPath,Hl as mountMediaPicker,NT as onProjectMediaChange,O2 as openFullMediaPicker,bS as pickAndUpload,Uu as projectMediaFiles,gS as showMediaPickerPopover,pm as unmountMediaPicker,M2 as uploadAndAssign};
2
+
3
+ //# debugId=7B4F1E225769872264756E2164756E21
4
+ //# sourceMappingURL=media-picker-shfe59pt.js.map
@@ -1,4 +1,4 @@
1
- import{p,y,a,E}from"./iframe-entry-zap785cw.js";import{t}from"./iframe-entry-fvbk89gm.js";var M="jx-menu-item",s="jx-menu",L="inline-end span-block-end";function g(e){let n=e.currentTarget;return n instanceof HTMLElement&&n.localName===s?n:null}function H(e,n){return n instanceof Element&&n.closest(s)===e}function c(e,n={}){let o=[...e.querySelectorAll(M)].filter((r)=>r.closest(s)===e);return n.includeDisabled?o:o.filter((r)=>r.getAttribute("aria-disabled")!=="true")}function b(e){for(let n of e.querySelectorAll(s))if(n.parentElement?.closest(M)===e)return n;return null}function f(e){return e.parentElement?.closest(M)??null}function h(e){let n=e;for(;;){let o=f(n),r=o?.closest(s);if(!o||!(r instanceof HTMLElement))return n;n=r}}function w(e){return e.open===!0}function R(e,n){if(!w(e))a(e,n??null)}function m(e){if(w(e)&&t(e.hidePopover))e.hidePopover()}function i(e,n){if(e.length===0)return null;let o=(n%e.length+e.length)%e.length;for(let[l,u]of e.entries())u.tabIndex=l===o?0:-1;let r=e[o];return r.focus(),r}function S(e,n){return e.findIndex((o)=>o===n||n instanceof Node&&o.contains(n))}function T(e,n={}){let o=b(e);if(!o)return null;let r=e.getBoundingClientRect();if(o.x=Math.round(r.right)-2,o.y=Math.round(r.top)-4,e.expanded=!0,R(o,e),n.focus)i(c(o),0);return o}function x(e,n=null){for(let o of c(e,{includeDisabled:!0})){if(o===n)continue;let r=b(o);if(r)m(r)}}function k(e){return e.querySelector('[part="label"]')?.textContent??e.textContent}function A(e,n,o){let r=e.map((l)=>k(l).trim().toLowerCase());for(let l=1;l<=r.length;l++){let u=(n+l)%r.length;if(r[u].startsWith(o))return u}return-1}function O(e){return e.key.length===1&&!e.ctrlKey&&!e.metaKey&&!e.altKey?e.key.toLowerCase():null}function K(e,n){let o=g(n);if(!o||!H(o,n.target))return;let r=c(o),l=S(r,n.target);switch(n.key){case"ArrowDown":{i(r,l+1);break}case"ArrowUp":{i(r,l===-1?-1:l-1);break}case"Home":{i(r,0);break}case"End":{i(r,-1);break}case"Enter":case" ":{r[l]?.click();break}case"ArrowRight":{let u=r[l];if(!u||!b(u))return;x(o,u),T(u,{focus:!0});break}case"ArrowLeft":{let u=f(o);if(!u)return;m(o),u.focus();break}case"Escape":{let u=f(o);m(o),u?.focus();break}case"Tab":{m(h(o));break}default:{let u=O(n);if(u===null)return;let d=A(r,l,u);if(d===-1)return;i(r,d)}}n.preventDefault(),n.stopPropagation()}function P(e,n){let o=g(n);if(!o)return;let r="newState"in n&&n.newState==="open",l=String(e.placement??"")||(f(o)?L:"");e.area=l;let u="source"in n?n.source:null,d=u instanceof Element?u:y(o);e.anchored=r&&l!==""&&d!==null&&!C(o)}function I(e,n){let o=g(n);if(!o)return;let r="newState"in n&&n.newState==="open";e.open=r;let l=f(o);if(!r){if(x(o),l)l.expanded=!1;return}if(!(e.anchored===!0&&p()))E(e,o,{flipAgainst:l?.closest(s)??null,floor:N(o)});if(!o.contains(document.activeElement))i(c(o),0)}function C(e){return Number(h(e).floor??0)>0}function N(e){let n=Number(h(e).floor??0);return n>0?n:window.innerHeight}function U(e){if(e.contains(document.activeElement))return;let n=e;for(;;){let r=c(n,{includeDisabled:!0}).map((l)=>b(l)).find((l)=>l!==null&&w(l));if(!r)break;n=r}let o=f(n);if(c(n).length===0&&o){m(n),o.focus();return}i(c(n),0)}function q(e,n){let o=g(n);if(!o||!(n.target instanceof Element))return;let r=n.target.closest(M);if(!r||r.closest(s)!==o)return;let l=b(r);if(x(o,r),l&&!w(l)&&r.getAttribute("aria-disabled")!=="true")T(r)}export{L as SUBMENU_PLACEMENT,E as clampIntoViewport,U as ensureCaret,i as focusRow,m as hideMenu,P as onMenuBeforeToggle,K as onMenuKeydown,q as onMenuPointerOver,I as onMenuToggle,T as openSubmenu,f as parentRowOf,h as rootMenuOf,c as rowsOf,R as showMenu,b as submenuOf};
1
+ import{p,y,a,E}from"./iframe-entry-76j8vwwx.js";import{t}from"./iframe-entry-99nr5zfb.js";var M="jx-menu-item",s="jx-menu",L="inline-end span-block-end";function g(e){let n=e.currentTarget;return n instanceof HTMLElement&&n.localName===s?n:null}function H(e,n){return n instanceof Element&&n.closest(s)===e}function c(e,n={}){let o=[...e.querySelectorAll(M)].filter((r)=>r.closest(s)===e);return n.includeDisabled?o:o.filter((r)=>r.getAttribute("aria-disabled")!=="true")}function b(e){for(let n of e.querySelectorAll(s))if(n.parentElement?.closest(M)===e)return n;return null}function f(e){return e.parentElement?.closest(M)??null}function h(e){let n=e;for(;;){let o=f(n),r=o?.closest(s);if(!o||!(r instanceof HTMLElement))return n;n=r}}function w(e){return e.open===!0}function R(e,n){if(!w(e))a(e,n??null)}function m(e){if(w(e)&&t(e.hidePopover))e.hidePopover()}function i(e,n){if(e.length===0)return null;let o=(n%e.length+e.length)%e.length;for(let[l,u]of e.entries())u.tabIndex=l===o?0:-1;let r=e[o];return r.focus(),r}function S(e,n){return e.findIndex((o)=>o===n||n instanceof Node&&o.contains(n))}function T(e,n={}){let o=b(e);if(!o)return null;let r=e.getBoundingClientRect();if(o.x=Math.round(r.right)-2,o.y=Math.round(r.top)-4,e.expanded=!0,R(o,e),n.focus)i(c(o),0);return o}function x(e,n=null){for(let o of c(e,{includeDisabled:!0})){if(o===n)continue;let r=b(o);if(r)m(r)}}function k(e){return e.querySelector('[part="label"]')?.textContent??e.textContent}function A(e,n,o){let r=e.map((l)=>k(l).trim().toLowerCase());for(let l=1;l<=r.length;l++){let u=(n+l)%r.length;if(r[u].startsWith(o))return u}return-1}function O(e){return e.key.length===1&&!e.ctrlKey&&!e.metaKey&&!e.altKey?e.key.toLowerCase():null}function K(e,n){let o=g(n);if(!o||!H(o,n.target))return;let r=c(o),l=S(r,n.target);switch(n.key){case"ArrowDown":{i(r,l+1);break}case"ArrowUp":{i(r,l===-1?-1:l-1);break}case"Home":{i(r,0);break}case"End":{i(r,-1);break}case"Enter":case" ":{r[l]?.click();break}case"ArrowRight":{let u=r[l];if(!u||!b(u))return;x(o,u),T(u,{focus:!0});break}case"ArrowLeft":{let u=f(o);if(!u)return;m(o),u.focus();break}case"Escape":{let u=f(o);m(o),u?.focus();break}case"Tab":{m(h(o));break}default:{let u=O(n);if(u===null)return;let d=A(r,l,u);if(d===-1)return;i(r,d)}}n.preventDefault(),n.stopPropagation()}function P(e,n){let o=g(n);if(!o)return;let r="newState"in n&&n.newState==="open",l=String(e.placement??"")||(f(o)?L:"");e.area=l;let u="source"in n?n.source:null,d=u instanceof Element?u:y(o);e.anchored=r&&l!==""&&d!==null&&!C(o)}function I(e,n){let o=g(n);if(!o)return;let r="newState"in n&&n.newState==="open";e.open=r;let l=f(o);if(!r){if(x(o),l)l.expanded=!1;return}if(!(e.anchored===!0&&p()))E(e,o,{flipAgainst:l?.closest(s)??null,floor:N(o)});if(!o.contains(document.activeElement))i(c(o),0)}function C(e){return Number(h(e).floor??0)>0}function N(e){let n=Number(h(e).floor??0);return n>0?n:window.innerHeight}function U(e){if(e.contains(document.activeElement))return;let n=e;for(;;){let r=c(n,{includeDisabled:!0}).map((l)=>b(l)).find((l)=>l!==null&&w(l));if(!r)break;n=r}let o=f(n);if(c(n).length===0&&o){m(n),o.focus();return}i(c(n),0)}function q(e,n){let o=g(n);if(!o||!(n.target instanceof Element))return;let r=n.target.closest(M);if(!r||r.closest(s)!==o)return;let l=b(r);if(x(o,r),l&&!w(l)&&r.getAttribute("aria-disabled")!=="true")T(r)}export{L as SUBMENU_PLACEMENT,E as clampIntoViewport,U as ensureCaret,i as focusRow,m as hideMenu,P as onMenuBeforeToggle,K as onMenuKeydown,q as onMenuPointerOver,I as onMenuToggle,T as openSubmenu,f as parentRowOf,h as rootMenuOf,c as rowsOf,R as showMenu,b as submenuOf};
2
2
 
3
3
  //# debugId=75513AE9CBFF72A264756E2164756E21
4
- //# sourceMappingURL=menu-n6yzswmy.js.map
4
+ //# sourceMappingURL=menu-bdpzbfvs.js.map
@@ -1,4 +1,4 @@
1
- import"./studio-m0q32ars.js";import{_w,tm}from"./studio-bw6q5xjf.js";import{i}from"./studio-cffqvnzd.js";function I(f){let{doc:s}=f;if(!s)throw Error("bindMonacoToYText: the Y.Text has no Y.Doc — nothing to sync against");return s}function F(f){let{awareness:s=null,model:n,origin:E,text:l}=f,h=[...f.editors??[]],d=I(l),b=!1;function x(t){if(b)return;b=!0;try{t()}finally{b=!1}}let m=new Map,u=new Map;function S(t){let e=t.getSelection();if(!e)return null;return{anchor:_w(l,n.getOffsetAt({column:e.selectionStartColumn,lineNumber:e.selectionStartLineNumber})),head:_w(l,n.getOffsetAt({column:e.positionColumn,lineNumber:e.positionLineNumber}))}}function L(t,e){let o=tm(e.anchor,d),r=tm(e.head,d);if(!o||!r||o.type!==l||r.type!==l)return;let c=n.getPositionAt(o.index),a=n.getPositionAt(r.index);t.setSelection({positionColumn:a.column,positionLineNumber:a.lineNumber,selectionStartColumn:c.column,selectionStartLineNumber:c.lineNumber})}function M(){let t=[];if(!s)return t;for(let[e,o]of s.getStates()){if(e===s.clientID)continue;let{selection:r}=o??{};if(!r?.anchor||!r.head)continue;let c=tm(r.anchor,d),a=tm(r.head,d);if(!c||!a||c.type!==l||a.type!==l)continue;let v=c.index<a.index,Y=n.getPositionAt(v?c.index:a.index),A=n.getPositionAt(v?a.index:c.index),w=`yRemoteSelectionHead yRemoteSelectionHead-${e}`;t.push({options:{className:`yRemoteSelection yRemoteSelection-${e}`,...v?{afterContentClassName:w}:{beforeContentClassName:w}},range:{endColumn:A.column,endLineNumber:A.lineNumber,startColumn:Y.column,startLineNumber:Y.lineNumber}})}return t}function g(){if(!s)return;let t=M();for(let e of h){if(e.getModel()!==n){u.get(e)?.clear();continue}let o=u.get(e);if(!o)o=e.createDecorationsCollection(),u.set(e,o);o.set(t)}}function C(){x(()=>{m=new Map;for(let t of h){if(t.getModel()!==n)continue;let e=S(t);if(e)m.set(t,e)}})}function y(t){x(()=>{let e=0;for(let o of t.delta){if(o.retain!==void 0){e+=o.retain;continue}if(o.delete!==void 0){let c=n.getPositionAt(e),a=n.getPositionAt(e+o.delete);n.applyEdits([{range:{endColumn:a.column,endLineNumber:a.lineNumber,startColumn:c.column,startLineNumber:c.lineNumber},text:""}]);continue}if(!i(o.insert))throw TypeError("bindMonacoToYText: unsupported Y.Text delta op — a text buffer can only apply "+"string inserts");let r=n.getPositionAt(e);n.applyEdits([{range:{endColumn:r.column,endLineNumber:r.lineNumber,startColumn:r.column,startLineNumber:r.lineNumber},text:o.insert}]),e+=o.insert.length}for(let[o,r]of m)L(o,r)}),g()}function R(t){x(()=>{d.transact(()=>{for(let e of[...t.changes].toSorted((o,r)=>r.rangeOffset-o.rangeOffset))l.delete(e.rangeOffset,e.rangeLength),l.insert(e.rangeOffset,e.text)},E)})}let p=[],N=!1;function T(){if(N)return;N=!0;for(let t of p)t.dispose();p.length=0,l.unobserve(y),d.off("beforeAllTransactions",C);for(let t of u.values())t.clear();if(u.clear(),m.clear(),s)s.off("change",g),s.setLocalStateField("selection",null)}d.on("beforeAllTransactions",C),l.observe(y);let P=l.toString();if(n.getValue()!==P)n.setValue(P);if(p.push(n.onDidChangeContent(R),n.onWillDispose(T)),s){for(let t of h)p.push(t.onDidChangeCursorSelection(()=>{if(t.getModel()!==n)return;let e=S(t);if(e)s.setLocalStateField("selection",e)}));s.on("change",g),g()}return T}export{F as bindMonacoToYText};
1
+ import"./studio-80jyh1xh.js";import{Q0,Ng}from"./studio-83mk4bgg.js";import{n}from"./studio-vxq7fcvv.js";function I(f){let{doc:s}=f;if(!s)throw Error("bindMonacoToYText: the Y.Text has no Y.Doc — nothing to sync against");return s}function F(f){let{awareness:s=null,model:i,origin:E,text:l}=f,h=[...f.editors??[]],d=I(l),b=!1;function x(t){if(b)return;b=!0;try{t()}finally{b=!1}}let m=new Map,u=new Map;function S(t){let e=t.getSelection();if(!e)return null;return{anchor:Q0(l,i.getOffsetAt({column:e.selectionStartColumn,lineNumber:e.selectionStartLineNumber})),head:Q0(l,i.getOffsetAt({column:e.positionColumn,lineNumber:e.positionLineNumber}))}}function L(t,e){let o=Ng(e.anchor,d),r=Ng(e.head,d);if(!o||!r||o.type!==l||r.type!==l)return;let c=i.getPositionAt(o.index),a=i.getPositionAt(r.index);t.setSelection({positionColumn:a.column,positionLineNumber:a.lineNumber,selectionStartColumn:c.column,selectionStartLineNumber:c.lineNumber})}function M(){let t=[];if(!s)return t;for(let[e,o]of s.getStates()){if(e===s.clientID)continue;let{selection:r}=o??{};if(!r?.anchor||!r.head)continue;let c=Ng(r.anchor,d),a=Ng(r.head,d);if(!c||!a||c.type!==l||a.type!==l)continue;let v=c.index<a.index,Y=i.getPositionAt(v?c.index:a.index),A=i.getPositionAt(v?a.index:c.index),w=`yRemoteSelectionHead yRemoteSelectionHead-${e}`;t.push({options:{className:`yRemoteSelection yRemoteSelection-${e}`,...v?{afterContentClassName:w}:{beforeContentClassName:w}},range:{endColumn:A.column,endLineNumber:A.lineNumber,startColumn:Y.column,startLineNumber:Y.lineNumber}})}return t}function g(){if(!s)return;let t=M();for(let e of h){if(e.getModel()!==i){u.get(e)?.clear();continue}let o=u.get(e);if(!o)o=e.createDecorationsCollection(),u.set(e,o);o.set(t)}}function C(){x(()=>{m=new Map;for(let t of h){if(t.getModel()!==i)continue;let e=S(t);if(e)m.set(t,e)}})}function y(t){x(()=>{let e=0;for(let o of t.delta){if(o.retain!==void 0){e+=o.retain;continue}if(o.delete!==void 0){let c=i.getPositionAt(e),a=i.getPositionAt(e+o.delete);i.applyEdits([{range:{endColumn:a.column,endLineNumber:a.lineNumber,startColumn:c.column,startLineNumber:c.lineNumber},text:""}]);continue}if(!n(o.insert))throw TypeError("bindMonacoToYText: unsupported Y.Text delta op — a text buffer can only apply "+"string inserts");let r=i.getPositionAt(e);i.applyEdits([{range:{endColumn:r.column,endLineNumber:r.lineNumber,startColumn:r.column,startLineNumber:r.lineNumber},text:o.insert}]),e+=o.insert.length}for(let[o,r]of m)L(o,r)}),g()}function R(t){x(()=>{d.transact(()=>{for(let e of[...t.changes].toSorted((o,r)=>r.rangeOffset-o.rangeOffset))l.delete(e.rangeOffset,e.rangeLength),l.insert(e.rangeOffset,e.text)},E)})}let p=[],N=!1;function T(){if(N)return;N=!0;for(let t of p)t.dispose();p.length=0,l.unobserve(y),d.off("beforeAllTransactions",C);for(let t of u.values())t.clear();if(u.clear(),m.clear(),s)s.off("change",g),s.setLocalStateField("selection",null)}d.on("beforeAllTransactions",C),l.observe(y);let P=l.toString();if(i.getValue()!==P)i.setValue(P);if(p.push(i.onDidChangeContent(R),i.onWillDispose(T)),s){for(let t of h)p.push(t.onDidChangeCursorSelection(()=>{if(t.getModel()!==i)return;let e=S(t);if(e)s.setLocalStateField("selection",e)}));s.on("change",g),g()}return T}export{F as bindMonacoToYText};
2
2
 
3
- //# debugId=BB743B65C422B81464756E2164756E21
4
- //# sourceMappingURL=monaco-binding-7gx83x3r.js.map
3
+ //# debugId=0780C1CD72ED766A64756E2164756E21
4
+ //# sourceMappingURL=monaco-binding-vq1hgnn0.js.map
@@ -0,0 +1,4 @@
1
+ import{Gp,fv,mv,J$,Xd,Kp,Qd,Jp}from"./studio-kt3pjkwd.js";import"./studio-43sd2mam.js";export{Gp as BUFFER_COMMIT,Xd as bufferIsLive,Kp as bufferMovedOn,fv as bufferWrites,J$ as cancelBufferWrites,mv as commitBufferWrites,Qd as commitTabBuffers,Jp as tabBufferUnsaved};
2
+
3
+ //# debugId=5AC57D3D529AD0BD64756E2164756E21
4
+ //# sourceMappingURL=monaco-buffer-3afgwvbp.js.map
@@ -0,0 +1,4 @@
1
+ import{jf,we}from"./studio-rthyg42z.js";import{ad}from"./studio-zz9qe3rw.js";import"./studio-k1wvtp03.js";import{Jx,Yx}from"./studio-881z1xrx.js";import{Zx}from"./studio-jcnsdaep.js";import{n,v}from"./studio-vxq7fcvv.js";import{le}from"./studio-qgh13jtz.js";var y="__monacoFindWidgetTabIndexPatchApplied",m="__monacoFindWidgetOriginalTabIndex";function z(o,e){let i=o?._domNode;if(!i)return;let a=i.querySelectorAll('input, textarea, [tabindex], [role="button"], [role="checkbox"]');for(let r of a){if(!(r instanceof HTMLElement))continue;if(e){if(!(m in r.dataset))continue;let t=r.dataset[m];if(t==="")r.removeAttribute("tabindex");else r.tabIndex=Number(t);delete r.dataset[m]}else{if(!(m in r.dataset))r.dataset[m]=r.getAttribute("tabindex")??"";r.tabIndex=-1}}}if(!ad[y]){let o=ad.prototype._reveal,e=ad.prototype._hide;ad.prototype._reveal=function(...i){o.apply(this,i),z(this,!0)},ad.prototype._hide=function(...i){e.apply(this,i),z(this,!1)},ad[y]=!0}class L{constructor(o,e,i){this._onDidChange=new jf,this._languageId=o,this.setDiagnosticsOptions(e),this.setModeConfiguration(i)}get onDidChange(){return this._onDidChange.event}get languageId(){return this._languageId}get modeConfiguration(){return this._modeConfiguration}get diagnosticsOptions(){return this._diagnosticsOptions}setDiagnosticsOptions(o){this._diagnosticsOptions=o||Object.create(null),this._onDidChange.fire(this)}setModeConfiguration(o){this._modeConfiguration=o||Object.create(null),this._onDidChange.fire(this)}}var T={validate:!0,allowComments:!0,schemas:[],enableSchemaRequest:!1,schemaRequest:"warning",schemaValidation:"warning",comments:"error",trailingCommas:"error"},E={documentFormattingEdits:!0,documentRangeFormattingEdits:!0,completionItems:!0,hovers:!0,documentSymbols:!0,tokens:!0,colors:!0,foldingRanges:!0,diagnostics:!0,selectionRanges:!0},b=new L("json",T,E);function F(){return le("njkvsa02"),import("./jsonMode-njkvsa02.js")}we.register({id:"json",extensions:[".json",".bowerrc",".jshintrc",".jscsrc",".eslintrc",".babelrc",".har"],aliases:["JSON","json"],mimetypes:["application/json"]});we.onLanguage("json",()=>{F().then((o)=>o.setupMode(b))});var C={},f={};class x{static getOrCreate(o){if(!f[o])f[o]=new x(o);return f[o]}constructor(o){this._languageId=o,this._loadingTriggered=!1,this._lazyLoadPromise=new Promise((e,i)=>{this._lazyLoadPromiseResolve=e,this._lazyLoadPromiseReject=i})}load(){if(!this._loadingTriggered)this._loadingTriggered=!0,C[this._languageId].loader().then((o)=>this._lazyLoadPromiseResolve(o),(o)=>this._lazyLoadPromiseReject(o));return this._lazyLoadPromise}}function M(o){let e=o.id;C[e]=o,we.register(o);let i=x.getOrCreate(e);we.registerTokensProviderFactory(e,{create:async()=>(await i.load()).language}),we.onLanguageEncountered(e,async()=>{let a=await i.load();we.setLanguageConfiguration(e,a.conf)})}M({id:"javascript",extensions:[".js",".es6",".jsx",".mjs",".cjs"],firstLine:"^#!.*\\bnode",filenames:["jakefile"],aliases:["JavaScript","javascript","js"],mimetypes:["text/javascript"],loader:()=>(le("pjp734q4"),import("./javascript-pjp734q4.js"))});var W=["additionalItems","additionalProperties","contains","contentSchema","else","if","items","not","propertyNames","then","unevaluatedItems","unevaluatedProperties"],O=["$defs","definitions","dependencies","dependentSchemas","patternProperties","properties"],D=["allOf","anyOf","oneOf","prefixItems"];function P(o){return o.replaceAll("~","~0").replaceAll("/","~1")}function*S(o,e){for(let i of W){let a=o[i];if(Array.isArray(a)){for(let[r,t]of a.entries())if(v(t))yield[t,`${e}/${i}/${r}`]}else if(v(a))yield[a,`${e}/${i}`]}for(let i of O){let a=o[i];if(!v(a))continue;for(let[r,t]of Object.entries(a))if(v(t))yield[t,`${e}/${i}/${P(r)}`]}for(let i of D){let a=o[i];if(!Array.isArray(a))continue;for(let[r,t]of a.entries())if(v(t))yield[t,`${e}/${i}/${r}`]}}function _(o,e){let i=o.replace(/^[a-zA-Z][a-zA-Z\d+.-]*:/,"");if(i.startsWith("//")){let t=i.indexOf("/",2);i=t===-1?"":i.slice(t+1)}i=i.replace(/^schema\//,"");let a=i.split(/[^a-zA-Z0-9]+/).filter(Boolean).join("-")||"resource",r=a;for(let t=2;e.has(r);t+=1)r=`${a}-${t}`;return e.add(r),r}function w(o){let e=structuredClone(o);if(v(e.$defs)){let t=new Set(Object.keys(e.$defs).filter((c)=>!h(c))),l={};for(let[c,d]of Object.entries(e.$defs)){let s=v(d)&&n(d.$id)?d.$id:c;l[h(c)?_(s,t):c]=d}e.$defs=l}let i=new Map,a=(t,l)=>{let{$id:c}=t;if(n(c)&&h(c)&&!i.has(c))i.set(c,l);for(let[d,s]of S(t,l))a(d,s)};a(e,"#");let r=(t,l)=>{let c=l,{$id:d}=t;if(n(d)&&h(d)){if(c=i.get(d)??l,c!=="#")delete t.$id}let s=t.$ref;if(n(s)){let p=s.indexOf("#"),k=p===-1?s:s.slice(0,p),g=p===-1?"":s.slice(p+1);if(k===""){if(g.startsWith("/"))t.$ref=`${c}${g}`}else{let u=i.get(k);if(u!==void 0)t.$ref=g?`${u}${g}`:u}}for(let[p]of S(t,c))r(p,c)};return r(e,"#"),e}function h(o){return/^[a-zA-Z][a-zA-Z\d+.-]*:/.test(o)}var q="editor.worker.js",J=new Map([["editorWorkerService",q],["javascript","ts.worker.js"],["json","json.worker.js"],["typescript","ts.worker.js"]]);function U(o){let e=J.get(o)??q;return Zx(`workers/${e}`)}self.MonacoEnvironment={getWorker(o,e){return new Worker(U(e),{type:"module"})}};var A=typeof document>"u"?void 0:document.fonts;if(A?.ready)A.ready.then(async()=>{let o=await (le("ccd9jwsa"),import("./editor-ccd9jwsa.js"));o.editor.remeasureFonts()});var V=["pages/*.json","pages/**/*.json","layouts/*.json","layouts/**/*.json","components/*.json","components/**/*.json","elements/*.json","elements/**/*.json"],N="file:///project.schema.json",G="file:///document.schema.json";function j(o,e){b.setDiagnosticsOptions({allowComments:!1,schemas:[{fileMatch:V,schema:o,uri:"https://jxsuite.com/schema/v1"},{fileMatch:["project.json"],schema:e,uri:"https://jxsuite.com/schema/project/v1"},{schema:e,uri:N},{schema:o,uri:G}],validate:!0})}var B=w(Jx),I=w(Yx);j(B,I);function Nn(o){let{document:e,project:i}=o??{};if(!e&&!i)return!1;return j(e??B,i??I),!0}export{Nn as applyProjectSchemas};
2
+
3
+ //# debugId=42EBC71EB8108CE764756E2164756E21
4
+ //# sourceMappingURL=monaco-setup-xrd2cbkp.js.map
@@ -0,0 +1,4 @@
1
+ import{eu,na,C,Lh,ul,ef,Sv}from"./studio-43sd2mam.js";export{ul as clearProblems,Lh as dismiss,C as notify,Sv as problemCount,ef as problemFindings,na as problems,eu as toasts};
2
+
3
+ //# debugId=65D06C6408B773A664756E2164756E21
4
+ //# sourceMappingURL=notify-kzrjr3fv.js.map
@@ -0,0 +1,4 @@
1
+ import{Q}from"./studio-nqxqf8p2.js";export{Q as errorMessage};
2
+
3
+ //# debugId=556F52C4796184B464756E2164756E21
4
+ //# sourceMappingURL=parse-v77xtwv7.js.map
@@ -0,0 +1,4 @@
1
+ import{lI,Tv,cI,p,_e}from"./studio-w4rz9hdk.js";export{p as getPlatform,_e as hasPlatform,Tv as launcherSignal,cI as platformInFlight,lI as registerPlatform};
2
+
3
+ //# debugId=9761206EDF8BB3AC64756E2164756E21
4
+ //# sourceMappingURL=platform-7v4rtd7m.js.map
@@ -0,0 +1,4 @@
1
+ import{p,y,a,f,U,te,ne,re,E}from"./iframe-entry-76j8vwwx.js";export{y as anchorOf,E as clampIntoViewport,f as close,U as measureAnchor,te as onBeforeToggle,ne as onToggle,re as onTransitionEnd,a as openAt,p as supportsAnchorPositioning};
2
+
3
+ //# debugId=F14E8DF808BCB21164756E2164756E21
4
+ //# sourceMappingURL=popover-b89sfej7.js.map
@@ -0,0 +1,4 @@
1
+ import{Ck,q2}from"./studio-6m380wp7.js";import"./studio-zcd2e7yz.js";import"./studio-3e54qh39.js";import"./studio-d5grtb9e.js";import"./studio-4hp8pkyt.js";import"./studio-s32578pn.js";import"./studio-x9hsze61.js";import"./studio-k3xxbagr.js";import"./studio-q7rtx6zq.js";import"./studio-c05wdnt3.js";import"./studio-kt3pjkwd.js";import"./studio-8tr6cfrc.js";import"./studio-43sd2mam.js";import"./studio-nqxqf8p2.js";import"./studio-z97c48fk.js";import"./studio-w4rz9hdk.js";export{q2 as openPublishPanel,Ck as seedPublishConnected};
2
+
3
+ //# debugId=3C12EB4EE230771864756E2164756E21
4
+ //# sourceMappingURL=publish-panel-2z9gw8ee.js.map
@@ -0,0 +1,4 @@
1
+ import"./studio-nqxqf8p2.js";import{ge,ne,g}from"./studio-43sd2mam.js";import{Pt,Nt}from"./studio-q7rtx6zq.js";import"./studio-s32578pn.js";import"./studio-w4rz9hdk.js";import{ex,h}from"./studio-d5grtb9e.js";import"./studio-c05wdnt3.js";import"./studio-kt3pjkwd.js";import"./studio-z97c48fk.js";import"./studio-8tr6cfrc.js";import"./studio-k3xxbagr.js";import{qe,ft,T,R,Jt,rt,tt}from"./studio-x9hsze61.js";import"./studio-4hp8pkyt.js";import"./studio-3e54qh39.js";import"./studio-y0n7yxea.js";import"./studio-5g0rprdt.js";import"./studio-ph84avkf.js";import"./studio-fyh0jc96.js";import"./studio-8m0y2qe7.js";import"./studio-3exxhz5g.js";import"./studio-x1x167jh.js";import"./studio-dgk4dqtx.js";import{aT,cS}from"./studio-syreb644.js";import"./studio-fbhxxc5f.js";import"./studio-rj9eamf8.js";import"./studio-nh6d342n.js";import{ky,zf,Wf,Pg,lR,Ey}from"./studio-y3ahhdpx.js";import"./studio-9tmebf0s.js";var u={$schema:"https://jxsuite.com/schema/v1",$id:"StudioPublishQuick",$description:"Quick publish (studio.md §22.8): the dialog the chevron beside the Publish workspace tab opens. The count, a short list of what changed, the destination, the summary that becomes the commit message, and the checks in one line; Publish now takes every change to the destination, and Review all opens the Publish workspace on Review changes instead. One `jx-dialog`, so the platform owns modality, Escape and focus restoration. `publish/publish-quick.ts` keeps every decision, and the words of the destinations and the checks are the same `publish/publish-changes.ts` hands Review changes, so the two cannot disagree about what a button does.",tagName:"jx-dialog",$props:{headline:"Publish",confirmLabel:"Publish now",confirmDisabled:{$ref:"#/state/blocked"},secondaryLabel:"Review all",cancelLabel:"Cancel",size:"md"},attributes:{part:"publish-quick","data-destination":"${state.destination}"},onconfirm:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/confirm"},value:[]}]},onsecondary:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/reviewAll"},value:[]}]},oncancel:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/closed"},value:[]}]},onclose:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/closed"},value:[]}]},style:{'& [part="sheet"]':{display:"flex",flexDirection:"column",gap:"var(--jx-space-3)",minWidth:"0"},'& [part="count"]':{margin:"0",fontWeight:"600"},'& [part="change-list"]':{margin:"0",padding:"0",listStyle:"none",display:"flex",flexDirection:"column",gap:"var(--jx-space-1)"},'& [part="change"]':{display:"flex",alignItems:"baseline",gap:"var(--jx-space-2)",minWidth:"0"},'& [part="change-tag"]':{$description:"NEW, EDIT, DELETED, as the board draws them: a word rather than git's letter, because this dialog is read by someone who has never seen a status column.",flex:"none",minWidth:"52px",fontSize:"var(--jx-text-xs)",fontWeight:"700",letterSpacing:"0.04em",color:"var(--signal)"},'& [part="change"][data-status="A"] > [part="change-tag"], & [part="change"][data-status="U"] > [part="change-tag"]':{color:"var(--success)"},'& [part="change"][data-status="D"] > [part="change-tag"]':{color:"var(--danger)"},'& [part="change-name"]':{minWidth:"0",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},'& [part="change-dir"], & [part="more"], & [part="choice-note"], & [part="blocker"]':{color:"var(--fg-dim)",fontSize:"var(--jx-text-sm)"},'& [part="more"], & [part="blocker"]':{margin:"0"},'& [part="destinations"]':{display:"flex",flexDirection:"column",gap:"var(--jx-space-2)"},'& [part="destination-card"] > [part="control"]':{$description:"The same card Review changes draws for the same choice: a name and a sentence inside one radio.",width:"100%",height:"auto",flexDirection:"column",alignItems:"flex-start",textAlign:"start",padding:"var(--jx-space-2) var(--jx-space-3)",gap:"2px",whiteSpace:"normal"},'& [part="choice-name"]':{display:"block",fontWeight:"600"},'& [part="choice-note"]':{display:"block"},'& [part="checks-line"]':{display:"flex",alignItems:"center",gap:"var(--jx-space-2)",margin:"0",fontSize:"var(--jx-text-sm)",color:"var(--fg-dim)"},'& [part="checks-line"][data-state="done"] > [part="checks-icon"]':{color:"var(--success)"},'& [part="checks-line"][data-state="open"] > [part="checks-icon"]':{color:"var(--warning)"}},children:[{tagName:"div",attributes:{part:"sheet"},children:[{tagName:"p",attributes:{part:"count"},textContent:"${state.countLine}"},{tagName:"div",attributes:{part:"list-slot",role:"none"},style:{display:"contents"},$switch:{$ref:"#/state/listState"},cases:{listed:{tagName:"ul",attributes:{part:"change-list"},children:[{$prototype:"Array",items:{$ref:"#/state/rows"},key:{$ref:"$map/item/key"},map:{tagName:"li",attributes:{part:"change","data-status":"${$map.item.status}",title:"${$map.item.path}"},children:[{tagName:"span",attributes:{part:"change-tag"},textContent:"${$map.item.tag}"},{tagName:"span",attributes:{part:"change-name"},textContent:"${$map.item.name}"},{tagName:"span",attributes:{part:"change-dir"},textContent:"${$map.item.dir}"}]}}]}}},{tagName:"div",attributes:{part:"more-slot",role:"none"},style:{display:"contents"},$switch:{$ref:"#/state/hasMore"},cases:{true:{tagName:"p",attributes:{part:"more"},textContent:"${state.more}"}}},{tagName:"jx-action-group",attributes:{part:"destinations"},$props:{selects:"single",label:"Destination",compact:!1,orientation:"vertical"},children:[{$prototype:"Array",items:{$ref:"#/state/destinations"},key:{$ref:"$map/item/value"},map:{tagName:"jx-action-button",attributes:{part:"destination-card","data-destination":"${$map.item.value}"},$props:{label:{$ref:"$map/item/label"},checked:{$ref:"$map/item/checked"},disabled:{$ref:"$map/item/disabled"},hint:{$ref:"$map/item/reason"},quiet:!1},onclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/pickDestination"},value:[{$ref:"$map/item/value"}]}]},children:[{tagName:"span",attributes:{part:"choice-name"},textContent:"${$map.item.label}"},{tagName:"span",attributes:{part:"choice-note"},textContent:"${$map.item.note}"}]}}]},{tagName:"jx-field",attributes:{part:"summary-field"},$props:{label:"Summary",span:!0},children:[{tagName:"jx-textfield",attributes:{part:"summary"},$props:{size:"sm",placeholder:"Describe what changed",value:{$ref:"#/state/summary"}},oninput:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/editSummary"},value:[{$ref:"event#/target/value"}]}]}}]},{tagName:"p",attributes:{part:"checks-line","data-state":"${state.checksState}"},children:[{tagName:"jx-icon",attributes:{part:"checks-icon"},$props:{name:{$ref:"#/state/checksIcon"}}},{tagName:"span",attributes:{part:"checks-text"},textContent:"${state.checksLine}"}]},{tagName:"div",attributes:{part:"blocker-slot",role:"none"},style:{display:"contents"},$switch:{$ref:"#/state/hasBlocker"},cases:{true:{tagName:"p",attributes:{part:"blocker"},textContent:"${state.blocker}"}}}]}]};T("publish-quick",u);function m(e){let a=document.createElement("div");a.style.pointerEvents="auto",a.setAttribute(qe,ft("dialog","publish-quick")),e.layer.append(a);let t=!1,r=()=>{if(t)return;t=!0,e.actions.closed()},c=()=>t,{actions:s}=e,l=g({...e.view,closed:r,confirm:s.confirm,editSummary:(i)=>{l.summary=i,s.editSummary(i)},pickDestination:s.pickDestination,reviewAll:s.reviewAll}),o=null,k=R("publish-quick",l,a).then(async(i)=>{o=i;let p=i.root;if(c())return i.dispose(),p;if(await Jt(p),!c())Pt(p);return p});return{close(){let i=o?.root;if(i instanceof HTMLElement)Nt(i);o?.dispose(),o=null,a.remove(),r()},host:a,ready:k,update(i){Object.assign(l,i)}}}var d=4;function v(e){let{dir:a,key:t,name:r,path:c,status:s}=cS(e);return{dir:a,key:t,name:r,path:c,status:s,tag:aT(s)}}function f(){let e=h.git.status?.files??[],a=h.publish.destination,t=zf(a),r=Pg(),c=r.some((o)=>o.state!=="done"),s=h.git.error||Wf(t,!0),l=e.length-d;return{blocked:Wf(t,!0)!=="",blocker:s,checksIcon:c?"warning-circle":"check",checksLine:lR(r),checksState:c?"open":"done",countLine:e.length===0?"Nothing to publish":`${e.length} ${e.length===1?"change":"changes"} ready`,destination:t,destinations:ky(a),hasBlocker:s!=="",hasMore:l>0,listState:e.length>0?"listed":"empty",more:l>0?`+ ${l} more`:"",rows:e.slice(0,d).map((o)=>v(o)),summary:h.git.commitMessage}}var n=null;function b(){let e=n;if(n=null,e)e.scope.stop(),e.handle.close()}function F(){if(n)return n.handle;h.git.error=null;let e=m({actions:{closed:()=>{if(n?.handle===e)n.scope.stop(),n=null},confirm:()=>{Ey(zf(h.publish.destination),{includeAll:!0}).then((t)=>{if(t)b()})},editSummary:(t)=>{h.git.commitMessage=t},pickDestination:(t)=>{if(ex(t))h.publish.destination=t},reviewAll:()=>{b(),rt("publish.open",{tab:"review"},"Publish")}},layer:tt("dialog"),view:f()}),a=ge();return a.run(()=>{ne(()=>{e.update(f())})}),n={handle:e,scope:a},e}export{F as openQuickPublish};
2
+
3
+ //# debugId=F20972A1DBDA908264756E2164756E21
4
+ //# sourceMappingURL=publish-quick-qx2455cj.js.map
@@ -0,0 +1,4 @@
1
+ import{oR,kk,o_,r_,Ek}from"./studio-a2bvaptz.js";import"./studio-y3ahhdpx.js";import"./studio-syreb644.js";import"./studio-dgk4dqtx.js";import"./studio-x1x167jh.js";import"./studio-9tmebf0s.js";import"./studio-y0n7yxea.js";import"./studio-3e54qh39.js";import"./studio-5g0rprdt.js";import"./studio-rj9eamf8.js";import"./studio-fbhxxc5f.js";import"./studio-d5grtb9e.js";import"./studio-nh6d342n.js";import"./studio-3exxhz5g.js";import"./studio-ph84avkf.js";import"./studio-4hp8pkyt.js";import"./studio-s32578pn.js";import"./studio-x9hsze61.js";import"./studio-k3xxbagr.js";import"./studio-q7rtx6zq.js";import"./studio-fyh0jc96.js";import"./studio-8m0y2qe7.js";import"./studio-c05wdnt3.js";import"./studio-kt3pjkwd.js";import"./studio-8tr6cfrc.js";import"./studio-43sd2mam.js";import"./studio-nqxqf8p2.js";import"./studio-z97c48fk.js";import"./studio-w4rz9hdk.js";export{r_ as detachPublishWorkspace,kk as focusPublishHome,o_ as publishWorkspaceMounted,Ek as renderPublishWorkspace,oR as showPublishTab};
2
+
3
+ //# debugId=C72A8347A69D3AD664756E2164756E21
4
+ //# sourceMappingURL=publish-workspace-wrc1dgwx.js.map
@@ -0,0 +1,4 @@
1
+ import{Tk,Fg}from"./studio-k7evxqh4.js";import"./studio-ed3xx40h.js";import"./studio-wys23mxz.js";import"./studio-mx1smyq0.js";import"./studio-bavb31r0.js";import"./studio-pbxa5fpc.js";import"./studio-syreb644.js";import"./studio-dgk4dqtx.js";import"./studio-x1x167jh.js";import"./studio-9tmebf0s.js";import"./studio-tf9jryb1.js";import"./studio-q0tccd43.js";import"./studio-3qeh9t0h.js";import"./studio-y0n7yxea.js";import"./studio-3e54qh39.js";import"./studio-5g0rprdt.js";import"./studio-rj9eamf8.js";import"./studio-fbhxxc5f.js";import"./studio-d5grtb9e.js";import"./studio-nh6d342n.js";import"./studio-3exxhz5g.js";import"./studio-ph84avkf.js";import"./studio-4hp8pkyt.js";import"./studio-s32578pn.js";import"./studio-x9hsze61.js";import"./studio-k3xxbagr.js";import"./studio-q7rtx6zq.js";import"./studio-r5qy30vx.js";import"./studio-fyh0jc96.js";import"./studio-8m0y2qe7.js";import"./studio-c05wdnt3.js";import"./studio-kt3pjkwd.js";import"./studio-8tr6cfrc.js";import"./studio-43sd2mam.js";import"./studio-nqxqf8p2.js";import"./studio-z97c48fk.js";import"./studio-w4rz9hdk.js";export{Tk as initQuickSearch,Fg as openQuickSearch};
2
+
3
+ //# debugId=2E71FDC804D7285564756E2164756E21
4
+ //# sourceMappingURL=quick-search-n0t0eqxb.js.map
@@ -0,0 +1,4 @@
1
+ import{ph,al,ar,$$,Er,Yb,wC,Zb,I$,Xb}from"./studio-fyh0jc96.js";import"./studio-nqxqf8p2.js";import"./studio-w4rz9hdk.js";export{Er as invalidateUsages,ar as loadUsages,Yb as onUsagesInvalidated,al as peekUsages,$$ as retryUsages,wC as splitUsages,Xb as usageFiles,Zb as usageHeadline,I$ as usageWarning,ph as usagesSupported};
2
+
3
+ //# debugId=D389F19C51717FFB64756E2164756E21
4
+ //# sourceMappingURL=references-9547rg5s.js.map
@@ -0,0 +1,4 @@
1
+ import{hR,Lk,G2,$k,jg,Nl,ku}from"./studio-b7y5mr30.js";import"./studio-58xg6j2q.js";import"./studio-3qqjeep5.js";import"./studio-jsgf2q5k.js";import"./studio-mn0476ag.js";import"./studio-df0baea9.js";import"./studio-03ct6yfv.js";import"./studio-07rcfje3.js";import"./studio-ed3xx40h.js";import"./studio-wys23mxz.js";import"./studio-mx1smyq0.js";import"./studio-bavb31r0.js";import"./studio-pbxa5fpc.js";import"./studio-syreb644.js";import"./studio-dgk4dqtx.js";import"./studio-8vcvfs7r.js";import"./studio-n0c5h6mf.js";import"./studio-x1x167jh.js";import"./studio-9tmebf0s.js";import"./studio-tf9jryb1.js";import"./studio-q0tccd43.js";import"./studio-3qeh9t0h.js";import"./studio-y0n7yxea.js";import"./studio-3e54qh39.js";import"./studio-5g0rprdt.js";import"./studio-rj9eamf8.js";import"./studio-fbhxxc5f.js";import"./studio-d5grtb9e.js";import"./studio-nh6d342n.js";import"./studio-3exxhz5g.js";import"./studio-ph84avkf.js";import"./studio-4hp8pkyt.js";import"./studio-s32578pn.js";import"./studio-x9hsze61.js";import"./studio-k3xxbagr.js";import"./studio-q7rtx6zq.js";import"./studio-r5qy30vx.js";import"./studio-fyh0jc96.js";import"./studio-8m0y2qe7.js";import"./studio-c05wdnt3.js";import"./studio-kt3pjkwd.js";import"./studio-8tr6cfrc.js";import"./studio-43sd2mam.js";import"./studio-nqxqf8p2.js";import"./studio-z97c48fk.js";import"./studio-w4rz9hdk.js";import"./studio-k1wvtp03.js";export{Nl as inspectorTab,Lk as mount,jg as render,$k as restingInspectorTab,ku as setInspectorTab,hR as stripOf,G2 as unmount};
2
+
3
+ //# debugId=5862772FBC9DB06E64756E2164756E21
4
+ //# sourceMappingURL=right-panel-wsgnr9pn.js.map
@@ -0,0 +1,4 @@
1
+ import{Vs,rT,aS,lS,hb,xa,sT,aT,lT,cT,dT,uT,hT,pT,fT,mT,gT,bT,vT,yT,cS,wT,xT,yw,_T,ST,pb,CT}from"./studio-syreb644.js";import"./studio-dgk4dqtx.js";import"./studio-x1x167jh.js";import"./studio-9tmebf0s.js";import"./studio-y0n7yxea.js";import"./studio-3e54qh39.js";import"./studio-5g0rprdt.js";import"./studio-rj9eamf8.js";import"./studio-fbhxxc5f.js";import"./studio-d5grtb9e.js";import"./studio-nh6d342n.js";import"./studio-3exxhz5g.js";import"./studio-ph84avkf.js";import"./studio-4hp8pkyt.js";import"./studio-s32578pn.js";import"./studio-x9hsze61.js";import"./studio-k3xxbagr.js";import"./studio-q7rtx6zq.js";import"./studio-fyh0jc96.js";import"./studio-8m0y2qe7.js";import"./studio-c05wdnt3.js";import"./studio-kt3pjkwd.js";import"./studio-8tr6cfrc.js";import"./studio-43sd2mam.js";import"./studio-nqxqf8p2.js";import"./studio-z97c48fk.js";import"./studio-w4rz9hdk.js";export{ST as armGitPoll,cS as changeRow,yT as checkoutBranch,pb as cleanupSourceControl,lS as cloneRepository,xT as commitRow,vT as createBranch,bT as discardFile,aS as fetchGitLog,hT as fetchRemote,wT as groupFilesByComponent,gT as includeNewChanges,_T as lastUpdatedLabel,lT as loadDiffForLens,rT as noteFileSaved,uT as openFileComparison,xa as platformHostsGit,sT as platformOpensPullRequests,hb as platformSupportsClone,pT as pullRemote,Vs as refreshGitStatus,CT as registerSourceControlCommands,yw as relativeDate,dT as runCloneRepository,mT as setAllIncluded,fT as setIncluded,cT as setSourceControlDeps,aT as statusTag};
2
+
3
+ //# debugId=76FBB9F24A7966C964756E2164756E21
4
+ //# sourceMappingURL=source-control-kwktr9y6.js.map
@@ -1,4 +1,4 @@
1
- import{t,n}from"./iframe-entry-fvbk89gm.js";var C="jx-split",y=0.000001,N=Object.freeze({altKey:!1,ctrlKey:!1,metaKey:!1,shiftKey:!1});function m(r){return{altKey:r.altKey===!0,ctrlKey:r.ctrlKey===!0,metaKey:r.metaKey===!0,shiftKey:r.shiftKey===!0}}function T(r){let e="detail"in r?r.detail:void 0;if(!n(e))return{...N};return{altKey:"altKey"in e&&e.altKey===!0,ctrlKey:"ctrlKey"in e&&e.ctrlKey===!0,metaKey:"metaKey"in e&&e.metaKey===!0,shiftKey:"shiftKey"in e&&e.shiftKey===!0}}var d=new WeakMap;function f(r){let e=r.currentTarget;return e instanceof HTMLElement&&e.localName===C?e:null}function p(r,e,...i){for(let o of i)r.dispatchEvent(new CustomEvent(o,{bubbles:!0,composed:!0,detail:e}))}function c(r,e){let i=Number(r);return Number.isFinite(i)?i:e}function K(r,e){let i=Number(r);return Number.isFinite(i)&&i>0?i:e}function b(r){return String(r.orientation)!=="horizontal"}function E(r,e){return r?e.clientX:e.clientY}var M=new WeakMap;function O(r,e){let i=M.get(r);if(i&&i.vertical===e&&i.element.isConnected&&r.isConnected&&i.element.contains(r)){let o=i.element.getBoundingClientRect(),l=e?o.width:o.height;if(l>0)return l}for(let o=r.parentElement;o;o=o.parentElement){if(globalThis.getComputedStyle(o).display==="contents")continue;let l=o.getBoundingClientRect(),u=e?l.width:l.height;if(u>0)return M.set(r,{element:o,vertical:e}),u}return 0}function g(r,e){let i=O(e,b(r)),o=c(r.min,0),l=c(r.max,1),u=i>0?Math.max(0,c(r.gap,0))/i:0,a=Math.max(o,u),s=Math.min(l,1-u);if(a>s){let S=(a+s)/2;a=S,s=S}return{hi:s,length:i,lo:a}}function h(r,e,i,o){let l=Math.min(o,Math.max(i,e));if(!Number.isFinite(l)||l===Number(r.value))return!1;return r.value=l,!0}function x(r,e,i){let o=Math.min(i,Math.max(e,c(r.collapse,e))),l=Number(r.value);if(Math.abs(l-o)>y)return r.restore=l,o;let u=c(r.restore,-1);return u>=0&&Math.abs(u-o)>y?u:(e+i)/2}function P(r,e){if(r)return e==="ArrowLeft"?-1:e==="ArrowRight"?1:0;return e==="ArrowUp"?-1:e==="ArrowDown"?1:0}function H(r,e){let i=f(e);if(!i||r.disabled===!0||c(e.button,0)!==0)return;let{hi:o,length:l,lo:u}=g(r,i);if(l<=0)return;if(e.preventDefault(),i.focus(),d.set(i,{hi:o,length:l,lo:u,origin:E(b(r),e),start:Number(r.value)}),t(i.setPointerCapture))try{i.setPointerCapture(e.pointerId)}catch{}r.dragging=!0}function L(r,e){let i=f(e),o=i?d.get(i):void 0;if(!i||!o)return;let l=E(b(r),e)-o.origin;if(h(r,o.start+l/o.length,o.lo,o.hi))p(i,m(e),"input")}function D(r,e){let i=f(e);if(!i||!d.delete(i))return;if(r.dragging=!1,t(i.releasePointerCapture)&&t(i.hasPointerCapture)&&i.hasPointerCapture(e.pointerId))i.releasePointerCapture(e.pointerId);p(i,m(e),"change")}function k(r,e){let i=f(e);if(!i||r.disabled===!0)return;let{hi:o,lo:l}=g(r,i),u;if(e.key==="Home")u=l;else if(e.key==="End")u=o;else if(e.key==="Enter")u=x(r,l,o);else{let a=P(b(r),e.key);if(a===0)return;let s=e.shiftKey?K(r.largeStep,0.1):K(r.step,0.02);u=Number(r.value)+a*s}if(e.preventDefault(),h(r,u,l,o))p(i,m(e),"input","change")}function F(r,e){let i=f(e);if(!i||r.disabled===!0)return;let{hi:o,lo:l}=g(r,i);if(h(r,x(r,l,o),l,o))p(i,m(e),"input","change")}export{F as onSplitDoubleClick,k as onSplitKeydown,H as onSplitPointerDown,L as onSplitPointerMove,D as onSplitPointerUp,T as splitModifiersOf,O as trackOf};
1
+ import{t,n}from"./iframe-entry-99nr5zfb.js";var C="jx-split",y=0.000001,N=Object.freeze({altKey:!1,ctrlKey:!1,metaKey:!1,shiftKey:!1});function m(r){return{altKey:r.altKey===!0,ctrlKey:r.ctrlKey===!0,metaKey:r.metaKey===!0,shiftKey:r.shiftKey===!0}}function T(r){let e="detail"in r?r.detail:void 0;if(!n(e))return{...N};return{altKey:"altKey"in e&&e.altKey===!0,ctrlKey:"ctrlKey"in e&&e.ctrlKey===!0,metaKey:"metaKey"in e&&e.metaKey===!0,shiftKey:"shiftKey"in e&&e.shiftKey===!0}}var d=new WeakMap;function f(r){let e=r.currentTarget;return e instanceof HTMLElement&&e.localName===C?e:null}function p(r,e,...i){for(let o of i)r.dispatchEvent(new CustomEvent(o,{bubbles:!0,composed:!0,detail:e}))}function c(r,e){let i=Number(r);return Number.isFinite(i)?i:e}function K(r,e){let i=Number(r);return Number.isFinite(i)&&i>0?i:e}function b(r){return String(r.orientation)!=="horizontal"}function E(r,e){return r?e.clientX:e.clientY}var M=new WeakMap;function O(r,e){let i=M.get(r);if(i&&i.vertical===e&&i.element.isConnected&&r.isConnected&&i.element.contains(r)){let o=i.element.getBoundingClientRect(),l=e?o.width:o.height;if(l>0)return l}for(let o=r.parentElement;o;o=o.parentElement){if(globalThis.getComputedStyle(o).display==="contents")continue;let l=o.getBoundingClientRect(),u=e?l.width:l.height;if(u>0)return M.set(r,{element:o,vertical:e}),u}return 0}function g(r,e){let i=O(e,b(r)),o=c(r.min,0),l=c(r.max,1),u=i>0?Math.max(0,c(r.gap,0))/i:0,a=Math.max(o,u),s=Math.min(l,1-u);if(a>s){let S=(a+s)/2;a=S,s=S}return{hi:s,length:i,lo:a}}function h(r,e,i,o){let l=Math.min(o,Math.max(i,e));if(!Number.isFinite(l)||l===Number(r.value))return!1;return r.value=l,!0}function x(r,e,i){let o=Math.min(i,Math.max(e,c(r.collapse,e))),l=Number(r.value);if(Math.abs(l-o)>y)return r.restore=l,o;let u=c(r.restore,-1);return u>=0&&Math.abs(u-o)>y?u:(e+i)/2}function P(r,e){if(r)return e==="ArrowLeft"?-1:e==="ArrowRight"?1:0;return e==="ArrowUp"?-1:e==="ArrowDown"?1:0}function H(r,e){let i=f(e);if(!i||r.disabled===!0||c(e.button,0)!==0)return;let{hi:o,length:l,lo:u}=g(r,i);if(l<=0)return;if(e.preventDefault(),i.focus(),d.set(i,{hi:o,length:l,lo:u,origin:E(b(r),e),start:Number(r.value)}),t(i.setPointerCapture))try{i.setPointerCapture(e.pointerId)}catch{}r.dragging=!0}function L(r,e){let i=f(e),o=i?d.get(i):void 0;if(!i||!o)return;let l=E(b(r),e)-o.origin;if(h(r,o.start+l/o.length,o.lo,o.hi))p(i,m(e),"input")}function D(r,e){let i=f(e);if(!i||!d.delete(i))return;if(r.dragging=!1,t(i.releasePointerCapture)&&t(i.hasPointerCapture)&&i.hasPointerCapture(e.pointerId))i.releasePointerCapture(e.pointerId);p(i,m(e),"change")}function k(r,e){let i=f(e);if(!i||r.disabled===!0)return;let{hi:o,lo:l}=g(r,i),u;if(e.key==="Home")u=l;else if(e.key==="End")u=o;else if(e.key==="Enter")u=x(r,l,o);else{let a=P(b(r),e.key);if(a===0)return;let s=e.shiftKey?K(r.largeStep,0.1):K(r.step,0.02);u=Number(r.value)+a*s}if(e.preventDefault(),h(r,u,l,o))p(i,m(e),"input","change")}function F(r,e){let i=f(e);if(!i||r.disabled===!0)return;let{hi:o,lo:l}=g(r,i);if(h(r,x(r,l,o),l,o))p(i,m(e),"input","change")}export{F as onSplitDoubleClick,k as onSplitKeydown,H as onSplitPointerDown,L as onSplitPointerMove,D as onSplitPointerUp,T as splitModifiersOf,O as trackOf};
2
2
 
3
3
  //# debugId=F2E2352671D3E1BD64756E2164756E21
4
- //# sourceMappingURL=split-n2gfpm5m.js.map
4
+ //# sourceMappingURL=split-c9zfdgxf.js.map
@@ -0,0 +1,9 @@
1
+ import{p,_e}from"./studio-w4rz9hdk.js";import{Q}from"./studio-nqxqf8p2.js";import{ge,ta,ne,g}from"./studio-43sd2mam.js";import{Qt,yx,Xl,Bi,Y,Kd,Un,m,Bt}from"./studio-c05wdnt3.js";import{Ev}from"./studio-z97c48fk.js";import{Io}from"./studio-8tr6cfrc.js";import{hs}from"./studio-8m0y2qe7.js";import{Ys,on,Dp}from"./studio-ph84avkf.js";import{rr}from"./studio-3exxhz5g.js";import{Md,ks,wp,Bl,Oc}from"./studio-tf9jryb1.js";import{ae}from"./studio-q7rtx6zq.js";import{wi,T,R}from"./studio-x9hsze61.js";import{_r,Xu,$S,Sb,ci,Ul}from"./studio-rj9eamf8.js";import{ir,tN}from"./studio-q0tccd43.js";import{jl,gp}from"./studio-07rcfje3.js";import{wa,Ac,HD,BD}from"./studio-mx1smyq0.js";import{vp}from"./studio-e1g64q43.js";import{x}from"./studio-gcxk20n7.js";import{$e}from"./studio-p4nrkvqr.js";import{n,Z,Xe,S,v}from"./studio-vxq7fcvv.js";import{le}from"./studio-qgh13jtz.js";var he=["title","name","label","heading"];function pp(e,t={}){let r=(i)=>{for(let o of he){let s=i.find((a)=>a.toLowerCase()===o);if(s!==void 0)return s}return null};return r(Object.keys(e?.properties??{}))??r(Object.keys(t).filter((i)=>n(t[i])))}function P(e){if(e instanceof Date)return tb(e);if(n(e))return e;if(Z(e)||Xe(e))return String(e);if(Array.isArray(e))return e.filter((t)=>n(t)||Z(t)).map(String).join(", ");return""}function be(e,t){return Object.fromEntries(Object.keys(e?.properties??{}).filter((r)=>(r in t)).map((r)=>[r,P(t[r])]))}var xe=["date","published","publishedAt","pubDate","publishDate"];function U_(e,t){for(let[r,i]of Object.entries(e?.properties??{}))if(i.format==="date"||i.format==="date-time")return r;return xe.find((r)=>(r in t))??null}function SE(e){let t=e?.properties??{};return U_(e,Object.fromEntries(Object.keys(t).map((r)=>[r,""])))}function tb(e){if(e instanceof Date)return Number.isNaN(e.getTime())?"":e.toISOString().slice(0,10);if(!n(e))return"";let t=/^(\d{4}-\d{2}-\d{2})/.exec(e.trim());if(t)return t[1];let r=new Date(e);if(e.trim()===""||Number.isNaN(r.getTime()))return"";if(!e.includes(":")){let i=String(r.getMonth()+1).padStart(2,"0"),o=String(r.getDate()).padStart(2,"0");return`${r.getFullYear()}-${i}-${o}`}return r.toISOString().slice(0,10)}function O(e){let t=e.split("/").pop()??e,r=t.lastIndexOf(".");return r>0?t.slice(0,r):t}function B(e,t){if(t.startsWith("/"))return`public${t}`;let r=e.includes("/")?e.slice(0,e.lastIndexOf("/")):"",i=[...r===""?[]:r.split("/"),...t.split("/")],o=[];for(let s of i){if(s===""||s===".")continue;if(s==="..")o.pop();else o.push(s)}return o.join("/")}var W=/^[a-z][\d+.a-z-]*:/i;function Ee(e,t){let r=t.trim();if(r==="")return"";return W.test(r)?r:rr(B(e,r))}function q(e){if(n(e))return e.split(",")[0]?.trim()??"";if(Array.isArray(e)){let[t]=e;return t===void 0?"":q(t)}if(v(e)){let{src:t}=e;return n(t)?t:""}return""}function U(e){if(e.format==="image")return!0;let t=e.properties?.src;if(e.type==="object"&&t?.type==="string")return!0;return e.type==="array"&&e.items!==void 0&&U(e.items)}function CE(e,t,r){for(let[i,o]of Object.entries(r?.properties??{}))if(U(o)){let s=Ee(e,q(t[i]));if(s!=="")return s}for(let i of Object.values(t)){if(!n(i)||W.test(i))continue;let o=i.lastIndexOf(".");if(o>0&&Dp(i.slice(o)))return rr(B(e,i))}return""}function X(e,t,r){let i=wa(t)?.schema??null,o=pp(i,r),s=o===null?void 0:r[o],a=Bl(r),l=U_(i,r);return{date:l===null?"":tb(r[l]),fields:be(i,r),path:e,status:Oc(i,r)?a?"Draft":"Published":"",thumb:CE(e,r,i),title:n(s)&&s.trim()!==""?s:O(e)}}async function we(e){try{let t=await p().readFile(e);if(e.endsWith(".json")){let o=JSON.parse(t);return S(o)&&!Array.isArray(o)?o:{}}let{parseSourceForPath:r}=await (le("qnab36ek"),import("./file-ops-qnab36ek.js"));return(await r(e,t)).frontmatter}catch{return{}}}var w=new Map,E=new Map,j=0,L=new Set,K=200;async function Se(e,t){let r=t.slice(0,K),i=await Promise.all(r.map(async(s)=>X(s,e,await we(s)))),o=t.slice(K).map((s)=>({date:"",path:s,status:"",thumb:"",title:O(s)}));return[...i,...o]}function nw(e,t){let r=t.join(`
2
+ `),i=w.get(e);if(i?.key===r)return i.entries;if(!_e())return t.map((s)=>({date:"",path:s,status:"",thumb:"",title:O(s)}));let o=`${e}
3
+ ${r}`;if(!E.has(o)){let s=j,a=Se(e,t).then((l)=>{if(E.get(o)===a)E.delete(o);if(s===j){w.set(e,{entries:l,key:r});for(let c of L)c()}return l});E.set(o,a)}return null}function Fe(e,t,r){let i=w.get(t),o=i?.entries.findIndex((a)=>a.path===e)??-1;if(!i||o===-1)return!1;let s=i.entries.with(o,X(e,t,r));w.set(t,{entries:s,key:i.key});for(let a of L)a();return!0}function fD(e,t){let r=Ul(e);if(e===null||r===null||r===ci)return!1;return Fe(e,r,t)}function kE(){j+=1,w.clear(),E.clear()}function iw(e){return L.add(e),()=>{L.delete(e)}}var Le=/^\d{4}-\d{2}-\d{2}/,y="entry",b=g(new Map);function k(e){let t=b.get(e.id);if(t===void 0)return null;if("key"in t)return t.key;return ir(e)?.state.rows[t.row]?.key??null}function ve(e){return b.has(e.id)}function A(e,t){b.set(e.id,{key:t})}function Ce(e){b.delete(e.id)}function h(e){return ve(e)&&ir(e)!==null}function ee(e){let t=ir(e),r=k(e);if(!t||r===null)return{};let i={};for(let o of t.state.columns){let s=t.buffer.effectiveValue(r,o.field);if(s===null||s==="")continue;if(o.kind==="date"&&n(s)&&!Le.test(s)){i[o.field]=tb(s)||s;continue}i[o.field]=S(s)&&!Array.isArray(s)?s.$ref:s}return i}function Te(e){if(e===void 0||e===null)return null;if(Array.isArray(e))return e.map((t)=>n(t)?t:JSON.stringify(t));if(n(e)||Z(e)||Xe(e))return e;return JSON.stringify(e)}function I(e,t){let r=ir(e),i=k(e);if(!r||i===null)return;let o=new Set(r.state.columns.map((s)=>s.field));r.buffer.group(()=>{for(let[s,a]of Object.entries(t))if(o.has(s))r.buffer.setCell(i,s,Te(a))})}function F(e){let t=ir(e),r=k(e),i=t?.state.rows??[],o=r===null?-1:i.findIndex((s)=>s.key===r);return{index:o,next:o===-1?null:i[o+1]?.key??null,previous:o<=0?null:i[o-1]?.key??null,total:i.length}}async function mD(e,t){let{openFileInTab:r}=await (le("rcn56qvm"),import("./files-rcn56qvm.js"));await r(e);let i=m.tabs.get(e)??null;if(!i||!ir(i))return i;if(!b.has(i.id))i.scope.run(()=>{ta(()=>Ce(i))});if(b.set(i.id,{row:t}),!i.capabilities.modes.includes(y))i.capabilities.modes.unshift(y);return i.session.ui.canvasMode=y,i.session.ui.preview=!1,Bt(i.id),i}function te(e){return e.doc.sourceFormat==null&&e.doc.mode!=="content"}function Fl(e){if(h(e))return ee(e);return te(e)?e.doc.document:e.doc.content.frontmatter}function Re(e,t,r){let i=e.doc.document,o=Object.hasOwn(i,t)?$e(i[t]):void 0,s=r===void 0||r===null||r==="";if(s)delete i[t];else i[t]=r;let a=s?void 0:$e(r);Bi({forward:{key:t,op:"set-key",path:[],value:a},inverse:{key:t,op:"set-key",path:[],value:o}}),e.doc.dirty=!0,tN()}function _(e,t,r){if(h(e))I(e,{[t]:r});else if(te(e))Re(e,t,r);else Kd(e,t,r)}function q_(e,t){if(h(e)){I(e,t);return}Y(e,(r)=>{for(let[i,o]of Object.entries(t))_(r,i,o)})}var re={$schema:"https://jxsuite.com/schema/v1",$id:"StudioEntryEditor",$description:"The Entry editor (site-architecture.md §7.4) — one content entry's fields, in a pane, as a Jx document over the kit. The adapter (`surfaces/entry-editor.ts`) hands in a projection; `content/entry-editor.ts` decides everything in it — which collection the file belongs to, which record its fields live in, which required keys are absent and what a draft flag commits into. The FORM is an island: a schema is `ui/schema-form.ts`'s subject, so this document renders an empty `fields` node and the flow places the element that engine hands back (studio-ui-guidelines.md §9.3, §9.4). That is the whole of the difference between this and the card the lit version drew, and it is why the engine converting in batch 7 is what unblocked this one.",tagName:"div",attributes:{part:"entry","data-jx-region":"${state.region}"},style:{$description:"What `.entry-editor`, `.entry-editor-header`, `.entry-editor-collection`, `.entry-draft-switch`, `.entry-editor-fields`, `.entry-editor-note` and `.entry-editor-empty` said in `styles/overlays.css`, keyed on `part` and re-pointed at the studio token layer. This editor was the only emitter of all seven, so those rules are dead in the stylesheet from here; a central sweep removes them rather than this change, which owns no stylesheet. Every `--spectrum-font-size-*` reference is gone rather than renamed: those names resolve only inside `<sp-theme>`, and a pane editor is mounted outside it, so each would silently have taken its hard-coded fallback.",height:"100%",padding:"var(--jx-space-5)",overflowY:"auto",background:"var(--bg-panel)",'& [part="header"]':{display:"flex",alignItems:"center",gap:"var(--jx-space-4)",marginBottom:"var(--jx-space-5)"},'& [part="name"]':{margin:"0",fontSize:"var(--jx-text-lg)",fontWeight:"600",color:"var(--fg)"},'& [part="collection"]':{padding:"1px var(--jx-space-3)",borderRadius:"var(--radius)",background:"var(--bg)",color:"var(--fg-dim)",fontSize:"var(--jx-text-sm)"},'& [part="draft"]':{$description:"Pushed to the far end of the header rather than placed there: the heading and the collection chip are both content-width, so `margin-left: auto` is what keeps the switch on the right edge whatever the entry is called.",marginLeft:"auto"},'& [part="fields"]':{$description:"The schema form's host is `display: contents`, so its rows are the flex items of THIS box — which is why the column lives here and not inside the engine.",display:"flex",flexDirection:"column"},'& [part="note"]':{margin:"0 0 var(--jx-space-4)",color:"var(--fg-dim)",fontSize:"var(--jx-text-md)",lineHeight:"1.5"},'& [part="empty"]':{display:"flex",maxWidth:"46ch",flexDirection:"column",alignItems:"flex-start",gap:"var(--jx-space-3)",color:"var(--fg-dim)",fontSize:"var(--jx-text-md)",lineHeight:"1.5"},'& [part="record-nav"]':{display:"flex",alignItems:"center",gap:"var(--jx-space-2)",color:"var(--fg-dim)",fontSize:"var(--jx-text-sm)"}},children:[{tagName:"div",attributes:{part:"stage-slot",role:"none"},style:{display:"contents"},$switch:{$ref:"#/state/stage"},cases:{entry:{tagName:"div",attributes:{part:"body",role:"none"},style:{display:"contents"},children:[{tagName:"div",attributes:{part:"header"},children:[{tagName:"h3",attributes:{part:"name"},textContent:"${state.name}"},{tagName:"span",attributes:{part:"collection"},textContent:"${state.collection}"},{tagName:"div",attributes:{part:"record-slot",role:"none"},style:{display:"contents"},$switch:{$ref:"#/state/recordNav"},cases:{shown:{$description:"A record of a file-backed collection (a CSV row): which row of the file this is, the rows either side of it, and the grid that shows them all. A file entry has no neighbours to step to, so it draws none of this.",tagName:"div",attributes:{part:"record-nav",role:"group","aria-label":"Records"},children:[{tagName:"jx-action-button",attributes:{part:"previous"},$props:{size:"sm",quiet:!0,label:"Previous record",hint:"Previous record",disabled:{$ref:"#/state/previousDisabled"}},onclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/showPrevious"},value:[]}]},children:[{tagName:"span",textContent:"‹ Previous"}]},{tagName:"span",attributes:{part:"place"},textContent:"${state.place}"},{tagName:"jx-action-button",attributes:{part:"next"},$props:{size:"sm",quiet:!0,label:"Next record",hint:"Next record",disabled:{$ref:"#/state/nextDisabled"}},onclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/showNext"},value:[]}]},children:[{tagName:"span",textContent:"Next ›"}]},{tagName:"jx-action-button",attributes:{part:"grid"},$props:{size:"sm",quiet:!0,label:"Edit in grid",hint:"Every record of the file, as a table"},onclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/openGrid"},value:[]}]},children:[{tagName:"span",textContent:"Edit in grid"}]}]}}},{tagName:"div",attributes:{part:"draft-slot",role:"none"},style:{display:"contents"},$switch:{$ref:"#/state/draftAxis"},cases:{shown:{$description:"No `label`: the slotted word is on screen and carries the name, so an aria-label would be read twice. The tooltip is `hint`, which is what DRAFT_MEANING has always been.",tagName:"jx-switch",attributes:{part:"draft"},$props:{checked:{$ref:"#/state/draft"},hint:"${state.draftHint}",size:"sm"},onchange:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/setDraft"},value:[{$ref:"event#/target/checked"}]}]},children:[{tagName:"span",textContent:"Draft"}]}}}]},{tagName:"div",attributes:{part:"note-slot",role:"none"},style:{display:"contents"},$switch:{$ref:"#/state/noteState"},cases:{shown:{tagName:"p",attributes:{part:"note"},textContent:"${state.note}"}}},{$description:"An island: `ui/schema-form.ts` draws this entry's fields into this node, and nothing in this document knows what a schema is.",tagName:"div",attributes:{part:"fields","data-jx-region":"${state.fieldsRegion}"}}]},empty:{$description:"The mode is reachable from the palette and from `__jxAutomation` on any tab, so this state is real: it names the reason and the fix rather than drawing an empty form.",tagName:"div",attributes:{part:"empty"},children:[{tagName:"p",attributes:{part:"empty-line"},textContent:"${state.emptyLine}"},{tagName:"p",attributes:{part:"note"},children:[{tagName:"span",textContent:"A collection is a "},{tagName:"code",textContent:"content"},{tagName:"span",textContent:" entry in "},{tagName:"code",textContent:"project.json"},{tagName:"span",textContent:" whose "},{tagName:"code",textContent:"source"},{tagName:"span",textContent:" directory contains this file and which declares a "},{tagName:"code",textContent:"schema"},{tagName:"span",textContent:"."}]},{tagName:"jx-action-button",attributes:{part:"content-types"},$props:{label:"Content types",size:"sm"},onclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/openContentTypes"},value:[]}]},children:[{tagName:"span",textContent:"Content types…"}]}]}}}]};T("entry-editor",re);function ie(e,t){e.region=t.region,e.fieldsRegion=t.fieldsRegion,e.stage=t.stage,e.name=t.name,e.collection=t.collection,e.draftAxis=t.draftAxis,e.draft=t.draft,e.draftHint=t.draftHint,e.noteState=t.noteState,e.note=t.note,e.emptyLine=t.emptyLine,e.recordNav=t.recordNav,e.place=t.place,e.previousDisabled=t.previousDisabled,e.nextDisabled=t.nextDisabled}function Ne(e){let t=n(e)?void 0:e.attributes?.part;return n(t)?t:""}function oe(e,t,r,i){e.replaceChildren();let o=g({collection:"",draft:!1,draftAxis:"hidden",draftHint:"",emptyLine:"",fieldsRegion:"",name:"",nextDisabled:!0,note:"",noteState:"hidden",openContentTypes:r.openContentTypes,openGrid:r.openGrid,place:"",previousDisabled:!0,recordNav:"hidden",region:"",setDraft:r.setDraft,showNext:r.showNext,showPrevious:r.showPrevious,stage:"empty"});ie(o,t);let s=null,a=!1,l=R("entry-editor",o,e,{onNodeCreated:(c,d,f)=>{if(c instanceof HTMLElement&&Ne(f)==="fields")i.fieldsSlot(c)}}).then((c)=>{let d=c.root;if(a)return c.dispose(),d;return s=c,d});return{attached:()=>{if(a)return!1;let c=s?.root;return c===void 0?!0:c instanceof HTMLElement&&e.contains(c)},dispose(){a=!0,s?.dispose(),s=null},ready:l,update:(c)=>ie(o,c)}}var H=g(new Map);function se(e,t){H.set(e,t)}function gD(e){return e?H.get(e):void 0}function bD(e){H.delete(e)}function M(e){return e.replaceAll("\\","/").replace(/^(?:\.\/)+/,"").replace(/\/+$/,"")}function je(e){if(e.endsWith("/"))return!1;let t=e.slice(e.lastIndexOf("/")+1);return/\.[a-z\d]+$/i.test(t)}function ce(e,t){let r=[];for(let s of e)r.push(M(s));let i=[],o=t?.content??{};for(let s of Object.values(o)){if(!n(s.source)||s.source===""||je(s.source))continue;let a=M(s.source),l=a.indexOf(Io);if(l!==-1)a=M(a.slice(0,l));if(a===""||a===".")continue;if(![...r,...i].some((d)=>a===d||a.startsWith(`${d}/`)))i.push(a)}return i.length===0?e:[...e,...i]}function Pe(e,t){let r=Ul(e);if(r===null)return null;if(r===ci)return t===void 0||Xu(e,t)?r:null;let i=Un(e);if(!i||i.name!==r||!i.def.format||i.ext===null)return r;return e.toLowerCase().endsWith(i.ext.toLowerCase())?r:null}var Oe=new Set(["node_modules",".git",".jx",".cache"]);async function de(e,t,r,i,o,s=!1,a){let l;try{l=await hs(()=>t.listDirectory(e))}catch(d){if(!s)i.push({dir:e,error:Q(d)});return}let c=[];for(let d of l){if(d.type==="directory"){if(!Oe.has(d.name))c.push(d.path);continue}let f=on(d.name);r.push({collection:Pe(d.path,a),ext:f,locale:yx(d.path,o)??void 0,media:Ys.has(f),modified:d.modified,name:d.name,path:d.path,size:d.size,type:f||"file"})}await Promise.all(c.map((d)=>de(d,t,r,i,o,!1,a)))}async function rm(e,t,r=new Set,i){let o=[],s=[],{i18n:a}=Qt(x?.projectConfig??{});return await Promise.all(e.map((l)=>de(l,t,o,s,a,r.has(l),i))),o.sort((l,c)=>l.path.localeCompare(c.path)),{failures:s,files:o}}function EE(e,t){let r=e.filter((s)=>s.collection===t.collection),i=t.query.trim().toLowerCase();if(i)r=r.filter((s)=>s.name.toLowerCase().includes(i)||s.path.toLowerCase().includes(i));let o=t.locale?.trim();if(o)r=r.filter((s)=>s.locale===o);return r}var sm=["table","cards","calendar","board"],ow={board:"Board",calendar:"Calendar",cards:"Cards",table:"Table"};var vD=new Set(["cards"]),ke=/^(\d{4}-\d{2}-\d{2})/;function TE(e){let t=ke.exec(e.name);if(t)return t[1];if(e.modified){let r=vp(new Date(e.modified));if(r)return r}return null}function nb(){return Qt(x?.projectConfig??{}).i18n?.locales??[]}function yD(e){let t=new Set;for(let r of e)if(r.locale)t.add(r.locale);return nb().filter((r)=>t.has(r))}function wD(e,t=TE){let r=new Map,i=[];for(let s of e){let a=t(s);if(a===null){i.push(s);continue}let l=r.get(a);if(l)l.push(s);else r.set(a,[s])}return{days:[...r.entries()].map(([s,a])=>({date:s,files:a})).toSorted((s,a)=>a.date.localeCompare(s.date)),undated:i}}function Ae(e){let t=e.lastIndexOf("/");return t===-1?".":e.slice(0,t)}function xD(e){let t=new Map;for(let r of e){let i=Ae(r.path),o=t.get(i);if(o)o.push(r);else t.set(i,[r])}return[...t.entries()].map(([r,i])=>({files:i,group:r})).toSorted((r,i)=>r.group.localeCompare(i.group))}function Ie(e,t,r,i){let o=pp(e,t),s=o===null?"":t[o]??"",a=Object.values(t).find((l)=>l.trim()!=="");return(s||a||i||`Row ${r+1}`).trim()}function He(e){let{headers:t,rows:r}=Md(e);return r.flatMap((i,o)=>i.some((s)=>s.trim()!=="")?[{fields:Object.fromEntries(t.map((s,a)=>[s,i[a]??""])),row:o}]:[])}function Me(e){let t;try{t=JSON.parse(e)}catch{return null}let r=(i)=>S(i)&&!Array.isArray(i)?Object.fromEntries(Object.entries(i).map(([o,s])=>[o,P(s)])):{};if(!Array.isArray(t))return[{fields:r(t),row:0,single:!0}];return t.map((i,o)=>({fields:r(i),row:o}))}function ue(e,t,r){let i=e.toLowerCase(),o=i.endsWith(".csv")?He(t):i.endsWith(".json")?Me(t):null;if(o===null)return null;let s=(e.split("/").pop()??e).replace(/\.[^.]+$/,"");return o.map(({fields:a,row:l,single:c},d)=>({fields:a,index:d,row:l,title:Ie(r,a,d,c?s:"")}))}function fe(e,t){return`${e}#${t+1}`}var G="The Content workspace lists files; it does not edit them in the list. Rename, duplicate or delete from the file's context menu, or open the file to edit it.";function Ge(e){return`field:${e}`}function _D(e){return e.startsWith("field:")?e.slice(6):null}var Ve=6,me=new Set(["image","markdown","html","richtext"]);function V(e){return Sb($S(e))}function SD(e,t){return Object.entries(e?.properties??{}).filter(([r,i])=>{if(t.has(r)||r===ks)return!1;if(i.type==="object"||n(i.format)&&me.has(i.format))return!1;let o=i.items?.format;return i.type!=="array"||i.items?.type==="string"&&!(n(o)&&me.has(o))}).slice(0,Ve).map(([r,i])=>{let o={name:r,title:V(r)};if(i.type==="array")o.list=!0;if(i.type==="number"||i.type==="integer"||i.format==="date"||i.format==="date-time")o.measure=!0;return o})}function Je(e){let t=[{editable:!1,field:"title",kind:"string",title:"Title",widthHint:240},{editable:!1,field:"url",kind:"string",pk:!0,title:"URL",widthHint:200},{editable:!1,field:"template",kind:"string",title:"Template",widthHint:140}];if(e?.status)t.push({editable:!1,field:"status",kind:"string",title:"Status",widthHint:100});if(e?.locale)t.push({editable:!1,field:"locale",kind:"string",title:"Language",widthHint:110});return t.push({editable:!1,field:"modified",kind:"date",title:"Edited",widthHint:120}),t}function LE(e=ci,t){let r=[...t?.locale?[{editable:!1,field:"locale",kind:"string",title:"Locale",widthHint:90}]:[],{editable:!1,field:"modified",kind:"date",title:"Modified",widthHint:160},{editable:!1,field:"path",kind:"readonly",title:"Path",widthHint:320}];if(e===ci)return Je(t);let i=[{editable:!1,field:"title",kind:"string",title:"Title",widthHint:260}];if(t?.status)i.push({editable:!1,field:"status",kind:"string",title:"Status",widthHint:100});if(t?.date)i.push({editable:!1,field:"date",kind:"date",title:"Date",widthHint:120});for(let o of t?.fields??[])i.push({editable:!1,field:Ge(o.name),kind:"string",title:o.title,widthHint:140});return[...i,...r]}function ze(e){return{cells:{locale:e.locale??null,modified:e.modified??null,status:null,template:null,title:e.name,url:e.collection===ci?_r(e.path).urlPattern:null},key:e.path}}async function Ke(e,t){return(await Promise.all(e.map(async(i)=>{let o=i.collection===null?null:Un(i.path);if(!o?.fileBacked)return[i];let s;try{s=await t(i.path)}catch{return[i]}let a=ue(i.path,s,o.def.schema);if(a===null)return[i];return a.map((l)=>Ye(i,l))}))).flat()}function Ye(e,t){return{...e,name:t.title,path:fe(e.path,t.index),record:{fields:t.fields,row:t.row,source:e.path}}}async function Be(e){let t=p(),r=await Ke(e.files,(i)=>t.readFile(i));return{...e,files:r}}function CD(e){let t=null,r=null,i=null,o=e??(()=>ce(x?.projectDirs??[],x?.projectConfig??null));async function s(){if(t)return t;let a=o(),l=new Set(e?a:x?.projectDirs??[]),c=new Set(a.filter((d)=>!l.has(d)));return r??=Ev().then((d)=>rm(a,p(),c,d)).then(Be).then((d)=>(t=d,i=a.join(`
4
+ `),r=null,d)),r}return{capabilities:{delete:!1,insert:!1,remotePaging:!1,remoteSort:!1},columns:()=>Promise.resolve(LE()),commit(a){return Promise.resolve({cells:a.cells.map((l)=>({error:G,field:l.field,ok:!1,rowKey:l.rowKey})),deletes:a.deletes.map((l)=>({error:G,ok:!1,rowKey:l.rowKey})),inserts:a.inserts.map((l)=>({error:G,ok:!1,tempKey:l.tempKey}))})},failures:()=>t?.failures??[],files:()=>t?.files??[],id:Xl("content"),label:"Content",async refresh(){t=null,r=null,await s()},async rows(){let a=await s();return{rows:a.files.map((l)=>ze(l)),total:a.files.length}},scanned:()=>t!==null,stale:()=>t!==null&&i!==o().join(`
5
+ `)}}var We=[y],D=new Map;function J(e){return D.get(e)??null}function $E(e,t){let r=J(e);return r!==null&&r.tabId===t.id&&r.wrap.isConnected&&r.surface.attached()}function rw(e){let t=D.get(e);if(!t)return;t.scope.stop(),t.surface.dispose(),D.delete(e)}function ib(e,t){Y(e,(r)=>_(r,ks,t))}function kD(e){let t=C(e),r=Fl(e);if(!t||!Oc(t.schema,r))return null;let i=Bl(r);return{draft:i,text:i?"Draft":"Published",title:i?wp:"Not marked a draft."}}function IE(e){return Object.fromEntries(Object.entries(e?.properties??{}).map(([t,r])=>[t,{label:n(r.title)&&r.title!==""?r.title:V(t)}]))}function RE(e){return{fieldKeyPrefix:`entry:${e.id}`,resolvePointer:(t,r)=>gp(t,{projectConfig:x?.projectConfig??{},scope:r})}}function DE(e,t){return Object.fromEntries(BD(e.schema,t).map((r)=>[r,"Required — this entry does not have one."]))}function C(e){return h(e)?HD(e.documentPath):Ac(e.documentPath)}function NE(e,t,r){let i=pp(t,r),o=e.properties??{},s=i===null?void 0:o[i];if(i===null||s===void 0)return e;return{...e,properties:{[i]:s,...o}}}function qe(e){return`${e.documentPath??"This document"} is not an entry of any content collection, so there is no schema to draw a form from.`}function pe(e,t,r){let i=wi(e,"entry"),o=wi(e,"entry/fields");if(!r)return{collection:"",draft:!1,draftAxis:"hidden",draftHint:wp,emptyLine:qe(t),fieldsRegion:o,name:"",nextDisabled:!0,note:"",noteState:"hidden",place:"",previousDisabled:!0,recordNav:"hidden",region:i,stage:"empty"};let s=Fl(t),a=Bl(s),l=h(t),c=F(t);return{collection:r.name,draft:a,draftAxis:Oc(r.schema,s)?"shown":"hidden",draftHint:wp,emptyLine:"",fieldsRegion:o,name:l?Ue(r,s,c.index):t.documentPath?.split("/").pop()??"Untitled",nextDisabled:c.next===null,note:wp,noteState:a?"shown":"hidden",place:c.index===-1?"":`${c.index+1} of ${c.total}`,previousDisabled:c.previous===null,recordNav:l?"shown":"hidden",region:i,stage:"entry"}}function Ue(e,t,r){let i=pp(e.schema,t),o=i===null?void 0:t[i];if(n(o)&&o.trim()!=="")return o.trim();return r===-1?"Record":`Row ${r+1}`}function ED(e,t){let{paneId:r,wrap:i}=e;if($E(r,t))return;rw(r);let o=null,s=null,a=()=>{if(o!==null&&J(r)===o)c()},l=(u)=>{if(!s||!u)return;let N=Fl(t),z=jl(`entry:${r}`,NE(u.schema,u.schema,N),N,{context:RE(t),errors:DE(u,N),onChange:(ye)=>q_(t,ye),rerender:a,ui:IE(u.schema)});if(z.parentNode!==s)s.replaceChildren(z)},c=()=>{let u=C(t);if(!u)s=null;o?.surface.update(pe(r,t,u)),l(u)},d=ge(),f=oe(i,pe(r,t,C(t)),{openContentTypes:()=>{ae()?.run("settings.open",{section:"content"})},openGrid:()=>{let{index:u}=F(t);if(u!==-1&&t.documentPath)se(t.documentPath,u);t.session.ui.canvasMode="grid"},setDraft:(u)=>ib(t,u),showNext:()=>{let{next:u}=F(t);if(u!==null)A(t,u)},showPrevious:()=>{let{previous:u}=F(t);if(u!==null)A(t,u)}},{fieldsSlot:(u)=>{s=u,l(C(t))}});o={paneId:r,scope:d,surface:f,tabId:t.id,wrap:i},D.set(r,o),d.run(()=>{ne(()=>{if(J(r)!==o)return;t.doc.document,t.doc.content.frontmatter,x?.projectConfig?.content,c()})})}async function TD(e){let{openFileInTab:t}=await (le("rcn56qvm"),import("./files-rcn56qvm.js"));await t(e);for(let[r,i]of m.tabs.entries()){if(i.documentPath!==e)continue;for(let o of We)if(!i.capabilities.modes.includes(o))i.capabilities.modes.unshift(o);return i.session.ui.canvasMode=y,i.session.ui.preview=!1,Bt(r),i}return null}
6
+ export{pp,U_,SE,tb,CE,nw,fD,kE,iw,mD,Fl,q_,gD,bD,rm,EE,sm,ow,vD,TE,nb,yD,wD,xD,_D,SD,LE,CD,$E,rw,ib,kD,IE,RE,DE,NE,ED,TD};
7
+
8
+ //# debugId=6E7704F8B30EFADF64756E2164756E21
9
+ //# sourceMappingURL=studio-03ct6yfv.js.map
@@ -0,0 +1,5 @@
1
+ import{VA}from"./studio-q7rtx6zq.js";import{xC,u}from"./studio-c05wdnt3.js";import{g}from"./studio-43sd2mam.js";import{T,R}from"./studio-x9hsze61.js";import{Xt}from"./studio-pbxa5fpc.js";import{$e}from"./studio-p4nrkvqr.js";import{n,Z,Xe,S,v,Ie,Ma,Pa}from"./studio-vxq7fcvv.js";var B={anyOf:[{additionalProperties:!1,description:"Two-way: `target` is the test, `value` the tag when it is truthy, `initial` the tag when it is not.",properties:{initial:{$ref:"#/$defs/TagName"},operator:{const:"?:",type:"string"},target:{$ref:"#/$defs/ExpressionOperand"},value:{$ref:"#/$defs/TagName"}},required:["operator","target","value","initial"],title:"?: — the tag when the test holds, and the tag when it does not"},{additionalProperties:!1,description:"Multiway: `target` is the discriminant, matched against case keys by its string form. "+"`default` is required — an element with no tag cannot exist.",properties:{cases:{additionalProperties:{$ref:"#/$defs/TagName"},type:"object"},default:{$ref:"#/$defs/TagName"},operator:{const:"switch",type:"string"},target:{$ref:"#/$defs/ExpressionOperand"}},required:["operator","target","cases","default"],title:"switch — one tag per discriminant value, with a required fallback"}],description:"A tag name chosen at element creation. Every branch resolves to a `TagName`, so the candidate set is enumerable without evaluating anything."},G={anyOf:[{$ref:"#/$defs/TagName"},{additionalProperties:!1,properties:{$expression:{$ref:"#/$defs/TagExpression"}},required:["$expression"],type:"object"}]};var K={description:"HTML element tag name or custom element name (must contain a hyphen per Web Components spec). "+"A NAME, never an expression: no `${…}` position in the pipeline evaluates a tagName. Use "+"`$switch`/`cases` to vary the element.",minLength:1,pattern:"^[a-zA-Z][a-zA-Z0-9._-]*$",type:"string"};var Y={oneOf:[{type:"string"},{$ref:"#/$defs/RefObject"}]};var Ce={additionalProperties:!0,description:"A page-level <head> entry. Defines meta tags, link tags, script tags, etc.",properties:{attributes:{additionalProperties:{oneOf:[{type:"string"},{type:"boolean"}]},type:"object"},children:{items:{$ref:"#/$defs/HeadEntry"},type:"array"},tagName:{type:"string"},textContent:{description:"Element content. An object is serialized to JSON inside the tag — that is how a "+'JSON-LD block (`<script type="application/ld+json">`) is authored.',oneOf:[{type:"string"},{type:"object"}]}},required:["tagName"],type:"object"};var X={additionalProperties:!1,description:"A $ref binding. Resolves to a state entry (reactive) or plain value (static).",properties:{$ref:{$ref:"#/$defs/AnyRef"}},required:["$ref"],type:"object"};var I={additionalProperties:{anyOf:[{type:"string"},{type:"number"},{$ref:"#/$defs/RefObject"},{$ref:"#/$defs/StyleObject"}]},description:"CSS style definition. camelCase property names follow CSSOM convention. Keys starting with :, ., &, or [ are treated as nested CSS selectors. Keys matching $media breakpoint names (or other @-prefixed at-rules) group nested rules. Nesting is recursive: selector and at-rule groups may nest to arbitrary depth "+"(e.g. breakpoint → selector → pseudo-class), mirroring the compiler's recursive emission. "+"An object carrying $ref is a reactive VALUE, and the runtime reads it as one. It also matches the nested-block branch vacuously, since a block admits a string under any key, which is why these branches are anyOf rather than oneOf. A DECLARATION at-rule (@font-face, @property, @position-try, @counter-style) may hold an ARRAY of blocks, which is that key written more than once, in order: an object's keys are "+"unique, so @font-face — the at-rule whose identity is not in its key — could not otherwise "+"state a family's second weight at all.",patternProperties:{"^@(font-face|property|position-try|counter-style)":{anyOf:[{$ref:"#/$defs/StyleObject"},{items:{$ref:"#/$defs/StyleObject"},minItems:1,type:"array"}]}},properties:{$description:{description:"Why this rule exists. Emitted as a comment by static builds, ignored at runtime.",type:"string"}},type:"object"};var L={additionalProperties:!1,description:"Dynamic mapped list. Re-renders when the items state entry changes.",properties:{$prototype:{const:"Array",type:"string"},filter:{$ref:"#/$defs/RefObject"},items:{oneOf:[{$ref:"#/$defs/RefObject"},{type:"array"}]},key:{additionalProperties:!1,description:"The identity of each rendered row: a $map/item pointer read per item. A row whose key survives a change keeps its DOM node and its effects across reorders, insertions and "+"removals; without a key, rows are keyed by index. $map/index is not a key — an index "+"names a position, not a row.",properties:{$ref:{pattern:"^\\$map/item(/.+)?$",type:"string"}},required:["$ref"],type:"object"},map:{$ref:"#/$defs/ElementDef"},sort:{$ref:"#/$defs/RefObject"}},required:["$prototype","items","map"],type:"object"},Ee={description:"Array of child definitions — elements, text, or Array namespaces (dynamic lists) mixed "+"freely. A bare Array namespace (the whole children slot is one dynamic list) is also "+"accepted for backward compatibility, as is a ${…} template string that resolves at build "+"time to an array of child definitions.",oneOf:[{items:{anyOf:[{$ref:"#/$defs/ElementDef"},{$ref:"#/$defs/SwitchNode"},{$ref:"#/$defs/ArrayNamespace"},{type:"string"},{type:"number"}]},type:"array"},{$ref:"#/$defs/ArrayNamespace"},{description:"Computed children — a ${…} template that resolves at build time to an array of child "+'definitions (e.g. "${state.entry.$children}" for parsed content). A bare plain-text string is NOT a valid children value; text children must be array items.',pattern:"\\$\\{",type:"string"}]};var Q={additionalProperties:{oneOf:[{type:"string"},{type:"number"},{type:"boolean"},{$ref:"#/$defs/RefObject"}]},description:"HTML attributes and ARIA attributes set via element.setAttribute().",type:"object"},ee={additionalProperties:{anyOf:[{type:"string"},{type:"number"},{type:"boolean"},{type:"array"},{type:"object"},{$ref:"#/$defs/RefObject"}]},description:"Explicit prop passing at a component boundary.",type:"object"},te={oneOf:[{type:"string"},{type:"number"},{type:"boolean"},{type:"null"},{$ref:"#/$defs/RefObject"}]},re={additionalProperties:!1,description:"Reactive $ref that drives which case to render: a state entry, or inside a mapped array's template the row's $map/item or $map/index (spec §14.1).",properties:{$ref:{oneOf:[{$ref:"#/$defs/StateRef"},{$ref:"#/$defs/MapRef"}],type:"string"}},required:["$ref"],type:"object"};var oe={additionalProperties:!1,description:'A function declaration. $prototype must be "Function". body (inline) and $src (external) are mutually exclusive. First parameter is always state (the reactive scope).',properties:{$export:{description:"Named export in $src module. Defaults to the state key name.",type:"string"},$lazy:{description:"Load $src on first call instead of importing it up front. The function then returns a "+"promise, so it may only be called from a handler or lifecycle hook — never bound as a "+"computed value. Use it for code most visitors never reach.",type:"boolean"},$prototype:{const:"Function",type:"string"},$src:{description:"External module specifier. Mutually exclusive with body.",examples:["./counter.js","npm:@myorg/validators"],type:"string"},arguments:{description:"Legacy alias for parameters: bare string parameter names (state may be listed explicitly as the first name). Superseded by parameters.",examples:[["state","event"]],items:{type:"string"},type:"array"},body:{description:"Inline function body: an opaque JS source string (first implicit parameter is state), or a structured statement array (spec §20) — explicit structured function declaration, analyzable by tooling and editable visually. The escalation ladder within the shape is structured statements → JS string.",examples:["state.count++",'state.items.push({ id: Date.now(), text: "", done: false })','return state.score >= 90 ? "gold" : "silver"',[{operator:"push",target:{$ref:"#/state/cart"},value:1},{dispatchEvent:"cart-changed",detail:{$ref:"#/state/cart"}}]],oneOf:[{type:"string"},{$ref:"#/$defs/StatementList"}]},description:{type:"string"},emits:{description:"Array of CEM-compatible Event objects this function dispatches. Used for CEM extraction and studio event discovery.",items:{$ref:"#/$defs/CemEvent"},type:"array"},name:{description:"Explicit function name. Defaults to the state key name.",type:"string"},parameters:{description:"Function parameters (after the implicit state parameter). Accepts CEM-compatible parameter objects or bare string names for backward compatibility.",examples:[["event"],[{name:"event",type:{text:"Event"}}],[{description:"Item identifier",name:"id",type:{text:"number"}}]],items:{oneOf:[{type:"string"},{$ref:"#/$defs/CemParameter"}]},type:"array"},type:{description:"Return type for tooling (JSON Schema or CEM { text } format)."}},required:["$prototype"],type:"object"};var Me={additionalProperties:!1,description:"The core expression node. operator + target, with value gated by arity.",oneOf:[{not:{anyOf:[{required:["value"]},{required:["initial"]}]},properties:{operator:{$ref:"#/$defs/UnaryOperator"}},required:["operator"],title:"Unary — target only, no value"},{not:{required:["initial"]},properties:{operator:{$ref:"#/$defs/BinaryOperator"}},required:["operator","value"],title:"Binary — left in target, right in value"},{not:{required:["initial"]},properties:{operator:{$ref:"#/$defs/AssignmentOperator"},target:{$ref:"#/$defs/ExpressionPointer"}},required:["operator","value"],title:"Assignment — writable target, value required"},{not:{anyOf:[{required:["value"]},{required:["initial"]}]},properties:{operator:{$ref:"#/$defs/NoArgMethod"},target:{$ref:"#/$defs/ExpressionPointer"}},required:["operator"],title:"pop / shift — array receiver, no value"},{not:{required:["initial"]},properties:{operator:{$ref:"#/$defs/OneArgMethod"},target:{$ref:"#/$defs/ExpressionPointer"}},required:["operator","value"],title:"push / unshift — array receiver, single value argument"},{not:{required:["initial"]},properties:{operator:{$ref:"#/$defs/SpliceMethod"},target:{$ref:"#/$defs/ExpressionPointer"},value:{items:{$ref:"#/$defs/ExpressionOperand"},minItems:1,type:"array"}},required:["operator","value"],title:"splice — array receiver, [start, deleteCount, ...items]"},{properties:{operator:{$ref:"#/$defs/ReduceMethod"},target:{anyOf:[{$ref:"#/$defs/ExpressionPointer"},{$ref:"#/$defs/ExpressionNode"}]},value:{$ref:"#/$defs/ExpressionNode"}},required:["operator","value","initial"],title:"reduce — pure fold over a pointer or derived array; seed in initial"},{not:{required:["initial"]},properties:{operator:{$ref:"#/$defs/MapFilterMethod"},target:{anyOf:[{$ref:"#/$defs/ExpressionPointer"},{$ref:"#/$defs/ExpressionNode"}]},value:{$ref:"#/$defs/ExpressionNode"}},required:["operator","value"],title:"map / filter — pure over a pointer or derived array; per-item expression in value"},{description:"The ECMAScript conditional (ternary) operator, pure: target is the test, value the consequent, initial the alternate (the reduce precedent for repurposing initial). Chain else-if by nesting another ?: node in initial.",properties:{operator:{$ref:"#/$defs/ConditionalOperator"}},required:["operator","value","initial"],title:"?: — pure conditional; test in target, consequent in value, alternate in initial"},{description:"Value-keyed multiway selection, pure: target is the discriminant (matched against case keys by its string form, like element-level $switch), cases maps matched values to result operands, default is the operand when no case matches (result is undefined without it). Condition-chain branching composes from nested ?: nodes instead.",not:{anyOf:[{required:["value"]},{required:["initial"]}]},properties:{cases:{additionalProperties:{$ref:"#/$defs/ExpressionOperand"},type:"object"},default:{$ref:"#/$defs/ExpressionOperand"},operator:{$ref:"#/$defs/SwitchOperator"}},required:["operator","cases"],title:"switch — pure value-keyed selection; discriminant in target, results in cases/default"},{description:"A pure standard-library method call: target is the receiver (any operand — never mutated; change-by-copy names replace the mutating originals), value the optional argument (bare scalar) or argument list (array). A missing receiver or method yields undefined, matching null-safe path reads.",not:{required:["initial"]},properties:{operator:{$ref:"#/$defs/PureMethod"}},required:["operator"],title:"Pure method — genuine prototype methods; receiver in target, args in value"},{description:"Invoke a callable, pure in formula position: target is the callee pointer — a named formula entry (#/state/…) or a blessed pure global via window#/ (Math.*, JSON.*, Object.keys/values/entries, and "+`${VA()}) — and value is the positional argument list (the splice args-in-value precedent). Argument order follows the callee's declared parameters.`,not:{required:["initial"]},properties:{operator:{$ref:"#/$defs/CallOperator"},target:{$ref:"#/$defs/ExpressionPointer"},value:{items:{$ref:"#/$defs/ExpressionOperand"},type:"array"}},required:["operator"],title:"call — invoke a named formula or blessed global; callee in target, args in value"}],properties:{cases:{additionalProperties:{$ref:"#/$defs/ExpressionOperand"},description:"switch only: matched discriminant value (string form) → result operand.",type:"object"},default:{$ref:"#/$defs/ExpressionOperand",description:"switch only: result operand when no case key matches."},initial:{$ref:"#/$defs/ExpressionOperand"},operator:{type:"string"},target:{$ref:"#/$defs/ExpressionOperand"},value:{$ref:"#/$defs/ExpressionOperand"}},required:["operator","target"],type:"object"},ne={additionalProperties:!1,description:"A declarative expression entry (Shape 5). Used as a state entry or inline event handler. With parameters it is a named formula: a pure, reusable computation invoked via the call operator, its parameters resolved through $args/<name> refs in the body.",properties:{$description:{type:"string"},$expression:{$ref:"#/$defs/ExpressionNode"},$title:{type:"string"},parameters:{description:"Named-formula parameters (CEM convention, as on Function entries): bare names or CEM parameter objects. Present ⇒ the entry is callable, not a computed value.",items:{anyOf:[{type:"string"},{$ref:"#/$defs/CemParameter"}]},type:"array"}},required:["$expression"],type:"object"};var Re={description:"A single state entry. Shape is determined by value type: "+"scalar/array → naked reactive property, string with ${} → computed, "+'object with $prototype: "Function" → function, '+"object with $prototype: <other> → data source, "+"object with type and default → typed reactive property, "+"plain object → naked object reactive property.",oneOf:[{type:"number"},{type:"boolean"},{type:"null"},{type:"string"},{type:"array"},{$ref:"#/$defs/TypedStateDef"},{$ref:"#/$defs/FunctionDef"},{$ref:"#/$defs/ExternalClassDef"},{$ref:"#/$defs/ExpressionEntry"},{not:{anyOf:[{required:["$prototype"]},{required:["default"]},{required:["type"]},{required:["$expression"]}]},type:"object"}]};var Pe={additionalProperties:!1,description:"Project-section admission block (specs/extensions.md §9). A class carrying this block owns "+"the project.json section named by `key`; hosts dispatch that section's data through the class's projectData/resolvePaths capabilities.",properties:{description:{type:"string"},key:{description:"The project.json top-level section this class owns (exclusive per project).",type:"string"},referenceable:{description:"Whether section entries can be referenced from documents (e.g. content types).",type:"boolean"},title:{type:"string"}},required:["key"],type:"object"},Ae={additionalProperties:!1,description:"Server-mount admission block (specs/extensions.md §11). A class carrying this block mounts "+"routes under its /_jx/ basePath in the site worker and dev server.",properties:{basePath:{description:"Route subtree this class mounts — must be under /_jx/ (exclusive per project).",examples:["/_jx/data","/_jx/auth"],type:"string"},module:{description:"Module specifier exporting the mount handler.",type:"string"},order:{description:"Mount order (ascending; default 100).",type:"number"}},required:["basePath"],type:"object"},Fe={description:"Connection-provider admission block (specs/extensions.md §12). A class carrying this block "+"provides database connections of the given provider/kind.",properties:{kind:{description:"SQL dialect family the provider speaks.",enum:["sqlite","postgres"],type:"string"},local:{description:"Local-development substitute provider (e.g. sqlite for D1).",type:"string"},module:{description:"Module specifier exporting the provider implementation.",type:"string"},provider:{description:"Provider identifier (e.g. d1, supabase, sqlite).",type:"string"},serve:{description:"Module specifier exporting the serve-time worker binding.",type:"string"}},required:["provider","kind"],type:"object"};var aw=[301,302,303,307,308],Ne={description:"Schema for Jx project.json files. A project.json file is the root anchor file for a Jx project, declaring site metadata, default settings, global styles, extensions, and build configuration. Open by design: extension-contributed sections (e.g. `content`) are opaque top-level keys; the generated per-project entry document (project.schema.json) closes the composition.",properties:{$defs:{description:"Global type definitions available to all pages.",type:"object"},$elements:{description:"Global custom element dependencies available to all pages. Items are $ref objects or npm package specifier strings.",items:{oneOf:[{additionalProperties:!1,properties:{$ref:{type:"string"}},required:["$ref"],type:"object"},{type:"string"}]},type:"array"},$head:{description:"Global <head> entries applied to all pages. Array of element definitions for meta tags, link tags, script tags, etc.",examples:[[{attributes:{href:"/favicon.svg",rel:"icon"},tagName:"link"},{attributes:{content:"Jx",name:"generator"},tagName:"meta"}]],items:{properties:{attributes:{additionalProperties:{type:"string"},type:"object"},tagName:{type:"string"}},type:"object"},type:"array"},$media:{additionalProperties:{type:"string"},description:'Named media breakpoints following CSS @custom-media convention. Available in all component style objects. Declaring a pure color-scheme query (e.g. "--dark": "(prefers-color-scheme: dark)") additionally opts the site into the forced-scheme contract: @--dark style blocks are dual-emitted so a data-color-scheme attribute on <html> overrides the OS preference, color-scheme is declared on :root, and a pre-paint script restores the '+"visitor's persisted choice (spec §9.5).",examples:[{"--dark":"(prefers-color-scheme: dark)","--lg":"(min-width: 1024px)","--md":"(min-width: 768px)","--sm":"(min-width: 640px)"}],type:"object"},$schema:{description:"Relative path to the generated per-project schema (conventionally ./project.schema.json, written by `jx schema`).",type:"string"},build:{description:"Build configuration.",properties:{adapter:{description:"Platform adapter for deployment-specific output.",enum:["static","cloudflare-pages","cloudflare-workers","node","bun"],type:"string"},deploy:{additionalProperties:!1,description:"Deployment tracking: the hosting project this repo publishes to. Identifiers "+"only (no secrets) — safe to commit; Studio uses it to tell whether the publish "+"workflow already exists. `adapter` says how the build is packaged; `deploy` says where it ships.",properties:{accountId:{description:"Hosting account id (e.g. the Cloudflare account id).",type:"string"},productionUrl:{description:"Production URL of the connected hosting project.",type:"string"},projectName:{description:"Hosting project name (e.g. the Cloudflare Pages project).",pattern:"^[a-z0-9][a-z0-9-]*$",type:"string"},provider:{description:"Hosting provider the project is connected to.",enum:["cloudflare-pages"],type:"string"}},required:["provider","accountId","projectName"],type:"object"},format:{default:"directory",description:"Reserved; currently unused. Accepted for forward compatibility with single-file output (desktop single-file mode) — the build emits per-route directories regardless.",enum:["directory","single"],type:"string"},outDir:{default:"./dist",description:"Output directory for compiled site.",type:"string"},headers:{additionalProperties:!1,description:"Emit dist/_headers — the response headers only the build can know. Honored by "+"Cloudflare Pages/Workers assets and Netlify; on the node/bun adapters the file documents what a reverse proxy in front of them must send.",properties:{cache:{default:"auto",description:'"auto" marks the content-addressed image variants immutable (RFC 8246) and revalidates everything else (RFC 9111). "off" emits no Cache-Control at all.',enum:["auto","off"],type:"string"},enabled:{default:!0,type:"boolean"},rules:{additionalProperties:{additionalProperties:{type:"string"},type:"object"},description:"Verbatim rules, merged after the generated block.",propertyNames:{pattern:"^/"},type:"object"},security:{additionalProperties:!1,properties:{contentTypeOptions:{default:!0,type:"boolean"},csp:{default:!1,description:"CSP Level 3. Off by default: unlike the other security headers this one "+"governs code the build cannot see — a third-party script that loads a "+"second script, a widget that opens a frame — so turning it on is a change "+"to verify in the browser console, not a safe default. `script-src` is derived from the inline scripts and external origins the build emitted; `style-src` keeps 'unsafe-inline', because per-page <style> blocks and per-element style attributes have no site-wide hash.",oneOf:[{type:"boolean"},{const:"report-only"},{additionalProperties:!1,properties:{directives:{additionalProperties:{oneOf:[{type:"string"},{const:!1}]},description:"Replace (string) or remove (false) a computed directive. A replacement is wholesale, so an addition restates the defaults.",type:"object"},mode:{default:"enforce",enum:["enforce","report-only"]},reportUri:{format:"uri-reference",type:"string"}},type:"object"}]},frameOptions:{default:"SAMEORIGIN",oneOf:[{enum:["DENY","SAMEORIGIN"],type:"string"},{const:!1}]},hsts:{default:!1,description:"RFC 6797. Off by default: a wrong max-age locks the apex domain to HTTPS for that long, and the mistake is invisible until a certificate lapses. `preload` requires `includeSubDomains` and is a build error without it.",oneOf:[{type:"boolean"},{additionalProperties:!1,properties:{includeSubDomains:{default:!0,type:"boolean"},maxAge:{default:31536000,minimum:0,type:"integer"},preload:{default:!1,type:"boolean"}},type:"object"}]},permissionsPolicy:{default:"camera=(), microphone=(), geolocation=()",oneOf:[{type:"string"},{const:!1}]},referrerPolicy:{default:"strict-origin-when-cross-origin",oneOf:[{enum:["no-referrer","no-referrer-when-downgrade","origin","origin-when-cross-origin","same-origin","strict-origin","strict-origin-when-cross-origin","unsafe-url"],type:"string"},{const:!1}]}},type:"object"}},type:"object"},sitemap:{default:!0,description:"Generate sitemap.xml from the route table (requires `url`). Set false to disable.",type:"boolean"},trailingSlash:{default:"always",description:"Trailing slash behavior for generated URLs.",enum:["always","never","ignore"],type:"string"}},type:"object"},copy:{additionalProperties:{type:"string"},description:"Declarative file copy map. Keys are source paths (relative to project root), values are destination paths (relative to outDir).",type:"object"},defaults:{description:"Default settings applied to all pages unless overridden.",properties:{charset:{default:"utf8",description:"Default charset for the page.",type:"string"},dir:{description:"Base direction for the <html> element. Omitted when unset — a page's `$dir` "+"overrides it. Right-to-left content renders left-to-right without this.",enum:["ltr","rtl","auto"],type:"string"},lang:{default:"en",description:"Default lang attribute for the <html> element. A page's `$lang` overrides it.",type:"string"},layout:{default:null,description:"Default layout file path applied to all pages. Set to null to render pages without a layout.",examples:["./layouts/base.json"],oneOf:[{type:"string"},{type:"null"}]},shadow:{default:!1,description:"Default shadow-DOM mode for every component (spec.md §16.6). Off unless set: a "+"shadow root isolates component styles from the page and replaces the <slot> emulation with real slot distribution. A component's own `$shadow` overrides this in both directions.",oneOf:[{enum:["open","closed"],type:"string"},{const:!1,type:"boolean"}]}},type:"object"},extensions:{description:"Extension packages: bare package names (resolved project-first through the package exports map) or relative paths. Each must export jx-extension.json.",examples:[["@jxsuite/parser"]],items:{type:"string"},type:"array"},manifest:{additionalProperties:!1,description:'W3C Web App Manifest, emitted as manifest.webmanifest with a <link rel="manifest"> on every page. Absent means no manifest: it is a claim that a site is meant to be installed, and most are not.',properties:{backgroundColor:{type:"string"},categories:{items:{type:"string"},type:"array"},description:{type:"string"},dir:{enum:["ltr","rtl","auto"],type:"string"},display:{default:"standalone",enum:["fullscreen","standalone","minimal-ui","browser"],type:"string"},enabled:{default:!0,type:"boolean"},icons:{description:"Icons at 192px and 512px are what browsers require before offering to install the site; the build warns when either is missing.",items:{additionalProperties:!1,properties:{purpose:{type:"string"},sizes:{examples:["192x192"],type:"string"},src:{type:"string"},type:{type:"string"}},required:["src"],type:"object"},type:"array"},lang:{type:"string"},name:{description:"Defaults to the project name.",type:"string"},orientation:{type:"string"},scope:{type:"string"},shortName:{type:"string"},startUrl:{default:"/",type:"string"},themeColor:{type:"string"}},type:"object"},serviceWorker:{default:!1,description:"W3C Service Worker, emitted as sw.js. Off unless declared — a worker is sticky, so it "+"is the one output that can keep breaking visitors after a deploy tries to fix them. **Turning it off means `false`, not deleting the key**: `false` emits a tombstone at the same URL that unregisters the old worker and clears its caches, and a 404 there is not an instruction to stop. HTML is always network-first; only the content-addressed /images/_optimized/* is served cache-first.",oneOf:[{type:"boolean"},{additionalProperties:!1,properties:{enabled:{default:!0,type:"boolean"},offlineFallback:{description:"Page served for a failed navigation. Added to `precache` if not already there.",type:"string"},precache:{description:"Site-absolute URLs fetched at install time. Each must be a file this build produces; one that is not fails the build, because a single unreachable entry stops the worker installing at all.",items:{pattern:"^/",type:"string"},type:"array"},scope:{default:"/",type:"string"}},type:"object"}]},securityTxt:{additionalProperties:!1,description:"RFC 9116 security.txt, emitted at .well-known/security.txt. `expires` is required by "+"§2.5.5 and an absent or past value is a build error — an expired file advertises a "+"reporting channel while telling the reporter not to trust it. A hand-placed public/.well-known/security.txt shadows this, which is how a clearsigned file ships.",properties:{acknowledgments:{items:{type:"string"},type:"array"},canonical:{type:"string"},contact:{description:"At least one mailto:, https: or tel: URI (§2.5.3).",items:{type:"string"},type:"array"},enabled:{default:!0,type:"boolean"},encryption:{items:{type:"string"},type:"array"},expires:{format:"date-time",type:"string"},hiring:{items:{type:"string"},type:"array"},policy:{items:{type:"string"},type:"array"},preferredLanguages:{description:"BCP 47 tags, validated and canonicalized like i18n.locales.",items:{pattern:xC,type:"string"},type:"array"}},type:"object"},i18n:{description:"Internationalization configuration.",properties:{defaultLocale:{description:"Default locale, as a BCP 47 language tag. The pattern catches shape errors (`en_US`, `en--US`); the build is the authority on well-formedness.",examples:["en"],pattern:xC,type:"string"},locales:{description:"Available locales, as BCP 47 language tags.",examples:[["en","fr","de"]],items:{pattern:xC,type:"string"},type:"array"},routing:{description:"Locale routing strategy.",enum:["prefix-except-default","prefix-always"],type:"string"}},type:"object"},images:{$ref:"#/$defs/ImageConfig"},imports:{additionalProperties:{type:"string"},description:"Global import map: $prototype names to .class.json file paths. Makes external classes available by name in all pages.",examples:[{Markdown:"@jxsuite/parser/Markdown.class.json",MarkdownCollection:"@jxsuite/parser/MarkdownCollection.class.json"}],type:"object"},name:{default:"Jx Site",description:"Human-readable project name.",examples:["My Portfolio","Jx Example Site"],type:"string"},redirects:{additionalProperties:{oneOf:[{description:"Destination path or URL; implies a 301.",type:"string"},{additionalProperties:!1,description:"A redirect with an explicit RFC 9110 §15.4 status.",properties:{destination:{type:"string"},status:{default:301,description:"RFC 9110 §15.4 redirection status. 307 and 308 preserve the request method; "+"301 and 302 historically do not.",enum:[...aw],type:"integer"}},required:["destination"],type:"object"},{additionalProperties:!1,description:"A rewrite (proxy): the destination's content is served AT the source URL, with no "+"redirect. Emitted as status 200 in `_redirects`, which is the host convention — "+"not an HTTP redirection status.",properties:{destination:{type:"string"},rewrite:{const:!0,type:"boolean"}},required:["destination","rewrite"],type:"object"}]},description:"Static redirect and rewrite rules. Keys are source paths in URLPattern pathname syntax.",examples:[{"/api/*":{destination:"https://api.example.com/*",rewrite:!0},"/legacy/*":{destination:"/archive/*",status:308},"/old-about":"/about"}],propertyNames:{pattern:"^/"},type:"object"},state:{description:"Site-wide reactive state available to all pages.",type:"object"},style:{additionalProperties:{oneOf:[{type:"string"},{type:"number"},{$ref:"#/$defs/StyleObject"}]},description:"Global CSS styles applied to the <body> element. Uses the same camelCase CSSOM convention and recursive selector/at-rule nesting as component styles.",type:"object"},url:{description:"Production URL of the deployed site.",examples:["https://example.com","https://jxsuite.com"],type:"string"}},type:"object"};var Te={additionalProperties:!1,description:"Schema for jx-extension.json manifests. Located at the extension package root and exported so hosts can resolve <package>/jx-extension.json through the exports map.",properties:{$schema:{type:"string"},classes:{additionalProperties:{type:"string"},description:"$prototype-visible class name → class descriptor path, relative to the manifest.",type:"object"},description:{description:"One-line description.",type:"string"},name:{description:"Package name; must match package.json.",type:"string"},schemas:{additionalProperties:!1,description:"Schema fragments this package contributes, relative to the manifest.",properties:{document:{description:"Document-schema fragment (positions like $paths values).",type:"string"},fields:{description:"Field-union fragment: its $defs members are unioned into the per-project "+"field-schema resource as extension field extras (specs/extensions.md §5.3).",type:"string"},project:{description:"Project-schema fragment (top-level project.json sections).",type:"string"}},type:"object"},title:{description:"Human-readable name for studio surfaces.",type:"string"}},required:["name"],type:"object"};var De=["literal","ref","template","expression","function"],Vo={expression:"Formula",function:"Inline function",literal:"Fixed value",ref:"From data…",template:"Mixed text"},G_={expression:"Computed from other values, built up operator by operator.",function:"Code that runs when this fires.",literal:"A value you type here, the same every time.",ref:"The current value of a signal, picked from a list.",template:"Text with ${…} placeholders that fill in from signals."};function ju(e){if(Ie(e))return"ref";if(Ma(e))return"function";if(Pa(e))return"template";if(S(e)&&"$expression"in e)return"expression";return"literal"}var Je={oneOf:[{$ref:"#/$defs/RefObject"},{$ref:"#/$defs/ExpressionEntry"},{$ref:"#/$defs/FunctionDef"}]},qe=new Map([["ExpressionEntry",ne],["FunctionDef",oe],["RefObject",X],["StyleObject",I]]);function Le(e){let{properties:t,required:r}=e;return Array.isArray(r)&&r.includes("$ref")&&v(t)&&Boolean(t.$ref)}function Ve(e){let{required:t}=e;return Array.isArray(t)&&t.includes("$expression")}function He(e){let{properties:t}=e;return v(t)&&v(t.$prototype)&&t.$prototype.const==="Function"}function _e(e){return e.type==="string"&&e.pattern===void 0&&e.enum===void 0&&e.const===void 0}var We=new Set(["array","boolean","integer","null","number","object","string"]);function ie(e,t){if(!v(e))return;if(t.seen.has(e))return;t.seen.add(e);let r=n(e.$ref)?e.$ref:void 0;if(r!==void 0&&Object.keys(e).length===1){let o=r.startsWith("#/$defs/")?r.slice(8):r,l=qe.get(o);if(l)ie(l,t);else t.unresolved.add(r);return}if(Le(e)){t.found.add("ref");return}if(Ve(e)){t.found.add("expression");return}if(He(e)){t.found.add("function");return}let a=!1;for(let o of["oneOf","anyOf","allOf"]){let l=e[o];if(Array.isArray(l)){a=!0;for(let y of l)ie(y,t)}}if(a)return;if(_e(e)){t.found.add("literal"),t.found.add("template");return}if(e.enum!==void 0||e.const!==void 0){t.found.add("literal");return}if(n(e.type)&&We.has(e.type))t.found.add("literal")}function Ue(e){let t={found:new Set,seen:new Set,unresolved:new Set};return ie(e,t),{caps:De.filter((r)=>t.found.has(r)),unresolved:[...t.unresolved].toSorted()}}function ae(e){return Ue(e).caps}var ze={anyOf:[K,...G.anyOf.slice(1)]},LD=B.anyOf.map((e)=>e.properties.operator.const),Be={attribute:Q.additionalProperties,componentProp:ee.additionalProperties,elementProperty:te,eventHandler:Je,repeaterFilter:L.properties.filter,repeaterItems:L.properties.items,repeaterSort:L.properties.sort,styleProperty:I.additionalProperties,switchDiscriminant:re,elementTag:ze,textProperty:Y},de=new Map;function AE(e){let t=de.get(e);if(t)return t;let r=ae(Be[e]);return de.set(e,r),r}function Dd(e){return n(e)?AE(e):ae(e.schema)}function me(e){return{anyOf:[ae(e).length>0?e:{type:"string"},{$ref:"#/$defs/RefObject"}]}}var pe=new Map,se=new Map;function ce(e,t){return`${u.value?.id??"-"}|${e}|${t}`}function ue(e){return`${u.value?.id??"-"}|${e}`}function fp(e,t,r){pe.set(ce(e,t),$e(r))}function mp(e,t){return pe.has(ce(e,t))}function Ge(e,t){return $e(pe.get(ce(e,t)))}function Ke(e,t){se.set(ue(e),t)}function fe(e){return e==="literal"||e==="template"}function Hu(e,t){let r=ue(e),a=ju(t),o=se.get(r),l=o!==void 0&&fe(o)&&fe(a)?o:a;return se.set(r,l),l}function Bu(e,t){switch(e){case"ref":{let[r]=t.stateDefs;return r?{$ref:`#/state/${r}`}:{$ref:t.extraSignals?.[0]?.value??""}}case"template":{let[r]=t.stateDefs;return r?`\${state.${r}}`:"${}"}case"expression":return{$expression:{operator:"??",target:null,value:null}};case"function":return{$prototype:"Function",body:"",parameters:[]};default:return t.literalDefault}}function Nd(e,t,r,a,o){return fp(e,t,a),Ke(e,r),mp(e,r)?Ge(e,r):o}var he={$schema:"https://jxsuite.com/schema/v1",$id:"StudioSchemaForm",$description:"The shared schema→form engine as a document: one row per property of a JSON Schema, drawn from a projection `ui/schema-form.ts` computes. Nothing here reads a schema. The flow decides which of nine controls a property gets, what its options are, which rungs of the value ladder the position permits, what a commit is worth and whether the value is refused; this document draws the answer. That split is what lets the Entry editor, Project Settings and the Signals panel all embed the same form and get the same row — and it is why the engine hands back a HOST ELEMENT rather than a template: a document clears the host it is given, so a caller that is still lit renders an empty element for it and puts it in its own tree (studio-ui-guidelines.md §9.3, §9.4).",tagName:"div",attributes:{part:"form"},style:{$description:"What `.style-row`, `.style-row-label`, `.style-row--invalid`, `.style-row-error`, `.style-row-error-count`, `.array-object-field`, `.array-object-row` and `.schema-param-editor` said in `styles/inspector.css`, keyed on `part` and re-pointed at the studio token layer. Those rules are DEAD in the stylesheet now rather than shared: `ui/field-row.ts` drew the same row for the inspector panels and `ui/expression-editor.ts` the same array rows, and both converted, so this document's copy is the only emitter left. Every `--spectrum-font-size-*` reference is gone rather than renamed — those names resolve only inside `<sp-theme>`, and a document mounted in a settings pane or an entry editor is outside it, so each would silently have taken its hard-coded fallback.",display:"contents",'& [part="field"]':{padding:"var(--jx-space-1) 0"},'& [part="value"]':{$description:"The control line: the source chip, then whatever the rung draws. `min-width: 0` is load-bearing — without it a monospaced pointer or a long JSON line pushes the row past the pane's right edge instead of scrolling inside its own control.",display:"flex",alignItems:"flex-start",gap:"var(--jx-space-2)",minWidth:"0"},'& [part="value"] > *':{minWidth:"0"},'& [part="widget"] > *':{$description:"The switch wrapper is `display: contents`, so whatever rung it drew is the flex item of the line above rather than a box inside a box — which is what keeps `min-width: 0` reaching the control that actually needs it.",flex:"1",minWidth:"0"},'& [part="source"]':{$description:"Quiet while the value is fixed, accent-tinted the moment it is produced from something else — the one place in the row that says a value is not what it looks like.",flex:"none",color:"var(--fg-dim)",fontSize:"var(--jx-text-sm)"},'& [part="source"][data-source="bound"]':{color:"var(--accent)"},'& [part="pointer-group"]':{display:"flex",flex:"1",gap:"var(--jx-space-2)",minWidth:"0"},'& [part="pointer-group"] > *':{flex:"1",minWidth:"0"},'& [part="json"]':{display:"flex",flexDirection:"column",flex:"1",gap:"var(--jx-space-1)",minWidth:"0"},'& [part="chips"]':{display:"flex",flexWrap:"wrap",gap:"var(--jx-space-1)"},'& [part="chip"]':{padding:"1px var(--jx-space-2)",borderRadius:"var(--radius)",background:"var(--bg)",fontSize:"var(--jx-text-sm)",color:"var(--fg-dim)"},'& [part="rows"]':{display:"flex",flexDirection:"column",flex:"1",gap:"var(--jx-space-1)",minWidth:"0"},'& [part="row"]':{$description:"Wraps rather than scrolls: an item with five declared properties in a 260px inspector is a column of controls, not a horizontal scroller nobody finds the end of.",display:"flex",flexWrap:"wrap",alignItems:"center",gap:"var(--jx-space-1)",minWidth:"0"},'& [part="row"] > [part="cell"]:only-of-type > *':{$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.",flex:"1",minWidth:"0"},'& [part="row-add"]':{alignSelf:"flex-start"},'& [part="field-error"]':{$description:"The left rule is what makes the line read as belonging to the control above it rather than to the row below.",margin:"var(--jx-space-1) 0 0",paddingLeft:"var(--jx-space-2)",borderLeft:"2px solid var(--danger)",fontSize:"var(--jx-text-sm)",lineHeight:"1.35",color:"var(--danger)"},'& [part="field-error-count"]':{marginLeft:"var(--jx-space-1)",fontFamily:"var(--font-mono)",opacity:"0.75"}},children:[{$prototype:"Array",items:{$ref:"#/state/fields"},key:{$ref:"$map/item/key"},map:{$description:"One property of the schema. `jx-field` owns the label, the required mark, the invalid shade and the association between the label and whatever control ends up in the slot, so none of that is written here — which is the whole of what the four hand-rolled `.style-row` variants used to carry.",tagName:"jx-field",attributes:{part:"field","data-prop":"${$map.item.prop}"},$props:{label:{$ref:"$map/item/label"},description:{$ref:"$map/item/description"},required:{$ref:"$map/item/required"},invalid:{$ref:"$map/item/invalid"},span:!0},children:[{tagName:"div",attributes:{part:"value",role:"none"},children:[{tagName:"span",attributes:{part:"source-slot",role:"none"},style:{display:"contents"},$switch:{$ref:"$map/item/hasChip"},cases:{true:{$description:"The Value Source chip (§6.6): what produces this value, in the same four words every other bindable position in Studio uses. It opens the rung picker rather than cycling, so any rung the position permits is one action away. Drawn only where the host named somewhere a value could come from — a settings form that names none edits fixed values and shows no chip.",tagName:"jx-action-button",attributes:{part:"source","data-source":"${$map.item.source}"},$props:{label:{$ref:"$map/item/sourceName"},hint:{$ref:"$map/item/sourceHint"},size:"sm",haspopup:"menu",disabled:{$ref:"$map/item/sourceLocked"}},onclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/pickSource"},value:[{$ref:"$map/item/key"},{$ref:"event#/currentTarget"}]}]},children:[{tagName:"span",textContent:"${$map.item.sourceLabel}"}]}}},{tagName:"span",attributes:{part:"widget",role:"none"},style:{display:"contents"},$switch:{$ref:"$map/item/kind"},cases:{text:{$description:"The default control, and the one every scalar without a narrower answer lands on. Commits on input, debounced by the flow, which is what makes the canvas and the preview follow a value being typed rather than waiting for a blur.",tagName:"jx-textfield",attributes:{part:"text"},$props:{label:{$ref:"$map/item/label"},value:{$ref:"$map/item/value"},placeholder:{$ref:"$map/item/placeholder"},size:"sm",invalid:{$ref:"$map/item/invalid"},mono:{$ref:"$map/item/mono"},multiline:{$ref:"$map/item/multiline"},type:{$ref:"$map/item/inputType"}},oninput:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/edit"},value:[{$ref:"$map/item/key"},{$ref:"event#/target/value"}]}]},onchange:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/commit"},value:[{$ref:"$map/item/key"},{$ref:"event#/target/value"}]}]}},template:{$description:"The Mixed text rung: a string with `${…}` holes in it. Monospaced because what is being written is half text and half pointer, and committed on change rather than on input — a half-typed placeholder is not a template anybody meant.",tagName:"jx-textfield",attributes:{part:"template"},$props:{label:{$ref:"$map/item/label"},value:{$ref:"$map/item/value"},placeholder:"${state.templatePlaceholder}",size:"sm",mono:!0},onchange:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/commit"},value:[{$ref:"$map/item/key"},{$ref:"event#/target/value"}]}]}},pointer:{$description:"The From data… rung. It is TWO controls over one value because the kit has no combobox and this rung needs one: the list is a set of suggestions rather than a whitelist (a value may point at a route param, a signal, or a pointer neither the form nor its host enumerates), so the select offers what the host named and the field accepts anything. Picking a row writes the field; typing a pointer the host never named leaves the select showing it, because a select whose value matches no option synthesises the row rather than lying about what it holds.",tagName:"span",attributes:{part:"pointer-group",role:"none"},children:[{tagName:"jx-textfield",attributes:{part:"pointer"},$props:{label:"${$map.item.label} pointer",value:{$ref:"$map/item/value"},placeholder:"#/state/…",size:"sm",mono:!0},onchange:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/commit"},value:[{$ref:"$map/item/key"},{$ref:"event#/target/value"}]}]}},{tagName:"span",attributes:{part:"pointer-pick-slot",role:"none"},style:{display:"contents"},$switch:{$ref:"$map/item/hasOptions"},cases:{true:{tagName:"jx-select",attributes:{part:"pointer-pick"},$props:{label:"${$map.item.label} source",options:{$ref:"$map/item/options"},value:{$ref:"$map/item/value"},size:"sm"},onchange:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/commit"},value:[{$ref:"$map/item/key"},{$ref:"event#/target/value"}]}]}}}}]},select:{$description:"A closed set the schema itself declares, or one the host resolved through a `#/$context/…` pointer. The empty row is offered only where the property is optional — a required field has no “none” to choose.",tagName:"jx-select",attributes:{part:"select"},$props:{label:{$ref:"$map/item/label"},options:{$ref:"$map/item/options"},value:{$ref:"$map/item/value"},size:"sm",invalid:{$ref:"$map/item/invalid"}},onchange:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/commit"},value:[{$ref:"$map/item/key"},{$ref:"event#/target/value"}]}]}},checkbox:{tagName:"jx-checkbox",attributes:{part:"checkbox"},$props:{label:{$ref:"$map/item/label"},checked:{$ref:"$map/item/checked"},size:"sm"},onchange:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/commitChecked"},value:[{$ref:"$map/item/key"},{$ref:"event#/target/checked"}]}]}},number:{$description:"`min`, `max` and `step` come straight off the property schema, so the control refuses out-of-range input before the flow has to say why. The stepper is off: these are configuration values that get typed, not nudged.",tagName:"jx-number-field",attributes:{part:"number"},$props:{label:{$ref:"$map/item/label"},value:{$ref:"$map/item/value"},placeholder:{$ref:"$map/item/placeholder"},min:{$ref:"$map/item/min"},max:{$ref:"$map/item/max"},step:{$ref:"$map/item/step"},size:"sm"},onchange:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/commit"},value:[{$ref:"$map/item/key"},{$ref:"event#/target/value"}]}]}},json:{$description:"A value with structure, edited as the JSON it is. The chips above it are a read of the shape currently held — property name and declared type — so the common case (“what is in here?”) is answered without reading the text. The flow parses on a debounce and keeps the last parsable value; a mid-keystroke `{` is not a refusal.",tagName:"span",attributes:{part:"json",role:"none"},children:[{tagName:"span",attributes:{part:"chips-slot",role:"none"},style:{display:"contents"},$switch:{$ref:"$map/item/hasChips"},cases:{true:{tagName:"span",attributes:{part:"chips",role:"none"},children:[{$prototype:"Array",items:{$ref:"$map/item/chips"},key:{$ref:"$map/item/key"},map:{tagName:"span",attributes:{part:"chip"},textContent:"${$map.item.label}"}}]}}},{tagName:"jx-textfield",attributes:{part:"json-text"},$props:{label:{$ref:"$map/item/label"},value:{$ref:"$map/item/value"},placeholder:{$ref:"$map/item/placeholder"},size:"sm",mono:!0,multiline:!0,grows:!0},oninput:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/editJson"},value:[{$ref:"$map/item/key"},{$ref:"event#/target/value"}]}]}}]},rows:{$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.",tagName:"span",attributes:{part:"rows",role:"none"},children:[{$prototype:"Array",items:{$ref:"$map/item/rows"},key:{$ref:"$map/item/key"},map:{tagName:"span",attributes:{part:"row",role:"none","data-row":"${$map.item.key}"},children:[{$prototype:"Array",items:{$ref:"$map/item/cells"},key:{$ref:"$map/item/id"},map:{tagName:"span",attributes:{part:"cell",role:"none"},style:{display:"contents"},$switch:{$ref:"$map/item/kind"},cases:{text:{tagName:"jx-textfield",attributes:{part:"cell-text"},$description:"Committed on input AND on change: a cell showing a pointer is committed when it is left, exactly as the pointer field above is, and a cell showing text follows the canvas while it is typed. The two never disagree — a change after an input carries the same string.",$props:{label:{$ref:"$map/item/label"},value:{$ref:"$map/item/value"},placeholder:{$ref:"$map/item/label"},size:"sm"},oninput:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/editCell"},value:[{$ref:"$map/item/field"},{$ref:"$map/item/row"},{$ref:"$map/item/key"},{$ref:"event#/target/value"}]}]},onchange:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/editCell"},value:[{$ref:"$map/item/field"},{$ref:"$map/item/row"},{$ref:"$map/item/key"},{$ref:"event#/target/value"}]}]}},select:{tagName:"jx-select",attributes:{part:"cell-select"},$props:{label:{$ref:"$map/item/label"},options:{$ref:"$map/item/options"},value:{$ref:"$map/item/value"},size:"sm"},onchange:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/editCell"},value:[{$ref:"$map/item/field"},{$ref:"$map/item/row"},{$ref:"$map/item/key"},{$ref:"event#/target/value"}]}]}},checkbox:{tagName:"jx-checkbox",attributes:{part:"cell-checkbox"},$props:{label:{$ref:"$map/item/label"},checked:{$ref:"$map/item/checked"},size:"sm"},onchange:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/editCellChecked"},value:[{$ref:"$map/item/field"},{$ref:"$map/item/row"},{$ref:"$map/item/key"},{$ref:"event#/target/checked"}]}]}},number:{tagName:"jx-number-field",attributes:{part:"cell-number"},$props:{label:{$ref:"$map/item/label"},value:{$ref:"$map/item/value"},size:"sm"},onchange:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/editCell"},value:[{$ref:"$map/item/field"},{$ref:"$map/item/row"},{$ref:"$map/item/key"},{$ref:"event#/target/value"}]}]}},control:{$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.",tagName:"span",attributes:{part:"cell-control-host","data-control":"${$map.item.id}",role:"none"}}}}},{tagName:"jx-action-button",attributes:{part:"row-remove"},$props:{icon:"trash",label:"${$map.item.removeLabel}",size:"sm"},onclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/removeRow"},value:[{$ref:"$map/item/field"},{$ref:"$map/item/key"}]}]}}]}},{tagName:"jx-action-button",attributes:{part:"row-add"},$props:{icon:"plus",label:"${$map.item.addLabel}",size:"sm"},onclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/addRow"},value:[{$ref:"$map/item/key"}]}]},children:[{tagName:"span",textContent:"Add"}]}]},control:{$description:"A field a registered control owns outright — `schema-builder`, `secret`, or the `reference` picker. The document draws the empty host and the flow MOUNTS the control into it: the registry's contract (specs/extensions.md §9.1) is a control that owns a host, all three built-ins are documents of their own, and a document clears the host it is given — which is why this node is drawn empty and never written to twice.",tagName:"div",attributes:{part:"control-host","data-control":{$ref:"$map/item/key"},role:"none"}}}}]},{tagName:"span",attributes:{part:"error-slot",role:"none"},style:{display:"contents"},$switch:{$ref:"$map/item/hasError"},cases:{true:{$description:'§16.1\'s inline tier: why this value is refused, said AT the control that refuses it and for exactly as long as the value stays bad. `role="alert"` so it is announced when it appears, and a repeat counter from two up — “it refused me again” is otherwise indistinguishable from “the field is still red from last time”.',tagName:"p",attributes:{part:"field-error",role:"alert"},children:[{tagName:"span",attributes:{part:"field-error-text"},textContent:"${$map.item.error}"},{tagName:"span",attributes:{part:"error-count-slot",role:"none"},style:{display:"contents"},$switch:{$ref:"$map/item/hasCount"},cases:{true:{tagName:"span",attributes:{part:"field-error-count"},textContent:"${$map.item.errorCount}"}}}]}}}]}}]};T("schema-form",he);function Qe(e,t){let r=t?.$map,a=v(r)&&v(r.item)?r.item:void 0,o=e==="control-host"?a?.key:e==="cell-control-host"?a?.id:void 0;return n(o)?o:""}function Ze(e){let t=n(e)?void 0:e.attributes?.part;return n(t)?t:""}function ye(e,t,r){let a=document.createElement("div");a.style.display="contents";let o=g({...e,...t,templatePlaceholder:"${state.…}"}),l=null,y=!1,b=!1;function d(){y=!0,R("schema-form",o,a,{onNodeCreated:(m,f,x,j)=>{if(!(m instanceof HTMLElement))return;let k=Qe(Ze(x),j);if(k!=="")r(k,m)}}).then((m)=>{if(y=!1,b){m.dispose();return}l=m})}return d(),{dispose(){b=!0,l?.dispose(),l=null,a.textContent=""},host:a,update(m){if(o.fields=m.fields,b||y||l!==null&&a.contains(l.root))return;l?.dispose(),l=null,a.textContent="",d()}}}var P=new Map;function lw(e,t){P.set(e,t)}var et=/^#\/content\/([^/]+)$/;function zu(e){let t=e?.$ref,r=n(t)?et.exec(t):null;return r?r[1]:null}var ge={resolvePointer:()=>{}};function xe(e,t,r){if(Array.isArray(e))return e;let a;if(v(e)){let l=e.$ref;if(n(l))a=l}else if(n(e))a=e;if(a===void 0||!t)return;let o=t.resolvePointer(a,r);if(Array.isArray(o))return o.map(String);if(v(o))return Object.keys(o);return}function be(e,t){if(e.trim()==="")return Number.NaN;return t?Math.trunc(Number(e)):Number(e)}function Se(e){return e.format!=="json-schema"&&e.type!=="object"&&e.type!=="array"}function tt(e){return[...(e.signals??[]).map((t)=>({label:t,value:`#/state/${t}`})),...(e.params??[]).map((t)=>({label:`$params/${t}`,value:`#/$params/${t}`}))]}var N="__none__";function ve(e){if(e===void 0||e===null)return"";return S(e)?JSON.stringify(e,null,2):String(e)}function rt(e,t,r){if(Ie(t))return"";if(t===void 0||t===null||t==="")return r?"Required.":"";if(Array.isArray(e.enum)&&!e.enum.includes(t))return`Choose one of: ${e.enum.map(String).join(", ")}.`;if(e.type==="number"||e.type==="integer"){let o=Z(t)?t:Number(t);if(!Number.isFinite(o))return"Enter a number.";if(e.type==="integer"&&!Number.isInteger(o))return"Enter a whole number.";if(e.minimum!==void 0&&o<e.minimum)return`Must be ${e.minimum} or more.`;if(e.maximum!==void 0&&o>e.maximum)return`Must be ${e.maximum} or less.`;return""}if(e.type==="boolean"&&!Xe(t))return"Must be true or false.";if(e.type==="array"&&!Array.isArray(t))return"Must be a list.";if(e.type==="object"&&!v(t))return"Must be an object.";return""}var ot=500,nt=400,_=new Map;function jl(e,t,r,a){it(e);let o=_.get(e);if(!o)o=at(),_.set(e,o);return o.update(t,r,a),o.host}function it(e){for(let[t,r]of _)if(t!==e&&!r.host.isConnected)r.dispose(),_.delete(t)}function at(){let e={},t={},r={onChange:()=>{}},a=ge,o=new Map,l=new Map,y=new Map,b=new Map,d=null,m=(i,s,c)=>{if(clearTimeout(l.get(i)),s<=0){c();return}l.set(i,setTimeout(c,s))},f=(i,s)=>{clearTimeout(l.get(i)),l.delete(i),s()},x=(i,s)=>{r.onChange({[i]:s})},j=(i,s)=>{if(i.commit==="none")return;switch(i.commit){case"ref":{let c=s.trim();x(i.prop,c?{$ref:c}:void 0);return}case"template":{x(i.prop,s);return}case"select":{x(i.prop,s===N?void 0:s);return}case"number":{let c=be(s,i.schema.type==="integer");x(i.prop,Number.isNaN(c)?void 0:c);return}case"json":{try{x(i.prop,JSON.parse(s))}catch{}return}default:{if(i.member!==void 0){let c=t[i.prop],h=v(c)?{...c}:{};if(s)h[i.member]=s;else delete h[i.member];x(i.prop,Object.keys(h).length>0?h:void 0);return}x(i.prop,s||void 0)}}},k=(i,s)=>{let c;if(s.length>0)c=i.scalarItems?s.map((h)=>h[le]??""):s;x(i.prop,c)},A=(i)=>{let s=[];for(let c of i.rows??[])s.push({...c});return s},W={addRow:(i)=>{let s=o.get(i);if(!s?.itemProps)return;let c={};for(let[h,w]of Object.entries(s.itemProps))if(w.default!==void 0)c[h]=w.default;k(s,[...A(s),c]),r.rerender?.()},commit:(i,s)=>{let c=o.get(i);if(c)f(i,()=>j(c,s))},commitChecked:(i,s)=>{let c=o.get(i);if(c)x(c.prop,s)},edit:(i,s)=>{let c=o.get(i);if(c&&c.debounceMs>0)m(i,c.debounceMs,()=>j(c,s))},editCell:(i,s,c,h)=>{p(i,s,c,h)},editCellChecked:(i,s,c,h)=>{p(i,s,c,h)},editJson:(i,s)=>{let c=o.get(i);if(c)m(i,ot,()=>j(c,s))},pickSource:(i,s)=>{U(i,s)},removeRow:(i,s)=>{let c=o.get(i);if(!c)return;let h=Number(s);k(c,A(c).filter((w,E)=>E!==h)),r.rerender?.()}};function p(i,s,c,h){let w=o.get(i);if(!w?.itemProps)return;let E=Number(s),q=A(w),M=q[E];if(!M)return;let F=w.itemProps[c];q[E]={...M,[c]:V(F,h,w.refCells?.has(`${i}/${s}/${c}`)??!1)},k(w,q)}function V(i,s,c){if(Xe(s))return s;let h=String(s);if(c){let w=h.trim();return w?{$ref:w}:void 0}if(i?.type==="integer"||i?.type==="number"){let w=be(h,i.type==="integer");return Number.isNaN(w)?void 0:w}if(h===N||h==="")return;return h}function U(i,s){let c=o.get(i);if(!c?.ladder)return;let{fieldKey:h,mode:w,offered:E,sources:q}=c.ladder;d?.close(),d=Xt({label:"Value source",onClosed:()=>{d=null},opener:s,region:"value-source",rows:E.map((M)=>({checked:M===w?"true":"false",destructive:!1,disabled:!1,dividerAbove:!1,id:M,title:Vo[M]})),run:(M)=>{let F=E.find((ke)=>ke===M);if(F===void 0||F===w)return;let z=c.schema.default;if(w==="ref"&&z!==void 0&&!mp(h,"literal"))fp(h,"literal",z);x(c.prop,Nd(h,w,F,$e(t[c.prop]),Bu(F,{extraSignals:q,literalDefault:z,stateDefs:[]})))}})}function D(i){let s=o.get(i);if(s?.control)return{args:{ctx:a,key:s.prop,onChange:(c)=>x(s.prop,c),rerender:r.rerender,schema:s.schema,value:t[s.prop]},control:s.control};for(let c of o.values()){let h=c.cellControls?.get(i);if(!h)continue;let w=(c.rows??[])[Number(h.row)]??{};return{args:{ctx:a,key:h.key,onChange:(E)=>p(c.prop,h.row,h.key,E),rerender:r.rerender,schema:h.schema,value:w[h.key]},control:h.control}}return}function J(i,s){let c=D(i);if(!c)return;let h=b.get(i);if(h?.host===s){h.handle.update(c.args);return}h?.handle.dispose(),b.set(i,{handle:c.control.mount(s,c.args),host:s})}function H(){for(let[i,s]of b)if(!D(i))s.handle.dispose(),b.delete(i)}function O(){H();for(let[i,s]of y)J(i,s)}let C=ye({fields:[]},W,(i,s)=>{y.set(i,s),J(i,s)});return{dispose(){for(let i of l.values())clearTimeout(i);l.clear(),d?.close(),d=null;for(let i of b.values())i.handle.dispose();b.clear(),y.clear(),o.clear(),C.dispose()},host:C.host,update(i,s,c){e=i,t=s,r=c,a=c.context??ge,o.clear(),C.update({fields:st(e,t,r,a,o)}),O()}}}function st(e,t,r,a,o){let l=new Set(e.required),y=tt(a);return Object.entries(e.properties??{}).flatMap(([b,d])=>{let m={ctx:a,opts:r,plans:o,required:l.has(b),sources:y,value:t},f=je(b,d,m);return f.kind==="control"&&we(d)&&d.properties?.alt?[f,lt(b,m)]:[f]})}var pt=new Set(["src","alt","width","height","title"]);function we(e){let t=e.properties??{};return e.type==="object"&&t.src?.type==="string"&&Object.keys(t).every((r)=>pt.has(r))}function ct(e){let t=(r)=>{let a=v(r.value)?r.value:{},{src:o}=a;return{...r,onChange:(l)=>{if(l===o)return;let{height:y,width:b,...d}=a,m;if(l!==void 0&&l!=="")m={...d,src:l};r.onChange(m)},value:n(o)?o:void 0}};return{mount(r,a){let o=e.mount(r,t(a));return{dispose:()=>o.dispose(),update:(l)=>o.update(t(l))}}}}function lt(e,t){let r=`${e}/alt`,a=t.value[e],o=v(a)?a.alt:void 0,l=je(r,{type:"string"},{...t,required:!1}),y=t.plans.get(r);if(y)y.prop=e,y.member="alt";return{...l,label:`${t.opts.ui?.[e]?.label??e} alt text`,value:n(o)?o:""}}function je(e,t,r){let{ctx:a,opts:o,plans:l,required:y,sources:b,value:d}=r,m=d[e],f={commit:"text",debounceMs:nt,prop:e,schema:t};l.set(e,f);let x=o.errors?.[e]||rt(t,m,Boolean(o.showRequired)&&y),j=o.errorCounts?.[e],k=o.ui?.[e]?.control,A=k?P.get(k):void 0,W=b.length>0&&Se(t)&&!k,p={addLabel:`Add ${e}`,checked:!1,chips:[],description:t.description??"",error:x,errorCount:j!==void 0&&j>1?`×${j}`:"",hasChip:!1,hasChips:!1,hasCount:j!==void 0&&j>1,hasError:x!=="",hasOptions:!1,invalid:x!=="",key:e,kind:"text",label:o.ui?.[e]?.label??e,max:"",min:"",mono:!1,multiline:!1,inputType:"text",options:[],placeholder:"",prop:t.name||e,required:y,rows:[],source:"fixed",sourceHint:"",sourceLabel:"",sourceLocked:!1,sourceName:"",step:"",value:""};if(W){let O=`${a.fieldKeyPrefix??""}.${e}`,C=Hu(O,m),i=Dd({schema:me(t)});if(f.ladder={fieldKey:O,mode:C,offered:i,sources:b},p.hasChip=!0,p.sourceLabel=Vo[C],p.sourceHint=G_[C],p.source=C==="literal"?"fixed":"bound",p.sourceLocked=!i.some((s)=>s!==C),p.sourceName=p.sourceLocked?`Value source: ${p.sourceLabel} (no other source available here)`:`Value source: ${p.sourceLabel} — click to change`,C==="ref")return f.commit="ref",f.debounceMs=0,p.kind="pointer",p.value=Ie(m)?m.$ref:"",p.options=b.map((s)=>({label:s.label,value:s.value})),p.hasOptions=p.options.length>0,p;if(C==="template")return f.commit="template",f.debounceMs=0,p.kind="template",p.value=String(m??""),p}if(A)return f.commit="none",f.control=A,p.kind="control",p;if(Ie(m)&&Se(t))return f.commit="ref",f.debounceMs=0,p.kind="text",p.mono=!0,p.value=m.$ref,p.placeholder=e,p;if(zu(t)!==null){let O=P.get("reference");if(O)return f.commit="none",f.control=O,p.kind="control",p}if(t.format==="image"){let O=P.get("media");if(O)return f.commit="none",f.control=O,p.kind="control",p}let V=we(t)?P.get("media"):void 0;if(V)return f.commit="none",f.control=ct(V),p.kind="control",p;let U=o.ui?.[e]?.enum??t.enum,D=xe(U,a,d);if(D)return f.commit="select",f.debounceMs=0,p.kind="select",p.value=m!==void 0?String(m):t.default!==void 0?String(t.default):N,p.options=[...y?[]:[{label:"—",value:N}],...D.map((O)=>({label:O,value:O}))],p;if(t.type==="boolean")return f.commit="none",p.kind="checkbox",p.checked=Boolean(m??t.default??!1),p;if(t.type==="integer"||t.type==="number")return f.commit="number",f.debounceMs=0,p.kind="number",p.value=m!==void 0?String(m):"",p.placeholder=t.default!=null?String(t.default):"",p.min=t.minimum!==void 0?String(t.minimum):"",p.max=t.maximum!==void 0?String(t.maximum):"",p.step=t.type==="integer"?"1":"",p;if(t.format==="json-schema")return f.commit="json",p.kind="json",p.value=m!==void 0?JSON.stringify(m,null,2):"",p.placeholder=t.description??"JSON Schema defining the data shape…",p.chips=mt(m),p.hasChips=p.chips.length>0,p;if(t.type==="array"&&t.items?.type==="object"&&t.items.properties)return ft(e,t.items.properties,r,f,p);if(t.type==="array"&&ut(t.items))return ht(e,t.items,r,f,p);let J=Array.isArray(t.type)?t.type:[t.type];if(J.includes("array")||J.includes("object"))return f.commit="json",p.kind="json",p.value=m!==void 0?JSON.stringify(m,null,2):"",p.placeholder=t.default!==void 0?JSON.stringify(t.default):"",p;p.kind="text",p.value=ve(m),p.placeholder=t.default!==void 0?String(t.default):t.examples?.[0]??"",p.inputType=dt.get(t.format??"")??"text";let H=/^"?(\d{4}-\d{2}-\d{2})/.exec(p.value);if(p.inputType==="date"&&H)p.value=H[1]??p.value;return p}var dt=new Map([["date","date"],["email","email"],["uri","url"]]);function mt(e){if(!v(e))return[];let{properties:t}=e;if(e.$ref||t===null||!S(t))return[];return Object.entries(t).map(([r,a])=>({key:r,label:`${r}: ${String((v(a)?a.type:void 0)??"any")}`}))}function ft(e,t,r,a,o){let l=r.value[e],y=Array.isArray(l)?l:[];return a.commit="none",a.itemProps=t,a.rows=y,a.cellControls=new Map,a.refCells=new Set,o.kind="rows",o.rows=y.map((b,d)=>Oe(e,String(d),b,t,r,a)),o}var le="value";function ut(e){if(e===void 0||e.format==="json-schema")return!1;if(zu(e)!==null||Array.isArray(e.enum))return!0;return e.type==="string"||e.type==="number"||e.type==="integer"||e.type==="boolean"}function ht(e,t,r,a,o){let l=r.value[e],y=[];if(Array.isArray(l))y=l;else if(l!==void 0&&l!==null&&l!=="")y=[l];let b=y.map((f)=>({[le]:f})),d={[le]:t},m=r.opts.ui?.[e]?.label??e;return a.commit="none",a.itemProps=d,a.rows=b,a.scalarItems=!0,a.cellControls=new Map,a.refCells=new Set,o.kind="rows",o.rows=b.map((f,x)=>{let j=Oe(e,String(x),f,d,r,a);for(let k of j.cells)k.label=`${m} ${x+1}`;return j}),o}function Oe(e,t,r,a,o,l){return{cells:Object.entries(a).map(([y,b])=>yt(e,t,y,b,r[y],o,l)),field:e,key:t,removeLabel:`Remove ${e} ${Number(t)+1}`}}function yt(e,t,r,a,o,l,y){let b=`${e}/${t}/${r}`,d={checked:!1,field:e,id:b,key:r,kind:"text",label:r,options:[],row:t,value:""};if(Ie(o))return d.value=o.$ref,y.refCells?.add(b),d;if(zu(a)!==null){let x=P.get("reference");if(x)return d.kind="control",y.cellControls?.set(b,{control:x,key:r,row:t,schema:a}),d}let m=a.format==="image"?P.get("media"):void 0;if(m)return d.kind="control",y.cellControls?.set(b,{control:m,key:r,row:t,schema:a}),d;let f=xe(a.enum,l.ctx,l.value);if(f)return d.kind="select",d.value=o!==void 0?String(o):N,d.options=[{label:"—",value:N},...f.map((x)=>({label:x,value:x}))],d;if(a.type==="boolean")return d.kind="checkbox",d.checked=Boolean(o),d;if(a.type==="integer"||a.type==="number")return d.kind="number",d.value=o!==void 0?String(o):"",d;return d.value=ve(o),d}var gt=/^\{@(\w+)\}$/;function gp(e,t){if(!e.startsWith("#/$context/"))return;let r=[];for(let o of e.slice(11).split("/")){let l=o.match(gt);if(l){let y=t.scope?.[l[1]];if(!n(y)&&!Z(y))return;let b=String(y);if(!b)return;r.push(b)}else r.push(o)}if(r[0]==="$formats"){if(r.length!==1)return;return(t.formats??[]).map((o)=>o.name)}let a=t.projectConfig;for(let o of r){if(!S(a))return;a=a[o]}return a}
2
+ export{aw,Vo,G_,ju,LD,AE,Dd,fp,mp,Hu,Bu,Nd,lw,zu,jl,gp};
3
+
4
+ //# debugId=E233AFB8F8806BE664756E2164756E21
5
+ //# sourceMappingURL=studio-07rcfje3.js.map