@jxsuite/studio 6.1.0 → 6.1.2
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/dist/chunks/2020-f2gkpy8d.js +4 -0
- package/dist/chunks/{action-group-2mqby73c.js → action-group-4aan7g6g.js} +3 -3
- package/dist/chunks/adapter-4912g339.js +4 -0
- package/dist/chunks/cf-account-picker-wccaenh6.js +4 -0
- package/dist/chunks/cf-settings-br6105tr.js +4 -0
- package/dist/chunks/color-28ksk2qm.js +4 -0
- package/dist/chunks/color-area-0fj8a4ga.js +4 -0
- package/dist/chunks/color-field-xch8kx2g.js +4 -0
- package/dist/chunks/color-slider-jxd8v350.js +4 -0
- package/dist/chunks/combobox-p0efwjke.js +4 -0
- package/dist/chunks/components-db68vsn7.js +4 -0
- package/dist/chunks/content-source-1449qesq.js +4 -0
- package/dist/chunks/convert-to-repeater-5h457egj.js +4 -0
- package/dist/chunks/dialog-c4x05vyx.js +4 -0
- package/dist/chunks/editor-x9jn86a7.js +4 -0
- package/dist/chunks/entry-commands-may24cpt.js +4 -0
- package/dist/chunks/extension-sections-pvr14vxr.js +4 -0
- package/dist/chunks/file-ops-x9v54pcj.js +4 -0
- package/dist/chunks/files-j3knqf0s.js +4 -0
- package/dist/chunks/format-host-tyre2trb.js +4 -0
- package/dist/chunks/fs-events-64ma9htc.js +4 -0
- package/dist/chunks/git-panel-84ps5dex.js +4 -0
- package/dist/chunks/grid-view-d2wq9ezg.js +51 -0
- package/dist/chunks/icons-pnfz478q.js +4 -0
- package/dist/chunks/iframe-entry-fvbk89gm.js +5 -0
- package/dist/chunks/iframe-entry-jdcktez8.js +5 -0
- package/dist/chunks/iframe-entry-x0ygf2yr.js +5 -0
- package/dist/chunks/iframe-entry-zap785cw.js +5 -0
- package/dist/chunks/iframe-host-ck6vejt5.js +4 -0
- package/dist/chunks/index-b8xw3vy9.js +4 -0
- package/dist/chunks/{index-gybvv7a6.js → index-zpjmzqfk.js} +3 -3
- package/dist/chunks/{javascript-rnvdp3k4.js → javascript-m54mnwp6.js} +3 -3
- package/dist/chunks/jsonMode-w15cmrcm.js +13 -0
- package/dist/chunks/jx-validate-at3zn8wa.js +4 -0
- package/dist/chunks/layers-h4xp1pss.js +4 -0
- package/dist/chunks/layers-panel-m5hw1d7g.js +4 -0
- package/dist/chunks/listbox-e74qjyq6.js +4 -0
- package/dist/chunks/lit-html-8t8t3dnr.js +4 -0
- package/dist/chunks/media-picker-2cweexc5.js +4 -0
- package/dist/chunks/menu-n6yzswmy.js +4 -0
- package/dist/chunks/menu-ynw13y0s.js +4 -0
- package/dist/chunks/monaco-binding-7gx83x3r.js +4 -0
- package/dist/chunks/monaco-buffer-qzxn567r.js +4 -0
- package/dist/chunks/monaco-setup-gxf6656g.js +4 -0
- package/dist/chunks/notify-cj5zbrs2.js +4 -0
- package/dist/chunks/number-field-y62xq0ty.js +4 -0
- package/dist/chunks/parse-b7ddhr8m.js +4 -0
- package/dist/chunks/platform-3dfws9js.js +4 -0
- package/dist/chunks/popover-jt2gxmzs.js +4 -0
- package/dist/chunks/publish-panel-1gvxbj21.js +4 -0
- package/dist/chunks/quick-search-0dajrwqg.js +4 -0
- package/dist/chunks/references-49qgt404.js +4 -0
- package/dist/chunks/right-panel-jm1bwe53.js +4 -0
- package/dist/chunks/section-registry-6kwc4fky.js +4 -0
- package/dist/chunks/select-rzds841e.js +4 -0
- package/dist/chunks/split-n2gfpm5m.js +4 -0
- package/dist/chunks/{studio-5g0ag7c0.js → studio-0q988f9w.js} +3 -3
- package/dist/chunks/studio-0rt52vpq.js +5 -0
- package/dist/chunks/studio-18vgbhs5.js +5 -0
- package/dist/chunks/{studio-pxg4ap1e.js → studio-1fxkaaea.js} +4 -4
- package/dist/chunks/studio-24mccdrj.js +5 -0
- package/dist/chunks/studio-2eh507zk.js +9 -0
- package/dist/chunks/studio-2hcbccfv.js +5 -0
- package/dist/chunks/studio-2j1cb95x.js +5 -0
- package/dist/chunks/studio-2jbs3rxv.js +5 -0
- package/dist/chunks/{studio-qbj760tx.js → studio-485046te.js} +7 -7
- package/dist/chunks/studio-4h8k4dw9.js +5 -0
- package/dist/chunks/studio-5f6n18kx.js +5 -0
- package/dist/chunks/studio-5gthpky6.js +5 -0
- package/dist/chunks/studio-5ve6bbep.js +5 -0
- package/dist/chunks/studio-6ep3js6b.js +9 -0
- package/dist/chunks/studio-6wkmf3wz.js +9 -0
- package/dist/chunks/studio-841rf3cg.js +5 -0
- package/dist/chunks/studio-8gmwgheg.js +5 -0
- package/dist/chunks/studio-8qm0ep50.js +5 -0
- package/dist/chunks/{studio-anyrgzvb.js → studio-90pq9km1.js} +4 -4
- package/dist/chunks/studio-924p1tm1.js +6 -0
- package/dist/chunks/{studio-v2bvmbjj.js → studio-a3g98wjr.js} +4 -4
- package/dist/chunks/studio-a3shpz9y.js +5 -0
- package/dist/chunks/studio-amsbaaar.js +6 -0
- package/dist/chunks/studio-at5spjbc.js +7 -0
- package/dist/chunks/studio-b2xv945e.js +5 -0
- package/dist/chunks/studio-bn5nkafw.js +5 -0
- package/dist/chunks/studio-bw6q5xjf.js +9 -0
- package/dist/chunks/studio-c7q0t9x1.js +5 -0
- package/dist/chunks/studio-camnhc96.js +6 -0
- package/dist/chunks/studio-cffqvnzd.js +5 -0
- package/dist/chunks/studio-d81xfh1g.js +5 -0
- package/dist/chunks/studio-dgz8d0c1.js +5 -0
- package/dist/chunks/studio-efvfrsf8.js +5 -0
- package/dist/chunks/studio-er30bpcx.js +5 -0
- package/dist/chunks/studio-ezscgr64.js +5 -0
- package/dist/chunks/studio-ffrrncvz.js +5 -0
- package/dist/chunks/studio-fpphgn8y.js +10 -0
- package/dist/chunks/studio-j1kvhdjk.js +4 -0
- package/dist/chunks/{studio-txjjzrsm.js → studio-j430n16g.js} +5 -5
- package/dist/chunks/studio-jjkg84nj.js +5 -0
- package/dist/chunks/studio-m0q32ars.js +4 -0
- package/dist/chunks/studio-m6bdst11.js +5 -0
- package/dist/chunks/studio-nv2cptd4.js +64 -0
- package/dist/chunks/studio-nwfrc98n.js +5 -0
- package/dist/chunks/studio-p1wgvp7r.js +5 -0
- package/dist/chunks/studio-pag2wncm.js +5 -0
- package/dist/chunks/studio-qvanvzfd.js +5 -0
- package/dist/chunks/studio-qwa64kt7.js +5 -0
- package/dist/chunks/studio-rk1zc4x3.js +928 -0
- package/dist/chunks/studio-se2r3ptc.js +5 -0
- package/dist/chunks/studio-sg2a0dh0.js +5 -0
- package/dist/chunks/studio-tjzjhe68.js +5 -0
- package/dist/chunks/{studio-0x3jyb8r.js → studio-tq0rtfwj.js} +4 -4
- package/dist/chunks/{studio-cpxkgjrj.js → studio-v0jzqdjm.js} +4 -4
- package/dist/chunks/studio-v2w7q8r1.js +7 -0
- package/dist/chunks/studio-v5vjq1h0.js +4 -0
- package/dist/chunks/studio-v8aga3vp.js +14 -0
- package/dist/chunks/studio-vfcdrfmv.js +5 -0
- package/dist/chunks/studio-vmfkgdjf.js +5 -0
- package/dist/chunks/studio-wt1816jj.js +5 -0
- package/dist/chunks/studio-wz73q5kq.js +4 -0
- package/dist/chunks/studio-y04qtxvp.js +7 -0
- package/dist/chunks/studio-y21g8zzg.js +5 -0
- package/dist/chunks/studio-y64hrt8p.js +12 -0
- package/dist/chunks/studio-ynn90f58.js +16 -0
- package/dist/chunks/studio-yxz682sx.js +5 -0
- package/dist/chunks/studio-zp7snvkq.js +5 -0
- package/dist/chunks/studio-zq4z6tm6.js +5 -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-c9fn075p.js +4 -0
- package/dist/chunks/toast-host-ke5z4ng7.js +4 -0
- package/dist/chunks/{toolbar-2nnzqhrj.js → toolbar-44cm5cta.js} +3 -3
- package/dist/chunks/tooltip-5v8ngwj2.js +4 -0
- package/dist/chunks/tree-mdq3v5cw.js +4 -0
- package/dist/chunks/tsMode-sf49ee9x.js +14 -0
- package/dist/chunks/workspace-jtfahpee.js +4 -0
- package/dist/chunks/ws-client-nze0k6mv.js +4 -0
- package/dist/iframe-entry.js +16 -16
- package/dist/manifest.json +63 -63
- package/dist/studio.js +98 -98
- package/dist/workers/ts.worker.js +3 -3
- package/package.json +11 -11
- 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/library-layouts.ts +8 -5
- package/src/browse/library-model.ts +18 -6
- package/src/browse/library-pane.ts +37 -21
- package/src/browse/library-preview.ts +14 -9
- package/src/browse/library-source.ts +1 -1
- package/src/canvas/asset-refs.ts +24 -9
- package/src/canvas/asset-resolve.ts +19 -23
- package/src/canvas/canvas-helpers.ts +7 -6
- package/src/canvas/canvas-live-render.ts +44 -53
- package/src/canvas/canvas-patcher.ts +30 -30
- package/src/canvas/canvas-perf.ts +11 -5
- package/src/canvas/canvas-render.ts +66 -42
- package/src/canvas/canvas-surface.ts +5 -3
- package/src/canvas/canvas-utils.ts +163 -64
- 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 +13 -12
- package/src/canvas/iframe-editable-root.ts +29 -16
- package/src/canvas/iframe-entry.ts +80 -63
- package/src/canvas/iframe-eval.ts +73 -49
- package/src/canvas/iframe-host.ts +203 -118
- package/src/canvas/iframe-inline-edit.ts +69 -32
- package/src/canvas/iframe-insert.ts +5 -4
- package/src/canvas/iframe-interaction.ts +37 -26
- package/src/canvas/iframe-overlay.ts +1 -1
- package/src/canvas/iframe-patch.ts +18 -15
- package/src/canvas/iframe-position.ts +12 -6
- package/src/canvas/iframe-protocol.ts +15 -16
- package/src/canvas/iframe-render.ts +41 -36
- package/src/canvas/iframe-slash.ts +24 -11
- package/src/canvas/iframe-subtree.ts +6 -2
- 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/serialize-scope.ts +13 -5
- package/src/canvas/stage-scrollbar.ts +2 -1
- package/src/canvas/surface-registry.ts +21 -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/budget.ts +3 -3
- package/src/commands/command-args.ts +103 -71
- package/src/commands/context.ts +22 -20
- package/src/commands/defaults.ts +4 -1
- package/src/commands/keymap.ts +47 -43
- package/src/commands/levels.ts +3 -3
- package/src/commands/live-context.ts +10 -8
- package/src/commands/reference.ts +2 -1
- package/src/commands/registry.ts +12 -10
- package/src/commands/run-reported.ts +15 -10
- package/src/component-props.ts +46 -30
- package/src/content/collection-match.ts +5 -4
- package/src/content/draft-state.ts +4 -3
- package/src/content/entry-commands.ts +3 -2
- package/src/content/entry-editor.ts +29 -17
- package/src/content/entry-fields.ts +12 -7
- package/src/content/entry-model.ts +21 -12
- 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 +11 -5
- package/src/editor/convert-to-repeater.ts +34 -22
- package/src/editor/editable-tags.ts +17 -2
- package/src/editor/file-drop-action.ts +21 -22
- package/src/editor/inline-edit-apply.ts +35 -17
- package/src/editor/inline-edit.ts +66 -50
- package/src/editor/inline-format.ts +59 -56
- package/src/editor/inline-link.ts +40 -15
- package/src/editor/insert-zone-action.ts +1 -1
- package/src/editor/merge-tags.ts +58 -19
- package/src/editor/repeater-scope.ts +39 -28
- package/src/editor/shortcuts.ts +87 -47
- package/src/editor/slash-menu.ts +1 -6
- package/src/files/asset-versions.ts +4 -4
- package/src/files/components.ts +15 -10
- package/src/files/elements.ts +5 -6
- package/src/files/file-ops.ts +77 -36
- package/src/files/files.ts +90 -95
- package/src/files/media-meta.ts +2 -1
- package/src/files/media-paths.ts +6 -1
- package/src/files/serialize-document.ts +2 -2
- 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 +76 -50
- package/src/github/github-auth-status.ts +27 -3
- package/src/github/github-auth.ts +19 -9
- package/src/github/github-publish.ts +24 -20
- 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 +20 -22
- package/src/grid/grid-layout.ts +21 -5
- package/src/grid/grid-open.ts +3 -6
- package/src/grid/grid-panel.ts +11 -4
- package/src/grid/grid-source.ts +8 -8
- package/src/grid/grid-view.ts +14 -17
- 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 +25 -24
- package/src/grid/sources/csv-file-source.ts +2 -2
- package/src/grid/tabulator-tables.d.ts +55 -34
- package/src/hosting/stage.ts +7 -7
- package/src/i18n/i18n-commands.ts +1 -2
- package/src/media/media-pane.ts +4 -1
- 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 +17 -9
- package/src/panels/ai-chat/attached-context.ts +13 -7
- 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 +46 -35
- package/src/panels/bottom-dock.ts +5 -3
- package/src/panels/canvas-dnd-bridge.ts +31 -24
- package/src/panels/data-explorer.ts +62 -25
- package/src/panels/data-grid.ts +14 -11
- package/src/panels/dnd.ts +108 -118
- package/src/panels/editors.ts +55 -22
- package/src/panels/elements-panel.ts +10 -3
- package/src/panels/events-panel.ts +84 -69
- package/src/panels/formula-workspace.ts +76 -51
- package/src/panels/frontmatter-fields.ts +24 -19
- package/src/panels/frontmatter-panel.ts +44 -34
- package/src/panels/git-diff-open.ts +4 -4
- package/src/panels/git-panel.ts +49 -61
- package/src/panels/head-panel.ts +131 -111
- package/src/panels/i18n-panel.ts +10 -3
- package/src/panels/imports-panel.ts +23 -47
- package/src/panels/jump-bar.ts +48 -29
- package/src/panels/layers-panel.ts +97 -74
- package/src/panels/left-panel.ts +3 -3
- package/src/panels/pane-context.ts +31 -22
- package/src/panels/pane-grid.ts +49 -20
- package/src/panels/panel-registry.ts +22 -37
- package/src/panels/properties-panel.ts +175 -121
- package/src/panels/quick-search.ts +53 -31
- package/src/panels/right-panel.ts +3 -3
- package/src/panels/seo-modal.ts +13 -17
- package/src/panels/settings-menu.ts +15 -15
- package/src/panels/signals-panel.ts +153 -131
- package/src/panels/statement-editor.ts +230 -140
- package/src/panels/style-panel.ts +254 -216
- package/src/panels/style-utils.ts +114 -51
- package/src/panels/stylebook-doc.ts +57 -54
- package/src/panels/stylebook-layers-panel.ts +9 -9
- package/src/panels/stylebook-panel.ts +13 -17
- package/src/panels/tab-drop.ts +27 -11
- package/src/panels/tab-strip.ts +36 -26
- package/src/platform-errors.ts +57 -43
- package/src/platform.ts +58 -30
- package/src/platforms/cloud.ts +345 -175
- package/src/platforms/default-platform.ts +10 -4
- package/src/platforms/devserver.ts +174 -127
- package/src/platforms/read-batcher.ts +16 -8
- package/src/project-list.ts +2 -1
- package/src/publish/deploy-checklist.ts +8 -2
- package/src/publish/pages-service.ts +28 -13
- package/src/publish/publish-commands.ts +5 -4
- package/src/publish/publish-panel.ts +10 -6
- 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 +58 -31
- package/src/services/cem-export.ts +149 -58
- package/src/services/clock.ts +6 -1
- package/src/services/code-services.ts +37 -31
- 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 +18 -12
- 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 +8 -7
- 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 +79 -60
- package/src/settings/css-vars-editor.ts +37 -16
- package/src/settings/defs-editor.ts +38 -35
- package/src/settings/extension-rows.ts +16 -8
- package/src/settings/extension-sections.ts +23 -13
- package/src/settings/extensions-section.ts +4 -1
- package/src/settings/general-settings.ts +11 -8
- package/src/settings/locales-section.ts +20 -12
- package/src/settings/preferences-dialog.ts +9 -6
- package/src/settings/preferences-keymap.ts +7 -5
- package/src/settings/preferences-sections.ts +11 -5
- package/src/settings/project-sections.ts +1 -1
- package/src/settings/schema-field-ui.ts +9 -0
- package/src/settings/settings-document.ts +5 -5
- package/src/shell/tree.ts +6 -5
- package/src/shell.ts +104 -81
- package/src/site-context.ts +37 -22
- package/src/state.ts +41 -49
- package/src/store.ts +54 -34
- package/src/studio.ts +39 -77
- package/src/style/live-preview.ts +1 -1
- package/src/style/project-styles.ts +6 -7
- package/src/style/token-ref.ts +5 -4
- package/src/surfaces/about.ts +18 -19
- package/src/surfaces/add-repo.ts +17 -19
- package/src/surfaces/ai-chat.ts +31 -36
- 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.ts +4 -5
- package/src/surfaces/bottom-dock.ts +9 -18
- package/src/surfaces/canvas-stage.ts +12 -11
- package/src/surfaces/cf-account-picker.ts +17 -18
- package/src/surfaces/commandbar.ts +14 -9
- 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/doc-header.ts +10 -19
- package/src/surfaces/empty-state.ts +7 -10
- package/src/surfaces/entry-editor.ts +14 -11
- 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/git-panel.ts +7 -15
- 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.ts +13 -12
- package/src/surfaces/jump-bar.ts +5 -6
- package/src/surfaces/jxsuite-update.ts +16 -22
- package/src/surfaces/library-pane.ts +25 -20
- package/src/surfaces/logic-panel.ts +17 -30
- package/src/surfaces/logic-workspace.ts +13 -15
- package/src/surfaces/media-browser.ts +11 -10
- package/src/surfaces/media-field.ts +4 -5
- package/src/surfaces/media-pane.ts +8 -7
- package/src/surfaces/menu.ts +29 -23
- package/src/surfaces/navigator-dock.ts +11 -12
- package/src/surfaces/new-project.ts +27 -26
- package/src/surfaces/pane-context.ts +20 -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.ts +5 -6
- 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.ts +11 -18
- package/src/surfaces/panel-problems.ts +5 -7
- package/src/surfaces/panel-signals.ts +20 -34
- package/src/surfaces/panel-stylebook-layers.ts +5 -8
- package/src/surfaces/preferences.ts +21 -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.ts +18 -18
- package/src/surfaces/push-plan.ts +7 -8
- package/src/surfaces/rail.json +126 -73
- package/src/surfaces/rail.ts +38 -12
- package/src/surfaces/reference-field.ts +11 -15
- package/src/surfaces/schema-builder.ts +16 -22
- package/src/surfaces/schema-form.ts +15 -25
- package/src/surfaces/secret-field.ts +9 -6
- package/src/surfaces/seo.ts +21 -15
- package/src/surfaces/settings-contexts.ts +9 -7
- package/src/surfaces/settings-contributed.ts +14 -10
- package/src/surfaces/settings-css-vars.ts +5 -12
- package/src/surfaces/settings-defs.json +2 -2
- package/src/surfaces/settings-defs.ts +17 -21
- package/src/surfaces/settings-deploy.ts +8 -15
- 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.ts +5 -6
- package/src/surfaces/settings-packages.ts +8 -7
- package/src/surfaces/settings-pane.ts +9 -18
- package/src/surfaces/settings-rawjson.ts +5 -6
- package/src/surfaces/shell.ts +1 -2
- package/src/surfaces/slash-menu.ts +19 -9
- package/src/surfaces/statements.ts +13 -18
- package/src/surfaces/statusbar.ts +17 -14
- package/src/surfaces/style-panel.ts +18 -31
- package/src/surfaces/stylebook-chrome.ts +3 -5
- package/src/surfaces/tab-strip.ts +14 -13
- package/src/surfaces/target-line.ts +6 -7
- package/src/surfaces/welcome.ts +5 -7
- 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 +52 -41
- package/src/tabs/transact.ts +98 -53
- package/src/tabs/typing.ts +31 -0
- package/src/types.ts +32 -17
- 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 +57 -48
- package/src/ui/formula-catalog.ts +239 -230
- package/src/ui/formula-chips.ts +33 -18
- package/src/ui/layers.ts +44 -31
- package/src/ui/media-picker.ts +18 -9
- package/src/ui/popover-surface.ts +20 -12
- package/src/ui/progress-modal.ts +13 -8
- package/src/ui/regions.ts +7 -6
- package/src/ui/schema-form.ts +113 -70
- 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 +3 -2
- package/src/utils/base64.ts +3 -1
- package/src/utils/edit-display.ts +103 -74
- 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/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 +10 -12
- package/src/workspace/session.ts +53 -43
- package/src/workspace/workspace.ts +47 -36
- package/dist/chunks/2020-nkxms0ay.js +0 -4
- package/dist/chunks/adapter-m948ab5f.js +0 -4
- package/dist/chunks/cf-account-picker-n8hr38v7.js +0 -4
- package/dist/chunks/cf-settings-356xdtne.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-yk3t844e.js +0 -4
- package/dist/chunks/content-source-bawmyc09.js +0 -4
- package/dist/chunks/convert-to-repeater-7wns8kf1.js +0 -4
- package/dist/chunks/dialog-mtm9fq5t.js +0 -4
- package/dist/chunks/editor-6sc8nacq.js +0 -4
- package/dist/chunks/entry-commands-8ay9fh81.js +0 -4
- package/dist/chunks/extension-sections-na7rj3nr.js +0 -4
- package/dist/chunks/file-ops-gye0qw56.js +0 -4
- package/dist/chunks/files-dmc2xvcq.js +0 -4
- package/dist/chunks/format-host-t76b53f8.js +0 -4
- package/dist/chunks/fs-events-cg4tpz06.js +0 -4
- package/dist/chunks/git-panel-yef7bshy.js +0 -4
- package/dist/chunks/grid-view-7tt4bxw1.js +0 -51
- package/dist/chunks/icons-qbh8akb1.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-tmz30gfp.js +0 -4
- package/dist/chunks/index-nag78a9h.js +0 -4
- package/dist/chunks/jsonMode-zhwsprqk.js +0 -13
- package/dist/chunks/jx-validate-3gbp5nkn.js +0 -4
- package/dist/chunks/layers-fvz99859.js +0 -4
- package/dist/chunks/layers-panel-gchmbf9p.js +0 -4
- package/dist/chunks/listbox-s8fkmnq8.js +0 -4
- package/dist/chunks/lit-html-9agdspkt.js +0 -4
- package/dist/chunks/media-picker-rhjvyy00.js +0 -4
- package/dist/chunks/menu-2e4y9j7b.js +0 -4
- package/dist/chunks/menu-37d07z9m.js +0 -4
- package/dist/chunks/monaco-binding-2jnhjjvr.js +0 -4
- package/dist/chunks/monaco-buffer-rp21359g.js +0 -4
- package/dist/chunks/monaco-setup-vhh7gayr.js +0 -4
- package/dist/chunks/notify-h3www560.js +0 -4
- package/dist/chunks/number-field-gw7sq8rn.js +0 -4
- package/dist/chunks/parse-897fvqah.js +0 -4
- package/dist/chunks/platform-hz34wcd7.js +0 -4
- package/dist/chunks/popover-8htra4er.js +0 -4
- package/dist/chunks/publish-panel-exsmjzyj.js +0 -4
- package/dist/chunks/quick-search-pgaqeh0m.js +0 -4
- package/dist/chunks/references-2cgdxnb8.js +0 -4
- package/dist/chunks/right-panel-jf856w5w.js +0 -4
- package/dist/chunks/section-registry-jnf8r5gy.js +0 -4
- package/dist/chunks/select-n3v7gwas.js +0 -4
- package/dist/chunks/split-pff8f3ze.js +0 -4
- package/dist/chunks/studio-0f55h9ye.js +0 -5
- package/dist/chunks/studio-0sqdhnew.js +0 -12
- package/dist/chunks/studio-19x1c75w.js +0 -5
- package/dist/chunks/studio-2sqcndak.js +0 -5
- package/dist/chunks/studio-3aey7dd3.js +0 -5
- package/dist/chunks/studio-3bpdkq2s.js +0 -5
- package/dist/chunks/studio-47y6fbpf.js +0 -5
- package/dist/chunks/studio-4m3826v2.js +0 -5
- package/dist/chunks/studio-4nx2dj1g.js +0 -4
- package/dist/chunks/studio-4xv5s47r.js +0 -9
- package/dist/chunks/studio-5g4t8v6w.js +0 -5
- package/dist/chunks/studio-5py436sf.js +0 -5
- package/dist/chunks/studio-77kt594t.js +0 -5
- package/dist/chunks/studio-8f87n763.js +0 -10
- package/dist/chunks/studio-8mb00b84.js +0 -5
- package/dist/chunks/studio-8p51gq2h.js +0 -6
- package/dist/chunks/studio-954ds834.js +0 -5
- package/dist/chunks/studio-9ft45c83.js +0 -9
- package/dist/chunks/studio-a2138x5k.js +0 -7
- package/dist/chunks/studio-a9yzstqj.js +0 -5
- package/dist/chunks/studio-acdksxx6.js +0 -5
- package/dist/chunks/studio-ar8jcf2y.js +0 -5
- package/dist/chunks/studio-bmn4mn9j.js +0 -7
- package/dist/chunks/studio-e7xxa0sj.js +0 -5
- package/dist/chunks/studio-ecaz25vk.js +0 -5
- package/dist/chunks/studio-ery42sqr.js +0 -4
- package/dist/chunks/studio-fzdywr6p.js +0 -9
- package/dist/chunks/studio-g5fmf0c1.js +0 -5
- package/dist/chunks/studio-g7nse7zb.js +0 -5
- package/dist/chunks/studio-geq1ea6k.js +0 -14
- package/dist/chunks/studio-ghkb32r8.js +0 -5
- package/dist/chunks/studio-ghrhy2y7.js +0 -5
- package/dist/chunks/studio-grawhey1.js +0 -5
- package/dist/chunks/studio-h0xgswew.js +0 -5
- package/dist/chunks/studio-h9c4p2tx.js +0 -5
- package/dist/chunks/studio-jyzj5cxs.js +0 -5
- package/dist/chunks/studio-mgx8yhnz.js +0 -64
- package/dist/chunks/studio-mpb04y1d.js +0 -6
- package/dist/chunks/studio-n17mty64.js +0 -5
- package/dist/chunks/studio-nwh2eqsk.js +0 -6
- package/dist/chunks/studio-q1h883bt.js +0 -16
- package/dist/chunks/studio-q4tv82h7.js +0 -9
- package/dist/chunks/studio-qpqa7vk3.js +0 -5
- package/dist/chunks/studio-qqz8e5gk.js +0 -5
- package/dist/chunks/studio-qvasen3f.js +0 -5
- package/dist/chunks/studio-rggdb3hm.js +0 -5
- package/dist/chunks/studio-sghy936h.js +0 -4
- package/dist/chunks/studio-skprc6ef.js +0 -5
- package/dist/chunks/studio-tt2nactf.js +0 -5
- package/dist/chunks/studio-tyasmc39.js +0 -5
- package/dist/chunks/studio-vk9ezads.js +0 -5
- package/dist/chunks/studio-vzacdfsc.js +0 -4
- package/dist/chunks/studio-w4c0xmrw.js +0 -5
- package/dist/chunks/studio-wfjqhhbk.js +0 -5
- package/dist/chunks/studio-wgh5kxpj.js +0 -5
- package/dist/chunks/studio-xasj0796.js +0 -5
- package/dist/chunks/studio-y78s8r2n.js +0 -5
- package/dist/chunks/studio-z8w183sh.js +0 -5
- package/dist/chunks/studio-zscd9ty4.js +0 -928
- package/dist/chunks/studio-zxp13sss.js +0 -7
- package/dist/chunks/studio-zygnmm01.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-gr0m4dzr.js +0 -14
- package/dist/chunks/workspace-m15qtcqp.js +0 -4
- package/dist/chunks/ws-client-nf61frr1.js +0 -4
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import{ge,Q,v}from"./studio-vzacdfsc.js";import{Le,gp,q,Ue,Sc,jL,bv,HL,vv,BL,Bs,VL,UL,qL,ot,Cv,Ox,Nd,_m,kv,u}from"./studio-3aey7dd3.js";import{Gs,ne}from"./studio-geq1ea6k.js";import{El,Mf,Cu,sw,Zh,aw,nE,Xh,Pf,Tl,ku,Zg,ld,lw,cw,dw,q_,Qh,G_,Fa,Xg,K_,uw,Z_}from"./studio-mpb04y1d.js";import{mI,bI,T,R,Nn}from"./studio-e7xxa0sj.js";import{yo,Pw,hd,I1,pc,Su,Eu,pd,fd,fc}from"./studio-n17mty64.js";import{bi,Mu,hr,lx}from"./studio-47y6fbpf.js";import{Nt}from"./studio-pxg4ap1e.js";import{Di,qo,Gb,wx,y}from"./studio-q1h883bt.js";import{wc,js,im}from"./studio-19x1c75w.js";import{xu,tw}from"./studio-4xv5s47r.js";import{K,Zo,ak,ck,Bx,Lv,lI,Ai,Gr}from"./studio-wgh5kxpj.js";import{Ae}from"./studio-2sqcndak.js";import{nt,Ot,Xa,ba,va,Mp,qe}from"./studio-8mb00b84.js";var Pe={$schema:"https://jxsuite.com/schema/v1",$id:"StudioLogicPanel",$description:"The Inspector's **Logic** tab — everything about how the selected element BEHAVES, as a Jx document over the kit. The Inspector is split by task rather than by data type (§6): wiring a `$switch`, wiring a repeater to a collection and wiring a click handler are one job, and they were three, split across two tabs because a `$switch` is stored as a property and a click handler as a property-shaped function. So there are four sections here — Repeating list, Condition, Events, and a custom element's outward contract (Observed Attributes · CSS Properties · CSS Parts) — and each of them is a projection. The adapter (`panels/events-panel.ts`) keeps every decision: what the selection is, which rungs a position permits, what a handler currently holds, which elements of a multi-selection disagree about a key, and what a commit writes. Nothing here reads the document, asks the schema a question or knows what a Value Source is. Two islands, both through `onNodeCreated` (studio-ui-guidelines.md §9.4): `[part=\"control-host\"]` receives the expression editor, which is a lit surface of its own, and `[part=\"statements-host\"]` receives the `statements` surface, which is a mounted document of its own. Every bindable row carries `data-prop`, which is what `inspector/field:<prop>` addresses.",tagName:"div",attributes:{part:"logic"},style:{$description:"The tab's own layout, and nothing else. `.style-sidebar` and `.style-section-body` are NOT transcribed: the first was a scroll container the dock already provides, and the second existed to put padding inside a Spectrum accordion item, which `jx-accordion-item` does itself. What is left is the two vocabularies this tab has that no other surface does — a declared event, and an event binding — plus the one empty state a document cannot borrow from `panels/empty-state.ts`.",display:"block",minWidth:"0",fontFamily:"var(--jx-font-sans)",fontSize:"var(--jx-text-md)",color:"var(--fg)",'& [part="empty"]':{$description:"The one empty-state pattern (studio-ui-guidelines.md §11.2), drawn here because a document cannot render a lit helper. It is a copy rather than a move — every panel still lit renders through that helper — and it goes when the last of them converts.",display:"flex",flexDirection:"column",alignItems:"center",gap:"var(--jx-space-3)",padding:"var(--jx-space-6)",textAlign:"center",fontSize:"var(--jx-text-md)",color:"var(--fg-dim)"},'& [part="empty-message"]':{margin:"0",maxWidth:"34ch",lineHeight:"1.5"},'& [part="section-body"]':{display:"flex",flexDirection:"column",gap:"var(--jx-space-2)",minWidth:"0"},'& [part="field"]':{minWidth:"0"},'& [part="field"] > [part="label"]:empty':{$description:"A row whose control names itself — an expression editor draws its own Operator / Target / Value rows — has no second label to draw. `jx-field` takes the empty label out of the accessible name by leaving it empty; this takes it out of the layout.",display:"none"},'& [part="value"]':{display:"flex",alignItems:"center",gap:"var(--jx-space-2)",minWidth:"0"},'& [part="widget"]':{flex:"1 1 auto",minWidth:"0"},'& [part="control-host"]':{display:"block",minWidth:"0"},'& [part="subhead"]':{margin:"var(--jx-space-2) 0 0",fontSize:"var(--jx-text-sm)",fontWeight:"600",color:"var(--fg-dim)"},'& [part="case"]':{display:"flex",alignItems:"center",gap:"var(--jx-space-2)",minWidth:"0"},'& [part="case-name"]':{flex:"1 1 auto",minWidth:"0"},'& [part="declared"]':{display:"flex",flexDirection:"column",gap:"var(--jx-space-1)",minWidth:"0"},'& [part="declared-row"]':{display:"flex",alignItems:"baseline",gap:"var(--jx-space-2)",minWidth:"0",fontSize:"var(--jx-text-sm)"},'& [part="event-code"]':{fontFamily:"var(--font-mono, monospace)",color:"var(--accent)"},'& [part="declared-from"]':{color:"var(--fg-dim)"},'& [part="event-type"]':{marginInlineStart:"auto",color:"var(--fg-dim)",fontFamily:"var(--font-mono, monospace)",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},'& [part="binding"]':{$description:"One `on*` key and whatever produces it. A box, for the reason a statement card is one: a handler CONTAINS a body, and the border is what says where one binding stops and the next begins.",boxSizing:"border-box",display:"flex",flexDirection:"column",gap:"var(--jx-space-2)",minWidth:"0",padding:"var(--jx-space-2)",border:"1px solid var(--jx-border)",borderRadius:"var(--jx-radius-sm)"},'& [part="binding-head"]':{display:"flex",alignItems:"center",gap:"var(--jx-space-2)",minWidth:"0"},'& [part="event-name"]':{flex:"1 1 auto",minWidth:"0"},'& [part="binding-body"]':{display:"flex",flexDirection:"column",gap:"var(--jx-space-2)",minWidth:"0"},'& [part="body-toggle"]':{display:"flex",justifyContent:"flex-end",minWidth:"0"},'& [part="body-row"]':{display:"flex",alignItems:"flex-start",gap:"var(--jx-space-2)",minWidth:"0"},'& [part="body-field"], & [part="expression-host"], & [part="statements-host"]':{flex:"1 1 auto",minWidth:"0"},'& [part="kv"]':{display:"flex",alignItems:"baseline",gap:"var(--jx-space-2)",minWidth:"0",fontSize:"var(--jx-text-sm)"},'& [part="kv-name"]':{fontFamily:"var(--font-mono, monospace)",color:"var(--fg)"},'& [part="kv-detail"], & [part="kv-value"], & [part="kv-tags"]':{color:"var(--fg-dim)"},'& [part="kv-value"]':{marginInlineStart:"auto",fontFamily:"var(--font-mono, monospace)",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},'& [part="empty-actions"]':{display:"flex",flexWrap:"wrap",justifyContent:"center",gap:"var(--jx-space-2)"}},children:[{tagName:"div",attributes:{part:"body-slot",role:"none"},style:{display:"contents"},$switch:{$ref:"#/state/state"},cases:{empty:{tagName:"div",attributes:{part:"empty"},children:[{tagName:"p",attributes:{part:"empty-message"},textContent:"${state.emptyMessage}"},{tagName:"div",attributes:{part:"empty-actions-slot",role:"none"},style:{display:"contents"},$switch:{$ref:"#/state/hasEmptyActions"},cases:{true:{tagName:"div",attributes:{part:"empty-actions"},children:[{$prototype:"Array",items:{$ref:"#/state/emptyActions"},key:{$ref:"$map/item/id"},map:{tagName:"jx-button",attributes:{part:"empty-action"},$props:{size:"sm"},onclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/runEmptyAction"},value:[{$ref:"$map/item/id"}]}]},children:[{tagName:"span",textContent:"${$map.item.label}"}]}}]}}}]},ready:{tagName:"jx-accordion",attributes:{part:"sections"},$props:{multiple:!0},children:[{$description:'Repeating list. Filter and Sort are always drawn: they used to hide behind `+ Add filter`, which seeded `{ $ref: "#/state/" }` — a binding to the empty pointer, which is not a signal — so the row opened already bound to nothing and the only way to type a literal was to cycle the mode ring twice (§6.6). A repeater has exactly three inputs, and an empty row states that better than a button does.',tagName:"div",attributes:{part:"repeater-slot",role:"none",hidden:"${state.hasRepeater ? null : ''}"},style:{display:"contents"},$switch:{$ref:"#/state/hasRepeater"},cases:{true:{tagName:"jx-accordion-item",attributes:{"data-section":"repeater"},$props:{label:"Repeating list",open:{$ref:"#/state/repeaterOpen"}},ontoggle:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/setSection"},value:["repeater",{$ref:"event#/detail"}]}]},children:[{tagName:"div",attributes:{part:"section-body"},children:[{$prototype:"Array",items:{$ref:"#/state/repeaterFields"},key:{$ref:"$map/item/key"},map:{$description:"A bindable value as a first-class field row. Every position it serves is a single-line expression — a collection, a filter, a sort key, a `$switch` — so it draws one widget rather than dispatching over a widget type: the textarea and checkbox arms the lit version carried had no caller in either tab. The set dot clears the position outright and is disabled where the position is mandatory; the source chip opens the rung picker rather than cycling, so any rung the position permits is one action away (§6.6).",tagName:"jx-field",attributes:{part:"field","data-prop":"${$map.item.prop}"},$props:{label:{$ref:"$map/item/label"},span:!0},children:[{tagName:"div",attributes:{part:"value"},children:[{tagName:"jx-action-button",attributes:{part:"source","data-source":"${$map.item.source}"},$props:{size:"sm",quiet:!0,haspopup:"menu",label:"${$map.item.sourceHint}",disabled:{$ref:"$map/item/sourceLocked"}},onclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/pickSource"},value:[{$ref:"$map/item/key"},{$ref:"event#/currentTarget"}]}]},children:[{tagName:"span",textContent:"${$map.item.sourceLabel}"}]},{tagName:"div",attributes:{part:"widget",role:"none"},$switch:{$ref:"$map/item/kind"},cases:{control:{tagName:"div",attributes:{part:"control-host","data-field":"${$map.item.key}"}},text:{tagName:"jx-textfield",attributes:{part:"text"},$props:{size:"sm",label:{$ref:"$map/item/label"},value:{$ref:"$map/item/value"},placeholder:{$ref:"$map/item/placeholder"},mono:{$ref:"$map/item/mono"}},oninput:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/setField"},value:[{$ref:"$map/item/key"},{$ref:"event#/target/value"}]}]}},select:{tagName:"jx-select",attributes:{part:"select"},$props:{size:"sm",label:{$ref:"$map/item/label"},value:{$ref:"$map/item/value"},options:{$ref:"$map/item/options"}},onchange:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/setField"},value:[{$ref:"$map/item/key"},{$ref:"event#/target/value"}]}]}}}},{tagName:"jx-action-button",attributes:{part:"set"},$props:{size:"sm",quiet:!0,label:"${$map.item.clearTitle}",disabled:{$ref:"$map/item/clearLocked"}},onclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/clearField"},value:[{$ref:"$map/item/key"}]}]},children:[{tagName:"jx-dot",attributes:{part:"dot","data-state":"${$map.item.dotState}"},$props:{tone:{$ref:"$map/item/tone"}}}]}]}]}},{tagName:"div",attributes:{part:"template-slot",role:"none"},style:{display:"contents"},$switch:{$ref:"#/state/hasTemplate"},cases:{true:{tagName:"jx-action-button",attributes:{part:"edit-template"},$props:{size:"sm",label:"Edit template"},onclick:{$ref:"#/state/editTemplate"},children:[{tagName:"span",textContent:"Edit template →"}]}}}]}]}}},{$description:"Condition. A `$switch` discriminant is a `$ref` and nothing else, so From data… is its only rung — de-escalating it would delete the key and demote the node — and the adapter says so by locking the row's source chip rather than by this document knowing what a `SwitchDef` is.",tagName:"div",attributes:{part:"condition-slot",role:"none",hidden:"${state.hasCondition ? null : ''}"},style:{display:"contents"},$switch:{$ref:"#/state/hasCondition"},cases:{true:{tagName:"jx-accordion-item",attributes:{"data-section":"condition"},$props:{label:"Condition",open:{$ref:"#/state/conditionOpen"}},ontoggle:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/setSection"},value:["condition",{$ref:"event#/detail"}]}]},children:[{tagName:"div",attributes:{part:"section-body"},children:[{$prototype:"Array",items:{$ref:"#/state/conditionFields"},key:{$ref:"$map/item/key"},map:{$description:"A bindable value as a first-class field row. Every position it serves is a single-line expression — a collection, a filter, a sort key, a `$switch` — so it draws one widget rather than dispatching over a widget type: the textarea and checkbox arms the lit version carried had no caller in either tab. The set dot clears the position outright and is disabled where the position is mandatory; the source chip opens the rung picker rather than cycling, so any rung the position permits is one action away (§6.6).",tagName:"jx-field",attributes:{part:"field","data-prop":"${$map.item.prop}"},$props:{label:{$ref:"$map/item/label"},span:!0},children:[{tagName:"div",attributes:{part:"value"},children:[{tagName:"jx-action-button",attributes:{part:"source","data-source":"${$map.item.source}"},$props:{size:"sm",quiet:!0,haspopup:"menu",label:"${$map.item.sourceHint}",disabled:{$ref:"$map/item/sourceLocked"}},onclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/pickSource"},value:[{$ref:"$map/item/key"},{$ref:"event#/currentTarget"}]}]},children:[{tagName:"span",textContent:"${$map.item.sourceLabel}"}]},{tagName:"div",attributes:{part:"widget",role:"none"},$switch:{$ref:"$map/item/kind"},cases:{control:{tagName:"div",attributes:{part:"control-host","data-field":"${$map.item.key}"}},text:{tagName:"jx-textfield",attributes:{part:"text"},$props:{size:"sm",label:{$ref:"$map/item/label"},value:{$ref:"$map/item/value"},placeholder:{$ref:"$map/item/placeholder"},mono:{$ref:"$map/item/mono"}},oninput:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/setField"},value:[{$ref:"$map/item/key"},{$ref:"event#/target/value"}]}]}},select:{tagName:"jx-select",attributes:{part:"select"},$props:{size:"sm",label:{$ref:"$map/item/label"},value:{$ref:"$map/item/value"},options:{$ref:"$map/item/options"}},onchange:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/setField"},value:[{$ref:"$map/item/key"},{$ref:"event#/target/value"}]}]}}}},{tagName:"jx-action-button",attributes:{part:"set"},$props:{size:"sm",quiet:!0,label:"${$map.item.clearTitle}",disabled:{$ref:"$map/item/clearLocked"}},onclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/clearField"},value:[{$ref:"$map/item/key"}]}]},children:[{tagName:"jx-dot",attributes:{part:"dot","data-state":"${$map.item.dotState}"},$props:{tone:{$ref:"$map/item/tone"}}}]}]}]}},{tagName:"p",attributes:{part:"subhead"},textContent:"Cases"},{$prototype:"Array",items:{$ref:"#/state/cases"},key:{$ref:"$map/item/key"},map:{tagName:"jx-field",attributes:{part:"field","data-prop":"${$map.item.prop}"},$props:{label:"Case",span:!0},children:[{tagName:"div",attributes:{part:"case"},children:[{tagName:"jx-textfield",attributes:{part:"case-name"},$props:{size:"sm",label:"Case value",value:{$ref:"$map/item/name"}},onchange:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/renameCase"},value:[{$ref:"$map/item/key"},{$ref:"event#/target/value"}]}]}},{tagName:"jx-action-button",attributes:{part:"case-open"},$props:{size:"sm",quiet:!0,icon:"arrow-right",label:"${$map.item.openTitle}"},onclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/openCase"},value:[{$ref:"$map/item/key"}]}]}},{tagName:"jx-action-button",attributes:{part:"case-remove"},$props:{size:"sm",quiet:!0,icon:"trash",label:"${$map.item.removeTitle}"},onclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/removeCase"},value:[{$ref:"$map/item/key"}]}]}}]}]}},{tagName:"jx-action-button",attributes:{part:"add-case"},$props:{size:"sm",quiet:!0,icon:"plus",label:"Add case"},onclick:{$ref:"#/state/addCase"},children:[{tagName:"span",textContent:"Add case"}]}]}]}}},{$description:"Events. A repeater is not an element — it has no `on*` position to bind, and offering Add Event on one writes a handler onto a node the renderer never mounts — so the adapter withholds the whole section rather than this document asking what a repeater is.",tagName:"div",attributes:{part:"events-slot",role:"none",hidden:"${state.hasEvents ? null : ''}"},style:{display:"contents"},$switch:{$ref:"#/state/hasEvents"},cases:{true:{tagName:"jx-accordion-item",attributes:{"data-section":"events"},$props:{label:"Events",open:{$ref:"#/state/eventsOpen"}},ontoggle:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/setSection"},value:["events",{$ref:"event#/detail"}]}]},children:[{tagName:"div",attributes:{part:"section-body"},children:[{tagName:"div",attributes:{part:"declared-slot",role:"none"},style:{display:"contents"},$switch:{$ref:"#/state/hasDeclared"},cases:{true:{tagName:"div",attributes:{part:"declared"},children:[{tagName:"p",attributes:{part:"subhead"},textContent:"Declared Events"},{$prototype:"Array",items:{$ref:"#/state/declared"},key:{$ref:"$map/item/key"},map:{tagName:"div",attributes:{part:"declared-row",title:"${$map.item.title}"},children:[{tagName:"code",attributes:{part:"event-code"},textContent:"${$map.item.name}"},{tagName:"span",attributes:{part:"declared-from"},textContent:"${$map.item.source}"},{tagName:"span",attributes:{part:"event-type",hidden:"${$map.item.type ? null : ''}"},textContent:"${$map.item.type}"}]}},{tagName:"jx-divider"}]}}},{tagName:"div",attributes:{part:"bindings-head-slot",role:"none"},style:{display:"contents"},$switch:{$ref:"#/state/hasBindings"},cases:{true:{tagName:"p",attributes:{part:"subhead"},textContent:"Event Bindings"}}},{$prototype:"Array",items:{$ref:"#/state/bindings"},key:{$ref:"$map/item/key"},map:{$description:"One `on*` key. The Mixed contract (§6.7) splits in two and this row shows both halves: which events exist, how each is produced, and its removal are properties of the BATCH — binding one handler to six buttons is a single decision, so those three controls write to every selected element in one transaction — while what a handler CONTAINS is the PRIMARY's, because six elements do not share one body and broadcasting a keystroke into six of them would destroy five. The dot says `mixed` when the selected elements disagree; the body below it stays the primary's.",tagName:"div",attributes:{part:"binding","data-event":"${$map.item.key}"},children:[{tagName:"div",attributes:{part:"binding-head"},children:[{$description:"The event NAME, and it is free-form rather than a list of ten. The menu offers what this element already binds plus the ten worth suggesting, and its last row asks for any other name through the one prompt dialog Studio has — so `ondragover`, `onpointerdown` and every custom event a component emits are bindable, which is exactly what §6.1 asks for and what the closed picker refused.",tagName:"jx-action-button",attributes:{part:"event-name"},$props:{size:"sm",haspopup:"menu",label:"${$map.item.nameTitle}"},onclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/pickEventName"},value:[{$ref:"$map/item/key"},{$ref:"event#/currentTarget"}]}]},children:[{tagName:"span",textContent:"${$map.item.name}"}]},{$description:'The same ladder every other bindable position in Studio offers, in the same four words. It used to read Inline code / Expression / Existing function — a fourth private dialect for the one ladder §6.6 collapses, so a user who learned "Formula" on a property row met "Expression" here and had no reason to think they were the same thing.',tagName:"jx-action-button",attributes:{part:"event-source","data-source":"${$map.item.source}"},$props:{size:"sm",quiet:!0,haspopup:"menu",label:"${$map.item.sourceHint}"},onclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/pickHandler"},value:[{$ref:"$map/item/key"},{$ref:"event#/currentTarget"}]}]},children:[{tagName:"span",textContent:"${$map.item.sourceLabel}"}]},{tagName:"jx-action-button",attributes:{part:"event-clear"},$props:{size:"sm",quiet:!0,icon:"trash",label:"${$map.item.clearTitle}"},onclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/clearEvent"},value:[{$ref:"$map/item/key"}]}]},children:[{tagName:"jx-dot",attributes:{part:"dot","data-state":"${$map.item.dotState}"},$props:{tone:{$ref:"$map/item/tone"}}}]}]},{tagName:"div",attributes:{part:"binding-body"},children:[{$description:"Statements or Code, for an inline function only. A structured body is a `JxStatement[]` and a code body is a string, so the toggle is a change of REPRESENTATION rather than of view — which is why it is drawn beside the body it rewrites rather than in the source ladder above it.",tagName:"div",attributes:{part:"toggle-slot",role:"none"},style:{display:"contents"},$switch:{$ref:"$map/item/showToggle"},cases:{true:{tagName:"div",attributes:{part:"body-toggle"},children:[{tagName:"jx-action-group",$props:{compact:!0,selects:"single",label:"Handler body"},children:[{tagName:"jx-action-button",attributes:{part:"body-statements"},$props:{size:"sm",label:"Statements",checked:{$ref:"$map/item/statementsChecked"}},onclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/setBodyMode"},value:[{$ref:"$map/item/key"},"statements"]}]},children:[{tagName:"span",textContent:"Statements"}]},{tagName:"jx-action-button",attributes:{part:"body-code"},$props:{size:"sm",label:"Code",checked:{$ref:"$map/item/codeChecked"}},onclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/setBodyMode"},value:[{$ref:"$map/item/key"},"code"]}]},children:[{tagName:"span",textContent:"Code"}]}]}]}}},{tagName:"div",attributes:{part:"body-slot",role:"none"},style:{display:"contents"},$switch:{$ref:"$map/item/body"},cases:{statements:{$description:"An island: `surfaces/statements.ts` mounts its own document in here, named by the handler it edits (`inspector/statements:<key>`), because a node with two structured handlers stamped one id on two elements and `resolveRegion` took the second.",tagName:"div",attributes:{part:"statements-host","data-event":"${$map.item.key}"}},code:{tagName:"div",attributes:{part:"body-row"},children:[{tagName:"jx-textfield",attributes:{part:"body-field"},$props:{size:"sm",multiline:!0,grows:!0,mono:!0,label:"Handler body",placeholder:"// handler body",value:{$ref:"$map/item/code"}},oninput:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/setCode"},value:[{$ref:"$map/item/key"},{$ref:"event#/target/value"}]}]}},{tagName:"jx-action-button",attributes:{part:"open-editor"},$props:{size:"sm",quiet:!0,icon:"code",label:"${$map.item.openTitle}"},onclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/openEditor"},value:[{$ref:"$map/item/key"}]}]}}]},expression:{tagName:"div",attributes:{part:"body-row"},children:[{tagName:"div",attributes:{part:"expression-host","data-event":"${$map.item.key}"}},{tagName:"jx-action-button",attributes:{part:"open-editor"},$props:{size:"sm",quiet:!0,icon:"align-bottom",label:"${$map.item.openTitle}"},onclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/openEditor"},value:[{$ref:"$map/item/key"}]}]}}]},ref:{tagName:"jx-select",attributes:{part:"event-handler"},$props:{size:"sm",label:"Handler",value:{$ref:"$map/item/refValue"},options:{$ref:"$map/item/refOptions"}},onchange:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/setHandlerRef"},value:[{$ref:"$map/item/key"},{$ref:"event#/target/value"}]}]}}}}]}]}},{tagName:"jx-action-button",attributes:{part:"add-event"},$props:{size:"sm",quiet:!0,icon:"plus",label:"Add Event"},onclick:{$ref:"#/state/addEvent"},children:[{tagName:"span",textContent:"Add Event"}]}]}]}}},{$description:"The custom element's outward contract: what a page may set from markup, what it may override, and what it may reach into. Three read-only lists — this is a report, not a form — drawn only on a component's root.",tagName:"div",attributes:{part:"observed-slot",role:"none",hidden:"${state.hasObserved ? null : ''}"},style:{display:"contents"},$switch:{$ref:"#/state/hasObserved"},cases:{true:{tagName:"jx-accordion-item",attributes:{"data-section":"observed"},$props:{label:"Observed Attributes",open:{$ref:"#/state/observedOpen"}},ontoggle:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/setSection"},value:["observed",{$ref:"event#/detail"}]}]},children:[{tagName:"div",attributes:{part:"section-body"},children:[{tagName:"div",attributes:{part:"observed-empty-slot",role:"none"},style:{display:"contents"},$switch:{$ref:"#/state/observedEmpty"},cases:{true:{tagName:"div",attributes:{part:"empty"},children:[{tagName:"p",attributes:{part:"empty-message"},textContent:'Attributes let a page set this component from markup. Name an "attribute" on a data entry to expose it here.'}]}}},{$prototype:"Array",items:{$ref:"#/state/observed"},key:{$ref:"$map/item/key"},map:{$description:"A read-only name and what it maps to. The Content tab had three near-identical hand-written flex rows for these; they are one shape now, and this is it.",tagName:"div",attributes:{part:"kv","data-prop":"${$map.item.prop}"},children:[{tagName:"span",attributes:{part:"kv-name"},textContent:"${$map.item.name}"},{tagName:"span",attributes:{part:"kv-detail",hidden:"${$map.item.detail ? null : ''}"},textContent:"${$map.item.detail}"},{tagName:"span",attributes:{part:"kv-tags",hidden:"${$map.item.tags ? null : ''}"},textContent:"${$map.item.tags}"},{tagName:"span",attributes:{part:"kv-value",hidden:"${$map.item.value ? null : ''}"},textContent:"${$map.item.value}"}]}}]}]}}},{tagName:"div",attributes:{part:"cssprops-slot",role:"none",hidden:"${state.hasCssProps ? null : ''}"},style:{display:"contents"},$switch:{$ref:"#/state/hasCssProps"},cases:{true:{tagName:"jx-accordion-item",attributes:{"data-section":"cssprops"},$props:{label:"CSS Properties",open:{$ref:"#/state/cssPropsOpen"}},ontoggle:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/setSection"},value:["cssprops",{$ref:"event#/detail"}]}]},children:[{tagName:"div",attributes:{part:"section-body"},children:[{$prototype:"Array",items:{$ref:"#/state/cssProps"},key:{$ref:"$map/item/key"},map:{$description:"A read-only name and what it maps to. The Content tab had three near-identical hand-written flex rows for these; they are one shape now, and this is it.",tagName:"div",attributes:{part:"kv","data-prop":"${$map.item.prop}"},children:[{tagName:"span",attributes:{part:"kv-name"},textContent:"${$map.item.name}"},{tagName:"span",attributes:{part:"kv-detail",hidden:"${$map.item.detail ? null : ''}"},textContent:"${$map.item.detail}"},{tagName:"span",attributes:{part:"kv-tags",hidden:"${$map.item.tags ? null : ''}"},textContent:"${$map.item.tags}"},{tagName:"span",attributes:{part:"kv-value",hidden:"${$map.item.value ? null : ''}"},textContent:"${$map.item.value}"}]}}]}]}}},{tagName:"div",attributes:{part:"cssparts-slot",role:"none",hidden:"${state.hasCssParts ? null : ''}"},style:{display:"contents"},$switch:{$ref:"#/state/hasCssParts"},cases:{true:{tagName:"jx-accordion-item",attributes:{"data-section":"cssparts"},$props:{label:"CSS Parts",open:{$ref:"#/state/cssPartsOpen"}},ontoggle:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/setSection"},value:["cssparts",{$ref:"event#/detail"}]}]},children:[{tagName:"div",attributes:{part:"section-body"},children:[{$prototype:"Array",items:{$ref:"#/state/cssParts"},key:{$ref:"$map/item/key"},map:{$description:"A read-only name and what it maps to. The Content tab had three near-identical hand-written flex rows for these; they are one shape now, and this is it.",tagName:"div",attributes:{part:"kv","data-prop":"${$map.item.prop}"},children:[{tagName:"span",attributes:{part:"kv-name"},textContent:"${$map.item.name}"},{tagName:"span",attributes:{part:"kv-detail",hidden:"${$map.item.detail ? null : ''}"},textContent:"${$map.item.detail}"},{tagName:"span",attributes:{part:"kv-tags",hidden:"${$map.item.tags ? null : ''}"},textContent:"${$map.item.tags}"},{tagName:"span",attributes:{part:"kv-value",hidden:"${$map.item.value ? null : ''}"},textContent:"${$map.item.value}"}]}}]}]}}}]}}}]};T("logic-panel",Pe);function ue(){return{bindings:[],cases:[],conditionFields:[],conditionOpen:!0,cssParts:[],cssPartsOpen:!1,cssProps:[],cssPropsOpen:!1,declared:[],emptyActions:[],emptyMessage:"",eventsOpen:!0,hasBindings:!1,hasCondition:!1,hasCssParts:!1,hasCssProps:!1,hasDeclared:!1,hasEmptyActions:!1,hasEvents:!1,hasObserved:!1,hasRepeater:!1,hasTemplate:!1,observed:[],observedEmpty:!1,observedOpen:!1,repeaterFields:[],repeaterOpen:!0,state:"empty"}}function Ie(e,t){for(let[n,o]of Object.entries(t))e[n]=o}function Dt(e){let t=typeof e==="string"?void 0:e.attributes?.part;return typeof t==="string"?t:""}function Ht(e){let t=e?.$map?.item,n=t!==null&&typeof t==="object"?t.key:"";return typeof n==="string"?n:""}function Fe(e,t,n,o){let r=v({...ue(),...n});Ie(r,t);let a=null,i=!1;return e.replaceChildren(),R("logic-panel",r,e,{onNodeCreated:(s,l,d,x)=>{if(!(s instanceof HTMLElement))return;let g=Dt(d);if(g!=="control-host"&&g!=="expression-host"&&g!=="statements-host")return;let c=Ht(x);if(g==="control-host")o.controlSlot(c,s);else if(g==="expression-host")o.expressionSlot(c,s);else o.statementsSlot(c,s)}}).then((s)=>{if(i){s.dispose();return}a=s}),{connected:()=>{let s=a?.root;return s instanceof HTMLElement?s.isConnected:!i},dispose(){i=!0,a?.dispose(),a=null},update(s){Ie(r,s)}}}var Ve=["onclick","oninput","onchange","onsubmit","onkeydown","onkeyup","onfocus","onblur","onmouseenter","onmouseleave"],De=/^on[a-z][\da-z-]*$/i,He=I1("eventHandler");function Bt(e,t){if(e==="function")return{$prototype:"Function",body:"",parameters:[]};if(e==="expression")return{$expression:{operator:"=",target:null}};let[n]=t;return n?{$ref:`#/state/${n[0]}`}:{$ref:""}}function Be(e,t,n){q(u.value,(o)=>{for(let r of e)Ue(o,r,t,n)})}function Jt(e,t,n){if(t.length<2)return 0;let o=t.map((r)=>{let a=K(e,r);return a?Mp(a,n)??null:null});return gp(o).mixed?t.length:0}var S={bindings:new Map,cases:new Set,fields:new Map,functionDefs:[],selection:null,targets:[]};function he(e,t){return t.some((n)=>n!==e)}function Je(e,t){let n=yo[e];return he(e,t)?`Value source: ${n} — click to change`:`Value source: ${n} (no other source available here)`}function Wt(e){return[...e.stateDefs.map((t)=>({label:t,value:`#/state/${t}`})),...e.extraSignals??[]]}function zt(e,t,n){let o=n.value!==void 0&&n.value!=="",r=n.mode==="literal"||n.mode==="function";return{clearLocked:!n.onClear,clearTitle:n.onClear?`Clear ${n.label}`:`${n.label} cannot be cleared`,dotState:o?"set":"unset",key:e,kind:n.mode==="expression"?"control":n.mode==="ref"?"select":"text",label:n.label,mono:n.mode==="template",options:n.mode==="ref"?Wt(n):[],placeholder:n.mode==="template"?"${state.…}":"",prop:t,source:n.mode,sourceHint:Je(n.mode,n.offered),sourceLabel:yo[n.mode],sourceLocked:!he(n.mode,n.offered),tone:"",value:r?String(n.value??""):n.mode==="ref"?Ot(n.value)?n.value.$ref:"":String(n.value??"")}}function me(e,t,n,o){let r=pc(o.caps),a=pd(t,o.value),i={...o,mode:a,offered:r};if(a==="expression"){let s=o.value?.$expression;i.paint=(l)=>El(l,s,(d)=>o.onChange({$expression:d}),{allowEventRef:!1,stateDefs:[...o.stateDefs],stateEntries:null})}return e.set(t,i),zt(t,n,i)}function We(){let e=new Map,t=new Map,n=new Set,o=ue(),r=u.value,a=Le(r?.session.selection),i=r?.doc.document,s=(b,k=[])=>(S={bindings:t,cases:n,fields:e,functionDefs:[],selection:null,targets:[]},o.emptyActions=k,o.emptyMessage=b,o.hasEmptyActions=k.length>0,o);if(!r||!i)return s("Open a page to inspect and wire what you click.",[{id:"open-page",label:"Open a page…"}]);if(!a)return s(Xh("wire it up"));let l=K(i,a);if(!l)return s(Pf());o.state="ready";let d=i.state||{},x=Object.entries(d).filter(([,b])=>b?.$prototype==="Function"||b?.$handler),g=r.session.selection.length>0?r.session.selection:[a];S={bindings:t,cases:n,fields:e,functionDefs:x,selection:a,targets:g};let c=l.$prototype==="Array",p=Boolean(l.$switch),w=a.length===0,f=uw({document:i,mode:r.doc.mode,selection:r.session.selection,ui:r.session.ui}),j=Qh(i),N=a.join("/"),L=(b)=>{let k=Ot(b)?b.$ref:null;if(!k)return;return G_(d[k.startsWith("#/state/")?k.slice(8):k])||void 0};if(c){o.hasRepeater=!0,o.repeaterOpen=Fa("__repeater",!0);let b=(m)=>(h)=>q(u.value,(A)=>Ue(A,a,m,h||void 0)),k=(m,h)=>me(e,`prop|${N}|${m}`,m,{caps:m==="filter"?"repeaterFilter":"repeaterSort",extraSignals:null,label:h,literalDefault:L(l[m]),onChange:b(m),onClear:()=>q(u.value,(A)=>Ue(A,a,m)),stateDefs:j,value:l[m]});o.repeaterFields=[me(e,`prop|${N}|items`,"items",{caps:"repeaterItems",extraSignals:null,label:"Items",literalDefault:L(l.items),onChange:(m)=>q(u.value,(h)=>Ue(h,a,"items",m)),stateDefs:j,value:l.items}),k("filter","Filter"),k("sort","Sort")],o.hasTemplate=Boolean(l.map)}if(p)o.hasCondition=!0,o.conditionOpen=Fa("__condition",!0),o.conditionFields=[me(e,`prop|${N}|$switch`,"$switch",{caps:"switchDiscriminant",extraSignals:q_(a),label:"Expression",literalDefault:L(l.$switch),onChange:(b)=>q(u.value,(k)=>Ue(k,a,"$switch",b)),stateDefs:j,value:l.$switch})],o.cases=Object.keys(l.cases||{}).map((b)=>(n.add(b),{key:b,name:b,openTitle:`Edit case "${b}"`,prop:`case:${b}`,removeTitle:`Remove case "${b}"`}));if(!c){if(o.hasEvents=!0,o.eventsOpen=Fa("__events",!0),f){let k=[];for(let[m,h]of Object.entries(d))if(Xa(h)&&Array.isArray(h.emits))for(let[A,E]of h.emits.entries())k.push({key:`${m}:${E.name||A}`,name:E.name||"(unnamed)",source:`← ${m}`,title:E.description||"",type:nt(E.type)&&typeof E.type.text==="string"?E.type.text:""});o.declared=k,o.hasDeclared=k.length>0}let b=Object.keys(l).filter((k)=>k.startsWith("on")).map((k)=>[k,Mp(l,k)]).filter((k)=>k[1]!==void 0);o.bindings=b.map(([k,m])=>_t(t,k,m,d)),o.hasBindings=b.length>0}if(f&&w){let b=Object.entries(d).filter(([,h])=>h.attribute);o.hasObserved=!0,o.observedOpen=Fa("__observed",!1),o.observedEmpty=b.length===0,o.observed=b.map(([h,A])=>{let E=A;return{detail:`→ ${h}`,key:h,name:String(E.attribute),prop:`attribute:${h}`,tags:E.reflects?"reflects":"",value:E.type?String(E.type):""}});let k=Object.entries(l.style||{}).filter(([h])=>h.startsWith("--"));o.hasCssProps=k.length>0,o.cssPropsOpen=Fa("__cssprops",!1),o.cssProps=k.map(([h,A])=>({detail:"",key:h,name:h,prop:`cssprop:${h}`,tags:"",value:String(A)}));let m=Z_(i);o.hasCssParts=m.length>0,o.cssPartsOpen=Fa("__cssparts",!1),o.cssParts=m.map((h)=>({detail:`<${h.tag}>`,key:`${h.tag}:${h.name}`,name:h.name,prop:`csspart:${h.name}`,tags:"",value:""}))}return o}function _t(e,t,n,o){let{functionDefs:r,selection:a,targets:i}=S,s=u.value,l=Xa(n)?n:null,d=ba(n)?n.$expression:null,x=hd(n),g=Boolean(l&&Array.isArray(l.body)),c=l?g?"statements":"code":d?"expression":"ref",p=Jt(s.doc.document,i,t)>0,w={body:c,fn:l,key:t,mode:x,value:n};if(l&&g&&a)w.mountStatements=(f)=>dw(f,l.body,(j)=>q(u.value,(N)=>Ue(N,a,t,{...l,body:j})),{allowEventRef:!0,emits:l.emits??[],region:bI(t),stateDefs:Object.keys(o),stateEntries:o});if(d&&a){let f=Mf(s,`event:${JSON.stringify(a)}:${t}`,d,a,()=>Ai("rightPanel")),j=(L)=>q(u.value,(b)=>Ue(b,a,t,{$expression:L})),N=(L,b)=>q(u.value,(k)=>Bs(k,L,b));w.paint=(L)=>El(L,d,j,{allowEventRef:!0,onInsertDef:N,preview:f,stateDefs:Object.keys(o),stateEntries:o})}return e.set(t,w),{body:c,clearTitle:p?`${i.length} selected elements bind ${t} differently — clearing removes it from all of them`:`Clear ${t}`,code:l&&!g&&typeof l.body==="string"?l.body:"",codeChecked:c==="code"?"true":"false",dotState:p?"mixed":"set",key:t,name:t,nameTitle:`Event: ${t} — click to change`,openTitle:c==="expression"?"Open in formula workspace":"Open in editor",refOptions:[{label:"— none —",value:""},...r.map(([f])=>({label:f,value:`#/state/${f}`}))],refValue:Ot(n)?n.$ref:"",showToggle:Boolean(l),source:x,sourceHint:Je(x,He),sourceLabel:yo[x],statementsChecked:c==="statements"?"true":"false",tone:p?"warning":""}}var H=null,W=null,Y=new Map,X=new Map,Z=new Map,Ut={condition:"__condition",cssparts:"__cssparts",cssprops:"__cssprops",events:"__events",observed:"__observed",repeater:"__repeater"};function $e(e){if(W?.stop(),W=null,H?.dispose(),H=null,Y.clear(),X.clear(),Z.clear(),!e)return;H=Fe(e,We(),{addCase:()=>{let{selection:t}=S;if(t)q(u.value,(n)=>VL(n,t,`case${S.cases.size+1}`))},addEvent:en,clearEvent:(t)=>Be(S.targets,t),clearField:(t)=>S.fields.get(t)?.onClear?.(),editTemplate:()=>{let{selection:t}=S;if(t&&u.value)u.value.session.selection=[[...t,"map"]]},openCase:(t)=>{let{selection:n}=S;if(n&&u.value)u.value.session.selection=[[...n,"cases",t]]},openEditor:(t)=>{let{selection:n}=S,o=S.bindings.get(t);if(n&&o)Cu({editing:{eventKey:t,path:n,type:"event"},surface:o.body==="expression"?"formula":"function"})},pickEventName:Qt,pickHandler:Xt,pickSource:Yt,runEmptyAction:(t)=>{if(t==="open-page")Tl().run()},removeCase:(t)=>{let{selection:n}=S;if(n)q(u.value,(o)=>UL(o,n,t))},renameCase:(t,n)=>{let{selection:o}=S;if(o&&n&&n!==t)q(u.value,(r)=>qL(r,o,t,n))},setBodyMode:Zt,setCode:(t,n)=>{let{selection:o}=S,r=S.bindings.get(t);if(o&&r?.fn)q(u.value,(a)=>Ue(a,o,t,{$prototype:"Function",body:n,parameters:r.fn?.parameters||[]}))},setField:(t,n)=>{let o=S.fields.get(t);if(!o)return;if(o.mode==="ref"){o.onChange(n?{$ref:n}:void 0);return}o.onChange(n)},setHandlerRef:(t,n)=>{let{selection:o}=S;if(!o)return;q(u.value,(r)=>Ue(r,o,t,n?{$ref:n}:void 0))},setSection:(t,n)=>{let o=Ut[t];if(o)Xg(o,n)}},{controlSlot:(t,n)=>{Y.set(t,n),S.fields.get(t)?.paint?.(n)},expressionSlot:(t,n)=>{X.set(t,n),S.bindings.get(t)?.paint?.(n)},statementsSlot:(t,n)=>{Z.set(t,n),S.bindings.get(t)?.mountStatements?.(n)}}),Kt()}var fe=!1;function qt(){if(fe||!H)return;fe=!0,queueMicrotask(()=>{if(fe=!1,!H)return;H.update(We()),queueMicrotask(Gt)})}function Gt(){for(let[e,t]of Y){let n=S.fields.get(e);if(!n||!t.isConnected){Y.delete(e);continue}n.paint?.(t)}for(let[e,t]of X){let n=S.bindings.get(e);if(!n||!t.isConnected){X.delete(e);continue}n.paint?.(t)}for(let[e,t]of Z){let n=S.bindings.get(e);if(!n||!t.isConnected){Z.delete(e);continue}n.mountStatements?.(t)}}function Kt(){W?.stop(),W=ge(),W.run(()=>{Q(()=>{let e=u.value;if(e)e.doc.document,e.doc.mode,e.session.selection.map((t)=>t.join("/")).join("|"),e.session.ui.inspectorSections;qt()})})}function Yt(e,t){let n=S.fields.get(e);if(!n||!he(n.mode,n.offered))return;Nt({label:"Value source",opener:t,region:"value-source",rows:n.offered.map((o)=>({checked:o===n.mode?"true":"false",destructive:!1,disabled:!1,dividerAbove:!1,id:o,title:yo[o]})),run:(o)=>{let r=o;if(r===n.mode)return;if(n.mode==="ref"&&n.literalDefault!==void 0&&!Eu(e,"literal"))Su(e,"literal",n.literalDefault);n.onChange(fc(e,n.mode,r,Ae(n.value),fd(r,{extraSignals:n.extraSignals,literalDefault:n.literalDefault,stateDefs:n.stateDefs})))}})}function Xt(e,t){let n=S.bindings.get(e);if(!n)return;Nt({label:"Value source",opener:t,region:"value-source",rows:He.map((o)=>({checked:o===n.mode?"true":"false",destructive:!1,disabled:!1,dividerAbove:!1,id:o,title:yo[o]})),run:(o)=>{let r=o;if(r===n.mode)return;let a=Bt(r,S.functionDefs);Be(S.targets,e,fc(`event|${S.selection?.join("/")??""}|${e}`,n.mode,r,n.value,a)??a)}})}function Qt(e,t){let n=[...S.bindings.keys()],o=[...new Set([...n,...Ve])];Nt({label:"Event name",opener:t,region:"event-name",rows:[...o.map((r)=>({checked:r===e?"true":"false",destructive:!1,disabled:!1,dividerAbove:!1,id:r,title:r})),{destructive:!1,disabled:!1,dividerAbove:!0,id:"__custom__",run:()=>{Nn("Event name",{message:"Any DOM or custom event this element emits — onpointerdown, ondragover.",placeholder:"onpointerdown",validate:(r)=>De.test(r.trim())?"":"An event key starts with “on” and continues in letters, digits or hyphens.",value:e}).then((r)=>{if(r)Oe(e,r.trim())})},title:"Other name…"}],run:(r)=>Oe(e,r)})}function Oe(e,t){if(!t||t===e||!De.test(t))return;q(u.value,(n)=>{for(let o of S.targets){let r=Mp(K(n.doc.document,o),e);if(r===void 0)continue;Ue(n,o,e),Ue(n,o,t,r)}})}function Zt(e,t){let{selection:n}=S,r=S.bindings.get(e)?.fn;if(!n||!r)return;let a=Array.isArray(r.body);if(t==="statements"===a)return;q(u.value,(i)=>Ue(i,n,e,{...r,body:t==="statements"?[]:""}))}function en(){let{functionDefs:e,selection:t}=S,n=u.value;if(!t||!n)return;let o=K(n.doc.document,t),r="onclick";for(let a of Ve)if(!o?.[a]){r=a;break}q(u.value,(a)=>Ue(a,t,r,e.length>0?{$ref:`#/state/${e[0][0]}`}:{$prototype:"Function",body:"",parameters:[]}))}var tn=new Set(["input","select","textarea"]);function nn(e){let t=qe(e.tagName).toLowerCase(),n=[];if(Gs(e))n.push(":popover-open","::backdrop",":popover-open::backdrop");if(t==="dialog")n.push("[open]",":modal","::backdrop");if(t==="details")n.push("[open]");if(tn.has(t))n.push(":checked",":invalid",":required",":user-invalid");if(t==="a")n.push(":visited",":target");return n}function ze(e){if(!e||typeof e!=="object")return[...ck];return[...new Set([...ck,...nn(e)])]}function _e(e,t,n,o=null){if(n===null||t.length===0)return{};let r={},a=(i,s)=>{for(let[l,d]of Object.entries(i))if(typeof d!=="object")r[l]={donor:s,value:d??""}};if(o){a(e[o]||{},null);for(let i of t){if(i===n)break;a((e[`@${i}`]||{})[o]||{},i)}return r}a(e,null);for(let i of t){if(i===n)break;a(e[`@${i}`]||{},i)}return r}var Ge={$schema:"https://jxsuite.com/schema/v1",$id:"StudioTargetLine",$description:"The Style tab's edit target, as one sentence (§6.2): element · breakpoint · scheme variant · selector, then the chip that states how wide the blast radius is. Every word of the sentence is a control, because a sentence you cannot act on is a caption and the panel already had one of those. The breakpoint and scheme segments ROUTE to where those axes are defined rather than offering a third list to pick from — the Style tab owns the selector axis and nothing else — so the selector is the one segment with a menu, and that menu is the kit's. The project-scope warning band is not decoration: entering Stylebook converts every edit from `this element` to `every element of this tag`, and the band states that before the first keystroke.",tagName:"div",attributes:{part:"target"},style:{$description:"The `.target-line` / `.tl-*` rules the line used to take from `styles/inspector.css`, brought here and re-valued onto the kit's own layer. Every segment is a button with the chrome taken off: the row must read as a sentence, not as a toolbar, which is exactly what the three widgets it replaced failed to do.",display:"block",fontSize:"var(--jx-text-xs)",'& [part="line"]':{display:"flex",alignItems:"center",gap:"var(--jx-space-2)",padding:"5px var(--jx-space-3)",borderBottom:"1px solid var(--jx-border)",lineHeight:"1.4"},'& [part="glyph"]':{flexShrink:"0",color:"var(--jx-accent)"},'& [part="segments"]':{display:"flex",flexWrap:"wrap",alignItems:"center",gap:"1px",minWidth:"0",flex:"1"},'& [part="separator"]':{color:"var(--jx-fg-dim)",opacity:"0.6"},'& [part="segment"]':{padding:"1px 3px",border:"none",borderRadius:"var(--jx-radius-sm)",background:"none",color:"var(--jx-fg)",font:"inherit",fontFamily:"var(--jx-font-mono)"},'& button[part="segment"]':{cursor:"pointer",":hover":{background:"var(--jx-hover-bg)",color:"var(--jx-accent)"},":focus-visible":{outline:"var(--jx-focus-ring)",outlineOffset:"-1px"}},'& [data-seg="element"]':{color:"var(--jx-tag)"},'& [data-seg="media"], & [data-seg="scheme"]':{color:"var(--jx-fg-dim)"},'& [data-seg="selector"]':{color:"var(--jx-signal)"},'& [part="scope"]':{$description:"Element scope is ambient and reads as ambient; the two tag-wide scopes are the ones a reader has to notice BEFORE typing, so they carry weight.",flexShrink:"0",padding:"1px var(--jx-space-3)",border:"1px solid var(--jx-border)",borderRadius:"999px",color:"var(--jx-fg-dim)",whiteSpace:"nowrap"},'& [part="scope"][data-scope="document"]':{borderColor:"var(--jx-accent-50)",color:"var(--jx-accent)"},'& [part="scope"][data-scope="project"]':{borderColor:"var(--jx-warning)",color:"var(--jx-warning)"},'& [part="warning"]':{padding:"var(--jx-space-3)",borderBottom:"1px solid var(--jx-border)",borderLeft:"2px solid var(--jx-warning)",background:"var(--jx-bg-panel)"},'& [part="warning-text"]':{margin:"0",color:"var(--jx-warning)"},'& [part="warning-action"]':{marginTop:"var(--jx-space-2)",padding:"0",border:"none",background:"none",color:"var(--jx-accent)",font:"inherit",cursor:"pointer",textDecoration:"underline",":focus-visible":{outline:"var(--jx-focus-ring)",outlineOffset:"1px"}},'& [part="affected"]':{margin:"var(--jx-space-2) 0 0",padding:"0",maxHeight:"140px",overflowY:"auto",listStyle:"none"},'& [part="affected-row"]':{display:"flex",justifyContent:"space-between",gap:"var(--jx-space-4)",padding:"1px 0",color:"var(--jx-fg-dim)"},'& [part="affected-path"]':{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",fontFamily:"var(--jx-font-mono)"},'& [part="affected-count"]':{flexShrink:"0",fontFamily:"var(--jx-font-mono)"},'& [part="affected-empty"]':{margin:"var(--jx-space-2) 0 0",color:"var(--jx-fg-dim)"}},children:[{tagName:"div",attributes:{part:"line","data-jx-region":"${state.region}"},children:[{tagName:"span",attributes:{part:"glyph","aria-hidden":"true"},textContent:"⌖"},{tagName:"div",attributes:{part:"segments"},children:[{$prototype:"Array",items:{$ref:"#/state/segments"},key:{$ref:"$map/item/key"},map:{tagName:"span",attributes:{part:"segment-slot",role:"none"},style:{display:"contents"},children:[{tagName:"span",attributes:{part:"separator-slot",role:"none"},style:{display:"contents"},$switch:{$ref:"$map/item/leading"},cases:{false:{tagName:"span",attributes:{part:"separator","aria-hidden":"true"},textContent:"·"}}},{tagName:"span",attributes:{part:"control-slot",role:"none"},style:{display:"contents"},$switch:{$ref:"$map/item/control"},cases:{button:{tagName:"button",attributes:{part:"segment",type:"button","data-seg":"${$map.item.key}",title:"${$map.item.title}"},textContent:"${$map.item.label}",onclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/activate"},value:[{$ref:"$map/item/key"}]}]}},readout:{tagName:"span",attributes:{part:"segment","data-seg":"${$map.item.key}",title:"${$map.item.title}"},textContent:"${$map.item.label}"}}}]}},{tagName:"span",attributes:{part:"separator","aria-hidden":"true"},textContent:"·"},{tagName:"button",attributes:{part:"segment",type:"button","data-seg":"selector","aria-haspopup":"menu",title:"The state or nested rule these edits land in — click to choose another"},textContent:"${state.selectorLabel} ⌄",onclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/openSelector"},value:[]}]}}]},{tagName:"span",attributes:{part:"scope","data-scope":"${state.scopeKind}",title:"${state.scopeTitle}"},textContent:"${state.scopeLabel}"}]},{tagName:"div",attributes:{part:"warning-slot",role:"none"},$switch:{$ref:"#/state/warn"},cases:{true:{tagName:"div",attributes:{part:"warning",role:"status"},children:[{tagName:"p",attributes:{part:"warning-text"},textContent:"${state.warningText}"},{tagName:"span",attributes:{part:"warning-action-slot",role:"none"},style:{display:"contents"},$switch:{$ref:"#/state/hasToggle"},cases:{true:{tagName:"button",attributes:{part:"warning-action",type:"button","aria-expanded":"${state.showAffected ? 'true' : 'false'}"},textContent:"${state.toggleLabel}",onclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/toggleAffected"},value:[]}]}}}},{tagName:"div",attributes:{part:"affected-slot",role:"none"},$switch:{$ref:"#/state/affectedState"},cases:{list:{tagName:"ul",attributes:{part:"affected"},children:[{$prototype:"Array",items:{$ref:"#/state/affectedFiles"},key:{$ref:"$map/item/path"},map:{tagName:"li",attributes:{part:"affected-row"},children:[{tagName:"span",attributes:{part:"affected-path"},textContent:"${$map.item.path}"},{tagName:"span",attributes:{part:"affected-count"},textContent:"${$map.item.count}"}]}}]},empty:{tagName:"p",attributes:{part:"affected-empty"},textContent:"No file list — the project could not be searched."}}}]}}}]};T("target-line",Ge);var rn="inspector/target",an="style-selector",be="base rule",Ke=null,te=null,ye=null,Ye=null,z=null;function ee(){let e=z;z=null,e?.close()}function Xe(){return Ke??=v({activate:(e)=>{te?.segments.find((t)=>t.key===e)?.onActivate?.()},affectedFiles:[],affectedState:"hidden",hasToggle:!1,openSelector:()=>{ve()},region:rn,scopeKind:"element",scopeLabel:"",scopeTitle:"",segments:[],selectorLabel:be,showAffected:!1,toggleAffected:()=>{te?.scope.onToggleAffected?.()},toggleLabel:"Show affected",warn:!1,warningText:""}),Ke}function Qe(e){let t=e instanceof HTMLElement?e:null;if(t===ye)return;ee();let n=Ye;if(ye=t,Ye=t?R("target-line",Xe(),t):null,n)n.then((o)=>{o.dispose()})}function Ze(e){te=e;let t=Xe(),n=[...e.scope.affectedFiles??[]],o=e.scope.showAffected===!0;t.segments=e.segments.map((r,a)=>({control:r.onActivate?"button":"readout",key:r.key,label:r.label,leading:a===0,title:r.title})),t.selectorLabel=e.selector.value??be,t.scopeKind=e.scope.kind,t.scopeLabel=e.scope.label,t.scopeTitle=e.scope.kind==="element"?"These edits apply to the selected element only":`These edits apply to ${e.scope.label}`,t.warn=e.scope.kind==="project",t.warningText=`Every edit here restyles ${e.scope.label} — ${e.scope.affected??"unknown"}.`,t.hasToggle=Boolean(e.scope.onToggleAffected),t.toggleLabel=o?"Hide affected":"Show affected",t.showAffected=o,t.affectedFiles=n,t.affectedState=o?n.length>0?"list":"empty":"hidden"}var sn="__base__",ln="__add_custom__";function ve(){let e=ye?.querySelector('[data-seg="selector"]')??null;if(!e?.isConnected)throw RangeError(`command "style.openSelectorMenu" needs the Inspector's Style tab rendered; its selector menu is not in the document`);let t=te?.selector;if(!t)return;ee();let n=(r)=>{ee(),t.onSelect(r)},o=[{destructive:!1,disabled:!1,dividerAbove:!1,id:sn,run:()=>{n(null)},title:be},...t.options.map((r,a)=>({checked:t.declared.has(r)?"true":"false",destructive:!1,disabled:!1,dividerAbove:a===0,id:r,run:()=>{n(r)},title:r})),{destructive:!1,disabled:!1,dividerAbove:!0,id:ln,run:()=>{ee(),t.onAddCustom()},title:"+ Add custom…"}];z=Nt({label:"Edit target",onClosed:(r)=>{if(z===r)z=null},opener:e,region:an,rows:o})}var P={$schema:"../../packages/schema/schema.json",$id:"css-meta",title:"CSS Property Metadata",description:"Section assignment, order, and input inference metadata for the style sidebar.",$sections:[{key:"layout",label:"Layout"},{key:"size",label:"Size",$layout:"grid"},{key:"spacing",label:"Spacing"},{key:"positioning",label:"Positioning"},{key:"typography",label:"Typography"},{key:"background",label:"Background"},{key:"border",label:"Border"},{key:"effects",label:"Effects"},{key:"other",label:"Other"}],$defs:{display:{$section:"layout",$order:10,type:"string",$input:"button-group",$buttonValues:["flex","grid","block","inline","none"],$icons:{flex:"columns",grid:"grid-four",block:"rectangle",inline:"text-t",none:"eye-slash"},enum:["block","inline","inline-block","flex","inline-flex","grid","inline-grid","contents","none","flow-root","table","list-item"]},height:{$section:"size",$order:10,type:"string",$units:["px","rem","em","%","vh","svh","dvh"],$keywords:["auto","min-content","max-content","fit-content"]},width:{$section:"size",$order:11,type:"string",$units:["px","rem","em","%","vw","svw"],$keywords:["auto","min-content","max-content","fit-content"]},minHeight:{$section:"size",$order:20,type:"string",$units:["px","rem","em","%","vh"],$keywords:["auto","min-content","max-content","fit-content"]},minWidth:{$section:"size",$order:21,type:"string",$units:["px","rem","em","%","vw"],$keywords:["auto","min-content","max-content","fit-content"]},maxHeight:{$section:"size",$order:30,type:"string",$units:["px","rem","em","%","vh"],$keywords:["none","min-content","max-content","fit-content"]},maxWidth:{$section:"size",$order:31,type:"string",$units:["px","rem","em","%","vw"],$keywords:["none","min-content","max-content","fit-content"]},aspectRatio:{$section:"size",$order:40,type:"string",examples:["auto","1/1","4/3","16/9","2/1"]},objectFit:{$section:"size",$order:41,type:"string",enum:["fill","contain","cover","none","scale-down"]},overflow:{$section:"size",$order:50,$span:2,type:"string",enum:["visible","hidden","scroll","auto","clip"]},overflowX:{$section:"size",$order:51,type:"string",enum:["visible","hidden","scroll","auto","clip"]},overflowY:{$section:"size",$order:52,type:"string",enum:["visible","hidden","scroll","auto","clip"]},boxSizing:{$section:"size",$order:60,$span:2,type:"string",enum:["content-box","border-box"]},flexDirection:{$section:"layout",$order:70,type:"string",$input:"button-group",$icons:{row:"arrow-right","row-reverse":"arrow-left",column:"arrow-down","column-reverse":"arrow-up"},enum:["row","row-reverse","column","column-reverse"],$show:[{prop:"display",values:["flex","inline-flex"]}]},flexWrap:{$section:"layout",$order:71,type:"string",$input:"button-group",$buttonValues:["nowrap","wrap"],$icons:{wrap:"arrow-u-down-left"},enum:["nowrap","wrap","wrap-reverse"],$show:[{prop:"display",values:["flex","inline-flex"]}]},justifyContent:{$section:"layout",$order:72,type:"string",$input:"button-group",$buttonValues:["flex-start","flex-end","center","space-between","space-around","space-evenly"],$icons:{"flex-start":"align-left","flex-end":"align-right",center:"align-center-horizontal","space-between":"arrows-out-line-horizontal","space-around":"arrows-in-line-horizontal","space-evenly":"arrows-horizontal"},enum:["flex-start","flex-end","center","space-between","space-around","space-evenly","start","end","normal"],$show:[{prop:"display",values:["flex","inline-flex","grid","inline-grid"]}]},alignItems:{$section:"layout",$order:73,type:"string",$input:"button-group",$buttonValues:["stretch","flex-start","flex-end","center","baseline"],$icons:{stretch:"arrows-out-line-vertical","flex-start":"align-top","flex-end":"align-bottom",center:"align-center-vertical",baseline:"text-a-underline"},enum:["stretch","flex-start","flex-end","center","baseline","start","end","normal"],$show:[{prop:"display",values:["flex","inline-flex","grid","inline-grid"]}]},alignContent:{$section:"layout",$order:74,type:"string",$input:"button-group",$buttonValues:["normal","flex-start","flex-end","center","space-between","stretch"],$icons:{"flex-start":"align-top","flex-end":"align-bottom",center:"align-center-vertical","space-between":"arrows-vertical",stretch:"arrows-out-line-vertical"},enum:["normal","flex-start","flex-end","center","space-between","space-around","stretch","start","end"],$show:[{prop:"display",values:["flex","inline-flex","grid","inline-grid"]}]},gap:{$section:"layout",$order:75,type:"string",$units:["px","rem","em","%"],$show:[{prop:"display",values:["flex","inline-flex","grid","inline-grid"]}]},rowGap:{$section:"layout",$order:76,type:"string",$units:["px","rem","em","%"],$show:[{prop:"display",values:["flex","inline-flex","grid","inline-grid"]}]},columnGap:{$section:"layout",$order:77,type:"string",$units:["px","rem","em","%"],$show:[{prop:"display",values:["flex","inline-flex","grid","inline-grid"]}]},flexGrow:{$section:"layout",$order:80,type:"string",$units:[],$show:[{prop:"display",values:["flex","inline-flex"]}]},flexShrink:{$section:"layout",$order:81,type:"string",$units:[],$show:[{prop:"display",values:["flex","inline-flex"]}]},flexBasis:{$section:"layout",$order:82,type:"string",$units:["px","rem","em","%"],$keywords:["auto","content"],$show:[{prop:"display",values:["flex","inline-flex"]}]},alignSelf:{$section:"layout",$order:83,type:"string",$input:"button-group",$buttonValues:["auto","flex-start","flex-end","center","baseline","stretch"],$icons:{stretch:"arrows-out-line-vertical","flex-start":"align-top","flex-end":"align-bottom",center:"align-center-vertical",baseline:"text-a-underline"},enum:["auto","flex-start","flex-end","center","baseline","stretch","start","end"],$show:[{prop:"display",values:["flex","inline-flex","grid","inline-grid"]}]},order:{$section:"layout",$order:84,type:"string",$units:[],$show:[{prop:"display",values:["flex","inline-flex","grid","inline-grid"]}]},gridTemplateColumns:{$section:"layout",$order:70,type:"string",examples:["repeat(2,1fr)","repeat(3,1fr)","repeat(4,1fr)","1fr 1fr","auto 1fr","auto"],$show:[{prop:"display",values:["grid","inline-grid"]}]},gridTemplateRows:{$section:"layout",$order:71,type:"string",examples:["repeat(2,1fr)","repeat(3,1fr)","auto 1fr","1fr 1fr"],$show:[{prop:"display",values:["grid","inline-grid"]}]},gridTemplateAreas:{$section:"layout",$order:72,type:"string",$show:[{prop:"display",values:["grid","inline-grid"]}]},justifyItems:{$section:"layout",$order:76,type:"string",enum:["start","end","center","stretch","normal"],$show:[{prop:"display",values:["grid","inline-grid"]}]},gridColumn:{$section:"layout",$order:80,type:"string",$show:[{prop:"display",values:["grid","inline-grid"]}]},gridRow:{$section:"layout",$order:81,type:"string",$show:[{prop:"display",values:["grid","inline-grid"]}]},justifySelf:{$section:"layout",$order:82,type:"string",enum:["auto","start","end","center","stretch","normal"],$show:[{prop:"display",values:["grid","inline-grid"]}]},padding:{$section:"spacing",$order:10,type:"string",$shorthand:!0},paddingTop:{$section:"spacing",$order:11,type:"string",$units:["px","rem","em","%"],$shorthand:"padding"},paddingRight:{$section:"spacing",$order:12,type:"string",$units:["px","rem","em","%"],$shorthand:"padding"},paddingBottom:{$section:"spacing",$order:13,type:"string",$units:["px","rem","em","%"],$shorthand:"padding"},paddingLeft:{$section:"spacing",$order:14,type:"string",$units:["px","rem","em","%"],$shorthand:"padding"},margin:{$section:"spacing",$order:20,type:"string",$shorthand:!0},marginTop:{$section:"spacing",$order:21,type:"string",$units:["px","rem","em","%"],$keywords:["auto"],$shorthand:"margin"},marginRight:{$section:"spacing",$order:22,type:"string",$units:["px","rem","em","%"],$keywords:["auto"],$shorthand:"margin"},marginBottom:{$section:"spacing",$order:23,type:"string",$units:["px","rem","em","%"],$keywords:["auto"],$shorthand:"margin"},marginLeft:{$section:"spacing",$order:24,type:"string",$units:["px","rem","em","%"],$keywords:["auto"],$shorthand:"margin"},position:{$section:"positioning",$order:10,type:"string",enum:["static","relative","absolute","fixed","sticky"]},top:{$section:"positioning",$order:20,type:"string",$units:["px","rem","em","%","vw","vh"],$keywords:["auto"],$show:[{prop:"position",values:["relative","absolute","fixed","sticky"]}]},right:{$section:"positioning",$order:21,type:"string",$units:["px","rem","em","%","vw","vh"],$keywords:["auto"],$show:[{prop:"position",values:["relative","absolute","fixed","sticky"]}]},bottom:{$section:"positioning",$order:22,type:"string",$units:["px","rem","em","%","vw","vh"],$keywords:["auto"],$show:[{prop:"position",values:["relative","absolute","fixed","sticky"]}]},left:{$section:"positioning",$order:23,type:"string",$units:["px","rem","em","%","vw","vh"],$keywords:["auto"],$show:[{prop:"position",values:["relative","absolute","fixed","sticky"]}]},zIndex:{$section:"positioning",$order:30,type:"string",$units:[],$keywords:["auto"],$show:[{prop:"position",values:["relative","absolute","fixed","sticky"]}]},float:{$section:"positioning",$order:40,type:"string",enum:["none","left","right","inline-start","inline-end"]},clear:{$section:"positioning",$order:41,type:"string",enum:["none","left","right","both","inline-start","inline-end"]},fontFamily:{$section:"typography",$order:10,type:"string",presets:[{title:"System UI",value:"system-ui, sans-serif"},{title:"Transitional",value:"Charter, 'Bitstream Charter', 'Sitka Text', Cambria, serif"},{title:"Old Style",value:"'Iowan Old Style', 'Palatino Linotype', 'URW Palladio L', P052, serif"},{title:"Humanist",value:"Seravek, 'Gill Sans Nova', Ubuntu, Calibri, 'DejaVu Sans', source-sans-pro, sans-serif"},{title:"Geometric Humanist",value:"Avenir, Montserrat, Corbel, 'URW Gothic', source-sans-pro, sans-serif"},{title:"Classical Humanist",value:"Optima, Candara, 'Noto Sans', source-sans-pro, sans-serif"},{title:"Neo-Grotesque",value:"Inter, Roboto, 'Helvetica Neue', 'Arial Nova', 'Nimbus Sans', Arial, sans-serif"},{title:"Monospace Slab Serif",value:"'Nimbus Mono PS', 'Courier New', monospace"},{title:"Monospace Code",value:"ui-monospace, 'Cascadia Code', 'Source Code Pro', Menlo, Consolas, 'DejaVu Sans Mono', monospace"},{title:"Industrial",value:"Bahnschrift, 'DIN Alternate', 'Franklin Gothic Medium', 'Nimbus Sans Narrow', sans-serif-condensed, sans-serif"},{title:"Rounded Sans",value:"ui-rounded, 'Hiragino Maru Gothic ProN', Quicksand, Comfortaa, Manjari, 'Arial Rounded MT', 'Arial Rounded MT Bold', Calibri, source-sans-pro, sans-serif"},{title:"Slab Serif",value:"Rockwell, 'Rockwell Nova', 'Roboto Slab', 'DejaVu Serif', 'Sitka Small', serif"},{title:"Antique",value:"Superclarendon, 'Bookman Old Style', 'URW Bookman', 'URW Bookman L', 'Georgia Pro', Georgia, serif"},{title:"Didone",value:"Didot, 'Bodoni MT', 'Noto Serif Display', 'URW Palladio L', P052, Sylfaen, serif"},{title:"Handwritten",value:"'Segoe Print', 'Bradley Hand', Chilanka, TSCu_Comic, casual, cursive"}]},fontSize:{$section:"typography",$order:20,type:"string",$units:["px","rem","em","%"],$keywords:["small","medium","large","x-large","xx-large","smaller","larger"]},fontWeight:{$section:"typography",$order:21,type:"string",examples:["100","200","300","400","500","600","700","800","900","normal","bold","lighter","bolder"]},fontStyle:{$section:"typography",$order:22,type:"string",enum:["normal","italic","oblique"]},fontVariant:{$section:"typography",$order:23,type:"string",enum:["normal","small-caps"]},lineHeight:{$section:"typography",$order:30,type:"string",$units:["px","rem","em","%"],$keywords:["normal"]},letterSpacing:{$section:"typography",$order:31,type:"string",$units:["px","rem","em"],$keywords:["normal"]},wordSpacing:{$section:"typography",$order:32,type:"string",$units:["px","rem","em"],$keywords:["normal"]},color:{$section:"typography",$order:40,type:"string",format:"color"},textAlign:{$section:"typography",$order:50,type:"string",$input:"button-group",$buttonValues:["left","center","right","justify"],$icons:{left:"text-align-left",center:"text-align-center",right:"text-align-right",justify:"text-align-justify"},enum:["left","right","center","justify","start","end"]},textTransform:{$section:"typography",$order:51,type:"string",enum:["none","uppercase","lowercase","capitalize"]},textDecoration:{$section:"typography",$order:52,type:"string",examples:["none","underline","overline","line-through","underline wavy"]},textOverflow:{$section:"typography",$order:53,type:"string",enum:["clip","ellipsis"],$show:[{prop:"overflow",values:["hidden","clip","auto","scroll"]}]},whiteSpace:{$section:"typography",$order:54,type:"string",enum:["normal","nowrap","pre","pre-wrap","pre-line","break-spaces"]},wordBreak:{$section:"typography",$order:55,type:"string",enum:["normal","break-all","keep-all","break-word"]},verticalAlign:{$section:"typography",$order:56,type:"string",examples:["baseline","top","middle","bottom","text-top","text-bottom","sub","super"]},textShadow:{$section:"typography",$order:60,type:"string"},listStyleType:{$section:"typography",$order:70,type:"string",enum:["none","disc","decimal","circle","square","lower-alpha","upper-alpha","lower-roman","upper-roman"]},backgroundColor:{$section:"background",$order:10,type:"string",format:"color"},backgroundImage:{$section:"background",$order:20,type:"string",examples:["none","linear-gradient(to bottom, #fff, #000)","radial-gradient(circle, #fff, #000)"]},backgroundSize:{$section:"background",$order:21,type:"string",examples:["auto","cover","contain","100% 100%"]},backgroundPosition:{$section:"background",$order:22,type:"string",examples:["center","top","bottom","left","right","center center","top left","bottom right"]},backgroundRepeat:{$section:"background",$order:23,type:"string",enum:["repeat","no-repeat","repeat-x","repeat-y","space","round"]},backgroundAttachment:{$section:"background",$order:24,type:"string",enum:["scroll","fixed","local"]},backgroundClip:{$section:"background",$order:25,type:"string",enum:["border-box","padding-box","content-box","text"]},backgroundOrigin:{$section:"background",$order:26,type:"string",enum:["border-box","padding-box","content-box"]},opacity:{$section:"background",$order:40,type:"number",minimum:0,maximum:1},border:{$section:"border",$order:10,type:"string",$shorthand:!0,$shorthandType:"border-side",$longhands:["borderWidth","borderStyle","borderColor"]},borderWidth:{$section:"border",$order:11,type:"string",$shorthand:!0},borderStyle:{$section:"border",$order:12,type:"string",enum:["none","solid","dashed","dotted","double","groove","ridge","inset","outset","hidden"]},borderColor:{$section:"border",$order:13,type:"string",format:"color"},borderTop:{$section:"border",$order:13.1,type:"string",$shorthand:!0,$shorthandType:"border-side",$longhands:["borderTopWidth","borderTopStyle","borderTopColor"]},borderRight:{$section:"border",$order:13.2,type:"string",$shorthand:!0,$shorthandType:"border-side",$longhands:["borderRightWidth","borderRightStyle","borderRightColor"]},borderBottom:{$section:"border",$order:13.3,type:"string",$shorthand:!0,$shorthandType:"border-side",$longhands:["borderBottomWidth","borderBottomStyle","borderBottomColor"]},borderLeft:{$section:"border",$order:13.4,type:"string",$shorthand:!0,$shorthandType:"border-side",$longhands:["borderLeftWidth","borderLeftStyle","borderLeftColor"]},borderBlockStart:{$section:"border",$order:13.5,type:"string",$shorthand:!0,$shorthandType:"border-side",$longhands:["borderBlockStartWidth","borderBlockStartStyle","borderBlockStartColor"]},borderBlockEnd:{$section:"border",$order:13.6,type:"string",$shorthand:!0,$shorthandType:"border-side",$longhands:["borderBlockEndWidth","borderBlockEndStyle","borderBlockEndColor"]},borderInlineStart:{$section:"border",$order:13.7,type:"string",$shorthand:!0,$shorthandType:"border-side",$longhands:["borderInlineStartWidth","borderInlineStartStyle","borderInlineStartColor"]},borderInlineEnd:{$section:"border",$order:13.8,type:"string",$shorthand:!0,$shorthandType:"border-side",$longhands:["borderInlineEndWidth","borderInlineEndStyle","borderInlineEndColor"]},borderTopWidth:{$section:"border",$order:14,type:"string",$units:["px","rem","em"],$shorthand:"borderWidth"},borderTopStyle:{$section:"border",$order:15,$shorthand:"borderTop",type:"string",enum:["none","solid","dashed","dotted","double","groove","ridge","inset","outset","hidden"]},borderTopColor:{$section:"border",$order:16,$shorthand:"borderTop",type:"string",format:"color"},borderRightWidth:{$section:"border",$order:17,type:"string",$units:["px","rem","em"],$shorthand:"borderWidth"},borderRightStyle:{$section:"border",$order:18,$shorthand:"borderRight",type:"string",enum:["none","solid","dashed","dotted","double","groove","ridge","inset","outset","hidden"]},borderRightColor:{$section:"border",$order:19,$shorthand:"borderRight",type:"string",format:"color"},borderBottomWidth:{$section:"border",$order:20,type:"string",$units:["px","rem","em"],$shorthand:"borderWidth"},borderBottomStyle:{$section:"border",$order:21,$shorthand:"borderBottom",type:"string",enum:["none","solid","dashed","dotted","double","groove","ridge","inset","outset","hidden"]},borderBottomColor:{$section:"border",$order:22,$shorthand:"borderBottom",type:"string",format:"color"},borderLeftWidth:{$section:"border",$order:23,type:"string",$units:["px","rem","em"],$shorthand:"borderWidth"},borderLeftStyle:{$section:"border",$order:24,$shorthand:"borderLeft",type:"string",enum:["none","solid","dashed","dotted","double","groove","ridge","inset","outset","hidden"]},borderLeftColor:{$section:"border",$order:25,$shorthand:"borderLeft",type:"string",format:"color"},borderRadius:{$section:"border",$order:30,type:"string",$shorthand:!0},borderTopLeftRadius:{$section:"border",$order:31,type:"string",$units:["px","rem","em","%"],$shorthand:"borderRadius"},borderTopRightRadius:{$section:"border",$order:32,type:"string",$units:["px","rem","em","%"],$shorthand:"borderRadius"},borderBottomRightRadius:{$section:"border",$order:33,type:"string",$units:["px","rem","em","%"],$shorthand:"borderRadius"},borderBottomLeftRadius:{$section:"border",$order:34,type:"string",$units:["px","rem","em","%"],$shorthand:"borderRadius"},outline:{$section:"border",$order:40,type:"string"},outlineOffset:{$section:"border",$order:41,type:"string",$units:["px","rem","em"]},borderBlockStartWidth:{$section:"border",$order:50,type:"string",$units:["px","rem","em"],$shorthand:"borderBlockStart"},borderBlockStartStyle:{$section:"border",$order:51,type:"string",enum:["none","solid","dashed","dotted","double","groove","ridge","inset","outset","hidden"],$shorthand:"borderBlockStart"},borderBlockStartColor:{$section:"border",$order:52,type:"string",format:"color",$shorthand:"borderBlockStart"},borderBlockEndWidth:{$section:"border",$order:53,type:"string",$units:["px","rem","em"],$shorthand:"borderBlockEnd"},borderBlockEndStyle:{$section:"border",$order:54,type:"string",enum:["none","solid","dashed","dotted","double","groove","ridge","inset","outset","hidden"],$shorthand:"borderBlockEnd"},borderBlockEndColor:{$section:"border",$order:55,type:"string",format:"color",$shorthand:"borderBlockEnd"},borderInlineStartWidth:{$section:"border",$order:56,type:"string",$units:["px","rem","em"],$shorthand:"borderInlineStart"},borderInlineStartStyle:{$section:"border",$order:57,type:"string",enum:["none","solid","dashed","dotted","double","groove","ridge","inset","outset","hidden"],$shorthand:"borderInlineStart"},borderInlineStartColor:{$section:"border",$order:58,type:"string",format:"color",$shorthand:"borderInlineStart"},borderInlineEndWidth:{$section:"border",$order:59,type:"string",$units:["px","rem","em"],$shorthand:"borderInlineEnd"},borderInlineEndStyle:{$section:"border",$order:60,type:"string",enum:["none","solid","dashed","dotted","double","groove","ridge","inset","outset","hidden"],$shorthand:"borderInlineEnd"},borderInlineEndColor:{$section:"border",$order:61,type:"string",format:"color",$shorthand:"borderInlineEnd"},boxShadow:{$section:"effects",$order:10,type:"string",examples:["none","0 1px 3px rgba(0,0,0,0.12)","0 4px 6px rgba(0,0,0,0.1)","inset 0 1px 2px rgba(0,0,0,0.1)"]},filter:{$section:"effects",$order:20,type:"string",examples:["none","blur(4px)","brightness(1.2)","contrast(0.8)","grayscale(100%)","saturate(1.5)"]},backdropFilter:{$section:"effects",$order:21,type:"string",examples:["none","blur(4px)","brightness(1.2)","contrast(0.8)","grayscale(100%)","saturate(1.5)"]},transform:{$section:"effects",$order:30,type:"string",examples:["none","translateX(0)","translateY(0)","rotate(0deg)","scale(1)","skewX(0deg)"]},transformOrigin:{$section:"effects",$order:31,type:"string",examples:["center","top","bottom","left","right","top left","top right","bottom left","bottom right","center center"]},transition:{$section:"effects",$order:40,type:"string",examples:["none","all 0.2s ease","opacity 0.2s ease","transform 0.2s ease","background-color 0.2s ease"]},animationName:{$section:"effects",$order:41,type:"string"},animationDuration:{$section:"effects",$order:42,type:"string",$units:["s","ms"],$show:[{prop:"animationName",values:[]}]},animationTimingFunction:{$section:"effects",$order:43,type:"string",enum:["ease","linear","ease-in","ease-out","ease-in-out","step-start","step-end"],$show:[{prop:"animationName",values:[]}]},animationFillMode:{$section:"effects",$order:44,type:"string",enum:["none","forwards","backwards","both"],$show:[{prop:"animationName",values:[]}]},animationIterationCount:{$section:"effects",$order:45,type:"string",examples:["1","2","3","infinite"],$show:[{prop:"animationName",values:[]}]},cursor:{$section:"effects",$order:50,type:"string",enum:["auto","default","pointer","text","move","not-allowed","grab","grabbing","crosshair","help","wait","zoom-in","zoom-out","none"]},pointerEvents:{$section:"effects",$order:51,type:"string",enum:["auto","none"]},userSelect:{$section:"effects",$order:52,type:"string",enum:["auto","none","text","all","contain"]},visibility:{$section:"effects",$order:53,type:"string",enum:["visible","hidden","collapse"]},resize:{$section:"effects",$order:54,type:"string",enum:["none","both","horizontal","vertical"]},appearance:{$section:"effects",$order:55,type:"string",enum:["auto","none"]}}};var et=new Map;function WS(e){et=new Map(e.cssProps)}function xe(){return et}function cn(e,t){let n=t[e.prop]??"";if(e.values.length===0)return n!==""&&n!=="initial";return e.values.includes(n)}function tt(e,t){return(e.$show??[]).every((n)=>cn(n,t))}function rt(e,t){let n=e.style||{},o={...t};for(let r of Object.keys(n)){if(typeof n[r]==="object")continue;let i=P.$defs[r]?.$section??"other";if(o[i]===void 0)o[i]=!0}return o}function B(e){let t=P.$defs[e];if(t?.$longhands)return t.$longhands.map((o)=>({entry:P.$defs[o]||{$order:0},name:o})).toSorted((o,r)=>o.entry.$order-r.entry.$order);let n=[];for(let[o,r]of Object.entries(P.$defs))if(r.$shorthand===e)n.push({entry:r,name:o});return n.sort((o,r)=>o.entry.$order-r.entry.$order),n}function at(e,t){if(!e)return Array.from({length:t},()=>"");let n=e.trim().split(/\s+/);if(t!==4||n.length===0)return Array.from({length:t},()=>"");if(n.length===1)return[n[0],n[0],n[0],n[0]];if(n.length===2)return[n[0],n[1],n[0],n[1]];if(n.length===3)return[n[0],n[1],n[2],n[1]];return[n[0],n[1],n[2],n[3]]}function it(e){let[t,n,o,r]=e;if(t===n&&n===o&&o===r)return t;if(t===o&&n===r)return`${t} ${n}`;if(n===r)return`${t} ${n} ${o}`;return`${t} ${n} ${o} ${r}`}var pn=new Set(["none","solid","dashed","dotted","double","groove","ridge","inset","outset","hidden"]);function st(e){if(!e)return["","",""];let t=[],n="",o=0;for(let s of e.trim()){if(s==="(")o+=1;if(s===")")o-=1;if(s===" "&&o===0){if(n)t.push(n);n=""}else n+=s}if(n)t.push(n);let r="",a="",i="";for(let s of t)if(!a&&pn.has(s))a=s;else if(!r&&/^[\d.]/.test(s))r=s;else i=i?`${i} ${s}`:s;return[r,a,i]}function lt(e){return e.filter((t)=>t&&t.trim()).join(" ")}function dt(){let e=qo(u.value?.doc.document?.style),t=[];for(let[n,o]of Object.entries(e))if(n.startsWith("--font")&&(typeof o==="string"||typeof o==="number"))t.push({name:n,value:String(o)});return t}var ct={fontStyle:"slant",fontVariant:"variant",fontWeight:"weight",textDecoration:"decoration",textTransform:"transform"};var oe=/^(-?[\d.]+)(px|rem|em|%|vw|vh|svw|svh|dvh|ms|s|fr|ch|ex|deg)?$/;var pt={$schema:"https://jxsuite.com/schema/v1",$id:"StudioStylePanel",$description:"The Inspector's Style tab: the Target Line's host, one filter, then the CSS property accordion — every row saying where its value came from (§6.7), every section heading tallying what is set inside it. Nothing here knows what CSS is. `panels/style-panel.ts` resolves the compound coordinate (selection, breakpoint, scheme layer, nested selector), reads css-meta, decides which of seven controls a property gets, works out its provenance and what a commit writes; this document draws the answer and decides nothing. That split is what lets the tab stop going through `panels/panel-scheduler.ts`: the focus guard existed because a lit repaint of the whole panel could take the field a reader was typing into, and a document is one runtime effect per bound property with an equal write skipped.",tagName:"div",attributes:{part:"panel"},style:{$description:"What `.style-sidebar`, `.style-filter-bar`, `.style-row`, `.style-row-label`, `.style-row--child`, `.style-row--warning`, `.style-shorthand-header`, `.style-section-body--grid`, `.kv-row`, `.kv-key`, `.kv-val`, `.input-group`, `.style-input-number-unit`, `.button-group-combo`, `.provenance-chip*`, `.set-dot` and `.provenance-dots` said across `styles/inspector.css` and `styles/overlays.css`, keyed on `part` and re-pointed at the kit's token layer. The rules those parts replace are DEAD in the stylesheets now rather than shared: `ui/field-row.ts` drew the same row for the Signals panel and the expression editor, and it is gone with them, so `.style-row*`, `.provenance-chip*` and `.set-dot` no longer have an emitter. Every `--spectrum-*` reference is gone rather than renamed — those names resolve only inside `<sp-theme>`, and this document is mounted in the Inspector's tab body, outside it, so each would silently have taken its hard-coded px fallback. The one deliberate change is the provenance chip: it is a `button` wherever it acts, drawn at the same 6px, because a 6px circle that clears a property was reachable by mouse alone.",display:"flex",flexDirection:"column",minHeight:"0",fontFamily:"var(--jx-font-sans)",color:"var(--jx-fg)",'& [part="empty"]':{$description:"The one empty-state pattern (`panels/empty-state.ts`), drawn here because a document cannot render a lit helper. Its rules are what is kept (studio-ui-guidelines.md §11): one sentence saying what the region is FOR, then the action that fills it.",display:"flex",flexDirection:"column",alignItems:"center",gap:"var(--jx-space-3)",padding:"var(--jx-space-6)",textAlign:"center",fontSize:"var(--jx-text-md)",color:"var(--jx-fg-dim)"},'& [part="empty-message"]':{margin:"0",maxWidth:"34ch",lineHeight:"1.5"},'& [part="filter"]':{padding:"var(--jx-space-2) var(--jx-space-3)",borderBottom:"1px solid var(--jx-border)"},'& [part="rows"]':{display:"flex",flexDirection:"column",minWidth:"0"},'& [part="rows"][data-layout="grid"]':{$description:"The Size section only. Two equal columns that may both shrink to nothing, so a long value scrolls inside its own control instead of pushing the pane wider.",display:"grid",gridTemplateColumns:"minmax(0, 1fr) minmax(0, 1fr)",gap:"var(--jx-space-2) var(--jx-space-3)"},'& [part="rows"] > [part="row"]':{$description:'Scoped to the panel\'s OWN rows rather than to every `part="row"` beneath it, and that is load-bearing now that a colour row draws a `jx-color-field`. The kit is light DOM and one cascade, so `[part="row"]` as a bare descendant also matches the field\'s internal row — and at equal specificity with the kit\'s own `& > [part="row"]` the winner is whichever sheet was interned later, which is not a thing a stylesheet may depend on. The same reasoning moved `[part="chip"]` under `[part="chip-slot"]`, where `background: none` would otherwise have erased a swatch\'s colour, and `[part="control"]` under its row, where `> *` would have stretched a swatch\'s chip.',display:"flex",flexDirection:"column",alignItems:"stretch",gap:"2px",padding:"2px 0",minWidth:"0"},'& [part="rows"] > [part="row"][data-span="2"]':{gridColumn:"1 / -1"},'& [part="rows"] > [part="row"][data-child="true"]':{paddingLeft:"var(--jx-space-5)"},'& [part="row-label"]':{display:"flex",alignItems:"center",gap:"var(--jx-space-2)",fontSize:"var(--jx-text-xs)",color:"var(--jx-fg-dim)"},'& [part="rows"] > [part="row"][data-warning="true"] > [part="row-label"]':{color:"var(--jx-warning)","::before":{content:'"⚠ "'}},'& [part="label"]':{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},'& [part="rows"] > [part="row"] > [part="control"]':{display:"flex",alignItems:"center",gap:"var(--jx-space-1)",minWidth:"0"},'& [part="rows"] > [part="row"] > [part="control"] > *':{flex:"1",minWidth:"0"},'& [part="color"]':{display:"flex",minWidth:"0"},'& [part="color"] > [part="color-field"]':{flex:"1",minWidth:"0"},'& [part="color-field"] > [part="row"]':{$description:"The field is `inline-flex` around a row sized to its own contents, which is right where it stands in a sentence and wrong where it IS the width of a dock. Two declarations, not a restatement of the kit's layout: the field still lays itself out.",flex:"1",minWidth:"0"},'& [part="color-field"] [part="text"]':{flex:"1",inlineSize:"auto",minInlineSize:"0"},'& [part="chip-slot"] > [part="chip"]':{$description:"One vocabulary, five states (§6.7). `default` draws nothing at all — absence IS the ghost — which is why there is no rule for it: the document never makes the node. `set` is the 6px accent disc `.set-dot` has always been; the two that carry information wear their donor's name in a bordered pill, and `mixed` is neutral on purpose because it says nothing about WHERE a value came from, only that the selection disagrees.",display:"inline-flex",alignItems:"center",flexShrink:"0",margin:"0",padding:"0",border:"none",background:"none",color:"inherit",font:"inherit",fontSize:"var(--jx-text-xs)"},'& [part="chip-slot"] > button[part="chip"]':{cursor:"pointer",":focus-visible":{outline:"var(--jx-focus-ring)",outlineOffset:"1px"}},'& [part="chip-slot"] > [part="chip"][data-state="set"]':{width:"6px",height:"6px",borderRadius:"50%",background:"var(--jx-accent)"},'& [part="chip-slot"] > button[part="chip"][data-state="set"]:hover':{background:"var(--jx-danger)"},'& [part="chip-slot"] > [part="chip"][data-state="inherited"], & [part="chip-slot"] > [part="chip"][data-state="bound"], & [part="chip-slot"] > [part="chip"][data-state="mixed"]':{maxWidth:"16ch",overflow:"hidden",padding:"0 var(--jx-space-2)",border:"1px solid currentcolor",borderRadius:"var(--jx-radius-sm)",lineHeight:"14px",whiteSpace:"nowrap",textOverflow:"ellipsis"},'& [part="chip-slot"] > [part="chip"][data-state="inherited"]':{color:"var(--jx-warning)"},'& [part="chip-slot"] > [part="chip"][data-state="bound"]':{color:"var(--jx-handler)"},'& [part="chip-slot"] > [part="chip"][data-state="mixed"]':{color:"var(--jx-fg-muted)"},'& [part="dots"]':{display:"inline-flex",alignItems:"center",gap:"3px"},'& [part="dot"]':{$description:"A collapsed heading has room for a tally, not for three labelled chips, so the two states that normally carry text collapse to coloured discs beside the accent one. That tally is what retired the tab's Active filter toggle: the toggle existed only because a closed section could not say whether anything inside it was set.",display:"inline-block",flex:"none",width:"7px",height:"7px",margin:"0",padding:"0",border:"none",borderRadius:"50%",background:"var(--jx-fg-muted)"},'& button[part="dot"]':{cursor:"pointer",":focus-visible":{outline:"var(--jx-focus-ring)",outlineOffset:"1px"}},'& [part="dot"][data-state="set"]':{background:"var(--jx-accent)"},'& button[part="dot"][data-state="set"]:hover':{background:"var(--jx-danger)"},'& [part="dot"][data-state="inherited"]':{background:"var(--jx-warning)"},'& [part="dot"][data-state="bound"]':{background:"var(--jx-handler)"},'& [part="source"]':{$description:"The Value Source chip (§6.6): quiet while the value is a literal, accent-tinted the moment it is produced from something else. A CSS declaration has exactly two rungs — `JxStyle` admits no `$ref` — so the picker it opens is two rows, and that is derived from the schema rather than written here.",flex:"none",color:"var(--jx-fg-dim)"},'& [part="source"][data-source="template"]':{color:"var(--jx-accent)"},'& [part="group"]':{$description:"The composite the kit draws as two elements on purpose: a field the reader may type anything into, beside a button that opens the kit MENU. It is the unit row, and it is not a combobox, because its list runs a VERB rather than committing a value — a unit re-attaches to the number the field holds (ui.md §5.5, jx-dimension-field). The keyword rows and the font row, whose list IS the value, are `jx-combobox` (the `keywords` case).",display:"flex",flex:"1",alignItems:"stretch",gap:"0",minWidth:"0"},'& [part="group"] > jx-textfield':{flex:"1 1 auto",minWidth:"0"},'& [part="group-open"]':{flex:"0 0 auto",marginInlineStart:"calc(-1 * 1px)"},'& [part="buttons"]':{display:"flex",flex:"1",alignItems:"stretch",minWidth:"0"},'& [part="buttons"] jx-action-group':{minWidth:"0"},'& [part="shorthand"]':{display:"flex",alignItems:"center",gap:"var(--jx-space-1)",minWidth:"0"},'& [part="shorthand"] > jx-textfield':{flex:"1",minWidth:"0"},'& [part="kv"]':{display:"flex",gap:"var(--jx-space-1)",marginBottom:"3px",minWidth:"0"},'& [part="kv-key"]':{width:"90px",flexShrink:"0"},'& [part="kv-value"]':{flex:"1",minWidth:"0"},'& [part="nested"]':{display:"flex",alignItems:"center",gap:"var(--jx-space-1)",padding:"2px 0",minWidth:"0"},'& [part="nested-open"]':{flex:"1",overflow:"hidden",padding:"var(--jx-space-2) var(--jx-space-3)",border:"none",borderRadius:"var(--jx-radius-sm)",background:"var(--jx-bg-panel)",color:"var(--jx-fg)",font:"inherit",fontSize:"var(--jx-text-sm)",fontFamily:"var(--jx-font-mono)",textAlign:"left",textOverflow:"ellipsis",whiteSpace:"nowrap",cursor:"pointer",":hover":{background:"var(--jx-hover-bg)",color:"var(--jx-accent)"},":focus-visible":{outline:"var(--jx-focus-ring)",outlineOffset:"-1px"}},'& [part="nested-add"]':{width:"100%",padding:"var(--jx-space-2) var(--jx-space-3)",border:"1px dashed var(--jx-border-strong)",borderRadius:"var(--jx-radius-sm)",background:"none",color:"var(--jx-fg-dim)",font:"inherit",fontSize:"var(--jx-text-sm)",cursor:"pointer",":hover":{color:"var(--jx-accent)",borderColor:"var(--jx-accent-50)"},":focus-visible":{outline:"var(--jx-focus-ring)",outlineOffset:"1px"}}},children:[{tagName:"div",attributes:{part:"view-slot",role:"none"},style:{display:"contents"},$switch:{$ref:"#/state/view"},cases:{empty:{tagName:"div",attributes:{part:"empty"},children:[{tagName:"p",attributes:{part:"empty-message"},textContent:"${state.emptyMessage}"},{tagName:"span",attributes:{part:"empty-action-slot",role:"none"},style:{display:"contents"},$switch:{$ref:"#/state/hasEmptyAction"},cases:{true:{tagName:"jx-button",attributes:{part:"empty-action"},$props:{size:"sm"},onclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/runEmptyAction"},value:[]}]},children:[{tagName:"span",textContent:"${state.emptyActionLabel}"}]}}}]},editor:{tagName:"div",attributes:{part:"editor",role:"none"},style:{display:"contents"},children:[{$description:"The Target Line's own host. It is EMPTY on purpose and stays empty: `surfaces/target-line.ts` mounts a second document into it, announced through `onNodeCreated` rather than found by selector (studio-ui-guidelines.md §9.4), so the line survives every repaint of the tab around it.",tagName:"div",attributes:{part:"target-host"}},{tagName:"div",attributes:{part:"filter"},children:[{tagName:"jx-textfield",attributes:{part:"filter-input"},$props:{size:"sm",type:"search",clearable:!0,label:"Filter properties",placeholder:"Filter properties…",value:{$ref:"#/state/filter"}},oninput:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/setFilter"},value:[{$ref:"event#/target/value"}]}]}}]},{tagName:"jx-accordion",attributes:{part:"sections"},$props:{multiple:!0},children:[{$prototype:"Array",items:{$ref:"#/state/sections"},key:{$ref:"$map/item/key"},map:{tagName:"jx-accordion-item",attributes:{part:"section","data-section":"${$map.item.key}"},$props:{label:{$ref:"$map/item/label"},open:{$ref:"$map/item/open"}},ontoggle:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/toggleSection"},value:[{$ref:"$map/item/key"},{$ref:"event#/detail"}]}]},children:[{$description:"The inert half of the tally goes in the heading slot and the one control in the actions slot, which is the element's own division: a click on the actions row cancels the summary's toggle, and a click on an inert mark slotted there would cancel it for nothing.",tagName:"span",attributes:{part:"dots",slot:"heading",hidden:"${$map.item.hasMarks ? null : ''}",title:"${$map.item.tally}","aria-label":"${$map.item.tally}"},children:[{$prototype:"Array",items:{$ref:"$map/item/marks"},key:{$ref:"$map/item/state"},map:{tagName:"span",attributes:{part:"dot","data-state":"${$map.item.state}"}}}]},{tagName:"span",attributes:{part:"actions-slot",slot:"actions",role:"none"},style:{display:"contents"},$switch:{$ref:"$map/item/canClear"},cases:{true:{tagName:"button",attributes:{part:"dot",type:"button","data-state":"set","data-clear":"${$map.item.key}",title:"${$map.item.clearTitle}","aria-label":"${$map.item.clearTitle}"},onclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/clearSection"},value:[{$ref:"$map/item/key"}]}]}}}},{tagName:"div",attributes:{part:"rows","data-layout":"${$map.item.layout}"},children:[{$prototype:"Array",items:{$ref:"$map/item/rows"},key:{$ref:"$map/item/key"},map:{tagName:"div",attributes:{part:"row","data-prop":"${$map.item.prop}","data-kind":"${$map.item.kind}","data-child":"${$map.item.child ? 'true' : null}","data-warning":"${$map.item.warning ? 'true' : null}","data-span":"${$map.item.span ? '2' : null}"},children:[{tagName:"div",attributes:{part:"row-label",hidden:"${$map.item.hasLabel ? null : ''}"},children:[{tagName:"span",attributes:{part:"chip-slot",role:"none"},style:{display:"contents"},$switch:{$ref:"$map/item/chip"},cases:{button:{tagName:"button",attributes:{part:"chip",type:"button","data-state":"${$map.item.chipState}",title:"${$map.item.chipTitle}","aria-label":"${$map.item.chipTitle}"},textContent:"${$map.item.chipText}",onclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/chipClick"},value:[{$ref:"$map/item/key"}]}]}},text:{tagName:"span",attributes:{part:"chip","data-state":"${$map.item.chipState}",title:"${$map.item.chipTitle}"},textContent:"${$map.item.chipText}"}}},{tagName:"span",attributes:{part:"label",title:"${$map.item.prop}"},textContent:"${$map.item.label}"},{tagName:"span",attributes:{part:"source-slot",role:"none"},style:{display:"contents"},$switch:{$ref:"$map/item/hasSource"},cases:{true:{tagName:"jx-action-button",attributes:{part:"source","data-source":"${$map.item.sourceState}"},$props:{size:"sm",quiet:!0,haspopup:"menu",label:{$ref:"$map/item/sourceHint"},hint:{$ref:"$map/item/sourceHint"}},onclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/pickSource"},value:[{$ref:"$map/item/key"},{$ref:"event#/currentTarget"}]}]},children:[{tagName:"span",textContent:"${$map.item.sourceLabel}"}]}}}]},{tagName:"div",attributes:{part:"control",role:"none"},style:{display:"contents"},$switch:{$ref:"$map/item/widget"},cases:{text:{tagName:"jx-textfield",attributes:{part:"text"},$props:{size:"sm",label:{$ref:"$map/item/label"},value:{$ref:"$map/item/value"},placeholder:{$ref:"$map/item/placeholder"},mono:{$ref:"$map/item/mono"}},oninput:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/editText"},value:[{$ref:"$map/item/key"},{$ref:"event#/target/value"}]}]},onchange:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/commitText"},value:[{$ref:"$map/item/key"},{$ref:"event#/target/value"}]}]}},number:{tagName:"jx-number-field",attributes:{part:"number"},$props:{size:"sm",label:{$ref:"$map/item/label"},value:{$ref:"$map/item/value"},placeholder:{$ref:"$map/item/placeholder"},min:{$ref:"$map/item/min"},max:{$ref:"$map/item/max"},step:{$ref:"$map/item/step"},stepper:!1},onchange:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/commitText"},value:[{$ref:"$map/item/key"},{$ref:"event#/target/value"}]}]}},keywords:{$description:"A keyword row, and the font row: one `jx-combobox` with `allows-custom-value` over the values worth offering (ui.md §5.3). The field IS the value and the rows under it are suggestions, which is the whole of what an enum means on a style property — `text-transform: full-width` is a value whether or not the catalogue lists it, so the list never refuses. A typography row's options carry the kit's drawing channels, so `700` is set in 700 and `Italic` leans, each in the element's own face; the font row's carry `face`, so every font is its own specimen, which is what a menu row could never be (ui.md §5.1: a picker you choose by LOOKING is not a menu). Both handlers read the ELEMENT's value, because a pick announces from the element while typing lets the control's own event bubble, and `currentTarget` is the one node both name. What a font pick WRITES is the adapter's, not the row's: the field holds a token's name, and the commit points the property at it, minting the token first when the name is a preset's.",tagName:"jx-combobox",attributes:{part:"text"},$props:{size:"sm",label:{$ref:"$map/item/label"},value:{$ref:"$map/item/value"},placeholder:{$ref:"$map/item/placeholder"},allowsCustomValue:!0,options:{$ref:"$map/item/options"}},oninput:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/editText"},value:[{$ref:"$map/item/key"},{$ref:"event#/currentTarget/value"}]}]},onchange:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/commitText"},value:[{$ref:"$map/item/key"},{$ref:"event#/currentTarget/value"}]}]}},group:{$description:"The dual-mode control: a number beside its unit. Type what you mean, or take a unit from the list — and the list is the kit MENU rather than a second popup of this document's own (studio-ui-guidelines.md §12.5), because every row of it is a verb: a unit re-attaches to the number the field holds. A keyword row, whose list commits a value, is the `keywords` case instead — and so is the font row now, because a font is chosen by looking and a menu row cannot draw itself in its own face.",tagName:"div",attributes:{part:"group"},children:[{tagName:"jx-textfield",attributes:{part:"text"},$props:{size:"sm",label:{$ref:"$map/item/label"},value:{$ref:"$map/item/value"},placeholder:{$ref:"$map/item/placeholder"},mono:{$ref:"$map/item/mono"}},oninput:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/editText"},value:[{$ref:"$map/item/key"},{$ref:"event#/target/value"}]}]},onchange:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/commitText"},value:[{$ref:"$map/item/key"},{$ref:"event#/target/value"}]}]}},{tagName:"span",attributes:{part:"group-open-slot",role:"none"},style:{display:"contents"},$switch:{$ref:"$map/item/hasChoices"},cases:{true:{tagName:"jx-action-button",attributes:{part:"group-open"},$props:{size:"sm",haspopup:"menu",label:{$ref:"$map/item/choicesHint"},hint:{$ref:"$map/item/choicesHint"}},onclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/pickChoice"},value:[{$ref:"$map/item/key"},{$ref:"event#/currentTarget"}]}]},children:[{tagName:"span",textContent:"${$map.item.choicesLabel}"}]}}}]},buttons:{tagName:"div",attributes:{part:"buttons"},children:[{tagName:"jx-action-group",$props:{selects:"single",compact:!0,label:{$ref:"$map/item/label"}},children:[{$prototype:"Array",items:{$ref:"$map/item/buttons"},key:{$ref:"$map/item/value"},map:{tagName:"jx-action-button",attributes:{part:"button","data-value":"${$map.item.value}"},$props:{size:"sm",icon:{$ref:"$map/item/icon"},label:{$ref:"$map/item/title"},hint:{$ref:"$map/item/title"},checked:{$ref:"$map/item/checked"}},onclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/pressButton"},value:[{$ref:"$map/item/row"},{$ref:"$map/item/value"}]}]},children:[{$description:"The abbreviation, for a value with no glyph, and HIDDEN rather than empty on a button that has one. The kit's `[part=\"label\"]` is `display: contents`, so an empty span is still a flex item in the control, and the control's 4px gap sits between the glyph and nothing: every icon button in the tab drew 26px wide with its glyph pushed 2px off centre, instead of 22px and centred. Hidden, it takes no box, and the button's name and tooltip are the value either way.",tagName:"span",attributes:{hidden:"${$map.item.text ? null : ''}"},textContent:"${$map.item.text}"}]}}]},{tagName:"span",attributes:{part:"overflow-slot",role:"none"},style:{display:"contents"},$switch:{$ref:"$map/item/hasChoices"},cases:{true:{tagName:"jx-action-button",attributes:{part:"group-open"},$props:{size:"sm",icon:"dots-three",haspopup:"menu",selected:{$ref:"$map/item/overflowSelected"},label:{$ref:"$map/item/choicesHint"},hint:{$ref:"$map/item/choicesHint"}},onclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/pickChoice"},value:[{$ref:"$map/item/key"},{$ref:"event#/currentTarget"}]}]}}}}]},color:{$description:"The colour row, and the whole of it: `ui.md` §5.6 landed, so the swatch, the value, the saturation square, the hue track and the project's own palette are ONE element rather than an announced `[part=\"control-host\"]` a lit island filled. The listener is on the WRAPPER and not on the field, and that is the field's own contract rather than a preference. `jx-color-field` stops its five inner controls' native events at its root and re-says the platform's two names FROM the host, so an ancestor hears exactly one `input` and one `change` per gesture with `e.target` being the field — while a listener on the field itself hears BOTH, including the raw `change` of a text box holding a half-typed word the field has just refused. Bound there, `not a colour` would have been committed as a colour.",tagName:"div",attributes:{part:"color",role:"none"},oninput:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/editText"},value:[{$ref:"$map/item/key"},{$ref:"event#/target/value"}]}]},onchange:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/commitText"},value:[{$ref:"$map/item/key"},{$ref:"event#/target/value"}]}]},children:[{tagName:"jx-color-field",attributes:{part:"color-field"},$props:{size:"sm",label:{$ref:"$map/item/label"},value:{$ref:"$map/item/value"},resolved:{$ref:"$map/item/resolved"},alpha:!0},children:[{tagName:"span",attributes:{part:"palette-slot",slot:"tokens",role:"none"},style:{display:"contents"},$switch:{$ref:"$map/item/hasTokens"},cases:{true:{$description:"The palette's `change` is caught HERE, on the group, because it never gets out: the field routes it as its `palette` channel, stops it, and then declines it — a swatch that stands for `var(--color-accent)` is not a string the field can parse as a colour, which is exactly why the reference survives the click. A row that let the field answer instead would have committed the literal behind the token and quietly opted one declaration out of the palette for ever.",tagName:"jx-swatch-group",attributes:{part:"palette"},$props:{label:"Colour tokens",value:{$ref:"$map/item/value"}},onchange:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/commitText"},value:[{$ref:"$map/item/key"},{$ref:"event#/target/value"}]}]},children:[{$prototype:"Array",items:{$ref:"$map/item/tokens"},key:{$ref:"$map/item/value"},map:{tagName:"jx-swatch",attributes:{part:"token","data-token":"${$map.item.value}"},$props:{size:"sm",color:{$ref:"$map/item/color"},value:{$ref:"$map/item/value"},label:{$ref:"$map/item/label"}}}}]}}}]}]},shorthand:{tagName:"div",attributes:{part:"shorthand"},children:[{tagName:"jx-textfield",attributes:{part:"text"},$props:{size:"sm",label:{$ref:"$map/item/label"},value:{$ref:"$map/item/value"},placeholder:{$ref:"$map/item/placeholder"}},oninput:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/editText"},value:[{$ref:"$map/item/key"},{$ref:"event#/target/value"}]}]},onchange:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/commitText"},value:[{$ref:"$map/item/key"},{$ref:"event#/target/value"}]}]}},{tagName:"jx-action-button",attributes:{part:"expand"},$props:{size:"sm",quiet:!0,icon:{$ref:"$map/item/expandIcon"},expanded:{$ref:"$map/item/expanded"},label:{$ref:"$map/item/expandLabel"},hint:{$ref:"$map/item/expandLabel"}},onclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/toggleShorthand"},value:[{$ref:"$map/item/key"}]}]}}]},kv:{tagName:"div",attributes:{part:"kv"},children:[{tagName:"jx-textfield",attributes:{part:"kv-key"},$props:{size:"sm",mono:!0,label:"Property name",value:{$ref:"$map/item/name"}},onchange:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/renameCustom"},value:[{$ref:"$map/item/key"},{$ref:"event#/target/value"}]}]}},{tagName:"jx-textfield",attributes:{part:"kv-value"},$props:{size:"sm",label:"Value",value:{$ref:"$map/item/value"},placeholder:{$ref:"$map/item/placeholder"}},oninput:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/editText"},value:[{$ref:"$map/item/key"},{$ref:"event#/target/value"}]}]}},{tagName:"jx-action-button",attributes:{part:"kv-remove"},$props:{size:"sm",quiet:!0,icon:"x",label:{$ref:"$map/item/removeLabel"},hint:{$ref:"$map/item/removeLabel"}},onclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/chipClick"},value:[{$ref:"$map/item/key"}]}]}}]},kvadd:{tagName:"jx-textfield",attributes:{part:"kv-add"},$props:{size:"sm",mono:!0,label:"Add a CSS property",placeholder:"Property name…"},onkeydown:{$prototype:"Function",body:[{if:{operator:"===",target:{$ref:"event#/key"},value:"Enter"},then:[{preventDefault:!0},{operator:"call",target:{$ref:"#/state/addCustom"},value:[{$ref:"$map/item/key"},{$ref:"event#/target"}]}]}]}},nested:{tagName:"div",attributes:{part:"nested"},children:[{tagName:"button",attributes:{part:"nested-open",type:"button",title:"${$map.item.openTitle}"},textContent:"${$map.item.name}",onclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/openNested"},value:[{$ref:"$map/item/key"}]}]}},{tagName:"jx-action-button",attributes:{part:"nested-remove"},$props:{size:"sm",quiet:!0,icon:"trash",label:{$ref:"$map/item/removeLabel"},hint:{$ref:"$map/item/removeLabel"}},onclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/chipClick"},value:[{$ref:"$map/item/key"}]}]}}]},nestedadd:{tagName:"button",attributes:{part:"nested-add",type:"button"},textContent:"+ Add",onclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/addNested"},value:[]}]}}}}]}}]}]}}]}]}}}]};T("style-panel",pt);function mn(e){let t=typeof e==="string"?void 0:e.attributes?.part;return typeof t==="string"?t:""}function ut(e,t){e.view=t.view,e.emptyMessage=t.emptyMessage,e.hasEmptyAction=t.hasEmptyAction,e.emptyActionLabel=t.emptyActionLabel,e.filter=t.filter,e.sections=t.sections}function mt(e,t,n,o){let r=v({...n,emptyActionLabel:"",emptyMessage:"",filter:"",hasEmptyAction:!1,sections:[],view:"empty"});ut(r,t),e.replaceChildren();let a=null,i=!1;return R("style-panel",r,e,{onNodeCreated:(s,l,d)=>{if(s instanceof HTMLElement&&mn(d)==="target-host")o.target(s)}}).then((s)=>{if(i){s.dispose();return}a=s}),{connected:()=>!i&&(a===null?e.childNodes.length===0:a.root.parentNode===e),dispose(){i=!0,o.target(null),a?.dispose(),a=null},update:(s)=>ut(r,s)}}var gn={state:"default"};function Se(e){return/^[a-z]/.test(e)}function fn(e,t){let n=e;for(let o of t.split(" "))if(n=va(n,o),!n)return{};return n}function ie(e,t,n){let o=n?va(e,`@${n}`)??{}:e;if(t)return Se(t)?fn(o,t):va(o,t)??{};let r={};for(let[a,i]of Object.entries(o))if(typeof i!=="object")r[a]=i;return r}function xt(e,t,n){if(t&&Se(t)){let o=t.split(" ");return n?(r,a,i)=>BL(r,e,n,o,a,i):(r,a,i)=>vv(r,e,o,a,i)}if(t)return n?(o,r,a)=>HL(o,e,n,t,r,a):(o,r,a)=>bv(o,e,t,r,a);return n?(o,r,a)=>jL(o,e,n,r,a):(o,r,a)=>Sc(o,e,r,a)}function hn(e,t,n,o){let r=new Set;if(t.length<2)return r;let a=t.map((s)=>{let l=K(e.doc.document,s);return ie(l?.style??{},n,o)}),i=new Set;for(let s of a)for(let l of Object.keys(s))i.add(l);for(let s of i)if(gp(a.map((l)=>l[s]??null)).mixed)r.add(s);return r}var _=v({showAffected:!1,usageRevision:0});function O(e,t){ne()?.run(e,t)}function $n(e){return e&&Se(e)?e.split(" ")[0]??null:null}function yn(e){return/(?:^|\/)project\.json$/.test(e)}function bn(e,t){let n=e.documentPath??"",o=yn(n);if(!t)return o?gt("every page in this project",null):{kind:"element",label:"this element"};let r=o||/^\.?\/?layouts\//.test(n),a=`all <${t}> in this ${r?"project":"document"}`;return r?gt(a,t):{kind:"document",label:a}}function gt(e,t){if(t===null)return{affected:"how many pages that is, is unknown",kind:"project",label:e};let n={tagName:t};_.usageRevision;let o=wc(n);if(o===null)js(n).then(()=>{if(wc(n)!==null)_.usageRevision+=1});return{kind:"project",label:e,affected:vn(o),affectedFiles:o?.status==="ready"?im(o.result):[],showAffected:_.showAffected,onToggleAffected:()=>{_.showAffected=!_.showAffected}}}function vn(e){if(e===null||e.status==="pending")return"counting the elements it affects…";if(e.status!=="ready")return"how many elements that is, is unknown";let{files:t,refsTotal:n}=e.result;if(n===0)return"no element in the project uses it yet";return`${n} element${n===1?"":"s"} in ${t.length} file${t.length===1?"":"s"}`}function xn(e,t,n,o){let r=[{key:"element",label:e,title:"What these edits are pointed at — click to find it in the Outline",onActivate:()=>O("view.setActivity",{tab:"layers"})},{key:"media",label:n&&t?`@${bi(t)}`:"Base",title:"The breakpoint these edits land in. Choose it on the pane's Context control; click to manage breakpoints.",onActivate:()=>O("settings.open",{section:"contexts"})}];if(o)r.push({key:"scheme",label:`${bi(o)} variant`,title:"Edits land in this colour-scheme variant. Set the pane's Context control back to Auto to edit base styles; click to manage schemes.",onActivate:()=>O("settings.open",{section:"contexts"})});return r}function wn(e){if(typeof e!=="string")return null;return/\$\{\s*(?:state\.)?([A-Za-z_$][\w$]*)/.exec(e)?.[1]??null}function kn(e){return typeof e==="string"&&e.includes("${")}function se(e,t){if(t.mixed?.props.has(e))return{state:"mixed",donor:String(t.mixed.count),onClick:()=>t.clear(e)};let n=t.active[e];if(n!==void 0&&t.own[e]===void 0)return{state:"inherited",donor:"site tokens",title:`Inherited from the project's site tokens — ${e} is not set on this document`};if(n!==void 0){if(kn(n)){let r=wn(n);return{state:"bound",...r?{donor:r}:{},...r&&t.signals.includes(r)?{onClick:()=>{O("view.setActivity",{tab:"data"}),O("data.expandRow",{name:r})}}:{}}}return{state:"set",onClick:()=>t.clear(e)}}let o=t.inherited[e];if(o)return{state:"inherited",donor:o.donor,...o.jump?{onClick:o.jump}:{}};return{state:"default"}}function wt(e,t,n){let o=[e,...B(e).map((a)=>a.name)],{mixed:r}=t;if(r&&o.some((a)=>r.props.has(a)))return{state:"mixed",donor:String(r.count),...n?{onClick:n}:{}};for(let a of o){let i=se(a,t);if(i.state==="default")continue;return i.state==="set"&&n?{...i,onClick:n}:i}return gn}function Sn(e,t,n,o,r){let{mixed:a}=o;if(a&&(a.props.has(e)||n&&a.props.has(t)))return{state:"mixed",donor:String(a.count),onClick:r};let i=se(e,o);if(i.state==="set"||i.state==="default"&&n)return{state:"set",onClick:r};return i}function Cn(e,t){return e.map(({prop:n,entry:o})=>Nd(o)==="shorthand"?wt(n,t).state:se(n,t).state)}var F=new Map,Ce=new Map,Te=null,ke=new Map;function I(e){return F.get(e)}function Tn(e){return/^-?\d*\.?\d*$/.test(e)}function jn(e,t,n){let o=e.$buttonValues||e.enum||[],r=e.$icons||{},{$buttonValues:a,enum:i}=e,s=a&&i&&i.length>a.length?i.filter((d)=>!a.includes(d)):[];return{buttons:o.map((d)=>{let x=r[d]??"";return{icon:x,row:t,checked:d===n?"true":"false",text:x===""?d:"",title:d,value:d}}),extra:s}}function kt(e){return e.includes("-")?Cv(e):e.replace(/^./,(t)=>t.toUpperCase())}function En(e,t){return e.map((n)=>({checked:n===t,label:kt(n),value:n}))}function Ln(e,t,n){let o=ct[t];return e.map((r)=>{let a={label:kt(r),value:r};if(o)a[o]=r,a.face=n;return a})}function An(e){let t=e.activeStyle.fontFamily??e.inheritedStyle.fontFamily;if(typeof t!=="string"&&typeof t!=="number")return"";let n=ld(qo(e.tab.doc.document?.style),t);return n===void 0?"":String(n)}function St(e){return Array.isArray(e.presets)?e.presets:[]}function Rn(e){let t=dt(),n=qo(u.value?.doc.document?.style),o=t.map((r)=>({description:r.name,face:String(ld(n,r.value)??r.value),label:kv(r.name,"--font-"),value:r.name}));for(let r of St(e)){let a=_m(r.title,"--font-");if(!t.some((i)=>i.name===a))o.push({face:r.value,label:r.title,value:a})}return o}function ft(e,t,n,o){let r=t.trim();if(!r.startsWith("--")){o(t);return}if(n&&qo(u.value?.doc.document?.style)[r]===void 0){let a=St(e).find((i)=>_m(i.title,"--font-")===r);if(a)q(u.value,(i)=>Sc(i,[],r,a.value))}o(Zg(r))}function J(e,t,n){return{buttons:[],child:!1,chip:"none",chipState:"default",chipText:"",chipTitle:"",choicesHint:"",choicesLabel:"",expandIcon:"caret-right",expandLabel:"",expanded:!1,hasChoices:!1,hasLabel:!1,hasSource:!1,hasTokens:!1,key:e,kind:n,label:"",max:"",min:"",mono:!1,name:"",openTitle:"",options:[],overflowSelected:!1,placeholder:"",prop:t,removeLabel:"",resolved:"",sourceHint:"",sourceLabel:"",sourceState:"literal",span:!1,step:"",tokens:[],value:"",warning:!1,widget:"text"}}function Ct(e,t,n){if(n.state==="default"){e.chip="none";return}if(e.chipState=n.state,e.chipText=sw(n),e.chipTitle=Zh(e.prop,n),n.onClick)e.chip="button",t.chip=n.onClick;else e.chip="text"}function Mn(){return pc("styleProperty").filter((e)=>e!=="ref")}function Tt(e,t,n,o,r){let a=`${e.coord}|${n}${r.child?"|child":""}`,i=J(a,n,"field"),s={},l=Nd(t),d=xe().get(n)??"",x=r.placeholder||d,g=(c)=>r.onCommit(c===""?void 0:c);if(i.label=Ox(t,n),i.hasLabel=!0,i.child=r.child===!0,i.warning=r.warning===!0,i.span=r.span===!0,i.value=o,i.placeholder=x,Ct(i,s,r.provenance),!r.child){let c=Mn(),p=`${e.coord}|${n}`,w=pd(p,o===""?void 0:o);if(i.hasSource=!0,i.sourceState=w,i.sourceLabel=yo[w],i.sourceHint=`Value source: ${yo[w]} — click to change`,s.source={caps:c,fieldKey:p,mode:w,onChange:(f)=>r.onCommit(f===void 0||f===""?void 0:String(f)),stateDefs:e.templateSignals,value:o===""?void 0:o},w==="template")return i.widget="text",i.mono=!0,i.placeholder="${state.…}",s.commit=(f)=>r.onCommit(f===""?void 0:f),{actions:s,row:i}}switch(l){case"color":{i.widget="color",i.tokens=lw(),i.hasTokens=i.tokens.length>0,i.resolved=cw(o),s.edit=g,s.commit=g,s.debounceId=`color:${a}`;break}case"button-group":{let{buttons:c,extra:p}=jn(t,a,o);i.widget="buttons",i.buttons=c,i.hasChoices=p.length>0,i.overflowSelected=p.includes(o),i.choicesLabel="",i.choicesHint=`More ${i.label.toLowerCase()} values`,s.choices=En(p,o),s.choose=g;break}case"number-unit":{let c=t.$units??[],p=t.$keywords??[],w=oe.exec(o),f=!w&&o!==""&&p.includes(o),j=f?c[0]??"":w?.[2]??c[0]??"";i.widget="group",i.value=Pn(o,w,f),i.placeholder=In(x),i.hasChoices=c.length>0||p.length>0,i.choicesLabel=j||c[0]||"",i.choicesHint=`Unit for ${i.label.toLowerCase()}`,s.choices=[...c.map((N)=>({checked:N===j,label:N,value:N})),...p.map((N,L)=>({checked:N===o,label:N,value:N,...L===0&&c.length>0?{divider:!0}:{}}))],s.choose=(N)=>{if(p.includes(N)){r.onCommit(N);return}let L=oe.exec(o)?.[1];if(L)r.onCommit(L+N)};{let N=(L)=>{let b=L.trim();if(b===""){r.onCommit("");return}r.onCommit(Tn(b)&&c.length>0?b+j:b)};s.edit=N,s.commit=N,s.debounceId=`nui:${a}`}break}case"number":{i.widget="number",i.min=t.minimum===void 0?"":String(t.minimum),i.max=t.maximum===void 0?"":String(t.maximum),i.step=typeof t.maximum==="number"&&t.maximum<=1?"0.1":"",s.commit=g;break}case"select":case"combobox":{let c=Array.isArray(t.enum)?t.enum:Array.isArray(t.examples)?t.examples:[];if(i.widget="keywords",n==="fontFamily")i.value=ku(o)??o,i.options=Rn(t),s.edit=(p)=>ft(t,p,!1,g),s.commit=(p)=>ft(t,p,!0,g);else i.options=Ln(c,n,An(e)),s.edit=g,s.commit=g;s.debounceId=`kw:${a}`;break}default:{i.widget="text",s.edit=g,s.commit=g,s.debounceId=`text:${a}`;break}}return{actions:s,row:i}}function Pn(e,t,n){if(n)return e;if(t)return t[1]??"";if(e==="")return"";let o=Number.parseFloat(e);return Number.isNaN(o)?e:String(o)}function In(e){return oe.exec(e)?.[1]??e??"0"}function Fn(e,t,n){let o=B(n),r=e.activeStyle,a=r[n],i=o.some((m)=>r[m.name]!==void 0),s=e.tab.session.ui.styleShorthands[n]??i,l=a!==void 0||i,d=e.inheritedStyle,x=(m)=>q(u.value,(h)=>{for(let A of o)e.mutate(h,A.name);e.mutate(h,n,m)}),g=()=>q(u.value,(m)=>{e.mutate(m,n);for(let h of o)e.mutate(m,h.name)}),c=`${e.coord}|${n}`,p=J(c,n,"shorthand"),w={};p.widget="shorthand",p.hasLabel=!0,p.label=Ox(t,n),p.value=typeof a==="string"?a:"",p.placeholder=On(a,o,r,d,n),p.expanded=s,p.expandIcon=s?"caret-down":"caret-right",p.expandLabel=`${s?"Collapse":"Expand"} ${p.label.toLowerCase()}`,Ct(p,w,wt(n,e.provCtx,l?g:void 0)),w.edit=(m)=>x(m||void 0),w.commit=(m)=>x(m||void 0),w.debounceId=`short:${c}`,w.toggle=()=>{let m=u.value;if(m)m.session.ui.styleShorthands={...m.session.ui.styleShorthands,[n]:!s}};let f=[{actions:w,row:p}];if(!s)return f;let j=t.$shorthandType==="border-side",N=typeof a==="string"&&a?j?st(a):at(a,o.length):null,L=j?lt:it,b=j?"":"0",k=(m,h)=>x(L(o.map((A,E)=>E===m?h:r[A.name]??(N?N[E]:b))));for(let[m,{name:h,entry:A}]of o.entries()){let E=r[h]??(N?N[m]:""),G=E!==void 0&&E!=="";f.push(Tt(e,A,h,String(E??""),{child:!0,onCommit:(V)=>k(m,V||b),placeholder:!E&&d[h]!==void 0?String(d[h]):"",provenance:Sn(h,n,G,e.provCtx,()=>k(m,b))}))}return f}function On(e,t,n,o,r){if(e)return"";if(t.some((a)=>n[a.name]!==void 0))return t.map((a)=>n[a.name]||"0").join(" ");if(o[r]!==void 0)return String(o[r]);if(t.some((a)=>o[a.name]!==void 0))return t.map((a)=>o[a.name]||"0").join(" ");return""}function re(e,t){return{emptyActionLabel:t?Tl().label:"",emptyMessage:e,filter:"",hasEmptyAction:t,sections:[],view:"empty"}}function ht(e){F=new Map;let t=u.value;if(!t)return re("Open a page to style what you click.",!0);if(e()==="stylebook"&&y.stylebook.selection){let r=t.doc.document;if(!r)return re("Open a page to style what you click.",!0);return $t(t,r,{effectiveStyle:qo(r.style),stylebookSelector:y.stylebook.selection})}let n=Le(t.session.selection);if(!n)return re(Xh("style it"),!1);let o=K(t.doc.document,n);if(!o)return re(Pf(),!1);return $t(t,o,{})}function $t(e,t,n){let{effectiveStyle:o,stylebookSelector:r=null}=n,a=Le(e.session.selection),i=t.style||{},s=o??i,l=Object.entries(e.doc.document.state||{}).filter(([,C])=>!C?.$handler&&C?.$prototype!=="Function").map(([C])=>C),{sizeBreakpoints:d}=hr(Di(e.doc.document.$media)),x=d.map((C)=>C.name),g=e.session.ui.activeMedia||null,{activeSelector:c}=e.session.ui,p=e.session.ui.previewColorScheme,w=g===null&&(p==="light"||p==="dark")?Object.entries(Di(e.doc.document.$media)??{}).find(([,C])=>Mu(String(C))===p)?.[0]??null:null,f=g&&x.length>0?g:w,j=f?s[`@${f}`]||{}:s,N=new Set(Object.keys(j).filter((C)=>Bx(C))),L=[...new Set([...ze(t),...N,...c?[c]:[]])],b=$n(r),k=b??(typeof t.tagName==="string"?t.tagName:"element");Ze({segments:xn(k,g,x.length>0,w),selector:{value:c,options:L,declared:N,onSelect:(C)=>{let M=u.value;if(!M)return;if(M.session.ui.activeSelector=C,C?.startsWith(":popover-open"))O("canvas.setPopoverOpen",{open:!0});if((C?.startsWith("[open]")||C?.startsWith(":modal"))&&lx(M)!==null)O("canvas.setDialogOpen",{open:!0})},onAddCustom:()=>{Nn("Add Selector",{confirmLabel:"Use",message:"A state or nested rule to edit under this element.",placeholder:":hover, .child, &.active, [attr]",validate:(C)=>Bx(C.trim())?"":'A selector must start with ":", ".", "&" or "[".'}).then((C)=>{if(C&&u.value)u.value.session.ui.activeSelector=C.trim()})}},scope:bn(e,b)});let m=ie(s,c,f),h=s===i?m:ie(i,c,f),A=e.session.selection.length>0?e.session.selection:[a],E=(C,M,D)=>{for(let Ft of A)xt(Ft,c,f)(C,M,D)},G=(C,M)=>q(u.value,(D)=>E(D,C,M)),V={};if(w){let C=c?va(s,c)??{}:s;for(let[M,D]of Object.entries(C))if(typeof D!=="object")V[M]={value:D??"",donor:"Base",jump:()=>Gr(u.value,"previewColorScheme","auto")}}else for(let[C,M]of Object.entries(_e(s,x,g,c)))V[C]={value:M.value,donor:M.donor===null?"Base":bi(M.donor),jump:()=>Gr(u.value,"activeMedia",M.donor)};let Ee={};for(let[C,M]of Object.entries(V))Ee[C]=M.value;let Re=hn(e,A,c,f),Mt={own:h,active:m,inherited:V,signals:l,clear:(C)=>G(C),...Re.size>0?{mixed:{count:A.length,props:Re}}:{}},Me=rt({style:m},e.session.ui.styleSections);if(JSON.stringify(Me)!==JSON.stringify(e.session.ui.styleSections))e.session.ui.styleSections=Me;let Pt=(e.session.ui.styleFilter||"").toLowerCase(),pe={activeSelector:c,activeStyle:m,commit:G,coord:`style|${a.join("/")}|${f??""}|${c??""}`,editMedia:f,filter:Pt,inheritedStyle:Ee,mutate:E,provCtx:Mt,tab:e,targets:A,templateSignals:l},It=[...Vn(pe),...Hn(pe),...Bn(pe)];return{emptyActionLabel:"",emptyMessage:"",filter:e.session.ui.styleFilter||"",hasEmptyAction:!1,sections:It,view:"editor"}}function yt(e){return F.set(e.row.key,e.actions),e.row}function Vn(e){let{activeStyle:t,tab:n}=e,o=e.filter.length>0,r={};for(let i of P.$sections)r[i.key]=[];for(let[i,s]of Object.entries(P.$defs)){if(typeof s.$shorthand==="string")continue;r[s.$section||"other"].push({entry:s,prop:i})}for(let i of P.$sections)r[i.key].sort((s,l)=>s.entry.$order-l.entry.$order);let a=[];for(let i of P.$sections){if(i.key==="other")continue;let s=r[i.key],l=s.filter(({prop:p,entry:w})=>{if(t[p]!==void 0)return!0;return Nd(w)==="shorthand"&&B(p).some((f)=>t[f.name]!==void 0)}),d=()=>{q(u.value,(p)=>{for(let{prop:w,entry:f}of l){if(t[w]!==void 0)e.mutate(p,w);if(Nd(f)==="shorthand")for(let j of B(w))e.mutate(p,j.name)}})},x=aw(Cn(s,e.provCtx)),g=o?!0:n.session.ui.styleSections[i.key]??!1,c=Ne(i.key,i.label,g,x,{canClear:l.length>0,clearTitle:`Clear all ${i.label.toLowerCase()} properties`,layout:i.$layout==="grid"?"grid":"",onClear:d});if(g)c.rows=Dn(e,s,i.$layout==="grid");if(o&&c.rows.length===0)continue;a.push(c)}return a}function Dn(e,t,n){let{activeStyle:o}=e,r=[];for(let{prop:a,entry:i}of t){let s=o[a],l=s!==void 0,d=tt(i,o),x=Nd(i);if(!l&&!d)continue;if(e.filter){let p=Ox(i,a).toLowerCase();if(!a.includes(e.filter)&&!p.includes(e.filter))continue}if(x==="shorthand"){let p=B(a);if(!(l||p.some((f)=>o[f.name]!==void 0))&&!d)continue;for(let f of Fn(e,i,a))r.push(yt(f));continue}let g=e.inheritedStyle[a],c=Tt(e,i,a,s??"",{onCommit:(p)=>e.commit(a,p||void 0),placeholder:!l&&g!==void 0?String(g):"",provenance:se(a,e.provCtx),span:n&&i.$span===2,warning:l&&!d});r.push(yt(c))}return r}function Ne(e,t,n,o,r){let a=[];if(o.inherited>0)a.push({state:"inherited"});if(o.bound>0)a.push({state:"bound"});if(o.mixed>0)a.push({state:"mixed"});let i=o.set>0&&r.canClear;if(i)Ce.set(e,r.onClear);return{canClear:i,clearTitle:r.clearTitle,hasMarks:a.length>0,key:e,label:t,layout:r.layout,marks:a,open:n,rows:[],tally:nE(o)}}function Hn(e){let t=[];for(let[i,s]of Object.entries(e.activeStyle))if(s!==null&&typeof s==="object"&&!Array.isArray(s)&&!i.startsWith("@"))t.push(i);if(t.length===0)return[];let n=e.tab.session.ui.styleSections.nested??!0,o=Ne("nested","Relative Styling",n,aw([]),{canClear:!1,clearTitle:"",layout:"",onClear:()=>{}});if(!n)return[o];for(let i of t){let s=`${e.coord}|nested|${i}`,l=J(s,i,"nested");l.widget="nested",l.name=i,l.openTitle=`Edit ${i} under this rule`,l.removeLabel=`Remove ${i}`,F.set(s,{chip:()=>e.commit(i),open:()=>{let d=e.activeSelector?`${e.activeSelector} ${i}`:i;xu(d,void 0,{panCanvas:!0})}}),o.rows.push(l)}let r=`${e.coord}|nested|+add`,a=J(r,"+add","nested-add");return a.widget="nestedadd",F.set(r,{}),o.rows.push(a),Te=()=>{Nn("Add Nested Selector",{confirmLabel:"Add",message:"Enter a selector to nest under the current rule.",placeholder:"th, :hover, .active",validate:(i)=>i.trim()?"":"Enter a selector."}).then((i)=>{if(i)e.commit(i,{})})},[o]}function Bn(e){let t=[];for(let l of Object.keys(e.activeStyle))if(!P.$defs[l]){let d=e.activeStyle[l];if(d!==null&&typeof d==="object")continue;t.push(l)}let n=e.tab.session.ui.styleSections.other??t.length>0,o=Ne("other","Custom",n,aw([]),{canClear:!1,clearTitle:"",layout:"",onClear:()=>{}});if(!n)return[o];let r=xe(),a=(l,d)=>{let x=K(l.doc.document,d);return ie(x?.style??{},e.activeSelector,e.editMedia)};for(let l of t){let d=`${e.coord}|custom|${l}`,x=J(d,l,"custom");x.widget="kv",x.name=l,x.value=String(e.activeStyle[l]),x.placeholder=r.get(l)??"",x.removeLabel=`Remove ${l}`,F.set(d,{chip:()=>e.commit(l),debounceId:`custom:${d}`,edit:(g)=>e.commit(l,g),rename:(g)=>{let c=g.trim();if(!c||c===l)return;q(u.value,(p)=>{for(let w of e.targets){let f=a(p,w)[l];if(f===void 0)continue;let j=xt(w,e.activeSelector,e.editMedia);j(p,l),j(p,c,String(f))}})}}),o.rows.push(x)}let i=`${e.coord}|custom|+add`,s=J(i,"+add","custom-add");return s.widget="kvadd",F.set(i,{add:(l)=>{let d=l.trim();if(!d)return!1;return e.commit(d,r.get(d)||""),!0}}),o.rows.push(s),[o]}var Jn="style-value",U=null;function jt(){let e=U;U=null,e?.close()}function bt(e,t,n,o){let r=e instanceof HTMLElement?e:null;if(jt(),!r||n.length===0)return;U=Nt({label:t,onClosed:(a)=>{if(U===a)U=null},opener:r,region:Jn,rows:n.map((a)=>({...a.checked===void 0?{}:{checked:a.checked?"true":"false"},destructive:!1,disabled:!1,dividerAbove:a.divider===!0,id:a.value,title:a.label})),run:(a)=>o(a)})}var Wn={addCustom:(e,t)=>{let n=I(e)?.add;if(!n||!(t instanceof HTMLInputElement))return;if(n(t.value))t.value=""},addNested:()=>Te?.(),chipClick:(e)=>I(e)?.chip?.(),clearSection:(e)=>Ce.get(e)?.(),commitText:(e,t)=>{let n=I(e);if(!n)return;if(n.debounceId)lI(n.debounceId);n.commit?.(t)},editText:(e,t)=>{let n=I(e);if(!n?.edit)return;if(n.debounceId){Lv(n.debounceId,400,n.edit)(t);return}n.edit(t)},openNested:(e)=>I(e)?.open?.(),pickChoice:(e,t)=>{let n=I(e);if(!n?.choose||!n.choices)return;let{choose:o}=n;bt(t,"Values",n.choices,(r)=>o(r))},pickSource:(e,t)=>{let n=I(e)?.source;if(!n)return;bt(t,"Value source",n.caps.map((o)=>({checked:o===n.mode,label:`${yo[o]} — ${Pw[o]}`,value:o})),(o)=>{let r=o;if(r===n.mode)return;n.onChange(fc(n.fieldKey,n.mode,r,Ae(n.value),fd(r,{stateDefs:n.stateDefs})))})},pressButton:(e,t)=>{I(e)?.choose?.(t===zn(e)?"":t)},renameCustom:(e,t)=>I(e)?.rename?.(t),runEmptyAction:()=>Tl().run(),setFilter:(e)=>{let t=u.value;if(t)t.session.ui.styleFilter=e},toggleSection:(e,t)=>{let n=u.value;if(!n)return;n.session.ui.styleSections={...n.session.ui.styleSections,[e]:t}},toggleShorthand:(e)=>I(e)?.toggle?.()};function zn(e){return ke.get(e)??""}var ae=null,Et=()=>"edit",we=Et;function vt(e){ke=new Map;for(let t of e.sections)for(let n of t.rows)if(n.widget==="buttons")ke.set(n.key,n.buttons.find((o)=>o.checked==="true")?.value??"")}function je(e,t){if(jt(),ae?.scope.stop(),ae?.handle.dispose(),ae=null,F=new Map,Ce=new Map,Te=null,!e)return;we=t?.getCanvasMode??Et;let n=ht(we);vt(n);let o=mt(e,n,Wn,{target:(a)=>Qe(a??void 0)}),r=ge();r.run(()=>{Q(()=>{let a=ht(we);vt(a),o.update(a)})}),ae={handle:o,host:e,scope:r}}function _n(){let e=(t)=>t.document.open&&t.selection.count>0;return[{category:"View",id:"style.openSelectorMenu",level:"selection",menus:["palette"],group:"8_style",requires:"the Style tab showing a selected element",when:e,run:()=>ve(),title:"Open Selector Menu"},{args:{additionalProperties:!1,properties:{selector:Un()},required:["selector"],type:"object"},category:"View",id:"style.setSelector",level:"selection",menus:["palette"],group:"8_style",requires:"an element selection",when:e,run:(t,n)=>{let{selector:o}=n;if(o===null){let i=u.value;if(i)i.session.ui.activeSelector=null;return}let r=ot("style.setSelector",n,"selector");if(!Bx(r))throw RangeError(`command "style.setSelector" argument "selector": "${r}" is not a nested `+'selector — it must start with ":", ".", "&" or "["');let a=u.value;if(!a)throw RangeError('command "style.setSelector" needs an open document');a.session.ui.activeSelector=r},title:"Set Style Selector"}]}function Un(){return{description:'A nested selector such as ":hover", ".child" or "[open]". null edits the base context.',oneOf:[{type:"string"},{type:"null"}]}}function VS(e){e.registerAll(_n())}var Lt={$schema:"https://jxsuite.com/schema/v1",$id:"StudioInspectorDock",$description:"The Inspector dock's own chrome, as a Jx document over the kit: a header naming what the dock is pointed at, a real `tablist` of four tabs, and four `tabpanel`s. It draws no tab BODY — all four are mounted documents of their own (`surfaces/properties-panel.json`, `surfaces/style-panel.json`, `surfaces/logic-panel.json`, and the assistant's) — so each panel carries one empty `[part=\"panel-body\"]` island the adapter announces through `onNodeCreated` (studio-ui-guidelines.md §9.4). The four panels are keyed on the tab id and the id list never changes, so a body host is created ONCE and lives as long as the dock: that is what the old module's hand-built permanent containers were for, and it is now a property of a keyed `$map` rather than a rule someone has to keep. `panels/right-panel.ts` keeps every decision — which tab is selected, per document or detached; what the target's name is; and which of the four seams a host is handed to.",tagName:"div",attributes:{part:"inspector-dock"},style:{$description:"`styles/inspector.css`'s dock rules, carried in. Three of them were `#right-panel > .panel-*` — a direct-child selector that only held while this module rendered flat into the shell cell — and they are `[part]` rules on the document's own children now, which is the same statement without depending on how deep the dock is mounted. The header's typography is `panels.css`'s `.panel-header*`, at the same values: `--spectrum-font-size-50` resolved only inside `<sp-theme>` and a document mounts outside it, so it is `--jx-text-sm` (11px) here.",display:"flex",flexDirection:"column",height:"100%",minHeight:"0",fontFamily:"var(--jx-font-sans)",color:"var(--fg)",'& [part="header"]':{display:"flex",flex:"0 0 auto",alignItems:"baseline",gap:"var(--jx-space-2)",padding:"6px var(--jx-space-3)",borderBottom:"1px solid var(--border)"},'& [part="header-title"]':{fontSize:"var(--jx-text-sm)",fontWeight:"700",letterSpacing:"0.06em",textTransform:"uppercase",color:"var(--fg)"},'& [part="header-target"]':{overflow:"hidden",fontSize:"var(--jx-text-sm)",color:"var(--fg-dim)",textOverflow:"ellipsis",whiteSpace:"nowrap","::before":{$description:"The separator between the tab's name and its target, drawn rather than written into the string — `panels/right-panel.ts` states what the dock is pointed at and nothing about punctuation.",content:'"·"',marginRight:"var(--jx-space-2)"}},'& [part="tabs"]':{$description:"Four words in a 280px dock, allowed to compress rather than to become anonymous — which is why the tabs are not icons (§6). The kit tab's own 220px cap would let one tab push the last off the strip, so each takes an equal quarter.",flex:"0 0 auto",gap:"0",fontSize:"var(--jx-text-sm)"},'& [part="tab"]':{flex:"1 1 0",justifyContent:"center",minWidth:"0",maxWidth:"none",padding:"var(--jx-space-1) var(--jx-space-2)"},'& [part="panel"]':{$description:"`#right-panel > .panel-body { flex: 1; min-height: 0; overflow-y: auto }`. The kit's tab panel pads itself for a dialog; a dock's tab is the whole column and each body pads its own content.",flex:"1",minHeight:"0",padding:"0",overflowY:"auto"},'& [part="panel"][data-tab="assistant"]':{$description:"The chat owns its own scrolling, so its panel is a nested flex column that does not scroll.",display:"flex",flexDirection:"column",overflow:"hidden"},'& [part="panel"][hidden]':{display:"none"},'& [part="panel-body"]':{display:"flex",flex:"1",flexDirection:"column",minHeight:"0"}},children:[{tagName:"header",attributes:{part:"header"},children:[{tagName:"span",attributes:{part:"header-title"},textContent:"${state.title}"},{tagName:"span",attributes:{part:"header-target"},textContent:"${state.target}"}]},{tagName:"jx-tabs",attributes:{part:"tabs",selected:"${state.tab}"},$props:{label:"Inspector"},onchange:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/selectTab"},value:[{$ref:"event#/detail"}]}]},children:[{$prototype:"Array",items:{$ref:"#/state/tabs"},key:{$ref:"$map/item/key"},map:{tagName:"jx-tab",attributes:{part:"tab",id:"${$map.item.tabId}","data-tab":"${$map.item.key}",value:"${$map.item.key}",label:"${$map.item.title}",panel:"${$map.item.panelId}"}}}]},{$prototype:"Array",items:{$ref:"#/state/tabs"},key:{$ref:"$map/item/key"},map:{tagName:"jx-tab-panel",attributes:{part:"panel",id:"${$map.item.panelId}","data-tab":"${$map.item.key}"},$props:{active:{$ref:"$map/item/active"},labelledby:{$ref:"$map/item/tabId"}},children:[{$description:"The island. Every one of the four tabs is a mounted document of its own, so this stays EMPTY for the life of the dock — `panels/right-panel.ts` is handed it through `onNodeCreated` and passes it to that tab's binder exactly once. It is a slotted child rather than the panel element itself because `jx-tab-panel` distributes its own slot, and a second owner of that child list would fight it.",tagName:"div",attributes:{part:"panel-body","data-jx-region":"${$map.item.region}"}}]}}]};T("inspector-dock",Lt);function Gn(e,t){e.title=t.title,e.target=t.target,e.tab=t.tab,e.tabs=t.tabs}function Kn(e){let t=typeof e==="string"?void 0:e.attributes?.part;return typeof t==="string"?t:""}function Yn(e){let n=e?.$map?.item;return n!==null&&typeof n==="object"?n:null}function At(e,t,n,o){let r=v({...t,selectTab:n.selectTab});e.textContent="",delete e._$litPart$;let a=null,i=!1;return R("inspector-dock",r,e,{onNodeCreated:(s,l,d,x)=>{if(!(s instanceof HTMLElement)||Kn(d)!=="panel-body")return;let g=Yn(x)?.key;if(typeof g==="string"&&g!=="")o.onBody(g,s)}}).then((s)=>{if(i){s.dispose();return}a=s}),{dispose(){i=!0,a?.dispose(),a=null},update:(s)=>{Gn(r,s)}}}var le=null,de=null,ce=v({tab:Gb});function Xn(e,t,n){try{Qn(e,t,n)}catch(o){console.error(`right-panel: the ${t} tab could not take its body:`,o)}}function Qn(e,t,n){switch(t){case"assistant":{e.mountAssistant(n);break}case"events":{$e(n);break}case"properties":{K_(n,{navigateToComponent:e.navigateToComponent});break}case"style":{je(n,{getCanvasMode:e.getCanvasMode});break}default:break}}function Zn(e){return tw.map((t)=>({active:t.id===e,key:t.id,panelId:`inspector-panel-${t.id}`,region:mI(t.id),tabId:`inspector-tab-${t.id}`,title:t.title}))}function H_(e){de=At(ak,Rt(),{selectTab:(t)=>eo(t)},{onBody:(t,n)=>Xn(e,t,n)}),le=ge(),le.run(()=>{Q(()=>{let t=u.value;if(y.layoutSelection,t)t.doc.document,t.session.selection.map((n)=>n.join("/")).join("|"),t.session.ui.rightTab;ce.tab,Af()})})}function m$(){le?.stop(),le=null,de?.dispose(),de=null,$e(null),K_(null),je(null),ce.tab=Gb}function Rt(){let e=ad();return{tab:e,tabs:Zn(e),target:to(),title:tw.find((t)=>t.id===e)?.title??e}}function Af(){de?.update(Rt())}function ad(){let e=u.value;if(!e)return ce.tab;let t=e.session.ui.rightTab;return wx(t)?t:Gb}function Nf(e){let t=u.value;if(t)t.session.ui.rightTab=e;else ce.tab=e;Af()}function eo(e){if(e!==""&&e!==ad()&&wx(e))Nf(e)}function to(){let e=u.value;if(!e)return"no document";let t=y.layoutSelection;if(t)return`<${t.tagName||"element"}> in ${t.layoutFile||"the layout"}`;let n=e.session.selection,o=Le(n);if(o)return n.length>1?`${n.length} elements`:Zo(K(e.doc.document,o));let r=e.documentPath;return r?r.split("/").at(-1)??"document":"document"}
|
|
2
|
-
export{WS,VS,H_,m$,Af,ad,Nf};
|
|
3
|
-
|
|
4
|
-
//# debugId=61695DE61E21872264756E2164756E21
|
|
5
|
-
//# sourceMappingURL=studio-wfjqhhbk.js.map
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import{Ot,sh,qe}from"./studio-8mb00b84.js";var Lm=400;var Lc=350,sI=30000;function K(e,t){let n=e;for(let r of t){if(n==null)return;n=n[r]}return n}function _o(e){return Array.isArray(e?.children)?e.children:[]}function Im(e){if(!e||typeof e!=="object")return e;if(Array.isArray(e)){for(let r of e)Im(r);return e}let t=e,{children:n}=t;if(n&&typeof n==="object"&&!Array.isArray(n)&&n.$prototype==="Array")t.children=[n];if(Array.isArray(t.children))for(let r of t.children)Im(r);if(t.$prototype==="Array"&&t.map&&typeof t.map==="object")Im(t.map);if(t.cases&&typeof t.cases==="object")for(let r of Object.values(t.cases))Im(r);return e}function ht(e){return e.length>=2?e.slice(0,-2):null}function _n(e){return e.at(-1)}function sk(e){return e.join("/")}function Yo(e,t){if(e===t)return!0;if(!e||!t||e.length!==t.length)return!1;return e.every((n,r)=>n===t[r])}function Ga(e,t){if(e.length>t.length)return!1;return e.every((n,r)=>n===t[r])}function Od(e,t=[],n=0){let r=[];return l(e,t,n,r,!1),r}function l(e,t,n,r,o){if(typeof e==="string"||typeof e==="number"||typeof e==="boolean"){if(!o)r.push({depth:n,node:e,nodeType:"text",path:t});return}if(e.$prototype==="Array"){if(!o)r.push({depth:n,node:e,nodeType:"map",path:t});let s=e.map;if(s&&typeof s==="object")l(s,[...t,"map"],n+1,r,!1);return}if(!o)r.push({depth:n,node:e,nodeType:"element",path:t});if(e.$props&&qe(e.tagName).includes("-")&&!Array.isArray(e.children))return;let{children:i}=e;if(Array.isArray(i))for(let s=0;s<i.length;s++){let a=[...t,"children",s];l(i[s],a,n+1,r,!1)}else if(i&&typeof i==="object"&&i.$prototype==="Array")l(i,[...t,"children"],n+1,r,!1);if(e.$switch&&e.cases&&typeof e.cases==="object")for(let[s,a]of Object.entries(e.cases)){let c=[...t,"cases",s];if(a&&typeof a==="object"&&a.$ref)r.push({depth:n+1,node:a,nodeType:"case-ref",path:c});else if(a&&typeof a==="object")r.push({depth:n+1,node:a,nodeType:"case",path:c}),l(a,c,n+2,r,!0)}}function Zo(e){if(!e)return"?";if(e.$prototype==="Array"){let{items:r}=e;return`Repeater → ${(Ot(r)?r.$ref:void 0)||"items"}`}if(e.$title)return e.$title;if(e.$id)return e.$id;if(e.tagName==="slot"){let r=e.attributes?.name;return typeof r==="string"&&r.trim()?`slot: ${r.trim()}`:"slot"}let t=qe(e.tagName)||"div",n=e.$switch?" ⇆":"";if(typeof e.textContent==="string"&&e.textContent.length>0)return`${t} — ${e.textContent.slice(0,24)}${n}`;return t+n}var D=null;function Bl(e){D=e}function vt(){return D}function Qu(e){if(!e||typeof e!=="object")return e;if(Array.isArray(e))return e.map((n)=>Qu(n));let t={};for(let[n,r]of Object.entries(e)){if(n.startsWith("on")&&sh(r))continue;if(n==="children")t.children=Array.isArray(r)?r.map((o)=>Qu(o)):Qu(r);else if(n==="cases"&&typeof r==="object"){let o={};for(let[i,s]of Object.entries(r))o[i]=Qu(s);t.cases=o}else if(n==="state"&&typeof r==="object"&&r!==null){let o={};for(let[i,s]of Object.entries(r)){if(s&&typeof s==="object"&&s.timing==="server")continue;o[i]=s}t.state=o}else if(n==="style"||n==="attributes"||n==="$media")t[n]=r;else t[n]=r}return t}var Hx=null,eh=null,ak=null,lk=null,Tv=null;function aI(){Hx=document.querySelector("#activity-bar"),eh=document.querySelector("#left-panel"),ak=document.querySelector("#right-panel"),lk=document.querySelector("#toolbar"),Tv=document.querySelector("#statusbar")}var Ep=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]),ck=[":hover",":focus",":active",":focus-within",":focus-visible",":disabled",":first-child",":last-child","::before","::after","::placeholder"];function Bx(e){return e.startsWith(":")||e.startsWith(".")||e.startsWith("&")||e.startsWith("[")}var u=new Map;function Lv(e,t,n){let r=t??Lm;return(...o)=>{clearTimeout(u.get(e)),u.set(e,setTimeout(()=>{u.delete(e),n(...o)},r))}}function lI(e){clearTimeout(u.get(e)),u.delete(e)}var p=new Map,f=0;function cI(){return f}function d(e,t){f+=1;let n=()=>{f-=1},r=null;try{let o=t();if(typeof o?.then==="function")r=o}catch(o){console.error(`Renderer "${e}" failed:`,o)}if(!r){n();return}r.then(n,(o)=>{console.error(`Renderer "${e}" failed:`,o),n()})}function th(e,t){p.set(e,t)}function Oo(){for(let[e,t]of p.entries())d(e,t)}function Ai(...e){for(let t of e){let n=p.get(t);if(!n)continue;d(t,n)}}function Ic(e,t){if(e){if(t.selection!==void 0)e.session.selection=t.selection;if(t.hover!==void 0)e.session.hover=t.hover;if(t.clipboard!==void 0)e.session.clipboard=t.clipboard;if(t.ui)for(let[n,r]of Object.entries(t.ui))e.session.ui[n]=r;if(t.canvas)for(let[n,r]of Object.entries(t.canvas))e.session.canvas[n]=r}}function Gr(e,t,n){if(e)e.session.ui[t]=n}function dI(e,t){if(e)for(let[n,r]of Object.entries(t))e.session.canvas[n]=r}
|
|
2
|
-
export{Lm,Lc,sI,K,_o,Im,ht,_n,sk,Yo,Ga,Od,Zo,D,Bl,vt,Qu,Hx,eh,ak,lk,Tv,aI,Ep,ck,Bx,Lv,lI,cI,th,Oo,Ai,Ic,Gr,dI};
|
|
3
|
-
|
|
4
|
-
//# debugId=D1C898CC6C69F11164756E2164756E21
|
|
5
|
-
//# sourceMappingURL=studio-wgh5kxpj.js.map
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import{_t,Lr,qr,Bu}from"./studio-5g4t8v6w.js";function $f(){return Lr(_t.cfToken)}function A_(t){qr(_t.cfToken,t||"")}function N_(){return Lr(_t.cfAccountId)}function f$(t){qr(_t.cfAccountId,t||"")}function O_(){Bu([_t.cfToken,_t.cfAccountId])}
|
|
2
|
-
export{$f,A_,N_,f$,O_};
|
|
3
|
-
|
|
4
|
-
//# debugId=1E3301545489484364756E2164756E21
|
|
5
|
-
//# sourceMappingURL=studio-xasj0796.js.map
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
class f extends Error{name="MaxOpsExceededError"}function d(n){return typeof n==="object"&&n!==null&&!Array.isArray(n)}function ls(n,e){if(n===e)return!0;if(Array.isArray(n)&&Array.isArray(e))return n.length===e.length&&n.every((t,r)=>ls(t,e[r]));if(d(n)&&d(e)){let t=Object.keys(n),r=Object.keys(e);return t.length===r.length&&t.every((i)=>(i in e)&&ls(n[i],e[i]))}return!1}function A(n){let e=5381;for(let t=0;t<n.length;t++)e=Math.imul(e,33)+(n.codePointAt(t)??0);return e.toString(36)}function m(n){return typeof n==="string"?`s:${n}`:`n:${A(JSON.stringify(n))}`}function x(n){if(typeof n==="string")return"s";let e=n,{attributes:t,$props:r}=e,i=(d(t)?t.id:void 0)??(d(r)?r.key:void 0)??"";return`w:${String(e.tagName??"")}:${String(i)}`}function y(n,e,t=Number.POSITIVE_INFINITY){let r=n.length,i=e.length;if(r===0||i===0||r*i>t)return[];let c=Array.from({length:r+1},()=>Array.from({length:i+1},()=>0));for(let s=r-1;s>=0;s--)for(let l=i-1;l>=0;l--)c[s][l]=n[s]===e[l]?c[s+1][l+1]+1:Math.max(c[s+1][l],c[s][l+1]);let o=[],a=0,u=0;while(a<r&&u<i)if(n[a]===e[u])o.push([a,u]),a+=1,u+=1;else if(c[a+1][u]>=c[a][u+1])a+=1;else u+=1;return o}function a1(n,e,t={}){let r=t.maxCells??Number.POSITIVE_INFINITY,i=y(n.map((s)=>m(s)),e.map((s)=>m(s)),r),c=[],o=-1,a=-1,u=[];for(let[s,l]of i)u.push([o+1,s,a+1,l]),c.push({aIndex:s,bIndex:l,identical:!0}),o=s,a=l;u.push([o+1,n.length,a+1,e.length]);for(let[s,l,p,k]of u){let w=n.slice(s,l),O=e.slice(p,k);for(let[b,I]of y(w.map((h)=>x(h)),O.map((h)=>x(h)),r))c.push({aIndex:s+b,bIndex:p+I,identical:!1})}return c.toSorted((s,l)=>s.aIndex-l.aIndex)}class g{ops=[];maxOps;constructor(n){this.maxOps=n}result(){return this.ops}push(n){if(this.ops.length>=this.maxOps)throw new f;this.ops.push(n)}diffNode(n,e,t){for(let c of new Set([...Object.keys(e),...Object.keys(t)])){if(c==="children")continue;if(!(c in t))this.push({key:c,op:"set-key",path:n});else if(!ls(e[c],t[c]))this.push({key:c,op:"set-key",path:n,value:t[c]})}let r=e.children,i=t.children;if(Array.isArray(r)&&Array.isArray(i))this.diffChildren(n,r,i);else if(!ls(r,i))this.push({key:"children",op:"set-key",path:n,value:i})}diffChildren(n,e,t){let r=a1(e,t),i=new Set(r.map((o)=>o.aIndex)),c=new Map(r.map((o)=>[o.bIndex,o]));for(let o=e.length-1;o>=0;o--)if(!i.has(o))this.push({index:o,op:"remove-child",parentPath:n});for(let o=0;o<t.length;o++){let a=c.get(o);if(!a){this.push({index:o,node:t[o],op:"insert-child",parentPath:n});continue}if(a.identical)continue;let u=e[a.aIndex],s=t[o];if(d(u)&&d(s))this.diffNode([...n,"children",o],u,s);else if(!ls(u,s))this.push({index:o,node:s,op:"set-child",parentPath:n})}}}function g$(n,e,t={}){let r=new g(t.maxOps??500);try{r.diffNode([],n,e)}catch(i){if(i instanceof f)return null;throw i}return r.result()}
|
|
2
|
-
export{ls,a1,g$};
|
|
3
|
-
|
|
4
|
-
//# debugId=EE5F591D8C868DF164756E2164756E21
|
|
5
|
-
//# sourceMappingURL=studio-y78s8r2n.js.map
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import{re,k}from"./studio-vzacdfsc.js";var Je={functionEditor:null,blockActionBarEl:null,selDragCleanup:null,dndCleanups:[],elementsCollapsed:new Set,elementsFilter:"",_currentDropTargetRow:null,layerDragSourceHeight:0,_completionRegistered:!1,_layersCollapsed:null};var m=0;function nI(){return m+=1,m}var l=new Map;function Yi(e){let n=l.get(e);if(!n)n=g(e),l.set(e,n);return n}function g(e){return{centerObserver:null,monacoDiffEditor:null,monacoEditor:null,needsCenter:!0,panX:0,panY:0,panels:[],paneId:e,panzoomWrap:null,stage:null,prevCanvasMode:null,prevStylebookCustomizedOnly:null,prevStylebookFilter:null,renderGeneration:0,sourceCollabCleanup:null,stageScrollbar:null,wrap:null}}function Yu(){return[...l.values()]}function Hl(e){if(!e)return null;for(let n of l.values())if(n.wrap?.contains(e))return n;return null}function v(e){for(let n of e.panels)n.renderScope?.stop(),n.renderScope=null;e.panels.length=0,e.prevCanvasMode=null}function iI(e,n){let r=Yi(e);return r.wrap=n,v(r),r}function oI(e){if(l.get(e))ok(e);let r=g(e);return l.set(e,r),r}var S=null;function rI(e){S=e}function ok(e){let n=l.get(e);if(!n)return;S?.(n),v(n),h(e)}function h(e){l.delete(e)}var Zu="commit";function Sm(e){let n=new Map,r=new Map,o=new Map,a=!1,u=!1,c=!1;function f(t,i){if(typeof i?.then!=="function")return i;let s=i.finally(()=>{if(o.get(t)===s)o.delete(t)});return o.set(t,s),s}let d={arm(t,i,s){clearTimeout(n.get(t)),r.set(t,s),n.set(t,setTimeout(()=>{n.delete(t),r.delete(t),f(t,s())},i))},cancel(){for(let t of n.values())clearTimeout(t);n.clear(),r.clear()},flush(t){let i=r.get(t);if(!i)return o.get(t);return clearTimeout(n.get(t)),n.delete(t),r.delete(t),f(t,i())},ahead:()=>a,markAhead(){a=!0},typed:()=>u,markTyped(){a=!0,u=!0},markSettled(){a=!1,u=!1},shared:()=>c,markShared(){c=!0}};return e._writes=d,d}var w={logic:{holds:"The handler you were typing",reached:"written into",source:"Logic"},source:{holds:"The source you were typing",reached:"parsed into",source:"Editor"}};function p(e,n,r){if(e._writes?.typed()!==!0)return!0;let a=e._editingTab??null,u=a?.documentPath??"Untitled",{holds:c,reached:f,source:d}=w[n];return k.warn(`${c} was discarded — it was never ${f} "${u}".`,{...r?{detail:C(r.error)}:{},key:`buffer-discarded:${n}:${a?.id??"none"}`,source:d,...a?.documentPath?{path:a.documentPath}:{}}),!1}function C(e){return e instanceof Error?e.stack??e.message:String(e)}function Em(e,n){let r=e?._writes;if(!e||!r)return!0;let o;try{o=r.flush(Zu)}catch(a){return r.cancel(),p(e,n,{error:a})}if(r.cancel(),typeof o?.then==="function")return o.then(()=>p(e,n,null),(a)=>p(e,n,{error:a})),!0;return p(e,n,null)}function rk(e){e?._writes?.cancel()}function Tc(e){return Boolean(e?.getModel())}function Xu(e,n){if(!Tc(e)||e.hasTextFocus()||e._writes?.ahead()||e._writes?.shared())return!0;return n!==void 0&&e.getValue()!==n}function b(e){let n=re(e);return[...Yu().map((o)=>o.monacoEditor),Je.functionEditor].filter((o)=>o!=null&&o._editingTab!=null&&re(o._editingTab)===n&&Tc(o))}async function Sp(e){for(let n of b(e)){if(!Tc(n))continue;try{await n._writes?.flush(Zu)}catch(r){k.error(`Could not save the editor's contents into "${e.documentPath??"Untitled"}".`,{detail:r instanceof Error?r.stack??r.message:String(r),key:`buffer-commit:${e.id}`,source:"Editor",...e.documentPath?{path:e.documentPath}:{}})}}}function Tm(e){return b(e).some((n)=>n._writes?.typed()===!0)}
|
|
2
|
-
export{Je,nI,Yi,Yu,Hl,iI,oI,rI,ok,Zu,Sm,Em,rk,Tc,Xu,Sp,Tm};
|
|
3
|
-
|
|
4
|
-
//# debugId=C4534A859E1E5EA564756E2164756E21
|
|
5
|
-
//# sourceMappingURL=studio-z8w183sh.js.map
|