@jxsuite/studio 2.0.0 → 2.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/canvas.html +21 -0
- package/dist/chunks/Overlay.dev-qfjzkms8.js +23 -0
- package/dist/chunks/{Overlay.dev-cszx7yn5.js.map → Overlay.dev-qfjzkms8.js.map} +1 -1
- package/dist/chunks/{adapter-z8fkmbmv.js → adapter-qfnesn5v.js} +2 -2
- package/dist/chunks/{cf-settings-mmyv436d.js → cf-settings-73sh5z4p.js} +3 -3
- package/dist/chunks/{components-0hzentwq.js → components-2bpqp4mq.js} +5 -7
- package/dist/chunks/{components-0hzentwq.js.map → components-2bpqp4mq.js.map} +1 -1
- package/dist/chunks/content-source-34gnkbnn.js +38 -0
- package/dist/chunks/content-source-34gnkbnn.js.map +9 -0
- package/dist/chunks/convert-to-repeater-t8kxre5s.js +258 -0
- package/dist/chunks/convert-to-repeater-t8kxre5s.js.map +10 -0
- package/dist/chunks/extension-sections-6mqydz35.js +301 -0
- package/dist/chunks/extension-sections-6mqydz35.js.map +11 -0
- package/dist/chunks/files-8kn321h1.js +70 -0
- package/dist/chunks/files-8kn321h1.js.map +9 -0
- package/dist/chunks/{format-host-2c188n41.js → format-host-mkwsmt8d.js} +3 -3
- package/dist/chunks/git-panel-tjbr191d.js +51 -0
- package/dist/chunks/git-panel-tjbr191d.js.map +9 -0
- package/dist/chunks/{index-baeg2x3y.js → index-7pxchcce.js} +4 -3
- package/dist/chunks/{index-baeg2x3y.js.map → index-7pxchcce.js.map} +3 -3
- package/dist/chunks/{jx-validate-qx8degj7.js → jx-validate-v6qgknrs.js} +3 -3
- package/dist/chunks/layers-panel-87pb25km.js +58 -0
- package/dist/chunks/layers-panel-87pb25km.js.map +9 -0
- package/dist/chunks/{monaco-setup-zjdp9zdw.js → monaco-setup-e0yh25j4.js} +4 -75
- package/dist/chunks/{monaco-setup-zjdp9zdw.js.map → monaco-setup-e0yh25j4.js.map} +3 -4
- package/dist/chunks/publish-panel-m0fcgdrt.js +21 -0
- package/dist/chunks/publish-panel-m0fcgdrt.js.map +9 -0
- package/dist/chunks/quick-search-rhs6cbsb.js +53 -0
- package/dist/chunks/quick-search-rhs6cbsb.js.map +9 -0
- package/dist/chunks/right-panel-zpdxd98t.js +37 -0
- package/dist/chunks/right-panel-zpdxd98t.js.map +9 -0
- package/dist/chunks/section-registry-zmckaxf4.js +30 -0
- package/dist/chunks/section-registry-zmckaxf4.js.map +9 -0
- package/dist/chunks/sp-overlay.dev-9ran0sfq.js +18 -0
- package/dist/chunks/sp-overlay.dev-9ran0sfq.js.map +9 -0
- package/dist/chunks/sp-popover.dev-rebmdncr.js +9 -0
- package/dist/chunks/sp-popover.dev-rebmdncr.js.map +9 -0
- package/dist/chunks/sp-progress-circle.dev-5vkppfkt.js +15 -0
- package/dist/chunks/sp-progress-circle.dev-5vkppfkt.js.map +9 -0
- package/dist/chunks/sp-tooltip.dev-ykqrg8h5.js +15 -0
- package/dist/chunks/sp-tooltip.dev-ykqrg8h5.js.map +9 -0
- package/dist/chunks/{sp-tray.dev-pb2fsd65.js → sp-tray.dev-ey59vfh7.js} +10 -8
- package/dist/chunks/{sp-tray.dev-pb2fsd65.js.map → sp-tray.dev-ey59vfh7.js.map} +2 -2
- package/dist/chunks/{studio-9qr6fq7p.js → studio-0rqqhrdy.js} +10 -378
- package/dist/chunks/{studio-9qr6fq7p.js.map → studio-0rqqhrdy.js.map} +4 -14
- package/dist/chunks/{studio-5x6tqqec.js → studio-2sj1jj3v.js} +10 -8
- package/dist/chunks/{studio-5x6tqqec.js.map → studio-2sj1jj3v.js.map} +2 -2
- package/dist/chunks/{studio-h3fw0wn8.js → studio-3fk1ac9z.js} +6 -4
- package/dist/chunks/{studio-h3fw0wn8.js.map → studio-3fk1ac9z.js.map} +2 -2
- package/dist/chunks/studio-41exgzhq.js +6690 -0
- package/dist/chunks/studio-41exgzhq.js.map +38 -0
- package/dist/chunks/{studio-7v2bpweq.js → studio-4mqb9a0j.js} +6 -4
- package/dist/chunks/{studio-7v2bpweq.js.map → studio-4mqb9a0j.js.map} +2 -2
- package/dist/chunks/studio-50k77cca.js +1787 -0
- package/dist/chunks/studio-50k77cca.js.map +18 -0
- package/dist/chunks/{studio-56v3zwk6.js → studio-6a0h7sne.js} +10 -8
- package/dist/chunks/{studio-56v3zwk6.js.map → studio-6a0h7sne.js.map} +2 -2
- package/dist/chunks/studio-6f0am8f2.js +53 -0
- package/dist/chunks/studio-6f0am8f2.js.map +10 -0
- package/dist/chunks/studio-6nmjc5qk.js +7002 -0
- package/dist/chunks/studio-6nmjc5qk.js.map +32 -0
- package/dist/chunks/studio-7afd21nw.js +67 -0
- package/dist/chunks/studio-7afd21nw.js.map +10 -0
- package/dist/chunks/{studio-xze4zrs1.js → studio-7bmdvzne.js} +2 -2
- package/dist/chunks/studio-7bmdvzne.js.map +10 -0
- package/dist/chunks/studio-8jpzqk5s.js +128 -0
- package/dist/chunks/studio-8jpzqk5s.js.map +10 -0
- package/dist/chunks/studio-94m77tgk.js +1482 -0
- package/dist/chunks/studio-94m77tgk.js.map +13 -0
- package/dist/chunks/studio-9je6w5sq.js +1000 -0
- package/dist/chunks/studio-9je6w5sq.js.map +16 -0
- package/dist/chunks/{studio-w7c6kvk7.js → studio-a7pzveq1.js} +2 -2
- package/dist/chunks/{studio-97qcgvdn.js → studio-adn0z1k3.js} +14 -8
- package/dist/chunks/{studio-97qcgvdn.js.map → studio-adn0z1k3.js.map} +3 -3
- package/dist/chunks/{studio-kr88ryr7.js → studio-bsxxx3x2.js} +17 -15
- package/dist/chunks/{studio-kr88ryr7.js.map → studio-bsxxx3x2.js.map} +7 -6
- package/dist/chunks/studio-bw5dz6km.js +608 -0
- package/dist/chunks/studio-bw5dz6km.js.map +21 -0
- package/dist/chunks/studio-c6s5getc.js +4232 -0
- package/dist/chunks/studio-c6s5getc.js.map +39 -0
- package/dist/chunks/studio-cjm7fdjf.js +451 -0
- package/dist/chunks/studio-cjm7fdjf.js.map +14 -0
- package/dist/chunks/{studio-cx91mnh8.js → studio-ckwz4d3x.js} +53 -53
- package/dist/chunks/{studio-cx91mnh8.js.map → studio-ckwz4d3x.js.map} +5 -5
- package/dist/chunks/studio-dg7zyt5x.js +28 -0
- package/dist/chunks/studio-dg7zyt5x.js.map +10 -0
- package/dist/chunks/studio-dzcyvvvz.js +166 -0
- package/dist/chunks/studio-dzcyvvvz.js.map +10 -0
- package/dist/chunks/{studio-7kqe41sa.js → studio-evkr5d3b.js} +15 -7
- package/dist/chunks/{studio-7kqe41sa.js.map → studio-evkr5d3b.js.map} +5 -4
- package/dist/chunks/studio-f12h6177.js +411 -0
- package/dist/chunks/studio-f12h6177.js.map +13 -0
- package/dist/chunks/studio-hbp1s8m9.js +1817 -0
- package/dist/chunks/studio-hbp1s8m9.js.map +14 -0
- package/dist/chunks/studio-k2sxjph5.js +15295 -0
- package/dist/chunks/studio-k2sxjph5.js.map +235 -0
- package/dist/chunks/studio-myje51t3.js +385 -0
- package/dist/chunks/studio-myje51t3.js.map +12 -0
- package/dist/chunks/studio-na6rwzhw.js +353 -0
- package/dist/chunks/studio-na6rwzhw.js.map +11 -0
- package/dist/chunks/{studio-4k0m4fmp.js → studio-p471gg5n.js} +126 -3
- package/dist/chunks/studio-p471gg5n.js.map +14 -0
- package/dist/chunks/{studio-9bjwf0d4.js → studio-rgwcpast.js} +5 -46
- package/dist/chunks/{studio-9bjwf0d4.js.map → studio-rgwcpast.js.map} +4 -5
- package/dist/chunks/{studio-hhj92gcr.js → studio-s519zc99.js} +3 -3
- package/dist/chunks/studio-sas7mt3k.js +75 -0
- package/dist/chunks/studio-sas7mt3k.js.map +10 -0
- package/dist/chunks/studio-t5wqwzdh.js +74 -0
- package/dist/chunks/studio-t5wqwzdh.js.map +10 -0
- package/dist/chunks/{studio-9qpspwfn.js → studio-temv5bw4.js} +5 -5
- package/dist/chunks/{studio-9qpspwfn.js.map → studio-temv5bw4.js.map} +1 -1
- package/dist/chunks/{studio-qkvt37c0.js → studio-tr20m8g8.js} +669 -18
- package/dist/chunks/studio-tr20m8g8.js.map +9 -0
- package/dist/chunks/{studio-ygzav7z5.js → studio-v96qfnww.js} +5514 -4291
- package/dist/chunks/studio-v96qfnww.js.map +54 -0
- package/dist/chunks/studio-vcetc91k.js +659 -0
- package/dist/chunks/studio-vcetc91k.js.map +10 -0
- package/dist/chunks/{studio-n9zmpxjg.js → studio-vmymjefp.js} +2972 -4937
- package/dist/chunks/studio-vmymjefp.js.map +98 -0
- package/dist/chunks/{studio-bghqfmea.js → studio-wwseqyw0.js} +2 -2
- package/dist/chunks/studio-x9hmy5kr.js +390 -0
- package/dist/chunks/studio-x9hmy5kr.js.map +10 -0
- package/dist/chunks/studio-xa0ce0n7.js +335 -0
- package/dist/chunks/studio-xa0ce0n7.js.map +10 -0
- package/dist/chunks/studio-xm3dbxvn.js +378 -0
- package/dist/chunks/studio-xm3dbxvn.js.map +19 -0
- package/dist/chunks/{studio-nqw433kv.js → studio-xmvbhg31.js} +2 -2
- package/dist/chunks/studio-zv37yrfa.js +1054 -0
- package/dist/chunks/studio-zv37yrfa.js.map +13 -0
- package/dist/chunks/{ws-client-q7hkz3j9.js → ws-client-654ts66j.js} +6 -4
- package/dist/chunks/ws-client-654ts66j.js.map +11 -0
- package/dist/iframe-entry.js +668 -230
- package/dist/studio.js +23711 -35185
- package/index.html +35 -4685
- package/package.json +17 -15
- package/src/about/about-modal.ts +42 -11
- package/src/browse/library-commands.ts +240 -0
- package/src/browse/library-layouts.ts +369 -0
- package/src/browse/library-model.ts +396 -0
- package/src/browse/library-pane.ts +1049 -0
- package/src/browse/library-preview.ts +252 -0
- package/src/browse/library-source.ts +150 -0
- package/src/canvas/canvas-helpers.ts +33 -9
- package/src/canvas/canvas-live-render.ts +45 -29
- package/src/canvas/canvas-patcher.ts +151 -31
- package/src/canvas/canvas-perf.ts +46 -7
- package/src/canvas/canvas-render.ts +1092 -220
- package/src/canvas/canvas-surface.ts +240 -0
- package/src/canvas/canvas-utils.ts +1166 -124
- package/src/canvas/iframe-drop.ts +2 -1
- package/src/canvas/iframe-entry.ts +241 -4
- package/src/canvas/iframe-host.ts +1226 -143
- package/src/canvas/iframe-inline-edit.ts +31 -0
- package/src/canvas/iframe-interaction.ts +76 -16
- package/src/canvas/iframe-keys.ts +107 -45
- package/src/canvas/iframe-overlay.ts +38 -1
- package/src/canvas/iframe-protocol.ts +137 -2
- package/src/canvas/iframe-render.ts +70 -2
- package/src/canvas/iframe-slash.ts +6 -0
- package/src/canvas/path-mapping.ts +56 -6
- package/src/canvas/surface-registry.ts +292 -0
- package/src/collab/collab-commands.ts +244 -0
- package/src/collab/collab-session.ts +198 -32
- package/src/collab/collab-state.ts +28 -2
- package/src/collab/presence-chips.ts +100 -9
- package/src/commands/active-registry.ts +42 -0
- package/src/commands/app-commands.ts +176 -0
- package/src/commands/budget.ts +158 -0
- package/src/commands/command-args.ts +253 -0
- package/src/commands/context.ts +387 -0
- package/src/commands/defaults.ts +580 -0
- package/src/commands/keymap.ts +571 -0
- package/src/commands/levels.ts +345 -0
- package/src/commands/live-context.ts +193 -0
- package/src/commands/reference.ts +227 -0
- package/src/commands/registry.ts +293 -0
- package/src/component-props.ts +3 -2
- package/src/content/draft-state.ts +106 -0
- package/src/content/entry-commands.ts +282 -0
- package/src/content/entry-editor.ts +327 -0
- package/src/content/entry-fields.ts +116 -0
- package/src/content/entry-model.ts +175 -0
- package/src/editor/canvas-context-menu.ts +17 -11
- package/src/editor/canvas-slash-bridge.ts +11 -4
- package/src/editor/context-menu.ts +804 -204
- package/src/editor/convert-to-component.ts +31 -10
- package/src/editor/convert-to-repeater.ts +3 -2
- package/src/editor/inline-edit-apply.ts +5 -5
- package/src/editor/inline-edit.ts +86 -50
- package/src/editor/insert-zone-action.ts +1 -1
- package/src/editor/shortcuts.ts +1043 -329
- package/src/editor/slash-menu.ts +1 -0
- package/src/files/elements.ts +166 -0
- package/src/files/file-ops.ts +178 -31
- package/src/files/files.ts +898 -268
- package/src/files/fs-events.ts +21 -0
- package/src/files/media-meta.ts +203 -0
- package/src/files/media-paths.ts +141 -0
- package/src/files/media-upload.ts +7 -3
- package/src/files/media-usage.ts +189 -0
- package/src/github/github-auth.ts +235 -33
- package/src/github/github-publish.ts +80 -21
- package/src/grid/grid-controller.ts +152 -12
- package/src/grid/grid-layout.ts +225 -20
- package/src/grid/grid-open.ts +120 -0
- package/src/grid/grid-panel.ts +554 -39
- package/src/grid/grid-source.ts +27 -1
- package/src/grid/redirects-grid.ts +599 -0
- package/src/grid/redirects.ts +398 -0
- package/src/grid/sources/content-source.ts +108 -2
- package/src/i18n/i18n-commands.ts +322 -0
- package/src/new-project/add-repo-modal.ts +8 -10
- package/src/new-project/import-tab.ts +34 -9
- package/src/new-project/location-fields.ts +9 -1
- package/src/new-project/new-project-modal.ts +270 -262
- package/src/packages/jxsuite-update.ts +97 -48
- package/src/packages/pull-package-sync.ts +18 -9
- package/src/page-params.ts +2 -1
- package/src/panels/activity-bar.ts +152 -91
- package/src/panels/activity-panel.ts +481 -0
- package/src/panels/ai-chat/chat-markdown.ts +8 -3
- package/src/panels/ai-chat/chat-view.ts +245 -18
- package/src/panels/ai-chat/composer.ts +31 -5
- package/src/panels/ai-chat/sessions-view.ts +17 -10
- package/src/panels/ai-panel.ts +279 -120
- package/src/panels/block-action-bar.ts +1115 -224
- package/src/panels/bottom-dock.ts +337 -0
- package/src/panels/canvas-dnd-bridge.ts +37 -8
- package/src/panels/chat-panel.ts +29 -12
- package/src/panels/data-explorer.ts +254 -112
- package/src/panels/data-grid.ts +10 -4
- package/src/panels/dnd.ts +28 -51
- package/src/panels/editors.ts +434 -107
- package/src/panels/elements-panel.ts +66 -2
- package/src/panels/empty-state.ts +112 -0
- package/src/panels/events-panel.ts +596 -82
- package/src/panels/formula-workspace.ts +408 -218
- package/src/panels/frontmatter-fields.ts +51 -10
- package/src/panels/frontmatter-panel.ts +357 -79
- package/src/panels/git-panel.ts +375 -164
- package/src/panels/head-panel.ts +791 -85
- package/src/panels/i18n-panel.ts +592 -0
- package/src/panels/imports-panel.ts +95 -85
- package/src/panels/jump-bar.ts +584 -0
- package/src/panels/layers-panel.ts +1106 -328
- package/src/panels/left-panel.ts +109 -204
- package/src/panels/navigator-panels.ts +131 -0
- package/src/panels/overlays.ts +7 -2
- package/src/panels/pane-context.ts +1477 -0
- package/src/panels/pane-grid.ts +406 -0
- package/src/panels/panel-registry.ts +340 -0
- package/src/panels/panel-scheduler.ts +75 -0
- package/src/panels/problems-panel.ts +234 -0
- package/src/panels/properties-panel.ts +946 -1139
- package/src/panels/provenance.ts +258 -0
- package/src/panels/quick-search.ts +791 -122
- package/src/panels/right-panel.ts +228 -102
- package/src/panels/seo-modal.ts +395 -0
- package/src/panels/settings-pane.ts +203 -0
- package/src/panels/signals-panel.ts +354 -137
- package/src/panels/statement-editor.ts +41 -25
- package/src/panels/statusbar.ts +342 -106
- package/src/panels/style-panel.ts +974 -463
- package/src/panels/style-utils.ts +3 -3
- package/src/panels/stylebook-doc.ts +4 -2
- package/src/panels/stylebook-layers-panel.ts +3 -2
- package/src/panels/stylebook-panel.ts +51 -26
- package/src/panels/tab-strip.ts +1058 -78
- package/src/panels/target-line.ts +274 -0
- package/src/panels/toolbar.ts +631 -484
- package/src/panels/welcome-screen.ts +301 -198
- package/src/platform-errors.ts +26 -3
- package/src/platform.ts +96 -2
- package/src/platforms/cloud.ts +71 -8
- package/src/platforms/devserver.ts +92 -29
- package/src/publish/deploy-checklist.ts +383 -0
- package/src/publish/pages-service.ts +10 -1
- package/src/publish/publish-commands.ts +218 -0
- package/src/publish/publish-panel.ts +110 -16
- package/src/recent-projects.ts +3 -2
- package/src/services/a11y-report.ts +505 -0
- package/src/services/ai-models.ts +75 -2
- package/src/services/ai-project-tools.ts +29 -10
- package/src/services/ai-system-prompt.ts +53 -14
- package/src/services/ai-tools.ts +39 -3
- package/src/services/ai-writes.ts +154 -0
- package/src/services/announce.ts +97 -0
- package/src/services/automation.ts +424 -175
- package/src/services/cem-export.ts +9 -4
- package/src/services/clock.ts +61 -0
- package/src/services/document-assistant.ts +36 -8
- package/src/services/idle.ts +179 -0
- package/src/services/import-client.ts +26 -0
- package/src/services/monaco-buffer.ts +627 -0
- package/src/services/monaco-lazy.ts +36 -0
- package/src/services/notify.ts +271 -0
- package/src/services/profile.ts +155 -0
- package/src/services/references.ts +0 -0
- package/src/services/token-lint.ts +3 -2
- package/src/services/tool-executor.ts +53 -7
- package/src/services/trusted-types.ts +123 -0
- package/src/settings/contexts-section.ts +427 -0
- package/src/settings/contributed-section.ts +149 -11
- package/src/settings/css-vars-editor.ts +306 -349
- package/src/settings/defs-editor.ts +93 -34
- package/src/settings/dependencies-editor.ts +7 -7
- package/src/settings/extension-sections.ts +37 -5
- package/src/settings/general-settings.ts +204 -121
- package/src/settings/locales-section.ts +347 -0
- package/src/settings/preferences-accounts.ts +140 -0
- package/src/settings/preferences-dialog.ts +620 -0
- package/src/settings/preferences-keymap.ts +270 -0
- package/src/settings/project-sections.ts +260 -0
- package/src/settings/section-registry.ts +169 -0
- package/src/settings/settings-document.ts +385 -0
- package/src/shell.ts +1549 -0
- package/src/site-context.ts +45 -20
- package/src/state.ts +14 -275
- package/src/store.ts +88 -43
- package/src/studio.ts +790 -346
- package/src/style/live-preview.ts +36 -0
- package/src/style/project-styles.ts +349 -0
- package/src/style/token-ref.ts +123 -0
- package/src/tabs/patch-ops.ts +16 -4
- package/src/tabs/project-config.ts +416 -0
- package/src/tabs/selection.ts +323 -0
- package/src/tabs/tab.ts +182 -47
- package/src/tabs/transact.ts +209 -28
- package/src/types.ts +68 -13
- package/src/ui/ai-credentials-form.ts +39 -35
- package/src/ui/ai-managed-connect.ts +113 -0
- package/src/ui/dynamic-slot.ts +224 -81
- package/src/ui/expression-editor.ts +71 -63
- package/src/ui/field-input.ts +4 -6
- package/src/ui/field-row.ts +215 -38
- package/src/ui/form-controls.ts +194 -7
- package/src/ui/layers.ts +492 -69
- package/src/ui/media-picker.ts +115 -25
- package/src/ui/panel-resize.ts +109 -91
- package/src/ui/progress-modal.ts +131 -50
- package/src/ui/regions.ts +462 -0
- package/src/ui/schema-form.ts +229 -45
- package/src/ui/spectrum.ts +24 -8
- package/src/ui/timing.ts +49 -0
- package/src/ui/value-selector.ts +20 -0
- package/src/ui/value-source.ts +348 -0
- package/src/ui/virtual-window.ts +400 -0
- package/src/utils/edit-display.ts +3 -2
- package/src/utils/inherited-style.ts +67 -37
- package/src/view.ts +64 -78
- package/src/workspace/pane-derive.ts +1258 -0
- package/src/workspace/session.ts +317 -0
- package/src/workspace/workspace.ts +1345 -23
- package/styles/canvas.css +653 -0
- package/styles/forced-colors.css +106 -0
- package/styles/inspector.css +1454 -0
- package/styles/overlays.css +2704 -0
- package/styles/panels.css +1701 -0
- package/styles/shell.css +1423 -0
- package/styles/tokens.css +151 -0
- package/dist/chunks/Overlay.dev-cszx7yn5.js +0 -22
- package/dist/chunks/extension-sections-qct0gt8f.js +0 -531
- package/dist/chunks/extension-sections-qct0gt8f.js.map +0 -12
- package/dist/chunks/files-02zn5y24.js +0 -50
- package/dist/chunks/files-02zn5y24.js.map +0 -9
- package/dist/chunks/git-panel-mbb0y0hz.js +0 -28
- package/dist/chunks/git-panel-mbb0y0hz.js.map +0 -9
- package/dist/chunks/layers-panel-9qekmqk1.js +0 -26
- package/dist/chunks/layers-panel-9qekmqk1.js.map +0 -9
- package/dist/chunks/settings-modal-gj0hrah4.js +0 -29
- package/dist/chunks/settings-modal-gj0hrah4.js.map +0 -9
- package/dist/chunks/sp-overlay.dev-earn5as8.js +0 -17
- package/dist/chunks/sp-overlay.dev-earn5as8.js.map +0 -9
- package/dist/chunks/sp-popover.dev-frxtfejn.js +0 -8
- package/dist/chunks/sp-popover.dev-frxtfejn.js.map +0 -9
- package/dist/chunks/sp-progress-circle.dev-7tvw34h8.js +0 -14
- package/dist/chunks/sp-progress-circle.dev-7tvw34h8.js.map +0 -9
- package/dist/chunks/sp-tooltip.dev-a9fywesm.js +0 -21
- package/dist/chunks/sp-tooltip.dev-a9fywesm.js.map +0 -10
- package/dist/chunks/studio-4k0m4fmp.js.map +0 -13
- package/dist/chunks/studio-568nx4t5.js +0 -469
- package/dist/chunks/studio-568nx4t5.js.map +0 -14
- package/dist/chunks/studio-9smfzqhc.js +0 -19
- package/dist/chunks/studio-9smfzqhc.js.map +0 -10
- package/dist/chunks/studio-asvf0j9e.js +0 -429
- package/dist/chunks/studio-asvf0j9e.js.map +0 -13
- package/dist/chunks/studio-d77qm3pk.js +0 -3427
- package/dist/chunks/studio-d77qm3pk.js.map +0 -26
- package/dist/chunks/studio-j6gqyjf4.js +0 -1854
- package/dist/chunks/studio-j6gqyjf4.js.map +0 -18
- package/dist/chunks/studio-n9zmpxjg.js.map +0 -115
- package/dist/chunks/studio-qkvt37c0.js.map +0 -9
- package/dist/chunks/studio-rq0vxb19.js +0 -3744
- package/dist/chunks/studio-rq0vxb19.js.map +0 -22
- package/dist/chunks/studio-wd6ewdvd.js +0 -853
- package/dist/chunks/studio-wd6ewdvd.js.map +0 -12
- package/dist/chunks/studio-xq0t7n5t.js +0 -140
- package/dist/chunks/studio-xq0t7n5t.js.map +0 -10
- package/dist/chunks/studio-xze4zrs1.js.map +0 -10
- package/dist/chunks/studio-ygzav7z5.js.map +0 -46
- package/dist/chunks/studio-zmy7241e.js +0 -399
- package/dist/chunks/studio-zmy7241e.js.map +0 -12
- package/dist/chunks/ws-client-q7hkz3j9.js.map +0 -11
- package/src/browse/browse-modal.ts +0 -69
- package/src/browse/browse.ts +0 -904
- package/src/canvas/canvas-diff.ts +0 -216
- package/src/canvas/nested-site-style.ts +0 -58
- package/src/new-project/design-fields.ts +0 -264
- package/src/new-project/templates.ts +0 -61
- package/src/panels/tab-bar.ts +0 -548
- package/src/settings/settings-modal.ts +0 -203
- /package/dist/chunks/{adapter-z8fkmbmv.js.map → adapter-qfnesn5v.js.map} +0 -0
- /package/dist/chunks/{cf-settings-mmyv436d.js.map → cf-settings-73sh5z4p.js.map} +0 -0
- /package/dist/chunks/{format-host-2c188n41.js.map → format-host-mkwsmt8d.js.map} +0 -0
- /package/dist/chunks/{jx-validate-qx8degj7.js.map → jx-validate-v6qgknrs.js.map} +0 -0
- /package/dist/chunks/{studio-w7c6kvk7.js.map → studio-a7pzveq1.js.map} +0 -0
- /package/dist/chunks/{studio-hhj92gcr.js.map → studio-s519zc99.js.map} +0 -0
- /package/dist/chunks/{studio-bghqfmea.js.map → studio-wwseqyw0.js.map} +0 -0
- /package/dist/chunks/{studio-nqw433kv.js.map → studio-xmvbhg31.js.map} +0 -0
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../node_modules/lit-html/development/directive-helpers.js", "../../../node_modules/lit-html/development/directive.js", "../../../node_modules/lit-html/development/async-directive.js", "../../../node_modules/lit-html/development/directives/ref.js", "../../../node_modules/lit-html/development/directives/repeat.js"],
|
|
4
|
+
"sourcesContent": [
|
|
5
|
+
"/**\n * @license\n * Copyright 2020 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\nimport { _$LH, } from './lit-html.js';\nconst { _ChildPart: ChildPart } = _$LH;\nconst ENABLE_SHADYDOM_NOPATCH = true;\nconst wrap = ENABLE_SHADYDOM_NOPATCH &&\n window.ShadyDOM?.inUse &&\n window.ShadyDOM?.noPatch === true\n ? window.ShadyDOM.wrap\n : (node) => node;\n/**\n * Tests if a value is a primitive value.\n *\n * See https://tc39.github.io/ecma262/#sec-typeof-operator\n */\nexport const isPrimitive = (value) => value === null || (typeof value != 'object' && typeof value != 'function');\nexport const TemplateResultType = {\n HTML: 1,\n SVG: 2,\n MATHML: 3,\n};\n/**\n * Tests if a value is a TemplateResult or a CompiledTemplateResult.\n */\nexport const isTemplateResult = (value, type) => type === undefined\n ? // This property needs to remain unminified.\n value?.['_$litType$'] !== undefined\n : value?.['_$litType$'] === type;\n/**\n * Tests if a value is a CompiledTemplateResult.\n */\nexport const isCompiledTemplateResult = (value) => {\n return value?.['_$litType$']?.h != null;\n};\n/**\n * Tests if a value is a DirectiveResult.\n */\nexport const isDirectiveResult = (value) => \n// This property needs to remain unminified.\nvalue?.['_$litDirective$'] !== undefined;\n/**\n * Retrieves the Directive class for a DirectiveResult\n */\nexport const getDirectiveClass = (value) => \n// This property needs to remain unminified.\nvalue?.['_$litDirective$'];\n/**\n * Tests whether a part has only a single-expression with no strings to\n * interpolate between.\n *\n * Only AttributePart and PropertyPart can have multiple expressions.\n * Multi-expression parts have a `strings` property and single-expression\n * parts do not.\n */\nexport const isSingleExpression = (part) => part.strings === undefined;\nconst createMarker = () => document.createComment('');\n/**\n * Inserts a ChildPart into the given container ChildPart's DOM, either at the\n * end of the container ChildPart, or before the optional `refPart`.\n *\n * This does not add the part to the containerPart's committed value. That must\n * be done by callers.\n *\n * @param containerPart Part within which to add the new ChildPart\n * @param refPart Part before which to add the new ChildPart; when omitted the\n * part added to the end of the `containerPart`\n * @param part Part to insert, or undefined to create a new part\n */\nexport const insertPart = (containerPart, refPart, part) => {\n const container = wrap(containerPart._$startNode).parentNode;\n const refNode = refPart === undefined ? containerPart._$endNode : refPart._$startNode;\n if (part === undefined) {\n const startNode = wrap(container).insertBefore(createMarker(), refNode);\n const endNode = wrap(container).insertBefore(createMarker(), refNode);\n part = new ChildPart(startNode, endNode, containerPart, containerPart.options);\n }\n else {\n const endNode = wrap(part._$endNode).nextSibling;\n const oldParent = part._$parent;\n const parentChanged = oldParent !== containerPart;\n if (parentChanged) {\n part._$reparentDisconnectables?.(containerPart);\n // Note that although `_$reparentDisconnectables` updates the part's\n // `_$parent` reference after unlinking from its current parent, that\n // method only exists if Disconnectables are present, so we need to\n // unconditionally set it here\n part._$parent = containerPart;\n // Since the _$isConnected getter is somewhat costly, only\n // read it once we know the subtree has directives that need\n // to be notified\n let newConnectionState;\n if (part._$notifyConnectionChanged !== undefined &&\n (newConnectionState = containerPart._$isConnected) !==\n oldParent._$isConnected) {\n part._$notifyConnectionChanged(newConnectionState);\n }\n }\n if (endNode !== refNode || parentChanged) {\n let start = part._$startNode;\n while (start !== endNode) {\n const n = wrap(start).nextSibling;\n wrap(container).insertBefore(start, refNode);\n start = n;\n }\n }\n }\n return part;\n};\n/**\n * Sets the value of a Part.\n *\n * Note that this should only be used to set/update the value of user-created\n * parts (i.e. those created using `insertPart`); it should not be used\n * by directives to set the value of the directive's container part. Directives\n * should return a value from `update`/`render` to update their part state.\n *\n * For directives that require setting their part value asynchronously, they\n * should extend `AsyncDirective` and call `this.setValue()`.\n *\n * @param part Part to set\n * @param value Value to set\n * @param index For `AttributePart`s, the index to set\n * @param directiveParent Used internally; should not be set by user\n */\nexport const setChildPartValue = (part, value, directiveParent = part) => {\n part._$setValue(value, directiveParent);\n return part;\n};\n// A sentinel value that can never appear as a part value except when set by\n// live(). Used to force a dirty-check to fail and cause a re-render.\nconst RESET_VALUE = {};\n/**\n * Sets the committed value of a ChildPart directly without triggering the\n * commit stage of the part.\n *\n * This is useful in cases where a directive needs to update the part such\n * that the next update detects a value change or not. When value is omitted,\n * the next update will be guaranteed to be detected as a change.\n *\n * @param part\n * @param value\n */\nexport const setCommittedValue = (part, value = RESET_VALUE) => (part._$committedValue = value);\n/**\n * Returns the committed value of a ChildPart.\n *\n * The committed value is used for change detection and efficient updates of\n * the part. It can differ from the value set by the template or directive in\n * cases where the template value is transformed before being committed.\n *\n * - `TemplateResult`s are committed as a `TemplateInstance`\n * - Iterables are committed as `Array<ChildPart>`\n * - All other types are committed as the template value or value returned or\n * set by a directive.\n *\n * @param part\n */\nexport const getCommittedValue = (part) => part._$committedValue;\n/**\n * Removes a ChildPart from the DOM, including any of its content and markers.\n *\n * Note: The only difference between this and clearPart() is that this also\n * removes the part's start node. This means that the ChildPart must own its\n * start node, ie it must be a marker node specifically for this part and not an\n * anchor from surrounding content.\n *\n * @param part The Part to remove\n */\nexport const removePart = (part) => {\n part._$clear();\n part._$startNode.remove();\n};\nexport const clearPart = (part) => {\n part._$clear();\n};\n//# sourceMappingURL=directive-helpers.js.map",
|
|
6
|
+
"/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\nexport const PartType = {\n ATTRIBUTE: 1,\n CHILD: 2,\n PROPERTY: 3,\n BOOLEAN_ATTRIBUTE: 4,\n EVENT: 5,\n ELEMENT: 6,\n};\n/**\n * Creates a user-facing directive function from a Directive class. This\n * function has the same parameters as the directive's render() method.\n */\nexport const directive = (c) => (...values) => ({\n // This property needs to remain unminified.\n ['_$litDirective$']: c,\n values,\n});\n/**\n * Base class for creating custom directives. Users should extend this class,\n * implement `render` and/or `update`, and then pass their subclass to\n * `directive`.\n */\nexport class Directive {\n constructor(_partInfo) { }\n // See comment in Disconnectable interface for why this is a getter\n get _$isConnected() {\n return this._$parent._$isConnected;\n }\n /** @internal */\n _$initialize(part, parent, attributeIndex) {\n this.__part = part;\n this._$parent = parent;\n this.__attributeIndex = attributeIndex;\n }\n /** @internal */\n _$resolve(part, props) {\n return this.update(part, props);\n }\n update(_part, props) {\n return this.render(...props);\n }\n}\n//# sourceMappingURL=directive.js.map",
|
|
7
|
+
"/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\nimport { isSingleExpression } from './directive-helpers.js';\nimport { Directive, PartType } from './directive.js';\nexport * from './directive.js';\nconst DEV_MODE = true;\n/**\n * Recursively walks down the tree of Parts/TemplateInstances/Directives to set\n * the connected state of directives and run `disconnected`/ `reconnected`\n * callbacks.\n *\n * @return True if there were children to disconnect; false otherwise\n */\nconst notifyChildrenConnectedChanged = (parent, isConnected) => {\n const children = parent._$disconnectableChildren;\n if (children === undefined) {\n return false;\n }\n for (const obj of children) {\n // The existence of `_$notifyDirectiveConnectionChanged` is used as a \"brand\" to\n // disambiguate AsyncDirectives from other DisconnectableChildren\n // (as opposed to using an instanceof check to know when to call it); the\n // redundancy of \"Directive\" in the API name is to avoid conflicting with\n // `_$notifyConnectionChanged`, which exists `ChildParts` which are also in\n // this list\n // Disconnect Directive (and any nested directives contained within)\n // This property needs to remain unminified.\n obj['_$notifyDirectiveConnectionChanged']?.(isConnected, false);\n // Disconnect Part/TemplateInstance\n notifyChildrenConnectedChanged(obj, isConnected);\n }\n return true;\n};\n/**\n * Removes the given child from its parent list of disconnectable children, and\n * if the parent list becomes empty as a result, removes the parent from its\n * parent, and so forth up the tree when that causes subsequent parent lists to\n * become empty.\n */\nconst removeDisconnectableFromParent = (obj) => {\n let parent, children;\n do {\n if ((parent = obj._$parent) === undefined) {\n break;\n }\n children = parent._$disconnectableChildren;\n children.delete(obj);\n obj = parent;\n } while (children?.size === 0);\n};\nconst addDisconnectableToParent = (obj) => {\n // Climb the parent tree, creating a sparse tree of children needing\n // disconnection\n for (let parent; (parent = obj._$parent); obj = parent) {\n let children = parent._$disconnectableChildren;\n if (children === undefined) {\n parent._$disconnectableChildren = children = new Set();\n }\n else if (children.has(obj)) {\n // Once we've reached a parent that already contains this child, we\n // can short-circuit\n break;\n }\n children.add(obj);\n installDisconnectAPI(parent);\n }\n};\n/**\n * Changes the parent reference of the ChildPart, and updates the sparse tree of\n * Disconnectable children accordingly.\n *\n * Note, this method will be patched onto ChildPart instances and called from\n * the core code when parts are moved between different parents.\n */\nfunction reparentDisconnectables(newParent) {\n if (this._$disconnectableChildren !== undefined) {\n removeDisconnectableFromParent(this);\n this._$parent = newParent;\n addDisconnectableToParent(this);\n }\n else {\n this._$parent = newParent;\n }\n}\n/**\n * Sets the connected state on any directives contained within the committed\n * value of this part (i.e. within a TemplateInstance or iterable of\n * ChildParts) and runs their `disconnected`/`reconnected`s, as well as within\n * any directives stored on the ChildPart (when `valueOnly` is false).\n *\n * `isClearingValue` should be passed as `true` on a top-level part that is\n * clearing itself, and not as a result of recursively disconnecting directives\n * as part of a `clear` operation higher up the tree. This both ensures that any\n * directive on this ChildPart that produced a value that caused the clear\n * operation is not disconnected, and also serves as a performance optimization\n * to avoid needless bookkeeping when a subtree is going away; when clearing a\n * subtree, only the top-most part need to remove itself from the parent.\n *\n * `fromPartIndex` is passed only in the case of a partial `_clear` running as a\n * result of truncating an iterable.\n *\n * Note, this method will be patched onto ChildPart instances and called from the\n * core code when parts are cleared or the connection state is changed by the\n * user.\n */\nfunction notifyChildPartConnectedChanged(isConnected, isClearingValue = false, fromPartIndex = 0) {\n const value = this._$committedValue;\n const children = this._$disconnectableChildren;\n if (children === undefined || children.size === 0) {\n return;\n }\n if (isClearingValue) {\n if (Array.isArray(value)) {\n // Iterable case: Any ChildParts created by the iterable should be\n // disconnected and removed from this ChildPart's disconnectable\n // children (starting at `fromPartIndex` in the case of truncation)\n for (let i = fromPartIndex; i < value.length; i++) {\n notifyChildrenConnectedChanged(value[i], false);\n removeDisconnectableFromParent(value[i]);\n }\n }\n else if (value != null) {\n // TemplateInstance case: If the value has disconnectable children (will\n // only be in the case that it is a TemplateInstance), we disconnect it\n // and remove it from this ChildPart's disconnectable children\n notifyChildrenConnectedChanged(value, false);\n removeDisconnectableFromParent(value);\n }\n }\n else {\n notifyChildrenConnectedChanged(this, isConnected);\n }\n}\n/**\n * Patches disconnection API onto ChildParts.\n */\nconst installDisconnectAPI = (obj) => {\n if (obj.type == PartType.CHILD) {\n obj._$notifyConnectionChanged ??=\n notifyChildPartConnectedChanged;\n obj._$reparentDisconnectables ??= reparentDisconnectables;\n }\n};\n/**\n * An abstract `Directive` base class whose `disconnected` method will be\n * called when the part containing the directive is cleared as a result of\n * re-rendering, or when the user calls `part.setConnected(false)` on\n * a part that was previously rendered containing the directive (as happens\n * when e.g. a LitElement disconnects from the DOM).\n *\n * If `part.setConnected(true)` is subsequently called on a\n * containing part, the directive's `reconnected` method will be called prior\n * to its next `update`/`render` callbacks. When implementing `disconnected`,\n * `reconnected` should also be implemented to be compatible with reconnection.\n *\n * Note that updates may occur while the directive is disconnected. As such,\n * directives should generally check the `this.isConnected` flag during\n * render/update to determine whether it is safe to subscribe to resources\n * that may prevent garbage collection.\n */\nexport class AsyncDirective extends Directive {\n constructor() {\n super(...arguments);\n // @internal\n this._$disconnectableChildren = undefined;\n }\n /**\n * Initialize the part with internal fields\n * @param part\n * @param parent\n * @param attributeIndex\n */\n _$initialize(part, parent, attributeIndex) {\n super._$initialize(part, parent, attributeIndex);\n addDisconnectableToParent(this);\n this.isConnected = part._$isConnected;\n }\n // This property needs to remain unminified.\n /**\n * Called from the core code when a directive is going away from a part (in\n * which case `shouldRemoveFromParent` should be true), and from the\n * `setChildrenConnected` helper function when recursively changing the\n * connection state of a tree (in which case `shouldRemoveFromParent` should\n * be false).\n *\n * @param isConnected\n * @param isClearingDirective - True when the directive itself is being\n * removed; false when the tree is being disconnected\n * @internal\n */\n ['_$notifyDirectiveConnectionChanged'](isConnected, isClearingDirective = true) {\n if (isConnected !== this.isConnected) {\n this.isConnected = isConnected;\n if (isConnected) {\n this.reconnected?.();\n }\n else {\n this.disconnected?.();\n }\n }\n if (isClearingDirective) {\n notifyChildrenConnectedChanged(this, isConnected);\n removeDisconnectableFromParent(this);\n }\n }\n /**\n * Sets the value of the directive's Part outside the normal `update`/`render`\n * lifecycle of a directive.\n *\n * This method should not be called synchronously from a directive's `update`\n * or `render`.\n *\n * @param directive The directive to update\n * @param value The value to set\n */\n setValue(value) {\n if (isSingleExpression(this.__part)) {\n this.__part._$setValue(value, this);\n }\n else {\n // this.__attributeIndex will be defined in this case, but\n // assert it in dev mode\n if (DEV_MODE && this.__attributeIndex === undefined) {\n throw new Error(`Expected this.__attributeIndex to be a number`);\n }\n const newValues = [...this.__part._$committedValue];\n newValues[this.__attributeIndex] = value;\n this.__part._$setValue(newValues, this, 0);\n }\n }\n /**\n * User callbacks for implementing logic to release any resources/subscriptions\n * that may have been retained by this directive. Since directives may also be\n * re-connected, `reconnected` should also be implemented to restore the\n * working state of the directive prior to the next render.\n */\n disconnected() { }\n reconnected() { }\n}\n//# sourceMappingURL=async-directive.js.map",
|
|
8
|
+
"/**\n * @license\n * Copyright 2020 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\nimport { nothing } from '../lit-html.js';\nimport { directive, AsyncDirective } from '../async-directive.js';\n/**\n * Creates a new Ref object, which is container for a reference to an element.\n */\nexport const createRef = () => new Ref();\n/**\n * An object that holds a ref value.\n */\nclass Ref {\n}\n// When callbacks are used for refs, this map tracks the last value the callback\n// was called with, for ensuring a directive doesn't clear the ref if the ref\n// has already been rendered to a new spot. It is double-keyed on both the\n// context (`options.host`) and the callback, since we auto-bind class methods\n// to `options.host`.\nconst lastElementForContextAndCallback = new WeakMap();\nclass RefDirective extends AsyncDirective {\n render(_ref) {\n return nothing;\n }\n update(part, [ref]) {\n const refChanged = ref !== this._ref;\n if (refChanged) {\n // The ref passed to the directive has changed;\n // unset the previous ref's value\n this._updateRefValue(undefined);\n }\n if (refChanged || this._lastElementForRef !== this._element) {\n // We either got a new ref or this is the first render;\n // store the ref/element & update the ref value\n this._ref = ref;\n this._context = part.options?.host;\n this._updateRefValue((this._element = part.element));\n }\n return nothing;\n }\n _updateRefValue(element) {\n if (this._ref === undefined) {\n return;\n }\n if (!this.isConnected) {\n element = undefined;\n }\n if (typeof this._ref === 'function') {\n // If the current ref was called with a previous value, call with\n // `undefined`; We do this to ensure callbacks are called in a consistent\n // way regardless of whether a ref might be moving up in the tree (in\n // which case it would otherwise be called with the new value before the\n // previous one unsets it) and down in the tree (where it would be unset\n // before being set). Note that element lookup is keyed by\n // both the context and the callback, since we allow passing unbound\n // functions that are called on options.host, and we want to treat\n // these as unique \"instances\" of a function.\n const context = this._context ?? globalThis;\n let lastElementForCallback = lastElementForContextAndCallback.get(context);\n if (lastElementForCallback === undefined) {\n lastElementForCallback = new WeakMap();\n lastElementForContextAndCallback.set(context, lastElementForCallback);\n }\n if (lastElementForCallback.get(this._ref) !== undefined) {\n this._ref.call(this._context, undefined);\n }\n lastElementForCallback.set(this._ref, element);\n // Call the ref with the new element value\n if (element !== undefined) {\n this._ref.call(this._context, element);\n }\n }\n else {\n this._ref.value = element;\n }\n }\n get _lastElementForRef() {\n return typeof this._ref === 'function'\n ? lastElementForContextAndCallback\n .get(this._context ?? globalThis)\n ?.get(this._ref)\n : this._ref?.value;\n }\n disconnected() {\n // Only clear the box if our element is still the one in it (i.e. another\n // directive instance hasn't rendered its element to it before us); that\n // only happens in the event of the directive being cleared (not via manual\n // disconnection)\n if (this._lastElementForRef === this._element) {\n this._updateRefValue(undefined);\n }\n }\n reconnected() {\n // If we were manually disconnected, we can safely put our element back in\n // the box, since no rendering could have occurred to change its state\n this._updateRefValue(this._element);\n }\n}\n/**\n * Sets the value of a Ref object or calls a ref callback with the element it's\n * bound to.\n *\n * A Ref object acts as a container for a reference to an element. A ref\n * callback is a function that takes an element as its only argument.\n *\n * The ref directive sets the value of the Ref object or calls the ref callback\n * during rendering, if the referenced element changed.\n *\n * Note: If a ref callback is rendered to a different element position or is\n * removed in a subsequent render, it will first be called with `undefined`,\n * followed by another call with the new element it was rendered to (if any).\n *\n * ```js\n * // Using Ref object\n * const inputRef = createRef();\n * render(html`<input ${ref(inputRef)}>`, container);\n * inputRef.value.focus();\n *\n * // Using callback\n * const callback = (inputElement) => inputElement.focus();\n * render(html`<input ${ref(callback)}>`, container);\n * ```\n */\nexport const ref = directive(RefDirective);\n//# sourceMappingURL=ref.js.map",
|
|
9
|
+
"/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\nimport { noChange } from '../lit-html.js';\nimport { directive, Directive, PartType } from '../directive.js';\nimport { insertPart, getCommittedValue, removePart, setCommittedValue, setChildPartValue, } from '../directive-helpers.js';\n// Helper for generating a map of array item to its index over a subset\n// of an array (used to lazily generate `newKeyToIndexMap` and\n// `oldKeyToIndexMap`)\nconst generateMap = (list, start, end) => {\n const map = new Map();\n for (let i = start; i <= end; i++) {\n map.set(list[i], i);\n }\n return map;\n};\nclass RepeatDirective extends Directive {\n constructor(partInfo) {\n super(partInfo);\n if (partInfo.type !== PartType.CHILD) {\n throw new Error('repeat() can only be used in text expressions');\n }\n }\n _getValuesAndKeys(items, keyFnOrTemplate, template) {\n let keyFn;\n if (template === undefined) {\n template = keyFnOrTemplate;\n }\n else if (keyFnOrTemplate !== undefined) {\n keyFn = keyFnOrTemplate;\n }\n const keys = [];\n const values = [];\n let index = 0;\n for (const item of items) {\n keys[index] = keyFn ? keyFn(item, index) : index;\n values[index] = template(item, index);\n index++;\n }\n return {\n values,\n keys,\n };\n }\n render(items, keyFnOrTemplate, template) {\n return this._getValuesAndKeys(items, keyFnOrTemplate, template).values;\n }\n update(containerPart, [items, keyFnOrTemplate, template]) {\n // Old part & key lists are retrieved from the last update (which may\n // be primed by hydration)\n const oldParts = getCommittedValue(containerPart);\n const { values: newValues, keys: newKeys } = this._getValuesAndKeys(items, keyFnOrTemplate, template);\n // We check that oldParts, the committed value, is an Array as an\n // indicator that the previous value came from a repeat() call. If\n // oldParts is not an Array then this is the first render and we return\n // an array for lit-html's array handling to render, and remember the\n // keys.\n if (!Array.isArray(oldParts)) {\n this._itemKeys = newKeys;\n return newValues;\n }\n // In SSR hydration it's possible for oldParts to be an array but for us\n // to not have item keys because the update() hasn't run yet. We set the\n // keys to an empty array. This will cause all oldKey/newKey comparisons\n // to fail and execution to fall to the last nested brach below which\n // reuses the oldPart.\n const oldKeys = (this._itemKeys ??= []);\n // New part list will be built up as we go (either reused from\n // old parts or created for new keys in this update). This is\n // saved in the above cache at the end of the update.\n const newParts = [];\n // Maps from key to index for current and previous update; these\n // are generated lazily only when needed as a performance\n // optimization, since they are only required for multiple\n // non-contiguous changes in the list, which are less common.\n let newKeyToIndexMap;\n let oldKeyToIndexMap;\n // Head and tail pointers to old parts and new values\n let oldHead = 0;\n let oldTail = oldParts.length - 1;\n let newHead = 0;\n let newTail = newValues.length - 1;\n // Overview of O(n) reconciliation algorithm (general approach\n // based on ideas found in ivi, vue, snabbdom, etc.):\n //\n // * We start with the list of old parts and new values (and\n // arrays of their respective keys), head/tail pointers into\n // each, and we build up the new list of parts by updating\n // (and when needed, moving) old parts or creating new ones.\n // The initial scenario might look like this (for brevity of\n // the diagrams, the numbers in the array reflect keys\n // associated with the old parts or new values, although keys\n // and parts/values are actually stored in parallel arrays\n // indexed using the same head/tail pointers):\n //\n // oldHead v v oldTail\n // oldKeys: [0, 1, 2, 3, 4, 5, 6]\n // newParts: [ , , , , , , ]\n // newKeys: [0, 2, 1, 4, 3, 7, 6] <- reflects the user's new\n // item order\n // newHead ^ ^ newTail\n //\n // * Iterate old & new lists from both sides, updating,\n // swapping, or removing parts at the head/tail locations\n // until neither head nor tail can move.\n //\n // * Example below: keys at head pointers match, so update old\n // part 0 in-place (no need to move it) and record part 0 in\n // the `newParts` list. The last thing we do is advance the\n // `oldHead` and `newHead` pointers (will be reflected in the\n // next diagram).\n //\n // oldHead v v oldTail\n // oldKeys: [0, 1, 2, 3, 4, 5, 6]\n // newParts: [0, , , , , , ] <- heads matched: update 0\n // newKeys: [0, 2, 1, 4, 3, 7, 6] and advance both oldHead\n // & newHead\n // newHead ^ ^ newTail\n //\n // * Example below: head pointers don't match, but tail\n // pointers do, so update part 6 in place (no need to move\n // it), and record part 6 in the `newParts` list. Last,\n // advance the `oldTail` and `oldHead` pointers.\n //\n // oldHead v v oldTail\n // oldKeys: [0, 1, 2, 3, 4, 5, 6]\n // newParts: [0, , , , , , 6] <- tails matched: update 6\n // newKeys: [0, 2, 1, 4, 3, 7, 6] and advance both oldTail\n // & newTail\n // newHead ^ ^ newTail\n //\n // * If neither head nor tail match; next check if one of the\n // old head/tail items was removed. We first need to generate\n // the reverse map of new keys to index (`newKeyToIndexMap`),\n // which is done once lazily as a performance optimization,\n // since we only hit this case if multiple non-contiguous\n // changes were made. Note that for contiguous removal\n // anywhere in the list, the head and tails would advance\n // from either end and pass each other before we get to this\n // case and removals would be handled in the final while loop\n // without needing to generate the map.\n //\n // * Example below: The key at `oldTail` was removed (no longer\n // in the `newKeyToIndexMap`), so remove that part from the\n // DOM and advance just the `oldTail` pointer.\n //\n // oldHead v v oldTail\n // oldKeys: [0, 1, 2, 3, 4, 5, 6]\n // newParts: [0, , , , , , 6] <- 5 not in new map: remove\n // newKeys: [0, 2, 1, 4, 3, 7, 6] 5 and advance oldTail\n // newHead ^ ^ newTail\n //\n // * Once head and tail cannot move, any mismatches are due to\n // either new or moved items; if a new key is in the previous\n // \"old key to old index\" map, move the old part to the new\n // location, otherwise create and insert a new part. Note\n // that when moving an old part we null its position in the\n // oldParts array if it lies between the head and tail so we\n // know to skip it when the pointers get there.\n //\n // * Example below: neither head nor tail match, and neither\n // were removed; so find the `newHead` key in the\n // `oldKeyToIndexMap`, and move that old part's DOM into the\n // next head position (before `oldParts[oldHead]`). Last,\n // null the part in the `oldPart` array since it was\n // somewhere in the remaining oldParts still to be scanned\n // (between the head and tail pointers) so that we know to\n // skip that old part on future iterations.\n //\n // oldHead v v oldTail\n // oldKeys: [0, 1, -, 3, 4, 5, 6]\n // newParts: [0, 2, , , , , 6] <- stuck: update & move 2\n // newKeys: [0, 2, 1, 4, 3, 7, 6] into place and advance\n // newHead\n // newHead ^ ^ newTail\n //\n // * Note that for moves/insertions like the one above, a part\n // inserted at the head pointer is inserted before the\n // current `oldParts[oldHead]`, and a part inserted at the\n // tail pointer is inserted before `newParts[newTail+1]`. The\n // seeming asymmetry lies in the fact that new parts are\n // moved into place outside in, so to the right of the head\n // pointer are old parts, and to the right of the tail\n // pointer are new parts.\n //\n // * We always restart back from the top of the algorithm,\n // allowing matching and simple updates in place to\n // continue...\n //\n // * Example below: the head pointers once again match, so\n // simply update part 1 and record it in the `newParts`\n // array. Last, advance both head pointers.\n //\n // oldHead v v oldTail\n // oldKeys: [0, 1, -, 3, 4, 5, 6]\n // newParts: [0, 2, 1, , , , 6] <- heads matched: update 1\n // newKeys: [0, 2, 1, 4, 3, 7, 6] and advance both oldHead\n // & newHead\n // newHead ^ ^ newTail\n //\n // * As mentioned above, items that were moved as a result of\n // being stuck (the final else clause in the code below) are\n // marked with null, so we always advance old pointers over\n // these so we're comparing the next actual old value on\n // either end.\n //\n // * Example below: `oldHead` is null (already placed in\n // newParts), so advance `oldHead`.\n //\n // oldHead v v oldTail\n // oldKeys: [0, 1, -, 3, 4, 5, 6] <- old head already used:\n // newParts: [0, 2, 1, , , , 6] advance oldHead\n // newKeys: [0, 2, 1, 4, 3, 7, 6]\n // newHead ^ ^ newTail\n //\n // * Note it's not critical to mark old parts as null when they\n // are moved from head to tail or tail to head, since they\n // will be outside the pointer range and never visited again.\n //\n // * Example below: Here the old tail key matches the new head\n // key, so the part at the `oldTail` position and move its\n // DOM to the new head position (before `oldParts[oldHead]`).\n // Last, advance `oldTail` and `newHead` pointers.\n //\n // oldHead v v oldTail\n // oldKeys: [0, 1, -, 3, 4, 5, 6]\n // newParts: [0, 2, 1, 4, , , 6] <- old tail matches new\n // newKeys: [0, 2, 1, 4, 3, 7, 6] head: update & move 4,\n // advance oldTail & newHead\n // newHead ^ ^ newTail\n //\n // * Example below: Old and new head keys match, so update the\n // old head part in place, and advance the `oldHead` and\n // `newHead` pointers.\n //\n // oldHead v oldTail\n // oldKeys: [0, 1, -, 3, 4, 5, 6]\n // newParts: [0, 2, 1, 4, 3, ,6] <- heads match: update 3\n // newKeys: [0, 2, 1, 4, 3, 7, 6] and advance oldHead &\n // newHead\n // newHead ^ ^ newTail\n //\n // * Once the new or old pointers move past each other then all\n // we have left is additions (if old list exhausted) or\n // removals (if new list exhausted). Those are handled in the\n // final while loops at the end.\n //\n // * Example below: `oldHead` exceeded `oldTail`, so we're done\n // with the main loop. Create the remaining part and insert\n // it at the new head position, and the update is complete.\n //\n // (oldHead > oldTail)\n // oldKeys: [0, 1, -, 3, 4, 5, 6]\n // newParts: [0, 2, 1, 4, 3, 7 ,6] <- create and insert 7\n // newKeys: [0, 2, 1, 4, 3, 7, 6]\n // newHead ^ newTail\n //\n // * Note that the order of the if/else clauses is not\n // important to the algorithm, as long as the null checks\n // come first (to ensure we're always working on valid old\n // parts) and that the final else clause comes last (since\n // that's where the expensive moves occur). The order of\n // remaining clauses is just a simple guess at which cases\n // will be most common.\n //\n // * Note, we could calculate the longest\n // increasing subsequence (LIS) of old items in new position,\n // and only move those not in the LIS set. However that costs\n // O(nlogn) time and adds a bit more code, and only helps\n // make rare types of mutations require fewer moves. The\n // above handles removes, adds, reversal, swaps, and single\n // moves of contiguous items in linear time, in the minimum\n // number of moves. As the number of multiple moves where LIS\n // might help approaches a random shuffle, the LIS\n // optimization becomes less helpful, so it seems not worth\n // the code at this point. Could reconsider if a compelling\n // case arises.\n while (oldHead <= oldTail && newHead <= newTail) {\n if (oldParts[oldHead] === null) {\n // `null` means old part at head has already been used\n // below; skip\n oldHead++;\n }\n else if (oldParts[oldTail] === null) {\n // `null` means old part at tail has already been used\n // below; skip\n oldTail--;\n }\n else if (oldKeys[oldHead] === newKeys[newHead]) {\n // Old head matches new head; update in place\n newParts[newHead] = setChildPartValue(oldParts[oldHead], newValues[newHead]);\n oldHead++;\n newHead++;\n }\n else if (oldKeys[oldTail] === newKeys[newTail]) {\n // Old tail matches new tail; update in place\n newParts[newTail] = setChildPartValue(oldParts[oldTail], newValues[newTail]);\n oldTail--;\n newTail--;\n }\n else if (oldKeys[oldHead] === newKeys[newTail]) {\n // Old head matches new tail; update and move to new tail\n newParts[newTail] = setChildPartValue(oldParts[oldHead], newValues[newTail]);\n insertPart(containerPart, newParts[newTail + 1], oldParts[oldHead]);\n oldHead++;\n newTail--;\n }\n else if (oldKeys[oldTail] === newKeys[newHead]) {\n // Old tail matches new head; update and move to new head\n newParts[newHead] = setChildPartValue(oldParts[oldTail], newValues[newHead]);\n insertPart(containerPart, oldParts[oldHead], oldParts[oldTail]);\n oldTail--;\n newHead++;\n }\n else {\n if (newKeyToIndexMap === undefined) {\n // Lazily generate key-to-index maps, used for removals &\n // moves below\n newKeyToIndexMap = generateMap(newKeys, newHead, newTail);\n oldKeyToIndexMap = generateMap(oldKeys, oldHead, oldTail);\n }\n if (!newKeyToIndexMap.has(oldKeys[oldHead])) {\n // Old head is no longer in new list; remove\n removePart(oldParts[oldHead]);\n oldHead++;\n }\n else if (!newKeyToIndexMap.has(oldKeys[oldTail])) {\n // Old tail is no longer in new list; remove\n removePart(oldParts[oldTail]);\n oldTail--;\n }\n else {\n // Any mismatches at this point are due to additions or\n // moves; see if we have an old part we can reuse and move\n // into place\n const oldIndex = oldKeyToIndexMap.get(newKeys[newHead]);\n const oldPart = oldIndex !== undefined ? oldParts[oldIndex] : null;\n if (oldPart === null) {\n // No old part for this value; create a new one and\n // insert it\n const newPart = insertPart(containerPart, oldParts[oldHead]);\n setChildPartValue(newPart, newValues[newHead]);\n newParts[newHead] = newPart;\n }\n else {\n // Reuse old part\n newParts[newHead] = setChildPartValue(oldPart, newValues[newHead]);\n insertPart(containerPart, oldParts[oldHead], oldPart);\n // This marks the old part as having been used, so that\n // it will be skipped in the first two checks above\n oldParts[oldIndex] = null;\n }\n newHead++;\n }\n }\n }\n // Add parts for any remaining new values\n while (newHead <= newTail) {\n // For all remaining additions, we insert before last new\n // tail, since old pointers are no longer valid\n const newPart = insertPart(containerPart, newParts[newTail + 1]);\n setChildPartValue(newPart, newValues[newHead]);\n newParts[newHead++] = newPart;\n }\n // Remove any remaining unused old parts\n while (oldHead <= oldTail) {\n const oldPart = oldParts[oldHead++];\n if (oldPart !== null) {\n removePart(oldPart);\n }\n }\n // Save order of new parts for next round\n this._itemKeys = newKeys;\n // Directly set part value, bypassing it's dirty-checking\n setCommittedValue(containerPart, newParts);\n return noChange;\n }\n}\n/**\n * A directive that repeats a series of values (usually `TemplateResults`)\n * generated from an iterable, and updates those items efficiently when the\n * iterable changes based on user-provided `keys` associated with each item.\n *\n * Note that if a `keyFn` is provided, strict key-to-DOM mapping is maintained,\n * meaning previous DOM for a given key is moved into the new position if\n * needed, and DOM will never be reused with values for different keys (new DOM\n * will always be created for new keys). This is generally the most efficient\n * way to use `repeat` since it performs minimum unnecessary work for insertions\n * and removals.\n *\n * The `keyFn` takes two parameters, the item and its index, and returns a unique key value.\n *\n * ```js\n * html`\n * <ol>\n * ${repeat(this.items, (item) => item.id, (item, index) => {\n * return html`<li>${index}: ${item.name}</li>`;\n * })}\n * </ol>\n * `\n * ```\n *\n * **Important**: If providing a `keyFn`, keys *must* be unique for all items in a\n * given call to `repeat`. The behavior when two or more items have the same key\n * is undefined.\n *\n * If no `keyFn` is provided, this directive will perform similar to mapping\n * items to values, and DOM will be reused against potentially different items.\n */\nexport const repeat = directive(RepeatDirective);\n//# sourceMappingURL=repeat.js.map"
|
|
10
|
+
],
|
|
11
|
+
"mappings": ";;;;;;;AAMA,MAAQ,YAAY,cAAc;AAClC,IAAM,0BAA0B;AAChC,IAAM,OAAO,2BACT,OAAO,UAAU,SACjB,OAAO,UAAU,YAAY,OAC3B,OAAO,SAAS,OAChB,CAAC,SAAS;AAMT,IAAM,cAAc,CAAC,UAAU,UAAU,QAAS,OAAO,SAAS,YAAY,OAAO,SAAS;AAuC9F,IAAM,qBAAqB,CAAC,SAAS,KAAK,YAAY;AAC7D,IAAM,eAAe,MAAM,SAAS,cAAc,EAAE;AAa7C,IAAM,aAAa,CAAC,eAAe,SAAS,SAAS;AAAA,EACxD,MAAM,YAAY,KAAK,cAAc,WAAW,EAAE;AAAA,EAClD,MAAM,UAAU,YAAY,YAAY,cAAc,YAAY,QAAQ;AAAA,EAC1E,IAAI,SAAS,WAAW;AAAA,IACpB,MAAM,YAAY,KAAK,SAAS,EAAE,aAAa,aAAa,GAAG,OAAO;AAAA,IACtE,MAAM,UAAU,KAAK,SAAS,EAAE,aAAa,aAAa,GAAG,OAAO;AAAA,IACpE,OAAO,IAAI,UAAU,WAAW,SAAS,eAAe,cAAc,OAAO;AAAA,EACjF,EACK;AAAA,IACD,MAAM,UAAU,KAAK,KAAK,SAAS,EAAE;AAAA,IACrC,MAAM,YAAY,KAAK;AAAA,IACvB,MAAM,gBAAgB,cAAc;AAAA,IACpC,IAAI,eAAe;AAAA,MACf,KAAK,4BAA4B,aAAa;AAAA,MAK9C,KAAK,WAAW;AAAA,MAIhB,IAAI;AAAA,MACJ,IAAI,KAAK,8BAA8B,cAClC,q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S,WAAW,kBAAkB,SAAS,UAAU,QAAQ;AAAA,YACjE,WAAW,eAAe,SAAS,UAAU,OAAO;AAAA,YAGpD,SAAS,YAAY;AAAA;AAAA,UAEzB;AAAA;AAAA;AAAA,IAGZ;AAAA,IAEA,OAAO,WAAW,SAAS;AAAA,MAGvB,MAAM,UAAU,WAAW,eAAe,SAAS,UAAU,EAAE;AAAA,MAC/D,kBAAkB,SAAS,UAAU,QAAQ;AAAA,MAC7C,SAAS,aAAa;AAAA,IAC1B;AAAA,IAEA,OAAO,WAAW,SAAS;AAAA,MACvB,MAAM,UAAU,SAAS;AAAA,MACzB,IAAI,YAAY,MAAM;AAAA,QAClB,WAAW,OAAO;AAAA,MACtB;AAAA,IACJ;AAAA,IAEA,KAAK,YAAY;AAAA,IAEjB,kBAAkB,eAAe,QAAQ;AAAA,IACzC,OAAO;AAAA;AAEf;AAgCO,IAAM,SAAS,UAAU,eAAe;",
|
|
12
|
+
"debugId": "31D24FE1EC80EAFA64756E2164756E21",
|
|
13
|
+
"names": []
|
|
14
|
+
}
|
|
@@ -1,13 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
AsyncDirective,
|
|
3
|
-
Directive,
|
|
4
|
-
PartType,
|
|
5
3
|
directive,
|
|
6
4
|
isPrimitive
|
|
7
|
-
} from "./studio-
|
|
5
|
+
} from "./studio-p471gg5n.js";
|
|
8
6
|
import {
|
|
9
|
-
noChange
|
|
10
|
-
nothing
|
|
7
|
+
noChange
|
|
11
8
|
} from "./studio-5x5774ak.js";
|
|
12
9
|
// ../../node_modules/lit-html/development/directives/private-async-helpers.js
|
|
13
10
|
class PseudoWeakRef {
|
|
@@ -112,45 +109,7 @@ var until = directive(UntilDirective);
|
|
|
112
109
|
function when(condition, trueCase, falseCase) {
|
|
113
110
|
return condition ? trueCase(condition) : falseCase?.(condition);
|
|
114
111
|
}
|
|
115
|
-
|
|
116
|
-
var HTML_RESULT = 1;
|
|
112
|
+
export { until, when };
|
|
117
113
|
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
super(partInfo);
|
|
121
|
-
this._value = nothing;
|
|
122
|
-
if (partInfo.type !== PartType.CHILD) {
|
|
123
|
-
throw new Error(`${this.constructor.directiveName}() can only be used in child bindings`);
|
|
124
|
-
}
|
|
125
|
-
}
|
|
126
|
-
render(value) {
|
|
127
|
-
if (value === nothing || value == null) {
|
|
128
|
-
this._templateResult = undefined;
|
|
129
|
-
return this._value = value;
|
|
130
|
-
}
|
|
131
|
-
if (value === noChange) {
|
|
132
|
-
return value;
|
|
133
|
-
}
|
|
134
|
-
if (typeof value != "string") {
|
|
135
|
-
throw new Error(`${this.constructor.directiveName}() called with a non-string value`);
|
|
136
|
-
}
|
|
137
|
-
if (value === this._value) {
|
|
138
|
-
return this._templateResult;
|
|
139
|
-
}
|
|
140
|
-
this._value = value;
|
|
141
|
-
const strings = [value];
|
|
142
|
-
strings.raw = strings;
|
|
143
|
-
return this._templateResult = {
|
|
144
|
-
["_$litType$"]: this.constructor.resultType,
|
|
145
|
-
strings,
|
|
146
|
-
values: []
|
|
147
|
-
};
|
|
148
|
-
}
|
|
149
|
-
}
|
|
150
|
-
UnsafeHTMLDirective.directiveName = "unsafeHTML";
|
|
151
|
-
UnsafeHTMLDirective.resultType = HTML_RESULT;
|
|
152
|
-
var unsafeHTML = directive(UnsafeHTMLDirective);
|
|
153
|
-
export { unsafeHTML, when };
|
|
154
|
-
|
|
155
|
-
//# debugId=23C283DF1F43417A64756E2164756E21
|
|
156
|
-
//# sourceMappingURL=studio-9bjwf0d4.js.map
|
|
114
|
+
//# debugId=6810A26C9093588464756E2164756E21
|
|
115
|
+
//# sourceMappingURL=studio-rgwcpast.js.map
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["../../../node_modules/lit-html/development/directives/private-async-helpers.js", "../../../node_modules/lit-html/development/directives/until.js", "../../../node_modules/lit-html/development/directives/when.js"
|
|
3
|
+
"sources": ["../../../node_modules/lit-html/development/directives/private-async-helpers.js", "../../../node_modules/lit-html/development/directives/until.js", "../../../node_modules/lit-html/development/directives/when.js"],
|
|
4
4
|
"sourcesContent": [
|
|
5
5
|
"/**\n * @license\n * Copyright 2021 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\n// Note, this module is not included in package exports so that it's private to\n// our first-party directives. If it ends up being useful, we can open it up and\n// export it.\n/**\n * Helper to iterate an AsyncIterable in its own closure.\n * @param iterable The iterable to iterate\n * @param callback The callback to call for each value. If the callback returns\n * `false`, the loop will be broken.\n */\nexport const forAwaitOf = async (iterable, callback) => {\n for await (const v of iterable) {\n if ((await callback(v)) === false) {\n return;\n }\n }\n};\n/**\n * Holds a reference to an instance that can be disconnected and reconnected,\n * so that a closure over the ref (e.g. in a then function to a promise) does\n * not strongly hold a ref to the instance. Approximates a WeakRef but must\n * be manually connected & disconnected to the backing instance.\n */\nexport class PseudoWeakRef {\n constructor(ref) {\n this._ref = ref;\n }\n /**\n * Disassociates the ref with the backing instance.\n */\n disconnect() {\n this._ref = undefined;\n }\n /**\n * Reassociates the ref with the backing instance.\n */\n reconnect(ref) {\n this._ref = ref;\n }\n /**\n * Retrieves the backing instance (will be undefined when disconnected)\n */\n deref() {\n return this._ref;\n }\n}\n/**\n * A helper to pause and resume waiting on a condition in an async function\n */\nexport class Pauser {\n constructor() {\n this._promise = undefined;\n this._resolve = undefined;\n }\n /**\n * When paused, returns a promise to be awaited; when unpaused, returns\n * undefined. Note that in the microtask between the pauser being resumed\n * an await of this promise resolving, the pauser could be paused again,\n * hence callers should check the promise in a loop when awaiting.\n * @returns A promise to be awaited when paused or undefined\n */\n get() {\n return this._promise;\n }\n /**\n * Creates a promise to be awaited\n */\n pause() {\n this._promise ??= new Promise((resolve) => (this._resolve = resolve));\n }\n /**\n * Resolves the promise which may be awaited\n */\n resume() {\n this._resolve?.();\n this._promise = this._resolve = undefined;\n }\n}\n//# sourceMappingURL=private-async-helpers.js.map",
|
|
6
6
|
"/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\nimport { noChange } from '../lit-html.js';\nimport { isPrimitive } from '../directive-helpers.js';\nimport { directive, AsyncDirective, } from '../async-directive.js';\nimport { Pauser, PseudoWeakRef } from './private-async-helpers.js';\nconst isPromise = (x) => {\n return !isPrimitive(x) && typeof x.then === 'function';\n};\n// Effectively infinity, but a SMI.\nconst _infinity = 0x3fffffff;\nexport class UntilDirective extends AsyncDirective {\n constructor() {\n super(...arguments);\n this.__lastRenderedIndex = _infinity;\n this.__values = [];\n this.__weakThis = new PseudoWeakRef(this);\n this.__pauser = new Pauser();\n }\n render(...args) {\n return (args.find((x) => !isPromise(x)) ?? noChange);\n }\n update(_part, args) {\n const previousValues = this.__values;\n let previousLength = previousValues.length;\n this.__values = args;\n const weakThis = this.__weakThis;\n const pauser = this.__pauser;\n // If our initial render occurs while disconnected, ensure that the pauser\n // and weakThis are in the disconnected state\n if (!this.isConnected) {\n this.disconnected();\n }\n for (let i = 0; i < args.length; i++) {\n // If we've rendered a higher-priority value already, stop.\n if (i > this.__lastRenderedIndex) {\n break;\n }\n const value = args[i];\n // Render non-Promise values immediately\n if (!isPromise(value)) {\n this.__lastRenderedIndex = i;\n // Since a lower-priority value will never overwrite a higher-priority\n // synchronous value, we can stop processing now.\n return value;\n }\n // If this is a Promise we've already handled, skip it.\n if (i < previousLength && value === previousValues[i]) {\n continue;\n }\n // We have a Promise that we haven't seen before, so priorities may have\n // changed. Forget what we rendered before.\n this.__lastRenderedIndex = _infinity;\n previousLength = 0;\n // Note, the callback avoids closing over `this` so that the directive\n // can be gc'ed before the promise resolves; instead `this` is retrieved\n // from `weakThis`, which can break the hard reference in the closure when\n // the directive disconnects\n Promise.resolve(value).then(async (result) => {\n // If we're disconnected, wait until we're (maybe) reconnected\n // The while loop here handles the case that the connection state\n // thrashes, causing the pauser to resume and then get re-paused\n while (pauser.get()) {\n await pauser.get();\n }\n // If the callback gets here and there is no `this`, it means that the\n // directive has been disconnected and garbage collected and we don't\n // need to do anything else\n const _this = weakThis.deref();\n if (_this !== undefined) {\n const index = _this.__values.indexOf(value);\n // If state.values doesn't contain the value, we've re-rendered without\n // the value, so don't render it. Then, only render if the value is\n // higher-priority than what's already been rendered.\n if (index > -1 && index < _this.__lastRenderedIndex) {\n _this.__lastRenderedIndex = index;\n _this.setValue(result);\n }\n }\n });\n }\n return noChange;\n }\n disconnected() {\n this.__weakThis.disconnect();\n this.__pauser.pause();\n }\n reconnected() {\n this.__weakThis.reconnect(this);\n this.__pauser.resume();\n }\n}\n/**\n * Renders one of a series of values, including Promises, to a Part.\n *\n * Values are rendered in priority order, with the first argument having the\n * highest priority and the last argument having the lowest priority. If a\n * value is a Promise, low-priority values will be rendered until it resolves.\n *\n * The priority of values can be used to create placeholder content for async\n * data. For example, a Promise with pending content can be the first,\n * highest-priority, argument, and a non_promise loading indicator template can\n * be used as the second, lower-priority, argument. The loading indicator will\n * render immediately, and the primary content will render when the Promise\n * resolves.\n *\n * Example:\n *\n * ```js\n * const content = fetch('./content.txt').then(r => r.text());\n * html`${until(content, html`<span>Loading...</span>`)}`\n * ```\n */\nexport const until = directive(UntilDirective);\n/**\n * The type of the class that powers this directive. Necessary for naming the\n * directive's return type.\n */\n// export type {UntilDirective};\n//# sourceMappingURL=until.js.map",
|
|
7
|
-
"/**\n * @license\n * Copyright 2021 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\nexport function when(condition, trueCase, falseCase) {\n return condition ? trueCase(condition) : falseCase?.(condition);\n}\n//# sourceMappingURL=when.js.map"
|
|
8
|
-
"/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\nimport { nothing, noChange } from '../lit-html.js';\nimport { directive, Directive, PartType } from '../directive.js';\nconst HTML_RESULT = 1;\nexport class UnsafeHTMLDirective extends Directive {\n constructor(partInfo) {\n super(partInfo);\n this._value = nothing;\n if (partInfo.type !== PartType.CHILD) {\n throw new Error(`${this.constructor.directiveName}() can only be used in child bindings`);\n }\n }\n render(value) {\n if (value === nothing || value == null) {\n this._templateResult = undefined;\n return (this._value = value);\n }\n if (value === noChange) {\n return value;\n }\n if (typeof value != 'string') {\n throw new Error(`${this.constructor.directiveName}() called with a non-string value`);\n }\n if (value === this._value) {\n return this._templateResult;\n }\n this._value = value;\n const strings = [value];\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n strings.raw = strings;\n // WARNING: impersonating a TemplateResult like this is extremely\n // dangerous. Third-party directives should not do this.\n return (this._templateResult = {\n // Cast to a known set of integers that satisfy ResultType so that we\n // don't have to export ResultType and possibly encourage this pattern.\n // This property needs to remain unminified.\n ['_$litType$']: this.constructor\n .resultType,\n strings,\n values: [],\n });\n }\n}\nUnsafeHTMLDirective.directiveName = 'unsafeHTML';\nUnsafeHTMLDirective.resultType = HTML_RESULT;\n/**\n * Renders the result as HTML, rather than text.\n *\n * The values `undefined`, `null`, and `nothing`, will all result in no content\n * (empty string) being rendered.\n *\n * Note, this is unsafe to use with any user-provided input that hasn't been\n * sanitized or escaped, as it may lead to cross-site-scripting\n * vulnerabilities.\n */\nexport const unsafeHTML = directive(UnsafeHTMLDirective);\n//# sourceMappingURL=unsafe-html.js.map"
|
|
7
|
+
"/**\n * @license\n * Copyright 2021 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\nexport function when(condition, trueCase, falseCase) {\n return condition ? trueCase(condition) : falseCase?.(condition);\n}\n//# sourceMappingURL=when.js.map"
|
|
9
8
|
],
|
|
10
|
-
"mappings": "
|
|
11
|
-
"debugId": "
|
|
9
|
+
"mappings": ";;;;;;;;;AA2BO,MAAM,cAAc;AAAA,EACvB,WAAW,CAAC,KAAK;AAAA,IACb,KAAK,OAAO;AAAA;AAAA,EAKhB,UAAU,GAAG;AAAA,IACT,KAAK,OAAO;AAAA;AAAA,EAKhB,SAAS,CAAC,KAAK;AAAA,IACX,KAAK,OAAO;AAAA;AAAA,EAKhB,KAAK,GAAG;AAAA,IACJ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-
} from "./studio-
|
|
6
|
+
} from "./studio-sas7mt3k.js";
|
|
7
7
|
|
|
8
8
|
// src/files/components.ts
|
|
9
9
|
var componentRegistry = [];
|
|
@@ -59,4 +59,4 @@ function computeRelativePath(fromDocPath, toCompPath) {
|
|
|
59
59
|
export { componentRegistry, _componentRegistryLoaded, loadComponentRegistry, buildComponentInstance, computeRelativePath };
|
|
60
60
|
|
|
61
61
|
//# debugId=37666BFABEF9083664756E2164756E21
|
|
62
|
-
//# sourceMappingURL=studio-
|
|
62
|
+
//# sourceMappingURL=studio-s519zc99.js.map
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
// src/platform.ts
|
|
2
|
+
var g = globalThis;
|
|
3
|
+
function registerPlatform(platform) {
|
|
4
|
+
g.__jxPlatform = platform;
|
|
5
|
+
}
|
|
6
|
+
var inFlight = new Map;
|
|
7
|
+
function platformInFlight() {
|
|
8
|
+
const names = [];
|
|
9
|
+
for (const [method, count] of inFlight) {
|
|
10
|
+
for (let i = 0;i < count; i++) {
|
|
11
|
+
names.push(method);
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
return names;
|
|
15
|
+
}
|
|
16
|
+
function enter(method) {
|
|
17
|
+
inFlight.set(method, (inFlight.get(method) ?? 0) + 1);
|
|
18
|
+
}
|
|
19
|
+
function leave(method) {
|
|
20
|
+
const count = (inFlight.get(method) ?? 1) - 1;
|
|
21
|
+
if (count > 0) {
|
|
22
|
+
inFlight.set(method, count);
|
|
23
|
+
} else {
|
|
24
|
+
inFlight.delete(method);
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
function countingPlatform(platform) {
|
|
28
|
+
const wrappers = new Map;
|
|
29
|
+
return new Proxy(platform, {
|
|
30
|
+
get(target, property) {
|
|
31
|
+
const value = Reflect.get(target, property);
|
|
32
|
+
if (typeof value !== "function" || typeof property !== "string") {
|
|
33
|
+
return value;
|
|
34
|
+
}
|
|
35
|
+
const cached = wrappers.get(property);
|
|
36
|
+
if (cached && cached.raw === value) {
|
|
37
|
+
return cached.wrapper;
|
|
38
|
+
}
|
|
39
|
+
const method = property;
|
|
40
|
+
const wrapper = (...args) => {
|
|
41
|
+
const result = value.apply(target, args);
|
|
42
|
+
if (typeof result?.then !== "function") {
|
|
43
|
+
return result;
|
|
44
|
+
}
|
|
45
|
+
enter(method);
|
|
46
|
+
const settle = () => {
|
|
47
|
+
leave(method);
|
|
48
|
+
};
|
|
49
|
+
result.then(settle, settle);
|
|
50
|
+
return result;
|
|
51
|
+
};
|
|
52
|
+
wrappers.set(property, { raw: value, wrapper });
|
|
53
|
+
return wrapper;
|
|
54
|
+
}
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
var counted = null;
|
|
58
|
+
function getPlatform() {
|
|
59
|
+
const raw = g.__jxPlatform;
|
|
60
|
+
if (!raw) {
|
|
61
|
+
throw new Error("No platform registered. Call registerPlatform() before starting Studio.");
|
|
62
|
+
}
|
|
63
|
+
if (counted?.raw !== raw) {
|
|
64
|
+
counted = { raw, wrapped: countingPlatform(raw) };
|
|
65
|
+
}
|
|
66
|
+
return counted.wrapped;
|
|
67
|
+
}
|
|
68
|
+
function hasPlatform() {
|
|
69
|
+
return g.__jxPlatform != null;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
export { registerPlatform, platformInFlight, getPlatform, hasPlatform };
|
|
73
|
+
|
|
74
|
+
//# debugId=02671227FE10A79C64756E2164756E21
|
|
75
|
+
//# sourceMappingURL=studio-sas7mt3k.js.map
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../src/platform.ts"],
|
|
4
|
+
"sourcesContent": [
|
|
5
|
+
"/// <reference lib=\"dom\" />\n/**\n * Platform.js — Platform Abstraction Layer (PAL)\n *\n * Studio is backend-agnostic. Each deployment target (desktop, dev server, cloud) registers a\n * platform adapter at startup. All file I/O, project loading, and component discovery goes through\n * this interface.\n *\n * Uses window.__jxPlatform so the platform can be registered from a separate script bundle (e.g.\n * init.js) before studio.js loads.\n *\n * See spec/desktop.md §3 for the full StudioPlatform interface.\n *\n * **Every call is counted.** `getPlatform()` hands out a counting proxy, not the raw adapter, so\n * \"is Studio waiting on I/O?\" is one number rather than thirty hand-instrumented methods\n * (`probe.idle()` condition 4, spec §13.5). Wrapping at the READ point rather than at\n * `registerPlatform` is deliberate: desktop pre-registers its adapter on `window.__jxPlatform`\n * without ever calling the registrar, and this is the seam both paths share.\n */\n\nimport type { StudioPlatform } from \"./types\";\n\nconst g = globalThis as unknown as { __jxPlatform?: StudioPlatform };\n\n/** @param {StudioPlatform} platform */\nexport function registerPlatform(platform: StudioPlatform) {\n g.__jxPlatform = platform;\n}\n\n// ─── In-flight accounting ─────────────────────────────────────────────────────\n\n/** Method name → how many of its calls have not settled. Entries are deleted at zero. */\nconst inFlight = new Map<string, number>();\n\n/**\n * One entry per platform call whose promise has not settled, named by its method.\n *\n * Repeats are meaningful: two concurrent `gitStatus` reads are two reasons the shell is not\n * settled, and the rejection message that names them is the whole point of §13.4 — 115 sleeps were\n * 115 places that could not fail.\n */\nexport function platformInFlight(): string[] {\n const names: string[] = [];\n for (const [method, count] of inFlight) {\n for (let i = 0; i < count; i++) {\n names.push(method);\n }\n }\n return names;\n}\n\nfunction enter(method: string): void {\n inFlight.set(method, (inFlight.get(method) ?? 0) + 1);\n}\n\nfunction leave(method: string): void {\n const count = (inFlight.get(method) ?? 1) - 1;\n if (count > 0) {\n inFlight.set(method, count);\n } else {\n inFlight.delete(method);\n }\n}\n\n/**\n * Wrap an adapter so every promise-returning member is counted while it is outstanding.\n *\n * Synchronous members are passed through untouched — they cannot be outstanding. Wrappers are\n * memoised per property so `platform.readFile === platform.readFile`, which matters because call\n * sites cache and compare these (`live-context.ts` tests `typeof platform[key] === \"function\"` to\n * derive `capability.*`, and a fresh closure per read would allocate on every predicate).\n */\nfunction countingPlatform(platform: StudioPlatform): StudioPlatform {\n const wrappers = new Map<PropertyKey, { raw: unknown; wrapper: unknown }>();\n return new Proxy(platform, {\n get(target, property) {\n // `this` stays the raw adapter: a proxy receiver would re-enter this trap for every internal\n // Property read the method makes, counting nothing and costing everything.\n const value = Reflect.get(target, property) as unknown;\n if (typeof value !== \"function\" || typeof property !== \"string\") {\n return value;\n }\n // Keyed by the FUNCTION, not just the name: an adapter whose method is replaced later (a\n // Lazily-installed capability, a test swapping one out) must not keep answering through a\n // Wrapper closed over the old implementation.\n const cached = wrappers.get(property);\n if (cached && cached.raw === value) {\n return cached.wrapper;\n }\n const method = property;\n const wrapper = (...args: unknown[]): unknown => {\n const result = (value as (...a: unknown[]) => unknown).apply(target, args);\n if (typeof (result as PromiseLike<unknown> | null)?.then !== \"function\") {\n return result;\n }\n enter(method);\n const settle = () => {\n leave(method);\n };\n // Both arms: a rejected platform call is a call that FINISHED. Leaving it counted would\n // Wedge every later `idle()` behind an error the caller already handled.\n (result as PromiseLike<unknown>).then(settle, settle);\n return result;\n };\n wrappers.set(property, { raw: value, wrapper });\n return wrapper;\n },\n });\n}\n\n/** The adapter the counting proxy currently wraps, so re-registration re-wraps and nothing else. */\nlet counted: { raw: StudioPlatform; wrapped: StudioPlatform } | null = null;\n\n/** @returns {StudioPlatform} */\nexport function getPlatform() {\n const raw = g.__jxPlatform;\n if (!raw) {\n throw new Error(\"No platform registered. Call registerPlatform() before starting Studio.\");\n }\n if (counted?.raw !== raw) {\n counted = { raw, wrapped: countingPlatform(raw) };\n }\n return counted.wrapped;\n}\n\n/** @returns {boolean} */\nexport function hasPlatform() {\n return g.__jxPlatform != null;\n}\n"
|
|
6
|
+
],
|
|
7
|
+
"mappings": ";AAsBA,IAAM,IAAI;AAGH,SAAS,gBAAgB,CAAC,UAA0B;AAAA,EACzD,EAAE,eAAe;AAAA;AAMnB,IAAM,WAAW,IAAI;AASd,SAAS,gBAAgB,GAAa;AAAA,EAC3C,MAAM,QAAkB,CAAC;AAAA,EACzB,YAAY,QAAQ,UAAU,UAAU;AAAA,IACtC,SAAS,IAAI,EA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;AAAA,EAEX,CAAC;AAAA;AAIH,IAAI,UAAmE;AAGhE,SAAS,WAAW,GAAG;AAAA,EAC5B,MAAM,MAAM,EAAE;AAAA,EACd,IAAI,CAAC,KAAK;AAAA,IACR,MAAM,IAAI,MAAM,yEAAyE;AAAA,EAC3F;AAAA,EACA,IAAI,SAAS,QAAQ,KAAK;AAAA,IACxB,UAAU,EAAE,KAAK,SAAS,iBAAiB,GAAG,EAAE;AAAA,EAClD;AAAA,EACA,OAAO,QAAQ;AAAA;AAIV,SAAS,WAAW,GAAG;AAAA,EAC5B,OAAO,EAAE,gBAAgB;AAAA;",
|
|
8
|
+
"debugId": "02671227FE10A79C64756E2164756E21",
|
|
9
|
+
"names": []
|
|
10
|
+
}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
// ../schema/defs/field-schema.schema.ts
|
|
2
|
+
var PROJECT_FIELDS_SCHEMA_ID = "https://jxsuite.com/schema/project/fields/v2";
|
|
3
|
+
var jxFieldSchemaDef = {
|
|
4
|
+
description: "A single field definition inside a section entry schema — a small, recursive subset of " + "JSON Schema. Recursive positions reference the effective field union via the well-known " + "fields resource $id.",
|
|
5
|
+
properties: {
|
|
6
|
+
default: {},
|
|
7
|
+
description: { type: "string" },
|
|
8
|
+
enum: { type: "array" },
|
|
9
|
+
format: { type: "string" },
|
|
10
|
+
items: { $ref: PROJECT_FIELDS_SCHEMA_ID },
|
|
11
|
+
properties: {
|
|
12
|
+
additionalProperties: { $ref: PROJECT_FIELDS_SCHEMA_ID },
|
|
13
|
+
type: "object"
|
|
14
|
+
},
|
|
15
|
+
required: { items: { type: "string" }, type: "array" },
|
|
16
|
+
type: {
|
|
17
|
+
enum: ["string", "number", "integer", "boolean", "array", "object"],
|
|
18
|
+
type: "string"
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
required: ["type"],
|
|
22
|
+
type: "object"
|
|
23
|
+
};
|
|
24
|
+
var relationshipRefSchema = {
|
|
25
|
+
description: "Relationship reference field: points at a named entry of a referenceable section via " + '"#/<sectionKey>/<name>" (specs/relationships.md). A bare reference is to-one; wrap in an ' + "array field's items for to-many.",
|
|
26
|
+
properties: {
|
|
27
|
+
$ref: { pattern: "^#/[A-Za-z][A-Za-z0-9_-]*/[A-Za-z0-9._-]+$", type: "string" },
|
|
28
|
+
description: { type: "string" }
|
|
29
|
+
},
|
|
30
|
+
required: ["$ref"],
|
|
31
|
+
type: "object"
|
|
32
|
+
};
|
|
33
|
+
var documentPathsCoreMembers = [
|
|
34
|
+
{
|
|
35
|
+
additionalProperties: false,
|
|
36
|
+
description: 'Explicit value list: generates one page per value, bound to `param` (default "value").',
|
|
37
|
+
properties: {
|
|
38
|
+
param: { description: 'Route parameter to fill (default "value").', type: "string" },
|
|
39
|
+
values: { description: "The values to expand.", type: "array" }
|
|
40
|
+
},
|
|
41
|
+
required: ["values"],
|
|
42
|
+
type: "object"
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
additionalProperties: false,
|
|
46
|
+
description: "JSON data-file source: loads a project-relative file that must contain an array, and " + "generates one page per item.",
|
|
47
|
+
properties: {
|
|
48
|
+
$ref: {
|
|
49
|
+
description: "Project-relative path to a .json file containing an array.",
|
|
50
|
+
type: "string"
|
|
51
|
+
},
|
|
52
|
+
field: {
|
|
53
|
+
description: 'Item field providing the parameter value (default "id").',
|
|
54
|
+
type: "string"
|
|
55
|
+
},
|
|
56
|
+
param: { description: 'Route parameter to fill (default "id").', type: "string" }
|
|
57
|
+
},
|
|
58
|
+
required: ["$ref"],
|
|
59
|
+
type: "object"
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
description: "Legacy explicit form: an array of ready-made parameter objects, used as-is with no " + "expansion. Prefer one of the source shapes above.",
|
|
63
|
+
items: { additionalProperties: { type: "string" }, type: "object" },
|
|
64
|
+
type: "array"
|
|
65
|
+
}
|
|
66
|
+
];
|
|
67
|
+
var documentPathsUnknownSourceMember = {
|
|
68
|
+
description: "A source shape contributed by an extension this schema cannot see. The project's generated " + "document.schema.json validates these exactly; enable the owning extension and regenerate " + "with `jx schema` to get precise checking here.",
|
|
69
|
+
minProperties: 1,
|
|
70
|
+
type: "object"
|
|
71
|
+
};
|
|
72
|
+
|
|
73
|
+
//# debugId=48AAE1140CF35C2C64756E2164756E21
|
|
74
|
+
//# sourceMappingURL=studio-t5wqwzdh.js.map
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../schema/defs/field-schema.schema.ts"],
|
|
4
|
+
"sourcesContent": [
|
|
5
|
+
"/**\n * Field-schema vocabulary (specs/extensions.md §5.3, specs/relationships.md).\n *\n * JxFieldSchema is the JSON-Schema-subset shape for a single field inside a section entry schema\n * (content frontmatter fields, table columns). Recursive positions (`items`, nested `properties`)\n * reference the well-known **fields resource URI** — a schema resource the generated per-project\n * entry document re-embeds under the same `$id` with the effective union (core shape +\n * RelationshipRef + extension extras), shadowing the shipped default by standard compound-document\n * `$id` resolution. Extension fragments reference the same URI at their field positions.\n *\n * (An earlier design used `$dynamicRef`/`$dynamicAnchor` here; ajv restricts `$dynamicAnchor` to\n * schema-resource roots, which cannot express a non-root recursion unit, so the model uses plain\n * `$id` indirection instead — verified against ajv 8.20 / 2020-12.)\n */\n\n/** The well-known $id of the project field-schema union resource. */\nexport const PROJECT_FIELDS_SCHEMA_ID = \"https://jxsuite.com/schema/project/fields/v2\";\n\n/** The well-known $id of the document $paths-value union resource. */\nexport const DOCUMENT_PATHS_SCHEMA_ID = \"https://jxsuite.com/schema/document/paths/v2\";\n\nexport const jxFieldSchemaDef = {\n description:\n \"A single field definition inside a section entry schema — a small, recursive subset of \" +\n \"JSON Schema. Recursive positions reference the effective field union via the well-known \" +\n \"fields resource $id.\",\n properties: {\n default: {},\n description: { type: \"string\" },\n enum: { type: \"array\" },\n format: { type: \"string\" },\n items: { $ref: PROJECT_FIELDS_SCHEMA_ID },\n properties: {\n additionalProperties: { $ref: PROJECT_FIELDS_SCHEMA_ID },\n type: \"object\",\n },\n required: { items: { type: \"string\" }, type: \"array\" },\n type: {\n enum: [\"string\", \"number\", \"integer\", \"boolean\", \"array\", \"object\"],\n type: \"string\",\n },\n },\n required: [\"type\"],\n type: \"object\",\n} as const;\n\nexport const relationshipRefSchema = {\n description:\n \"Relationship reference field: points at a named entry of a referenceable section via \" +\n '\"#/<sectionKey>/<name>\" (specs/relationships.md). A bare reference is to-one; wrap in an ' +\n \"array field's items for to-many.\",\n properties: {\n $ref: { pattern: \"^#/[A-Za-z][A-Za-z0-9_-]*/[A-Za-z0-9._-]+$\", type: \"string\" },\n description: { type: \"string\" },\n },\n required: [\"$ref\"],\n type: \"object\",\n} as const;\n\n/**\n * The CORE `$paths` source shapes — the members the shipped default paths union carries, and the\n * ones every per-project entry document unions extension shapes on top of.\n *\n * These mirror `resolvePathEntries` in the compiler's pages-discovery exactly (specs/\n * site-architecture.md §4.3): an explicit value list, a JSON data-file reference, and the legacy\n * bare array of parameter objects. Anything else is dispatched by discriminator key to an\n * extension's `resolvePaths` capability, so extension shapes reach the union through the entry\n * document rather than from here.\n *\n * Each shape is CLOSED (`additionalProperties: false`). `$paths` is a build-time instruction with a\n * fully specified grammar and no forward-compatible extension points of its own — a stray or\n * misspelled key means the route silently expands to nothing, which is exactly the failure worth\n * catching in the editor.\n */\nexport const documentPathsCoreMembers = [\n {\n additionalProperties: false,\n description:\n 'Explicit value list: generates one page per value, bound to `param` (default \"value\").',\n properties: {\n param: { description: 'Route parameter to fill (default \"value\").', type: \"string\" },\n values: { description: \"The values to expand.\", type: \"array\" },\n },\n required: [\"values\"],\n type: \"object\",\n },\n {\n additionalProperties: false,\n description:\n \"JSON data-file source: loads a project-relative file that must contain an array, and \" +\n \"generates one page per item.\",\n properties: {\n $ref: {\n description: \"Project-relative path to a .json file containing an array.\",\n type: \"string\",\n },\n field: {\n description: 'Item field providing the parameter value (default \"id\").',\n type: \"string\",\n },\n param: { description: 'Route parameter to fill (default \"id\").', type: \"string\" },\n },\n required: [\"$ref\"],\n type: \"object\",\n },\n {\n description:\n \"Legacy explicit form: an array of ready-made parameter objects, used as-is with no \" +\n \"expansion. Prefer one of the source shapes above.\",\n items: { additionalProperties: { type: \"string\" }, type: \"object\" },\n type: \"array\",\n },\n] as const;\n\n/**\n * The extra member the SHIPPED DEFAULT union carries and a per-project entry document does not.\n *\n * A default cannot know which extensions a project enables, so without this any extension source\n * shape — `{ contentType: \"blog\" }` with the parser on — would be a FALSE ERROR wherever the\n * default is what is in play: the studio's offline fallback before per-project schemas arrive, and\n * clients that fetch the canonical URL. Spec §5.4 promises that path degrades to\n * _under-suggestion_, never false errors, so the default accepts any non-empty object and the entry\n * document — which does know the enabled extensions, and is what `jx validate` and every editor\n * actually resolve — is the strict one.\n */\nexport const documentPathsUnknownSourceMember = {\n description:\n \"A source shape contributed by an extension this schema cannot see. The project's generated \" +\n \"document.schema.json validates these exactly; enable the owning extension and regenerate \" +\n \"with `jx schema` to get precise checking here.\",\n minProperties: 1,\n type: \"object\",\n} as const;\n"
|
|
6
|
+
],
|
|
7
|
+
"mappings": ";AAgBO,IAAM,2BAA2B;AAKjC,IAAM,mBAAmB;AAAA,EAC9B,aACE,4FACA,6FACA;AAAA,EACF,YAAY;AAAA,IACV,SAAS,CAAC;AAAA,IACV,aAAa,EAAE,MAAM,SAAS;AAAA,IAC9B,MAAM,EAAE,MAAM,QAAQ;AAAA,IACtB,QAAQ,EAAE,MAAM,SAAS;AAAA,IACzB,OAAO,EAAE,MAAM,yBAAyB;AAAA,IACxC,YAAY;AAAA,MACV,sBAAsB,EAAE,MAAM,yBAAyB;AAAA,MACvD,MAAM;AAAA,IACR;AAAA,IACA,UAAU,EAAE,OAAO,EAAE,MAAM,SAAS,GAAG,MAAM,QAAQ;AAAA,IACrD,MAAM;AAAA,MACJ,MAAM,CAAC,UAAU,UAAU,WAAW,WAAW,SAAS,QAAQ;AAAA,MAClE,MAAM;AAAA,IACR;AAAA,EACF;AAAA,EACA,UAAU,CAAC,MAAM;AAAA,EACjB,MAAM;AACR;AAEO,IAAM,wBAAwB;AAAA,EACnC,aACE,0FACA,8FACA;AAAA,EACF,YAAY;AAAA,IACV,MAAM,EAAE,SAAS,8CAA8C,MAAM,SAAS;AAAA,IAC9E,aAAa,EAAE,MAAM,SAAS;AAAA,EAChC;AAAA,EACA,UAAU,CAAC,MAAM;AAAA,EACjB,MAAM;AACR;AAiBO,IAAM,2BAA2B;AAAA,EACtC;AAAA,IACE,sBAAsB;AAAA,IACtB,aACE;AAAA,IACF,YAAY;AAAA,MACV,OAAO,EAAE,aAAa,8CAA8C,MAAM,SAAS;AAAA,MACnF,QAAQ,EAAE,aAAa,yBAAyB,MAAM,QAAQ;AAAA,IAChE;AAAA,IACA,UAAU,CAAC,QAAQ;AAAA,IACnB,MAAM;AAAA,EACR;AAAA,EACA;AAAA,IACE,sBAAsB;AAAA,IACtB,aACE,0FACA;AAAA,IACF,YAAY;AAAA,MACV,MAAM;AAAA,QACJ,aAAa;AAAA,QACb,MAAM;AAAA,MACR;AAAA,MACA,OAAO;AAAA,QACL,aAAa;AAAA,QACb,MAAM;AAAA,MACR;AAAA,MACA,OAAO,EAAE,aAAa,2CAA2C,MAAM,SAAS;AAAA,IAClF;AAAA,IACA,UAAU,CAAC,MAAM;AAAA,IACjB,MAAM;AAAA,EACR;AAAA,EACA;AAAA,IACE,aACE,wFACA;AAAA,IACF,OAAO,EAAE,sBAAsB,EAAE,MAAM,SAAS,GAAG,MAAM,SAAS;AAAA,IAClE,MAAM;AAAA,EACR;AACF;AAaO,IAAM,mCAAmC;AAAA,EAC9C,aACE,gGACA,8FACA;AAAA,EACF,eAAe;AAAA,EACf,MAAM;AACR;",
|
|
8
|
+
"debugId": "48AAE1140CF35C2C64756E2164756E21",
|
|
9
|
+
"names": []
|
|
10
|
+
}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
+
import {
|
|
2
|
+
Overlay
|
|
3
|
+
} from "./studio-2sj1jj3v.js";
|
|
1
4
|
import {
|
|
2
5
|
defineElement
|
|
3
6
|
} from "./studio-18j3bmcz.js";
|
|
4
|
-
import {
|
|
5
|
-
Overlay
|
|
6
|
-
} from "./studio-5x6tqqec.js";
|
|
7
7
|
|
|
8
8
|
// ../../node_modules/@spectrum-web-components/overlay/sp-overlay.dev.js
|
|
9
9
|
defineElement("sp-overlay", Overlay);
|
|
10
10
|
|
|
11
|
-
//# debugId=
|
|
12
|
-
//# sourceMappingURL=studio-
|
|
11
|
+
//# debugId=24A9645EA10C33DD64756E2164756E21
|
|
12
|
+
//# sourceMappingURL=studio-temv5bw4.js.map
|
|
@@ -5,6 +5,6 @@
|
|
|
5
5
|
"\"use strict\";\nimport { defineElement } from \"@spectrum-web-components/base/src/define-element.js\";\nimport { Overlay } from \"./src/Overlay.dev.js\";\ndefineElement(\"sp-overlay\", Overlay);\n//# sourceMappingURL=sp-overlay.dev.js.map\n"
|
|
6
6
|
],
|
|
7
7
|
"mappings": ";;;;;;;;AAGA,cAAc,cAAc,OAAO;",
|
|
8
|
-
"debugId": "
|
|
8
|
+
"debugId": "24A9645EA10C33DD64756E2164756E21",
|
|
9
9
|
"names": []
|
|
10
10
|
}
|