efficient-shell 4.147.0 → 4.148.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +77 -0
- package/dist/{Browser-52FZDK3P.js → Browser-7R3TZSJ6.js} +14 -14
- package/dist/{Calculator-4S44DK45.js → Calculator-4CLXMBA4.js} +20 -20
- package/dist/{ConfirmDialog-KJNNVFK7.js → ConfirmDialog-DUYZA2FE.js} +1 -1
- package/dist/{CurrencyConverter-TH6ISVZ5.js → CurrencyConverter-KWNYRYOZ.js} +6 -6
- package/dist/{Documents-TEV6WUCC.js → Documents-ZWKLVUOC.js} +15 -15
- package/dist/{Files-T3VMQAO3.js → Files-SLJIS2FX.js} +32 -32
- package/dist/{Notepad-LYNVGUHK.js → Notepad-CBP2PUQD.js} +10 -10
- package/dist/{PomodoroTimer-IEZ3ALBW.js → PomodoroTimer-EOQDA5J7.js} +18 -18
- package/dist/{Preview-SJCMGRUS.js → Preview-PFJ6NPDF.js} +15 -15
- package/dist/{Spreadsheet-GR6GJTDP.js → Spreadsheet-IWXGGDMT.js} +10 -10
- package/dist/{Stock-MYXAUZJY.js → Stock-VVM7GK4C.js} +3 -3
- package/dist/{Weather-HKCFNPV6.js → Weather-4LJTQLDL.js} +13 -13
- package/dist/{WorldClock-6XVXM4L2.js → WorldClock-AHTVTAI7.js} +6 -6
- package/dist/apps/index.js +1 -1
- package/dist/chunk-ADTQ55CV.js +954 -0
- package/dist/{chunk-ZR72F7TE.js → chunk-ET5HXDOR.js} +29 -29
- package/dist/{chunk-NV35RTZK.js → chunk-JIUJNTJA.js} +1 -1
- package/dist/{chunk-NUPXFPQW.js → chunk-L2ZO76TC.js} +1 -1
- package/dist/chunk-QOXIUJTN.js +29 -0
- package/dist/chunk-VUXPSUWI.js +1 -0
- package/dist/{chunk-JNL7A5HC.js → chunk-ZBIWNVJS.js} +7 -7
- package/dist/{index-DIQYwgxx.d.ts → index-Cek0S3MH.d.ts} +64 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.js +97 -97
- package/dist/page-tabs/index.js +10 -10
- package/dist/ui/index.d.ts +1 -1
- package/dist/ui/index.js +1 -1
- package/package.json +1 -1
- package/dist/chunk-6JXLEPRE.js +0 -1
- package/dist/chunk-D4HWQ3ET.js +0 -29
- package/dist/chunk-ZFJH3P24.js +0 -951
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import{AVAILABLE_CITIES as e,fetchCityWeather as t,getCondition as a,toFahrenheit as r}from"./chunk-FBDZGO3V.js";import{loadAppearance as n,WidgetSettingsModal as i}from"./chunk-
|
|
1
|
+
import{AVAILABLE_CITIES as e,fetchCityWeather as t,getCondition as a,toFahrenheit as r}from"./chunk-FBDZGO3V.js";import{loadAppearance as n,WidgetSettingsModal as i}from"./chunk-L2ZO76TC.js";import{useWidgetSettings as s}from"./chunk-ET5HXDOR.js";import{useShellPrefs as c}from"./chunk-V453E4KU.js";import"./chunk-UB4JIOLD.js";import"./chunk-PH3PRIFP.js";import"./chunk-ZBIWNVJS.js";import"./chunk-QOXIUJTN.js";import"./chunk-57MIENLJ.js";import"./chunk-MAIHBBWT.js";import"./chunk-TR6PLN7W.js";import"./chunk-D65T4H6J.js";import{useState as l,useEffect as o,useCallback as m}from"react";import{jsxs as h,Fragment as d,jsx as p}from"react/jsx-runtime";var u="world_clock_appearance",g=["London","Shanghai","New York"];function x(){const{prefs:x,save:y}=c(),[b,f]=l(()=>n(u)),[k,N]=l(!1),[v,w]=l([]),[j,F]=l(b),C={useFahrenheit:!!x.weather_prefs?.useFahrenheit},[I,O]=l(C),[T,D]=l(()=>/* @__PURE__ */new Date);o(()=>{const e=setInterval(()=>D(/* @__PURE__ */new Date),3e4);return()=>clearInterval(e)},[]);const S=Object.fromEntries(Object.entries(e).map(([e,t])=>[t.tz,e])),L=x.world_clocks,B=(()=>{if(!Array.isArray(L)||0===L.length)return g;const t=[];for(const a of L){const r=e[a]?a:S[a];r&&!t.includes(r)&&t.push(r)}return t.length?t:g})(),[P,_]=l({}),[J,U]=l(!0);o(()=>{let e=!1;return U(!0),(async()=>{const a={};await Promise.all(B.map(async e=>{const r=await t(e);r&&(a[e]=r)})),e||(_(a),U(!1))})(),()=>{e=!0}},[B.join(",")]),s(m(()=>{w([...B]),F({...b}),O({...C}),N(!0)},[B.join(","),b,C.useFahrenheit]));const $=e=>C.useFahrenheit?`${r(e)}°`:`${e}°`;/* @__PURE__ */
|
|
2
2
|
return h(d,{children:[
|
|
3
|
-
/* @__PURE__ */p("div",{style:{backgroundColor:`rgb(var(--taskbar-bg-rgb, 243 244 246) / ${b.activeOpacity/100})`,backdropFilter:b.activeBlur>0?`blur(${b.activeBlur}px)`:void 0},children:/* @__PURE__ */h("div",{className:"divide-y divide-gray-200",children:[
|
|
3
|
+
/* @__PURE__ */p("div",{style:{backgroundColor:`rgb(var(--taskbar-bg-rgb, 243 244 246) / ${b.activeOpacity/100})`,backdropFilter:b.activeBlur>0?`blur(${b.activeBlur}px)`:void 0},children:/* @__PURE__ */h("div",{className:"divide-y divide-gray-200",children:[J&&B.every(e=>!P[e])&&/* @__PURE__ */p("div",{className:"px-3 py-6 text-center text-xs text-gray-500",children:"Loading…"}),B.map(t=>{const r=P[t],n=e[t]?.tz??"UTC",{time:i,ampm:s}=function(e,t){try{const a=new Intl.DateTimeFormat("en-US",{timeZone:e,hour:"numeric",minute:"2-digit",hour12:!0}).formatToParts(t),r=a.find(e=>"hour"===e.type)?.value||"12";return{time:`${r}:${a.find(e=>"minute"===e.type)?.value||"00"}`,ampm:(a.find(e=>"dayPeriod"===e.type)?.value||"").toUpperCase()}}catch{return{time:"",ampm:""}}}(n,T);if(!r)/* @__PURE__ */
|
|
4
4
|
return h("div",{className:"px-4 py-3",children:[
|
|
5
5
|
/* @__PURE__ */h("div",{className:"flex items-baseline justify-between gap-2",children:[
|
|
6
6
|
/* @__PURE__ */p("span",{className:"text-[15px] font-semibold tracking-tight text-gray-900 truncate",children:t}),
|
|
@@ -10,7 +10,7 @@ return h("div",{className:"px-4 py-3",children:[
|
|
|
10
10
|
return h("div",{className:"px-4 py-3",children:[
|
|
11
11
|
/* @__PURE__ */h("div",{className:"flex items-baseline justify-between gap-2",children:[
|
|
12
12
|
/* @__PURE__ */p("span",{className:"text-[15px] font-semibold tracking-tight text-gray-900 truncate",children:t}),
|
|
13
|
-
/* @__PURE__ */p("span",{className:"text-[26px] font-extralight leading-none tabular-nums tracking-tight text-gray-900 shrink-0",children
|
|
13
|
+
/* @__PURE__ */p("span",{className:"text-[26px] font-extralight leading-none tabular-nums tracking-tight text-gray-900 shrink-0",children:$(r.temp)})]}),
|
|
14
14
|
/* @__PURE__ */h("div",{className:"flex items-center justify-between gap-2 mt-1.5 text-[11px]",children:[
|
|
15
15
|
/* @__PURE__ */h("div",{className:"flex items-center gap-1.5 min-w-0 text-gray-500",children:[
|
|
16
16
|
/* @__PURE__ */p("span",{className:"text-base leading-none shrink-0",children:l}),
|
|
@@ -18,13 +18,13 @@ return h("div",{className:"px-4 py-3",children:[
|
|
|
18
18
|
/* @__PURE__ */p("span",{className:"text-[9px] font-medium ml-0.5 opacity-70",children:s})]}),
|
|
19
19
|
/* @__PURE__ */p("span",{className:"text-gray-300 shrink-0",children:"·"}),
|
|
20
20
|
/* @__PURE__ */p("span",{className:"truncate",children:c})]}),
|
|
21
|
-
/* @__PURE__ */h("span",{className:"tabular-nums text-gray-500 shrink-0",children:["H:"
|
|
22
|
-
/* @__PURE__ */h(i,{open:k,onClose:()=>N(!1),title:"World Clock Settings",appearance:j,onAppearanceChange:F,onSave:()=>{0!==v.length&&(y({world_clocks:v,weather_prefs:{...x.weather_prefs??{},useFahrenheit:
|
|
21
|
+
/* @__PURE__ */h("span",{className:"tabular-nums text-gray-500 shrink-0",children:["H:",$(r.high)," L:",$(r.low)]})]})]},t)})]})}),
|
|
22
|
+
/* @__PURE__ */h(i,{open:k,onClose:()=>N(!1),title:"World Clock Settings",appearance:j,onAppearanceChange:F,onSave:()=>{0!==v.length&&(y({world_clocks:v,weather_prefs:{...x.weather_prefs??{},useFahrenheit:I.useFahrenheit}}),f(j),localStorage.setItem(u,JSON.stringify(j)),N(!1))},children:[
|
|
23
23
|
/* @__PURE__ */h("div",{children:[
|
|
24
24
|
/* @__PURE__ */p("h3",{className:"text-sm font-semibold text-gray-700 mb-2",children:"Display"}),
|
|
25
25
|
/* @__PURE__ */h("div",{className:"flex items-center gap-3 mb-2",children:[
|
|
26
26
|
/* @__PURE__ */p("span",{className:"text-sm text-gray-600 w-24",children:"Temperature"}),
|
|
27
|
-
/* @__PURE__ */p("div",{className:"flex gap-1",children:[{key:!1,label:"°C"},{key:!0,label:"°F"}].map(e=>/* @__PURE__ */p("button",{onClick:()=>
|
|
27
|
+
/* @__PURE__ */p("div",{className:"flex gap-1",children:[{key:!1,label:"°C"},{key:!0,label:"°F"}].map(e=>/* @__PURE__ */p("button",{onClick:()=>O(t=>({...t,useFahrenheit:e.key})),className:"px-3 py-1 text-xs font-medium rounded-lg border transition-colors "+(I.useFahrenheit===e.key?"bg-blue-600 text-white border-blue-600":"bg-white text-gray-700 border-gray-300 hover:bg-gray-50"),children:e.label},String(e.key)))})]}),
|
|
28
28
|
/* @__PURE__ */p("p",{className:"text-[10px] text-gray-400 mt-1",children:"Shared with the Weather widget."})]}),
|
|
29
29
|
/* @__PURE__ */h("div",{children:[
|
|
30
30
|
/* @__PURE__ */p("h3",{className:"text-sm font-semibold text-gray-700 mb-2",children:"Cities"}),
|
package/dist/apps/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
export{setBrowserStartUrl}from"../chunk-LWLCNQY7.js";export{openFilesInTrashMode,setFilesDemoTree}from"../chunk-FHTLC7HH.js";export{BUILTIN_APP_INFO}from"../chunk-
|
|
2
|
+
export{setBrowserStartUrl}from"../chunk-LWLCNQY7.js";export{openFilesInTrashMode,setFilesDemoTree}from"../chunk-FHTLC7HH.js";export{BUILTIN_APP_INFO}from"../chunk-JIUJNTJA.js";import"../chunk-NPJH5MD7.js";import{setPdfPreview as e}from"../chunk-ESL5TDNA.js";export{setPdfPreview}from"../chunk-ESL5TDNA.js";import{toast_default as t}from"../chunk-KKOHUQPF.js";import{setSpreadsheetPreview as o}from"../chunk-VTVSMRFX.js";export{setSpreadsheetPreview}from"../chunk-VTVSMRFX.js";import"../chunk-VUXPSUWI.js";import"../chunk-ET5HXDOR.js";import"../chunk-V453E4KU.js";import"../chunk-UB4JIOLD.js";import"../chunk-PH3PRIFP.js";import"../chunk-ZBIWNVJS.js";import"../chunk-QOXIUJTN.js";import"../chunk-57MIENLJ.js";import"../chunk-MAIHBBWT.js";import"../chunk-TR6PLN7W.js";import"../chunk-D65T4H6J.js";import{lazy as i}from"react";function n(e){const t=/\.([a-z0-9]+)(?:[?#].*)?$/i.exec((e||"").trim());return t?t[1].toLowerCase():""}var r=/* @__PURE__ */new Set(["csv","tsv"]),s=/* @__PURE__ */new Set(["xlsx","xls","xlsm","ods"]),a=/* @__PURE__ */new Set(["png","jpg","jpeg","gif","webp","bmp","svg","avif"]),l=/* @__PURE__ */new Set(["step","stp","stl","obj","gltf","glb","3mf","iges","igs"]);function c(e){const t=n(e);return"pdf"===t?"pdf":"dxf"===t?"dxf":r.has(t)?"csv":a.has(t)?"image":l.has(t)?"3d":null}function p(e){window.open(e,"_blank","noopener,noreferrer")}async function m(e,t,o){if(t.fetchBlob)return(await t.fetchBlob(o)).text();const i=await fetch(e);if(!i.ok)throw new Error(`fetch failed: ${i.status}`);return i.text()}function u(e,t){return(e instanceof Error?e.message:"")||t}async function h(i,r,a={}){const l=i?.url||"",h=i?.filename||"attachment";if(!l&&!a.fetchBlob)return void t.error("This attachment has no download link.");const d=c(h)??c(l);if("csv"===d){try{o({csv:await m(l,a,i),filename:h}),r("/spreadsheet")}catch{t.error("Could not open the spreadsheet — opening the file instead."),l&&p(l)}return}if(s.has(n(h)||n(l)))return t.error("Spreadsheet preview is unavailable for this file type. Opening the file instead."),void(l&&p(l));if(!d)return l?(t.info("Opening this file outside the app — no viewer can show it here."),void p(l)):void t.error("This attachment has no download link.");if(!a.fetchBlob)return e({url:l,filename:h,kind:d}),void r("/preview");const f=e({filename:h,kind:d,converting:!0,convertingMessage:a.loadingMessage||"LOADING FILE"});r("/preview");try{const e=await a.fetchBlob(i);f.update({url:URL.createObjectURL(e),filename:h,kind:d})}catch(e){f.update({filename:h,kind:d,converting:!1,convertingMessage:u(e,"Failed to load this file.")})}}var d=i(()=>import("../Calculator-4CLXMBA4.js")),f=i(()=>import("../Spreadsheet-IWXGGDMT.js")),w=i(()=>import("../Weather-4LJTQLDL.js")),j=i(()=>import("../CurrencyConverter-KWNYRYOZ.js")),k=i(()=>import("../PomodoroTimer-EOQDA5J7.js")),g=i(()=>import("../Notepad-CBP2PUQD.js")),v=i(()=>import("../WorldClock-AHTVTAI7.js")),T=i(()=>import("../Stock-VVM7GK4C.js")),b=i(()=>import("../Preview-PFJ6NPDF.js")),S=i(()=>import("../PdfViewer-ZCT3PYXU.js")),P=i(()=>import("../Documents-ZWKLVUOC.js")),I=i(()=>import("../Files-SLJIS2FX.js")),x=i(()=>import("../Browser-7R3TZSJ6.js")),y={"/calculator":{component:d,label:"Calculator",size:"sm",allowPinOnTop:!0,utility:!0,widget:!0,dimensions:[280,420]},"/spreadsheet":{component:f,label:"Spreadsheets",size:"2xl",appStyle:!0,multiInstance:!0},"/notepad":{component:g,label:"Notepad",size:"lg",allowPinOnTop:!0,flushBody:!0},"/weather":{component:w,label:"Weather",size:"sm",utility:!0,widget:!0,autoHeight:!0,dimensions:[320,400]},"/currency":{component:j,label:"Currency Converter",size:"sm",utility:!0,widget:!0,autoHeight:!0,dimensions:[320,480]},"/pomodoro":{component:k,label:"Pomodoro Timer",size:"sm",utility:!0,widget:!0,dimensions:[320,600]},"/world-clock":{component:v,label:"World Clock",size:"sm",utility:!0,widget:!0,autoHeight:!0,dimensions:[320,480]},"/stock":{component:T,label:"Stocks",size:"sm",utility:!0,widget:!0,autoHeight:!0,dimensions:[320,360]}},L={"/preview":{component:b,label:"Preview",size:"2xl",appStyle:!0,multiInstance:!0},"/documents":{component:P,label:"Documents",size:"xl",appStyle:!0,multiInstance:!0},"/files":{component:I,label:"Files",size:"xl",appStyle:!0}},C={"/browser":{component:x,label:"Browser",size:"2xl",appStyle:!0,multiInstance:!0}},B={...y,...L,...C};export{x as Browser,d as Calculator,j as CurrencyConverter,P as Documents,I as Files,g as Notepad,S as PdfViewer,k as PomodoroTimer,b as Preview,f as Spreadsheet,T as Stock,w as Weather,v as WorldClock,c as attachmentKind,B as bundledApps,L as documentApps,h as openAttachment,y as utilityApps,C as webApps};
|