@jxsuite/studio 6.1.2 → 8.0.0
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.
- package/README.md +5 -5
- package/dist/chunks/2020-5wtzce5g.js +4 -0
- package/dist/chunks/adapter-5tphg7xe.js +4 -0
- package/dist/chunks/add-new-flow-psym14sn.js +4 -0
- package/dist/chunks/cf-account-picker-haqazq5r.js +4 -0
- package/dist/chunks/cf-settings-h2wrh6hq.js +4 -0
- package/dist/chunks/{color-area-0fj8a4ga.js → color-area-6rbra5dy.js} +2 -2
- package/dist/chunks/{color-field-xch8kx2g.js → color-field-gy56c94g.js} +3 -3
- package/dist/chunks/color-m7r1vk54.js +4 -0
- package/dist/chunks/{color-slider-jxd8v350.js → color-slider-sqqdyf6c.js} +2 -2
- package/dist/chunks/{combobox-p0efwjke.js → combobox-72h32ejk.js} +3 -3
- package/dist/chunks/components-r22xca09.js +4 -0
- package/dist/chunks/content-source-mmppmcyg.js +4 -0
- package/dist/chunks/convert-to-repeater-he70fc2b.js +4 -0
- package/dist/chunks/editor-ccd9jwsa.js +4 -0
- package/dist/chunks/entry-commands-6qxz9e8p.js +4 -0
- package/dist/chunks/extension-sections-0egb88dm.js +4 -0
- package/dist/chunks/file-ops-qnab36ek.js +4 -0
- package/dist/chunks/files-rcn56qvm.js +4 -0
- package/dist/chunks/format-host-yxz0kjjs.js +4 -0
- package/dist/chunks/fs-events-d1qxq4z4.js +4 -0
- package/dist/chunks/grid-open-4z1g062t.js +4 -0
- package/dist/chunks/{grid-view-d2wq9ezg.js → grid-view-qg1b5eqx.js} +25 -25
- package/dist/chunks/{icons-pnfz478q.js → icons-63bjtbs7.js} +2 -2
- package/dist/chunks/{iframe-entry-jdcktez8.js → iframe-entry-2zggzajv.js} +4 -4
- package/dist/chunks/{iframe-entry-zap785cw.js → iframe-entry-76j8vwwx.js} +4 -4
- package/dist/chunks/iframe-entry-99nr5zfb.js +5 -0
- package/dist/chunks/{iframe-entry-x0ygf2yr.js → iframe-entry-pkgmcgp0.js} +4 -4
- package/dist/chunks/iframe-host-ssv7kyj0.js +4 -0
- package/dist/chunks/{index-zpjmzqfk.js → index-32eqzv1k.js} +3 -3
- package/dist/chunks/index-f0jn7nnp.js +4 -0
- package/dist/chunks/{javascript-m54mnwp6.js → javascript-pjp734q4.js} +3 -3
- package/dist/chunks/jsonMode-njkvsa02.js +13 -0
- package/dist/chunks/jx-validate-ttasrbh7.js +4 -0
- package/dist/chunks/layers-bgyr11tr.js +4 -0
- package/dist/chunks/layers-panel-7ez66zeq.js +4 -0
- package/dist/chunks/{listbox-e74qjyq6.js → listbox-c421cf8c.js} +2 -2
- package/dist/chunks/lit-html-v9gh687x.js +4 -0
- package/dist/chunks/media-library-sq468wts.js +4 -0
- package/dist/chunks/media-picker-shfe59pt.js +4 -0
- package/dist/chunks/{menu-n6yzswmy.js → menu-bdpzbfvs.js} +2 -2
- package/dist/chunks/{monaco-binding-7gx83x3r.js → monaco-binding-vq1hgnn0.js} +3 -3
- package/dist/chunks/monaco-buffer-3afgwvbp.js +4 -0
- package/dist/chunks/monaco-setup-xrd2cbkp.js +4 -0
- package/dist/chunks/notify-kzrjr3fv.js +4 -0
- package/dist/chunks/parse-v77xtwv7.js +4 -0
- package/dist/chunks/platform-7v4rtd7m.js +4 -0
- package/dist/chunks/popover-b89sfej7.js +4 -0
- package/dist/chunks/publish-panel-2z9gw8ee.js +4 -0
- package/dist/chunks/publish-quick-qx2455cj.js +4 -0
- package/dist/chunks/publish-workspace-wrc1dgwx.js +4 -0
- package/dist/chunks/quick-search-n0t0eqxb.js +4 -0
- package/dist/chunks/references-9547rg5s.js +4 -0
- package/dist/chunks/right-panel-wsgnr9pn.js +4 -0
- package/dist/chunks/source-control-kwktr9y6.js +4 -0
- package/dist/chunks/{split-n2gfpm5m.js → split-c9zfdgxf.js} +2 -2
- package/dist/chunks/studio-03ct6yfv.js +9 -0
- package/dist/chunks/studio-07rcfje3.js +5 -0
- package/dist/chunks/studio-3e54qh39.js +7 -0
- package/dist/chunks/studio-3exxhz5g.js +5 -0
- package/dist/chunks/studio-3q40e3rj.js +5 -0
- package/dist/chunks/studio-3qeh9t0h.js +6 -0
- package/dist/chunks/studio-3qqjeep5.js +6 -0
- package/dist/chunks/studio-43sd2mam.js +4 -0
- package/dist/chunks/studio-4hp8pkyt.js +5 -0
- package/dist/chunks/studio-58xg6j2q.js +9 -0
- package/dist/chunks/studio-5g0rprdt.js +7 -0
- package/dist/chunks/{studio-2j1cb95x.js → studio-6m380wp7.js} +4 -4
- package/dist/chunks/studio-80jyh1xh.js +4 -0
- package/dist/chunks/studio-83mk4bgg.js +9 -0
- package/dist/chunks/{studio-v0jzqdjm.js → studio-881z1xrx.js} +4 -4
- package/dist/chunks/studio-8m0y2qe7.js +5 -0
- package/dist/chunks/{studio-d81xfh1g.js → studio-8tr6cfrc.js} +4 -4
- package/dist/chunks/studio-8vcvfs7r.js +6 -0
- package/dist/chunks/studio-9tmebf0s.js +5 -0
- package/dist/chunks/studio-a2bvaptz.js +5 -0
- package/dist/chunks/studio-b7y5mr30.js +5 -0
- package/dist/chunks/studio-bavb31r0.js +5 -0
- package/dist/chunks/{studio-dgz8d0c1.js → studio-bbe4c90a.js} +4 -4
- package/dist/chunks/studio-c05wdnt3.js +5 -0
- package/dist/chunks/studio-ccv2svc6.js +5 -0
- package/dist/chunks/studio-d5grtb9e.js +16 -0
- package/dist/chunks/studio-df0baea9.js +5 -0
- package/dist/chunks/studio-dgk4dqtx.js +7 -0
- package/dist/chunks/studio-e1g64q43.js +5 -0
- package/dist/chunks/studio-ed1hp6zf.js +6 -0
- package/dist/chunks/studio-ed3xx40h.js +7 -0
- package/dist/chunks/studio-f14e1zdj.js +5 -0
- package/dist/chunks/studio-fbhxxc5f.js +5 -0
- package/dist/chunks/studio-fyh0jc96.js +5 -0
- package/dist/chunks/studio-gcxk20n7.js +5 -0
- package/dist/chunks/studio-jaaz8ce9.js +5 -0
- package/dist/chunks/{studio-90pq9km1.js → studio-jcnsdaep.js} +4 -4
- package/dist/chunks/studio-jsgf2q5k.js +7 -0
- package/dist/chunks/{studio-0q988f9w.js → studio-k3xxbagr.js} +3 -3
- package/dist/chunks/{studio-5ve6bbep.js → studio-k7evxqh4.js} +4 -4
- package/dist/chunks/studio-kt3pjkwd.js +5 -0
- package/dist/chunks/studio-m8g16bgz.js +5 -0
- package/dist/chunks/studio-mn0476ag.js +5 -0
- package/dist/chunks/studio-mx1smyq0.js +5 -0
- package/dist/chunks/studio-n0c5h6mf.js +5 -0
- package/dist/chunks/{studio-485046te.js → studio-nh6d342n.js} +7 -7
- package/dist/chunks/studio-nqxqf8p2.js +4 -0
- package/dist/chunks/studio-p4nrkvqr.js +5 -0
- package/dist/chunks/{studio-1fxkaaea.js → studio-pbxa5fpc.js} +4 -4
- package/dist/chunks/studio-pgmvdv7z.js +7 -0
- package/dist/chunks/studio-ph84avkf.js +5 -0
- package/dist/chunks/{studio-tq0rtfwj.js → studio-q0mvbaq6.js} +4 -4
- package/dist/chunks/studio-q0tccd43.js +5 -0
- package/dist/chunks/studio-q7rtx6zq.js +14 -0
- package/dist/chunks/{studio-a3g98wjr.js → studio-qgh13jtz.js} +4 -4
- package/dist/chunks/studio-qmn1xc24.js +5 -0
- package/dist/chunks/studio-qwdqwkj0.js +5 -0
- package/dist/chunks/studio-r5qy30vx.js +5 -0
- package/dist/chunks/studio-rj9eamf8.js +5 -0
- package/dist/chunks/studio-rptgsk96.js +5 -0
- package/dist/chunks/studio-rthyg42z.js +928 -0
- package/dist/chunks/studio-s19tp1xr.js +5 -0
- package/dist/chunks/studio-s32578pn.js +5 -0
- package/dist/chunks/studio-svb7yyve.js +5 -0
- package/dist/chunks/studio-syreb644.js +5 -0
- package/dist/chunks/studio-tf9jryb1.js +10 -0
- package/dist/chunks/studio-tfkznv39.js +5 -0
- package/dist/chunks/studio-tft6r105.js +5 -0
- package/dist/chunks/studio-txf2kysx.js +5 -0
- package/dist/chunks/studio-v8867ddv.js +12 -0
- package/dist/chunks/studio-vxq7fcvv.js +5 -0
- package/dist/chunks/studio-w4rz9hdk.js +5 -0
- package/dist/chunks/studio-wbcjbhy1.js +9 -0
- package/dist/chunks/studio-wc649wss.js +5 -0
- package/dist/chunks/studio-wys23mxz.js +5 -0
- package/dist/chunks/studio-x1x167jh.js +5 -0
- package/dist/chunks/studio-x9hsze61.js +5 -0
- package/dist/chunks/studio-y0n7yxea.js +9 -0
- package/dist/chunks/studio-y3ahhdpx.js +5 -0
- package/dist/chunks/studio-z97c48fk.js +5 -0
- package/dist/chunks/studio-zat62m0c.js +5 -0
- package/dist/chunks/studio-zcd2e7yz.js +5 -0
- package/dist/chunks/studio-zz9qe3rw.js +64 -0
- package/dist/chunks/toast-1gv0h53h.js +4 -0
- package/dist/chunks/{toast-host-ke5z4ng7.js → toast-host-1yg5ar8d.js} +3 -3
- package/dist/chunks/{tooltip-5v8ngwj2.js → tooltip-yypz28gq.js} +3 -3
- package/dist/chunks/{tree-mdq3v5cw.js → tree-9xa4hm7n.js} +2 -2
- package/dist/chunks/tsMode-epyfz1hv.js +14 -0
- package/dist/chunks/workspace-dz7nxfhv.js +4 -0
- package/dist/chunks/workspace-home-xsd7hkjw.js +4 -0
- package/dist/chunks/{ws-client-nze0k6mv.js → ws-client-bv552sfx.js} +3 -3
- package/dist/iframe-entry.js +20 -16
- package/dist/manifest.json +77 -63
- package/dist/studio.js +103 -104
- package/dist/workers/ts.worker.js +3 -3
- package/package.json +12 -11
- package/src/browse/component-examples.ts +272 -0
- package/src/browse/library-commands.ts +64 -104
- package/src/browse/library-layouts.ts +263 -49
- package/src/browse/library-model.ts +181 -133
- package/src/browse/library-pane.ts +738 -446
- package/src/browse/library-preview.ts +149 -19
- package/src/browse/library-source.ts +308 -41
- package/src/browse/preview-root.ts +78 -0
- package/src/browse/preview-style.ts +155 -0
- package/src/canvas/asset-refs.ts +16 -1
- package/src/canvas/canvas-live-render.ts +222 -30
- package/src/canvas/canvas-origin.ts +37 -12
- package/src/canvas/canvas-page-context.ts +112 -0
- package/src/canvas/canvas-render.ts +113 -107
- package/src/canvas/canvas-utils.ts +57 -12
- package/src/canvas/iframe-drop.ts +107 -0
- package/src/canvas/iframe-entry.ts +24 -12
- package/src/canvas/iframe-host.ts +134 -62
- package/src/canvas/iframe-keys.ts +11 -0
- package/src/canvas/iframe-patch.ts +8 -7
- package/src/canvas/iframe-protocol.ts +24 -5
- package/src/canvas/iframe-render.ts +48 -1
- package/src/canvas/iframe-subtree.ts +5 -2
- package/src/canvas/npm-modules.ts +22 -0
- package/src/canvas/preview-navigate.ts +16 -0
- package/src/canvas/repeater-sources.ts +200 -0
- package/src/canvas/stage-scrollbar.ts +5 -1
- package/src/canvas/surface-registry.ts +6 -0
- package/src/commands/app-commands.ts +16 -6
- package/src/commands/budget.ts +10 -8
- package/src/commands/context.ts +35 -10
- package/src/commands/defaults.ts +69 -45
- package/src/commands/keymap.ts +9 -0
- package/src/commands/levels.ts +11 -5
- package/src/commands/live-context.ts +2 -0
- package/src/commands/registry.ts +10 -1
- package/src/content/collection-match.ts +6 -5
- package/src/content/collection-pages.ts +412 -0
- package/src/content/content-collections.ts +270 -0
- package/src/content/entry-commands.ts +51 -60
- package/src/content/entry-editor.ts +111 -18
- package/src/content/entry-fields.ts +13 -1
- package/src/content/entry-inspector.ts +225 -0
- package/src/content/entry-model.ts +17 -3
- package/src/content/entry-open.ts +80 -0
- package/src/content/entry-summaries.ts +440 -0
- package/src/content/file-record-ids.ts +80 -0
- package/src/content/file-records.ts +125 -0
- package/src/content/page-summaries.ts +129 -0
- package/src/content/record-entry.ts +201 -0
- package/src/content/writing-banner.ts +177 -0
- package/src/create/add-new-commands.ts +185 -0
- package/src/create/add-new-flow.ts +1116 -0
- package/src/create/add-new.ts +1014 -0
- package/src/create/element-name.ts +121 -0
- package/src/editor/convert-to-component.ts +67 -43
- package/src/editor/file-drop-action.ts +9 -1
- package/src/editor/inline-edit-apply.ts +44 -0
- package/src/editor/inline-edit.ts +10 -0
- package/src/editor/insert-component.ts +91 -0
- package/src/editor/insert-zone-action.ts +13 -4
- package/src/editor/shortcuts.ts +44 -22
- package/src/editor/slash-menu.ts +51 -8
- package/src/files/components.ts +74 -10
- package/src/files/file-ops.ts +15 -5
- package/src/files/files.ts +164 -150
- package/src/files/fs-events.ts +18 -7
- package/src/files/media-meta.ts +95 -1
- package/src/files/media-types.ts +55 -0
- package/src/files/media-upload.ts +209 -52
- package/src/files/new-file-name.ts +156 -0
- package/src/files/serialize-document.ts +13 -3
- package/src/format/format-host.ts +15 -0
- package/src/github/github-auth.ts +2 -2
- package/src/github/github-publish.ts +4 -3
- package/src/grid/grid-controller.ts +5 -1
- package/src/grid/grid-open.ts +0 -27
- package/src/grid/grid-panel.ts +54 -2
- package/src/grid/grid-reveal.ts +34 -0
- package/src/grid/grid-source.ts +3 -25
- package/src/grid/grid-view.ts +31 -6
- package/src/grid/sources/content-source.ts +75 -7
- package/src/grid/tabulator-tables.d.ts +6 -0
- package/src/hosting/document.ts +2 -2
- package/src/i18n/i18n-commands.ts +2 -1
- package/src/media/media-commands.ts +181 -0
- package/src/media/media-library-model.ts +232 -0
- package/src/media/media-library.ts +1283 -0
- package/src/media/media-pane.ts +47 -19
- package/src/packages/pull-package-sync.ts +1 -1
- package/src/panels/activity-panel.ts +21 -5
- package/src/panels/ai-chat/chat-markdown.ts +8 -8
- package/src/panels/block-action-bar.ts +11 -11
- package/src/panels/canvas-dnd-bridge.ts +5 -2
- package/src/panels/chat-panel.ts +6 -6
- package/src/panels/collections-panel.ts +306 -0
- package/src/panels/component-preview.ts +35 -13
- package/src/panels/data-explorer.ts +1 -1
- package/src/panels/data-grid.ts +4 -0
- package/src/panels/dnd.ts +17 -30
- package/src/panels/elements-panel.ts +9 -2
- package/src/panels/empty-state.ts +2 -2
- package/src/panels/formula-workspace.ts +2 -3
- package/src/panels/frontmatter-fields.ts +9 -9
- package/src/panels/git-diff-open.ts +9 -5
- package/src/panels/head-panel.ts +369 -103
- package/src/panels/i18n-panel.ts +11 -10
- package/src/panels/imports-panel.ts +2 -0
- package/src/panels/jump-bar.ts +27 -2
- package/src/panels/layers-panel.ts +36 -30
- package/src/panels/left-panel.ts +22 -8
- package/src/panels/navigator-panels.ts +23 -11
- package/src/panels/pane-context.ts +111 -29
- package/src/panels/pane-grid.ts +6 -6
- package/src/panels/panel-registry.ts +14 -9
- package/src/panels/properties-panel.ts +7 -3
- package/src/panels/right-panel.ts +199 -43
- package/src/panels/seo-modal.ts +41 -108
- package/src/panels/settings-menu.ts +52 -50
- package/src/panels/settings-pane.ts +268 -162
- package/src/panels/signals-panel.ts +3 -4
- package/src/panels/site-model.ts +367 -0
- package/src/panels/site-panel.ts +638 -0
- package/src/panels/style-panel.ts +37 -3
- package/src/panels/stylebook-doc.ts +142 -10
- package/src/panels/stylebook-layers-panel.ts +39 -80
- package/src/panels/stylebook-panel.ts +47 -10
- package/src/panels/styles-panel.ts +327 -0
- package/src/panels/tab-strip.ts +109 -25
- package/src/platform.ts +1 -1
- package/src/platforms/cloud.ts +28 -1
- package/src/platforms/default-platform.ts +4 -4
- package/src/platforms/devserver.ts +51 -25
- package/src/publish/deploy-checklist.ts +12 -7
- package/src/publish/pages-service.ts +38 -14
- package/src/publish/publish-changes.ts +491 -0
- package/src/publish/publish-commands.ts +83 -18
- package/src/publish/publish-ids.ts +49 -0
- package/src/publish/publish-quick.ts +148 -0
- package/src/publish/publish-workspace.ts +926 -0
- package/src/publish/source-control.ts +907 -0
- package/src/services/automation.ts +16 -20
- package/src/services/cf-settings.ts +4 -4
- package/src/services/connection.ts +2 -2
- package/src/services/directory-picker.ts +2 -2
- package/src/services/references.ts +0 -0
- package/src/services/render-critic.ts +21 -2
- package/src/services/settings/definitions.ts +25 -14
- package/src/settings/contributed-section.ts +49 -10
- package/src/settings/css-vars-editor.ts +93 -27
- package/src/settings/developer-panels.ts +43 -0
- package/src/settings/extension-sections.ts +20 -2
- package/src/settings/general-settings.ts +91 -21
- package/src/settings/preferences-dialog.ts +8 -1
- package/src/settings/project-sections.ts +27 -10
- package/src/settings/schema-field-ui.ts +3 -1
- package/src/settings/section-registry.ts +116 -11
- package/src/settings/settings-dialog.ts +192 -0
- package/src/settings/settings-document.ts +182 -162
- package/src/shell.ts +467 -431
- package/src/site-context.ts +64 -10
- package/src/state.ts +28 -9
- package/src/studio.ts +194 -41
- package/src/style/project-styles.ts +34 -0
- package/src/style/stylebook-specimens.ts +89 -0
- package/src/style/stylebook-target.ts +26 -0
- package/src/style/tag-inheritance.ts +105 -0
- package/src/style/variables-focus.ts +61 -0
- package/src/style/variables-view.ts +235 -0
- package/src/surfaces/add-new.json +1482 -0
- package/src/surfaces/add-new.ts +325 -0
- package/src/surfaces/ai-chat.ts +2 -2
- package/src/surfaces/boot-failure.json +4 -3
- package/src/surfaces/bottom-dock.json +1 -1
- package/src/surfaces/canvas-stage.json +30 -19
- package/src/surfaces/canvas-stage.ts +5 -5
- package/src/surfaces/collections-panel.json +615 -0
- package/src/surfaces/collections-panel.ts +168 -0
- package/src/surfaces/commandbar.json +241 -96
- package/src/surfaces/commandbar.ts +134 -99
- package/src/surfaces/empty-state.json +1 -1
- package/src/surfaces/entry-editor.json +136 -0
- package/src/surfaces/entry-editor.ts +21 -0
- package/src/surfaces/entry-inspector.json +371 -0
- package/src/surfaces/entry-inspector.ts +143 -0
- package/src/surfaces/inspector-dock.json +162 -14
- package/src/surfaces/inspector-dock.ts +46 -19
- package/src/surfaces/library-pane.json +670 -437
- package/src/surfaces/library-pane.ts +94 -59
- package/src/surfaces/media-browser.json +62 -6
- package/src/surfaces/media-browser.ts +15 -1
- package/src/surfaces/media-field.json +1 -1
- package/src/surfaces/media-library.json +1586 -0
- package/src/surfaces/media-library.ts +282 -0
- package/src/surfaces/media-pick-dialog.json +71 -0
- package/src/surfaces/media-pick-dialog.ts +132 -0
- package/src/surfaces/menu.ts +18 -0
- package/src/surfaces/pane-context.json +144 -77
- package/src/surfaces/pane-context.ts +24 -0
- package/src/surfaces/panel-deploy-checklist.json +12 -6
- package/src/surfaces/panel-deploy-checklist.ts +3 -1
- package/src/surfaces/panel-page.json +72 -2
- package/src/surfaces/panel-page.ts +38 -7
- package/src/surfaces/panel-signals.json +1 -1
- package/src/surfaces/panel-signals.ts +5 -5
- package/src/surfaces/panel-stylebook-layers.json +71 -204
- package/src/surfaces/panel-stylebook-layers.ts +0 -21
- package/src/surfaces/preferences.json +120 -48
- package/src/surfaces/preferences.ts +8 -0
- package/src/surfaces/publish-quick.json +428 -0
- package/src/surfaces/publish-quick.ts +165 -0
- package/src/surfaces/publish-workspace.json +2892 -0
- package/src/surfaces/publish-workspace.ts +391 -0
- package/src/surfaces/rail.json +1 -159
- package/src/surfaces/rail.ts +18 -75
- package/src/surfaces/schema-form.json +10 -2
- package/src/surfaces/schema-form.ts +2 -0
- package/src/surfaces/seo.json +1 -1
- package/src/surfaces/settings-contributed.json +5 -5
- package/src/surfaces/settings-contributed.ts +18 -2
- package/src/surfaces/settings-css-vars.json +44 -36
- package/src/surfaces/settings-css-vars.ts +77 -4
- package/src/surfaces/settings-deploy.json +2 -15
- package/src/surfaces/settings-deploy.ts +1 -1
- package/src/surfaces/settings-dialog.json +51 -0
- package/src/surfaces/settings-dialog.ts +169 -0
- package/src/surfaces/settings-overview.json +3 -3
- package/src/surfaces/settings-overview.ts +9 -2
- package/src/surfaces/settings-pane.json +269 -46
- package/src/surfaces/settings-pane.ts +85 -24
- package/src/surfaces/shell.json +2 -1
- package/src/surfaces/site-panel.json +1029 -0
- package/src/surfaces/site-panel.ts +233 -0
- package/src/surfaces/slash-menu.json +63 -21
- package/src/surfaces/slash-menu.ts +23 -0
- package/src/surfaces/statusbar.ts +39 -15
- package/src/surfaces/styles-panel.json +735 -0
- package/src/surfaces/styles-panel.ts +195 -0
- package/src/surfaces/styles-variables.json +149 -0
- package/src/surfaces/styles-variables.ts +145 -0
- package/src/surfaces/tab-strip.json +4 -4
- package/src/surfaces/welcome.ts +1 -1
- package/src/surfaces/writing-banner.json +94 -0
- package/src/surfaces/writing-banner.ts +80 -0
- package/src/tabs/bare-repeaters.ts +101 -0
- package/src/tabs/tab.ts +47 -7
- package/src/types.ts +21 -26
- package/src/ui/form-controls.ts +47 -8
- package/src/ui/layers.ts +13 -0
- package/src/ui/media-picker.ts +284 -40
- package/src/ui/regions.ts +7 -6
- package/src/ui/schema-form.ts +259 -27
- package/src/ui/virtual-window.ts +26 -1
- package/src/utils/base64.ts +3 -3
- package/src/utils/edit-display.ts +322 -67
- package/src/utils/local-day.ts +18 -0
- package/src/workspace/pane-derive.ts +4 -4
- package/src/workspace/session.ts +28 -7
- package/src/workspace/tab-workspace.ts +137 -0
- package/src/workspace/workspace-back.ts +189 -0
- package/src/workspace/workspace-home.ts +133 -0
- package/src/workspace/workspace-ids.ts +129 -0
- package/src/workspace/workspace-switch.ts +372 -0
- package/src/workspace/workspace.ts +125 -11
- package/styles/shell-frame.css +30 -7
- package/styles/shell-frame.json +15 -3
- package/dist/chunks/2020-f2gkpy8d.js +0 -4
- package/dist/chunks/adapter-4912g339.js +0 -4
- package/dist/chunks/cf-account-picker-wccaenh6.js +0 -4
- package/dist/chunks/cf-settings-br6105tr.js +0 -4
- package/dist/chunks/color-28ksk2qm.js +0 -4
- package/dist/chunks/components-db68vsn7.js +0 -4
- package/dist/chunks/content-source-1449qesq.js +0 -4
- package/dist/chunks/convert-to-repeater-5h457egj.js +0 -4
- package/dist/chunks/editor-x9jn86a7.js +0 -4
- package/dist/chunks/entry-commands-may24cpt.js +0 -4
- package/dist/chunks/extension-sections-pvr14vxr.js +0 -4
- package/dist/chunks/file-ops-x9v54pcj.js +0 -4
- package/dist/chunks/files-j3knqf0s.js +0 -4
- package/dist/chunks/format-host-tyre2trb.js +0 -4
- package/dist/chunks/fs-events-64ma9htc.js +0 -4
- package/dist/chunks/git-panel-84ps5dex.js +0 -4
- package/dist/chunks/iframe-entry-fvbk89gm.js +0 -5
- package/dist/chunks/iframe-host-ck6vejt5.js +0 -4
- package/dist/chunks/index-b8xw3vy9.js +0 -4
- package/dist/chunks/jsonMode-w15cmrcm.js +0 -13
- package/dist/chunks/jx-validate-at3zn8wa.js +0 -4
- package/dist/chunks/layers-h4xp1pss.js +0 -4
- package/dist/chunks/layers-panel-m5hw1d7g.js +0 -4
- package/dist/chunks/lit-html-8t8t3dnr.js +0 -4
- package/dist/chunks/media-picker-2cweexc5.js +0 -4
- package/dist/chunks/menu-ynw13y0s.js +0 -4
- package/dist/chunks/monaco-buffer-qzxn567r.js +0 -4
- package/dist/chunks/monaco-setup-gxf6656g.js +0 -4
- package/dist/chunks/notify-cj5zbrs2.js +0 -4
- package/dist/chunks/parse-b7ddhr8m.js +0 -4
- package/dist/chunks/platform-3dfws9js.js +0 -4
- package/dist/chunks/popover-jt2gxmzs.js +0 -4
- package/dist/chunks/publish-panel-1gvxbj21.js +0 -4
- package/dist/chunks/quick-search-0dajrwqg.js +0 -4
- package/dist/chunks/references-49qgt404.js +0 -4
- package/dist/chunks/right-panel-jm1bwe53.js +0 -4
- package/dist/chunks/section-registry-6kwc4fky.js +0 -4
- package/dist/chunks/studio-0rt52vpq.js +0 -5
- package/dist/chunks/studio-18vgbhs5.js +0 -5
- package/dist/chunks/studio-24mccdrj.js +0 -5
- package/dist/chunks/studio-2eh507zk.js +0 -9
- package/dist/chunks/studio-2hcbccfv.js +0 -5
- package/dist/chunks/studio-2jbs3rxv.js +0 -5
- package/dist/chunks/studio-4h8k4dw9.js +0 -5
- package/dist/chunks/studio-5f6n18kx.js +0 -5
- package/dist/chunks/studio-5gthpky6.js +0 -5
- package/dist/chunks/studio-6ep3js6b.js +0 -9
- package/dist/chunks/studio-6wkmf3wz.js +0 -9
- package/dist/chunks/studio-841rf3cg.js +0 -5
- package/dist/chunks/studio-8gmwgheg.js +0 -5
- package/dist/chunks/studio-8qm0ep50.js +0 -5
- package/dist/chunks/studio-924p1tm1.js +0 -6
- package/dist/chunks/studio-a3shpz9y.js +0 -5
- package/dist/chunks/studio-amsbaaar.js +0 -6
- package/dist/chunks/studio-at5spjbc.js +0 -7
- package/dist/chunks/studio-b2xv945e.js +0 -5
- package/dist/chunks/studio-bn5nkafw.js +0 -5
- package/dist/chunks/studio-bw6q5xjf.js +0 -9
- package/dist/chunks/studio-c7q0t9x1.js +0 -5
- package/dist/chunks/studio-camnhc96.js +0 -6
- package/dist/chunks/studio-cffqvnzd.js +0 -5
- package/dist/chunks/studio-efvfrsf8.js +0 -5
- package/dist/chunks/studio-er30bpcx.js +0 -5
- package/dist/chunks/studio-ezscgr64.js +0 -5
- package/dist/chunks/studio-ffrrncvz.js +0 -5
- package/dist/chunks/studio-fpphgn8y.js +0 -10
- package/dist/chunks/studio-j1kvhdjk.js +0 -4
- package/dist/chunks/studio-j430n16g.js +0 -7
- package/dist/chunks/studio-jjkg84nj.js +0 -5
- package/dist/chunks/studio-m0q32ars.js +0 -4
- package/dist/chunks/studio-m6bdst11.js +0 -5
- package/dist/chunks/studio-nv2cptd4.js +0 -64
- package/dist/chunks/studio-nwfrc98n.js +0 -5
- package/dist/chunks/studio-p1wgvp7r.js +0 -5
- package/dist/chunks/studio-pag2wncm.js +0 -5
- package/dist/chunks/studio-qvanvzfd.js +0 -5
- package/dist/chunks/studio-qwa64kt7.js +0 -5
- package/dist/chunks/studio-rk1zc4x3.js +0 -928
- package/dist/chunks/studio-se2r3ptc.js +0 -5
- package/dist/chunks/studio-sg2a0dh0.js +0 -5
- package/dist/chunks/studio-tjzjhe68.js +0 -5
- package/dist/chunks/studio-v2w7q8r1.js +0 -7
- package/dist/chunks/studio-v5vjq1h0.js +0 -4
- package/dist/chunks/studio-v8aga3vp.js +0 -14
- package/dist/chunks/studio-vfcdrfmv.js +0 -5
- package/dist/chunks/studio-vmfkgdjf.js +0 -5
- package/dist/chunks/studio-wt1816jj.js +0 -5
- package/dist/chunks/studio-wz73q5kq.js +0 -4
- package/dist/chunks/studio-y04qtxvp.js +0 -7
- package/dist/chunks/studio-y21g8zzg.js +0 -5
- package/dist/chunks/studio-y64hrt8p.js +0 -12
- package/dist/chunks/studio-ynn90f58.js +0 -16
- package/dist/chunks/studio-yxz682sx.js +0 -5
- package/dist/chunks/studio-zp7snvkq.js +0 -5
- package/dist/chunks/studio-zq4z6tm6.js +0 -5
- package/dist/chunks/toast-c9fn075p.js +0 -4
- package/dist/chunks/tsMode-sf49ee9x.js +0 -14
- package/dist/chunks/workspace-jtfahpee.js +0 -4
- package/src/panels/frontmatter-panel.ts +0 -711
- package/src/panels/git-panel.ts +0 -1108
- package/src/surfaces/doc-header.json +0 -776
- package/src/surfaces/doc-header.ts +0 -222
- package/src/surfaces/git-panel.json +0 -1880
- package/src/surfaces/git-panel.ts +0 -264
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import{p}from"./studio-w4rz9hdk.js";import{Em}from"./studio-4hp8pkyt.js";import{ge,ne,g,xv}from"./studio-43sd2mam.js";import{ae}from"./studio-q7rtx6zq.js";import{T,R}from"./studio-x9hsze61.js";import{no,h}from"./studio-d5grtb9e.js";import{x}from"./studio-gcxk20n7.js";import{te}from"./studio-vxq7fcvv.js";function j(e){return JSON.parse(e)}function k(e){return e!==null&&typeof e==="object"&&!Array.isArray(e)}function C(e){try{let t=j(e);return k(t)?t:void 0}catch{return}}function P({slug:e,adapter:t}){let o=new Date().toISOString().slice(0,10);return`${JSON.stringify(t==="cloudflare-workers"?{assets:{binding:"ASSETS",directory:"./dist"},compatibility_date:o,compatibility_flags:["nodejs_compat"],main:"./dist/worker.js",name:e}:{compatibility_date:o,compatibility_flags:["nodejs_compat"],name:e,pages_build_output_dir:"./dist"},null,"\t")}
|
|
2
|
+
`}function m(e,{slug:t,adapter:o}){if(!e)return{content:P({adapter:o,slug:t}),patched:!0};let n=C(e);if(n===void 0)return{content:e,patched:!1};if(n.name=t,o==="cloudflare-workers")delete n.pages_build_output_dir,n.main="./dist/worker.js",n.assets={binding:"ASSETS",directory:"./dist"};else delete n.main,delete n.assets,n.pages_build_output_dir="./dist";return{content:`${JSON.stringify(n,null,"\t")}
|
|
3
|
+
`,patched:!0}}function Wl(){try{return te(p().cfApi)}catch{return!1}}async function l(e,t){let o=p().cfApi;if(!o)throw Error("This platform cannot reach the Cloudflare API");try{return await o(e,t)}catch(n){throw Em(n),n}}async function dN(){return l("/accounts")}async function A(e,t){try{return await l(`/accounts/${e}/pages/projects/${t}`)}catch{return null}}async function I(e){let t={build_command:"bunx jx build",destination_dir:"dist"};if(e.rootDir)t.root_dir=e.rootDir;return l(`/accounts/${e.accountId}/pages/projects`,{method:"POST",body:{name:e.projectName,production_branch:e.productionBranch,build_config:t,source:{type:"github",config:{owner:e.owner,repo_name:e.repo,production_branch:e.productionBranch,deployments_enabled:!0}}}})}function _(e){let t={id:e.id,url:e.url,environment:e.environment,stage:e.latest_stage?.name??"unknown",status:e.latest_stage?.status??"unknown",createdOn:e.created_on},o=e.deployment_trigger?.metadata?.branch;if(o)t.branch=o;return t}async function JT(e){return(await l(`/accounts/${e.accountId}/pages/projects/${e.projectName}/deployments`)).map((o)=>_(o))}async function wb(e){let[t]=await JT(e);return t??null}async function YT(e,t){let o={...e.build};if(t===null)delete o.deploy;else o.deploy=t;if(await no({build:o}),t!==null){let n=p(),i=null;try{i=await n.readFile("wrangler.jsonc")}catch{i=null}let v=o.adapter==="cloudflare-workers"?"cloudflare-workers":"cloudflare-pages",{content:D,patched:S}=m(i,{adapter:v,slug:t.projectName});if(S)await n.writeFile("wrangler.jsonc",D)}}async function uN(e,t){let n=await A(t.accountId,t.projectName)??await I(t),i={provider:"cloudflare-pages",accountId:t.accountId,projectName:t.projectName};if(n.subdomain)i.productionUrl=`https://${n.subdomain}`;return await YT(e,i),i}var f={$schema:"https://jxsuite.com/schema/v1",$id:"StudioPanelDeployChecklist",$description:"The deploy checklist, drawn above the Activity feed in the Bottom dock's Activity tab: what is MISSING before this project can ship, as one row with the chain of prerequisites under it. `publish/deploy-checklist.ts` owns the chain — which link is forged, which is merely unasked, and which command forges the next one — and hands this document a row, four steps and at most one action. Nothing here reads source control, the project config or the command registry. It draws in the Activity tab's own vocabulary because a deploy is an ordered list of stages that finish, which is exactly what a row of that feed already is; a fifth visual idiom for it would be a second design of a thing the tab has.",tagName:"div",attributes:{part:"checklist"},style:{$description:"What `.activity-list`, `.activity-row`, `.activity-row--running`, `.activity-row--done`, `.activity-icon`, `.activity-body`, `.activity-head`, `.activity-title`, `.activity-source`, `.activity-status`, `.activity-steps`, `.activity-step`, `.activity-step--done` and `.activity-step-icon` said in `styles/panels.css`, keyed on `part`. This is the LAST reader of those rules — `surfaces/panel-activity.json` carried its own copy when the feed converted, and left the stylesheet standing because this file still drew from it — so the whole `.problem-*, .activity-*` block is dead once this lands. Three token names could not travel: `--spectrum-font-size-50`, `--spectrum-font-size-75` and `--spectrum-corner-radius-75` resolve only inside `<sp-theme>`, and a document mounted into the dock body is outside it, so each would silently have taken its hard-coded px fallback. They are the kit's own scale here. One thing changed meaning on purpose: the step's `data-state` is the checklist's own three-valued state rather than the two CSS classes it used to collapse into, so `unknown` — \"nobody has asked\" — is a state the styling can tell apart from `todo` the day it should.",display:"block",minWidth:"0",fontFamily:"var(--jx-font-sans)",color:"var(--fg)",'& [part="list"]':{display:"flex",flexDirection:"column",gap:"var(--jx-space-1)",margin:"0",padding:"0",listStyle:"none"},'& [part="row"]':{$description:"The left border is the state, at 3px, which is the one thing that must be legible without reading the row. Its default is the dim foreground so a state nobody has a colour for still draws a border rather than a gap.",display:"flex",alignItems:"flex-start",gap:"var(--jx-space-2)",padding:"6px var(--jx-space-2)",border:"1px solid var(--border)",borderLeft:"3px solid var(--fg-dim)",borderRadius:"var(--radius)",background:"var(--bg-panel)",color:"var(--fg)",fontSize:"var(--jx-text-md)"},'& [part="row"][data-state="running"]':{borderLeftColor:"var(--accent)"},'& [part="row"][data-state="done"]':{borderLeftColor:"var(--success)"},'& [part="state-icon"]':{$description:'Named `state-icon` rather than `icon`: `jx-button` puts `part="icon"` on the glyph slot of every button it draws, and the action button below is inside this same light-DOM tree — a rule on the bare name would reach into the kit\'s own drawing and a devtools query could not tell the two apart.',flex:"none",width:"14px",textAlign:"center",fontWeight:"700",lineHeight:"1.5"},'& [part="row"][data-state="running"] > [part="state-icon"]':{color:"var(--accent)"},'& [part="row"][data-state="done"] > [part="state-icon"]':{color:"var(--success)"},'& [part="row-body"]':{flex:"1",minWidth:"0",display:"flex",flexDirection:"column",alignItems:"flex-start",gap:"2px"},'& [part="head"]':{display:"flex",alignItems:"baseline",gap:"var(--jx-space-2)",alignSelf:"stretch",minWidth:"0"},'& [part="row-title"]':{fontWeight:"700",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},'& [part="source"]':{$description:"Pushed to the far edge, so the tab reads as a column of who raised what.",flex:"none",marginLeft:"auto",color:"var(--fg-dim)",fontSize:"var(--jx-text-sm)"},'& [part="summary"]':{color:"var(--fg-dim)",overflowWrap:"anywhere"},'& [part="steps"]':{$description:'The chain, declared up front, so "which link is missing" is answered by looking rather than by reading the summary and remembering what came before it.',display:"flex",flexDirection:"column",gap:"1px",margin:"2px 0 0",padding:"0",listStyle:"none",fontSize:"var(--jx-text-sm)"},'& [part="step"]':{display:"flex",gap:"6px",color:"var(--fg-dim)"},'& [part="step"][data-state="done"] > [part="step-icon"]':{color:"var(--success)"},'& [part="step-icon"]':{flex:"none","--jx-icon-size":"1em",marginBlockEnd:"-0.15em"},'& [part="action"]':{marginTop:"var(--jx-space-1)"}},children:[{tagName:"div",attributes:{part:"body-slot",role:"none"},style:{display:"contents"},$switch:{$ref:"#/state/hasProject"},cases:{true:{tagName:"ul",attributes:{part:"list"},children:[{tagName:"li",attributes:{part:"row","data-state":"${state.rowState}"},children:[{tagName:"span",attributes:{part:"state-icon","aria-hidden":"true"},textContent:"${state.rowIcon}"},{tagName:"div",attributes:{part:"row-body"},children:[{tagName:"div",attributes:{part:"head"},children:[{tagName:"span",attributes:{part:"row-title"},textContent:"Deploy checklist"},{tagName:"span",attributes:{part:"source"},textContent:"Publish"}]},{tagName:"div",attributes:{part:"summary"},textContent:"${state.summary}"},{tagName:"ol",attributes:{part:"steps"},children:[{$prototype:"Array",items:{$ref:"#/state/steps"},key:{$ref:"$map/item/id"},map:{tagName:"li",attributes:{part:"step","data-step":"${$map.item.id}","data-state":"${$map.item.state}"},children:[{tagName:"jx-icon",attributes:{part:"step-icon"},$props:{name:{$ref:"$map/item/icon"},label:{$ref:"$map/item/iconLabel"}}},{tagName:"span",attributes:{part:"step-text"},textContent:"${$map.item.text}"}]}}]},{tagName:"span",attributes:{part:"action-slot",role:"none"},style:{display:"contents"},$switch:{$ref:"#/state/hasAction"},cases:{true:{tagName:"jx-button",$description:"The recovery button wears the command's own title, so it reads as a verb rather than as a decoration, and a refused command is dimmed with the reason it names in its tooltip. A command the registry does not have, or whose `when` is false, draws NOTHING rather than a dead label — a surface may choose whether to show a command, never whether it exists (§13).",$props:{size:"sm",disabled:{$ref:"#/state/actionDisabled"}},attributes:{part:"action",title:"${state.actionTitle}"},onclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/runAction"},value:[]}]},children:[{tagName:"span",textContent:"${state.actionLabel}"}]}}}]}]}]}}}]};T("panel-deploy-checklist",f);var d=null,c=null,s=null,r=null;function O(e,t){e.hasProject=t.hasProject,e.rowState=t.rowState,e.rowIcon=t.rowIcon,e.summary=t.summary,e.steps=t.steps,e.hasAction=t.hasAction,e.actionLabel=t.actionLabel,e.actionTitle=t.actionTitle,e.actionDisabled=t.actionDisabled}function J(e){if(d!==e)return!1;return r===null?s!==null:r.root.parentNode===e}function y(e,t){if(J(e))return;u(),d=e;let o=g({actionDisabled:!1,actionLabel:"",actionTitle:"",hasAction:!1,hasProject:!1,rowIcon:"",rowState:"running",runAction:t.runAction,steps:[],summary:""});c=ge(),c.run(()=>{ne(()=>{O(o,t.project())})});let n=R("panel-deploy-checklist",o,e);s=n,n.then((i)=>{if(s===n)r=i;else i.dispose()})}function u(){c?.stop(),c=null;let e=s;if(s=null,r)r.dispose(),r=null;else if(e)e.then((t)=>t.dispose());d=null}function L(){return x?.projectConfig??null}function Ri(){return L()?.build?.deploy}var a=xv({asked:!1,observed:null});function Pd(e){a.observed=e,a.asked=!0}function ZT(){return a.observed}function V(){let{status:e}=h.git;if(e===null)return{command:"git.init",detail:"Source control has not reported on this project yet.",id:"repo",label:"Track this project with git",state:"unknown"};return e.isRepo?{command:"git.init",detail:`Tracked${e.branch?` — on branch ${e.branch}`:""}.`,id:"repo",label:"Track this project with git",state:"done"}:{command:"git.init",detail:"A deploy ships what the repository holds, so the repository comes first.",id:"repo",label:"Track this project with git",state:"todo"}}function W(){let{status:e}=h.git;if(e===null||!e.isRepo)return{command:"git.createGithubRepository",detail:"A remote is where the provider builds from.",id:"remote",label:"Push to a remote",state:e===null?"unknown":"todo"};if((e.remotes??[]).length===0)return{command:"git.createGithubRepository",detail:"This repository is local only — nothing outside this machine can build it.",id:"remote",label:"Push to a remote",state:"todo"};return e.ahead>0?{command:"git.push",detail:`${e.ahead} commit(s) are not on ${e.remotes[0]} yet, so a build would ship the older tree.`,id:"remote",label:"Push to a remote",state:"todo"}:{command:"git.push",detail:`Up to date with ${e.remotes[0]}.`,id:"remote",label:"Push to a remote",state:"done"}}function E(){let e=Ri();if(e)return{command:"publish.setUp",detail:`Cloudflare Pages project ${e.projectName}.`,id:"provider",label:"Connect a deploy provider",state:"done"};return Wl()?{command:"publish.setUp",detail:"Connecting one makes every commit build and publish on its own.",id:"provider",label:"Connect a deploy provider",state:"todo"}:{command:"publish.setUp",detail:"This platform cannot reach the Cloudflare API. Commit and push instead — your host "+"runs bunx jx build and serves dist/.",id:"provider",label:"Connect a deploy provider",state:"unknown"}}function B(){if(!Ri())return{command:"publish.deploy",detail:"Nothing has been deployed, because no provider is connected.",id:"deployed",label:"Deploy",state:"todo"};if(!a.asked)return{command:"publish.deploy",detail:"Cloudflare has not been asked yet, so this is not a claim that nothing shipped.",id:"deployed",label:"Deploy",state:"unknown"};if(a.observed===null)return{command:"publish.deploy",detail:"Cloudflare reports no deployments for this project.",id:"deployed",label:"Deploy",state:"todo"};let{observed:e}=a;return e.status==="success"?{command:"publish.deploy",detail:`${e.environment} — ${e.url}`,id:"deployed",label:"Deploy",state:"done"}:{command:"publish.deploy",detail:`Last deployment ${e.stage}: ${e.status}.`,id:"deployed",label:"Deploy",state:"todo"}}function w(){return[V(),W(),E(),B()]}function SS(){return w().find((e)=>e.state!=="done")??null}function hN(){if(!x)return null;let e=SS();if(e)return{command:e.command,label:e.label,title:e.detail};return{command:"publish.openDashboard",label:"Deployed",title:Ri()?.productionUrl??"Everything this project needs to ship is in place."}}var b={done:{icon:"check",label:"Done"},todo:{icon:"warning-circle",label:"To do"},unknown:{icon:"question",label:"Not checked yet"}};function H(e){return{icon:b[e.state].icon,iconLabel:b[e.state].label,id:e.id,state:e.state,text:e.state==="done"?e.label:`${e.label} — ${e.detail}`}}function F(e){let t={actionDisabled:!1,actionLabel:"",actionTitle:"",hasAction:!1};if(!e)return t;let o=ae(),n=o?.get(e.command);if(!o||!n||!o.isVisible(e.command))return t;let i=o.disabledReason(e.command);return{actionDisabled:i!==void 0,actionLabel:n.title,actionTitle:i?`${n.title} — requires ${i}`:n.title,hasAction:!0}}function XT(){if(!x)return{actionDisabled:!1,actionLabel:"",actionTitle:"",hasAction:!1,hasProject:!1,rowIcon:"",rowState:"running",steps:[],summary:""};let e=w(),t=e.find((o)=>o.state!=="done")??null;return{...F(t),hasProject:!0,rowIcon:t?"⋯":"✓",rowState:t?"running":"done",steps:e.map((o)=>H(o)),summary:t?t.detail:"Everything this project needs to ship is in place."}}function z(){let e=SS();if(!e)return;ae()?.run(e.command)}var M={project:XT,runAction:z};function pN(e){let t=e.querySelector("[data-deploy-checklist]");if(!t){u();return}y(t,M)}
|
|
4
|
+
export{Wl,dN,JT,wb,YT,uN,Ri,Pd,ZT,SS,hN,XT,pN};
|
|
5
|
+
|
|
6
|
+
//# debugId=EE3C4E7F84386DA264756E2164756E21
|
|
7
|
+
//# sourceMappingURL=studio-3e54qh39.js.map
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import{Q}from"./studio-nqxqf8p2.js";import{p,_e}from"./studio-w4rz9hdk.js";import{C}from"./studio-43sd2mam.js";import{Er}from"./studio-fyh0jc96.js";import{P$,cv,u}from"./studio-c05wdnt3.js";import{zC,Si,wv}from"./studio-8tr6cfrc.js";import{hs,Ud,tO}from"./studio-8m0y2qe7.js";import{Js,o$,r$,Ys,on,aC,s$,Hd}from"./studio-ph84avkf.js";import{x}from"./studio-gcxk20n7.js";function d(t){let e=["B","KB","MB","GB"],n=t,r=0;while(n>=1024&&r<e.length-1)n/=1024,r+=1;return`${r===0?n:Number(n.toFixed(1))} ${e[r]}`}var y=["image/*","video/*","audio/*",".pdf",".svg",".woff",".woff2",".ttf",".otf"].join(",");function qc(){return(_e()?p().assetCapabilities?.accept:void 0)??y}function jd(t){return Ys.has(on(t))}function Gc(t){let e=t.type??"";if(e.startsWith("image/"))return"image";if(e.startsWith("video/"))return"video";if(e.startsWith("audio/"))return"audio";let n=on(t.name);if(Js.has(n))return"image";if(o$.has(n))return"video";if(r$.has(n))return"audio";return"file"}var t$=new Set([".woff",".woff2",".ttf",".otf"]);function uA(t){if(t$.has(on(t)))return"font";let e=Gc({name:t});return e==="file"?"document":e}var S=/^content\/([^/]+)\//,Sa="public/media";function n$(t){let e=t?S.exec(t.replaceAll("\\","/")):null;return e?`content/${e[1]}/images`:Sa}function hA(t){let e=t.replaceAll("\\","/");return e===Sa||/^content\/[^/]+\/images$/.test(e)}function A(t){let e=t.replaceAll("\\","/");if(e.startsWith("public/"))return e.slice(6);let n=/^content\/[^/]+\/(.+)$/.exec(e);if(n)return`./${n[1]}`;return`./${e}`}function w(t,e){if(!e.has(t))return t;let n=on(t),r=n?t.slice(0,-n.length):t;for(let i=1;;i++){let o=`${r}-${i}${n}`;if(!e.has(o))return o}}function E(t,e){let n=t.replaceAll("\\","/").replace(/\/+$/,"");return n==="."||n===""?e:`${n}/${e}`}var m=null;function pA(t){m=t}async function i$(t){await m?.(t)}function b(t){let e=t.replaceAll("\\","/"),n=e.lastIndexOf("/");return n>0?e.slice(0,n):"."}function M(t,e){let n=(o)=>e==="image"?Js.has(on(o.name)):jd(o.name),r=[],i=[];for(let o of t)if(n(o))r.push(o);else i.push(o.name);if(i.length>0)C.warn(i.length===1?`Skipped ${i[0]}`:`Skipped ${i.length} files`,{detail:e==="image"?`Only images can be used here: ${i.join(", ")}.`:`Studio lists images, video, audio, PDFs and fonts as media, so ${i.join(", ")} would not appear in it.`,source:"Media"});return r}async function Ca(t,e={}){let n=e.only===void 0?[...t]:M([...t],e.only);if(n.length===0)return[];let r=p(),i=e.dir??n$(u.value?.documentPath??null),o;try{let s=await hs(()=>r.listDirectory(i));o=new Set(s.map((l)=>l.name))}catch{o=new Set}let f=_e()?p().assetCapabilities?.maxUploadBytes:void 0,a=[];for(let s of n){if(f!==void 0&&s.size>f){C.error(`${s.name} is too large.`,{detail:`This backend accepts at most ${d(f)}; that file is ${d(s.size)}.`,source:"Media"});continue}let l=w(s.name,o);o.add(l);let g=E(i,l);try{let{path:c}=await r.uploadFile(g,s);Ud([c]),a.push({kind:Gc(s),name:l,path:c,ref:A(c)})}catch(c){C.error(`Could not upload ${s.name}.`,{detail:Q(c),path:g,source:"Media"})}}if(a.length>0)C.success(a.length===1?`Uploaded ${a[0].name} to ${i}/`:`Uploaded ${a.length} files to ${i}/`),await m?.(i);return a}var O=[new Set([".jpg",".jpeg"]),new Set([".tif",".tiff"])];function h(t){return O.find((e)=>e.has(t))??new Set([t])}function fA(t){return[...h(on(t))].join(",")}function v(t,e){return h(on(t)).has(on(e.name))}async function mA(t,e){let n=t.split("/").pop()??t;if(!v(t,e))return C.error(`${e.name} cannot replace ${n}.`,{detail:`${n} is ${on(t)||"a file with no extension"} and ${e.name} is ${on(e.name)||"a file with no extension"}. Every page that uses ${n} would get bytes its address does not describe; choose a file of the same type, or upload it as a new file.`,path:t,source:"Media"}),!1;let r=_e()?p().assetCapabilities?.maxUploadBytes:void 0;if(r!==void 0&&e.size>r)return C.error(`${e.name} is too large.`,{detail:`This backend accepts at most ${d(r)}; that file is ${d(e.size)}.`,source:"Media"}),!1;let i;try{({path:i}=await p().uploadFile(t,e))}catch(o){return C.error(`Could not replace ${n}.`,{detail:Q(o),path:t,source:"Media"}),!1}if(Ud([t,i]),Er(),await i$(b(t)),i!==t)return C.warn(`${n} was not replaced.`,{detail:`The backend stored the new file as ${i}, so every reference still shows the old one.`,path:t,source:"Media",tier:"problem"}),!1;return C.success(`Replaced ${n}`),!0}function gA(t){let e=Si(t),n=e.lastIndexOf("/");return n===-1?e:e.slice(n+1)}function Pb(t){let e=Si(t),n=e.lastIndexOf("/");return n===-1?".":e.slice(0,n)}function I(){return x?.projectConfig?.content??null}function N(t){return cv(t,I(),s$())}function F(t,e){return`${Si(e.urlPrefix)}/${t.slice(e.dir.length+1)}`}function Fb(t){let e=Si(t);if(e.startsWith(`${zC}/`))return`/${e.slice(zC.length+1)}`;let n=N(e);return n?`/${F(e,n)}`:`/${e}`}function rr(t){let e=Si(t);if(e==="")return t;let{space:n,fileBaseUrl:r}=Hd();if(n==="repo")return P$(`${r}${wv(e)}`,tO(e));return aC(`/${wv(Fb(e).slice(1))}`)}
|
|
2
|
+
export{qc,jd,Gc,t$,uA,Sa,n$,hA,pA,i$,Ca,fA,mA,gA,Pb,Fb,rr};
|
|
3
|
+
|
|
4
|
+
//# debugId=733C00A258BF474164756E2164756E21
|
|
5
|
+
//# sourceMappingURL=studio-3exxhz5g.js.map
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import{Q}from"./studio-nqxqf8p2.js";import{p}from"./studio-w4rz9hdk.js";import{g,C}from"./studio-43sd2mam.js";import{nv}from"./studio-c05wdnt3.js";import{Pt,Nt,ae}from"./studio-q7rtx6zq.js";import{jl,gp}from"./studio-07rcfje3.js";import{qe,ft,T,R,Jt,rt,tt}from"./studio-x9hsze61.js";import{Wu}from"./studio-jaaz8ce9.js";import{WD}from"./studio-bavb31r0.js";import{Kl}from"./studio-d5grtb9e.js";import{x}from"./studio-gcxk20n7.js";import{n,te,S,v}from"./studio-vxq7fcvv.js";var B=[{id:"general",intro:"",label:"General",note:""},{id:"integrations",intro:"Turn on what your site needs. Each one adds its own options where you use it.",label:"Integrations",note:""},{id:"advanced",intro:"Changes here affect every page. Most sites never need them.",label:"Advanced",note:"For developers"}],FR="integrations";function jR(e){return B.some((o)=>o.id===e)}var ve="overview",j=new Map,V=new Set;function A(){for(let e of V)e()}function kd(){A()}function E_(e){return V.add(e),()=>{V.delete(e)}}function Ml(e){j.set(e.key,e),A()}function HR(e){if(j.delete(e))A()}function we(){return[...j.values()].toSorted((e,o)=>e.order-o.order)}function Hy(){let e=we();return B.flatMap((o)=>{let s=e.filter((t)=>(t.group??"integrations")===o.id);return s.length===0?[]:[{id:o.id,intro:o.intro,label:o.label,note:o.note,sections:s}]})}function qk(){return Hy().flatMap((e)=>e.sections.map((o)=>o.key))}function I(e){return j.get(e)}var H=null,L=ve;function W(){if(H!==null&&j.has(H))return L=H,H=null,L;if(j.has(L))return L;return qk()[0]??L}function T_(e){if(j.has(e))L=e,H=null;else H=e;A()}var X={$schema:"https://jxsuite.com/schema/v1",$id:"StudioSettingsDialog",$description:"Project Settings (§17.1): a `jx-dialog` whose body is the settings editor's two columns, the grouped section list and the section body. The dialog owns modality, Escape and focus restoration, and its one footer answer is Close: every section writes as it is edited, so there is nothing to confirm or cancel. The body is an ISLAND: this document draws the slot and nothing in it, and `settings/settings-dialog.ts` mounts `settings-pane.json` there through `onNodeCreated` (studio-ui-guidelines.md §9.4).",tagName:"jx-dialog",$props:{headline:"Project settings",confirmLabel:"",cancelLabel:"Close",size:"xl"},attributes:{part:"settings"},oncancel:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/closed"},value:[]}]},onclose:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/closed"},value:[]}]},children:[{tagName:"div",attributes:{part:"pane-slot"},style:{$description:"The editor's box is its own (`settings-pane.json`); the slot only gives it the dialog body's width.",minWidth:"0"}}]};T("settings-dialog",X);var J=ft("dialog","settings");function xe(e){let o=n(e)?void 0:e.attributes?.part;return n(o)?o:""}function Z(e){let o=document.createElement("div");o.style.pointerEvents="auto",e.layer.append(o);let s=!0,t=!1,i=()=>{if(!s)return;s=!1,e.closed()},r=g({closed:i}),l=null,a=(d)=>{if(!t&&s)Pt(d);return d},c=R("settings-dialog",r,o,{onNodeCreated:(d,m,h)=>{if(!t&&d instanceof HTMLElement&&xe(h)==="pane-slot")e.body(d)}}).then(async(d)=>{let m=d.root;if(t)return d.dispose(),m;return l=d,await Jt(m),(m.querySelector('dialog[part="dialog"]')??m).setAttribute(qe,J),a(m)}),u=()=>{let d=l?.root;if(d instanceof HTMLElement)Nt(d);i()};return{close:u,dispose(){if(t)return;u(),t=!0,l?.dispose(),l=null,o.remove()},host:o,ready:c,show(){if(!t)s=!0;return c.then(a)}}}var ee={$schema:"https://jxsuite.com/schema/v1",$id:"StudioSettingsContributed",$description:'The generic settings section behind `$studio.settings` (specs/extensions.md §9.1), as a Jx document over the kit. One document serves both layouts an extension may declare: "form" is a single schema form over the whole section value, "map" is master-detail — the entry keys on the left, the selected entry\'s form on the right. The adapter (`surfaces/settings-contributed.ts`) hands in the title, the layout, the entry rows already marked as selected, and whatever the reader is part-way through typing; `settings/contributed-section.ts` decides what an entry may be named, what reaches `project.json`, and what the validator said about it. The schema form itself is an ISLAND: this document renders `form-host` and nothing inside it, because a form built from a JSON Schema is `ui/schema-form.ts`\'s surface rather than this one\'s — the section places the element that surface hands back. The actions row is the second island: `panels/data-grid.ts` contributes it, and that one is still lit over Spectrum.',tagName:"section",attributes:{part:"contributed"},style:{$description:"What `.settings-section-title`, `.settings-two-col`, `.settings-list-panel`, `.settings-editor-panel`, `.settings-editor-header`, `.settings-empty-state` and `.settings-inline-form` said in `styles/overlays.css`, keyed on `part` and re-pointed at the studio token layer. This section was the LAST emitter of every one of them except `.settings-empty-state`, which `panels/settings-pane.ts` still writes when a project closes with the editor open — so those rules are dead in the stylesheet from here, and a central sweep removes them rather than this change, which owns no stylesheet. Two values could not come across. `.settings-editor-header h3` read `var(--spectrum-font-size-100, 14px)`, and a document is mounted in the pane rather than inside `<sp-theme>`, so it would have taken its hard-coded fallback every time; the entry name is a kit textfield now and carries the kit's own type ramp. And `.entry-name-input`, `.settings-form-panel`, `.settings-section` and `.contributed-section` had no rule anywhere at all — they were four entries on `check-styles.ts`'s orphan ledger, which is the ledger's point.",display:"block",'& [part="title"]':{margin:"0 0 16px",fontSize:"16px",fontWeight:"600",color:"var(--fg)"},'& [part="actions"]':{$description:"The host-contributed actions row — Test Connection, Push Schema, Open Data Grid on the data sections. `.data-section-actions` never had a rule anywhere, so the row was whatever the buttons stacked up to; it is a row with a gap under it now.",display:"flex",alignItems:"center",flexWrap:"wrap",gap:"8px",marginBottom:"12px"},'& [part="columns"]':{$description:"The 1px gap over the border colour is the divider between the two columns: two panels on `--bg-panel` with `--border` showing through the gap, so nothing draws a rule of its own.",display:"flex",height:"100%",gap:"1px",background:"var(--border)"},'& [part="list"]':{display:"flex",flexDirection:"column",gap:"4px",padding:"12px",width:"200px",minWidth:"200px",background:"var(--bg-panel)",overflowY:"auto"},'& [part="entry"], & [part="new-open"]':{width:"100%"},'& [part="entry"] > [part="control"], & [part="new-open"] > [part="control"]':{$description:"`.settings-list-panel sp-action-button` said `width: 100%; justify-content: flex-start`, and both halves belong to the button the row is made of rather than to the row: a kit action button centres its glyph and its label, which reads as a list of centred names.",width:"100%",justifyContent:"flex-start"},'& [part="new-form"]':{display:"flex",alignItems:"center",gap:"6px"},'& [part="new-field"]':{flex:"1",minWidth:"0"},'& [part="empty"]':{flex:"1",display:"flex",alignItems:"center",justifyContent:"center",background:"var(--bg-panel)",color:"var(--fg-dim)",fontSize:"13px"},'& [part="editor"]':{$description:"`min-width: 0` is the one line `.settings-editor-panel` did not have and needed: a flex child's floor is its content, and the schema form inside this one is a whole form rather than the short cards Data Shapes puts here — so a long pointer or a wide row pushed the column past the right edge of the pane instead of scrolling inside it.",flex:"1",padding:"16px",background:"var(--bg-panel)",overflowY:"auto",minWidth:"0"},'& [part="editor-header"]':{display:"flex",alignItems:"center",gap:"12px",marginBottom:"16px"},'& [part="entry-name"]':{flex:"1",minWidth:"0",maxWidth:"220px"}},children:[{tagName:"h3",attributes:{part:"title"},textContent:"${state.title}"},{tagName:"div",attributes:{part:"actions-slot",role:"none"},style:{display:"contents"},$switch:{$ref:"#/state/actionsState"},cases:{slot:{$description:"An island: the host renders its own actions into this node and the document renders nothing inside it.",tagName:"div",attributes:{part:"actions"}}}},{tagName:"div",attributes:{part:"body-slot",role:"none"},style:{display:"contents"},$switch:{$ref:"#/state/layout"},cases:{form:{$description:"An island: `ui/schema-form.ts` draws the whole section value into this node.",tagName:"div",attributes:{part:"form-host"}},map:{tagName:"div",attributes:{part:"columns"},children:[{tagName:"div",attributes:{part:"list"},children:[{$prototype:"Array",items:{$ref:"#/state/entries"},key:{$ref:"$map/item/key"},map:{tagName:"jx-action-button",attributes:{part:"entry","data-entry":"${$map.item.key}","data-jx-region":"${$map.item.region}"},$props:{label:"${$map.item.key}",selected:{$ref:"$map/item/selected"},quiet:!0,size:"sm"},onclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/select"},value:[{$ref:"$map/item/key"}]}]},children:[{tagName:"span",textContent:"${$map.item.key}"}]}},{tagName:"div",attributes:{part:"new-slot",role:"none"},style:{display:"contents"},$switch:{$ref:"#/state/newState"},cases:{closed:{tagName:"jx-action-button",attributes:{part:"new-open"},$props:{label:"${state.newLabel}",icon:"plus",quiet:!0,size:"sm"},onclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/openNew"},value:[]}]},children:[{tagName:"span",textContent:"${state.newLabel}"}]},open:{tagName:"div",attributes:{part:"new-form"},children:[{tagName:"jx-textfield",attributes:{part:"new-field"},$props:{label:"${state.newFieldLabel}",placeholder:"${state.newPlaceholder}",size:"sm",value:{$ref:"#/state/newName"}},oninput:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/editNew"},value:[{$ref:"event#/target/value"}]}]},onkeydown:{$prototype:"Function",body:[{$switch:{$ref:"event#/key"},cases:{Enter:[{preventDefault:!0},{operator:"call",target:{$ref:"#/state/createNew"},value:[]}],Escape:[{preventDefault:!0},{operator:"call",target:{$ref:"#/state/cancelNew"},value:[]}]}}]}},{tagName:"jx-button",attributes:{part:"new-create"},$props:{size:"sm"},onclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/createNew"},value:[]}]},children:[{tagName:"span",textContent:"Create"}]}]}}}]},{tagName:"div",attributes:{part:"editor-slot",role:"none"},style:{display:"contents"},$switch:{$ref:"#/state/editorState"},cases:{empty:{tagName:"div",attributes:{part:"empty"},textContent:"${state.emptyText}"},editing:{tagName:"div",attributes:{part:"editor","data-jx-region":"${state.editorRegion}"},children:[{tagName:"div",attributes:{part:"editor-header"},children:[{tagName:"jx-textfield",attributes:{part:"entry-name"},$props:{label:"Entry name",size:"sm",value:{$ref:"#/state/entryName"}},onchange:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/renameEntry"},value:[{$ref:"event#/target/value"}]}]},onkeydown:{$prototype:"Function",body:[{$switch:{$ref:"event#/key"},cases:{Enter:[{operator:"call",target:{$ref:"#/state/renameEntry"},value:[{$ref:"event#/target/value"}]}],Escape:[{operator:"call",target:{$ref:"#/state/cancelRename"},value:[{$ref:"event#/target/value"}]}]}}]}},{tagName:"jx-action-button",attributes:{part:"delete-entry"},$props:{label:"Delete entry",hint:"Delete entry",icon:"trash",quiet:!0,size:"sm"},onclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/removeEntry"},value:[]}]}}]},{$description:"An island: `ui/schema-form.ts` draws the selected entry into this node.",tagName:"div",attributes:{part:"form-host"}}]}}}]}}}]};T("settings-contributed",ee);function Te(){return{actionsState:"none",editorRegion:"",editorState:"empty",entries:[],entryName:"",layout:"form",newName:"",newState:"closed",title:"",emptyText:"",newFieldLabel:"",newLabel:"",newPlaceholder:""}}function Ne(e){let o=n(e)?void 0:e.attributes?.part;return n(o)?o:""}function ne(e,o,s){e.textContent="";let t=g({...Te(),...o}),i=null,r=!1,l=R("settings-contributed",t,e,{onNodeCreated:(a,c,u)=>{if(!(a instanceof HTMLElement))return;let d=Ne(u);if(d==="form-host")s.formSlot(a);else if(d==="actions")s.actionsSlot(a)}}).then((a)=>{let c=a.root;if(r)return a.dispose(),c;return i=a,c});return{attached:()=>{if(r)return!1;let a=i?.root;return a===void 0?!0:a instanceof HTMLElement&&e.contains(a)},dispose(){r=!0,i?.dispose(),i=null},host:e,ready:l,update(a){t.actionsState=a.actionsState,t.editorRegion=a.editorRegion,t.editorState=a.editorState,t.entries=a.entries,t.entryName=a.entryName,t.layout=a.layout,t.newName=a.newName,t.newState=a.newState,t.title=a.title,t.emptyText=a.emptyText,t.newFieldLabel=a.newFieldLabel,t.newLabel=a.newLabel,t.newPlaceholder=a.newPlaceholder}}}var N=new Map,F=new Set,O=new Map;function BR(e,o){let s=x?.projectConfig?.[e],t=v(s)?s:{};if(!Object.hasOwn(t,o))return Object.keys(t);return N.set(e,o),null}var _=new Map;function ke(e,o){let s={},t=[];for(let i of o){let r=i.indexOf(": "),l=r===-1?"":i.slice(0,r),a=r===-1?i:i.slice(r+2);if(l===e){t.push(a);continue}if(!l.startsWith(`${e}/`))continue;let[c]=l.slice(e.length+1).split("/");if(c&&s[c]===void 0)s[c]=a}return{fields:s,section:t}}async function z(e,o){let s=x?.projectConfig;if(!s)return;if(!(await Kl()).ok)return;let i=[];try{i=await Wu(s)}catch(r){C.warn(`Could not validate project.json — ${Q(r)}`,{key:"settings:validator",path:"project.json",source:"Settings",tier:"problem"});return}_.set(e,ke(e,i).fields),o()}function oe(e,o){for(let[s,t]of Object.entries(o))if(t===void 0)delete e[s];else e[s]=t}function U(e){return e.toLowerCase().replaceAll(/\s+/g,"-").replaceAll(/[^a-z0-9-]/g,"")}function Ce(e,o){if(!e)return{};let s=(i)=>{let r={};for(let[l,a]of Object.entries(i))r[l]=t(a);return r},t=(i)=>{if(n(i))return i.replaceAll("${key}",o);if(Array.isArray(i))return i.map((r)=>t(r));if(v(i))return s(i);return i};return s(e)}function ie(e,o,s=null){let t=p(),i={fieldKeyPrefix:`$settings.${e}`,resolvePointer:(r,l)=>{let a={projectConfig:x?.projectConfig??{}};if(v(l))a.scope=l;if(o.formats!==void 0)a.formats=o.formats;return gp(r,a)}};if(te(t.setSecrets))i.commitSecret=async(r,l)=>{let a=WD(e,s,r);return await t.setSecrets({set:{[a]:l}}),a};return i}function M(e){let o=x?.projectConfig;if(!o)return null;let s=o[e];if(v(s))return s;let t={};return o[e]=t,t}function re(e){return`${J}/${e}`}var se=new WeakMap;function w(e){Gk(e.container,e.contribution,e.opts)}function le(e,o){e.echo=o,w(e)}var Ee="entry";function je(e){let o=e?.trim().toLowerCase()||Ee,s=`${o.charAt(0).toUpperCase()}${o.slice(1)}`;return{emptyText:`Select ${/^[aeiou]/u.test(o)?"an":"a"} ${o} or create one`,newFieldLabel:`${s} name`,newLabel:`New ${o}`,newPlaceholder:`${U(o)}-name`}}function Me(e){let{contribution:o,opts:s}=e,t=o.key,i=o.title??t,r=s.actions?"slot":"none",l=re("editor"),a=je(o.settings.entry?.noun);if((o.settings.layout??"form")!=="map")return{actionsState:r,editorRegion:l,editorState:"empty",entries:[],entryName:"",layout:"form",newName:"",newState:"closed",title:i,...a};let c=M(t)??{},u=N.get(t)??null,d=u===null?void 0:c[u],m=u!==null&&S(d);return{actionsState:r,editorRegion:l,editorState:m?"editing":"empty",entries:Object.keys(c).map((h)=>({key:h,region:re(`entry:${h}`),selected:h===u})),entryName:e.echo??(m?u:""),layout:"map",newName:O.get(t)??"",newState:F.has(t)?"open":"closed",title:i,...a}}function ce(e){let o=e.formHost;if(!o)return;let{contribution:s,opts:t}=e,i=s.key,r=s.settings.entry?.ui,l=()=>w(e),a=(k)=>{if(k.parentNode!==o)o.replaceChildren(k)};if((s.settings.layout??"form")!=="map"){let k=`/${i}`;a(jl(`section:${i}`,s.entrySchema,M(i)??{},{context:ie(i,t,null),errors:_.get(k)??{},onChange:(y)=>{let f=M(i);if(!f)return;oe(f,y),l(),z(k,l)},rerender:l,...r!==void 0&&{ui:r}}));return}let c=M(i)??{},u=N.get(i)??null,d=u===null?void 0:c[u];if(u===null||!S(d)){o.replaceChildren();return}let m=d,h=`/${i}/${u}`;a(jl(`section:${i}:${u}`,s.entrySchema,m,{context:ie(i,t,u),errors:_.get(h)??{},onChange:(k)=>{oe(m,k),l(),z(h,l)},rerender:l,...r!==void 0&&{ui:r}}))}function de(e){let o=e.actionsHost,{actions:s}=e.opts;if(!o)return;if(!s){o.replaceChildren();return}let t=e.contribution.key,i=(e.contribution.settings.layout??"form")==="map"?N.get(t)??null:null;s(o,{rerender:()=>w(e),sectionKey:t,selected:i})}function Pe(e){let o=(i)=>{e.echo=null,w(e),z(i,()=>w(e))},s=()=>{e.echo=null,w(e)},t=()=>e.contribution.key;return{cancelNew(){F.delete(t()),O.delete(t()),w(e)},cancelRename(i){le(e,i),s()},createNew(){let i=t(),r=U(O.get(i)??""),l=M(i);if(!r||!l||l[r])return;l[r]=Ce(e.contribution.settings.entry?.newEntry,r),N.set(i,r),F.delete(i),O.delete(i),o(`/${i}`)},editNew(i){O.set(t(),i),w(e)},openNew(){F.add(t()),w(e)},removeEntry(){let i=t(),r=N.get(i)??null,l=M(i);if(!r||!l?.[r])return;delete l[r],N.set(i,null),o(`/${i}`)},renameEntry(i){le(e,i);let r=t(),l=N.get(r)??null,a=M(r),c=U(i.trim());if(!l||!a||!c||c===l||a[c]){s();return}let u={};for(let[d,m]of Object.entries(a))u[d===l?c:d]=m,delete a[d];Object.assign(a,u),N.set(r,c),o(`/${r}`)},select(i){N.set(t(),i),e.echo=null,w(e)}}}function Gk(e,o,s={}){let t=se.get(e);if(t)t.contribution=o,t.opts=s;let i=t?.handle??null;if(!t||!i?.attached()){i?.dispose();let r={actionsHost:null,container:e,contribution:o,echo:null,formHost:null,handle:null,opts:s};se.set(e,r),i=ne(e,Pe(r),{actionsSlot:(l)=>{r.actionsHost=l,de(r)},formSlot:(l)=>{r.formHost=l,ce(r)}}),r.handle=i,t=r}i.update(Me(t)),de(t),ce(t)}var pe={$schema:"https://jxsuite.com/schema/v1",$id:"StudioSettingsPane",$description:'The Project Settings dialog\'s two columns: the grouped section list and the section body (§17.1). It draws no section: `panels/settings-pane.ts` keeps the registry, decides which section is current, and renders whichever one that is into the one empty `[part="section-host"]` island this document leaves for it (studio-ui-guidelines.md §9.4), because a section renderer may be a lit template or a mounted document and neither can share a container with this one. The list is three vertical `tablist`s, one per group (General, Integrations, Advanced), each named by its group heading: a tablist may own only tabs, so a heading between two runs of rows has to END one list rather than sit inside it. Each group is one tab stop and the arrow keys move within it. Under the groups, a Moved footnote names what left Project Settings for a workspace, each with a button that goes there.',tagName:"div",attributes:{part:"doc"},style:{$description:'No part below is named `body`, `field`, `label`, `error`, `text` or `actions`: this document is mounted inside a `jx-dialog`, the kit is light DOM, and the dialog draws its own `[part="body"]` around this one, so a rule keyed on that name here would also be a rule the dialog\'s own styles reach.',display:"flex",height:"min(68vh, 640px)",minHeight:"0",background:"var(--bg)",color:"var(--fg)",fontFamily:"var(--jx-font-sans)",textAlign:"initial",'& [part="nav"]':{display:"flex",flexDirection:"column",gap:"var(--jx-space-4)",width:"200px",minWidth:"200px",flexShrink:"0",padding:"var(--jx-space-2) var(--jx-space-3) var(--jx-space-2) 0",borderRight:"1px solid var(--border)",overflowY:"auto",fontSize:"13px"},'& [part="group"]':{display:"flex",flexDirection:"column",gap:"var(--jx-space-1)"},'& [part="group-title"]':{display:"flex",alignItems:"baseline",gap:"var(--jx-space-2)",margin:"0",padding:"0 var(--jx-space-3)",color:"var(--fg-dim)",fontSize:"var(--jx-text-sm)",fontWeight:"600",letterSpacing:"0.04em",textTransform:"uppercase"},'& [part="group-note"]':{$description:`The Advanced group's "For developers": a qualifier on the heading, not a second heading, so it reads at the heading's size without its weight.`,fontWeight:"400",letterSpacing:"0",textTransform:"none"},'& [part="group-note"]:empty':{display:"none"},'& [part="group-tabs"]':{$description:"The rule a vertical strip draws on its trailing edge is the column's own here: the nav draws one border for all three groups, so each strip drawing its own would stack three short rules beside it.",borderInlineEnd:"0"},'& [part="nav-item"]':{$description:"Full-bleed rows, which a tab is not by default: `jx-tab` centres its label and caps itself at 220px because a horizontal strip is a row of chips. In the nav column the row IS the target, so the label goes to the leading edge and the cap comes off.",maxWidth:"none",justifyContent:"flex-start",padding:"var(--jx-space-2) var(--jx-space-3)"},'& [part="moved"]':{display:"flex",flexDirection:"column",gap:"var(--jx-space-1)",marginTop:"auto",padding:"var(--jx-space-3)",borderTop:"1px solid var(--border)",color:"var(--fg-dim)",fontSize:"var(--jx-text-md)"},'& [part="moved-title"]':{margin:"0",fontWeight:"600",color:"var(--fg)"},'& [part="moved-row"]':{display:"flex",alignItems:"center",flexWrap:"wrap",gap:"var(--jx-space-1)"},'& [part="content"]':{flex:"1",minWidth:"0",overflowY:"auto",padding:"var(--jx-space-2) var(--jx-space-5)"},'& [part="group-intro"]':{margin:"0 0 var(--jx-space-3)",color:"var(--fg-dim)",fontSize:"13px"},'& [part="group-intro"]:empty':{display:"none"},'& [part="section-host"]':{display:"block",minWidth:"0"},'& [part="empty"]':{$description:"What the body says when the active section is registered by nobody: every section unregistering at once, which is a project closing while the dialog is open. A blank column beside a list reads as a broken dialog, so it says which it is.",display:"flex",alignItems:"center",justifyContent:"center",minHeight:"120px",margin:"0",color:"var(--fg-dim)",fontSize:"13px"},'& [part="failure"]':{$description:"A section whose renderer threw or rejected. It is said where the section would have been, in the reader's line of sight, because a section that silently draws nothing is indistinguishable from one with nothing to say.",margin:"0",padding:"var(--jx-space-3)",border:"1px solid var(--danger)",borderRadius:"var(--radius)",color:"var(--fg)",fontSize:"13px"}},children:[{tagName:"div",attributes:{part:"nav",role:"none"},children:[{$prototype:"Array",items:{$ref:"#/state/groups"},key:{$ref:"$map/item/id"},map:{tagName:"div",attributes:{part:"group",role:"none","data-group":"${$map.item.id}"},children:[{tagName:"h3",attributes:{part:"group-title",id:"${$map.item.titleId}"},children:[{tagName:"span",textContent:"${$map.item.label}"},{tagName:"span",attributes:{part:"group-note"},textContent:"${$map.item.note}"}]},{tagName:"jx-tabs",attributes:{part:"group-tabs",selected:"${state.active}",orientation:"vertical"},$props:{label:{$ref:"$map/item/tabsLabel"}},onchange:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/selectSection"},value:[{$ref:"event#/detail"}]}]},children:[{$prototype:"Array",items:{$ref:"$map/item/sections"},key:{$ref:"$map/item/key"},map:{tagName:"jx-tab",attributes:{part:"nav-item",id:"${$map.item.tabId}","data-section":"${$map.item.key}",value:"${$map.item.key}",label:"${$map.item.label}",panel:"settings-pane-panel"}}}]}]}},{tagName:"div",attributes:{part:"moved",role:"group","aria-labelledby":"settings-pane-moved"},children:[{tagName:"p",attributes:{part:"moved-title",id:"settings-pane-moved"},textContent:"Moved"},{$prototype:"Array",items:{$ref:"#/state/moved"},key:{$ref:"$map/item/workspace"},map:{tagName:"div",attributes:{part:"moved-row","data-moved":"${$map.item.workspace}"},children:[{tagName:"span",textContent:"${$map.item.what} →"},{tagName:"jx-button",attributes:{part:"moved-link"},$props:{size:"sm",quiet:!0,label:{$ref:"$map/item/linkLabel"}},onclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/openMoved"},value:[{$ref:"$map/item/workspace"}]}]},children:[{tagName:"span",textContent:"${$map.item.place}"}]}]}}]}]},{tagName:"jx-tab-panel",attributes:{part:"content",id:"settings-pane-panel"},$props:{active:!0,labelledby:{$ref:"#/state/activeTabId"}},children:[{$description:`The current group's intro ("Changes here affect every page. Most sites never need them."), above whichever of its sections is showing. General has none, and an empty sentence draws nothing.`,tagName:"p",attributes:{part:"group-intro"},textContent:"${state.intro}"},{$description:"The island, and it stays empty: a settings section renders itself, into a host this document never writes into and never reads back (studio-ui-guidelines.md §9.4).",tagName:"div",attributes:{part:"section-host"}},{tagName:"div",attributes:{part:"empty-slot",role:"none"},$switch:{$ref:"#/state/hasSection"},cases:{false:{tagName:"p",attributes:{part:"empty"},textContent:"${state.empty}"}}},{tagName:"div",attributes:{part:"failure-slot",role:"none"},$switch:{$ref:"#/state/failureState"},cases:{failed:{tagName:"p",attributes:{part:"failure",role:"alert"},textContent:"${state.failure}"}}}]}]};T("settings-pane",pe);function He(e){let o=n(e)?void 0:e.attributes?.part;return n(o)?o:""}function ue(e){return e===""?"ok":"failed"}function me(e,o,s){let t=g({...o,...s,failureState:ue(o.failure)});e.textContent="",delete e._$litPart$;let i=null,r=!1,l=null,a=R("settings-pane",t,e,{onNodeCreated:(c,u,d)=>{if(!r&&c instanceof HTMLElement&&He(d)==="section-host")l=c}}).then((c)=>{if(r){c.dispose();return}i=c});return{body:()=>l,dispose(){r=!0,i?.dispose(),i=null,l=null},focusActive(){let c=i?.root;if(c instanceof HTMLElement)c.querySelector('[part="nav-item"][aria-selected="true"]')?.focus()},ready:a,update(c){t.groups=c.groups,t.moved=c.moved,t.activeTabId=c.activeTabId,t.empty=c.empty,t.intro=c.intro,t.hasSection=c.hasSection,t.failure=c.failure,t.failureState=ue(c.failure),t.active=c.active}}}var Ie="No settings sections.",fe=[{place:"Styles › Variables",view:"variables",what:"Colors and fonts",workspace:"styles"},{place:"Publish › Hosting",publishTab:"hosting",what:"Hosting and domain",workspace:"publish"},{inspector:"page",place:"Page tab",what:"Head and SEO defaults",workspace:"design"}];function ge(e){return`settings-nav-${e}`}function Oe(e){return fe.find((o)=>o.workspace===e)??null}function G(e){let o=W(),s=Hy();return{active:o,activeTabId:ge(o),empty:Ie,failure:e,groups:s.map((t)=>({id:t.id,label:t.label,note:t.note,sections:t.sections.map((i)=>({key:i.key,label:i.label,tabId:ge(i.key)})),tabsLabel:t.note===""?t.label:`${t.label}, ${t.note.toLowerCase()}`,titleId:`settings-group-${t.id}`})),hasSection:I(o)!==void 0,intro:I(o)?.intro||(s.find((t)=>t.sections.some((i)=>i.key===o))?.intro??""),moved:fe.map((t)=>{let{title:i}=nv(t.workspace),r=t.place??i;return{linkLabel:`${t.what}: ${r}. Go to ${i}`,place:r,what:t.what,workspace:t.workspace}})}}function he(e,o){let s=!1,t=null,i=null,r=null,l="",a=0,c=me(e,G(l),{openMoved:(y)=>{let f=Oe(y);if(f!==null)o.openMoved(f.workspace,f.inspector,f.view,f.publishTab)},selectSection:(y)=>{T_(y)}});function u(y,f,E){if(s||E!==a)return;l=`Could not show ${I(y)?.label??y}: ${f}`,c.update(G(l))}function d(y){if(s)return;let f=W(),E=c.body();if(E!==t)t=E,r=null;if(!E||!y&&r===f){c.update(G(l));return}let q=r!==f;r=f,l="",c.update(G(l));let K=I(f);if(!K){i=null,E.replaceChildren();return}if(q||!i||i.parentElement!==E)i=document.createElement("div"),E.replaceChildren(i);a+=1;let Y=a;try{let D=K.render(i);if(D instanceof Promise)D.catch((ye)=>{u(f,Q(ye),Y)})}catch(D){u(f,Q(D),Y)}}let m=()=>E_(()=>{d(!0)}),h=m(),k=c.ready.then(()=>{d(!0)});return{dispose(){if(s)return;s=!0,h?.(),h=null,c.dispose()},focusActive:()=>{c.focusActive()},ready:k,resume(){if(s||h!==null)return;h=m(),i=null,d(!0)},suspend(){h?.(),h=null}}}var b=null,P=!1;function be(){return P}function De(){let e={dialog:Z({body:(o)=>{e.pane=he(o,{openMoved:(s,t,i,r)=>{Ae(s,t,i,r)}})},closed:()=>{if(b===e)Du()},layer:tt("dialog")}),pane:null};return e}async function Ae(e,o,s,t){if(Du(),s!==void 0){await rt("styles.open",{view:s},"Settings");return}if(t!==void 0){await rt("publish.open",{tab:t},"Settings");return}if(await rt("view.setWorkspace",{workspace:e},"Settings"),o===void 0)return;if(await rt("view.setRightPanel",{open:!0},"Settings"),ae()?.isEnabled("view.setRightTab")===!0)await rt("view.setRightTab",{tab:o},"Settings")}async function zR(){if(P&&b){await b.dialog.ready;return}if(P=!0,b&&!b.dialog.host.isConnected)Re(),P=!0;let e=b;if(e)e.pane?.resume(),await e.dialog.show();else e=De(),b=e,await e.dialog.ready;let o=e.pane;if(o===null||b!==e||!be())return;if(await o.ready,b===e&&be())o.focusActive()}function Du(){if(!P)return;P=!1,b?.pane?.suspend(),b?.dialog.close()}function Re(){P=!1;let e=b;b=null,e?.pane?.dispose(),e?.dialog.dispose()}
|
|
2
|
+
export{FR,jR,kd,E_,Ml,HR,Hy,qk,T_,BR,Gk,zR,Du};
|
|
3
|
+
|
|
4
|
+
//# debugId=2CA7708F02B2090764756E2164756E21
|
|
5
|
+
//# sourceMappingURL=studio-3q40e3rj.js.map
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import{p}from"./studio-w4rz9hdk.js";import{x}from"./studio-gcxk20n7.js";import{oe}from"./studio-p4nrkvqr.js";import{tf}from"./studio-z97c48fk.js";import{v,Qx}from"./studio-vxq7fcvv.js";async function Nw(e,o){return p().codeService(e,o)}async function rN(e){return p().locateFile(e)}var Ku=new Map;async function Aw(e,o){let s=e.$prototype?x?.projectConfig?.imports?.[e.$prototype]:null,t=e.$src||s;if(!t||!e.$prototype)return null;let r=`${t}::${e.$prototype}`;if(Ku.has(r))return Ku.get(r);try{let n=p(),i=!s&&o.documentPath?`${location.origin}/${o.documentPath}`:void 0,a=await n.fetchPluginSchema(t,e.$prototype,i);return Ku.set(r,a),a}catch{return Ku.set(r,null),null}}function GT(e,o){let s=e.getModel();if(!s)return;let t=tf();if(!t)return;let r=o.flatMap((n)=>{let i=n.labels?.[0];if(!i)return[];let{line:a,column:c,length:u}=i.span;return[{code:n.url?{target:t.Uri.parse(n.url),value:n.code}:n.code,endColumn:c+(u||1),endLineNumber:a,message:n.message+(n.help?`
|
|
2
|
+
${n.help}`:""),severity:n.severity==="error"?t.MarkerSeverity.Error:t.MarkerSeverity.Warning,source:"oxlint",startColumn:c,startLineNumber:a}]});t.editor.setModelMarkers(s,"oxlint",r)}function sN(e,o){let s=(t)=>{if(!v(t))return null;let r=t.parameters;if(!Array.isArray(r)||r.length===0)return null;return Qx(r)};if(e.type==="def"){let t=e.defName?s(o?.state?.[e.defName]):null;if(t)return t}else if(e.type==="event"){if(!o||!e.path)return["state","event"];let t=oe(o,e.path),r=t&&e.eventKey?s(t[e.eventKey]):null;if(r)return r}return["state","event"]}
|
|
3
|
+
export{Nw,rN,Ku,Aw,GT,sN};
|
|
4
|
+
|
|
5
|
+
//# debugId=FF3435608B424ED264756E2164756E21
|
|
6
|
+
//# sourceMappingURL=studio-3qeh9t0h.js.map
|