@fde-desktop/fde-core 0.4.11 → 0.4.19
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/{AppEmptyState-Boej96TB.js → AppEmptyState-BVfKZU-h.js} +1 -1
- package/dist/AppEmptyState-Z8_Cviti.cjs +1 -0
- package/dist/AppIcon-Czrtau6A.cjs +1 -0
- package/dist/{AppIcon-mtEoyzOb.js → AppIcon-aFNw89J2.js} +1 -1
- package/dist/AppMenuBar-38QtFTPk.cjs +1 -0
- package/dist/AppTempMemory-DAC62jiS.cjs +1 -0
- package/dist/AppTempMemory-DgUW6GaF.js +23 -0
- package/dist/CalendarApp-BYTyu089.js +9 -0
- package/dist/CalendarApp-DPOK4mqg.cjs +1 -0
- package/dist/{ColorPicker-WCeD3Wjf.js → ColorPicker-B76rCS2H.js} +1 -1
- package/dist/ColorPicker-BZqsPh3X.cjs +1 -0
- package/dist/CreateItemApp-B0IHL16b.cjs +1 -0
- package/dist/CreateItemApp-UUP2HAu2.js +149 -0
- package/dist/DeviceInfoApp-BPQyeVSd.js +162 -0
- package/dist/DeviceInfoApp-D2mS2OT-.cjs +1 -0
- package/dist/DownloadProgress-CpJguS8g.cjs +1 -0
- package/dist/FilePickerApp-ClmPw6lk.cjs +1 -0
- package/dist/{FilePickerApp-ClHuhm6Z.js → FilePickerApp-D7fERKbp.js} +1 -1
- package/dist/FilesApp-DhJbO8wg.js +191 -0
- package/dist/FilesApp-LbwRRR1i.cjs +1 -0
- package/dist/IconColorPicker-7rWNAiNQ.cjs +1 -0
- package/dist/IconColorPicker-DUIXSb5E.js +58 -0
- package/dist/ImageViewerApp-9T-V8uP5.cjs +1 -0
- package/dist/ImageViewerApp-ihqIwJ-L.js +68 -0
- package/dist/ImageViewerMenuBar-DmvZoZ03.cjs +1 -0
- package/dist/{ImageViewerMenuBar-BIsUokxV.js → ImageViewerMenuBar-ZeIKHdA-.js} +18 -19
- package/dist/MenuEditApp-DRKfmSIZ.js +361 -0
- package/dist/MenuEditApp-U7EqB5Rl.cjs +1 -0
- package/dist/MenuEditMenuBar-BE_cXaoG.cjs +1 -0
- package/dist/MenuEditMenuBar-Df1je7F6.js +59 -0
- package/dist/NotesApp-DZfNQ8mN.cjs +1 -0
- package/dist/NotesApp-rwAeXyJy.js +344 -0
- package/dist/{NotesMenuBar-DILZTjnT.js → NotesMenuBar-C503t5pu.js} +12 -13
- package/dist/NotesMenuBar-CwgZ9dHy.cjs +1 -0
- package/dist/PdfApp-DNZaSXbF.cjs +1 -0
- package/dist/PdfApp-K1Z612o3.js +38 -0
- package/dist/PdfMenuBar-BPzP_JUO.cjs +1 -0
- package/dist/PdfMenuBar-DEUKgKTE.js +38 -0
- package/dist/SettingsApp-DdWqiYFE.cjs +1 -0
- package/dist/SettingsApp-ghc3RaMv.js +875 -0
- package/dist/SettingsMenuBar-C4KAPoBs.js +41 -0
- package/dist/SettingsMenuBar-CgmaF9_B.cjs +1 -0
- package/dist/{UploaderApp-CbypD538.js → UploaderApp-D9vfOR0S.js} +28 -40
- package/dist/UploaderApp-omSY-NSn.cjs +1 -0
- package/dist/VscIcon-CeELixwP.cjs +1 -0
- package/dist/buildBreadcrumbs-C2c2a4R3.cjs +1 -0
- package/dist/desktopStore-LSQweOqZ.cjs +1 -0
- package/dist/{desktopStore-8cSZlj7s.js → desktopStore-xnNbYaYm.js} +263 -263
- package/dist/formatBytes-Bv1bQPKQ.cjs +1 -0
- package/dist/formatBytes-CaP80WnM.js +14 -0
- package/dist/i18nConstants-DgbKSBIK.cjs +1 -0
- package/dist/i18nConstants-Nzpf2IFp.js +611 -0
- package/dist/imageViewerStore-CYt4R4e4.cjs +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.css +1 -1
- package/dist/index.d.ts +50 -29
- package/dist/index.js +715 -658
- package/dist/menuEditStore-sU6qaF2j.cjs +1 -0
- package/dist/notesStore-BnMXBRaV.cjs +1 -0
- package/dist/settingsAppStore-CQ4JHd7Q.cjs +1 -0
- package/dist/useAdaptiveDimensions-BDZxP4E3.cjs +1 -0
- package/dist/{useAdaptiveDimensions-DxNLJ7R5.js → useAdaptiveDimensions-sv9lwqF_.js} +1 -1
- package/dist/useCloseInterceptor-AzfjUZgz.cjs +1 -0
- package/dist/{useCloseInterceptor-CIxhOZx1.js → useCloseInterceptor-Bwm4I0O8.js} +1 -1
- package/dist/useDeviceDetection-B9jjlate.js +37 -0
- package/dist/useDeviceDetection-CnxnQWIq.cjs +1 -0
- package/dist/useDragDrop-Bdwzk6VO.cjs +1 -0
- package/dist/useDragDrop-D2LtOEYC.js +139 -0
- package/dist/useDynamicIcon-Cg3B_Aeq.cjs +1 -0
- package/dist/useNotifications-CR9JLjtC.js +26 -0
- package/dist/useNotifications-rwLmJ7fI.cjs +1 -0
- package/dist/useOpenApp-BBZ_B7Pr.cjs +1 -0
- package/dist/{useOpenApp-DkZLFFCH.js → useOpenApp-DdEbOVby.js} +3 -3
- package/dist/useResolvedUrl-CgqjNxzw.js +389 -0
- package/dist/useResolvedUrl-Dz2AhrDV.cjs +1 -0
- package/package.json +1 -1
- package/dist/AppEmptyState-CLc00OOG.cjs +0 -1
- package/dist/AppIcon-C8vHUVcb.cjs +0 -1
- package/dist/AppMenuBar-CAlkNHjj.cjs +0 -1
- package/dist/CalendarApp-DOmjWbpl.js +0 -10
- package/dist/CalendarApp-Z0bCCYsK.cjs +0 -1
- package/dist/ColorPicker-CQRRwY-y.cjs +0 -1
- package/dist/CreateItemApp-BkFFFdX1.cjs +0 -1
- package/dist/CreateItemApp-DR8Y4bwo.js +0 -202
- package/dist/DeviceInfoApp-BXQ9uOwF.cjs +0 -1
- package/dist/DeviceInfoApp-I63mJRWy.js +0 -195
- package/dist/DownloadProgress-CkTGTf0z.cjs +0 -1
- package/dist/FilePickerApp-By6-vbag.cjs +0 -1
- package/dist/FilesApp-BC4UPNuw.cjs +0 -1
- package/dist/FilesApp-D8MqvC5X.js +0 -210
- package/dist/ImageViewerApp-B1niWF75.cjs +0 -1
- package/dist/ImageViewerApp-iojtyFEf.js +0 -69
- package/dist/ImageViewerMenuBar-BgzgSF3v.cjs +0 -1
- package/dist/MenuEditApp-BHptoJbz.cjs +0 -1
- package/dist/MenuEditApp-CJUbJaqh.js +0 -492
- package/dist/MenuEditMenuBar-CCOSPAUe.cjs +0 -1
- package/dist/MenuEditMenuBar-DnCL-kaZ.js +0 -60
- package/dist/NotesApp-BmQIBtJ2.cjs +0 -1
- package/dist/NotesApp-DJ2dGt4-.js +0 -364
- package/dist/NotesMenuBar-BzojwMtH.cjs +0 -1
- package/dist/PdfApp-IjY_GtnW.js +0 -39
- package/dist/PdfApp-krW8UI97.cjs +0 -1
- package/dist/PdfMenuBar-Bd5MTZcZ.js +0 -39
- package/dist/PdfMenuBar-DWD0Qa3F.cjs +0 -1
- package/dist/SettingsApp-BE22l5UP.cjs +0 -1
- package/dist/SettingsApp-BTFtTFY_.js +0 -1228
- package/dist/SettingsMenuBar-CZE2evG2.cjs +0 -1
- package/dist/SettingsMenuBar-ktC0viTd.js +0 -42
- package/dist/UploaderApp-D_qD3O70.cjs +0 -1
- package/dist/VscIcon-BYb_Soyy.cjs +0 -1
- package/dist/buildBreadcrumbs-Ccd8i11b.cjs +0 -1
- package/dist/desktopStore-C1jR6Fdb.cjs +0 -1
- package/dist/imageViewerStore-Dfylg59V.cjs +0 -1
- package/dist/menuEditStore-CYwtfD6H.cjs +0 -1
- package/dist/notesStore-CrWTO6oB.cjs +0 -1
- package/dist/rolldown-runtime-CAFD8bLK.js +0 -11
- package/dist/settingsAppStore-DuYZNeFf.cjs +0 -1
- package/dist/useAdaptiveDimensions-3Lz4X0Tc.cjs +0 -1
- package/dist/useCloseInterceptor-CdX-09Ib.cjs +0 -1
- package/dist/useDynamicIcon-CK6SjEv5.cjs +0 -1
- package/dist/useOpenApp-D-FOY88T.cjs +0 -1
- package/dist/useResolvedUrl-B6x4xy0x.js +0 -29
- package/dist/useResolvedUrl-Bb39DpVy.cjs +0 -1
- /package/dist/{Colors-CuABn2W4.js → Colors-BIj4g0eH.js} +0 -0
- /package/dist/{Colors-CNJbU7oq.cjs → Colors-PNt4eyR6.cjs} +0 -0
- /package/dist/{DownloadProgress-DnVASsv5.js → DownloadProgress-DBFA58C5.js} +0 -0
- /package/dist/{imageViewerStore-COrD02Zu.js → imageViewerStore-C6UgceP-.js} +0 -0
- /package/dist/{menuEditStore-CxsgLiQu.js → menuEditStore-DPqViGva.js} +0 -0
- /package/dist/{notesStore-Dgah46U5.js → notesStore-KZDXN6zx.js} +0 -0
- /package/dist/{settingsAppStore-DHZhi6Rl.js → settingsAppStore-Y7x3r6pV.js} +0 -0
- /package/dist/{useMenuBarUtils-DAap0ukp.cjs → useMenuBarUtils-BOnQYtKU.cjs} +0 -0
- /package/dist/{useMenuBarUtils-ChAfI7OA.js → useMenuBarUtils-DTPFK0IN.js} +0 -0
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
require(`./NotesApp-BmQIBtJ2.cjs`);const e=require(`./Colors-CNJbU7oq.cjs`);let t=require(`react`),n=require(`react/jsx-runtime`),r=require(`framer-motion`);var i={root:`_root_19u7b_1`,container:`_container_19u7b_10`,item:`_item_19u7b_23`,label:`_label_19u7b_29`};function a(t=4){return[...e.t].sort(()=>Math.random()-.5).slice(0,t)}var o=a(),s={type:`spring`,damping:20,stiffness:300};function c(e){return[...e].sort(()=>Math.random()-.5)}var l=({label:e=`Work In Progress`})=>{let[a,l]=(0,t.useState)(o);return(0,t.useEffect)(()=>{let e=setTimeout(()=>l(e=>c(e)),1e3);return()=>clearTimeout(e)},[a]),(0,n.jsxs)(`div`,{className:i.root,"data-testid":`app-empty-state`,children:[(0,n.jsx)(`ul`,{className:i.container,children:a.map(e=>(0,n.jsx)(r.motion.li,{layout:!0,transition:s,className:i.item,style:{backgroundColor:e}},e))}),(0,n.jsx)(`p`,{className:i.label,children:e})]})};Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return a}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return l}});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
require(`./NotesApp-BmQIBtJ2.cjs`);const e=require(`./desktopStore-C1jR6Fdb.cjs`),t=require(`./useDynamicIcon-CK6SjEv5.cjs`);let n=require(`react/jsx-runtime`);var r=({fcIcon:r,fallback:i,iconUrl:a,size:o=20,color:s})=>{let c=r?.startsWith(`Fi`),l=r?.startsWith(`Vsc`),u=t.i(!c&&!l?r??``:``,{size:o}),d=t.o(c?r??``:``,{size:o,color:s}),f=t.c(l?r??``:``,{size:o});return a?(0,n.jsx)(`img`,{src:e.g(a),alt:``,width:o,height:o,style:{objectFit:`contain`}}):c&&d?d:l&&f?f:u||(i?(0,n.jsx)(`span`,{"aria-hidden":`true`,children:i}):null)};Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return r}});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
require(`./NotesApp-BmQIBtJ2.cjs`);const e=require(`./useDynamicIcon-CK6SjEv5.cjs`);let t=require(`react`),n=require(`react/jsx-runtime`),r=require(`@mantine/core`);var i=({size:t=16})=>(0,n.jsx)(`span`,{style:{color:`orange`,fontWeight:`bold`,marginLeft:`8px`,display:`flex`,alignItems:`center`},title:`Unsaved changes`,children:e.i(`FcSynchronize`,{size:t})}),a={root:`_root_1aqog_1`,menuTrigger:`_menuTrigger_1aqog_19`,element:`_element_1aqog_37`,sliderLabel:`_sliderLabel_1aqog_44`,select:`_select_1aqog_50`,textInput:`_textInput_1aqog_51`,numberInput:`_numberInput_1aqog_52`,slider:`_slider_1aqog_44`},o={size:16,style:{display:`block`}},s=({name:t})=>e.i(t,o),c=({label:i,icon:c,items:l,rightSection:u})=>{let[d,f]=(0,t.useState)(!1);return(0,n.jsxs)(r.Menu,{opened:d,onClose:()=>f(!1),withinPortal:!0,keepMounted:!0,closeOnItemClick:!0,closeOnEscape:!0,closeOnClickOutside:!0,position:`bottom-start`,children:[(0,n.jsx)(r.Menu.Target,{children:(0,n.jsxs)(`button`,{className:a.menuTrigger,onClick:()=>f(e=>!e),children:[c&&(0,n.jsx)(()=>e.i(c??``,o),{}),(0,n.jsx)(`span`,{children:i}),u&&(0,n.jsx)(`span`,{style:{marginLeft:`auto`},children:u})]})}),(0,n.jsx)(r.Menu.Dropdown,{children:l.map((e,t)=>e.type===`divider`?(0,n.jsx)(r.Menu.Divider,{},t):e.type===`slider`?(0,n.jsx)(r.Menu.Item,{closeMenuOnClick:!1,children:(0,n.jsxs)(`div`,{style:{minWidth:120},children:[e.label&&(0,n.jsx)(`div`,{style:{marginBottom:4},children:e.label}),(0,n.jsx)(r.Slider,{min:e.min,max:e.max,value:e.value,onChange:e.onChange,size:`sm`})]})},t):(0,n.jsx)(r.Menu.Item,{disabled:e.disabled,onClick:e.onClick,leftSection:e.icon?(0,n.jsx)(s,{name:e.icon}):void 0,children:e.label},t))})]})},l=({elements:e})=>{let[o,s]=(0,t.useState)({}),l=(e,t)=>{s(n=>({...n,[e]:{...n[e]??{isHovered:!1,isDragging:!1},...t}}))};return(0,n.jsx)(`div`,{className:a.root,role:`menubar`,"aria-label":`Application menu`,children:e.map((e,t)=>{switch(e.type){case`menu`:return(0,n.jsx)(c,{label:e.label,icon:e.icon,items:e.items,rightSection:e.rightSection},t);case`combobox`:return(0,n.jsx)(`div`,{className:a.element,children:(0,n.jsx)(r.Select,{data:e.options,value:e.value,onChange:t=>t&&e.onChange(t),placeholder:e.label,size:`sm`,className:a.select,comboboxProps:{withinPortal:!0}})},t);case`switch`:return(0,n.jsx)(`div`,{className:a.element,children:(0,n.jsx)(r.Switch,{label:e.label,checked:e.checked,onChange:t=>e.onChange(t.currentTarget.checked),size:`sm`})},t);case`slider`:{let i=o[t]??{isHovered:!1,isDragging:!1},s=i.isHovered||i.isDragging;return(0,n.jsx)(r.Tooltip,{label:(e.labelFormat??(e=>String(e)))(e.value),position:`bottom`,withArrow:!0,opened:s,children:(0,n.jsxs)(`div`,{className:a.element,onMouseEnter:()=>l(t,{isHovered:!0}),onMouseLeave:()=>l(t,{isHovered:!1}),children:[e.label&&(0,n.jsx)(`span`,{className:a.sliderLabel,children:e.label}),(0,n.jsx)(r.Slider,{min:e.min,max:e.max,value:e.value,onChange:n=>{e.onChange(n),l(t,{isDragging:!0})},onChangeEnd:n=>{e.onChange(n),l(t,{isDragging:!1})},size:`sm`,className:a.slider,marks:e.marks})]})},t)}case`text-input`:return(0,n.jsx)(`div`,{className:a.element,children:(0,n.jsx)(r.TextInput,{placeholder:e.placeholder,value:e.value,onChange:t=>e.onChange(t.currentTarget.value),size:`sm`,className:a.textInput})},t);case`number-input`:return(0,n.jsx)(`div`,{className:a.element,children:(0,n.jsx)(r.NumberInput,{label:e.label,value:e.value,onChange:t=>e.onChange(typeof t==`number`?t:0),min:e.min,max:e.max,step:e.step??1,placeholder:e.placeholder,size:`sm`,className:a.numberInput})},t);case`select`:return(0,n.jsx)(`div`,{className:a.element,children:(0,n.jsx)(r.Select,{label:e.label,data:e.options,value:e.value,onChange:t=>t&&e.onChange(t),size:`sm`,className:a.select,comboboxProps:{withinPortal:!0}})},t);case`dirty-indicator`:return(0,n.jsx)(`span`,{style:{marginLeft:`auto`},children:(0,n.jsx)(i,{})},t)}})})};Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return i}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return l}});
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { t as e } from "./rolldown-runtime-CAFD8bLK.js";
|
|
2
|
-
import "@mantine/dates/styles.css";
|
|
3
|
-
import { jsx as t } from "react/jsx-runtime";
|
|
4
|
-
import { Calendar as n } from "@mantine/dates";
|
|
5
|
-
var r = { root: "_root_43uio_1" }, i = /* @__PURE__ */ e({ default: () => a }), a = () => /* @__PURE__ */ t("div", {
|
|
6
|
-
className: r.root,
|
|
7
|
-
children: /* @__PURE__ */ t(n, {})
|
|
8
|
-
});
|
|
9
|
-
//#endregion
|
|
10
|
-
export { i as n, a as t };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const e=require(`./NotesApp-BmQIBtJ2.cjs`);require(`@mantine/dates/styles.css`);let t=require(`react/jsx-runtime`),n=require(`@mantine/dates`);var r={root:`_root_43uio_1`},i=e.i({default:()=>a}),a=()=>(0,t.jsx)(`div`,{className:r.root,children:(0,t.jsx)(n.Calendar,{})});Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return i}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return a}});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
require(`./NotesApp-BmQIBtJ2.cjs`);const e=require(`./Colors-CNJbU7oq.cjs`);let t=require(`react/jsx-runtime`),n=require(`@mantine/core`);var r={root:`_root_18r9b_1`,colorRow:`_colorRow_18r9b_7`,colorSwatch:`_colorSwatch_18r9b_13`,colorInput:`_colorInput_18r9b_38`},i=({value:i,onChange:a,error:o,disabled:s=!1})=>(0,t.jsxs)(`div`,{className:r.root,children:[(0,t.jsx)(`div`,{className:r.colorRow,children:e.t.map(e=>(0,t.jsx)(n.UnstyledButton,{className:r.colorSwatch,"data-selected":i===e||void 0,"data-disabled":s||void 0,style:{background:e},onClick:()=>!s&&a(e),"aria-label":`Color ${e}`,"aria-pressed":i===e,disabled:s},e))}),(0,t.jsx)(n.ColorInput,{value:i,onChange:a,placeholder:`Custom color`,size:`xs`,className:r.colorInput,"aria-label":`Custom color picker`,error:o,disabled:s})]});Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return i}});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const e=require(`./NotesApp-BmQIBtJ2.cjs`),t=require(`./desktopStore-C1jR6Fdb.cjs`),n=require(`./useDynamicIcon-CK6SjEv5.cjs`),r=require(`./VscIcon-BYb_Soyy.cjs`),i=require(`./ColorPicker-CQRRwY-y.cjs`);let a=require(`react`),o=require(`react/jsx-runtime`),s=require(`@mantine/core`);var c={root:`_root_1jzye_1`,iconGrid:`_iconGrid_1jzye_7`,iconButton:`_iconButton_1jzye_11`},l=[`VscFolder`,`VscFolderOpened`,`VscHome`,`VscServer`,`VscDatabase`,`VscBook`,`VscMail`,`VscGithub`,`VscCloud`,`VscLock`,`VscSettingsGear`,`VscStar`,`VscHeart`,`VscMusic`,`VscCamera`,`VscArchive`],u=({selectedIcon:e,selectedColor:t,onIconChange:n,onColorChange:a,colorError:u})=>(0,o.jsxs)(`div`,{className:c.root,children:[(0,o.jsx)(s.SimpleGrid,{cols:8,spacing:4,className:c.iconGrid,children:l.map(i=>{let a=e===i;return(0,o.jsx)(s.Tooltip,{label:i,openDelay:500,children:(0,o.jsx)(s.UnstyledButton,{className:c.iconButton,"data-selected":a||void 0,onClick:()=>n(i),"aria-label":i,"aria-pressed":a,children:(0,o.jsx)(r.t,{name:i,size:20,color:t})})},i)})}),(0,o.jsx)(i.t,{value:t,onChange:a,error:u})]}),d={content:`_content_ej839_1`,header:`_header_ej839_8`,nameRow:`_nameRow_ej839_13`,iconPreview:`_iconPreview_ej839_19`,nameInput:`_nameInput_ej839_30`,collapseToggle:`_collapseToggle_ej839_34`,pickerWrapper:`_pickerWrapper_ej839_46`},f=e.i({default:()=>w}),p=/^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/,m=e=>p.test(e),h={size:14,style:{display:`block`}},g=({open:e})=>n.i(e?`FcCollapse`:`FcExpand`,h),_=()=>n.i(`FcCancel`,h),v=()=>n.i(`FcCheckmark`,h),y=`VscFolder`,b=`#228be6`,x=`New File`,S=`New Folder`,C=36,w=({window:e})=>{let r=e,i=r?.contentData?.mode??`folder`,c=r?.contentData?.parentId??null,l=r?.contentData?.currentPath??`/home`,[f,p]=(0,a.useState)(i===`folder`?S:x),[h,w]=(0,a.useState)(y),[T,E]=(0,a.useState)(b),[D,O]=(0,a.useState)(r?.contentData?.iconPickerOpen??!1),k=(0,a.useRef)(null),A=t.o(e=>e.closeWindow),j=t.o(e=>e.resizeWindow),M=t.o(e=>e.createFile),N=t.o(e=>e.createFolder),P=t.o(e=>e.addNotification),F=t.o(e=>e.fsNodes),I=t.o(e=>e.windows.find(e=>e.id===r?.id)?.width??400),L=F.some(e=>e.parentId===c&&e.type===i&&e.name===f.trim()),R=i===`folder`&&D&&!m(T),z=f.trim().length>0&&!L&&!R;(0,a.useEffect)(()=>{if(!r?.id||!k.current)return;let e=k.current,t=new ResizeObserver(()=>{j(r.id,I,e.scrollHeight+C)});return t.observe(e),()=>t.disconnect()},[r,I,j]);let B=()=>{if(!z)return;let e=f.trim(),t=c??null,n=h,a=T;A(r.id),i===`folder`?N(e,t,n,a).catch(e=>{console.error(`Failed to create folder:`,e),P({id:`create-folder-error-${Date.now()}`,title:`Error`,message:`Failed to create folder: ${e instanceof Error?e.message:`Unknown error`}`,fcIcon:`FcHighPriority`})}):M(e,``,t).catch(e=>{console.error(`Failed to create file:`,e),P({id:`create-file-error-${Date.now()}`,title:`Error`,message:`Failed to create file: ${e instanceof Error?e.message:`Unknown error`}`,fcIcon:`FcHighPriority`})})},V=()=>{A(r.id)},H=n.c(h,{size:40,color:T});return(0,o.jsxs)(`div`,{ref:k,className:d.root,children:[(0,o.jsx)(`div`,{className:d.header,children:(0,o.jsxs)(s.Text,{fw:600,size:`sm`,children:[i===`folder`?`Create new folder`:`Create new file`,` in `,l,`:`]})}),(0,o.jsxs)(`div`,{className:d.content,children:[(0,o.jsxs)(`div`,{className:d.nameRow,children:[i===`folder`&&H&&(0,o.jsx)(`div`,{className:d.iconPreview,"aria-hidden":`true`,children:H}),(0,o.jsx)(s.TextInput,{value:f,onChange:e=>p(e.currentTarget.value),onKeyDown:e=>e.key===`Enter`&&B(),error:L?`There is already a ${i} with that name`:void 0,rightSection:f?(0,o.jsx)(s.ActionIcon,{variant:`transparent`,size:`sm`,onClick:()=>p(``),"aria-label":`Clear name`,children:(0,o.jsx)(_,{})}):null,autoFocus:!0,className:d.nameInput,"aria-label":`Item name`})]}),i===`folder`&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsxs)(s.UnstyledButton,{className:d.collapseToggle,onClick:()=>O(e=>!e),"aria-expanded":D,children:[(0,o.jsx)(g,{open:D}),(0,o.jsx)(s.Text,{size:`sm`,ml:6,children:`Choose custom icon or color`})]}),(0,o.jsx)(s.Collapse,{expanded:D,children:(0,o.jsx)(`div`,{className:d.pickerWrapper,children:(0,o.jsx)(u,{selectedIcon:h,selectedColor:T,onIconChange:w,onColorChange:E,colorError:R?`Enter a valid hex color (e.g. #ff0000)`:void 0})})}),(0,o.jsx)(s.Text,{size:`xs`,c:`dimmed`,mt:4,children:`You can change the icon later in folder properties.`})]}),(0,o.jsxs)(s.Group,{justify:`flex-end`,mt:`md`,children:[(0,o.jsx)(s.Button,{variant:`default`,size:`sm`,onClick:V,leftSection:(0,o.jsx)(_,{}),children:`Cancel`}),(0,o.jsx)(s.Button,{size:`sm`,onClick:B,leftSection:(0,o.jsx)(v,{}),disabled:!z,children:`OK`})]})]})]})};Object.defineProperty(exports,`i`,{enumerable:!0,get:function(){return l}}),Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return f}}),Object.defineProperty(exports,`r`,{enumerable:!0,get:function(){return u}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return w}});
|
|
@@ -1,202 +0,0 @@
|
|
|
1
|
-
import { t as e } from "./rolldown-runtime-CAFD8bLK.js";
|
|
2
|
-
import { o as t } from "./desktopStore-8cSZlj7s.js";
|
|
3
|
-
import { c as n, i as r } from "./useDynamicIcon-_wGeWu-b.js";
|
|
4
|
-
import { t as i } from "./VscIcon-AEENjKOE.js";
|
|
5
|
-
import { t as a } from "./ColorPicker-WCeD3Wjf.js";
|
|
6
|
-
import { useEffect as o, useRef as s, useState as c } from "react";
|
|
7
|
-
import { Fragment as l, jsx as u, jsxs as d } from "react/jsx-runtime";
|
|
8
|
-
import { ActionIcon as f, Button as p, Collapse as m, Group as h, SimpleGrid as g, Text as _, TextInput as v, Tooltip as y, UnstyledButton as b } from "@mantine/core";
|
|
9
|
-
var x = {
|
|
10
|
-
root: "_root_1jzye_1",
|
|
11
|
-
iconGrid: "_iconGrid_1jzye_7",
|
|
12
|
-
iconButton: "_iconButton_1jzye_11"
|
|
13
|
-
}, S = [
|
|
14
|
-
"VscFolder",
|
|
15
|
-
"VscFolderOpened",
|
|
16
|
-
"VscHome",
|
|
17
|
-
"VscServer",
|
|
18
|
-
"VscDatabase",
|
|
19
|
-
"VscBook",
|
|
20
|
-
"VscMail",
|
|
21
|
-
"VscGithub",
|
|
22
|
-
"VscCloud",
|
|
23
|
-
"VscLock",
|
|
24
|
-
"VscSettingsGear",
|
|
25
|
-
"VscStar",
|
|
26
|
-
"VscHeart",
|
|
27
|
-
"VscMusic",
|
|
28
|
-
"VscCamera",
|
|
29
|
-
"VscArchive"
|
|
30
|
-
], C = ({ selectedIcon: e, selectedColor: t, onIconChange: n, onColorChange: r, colorError: o }) => /* @__PURE__ */ d("div", {
|
|
31
|
-
className: x.root,
|
|
32
|
-
children: [/* @__PURE__ */ u(g, {
|
|
33
|
-
cols: 8,
|
|
34
|
-
spacing: 4,
|
|
35
|
-
className: x.iconGrid,
|
|
36
|
-
children: S.map((r) => {
|
|
37
|
-
let a = e === r;
|
|
38
|
-
return /* @__PURE__ */ u(y, {
|
|
39
|
-
label: r,
|
|
40
|
-
openDelay: 500,
|
|
41
|
-
children: /* @__PURE__ */ u(b, {
|
|
42
|
-
className: x.iconButton,
|
|
43
|
-
"data-selected": a || void 0,
|
|
44
|
-
onClick: () => n(r),
|
|
45
|
-
"aria-label": r,
|
|
46
|
-
"aria-pressed": a,
|
|
47
|
-
children: /* @__PURE__ */ u(i, {
|
|
48
|
-
name: r,
|
|
49
|
-
size: 20,
|
|
50
|
-
color: t
|
|
51
|
-
})
|
|
52
|
-
})
|
|
53
|
-
}, r);
|
|
54
|
-
})
|
|
55
|
-
}), /* @__PURE__ */ u(a, {
|
|
56
|
-
value: t,
|
|
57
|
-
onChange: r,
|
|
58
|
-
error: o
|
|
59
|
-
})]
|
|
60
|
-
}), w = {
|
|
61
|
-
content: "_content_ej839_1",
|
|
62
|
-
header: "_header_ej839_8",
|
|
63
|
-
nameRow: "_nameRow_ej839_13",
|
|
64
|
-
iconPreview: "_iconPreview_ej839_19",
|
|
65
|
-
nameInput: "_nameInput_ej839_30",
|
|
66
|
-
collapseToggle: "_collapseToggle_ej839_34",
|
|
67
|
-
pickerWrapper: "_pickerWrapper_ej839_46"
|
|
68
|
-
}, T = /* @__PURE__ */ e({ default: () => L }), E = /^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/, D = (e) => E.test(e), O = {
|
|
69
|
-
size: 14,
|
|
70
|
-
style: { display: "block" }
|
|
71
|
-
}, k = ({ open: e }) => r(e ? "FcCollapse" : "FcExpand", O), A = () => r("FcCancel", O), j = () => r("FcCheckmark", O), M = "VscFolder", N = "#228be6", P = "New File", F = "New Folder", I = 36, L = ({ window: e }) => {
|
|
72
|
-
let r = e, i = r?.contentData?.mode ?? "folder", a = r?.contentData?.parentId ?? null, g = r?.contentData?.currentPath ?? "/home", [y, x] = c(i === "folder" ? F : P), [S, T] = c(M), [E, O] = c(N), [L, R] = c(r?.contentData?.iconPickerOpen ?? !1), z = s(null), B = t((e) => e.closeWindow), V = t((e) => e.resizeWindow), H = t((e) => e.createFile), U = t((e) => e.createFolder), W = t((e) => e.addNotification), G = t((e) => e.fsNodes), K = t((e) => e.windows.find((e) => e.id === r?.id)?.width ?? 400), q = G.some((e) => e.parentId === a && e.type === i && e.name === y.trim()), J = i === "folder" && L && !D(E), Y = y.trim().length > 0 && !q && !J;
|
|
73
|
-
o(() => {
|
|
74
|
-
if (!r?.id || !z.current) return;
|
|
75
|
-
let e = z.current, t = new ResizeObserver(() => {
|
|
76
|
-
V(r.id, K, e.scrollHeight + I);
|
|
77
|
-
});
|
|
78
|
-
return t.observe(e), () => t.disconnect();
|
|
79
|
-
}, [
|
|
80
|
-
r,
|
|
81
|
-
K,
|
|
82
|
-
V
|
|
83
|
-
]);
|
|
84
|
-
let X = () => {
|
|
85
|
-
if (!Y) return;
|
|
86
|
-
let e = y.trim(), t = a ?? null, n = S, o = E;
|
|
87
|
-
B(r.id), i === "folder" ? U(e, t, n, o).catch((e) => {
|
|
88
|
-
console.error("Failed to create folder:", e), W({
|
|
89
|
-
id: `create-folder-error-${Date.now()}`,
|
|
90
|
-
title: "Error",
|
|
91
|
-
message: `Failed to create folder: ${e instanceof Error ? e.message : "Unknown error"}`,
|
|
92
|
-
fcIcon: "FcHighPriority"
|
|
93
|
-
});
|
|
94
|
-
}) : H(e, "", t).catch((e) => {
|
|
95
|
-
console.error("Failed to create file:", e), W({
|
|
96
|
-
id: `create-file-error-${Date.now()}`,
|
|
97
|
-
title: "Error",
|
|
98
|
-
message: `Failed to create file: ${e instanceof Error ? e.message : "Unknown error"}`,
|
|
99
|
-
fcIcon: "FcHighPriority"
|
|
100
|
-
});
|
|
101
|
-
});
|
|
102
|
-
}, Z = () => {
|
|
103
|
-
B(r.id);
|
|
104
|
-
}, Q = n(S, {
|
|
105
|
-
size: 40,
|
|
106
|
-
color: E
|
|
107
|
-
});
|
|
108
|
-
return /* @__PURE__ */ d("div", {
|
|
109
|
-
ref: z,
|
|
110
|
-
className: w.root,
|
|
111
|
-
children: [/* @__PURE__ */ u("div", {
|
|
112
|
-
className: w.header,
|
|
113
|
-
children: /* @__PURE__ */ d(_, {
|
|
114
|
-
fw: 600,
|
|
115
|
-
size: "sm",
|
|
116
|
-
children: [
|
|
117
|
-
i === "folder" ? "Create new folder" : "Create new file",
|
|
118
|
-
" in ",
|
|
119
|
-
g,
|
|
120
|
-
":"
|
|
121
|
-
]
|
|
122
|
-
})
|
|
123
|
-
}), /* @__PURE__ */ d("div", {
|
|
124
|
-
className: w.content,
|
|
125
|
-
children: [
|
|
126
|
-
/* @__PURE__ */ d("div", {
|
|
127
|
-
className: w.nameRow,
|
|
128
|
-
children: [i === "folder" && Q && /* @__PURE__ */ u("div", {
|
|
129
|
-
className: w.iconPreview,
|
|
130
|
-
"aria-hidden": "true",
|
|
131
|
-
children: Q
|
|
132
|
-
}), /* @__PURE__ */ u(v, {
|
|
133
|
-
value: y,
|
|
134
|
-
onChange: (e) => x(e.currentTarget.value),
|
|
135
|
-
onKeyDown: (e) => e.key === "Enter" && X(),
|
|
136
|
-
error: q ? `There is already a ${i} with that name` : void 0,
|
|
137
|
-
rightSection: y ? /* @__PURE__ */ u(f, {
|
|
138
|
-
variant: "transparent",
|
|
139
|
-
size: "sm",
|
|
140
|
-
onClick: () => x(""),
|
|
141
|
-
"aria-label": "Clear name",
|
|
142
|
-
children: /* @__PURE__ */ u(A, {})
|
|
143
|
-
}) : null,
|
|
144
|
-
autoFocus: !0,
|
|
145
|
-
className: w.nameInput,
|
|
146
|
-
"aria-label": "Item name"
|
|
147
|
-
})]
|
|
148
|
-
}),
|
|
149
|
-
i === "folder" && /* @__PURE__ */ d(l, { children: [
|
|
150
|
-
/* @__PURE__ */ d(b, {
|
|
151
|
-
className: w.collapseToggle,
|
|
152
|
-
onClick: () => R((e) => !e),
|
|
153
|
-
"aria-expanded": L,
|
|
154
|
-
children: [/* @__PURE__ */ u(k, { open: L }), /* @__PURE__ */ u(_, {
|
|
155
|
-
size: "sm",
|
|
156
|
-
ml: 6,
|
|
157
|
-
children: "Choose custom icon or color"
|
|
158
|
-
})]
|
|
159
|
-
}),
|
|
160
|
-
/* @__PURE__ */ u(m, {
|
|
161
|
-
expanded: L,
|
|
162
|
-
children: /* @__PURE__ */ u("div", {
|
|
163
|
-
className: w.pickerWrapper,
|
|
164
|
-
children: /* @__PURE__ */ u(C, {
|
|
165
|
-
selectedIcon: S,
|
|
166
|
-
selectedColor: E,
|
|
167
|
-
onIconChange: T,
|
|
168
|
-
onColorChange: O,
|
|
169
|
-
colorError: J ? "Enter a valid hex color (e.g. #ff0000)" : void 0
|
|
170
|
-
})
|
|
171
|
-
})
|
|
172
|
-
}),
|
|
173
|
-
/* @__PURE__ */ u(_, {
|
|
174
|
-
size: "xs",
|
|
175
|
-
c: "dimmed",
|
|
176
|
-
mt: 4,
|
|
177
|
-
children: "You can change the icon later in folder properties."
|
|
178
|
-
})
|
|
179
|
-
] }),
|
|
180
|
-
/* @__PURE__ */ d(h, {
|
|
181
|
-
justify: "flex-end",
|
|
182
|
-
mt: "md",
|
|
183
|
-
children: [/* @__PURE__ */ u(p, {
|
|
184
|
-
variant: "default",
|
|
185
|
-
size: "sm",
|
|
186
|
-
onClick: Z,
|
|
187
|
-
leftSection: /* @__PURE__ */ u(A, {}),
|
|
188
|
-
children: "Cancel"
|
|
189
|
-
}), /* @__PURE__ */ u(p, {
|
|
190
|
-
size: "sm",
|
|
191
|
-
onClick: X,
|
|
192
|
-
leftSection: /* @__PURE__ */ u(j, {}),
|
|
193
|
-
disabled: !Y,
|
|
194
|
-
children: "OK"
|
|
195
|
-
})]
|
|
196
|
-
})
|
|
197
|
-
]
|
|
198
|
-
})]
|
|
199
|
-
});
|
|
200
|
-
};
|
|
201
|
-
//#endregion
|
|
202
|
-
export { S as i, T as n, C as r, L as t };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const e=require(`./NotesApp-BmQIBtJ2.cjs`),t=require(`./desktopStore-C1jR6Fdb.cjs`),n=require(`./useAdaptiveDimensions-3Lz4X0Tc.cjs`);let r=require(`react`),i=require(`react/jsx-runtime`),a=require(`@mantine/core`);var o=()=>{let e=window.innerWidth,n=window.matchMedia(`(pointer: coarse)`).matches;return e<t.p.MOBILE||n},s=()=>{let e=window.innerWidth;return e>=t.p.MOBILE&&e<t.p.TABLET},c=()=>window.innerWidth>=t.p.TABLET,l=()=>screen.orientation?screen.orientation.type.includes(`portrait`):window.innerHeight>window.innerWidth;function u(){let[e,t]=(0,r.useState)(()=>({isMobile:o(),isTablet:s(),isDesktop:c(),isPortrait:l(),shouldShowWarning:o()&&l(),screenWidth:window.innerWidth,screenHeight:window.innerHeight})),n=(0,r.useCallback)(()=>{let e=o(),n=l();t({isMobile:e,isTablet:s(),isDesktop:c(),isPortrait:n,shouldShowWarning:e&&n,screenWidth:window.innerWidth,screenHeight:window.innerHeight})},[]);return(0,r.useEffect)(()=>(window.addEventListener(`resize`,n),screen.orientation?.addEventListener?.(`change`,n),()=>{window.removeEventListener(`resize`,n),screen.orientation?.removeEventListener?.(`change`,n)}),[n]),e}var d={container:`_container_1o4i3_1`},f=e.i({default:()=>p}),p=({window:e,notifyReady:o})=>{let s=u(),c=n.t(),l=t.o(e=>e.viewportWidth),f=t.o(e=>e.viewportHeight),p=t.o(e=>e.setViewportSize);return(0,r.useEffect)(()=>{o?.({})},[o]),(0,r.useEffect)(()=>{let e=()=>{p(window.innerWidth,window.innerHeight)};return e(),window.addEventListener(`resize`,e),()=>window.removeEventListener(`resize`,e)},[p]),(0,i.jsxs)(`div`,{className:d.container,"data-windowid":e?.id,children:[(0,i.jsx)(a.Paper,{p:`sm`,shadow:`sm`,withBorder:!0,children:(0,i.jsxs)(a.Stack,{gap:`xs`,children:[(0,i.jsx)(a.Text,{fw:`bold`,size:`sm`,children:`Runtime Environment`}),(0,i.jsxs)(a.Text,{size:`xs`,children:[(0,i.jsx)(a.Code,{children:`isDocker:`}),` `,String(t.G())]}),(0,i.jsxs)(a.Text,{size:`xs`,children:[(0,i.jsx)(a.Code,{children:`isDev:`}),` `,String(t.W())]})]})}),(0,i.jsx)(a.Paper,{p:`sm`,shadow:`sm`,withBorder:!0,mt:`sm`,children:(0,i.jsxs)(a.Stack,{gap:`xs`,children:[(0,i.jsx)(a.Text,{fw:`bold`,size:`sm`,children:`Device Detection`}),(0,i.jsxs)(a.Text,{size:`xs`,children:[(0,i.jsx)(a.Code,{children:`isMobile:`}),` `,String(s.isMobile)]}),(0,i.jsxs)(a.Text,{size:`xs`,children:[(0,i.jsx)(a.Code,{children:`isTablet:`}),` `,String(s.isTablet)]}),(0,i.jsxs)(a.Text,{size:`xs`,children:[(0,i.jsx)(a.Code,{children:`isDesktop:`}),` `,String(s.isDesktop)]}),(0,i.jsxs)(a.Text,{size:`xs`,children:[(0,i.jsx)(a.Code,{children:`isPortrait:`}),` `,String(s.isPortrait)]}),(0,i.jsxs)(a.Text,{size:`xs`,children:[(0,i.jsx)(a.Code,{children:`shouldShowWarning:`}),` `,String(s.shouldShowWarning)]}),(0,i.jsxs)(a.Text,{size:`xs`,children:[(0,i.jsx)(a.Code,{children:`viewportWidth:`}),` `,l,`px`]}),(0,i.jsxs)(a.Text,{size:`xs`,children:[(0,i.jsx)(a.Code,{children:`viewportHeight:`}),` `,f,`px`]}),(0,i.jsxs)(a.Text,{size:`xs`,children:[(0,i.jsx)(a.Code,{children:`defaultWidth:`}),` `,c.defaultWidth,`px`]}),(0,i.jsxs)(a.Text,{size:`xs`,children:[(0,i.jsx)(a.Code,{children:`defaultHeight:`}),` `,c.defaultHeight,`px`]}),(0,i.jsxs)(a.Text,{size:`xs`,children:[(0,i.jsx)(a.Code,{children:`minWidth:`}),` `,c.minWidth,`px`]}),(0,i.jsxs)(a.Text,{size:`xs`,children:[(0,i.jsx)(a.Code,{children:`minHeight:`}),` `,c.minHeight,`px`]})]})})]})};Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return f}}),Object.defineProperty(exports,`r`,{enumerable:!0,get:function(){return u}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return p}});
|
|
@@ -1,195 +0,0 @@
|
|
|
1
|
-
import { t as e } from "./rolldown-runtime-CAFD8bLK.js";
|
|
2
|
-
import { G as t, W as n, o as r, p as i } from "./desktopStore-8cSZlj7s.js";
|
|
3
|
-
import { t as a } from "./useAdaptiveDimensions-DxNLJ7R5.js";
|
|
4
|
-
import { useCallback as o, useEffect as s, useState as c } from "react";
|
|
5
|
-
import { jsx as l, jsxs as u } from "react/jsx-runtime";
|
|
6
|
-
import { Code as d, Paper as f, Stack as p, Text as m } from "@mantine/core";
|
|
7
|
-
//#region src/hooks/useDeviceDetection.ts
|
|
8
|
-
var h = () => {
|
|
9
|
-
let e = window.innerWidth, t = window.matchMedia("(pointer: coarse)").matches;
|
|
10
|
-
return e < i.MOBILE || t;
|
|
11
|
-
}, g = () => {
|
|
12
|
-
let e = window.innerWidth;
|
|
13
|
-
return e >= i.MOBILE && e < i.TABLET;
|
|
14
|
-
}, _ = () => window.innerWidth >= i.TABLET, v = () => screen.orientation ? screen.orientation.type.includes("portrait") : window.innerHeight > window.innerWidth;
|
|
15
|
-
function y() {
|
|
16
|
-
let [e, t] = c(() => ({
|
|
17
|
-
isMobile: h(),
|
|
18
|
-
isTablet: g(),
|
|
19
|
-
isDesktop: _(),
|
|
20
|
-
isPortrait: v(),
|
|
21
|
-
shouldShowWarning: h() && v(),
|
|
22
|
-
screenWidth: window.innerWidth,
|
|
23
|
-
screenHeight: window.innerHeight
|
|
24
|
-
})), n = o(() => {
|
|
25
|
-
let e = h(), n = v();
|
|
26
|
-
t({
|
|
27
|
-
isMobile: e,
|
|
28
|
-
isTablet: g(),
|
|
29
|
-
isDesktop: _(),
|
|
30
|
-
isPortrait: n,
|
|
31
|
-
shouldShowWarning: e && n,
|
|
32
|
-
screenWidth: window.innerWidth,
|
|
33
|
-
screenHeight: window.innerHeight
|
|
34
|
-
});
|
|
35
|
-
}, []);
|
|
36
|
-
return s(() => (window.addEventListener("resize", n), screen.orientation?.addEventListener?.("change", n), () => {
|
|
37
|
-
window.removeEventListener("resize", n), screen.orientation?.removeEventListener?.("change", n);
|
|
38
|
-
}), [n]), e;
|
|
39
|
-
}
|
|
40
|
-
var b = { container: "_container_1o4i3_1" }, x = /* @__PURE__ */ e({ default: () => S }), S = ({ window: e, notifyReady: i }) => {
|
|
41
|
-
let o = y(), c = a(), h = r((e) => e.viewportWidth), g = r((e) => e.viewportHeight), _ = r((e) => e.setViewportSize);
|
|
42
|
-
return s(() => {
|
|
43
|
-
i?.({});
|
|
44
|
-
}, [i]), s(() => {
|
|
45
|
-
let e = () => {
|
|
46
|
-
_(window.innerWidth, window.innerHeight);
|
|
47
|
-
};
|
|
48
|
-
return e(), window.addEventListener("resize", e), () => window.removeEventListener("resize", e);
|
|
49
|
-
}, [_]), /* @__PURE__ */ u("div", {
|
|
50
|
-
className: b.container,
|
|
51
|
-
"data-windowid": e?.id,
|
|
52
|
-
children: [/* @__PURE__ */ l(f, {
|
|
53
|
-
p: "sm",
|
|
54
|
-
shadow: "sm",
|
|
55
|
-
withBorder: !0,
|
|
56
|
-
children: /* @__PURE__ */ u(p, {
|
|
57
|
-
gap: "xs",
|
|
58
|
-
children: [
|
|
59
|
-
/* @__PURE__ */ l(m, {
|
|
60
|
-
fw: "bold",
|
|
61
|
-
size: "sm",
|
|
62
|
-
children: "Runtime Environment"
|
|
63
|
-
}),
|
|
64
|
-
/* @__PURE__ */ u(m, {
|
|
65
|
-
size: "xs",
|
|
66
|
-
children: [
|
|
67
|
-
/* @__PURE__ */ l(d, { children: "isDocker:" }),
|
|
68
|
-
" ",
|
|
69
|
-
String(t())
|
|
70
|
-
]
|
|
71
|
-
}),
|
|
72
|
-
/* @__PURE__ */ u(m, {
|
|
73
|
-
size: "xs",
|
|
74
|
-
children: [
|
|
75
|
-
/* @__PURE__ */ l(d, { children: "isDev:" }),
|
|
76
|
-
" ",
|
|
77
|
-
String(n())
|
|
78
|
-
]
|
|
79
|
-
})
|
|
80
|
-
]
|
|
81
|
-
})
|
|
82
|
-
}), /* @__PURE__ */ l(f, {
|
|
83
|
-
p: "sm",
|
|
84
|
-
shadow: "sm",
|
|
85
|
-
withBorder: !0,
|
|
86
|
-
mt: "sm",
|
|
87
|
-
children: /* @__PURE__ */ u(p, {
|
|
88
|
-
gap: "xs",
|
|
89
|
-
children: [
|
|
90
|
-
/* @__PURE__ */ l(m, {
|
|
91
|
-
fw: "bold",
|
|
92
|
-
size: "sm",
|
|
93
|
-
children: "Device Detection"
|
|
94
|
-
}),
|
|
95
|
-
/* @__PURE__ */ u(m, {
|
|
96
|
-
size: "xs",
|
|
97
|
-
children: [
|
|
98
|
-
/* @__PURE__ */ l(d, { children: "isMobile:" }),
|
|
99
|
-
" ",
|
|
100
|
-
String(o.isMobile)
|
|
101
|
-
]
|
|
102
|
-
}),
|
|
103
|
-
/* @__PURE__ */ u(m, {
|
|
104
|
-
size: "xs",
|
|
105
|
-
children: [
|
|
106
|
-
/* @__PURE__ */ l(d, { children: "isTablet:" }),
|
|
107
|
-
" ",
|
|
108
|
-
String(o.isTablet)
|
|
109
|
-
]
|
|
110
|
-
}),
|
|
111
|
-
/* @__PURE__ */ u(m, {
|
|
112
|
-
size: "xs",
|
|
113
|
-
children: [
|
|
114
|
-
/* @__PURE__ */ l(d, { children: "isDesktop:" }),
|
|
115
|
-
" ",
|
|
116
|
-
String(o.isDesktop)
|
|
117
|
-
]
|
|
118
|
-
}),
|
|
119
|
-
/* @__PURE__ */ u(m, {
|
|
120
|
-
size: "xs",
|
|
121
|
-
children: [
|
|
122
|
-
/* @__PURE__ */ l(d, { children: "isPortrait:" }),
|
|
123
|
-
" ",
|
|
124
|
-
String(o.isPortrait)
|
|
125
|
-
]
|
|
126
|
-
}),
|
|
127
|
-
/* @__PURE__ */ u(m, {
|
|
128
|
-
size: "xs",
|
|
129
|
-
children: [
|
|
130
|
-
/* @__PURE__ */ l(d, { children: "shouldShowWarning:" }),
|
|
131
|
-
" ",
|
|
132
|
-
String(o.shouldShowWarning)
|
|
133
|
-
]
|
|
134
|
-
}),
|
|
135
|
-
/* @__PURE__ */ u(m, {
|
|
136
|
-
size: "xs",
|
|
137
|
-
children: [
|
|
138
|
-
/* @__PURE__ */ l(d, { children: "viewportWidth:" }),
|
|
139
|
-
" ",
|
|
140
|
-
h,
|
|
141
|
-
"px"
|
|
142
|
-
]
|
|
143
|
-
}),
|
|
144
|
-
/* @__PURE__ */ u(m, {
|
|
145
|
-
size: "xs",
|
|
146
|
-
children: [
|
|
147
|
-
/* @__PURE__ */ l(d, { children: "viewportHeight:" }),
|
|
148
|
-
" ",
|
|
149
|
-
g,
|
|
150
|
-
"px"
|
|
151
|
-
]
|
|
152
|
-
}),
|
|
153
|
-
/* @__PURE__ */ u(m, {
|
|
154
|
-
size: "xs",
|
|
155
|
-
children: [
|
|
156
|
-
/* @__PURE__ */ l(d, { children: "defaultWidth:" }),
|
|
157
|
-
" ",
|
|
158
|
-
c.defaultWidth,
|
|
159
|
-
"px"
|
|
160
|
-
]
|
|
161
|
-
}),
|
|
162
|
-
/* @__PURE__ */ u(m, {
|
|
163
|
-
size: "xs",
|
|
164
|
-
children: [
|
|
165
|
-
/* @__PURE__ */ l(d, { children: "defaultHeight:" }),
|
|
166
|
-
" ",
|
|
167
|
-
c.defaultHeight,
|
|
168
|
-
"px"
|
|
169
|
-
]
|
|
170
|
-
}),
|
|
171
|
-
/* @__PURE__ */ u(m, {
|
|
172
|
-
size: "xs",
|
|
173
|
-
children: [
|
|
174
|
-
/* @__PURE__ */ l(d, { children: "minWidth:" }),
|
|
175
|
-
" ",
|
|
176
|
-
c.minWidth,
|
|
177
|
-
"px"
|
|
178
|
-
]
|
|
179
|
-
}),
|
|
180
|
-
/* @__PURE__ */ u(m, {
|
|
181
|
-
size: "xs",
|
|
182
|
-
children: [
|
|
183
|
-
/* @__PURE__ */ l(d, { children: "minHeight:" }),
|
|
184
|
-
" ",
|
|
185
|
-
c.minHeight,
|
|
186
|
-
"px"
|
|
187
|
-
]
|
|
188
|
-
})
|
|
189
|
-
]
|
|
190
|
-
})
|
|
191
|
-
})]
|
|
192
|
-
});
|
|
193
|
-
};
|
|
194
|
-
//#endregion
|
|
195
|
-
export { x as n, y as r, S as t };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
require(`./NotesApp-BmQIBtJ2.cjs`);const e=require(`./useDynamicIcon-CK6SjEv5.cjs`);let t=require(`react`),n=require(`react/jsx-runtime`),r=require(`@mantine/core`);var i={spinner:`_spinner_yguq4_1`,spin:`_spin_yguq4_1`},a=e=>(e/1024).toFixed(1),o=({state:o,ariaLabel:s=`Download progress`,minDisplayTime:c=1e3})=>{let{status:l,loaded:u,total:d}=o,f=e.i(`FcProcess`,{size:24}),[p,m]=(0,t.useState)(null);if((0,t.useEffect)(()=>{if(l!==`done`&&l!==`error`)return;let e=Date.now(),t=setTimeout(()=>{m(e)},c);return()=>clearTimeout(t)},[l,c]),l===`idle`)return null;let h=d===null?`${a(u)} KB`:`${a(u)} / ${a(d)} KB`;return p?(0,n.jsx)(r.Progress,{value:100,size:`sm`,"aria-label":s,children:(0,n.jsxs)(r.Progress.Label,{children:[a(u),` KB`]})}):(0,n.jsxs)(r.Group,{gap:`sm`,align:`center`,justify:`center`,style:{minHeight:40},children:[(0,n.jsx)(r.Box,{className:i.spinner,"data-testid":`process-icon`,children:f}),(0,n.jsx)(r.Text,{size:`sm`,children:h})]})};Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return o}});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
require(`./NotesApp-BmQIBtJ2.cjs`);const e=require(`./desktopStore-C1jR6Fdb.cjs`),t=require(`./buildBreadcrumbs-Ccd8i11b.cjs`);let n=require(`react`),r=require(`react/jsx-runtime`),i=require(`@mantine/core`),a=require(`react-i18next`);var o={root:`_root_b2ks8_1`,breadcrumbBar:`_breadcrumbBar_b2ks8_8`,breadcrumbSep:`_breadcrumbSep_b2ks8_15`,body:`_body_b2ks8_20`,sidebar:`_sidebar_b2ks8_27`,folderTree:`_folderTree_b2ks8_34`,treeItem:`_treeItem_b2ks8_41`,content:`_content_b2ks8_61`,grid:`_grid_b2ks8_67`,item:`_item_b2ks8_75`,icon:`_icon_b2ks8_97`,name:`_name_b2ks8_105`,empty:`_empty_b2ks8_117`,actionBar:`_actionBar_b2ks8_125`,selectedLabel:`_selectedLabel_b2ks8_136`,saveActionBar:`_saveActionBar_b2ks8_142`,fileNameInput:`_fileNameInput_b2ks8_152`,overlay:`_overlay_b2ks8_158`,panel:`_panel_b2ks8_168`},s=(0,n.memo)(({currentFolderId:e,fsNodes:n,onNavigate:a})=>{let s=t.t(e,n);return(0,r.jsx)(`div`,{className:o.breadcrumbBar,children:(0,r.jsx)(i.Breadcrumbs,{separator:`›`,classNames:{separator:o.breadcrumbSep},children:s.map((e,t)=>t===s.length-1?(0,r.jsx)(i.Text,{size:`xs`,fw:500,children:e.name},e.id??`root`):(0,r.jsx)(i.Anchor,{size:`xs`,onClick:()=>a(e.id),children:e.name},e.id??`root`))})})}),c=(0,n.memo)(({node:e,allNodes:n,currentFolderId:a,depth:s,onNavigate:l})=>{let u=n.filter(t=>t.parentId===e.id&&t.type===`folder`);return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(i.UnstyledButton,{className:o.treeItem,"data-active":a===e.id||void 0,style:{paddingLeft:8+s*14},onClick:()=>l(e.id),"aria-label":e.name,"aria-current":a===e.id?`page`:void 0,children:[(0,r.jsx)(t.n,{type:`folder`,folderNode:e,size:14}),(0,r.jsx)(i.Text,{size:`xs`,ml:6,truncate:!0,children:e.name})]}),u.map(e=>(0,r.jsx)(c,{node:e,allNodes:n,currentFolderId:a,depth:s+1,onNavigate:l},e.id))]})}),l=(0,n.memo)(({currentFolderId:e,fsNodes:n,onNavigate:s})=>{let{t:l}=(0,a.useTranslation)(`window`),u=n.filter(e=>e.parentId===null&&e.type===`folder`);return(0,r.jsx)(`aside`,{className:o.sidebar,children:(0,r.jsxs)(`nav`,{className:o.folderTree,"aria-label":l(`fileDialog.folderTreeAria`,{ns:`common`}),children:[(0,r.jsxs)(i.UnstyledButton,{className:o.treeItem,"data-active":e===null||void 0,style:{paddingLeft:8},onClick:()=>s(null),"aria-label":l(`common:labels.home`),"aria-current":e===null?`page`:void 0,children:[(0,r.jsx)(t.n,{type:`folder`,size:14}),(0,r.jsx)(i.Text,{size:`xs`,ml:6,fw:500,children:l(`common:labels.home`)})]}),u.map(t=>(0,r.jsx)(c,{node:t,allNodes:n,currentFolderId:e,depth:1,onNavigate:s},t.id))]})})}),u=(0,n.memo)(({currentFolderId:n,fsNodes:s,onNavigate:c,onItemDoubleClick:l})=>{let{t:u}=(0,a.useTranslation)(`window`),d=s.filter(e=>e.parentId===n&&e.type===`folder`);if(d.length===0)return(0,r.jsx)(`div`,{className:o.empty,children:(0,r.jsx)(i.Text,{size:`sm`,c:`dimmed`,children:u(`common:messages.noSubfolders`)})});let f=e.E(d);return(0,r.jsx)(`div`,{className:o.grid,role:`listbox`,"aria-label":u(`fileDialog.foldersAria`,{ns:`common`}),children:f.map(e=>(0,r.jsxs)(i.UnstyledButton,{className:o.item,onDoubleClick:()=>{c(e.id),l?.(e)},"aria-label":u(`fileDialog.openFolder`,{name:e.name}),role:`option`,children:[(0,r.jsx)(`div`,{className:o.icon,children:(0,r.jsx)(t.n,{type:`folder`,name:e.name,folderNode:e,size:32})}),(0,r.jsx)(i.Text,{size:`xs`,className:o.name,truncate:!0,children:e.name})]},e.id))})}),d=(0,n.memo)(({opened:e,children:t,ariaLabelKey:n,ariaLabelNs:i=`window`})=>{let{t:s}=(0,a.useTranslation)(i);return e?(0,r.jsx)(`div`,{className:o.overlay,role:`dialog`,"aria-label":s(n),children:(0,r.jsx)(`div`,{className:o.panel,children:t})}):null}),f=({acceptedMimeTypes:c,onConfirm:u,onCancel:d})=>{let{t:f}=(0,a.useTranslation)(`window`),p=e.o(e=>e.fsNodes),[m,h]=(0,n.useState)(null),[g,_]=(0,n.useState)(null),v=m===null?p.filter(e=>e.parentId===null):p.filter(e=>e.parentId===m),y=v.filter(e=>{if(e.type===`folder`)return!0;let t=e;return!c||c.length===0?!0:c.some(e=>t.mimeType===e||e.endsWith(`/*`)&&t.mimeType?.startsWith(e.slice(0,-1)))}),b=(0,n.useCallback)(e=>{h(e),_(null)},[]),x=(0,n.useCallback)(e=>{e.type===`file`&&_(e)},[]),S=(0,n.useCallback)(e=>{e.type===`folder`?b(e.id):u(e)},[b,u]);return(0,r.jsxs)(`div`,{className:o.root,children:[(0,r.jsx)(s,{currentFolderId:m,fsNodes:p,onNavigate:b}),(0,r.jsxs)(`div`,{className:o.body,children:[(0,r.jsx)(l,{currentFolderId:m,fsNodes:p,onNavigate:b}),(0,r.jsx)(`main`,{className:o.content,children:y.length===0?(0,r.jsx)(`div`,{className:o.empty,children:(0,r.jsx)(i.Text,{size:`sm`,c:`dimmed`,children:v.length===0?f(`common:messages.folderEmpty`):f(`common:messages.noMatchingFiles`)})}):(0,r.jsx)(`div`,{className:o.grid,role:`listbox`,"aria-label":f(`fileDialog.filesAria`,{ns:`common`}),children:e.E(y).map(e=>{let n=g?.id===e.id;return(0,r.jsxs)(i.UnstyledButton,{className:o.item,"data-selected":n||void 0,"data-type":e.type,onClick:()=>x(e),onDoubleClick:()=>S(e),"aria-label":e.type===`folder`?f(`fileDialog.openFolder`,{name:e.name,ns:`window`}):f(`fileDialog.selectFile`,{name:e.name,ns:`window`}),"aria-selected":e.type===`file`?n:void 0,role:`option`,children:[(0,r.jsx)(`div`,{className:o.icon,children:(0,r.jsx)(t.n,{type:e.type,name:e.name,folderNode:e.type===`folder`?e:void 0,size:32})}),(0,r.jsx)(i.Text,{size:`xs`,className:o.name,truncate:!0,children:e.name})]},e.id)})})})]}),(0,r.jsxs)(`div`,{className:o.actionBar,children:[(0,r.jsx)(i.Text,{size:`xs`,c:`dimmed`,truncate:!0,className:o.selectedLabel,children:g?g.name:f(`common:messages.noFileSelected`)}),(0,r.jsxs)(i.Group,{gap:`xs`,children:[(0,r.jsx)(i.Button,{variant:`default`,size:`xs`,onClick:d,"aria-label":f(`filePicker.cancelAria`,{ns:`common`}),children:f(`common:actions.cancel`)}),(0,r.jsx)(i.Button,{size:`xs`,disabled:!g,onClick:()=>g&&u(g),"aria-label":f(`filePicker.openSelectedAria`,{ns:`common`}),children:f(`common:actions.open`)})]})]})]})},p=({opened:e,...t})=>e?(0,r.jsx)(d,{opened:e,ariaLabelKey:`fileDialog.openFile`,children:(0,r.jsx)(f,{...t})}):null,m=({initialName:t=`untitled.md`,onConfirm:c,onCancel:d})=>{let{t:f}=(0,a.useTranslation)(`window`),p=e.o(e=>e.fsNodes),[m,h]=(0,n.useState)(null),[g,_]=(0,n.useState)(t),v=(0,n.useCallback)(e=>{h(e)},[]),y=(0,n.useCallback)(()=>{let e=g.trim();e&&c({parentId:m,name:e.endsWith(`.md`)?e:`${e}.md`})},[g,m,c]);return(0,r.jsxs)(`div`,{className:o.root,children:[(0,r.jsx)(s,{currentFolderId:m,fsNodes:p,onNavigate:v}),(0,r.jsxs)(`div`,{className:o.body,children:[(0,r.jsx)(l,{currentFolderId:m,fsNodes:p,onNavigate:v}),(0,r.jsx)(`main`,{className:o.content,children:(0,r.jsx)(u,{currentFolderId:m,fsNodes:p,onNavigate:v})})]}),(0,r.jsxs)(`div`,{className:o.saveActionBar,children:[(0,r.jsx)(i.TextInput,{size:`xs`,placeholder:f(`fileDialog.filename`),value:g,onChange:e=>_(e.currentTarget.value),onKeyDown:e=>e.key===`Enter`&&y(),"aria-label":f(`filePicker.fileNameAria`,{ns:`common`}),className:o.fileNameInput}),(0,r.jsxs)(i.Group,{gap:`xs`,style:{flexShrink:0},children:[(0,r.jsx)(i.Button,{variant:`default`,size:`xs`,onClick:d,"aria-label":f(`filePicker.cancelAria`,{ns:`common`}),children:f(`common:actions.cancel`)}),(0,r.jsx)(i.Button,{size:`xs`,disabled:!g.trim(),onClick:y,"aria-label":f(`fileDialog.saveFile`),children:f(`common:actions.save`)})]})]})]})},h=({opened:e,...t})=>e?(0,r.jsx)(d,{opened:e,ariaLabelKey:`fileDialog.saveFile`,children:(0,r.jsx)(m,{...t})}):null,g=({onConfirm:t,onCancel:c})=>{let{t:d}=(0,a.useTranslation)(`window`),f=e.o(e=>e.fsNodes),[p,m]=(0,n.useState)(null),h=(0,n.useCallback)(e=>{m(e)},[]),g=(0,n.useCallback)(()=>{t(p)},[p,t]);return(0,r.jsxs)(`div`,{className:o.root,children:[(0,r.jsx)(s,{currentFolderId:p,fsNodes:f,onNavigate:h}),(0,r.jsxs)(`div`,{className:o.body,children:[(0,r.jsx)(l,{currentFolderId:p,fsNodes:f,onNavigate:h}),(0,r.jsx)(`main`,{className:o.content,children:(0,r.jsx)(u,{currentFolderId:p,fsNodes:f,onNavigate:h})})]}),(0,r.jsxs)(`div`,{className:o.actionBar,children:[(0,r.jsx)(i.Text,{size:`xs`,c:`dimmed`,truncate:!0,className:o.selectedLabel,children:p===null?d(`common:labels.home`):f.find(e=>e.id===p)?.name??``}),(0,r.jsxs)(i.Group,{gap:`xs`,children:[(0,r.jsx)(i.Button,{variant:`default`,size:`xs`,onClick:c,"aria-label":d(`filePicker.cancelAria`,{ns:`common`}),children:d(`common:actions.cancel`)}),(0,r.jsx)(i.Button,{size:`xs`,onClick:g,"aria-label":d(`fileDialog.selectFolder`),children:d(`common:actions.select`)})]})]})]})},_=({opened:e,...t})=>e?(0,r.jsx)(d,{opened:e,ariaLabelKey:`fileDialog.selectFolder`,children:(0,r.jsx)(g,{...t})}):null;Object.defineProperty(exports,`a`,{enumerable:!0,get:function(){return d}}),Object.defineProperty(exports,`i`,{enumerable:!0,get:function(){return _}}),Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return p}}),Object.defineProperty(exports,`r`,{enumerable:!0,get:function(){return h}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return f}});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const e=require(`./NotesApp-BmQIBtJ2.cjs`),t=require(`./useOpenApp-D-FOY88T.cjs`),n=require(`./desktopStore-C1jR6Fdb.cjs`),r=require(`./buildBreadcrumbs-Ccd8i11b.cjs`);let i=require(`react`),a=require(`react/jsx-runtime`),o=require(`@mantine/core`);var s=()=>{let e=n.o(e=>e.notifications),t=n.o(e=>e.addNotification),r=n.o(e=>e.removeNotification);return{notifications:e,notify:(0,i.useCallback)((e,r,i)=>{let a={id:n.ot(),title:e,message:r,fcIcon:i?.fcIcon,onClose:i?.onClose};return t(a),a.id},[t]),dismiss:(0,i.useCallback)(e=>{r(e)},[r]),addNotification:t,removeNotification:r}},c={root:`_root_113j7_1`,item:`_item_113j7_9`},l=({node:e,allNodes:t,currentFolderId:n,depth:i,onNavigate:s})=>{let u=t.filter(t=>t.parentId===e.id&&t.type===`folder`);return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)(o.UnstyledButton,{className:c.item,"data-active":n===e.id||void 0,style:{paddingLeft:8+i*14},onClick:()=>s(e.id),"aria-label":e.name,"aria-current":n===e.id?`page`:void 0,children:[(0,a.jsx)(r.n,{type:`folder`,folderNode:e,size:14}),(0,a.jsx)(o.Text,{size:`xs`,ml:6,truncate:!0,children:e.name})]}),u.map(e=>(0,a.jsx)(l,{node:e,allNodes:t,currentFolderId:n,depth:i+1,onNavigate:s},e.id))]})},u=({allNodes:e,currentFolderId:t,onNavigate:n})=>{let i=e.filter(e=>e.parentId===null&&e.type===`folder`);return(0,a.jsxs)(`nav`,{className:c.root,"aria-label":`Folder tree`,children:[(0,a.jsxs)(o.UnstyledButton,{className:c.item,"data-active":t===null||void 0,style:{paddingLeft:8},onClick:()=>n(null),"aria-label":`Home`,"aria-current":t===null?`page`:void 0,children:[(0,a.jsx)(r.n,{type:`folder`,size:14}),(0,a.jsx)(o.Text,{size:`xs`,ml:6,fw:500,children:`Home`})]}),i.map(r=>(0,a.jsx)(l,{node:r,allNodes:e,currentFolderId:t,depth:1,onNavigate:n},r.id))]})},d={grid:`_grid_1cag6_1`,item:`_item_1cag6_9`,icon:`_icon_1cag6_26`,name:`_name_1cag6_34`,empty:`_empty_1cag6_46`},f=({node:e,onNavigate:t,onOpenFile:n,onContextMenu:i})=>{let s=()=>{e.type===`folder`?t(e.id):n(e)},c=e.type===`folder`?`Open folder ${e.name}`:`Open file ${e.name}`;return(0,a.jsxs)(o.UnstyledButton,{className:d.item,onDoubleClick:s,onContextMenu:t=>i(t,e.id),"aria-label":c,role:`option`,children:[(0,a.jsx)(`div`,{className:d.icon,children:(0,a.jsx)(r.n,{type:e.type,name:e.name,folderNode:e.type===`folder`?e:void 0,size:32})}),(0,a.jsx)(o.Text,{size:`xs`,className:d.name,truncate:!0,children:e.name})]})},p=({nodes:e,onNavigate:t,onOpenFile:r,onNodeContextMenu:i})=>{let s=n.o(e=>e.filesSortMode);if(e.length===0)return(0,a.jsx)(`div`,{className:d.empty,children:(0,a.jsx)(o.Text,{size:`sm`,c:`dimmed`,children:`This folder is empty`})});let c=n.D(e,s);return(0,a.jsx)(`div`,{className:d.grid,role:`listbox`,"aria-label":`Files`,children:c.map(e=>(0,a.jsx)(f,{node:e,onNavigate:t,onOpenFile:r,onContextMenu:i},e.id))})},m={root:`_root_13mxj_1`,breadcrumbBar:`_breadcrumbBar_13mxj_9`,breadcrumbSep:`_breadcrumbSep_13mxj_16`,body:`_body_13mxj_21`,sidebar:`_sidebar_13mxj_28`,content:`_content_13mxj_35`},h=e.i({default:()=>g}),g=({window:e})=>{let c=e?.contentData?.initialFolderId,l=n.o(e=>e.fsNodes),d=n.o(e=>e.openContextMenu),f=n.o(e=>e.setFilesCurrentFolderId),h=t.t(),{notify:g}=s(),[_,v]=(0,i.useState)(c??null),y=(0,i.useCallback)(e=>{v(e),f(e)},[f]);(0,i.useEffect)(()=>{f(c??null)},[c,f]);let b=_===null?l.filter(e=>e.parentId===null):l.filter(e=>e.parentId===_),x=(0,i.useCallback)(e=>{e.preventDefault(),e.stopPropagation(),d(e.clientX,e.clientY,`files`)},[d]),S=(0,i.useCallback)((e,t)=>{e.preventDefault(),e.stopPropagation(),d(e.clientX,e.clientY,`files`,t)},[d]),C=(0,i.useCallback)(e=>{try{let t=n.x(e);if(t)h(t.appId,{contentData:t.contentData});else{let t=e.mimeType||`unknown`;console.warn(`[FilesApp] Unsupported file type: ${e.name} (${t})`),g(`Unsupported file type`,`Cannot open "${e.name}". File type "${t}" is not supported.`,{fcIcon:`FcDeleteRow`})}}catch(t){console.error(`[FilesApp] Error opening file:`,t),g(`Error opening file`,`An unexpected error occurred while opening "${e.name}".`,{fcIcon:`FcHighPriority`})}},[h,g]),w=r.t(_,l);return(0,a.jsxs)(`div`,{className:m.root,onContextMenu:x,children:[(0,a.jsx)(`div`,{className:m.breadcrumbBar,children:(0,a.jsx)(o.Breadcrumbs,{separator:`›`,classNames:{separator:m.breadcrumbSep},children:w.map((e,t)=>t===w.length-1?(0,a.jsx)(o.Text,{size:`xs`,fw:500,children:e.name},e.id??`root`):(0,a.jsx)(o.Anchor,{size:`xs`,onClick:()=>y(e.id),children:e.name},e.id??`root`))})}),(0,a.jsxs)(`div`,{className:m.body,children:[(0,a.jsx)(`aside`,{className:m.sidebar,children:(0,a.jsx)(u,{allNodes:l,currentFolderId:_,onNavigate:y})}),(0,a.jsx)(`main`,{className:m.content,children:(0,a.jsx)(p,{nodes:b,onNavigate:y,onOpenFile:C,onNodeContextMenu:S})})]})]})};Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return h}}),Object.defineProperty(exports,`r`,{enumerable:!0,get:function(){return s}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return g}});
|