@fde-desktop/fde-core 0.4.13 → 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-Bboc4KZ1.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 +698 -650
- 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-uguTLkyl.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-BRK2OqkQ.cjs +0 -1
- package/dist/FilesApp-BuoFP_KA.js +0 -212
- 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-Dr1mF7oj.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-ChDhsL9h.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
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function e(e){if(e===0)return`0 B`;let t=1024,n=[`B`,`KB`,`MB`,`GB`,`TB`],r=Math.floor(Math.log(e)/Math.log(t)),i=Math.min(r,n.length-1);return`${parseFloat((e/t**+i).toFixed(1))} ${n[i]}`}Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return e}});
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
//#region src/utils/formatBytes.ts
|
|
2
|
+
function e(e) {
|
|
3
|
+
if (e === 0) return "0 B";
|
|
4
|
+
let t = 1024, n = [
|
|
5
|
+
"B",
|
|
6
|
+
"KB",
|
|
7
|
+
"MB",
|
|
8
|
+
"GB",
|
|
9
|
+
"TB"
|
|
10
|
+
], r = Math.floor(Math.log(e) / Math.log(t)), i = Math.min(r, n.length - 1);
|
|
11
|
+
return `${parseFloat((e / t ** +i).toFixed(1))} ${n[i]}`;
|
|
12
|
+
}
|
|
13
|
+
//#endregion
|
|
14
|
+
export { e as t };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
require(`./AppTempMemory-DAC62jiS.cjs`);const e=require(`./useResolvedUrl-Dz2AhrDV.cjs`),t=require(`./ColorPicker-BZqsPh3X.cjs`);let n=require(`react`),r=require(`react/jsx-runtime`),i=require(`@mantine/core`),a=require(`@tanstack/react-query`),o=require(`zustand`),s=require(`zustand/middleware`),c=require(`react-i18next`);var l={mode:`light`,colors:{desktop:`#f0f4f8`,taskbar:`rgba(255, 255, 255, 0.9)`,window:`#ffffff`,accent:`#339af0`},window:{borderRadius:`8px`,headerHeight:40,minWidth:400,minHeight:300,defaultWidth:800,defaultHeight:600,shadow:`0 8px 32px rgba(0, 0, 0, 0.2)`},taskbar:{height:48,position:`bottom`,background:`rgba(0, 0, 0, 0.8)`,blur:!0},desktop:{background:`linear-gradient(135deg, #667eea 0%, #764ba2 100%)`,iconSize:64,iconSpacing:16}},u={mode:`dark`,colors:{desktop:`#1a1b1e`,taskbar:`rgba(26, 27, 30, 0.9)`,window:`#25262b`,accent:`#4dabf7`},window:{borderRadius:`8px`,headerHeight:40,minWidth:400,minHeight:300,defaultWidth:800,defaultHeight:600,shadow:`0 8px 32px rgba(0, 0, 0, 0.2)`},taskbar:{height:48,position:`bottom`,background:`rgba(0, 0, 0, 0.8)`,blur:!0},desktop:{background:`linear-gradient(135deg, #1a1b1e 0%, #2d1f3d 100%)`,iconSize:64,iconSpacing:16}},d=class{mode;customColors=null;constructor(e=`light`){this.mode=e}getTheme(){let e=this.mode===`light`?l:u;return this.customColors?{...e,colors:{...e.colors,taskbar:this.customColors.taskbar,window:this.customColors.window,accent:this.customColors.accent}}:e}setMode(e){this.mode=e}setCustomColors(e){this.customColors=e}toggle(){this.mode=this.mode===`light`?`dark`:`light`}},f=[`en`,`es`],p=`en`,m=()=>{try{let e=localStorage.getItem(`fde-desktop:settings`),t=localStorage.getItem(`fran-desktop:settings`);return JSON.parse(e??t??`{}`)?.state?.theme?.mode??null}catch{return null}},h=m(),g=()=>{if(typeof navigator>`u`||!navigator.language)return p;let e=navigator.language.split(`-`)[0];return f.includes(e)?e:p},_=(()=>{try{let e=localStorage.getItem(`fde-desktop:settings`),t=localStorage.getItem(`fran-desktop:settings`),n=JSON.parse(e??t??`{}`)?.state?.language;return n&&f.includes(n)?n:g()}catch{return g()}})(),v=typeof window<`u`&&window.matchMedia?.(`(prefers-color-scheme: dark)`).matches?`dark`:`light`,y=new d(h??v),b=!1,x=(0,s.createJSONStorage)(()=>({getItem:e=>localStorage.getItem(e),setItem:(e,t)=>{b||localStorage.setItem(e,t)},removeItem:e=>{localStorage.removeItem(e)}}));function S(){b=!0}function C(){b=!1,w.setState({})}var w=(0,o.create)()((0,s.persist)(t=>({wallpaper:e.n,wallpaperModule:`gradient`,wallpaperHasNoise:!0,wallpaperNoiseOpacity:30,launcherIcon:`FcElectronics`,font:`system-ui`,downloadedFonts:[],fontSize:14,animationDuration:.3,theme:y.getTheme(),themeSetManually:h!==null,customThemeColors:null,language:_,setWallpaper:e=>t({wallpaper:e}),setWallpaperModule:e=>t({wallpaperModule:e}),setWallpaperHasNoise:e=>t({wallpaperHasNoise:e}),setWallpaperNoiseOpacity:e=>t({wallpaperNoiseOpacity:e}),setLauncherIcon:e=>t({launcherIcon:e}),setFont:e=>t({font:e}),markFontDownloaded:e=>t(t=>({downloadedFonts:t.downloadedFonts.includes(e)?t.downloadedFonts:[...t.downloadedFonts,e]})),setFontSize:e=>t({fontSize:e}),setAnimationDuration:e=>t({animationDuration:e}),setThemeMode:e=>{y.setMode(e),t({theme:y.getTheme(),themeSetManually:!0})},toggleTheme:()=>{y.toggle(),t({theme:y.getTheme(),themeSetManually:!0})},setThemeAutomatic:()=>t({themeSetManually:!1}),applySystemTheme:e=>{y.setMode(e),t({theme:y.getTheme()})},setCustomThemeColors:e=>{t({customThemeColors:e})},setLanguage:e=>t({language:e})}),{name:`fde-desktop:settings`,storage:x})),T={container:`_container_a0fjd_1`,flag:`_flag_a0fjd_8`},E={en:(0,r.jsxs)(`svg`,{viewBox:`0 0 60 40`,className:T.flag,children:[(0,r.jsx)(`rect`,{fill:`#012169`,width:`60`,height:`40`}),(0,r.jsx)(`path`,{d:`M0,0 L60,40 M60,0 L0,40`,stroke:`#fff`,strokeWidth:`6`}),(0,r.jsx)(`path`,{d:`M0,0 L60,40 M60,0 L0,40`,stroke:`#C8102E`,strokeWidth:`4`}),(0,r.jsx)(`path`,{d:`M30,0 V40 M0,20 H60`,stroke:`#fff`,strokeWidth:`10`}),(0,r.jsx)(`path`,{d:`M30,0 V40 M0,20 H60`,stroke:`#C8102E`,strokeWidth:`6`})]}),es:(0,r.jsxs)(`svg`,{viewBox:`0 0 60 40`,className:T.flag,children:[(0,r.jsx)(`rect`,{fill:`#C60B1E`,width:`60`,height:`40`}),(0,r.jsx)(`rect`,{fill:`#FFC400`,y:`10`,width:`60`,height:`20`})]})},D=({lang:e,size:t=20})=>(0,r.jsx)(`div`,{style:{width:t*1.5,height:t},className:T.container,"aria-label":e===`en`?`English`:`Español`,"data-testid":`flag-${e}`,children:E[e]}),O=[{value:`system-ui`,label:`System Default`,stack:`system-ui, Avenir, Helvetica, Arial, sans-serif`},{value:`Courier New`,label:`Courier New`,stack:`"Courier New", monospace`},{value:`Source Code Pro`,label:`Source Code Pro`,stack:`"Source Code Pro", monospace`},{value:`Open Sans`,label:`Open Sans`,stack:`"Open Sans", monospace`}],k=Object.fromEntries(O.map(e=>[e.value,e.stack])),A={"Source Code Pro":`https://fonts.googleapis.com/css2?family=Source+Code+Pro&display=swap`,"Open Sans":`https://fonts.googleapis.com/css2?family=Open+Sans&display=swap`},j=[{id:`wallpaper`,label:`Wallpaper`,fcIcon:`FcPicture`,description:`Change the desktop background image.`},{id:`appearance`,label:`Appearance`,fcIcon:`FcBinoculars`,description:`Switch between light and dark mode.`},{id:`launcher`,label:`Launcher`,fcIcon:`FcElectronics`,description:`Choose the launcher button icon.`},{id:`font`,label:`Font`,fcIcon:`FcEditImage`,description:`Select the system font family.`},{id:`language`,label:`Language`,fcIcon:`FcGlobe`,description:`Choose your preferred language.`},{id:`reset`,label:`Reset to Default`,fcIcon:`FcDisclaimer`,description:`Reset all settings and data to defaults.`}],M=({value:a,onChange:o,hasNoiseInitial:s=!0,noiseOpacityInitial:l=30})=>{let{t:u}=(0,c.useTranslation)(`settings`),d=(0,n.useMemo)(()=>e.s(),[]),f=(0,n.useRef)(``),p=(0,n.useMemo)(()=>e.o()?.config,[]),[m,h]=(0,n.useState)(()=>{if(!a)return{...p??e.a,addNoise:!0,noiseOpacity:l};let t=e.d(a);return t?(t.addNoise===void 0&&(t.addNoise=s),t.noiseOpacity===void 0&&(t.noiseOpacity=l),t):{...p??e.a,addNoise:s,noiseOpacity:l}}),[g,_]=(0,n.useState)(null),v=(0,n.useMemo)(()=>m.addNoise?e.p(128,128):``,[m.addNoise]),y=(0,n.useMemo)(()=>{let t=e.c({...m,addNoise:!1});return m.addNoise&&v?{wallpaperCSS:t+`, url(`+v.replace(/"/g,``)+`)`,hasNoise:!0,noiseOpacity:m.noiseOpacity??30}:{wallpaperCSS:t,hasNoise:!1,noiseOpacity:30}},[m,v]);(0,n.useEffect)(()=>{let e=JSON.stringify(y);f.current!==e&&(f.current=e,o(y))},[y,o]);let b=(0,n.useCallback)(e=>{h(t=>({...t,...e})),_(null)},[]),x=(0,n.useCallback)(()=>{if(m.colors.length>=5)return;let e=[...m.colors],t=e[e.length-1];e.push({color:`#ffffff`,position:t.position}),b({colors:e})},[m.colors,b]),S=(0,n.useCallback)(e=>{m.colors.length<=2||b({colors:m.colors.filter((t,n)=>n!==e)})},[m.colors,b]),C=(0,n.useCallback)((e,t)=>{let n=[...m.colors];n[e]={...n[e],color:t},b({colors:n})},[m.colors,b]),w=(0,n.useCallback)((e,t)=>{let n=[...m.colors];n[e]={...n[e],position:t},b({colors:n})},[m.colors,b]),T=(0,n.useCallback)(e=>{if(!e)return;let t=d.find(t=>t.name===e);t&&(h(t.config),_(e))},[d]);return(0,r.jsxs)(i.Stack,{gap:`md`,style:{overflow:`hidden`},children:[(0,r.jsx)(i.SegmentedControl,{value:m.type,onChange:e=>b({type:e}),data:[{value:`linear`,label:u(`wallpaper.linear`)??`Linear`},{value:`radial`,label:u(`wallpaper.radial`)??`Radial`},{value:`conic`,label:u(`wallpaper.conic`)??`Conic`}],"aria-label":u(`wallpaper.gradientType`)}),m.type===`linear`&&(0,r.jsxs)(i.Stack,{gap:`l`,children:[(0,r.jsx)(i.Text,{size:`sm`,fw:500,children:u(`wallpaper.angle`)}),(0,r.jsx)(i.Slider,{value:m.angle??0,onChange:e=>b({angle:e}),min:0,max:360,step:1,marks:[{value:0,label:`0°`},{value:90,label:`90°`},{value:180,label:`180°`},{value:270,label:`270°`},{value:360,label:`360°`}],"aria-label":u(`wallpaper.angle`)})]}),(0,r.jsx)(i.Select,{value:g,onChange:T,placeholder:u(`wallpaper.gradientPreset`)??`Select a preset`,data:d.map(e=>e.name),"aria-label":u(`wallpaper.gradientPreset`),clearable:!0}),(0,r.jsxs)(i.Stack,{gap:`sm`,children:[m.colors.map((e,n)=>(0,r.jsxs)(i.Group,{gap:`sm`,align:`flex-start`,children:[(0,r.jsxs)(i.Stack,{gap:`xs`,style:{flex:1},children:[(0,r.jsx)(i.Text,{size:`xs`,c:`dimmed`,children:u(`wallpaper.gradientPosition`,{index:n+1,defaultValue:`Position ${n+1}`})}),(0,r.jsx)(i.Slider,{value:e.position,onChange:e=>w(n,e),min:0,max:100,step:1,label:e=>`${e}%`,"aria-label":`${u(`wallpaper.gradientPosition`,{index:n+1})} ${n+1}`})]}),(0,r.jsx)(t.t,{value:e.color,onChange:e=>C(n,e),"aria-label":`${u(`wallpaper.colors`)??`Color`} ${n+1}`}),m.colors.length>2&&(0,r.jsx)(i.Button,{onClick:()=>S(n),variant:`subtle`,color:`red`,size:`xs`,"aria-label":u(`wallpaper.removeColor`)??`Remove`,children:`×`})]},n)),m.colors.length<5&&(0,r.jsx)(i.Button,{onClick:x,variant:`outline`,size:`xs`,children:u(`wallpaper.addColor`)??`+ Add color`})]}),(0,r.jsxs)(i.Group,{gap:`md`,align:`center`,children:[(0,r.jsx)(i.Switch,{label:u(`wallpaper.addNoise`)??`Add noise texture`,checked:m.addNoise??!0,onChange:e=>b({addNoise:e.currentTarget.checked}),"aria-label":u(`wallpaper.addNoise`)}),m.addNoise&&(0,r.jsxs)(i.Stack,{gap:`xs`,style:{flex:1},children:[(0,r.jsx)(i.Text,{size:`xs`,c:`dimmed`,children:u(`wallpaper.noiseOpacity`)??`Noise opacity`}),(0,r.jsx)(i.Slider,{value:m.noiseOpacity??30,onChange:e=>b({noiseOpacity:e}),min:5,max:80,step:5,label:e=>`${e}%`,"aria-label":u(`wallpaper.noiseOpacity`)})]})]})]})},N=({title:e,description:t,children:n})=>(0,r.jsxs)(i.Stack,{gap:`md`,p:`md`,children:[(0,r.jsx)(i.Text,{fw:600,size:`lg`,children:e}),t&&(0,r.jsx)(i.Text,{size:`sm`,c:`dimmed`,children:t}),n]}),P=e=>{let t=A[e];if(!t||document.head.querySelector(`link[data-font="${e}"]`))return;let n=document.createElement(`link`);n.rel=`stylesheet`,n.href=t,n.setAttribute(`data-font`,e),document.head.appendChild(n)},F=async e=>{let t=A[e];if(!t)throw Error(`Font "${e}" not found in Google Fonts`);let n=await fetch(t);if(!n.ok)throw Error(`Failed to download font: HTTP ${n.status}`);return await n.text(),P(e),{font:e,success:!0}},I=e=>{let t=(0,a.useQueryClient)(),n=w(e=>e.markFontDownloaded),r=w(e=>e.downloadedFonts),i=e?r.includes(e):!1,o=e&&!i&&A[e],s=(0,a.useQuery)({queryKey:[`font`,e??``],queryFn:async({queryKey:e})=>{let[,t]=e;if(!t||!A[t])throw Error(`Font "${t}" not available`);let r=await F(t);return r.success&&n(t),r},enabled:!!o,staleTime:1/0,gcTime:1/0,retry:!1}),c=s.isFetching?{status:`downloading`,loaded:0,total:null,percent:null,error:null}:s.isError?{status:`error`,loaded:0,total:null,percent:null,error:s.error?.message??`Unknown error`}:s.isSuccess?{status:`done`,loaded:0,total:0,percent:100,error:null}:{status:`idle`,loaded:0,total:null,percent:null,error:null},l=()=>{e&&t.removeQueries({queryKey:[`font`,e]})};return{...s,progress:c,isDownloaded:i,reset:l}};async function L(e){let t=typeof globalThis<`u`?globalThis:typeof window<`u`?window:void 0;if(t){if(!e?.keepServiceWorker&&`serviceWorker`in t.navigator){let e=await t.navigator.serviceWorker.getRegistrations();for(let t of e)await t.unregister()}if(`caches`in t){let e=await t.caches.keys();for(let n of e)await t.caches.delete(n)}if(!e?.keepIndexedDB&&`indexedDB`in t){let e=await t.indexedDB.databases();for(let n of e)n.name&&t.indexedDB.deleteDatabase(n.name)}!e?.keepLocalStorage&&`localStorage`in t&&t.localStorage.clear(),!e?.keepSessionStorage&&`sessionStorage`in t&&t.sessionStorage.clear()}}var R={name:`Francisco Núñez Palomares`,title:`Fullstack Developer & DevOps`,email:`frannunpal@gmail.com`,phone:`+34 600 275 210`,location:`Spain`,linkedin:`https://www.linkedin.com/in/francisco-núñez-palomares-74a484171/`,github:`https://github.com/frannunpal`,cvUrls:{en:`Desktop/CV_2026_English.pdf`,es:`Desktop/CV 2026.pdf`}},z=[`en`,`es`],B=`en`;Object.defineProperty(exports,`_`,{enumerable:!0,get:function(){return w}}),Object.defineProperty(exports,`a`,{enumerable:!0,get:function(){return I}}),Object.defineProperty(exports,`c`,{enumerable:!0,get:function(){return M}}),Object.defineProperty(exports,`d`,{enumerable:!0,get:function(){return k}}),Object.defineProperty(exports,`f`,{enumerable:!0,get:function(){return A}}),Object.defineProperty(exports,`g`,{enumerable:!0,get:function(){return C}}),Object.defineProperty(exports,`h`,{enumerable:!0,get:function(){return S}}),Object.defineProperty(exports,`i`,{enumerable:!0,get:function(){return L}}),Object.defineProperty(exports,`l`,{enumerable:!0,get:function(){return j}}),Object.defineProperty(exports,`m`,{enumerable:!0,get:function(){return m}}),Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return z}}),Object.defineProperty(exports,`o`,{enumerable:!0,get:function(){return P}}),Object.defineProperty(exports,`p`,{enumerable:!0,get:function(){return D}}),Object.defineProperty(exports,`r`,{enumerable:!0,get:function(){return R}}),Object.defineProperty(exports,`s`,{enumerable:!0,get:function(){return N}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return B}}),Object.defineProperty(exports,`u`,{enumerable:!0,get:function(){return O}}),Object.defineProperty(exports,`v`,{enumerable:!0,get:function(){return d}});
|
|
@@ -0,0 +1,611 @@
|
|
|
1
|
+
import { a as e, c as t, d as n, n as r, o as i, p as a, s as o } from "./useResolvedUrl-CgqjNxzw.js";
|
|
2
|
+
import { t as s } from "./ColorPicker-B76rCS2H.js";
|
|
3
|
+
import { useCallback as c, useEffect as l, useMemo as u, useRef as ee, useState as d } from "react";
|
|
4
|
+
import { jsx as f, jsxs as p } from "react/jsx-runtime";
|
|
5
|
+
import { Button as m, Group as h, SegmentedControl as g, Select as _, Slider as v, Stack as y, Switch as b, Text as x } from "@mantine/core";
|
|
6
|
+
import { useQuery as S, useQueryClient as C } from "@tanstack/react-query";
|
|
7
|
+
import { create as w } from "zustand";
|
|
8
|
+
import { createJSONStorage as T, persist as E } from "zustand/middleware";
|
|
9
|
+
import { useTranslation as D } from "react-i18next";
|
|
10
|
+
//#region src/infrastructure/adapters/DefaultThemeProvider.ts
|
|
11
|
+
var O = {
|
|
12
|
+
mode: "light",
|
|
13
|
+
colors: {
|
|
14
|
+
desktop: "#f0f4f8",
|
|
15
|
+
taskbar: "rgba(255, 255, 255, 0.9)",
|
|
16
|
+
window: "#ffffff",
|
|
17
|
+
accent: "#339af0"
|
|
18
|
+
},
|
|
19
|
+
window: {
|
|
20
|
+
borderRadius: "8px",
|
|
21
|
+
headerHeight: 40,
|
|
22
|
+
minWidth: 400,
|
|
23
|
+
minHeight: 300,
|
|
24
|
+
defaultWidth: 800,
|
|
25
|
+
defaultHeight: 600,
|
|
26
|
+
shadow: "0 8px 32px rgba(0, 0, 0, 0.2)"
|
|
27
|
+
},
|
|
28
|
+
taskbar: {
|
|
29
|
+
height: 48,
|
|
30
|
+
position: "bottom",
|
|
31
|
+
background: "rgba(0, 0, 0, 0.8)",
|
|
32
|
+
blur: !0
|
|
33
|
+
},
|
|
34
|
+
desktop: {
|
|
35
|
+
background: "linear-gradient(135deg, #667eea 0%, #764ba2 100%)",
|
|
36
|
+
iconSize: 64,
|
|
37
|
+
iconSpacing: 16
|
|
38
|
+
}
|
|
39
|
+
}, k = {
|
|
40
|
+
mode: "dark",
|
|
41
|
+
colors: {
|
|
42
|
+
desktop: "#1a1b1e",
|
|
43
|
+
taskbar: "rgba(26, 27, 30, 0.9)",
|
|
44
|
+
window: "#25262b",
|
|
45
|
+
accent: "#4dabf7"
|
|
46
|
+
},
|
|
47
|
+
window: {
|
|
48
|
+
borderRadius: "8px",
|
|
49
|
+
headerHeight: 40,
|
|
50
|
+
minWidth: 400,
|
|
51
|
+
minHeight: 300,
|
|
52
|
+
defaultWidth: 800,
|
|
53
|
+
defaultHeight: 600,
|
|
54
|
+
shadow: "0 8px 32px rgba(0, 0, 0, 0.2)"
|
|
55
|
+
},
|
|
56
|
+
taskbar: {
|
|
57
|
+
height: 48,
|
|
58
|
+
position: "bottom",
|
|
59
|
+
background: "rgba(0, 0, 0, 0.8)",
|
|
60
|
+
blur: !0
|
|
61
|
+
},
|
|
62
|
+
desktop: {
|
|
63
|
+
background: "linear-gradient(135deg, #1a1b1e 0%, #2d1f3d 100%)",
|
|
64
|
+
iconSize: 64,
|
|
65
|
+
iconSpacing: 16
|
|
66
|
+
}
|
|
67
|
+
}, A = class {
|
|
68
|
+
mode;
|
|
69
|
+
customColors = null;
|
|
70
|
+
constructor(e = "light") {
|
|
71
|
+
this.mode = e;
|
|
72
|
+
}
|
|
73
|
+
getTheme() {
|
|
74
|
+
let e = this.mode === "light" ? O : k;
|
|
75
|
+
return this.customColors ? {
|
|
76
|
+
...e,
|
|
77
|
+
colors: {
|
|
78
|
+
...e.colors,
|
|
79
|
+
taskbar: this.customColors.taskbar,
|
|
80
|
+
window: this.customColors.window,
|
|
81
|
+
accent: this.customColors.accent
|
|
82
|
+
}
|
|
83
|
+
} : e;
|
|
84
|
+
}
|
|
85
|
+
setMode(e) {
|
|
86
|
+
this.mode = e;
|
|
87
|
+
}
|
|
88
|
+
setCustomColors(e) {
|
|
89
|
+
this.customColors = e;
|
|
90
|
+
}
|
|
91
|
+
toggle() {
|
|
92
|
+
this.mode = this.mode === "light" ? "dark" : "light";
|
|
93
|
+
}
|
|
94
|
+
}, j = ["en", "es"], M = "en", N = () => {
|
|
95
|
+
try {
|
|
96
|
+
let e = localStorage.getItem("fde-desktop:settings"), t = localStorage.getItem("fran-desktop:settings");
|
|
97
|
+
return JSON.parse(e ?? t ?? "{}")?.state?.theme?.mode ?? null;
|
|
98
|
+
} catch {
|
|
99
|
+
return null;
|
|
100
|
+
}
|
|
101
|
+
}, P = N(), F = () => {
|
|
102
|
+
if (typeof navigator > "u" || !navigator.language) return M;
|
|
103
|
+
let e = navigator.language.split("-")[0];
|
|
104
|
+
return j.includes(e) ? e : M;
|
|
105
|
+
}, I = (() => {
|
|
106
|
+
try {
|
|
107
|
+
let e = localStorage.getItem("fde-desktop:settings"), t = localStorage.getItem("fran-desktop:settings"), n = JSON.parse(e ?? t ?? "{}")?.state?.language;
|
|
108
|
+
return n && j.includes(n) ? n : F();
|
|
109
|
+
} catch {
|
|
110
|
+
return F();
|
|
111
|
+
}
|
|
112
|
+
})(), L = typeof window < "u" && window.matchMedia?.("(prefers-color-scheme: dark)").matches ? "dark" : "light", R = new A(P ?? L), z = !1, B = T(() => ({
|
|
113
|
+
getItem: (e) => localStorage.getItem(e),
|
|
114
|
+
setItem: (e, t) => {
|
|
115
|
+
z || localStorage.setItem(e, t);
|
|
116
|
+
},
|
|
117
|
+
removeItem: (e) => {
|
|
118
|
+
localStorage.removeItem(e);
|
|
119
|
+
}
|
|
120
|
+
}));
|
|
121
|
+
function V() {
|
|
122
|
+
z = !0;
|
|
123
|
+
}
|
|
124
|
+
function H() {
|
|
125
|
+
z = !1, U.setState({});
|
|
126
|
+
}
|
|
127
|
+
var U = w()(E((e) => ({
|
|
128
|
+
wallpaper: r,
|
|
129
|
+
wallpaperModule: "gradient",
|
|
130
|
+
wallpaperHasNoise: !0,
|
|
131
|
+
wallpaperNoiseOpacity: 30,
|
|
132
|
+
launcherIcon: "FcElectronics",
|
|
133
|
+
font: "system-ui",
|
|
134
|
+
downloadedFonts: [],
|
|
135
|
+
fontSize: 14,
|
|
136
|
+
animationDuration: .3,
|
|
137
|
+
theme: R.getTheme(),
|
|
138
|
+
themeSetManually: P !== null,
|
|
139
|
+
customThemeColors: null,
|
|
140
|
+
language: I,
|
|
141
|
+
setWallpaper: (t) => e({ wallpaper: t }),
|
|
142
|
+
setWallpaperModule: (t) => e({ wallpaperModule: t }),
|
|
143
|
+
setWallpaperHasNoise: (t) => e({ wallpaperHasNoise: t }),
|
|
144
|
+
setWallpaperNoiseOpacity: (t) => e({ wallpaperNoiseOpacity: t }),
|
|
145
|
+
setLauncherIcon: (t) => e({ launcherIcon: t }),
|
|
146
|
+
setFont: (t) => e({ font: t }),
|
|
147
|
+
markFontDownloaded: (t) => e((e) => ({ downloadedFonts: e.downloadedFonts.includes(t) ? e.downloadedFonts : [...e.downloadedFonts, t] })),
|
|
148
|
+
setFontSize: (t) => e({ fontSize: t }),
|
|
149
|
+
setAnimationDuration: (t) => e({ animationDuration: t }),
|
|
150
|
+
setThemeMode: (t) => {
|
|
151
|
+
R.setMode(t), e({
|
|
152
|
+
theme: R.getTheme(),
|
|
153
|
+
themeSetManually: !0
|
|
154
|
+
});
|
|
155
|
+
},
|
|
156
|
+
toggleTheme: () => {
|
|
157
|
+
R.toggle(), e({
|
|
158
|
+
theme: R.getTheme(),
|
|
159
|
+
themeSetManually: !0
|
|
160
|
+
});
|
|
161
|
+
},
|
|
162
|
+
setThemeAutomatic: () => e({ themeSetManually: !1 }),
|
|
163
|
+
applySystemTheme: (t) => {
|
|
164
|
+
R.setMode(t), e({ theme: R.getTheme() });
|
|
165
|
+
},
|
|
166
|
+
setCustomThemeColors: (t) => {
|
|
167
|
+
e({ customThemeColors: t });
|
|
168
|
+
},
|
|
169
|
+
setLanguage: (t) => e({ language: t })
|
|
170
|
+
}), {
|
|
171
|
+
name: "fde-desktop:settings",
|
|
172
|
+
storage: B
|
|
173
|
+
})), W = {
|
|
174
|
+
container: "_container_a0fjd_1",
|
|
175
|
+
flag: "_flag_a0fjd_8"
|
|
176
|
+
}, G = {
|
|
177
|
+
en: /* @__PURE__ */ p("svg", {
|
|
178
|
+
viewBox: "0 0 60 40",
|
|
179
|
+
className: W.flag,
|
|
180
|
+
children: [
|
|
181
|
+
/* @__PURE__ */ f("rect", {
|
|
182
|
+
fill: "#012169",
|
|
183
|
+
width: "60",
|
|
184
|
+
height: "40"
|
|
185
|
+
}),
|
|
186
|
+
/* @__PURE__ */ f("path", {
|
|
187
|
+
d: "M0,0 L60,40 M60,0 L0,40",
|
|
188
|
+
stroke: "#fff",
|
|
189
|
+
strokeWidth: "6"
|
|
190
|
+
}),
|
|
191
|
+
/* @__PURE__ */ f("path", {
|
|
192
|
+
d: "M0,0 L60,40 M60,0 L0,40",
|
|
193
|
+
stroke: "#C8102E",
|
|
194
|
+
strokeWidth: "4"
|
|
195
|
+
}),
|
|
196
|
+
/* @__PURE__ */ f("path", {
|
|
197
|
+
d: "M30,0 V40 M0,20 H60",
|
|
198
|
+
stroke: "#fff",
|
|
199
|
+
strokeWidth: "10"
|
|
200
|
+
}),
|
|
201
|
+
/* @__PURE__ */ f("path", {
|
|
202
|
+
d: "M30,0 V40 M0,20 H60",
|
|
203
|
+
stroke: "#C8102E",
|
|
204
|
+
strokeWidth: "6"
|
|
205
|
+
})
|
|
206
|
+
]
|
|
207
|
+
}),
|
|
208
|
+
es: /* @__PURE__ */ p("svg", {
|
|
209
|
+
viewBox: "0 0 60 40",
|
|
210
|
+
className: W.flag,
|
|
211
|
+
children: [/* @__PURE__ */ f("rect", {
|
|
212
|
+
fill: "#C60B1E",
|
|
213
|
+
width: "60",
|
|
214
|
+
height: "40"
|
|
215
|
+
}), /* @__PURE__ */ f("rect", {
|
|
216
|
+
fill: "#FFC400",
|
|
217
|
+
y: "10",
|
|
218
|
+
width: "60",
|
|
219
|
+
height: "20"
|
|
220
|
+
})]
|
|
221
|
+
})
|
|
222
|
+
}, K = ({ lang: e, size: t = 20 }) => /* @__PURE__ */ f("div", {
|
|
223
|
+
style: {
|
|
224
|
+
width: t * 1.5,
|
|
225
|
+
height: t
|
|
226
|
+
},
|
|
227
|
+
className: W.container,
|
|
228
|
+
"aria-label": e === "en" ? "English" : "Español",
|
|
229
|
+
"data-testid": `flag-${e}`,
|
|
230
|
+
children: G[e]
|
|
231
|
+
}), q = [
|
|
232
|
+
{
|
|
233
|
+
value: "system-ui",
|
|
234
|
+
label: "System Default",
|
|
235
|
+
stack: "system-ui, Avenir, Helvetica, Arial, sans-serif"
|
|
236
|
+
},
|
|
237
|
+
{
|
|
238
|
+
value: "Courier New",
|
|
239
|
+
label: "Courier New",
|
|
240
|
+
stack: "\"Courier New\", monospace"
|
|
241
|
+
},
|
|
242
|
+
{
|
|
243
|
+
value: "Source Code Pro",
|
|
244
|
+
label: "Source Code Pro",
|
|
245
|
+
stack: "\"Source Code Pro\", monospace"
|
|
246
|
+
},
|
|
247
|
+
{
|
|
248
|
+
value: "Open Sans",
|
|
249
|
+
label: "Open Sans",
|
|
250
|
+
stack: "\"Open Sans\", monospace"
|
|
251
|
+
}
|
|
252
|
+
], J = Object.fromEntries(q.map((e) => [e.value, e.stack])), Y = {
|
|
253
|
+
"Source Code Pro": "https://fonts.googleapis.com/css2?family=Source+Code+Pro&display=swap",
|
|
254
|
+
"Open Sans": "https://fonts.googleapis.com/css2?family=Open+Sans&display=swap"
|
|
255
|
+
}, X = [
|
|
256
|
+
{
|
|
257
|
+
id: "wallpaper",
|
|
258
|
+
label: "Wallpaper",
|
|
259
|
+
fcIcon: "FcPicture",
|
|
260
|
+
description: "Change the desktop background image."
|
|
261
|
+
},
|
|
262
|
+
{
|
|
263
|
+
id: "appearance",
|
|
264
|
+
label: "Appearance",
|
|
265
|
+
fcIcon: "FcBinoculars",
|
|
266
|
+
description: "Switch between light and dark mode."
|
|
267
|
+
},
|
|
268
|
+
{
|
|
269
|
+
id: "launcher",
|
|
270
|
+
label: "Launcher",
|
|
271
|
+
fcIcon: "FcElectronics",
|
|
272
|
+
description: "Choose the launcher button icon."
|
|
273
|
+
},
|
|
274
|
+
{
|
|
275
|
+
id: "font",
|
|
276
|
+
label: "Font",
|
|
277
|
+
fcIcon: "FcEditImage",
|
|
278
|
+
description: "Select the system font family."
|
|
279
|
+
},
|
|
280
|
+
{
|
|
281
|
+
id: "language",
|
|
282
|
+
label: "Language",
|
|
283
|
+
fcIcon: "FcGlobe",
|
|
284
|
+
description: "Choose your preferred language."
|
|
285
|
+
},
|
|
286
|
+
{
|
|
287
|
+
id: "reset",
|
|
288
|
+
label: "Reset to Default",
|
|
289
|
+
fcIcon: "FcDisclaimer",
|
|
290
|
+
description: "Reset all settings and data to defaults."
|
|
291
|
+
}
|
|
292
|
+
], Z = ({ value: r, onChange: S, hasNoiseInitial: C = !0, noiseOpacityInitial: w = 30 }) => {
|
|
293
|
+
let { t: T } = D("settings"), E = u(() => o(), []), O = ee(""), k = u(() => i()?.config, []), [A, j] = d(() => {
|
|
294
|
+
if (!r) return {
|
|
295
|
+
...k ?? e,
|
|
296
|
+
addNoise: !0,
|
|
297
|
+
noiseOpacity: w
|
|
298
|
+
};
|
|
299
|
+
let t = n(r);
|
|
300
|
+
return t ? (t.addNoise === void 0 && (t.addNoise = C), t.noiseOpacity === void 0 && (t.noiseOpacity = w), t) : {
|
|
301
|
+
...k ?? e,
|
|
302
|
+
addNoise: C,
|
|
303
|
+
noiseOpacity: w
|
|
304
|
+
};
|
|
305
|
+
}), [M, N] = d(null), P = u(() => A.addNoise ? a(128, 128) : "", [A.addNoise]), F = u(() => {
|
|
306
|
+
let e = t({
|
|
307
|
+
...A,
|
|
308
|
+
addNoise: !1
|
|
309
|
+
});
|
|
310
|
+
return A.addNoise && P ? {
|
|
311
|
+
wallpaperCSS: e + ", url(" + P.replace(/"/g, "") + ")",
|
|
312
|
+
hasNoise: !0,
|
|
313
|
+
noiseOpacity: A.noiseOpacity ?? 30
|
|
314
|
+
} : {
|
|
315
|
+
wallpaperCSS: e,
|
|
316
|
+
hasNoise: !1,
|
|
317
|
+
noiseOpacity: 30
|
|
318
|
+
};
|
|
319
|
+
}, [A, P]);
|
|
320
|
+
l(() => {
|
|
321
|
+
let e = JSON.stringify(F);
|
|
322
|
+
O.current !== e && (O.current = e, S(F));
|
|
323
|
+
}, [F, S]);
|
|
324
|
+
let I = c((e) => {
|
|
325
|
+
j((t) => ({
|
|
326
|
+
...t,
|
|
327
|
+
...e
|
|
328
|
+
})), N(null);
|
|
329
|
+
}, []), L = c(() => {
|
|
330
|
+
if (A.colors.length >= 5) return;
|
|
331
|
+
let e = [...A.colors], t = e[e.length - 1];
|
|
332
|
+
e.push({
|
|
333
|
+
color: "#ffffff",
|
|
334
|
+
position: t.position
|
|
335
|
+
}), I({ colors: e });
|
|
336
|
+
}, [A.colors, I]), R = c((e) => {
|
|
337
|
+
A.colors.length <= 2 || I({ colors: A.colors.filter((t, n) => n !== e) });
|
|
338
|
+
}, [A.colors, I]), z = c((e, t) => {
|
|
339
|
+
let n = [...A.colors];
|
|
340
|
+
n[e] = {
|
|
341
|
+
...n[e],
|
|
342
|
+
color: t
|
|
343
|
+
}, I({ colors: n });
|
|
344
|
+
}, [A.colors, I]), B = c((e, t) => {
|
|
345
|
+
let n = [...A.colors];
|
|
346
|
+
n[e] = {
|
|
347
|
+
...n[e],
|
|
348
|
+
position: t
|
|
349
|
+
}, I({ colors: n });
|
|
350
|
+
}, [A.colors, I]), V = c((e) => {
|
|
351
|
+
if (!e) return;
|
|
352
|
+
let t = E.find((t) => t.name === e);
|
|
353
|
+
t && (j(t.config), N(e));
|
|
354
|
+
}, [E]);
|
|
355
|
+
return /* @__PURE__ */ p(y, {
|
|
356
|
+
gap: "md",
|
|
357
|
+
style: { overflow: "hidden" },
|
|
358
|
+
children: [
|
|
359
|
+
/* @__PURE__ */ f(g, {
|
|
360
|
+
value: A.type,
|
|
361
|
+
onChange: (e) => I({ type: e }),
|
|
362
|
+
data: [
|
|
363
|
+
{
|
|
364
|
+
value: "linear",
|
|
365
|
+
label: T("wallpaper.linear") ?? "Linear"
|
|
366
|
+
},
|
|
367
|
+
{
|
|
368
|
+
value: "radial",
|
|
369
|
+
label: T("wallpaper.radial") ?? "Radial"
|
|
370
|
+
},
|
|
371
|
+
{
|
|
372
|
+
value: "conic",
|
|
373
|
+
label: T("wallpaper.conic") ?? "Conic"
|
|
374
|
+
}
|
|
375
|
+
],
|
|
376
|
+
"aria-label": T("wallpaper.gradientType")
|
|
377
|
+
}),
|
|
378
|
+
A.type === "linear" && /* @__PURE__ */ p(y, {
|
|
379
|
+
gap: "l",
|
|
380
|
+
children: [/* @__PURE__ */ f(x, {
|
|
381
|
+
size: "sm",
|
|
382
|
+
fw: 500,
|
|
383
|
+
children: T("wallpaper.angle")
|
|
384
|
+
}), /* @__PURE__ */ f(v, {
|
|
385
|
+
value: A.angle ?? 0,
|
|
386
|
+
onChange: (e) => I({ angle: e }),
|
|
387
|
+
min: 0,
|
|
388
|
+
max: 360,
|
|
389
|
+
step: 1,
|
|
390
|
+
marks: [
|
|
391
|
+
{
|
|
392
|
+
value: 0,
|
|
393
|
+
label: "0°"
|
|
394
|
+
},
|
|
395
|
+
{
|
|
396
|
+
value: 90,
|
|
397
|
+
label: "90°"
|
|
398
|
+
},
|
|
399
|
+
{
|
|
400
|
+
value: 180,
|
|
401
|
+
label: "180°"
|
|
402
|
+
},
|
|
403
|
+
{
|
|
404
|
+
value: 270,
|
|
405
|
+
label: "270°"
|
|
406
|
+
},
|
|
407
|
+
{
|
|
408
|
+
value: 360,
|
|
409
|
+
label: "360°"
|
|
410
|
+
}
|
|
411
|
+
],
|
|
412
|
+
"aria-label": T("wallpaper.angle")
|
|
413
|
+
})]
|
|
414
|
+
}),
|
|
415
|
+
/* @__PURE__ */ f(_, {
|
|
416
|
+
value: M,
|
|
417
|
+
onChange: V,
|
|
418
|
+
placeholder: T("wallpaper.gradientPreset") ?? "Select a preset",
|
|
419
|
+
data: E.map((e) => e.name),
|
|
420
|
+
"aria-label": T("wallpaper.gradientPreset"),
|
|
421
|
+
clearable: !0
|
|
422
|
+
}),
|
|
423
|
+
/* @__PURE__ */ p(y, {
|
|
424
|
+
gap: "sm",
|
|
425
|
+
children: [A.colors.map((e, t) => /* @__PURE__ */ p(h, {
|
|
426
|
+
gap: "sm",
|
|
427
|
+
align: "flex-start",
|
|
428
|
+
children: [
|
|
429
|
+
/* @__PURE__ */ p(y, {
|
|
430
|
+
gap: "xs",
|
|
431
|
+
style: { flex: 1 },
|
|
432
|
+
children: [/* @__PURE__ */ f(x, {
|
|
433
|
+
size: "xs",
|
|
434
|
+
c: "dimmed",
|
|
435
|
+
children: T("wallpaper.gradientPosition", {
|
|
436
|
+
index: t + 1,
|
|
437
|
+
defaultValue: `Position ${t + 1}`
|
|
438
|
+
})
|
|
439
|
+
}), /* @__PURE__ */ f(v, {
|
|
440
|
+
value: e.position,
|
|
441
|
+
onChange: (e) => B(t, e),
|
|
442
|
+
min: 0,
|
|
443
|
+
max: 100,
|
|
444
|
+
step: 1,
|
|
445
|
+
label: (e) => `${e}%`,
|
|
446
|
+
"aria-label": `${T("wallpaper.gradientPosition", { index: t + 1 })} ${t + 1}`
|
|
447
|
+
})]
|
|
448
|
+
}),
|
|
449
|
+
/* @__PURE__ */ f(s, {
|
|
450
|
+
value: e.color,
|
|
451
|
+
onChange: (e) => z(t, e),
|
|
452
|
+
"aria-label": `${T("wallpaper.colors") ?? "Color"} ${t + 1}`
|
|
453
|
+
}),
|
|
454
|
+
A.colors.length > 2 && /* @__PURE__ */ f(m, {
|
|
455
|
+
onClick: () => R(t),
|
|
456
|
+
variant: "subtle",
|
|
457
|
+
color: "red",
|
|
458
|
+
size: "xs",
|
|
459
|
+
"aria-label": T("wallpaper.removeColor") ?? "Remove",
|
|
460
|
+
children: "×"
|
|
461
|
+
})
|
|
462
|
+
]
|
|
463
|
+
}, t)), A.colors.length < 5 && /* @__PURE__ */ f(m, {
|
|
464
|
+
onClick: L,
|
|
465
|
+
variant: "outline",
|
|
466
|
+
size: "xs",
|
|
467
|
+
children: T("wallpaper.addColor") ?? "+ Add color"
|
|
468
|
+
})]
|
|
469
|
+
}),
|
|
470
|
+
/* @__PURE__ */ p(h, {
|
|
471
|
+
gap: "md",
|
|
472
|
+
align: "center",
|
|
473
|
+
children: [/* @__PURE__ */ f(b, {
|
|
474
|
+
label: T("wallpaper.addNoise") ?? "Add noise texture",
|
|
475
|
+
checked: A.addNoise ?? !0,
|
|
476
|
+
onChange: (e) => I({ addNoise: e.currentTarget.checked }),
|
|
477
|
+
"aria-label": T("wallpaper.addNoise")
|
|
478
|
+
}), A.addNoise && /* @__PURE__ */ p(y, {
|
|
479
|
+
gap: "xs",
|
|
480
|
+
style: { flex: 1 },
|
|
481
|
+
children: [/* @__PURE__ */ f(x, {
|
|
482
|
+
size: "xs",
|
|
483
|
+
c: "dimmed",
|
|
484
|
+
children: T("wallpaper.noiseOpacity") ?? "Noise opacity"
|
|
485
|
+
}), /* @__PURE__ */ f(v, {
|
|
486
|
+
value: A.noiseOpacity ?? 30,
|
|
487
|
+
onChange: (e) => I({ noiseOpacity: e }),
|
|
488
|
+
min: 5,
|
|
489
|
+
max: 80,
|
|
490
|
+
step: 5,
|
|
491
|
+
label: (e) => `${e}%`,
|
|
492
|
+
"aria-label": T("wallpaper.noiseOpacity")
|
|
493
|
+
})]
|
|
494
|
+
})]
|
|
495
|
+
})
|
|
496
|
+
]
|
|
497
|
+
});
|
|
498
|
+
}, Q = ({ title: e, description: t, children: n }) => /* @__PURE__ */ p(y, {
|
|
499
|
+
gap: "md",
|
|
500
|
+
p: "md",
|
|
501
|
+
children: [
|
|
502
|
+
/* @__PURE__ */ f(x, {
|
|
503
|
+
fw: 600,
|
|
504
|
+
size: "lg",
|
|
505
|
+
children: e
|
|
506
|
+
}),
|
|
507
|
+
t && /* @__PURE__ */ f(x, {
|
|
508
|
+
size: "sm",
|
|
509
|
+
c: "dimmed",
|
|
510
|
+
children: t
|
|
511
|
+
}),
|
|
512
|
+
n
|
|
513
|
+
]
|
|
514
|
+
}), $ = (e) => {
|
|
515
|
+
let t = Y[e];
|
|
516
|
+
if (!t || document.head.querySelector(`link[data-font="${e}"]`)) return;
|
|
517
|
+
let n = document.createElement("link");
|
|
518
|
+
n.rel = "stylesheet", n.href = t, n.setAttribute("data-font", e), document.head.appendChild(n);
|
|
519
|
+
}, te = async (e) => {
|
|
520
|
+
let t = Y[e];
|
|
521
|
+
if (!t) throw Error(`Font "${e}" not found in Google Fonts`);
|
|
522
|
+
let n = await fetch(t);
|
|
523
|
+
if (!n.ok) throw Error(`Failed to download font: HTTP ${n.status}`);
|
|
524
|
+
return await n.text(), $(e), {
|
|
525
|
+
font: e,
|
|
526
|
+
success: !0
|
|
527
|
+
};
|
|
528
|
+
}, ne = (e) => {
|
|
529
|
+
let t = C(), n = U((e) => e.markFontDownloaded), r = U((e) => e.downloadedFonts), i = e ? r.includes(e) : !1, a = e && !i && Y[e], o = S({
|
|
530
|
+
queryKey: ["font", e ?? ""],
|
|
531
|
+
queryFn: async ({ queryKey: e }) => {
|
|
532
|
+
let [, t] = e;
|
|
533
|
+
if (!t || !Y[t]) throw Error(`Font "${t}" not available`);
|
|
534
|
+
let r = await te(t);
|
|
535
|
+
return r.success && n(t), r;
|
|
536
|
+
},
|
|
537
|
+
enabled: !!a,
|
|
538
|
+
staleTime: Infinity,
|
|
539
|
+
gcTime: Infinity,
|
|
540
|
+
retry: !1
|
|
541
|
+
}), s = o.isFetching ? {
|
|
542
|
+
status: "downloading",
|
|
543
|
+
loaded: 0,
|
|
544
|
+
total: null,
|
|
545
|
+
percent: null,
|
|
546
|
+
error: null
|
|
547
|
+
} : o.isError ? {
|
|
548
|
+
status: "error",
|
|
549
|
+
loaded: 0,
|
|
550
|
+
total: null,
|
|
551
|
+
percent: null,
|
|
552
|
+
error: o.error?.message ?? "Unknown error"
|
|
553
|
+
} : o.isSuccess ? {
|
|
554
|
+
status: "done",
|
|
555
|
+
loaded: 0,
|
|
556
|
+
total: 0,
|
|
557
|
+
percent: 100,
|
|
558
|
+
error: null
|
|
559
|
+
} : {
|
|
560
|
+
status: "idle",
|
|
561
|
+
loaded: 0,
|
|
562
|
+
total: null,
|
|
563
|
+
percent: null,
|
|
564
|
+
error: null
|
|
565
|
+
}, c = () => {
|
|
566
|
+
e && t.removeQueries({ queryKey: ["font", e] });
|
|
567
|
+
};
|
|
568
|
+
return {
|
|
569
|
+
...o,
|
|
570
|
+
progress: s,
|
|
571
|
+
isDownloaded: i,
|
|
572
|
+
reset: c
|
|
573
|
+
};
|
|
574
|
+
};
|
|
575
|
+
//#endregion
|
|
576
|
+
//#region src/utils/clearBrowserData.ts
|
|
577
|
+
async function re(e) {
|
|
578
|
+
let t = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : void 0;
|
|
579
|
+
if (t) {
|
|
580
|
+
if (!e?.keepServiceWorker && "serviceWorker" in t.navigator) {
|
|
581
|
+
let e = await t.navigator.serviceWorker.getRegistrations();
|
|
582
|
+
for (let t of e) await t.unregister();
|
|
583
|
+
}
|
|
584
|
+
if ("caches" in t) {
|
|
585
|
+
let e = await t.caches.keys();
|
|
586
|
+
for (let n of e) await t.caches.delete(n);
|
|
587
|
+
}
|
|
588
|
+
if (!e?.keepIndexedDB && "indexedDB" in t) {
|
|
589
|
+
let e = await t.indexedDB.databases();
|
|
590
|
+
for (let n of e) n.name && t.indexedDB.deleteDatabase(n.name);
|
|
591
|
+
}
|
|
592
|
+
!e?.keepLocalStorage && "localStorage" in t && t.localStorage.clear(), !e?.keepSessionStorage && "sessionStorage" in t && t.sessionStorage.clear();
|
|
593
|
+
}
|
|
594
|
+
}
|
|
595
|
+
//#endregion
|
|
596
|
+
//#region src/constants/profileData.ts
|
|
597
|
+
var ie = {
|
|
598
|
+
name: "Francisco Núñez Palomares",
|
|
599
|
+
title: "Fullstack Developer & DevOps",
|
|
600
|
+
email: "frannunpal@gmail.com",
|
|
601
|
+
phone: "+34 600 275 210",
|
|
602
|
+
location: "Spain",
|
|
603
|
+
linkedin: "https://www.linkedin.com/in/francisco-núñez-palomares-74a484171/",
|
|
604
|
+
github: "https://github.com/frannunpal",
|
|
605
|
+
cvUrls: {
|
|
606
|
+
en: "Desktop/CV_2026_English.pdf",
|
|
607
|
+
es: "Desktop/CV 2026.pdf"
|
|
608
|
+
}
|
|
609
|
+
}, ae = ["en", "es"], oe = "en";
|
|
610
|
+
//#endregion
|
|
611
|
+
export { U as _, ne as a, Z as c, J as d, Y as f, H as g, V as h, re as i, X as l, N as m, ae as n, $ as o, K as p, ie as r, Q as s, oe as t, q as u, A as v };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
require(`./AppTempMemory-DAC62jiS.cjs`);let e=require(`zustand`);var t={userZoom:100,calculatedZoom:100,fitToWindow:!0},n=(0,e.create)((e,n)=>({states:{},getUserZoom:e=>n().states[e]?.userZoom??100,getCalculatedZoom:e=>n().states[e]?.calculatedZoom??100,getFitToWindow:e=>n().states[e]?.fitToWindow??!0,getDisplayZoom:e=>{let t=n().states[e];return t?t.fitToWindow?t.calculatedZoom:t.userZoom:100},setUserZoom:(n,r)=>e(e=>({states:{...e.states,[n]:{...e.states[n]??t,userZoom:r,fitToWindow:!1}}})),setFitToWindow:(n,r)=>e(e=>({states:{...e.states,[n]:{...e.states[n]??t,fitToWindow:r}}})),updateCalculatedZoom:(n,r,i)=>{let a=Math.min(i.width/r.width,i.height/r.height),o=Math.round(a*100);e(e=>({states:{...e.states,[n]:{...e.states[n]??t,calculatedZoom:o}}}))},reset:n=>e(e=>({states:{...e.states,[n]:t}}))})),r=e=>n(t=>t.states[e]?.fitToWindow??!0),i=e=>n(t=>{let n=t.states[e];return n?n.fitToWindow?n.calculatedZoom:n.userZoom:100});Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return r}}),Object.defineProperty(exports,`r`,{enumerable:!0,get:function(){return n}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return i}});
|