@jxsuite/studio 10.3.0 → 10.4.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.
Files changed (89) hide show
  1. package/dist/chunks/{add-new-flow-3tkn72ey.js → add-new-flow-v0pm96mr.js} +2 -2
  2. package/dist/chunks/content-source-g38w0d3f.js +4 -0
  3. package/dist/chunks/{convert-to-repeater-gwzh9gar.js → convert-to-repeater-r8sfxjjm.js} +2 -2
  4. package/dist/chunks/entry-commands-t13dyw3c.js +4 -0
  5. package/dist/chunks/{extension-sections-338ee35t.js → extension-sections-vjzw46xb.js} +2 -2
  6. package/dist/chunks/file-ops-1sghzgcr.js +4 -0
  7. package/dist/chunks/{files-t07yqqej.js → files-zrqtgt41.js} +2 -2
  8. package/dist/chunks/{format-host-5ja5gxyk.js → format-host-9gy76erh.js} +2 -2
  9. package/dist/chunks/fs-events-45rhg3me.js +4 -0
  10. package/dist/chunks/grid-open-t4fq6bbm.js +4 -0
  11. package/dist/chunks/{grid-view-w9nfy203.js → grid-view-2f03wcgw.js} +2 -2
  12. package/dist/chunks/{iframe-host-wsg0bn73.js → iframe-host-9aq8ze3q.js} +2 -2
  13. package/dist/chunks/{jx-validate-ttr5ewf0.js → jx-validate-r4ax11e3.js} +2 -2
  14. package/dist/chunks/layers-panel-zr92pwdp.js +4 -0
  15. package/dist/chunks/media-library-j74rt0w4.js +4 -0
  16. package/dist/chunks/{media-open-yp9jm834.js → media-open-mypr0k6b.js} +2 -2
  17. package/dist/chunks/{media-picker-s41ngdfr.js → media-picker-pemtbsjv.js} +2 -2
  18. package/dist/chunks/{monaco-setup-g9kterhx.js → monaco-setup-0hw9f835.js} +2 -2
  19. package/dist/chunks/publish-panel-vg1n880b.js +4 -0
  20. package/dist/chunks/{publish-quick-w3nxd7q4.js → publish-quick-4fwngwrw.js} +2 -2
  21. package/dist/chunks/publish-workspace-jv4w2bx2.js +4 -0
  22. package/dist/chunks/quick-search-nh29rt8a.js +4 -0
  23. package/dist/chunks/right-panel-3ws9f2w0.js +4 -0
  24. package/dist/chunks/{source-control-6fk72me2.js → source-control-h3hcs5gy.js} +2 -2
  25. package/dist/chunks/{studio-jeb7hth3.js → studio-1ctnw3xv.js} +2 -2
  26. package/dist/chunks/{studio-15hwqgd8.js → studio-1y9mab9m.js} +2 -2
  27. package/dist/chunks/{studio-s7t4vp1d.js → studio-2e4hry72.js} +3 -3
  28. package/dist/chunks/{studio-0w3541dg.js → studio-2kpxm0eh.js} +3 -3
  29. package/dist/chunks/{studio-3c10v2q1.js → studio-2pk7kc7z.js} +2 -2
  30. package/dist/chunks/{studio-nwynxqtb.js → studio-2x972v58.js} +2 -2
  31. package/dist/chunks/{studio-fspe7m9t.js → studio-2zz4qbv9.js} +2 -2
  32. package/dist/chunks/{studio-ggx3j7nd.js → studio-3pz4t5a2.js} +2 -2
  33. package/dist/chunks/{studio-waekn290.js → studio-4bgvvzhv.js} +2 -2
  34. package/dist/chunks/{studio-y1b86ast.js → studio-61rg2cz5.js} +2 -2
  35. package/dist/chunks/{studio-nskxe9q1.js → studio-9gr7xs9r.js} +2 -2
  36. package/dist/chunks/{studio-wse1rs8t.js → studio-a88ej93p.js} +3 -3
  37. package/dist/chunks/{studio-zfdbmhp3.js → studio-acer0g8w.js} +2 -2
  38. package/dist/chunks/{studio-423tfdte.js → studio-amaz545p.js} +2 -2
  39. package/dist/chunks/{studio-ea6r1zyr.js → studio-az3wvyh2.js} +2 -2
  40. package/dist/chunks/{studio-5n193zqd.js → studio-bg8pzprg.js} +2 -2
  41. package/dist/chunks/{studio-bct64zmj.js → studio-bnc50f9h.js} +2 -2
  42. package/dist/chunks/{studio-3xk9zdgb.js → studio-brh8d2pr.js} +2 -2
  43. package/dist/chunks/{studio-fkrr7kgg.js → studio-c2fa783p.js} +3 -3
  44. package/dist/chunks/{studio-yzpskb0j.js → studio-cqxj4fcy.js} +2 -2
  45. package/dist/chunks/{studio-b4e0ftkt.js → studio-cw11h078.js} +2 -2
  46. package/dist/chunks/{studio-f8tyeyzt.js → studio-dn56z7sn.js} +3 -3
  47. package/dist/chunks/{studio-nn4f9m9c.js → studio-evq47j2z.js} +2 -2
  48. package/dist/chunks/{studio-e7vjyp04.js → studio-frc16j8v.js} +3 -3
  49. package/dist/chunks/{studio-wfct4h6n.js → studio-gnazwtv3.js} +2 -2
  50. package/dist/chunks/{studio-thz5t120.js → studio-hfqpfmpk.js} +2 -2
  51. package/dist/chunks/{studio-fj6c905s.js → studio-j5fcp6gj.js} +2 -2
  52. package/dist/chunks/{studio-s9fng7m8.js → studio-jd1qb1st.js} +3 -3
  53. package/dist/chunks/{studio-p2a03pgm.js → studio-jma2q8r9.js} +2 -2
  54. package/dist/chunks/{studio-yrcrncev.js → studio-knsjyx7n.js} +2 -2
  55. package/dist/chunks/{studio-8kx6m0rg.js → studio-mrjtnm62.js} +2 -2
  56. package/dist/chunks/{studio-b68k0z00.js → studio-nwf0c32p.js} +2 -2
  57. package/dist/chunks/{studio-hfxttkyr.js → studio-pj216fmn.js} +2 -2
  58. package/dist/chunks/{studio-x0gsfr1d.js → studio-pwctzka3.js} +3 -3
  59. package/dist/chunks/{studio-aam8zt8z.js → studio-q9hx2qp0.js} +2 -2
  60. package/dist/chunks/{studio-wgc54sxf.js → studio-qrzmfaf6.js} +2 -2
  61. package/dist/chunks/{studio-3q7mhbgx.js → studio-r6mx7vm5.js} +2 -2
  62. package/dist/chunks/{studio-stahswgb.js → studio-rr00ex23.js} +2 -2
  63. package/dist/chunks/{studio-321ym1tt.js → studio-s24mhq0z.js} +2 -2
  64. package/dist/chunks/{studio-bz0b5brj.js → studio-tmfcn347.js} +2 -2
  65. package/dist/chunks/{studio-a65kbs2e.js → studio-v7a7yb5w.js} +2 -2
  66. package/dist/chunks/{studio-2ggfzrrd.js → studio-wmjmsw0p.js} +3 -3
  67. package/dist/chunks/studio-xva3hzkv.js +5 -0
  68. package/dist/chunks/{studio-nf8esxxc.js → studio-xx3r3sb0.js} +2 -2
  69. package/dist/chunks/{studio-9qx1ywbv.js → studio-z3fztxrp.js} +4 -4
  70. package/dist/chunks/{studio-r050sez0.js → studio-z9453ypn.js} +2 -2
  71. package/dist/chunks/{workspace-9btkc8tk.js → workspace-6ztqcrsh.js} +2 -2
  72. package/dist/chunks/workspace-home-rse9h8a0.js +4 -0
  73. package/dist/manifest.json +46 -46
  74. package/dist/studio.js +10 -10
  75. package/package.json +11 -11
  76. package/src/surfaces/inspector-dock.json +3 -3
  77. package/dist/chunks/content-source-1vzxq1ba.js +0 -4
  78. package/dist/chunks/entry-commands-mx2whrjx.js +0 -4
  79. package/dist/chunks/file-ops-9bxvk59j.js +0 -4
  80. package/dist/chunks/fs-events-3424ezp3.js +0 -4
  81. package/dist/chunks/grid-open-1mpq9mzb.js +0 -4
  82. package/dist/chunks/layers-panel-hvy2e549.js +0 -4
  83. package/dist/chunks/media-library-ae67q4at.js +0 -4
  84. package/dist/chunks/publish-panel-gzfxcm0t.js +0 -4
  85. package/dist/chunks/publish-workspace-dppd82tc.js +0 -4
  86. package/dist/chunks/quick-search-tdxaam55.js +0 -4
  87. package/dist/chunks/right-panel-0yrw4cgz.js +0 -4
  88. package/dist/chunks/studio-53wy9ek3.js +0 -5
  89. package/dist/chunks/workspace-home-qcc4z5ag.js +0 -4
@@ -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-aam8zt8z.js";import{jn,Wt,ln,go}from"./studio-yrcrncev.js";import"./studio-swedpd82.js";import{zS}from"./studio-e7vjyp04.js";import"./studio-4zd6an2b.js";import"./studio-hh394phe.js";import"./studio-bct64zmj.js";import"./studio-xpx91fby.js";import"./studio-g9brbewz.js";import{Co,ic}from"./studio-x0gsfr1d.js";import"./studio-stahswgb.js";import"./studio-a65kbs2e.js";import"./studio-3q7mhbgx.js";import"./studio-1ks5d9y4.js";import{ds,Jc,Ta,Ys}from"./studio-y1b86ast.js";import"./studio-1410q5dw.js";import"./studio-ggx3j7nd.js";import{oh,Gb}from"./studio-53wy9ek3.js";import{Ne,ev}from"./studio-n9qba0gx.js";import"./studio-90zkgne5.js";import"./studio-thz5t120.js";import"./studio-8kx6m0rg.js";import"./studio-fspe7m9t.js";import"./studio-p2a03pgm.js";import"./studio-k2evngrj.js";import{$S,TT,Ow,NS,_i}from"./studio-wse1rs8t.js";import"./studio-daksw8kh.js";import"./studio-321ym1tt.js";import"./studio-yzpskb0j.js";import"./studio-k1wvtp03.js";import{wm}from"./studio-423tfdte.js";import"./studio-waekn290.js";import"./studio-9qx1ywbv.js";import"./studio-hfxttkyr.js";import{bE,tw}from"./studio-s9fng7m8.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-b4e0ftkt.js";import{rb}from"./studio-ea6r1zyr.js";import{cb,Id,Rd}from"./studio-0w3541dg.js";import{aw,kE}from"./studio-3xk9zdgb.js";import"./studio-r050sez0.js";import{Vl}from"./studio-jeb7hth3.js";import{PT,Bw}from"./studio-wgc54sxf.js";import"./studio-nskxe9q1.js";import"./studio-zfdbmhp3.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-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};
2
2
 
3
3
  //# debugId=9639025723575D4864756E2164756E21
4
- //# sourceMappingURL=add-new-flow-3tkn72ey.js.map
4
+ //# sourceMappingURL=add-new-flow-v0pm96mr.js.map
@@ -0,0 +1,4 @@
1
+ import{Rb,BS,zS,Db,VT,UT,qT}from"./studio-frc16j8v.js";import"./studio-hfqpfmpk.js";import"./studio-9gr7xs9r.js";import"./studio-v7a7yb5w.js";import"./studio-3pz4t5a2.js";import"./studio-rr00ex23.js";import"./studio-xpx91fby.js";import"./studio-r6mx7vm5.js";import"./studio-xva3hzkv.js";import"./studio-n9qba0gx.js";import"./studio-pwctzka3.js";import"./studio-g9brbewz.js";import"./studio-90zkgne5.js";import"./studio-61rg2cz5.js";import"./studio-tpxcryf2.js";import"./studio-5tet77de.js";import"./studio-bnc50f9h.js";import"./studio-4zd6an2b.js";import"./studio-acer0g8w.js";import"./studio-wqfaqw4m.js";import"./studio-hh394phe.js";import"./studio-knsjyx7n.js";import"./studio-swedpd82.js";import"./studio-9c6cbq2c.js";import"./studio-sce30r7b.js";import"./studio-q9hx2qp0.js";import"./studio-4fnb5648.js";import"./studio-9dq7rwc7.js";import"./studio-nzemfbkk.js";import"./studio-nvcn2ykc.js";import"./studio-1410q5dw.js";import"./studio-1ks5d9y4.js";export{BS as collectionDirs,Rb as collectionInfo,zS as collectionSourceDirs,UT as createCollectionSource,qT as createPagesSource,Db as listCollectionEntryIds,VT as reloadDraftAwareGrids};
2
+
3
+ //# debugId=F2D54FA9607F75D364756E2164756E21
4
+ //# sourceMappingURL=content-source-g38w0d3f.js.map
@@ -1,4 +1,4 @@
1
- import{Oe,Z,h}from"./studio-yrcrncev.js";import"./studio-sce30r7b.js";import"./studio-swedpd82.js";import"./studio-4fnb5648.js";import"./studio-aam8zt8z.js";import"./studio-nvcn2ykc.js";import"./studio-5tet77de.js";import{Jt,Ut,Nh}from"./studio-nzemfbkk.js";import{sn,dt}from"./studio-tpxcryf2.js";import"./studio-wqfaqw4m.js";import"./studio-9c6cbq2c.js";import{Wl}from"./studio-bz0b5brj.js";import"./studio-yzpskb0j.js";import"./studio-k1wvtp03.js";import"./studio-3q7mhbgx.js";import"./studio-g9brbewz.js";import"./studio-x0gsfr1d.js";import"./studio-n9qba0gx.js";import"./studio-hh394phe.js";import"./studio-1ks5d9y4.js";import"./studio-53wy9ek3.js";import"./studio-90zkgne5.js";import"./studio-hfxttkyr.js";import"./studio-daksw8kh.js";import"./studio-waekn290.js";import"./studio-4zd6an2b.js";import"./studio-bct64zmj.js";import"./studio-y1b86ast.js";import{Gw}from"./studio-nskxe9q1.js";import"./studio-zfdbmhp3.js";import{rr,Vt,zi}from"./studio-4f7thq0p.js";import{oe}from"./studio-v5wktj6f.js";import{Ve,vt,E,R}from"./studio-9dq7rwc7.js";import{g}from"./studio-3qr08sxq.js";import{v,Kv}from"./studio-k3we3kqb.js";var m={$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",m);var f="__new__";function y(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 w(r){let o=document.createElement("div");o.style.pointerEvents="auto",o.setAttribute(Ve,vt("dialog","convert-repeater")),r.layer.append(o);let l=!1,i=()=>{if(l)return;l=!0,r.onClosed()},e=()=>l,s=g({...y(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)Nh(a,"all")},0)},u=R("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=y(t),n=a.creating&&!s.creating,d=a.error!==""&&a.error===s.error;if(Object.assign(s,d?{...a,error:""}:a),d){let b=a.error;queueMicrotask(()=>{s.error=b})}if(n)p()}}}var C=/^[a-zA-Z_$][a-zA-Z0-9_$]*$/;async function B(){let r=h.value,o=Oe(r?.session.selection);if(!r||!o||o.length<2)return;if(!oe(r.doc.document,o))return;let i=r.doc.document.state||{},e=await N(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=Vt(o);if(!p)return;let u=zi(o),t=oe(c,p);if(!t?.children)return;let a=rr(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 S(r){let o=Object.entries(r).filter(([,i])=>v(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(!Kv(e)||!e.$prototype||e.$prototype==="Array")continue;if(o.includes(i))continue;if((await Gw({...e.$src!=null&&{$src:e.$src},$prototype:e.$prototype},{...l!=null&&{documentPath:l}}))?.returns?.type==="array")o.push(i)}return o}async function N(r){let o=await S(r),l=Object.entries(r).filter(([,i])=>Wl(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(!C.test(n)){p("Invalid identifier name.");return}c({items:{$ref:`#/state/${n}`},...u(),newDef:{name:n}})},a=w({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};
1
+ import{Oe,Z,h}from"./studio-knsjyx7n.js";import"./studio-sce30r7b.js";import"./studio-swedpd82.js";import"./studio-4fnb5648.js";import"./studio-q9hx2qp0.js";import"./studio-nvcn2ykc.js";import"./studio-5tet77de.js";import{Jt,Ut,Nh}from"./studio-nzemfbkk.js";import{sn,dt}from"./studio-tpxcryf2.js";import"./studio-wqfaqw4m.js";import"./studio-9c6cbq2c.js";import{Wl}from"./studio-tmfcn347.js";import"./studio-cqxj4fcy.js";import"./studio-k1wvtp03.js";import"./studio-r6mx7vm5.js";import"./studio-g9brbewz.js";import"./studio-pwctzka3.js";import"./studio-n9qba0gx.js";import"./studio-hh394phe.js";import"./studio-1ks5d9y4.js";import"./studio-xva3hzkv.js";import"./studio-90zkgne5.js";import"./studio-pj216fmn.js";import"./studio-daksw8kh.js";import"./studio-4bgvvzhv.js";import"./studio-4zd6an2b.js";import"./studio-bnc50f9h.js";import"./studio-61rg2cz5.js";import{Gw}from"./studio-9gr7xs9r.js";import"./studio-acer0g8w.js";import{rr,Vt,zi}from"./studio-4f7thq0p.js";import{oe}from"./studio-v5wktj6f.js";import{Ve,vt,E,R}from"./studio-9dq7rwc7.js";import{g}from"./studio-3qr08sxq.js";import{v,Kv}from"./studio-k3we3kqb.js";var m={$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",m);var f="__new__";function y(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 w(r){let o=document.createElement("div");o.style.pointerEvents="auto",o.setAttribute(Ve,vt("dialog","convert-repeater")),r.layer.append(o);let l=!1,i=()=>{if(l)return;l=!0,r.onClosed()},e=()=>l,s=g({...y(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)Nh(a,"all")},0)},u=R("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=y(t),n=a.creating&&!s.creating,d=a.error!==""&&a.error===s.error;if(Object.assign(s,d?{...a,error:""}:a),d){let b=a.error;queueMicrotask(()=>{s.error=b})}if(n)p()}}}var C=/^[a-zA-Z_$][a-zA-Z0-9_$]*$/;async function B(){let r=h.value,o=Oe(r?.session.selection);if(!r||!o||o.length<2)return;if(!oe(r.doc.document,o))return;let i=r.doc.document.state||{},e=await N(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=Vt(o);if(!p)return;let u=zi(o),t=oe(c,p);if(!t?.children)return;let a=rr(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 S(r){let o=Object.entries(r).filter(([,i])=>v(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(!Kv(e)||!e.$prototype||e.$prototype==="Array")continue;if(o.includes(i))continue;if((await Gw({...e.$src!=null&&{$src:e.$src},$prototype:e.$prototype},{...l!=null&&{documentPath:l}}))?.returns?.type==="array")o.push(i)}return o}async function N(r){let o=await S(r),l=Object.entries(r).filter(([,i])=>Wl(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(!C.test(n)){p("Invalid identifier name.");return}c({items:{$ref:`#/state/${n}`},...u(),newDef:{name:n}})},a=w({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
3
  //# debugId=2E1274CCF8D2A5F064756E2164756E21
4
- //# sourceMappingURL=convert-to-repeater-gwzh9gar.js.map
4
+ //# sourceMappingURL=convert-to-repeater-r8sfxjjm.js.map
@@ -0,0 +1,4 @@
1
+ import{bS,fF,oT}from"./studio-cw11h078.js";import"./studio-amaz545p.js";import"./studio-s24mhq0z.js";import"./studio-1ctnw3xv.js";import"./studio-z3fztxrp.js";import"./studio-cqxj4fcy.js";import"./studio-4bgvvzhv.js";import"./studio-qrzmfaf6.js";import"./studio-daksw8kh.js";import"./studio-frc16j8v.js";import"./studio-hfqpfmpk.js";import"./studio-9gr7xs9r.js";import"./studio-v7a7yb5w.js";import"./studio-3pz4t5a2.js";import"./studio-rr00ex23.js";import"./studio-xpx91fby.js";import"./studio-r6mx7vm5.js";import"./studio-xva3hzkv.js";import"./studio-n9qba0gx.js";import"./studio-pwctzka3.js";import"./studio-g9brbewz.js";import"./studio-90zkgne5.js";import"./studio-61rg2cz5.js";import"./studio-tpxcryf2.js";import"./studio-5tet77de.js";import"./studio-bnc50f9h.js";import"./studio-4zd6an2b.js";import"./studio-acer0g8w.js";import"./studio-wqfaqw4m.js";import"./studio-hh394phe.js";import"./studio-knsjyx7n.js";import"./studio-swedpd82.js";import"./studio-9c6cbq2c.js";import"./studio-sce30r7b.js";import"./studio-q9hx2qp0.js";import"./studio-4fnb5648.js";import"./studio-9dq7rwc7.js";import"./studio-nzemfbkk.js";import"./studio-nvcn2ykc.js";import"./studio-1410q5dw.js";import"./studio-1ks5d9y4.js";import"./studio-k1wvtp03.js";export{fF as createEntry,bS as entryFormatName,oT as registerContentCommands};
2
+
3
+ //# debugId=8E1975D2E5C4E26A64756E2164756E21
4
+ //# sourceMappingURL=entry-commands-t13dyw3c.js.map
@@ -1,4 +1,4 @@
1
- import"./studio-4fnb5648.js";import{jt,od,ou}from"./studio-aam8zt8z.js";import"./studio-9c6cbq2c.js";import"./studio-sce30r7b.js";import"./studio-yrcrncev.js";import"./studio-swedpd82.js";import"./studio-nvcn2ykc.js";import"./studio-nzemfbkk.js";import"./studio-yzpskb0j.js";import"./studio-5tet77de.js";import{Zs,dt}from"./studio-tpxcryf2.js";import"./studio-wqfaqw4m.js";import"./studio-daksw8kh.js";import"./studio-k1wvtp03.js";import"./studio-15hwqgd8.js";import{_N,SN,ql,CN}from"./studio-b68k0z00.js";import"./studio-g9brbewz.js";import"./studio-x0gsfr1d.js";import{bT}from"./studio-wfct4h6n.js";import{FS,jN,jT,BT}from"./studio-fspe7m9t.js";import"./studio-4zd6an2b.js";import"./studio-hh394phe.js";import"./studio-bct64zmj.js";import"./studio-xpx91fby.js";import"./studio-stahswgb.js";import"./studio-a65kbs2e.js";import"./studio-3q7mhbgx.js";import"./studio-e7vjyp04.js";import"./studio-1ks5d9y4.js";import"./studio-y1b86ast.js";import"./studio-1410q5dw.js";import"./studio-ggx3j7nd.js";import"./studio-53wy9ek3.js";import"./studio-n9qba0gx.js";import"./studio-90zkgne5.js";import"./studio-thz5t120.js";import"./studio-nskxe9q1.js";import"./studio-zfdbmhp3.js";import{E,R}from"./studio-9dq7rwc7.js";import{g}from"./studio-3qr08sxq.js";import{n,_}from"./studio-k3we3kqb.js";var h={$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",h);function S(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=g({openGrid:o.openGrid,push:o.push,resultOk:"false",resultState:"hidden",resultText:"",resultTitle:"",test:o.test,testDisabled:!1,testLabel:"Test Connection",testState:"hidden"});S(a,e);let s=null,l=!1,r=R("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)=>S(a,i)}}var b={$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",b);function x(t,e){let o=g({errors:e.errors,steps:e.steps,warnings:e.warnings}),a=null,s=!1,l=R("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 v(){let t=u;u=null,t?.plan?.dispose(),t?.handle.close()}function P(t,e){return t.map((o,a)=>({key:`${e}:${a}`,text:o}))}function k(t){let e=t.phase==="done"?t.result:t.dryRun;return{errors:P(e?.errors??[],"error"),steps:(e?.plan??[]).map((o,a)=>({key:`${o.kind}:${a}`,kind:o.kind,summary:o.summary})),warnings:P(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(k(t))}async function H(t,e){if(u)return;let o={connection:t,dryRun:null,onDone:e,phase:"loading",plan:null,result:null},a=Zs({cancelLabel:"Cancel",confirmLabel:"",headline:t?`Push Schema — ${t}`:"Push Schema",island:(i)=>{o.plan=x(i,k(o))},layer:dt("dialog"),message:"Compiling plan…",onCancel:v,onClosed:()=>{if(u===o)v()},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},D=new Map;function w(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 A(t){if(t!=="connections"&&t!=="data"||!FS())return null;return(e,o)=>O(e,t,o)}async function j(t,e){c.testing=t,c.testResult=null,e();let o=await jN(t);c.testing=null,c.testResult={...o,connection:t},e()}function O(t,e,o){let{rerender:a,selected:s}=o,l=D.get(t);if(l){l.update(w(e,s));return}let r=()=>e==="connections"?o.selected??void 0:void 0;D.set(t,y(t,w(e,s),{openGrid:()=>{BT()},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.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:SN(e.group)?e.group:_N,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([od(),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;ql({group:s.group,icon:s.icon,intro:s.intro,key:s.key,label:s.label,order:s.order,render:(r)=>{let i=A(s.key),d={formats:ou()};if(i!==null)d.actions=i;bT(r,l,d)}}),e.add(s.key)}for(let o of m)if(!e.has(o))CN(o);m.clear();for(let o of e)m.add(o)}export{ut as extensionSectionsReady,ct as syncExtensionSettingsSections};
1
+ import"./studio-4fnb5648.js";import{jt,od,ou}from"./studio-q9hx2qp0.js";import"./studio-9c6cbq2c.js";import"./studio-sce30r7b.js";import"./studio-knsjyx7n.js";import"./studio-swedpd82.js";import"./studio-nvcn2ykc.js";import"./studio-nzemfbkk.js";import"./studio-cqxj4fcy.js";import"./studio-5tet77de.js";import{Zs,dt}from"./studio-tpxcryf2.js";import"./studio-wqfaqw4m.js";import"./studio-daksw8kh.js";import"./studio-k1wvtp03.js";import"./studio-1y9mab9m.js";import{_N,SN,ql,CN}from"./studio-nwf0c32p.js";import"./studio-g9brbewz.js";import"./studio-pwctzka3.js";import{bT}from"./studio-gnazwtv3.js";import{FS,jN,jT,BT}from"./studio-2zz4qbv9.js";import"./studio-4zd6an2b.js";import"./studio-hh394phe.js";import"./studio-bnc50f9h.js";import"./studio-xpx91fby.js";import"./studio-rr00ex23.js";import"./studio-v7a7yb5w.js";import"./studio-r6mx7vm5.js";import"./studio-frc16j8v.js";import"./studio-1ks5d9y4.js";import"./studio-61rg2cz5.js";import"./studio-1410q5dw.js";import"./studio-3pz4t5a2.js";import"./studio-xva3hzkv.js";import"./studio-n9qba0gx.js";import"./studio-90zkgne5.js";import"./studio-hfqpfmpk.js";import"./studio-9gr7xs9r.js";import"./studio-acer0g8w.js";import{E,R}from"./studio-9dq7rwc7.js";import{g}from"./studio-3qr08sxq.js";import{n,_}from"./studio-k3we3kqb.js";var h={$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",h);function S(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=g({openGrid:o.openGrid,push:o.push,resultOk:"false",resultState:"hidden",resultText:"",resultTitle:"",test:o.test,testDisabled:!1,testLabel:"Test Connection",testState:"hidden"});S(a,e);let s=null,l=!1,r=R("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)=>S(a,i)}}var b={$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",b);function x(t,e){let o=g({errors:e.errors,steps:e.steps,warnings:e.warnings}),a=null,s=!1,l=R("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 v(){let t=u;u=null,t?.plan?.dispose(),t?.handle.close()}function P(t,e){return t.map((o,a)=>({key:`${e}:${a}`,text:o}))}function k(t){let e=t.phase==="done"?t.result:t.dryRun;return{errors:P(e?.errors??[],"error"),steps:(e?.plan??[]).map((o,a)=>({key:`${o.kind}:${a}`,kind:o.kind,summary:o.summary})),warnings:P(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(k(t))}async function H(t,e){if(u)return;let o={connection:t,dryRun:null,onDone:e,phase:"loading",plan:null,result:null},a=Zs({cancelLabel:"Cancel",confirmLabel:"",headline:t?`Push Schema — ${t}`:"Push Schema",island:(i)=>{o.plan=x(i,k(o))},layer:dt("dialog"),message:"Compiling plan…",onCancel:v,onClosed:()=>{if(u===o)v()},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},D=new Map;function w(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 A(t){if(t!=="connections"&&t!=="data"||!FS())return null;return(e,o)=>O(e,t,o)}async function j(t,e){c.testing=t,c.testResult=null,e();let o=await jN(t);c.testing=null,c.testResult={...o,connection:t},e()}function O(t,e,o){let{rerender:a,selected:s}=o,l=D.get(t);if(l){l.update(w(e,s));return}let r=()=>e==="connections"?o.selected??void 0:void 0;D.set(t,y(t,w(e,s),{openGrid:()=>{BT()},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.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:SN(e.group)?e.group:_N,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([od(),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;ql({group:s.group,icon:s.icon,intro:s.intro,key:s.key,label:s.label,order:s.order,render:(r)=>{let i=A(s.key),d={formats:ou()};if(i!==null)d.actions=i;bT(r,l,d)}}),e.add(s.key)}for(let o of m)if(!e.has(o))CN(o);m.clear();for(let o of e)m.add(o)}export{ut as extensionSectionsReady,ct as syncExtensionSettingsSections};
2
2
 
3
3
  //# debugId=E70DCEEBD046713B64756E2164756E21
4
- //# sourceMappingURL=extension-sections-338ee35t.js.map
4
+ //# sourceMappingURL=extension-sections-vjzw46xb.js.map
@@ -0,0 +1,4 @@
1
+ import{GN,Fr,KT,vF,JT,Ip,YT,Ab,Ob}from"./studio-hfqpfmpk.js";import"./studio-9gr7xs9r.js";import"./studio-v7a7yb5w.js";import"./studio-3pz4t5a2.js";import"./studio-rr00ex23.js";import"./studio-xpx91fby.js";import"./studio-r6mx7vm5.js";import"./studio-xva3hzkv.js";import"./studio-n9qba0gx.js";import"./studio-pwctzka3.js";import"./studio-g9brbewz.js";import"./studio-90zkgne5.js";import"./studio-61rg2cz5.js";import"./studio-tpxcryf2.js";import"./studio-5tet77de.js";import"./studio-bnc50f9h.js";import"./studio-4zd6an2b.js";import"./studio-acer0g8w.js";import"./studio-wqfaqw4m.js";import"./studio-hh394phe.js";import"./studio-knsjyx7n.js";import"./studio-swedpd82.js";import"./studio-9c6cbq2c.js";import"./studio-sce30r7b.js";import"./studio-q9hx2qp0.js";import"./studio-4fnb5648.js";import"./studio-9dq7rwc7.js";import"./studio-nzemfbkk.js";import"./studio-nvcn2ykc.js";import"./studio-1410q5dw.js";import"./studio-1ks5d9y4.js";export{Ab as confirmFileDelete,YT as exportFile,vF as openFile,KT as parseCollabSource,GN as parseFormatSource,Fr as parseSourceForPath,Ob as renamePromptMessage,Ip as saveFile,JT as setDocumentSavedListener};
2
+
3
+ //# debugId=E2BEBE96F17F6E2864756E2164756E21
4
+ //# sourceMappingURL=file-ops-1sghzgcr.js.map
@@ -1,4 +1,4 @@
1
- import{rl,Em,TT,LT,VP,$T,IT,RT,DS,UP,Ib,DT,qP,GP,NT,ON,KP,JP,Ow,NS,AS,Mw,Tm,YP,Pw,OS,_i,MS,AT,OT,Lm,MT,ZP,XP}from"./studio-wse1rs8t.js";import"./studio-wgc54sxf.js";import"./studio-fspe7m9t.js";import"./studio-daksw8kh.js";import"./studio-e7vjyp04.js";import"./studio-thz5t120.js";import"./studio-nskxe9q1.js";import"./studio-8kx6m0rg.js";import"./studio-k2evngrj.js";import"./studio-p2a03pgm.js";import"./studio-a65kbs2e.js";import"./studio-ggx3j7nd.js";import"./studio-stahswgb.js";import"./studio-xpx91fby.js";import"./studio-3q7mhbgx.js";import"./studio-53wy9ek3.js";import"./studio-n9qba0gx.js";import"./studio-x0gsfr1d.js";import"./studio-g9brbewz.js";import"./studio-90zkgne5.js";import"./studio-y1b86ast.js";import"./studio-tpxcryf2.js";import"./studio-5tet77de.js";import"./studio-bct64zmj.js";import"./studio-4zd6an2b.js";import"./studio-zfdbmhp3.js";import"./studio-wqfaqw4m.js";import"./studio-hh394phe.js";import"./studio-yrcrncev.js";import"./studio-swedpd82.js";import"./studio-9c6cbq2c.js";import"./studio-sce30r7b.js";import"./studio-aam8zt8z.js";import"./studio-4fnb5648.js";import"./studio-9dq7rwc7.js";import"./studio-nzemfbkk.js";import"./studio-nvcn2ykc.js";import"./studio-1410q5dw.js";import"./studio-1ks5d9y4.js";export{qP as FILE_ROW_HEIGHT,NT as canMoveInto,Pw as commitRename,JP as createFileIn,DS as findHomePage,RT as initProjectRepo,GP as isFileDrag,OS as listRenameSiblings,Ow as listTakenNames,rl as loadDirectory,$T as loadProject,Em as loadProjectDirectories,ZP as mountFilesPanel,Mw as notifyMoveOutcome,MS as openFileInPane,_i as openFileInTab,UP as openHomePage,Ib as openLastSessionOrHome,IT as openProject,Tm as parentDirOf,KP as pickAndUploadTo,TT as refreshProjectDirectoriesFor,MT as registerFilesPanel,AT as reloadCleanTab,Lm as reloadFileInTab,OT as reloadTabsIfChanged,AS as renameStatus,DT as setSessionWorkspaceShow,VP as setShowIgnoredFiles,YP as settleRename,LT as showIgnoredFiles,XP as unmountFilesPanel,ON as uploadFilesToDir,NS as writeNewFile};
1
+ import{rl,Em,TT,LT,VP,$T,IT,RT,DS,UP,Ib,DT,qP,GP,NT,ON,KP,JP,Ow,NS,AS,Mw,Tm,YP,Pw,OS,_i,MS,AT,OT,Lm,MT,ZP,XP}from"./studio-a88ej93p.js";import"./studio-qrzmfaf6.js";import"./studio-2zz4qbv9.js";import"./studio-daksw8kh.js";import"./studio-frc16j8v.js";import"./studio-hfqpfmpk.js";import"./studio-9gr7xs9r.js";import"./studio-mrjtnm62.js";import"./studio-k2evngrj.js";import"./studio-jma2q8r9.js";import"./studio-v7a7yb5w.js";import"./studio-3pz4t5a2.js";import"./studio-rr00ex23.js";import"./studio-xpx91fby.js";import"./studio-r6mx7vm5.js";import"./studio-xva3hzkv.js";import"./studio-n9qba0gx.js";import"./studio-pwctzka3.js";import"./studio-g9brbewz.js";import"./studio-90zkgne5.js";import"./studio-61rg2cz5.js";import"./studio-tpxcryf2.js";import"./studio-5tet77de.js";import"./studio-bnc50f9h.js";import"./studio-4zd6an2b.js";import"./studio-acer0g8w.js";import"./studio-wqfaqw4m.js";import"./studio-hh394phe.js";import"./studio-knsjyx7n.js";import"./studio-swedpd82.js";import"./studio-9c6cbq2c.js";import"./studio-sce30r7b.js";import"./studio-q9hx2qp0.js";import"./studio-4fnb5648.js";import"./studio-9dq7rwc7.js";import"./studio-nzemfbkk.js";import"./studio-nvcn2ykc.js";import"./studio-1410q5dw.js";import"./studio-1ks5d9y4.js";export{qP as FILE_ROW_HEIGHT,NT as canMoveInto,Pw as commitRename,JP as createFileIn,DS as findHomePage,RT as initProjectRepo,GP as isFileDrag,OS as listRenameSiblings,Ow as listTakenNames,rl as loadDirectory,$T as loadProject,Em as loadProjectDirectories,ZP as mountFilesPanel,Mw as notifyMoveOutcome,MS as openFileInPane,_i as openFileInTab,UP as openHomePage,Ib as openLastSessionOrHome,IT as openProject,Tm as parentDirOf,KP as pickAndUploadTo,TT as refreshProjectDirectoriesFor,MT as registerFilesPanel,AT as reloadCleanTab,Lm as reloadFileInTab,OT as reloadTabsIfChanged,AS as renameStatus,DT as setSessionWorkspaceShow,VP as setShowIgnoredFiles,YP as settleRename,LT as showIgnoredFiles,XP as unmountFilesPanel,ON as uploadFilesToDir,NS as writeNewFile};
2
2
 
3
3
  //# debugId=111BEFF0F4BA348F64756E2164756E21
4
- //# sourceMappingURL=files-t07yqqej.js.map
4
+ //# sourceMappingURL=files-zrqtgt41.js.map
@@ -1,4 +1,4 @@
1
- import{jt,Ih,od,Dv,l0,sc,ou,Aa,Wi,lf,fn,wl,Nv,lr,AI,Oa,OI}from"./studio-aam8zt8z.js";import"./studio-4fnb5648.js";export{lr as defaultContentFormat,wl as documentExtensions,Aa as formatByExtension,Wi as formatByName,fn as formatForPath,AI as formatParse,Oa as formatSerialize,l0 as getExtensionCatalog,Dv as getExtensions,ou as getFormats,od as loadExtensions,jt as loadFormats,lf as noFormatError,sc as refreshExtensionUi,Ih as refreshFormats,Nv as routedPageExtensions,OI as splitFormatDocument};
1
+ import{jt,Ih,od,Dv,l0,sc,ou,Aa,Wi,lf,fn,wl,Nv,lr,AI,Oa,OI}from"./studio-q9hx2qp0.js";import"./studio-4fnb5648.js";export{lr as defaultContentFormat,wl as documentExtensions,Aa as formatByExtension,Wi as formatByName,fn as formatForPath,AI as formatParse,Oa as formatSerialize,l0 as getExtensionCatalog,Dv as getExtensions,ou as getFormats,od as loadExtensions,jt as loadFormats,lf as noFormatError,sc as refreshExtensionUi,Ih as refreshFormats,Nv as routedPageExtensions,OI as splitFormatDocument};
2
2
 
3
3
  //# debugId=0F1A7F7E2811057864756E2164756E21
4
- //# sourceMappingURL=format-host-5ja5gxyk.js.map
4
+ //# sourceMappingURL=format-host-9gy76erh.js.map
@@ -0,0 +1,4 @@
1
+ import{Ls,Ud,tI}from"./studio-bnc50f9h.js";import"./studio-4zd6an2b.js";import"./studio-hh394phe.js";import"./studio-knsjyx7n.js";import"./studio-swedpd82.js";import"./studio-9c6cbq2c.js";import"./studio-sce30r7b.js";import"./studio-q9hx2qp0.js";import"./studio-4fnb5648.js";import"./studio-nvcn2ykc.js";export{Ud as isRecentLocal,Ls as markLocalMutation,tI as startFsSync};
2
+
3
+ //# debugId=013F41851DCDF49064756E2164756E21
4
+ //# sourceMappingURL=fs-events-45rhg3me.js.map
@@ -0,0 +1,4 @@
1
+ import{HT,BN,HS,BT,zT}from"./studio-2zz4qbv9.js";import"./studio-frc16j8v.js";import"./studio-hfqpfmpk.js";import"./studio-9gr7xs9r.js";import"./studio-v7a7yb5w.js";import"./studio-3pz4t5a2.js";import"./studio-rr00ex23.js";import"./studio-xpx91fby.js";import"./studio-r6mx7vm5.js";import"./studio-xva3hzkv.js";import"./studio-n9qba0gx.js";import"./studio-pwctzka3.js";import"./studio-g9brbewz.js";import"./studio-90zkgne5.js";import"./studio-61rg2cz5.js";import"./studio-tpxcryf2.js";import"./studio-5tet77de.js";import"./studio-bnc50f9h.js";import"./studio-4zd6an2b.js";import"./studio-acer0g8w.js";import"./studio-wqfaqw4m.js";import"./studio-hh394phe.js";import"./studio-knsjyx7n.js";import"./studio-swedpd82.js";import"./studio-9c6cbq2c.js";import"./studio-sce30r7b.js";import"./studio-q9hx2qp0.js";import"./studio-4fnb5648.js";import"./studio-9dq7rwc7.js";import"./studio-nzemfbkk.js";import"./studio-nvcn2ykc.js";import"./studio-1410q5dw.js";import"./studio-1ks5d9y4.js";export{BN as openCollectionGrid,HT as openCsvGridTab,BT as openGridSourcePicker,HS as openPagesGrid,zT as registerGridCommands};
2
+
3
+ //# debugId=D02FED0E1E7282FF64756E2164756E21
4
+ //# sourceMappingURL=grid-open-t4fq6bbm.js.map