@jxsuite/studio 10.4.0 → 10.5.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/dist/chunks/2020-7sx2vexa.js +4 -0
- package/dist/chunks/adapter-12dxr3z7.js +4 -0
- package/dist/chunks/{add-new-flow-v0pm96mr.js → add-new-flow-any4pw2q.js} +3 -3
- package/dist/chunks/{cf-account-picker-xb8vvt2h.js → cf-account-picker-ajh60k54.js} +3 -3
- package/dist/chunks/cf-settings-hbj16kh3.js +4 -0
- package/dist/chunks/{color-area-h8dbasp1.js → color-area-gbcftzh3.js} +2 -2
- package/dist/chunks/{color-field-qv5r2b16.js → color-field-85136598.js} +3 -3
- package/dist/chunks/{color-slider-nz2mrzky.js → color-slider-w1s3ndd8.js} +2 -2
- package/dist/chunks/color-thzpppyc.js +4 -0
- package/dist/chunks/{combobox-6hs00996.js → combobox-dk98wc5x.js} +3 -3
- package/dist/chunks/components-a98hzqw9.js +4 -0
- package/dist/chunks/content-source-jq3fjs3w.js +4 -0
- package/dist/chunks/{convert-to-repeater-r8sfxjjm.js → convert-to-repeater-g66r6qp1.js} +3 -3
- package/dist/chunks/editor-rth1rzj8.js +4 -0
- package/dist/chunks/entry-commands-02j0s19w.js +4 -0
- package/dist/chunks/{extension-sections-vjzw46xb.js → extension-sections-rqrs7dr0.js} +3 -3
- package/dist/chunks/file-ops-6a49er4c.js +4 -0
- package/dist/chunks/files-b2p9y0yz.js +4 -0
- package/dist/chunks/format-host-7xe57k1s.js +4 -0
- package/dist/chunks/fs-events-0xsy168g.js +4 -0
- package/dist/chunks/grid-open-h3q4fjy5.js +4 -0
- package/dist/chunks/{grid-view-2f03wcgw.js → grid-view-0v4hjspb.js} +17 -17
- package/dist/chunks/{icons-gb967qc8.js → icons-j9eksgew.js} +2 -2
- package/dist/chunks/{iframe-entry-btck0e9s.js → iframe-entry-4zqtn3ry.js} +4 -4
- package/dist/chunks/{iframe-entry-b5qgggyp.js → iframe-entry-54kwwhmg.js} +4 -4
- package/dist/chunks/{iframe-entry-42hpmwz5.js → iframe-entry-m24fza30.js} +4 -4
- package/dist/chunks/iframe-host-8jcmaktg.js +4 -0
- package/dist/chunks/{image-bake-4afr4y6a.js → image-bake-m8gzaan9.js} +3 -3
- package/dist/chunks/{image-editor-x7t8jbjn.js → image-editor-0afyws7c.js} +3 -3
- package/dist/chunks/{index-yjrfeks8.js → index-2q88g57p.js} +3 -3
- package/dist/chunks/index-7nj2375a.js +4 -0
- package/dist/chunks/{javascript-hy2mws8v.js → javascript-5sxtr1g7.js} +3 -3
- package/dist/chunks/jsonMode-m6sf47hq.js +13 -0
- package/dist/chunks/jx-validate-808zgbgy.js +4 -0
- package/dist/chunks/layers-0ffdtqjn.js +4 -0
- package/dist/chunks/layers-panel-rw62wtvf.js +4 -0
- package/dist/chunks/{listbox-7gka1h86.js → listbox-k5p41049.js} +2 -2
- package/dist/chunks/lit-html-9bz9rcfv.js +4 -0
- package/dist/chunks/media-library-2a5hdbek.js +4 -0
- package/dist/chunks/media-open-069kzhj4.js +4 -0
- package/dist/chunks/media-picker-4p4pd28y.js +4 -0
- package/dist/chunks/menu-26nez152.js +4 -0
- package/dist/chunks/{monaco-binding-a51py33c.js → monaco-binding-1s2b8snq.js} +3 -3
- package/dist/chunks/monaco-buffer-m9fd2dka.js +4 -0
- package/dist/chunks/monaco-setup-e0crh3v6.js +4 -0
- package/dist/chunks/notify-re3js157.js +4 -0
- package/dist/chunks/platform-rywy3tkg.js +4 -0
- package/dist/chunks/popover-fhdnt4be.js +4 -0
- package/dist/chunks/publish-panel-czkpg8m4.js +4 -0
- package/dist/chunks/{publish-quick-4fwngwrw.js → publish-quick-b9wbhqj6.js} +3 -3
- package/dist/chunks/publish-workspace-yy6d23b7.js +4 -0
- package/dist/chunks/quick-search-tp7pjnmv.js +4 -0
- package/dist/chunks/references-wd2yj8s1.js +4 -0
- package/dist/chunks/right-panel-x971k0zc.js +4 -0
- package/dist/chunks/source-control-k4p00hpe.js +4 -0
- package/dist/chunks/{split-m5rwn31z.js → split-qh21j2b0.js} +2 -2
- package/dist/chunks/{studio-v5wktj6f.js → studio-151kgn69.js} +4 -4
- package/dist/chunks/studio-15mfah02.js +10 -0
- package/dist/chunks/studio-1a7zshnv.js +5 -0
- package/dist/chunks/studio-1d8m5s38.js +16 -0
- package/dist/chunks/studio-35pmfjtx.js +5 -0
- package/dist/chunks/{studio-3na1r48j.js → studio-3yr1zdp9.js} +8 -8
- package/dist/chunks/studio-43pynnhz.js +5 -0
- package/dist/chunks/studio-44xqe0b7.js +4 -0
- package/dist/chunks/{studio-hh394phe.js → studio-48yzqzqr.js} +4 -4
- package/dist/chunks/{studio-9gr7xs9r.js → studio-4jy967rj.js} +5 -5
- package/dist/chunks/{studio-4bgvvzhv.js → studio-4ncxzw5m.js} +4 -4
- package/dist/chunks/{studio-pm17wdc4.js → studio-4s5bka8t.js} +4 -4
- package/dist/chunks/{studio-5tet77de.js → studio-4z0cdh16.js} +3 -3
- package/dist/chunks/studio-5rq3e4q5.js +5 -0
- package/dist/chunks/{studio-wmjmsw0p.js → studio-69g6a0jn.js} +4 -4
- package/dist/chunks/studio-6hcfm9q3.js +5 -0
- package/dist/chunks/studio-6mf31e16.js +5 -0
- package/dist/chunks/studio-6sxnqqw8.js +5 -0
- package/dist/chunks/{studio-0939t1q1.js → studio-7qqb7hb8.js} +4 -4
- package/dist/chunks/{studio-bg8pzprg.js → studio-7qr8k0v2.js} +4 -4
- package/dist/chunks/{studio-0x6f3nk9.js → studio-8ncm9zwx.js} +4 -4
- package/dist/chunks/studio-8w5pa88p.js +7 -0
- package/dist/chunks/{studio-3qr08sxq.js → studio-9f5vcb4w.js} +3 -3
- package/dist/chunks/studio-aaw7wxv8.js +5 -0
- package/dist/chunks/studio-afx9brsc.js +5 -0
- package/dist/chunks/studio-ajfq4fmr.js +5 -0
- package/dist/chunks/{studio-evq47j2z.js → studio-ber1dgte.js} +4 -4
- package/dist/chunks/{studio-sce30r7b.js → studio-bk0anq3b.js} +3 -3
- package/dist/chunks/{studio-0gvvqj3h.js → studio-bmwgj8ez.js} +4 -4
- package/dist/chunks/{studio-s24mhq0z.js → studio-bpzwhn88.js} +4 -4
- package/dist/chunks/{studio-g9brbewz.js → studio-c72v1kwc.js} +4 -4
- package/dist/chunks/{studio-tpxcryf2.js → studio-cv6gnjqd.js} +4 -4
- package/dist/chunks/{studio-90zkgne5.js → studio-czpmzs9r.js} +7 -7
- package/dist/chunks/{studio-2pk7kc7z.js → studio-d5f7sskn.js} +4 -4
- package/dist/chunks/studio-dmgh2rrj.js +5 -0
- package/dist/chunks/{studio-nwf0c32p.js → studio-dst8y8vh.js} +4 -4
- package/dist/chunks/studio-ehj3csbm.js +6 -0
- package/dist/chunks/{studio-hfqpfmpk.js → studio-ek4fb4eb.js} +4 -4
- package/dist/chunks/studio-ep1384t9.js +5 -0
- package/dist/chunks/{studio-abh9kfdh.js → studio-eq5vqn1q.js} +4 -4
- package/dist/chunks/studio-erjccagy.js +5 -0
- package/dist/chunks/studio-ex1644g2.js +5 -0
- package/dist/chunks/studio-f3awr5nc.js +12 -0
- package/dist/chunks/studio-f69wcajk.js +9 -0
- package/dist/chunks/{studio-jma2q8r9.js → studio-g65t6svn.js} +4 -4
- package/dist/chunks/{studio-r6mx7vm5.js → studio-gw83z798.js} +5 -5
- package/dist/chunks/{studio-2x972v58.js → studio-hy936516.js} +4 -4
- package/dist/chunks/studio-j3bq30yz.js +5 -0
- package/dist/chunks/studio-j52ks8q7.js +5 -0
- package/dist/chunks/{studio-g0hxtcga.js → studio-jqvke4ac.js} +4 -4
- package/dist/chunks/{studio-bnc50f9h.js → studio-k05g7efh.js} +4 -4
- package/dist/chunks/studio-kefs4sz4.js +5 -0
- package/dist/chunks/{studio-2e4hry72.js → studio-ketrgtph.js} +5 -5
- package/dist/chunks/studio-m3jrjfhy.js +14 -0
- package/dist/chunks/{studio-45mj4jqe.js → studio-m8hesdrw.js} +4 -4
- package/dist/chunks/{studio-k0xzrse2.js → studio-n271vdsg.js} +36 -36
- package/dist/chunks/studio-n4pnf0sw.js +5 -0
- package/dist/chunks/{studio-gnazwtv3.js → studio-ncwx602y.js} +4 -4
- package/dist/chunks/{studio-amaz545p.js → studio-nngc45ct.js} +4 -4
- package/dist/chunks/{studio-eqcddvc2.js → studio-nv5eq0f7.js} +173 -173
- package/dist/chunks/{studio-az3wvyh2.js → studio-nzp0sqjg.js} +4 -4
- package/dist/chunks/{studio-k2evngrj.js → studio-pgze9p34.js} +5 -5
- package/dist/chunks/studio-ph17an19.js +5 -0
- package/dist/chunks/studio-pte5w7rf.js +9 -0
- package/dist/chunks/studio-pv1ts08p.js +6 -0
- package/dist/chunks/studio-q509sqt8.js +5 -0
- package/dist/chunks/{studio-rr00ex23.js → studio-qarg1xf9.js} +6 -6
- package/dist/chunks/studio-r5g7fx7q.js +9 -0
- package/dist/chunks/studio-s49y6m5b.js +5 -0
- package/dist/chunks/studio-s4k1v7dt.js +7 -0
- package/dist/chunks/studio-t46rt6gx.js +5 -0
- package/dist/chunks/{studio-61rg2cz5.js → studio-td3h1644.js} +4 -4
- package/dist/chunks/{studio-v7a7yb5w.js → studio-thgexj3w.js} +7 -7
- package/dist/chunks/{studio-vpevkfxw.js → studio-veh91hjv.js} +4 -4
- package/dist/chunks/studio-vswmz40d.js +6 -0
- package/dist/chunks/{studio-daksw8kh.js → studio-w3aafbpk.js} +4 -4
- package/dist/chunks/studio-w4mfaaam.js +5 -0
- package/dist/chunks/{studio-4zd6an2b.js → studio-wn2cmf9q.js} +4 -4
- package/dist/chunks/studio-x5ffyssw.js +5 -0
- package/dist/chunks/{studio-swedpd82.js → studio-x5py815g.js} +4 -4
- package/dist/chunks/{studio-4fnb5648.js → studio-xh6rf05g.js} +4 -4
- package/dist/chunks/studio-z6s56dzz.js +5 -0
- package/dist/chunks/{studio-nvcn2ykc.js → studio-zav9hgb3.js} +4 -4
- package/dist/chunks/{studio-a88ej93p.js → studio-ze1sm147.js} +6 -6
- package/dist/chunks/{studio-pj216fmn.js → studio-zkkt13qd.js} +4 -4
- package/dist/chunks/studio-zn7ysyzb.js +5 -0
- package/dist/chunks/{studio-xx3r3sb0.js → studio-ztzf8mce.js} +4 -4
- package/dist/chunks/{studio-1410q5dw.js → studio-zzgp5yka.js} +4 -4
- package/dist/chunks/{tooltip-dj1pvgz7.js → tooltip-gtx40bjg.js} +3 -3
- package/dist/chunks/{tree-j0ebwr5s.js → tree-a19s1c05.js} +2 -2
- package/dist/chunks/tsMode-3f116hth.js +14 -0
- package/dist/chunks/workspace-home-61n1jz3q.js +4 -0
- package/dist/chunks/workspace-sheek6zw.js +4 -0
- package/dist/chunks/{ws-client-arz2qsy9.js → ws-client-cb49m87s.js} +3 -3
- package/dist/iframe-entry.js +14 -14
- package/dist/manifest.json +82 -82
- package/dist/studio.js +97 -96
- package/dist/workers/ts.worker.js +3 -3
- package/package.json +11 -11
- package/src/browse/library-layouts.ts +9 -12
- package/src/browse/library-pane.ts +22 -16
- package/src/browse/library-source.ts +3 -4
- package/src/canvas/canvas-live-render.ts +2 -5
- package/src/canvas/canvas-page-context.ts +5 -0
- package/src/content/entry-commands.ts +32 -27
- package/src/content/entry-editor.ts +46 -44
- package/src/content/entry-inspector.ts +15 -12
- package/src/content/entry-model.ts +3 -3
- package/src/content/entry-summaries.ts +5 -5
- package/src/content/hold-state.ts +172 -0
- package/src/content/page-summaries.ts +10 -14
- package/src/editor/inline-edit.ts +6 -1
- package/src/editor/repeater-scope.ts +333 -74
- package/src/grid/sources/content-source.ts +42 -66
- package/src/panels/block-action-bar.ts +3 -4
- package/src/panels/events-panel.ts +6 -2
- package/src/panels/formula-workspace.ts +9 -0
- package/src/panels/properties-panel.ts +127 -35
- package/src/panels/statement-editor.ts +4 -0
- package/src/panels/tab-strip.ts +29 -26
- package/src/services/ai-project-tools.ts +3 -3
- package/src/services/ai-tools.ts +5 -5
- package/src/services/ai-write-report.ts +22 -4
- package/src/services/context-manager.ts +110 -2
- package/src/services/document-assistant.ts +2 -2
- package/src/services/harness/chat-reducer.ts +9 -4
- package/src/services/render-critic.ts +234 -12
- package/src/services/tool-executor.ts +16 -8
- package/src/surfaces/collections-panel.json +1 -1
- package/src/surfaces/collections-panel.ts +1 -1
- package/src/surfaces/entry-editor.json +10 -10
- package/src/surfaces/entry-editor.ts +22 -19
- package/src/surfaces/entry-inspector.json +11 -11
- package/src/surfaces/entry-inspector.ts +17 -10
- package/src/surfaces/tab-strip.json +5 -5
- package/src/surfaces/tab-strip.ts +2 -2
- package/src/types.ts +2 -0
- package/src/ui/expression-editor.ts +10 -5
- package/src/ui/schema-form.ts +18 -1
- package/src/utils/edit-display.ts +27 -1
- package/dist/chunks/2020-906vx2dq.js +0 -4
- package/dist/chunks/adapter-hnvad61x.js +0 -4
- package/dist/chunks/cf-settings-mkbcz4z2.js +0 -4
- package/dist/chunks/color-04361ttk.js +0 -4
- package/dist/chunks/components-w5zqwva1.js +0 -4
- package/dist/chunks/content-source-g38w0d3f.js +0 -4
- package/dist/chunks/editor-wvf5e6j9.js +0 -4
- package/dist/chunks/entry-commands-t13dyw3c.js +0 -4
- package/dist/chunks/file-ops-1sghzgcr.js +0 -4
- package/dist/chunks/files-zrqtgt41.js +0 -4
- package/dist/chunks/format-host-9gy76erh.js +0 -4
- package/dist/chunks/fs-events-45rhg3me.js +0 -4
- package/dist/chunks/grid-open-t4fq6bbm.js +0 -4
- package/dist/chunks/iframe-host-9aq8ze3q.js +0 -4
- package/dist/chunks/index-f9qr7kzh.js +0 -4
- package/dist/chunks/jsonMode-vj30te2h.js +0 -13
- package/dist/chunks/jx-validate-r4ax11e3.js +0 -4
- package/dist/chunks/layers-m49nmwvx.js +0 -4
- package/dist/chunks/layers-panel-zr92pwdp.js +0 -4
- package/dist/chunks/lit-html-k2mb9k0r.js +0 -4
- package/dist/chunks/media-library-j74rt0w4.js +0 -4
- package/dist/chunks/media-open-mypr0k6b.js +0 -4
- package/dist/chunks/media-picker-pemtbsjv.js +0 -4
- package/dist/chunks/menu-d2jxpgma.js +0 -4
- package/dist/chunks/monaco-buffer-pa0g6ax7.js +0 -4
- package/dist/chunks/monaco-setup-0hw9f835.js +0 -4
- package/dist/chunks/notify-bwehrp7q.js +0 -4
- package/dist/chunks/platform-kv0k65cy.js +0 -4
- package/dist/chunks/popover-9tf4cjrk.js +0 -4
- package/dist/chunks/publish-panel-vg1n880b.js +0 -4
- package/dist/chunks/publish-workspace-jv4w2bx2.js +0 -4
- package/dist/chunks/quick-search-nh29rt8a.js +0 -4
- package/dist/chunks/references-vqyr5s9x.js +0 -4
- package/dist/chunks/right-panel-3ws9f2w0.js +0 -4
- package/dist/chunks/source-control-h3hcs5gy.js +0 -4
- package/dist/chunks/studio-0khd8xtx.js +0 -4
- package/dist/chunks/studio-1ctnw3xv.js +0 -5
- package/dist/chunks/studio-1ks5d9y4.js +0 -5
- package/dist/chunks/studio-1y9mab9m.js +0 -5
- package/dist/chunks/studio-2kpxm0eh.js +0 -7
- package/dist/chunks/studio-2zz4qbv9.js +0 -5
- package/dist/chunks/studio-3pz4t5a2.js +0 -5
- package/dist/chunks/studio-4f7thq0p.js +0 -5
- package/dist/chunks/studio-7rrdbvex.js +0 -5
- package/dist/chunks/studio-9dq7rwc7.js +0 -5
- package/dist/chunks/studio-acer0g8w.js +0 -5
- package/dist/chunks/studio-brh8d2pr.js +0 -5
- package/dist/chunks/studio-c2fa783p.js +0 -9
- package/dist/chunks/studio-cfnn70h1.js +0 -5
- package/dist/chunks/studio-cqxj4fcy.js +0 -5
- package/dist/chunks/studio-cw11h078.js +0 -5
- package/dist/chunks/studio-dn56z7sn.js +0 -5
- package/dist/chunks/studio-egnjpyde.js +0 -9
- package/dist/chunks/studio-ejrypvmq.js +0 -5
- package/dist/chunks/studio-frc16j8v.js +0 -10
- package/dist/chunks/studio-j0zf5x2x.js +0 -5
- package/dist/chunks/studio-j5fcp6gj.js +0 -5
- package/dist/chunks/studio-jd1qb1st.js +0 -7
- package/dist/chunks/studio-k1xqrgm5.js +0 -5
- package/dist/chunks/studio-k3we3kqb.js +0 -5
- package/dist/chunks/studio-knsjyx7n.js +0 -5
- package/dist/chunks/studio-mrjtnm62.js +0 -5
- package/dist/chunks/studio-n9qba0gx.js +0 -5
- package/dist/chunks/studio-nzemfbkk.js +0 -14
- package/dist/chunks/studio-pwctzka3.js +0 -16
- package/dist/chunks/studio-q80fg1d6.js +0 -12
- package/dist/chunks/studio-q9hx2qp0.js +0 -5
- package/dist/chunks/studio-qrzmfaf6.js +0 -5
- package/dist/chunks/studio-tmfcn347.js +0 -6
- package/dist/chunks/studio-wqfaqw4m.js +0 -5
- package/dist/chunks/studio-xpx91fby.js +0 -6
- package/dist/chunks/studio-xva3hzkv.js +0 -5
- package/dist/chunks/studio-z3fztxrp.js +0 -9
- package/dist/chunks/studio-z9453ypn.js +0 -6
- package/dist/chunks/tsMode-jg1dtphj.js +0 -14
- package/dist/chunks/workspace-6ztqcrsh.js +0 -4
- package/dist/chunks/workspace-home-rse9h8a0.js +0 -4
- package/src/content/draft-state.ts +0 -108
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import{Bt,vn,Dc,Qg,Kv,eb,NS,Gk,Jk,Yk,Zk,Xk,Qk,eE,tE,nE}from"./studio-f3awr5nc.js";import{pe}from"./studio-7qqb7hb8.js";var O=pe(function(k){Object.defineProperty(k,"__esModule",{value:!0});k.dynamicAnchor=void 0;var y=Bt(),Pe=Dc(),g=NS(),N=Jk(),Re={keyword:"$dynamicAnchor",schemaType:"string",code:(e)=>T(e,e.schema)};function T(e,t){let{gen:r,it:o}=e;o.schemaEnv.root.dynamicAnchors[t]=!0;let n=y._`${Pe.default.dynamicAnchors}${y.getProperty(t)}`,s=o.errSchemaPath==="#"?o.validateName:Ae(e);r.if(y._`!${n}`,()=>r.assign(n,s))}k.dynamicAnchor=T;function Ae(e){let{schemaEnv:t,schema:r,self:o}=e.it,{root:n,baseId:s,localRefs:l,meta:d}=t.root,{schemaId:a}=o.opts,f=new g.SchemaEnv({schema:r,schemaId:a,root:n,baseId:s,localRefs:l,meta:d});return g.compileSchema.call(o,f),N.getValidate(e,f)}k.default=Re});var M=pe(function(V){Object.defineProperty(V,"__esModule",{value:!0});V.dynamicRef=void 0;var v=Bt(),Me=Dc(),_=Jk(),Se={keyword:"$dynamicRef",schemaType:"string",code:(e)=>C(e,e.schema)};function C(e,t){let{gen:r,keyword:o,it:n}=e;if(t[0]!=="#")throw Error(`"${o}" only supports hash fragment reference`);let s=t.slice(1);if(n.allErrors)l();else{let a=r.let("valid",!1);l(a),e.ok(a)}function l(a){if(n.schemaEnv.root.dynamicAnchors[s]){let f=r.let("_v",v._`${Me.default.dynamicAnchors}${v.getProperty(s)}`);r.if(f,d(f,a),d(n.validateName,a))}else d(n.validateName,a)()}function d(a,f){return f?()=>r.block(()=>{_.callRef(e,a),r.let(f,!0)}):()=>_.callRef(e,a)}}V.dynamicRef=C;V.default=Se});var L=pe(function(z){Object.defineProperty(z,"__esModule",{value:!0});var K=O(),G=vn(),Ie={keyword:"$recursiveAnchor",schemaType:"boolean",code(e){if(e.schema)K.dynamicAnchor(e,"");else G.checkStrictMode(e.it,"$recursiveAnchor: false is ignored")}};z.default=Ie});var F=pe(function(Z){Object.defineProperty(Z,"__esModule",{value:!0});var U=M(),Ne={keyword:"$recursiveRef",schemaType:"string",code:(e)=>U.dynamicRef(e,e.schema)};Z.default=Ne});var B=pe(function(H){Object.defineProperty(H,"__esModule",{value:!0});var ke=O(),Ee=M(),Ce=L(),Ve=F(),De=[ke.default,Ee.default,Ce.default,Ve.default];H.default=De});var Q=pe(function(J){Object.defineProperty(J,"__esModule",{value:!0});var j=Xk(),Ge={keyword:"dependentRequired",type:"object",schemaType:"object",error:j.error,code:(e)=>j.validatePropertyDeps(e)};J.default=Ge});var Y=pe(function(X){Object.defineProperty(X,"__esModule",{value:!0});var W=Xk(),Le={keyword:"dependentSchemas",type:"object",schemaType:"object",code:(e)=>W.validateSchemaDeps(e)};X.default=Le});var re=pe(function(te){Object.defineProperty(te,"__esModule",{value:!0});var ee=vn(),Ze={keyword:["maxContains","minContains"],type:"array",schemaType:"number",code({keyword:e,parentSchema:t,it:r}){if(t.contains===void 0)ee.checkStrictMode(r,`"${e}" without "contains" is ignored`)}};te.default=Ze});var ne=pe(function(ae){Object.defineProperty(ae,"__esModule",{value:!0});var He=Q(),Be=Y(),Je=re(),Qe=[He.default,Be.default,Je.default];ae.default=Qe});var se=pe(function(oe){Object.defineProperty(oe,"__esModule",{value:!0});var i=Bt(),q=vn(),Xe=Dc(),Ye={message:"must NOT have unevaluated properties",params:({params:e})=>i._`{unevaluatedProperty: ${e.unevaluatedProperty}}`},et={keyword:"unevaluatedProperties",type:"object",schemaType:["boolean","object"],trackErrors:!0,error:Ye,code(e){let{gen:t,schema:r,data:o,errsCount:n,it:s}=e;if(!n)throw Error("ajv implementation error");let{allErrors:l,props:d}=s;if(d instanceof i.Name)t.if(i._`${d} !== true`,()=>t.forIn("key",o,(c)=>t.if(f(d,c),()=>a(c))));else if(d!==!0)t.forIn("key",o,(c)=>d===void 0?a(c):t.if(A(d,c),()=>a(c)));s.props=!0,e.ok(i._`${n} === ${Xe.default.errors}`);function a(c){if(r===!1){if(e.setParams({unevaluatedProperty:c}),e.error(),!l)t.break();return}if(!q.alwaysValidSchema(s,r)){let p=t.name("valid");if(e.subschema({keyword:"unevaluatedProperties",dataProp:c,dataPropType:q.Type.Str},p),!l)t.if(i.not(p),()=>t.break())}}function f(c,p){return i._`!${c} || !${c}[${p}]`}function A(c,p){let I=[];for(let w in c)if(c[w]===!0)I.push(i._`${p} !== ${w}`);return i.and(...I)}}};oe.default=et});var ce=pe(function(ie){Object.defineProperty(ie,"__esModule",{value:!0});var u=Bt(),P=vn(),rt={message:({params:{len:e}})=>u.str`must NOT have more than ${e} items`,params:({params:{len:e}})=>u._`{limit: ${e}}`},at={keyword:"unevaluatedItems",type:"array",schemaType:["boolean","object"],error:rt,code(e){let{gen:t,schema:r,data:o,it:n}=e,s=n.items||0;if(s===!0)return;let l=t.const("len",u._`${o}.length`);if(r===!1)e.setParams({len:s}),e.fail(u._`${l} > ${s}`);else if(typeof r=="object"&&!P.alwaysValidSchema(n,r)){let a=t.var("valid",u._`${l} <= ${s}`);t.if(u.not(a),()=>d(a,s)),e.ok(a)}n.items=!0;function d(a,f){t.forRange("i",f,l,(A)=>{if(e.subschema({keyword:"unevaluatedItems",dataProp:A,dataPropType:P.Type.Num},a),!n.allErrors)t.if(u.not(a),()=>t.break())})}}};ie.default=at});var ue=pe(function(de){Object.defineProperty(de,"__esModule",{value:!0});var ot=se(),st=ce(),it=[ot.default,st.default];de.default=it});var fe=pe(function(me){Object.defineProperty(me,"__esModule",{value:!0});var dt=Yk(),ut=Zk(),mt=Qk(),ft=B(),lt=ne(),pt=ue(),yt=eE(),R=tE(),ht=[ft.default,dt.default,ut.default,(0,mt.default)(!0),yt.default,R.metadataVocabulary,R.contentVocabulary,lt.default,pt.default];me.default=ht});var le=pe(function(ir,bt){bt.exports={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/schema",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/core":!0,"https://json-schema.org/draft/2020-12/vocab/applicator":!0,"https://json-schema.org/draft/2020-12/vocab/unevaluated":!0,"https://json-schema.org/draft/2020-12/vocab/validation":!0,"https://json-schema.org/draft/2020-12/vocab/meta-data":!0,"https://json-schema.org/draft/2020-12/vocab/format-annotation":!0,"https://json-schema.org/draft/2020-12/vocab/content":!0},$dynamicAnchor:"meta",title:"Core and Validation specifications meta-schema",allOf:[{$ref:"meta/core"},{$ref:"meta/applicator"},{$ref:"meta/unevaluated"},{$ref:"meta/validation"},{$ref:"meta/meta-data"},{$ref:"meta/format-annotation"},{$ref:"meta/content"}],type:["object","boolean"],$comment:"This meta-schema also defines keywords that have appeared in previous drafts in order to prevent incompatible extensions as they remain in common use.",properties:{definitions:{$comment:'"definitions" has been replaced by "$defs".',type:"object",additionalProperties:{$dynamicRef:"#meta"},deprecated:!0,default:{}},dependencies:{$comment:'"dependencies" has been split and replaced by "dependentSchemas" and "dependentRequired" in order to serve their differing semantics.',type:"object",additionalProperties:{anyOf:[{$dynamicRef:"#meta"},{$ref:"meta/validation#/$defs/stringArray"}]},deprecated:!0,default:{}},$recursiveAnchor:{$comment:'"$recursiveAnchor" has been replaced by "$dynamicAnchor".',$ref:"meta/core#/$defs/anchorString",deprecated:!0},$recursiveRef:{$comment:'"$recursiveRef" has been replaced by "$dynamicRef".',$ref:"meta/core#/$defs/uriReferenceString",deprecated:!0}}}});var ye=pe(function(cr,gt){gt.exports={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/applicator",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/applicator":!0},$dynamicAnchor:"meta",title:"Applicator vocabulary meta-schema",type:["object","boolean"],properties:{prefixItems:{$ref:"#/$defs/schemaArray"},items:{$dynamicRef:"#meta"},contains:{$dynamicRef:"#meta"},additionalProperties:{$dynamicRef:"#meta"},properties:{type:"object",additionalProperties:{$dynamicRef:"#meta"},default:{}},patternProperties:{type:"object",additionalProperties:{$dynamicRef:"#meta"},propertyNames:{format:"regex"},default:{}},dependentSchemas:{type:"object",additionalProperties:{$dynamicRef:"#meta"},default:{}},propertyNames:{$dynamicRef:"#meta"},if:{$dynamicRef:"#meta"},then:{$dynamicRef:"#meta"},else:{$dynamicRef:"#meta"},allOf:{$ref:"#/$defs/schemaArray"},anyOf:{$ref:"#/$defs/schemaArray"},oneOf:{$ref:"#/$defs/schemaArray"},not:{$dynamicRef:"#meta"}},$defs:{schemaArray:{type:"array",minItems:1,items:{$dynamicRef:"#meta"}}}}});var he=pe(function(dr,vt){vt.exports={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/unevaluated",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/unevaluated":!0},$dynamicAnchor:"meta",title:"Unevaluated applicator vocabulary meta-schema",type:["object","boolean"],properties:{unevaluatedItems:{$dynamicRef:"#meta"},unevaluatedProperties:{$dynamicRef:"#meta"}}}});var $e=pe(function(ur,_t){_t.exports={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/content",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/content":!0},$dynamicAnchor:"meta",title:"Content vocabulary meta-schema",type:["object","boolean"],properties:{contentEncoding:{type:"string"},contentMediaType:{type:"string"},contentSchema:{$dynamicRef:"#meta"}}}});var be=pe(function(mr,jt){jt.exports={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/core",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/core":!0},$dynamicAnchor:"meta",title:"Core vocabulary meta-schema",type:["object","boolean"],properties:{$id:{$ref:"#/$defs/uriReferenceString",$comment:"Non-empty fragments not allowed.",pattern:"^[^#]*#?$"},$schema:{$ref:"#/$defs/uriString"},$ref:{$ref:"#/$defs/uriReferenceString"},$anchor:{$ref:"#/$defs/anchorString"},$dynamicRef:{$ref:"#/$defs/uriReferenceString"},$dynamicAnchor:{$ref:"#/$defs/anchorString"},$vocabulary:{type:"object",propertyNames:{$ref:"#/$defs/uriString"},additionalProperties:{type:"boolean"}},$comment:{type:"string"},$defs:{type:"object",additionalProperties:{$dynamicRef:"#meta"}}},$defs:{anchorString:{type:"string",pattern:"^[A-Za-z_][-A-Za-z0-9._]*$"},uriString:{type:"string",format:"uri"},uriReferenceString:{type:"string",format:"uri-reference"}}}});var ge=pe(function(fr,qt){qt.exports={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/format-annotation",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/format-annotation":!0},$dynamicAnchor:"meta",title:"Format vocabulary meta-schema for annotation results",type:["object","boolean"],properties:{format:{type:"string"}}}});var ve=pe(function(lr,Pt){Pt.exports={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/meta-data",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/meta-data":!0},$dynamicAnchor:"meta",title:"Meta-data vocabulary meta-schema",type:["object","boolean"],properties:{title:{type:"string"},description:{type:"string"},default:!0,deprecated:{type:"boolean",default:!1},readOnly:{type:"boolean",default:!1},writeOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0}}}});var _e=pe(function(pr,Rt){Rt.exports={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/validation",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/validation":!0},$dynamicAnchor:"meta",title:"Validation vocabulary meta-schema",type:["object","boolean"],properties:{type:{anyOf:[{$ref:"#/$defs/simpleTypes"},{type:"array",items:{$ref:"#/$defs/simpleTypes"},minItems:1,uniqueItems:!0}]},const:!0,enum:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/$defs/nonNegativeInteger"},minLength:{$ref:"#/$defs/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},maxItems:{$ref:"#/$defs/nonNegativeInteger"},minItems:{$ref:"#/$defs/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},maxContains:{$ref:"#/$defs/nonNegativeInteger"},minContains:{$ref:"#/$defs/nonNegativeInteger",default:1},maxProperties:{$ref:"#/$defs/nonNegativeInteger"},minProperties:{$ref:"#/$defs/nonNegativeIntegerDefault0"},required:{$ref:"#/$defs/stringArray"},dependentRequired:{type:"object",additionalProperties:{$ref:"#/$defs/stringArray"}}},$defs:{nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{$ref:"#/$defs/nonNegativeInteger",default:0},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}}}});var qe=pe(function(je){Object.defineProperty(je,"__esModule",{value:!0});var At=le(),Ot=ye(),Mt=he(),St=$e(),xt=be(),It=ge(),wt=ve(),Nt=_e(),Tt=["/properties"];function kt(e){return[At,Ot,Mt,St,xt,t(this,It),wt,t(this,Nt)].forEach((r)=>this.addMetaSchema(r,void 0,!1)),this;function t(r,o){return e?r.$dataMetaSchema(o,Tt):o}}je.default=kt});var Ft=pe(function(m,x){Object.defineProperty(m,"__esModule",{value:!0});m.MissingRefError=m.ValidationError=m.CodeGen=m.Name=m.nil=m.stringify=m.str=m._=m.KeywordCxt=m.Ajv2020=void 0;var Ct=Gk(),Vt=fe(),Dt=nE(),Kt=qe(),S="https://json-schema.org/draft/2020-12/schema";class b extends Ct.default{constructor(e={}){super({...e,dynamicRef:!0,next:!0,unevaluated:!0})}_addVocabularies(){if(super._addVocabularies(),Vt.default.forEach((e)=>this.addVocabulary(e)),this.opts.discriminator)this.addKeyword(Dt.default)}_addDefaultMetaSchema(){super._addDefaultMetaSchema();let{$data:e,meta:t}=this.opts;if(!t)return;Kt.default.call(this,e),this.refs["http://json-schema.org/schema"]=S}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(S)?S:void 0)}}m.Ajv2020=b;x.exports=m=b;x.exports.Ajv2020=b;Object.defineProperty(m,"__esModule",{value:!0});m.default=b;var Gt=Qg();Object.defineProperty(m,"KeywordCxt",{enumerable:!0,get:function(){return Gt.KeywordCxt}});var h=Bt();Object.defineProperty(m,"_",{enumerable:!0,get:function(){return h._}});Object.defineProperty(m,"str",{enumerable:!0,get:function(){return h.str}});Object.defineProperty(m,"stringify",{enumerable:!0,get:function(){return h.stringify}});Object.defineProperty(m,"nil",{enumerable:!0,get:function(){return h.nil}});Object.defineProperty(m,"Name",{enumerable:!0,get:function(){return h.Name}});Object.defineProperty(m,"CodeGen",{enumerable:!0,get:function(){return h.CodeGen}});var zt=Kv();Object.defineProperty(m,"ValidationError",{enumerable:!0,get:function(){return zt.default}});var Lt=eb();Object.defineProperty(m,"MissingRefError",{enumerable:!0,get:function(){return Lt.default}})});export default Ft();
|
|
2
|
+
|
|
3
|
+
//# debugId=689EF37D4565099C64756E2164756E21
|
|
4
|
+
//# sourceMappingURL=2020-7sx2vexa.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{X}from"./studio-9c6cbq2c.js";import{p}from"./studio-4fnb5648.js";import{w}from"./studio-sce30r7b.js";import"./studio-5tet77de.js";import{Jt,Ut,Nh}from"./studio-nzemfbkk.js";import"./studio-nvcn2ykc.js";import{sn,nt,dt}from"./studio-tpxcryf2.js";import{ae}from"./studio-wqfaqw4m.js";import{jt,Aa,lr,Oa}from"./studio-q9hx2qp0.js";import{jn,Wt,ln,go}from"./studio-knsjyx7n.js";import"./studio-swedpd82.js";import{zS}from"./studio-frc16j8v.js";import"./studio-4zd6an2b.js";import"./studio-hh394phe.js";import"./studio-bnc50f9h.js";import"./studio-xpx91fby.js";import"./studio-g9brbewz.js";import{Co,ic}from"./studio-pwctzka3.js";import"./studio-rr00ex23.js";import"./studio-v7a7yb5w.js";import"./studio-r6mx7vm5.js";import"./studio-1ks5d9y4.js";import{ds,Jc,Ta,Ys}from"./studio-61rg2cz5.js";import"./studio-1410q5dw.js";import"./studio-3pz4t5a2.js";import{oh,Gb}from"./studio-xva3hzkv.js";import{Ne,ev}from"./studio-n9qba0gx.js";import"./studio-90zkgne5.js";import"./studio-hfqpfmpk.js";import"./studio-mrjtnm62.js";import"./studio-2zz4qbv9.js";import"./studio-jma2q8r9.js";import"./studio-k2evngrj.js";import{$S,TT,Ow,NS,_i}from"./studio-a88ej93p.js";import"./studio-daksw8kh.js";import"./studio-s24mhq0z.js";import"./studio-cqxj4fcy.js";import"./studio-k1wvtp03.js";import{wm}from"./studio-amaz545p.js";import"./studio-4bgvvzhv.js";import"./studio-z3fztxrp.js";import"./studio-pj216fmn.js";import{bE,tw}from"./studio-jd1qb1st.js";import{xb,xw,Ws,Pc,pS,vm,_w,fS,QE,ol,mS,Hu,gS,oN,eT,ym,_b,tT,nT,iT,rN,sN,bS}from"./studio-cw11h078.js";import{rb}from"./studio-az3wvyh2.js";import{cb,Id,Rd}from"./studio-2kpxm0eh.js";import{aw,kE}from"./studio-brh8d2pr.js";import"./studio-z9453ypn.js";import{Vl}from"./studio-1ctnw3xv.js";import{PT,Bw}from"./studio-qrzmfaf6.js";import"./studio-9gr7xs9r.js";import"./studio-acer0g8w.js";import{C,wn}from"./studio-4f7thq0p.js";import{Ve,vt,E,R}from"./studio-9dq7rwc7.js";import{g}from"./studio-3qr08sxq.js";import{n,v}from"./studio-k3we3kqb.js";var T={$schema:"https://jxsuite.com/schema/v1",$id:"StudioAddNew",$description:"Add new: the one dialog that creates a page, a collection, a template, a component, a collection entry or an upload (`specs/studio.md` §9.1.1). One `jx-dialog`, so the platform owns modality, Escape, the backdrop and focus restoration. The kinds run down the left as a radiogroup and the chosen kind's name and options fill the right; the line above the buttons is the derived result, the same `deriveCreation` the write performs, so what it says is what is written. Nothing here composes a path, judges a name or knows a format: `create/add-new-flow.ts` keeps every decision and hands this document rows that are already strings, flags that are already booleans and a refusal that is already a sentence.",tagName:"jx-dialog",$props:{headline:"Add new",confirmLabel:{$ref:"#/state/cta"},confirmDisabled:{$ref:"#/state/blocked"},cancelLabel:"Cancel",size:"lg"},attributes:{part:"add-new","data-kind":"${state.kind}"},onconfirm:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/confirm"},value:[]}]},oncancel:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/closed"},value:[]}]},onclose:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/closed"},value:[]}]},ondragover:{$prototype:"Function",body:[{preventDefault:!0}]},ondrop:{$prototype:"Function",body:[{preventDefault:!0},{operator:"call",target:{$ref:"#/state/drop"},value:[{$ref:"event#/dataTransfer/files"}]}]},style:{$description:"The board's two columns in the kit's scale. The kinds take a fixed gutter so the right side does not move under the reader as they switch kinds, and the options column scrolls on its own so a long template list never pushes the result line and the buttons off the dialog. No part here is named `field`, `label`, `body`, `error`, `text` or `actions`: the kit is light DOM, and `jx-textfield`, `jx-select` and `jx-dialog` each draw internal nodes under those names inside this same tree.",'& [part="sheet"]':{display:"flex",gap:"var(--jx-space-5)",minHeight:"360px"},'& [part="kinds-column"]':{flex:"0 0 208px",display:"flex",flexDirection:"column",gap:"var(--jx-space-3)",borderRight:"1px solid var(--border)",paddingRight:"var(--jx-space-3)"},'& [part="kinds"]':{display:"flex",flexDirection:"column",alignItems:"stretch",gap:"var(--jx-space-1)"},'& [part="kind"]':{display:"block"},'& [part="kind"] > [part="control"]':{$description:"A kind is a row with its own two lines, so the button's box stretches across the gutter and starts its content at the left edge rather than centring an icon.",width:"100%",height:"auto",justifyContent:"flex-start",alignItems:"flex-start",textAlign:"start",padding:"var(--jx-space-2) var(--jx-space-3)",gap:"var(--jx-space-3)"},'& [part="kind-text"]':{display:"flex",flexDirection:"column",gap:"2px"},'& [part="kind-name"]':{fontSize:"var(--jx-text-md)",color:"var(--fg)"},'& [part="kind-hint"], & [part="choice-note"]':{fontSize:"var(--jx-text-sm)",color:"var(--fg-dim)",whiteSpace:"normal"},'& [part="chord-note"], & [part="note"], & [part="kind-intro"], & [part="drop-summary"]':{margin:"0",fontSize:"var(--jx-text-sm)",color:"var(--fg-dim)"},'& [part="chord-note"]':{marginTop:"auto"},'& [part="detail"]':{flex:"1",minWidth:"0",display:"flex",flexDirection:"column",gap:"var(--jx-space-4)",maxHeight:"60vh",overflowY:"auto"},'& [part="options"]':{display:"flex",flexDirection:"column",gap:"var(--jx-space-3)"},'& [part="name-slot"], & [part="options-slot"], & [part="url-slot"], & [part="own-page-slot"], & [part="copy-slot"], & [part="locale-slot"], & [part="localized-slot"]':{$description:"Branch hosts are structure rather than layout: `display: contents` puts what they carry straight into the column, so one gap rule spaces every row whether it is drawn or not.",display:"contents"},'& [part="group-label"]':{margin:"0",fontSize:"var(--jx-text-sm)",color:"var(--fg-dim)"},'& [part="url-row"], & [part="pattern-row"]':{display:"flex",flexWrap:"wrap",alignItems:"center",gap:"var(--jx-space-2)"},'& [part="url-label"]':{fontSize:"var(--jx-text-sm)",color:"var(--fg-dim)"},'& [part="route"], & [part="pattern"]':{fontFamily:"var(--font-mono)",fontSize:"var(--jx-text-sm)",color:"var(--fg)"},'& [part="start-row"]':{display:"flex",flexDirection:"column",gap:"var(--jx-space-2)"},'& [part="start-from"], & [part="wrap-in"], & [part="component-start"]':{display:"flex",flexWrap:"wrap",gap:"var(--jx-space-2)"},'& [part="choice-card"] > [part="control"]':{$description:"A choice is a card with a name and a note, as the board draws it: its own two lines inside one radio, so the reader hears one name and sees both.",minWidth:"132px",height:"auto",flexDirection:"column",alignItems:"flex-start",textAlign:"start",padding:"var(--jx-space-2) var(--jx-space-3)",gap:"2px"},'& [part="choice-name"]':{display:"block",fontSize:"var(--jx-text-md)",color:"var(--fg)"},'& [part="choice-note"]':{display:"block"},'& [part="presets"]':{display:"flex",flexWrap:"wrap",gap:"var(--jx-space-2)"},'& [part="drop"]':{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:"var(--jx-space-2)",minHeight:"200px",padding:"var(--jx-space-5)",border:"1px dashed var(--border)",borderRadius:"var(--radius)",textAlign:"center"},'& [part="drop"][data-drop="true"]':{borderColor:"var(--accent)",background:"var(--accent-10)"},'& [part="drop-title"]':{margin:"0",fontSize:"var(--jx-text-md)",color:"var(--fg)"},'& [part="browse"]':{display:"inline-flex",alignItems:"center",gap:"var(--jx-space-2)",padding:"var(--jx-space-1) var(--jx-space-3)",border:"1px solid var(--border)",borderRadius:"var(--radius)",color:"var(--fg)",cursor:"pointer"},'& [part="browse"]:focus-within':{outline:"var(--jx-focus-ring)",outlineOffset:"2px"},'& [part="browse-input"]':{$description:"Visually hidden, never `display: none`: the input is the control, and a hidden-from-layout one cannot take focus from the keyboard. The label around it is what is drawn and what is clicked.",position:"absolute",width:"1px",height:"1px",opacity:"0",overflow:"hidden"},'& [part="saved"]':{margin:"0",paddingTop:"var(--jx-space-3)",borderTop:"1px solid var(--border)",fontSize:"var(--jx-text-sm)",color:"var(--fg-dim)",overflowWrap:"anywhere"}},children:[{tagName:"div",attributes:{part:"sheet"},children:[{tagName:"div",attributes:{part:"kinds-column"},children:[{tagName:"jx-action-group",attributes:{part:"kinds"},$props:{selects:"single",label:"What to create",orientation:"vertical",compact:!1},children:[{$prototype:"Array",items:{$ref:"#/state/kinds"},key:{$ref:"$map/item/id"},map:{tagName:"jx-action-button",attributes:{part:"kind","data-kind":"${$map.item.id}"},$props:{label:{$ref:"$map/item/label"},icon:{$ref:"$map/item/icon"},checked:{$ref:"$map/item/checked"}},onclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/pickKind"},value:[{$ref:"$map/item/id"}]}]},children:[{tagName:"span",attributes:{part:"kind-text"},children:[{tagName:"span",attributes:{part:"kind-name"},textContent:"${$map.item.label}"},{tagName:"span",attributes:{part:"kind-hint"},textContent:"${$map.item.hint}"}]}]}}]},{tagName:"p",attributes:{part:"chord-note"},textContent:"${state.chordNote}"}]},{tagName:"section",attributes:{part:"detail","aria-label":"${state.kindLabel}"},children:[{tagName:"p",attributes:{part:"kind-intro"},textContent:"${state.kindHint}"},{tagName:"div",attributes:{part:"name-slot",role:"none"},$switch:{$ref:"#/state/named"},cases:{true:{tagName:"jx-field",attributes:{part:"name-row"},$props:{span:!0,label:{$ref:"#/state/nameLabel"},invalid:{$ref:"#/state/invalid"}},children:[{tagName:"jx-textfield",attributes:{part:"name"},$props:{value:{$ref:"#/state/name"},placeholder:{$ref:"#/state/placeholder"},invalid:{$ref:"#/state/invalid"},error:{$ref:"#/state/error"},required:!0,autocomplete:"off"},oninput:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/setName"},value:[{$ref:"event#/target/value"}]}]},onkeydown:{$prototype:"Function",body:[{$switch:{$ref:"event#/key"},cases:{Enter:[{preventDefault:!0},{operator:"call",target:{$ref:"#/state/confirm"},value:[]}]}}]}}]}}},{tagName:"div",attributes:{part:"options-slot",role:"none"},$switch:{$ref:"#/state/kind"},cases:{page:{tagName:"div",attributes:{part:"options",role:"none"},children:[{tagName:"div",attributes:{part:"locale-slot",role:"none"},$switch:{$ref:"#/state/localeShown"},cases:{true:{tagName:"jx-field",attributes:{part:"locale-row"},$props:{span:!0,label:"Language"},children:[{tagName:"jx-select",attributes:{part:"locale"},$props:{size:"sm",label:"Language",options:{$ref:"#/state/localeOptions"},value:{$ref:"#/state/locale"}},onchange:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/pickLocale"},value:[{$ref:"event#/target/value"}]}]}}]}}},{tagName:"div",attributes:{part:"url-row"},children:[{tagName:"span",attributes:{part:"url-label"},textContent:"URL"},{tagName:"code",attributes:{part:"route"},textContent:"${state.route}"},{tagName:"jx-action-button",attributes:{part:"edit-url"},$props:{label:"Edit URL",toggles:!0,selected:{$ref:"#/state/editingUrl"},size:"sm"},onchange:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/toggleUrl"},value:[]}]},children:[{tagName:"span",textContent:"Edit"}]}]},{tagName:"div",attributes:{part:"url-slot",role:"none"},$switch:{$ref:"#/state/editingUrl"},cases:{true:{tagName:"jx-field",attributes:{part:"url-row-field"},$props:{span:!0,label:"URL"},children:[{tagName:"jx-textfield",attributes:{part:"url"},$props:{size:"sm",mono:!0,value:{$ref:"#/state/url"},placeholder:"/pricing"},oninput:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/setUrl"},value:[{$ref:"event#/target/value"}]}]},onkeydown:{$prototype:"Function",body:[{$switch:{$ref:"event#/key"},cases:{Enter:[{preventDefault:!0},{operator:"call",target:{$ref:"#/state/confirm"},value:[]}]}}]}}]}}},{tagName:"div",attributes:{part:"start-row"},children:[{tagName:"p",attributes:{part:"group-label"},textContent:"Start from"},{tagName:"jx-action-group",attributes:{part:"start-from"},$props:{selects:"single",label:"Start from",compact:!1},children:[{$prototype:"Array",items:{$ref:"#/state/startChoices"},key:{$ref:"$map/item/value"},map:{tagName:"jx-action-button",attributes:{part:"choice-card","data-value":"${$map.item.value}"},$props:{label:{$ref:"$map/item/label"},checked:{$ref:"$map/item/checked"},disabled:{$ref:"$map/item/disabled"},hint:{$ref:"$map/item/reason"},quiet:!1},onclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/pickStart"},value:[{$ref:"$map/item/value"}]}]},children:[{tagName:"span",attributes:{part:"choice-name"},textContent:"${$map.item.label}"},{tagName:"span",attributes:{part:"choice-note"},textContent:"${$map.item.note}"}]}}]}]}]},collection:{tagName:"div",attributes:{part:"options",role:"none"},children:[{tagName:"p",attributes:{part:"group-label"},textContent:"Each ${state.itemNoun} has"},{tagName:"jx-action-group",attributes:{part:"presets"},$props:{selects:"multiple",label:"Fields",compact:!1},children:[{$prototype:"Array",items:{$ref:"#/state/presets"},key:{$ref:"$map/item/id"},map:{tagName:"jx-action-button",attributes:{part:"preset","data-preset":"${$map.item.id}"},$props:{label:{$ref:"$map/item/label"},toggles:!0,selected:{$ref:"$map/item/selected"},quiet:!1,size:"sm",icon:{$ref:"$map/item/icon"}},onchange:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/togglePreset"},value:[{$ref:"$map/item/id"}]}]},children:[{tagName:"span",textContent:"${$map.item.label}"}]}}]},{tagName:"p",attributes:{part:"note"},textContent:"You can add or change fields later."},{tagName:"div",attributes:{part:"localized-slot",role:"none"},$switch:{$ref:"#/state/localizable"},cases:{true:{tagName:"jx-checkbox",attributes:{part:"localized"},$props:{checked:{$ref:"#/state/localized"}},onchange:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/setLocalized"},value:[{$ref:"event#/target/checked"}]}]},children:[{tagName:"span",textContent:"One folder per language (${state.localeSummary})"}]}}},{tagName:"jx-checkbox",attributes:{part:"own-page"},$props:{checked:{$ref:"#/state/ownPage"}},onchange:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/setOwnPage"},value:[{$ref:"event#/target/checked"}]}]},children:[{tagName:"span",textContent:"Give each ${state.itemNoun} its own page"}]},{tagName:"div",attributes:{part:"own-page-slot",role:"none"},$switch:{$ref:"#/state/ownPage"},cases:{true:{tagName:"div",attributes:{part:"pattern-row"},children:[{tagName:"span",attributes:{part:"url-label"},textContent:"at"},{tagName:"code",attributes:{part:"pattern"},textContent:"${state.pattern}"},{tagName:"span",attributes:{part:"url-label"},textContent:"using"},{tagName:"jx-select",attributes:{part:"page-template"},$props:{size:"sm",label:"Template for each page",options:{$ref:"#/state/templateOptions"},value:{$ref:"#/state/pageTemplate"}},onchange:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/pickPageTemplate"},value:[{$ref:"event#/target/value"}]}]}}]}}}]},template:{tagName:"div",attributes:{part:"options",role:"none"},children:[{tagName:"p",attributes:{part:"group-label"},textContent:"Wrap it in"},{tagName:"jx-action-group",attributes:{part:"wrap-in"},$props:{selects:"single",label:"Wrap it in",compact:!1},children:[{$prototype:"Array",items:{$ref:"#/state/wrapChoices"},key:{$ref:"$map/item/value"},map:{tagName:"jx-action-button",attributes:{part:"choice-card","data-value":"${$map.item.value}"},$props:{label:{$ref:"$map/item/label"},checked:{$ref:"$map/item/checked"},disabled:{$ref:"$map/item/disabled"},hint:{$ref:"$map/item/reason"},quiet:!1},onclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/pickWrap"},value:[{$ref:"$map/item/value"}]}]},children:[{tagName:"span",attributes:{part:"choice-name"},textContent:"${$map.item.label}"},{tagName:"span",attributes:{part:"choice-note"},textContent:"${$map.item.note}"}]}}]},{tagName:"p",attributes:{part:"note"},textContent:"Pages placed in this template fill its Content area. You can add more named areas later."}]},component:{tagName:"div",attributes:{part:"options",role:"none"},children:[{tagName:"p",attributes:{part:"group-label"},textContent:"Start from"},{tagName:"jx-action-group",attributes:{part:"component-start"},$props:{selects:"single",label:"Start from",compact:!1},children:[{$prototype:"Array",items:{$ref:"#/state/componentChoices"},key:{$ref:"$map/item/value"},map:{tagName:"jx-action-button",attributes:{part:"choice-card","data-value":"${$map.item.value}"},$props:{label:{$ref:"$map/item/label"},checked:{$ref:"$map/item/checked"},disabled:{$ref:"$map/item/disabled"},hint:{$ref:"$map/item/reason"},quiet:!1},onclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/pickComponentStart"},value:[{$ref:"$map/item/value"}]}]},children:[{tagName:"span",attributes:{part:"choice-name"},textContent:"${$map.item.label}"},{tagName:"span",attributes:{part:"choice-note"},textContent:"${$map.item.note}"}]}}]},{tagName:"div",attributes:{part:"copy-slot",role:"none"},$switch:{$ref:"#/state/copying"},cases:{true:{tagName:"jx-field",attributes:{part:"copy-row"},$props:{span:!0,label:"Copy of"},children:[{tagName:"jx-select",attributes:{part:"copy-of"},$props:{size:"sm",label:"Component to copy",options:{$ref:"#/state/copyOptions"},value:{$ref:"#/state/copyOf"}},onchange:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/pickCopy"},value:[{$ref:"event#/target/value"}]}]}}]}}},{tagName:"p",attributes:{part:"note"},textContent:"It appears under Components in the Site panel, ready to drag onto any page."}]},entry:{tagName:"div",attributes:{part:"options",role:"none"},children:[{tagName:"jx-field",attributes:{part:"collection-row"},$props:{span:!0,label:"Collection"},children:[{tagName:"jx-select",attributes:{part:"collection"},$props:{size:"sm",label:"Collection",options:{$ref:"#/state/collectionOptions"},value:{$ref:"#/state/collection"}},onchange:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/pickCollection"},value:[{$ref:"event#/target/value"}]}]}}]},{tagName:"div",attributes:{part:"locale-slot",role:"none"},$switch:{$ref:"#/state/localeShown"},cases:{true:{tagName:"jx-field",attributes:{part:"locale-row"},$props:{span:!0,label:"Language"},children:[{tagName:"jx-select",attributes:{part:"locale"},$props:{size:"sm",label:"Language",options:{$ref:"#/state/localeOptions"},value:{$ref:"#/state/locale"}},onchange:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/pickLocale"},value:[{$ref:"event#/target/value"}]}]}}]}}}]},media:{tagName:"div",attributes:{part:"drop","data-drop":"${state.dropActive}"},ondragover:{$prototype:"Function",body:[{preventDefault:!0},{operator:"call",target:{$ref:"#/state/dragOver"},value:[]}]},ondragleave:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/dragOut"},value:[]}]},children:[{tagName:"jx-icon",attributes:{part:"drop-glyph"},$props:{name:"upload-simple"}},{tagName:"p",attributes:{part:"drop-title"},textContent:"Drop images, video or documents"},{tagName:"label",attributes:{part:"browse"},children:[{tagName:"input",attributes:{part:"browse-input",type:"file",multiple:!0,accept:"${state.uploadAccept}"},onchange:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/choose"},value:[{$ref:"event#/target"}]}]}},{tagName:"span",textContent:"Browse files"}]},{tagName:"p",attributes:{part:"drop-summary"},textContent:"${state.fileSummary}"}]}}}]}]},{tagName:"p",attributes:{part:"saved","aria-live":"polite"},textContent:"${state.saved}"}]};E("add-new",T);function z(e){return{...e,blocked:!e.canConfirm,invalid:e.error!=="",named:e.kind!=="media"}}function D(e){let t=document.createElement("div");t.style.pointerEvents="auto",t.setAttribute(Ve,vt("dialog","add-new")),e.layer.append(t);let r=!1,o=()=>{if(r)return;r=!0,e.actions.closed()},l=()=>r,{actions:a}=e,d=g({...z(e.view),choose:a.choose,closed:o,confirm:a.confirm,dragOut:a.dragOut,dragOver:a.dragOver,drop:a.drop,pickCollection:a.pickCollection,pickComponentStart:a.pickComponentStart,pickCopy:a.pickCopy,pickKind:a.pickKind,pickLocale:a.pickLocale,pickPageTemplate:a.pickPageTemplate,pickStart:a.pickStart,pickWrap:a.pickWrap,setName:(m)=>{d.name=m,a.setName(m)},setLocalized:a.setLocalized,setOwnPage:a.setOwnPage,setUrl:(m)=>{d.url=m,a.setUrl(m)},toggleUrl:a.toggleUrl,togglePreset:a.togglePreset}),f=null,u=()=>{setTimeout(()=>{let m=f?.root;if(r||!(m instanceof HTMLElement))return;let c=m.querySelector('jx-textfield[part="name"]');if(c)Nh(c,"all")},0)},b=R("add-new",d,t).then(async(m)=>{f=m;let c=m.root;if(l())return m.dispose(),c;if(await sn(c),l())return c;if(Jt(c),d.named)u();return c});return{close(){let m=f?.root;if(m instanceof HTMLElement)Ut(m);f?.dispose(),f=null,t.remove(),o()},host:t,ready:b,update(m){Object.assign(d,z(m))}}}var x="Add new";async function W(){return(await bE()).map((t)=>({name:t.name,ref:t.path})).toSorted((t,r)=>t.name.localeCompare(r.name))}function _(){for(let e of $S("page")){if(e.ext===".json")continue;let t=Aa(e.ext,"serialize");if(t)return{ext:e.ext,name:t.name}}return null}function B(){let e=lr(),t=e?.extensions[0];return e&&t?{ext:t,name:e.name}:null}function J(){return ln(C?.projectConfig??{}).i18n}async function V(e){let t={},{i18n:r}=ln(C?.projectConfig??{});for(let o of await zS(e)){let l=jn(go(o,r));if(l!==null)t[l]=o}return t}async function L(){await jt().catch(()=>{});let e=await Promise.all(Bw().map(async(t)=>{let r={dir:t.dir,ext:t.ext,formatName:bS(t),name:t.name,schema:t.schema};if(_b(t))r.localeDirs=await V(t);return r}));return{i18n:J(),article:_(),collections:e,componentTags:Ne.map((t)=>t.tagName),copyableTags:Ne.filter((t)=>I(t)).map((t)=>t.tagName),contentFormat:B(),declaredContent:PT(),defaultLayout:C?.projectConfig?.defaults?.layout??null,hasSelection:aw()!==null,layouts:await W()}}function I(e){let{path:t}=e;return n(t)&&e.source!=="npm"&&t.endsWith(".json")}async function Y(){let e=new Map;for(let t of Ne){let{path:r}=t;if(!I(t)||!n(r))continue;try{let o=JSON.parse(await p().readFile(r));if(v(o))e.set(t.tagName,o)}catch{}}return e}function U(e,t){let r=e.trim();if(r===Ws||r==="none"||r==="")return Ws;if(r===Pc)return Pc;let o=ol(r);return t.find((a)=>ol(a.ref)===o||ol(a.ref)===`layouts/${o}`||ol(a.ref)===`layouts/${o}.json`||a.name.toLowerCase()===r.toLowerCase())?.ref??null}function G(e,t){let r={};if(e.collection!==void 0)r.collection=e.collection;if(e.locale!==void 0){if(ym(e.locale,t)===null){let o=t.i18n?.locales??[];throw RangeError(`command "file.new" argument "locale": "${e.locale}" is not a language this `+`project declares — declared: ${o.length===0?"none":o.join(", ")}`)}r.locale=e.locale}if(e.template!==void 0){let o=U(e.template,t.layouts);if(o===null){let l=t.layouts.map((a)=>ol(a.ref));throw RangeError(`command "file.new" argument "template": "${e.template}" names no template — `+`declared: ${[Ws,Pc,...l].join(", ")}`)}if(e.kind==="collection")r.pageTemplate=o===Pc?Ws:o;else if(e.kind==="template")r.startFrom=o===Ws||o===Pc?"":o;else r.startFrom=o}return r}async function Q(e){if(e.format===null)return Co(e.doc,null);return Oa(e.format,e.doc,{frontmatter:e.frontmatter??!0,mode:"roundtrip"})}async function F(e,t,r=!1){for(let o of rN(iT(e)))await Promise.all(o.map(async(l)=>{if(!r&&t.has(l))return;t.set(l,sN(l,t)?new Set:await Ow(l))}))}function S(e){if(rb(e),Rd(),e.some((t)=>t.startsWith("pages/")))Gb(),cb();TT(e).then((t)=>{if(t)Rd(),wn("leftPanel")})}async function P(e,t,r){let o;try{o=await Q(t)}catch(l){throw w.error(`Could not prepare ${e}.`,{detail:X(l),path:e,source:x}),Error(`could not prepare ${e}`,{cause:l})}if(await NS(e,o,{quiet:r,source:x})===null)throw Error(`could not write ${e}`)}async function Z(e){let t=e.config,r=C?.projectConfig?.content,o=v(r)?{...r}:{};if(o[t.name]=t.entry,!(await ic({content:o})).ok)return null;let a=["project.json"],d=[];for(let u of[{body:e.content,path:e.path},...e.extraWrites])try{await P(u.path,u.body,!0),a.push(u.path)}catch{d.push(u.path)}if(d.length===0)w.success(`Created the ${t.name} collection`);else w.warn(`Created the ${t.name} collection, but ${d.join(" and ")} could not be written.`,{source:x});S(a),wm(t.name),nt("content.showCollection",{collection:t.name},x);let f={kind:"collection",path:`content/${t.name}`,wrote:a};if(e.route!==void 0)f.route=e.route;return f}async function M(e,t,r){if(e.kind==="media"){let l=await Ys(r,{dir:Ta,only:"media"});if(l.length===0)return null;let a=l.map((d)=>d.path);return S(a),nt("media.browse",{select:l[0].path},x),{kind:"media",path:Ta,wrote:a}}if(e.kind==="collection")return Z(e);let o={kind:e.kind,path:e.path,wrote:[e.path]};if(e.route!==void 0)o.route=e.route;if(e.tag!==void 0)o.tag=e.tag;if(e.kind==="component"&&t.startFrom===pS){let l=await kE(e.tag);if(l===null)return null;return S([l]),await _i(l),o}try{await P(e.path,e.content,!1)}catch{return null}switch(S([e.path]),e.kind){case"component":{ev(e.path,e.content.doc),await _i(e.path);break}case"template":{tw(),await _i(e.path);break}case"entry":{if(t.collection!==void 0)wm(t.collection);await Vl(e.path);break}default:await _i(e.path)}return o}async function Je(e){let t=e.kind??"page";if(t==="media")throw RangeError('command "file.new": Media is uploaded, not named; run file.new { kind: "media" } with no name to open the upload drop zone.');let r=await L(),o=G({...e,kind:t},r);if(t==="entry"&&o.collection===void 0&&r.collections.length===1)o.collection=r.collections[0].name;let l=tT(t,e.name,o,r),a=new Map;await F(l,a,!0);let d=nT(l,e.name,o,r,(u)=>a.get(u));if(d!=="")throw RangeError(`command "file.new": ${d}`);let f=await M(l,o,[]);if(f===null)throw Error(`file.new could not create ${l.path}; the reason is in Problems.`);return f}async function Ye(e){let t=await L(),r=t.collections.find((u)=>u.name===e);if(!r)return w.error(`"${e}" is not a collection this project declares.`,{source:x}),null;let o=`pages/${ds(e)||e}`,l=`${o}/[slug].json`;if((await Ow(o)).has("[slug].json"))return w.error(`${l} already exists.`,{detail:"Open it in Design and point its $paths at this collection, or rename it first.",path:l,source:x}),null;let d=oN(r.schema,r.formatName!==null),f=eT(e,d,mS(Hu(t),t),t);try{await P(l,{doc:f,format:null},!1)}catch{return null}return S([l]),l}function j(e){switch(e.kind){case"page":{let t={startFrom:e.pageStart};if(e.editingUrl)t.url=e.url;if(e.locale!=="")t.locale=e.locale;return t}case"template":return{startFrom:e.wrap};case"component":{let t={startFrom:e.componentStart};if(e.componentStart===vm&&e.copyOf!=="")t.copyOf=e.copyOf;return t}case"collection":return{fields:e.fields,localized:e.localized,ownPage:e.ownPage,pageTemplate:e.pageTemplate};case"entry":{let t={};if(e.collection!=="")t.collection=e.collection;if(e.locale!=="")t.locale=e.locale;return t}default:return{files:e.files.length}}}function y(e,t,r,o,l=""){return{checked:e===o?"true":"false",disabled:l!=="",label:t,note:r,reason:l,value:e}}function q(e,t){let r=t.layouts.map((o)=>y(o.ref,o.name,t.defaultLayout!==null&&ol(o.ref)===ol(t.defaultLayout)?"the site's default":"a template",e.pageStart));if(t.article!==null)r.push(y(Pc,"Article","mostly writing",e.pageStart));return r.push(y(Ws,"Blank","no template",e.pageStart)),r}function ee(){let e=aw();if(!e)return"nothing selected";let r=1+(Array.isArray(e.node.children)?e.node.children.length:0);return r===1?"1 element":`${r} elements`}function te(){let e=ae()?.keymap,t=e?.bindingsFor("file.new")??[];if(!e||t.length===0)return"";let[r,...o]=t.map((l)=>e.format(l));return o.length===0?`${r} opens this anywhere.`:`${r} opens this in the desktop app, ${o.join(" or ")} anywhere.`}function O(e,t,r,o){let l=xw[e.kind],a=xb.filter((s)=>s!=="entry"||t.collections.length>0).map((s)=>({checked:s===e.kind?"true":"false",hint:xw[s].hint,icon:xw[s].icon,id:s,label:xw[s].label})),d=r.config?.name??"",f=oh(d===""?"items":d),u=t.i18n?.locales??[],b=t.collections.find((s)=>s.name===e.collection),m=u.length>0&&(e.kind==="page"||e.kind==="entry"&&b!==void 0&&_b(b)),c=[...t.layouts.map((s)=>({label:s.name,value:s.ref})),{label:"No template",value:Ws}];return{canConfirm:o===""&&!e.busy,chordNote:te(),collection:e.collection,collectionOptions:t.collections.map((s)=>({label:Id(s.name),value:s.name})),componentChoices:[y("blank","Blank","an empty block",e.componentStart),y(pS,"Current selection",ee(),e.componentStart,t.hasSelection===!0?"":"Select an element on the canvas first."),y(vm,"Copy of…","an existing one",e.componentStart,(t.copyableTags??[]).length>0?"":"This project has no components of its own to copy yet.")],copyOf:e.copyOf,copyOptions:[...t.componentDocs?.keys()??[]].map((s)=>({label:`<${s}>`,value:s})),copying:e.componentStart===vm,cta:l.cta,dropActive:e.dropActive?"true":"false",editingUrl:e.editingUrl,error:e.touched||e.kind==="media"?e.kind==="media"?"":o:"",fileSummary:e.files.length===0?"":e.files.map((s)=>s.name).join(", "),itemNoun:f,kind:e.kind,kindHint:l.hint,kindLabel:l.label,kinds:a,locale:e.locale,localeOptions:u.map((s)=>({label:Wt(s),value:s})),localeShown:m,localeSummary:u.join(", "),localizable:u.length>0,localized:e.localized,name:e.name,nameLabel:l.nameLabel,ownPage:e.ownPage,pageTemplate:e.pageTemplate,pattern:r.route??`/${d===""?"items":d}/:slug`,placeholder:l.placeholder,presets:_w.filter((s)=>s!=="richText"||t.contentFormat!==null).map((s)=>{let N=e.fields.includes(s);return{icon:N?"check":"plus",id:s,label:fS[s].label,selected:N}}),route:r.route===void 0||r.route===""?"/":r.route,saved:r.saved,startChoices:q(e,t),templateOptions:c,uploadAccept:Jc(),url:e.url,wrapChoices:[...t.layouts.map((s)=>y(s.ref,s.name,"keeps its frame around this one",e.wrap)),y("","Nothing","a fresh frame",e.wrap)]}}function oe(e,t){let r=e.kind??"page";return r==="entry"&&t.collections.length===0?"page":r}var A=null;function Ge(e={}){if(A)return A.done;let t,r=new Promise((l)=>{t=l}),o={done:r,handle:null};return A=o,ne(e,t,o),r}async function ne(e,t,r){let o=await L(),l=new Map,a={busy:!1,collection:e.collection??o.collections[0]?.name??"",locale:ym(e.locale,o)??o.i18n?.defaultLocale??"",localized:o.i18n!==null&&o.i18n!==void 0,componentStart:"blank",copyOf:"",dropActive:!1,editingUrl:!1,fields:[...QE],files:[],kind:oe(e,o),name:e.name??"",ownPage:!0,pageStart:gS(o,ym(e.locale,o)??o.i18n?.defaultLocale??""),pageTemplate:Hu(o),templateChosen:e.template!==void 0,touched:(e.name??"")!=="",url:"",wrap:Hu(o)===Ws?"":Hu(o)};if(e.template!==void 0){let i=U(e.template,o.layouts);if(i!==null)a.pageStart=i,a.pageTemplate=i===Pc?Ws:i,a.wrap=i===Ws||i===Pc?"":i}if(o.contentFormat===null)a.fields=a.fields.filter((i)=>i!=="richText");let d=!1,f=null,u=()=>tT(a.kind,a.name,j(a),o),b=(i)=>nT(i,a.name,j(a),o,(h)=>l.get(h)),m=()=>{let i=u();if(r.handle?.update(O(a,o,i,b(i))),iT(i).some((h)=>!l.has(h)))F(i,l).then(()=>{if(!d){let h=u();r.handle?.update(O(a,o,h,b(h)))}})},c=(i)=>{i(),m()},s=async()=>{if(a.busy)return;a.touched=!0;let i=u();if(await F(i,l,!0),b(i)!==""){m();return}a.busy=!0,m();try{f=await M(i,j(a),a.files)}catch(k){w.error("Could not create it.",{detail:X(k),source:x}),f=null}if(a.busy=!1,f===null){m();return}r.handle?.close()},N=u(),K=D({actions:{choose:(i)=>{let h=[...i.files??[]];i.value="",c(()=>{a.files=[...a.files,...h]})},closed:()=>{if(d)return;d=!0,A=null,r.handle?.close(),t(f)},confirm:()=>{s()},dragOut:()=>{c(()=>{a.dropActive=!1})},dragOver:()=>{if(!a.dropActive)c(()=>{a.dropActive=!0})},drop:(i)=>{c(()=>{a.dropActive=!1;let h=i?[...i]:[];if(h.length>0)a.kind="media";a.files=[...a.files,...h]})},pickCollection:(i)=>{c(()=>{a.collection=i})},pickComponentStart:(i)=>{if(c(()=>{a.componentStart=i}),i===vm&&o.componentDocs===void 0)Y().then((h)=>{if(o.componentDocs=h,a.copyOf==="")a.copyOf=h.keys().next().value??"";if(!d)m()})},pickLocale:(i)=>{c(()=>{if(a.locale=i,!a.templateChosen)a.pageStart=gS(o,i)})},setLocalized:(i)=>{c(()=>{a.localized=i})},pickCopy:(i)=>{c(()=>{a.copyOf=i})},pickKind:(i)=>{c(()=>{a.kind=i})},pickPageTemplate:(i)=>{c(()=>{a.pageTemplate=i})},pickStart:(i)=>{c(()=>{a.pageStart=i,a.templateChosen=!0})},pickWrap:(i)=>{c(()=>{a.wrap=i})},setName:(i)=>{c(()=>{a.name=i,a.touched=!0})},setOwnPage:(i)=>{c(()=>{a.ownPage=i})},setUrl:(i)=>{c(()=>{a.url=i,a.touched=!0})},toggleUrl:()=>{c(()=>{if(!a.editingUrl)a.url=u().route??"/";a.editingUrl=!a.editingUrl})},togglePreset:(i)=>{c(()=>{let h=_w.find((k)=>k===i);if(h===void 0)return;a.fields=a.fields.includes(h)?a.fields.filter((k)=>k!==h):[...a.fields,h]})}},layer:dt("dialog"),view:O(a,o,N,b(N))});r.handle=K,m()}export{Ye as addCollectionPage,Je as createDirect,Ge as openAddNew};
|
|
1
|
+
import{X}from"./studio-9c6cbq2c.js";import{p}from"./studio-xh6rf05g.js";import{w}from"./studio-bk0anq3b.js";import"./studio-4z0cdh16.js";import{Jt,Ut,Ih}from"./studio-m3jrjfhy.js";import"./studio-zav9hgb3.js";import{sn,nt,dt}from"./studio-cv6gnjqd.js";import{ae}from"./studio-q509sqt8.js";import{jt,Pa,lo,Ma}from"./studio-ex1644g2.js";import{jn,Wt,ln,gr}from"./studio-s49y6m5b.js";import"./studio-x5py815g.js";import{J0}from"./studio-15mfah02.js";import"./studio-wn2cmf9q.js";import"./studio-48yzqzqr.js";import"./studio-k05g7efh.js";import"./studio-pv1ts08p.js";import"./studio-c72v1kwc.js";import{Cr,rc}from"./studio-1d8m5s38.js";import"./studio-qarg1xf9.js";import"./studio-thgexj3w.js";import"./studio-gw83z798.js";import"./studio-z6s56dzz.js";import{us,Jc,La,Qs}from"./studio-td3h1644.js";import"./studio-zzgp5yka.js";import"./studio-j3bq30yz.js";import{ih,Xb}from"./studio-aaw7wxv8.js";import{De,oy}from"./studio-43pynnhz.js";import"./studio-czpmzs9r.js";import"./studio-ek4fb4eb.js";import"./studio-ajfq4fmr.js";import"./studio-6sxnqqw8.js";import"./studio-g65t6svn.js";import"./studio-pgze9p34.js";import{A0,MT,Bw,j0,_i}from"./studio-ze1sm147.js";import"./studio-w3aafbpk.js";import"./studio-bpzwhn88.js";import"./studio-ep1384t9.js";import"./studio-k1wvtp03.js";import{xm}from"./studio-nngc45ct.js";import"./studio-4ncxzw5m.js";import"./studio-pte5w7rf.js";import"./studio-zkkt13qd.js";import{$E,aw}from"./studio-8w5pa88p.js";import{kb,Tw,Us,jc,v0,vm,$w,w0,cT,rl,x0,Hu,_0,mD,dT,wm,Eb,uT,hT,pT,gD,bD,S0}from"./studio-x5ffyssw.js";import{lb}from"./studio-nzp0sqjg.js";import{hb,Rd,Id}from"./studio-s4k1v7dt.js";import{pw,PE}from"./studio-5rq3e4q5.js";import"./studio-vswmz40d.js";import{ql}from"./studio-ph17an19.js";import{KT,Kw}from"./studio-6mf31e16.js";import"./studio-4jy967rj.js";import"./studio-w4mfaaam.js";import{x,wn}from"./studio-zn7ysyzb.js";import{ze,yt,E,I}from"./studio-1a7zshnv.js";import{b}from"./studio-9f5vcb4w.js";import{n,m}from"./studio-erjccagy.js";var R={$schema:"https://jxsuite.com/schema/v1",$id:"StudioAddNew",$description:"Add new: the one dialog that creates a page, a collection, a template, a component, a collection entry or an upload (`specs/studio.md` §9.1.1). One `jx-dialog`, so the platform owns modality, Escape, the backdrop and focus restoration. The kinds run down the left as a radiogroup and the chosen kind's name and options fill the right; the line above the buttons is the derived result, the same `deriveCreation` the write performs, so what it says is what is written. Nothing here composes a path, judges a name or knows a format: `create/add-new-flow.ts` keeps every decision and hands this document rows that are already strings, flags that are already booleans and a refusal that is already a sentence.",tagName:"jx-dialog",$props:{headline:"Add new",confirmLabel:{$ref:"#/state/cta"},confirmDisabled:{$ref:"#/state/blocked"},cancelLabel:"Cancel",size:"lg"},attributes:{part:"add-new","data-kind":"${state.kind}"},onconfirm:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/confirm"},value:[]}]},oncancel:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/closed"},value:[]}]},onclose:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/closed"},value:[]}]},ondragover:{$prototype:"Function",body:[{preventDefault:!0}]},ondrop:{$prototype:"Function",body:[{preventDefault:!0},{operator:"call",target:{$ref:"#/state/drop"},value:[{$ref:"event#/dataTransfer/files"}]}]},style:{$description:"The board's two columns in the kit's scale. The kinds take a fixed gutter so the right side does not move under the reader as they switch kinds, and the options column scrolls on its own so a long template list never pushes the result line and the buttons off the dialog. No part here is named `field`, `label`, `body`, `error`, `text` or `actions`: the kit is light DOM, and `jx-textfield`, `jx-select` and `jx-dialog` each draw internal nodes under those names inside this same tree.",'& [part="sheet"]':{display:"flex",gap:"var(--jx-space-5)",minHeight:"360px"},'& [part="kinds-column"]':{flex:"0 0 208px",display:"flex",flexDirection:"column",gap:"var(--jx-space-3)",borderRight:"1px solid var(--border)",paddingRight:"var(--jx-space-3)"},'& [part="kinds"]':{display:"flex",flexDirection:"column",alignItems:"stretch",gap:"var(--jx-space-1)"},'& [part="kind"]':{display:"block"},'& [part="kind"] > [part="control"]':{$description:"A kind is a row with its own two lines, so the button's box stretches across the gutter and starts its content at the left edge rather than centring an icon.",width:"100%",height:"auto",justifyContent:"flex-start",alignItems:"flex-start",textAlign:"start",padding:"var(--jx-space-2) var(--jx-space-3)",gap:"var(--jx-space-3)"},'& [part="kind-text"]':{display:"flex",flexDirection:"column",gap:"2px"},'& [part="kind-name"]':{fontSize:"var(--jx-text-md)",color:"var(--fg)"},'& [part="kind-hint"], & [part="choice-note"]':{fontSize:"var(--jx-text-sm)",color:"var(--fg-dim)",whiteSpace:"normal"},'& [part="chord-note"], & [part="note"], & [part="kind-intro"], & [part="drop-summary"]':{margin:"0",fontSize:"var(--jx-text-sm)",color:"var(--fg-dim)"},'& [part="chord-note"]':{marginTop:"auto"},'& [part="detail"]':{flex:"1",minWidth:"0",display:"flex",flexDirection:"column",gap:"var(--jx-space-4)",maxHeight:"60vh",overflowY:"auto"},'& [part="options"]':{display:"flex",flexDirection:"column",gap:"var(--jx-space-3)"},'& [part="name-slot"], & [part="options-slot"], & [part="url-slot"], & [part="own-page-slot"], & [part="copy-slot"], & [part="locale-slot"], & [part="localized-slot"]':{$description:"Branch hosts are structure rather than layout: `display: contents` puts what they carry straight into the column, so one gap rule spaces every row whether it is drawn or not.",display:"contents"},'& [part="group-label"]':{margin:"0",fontSize:"var(--jx-text-sm)",color:"var(--fg-dim)"},'& [part="url-row"], & [part="pattern-row"]':{display:"flex",flexWrap:"wrap",alignItems:"center",gap:"var(--jx-space-2)"},'& [part="url-label"]':{fontSize:"var(--jx-text-sm)",color:"var(--fg-dim)"},'& [part="route"], & [part="pattern"]':{fontFamily:"var(--font-mono)",fontSize:"var(--jx-text-sm)",color:"var(--fg)"},'& [part="start-row"]':{display:"flex",flexDirection:"column",gap:"var(--jx-space-2)"},'& [part="start-from"], & [part="wrap-in"], & [part="component-start"]':{display:"flex",flexWrap:"wrap",gap:"var(--jx-space-2)"},'& [part="choice-card"] > [part="control"]':{$description:"A choice is a card with a name and a note, as the board draws it: its own two lines inside one radio, so the reader hears one name and sees both.",minWidth:"132px",height:"auto",flexDirection:"column",alignItems:"flex-start",textAlign:"start",padding:"var(--jx-space-2) var(--jx-space-3)",gap:"2px"},'& [part="choice-name"]':{display:"block",fontSize:"var(--jx-text-md)",color:"var(--fg)"},'& [part="choice-note"]':{display:"block"},'& [part="presets"]':{display:"flex",flexWrap:"wrap",gap:"var(--jx-space-2)"},'& [part="drop"]':{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:"var(--jx-space-2)",minHeight:"200px",padding:"var(--jx-space-5)",border:"1px dashed var(--border)",borderRadius:"var(--radius)",textAlign:"center"},'& [part="drop"][data-drop="true"]':{borderColor:"var(--accent)",background:"var(--accent-10)"},'& [part="drop-title"]':{margin:"0",fontSize:"var(--jx-text-md)",color:"var(--fg)"},'& [part="browse"]':{display:"inline-flex",alignItems:"center",gap:"var(--jx-space-2)",padding:"var(--jx-space-1) var(--jx-space-3)",border:"1px solid var(--border)",borderRadius:"var(--radius)",color:"var(--fg)",cursor:"pointer"},'& [part="browse"]:focus-within':{outline:"var(--jx-focus-ring)",outlineOffset:"2px"},'& [part="browse-input"]':{$description:"Visually hidden, never `display: none`: the input is the control, and a hidden-from-layout one cannot take focus from the keyboard. The label around it is what is drawn and what is clicked.",position:"absolute",width:"1px",height:"1px",opacity:"0",overflow:"hidden"},'& [part="saved"]':{margin:"0",paddingTop:"var(--jx-space-3)",borderTop:"1px solid var(--border)",fontSize:"var(--jx-text-sm)",color:"var(--fg-dim)",overflowWrap:"anywhere"}},children:[{tagName:"div",attributes:{part:"sheet"},children:[{tagName:"div",attributes:{part:"kinds-column"},children:[{tagName:"jx-action-group",attributes:{part:"kinds"},$props:{selects:"single",label:"What to create",orientation:"vertical",compact:!1},children:[{$prototype:"Array",items:{$ref:"#/state/kinds"},key:{$ref:"$map/item/id"},map:{tagName:"jx-action-button",attributes:{part:"kind","data-kind":"${$map.item.id}"},$props:{label:{$ref:"$map/item/label"},icon:{$ref:"$map/item/icon"},checked:{$ref:"$map/item/checked"}},onclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/pickKind"},value:[{$ref:"$map/item/id"}]}]},children:[{tagName:"span",attributes:{part:"kind-text"},children:[{tagName:"span",attributes:{part:"kind-name"},textContent:"${$map.item.label}"},{tagName:"span",attributes:{part:"kind-hint"},textContent:"${$map.item.hint}"}]}]}}]},{tagName:"p",attributes:{part:"chord-note"},textContent:"${state.chordNote}"}]},{tagName:"section",attributes:{part:"detail","aria-label":"${state.kindLabel}"},children:[{tagName:"p",attributes:{part:"kind-intro"},textContent:"${state.kindHint}"},{tagName:"div",attributes:{part:"name-slot",role:"none"},$switch:{$ref:"#/state/named"},cases:{true:{tagName:"jx-field",attributes:{part:"name-row"},$props:{span:!0,label:{$ref:"#/state/nameLabel"},invalid:{$ref:"#/state/invalid"}},children:[{tagName:"jx-textfield",attributes:{part:"name"},$props:{value:{$ref:"#/state/name"},placeholder:{$ref:"#/state/placeholder"},invalid:{$ref:"#/state/invalid"},error:{$ref:"#/state/error"},required:!0,autocomplete:"off"},oninput:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/setName"},value:[{$ref:"event#/target/value"}]}]},onkeydown:{$prototype:"Function",body:[{$switch:{$ref:"event#/key"},cases:{Enter:[{preventDefault:!0},{operator:"call",target:{$ref:"#/state/confirm"},value:[]}]}}]}}]}}},{tagName:"div",attributes:{part:"options-slot",role:"none"},$switch:{$ref:"#/state/kind"},cases:{page:{tagName:"div",attributes:{part:"options",role:"none"},children:[{tagName:"div",attributes:{part:"locale-slot",role:"none"},$switch:{$ref:"#/state/localeShown"},cases:{true:{tagName:"jx-field",attributes:{part:"locale-row"},$props:{span:!0,label:"Language"},children:[{tagName:"jx-select",attributes:{part:"locale"},$props:{size:"sm",label:"Language",options:{$ref:"#/state/localeOptions"},value:{$ref:"#/state/locale"}},onchange:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/pickLocale"},value:[{$ref:"event#/target/value"}]}]}}]}}},{tagName:"div",attributes:{part:"url-row"},children:[{tagName:"span",attributes:{part:"url-label"},textContent:"URL"},{tagName:"code",attributes:{part:"route"},textContent:"${state.route}"},{tagName:"jx-action-button",attributes:{part:"edit-url"},$props:{label:"Edit URL",toggles:!0,selected:{$ref:"#/state/editingUrl"},size:"sm"},onchange:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/toggleUrl"},value:[]}]},children:[{tagName:"span",textContent:"Edit"}]}]},{tagName:"div",attributes:{part:"url-slot",role:"none"},$switch:{$ref:"#/state/editingUrl"},cases:{true:{tagName:"jx-field",attributes:{part:"url-row-field"},$props:{span:!0,label:"URL"},children:[{tagName:"jx-textfield",attributes:{part:"url"},$props:{size:"sm",mono:!0,value:{$ref:"#/state/url"},placeholder:"/pricing"},oninput:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/setUrl"},value:[{$ref:"event#/target/value"}]}]},onkeydown:{$prototype:"Function",body:[{$switch:{$ref:"event#/key"},cases:{Enter:[{preventDefault:!0},{operator:"call",target:{$ref:"#/state/confirm"},value:[]}]}}]}}]}}},{tagName:"div",attributes:{part:"start-row"},children:[{tagName:"p",attributes:{part:"group-label"},textContent:"Start from"},{tagName:"jx-action-group",attributes:{part:"start-from"},$props:{selects:"single",label:"Start from",compact:!1},children:[{$prototype:"Array",items:{$ref:"#/state/startChoices"},key:{$ref:"$map/item/value"},map:{tagName:"jx-action-button",attributes:{part:"choice-card","data-value":"${$map.item.value}"},$props:{label:{$ref:"$map/item/label"},checked:{$ref:"$map/item/checked"},disabled:{$ref:"$map/item/disabled"},hint:{$ref:"$map/item/reason"},quiet:!1},onclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/pickStart"},value:[{$ref:"$map/item/value"}]}]},children:[{tagName:"span",attributes:{part:"choice-name"},textContent:"${$map.item.label}"},{tagName:"span",attributes:{part:"choice-note"},textContent:"${$map.item.note}"}]}}]}]}]},collection:{tagName:"div",attributes:{part:"options",role:"none"},children:[{tagName:"p",attributes:{part:"group-label"},textContent:"Each ${state.itemNoun} has"},{tagName:"jx-action-group",attributes:{part:"presets"},$props:{selects:"multiple",label:"Fields",compact:!1},children:[{$prototype:"Array",items:{$ref:"#/state/presets"},key:{$ref:"$map/item/id"},map:{tagName:"jx-action-button",attributes:{part:"preset","data-preset":"${$map.item.id}"},$props:{label:{$ref:"$map/item/label"},toggles:!0,selected:{$ref:"$map/item/selected"},quiet:!1,size:"sm",icon:{$ref:"$map/item/icon"}},onchange:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/togglePreset"},value:[{$ref:"$map/item/id"}]}]},children:[{tagName:"span",textContent:"${$map.item.label}"}]}}]},{tagName:"p",attributes:{part:"note"},textContent:"You can add or change fields later."},{tagName:"div",attributes:{part:"localized-slot",role:"none"},$switch:{$ref:"#/state/localizable"},cases:{true:{tagName:"jx-checkbox",attributes:{part:"localized"},$props:{checked:{$ref:"#/state/localized"}},onchange:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/setLocalized"},value:[{$ref:"event#/target/checked"}]}]},children:[{tagName:"span",textContent:"One folder per language (${state.localeSummary})"}]}}},{tagName:"jx-checkbox",attributes:{part:"own-page"},$props:{checked:{$ref:"#/state/ownPage"}},onchange:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/setOwnPage"},value:[{$ref:"event#/target/checked"}]}]},children:[{tagName:"span",textContent:"Give each ${state.itemNoun} its own page"}]},{tagName:"div",attributes:{part:"own-page-slot",role:"none"},$switch:{$ref:"#/state/ownPage"},cases:{true:{tagName:"div",attributes:{part:"pattern-row"},children:[{tagName:"span",attributes:{part:"url-label"},textContent:"at"},{tagName:"code",attributes:{part:"pattern"},textContent:"${state.pattern}"},{tagName:"span",attributes:{part:"url-label"},textContent:"using"},{tagName:"jx-select",attributes:{part:"page-template"},$props:{size:"sm",label:"Template for each page",options:{$ref:"#/state/templateOptions"},value:{$ref:"#/state/pageTemplate"}},onchange:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/pickPageTemplate"},value:[{$ref:"event#/target/value"}]}]}}]}}}]},template:{tagName:"div",attributes:{part:"options",role:"none"},children:[{tagName:"p",attributes:{part:"group-label"},textContent:"Wrap it in"},{tagName:"jx-action-group",attributes:{part:"wrap-in"},$props:{selects:"single",label:"Wrap it in",compact:!1},children:[{$prototype:"Array",items:{$ref:"#/state/wrapChoices"},key:{$ref:"$map/item/value"},map:{tagName:"jx-action-button",attributes:{part:"choice-card","data-value":"${$map.item.value}"},$props:{label:{$ref:"$map/item/label"},checked:{$ref:"$map/item/checked"},disabled:{$ref:"$map/item/disabled"},hint:{$ref:"$map/item/reason"},quiet:!1},onclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/pickWrap"},value:[{$ref:"$map/item/value"}]}]},children:[{tagName:"span",attributes:{part:"choice-name"},textContent:"${$map.item.label}"},{tagName:"span",attributes:{part:"choice-note"},textContent:"${$map.item.note}"}]}}]},{tagName:"p",attributes:{part:"note"},textContent:"Pages placed in this template fill its Content area. You can add more named areas later."}]},component:{tagName:"div",attributes:{part:"options",role:"none"},children:[{tagName:"p",attributes:{part:"group-label"},textContent:"Start from"},{tagName:"jx-action-group",attributes:{part:"component-start"},$props:{selects:"single",label:"Start from",compact:!1},children:[{$prototype:"Array",items:{$ref:"#/state/componentChoices"},key:{$ref:"$map/item/value"},map:{tagName:"jx-action-button",attributes:{part:"choice-card","data-value":"${$map.item.value}"},$props:{label:{$ref:"$map/item/label"},checked:{$ref:"$map/item/checked"},disabled:{$ref:"$map/item/disabled"},hint:{$ref:"$map/item/reason"},quiet:!1},onclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/pickComponentStart"},value:[{$ref:"$map/item/value"}]}]},children:[{tagName:"span",attributes:{part:"choice-name"},textContent:"${$map.item.label}"},{tagName:"span",attributes:{part:"choice-note"},textContent:"${$map.item.note}"}]}}]},{tagName:"div",attributes:{part:"copy-slot",role:"none"},$switch:{$ref:"#/state/copying"},cases:{true:{tagName:"jx-field",attributes:{part:"copy-row"},$props:{span:!0,label:"Copy of"},children:[{tagName:"jx-select",attributes:{part:"copy-of"},$props:{size:"sm",label:"Component to copy",options:{$ref:"#/state/copyOptions"},value:{$ref:"#/state/copyOf"}},onchange:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/pickCopy"},value:[{$ref:"event#/target/value"}]}]}}]}}},{tagName:"p",attributes:{part:"note"},textContent:"It appears under Components in the Site panel, ready to drag onto any page."}]},entry:{tagName:"div",attributes:{part:"options",role:"none"},children:[{tagName:"jx-field",attributes:{part:"collection-row"},$props:{span:!0,label:"Collection"},children:[{tagName:"jx-select",attributes:{part:"collection"},$props:{size:"sm",label:"Collection",options:{$ref:"#/state/collectionOptions"},value:{$ref:"#/state/collection"}},onchange:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/pickCollection"},value:[{$ref:"event#/target/value"}]}]}}]},{tagName:"div",attributes:{part:"locale-slot",role:"none"},$switch:{$ref:"#/state/localeShown"},cases:{true:{tagName:"jx-field",attributes:{part:"locale-row"},$props:{span:!0,label:"Language"},children:[{tagName:"jx-select",attributes:{part:"locale"},$props:{size:"sm",label:"Language",options:{$ref:"#/state/localeOptions"},value:{$ref:"#/state/locale"}},onchange:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/pickLocale"},value:[{$ref:"event#/target/value"}]}]}}]}}}]},media:{tagName:"div",attributes:{part:"drop","data-drop":"${state.dropActive}"},ondragover:{$prototype:"Function",body:[{preventDefault:!0},{operator:"call",target:{$ref:"#/state/dragOver"},value:[]}]},ondragleave:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/dragOut"},value:[]}]},children:[{tagName:"jx-icon",attributes:{part:"drop-glyph"},$props:{name:"upload-simple"}},{tagName:"p",attributes:{part:"drop-title"},textContent:"Drop images, video or documents"},{tagName:"label",attributes:{part:"browse"},children:[{tagName:"input",attributes:{part:"browse-input",type:"file",multiple:!0,accept:"${state.uploadAccept}"},onchange:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/choose"},value:[{$ref:"event#/target"}]}]}},{tagName:"span",textContent:"Browse files"}]},{tagName:"p",attributes:{part:"drop-summary"},textContent:"${state.fileSummary}"}]}}}]}]},{tagName:"p",attributes:{part:"saved","aria-live":"polite"},textContent:"${state.saved}"}]};E("add-new",R);function T(e){return{...e,blocked:!e.canConfirm,invalid:e.error!=="",named:e.kind!=="media"}}function z(e){let t=document.createElement("div");t.style.pointerEvents="auto",t.setAttribute(ze,yt("dialog","add-new")),e.layer.append(t);let r=!1,o=()=>{if(r)return;r=!0,e.actions.closed()},l=()=>r,{actions:a}=e,d=b({...T(e.view),choose:a.choose,closed:o,confirm:a.confirm,dragOut:a.dragOut,dragOver:a.dragOver,drop:a.drop,pickCollection:a.pickCollection,pickComponentStart:a.pickComponentStart,pickCopy:a.pickCopy,pickKind:a.pickKind,pickLocale:a.pickLocale,pickPageTemplate:a.pickPageTemplate,pickStart:a.pickStart,pickWrap:a.pickWrap,setName:(u)=>{d.name=u,a.setName(u)},setLocalized:a.setLocalized,setOwnPage:a.setOwnPage,setUrl:(u)=>{d.url=u,a.setUrl(u)},toggleUrl:a.toggleUrl,togglePreset:a.togglePreset}),g=null,f=()=>{setTimeout(()=>{let u=g?.root;if(r||!(u instanceof HTMLElement))return;let c=u.querySelector('jx-textfield[part="name"]');if(c)Ih(c,"all")},0)},v=I("add-new",d,t).then(async(u)=>{g=u;let c=u.root;if(l())return u.dispose(),c;if(await sn(c),l())return c;if(Jt(c),d.named)f();return c});return{close(){let u=g?.root;if(u instanceof HTMLElement)Ut(u);g?.dispose(),g=null,t.remove(),o()},host:t,ready:v,update(u){Object.assign(d,T(u))}}}var N="Add new";async function W(){return(await $E()).map((t)=>({name:t.name,ref:t.path})).toSorted((t,r)=>t.name.localeCompare(r.name))}function _(){for(let e of A0("page")){if(e.ext===".json")continue;let t=Pa(e.ext,"serialize");if(t)return{ext:e.ext,name:t.name}}return null}function B(){let e=lo(),t=e?.extensions[0];return e&&t?{ext:t,name:e.name}:null}function J(){return ln(x?.projectConfig??{}).i18n}async function V(e){let t={},{i18n:r}=ln(x?.projectConfig??{});for(let o of await J0(e)){let l=jn(gr(o,r));if(l!==null)t[l]=o}return t}async function L(){await jt().catch(()=>{});let e=await Promise.all(Kw().map(async(t)=>{let r={dir:t.dir,ext:t.ext,formatName:S0(t),name:t.name,schema:t.schema};if(Eb(t))r.localeDirs=await V(t);return r}));return{i18n:J(),article:_(),collections:e,componentTags:De.map((t)=>t.tagName),copyableTags:De.filter((t)=>D(t)).map((t)=>t.tagName),contentFormat:B(),declaredContent:KT(),defaultLayout:x?.projectConfig?.defaults?.layout??null,hasSelection:pw()!==null,layouts:await W()}}function D(e){let{path:t}=e;return n(t)&&e.source!=="npm"&&t.endsWith(".json")}async function Y(){let e=new Map;for(let t of De){let{path:r}=t;if(!D(t)||!n(r))continue;try{let o=JSON.parse(await p().readFile(r));if(m(o))e.set(t.tagName,o)}catch{}}return e}function U(e,t){let r=e.trim();if(r===Us||r==="none"||r==="")return Us;if(r===jc)return jc;let o=rl(r);return t.find((a)=>rl(a.ref)===o||rl(a.ref)===`layouts/${o}`||rl(a.ref)===`layouts/${o}.json`||a.name.toLowerCase()===r.toLowerCase())?.ref??null}function G(e,t){let r={};if(e.collection!==void 0)r.collection=e.collection;if(e.locale!==void 0){if(wm(e.locale,t)===null){let o=t.i18n?.locales??[];throw RangeError(`command "file.new" argument "locale": "${e.locale}" is not a language this `+`project declares — declared: ${o.length===0?"none":o.join(", ")}`)}r.locale=e.locale}if(e.template!==void 0){let o=U(e.template,t.layouts);if(o===null){let l=t.layouts.map((a)=>rl(a.ref));throw RangeError(`command "file.new" argument "template": "${e.template}" names no template — `+`declared: ${[Us,jc,...l].join(", ")}`)}if(e.kind==="collection")r.pageTemplate=o===jc?Us:o;else if(e.kind==="template")r.startFrom=o===Us||o===jc?"":o;else r.startFrom=o}return r}async function Q(e){if(e.format===null)return Cr(e.doc,null);return Ma(e.format,e.doc,{frontmatter:e.frontmatter??!0,mode:"roundtrip"})}async function F(e,t,r=!1){for(let o of gD(pT(e)))await Promise.all(o.map(async(l)=>{if(!r&&t.has(l))return;t.set(l,bD(l,t)?new Set:await Bw(l))}))}function S(e){if(lb(e),Id(),e.some((t)=>t.startsWith("pages/")))Xb(),hb();MT(e).then((t)=>{if(t)Id(),wn("leftPanel")})}async function P(e,t,r){let o;try{o=await Q(t)}catch(l){throw w.error(`Could not prepare ${e}.`,{detail:X(l),path:e,source:N}),Error(`could not prepare ${e}`,{cause:l})}if(await j0(e,o,{quiet:r,source:N})===null)throw Error(`could not write ${e}`)}async function Z(e){let t=e.config,r=x?.projectConfig?.content,o=m(r)?{...r}:{};if(o[t.name]=t.entry,!(await rc({content:o})).ok)return null;let a=["project.json"],d=[];for(let f of[{body:e.content,path:e.path},...e.extraWrites])try{await P(f.path,f.body,!0),a.push(f.path)}catch{d.push(f.path)}if(d.length===0)w.success(`Created the ${t.name} collection`);else w.warn(`Created the ${t.name} collection, but ${d.join(" and ")} could not be written.`,{source:N});S(a),xm(t.name),nt("content.showCollection",{collection:t.name},N);let g={kind:"collection",path:`content/${t.name}`,wrote:a};if(e.route!==void 0)g.route=e.route;return g}async function M(e,t,r){if(e.kind==="media"){let l=await Qs(r,{dir:La,only:"media"});if(l.length===0)return null;let a=l.map((d)=>d.path);return S(a),nt("media.browse",{select:l[0].path},N),{kind:"media",path:La,wrote:a}}if(e.kind==="collection")return Z(e);let o={kind:e.kind,path:e.path,wrote:[e.path]};if(e.route!==void 0)o.route=e.route;if(e.tag!==void 0)o.tag=e.tag;if(e.kind==="component"&&t.startFrom===v0){let l=await PE(e.tag);if(l===null)return null;return S([l]),await _i(l),o}try{await P(e.path,e.content,!1)}catch{return null}switch(S([e.path]),e.kind){case"component":{oy(e.path,e.content.doc),await _i(e.path);break}case"template":{aw(),await _i(e.path);break}case"entry":{if(t.collection!==void 0)xm(t.collection);await ql(e.path);break}default:await _i(e.path)}return o}async function Ve(e){let t=e.kind??"page";if(t==="media")throw RangeError('command "file.new": Media is uploaded, not named; run file.new { kind: "media" } with no name to open the upload drop zone.');let r=await L(),o=G({...e,kind:t},r);if(t==="entry"&&o.collection===void 0&&r.collections.length===1)o.collection=r.collections[0].name;let l=uT(t,e.name,o,r),a=new Map;await F(l,a,!0);let d=hT(l,e.name,o,r,(f)=>a.get(f));if(d!=="")throw RangeError(`command "file.new": ${d}`);let g=await M(l,o,[]);if(g===null)throw Error(`file.new could not create ${l.path}; the reason is in Problems.`);return g}async function Ye(e){let t=await L(),r=t.collections.find((f)=>f.name===e);if(!r)return w.error(`"${e}" is not a collection this project declares.`,{source:N}),null;let o=`pages/${us(e)||e}`,l=`${o}/[slug].json`;if((await Bw(o)).has("[slug].json"))return w.error(`${l} already exists.`,{detail:"Open it in Design and point its $paths at this collection, or rename it first.",path:l,source:N}),null;let d=mD(r.schema,r.formatName!==null),g=dT(e,d,x0(Hu(t),t),t);try{await P(l,{doc:g,format:null},!1)}catch{return null}return S([l]),l}function j(e){switch(e.kind){case"page":{let t={startFrom:e.pageStart};if(e.editingUrl)t.url=e.url;if(e.locale!=="")t.locale=e.locale;return t}case"template":return{startFrom:e.wrap};case"component":{let t={startFrom:e.componentStart};if(e.componentStart===vm&&e.copyOf!=="")t.copyOf=e.copyOf;return t}case"collection":return{fields:e.fields,localized:e.localized,ownPage:e.ownPage,pageTemplate:e.pageTemplate};case"entry":{let t={};if(e.collection!=="")t.collection=e.collection;if(e.locale!=="")t.locale=e.locale;return t}default:return{files:e.files.length}}}function y(e,t,r,o,l=""){return{checked:e===o?"true":"false",disabled:l!=="",label:t,note:r,reason:l,value:e}}function q(e,t){let r=t.layouts.map((o)=>y(o.ref,o.name,t.defaultLayout!==null&&rl(o.ref)===rl(t.defaultLayout)?"the site's default":"a template",e.pageStart));if(t.article!==null)r.push(y(jc,"Article","mostly writing",e.pageStart));return r.push(y(Us,"Blank","no template",e.pageStart)),r}function ee(){let e=pw();if(!e)return"nothing selected";let r=1+(Array.isArray(e.node.children)?e.node.children.length:0);return r===1?"1 element":`${r} elements`}function te(){let e=ae()?.keymap,t=e?.bindingsFor("file.new")??[];if(!e||t.length===0)return"";let[r,...o]=t.map((l)=>e.format(l));return o.length===0?`${r} opens this anywhere.`:`${r} opens this in the desktop app, ${o.join(" or ")} anywhere.`}function O(e,t,r,o){let l=Tw[e.kind],a=kb.filter((s)=>s!=="entry"||t.collections.length>0).map((s)=>({checked:s===e.kind?"true":"false",hint:Tw[s].hint,icon:Tw[s].icon,id:s,label:Tw[s].label})),d=r.config?.name??"",g=ih(d===""?"items":d),f=t.i18n?.locales??[],v=t.collections.find((s)=>s.name===e.collection),u=f.length>0&&(e.kind==="page"||e.kind==="entry"&&v!==void 0&&Eb(v)),c=[...t.layouts.map((s)=>({label:s.name,value:s.ref})),{label:"No template",value:Us}];return{canConfirm:o===""&&!e.busy,chordNote:te(),collection:e.collection,collectionOptions:t.collections.map((s)=>({label:Rd(s.name),value:s.name})),componentChoices:[y("blank","Blank","an empty block",e.componentStart),y(v0,"Current selection",ee(),e.componentStart,t.hasSelection===!0?"":"Select an element on the canvas first."),y(vm,"Copy of…","an existing one",e.componentStart,(t.copyableTags??[]).length>0?"":"This project has no components of its own to copy yet.")],copyOf:e.copyOf,copyOptions:[...t.componentDocs?.keys()??[]].map((s)=>({label:`<${s}>`,value:s})),copying:e.componentStart===vm,cta:l.cta,dropActive:e.dropActive?"true":"false",editingUrl:e.editingUrl,error:e.touched||e.kind==="media"?e.kind==="media"?"":o:"",fileSummary:e.files.length===0?"":e.files.map((s)=>s.name).join(", "),itemNoun:g,kind:e.kind,kindHint:l.hint,kindLabel:l.label,kinds:a,locale:e.locale,localeOptions:f.map((s)=>({label:Wt(s),value:s})),localeShown:u,localeSummary:f.join(", "),localizable:f.length>0,localized:e.localized,name:e.name,nameLabel:l.nameLabel,ownPage:e.ownPage,pageTemplate:e.pageTemplate,pattern:r.route??`/${d===""?"items":d}/:slug`,placeholder:l.placeholder,presets:$w.filter((s)=>s!=="richText"||t.contentFormat!==null).map((s)=>{let k=e.fields.includes(s);return{icon:k?"check":"plus",id:s,label:w0[s].label,selected:k}}),route:r.route===void 0||r.route===""?"/":r.route,saved:r.saved,startChoices:q(e,t),templateOptions:c,uploadAccept:Jc(),url:e.url,wrapChoices:[...t.layouts.map((s)=>y(s.ref,s.name,"keeps its frame around this one",e.wrap)),y("","Nothing","a fresh frame",e.wrap)]}}function oe(e,t){let r=e.kind??"page";return r==="entry"&&t.collections.length===0?"page":r}var A=null;function Ge(e={}){if(A)return A.done;let t,r=new Promise((l)=>{t=l}),o={done:r,handle:null};return A=o,ne(e,t,o),r}async function ne(e,t,r){let o=await L(),l=new Map,a={busy:!1,collection:e.collection??o.collections[0]?.name??"",locale:wm(e.locale,o)??o.i18n?.defaultLocale??"",localized:o.i18n!==null&&o.i18n!==void 0,componentStart:"blank",copyOf:"",dropActive:!1,editingUrl:!1,fields:[...cT],files:[],kind:oe(e,o),name:e.name??"",ownPage:!0,pageStart:_0(o,wm(e.locale,o)??o.i18n?.defaultLocale??""),pageTemplate:Hu(o),templateChosen:e.template!==void 0,touched:(e.name??"")!=="",url:"",wrap:Hu(o)===Us?"":Hu(o)};if(e.template!==void 0){let i=U(e.template,o.layouts);if(i!==null)a.pageStart=i,a.pageTemplate=i===jc?Us:i,a.wrap=i===Us||i===jc?"":i}if(o.contentFormat===null)a.fields=a.fields.filter((i)=>i!=="richText");let d=!1,g=null,f=()=>uT(a.kind,a.name,j(a),o),v=(i)=>hT(i,a.name,j(a),o,(h)=>l.get(h)),u=()=>{let i=f();if(r.handle?.update(O(a,o,i,v(i))),pT(i).some((h)=>!l.has(h)))F(i,l).then(()=>{if(!d){let h=f();r.handle?.update(O(a,o,h,v(h)))}})},c=(i)=>{i(),u()},s=async()=>{if(a.busy)return;a.touched=!0;let i=f();if(await F(i,l,!0),v(i)!==""){u();return}a.busy=!0,u();try{g=await M(i,j(a),a.files)}catch(C){w.error("Could not create it.",{detail:X(C),source:N}),g=null}if(a.busy=!1,g===null){u();return}r.handle?.close()},k=f(),K=z({actions:{choose:(i)=>{let h=[...i.files??[]];i.value="",c(()=>{a.files=[...a.files,...h]})},closed:()=>{if(d)return;d=!0,A=null,r.handle?.close(),t(g)},confirm:()=>{s()},dragOut:()=>{c(()=>{a.dropActive=!1})},dragOver:()=>{if(!a.dropActive)c(()=>{a.dropActive=!0})},drop:(i)=>{c(()=>{a.dropActive=!1;let h=i?[...i]:[];if(h.length>0)a.kind="media";a.files=[...a.files,...h]})},pickCollection:(i)=>{c(()=>{a.collection=i})},pickComponentStart:(i)=>{if(c(()=>{a.componentStart=i}),i===vm&&o.componentDocs===void 0)Y().then((h)=>{if(o.componentDocs=h,a.copyOf==="")a.copyOf=h.keys().next().value??"";if(!d)u()})},pickLocale:(i)=>{c(()=>{if(a.locale=i,!a.templateChosen)a.pageStart=_0(o,i)})},setLocalized:(i)=>{c(()=>{a.localized=i})},pickCopy:(i)=>{c(()=>{a.copyOf=i})},pickKind:(i)=>{c(()=>{a.kind=i})},pickPageTemplate:(i)=>{c(()=>{a.pageTemplate=i})},pickStart:(i)=>{c(()=>{a.pageStart=i,a.templateChosen=!0})},pickWrap:(i)=>{c(()=>{a.wrap=i})},setName:(i)=>{c(()=>{a.name=i,a.touched=!0})},setOwnPage:(i)=>{c(()=>{a.ownPage=i})},setUrl:(i)=>{c(()=>{a.url=i,a.touched=!0})},toggleUrl:()=>{c(()=>{if(!a.editingUrl)a.url=f().route??"/";a.editingUrl=!a.editingUrl})},togglePreset:(i)=>{c(()=>{let h=$w.find((C)=>C===i);if(h===void 0)return;a.fields=a.fields.includes(h)?a.fields.filter((C)=>C!==h):[...a.fields,h]})}},layer:dt("dialog"),view:O(a,o,k,v(k))});r.handle=K,u()}export{Ye as addCollectionPage,Ve as createDirect,Ge as openAddNew};
|
|
2
2
|
|
|
3
|
-
//# debugId=
|
|
4
|
-
//# sourceMappingURL=add-new-flow-
|
|
3
|
+
//# debugId=7A4DC1D50488C86264756E2164756E21
|
|
4
|
+
//# sourceMappingURL=add-new-flow-any4pw2q.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{X}from"./studio-9c6cbq2c.js";import{p,
|
|
1
|
+
import{X}from"./studio-9c6cbq2c.js";import{p,ve}from"./studio-xh6rf05g.js";import"./studio-bk0anq3b.js";import"./studio-4z0cdh16.js";import{Jt,Ut}from"./studio-m3jrjfhy.js";import"./studio-zav9hgb3.js";import{sn,dt}from"./studio-cv6gnjqd.js";import"./studio-q509sqt8.js";import"./studio-pgze9p34.js";import"./studio-c72v1kwc.js";import"./studio-35pmfjtx.js";import"./studio-pv1ts08p.js";import{hm}from"./studio-j52ks8q7.js";import{ze,yt,E,I}from"./studio-1a7zshnv.js";import{b}from"./studio-9f5vcb4w.js";var d={$schema:"https://jxsuite.com/schema/v1",$id:"StudioCfAccountPicker",$description:"The Cloudflare account picker: which of the accounts this grant reaches should publishing and the assistant run against. A `jx-dialog`, so the platform owns modality, Escape, focus restoration and the backdrop — which is what retired the `sp-dialog-wrapper` this surface used to open by hand, along with the focus trap and the `aria-modal` slot `showDialog` wrapped around it. There is no confirming button: each row commits itself, because a picker whose answer is one of N rows has N answers rather than one. The adapter (`surfaces/cf-account-picker.ts`) hands in rows that are already strings and booleans — nothing here knows what `cf_account_required` is, which call refused, or whether the list came back empty because the grant reaches nothing or because Cloudflare could not be reached.",tagName:"jx-dialog",$props:{headline:"Choose a Cloudflare account",confirmLabel:"",cancelLabel:"Cancel",size:"sm"},attributes:{part:"cf-accounts"},oncancel:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/closed"},value:[]}]},onclose:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/closed"},value:[]}]},style:{$description:"The picker's own look. Four `.cf-account-picker*` rules in `styles/shell.css` become the parts below and one of them does not come with them: `min-width: 320px` was this surface sizing its own box, and `jx-dialog` is what sizes a dialog now — `sm` is `min(90vw, 24rem)`, which is wider than the 320px it asked for. The row shape came from `.prefs-account`, which the lit template BORROWED from Preferences › Accounts; it is copied here rather than shared, because a class in a stylesheet is a thing two surfaces can drift apart on and `preferences-dialog.ts` still draws its own rows from it. Three token repairs travel with them: `--spectrum-font-size-75` and `--spectrum-font-size-50` resolve only inside `<sp-theme>`, and a document mounted in the dialog layer is outside it, so every one of them would silently have taken its hard-coded fallback.",'& [part="picker"]':{display:"flex",flexDirection:"column",gap:"var(--jx-space-4)"},'& [part="intro"], & [part="empty"]':{$description:"The lede and the two absences read as the same secondary line, so they are one rule: the sentence over the list and the sentence drawn instead of it are the same voice.",margin:"0",fontSize:"var(--jx-text-md)",color:"var(--fg-dim)"},'& [part="failure"]':{$description:'A commit the broker refused, said above the list the reader is still looking at. It is not an announcement of the same thing twice: the list survives a refusal, because listing again is not what would fix an account Cloudflare will not accept, so the reason has to sit beside the rows that are still on offer. It is `failure` rather than `error` because every kit field draws a permanent, empty `[part="error"]` of its own, and the kit is light DOM: a rule on that name here would reach any field this dialog ever holds.',margin:"0",fontSize:"var(--jx-text-md)",color:"var(--danger)"},'& [part="fail"]':{$description:"The one state that offers a verb of its own. Retrying is right for a listing that never landed and wrong for a grant that genuinely reaches nothing, so the button lives in this branch rather than under both.",display:"flex",flexDirection:"column",alignItems:"flex-start",gap:"var(--jx-space-3)"},'& [part="list"]':{display:"flex",flexDirection:"column",gap:"var(--jx-space-2)"},'& [part="row"]':{display:"flex",alignItems:"center",justifyContent:"space-between",gap:"var(--jx-space-4)",padding:"var(--jx-space-3)",border:"1px solid var(--border)",borderRadius:"var(--radius)"},'& [part="text"]':{$description:"`min-width: 0` lets the column shrink below its content, so the name and id reflow inside the row instead of pushing its own button off the end of it; what lets them reflow is their own `overflow-wrap`. Nothing here ellipsizes. Unlike Preferences › Accounts, the row does not wrap its button onto a line of its own: in an `sm` dialog the arithmetic (a 120px basis, the gap and a 105px button against a 236px row) would wrap every row at rest.",display:"flex",flexDirection:"column",gap:"var(--jx-space-1)",minWidth:"0"},'& [part="name"]':{$description:"`overflow-wrap: anywhere` because Cloudflare names a new account after the email that opened it (`name@example.com's Account`), and an address has no break opportunity in it.",color:"var(--fg)",overflowWrap:"anywhere"},'& [part="detail"]':{$description:"The account id under the name. Two Cloudflare accounts may carry the same name and the id is what is stored, so the row shows both rather than the half a reader would have to guess from. `overflow-wrap: anywhere` because the id is 32 hex digits with no break opportunity: it measured 203px in a 119px column and ran under the row's own button. It reflows rather than ellipsizing, because the id is the half that tells two same-named accounts apart.",fontSize:"var(--jx-text-sm)",color:"var(--fg-dim)",overflowWrap:"anywhere"}},children:[{tagName:"div",attributes:{part:"picker"},children:[{tagName:"p",attributes:{part:"intro"},textContent:"Your Cloudflare login reaches more than one account. Publishing and the assistant both run against the one you pick; you can change it in Preferences › Accounts."},{tagName:"div",attributes:{part:"body-slot",role:"none"},style:{display:"contents"},$switch:{$ref:"#/state/listState"},cases:{loading:{tagName:"p",attributes:{part:"empty"},textContent:"Reading your Cloudflare accounts…"},empty:{tagName:"p",attributes:{part:"empty"},textContent:"This Cloudflare login reaches no accounts. Create one at dash.cloudflare.com, then try again."},failed:{tagName:"div",attributes:{part:"fail"},children:[{tagName:"p",attributes:{part:"empty"},textContent:"${state.failureMessage}"},{tagName:"jx-button",attributes:{part:"retry"},$props:{size:"sm"},onclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/retry"},value:[]}]},children:[{tagName:"span",textContent:"Try again"}]}]},listed:{tagName:"div",attributes:{part:"listed",role:"none"},style:{display:"contents"},children:[{tagName:"div",attributes:{part:"failure-slot",role:"none"},style:{display:"contents"},$switch:{$ref:"#/state/hasFailure"},cases:{true:{tagName:"p",attributes:{part:"failure"},textContent:"${state.failure}"}}},{tagName:"div",attributes:{part:"list"},children:[{$prototype:"Array",items:{$ref:"#/state/rows"},key:{$ref:"$map/item/id"},map:{tagName:"div",attributes:{part:"row","data-account":"${$map.item.id}"},children:[{tagName:"div",attributes:{part:"text"},children:[{tagName:"span",attributes:{part:"name"},textContent:"${$map.item.name}"},{tagName:"span",attributes:{part:"detail"},textContent:"${$map.item.id}"}]},{tagName:"jx-button",attributes:{part:"choose"},$props:{size:"sm",variant:"accent",disabled:{$ref:"$map/item/busy"}},onclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/choose"},value:[{$ref:"$map/item/id"}]}]},children:[{tagName:"span",textContent:"${$map.item.label}"}]}]}}]}]}}}]}]};E("cf-account-picker",d);function h(t){let a=t.choosing!=="";return{...t,failureMessage:`Cloudflare could not be reached: ${t.failure}`,hasFailure:t.failure!=="",listState:t.loading?"loading":t.accounts.length>0?"listed":t.failure!==""?"failed":"empty",rows:t.accounts.map((o)=>({busy:a,id:o.id,label:t.choosing===o.id?"Selecting…":"Use this account",name:o.name}))}}function f(t){let a=document.createElement("div");a.style.pointerEvents="auto",a.setAttribute(ze,yt("dialog","cf-accounts")),t.layer.append(a);let o=!1,s=()=>{if(o)return;o=!0,t.onClosed()},u=()=>o,n=b({...h({accounts:[],choosing:"",failure:"",loading:!0}),choose:(e)=>{t.onChoose(e)},closed:s,retry:()=>{t.onRetry()}}),l=null,c=I("cf-account-picker",n,a).then(async(e)=>{l=e;let i=e.root;if(u())return e.dispose(),i;if(await sn(i),u())return i;return Jt(i),i});return{close(){if(o)return;let e=l?.root;if(e instanceof HTMLElement)Ut(e);l?.dispose(),l=null,a.remove(),s()},host:a,ready:c,update(e){Object.assign(n,h({accounts:e.accounts??n.accounts,choosing:e.choosing??n.choosing,failure:e.failure??n.failure,loading:e.loading??n.loading}))}}}function g(){if(!ve())return!1;let t=p();return Boolean(t.cfAccounts&&t.cfSelectAccount)}function z(){if(!g())return Promise.resolve(null);return new Promise((t)=>{let a=[],o="",s=!1,u=(r)=>{if(s)return;s=!0,c.close(),t(r)};async function n(){c.update({failure:"",loading:!0});let r="";try{a=await p().cfAccounts?.()??[]}catch(e){a=[],r=X(e)}if(s)return;c.update({accounts:a,failure:r,loading:!1})}async function l(r){let e=a.find((i)=>i.id===r);if(!e||o!=="")return;o=r,c.update({choosing:r,failure:""});try{await p().cfSelectAccount?.({id:e.id,name:e.name})}catch(i){if(o="",!s)c.update({choosing:"",failure:X(i)});return}hm(),u(e)}let c=f({layer:dt("dialog"),onChoose:(r)=>{l(r)},onClosed:()=>{u(null)},onRetry:()=>{n()}});n()})}export{z as openCfAccountPicker};
|
|
2
2
|
|
|
3
|
-
//# debugId=
|
|
4
|
-
//# sourceMappingURL=cf-account-picker-
|
|
3
|
+
//# debugId=AEBB04AADD4D031064756E2164756E21
|
|
4
|
+
//# sourceMappingURL=cf-account-picker-ajh60k54.js.map
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import{mb,UE,qE,CF,KE}from"./studio-35pmfjtx.js";import"./studio-c72v1kwc.js";import"./studio-bk0anq3b.js";import"./studio-xh6rf05g.js";export{KE as clearCfConnection,qE as getCfAccountId,mb as getCfToken,CF as setCfAccountId,UE as setCfToken};
|
|
2
|
+
|
|
3
|
+
//# debugId=7C1FE07216597E8564756E2164756E21
|
|
4
|
+
//# sourceMappingURL=cf-settings-hbj16kh3.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{m,h}from"./iframe-entry-
|
|
1
|
+
import{m,h}from"./iframe-entry-4zqtn3ry.js";import{t}from"./iframe-entry-m24fza30.js";var b="jx-color-area",g={x:"saturation",y:"brightness"},E=new Map([["ArrowDown","y"],["ArrowLeft","x"],["ArrowRight","x"],["ArrowUp","y"]]),l=new WeakSet;function i(r){let e=r.currentTarget;return e instanceof HTMLElement&&e.localName===b?e:null}function f(r){return r.querySelector('[part="track"]')}function p(r){if(!(r instanceof Element))return null;let e=r.getAttribute("part");return e==="x"||e==="y"?e:null}function d(r){let e=Number(r.step);return Number.isFinite(e)&&e>0?e:1}function u(r,...e){for(let n of e)r.dispatchEvent(new Event(n,{bubbles:!0}))}function s(r,e,n){let o=g[e],a=h(n,d(r),0,100);if(r[o]===a)return!1;return r[o]=a,!0}function S(r,e){let n=i(e),o=p(e.target);if(!n||!o)return;e.stopPropagation(),s(r,o,Number(e.target.value)),u(n,"input")}function P(r,e){let n=i(e),o=p(e.target);if(!n||!o)return;e.stopPropagation(),s(r,o,Number(e.target.value)),u(n,"change")}function T(r,e){let n=i(e),o=p(e.target);if(!n||!o||r.disabled===!0)return;let a=E.get(e.key);if(!a)return;if(a===o&&!e.shiftKey)return;e.preventDefault(),e.stopPropagation();let c=d(r)*(e.shiftKey?10:1)*(m.get(e.key)??0);if(s(r,a,Number(r[g[a]])+c))u(n,"input","change")}function x(r,e,n){let o=f(e);if(!o)return!1;let a=o.getBoundingClientRect();if(a.width<=0||a.height<=0)return!1;let c=s(r,"x",(n.clientX-a.left)/a.width*100),A=s(r,"y",(1-(n.clientY-a.top)/a.height)*100);return c||A}function M(r,e){let n=i(e);if(!n||r.disabled===!0)return;e.preventDefault(),l.add(n);let o=f(n);if(o&&t(o.setPointerCapture))try{o.setPointerCapture(e.pointerId)}catch{}if(n.querySelector('[part="x"]')?.focus(),x(r,n,e))u(n,"input")}function w(r,e){let n=i(e);if(!n||!l.has(n))return;if(x(r,n,e))u(n,"input")}function H(r,e){let n=i(e);if(!n||!l.delete(n))return;let o=f(n);if(o&&t(o.releasePointerCapture)&&t(o.hasPointerCapture)&&o.hasPointerCapture(e.pointerId))o.releasePointerCapture(e.pointerId);u(n,"change")}export{P as onAreaAxisChange,S as onAreaAxisInput,T as onAreaKeydown,M as onAreaPointerDown,w as onAreaPointerMove,H as onAreaPointerUp};
|
|
2
2
|
|
|
3
3
|
//# debugId=C085CB743BF776AB64756E2164756E21
|
|
4
|
-
//# sourceMappingURL=color-area-
|
|
4
|
+
//# sourceMappingURL=color-area-gbcftzh3.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{d,g,T,H,N,
|
|
1
|
+
import{d,g,T,H,N,k,M}from"./iframe-entry-4zqtn3ry.js";import{l,f}from"./iframe-entry-54kwwhmg.js";import{t}from"./iframe-entry-m24fza30.js";var E="jx-color-field",m=0,L=new WeakMap;function x(e){let n=e.currentTarget;return n instanceof HTMLElement&&n.localName===E?n:null}function y(e){let n=e.currentTarget??e.target;return n instanceof Element?n.closest(E):null}function F(e){return e.querySelector('[part="picker"]')}function S(e){return H({a:e.alpha===!0?Number(e.opacity)/100:1,h:Number(e.hue),s:Number(e.saturation),v:Number(e.brightness)})}function c(e,...n){for(let r of n)e.dispatchEvent(new Event(r,{bubbles:!0}))}function C(e,n){let r={...n,a:1};e.solid=g(r),e.ink=M(r)}function s(e){let n=S(e);e.value=e.format==="oklch"?k(N(n)):g(n),e.text=e.value,e.invalid=!1,C(e,n)}function v(e){let n=d(String(e.value??""))??d(String(e.resolved??""));if(e.invalid=!1,e.text=String(e.value??""),!n)return;if(C(e,n),g(n)===g(S(e)))return;let r=T(n);if(e.saturation=Number(r.s.toFixed(2)),e.brightness=Number(r.v.toFixed(2)),e.opacity=Number((r.a*100).toFixed(2)),r.s>0&&r.v>0)e.hue=Number(r.h.toFixed(2))}var O="[data-jx-channel]";function w(e){let{target:n}=e;return n instanceof Element?n.closest(O):null}function h(e){let{target:n}=e;return n!==null&&"value"in n?String(n.value??""):""}function P(e,n,r){let o=x(n);if(!o||n.target===o)return;let i=w(n),u=i?.dataset.jxChannel;if(!i||!u)return;if(n.stopPropagation(),u==="text"){let a=h(n);e.text=a;let b=d(a);if(r==="input"){e.invalid=!1;return}if(!b){e.invalid=a!=="";return}p(e,b),s(e),c(o,"input","change");return}if(u==="system"||u==="palette"){let a=d(h(n));if(!a)return;p(e,{...a,a:e.alpha===!0?Number(e.opacity)/100:1})}else if(u==="area")e.saturation=Number(i.saturation),e.brightness=Number(i.brightness);else if(u==="hue")e.hue=Number(i.value);else if(u==="opacity")e.opacity=Number(i.value);else return;s(e),c(o,r)}function p(e,n){let r=T(n);if(e.saturation=Number(r.s.toFixed(2)),e.brightness=Number(r.v.toFixed(2)),e.alpha===!0)e.opacity=Number((r.a*100).toFixed(2));if(r.s>0&&r.v>0)e.hue=Number(r.h.toFixed(2))}function V(e,n){P(e,n,"input")}function B(e,n){P(e,n,"change")}function q(e,n){let r=y(n),o=r?F(r):null;if(!r||!o||e.disabled===!0)return;if(e.expanded===!0){f(o);return}let i=r.getBoundingClientRect();o.x=Math.round(i.left),o.y=Math.round(i.bottom),l(o,n.currentTarget instanceof Element?n.currentTarget:r)}function G(e){return e===!0&&t(R())}function R(){return globalThis.EyeDropper}function I(e,n){let r=y(n),o=R();if(!r||!o||e.disabled===!0)return Promise.resolve();return new o().open().then((i)=>{let u=d(String(i?.sRGBHex??""));if(!u)return;p(e,u),s(e),c(r,"input","change")}).catch(()=>{})}function J(e,n){let r=x(n);if(!r)return;L.set(e,r),m+=1,e.uid=`jx-color-field-${m}`,v(e),new MutationObserver(()=>{v(e)}).observe(r,{attributeFilter:["data-resolved","data-value"],attributes:!0});let i=F(r);if(i)i.addEventListener("toggle",(u)=>{e.expanded="newState"in u&&u.newState==="open"})}export{G as eyeDropperAvailable,I as onEyeDropper,B as onFieldChange,V as onFieldInput,J as onFieldMount,q as onOpenPicker,v as syncFromValue};
|
|
2
2
|
|
|
3
|
-
//# debugId=
|
|
4
|
-
//# sourceMappingURL=color-field-
|
|
3
|
+
//# debugId=E9B5E570BDBE1EBC64756E2164756E21
|
|
4
|
+
//# sourceMappingURL=color-field-85136598.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{m,h}from"./iframe-entry-
|
|
1
|
+
import{m,h}from"./iframe-entry-4zqtn3ry.js";var p="jx-color-slider";function u(n){let e=n.currentTarget;return e instanceof HTMLElement&&e.localName===p?e:null}function b(n){return n.querySelector('input[part="input"]')}function i(n,...e){for(let t of e)n.dispatchEvent(new Event(t,{bubbles:!0}))}function d(n){let e=Number.isFinite(Number(n.min))?Number(n.min):0,t=Number(n.maxValue),r=Number(n.step);return{max:Number.isFinite(t)&&t>e?t:360,min:e,step:Number.isFinite(r)&&r>0?r:1}}function S(n,e){let t=u(e);if(!t||e.target===t)return;e.stopPropagation(),n.value=Number(e.target.value),i(t,"input")}function g(n,e){let t=u(e);if(!t||e.target===t)return;e.stopPropagation(),n.value=Number(e.target.value),i(t,"change")}function E(n,e){let t=u(e),r=m.get(e.key);if(!t||!r||!e.shiftKey||n.disabled===!0)return;e.preventDefault();let{max:s,min:c,step:l}=d(n),o=h(Number(n.value)+r*l*10,l,c,s);if(o===Number(n.value))return;n.value=o;let a=b(t);if(a)a.value=String(o);i(t,"input","change")}export{g as onSliderChange,S as onSliderInput,E as onSliderKeydown};
|
|
2
2
|
|
|
3
3
|
//# debugId=0E17FEC2B87B32AA64756E2164756E21
|
|
4
|
-
//# sourceMappingURL=color-slider-
|
|
4
|
+
//# sourceMappingURL=color-slider-w1s3ndd8.js.map
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import{o,m,h,K,d,g,T,H,N,B,k,_,V,M,ee}from"./iframe-entry-4zqtn3ry.js";export{m as ARROW_SIGN,o as clamp,V as contrastRatio,g as formatHex,k as formatOklch,H as hsvToRgb,ee as inkOn,B as oklchToSrgb,d as parseColor,K as parseHex,M as preferredInk,_ as relativeLuminance,T as rgbToHsv,h as snapToStep,N as srgbToOklch};
|
|
2
|
+
|
|
3
|
+
//# debugId=AFE4FDC47CD9BD8C64756E2164756E21
|
|
4
|
+
//# sourceMappingURL=color-thzpppyc.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{l,f}from"./iframe-entry-54kwwhmg.js";var S="jx-combobox",s=0;function c(o){let n=o.currentTarget;return n instanceof Element?n.closest(S):null}function g(o){return o.querySelector('input[part="input"]')}function v(o){return o.querySelector('[part="popup"]')}function b(o){return Array.isArray(o.options)?o.options:[]}function C(o,...n){for(let e of n)o.dispatchEvent(new Event(e,{bubbles:!0}))}function m(o){return o.disabled!==!0&&o.readonly!==!0}function E(o){let n=v(o);if(!n)return;let e=o.getBoundingClientRect();n.x=Math.round(e.left),n.y=Math.round(e.bottom),l(n,o)}function u(o){let n=v(o);if(n)f(n)}function d(o,n){if(!m(o)||b(o).length===0)return!1;return E(n),!0}function w(o){let n=b(o),e=x(n,String(o.value??""));return e&&e.disabled!==!0?n.indexOf(e):-1}function a(o,n,e){let t=n<0?e>0?-1:0:n;for(let r of o.keys()){let i=((t+e*(r+1))%o.length+o.length)%o.length;if(o[i]?.disabled!==!0)return i}return-1}function x(o,n){let e=n.toLowerCase();return o.find((t)=>String(t.value).toLowerCase()===e)??null}function p(o,n,e){let t=String(e.value);o.value=t,o.committed=t,o.activeIndex=-1,u(n),g(n)?.focus(),C(n,"input","change")}function T(o,n){s+=1,o.uid=`jx-combobox-${s}`,o.committed=String(o.value??"")}function y(o,n){let e=c(n),t=n.target;if(!e||!(t instanceof HTMLInputElement))return;o.value=t.value,o.activeIndex=-1,d(o,e)}function I(o,n){let e="newState"in n&&n.newState==="open";if(o.open=e,!e)o.activeIndex=-1}function M(o,n){let e=c(n);if(!e||!m(o))return;if(o.open===!0){u(e);return}if(d(o,e))o.activeIndex=w(o);g(e)?.focus()}function h(o,n){let e=c(n),t="detail"in n?String(n.detail??""):"",r=x(b(o),t);if(!e||!r)return;p(o,e,r)}function H(o,n){let e=c(n);if(!e)return;let t=n.target instanceof HTMLInputElement?n.target:null,r=t?t.value:String(o.value??""),i=x(b(o),r);if(o.allowsCustomValue===!0||r===""||i){o.value=i?String(i.value):r,o.committed=String(o.value),u(e);return}n.stopPropagation(),o.value=String(o.committed??""),C(e,"change")}function k(o,n){let e=c(n);if(!e||n.ctrlKey||n.metaKey)return;let t=b(o),r=Number(o.activeIndex??-1);switch(n.key){case"ArrowDown":{if(!m(o))return;if(o.open!==!0){if(!d(o,e))return;o.activeIndex=n.altKey?w(o):a(t,-1,1)}else if(!n.altKey)o.activeIndex=a(t,r,1);break}case"ArrowUp":{if(!m(o))return;if(n.altKey){u(e);break}if(o.open!==!0){if(!d(o,e))return;o.activeIndex=a(t,-1,-1)}else o.activeIndex=a(t,r,-1);break}case"Enter":{let i=o.open===!0&&r>=0?t[r]:void 0;if(!i){if(o.open===!0)u(e);return}p(o,e,i);break}case"Tab":{let i=o.open===!0&&r>=0?t[r]:void 0;if(i)p(o,e,i);else u(e);return}case"Escape":{if(o.open!==!0)return;u(e),n.stopPropagation();break}default:return}n.preventDefault()}export{u as closeList,g as inputOf,w as landingIndex,T as mountCombobox,a as nextIndex,M as onComboboxButton,H as onComboboxCommit,y as onComboboxInput,k as onComboboxKeydown,h as onComboboxPick,I as onComboboxToggle,E as openList,x as rowFor};
|
|
2
2
|
|
|
3
|
-
//# debugId=
|
|
4
|
-
//# sourceMappingURL=combobox-
|
|
3
|
+
//# debugId=C3FCBC11DC71E09564756E2164756E21
|
|
4
|
+
//# sourceMappingURL=combobox-dk98wc5x.js.map
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import{De,Tx,$a,oy,Uc,qc}from"./studio-43pynnhz.js";import"./studio-xh6rf05g.js";export{Tx as _componentRegistryLoaded,Uc as buildComponentInstance,De as componentRegistry,qc as computeRelativePath,$a as loadComponentRegistry,oy as noteComponentSaved};
|
|
2
|
+
|
|
3
|
+
//# debugId=C417BA65AED9A02964756E2164756E21
|
|
4
|
+
//# sourceMappingURL=components-a98hzqw9.js.map
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import{Im,G0,J0,Ab,e$,t$,n$}from"./studio-15mfah02.js";import"./studio-ek4fb4eb.js";import"./studio-4jy967rj.js";import"./studio-thgexj3w.js";import"./studio-j3bq30yz.js";import"./studio-qarg1xf9.js";import"./studio-pv1ts08p.js";import"./studio-gw83z798.js";import"./studio-aaw7wxv8.js";import"./studio-43pynnhz.js";import"./studio-1d8m5s38.js";import"./studio-c72v1kwc.js";import"./studio-czpmzs9r.js";import"./studio-td3h1644.js";import"./studio-cv6gnjqd.js";import"./studio-4z0cdh16.js";import"./studio-k05g7efh.js";import"./studio-wn2cmf9q.js";import"./studio-w4mfaaam.js";import"./studio-q509sqt8.js";import"./studio-48yzqzqr.js";import"./studio-s49y6m5b.js";import"./studio-x5py815g.js";import"./studio-9c6cbq2c.js";import"./studio-bk0anq3b.js";import"./studio-ex1644g2.js";import"./studio-xh6rf05g.js";import"./studio-1a7zshnv.js";import"./studio-m3jrjfhy.js";import"./studio-zav9hgb3.js";import"./studio-zzgp5yka.js";import"./studio-z6s56dzz.js";export{G0 as collectionDirs,Im as collectionInfo,J0 as collectionSourceDirs,t$ as createCollectionSource,n$ as createPagesSource,Ab as listCollectionEntryIds,e$ as reloadHoldAwareGrids};
|
|
2
|
+
|
|
3
|
+
//# debugId=C13DF5E5592B1F8164756E2164756E21
|
|
4
|
+
//# sourceMappingURL=content-source-jq3fjs3w.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{Pe,Z,h}from"./studio-s49y6m5b.js";import"./studio-bk0anq3b.js";import"./studio-x5py815g.js";import"./studio-xh6rf05g.js";import"./studio-ex1644g2.js";import"./studio-zav9hgb3.js";import"./studio-4z0cdh16.js";import{Jt,Ut,Ih}from"./studio-m3jrjfhy.js";import{sn,dt}from"./studio-cv6gnjqd.js";import"./studio-q509sqt8.js";import"./studio-9c6cbq2c.js";import{Ul}from"./studio-ehj3csbm.js";import"./studio-ep1384t9.js";import"./studio-k1wvtp03.js";import"./studio-gw83z798.js";import"./studio-c72v1kwc.js";import"./studio-1d8m5s38.js";import"./studio-43pynnhz.js";import"./studio-48yzqzqr.js";import"./studio-z6s56dzz.js";import"./studio-aaw7wxv8.js";import"./studio-czpmzs9r.js";import"./studio-zkkt13qd.js";import"./studio-w3aafbpk.js";import"./studio-4ncxzw5m.js";import"./studio-wn2cmf9q.js";import"./studio-k05g7efh.js";import"./studio-td3h1644.js";import{ex}from"./studio-4jy967rj.js";import"./studio-w4mfaaam.js";import{oo,zt,Vi}from"./studio-zn7ysyzb.js";import{re}from"./studio-151kgn69.js";import{ze,yt,E,I}from"./studio-1a7zshnv.js";import{b}from"./studio-9f5vcb4w.js";import{m,Qy}from"./studio-erjccagy.js";var v={$schema:"https://jxsuite.com/schema/v1",$id:"StudioConvertRepeater",$description:'Repeat…: the dialog that turns the selected element into an `$prototype: "Array"` template. One `jx-dialog`, so the platform owns modality, Escape, the backdrop and focus restoration — which is what retired the `sp-dialog-wrapper` this surface used to open through its bare `open` attribute, and the hand-rolled `requestAnimationFrame` focus move that had to follow it. Three questions in one form: which state definition holds the items, and optionally which function filters and which sorts. The name field appears only when the answer to the first is "Create new…", because a definition that already exists needs no name. Nothing here knows what makes a definition an array — `editor/convert-to-repeater.ts` asks the plugin schemas, keeps the refusals and writes the repeater — and it hands over rows that are already strings.',tagName:"jx-dialog",$props:{headline:"Repeat…",confirmLabel:"Create Repeater",cancelLabel:"Cancel",size:"sm"},attributes:{part:"convert-repeater"},onconfirm:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/confirm"},value:[]}]},oncancel:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/closed"},value:[]}]},onclose:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/closed"},value:[]}]},style:{$description:"There is no stylesheet to transcribe: the lit version carried one inline `display:flex;flex-direction:column;gap:12px` on a wrapper div and nothing else, because `sp-field-label` and `sp-dialog-wrapper` drew the rest. Both of those are gone — the label is `jx-field`'s, which actually NAMES the control it wraps rather than sitting beside it, and the box is the dialog's — so the whole of this block is the one gap that separated the rows, said in the kit's scale instead of in the twelve pixels somebody typed.",'& [part="form"]':{display:"flex",flexDirection:"column",gap:"var(--jx-space-4)"},'& [part="new-slot"], & [part="functions-slot"], & [part="functions"]':{$description:"A branch host and the pair inside it are structure rather than layout: `display: contents` puts the rows they carry straight into the form's own column, so one gap rule spaces every row whether it is drawn or not.",display:"contents"}},children:[{tagName:"div",attributes:{part:"form"},children:[{tagName:"jx-field",attributes:{part:"source-row"},$props:{span:!0,label:"Items source"},children:[{tagName:"jx-select",attributes:{part:"source"},$props:{size:"sm",options:{$ref:"#/state/sourceOptions"},value:{$ref:"#/state/source"}},onchange:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/pickSource"},value:[{$ref:"event#/target/value"}]}]}}]},{tagName:"div",attributes:{part:"new-slot",role:"none"},$switch:{$ref:"#/state/creating"},cases:{true:{tagName:"jx-field",attributes:{part:"new-row"},$props:{span:!0,label:"New definition name",invalid:{$ref:"#/state/invalid"}},children:[{tagName:"jx-textfield",attributes:{part:"new-name"},$props:{size:"sm",placeholder:"myItems",value:{$ref:"#/state/newName"},invalid:{$ref:"#/state/invalid"},error:{$ref:"#/state/error"}},oninput:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/setName"},value:[{$ref:"event#/target/value"}]}]},onkeydown:{$prototype:"Function",body:[{$switch:{$ref:"event#/key"},cases:{Enter:[{preventDefault:!0},{operator:"call",target:{$ref:"#/state/confirm"},value:[]}]}}]}}]}}},{tagName:"div",attributes:{part:"functions-slot",role:"none"},$switch:{$ref:"#/state/hasFunctions"},cases:{true:{tagName:"div",attributes:{part:"functions",role:"none"},children:[{tagName:"jx-field",attributes:{part:"filter-row"},$props:{span:!0,label:"Filter (optional)"},children:[{tagName:"jx-select",attributes:{part:"filter"},$props:{size:"sm",options:{$ref:"#/state/functionOptions"},value:{$ref:"#/state/filter"}},onchange:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/pickFilter"},value:[{$ref:"event#/target/value"}]}]}}]},{tagName:"jx-field",attributes:{part:"sort-row"},$props:{span:!0,label:"Sort (optional)"},children:[{tagName:"jx-select",attributes:{part:"sort"},$props:{size:"sm",options:{$ref:"#/state/functionOptions"},value:{$ref:"#/state/sort"}},onchange:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/pickSort"},value:[{$ref:"event#/target/value"}]}]}}]}]}}}]}]};E("convert-repeater",v);var f="__new__";function g(r){return{...r,creating:r.source===f,functionOptions:[{label:"None",value:""},...r.functions.map((o)=>({label:o,value:o}))],hasFunctions:r.functions.length>0,invalid:r.error!=="",sourceOptions:[...r.sources.map((o)=>({label:o,value:o})),{label:"Create new…",value:f}]}}function y(r){let o=document.createElement("div");o.style.pointerEvents="auto",o.setAttribute(ze,yt("dialog","convert-repeater")),r.layer.append(o);let l=!1,i=()=>{if(l)return;l=!0,r.onClosed()},e=()=>l,s=b({...g(r.view),closed:i,confirm:()=>{r.onConfirm()},pickFilter:(t)=>{s.filter=t,r.onPickFilter(t)},pickSort:(t)=>{s.sort=t,r.onPickSort(t)},pickSource:(t)=>{s.source=t,r.onPickSource(t)},setName:(t)=>{s.newName=t,r.onName(t)}}),c=null,p=()=>{setTimeout(()=>{let t=c?.root;if(l||!(t instanceof HTMLElement))return;let a=t.querySelector('jx-textfield[part="new-name"]');if(a)Ih(a,"all")},0)},u=I("convert-repeater",s,o).then(async(t)=>{c=t;let a=t.root;if(e())return t.dispose(),a;if(await sn(a),e())return a;if(Jt(a),s.creating)p();return a});return{close(){let t=c?.root;if(t instanceof HTMLElement)Ut(t);c?.dispose(),c=null,o.remove(),i()},host:o,ready:u,update(t){let a=g(t),n=a.creating&&!s.creating,d=a.error!==""&&a.error===s.error;if(Object.assign(s,d?{...a,error:""}:a),d){let w=a.error;queueMicrotask(()=>{s.error=w})}if(n)p()}}}var R=/^[a-zA-Z_$][a-zA-Z0-9_$]*$/;async function B(){let r=h.value,o=Pe(r?.session.selection);if(!r||!o||o.length<2)return;if(!re(r.doc.document,o))return;let i=r.doc.document.state||{},e=await S(i);if(!e)return;Z(r,(s)=>{let c=s.doc.document;if(e.newDef){if(!c.state)c.state={};c.state[e.newDef.name]={default:[],type:"array"}}let p=zt(o);if(!p)return;let u=Vi(o),t=re(c,p);if(!t?.children)return;let a=oo(t)[u],n={$prototype:"Array",items:e.items,map:a};if(e.filter)n.filter=e.filter;if(e.sort)n.sort=e.sort;t.children[u]=n})}async function C(r){let o=Object.entries(r).filter(([,i])=>m(i)&&(i.type==="array"||Array.isArray(i.default)||i.$prototype==="Array")).map(([i])=>i),l=h.value?.documentPath;for(let[i,e]of Object.entries(r)){if(!Qy(e)||!e.$prototype||e.$prototype==="Array")continue;if(o.includes(i))continue;if((await ex({...e.$src!=null&&{$src:e.$src},$prototype:e.$prototype},{...l!=null&&{documentPath:l}}))?.returns?.type==="array")o.push(i)}return o}async function S(r){let o=await C(r),l=Object.entries(r).filter(([,i])=>Ul(i)==="function").map(([i])=>i);return new Promise((i)=>{let e={error:"",filter:"",functions:l,newName:"",sort:"",source:o[0]??f,sources:o},s=!1,c=(n)=>{if(s)return;s=!0,a.close(),i(n)},p=(n)=>{e.error=n,a.update(e)},u=()=>({...e.filter&&{filter:{$ref:`#/state/${e.filter}`}},...e.sort&&{sort:{$ref:`#/state/${e.sort}`}}}),t=()=>{if(e.source!==f){c({items:{$ref:`#/state/${e.source}`},...u()});return}let n=e.newName.trim();if(!n){p("Enter a name for the new state definition.");return}if(r[n]){p(`"${n}" already exists.`);return}if(!R.test(n)){p("Invalid identifier name.");return}c({items:{$ref:`#/state/${n}`},...u(),newDef:{name:n}})},a=y({layer:dt("dialog"),onClosed:()=>c(null),onConfirm:t,onName:(n)=>{e.newName=n,e.error="",a.update(e)},onPickFilter:(n)=>{e.filter=n,a.update(e)},onPickSort:(n)=>{e.sort=n,a.update(e)},onPickSource:(n)=>{e.source=n,e.error="",a.update(e)},view:e})})}export{B as convertToRepeater};
|
|
2
2
|
|
|
3
|
-
//# debugId=
|
|
4
|
-
//# sourceMappingURL=convert-to-repeater-
|
|
3
|
+
//# debugId=03379010EF51A97A64756E2164756E21
|
|
4
|
+
//# sourceMappingURL=convert-to-repeater-g66r6qp1.js.map
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import{fF,nm,mF,gF,bF,dp,yF,vF,Sa,IS,Ed,wF,Un,xe}from"./studio-nv5eq0f7.js";export{fF as CancellationTokenSource,nm as Emitter,mF as KeyCode,gF as KeyMod,Sa as MarkerSeverity,IS as MarkerTag,bF as Position,dp as Range,yF as Selection,vF as SelectionDirection,wF as Token,Ed as Uri,Un as editor,xe as languages};
|
|
2
|
+
|
|
3
|
+
//# debugId=72FE229AA5269CB864756E2164756E21
|
|
4
|
+
//# sourceMappingURL=editor-rth1rzj8.js.map
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import{S0,$F,fT}from"./studio-x5ffyssw.js";import"./studio-nngc45ct.js";import"./studio-bpzwhn88.js";import"./studio-ph17an19.js";import"./studio-pte5w7rf.js";import"./studio-ep1384t9.js";import"./studio-4ncxzw5m.js";import"./studio-6mf31e16.js";import"./studio-w3aafbpk.js";import"./studio-15mfah02.js";import"./studio-ek4fb4eb.js";import"./studio-4jy967rj.js";import"./studio-thgexj3w.js";import"./studio-j3bq30yz.js";import"./studio-qarg1xf9.js";import"./studio-pv1ts08p.js";import"./studio-gw83z798.js";import"./studio-aaw7wxv8.js";import"./studio-43pynnhz.js";import"./studio-1d8m5s38.js";import"./studio-c72v1kwc.js";import"./studio-czpmzs9r.js";import"./studio-td3h1644.js";import"./studio-cv6gnjqd.js";import"./studio-4z0cdh16.js";import"./studio-k05g7efh.js";import"./studio-wn2cmf9q.js";import"./studio-w4mfaaam.js";import"./studio-q509sqt8.js";import"./studio-48yzqzqr.js";import"./studio-s49y6m5b.js";import"./studio-x5py815g.js";import"./studio-9c6cbq2c.js";import"./studio-bk0anq3b.js";import"./studio-ex1644g2.js";import"./studio-xh6rf05g.js";import"./studio-1a7zshnv.js";import"./studio-m3jrjfhy.js";import"./studio-zav9hgb3.js";import"./studio-zzgp5yka.js";import"./studio-z6s56dzz.js";import"./studio-k1wvtp03.js";export{$F as createEntry,S0 as entryFormatName,fT as registerContentCommands};
|
|
2
|
+
|
|
3
|
+
//# debugId=5FBA100FBA137AB564756E2164756E21
|
|
4
|
+
//# sourceMappingURL=entry-commands-02j0s19w.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import"./studio-
|
|
1
|
+
import"./studio-xh6rf05g.js";import{jt,rd,ru}from"./studio-ex1644g2.js";import"./studio-9c6cbq2c.js";import"./studio-bk0anq3b.js";import"./studio-s49y6m5b.js";import"./studio-x5py815g.js";import"./studio-zav9hgb3.js";import"./studio-m3jrjfhy.js";import"./studio-ep1384t9.js";import"./studio-4z0cdh16.js";import{ea,dt}from"./studio-cv6gnjqd.js";import"./studio-q509sqt8.js";import"./studio-w3aafbpk.js";import"./studio-k1wvtp03.js";import"./studio-kefs4sz4.js";import{DD,OD,Gl,AD}from"./studio-dst8y8vh.js";import"./studio-c72v1kwc.js";import"./studio-1d8m5s38.js";import{TT}from"./studio-ncwx602y.js";import{z0,YD,JT,ZT}from"./studio-6sxnqqw8.js";import"./studio-wn2cmf9q.js";import"./studio-48yzqzqr.js";import"./studio-k05g7efh.js";import"./studio-pv1ts08p.js";import"./studio-qarg1xf9.js";import"./studio-thgexj3w.js";import"./studio-gw83z798.js";import"./studio-15mfah02.js";import"./studio-z6s56dzz.js";import"./studio-td3h1644.js";import"./studio-zzgp5yka.js";import"./studio-j3bq30yz.js";import"./studio-aaw7wxv8.js";import"./studio-43pynnhz.js";import"./studio-czpmzs9r.js";import"./studio-ek4fb4eb.js";import"./studio-4jy967rj.js";import"./studio-w4mfaaam.js";import{E,I}from"./studio-1a7zshnv.js";import{b}from"./studio-9f5vcb4w.js";import{n,S}from"./studio-erjccagy.js";var g={$schema:"https://jxsuite.com/schema/v1",$id:"StudioDataActions",$description:"The actions row a data-domain settings section grows: test a connection, push the schema, open the rows as a grid. It is an ISLAND inside `surfaces/settings-contributed.json` — the generic contributed-section renderer stays extension-agnostic and draws an empty host, and `panels/data-grid.ts` mounts this into it — which is the seam that lets the data surface contribute verbs without the settings machinery learning what a connection is.",tagName:"div",attributes:{part:"data-actions"},style:{display:"flex",flexWrap:"wrap",alignItems:"center",gap:"var(--jx-space-2)",fontFamily:"var(--jx-font-sans)",fontSize:"var(--jx-text-md)",'& [part="result"]':{fontSize:"var(--jx-text-sm)",color:"var(--fg-dim)"},'& [part="result"][data-ok="false"]':{color:"var(--danger)"},'& [part="result"][data-ok="true"]':{color:"var(--success, var(--accent))"}},children:[{tagName:"span",attributes:{part:"test-slot",role:"none"},style:{display:"contents"},$switch:{$ref:"#/state/testState"},cases:{shown:{tagName:"jx-button",attributes:{part:"test"},$props:{variant:"secondary",size:"sm",disabled:{$ref:"#/state/testDisabled"}},onclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/test"},value:[]}]},children:[{tagName:"span",textContent:"${state.testLabel}"}]}}},{tagName:"jx-button",attributes:{part:"push"},$props:{variant:"secondary",size:"sm"},onclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/push"},value:[]}]},children:[{tagName:"span",textContent:"Push Schema"}]},{tagName:"jx-button",attributes:{part:"grid"},$props:{variant:"secondary",size:"sm"},onclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/openGrid"},value:[]}]},children:[{tagName:"span",textContent:"Open Data Grid"}]},{tagName:"span",attributes:{part:"result-slot",role:"none"},style:{display:"contents"},$switch:{$ref:"#/state/resultState"},cases:{shown:{$description:"The last test's verdict, and a live region because it arrives after the press that asked for it.",tagName:"span",attributes:{part:"result",role:"status","data-ok":"${state.resultOk}",title:"${state.resultTitle}"},textContent:"${state.resultText}"}}}]};E("data-actions",g);function h(t,e){t.testState=e.testState,t.testLabel=e.testLabel,t.testDisabled=e.testDisabled,t.resultState=e.resultState,t.resultOk=e.resultOk,t.resultText=e.resultText,t.resultTitle=e.resultTitle}function y(t,e,o){let a=b({openGrid:o.openGrid,push:o.push,resultOk:"false",resultState:"hidden",resultText:"",resultTitle:"",test:o.test,testDisabled:!1,testLabel:"Test Connection",testState:"hidden"});h(a,e);let s=null,l=!1,r=I("data-actions",a,t).then((i)=>{let d=i.root;if(l)return i.dispose(),d;return s=i,d});return{dispose(){l=!0,s?.dispose(),s=null},ready:r,update:(i)=>h(a,i)}}var x={$schema:"https://jxsuite.com/schema/v1",$id:"StudioPushPlan",$description:"What pushing the schema would do, or what it did. The dry run is the whole point of the surface: a push rewrites a live database's shape, so the plan is read before the apply, and the confirm dialog around this document is the one that gates it. The ISLAND of `ui/layers.ts`'s confirm dialog rather than a dialog of its own (studio-ui-guidelines.md §12.5).",tagName:"div",attributes:{part:"plan"},style:{display:"flex",flexDirection:"column",gap:"var(--jx-space-2)",minWidth:"0",fontFamily:"var(--jx-font-sans)",fontSize:"var(--jx-text-md)",color:"var(--fg)",'& [part="steps"]':{margin:"0",padding:"0",listStyle:"none",display:"flex",flexDirection:"column",gap:"2px",maxHeight:"40vh",overflowY:"auto"},'& [part="step"]':{fontFamily:"var(--font-mono)",fontSize:"var(--jx-text-sm)",padding:"2px var(--jx-space-2)",borderLeft:"2px solid var(--border)"},'& [part="step"][data-kind="drop"]':{borderLeftColor:"var(--danger)"},'& [part="step"][data-kind="create"]':{borderLeftColor:"var(--success, var(--accent))"},'& [part="warning"]':{margin:"0",fontSize:"var(--jx-text-sm)",color:"var(--warning, var(--fg-dim))"},'& [part="failure"]':{$description:'`failure` rather than `error`: every kit field draws a permanent, empty `[part="error"]` of its own, and the kit is light DOM, so a rule on that name here would reach any field the plan ever holds.',margin:"0",fontSize:"var(--jx-text-sm)",color:"var(--danger)"}},children:[{tagName:"ul",attributes:{part:"steps"},children:[{$prototype:"Array",items:{$ref:"#/state/steps"},key:{$ref:"$map/item/key"},map:{tagName:"li",attributes:{part:"step","data-kind":"${$map.item.kind}"},textContent:"${$map.item.summary}"}}]},{$prototype:"Array",items:{$ref:"#/state/warnings"},key:{$ref:"$map/item/key"},map:{tagName:"p",attributes:{part:"warning"},textContent:"${$map.item.text}"}},{$prototype:"Array",items:{$ref:"#/state/errors"},key:{$ref:"$map/item/key"},map:{tagName:"p",attributes:{part:"failure",role:"alert"},textContent:"${$map.item.text}"}}]};E("push-plan",x);function v(t,e){let o=b({errors:e.errors,steps:e.steps,warnings:e.warnings}),a=null,s=!1,l=I("push-plan",o,t).then((r)=>{if(s)r.dispose();else a=r;return r.root});return{dispose(){s=!0,a?.dispose(),a=null},ready:l,update(r){o.steps=r.steps,o.warnings=r.warnings,o.errors=r.errors}}}var u=null;function P(){let t=u;u=null,t?.plan?.dispose(),t?.handle.close()}function D(t,e){return t.map((o,a)=>({key:`${e}:${a}`,text:o}))}function A(t){let e=t.phase==="done"?t.result:t.dryRun;return{errors:D(e?.errors??[],"error"),steps:(e?.plan??[]).map((o,a)=>({key:`${o.kind}:${a}`,kind:o.kind,summary:o.summary})),warnings:D(e?.warnings??[],"warning")}}function L(t){if(t.phase==="loading")return"Compiling plan…";if(t.phase==="applying")return"Applying…";if(t.phase==="done")return t.result?.applied?"Schema applied.":"Push failed.";let e=t.dryRun?.plan.length??0,o=t.dryRun?.errors?.length??0;return e===0&&o===0?"Nothing to push — the schema is up to date.":""}function f(){let t=u;if(!t)return;let e=t.phase==="confirm"&&(t.dryRun?.plan.length??0)>0;t.handle.update({cancelLabel:t.phase==="done"?"Close":"Cancel",confirmLabel:e?"Apply":"",message:L(t)}),t.plan?.update(A(t))}async function H(t,e){if(u)return;let o={connection:t,dryRun:null,onDone:e,phase:"loading",plan:null,result:null},a=ea({cancelLabel:"Cancel",confirmLabel:"",headline:t?`Push Schema — ${t}`:"Push Schema",island:(i)=>{o.plan=v(i,A(o))},layer:dt("dialog"),message:"Compiling plan…",onCancel:P,onClosed:()=>{if(u===o)P()},onConfirm:()=>{N()},region:"data/push"}),s=Object.assign(o,{handle:a});u=s;let l={dryRun:!0};if(t!==void 0)l.connection=t;let r=await JT(l);if(u!==s)return;s.dryRun=r,s.phase="confirm",f()}async function N(){let t=u;if(!t)return;t.phase="applying",f();let e=await JT(t.connection===void 0?{}:{connection:t.connection});if(u!==t)return;t.result=e,t.phase="done",f(),t.onDone()}var c={pushing:!1,testResult:null,testing:null},w=new Map;function k(t,e){let{testResult:o}=c;return{resultOk:o?.ok?"true":"false",resultState:o?"shown":"hidden",resultText:o?`${o.connection}: ${o.ok?"connected":o.error??"failed"}`:"",resultTitle:o?.error??"",testDisabled:!e||c.testing!==null,testLabel:c.testing?"Testing…":"Test Connection",testState:t==="connections"?"shown":"hidden"}}function C(t){if(t!=="connections"&&t!=="data"||!z0())return null;return(e,o)=>O(e,t,o)}async function j(t,e){c.testing=t,c.testResult=null,e();let o=await YD(t);c.testing=null,c.testResult={...o,connection:t},e()}function O(t,e,o){let{rerender:a,selected:s}=o,l=w.get(t);if(l){l.update(k(e,s));return}let r=()=>e==="connections"?o.selected??void 0:void 0;w.set(t,y(t,k(e,s),{openGrid:()=>{ZT()},push:()=>{H(r(),a)},test:()=>{let i=o.selected;if(i)j(i,a)}}))}var V=100;function G(t){let e=t.studio?.settings;if(!e)return null;let{key:o}=t.project,a=e.layout??"form",s=t.entrySchema??{},l=a==="map"?S(s.additionalProperties)?s.additionalProperties:{}:s,r=e.label??t.project.title??o,i={};if(e.entry!==void 0)i.entry=e.entry;if(e.layout!==void 0)i.layout=e.layout;return{contribution:{entrySchema:l,key:o,settings:i,title:r},group:OD(e.group)?e.group:DD,icon:e.icon,intro:n(e.intro)?e.intro:void 0,key:o,label:r,order:e.order??V}}var m=new Set,p=null;function ut(){return p??Promise.resolve()}function ct(){return p??=M().finally(()=>{p=null}),p}async function M(){let[t]=await Promise.all([rd(),jt()]),e=new Set;for(let o of t)for(let a of o.contributions){let s=G(a);if(!s)continue;let{contribution:l}=s;Gl({group:s.group,icon:s.icon,intro:s.intro,key:s.key,label:s.label,order:s.order,render:(r)=>{let i=C(s.key),d={formats:ru()};if(i!==null)d.actions=i;TT(r,l,d)}}),e.add(s.key)}for(let o of m)if(!e.has(o))AD(o);m.clear();for(let o of e)m.add(o)}export{ut as extensionSectionsReady,ct as syncExtensionSettingsSections};
|
|
2
2
|
|
|
3
|
-
//# debugId=
|
|
4
|
-
//# sourceMappingURL=extension-sections-
|
|
3
|
+
//# debugId=76A4B2AC5B323D9864756E2164756E21
|
|
4
|
+
//# sourceMappingURL=extension-sections-rqrs7dr0.js.map
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import{oO,Bo,r$,NF,o$,Rp,s$,Mb,Fb}from"./studio-ek4fb4eb.js";import"./studio-4jy967rj.js";import"./studio-thgexj3w.js";import"./studio-j3bq30yz.js";import"./studio-qarg1xf9.js";import"./studio-pv1ts08p.js";import"./studio-gw83z798.js";import"./studio-aaw7wxv8.js";import"./studio-43pynnhz.js";import"./studio-1d8m5s38.js";import"./studio-c72v1kwc.js";import"./studio-czpmzs9r.js";import"./studio-td3h1644.js";import"./studio-cv6gnjqd.js";import"./studio-4z0cdh16.js";import"./studio-k05g7efh.js";import"./studio-wn2cmf9q.js";import"./studio-w4mfaaam.js";import"./studio-q509sqt8.js";import"./studio-48yzqzqr.js";import"./studio-s49y6m5b.js";import"./studio-x5py815g.js";import"./studio-9c6cbq2c.js";import"./studio-bk0anq3b.js";import"./studio-ex1644g2.js";import"./studio-xh6rf05g.js";import"./studio-1a7zshnv.js";import"./studio-m3jrjfhy.js";import"./studio-zav9hgb3.js";import"./studio-zzgp5yka.js";import"./studio-z6s56dzz.js";export{Mb as confirmFileDelete,s$ as exportFile,NF as openFile,r$ as parseCollabSource,oO as parseFormatSource,Bo as parseSourceForPath,Fb as renamePromptMessage,Rp as saveFile,o$ as setDocumentSavedListener};
|
|
2
|
+
|
|
3
|
+
//# debugId=D55F66123F13FED564756E2164756E21
|
|
4
|
+
//# sourceMappingURL=file-ops-6a49er4c.js.map
|