@jxsuite/studio 2.0.1 → 2.1.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/canvas.html +21 -0
- package/dist/chunks/Overlay.dev-qfjzkms8.js +23 -0
- package/dist/chunks/{Overlay.dev-cszx7yn5.js.map → Overlay.dev-qfjzkms8.js.map} +1 -1
- package/dist/chunks/{adapter-z8fkmbmv.js → adapter-qfnesn5v.js} +2 -2
- package/dist/chunks/{cf-settings-mmyv436d.js → cf-settings-73sh5z4p.js} +3 -3
- package/dist/chunks/{components-799jpvhm.js → components-2bpqp4mq.js} +5 -7
- package/dist/chunks/{components-799jpvhm.js.map → components-2bpqp4mq.js.map} +1 -1
- package/dist/chunks/content-source-34gnkbnn.js +38 -0
- package/dist/chunks/content-source-34gnkbnn.js.map +9 -0
- package/dist/chunks/convert-to-repeater-t8kxre5s.js +258 -0
- package/dist/chunks/convert-to-repeater-t8kxre5s.js.map +10 -0
- package/dist/chunks/extension-sections-6mqydz35.js +301 -0
- package/dist/chunks/extension-sections-6mqydz35.js.map +11 -0
- package/dist/chunks/files-8kn321h1.js +70 -0
- package/dist/chunks/files-8kn321h1.js.map +9 -0
- package/dist/chunks/{format-host-8jxwts2p.js → format-host-mkwsmt8d.js} +3 -3
- package/dist/chunks/git-panel-tjbr191d.js +51 -0
- package/dist/chunks/git-panel-tjbr191d.js.map +9 -0
- package/dist/chunks/{index-baeg2x3y.js → index-7pxchcce.js} +4 -3
- package/dist/chunks/{index-baeg2x3y.js.map → index-7pxchcce.js.map} +3 -3
- package/dist/chunks/{jx-validate-qx8degj7.js → jx-validate-v6qgknrs.js} +3 -3
- package/dist/chunks/layers-panel-87pb25km.js +58 -0
- package/dist/chunks/layers-panel-87pb25km.js.map +9 -0
- package/dist/chunks/{monaco-setup-zjdp9zdw.js → monaco-setup-e0yh25j4.js} +4 -75
- package/dist/chunks/{monaco-setup-zjdp9zdw.js.map → monaco-setup-e0yh25j4.js.map} +3 -4
- package/dist/chunks/publish-panel-m0fcgdrt.js +21 -0
- package/dist/chunks/publish-panel-m0fcgdrt.js.map +9 -0
- package/dist/chunks/quick-search-rhs6cbsb.js +53 -0
- package/dist/chunks/quick-search-rhs6cbsb.js.map +9 -0
- package/dist/chunks/right-panel-zpdxd98t.js +37 -0
- package/dist/chunks/right-panel-zpdxd98t.js.map +9 -0
- package/dist/chunks/section-registry-zmckaxf4.js +30 -0
- package/dist/chunks/section-registry-zmckaxf4.js.map +9 -0
- package/dist/chunks/sp-overlay.dev-9ran0sfq.js +18 -0
- package/dist/chunks/sp-overlay.dev-9ran0sfq.js.map +9 -0
- package/dist/chunks/sp-popover.dev-rebmdncr.js +9 -0
- package/dist/chunks/sp-popover.dev-rebmdncr.js.map +9 -0
- package/dist/chunks/sp-progress-circle.dev-5vkppfkt.js +15 -0
- package/dist/chunks/sp-progress-circle.dev-5vkppfkt.js.map +9 -0
- package/dist/chunks/sp-tooltip.dev-ykqrg8h5.js +15 -0
- package/dist/chunks/sp-tooltip.dev-ykqrg8h5.js.map +9 -0
- package/dist/chunks/{sp-tray.dev-pb2fsd65.js → sp-tray.dev-ey59vfh7.js} +10 -8
- package/dist/chunks/{sp-tray.dev-pb2fsd65.js.map → sp-tray.dev-ey59vfh7.js.map} +2 -2
- package/dist/chunks/{studio-9qr6fq7p.js → studio-0rqqhrdy.js} +10 -378
- package/dist/chunks/{studio-9qr6fq7p.js.map → studio-0rqqhrdy.js.map} +4 -14
- package/dist/chunks/{studio-5x6tqqec.js → studio-2sj1jj3v.js} +10 -8
- package/dist/chunks/{studio-5x6tqqec.js.map → studio-2sj1jj3v.js.map} +2 -2
- package/dist/chunks/{studio-h3fw0wn8.js → studio-3fk1ac9z.js} +6 -4
- package/dist/chunks/{studio-h3fw0wn8.js.map → studio-3fk1ac9z.js.map} +2 -2
- package/dist/chunks/studio-41exgzhq.js +6690 -0
- package/dist/chunks/studio-41exgzhq.js.map +38 -0
- package/dist/chunks/{studio-7v2bpweq.js → studio-4mqb9a0j.js} +6 -4
- package/dist/chunks/{studio-7v2bpweq.js.map → studio-4mqb9a0j.js.map} +2 -2
- package/dist/chunks/studio-50k77cca.js +1787 -0
- package/dist/chunks/studio-50k77cca.js.map +18 -0
- package/dist/chunks/{studio-56v3zwk6.js → studio-6a0h7sne.js} +10 -8
- package/dist/chunks/{studio-56v3zwk6.js.map → studio-6a0h7sne.js.map} +2 -2
- package/dist/chunks/studio-6f0am8f2.js +53 -0
- package/dist/chunks/studio-6f0am8f2.js.map +10 -0
- package/dist/chunks/studio-6nmjc5qk.js +7002 -0
- package/dist/chunks/studio-6nmjc5qk.js.map +32 -0
- package/dist/chunks/studio-7afd21nw.js +67 -0
- package/dist/chunks/studio-7afd21nw.js.map +10 -0
- package/dist/chunks/{studio-xze4zrs1.js → studio-7bmdvzne.js} +2 -2
- package/dist/chunks/studio-7bmdvzne.js.map +10 -0
- package/dist/chunks/studio-8jpzqk5s.js +128 -0
- package/dist/chunks/studio-8jpzqk5s.js.map +10 -0
- package/dist/chunks/studio-94m77tgk.js +1482 -0
- package/dist/chunks/studio-94m77tgk.js.map +13 -0
- package/dist/chunks/studio-9je6w5sq.js +1000 -0
- package/dist/chunks/studio-9je6w5sq.js.map +16 -0
- package/dist/chunks/{studio-w7c6kvk7.js → studio-a7pzveq1.js} +2 -2
- package/dist/chunks/{studio-gs6kqdt1.js → studio-adn0z1k3.js} +14 -8
- package/dist/chunks/{studio-gs6kqdt1.js.map → studio-adn0z1k3.js.map} +3 -3
- package/dist/chunks/{studio-kr88ryr7.js → studio-bsxxx3x2.js} +17 -15
- package/dist/chunks/{studio-kr88ryr7.js.map → studio-bsxxx3x2.js.map} +7 -6
- package/dist/chunks/studio-bw5dz6km.js +608 -0
- package/dist/chunks/studio-bw5dz6km.js.map +21 -0
- package/dist/chunks/studio-c6s5getc.js +4232 -0
- package/dist/chunks/studio-c6s5getc.js.map +39 -0
- package/dist/chunks/studio-cjm7fdjf.js +451 -0
- package/dist/chunks/studio-cjm7fdjf.js.map +14 -0
- package/dist/chunks/{studio-cx91mnh8.js → studio-ckwz4d3x.js} +53 -53
- package/dist/chunks/{studio-cx91mnh8.js.map → studio-ckwz4d3x.js.map} +5 -5
- package/dist/chunks/studio-dg7zyt5x.js +28 -0
- package/dist/chunks/studio-dg7zyt5x.js.map +10 -0
- package/dist/chunks/studio-dzcyvvvz.js +166 -0
- package/dist/chunks/studio-dzcyvvvz.js.map +10 -0
- package/dist/chunks/{studio-7kqe41sa.js → studio-evkr5d3b.js} +15 -7
- package/dist/chunks/{studio-7kqe41sa.js.map → studio-evkr5d3b.js.map} +5 -4
- package/dist/chunks/studio-f12h6177.js +411 -0
- package/dist/chunks/studio-f12h6177.js.map +13 -0
- package/dist/chunks/studio-hbp1s8m9.js +1817 -0
- package/dist/chunks/studio-hbp1s8m9.js.map +14 -0
- package/dist/chunks/studio-k2sxjph5.js +15295 -0
- package/dist/chunks/studio-k2sxjph5.js.map +235 -0
- package/dist/chunks/studio-myje51t3.js +385 -0
- package/dist/chunks/studio-myje51t3.js.map +12 -0
- package/dist/chunks/studio-na6rwzhw.js +353 -0
- package/dist/chunks/studio-na6rwzhw.js.map +11 -0
- package/dist/chunks/{studio-4k0m4fmp.js → studio-p471gg5n.js} +126 -3
- package/dist/chunks/studio-p471gg5n.js.map +14 -0
- package/dist/chunks/{studio-9bjwf0d4.js → studio-rgwcpast.js} +5 -46
- package/dist/chunks/{studio-9bjwf0d4.js.map → studio-rgwcpast.js.map} +4 -5
- package/dist/chunks/{studio-esrewxap.js → studio-s519zc99.js} +3 -3
- package/dist/chunks/studio-sas7mt3k.js +75 -0
- package/dist/chunks/studio-sas7mt3k.js.map +10 -0
- package/dist/chunks/studio-t5wqwzdh.js +74 -0
- package/dist/chunks/studio-t5wqwzdh.js.map +10 -0
- package/dist/chunks/{studio-9qpspwfn.js → studio-temv5bw4.js} +5 -5
- package/dist/chunks/{studio-9qpspwfn.js.map → studio-temv5bw4.js.map} +1 -1
- package/dist/chunks/{studio-qkvt37c0.js → studio-tr20m8g8.js} +669 -18
- package/dist/chunks/studio-tr20m8g8.js.map +9 -0
- package/dist/chunks/{studio-v7jkjqng.js → studio-v96qfnww.js} +5514 -4291
- package/dist/chunks/studio-v96qfnww.js.map +54 -0
- package/dist/chunks/studio-vcetc91k.js +659 -0
- package/dist/chunks/studio-vcetc91k.js.map +10 -0
- package/dist/chunks/{studio-jm0z592w.js → studio-vmymjefp.js} +2972 -4937
- package/dist/chunks/studio-vmymjefp.js.map +98 -0
- package/dist/chunks/{studio-bghqfmea.js → studio-wwseqyw0.js} +2 -2
- package/dist/chunks/studio-x9hmy5kr.js +390 -0
- package/dist/chunks/studio-x9hmy5kr.js.map +10 -0
- package/dist/chunks/studio-xa0ce0n7.js +335 -0
- package/dist/chunks/studio-xa0ce0n7.js.map +10 -0
- package/dist/chunks/studio-xm3dbxvn.js +378 -0
- package/dist/chunks/studio-xm3dbxvn.js.map +19 -0
- package/dist/chunks/{studio-nqw433kv.js → studio-xmvbhg31.js} +2 -2
- package/dist/chunks/studio-zv37yrfa.js +1054 -0
- package/dist/chunks/studio-zv37yrfa.js.map +13 -0
- package/dist/chunks/{ws-client-q7hkz3j9.js → ws-client-654ts66j.js} +6 -4
- package/dist/chunks/ws-client-654ts66j.js.map +11 -0
- package/dist/iframe-entry.js +668 -230
- package/dist/studio.js +21080 -32585
- package/index.html +35 -4685
- package/package.json +17 -15
- package/src/about/about-modal.ts +42 -11
- package/src/browse/library-commands.ts +240 -0
- package/src/browse/library-layouts.ts +369 -0
- package/src/browse/library-model.ts +396 -0
- package/src/browse/library-pane.ts +1049 -0
- package/src/browse/library-preview.ts +252 -0
- package/src/browse/library-source.ts +150 -0
- package/src/canvas/canvas-helpers.ts +33 -9
- package/src/canvas/canvas-live-render.ts +45 -29
- package/src/canvas/canvas-patcher.ts +151 -31
- package/src/canvas/canvas-perf.ts +46 -7
- package/src/canvas/canvas-render.ts +1092 -220
- package/src/canvas/canvas-surface.ts +240 -0
- package/src/canvas/canvas-utils.ts +1166 -124
- package/src/canvas/iframe-drop.ts +2 -1
- package/src/canvas/iframe-entry.ts +241 -4
- package/src/canvas/iframe-host.ts +1226 -143
- package/src/canvas/iframe-inline-edit.ts +31 -0
- package/src/canvas/iframe-interaction.ts +76 -16
- package/src/canvas/iframe-keys.ts +107 -45
- package/src/canvas/iframe-overlay.ts +38 -1
- package/src/canvas/iframe-protocol.ts +137 -2
- package/src/canvas/iframe-render.ts +70 -2
- package/src/canvas/iframe-slash.ts +6 -0
- package/src/canvas/path-mapping.ts +56 -6
- package/src/canvas/surface-registry.ts +292 -0
- package/src/collab/collab-commands.ts +244 -0
- package/src/collab/collab-session.ts +198 -32
- package/src/collab/collab-state.ts +28 -2
- package/src/collab/presence-chips.ts +100 -9
- package/src/commands/active-registry.ts +42 -0
- package/src/commands/app-commands.ts +176 -0
- package/src/commands/budget.ts +158 -0
- package/src/commands/command-args.ts +253 -0
- package/src/commands/context.ts +387 -0
- package/src/commands/defaults.ts +580 -0
- package/src/commands/keymap.ts +571 -0
- package/src/commands/levels.ts +345 -0
- package/src/commands/live-context.ts +193 -0
- package/src/commands/reference.ts +227 -0
- package/src/commands/registry.ts +293 -0
- package/src/component-props.ts +3 -2
- package/src/content/draft-state.ts +106 -0
- package/src/content/entry-commands.ts +282 -0
- package/src/content/entry-editor.ts +327 -0
- package/src/content/entry-fields.ts +116 -0
- package/src/content/entry-model.ts +175 -0
- package/src/editor/canvas-context-menu.ts +17 -11
- package/src/editor/canvas-slash-bridge.ts +11 -4
- package/src/editor/context-menu.ts +804 -204
- package/src/editor/convert-to-component.ts +31 -10
- package/src/editor/convert-to-repeater.ts +3 -2
- package/src/editor/inline-edit-apply.ts +5 -5
- package/src/editor/inline-edit.ts +86 -50
- package/src/editor/insert-zone-action.ts +1 -1
- package/src/editor/shortcuts.ts +1043 -329
- package/src/editor/slash-menu.ts +1 -0
- package/src/files/elements.ts +166 -0
- package/src/files/file-ops.ts +178 -31
- package/src/files/files.ts +898 -268
- package/src/files/fs-events.ts +21 -0
- package/src/files/media-meta.ts +203 -0
- package/src/files/media-paths.ts +141 -0
- package/src/files/media-upload.ts +7 -3
- package/src/files/media-usage.ts +189 -0
- package/src/github/github-auth.ts +235 -33
- package/src/github/github-publish.ts +80 -21
- package/src/grid/grid-controller.ts +152 -12
- package/src/grid/grid-layout.ts +225 -20
- package/src/grid/grid-open.ts +120 -0
- package/src/grid/grid-panel.ts +554 -39
- package/src/grid/grid-source.ts +27 -1
- package/src/grid/redirects-grid.ts +599 -0
- package/src/grid/redirects.ts +398 -0
- package/src/grid/sources/content-source.ts +108 -2
- package/src/i18n/i18n-commands.ts +322 -0
- package/src/new-project/add-repo-modal.ts +8 -10
- package/src/new-project/import-tab.ts +7 -0
- package/src/new-project/location-fields.ts +9 -1
- package/src/new-project/new-project-modal.ts +221 -245
- package/src/packages/jxsuite-update.ts +97 -48
- package/src/packages/pull-package-sync.ts +18 -9
- package/src/page-params.ts +2 -1
- package/src/panels/activity-bar.ts +152 -91
- package/src/panels/activity-panel.ts +481 -0
- package/src/panels/ai-chat/chat-markdown.ts +8 -3
- package/src/panels/ai-chat/chat-view.ts +245 -18
- package/src/panels/ai-chat/composer.ts +31 -5
- package/src/panels/ai-chat/sessions-view.ts +17 -10
- package/src/panels/ai-panel.ts +279 -53
- package/src/panels/block-action-bar.ts +1115 -224
- package/src/panels/bottom-dock.ts +337 -0
- package/src/panels/canvas-dnd-bridge.ts +37 -8
- package/src/panels/chat-panel.ts +29 -12
- package/src/panels/data-explorer.ts +254 -112
- package/src/panels/data-grid.ts +10 -4
- package/src/panels/dnd.ts +28 -51
- package/src/panels/editors.ts +434 -107
- package/src/panels/elements-panel.ts +66 -2
- package/src/panels/empty-state.ts +112 -0
- package/src/panels/events-panel.ts +596 -82
- package/src/panels/formula-workspace.ts +408 -218
- package/src/panels/frontmatter-fields.ts +51 -10
- package/src/panels/frontmatter-panel.ts +357 -79
- package/src/panels/git-panel.ts +375 -164
- package/src/panels/head-panel.ts +791 -85
- package/src/panels/i18n-panel.ts +592 -0
- package/src/panels/imports-panel.ts +95 -85
- package/src/panels/jump-bar.ts +584 -0
- package/src/panels/layers-panel.ts +1106 -328
- package/src/panels/left-panel.ts +109 -204
- package/src/panels/navigator-panels.ts +131 -0
- package/src/panels/overlays.ts +7 -2
- package/src/panels/pane-context.ts +1477 -0
- package/src/panels/pane-grid.ts +406 -0
- package/src/panels/panel-registry.ts +340 -0
- package/src/panels/panel-scheduler.ts +75 -0
- package/src/panels/problems-panel.ts +234 -0
- package/src/panels/properties-panel.ts +946 -1139
- package/src/panels/provenance.ts +258 -0
- package/src/panels/quick-search.ts +791 -122
- package/src/panels/right-panel.ts +228 -102
- package/src/panels/seo-modal.ts +395 -0
- package/src/panels/settings-pane.ts +203 -0
- package/src/panels/signals-panel.ts +354 -137
- package/src/panels/statement-editor.ts +41 -25
- package/src/panels/statusbar.ts +342 -106
- package/src/panels/style-panel.ts +974 -463
- package/src/panels/style-utils.ts +3 -3
- package/src/panels/stylebook-doc.ts +4 -2
- package/src/panels/stylebook-layers-panel.ts +3 -2
- package/src/panels/stylebook-panel.ts +51 -26
- package/src/panels/tab-strip.ts +1058 -78
- package/src/panels/target-line.ts +274 -0
- package/src/panels/toolbar.ts +631 -484
- package/src/panels/welcome-screen.ts +301 -198
- package/src/platform-errors.ts +26 -3
- package/src/platform.ts +96 -2
- package/src/platforms/cloud.ts +71 -8
- package/src/platforms/devserver.ts +92 -29
- package/src/publish/deploy-checklist.ts +383 -0
- package/src/publish/pages-service.ts +10 -1
- package/src/publish/publish-commands.ts +218 -0
- package/src/publish/publish-panel.ts +110 -16
- package/src/recent-projects.ts +3 -2
- package/src/services/a11y-report.ts +505 -0
- package/src/services/ai-models.ts +30 -1
- package/src/services/ai-project-tools.ts +29 -10
- package/src/services/ai-system-prompt.ts +53 -14
- package/src/services/ai-tools.ts +39 -3
- package/src/services/ai-writes.ts +154 -0
- package/src/services/announce.ts +97 -0
- package/src/services/automation.ts +424 -175
- package/src/services/cem-export.ts +9 -4
- package/src/services/clock.ts +61 -0
- package/src/services/document-assistant.ts +36 -8
- package/src/services/idle.ts +179 -0
- package/src/services/import-client.ts +26 -0
- package/src/services/monaco-buffer.ts +627 -0
- package/src/services/monaco-lazy.ts +36 -0
- package/src/services/notify.ts +271 -0
- package/src/services/profile.ts +155 -0
- package/src/services/references.ts +0 -0
- package/src/services/token-lint.ts +3 -2
- package/src/services/tool-executor.ts +53 -7
- package/src/services/trusted-types.ts +123 -0
- package/src/settings/contexts-section.ts +427 -0
- package/src/settings/contributed-section.ts +149 -11
- package/src/settings/css-vars-editor.ts +306 -349
- package/src/settings/defs-editor.ts +93 -34
- package/src/settings/dependencies-editor.ts +7 -7
- package/src/settings/extension-sections.ts +37 -5
- package/src/settings/general-settings.ts +204 -121
- package/src/settings/locales-section.ts +347 -0
- package/src/settings/preferences-accounts.ts +140 -0
- package/src/settings/preferences-dialog.ts +620 -0
- package/src/settings/preferences-keymap.ts +270 -0
- package/src/settings/project-sections.ts +260 -0
- package/src/settings/section-registry.ts +169 -0
- package/src/settings/settings-document.ts +385 -0
- package/src/shell.ts +1549 -0
- package/src/site-context.ts +45 -20
- package/src/state.ts +14 -275
- package/src/store.ts +88 -43
- package/src/studio.ts +790 -346
- package/src/style/live-preview.ts +36 -0
- package/src/style/project-styles.ts +349 -0
- package/src/style/token-ref.ts +123 -0
- package/src/tabs/patch-ops.ts +16 -4
- package/src/tabs/project-config.ts +416 -0
- package/src/tabs/selection.ts +323 -0
- package/src/tabs/tab.ts +182 -47
- package/src/tabs/transact.ts +209 -28
- package/src/types.ts +68 -13
- package/src/ui/ai-credentials-form.ts +39 -35
- package/src/ui/ai-managed-connect.ts +7 -1
- package/src/ui/dynamic-slot.ts +224 -81
- package/src/ui/expression-editor.ts +71 -63
- package/src/ui/field-input.ts +4 -6
- package/src/ui/field-row.ts +215 -38
- package/src/ui/form-controls.ts +194 -7
- package/src/ui/layers.ts +492 -69
- package/src/ui/media-picker.ts +115 -25
- package/src/ui/panel-resize.ts +109 -91
- package/src/ui/progress-modal.ts +131 -50
- package/src/ui/regions.ts +462 -0
- package/src/ui/schema-form.ts +229 -45
- package/src/ui/spectrum.ts +24 -8
- package/src/ui/timing.ts +49 -0
- package/src/ui/value-selector.ts +20 -0
- package/src/ui/value-source.ts +348 -0
- package/src/ui/virtual-window.ts +400 -0
- package/src/utils/edit-display.ts +3 -2
- package/src/utils/inherited-style.ts +67 -37
- package/src/view.ts +64 -78
- package/src/workspace/pane-derive.ts +1258 -0
- package/src/workspace/session.ts +317 -0
- package/src/workspace/workspace.ts +1345 -23
- package/styles/canvas.css +653 -0
- package/styles/forced-colors.css +106 -0
- package/styles/inspector.css +1454 -0
- package/styles/overlays.css +2704 -0
- package/styles/panels.css +1701 -0
- package/styles/shell.css +1423 -0
- package/styles/tokens.css +151 -0
- package/dist/chunks/Overlay.dev-cszx7yn5.js +0 -22
- package/dist/chunks/extension-sections-qr3drkkw.js +0 -531
- package/dist/chunks/extension-sections-qr3drkkw.js.map +0 -12
- package/dist/chunks/files-j8a1t06k.js +0 -50
- package/dist/chunks/files-j8a1t06k.js.map +0 -9
- package/dist/chunks/git-panel-xtq5z81x.js +0 -28
- package/dist/chunks/git-panel-xtq5z81x.js.map +0 -9
- package/dist/chunks/layers-panel-ancn2wpq.js +0 -26
- package/dist/chunks/layers-panel-ancn2wpq.js.map +0 -9
- package/dist/chunks/settings-modal-17ttr96g.js +0 -29
- package/dist/chunks/settings-modal-17ttr96g.js.map +0 -9
- package/dist/chunks/sp-overlay.dev-earn5as8.js +0 -17
- package/dist/chunks/sp-overlay.dev-earn5as8.js.map +0 -9
- package/dist/chunks/sp-popover.dev-frxtfejn.js +0 -8
- package/dist/chunks/sp-popover.dev-frxtfejn.js.map +0 -9
- package/dist/chunks/sp-progress-circle.dev-7tvw34h8.js +0 -14
- package/dist/chunks/sp-progress-circle.dev-7tvw34h8.js.map +0 -9
- package/dist/chunks/sp-tooltip.dev-a9fywesm.js +0 -21
- package/dist/chunks/sp-tooltip.dev-a9fywesm.js.map +0 -10
- package/dist/chunks/studio-0xgs7xrs.js +0 -429
- package/dist/chunks/studio-0xgs7xrs.js.map +0 -13
- package/dist/chunks/studio-4d8hzcz5.js +0 -3427
- package/dist/chunks/studio-4d8hzcz5.js.map +0 -26
- package/dist/chunks/studio-4k0m4fmp.js.map +0 -13
- package/dist/chunks/studio-9smfzqhc.js +0 -19
- package/dist/chunks/studio-9smfzqhc.js.map +0 -10
- package/dist/chunks/studio-jm0z592w.js.map +0 -115
- package/dist/chunks/studio-m2t4mdg5.js +0 -1854
- package/dist/chunks/studio-m2t4mdg5.js.map +0 -18
- package/dist/chunks/studio-n4p11dfy.js +0 -853
- package/dist/chunks/studio-n4p11dfy.js.map +0 -12
- package/dist/chunks/studio-qkvt37c0.js.map +0 -9
- package/dist/chunks/studio-sjh1wt1a.js +0 -3744
- package/dist/chunks/studio-sjh1wt1a.js.map +0 -22
- package/dist/chunks/studio-v7jkjqng.js.map +0 -46
- package/dist/chunks/studio-xq0t7n5t.js +0 -140
- package/dist/chunks/studio-xq0t7n5t.js.map +0 -10
- package/dist/chunks/studio-xze4zrs1.js.map +0 -10
- package/dist/chunks/studio-yfcstdzy.js +0 -399
- package/dist/chunks/studio-yfcstdzy.js.map +0 -12
- package/dist/chunks/studio-zp7jncs8.js +0 -469
- package/dist/chunks/studio-zp7jncs8.js.map +0 -14
- package/dist/chunks/ws-client-q7hkz3j9.js.map +0 -11
- package/src/browse/browse-modal.ts +0 -69
- package/src/browse/browse.ts +0 -904
- package/src/canvas/canvas-diff.ts +0 -216
- package/src/canvas/nested-site-style.ts +0 -58
- package/src/new-project/design-fields.ts +0 -264
- package/src/new-project/templates.ts +0 -61
- package/src/panels/tab-bar.ts +0 -548
- package/src/settings/settings-modal.ts +0 -203
- /package/dist/chunks/{adapter-z8fkmbmv.js.map → adapter-qfnesn5v.js.map} +0 -0
- /package/dist/chunks/{cf-settings-mmyv436d.js.map → cf-settings-73sh5z4p.js.map} +0 -0
- /package/dist/chunks/{format-host-8jxwts2p.js.map → format-host-mkwsmt8d.js.map} +0 -0
- /package/dist/chunks/{jx-validate-qx8degj7.js.map → jx-validate-v6qgknrs.js.map} +0 -0
- /package/dist/chunks/{studio-w7c6kvk7.js.map → studio-a7pzveq1.js.map} +0 -0
- /package/dist/chunks/{studio-esrewxap.js.map → studio-s519zc99.js.map} +0 -0
- /package/dist/chunks/{studio-bghqfmea.js.map → studio-wwseqyw0.js.map} +0 -0
- /package/dist/chunks/{studio-nqw433kv.js.map → studio-xmvbhg31.js.map} +0 -0
|
@@ -0,0 +1,451 @@
|
|
|
1
|
+
// ../schema/src/guards.ts
|
|
2
|
+
function isJsonObject(value) {
|
|
3
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
4
|
+
}
|
|
5
|
+
function isRef(value) {
|
|
6
|
+
return isJsonObject(value) && typeof value.$ref === "string";
|
|
7
|
+
}
|
|
8
|
+
function isFunctionDef(value) {
|
|
9
|
+
return isJsonObject(value) && value.$prototype === "Function";
|
|
10
|
+
}
|
|
11
|
+
function isExpressionDef(value) {
|
|
12
|
+
return isJsonObject(value) && isJsonObject(value.$expression);
|
|
13
|
+
}
|
|
14
|
+
function isNamedFormulaDef(value) {
|
|
15
|
+
return isExpressionDef(value) && Array.isArray(value.parameters) && value.parameters.length > 0;
|
|
16
|
+
}
|
|
17
|
+
function hasStructuredBody(value) {
|
|
18
|
+
return isFunctionDef(value) && Array.isArray(value.body);
|
|
19
|
+
}
|
|
20
|
+
function isPrototypeDef(value) {
|
|
21
|
+
return isJsonObject(value) && typeof value.$prototype === "string" && value.$prototype !== "Function";
|
|
22
|
+
}
|
|
23
|
+
function isServerFnDef(value) {
|
|
24
|
+
return isJsonObject(value) && value.timing === "server" && typeof value.$src === "string" && typeof value.$export === "string" && !value.$prototype;
|
|
25
|
+
}
|
|
26
|
+
var SCHEMA_KEYWORDS = new Set([
|
|
27
|
+
"type",
|
|
28
|
+
"enum",
|
|
29
|
+
"minimum",
|
|
30
|
+
"maximum",
|
|
31
|
+
"minLength",
|
|
32
|
+
"maxLength",
|
|
33
|
+
"pattern",
|
|
34
|
+
"format",
|
|
35
|
+
"items",
|
|
36
|
+
"properties",
|
|
37
|
+
"required",
|
|
38
|
+
"description",
|
|
39
|
+
"title",
|
|
40
|
+
"$comment"
|
|
41
|
+
]);
|
|
42
|
+
function isMappedArray(value) {
|
|
43
|
+
return isJsonObject(value) && value.$prototype === "Array";
|
|
44
|
+
}
|
|
45
|
+
function isTemplateString(value) {
|
|
46
|
+
return typeof value === "string" && value.includes("${");
|
|
47
|
+
}
|
|
48
|
+
function bodyReturnsValue(body) {
|
|
49
|
+
return /\breturn\b[^\S\n]*(?![;}\s]|$)/.test(body);
|
|
50
|
+
}
|
|
51
|
+
function isNestedStyle(value) {
|
|
52
|
+
return typeof value === "object" && value !== null;
|
|
53
|
+
}
|
|
54
|
+
function getNestedStyle(style, key) {
|
|
55
|
+
const value = style?.[key];
|
|
56
|
+
return isNestedStyle(value) ? value : undefined;
|
|
57
|
+
}
|
|
58
|
+
function ensureNestedStyle(style, key) {
|
|
59
|
+
const existing = style[key];
|
|
60
|
+
if (isNestedStyle(existing)) {
|
|
61
|
+
return existing;
|
|
62
|
+
}
|
|
63
|
+
const created = {};
|
|
64
|
+
style[key] = created;
|
|
65
|
+
return created;
|
|
66
|
+
}
|
|
67
|
+
function isEventBinding(value) {
|
|
68
|
+
return isRef(value) || isFunctionDef(value) || isExpressionDef(value);
|
|
69
|
+
}
|
|
70
|
+
function getEventBinding(node, key) {
|
|
71
|
+
const value = node[key];
|
|
72
|
+
return isEventBinding(value) ? value : undefined;
|
|
73
|
+
}
|
|
74
|
+
function paramNames(parameters) {
|
|
75
|
+
if (!parameters) {
|
|
76
|
+
return [];
|
|
77
|
+
}
|
|
78
|
+
return parameters.map((p) => typeof p === "string" ? p : p.name);
|
|
79
|
+
}
|
|
80
|
+
function isTagExpression(tagName) {
|
|
81
|
+
return isJsonObject(tagName) && isJsonObject(tagName.$expression);
|
|
82
|
+
}
|
|
83
|
+
function tagNameCandidates(tagName) {
|
|
84
|
+
if (typeof tagName === "string") {
|
|
85
|
+
return [tagName];
|
|
86
|
+
}
|
|
87
|
+
if (!isTagExpression(tagName)) {
|
|
88
|
+
return [];
|
|
89
|
+
}
|
|
90
|
+
const expression = tagName.$expression;
|
|
91
|
+
if (expression.operator === "?:") {
|
|
92
|
+
return [...new Set([expression.value, expression.initial])];
|
|
93
|
+
}
|
|
94
|
+
return [...new Set([...Object.values(expression.cases), expression.default])];
|
|
95
|
+
}
|
|
96
|
+
function displayTagName(tagName) {
|
|
97
|
+
return typeof tagName === "string" ? tagName : tagNameCandidates(tagName).join("|");
|
|
98
|
+
}
|
|
99
|
+
function isPrivateStateKey(key) {
|
|
100
|
+
return key.startsWith("#");
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
// src/ui/timing.ts
|
|
104
|
+
var INPUT_DEBOUNCE = 400;
|
|
105
|
+
var LIVE_PREVIEW = 350;
|
|
106
|
+
var POLL_GIT = 30000;
|
|
107
|
+
|
|
108
|
+
// src/state.ts
|
|
109
|
+
function getNodeAtPath(doc, path) {
|
|
110
|
+
let node = doc;
|
|
111
|
+
for (const key of path) {
|
|
112
|
+
if (node == null) {
|
|
113
|
+
return;
|
|
114
|
+
}
|
|
115
|
+
node = node[key];
|
|
116
|
+
}
|
|
117
|
+
return node;
|
|
118
|
+
}
|
|
119
|
+
function childList(node) {
|
|
120
|
+
return Array.isArray(node?.children) ? node.children : [];
|
|
121
|
+
}
|
|
122
|
+
function normalizeArrayChildren(node) {
|
|
123
|
+
if (!node || typeof node !== "object") {
|
|
124
|
+
return node;
|
|
125
|
+
}
|
|
126
|
+
if (Array.isArray(node)) {
|
|
127
|
+
for (const child of node) {
|
|
128
|
+
normalizeArrayChildren(child);
|
|
129
|
+
}
|
|
130
|
+
return node;
|
|
131
|
+
}
|
|
132
|
+
const n = node;
|
|
133
|
+
const { children } = n;
|
|
134
|
+
if (children && typeof children === "object" && !Array.isArray(children) && children.$prototype === "Array") {
|
|
135
|
+
n.children = [children];
|
|
136
|
+
}
|
|
137
|
+
if (Array.isArray(n.children)) {
|
|
138
|
+
for (const child of n.children) {
|
|
139
|
+
normalizeArrayChildren(child);
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
if (n.$prototype === "Array" && n.map && typeof n.map === "object") {
|
|
143
|
+
normalizeArrayChildren(n.map);
|
|
144
|
+
}
|
|
145
|
+
if (n.cases && typeof n.cases === "object") {
|
|
146
|
+
for (const caseDef of Object.values(n.cases)) {
|
|
147
|
+
normalizeArrayChildren(caseDef);
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
return node;
|
|
151
|
+
}
|
|
152
|
+
function parentElementPath(path) {
|
|
153
|
+
return path.length >= 2 ? path.slice(0, -2) : null;
|
|
154
|
+
}
|
|
155
|
+
function childIndex(path) {
|
|
156
|
+
return path.at(-1);
|
|
157
|
+
}
|
|
158
|
+
function pathKey(path) {
|
|
159
|
+
return path.join("/");
|
|
160
|
+
}
|
|
161
|
+
function pathsEqual(a, b) {
|
|
162
|
+
if (a === b) {
|
|
163
|
+
return true;
|
|
164
|
+
}
|
|
165
|
+
if (!a || !b || a.length !== b.length) {
|
|
166
|
+
return false;
|
|
167
|
+
}
|
|
168
|
+
return a.every((v, i) => v === b[i]);
|
|
169
|
+
}
|
|
170
|
+
function isAncestor(path, descendant) {
|
|
171
|
+
if (path.length > descendant.length) {
|
|
172
|
+
return false;
|
|
173
|
+
}
|
|
174
|
+
return path.every((v, i) => v === descendant[i]);
|
|
175
|
+
}
|
|
176
|
+
function flattenTree(doc, path = [], depth = 0) {
|
|
177
|
+
const rows = [];
|
|
178
|
+
collectRows(doc, path, depth, rows, false);
|
|
179
|
+
return rows;
|
|
180
|
+
}
|
|
181
|
+
function collectRows(doc, path, depth, out, skipSelf) {
|
|
182
|
+
if (typeof doc === "string" || typeof doc === "number" || typeof doc === "boolean") {
|
|
183
|
+
if (!skipSelf) {
|
|
184
|
+
out.push({ depth, node: doc, nodeType: "text", path });
|
|
185
|
+
}
|
|
186
|
+
return;
|
|
187
|
+
}
|
|
188
|
+
if (doc.$prototype === "Array") {
|
|
189
|
+
if (!skipSelf) {
|
|
190
|
+
out.push({ depth, node: doc, nodeType: "map", path });
|
|
191
|
+
}
|
|
192
|
+
const mapDef = doc.map;
|
|
193
|
+
if (mapDef && typeof mapDef === "object") {
|
|
194
|
+
collectRows(mapDef, [...path, "map"], depth + 1, out, false);
|
|
195
|
+
}
|
|
196
|
+
return;
|
|
197
|
+
}
|
|
198
|
+
if (!skipSelf) {
|
|
199
|
+
out.push({ depth, node: doc, nodeType: "element", path });
|
|
200
|
+
}
|
|
201
|
+
if (doc.$props && displayTagName(doc.tagName).includes("-") && !Array.isArray(doc.children)) {
|
|
202
|
+
return;
|
|
203
|
+
}
|
|
204
|
+
const { children } = doc;
|
|
205
|
+
if (Array.isArray(children)) {
|
|
206
|
+
for (let i = 0;i < children.length; i++) {
|
|
207
|
+
const childPath = [...path, "children", i];
|
|
208
|
+
collectRows(children[i], childPath, depth + 1, out, false);
|
|
209
|
+
}
|
|
210
|
+
} else if (children && typeof children === "object" && children.$prototype === "Array") {
|
|
211
|
+
collectRows(children, [...path, "children"], depth + 1, out, false);
|
|
212
|
+
}
|
|
213
|
+
if (doc.$switch && doc.cases && typeof doc.cases === "object") {
|
|
214
|
+
for (const [caseName, caseDef] of Object.entries(doc.cases)) {
|
|
215
|
+
const casePath = [...path, "cases", caseName];
|
|
216
|
+
if (caseDef && typeof caseDef === "object" && caseDef.$ref) {
|
|
217
|
+
out.push({
|
|
218
|
+
depth: depth + 1,
|
|
219
|
+
node: caseDef,
|
|
220
|
+
nodeType: "case-ref",
|
|
221
|
+
path: casePath
|
|
222
|
+
});
|
|
223
|
+
} else if (caseDef && typeof caseDef === "object") {
|
|
224
|
+
out.push({
|
|
225
|
+
depth: depth + 1,
|
|
226
|
+
node: caseDef,
|
|
227
|
+
nodeType: "case",
|
|
228
|
+
path: casePath
|
|
229
|
+
});
|
|
230
|
+
collectRows(caseDef, casePath, depth + 2, out, true);
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
function nodeLabel(node) {
|
|
236
|
+
if (!node) {
|
|
237
|
+
return "?";
|
|
238
|
+
}
|
|
239
|
+
if (node.$prototype === "Array") {
|
|
240
|
+
const { items } = node;
|
|
241
|
+
const ref = (isRef(items) ? items.$ref : undefined) || "items";
|
|
242
|
+
return `Repeater → ${ref}`;
|
|
243
|
+
}
|
|
244
|
+
if (node.$title) {
|
|
245
|
+
return node.$title;
|
|
246
|
+
}
|
|
247
|
+
if (node.$id) {
|
|
248
|
+
return node.$id;
|
|
249
|
+
}
|
|
250
|
+
if (node.tagName === "slot") {
|
|
251
|
+
const name = node.attributes?.name;
|
|
252
|
+
return typeof name === "string" && name.trim() ? `slot: ${name.trim()}` : "slot";
|
|
253
|
+
}
|
|
254
|
+
const tag = displayTagName(node.tagName) || "div";
|
|
255
|
+
const suffix = node.$switch ? " ⇆" : "";
|
|
256
|
+
if (typeof node.textContent === "string" && node.textContent.length > 0) {
|
|
257
|
+
return `${tag} — ${node.textContent.slice(0, 24)}${suffix}`;
|
|
258
|
+
}
|
|
259
|
+
return tag + suffix;
|
|
260
|
+
}
|
|
261
|
+
var projectState = null;
|
|
262
|
+
function setProjectState(ps) {
|
|
263
|
+
projectState = ps;
|
|
264
|
+
}
|
|
265
|
+
function requireProjectState() {
|
|
266
|
+
return projectState;
|
|
267
|
+
}
|
|
268
|
+
// src/utils/strip-events.ts
|
|
269
|
+
function stripEventHandlers(node) {
|
|
270
|
+
if (!node || typeof node !== "object") {
|
|
271
|
+
return node;
|
|
272
|
+
}
|
|
273
|
+
if (Array.isArray(node)) {
|
|
274
|
+
return node.map((n) => stripEventHandlers(n));
|
|
275
|
+
}
|
|
276
|
+
const out = {};
|
|
277
|
+
for (const [k, v] of Object.entries(node)) {
|
|
278
|
+
if (k.startsWith("on") && isEventBinding(v)) {
|
|
279
|
+
continue;
|
|
280
|
+
}
|
|
281
|
+
if (k === "children") {
|
|
282
|
+
out.children = Array.isArray(v) ? v.map((c) => stripEventHandlers(c)) : stripEventHandlers(v);
|
|
283
|
+
} else if (k === "cases" && typeof v === "object") {
|
|
284
|
+
const cases = {};
|
|
285
|
+
for (const [ck, cv] of Object.entries(v)) {
|
|
286
|
+
cases[ck] = stripEventHandlers(cv);
|
|
287
|
+
}
|
|
288
|
+
out.cases = cases;
|
|
289
|
+
} else if (k === "state" && typeof v === "object" && v !== null) {
|
|
290
|
+
const state = {};
|
|
291
|
+
for (const [sk, sv] of Object.entries(v)) {
|
|
292
|
+
if (sv && typeof sv === "object" && sv.timing === "server") {
|
|
293
|
+
continue;
|
|
294
|
+
}
|
|
295
|
+
state[sk] = sv;
|
|
296
|
+
}
|
|
297
|
+
out.state = state;
|
|
298
|
+
} else if (k === "style" || k === "attributes" || k === "$media") {
|
|
299
|
+
out[k] = v;
|
|
300
|
+
} else {
|
|
301
|
+
out[k] = v;
|
|
302
|
+
}
|
|
303
|
+
}
|
|
304
|
+
return out;
|
|
305
|
+
}
|
|
306
|
+
|
|
307
|
+
// src/store.ts
|
|
308
|
+
var activityBar = null;
|
|
309
|
+
var leftPanel = null;
|
|
310
|
+
var rightPanel = null;
|
|
311
|
+
var toolbarEl = null;
|
|
312
|
+
var statusbarEl = null;
|
|
313
|
+
function initShellRefs() {
|
|
314
|
+
activityBar = document.querySelector("#activity-bar");
|
|
315
|
+
leftPanel = document.querySelector("#left-panel");
|
|
316
|
+
rightPanel = document.querySelector("#right-panel");
|
|
317
|
+
toolbarEl = document.querySelector("#toolbar");
|
|
318
|
+
statusbarEl = document.querySelector("#statusbar");
|
|
319
|
+
}
|
|
320
|
+
var VOID_ELEMENTS = new Set([
|
|
321
|
+
"area",
|
|
322
|
+
"base",
|
|
323
|
+
"br",
|
|
324
|
+
"col",
|
|
325
|
+
"embed",
|
|
326
|
+
"hr",
|
|
327
|
+
"img",
|
|
328
|
+
"input",
|
|
329
|
+
"link",
|
|
330
|
+
"meta",
|
|
331
|
+
"param",
|
|
332
|
+
"source",
|
|
333
|
+
"track",
|
|
334
|
+
"wbr"
|
|
335
|
+
]);
|
|
336
|
+
var COMMON_SELECTORS = [
|
|
337
|
+
":hover",
|
|
338
|
+
":focus",
|
|
339
|
+
":active",
|
|
340
|
+
":focus-within",
|
|
341
|
+
":focus-visible",
|
|
342
|
+
":disabled",
|
|
343
|
+
":first-child",
|
|
344
|
+
":last-child",
|
|
345
|
+
"::before",
|
|
346
|
+
"::after",
|
|
347
|
+
"::placeholder"
|
|
348
|
+
];
|
|
349
|
+
function isNestedSelector(k) {
|
|
350
|
+
return k.startsWith(":") || k.startsWith(".") || k.startsWith("&") || k.startsWith("[");
|
|
351
|
+
}
|
|
352
|
+
var _styleDebounceTimers = new Map;
|
|
353
|
+
function debouncedStyleCommit(prop, ms, fn) {
|
|
354
|
+
const delay = ms ?? INPUT_DEBOUNCE;
|
|
355
|
+
return (...args) => {
|
|
356
|
+
clearTimeout(_styleDebounceTimers.get(prop));
|
|
357
|
+
_styleDebounceTimers.set(prop, setTimeout(() => {
|
|
358
|
+
_styleDebounceTimers.delete(prop);
|
|
359
|
+
fn(...args);
|
|
360
|
+
}, delay));
|
|
361
|
+
};
|
|
362
|
+
}
|
|
363
|
+
function cancelStyleDebounce(prop) {
|
|
364
|
+
clearTimeout(_styleDebounceTimers.get(prop));
|
|
365
|
+
_styleDebounceTimers.delete(prop);
|
|
366
|
+
}
|
|
367
|
+
var _renderers = new Map;
|
|
368
|
+
var _rendersInFlight = 0;
|
|
369
|
+
function rendersInFlight() {
|
|
370
|
+
return _rendersInFlight;
|
|
371
|
+
}
|
|
372
|
+
function runRenderer(name, fn) {
|
|
373
|
+
_rendersInFlight += 1;
|
|
374
|
+
const done = () => {
|
|
375
|
+
_rendersInFlight -= 1;
|
|
376
|
+
};
|
|
377
|
+
let pending = null;
|
|
378
|
+
try {
|
|
379
|
+
const result = fn();
|
|
380
|
+
if (typeof result?.then === "function") {
|
|
381
|
+
pending = result;
|
|
382
|
+
}
|
|
383
|
+
} catch (error) {
|
|
384
|
+
console.error(`Renderer "${name}" failed:`, error);
|
|
385
|
+
}
|
|
386
|
+
if (!pending) {
|
|
387
|
+
done();
|
|
388
|
+
return;
|
|
389
|
+
}
|
|
390
|
+
pending.then(done, (error) => {
|
|
391
|
+
console.error(`Renderer "${name}" failed:`, error);
|
|
392
|
+
done();
|
|
393
|
+
});
|
|
394
|
+
}
|
|
395
|
+
function registerRenderer(name, fn) {
|
|
396
|
+
_renderers.set(name, fn);
|
|
397
|
+
}
|
|
398
|
+
function render() {
|
|
399
|
+
for (const [name, fn] of _renderers.entries()) {
|
|
400
|
+
runRenderer(name, fn);
|
|
401
|
+
}
|
|
402
|
+
}
|
|
403
|
+
function renderOnly(...names) {
|
|
404
|
+
for (const name of names) {
|
|
405
|
+
const fn = _renderers.get(name);
|
|
406
|
+
if (!fn) {
|
|
407
|
+
continue;
|
|
408
|
+
}
|
|
409
|
+
runRenderer(name, fn);
|
|
410
|
+
}
|
|
411
|
+
}
|
|
412
|
+
function updateSession(tab, patch) {
|
|
413
|
+
if (tab) {
|
|
414
|
+
if (patch.selection !== undefined) {
|
|
415
|
+
tab.session.selection = patch.selection;
|
|
416
|
+
}
|
|
417
|
+
if (patch.hover !== undefined) {
|
|
418
|
+
tab.session.hover = patch.hover;
|
|
419
|
+
}
|
|
420
|
+
if (patch.clipboard !== undefined) {
|
|
421
|
+
tab.session.clipboard = patch.clipboard;
|
|
422
|
+
}
|
|
423
|
+
if (patch.ui) {
|
|
424
|
+
for (const [k, v] of Object.entries(patch.ui)) {
|
|
425
|
+
tab.session.ui[k] = v;
|
|
426
|
+
}
|
|
427
|
+
}
|
|
428
|
+
if (patch.canvas) {
|
|
429
|
+
for (const [k, v] of Object.entries(patch.canvas)) {
|
|
430
|
+
tab.session.canvas[k] = v;
|
|
431
|
+
}
|
|
432
|
+
}
|
|
433
|
+
}
|
|
434
|
+
}
|
|
435
|
+
function updateUi(tab, field, value) {
|
|
436
|
+
if (tab) {
|
|
437
|
+
tab.session.ui[field] = value;
|
|
438
|
+
}
|
|
439
|
+
}
|
|
440
|
+
function updateCanvas(tab, patch) {
|
|
441
|
+
if (tab) {
|
|
442
|
+
for (const [k, v] of Object.entries(patch)) {
|
|
443
|
+
tab.session.canvas[k] = v;
|
|
444
|
+
}
|
|
445
|
+
}
|
|
446
|
+
}
|
|
447
|
+
|
|
448
|
+
export { isJsonObject, isRef, isFunctionDef, isExpressionDef, isNamedFormulaDef, hasStructuredBody, isPrototypeDef, isServerFnDef, isMappedArray, isTemplateString, bodyReturnsValue, getNestedStyle, ensureNestedStyle, isEventBinding, getEventBinding, paramNames, isTagExpression, tagNameCandidates, displayTagName, isPrivateStateKey, LIVE_PREVIEW, POLL_GIT, getNodeAtPath, childList, normalizeArrayChildren, parentElementPath, childIndex, pathKey, pathsEqual, isAncestor, flattenTree, nodeLabel, projectState, setProjectState, requireProjectState, stripEventHandlers, activityBar, leftPanel, rightPanel, toolbarEl, statusbarEl, initShellRefs, VOID_ELEMENTS, COMMON_SELECTORS, isNestedSelector, debouncedStyleCommit, cancelStyleDebounce, rendersInFlight, registerRenderer, render, renderOnly, updateSession, updateUi, updateCanvas };
|
|
449
|
+
|
|
450
|
+
//# debugId=147E616828B71FA964756E2164756E21
|
|
451
|
+
//# sourceMappingURL=studio-cjm7fdjf.js.map
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../schema/src/guards.ts", "../src/ui/timing.ts", "../src/state.ts", "../src/utils/strip-events.ts", "../src/store.ts"],
|
|
4
|
+
"sourcesContent": [
|
|
5
|
+
"/**\n * Type predicate guards for the Jx document model.\n *\n * These narrow `unknown`/union-typed values to precise domain types so call sites get real property\n * checking instead of casts. Every guard mirrors the runtime's actual detection logic (see\n * buildScope's five-shape algorithm in the runtime).\n */\n\nimport type {\n JsonObject,\n JsonValue,\n JxClassDef,\n JxElement,\n JxEventBinding,\n JxExpressionDef,\n JxFunctionDef,\n JxMappedArray,\n JxMutableNode,\n JxPrototypeDef,\n JxRef,\n JxServerFnDef,\n JxStateObject,\n JxStatement,\n JxStyle,\n JxTagExpression,\n} from \"../types\";\n\n// ─── JSON shape guards ──────────────────────────────────────────────────────────\n\n/** A plain object: not null, not an array. The base check for all object-shaped defs. */\nexport function isJsonObject(value: unknown): value is JsonObject {\n return typeof value === \"object\" && value !== null && !Array.isArray(value);\n}\n\n// ─── Binding guards ─────────────────────────────────────────────────────────────\n\n/** A `{ $ref: \"#/...\" }` JSON Pointer reference. */\nexport function isRef(value: unknown): value is JxRef {\n return isJsonObject(value) && typeof value.$ref === \"string\";\n}\n\n// ─── State definition guards (the five-shape algorithm) ────────────────────────\n\n/** Shape 4: a function declaration — `{ $prototype: \"Function\", body | $src }`. */\nexport function isFunctionDef(value: unknown): value is JxFunctionDef {\n return isJsonObject(value) && value.$prototype === \"Function\";\n}\n\n/** Shape 5: a declarative expression entry — `{ $expression: { operator, target } }`. */\nexport function isExpressionDef(value: unknown): value is JxExpressionDef {\n return isJsonObject(value) && isJsonObject(value.$expression);\n}\n\n/**\n * Shape 5 with `parameters`: a named formula — a pure, reusable computation invoked via the `call`\n * operator rather than lowered to a computed value.\n */\nexport function isNamedFormulaDef(\n value: unknown,\n): value is JxExpressionDef & { parameters: unknown[] } {\n return isExpressionDef(value) && Array.isArray(value.parameters) && value.parameters.length > 0;\n}\n\n/**\n * Shape 4 with a structured body: a Function entry whose `body` is a statement array (spec §20)\n * rather than opaque JS source.\n */\nexport function hasStructuredBody(\n value: unknown,\n): value is JxFunctionDef & { body: JxStatement[] } {\n return isFunctionDef(value) && Array.isArray(value.body);\n}\n\n/** A non-Function `$prototype` instance (Request, Storage, ContentCollection, classes, …). */\nexport function isPrototypeDef(value: unknown): value is JxPrototypeDef {\n return (\n isJsonObject(value) && typeof value.$prototype === \"string\" && value.$prototype !== \"Function\"\n );\n}\n\n/** A `timing: \"server\"` function proxy (no `$prototype`, external `$src`/`$export`). */\nexport function isServerFnDef(value: unknown): value is JxServerFnDef {\n return (\n isJsonObject(value) &&\n value.timing === \"server\" &&\n typeof value.$src === \"string\" &&\n typeof value.$export === \"string\" &&\n !value.$prototype\n );\n}\n\n/** Shape 2: an expanded signal — an object carrying a `default` value. */\nexport function isExpandedSignal(value: unknown): value is JxStateObject & { default: JsonValue } {\n return isJsonObject(value) && !value.$prototype && !value.$expression && \"default\" in value;\n}\n\n/**\n * Schema-only keywords used to detect pure type definitions (Shape 2b). An object with ONLY these\n * keys and no `default` is a type def, not a signal.\n */\nexport const SCHEMA_KEYWORDS: ReadonlySet<string> = new Set([\n \"type\",\n \"enum\",\n \"minimum\",\n \"maximum\",\n \"minLength\",\n \"maxLength\",\n \"pattern\",\n \"format\",\n \"items\",\n \"properties\",\n \"required\",\n \"description\",\n \"title\",\n \"$comment\",\n]);\n\n/** Shape 2b: a pure type definition — every key is a JSON Schema keyword. */\nexport function isSchemaOnlyDef(value: unknown): value is JxStateObject {\n if (!isJsonObject(value)) {\n return false;\n }\n for (const k of Object.keys(value)) {\n if (!SCHEMA_KEYWORDS.has(k)) {\n return false;\n }\n }\n return true;\n}\n\n/** True when an object carries at least one JSON Schema keyword. */\nexport function hasSchemaKeywords(value: unknown): value is JxStateObject {\n if (!isJsonObject(value)) {\n return false;\n }\n for (const k of Object.keys(value)) {\n if (SCHEMA_KEYWORDS.has(k)) {\n return true;\n }\n }\n return false;\n}\n\n// ─── Document structure guards ──────────────────────────────────────────────────\n\n/** A mapped (repeater) children object — `{ $prototype: \"Array\", items, map }`. */\nexport function isMappedArray(value: unknown): value is JxMappedArray {\n return isJsonObject(value) && value.$prototype === \"Array\";\n}\n\n/**\n * Whether a node's `children` holds at least one mapped array — either as the bare whole-children\n * slot (legacy) or as a member of the children array. Used by renderers and the compiler to decide\n * if a children list needs inline repeater expansion.\n */\nexport function childrenContainArray(children?: unknown): boolean {\n if (isMappedArray(children)) {\n return true;\n }\n return Array.isArray(children) && children.some((c) => isMappedArray(c));\n}\n\n/** A .class.json schema-defined class document — `{ $prototype: \"Class\" }`. */\nexport function isClassDef(value: unknown): value is JxClassDef {\n return isJsonObject(value) && value.$prototype === \"Class\";\n}\n\n/** An element-shaped node object (vs. a bare string/number child). */\nexport function isNodeObject(value: unknown): value is JxMutableNode & JxElement {\n return isJsonObject(value);\n}\n\n/** A `${...}` template-expression string. */\nexport function isTemplateString(value?: unknown): value is string {\n return typeof value === \"string\" && value.includes(\"${\");\n}\n\n/**\n * Whether a function `body` returns a value — the heuristic that classifies a `$prototype:\n * \"Function\"` as a computed value vs an event handler. Uses a word boundary so identifiers like\n * `returned` do not match. Shared by the runtime interpreter and the compiler so both agree on the\n * classification.\n *\n * A bare `return;` does not count. It is an early-exit guard, which is handler code — reading it as\n * a value return turned any handler with a guard clause into a `computed()`, so the binding that\n * invoked it found a value where it expected a function. The value has to follow on the same line,\n * because a newline after `return` is an ASI bare return.\n */\nexport function bodyReturnsValue(body: string): boolean {\n return /\\breturn\\b[^\\S\\n]*(?![;}\\s]|$)/.test(body);\n}\n\n// ─── Style guards & accessors ───────────────────────────────────────────────────\n\n/** A nested style object (selector/media block), as opposed to a scalar CSS value. */\nexport function isNestedStyle(value: string | number | JxStyle | undefined): value is JxStyle {\n return typeof value === \"object\" && value !== null;\n}\n\n/** Read a nested style block (`:hover`, `@--md`, `& > li`, …), if present. */\nexport function getNestedStyle(style: JxStyle | undefined, key: string): JxStyle | undefined {\n const value = style?.[key];\n return isNestedStyle(value) ? value : undefined;\n}\n\n/** Read a nested style block, creating an empty one in place when absent or scalar. */\nexport function ensureNestedStyle(style: JxStyle, key: string): JxStyle {\n const existing = style[key];\n if (isNestedStyle(existing)) {\n return existing;\n }\n const created: JxStyle = {};\n style[key] = created;\n return created;\n}\n\n// ─── Event binding guards ───────────────────────────────────────────────────────\n\n/**\n * The value of an `on*` document key: a `$ref`, an inline function declaration, or a declarative\n * expression.\n */\nexport function isEventBinding(value: unknown): value is JxEventBinding {\n return isRef(value) || isFunctionDef(value) || isExpressionDef(value);\n}\n\n/** Read the event binding stored under an `on*` key of a node, if there is one. */\nexport function getEventBinding(\n node: JxMutableNode | JxElement,\n key: string,\n): JxEventBinding | undefined {\n const value = node[key];\n return isEventBinding(value) ? value : undefined;\n}\n\n// ─── Parameter helpers ──────────────────────────────────────────────────────────\n\n/** Resolve `parameters` entries (bare strings or CEM objects) to their names. */\nexport function paramNames(parameters: JxFunctionDef[\"parameters\"]): string[] {\n if (!parameters) {\n return [];\n }\n return parameters.map((p) => (typeof p === \"string\" ? p : p.name));\n}\n\n/** Whether an element's `tagName` is a choice rather than a name. */\nexport function isTagExpression(tagName: unknown): tagName is { $expression: JxTagExpression } {\n return isJsonObject(tagName) && isJsonObject(tagName.$expression);\n}\n\n/**\n * Every tag an element could be, without evaluating anything.\n *\n * ONE implementation, shared by the runtime, the three compiler targets and the studio, because\n * four surfaces each writing their own enumeration is four chances to disagree about what an\n * element can be — and disagreeing about that is how the `${…}` tagName shipped a page whose SSR\n * markup and client render used different elements.\n *\n * A plain name yields itself, so every caller can treat the two forms alike.\n */\nexport function tagNameCandidates(tagName: unknown): string[] {\n if (typeof tagName === \"string\") {\n return [tagName];\n }\n if (!isTagExpression(tagName)) {\n return [];\n }\n const expression = tagName.$expression;\n if (expression.operator === \"?:\") {\n return [...new Set([expression.value, expression.initial])];\n }\n return [...new Set([...Object.values(expression.cases), expression.default])];\n}\n\n/**\n * The tag to show a human when the element could be several.\n *\n * The Outline draws one row per node and needs a label that is stable, short and honest: `a|div`\n * says \"this is one element whose tag is chosen\" without pretending to know which. Rendering the\n * first candidate would have been a quieter lie.\n */\nexport function displayTagName(tagName: unknown): string {\n return typeof tagName === \"string\" ? tagName : tagNameCandidates(tagName).join(\"|\");\n}\n\n/**\n * Whether a `state` key is private (`spec.md` §5.6).\n *\n * A `#`-prefixed entry is ordinary state in every respect but one: it is not part of the\n * component's interface. It never reaches the studio property panel, never appears in an exported\n * CEM manifest, and is never settable through `$props` — which is the clause that needs a predicate\n * rather than a convention, because the props paths are spread across two tiers.\n *\n * The rule lived inline at three call sites before it lived here, spelled `key.startsWith(\"#\")`\n * each time. That is survivable for two and a drift risk at four, and the interesting direction of\n * drift is silent: a path that forgets the check does not fail, it just quietly makes a private\n * entry writable from outside.\n *\n * @param {string} key - A `state` key\n * @returns {boolean}\n */\nexport function isPrivateStateKey(key: string): boolean {\n return key.startsWith(\"#\");\n}\n",
|
|
6
|
+
"/**\n * Timing.ts — Studio's latency vocabulary.\n *\n * Every user-visible delay in Studio expresses one of a small number of intents: \"wait until the\n * user stops typing\", \"hold a message on screen long enough to read\", \"check the repo again\". Each\n * call site used to pick its own number for its intent, so the same intent shipped as 350, 400 and\n * 600 ms in three different panels and a retune meant a grep. Name the intent once here, import the\n * name, and the retune is a single edit.\n *\n * All values are milliseconds. The two input debounces are contractual:\n * `specs/studio-ui-guidelines.md` §4.4 fixes 400 ms for text inputs and 500 ms for code/expression\n * textareas. Do not change either without releasing that spec section.\n */\n\n/**\n * Text/style input debounce — the §4.4 standard. Long enough that a normal typing cadence produces\n * one commit per pause rather than one per keystroke, short enough that the canvas still feels\n * live.\n */\nexport const INPUT_DEBOUNCE = 400;\n\n/**\n * Code and expression textareas — the §4.4 standard. Longer than {@link INPUT_DEBOUNCE} because\n * each commit re-parses source (or re-lints), and because half-typed code is usually invalid, so\n * committing eagerly just burns work on states the user is about to leave.\n */\nexport const CODE_DEBOUNCE = 500;\n\n/**\n * Draft-layer live preview (ui/field-input.ts) — how long after a keystroke the in-progress draft\n * is pushed to the document so the canvas updates while the field stays focused. Deliberately below\n * {@link INPUT_DEBOUNCE}: this commit is provisional (the draft survives it, and blur/Enter commits\n * again), so it can afford to fire sooner than a committing input.\n */\nexport const LIVE_PREVIEW = 350;\n\n/*\n * `STATUS_MESSAGE = 3000` used to live here: how long a transient message stayed in the status bar\n * before it erased itself. It had one reader, `statusMessage`, which is deleted — the bar carries\n * ambient state now and outcomes go to `services/notify.ts`, whose `TOAST_LIFETIME_MS` is per\n * SEVERITY (§7.1 caps the band at 4–8s) rather than one number for a failure and a save alike.\n */\n\n/**\n * Git status poll while the Git panel is open. Deliberately coarse: it exists to notice changes\n * made outside Studio, and each tick shells out to git, so a faster cadence buys little and costs\n * I/O.\n */\nexport const POLL_GIT = 30_000;\n",
|
|
7
|
+
"/**\n * Document paths, the tree walk over them, and the project record.\n *\n * A `JxPath` addresses one node from the document root: `[]` is the root itself, `[\"children\", 0]`\n * its first child, `[\"children\", 0, \"children\", 2]` that child's third. Every module that points at\n * a node — selection, hover, the layers tree, a patch — spells it this way, which is why the\n * comparison and ancestry predicates live here rather than beside any one of them.\n *\n * The editable document and its history belong to a TAB (`tabs/tab.ts`) and its session lives on\n * the workspace; nothing here holds mutable document state. The one exception is `projectState`,\n * which outlives every document because it describes the folder they all come from.\n */\n\nimport type { ProjectState } from \"./types\";\nimport { displayTagName, isRef } from \"@jxsuite/schema/guards\";\nimport type { JxMutableNode } from \"@jxsuite/schema/types\";\n\nexport type JxPath = (string | number)[];\n\n// ─── Path utilities ───────────────────────────────────────────────────────────\n\n/**\n * Walk the document tree and return the node at the given path.\n *\n * @param {JxMutableNode} doc\n * @param {JxPath} path\n * @returns {JxMutableNode}\n */\nexport function getNodeAtPath(doc: JxMutableNode, path: JxPath) {\n let node = doc;\n for (const key of path) {\n if (node == null) {\n return undefined as unknown as JxMutableNode;\n }\n // Paths address nodes by construction; non-node leaves surface as undefined above.\n node = node[key] as JxMutableNode;\n }\n return node;\n}\n\n/**\n * The node's children when they are a static array (the edit-mode invariant); an empty array for\n * mapped-array or absent children.\n *\n * @param {JxMutableNode | null | undefined} node\n * @returns {(JxMutableNode | string)[]}\n */\nexport function childList(node: JxMutableNode | null | undefined): (JxMutableNode | string)[] {\n return Array.isArray(node?.children) ? node.children : [];\n}\n\n/**\n * Normalize a document in place to the canonical array-member form: a legacy whole-children\n * repeater (`children: { $prototype: \"Array\", … }`) becomes a single member of a children array\n * (`children: [{ $prototype: \"Array\", … }]`). Recurses through children, repeater templates, and\n * `$switch` cases. Runs once when a document is loaded into a tab so every in-studio doc — and its\n * history checkpoints — uses the member form before any mutation.\n *\n * @param {unknown} node\n * @returns {unknown} The same node (mutated)\n */\nexport function normalizeArrayChildren(node: unknown): unknown {\n if (!node || typeof node !== \"object\") {\n return node;\n }\n if (Array.isArray(node)) {\n for (const child of node) {\n normalizeArrayChildren(child);\n }\n return node;\n }\n const n = node as JxMutableNode;\n const { children } = n;\n if (\n children &&\n typeof children === \"object\" &&\n !Array.isArray(children) &&\n (children as JxMutableNode).$prototype === \"Array\"\n ) {\n n.children = [children as JxMutableNode];\n }\n if (Array.isArray(n.children)) {\n for (const child of n.children) {\n normalizeArrayChildren(child);\n }\n }\n if (n.$prototype === \"Array\" && n.map && typeof n.map === \"object\") {\n normalizeArrayChildren(n.map);\n }\n if (n.cases && typeof n.cases === \"object\") {\n for (const caseDef of Object.values(n.cases)) {\n normalizeArrayChildren(caseDef);\n }\n }\n return node;\n}\n\n/**\n * Return the path to the parent element (strips trailing 'children' + index).\n *\n * @param {JxPath} path\n * @returns {JxPath | null}\n */\nexport function parentElementPath(path: JxPath) {\n return path.length >= 2 ? path.slice(0, -2) : null;\n}\n\n/**\n * Return the child index (last segment of the path).\n *\n * @param {JxPath} path\n * @returns {string | number}\n */\nexport function childIndex(path: JxPath) {\n return path.at(-1);\n}\n\n/**\n * Serialize a path to a string key for Map lookups.\n *\n * @param {JxPath} path\n * @returns {string}\n */\nexport function pathKey(path: JxPath) {\n return path.join(\"/\");\n}\n\n/**\n * Compare two paths for equality.\n *\n * @param {JxPath | null} a\n * @param {JxPath | null} b\n * @returns {boolean}\n */\nexport function pathsEqual(a: JxPath | null, b: JxPath | null) {\n if (a === b) {\n return true;\n }\n if (!a || !b || a.length !== b.length) {\n return false;\n }\n return a.every((v, i) => v === b[i]);\n}\n\n/**\n * Returns true if `path` is an ancestor of (or equal to) `descendant`.\n *\n * @param {JxPath} path\n * @param {JxPath} descendant\n * @returns {boolean}\n */\nexport function isAncestor(path: JxPath, descendant: JxPath) {\n if (path.length > descendant.length) {\n return false;\n }\n return path.every((v, i) => v === descendant[i]);\n}\n\n// ─── Tree flattening (for layer panel) ────────────────────────────────────────\n\n/**\n * Flatten a Jx document into an array of { node, path, depth, nodeType } rows. Walks static\n * children arrays, $map templates, and $switch cases.\n *\n * NodeType: 'element' (default) | 'map' | 'case' | 'case-ref'\n *\n * @param {JxMutableNode | string | number | boolean} doc\n * @param {JxPath} [path]\n * @param {number} [depth]\n * @returns {{\n * node: JxMutableNode | string | number | boolean;\n * path: JxPath;\n * depth: number;\n * nodeType: string;\n * }[]}\n */\nexport interface FlatRow {\n node: JxMutableNode | string | number | boolean;\n path: JxPath;\n depth: number;\n nodeType: string;\n}\n\nexport function flattenTree(\n doc: JxMutableNode | string | number | boolean,\n path: JxPath = [],\n depth = 0,\n): FlatRow[] {\n const rows: FlatRow[] = [];\n collectRows(doc, path, depth, rows, false);\n return rows;\n}\n\n/**\n * Pre-order walk that appends into `out`.\n *\n * Appending beats returning-and-spreading: `rows.push(...flattenTree(child))` copied every\n * descendant row once per ancestor level (O(n·depth) copies) and passed the whole subtree as\n * argument list, which throws `RangeError: too many arguments` on a large enough tree.\n *\n * `skipSelf` omits the node's own row and emits only its descendants — the `$switch` case branch\n * needs that, having already emitted a `case` row with its own nodeType.\n */\nfunction collectRows(\n doc: JxMutableNode | string | number | boolean,\n path: JxPath,\n depth: number,\n out: FlatRow[],\n skipSelf: boolean,\n): void {\n // Text node children: bare primitives get a \"text\" row\n if (typeof doc === \"string\" || typeof doc === \"number\" || typeof doc === \"boolean\") {\n if (!skipSelf) {\n out.push({ depth, node: doc, nodeType: \"text\", path });\n }\n return;\n }\n\n // Array pseudo-element (repeater): a first-class node at its own path. Emit the \"map\" row, then\n // Recurse into its single template at `[...path, \"map\"]`. This is reached both when the array is\n // A member of a children array (path `[…, \"children\", i]`) and the legacy whole-children form\n // (path `[…, \"children\"]`).\n if ((doc as JxMutableNode).$prototype === \"Array\") {\n if (!skipSelf) {\n out.push({ depth, node: doc, nodeType: \"map\", path });\n }\n const mapDef = (doc as JxMutableNode).map;\n if (mapDef && typeof mapDef === \"object\") {\n collectRows(mapDef as JxMutableNode, [...path, \"map\"], depth + 1, out, false);\n }\n return;\n }\n\n if (!skipSelf) {\n out.push({ depth, node: doc, nodeType: \"element\", path });\n }\n\n // Custom component instances without user-authored children are atomic in the layer tree\n if (doc.$props && displayTagName(doc.tagName).includes(\"-\") && !Array.isArray(doc.children)) {\n return;\n }\n\n const { children } = doc;\n\n if (Array.isArray(children)) {\n for (let i = 0; i < children.length; i++) {\n const childPath = [...path, \"children\", i];\n collectRows(children[i]!, childPath, depth + 1, out, false);\n }\n } else if (\n children &&\n typeof children === \"object\" &&\n (children as JxMutableNode).$prototype === \"Array\"\n ) {\n // Legacy whole-children repeater: the array occupies the children slot itself.\n collectRows(children as JxMutableNode, [...path, \"children\"], depth + 1, out, false);\n }\n\n // $switch — emit each case as a virtual child\n if (doc.$switch && doc.cases && typeof doc.cases === \"object\") {\n for (const [caseName, caseDef] of Object.entries(doc.cases)) {\n const casePath = [...path, \"cases\", caseName];\n if (caseDef && typeof caseDef === \"object\" && (caseDef as JxMutableNode).$ref) {\n out.push({\n depth: depth + 1,\n node: caseDef as JxMutableNode,\n nodeType: \"case-ref\",\n path: casePath,\n });\n } else if (caseDef && typeof caseDef === \"object\") {\n out.push({\n depth: depth + 1,\n node: caseDef as JxMutableNode,\n nodeType: \"case\",\n path: casePath,\n });\n // Recurse into case children — skipSelf, because the \"case\" row above already stands in for\n // The case node itself (with its own nodeType).\n collectRows(caseDef as JxMutableNode, casePath, depth + 2, out, true);\n }\n }\n }\n}\n\n/**\n * Get a display label for a node (for layers + overlays).\n *\n * @param {JxMutableNode | null} node\n * @returns {string}\n */\nexport function nodeLabel(node: JxMutableNode | null) {\n if (!node) {\n return \"?\";\n }\n // $map container (Repeater)\n if (node.$prototype === \"Array\") {\n const { items } = node;\n const ref = (isRef(items) ? items.$ref : undefined) || \"items\";\n return `Repeater → ${ref}`;\n }\n if (node.$title) {\n return node.$title;\n }\n if (node.$id) {\n return node.$id;\n }\n if (node.tagName === \"slot\") {\n const name = node.attributes?.name;\n return typeof name === \"string\" && name.trim() ? `slot: ${name.trim()}` : \"slot\";\n }\n /* `displayTagName`, because a tag may be CHOSEN rather than written: this label reached the\n Outline row, the Inspector's header and the jump bar, and a raw read rendered `[object Object]`\n in all three. `a|div` is the honest answer — one element, tag decided at creation. */\n const tag = displayTagName(node.tagName) || \"div\";\n const suffix = node.$switch ? \" ⇆\" : \"\";\n if (typeof node.textContent === \"string\" && node.textContent.length > 0) {\n return `${tag} — ${node.textContent.slice(0, 24)}${suffix}`;\n }\n return tag + suffix;\n}\n\n// ─── Project state (persists across document switches) ────────────────────────\n//\n// Shape: { root, name, projectRoot, isSiteProject, projectConfig,\n// Dirs: Map<string, DirEntry[]>, expanded: Set<string>,\n// SelectedPath: string|null, searchQuery: string }\n// DirEntry: { name, path, type: \"file\"|\"directory\", size, modified }\n\nexport let projectState: ProjectState | null = null;\n\n/** @param {ProjectState | null} ps */\nexport function setProjectState(ps: ProjectState | null) {\n projectState = ps;\n}\n\n/**\n * Return the current project state, asserting it is non-null. Only call when a project is known to\n * be loaded.\n *\n * @returns {ProjectState}\n */\nexport function requireProjectState() {\n return projectState as ProjectState;\n}\n",
|
|
8
|
+
"/**\n * Strip `on*` event-handler bindings from a Jx document tree (returns a shallow-rebuilt copy). Used\n * to neutralize handlers before edit/design rendering so the canvas never wires live behavior, and\n * to drop `timing: \"server\"` state entries the canvas can't run.\n *\n * Lives in its own dependency-light module (it pulls only the pure `@jxsuite/schema/guards`\n * predicate) so the slim canvas-iframe subtree renderer can import it without dragging in the\n * editor's reactive `store.ts`; `store.ts` re-exports it for the legacy in-realm patcher.\n */\n\nimport { isEventBinding } from \"@jxsuite/schema/guards\";\nimport type { JxMutableNode } from \"@jxsuite/schema/types\";\n\n/** Strip all `on*` event-handler properties (and server-timed state) from a document tree. */\nexport function stripEventHandlers(node: JxMutableNode): JxMutableNode {\n if (!node || typeof node !== \"object\") {\n return node;\n }\n if (Array.isArray(node)) {\n // Arrays of nodes round-trip element-wise; the array itself is not a node.\n return node.map((n: JxMutableNode) => stripEventHandlers(n)) as unknown as JxMutableNode;\n }\n const out: Record<string, unknown> = {};\n for (const [k, v] of Object.entries(node)) {\n if (k.startsWith(\"on\") && isEventBinding(v)) {\n continue;\n }\n if (k === \"children\") {\n out.children = Array.isArray(v)\n ? v.map((c: JxMutableNode) => stripEventHandlers(c))\n : stripEventHandlers(v as JxMutableNode);\n } else if (k === \"cases\" && typeof v === \"object\") {\n const cases: Record<string, unknown> = {};\n for (const [ck, cv] of Object.entries(v as Record<string, unknown>)) {\n cases[ck] = stripEventHandlers(cv as JxMutableNode);\n }\n out.cases = cases;\n } else if (k === \"state\" && typeof v === \"object\" && v !== null) {\n const state: Record<string, unknown> = {};\n for (const [sk, sv] of Object.entries(v as Record<string, unknown>)) {\n if (sv && typeof sv === \"object\" && (sv as Record<string, unknown>).timing === \"server\") {\n continue;\n }\n state[sk] = sv;\n }\n out.state = state;\n } else if (k === \"style\" || k === \"attributes\" || k === \"$media\") {\n out[k] = v;\n } else {\n out[k] = v;\n }\n }\n return out;\n}\n",
|
|
9
|
+
"/// <reference lib=\"dom\" />\n/**\n * Store.js — Shared state hub for Jx Studio\n *\n * Every other studio module imports from this file for shared state, DOM refs, render\n * orchestration, and state.js re-exports. This prevents circular dependencies by keeping store.js\n * free of domain-specific imports.\n */\n\n// ─── Re-exports from state.js ────────────────────────────────────────────────\n\nimport { INPUT_DEBOUNCE } from \"./ui/timing\";\nimport type { JxPath } from \"./state\";\nimport type { Tab } from \"./tabs/tab\";\nimport type { JxMutableNode } from \"@jxsuite/schema/types\";\n\nexport {\n getNodeAtPath,\n childList,\n flattenTree,\n nodeLabel,\n pathKey,\n pathsEqual,\n parentElementPath,\n childIndex,\n isAncestor,\n projectState,\n setProjectState,\n requireProjectState,\n} from \"./state\";\n\n// ─── Shell element refs (populated by initShellRefs) ─────────────────────────\n\n/* There is no `canvasWrap` here, and there cannot be one.\n It was `#canvas-wrap`, the shell's single stage, imported by six modules and read at ~30 sites —\n each of which meant \"the pane I am acting on\" and got \"the pane that happens to be focused\". A\n stage belongs to a pane (`canvas/canvas-surface.ts`), a pane's cell is built by\n `panels/pane-grid.ts`, and every one of those readers now takes its surface. */\nexport let activityBar = null as unknown as HTMLElement;\nexport let leftPanel = null as unknown as HTMLElement;\nexport let rightPanel = null as unknown as HTMLElement;\nexport let toolbarEl = null as unknown as HTMLElement;\nexport let statusbarEl = null as unknown as HTMLElement;\n\nexport function initShellRefs() {\n activityBar = document.querySelector(\"#activity-bar\") as HTMLElement;\n leftPanel = document.querySelector(\"#left-panel\") as HTMLElement;\n rightPanel = document.querySelector(\"#right-panel\") as HTMLElement;\n toolbarEl = document.querySelector(\"#toolbar\") as HTMLElement;\n statusbarEl = document.querySelector(\"#statusbar\") as HTMLElement;\n}\n\n// ─── Shared constants ────────────────────────────────────────────────────────\n\n/** Void elements that cannot accept children */\nexport const VOID_ELEMENTS = new Set([\n \"area\",\n \"base\",\n \"br\",\n \"col\",\n \"embed\",\n \"hr\",\n \"img\",\n \"input\",\n \"link\",\n \"meta\",\n \"param\",\n \"source\",\n \"track\",\n \"wbr\",\n]);\n\nexport const COMMON_SELECTORS = [\n \":hover\",\n \":focus\",\n \":active\",\n \":focus-within\",\n \":focus-visible\",\n \":disabled\",\n \":first-child\",\n \":last-child\",\n \"::before\",\n \"::after\",\n \"::placeholder\",\n];\n\n/** @param {string} k */\nexport function isNestedSelector(k: string) {\n return k.startsWith(\":\") || k.startsWith(\".\") || k.startsWith(\"&\") || k.startsWith(\"[\");\n}\n\n// ─── Shared utilities ────────────────────────────────────────────────────────\n\nconst _styleDebounceTimers = new Map<string, ReturnType<typeof setTimeout>>();\n\n/**\n * @param {string} prop\n * @param {number | undefined} ms Debounce delay; `undefined` takes the standard input debounce.\n * @param {(...args: unknown[]) => void} fn\n */\nexport function debouncedStyleCommit<A extends unknown[]>(\n prop: string,\n ms: number | undefined,\n fn: (...args: A) => void,\n) {\n const delay = ms ?? INPUT_DEBOUNCE;\n return (...args: A) => {\n clearTimeout(_styleDebounceTimers.get(prop));\n _styleDebounceTimers.set(\n prop,\n setTimeout(() => {\n _styleDebounceTimers.delete(prop);\n fn(...args);\n }, delay),\n );\n };\n}\n\n/** Cancel a pending debounced commit for the given prop key. */\nexport function cancelStyleDebounce(prop: string) {\n clearTimeout(_styleDebounceTimers.get(prop));\n _styleDebounceTimers.delete(prop);\n}\n\n// `stripEventHandlers` moved to ./utils/strip-events (dependency-light, shared with the iframe\n// Subtree renderer); re-exported here so existing `from \"../store\"` imports keep working.\nexport { stripEventHandlers } from \"./utils/strip-events\";\n\n// ─── Render orchestration ────────────────────────────────────────────────────\n\nconst _renderers = new Map<string, () => void>();\n\n/**\n * How many registered renderers are mid-paint right now.\n *\n * Condition 1 of the `probe.idle()` predicate (`services/idle.ts`, spec §13.5). A renderer is\n * declared `() => void`, but TypeScript happily assigns an `async` function to that type, so a\n * renderer that awaits keeps repainting long after `render()` returned. Counting the returned\n * thenable is what makes \"no queued lit render\" an answerable question instead of an assumption —\n * the alternative is a sleep, and a sleep cannot name what it is waiting for.\n */\nlet _rendersInFlight = 0;\n\n/** Renderers currently mid-paint — zero when the shell's DOM has caught up with its state. */\nexport function rendersInFlight(): number {\n return _rendersInFlight;\n}\n\n/** Run one renderer, counting it as in-flight until it returns (or its promise settles). */\nfunction runRenderer(name: string, fn: () => void) {\n _rendersInFlight += 1;\n const done = () => {\n _rendersInFlight -= 1;\n };\n let pending: PromiseLike<unknown> | null = null;\n try {\n const result = fn() as unknown;\n if (typeof (result as PromiseLike<unknown> | null)?.then === \"function\") {\n pending = result as PromiseLike<unknown>;\n }\n } catch (error) {\n console.error(`Renderer \"${name}\" failed:`, error);\n }\n if (!pending) {\n done();\n return;\n }\n pending.then(done, (error: unknown) => {\n console.error(`Renderer \"${name}\" failed:`, error);\n done();\n });\n}\n\n/**\n * Register a named renderer. Called at module import time by each module.\n *\n * @param {string} name\n * @param {() => void} fn\n */\nexport function registerRenderer(name: string, fn: () => void) {\n _renderers.set(name, fn);\n}\n\n/** Call all registered renderers (full repaint). */\nexport function render() {\n for (const [name, fn] of _renderers.entries()) {\n runRenderer(name, fn);\n }\n}\n\n/**\n * Call specific renderers by name.\n *\n * @param {...string} names\n */\nexport function renderOnly(...names: string[]) {\n for (const name of names) {\n const fn = _renderers.get(name);\n if (!fn) {\n continue;\n }\n runRenderer(name, fn);\n }\n}\n\n// ─── Session dispatch ──────────────────────────────────────────────────────\n\n/* **Every dispatcher below takes the tab it writes, and none of them can find one on its own.**\n All three used to open with `const tab = activeTab.value`, which made \"the document this\n control is about\" and \"the document the keyboard happens to be in\" the same expression — the\n defect that produced the Document Header card writing through focus, the zoom axis writing\n through focus, the debounced Monaco commit writing through focus, and the whole pane context\n bar writing through focus. Four instances, four audits, no gate: while the shell had one stage\n the two readings could not disagree, so nothing could observe the difference.\n\n `store.ts` is where they could not disagree, so `store.ts` is where the shape is fixed. There is\n no `activeTab` import in this file and no zero-argument variant of any of these: a caller that\n means the focused pane spells `activeTab.value` at its own call site, where a reviewer and\n `scripts/check-pane-singletons.ts` can both see it, and a caller drawn FOR a pane passes the tab\n it was drawn for. */\n\n/**\n * Dispatch a session-only state update (selection, hover, ui) into `tab`.\n *\n * @param {Tab | null} tab — the tab this update is about. `null` is a no-op.\n * @param {object} patch — partial session object, e.g. { ui: { zoom: 2 } }\n */\nexport function updateSession(\n tab: Tab | null,\n patch: {\n /** The whole selection SET — `[]` clears it. Widened with `session.selection` itself (§6.5). */\n selection?: JxPath[];\n hover?: JxPath | null;\n clipboard?: JxMutableNode | null;\n ui?: Record<string, unknown>;\n canvas?: Record<string, unknown>;\n },\n) {\n if (tab) {\n if (patch.selection !== undefined) {\n tab.session.selection = patch.selection;\n }\n if (patch.hover !== undefined) {\n tab.session.hover = patch.hover as JxPath | null;\n }\n if (patch.clipboard !== undefined) {\n tab.session.clipboard = patch.clipboard!;\n }\n if (patch.ui) {\n for (const [k, v] of Object.entries(patch.ui)) {\n (tab.session.ui as unknown as Record<string, unknown>)[k] = v;\n }\n }\n if (patch.canvas) {\n for (const [k, v] of Object.entries(patch.canvas)) {\n (tab.session.canvas as unknown as Record<string, unknown>)[k] = v;\n }\n }\n }\n}\n\n/**\n * Update a single UI field on `tab`.\n *\n * @param {Tab | null} tab — the tab this field belongs to. `null` is a no-op.\n * @param {string} field\n * @param {unknown} value\n */\nexport function updateUi(tab: Tab | null, field: string, value: unknown) {\n if (tab) {\n (tab.session.ui as unknown as Record<string, unknown>)[field] = value;\n }\n}\n\n/**\n * Update `tab`'s canvas async state (status, scope, error).\n *\n * @param {Tab | null} tab — the tab whose stage produced this state. `null` is a no-op.\n * @param {object} patch\n */\nexport function updateCanvas(tab: Tab | null, patch: Record<string, unknown>) {\n if (tab) {\n for (const [k, v] of Object.entries(patch)) {\n (tab.session.canvas as Record<string, unknown>)[k] = v;\n }\n }\n}\n"
|
|
10
|
+
],
|
|
11
|
+
"mappings": ";AA8BO,SAAS,YAAY,CAAC,OAAqC;AAAA,EAChE,OAAO,OAAO,UAAU,YAAY,UAAU,QAAQ,CAAC,MAAM,QAAQ,KAAK;AAAA;AAMrE,SAAS,KAAK,CAAC,OAAgC;AAAA,EACpD,OAAO,aAAa,KAAK,KAAK,OAAO,MAAM,SAAS;AAAA;AAM/C,SAAS,aAAa,CAAC,OAAwC;AAAA,EACpE,OAAO,aAAa,KAAK,KAAK,MAAM,eAAe;AAAA;AAI9C,SAAS,eAAe,CAAC,OAA0C;AAAA,EACxE,OAAO,aAAa,KAAK,KAAK,aAAa,MAAM,WAAW;AAAA;AAOvD,SAAS,iBAAiB,CAC/B,OACsD;AAAA,EACtD,OAAO,gBAAgB,KAAK,KAAK,MAAM,QAAQ,MAAM,UAAU,KA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