efficient-shell 4.157.0 → 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.
- package/README.md +29 -4
- package/dist/{Browser-PP7VID3N.js → Browser-OQCHLKM3.js} +12 -12
- package/dist/{Calculator-5DF4PSEG.js → Calculator-YBL65JNM.js} +22 -22
- package/dist/{CurrencyConverter-BEI6UUDD.js → CurrencyConverter-6VFY4GF6.js} +7 -7
- package/dist/{Documents-CP2XWF7D.js → Documents-IPXRU4CT.js} +12 -12
- package/dist/Files-3MGL4ZT7.js +89 -0
- package/dist/Notepad-RJ2DYW2O.js +25 -0
- package/dist/{PomodoroTimer-3BDFGHC6.js → PomodoroTimer-6OQ33FY3.js} +26 -26
- package/dist/{Preview-5ANRQG57.js → Preview-3WRPZWDU.js} +13 -13
- package/dist/{Sidebar-H6R3AK5G.js → Sidebar-FUPFF7BT.js} +23 -23
- package/dist/{Spreadsheet-SRQT2MJP.js → Spreadsheet-6NK53IZV.js} +13 -13
- package/dist/{Stock-PEZB3WXV.js → Stock-ZFLDG6TT.js} +3 -3
- package/dist/{Weather-6EJFJQIX.js → Weather-BBPTXGQA.js} +17 -17
- package/dist/{WorldClock-5BMGEL2A.js → WorldClock-CQGQ2Y6N.js} +6 -6
- package/dist/apps/index.js +1 -1
- package/dist/brand.css +1 -1
- package/dist/{chunk-ELCH5NDO.js → chunk-CK245P3T.js} +4 -4
- package/dist/{chunk-XC64WV33.js → chunk-DLD4AKVT.js} +36 -36
- package/dist/{chunk-ZHPA74NY.js → chunk-EI4WZOP3.js} +1 -1
- package/dist/chunk-J7AAGG7P.js +942 -0
- package/dist/chunk-L4KRS7N3.js +1 -0
- package/dist/{chunk-DRN636EP.js → chunk-M4AKWGQM.js} +1 -1
- package/dist/chunk-S2AZZGFF.js +1 -0
- package/dist/chunk-VNEH2Y6H.js +9 -0
- package/dist/{chunk-LGDG4YMF.js → chunk-VRW5JNMR.js} +6 -6
- package/dist/{chunk-KAESEFKM.js → chunk-Z3LPT4HB.js} +1 -1
- package/dist/format/index.d.ts +1 -0
- package/dist/format/index.js +1 -0
- package/dist/{index-Cap9oGrA.d.ts → index-D0K5U1Pb.d.ts} +41 -41
- package/dist/index-DCUzlKPZ.d.ts +194 -0
- package/dist/index.d.ts +3 -2
- package/dist/index.js +645 -645
- package/dist/page-tabs/index.js +5 -5
- package/dist/ui/index.d.ts +2 -1
- package/dist/ui/index.js +1 -1
- package/dist/ui.css +7 -0
- package/package.json +6 -1
- package/dist/Files-ZSAHZBB5.js +0 -89
- package/dist/Notepad-AUHWLOXO.js +0 -25
- package/dist/chunk-ARMUS5GB.js +0 -1
- package/dist/chunk-J7LKJIZC.js +0 -9
- package/dist/chunk-WWRFM2YF.js +0 -940
package/dist/page-tabs/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import{TabStrip as e}from"../chunk-
|
|
3
|
-
return m(h.Provider,{value:_,children:e})}var
|
|
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(
|
|
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(
|
|
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
|
|
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};
|
package/dist/ui/index.d.ts
CHANGED
|
@@ -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 SidebarGroupLabelProps, f1 as SidebarLayout, f2 as SidebarLayoutProps, f3 as SidebarNavGroup, f4 as SidebarNavGroupProps, f5 as SidebarNavItem, f6 as SidebarNavItemProps, f7 as Skeleton, f8 as SkeletonProps, f9 as SkeletonVariant, fa as Snippet, fb as SnippetProps, fc as SnippetSize, fd as SnippetVariant, a as SortState, fe as Sparkline, ff as SparklineProps, fg as Stack, fh as StackProps, fi as StaleChunkReloadOptions, fj as StatCard, fk as StatCardProps, fl as StatTile, fm as StatTileProps, fn as Statistic, fo as StatisticProps, fp as StatisticSize, fq as StatisticTone, fr as StatusBadge, fs as StatusBadgeProvider, ft as StatusEmphasis, fu as StepItem, fv as Stepper, fw as StepperProps, fx as StrokeVariant, fy as SunburstChart, fz as SunburstChartProps, fA as SunburstNode, fB as Switch, fC as SwitchProps, fD as SwitchSize, fE as TabItem, fF as Tabs, fG as TabsProps, fH as TagInput, fI as TagInputOption, fJ as TagInputProps, fK as Text, fL as TextProps, fM as TextSize, fN as TextTone, fO as TextWeight, fP as Textarea, fQ as TextareaProps, fR as Theme, fS as TileButton, fT as TileButtonProps, fU as TileSize, fV as TimePicker, fW as TimePickerProps, fX as TimeSeriesChart, fY as TimeSeriesChartProps, fZ as TimeSeriesSeries, f_ as TimelineMarker, f$ as TimelineMarkerKind, g0 as TimelineReport, g1 as TimelineScrubProgress, g2 as TimelineTrack, g3 as TimelineTrackItem, g4 as TimelineTrackKind, g5 as TimelineTrackPending, g6 as TimelineTrackPhase, g7 as TimelineTrackPlayback, g8 as TimelineTrackProps, g9 as TimelineTrackThumb, ga as Title, gb as TitleLevel, gc as TitleProps, gd as ToastOptions, ge as ToastPlacement, gf as Tooltip, gg as TooltipProps, gh as TopNav, gi as TopNavItem, gj as TopNavProps, gk as TreemapChart, gl as TreemapChartProps, gm as TreemapItem, gn as TreemapTile, go as UseAppUpdateOptions, gp as UseProductionTimelineOpts, gq as VERSION, gr as VITE_PRELOAD_ERROR_EVENT, gs as WaterfallChart, gt as WaterfallChartProps, gu as WaterfallStep, gv as ZLayer, gw as Z_LAYERS, gx as angleScale, gy as appendKey, gz as applyThemePrefs, gA as arcPath, gB as areaBetween, gC as areaFrom, gD as autoHighlightIndex, gE as backspace, gF as bandScale, gG as binValues, gH as budgetState, gI as bumpPath, gJ as buttonClasses, gK as calcOverall, gL as calcReportOverall, gM as confirm, gN as confirmDestructive, gO as curvePath, gP as dashFor, gQ as dismissPopups, gR as fillFor, gS as fillId, gT as firstDayOfWeek, gU as fmtSliderDate, gV as formatDate, gW as fromDateKey, gX as glassStyle, gY as glowId, gZ as groundId, g_ as groupColors, g$ as highlightOpacity, h0 as iconButtonClasses, h1 as inputClasses, h2 as installStaleChunkReload, h3 as isMac, h4 as isSeverityTone, h5 as isStaleChunkError, h6 as labelClasses, h7 as ladderScale, h8 as linearPath, h9 as linearScale, ha as logScale, hb as maskId, hc as mediaFileName, hd as monotonePath, he as niceMax, hf as openGlobalSearch, hg as polygonPoints, hh as popupBounds, hi as prompt, hj as radiusScale, hk as resolveBrandMarkTreatment, hl as resolvePortalBrandAsset, hm as resolveSeriesColor, hn as resolveTheme, ho as seriesColor, hp as severityOf, hq as splinePath, hr as squarify, hs as stagger, ht as stepPath, hu as tabButtonId, hv as tabPanelId, hw as toDateKey, hx as toDayMs, hy as toISODate, hz as toast, hA as useAppUpdate, hB as useClickOutside, hC as useConfirm, hD as useDropdownPosition, hE as useFocusTrap, hF as useHighlight, hG as useIsMobile, hH as useLocalStoragePrefs, hI as usePlotWidth, hJ as usePortalBranding, hK as useProductionTimeline, hL as useScrollLock, hM as useShellLocale, hN as useShellPrefs, hO as useShellStrings, hP as useTheme } from '../index-Cap9oGrA.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,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,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,
|
|
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.
|
|
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",
|
package/dist/Files-ZSAHZBB5.js
DELETED
|
@@ -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-ZHPA74NY.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-ARMUS5GB.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 A(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 E(){const E=$.replace(/\/$/,""),R=null!==a(),[B,P]=b("/"),[F,H]=b([]),[S,V]=b([]),[I,W]=b(null),[O,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(`${E}/api/quota`);if(e.ok){const t=await e.json();_({used:t.used,limit:t.limit})}}catch{}},[de,E]),me=N(async e=>{if(W(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 H(t),P(e),J(!1),U(!1),void("/"===e&&V(t.filter(e=>"folder"===e.kind).map(e=>e.name)))}U(!0);try{const t=await de(`${E}/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||[];H(a),P(r.path||e),J(!1),"/"===(r.path||e)&&V(a.filter(e=>"folder"===e.kind).map(e=>e.name))}catch(e){J(!0)}finally{U(!1)}ce()},[de,E,ce,R]),he=N(async()=>{if(R)return q([]),void U(!1);U(!0),W(null);try{const e=await de(`${E}/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,E,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(`${E}/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(`${E}/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:E}),". 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"]}),S.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(`${E}/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(`${E}/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:()=>W(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?O&&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?A(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(`${E}/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(`${E}/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))})]}):O&&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:()=>W(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:A(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(`${E}/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(`${E}/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{E as default};
|
package/dist/Notepad-AUHWLOXO.js
DELETED
|
@@ -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-ZHPA74NY.js";import{toast_default as n}from"./chunk-B2TBCVHH.js";import"./chunk-ARMUS5GB.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,H]=c(!1),[W,D]=c(!1),P=s(null),V=s(),X=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 A=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);A(e),H(!1)},[_,B,j,$,M,N,A]);a(()=>{if(B)return V.current&&clearTimeout(V.current),V.current=setTimeout(I,800),()=>{V.current&&clearTimeout(V.current)}},[B,I]),a(()=>()=>{B&&I()},[]);const K=e=>{B&&I(),T(e.id),C(e.title),L(e.content),S(e.color),H(!1),D(!1)},O=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`},q=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),H(!0)},E=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.)",U=/* @__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];A(t),T(e.id),C(""),L(""),S("yellow"),H(!1),D(!0),setTimeout(()=>P.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:()=>K(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:O(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:U,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),H(!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),H(!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);A(t);const r=t.find(t=>t.id===e);n.success(r?.sticky?"Pinned to desktop":"Removed from desktop")})(_),title:X?.sticky?"Remove from desktop":"Pin to desktop",className:"p-1 rounded transition-colors "+(X?.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:X?.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(A(t),_===e){const e=t[0];e?K(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:P,value:$,onChange:e=>{L(e.target.value),H(!0)},onBlur:()=>{D(!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:()=>{D(!0),setTimeout(()=>P.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:()=>E(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:()=>q(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};
|
package/dist/chunk-ARMUS5GB.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var r="4.157.0",a=r;export{a as APP_VERSION,r as VERSION};
|
package/dist/chunk-J7LKJIZC.js
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import{onOverlayOpen as e,Z_LAYERS as t,registerModalEscapeInterceptor as n}from"./chunk-OSJ3ADF2.js";import{rootIsDark as r}from"./chunk-MAIHBBWT.js";import{useHydrated as o,useBrowserLayoutEffect as i}from"./chunk-D65T4H6J.js";import{createContext as a,forwardRef as l,useContext as s,useRef as u,useId as c,useState as d,useEffect as p,useMemo as m,useCallback as f}from"react";import{createPortal as h}from"react-dom";import{jsx as g,jsxs as y,Fragment as x}from"react/jsx-runtime";function b(){try{const e=getComputedStyle(document.documentElement).getPropertyValue("--menu-opacity")?.trim();if(e)return parseFloat(e)}catch{}return.95}var w=r;function v(){try{return document.documentElement.classList.contains("rosh-reduce-transparency")}catch{return!1}}function k(e,t){return`color-mix(in srgb, ${e} ${+(Math.round(255*Math.min(1,Math.max(0,t)))/255*100).toFixed(4)}%, transparent)`}function C(e){const t=e??b();if(v())return{background:"var(--rosh-glass-surface)",border:"1px solid var(--rosh-glass-solid-border)",boxShadow:"var(--rosh-glass-solid-shadow)"};const n="var(--rosh-glass-surface)",r="var(--rosh-glass-surface-mid)";return w()?{background:`linear-gradient(135deg in srgb, ${k(n,.85*t)} 0%, ${k(r,.75*t)} 50%, ${k(n,.85*t)} 100%)`,backdropFilter:"blur(40px) saturate(1.6)",WebkitBackdropFilter:"blur(40px) saturate(1.6)",border:"1px solid var(--rosh-glass-border)",boxShadow:"var(--rosh-glass-shadow)"}:{background:`linear-gradient(135deg in srgb, ${k(n,.85*t)} 0%, ${k(r,.65*t)} 50%, ${k(n,.75*t)} 100%)`,backdropFilter:"blur(40px) saturate(1.8)",WebkitBackdropFilter:"blur(40px) saturate(1.8)",border:"1px solid var(--rosh-glass-border)",boxShadow:"var(--rosh-glass-shadow)"}}function $(e){return v()?"var(--rosh-glass-surface)":k("var(--rosh-glass-surface)",.85*(e??b()))}var M="border-white/20",N="glass-input-bg",L=/* @__PURE__ */new Set(["text","search","url","tel","email","password","number","date","datetime-local","month","week","time"]),B="data-native-context-menu";function E(e,t){return e&&"function"==typeof e.closest?e.closest(t):null}function T(e){const t=e;if(!t||"function"!=typeof t.closest)return!1;if(E(t,`[${B}]`))return!0;if(E(t,"textarea"))return!0;if(E(t,"img, picture, canvas, video, audio"))return!0;const n=E(t,"input");if(n){const e=(n.type||"text").toLowerCase();if(L.has(e))return!0}const r=E(t,"[contenteditable]");if(r){const e=(r.getAttribute("contenteditable")||"").toLowerCase();if(""===e||"true"===e||"plaintext-only"===e)return!0}return!1}var W=/* @__PURE__ */new Set(["http:","https:","mailto:","tel:","blob:"]);function A(e,t,n){const r=E(e,"a[href]"),o=(t||"").trim(),i=function(e,t){if(e&&"#"!==e)try{const n=new URL(e,t??("undefined"!=typeof document?document.baseURI:void 0));return W.has(n.protocol)?n.href:void 0}catch{return}}(r?.getAttribute("href"),n);return{kind:o?"selection":i?"link":"default",...o?{selectionText:o}:{},...i?{linkUrl:i}:{}}}function F(e,t,n){return e.length===t+1&&e[t].key===n.key?e:[...e.slice(0,t),n]}function S(e,t){const n=Math.max(0,t);return e.length>n?e.slice(0,n):e}function R(e,t,n){if(0===t.length||0===e.length)return[];const r=[e];for(let e=1;e<t.length;e++){const o=r[e-1].find(n=>n.to===t[e].key),i=o?n(o):[];if(0===i.length)break;r.push(i)}return r}function D(e,t,n,r){const o=Math.max(0,r-n),i=Math.min(t,o),a=e-i/2;return a<n?n:a+i>r?Math.max(n,r-i):a}function H(e,t,n,r,o,i=!1,a=8){const l=t+o,s=e-o-n,u=s>=a;return i&&u?{left:s,flipped:!0}:l+n<=r-a?{left:l,flipped:!1}:u?{left:s,flipped:!0}:i?{left:a,flipped:!0}:{left:Math.max(a,r-a-n),flipped:!1}}function P(){try{return getComputedStyle(document.documentElement).getPropertyValue("--menu-density")?.trim()||"normal"}catch{return"normal"}}var I=a(null);function j({children:n,style:r,className:i="",onClose:a,minWidth:l=180,portal:s=!1}){const f=u(null),y=c(),[x,b]=d([]),w=u();p(()=>()=>clearTimeout(w.current),[]);const v=o(),k=m(()=>{const e=()=>clearTimeout(w.current);return{id:y,depth:0,path:x,open:(t,n)=>{e(),b(e=>F(e,t,n))},scheduleClose:t=>{e(),w.current=setTimeout(()=>b(e=>S(e,t)),200)},closeBelow:t=>{e(),b(e=>S(e,t))},cancelClose:e,closeTree:()=>{e(),b([]),a?.()},root:f}},[y,x,a]);p(()=>{if(!a)return;const t=e=>{e.target.closest("[data-menu-toggle]")||e.target.closest?.(`[data-popup-menu-tree="${y}"]`)||f.current&&!f.current.contains(e.target)&&a()},n=e=>{"Escape"===e.key&&a()};window.addEventListener("pointerdown",t),window.addEventListener("keydown",n);const r=e(a);return()=>{window.removeEventListener("pointerdown",t),window.removeEventListener("keydown",n),r()}},[a,y]),p(()=>{const e=f.current;e&&requestAnimationFrame(()=>{const t=e.getBoundingClientRect();if(t.right>window.innerWidth-8){const n=t.right-window.innerWidth+8;e.style.left?e.style.left=parseFloat(e.style.left)-n+"px":e.style.right||(e.style.left=t.left-n+"px")}if(t.left<8&&(e.style.left?e.style.left="8px":e.style.right&&(e.style.right=window.innerWidth-t.width-8+"px")),t.bottom>window.innerHeight-8){const n=t.bottom-window.innerHeight+8;e.style.top?e.style.top=parseFloat(e.style.top)-n+"px":e.style.bottom?e.style.bottom="8px":e.style.top=t.top-n+"px"}t.top<8&&(e.style.top?e.style.top="8px":e.style.bottom&&(e.style.bottom=window.innerHeight-t.height-8+"px"))})});const $=P(),M=/(^|[\s:])!?z-/.test(i),N=/* @__PURE__ */g("div",{ref:f,"data-popup-menu-tree":y,className:`fixed rounded-2xl ${"tight"===$?"py-1":"large"===$?"py-2":"py-1.5"} ${i}`,onContextMenu:e=>{T(e.target)||e.preventDefault()},style:{...M?{}:{zIndex:t.menu},minWidth:l,animation:"popup-in 0.12s ease-out",...C(),...r},children:/* @__PURE__ */g(I.Provider,{value:k,children:n})});return s?v?h(N,document.body):null:N}function z(e,t,n,r=!1){const o=P(),i="tight"===o?"0.25rem":"large"===o?"0.6rem":"max(0.25rem, calc(var(--menu-padding-y, 0.5rem) - 0.1rem))";return{className:`w-full flex items-center gap-2 text-left transition-colors rounded-lg mx-auto\n ${e?"text-red-600 hover:bg-red-50":r?"bg-blue-50 text-blue-700":"text-gray-700 hover:bg-blue-50 hover:text-blue-700"}\n ${t?"opacity-40 cursor-not-allowed":""}\n ${n}`,style:{width:"calc(100% - 8px)",marginLeft:4,marginRight:4,fontSize:"var(--menu-font-size, 14px)",paddingLeft:"var(--menu-padding-x, 1rem)",paddingRight:"var(--menu-padding-x, 1rem)",paddingTop:i,paddingBottom:i}}}var q=l(function({onClick:e,children:t,className:n="",danger:r,disabled:o,role:i,tabIndex:a,id:l,onMouseEnter:u},c){const d=s(I),p=z(r,o,n);/* @__PURE__ */
|
|
2
|
-
return g("button",{ref:c,id:l,role:i,tabIndex:a,onClick:()=>{e?.(),d&&d.depth>0&&d.closeTree()},onMouseEnter:()=>{d?.scheduleClose(d.depth),u?.()},disabled:o,className:p.className,style:p.style,children:t})}),U=/* @__PURE__ */g("svg",{"aria-hidden":!0,className:"h-3.5 w-3.5 shrink-0 ml-auto text-gray-500",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:/* @__PURE__ */g("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M8.25 4.5l7.5 7.5-7.5 7.5"})});function J(e){let n=t.menu;for(let t=e;t&&t!==document.body;t=t.parentElement){const e=parseInt(getComputedStyle(t).zIndex,10);Number.isNaN(e)||(n=e)}return n}function K(e){return e?[...e.querySelectorAll("button:not([disabled])")].filter(t=>t.closest("[data-popup-submenu-panel]")===e):[]}function O({label:e,icon:t,children:r,disabled:o,className:a="",minWidth:l=180,maxHeight:d}){const b=s(I),w=c(),v=u(null),k=u(null),$=u(),M=u(!1),N=`${w}-menu`;p(()=>()=>clearTimeout($.current),[]);const L=b?.depth??0,B=b?.path[L],E=!!B&&B.key===w&&!o,W=f(e=>{if(!b||o||!v.current)return;clearTimeout($.current),M.current=e;const t=v.current.getBoundingClientRect(),n=v.current.closest("[data-popup-submenu-panel]")??v.current.closest("[data-popup-menu-tree]"),r=n?.getBoundingClientRect()??t,i=L>0&&(b.path[L-1]?.flipped??!1),a=H(r.left,r.right,l,window.innerWidth,4,i);b.open(L,{key:w,y:t.top,...a})},[b,o,L,w,l]),A=e=>{b?.closeBelow(L),v.current?.focus()};p(()=>{if(E)return n(e=>"Escape"===e.key&&(!(b&&b.path.length>L+1)&&(A(),!0)))}),i(()=>{if(!E||!B)return;const e=()=>{const e=k.current;if(!e||!v.current)return;const t=v.current.closest("[data-popup-submenu-panel]")??v.current.closest("[data-popup-menu-tree]"),n=t?.getBoundingClientRect()??v.current.getBoundingClientRect(),r=L>0&&(b?.path[L-1]?.flipped??!1),o=e.offsetWidth||l,i=H(n.left,n.right,o,window.innerWidth,4,r,8),a=e.offsetHeight,s=D(v.current.getBoundingClientRect().top+a/2,a,8,window.innerHeight-8);e.style.left=`${i.left}px`,e.style.top=`${s}px`,e.dataset.flipped=String(i.flipped)};e();let t=0;const n=requestAnimationFrame(()=>{t=requestAnimationFrame(e)});return()=>{cancelAnimationFrame(n),cancelAnimationFrame(t)}}),p(()=>{E&&M.current&&(M.current=!1,K(k.current)[0]?.focus())},[E]);const F=m(()=>b&&{...b,depth:L+1},[b,L]);if(!b)throw new Error("PopupSubmenu must be rendered inside a PopupMenu");const S=z(!1,o,a,E),R=P();/* @__PURE__ */
|
|
3
|
-
return y(x,{children:[
|
|
4
|
-
/* @__PURE__ */y("button",{ref:v,type:"button",role:"menuitem","aria-haspopup":"menu","aria-expanded":E,"aria-controls":E?N:void 0,disabled:o,"data-popup-submenu-row":!0,className:S.className,style:S.style,onClick:e=>{const t=0===e.detail;E?t&&K(k.current)[0]?.focus():W(t)},onKeyDown:e=>{"ArrowRight"===e.key&&(e.preventDefault(),e.stopPropagation(),W(!0))},onMouseEnter:()=>{o||(b.cancelClose(),E?b.closeBelow(L+1):(clearTimeout($.current),$.current=setTimeout(()=>W(!1),120)))},onMouseLeave:()=>{clearTimeout($.current),b.scheduleClose(L)},children:[t,
|
|
5
|
-
/* @__PURE__ */g("span",{className:"min-w-0 flex-1 truncate",children:e}),U]}),E&&h(
|
|
6
|
-
/* @__PURE__ */g("div",{ref:k,id:N,role:"menu","data-popup-menu-tree":b.id,"data-popup-submenu-panel":!0,className:"fixed rounded-2xl overflow-x-hidden overflow-y-auto overscroll-contain "+("tight"===R?"py-1":"large"===R?"py-2":"py-1.5"),style:{left:B.left,top:B.y,minWidth:l,maxHeight:void 0===d?"calc(100vh - 16px)":`min(${"number"==typeof d?`${d}px`:d}, calc(100vh - 16px))`,zIndex:J(b.root.current)+L+1,animation:(B.flipped?"popup-submenu-in-left":"popup-submenu-in")+" 0.1s ease-out",...C()},onKeyDown:e=>{if(e.target.closest("[data-popup-submenu-panel]")!==e.currentTarget)return;const t=K(k.current),n=t.indexOf(document.activeElement),r=n=>{e.preventDefault(),e.stopPropagation(),t[(n+t.length)%t.length]?.focus()};"ArrowDown"===e.key?r(n+1):"ArrowUp"===e.key?r(n<0?t.length-1:n-1):"Home"===e.key?r(0):"End"===e.key?r(t.length-1):"ArrowLeft"===e.key&&(e.preventDefault(),e.stopPropagation(),A())},onMouseEnter:()=>{b.cancelClose(),clearTimeout($.current)},onMouseLeave:()=>b.scheduleClose(L+1),onContextMenu:e=>{T(e.target)||e.preventDefault()},children:/* @__PURE__ */g(I.Provider,{value:F,children:r})}),document.body)]})}function V(){const e=P();/* @__PURE__ */
|
|
7
|
-
return g("div",{className:`border-t ${M} ${"tight"===e?"my-0.5":"large"===e?"my-1.5":"my-1"} mx-3`})}function G({children:e}){const t=P(),n="tight"===t?"0.125rem":"large"===t?"0.375rem":"0.25rem";/* @__PURE__ */
|
|
8
|
-
return g("div",{className:"text-xs font-medium uppercase tracking-wide",style:{color:"var(--ink-muted)",paddingLeft:"var(--menu-padding-x, 1rem)",paddingRight:"var(--menu-padding-x, 1rem)",paddingTop:n,paddingBottom:n},children:e})}function Q({d:e,className:t="h-4 w-4 text-gray-400"}){/* @__PURE__ */
|
|
9
|
-
return g("svg",{className:t,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:/* @__PURE__ */g("path",{strokeLinecap:"round",strokeLinejoin:"round",d:e})})}export{M as GLASS_DIVIDER,N as GLASS_INPUT_BG,Q as MenuIcon,B as NATIVE_MENU_ATTR,j as PopupMenu,V as PopupMenuDivider,q as PopupMenuItem,G as PopupMenuLabel,O as PopupSubmenu,D as clampMenuTop,S as closeMenuBelow,A as describeContextTarget,$ as glassFill,C as glassStyle,z as itemLook,T as keepsNativeMenu,H as menuPanelLeft,F as openMenuLevel,R as resolveMenuLevels};
|