efficient-shell 4.156.1 → 4.159.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 (42) hide show
  1. package/README.md +29 -4
  2. package/dist/{Browser-WBZPCS6W.js → Browser-OQCHLKM3.js} +12 -12
  3. package/dist/{Calculator-5DF4PSEG.js → Calculator-YBL65JNM.js} +22 -22
  4. package/dist/{CurrencyConverter-BEI6UUDD.js → CurrencyConverter-6VFY4GF6.js} +7 -7
  5. package/dist/{Documents-5WGBDLTF.js → Documents-IPXRU4CT.js} +5 -5
  6. package/dist/Files-3MGL4ZT7.js +89 -0
  7. package/dist/Notepad-RJ2DYW2O.js +25 -0
  8. package/dist/{PomodoroTimer-3BDFGHC6.js → PomodoroTimer-6OQ33FY3.js} +26 -26
  9. package/dist/{Preview-O52DJFV6.js → Preview-3WRPZWDU.js} +14 -14
  10. package/dist/{Sidebar-H6R3AK5G.js → Sidebar-FUPFF7BT.js} +23 -23
  11. package/dist/{Spreadsheet-7PMGYBO6.js → Spreadsheet-6NK53IZV.js} +13 -13
  12. package/dist/{Stock-PEZB3WXV.js → Stock-ZFLDG6TT.js} +3 -3
  13. package/dist/{Weather-6EJFJQIX.js → Weather-BBPTXGQA.js} +17 -17
  14. package/dist/{WorldClock-5BMGEL2A.js → WorldClock-CQGQ2Y6N.js} +6 -6
  15. package/dist/apps/index.js +1 -1
  16. package/dist/brand.css +1 -1
  17. package/dist/{chunk-ELCH5NDO.js → chunk-CK245P3T.js} +4 -4
  18. package/dist/{chunk-XC64WV33.js → chunk-DLD4AKVT.js} +36 -36
  19. package/dist/{chunk-5DVD4E4P.js → chunk-EI4WZOP3.js} +1 -1
  20. package/dist/chunk-J7AAGG7P.js +942 -0
  21. package/dist/chunk-L4KRS7N3.js +1 -0
  22. package/dist/{chunk-DRN636EP.js → chunk-M4AKWGQM.js} +1 -1
  23. package/dist/chunk-S2AZZGFF.js +1 -0
  24. package/dist/chunk-VNEH2Y6H.js +9 -0
  25. package/dist/{chunk-LGDG4YMF.js → chunk-VRW5JNMR.js} +6 -6
  26. package/dist/{chunk-KAESEFKM.js → chunk-Z3LPT4HB.js} +1 -1
  27. package/dist/format/index.d.ts +1 -0
  28. package/dist/format/index.js +1 -0
  29. package/dist/{index-C-inEe7F.d.ts → index-D0K5U1Pb.d.ts} +80 -49
  30. package/dist/index-DCUzlKPZ.d.ts +194 -0
  31. package/dist/index.d.ts +3 -2
  32. package/dist/index.js +645 -645
  33. package/dist/page-tabs/index.js +5 -5
  34. package/dist/ui/index.d.ts +2 -1
  35. package/dist/ui/index.js +1 -1
  36. package/dist/ui.css +7 -0
  37. package/package.json +6 -1
  38. package/dist/Files-62DPJ4NN.js +0 -89
  39. package/dist/Notepad-U67M72JS.js +0 -25
  40. package/dist/chunk-ESXQJ7YI.js +0 -934
  41. package/dist/chunk-J7LKJIZC.js +0 -9
  42. package/dist/chunk-O5BOGWO3.js +0 -1
@@ -1,6 +1,6 @@
1
1
  "use client";
2
- import{TabStrip as e}from"../chunk-LGDG4YMF.js";import{confirm as t}from"../chunk-PDTZTADH.js";import"../chunk-J7LKJIZC.js";import"../chunk-OSJ3ADF2.js";import"../chunk-MAIHBBWT.js";import{useShellStrings as n}from"../chunk-VVI77XNV.js";import{useBrowserLayoutEffect as r}from"../chunk-D65T4H6J.js";import*as i from"react";import{createContext as l,memo as a,useRef as c,useEffect as s,useMemo as o,useId as u,useCallback as y,useReducer as d,useContext as f}from"react";import{useLocation as p,useNavigate as k}from"react-router-dom";import{jsx as m,Fragment as b,jsxs as v}from"react/jsx-runtime";var h=l(null),g=l(null),K=12;var F=(e,t)=>e.filter(e=>e!==t);function T(e,t){return[...t.map(t=>e.find(e=>e.key===t)).filter(e=>Boolean(e)),...e.filter(e=>!t.includes(e.key))]}function A(e,t,n=12){const r=e.clock+1;let i;i=e.tabs.find(e=>e.key===t.key)?e.tabs.map(e=>e.key===t.key?{...e,path:t.path,title:"page"===e.titleFrom?e.title:t.title||e.title,lastActive:r}:e):[...e.tabs,{key:t.key,path:t.path,title:t.title,titleFrom:"route",pinned:!1,lastActive:r}];let l={...e,tabs:i,activeKey:t.key,mounted:(a=e.mounted,c=t.key,a.includes(c)?a:[...a,c]),clock:r};var a,c;return l.closing&&l.closing!==t.key?l=N(l,l.closing):l.closing===t.key&&(l={...l,closing:null}),function(e,t){let n=e;for(;n.tabs.length>t;){const e=n.tabs.filter(e=>!e.pinned&&e.key!==n.activeKey&&!n.dirty.includes(e.key)&&e.key!==n.closing).sort((e,t)=>e.lastActive-t.lastActive);if(0===e.length)break;n=N(n,e[0].key)}return n}(l,n)}function I(e){let t={...e,activeKey:null};return t.closing&&(t=N(t,t.closing)),t}function N(e,t){return{...e,tabs:e.tabs.filter(e=>e.key!==t),mounted:F(e.mounted,t),dirty:F(e.dirty,t),activeKey:e.activeKey===t?null:e.activeKey,closing:e.closing===t?null:e.closing}}function w(e,t){switch(t.type){case"visit":return A(e,t.entry,t.maxTabs);case"transient":return I(e);case"close":{let n=e;for(const e of t.keys)n=N(n,e);return t.closing?function(e,t){return{...e,closing:t}}(n,t.closing):n}case"title":return function(e,t,n){const r=e.tabs.find(e=>e.key===t);return!r||!n||r.title===n&&"page"===r.titleFrom?e:{...e,tabs:e.tabs.map(e=>e.key===t?{...e,title:n,titleFrom:"page"}:e)}}(e,t.key,t.title);case"dirty":return function(e,t,n){return n===e.dirty.includes(t)?e:{...e,dirty:n?[...e.dirty,t]:F(e.dirty,t)}}(e,t.key,t.dirty)}}var M=e=>`${e.pathname}${e.search}`;function x(e){const t=e.indexOf("#"),n=t>=0?e.slice(t):"",r=t>=0?e.slice(0,t):e,i=r.indexOf("?");return{pathname:i>=0?r.slice(0,i):r,search:i>=0?r.slice(i):"",hash:n}}function L({children:e,resolve:i,pinned:l=[],storageKey:a,maxTabs:f=12,enabled:b=!0,confirmDiscard:v}){const g=p(),K=k(),F=n().pageTabs,N=u(),L=c(i);L.current=i;const C=y(e=>{const t=L.current(e);return t?{key:t.key??e.pathname,path:M(e),title:t.title}:null},[]),[D,O]=d(w,void 0,()=>{const e=function(e,t){if(!e)return[];let n;try{n=JSON.parse(e)}catch{return[]}const r=n;if(!r||1!==r.v||!Array.isArray(r.tabs))return[];const i=[];for(const e of r.tabs){if(!e||"string"!=typeof e.path||!e.path.startsWith("/")||e.path.startsWith("//"))continue;const n=e.path.indexOf("#"),r=n>=0?e.path.slice(0,n):e.path,l=t(r);if(!l||i.some(e=>e.key===l.key))continue;const a="page"===e.titleFrom&&"string"==typeof e.title&&e.title;i.push({key:l.key,path:r,title:a||l.title,titleFrom:a?"page":"route",pinned:!1,lastActive:0})}return i}(function(e){if(!e)return null;try{return localStorage.getItem(e)}catch{return null}}(a),e=>C(x(e)));let t=function(e,t){const n=t.map(e=>e.key);let r=e.tabs.map(e=>({...e,pinned:n.includes(e.key)}));for(const e of t)r.some(t=>t.key===e.key)||(r=[...r,{key:e.key,path:e.path,title:e.title,titleFrom:"route",pinned:!0,lastActive:0}]);return{...e,tabs:T(r,n)}}({tabs:[],activeKey:null,mounted:[],dirty:[],closing:null,clock:0,tabs:e},l.map(e=>C(x(e))).filter(e=>Boolean(e)));const n=b?C(g):null;return t=n?A(t,n,f):I(t),t}),j=c(D);j.current=D;const S=c(/* @__PURE__ */new Map),$=b?C(g):null,J=$?.key??null;r(()=>{if(!b)return;const e=C(g);e?(S.current.set(e.key,g),O({type:"visit",entry:e,maxTabs:f})):O({type:"transient"})},[g,b,f,C]),s(()=>{const e=new Set(D.tabs.map(e=>e.key));for(const t of S.current.keys())e.has(t)||S.current.delete(t)},[D.tabs]);const B=o(()=>function(e){const t={v:1,tabs:e.tabs.filter(t=>t.key!==e.closing).map(({key:e,path:t,title:n,titleFrom:r})=>({key:e,path:t,title:n,titleFrom:r}))};return JSON.stringify(t)}(D),[D]);s(()=>{if(a)try{localStorage.setItem(a,B)}catch{}},[B,a]);const E=D.dirty.length>0;s(()=>{if(!E)return;const e=e=>{e.preventDefault(),e.returnValue=""};return window.addEventListener("beforeunload",e),()=>window.removeEventListener("beforeunload",e)},[E]);const R=c(/* @__PURE__ */new Map),V=y((e,t)=>{let n=R.current.get(e);return void 0===n&&(n=R.current.size,R.current.set(e,n)),`${N}-page-${t}-${n}`},[N]),H=y(e=>v?v(e):t({title:F.discardTitle,message:1===e.length?F.discardOne:F.discardCount?.(e.length)??`${e.length} ${F.discardMany}`,confirmLabel:F.discardConfirm,cancelLabel:F.keepEditing,variant:"warning"}),[v,F]),P=y(()=>{const e=j.current;return e.tabs.find(e=>e.pinned)?.path??"/"},[]),W=y((e,t,n)=>{const r=j.current,i=r.activeKey;if(!i||!e.includes(i))return void O({type:"close",keys:e,closing:null});let l=t;if(!l){const t={...r,tabs:r.tabs.filter(t=>t.key===i||!e.includes(t.key))},a=n?r.tabs.find(t=>t.key===n&&!e.includes(t.key)):void 0;l=(a??function(e,t){const n=e.tabs.filter(n=>n.key!==e.closing||n.key===t),r=n.findIndex(e=>e.key===t);return r<0?null:n[r+1]??n[r-1]??null}(t,i))?.path??P()}O({type:"close",keys:e.filter(e=>e!==i),closing:i}),K(l)},[K,P]),G=y(async(e,t={})=>{const n=j.current.tabs.find(t=>t.key===e);return!n||n.pinned?(t.to&&K(t.to),!1):!(!t.force&&j.current.dirty.includes(e)&&!await H([n]))&&(!!j.current.tabs.some(t=>t.key===e)&&(W([e],t.to),!0))},[H,W,K]),Z=y(async(e,t)=>{let n=function(e,t,n){const r=e.tabs.filter(e=>!e.pinned);if("all"===t)return r.map(e=>e.key);if("others"===t)return r.filter(e=>e.key!==n).map(e=>e.key);const i=e.tabs.findIndex(e=>e.key===n);return i<0?[]:e.tabs.slice(i+1).filter(e=>!e.pinned).map(e=>e.key)}(j.current,e,t);const r=j.current.tabs.filter(e=>n.includes(e.key)&&j.current.dirty.includes(e.key));r.length&&!await H(r)&&(n=n.filter(e=>!r.some(t=>t.key===e)));const i=new Set(j.current.tabs.map(e=>e.key));n=n.filter(e=>i.has(e)),n.length&&W(n,void 0,"all"===e?null:t)},[H,W]),z=y(e=>{const t=j.current.tabs.find(t=>t.key===e);t&&e!==j.current.activeKey&&K(t.path)},[K]),X=y((e,t)=>O({type:"title",key:e,title:t}),[]),Y=y((e,t)=>O({type:"dirty",key:e,dirty:t}),[]),q=y(e=>C(e)?.key??null,[C]),Q=y(e=>S.current.get(e),[]),U=o(()=>b?D.tabs.filter(e=>e.key!==D.closing):[],[b,D.tabs,D.closing]),_=o(()=>({enabled:b,state:D,currentKey:J,resolve:i,keyFor:q,locationFor:Q,idFor:V,activate:z,close:G,closeMany:Z,setTitle:X,setDirty:Y,visibleTabs:U}),[b,D,J,i,q,Q,V,z,G,Z,X,Y,U]);/* @__PURE__ */
3
- return m(h.Provider,{value:_,children:e})}var C=i.Activity,D=Boolean(C);function O({active:e,children:t}){return C?/* @__PURE__ */m(C,{mode:e?"visible":"hidden",children:t}):/* @__PURE__ */m(b,{children:t})}var j=a(function({tabKey:e,active:t,location:n,render:i,className:l,panelId:a,tabId:u}){const y=c(null),d=c(t),f=c(/* @__PURE__ */new Map);r(()=>{const e=d.current;if(d.current=t,t&&!e)for(const[e,[t,n]]of f.current)e.isConnected?(e.scrollTop=t,e.scrollLeft=n):f.current.delete(e)},[t]),s(()=>{const e=y.current;if(!e)return;const t=e=>{if(!d.current)return;const t=e.target;t&&"number"==typeof t.scrollTop&&f.current.set(t,[t.scrollTop,t.scrollLeft])};return e.addEventListener("scroll",t,!0),()=>e.removeEventListener("scroll",t,!0)},[]);const p=o(()=>({key:e,activeRef:d}),[e]);/* @__PURE__ */
4
- return m("div",{ref:y,role:a?"tabpanel":void 0,id:a,"aria-labelledby":u,hidden:!t,style:t?void 0:{display:"none"},className:l,"data-page-tab":e,children:/* @__PURE__ */m(g.Provider,{value:p,children:/* @__PURE__ */m(O,{active:t,children:i(n)})})})},(e,t)=>e.active===t.active&&e.location===t.location&&e.className===t.className&&e.panelId===t.panelId&&e.tabId===t.tabId&&(!t.active||e.render===t.render)),S="\0transient";function $({children:e,frameClassName:t}){const n=f(h),r=p();if(!n||!n.enabled)/* @__PURE__ */
5
- return m("div",{className:t,children:e(r)},S);const{state:i,currentKey:l,locationFor:a,idFor:c}=n,s=i.tabs.filter(e=>i.mounted.includes(e.key)).map(e=>e.key);return l&&!s.includes(l)&&s.push(l),/* @__PURE__ */v(b,{children:[s.map(n=>{const i=n===l,s=i?r:a(n);return s?/* @__PURE__ */m(j,{tabKey:n,active:i,location:s,render:e,className:t,panelId:c(n,"panel"),tabId:c(n,"tab")},n):null}),!l&&/* @__PURE__ */m(j,{tabKey:S,active:!0,location:r,render:e,className:t},S)]})}function J({className:t,activeClassName:r,end:i}){const l=f(h),a=n().pageTabs;if(!l||!l.enabled)return null;const{visibleTabs:c,state:s,idFor:o,activate:u,close:y,closeMany:d,resolve:p}=l;/* @__PURE__ */
6
- return m(e,{tabs:c.map(e=>({key:e.key,title:e.title,pinned:e.pinned,dirty:s.dirty.includes(e.key),icon:p(x(e.path))?.icon})),activeKey:l.currentKey??null,idFor:o,panelMounted:e=>s.mounted.includes(e),onActivate:u,onClose:e=>{y(e)},onCloseMany:(e,t)=>{d(e,t)},label:a.label,className:t,activeClassName:r,end:i})}var B={enabled:!1,tabs:[],activeKey:null,activate:()=>{},close:async()=>!1,closeOthers:async()=>{},closeRight:async()=>{},closeAll:async()=>{}};function E(){const e=f(h);return e&&e.enabled?{enabled:!0,tabs:e.visibleTabs,activeKey:e.currentKey,activate:e.activate,close:e.close,closeOthers:t=>e.closeMany("others",t),closeRight:t=>e.closeMany("right",t),closeAll:()=>e.closeMany("all",null)}:B}function R(){const e=f(h),t=f(g),n=k();return{key:e?.enabled&&t?t.key:null,close:y(async(r={})=>e?.enabled&&t&&e.state.tabs.some(e=>e.key===t.key)?e.close(t.key,r):(r.to&&n(r.to),!1),[e,t,n])}}function V(e){const t=f(h),n=f(g),r=t?.enabled?t.setTitle:void 0,i=n?.key;s(()=>{r&&i&&e&&r(i,e)},[r,i,e])}function H(e){const t=f(h),n=f(g),r=t?.enabled?t.setDirty:void 0;s(()=>{if(r&&n)return r(n.key,e),()=>{n.activeRef.current&&r(n.key,!1)}},[r,n,e])}export{K as DEFAULT_MAX_TABS,D as PAGE_TABS_PAUSE_HIDDEN,J as PageTabBar,$ as PageTabsOutlet,L as PageTabsProvider,x as parseTabPath,R as usePageTab,H as usePageTabDirty,V as usePageTabTitle,E as usePageTabs};
2
+ import{TabStrip as e}from"../chunk-VRW5JNMR.js";import{confirm as t}from"../chunk-PDTZTADH.js";import"../chunk-VNEH2Y6H.js";import"../chunk-OSJ3ADF2.js";import"../chunk-MAIHBBWT.js";import{useShellStrings as n}from"../chunk-VVI77XNV.js";import{useBrowserLayoutEffect as r}from"../chunk-D65T4H6J.js";import*as i from"react";import{createContext as l,memo as a,useRef as c,useEffect as s,useMemo as o,useId as u,useCallback as y,useReducer as d,useContext as f}from"react";import{useLocation as p,useNavigate as k}from"react-router-dom";import{jsx as m,Fragment as b,jsxs as v}from"react/jsx-runtime";var h=l(null),g=l(null),K=12;var T=(e,t)=>e.filter(e=>e!==t);function F(e,t){return[...t.map(t=>e.find(e=>e.key===t)).filter(e=>Boolean(e)),...e.filter(e=>!t.includes(e.key))]}function N(e,t,n=12){const r=e.clock+1;let i;i=e.tabs.find(e=>e.key===t.key)?e.tabs.map(e=>e.key===t.key?{...e,path:t.path,title:"page"===e.titleFrom?e.title:t.title||e.title,lastActive:r}:e):[...e.tabs,{key:t.key,path:t.path,title:t.title,titleFrom:"route",pinned:!1,lastActive:r}];let l={...e,tabs:i,activeKey:t.key,mounted:(a=e.mounted,c=t.key,a.includes(c)?a:[...a,c]),clock:r};var a,c;return l.closing&&l.closing!==t.key?l=I(l,l.closing):l.closing===t.key&&(l={...l,closing:null}),function(e,t){let n=e;for(;n.tabs.length>t;){const e=n.tabs.filter(e=>!e.pinned&&e.key!==n.activeKey&&!n.dirty.includes(e.key)&&e.key!==n.closing).sort((e,t)=>e.lastActive-t.lastActive);if(0===e.length)break;n=I(n,e[0].key)}return n}(l,n)}function A(e){let t={...e,activeKey:null};return t.closing&&(t=I(t,t.closing)),t}function I(e,t){return{...e,tabs:e.tabs.filter(e=>e.key!==t),mounted:T(e.mounted,t),dirty:T(e.dirty,t),activeKey:e.activeKey===t?null:e.activeKey,closing:e.closing===t?null:e.closing}}function w(e,t){switch(t.type){case"visit":return N(e,t.entry,t.maxTabs);case"transient":return A(e);case"close":{let n=e;for(const e of t.keys)n=I(n,e);return t.closing?function(e,t){return{...e,closing:t}}(n,t.closing):n}case"title":return function(e,t,n){const r=e.tabs.find(e=>e.key===t);return!r||!n||r.title===n&&"page"===r.titleFrom?e:{...e,tabs:e.tabs.map(e=>e.key===t?{...e,title:n,titleFrom:"page"}:e)}}(e,t.key,t.title);case"dirty":return function(e,t,n){return n===e.dirty.includes(t)?e:{...e,dirty:n?[...e.dirty,t]:T(e.dirty,t)}}(e,t.key,t.dirty)}}var M=e=>`${e.pathname}${e.search}`;function x(e){const t=e.indexOf("#"),n=t>=0?e.slice(t):"",r=t>=0?e.slice(0,t):e,i=r.indexOf("?");return{pathname:i>=0?r.slice(0,i):r,search:i>=0?r.slice(i):"",hash:n}}function O({children:e,resolve:i,pinned:l=[],storageKey:a,maxTabs:f=12,enabled:b=!0,confirmDiscard:v}){const g=p(),K=k(),T=n().pageTabs,I=u(),O=c(i);O.current=i;const j=y(e=>{const t=O.current(e);return t?{key:t.key??e.pathname,path:M(e),title:t.title}:null},[]),[C,D]=d(w,void 0,()=>{const e=function(e,t){if(!e)return[];let n;try{n=JSON.parse(e)}catch{return[]}const r=n;if(!r||1!==r.v||!Array.isArray(r.tabs))return[];const i=[];for(const e of r.tabs){if(!e||"string"!=typeof e.path||!e.path.startsWith("/")||e.path.startsWith("//"))continue;const n=e.path.indexOf("#"),r=n>=0?e.path.slice(0,n):e.path,l=t(r);if(!l||i.some(e=>e.key===l.key))continue;const a="page"===e.titleFrom&&"string"==typeof e.title&&e.title;i.push({key:l.key,path:r,title:a||l.title,titleFrom:a?"page":"route",pinned:!1,lastActive:0})}return i}(function(e){if(!e)return null;try{return localStorage.getItem(e)}catch{return null}}(a),e=>j(x(e)));let t=function(e,t){const n=t.map(e=>e.key);let r=e.tabs.map(e=>({...e,pinned:n.includes(e.key)}));for(const e of t)r.some(t=>t.key===e.key)||(r=[...r,{key:e.key,path:e.path,title:e.title,titleFrom:"route",pinned:!0,lastActive:0}]);return{...e,tabs:F(r,n)}}({tabs:[],activeKey:null,mounted:[],dirty:[],closing:null,clock:0,tabs:e},l.map(e=>j(x(e))).filter(e=>Boolean(e)));const n=b?j(g):null;return t=n?N(t,n,f):A(t),t}),L=c(C);L.current=C;const S=c(/* @__PURE__ */new Map),$=b?j(g):null,E=$?.key??null;r(()=>{if(!b)return;const e=j(g);e?(S.current.set(e.key,g),D({type:"visit",entry:e,maxTabs:f})):D({type:"transient"})},[g,b,f,j]),s(()=>{const e=new Set(C.tabs.map(e=>e.key));for(const t of S.current.keys())e.has(t)||S.current.delete(t)},[C.tabs]);const R=o(()=>function(e){const t={v:1,tabs:e.tabs.filter(t=>t.key!==e.closing).map(({key:e,path:t,title:n,titleFrom:r})=>({key:e,path:t,title:n,titleFrom:r}))};return JSON.stringify(t)}(C),[C]);s(()=>{if(a)try{localStorage.setItem(a,R)}catch{}},[R,a]);const V=C.dirty.length>0;s(()=>{if(!V)return;const e=e=>{e.preventDefault(),e.returnValue=""};return window.addEventListener("beforeunload",e),()=>window.removeEventListener("beforeunload",e)},[V]);const B=c(/* @__PURE__ */new Map),H=y((e,t)=>{let n=B.current.get(e);return void 0===n&&(n=B.current.size,B.current.set(e,n)),`${I}-page-${t}-${n}`},[I]),J=y(e=>v?v(e):t({title:T.discardTitle,message:1===e.length?T.discardOne:T.discardCount?.(e.length)??`${e.length} ${T.discardMany}`,confirmLabel:T.discardConfirm,cancelLabel:T.keepEditing,variant:"warning"}),[v,T]),W=y(()=>{const e=L.current;return e.tabs.find(e=>e.pinned)?.path??"/"},[]),P=y((e,t,n)=>{const r=L.current,i=r.activeKey;if(!i||!e.includes(i))return void D({type:"close",keys:e,closing:null});let l=t;if(!l){const t={...r,tabs:r.tabs.filter(t=>t.key===i||!e.includes(t.key))},a=n?r.tabs.find(t=>t.key===n&&!e.includes(t.key)):void 0;l=(a??function(e,t){const n=e.tabs.filter(n=>n.key!==e.closing||n.key===t),r=n.findIndex(e=>e.key===t);return r<0?null:n[r+1]??n[r-1]??null}(t,i))?.path??W()}D({type:"close",keys:e.filter(e=>e!==i),closing:i}),K(l)},[K,W]),z=y(async(e,t={})=>{const n=L.current.tabs.find(t=>t.key===e);return!n||n.pinned?(t.to&&K(t.to),!1):!(!t.force&&L.current.dirty.includes(e)&&!await J([n]))&&(!!L.current.tabs.some(t=>t.key===e)&&(P([e],t.to),!0))},[J,P,K]),X=y(async(e,t)=>{let n=function(e,t,n){const r=e.tabs.filter(e=>!e.pinned);if("all"===t)return r.map(e=>e.key);if("others"===t)return r.filter(e=>e.key!==n).map(e=>e.key);const i=e.tabs.findIndex(e=>e.key===n);return i<0?[]:e.tabs.slice(i+1).filter(e=>!e.pinned).map(e=>e.key)}(L.current,e,t);const r=L.current.tabs.filter(e=>n.includes(e.key)&&L.current.dirty.includes(e.key));r.length&&!await J(r)&&(n=n.filter(e=>!r.some(t=>t.key===e)));const i=new Set(L.current.tabs.map(e=>e.key));n=n.filter(e=>i.has(e)),n.length&&P(n,void 0,"all"===e?null:t)},[J,P]),Y=y(e=>{const t=L.current.tabs.find(t=>t.key===e);t&&e!==L.current.activeKey&&K(t.path)},[K]),Z=y((e,t)=>D({type:"title",key:e,title:t}),[]),q=y((e,t)=>D({type:"dirty",key:e,dirty:t}),[]),G=y(e=>j(e)?.key??null,[j]),Q=y(e=>S.current.get(e),[]),U=o(()=>b?C.tabs.filter(e=>e.key!==C.closing):[],[b,C.tabs,C.closing]),_=o(()=>({enabled:b,state:C,currentKey:E,resolve:i,keyFor:G,locationFor:Q,idFor:H,activate:Y,close:z,closeMany:X,setTitle:Z,setDirty:q,visibleTabs:U}),[b,C,E,i,G,Q,H,Y,z,X,Z,q,U]);/* @__PURE__ */
3
+ return m(h.Provider,{value:_,children:e})}var j=i.Activity,C=Boolean(j);function D({active:e,children:t}){return j?/* @__PURE__ */m(j,{mode:e?"visible":"hidden",children:t}):/* @__PURE__ */m(b,{children:t})}var L=a(function({tabKey:e,active:t,location:n,render:i,className:l,panelId:a,tabId:u}){const y=c(null),d=c(t),f=c(/* @__PURE__ */new Map);r(()=>{const e=d.current;if(d.current=t,t&&!e)for(const[e,[t,n]]of f.current)e.isConnected?(e.scrollTop=t,e.scrollLeft=n):f.current.delete(e)},[t]),s(()=>{const e=y.current;if(!e)return;const t=e=>{if(!d.current)return;const t=e.target;t&&"number"==typeof t.scrollTop&&f.current.set(t,[t.scrollTop,t.scrollLeft])};return e.addEventListener("scroll",t,!0),()=>e.removeEventListener("scroll",t,!0)},[]);const p=o(()=>({key:e,activeRef:d}),[e]);/* @__PURE__ */
4
+ return m("div",{ref:y,role:a?"tabpanel":void 0,id:a,"aria-labelledby":u,hidden:!t,style:t?void 0:{display:"none"},className:l,"data-page-tab":e,children:/* @__PURE__ */m(g.Provider,{value:p,children:/* @__PURE__ */m(D,{active:t,children:i(n)})})})},(e,t)=>e.active===t.active&&e.location===t.location&&e.className===t.className&&e.panelId===t.panelId&&e.tabId===t.tabId&&(!t.active||e.render===t.render)),S="\0transient";function $({children:e,frameClassName:t}){const n=f(h),r=p();if(!n||!n.enabled)/* @__PURE__ */
5
+ return m("div",{className:t,children:e(r)},S);const{state:i,currentKey:l,locationFor:a,idFor:c}=n,s=i.tabs.filter(e=>i.mounted.includes(e.key)).map(e=>e.key);return l&&!s.includes(l)&&s.push(l),/* @__PURE__ */v(b,{children:[s.map(n=>{const i=n===l,s=i?r:a(n);return s?/* @__PURE__ */m(L,{tabKey:n,active:i,location:s,render:e,className:t,panelId:c(n,"panel"),tabId:c(n,"tab")},n):null}),!l&&/* @__PURE__ */m(L,{tabKey:S,active:!0,location:r,render:e,className:t},S)]})}function E({className:t,activeClassName:r,end:i}){const l=f(h),a=n().pageTabs;if(!l||!l.enabled)return null;const{visibleTabs:c,state:s,idFor:o,activate:u,close:y,closeMany:d,resolve:p}=l;/* @__PURE__ */
6
+ return m(e,{tabs:c.map(e=>({key:e.key,title:e.title,pinned:e.pinned,dirty:s.dirty.includes(e.key),icon:p(x(e.path))?.icon})),activeKey:l.currentKey??null,idFor:o,panelMounted:e=>s.mounted.includes(e),onActivate:u,onClose:e=>{y(e)},onCloseMany:(e,t)=>{d(e,t)},label:a.label,className:t,activeClassName:r,end:i})}var R={enabled:!1,tabs:[],activeKey:null,activate:()=>{},close:async()=>!1,closeOthers:async()=>{},closeRight:async()=>{},closeAll:async()=>{}};function V(){const e=f(h);return e&&e.enabled?{enabled:!0,tabs:e.visibleTabs,activeKey:e.currentKey,activate:e.activate,close:e.close,closeOthers:t=>e.closeMany("others",t),closeRight:t=>e.closeMany("right",t),closeAll:()=>e.closeMany("all",null)}:R}function B(){const e=f(h),t=f(g),n=k();return{key:e?.enabled&&t?t.key:null,close:y(async(r={})=>e?.enabled&&t&&e.state.tabs.some(e=>e.key===t.key)?e.close(t.key,r):(r.to&&n(r.to),!1),[e,t,n])}}function H(e){const t=f(h),n=f(g),r=t?.enabled?t.setTitle:void 0,i=n?.key;s(()=>{r&&i&&e&&r(i,e)},[r,i,e])}function J(e){const t=f(h),n=f(g),r=t?.enabled?t.setDirty:void 0;s(()=>{if(r&&n)return r(n.key,e),()=>{n.activeRef.current&&r(n.key,!1)}},[r,n,e])}export{K as DEFAULT_MAX_TABS,C as PAGE_TABS_PAUSE_HIDDEN,E as PageTabBar,$ as PageTabsOutlet,O as PageTabsProvider,x as parseTabPath,B as usePageTab,J as usePageTabDirty,H as usePageTabTitle,V as usePageTabs};
@@ -1,4 +1,5 @@
1
- export { A as ALT, b as ALT_SHIFT_D, c as ALT_SHIFT_E, d as ALT_SHIFT_N, e as APP_UPDATE_POLL_MS, f as Accordion, g as AccordionItem, h as AccordionProps, i as Align, j as AngleScale, k as AppUpdateBanner, l as AppUpdateBannerProps, m as AttachButton, n as AttachButtonProps, o as AttachmentDropZone, p as AttachmentDropZoneProps, q as AttachmentList, r as AttachmentListProps, s as AuthScreen, t as AuthScreenProps, u as Avatar, v as AvatarGroup, w as AvatarGroupProps, x as AvatarProps, y as AvatarSize, z as AvatarStatus, B as BackgroundVariant, D as BandScale, E as Banner, F as BannerEmphasis, G as BannerProps, H as BannerTone, I as BarChart, J as BarChartProps, K as BoxPlotBox, L as BoxPlotChart, M as BoxPlotChartProps, N as BrandAssetEditor, O as BrandAssetEditorProps, Q as BrandAssetPreview, R as BrandMark, T as BrandMarkProps, U as BrandMarkSlot, V as BrandMarkSurface, W as BrandMarkTreatment, X as BreadcrumbItem, Y as Breadcrumbs, Z as BreadcrumbsProps, _ as BudgetBar, $ as BudgetBarProps, a0 as BudgetState, a1 as Button, a2 as ButtonClassesOptions, a3 as ButtonProps, a4 as ButtonSize, a5 as ButtonVariant, a6 as CHART_INK, a7 as CMD_A, a8 as CMD_DOT, a9 as CMD_ENTER, aa as CMD_K, ab as CMD_S, ac as Calendar, ad as CalendarMode, ae as CalendarProps, af as Candle, ag as CandlestickChart, ah as CandlestickChartProps, ai as Card, aj as CardPadding, ak as CardProps, al as CartesianPlot, am as CartesianPlotProps, an as CellStyle, ao as ChartBackgroundVariant, ap as ChartBrush, aq as ChartBrushProps, ar as ChartCurve, as as ChartDefs, at as ChartDefsProps, au as ChartDot, av as ChartDotProps, aw as ChartDotVariant, ax as ChartFillVariant, ay as ChartFrame, az as ChartFrameProps, aA as ChartHighlightProvider, aB as ChartLegendEntry, aC as ChartLegendSwatch, aD as ChartRange, aE as ChartReferenceLine, aF as ChartRevealDirection, aG as ChartSkeleton, aH as ChartSkeletonProps, aI as ChartStatusTone, aJ as ChartStrokeVariant, aK as ChartTooltip, aL as ChartTooltipProps, aM as ChartTooltipRow, aN as ChatTemplate, aO as Checkbox, aP as CheckboxProps, aQ as CheckoutTemplate, aR as ChordChart, aS as ChordChartProps, aT as ColoredBadge, aU as ColoredBadgeProps, aV as ColumnChart, aW as ColumnChartProps, C as ColumnDef, aX as ColumnSeries, aY as ComposerAttachments, aZ as ComposerAttachmentsProps, a_ as ConfirmProvider, a$ as ContainerFillChart, b0 as ContainerFillChartProps, b1 as ContainerFillItem, b2 as CountBadge, b3 as CountBadgeProps, b4 as CountBadgeTone, b5 as Curve, b6 as DAY_MS, b7 as DEFAULT_SHELL_STRINGS, b8 as DashboardTemplate, b9 as DataTable, ba as DataTableColumn, bb as DataTableColumnGroup, bc as DataTableHeader, bd as DataTablePage, be as DataTableProps, bf as DataTableRowLink, bg as DataTableRowProps, bh as DatePicker, bi as DatePickerProps, bj as DateRangePicker, bk as DateRangePickerProps, bl as DateTimePicker, bm as DateTimePickerProps, bn as DescriptionColumns, bo as DescriptionItem, bp as DescriptionList, bq as DescriptionListProps, br as Dialog, bs as DialogProps, bt as DialogSize, bu as Divider, bv as DividerProps, bw as DividerSpacing, bx as DonutChart, by as DonutChartProps, bz as DonutSegment, bA as Drawer, bB as DrawerProps, bC as DrawerSide, bD as DrawerSize, bE as DropdownMenu, bF as DropdownMenuAlign, bG as DropdownMenuCheckboxItem, bH as DropdownMenuDividerItem, bI as DropdownMenuEntry, bJ as DropdownMenuItem, bK as DropdownMenuLabelItem, bL as DropdownMenuLinkItem, bM as DropdownMenuProps, bN as DropdownMenuRadioItem, bO as DropdownMenuSide, bP as DropdownPositionOptions, bQ as ENTER, bR as EditableGrid, bS as EditableGridProps, bT as EmailTemplate, bU as EmptyState, bV as EmptyStateProps, bW as ErrorBoundary, bX as ErrorBoundaryProps, bY as ErrorPage, bZ as ErrorPageProps, b_ as FileIntake, b$ as FilePicker, c0 as FilePickerProps, c1 as FillVariant, c2 as FormError, c3 as FormErrorSummary, c4 as FormErrorSummaryProps, c5 as FormField, c6 as FormFieldProps, c7 as FormLayoutPage, c8 as FormatDateOptions, c9 as FunnelChart, ca as FunnelChartProps, cb as FunnelStage, cc as GLASS_DIVIDER, ce as GROUP_COLORS, cf as GROUP_COLORS_SOLID, cg as GalleryTemplate, ch as Gap, ci as GlobalSearch, cj as GlobalSearchProps, ck as Grid, cl as GridCols, cm as GridColumn, cn as GridProps, co as HeatmapChart, cp as HeatmapChartProps, cq as HelpCenter, cr as HelpCenterDoc, cs as HelpCenterProps, ct as HistogramBin, cu as HistogramChart, cv as HistogramChartProps, cw as INPUT_BASE, cx as INPUT_SIZES, cy as IconButton, cz as IconButtonClassesOptions, cA as IconButtonProps, cB as Inline, cC as InlineProps, cD as Input, cE as InputNumber, cF as InputNumberProps, cG as InputProps, cH as InputSize, cI as Justify, cJ as Kanban, cK as KanbanColumn, cL as KanbanProps, cM as Kbd, cN as KbdProps, cO as KbdSize, cP as Label, cQ as LabelClassesOptions, cR as LabelProps, cS as LadderScale, cT as LineChart, cU as LineChartProps, cV as LineChartSeries, cW as LinearScale, cX as ListFooter, cY as ListLoadError, cZ as ListLoadErrorProps, c_ as LoadingSpinner, c$ as LoadingSpinnerProps, d0 as MAX_FRACTION_DIGITS, d1 as MENU_MAX_HEIGHT, d2 as MOD, d3 as MOTION, d4 as Markdown, d4 as MarkdownLite, d5 as MarkdownLiteProps, d5 as MarkdownProps, d6 as MediaUploadField, d7 as MediaUploadFieldProps, d8 as MediaUploadGrid, d9 as MediaUploadGridItem, da as MediaUploadGridProps, db as MenuPos, dc as Meter, dd as MeterProps, de as MetricBar, df as MetricBarProps, dg as Milestone, dh as MilestoneKind, di as MilestoneTimeline, dj as MilestoneTimelineProps, dk as NEXT_CHUNK_PATH_PREFIX, dl as NativeSelect, dm as NumericKeypad, dn as NumericKeypadProps, dp as OVERLAY_OPEN_EVENT, dq as POPUP_MAX_WIDTH, dr as POST_PRODUCTION_STATUSES, ds as PageHeader, dt as PageHeaderProps, P as PaginatedResponse, du as Pagination, dv as PaginationProps, dw as PaperclipGlyph, dx as Paragraph, dy as ParagraphProps, dz as PieChart, dA as PieChartProps, dB as PieSegment, dC as PlotGeometry, dD as Point, dE as Popover, dF as PopoverAlign, dG as PopoverProps, dH as PopoverRenderProps, dI as PopoverSide, dJ as PopupMenu, dK as PopupMenuDivider, dL as PopupMenuItem, dM as PopupMenuItemProps, dN as PopupMenuLabel, dO as PopupMenuProps, dP as PopupSubmenu, dQ as PopupSubmenuProps, dR as PortalBrandingContextValue, dS as PortalBrandingProvider, dT as PortalBrandingProviderProps, dU as ProductionTimeline, dV as ProductionTimelineProps, dW as ProductionTimelineSnapshot, dX as ProgressItem, dY as PublicPortal, dZ as PublicPortalBranding, d_ as RADAR_SERIES_CAP, d$ as RadarAxis, e0 as RadarChart, e1 as RadarChartProps, e2 as RadarSeries, e3 as RadialBarChart, e4 as RadialBarChartProps, e5 as RadialBarRow, e6 as Radio, e7 as RadioGroup, e8 as RadioGroupOption, e9 as RadioGroupOrientation, ea as RadioGroupProps, eb as RadioProps, ec as Range, ed as RangeChart, ee as RangeChartProps, ef as RangeRow, eg as RankedBars, eh as RankedBarsProps, ei as RankedBarsRow, ej as ResolvedPortalBrandAsset, ek as Result, el as ResultProps, em as ResultStatus, en as RevealDirection, eo as SCATTER_SERIES_CAP, ep as SERIES_SLOT_COUNT, eq as SERIES_VARS, er as SHIFT, es as STAGES, et as STALE_CHUNK_RELOAD_COOLDOWN_MS, eu as STALE_CHUNK_RELOAD_KEY, ev as STATUS_VARS, ew as SankeyChart, ex as SankeyChartProps, ey as SankeyLink, ez as SankeyNode, eA as ScatterChart, eB as ScatterChartProps, eC as ScatterPoint, eD as ScatterSeries, S as SearchConfig, eE as SearchProvider, eF as SearchResult, eG as SearchableOption, eH as SearchableSelect, eI as SearchableSelectProps, eJ as Segmented, eK as SegmentedOption, eL as SegmentedProps, eM as SegmentedSize, eN as Select, eO as SelectOption, eP as SelectProps, eQ as SemanticGroup, eR as SettingRow, eS as SettingRowProps, eT as SeverityTone, eU as ShellPrefsAdapter, eV as ShellPrefsProvider, eW as ShellStrings, eX as ShellStringsOverride, eY as ShellStringsProvider, eZ as SidebarActionButton, e_ as SidebarActionButtonProps, e$ as SidebarGroupLabel, f0 as SidebarLayout, f1 as SidebarLayoutProps, f2 as SidebarNavItem, f3 as SidebarNavItemProps, f4 as Skeleton, f5 as SkeletonProps, f6 as SkeletonVariant, f7 as Snippet, f8 as SnippetProps, f9 as SnippetSize, fa as SnippetVariant, a as SortState, fb as Sparkline, fc as SparklineProps, fd as Stack, fe as StackProps, ff as StaleChunkReloadOptions, fg as StatCard, fh as StatCardProps, fi as StatTile, fj as StatTileProps, fk as Statistic, fl as StatisticProps, fm as StatisticSize, fn as StatisticTone, fo as StatusBadge, fp as StatusBadgeProvider, fq as StatusEmphasis, fr as StepItem, fs as Stepper, ft as StepperProps, fu as StrokeVariant, fv as SunburstChart, fw as SunburstChartProps, fx as SunburstNode, fy as Switch, fz as SwitchProps, fA as SwitchSize, fB as TabItem, fC as Tabs, fD as TabsProps, fE as TagInput, fF as TagInputOption, fG as TagInputProps, fH as Text, fI as TextProps, fJ as TextSize, fK as TextTone, fL as TextWeight, fM as Textarea, fN as TextareaProps, fO as Theme, fP as TileButton, fQ as TileButtonProps, fR as TileSize, fS as TimePicker, fT as TimePickerProps, fU as TimeSeriesChart, fV as TimeSeriesChartProps, fW as TimeSeriesSeries, fX as TimelineMarker, fY as TimelineMarkerKind, fZ as TimelineReport, f_ as TimelineScrubProgress, f$ as TimelineTrack, g0 as TimelineTrackItem, g1 as TimelineTrackKind, g2 as TimelineTrackPending, g3 as TimelineTrackPhase, g4 as TimelineTrackPlayback, g5 as TimelineTrackProps, g6 as TimelineTrackThumb, g7 as Title, g8 as TitleLevel, g9 as TitleProps, ga as ToastOptions, gb as ToastPlacement, gc as Tooltip, gd as TooltipProps, ge as TopNav, gf as TopNavItem, gg as TopNavProps, gh as TreemapChart, gi as TreemapChartProps, gj as TreemapItem, gk as TreemapTile, gl as UseAppUpdateOptions, gm as UseProductionTimelineOpts, gn as VERSION, go as VITE_PRELOAD_ERROR_EVENT, gp as WaterfallChart, gq as WaterfallChartProps, gr as WaterfallStep, gs as ZLayer, gt as Z_LAYERS, gu as angleScale, gv as appendKey, gw as applyThemePrefs, gx as arcPath, gy as areaBetween, gz as areaFrom, gA as autoHighlightIndex, gB as backspace, gC as bandScale, gD as binValues, gE as budgetState, gF as bumpPath, gG as buttonClasses, gH as calcOverall, gI as calcReportOverall, gJ as confirm, gK as confirmDestructive, gL as curvePath, gM as dashFor, gN as dismissPopups, gO as fillFor, gP as fillId, gQ as firstDayOfWeek, gR as fmtSliderDate, gS as formatDate, gT as fromDateKey, gU as glassStyle, gV as glowId, gW as groundId, gX as groupColors, gY as highlightOpacity, gZ as iconButtonClasses, g_ as inputClasses, g$ as installStaleChunkReload, h0 as isMac, h1 as isSeverityTone, h2 as isStaleChunkError, h3 as labelClasses, h4 as ladderScale, h5 as linearPath, h6 as linearScale, h7 as logScale, h8 as maskId, h9 as mediaFileName, ha as monotonePath, hb as niceMax, hc as openGlobalSearch, hd as polygonPoints, he as popupBounds, hf as prompt, hg as radiusScale, hh as resolveBrandMarkTreatment, hi as resolvePortalBrandAsset, hj as resolveSeriesColor, hk as resolveTheme, hl as seriesColor, hm as severityOf, hn as splinePath, ho as squarify, hp as stagger, hq as stepPath, hr as tabButtonId, hs as tabPanelId, ht as toDateKey, hu as toDayMs, hv as toISODate, hw as toast, hx as useAppUpdate, hy as useClickOutside, hz as useConfirm, hA as useDropdownPosition, hB as useFocusTrap, hC as useHighlight, hD as useIsMobile, hE as useLocalStoragePrefs, hF as usePlotWidth, hG as usePortalBranding, hH as useProductionTimeline, hI as useScrollLock, hJ as useShellLocale, hK as useShellPrefs, hL as useShellStrings, hM as useTheme } from '../index-C-inEe7F.js';
1
+ export { A as ALT, b as ALT_SHIFT_D, c as ALT_SHIFT_E, d as ALT_SHIFT_N, e as APP_UPDATE_POLL_MS, f as Accordion, g as AccordionItem, h as AccordionProps, i as Align, j as AngleScale, k as AppUpdateBanner, l as AppUpdateBannerProps, m as AttachButton, n as AttachButtonProps, o as AttachmentDropZone, p as AttachmentDropZoneProps, q as AttachmentList, r as AttachmentListProps, s as AuthScreen, t as AuthScreenProps, u as Avatar, v as AvatarGroup, w as AvatarGroupProps, x as AvatarProps, y as AvatarSize, z as AvatarStatus, B as BackgroundVariant, D as BandScale, E as Banner, F as BannerEmphasis, G as BannerProps, H as BannerTone, I as BarChart, J as BarChartProps, K as BoxPlotBox, L as BoxPlotChart, M as BoxPlotChartProps, N as BrandAssetEditor, O as BrandAssetEditorProps, Q as BrandAssetPreview, R as BrandMark, T as BrandMarkProps, U as BrandMarkSlot, V as BrandMarkSurface, W as BrandMarkTreatment, X as BreadcrumbItem, Y as Breadcrumbs, Z as BreadcrumbsProps, _ as BudgetBar, $ as BudgetBarProps, a0 as BudgetState, a1 as Button, a2 as ButtonClassesOptions, a3 as ButtonProps, a4 as ButtonSize, a5 as ButtonVariant, a6 as CHART_INK, a7 as CMD_A, a8 as CMD_DOT, a9 as CMD_ENTER, aa as CMD_K, ab as CMD_S, ac as Calendar, ad as CalendarMode, ae as CalendarProps, af as Candle, ag as CandlestickChart, ah as CandlestickChartProps, ai as Card, aj as CardPadding, ak as CardProps, al as CartesianPlot, am as CartesianPlotProps, an as CellStyle, ao as ChartBackgroundVariant, ap as ChartBrush, aq as ChartBrushProps, ar as ChartCurve, as as ChartDefs, at as ChartDefsProps, au as ChartDot, av as ChartDotProps, aw as ChartDotVariant, ax as ChartFillVariant, ay as ChartFrame, az as ChartFrameProps, aA as ChartHighlightProvider, aB as ChartLegendEntry, aC as ChartLegendSwatch, aD as ChartRange, aE as ChartReferenceLine, aF as ChartRevealDirection, aG as ChartSkeleton, aH as ChartSkeletonProps, aI as ChartStatusTone, aJ as ChartStrokeVariant, aK as ChartTooltip, aL as ChartTooltipProps, aM as ChartTooltipRow, aN as ChatTemplate, aO as Checkbox, aP as CheckboxProps, aQ as CheckoutTemplate, aR as ChordChart, aS as ChordChartProps, aT as ColoredBadge, aU as ColoredBadgeProps, aV as ColumnChart, aW as ColumnChartProps, C as ColumnDef, aX as ColumnSeries, aY as ComposerAttachments, aZ as ComposerAttachmentsProps, a_ as ConfirmProvider, a$ as ContainerFillChart, b0 as ContainerFillChartProps, b1 as ContainerFillItem, b2 as CountBadge, b3 as CountBadgeProps, b4 as CountBadgeTone, b5 as Curve, b6 as DAY_MS, b7 as DEFAULT_SHELL_STRINGS, b8 as DashboardTemplate, b9 as DataTable, ba as DataTableColumn, bb as DataTableColumnGroup, bc as DataTableHeader, bd as DataTablePage, be as DataTableProps, bf as DataTableRowLink, bg as DataTableRowProps, bh as DatePicker, bi as DatePickerProps, bj as DateRangePicker, bk as DateRangePickerProps, bl as DateTimePicker, bm as DateTimePickerProps, bn as DescriptionColumns, bo as DescriptionItem, bp as DescriptionList, bq as DescriptionListProps, br as Dialog, bs as DialogProps, bt as DialogSize, bu as Divider, bv as DividerProps, bw as DividerSpacing, bx as DonutChart, by as DonutChartProps, bz as DonutSegment, bA as Drawer, bB as DrawerProps, bC as DrawerSide, bD as DrawerSize, bE as DropdownMenu, bF as DropdownMenuAlign, bG as DropdownMenuCheckboxItem, bH as DropdownMenuDividerItem, bI as DropdownMenuEntry, bJ as DropdownMenuItem, bK as DropdownMenuLabelItem, bL as DropdownMenuLinkItem, bM as DropdownMenuProps, bN as DropdownMenuRadioItem, bO as DropdownMenuSide, bP as DropdownPositionOptions, bQ as ENTER, bR as EditableGrid, bS as EditableGridProps, bT as EmailTemplate, bU as EmptyState, bV as EmptyStateProps, bW as EmptyValue, bX as EmptyValueProps, bY as ErrorBoundary, bZ as ErrorBoundaryProps, b_ as ErrorPage, b$ as ErrorPageProps, c0 as FileIntake, c1 as FilePicker, c2 as FilePickerProps, c3 as FillVariant, c4 as FormError, c5 as FormErrorSummary, c6 as FormErrorSummaryProps, c7 as FormField, c8 as FormFieldProps, c9 as FormLayoutPage, ca as FunnelChart, cb as FunnelChartProps, cc as FunnelStage, cd as GLASS_DIVIDER, cf as GROUP_COLORS, cg as GROUP_COLORS_SOLID, ch as GalleryTemplate, ci as Gap, cj as GlassOptions, ck as GlobalSearch, cl as GlobalSearchProps, cm as Grid, cn as GridCols, co as GridColumn, cp as GridProps, cq as HeatmapChart, cr as HeatmapChartProps, cs as HelpCenter, ct as HelpCenterDoc, cu as HelpCenterProps, cv as HistogramBin, cw as HistogramChart, cx as HistogramChartProps, cy as INPUT_BASE, cz as INPUT_SIZES, cA as IconButton, cB as IconButtonClassesOptions, cC as IconButtonProps, cD as Inline, cE as InlineProps, cF as Input, cG as InputNumber, cH as InputNumberProps, cI as InputProps, cJ as InputSize, cK as Justify, cL as Kanban, cM as KanbanColumn, cN as KanbanProps, cO as Kbd, cP as KbdProps, cQ as KbdSize, cR as Label, cS as LabelClassesOptions, cT as LabelProps, cU as LadderScale, cV as LineChart, cW as LineChartProps, cX as LineChartSeries, cY as LinearScale, cZ as ListFooter, c_ as ListLoadError, c$ as ListLoadErrorProps, d0 as LoadingSpinner, d1 as LoadingSpinnerProps, d2 as MAX_FRACTION_DIGITS, d3 as MENU_MAX_HEIGHT, d4 as MOD, d5 as MOTION, d6 as Markdown, d6 as MarkdownLite, d7 as MarkdownLiteProps, d7 as MarkdownProps, d8 as MediaUploadField, d9 as MediaUploadFieldProps, da as MediaUploadGrid, db as MediaUploadGridItem, dc as MediaUploadGridProps, dd as MenuPos, de as Meter, df as MeterProps, dg as MetricBar, dh as MetricBarProps, di as Milestone, dj as MilestoneKind, dk as MilestoneTimeline, dl as MilestoneTimelineProps, dm as NEXT_CHUNK_PATH_PREFIX, dn as NativeSelect, dp as NumericKeypad, dq as NumericKeypadProps, dr as OVERLAY_OPEN_EVENT, ds as POPUP_MAX_WIDTH, dt as POST_PRODUCTION_STATUSES, du as PageHeader, dv as PageHeaderProps, P as PaginatedResponse, dw as Pagination, dx as PaginationProps, dy as PaperclipGlyph, dz as Paragraph, dA as ParagraphProps, dB as PieChart, dC as PieChartProps, dD as PieSegment, dE as PlotGeometry, dF as Point, dG as Popover, dH as PopoverAlign, dI as PopoverProps, dJ as PopoverRenderProps, dK as PopoverSide, dL as PopupMenu, dM as PopupMenuDivider, dN as PopupMenuItem, dO as PopupMenuItemProps, dP as PopupMenuLabel, dQ as PopupMenuProps, dR as PopupSubmenu, dS as PopupSubmenuProps, dT as PortalBrandingContextValue, dU as PortalBrandingProvider, dV as PortalBrandingProviderProps, dW as ProductionTimeline, dX as ProductionTimelineProps, dY as ProductionTimelineSnapshot, dZ as ProgressItem, d_ as PublicPortal, d$ as PublicPortalBranding, e0 as RADAR_SERIES_CAP, e1 as RadarAxis, e2 as RadarChart, e3 as RadarChartProps, e4 as RadarSeries, e5 as RadialBarChart, e6 as RadialBarChartProps, e7 as RadialBarRow, e8 as Radio, e9 as RadioGroup, ea as RadioGroupOption, eb as RadioGroupOrientation, ec as RadioGroupProps, ed as RadioProps, ee as Range, ef as RangeChart, eg as RangeChartProps, eh as RangeRow, ei as RankedBars, ej as RankedBarsProps, ek as RankedBarsRow, el as ResolvedPortalBrandAsset, em as Result, en as ResultProps, eo as ResultStatus, ep as RevealDirection, eq as SCATTER_SERIES_CAP, er as SERIES_SLOT_COUNT, es as SERIES_VARS, et as SHIFT, eu as STAGES, ev as STALE_CHUNK_RELOAD_COOLDOWN_MS, ew as STALE_CHUNK_RELOAD_KEY, ex as STATUS_VARS, ey as SankeyChart, ez as SankeyChartProps, eA as SankeyLink, eB as SankeyNode, eC as ScatterChart, eD as ScatterChartProps, eE as ScatterPoint, eF as ScatterSeries, S as SearchConfig, eG as SearchProvider, eH as SearchResult, eI as SearchableOption, eJ as SearchableSelect, eK as SearchableSelectProps, eL as Segmented, eM as SegmentedOption, eN as SegmentedProps, eO as SegmentedSize, eP as Select, eQ as SelectOption, eR as SelectProps, eS as SemanticGroup, eT as SettingRow, eU as SettingRowProps, eV as SeverityTone, eW as ShellPrefsAdapter, eX as ShellPrefsProvider, eY as ShellStrings, eZ as ShellStringsOverride, e_ as ShellStringsProvider, e$ as SidebarActionButton, f0 as SidebarActionButtonProps, f1 as SidebarGroupLabel, f2 as SidebarGroupLabelProps, f3 as SidebarLayout, f4 as SidebarLayoutProps, f5 as SidebarNavGroup, f6 as SidebarNavGroupProps, f7 as SidebarNavItem, f8 as SidebarNavItemProps, f9 as Skeleton, fa as SkeletonProps, fb as SkeletonVariant, fc as Snippet, fd as SnippetProps, fe as SnippetSize, ff as SnippetVariant, a as SortState, fg as Sparkline, fh as SparklineProps, fi as Stack, fj as StackProps, fk as StaleChunkReloadOptions, fl as StatCard, fm as StatCardProps, fn as StatTile, fo as StatTileProps, fp as Statistic, fq as StatisticProps, fr as StatisticSize, fs as StatisticTone, ft as StatusBadge, fu as StatusBadgeProvider, fv as StatusEmphasis, fw as StepItem, fx as Stepper, fy as StepperProps, fz as StrokeVariant, fA as SunburstChart, fB as SunburstChartProps, fC as SunburstNode, fD as Switch, fE as SwitchProps, fF as SwitchSize, fG as TabItem, fH as Tabs, fI as TabsProps, fJ as TagInput, fK as TagInputOption, fL as TagInputProps, fM as Text, fN as TextProps, fO as TextSize, fP as TextTone, fQ as TextWeight, fR as Textarea, fS as TextareaProps, fT as Theme, fU as TileButton, fV as TileButtonProps, fW as TileSize, fX as TimeAgo, fY as TimeAgoProps, fZ as TimePicker, f_ as TimePickerProps, f$ as TimeSeriesChart, g0 as TimeSeriesChartProps, g1 as TimeSeriesSeries, g2 as TimelineMarker, g3 as TimelineMarkerKind, g4 as TimelineReport, g5 as TimelineScrubProgress, g6 as TimelineTrack, g7 as TimelineTrackItem, g8 as TimelineTrackKind, g9 as TimelineTrackPending, ga as TimelineTrackPhase, gb as TimelineTrackPlayback, gc as TimelineTrackProps, gd as TimelineTrackThumb, ge as Title, gf as TitleLevel, gg as TitleProps, gh as ToastOptions, gi as ToastPlacement, gj as Tooltip, gk as TooltipProps, gl as TopNav, gm as TopNavItem, gn as TopNavProps, go as TreemapChart, gp as TreemapChartProps, gq as TreemapItem, gr as TreemapTile, gs as UseAppUpdateOptions, gt as UseProductionTimelineOpts, gu as VERSION, gv as VITE_PRELOAD_ERROR_EVENT, gw as WaterfallChart, gx as WaterfallChartProps, gy as WaterfallStep, gz as ZLayer, gA as Z_LAYERS, gB as angleScale, gC as appendKey, gD as applyThemePrefs, gE as arcPath, gF as areaBetween, gG as areaFrom, gH as autoHighlightIndex, gI as backspace, gJ as bandScale, gK as binValues, gL as budgetState, gM as bumpPath, gN as buttonClasses, gO as calcOverall, gP as calcReportOverall, gQ as confirm, gR as confirmDestructive, gS as curvePath, gT as dashFor, gU as dismissPopups, gV as fillFor, gW as fillId, gX as fmtSliderDate, gY as fromDateKey, gZ as glassStyle, g_ as glowId, g$ as groundId, h0 as groupColors, h1 as highlightOpacity, h2 as iconButtonClasses, h3 as inputClasses, h4 as installStaleChunkReload, h5 as isMac, h6 as isSeverityTone, h7 as isStaleChunkError, h8 as labelClasses, h9 as ladderScale, ha as linearPath, hb as linearScale, hc as logScale, hd as maskId, he as mediaFileName, hf as monotonePath, hg as niceMax, hh as openGlobalSearch, hi as polygonPoints, hj as popupBounds, hk as prompt, hl as radiusScale, hm as resolveBrandMarkTreatment, hn as resolvePortalBrandAsset, ho as resolveSeriesColor, hp as resolveTheme, hq as seriesColor, hr as severityOf, hs as splinePath, ht as squarify, hu as stagger, hv as stepPath, hw as tabButtonId, hx as tabPanelId, hy as toDateKey, hz as toDayMs, hA as toISODate, hB as toast, hC as useAppUpdate, hD as useClickOutside, hE as useConfirm, hF as useDebouncedValue, hG as useDropdownPosition, hH as useFocusTrap, hI as useHighlight, hJ as useIsMobile, hK as useLocalStoragePrefs, hL as usePlotWidth, hM as usePortalBranding, hN as useProductionTimeline, hO as useScrollLock, hP as useShellLocale, hQ as useShellPrefs, hR as useShellStrings, hS as useTheme } from '../index-D0K5U1Pb.js';
2
2
  export { FileIntakeAlert, FileIntakeLimits, FileIntakeOptions, FileRejection, FileRejectionReason, acceptsFile, useFileIntake } from '../file-intake/index.js';
3
+ export { C as CurrencyFormat, D as DATE_FORMAT_OPTIONS, a as DateFormatKey, E as EMPTY_VALUE, F as FormatDateOptions, b as FormatMoneyOptions, T as TZ_AUTO, c as TimeAgoOptions, d as currencyDecimals, e as currencySymbol, f as firstDayOfWeek, g as formatBytes, h as formatDate, i as formatDateTime, j as formatMoney, k as formatTime, l as getUserDateFormat, m as getUserTimezone, s as setCurrencyFormats, n as setUserDateFormat, o as setUserTimezone, p as syncTimezoneFromProfile, t as timeAgo } from '../index-DCUzlKPZ.js';
3
4
  import 'react';
4
5
  import 'react/jsx-runtime';
package/dist/ui/index.js CHANGED
@@ -1,2 +1,2 @@
1
1
  "use client";
2
- export{APP_UPDATE_POLL_MS,Accordion,AppUpdateBanner,AttachButton,AttachmentDropZone,AttachmentList,AuthScreen,Avatar,AvatarGroup,Banner,BarChart,BoxPlotChart,BrandAssetEditor,BudgetBar,CHART_INK,Calendar,CandlestickChart,Card,CartesianPlot,ChartBrush,ChartDefs,ChartDot,ChartFrame,ChartHighlightProvider,ChartSkeleton,ChartTooltip,ChatTemplate,Checkbox_default as Checkbox,CheckoutTemplate,ChordChart,ColoredBadge,ColumnChart,ComposerAttachments,ContainerFillChart,CountBadge,DAY_MS,DashboardTemplate,DataTable,DataTablePage,DatePicker_default as DatePicker,DateRangePicker,DateTimePicker_default as DateTimePicker,DescriptionList,Divider,DonutChart,Drawer,DropdownMenu,EmailTemplate,EmptyState,ErrorBoundary,ErrorPage,FilePicker_default as FilePicker,FormErrorSummary,FormField,FormLayoutPage,FunnelChart,GROUP_COLORS,GROUP_COLORS_SOLID,GalleryTemplate,Grid,HeatmapChart,HelpCenter,HistogramChart,INPUT_BASE,INPUT_SIZES,IconButton_default as IconButton,Inline,Input_default as Input,InputNumber_default as InputNumber,Kanban,Label,LineChart,ListFooter,ListLoadError,MAX_FRACTION_DIGITS,MENU_MAX_HEIGHT,MOTION,Markdown,Markdown as MarkdownLite,MediaUploadField,MediaUploadGrid,Meter,MetricBar,MilestoneTimeline,NativeSelect,NumericKeypad,POPUP_MAX_WIDTH,POST_PRODUCTION_STATUSES,PageHeader,Pagination,PaperclipGlyph,Paragraph,PieChart,Popover,PortalBrandingProvider,ProductionTimeline,RADAR_SERIES_CAP,RadarChart,RadialBarChart,Radio_default as Radio,RadioGroup,RangeChart,RankedBars,SCATTER_SERIES_CAP,SERIES_SLOT_COUNT,SERIES_VARS,STAGES,STATUS_VARS,SankeyChart,ScatterChart,SearchableSelect,Segmented,Select_default as Select,SettingRow,SidebarActionButton,SidebarGroupLabel,SidebarNavItem,Skeleton,Snippet,Sparkline,Stack,StatCard,StatTile,Statistic,StatusBadge,StatusBadgeProvider,Stepper,SunburstChart,Switch_default as Switch,Tabs,TagInput,Text,Textarea_default as Textarea,TileButton_default as TileButton,TimePicker_default as TimePicker,TimeSeriesChart,TimelineTrack,Title,Tooltip,TopNav,TreemapChart,WaterfallChart,angleScale,appendKey,applyThemePrefs,arcPath,areaBetween,areaFrom,autoHighlightIndex,backspace,bandScale,binValues,budgetState,bumpPath,calcOverall,calcReportOverall,curvePath,dashFor,fillFor,fillId,firstDayOfWeek,fmtSliderDate,formatDate,fromKey as fromDateKey,glowId,groundId,groupColors,highlightOpacity,inputClasses,isSeverityTone,labelClasses,ladderScale,linearPath,linearScale,logScale,maskId,mediaFileName,monotonePath,niceMax,polygonPoints,popupBounds,radiusScale,resolvePortalBrandAsset,resolveSeriesColor,resolveTheme,seriesColor,severityOf,splinePath,squarify,stagger,stepPath,tabButtonId,tabPanelId,toKey as toDateKey,toDayMs,toISODate,useAppUpdate,useClickOutside,useDropdownPosition,useHighlight,usePlotWidth,usePortalBranding,useProductionTimeline,useTheme}from"../chunk-ESXQJ7YI.js";export{Breadcrumbs}from"../chunk-26RS37FG.js";export{SidebarLayout}from"../chunk-KASHUEJV.js";export{BrandMark,GlobalSearch,openGlobalSearch,resolveBrandMarkTreatment}from"../chunk-ELCH5NDO.js";export{EditableGrid}from"../chunk-XN76YBX3.js";import"../chunk-BR22X7E5.js";export{toast_default as toast}from"../chunk-B2TBCVHH.js";export{VERSION}from"../chunk-O5BOGWO3.js";export{ALT,ALT_SHIFT_D,ALT_SHIFT_E,ALT_SHIFT_N,CMD_A,CMD_DOT,CMD_ENTER,CMD_K,CMD_S,ENTER,Kbd,LoadingSpinner,MOD,NEXT_CHUNK_PATH_PREFIX,Result,SHIFT,STALE_CHUNK_RELOAD_COOLDOWN_MS,STALE_CHUNK_RELOAD_KEY,ShellPrefsProvider,VITE_PRELOAD_ERROR_EVENT,installStaleChunkReload,isMac,isStaleChunkError,useIsMobile,useLocalStoragePrefs,useShellPrefs}from"../chunk-T6MKFQRH.js";export{FileIntakeAlert,acceptsFile,useFileIntake}from"../chunk-FHIF6IUV.js";export{Button_default as Button,buttonClasses,iconButtonClasses}from"../chunk-PH3PRIFP.js";export{ConfirmProvider,Dialog,confirm,confirmDestructive,prompt,useConfirm,useFocusTrap,useScrollLock}from"../chunk-PDTZTADH.js";export{GLASS_DIVIDER,PopupMenu,PopupMenuDivider,PopupMenuItem,PopupMenuLabel,PopupSubmenu,glassStyle}from"../chunk-J7LKJIZC.js";export{OVERLAY_OPEN_EVENT,Z_LAYERS,dismissPopups}from"../chunk-OSJ3ADF2.js";import"../chunk-MAIHBBWT.js";export{DEFAULT_SHELL_STRINGS,ShellStringsProvider,useShellLocale,useShellStrings}from"../chunk-VVI77XNV.js";import"../chunk-D65T4H6J.js";
2
+ export{APP_UPDATE_POLL_MS,Accordion,AppUpdateBanner,AttachButton,AttachmentDropZone,AttachmentList,AuthScreen,Avatar,AvatarGroup,Banner,BarChart,BoxPlotChart,BrandAssetEditor,BudgetBar,CHART_INK,Calendar,CandlestickChart,Card,CartesianPlot,ChartBrush,ChartDefs,ChartDot,ChartFrame,ChartHighlightProvider,ChartSkeleton,ChartTooltip,ChatTemplate,Checkbox_default as Checkbox,CheckoutTemplate,ChordChart,ColoredBadge,ColumnChart,ComposerAttachments,ContainerFillChart,CountBadge,DAY_MS,DashboardTemplate,DataTable,DataTablePage,DatePicker_default as DatePicker,DateRangePicker,DateTimePicker_default as DateTimePicker,DescriptionList,Divider,DonutChart,Drawer,DropdownMenu,EmailTemplate,EmptyState,EmptyValue,ErrorBoundary,ErrorPage,FilePicker_default as FilePicker,FormErrorSummary,FormField,FormLayoutPage,FunnelChart,GROUP_COLORS,GROUP_COLORS_SOLID,GalleryTemplate,Grid,HeatmapChart,HelpCenter,HistogramChart,INPUT_BASE,INPUT_SIZES,IconButton_default as IconButton,Inline,Input_default as Input,InputNumber_default as InputNumber,Kanban,Label,LineChart,ListFooter,ListLoadError,MAX_FRACTION_DIGITS,MENU_MAX_HEIGHT,MOTION,Markdown,Markdown as MarkdownLite,MediaUploadField,MediaUploadGrid,Meter,MetricBar,MilestoneTimeline,NativeSelect,NumericKeypad,POPUP_MAX_WIDTH,POST_PRODUCTION_STATUSES,PageHeader,Pagination,PaperclipGlyph,Paragraph,PieChart,Popover,PortalBrandingProvider,ProductionTimeline,RADAR_SERIES_CAP,RadarChart,RadialBarChart,Radio_default as Radio,RadioGroup,RangeChart,RankedBars,SCATTER_SERIES_CAP,SERIES_SLOT_COUNT,SERIES_VARS,STAGES,STATUS_VARS,SankeyChart,ScatterChart,SearchableSelect,Segmented,Select_default as Select,SettingRow,SidebarActionButton,SidebarGroupLabel,SidebarNavGroup,SidebarNavItem,Skeleton,Snippet,Sparkline,Stack,StatCard,StatTile,Statistic,StatusBadge,StatusBadgeProvider,Stepper,SunburstChart,Switch_default as Switch,Tabs,TagInput,Text,Textarea_default as Textarea,TileButton_default as TileButton,TimeAgo,TimePicker_default as TimePicker,TimeSeriesChart,TimelineTrack,Title,Tooltip,TopNav,TreemapChart,WaterfallChart,angleScale,appendKey,applyThemePrefs,arcPath,areaBetween,areaFrom,autoHighlightIndex,backspace,bandScale,binValues,budgetState,bumpPath,calcOverall,calcReportOverall,curvePath,dashFor,fillFor,fillId,fmtSliderDate,fromKey as fromDateKey,glowId,groundId,groupColors,highlightOpacity,inputClasses,isSeverityTone,labelClasses,ladderScale,linearPath,linearScale,logScale,maskId,mediaFileName,monotonePath,niceMax,polygonPoints,popupBounds,radiusScale,resolvePortalBrandAsset,resolveSeriesColor,resolveTheme,seriesColor,severityOf,splinePath,squarify,stagger,stepPath,tabButtonId,tabPanelId,toKey as toDateKey,toDayMs,toISODate,useAppUpdate,useClickOutside,useDebouncedValue,useDropdownPosition,useHighlight,usePlotWidth,usePortalBranding,useProductionTimeline,useTheme}from"../chunk-J7AAGG7P.js";export{Breadcrumbs}from"../chunk-26RS37FG.js";export{SidebarLayout}from"../chunk-KASHUEJV.js";export{BrandMark,GlobalSearch,openGlobalSearch,resolveBrandMarkTreatment}from"../chunk-CK245P3T.js";export{EditableGrid}from"../chunk-XN76YBX3.js";import"../chunk-BR22X7E5.js";export{toast_default as toast}from"../chunk-B2TBCVHH.js";export{VERSION}from"../chunk-L4KRS7N3.js";export{ALT,ALT_SHIFT_D,ALT_SHIFT_E,ALT_SHIFT_N,CMD_A,CMD_DOT,CMD_ENTER,CMD_K,CMD_S,ENTER,Kbd,LoadingSpinner,MOD,NEXT_CHUNK_PATH_PREFIX,Result,SHIFT,STALE_CHUNK_RELOAD_COOLDOWN_MS,STALE_CHUNK_RELOAD_KEY,ShellPrefsProvider,VITE_PRELOAD_ERROR_EVENT,installStaleChunkReload,isMac,isStaleChunkError,useIsMobile,useLocalStoragePrefs,useShellPrefs}from"../chunk-T6MKFQRH.js";export{FileIntakeAlert,acceptsFile,useFileIntake}from"../chunk-FHIF6IUV.js";export{DATE_FORMAT_OPTIONS,EMPTY_VALUE,TZ_AUTO,currencyDecimals,currencySymbol,firstDayOfWeek,formatBytes,formatDate,formatDateTime,formatMoney,formatTime,getUserDateFormat,getUserTimezone,setCurrencyFormats,setUserDateFormat,setUserTimezone,syncTimezoneFromProfile,timeAgo}from"../chunk-S2AZZGFF.js";export{Button_default as Button,buttonClasses,iconButtonClasses}from"../chunk-PH3PRIFP.js";export{ConfirmProvider,Dialog,confirm,confirmDestructive,prompt,useConfirm,useFocusTrap,useScrollLock}from"../chunk-PDTZTADH.js";export{GLASS_DIVIDER,PopupMenu,PopupMenuDivider,PopupMenuItem,PopupMenuLabel,PopupSubmenu,glassStyle}from"../chunk-VNEH2Y6H.js";export{OVERLAY_OPEN_EVENT,Z_LAYERS,dismissPopups}from"../chunk-OSJ3ADF2.js";import"../chunk-MAIHBBWT.js";export{DEFAULT_SHELL_STRINGS,ShellStringsProvider,useShellLocale,useShellStrings}from"../chunk-VVI77XNV.js";import"../chunk-D65T4H6J.js";
package/dist/ui.css CHANGED
@@ -609,6 +609,13 @@ html.rosh-reduce-transparency *::after {
609
609
  `--rosh-glass-surface` with no blur: a plain hairline and one shadow. */
610
610
  --rosh-glass-solid-border: rgba(0, 0, 0, 0.12);
611
611
  --rosh-glass-solid-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
612
+ /* The solid fallback of glass inked white over a picture — `glassStyle(o,
613
+ { ink: 'light' })`, a sign-in card on a photograph. A photograph has no
614
+ theme, so this is the dark ramp's `--surface` in both themes, not the
615
+ light one that would put white ink on white. `tests/glassLightInk.test.tsx`
616
+ fails when it drifts from the dark `--surface`. */
617
+ --rosh-glass-light-ink-surface: #1e1e2e;
618
+ --rosh-glass-light-ink-solid-border: rgba(255, 255, 255, 0.12);
612
619
 
613
620
  /* Over a picture — the upload thumbnails. A photograph has no theme, so
614
621
  neither has the dark wash white text and glyphs sit on over it: the
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "efficient-shell",
3
- "version": "4.156.1",
3
+ "version": "4.159.0",
4
4
  "description": "Desktop-style React UI shell — windows, taskbar, start menu, sticky notes, frosted glass theming, and bundled apps.",
5
5
  "license": "UNLICENSED",
6
6
  "author": "Efficient Pty Ltd",
@@ -34,6 +34,11 @@
34
34
  "import": "./dist/markup/index.js",
35
35
  "default": "./dist/markup/index.js"
36
36
  },
37
+ "./format": {
38
+ "types": "./dist/format/index.d.ts",
39
+ "import": "./dist/format/index.js",
40
+ "default": "./dist/format/index.js"
41
+ },
37
42
  "./file-intake": {
38
43
  "types": "./dist/file-intake/index.d.ts",
39
44
  "import": "./dist/file-intake/index.js",
@@ -1,89 +0,0 @@
1
- import{openPreviewFile as e}from"./chunk-ZJ66QFOH.js";import{Breadcrumbs as t}from"./chunk-26RS37FG.js";import{SidebarLayout as r}from"./chunk-KASHUEJV.js";import{getFilesDemoTree as a}from"./chunk-JGHRZYNV.js";import{AboutApp as n}from"./chunk-5DVD4E4P.js";import{peekFilesViewRequest as i,consumeFilesViewRequest as o,FILES_SHOW_TRASH_EVENT as s,FILES_OPEN_DESKTOP_FOLDER_EVENT as l,subscribeDesktopFolders as d,getDesktopFoldersSnapshot as c,FolderGlyph as m,DesktopItemMiniIcon as h,desktopItemTypeLabel as p}from"./chunk-KZPQW6UL.js";import"./chunk-ESL5TDNA.js";import{toast_default as u}from"./chunk-B2TBCVHH.js";import"./chunk-VTVSMRFX.js";import"./chunk-O5BOGWO3.js";import{useWindowManager as f,WindowTitle as x}from"./chunk-XC64WV33.js";import"./chunk-T6MKFQRH.js";import"./chunk-6UXY7MPY.js";import"./chunk-PH3PRIFP.js";import{confirm as g,prompt as y}from"./chunk-PDTZTADH.js";import"./chunk-J7LKJIZC.js";import"./chunk-OSJ3ADF2.js";import"./chunk-MAIHBBWT.js";import"./chunk-VVI77XNV.js";import"./chunk-D65T4H6J.js";import{useState as b,useEffect as k,useSyncExternalStore as v,useRef as w,useCallback as N}from"react";import{jsxs as L,jsx as j,Fragment as C}from"react/jsx-runtime";var $="undefined"!=typeof window&&window.__REACT_OS_SHELL_FILE_SERVER__||"http://localhost:4000",M={pdf:"pdf",dxf:"dxf",csv:"csv",jpg:"image",jpeg:"image",png:"image",gif:"image",webp:"image",svg:"image",avif:"image",bmp:"image",stp:"3d",step:"3d",stl:"3d",obj:"3d",gltf:"3d",glb:"3d","3mf":"3d",iges:"3d",igs:"3d",ply:"3d",fbx:"3d"};function D(e,t){return"/"===e||""===e?"/"+t:e.replace(/\/$/,"")+"/"+t}function T(e){if(!e)return"—";const t=["B","KB","MB","GB"];let r=e,a=0;for(;r>=1024&&a<t.length-1;)r/=1024,a++;return`${r<10?r.toFixed(1):Math.round(r)} ${t[a]}`}function E(e){if(!e)return"—";try{const t=new Date(e);return isNaN(t.getTime())?"—":t.toLocaleString(void 0,{dateStyle:"short",timeStyle:"short"})}catch{return e}}function A(){const A=$.replace(/\/$/,""),R=null!==a(),[B,P]=b("/"),[F,V]=b([]),[H,S]=b([]),[I,O]=b(null),[W,U]=b(!0),[z,J]=b(!1),[K,_]=b(null),[Z,G]=b(!1),[Q,X]=b(()=>{const e=i();return"trash"===e?"trash":e?{desktopFolderId:e.folderId}:"files"});k(()=>{o()},[]);const[Y,q]=b([]);k(()=>{const e=()=>{o(),X("trash")},t=e=>{o();const t=e.detail?.folderId;t&&X({desktopFolderId:t})};return window.addEventListener(s,e),window.addEventListener(l,t),()=>{window.removeEventListener(s,e),window.removeEventListener(l,t)}},[]);const ee=v(d,c,c),te="object"==typeof Q?Q.desktopFolderId:null,re=te?ee?.folders.find(e=>e.id===te)??null:null,ae=te&&ee?.itemsByFolder[te]||[];k(()=>{te&&ee&&!ee.folders.some(e=>e.id===te)&&X("files")},[te,ee]);const ne=w(0),ie=w(null),{openPage:oe,openEntity:se}=f(),le=t=>{"preview-file"===t.entityType&&t.filePath&&t.fileKind?e({filePath:t.filePath,filename:t.label,kind:t.fileKind,onStaged:e=>oe(e)}):"page"===t.entityType?oe(t.entityId):se(t.entityType,t.entityId,null,t.label)},de=N((e,t={})=>fetch(e,{...t,credentials:"include"}),[]),ce=N(async()=>{try{const e=await de(`${A}/api/quota`);if(e.ok){const t=await e.json();_({used:t.used,limit:t.limit})}}catch{}},[de,A]),me=N(async e=>{if(O(null),R){const t=function(e){const t=a();if(!t)return[];let r=t;for(const t of e.split("/").filter(Boolean)){const e=r.find(e=>"folder"===e.kind&&e.name===t);if(!e||!e.children)return[];r=e.children}return r.map(e=>({name:e.name,kind:e.kind,size:e.size??0,modifiedAt:e.modifiedAt??""}))}(e);return V(t),P(e),J(!1),U(!1),void("/"===e&&S(t.filter(e=>"folder"===e.kind).map(e=>e.name)))}U(!0);try{const t=await de(`${A}/api/files?path=${encodeURIComponent(e)}`);if(!t.ok){const e=await t.json().catch(()=>({}));return void u.error(e.error||`Failed to list (${t.status})`)}const r=await t.json(),a=r.entries||[];V(a),P(r.path||e),J(!1),"/"===(r.path||e)&&S(a.filter(e=>"folder"===e.kind).map(e=>e.name))}catch(e){J(!0)}finally{U(!1)}ce()},[de,A,ce,R]),he=N(async()=>{if(R)return q([]),void U(!1);U(!0),O(null);try{const e=await de(`${A}/api/trash`);if(!e.ok){const t=await e.json().catch(()=>({}));return void u.error(t.error||`Failed to list trash (${e.status})`)}const t=await e.json();q(t.entries||[]),J(!1)}catch{J(!0)}finally{U(!1)}ce()},[de,A,ce,R]);k(()=>{"files"===Q?me(B):"trash"===Q&&he()},[B,Q]);const pe=async e=>{const t=D(B,e.name);try{const r=await de(`${A}/api/file?path=${encodeURIComponent(t)}`);if(!r.ok)return void u.error(`Download failed (${r.status})`);const a=await r.blob(),n=URL.createObjectURL(a),i=document.createElement("a");i.href=n,i.download=e.name,i.click(),setTimeout(()=>URL.revokeObjectURL(n),1e3)}catch(e){u.error(e?.message||"Download failed")}},ue=async e=>{const t=Array.from(e);for(const e of t){const t=new FormData;t.append("file",e);try{const r=await de(`${A}/api/upload?path=${encodeURIComponent(B)}`,{method:"POST",body:t});if(!r.ok){const t=await r.json().catch(()=>({}));if(413===r.status){const r=Math.max(0,(t.limit||0)-(t.used||0));u.error(`Quota exceeded — ${T(r)} free, ${e.name} is ${T(t.attempted||e.size)}`)}else u.error(`Upload ${e.name}: ${t.error||r.status}`)}}catch(t){u.error(`Upload ${e.name}: ${t?.message||"failed"}`)}}me(B)},fe=()=>{ne.current=0,G(!1)};if(k(()=>{const e=()=>fe();return window.addEventListener("dragend",e),window.addEventListener("drop",e),()=>{window.removeEventListener("dragend",e),window.removeEventListener("drop",e)}},[]),z)/* @__PURE__ */
2
- return L("div",{className:"flex flex-col h-full bg-white",children:[
3
- /* @__PURE__ */j(x,{title:"Files - offline"}),
4
- /* @__PURE__ */j("div",{className:"flex-1 flex items-center justify-center p-8 text-center",children:/* @__PURE__ */L("div",{className:"max-w-md",children:[
5
- /* @__PURE__ */L("svg",{className:"h-12 w-12 mx-auto text-gray-300 mb-3",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.4,children:[
6
- /* @__PURE__ */j("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M18.364 5.636l-12.728 12.728M5.636 5.636l12.728 12.728"}),
7
- /* @__PURE__ */j("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 21a9 9 0 100-18 9 9 0 000 18z"})]}),
8
- /* @__PURE__ */j("h3",{className:"text-base font-semibold text-gray-800 mb-1",children:"Can't reach the file server"}),
9
- /* @__PURE__ */L("p",{className:"text-sm text-gray-500 mb-3",children:["No response from ",
10
- /* @__PURE__ */j("span",{className:"font-mono",children:A}),". Make sure the server is running — see ",
11
- /* @__PURE__ */j("span",{className:"font-mono",children:"examples/file-server/README.md"}),"."]}),
12
- /* @__PURE__ */j("button",{onClick:()=>me(B),className:"px-3 py-1.5 text-sm bg-blue-500 text-white rounded hover:bg-blue-600",children:"Retry"})]})})]});const xe="/"===B?[]:B.split("/").filter(Boolean),ge=K&&K.limit>0?Math.min(100,Math.round(K.used/K.limit*100)):0,ye=ge>90?"bg-red-500":ge>75?"bg-amber-500":"bg-blue-500",be=[{label:"My files",onClick:()=>P("/")},...xe.map((e,t)=>({label:e,onClick:()=>P("/"+xe.slice(0,t+1).join("/"))}))],ke=e=>"flex w-full items-center gap-2 rounded-md px-2.5 py-1.5 text-left text-sm transition-colors "+(e?"bg-blue-50 font-medium text-blue-700":"text-gray-700 hover:bg-gray-100"),ve=e=>/* @__PURE__ */j("svg",{className:"h-4 w-4 shrink-0 text-gray-400",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.6,children:/* @__PURE__ */j("path",{strokeLinecap:"round",strokeLinejoin:"round",d:e})}),we=/* @__PURE__ */L("nav",{className:"p-2",children:[
13
- /* @__PURE__ */j("div",{className:"px-2 py-1.5 text-[11px] font-semibold uppercase tracking-wide text-gray-400",children:"Locations"}),
14
- /* @__PURE__ */L("button",{onClick:()=>{X("files"),P("/")},className:ke("files"===Q&&"/"===B),children:[ve("M2.25 12l8.954-8.955a1.5 1.5 0 012.122 0L21.75 12M4.5 9.75v9.75a.75.75 0 00.75.75H9V15a.75.75 0 01.75-.75h4.5A.75.75 0 0115 15v5.25h3.75a.75.75 0 00.75-.75V9.75"),"My files"]}),H.map(e=>/* @__PURE__ */L("button",{onClick:()=>{X("files"),P("/"+e)},className:ke("files"===Q&&B==="/"+e),children:[ve("M2.25 12.75V12A2.25 2.25 0 014.5 9.75h15A2.25 2.25 0 0121.75 12v.75m-8.69-6.44l-2.12-2.12a1.5 1.5 0 00-1.061-.44H4.5A2.25 2.25 0 002.25 6v12a2.25 2.25 0 002.25 2.25h15A2.25 2.25 0 0021.75 18V9a2.25 2.25 0 00-2.25-2.25h-5.379a1.5 1.5 0 01-1.06-.44z"),
15
- /* @__PURE__ */j("span",{className:"truncate",children:e})]},e)),!R&&/* @__PURE__ */L("button",{onClick:()=>X("trash"),className:ke("trash"===Q),children:[ve("M14.74 9l-.346 9m-4.788 0L9.26 9m9.968-3.21c.342.052.682.107 1.022.166m-1.022-.165L18.16 19.673a2.25 2.25 0 01-2.244 2.077H8.084a2.25 2.25 0 01-2.244-2.077L4.772 5.79"),"Trash"]}),ee&&ee.folders.length>0&&/* @__PURE__ */L(C,{children:[
16
- /* @__PURE__ */j("div",{className:"px-2 pt-3 pb-1.5 text-[11px] font-semibold uppercase tracking-wide text-gray-400",children:"Desktop"}),ee.folders.map(e=>/* @__PURE__ */L("button",{onClick:()=>X({desktopFolderId:e.id}),className:ke(te===e.id),children:[
17
- /* @__PURE__ */j(m,{className:"h-4 w-4 shrink-0 text-amber-500"}),
18
- /* @__PURE__ */j("span",{className:"truncate",children:e.name}),e.itemCount>0&&/* @__PURE__ */j("span",{className:"ml-auto text-[10px] text-gray-400 tabular-nums",children:e.itemCount})]},e.id))]})]});/* @__PURE__ */
19
- return L("div",{className:"relative flex flex-col h-full bg-white",onDragEnter:e=>{R||"object"==typeof Q||e.dataTransfer?.types?.includes?.("Files")&&(e.preventDefault(),ne.current++,Z||G(!0))},onDragOver:e=>{e.dataTransfer?.types?.includes?.("Files")&&e.preventDefault()},onDragLeave:()=>{ne.current>0&&ne.current--,0===ne.current&&G(!1)},onDrop:e=>{e.preventDefault(),fe(),R||"object"==typeof Q||e.dataTransfer.files?.length&&ue(e.dataTransfer.files)},children:[
20
- /* @__PURE__ */j(x,{title:re?`Files - ${re.name}`:"Files"+("/"===B?"":" - "+B)}),
21
- /* @__PURE__ */j(n,{app:"files"}),
22
- /* @__PURE__ */j("input",{ref:ie,type:"file",multiple:!0,className:"hidden",onChange:e=>{e.target.files?.length&&ue(e.target.files),ie.current&&(ie.current.value="")}}),
23
- /* @__PURE__ */j("div",{className:"flex-1 min-h-0",children:/* @__PURE__ */j(r,{sidebar:we,storageKey:"files.sidebarWidth",defaultWidth:200,minWidth:150,maxWidth:320,children:/* @__PURE__ */L("div",{className:"flex h-full min-w-0 flex-col",children:[
24
- /* @__PURE__ */L("div",{className:"flex items-center gap-1 px-2 py-1.5 border-b border-gray-200 bg-gray-50 shrink-0 text-xs",children:[/* @__PURE__ */L(C,"files"===Q?{children:[
25
- /* @__PURE__ */j("button",{onClick:()=>P(function(e){if("/"===e||""===e)return"/";const t=e.replace(/\/$/,""),r=t.lastIndexOf("/");return r<=0?"/":t.slice(0,r)}(B)),disabled:"/"===B,className:"px-2 py-1 rounded hover:bg-gray-200 disabled:opacity-30 text-gray-600",title:"Parent folder",children:/* @__PURE__ */j("svg",{className:"h-3.5 w-3.5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:/* @__PURE__ */j("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M10.5 19.5L3 12m0 0l7.5-7.5M3 12h18"})})}),
26
- /* @__PURE__ */j("div",{className:"flex-1 min-w-0",children:/* @__PURE__ */j(t,{items:be,maxItems:5})}),
27
- /* @__PURE__ */j("button",{onClick:()=>me(B),className:"px-2 py-1 rounded hover:bg-gray-200 text-gray-600",title:"Refresh",children:/* @__PURE__ */j("svg",{className:"h-3.5 w-3.5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.8,children:/* @__PURE__ */j("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M16.023 9.348h4.992V4.356M2.985 19.644v-4.992h4.992M3.05 9.348a9 9 0 0114.85-3.36L21.015 9.348m0 5.304a9 9 0 01-14.85 3.36l-3.115-3.36"})})}),!R&&/* @__PURE__ */L(C,{children:[
28
- /* @__PURE__ */L("button",{onClick:()=>X("trash"),className:"px-2 py-1 rounded hover:bg-gray-200 text-gray-600 flex items-center gap-1",title:"Open trash",children:[
29
- /* @__PURE__ */j("svg",{className:"h-3.5 w-3.5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:/* @__PURE__ */j("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M14.74 9l-.346 9m-4.788 0L9.26 9m9.968-3.21c.342.052.682.107 1.022.166m-1.022-.165L18.16 19.673a2.25 2.25 0 01-2.244 2.077H8.084a2.25 2.25 0 01-2.244-2.077L4.772 5.79m14.456 0a48.108 48.108 0 00-3.478-.397m-12 .562c.34-.059.68-.114 1.022-.165m0 0a48.11 48.11 0 013.478-.397m7.5 0v-.916c0-1.18-.91-2.164-2.09-2.201a51.964 51.964 0 00-3.32 0c-1.18.037-2.09 1.022-2.09 2.201v.916m7.5 0a48.667 48.667 0 00-7.5 0"})}),"Trash"]}),
30
- /* @__PURE__ */L("button",{onClick:async()=>{const e=await y({title:"New folder",placeholder:"Folder name",confirmLabel:"Create"});if(!e)return;if(/[\\/]/.test(e))return void u.error("Folder names cannot contain slashes");const t=D(B,e),r=await de(`${A}/api/folder`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({path:t})});if(!r.ok){const e=await r.json().catch(()=>({}));return void u.error(e.error||`Create folder failed (${r.status})`)}me(B)},className:"px-2 py-1 rounded hover:bg-gray-200 text-gray-600 flex items-center gap-1",children:[
31
- /* @__PURE__ */j("svg",{className:"h-3.5 w-3.5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:/* @__PURE__ */j("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 10.5v6m3-3H9m4.06-7.19l-2.12-2.12a1.5 1.5 0 00-1.061-.44H4.5A2.25 2.25 0 002.25 6v12a2.25 2.25 0 002.25 2.25h15A2.25 2.25 0 0021.75 18V9a2.25 2.25 0 00-2.25-2.25h-5.379a1.5 1.5 0 01-1.06-.44z"})}),"New Folder"]}),
32
- /* @__PURE__ */L("button",{onClick:()=>ie.current?.click(),className:"px-2 py-1 rounded bg-blue-500 text-white hover:bg-blue-600 flex items-center gap-1",children:[
33
- /* @__PURE__ */j("svg",{className:"h-3.5 w-3.5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.8,children:/* @__PURE__ */j("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3 16.5v2.25A2.25 2.25 0 005.25 21h13.5A2.25 2.25 0 0021 18.75V16.5M7.5 7.5L12 3m0 0l4.5 4.5M12 3v13.5"})}),"Upload"]})]})]}:"trash"===Q?{children:[
34
- /* @__PURE__ */j("button",{onClick:()=>X("files"),className:"px-2 py-1 rounded hover:bg-gray-200 text-gray-600",title:"Back to files",children:/* @__PURE__ */j("svg",{className:"h-3.5 w-3.5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:/* @__PURE__ */j("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M10.5 19.5L3 12m0 0l7.5-7.5M3 12h18"})})}),
35
- /* @__PURE__ */j("span",{className:"flex-1 text-gray-700 font-medium px-2",children:"Trash"}),
36
- /* @__PURE__ */j("button",{onClick:he,className:"px-2 py-1 rounded hover:bg-gray-200 text-gray-600",title:"Refresh",children:/* @__PURE__ */j("svg",{className:"h-3.5 w-3.5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.8,children:/* @__PURE__ */j("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M16.023 9.348h4.992V4.356M2.985 19.644v-4.992h4.992M3.05 9.348a9 9 0 0114.85-3.36L21.015 9.348m0 5.304a9 9 0 01-14.85 3.36l-3.115-3.36"})})}),
37
- /* @__PURE__ */j("button",{onClick:async()=>{if(0===Y.length)return;if(!await g({title:"Empty trash",message:`${Y.length} item${1===Y.length?"":"s"} will be permanently removed. This can't be undone.`,confirmLabel:"Empty trash",variant:"danger"}))return;const e=await de(`${A}/api/trash`,{method:"DELETE"});if(!e.ok){const t=await e.json().catch(()=>({}));return void u.error(t.error||`Empty trash failed (${e.status})`)}he()},disabled:0===Y.length,className:"px-2 py-1 rounded text-red-600 hover:bg-red-50 disabled:opacity-30 flex items-center gap-1",children:"Empty trash"})]}:{children:[
38
- /* @__PURE__ */j("button",{onClick:()=>X("files"),className:"px-2 py-1 rounded hover:bg-gray-200 text-gray-600",title:"Back to files",children:/* @__PURE__ */j("svg",{className:"h-3.5 w-3.5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:/* @__PURE__ */j("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M10.5 19.5L3 12m0 0l7.5-7.5M3 12h18"})})}),
39
- /* @__PURE__ */j(m,{className:"h-4 w-4 text-amber-500 ml-1"}),
40
- /* @__PURE__ */j("span",{className:"flex-1 text-gray-700 font-medium px-1 truncate",children:re?.name??"Desktop folder"}),
41
- /* @__PURE__ */j("span",{className:"text-[10px] text-gray-400 px-2",children:"Desktop shortcuts"})]}),K&&/* @__PURE__ */L(C,{children:[
42
- /* @__PURE__ */j("div",{className:"h-4 w-px bg-gray-300 mx-1"}),
43
- /* @__PURE__ */L("div",{className:"flex items-center gap-1.5",title:`${T(K.used)} of ${T(K.limit)} used`,children:[
44
- /* @__PURE__ */j("div",{className:"w-20 h-1.5 rounded-full bg-gray-200 overflow-hidden",children:/* @__PURE__ */j("div",{className:`h-full ${ye} transition-all`,style:{width:`${ge}%`}})}),
45
- /* @__PURE__ */L("span",{className:"text-[10px] text-gray-500 tabular-nums whitespace-nowrap",children:[T(K.used)," / ",T(K.limit)]})]})]})]}),
46
- /* @__PURE__ */j("div",{className:"flex-1 overflow-auto",children:"object"==typeof Q?0===ae.length?/* @__PURE__ */j("div",{className:"p-10 text-center text-sm text-gray-400",children:"This desktop folder is empty. Drag shortcuts onto it on the desktop."}):/* @__PURE__ */L("table",{className:"w-full text-sm",children:[
47
- /* @__PURE__ */j("thead",{className:"bg-gray-50 text-[11px] uppercase tracking-wide text-gray-500",children:/* @__PURE__ */L("tr",{children:[
48
- /* @__PURE__ */j("th",{className:"text-left font-medium px-3 py-1.5",children:"Name"}),
49
- /* @__PURE__ */j("th",{className:"text-left font-medium px-3 py-1.5 w-28",children:"Type"}),
50
- /* @__PURE__ */j("th",{className:"w-56"})]})}),
51
- /* @__PURE__ */j("tbody",{children:ae.map(e=>{const t=`${e.entityType}|${e.entityId}`;/* @__PURE__ */
52
- return L("tr",{onClick:()=>O(t),onDoubleClick:()=>le(e),className:"cursor-default border-b border-gray-100 "+(I===t?"bg-blue-50":"hover:bg-gray-50"),children:[
53
- /* @__PURE__ */L("td",{className:"px-3 py-1.5 flex items-center gap-2",children:[
54
- /* @__PURE__ */j(h,{item:e}),
55
- /* @__PURE__ */j("span",{className:"truncate",title:e.label,children:e.label})]}),
56
- /* @__PURE__ */j("td",{className:"px-3 py-1.5 text-xs text-gray-500",children:p(e)}),
57
- /* @__PURE__ */L("td",{className:"px-3 py-1.5 text-right whitespace-nowrap",children:[
58
- /* @__PURE__ */j("button",{onClick:t=>{t.stopPropagation(),le(e)},className:"px-1.5 py-0.5 rounded hover:bg-gray-200 text-blue-600 text-[11px]",children:"Open"}),
59
- /* @__PURE__ */j("button",{onClick:t=>{t.stopPropagation(),ee?.moveToDesktop([e])},className:"px-1.5 py-0.5 rounded hover:bg-gray-200 text-gray-500 text-[11px] ml-1",children:"Move to desktop"}),
60
- /* @__PURE__ */j("button",{onClick:t=>{t.stopPropagation(),ee?.removeShortcuts([e])},className:"px-1.5 py-0.5 rounded hover:bg-red-100 text-red-600 text-[11px] ml-1",children:"Remove"})]})]},t)})})]}):"trash"===Q?W&&0===Y.length?/* @__PURE__ */j("div",{className:"p-6 text-center text-sm text-gray-400",children:"Loading…"}):0===Y.length?/* @__PURE__ */j("div",{className:"p-10 text-center text-sm text-gray-400",children:"Trash is empty."}):/* @__PURE__ */L("table",{className:"w-full text-sm",children:[
61
- /* @__PURE__ */j("thead",{className:"bg-gray-50 text-[11px] uppercase tracking-wide text-gray-500",children:/* @__PURE__ */L("tr",{children:[
62
- /* @__PURE__ */j("th",{className:"text-left font-medium px-3 py-1.5",children:"Name"}),
63
- /* @__PURE__ */j("th",{className:"text-left font-medium px-3 py-1.5",children:"Original location"}),
64
- /* @__PURE__ */j("th",{className:"text-right font-medium px-3 py-1.5 w-24",children:"Size"}),
65
- /* @__PURE__ */j("th",{className:"text-right font-medium px-3 py-1.5 w-40",children:"Deleted"}),
66
- /* @__PURE__ */j("th",{className:"w-44"})]})}),
67
- /* @__PURE__ */j("tbody",{children:Y.map(e=>/* @__PURE__ */L("tr",{className:"border-b border-gray-100 hover:bg-gray-50",children:[
68
- /* @__PURE__ */L("td",{className:"px-3 py-1.5 flex items-center gap-2",children:["folder"===e.kind?/* @__PURE__ */j("svg",{className:"h-4 w-4 text-amber-500 shrink-0",fill:"currentColor",viewBox:"0 0 24 24",children:/* @__PURE__ */j("path",{d:"M2.25 7.125A2.25 2.25 0 014.5 4.875h4.504c.61 0 1.193.243 1.624.673l1.494 1.494a.75.75 0 00.53.22h7.098A2.25 2.25 0 0122 9.51v8.366A2.25 2.25 0 0119.75 20.125H4.25A2.25 2.25 0 012 17.875V7.125z"})}):/* @__PURE__ */j("svg",{className:"h-4 w-4 text-gray-400 shrink-0",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:/* @__PURE__ */j("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19.5 14.25v-2.625a3.375 3.375 0 00-3.375-3.375h-1.5A1.125 1.125 0 0113.5 7.125v-1.5a3.375 3.375 0 00-3.375-3.375H8.25m2.25 0H5.625c-.621 0-1.125.504-1.125 1.125v17.25c0 .621.504 1.125 1.125 1.125h12.75c.621 0 1.125-.504 1.125-1.125V11.25a9 9 0 00-9-9z"})}),
69
- /* @__PURE__ */j("span",{className:"truncate",title:e.name,children:e.name})]}),
70
- /* @__PURE__ */j("td",{className:"px-3 py-1.5 text-gray-500 text-xs font-mono truncate",title:e.originalPath,children:e.originalPath||"—"}),
71
- /* @__PURE__ */j("td",{className:"px-3 py-1.5 text-right tabular-nums text-gray-500",children:T(e.size)}),
72
- /* @__PURE__ */j("td",{className:"px-3 py-1.5 text-right text-gray-500 tabular-nums",children:e.deletedAt?E(e.deletedAt):"—"}),
73
- /* @__PURE__ */L("td",{className:"px-3 py-1.5 text-right whitespace-nowrap",children:[
74
- /* @__PURE__ */j("button",{onClick:()=>(async e=>{const t=await de(`${A}/api/trash/restore`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({id:e.id})});if(!t.ok){const e=await t.json().catch(()=>({}));return void u.error(e.error||`Restore failed (${t.status})`)}u.success(`Restored "${e.name}"`),he()})(e),className:"px-1.5 py-0.5 rounded hover:bg-gray-200 text-blue-600 text-[11px]",children:"Restore"}),
75
- /* @__PURE__ */j("button",{onClick:()=>(async e=>{if(!await g({title:"Permanently delete",message:`"${e.name}" will be permanently removed. This can't be undone.`,confirmLabel:"Delete forever",variant:"danger"}))return;const t=await de(`${A}/api/trash/${encodeURIComponent(e.id)}`,{method:"DELETE"});if(!t.ok){const e=await t.json().catch(()=>({}));return void u.error(e.error||`Delete failed (${t.status})`)}he()})(e),className:"px-1.5 py-0.5 rounded hover:bg-red-100 text-red-600 text-[11px] ml-1",children:"Delete forever"})]})]},e.id))})]}):W&&0===F.length?/* @__PURE__ */j("div",{className:"p-6 text-center text-sm text-gray-400",children:"Loading…"}):0===F.length?/* @__PURE__ */L("div",{className:"p-10 text-center text-sm text-gray-400",children:["Empty folder.",!R&&/* @__PURE__ */L(C,{children:[" Drop files here or click ",
76
- /* @__PURE__ */j("span",{className:"font-medium",children:"Upload"}),"."]})]}):/* @__PURE__ */L("table",{className:"w-full text-sm",children:[
77
- /* @__PURE__ */j("thead",{className:"bg-gray-50 text-[11px] uppercase tracking-wide text-gray-500",children:/* @__PURE__ */L("tr",{children:[
78
- /* @__PURE__ */j("th",{className:"text-left font-medium px-3 py-1.5",children:"Name"}),
79
- /* @__PURE__ */j("th",{className:"text-right font-medium px-3 py-1.5 w-24",children:"Size"}),
80
- /* @__PURE__ */j("th",{className:"text-right font-medium px-3 py-1.5 w-40",children:"Modified"}),
81
- /* @__PURE__ */j("th",{className:"w-32"})]})}),
82
- /* @__PURE__ */j("tbody",{children:F.map(t=>/* @__PURE__ */L("tr",{onClick:()=>O(t.name),onDoubleClick:()=>{"folder"===t.kind?P(D(B,t.name)):(async t=>{if(R)return;const r=D(B,t.name),a=(t.name.split(".").pop()||"").toLowerCase(),n=M[a];n?await e({filePath:r,filename:t.name,kind:n,onStaged:e=>oe(e)}):pe(t)})(t)},className:"cursor-default border-b border-gray-100 "+(I===t.name?"bg-blue-50":"hover:bg-gray-50"),children:[
83
- /* @__PURE__ */L("td",{className:"px-3 py-1.5 flex items-center gap-2",children:["folder"===t.kind?/* @__PURE__ */j("svg",{className:"h-4 w-4 text-amber-500 shrink-0",fill:"currentColor",viewBox:"0 0 24 24",children:/* @__PURE__ */j("path",{d:"M2.25 7.125A2.25 2.25 0 014.5 4.875h4.504c.61 0 1.193.243 1.624.673l1.494 1.494a.75.75 0 00.53.22h7.098A2.25 2.25 0 0122 9.51v8.366A2.25 2.25 0 0119.75 20.125H4.25A2.25 2.25 0 012 17.875V7.125z"})}):/* @__PURE__ */j("svg",{className:"h-4 w-4 text-gray-400 shrink-0",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:/* @__PURE__ */j("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19.5 14.25v-2.625a3.375 3.375 0 00-3.375-3.375h-1.5A1.125 1.125 0 0113.5 7.125v-1.5a3.375 3.375 0 00-3.375-3.375H8.25m2.25 0H5.625c-.621 0-1.125.504-1.125 1.125v17.25c0 .621.504 1.125 1.125 1.125h12.75c.621 0 1.125-.504 1.125-1.125V11.25a9 9 0 00-9-9z"})}),
84
- /* @__PURE__ */j("span",{className:"truncate",title:t.name,children:t.name})]}),
85
- /* @__PURE__ */j("td",{className:"px-3 py-1.5 text-right tabular-nums text-gray-500",children:"folder"===t.kind?"—":T(t.size)}),
86
- /* @__PURE__ */j("td",{className:"px-3 py-1.5 text-right text-gray-500 tabular-nums",children:E(t.modifiedAt)}),
87
- /* @__PURE__ */j("td",{className:"px-3 py-1.5 text-right whitespace-nowrap",children:!R&&/* @__PURE__ */L(C,{children:["file"===t.kind&&/* @__PURE__ */j("button",{onClick:e=>{e.stopPropagation(),pe(t)},className:"px-1.5 py-0.5 rounded hover:bg-gray-200 text-gray-500 text-[11px]",children:"Download"}),
88
- /* @__PURE__ */j("button",{onClick:e=>{e.stopPropagation(),(async e=>{const t=await y({title:`Rename ${e.kind}`,defaultValue:e.name,confirmLabel:"Rename"});if(!t||t===e.name)return;if(/[\\/]/.test(t))return void u.error("Names cannot contain slashes");const r=D(B,e.name),a=D(B,t),n=await de(`${A}/api/rename`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({from:r,to:a})});if(!n.ok){const e=await n.json().catch(()=>({}));return void u.error(e.error||`Rename failed (${n.status})`)}me(B)})(t)},className:"px-1.5 py-0.5 rounded hover:bg-gray-200 text-gray-500 text-[11px] ml-1",children:"Rename"}),
89
- /* @__PURE__ */j("button",{onClick:e=>{e.stopPropagation(),(async e=>{if(!await g({title:`Delete ${e.kind}`,message:`"${e.name}"${"folder"===e.kind?" and everything inside":""} will be permanently removed.`,confirmLabel:"Delete",variant:"danger"}))return;const t=D(B,e.name),r=await de(`${A}/api/files?path=${encodeURIComponent(t)}`,{method:"DELETE"});if(!r.ok){const e=await r.json().catch(()=>({}));return void u.error(e.error||`Delete failed (${r.status})`)}me(B)})(t)},className:"px-1.5 py-0.5 rounded hover:bg-red-100 text-red-600 text-[11px] ml-1",children:"Delete"})]})})]},t.name))})]})})]})})}),Z&&/* @__PURE__ */j("div",{className:"absolute inset-0 bg-blue-500/15 border-4 border-dashed border-blue-500 pointer-events-none flex items-center justify-center z-20",children:/* @__PURE__ */j("div",{className:"px-4 py-2 rounded-md bg-blue-600 text-white text-sm font-medium shadow-lg",children:"Drop to upload"})})]})}export{A as default};
@@ -1,25 +0,0 @@
1
- import{getNumberingConfigs as e}from"./chunk-KAESEFKM.js";import{SidebarLayout as t}from"./chunk-KASHUEJV.js";import{AboutApp as r}from"./chunk-5DVD4E4P.js";import{toast_default as n}from"./chunk-B2TBCVHH.js";import"./chunk-O5BOGWO3.js";import{useWindowManager as o,client_default as i}from"./chunk-XC64WV33.js";import{useShellPrefs as l}from"./chunk-T6MKFQRH.js";import"./chunk-6UXY7MPY.js";import"./chunk-PH3PRIFP.js";import"./chunk-PDTZTADH.js";import"./chunk-J7LKJIZC.js";import"./chunk-OSJ3ADF2.js";import"./chunk-MAIHBBWT.js";import"./chunk-VVI77XNV.js";import"./chunk-D65T4H6J.js";import{useRef as s,useEffect as a,useState as c,useCallback as d}from"react";import{useQuery as p}from"@tanstack/react-query";import{jsxs as u,Fragment as h,jsx as m}from"react/jsx-runtime";var g=[{key:"yellow",bg:"bg-yellow-100",border:"border-yellow-300",text:"text-yellow-900",dot:"bg-yellow-400"},{key:"blue",bg:"bg-blue-100",border:"border-blue-300",text:"text-blue-900",dot:"bg-blue-400"},{key:"green",bg:"bg-green-100",border:"border-green-300",text:"text-green-900",dot:"bg-green-400"},{key:"pink",bg:"bg-pink-100",border:"border-pink-300",text:"text-pink-900",dot:"bg-pink-400"},{key:"purple",bg:"bg-purple-100",border:"border-purple-300",text:"text-purple-900",dot:"bg-purple-400"},{key:"orange",bg:"bg-orange-100",border:"border-orange-300",text:"text-orange-900",dot:"bg-orange-400"},{key:"white",bg:"bg-white",border:"border-gray-300",text:"text-gray-900",dot:"bg-gray-300"}];var x={sales_order:{entityType:"order",endpoint:"/orders/sales-orders/"},purchase_order:{entityType:"purchase_order",endpoint:"/purchase-orders/"},invoice:{entityType:"invoice",endpoint:"/invoicing/invoices/"},vendor_invoice:{entityType:"vendor_invoice",endpoint:"/invoicing/vendor-invoices/"},shipment:{entityType:"shipment",endpoint:"/shipments/delivery-notes/"},receipt:{entityType:"payment",endpoint:"/invoicing/payments/"},vendor_payment:{entityType:"vendor_payment",endpoint:"/invoicing/vendor-payments/"},vendor_price_sheet:{entityType:"vendor_price_sheet",endpoint:"/pricing/manufacturer-price-sheets/"},client_price_sheet:{entityType:"price_sheet",endpoint:"/pricing/price-sheets/"},qc_report:{entityType:"qc_report",endpoint:"/qc-reports/"},warranty_claim:{entityType:"warranty_claim",endpoint:"/warranty-claims/claims/"},vendor_shipment:{entityType:"vendor_shipment",endpoint:"/shipments/goods-receipts/"}},y=/\[([ xX]?)\]/g;function f(){const{openEntity:f}=o(),{prefs:b,save:k}=l(),{data:v}=p({queryKey:["numbering-configs"],queryFn:()=>e(),retry:!1}),w=s({});a(()=>{if(!v)return;const e={};for(const t of v){const r=x[t.entity_type];if(!r)continue;const n=(t.prefix||"").replace("#","").toUpperCase();if(n&&(e[n]={...r,prefix:t.prefix}),t.alt_prefix){const n=t.alt_prefix.replace("#","").toUpperCase();n&&(e[n]={...r,prefix:t.alt_prefix})}}w.current=e},[v]);const N=b.notepad_notes||[],[_,T]=c(null),[j,C]=c(""),[$,L]=c(""),[M,S]=c("yellow"),[B,D]=c(!1),[W,H]=c(!1),V=s(null),O=s(),P=N.find(e=>e.id===_);a(()=>{if(!_&&N.length>0){const e=N[0];T(e.id),C(e.title),L(e.content),S(e.color)}},[N.length]);const X=d(e=>{k({notepad_notes:e})},[k]),I=d(()=>{if(!_||!B)return;const e=N.map(e=>e.id===_?{...e,title:j,content:$,color:M,updated_at:/* @__PURE__ */(new Date).toISOString()}:e);X(e),D(!1)},[_,B,j,$,M,N,X]);a(()=>{if(B)return O.current&&clearTimeout(O.current),O.current=setTimeout(I,800),()=>{O.current&&clearTimeout(O.current)}},[B,I]),a(()=>()=>{B&&I()},[]);const A=e=>{B&&I(),T(e.id),C(e.title),L(e.content),S(e.color),D(!1),H(!1)},E=e=>{const t=Date.now()-new Date(e).getTime(),r=Math.floor(t/6e4);if(r<1)return"just now";if(r<60)return`${r}m ago`;const n=Math.floor(r/60);if(n<24)return`${n}h ago`;return`${Math.floor(n/24)}d ago`},K=e=>{const t=$.slice(0,e),r=$.slice(e).match(/^\[([ xX]?)\]/);if(!r)return;const n="x"===r[1]||"X"===r[1]?"[ ]":"[x]",o=$.slice(e+r[0].length);L(t+n+o),D(!0)},q=async(e,t)=>{const r=w.current[e];if(!r)return;const o=`${e}#${t}`;try{const{data:e}=await i.get(r.endpoint,{params:{search:o,page_size:1}}),t=(e?.results??e??[])[0];t?f(r.entityType,t.id,t,o):n.error(`${o} not found`)}catch{n.error(`Failed to look up ${o}`)}},F="Start writing...\n\nTips:\n [] Type [] for a checkbox, click to toggle\n SO#35001 Type XX#NNNNN to link entities (SO, PO, CI, VI, PL, etc.)",z=/* @__PURE__ */u(h,{children:[
2
- /* @__PURE__ */m("div",{className:"p-2 border-b border-gray-200",children:/* @__PURE__ */u("button",{onClick:()=>{B&&I();const e={id:`note-${Date.now()}-${Math.random().toString(36).slice(2,6)}`,title:"",content:"",color:"yellow",sticky:!1,updated_at:/* @__PURE__ */(new Date).toISOString()},t=[e,...N];X(t),T(e.id),C(""),L(""),S("yellow"),D(!1),H(!0),setTimeout(()=>V.current?.focus(),50)},className:"w-full flex items-center justify-center gap-1.5 rounded-lg bg-blue-600 text-white px-3 py-1.5 text-sm font-medium hover:bg-blue-700 transition-colors",children:[
3
- /* @__PURE__ */m("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:/* @__PURE__ */m("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 4.5v15m7.5-7.5h-15"})}),"New Note"]})}),
4
- /* @__PURE__ */m("div",{className:"flex-1 overflow-y-auto",children:0===N.length?/* @__PURE__ */m("p",{className:"text-sm text-gray-400 text-center py-8 px-4",children:"No notes yet. Create one to get started."}):N.map(e=>{const t=(r=e.color,g.find(e=>e.key===r)||g[0]);var r;/* @__PURE__ */
5
- return u("button",{onClick:()=>A(e),className:"w-full text-left px-3 py-2.5 border-b border-gray-100 transition-colors "+(_===e.id?"bg-blue-50":"hover:bg-gray-50"),children:[
6
- /* @__PURE__ */u("div",{className:"flex items-center gap-2",children:[
7
- /* @__PURE__ */m("div",{className:`w-2.5 h-2.5 rounded-full shrink-0 ${t.dot}`}),
8
- /* @__PURE__ */m("span",{className:"text-sm font-medium text-gray-900 truncate flex-1",children:e.title||"Untitled"}),e.sticky&&/* @__PURE__ */m("svg",{className:"h-3 w-3 text-amber-500 shrink-0",fill:"currentColor",viewBox:"0 0 24 24",children:/* @__PURE__ */m("path",{d:"M5 5a2 2 0 012-2h10a2 2 0 012 2v16l-7-3.5L5 21V5z"})})]}),
9
- /* @__PURE__ */m("p",{className:"text-xs text-gray-400 mt-0.5 truncate ml-4.5",children:e.content.replace(/\[[ xX]?\]/g,"").slice(0,60)||"Empty note"}),
10
- /* @__PURE__ */m("p",{className:"text-[10px] text-gray-300 mt-0.5 ml-4.5",children:E(e.updated_at)})]},e.id)})})]});/* @__PURE__ */
11
- return u("div",{className:"h-full",children:[
12
- /* @__PURE__ */m(r,{app:"notepad"}),
13
- /* @__PURE__ */m(t,{sidebar:z,storageKey:"notepad.sidebarWidth",defaultWidth:224,minWidth:180,maxWidth:360,children:_?/* @__PURE__ */u("div",{className:"flex-1 flex flex-col min-w-0",children:[
14
- /* @__PURE__ */u("div",{className:"flex items-center gap-2 px-4 py-2 border-b border-gray-200",children:[
15
- /* @__PURE__ */m("input",{value:j,onChange:e=>{C(e.target.value),D(!0)},placeholder:"Note title...",className:"flex-1 text-lg font-semibold text-gray-900 outline-none bg-transparent placeholder:text-gray-300"}),
16
- /* @__PURE__ */m("div",{className:"flex gap-1",children:g.map(e=>/* @__PURE__ */m("button",{onClick:()=>{S(e.key),D(!0)},className:`w-5 h-5 rounded-full border-2 transition-all ${e.dot} ${M===e.key?"border-gray-600 scale-110":"border-transparent hover:border-gray-400"}`,title:e.key},e.key))}),
17
- /* @__PURE__ */m("button",{onClick:()=>(e=>{const t=N.map(t=>t.id===e?{...t,sticky:!t.sticky}:t);X(t);const r=t.find(t=>t.id===e);n.success(r?.sticky?"Pinned to desktop":"Removed from desktop")})(_),title:P?.sticky?"Remove from desktop":"Pin to desktop",className:"p-1 rounded transition-colors "+(P?.sticky?"text-amber-500 hover:text-amber-600":"text-gray-300 hover:text-amber-400"),children:/* @__PURE__ */m("svg",{className:"h-4 w-4",fill:P?.sticky?"currentColor":"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:/* @__PURE__ */m("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5 5a2 2 0 012-2h10a2 2 0 012 2v16l-7-3.5L5 21V5z"})})}),
18
- /* @__PURE__ */m("button",{onClick:()=>(e=>{const t=N.filter(t=>t.id!==e);if(X(t),_===e){const e=t[0];e?A(e):(T(null),C(""),L(""))}})(_),title:"Delete note",className:"p-1 rounded text-gray-300 hover:text-red-500 transition-colors",children:/* @__PURE__ */m("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:/* @__PURE__ */m("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M14.74 9l-.346 9m-4.788 0L9.26 9m9.968-3.21c.342.052.682.107 1.022.166m-1.022-.165L18.16 19.673a2.25 2.25 0 01-2.244 2.077H8.084a2.25 2.25 0 01-2.244-2.077L4.772 5.79m14.456 0a48.108 48.108 0 00-3.478-.397m-12 .562c.34-.059.68-.114 1.022-.165m0 0a48.11 48.11 0 013.478-.397m7.5 0v-.916c0-1.18-.91-2.164-2.09-2.201a51.964 51.964 0 00-3.32 0c-1.18.037-2.09 1.022-2.09 2.201v.916m7.5 0a48.667 48.667 0 00-7.5 0"})})})]}),W?/* @__PURE__ */m("textarea",{ref:V,value:$,onChange:e=>{L(e.target.value),D(!0)},onBlur:()=>{H(!1),B&&I()},placeholder:F,className:"flex-1 p-4 text-sm text-gray-700 outline-none resize-none bg-transparent leading-relaxed placeholder:text-gray-300 font-mono"}):/* @__PURE__ */m("div",{onClick:()=>{H(!0),setTimeout(()=>V.current?.focus(),50)},className:"flex-1 p-4 text-sm text-gray-700 overflow-y-auto leading-relaxed cursor-text",children:$?(e=>{if(!e)return[];const t=e.split("\n");return t.map((e,r)=>{const n=[];let o=0;const i=[],l=/([A-Z]{2,4})#(\d{4,6})/g;let s;for(;null!==(s=l.exec(e));){const e=s[1],t=s[2];if(w.current[e]){const n=s.index,o=s[0];i.push({idx:n,len:o.length,render:()=>/* @__PURE__ */m("button",{onClick:()=>q(e,t),className:"text-blue-600 hover:text-blue-800 hover:underline font-medium cursor-pointer",children:o},`ref-${r}-${n}`)})}}y.lastIndex=0;let a=0;for(let e=0;e<r;e++)a+=t[e].length+1;for(;null!==(s=y.exec(e));){const e="x"===s[1]||"X"===s[1],t=s.index,n=a+t;i.push({idx:t,len:s[0].length,render:()=>/* @__PURE__ */m("button",{onClick:()=>K(n),className:`inline-flex items-center justify-center w-4 h-4 rounded border ${e?"bg-blue-500 border-blue-500 text-white":"border-gray-400 bg-white hover:border-blue-400"} cursor-pointer align-text-bottom mr-0.5`,children:e&&/* @__PURE__ */m("svg",{className:"w-3 h-3",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:3,children:/* @__PURE__ */m("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4.5 12.75l6 6 9-13.5"})})},`cb-${r}-${t}`)})}i.sort((e,t)=>e.idx-t.idx);for(const t of i)t.idx>o&&n.push(/* @__PURE__ */m("span",{children:e.slice(o,t.idx)},`t-${r}-${o}`)),n.push(t.render()),o=t.idx+t.len;o<e.length&&n.push(/* @__PURE__ */m("span",{children:e.slice(o)},`t-${r}-${o}`)),0===n.length&&n.push(/* @__PURE__ */m("span",{children:"​"},`empty-${r}`));const c=/^\[x\]/i.test(e.trimStart());/* @__PURE__ */
19
- return m("div",{className:c?"line-through text-gray-400":"",children:n},r)})})($):/* @__PURE__ */m("p",{className:"text-gray-300 whitespace-pre-line",children:F})}),
20
- /* @__PURE__ */u("div",{className:"px-4 py-1.5 border-t border-gray-100 flex items-center gap-4 text-[10px] text-gray-400",children:[
21
- /* @__PURE__ */m("span",{children:"[] checkbox"}),
22
- /* @__PURE__ */m("span",{children:"SO#35001 entity link"}),
23
- /* @__PURE__ */m("span",{className:"ml-auto",children:W?"Editing":"Click to edit"})]})]}):/* @__PURE__ */m("div",{className:"flex-1 flex items-center justify-center",children:/* @__PURE__ */u("div",{className:"text-center text-gray-400",children:[
24
- /* @__PURE__ */m("svg",{className:"h-12 w-12 mx-auto mb-3 text-gray-300",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1,children:/* @__PURE__ */m("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19.5 14.25v-2.625a3.375 3.375 0 00-3.375-3.375h-1.5A1.125 1.125 0 0113.5 7.125v-1.5a3.375 3.375 0 00-3.375-3.375H8.25m2.25 0H5.625c-.621 0-1.125.504-1.125 1.125v17.25c0 .621.504 1.125 1.125 1.125h12.75c.621 0 1.125-.504 1.125-1.125V11.25a9 9 0 00-9-9z"})}),
25
- /* @__PURE__ */m("p",{className:"text-sm",children:"Select a note or create a new one"})]})})})]})}export{f as default};