efficient-shell 4.165.0 → 4.167.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 +117 -3
- package/dist/{Browser-ZX5GWPSM.js → Browser-6JAAEWKO.js} +12 -12
- package/dist/Calculator-NXMUEH5D.js +29 -0
- package/dist/ConfirmDialog-ZDVMT74Y.js +1 -0
- package/dist/{CurrencyConverter-7OPRFA5D.js → CurrencyConverter-3BTIZ2LT.js} +8 -8
- package/dist/{Documents-QV63346J.js → Documents-DJI7WGXG.js} +15 -15
- package/dist/{Files-BU5V56YF.js → Files-T5EUM5IQ.js} +19 -19
- package/dist/Notepad-KNRYFOM4.js +25 -0
- package/dist/{PomodoroTimer-FJV6MGE3.js → PomodoroTimer-SCPEOG6W.js} +26 -26
- package/dist/{Preview-PMQKG6FH.js → Preview-XLDGT7V4.js} +10 -10
- package/dist/{Sidebar-E6GLVCJL.js → Sidebar-C5RXL72L.js} +21 -21
- package/dist/Spreadsheet-3GOYRHZ3.js +37 -0
- package/dist/{Stock-SSNUY34E.js → Stock-UGDIALNB.js} +4 -4
- package/dist/{Weather-T5WM66B2.js → Weather-CR2MN5XF.js} +17 -17
- package/dist/{WorldClock-C3GT27AV.js → WorldClock-JBNJ7C7J.js} +6 -6
- package/dist/apps/index.js +1 -1
- package/dist/brand.css +1 -1
- package/dist/chunk-AFYQTVZO.js +1 -0
- package/dist/{chunk-D7EJSASN.js → chunk-B5OVATHU.js} +1 -1
- package/dist/{chunk-QTPVA26D.js → chunk-CUX4XGLS.js} +1 -1
- package/dist/chunk-CZMMBYNN.js +1 -0
- package/dist/chunk-FVXBJGY5.js +5 -0
- package/dist/chunk-GVZLCY3B.js +994 -0
- package/dist/chunk-HZZNJHRH.js +1 -0
- package/dist/{chunk-RKEHUV7U.js → chunk-JLPJBO7K.js} +1 -1
- package/dist/chunk-JYLI2WXW.js +12 -0
- package/dist/{chunk-ZLJCWBDF.js → chunk-LW27IM3S.js} +98 -98
- package/dist/chunk-M4DB7UBZ.js +29 -0
- package/dist/chunk-N3ZXQE4M.js +10 -0
- package/dist/chunk-SOI4LR67.js +27 -0
- package/dist/chunk-X4FJ54PP.js +1 -0
- package/dist/{chunk-DJ6UVHAZ.js → chunk-XKHAP6N2.js} +8 -8
- package/dist/{index-DRkpyISn.d.ts → index-CbLbd__n.d.ts} +242 -15
- package/dist/index.d.ts +3 -13
- package/dist/index.js +92 -92
- package/dist/map/index.js +4 -4
- package/dist/page-tabs/index.js +5 -5
- package/dist/ui/index.d.ts +1 -1
- package/dist/ui/index.js +1 -1
- package/dist/ui.css +12 -0
- package/package.json +1 -1
- package/dist/Calculator-NZH4FVRW.js +0 -29
- package/dist/ConfirmDialog-WEVZTFLU.js +0 -1
- package/dist/Notepad-KZIJ5ZTF.js +0 -25
- package/dist/Spreadsheet-DE5HPVE2.js +0 -37
- package/dist/chunk-4UCRT4ST.js +0 -5
- package/dist/chunk-ELSUXC3N.js +0 -1
- package/dist/chunk-FGPWGHNT.js +0 -27
- package/dist/chunk-KRTZFHYW.js +0 -29
- package/dist/chunk-MAIHBBWT.js +0 -1
- package/dist/chunk-SHVGZW2J.js +0 -1
- package/dist/chunk-SQ7BPUZG.js +0 -9
- package/dist/chunk-VDL2RLZG.js +0 -10
- package/dist/chunk-XYITV4EC.js +0 -983
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function r(){try{const r=document.documentElement;return"dark"===r.getAttribute("data-theme")||r.classList.contains("dark")}catch{return!1}}var a=["data-theme","class"];function s(){try{const r=getComputedStyle(document.documentElement).getPropertyValue("--menu-opacity")?.trim();if(r)return parseFloat(r)}catch{}return.95}var t=r;function o(){try{return document.documentElement.classList.contains("rosh-reduce-transparency")}catch{return!1}}function e(r,a){return`color-mix(in srgb, ${r} ${+(Math.round(255*Math.min(1,Math.max(0,a)))/255*100).toFixed(4)}%, transparent)`}function n(r,a={}){const n=r??s();if(o()&&"light"===a.ink)return{background:"var(--rosh-glass-light-ink-surface)",border:"1px solid var(--rosh-glass-light-ink-solid-border)",boxShadow:"var(--rosh-glass-solid-shadow)"};if(o())return{background:"var(--rosh-glass-surface)",border:"1px solid var(--rosh-glass-solid-border)",boxShadow:"var(--rosh-glass-solid-shadow)"};const d="var(--rosh-glass-surface)",i="var(--rosh-glass-surface-mid)";return t()?{background:`linear-gradient(135deg in srgb, ${e(d,.85*n)} 0%, ${e(i,.75*n)} 50%, ${e(d,.85*n)} 100%)`,backdropFilter:"blur(40px) saturate(1.6)",WebkitBackdropFilter:"blur(40px) saturate(1.6)",border:"1px solid var(--rosh-glass-border)",boxShadow:"var(--rosh-glass-shadow)"}:{background:`linear-gradient(135deg in srgb, ${e(d,.85*n)} 0%, ${e(i,.65*n)} 50%, ${e(d,.75*n)} 100%)`,backdropFilter:"blur(40px) saturate(1.8)",WebkitBackdropFilter:"blur(40px) saturate(1.8)",border:"1px solid var(--rosh-glass-border)",boxShadow:"var(--rosh-glass-shadow)"}}function d(r){return o()?"var(--rosh-glass-surface)":e("var(--rosh-glass-surface)",.85*(r??s()))}var i="border-white/20",u="glass-input-bg";export{i as GLASS_DIVIDER,u as GLASS_INPUT_BG,a as ROOT_THEME_ATTRIBUTES,d as glassFill,n as glassStyle,r as rootIsDark};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{Modal as e}from"./chunk-
|
|
1
|
+
import{Modal as e}from"./chunk-LW27IM3S.js";import{keepsNativeMenu as a}from"./chunk-N3ZXQE4M.js";import{jsx as i,jsxs as n}from"react/jsx-runtime";var t={activeOpacity:70,inactiveOpacity:50,activeBlur:0,inactiveBlur:0};function r(e){try{const a=JSON.parse(localStorage.getItem(e)||"");return null!=a.blur&&null==a.activeBlur&&(a.activeBlur=a.blur,a.inactiveBlur=a.blur,delete a.blur),{...t,...a}}catch{return t}}function l({open:t,onClose:r,title:l,appearance:c,onAppearanceChange:s,onSave:d,children:o}){if(!t)return null;const u="w-full h-1.5 rounded-full appearance-none bg-gray-200 cursor-pointer accent-blue-500",p="flex items-center justify-between text-xs text-gray-500";/* @__PURE__ */
|
|
2
2
|
return i("div",{onPointerDown:e=>e.stopPropagation(),onContextMenu:e=>{e.stopPropagation(),a(e.target)||e.preventDefault()},children:/* @__PURE__ */i(e,{open:t,onClose:r,title:l,size:"sm",children:/* @__PURE__ */n("div",{className:"space-y-4",children:[o,
|
|
3
3
|
/* @__PURE__ */n("div",{children:[
|
|
4
4
|
/* @__PURE__ */i("h3",{className:"text-sm font-semibold text-gray-700 mb-3",children:"Appearance"}),
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import{glassStyle as t,glassFill as e}from"./chunk-HZZNJHRH.js";import{registerModalEscapeInterceptor as o,escapeSurfaceAbove as i,onOverlayOpen as r,Z_LAYERS as n}from"./chunk-X4FJ54PP.js";import{useBrowserLayoutEffect as a}from"./chunk-D65T4H6J.js";import{forwardRef as l,useId as s,useState as h,useRef as c,useEffect as d,isValidElement as m,cloneElement as u}from"react";import{createPortal as f}from"react-dom";import{jsxs as g,jsx as p,Fragment as b}from"react/jsx-runtime";var x="aria-disabled:cursor-not-allowed aria-disabled:opacity-60",w="inline-flex items-center justify-center rounded-md font-medium transition-colors rosh-focus-ring focus-visible:ring-2 disabled:cursor-not-allowed disabled:opacity-60 "+x,v={primary:"bg-blue-600 text-white shadow-sm hover:bg-blue-700 focus-visible:ring-[color:var(--rosh-focus-ring-strong)]",secondary:"border border-gray-300 bg-white text-gray-700 shadow-sm hover:bg-gray-50 focus-visible:ring-[color:var(--rosh-focus-ring)]",ghost:"text-gray-700 hover:bg-gray-100 focus-visible:ring-[color:var(--rosh-focus-ring)]","ghost-danger":"text-red-600 hover:bg-red-50 focus-visible:ring-[color:var(--rosh-focus-ring-invalid)]",danger:"bg-red-600 text-white shadow-sm hover:bg-red-700 focus-visible:ring-[color:var(--rosh-focus-ring-invalid-strong)]",link:"text-blue-600 underline-offset-4 hover:underline focus-visible:ring-[color:var(--rosh-focus-ring)]"},y={sm:"gap-1 px-2.5 py-1 text-xs",md:"gap-1.5 px-3 py-1.5 text-sm",lg:"gap-2 px-4 py-2.5 text-sm","touch-sm":"gap-1.5 h-11 px-4 text-base",touch:"gap-2 h-14 px-5 text-base","touch-lg":"gap-2 h-16 px-6 text-lg","touch-xl":"gap-3 h-20 px-8 text-2xl"},M="inline-flex items-center font-medium transition-colors rosh-focus-ring focus-visible:ring-2 disabled:cursor-not-allowed disabled:opacity-60 "+x,N={sm:"gap-1 text-xs",md:"gap-1.5 text-sm",lg:"gap-2 text-sm","touch-sm":"gap-1.5 text-base",touch:"gap-2 text-base","touch-lg":"gap-2 text-lg","touch-xl":"gap-3 text-2xl"},W={sm:"h-6 w-6",md:"h-8 w-8",lg:"h-10 w-10","touch-sm":"h-11 w-11",touch:"h-14 w-14","touch-lg":"h-16 w-16","touch-xl":"h-20 w-20"};function k({variant:t="primary",size:e="md",block:o=!1,className:i=""}={}){const r="link"===t;return[r?M:w,v[t],r?N[e]:y[e],o?"w-full":"",i].filter(Boolean).join(" ")}function H({variant:t="ghost",size:e="md",pressed:o=!1,className:i=""}={}){const r=!o||"ghost"!==t&&"secondary"!==t?v[t]:"bg-blue-50 text-blue-700 hover:bg-blue-100 focus-visible:ring-[color:var(--rosh-focus-ring)]";return[w,r,W[e],"shrink-0 p-0",i].filter(Boolean).join(" ")}var C=448,B=240,R=8,j=()=>({left:0,right:window.innerWidth,top:0,bottom:window.innerHeight});function z(t){const e=j(),o=t?.closest?.("[data-modal-panel]");if(!o)return e;const i=o.getBoundingClientRect();return i.width<=0||i.height<=0?e:{left:Math.max(e.left,i.left),right:Math.min(e.right,i.right),top:Math.max(e.top,i.top),bottom:Math.min(e.bottom,i.bottom)}}var E=/* @__PURE__ */new Set(["hidden","clip","auto","scroll"]);var T={top:"bottom",bottom:"top",left:"right",right:"left"},F={top:["right","left"],bottom:["right","left"],left:["top","bottom"],right:["top","bottom"]};function L(t,e,o){return{top:t.top-o-(e.top+8),bottom:e.bottom-8-(t.bottom+o),left:t.left-o-(e.left+8),right:e.right-8-(t.right+o)}}var P=(t,e,o)=>Math.max(e,Math.min(t,o));function A(t,e,o){let i=NaN,r=NaN,n=NaN,a=NaN,l=NaN;const s=()=>{const e=t()?.getBoundingClientRect();if(!e)return!1;const s=o?o():NaN,h=e.left!==i||e.top!==r||e.right!==n||e.bottom!==a||s!==l&&!(Number.isNaN(s)&&Number.isNaN(l));return i=e.left,r=e.top,n=e.right,a=e.bottom,l=s,h};s();const h=()=>{s(),e()};let c=requestAnimationFrame(function t(){s()&&e(),c=requestAnimationFrame(t)});return window.addEventListener("scroll",h,!0),window.addEventListener("resize",h),()=>{cancelAnimationFrame(c),window.removeEventListener("scroll",h,!0),window.removeEventListener("resize",h)}}function D({trigger:t,menu:e,bounds:o,align:i,side:r}){const n=L(t,o,4),a="bottom"===r?"top":"bottom",l=e.height>n[r]&&(e.height<=n[a]||n[a]>n[r])?a:r,s=Math.max(Math.min(e.height,96),n[l]),h=Math.min(e.height,s),c=P("bottom"===l?t.bottom+4:t.top-4-h,o.top+8,o.bottom-8-h),d=Math.max(0,o.right-o.left-16),m=Math.min(e.width,d);return{left:P("start"===i?t.left:t.right-m,o.left+8,o.right-8-m),top:c,side:l,maxHeight:s,maxWidth:d}}function I(t,e,o={}){const{matchTriggerWidth:i=!1,preferredMaxWidth:r=C,preferredMaxHeight:n=B,popupRef:l}=o,[s,c]=h(null);return a(()=>{if(!e)return void c(null);const o=()=>{const e=t.current,o=e?.getBoundingClientRect();if(!o)return;const a=z(e),s=a.bottom-o.bottom-4-8,h=o.top-a.top-4-8,d=s<Math.min(n,160)&&h>s,m=Math.max(96,Math.min(n,d?h:s)),u=Math.max(0,a.right-a.left-16),f={minWidth:o.width,maxWidth:Math.min(r,u),maxHeight:m};if(i){const t=Math.min(o.width,u);f.width=t,f.maxWidth=t,f.left=Math.min(Math.max(a.left+8,o.left),a.right-8-t)}else if(l&&a.right-8-o.left<f.maxWidth&&Math.min(o.right,a.right-8)-a.left-8<f.maxWidth){const t=l.current?.offsetWidth??0,e=t>0?Math.min(t,f.maxWidth):f.maxWidth;f.left=Math.max(a.left+8,Math.min(o.left,a.right-8-e))}else if(a.right-8-o.left<f.maxWidth){const t=Math.min(o.right,a.right-8);f.right=window.innerWidth-t,f.maxWidth=Math.min(f.maxWidth,Math.max(0,t-a.left-8))}else f.left=Math.max(a.left+8,o.left);d?f.bottom=window.innerHeight-o.top+4:f.top=o.bottom+4,c(f)};return o(),A(()=>t.current,o,l?()=>l.current?.offsetWidth??NaN:void 0)},[e,t,i,r,n,l]),s}function J({point:t,menu:e,bounds:o}){const i={left:t.x,right:t.x,top:t.y,bottom:t.y},r=o.right-8-t.x,n=t.x-(o.left+8);return D({trigger:i,menu:e,bounds:o,align:e.width<=r||r>=n?"start":"end",side:"bottom"})}var S={top:"bottom-full left-1/2 -translate-x-1/2 mb-3",bottom:"top-full left-1/2 -translate-x-1/2 mt-3",left:"right-full top-1/2 -translate-y-1/2 mr-3",right:"left-full top-1/2 -translate-y-1/2 ml-3"};function $({content:l,side:b="top",delay:x=200,children:w,className:v="relative inline-flex",describe:y=!0}){const[M,N]=h(!1),[W,k]=h(null),H=c(void 0),C=c(null),B=c(null),R=s(),D=c(!1),I=()=>{window.clearTimeout(H.current),D.current||(H.current=window.setTimeout(()=>N(!0),x))},J=()=>{window.clearTimeout(H.current),N(!1)},$=()=>{D.current=!0,J()},q=()=>{D.current=!1,J()};d(()=>()=>window.clearTimeout(H.current),[]),a(()=>{if(!M)return void k(null);const t=()=>{const t=C.current,e=B.current;if(!t||!e)return;const o=z(t),i=Math.max(0,o.right-o.left-16),r=Math.max(0,o.bottom-o.top-16);e.style.maxWidth=`${i}px`,e.style.maxHeight=`${r}px`;const n=e.getBoundingClientRect();if(n.width<=0||n.height<=0)return;const a=t.getBoundingClientRect();if(!function(t){const e=t.getBoundingClientRect();if(e.width<=0&&e.height<=0&&0===e.left&&0===e.top)return null;const o=j(),i={left:Math.max(o.left,e.left),right:Math.min(o.right,e.right),top:Math.max(o.top,e.top),bottom:Math.min(o.bottom,e.bottom)};let r=getComputedStyle(t).position;for(let e=t.parentElement;e&&e!==document.documentElement&&"fixed"!==r;e=e.parentElement){const t=getComputedStyle(e);if("absolute"===r&&"static"===t.position)continue;r=t.position;const o=E.has(t.overflowX),n=E.has(t.overflowY);if(!o&&!n)continue;const a=e.getBoundingClientRect();a.width<=0&&a.height<=0||(o&&(i.left=Math.max(i.left,a.left),i.right=Math.min(i.right,a.right)),n&&(i.top=Math.max(i.top,a.top),i.bottom=Math.min(i.bottom,a.bottom)))}return i.right>=i.left&&i.bottom>=i.top?i:null}(t))return void J();const l=function(t,e,o,i,r){const n=L(t,i,r),a=t=>n[t]-("top"===t||"bottom"===t?e.height:e.width),l=[o,T[o],...F[o]],s=l.find(t=>a(t)>=0)??l.reduce((t,e)=>a(e)>a(t)?e:t),h=(t.left+t.right)/2,c=(t.top+t.bottom)/2;let d,m;switch(s){case"top":d=h-e.width/2,m=t.top-r-e.height;break;case"bottom":d=h-e.width/2,m=t.bottom+r;break;case"left":d=t.left-r-e.width,m=c-e.height/2;break;case"right":d=t.right+r,m=c-e.height/2}return{side:s,left:P(d,i.left+8,i.right-8-e.width),top:P(m,i.top+8,i.bottom-8-e.height)}}(a,n,b,o,12),s=function(t,e,o,i,r){const{side:n,left:a,top:l}=e,s=a+o.width,h=l+o.height;if({top:t.top-h,bottom:l-t.bottom,left:t.left-s,right:a-t.right}[n]<r)return null;const c=(t,e,o)=>o<2*i?e+o/2:Math.max(e+i,Math.min(t,e+o-i)),d=(t.left+t.right)/2,m=(t.top+t.bottom)/2;switch(n){case"top":return{side:n,x:c(d,a,o.width),y:h};case"bottom":return{side:n,x:c(d,a,o.width),y:l};case"left":return{side:n,x:s,y:c(m,l,o.height)};case"right":return{side:n,x:a,y:c(m,l,o.height)}}}(a,l,n,16,6),h={anchor:{left:a.left,top:a.top,width:a.width,height:a.height},left:l.left-a.left,top:l.top-a.top,maxWidth:i,maxHeight:r,side:l.side,arrow:s&&{left:s.x-a.left,top:s.y-a.top}};k(t=>{return t&&(o=h,(e=t).anchor.left===o.anchor.left&&e.anchor.top===o.anchor.top&&e.anchor.width===o.anchor.width&&e.anchor.height===o.anchor.height&&e.left===o.left&&e.top===o.top&&e.maxWidth===o.maxWidth&&e.maxHeight===o.maxHeight&&e.side===o.side&&e.arrow?.left===o.arrow?.left&&e.arrow?.top===o.arrow?.top)?t:h;var e,o})};return t(),A(()=>C.current,t)},[M,b,l]),d(()=>{if(!M)return;const t=o(t=>"Escape"===t.key&&(J(),!i(C.current))),e=r(J);return()=>{t(),e()}},[M]);const X=M&&y?R:void 0,Z=m(w)?u(w,{"aria-describedby":[w.props["aria-describedby"],X].filter(Boolean).join(" ")||void 0}):w,Y=M?t():void 0,G=M?e():void 0;/* @__PURE__ */
|
|
2
|
+
return g("span",{ref:C,className:v,"aria-describedby":m(w)?void 0:X,onMouseEnter:I,onMouseLeave:q,onFocus:I,onBlur:q,onPointerDown:$,onClick:$,children:[Z,M&&f(
|
|
3
|
+
/* @__PURE__ */g("span",{className:"pointer-events-none fixed left-0 top-0",style:{zIndex:n.popup,...W?.anchor},children:[
|
|
4
|
+
/* @__PURE__ */p("span",{ref:B,id:R,role:"tooltip",className:`pointer-events-none absolute z-[300] box-border w-max overflow-hidden whitespace-normal break-words text-start rounded-md px-2 py-1 text-xs text-gray-800 ${W?"":S[b]}`,style:{...Y,...W&&{left:W.left,top:W.top,maxWidth:W.maxWidth,maxHeight:W.maxHeight}},children:l}),(!W||W.arrow)&&
|
|
5
|
+
/* @__PURE__ */p("span",{"aria-hidden":"true",className:"rosh-tooltip-arrow","data-side":W?.side??b,style:{background:G,"--rosh-tooltip-edge":Y?.border,...W?.arrow&&{left:W.arrow.left,top:W.arrow.top}}})]}),document.body)]})}var q=t=>!0===t||"true"===t;function X(t){t.preventDefault(),t.stopPropagation()}var Z=(t,e)=>[t,e].filter(Boolean).join(" ")||void 0;function Y({reason:t,id:e,block:o=!1,children:i}){/* @__PURE__ */
|
|
6
|
+
return g(b,{children:[
|
|
7
|
+
/* @__PURE__ */p($,{content:t,describe:!1,className:o?"relative flex w-full":"relative inline-flex",children:i}),
|
|
8
|
+
/* @__PURE__ */p("span",{id:e,className:"sr-only",children:t})]})}function G(){/* @__PURE__ */
|
|
9
|
+
return g("svg",{className:"h-3.5 w-3.5 animate-spin",viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",children:[
|
|
10
|
+
/* @__PURE__ */p("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),
|
|
11
|
+
/* @__PURE__ */p("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8v4a4 4 0 00-4 4H4z"})]})}var K=l(function({variant:t="primary",size:e="md",loading:o=!1,leftIcon:i,rightIcon:r,block:n=!1,disabled:a,type:l="button",children:h,className:c="",disabledReason:d,onClick:m,"aria-disabled":u,"aria-describedby":f,...b},x){const w=s(),v=a||o,y=null!=d&&""!==d,M=v&&y,N=!v&&q(u),W=N&&y,H=M||W?w:void 0,C=/* @__PURE__ */g("button",{ref:x,type:l,disabled:v,"aria-busy":o||void 0,"aria-disabled":!!N||u,"aria-describedby":Z(f,H),onClick:N?X:m,className:k({variant:t,size:e,block:n,className:c}),...b,children:[o?/* @__PURE__ */p(G,{}):i,h,!o&&r]});return W?/* @__PURE__ */p(Y,{reason:d,id:w,block:n,children:C}):M?/* @__PURE__ */g("span",{className:n?"flex w-full flex-col gap-1":"inline-flex flex-col items-start gap-1",children:[C,
|
|
12
|
+
/* @__PURE__ */p("span",{id:H,className:"text-xs text-red-600",children:d})]}):C});export{K as Button_default,B as MENU_MAX_HEIGHT,Y as OffWithReason,C as POPUP_MAX_WIDTH,$ as Tooltip,R as VIEWPORT_MARGIN,k as buttonClasses,Z as describedByWith,A as followAnchor,H as iconButtonClasses,q as isAriaDisabled,J as placeAtPoint,D as placeMenu,z as popupBounds,X as swallowPress,I as useDropdownPosition};
|