efficient-shell 13.23.1 → 13.24.1
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/dist/{Browser-I2UVUUVV.js → Browser-P6CXFZWM.js} +14 -14
- package/dist/Calculator-PKAM5ERT.js +29 -0
- package/dist/CurrencyConverter-VH4UVYLO.js +21 -0
- package/dist/{Files-KA5Y6G4P.js → Files-NTJ4WI6F.js} +87 -87
- package/dist/Notepad-GIRH6KIR.js +24 -0
- package/dist/PomodoroTimer-PBSAKRX5.js +91 -0
- package/dist/{Preview-EPATSSFI.js → Preview-A4NPS775.js} +20 -20
- package/dist/{Sidebar-MY66ILZY.js → Sidebar-HAIHWIJD.js} +22 -22
- package/dist/{Stock-SHKXRWJQ.js → Stock-YL732PKW.js} +5 -5
- package/dist/{Weather-WMKWOPBU.js → Weather-3CBRXNNM.js} +18 -18
- package/dist/{WorldClock-GZYOF4B2.js → WorldClock-LONNWCRG.js} +6 -6
- package/dist/ai/index.js +117 -117
- package/dist/apps/index.js +1 -1
- package/dist/bin/browser-check.js +1 -1
- package/dist/bin/media-host-check.js +1 -1
- package/dist/bin/ui-check.js +1 -1
- package/dist/{chunk-GAEQYCLS.js → chunk-26KHYLJN.js} +1 -1
- package/dist/{chunk-T7A3Y64S.js → chunk-2Y4AH7NC.js} +1 -1
- package/dist/{chunk-L4W5X3Q4.js → chunk-3OPPTU4V.js} +2 -2
- package/dist/chunk-44ERJYNW.js +6 -0
- package/dist/{chunk-XYQFTFI7.js → chunk-4VFEPP2W.js} +9 -9
- package/dist/{chunk-ZMBGMEN5.js → chunk-527WMFTR.js} +1 -1
- package/dist/{chunk-P6H2B635.js → chunk-7N6CVTWO.js} +1 -1
- package/dist/{chunk-UR3J4WP6.js → chunk-AAFPAQXH.js} +13 -13
- package/dist/{chunk-TJBHFUWV.js → chunk-B5KX7PDG.js} +2 -2
- package/dist/{chunk-6AETKYCP.js → chunk-BQQEQCSK.js} +1 -1
- package/dist/{chunk-DAUE6ULT.js → chunk-DUEEAP4Y.js} +1 -1
- package/dist/{chunk-CZS5UHOU.js → chunk-EXDSYFHB.js} +1 -1
- package/dist/chunk-FLQXMCB3.js +8 -0
- package/dist/{chunk-2L4IOLOT.js → chunk-HPKQYUQT.js} +1 -1
- package/dist/chunk-I52YJ3QD.js +1 -0
- package/dist/{chunk-NF5HSFZ3.js → chunk-K4KUGKWP.js} +15 -15
- package/dist/chunk-LG6NDTHZ.js +2 -0
- package/dist/{chunk-JVENCUUG.js → chunk-LRMDLZMM.js} +4 -4
- package/dist/{chunk-TJG76Y7I.js → chunk-LUARJHUK.js} +8 -8
- package/dist/chunk-MCLVTQSF.js +16 -0
- package/dist/{chunk-LM6MSGDW.js → chunk-OE7BXD3M.js} +1 -1
- package/dist/{chunk-VT5HWPE2.js → chunk-SRI2D23Y.js} +7 -7
- package/dist/{chunk-TT7KXS2Q.js → chunk-UQV4TSWB.js} +1 -1
- package/dist/{chunk-H2Q7G5D6.js → chunk-VGUB7LPF.js} +28 -28
- package/dist/chunk-VY6OQRZA.js +1 -0
- package/dist/{chunk-7PYJEJDT.js → chunk-XC2GUCTG.js} +1 -1
- package/dist/chunk-ZVNU3WJ3.js +28 -0
- package/dist/data/EntityList.js +1 -1
- package/dist/data/ResizableTable.js +1 -1
- package/dist/format/index.js +1 -1
- package/dist/forms/BorderInput.js +1 -1
- package/dist/forms/ColorPicker.js +1 -1
- package/dist/forms/CornersInput.js +1 -1
- package/dist/forms/DateRangePicker.js +1 -1
- package/dist/forms/IconPicker.js +1 -1
- package/dist/forms/Input.js +1 -1
- package/dist/forms/InputNumber.js +1 -1
- package/dist/forms/LinkPicker.js +1 -1
- package/dist/forms/MediaLibrary.js +1 -1
- package/dist/forms/PositionInput.js +1 -1
- package/dist/forms/RenameField.js +1 -1
- package/dist/forms/SidesInput.js +1 -1
- package/dist/forms/Slider.js +1 -1
- package/dist/forms/WidthsBar.js +1 -1
- package/dist/icons/index.js +1 -1
- package/dist/index.js +512 -512
- package/dist/page-tabs/index.js +5 -5
- package/dist/shell/ConfirmDialog.js +1 -1
- package/dist/shell/Dialog.js +1 -1
- package/dist/shell/Drawer.js +1 -1
- package/dist/shell/LanguageSelect.js +1 -1
- package/dist/shell/SearchableSelect.js +1 -1
- package/dist/shell/SettingRow.js +1 -1
- package/dist/shell/SidebarLayout.d.ts +12 -1
- package/dist/shell/SidebarLayout.js +1 -1
- package/dist/shell/discardGuard.js +1 -1
- package/dist/telemetry/index.js +1 -1
- package/dist/templates/AuthScreen.js +1 -1
- package/dist/templates/ChatTemplate.js +1 -1
- package/dist/templates/CheckoutTemplate.js +1 -1
- package/dist/templates/DataTablePage.js +1 -1
- package/dist/templates/EmailTemplate.js +1 -1
- package/dist/templates/FormLayoutPage.js +1 -1
- package/dist/ui/index.js +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
- package/dist/Calculator-PHIOJNTS.js +0 -29
- package/dist/CurrencyConverter-WZXN6WTD.js +0 -21
- package/dist/Notepad-RSEI2F3I.js +0 -24
- package/dist/PomodoroTimer-WVIAWG5E.js +0 -91
- package/dist/chunk-CJQPC2P3.js +0 -2
- package/dist/chunk-KH4AMHSI.js +0 -1
- package/dist/chunk-M36B3M2H.js +0 -8
- package/dist/chunk-MRFFOJCS.js +0 -28
- package/dist/chunk-MRZLFZNJ.js +0 -6
- package/dist/chunk-W24THMLI.js +0 -15
- /package/dist/{chunk-UAXL44HH.js → chunk-4BYJABCX.js} +0 -0
|
@@ -1,91 +0,0 @@
|
|
|
1
|
-
import{loadAppearance as e,WidgetSettingsModal as t}from"./chunk-GAEQYCLS.js";import{subscribePomo as o,getPomoSnapshot as n,setPomoDurations as a,setPomoAlarm as r,setPomoAlarmConfig as s,setPomoBehaviour as i,setPomoFocusSound as l,useTodoTasks as c,pomodoroToday as u,migratePomodoroTasksOnce as d,pomoSwitchMode as m,pomoPause as h,pomoStart as p,ALARM_OPTIONS as g,playAlarm as k,FOCUS_SOUND_OPTIONS as f,previewFocusSound as b}from"./chunk-JYR4V4AG.js";import{PLACEHOLDER_INK as x}from"./chunk-AYZY3YNC.js";import{formatTime as v}from"./chunk-NHKT5IH6.js";import"./chunk-36BRD5J3.js";import"./chunk-JRQMX4PK.js";import{pad2 as y}from"./chunk-LF27WIN2.js";import{useWidgetSettings as N}from"./chunk-H2Q7G5D6.js";import"./chunk-4LXCCZDM.js";import"./chunk-KNUR2UEG.js";import"./chunk-JDCM2VHG.js";import"./chunk-YI4T5I5D.js";import"./chunk-PSVGB7KT.js";import"./chunk-FBZUEZK7.js";import"./chunk-5A7MWTXX.js";import"./chunk-TJ5YMXVB.js";import"./chunk-XYQFTFI7.js";import"./chunk-MRZLFZNJ.js";import"./chunk-EIFNESXS.js";import"./chunk-LC2UF3AA.js";import"./chunk-CJQPC2P3.js";import"./chunk-UAXL44HH.js";import"./chunk-VWGWZY7A.js";import"./chunk-UVHXVSB2.js";import"./chunk-UVPDEGIA.js";import"./chunk-4PJFL26P.js";import"./chunk-F3ZOO23R.js";import"./chunk-2QY5BJLA.js";import"./chunk-UGTRSRIW.js";import{useShellPrefs as C}from"./chunk-DPFEQQQU.js";import"./chunk-AW7TOB6N.js";import"./chunk-EX3DARI3.js";import"./chunk-VQBKRBBR.js";import"./chunk-DWGYC7OD.js";import"./chunk-THAPVKEJ.js";import"./chunk-URHGHXDN.js";import"./chunk-5QFPTDQF.js";import"./chunk-YDJ5IZOU.js";import"./chunk-UTISUEO4.js";import"./chunk-BUFAJJDZ.js";import{Icon as j}from"./chunk-ISVODSRP.js";import"./chunk-J75ZT2JQ.js";import"./chunk-R2VKEMZH.js";import"./chunk-BWJZTHZ6.js";import"./chunk-TD3ZQD5R.js";import"./chunk-F2RAIGCG.js";import"./chunk-PGN5ME7B.js";import"./chunk-62LW225J.js";import"./chunk-VY3UA6AR.js";import"./chunk-WCCS4VFE.js";import"./chunk-ZDXRSY2Y.js";import"./chunk-STKJA4PV.js";import"./chunk-M6UKCZHT.js";import"./chunk-I2NVBDKH.js";import"./chunk-UQYNPYF4.js";import"./chunk-MRJKZWWV.js";import"./chunk-TWVUQUUD.js";import"./chunk-5FYDNH4Y.js";import"./chunk-LNXBTK7Q.js";import"./chunk-MAFUXCPZ.js";import"./chunk-NRHG4R2Q.js";import"./chunk-C3QOHMR6.js";import{useSyncExternalStore as S,useEffect as w,useMemo as B,useState as T,useRef as M,useCallback as P}from"react";import{jsxs as I,Fragment as A,jsx as D}from"react/jsx-runtime";var V="pomodoro_appearance",R="pomodoro_active_task_id",F={focus:"Pomodoro",short:"Short Break",long:"Long Break"},L={focus:"#0f172a",short:"#508a52",long:"#5b7898"};var U=25,$=5,E=15,J=!1,W=!1,Q=4,Y=!0,Z=!0,H="bell",G=100,K=1,X="none",O=50,_=(e,t,o,n)=>"number"==typeof e&&isFinite(e)?Math.max(t,Math.min(o,Math.round(e))):n;function z(){const t=S(o,n,n),{prefs:k,save:b}=C(),x=function(e){const t=e&&"object"==typeof e?e:{};return{focusMinutes:_(t.focusMinutes,1,120,U),shortBreakMinutes:_(t.shortBreakMinutes,1,120,$),longBreakMinutes:_(t.longBreakMinutes,1,120,E),autoStartBreaks:"boolean"==typeof t.autoStartBreaks?t.autoStartBreaks:J,autoStartPomodoros:"boolean"==typeof t.autoStartPomodoros?t.autoStartPomodoros:W,longBreakInterval:_(t.longBreakInterval,1,20,Q),autoCheckTasks:"boolean"==typeof t.autoCheckTasks?t.autoCheckTasks:Y,checkToBottom:"boolean"==typeof t.checkToBottom?t.checkToBottom:Z,alarmSound:g.some(e=>e.id===t.alarmSound)?t.alarmSound:H,alarmVolume:_(t.alarmVolume,0,100,G),alarmRepeat:_(t.alarmRepeat,1,5,K),focusSound:f.some(e=>e.id===t.focusSound)?t.focusSound:X,focusVolume:_(t.focusVolume,0,100,O)}}(k.pomodoro_settings);w(()=>{a({focus:60*x.focusMinutes,short:60*x.shortBreakMinutes,long:60*x.longBreakMinutes})},[x.focusMinutes,x.shortBreakMinutes,x.longBreakMinutes]),w(()=>{r(x.alarmSound),s(x.alarmVolume,x.alarmRepeat)},[x.alarmSound,x.alarmVolume,x.alarmRepeat]),w(()=>{i({autoStartBreaks:x.autoStartBreaks,autoStartPomodoros:x.autoStartPomodoros,longBreakInterval:x.longBreakInterval})},[x.autoStartBreaks,x.autoStartPomodoros,x.longBreakInterval]),w(()=>{l(x.focusSound,x.focusVolume)},[x.focusSound,x.focusVolume]),w(()=>{if("undefined"!=typeof Notification&&"default"===Notification.permission)try{Notification.requestPermission()}catch{}},[]);const z=c(),ee=z.tasks,te=B(()=>u(),[]),oe=function(e,t){return B(()=>t?(e=>{const t=[],o=[];for(const n of e)(n.done?o:t).push(n);return[...t,...o]})(e):e,[e,t])}(B(()=>ee.filter(e=>!!e.dueDate&&(e.dueDate===te||e.dueDate<te&&!e.done)),[ee,te]),x.checkToBottom),[ne,ae]=T(()=>localStorage.getItem(R)),[re,se]=T(!1),[ie,le]=T(null),ce=M(!1);w(()=>{ce.current||(ce.current=!0,d(ee,z.setAllTasks))},[]),w(()=>{try{ne?localStorage.setItem(R,ne):localStorage.removeItem(R)}catch{}},[ne]),w(()=>{if(!ie)return;const e=()=>le(null),t=setTimeout(()=>document.addEventListener("click",e),0);return()=>{clearTimeout(t),document.removeEventListener("click",e)}},[ie]);const ue=M(t.streak);w(()=>{if(t.streak>ue.current&&ne){const e=ee.find(e=>e.id===ne);if(e){const t=(e.completed??0)+1,o=e.estimated??0,n=x.autoCheckTasks&&o>0&&t>=o;z.updateTask(ne,{completed:t,done:e.done||n})}}ue.current=t.streak},[t.streak,ne,x.autoCheckTasks,ee,z]);const me=oe.reduce((e,t)=>e+(t.completed??0),0),he=oe.reduce((e,t)=>e+Math.max(t.estimated??0,t.completed??0),0),pe=oe.reduce((e,t)=>t.done?e:e+Math.max(0,(t.estimated??0)-(t.completed??0)),0),ge=t.running&&"focus"===t.mode?t.remaining:0,ke=pe*x.focusMinutes*60+ge,fe=new Date(Date.now()+1e3*ke),be=v(fe.toISOString(),{clock:{hour:"2-digit",minute:"2-digit",hourCycle:"h23"}}),xe=(ke/3600).toFixed(1),ve=ne?ee.find(e=>e.id===ne)??null:null,ye=y(Math.floor(t.remaining/60)),Ne=y(t.remaining%60),[Ce,je]=T(()=>e(V)),[Se,we]=T(!1),[Be,Te]=T(Ce),[Me,Pe]=T(x);N(P(()=>{Te({...Ce}),Pe({...x}),we(!0)},[Ce,x]));const Ie="focus"!==t.mode,Ae=L[t.mode],De=Ie?(Ve=Ae,Re=Ce.activeOpacity/100,`rgba(${parseInt(Ve.slice(1,3),16)}, ${parseInt(Ve.slice(3,5),16)}, ${parseInt(Ve.slice(5,7),16)}, ${Re})`):`rgb(var(--taskbar-bg-rgb, 243 244 246) / ${Ce.activeOpacity/100})`;var Ve,Re;const Fe={primary:Ie?"text-white":"text-gray-900",secondary:Ie?"text-white/85":"text-gray-700",muted:Ie?"text-white/65":"text-gray-500",tabActive:Ie?"bg-white/15 text-white":"bg-gray-200 text-gray-900",tabInactive:Ie?"text-white/75 hover:bg-white/10":"text-gray-500 hover:bg-gray-200",divider:Ie?"border-white/30":"border-gray-200",softDivider:Ie?"border-white/20":"border-gray-200",iconBtn:Ie?"bg-black/15 hover:bg-black/25 text-white/85":"bg-gray-200 hover:bg-gray-300 text-gray-600",addTaskBtn:Ie?"border-white/45 text-white/90 hover:bg-white/[0.06]":"border-gray-300 text-gray-500 hover:bg-gray-200/50"},Le=Ie?Ae:"#0f172a";/* @__PURE__ */
|
|
2
|
-
return I(A,{children:[
|
|
3
|
-
/* @__PURE__ */I("div",{className:`flex flex-col h-full select-none transition-colors duration-300 ${Fe.primary}`,style:{backgroundColor:De,backdropFilter:Ce.activeBlur>0?`blur(${Ce.activeBlur}px)`:void 0},children:[
|
|
4
|
-
/* @__PURE__ */D("div",{className:"px-3 pt-3 flex justify-center gap-2",children:["focus","short","long"].map(e=>/* @__PURE__ */D("button",{onClick:()=>m(e),className:`px-3 py-1 text-sm font-bold rounded transition-colors ${t.mode===e?Fe.tabActive:Fe.tabInactive}`,children:F[e]},e))}),
|
|
5
|
-
/* @__PURE__ */I("div",{className:"text-center font-bold tabular-nums leading-none tracking-tight mt-3",style:{fontSize:"4.5rem"},children:[ye,":",Ne]}),
|
|
6
|
-
/* @__PURE__ */D("div",{className:"flex justify-center mt-3 mb-2",children:/* @__PURE__ */D("button",{onClick:()=>t.running?h():p(),className:"bg-surface px-12 py-3 rounded-md font-bold text-base shadow-[0_4px_0_rgba(0,0,0,0.12)] hover:shadow-[0_3px_0_rgba(0,0,0,0.12)] active:translate-y-1 active:shadow-none transition-all",style:{color:Le,letterSpacing:"0.08em"},children:t.running?"PAUSE":"START"})}),
|
|
7
|
-
/* @__PURE__ */D("div",{className:"px-3 py-3 text-center",children:ve?/* @__PURE__ */I(A,{children:[
|
|
8
|
-
/* @__PURE__ */I("div",{className:`text-xs leading-tight ${Fe.muted}`,children:["#",(ve.completed??0)+1]}),
|
|
9
|
-
/* @__PURE__ */D("div",{className:`text-base font-medium leading-tight truncate mt-0.5 ${Fe.primary}`,children:ve.name})]}):/* @__PURE__ */D("div",{className:`text-xs italic ${Fe.muted}`,children:"No task selected"})}),
|
|
10
|
-
/* @__PURE__ */I("div",{className:"px-3 mt-1 flex items-center justify-between",children:[
|
|
11
|
-
/* @__PURE__ */D("h3",{className:`text-base font-bold tracking-tight ${Fe.primary}`,children:"Tasks"}),
|
|
12
|
-
/* @__PURE__ */D("button",{className:`rounded p-1 transition-colors ${Fe.iconBtn}`,"aria-label":"Tasks menu",tabIndex:-1,children:/* @__PURE__ */D(j,{name:"more-vertical",look:"solid",className:"h-4 w-4"})})]}),
|
|
13
|
-
/* @__PURE__ */D("div",{className:`border-t mx-3 mt-2 ${Fe.divider}`}),
|
|
14
|
-
/* @__PURE__ */I("div",{className:"flex-1 px-3 py-3 space-y-2 overflow-y-auto",children:[oe.map(e=>{const t=e.id===ne;/* @__PURE__ */
|
|
15
|
-
return I("div",{onClick:()=>ae(e.id),className:"bg-surface text-ink-strong rounded-md flex items-center pr-2 py-3 shadow-sm cursor-pointer transition-shadow hover:shadow-(--elevation-panel) "+(t?"border-l-4 border-gray-700 pl-2":"pl-3 border-l-4 border-transparent"),children:[
|
|
16
|
-
/* @__PURE__ */D("button",{onClick:t=>{var o;t.stopPropagation(),o=e.id,z.toggleDone(o)},className:"shrink-0",children:e.done?/* @__PURE__ */D("svg",{className:"h-5 w-5",fill:"currentColor",viewBox:"0 0 20 20",style:{color:Le},children:/* @__PURE__ */D("path",{d:"M10 0a10 10 0 100 20 10 10 0 000-20zm-1 14.5l-4.5-4.5 1.4-1.4 3.1 3.1 6.1-6.1 1.4 1.4z"})}):/* @__PURE__ */D("svg",{className:"h-5 w-5 text-gray-300",fill:"none",stroke:"currentColor",strokeWidth:2,viewBox:"0 0 24 24",children:/* @__PURE__ */D("circle",{cx:"12",cy:"12",r:"10"})})}),
|
|
17
|
-
/* @__PURE__ */D("span",{className:"ml-3 flex-1 font-semibold truncate "+(e.done?"line-through text-gray-400":"text-gray-800"),children:e.name}),
|
|
18
|
-
/* @__PURE__ */I("span",{className:"text-sm tabular-nums mr-2 shrink-0",children:[
|
|
19
|
-
/* @__PURE__ */D("span",{className:"font-bold text-gray-500",children:e.completed??0}),
|
|
20
|
-
/* @__PURE__ */D("span",{className:"text-gray-400",children:" / "}),
|
|
21
|
-
/* @__PURE__ */D("span",{className:"text-gray-400",children:e.estimated??"–"})]}),
|
|
22
|
-
/* @__PURE__ */I("div",{className:"relative",children:[
|
|
23
|
-
/* @__PURE__ */D("button",{onClick:t=>{t.stopPropagation(),le(ie===e.id?null:e.id)},className:"rounded p-1 bg-gray-100 hover:bg-gray-200",children:/* @__PURE__ */D(j,{name:"more-vertical",look:"solid",className:"h-4 w-4 text-ink-faint"})}),ie===e.id&&/* @__PURE__ */D("div",{className:"absolute right-0 top-full mt-1 bg-white text-gray-800 rounded shadow-lg border border-gray-200 z-10 min-w-[110px] overflow-hidden",onClick:e=>e.stopPropagation(),children:/* @__PURE__ */D("button",{onClick:t=>{var o;t.stopPropagation(),o=e.id,z.removeTask(o),ne===o&&ae(null),le(null)},className:"block w-full px-3 h-8 text-sm text-left hover:bg-red-50 text-red-600",children:"Delete"})})]})]},e.id)}),re?/* @__PURE__ */D(de,{onSubmit:(e,t)=>{const o=e.trim();if(!o)return;const n=z.addTask({name:o,estimated:t,completed:0,dueDate:te});ne||ae(n),se(!1)},onCancel:()=>se(!1),accentColor:Le}):/* @__PURE__ */I("button",{onClick:()=>se(!0),className:`w-full border-2 border-dashed rounded-md py-3 font-semibold flex items-center justify-center gap-2 transition-colors ${Fe.addTaskBtn}`,children:[
|
|
24
|
-
/* @__PURE__ */D(j,{name:"add-circle",className:"h-5 w-5",strokeWidth:2}),"Add Task"]})]}),
|
|
25
|
-
/* @__PURE__ */I("div",{className:`border-t px-3 py-3 flex items-center justify-center gap-5 text-sm ${Fe.softDivider}`,children:[
|
|
26
|
-
/* @__PURE__ */I("span",{className:Fe.secondary,children:["Pomos: ",
|
|
27
|
-
/* @__PURE__ */D("span",{className:`font-bold ${Fe.primary}`,children:me}),
|
|
28
|
-
/* @__PURE__ */D("span",{className:Fe.muted,children:" / "}),
|
|
29
|
-
/* @__PURE__ */D("span",{className:`font-bold ${Fe.primary}`,children:he})]}),ke>0&&/* @__PURE__ */I("span",{className:Fe.secondary,children:["Finish At: ",
|
|
30
|
-
/* @__PURE__ */D("span",{className:`font-bold ${Fe.primary}`,children:be}),
|
|
31
|
-
/* @__PURE__ */I("span",{className:Fe.muted,children:[" (",xe,"h)"]})]})]})]}),
|
|
32
|
-
/* @__PURE__ */D(q,{open:Se,onClose:()=>we(!1),onSave:()=>{je(Be),localStorage.setItem(V,JSON.stringify(Be)),b({pomodoro_settings:Me}),we(!1)},configAppearance:Be,setConfigAppearance:Te,configPrefs:Me,setConfigPrefs:Pe})]})}function q({open:e,onClose:o,onSave:n,configAppearance:a,setConfigAppearance:r,configPrefs:s,setConfigPrefs:i}){const l=(e,t)=>i(o=>({...o,[e]:t}));/* @__PURE__ */
|
|
33
|
-
return I(t,{open:e,onClose:o,title:"Pomodoro Settings",appearance:a,onAppearanceChange:r,onSave:n,children:[
|
|
34
|
-
/* @__PURE__ */I(ee,{icon:/* @__PURE__ */D(le,{}),label:"TIMER",children:[
|
|
35
|
-
/* @__PURE__ */I("div",{children:[
|
|
36
|
-
/* @__PURE__ */D("p",{className:"text-sm font-bold text-gray-800 mb-2",children:"Time (minutes)"}),
|
|
37
|
-
/* @__PURE__ */I("div",{className:"grid grid-cols-3 gap-3",children:[
|
|
38
|
-
/* @__PURE__ */D(ne,{label:"Pomodoro",value:s.focusMinutes,onChange:e=>l("focusMinutes",e),max:120}),
|
|
39
|
-
/* @__PURE__ */D(ne,{label:"Short Break",value:s.shortBreakMinutes,onChange:e=>l("shortBreakMinutes",e),max:120}),
|
|
40
|
-
/* @__PURE__ */D(ne,{label:"Long Break",value:s.longBreakMinutes,onChange:e=>l("longBreakMinutes",e),max:120})]})]}),
|
|
41
|
-
/* @__PURE__ */D(te,{label:"Auto Start Breaks",children:/* @__PURE__ */D(se,{checked:s.autoStartBreaks,onChange:e=>l("autoStartBreaks",e)})}),
|
|
42
|
-
/* @__PURE__ */D(te,{label:"Auto Start Pomodoros",children:/* @__PURE__ */D(se,{checked:s.autoStartPomodoros,onChange:e=>l("autoStartPomodoros",e)})}),
|
|
43
|
-
/* @__PURE__ */D(te,{label:"Long Break interval",children:/* @__PURE__ */D(ae,{value:s.longBreakInterval,onChange:e=>l("longBreakInterval",e),min:1,max:20,className:"w-14 text-center"})})]}),
|
|
44
|
-
/* @__PURE__ */I(ee,{icon:/* @__PURE__ */D(ce,{}),label:"TASK",children:[
|
|
45
|
-
/* @__PURE__ */D(te,{label:"Auto Check Tasks",info:'If you enable "Auto Check Tasks", the active task will be automatically checked when the actual pomodoro count reaches the estimated count.',children:/* @__PURE__ */D(se,{checked:s.autoCheckTasks,onChange:e=>l("autoCheckTasks",e)})}),
|
|
46
|
-
/* @__PURE__ */D(te,{label:"Check to Bottom",info:'If you enable "Check to Bottom", the checked task will be automatically moved to the bottom of the task list.',children:/* @__PURE__ */D(se,{checked:s.checkToBottom,onChange:e=>l("checkToBottom",e)})})]}),
|
|
47
|
-
/* @__PURE__ */I(ee,{icon:/* @__PURE__ */D(ue,{}),label:"SOUND",children:[
|
|
48
|
-
/* @__PURE__ */D(te,{label:"Alarm Sound",children:/* @__PURE__ */I("div",{className:"flex items-center gap-2",children:[
|
|
49
|
-
/* @__PURE__ */D(re,{value:s.alarmSound,onChange:e=>l("alarmSound",e),options:g.map(e=>({id:e.id,label:e.label}))}),"off"!==s.alarmSound&&/* @__PURE__ */D("button",{type:"button",onClick:()=>k(s.alarmSound,{volume:s.alarmVolume,repeat:1}),className:"px-2 py-1 text-2xs rounded border border-line-strong text-gray-600 hover:bg-gray-100",children:"Play"})]})}),
|
|
50
|
-
/* @__PURE__ */D(oe,{value:s.alarmVolume,onChange:e=>l("alarmVolume",e)}),
|
|
51
|
-
/* @__PURE__ */D(te,{label:"repeat",children:/* @__PURE__ */D(ae,{value:s.alarmRepeat,onChange:e=>l("alarmRepeat",e),min:1,max:5,className:"w-14 text-center"})}),
|
|
52
|
-
/* @__PURE__ */D(te,{label:"Focus Sound",children:/* @__PURE__ */I("div",{className:"flex items-center gap-2",children:[
|
|
53
|
-
/* @__PURE__ */D(re,{value:s.focusSound,onChange:e=>l("focusSound",e),options:f}),"none"!==s.focusSound&&/* @__PURE__ */D("button",{type:"button",onClick:()=>b(s.focusSound,s.focusVolume),className:"px-2 py-1 text-2xs rounded border border-line-strong text-gray-600 hover:bg-gray-100",children:"Play"})]})}),
|
|
54
|
-
/* @__PURE__ */D(oe,{value:s.focusVolume,onChange:e=>l("focusVolume",e)})]})]})}function ee({icon:e,label:t,children:o}){/* @__PURE__ */
|
|
55
|
-
return I("div",{className:"border-t border-gray-200 pt-3 first:border-0 first:pt-0",children:[
|
|
56
|
-
/* @__PURE__ */I("div",{className:"flex items-center gap-2 mb-3 text-ink-faintest",children:[e,
|
|
57
|
-
/* @__PURE__ */D("span",{className:"text-xs font-bold tracking-[0.15em]",children:t})]}),
|
|
58
|
-
/* @__PURE__ */D("div",{className:"space-y-3",children:o})]})}function te({label:e,info:t,children:o}){/* @__PURE__ */
|
|
59
|
-
return I("div",{className:"flex items-center justify-between gap-3",children:[
|
|
60
|
-
/* @__PURE__ */I("div",{className:"flex items-center gap-2 min-w-0",children:[
|
|
61
|
-
/* @__PURE__ */D("span",{className:"text-sm font-semibold text-gray-800",children:e}),t&&/* @__PURE__ */D(ie,{title:t})]}),
|
|
62
|
-
/* @__PURE__ */D("div",{className:"shrink-0",children:o})]})}function oe({value:e,onChange:t}){/* @__PURE__ */
|
|
63
|
-
return I("div",{className:"flex items-center justify-end gap-3",children:[
|
|
64
|
-
/* @__PURE__ */D("span",{className:"text-xs text-gray-400 w-7 text-right tabular-nums",children:e}),
|
|
65
|
-
/* @__PURE__ */D("input",{type:"range",min:0,max:100,value:e,onChange:e=>t(parseInt(e.target.value,10)),className:"w-40 accent-blue-500"})]})}function ne({label:e,value:t,onChange:o,min:n=1,max:a=99}){/* @__PURE__ */
|
|
66
|
-
return I("label",{className:"flex flex-col",children:[
|
|
67
|
-
/* @__PURE__ */D("span",{className:"text-xs font-semibold text-gray-500 mb-1",children:e}),
|
|
68
|
-
/* @__PURE__ */D(ae,{value:t,onChange:o,min:n,max:a})]})}function ae({value:e,onChange:t,min:o=1,max:n=99,className:a=""}){/* @__PURE__ */
|
|
69
|
-
return D("input",{type:"number",min:o,max:n,value:e,onChange:e=>t(Math.max(o,Math.min(n,parseInt(e.target.value,10)||o))),className:`bg-gray-100 border-0 rounded-md px-2 h-8 text-sm font-medium text-ink-strong focus:outline-none focus:ring-2 focus:ring-blue-500 w-full ${a}`})}function re({value:e,onChange:t,options:o}){/* @__PURE__ */
|
|
70
|
-
return I("div",{className:"relative",children:[
|
|
71
|
-
/* @__PURE__ */D("select",{value:e,onChange:e=>t(e.target.value),className:"appearance-none bg-gray-100 border-0 rounded-md pl-3 pr-8 h-8 text-sm font-medium text-ink-strong focus:outline-none focus:ring-2 focus:ring-blue-500 cursor-pointer",children:o.map(e=>/* @__PURE__ */D("option",{value:e.id,children:e.label},e.id))}),
|
|
72
|
-
/* @__PURE__ */D(j,{name:"chevron-down",className:`absolute right-2 top-1/2 -translate-y-1/2 h-3.5 w-3.5 pointer-events-none ${x}`,strokeWidth:2.5})]})}function se({checked:e,onChange:t}){/* @__PURE__ */
|
|
73
|
-
return D("button",{type:"button",role:"switch","aria-checked":e,onClick:()=>t(!e),className:"relative inline-flex h-6 w-11 items-center rounded-full transition-colors "+(e?"bg-emerald-500":"bg-gray-300"),children:/* @__PURE__ */D("span",{className:"absolute h-5 w-5 rounded-full bg-white shadow transition-transform "+(e?"translate-x-[22px]":"translate-x-0.5")})})}function ie({title:e}){/* @__PURE__ */
|
|
74
|
-
return D("span",{title:e,className:"inline-flex items-center justify-center w-4 h-4 rounded-full bg-gray-300 text-on-accent text-3xs font-bold cursor-help",children:"i"})}function le(){/* @__PURE__ */
|
|
75
|
-
return I("svg",{className:"h-3.5 w-3.5",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,children:[
|
|
76
|
-
/* @__PURE__ */D("circle",{cx:"12",cy:"12",r:"9"}),
|
|
77
|
-
/* @__PURE__ */D("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 7v5l3 2"})]})}function ce(){/* @__PURE__ */
|
|
78
|
-
return I("svg",{className:"h-3.5 w-3.5",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,children:[
|
|
79
|
-
/* @__PURE__ */D("rect",{x:"4",y:"4",width:"16",height:"16",rx:"2"}),
|
|
80
|
-
/* @__PURE__ */D("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 12l2 2 4-4"})]})}function ue(){/* @__PURE__ */
|
|
81
|
-
return I("svg",{className:"h-3.5 w-3.5",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,children:[
|
|
82
|
-
/* @__PURE__ */D("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M11 5L6 9H2v6h4l5 4V5z"}),
|
|
83
|
-
/* @__PURE__ */D("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15.5 8.5a5 5 0 010 7M19 5a9 9 0 010 14"})]})}function de({onSubmit:e,onCancel:t,accentColor:o}){const[n,a]=T(""),[r,s]=T(1),i=()=>e(n,r);/* @__PURE__ */
|
|
84
|
-
return I("div",{className:"bg-surface text-ink-strong rounded-md p-3 shadow-(--elevation-panel)",children:[
|
|
85
|
-
/* @__PURE__ */D("input",{autoFocus:!0,value:n,onChange:e=>a(e.target.value),placeholder:"What are you working on?",onKeyDown:e=>{"Enter"===e.key&&i(),"Escape"===e.key&&t()},className:"w-full text-base font-medium bg-transparent border-0 outline-none placeholder-gray-400"}),
|
|
86
|
-
/* @__PURE__ */I("div",{className:"flex items-center justify-between mt-2",children:[
|
|
87
|
-
/* @__PURE__ */D("span",{className:"text-xs font-semibold text-gray-500",children:"Est Pomodoros"}),
|
|
88
|
-
/* @__PURE__ */D("input",{type:"number",min:1,max:20,value:r,onChange:e=>s(Math.max(1,Math.min(20,parseInt(e.target.value,10)||1))),className:"w-16 bg-gray-100 rounded px-2 py-1 text-sm text-right border-0 focus:outline-none focus:ring-2 focus:ring-blue-500"})]}),
|
|
89
|
-
/* @__PURE__ */I("div",{className:"flex gap-2 mt-3 justify-end",children:[
|
|
90
|
-
/* @__PURE__ */D("button",{onClick:t,className:"px-3 py-1 text-sm text-gray-500 hover:bg-gray-100 rounded",children:"Cancel"}),
|
|
91
|
-
/* @__PURE__ */D("button",{onClick:i,className:"px-4 py-1 text-sm font-semibold text-white rounded shadow-sm",style:{backgroundColor:o},children:"Save"})]})]})}export{z as default};
|
package/dist/chunk-CJQPC2P3.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{getActiveModalId as t}from"./chunk-F3ZOO23R.js";import{Icon as e}from"./chunk-ISVODSRP.js";import{Z_LAYERS as n}from"./chunk-62LW225J.js";import{useBrowserLayoutEffect as i}from"./chunk-ZDXRSY2Y.js";import{useShellStrings as o}from"./chunk-NRHG4R2Q.js";import{createContext as r,useContext as u,useRef as s,useState as l}from"react";import{jsx as d}from"react/jsx-runtime";var h=r(void 0),c=h.Provider;function a(t){const e=u(h);return t?void 0===e?document.body:e:null}function f(t,e){if("undefined"==typeof Element||!(t instanceof Element))return!1;const n=t.closest("[data-overlay-layer]");return null!==n&&!e?.contains(n)}var w="[data-modal-panel], [data-popup-panel]",v=16;function p(t,e){const n=Math.max(0,t.left),i=Math.max(0,t.top),o=Math.min(e.width,t.left+t.width),r=Math.min(e.height,t.top+t.height);return o-n<1||r-i<1?null:{left:n,top:i,width:o-n,height:r-i}}function m(t,e,n){return n<e?e:Math.min(Math.max(t,e),n)}function b(){return{width:window.innerWidth,height:window.innerHeight}}function g(t,e){const n=s(null),o=s(!1);t&&!o.current&&(n.current="undefined"==typeof document?null:document.activeElement),o.current=t;const[r,u]=l(null);return i(()=>{if(!t)return void u(null);const i=(o=e.current,r=n.current,o?.parentElement?.closest(w)??r?.closest(w)??null);var o,r;if(!i)return void u(null);const s=()=>{const t=i.getBoundingClientRect(),e=b(),n=p({left:t.left,top:t.top,width:t.width,height:t.height},e),o=null!==n&&n.width>=e.width-1&&n.height>=e.height-1;u(t=>{const e=o?null:n;return t===e||t&&e&&t.left===e.left&&t.top===e.top&&t.width===e.width&&t.height===e.height?t:e})};s(),window.addEventListener("resize",s);const l="undefined"==typeof ResizeObserver?null:new ResizeObserver(s);return l?.observe(i),()=>{window.removeEventListener("resize",s),l?.disconnect()}},[t,e]),r}function x(t,e){const[n,o]=l(null);return i(()=>{const n=e.current;if(!t||!n)return void o(null);const i=()=>{const e=function(t,e,n,i=16){return{left:m(t.left+t.width/2-e.width/2,i,n.width-i-e.width),top:m(t.top+t.height/2-e.height/2,i,n.height-i-e.height)}}(t,{width:n.offsetWidth,height:n.offsetHeight},b());o(t=>t&&t.left===e.left&&t.top===e.top?t:e)};i(),window.addEventListener("resize",i);const r="undefined"==typeof ResizeObserver?null:new ResizeObserver(i);return r?.observe(n),()=>{window.removeEventListener("resize",i),r?.disconnect()}},[t,e]),n}var y=/* @__PURE__ */new WeakMap;function z(t){if(!t)return null;const e=t.closest("[data-overlay-layer]");return e?y.get(e)??null:t.closest("[data-modal-panel]")}var R={host:null,box:null,z:0,hidden:!1};function E(t,e){const n=s(null),o=s(!1);t&&!o.current&&(n.current="undefined"==typeof document?null:document.activeElement),o.current=t;const[r,u]=l(R);return i(()=>{if(!t)return void u(R);const i=(o=e.current,r=n.current,z(o?.parentElement)??z(r));var o,r;if(!i)return void u(R);const s=()=>{const t=i.getBoundingClientRect(),e=getComputedStyle(i),n=p({left:t.left,top:t.top,width:t.width,height:t.height},{width:window.innerWidth,height:window.innerHeight}),o=Number.parseInt(e.zIndex,10),r={host:i,box:n,z:Number.isFinite(o)?o:0,hidden:null===n||"none"===e.display||"hidden"===e.visibility};u(t=>{return n=r,(e=t).host===n.host&&e.z===n.z&&e.hidden===n.hidden&&(e.box===n.box||null!==e.box&&null!==n.box&&e.box.left===n.box.left&&e.box.top===n.box.top&&e.box.width===n.box.width&&e.box.height===n.box.height)?t:r;var e,n})};s(),window.addEventListener("resize",s);const l="undefined"==typeof ResizeObserver?null:new ResizeObserver(s);l?.observe(i);const d="undefined"==typeof MutationObserver?null:new MutationObserver(s);return d?.observe(i,{attributes:!0,attributeFilter:["style","class"]}),()=>{window.removeEventListener("resize",s),l?.disconnect(),d?.disconnect()}},[t,e]),r}function O(e,n){const i=s(null);return i.current=i=>function(t,e,n,i){const o=t.host;if(!o)return!1;if(n&&e?.contains(n))return!1;const r=o.getAttribute("data-modal-id");if(i&&r&&i!==r)return!0;const u=z(n);return null!==u&&u!==o&&!o.contains(u)}(e,n,i,t()),n&&function(t,e){y.set(t,e)}(n,e.host),i}function k(t){return t.host?{zIndex:t.z+1,...t.hidden?{visibility:"hidden"}:{}}:{zIndex:n.overlay}}function M(t){if(!t.host||!t.box)return null;const{left:e,top:n,width:i,height:o}=t.box;return{left:e,top:n,width:i,height:o}}function L(t){return null!==t.host&&!t.host.hasAttribute("data-window-tab")}function j({onClose:t,className:n=""}){const i=o().dialog;/* @__PURE__ */
|
|
2
|
-
return d("button",{type:"button",onClick:t,"aria-label":i.close,className:(n?`${n} `:"")+"rounded-(--radius-control) p-1 text-gray-400 hover:bg-gray-100 hover:text-gray-600 rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)]",children:/* @__PURE__ */d(e,{name:"close",className:"h-5 w-5",strokeWidth:"2",strokeLinecap:"round","aria-hidden":"true"})})}export{j as CloseButton,c as OverlayLayerProvider,v as POPUP_GUTTER,f as isInOverlayOver,k as popupLayerStyle,L as scrimHasCorners,a as useOverlayTarget,x as usePanelPosition,g as usePopupAnchor,E as usePopupLevel,O as usePopupLevelBindings,M as windowScrimStyle};
|
package/dist/chunk-KH4AMHSI.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var r="13.23.1",a=r;export{a as APP_VERSION,r as VERSION};
|
package/dist/chunk-M36B3M2H.js
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import{useOverlayTarget as e,usePopupAnchor as i,usePopupLevel as t,usePopupLevelBindings as r,windowScrimStyle as o,OverlayLayerProvider as l,scrimHasCorners as n,CloseButton as d,popupLayerStyle as a}from"./chunk-CJQPC2P3.js";import{useDiscardGuard as s}from"./chunk-UAXL44HH.js";import{dialogA11y as m}from"./chunk-VWGWZY7A.js";import{useDismissPopupsOnOpen as c}from"./chunk-UVHXVSB2.js";import{useFocusTrap as p,useScrollLock as h}from"./chunk-DWGYC7OD.js";import{HEADING_TEXT as u,DESCRIPTION_TEXT as f,PANEL_SURFACE as b}from"./chunk-BWJZTHZ6.js";import{useHydrated as y}from"./chunk-WCCS4VFE.js";import{registerModalEscapeInterceptor as v}from"./chunk-TWVUQUUD.js";import{useRef as x,useId as w,useState as g,useEffect as k}from"react";import{createPortal as j}from"react-dom";import{jsxs as N,Fragment as C,jsx as W}from"react/jsx-runtime";var H={sm:"sm:w-[320px]",md:"sm:w-[448px]",lg:"sm:w-[640px]"},U={right:"inset-y-0 right-0",left:"inset-y-0 left-0",bottom:"inset-x-0 bottom-0"};function V(e,i){const t=window.innerHeight-(i.top+i.height);if("bottom"===e)return{left:i.left,width:i.width,bottom:t};const r={top:i.top,height:i.height};return"left"===e?{...r,left:i.left}:{...r,right:window.innerWidth-(i.left+i.width)}}function $({open:$,onClose:B,side:D="right",size:Z="md",title:z,description:A,footer:E,children:F,blocking:G=!1,dirty:J=!1,initialFocus:P,"aria-label":Q,"aria-labelledby":S,"aria-describedby":T,className:X=""}){const Y=x(null),I=w(),L=w(),O=w(),q=e(y()),[K,M]=g(null),R=s({open:$,dirty:J,onClose:B,title:z,layer:K}),_=x(null),ee=i($&&null!==q,_),ie=t($&&null!==q,_),te=r(ie,K),re=o(ie),oe=null!==ie.host;if(c($),p(Y,$&&null!==q,P,te),h($),k(()=>{if($)return v(()=>!te.current?.(document.activeElement)&&(G||R(),!0),()=>Y.current)},[$,G,R,te]),!$||!q)return null;const le="bottom"===D,ne={...le?{maxHeight:"85vh"}:{},...ee?V(D,ee):{}};/* @__PURE__ */
|
|
2
|
-
return N(C,{children:[/* @__PURE__ */W("span",{ref:_,hidden:!0,"data-popup-anchor":""}),j(
|
|
3
|
-
/* @__PURE__ */W(l,{value:K,children:/* @__PURE__ */N("div",{ref:M,className:oe?"fixed inset-0 pointer-events-none":"fixed inset-0",style:a(ie),role:"presentation","data-overlay-layer":"",children:[
|
|
4
|
-
/* @__PURE__ */W("div",{className:"fixed bg-black/30 backdrop-blur-sm "+(oe?"pointer-events-auto"+(n(ie)?" rounded-(--radius-window)":""):"inset-0"),style:re??void 0,hidden:oe&&!re,onClick:G?void 0:R,"aria-hidden":"true","data-popup-scrim":oe?"window":"system"}),
|
|
5
|
-
/* @__PURE__ */N("div",{ref:Y,...m({modal:!0,titleId:z?O:void 0,labelledBy:S,label:Q}),"aria-describedby":T??(A?L:F?I:void 0),"data-drawer-side":D,"data-popup-panel":"",style:ne,className:[`fixed flex flex-col ${b}`,oe?"pointer-events-auto":"",le?"":`w-full max-w-full ${H[Z]}`,ee?"":U[D],le?"rounded-t-xl":"",X].filter(Boolean).join(" "),children:[z?/* @__PURE__ */N("div",{className:"flex shrink-0 items-center justify-between gap-4 border-b border-gray-100 px-4 py-3",children:[
|
|
6
|
-
/* @__PURE__ */N("div",{className:"min-w-0",children:[
|
|
7
|
-
/* @__PURE__ */W("h2",{id:O,className:u,children:z}),A&&/* @__PURE__ */W("p",{id:L,className:`mt-0.5 ${f}`,children:A})]}),!G&&/* @__PURE__ */W(d,{onClose:R})]}):!G&&/* @__PURE__ */W("div",{className:"absolute right-2 top-2 z-10",children:/* @__PURE__ */W(d,{onClose:R})}),
|
|
8
|
-
/* @__PURE__ */N("div",{id:I,className:"min-h-0 flex-1 overflow-y-auto px-4 py-4",children:[A&&!z&&/* @__PURE__ */W("p",{id:L,className:`mb-3 ${f} ${G?"":"pr-8"}`.trim(),children:A}),F]}),E&&/* @__PURE__ */W("div",{className:"flex shrink-0 justify-end gap-3 border-t border-gray-100 px-4 py-3",children:E})]})]})}),q)]})}export{$ as Drawer};
|
package/dist/chunk-MRFFOJCS.js
DELETED
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import{Tree as e,TreeRow as n,TreeGroup as l}from"./chunk-Q36KB5RQ.js";import{MarqueeBox as r}from"./chunk-IC72MGON.js";import{EmptyState as a}from"./chunk-W3454ZES.js";import{ImageLightbox as i}from"./chunk-3GJVTK4H.js";import{DescriptionList as t}from"./chunk-SACUSHVN.js";import{Drawer as o}from"./chunk-M36B3M2H.js";import{Breadcrumbs as d}from"./chunk-WREUA43Q.js";import{useGridSelection as s}from"./chunk-VLKDWKVR.js";import{useMarquee as c}from"./chunk-OLFYNMTD.js";import{ROOT_KEY as u,mediaLibraryMenu as m}from"./chunk-UFJR63AO.js";import{useMediaMoveItems as p}from"./chunk-GRAFJD3L.js";import{MediaUploadGrid as h}from"./chunk-66NJCU4W.js";import{MediaUsedInList as f}from"./chunk-RB3BMRNA.js";import{RenameField as g}from"./chunk-2L4IOLOT.js";import{NativeSelect as v}from"./chunk-D5PXRJHA.js";import{copyToClipboard as k}from"./chunk-XYVFJLAU.js";import{Segmented as y}from"./chunk-TNALBYLY.js";import{Checkbox_default as b}from"./chunk-CGZBDI6C.js";import{useContextMenu as w,ContextMenu as N}from"./chunk-VKZC3NPM.js";import{Banner as x}from"./chunk-OSMRYND3.js";import{Input_default as C}from"./chunk-TJBHFUWV.js";import{useFileIntake as I,FileIntakeAlert as D}from"./chunk-TNGIXSTM.js";import{IconButton_default as S}from"./chunk-NWS5G7FE.js";import{setModalDragAside as j,modalIdHolding as T}from"./chunk-EIFNESXS.js";import{ColoredBadge as z}from"./chunk-UVPDEGIA.js";import{DropdownMenu as L}from"./chunk-EX3DARI3.js";import{Button_default as F}from"./chunk-UTISUEO4.js";import{Icon as O}from"./chunk-ISVODSRP.js";import{Tooltip as E}from"./chunk-F2RAIGCG.js";import{buttonClasses as A}from"./chunk-UQYNPYF4.js";import{usePlotWidth as R}from"./chunk-MAFUXCPZ.js";import{useShellStrings as P}from"./chunk-NRHG4R2Q.js";import{useRef as M,useMemo as U,useCallback as B,useState as G,useEffect as K}from"react";import{jsxs as J,Fragment as V,jsx as H}from"react/jsx-runtime";var W="application/x-efficient-media-files",Y="application/x-efficient-media-folder",$="application/x-efficient-media-file";function Q(e){if(!e||!Array.from(e.types).includes($))return null;try{const n=JSON.parse(e.getData($));if(n&&"string"==typeof n.id&&"string"==typeof n.url&&"string"==typeof n.name&&("image"===n.kind||"video"===n.kind))return{id:n.id,url:n.url,kind:n.kind,name:n.name}}catch{}return null}var X={type:"all",use:"any",sort:"newest"},q={lock:/* @__PURE__ */H(O,{name:"lock","aria-hidden":"true",className:"h-4 w-4"}),folder:/* @__PURE__ */H(O,{name:"folder","aria-hidden":"true",className:"h-4 w-4"}),folderOpen:/* @__PURE__ */H(O,{name:"folder-open","aria-hidden":"true",className:"h-4 w-4"}),folderPlus:/* @__PURE__ */H(O,{name:"folder-plus","aria-hidden":"true",className:"h-4 w-4"}),trash:/* @__PURE__ */H(O,{name:"trash","aria-hidden":"true",className:"h-4 w-4"}),upload:/* @__PURE__ */H(O,{name:"upload","aria-hidden":"true",className:"h-4 w-4"}),search:/* @__PURE__ */H(O,{name:"search","aria-hidden":"true",className:"h-4 w-4"}),grid:/* @__PURE__ */H(O,{name:"grid","aria-hidden":"true",className:"h-4 w-4"}),list:/* @__PURE__ */H(O,{name:"list","aria-hidden":"true",className:"h-4 w-4"}),more:/* @__PURE__ */H(O,{name:"more","aria-hidden":"true",className:"h-4 w-4"}),copy:/* @__PURE__ */H(O,{name:"copy","aria-hidden":"true",className:"h-4 w-4"}),edit:/* @__PURE__ */H(O,{name:"edit","aria-hidden":"true",className:"h-4 w-4"}),swap:/* @__PURE__ */H(O,{name:"swap","aria-hidden":"true",className:"h-4 w-4"}),crop:/* @__PURE__ */H(O,{name:"crop","aria-hidden":"true",className:"h-4 w-4"}),external:/* @__PURE__ */H(O,{name:"external","aria-hidden":"true",className:"h-4 w-4"}),undo:/* @__PURE__ */H(O,{name:"undo","aria-hidden":"true",className:"h-4 w-4"})},Z={link:/* @__PURE__ */H(O,{name:"link","aria-hidden":"true",className:"h-3 w-3"}),email:/* @__PURE__ */H(O,{name:"email","aria-hidden":"true",className:"h-3 w-3"}),lock:/* @__PURE__ */H(O,{name:"lock","aria-hidden":"true",className:"h-3 w-3"}),clock:/* @__PURE__ */H(O,{name:"clock","aria-hidden":"true",className:"h-3 w-3"})};function _(O){const{mode:Q="manage",layout:_="auto",location:ee,onLocationChange:ne,folders:le,products:re,allFilesCount:ae,trashCount:ie,files:te,query:oe,onQueryChange:de,filters:se=X,onFiltersChange:ce,extraFilters:ue,view:me="grid",onViewChange:pe,selectedIds:he,onSelectionChange:fe,usedIn:ge,denied:ve={},accept:ke="image/*,video/*",maxSizeBytes:ye,busy:be,progress:we,onUpload:Ne,onNewFolder:xe,onRename:Ce,onMove:Ie,onTrash:De,onDeleteFolder:Se,onRestore:je,onDeleteForever:Te,onEmptyTrash:ze,onReplace:Le,onCropEdit:Fe,onOpenInDesign:Oe,onChoose:Ee,onCancel:Ae,pickNote:Re,onDragOut:Pe,className:Me=""}=O,Ue=P().mediaLibrary,Be=P().media,Ge="pick"===Q,Ke=!Ge,Je=M(null),Ve=R(Je,"phone"===_?343:1200),He="phone"===_||"auto"===_&&Ve<640,We=U(()=>function(e=[]){const n=/* @__PURE__ */new Map,l=(e,r)=>{for(const a of e){const e=[...r,a];n.set(a.id,{node:a,path:e}),a.children&&l(a.children,e)}};return l(e,[]),n}(re),[re]),Ye=U(()=>new Map(le.map(e=>[e.id,e])),[le]),$e=U(()=>{const e=/* @__PURE__ */new Map;for(const n of le){const l=n.parentId&&Ye.has(n.parentId)?n.parentId:null;e.set(l,[...e.get(l)??[],n])}return e},[le,Ye]),Qe=B(e=>{const n=[];for(let l=e?Ye.get(e):void 0;l&&(n.unshift(l),!(n.length>le.length));l=l.parentId?Ye.get(l.parentId):void 0);return n},[Ye,le.length]),Xe=B((e,n)=>Qe(e).some(e=>e.id===n),[Qe]),[qe,Ze]=G(()=>/* @__PURE__ */new Set(["@files"])),_e=e=>Ze(n=>{const l=new Set(n);return l.has(e)?l.delete(e):l.add(e),l}),en=B(e=>{Ze(n=>e.every(e=>n.has(e))?n:/* @__PURE__ */new Set([...n,...e]))},[]),nn="files"===(ln=ee).place?`files:${ln.folderId??""}`:"products"===ln.place?`products:${ln.nodeId??""}`:"trash";var ln;K(()=>{if("files"===ee.place)en(["@files",...Qe(ee.folderId).slice(0,-1).map(e=>e.id)]);else if("products"===ee.place){const e=ee.nodeId?We.get(ee.nodeId)?.path??[]:[];en(["@products",...e.slice(0,-1).map(e=>`p:${e.id}`)])}},[nn]);const rn="products"===ee.place,an="trash"===ee.place,tn="files"===ee.place,on=tn?ee.folderId:null,dn=rn&&ee.nodeId?We.get(ee.nodeId)?.path[0]:void 0,sn=e=>e?.sharedFrom?`${Ue.readOnly} ${Ue.editedAtHq(e.sharedFrom)}`:Ue.readOnly,cn=U(()=>te.map(e=>e.id),[te]),un=U(()=>new Map(te.map(e=>[e.id,e])),[te]),mn=s(cn),pn=U(()=>cn.filter(e=>mn.selected.has(e)),[cn,mn.selected]),hn=1===pn.length?un.get(pn[0]):void 0,fn=M(!0);K(()=>{fn.current?fn.current=!1:mn.clear()},[nn]);const gn=he?.join("\0");K(()=>{he&&mn.setSelection(he)},[gn]);const vn=M(gn??""),kn=pn.join("\0");K(()=>{vn.current!==kn&&(vn.current=kn,fe?.(pn))},[kn]);const yn=(e,n={})=>{Ge?mn.select(e):mn.select(e,{ctrl:!(!n.ctrlKey&&!n.metaKey),shift:!!n.shiftKey})},[bn,wn]=G(null),Nn=e=>{const n=bn;if(wn(null),!n||null==e)return;e!==("folder"===n.kind?Ye.get(n.id)?.name:un.get(n.id)?.name)&&Ce?.(n,e)},xn=async e=>{if(!xe)return;const n=await xe(e);en(["@files",...e?[e]:[]]),"string"==typeof n&&wn({kind:"folder",id:n})},Cn=B(e=>{const n=[],l=n=>{if("files"===e.kind)return n===on&&tn?Ue.alreadyHere:void 0;const l=Ye.get(e.id);return n===e.id||n&&Xe(n,e.id)?Ue.notIntoItself:(l?.parentId??null)===n?Ue.folderAlreadyHere:void 0};n.push({key:u,label:Ue.allFiles,disabledReason:l(null)});const r=(e,a)=>{for(const i of $e.get(e)??[])n.push({key:i.id,label:i.name,depth:a,disabledReason:l(i.id)}),r(i.id,a+1)};return r(null,1),n},[$e,Ye,tn,Xe,on,Ue]),In=B(e=>{const n=new Set(e.map(e=>un.get(e)?.kind??"image"));return 1===n.size?[...n][0]:"file"},[un]),[Dn,Sn]=G(null),jn={words:Ue,media:Be,denied:ve,moveTargets:Cn,kindOf:In,urlOf:e=>un.get(e)?.url,newSubfolder:xe&&Ke?e=>{xn(e)}:void 0,rename:Ce&&Ke?e=>{"file"!==e.kind||mn.isSelected(e.id)||mn.select(e.id),wn(e)}:void 0,move:Ie&&Ke?Ie:void 0,trash:De&&Ke?De:void 0,deleteFolder:Se&&Ke?Se:void 0,folderNotEmpty:e=>!!Ye.get(e)?.notEmpty,replace:Le&&Ke?Le:void 0,copyUrl:e=>{const n=un.get(e)?.url;n&&k(Ue.urlLabel,n)},openInDesign:Oe,restore:je,deleteForever:Te},Tn=e=>m(e,jn),zn=w(),Ln=(e,n)=>{Ge||(mn.isSelected(e)||mn.select(e),zn.open(n,(e=>{const n=mn.isSelected(e)?pn:[e];return rn?{kind:"render",id:e}:an?{kind:"trashed",ids:n}:{kind:"files",ids:n}})(e)))},[Fn,On]=G(null),[En,An]=G(null),[Rn,Pn]=G(null);K(()=>{if(!En&&!Fn)return;const e=()=>{An(null),On(null)};return window.addEventListener("dragend",e),window.addEventListener("drop",e),()=>{window.removeEventListener("dragend",e),window.removeEventListener("drop",e)}},[En,Fn]);const Mn=(e,n)=>Array.from(e.dataTransfer?.types??[]).includes(n),Un=(e,n)=>!(!Ie||ve.move||Ge)&&(!!Mn(e,W)||!(!Mn(e,Y)||!Rn)&&(n!==Rn&&!(n&&Xe(n,Rn)))),Bn=(e,n)=>({onDragEnter:l=>{Un(l,n)&&(l.preventDefault(),On(e))},onDragOver:l=>{Un(l,n)&&(l.preventDefault(),l.dataTransfer.dropEffect="move",Fn!==e&&On(e))},onDragLeave:n=>{const l=n.relatedTarget;l&&n.currentTarget.contains(l)||On(n=>n===e?null:n)},onDrop:e=>{if(Un(e,n))if(e.preventDefault(),On(null),Mn(e,W)){let l;try{l=JSON.parse(e.dataTransfer.getData(W))}catch{l=null}Array.isArray(l)&&l.length&&Ie({kind:"files",ids:l.map(String)},n)}else Rn&&(Ie({kind:"folder",id:Rn},n),Pn(null))}}),Gn=e=>{const n=e=>Mn(e,W)||Mn(e,Y)||Mn(e,"Files");return{onDragEnter:l=>{n(l)&&An(e)},onDragOver:l=>{n(l)&&En!==e&&An(e)},onDragLeave:n=>{const l=n.relatedTarget;l&&n.currentTarget.contains(l)||An(n=>n===e?null:n)}}},Kn=(e,n,l)=>/* @__PURE__ */H(E,{side:"right",content:En===e?Ue.noDropProducts:sn(l),open:En===e||!En&&void 0,children:/* @__PURE__ */H("span",{children:n})}),Jn=e=>({onContextMenu:n=>{zn.open(n,e)}}),Vn=(e,r,a)=>e.map(e=>{const i=`p:${e.id}`,t=a??e,o=qe.has(i),d=e.children?.length?e.children:null;/* @__PURE__ */
|
|
2
|
-
return J("div",{role:"none",className:"contents",children:[
|
|
3
|
-
/* @__PURE__ */H(n,{label:Kn(i,e.name,t),level:r,icon:d&&o?q.folderOpen:q.folder,count:e.count,countLabel:null!=e.count?e.countLabel??Ue.fileCount(e.count):void 0,selected:rn&&ee.nodeId===e.id,expanded:d?o:void 0,onToggle:d?()=>_e(i):void 0,onSelect:()=>ne({place:"products",nodeId:e.id}),rowProps:{"data-media-row":i,...Gn(i),...Ke?Jn({kind:"product-node",id:e.id}):{}}}),d&&o&&/* @__PURE__ */H(l,{children:Vn(d,r+1,t)})]},e.id)}),Hn=(e,r)=>($e.get(e)??[]).map(e=>{const a=$e.get(e.id),i=qe.has(e.id),t="folder"===bn?.kind&&bn.id===e.id,o=Tn({kind:"folder",id:e.id});/* @__PURE__ */
|
|
4
|
-
return J("div",{role:"none",className:"contents",children:[
|
|
5
|
-
/* @__PURE__ */H(n,{label:e.name,level:r,icon:a&&i?q.folderOpen:q.folder,count:e.count,countLabel:null!=e.count?e.countLabel??Ue.fileCount(e.count):void 0,selected:t||tn&&ee.folderId===e.id,expanded:a?i:void 0,onToggle:a?()=>_e(e.id):void 0,onSelect:()=>ne({place:"files",folderId:e.id}),drop:Fn===e.id?"into":void 0,dragging:Rn===e.id,draggable:Ke&&!!Ie&&!ve.move,rename:t?/* @__PURE__ */H(g,{value:e.name,label:Ue.folderName,onDone:Nn}):void 0,actions:Ke&&o.length?/* @__PURE__ */H(L,{align:"end","aria-label":Ue.folderActions,trigger:q.more,items:o}):void 0,rowProps:{"data-media-row":e.id,...Bn(e.id,e.id),...Ke?Jn({kind:"folder",id:e.id}):{},...Ke&&Ie&&!ve.move?{draggable:!0,onDragStart:n=>{n.dataTransfer.effectAllowed="move",n.dataTransfer.setData(Y,e.id),Pn(e.id)},onDragEnd:()=>{Pn(null),On(null)}}:{}}}),a&&i&&/* @__PURE__ */H(l,{children:Hn(e.id,r+1)})]},e.id)}),Wn=qe.has("@files"),Yn=qe.has("@products"),$n=/* @__PURE__ */J(e,{"aria-label":Ue.folders,children:[re&&/* @__PURE__ */J(V,{children:[
|
|
6
|
-
/* @__PURE__ */H(n,{label:Kn("@products",Ue.products),level:1,icon:q.lock,badge:{label:Ue.readOnlyBadge,tone:"neutral"},expanded:re.length?Yn:void 0,onToggle:()=>_e("@products"),selected:rn&&null==ee.nodeId,onSelect:()=>ne({place:"products",nodeId:null}),rowProps:{"data-media-row":"@products",...Gn("@products")}}),Yn&&re.length>0&&/* @__PURE__ */H(l,{children:Vn(re,2)})]}),
|
|
7
|
-
/* @__PURE__ */H(n,{label:Ue.allFiles,level:1,icon:Wn?q.folderOpen:q.folder,count:ae,countLabel:null!=ae?Ue.fileCount(ae):void 0,expanded:$e.get(null)?.length?Wn:void 0,onToggle:()=>_e("@files"),selected:tn&&null==ee.folderId,onSelect:()=>ne({place:"files",folderId:null}),drop:"@files"===Fn?"into":void 0,rowProps:{"data-media-row":"@files",...Bn("@files",null)}}),Wn&&($e.get(null)?.length??0)>0&&/* @__PURE__ */H(l,{children:Hn(null,2)}),Ke&&/* @__PURE__ */H(n,{label:Ue.trash,level:1,icon:q.trash,count:ie,countLabel:null!=ie?Ue.fileCount(ie):void 0,selected:an,onSelect:()=>ne({place:"trash"}),rowProps:{"data-media-row":"@trash"}})]}),Qn=(()=>{if(an)return[{label:Ue.trash}];if(rn){const e=ee.nodeId?We.get(ee.nodeId)?.path??[]:[];return[{label:Ue.products,onClick:e.length?()=>ne({place:"products",nodeId:null}):void 0},...e.map((n,l)=>({label:n.name,onClick:l<e.length-1?()=>ne({place:"products",nodeId:n.id}):void 0}))]}const e=Qe(on);return[{label:Ue.allFiles,onClick:e.length?()=>ne({place:"files",folderId:null}):void 0},...e.map((n,l)=>({label:n.name,onClick:l<e.length-1?()=>ne({place:"files",folderId:n.id}):void 0}))]})(),Xn=rn?Ue.readOnly:ve.upload,qn=!!Ne&&!an&&!Xn,Zn=I({accept:ke,maxSizeBytes:ye,multiple:!0,disabled:!qn,onAccept:e=>Ne?.(e,on)}),_n=rn?Ue.noProductFolder:ve.newFolder,el=e=>e?{"aria-disabled":!0,disabledReason:e}:{},nl=/* @__PURE__ */J("div",{className:"flex flex-wrap items-center gap-2",children:[Ke&&xe&&!an&&/* @__PURE__ */H(F,{variant:"secondary",size:"sm",leftIcon:q.folderPlus,onClick:()=>{xn(on)},...el(_n),children:Ue.newFolder}),Ne&&!an&&/* @__PURE__ */H(F,{variant:"primary",size:"sm",leftIcon:q.upload,onClick:()=>Zn.open(),...el(Xn),children:Ue.upload}),Ke&&an&&ze&&te.length>0&&/* @__PURE__ */H(F,{variant:"danger",size:"sm",onClick:ze,...el(ve.deleteForever),children:Ue.emptyTrash})]}),ll=(e,n,l,r,a)=>/* @__PURE__ */H("div",{style:{width:He?void 0:a,flex:He?"1 1 120px":"0 0 auto",minWidth:0},children:/* @__PURE__ */H(v,{size:"sm","aria-label":e,value:n,onChange:r,options:l})},e),rl=e=>n=>ce?.({...se,[e]:n}),al=/* @__PURE__ */J("div",{className:"flex flex-wrap items-center gap-2",children:[de&&/* @__PURE__ */H("div",{style:{flex:"1 1 200px",minWidth:0},children:/* @__PURE__ */H(C,{size:"sm",type:"search",leftIcon:q.search,placeholder:rn?Ue.searchProducts:Ue.search,"aria-label":rn?Ue.searchProducts:Ue.search,value:oe??"",onChange:e=>de(e.target.value)})}),ce&&ll(Ue.mediaType,se.type,[{value:"all",label:Ue.allTypes},{value:"image",label:Ue.images},{value:"video",label:Ue.videos},{value:"svg",label:"SVG"},{value:"gif",label:"GIF"}],rl("type"),130),ce&&!rn&&!an&&ll(Ue.use,se.use,[{value:"any",label:Ue.anyUse},{value:"email",label:Ue.emailOnly},{value:"website",label:Ue.websiteOnly},{value:"unused",label:Ue.notUsed}],rl("use"),130),ce&&Ke&&ll(Ue.sort,se.sort,[{value:"newest",label:Ue.newest},{value:"name",label:Ue.byName},{value:"size",label:Ue.bySize}],rl("sort"),110),ue?.map(e=>ll(e.label,e.value,e.options,e.onChange,120)),pe&&/* @__PURE__ */H(y,{size:"sm",label:Ue.view,value:me,onChange:pe,options:[{value:"grid",label:Ue.grid,icon:q.grid},{value:"list",label:Ue.list,icon:q.list}]})]}),il=e=>{const n=[];return null!=e.trashedDaysAgo&&n.push({key:"t",label:Ue.daysAgo(e.trashedDaysAgo),count:e.trashedDaysAgo,icon:Z.clock,tone:"neutral"}),e.usedCount&&n.push({key:"u",label:Ue.used(e.usedCount),count:e.usedCount,icon:Z.link,tone:"active"}),e.email&&n.push({key:"e",label:Ue.email,icon:Z.email,tone:"queued"}),e.private&&n.push({key:"p",label:Ue.private,icon:Z.lock,tone:"neutral"}),n},tl=e=>il(e).map(e=>/* @__PURE__ */H(z,{tone:e.tone,size:"xs",children:e.label},e.key)),ol=Ke&&tn&&!!Ie&&!ve.move,dl=!!Pe&&!an,sl=M(""),cl=M(null),ul=()=>cl.current?.dropped?"dropped":"cancelled",ml=M(Pe);ml.current=Pe;const pl=B(e=>{const n=cl.current;n&&(cl.current=null,n.stop(),j(sl.current,!1),e&&ml.current?.(e))},[]),hl=B(e=>{pl(ul());const n=Je.current?.ownerDocument;if(!n)return;sl.current=T(Je.current);const l=Je.current?.closest("[data-modal-panel]"),r=e=>{sl.current&&!l?.contains(e.target)&&j(sl.current,!0)},a=()=>!!e&&!e.isConnected,i=()=>{const e=cl.current;if(e){if(a())return pl("dropped");e.dropped=!0,j(sl.current,!1)}},t=e=>{const n=e.dataTransfer?.dropEffect;pl(n&&"none"!==n?"dropped":a()?ul():"cancelled")},o=()=>{a()&&pl(ul())},d=["pointermove","pointerdown","mousemove","mousedown"];n.addEventListener("dragover",r,!0),n.addEventListener("drop",i,!0),n.addEventListener("dragend",t,!0);for(const e of d)n.addEventListener(e,o,!0);cl.current={dropped:!1,stop:()=>{n.removeEventListener("dragover",r,!0),n.removeEventListener("drop",i,!0),n.removeEventListener("dragend",t,!0);for(const e of d)n.removeEventListener(e,o,!0)}}},[pl]);K(()=>()=>pl(ul()),[pl]);const fl=(e,n,l)=>{if("start"!==e)return;const r=un.get(n);r&&gl(r)&&(hl(l??null),Pe(e))},gl=e=>!dl||e.private||e.pickDisabledReason?void 0:JSON.stringify({id:e.id,url:e.url,kind:"video"===e.kind?"video":"image",name:e.name}),vl=te.map(e=>({id:e.id,url:e.thumbUrl??e.url,name:e.name,kind:e.kind,caption:e.name,badges:il(e),dragData:ol?JSON.stringify(mn.isSelected(e.id)?pn:[e.id]):gl(e),...ol&&gl(e)?{dragAlso:{[$]:gl(e)}}:{}})),kl=He?Math.max(72,Math.floor((Ve-24-16-1)/3)):112,yl=M(null),bl=c({containerRef:yl,enabled:Ke&&!He&&te.length>0,selected:mn.selected,setSelection:e=>mn.setSelection(e),clearSelection:mn.clear}),wl=e=>{if(Ge){const n=un.get(e);return void(!n||n.private||n.pickDisabledReason||Ee?.(n))}const n=cn.indexOf(e);n>=0&&Sn(n)},Nl=te.length?null:oe?/* @__PURE__ */H(a,{variant:"dashed",title:Ue.noMatches}):rn?/* @__PURE__ */H(a,{variant:"dashed",title:Ue.emptyProducts,description:sn(dn)}):an?/* @__PURE__ */H(a,{variant:"dashed",title:Ue.trashEmpty}):!qn||Ge?/* @__PURE__ */H(a,{variant:"dashed",title:Ue.emptyFolder}):null,xl="list"===me&&te.length>0,Cl=Nl??(xl?/* @__PURE__ */H("ul",{role:"listbox","aria-multiselectable":Ke||void 0,"aria-label":Ue.folders,className:"flex flex-col gap-1",children:te.map(e=>/* @__PURE__ */J("li",{role:"option","aria-selected":mn.isSelected(e.id),tabIndex:0,"data-grid-item":"","data-grid-id":e.id,onClick:n=>yn(e.id,n),onDoubleClick:()=>wl(e.id),onContextMenu:n=>Ln(e.id,n),draggable:!!gl(e)||void 0,onDragStart:gl(e)?n=>{n.dataTransfer.effectAllowed="link",n.dataTransfer.setData($,gl(e)),fl("start",e.id,n.currentTarget)}:void 0,onKeyDown:n=>{"Enter"!==n.key&&" "!==n.key||(n.preventDefault(),yn(e.id,n))},className:"flex h-12 cursor-pointer items-center gap-3 rounded-md px-2 text-sm rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)] "+(mn.isSelected(e.id)?"bg-accent-tint text-blue-700":"text-ink hover:bg-gray-100"),children:[
|
|
8
|
-
/* @__PURE__ */H("img",{src:e.thumbUrl??e.url,alt:"",className:"h-10 w-10 shrink-0 rounded bg-gray-100 object-contain"}),
|
|
9
|
-
/* @__PURE__ */H("span",{className:"min-w-0 flex-1 truncate",children:e.name}),
|
|
10
|
-
/* @__PURE__ */H("span",{className:"flex shrink-0 items-center gap-1",children:tl(e)}),e.sizeLabel&&/* @__PURE__ */H("span",{className:"w-16 shrink-0 text-right text-xs text-ink-faint",children:e.sizeLabel})]},e.id))}):/* @__PURE__ */H(h,{items:vl,readOnly:!qn||Ge,onFiles:qn&&!Ge?e=>Ne(e,on):void 0,accept:ke,maxSizeBytes:ye,busy:be,progress:we,fit:"contain",thumbSize:kl,dragType:ol?W:dl?$:void 0,onDragOutChange:dl?(e,n,l)=>fl(e,n,l):void 0,selected:mn.selected,onItemClick:yn,onItemDoubleClick:wl,onItemContextMenu:Ke?Ln:void 0,menuOnMedia:Ke})),Il=p({count:pn.length,kind:In(pn),targets:Cn({kind:"files",ids:pn}),onPick:e=>Ie?.({kind:"files",ids:pn},e.key===u?null:e.key)}),Dl=A({variant:"secondary",size:"sm"}),Sl=/* @__PURE__ */H(L,{align:"start",triggerClassName:Dl,trigger:/* @__PURE__ */J(V,{children:[q.folder,Ue.moveTo]}),items:Il,disabled:!!ve.move}),jl=Ke&&pn.length>1&&!rn?/* @__PURE__ */J("div",{"data-media-bulk":"",className:"flex flex-wrap items-center gap-2 rounded-lg border border-line px-3 py-2",children:[
|
|
11
|
-
/* @__PURE__ */H(b,{checked:pn.length===te.length,indeterminate:pn.length<te.length,onChange:e=>e?mn.selectAll():mn.clear(),label:Ue.selected(pn.length)}),/* @__PURE__ */J(V,an?{children:[je&&/* @__PURE__ */H(F,{variant:"secondary",size:"sm",leftIcon:q.undo,onClick:()=>je(pn),...el(ve.restore),children:Ue.restore}),Te&&/* @__PURE__ */H(F,{variant:"secondary-danger",size:"sm",onClick:()=>Te(pn),...el(ve.deleteForever),children:Ue.deleteForever})]}:{children:[Ie&&Sl,Ce&&/* @__PURE__ */H(F,{variant:"secondary",size:"sm",leftIcon:q.edit,disabled:!0,children:Ue.rename}),De&&/* @__PURE__ */H(F,{variant:"secondary",size:"sm",leftIcon:q.trash,onClick:()=>De({kind:"files",ids:pn}),...el(ve.trash),children:Ue.moveFilesToTrash(pn.length)})]}),
|
|
12
|
-
/* @__PURE__ */H(F,{variant:"ghost",size:"sm",onClick:mn.clear,children:Ue.clearSelection})]}):null,Tl=e=>{const n=[],l=(e,l,r)=>{null!=r&&""!==r&&n.push({key:e,label:l,value:r})},r="file"===bn?.kind&&bn.id===e.id;l("name",Ue.name,r?/* @__PURE__ */H(g,{value:e.name,label:Ue.fileName,onDone:Nn}):e.name),l("type",Ue.type,e.typeLabel),l("size",Ue.size,e.sizeLabel),l("resolution",Ue.resolution,e.resolution),rn?(l("design",Ue.design,e.design),l("finish",Ue.finish,e.finish),l("angle",Ue.angleLug,e.angleLug),l("owner",Ue.owner,e.owner)):(l("added",Ue.addedBy,e.addedBy),l("folder",Ue.folder,e.folderPath)),l("used",Ue.usedIn,null!=e.usedCount?Ue.places(e.usedCount):void 0);const a=m({kind:"files",ids:[e.id]},jn).find(e=>"submenu"===e.type);/* @__PURE__ */
|
|
13
|
-
return J("div",{"data-media-details":"",className:"flex flex-col gap-3",children:[
|
|
14
|
-
/* @__PURE__ */H("img",{src:e.url,alt:e.name,className:"aspect-square w-full rounded-lg bg-gray-100 object-contain"}),rn&&/* @__PURE__ */H(x,{tone:"neutral",title:Ue.readOnlyBadge,children:sn(dn)}),
|
|
15
|
-
/* @__PURE__ */H(t,{size:"sm",columns:1,items:n}),!an&&/* @__PURE__ */J("div",{className:"flex gap-2",children:[
|
|
16
|
-
/* @__PURE__ */H("div",{style:{flex:"1 1 0",minWidth:0},children:/* @__PURE__ */H(C,{size:"sm",readOnly:!0,value:e.url,"aria-label":Ue.fileUrl,onFocus:e=>e.currentTarget.select()})}),
|
|
17
|
-
/* @__PURE__ */H(F,{variant:"secondary",size:"sm",leftIcon:q.copy,onClick:()=>jn.copyUrl(e.id),children:Ue.copyUrl})]}),tn&&Ke&&/* @__PURE__ */J("div",{className:"flex flex-wrap gap-2",children:[Le&&/* @__PURE__ */H(F,{variant:"secondary",size:"sm",leftIcon:q.swap,onClick:()=>Le(e.id),...el(ve.replace),children:Ue.replace}),Fe&&/* @__PURE__ */H(F,{variant:"secondary",size:"sm",leftIcon:q.crop,onClick:()=>Fe(e.id),children:Ue.cropEdit}),Ie&&"submenu"===a?.type&&/* @__PURE__ */H(L,{align:"start",triggerClassName:Dl,trigger:/* @__PURE__ */J(V,{children:[q.folder,Ue.moveTo]}),items:a.items,disabled:!!ve.move}),Ce&&/* @__PURE__ */H(F,{variant:"secondary",size:"sm",leftIcon:q.edit,onClick:()=>wn({kind:"file",id:e.id}),...el(ve.rename),children:Ue.rename}),De&&/* @__PURE__ */H(S,{"aria-label":Ue.moveToTrash,size:"sm",onClick:()=>De({kind:"files",ids:[e.id]}),disabledReason:ve.trash,"aria-disabled":!!ve.trash||void 0,children:q.trash})]}),an&&Ke&&/* @__PURE__ */J("div",{className:"flex flex-wrap gap-2",children:[je&&/* @__PURE__ */H(F,{variant:"primary",size:"sm",leftIcon:q.undo,onClick:()=>je([e.id]),...el(ve.restore),children:Ue.restore}),Te&&/* @__PURE__ */H(F,{variant:"danger",size:"sm",onClick:()=>Te([e.id]),...el(ve.deleteForever),children:Ue.deleteForever})]}),rn&&Oe&&/* @__PURE__ */H(F,{variant:"secondary",size:"sm",leftIcon:q.external,onClick:()=>Oe({kind:"render",id:e.id}),children:Ue.openInDesign}),ge&&/* @__PURE__ */H(f,{items:ge})]})},zl=hn?hn.private?Ue.privateNoPick:hn.pickDisabledReason:void 0,Ll=Ge?/* @__PURE__ */J("div",{"data-media-picker-footer":"",className:"flex flex-wrap items-center justify-between gap-2 border-t border-line px-3 py-2",children:[
|
|
18
|
-
/* @__PURE__ */H("span",{className:"min-w-0 truncate text-sm text-ink-faint",children:hn?Ue.oneChosen(hn.name):Ue.noneChosen}),
|
|
19
|
-
/* @__PURE__ */J("div",{className:"flex gap-2",children:[Ae&&/* @__PURE__ */H(F,{variant:"secondary",size:"sm",onClick:Ae,children:Ue.cancel}),
|
|
20
|
-
/* @__PURE__ */H(F,{variant:"primary",size:"sm",disabled:!hn,...el(zl),onClick:()=>{hn&&!zl&&Ee?.(hn)},children:Ue.chooseImage})]})]}):null,Fl=Ke&&!!hn,Ol=/* @__PURE__ */J("div",{className:"flex min-w-0 flex-col gap-3",children:[Re&&/* @__PURE__ */H(x,{tone:"neutral",children:Re}),
|
|
21
|
-
/* @__PURE__ */J("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[
|
|
22
|
-
/* @__PURE__ */H(d,{items:Qn}),nl]}),al,jl,
|
|
23
|
-
/* @__PURE__ */J("div",{ref:yl,className:"relative",onPointerDown:bl.onPointerDown,onKeyDown:e=>{Ke&&(e.ctrlKey||e.metaKey)&&"a"===e.key.toLowerCase()?(e.preventDefault(),mn.selectAll()):"Escape"===e.key&&mn.size&&mn.clear()},children:[Cl,
|
|
24
|
-
/* @__PURE__ */H(r,{rect:bl.rect})]}),qn&&/* @__PURE__ */H("input",{...Zn.inputProps}),
|
|
25
|
-
/* @__PURE__ */H(D,{rejections:Zn.rejections})]});/* @__PURE__ */
|
|
26
|
-
return J("div",{ref:Je,"data-media-library":"","data-layout":He?"phone":"wide",className:`flex h-full min-h-0 min-w-0 flex-col ${Me}`.trim(),children:[/* @__PURE__ */J("div",He?{className:"flex flex-col gap-3 p-3",children:[$n,Ol]}:{className:"flex min-h-0 min-w-0 flex-1",children:[
|
|
27
|
-
/* @__PURE__ */H("div",{className:"shrink-0 overflow-y-auto border-r border-line p-3",style:{width:280,"--rosh-tree-ground":"var(--surface)"},children:$n}),
|
|
28
|
-
/* @__PURE__ */H("div",{className:"min-w-0 flex-1 overflow-y-auto p-3",children:Ol}),Fl&&/* @__PURE__ */H("div",{className:"shrink-0 overflow-y-auto border-l border-line p-3",style:{width:300},children:Tl(hn)})]}),Ll,He&&/* @__PURE__ */H(o,{open:Fl,onClose:mn.clear,side:"bottom",title:hn?.name,children:hn&&Tl(hn)}),zn.state&&/* @__PURE__ */H(N,{...zn.props,items:Tn(zn.state.data)}),null!=Dn&&te.length>0&&/* @__PURE__ */H(i,{images:te.map(e=>({url:e.url,caption:e.name})),startIndex:Math.min(Dn,te.length-1),onClose:()=>Sn(null)})]})}export{W as MEDIA_FILES_DRAG_TYPE,$ as MEDIA_FILE_DRAG_TYPE,Y as MEDIA_FOLDER_DRAG_TYPE,_ as MediaLibrary,Q as readMediaFileDrag};
|
package/dist/chunk-MRZLFZNJ.js
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import{useOverlayTarget as e,usePopupAnchor as r,usePanelPosition as l,usePopupLevel as t,usePopupLevelBindings as i,windowScrimStyle as a,OverlayLayerProvider as o,scrimHasCorners as n,CloseButton as s,popupLayerStyle as d,POPUP_GUTTER as c}from"./chunk-CJQPC2P3.js";import{useDiscardGuard as m}from"./chunk-UAXL44HH.js";import{dialogA11y as p}from"./chunk-VWGWZY7A.js";import{useDismissPopupsOnOpen as u}from"./chunk-UVHXVSB2.js";import{useFocusTrap as f,useScrollLock as h}from"./chunk-DWGYC7OD.js";import{HEADING_TEXT as x,DESCRIPTION_TEXT as v,PANEL_SURFACE as b}from"./chunk-BWJZTHZ6.js";import{useHydrated as w}from"./chunk-WCCS4VFE.js";import{registerModalEscapeInterceptor as y}from"./chunk-TWVUQUUD.js";import{useShellStrings as $}from"./chunk-NRHG4R2Q.js";import{useRef as g,useId as N,useState as j,useEffect as k}from"react";import{createPortal as C}from"react-dom";import{jsxs as H,Fragment as W,jsx as U}from"react/jsx-runtime";var V=`calc(100% - ${2*c}px)`,B="grid grid-cols-[minmax(0,1fr)_auto]",A="bg-black/30 backdrop-blur-sm",D={sm:"max-w-sm",md:"max-w-md",lg:"max-w-lg",xl:"max-w-4xl","2xl":"max-w-6xl",full:"max-w-none"};function E({open:c,onClose:E,title:G,description:Q,role:T="dialog",children:Z,footer:_,headerActions:F,blocking:J=!1,size:P="md",aside:R=!1,dirty:S=!1,initialFocus:X,"aria-label":Y,"aria-labelledby":z,"aria-describedby":I,className:L=""}){const O=g(null),q=N(),K=N(),M=!J,ee="full"===P,re=ee||null!=F,le=Boolean(G||Q),te=N();$().dialog;const ie=e(w()),[ae,oe]=j(null),ne=m({open:c,dirty:S,onClose:E,title:G,layer:ae}),se=g(null),de=r(c&&null!==ie,se),ce=l(de,O),me=t(c&&null!==ie,se),pe=i(me,ae),ue=a(me),fe=null!==me.host;if(u(c),f(O,c&&null!==ie,X,pe),h(c),k(()=>{if(c)return y(()=>!pe.current?.(document.activeElement)&&(J||ne(),!0),()=>O.current)},[c,J,ne,pe]),!c||!ie)return null;/* @__PURE__ */
|
|
2
|
-
return H(W,{children:[/* @__PURE__ */U("span",{ref:se,hidden:!0,"data-popup-anchor":""}),C(
|
|
3
|
-
/* @__PURE__ */U(o,{value:ae,children:/* @__PURE__ */H("div",{ref:oe,className:"fixed inset-0"+(R?" pointer-events-none opacity-0":fe?" pointer-events-none":""),style:d(me),role:"presentation","data-overlay-layer":"","data-aside":R?"":void 0,children:[!fe&&/* @__PURE__ */U("div",{className:`fixed inset-0 ${A}`,"aria-hidden":"true","data-popup-scrim":"system"}),ue&&/* @__PURE__ */U("div",{className:`fixed ${A}${R?"":" pointer-events-auto"}${n(me)?" rounded-(--radius-window)":""}`,style:ue,onClick:J?void 0:ne,"aria-hidden":"true","data-popup-scrim":"window"}),
|
|
4
|
-
/* @__PURE__ */U("div",{className:de?"fixed inset-0":"fixed inset-0 flex items-center justify-center p-4",onClick:J||fe?void 0:e=>{e.target===e.currentTarget&&ne()},children:/* @__PURE__ */H("div",{ref:O,"data-popup-panel":"",style:de?{left:ce?.left??0,top:ce?.top??0,visibility:ce?void 0:"hidden",width:V,[ee?"height":"maxHeight"]:V}:void 0,...p({role:T,modal:!0,titleId:G?te:void 0,labelledBy:z,label:Y}),"aria-describedby":I??(Q?K:Z?q:void 0),className:(ee?`${de?"absolute":"relative h-full w-full max-h-full"} ${D[P]} ${B} grid-rows-[auto_minmax(0,1fr)_auto] overflow-hidden rounded-(--radius-popup) ${b}`:`${de?"absolute":"relative max-h-full w-full"} ${D[P]}${re?` ${B} content-start gap-x-2`:""} overflow-y-auto overscroll-contain rounded-(--radius-card) ${b} p-6`)+`${fe&&!R?" pointer-events-auto":""} ${L}`.trimEnd(),children:[ee?le&&
|
|
5
|
-
/* @__PURE__ */H("div",{className:"col-start-1 row-start-1 flex min-h-(--row-height-window-bar) flex-col justify-center border-b border-line py-2 pl-6 pr-4",children:[G&&/* @__PURE__ */U("h2",{id:te,className:x,children:G}),Q&&/* @__PURE__ */U("p",{id:K,className:`${G?"mt-1 ":""}${v}`,children:Q})]}):G&&/* @__PURE__ */U("h2",{id:te,className:`${re?"col-start-1 row-start-1 ":M?"pr-8 ":""}${x}`,children:G}),!ee&&Q&&/* @__PURE__ */U("p",{id:K,className:`${re?"col-start-1 ":""}${G?"mt-1":M&&!re?"pr-8":""} ${v}`.trim(),children:Q}),Z&&/* @__PURE__ */U("div",{id:q,className:ee?"col-span-2 row-start-2 min-h-0 overflow-auto":(re?"col-span-2 ":"")+"mt-2 text-sm text-gray-600",children:Z}),_&&/* @__PURE__ */U("div",{className:ee?"col-span-2 row-start-3 flex flex-wrap justify-end gap-3 border-t border-line px-6 py-4":(re?"col-span-2 ":"")+"mt-6 flex flex-wrap justify-end gap-3",children:_}),re?
|
|
6
|
-
/* @__PURE__ */H("div",{className:"col-start-2 row-start-1 flex items-center gap-1 "+(ee?(le?"border-b border-line ":"")+"pr-3":"-mr-3 -mt-3 self-start"),children:[F,M&&/* @__PURE__ */U(s,{onClose:ne})]}):M&&/* @__PURE__ */U(s,{onClose:ne,className:"absolute right-3 top-3"})]})})]})}),ie)]})}export{E as Dialog};
|
package/dist/chunk-W24THMLI.js
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import{SidebarBarContext as e,SidebarSheetContext as r}from"./chunk-QWK6DRSN.js";import{readStoredWidth as l,ResizeHandle as t}from"./chunk-JLSXDYS4.js";import{WindowInsetContext as a}from"./chunk-YI4T5I5D.js";import{useIsPhone as n}from"./chunk-UGTRSRIW.js";import{Icon as o}from"./chunk-ISVODSRP.js";import{PANEL_SURFACE as i}from"./chunk-BWJZTHZ6.js";import{useBrowserState as s}from"./chunk-WCCS4VFE.js";import{useBrowserLayoutEffect as c}from"./chunk-ZDXRSY2Y.js";import{useShellStrings as d}from"./chunk-NRHG4R2Q.js";import{useContext as h,useRef as u,useState as m,useReducer as p,useMemo as f,Fragment as b,useEffect as x}from"react";import{jsxs as g,jsx as v}from"react/jsx-runtime";var N=(e,r,l)=>Math.min(Math.max(e,r),l);function w({sidebar:e,sidebarTop:r,sidebarBottom:o,children:i,side:b="left",storageKey:x,defaultWidth:w=256,minWidth:j=180,maxWidth:S=480,className:C="",sidebarClassName:D=("right"===b?"border-l border-gray-200 bg-gray-50":"border-r border-gray-200 bg-gray-50"),contentClassName:R="bg-white"}){const W="right"===b,$=d().sidebar,I=n(),z=function(){const[e,r]=m(!1),l=u(null),t=u(/* @__PURE__ */new Map),[,a]=p(e=>e+1,0),n=f(()=>({report(e,r,l){const n={label:r,el:l};return t.current.set(e,n),a(),()=>{t.current.get(e)===n&&(t.current.delete(e),a())}}}),[]);return{api:n,open:e,setOpen:r,current:()=>[...t.current.values()].sort((e,r)=>e.el&&r.el&&e.el.compareDocumentPosition(r.el)&Node.DOCUMENT_POSITION_PRECEDING?1:-1).map(e=>e.label()),trigger:l}}(),[O,P]=s(()=>(x?l(x,j,S):null)??N(w,j,S),N(w,j,S)),E=null!=r||null!=o,T=h(a),K=u(null),[M,Y]=m(!1),G=T?.claim;c(()=>{if(!G||W||I||!K.current)return;const e=G(K.current);return e?(Y(!0),()=>{Y(!1),e()}):void 0},[G,W,I]);const L=M&&!!T?.over,Z=E||L,B=/* @__PURE__ */g("div",{className:"relative flex h-full shrink-0 flex-col",style:{width:O},children:[
|
|
2
|
-
/* @__PURE__ */g("div",{className:`flex h-full flex-col ${Z?"overflow-hidden":"overflow-y-auto"} ${D}`,children:[L&&/* @__PURE__ */v("div",{"data-window-strip":"","aria-hidden":"true",className:"shrink-0 "+(T?.compact?"h-(--row-height-compact-bar)":"h-(--row-height-window-bar)")}),null!=r&&/* @__PURE__ */v("div",{className:"flex shrink-0 flex-col gap-2 px-2 pb-2 "+(L?"pt-1":"pt-3"),children:r}),Z?/* @__PURE__ */v("div",{className:"min-h-0 flex-1 overflow-y-auto",children:e}):e,null!=o&&/* @__PURE__ */v("div",{className:"mt-auto flex shrink-0 flex-col gap-2 border-t border-gray-200 px-2 py-3",children:o})]}),
|
|
3
|
-
/* @__PURE__ */v(t,{side:b,width:O,onResize:P,min:j,max:S,defaultWidth:N(w,j,S),storageKey:x,hint:$.resize})]}),H=
|
|
4
|
-
/* @__PURE__ */v("div",{className:`flex min-w-0 flex-1 flex-col ${R}${M?" pb-2 pr-1":""}${L?" pt-2":""}`,children:i});/* @__PURE__ */
|
|
5
|
-
return g("div",I?{className:`relative flex h-full w-full flex-col overflow-hidden ${C}`,children:[
|
|
6
|
-
/* @__PURE__ */v(k,{phone:z,top:r,fallback:$.sections}),H,
|
|
7
|
-
/* @__PURE__ */v(y,{phone:z,bottom:o,label:$.sections,closeLabel:$.closeSections,children:e})]}:{ref:K,className:`flex h-full w-full overflow-hidden ${C}`,children:[W?null:B,H,W?B:null]})}function k({phone:r,top:l,fallback:t}){const a=r.current();/* @__PURE__ */
|
|
8
|
-
return g("div",{"data-sidebar-section-bar":!0,className:"flex h-11 shrink-0 items-center gap-2 border-b border-gray-200 bg-white px-3",children:[
|
|
9
|
-
/* @__PURE__ */g("button",{ref:r.trigger,type:"button","aria-haspopup":"dialog","aria-expanded":r.open,onClick:()=>r.setOpen(!0),className:"flex h-8 min-w-0 flex-1 items-center gap-1 text-left text-sm font-semibold text-gray-900",children:[
|
|
10
|
-
/* @__PURE__ */v("span",{className:"min-w-0 truncate",children:0===a.length?t:a.map((e,r)=>/* @__PURE__ */g(b,{children:[r>0&&" · ",e]},r))}),
|
|
11
|
-
/* @__PURE__ */v(o,{name:"chevron-down",className:"size-4 shrink-0",strokeWidth:2,"aria-hidden":"true"})]}),null!=l&&/* @__PURE__ */v(e.Provider,{value:!0,children:/* @__PURE__ */v("div",{className:"flex min-w-0 max-w-[60%] shrink-0 items-center gap-2",children:l})})]})}function y({phone:e,bottom:l,label:t,closeLabel:a,children:n}){const o=u(null),{open:s,setOpen:c,trigger:d}=e,h=()=>{c(!1),o.current?.contains(document.activeElement)&&d.current?.focus()};return x(()=>{s&&o.current?.focus()},[s]),
|
|
12
|
-
/* @__PURE__ */g(r.Provider,{value:e.api,children:[s&&/* @__PURE__ */v("button",{type:"button","aria-label":a,onClick:h,className:"absolute inset-0 z-(--z-in-box) cursor-default bg-gray-900/40"}),
|
|
13
|
-
/* @__PURE__ */g("div",{ref:o,role:"dialog","aria-modal":"true","aria-label":t,tabIndex:-1,"data-sidebar-section-sheet":!0,onKeyDown:e=>{"Escape"===e.key&&(e.stopPropagation(),h())},onClick:e=>{const r=e.target.closest("button, a");!r||r.hasAttribute("aria-expanded")||r.closest("[data-sheet-keep-open]")||h()},className:`${s?"flex":"hidden"} absolute inset-x-0 bottom-0 z-(--z-in-box) max-h-[75%] flex-col rounded-t-2xl pt-2 ${i}`,children:[
|
|
14
|
-
/* @__PURE__ */v("div",{className:"mx-auto mb-2 h-1 w-9 shrink-0 rounded-full bg-gray-300","aria-hidden":"true"}),
|
|
15
|
-
/* @__PURE__ */v("div",{className:"min-h-0 flex-1 overflow-y-auto px-2 pb-3",children:n}),null!=l&&/* @__PURE__ */v("div",{className:"flex shrink-0 flex-col gap-2 border-t border-gray-200 px-2 py-3",children:l})]})]})}export{w as SidebarLayout};
|
|
File without changes
|