@jxsuite/studio 6.1.1 → 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/{action-group-2mqby73c.js → action-group-4aan7g6g.js} +3 -3
- 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-6rbra5dy.js +4 -0
- package/dist/chunks/color-field-gy56c94g.js +4 -0
- package/dist/chunks/color-m7r1vk54.js +4 -0
- package/dist/chunks/color-slider-sqqdyf6c.js +4 -0
- package/dist/chunks/combobox-72h32ejk.js +4 -0
- 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/dialog-c4x05vyx.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-qg1b5eqx.js +51 -0
- package/dist/chunks/icons-63bjtbs7.js +4 -0
- package/dist/chunks/iframe-entry-2zggzajv.js +5 -0
- package/dist/chunks/iframe-entry-76j8vwwx.js +5 -0
- package/dist/chunks/iframe-entry-99nr5zfb.js +5 -0
- package/dist/chunks/iframe-entry-pkgmcgp0.js +5 -0
- package/dist/chunks/iframe-host-ssv7kyj0.js +4 -0
- package/dist/chunks/{index-2veqmnhr.js → index-32eqzv1k.js} +3 -3
- package/dist/chunks/index-f0jn7nnp.js +4 -0
- package/dist/chunks/{javascript-8nbvs12s.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-c421cf8c.js +4 -0
- 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-bdpzbfvs.js +4 -0
- package/dist/chunks/monaco-binding-vq1hgnn0.js +4 -0
- 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/number-field-y62xq0ty.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/select-rzds841e.js +4 -0
- package/dist/chunks/source-control-kwktr9y6.js +4 -0
- package/dist/chunks/split-c9zfdgxf.js +4 -0
- 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-6m380wp7.js +5 -0
- package/dist/chunks/studio-80jyh1xh.js +4 -0
- package/dist/chunks/studio-83mk4bgg.js +9 -0
- package/dist/chunks/{studio-kggey1jt.js → studio-881z1xrx.js} +4 -4
- package/dist/chunks/studio-8m0y2qe7.js +5 -0
- package/dist/chunks/studio-8tr6cfrc.js +5 -0
- 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-bbe4c90a.js +5 -0
- 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-8grwxtqk.js → studio-jcnsdaep.js} +4 -4
- package/dist/chunks/studio-jsgf2q5k.js +7 -0
- package/dist/chunks/{studio-1q1sh2ax.js → studio-k3xxbagr.js} +3 -3
- package/dist/chunks/studio-k7evxqh4.js +5 -0
- 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-rv11kfwa.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-h46vtzk8.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-wszjyh0j.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-pre0skq6.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-t6b6qe31.js → studio-r5qy30vx.js} +4 -4
- 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/swatch-group-ewh24n1f.js +4 -0
- package/dist/chunks/tabs-f5cw3tgp.js +4 -0
- package/dist/chunks/textfield-wewc8rq2.js +4 -0
- package/dist/chunks/toast-1gv0h53h.js +4 -0
- package/dist/chunks/toast-host-1yg5ar8d.js +4 -0
- package/dist/chunks/{toolbar-2nnzqhrj.js → toolbar-44cm5cta.js} +3 -3
- package/dist/chunks/tooltip-yypz28gq.js +4 -0
- package/dist/chunks/tree-9xa4hm7n.js +4 -0
- 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-bv552sfx.js +4 -0
- package/dist/iframe-entry.js +20 -16
- package/dist/manifest.json +77 -63
- package/dist/studio.js +106 -107
- package/dist/workers/ts.worker.js +3 -3
- package/package.json +17 -16
- package/src/about/about-modal.ts +4 -3
- package/src/account/action-flow.ts +45 -38
- package/src/account-status.ts +7 -2
- package/src/browse/component-examples.ts +272 -0
- package/src/browse/library-commands.ts +64 -104
- package/src/browse/library-layouts.ts +270 -53
- package/src/browse/library-model.ts +194 -134
- package/src/browse/library-pane.ts +748 -440
- package/src/browse/library-preview.ts +161 -26
- 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 +40 -10
- package/src/canvas/asset-resolve.ts +19 -23
- package/src/canvas/canvas-helpers.ts +7 -6
- package/src/canvas/canvas-live-render.ts +260 -77
- package/src/canvas/canvas-origin.ts +37 -12
- package/src/canvas/canvas-page-context.ts +112 -0
- package/src/canvas/canvas-patcher.ts +30 -30
- package/src/canvas/canvas-perf.ts +11 -5
- package/src/canvas/canvas-render.ts +175 -148
- package/src/canvas/canvas-surface.ts +5 -3
- package/src/canvas/canvas-utils.ts +147 -61
- package/src/canvas/dialog-path.ts +9 -4
- package/src/canvas/dialog-state.ts +1 -2
- package/src/canvas/diff-marks.ts +9 -16
- package/src/canvas/diff-toolbar.ts +8 -7
- package/src/canvas/edit-width-drag.ts +4 -1
- package/src/canvas/edit-width.ts +1 -3
- package/src/canvas/iframe-channel.ts +27 -13
- package/src/canvas/iframe-drop.ts +120 -12
- package/src/canvas/iframe-editable-root.ts +29 -16
- package/src/canvas/iframe-entry.ts +104 -75
- package/src/canvas/iframe-eval.ts +73 -49
- package/src/canvas/iframe-host.ts +269 -158
- package/src/canvas/iframe-inline-edit.ts +49 -30
- package/src/canvas/iframe-insert.ts +5 -4
- package/src/canvas/iframe-interaction.ts +30 -25
- package/src/canvas/iframe-keys.ts +11 -0
- package/src/canvas/iframe-overlay.ts +1 -1
- package/src/canvas/iframe-patch.ts +25 -21
- package/src/canvas/iframe-position.ts +12 -6
- package/src/canvas/iframe-protocol.ts +36 -21
- package/src/canvas/iframe-render.ts +84 -35
- package/src/canvas/iframe-slash.ts +24 -11
- package/src/canvas/iframe-subtree.ts +10 -3
- package/src/canvas/npm-modules.ts +22 -0
- package/src/canvas/path-mapping.ts +19 -12
- package/src/canvas/popover-path.ts +7 -3
- package/src/canvas/popover-state.ts +1 -2
- package/src/canvas/preview-navigate.ts +16 -0
- package/src/canvas/repeater-sources.ts +200 -0
- package/src/canvas/serialize-scope.ts +13 -5
- package/src/canvas/stage-scrollbar.ts +7 -2
- package/src/canvas/surface-registry.ts +27 -3
- package/src/collab/collab-commands.ts +7 -2
- package/src/collab/collab-session.ts +84 -45
- package/src/collab/collab-state.ts +4 -3
- package/src/collab/monaco-binding.ts +16 -13
- package/src/collab/monaco-cursors.ts +5 -2
- package/src/commands/app-commands.ts +16 -6
- package/src/commands/budget.ts +13 -11
- package/src/commands/command-args.ts +103 -71
- package/src/commands/context.ts +55 -28
- package/src/commands/defaults.ts +69 -45
- package/src/commands/keymap.ts +56 -43
- package/src/commands/levels.ts +14 -8
- package/src/commands/live-context.ts +9 -7
- package/src/commands/reference.ts +2 -1
- package/src/commands/registry.ts +22 -11
- package/src/commands/run-reported.ts +15 -10
- package/src/component-props.ts +46 -30
- package/src/content/collection-match.ts +11 -9
- package/src/content/collection-pages.ts +412 -0
- package/src/content/content-collections.ts +270 -0
- package/src/content/draft-state.ts +4 -3
- package/src/content/entry-commands.ts +54 -62
- package/src/content/entry-editor.ts +137 -32
- package/src/content/entry-fields.ts +25 -8
- package/src/content/entry-inspector.ts +225 -0
- package/src/content/entry-model.ts +38 -15
- 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/canvas-context-menu.ts +1 -2
- package/src/editor/canvas-slash-bridge.ts +3 -6
- package/src/editor/content-slice.ts +16 -14
- package/src/editor/context-menu.ts +35 -22
- package/src/editor/convert-targets.ts +30 -35
- package/src/editor/convert-to-component.ts +78 -48
- package/src/editor/convert-to-repeater.ts +34 -22
- package/src/editor/editable-tags.ts +17 -2
- package/src/editor/file-drop-action.ts +29 -22
- package/src/editor/inline-edit-apply.ts +79 -17
- package/src/editor/inline-edit.ts +76 -50
- package/src/editor/inline-format.ts +59 -56
- package/src/editor/inline-link.ts +40 -15
- package/src/editor/insert-component.ts +91 -0
- package/src/editor/insert-zone-action.ts +14 -5
- package/src/editor/merge-tags.ts +58 -19
- package/src/editor/repeater-scope.ts +39 -28
- package/src/editor/shortcuts.ts +76 -42
- package/src/editor/slash-menu.ts +52 -14
- package/src/files/asset-versions.ts +4 -4
- package/src/files/components.ts +89 -20
- package/src/files/elements.ts +5 -6
- package/src/files/file-ops.ts +92 -41
- package/src/files/files.ts +248 -239
- package/src/files/fs-events.ts +18 -7
- package/src/files/media-meta.ts +97 -2
- package/src/files/media-paths.ts +3 -0
- 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 +15 -5
- package/src/format/constraints.ts +1 -1
- package/src/format/convert-file.ts +27 -13
- package/src/format/format-choices.ts +2 -1
- package/src/format/format-host.ts +91 -50
- package/src/github/github-auth-status.ts +27 -3
- package/src/github/github-auth.ts +21 -11
- package/src/github/github-publish.ts +28 -23
- package/src/grid/cell-editors.ts +46 -31
- package/src/grid/cell-popovers.ts +5 -3
- package/src/grid/edit-buffer.ts +10 -9
- package/src/grid/grid-controller.ts +25 -23
- package/src/grid/grid-layout.ts +21 -5
- package/src/grid/grid-open.ts +3 -33
- package/src/grid/grid-panel.ts +65 -6
- package/src/grid/grid-reveal.ts +34 -0
- package/src/grid/grid-source.ts +9 -31
- package/src/grid/grid-view.ts +45 -23
- package/src/grid/redirects-grid.ts +14 -5
- package/src/grid/redirects.ts +16 -14
- package/src/grid/schema-columns.ts +25 -19
- package/src/grid/sources/connector-source.ts +47 -20
- package/src/grid/sources/content-source.ts +100 -31
- package/src/grid/sources/csv-file-source.ts +2 -2
- package/src/grid/tabulator-tables.d.ts +61 -34
- package/src/hosting/document.ts +2 -2
- package/src/hosting/stage.ts +7 -7
- package/src/i18n/i18n-commands.ts +3 -3
- 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 +51 -20
- package/src/new-project/add-repo-modal.ts +20 -19
- package/src/new-project/import-tab.ts +10 -14
- package/src/new-project/location-fields.ts +2 -1
- package/src/new-project/new-project-modal.ts +12 -9
- package/src/packages/jxsuite-update.ts +4 -3
- package/src/packages/pull-package-sync.ts +26 -25
- package/src/page-params.ts +97 -68
- package/src/panels/activity-panel.ts +38 -14
- package/src/panels/ai-chat/attached-context.ts +13 -7
- package/src/panels/ai-chat/chat-markdown.ts +8 -8
- package/src/panels/ai-chat/chat-view.ts +80 -73
- package/src/panels/ai-chat/composer.ts +30 -33
- package/src/panels/ai-chat/sessions-view.ts +1 -2
- package/src/panels/ai-panel.ts +23 -20
- package/src/panels/block-action-bar.ts +57 -46
- package/src/panels/bottom-dock.ts +5 -3
- package/src/panels/canvas-dnd-bridge.ts +36 -26
- 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 +63 -26
- package/src/panels/data-grid.ts +18 -11
- package/src/panels/dnd.ts +115 -138
- package/src/panels/editors.ts +52 -21
- package/src/panels/elements-panel.ts +19 -5
- package/src/panels/empty-state.ts +2 -2
- package/src/panels/events-panel.ts +84 -69
- package/src/panels/formula-workspace.ts +78 -54
- package/src/panels/frontmatter-fields.ts +33 -28
- package/src/panels/git-diff-open.ts +10 -6
- package/src/panels/head-panel.ts +488 -202
- package/src/panels/i18n-panel.ts +20 -12
- package/src/panels/imports-panel.ts +25 -47
- package/src/panels/jump-bar.ts +75 -31
- package/src/panels/layers-panel.ts +130 -101
- package/src/panels/left-panel.ts +25 -11
- package/src/panels/navigator-panels.ts +23 -11
- package/src/panels/pane-context.ts +140 -49
- package/src/panels/pane-grid.ts +55 -26
- package/src/panels/panel-registry.ts +36 -46
- package/src/panels/properties-panel.ts +182 -124
- package/src/panels/quick-search.ts +53 -31
- package/src/panels/right-panel.ts +201 -45
- package/src/panels/seo-modal.ts +54 -125
- package/src/panels/settings-menu.ts +63 -61
- package/src/panels/settings-pane.ts +268 -162
- package/src/panels/signals-panel.ts +156 -135
- package/src/panels/site-model.ts +367 -0
- package/src/panels/site-panel.ts +638 -0
- package/src/panels/statement-editor.ts +230 -140
- package/src/panels/style-panel.ts +253 -206
- package/src/panels/style-utils.ts +114 -51
- package/src/panels/stylebook-doc.ts +195 -60
- package/src/panels/stylebook-layers-panel.ts +48 -89
- package/src/panels/stylebook-panel.ts +60 -27
- package/src/panels/styles-panel.ts +327 -0
- package/src/panels/tab-drop.ts +27 -11
- package/src/panels/tab-strip.ts +143 -49
- package/src/platform-errors.ts +57 -43
- package/src/platform.ts +59 -31
- package/src/platforms/cloud.ts +373 -176
- package/src/platforms/default-platform.ts +14 -8
- package/src/platforms/devserver.ts +180 -142
- package/src/platforms/read-batcher.ts +16 -8
- package/src/project-list.ts +2 -1
- package/src/publish/deploy-checklist.ts +20 -9
- package/src/publish/pages-service.ts +66 -27
- package/src/publish/publish-changes.ts +491 -0
- package/src/publish/publish-commands.ts +88 -22
- package/src/publish/publish-ids.ts +49 -0
- package/src/publish/publish-panel.ts +10 -6
- 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/recent-projects.ts +15 -8
- package/src/resize-edges.ts +26 -36
- package/src/services/a11y-report.ts +26 -19
- package/src/services/agent-seed.ts +23 -11
- package/src/services/ai-ask.ts +9 -12
- package/src/services/ai-command-tools.ts +68 -62
- package/src/services/ai-import-tools.ts +80 -67
- package/src/services/ai-models.ts +17 -13
- package/src/services/ai-project-tools.ts +68 -32
- package/src/services/ai-session-store.ts +19 -10
- package/src/services/ai-system-prompt.ts +46 -20
- package/src/services/ai-tools.ts +71 -27
- package/src/services/ai-write-report.ts +20 -12
- package/src/services/ai-writes.ts +4 -4
- package/src/services/automation.ts +74 -51
- package/src/services/cem-export.ts +149 -58
- package/src/services/cf-settings.ts +4 -4
- package/src/services/clock.ts +6 -1
- package/src/services/code-services.ts +37 -31
- package/src/services/connection.ts +2 -2
- package/src/services/context-manager.ts +14 -10
- package/src/services/context-resolver.ts +20 -8
- package/src/services/data-service.ts +19 -15
- package/src/services/directory-picker.ts +20 -14
- package/src/services/document-assistant.ts +39 -19
- package/src/services/gated-registry.ts +10 -6
- package/src/services/harness/chat-reducer.ts +23 -1
- package/src/services/import-client.ts +91 -38
- package/src/services/import-seed.ts +8 -2
- package/src/services/jx-validate.ts +28 -31
- package/src/services/live-preview.ts +0 -0
- package/src/services/live-surfaces.ts +6 -3
- package/src/services/model-uri.ts +10 -2
- package/src/services/module-preloads.ts +12 -8
- package/src/services/monaco-buffer.ts +43 -24
- package/src/services/monaco-lazy.ts +7 -8
- package/src/services/monaco-setup.ts +23 -16
- package/src/services/notify.ts +44 -17
- package/src/services/popover-report.ts +25 -10
- package/src/services/preview-eval.ts +20 -8
- package/src/services/profile.ts +13 -6
- package/src/services/project-path.ts +13 -10
- package/src/services/references.ts +0 -0
- package/src/services/render-critic.ts +29 -9
- package/src/services/settings/definitions.ts +25 -14
- package/src/services/settings/kernel.ts +13 -4
- package/src/services/settings/write-queue.ts +9 -9
- package/src/services/token-lint.ts +12 -10
- package/src/services/tool-executor.ts +17 -5
- package/src/services/tool-outcomes.ts +44 -24
- package/src/services/trusted-types.ts +24 -7
- package/src/settings/contexts-section.ts +11 -8
- package/src/settings/contributed-section.ts +128 -70
- package/src/settings/css-vars-editor.ts +119 -32
- package/src/settings/defs-editor.ts +38 -35
- package/src/settings/developer-panels.ts +43 -0
- package/src/settings/extension-rows.ts +16 -8
- package/src/settings/extension-sections.ts +42 -14
- package/src/settings/extensions-section.ts +4 -1
- package/src/settings/general-settings.ts +101 -28
- package/src/settings/locales-section.ts +20 -12
- package/src/settings/preferences-dialog.ts +17 -7
- package/src/settings/preferences-keymap.ts +7 -5
- package/src/settings/preferences-sections.ts +11 -5
- package/src/settings/project-sections.ts +28 -11
- package/src/settings/schema-field-ui.ts +12 -1
- package/src/settings/section-registry.ts +116 -11
- package/src/settings/settings-dialog.ts +192 -0
- package/src/settings/settings-document.ts +186 -166
- package/src/shell/tree.ts +6 -5
- package/src/shell.ts +536 -477
- package/src/site-context.ts +101 -32
- package/src/state.ts +68 -57
- package/src/store.ts +54 -34
- package/src/studio.ts +219 -116
- package/src/style/live-preview.ts +1 -1
- package/src/style/project-styles.ts +40 -7
- 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/token-ref.ts +5 -4
- package/src/style/variables-focus.ts +61 -0
- package/src/style/variables-view.ts +235 -0
- package/src/surfaces/about.ts +18 -19
- package/src/surfaces/add-new.json +1482 -0
- package/src/surfaces/add-new.ts +325 -0
- package/src/surfaces/add-repo.ts +17 -19
- package/src/surfaces/ai-chat.ts +33 -38
- package/src/surfaces/ai-credentials-form.ts +6 -16
- package/src/surfaces/ai-managed-connect.ts +3 -4
- package/src/surfaces/ai-model-picker.ts +3 -5
- package/src/surfaces/block-action-bar.ts +22 -11
- package/src/surfaces/boot-failure.json +4 -3
- package/src/surfaces/boot-failure.ts +4 -5
- package/src/surfaces/bottom-dock.json +1 -1
- package/src/surfaces/bottom-dock.ts +9 -18
- package/src/surfaces/canvas-stage.json +30 -19
- package/src/surfaces/canvas-stage.ts +17 -16
- package/src/surfaces/cf-account-picker.ts +17 -18
- 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 +145 -105
- package/src/surfaces/convert-repeater.ts +17 -19
- package/src/surfaces/data-actions.ts +9 -7
- package/src/surfaces/dialog.ts +26 -28
- package/src/surfaces/diff-toolbar.ts +9 -7
- package/src/surfaces/empty-state.json +1 -1
- package/src/surfaces/empty-state.ts +7 -10
- package/src/surfaces/entry-editor.json +136 -0
- package/src/surfaces/entry-editor.ts +35 -11
- package/src/surfaces/entry-inspector.json +371 -0
- package/src/surfaces/entry-inspector.ts +143 -0
- package/src/surfaces/expression-editor.ts +11 -25
- package/src/surfaces/files-panel.ts +27 -14
- package/src/surfaces/formula-palette.ts +4 -5
- package/src/surfaces/github-auth.ts +16 -20
- package/src/surfaces/github-publish.ts +17 -22
- package/src/surfaces/grid-cell.ts +30 -31
- package/src/surfaces/grid-open.ts +10 -14
- package/src/surfaces/grid-panel.ts +13 -9
- package/src/surfaces/grid-replace.ts +13 -13
- package/src/surfaces/grid-views.ts +15 -18
- package/src/surfaces/inspector-dock.json +162 -14
- package/src/surfaces/inspector-dock.ts +59 -31
- package/src/surfaces/jump-bar.ts +5 -6
- package/src/surfaces/jxsuite-update.ts +16 -22
- package/src/surfaces/library-pane.json +670 -437
- package/src/surfaces/library-pane.ts +111 -77
- package/src/surfaces/logic-panel.ts +17 -30
- package/src/surfaces/logic-workspace.ts +13 -15
- package/src/surfaces/media-browser.json +62 -6
- package/src/surfaces/media-browser.ts +26 -11
- package/src/surfaces/media-field.json +1 -1
- package/src/surfaces/media-field.ts +4 -5
- package/src/surfaces/media-library.json +1586 -0
- package/src/surfaces/media-library.ts +282 -0
- package/src/surfaces/media-pane.ts +8 -7
- package/src/surfaces/media-pick-dialog.json +71 -0
- package/src/surfaces/media-pick-dialog.ts +132 -0
- package/src/surfaces/menu.ts +47 -23
- package/src/surfaces/navigator-dock.ts +11 -12
- package/src/surfaces/new-project.ts +27 -26
- package/src/surfaces/pane-context.json +144 -77
- package/src/surfaces/pane-context.ts +44 -25
- package/src/surfaces/pane-grid.ts +15 -10
- package/src/surfaces/panel-activity.ts +5 -6
- package/src/surfaces/panel-data.ts +3 -4
- package/src/surfaces/panel-deploy-checklist.json +12 -6
- package/src/surfaces/panel-deploy-checklist.ts +8 -7
- package/src/surfaces/panel-elements.ts +5 -7
- package/src/surfaces/panel-i18n.ts +5 -7
- package/src/surfaces/panel-imports.ts +6 -13
- package/src/surfaces/panel-outline.ts +25 -19
- package/src/surfaces/panel-page.json +72 -2
- package/src/surfaces/panel-page.ts +49 -25
- package/src/surfaces/panel-problems.ts +5 -7
- package/src/surfaces/panel-signals.json +1 -1
- package/src/surfaces/panel-signals.ts +25 -39
- package/src/surfaces/panel-stylebook-layers.json +71 -204
- package/src/surfaces/panel-stylebook-layers.ts +5 -29
- package/src/surfaces/preferences.json +120 -48
- package/src/surfaces/preferences.ts +29 -11
- package/src/surfaces/progress-modal.ts +15 -9
- package/src/surfaces/properties-panel.json +1 -1
- package/src/surfaces/properties-panel.ts +20 -42
- 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/publish.ts +18 -18
- package/src/surfaces/push-plan.ts +7 -8
- package/src/surfaces/rail.json +1 -159
- package/src/surfaces/rail.ts +22 -79
- package/src/surfaces/reference-field.ts +11 -15
- package/src/surfaces/schema-builder.ts +16 -22
- package/src/surfaces/schema-form.json +10 -2
- package/src/surfaces/schema-form.ts +17 -25
- package/src/surfaces/secret-field.ts +9 -6
- package/src/surfaces/seo.json +1 -1
- package/src/surfaces/seo.ts +21 -15
- package/src/surfaces/settings-contexts.ts +9 -7
- package/src/surfaces/settings-contributed.json +5 -5
- package/src/surfaces/settings-contributed.ts +32 -12
- package/src/surfaces/settings-css-vars.json +44 -36
- package/src/surfaces/settings-css-vars.ts +82 -16
- package/src/surfaces/settings-defs.json +2 -2
- package/src/surfaces/settings-defs.ts +17 -21
- package/src/surfaces/settings-deploy.json +2 -15
- package/src/surfaces/settings-deploy.ts +9 -16
- package/src/surfaces/settings-dialog.json +51 -0
- package/src/surfaces/settings-dialog.ts +169 -0
- package/src/surfaces/settings-extensions.ts +5 -6
- package/src/surfaces/settings-head.ts +33 -39
- package/src/surfaces/settings-locales.ts +8 -20
- package/src/surfaces/settings-overview.json +3 -3
- package/src/surfaces/settings-overview.ts +14 -8
- package/src/surfaces/settings-packages.ts +8 -7
- package/src/surfaces/settings-pane.json +269 -46
- package/src/surfaces/settings-pane.ts +88 -36
- package/src/surfaces/settings-rawjson.ts +5 -6
- package/src/surfaces/shell.json +2 -1
- package/src/surfaces/shell.ts +1 -2
- 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 +42 -9
- package/src/surfaces/statements.ts +13 -18
- package/src/surfaces/statusbar.ts +56 -29
- package/src/surfaces/style-panel.ts +18 -31
- package/src/surfaces/stylebook-chrome.ts +3 -5
- 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/tab-strip.ts +14 -13
- package/src/surfaces/target-line.ts +6 -7
- package/src/surfaces/welcome.ts +6 -8
- 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/patch-ops.ts +4 -3
- package/src/tabs/project-config.ts +32 -21
- package/src/tabs/selection.ts +36 -8
- package/src/tabs/tab.ts +99 -48
- package/src/tabs/transact.ts +98 -53
- package/src/types.ts +53 -43
- package/src/ui/ai-credentials-form.ts +10 -13
- package/src/ui/ai-model-picker.ts +3 -3
- package/src/ui/cf-account-picker.ts +7 -9
- package/src/ui/color-selector.ts +9 -5
- package/src/ui/dynamic-slot.ts +7 -8
- package/src/ui/expression-editor.ts +112 -105
- package/src/ui/form-controls.ts +104 -56
- package/src/ui/formula-catalog.ts +239 -230
- package/src/ui/formula-chips.ts +33 -18
- package/src/ui/layers.ts +57 -31
- package/src/ui/media-picker.ts +300 -47
- package/src/ui/popover-surface.ts +20 -12
- package/src/ui/progress-modal.ts +13 -8
- package/src/ui/regions.ts +14 -12
- package/src/ui/schema-form.ts +372 -97
- package/src/ui/surface.ts +71 -8
- package/src/ui/timing.ts +9 -0
- package/src/ui/value-source.ts +44 -31
- package/src/ui/virtual-window.ts +29 -3
- package/src/utils/base64.ts +6 -4
- package/src/utils/edit-display.ts +366 -111
- package/src/utils/element-selectors.ts +3 -2
- package/src/utils/google-fonts.ts +15 -14
- package/src/utils/inherited-style.ts +18 -20
- package/src/utils/link-target.ts +1 -1
- package/src/utils/local-day.ts +18 -0
- package/src/utils/preview-format.ts +25 -3
- package/src/utils/strip-events.ts +49 -22
- package/src/utils/studio-utils.ts +29 -14
- package/src/view.ts +2 -3
- package/src/workspace/pane-derive.ts +14 -16
- package/src/workspace/session.ts +81 -50
- 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 +165 -47
- package/styles/shell-frame.css +30 -7
- package/styles/shell-frame.json +15 -3
- package/dist/chunks/2020-va2wwra4.js +0 -4
- package/dist/chunks/adapter-f93pafd7.js +0 -4
- package/dist/chunks/cf-account-picker-af1h381v.js +0 -4
- package/dist/chunks/cf-settings-125tdm0w.js +0 -4
- package/dist/chunks/color-area-jqhna8zy.js +0 -4
- package/dist/chunks/color-field-embq5ctg.js +0 -4
- package/dist/chunks/color-fpezvnkt.js +0 -4
- package/dist/chunks/color-slider-1qmw7wqy.js +0 -4
- package/dist/chunks/combobox-773hdzyj.js +0 -4
- package/dist/chunks/components-ax2f1fnn.js +0 -4
- package/dist/chunks/content-source-108aqtk1.js +0 -4
- package/dist/chunks/convert-to-repeater-ry5rmppr.js +0 -4
- package/dist/chunks/dialog-mtm9fq5t.js +0 -4
- package/dist/chunks/editor-pfgdmkb0.js +0 -4
- package/dist/chunks/entry-commands-t0k1q0kx.js +0 -4
- package/dist/chunks/extension-sections-6mwh2hf8.js +0 -4
- package/dist/chunks/file-ops-meej5mqf.js +0 -4
- package/dist/chunks/files-44vp8a2s.js +0 -4
- package/dist/chunks/format-host-7q1petb9.js +0 -4
- package/dist/chunks/fs-events-h2mwnxaz.js +0 -4
- package/dist/chunks/git-panel-zngbymvd.js +0 -4
- package/dist/chunks/grid-view-sx9vynsp.js +0 -51
- package/dist/chunks/icons-p44xhjf0.js +0 -4
- package/dist/chunks/iframe-entry-f7mqjwpm.js +0 -5
- package/dist/chunks/iframe-entry-haw7jkvz.js +0 -5
- package/dist/chunks/iframe-entry-z6qrytv3.js +0 -5
- package/dist/chunks/iframe-host-qk3ycq87.js +0 -4
- package/dist/chunks/index-wkyfjeqz.js +0 -4
- package/dist/chunks/jsonMode-s8kt9dsj.js +0 -13
- package/dist/chunks/jx-validate-psgd7vsx.js +0 -4
- package/dist/chunks/layers-panel-1kq2jyfk.js +0 -4
- package/dist/chunks/layers-xd92fg8d.js +0 -4
- package/dist/chunks/listbox-s8fkmnq8.js +0 -4
- package/dist/chunks/lit-html-ac4cwwr4.js +0 -4
- package/dist/chunks/media-picker-0svzkdyb.js +0 -4
- package/dist/chunks/menu-37d07z9m.js +0 -4
- package/dist/chunks/menu-5c55ea3d.js +0 -4
- package/dist/chunks/monaco-binding-z6r70pdt.js +0 -4
- package/dist/chunks/monaco-buffer-fz6gq5y7.js +0 -4
- package/dist/chunks/monaco-setup-q4axkgj7.js +0 -4
- package/dist/chunks/notify-0xgtn8q1.js +0 -4
- package/dist/chunks/number-field-gw7sq8rn.js +0 -4
- package/dist/chunks/parse-897fvqah.js +0 -4
- package/dist/chunks/platform-v1qctbe6.js +0 -4
- package/dist/chunks/popover-8htra4er.js +0 -4
- package/dist/chunks/publish-panel-ym1fmgq5.js +0 -4
- package/dist/chunks/quick-search-a54e6t5n.js +0 -4
- package/dist/chunks/references-gmqp82fs.js +0 -4
- package/dist/chunks/right-panel-v7t9awbk.js +0 -4
- package/dist/chunks/section-registry-vhyf3zsr.js +0 -4
- package/dist/chunks/select-n3v7gwas.js +0 -4
- package/dist/chunks/split-pff8f3ze.js +0 -4
- package/dist/chunks/studio-0bhx5hz6.js +0 -5
- package/dist/chunks/studio-0k1ddnyy.js +0 -6
- package/dist/chunks/studio-1b04pd0j.js +0 -64
- package/dist/chunks/studio-4dwbj6gb.js +0 -5
- package/dist/chunks/studio-4tanh828.js +0 -5
- package/dist/chunks/studio-55h4mstj.js +0 -4
- package/dist/chunks/studio-5tnvjkz4.js +0 -5
- package/dist/chunks/studio-60dqgb0c.js +0 -5
- package/dist/chunks/studio-61dp09qg.js +0 -9
- package/dist/chunks/studio-63epcrj2.js +0 -5
- package/dist/chunks/studio-74k29dy9.js +0 -5
- package/dist/chunks/studio-7vg6jcd3.js +0 -5
- package/dist/chunks/studio-7zx31knw.js +0 -9
- package/dist/chunks/studio-8bxk97km.js +0 -5
- package/dist/chunks/studio-933e30n4.js +0 -5
- package/dist/chunks/studio-98wnwhbg.js +0 -5
- package/dist/chunks/studio-9mccjwjh.js +0 -14
- package/dist/chunks/studio-a2ke1e4t.js +0 -5
- package/dist/chunks/studio-e3a2a6v3.js +0 -4
- package/dist/chunks/studio-e81q1vb9.js +0 -5
- package/dist/chunks/studio-epgrmqqm.js +0 -5
- package/dist/chunks/studio-ery42sqr.js +0 -4
- package/dist/chunks/studio-g1shz58g.js +0 -5
- package/dist/chunks/studio-gf0fz03c.js +0 -5
- package/dist/chunks/studio-gjtpe62q.js +0 -6
- package/dist/chunks/studio-gkskhg7m.js +0 -5
- package/dist/chunks/studio-gx4dnjzd.js +0 -5
- package/dist/chunks/studio-j03zga3y.js +0 -9
- package/dist/chunks/studio-jhpxeckz.js +0 -5
- package/dist/chunks/studio-k01r7ykp.js +0 -5
- package/dist/chunks/studio-kk7h30ne.js +0 -7
- package/dist/chunks/studio-kt1zqney.js +0 -5
- package/dist/chunks/studio-m3cwhvye.js +0 -5
- package/dist/chunks/studio-mcayt6hz.js +0 -5
- package/dist/chunks/studio-myjcghv3.js +0 -5
- package/dist/chunks/studio-n8bxwc3y.js +0 -4
- package/dist/chunks/studio-ngm8gvpb.js +0 -5
- package/dist/chunks/studio-nj5a01jy.js +0 -928
- package/dist/chunks/studio-pcgz8heb.js +0 -5
- package/dist/chunks/studio-qcsq0t15.js +0 -5
- package/dist/chunks/studio-qkstvve9.js +0 -5
- package/dist/chunks/studio-qv1pwd3c.js +0 -5
- package/dist/chunks/studio-rc6dvxjb.js +0 -7
- package/dist/chunks/studio-s8dmmz66.js +0 -5
- package/dist/chunks/studio-sp5xzbj4.js +0 -6
- package/dist/chunks/studio-szsjbj0g.js +0 -5
- package/dist/chunks/studio-t1xzawhr.js +0 -16
- package/dist/chunks/studio-tdcprbqb.js +0 -5
- package/dist/chunks/studio-vrmcjf9g.js +0 -7
- package/dist/chunks/studio-vyc0b4he.js +0 -10
- package/dist/chunks/studio-w0cgf6jg.js +0 -5
- package/dist/chunks/studio-w3hskzqk.js +0 -5
- package/dist/chunks/studio-xgrgcdyh.js +0 -9
- package/dist/chunks/studio-xz2yxfcb.js +0 -5
- package/dist/chunks/studio-y6n42tgs.js +0 -5
- package/dist/chunks/studio-yb560vxr.js +0 -5
- package/dist/chunks/studio-yn9f8vtx.js +0 -5
- package/dist/chunks/studio-yw05w8f0.js +0 -7
- package/dist/chunks/studio-z16sgavc.js +0 -5
- package/dist/chunks/studio-zey7zsdw.js +0 -12
- package/dist/chunks/studio-zyqn40w4.js +0 -5
- package/dist/chunks/swatch-group-8qh9a3bm.js +0 -4
- package/dist/chunks/tabs-jwthg40w.js +0 -4
- package/dist/chunks/textfield-spy3hc77.js +0 -4
- package/dist/chunks/toast-4d35zd64.js +0 -4
- package/dist/chunks/toast-host-8sjmfed3.js +0 -4
- package/dist/chunks/tooltip-fd6g9xy3.js +0 -4
- package/dist/chunks/tree-h19v1jfz.js +0 -4
- package/dist/chunks/tsMode-2frah6h1.js +0 -14
- package/dist/chunks/workspace-zt81g1ms.js +0 -4
- package/dist/chunks/ws-client-n2bh4hkf.js +0 -4
- package/src/panels/frontmatter-panel.ts +0 -701
- package/src/panels/git-panel.ts +0 -1120
- package/src/surfaces/doc-header.json +0 -776
- package/src/surfaces/doc-header.ts +0 -231
- package/src/surfaces/git-panel.json +0 -1880
- package/src/surfaces/git-panel.ts +0 -272
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import{te}from"./studio-ery42sqr.js";import{p}from"./studio-xz2yxfcb.js";import{y,C}from"./studio-55h4mstj.js";import{Ed,Bu}from"./studio-63epcrj2.js";import{Qi,T,I}from"./studio-g1shz58g.js";import{_d}from"./studio-kt1zqney.js";import{VE}from"./studio-vyc0b4he.js";import{Gb}from"./studio-gf0fz03c.js";import{Pd}from"./studio-t1xzawhr.js";import{D}from"./studio-yn9f8vtx.js";var N={$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:"New Entry",icon:"plus",quiet:!0,size:"sm"},onclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/openNew"},value:[]}]},children:[{tagName:"span",textContent:"New Entry"}]},open:{tagName:"div",attributes:{part:"new-form"},children:[{tagName:"jx-textfield",attributes:{part:"new-field"},$props:{label:"New entry name",placeholder:"entry-name",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:"Select or create an entry"},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",N);function z(){return{actionsState:"none",editorRegion:"",editorState:"empty",entries:[],entryName:"",layout:"form",newName:"",newState:"closed",title:""}}function V(e){let o=e?.attributes?.part;return typeof o==="string"?o:""}function j(e,i,o){e.textContent="";let n=y({...z(),...i}),t=null,r=!1,a=I("settings-contributed",n,e,{onNodeCreated:(s,l,d)=>{if(!(s instanceof HTMLElement))return;let c=V(d);if(c==="form-host")o.formSlot(s);else if(c==="actions")o.actionsSlot(s)}}).then((s)=>{if(r)return s.dispose(),s.root;return t=s,s.root});return{attached:()=>{if(r)return!1;let s=t?.root;return s===void 0?!0:s instanceof HTMLElement&&e.contains(s)},dispose(){r=!0,t?.dispose(),t=null},host:e,ready:a,update(s){n.actionsState=s.actionsState,n.editorRegion=s.editorRegion,n.editorState=s.editorState,n.entries=s.entries,n.entryName=s.entryName,n.layout=s.layout,n.newName=s.newName,n.newState=s.newState,n.title=s.title}}}var f=new Map,v=new Set,b=new Map;function BE(e,i){let o=D?.projectConfig?.[e],n=o&&typeof o==="object"&&!Array.isArray(o)?o:{};if(!Object.hasOwn(n,i))return Object.keys(n);return f.set(e,i),null}var x=new Map;function W(e,i){let o={},n=[];for(let t of i){let r=t.indexOf(": "),a=r===-1?"":t.slice(0,r),s=r===-1?t:t.slice(r+2);if(a===e){n.push(s);continue}if(!a.startsWith(`${e}/`))continue;let[l]=a.slice(e.length+1).split("/");if(l&&o[l]===void 0)o[l]=s}return{fields:o,section:n}}async function S(e,i){let o=D.projectConfig;if(!(await Pd()).ok)return;let t=[];try{t=await _d(o)}catch(r){C.warn(`Could not validate project.json — ${te(r)}`,{key:"settings:validator",path:"project.json",source:"Settings",tier:"problem"});return}x.set(e,W(e,t).fields),i()}function E(e,i){for(let[o,n]of Object.entries(i))if(n===void 0)delete e[o];else e[o]=n}function R(e){return e.toLowerCase().replaceAll(/\s+/g,"-").replaceAll(/[^a-z0-9-]/g,"")}function J(e,i){if(!e)return{};let o=(n)=>{if(typeof n==="string")return n.replaceAll("${key}",i);if(Array.isArray(n))return n.map((t)=>o(t));if(n&&typeof n==="object"){let t={};for(let[r,a]of Object.entries(n))t[r]=o(a);return t}return n};return o(e)}function H(e,i,o=null){let n=p();return{fieldKeyPrefix:`$settings.${e}`,resolvePointer:(t,r)=>Bu(t,{projectConfig:D?.projectConfig??{},...r!==void 0&&{scope:r},...i.formats!==void 0&&{formats:i.formats}}),...typeof n.setSecrets==="function"?{commitSecret:async(t,r)=>{let a=VE(e,o,t);return await n.setSecrets({set:{[a]:r}}),a}}:{}}}function h(e){let i=D?.projectConfig;if(!i)return null;let o=i[e];if(o&&typeof o==="object"&&!Array.isArray(o))return o;let n={};return i[e]=n,n}var M=new WeakMap;function m(e){MS(e.container,e.contribution,e.opts)}function A(e,i){e.echo=i,m(e)}function K(e){let{container:i,contribution:o,opts:n}=e,t=o.key,r=o.title??t,a=n.actions?"slot":"none",s=Gb(i),l=Qi(s,"editor");if((o.settings.layout??"form")!=="map")return{actionsState:a,editorRegion:l,editorState:"empty",entries:[],entryName:"",layout:"form",newName:"",newState:"closed",title:r};let d=h(t)??{},c=f.get(t)??null,g=c===null?void 0:d[c],w=c!==null&&g!==void 0&&g!==null&&typeof g==="object";return{actionsState:a,editorRegion:l,editorState:w?"editing":"empty",entries:Object.keys(d).map((u)=>({key:u,region:Qi(s,`entry:${u}`),selected:u===c})),entryName:e.echo??(w?c:""),layout:"map",newName:b.get(t)??"",newState:v.has(t)?"open":"closed",title:r}}function O(e){let i=e.formHost;if(!i)return;let{contribution:o,opts:n}=e,t=o.key,r=o.settings.entry?.ui,a=()=>m(e),s=(u)=>{if(u.parentNode!==i)i.replaceChildren(u)};if((o.settings.layout??"form")!=="map"){let u=`/${t}`;s(Ed(`section:${t}`,o.entrySchema,h(t)??{},{context:H(t,n,null),errors:x.get(u)??{},onChange:(F)=>{let k=h(t);if(!k)return;E(k,F),a(),S(u,a)},rerender:a,...r!==void 0&&{ui:r}}));return}let l=h(t)??{},d=f.get(t)??null,c=d===null?void 0:l[d];if(d===null||!c||typeof c!=="object"){i.replaceChildren();return}let g=c,w=`/${t}/${d}`;s(Ed(`section:${t}:${d}`,o.entrySchema,g,{context:H(t,n,d),errors:x.get(w)??{},onChange:(u)=>{E(g,u),a(),S(w,a)},rerender:a,...r!==void 0&&{ui:r}}))}function L(e){let i=e.actionsHost,{actions:o}=e.opts;if(!i)return;if(!o){i.replaceChildren();return}let n=e.contribution.key,t=(e.contribution.settings.layout??"form")==="map"?f.get(n)??null:null;o(i,{rerender:()=>m(e),sectionKey:n,selected:t})}function q(e){let i=(t)=>{e.echo=null,m(e),S(t,()=>m(e))},o=()=>{e.echo=null,m(e)},n=()=>e.contribution.key;return{cancelNew(){v.delete(n()),b.delete(n()),m(e)},cancelRename(t){A(e,t),o()},createNew(){let t=n(),r=R(b.get(t)??""),a=h(t);if(!r||!a||a[r])return;a[r]=J(e.contribution.settings.entry?.newEntry,r),f.set(t,r),v.delete(t),b.delete(t),i(`/${t}`)},editNew(t){b.set(n(),t),m(e)},openNew(){v.add(n()),m(e)},removeEntry(){let t=n(),r=f.get(t)??null,a=h(t);if(!r||!a?.[r])return;delete a[r],f.set(t,null),i(`/${t}`)},renameEntry(t){A(e,t);let r=n(),a=f.get(r)??null,s=h(r),l=R(t.trim());if(!a||!s||!l||l===a||s[l]){o();return}let d={};for(let[c,g]of Object.entries(s))d[c===a?l:c]=g,delete s[c];Object.assign(s,d),f.set(r,l),i(`/${r}`)},select(t){f.set(n(),t),e.echo=null,m(e)}}}function MS(e,i,o={}){let n=M.get(e);if(n)n.contribution=i,n.opts=o;if(!n?.handle.attached()){n?.handle.dispose();let t={actionsHost:null,container:e,contribution:i,echo:null,formHost:null,handle:void 0,opts:o};M.set(e,t),t.handle=j(e,q(t),{actionsSlot:(r)=>{t.actionsHost=r,L(t)},formSlot:(r)=>{t.formHost=r,O(t)}}),n=t}n.handle.update(K(n)),L(n),O(n)}
|
|
2
|
-
export{BE,MS};
|
|
3
|
-
|
|
4
|
-
//# debugId=D18045B5A20AEDD564756E2164756E21
|
|
5
|
-
//# sourceMappingURL=studio-szsjbj0g.js.map
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import{St,Oo,Xo}from"./studio-w0cgf6jg.js";import{p}from"./studio-xz2yxfcb.js";import{ge,Q,y,oe,KR,C}from"./studio-55h4mstj.js";import{vy,Or,ci,Ey,Ip,q,rt,xi,di,ke,Ar,sr,He,ti,Ap,m,Mo,nl}from"./studio-a2ke1e4t.js";import{mh}from"./studio-5tnvjkz4.js";import{te}from"./studio-ery42sqr.js";import{D,Xl,vt}from"./studio-yn9f8vtx.js";import{me}from"./studio-pre0skq6.js";var ae={default:{description:"Resume whatever was persisted — layout, recents, settings, chat history.",id:"default",reset:"none"},fresh:{description:"A first-run app: no layout, no recents, no settings, no history.",id:"fresh",reset:"app-state"}},Oe="default",Me=/^jx[-._:]/;function Je(e){return Me.test(e)}function ze(){let e=globalThis.localStorage;if(!e)return[];let t=[];try{for(let o=0;o<e.length;o++){let n=e.key(o);if(n&&Je(n))t.push(n)}for(let o of t)e.removeItem(o)}catch{}return t}function Fe(e){let t=ae[e];if(!t)throw RangeError(`unknown startup profile "${e}"; declared: ${Object.keys(ae).join(", ")}`);if(t.reset==="app-state")ze();return t}var M=null;function le(e){if(M)return M;let t=new URLSearchParams(e??globalThis.location?.search??""),o=Fe(t.get("profile")??Oe),n=t.get("clock");return M={clock:n===null?null:KR(n),profile:o},M}var ce=new Set([ti,Ap]),Be=new Set(["auto","light","dark"]);function Ue(e){let{ui:t}=e.session;return{activeMedia:t.activeMedia,canvasMode:t.canvasMode,editZoom:t.editZoom,preview:t.preview,previewColorScheme:t.previewColorScheme,previewLocale:t.previewLocale,showLayout:t.showLayout,zoom:t.zoom}}function ue(){let e={},t=[];for(let o of m.panes){if(o.derived)continue;let n=[];for(let i of o.tabOrder){let s=m.tabs.get(i);if(!s?.documentPath)continue;n.push(s.documentPath),e[s.documentPath]=Ue(s)}if(n.length===0)continue;let r=o.activeTabId?m.tabs.get(o.activeTabId):null;t.push({activeFile:r?.documentPath??null,files:n,id:o.id})}return{focusedPane:m.activePaneId,panes:t,ui:e}}function Ge(e){if(typeof e!=="object"||e===null)return{};let t=e,o={};if(typeof t.canvasMode==="string")o.canvasMode=t.canvasMode;if(typeof t.preview==="boolean")o.preview=t.preview;if(typeof t.zoom==="number"&&Number.isFinite(t.zoom))o.zoom=t.zoom;if(typeof t.editZoom==="number"&&Number.isFinite(t.editZoom))o.editZoom=t.editZoom;if(t.activeMedia===null||typeof t.activeMedia==="string")o.activeMedia=t.activeMedia;if(typeof t.previewColorScheme==="string"&&Be.has(t.previewColorScheme))o.previewColorScheme=t.previewColorScheme;if(t.previewLocale===null||vy(t.previewLocale))o.previewLocale=t.previewLocale;if(typeof t.showLayout==="boolean")o.showLayout=t.showLayout;return o}function fe(e){if(typeof e!=="object"||e===null)return null;let t=e;if(!Array.isArray(t.panes))return null;let o=[];for(let r of t.panes){if(typeof r!=="object"||r===null)continue;let i=r;if(typeof i.id!=="string"||!ce.has(i.id))continue;let s=Array.isArray(i.files)?i.files.filter((a)=>typeof a==="string"&&a!==""):[];if(s.length===0)continue;o.push({activeFile:typeof i.activeFile==="string"&&s.includes(i.activeFile)?i.activeFile:null,files:s,id:i.id})}if(o.length===0)return null;let n={};if(typeof t.ui==="object"&&t.ui!==null)for(let[r,i]of Object.entries(t.ui))n[r]=Ge(i);return{focusedPane:typeof t.focusedPane==="string"&&ce.has(t.focusedPane)?t.focusedPane:ti,panes:o,ui:n}}async function mL(e,t){let o=0;if(e.panes.some((n)=>n.id===Ap))t.ensureSecondPane();for(let n of e.panes)for(let r of n.files){try{await t.openFile(r,n.id)}catch{}if([...m.tabs.values()].some((i)=>i.documentPath===r))o+=1}if(o===0)return 0;for(let n of m.tabs.values()){let r=n.documentPath?e.ui[n.documentPath]:void 0;if(!r)continue;let{ui:i}=n.session;if(r.canvasMode&&n.capabilities.modes.includes(r.canvasMode))i.canvasMode=r.canvasMode;if(r.preview!==void 0)i.preview=r.preview;if(r.zoom!==void 0)i.zoom=r.zoom;if(r.editZoom!==void 0)i.editZoom=r.editZoom;if(r.activeMedia!==void 0)i.activeMedia=r.activeMedia;if(r.previewColorScheme!==void 0)i.previewColorScheme=r.previewColorScheme;if(r.previewLocale!==void 0)i.previewLocale=r.previewLocale;if(r.showLayout!==void 0)i.showLayout=r.showLayout}for(let n of e.panes){let r=m.panes.find((s)=>s.id===n.id);if(!r||!n.activeFile)continue;let i=r.tabOrder.find((s)=>m.tabs.get(s)?.documentPath===n.activeFile);if(i)r.activeTabId=i}if(m.panes.some((n)=>n.id===e.focusedPane))Mo(e.focusedPane);return o}var V=["files","search","git","i18n","layers","page","data","packages","insert"],Ve={blocks:"insert",head:"page",imports:"packages",state:"data"},pe="layers";function K(e){return typeof e==="string"&&V.includes(e)}function Nx(e,t){if(!K(e))throw Error(`${t}: "${e}" is not a declared Navigator panel id.`);return e}function de(e){if(typeof e!=="string")return null;let t=Ve[e];if(t)return t;return K(e)?e:null}var H=["properties","style","events","assistant"],ly="properties";function Ox(e){return typeof e==="string"&&H.includes(e)}var cy=["problems","logic","activity"],Ax="problems";function dy(e){return typeof e==="string"&&cy.includes(e)}var uy=["light","dark"],ye="jx-studio-panel-widths",be="jx-studio-project::",Ze="dark";function qe(e){return typeof e==="string"&&uy.includes(e)}function We(){let e=Oo(St.theme);return qe(e)?e:Ze}var Md=["left","right","bottom"],R={bottom:{collapsed:!0,size:220},left:{collapsed:!1,size:240},right:{collapsed:!1,size:280}},gL={bottom:R.bottom.size,left:R.left.size,right:R.right.size},Ke={bottom:"--dock-h-bottom",left:"--panel-w-left",right:"--panel-w-right"},Ye={bottom:"bottom-collapsed",left:"left-collapsed",right:"right-collapsed"},YC=0.5,Px=0.2,Mx=0.8;function Xe(e){return typeof e==="number"&&e>=Px&&e<=Mx?e:YC}function bL(e){v.paneSplit=Math.min(Mx,Math.max(Px,e))}function Qe(){try{return JSON.parse(localStorage.getItem(ye)||"{}")}catch{return{}}}function he(){return{branches:null,commitMessage:"",diffState:null,error:null,lastUpdated:null,loading:!1,logEntries:null,rev:0,status:null,subTab:"changes"}}function ve(){return{customizedOnly:!1,filter:"",selection:null,tab:"elements"}}function we(){return[{bottomTab:"problems",docks:{bottom:{collapsed:!0,size:220},left:{collapsed:!1,size:240},right:{collapsed:!0,size:280}},id:"write",inspectorTab:"properties",name:"Write",navigatorPanel:"files"},{bottomTab:"problems",docks:{bottom:{collapsed:!0,size:220},left:{collapsed:!1,size:240},right:{collapsed:!1,size:320}},id:"design",inspectorTab:"style",name:"Design",navigatorPanel:"layers"},{bottomTab:"logic",docks:{bottom:{collapsed:!0,size:260},left:{collapsed:!1,size:280},right:{collapsed:!1,size:300}},id:"build",inspectorTab:"events",name:"Build",navigatorPanel:"data"},{bottomTab:"activity",docks:{bottom:{collapsed:!1,size:240},left:{collapsed:!1,size:300},right:{collapsed:!0,size:280}},id:"ship",inspectorTab:"properties",name:"Ship",navigatorPanel:"git"}]}var J="design";function et(){let e=Qe(),t={};for(let o of Md){let n=e[o],r=e[`${o}Collapsed`];t[o]={collapsed:typeof r==="boolean"?r:R[o].collapsed,size:typeof n==="number"&&n>0?n:R[o].size}}return{bottomTab:dy(e.bottomTab)?e.bottomTab:Ax,docks:t,focusRegion:"pane",paneSplit:Xe(e.paneSplit),git:he(),layout:J,layoutSelection:null,layouts:we(),leftTab:de(e.leftTab)??pe,settingsTab:"stylebook",stylebook:ve(),theme:We()}}le();var v=y(et());function Fd(){try{localStorage.setItem(ye,JSON.stringify({bottom:v.docks.bottom.size,bottomCollapsed:v.docks.bottom.collapsed,bottomTab:v.bottomTab,left:v.docks.left.size,leftCollapsed:v.docks.left.collapsed,leftTab:v.leftTab,paneSplit:v.paneSplit,right:v.docks.right.size,rightCollapsed:v.docks.right.collapsed}))}catch{}}var Z;function tt(e){if(typeof e!=="object"||e===null)return!1;let t=e;return typeof t.id==="string"&&t.id!==""&&typeof t.name==="string"&&K(t.navigatorPanel)&&Ox(t.inspectorTab)&&dy(t.bottomTab)&&Md.every((o)=>typeof t.docks?.[o]?.size==="number")}function Y(e){if(!e)return{};try{return JSON.parse(localStorage.getItem(`${be}${e}`)||"{}")}catch{return{}}}function ot(e){let t={activeLayout:null,layouts:we()};if(!e)return t;let o=Y(e),n=Array.isArray(o.layouts)?o.layouts.filter(tt):[];if(n.length===0)return t;return{activeLayout:typeof o.activeLayout==="string"?o.activeLayout:null,layouts:n}}function yL(e){return fe(Y(e).session)}var X=null;function hy(e){X=e}function vL(){I()}function I(){let e=m.projectRoot;if(!e)return;try{localStorage.setItem(`${be}${e}`,JSON.stringify({activeLayout:v.layout,layouts:v.layouts,session:e===X?ue():Y(e).session}))}catch{}}function nt(e){if(e===Z)return;Z=e;let{activeLayout:t,layouts:o}=ot(e);v.layouts=o;let n=(r)=>r!==null&&o.some((i)=>i.id===r);v.layout=n(t)?t:n(v.layout)?v.layout:n(J)?J:o[0]?.id??J}function Se(e){return v.layouts.find((t)=>t.id===e)}function it(e){return e.trim().toLowerCase().replaceAll(/[^a-z0-9]+/g,"-").replaceAll(/^-|-$/g,"")||"layout"}function Pe(e,t){let o=Se(e);if(!o)throw RangeError(`no layout named "${e}" — this project has: ${v.layouts.map((n)=>n.id).join(", ")}`);v.layout=o.id,v.leftTab=o.navigatorPanel,v.bottomTab=o.bottomTab;for(let n of Md)v.docks[n].collapsed=o.docks[n].collapsed,v.docks[n].size=o.docks[n].size;t.setInspectorTab(o.inspectorTab),Fd(),I()}function st(e,t){let o=e.trim(),n=it(o),r={};for(let a of Md)r[a]={collapsed:v.docks[a].collapsed,size:v.docks[a].size};let i={bottomTab:dy(v.bottomTab)?v.bottomTab:Ax,docks:r,id:n,inspectorTab:t.inspectorTab(),name:o||n,navigatorPanel:de(v.leftTab)??pe},s=v.layouts.findIndex((a)=>a.id===n);if(s===-1)v.layouts.push(i);else v.layouts.splice(s,1,i);return v.layout=n,I(),i}function at(e,t){let o=Se(e),n=t.trim();if(!o||!n)return;o.name=n,I()}function lt(e){if(v.layouts.length<2)return;let t=v.layouts.findIndex((o)=>o.id===e);if(t===-1)return;if(v.layouts.splice(t,1),v.layout===e)v.layout=v.layouts[0].id;I()}function ct(e){Pe(v.layout,e)}function Ep(e=v.theme){return e==="light"?"vs":"vs-dark"}function ut(){document.documentElement.dataset.theme=v.theme,mh()?.editor.setTheme(Ep())}function ft(){let e=document.documentElement;for(let o of Md)e.style.setProperty(Ke[o],`${v.docks[o].size}px`);let t=document.querySelector("#app");if(!t)return;for(let o of Md)t.classList.toggle(Ye[o],v.docks[o].collapsed)}var G=null,W=[];function km(e){if(!W.includes(e))W.push(e)}function wL(){if(G)return;for(let e of W)e.mount();G=ge(),G.run(()=>{Q(()=>{ft()}),Q(()=>{ut()}),Q(()=>{nt(m.projectRoot)}),Q(()=>{let e=m.projectRoot;m.activePaneId;for(let t of m.panes)t.id,t.activeTabId,t.tabOrder.join("\x00");if(e)I()})})}function vo(e,t){if(v.docks[e].collapsed===t){Fd();return}v.docks[e].collapsed=t,Fd()}function pt(e){vo(e,!v.docks[e].collapsed)}function xL(e,t){v.docks[e].size=t}function ws(e){v.leftTab=e,vo("left",!1),Fd()}function jd(e){v.bottomTab=e,vo("bottom",!1),Fd()}function ZC(e){if(v.theme===e)return;v.theme=e,Xo(St.theme,e)}function _L(e){if(e===v.leftTab&&!v.docks.left.collapsed){vo("left",!0);return}ws(e)}function XC(e){v.layoutSelection=e}function py(){Object.assign(v.git,he()),Object.assign(v.stylebook,ve()),v.settingsTab="stylebook",v.layoutSelection=null,X=null,Z=void 0}var _=(e)=>e.project.open;function dt(e){return[{args:ke({tab:Ar(V,"Which Navigator panel to show.")}),category:"View",id:"view.setActivity",level:"application",menus:["commandbar/overflow","palette"],group:"4_docks",requires:"an open project",when:_,run:(t,o)=>{let n=di("view.setActivity",o,"tab",V);if(e.panelAvailable&&!e.panelAvailable(n))throw RangeError(`command "view.setActivity" argument "tab": "${n}" names a panel that is registered but not available right now, so showing it would persist a Navigator tab nothing can draw`);ws(n)},title:"Show Navigator Panel"},{args:ke({tab:Ar(H,"Which Inspector tab to show.")}),category:"View",id:"view.setRightTab",level:"document",menus:["palette"],group:"4_docks",requires:"an open document",when:(t)=>t.document.open,run:(t,o)=>{e.setInspectorTab(di("view.setRightTab",o,"tab",H))},title:"Show Inspector Tab"},{args:ke({open:sr("True to show the Navigator dock, false to collapse it.")}),category:"View",id:"view.setNavigator",level:"application",menus:["palette"],group:"4_docks",run:(t,o)=>{vo("left",!xi("view.setNavigator",o,"open"))},title:"Show Navigator Dock"},{args:ke({open:sr("True to show the Inspector dock, false to collapse it.")}),category:"View",id:"view.setRightPanel",level:"application",menus:["palette"],group:"4_docks",run:(t,o)=>{vo("right",!xi("view.setRightPanel",o,"open"))},title:"Show Inspector Dock"},{args:ke({open:sr("True to show the Bottom dock, false to collapse it.")}),category:"View",id:"view.setBottomDock",level:"application",menus:["palette"],group:"4_docks",run:(t,o)=>{vo("bottom",!xi("view.setBottomDock",o,"open"))},title:"Show Bottom Dock"},{category:"View",id:"view.toggleBottomDock",keybinding:"mod+j",level:"application",menus:["commandbar/overflow","palette"],group:"4_docks",run:()=>{pt("bottom")},title:"Toggle Bottom Dock"},{args:ke({tab:Ar(cy,"Which Bottom dock tab to show.")}),category:"View",id:"view.setBottomTab",level:"application",menus:["palette"],group:"4_docks",run:(t,o)=>{let n=di("view.setBottomTab",o,"tab",cy);if(e.panelAvailable&&!e.panelAvailable(n))throw RangeError(`command "view.setBottomTab" argument "tab": "${n}" names a panel that is registered but not available right now, so showing it would persist a Bottom dock tab nothing can draw`);jd(n)},title:"Show Bottom Dock Tab"},{args:ke({open:sr("True to show the Assistant tab, false to step off it.")}),category:"View",id:"view.setAssistant",level:"application",menus:["never"],group:"4_docks",run:(t,o)=>{if(xi("view.setAssistant",o,"open")){vo("right",!1),e.setInspectorTab("assistant");return}if(e.inspectorTab()==="assistant")e.setInspectorTab(ly)},title:"Show Assistant"},{args:ke({layout:He("The layout's id — one of this project's saved layouts.")}),category:"View",id:"view.setLayout",level:"application",menus:["palette"],group:"4_layouts",requires:"an open project",when:_,run:(t,o)=>{Pe(rt("view.setLayout",o,"layout"),e)},title:"Switch Layout"},{args:ke({name:He("What to call this arrangement. An existing name is overwritten.")}),category:"View",id:"view.saveLayout",level:"application",menus:["palette"],group:"4_layouts",requires:"an open project",when:_,run:(t,o)=>{st(rt("view.saveLayout",o,"name"),e)},title:"Save Layout"},{args:ke({layout:He("The layout's id."),name:He("Its new name. The id, and every reference to it, is unchanged.")}),category:"View",id:"view.renameLayout",level:"application",menus:["palette"],group:"4_layouts",requires:"an open project",when:_,run:(t,o)=>{at(rt("view.renameLayout",o,"layout"),rt("view.renameLayout",o,"name"))},title:"Rename Layout"},{args:ke({layout:He("The layout's id. The last remaining layout is kept.")}),category:"View",id:"view.deleteLayout",level:"application",menus:["palette"],group:"4_layouts",requires:"an open project",when:_,run:(t,o)=>{lt(rt("view.deleteLayout",o,"layout"))},title:"Delete Layout"},{category:"View",id:"view.resetLayout",level:"application",menus:["palette"],group:"4_layouts",requires:"an open project",when:_,run:()=>{ct(e)},title:"Reset Layout"},{args:ke({color:Ar(uy,"The Studio chrome's theme.")}),category:"View",id:"view.setTheme",level:"application",menus:["palette"],group:"6_appearance",run:(t,o)=>{ZC(di("view.setTheme",o,"color",uy))},title:"Set Theme"}]}function SL(e,t){e.registerAll(dt(t))}function ee(e){return e.replaceAll("~","~0").replaceAll("/","~1")}var mt=100;function re(e){let t={blankAfter:new Set,escaped:new Map,inline:new Map},o=0,n=()=>{let a=0;while(o<e.length&&(e[o]===" "||e[o]==="\t"||e[o]==="\r"||e[o]===`
|
|
2
|
-
`)){if(e[o]===`
|
|
3
|
-
`)a+=1;o+=1}return a},r=()=>{let a=o,f=new Set;o+=1;while(o<e.length&&e[o]!=='"')if(e[o]==="\\")if(e[o+1]==="u"){let u=Number.parseInt(e.slice(o+2,o+6),16);if(u>=128)f.add(u);o+=6}else o+=2;else o+=1;return o+=1,{escaped:f,raw:e.slice(a,o)}},i=(a,f)=>{let u=n();if(e[o]===f)return o+=1,!0;if(o+=1,u+=n(),u>=2)t.blankAfter.add(a);return!1},s=(a)=>{n();let f=e[o];if(f==="{"){o+=1;let u=n()>0;if(e[o]==="}"){o+=1;return}t.inline.set(a,!u);while(o<e.length){let l=JSON.parse(r().raw);n(),o+=1;let c=`${a}/${ee(l)}`;if(s(c),i(c,"}"))return}}else if(f==="["){if(o+=1,n(),e[o]==="]"){o+=1;return}for(let u=0;o<e.length;u+=1){let l=`${a}/${u}`;if(s(l),i(l,"]"))return}}else if(f==='"'){let{escaped:u}=r();if(u.size>0)t.escaped.set(a,u)}else while(o<e.length&&!`,]} \r
|
|
4
|
-
`.includes(e[o]))o+=1};return s(""),t}function ys(e){return{document:JSON.parse(e),layout:re(e)}}var gt=/[^\u0020-\u007E]/,yt=/^[\p{Mn}\p{Me}\p{Cf}]$/u,bt=/^\p{Emoji_Presentation}$/u;function ht(e){return e>=4352&&(e<=4447||e===9001||e===9002||e>=11904&&e<=12871&&e!==12351||e>=12880&&e<=19903||e>=19968&&e<=42182||e>=43360&&e<=43388||e>=44032&&e<=55203||e>=63744&&e<=64255||e>=65040&&e<=65049||e>=65072&&e<=65131||e>=65281&&e<=65376||e>=65504&&e<=65510||e>=110592&&e<=110593||e>=127488&&e<=127569||e>=131072&&e<=262141)}function xe(e){if(!gt.test(e))return e.length;let t=0;for(let o of e){if(yt.test(o))continue;t+=ht(o.codePointAt(0))||bt.test(o)?2:1}return t}function wt(e){return e===void 0||typeof e==="function"||typeof e==="symbol"}function ne(e){return Object.entries(e).filter(([,t])=>!wt(t))}function z(e){return typeof e==="object"&&e!==null&&!Array.isArray(e)}function Pt(e){if(e.length<2)return!1;let t=Array.isArray(e[0])?"array":z(e[0])?"object":null;if(t===null)return!1;return e.every((o)=>t==="array"?Array.isArray(o)&&o.length>1:z(o)&&ne(o).length>1)}function kt(e){return e.length>1&&e.every((t)=>typeof t==="number")}function Te(e,t){let o=JSON.stringify(e)??"null";return t===void 0?o:o.replaceAll(/[\u0080-\uFFFF]/g,(n)=>{let r=n.codePointAt(0);return t.has(r)?`\\u${r.toString(16).padStart(4,"0")}`:n})}function yo(e,t,o=mt){let n=t?.inline??new Map,r=t?.blankAfter??new Set,i=t?.escaped??new Map,s=(l,c)=>n.get(l)??c,a=(l,c,d)=>{if(Array.isArray(l)){if(l.length===0)return"[]";if(Pt(l))return null;let g=[];for(let[b,h]of l.entries()){let w=`${c}/${b}`,k=r.has(w)?null:a(h,w,d);if(k===null)return null;g.push(k)}return`[${g.join(", ")}]`}if(z(l)){let g=ne(l);if(g.length===0)return"{}";if(!s(c,d))return null;let b=[];for(let[h,w]of g){let k=`${c}/${ee(h)}`,S=r.has(k)?null:a(w,k,!0);if(S===null)return null;b.push(`${JSON.stringify(h)}: ${S}`)}return`{ ${b.join(", ")} }`}return Te(l,i.get(c))},f=(l)=>l.map(({path:c,text:d},g)=>g===l.length-1?d:`${d},
|
|
5
|
-
${r.has(c)?`
|
|
6
|
-
`:""}`).join(""),u=(l,c,d,g,b,h)=>{let w=a(l,c,b),k=Array.isArray(l)||z(l);if(w!==null&&(!k||g+xe(w)+h<=o))return w;let S=" ".repeat(d+2),B=`
|
|
7
|
-
${" ".repeat(d)}`;if(Array.isArray(l)){if(kt(l))return`[
|
|
8
|
-
${xt(l,S,o,(T)=>r.has(`${c}/${T}`))}${B}]`;let E=l.map((N,T)=>{let A=`${c}/${T}`,O=T===l.length-1,U=u(N,A,d+2,S.length,b,O?0:1);return{path:A,text:`${S}${U}`}});return`[
|
|
9
|
-
${f(E)}${B}]`}let se=ne(l),Ee=s(c,b),Ne=se.map(([E,N],T)=>{let A=`${c}/${ee(E)}`,O=`${JSON.stringify(E)}: `,U=T===se.length-1,$e=S.length+xe(O),De=u(N,A,d+2,$e,Ee,U?0:1);return{path:A,text:`${S}${O}${De}`}});return`{
|
|
10
|
-
${f(Ne)}${B}}`};return`${u(e,"",0,0,!1,0)}
|
|
11
|
-
`}function xt(e,t,o,n){let r=[],i="";for(let[s,a]of e.entries()){let f=`${Te(a)}${s===e.length-1?"":","}`;if(i==="")i=`${t}${f}`;else if(i.length+1+f.length<=o)i=`${i} ${f}`;else r.push(i),i=`${t}${f}`;if(n(s)&&s<e.length-1)r.push(i,""),i=""}return r.push(i),r.join(`
|
|
12
|
-
`)}function Qu(e){return yo(e,Tt())}var P=null,L=null,j=null,x=null;function Tt(){return Ce()?.doc.layout??x}var ie=null;function Ce(){let e=m.tabs.get(ci);return e?oe(e):null}function _t(){if(L)Ip(L),L=null;P=null,j=null,x=null,ie=null}function Le(){return ie??=(async()=>{try{let e=await p().readFile(ci),{document:t,layout:o}=ys(e);x=o,j=Qu(t)}catch{j=null}})(),ie}async function JC(e){if(await Le(),e.doc.layout===null&&x!==null)e.doc.layout=x}function It(e){let t=vt();if(t.projectConfig===e)return;Xl({...t,projectConfig:e}),nl(m.projectRoot,e)}function Ct(){let e=vt()?.projectConfig;return e?oe(e):null}function je(e,t){for(let o of Object.keys(e))delete e[o];Object.assign(e,t)}function _e(e){return P=e,e.scope.run(()=>{Q(()=>{let t=e.doc.document;if(P!==e||!vt())return;It(oe(t))})}),e}function Ae(){let e=vt(),t=Ce();if(P&&(P!==(t??L)||oe(P.doc.document)!==e.projectConfig))_t();if(P)return P;if(t)return _e(t);return L=Ey({document:e.projectConfig??{},documentPath:ci,id:ci}),_e(L)}function Ie(e){return JSON.stringify(e.extensions??null)}async function Lt(){let{loadFormats:e,refreshExtensionUi:t,refreshFormats:o}=await (me("7q1petb9"),import("./format-host-7q1petb9.js"));o(),e(),t(p())}async function Pd(e){let t=Ct(),o=Ae();await JC(o);let n=oe(o.doc.document),r=Qu(n),i=t&&t!==n&&Qu(t)!==r?t:null;if(i&&o.doc.dirty){let d=Error(`${ci} has unsaved changes in its editor tab`);return C.error(`Could not save ${ci} — the file is open with unsaved changes. Save or `+"revert that tab, then make the settings change again.",{key:`save:${ci}`,path:ci,source:"Settings"}),{error:d,ok:!1}}let s=i??n,a=e?{...s,...e}:s,f=Qu(a);if(!i&&!o.doc.dirty&&f===j)return{ok:!0};let u=Ie(n);q(o,(d)=>{let g=d.doc.document;if(i)je(g,i);for(let[b,h]of Object.entries(e??{}))g[b]=h});let l=oe(o.doc.document),c=Qu(l);try{await p().writeFile(ci,c)}catch(d){return C.error(`Could not save ${ci} — ${te(d)}`,{key:`save:${ci}`,path:ci,source:"Settings"}),{error:d,ok:!1}}if(j=c,o.doc.dirty=!1,Ie(l)!==u)await Lt();return{ok:!0}}async function uL(e,t){if(!vt()){nl(m.projectRoot,e);return}let o=Ae();q(o,(n)=>je(n.doc.document,e),{skipHistory:!0}),o.doc.dirty=!1,await Le(),x=re(t),o.doc.layout=x,j=Qu(e)}function Oi(e){let t=D?.projectConfig?.$media;if(!t)return e||{};if(!e)return{...t};return{...t,...e}}function Jr(e){let t=D?.projectConfig?.style;if(!t)return e||{};if(!e)return{...t};let o={...t};for(let[n,r]of Object.entries(e))o[n]=typeof r==="object"&&r!==null&&typeof o[n]==="object"&&o[n]!==null?{...o[n],...r}:r;return o}function hL(e){let t=D?.projectConfig?.imports;if(!t)return e||{};if(!e)return{...t};return{...t,...e}}function sy(e){let t=D?.projectConfig?.$elements;if(!t?.length)return e||[];if(!e?.length)return[...t];let o=new Set,n=[];for(let r of[...t,...e]){let i=typeof r==="string"?r:r?.$ref;if(i&&!o.has(i))o.add(i),n.push(r)}return n}function pL(e){let t=D?.projectConfig?.$head;if(!t?.length)return e||[];if(!e?.length)return[...t];let o=new Set,n=[];for(let r of[...t,...e]){let i=String(r?.attributes?.href||r?.attributes?.src||"")||JSON.stringify(r);if(!o.has(i))o.add(i),n.push(r)}return n}function vs(){let e=D?.projectConfig;return e?Or(e).i18n:null}var F=new Map;function Dx(){F.clear()}function Vl(e){if(e===!1)return null;let t=D?.projectConfig?.defaults?.layout;return e||t||null}async function ay(e){let t=e.replace(/^\.\//,"");if(F.has(t))return structuredClone(F.get(t));try{let n=await p().readFile(t),r=JSON.parse(n);return F.set(t,r),structuredClone(r)}catch{return null}}function fL(e,t){let o=t.children??[],n=Array.isArray(o)?o:[],r=new Map,i=[];for(let s of n){let a=typeof s==="object"?s.attributes?.slot:void 0;if(typeof s==="object"&&typeof a==="string"&&a){if(!r.has(a))r.set(a,[]);r.get(a).push(s)}else i.push(s)}if(Re(e,r,i),t.state)e.state={...e.state,...t.state};if(t.$media)e.$media={...e.$media,...t.$media};if(t.style)e.style={...e.style,...t.style};if(t.attributes)e.attributes={...e.attributes,...t.attributes};return e}function Re(e,t,o){if(!e||typeof e!=="object")return;if(!Array.isArray(e.children))return;let n=[];for(let r of e.children)if(r&&typeof r==="object"&&r.tagName==="slot"){let i=r.attributes?.name;if(typeof i==="string"&&i&&t.has(i))n.push(...t.get(i)),t.delete(i);else if(!i&&o.length>0)n.push(...o);else if(Array.isArray(r.children))n.push(...r.children)}else{if(typeof r!=="string")Re(r,t,o);n.push(r)}e.children=n}async function Vi(e){let t=await Pd(e);if(!t.ok)throw t.error}
|
|
13
|
-
export{ys,yo,Qu,JC,Pd,uL,Oi,Jr,hL,sy,pL,vs,Dx,Vl,ay,fL,Vi,mL,Nx,ly,Ox,cy,Ax,dy,uy,Md,gL,YC,Px,Mx,bL,v,Fd,yL,hy,vL,Ep,km,wL,vo,xL,ws,jd,ZC,_L,XC,py,SL};
|
|
14
|
-
|
|
15
|
-
//# debugId=70AF307A68D84DC164756E2164756E21
|
|
16
|
-
//# sourceMappingURL=studio-t1xzawhr.js.map
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import{p,Ve}from"./studio-xz2yxfcb.js";import{C}from"./studio-55h4mstj.js";import{St,Oo,CL,fy,my,Xo,EL,eh}from"./studio-w0cgf6jg.js";import{Ss,Ct}from"./studio-g1shz58g.js";var s=null;async function Rc(){if(!Ve()||typeof p().getAccountStatus!=="function"){s=null;return}try{s=await p().getAccountStatus?.()??null}catch{s=null}}function ox(){return s}function sx(){return s!==null&&s.installations.length===0&&Boolean(s.appInstallUrl)}function bT(){if(s===null)return null;let e=s.installations.flatMap((t)=>t.manageUrl?[{account:t.account??`Installation ${t.id}`,url:t.manageUrl}]:[]);if(e.length===0&&!s.appInstallUrl)return null;return{manage:e,...s.appInstallUrl?{installUrl:s.appInstallUrl}:{}}}function yT(){return s?.entries??[]}function tC(){return(s?.notices??[]).filter((e)=>e.display!=="toast")}var j=new Set;function I(){let e=(s?.notices??[]).filter((t)=>t.display==="toast"&&!j.has(t.id));for(let t of e)j.add(t.id);return e}var M="https://jxsuite.com/problems/";function pm(e){if(typeof e!=="string"||!e.startsWith("https://jxsuite.com/problems/"))return null;let t=e.slice(29);return t===""?null:t}function Nr(e){if(typeof e==="string")return e.trim()===""?null:e;if(!e||typeof e!=="object")return null;let t=e;for(let o of[t.detail,t.error,t.title])if(typeof o==="string"&&o.trim()!=="")return o;return null}function zs(e,t){return Nr(e)??(t===void 0?"Request failed":`Request failed (${t})`)}var a=(e,t,o,r)=>({status:t,title:o,type:`${M}${e}`,...r===void 0?{}:{extensions:r}}),re={invalidRequest:a("invalid-request",400,"The request was malformed or incomplete"),notFound:a("not-found",404,"The requested resource does not exist"),methodNotAllowed:a("method-not-allowed",405,"That method is not allowed on this route"),conflict:a("conflict",409,"The request conflicts with the current state",["conflicts"]),payloadTooLarge:a("payload-too-large",413,"The request body is too large"),unauthorized:a("unauthorized",401,"Credentials are missing or not accepted"),forbidden:a("forbidden",403,"The request was refused"),needsInstallationAccess:a("needs-installation-access",403,"The GitHub App is not installed for that account",["installUrl"]),pathOutsideProject:a("path-outside-project",403,"The path resolves outside the active project"),actionRequired:a("action-required",403,"An action is required first",["actions","heading","retry"]),noActiveProject:a("no-active-project",409,"No project is active on this backend"),capabilityUnavailable:a("capability-unavailable",501,"This backend does not provide that capability"),upstreamFailure:a("upstream-failure",502,"An upstream service failed",["upstream"]),internalError:a("internal-error",500,"The backend failed to complete the request")};var ax=".jx-loc-id",n=(e,t,o,r)=>({method:e,path:t,optional:r!==void 0,summary:o,...r===void 0?{}:{degradation:r}}),se={activate:n("POST","/__studio/activate","Bind the backend to a project root"),project:n("GET","/__studio/project","Root project metadata {name, root}"),projectInfo:n("GET","/__studio/project-info","Probe a directory: {isSiteProject, projectConfig?, directories?}"),resolveSite:n("GET","/__studio/resolve-site","Resolve the owning site of a file path {sitePath, projectConfig?, fileRelPath?}"),sites:n("GET","/__studio/sites","Enumerate site projects [{config, path}] (backs listProjects)","The welcome screen's Projects catalogue stays hidden."),findProject:n("GET","/__studio/find-project","Locate a project directory by name outside the root","openProject falls back to config-matching only."),locateDirectory:n("GET","/__studio/locate-directory","Resolve the absolute path of a showDirectoryPicker() folder by the id in its .jx-loc-id","Browse… reports that the folder could not be placed; the Location is typed by hand."),createProject:n("POST","/__studio/create-project","Scaffold a project at a caller-chosen destination → {root, config}"),starters:n("GET","/__studio/starters","Starter templates (StarterInfo[])","The New Project picker offers only blank/templates."),importSite:n("POST","/__studio/import-site","Clone a live website into a project; streams NDJSON progress","The New Project Import tab is unavailable."),files:n("GET","/__studio/files","List a directory (DirEntry[]) in stable path order; an entry may carry an opaque content `version` the backend vouches for; with ?glob=<pattern>, search matching files project-wide"),fileRead:n("GET","/__studio/file","Read a file's text content"),filesRead:n("POST","/__studio/files/read","Read many files' text content {paths} → ReadFilesResult {files: [path, {content} | "+"{error: {status, code?, message}}][], omitted}. At most READ_FILES_MAX_PATHS (200) paths and a backend byte budget per call: the excess is listed in `omitted` (never a 400) and the first path is always answered. Per-path errors: 404 missing/deleted, 415 binary, 413 too large, 502 upstream. Allowed for read-only sessions; keeps fileRead's server-side effects","Adapters fall back to one fileRead per path."),fileWrite:n("PUT","/__studio/file","Write a file's text content"),fileDelete:n("DELETE","/__studio/file","Delete a file"),fileUpload:n("POST","/__studio/file/upload","Upload binary content to a path → UploadResult {path, size?}. `path` is the answer, not an "+"echo: a store that de-duplicates, suffixes, or normalizes names reports what it really wrote"),fileBytes:n("GET","/__studio/file/bytes","A project file's raw bytes, undecoded — the read side of `fileUpload`, for a caller that must "+"not go through UTF-8","Studio can only read a project file as text, so any surface that must decode one stays hidden."),documentRaw:n("GET","/__studio/raw/","A project file as its own bytes, at its own URL — the mount a canvas renders against when "+"the editor origin does not serve the site's URL space. The project-relative path is appended to this prefix","The canvas cannot address project files by URL, so a host whose origin does not serve the site URL space renders no component $refs and no images."),fileRename:n("POST","/__studio/file/rename","Rename/move (+ refactor report). `from`/`to` are server-root-relative; every path in the "+"report is relative to the active project (specs/server.md §4.1)"),references:n("GET","/__studio/references","Where a file or a component tag is used (?path=&tag=, at least one) → ReferencesResult "+"{files, filesReferencing, refsTotal} — the read side of the rename refactor's own walker, "+"cached until the backend's watcher sees the tree move (backs findReferences). `?path=` is server-root-relative and every path in the answer is relative to the active project; a "+"target outside that project is a 400, never a zero-result 200 (specs/server.md §4.1)",'Usage counts are hidden: no "Used on N pages" in the inspector, no Selection: Find Usages, and delete/rename confirmations state no reference count.'),locate:n("POST","/__studio/locate","Find a file by name → {path | null}"),collab:n("GET","/__studio/collab","Realtime co-editing: a WebSocket upgrade speaking the @jxsuite/collab wire envelope (one socket per project, documents multiplexed by path; y-protocols sync + project-level "+"awareness in lib0 binary frames — see @jxsuite/collab/envelope for the frame layout and "+"the docEpoch/doc-reset lifecycle). A plain GET (no Upgrade) answers {collab, protocols, version} as the capability probe, and `protocols` is the subprotocol negotiation: the client offers one of them as Sec-WebSocket-Protocol and the server echoes it, or the "+"client offers none when the server advertises none, because RFC 6455 §4.1 fails a "+"connection whose offer went unechoed.","Realtime co-editing is unavailable; Studio edits solo with file-level saves"),components:n("GET","/__studio/components","Discover components (ComponentMeta[])"),cem:n("GET","/__studio/cem","Custom-elements manifest of an npm dependency","Dependency components lose prop/slot metadata."),formats:n("GET","/__studio/formats","The project's format registry entries plus a sibling `extensions` array — per enabled "+"extension its manifest identity and project-section contributions (ExtensionsInfo[]; backs listFormats and listExtensions).","Only .json documents open (backs listFormats); descriptor-contributed settings sections do not appear."),extensionCatalog:n("GET","/__studio/catalog","Extensions this backend can OFFER (ExtensionCatalogEntry[]) — the shipped first-party "+"catalogue plus any package in the project's own dependencies exporting a jx-extension.json, each marked with whether the host resolves it without a project install and whether the project has it installed. A capability rather than a constant: a Worker ships a fixed set "+"of extension packages (specs/extensions.md §5.5). Backs listExtensionCatalog.","The Extensions section offers no catalogue; adding an extension stays a typed package name."),projectSchemas:n("GET","/__studio/project-schemas","The project's generated entry documents (project.schema.json / document.schema.json), "+"PRE-BUNDLED into self-contained schemas — {project, document} (backs fetchProjectSchemas). "+"Regenerated on demand when missing or older than project.json.","The JSON editor falls back to the bundled core schemas (extension sections get no editor validation/completion)."),format:n("POST","/__studio/format","Dispatch a format capability {format, action: parse|serialize, source?|doc?}","Non-JSON documents cannot be parsed/serialized (backs formatAction)."),pluginSchema:n("GET","/__studio/plugin-schema","Extract a $studio schema from a class source","Plugin property panels fall back to generic JSON editing."),codeFormat:n("POST","/__studio/code/format","Format posted source {code, path?} → {code, errors}","Code editors skip format-on-open/save (codeService returns null)."),codeMinify:n("POST","/__studio/code/minify","Minify posted source {code} → {code}","Compiled-output minification is skipped."),codeLint:n("POST","/__studio/code/lint","Lint posted source {code, path?} → {diagnostics}","Code editors show no lint markers."),buildSite:n("POST","/__studio/build","Build or render the site → {routes, files, errors, mode?, url}","Build Site reports that this target cannot build."),previewSite:n("POST","/__studio/preview","Preview the working tree at a route → {routes, files, errors, mode, url, reused}","Open in Browser falls back to buildSite."),previewOverlay:n("POST","/__studio/preview/overlay","Publish (POST) or retract (DELETE) a document's unsaved bytes → 204","A live preview shows the last saved state instead of the editor's."),packages:n("GET","/__studio/packages","List dependencies (PackageInfo[])"),packagesAdd:n("POST","/__studio/packages/add","Add a dependency"),packagesRemove:n("POST","/__studio/packages/remove","Remove a dependency"),packagesInstall:n("POST","/__studio/packages/install","Run the package manager install","Install/reinstall affordances are hidden; manifest-only edits still work."),packagesNeedsInstall:n("GET","/__studio/packages/needs-install","Whether node_modules is stale","The install-on-open prompt never shows."),packagesVersions:n("GET","/__studio/packages/versions","Newest published version of each dependency (PackageVersionInfo[])","The Latest column stays empty and the update affordances are hidden."),packagesSetVersions:n("POST","/__studio/packages/set-versions","Rewrite dependency ranges and install","Bulk version updates are hidden."),gitStatus:n("GET","/__studio/git/status","Working-tree status (GitStatusResult)"),gitBranches:n("GET","/__studio/git/branches","Branch list (GitBranchesResult)"),gitLog:n("GET","/__studio/git/log","Recent commits (GitLogEntry[])"),gitStage:n("POST","/__studio/git/stage","Stage files"),gitUnstage:n("POST","/__studio/git/unstage","Unstage files"),gitCommit:n("POST","/__studio/git/commit","Commit staged (else all dirty) files"),gitPush:n("POST","/__studio/git/push","Push (cloud: sync check — commits land on push)"),gitPull:n("POST","/__studio/git/pull","Pull/fast-forward; 409 {conflicts} on overlap"),gitFetch:n("POST","/__studio/git/fetch","Refresh remote tracking state"),gitCheckout:n("POST","/__studio/git/checkout","Switch branches"),gitCreateBranch:n("POST","/__studio/git/create-branch","Create a branch"),gitDiff:n("GET","/__studio/git/diff","Unified diff of dirty files (or one path)"),gitShow:n("GET","/__studio/git/show","File content at a ref"),gitDiscard:n("POST","/__studio/git/discard","Discard working changes"),gitInit:n("POST","/__studio/git/init","Initialize a repository"),gitAddRemote:n("POST","/__studio/git/add-remote","Add a remote"),gitClone:n("POST","/__studio/git/clone","Clone a repository","The welcome screen hides Clone Git Repository."),gitPr:n("POST","/__studio/git/pr","Open a pull request → PullRequestInfo","Studio falls back to a direct GitHub API call with the user's token."),dataConnections:n("GET","/__studio/data/connections","Connector connections with configured/missingSecrets/isDefault state, reachable table names, and registry-descriptor provider metadata (DataConnectionsResponse; backs dataConnections)","The connections settings section shows no status, and data-domain actions stay hidden."),dataConnectionTest:n("POST","/__studio/data/connections/test","Probe a connection {connection} → DataConnectionTestResult (backs dataConnectionTest)","The Test Connection action is hidden."),dataPush:n("POST","/__studio/data/push","Additive schema push {connection?, dryRun?} → DataPushResult (plan of DataPushStep[], "+"applied, warnings/errors; backs dataPush)","The Push Schema action is hidden; schemas deploy via `jx db push` instead."),dataRows:n("GET","/__studio/data/rows","Page a table (DataRowsQuery params) → DataRowsResult {rows, total, columns} (backs dataRows)","The data grid is unavailable."),dataInsertRow:n("POST","/__studio/data/rows","Insert a row {table, connection?, values} → {row} (backs dataInsertRow)","The data grid hides its add-row footer."),dataUpdateRow:n("PUT","/__studio/data/rows","Update a row keyed on its primary key {table, connection?, pk, set} → {row} (backs "+"dataUpdateRow)","Data grid cells are read-only."),dataDeleteRow:n("DELETE","/__studio/data/rows","Delete a row (?table=&pk=&connection=) → {ok} (backs dataDeleteRow)","The data grid hides row deletion."),secretsList:n("GET","/__studio/secrets","Configured secret env-var NAMES, never values (SecretsListResponse; backs listSecrets)","Secret fields cannot show set/unset state."),secretsSet:n("PUT","/__studio/secrets","Write/remove secrets in the backend store (.dev.vars locally) {set?, remove?} → names "+"(backs setSecrets)","The secret form control renders disabled; secrets are edited in .dev.vars by hand."),aiChat:n("POST","/__studio/ai/chat","StreamEvent SSE chat proxy {messages, tools, systemPrompt, model}"),aiModels:n("GET","/__studio/ai/models","Model catalogue (AiModelsResponse)"),cfProxy:n("POST","/__studio/cf/proxy","Allowlisted Cloudflare API passthrough {path, method?, body?} (backs cfApi)","The Publish panel explains the git-push publishing path instead.")};var nC=200;var K=new Set(["reload","repeat","none"]);function qu(e){if(!Array.isArray(e))return[];return e.flatMap((t)=>{let o=t;if(!o||typeof o.id!=="string"||!o.id||typeof o.label!=="string"||!o.label)return[];return[{id:o.id,label:o.label,...typeof o.href==="string"&&o.href?{href:o.href}:{},...o.primary===!0?{primary:!0}:{}}]})}function lx(e){return typeof e==="string"&&K.has(e)?e:void 0}function H(e){return e.replaceAll("_","-")}function x(e){if(!e||typeof e!=="object")return{};let{actions:t,code:o,heading:r,installUrl:c,retry:m,type:u}=e,f=lx(m),i=pm(u)??(typeof o==="string"?H(o):null);return{...i===null?{}:{code:i},...typeof c==="string"?{installUrl:c}:{},...t===void 0?{}:{actions:qu(t)},...typeof r==="string"&&r?{heading:r}:{},...f===void 0?{}:{retry:f}}}function vT(e){let t=x(e);return t.code==="needs-installation-access"&&t.installUrl?t.installUrl:null}function wT(e){return x(e).code==="action-required"}function $c(){return Oo(St.aiOpenAiKey)}function xT(e){Xo(St.aiOpenAiKey,e||"")}function Hb(){return CL(St.aiOpenAiKey)}function wa(){return Oo(St.aiBaseUrl)}function Bb(){return Oo(St.aiModel)}function _T(e){Xo(St.aiModel,e||"")}function ST(e){EL([[St.aiOpenAiKey,e.apiKey],[St.aiBaseUrl,e.baseUrl],[St.aiModel,e.model]])}function CT(e){return!wp(St.aiOpenAiKey,e.apiKey,$c())||!wp(St.aiBaseUrl,e.baseUrl,wa())||!wp(St.aiModel,e.model,Bb())}function wp(e,t,o){return my(e,t)===my(e,o)}function kT(){eh([St.aiOpenAiKey,St.aiBaseUrl,St.aiModel])}function cx(){return{apiKey:$c(),baseUrl:wa()}}function N(e){return`${e.apiKey}\x00${e.baseUrl}`}var g=null,R="",P=!1,_=!1,A="",k,T="",v=null,E=null,U=new Set,W=600000,b=0,L=!1;function No(){g=null,R="",P=!1,_=!1,A="",k=void 0,T="",v=null,E=null,b=0}var z=new Set([St.aiOpenAiKey.key,St.aiBaseUrl.key,St.cfToken.key,St.cfAccountId.key]);fy((e)=>{if(e.some((t)=>z.has(t)))No()});function iC(e){return g&&R===N(e)?g:null}function B(e){return g?.find((t)=>t.id===e)}function rC(e){return B(e)?.toolSupport}function ET(e){return B(e)?.contextWindow}function Wb(e){if(e)U.add(e);E??=Rd({force:!0}).catch(()=>{}).then(()=>{b=Date.now();for(let t of U)t()})}function V(){if(!_||b===0||Date.now()-b<W)return!1;return E=null,b=0,Wb(),!0}function J(){if(typeof window>"u"||L)return;L=!0,window.addEventListener("focus",()=>{V()})}J();function fm(){return Hb()||dx()}function dx(){return P}function TT(){return _}function xp(){return k}function LT(){return T}function ux(){return v}function Y(){return A}function Xa(){return Bb()||Y()||St.aiModel.default}function X(e,t){let o;try{o=new URL(e,"http://jx.invalid")}catch{return e}return o.pathname=o.pathname.replace(/[^/]*$/,t),/^https?:/i.test(e)?o.href:`${o.pathname}${o.search}`}async function Rd(e={}){let t=e.credentials??cx(),o=N(t);if(g&&R===o&&!e.force)return g;let r=p(),c=await Promise.resolve(r.aiChatUrl()),m=X(c,"models"),u={};if(t.apiKey)u["X-Api-Key"]=t.apiKey;if(t.baseUrl)u["X-Api-Base-URL"]=t.baseUrl;let f=await fetch(m,{headers:u});if(!f.ok)throw Error(`HTTP ${f.status}`);let i=await f.json();return P=i.configured===!0,_=i.managed===!0,A=i.defaultModel??"",k=i.code,T=i.upstreamError!==void 0?i.upstreamMessage??"":"",v=i.code==="action_required"?{actions:qu(i.actions),...typeof i.detail==="string"&&i.detail?{detail:i.detail}:{}}:null,g=(i.models||[]).map((l)=>{let h={id:l.id,name:l.name||l.id};if(typeof l.contextWindow==="number")h.contextWindow=l.contextWindow;if(typeof l.toolSupport==="boolean")h.toolSupport=l.toolSupport;return h}),R=o,g}var S=new Set,O=null;function RT(e){if(S.size===0){O=e;return}for(let t of S)t(e)}function G(e){S.add(e);let t=O;if(O=null,t)e(t);return()=>{S.delete(e)}}function hx(){return Ve()&&typeof p().performAction==="function"}function oC(e){let t=e.find((r)=>r.primary)??e[0];if(!t)return null;let o=e.find((r)=>r!==t);return o?{lead:t,other:o}:{lead:t}}var w=null,q=!1;function px(e){let t=oC(e.actions);if(!hx()||!t)return Promise.resolve(!1);return w??=Q(e,t).finally(()=>{w=null}),w}async function _p(e){let t=x(e);if(t.code!=="action-required"||!t.actions?.length)return!1;return px({actions:t.actions,detail:e instanceof Error?e.message:void 0,heading:t.heading,retry:t.retry})}async function F(){No(),await Rc(),sC()}function Q(e,t){let o=e.detail??"This needs one more step first.";return new Promise((r)=>{let c="offer",m=(y)=>{if(c==="done")return;c="done",h.close(),r(y)},u=(y)=>{c="offer",h.update({cancelLabel:"Not now",confirmLabel:t.lead.label,message:y,secondaryLabel:t.other?.label??""})},f=(y)=>{if(c!=="offer")return;c="waiting";let D;try{D=p().performAction(y)}catch(d){u(d instanceof Error?d.message:String(d));return}h.update({cancelLabel:"Cancel",confirmLabel:"Waiting…",message:"Finish in the window that opened. This closes by itself once it is done.",secondaryLabel:""}),D.then(async(d)=>{if(d?.status==="done"){await F(),m(!0);return}if(c!=="waiting"||!d||d.status==="redirect")return;Rc(),u(o)},(d)=>{if(c==="waiting")u(d instanceof Error?d.message:String(d))})},{lead:i,other:l}=t,h=Ss({cancelLabel:"Not now",confirmLabel:i.label,headline:e.heading??"One more step",layer:Ct("dialog"),message:o,onCancel:()=>{q=!0,m(!1)},onClosed:()=>{m(!1)},onConfirm:()=>{f(i)},region:"account/action",...l?{onSecondary:()=>{f(l)},secondaryLabel:l.label}:{}})})}function Z(e){if(e==="reload")location.reload();else if(e==="repeat")C.info("Done. Run that again now.",{key:"account.action.retry",source:"Account"})}function $T(){return G((e)=>{if(q||w)return;px(e).then((t)=>{if(t)Z(e.retry)})})}async function Vb(e){if(!hx())return!1;let t=p().performAction(e),o;try{o=await t}catch(r){return C.error(r instanceof Error?r.message:String(r),{key:"account.action",source:"Account",tier:"toast"}),!1}if(o?.status==="done")return await F(),!0;if(o?.status!=="redirect")await Rc();return!1}function sC(){for(let e of I()){let t={key:`account.notice.${e.id}`,source:"Account"};if(e.level==="warning")C.warn(e.message,t);else C.info(e.message,t)}}
|
|
2
|
-
export{Rc,ox,sx,bT,yT,tC,pm,Nr,zs,ax,nC,qu,lx,vT,wT,$c,xT,Hb,wa,Bb,_T,ST,CT,wp,kT,cx,No,iC,rC,ET,Wb,fm,dx,TT,xp,LT,ux,Xa,Rd,RT,hx,oC,px,_p,$T,Vb,sC};
|
|
3
|
-
|
|
4
|
-
//# debugId=03ED91511AFD685364756E2164756E21
|
|
5
|
-
//# sourceMappingURL=studio-tdcprbqb.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import{te}from"./studio-ery42sqr.js";import{y,C}from"./studio-55h4mstj.js";import{pn,an}from"./studio-9mccjwjh.js";import{ot,zt,T,I,An,Ct}from"./studio-g1shz58g.js";var G={$schema:"https://jxsuite.com/schema/v1",$id:"StudioGithubAuth",$description:"The RFC 8628 device flow's waiting room: the code GitHub minted, the page to type it into, and a Cancel. A `jx-dialog`, so the platform owns modality, Escape, focus restoration and the backdrop — and it is the reason the dialog has no confirm button at all: the answer arrives from GitHub over a poll rather than from anything the reader can press here, so a primary button would be a control with nothing to do. Nothing in this document talks to GitHub: `github/github-auth.ts` keeps the client id, the poll loop, its failure budget and every report the three outcomes raise.",tagName:"jx-dialog",$props:{headline:"Sign in to GitHub",confirmLabel:"",cancelLabel:"Cancel",size:"sm"},attributes:{part:"github-auth"},oncancel:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/cancel"},value:[]}]},onclose:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/closed"},value:[]}]},style:{$description:"Four `.github-auth-*` rules in `styles/overlays.css` become the parts below, and two things in them do not travel. `.github-auth-dialog`'s `padding: 16px 0` was the card's own body padding drawn by hand, and `jx-dialog` already pads its body; `.github-auth-dialog p { font-size: 13px }` was a body size this surface picked for itself, and what the paragraphs now inherit is the dialog's own `--jx-text-md`. The `8px 0` margins go with them — the column is a flex column with a gap, so a margin between two rows would be a second opinion about the same space. The code keeps its 24px, which is above the token scale on purpose: it is a string the reader has to copy onto another screen, and reading it out loud is the whole job of this dialog.",'& [part="device"]':{display:"flex",flexDirection:"column",alignItems:"center",gap:"var(--jx-space-3)",textAlign:"center"},'& [part="lede"], & [part="waiting"]':{margin:"0"},'& [part="code"]':{$description:"`<code>`, not a styled `<div>`: this is a literal string to be transcribed, and the element that says so is also the one a reader's own stylesheet and a screen reader's character-by-character mode already know about. It is this dialog's message, and the one string in it the reader must carry to another screen, so it opts back in to selection against the root's `user-select: none`. `all` rather than `text`: one click selects the whole code, so a copy never leaves a character behind.",userSelect:"all",fontFamily:"var(--font-mono)",fontSize:"24px",fontWeight:"700",letterSpacing:"2px",padding:"var(--jx-space-3) var(--jx-space-4)",background:"var(--hover-bg)",borderRadius:"var(--radius)"},'& [part="link"]':{$description:"The blue this carried as a `var(--accent, …)` fallback is gone: `--accent` is declared on `:root` in `styles/tokens.css`, so the fallback could only ever have painted when the token was missing — which is a theme fault to fix rather than a colour to hard-code.",color:"var(--accent)",textDecoration:"underline"},'& [part="waiting"]':{color:"var(--fg-dim)",fontStyle:"italic"}},children:[{tagName:"div",attributes:{part:"device"},children:[{tagName:"p",attributes:{part:"lede"},textContent:"Enter this code on GitHub to authorize Jx Studio:"},{tagName:"code",attributes:{part:"code"},textContent:"${state.userCode}"},{tagName:"a",attributes:{part:"link",href:"${state.verificationUri}",target:"_blank",rel:"noreferrer"},textContent:"Open ${state.verificationUri}"},{tagName:"p",attributes:{part:"waiting"},textContent:"Waiting for authorization…"}]}]};T("github-auth",G);function S(e){let t=document.createElement("div");t.style.pointerEvents="auto",t.setAttribute(ot,zt("dialog","github-auth")),e.layer.append(t);let r=!1,u=()=>{if(r)return;r=!0,e.onClosed()},f=y({cancel:()=>{e.onCancel()},closed:u,userCode:e.userCode,verificationUri:e.verificationUri}),s=null,c=I("github-auth",f,t).then(async(o)=>{s=o;let n=o.root;if(r)return o.dispose(),n;if(await An(n),r)return n;return pn(n),n});return{close(){let o=s?.root;if(o instanceof HTMLElement)an(o);s?.dispose(),s=null,t.remove(),u()},host:t,ready:c}}var A="jx_github_token";function p(){return globalThis.__jxPlatform?.githubAuth??null}var g=null,_=!1;function E(e){g=e}function RS(){return g!==null||_||localStorage.getItem("jx_github_token")!==null}function $S(){return p()?"desktop":"browser"}function b(){return g??localStorage.getItem("jx_github_token")}function IS(){g=null,_=!1,localStorage.removeItem("jx_github_token"),p()?.signOut().catch(()=>{})}var R="Ov23liYVlMFpgjOEPXJH",H="github.auth",O="Source Control",j="git.signInToGithub",U=3,M="The request never reached GitHub. GitHub's device-flow endpoints send no CORS headers, so a "+"browser cannot call them directly — the desktop app can. A machine that is offline fails "+"identically, and the browser does not say which happened.";function N(e){C.error("Could not reach GitHub to sign in.",{action:j,detail:`${M}
|
|
2
|
-
|
|
3
|
-
${te(e)}`,key:H,source:O})}function v(e,t){C.warn(e,{action:j,detail:t,key:H,source:O})}async function Y(){let e;try{e=await fetch("https://github.com/login/device/code",{body:JSON.stringify({client_id:R,scope:"repo"}),headers:{Accept:"application/json","Content-Type":"application/json"},method:"POST"})}catch(t){return N(t),null}if(!e.ok)return v("GitHub refused to start the sign-in.",`GitHub answered ${e.status}${e.statusText?` ${e.statusText}`:""}.`),null;return await e.json()}async function jw(){let e=b();if(e)return e;let t=p();if(t)try{let{token:o}=await t.signIn();return E(o),o}catch(o){return v("GitHub sign-in was not completed.",te(o)),null}let r=await Y();if(!r)return null;let{device_code:u,user_code:f,verification_uri:s,interval:c=5}=r;return new Promise((o)=>{let n=!1,a=null,m=0,w=!1,D=(l)=>{if(w)return;if(w=!0,n=!0,a)clearTimeout(a),a=null;o(l)},k=!1,x=()=>{if(k)return;k=!0,L.close()},d=(l)=>{D(l),x()},h=async()=>{if(n)return;try{let i=await(await fetch("https://github.com/login/oauth/access_token",{body:JSON.stringify({client_id:R,device_code:u,grant_type:"urn:ietf:params:oauth:grant-type:device_code"}),headers:{Accept:"application/json","Content-Type":"application/json"},method:"POST"})).json();if(m=0,i.access_token){localStorage.setItem(A,i.access_token),d(i.access_token);return}if(i.error==="authorization_pending"){a=setTimeout(h,c*1000);return}if(i.error==="slow_down"){a=setTimeout(h,(c+5)*1000);return}v("GitHub sign-in was not completed.",i.error==="access_denied"?"The authorization was declined on GitHub.":i.error==="expired_token"?"The device code expired before it was entered.":`GitHub answered "${i.error??"an unrecognised response"}".`),d(null)}catch(l){if(m+=1,m>=U){N(l),d(null);return}a=setTimeout(h,c*1000)}},L=S({layer:Ct("dialog"),onCancel:()=>{x()},onClosed:()=>{d(null)},userCode:f,verificationUri:s});a=setTimeout(h,c*1000)})}
|
|
4
|
-
export{RS,$S,IS,jw};
|
|
5
|
-
|
|
6
|
-
//# debugId=3DFEB92A63FFD44164756E2164756E21
|
|
7
|
-
//# sourceMappingURL=studio-vrmcjf9g.js.map
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import{p}from"./studio-xz2yxfcb.js";import{Kt,Qt}from"./studio-5tnvjkz4.js";import{te}from"./studio-ery42sqr.js";import{Ao}from"./studio-pcgz8heb.js";import{Or,OL,rt,Xr,ke,He,sh,m,Mr,ui}from"./studio-a2ke1e4t.js";import{y}from"./studio-55h4mstj.js";import{Vs,Tc}from"./studio-t6b6qe31.js";import{T,I,Ss,Ct}from"./studio-g1shz58g.js";import{ex,GS,KS}from"./studio-qkstvve9.js";import{Hd,Ji}from"./studio-gx4dnjzd.js";import{gs,cm,Ob,Ab,Vu,Dr,zu}from"./studio-7vg6jcd3.js";import{D}from"./studio-yn9f8vtx.js";function Y(e){let r=[],t=[],n="",o=!1,i=!1,s=()=>{t.push(n),n="",i=!1},l=()=>{if(s(),t.length===1&&t[0]===""){t=[];return}r.push(t),t=[]};for(let a=0;a<e.length;a++){let c=e[a];if(o){if(c==='"')if(e[a+1]==='"')n+='"',a+=1;else o=!1;else n+=c;continue}if(c==='"'&&!i)o=!0,i=!0;else if(c==='"')n+=c;else if(c===",")s();else if(c===`
|
|
2
|
-
`)l();else if(c==="\r"){if(e[a+1]===`
|
|
3
|
-
`)a+=1;l()}else n+=c,i=!0}if(n!==""||t.length>0)l();return r}function Gw(e){let r=(e.match(/\r\n/g)??[]).length,t=(e.match(/(?<!\r)\n/g)??[]).length,n=r>t?`\r
|
|
4
|
-
`:`
|
|
5
|
-
`,o=e.endsWith(`
|
|
6
|
-
`),i=Y(e),s=i[0]??[],l=i.slice(1),a=Math.max(s.length,...l.map((c)=>c.length),0);while(s.length<a)s.push("");for(let c of l)while(c.length<a)c.push("");return{eol:n,headers:s,rows:l,trailingNewline:o}}function V(e){if(/[",\n\r]/.test(e))return`"${e.replaceAll('"','""')}"`;return e}function R(e){return[e.headers,...e.rows].map((t)=>t.map((n)=>V(n)).join(",")).join(e.eol)+(e.trailingNewline?e.eol:"")}var W=["id","sku","slug","Slug"];function U(e){let r=new Set;return e.map((t,n)=>{let o=t.trim()===""?`column${n+1}`:t;if(r.has(o))o=`${o}__${n+1}`;return r.add(o),o})}function Q(e,r){for(let t of W){let n=e.indexOf(t);if(n===-1)continue;let o=r.rows.map((i)=>i[n]??"");if(o.every((i)=>i!=="")&&new Set(o).size===o.length)return t}return null}function P(e,r){let t=Gw(e),n=U(t.headers),o=Q(n,t),i=o?n.indexOf(o):-1,s=t.rows.map((d,u)=>i===-1?String(u):d[i]),l=new Map(s.map((d,u)=>[d,u])),a=sh(r,D?.projectConfig),c=a?.schema?.properties??{},b=t.rows.slice(0,50).map((d)=>{let u={};for(let[w,S]of n.entries())u[S]=d[w]??"";return u}),f=new Map(Ab(b).map((d)=>[d.field,d])),g=new Map(Ob(a?.schema,{idField:o??void 0}).map((d)=>[d.field,d]));return{columns:n.map((d,u)=>{let S=(d in c?g.get(d):void 0)??f.get(d)??{editable:!0,field:d,kind:"string",title:t.headers[u]||d};return{...S,pk:d===o,title:t.headers[u]?.trim()||S.title}}),doc:t,fields:n,keys:s,keyToIndex:l,loadText:e}}function q(e,r){let t={},n=e.doc.rows[r]??[];for(let[o,i]of e.fields.entries()){let s=e.columns[o],l=n[o]??"";t[i]=s.kind==="string"||s.kind==="text"||s.kind==="readonly"?l:Vu(l,s)}return t}function F(e,r){let t=e.doc.rows.map((i)=>[...i]),n=(i)=>e.fields.indexOf(i);for(let i of r.cells){let s=e.keyToIndex.get(i.rowKey),l=n(i.field);if(s===void 0||l===-1)continue;t[s][l]=Dr(i.value)}for(let i of r.inserts){let s=e.fields.map((l)=>Dr(i.cells[l]??null));t.push(s)}let o=r.deletes.map((i)=>e.keyToIndex.get(i.rowKey)).filter((i)=>i!==void 0).toSorted((i,s)=>s-i);for(let i of o)t.splice(i,1);return{...e.doc,rows:t}}function j(e,r){return{cells:e.cells.map((t)=>({field:t.field,rowKey:t.rowKey,...r})),deletes:e.deletes.map((t)=>({rowKey:t.rowKey,...r})),inserts:e.inserts.map((t)=>({error:r.error,ok:r.ok,tempKey:t.tempKey}))}}function Kw(e){let r=null,t=(n=!1)=>{if(!n&&r)return r;return r=p().readFile(e).then((o)=>P(o,e)),r};return{backingPaths:()=>new Map([[e,"*"]]),capabilities:{delete:!0,insert:!0,remotePaging:!1,remoteSort:!1},async columns(){return(await t()).columns},async commit(n){let o=await t(),i=p(),s=null;try{s=await i.readFile(e)}catch{s=null}if(s!==o.loadText&&!Tc(e))return j(n,{error:"File changed on disk — refresh to reload",ok:!1,stale:!0});let l=F(o,n),a=R(l);return Vs(e),await i.writeFile(e,a),r=Promise.resolve(P(a,e)),j(n,{ok:!0})},id:e,label:e.split("/").pop()??e,async refresh(){await t(!0)},async rows(){let n=await t(),o=n.doc.rows.map((i,s)=>({cells:q(n,s),key:n.keys[s]}));return{rows:o,total:o.length}},async serializeForSource(n){let o=await t();return R(F(o,n))}}}var E={$schema:"https://jxsuite.com/schema/v1",$id:"StudioGridOpen",$description:"Every grid-able source a project has, grouped by where it comes from: the project's own pages and content collections first, then each connection's tables. It is the ISLAND of a confirm dialog rather than a dialog of its own — `ui/layers.ts`'s dialog owns the headline, the cancel button, modality and focus, and this document is only the list — because a second answer to \"what is a dialog\" is a defect (studio-ui-guidelines.md §12.5). Group headings are why it is not the kit menu: a menu row can carry a divider above it and cannot carry a name for the run it opens.",tagName:"div",attributes:{part:"sources"},style:{display:"flex",flexDirection:"column",gap:"var(--jx-space-3)",minWidth:"280px",fontFamily:"var(--jx-font-sans)",fontSize:"var(--jx-text-md)",color:"var(--fg)",'& [part="group-title"]':{margin:"0",fontSize:"var(--jx-text-xs)",fontWeight:"600",textTransform:"uppercase",letterSpacing:"0.04em",color:"var(--fg-dim)"},'& [part="rows"]':{display:"flex",flexDirection:"column",gap:"1px",marginTop:"var(--jx-space-1)"},'& [part="source"]':{textAlign:"left",background:"none",border:"none",color:"var(--fg)",font:"inherit",padding:"var(--jx-space-2) var(--jx-space-2)",borderRadius:"var(--jx-radius-sm)",cursor:"pointer"},'& [part="source"]:hover':{background:"var(--bg-hover)"},'& [part="source"]:focus-visible':{outline:"var(--jx-focus-ring)",outlineOffset:"-2px"},'& [part="group-empty"]':{margin:"0",padding:"var(--jx-space-2)",color:"var(--fg-dim)",fontSize:"var(--jx-text-sm)"}},children:[{$prototype:"Array",items:{$ref:"#/state/groups"},key:{$ref:"$map/item/key"},map:{$description:"One origin of grid-able sources. A connection with no tables says why it has none instead of drawing an empty box — an author who has not pushed a schema yet is exactly the reader who needs the sentence.",tagName:"section",attributes:{part:"group","data-group":"${$map.item.key}"},children:[{tagName:"h3",attributes:{part:"group-title"},textContent:"${$map.item.title}"},{tagName:"div",attributes:{part:"rows"},$switch:{$ref:"$map/item/state"},cases:{listed:{tagName:"div",attributes:{part:"rows-list",role:"none"},style:{display:"contents"},children:[{$prototype:"Array",items:{$ref:"$map/item/rows"},key:{$ref:"$map/item/id"},map:{tagName:"button",attributes:{part:"source",type:"button","data-source":"${$map.item.id}"},onclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/open"},value:[{$ref:"$map/item/id"}]}]},textContent:"${$map.item.label}"}}]},empty:{tagName:"p",attributes:{part:"group-empty"},textContent:"${$map.item.emptyMessage}"}}}]}}]};T("grid-open",E);function M(e,r,t){let n=y({groups:r,open:t}),o=null,i=!1,s=I("grid-open",n,e).then((l)=>{if(i)return l.dispose(),l.root;return o=l,l.root});return{dispose(){i=!0,o?.dispose(),o=null},ready:s}}function C(){try{return p()}catch{return null}}function qw(){return typeof C()?.dataRows==="function"}async function A(){let e=C();if(typeof e?.dataConnections!=="function")return null;return e.dataConnections()}async function WE(e){let r=C();if(typeof r?.dataConnectionTest!=="function")return{error:"Connection tests are not supported by this backend",ok:!1};try{return await r.dataConnectionTest(e)}catch(t){return{error:t instanceof Error?t.message:String(t),ok:!1}}}async function jS(e){let r=C();if(typeof r?.dataPush!=="function")return{applied:!1,errors:["Schema push is not supported by this backend"],plan:[]};try{return await r.dataPush(e)}catch(t){return{applied:!1,errors:[t instanceof Error?t.message:String(t)],plan:[]}}}function x(e){let t=C()?.[e];if(t===void 0||t===null)throw Error(`The ${String(e)} surface is not supported by this backend`);return t}function k(e){return x("dataRows")(e)}function K(e){return x("dataInsertRow")(e)}function O(e){return x("dataUpdateRow")(e)}function _(e){return x("dataDeleteRow")(e)}function VE(e,r,t){let n=(s)=>s.replaceAll(/([a-z0-9])([A-Z])/g,"$1_$2").replaceAll(/[^A-Za-z0-9]+/g,"_").replaceAll(/^_+|_+$/g,"").toUpperCase(),i=[r??e,t.replace(/Env$/,"")].map((s)=>n(s)).filter(Boolean).join("_")||"SECRET";return/^\d/.test(i)?`JX_${i}`:i}var X=50;function Z(e){let r=e.toLowerCase();if(/(int|real|floa|doub|num|dec)/.test(r))return"number";if(r.includes("bool"))return"boolean";if(/(timestamp|datetime|date)/.test(r))return"date";return"string"}function ee(e){return!e.pk&&e.name!=="created_at"&&e.name!=="updated_at"}function re(e){if(e===null||e===void 0)return null;if(typeof e==="string"||typeof e==="number"||typeof e==="boolean")return e;return JSON.stringify(e)}function N(e,r){let t=[],n="id",o=new Map,i=(a)=>{if(a.length>0)t=a,n=a.find((c)=>c.pk)?.name??"id"},s=(a)=>({table:r,...e?{connection:e}:{},limit:a?.limit??X,offset:a?.offset??0,...a?.orderBy?{dir:a.dir??"asc",orderBy:a.orderBy}:{}}),l=(a,c)=>{let b=a[n];if(typeof b==="string"||typeof b==="number")return o.set(String(b),b),String(b);return`row-${c}`};return{capabilities:{delete:!0,insert:!0,remotePaging:!0,remoteSort:!0},async columns(){if(t.length===0){let a=await k(s({limit:1,offset:0}));i(a.columns)}return t.map((a)=>{let c=ee(a)?Z(a.type):"readonly";return{editable:c!=="readonly",field:a.name,kind:c,pk:a.pk===!0,title:a.name,widthHint:a.pk?80:void 0}})},async commit(a){let c={cells:[],deletes:[],inserts:[]},b=new Map;for(let f of a.cells){let g=b.get(f.rowKey)??[];g.push({field:f.field,value:f.value}),b.set(f.rowKey,g)}for(let[f,g]of b){let h=o.get(f),d=(u,w)=>{for(let S of g)c.cells.push({error:w,field:S.field,ok:u,rowKey:f})};if(h===void 0){d(!1,"Row has no primary key — refresh the grid");continue}try{let u={};for(let w of g)u[w.field]=w.value;await O({pk:h,set:u,table:r,...e?{connection:e}:{}}),d(!0)}catch(u){d(!1,u instanceof Error?u.message:String(u))}}for(let f of a.inserts)try{let g={};for(let[w,S]of Object.entries(f.cells))if(S!==null)g[w]=S;let{row:h}=await K({table:r,values:g,...e?{connection:e}:{}}),d=h[n],u=typeof d==="string"||typeof d==="number"?String(d):void 0;if(u!==void 0&&(typeof d==="string"||typeof d==="number"))o.set(u,d);c.inserts.push({newKey:u,ok:!0,tempKey:f.tempKey})}catch(g){c.inserts.push({error:g instanceof Error?g.message:String(g),ok:!1,tempKey:f.tempKey})}for(let f of a.deletes){let g=o.get(f.rowKey);if(g===void 0){c.deletes.push({error:"Row has no primary key — refresh the grid",ok:!1,rowKey:f.rowKey});continue}try{await _({pk:g,table:r,...e?{connection:e}:{}}),c.deletes.push({ok:!0,rowKey:f.rowKey})}catch(h){c.deletes.push({error:h instanceof Error?h.message:String(h),ok:!1,rowKey:f.rowKey})}}return c},id:gs({connection:e??"default",kind:"data",table:r}),label:r,async refresh(){t=[],o.clear()},async rows(a){let c=await k(s(a));return i(c.columns),{rows:c.rows.map((f,g)=>{let h=l(f,g),d={};for(let u of t)d[u.name]=re(f[u.name]);return{cells:d,key:h}}),total:c.total}}}}var Lb=[{key:"all",label:"All"},{dir:"pages",key:"pages",label:"Pages"},{dir:"layouts",key:"layouts",label:"Layouts"},{dir:"components",key:"components",label:"Components"},{dir:"content",key:"content",label:"Content"},{dir:"public",key:"media",label:"Media"}],HS=Lb.map((e)=>e.key);function Jw(e){return Lb.find((r)=>r.key===e)}function BS(e){return Jw(e)?.dir}function ne(e,r){if(r&&Hd.has(r))return"Media";if(e.startsWith("pages"))return"Pages";if(e.startsWith("layouts"))return"Layouts";if(e.startsWith("components"))return"Components";if(e.startsWith("content"))return"Content";if(e.startsWith("public"))return"Media";if(e.startsWith("data"))return"Content";if(e.startsWith("styles"))return"Components";return"Other"}function oe(e){let r=D?.projectConfig?.content??{};for(let[t,n]of Object.entries(r)){if(!n.source)continue;let o=n.source.replace(/^\.\//,"").replace(/\/$/,"");if(e.startsWith(`${o}/`)||e===o)return t.charAt(0).toUpperCase()+t.slice(1)}return null}var ie=new Set(["node_modules",".git",".jx","dist","build",".cache"]);async function B(e,r,t,n,o){let i;try{i=await Ao(()=>r.listDirectory(e))}catch(l){n.push({dir:e,error:te(l)});return}let s=[];for(let l of i){if(l.type==="directory"){if(!ie.has(l.name))s.push(l.path);continue}let a=Ji(l.name),c=ne(l.path,a);t.push({category:c,ext:a,locale:OL(l.path,o)??void 0,modified:l.modified,name:l.name,path:l.path,size:l.size,type:c==="Content"?oe(l.path)??a??"file":a||"file"})}await Promise.all(s.map((l)=>B(l,r,t,n,o)))}async function sm(e,r){let t=[],n=[],{i18n:o}=Or(D?.projectConfig??{});return await Promise.all(e.map((i)=>B(i,r,t,n,o))),t.sort((i,s)=>i.path.localeCompare(s.path)),{failures:n,files:t}}function zE(e,r){let t=e,n=Jw(r.category);if(n&&n.key!=="all")t=t.filter((s)=>s.category===n.label);let o=r.query.trim().toLowerCase();if(o)t=t.filter((s)=>s.name.toLowerCase().includes(o)||s.path.toLowerCase().includes(o));let i=r.locale?.trim();if(i)t=t.filter((s)=>s.locale===i);return t}var am=["table","cards","media","calendar","board"],Yw={board:"Board",calendar:"Calendar",cards:"Cards",media:"Media",table:"Table"};var UE=new Set(["cards","media"]),se=/^(\d{4}-\d{2}-\d{2})/;function ae(e){let r=se.exec(e.name);if(r)return r[1];if(e.modified){let t=new Date(e.modified);if(!Number.isNaN(t.getTime()))return t.toISOString().slice(0,10)}return null}function WS(){return Or(D?.projectConfig??{}).i18n?.locales??[]}function qE(e){let r=new Set;for(let t of e)if(t.locale)r.add(t.locale);return WS().filter((t)=>r.has(t))}function GE(e){let r=new Map,t=[];for(let o of e){let i=ae(o);if(i===null){t.push(o);continue}let s=r.get(i);if(s)s.push(o);else r.set(i,[o])}return{days:[...r.entries()].map(([o,i])=>({date:o,files:i})).toSorted((o,i)=>i.date.localeCompare(o.date)),undated:t}}function KE(e){let r=new Map;for(let n of e){let o=r.get(n.category);if(o)o.push(n);else r.set(n.category,[n])}let t=Lb.map((n)=>n.label);return[...r.entries()].map(([n,o])=>({files:o,group:n})).toSorted((n,o)=>{let i=t.indexOf(n.group),s=t.indexOf(o.group);if(i===s)return n.group.localeCompare(o.group);return(i===-1?t.length:i)-(s===-1?t.length:s)})}var G="The Library lists files; it does not edit them. Rename, duplicate or delete from the file's context menu, or open the file to edit it.";function Zw(){return[{editable:!1,field:"name",kind:"string",pk:!0,title:"Name",widthHint:260},{editable:!1,field:"category",kind:"string",title:"Category",widthHint:120},{editable:!1,field:"locale",kind:"string",title:"Locale",widthHint:90},{editable:!1,field:"type",kind:"string",title:"Type",widthHint:120},{editable:!1,field:"size",kind:"number",title:"Size",widthHint:90},{editable:!1,field:"modified",kind:"date",title:"Modified",widthHint:160},{editable:!1,field:"path",kind:"readonly",title:"Path",widthHint:320}]}function le(e){return{cells:{category:e.category,locale:e.locale??null,modified:e.modified??null,name:e.name,path:e.path,size:e.size??null,type:e.type},key:e.path}}function Rb(){return gs({kind:"library"})}function JE(e){let r=null,t=null,n=e??(()=>D?.projectDirs??[]);async function o(){if(r)return r;return t??=sm(n(),p()).then((i)=>(r=i,t=null,i)),t}return{capabilities:{delete:!1,insert:!1,remotePaging:!1,remoteSort:!1},columns:()=>Promise.resolve(Zw()),commit(i){return Promise.resolve({cells:i.cells.map((s)=>({error:G,field:s.field,ok:!1,rowKey:s.rowKey})),deletes:i.deletes.map((s)=>({error:G,ok:!1,rowKey:s.rowKey})),inserts:i.inserts.map((s)=>({error:G,ok:!1,tempKey:s.tempKey}))})},failures:()=>r?.failures??[],files:()=>r?.files??[],id:Rb(),label:"Library",async refresh(){r=null,t=null,await o()},async rows(){let i=await o();return{rows:i.files.map((s)=>le(s)),total:i.files.length}},scanned:()=>r!==null}}var v={children:[],tagName:"div"};async function YE(e,r={}){let t=m.tabs.get(e);if(t)return ui(e,{focus:r.focus!==!1}),t;try{await Kt()}catch{}let n=Kw(e),o=Mr({capabilities:{modes:["grid","source"]},document:structuredClone(v),documentPath:e,id:e,sourceFormat:Qt(e)?.name??null,...r.paneId!==void 0&&{paneId:r.paneId},...r.preview===!0&&{preview:!0},...r.focus===!1&&{focus:!1}});return zu(o,n).load(),o}function L(e){let r=Mr({capabilities:{modes:["grid"]},document:structuredClone(v),documentPath:null,id:e.id});return zu(r,e).load(),r}function H(e){let r=gs({kind:"collection",name:e}),t=m.tabs.get(r);if(t)return ui(r),t;return L(GS(e))}function ZE(){let e=Rb(),r=m.tabs.get(e);if(r)return ui(e),r;return Mr({capabilities:{modes:["manage"]},document:structuredClone(v),documentPath:null,id:e})}function VS(){let e=gs({kind:"pages"}),r=m.tabs.get(e);if(r)return ui(e),r;return L(KS())}function z(e,r){let t=gs({connection:e??"default",kind:"data",table:r}),n=m.tabs.get(t);if(n)return ui(t),n;return L(N(e,r))}function ce(e){let r=cm(e);if(r?.kind==="pages")VS();else if(r?.kind==="collection")H(r.name);else if(r?.kind==="data")z(r.connection,r.table)}function de(e,r){return[{emptyMessage:"",key:"project",rows:[{id:gs({kind:"pages"}),label:"Pages"},...e.map(({name:t})=>({id:gs({kind:"collection",name:t}),label:`Collection: ${t}`}))],state:"listed",title:"Project"},...r.map((t)=>({emptyMessage:"No tables — push a schema first.",key:`data:${t.name}`,rows:t.tables.map((n)=>({id:gs({connection:t.name,kind:"data",table:n}),label:n})),state:t.tables.length===0?"empty":"listed",title:`Data · ${t.name}`}))]}async function XE(){let e=ex(),r=[];if(qw())r=(await A().catch(()=>null))?.connections??[];let t=null,n=Ss({cancelLabel:"Cancel",confirmLabel:"",headline:"Open Grid",island:(o)=>{t=M(o,de(e,r),(i)=>{n.close(),ce(i)})},layer:Ct("dialog"),onCancel:()=>n.close(),onClosed:()=>{t?.dispose(),t=null},onConfirm:()=>{},region:"grid/open"});n.ready}function ue(){return[{args:ke({name:He("The content collection's name, as project.json declares it.")}),category:"Project",id:"collection.editInGrid",level:"project",menus:["context/file","palette"],group:"5_data",requires:"a project that declares content collections",when:(e)=>e.project.open,run:(e,r)=>{let t=rt("collection.editInGrid",r,"name"),n=ex().map((o)=>o.name);if(!n.includes(t))throw RangeError(`command "collection.editInGrid" argument "name": "${t}" is not a content `+"collection this project declares — it declares: "+`${n.length>0?n.join(", "):"none"}`);H(t)},title:"Edit Collection in Grid"},{args:{additionalProperties:!1,properties:{connection:He('The connection name from project.json. Defaults to "default".'),table:He("The table to open.")},required:["table"],type:"object"},category:"Project",id:"data.openGrid",level:"project",menus:["palette"],group:"5_data",requires:"a platform that serves the data routes",when:(e)=>e.project.open,enablement:(e)=>e.capability.dataRows,run:(e,r)=>{let t=rt("data.openGrid",r,"table");z(Xr("data.openGrid",r,"connection"),t)},title:"Open Data Grid"}]}function QE(e){e.registerAll(ue())}
|
|
7
|
-
export{qw,WE,jS,VE,Gw,Kw,Lb,HS,Jw,BS,sm,zE,am,Yw,UE,WS,qE,GE,KE,Zw,Rb,JE,YE,ZE,VS,XE,QE};
|
|
8
|
-
|
|
9
|
-
//# debugId=886EAE134C85CF4764756E2164756E21
|
|
10
|
-
//# sourceMappingURL=studio-vyc0b4he.js.map
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import{p,Ve}from"./studio-xz2yxfcb.js";import{C}from"./studio-55h4mstj.js";function h(e){return e.trim().replace(/\/+$/,"")}function u(e){return e.trim()}var St={aiBaseUrl:{default:"",key:"jx.ai.baseUrl",normalize:h,scope:"user"},aiOpenAiKey:{default:"",key:"jx.ai.openaiKey",normalize:u,scope:"user",secret:!0},aiModel:{default:"gpt-4o",key:"jx.ai.model",normalize:u,scope:"user"},keybindings:{default:"",key:"jx.keybindings",normalize:(e)=>e.trim()==="{}"?"":e.trim(),scope:"user"},theme:{default:"",key:"jx-studio-theme",normalize:u,scope:"user"},showIgnoredFiles:{default:"",key:"jx.files.showIgnored",normalize:u,scope:"user"},cfAccountId:{default:"",key:"jx.cf.accountId",normalize:u,scope:"user"},cfToken:{default:"",key:"jx.cf.token",normalize:u,scope:"user",secret:!0}},S=Object.values(St),l=S.filter((e)=>e.scope==="user"),x=l.map((e)=>e.key);function y(e){let t=e.schedule??queueMicrotask,n=null,i=Promise.resolve(),r=Promise.resolve();function s(){let o=n;if(n=null,!o)return i;return i=i.then(()=>e.send(o)).catch((a)=>{e.onError?.(a,o)}),i}return{enqueue(o){if(n){Object.assign(n,o);return}n={...o},r=new Promise((a)=>{t(()=>{s().then(a)})})},settled(){return r}}}var c=new Map;function k(e,t){try{if(t===null)globalThis.localStorage?.removeItem(e);else globalThis.localStorage?.setItem(e,t)}catch{}}try{for(let e of S){let t=globalThis.localStorage?.getItem(e.key);if(t!==null&&t!==void 0)c.set(e.key,t)}}catch{}function Oo(e){return c.get(e.key)??""}function CL(e){return(c.get(e.key)??"")!==""}var m=new Set;function fy(e){return m.add(e),()=>{m.delete(e)}}function f(e){for(let t of m)t(e)}var g=y({onError(e){C("error","Your settings could not be saved.",{detail:e instanceof Error?e.message:String(e),key:"settings-write",source:"Settings"})},async send(e){if(!Ve())return;let t=p();if(!t.patchSettings)return;let n={},i=[];for(let[r,s]of Object.entries(e))if(s)n[r]=s;else i.push(r);await t.patchSettings({remove:i,set:n})}});function kL(){return g.settled()}function d(e){let t=[];for(let[n,i]of Object.entries(e)){if((c.get(n)??null)===i)continue;if(i===null)c.delete(n);else c.set(n,i);k(n,i),t.push(n)}return t}function my(e,t){return e.normalize?e.normalize(t):t}function Xo(e,t){let n=my(e,t),i=d({[e.key]:n});if(i.length>0)g.enqueue({[e.key]:n}),f(i)}function EL(e){let t={};for(let[i,r]of e)t[i.key]=my(i,r);let n=d(t);if(n.length>0)g.enqueue(t),f(n)}function eh(e){let t={};for(let i of e)t[i.key]=null;let n=d(t);if(n.length>0)g.enqueue(t),f(n)}async function TL(){if(!Ve())return;let e=p();if(!e.getSettings)return;let t;try{t=await e.getSettings()}catch{return}let n={},i=!1;for(let s of l){let o=t[s.key];if(o)n[s.key]=o;else if(c.get(s.key))i=!0}let r=d(n);if(r.length>0)f(r);if(i){let s={};for(let o of l){let a=c.get(o.key);if(a&&!t[o.key])s[o.key]=a}g.enqueue(s)}}function v(e){let t={};for(let i of l)t[i.key]=e[i.key]??null;let n=d(t);if(n.length>0)f(n)}function LL(){if(!Ve())return;p().subscribeSettings?.(v)}
|
|
2
|
-
export{St,Oo,CL,fy,kL,my,Xo,EL,eh,TL,LL};
|
|
3
|
-
|
|
4
|
-
//# debugId=EB051C879906BEAB64756E2164756E21
|
|
5
|
-
//# sourceMappingURL=studio-w0cgf6jg.js.map
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
var r=new Set(["project.schema.json","document.schema.json"]);function J1(e){return r.has(e)?`file:///.jx/generated/${e}`:`file:///${e}`}function JR(e,s){return{head:`file:///.jx/diff/${e}/head/${s}`,work:`file:///.jx/diff/${e}/work/${s}`}}function YR(e){switch(e.slice(e.lastIndexOf(".")+1).toLowerCase()){case"cjs":case"js":case"mjs":return"javascript";case"css":return"css";case"htm":case"html":return"html";case"json":return"json";case"md":return"markdown";case"cts":case"mts":case"ts":return"typescript";case"yaml":case"yml":return"yaml";default:return"plaintext"}}
|
|
2
|
-
export{J1,JR,YR};
|
|
3
|
-
|
|
4
|
-
//# debugId=DF13713EDEACE19C64756E2164756E21
|
|
5
|
-
//# sourceMappingURL=studio-w3hskzqk.js.map
|