efficient-shell 13.19.0 → 13.20.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 (64) hide show
  1. package/README.md +40 -1
  2. package/dist/{Browser-ZTKWHNYX.js → Browser-XFEOOL5J.js} +12 -12
  3. package/dist/Calculator-V5SACDGQ.js +29 -0
  4. package/dist/CurrencyConverter-B3NWE6LM.js +21 -0
  5. package/dist/{Files-R2IVXZJJ.js → Files-LRSNSZ5Y.js} +68 -68
  6. package/dist/Notepad-GGBFJNRE.js +24 -0
  7. package/dist/PomodoroTimer-XLPBKMWS.js +91 -0
  8. package/dist/{Preview-STATKTFB.js → Preview-CWGCGKR5.js} +20 -20
  9. package/dist/{Stock-S266KGAF.js → Stock-PRUMXULJ.js} +4 -4
  10. package/dist/{Weather-TE4TTTQA.js → Weather-FO5DVYQ4.js} +18 -18
  11. package/dist/{WorldClock-5TPBHBYA.js → WorldClock-BYZ5BNLZ.js} +4 -4
  12. package/dist/ai/index.js +8 -8
  13. package/dist/apps/index.d.ts +1 -1
  14. package/dist/apps/index.js +1 -1
  15. package/dist/bin/browser-check.js +1 -1
  16. package/dist/bin/media-host-check.js +1 -1
  17. package/dist/bin/ui-check.js +1 -1
  18. package/dist/brand.css +1 -1
  19. package/dist/chunk-2TXQCA4C.js +15 -0
  20. package/dist/{chunk-IQPYTW2O.js → chunk-5EC62E65.js} +2 -2
  21. package/dist/{chunk-GEQZUCEO.js → chunk-BVX7LUAW.js} +6 -6
  22. package/dist/{chunk-LUCO5PS6.js → chunk-F3E3CEZM.js} +1 -1
  23. package/dist/{chunk-QTDR2CTB.js → chunk-IUQJGFEO.js} +3 -3
  24. package/dist/chunk-IXJIHTUI.js +91 -0
  25. package/dist/{chunk-4SYPNE3P.js → chunk-J4CVYOY3.js} +1 -1
  26. package/dist/{chunk-46A3BMJB.js → chunk-JGKUENPD.js} +1 -1
  27. package/dist/{chunk-ENVANMHI.js → chunk-SHHRC5XK.js} +7 -7
  28. package/dist/{chunk-EHM3ZVVT.js → chunk-UC5IC3AM.js} +4 -4
  29. package/dist/chunk-VGUYAVDG.js +1 -0
  30. package/dist/{chunk-TKCCJRPE.js → chunk-VRJKV44O.js} +1 -1
  31. package/dist/{chunk-34HRPEQD.js → chunk-XOCRRCCP.js} +1 -1
  32. package/dist/{chunk-S7YUQLBN.js → chunk-XXTAMF3O.js} +6 -6
  33. package/dist/{chunk-QSJMLHBD.js → chunk-YE2YU526.js} +1 -1
  34. package/dist/chunk-YI4T5I5D.js +1 -0
  35. package/dist/data/EntityList.js +1 -1
  36. package/dist/data/ResizableTable.js +1 -1
  37. package/dist/forms/BrandAssetEditor.js +1 -1
  38. package/dist/forms/MediaLibrary.js +1 -1
  39. package/dist/forms/MediaUploadField.js +1 -1
  40. package/dist/hooks/index.d.ts +2 -2
  41. package/dist/hooks/useTheme.d.ts +1 -1
  42. package/dist/icons/index.js +1 -1
  43. package/dist/index.d.ts +4 -3
  44. package/dist/index.js +662 -665
  45. package/dist/shell/LanguageSelect.js +1 -1
  46. package/dist/shell/SettingRow.js +1 -1
  47. package/dist/shell/SidebarLayout.d.ts +5 -2
  48. package/dist/shell/SidebarLayout.js +1 -1
  49. package/dist/telemetry/index.js +1 -1
  50. package/dist/templates/ChatTemplate.js +1 -1
  51. package/dist/templates/EmailTemplate.js +1 -1
  52. package/dist/tokens/colour.d.ts +2 -2
  53. package/dist/{types-ClT92-8Z.d.ts → types-DWIjEVSy.d.ts} +5 -5
  54. package/dist/ui/index.js +1 -1
  55. package/dist/ui.css +11 -0
  56. package/dist/version.js +1 -1
  57. package/package.json +1 -1
  58. package/dist/Calculator-4UBMDAJO.js +0 -29
  59. package/dist/CurrencyConverter-H3HHXXKT.js +0 -21
  60. package/dist/Notepad-Z2XMVRSD.js +0 -24
  61. package/dist/PomodoroTimer-JVCYYGRD.js +0 -91
  62. package/dist/chunk-HNMWF6OG.js +0 -1
  63. package/dist/chunk-U5RG34NE.js +0 -14
  64. package/dist/chunk-ZI2FDUYJ.js +0 -99
@@ -1,13 +1,13 @@
1
- import{copyToClipboard as e,selectionAt as t}from"./chunk-UFX7F3KG.js";import{useTableNav as n}from"./chunk-ATMJ5ZPK.js";import{escapeHtml as r}from"./chunk-G6DKCCWH.js";import{ListFooter as o}from"./chunk-DO3DSSAW.js";import{ListLoadError as l}from"./chunk-MVOYVN3S.js";import{ResizableTable as i}from"./chunk-4SYPNE3P.js";import{Checkbox_default as a}from"./chunk-CGZBDI6C.js";import{LoadingSpinner as c}from"./chunk-4U5M37SF.js";import{PopupMenu as d,PopupMenuLabel as s,PopupMenuItem as h,PopupMenuDivider as m}from"./chunk-THAPVKEJ.js";import{keepsNativeMenu as u}from"./chunk-5QFPTDQF.js";import{LoadingSpinner as p}from"./chunk-R2VKEMZH.js";import{shellHttp as f}from"./chunk-STKJA4PV.js";import{toast_default as g}from"./chunk-VQ35LXDC.js";import{useShellStrings as y}from"./chunk-IUVGHHR3.js";import{useState as k,useRef as b}from"react";import{jsx as x,Fragment as w,jsxs as C}from"react/jsx-runtime";function j(e){return Array.from(e.children).filter(e=>void 0!==e.dataset?.colKey&&"_select"!==e.dataset.colKey)}function v(e){return("string"==typeof e.innerText?e.innerText:e.textContent??"").replace(/\s+/g," ").trim()}function S(S){const{items:R,isLoading:N,emptyState:L,totalCount:$,isError:A,onRetry:T,errorTitle:E,errorMessage:K,tableId:M,columns:P,renderCell:F,getRowId:D=e=>e.id,sort:U,onSort:H,selected:I,setSelected:V,onRowClick:O,onRowHover:W,getRowClassName:G,footerLabel:J,footerExtra:_,footerExtraAfter:B,sentinelRef:Q,isFetchingNextPage:X,saveDefaultPerms:Y,exportEndpoint:Z,exportFilename:z="export.csv",contextActions:q}=S,[ee,te]=k(null),ne=b(null),re=y(),oe=re.entityList,le=e=>{V(t=>{const n=new Set(t),r=D(e);return n.has(r)?n.delete(r):n.add(r),n})},ie=()=>{V(e=>{const t=R.map(D),n=new Set(e);return t.every(t=>e.has(t))?t.forEach(e=>n.delete(e)):t.forEach(e=>n.add(e)),n})},ae=n(R,O,le,ie,(e,t)=>{V(n=>{const r=new Set(n);for(let n=e;n<=t;n++)r.add(D(R[n]));return r})},ne),ce=R.filter(e=>I.has(D(e))),de=()=>{const e=[...ne.current?.querySelectorAll("tr[data-row-idx]")??[]].filter(e=>{const t=R[Number(e.dataset.rowIdx)];return void 0!==t&&I.has(D(t))}),t=e.length?j(e[0]).map(e=>e.dataset.colKey??""):[],n=new Map(P.map(e=>[e.key,e.label]));return{keys:t,header:t.map(e=>n.get(e)??e),body:e.map(e=>j(e).map(v))}},se=()=>{te(null);const{header:t,body:n}=de();if(!n.length)return;const o=[t,...n].map(e=>e.join("\t")).join("\n"),l="<table><thead><tr>"+t.map(e=>`<th>${r(e)}</th>`).join("")+"</tr></thead><tbody>"+n.map(e=>`<tr>${e.map(e=>`<td>${r(e)}</td>`).join("")}</tr>`).join("")+"</tbody></table>";e(oe.copiedRows(n.length),o,l)},he=async()=>{te(null);const e=ce.map(D);if(!e.length||!Z)return;const t=new URLSearchParams({ids:e.join(",")}),n=(()=>{const e=new Map(P.map(e=>[e.key,e.exportLabel??e.label]));try{const t=localStorage.getItem(`col-config-${M}`);if(t){const n=JSON.parse(t).filter(t=>!t.hidden&&"_select"!==t.key&&e.has(t.key)).map(t=>`${t.key}|${e.get(t.key)}`);if(n.length)return n.join(",")}}catch{}return P.filter(e=>!e.defaultHidden).map(e=>`${e.key}|${e.exportLabel??e.label}`).join(",")})();n&&t.set("cols",n);const r=Z.includes("?")?"&":"?";try{const n=await f.get(`${Z}${r}${t}`,{responseType:"blob"}),o=window.URL.createObjectURL(new Blob([n.data],{type:"text/csv"})),l=document.createElement("a");l.href=o,l.download=z,l.click(),window.URL.revokeObjectURL(o);const i=n.headers??{},a=Number(i["x-row-count"]);if("true"===String(i["x-truncated"]))return void g.notify(Number.isFinite(a)?oe.exportTruncated(a,e.length):oe.exportTruncatedUnknown(e.length));g.success(oe.exported(e.length))}catch{g.error(oe.exportFailed)}};if(N)/* @__PURE__ */return x(c,{});if(A&&0===R.length)/* @__PURE__ */
2
- return x(l,{title:E,message:K,onRetry:T});if(0===R.length)/* @__PURE__ */return x(w,{children:L});const me=R.length>0&&ce.length===R.length,ue=ce.length>0&&!me,pe=I.size-ce.length,fe=[{key:"_select",label:"",defaultWidth:52,minWidth:52,headerNode:/* @__PURE__ */x(a,{"aria-label":re.table.selectAll,checked:me,indeterminate:ue,onChange:ie,style:{height:14,width:14}})},...P],ge=/* @__PURE__ */x(o,{selectedCount:ce.length,hiddenSelectedCount:pe,loadedCount:R.length,totalCount:$,label:J,isFetchingMore:X,extra:_,extraAfter:B}),ye=Q?/* @__PURE__ */C(w,{children:[
3
- /* @__PURE__ */x("div",{ref:Q}),X&&/* @__PURE__ */x(p,{size:"sm",padding:"py-3",label:re.list.loadingMore})]}):void 0;let ke=null;if(ee){const{x:t,y:n,item:r,text:o,firstColumn:l}=ee,i=q?q(ce):[],a=ce.length,c=()=>te(null),u=void 0!==$&&$>R.length;ke=/* @__PURE__ */C(d,{portal:!0,style:{left:t,top:n},onClose:c,minWidth:210,children:[
1
+ import{copyToClipboard as e,selectionAt as t}from"./chunk-UFX7F3KG.js";import{useTableNav as n}from"./chunk-ATMJ5ZPK.js";import{escapeHtml as r}from"./chunk-G6DKCCWH.js";import{ListFooter as o}from"./chunk-DO3DSSAW.js";import{ListLoadError as l}from"./chunk-MVOYVN3S.js";import{ResizableTable as i}from"./chunk-J4CVYOY3.js";import{Checkbox_default as a}from"./chunk-CGZBDI6C.js";import{LoadingSpinner as c}from"./chunk-4U5M37SF.js";import{PopupMenu as d,PopupMenuLabel as s,PopupMenuItem as h,PopupMenuDivider as m}from"./chunk-THAPVKEJ.js";import{keepsNativeMenu as u}from"./chunk-5QFPTDQF.js";import{LoadingSpinner as p}from"./chunk-R2VKEMZH.js";import{shellHttp as f}from"./chunk-STKJA4PV.js";import{toast_default as g}from"./chunk-VQ35LXDC.js";import{useShellStrings as y}from"./chunk-IUVGHHR3.js";import{useState as k,useRef as b}from"react";import{jsx as x,Fragment as w,jsxs as C}from"react/jsx-runtime";function j(e){return Array.from(e.children).filter(e=>void 0!==e.dataset?.colKey&&"_select"!==e.dataset.colKey)}function v(e){return("string"==typeof e.innerText?e.innerText:e.textContent??"").replace(/\s+/g," ").trim()}function S(S){const{items:R,isLoading:N,emptyState:L,totalCount:$,isError:A,onRetry:T,errorTitle:K,errorMessage:M,tableId:E,columns:F,renderCell:D,getRowId:P=e=>e.id,sort:U,onSort:V,selected:H,setSelected:I,onRowClick:O,onRowHover:J,getRowClassName:W,footerLabel:G,footerExtra:Y,footerExtraAfter:_,sentinelRef:B,isFetchingNextPage:Q,saveDefaultPerms:X,exportEndpoint:Z,exportFilename:z="export.csv",contextActions:q}=S,[ee,te]=k(null),ne=b(null),re=y(),oe=re.entityList,le=e=>{I(t=>{const n=new Set(t),r=P(e);return n.has(r)?n.delete(r):n.add(r),n})},ie=()=>{I(e=>{const t=R.map(P),n=new Set(e);return t.every(t=>e.has(t))?t.forEach(e=>n.delete(e)):t.forEach(e=>n.add(e)),n})},ae=n(R,O,le,ie,(e,t)=>{I(n=>{const r=new Set(n);for(let n=e;n<=t;n++)r.add(P(R[n]));return r})},ne),ce=R.filter(e=>H.has(P(e))),de=()=>{const e=[...ne.current?.querySelectorAll("tr[data-row-idx]")??[]].filter(e=>{const t=R[Number(e.dataset.rowIdx)];return void 0!==t&&H.has(P(t))}),t=e.length?j(e[0]).map(e=>e.dataset.colKey??""):[],n=new Map(F.map(e=>[e.key,e.label]));return{keys:t,header:t.map(e=>n.get(e)??e),body:e.map(e=>j(e).map(v))}},se=()=>{te(null);const{header:t,body:n}=de();if(!n.length)return;const o=[t,...n].map(e=>e.join("\t")).join("\n"),l="<table><thead><tr>"+t.map(e=>`<th>${r(e)}</th>`).join("")+"</tr></thead><tbody>"+n.map(e=>`<tr>${e.map(e=>`<td>${r(e)}</td>`).join("")}</tr>`).join("")+"</tbody></table>";e(oe.copiedRows(n.length),o,l)},he=async()=>{te(null);const e=ce.map(P);if(!e.length||!Z)return;const t=new URLSearchParams({ids:e.join(",")}),n=(()=>{const e=new Map(F.map(e=>[e.key,e.exportLabel??e.label]));try{const t=localStorage.getItem(`col-config-${E}`);if(t){const n=JSON.parse(t).filter(t=>!t.hidden&&"_select"!==t.key&&e.has(t.key)).map(t=>`${t.key}|${e.get(t.key)}`);if(n.length)return n.join(",")}}catch{}return F.filter(e=>!e.defaultHidden).map(e=>`${e.key}|${e.exportLabel??e.label}`).join(",")})();n&&t.set("cols",n);const r=Z.includes("?")?"&":"?";try{const n=await f.get(`${Z}${r}${t}`,{responseType:"blob"}),o=window.URL.createObjectURL(new Blob([n.data],{type:"text/csv"})),l=document.createElement("a");l.href=o,l.download=z,l.click(),window.URL.revokeObjectURL(o);const i=n.headers??{},a=Number(i["x-row-count"]);if("true"===String(i["x-truncated"]))return void g.notify(Number.isFinite(a)?oe.exportTruncated(a,e.length):oe.exportTruncatedUnknown(e.length));g.success(oe.exported(e.length))}catch{g.error(oe.exportFailed)}};if(N)/* @__PURE__ */return x(c,{});if(A&&0===R.length)/* @__PURE__ */
2
+ return x(l,{title:K,message:M,onRetry:T});if(0===R.length)/* @__PURE__ */return x(w,{children:L});const me=R.length>0&&ce.length===R.length,ue=ce.length>0&&!me,pe=H.size-ce.length,fe=[{key:"_select",label:"",defaultWidth:52,minWidth:52,headerNode:/* @__PURE__ */x(a,{"aria-label":re.table.selectAll,checked:me,indeterminate:ue,onChange:ie,style:{height:14,width:14}})},...F],ge=/* @__PURE__ */x(o,{selectedCount:ce.length,hiddenSelectedCount:pe,loadedCount:R.length,totalCount:$,label:G,isFetchingMore:Q,extra:Y,extraAfter:_}),ye=B?/* @__PURE__ */C(w,{children:[
3
+ /* @__PURE__ */x("div",{ref:B}),Q&&/* @__PURE__ */x(p,{size:"sm",padding:"py-3",label:re.list.loadingMore})]}):void 0;let ke=null;if(ee){const{x:t,y:n,item:r,text:o,firstColumn:l}=ee,i=q?q(ce):[],a=ce.length,c=()=>te(null),u=void 0!==$&&$>R.length;ke=/* @__PURE__ */C(d,{portal:!0,style:{left:t,top:n},onClose:c,minWidth:210,children:[
4
4
  /* @__PURE__ */x(s,{children:pe>0?re.list.selectedNotShown(a,pe):re.list.selected(a)}),
5
5
  /* @__PURE__ */x(h,{className:"font-medium",onClick:()=>{c(),O(r)},children:oe.open}),
6
6
  /* @__PURE__ */x(m,{}),o&&/* @__PURE__ */x(h,{onClick:()=>{c(),e(oe.copiedText,o.text,o.html)},children:oe.copy}),l&&/* @__PURE__ */x(h,{onClick:()=>(t=>{te(null);const{keys:n,body:r}=de(),o=n.indexOf(t.key);o<0||!r.length||e(t.label,r.map(e=>e[o]).join("\n"))})(l),children:oe.copyColumn(l.label)}),
7
7
  /* @__PURE__ */x(h,{disabled:0===a,onClick:se,children:oe.copyRows(a)}),Z&&/* @__PURE__ */x(h,{onClick:he,children:oe.exportSelected}),i.map((e,t)=>/* @__PURE__ */C("div",{children:[(e.divider||0===t)&&/* @__PURE__ */x(m,{}),
8
8
  /* @__PURE__ */x(h,{danger:e.danger,disabled:e.disabled,onClick:()=>{c(),e.onClick(ce)},children:e.label})]},t)),
9
- /* @__PURE__ */x(m,{}),!me&&/* @__PURE__ */x(h,{onClick:()=>{c(),V(e=>/* @__PURE__ */new Set([...e,...R.map(D)]))},children:u?oe.selectAllLoaded(R.length):oe.selectAll}),
10
- /* @__PURE__ */x(h,{onClick:()=>{c(),V(/* @__PURE__ */new Set)},children:oe.clearSelection}),T&&/* @__PURE__ */x(h,{onClick:()=>{c(),T()},children:oe.refresh})]})}/* @__PURE__ */
9
+ /* @__PURE__ */x(m,{}),!me&&/* @__PURE__ */x(h,{onClick:()=>{c(),I(e=>/* @__PURE__ */new Set([...e,...R.map(P)]))},children:u?oe.selectAllLoaded(R.length):oe.selectAll}),
10
+ /* @__PURE__ */x(h,{onClick:()=>{c(),I(/* @__PURE__ */new Set)},children:oe.clearSelection}),T&&/* @__PURE__ */x(h,{onClick:()=>{c(),T()},children:oe.refresh})]})}/* @__PURE__ */
11
11
  return C("div",{className:"flex-1 flex flex-col mb-1 bg-white rounded-lg shadow overflow-hidden",children:[
12
- /* @__PURE__ */x("div",{className:"flex-1 min-h-0 flex flex-col",children:/* @__PURE__ */x(i,{tableId:M,columns:fe,sort:U,onSort:H,footer:ge,afterBody:ye,saveDefaultPerms:Y,children:e=>/* @__PURE__ */x("tbody",{ref:ne,className:"divide-y divide-gray-100",children:R.map((n,r)=>{const o=D(n);/* @__PURE__ */
13
- return x("tr",{"data-row-idx":r,className:`cursor-pointer ${ae===r?"bg-blue-50 ring-1 ring-inset ring-blue-300":I.has(o)?"bg-blue-50 hover:bg-blue-100":"hover:bg-gray-50"} ${G?.(n)??""}`,onClick:()=>O(n),onContextMenu:e=>((e,n)=>{if(e.shiftKey||u(e.target))return;e.preventDefault();const r=D(n);I.has(r)||V(/* @__PURE__ */new Set([r]));const o=j(e.currentTarget)[0]?.dataset.colKey,l=o?P.find(e=>e.key===o)?.label:void 0;te({x:e.clientX,y:e.clientY,item:n,text:t(e.target),firstColumn:o&&l?{key:o,label:l}:null})})(e,n),onMouseEnter:W?()=>W(n):void 0,children:e.map(e=>/* @__PURE__ */x("td",{"data-col-key":e.key,className:"px-4 py-3 whitespace-nowrap text-sm overflow-hidden",children:"_select"===e.key?/* @__PURE__ */x(a,{"aria-label":re.table.selectRow,checked:I.has(o),onChange:()=>le(n),onClick:e=>e.stopPropagation(),style:{height:14,width:14}}):F(n,e.key)},e.key))},o)})})})}),ke]})}export{S as EntityList};
12
+ /* @__PURE__ */x("div",{className:"flex-1 min-h-0 flex flex-col",children:/* @__PURE__ */x(i,{tableId:E,columns:fe,sort:U,onSort:V,footer:ge,afterBody:ye,saveDefaultPerms:X,children:e=>/* @__PURE__ */x("tbody",{ref:ne,className:"divide-y divide-gray-100",children:R.map((n,r)=>{const o=P(n);/* @__PURE__ */
13
+ return x("tr",{"data-row-idx":r,className:`cursor-pointer ${ae===r?"bg-blue-50 ring-1 ring-inset ring-blue-300":H.has(o)?"bg-blue-50 hover:bg-blue-100":"hover:bg-gray-50"} ${W?.(n)??""}`,onClick:()=>O(n),onContextMenu:e=>((e,n)=>{if(e.shiftKey||u(e.target))return;e.preventDefault();const r=P(n);H.has(r)||I(/* @__PURE__ */new Set([r]));const o=j(e.currentTarget)[0]?.dataset.colKey,l=o?F.find(e=>e.key===o)?.label:void 0;te({x:e.clientX,y:e.clientY,item:n,text:t(e.target),firstColumn:o&&l?{key:o,label:l}:null})})(e,n),onMouseEnter:J?()=>J(n):void 0,children:e.map(e=>/* @__PURE__ */x("td",{"data-col-key":e.key,className:"px-4 py-3 whitespace-nowrap text-sm overflow-hidden",children:"_select"===e.key?/* @__PURE__ */x(a,{"aria-label":re.table.selectRow,checked:H.has(o),onChange:()=>le(n),onClick:e=>e.stopPropagation(),style:{height:14,width:14}}):D(n,e.key)},e.key))},o)})})})}),ke]})}export{S as EntityList};
@@ -1,9 +1,9 @@
1
- import{CountBadge as e}from"./chunk-5HFKVEWW.js";import{SettingRowNameContext as i,SettingAutoContext as n}from"./chunk-2NMW66P5.js";import{isShown as a}from"./chunk-HCP7WOAL.js";import{useShellStrings as t}from"./chunk-IUVGHHR3.js";import{isValidElement as l}from"react";import{jsx as s,jsxs as r,Fragment as d}from"react/jsx-runtime";var c={pad:"p-4",gap:"gap-4",text:"text-sm",bodyTop:"mt-4",bodyPad:"pt-3"},m=e=>Array.isArray(e)?e.some(m):l(e);function o({label:l,icon:o,action:h,value:u,readout:f,changed:p=!1,description:x,children:N,controlId:v,labelId:g,unknownText:b="—",quiet:y=!1,size:k="default",viewState:w,divider:$=!0,showWhen:j,values:P,context:W,className:H=""}){const V=t();if(!a(j,P,W))return null;const A="auto"===w?/* @__PURE__ */s("span",{"data-setting-auto":"","aria-hidden":"true",className:"shrink-0 rounded-sm border border-line px-1 text-2xs font-normal leading-4 text-ink-faint",children:V.settingView.auto}):"edited"===w?/* @__PURE__ */r("span",{"data-setting-edited":"",className:"inline-flex shrink-0 items-center",children:[
1
+ import{CountBadge as e}from"./chunk-5HFKVEWW.js";import{isShown as i}from"./chunk-HCP7WOAL.js";import{SettingRowNameContext as n,SettingAutoContext as a}from"./chunk-2NMW66P5.js";import{useShellStrings as t}from"./chunk-IUVGHHR3.js";import{isValidElement as l}from"react";import{jsx as s,jsxs as r,Fragment as d}from"react/jsx-runtime";var c={pad:"p-4",gap:"gap-4",text:"text-sm",bodyTop:"mt-4",bodyPad:"pt-3"},m=e=>Array.isArray(e)?e.some(m):l(e);function o({label:l,icon:o,action:h,value:u,readout:f,changed:p=!1,description:x,children:N,controlId:v,labelId:g,unknownText:b="—",quiet:y=!1,size:k="default",viewState:w,divider:$=!0,showWhen:j,values:P,context:W,className:H=""}){const V=t();if(!i(j,P,W))return null;const A="auto"===w?/* @__PURE__ */s("span",{"data-setting-auto":"","aria-hidden":"true",className:"shrink-0 rounded-sm border border-line px-1 text-2xs font-normal leading-4 text-ink-faint",children:V.settingView.auto}):"edited"===w?/* @__PURE__ */r("span",{"data-setting-edited":"",className:"inline-flex shrink-0 items-center",children:[
2
2
  /* @__PURE__ */s("span",{"aria-hidden":"true",className:"inline-flex",children:/* @__PURE__ */s(e,{dot:!0,tone:"accent"})}),
3
- /* @__PURE__ */s("span",{className:"sr-only",children:V.settingView.edited})]}):null,F=null!=f&&!1!==f;if("compact"===k){const e=m(u),a=m(h);if(!e&&!a)return null;const t=g,c=["es-field"];e||c.push("is-inline"),p&&c.push("is-changed"),H&&c.push(H);const b=/* @__PURE__ */r(d,{children:[null!=o&&/* @__PURE__ */s("span",{className:"es-field-icon","aria-hidden":"true",children:o}),
4
- /* @__PURE__ */s("span",{className:"es-field-label",id:t,children:l}),A]}),y=e=>/* @__PURE__ */s(i.Provider,{value:t,children:/* @__PURE__ */s(n.Provider,{value:"auto"===w,children:e})});/* @__PURE__ */
3
+ /* @__PURE__ */s("span",{className:"sr-only",children:V.settingView.edited})]}):null,F=null!=f&&!1!==f;if("compact"===k){const e=m(u),i=m(h);if(!e&&!i)return null;const t=g,c=["es-field"];e||c.push("is-inline"),p&&c.push("is-changed"),H&&c.push(H);const b=/* @__PURE__ */r(d,{children:[null!=o&&/* @__PURE__ */s("span",{className:"es-field-icon","aria-hidden":"true",children:o}),
4
+ /* @__PURE__ */s("span",{className:"es-field-label",id:t,children:l}),A]}),y=e=>/* @__PURE__ */s(n.Provider,{value:t,children:/* @__PURE__ */s(a.Provider,{value:"auto"===w,children:e})});/* @__PURE__ */
5
5
  return r("div",{className:c.join(" "),children:[
6
- /* @__PURE__ */r("div",{className:"es-field-head",children:[v?/* @__PURE__ */s("label",{className:"es-field-name",htmlFor:v,children:b}):/* @__PURE__ */s("span",{className:"es-field-name",children:b}),F&&/* @__PURE__ */s("span",{className:"es-field-value",children:f}),a&&y(h)]}),e&&/* @__PURE__ */s("div",{className:"es-field-ctl",children:y(u)}),x?/* @__PURE__ */s("p",{className:"es-field-hint",children:x}):null,N]})}const I=c,T=void 0!==u||void 0===N&&null==h,q=null==u||""===u,z=y?"text-gray-500":"text-gray-800",B=q?"text-gray-400":y?"text-gray-500":"text-gray-900",C=`${I.text} font-medium ${z}`,E=v?/* @__PURE__ */s("label",{htmlFor:v,id:g,className:C,children:l}):/* @__PURE__ */s("span",{id:g,className:C,children:l}),G=/* @__PURE__ */s(i.Provider,{value:g,children:/* @__PURE__ */s(n.Provider,{value:"auto"===w,children:q?b:u})}),K=[$?"border-t border-line-subtle first:border-t-0":"",I.pad,H].filter(Boolean).join(" "),L=null!=N&&!1!==N&&/* @__PURE__ */s("div",{className:`${I.bodyTop} border-t border-line-subtle ${I.bodyPad}`,children:N});/* @__PURE__ */
6
+ /* @__PURE__ */r("div",{className:"es-field-head",children:[v?/* @__PURE__ */s("label",{className:"es-field-name",htmlFor:v,children:b}):/* @__PURE__ */s("span",{className:"es-field-name",children:b}),F&&/* @__PURE__ */s("span",{className:"es-field-value",children:f}),i&&y(h)]}),e&&/* @__PURE__ */s("div",{className:"es-field-ctl",children:y(u)}),x?/* @__PURE__ */s("p",{className:"es-field-hint",children:x}):null,N]})}const I=c,T=void 0!==u||void 0===N&&null==h,q=null==u||""===u,z=y?"text-gray-500":"text-gray-800",B=q?"text-gray-400":y?"text-gray-500":"text-gray-900",C=`${I.text} font-medium ${z}`,E=v?/* @__PURE__ */s("label",{htmlFor:v,id:g,className:C,children:l}):/* @__PURE__ */s("span",{id:g,className:C,children:l}),G=/* @__PURE__ */s(n.Provider,{value:g,children:/* @__PURE__ */s(a.Provider,{value:"auto"===w,children:q?b:u})}),K=[$?"border-t border-line-subtle first:border-t-0":"",I.pad,H].filter(Boolean).join(" "),L=null!=N&&!1!==N&&/* @__PURE__ */s("div",{className:`${I.bodyTop} border-t border-line-subtle ${I.bodyPad}`,children:N});/* @__PURE__ */
7
7
  return r("div",F?{className:K,children:[
8
8
  /* @__PURE__ */r("div",{"data-setting-line":"",className:"flex flex-wrap items-center justify-between gap-x-2 gap-y-2",children:[
9
9
  /* @__PURE__ */s("div",{className:"flex-1 basis-0",children:/* @__PURE__ */r("div",{className:`flex min-w-0 items-center gap-2 ${z}`,children:[null!=o&&/* @__PURE__ */s("span",{"aria-hidden":"true",className:"inline-flex h-4 w-4 shrink-0 items-center justify-center",children:o}),E,A]})}),
@@ -0,0 +1 @@
1
+ var r="13.20.0",a=r;export{a as APP_VERSION,r as VERSION};
@@ -1,4 +1,4 @@
1
- import{SidebarLayout as e}from"./chunk-U5RG34NE.js";import{Avatar as t}from"./chunk-W2TPXKCV.js";import{ItemCount as r}from"./chunk-SXHV5OLA.js";import{Button_default as a}from"./chunk-UTISUEO4.js";import{useState as i}from"react";import{jsx as l,jsxs as n}from"react/jsx-runtime";var s=[{id:"inbox",label:"Inbox",count:12},{id:"starred",label:"Starred",count:3},{id:"sent",label:"Sent"},{id:"drafts",label:"Drafts",count:1},{id:"archive",label:"Archive"},{id:"trash",label:"Trash"}],d=[{id:1,from:"Marco Reyes",subject:"Q3 roadmap review",preview:"Sharing the deck ahead of Thursday — let me know what you think before the review.",time:"9:14",unread:!0},{id:2,from:"Priya Patel",subject:"Design handoff",preview:"The Figma file is ready for engineering. I exported every icon at 1x and 2x.",time:"8:02",unread:!0},{id:3,from:"GitHub",subject:"[acme/web] PR #482 merged",preview:"Your pull request was merged into main by the release bot after all checks passed.",time:"Yest"},{id:4,from:"Sara Lind",subject:"Lunch Friday?",preview:"A few of us are heading to the new place on 5th at noon if you want to join.",time:"Yest"}];function c(){const[c,o]=i(1),m=d.find(e=>e.id===c)??d[0];/* @__PURE__ */
1
+ import{SidebarLayout as e}from"./chunk-2TXQCA4C.js";import{Avatar as t}from"./chunk-W2TPXKCV.js";import{ItemCount as r}from"./chunk-SXHV5OLA.js";import{Button_default as a}from"./chunk-UTISUEO4.js";import{useState as i}from"react";import{jsx as l,jsxs as n}from"react/jsx-runtime";var s=[{id:"inbox",label:"Inbox",count:12},{id:"starred",label:"Starred",count:3},{id:"sent",label:"Sent"},{id:"drafts",label:"Drafts",count:1},{id:"archive",label:"Archive"},{id:"trash",label:"Trash"}],d=[{id:1,from:"Marco Reyes",subject:"Q3 roadmap review",preview:"Sharing the deck ahead of Thursday — let me know what you think before the review.",time:"9:14",unread:!0},{id:2,from:"Priya Patel",subject:"Design handoff",preview:"The Figma file is ready for engineering. I exported every icon at 1x and 2x.",time:"8:02",unread:!0},{id:3,from:"GitHub",subject:"[acme/web] PR #482 merged",preview:"Your pull request was merged into main by the release bot after all checks passed.",time:"Yest"},{id:4,from:"Sara Lind",subject:"Lunch Friday?",preview:"A few of us are heading to the new place on 5th at noon if you want to join.",time:"Yest"}];function c(){const[c,o]=i(1),m=d.find(e=>e.id===c)??d[0];/* @__PURE__ */
2
2
  return l("div",{className:"h-full",children:/* @__PURE__ */l(e,{side:"left",defaultWidth:200,sidebar:/* @__PURE__ */n("div",{className:"flex h-full flex-col p-2",children:[
3
3
  /* @__PURE__ */l(a,{block:!0,className:"mb-2",children:"Compose"}),s.map((e,t)=>/* @__PURE__ */n("button",{className:"flex items-center justify-between rounded-md px-3 py-2 text-left text-sm "+(0===t?"bg-blue-50 font-medium text-blue-700":"text-gray-700 hover:bg-gray-100"),children:[
4
4
  /* @__PURE__ */l("span",{children:e.label}),null!=e.count&&/* @__PURE__ */l(r,{count:e.count,active:0===t})]},e.id))]}),children:/* @__PURE__ */n("div",{className:"flex h-full",children:[
@@ -1 +1 @@
1
- import{client_default as a}from"./chunk-ZI2FDUYJ.js";var t=()=>a.get("/auth/numbering-configs/").then(a=>a.data?.results??a.data??[]),e="uploaded:wallpaper";function r(a,t){return"string"!=typeof a||!a||"none"===a||a.startsWith("#")?"":a===e?t||"":a}var l=()=>a.get("/auth/me/wallpaper/").then(a=>a.data),n=(t,e)=>{const r=new FormData;r.append("wallpaper",t);const l=e?{onUploadProgress:a=>e(a.total?Math.round(a.loaded/a.total*100):null)}:void 0;return a.post("/auth/me/wallpaper/",r,l).then(a=>a.data)},p=()=>a.delete("/auth/me/wallpaper/").then(a=>a.data);function o(a){const t=a?.response?.status,e=a?.response?.data,r=Array.isArray(e?.wallpaper)?e.wallpaper[0]:void 0;return r||(413===t?"That picture is too large to use as a wallpaper.":415===t?"That file is not a picture this can use as a wallpaper.":"The wallpaper could not be saved. Please try again.")}export{e as WALLPAPER_PREF_TOKEN,p as deleteWallpaper,t as getNumberingConfigs,l as getWallpaper,n as uploadWallpaper,r as wallpaperSrc,o as wallpaperUploadError};
1
+ import{client_default as a}from"./chunk-IXJIHTUI.js";var t=()=>a.get("/auth/numbering-configs/").then(a=>a.data?.results??a.data??[]),e="uploaded:wallpaper";function r(a,t){return"string"!=typeof a||!a||"none"===a||a.startsWith("#")?"":a===e?t||"":a}var l=()=>a.get("/auth/me/wallpaper/").then(a=>a.data),n=(t,e)=>{const r=new FormData;r.append("wallpaper",t);const l=e?{onUploadProgress:a=>e(a.total?Math.round(a.loaded/a.total*100):null)}:void 0;return a.post("/auth/me/wallpaper/",r,l).then(a=>a.data)},p=()=>a.delete("/auth/me/wallpaper/").then(a=>a.data);function o(a){const t=a?.response?.status,e=a?.response?.data,r=Array.isArray(e?.wallpaper)?e.wallpaper[0]:void 0;return r||(413===t?"That picture is too large to use as a wallpaper.":415===t?"That file is not a picture this can use as a wallpaper.":"The wallpaper could not be saved. Please try again.")}export{e as WALLPAPER_PREF_TOKEN,p as deleteWallpaper,t as getNumberingConfigs,l as getWallpaper,n as uploadWallpaper,r as wallpaperSrc,o as wallpaperUploadError};
@@ -1,20 +1,20 @@
1
- import{Tree as e,TreeRow as n,TreeGroup as l}from"./chunk-6OGX7V7L.js";import{MarqueeBox as r}from"./chunk-IC72MGON.js";import{ImageLightbox as a}from"./chunk-FXSGIT53.js";import{DescriptionList as i}from"./chunk-SACUSHVN.js";import{Drawer as t}from"./chunk-LQCNIQ3I.js";import{EmptyState as o}from"./chunk-VXSYHTBP.js";import{Breadcrumbs as d}from"./chunk-OZ4R6U2M.js";import{ROOT_KEY as s,mediaLibraryMenu as c}from"./chunk-L2WBCXG7.js";import{useMediaMoveItems as u}from"./chunk-ZCGT5YNR.js";import{RenameField as m}from"./chunk-Q4MOT7TY.js";import{NativeSelect as p}from"./chunk-GEITUFYK.js";import{MediaUploadGrid as h}from"./chunk-TPKNHQIE.js";import{MediaUsedInList as f}from"./chunk-FFRJ6QZK.js";import{useGridSelection as g}from"./chunk-VLKDWKVR.js";import{useMarquee as v}from"./chunk-OLFYNMTD.js";import{Segmented as k}from"./chunk-TNALBYLY.js";import{copyToClipboard as y}from"./chunk-UFX7F3KG.js";import{Checkbox_default as b}from"./chunk-CGZBDI6C.js";import{useContextMenu as w,ContextMenu as N}from"./chunk-VKZC3NPM.js";import{Banner as x}from"./chunk-XWJT6TFU.js";import{Input_default as C}from"./chunk-3SIRRK3F.js";import{DropdownMenu as I}from"./chunk-EX3DARI3.js";import{IconButton_default as D}from"./chunk-NWS5G7FE.js";import{useFileIntake as S,FileIntakeAlert as T}from"./chunk-VFSAJMNX.js";import{setModalDragAside as F,modalIdHolding as j}from"./chunk-EIFNESXS.js";import{ColoredBadge as z}from"./chunk-WRV6QKJN.js";import{Button_default as L}from"./chunk-UTISUEO4.js";import{Icon as O}from"./chunk-ISVODSRP.js";import{Tooltip as E}from"./chunk-F2RAIGCG.js";import{buttonClasses as P}from"./chunk-UQYNPYF4.js";import{usePlotWidth as A}from"./chunk-MAFUXCPZ.js";import{useShellStrings as R}from"./chunk-IUVGHHR3.js";import{useRef as M,useMemo as U,useCallback as K,useState as G,useEffect as V}from"react";import{jsxs as B,Fragment as X,jsx as Y}from"react/jsx-runtime";var H="application/x-efficient-media-files",J="application/x-efficient-media-folder",Q="application/x-efficient-media-file";function W(e){if(!e||!Array.from(e.types).includes(Q))return null;try{const n=JSON.parse(e.getData(Q));if(n&&"string"==typeof n.id&&"string"==typeof n.url&&"string"==typeof n.name&&("image"===n.kind||"video"===n.kind))return{id:n.id,url:n.url,kind:n.kind,name:n.name}}catch{}return null}var $={type:"all",use:"any",sort:"newest"},Z={lock:/* @__PURE__ */Y(O,{name:"lock","aria-hidden":"true",className:"h-4 w-4"}),folder:/* @__PURE__ */Y(O,{name:"folder","aria-hidden":"true",className:"h-4 w-4"}),folderOpen:/* @__PURE__ */Y(O,{name:"folder-open","aria-hidden":"true",className:"h-4 w-4"}),folderPlus:/* @__PURE__ */Y(O,{name:"folder-plus","aria-hidden":"true",className:"h-4 w-4"}),trash:/* @__PURE__ */Y(O,{name:"trash","aria-hidden":"true",className:"h-4 w-4"}),upload:/* @__PURE__ */Y(O,{name:"upload","aria-hidden":"true",className:"h-4 w-4"}),search:/* @__PURE__ */Y(O,{name:"search","aria-hidden":"true",className:"h-4 w-4"}),grid:/* @__PURE__ */Y(O,{name:"grid","aria-hidden":"true",className:"h-4 w-4"}),list:/* @__PURE__ */Y(O,{name:"list","aria-hidden":"true",className:"h-4 w-4"}),more:/* @__PURE__ */Y(O,{name:"more","aria-hidden":"true",className:"h-4 w-4"}),copy:/* @__PURE__ */Y(O,{name:"copy","aria-hidden":"true",className:"h-4 w-4"}),edit:/* @__PURE__ */Y(O,{name:"edit","aria-hidden":"true",className:"h-4 w-4"}),swap:/* @__PURE__ */Y(O,{name:"swap","aria-hidden":"true",className:"h-4 w-4"}),crop:/* @__PURE__ */Y(O,{name:"crop","aria-hidden":"true",className:"h-4 w-4"}),external:/* @__PURE__ */Y(O,{name:"external","aria-hidden":"true",className:"h-4 w-4"}),undo:/* @__PURE__ */Y(O,{name:"undo","aria-hidden":"true",className:"h-4 w-4"})},q={link:/* @__PURE__ */Y(O,{name:"link","aria-hidden":"true",className:"h-3 w-3"}),email:/* @__PURE__ */Y(O,{name:"email","aria-hidden":"true",className:"h-3 w-3"}),lock:/* @__PURE__ */Y(O,{name:"lock","aria-hidden":"true",className:"h-3 w-3"}),clock:/* @__PURE__ */Y(O,{name:"clock","aria-hidden":"true",className:"h-3 w-3"})};function _(O){const{mode:W="manage",layout:_="auto",location:ee,onLocationChange:ne,folders:le,products:re,allFilesCount:ae,trashCount:ie,files:te,query:oe,onQueryChange:de,filters:se=$,onFiltersChange:ce,extraFilters:ue,view:me="grid",onViewChange:pe,selectedIds:he,onSelectionChange:fe,usedIn:ge,denied:ve={},accept:ke="image/*,video/*",maxSizeBytes:ye,busy:be,progress:we,onUpload:Ne,onNewFolder:xe,onRename:Ce,onMove:Ie,onTrash:De,onDeleteFolder:Se,onRestore:Te,onDeleteForever:Fe,onEmptyTrash:je,onReplace:ze,onCropEdit:Le,onOpenInDesign:Oe,onChoose:Ee,onCancel:Pe,pickNote:Ae,onDragOut:Re,className:Me=""}=O,Ue=R().mediaLibrary,Ke=R().media,Ge="pick"===W,Ve=!Ge,Be=M(null),Xe=A(Be,"phone"===_?343:1200),Ye="phone"===_||"auto"===_&&Xe<640,He=U(()=>function(e=[]){const n=/* @__PURE__ */new Map,l=(e,r)=>{for(const a of e){const e=[...r,a];n.set(a.id,{node:a,path:e}),a.children&&l(a.children,e)}};return l(e,[]),n}(re),[re]),Je=U(()=>new Map(le.map(e=>[e.id,e])),[le]),Qe=U(()=>{const e=/* @__PURE__ */new Map;for(const n of le){const l=n.parentId&&Je.has(n.parentId)?n.parentId:null;e.set(l,[...e.get(l)??[],n])}return e},[le,Je]),We=K(e=>{const n=[];for(let l=e?Je.get(e):void 0;l&&(n.unshift(l),!(n.length>le.length));l=l.parentId?Je.get(l.parentId):void 0);return n},[Je,le.length]),$e=K((e,n)=>We(e).some(e=>e.id===n),[We]),[Ze,qe]=G(()=>/* @__PURE__ */new Set(["@files"])),_e=e=>qe(n=>{const l=new Set(n);return l.has(e)?l.delete(e):l.add(e),l}),en=K(e=>{qe(n=>e.every(e=>n.has(e))?n:/* @__PURE__ */new Set([...n,...e]))},[]),nn="files"===(ln=ee).place?`files:${ln.folderId??""}`:"products"===ln.place?`products:${ln.nodeId??""}`:"trash";var ln;V(()=>{if("files"===ee.place)en(["@files",...We(ee.folderId).slice(0,-1).map(e=>e.id)]);else if("products"===ee.place){const e=ee.nodeId?He.get(ee.nodeId)?.path??[]:[];en(["@products",...e.slice(0,-1).map(e=>`p:${e.id}`)])}},[nn]);const rn="products"===ee.place,an="trash"===ee.place,tn="files"===ee.place,on=tn?ee.folderId:null,dn=rn&&ee.nodeId?He.get(ee.nodeId)?.path[0]:void 0,sn=e=>e?.sharedFrom?`${Ue.readOnly} ${Ue.editedAtHq(e.sharedFrom)}`:Ue.readOnly,cn=U(()=>te.map(e=>e.id),[te]),un=U(()=>new Map(te.map(e=>[e.id,e])),[te]),mn=g(cn),pn=U(()=>cn.filter(e=>mn.selected.has(e)),[cn,mn.selected]),hn=1===pn.length?un.get(pn[0]):void 0,fn=M(!0);V(()=>{fn.current?fn.current=!1:mn.clear()},[nn]);const gn=he?.join("\0");V(()=>{he&&mn.setSelection(he)},[gn]);const vn=M(gn??""),kn=pn.join("\0");V(()=>{vn.current!==kn&&(vn.current=kn,fe?.(pn))},[kn]);const yn=(e,n={})=>{Ge?mn.select(e):mn.select(e,{ctrl:!(!n.ctrlKey&&!n.metaKey),shift:!!n.shiftKey})},[bn,wn]=G(null),Nn=e=>{const n=bn;if(wn(null),!n||null==e)return;e!==("folder"===n.kind?Je.get(n.id)?.name:un.get(n.id)?.name)&&Ce?.(n,e)},xn=async e=>{if(!xe)return;const n=await xe(e);en(["@files",...e?[e]:[]]),"string"==typeof n&&wn({kind:"folder",id:n})},Cn=K(e=>{const n=[],l=n=>{if("files"===e.kind)return n===on&&tn?Ue.alreadyHere:void 0;const l=Je.get(e.id);return n===e.id||n&&$e(n,e.id)?Ue.notIntoItself:(l?.parentId??null)===n?Ue.folderAlreadyHere:void 0};n.push({key:s,label:Ue.allFiles,disabledReason:l(null)});const r=(e,a)=>{for(const i of Qe.get(e)??[])n.push({key:i.id,label:i.name,depth:a,disabledReason:l(i.id)}),r(i.id,a+1)};return r(null,1),n},[Qe,Je,tn,$e,on,Ue]),In=K(e=>{const n=new Set(e.map(e=>un.get(e)?.kind??"image"));return 1===n.size?[...n][0]:"file"},[un]),[Dn,Sn]=G(null),Tn={words:Ue,media:Ke,denied:ve,moveTargets:Cn,kindOf:In,urlOf:e=>un.get(e)?.url,newSubfolder:xe&&Ve?e=>{xn(e)}:void 0,rename:Ce&&Ve?e=>{"file"!==e.kind||mn.isSelected(e.id)||mn.select(e.id),wn(e)}:void 0,move:Ie&&Ve?Ie:void 0,trash:De&&Ve?De:void 0,deleteFolder:Se&&Ve?Se:void 0,folderNotEmpty:e=>!!Je.get(e)?.notEmpty,replace:ze&&Ve?ze:void 0,copyUrl:e=>{const n=un.get(e)?.url;n&&y(Ue.urlLabel,n)},openInDesign:Oe,restore:Te,deleteForever:Fe},Fn=e=>c(e,Tn),jn=w(),zn=(e,n)=>{Ge||(mn.isSelected(e)||mn.select(e),jn.open(n,(e=>{const n=mn.isSelected(e)?pn:[e];return rn?{kind:"render",id:e}:an?{kind:"trashed",ids:n}:{kind:"files",ids:n}})(e)))},[Ln,On]=G(null),[En,Pn]=G(null),[An,Rn]=G(null);V(()=>{if(!En&&!Ln)return;const e=()=>{Pn(null),On(null)};return window.addEventListener("dragend",e),window.addEventListener("drop",e),()=>{window.removeEventListener("dragend",e),window.removeEventListener("drop",e)}},[En,Ln]);const Mn=(e,n)=>Array.from(e.dataTransfer?.types??[]).includes(n),Un=(e,n)=>!(!Ie||ve.move||Ge)&&(!!Mn(e,H)||!(!Mn(e,J)||!An)&&(n!==An&&!(n&&$e(n,An)))),Kn=(e,n)=>({onDragEnter:l=>{Un(l,n)&&(l.preventDefault(),On(e))},onDragOver:l=>{Un(l,n)&&(l.preventDefault(),l.dataTransfer.dropEffect="move",Ln!==e&&On(e))},onDragLeave:n=>{const l=n.relatedTarget;l&&n.currentTarget.contains(l)||On(n=>n===e?null:n)},onDrop:e=>{if(Un(e,n))if(e.preventDefault(),On(null),Mn(e,H)){let l;try{l=JSON.parse(e.dataTransfer.getData(H))}catch{l=null}Array.isArray(l)&&l.length&&Ie({kind:"files",ids:l.map(String)},n)}else An&&(Ie({kind:"folder",id:An},n),Rn(null))}}),Gn=e=>{const n=e=>Mn(e,H)||Mn(e,J)||Mn(e,"Files");return{onDragEnter:l=>{n(l)&&Pn(e)},onDragOver:l=>{n(l)&&En!==e&&Pn(e)},onDragLeave:n=>{const l=n.relatedTarget;l&&n.currentTarget.contains(l)||Pn(n=>n===e?null:n)}}},Vn=(e,n,l)=>/* @__PURE__ */Y(E,{side:"right",content:En===e?Ue.noDropProducts:sn(l),open:En===e||!En&&void 0,children:/* @__PURE__ */Y("span",{children:n})}),Bn=e=>({onContextMenu:n=>{jn.open(n,e)}}),Xn=(e,r,a)=>e.map(e=>{const i=`p:${e.id}`,t=a??e,o=Ze.has(i),d=e.children?.length?e.children:null;/* @__PURE__ */
1
+ import{Tree as e,TreeRow as n,TreeGroup as l}from"./chunk-6OGX7V7L.js";import{MarqueeBox as r}from"./chunk-IC72MGON.js";import{ImageLightbox as a}from"./chunk-FXSGIT53.js";import{DescriptionList as i}from"./chunk-SACUSHVN.js";import{Drawer as t}from"./chunk-LQCNIQ3I.js";import{EmptyState as o}from"./chunk-VXSYHTBP.js";import{Breadcrumbs as d}from"./chunk-OZ4R6U2M.js";import{useGridSelection as s}from"./chunk-VLKDWKVR.js";import{useMarquee as c}from"./chunk-OLFYNMTD.js";import{ROOT_KEY as u,mediaLibraryMenu as m}from"./chunk-L2WBCXG7.js";import{useMediaMoveItems as p}from"./chunk-ZCGT5YNR.js";import{MediaUsedInList as h}from"./chunk-FFRJ6QZK.js";import{RenameField as f}from"./chunk-Q4MOT7TY.js";import{NativeSelect as g}from"./chunk-GEITUFYK.js";import{MediaUploadGrid as v}from"./chunk-TPKNHQIE.js";import{Segmented as k}from"./chunk-TNALBYLY.js";import{copyToClipboard as y}from"./chunk-UFX7F3KG.js";import{Checkbox_default as b}from"./chunk-CGZBDI6C.js";import{useContextMenu as w,ContextMenu as N}from"./chunk-VKZC3NPM.js";import{Banner as x}from"./chunk-XWJT6TFU.js";import{Input_default as C}from"./chunk-3SIRRK3F.js";import{DropdownMenu as I}from"./chunk-EX3DARI3.js";import{IconButton_default as D}from"./chunk-NWS5G7FE.js";import{useFileIntake as S,FileIntakeAlert as T}from"./chunk-VFSAJMNX.js";import{setModalDragAside as F,modalIdHolding as j}from"./chunk-EIFNESXS.js";import{ColoredBadge as z}from"./chunk-WRV6QKJN.js";import{Button_default as L}from"./chunk-UTISUEO4.js";import{Icon as O}from"./chunk-ISVODSRP.js";import{Tooltip as E}from"./chunk-F2RAIGCG.js";import{buttonClasses as P}from"./chunk-UQYNPYF4.js";import{usePlotWidth as A}from"./chunk-MAFUXCPZ.js";import{useShellStrings as R}from"./chunk-IUVGHHR3.js";import{useRef as M,useMemo as U,useCallback as K,useState as G,useEffect as V}from"react";import{jsxs as B,Fragment as X,jsx as Y}from"react/jsx-runtime";var H="application/x-efficient-media-files",J="application/x-efficient-media-folder",Q="application/x-efficient-media-file";function W(e){if(!e||!Array.from(e.types).includes(Q))return null;try{const n=JSON.parse(e.getData(Q));if(n&&"string"==typeof n.id&&"string"==typeof n.url&&"string"==typeof n.name&&("image"===n.kind||"video"===n.kind))return{id:n.id,url:n.url,kind:n.kind,name:n.name}}catch{}return null}var $={type:"all",use:"any",sort:"newest"},Z={lock:/* @__PURE__ */Y(O,{name:"lock","aria-hidden":"true",className:"h-4 w-4"}),folder:/* @__PURE__ */Y(O,{name:"folder","aria-hidden":"true",className:"h-4 w-4"}),folderOpen:/* @__PURE__ */Y(O,{name:"folder-open","aria-hidden":"true",className:"h-4 w-4"}),folderPlus:/* @__PURE__ */Y(O,{name:"folder-plus","aria-hidden":"true",className:"h-4 w-4"}),trash:/* @__PURE__ */Y(O,{name:"trash","aria-hidden":"true",className:"h-4 w-4"}),upload:/* @__PURE__ */Y(O,{name:"upload","aria-hidden":"true",className:"h-4 w-4"}),search:/* @__PURE__ */Y(O,{name:"search","aria-hidden":"true",className:"h-4 w-4"}),grid:/* @__PURE__ */Y(O,{name:"grid","aria-hidden":"true",className:"h-4 w-4"}),list:/* @__PURE__ */Y(O,{name:"list","aria-hidden":"true",className:"h-4 w-4"}),more:/* @__PURE__ */Y(O,{name:"more","aria-hidden":"true",className:"h-4 w-4"}),copy:/* @__PURE__ */Y(O,{name:"copy","aria-hidden":"true",className:"h-4 w-4"}),edit:/* @__PURE__ */Y(O,{name:"edit","aria-hidden":"true",className:"h-4 w-4"}),swap:/* @__PURE__ */Y(O,{name:"swap","aria-hidden":"true",className:"h-4 w-4"}),crop:/* @__PURE__ */Y(O,{name:"crop","aria-hidden":"true",className:"h-4 w-4"}),external:/* @__PURE__ */Y(O,{name:"external","aria-hidden":"true",className:"h-4 w-4"}),undo:/* @__PURE__ */Y(O,{name:"undo","aria-hidden":"true",className:"h-4 w-4"})},q={link:/* @__PURE__ */Y(O,{name:"link","aria-hidden":"true",className:"h-3 w-3"}),email:/* @__PURE__ */Y(O,{name:"email","aria-hidden":"true",className:"h-3 w-3"}),lock:/* @__PURE__ */Y(O,{name:"lock","aria-hidden":"true",className:"h-3 w-3"}),clock:/* @__PURE__ */Y(O,{name:"clock","aria-hidden":"true",className:"h-3 w-3"})};function _(O){const{mode:W="manage",layout:_="auto",location:ee,onLocationChange:ne,folders:le,products:re,allFilesCount:ae,trashCount:ie,files:te,query:oe,onQueryChange:de,filters:se=$,onFiltersChange:ce,extraFilters:ue,view:me="grid",onViewChange:pe,selectedIds:he,onSelectionChange:fe,usedIn:ge,denied:ve={},accept:ke="image/*,video/*",maxSizeBytes:ye,busy:be,progress:we,onUpload:Ne,onNewFolder:xe,onRename:Ce,onMove:Ie,onTrash:De,onDeleteFolder:Se,onRestore:Te,onDeleteForever:Fe,onEmptyTrash:je,onReplace:ze,onCropEdit:Le,onOpenInDesign:Oe,onChoose:Ee,onCancel:Pe,pickNote:Ae,onDragOut:Re,className:Me=""}=O,Ue=R().mediaLibrary,Ke=R().media,Ge="pick"===W,Ve=!Ge,Be=M(null),Xe=A(Be,"phone"===_?343:1200),Ye="phone"===_||"auto"===_&&Xe<640,He=U(()=>function(e=[]){const n=/* @__PURE__ */new Map,l=(e,r)=>{for(const a of e){const e=[...r,a];n.set(a.id,{node:a,path:e}),a.children&&l(a.children,e)}};return l(e,[]),n}(re),[re]),Je=U(()=>new Map(le.map(e=>[e.id,e])),[le]),Qe=U(()=>{const e=/* @__PURE__ */new Map;for(const n of le){const l=n.parentId&&Je.has(n.parentId)?n.parentId:null;e.set(l,[...e.get(l)??[],n])}return e},[le,Je]),We=K(e=>{const n=[];for(let l=e?Je.get(e):void 0;l&&(n.unshift(l),!(n.length>le.length));l=l.parentId?Je.get(l.parentId):void 0);return n},[Je,le.length]),$e=K((e,n)=>We(e).some(e=>e.id===n),[We]),[Ze,qe]=G(()=>/* @__PURE__ */new Set(["@files"])),_e=e=>qe(n=>{const l=new Set(n);return l.has(e)?l.delete(e):l.add(e),l}),en=K(e=>{qe(n=>e.every(e=>n.has(e))?n:/* @__PURE__ */new Set([...n,...e]))},[]),nn="files"===(ln=ee).place?`files:${ln.folderId??""}`:"products"===ln.place?`products:${ln.nodeId??""}`:"trash";var ln;V(()=>{if("files"===ee.place)en(["@files",...We(ee.folderId).slice(0,-1).map(e=>e.id)]);else if("products"===ee.place){const e=ee.nodeId?He.get(ee.nodeId)?.path??[]:[];en(["@products",...e.slice(0,-1).map(e=>`p:${e.id}`)])}},[nn]);const rn="products"===ee.place,an="trash"===ee.place,tn="files"===ee.place,on=tn?ee.folderId:null,dn=rn&&ee.nodeId?He.get(ee.nodeId)?.path[0]:void 0,sn=e=>e?.sharedFrom?`${Ue.readOnly} ${Ue.editedAtHq(e.sharedFrom)}`:Ue.readOnly,cn=U(()=>te.map(e=>e.id),[te]),un=U(()=>new Map(te.map(e=>[e.id,e])),[te]),mn=s(cn),pn=U(()=>cn.filter(e=>mn.selected.has(e)),[cn,mn.selected]),hn=1===pn.length?un.get(pn[0]):void 0,fn=M(!0);V(()=>{fn.current?fn.current=!1:mn.clear()},[nn]);const gn=he?.join("\0");V(()=>{he&&mn.setSelection(he)},[gn]);const vn=M(gn??""),kn=pn.join("\0");V(()=>{vn.current!==kn&&(vn.current=kn,fe?.(pn))},[kn]);const yn=(e,n={})=>{Ge?mn.select(e):mn.select(e,{ctrl:!(!n.ctrlKey&&!n.metaKey),shift:!!n.shiftKey})},[bn,wn]=G(null),Nn=e=>{const n=bn;if(wn(null),!n||null==e)return;e!==("folder"===n.kind?Je.get(n.id)?.name:un.get(n.id)?.name)&&Ce?.(n,e)},xn=async e=>{if(!xe)return;const n=await xe(e);en(["@files",...e?[e]:[]]),"string"==typeof n&&wn({kind:"folder",id:n})},Cn=K(e=>{const n=[],l=n=>{if("files"===e.kind)return n===on&&tn?Ue.alreadyHere:void 0;const l=Je.get(e.id);return n===e.id||n&&$e(n,e.id)?Ue.notIntoItself:(l?.parentId??null)===n?Ue.folderAlreadyHere:void 0};n.push({key:u,label:Ue.allFiles,disabledReason:l(null)});const r=(e,a)=>{for(const i of Qe.get(e)??[])n.push({key:i.id,label:i.name,depth:a,disabledReason:l(i.id)}),r(i.id,a+1)};return r(null,1),n},[Qe,Je,tn,$e,on,Ue]),In=K(e=>{const n=new Set(e.map(e=>un.get(e)?.kind??"image"));return 1===n.size?[...n][0]:"file"},[un]),[Dn,Sn]=G(null),Tn={words:Ue,media:Ke,denied:ve,moveTargets:Cn,kindOf:In,urlOf:e=>un.get(e)?.url,newSubfolder:xe&&Ve?e=>{xn(e)}:void 0,rename:Ce&&Ve?e=>{"file"!==e.kind||mn.isSelected(e.id)||mn.select(e.id),wn(e)}:void 0,move:Ie&&Ve?Ie:void 0,trash:De&&Ve?De:void 0,deleteFolder:Se&&Ve?Se:void 0,folderNotEmpty:e=>!!Je.get(e)?.notEmpty,replace:ze&&Ve?ze:void 0,copyUrl:e=>{const n=un.get(e)?.url;n&&y(Ue.urlLabel,n)},openInDesign:Oe,restore:Te,deleteForever:Fe},Fn=e=>m(e,Tn),jn=w(),zn=(e,n)=>{Ge||(mn.isSelected(e)||mn.select(e),jn.open(n,(e=>{const n=mn.isSelected(e)?pn:[e];return rn?{kind:"render",id:e}:an?{kind:"trashed",ids:n}:{kind:"files",ids:n}})(e)))},[Ln,On]=G(null),[En,Pn]=G(null),[An,Rn]=G(null);V(()=>{if(!En&&!Ln)return;const e=()=>{Pn(null),On(null)};return window.addEventListener("dragend",e),window.addEventListener("drop",e),()=>{window.removeEventListener("dragend",e),window.removeEventListener("drop",e)}},[En,Ln]);const Mn=(e,n)=>Array.from(e.dataTransfer?.types??[]).includes(n),Un=(e,n)=>!(!Ie||ve.move||Ge)&&(!!Mn(e,H)||!(!Mn(e,J)||!An)&&(n!==An&&!(n&&$e(n,An)))),Kn=(e,n)=>({onDragEnter:l=>{Un(l,n)&&(l.preventDefault(),On(e))},onDragOver:l=>{Un(l,n)&&(l.preventDefault(),l.dataTransfer.dropEffect="move",Ln!==e&&On(e))},onDragLeave:n=>{const l=n.relatedTarget;l&&n.currentTarget.contains(l)||On(n=>n===e?null:n)},onDrop:e=>{if(Un(e,n))if(e.preventDefault(),On(null),Mn(e,H)){let l;try{l=JSON.parse(e.dataTransfer.getData(H))}catch{l=null}Array.isArray(l)&&l.length&&Ie({kind:"files",ids:l.map(String)},n)}else An&&(Ie({kind:"folder",id:An},n),Rn(null))}}),Gn=e=>{const n=e=>Mn(e,H)||Mn(e,J)||Mn(e,"Files");return{onDragEnter:l=>{n(l)&&Pn(e)},onDragOver:l=>{n(l)&&En!==e&&Pn(e)},onDragLeave:n=>{const l=n.relatedTarget;l&&n.currentTarget.contains(l)||Pn(n=>n===e?null:n)}}},Vn=(e,n,l)=>/* @__PURE__ */Y(E,{side:"right",content:En===e?Ue.noDropProducts:sn(l),open:En===e||!En&&void 0,children:/* @__PURE__ */Y("span",{children:n})}),Bn=e=>({onContextMenu:n=>{jn.open(n,e)}}),Xn=(e,r,a)=>e.map(e=>{const i=`p:${e.id}`,t=a??e,o=Ze.has(i),d=e.children?.length?e.children:null;/* @__PURE__ */
2
2
  return B("div",{role:"none",className:"contents",children:[
3
3
  /* @__PURE__ */Y(n,{label:Vn(i,e.name,t),level:r,icon:d&&o?Z.folderOpen:Z.folder,count:e.count,countLabel:null!=e.count?e.countLabel??Ue.fileCount(e.count):void 0,selected:rn&&ee.nodeId===e.id,expanded:d?o:void 0,onToggle:d?()=>_e(i):void 0,onSelect:()=>ne({place:"products",nodeId:e.id}),rowProps:{"data-media-row":i,...Gn(i),...Ve?Bn({kind:"product-node",id:e.id}):{}}}),d&&o&&/* @__PURE__ */Y(l,{children:Xn(d,r+1,t)})]},e.id)}),Yn=(e,r)=>(Qe.get(e)??[]).map(e=>{const a=Qe.get(e.id),i=Ze.has(e.id),t="folder"===bn?.kind&&bn.id===e.id,o=Fn({kind:"folder",id:e.id});/* @__PURE__ */
4
4
  return B("div",{role:"none",className:"contents",children:[
5
- /* @__PURE__ */Y(n,{label:e.name,level:r,icon:a&&i?Z.folderOpen:Z.folder,count:e.count,countLabel:null!=e.count?e.countLabel??Ue.fileCount(e.count):void 0,selected:t||tn&&ee.folderId===e.id,expanded:a?i:void 0,onToggle:a?()=>_e(e.id):void 0,onSelect:()=>ne({place:"files",folderId:e.id}),drop:Ln===e.id?"into":void 0,dragging:An===e.id,draggable:Ve&&!!Ie&&!ve.move,rename:t?/* @__PURE__ */Y(m,{value:e.name,label:Ue.folderName,onDone:Nn}):void 0,actions:Ve&&o.length?/* @__PURE__ */Y(I,{align:"end","aria-label":Ue.folderActions,trigger:Z.more,items:o}):void 0,rowProps:{"data-media-row":e.id,...Kn(e.id,e.id),...Ve?Bn({kind:"folder",id:e.id}):{},...Ve&&Ie&&!ve.move?{draggable:!0,onDragStart:n=>{n.dataTransfer.effectAllowed="move",n.dataTransfer.setData(J,e.id),Rn(e.id)},onDragEnd:()=>{Rn(null),On(null)}}:{}}}),a&&i&&/* @__PURE__ */Y(l,{children:Yn(e.id,r+1)})]},e.id)}),Hn=Ze.has("@files"),Jn=Ze.has("@products"),Qn=/* @__PURE__ */B(e,{"aria-label":Ue.folders,children:[re&&/* @__PURE__ */B(X,{children:[
5
+ /* @__PURE__ */Y(n,{label:e.name,level:r,icon:a&&i?Z.folderOpen:Z.folder,count:e.count,countLabel:null!=e.count?e.countLabel??Ue.fileCount(e.count):void 0,selected:t||tn&&ee.folderId===e.id,expanded:a?i:void 0,onToggle:a?()=>_e(e.id):void 0,onSelect:()=>ne({place:"files",folderId:e.id}),drop:Ln===e.id?"into":void 0,dragging:An===e.id,draggable:Ve&&!!Ie&&!ve.move,rename:t?/* @__PURE__ */Y(f,{value:e.name,label:Ue.folderName,onDone:Nn}):void 0,actions:Ve&&o.length?/* @__PURE__ */Y(I,{align:"end","aria-label":Ue.folderActions,trigger:Z.more,items:o}):void 0,rowProps:{"data-media-row":e.id,...Kn(e.id,e.id),...Ve?Bn({kind:"folder",id:e.id}):{},...Ve&&Ie&&!ve.move?{draggable:!0,onDragStart:n=>{n.dataTransfer.effectAllowed="move",n.dataTransfer.setData(J,e.id),Rn(e.id)},onDragEnd:()=>{Rn(null),On(null)}}:{}}}),a&&i&&/* @__PURE__ */Y(l,{children:Yn(e.id,r+1)})]},e.id)}),Hn=Ze.has("@files"),Jn=Ze.has("@products"),Qn=/* @__PURE__ */B(e,{"aria-label":Ue.folders,children:[re&&/* @__PURE__ */B(X,{children:[
6
6
  /* @__PURE__ */Y(n,{label:Vn("@products",Ue.products),level:1,icon:Z.lock,badge:{label:Ue.readOnlyBadge,tone:"neutral"},expanded:re.length?Jn:void 0,onToggle:()=>_e("@products"),selected:rn&&null==ee.nodeId,onSelect:()=>ne({place:"products",nodeId:null}),rowProps:{"data-media-row":"@products",...Gn("@products")}}),Jn&&re.length>0&&/* @__PURE__ */Y(l,{children:Xn(re,2)})]}),
7
- /* @__PURE__ */Y(n,{label:Ue.allFiles,level:1,icon:Hn?Z.folderOpen:Z.folder,count:ae,countLabel:null!=ae?Ue.fileCount(ae):void 0,expanded:Qe.get(null)?.length?Hn:void 0,onToggle:()=>_e("@files"),selected:tn&&null==ee.folderId,onSelect:()=>ne({place:"files",folderId:null}),drop:"@files"===Ln?"into":void 0,rowProps:{"data-media-row":"@files",...Kn("@files",null)}}),Hn&&(Qe.get(null)?.length??0)>0&&/* @__PURE__ */Y(l,{children:Yn(null,2)}),Ve&&/* @__PURE__ */Y(n,{label:Ue.trash,level:1,icon:Z.trash,count:ie,countLabel:null!=ie?Ue.fileCount(ie):void 0,selected:an,onSelect:()=>ne({place:"trash"}),rowProps:{"data-media-row":"@trash"}})]}),Wn=(()=>{if(an)return[{label:Ue.trash}];if(rn){const e=ee.nodeId?He.get(ee.nodeId)?.path??[]:[];return[{label:Ue.products,onClick:e.length?()=>ne({place:"products",nodeId:null}):void 0},...e.map((n,l)=>({label:n.name,onClick:l<e.length-1?()=>ne({place:"products",nodeId:n.id}):void 0}))]}const e=We(on);return[{label:Ue.allFiles,onClick:e.length?()=>ne({place:"files",folderId:null}):void 0},...e.map((n,l)=>({label:n.name,onClick:l<e.length-1?()=>ne({place:"files",folderId:n.id}):void 0}))]})(),$n=rn?Ue.readOnly:ve.upload,Zn=!!Ne&&!an&&!$n,qn=S({accept:ke,maxSizeBytes:ye,multiple:!0,disabled:!Zn,onAccept:e=>Ne?.(e,on)}),_n=rn?Ue.noProductFolder:ve.newFolder,el=e=>e?{"aria-disabled":!0,disabledReason:e}:{},nl=/* @__PURE__ */B("div",{className:"flex flex-wrap items-center gap-2",children:[Ve&&xe&&!an&&/* @__PURE__ */Y(L,{variant:"secondary",size:"sm",leftIcon:Z.folderPlus,onClick:()=>{xn(on)},...el(_n),children:Ue.newFolder}),Ne&&!an&&/* @__PURE__ */Y(L,{variant:"primary",size:"sm",leftIcon:Z.upload,onClick:()=>qn.open(),...el($n),children:Ue.upload}),Ve&&an&&je&&te.length>0&&/* @__PURE__ */Y(L,{variant:"danger",size:"sm",onClick:je,...el(ve.deleteForever),children:Ue.emptyTrash})]}),ll=(e,n,l,r,a)=>/* @__PURE__ */Y("div",{style:{width:Ye?void 0:a,flex:Ye?"1 1 120px":"0 0 auto",minWidth:0},children:/* @__PURE__ */Y(p,{size:"sm","aria-label":e,value:n,onChange:r,options:l})},e),rl=e=>n=>ce?.({...se,[e]:n}),al=/* @__PURE__ */B("div",{className:"flex flex-wrap items-center gap-2",children:[de&&/* @__PURE__ */Y("div",{style:{flex:"1 1 200px",minWidth:0},children:/* @__PURE__ */Y(C,{size:"sm",type:"search",leftIcon:Z.search,placeholder:rn?Ue.searchProducts:Ue.search,"aria-label":rn?Ue.searchProducts:Ue.search,value:oe??"",onChange:e=>de(e.target.value)})}),ce&&ll(Ue.mediaType,se.type,[{value:"all",label:Ue.allTypes},{value:"image",label:Ue.images},{value:"video",label:Ue.videos},{value:"svg",label:"SVG"},{value:"gif",label:"GIF"}],rl("type"),130),ce&&!rn&&!an&&ll(Ue.use,se.use,[{value:"any",label:Ue.anyUse},{value:"email",label:Ue.emailOnly},{value:"website",label:Ue.websiteOnly},{value:"unused",label:Ue.notUsed}],rl("use"),130),ce&&Ve&&ll(Ue.sort,se.sort,[{value:"newest",label:Ue.newest},{value:"name",label:Ue.byName},{value:"size",label:Ue.bySize}],rl("sort"),110),ue?.map(e=>ll(e.label,e.value,e.options,e.onChange,120)),pe&&/* @__PURE__ */Y(k,{size:"sm",label:Ue.view,value:me,onChange:pe,options:[{value:"grid",label:Ue.grid,icon:Z.grid},{value:"list",label:Ue.list,icon:Z.list}]})]}),il=e=>{const n=[];return null!=e.trashedDaysAgo&&n.push({key:"t",label:Ue.daysAgo(e.trashedDaysAgo),count:e.trashedDaysAgo,icon:q.clock,tone:"neutral"}),e.usedCount&&n.push({key:"u",label:Ue.used(e.usedCount),count:e.usedCount,icon:q.link,tone:"active"}),e.email&&n.push({key:"e",label:Ue.email,icon:q.email,tone:"queued"}),e.private&&n.push({key:"p",label:Ue.private,icon:q.lock,tone:"neutral"}),n},tl=e=>il(e).map(e=>/* @__PURE__ */Y(z,{tone:e.tone,size:"xs",children:e.label},e.key)),ol=Ve&&tn&&!!Ie&&!ve.move,dl=!!Re&&!an,sl=M(""),cl=M(null),ul=()=>cl.current?.dropped?"dropped":"cancelled",ml=M(Re);ml.current=Re;const pl=K(e=>{const n=cl.current;n&&(cl.current=null,n.stop(),F(sl.current,!1),e&&ml.current?.(e))},[]),hl=K(e=>{pl(ul());const n=Be.current?.ownerDocument;if(!n)return;sl.current=j(Be.current);const l=Be.current?.closest("[data-modal-panel]"),r=e=>{sl.current&&!l?.contains(e.target)&&F(sl.current,!0)},a=()=>!!e&&!e.isConnected,i=()=>{const e=cl.current;if(e){if(a())return pl("dropped");e.dropped=!0,F(sl.current,!1)}},t=e=>{const n=e.dataTransfer?.dropEffect;pl(n&&"none"!==n?"dropped":a()?ul():"cancelled")},o=()=>{a()&&pl(ul())},d=["pointermove","pointerdown","mousemove","mousedown"];n.addEventListener("dragover",r,!0),n.addEventListener("drop",i,!0),n.addEventListener("dragend",t,!0);for(const e of d)n.addEventListener(e,o,!0);cl.current={dropped:!1,stop:()=>{n.removeEventListener("dragover",r,!0),n.removeEventListener("drop",i,!0),n.removeEventListener("dragend",t,!0);for(const e of d)n.removeEventListener(e,o,!0)}}},[pl]);V(()=>()=>pl(ul()),[pl]);const fl=(e,n,l)=>{if("start"!==e)return;const r=un.get(n);r&&gl(r)&&(hl(l??null),Re(e))},gl=e=>!dl||e.private||e.pickDisabledReason?void 0:JSON.stringify({id:e.id,url:e.url,kind:"video"===e.kind?"video":"image",name:e.name}),vl=te.map(e=>({id:e.id,url:e.thumbUrl??e.url,name:e.name,kind:e.kind,caption:e.name,badges:il(e),dragData:ol?JSON.stringify(mn.isSelected(e.id)?pn:[e.id]):gl(e),...ol&&gl(e)?{dragAlso:{[Q]:gl(e)}}:{}})),kl=Ye?Math.max(72,Math.floor((Xe-24-16-1)/3)):112,yl=M(null),bl=v({containerRef:yl,enabled:Ve&&!Ye&&te.length>0,selected:mn.selected,setSelection:e=>mn.setSelection(e),clearSelection:mn.clear}),wl=e=>{if(Ge){const n=un.get(e);return void(!n||n.private||n.pickDisabledReason||Ee?.(n))}const n=cn.indexOf(e);n>=0&&Sn(n)},Nl=te.length?null:oe?/* @__PURE__ */Y(o,{variant:"dashed",title:Ue.noMatches}):rn?/* @__PURE__ */Y(o,{variant:"dashed",title:Ue.emptyProducts,description:sn(dn)}):an?/* @__PURE__ */Y(o,{variant:"dashed",title:Ue.trashEmpty}):!Zn||Ge?/* @__PURE__ */Y(o,{variant:"dashed",title:Ue.emptyFolder}):null,xl="list"===me&&te.length>0,Cl=Nl??(xl?/* @__PURE__ */Y("ul",{role:"listbox","aria-multiselectable":Ve||void 0,"aria-label":Ue.folders,className:"flex flex-col gap-1",children:te.map(e=>/* @__PURE__ */B("li",{role:"option","aria-selected":mn.isSelected(e.id),tabIndex:0,"data-grid-item":"","data-grid-id":e.id,onClick:n=>yn(e.id,n),onDoubleClick:()=>wl(e.id),onContextMenu:n=>zn(e.id,n),draggable:!!gl(e)||void 0,onDragStart:gl(e)?n=>{n.dataTransfer.effectAllowed="link",n.dataTransfer.setData(Q,gl(e)),fl("start",e.id,n.currentTarget)}:void 0,onKeyDown:n=>{"Enter"!==n.key&&" "!==n.key||(n.preventDefault(),yn(e.id,n))},className:"flex h-12 cursor-pointer items-center gap-3 rounded-md px-2 text-sm rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)] "+(mn.isSelected(e.id)?"bg-accent-tint text-blue-700":"text-ink hover:bg-gray-100"),children:[
7
+ /* @__PURE__ */Y(n,{label:Ue.allFiles,level:1,icon:Hn?Z.folderOpen:Z.folder,count:ae,countLabel:null!=ae?Ue.fileCount(ae):void 0,expanded:Qe.get(null)?.length?Hn:void 0,onToggle:()=>_e("@files"),selected:tn&&null==ee.folderId,onSelect:()=>ne({place:"files",folderId:null}),drop:"@files"===Ln?"into":void 0,rowProps:{"data-media-row":"@files",...Kn("@files",null)}}),Hn&&(Qe.get(null)?.length??0)>0&&/* @__PURE__ */Y(l,{children:Yn(null,2)}),Ve&&/* @__PURE__ */Y(n,{label:Ue.trash,level:1,icon:Z.trash,count:ie,countLabel:null!=ie?Ue.fileCount(ie):void 0,selected:an,onSelect:()=>ne({place:"trash"}),rowProps:{"data-media-row":"@trash"}})]}),Wn=(()=>{if(an)return[{label:Ue.trash}];if(rn){const e=ee.nodeId?He.get(ee.nodeId)?.path??[]:[];return[{label:Ue.products,onClick:e.length?()=>ne({place:"products",nodeId:null}):void 0},...e.map((n,l)=>({label:n.name,onClick:l<e.length-1?()=>ne({place:"products",nodeId:n.id}):void 0}))]}const e=We(on);return[{label:Ue.allFiles,onClick:e.length?()=>ne({place:"files",folderId:null}):void 0},...e.map((n,l)=>({label:n.name,onClick:l<e.length-1?()=>ne({place:"files",folderId:n.id}):void 0}))]})(),$n=rn?Ue.readOnly:ve.upload,Zn=!!Ne&&!an&&!$n,qn=S({accept:ke,maxSizeBytes:ye,multiple:!0,disabled:!Zn,onAccept:e=>Ne?.(e,on)}),_n=rn?Ue.noProductFolder:ve.newFolder,el=e=>e?{"aria-disabled":!0,disabledReason:e}:{},nl=/* @__PURE__ */B("div",{className:"flex flex-wrap items-center gap-2",children:[Ve&&xe&&!an&&/* @__PURE__ */Y(L,{variant:"secondary",size:"sm",leftIcon:Z.folderPlus,onClick:()=>{xn(on)},...el(_n),children:Ue.newFolder}),Ne&&!an&&/* @__PURE__ */Y(L,{variant:"primary",size:"sm",leftIcon:Z.upload,onClick:()=>qn.open(),...el($n),children:Ue.upload}),Ve&&an&&je&&te.length>0&&/* @__PURE__ */Y(L,{variant:"danger",size:"sm",onClick:je,...el(ve.deleteForever),children:Ue.emptyTrash})]}),ll=(e,n,l,r,a)=>/* @__PURE__ */Y("div",{style:{width:Ye?void 0:a,flex:Ye?"1 1 120px":"0 0 auto",minWidth:0},children:/* @__PURE__ */Y(g,{size:"sm","aria-label":e,value:n,onChange:r,options:l})},e),rl=e=>n=>ce?.({...se,[e]:n}),al=/* @__PURE__ */B("div",{className:"flex flex-wrap items-center gap-2",children:[de&&/* @__PURE__ */Y("div",{style:{flex:"1 1 200px",minWidth:0},children:/* @__PURE__ */Y(C,{size:"sm",type:"search",leftIcon:Z.search,placeholder:rn?Ue.searchProducts:Ue.search,"aria-label":rn?Ue.searchProducts:Ue.search,value:oe??"",onChange:e=>de(e.target.value)})}),ce&&ll(Ue.mediaType,se.type,[{value:"all",label:Ue.allTypes},{value:"image",label:Ue.images},{value:"video",label:Ue.videos},{value:"svg",label:"SVG"},{value:"gif",label:"GIF"}],rl("type"),130),ce&&!rn&&!an&&ll(Ue.use,se.use,[{value:"any",label:Ue.anyUse},{value:"email",label:Ue.emailOnly},{value:"website",label:Ue.websiteOnly},{value:"unused",label:Ue.notUsed}],rl("use"),130),ce&&Ve&&ll(Ue.sort,se.sort,[{value:"newest",label:Ue.newest},{value:"name",label:Ue.byName},{value:"size",label:Ue.bySize}],rl("sort"),110),ue?.map(e=>ll(e.label,e.value,e.options,e.onChange,120)),pe&&/* @__PURE__ */Y(k,{size:"sm",label:Ue.view,value:me,onChange:pe,options:[{value:"grid",label:Ue.grid,icon:Z.grid},{value:"list",label:Ue.list,icon:Z.list}]})]}),il=e=>{const n=[];return null!=e.trashedDaysAgo&&n.push({key:"t",label:Ue.daysAgo(e.trashedDaysAgo),count:e.trashedDaysAgo,icon:q.clock,tone:"neutral"}),e.usedCount&&n.push({key:"u",label:Ue.used(e.usedCount),count:e.usedCount,icon:q.link,tone:"active"}),e.email&&n.push({key:"e",label:Ue.email,icon:q.email,tone:"queued"}),e.private&&n.push({key:"p",label:Ue.private,icon:q.lock,tone:"neutral"}),n},tl=e=>il(e).map(e=>/* @__PURE__ */Y(z,{tone:e.tone,size:"xs",children:e.label},e.key)),ol=Ve&&tn&&!!Ie&&!ve.move,dl=!!Re&&!an,sl=M(""),cl=M(null),ul=()=>cl.current?.dropped?"dropped":"cancelled",ml=M(Re);ml.current=Re;const pl=K(e=>{const n=cl.current;n&&(cl.current=null,n.stop(),F(sl.current,!1),e&&ml.current?.(e))},[]),hl=K(e=>{pl(ul());const n=Be.current?.ownerDocument;if(!n)return;sl.current=j(Be.current);const l=Be.current?.closest("[data-modal-panel]"),r=e=>{sl.current&&!l?.contains(e.target)&&F(sl.current,!0)},a=()=>!!e&&!e.isConnected,i=()=>{const e=cl.current;if(e){if(a())return pl("dropped");e.dropped=!0,F(sl.current,!1)}},t=e=>{const n=e.dataTransfer?.dropEffect;pl(n&&"none"!==n?"dropped":a()?ul():"cancelled")},o=()=>{a()&&pl(ul())},d=["pointermove","pointerdown","mousemove","mousedown"];n.addEventListener("dragover",r,!0),n.addEventListener("drop",i,!0),n.addEventListener("dragend",t,!0);for(const e of d)n.addEventListener(e,o,!0);cl.current={dropped:!1,stop:()=>{n.removeEventListener("dragover",r,!0),n.removeEventListener("drop",i,!0),n.removeEventListener("dragend",t,!0);for(const e of d)n.removeEventListener(e,o,!0)}}},[pl]);V(()=>()=>pl(ul()),[pl]);const fl=(e,n,l)=>{if("start"!==e)return;const r=un.get(n);r&&gl(r)&&(hl(l??null),Re(e))},gl=e=>!dl||e.private||e.pickDisabledReason?void 0:JSON.stringify({id:e.id,url:e.url,kind:"video"===e.kind?"video":"image",name:e.name}),vl=te.map(e=>({id:e.id,url:e.thumbUrl??e.url,name:e.name,kind:e.kind,caption:e.name,badges:il(e),dragData:ol?JSON.stringify(mn.isSelected(e.id)?pn:[e.id]):gl(e),...ol&&gl(e)?{dragAlso:{[Q]:gl(e)}}:{}})),kl=Ye?Math.max(72,Math.floor((Xe-24-16-1)/3)):112,yl=M(null),bl=c({containerRef:yl,enabled:Ve&&!Ye&&te.length>0,selected:mn.selected,setSelection:e=>mn.setSelection(e),clearSelection:mn.clear}),wl=e=>{if(Ge){const n=un.get(e);return void(!n||n.private||n.pickDisabledReason||Ee?.(n))}const n=cn.indexOf(e);n>=0&&Sn(n)},Nl=te.length?null:oe?/* @__PURE__ */Y(o,{variant:"dashed",title:Ue.noMatches}):rn?/* @__PURE__ */Y(o,{variant:"dashed",title:Ue.emptyProducts,description:sn(dn)}):an?/* @__PURE__ */Y(o,{variant:"dashed",title:Ue.trashEmpty}):!Zn||Ge?/* @__PURE__ */Y(o,{variant:"dashed",title:Ue.emptyFolder}):null,xl="list"===me&&te.length>0,Cl=Nl??(xl?/* @__PURE__ */Y("ul",{role:"listbox","aria-multiselectable":Ve||void 0,"aria-label":Ue.folders,className:"flex flex-col gap-1",children:te.map(e=>/* @__PURE__ */B("li",{role:"option","aria-selected":mn.isSelected(e.id),tabIndex:0,"data-grid-item":"","data-grid-id":e.id,onClick:n=>yn(e.id,n),onDoubleClick:()=>wl(e.id),onContextMenu:n=>zn(e.id,n),draggable:!!gl(e)||void 0,onDragStart:gl(e)?n=>{n.dataTransfer.effectAllowed="link",n.dataTransfer.setData(Q,gl(e)),fl("start",e.id,n.currentTarget)}:void 0,onKeyDown:n=>{"Enter"!==n.key&&" "!==n.key||(n.preventDefault(),yn(e.id,n))},className:"flex h-12 cursor-pointer items-center gap-3 rounded-md px-2 text-sm rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)] "+(mn.isSelected(e.id)?"bg-accent-tint text-blue-700":"text-ink hover:bg-gray-100"),children:[
8
8
  /* @__PURE__ */Y("img",{src:e.thumbUrl??e.url,alt:"",className:"h-10 w-10 shrink-0 rounded bg-gray-100 object-contain"}),
9
9
  /* @__PURE__ */Y("span",{className:"min-w-0 flex-1 truncate",children:e.name}),
10
- /* @__PURE__ */Y("span",{className:"flex shrink-0 items-center gap-1",children:tl(e)}),e.sizeLabel&&/* @__PURE__ */Y("span",{className:"w-16 shrink-0 text-right text-xs text-ink-faint",children:e.sizeLabel})]},e.id))}):/* @__PURE__ */Y(h,{items:vl,readOnly:!Zn||Ge,onFiles:Zn&&!Ge?e=>Ne(e,on):void 0,accept:ke,maxSizeBytes:ye,busy:be,progress:we,fit:"contain",thumbSize:kl,dragType:ol?H:dl?Q:void 0,onDragOutChange:dl?(e,n,l)=>fl(e,n,l):void 0,selected:mn.selected,onItemClick:yn,onItemDoubleClick:wl,onItemContextMenu:Ve?zn:void 0,menuOnMedia:Ve})),Il=u({count:pn.length,kind:In(pn),targets:Cn({kind:"files",ids:pn}),onPick:e=>Ie?.({kind:"files",ids:pn},e.key===s?null:e.key)}),Dl=P({variant:"secondary",size:"sm"}),Sl=/* @__PURE__ */Y(I,{align:"start",triggerClassName:Dl,trigger:/* @__PURE__ */B(X,{children:[Z.folder,Ue.moveTo]}),items:Il,disabled:!!ve.move}),Tl=Ve&&pn.length>1&&!rn?/* @__PURE__ */B("div",{"data-media-bulk":"",className:"flex flex-wrap items-center gap-2 rounded-lg border border-line px-3 py-2",children:[
10
+ /* @__PURE__ */Y("span",{className:"flex shrink-0 items-center gap-1",children:tl(e)}),e.sizeLabel&&/* @__PURE__ */Y("span",{className:"w-16 shrink-0 text-right text-xs text-ink-faint",children:e.sizeLabel})]},e.id))}):/* @__PURE__ */Y(v,{items:vl,readOnly:!Zn||Ge,onFiles:Zn&&!Ge?e=>Ne(e,on):void 0,accept:ke,maxSizeBytes:ye,busy:be,progress:we,fit:"contain",thumbSize:kl,dragType:ol?H:dl?Q:void 0,onDragOutChange:dl?(e,n,l)=>fl(e,n,l):void 0,selected:mn.selected,onItemClick:yn,onItemDoubleClick:wl,onItemContextMenu:Ve?zn:void 0,menuOnMedia:Ve})),Il=p({count:pn.length,kind:In(pn),targets:Cn({kind:"files",ids:pn}),onPick:e=>Ie?.({kind:"files",ids:pn},e.key===u?null:e.key)}),Dl=P({variant:"secondary",size:"sm"}),Sl=/* @__PURE__ */Y(I,{align:"start",triggerClassName:Dl,trigger:/* @__PURE__ */B(X,{children:[Z.folder,Ue.moveTo]}),items:Il,disabled:!!ve.move}),Tl=Ve&&pn.length>1&&!rn?/* @__PURE__ */B("div",{"data-media-bulk":"",className:"flex flex-wrap items-center gap-2 rounded-lg border border-line px-3 py-2",children:[
11
11
  /* @__PURE__ */Y(b,{checked:pn.length===te.length,indeterminate:pn.length<te.length,onChange:e=>e?mn.selectAll():mn.clear(),label:Ue.selected(pn.length)}),/* @__PURE__ */B(X,an?{children:[Te&&/* @__PURE__ */Y(L,{variant:"secondary",size:"sm",leftIcon:Z.undo,onClick:()=>Te(pn),...el(ve.restore),children:Ue.restore}),Fe&&/* @__PURE__ */Y(L,{variant:"secondary-danger",size:"sm",onClick:()=>Fe(pn),...el(ve.deleteForever),children:Ue.deleteForever})]}:{children:[Ie&&Sl,Ce&&/* @__PURE__ */Y(L,{variant:"secondary",size:"sm",leftIcon:Z.edit,disabled:!0,children:Ue.rename}),De&&/* @__PURE__ */Y(L,{variant:"secondary",size:"sm",leftIcon:Z.trash,onClick:()=>De({kind:"files",ids:pn}),...el(ve.trash),children:Ue.moveFilesToTrash(pn.length)})]}),
12
- /* @__PURE__ */Y(L,{variant:"ghost",size:"sm",onClick:mn.clear,children:Ue.clearSelection})]}):null,Fl=e=>{const n=[],l=(e,l,r)=>{null!=r&&""!==r&&n.push({key:e,label:l,value:r})},r="file"===bn?.kind&&bn.id===e.id;l("name",Ue.name,r?/* @__PURE__ */Y(m,{value:e.name,label:Ue.fileName,onDone:Nn}):e.name),l("type",Ue.type,e.typeLabel),l("size",Ue.size,e.sizeLabel),l("resolution",Ue.resolution,e.resolution),rn?(l("design",Ue.design,e.design),l("finish",Ue.finish,e.finish),l("angle",Ue.angleLug,e.angleLug),l("owner",Ue.owner,e.owner)):(l("added",Ue.addedBy,e.addedBy),l("folder",Ue.folder,e.folderPath)),l("used",Ue.usedIn,null!=e.usedCount?Ue.places(e.usedCount):void 0);const a=c({kind:"files",ids:[e.id]},Tn).find(e=>"submenu"===e.type);/* @__PURE__ */
12
+ /* @__PURE__ */Y(L,{variant:"ghost",size:"sm",onClick:mn.clear,children:Ue.clearSelection})]}):null,Fl=e=>{const n=[],l=(e,l,r)=>{null!=r&&""!==r&&n.push({key:e,label:l,value:r})},r="file"===bn?.kind&&bn.id===e.id;l("name",Ue.name,r?/* @__PURE__ */Y(f,{value:e.name,label:Ue.fileName,onDone:Nn}):e.name),l("type",Ue.type,e.typeLabel),l("size",Ue.size,e.sizeLabel),l("resolution",Ue.resolution,e.resolution),rn?(l("design",Ue.design,e.design),l("finish",Ue.finish,e.finish),l("angle",Ue.angleLug,e.angleLug),l("owner",Ue.owner,e.owner)):(l("added",Ue.addedBy,e.addedBy),l("folder",Ue.folder,e.folderPath)),l("used",Ue.usedIn,null!=e.usedCount?Ue.places(e.usedCount):void 0);const a=m({kind:"files",ids:[e.id]},Tn).find(e=>"submenu"===e.type);/* @__PURE__ */
13
13
  return B("div",{"data-media-details":"",className:"flex flex-col gap-3",children:[
14
14
  /* @__PURE__ */Y("img",{src:e.url,alt:e.name,className:"aspect-square w-full rounded-lg bg-gray-100 object-contain"}),rn&&/* @__PURE__ */Y(x,{tone:"neutral",title:Ue.readOnlyBadge,children:sn(dn)}),
15
15
  /* @__PURE__ */Y(i,{size:"sm",columns:1,items:n}),!an&&/* @__PURE__ */B("div",{className:"flex gap-2",children:[
16
16
  /* @__PURE__ */Y("div",{style:{flex:"1 1 0",minWidth:0},children:/* @__PURE__ */Y(C,{size:"sm",readOnly:!0,value:e.url,"aria-label":Ue.fileUrl,onFocus:e=>e.currentTarget.select()})}),
17
- /* @__PURE__ */Y(L,{variant:"secondary",size:"sm",leftIcon:Z.copy,onClick:()=>Tn.copyUrl(e.id),children:Ue.copyUrl})]}),tn&&Ve&&/* @__PURE__ */B("div",{className:"flex flex-wrap gap-2",children:[ze&&/* @__PURE__ */Y(L,{variant:"secondary",size:"sm",leftIcon:Z.swap,onClick:()=>ze(e.id),...el(ve.replace),children:Ue.replace}),Le&&/* @__PURE__ */Y(L,{variant:"secondary",size:"sm",leftIcon:Z.crop,onClick:()=>Le(e.id),children:Ue.cropEdit}),Ie&&"submenu"===a?.type&&/* @__PURE__ */Y(I,{align:"start",triggerClassName:Dl,trigger:/* @__PURE__ */B(X,{children:[Z.folder,Ue.moveTo]}),items:a.items,disabled:!!ve.move}),Ce&&/* @__PURE__ */Y(L,{variant:"secondary",size:"sm",leftIcon:Z.edit,onClick:()=>wn({kind:"file",id:e.id}),...el(ve.rename),children:Ue.rename}),De&&/* @__PURE__ */Y(D,{"aria-label":Ue.moveToTrash,size:"sm",onClick:()=>De({kind:"files",ids:[e.id]}),disabledReason:ve.trash,"aria-disabled":!!ve.trash||void 0,children:Z.trash})]}),an&&Ve&&/* @__PURE__ */B("div",{className:"flex flex-wrap gap-2",children:[Te&&/* @__PURE__ */Y(L,{variant:"primary",size:"sm",leftIcon:Z.undo,onClick:()=>Te([e.id]),...el(ve.restore),children:Ue.restore}),Fe&&/* @__PURE__ */Y(L,{variant:"danger",size:"sm",onClick:()=>Fe([e.id]),...el(ve.deleteForever),children:Ue.deleteForever})]}),rn&&Oe&&/* @__PURE__ */Y(L,{variant:"secondary",size:"sm",leftIcon:Z.external,onClick:()=>Oe({kind:"render",id:e.id}),children:Ue.openInDesign}),ge&&/* @__PURE__ */Y(f,{items:ge})]})},jl=hn?hn.private?Ue.privateNoPick:hn.pickDisabledReason:void 0,zl=Ge?/* @__PURE__ */B("div",{"data-media-picker-footer":"",className:"flex flex-wrap items-center justify-between gap-2 border-t border-line px-3 py-2",children:[
17
+ /* @__PURE__ */Y(L,{variant:"secondary",size:"sm",leftIcon:Z.copy,onClick:()=>Tn.copyUrl(e.id),children:Ue.copyUrl})]}),tn&&Ve&&/* @__PURE__ */B("div",{className:"flex flex-wrap gap-2",children:[ze&&/* @__PURE__ */Y(L,{variant:"secondary",size:"sm",leftIcon:Z.swap,onClick:()=>ze(e.id),...el(ve.replace),children:Ue.replace}),Le&&/* @__PURE__ */Y(L,{variant:"secondary",size:"sm",leftIcon:Z.crop,onClick:()=>Le(e.id),children:Ue.cropEdit}),Ie&&"submenu"===a?.type&&/* @__PURE__ */Y(I,{align:"start",triggerClassName:Dl,trigger:/* @__PURE__ */B(X,{children:[Z.folder,Ue.moveTo]}),items:a.items,disabled:!!ve.move}),Ce&&/* @__PURE__ */Y(L,{variant:"secondary",size:"sm",leftIcon:Z.edit,onClick:()=>wn({kind:"file",id:e.id}),...el(ve.rename),children:Ue.rename}),De&&/* @__PURE__ */Y(D,{"aria-label":Ue.moveToTrash,size:"sm",onClick:()=>De({kind:"files",ids:[e.id]}),disabledReason:ve.trash,"aria-disabled":!!ve.trash||void 0,children:Z.trash})]}),an&&Ve&&/* @__PURE__ */B("div",{className:"flex flex-wrap gap-2",children:[Te&&/* @__PURE__ */Y(L,{variant:"primary",size:"sm",leftIcon:Z.undo,onClick:()=>Te([e.id]),...el(ve.restore),children:Ue.restore}),Fe&&/* @__PURE__ */Y(L,{variant:"danger",size:"sm",onClick:()=>Fe([e.id]),...el(ve.deleteForever),children:Ue.deleteForever})]}),rn&&Oe&&/* @__PURE__ */Y(L,{variant:"secondary",size:"sm",leftIcon:Z.external,onClick:()=>Oe({kind:"render",id:e.id}),children:Ue.openInDesign}),ge&&/* @__PURE__ */Y(h,{items:ge})]})},jl=hn?hn.private?Ue.privateNoPick:hn.pickDisabledReason:void 0,zl=Ge?/* @__PURE__ */B("div",{"data-media-picker-footer":"",className:"flex flex-wrap items-center justify-between gap-2 border-t border-line px-3 py-2",children:[
18
18
  /* @__PURE__ */Y("span",{className:"min-w-0 truncate text-sm text-ink-faint",children:hn?Ue.oneChosen(hn.name):Ue.noneChosen}),
19
19
  /* @__PURE__ */B("div",{className:"flex gap-2",children:[Pe&&/* @__PURE__ */Y(L,{variant:"secondary",size:"sm",onClick:Pe,children:Ue.cancel}),
20
20
  /* @__PURE__ */Y(L,{variant:"primary",size:"sm",disabled:!hn,...el(jl),onClick:()=>{hn&&!jl&&Ee?.(hn)},children:Ue.chooseImage})]})]}):null,Ll=Ve&&!!hn,Ol=/* @__PURE__ */B("div",{className:"flex min-w-0 flex-col gap-3",children:[Ae&&/* @__PURE__ */Y(x,{tone:"neutral",children:Ae}),
@@ -1,4 +1,4 @@
1
- import{Modal as e}from"./chunk-ZI2FDUYJ.js";import{keepsNativeMenu as a}from"./chunk-5QFPTDQF.js";import{jsx as i,jsxs as n}from"react/jsx-runtime";var t={activeOpacity:70,inactiveOpacity:50,activeBlur:0,inactiveBlur:0};function r(e){try{const a=JSON.parse(localStorage.getItem(e)||"");return null!=a.blur&&null==a.activeBlur&&(a.activeBlur=a.blur,a.inactiveBlur=a.blur,delete a.blur),{...t,...a}}catch{return t}}function l({open:t,onClose:r,title:l,appearance:c,onAppearanceChange:s,onSave:d,children:o}){if(!t)return null;const u="w-full h-1.5 rounded-full appearance-none bg-gray-200 cursor-pointer accent-blue-500",p="flex items-center justify-between text-xs text-gray-500";/* @__PURE__ */
1
+ import{Modal as e}from"./chunk-IXJIHTUI.js";import{keepsNativeMenu as a}from"./chunk-5QFPTDQF.js";import{jsx as i,jsxs as n}from"react/jsx-runtime";var t={activeOpacity:70,inactiveOpacity:50,activeBlur:0,inactiveBlur:0};function r(e){try{const a=JSON.parse(localStorage.getItem(e)||"");return null!=a.blur&&null==a.activeBlur&&(a.activeBlur=a.blur,a.inactiveBlur=a.blur,delete a.blur),{...t,...a}}catch{return t}}function l({open:t,onClose:r,title:l,appearance:c,onAppearanceChange:s,onSave:d,children:o}){if(!t)return null;const u="w-full h-1.5 rounded-full appearance-none bg-gray-200 cursor-pointer accent-blue-500",p="flex items-center justify-between text-xs text-gray-500";/* @__PURE__ */
2
2
  return i("div",{onPointerDown:e=>e.stopPropagation(),onContextMenu:e=>{e.stopPropagation(),a(e.target)||e.preventDefault()},children:/* @__PURE__ */i(e,{open:t,onClose:r,title:l,size:"sm",children:/* @__PURE__ */n("div",{className:"space-y-4",children:[o,
3
3
  /* @__PURE__ */n("div",{children:[
4
4
  /* @__PURE__ */i("h3",{className:"text-sm font-semibold text-gray-700 mb-3",children:"Appearance"}),
@@ -0,0 +1 @@
1
+ import{createContext as e}from"react";var r=e(null),t='button, input, a, kbd, select, textarea, label, summary, [role="button"], [role="tab"], [role="separator"], [role="slider"], [role="menuitem"], [role="option"], [role="columnheader"], [draggable="true"], [contenteditable="true"], [data-no-window-drag]';export{t as NO_WINDOW_DRAG,r as WindowInsetContext};
@@ -1,2 +1,2 @@
1
1
  "use client";
2
- export{EntityList as default}from"../chunk-ENVANMHI.js";import"../chunk-UFX7F3KG.js";import"../chunk-ATMJ5ZPK.js";import"../chunk-G6DKCCWH.js";import"../chunk-DO3DSSAW.js";import"../chunk-MVOYVN3S.js";import"../chunk-4SYPNE3P.js";import"../chunk-C5OPAULN.js";import"../chunk-ULJQYXHB.js";import"../chunk-SI26KESU.js";import"../chunk-CGZBDI6C.js";import"../chunk-4U5M37SF.js";import"../chunk-F3ZOO23R.js";import"../chunk-2QY5BJLA.js";import"../chunk-UGTRSRIW.js";import"../chunk-DPFEQQQU.js";import"../chunk-THAPVKEJ.js";import"../chunk-URHGHXDN.js";import"../chunk-5QFPTDQF.js";import"../chunk-UTISUEO4.js";import"../chunk-BUFAJJDZ.js";import"../chunk-ISVODSRP.js";import"../chunk-J75ZT2JQ.js";import"../chunk-R2VKEMZH.js";import"../chunk-TD3ZQD5R.js";import"../chunk-F2RAIGCG.js";import"../chunk-PGN5ME7B.js";import"../chunk-62LW225J.js";import"../chunk-VY3UA6AR.js";import"../chunk-WCCS4VFE.js";import"../chunk-ZDXRSY2Y.js";import"../chunk-STKJA4PV.js";import"../chunk-VQ35LXDC.js";import"../chunk-UQYNPYF4.js";import"../chunk-MRJKZWWV.js";import"../chunk-TWVUQUUD.js";import"../chunk-5FYDNH4Y.js";import"../chunk-LNXBTK7Q.js";import"../chunk-IUVGHHR3.js";import"../chunk-C3QOHMR6.js";
2
+ export{EntityList as default}from"../chunk-SHHRC5XK.js";import"../chunk-UFX7F3KG.js";import"../chunk-ATMJ5ZPK.js";import"../chunk-G6DKCCWH.js";import"../chunk-DO3DSSAW.js";import"../chunk-MVOYVN3S.js";import"../chunk-J4CVYOY3.js";import"../chunk-SI26KESU.js";import"../chunk-C5OPAULN.js";import"../chunk-ULJQYXHB.js";import"../chunk-CGZBDI6C.js";import"../chunk-4U5M37SF.js";import"../chunk-F3ZOO23R.js";import"../chunk-2QY5BJLA.js";import"../chunk-UGTRSRIW.js";import"../chunk-DPFEQQQU.js";import"../chunk-THAPVKEJ.js";import"../chunk-URHGHXDN.js";import"../chunk-5QFPTDQF.js";import"../chunk-UTISUEO4.js";import"../chunk-BUFAJJDZ.js";import"../chunk-ISVODSRP.js";import"../chunk-J75ZT2JQ.js";import"../chunk-R2VKEMZH.js";import"../chunk-TD3ZQD5R.js";import"../chunk-F2RAIGCG.js";import"../chunk-PGN5ME7B.js";import"../chunk-62LW225J.js";import"../chunk-VY3UA6AR.js";import"../chunk-WCCS4VFE.js";import"../chunk-ZDXRSY2Y.js";import"../chunk-STKJA4PV.js";import"../chunk-VQ35LXDC.js";import"../chunk-UQYNPYF4.js";import"../chunk-MRJKZWWV.js";import"../chunk-TWVUQUUD.js";import"../chunk-5FYDNH4Y.js";import"../chunk-LNXBTK7Q.js";import"../chunk-IUVGHHR3.js";import"../chunk-C3QOHMR6.js";
@@ -1,2 +1,2 @@
1
1
  "use client";
2
- export{ResizableTable as default}from"../chunk-4SYPNE3P.js";import"../chunk-C5OPAULN.js";import"../chunk-ULJQYXHB.js";import"../chunk-SI26KESU.js";import"../chunk-2QY5BJLA.js";import"../chunk-UGTRSRIW.js";import"../chunk-DPFEQQQU.js";import"../chunk-ISVODSRP.js";import"../chunk-J75ZT2JQ.js";import"../chunk-TD3ZQD5R.js";import"../chunk-F2RAIGCG.js";import"../chunk-PGN5ME7B.js";import"../chunk-62LW225J.js";import"../chunk-VY3UA6AR.js";import"../chunk-WCCS4VFE.js";import"../chunk-ZDXRSY2Y.js";import"../chunk-STKJA4PV.js";import"../chunk-TWVUQUUD.js";import"../chunk-5FYDNH4Y.js";import"../chunk-LNXBTK7Q.js";import"../chunk-IUVGHHR3.js";import"../chunk-C3QOHMR6.js";
2
+ export{ResizableTable as default}from"../chunk-J4CVYOY3.js";import"../chunk-SI26KESU.js";import"../chunk-C5OPAULN.js";import"../chunk-ULJQYXHB.js";import"../chunk-2QY5BJLA.js";import"../chunk-UGTRSRIW.js";import"../chunk-DPFEQQQU.js";import"../chunk-ISVODSRP.js";import"../chunk-J75ZT2JQ.js";import"../chunk-TD3ZQD5R.js";import"../chunk-F2RAIGCG.js";import"../chunk-PGN5ME7B.js";import"../chunk-62LW225J.js";import"../chunk-VY3UA6AR.js";import"../chunk-WCCS4VFE.js";import"../chunk-ZDXRSY2Y.js";import"../chunk-STKJA4PV.js";import"../chunk-TWVUQUUD.js";import"../chunk-5FYDNH4Y.js";import"../chunk-LNXBTK7Q.js";import"../chunk-IUVGHHR3.js";import"../chunk-C3QOHMR6.js";
@@ -1,2 +1,2 @@
1
1
  "use client";
2
- export{BrandAssetEditor as default}from"../chunk-GEQZUCEO.js";import"../chunk-QTDR2CTB.js";import"../chunk-6KBDNYRW.js";import"../chunk-5POQCJL6.js";import"../chunk-MI67DI3H.js";import"../chunk-25RR3GQW.js";import"../chunk-TNALBYLY.js";import"../chunk-EFKJLUYP.js";import"../chunk-YWMCW5BN.js";import"../chunk-GUSENWAH.js";import"../chunk-VFSAJMNX.js";import"../chunk-YDJ5IZOU.js";import"../chunk-UTISUEO4.js";import"../chunk-BUFAJJDZ.js";import"../chunk-ISVODSRP.js";import"../chunk-J75ZT2JQ.js";import"../chunk-R2VKEMZH.js";import"../chunk-TD3ZQD5R.js";import"../chunk-F2RAIGCG.js";import"../chunk-PGN5ME7B.js";import"../chunk-62LW225J.js";import"../chunk-VY3UA6AR.js";import"../chunk-WCCS4VFE.js";import"../chunk-ZDXRSY2Y.js";import"../chunk-UQYNPYF4.js";import"../chunk-MRJKZWWV.js";import"../chunk-TWVUQUUD.js";import"../chunk-5FYDNH4Y.js";import"../chunk-LNXBTK7Q.js";import"../chunk-IUVGHHR3.js";import"../chunk-C3QOHMR6.js";
2
+ export{BrandAssetEditor as default}from"../chunk-BVX7LUAW.js";import"../chunk-IUQJGFEO.js";import"../chunk-5POQCJL6.js";import"../chunk-6KBDNYRW.js";import"../chunk-MI67DI3H.js";import"../chunk-25RR3GQW.js";import"../chunk-TNALBYLY.js";import"../chunk-EFKJLUYP.js";import"../chunk-YWMCW5BN.js";import"../chunk-GUSENWAH.js";import"../chunk-VFSAJMNX.js";import"../chunk-YDJ5IZOU.js";import"../chunk-UTISUEO4.js";import"../chunk-BUFAJJDZ.js";import"../chunk-ISVODSRP.js";import"../chunk-J75ZT2JQ.js";import"../chunk-R2VKEMZH.js";import"../chunk-TD3ZQD5R.js";import"../chunk-F2RAIGCG.js";import"../chunk-PGN5ME7B.js";import"../chunk-62LW225J.js";import"../chunk-VY3UA6AR.js";import"../chunk-WCCS4VFE.js";import"../chunk-ZDXRSY2Y.js";import"../chunk-UQYNPYF4.js";import"../chunk-MRJKZWWV.js";import"../chunk-TWVUQUUD.js";import"../chunk-5FYDNH4Y.js";import"../chunk-LNXBTK7Q.js";import"../chunk-IUVGHHR3.js";import"../chunk-C3QOHMR6.js";
@@ -1,2 +1,2 @@
1
1
  "use client";
2
- export{MEDIA_FILES_DRAG_TYPE,MEDIA_FILE_DRAG_TYPE,MEDIA_FOLDER_DRAG_TYPE,MediaLibrary as default,readMediaFileDrag}from"../chunk-S7YUQLBN.js";import"../chunk-6OGX7V7L.js";import"../chunk-ZCN5BU4U.js";import"../chunk-IC72MGON.js";import"../chunk-FXSGIT53.js";import"../chunk-CGUMJZUB.js";import"../chunk-SACUSHVN.js";import"../chunk-LQCNIQ3I.js";import"../chunk-VXSYHTBP.js";import"../chunk-OZ4R6U2M.js";import"../chunk-L2WBCXG7.js";import"../chunk-ZCGT5YNR.js";import"../chunk-Q4MOT7TY.js";import"../chunk-GEITUFYK.js";import"../chunk-EO5RLFRX.js";import"../chunk-K5YT5PMJ.js";import"../chunk-TPKNHQIE.js";import"../chunk-FFRJ6QZK.js";import"../chunk-VLKDWKVR.js";import"../chunk-OLFYNMTD.js";import"../chunk-LACL4MAR.js";import"../chunk-2NMW66P5.js";import"../chunk-6KBDNYRW.js";import"../chunk-TNALBYLY.js";import"../chunk-EFKJLUYP.js";import"../chunk-UFX7F3KG.js";import"../chunk-CGZBDI6C.js";import"../chunk-VKZC3NPM.js";import"../chunk-XWJT6TFU.js";import"../chunk-3SIRRK3F.js";import"../chunk-EX3DARI3.js";import"../chunk-VQBKRBBR.js";import"../chunk-NWS5G7FE.js";import"../chunk-AYZY3YNC.js";import"../chunk-YWMCW5BN.js";import"../chunk-GUSENWAH.js";import"../chunk-VFSAJMNX.js";import"../chunk-EIFNESXS.js";import"../chunk-SXHV5OLA.js";import"../chunk-SF4IIV5Z.js";import"../chunk-FRCTA5FS.js";import"../chunk-VWGWZY7A.js";import"../chunk-UVHXVSB2.js";import"../chunk-WRV6QKJN.js";import"../chunk-F3ZOO23R.js";import"../chunk-UGTRSRIW.js";import"../chunk-DWGYC7OD.js";import"../chunk-YDJ5IZOU.js";import"../chunk-THAPVKEJ.js";import"../chunk-URHGHXDN.js";import"../chunk-5QFPTDQF.js";import"../chunk-UTISUEO4.js";import"../chunk-BUFAJJDZ.js";import"../chunk-ISVODSRP.js";import"../chunk-J75ZT2JQ.js";import"../chunk-R2VKEMZH.js";import"../chunk-BWJZTHZ6.js";import"../chunk-TD3ZQD5R.js";import"../chunk-F2RAIGCG.js";import"../chunk-PGN5ME7B.js";import"../chunk-62LW225J.js";import"../chunk-VY3UA6AR.js";import"../chunk-WCCS4VFE.js";import"../chunk-ZDXRSY2Y.js";import"../chunk-VQ35LXDC.js";import"../chunk-UQYNPYF4.js";import"../chunk-MRJKZWWV.js";import"../chunk-TWVUQUUD.js";import"../chunk-5FYDNH4Y.js";import"../chunk-LNXBTK7Q.js";import"../chunk-MAFUXCPZ.js";import"../chunk-IUVGHHR3.js";import"../chunk-C3QOHMR6.js";
2
+ export{MEDIA_FILES_DRAG_TYPE,MEDIA_FILE_DRAG_TYPE,MEDIA_FOLDER_DRAG_TYPE,MediaLibrary as default,readMediaFileDrag}from"../chunk-XXTAMF3O.js";import"../chunk-6OGX7V7L.js";import"../chunk-ZCN5BU4U.js";import"../chunk-IC72MGON.js";import"../chunk-FXSGIT53.js";import"../chunk-CGUMJZUB.js";import"../chunk-SACUSHVN.js";import"../chunk-LQCNIQ3I.js";import"../chunk-VXSYHTBP.js";import"../chunk-OZ4R6U2M.js";import"../chunk-VLKDWKVR.js";import"../chunk-OLFYNMTD.js";import"../chunk-LACL4MAR.js";import"../chunk-L2WBCXG7.js";import"../chunk-ZCGT5YNR.js";import"../chunk-FFRJ6QZK.js";import"../chunk-Q4MOT7TY.js";import"../chunk-GEITUFYK.js";import"../chunk-EO5RLFRX.js";import"../chunk-K5YT5PMJ.js";import"../chunk-TPKNHQIE.js";import"../chunk-2NMW66P5.js";import"../chunk-6KBDNYRW.js";import"../chunk-TNALBYLY.js";import"../chunk-EFKJLUYP.js";import"../chunk-UFX7F3KG.js";import"../chunk-CGZBDI6C.js";import"../chunk-VKZC3NPM.js";import"../chunk-XWJT6TFU.js";import"../chunk-3SIRRK3F.js";import"../chunk-EX3DARI3.js";import"../chunk-VQBKRBBR.js";import"../chunk-NWS5G7FE.js";import"../chunk-AYZY3YNC.js";import"../chunk-YWMCW5BN.js";import"../chunk-GUSENWAH.js";import"../chunk-VFSAJMNX.js";import"../chunk-EIFNESXS.js";import"../chunk-SXHV5OLA.js";import"../chunk-SF4IIV5Z.js";import"../chunk-FRCTA5FS.js";import"../chunk-VWGWZY7A.js";import"../chunk-UVHXVSB2.js";import"../chunk-WRV6QKJN.js";import"../chunk-F3ZOO23R.js";import"../chunk-UGTRSRIW.js";import"../chunk-DWGYC7OD.js";import"../chunk-YDJ5IZOU.js";import"../chunk-THAPVKEJ.js";import"../chunk-URHGHXDN.js";import"../chunk-5QFPTDQF.js";import"../chunk-UTISUEO4.js";import"../chunk-BUFAJJDZ.js";import"../chunk-ISVODSRP.js";import"../chunk-J75ZT2JQ.js";import"../chunk-R2VKEMZH.js";import"../chunk-BWJZTHZ6.js";import"../chunk-TD3ZQD5R.js";import"../chunk-F2RAIGCG.js";import"../chunk-PGN5ME7B.js";import"../chunk-62LW225J.js";import"../chunk-VY3UA6AR.js";import"../chunk-WCCS4VFE.js";import"../chunk-ZDXRSY2Y.js";import"../chunk-VQ35LXDC.js";import"../chunk-UQYNPYF4.js";import"../chunk-MRJKZWWV.js";import"../chunk-TWVUQUUD.js";import"../chunk-5FYDNH4Y.js";import"../chunk-LNXBTK7Q.js";import"../chunk-MAFUXCPZ.js";import"../chunk-IUVGHHR3.js";import"../chunk-C3QOHMR6.js";
@@ -1,2 +1,2 @@
1
1
  "use client";
2
- export{MediaUploadField as default}from"../chunk-QTDR2CTB.js";import"../chunk-6KBDNYRW.js";import"../chunk-5POQCJL6.js";import"../chunk-25RR3GQW.js";import"../chunk-TNALBYLY.js";import"../chunk-EFKJLUYP.js";export{mediaFileName}from"../chunk-YWMCW5BN.js";import"../chunk-GUSENWAH.js";import"../chunk-VFSAJMNX.js";import"../chunk-YDJ5IZOU.js";import"../chunk-ISVODSRP.js";import"../chunk-J75ZT2JQ.js";import"../chunk-R2VKEMZH.js";import"../chunk-TD3ZQD5R.js";import"../chunk-F2RAIGCG.js";import"../chunk-PGN5ME7B.js";import"../chunk-62LW225J.js";import"../chunk-VY3UA6AR.js";import"../chunk-WCCS4VFE.js";import"../chunk-ZDXRSY2Y.js";import"../chunk-MRJKZWWV.js";import"../chunk-TWVUQUUD.js";import"../chunk-5FYDNH4Y.js";import"../chunk-LNXBTK7Q.js";import"../chunk-IUVGHHR3.js";import"../chunk-C3QOHMR6.js";
2
+ export{MediaUploadField as default}from"../chunk-IUQJGFEO.js";import"../chunk-5POQCJL6.js";import"../chunk-6KBDNYRW.js";import"../chunk-25RR3GQW.js";import"../chunk-TNALBYLY.js";import"../chunk-EFKJLUYP.js";export{mediaFileName}from"../chunk-YWMCW5BN.js";import"../chunk-GUSENWAH.js";import"../chunk-VFSAJMNX.js";import"../chunk-YDJ5IZOU.js";import"../chunk-ISVODSRP.js";import"../chunk-J75ZT2JQ.js";import"../chunk-R2VKEMZH.js";import"../chunk-TD3ZQD5R.js";import"../chunk-F2RAIGCG.js";import"../chunk-PGN5ME7B.js";import"../chunk-62LW225J.js";import"../chunk-VY3UA6AR.js";import"../chunk-WCCS4VFE.js";import"../chunk-ZDXRSY2Y.js";import"../chunk-MRJKZWWV.js";import"../chunk-TWVUQUUD.js";import"../chunk-5FYDNH4Y.js";import"../chunk-LNXBTK7Q.js";import"../chunk-IUVGHHR3.js";import"../chunk-C3QOHMR6.js";
@@ -1,4 +1,4 @@
1
- import { useLayoutEffect } from 'react';
1
+ import { useEffect } from 'react';
2
2
 
3
3
  /**
4
4
  * The one home of the browser/server effect pick. It imports React and nothing
@@ -24,6 +24,6 @@ declare const IN_BROWSER: boolean;
24
24
  * `useLayoutEffect` it meets, once per component per render. Chosen at module
25
25
  * scope, so the hook order is the same on every render either way.
26
26
  */
27
- declare const useBrowserLayoutEffect: typeof useLayoutEffect;
27
+ declare const useBrowserLayoutEffect: typeof useEffect;
28
28
 
29
29
  export { IN_BROWSER, useBrowserLayoutEffect };
@@ -67,7 +67,7 @@ declare function applyThemePrefs(p: {
67
67
  }): void;
68
68
  declare function useTheme(): {
69
69
  theme: Theme;
70
- resolved: "dark" | "light" | "blue" | "green" | "grey" | "pink";
70
+ resolved: "blue" | "green" | "grey" | "pink" | "dark" | "light";
71
71
  corners: Corners;
72
72
  iconSet: string | null;
73
73
  };
@@ -1,2 +1,2 @@
1
1
  "use client";
2
- export{ICON_NAMES,isIconName}from"../chunk-3C7JKJGL.js";export{BRAND_MAX_HEIGHT,BRAND_MIN_HEIGHT_PX,brandBox}from"../chunk-64ACCUNN.js";export{BRAND_ICON_NAMES,isBrandIconName}from"../chunk-RQGLDRRF.js";export{ICON_SET_FOR_THEME,THEME_ICON_SETS,iconSetFor,loadIconSet}from"../chunk-VQCKMT5F.js";export{Icon}from"../chunk-ISVODSRP.js";export{activeIconSet,iconSets,iconsVersion,registerIconSet,registerIcons,resolveIcon,setDefaultIconSet,setIconSet,subscribeIcons}from"../chunk-J75ZT2JQ.js";
2
+ export{ICON_NAMES,isIconName}from"../chunk-3C7JKJGL.js";export{ICON_SET_FOR_THEME,THEME_ICON_SETS,iconSetFor,loadIconSet}from"../chunk-VQCKMT5F.js";export{BRAND_MAX_HEIGHT,BRAND_MIN_HEIGHT_PX,brandBox}from"../chunk-64ACCUNN.js";export{BRAND_ICON_NAMES,isBrandIconName}from"../chunk-RQGLDRRF.js";export{Icon}from"../chunk-ISVODSRP.js";export{activeIconSet,iconSets,iconsVersion,registerIconSet,registerIcons,resolveIcon,setDefaultIconSet,setIconSet,subscribeIcons}from"../chunk-J75ZT2JQ.js";
package/dist/index.d.ts CHANGED
@@ -234,8 +234,8 @@ export { default as SankeyChart } from './charts/SankeyChart.js';
234
234
  export { default as ChordChart } from './charts/ChordChart.js';
235
235
  export { default as ImageAnnotator, ImageAnnotatorHandle, ImageAnnotatorProps } from './apps/ImageAnnotator.js';
236
236
  export { VERSION } from './version.js';
237
- import { W as WindowRegistry, E as EditState } from './types-ClT92-8Z.js';
238
- export { M as ModalRegistryEntry, P as PageRegistryEntry, a as WindowRegistryEntry, i as isEntityEntry, b as isPageEntry, s as setShellWindowRegistry } from './types-ClT92-8Z.js';
237
+ import { W as WindowRegistry, E as EditState } from './types-DWIjEVSy.js';
238
+ export { M as ModalRegistryEntry, P as PageRegistryEntry, a as WindowRegistryEntry, i as isEntityEntry, b as isPageEntry, s as setShellWindowRegistry } from './types-DWIjEVSy.js';
239
239
  import * as react from 'react';
240
240
  import { ReactNode, Component, ErrorInfo } from 'react';
241
241
  import * as react_jsx_runtime from 'react/jsx-runtime';
@@ -476,7 +476,8 @@ interface ModalProps {
476
476
  open: boolean;
477
477
  onClose: () => void;
478
478
  title: React.ReactNode;
479
- /** Window icon — shown before title, clicking it opens window menu */
479
+ /** Window icon. Not drawn in the window since the title bar went
480
+ * (2026-11-18); the taskbar and the tab strip draw the registry's icon. */
480
481
  icon?: React.ReactNode;
481
482
  /** Text to copy when the copy icon in the header is clicked (e.g. entity number) */
482
483
  copyText?: string;