@jxsuite/studio 9.0.0 → 10.0.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 (178) hide show
  1. package/dist/chunks/{2020-89fz3pfy.js → 2020-j56903f1.js} +3 -3
  2. package/dist/chunks/adapter-wc5zvg9a.js +4 -0
  3. package/dist/chunks/{add-new-flow-nmkqpjym.js → add-new-flow-snx1s4b0.js} +3 -3
  4. package/dist/chunks/{cf-account-picker-2e06qxey.js → cf-account-picker-xyqw0jex.js} +3 -3
  5. package/dist/chunks/cf-settings-hp1pjm0n.js +4 -0
  6. package/dist/chunks/components-nkwphrx3.js +4 -0
  7. package/dist/chunks/content-source-6a253wmk.js +4 -0
  8. package/dist/chunks/{convert-to-repeater-j9hfcj4f.js → convert-to-repeater-fhdwyg14.js} +3 -3
  9. package/dist/chunks/editor-wqrc68ca.js +4 -0
  10. package/dist/chunks/entry-commands-nef0wrmp.js +4 -0
  11. package/dist/chunks/{extension-sections-thfke054.js → extension-sections-8ez2rrk8.js} +2 -2
  12. package/dist/chunks/file-ops-y3w71k1n.js +4 -0
  13. package/dist/chunks/files-de90apn9.js +4 -0
  14. package/dist/chunks/format-host-zfjz4rzm.js +4 -0
  15. package/dist/chunks/fs-events-77c0mr0x.js +4 -0
  16. package/dist/chunks/grid-open-4n4fjfpf.js +4 -0
  17. package/dist/chunks/{grid-view-7d2nx83y.js → grid-view-ka55z38f.js} +4 -4
  18. package/dist/chunks/iframe-host-na2mywz4.js +4 -0
  19. package/dist/chunks/index-ewmgdb7c.js +4 -0
  20. package/dist/chunks/{index-jxmt7vh8.js → index-qb98xhse.js} +3 -3
  21. package/dist/chunks/{javascript-vmqp56ke.js → javascript-ces13wny.js} +2 -2
  22. package/dist/chunks/{jsonMode-n3wmpant.js → jsonMode-6md16d4v.js} +2 -2
  23. package/dist/chunks/jx-validate-b309c020.js +4 -0
  24. package/dist/chunks/layers-8rn8y6qv.js +4 -0
  25. package/dist/chunks/layers-panel-eyah7h9z.js +4 -0
  26. package/dist/chunks/media-library-gs3np47y.js +4 -0
  27. package/dist/chunks/media-picker-tt7dk4tb.js +4 -0
  28. package/dist/chunks/{monaco-binding-wfhmz89d.js → monaco-binding-p8j80s4w.js} +3 -3
  29. package/dist/chunks/monaco-buffer-wsf6cmnq.js +4 -0
  30. package/dist/chunks/{monaco-setup-fty7a8vg.js → monaco-setup-wasktzfg.js} +2 -2
  31. package/dist/chunks/notify-qwst108r.js +4 -0
  32. package/dist/chunks/platform-c16mqvmp.js +4 -0
  33. package/dist/chunks/publish-panel-d34bhvwj.js +4 -0
  34. package/dist/chunks/{publish-quick-12hh8926.js → publish-quick-vr695j26.js} +3 -3
  35. package/dist/chunks/publish-workspace-2yr60mt4.js +4 -0
  36. package/dist/chunks/quick-search-e6xsdv0d.js +4 -0
  37. package/dist/chunks/references-gsj6trdv.js +4 -0
  38. package/dist/chunks/right-panel-33jv1knc.js +4 -0
  39. package/dist/chunks/source-control-bj9bejjv.js +4 -0
  40. package/dist/chunks/{studio-9ndgd55w.js → studio-03mqh8ax.js} +4 -4
  41. package/dist/chunks/{studio-apapy17g.js → studio-06j4en5h.js} +2 -2
  42. package/dist/chunks/{studio-aghsg0ds.js → studio-0ydxv2mr.js} +6 -6
  43. package/dist/chunks/{studio-ekzbgnjp.js → studio-1e8dw2w2.js} +4 -4
  44. package/dist/chunks/{studio-0nefxhar.js → studio-2hsqbq7b.js} +5 -5
  45. package/dist/chunks/{studio-sm2f0sc6.js → studio-2j86y34y.js} +5 -5
  46. package/dist/chunks/{studio-1cfyd1ys.js → studio-2ks6ka4g.js} +3 -3
  47. package/dist/chunks/{studio-vtey9w98.js → studio-34jrz12k.js} +4 -4
  48. package/dist/chunks/{studio-e4rq6x0q.js → studio-35vrtpdq.js} +4 -4
  49. package/dist/chunks/{studio-a9k86nq6.js → studio-38g0jdz7.js} +4 -4
  50. package/dist/chunks/{studio-9gzvypw4.js → studio-396srjbk.js} +4 -4
  51. package/dist/chunks/{studio-4j35hgsw.js → studio-3c8pp7pb.js} +4 -4
  52. package/dist/chunks/{studio-z1p91z5a.js → studio-3v5cagy9.js} +4 -4
  53. package/dist/chunks/{studio-a6e5fzve.js → studio-3w35qvay.js} +4 -4
  54. package/dist/chunks/{studio-ry4789ng.js → studio-3zge48z4.js} +6 -6
  55. package/dist/chunks/{studio-9ra9e7m4.js → studio-45gyxpcq.js} +4 -4
  56. package/dist/chunks/{studio-tfmhnwyr.js → studio-4kzbrr5t.js} +3 -3
  57. package/dist/chunks/{studio-tyzgte21.js → studio-5tzgq6fx.js} +4 -4
  58. package/dist/chunks/{studio-nqexty8x.js → studio-5wzdy1jc.js} +6 -6
  59. package/dist/chunks/{studio-14hh60j8.js → studio-771k2n12.js} +4 -4
  60. package/dist/chunks/{studio-nm86874b.js → studio-7dzyz9n8.js} +98 -98
  61. package/dist/chunks/{studio-k5n4es74.js → studio-7xag4na8.js} +4 -4
  62. package/dist/chunks/studio-88bmt9rh.js +5 -0
  63. package/dist/chunks/{studio-kyw47pet.js → studio-9b7177jq.js} +4 -4
  64. package/dist/chunks/{studio-yjh9gddd.js → studio-9cxmp61c.js} +5 -5
  65. package/dist/chunks/{studio-qd0cycm4.js → studio-9dz76yqc.js} +5 -5
  66. package/dist/chunks/{studio-cg54vtet.js → studio-agyvzfm4.js} +4 -4
  67. package/dist/chunks/{studio-x2trkhk5.js → studio-c1pxszat.js} +4 -4
  68. package/dist/chunks/{studio-qs5fmhtj.js → studio-cpkamjdn.js} +7 -7
  69. package/dist/chunks/{studio-n4qq1n57.js → studio-d038kqbs.js} +4 -4
  70. package/dist/chunks/{studio-fj6jzgxw.js → studio-d83m0wyq.js} +4 -4
  71. package/dist/chunks/studio-dbxv7w4s.js +5 -0
  72. package/dist/chunks/{studio-7q6jdd4h.js → studio-de1s2x9v.js} +4 -4
  73. package/dist/chunks/{studio-h4jbgne2.js → studio-dx73md4n.js} +6 -6
  74. package/dist/chunks/{studio-nfwacw31.js → studio-ekgtrndg.js} +4 -4
  75. package/dist/chunks/{studio-79r8msnr.js → studio-epenqmvk.js} +3 -3
  76. package/dist/chunks/{studio-sc35ttdk.js → studio-et2q4s8n.js} +4 -4
  77. package/dist/chunks/{studio-g45r5vm8.js → studio-ewarnzm4.js} +2 -2
  78. package/dist/chunks/{studio-nfmpmkqb.js → studio-fy7jzj9j.js} +4 -4
  79. package/dist/chunks/{studio-kqh7fxn6.js → studio-gr36vnte.js} +4 -4
  80. package/dist/chunks/{studio-spza69tb.js → studio-gwrhcrss.js} +5 -5
  81. package/dist/chunks/{studio-8hf8qcm1.js → studio-h310mbqm.js} +4 -4
  82. package/dist/chunks/{studio-qevf5z9d.js → studio-h5tpz5ke.js} +4 -4
  83. package/dist/chunks/studio-h7weqf2q.js +5 -0
  84. package/dist/chunks/{studio-gk9yk8dj.js → studio-hcsba201.js} +6 -6
  85. package/dist/chunks/{studio-ws2r1d7e.js → studio-hwejq03c.js} +4 -4
  86. package/dist/chunks/{studio-9179bsm7.js → studio-hy4ye0dx.js} +6 -6
  87. package/dist/chunks/{studio-myb4mf0h.js → studio-jttyqrmh.js} +4 -4
  88. package/dist/chunks/{studio-k6hbx2fc.js → studio-jw0q5j6k.js} +4 -4
  89. package/dist/chunks/{studio-s4fq9jht.js → studio-k3a8rp3d.js} +4 -4
  90. package/dist/chunks/{studio-by8x0jvc.js → studio-k3bcy02e.js} +4 -4
  91. package/dist/chunks/{studio-3hpcawh8.js → studio-m48v13s3.js} +3 -3
  92. package/dist/chunks/{studio-4qg61g9j.js → studio-ndskgqef.js} +4 -4
  93. package/dist/chunks/studio-p1n2xjda.js +5 -0
  94. package/dist/chunks/{studio-ae7a69jc.js → studio-pgm83a2f.js} +5 -5
  95. package/dist/chunks/{studio-0rg30pvs.js → studio-pqqq6v85.js} +4 -4
  96. package/dist/chunks/{studio-gskkgfe3.js → studio-r17asgs0.js} +4 -4
  97. package/dist/chunks/{studio-8pne0rx4.js → studio-ry81j4q1.js} +4 -4
  98. package/dist/chunks/{studio-mkw17ngg.js → studio-rzg8hnkf.js} +4 -4
  99. package/dist/chunks/{studio-trcfer2b.js → studio-s0fg2wav.js} +4 -4
  100. package/dist/chunks/{studio-gczve8zf.js → studio-tj2s0tks.js} +3 -3
  101. package/dist/chunks/{studio-tn7v8gey.js → studio-v9ywz2se.js} +5 -5
  102. package/dist/chunks/{studio-nvfa137z.js → studio-vswcpzk7.js} +5 -5
  103. package/dist/chunks/{studio-ztppbam0.js → studio-vzgmyt0v.js} +4 -4
  104. package/dist/chunks/{studio-fg4fj9ec.js → studio-wxdcd42g.js} +5 -5
  105. package/dist/chunks/{studio-xzgp0cp7.js → studio-wxhy1yh7.js} +4 -4
  106. package/dist/chunks/{studio-4rgem12q.js → studio-x08a3m0a.js} +4 -4
  107. package/dist/chunks/{studio-t6dqnnft.js → studio-x3mjr5cc.js} +4 -4
  108. package/dist/chunks/{studio-9ff0vqff.js → studio-x97ay0v4.js} +4 -4
  109. package/dist/chunks/{studio-32d8wyxq.js → studio-xdpz9rpe.js} +29 -29
  110. package/dist/chunks/{studio-6k9djnxw.js → studio-xh683qzy.js} +4 -4
  111. package/dist/chunks/{studio-c88gq88j.js → studio-xkxetm65.js} +5 -5
  112. package/dist/chunks/{studio-jr30g4ae.js → studio-y26hx9re.js} +4 -4
  113. package/dist/chunks/{studio-hcy9zeac.js → studio-yg3djpnm.js} +4 -4
  114. package/dist/chunks/studio-yx8hzqja.js +5 -0
  115. package/dist/chunks/{studio-ht81xjkr.js → studio-zg16eeq1.js} +4 -4
  116. package/dist/chunks/{studio-6rbaedw2.js → studio-zgx7svjd.js} +6 -6
  117. package/dist/chunks/{studio-ywf9y1e2.js → studio-zkq3r91p.js} +4 -4
  118. package/dist/chunks/{tsMode-byje4a01.js → tsMode-h6tkz0ea.js} +2 -2
  119. package/dist/chunks/workspace-home-zkkrxq3r.js +4 -0
  120. package/dist/chunks/workspace-tdqqjqaa.js +4 -0
  121. package/dist/chunks/{ws-client-h09h6sqg.js → ws-client-e951my95.js} +3 -3
  122. package/dist/iframe-entry.js +8 -8
  123. package/dist/manifest.json +72 -72
  124. package/dist/studio.js +64 -65
  125. package/package.json +11 -11
  126. package/src/canvas/iframe-editable-root.ts +32 -2
  127. package/src/format/format-host.ts +1 -1
  128. package/src/github/github-auth-status.ts +2 -2
  129. package/src/media/media-library.ts +73 -3
  130. package/src/packages/ensure-deps.ts +5 -5
  131. package/src/packages/pull-package-sync.ts +4 -4
  132. package/src/panels/activity-panel.ts +1 -1
  133. package/src/platforms/cloud.ts +48 -34
  134. package/src/settings/extension-commands.ts +1 -1
  135. package/src/settings/extension-rows.ts +1 -6
  136. package/src/settings/extensions-section.ts +3 -6
  137. package/src/surfaces/block-action-bar.json +1 -3
  138. package/src/surfaces/media-library.json +35 -0
  139. package/src/surfaces/media-library.ts +2 -0
  140. package/src/surfaces/menu.ts +62 -1
  141. package/src/surfaces/settings-packages.ts +1 -1
  142. package/src/types.ts +10 -8
  143. package/src/ui/layers.ts +1 -1
  144. package/src/ui/progress-modal.ts +3 -3
  145. package/dist/chunks/adapter-ay13gema.js +0 -4
  146. package/dist/chunks/cf-settings-5y04810c.js +0 -4
  147. package/dist/chunks/components-3vf75n83.js +0 -4
  148. package/dist/chunks/content-source-4f2raf4a.js +0 -4
  149. package/dist/chunks/editor-645krvtz.js +0 -4
  150. package/dist/chunks/entry-commands-3qmv8wkr.js +0 -4
  151. package/dist/chunks/file-ops-kkhp9ma7.js +0 -4
  152. package/dist/chunks/files-yswdhxrf.js +0 -4
  153. package/dist/chunks/format-host-4g8ex6bz.js +0 -4
  154. package/dist/chunks/fs-events-z9gpvc6t.js +0 -4
  155. package/dist/chunks/grid-open-fm4j183c.js +0 -4
  156. package/dist/chunks/iframe-host-q7fedsmr.js +0 -4
  157. package/dist/chunks/index-pt4wh98x.js +0 -4
  158. package/dist/chunks/jx-validate-19y62knt.js +0 -4
  159. package/dist/chunks/layers-panel-1qvc83y9.js +0 -4
  160. package/dist/chunks/layers-qf0bc7ze.js +0 -4
  161. package/dist/chunks/media-library-f9d5qcjb.js +0 -4
  162. package/dist/chunks/media-picker-rsb1fmk2.js +0 -4
  163. package/dist/chunks/monaco-buffer-ak0raadw.js +0 -4
  164. package/dist/chunks/notify-4qj70q0x.js +0 -4
  165. package/dist/chunks/platform-ehg6t9vd.js +0 -4
  166. package/dist/chunks/publish-panel-yhmda3cd.js +0 -4
  167. package/dist/chunks/publish-workspace-hx8qdv9p.js +0 -4
  168. package/dist/chunks/quick-search-r955m3q1.js +0 -4
  169. package/dist/chunks/references-8gxv0x7t.js +0 -4
  170. package/dist/chunks/right-panel-jarwqjpy.js +0 -4
  171. package/dist/chunks/source-control-84qt25m9.js +0 -4
  172. package/dist/chunks/studio-2bq7hheq.js +0 -5
  173. package/dist/chunks/studio-dvhxxxbd.js +0 -5
  174. package/dist/chunks/studio-ge08zwpv.js +0 -5
  175. package/dist/chunks/studio-nr0kcqc6.js +0 -5
  176. package/dist/chunks/studio-y47090vq.js +0 -5
  177. package/dist/chunks/workspace-7q4arnt3.js +0 -4
  178. package/dist/chunks/workspace-home-ge027kr6.js +0 -4
@@ -1,5 +1,5 @@
1
- import{n,v}from"./studio-ywf9y1e2.js";var S=500;class h extends Error{constructor(){super();this.name="MaxOpsExceededError"}}function zs(e,t){if(e===t)return!0;if(Array.isArray(e)&&Array.isArray(t))return e.length===t.length&&e.every((i,r)=>zs(i,t[r]));if(v(e)&&v(t)){let i=Object.keys(e),r=Object.keys(t);return i.length===r.length&&i.every((a)=>(a in t)&&zs(e[a],t[a]))}return!1}function A(e){let t=5381;for(let i=0;i<e.length;i++)t=Math.imul(t,33)+(e.codePointAt(i)??0);return t.toString(36)}function m(e){return n(e)?`s:${e}`:`n:${A(JSON.stringify(e))}`}function g(e){if(n(e))return"s";let{attributes:t,$props:i}=e,r=(v(t)?t.id:void 0)??(v(i)?i.key:void 0)??"";return`w:${String(e.tagName??"")}:${String(r)}`}function y(e,t,i=Number.POSITIVE_INFINITY){let r=e.length,a=t.length;if(r===0||a===0||r*a>i)return[];let l=Array.from({length:r+1},()=>Array.from({length:a+1},()=>0));for(let s=r-1;s>=0;s--)for(let c=a-1;c>=0;c--)l[s][c]=e[s]===t[c]?l[s+1][c+1]+1:Math.max(l[s+1][c],l[s][c+1]);let f=[],o=0,u=0;while(o<r&&u<a)if(e[o]===t[u])f.push([o,u]),o+=1,u+=1;else if(l[o+1][u]>=l[o][u+1])o+=1;else u+=1;return f}function oT(e,t,i={}){let r=i.maxCells??Number.POSITIVE_INFINITY,a=y(e.map((s)=>m(s)),t.map((s)=>m(s)),r),l=[],f=-1,o=-1,u=[];for(let[s,c]of a)u.push([f+1,s,o+1,c]),l.push({aIndex:s,bIndex:c,identical:!0}),f=s,o=c;u.push([f+1,e.length,o+1,t.length]);for(let[s,c,x,I]of u){let J=e.slice(s,c),O=t.slice(x,I);for(let[M,N]of y(J.map((p)=>g(p)),O.map((p)=>g(p)),r))l.push({aIndex:s+M,bIndex:x+N,identical:!1})}return l.toSorted((s,c)=>s.aIndex-c.aIndex)}function d(e,t){if(e.ops.length>=e.maxOps)throw new h;e.ops.push(t)}function b(e,t,i,r){for(let f of new Set([...Object.keys(i),...Object.keys(r)])){if(f==="children")continue;if(!(f in r))d(e,{key:f,op:"set-key",path:t});else if(!zs(i[f],r[f]))d(e,{key:f,op:"set-key",path:t,value:r[f]})}let a=i.children,l=r.children;if(Array.isArray(a)&&Array.isArray(l))D(e,t,a,l);else if(!zs(a,l))d(e,{key:"children",op:"set-key",path:t,value:l})}function D(e,t,i,r){let a=oT(i,r),l=new Set(a.map((o)=>o.aIndex)),f=new Map(a.map((o)=>[o.bIndex,o]));for(let o=i.length-1;o>=0;o--)if(!l.has(o))d(e,{index:o,op:"remove-child",parentPath:t});for(let[o,u]of r.entries()){let s=f.get(o);if(!s){d(e,{index:o,node:u,op:"insert-child",parentPath:t});continue}if(s.identical)continue;let c=i[s.aIndex];if(v(c)&&v(u))b(e,[...t,"children",o],c,u);else if(!zs(c,u))d(e,{index:o,node:u,op:"set-child",parentPath:t})}}function eP(e,t,i={}){let r={maxOps:i.maxOps??S,ops:[]};try{b(r,[],e,t)}catch(a){if(a instanceof h)return null;throw a}return r.ops}
2
- export{zs,oT,eP};
1
+ import{n,v}from"./studio-zkq3r91p.js";var S=500;class h extends Error{constructor(){super();this.name="MaxOpsExceededError"}}function zs(e,t){if(e===t)return!0;if(Array.isArray(e)&&Array.isArray(t))return e.length===t.length&&e.every((i,r)=>zs(i,t[r]));if(v(e)&&v(t)){let i=Object.keys(e),r=Object.keys(t);return i.length===r.length&&i.every((a)=>(a in t)&&zs(e[a],t[a]))}return!1}function A(e){let t=5381;for(let i=0;i<e.length;i++)t=Math.imul(t,33)+(e.codePointAt(i)??0);return t.toString(36)}function m(e){return n(e)?`s:${e}`:`n:${A(JSON.stringify(e))}`}function g(e){if(n(e))return"s";let{attributes:t,$props:i}=e,r=(v(t)?t.id:void 0)??(v(i)?i.key:void 0)??"";return`w:${String(e.tagName??"")}:${String(r)}`}function y(e,t,i=Number.POSITIVE_INFINITY){let r=e.length,a=t.length;if(r===0||a===0||r*a>i)return[];let l=Array.from({length:r+1},()=>Array.from({length:a+1},()=>0));for(let s=r-1;s>=0;s--)for(let c=a-1;c>=0;c--)l[s][c]=e[s]===t[c]?l[s+1][c+1]+1:Math.max(l[s+1][c],l[s][c+1]);let f=[],o=0,u=0;while(o<r&&u<a)if(e[o]===t[u])f.push([o,u]),o+=1,u+=1;else if(l[o+1][u]>=l[o][u+1])o+=1;else u+=1;return f}function oT(e,t,i={}){let r=i.maxCells??Number.POSITIVE_INFINITY,a=y(e.map((s)=>m(s)),t.map((s)=>m(s)),r),l=[],f=-1,o=-1,u=[];for(let[s,c]of a)u.push([f+1,s,o+1,c]),l.push({aIndex:s,bIndex:c,identical:!0}),f=s,o=c;u.push([f+1,e.length,o+1,t.length]);for(let[s,c,x,I]of u){let J=e.slice(s,c),O=t.slice(x,I);for(let[M,N]of y(J.map((p)=>g(p)),O.map((p)=>g(p)),r))l.push({aIndex:s+M,bIndex:x+N,identical:!1})}return l.toSorted((s,c)=>s.aIndex-c.aIndex)}function d(e,t){if(e.ops.length>=e.maxOps)throw new h;e.ops.push(t)}function b(e,t,i,r){for(let f of new Set([...Object.keys(i),...Object.keys(r)])){if(f==="children")continue;if(!(f in r))d(e,{key:f,op:"set-key",path:t});else if(!zs(i[f],r[f]))d(e,{key:f,op:"set-key",path:t,value:r[f]})}let a=i.children,l=r.children;if(Array.isArray(a)&&Array.isArray(l))D(e,t,a,l);else if(!zs(a,l))d(e,{key:"children",op:"set-key",path:t,value:l})}function D(e,t,i,r){let a=oT(i,r),l=new Set(a.map((o)=>o.aIndex)),f=new Map(a.map((o)=>[o.bIndex,o]));for(let o=i.length-1;o>=0;o--)if(!l.has(o))d(e,{index:o,op:"remove-child",parentPath:t});for(let[o,u]of r.entries()){let s=f.get(o);if(!s){d(e,{index:o,node:u,op:"insert-child",parentPath:t});continue}if(s.identical)continue;let c=i[s.aIndex];if(v(c)&&v(u))b(e,[...t,"children",o],c,u);else if(!zs(c,u))d(e,{index:o,node:u,op:"set-child",parentPath:t})}}function tP(e,t,i={}){let r={maxOps:i.maxOps??S,ops:[]};try{b(r,[],e,t)}catch(a){if(a instanceof h)return null;throw a}return r.ops}
2
+ export{zs,oT,tP};
3
3
 
4
- //# debugId=76E46BCFCB47A7D264756E2164756E21
5
- //# sourceMappingURL=studio-qevf5z9d.js.map
4
+ //# debugId=5332B1A248EB5C0064756E2164756E21
5
+ //# sourceMappingURL=studio-h5tpz5ke.js.map
@@ -0,0 +1,5 @@
1
+ import{p,_e}from"./studio-03mqh8ax.js";import{pt,Uo,IA,Np,fx,xr,DA,Ap}from"./studio-771k2n12.js";import{C}from"./studio-4kzbrr5t.js";import{Ys,tt}from"./studio-jttyqrmh.js";import{n,Z,Ze,Q,v}from"./studio-zkq3r91p.js";var l=null;async function Pd(){if(!_e()||!Q(p().getAccountStatus)){l=null;return}try{l=await p().getAccountStatus?.()??null}catch{l=null}}function sC(){return l}function aC(){return l!==null&&l.installations.length===0&&Boolean(l.appInstallUrl)}function gA(){if(l===null)return null;let e=l.installations.flatMap((r)=>r.manageUrl?[{account:r.account??`Installation ${r.id}`,url:r.manageUrl}]:[]);if(e.length===0&&!l.appInstallUrl)return null;let t={manage:e};if(l.appInstallUrl)t.installUrl=l.appInstallUrl;return t}function bA(){return l?.entries??[]}function i$(){return(l?.notices??[]).filter((e)=>e.display!=="toast")}var L=new Set;function N(){let e=(l?.notices??[]).filter((t)=>t.display==="toast"&&!L.has(t.id));for(let t of e)L.add(t.id);return e}var G="https://jxsuite.com/problems/";function E(e){return typeof e==="string"}function X(e){return typeof e==="object"&&e!==null}function Vb(e){if(!E(e)||!e.startsWith("https://jxsuite.com/problems/"))return null;let t=e.slice(29);return t===""?null:t}function nr(e){if(E(e))return e.trim()===""?null:e;if(!X(e))return null;for(let t of[e.detail,e.error,e.title])if(E(t)&&t.trim()!=="")return t;return null}function rl(e,t){return nr(e)??(t===void 0?"Request failed":`Request failed (${t})`)}var d=(e,t,r,i)=>{let s={status:t,title:r,type:`${G}${e}`};if(i!==void 0)s.extensions=i;return s},ge={invalidRequest:d("invalid-request",400,"The request was malformed or incomplete"),notFound:d("not-found",404,"The requested resource does not exist"),methodNotAllowed:d("method-not-allowed",405,"That method is not allowed on this route"),conflict:d("conflict",409,"The request conflicts with the current state",["conflicts"]),payloadTooLarge:d("payload-too-large",413,"The request body is too large"),unauthorized:d("unauthorized",401,"Credentials are missing or not accepted"),forbidden:d("forbidden",403,"The request was refused"),needsInstallationAccess:d("needs-installation-access",403,"The GitHub App is not installed for that account",["installUrl"]),pathOutsideProject:d("path-outside-project",403,"The path resolves outside the active project"),actionRequired:d("action-required",403,"An action is required first",["actions","heading","retry"]),noActiveProject:d("no-active-project",409,"No project is active on this backend"),capabilityUnavailable:d("capability-unavailable",501,"This backend does not provide that capability"),upstreamFailure:d("upstream-failure",502,"An upstream service failed",["upstream"]),internalError:d("internal-error",500,"The backend failed to complete the request")};var o=(e,t,r,i)=>{let s={method:e,path:t,optional:i!==void 0,summary:r};if(i!==void 0)s.degradation=i;return s},he={activate:o("POST","/__studio/activate","Bind the backend to a project root"),project:o("GET","/__studio/project","Root project metadata {name, root}"),projectInfo:o("GET","/__studio/project-info","Probe a directory: {isSiteProject, projectConfig?, directories?}"),resolveSite:o("GET","/__studio/resolve-site","Resolve the owning site of a file path {sitePath, projectConfig?, fileRelPath?}"),sites:o("GET","/__studio/sites","Enumerate site projects [{config, path}] (backs listProjects)","The welcome screen's Projects catalogue stays hidden."),createProject:o("POST","/__studio/create-project","Scaffold a project at a caller-chosen destination → {root, config}"),starters:o("GET","/__studio/starters","Starter templates (StarterInfo[])","The New Project picker offers only blank/templates."),importSite:o("POST","/__studio/import-site","Clone a live website into a project; streams NDJSON progress","The New Project Import tab is unavailable."),files:o("GET","/__studio/files","List a directory (DirEntry[]) in stable path order; an entry may carry an opaque content `version` the backend vouches for; with ?glob=<pattern>, search matching files project-wide"),fileRead:o("GET","/__studio/file","Read a file's text content"),filesRead:o("POST","/__studio/files/read","Read many files' text content {paths} → ReadFilesResult {files: [path, {content} | "+"{error: {status, code?, message}}][], omitted}. At most READ_FILES_MAX_PATHS (200) paths and a backend byte budget per call: the excess is listed in `omitted` (never a 400) and the first path is always answered. Per-path errors: 404 missing/deleted, 415 binary, 413 too large, 502 upstream. Allowed for read-only sessions; keeps fileRead's server-side effects","Adapters fall back to one fileRead per path."),fileWrite:o("PUT","/__studio/file","Write a file's text content"),fileDelete:o("DELETE","/__studio/file","Delete a file"),fileUpload:o("POST","/__studio/file/upload","Upload binary content to a path → UploadResult {path, size?}. `path` is the answer, not an "+"echo: a store that de-duplicates, suffixes, or normalizes names reports what it really wrote"),fileBytes:o("GET","/__studio/file/bytes","A project file's raw bytes, undecoded — the read side of `fileUpload`, for a caller that must "+"not go through UTF-8","Studio can only read a project file as text, so any surface that must decode one stays hidden."),documentRaw:o("GET","/__studio/raw/","A project file as its own bytes, at its own URL — the mount a canvas renders against when "+"the editor origin does not serve the site's URL space. The project-relative path is appended to this prefix","The canvas cannot address project files by URL, so a host whose origin does not serve the site URL space renders no component $refs and no images."),fileRename:o("POST","/__studio/file/rename","Rename/move (+ refactor report). `from`/`to` are server-root-relative; every path in the "+"report is relative to the active project (specs/server.md §4.1)"),references:o("GET","/__studio/references","Where a file or a component tag is used (?path=&tag=, at least one) → ReferencesResult "+"{files, filesReferencing, refsTotal} — the read side of the rename refactor's own walker, "+"cached until the backend's watcher sees the tree move (backs findReferences). `?path=` is server-root-relative and every path in the answer is relative to the active project; a "+"target outside that project is a 400, never a zero-result 200 (specs/server.md §4.1)",'Usage counts are hidden: no "Used on N pages" in the inspector, no Selection: Find Usages, and delete/rename confirmations state no reference count.'),locate:o("POST","/__studio/locate","Find a file by name → {path | null}"),collab:o("GET","/__studio/collab","Realtime co-editing: a WebSocket upgrade speaking the @jxsuite/collab wire envelope (one socket per project, documents multiplexed by path; y-protocols sync + project-level "+"awareness in lib0 binary frames — see @jxsuite/collab/envelope for the frame layout and "+"the docEpoch/doc-reset lifecycle). A plain GET (no Upgrade) answers {collab, protocols, version} as the capability probe, and `protocols` is the subprotocol negotiation: the client offers one of them as Sec-WebSocket-Protocol and the server echoes it, or the "+"client offers none when the server advertises none, because RFC 6455 §4.1 fails a "+"connection whose offer went unechoed.","Realtime co-editing is unavailable; Studio edits solo with file-level saves"),components:o("GET","/__studio/components","Discover components (ComponentMeta[])"),cem:o("GET","/__studio/cem","Custom-elements manifest of an npm dependency","Dependency components lose prop/slot metadata."),formats:o("GET","/__studio/formats","The project's format registry entries plus a sibling `extensions` array — per enabled "+"extension its manifest identity and project-section contributions (ExtensionsInfo[]; backs listFormats and listExtensions).","Only .json documents open (backs listFormats); descriptor-contributed settings sections do not appear."),extensionCatalog:o("GET","/__studio/catalog","Extensions this backend can OFFER (ExtensionCatalogEntry[]) — the shipped first-party "+"catalogue plus any package in the project's own dependencies exporting a jx-extension.json, each marked with whether the host resolves it without a project install and whether the project has it installed. A capability rather than a constant: a Worker ships a fixed set "+"of extension packages (specs/extensions.md §5.5). Backs listExtensionCatalog.","The Extensions section offers no catalogue; adding an extension stays a typed package name."),projectSchemas:o("GET","/__studio/project-schemas","The project's generated entry documents (project.schema.json / document.schema.json), "+"PRE-BUNDLED into self-contained schemas — {project, document} (backs fetchProjectSchemas). "+"Regenerated on demand when missing or older than project.json.","The JSON editor falls back to the bundled core schemas (extension sections get no editor validation/completion)."),format:o("POST","/__studio/format","Dispatch a format capability {format, action: parse|serialize, source?|doc?}","Non-JSON documents cannot be parsed/serialized (backs formatAction)."),pluginSchema:o("GET","/__studio/plugin-schema","Extract a $studio schema from a class source","Plugin property panels fall back to generic JSON editing."),codeFormat:o("POST","/__studio/code/format","Format posted source {code, path?} → {code, errors}","Code editors skip format-on-open/save (codeService returns null)."),codeMinify:o("POST","/__studio/code/minify","Minify posted source {code} → {code}","Compiled-output minification is skipped."),codeLint:o("POST","/__studio/code/lint","Lint posted source {code, path?} → {diagnostics}","Code editors show no lint markers."),buildSite:o("POST","/__studio/build","Build or render the site → {routes, files, errors, mode?, url}","Build Site reports that this target cannot build."),previewSite:o("POST","/__studio/preview","Preview the working tree at a route → {routes, files, errors, mode, url, reused}","Open in Browser falls back to buildSite."),previewOverlay:o("POST","/__studio/preview/overlay","Publish (POST) or retract (DELETE) a document's unsaved bytes → 204","A live preview shows the last saved state instead of the editor's."),packages:o("GET","/__studio/packages","List dependencies (PackageInfo[])"),packagesAdd:o("POST","/__studio/packages/add","Add a registry dependency, writing package.json and package-lock.json together"),packagesRemove:o("POST","/__studio/packages/remove","Remove a dependency, writing package.json and package-lock.json together"),packagesInstall:o("POST","/__studio/packages/install","Install the declared dependencies (npm's installer, writing package-lock.json)","Install/reinstall affordances are hidden; add, remove and version updates still work where the backend serves them (a cloud session updates the lockfile without installing)."),packagesNeedsInstall:o("GET","/__studio/packages/needs-install","Whether node_modules is stale","The install-on-open prompt never shows."),packagesVersions:o("GET","/__studio/packages/versions","Newest published version of each dependency (PackageVersionInfo[])","The Latest column stays empty and the update affordances are hidden."),packagesSetVersions:o("POST","/__studio/packages/set-versions","Rewrite dependency ranges and install (lockfile-only where nothing installs)","Bulk version updates are hidden."),gitStatus:o("GET","/__studio/git/status","Working-tree status (GitStatusResult)"),gitBranches:o("GET","/__studio/git/branches","Branch list (GitBranchesResult)"),gitLog:o("GET","/__studio/git/log","Recent commits (GitLogEntry[])"),gitStage:o("POST","/__studio/git/stage","Stage files"),gitUnstage:o("POST","/__studio/git/unstage","Unstage files"),gitCommit:o("POST","/__studio/git/commit","Commit staged (else all dirty) files"),gitPush:o("POST","/__studio/git/push","Push (cloud: sync check — commits land on push)"),gitPull:o("POST","/__studio/git/pull","Pull/fast-forward; 409 {conflicts} on overlap"),gitFetch:o("POST","/__studio/git/fetch","Refresh remote tracking state"),gitCheckout:o("POST","/__studio/git/checkout","Switch branches"),gitCreateBranch:o("POST","/__studio/git/create-branch","Create a branch"),gitDiff:o("GET","/__studio/git/diff","Unified diff of dirty files (or one path)"),gitShow:o("GET","/__studio/git/show","File content at a ref"),gitDiscard:o("POST","/__studio/git/discard","Discard working changes"),gitInit:o("POST","/__studio/git/init","Initialize a repository"),gitAddRemote:o("POST","/__studio/git/add-remote","Add a remote"),gitClone:o("POST","/__studio/git/clone","Clone a repository","The welcome screen hides Clone Git Repository."),gitPr:o("POST","/__studio/git/pr","Open a pull request → PullRequestInfo","Studio falls back to a direct GitHub API call with the user's token."),dataConnections:o("GET","/__studio/data/connections","Connector connections with configured/missingSecrets/isDefault state, reachable table names, and registry-descriptor provider metadata (DataConnectionsResponse; backs dataConnections)","The connections settings section shows no status, and data-domain actions stay hidden."),dataConnectionTest:o("POST","/__studio/data/connections/test","Probe a connection {connection} → DataConnectionTestResult (backs dataConnectionTest)","The Test Connection action is hidden."),dataPush:o("POST","/__studio/data/push","Additive schema push {connection?, dryRun?} → DataPushResult (plan of DataPushStep[], "+"applied, warnings/errors; backs dataPush)","The Push Schema action is hidden; schemas deploy via `jx db push` instead."),dataRows:o("GET","/__studio/data/rows","Page a table (DataRowsQuery params) → DataRowsResult {rows, total, columns} (backs dataRows)","The data grid is unavailable."),dataInsertRow:o("POST","/__studio/data/rows","Insert a row {table, connection?, values} → {row} (backs dataInsertRow)","The data grid hides its add-row footer."),dataUpdateRow:o("PUT","/__studio/data/rows","Update a row keyed on its primary key {table, connection?, pk, set} → {row} (backs "+"dataUpdateRow)","Data grid cells are read-only."),dataDeleteRow:o("DELETE","/__studio/data/rows","Delete a row (?table=&pk=&connection=) → {ok} (backs dataDeleteRow)","The data grid hides row deletion."),secretsList:o("GET","/__studio/secrets","Configured secret env-var NAMES, never values (SecretsListResponse; backs listSecrets)","Secret fields cannot show set/unset state."),secretsSet:o("PUT","/__studio/secrets","Write/remove secrets in the backend store (.dev.vars locally) {set?, remove?} → names "+"(backs setSecrets)","The secret form control renders disabled; secrets are edited in .dev.vars by hand."),aiChat:o("POST","/__studio/ai/chat","StreamEvent SSE chat proxy {messages, tools, systemPrompt, model}"),aiModels:o("GET","/__studio/ai/models","Model catalogue (AiModelsResponse)"),cfProxy:o("POST","/__studio/cf/proxy","Allowlisted Cloudflare API passthrough {path, method?, body?} (backs cfApi)","The Publish panel explains the git-push publishing path instead.")};var o$=200,r$=100,s$=12;var Y=new Set(["reload","repeat","none"]);function Dp(e){if(!Array.isArray(e))return[];return e.flatMap((r)=>{if(!v(r))return[];let{href:i,id:s,label:f,primary:g}=r;if(!n(s)||!s||!n(f)||!f)return[];let c={id:s,label:f};if(n(i)&&i)c.href=i;if(g===!0)c.primary=!0;return[c]})}function q(e){return n(e)&&Y.has(e)}function a$(e){return q(e)?e:void 0}function ee(e){return e.replaceAll("_","-")}function _(e){if(!v(e))return{};let{actions:t,code:r,heading:i,installUrl:s,retry:f,type:g}=e,c={},a=Vb(g)??(n(r)?ee(r):null);if(a!==null)c.code=a;if(n(s))c.installUrl=s;if(t!==void 0)c.actions=Dp(t);if(n(i)&&i)c.heading=i;if(q(f))c.retry=f;return c}function vA(e){let t=_(e);return t.code==="needs-installation-access"&&t.installUrl?t.installUrl:null}function yA(e){return _(e).code==="action-required"}function Fd(){return Uo(pt.aiOpenAiKey)}function wA(e){xr(pt.aiOpenAiKey,e||"")}function dx(){return IA(pt.aiOpenAiKey)}function sl(){return Uo(pt.aiBaseUrl)}function ux(){return Uo(pt.aiModel)}function xA(e){xr(pt.aiModel,e||"")}function _A(e){DA([[pt.aiOpenAiKey,e.apiKey],[pt.aiBaseUrl,e.baseUrl],[pt.aiModel,e.model]])}function SA(e){return!Lm(pt.aiOpenAiKey,e.apiKey,Fd())||!Lm(pt.aiBaseUrl,e.baseUrl,sl())||!Lm(pt.aiModel,e.model,ux())}function Lm(e,t,r){return fx(e,t)===fx(e,r)}function CA(){Ap([pt.aiOpenAiKey,pt.aiBaseUrl,pt.aiModel])}function lC(){return{apiKey:Fd(),baseUrl:sl()}}function V(e){return`${e.apiKey}\x00${e.baseUrl}`}var m=null,P="",j=!1,A=!1,D="",M,I="",R=null,U=null,F=new Set,te=600000,S=0,J=!1;function ds(){m=null,P="",j=!1,A=!1,D="",M=void 0,I="",R=null,U=null,S=0}var ne=new Set([pt.aiOpenAiKey.key,pt.aiBaseUrl.key,pt.cfToken.key,pt.cfAccountId.key]);Np((e)=>{if(e.some((t)=>ne.has(t)))ds()});function l$(e){return m&&P===V(e)?m:null}function K(e){return m?.find((t)=>t.id===e)}function c$(e){return K(e)?.toolSupport}function kA(e){return K(e)?.contextWindow}function hx(e){if(e)F.add(e);U??=ah({force:!0}).catch(()=>{}).then(()=>{S=Date.now();for(let t of F)t()})}function oe(){if(!A||S===0||Date.now()-S<te)return!1;return U=null,S=0,hx(),!0}function re(){if(typeof window>"u"||J)return;J=!0,window.addEventListener("focus",()=>{oe()})}re();function Ub(){return dx()||cC()}function cC(){return j}function EA(){return A}function $m(){return M}function TA(){return I}function dC(){return R}function ie(){return D}function Kl(){return ux()||ie()||pt.aiModel.default}function se(e,t){let r;try{r=new URL(e,"http://jx.invalid")}catch{return e}return r.pathname=r.pathname.replace(/[^/]*$/,t),/^https?:/i.test(e)?r.href:`${r.pathname}${r.search}`}async function ah(e={}){let t=e.credentials??lC(),r=V(t);if(m&&P===r&&!e.force)return m;let i=p(),s=await Promise.resolve(i.aiChatUrl()),f=se(s,"models"),g={};if(t.apiKey)g["X-Api-Key"]=t.apiKey;if(t.baseUrl)g["X-Api-Base-URL"]=t.baseUrl;let c=await fetch(f,{headers:g});if(!c.ok)throw Error(`HTTP ${c.status}`);let a=await c.json();if(j=a.configured===!0,A=a.managed===!0,D=a.defaultModel??"",M=a.code,I=a.upstreamError!==void 0?a.upstreamMessage??"":"",R=null,a.code==="action_required"){let u={actions:Dp(a.actions)};if(n(a.detail)&&a.detail)u.detail=a.detail;R=u}return m=(a.models||[]).map((u)=>{let h={id:u.id,name:u.name||u.id};if(Z(u.contextWindow))h.contextWindow=u.contextWindow;if(Ze(u.toolSupport))h.toolSupport=u.toolSupport;return h}),P=r,m}var T=new Set,B=null;function LA(e){if(T.size===0){B=e;return}for(let t of T)t(e)}function H(e){T.add(e);let t=B;if(B=null,t)e(t);return()=>{T.delete(e)}}function uC(){return _e()&&Q(p().performAction)}function d$(e){let t=e.find((i)=>i.primary)??e[0];if(!t)return null;let r=e.find((i)=>i!==t);return r?{lead:t,other:r}:{lead:t}}var w=null,W=!1;function hC(e){let t=d$(e.actions);if(!uC()||!t)return Promise.resolve(!1);return w??=ae(e,t).finally(()=>{w=null}),w}async function Im(e){let t=_(e);if(t.code!=="action-required"||!t.actions?.length)return!1;return hC({actions:t.actions,detail:e instanceof Error?e.message:void 0,heading:t.heading,retry:t.retry})}async function z(){ds(),await Pd(),u$()}function ae(e,t){let r=e.detail??"This needs one more step first.";return new Promise((i)=>{let s="offer",f=(y)=>{if(s==="done")return;s="done",O.close(),i(y)},g=(y)=>{s="offer",O.update({cancelLabel:"Not now",confirmLabel:t.lead.label,message:y,secondaryLabel:t.other?.label??""})},c=async(y)=>{let b;try{b=await y}catch(x){if(s==="waiting")g(x instanceof Error?x.message:String(x));return}if(b?.status==="done"){await z(),f(!0);return}if(s!=="waiting"||!b||b.status==="redirect")return;Pd(),g(r)},a=(y)=>{if(s!=="offer")return;s="waiting";let b;try{b=p().performAction(y)}catch(x){g(x instanceof Error?x.message:String(x));return}O.update({cancelLabel:"Cancel",confirmLabel:"Waiting…",message:"Finish in the window that opened. This closes by itself once it is done.",secondaryLabel:""}),c(b)},{lead:u,other:h}=t,k={cancelLabel:"Not now",confirmLabel:u.label,headline:e.heading??"One more step",layer:tt("dialog"),message:r,onCancel:()=>{W=!0,f(!1)},onClosed:()=>{f(!1)},onConfirm:()=>{a(u)},region:"account/action"};if(h)k.onSecondary=()=>{a(h)},k.secondaryLabel=h.label;let O=Ys(k)})}function ce(e){if(e==="reload")location.reload();else if(e==="repeat")C.info("Done. Run that again now.",{key:"account.action.retry",source:"Account"})}function $A(){return H((e)=>{if(W||w)return;hC(e).then((t)=>{if(t)ce(e.retry)})})}async function px(e){if(!uC())return!1;let t=p().performAction(e),r;try{r=await t}catch(i){return C.error(i instanceof Error?i.message:String(i),{key:"account.action",source:"Account",tier:"toast"}),!1}if(r?.status==="done")return await z(),!0;if(r?.status!=="redirect")await Pd();return!1}function u$(){for(let e of N()){let t={key:`account.notice.${e.id}`,source:"Account"};if(e.level==="warning")C.warn(e.message,t);else C.info(e.message,t)}}
2
+ export{Pd,sC,aC,gA,bA,i$,Vb,nr,rl,o$,r$,s$,Dp,a$,vA,yA,Fd,wA,dx,sl,ux,xA,_A,SA,Lm,CA,lC,ds,l$,c$,kA,hx,Ub,cC,EA,$m,TA,dC,Kl,ah,LA,uC,d$,hC,Im,$A,px,u$};
3
+
4
+ //# debugId=0296875224BA87A964756E2164756E21
5
+ //# sourceMappingURL=studio-h7weqf2q.js.map