efficient-shell 6.4.0 → 7.7.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 +88 -22
- package/dist/Browser-56LX7FTE.js +43 -0
- package/dist/Calculator-GBKLJHM6.js +29 -0
- package/dist/ConfirmDialog-PS5BXNAT.js +1 -0
- package/dist/CurrencyConverter-ZXY7XNG6.js +21 -0
- package/dist/{Documents-ADFEHEUW.js → Documents-SVKR757H.js} +27 -27
- package/dist/Files-KSHU7ROB.js +87 -0
- package/dist/Notepad-5GT2GUCJ.js +25 -0
- package/dist/PdfViewer-YVAWFZVH.js +1 -0
- package/dist/PomodoroTimer-GAGDQ4NF.js +91 -0
- package/dist/Preview-YDCDW5NE.js +182 -0
- package/dist/Sidebar-IH6WUPKT.js +44 -0
- package/dist/Spreadsheet-SYR23K4I.js +37 -0
- package/dist/Stock-LH5CR667.js +16 -0
- package/dist/{Weather-BLO354GM.js → Weather-MZGIPR2R.js} +35 -35
- package/dist/WorldClock-DLB2RRLI.js +32 -0
- package/dist/apps/index.js +1 -1
- package/dist/bin/ui-check.js +1 -1
- package/dist/brand.css +1 -1
- package/dist/chunk-2ALIPI3D.js +1 -0
- package/dist/{chunk-MORDXCV6.js → chunk-2R5RTN5T.js} +1 -1
- package/dist/{chunk-5LUN632W.js → chunk-43XFZY4K.js} +2 -2
- package/dist/{chunk-ZEIKSMFR.js → chunk-4JGNJYVL.js} +8 -8
- package/dist/{chunk-XO2AMGVU.js → chunk-5TOLXFQ6.js} +1 -1
- package/dist/{chunk-QJHWLDEN.js → chunk-6SCHK75C.js} +50 -50
- package/dist/{chunk-4JZZLUGG.js → chunk-B4PGVDB6.js} +1 -1
- package/dist/chunk-BUGGBB5J.js +1 -0
- package/dist/{chunk-2SSRFEOZ.js → chunk-CJHT4VTF.js} +1 -1
- package/dist/chunk-CLFUF3BH.js +9 -0
- package/dist/{chunk-I2H2CKID.js → chunk-CQ2DLPPS.js} +1 -1
- package/dist/{chunk-HQLAISFX.js → chunk-G4CTTSAR.js} +4 -4
- package/dist/{chunk-I534M65N.js → chunk-HIRMYFOF.js} +2 -2
- package/dist/{chunk-SK5DL6JX.js → chunk-JKHXDQEI.js} +14 -14
- package/dist/{chunk-GWDVD3VQ.js → chunk-JQRIAZDP.js} +23 -23
- package/dist/{chunk-IHZL3GJU.js → chunk-KONXUO5I.js} +1 -1
- package/dist/{chunk-Q5O5UMJY.js → chunk-M4MCXII7.js} +1 -1
- package/dist/{chunk-UUYPUKP7.js → chunk-M4TRVJTO.js} +1 -1
- package/dist/chunk-MSGBGLGI.js +29 -0
- package/dist/{chunk-CXJQ42XT.js → chunk-N7JTY3LU.js} +15 -15
- package/dist/{chunk-VR6TR575.js → chunk-NODT4F2C.js} +3 -3
- package/dist/{chunk-R5VRLW5Z.js → chunk-OXTM3XZI.js} +1 -1
- package/dist/chunk-PT4Z3KIA.js +12 -0
- package/dist/chunk-QRCDQPJA.js +1 -0
- package/dist/{chunk-7PGHRG6J.js → chunk-QUVE5JZZ.js} +11 -11
- package/dist/{chunk-YX2IMURA.js → chunk-R2TPTM4O.js} +8 -8
- package/dist/{chunk-5K76RQML.js → chunk-RBKIYZ7H.js} +1 -1
- package/dist/{chunk-GJ37JCC2.js → chunk-RUHUTZN4.js} +1 -1
- package/dist/chunk-TCYS67ND.js +1016 -0
- package/dist/file-intake/index.js +1 -1
- package/dist/i18n/index.d.ts +1 -1
- package/dist/icons/efficient-looks.js +4 -4
- package/dist/icons/efficient.d.ts +2 -2
- package/dist/icons/efficient.js +3 -3
- package/dist/icons/index.js +1 -1
- package/dist/{index-D5bms_uA.d.ts → index-BkBsXpfV.d.ts} +285 -88
- package/dist/index.d.ts +3 -3
- package/dist/index.js +635 -639
- package/dist/locales/zh-Hans.d.ts +1 -1
- package/dist/locales/zh-Hans.js +1 -1
- package/dist/map/index.js +8 -8
- package/dist/markdown/index.js +1 -1
- package/dist/page-tabs/index.js +5 -5
- package/dist/pdf/index.js +1 -1
- package/dist/{strings-fYzxZPn4.d.ts → strings-BQtq9300.d.ts} +17 -2
- package/dist/telemetry/index.js +1 -1
- package/dist/ui/index.d.ts +2 -2
- package/dist/ui/index.js +1 -1
- package/dist/ui.css +48 -54
- package/package.json +1 -1
- package/dist/Browser-USPZWDYH.js +0 -43
- package/dist/Calculator-FP5HUWCW.js +0 -29
- package/dist/ConfirmDialog-3TIHKJRT.js +0 -1
- package/dist/CurrencyConverter-XD5LYOCD.js +0 -21
- package/dist/Files-BVUVRNC5.js +0 -87
- package/dist/Notepad-WJI5ODGS.js +0 -25
- package/dist/PdfViewer-226I3LSD.js +0 -1
- package/dist/PomodoroTimer-GEMQHIPJ.js +0 -91
- package/dist/Preview-HNSEYNZL.js +0 -182
- package/dist/Sidebar-PVHZPNIY.js +0 -44
- package/dist/Spreadsheet-6Z5ACGTT.js +0 -37
- package/dist/Stock-X3LIU4ZX.js +0 -16
- package/dist/WorldClock-BAH7QFRG.js +0 -32
- package/dist/chunk-5MDQNFOG.js +0 -9
- package/dist/chunk-DBXZS7OA.js +0 -29
- package/dist/chunk-K6DKX55N.js +0 -1
- package/dist/chunk-PFKMIPZH.js +0 -1028
- package/dist/chunk-S3LGKIZ3.js +0 -12
- package/dist/chunk-SBF5A6XV.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var r="aria-disabled:cursor-not-allowed aria-disabled:opacity-60",o="inline-flex items-center justify-center rounded-(--radius-control) font-medium transition-colors rosh-focus-ring focus-visible:ring-2 disabled:cursor-not-allowed disabled:opacity-60 "+r,e={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)]","secondary-danger":"border border-red-300 bg-white text-red-600 shadow-sm hover:bg-red-50 focus-visible:ring-[color:var(--rosh-focus-ring-invalid)]",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)]",warning:"bg-amber-700 text-white shadow-sm hover:bg-amber-800 focus-visible:ring-[color:var(--rosh-focus-ring-strong)]",link:"text-blue-600 underline-offset-4 hover:underline focus-visible:ring-[color:var(--rosh-focus-ring)]"},s={sm:"gap-1 h-6 px-2 text-xs",md:"gap-2 h-8 px-3 text-sm",lg:"gap-2 h-10 px-4 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"},t="inline-flex items-center font-medium transition-colors rosh-focus-ring focus-visible:ring-2 disabled:cursor-not-allowed disabled:opacity-60 "+r,i={sm:"gap-1 text-xs",md:"gap-2 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"},a={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"},l="bg-blue-50 text-blue-700 hover:bg-blue-100 focus-visible:ring-[color:var(--rosh-focus-ring)]";function g({variant:r="primary",size:a="md",block:g=!1,pressed:n=!1,className:c=""}={}){const h="link"===r;return[h?t:o,n&&"secondary"===r?"border border-blue-200 bg-blue-50 text-blue-700 shadow-sm hover:bg-blue-100 focus-visible:ring-[color:var(--rosh-focus-ring)]":n&&"ghost"===r?l:e[r],h?i[a]:s[a],g?"w-full":"",c].filter(Boolean).join(" ")}function n({variant:r="ghost",size:s="md",pressed:t=!1,className:i=""}={}){return[o,!t||"ghost"!==r&&"secondary"!==r?e[r]:l,a[s],"shrink-0 p-0",i].filter(Boolean).join(" ")}export{g as buttonClasses,n as iconButtonClasses};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{requestFilesTrashView as n}from"./chunk-
|
|
1
|
+
import{requestFilesTrashView as n}from"./chunk-NODT4F2C.js";var o=null;function r(n){o=n}function t(){return o}function u(){n()}export{t as getFilesDemoTree,u as openFilesInTrashMode,r as setFilesDemoTree};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import{Tooltip as e}from"./chunk-
|
|
2
|
-
return s(e,{content:x??k.hint,side:
|
|
1
|
+
import{Tooltip as e}from"./chunk-PT4Z3KIA.js";import{useBrowserLayoutEffect as r,useBrowserState as t}from"./chunk-D65T4H6J.js";import{useShellStrings as o}from"./chunk-QRCDQPJA.js";import{useRef as n,useEffect as i,useCallback as l}from"react";import{jsx as s,jsxs as a,Fragment as c}from"react/jsx-runtime";var u=(e,r,t)=>Math.min(t,Math.max(r,e));function d(e,r,t,o,n){return Math.round(u("left"===t||"top"===t?e+r:e-r,o,n))}function h(e,r,t){let o=null;try{o=window.localStorage.getItem(e)}catch{return null}const n=o?parseInt(o,10):NaN;return Number.isNaN(n)?null:u(n,r,t)}function f({width:t,onResize:a,orientation:c="vertical",side:f,min:m,max:v,defaultWidth:g=m,step:b=16,storageKey:p,label:w,hint:x,controls:y,className:z=""}){const N="horizontal"===c,k=o().resizeHandle,P=n(null),$=n({onResize:a,min:m,max:v,side:f});$.current={onResize:a,min:m,max:v,side:f},r(()=>{if(!p)return;const e=h(p,m,v);null!==e&&e!==t&&a(e)},[p]),i(()=>{if(!p)return;const e=window.setTimeout(()=>{try{window.localStorage.setItem(p,String(Math.round(t)))}catch{}},200);return()=>window.clearTimeout(e)},[t,p]);const C=l(()=>{P.current=null,document.body.style.removeProperty("cursor"),document.body.style.removeProperty("user-select")},[]);i(()=>C,[C]);const M=e=>{P.current&&(e.currentTarget.hasPointerCapture?.(P.current.pointer)&&e.currentTarget.releasePointerCapture(P.current.pointer),C())},D="left"===f?"right-0":"right"===f?"left-0":"top"===f?"bottom-0":"top-0",T="left"===f?"right":"right"===f?"left":"top"===f?"bottom":"top",I=N?`absolute inset-x-0 ${D} z-10 flex h-2`:`absolute inset-y-0 ${D} z-10 flex w-2`;/* @__PURE__ */
|
|
2
|
+
return s(e,{content:x??k.hint,side:T,delay:600,className:`${I} ${z}`.trim(),children:/* @__PURE__ */s("div",{role:"separator",tabIndex:0,"aria-orientation":c,"aria-label":w??k.label,"aria-valuenow":Math.round(t),"aria-valuemin":m,"aria-valuemax":v,"aria-controls":y,"data-resize-handle":f,onPointerDown:e=>{0===e.button&&(e.preventDefault(),P.current={x:N?e.clientY:e.clientX,width:t,moved:!1,pointer:e.pointerId},e.currentTarget.setPointerCapture?.(e.pointerId),document.body.style.cursor=N?"row-resize":"col-resize",document.body.style.userSelect="none")},onPointerMove:e=>{const r=P.current;if(!r)return;if(0===e.buttons)return void C();const t=(N?e.clientY:e.clientX)-r.x;if(!r.moved){if(Math.abs(t)<3)return;r.moved=!0}const{onResize:o,min:n,max:i,side:l}=$.current;o(d(r.width,t,l,n,i))},onPointerUp:M,onPointerCancel:M,onLostPointerCapture:()=>{P.current&&C()},onDoubleClick:()=>a(u(g,m,v)),onKeyDown:e=>{const r=N?"ArrowDown":"ArrowRight",o=N?"ArrowUp":"ArrowLeft",n=e.key===r?b:e.key===o?-b:null,i=null!==n?d(t,n,f,m,v):"Home"===e.key?m:"End"===e.key?v:"Enter"===e.key?u(g,m,v):null;null!==i&&(e.preventDefault(),i!==t&&a(i))},className:N?"group/resize relative h-full w-full cursor-row-resize touch-none rosh-focus-ring focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-[color:var(--rosh-focus-ring-solid)]":"group/resize relative h-full w-full cursor-col-resize touch-none rosh-focus-ring focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-[color:var(--rosh-focus-ring-solid)]",children:/* @__PURE__ */s("div",{"aria-hidden":"true",className:N?`absolute inset-x-0 ${D} h-px bg-transparent transition-colors group-hover/resize:bg-[var(--accent-500,var(--rosh-resize-handle))] group-focus-visible/resize:h-0.5 group-focus-visible/resize:bg-[var(--accent-500,var(--rosh-resize-handle))]`:`absolute inset-y-0 ${D} w-px bg-transparent transition-colors group-hover/resize:bg-[var(--accent-500,var(--rosh-resize-handle))] group-focus-visible/resize:w-0.5 group-focus-visible/resize:bg-[var(--accent-500,var(--rosh-resize-handle))]`})})})}var m=(e,r,t)=>Math.min(Math.max(e,r),t);function v({sidebar:e,sidebarTop:r,sidebarBottom:n,children:i,side:l="left",storageKey:u,defaultWidth:d=256,minWidth:v=180,maxWidth:g=480,className:b="",sidebarClassName:p=("right"===l?"border-l border-gray-200 bg-gray-50":"border-r border-gray-200 bg-gray-50"),contentClassName:w="bg-white"}){const x="right"===l,y=o().sidebar,[z,N]=t(()=>(u?h(u,v,g):null)??m(d,v,g),m(d,v,g)),k=null!=r||null!=n,P=/* @__PURE__ */a("div",{className:"relative flex h-full shrink-0 flex-col",style:{width:z},children:[
|
|
3
3
|
/* @__PURE__ */a("div",{className:`flex h-full flex-col ${k?"overflow-hidden":"overflow-y-auto"} ${p}`,children:[null!=r&&/* @__PURE__ */s("div",{className:"flex shrink-0 flex-col gap-2 px-2 pt-3 pb-2",children:r}),k?/* @__PURE__ */s("div",{className:"min-h-0 flex-1 overflow-y-auto",children:e}):e,null!=n&&/* @__PURE__ */s("div",{className:"mt-auto flex shrink-0 flex-col gap-2 border-t border-gray-200 px-2 py-3",children:n})]}),
|
|
4
4
|
/* @__PURE__ */s(f,{side:l,width:z,onResize:N,min:v,max:g,defaultWidth:m(d,v,g),storageKey:u,hint:y.resize})]}),$=/* @__PURE__ */s("div",{className:`flex min-w-0 flex-1 flex-col ${w}`,children:i});/* @__PURE__ */
|
|
5
5
|
return s("div",{className:`flex h-full w-full overflow-hidden ${b}`,children:/* @__PURE__ */a(c,x?{children:[$,P]}:{children:[P,$]})})}export{f as ResizeHandle,v as SidebarLayout};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import{glassStyle as e,GLASS_DIVIDER as t}from"./chunk-7IQ3B77H.js";import{onOverlayOpen as n,registerModalEscapeInterceptor as r,Z_LAYERS as o}from"./chunk-FIEA5CGB.js";import{useHydrated as i,useBrowserLayoutEffect as a}from"./chunk-D65T4H6J.js";import{Icon as l}from"./chunk-
|
|
2
|
-
return w("span","checkbox"===e?{"aria-hidden":!0,"data-menu-check":"",className:"inline-flex h-4 w-4 shrink-0 items-center justify-center rounded border "+(t?"border-blue-600 bg-blue-600 text-white":"border-gray-400"),children:t&&
|
|
3
|
-
return x("button",{ref:d,id:u,role:"radio"===f?"menuitemradio":"checkbox"===f?"menuitemcheckbox":i??(m?"menuitem":void 0),"aria-checked":f?a:void 0,tabIndex:l,onClick:()=>{e?.(),p&&p.depth>0&&"checkbox"!==f&&p.closeTree()},onMouseEnter:()=>{p?.scheduleClose(p.depth),c?.()},disabled:o,className:h.className,style:h.style,children:[f&&/* @__PURE__ */w(
|
|
1
|
+
import{glassStyle as e,GLASS_DIVIDER as t}from"./chunk-7IQ3B77H.js";import{onOverlayOpen as n,registerModalEscapeInterceptor as r,Z_LAYERS as o}from"./chunk-FIEA5CGB.js";import{useHydrated as i,useBrowserLayoutEffect as a}from"./chunk-D65T4H6J.js";import{Icon as l}from"./chunk-CJHT4VTF.js";import{createContext as u,forwardRef as c,useContext as s,useRef as d,useId as p,useState as m,useEffect as h,useMemo as f,useCallback as g}from"react";import{createPortal as y}from"react-dom";import{jsxs as x,jsx as w,Fragment as b}from"react/jsx-runtime";var v=/* @__PURE__ */new Set(["text","search","url","tel","email","password","number","date","datetime-local","month","week","time"]),k="data-native-context-menu";function C(e,t){return e&&"function"==typeof e.closest?e.closest(t):null}function N(e){const t=e;if(!t||"function"!=typeof t.closest)return!1;if(C(t,`[${k}]`))return!0;if(C(t,"textarea"))return!0;if(C(t,"img, picture, canvas, video, audio"))return!0;const n=C(t,"input");if(n){const e=(n.type||"text").toLowerCase();if(v.has(e))return!0}const r=C(t,"[contenteditable]");if(r){const e=(r.getAttribute("contenteditable")||"").toLowerCase();if(""===e||"true"===e||"plaintext-only"===e)return!0}return!1}var T=/* @__PURE__ */new Set(["http:","https:","mailto:","tel:","blob:"]);function E(e,t,n){const r=C(e,"a[href]"),o=(t||"").trim(),i=function(e,t){if(e&&"#"!==e)try{const n=new URL(e,t??("undefined"!=typeof document?document.baseURI:void 0));return T.has(n.protocol)?n.href:void 0}catch{return}}(r?.getAttribute("href"),n);return{kind:o?"selection":i?"link":"default",...o?{selectionText:o}:{},...i?{linkUrl:i}:{}}}function L(e){if(e.defaultPrevented)return!0;if(e.shiftKey)return!0;if("touch"===e.pointerType)return!0;return N(("function"==typeof e.composedPath?e.composedPath()[0]:void 0)??e.target)}function B(e,t,n){return e.length===t+1&&e[t].key===n.key?e:[...e.slice(0,t),n]}function M(e,t){const n=Math.max(0,t);return e.length>n?e.slice(0,n):e}function $(e,t,n){if(0===t.length||0===e.length)return[];const r=[e];for(let e=1;e<t.length;e++){const o=r[e-1].find(n=>n.to===t[e].key),i=o?n(o):[];if(0===i.length)break;r.push(i)}return r}function A(e,t,n,r){const o=Math.max(0,r-n),i=Math.min(t,o),a=e-i/2;return a<n?n:a+i>r?Math.max(n,r-i):a}function W(e,t,n,r,o,i=!1,a=8){const l=t+o,u=e-o-n,c=u>=a;return i&&c?{left:u,flipped:!0}:l+n<=r-a?{left:l,flipped:!1}:c?{left:u,flipped:!0}:i?{left:a,flipped:!0}:{left:Math.max(a,r-a-n),flipped:!1}}function H(){try{return getComputedStyle(document.documentElement).getPropertyValue("--menu-density")?.trim()||"normal"}catch{return"normal"}}var R=u(null),P=u(!1);function D({children:t,style:a,className:l="",onClose:u,minWidth:c=180,portal:s=!1}){const g=d(null),x=p(),[b,v]=m([]),k=d();h(()=>()=>clearTimeout(k.current),[]);const C=i(),T=f(()=>{const e=()=>clearTimeout(k.current);return{id:x,depth:0,path:b,open:(t,n)=>{e(),v(e=>B(e,t,n))},scheduleClose:t=>{e(),k.current=setTimeout(()=>v(e=>M(e,t)),200)},closeBelow:t=>{e(),v(e=>M(e,t))},cancelClose:e,closeTree:()=>{e(),v([]),u?.()},root:g}},[x,b,u]);h(()=>{if(!u)return;const e=e=>{e.target.closest("[data-menu-toggle]")||e.target.closest?.(`[data-popup-menu-tree="${x}"]`)||g.current&&!g.current.contains(e.target)&&u()},t=e=>{"Escape"===e.key&&u()};window.addEventListener("pointerdown",e),window.addEventListener("keydown",t);const o=n(u),i=r(()=>!1,()=>g.current);return()=>{window.removeEventListener("pointerdown",e),window.removeEventListener("keydown",t),o(),i()}},[u,x]),h(()=>{const e=g.current;e&&requestAnimationFrame(()=>{const t=e.getBoundingClientRect();if(t.right>window.innerWidth-8){const n=t.right-window.innerWidth+8;e.style.left?e.style.left=parseFloat(e.style.left)-n+"px":e.style.right||(e.style.left=t.left-n+"px")}if(t.left<8&&(e.style.left?e.style.left="8px":e.style.right&&(e.style.right=window.innerWidth-t.width-8+"px")),t.bottom>window.innerHeight-8){const n=t.bottom-window.innerHeight+8;e.style.top?e.style.top=parseFloat(e.style.top)-n+"px":e.style.bottom?e.style.bottom="8px":e.style.top=t.top-n+"px"}t.top<8&&(e.style.top?e.style.top="8px":e.style.bottom&&(e.style.bottom=window.innerHeight-t.height-8+"px"))})});const E=H(),L=/(^|[\s:])!?z-/.test(l),$=/* @__PURE__ */w("div",{ref:g,"data-popup-menu-tree":x,className:`fixed rounded-(--radius-popup) ${"tight"===E?"py-1":"large"===E?"py-2":"py-1"} ${l}`,onContextMenu:e=>{N(e.target)||e.preventDefault()},style:{...L?{}:{zIndex:o.menu},minWidth:c,animation:"popup-in 0.12s ease-out",...e(),...a},children:/* @__PURE__ */w(R.Provider,{value:T,children:t})});return s?C?y($,document.body):null:$}function F(e,t,n,r=!1){const o=H(),i="tight"===o?"0.25rem":"large"===o?"0.6rem":0;return{className:`w-full flex items-center gap-2 text-left transition-colors rounded-lg mx-auto\n ${e?"text-red-600 hover:bg-red-50":r?"bg-blue-50 text-blue-700":"text-gray-700 hover:bg-blue-50 hover:text-blue-700"}\n ${t?"opacity-40 cursor-not-allowed":""}\n ${n}`,style:{width:"calc(100% - 8px)",marginLeft:4,marginRight:4,fontSize:"var(--menu-font-size, 14px)",paddingLeft:"var(--menu-padding-x, 1rem)",paddingRight:"var(--menu-padding-x, 1rem)",paddingTop:i,paddingBottom:i,..."normal"===o?{minHeight:"calc(var(--row-height-menu, 2.25rem) + 2 * (var(--menu-padding-y, 0.5rem) - 0.5rem))"}:{}}}}var I=/* @__PURE__ */w(l,{name:"check","aria-hidden":!0,className:"h-4 w-4",strokeWidth:2});function j({kind:e,checked:t}){/* @__PURE__ */
|
|
2
|
+
return w("span","checkbox"===e?{"aria-hidden":!0,"data-menu-check":"",className:"inline-flex h-4 w-4 shrink-0 items-center justify-center rounded border "+(t?"border-blue-600 bg-blue-600 text-white":"border-gray-400"),children:t&&I}:{"aria-hidden":!0,"data-menu-check":"",className:"inline-flex h-4 w-4 shrink-0 items-center justify-center",children:t&&I})}var S=c(function({onClick:e,children:t,className:n="",danger:r,disabled:o,role:i,checked:a,tabIndex:l,id:u,onMouseEnter:c},d){const p=s(R),m=s(P),h=F(r,o,n),f=void 0===a?null:"menuitemradio"===i?"radio":"checkbox";/* @__PURE__ */
|
|
3
|
+
return x("button",{ref:d,id:u,role:"radio"===f?"menuitemradio":"checkbox"===f?"menuitemcheckbox":i??(m?"menuitem":void 0),"aria-checked":f?a:void 0,tabIndex:l,onClick:()=>{e?.(),p&&p.depth>0&&"checkbox"!==f&&p.closeTree()},onMouseEnter:()=>{p?.scheduleClose(p.depth),c?.()},disabled:o,className:h.className,style:h.style,children:[f&&/* @__PURE__ */w(j,{kind:f,checked:!!a}),t]})}),z=/* @__PURE__ */w(l,{name:"chevron-right","aria-hidden":!0,className:"h-3.5 w-3.5 shrink-0 ml-auto text-gray-500",strokeWidth:2});function q(e){let t=o.menu;for(let n=e;n&&n!==document.body;n=n.parentElement){const e=parseInt(getComputedStyle(n).zIndex,10);Number.isNaN(e)||(t=e)}return t}function U(e){return e?[...e.querySelectorAll("button:not([disabled])")].filter(t=>t.closest("[data-popup-submenu-panel]")===e):[]}function K({label:t,icon:n,children:o,disabled:i,className:l="",minWidth:u=180,maxHeight:c}){const m=s(R),v=p(),k=d(null),C=d(null),T=d(),E=d(!1),L=`${v}-menu`;h(()=>()=>clearTimeout(T.current),[]);const B=m?.depth??0,M=m?.path[B],$=!!M&&M.key===v&&!i,P=g(e=>{if(!m||i||!k.current)return;clearTimeout(T.current),E.current=e;const t=k.current.getBoundingClientRect(),n=k.current.closest("[data-popup-submenu-panel]")??k.current.closest("[data-popup-menu-tree]"),r=n?.getBoundingClientRect()??t,o=B>0&&(m.path[B-1]?.flipped??!1),a=W(r.left,r.right,u,window.innerWidth,4,o);m.open(B,{key:v,y:t.top,...a})},[m,i,B,v,u]),D=e=>{m?.closeBelow(B),k.current?.focus()};h(()=>{if($)return r(e=>"Escape"===e.key&&(!(m&&m.path.length>B+1)&&(D(),!0)),()=>C.current)}),a(()=>{if(!$||!M)return;const e=()=>{const e=C.current;if(!e||!k.current)return;const t=k.current.closest("[data-popup-submenu-panel]")??k.current.closest("[data-popup-menu-tree]"),n=t?.getBoundingClientRect()??k.current.getBoundingClientRect(),r=B>0&&(m?.path[B-1]?.flipped??!1),o=e.offsetWidth||u,i=W(n.left,n.right,o,window.innerWidth,4,r,8),a=e.offsetHeight,l=A(k.current.getBoundingClientRect().top+a/2,a,8,window.innerHeight-8);e.style.left=`${i.left}px`,e.style.top=`${l}px`,e.dataset.flipped=String(i.flipped)};e();let t=0;const n=requestAnimationFrame(()=>{t=requestAnimationFrame(e)});return()=>{cancelAnimationFrame(n),cancelAnimationFrame(t)}}),h(()=>{$&&E.current&&(E.current=!1,U(C.current)[0]?.focus())},[$]);const I=f(()=>m&&{...m,depth:B+1},[m,B]);if(!m)throw new Error("PopupSubmenu must be rendered inside a PopupMenu");const j=F(!1,i,l,$),S=H();/* @__PURE__ */
|
|
4
4
|
return x(b,{children:[
|
|
5
|
-
/* @__PURE__ */x("button",{ref:k,type:"button",role:"menuitem","aria-haspopup":"menu","aria-expanded":$,"aria-controls":$?L:void 0,disabled:i,"data-popup-submenu-row":!0,className:
|
|
5
|
+
/* @__PURE__ */x("button",{ref:k,type:"button",role:"menuitem","aria-haspopup":"menu","aria-expanded":$,"aria-controls":$?L:void 0,disabled:i,"data-popup-submenu-row":!0,className:j.className,style:j.style,onClick:e=>{const t=0===e.detail;$?t&&U(C.current)[0]?.focus():P(t)},onKeyDown:e=>{"ArrowRight"===e.key&&(e.preventDefault(),e.stopPropagation(),P(!0))},onMouseEnter:()=>{i||(m.cancelClose(),$?m.closeBelow(B+1):(clearTimeout(T.current),T.current=setTimeout(()=>P(!1),120)))},onMouseLeave:()=>{clearTimeout(T.current),m.scheduleClose(B)},children:[n,
|
|
6
6
|
/* @__PURE__ */w("span",{className:"min-w-0 flex-1 truncate",children:t}),z]}),$&&y(
|
|
7
|
-
/* @__PURE__ */w("div",{ref:C,id:L,role:"menu","data-popup-menu-tree":m.id,"data-popup-submenu-panel":!0,className:"fixed rounded-(--radius-popup) overflow-x-hidden overflow-y-auto overscroll-contain "+("tight"===
|
|
8
|
-
return w("div",{className:`border-t ${t} ${"tight"===e?"my-0.5":"large"===e?"my-1.5":"my-1"} mx-3`})}function
|
|
9
|
-
return w("div",{className:"text-xs font-medium uppercase tracking-wide",style:{color:"var(--ink-muted)",paddingLeft:"var(--menu-padding-x, 1rem)",paddingRight:"var(--menu-padding-x, 1rem)",paddingTop:n,paddingBottom:n},children:e})}function
|
|
10
|
-
return w("svg",{className:t,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:/* @__PURE__ */w("path",{strokeLinecap:"round",strokeLinejoin:"round",d:e})})}export{
|
|
7
|
+
/* @__PURE__ */w("div",{ref:C,id:L,role:"menu","data-popup-menu-tree":m.id,"data-popup-submenu-panel":!0,className:"fixed rounded-(--radius-popup) overflow-x-hidden overflow-y-auto overscroll-contain "+("tight"===S?"py-1":"large"===S?"py-2":"py-1"),style:{left:M.left,top:M.y,minWidth:u,maxHeight:void 0===c?"calc(100vh - 16px)":`min(${"number"==typeof c?`${c}px`:c}, calc(100vh - 16px))`,zIndex:q(m.root.current)+B+1,animation:(M.flipped?"popup-submenu-in-left":"popup-submenu-in")+" 0.1s ease-out",...e()},onKeyDown:e=>{if(e.target.closest("[data-popup-submenu-panel]")!==e.currentTarget)return;const t=U(C.current),n=t.indexOf(document.activeElement),r=n=>{e.preventDefault(),e.stopPropagation(),t[(n+t.length)%t.length]?.focus()};"ArrowDown"===e.key?r(n+1):"ArrowUp"===e.key?r(n<0?t.length-1:n-1):"Home"===e.key?r(0):"End"===e.key?r(t.length-1):"ArrowLeft"===e.key&&(e.preventDefault(),e.stopPropagation(),D())},onMouseEnter:()=>{m.cancelClose(),clearTimeout(T.current)},onMouseLeave:()=>m.scheduleClose(B+1),onContextMenu:e=>{N(e.target)||e.preventDefault()},children:/* @__PURE__ */w(R.Provider,{value:I,children:o})}),document.body)]})}function J(){const e=H();/* @__PURE__ */
|
|
8
|
+
return w("div",{className:`border-t ${t} ${"tight"===e?"my-0.5":"large"===e?"my-1.5":"my-1"} mx-3`})}function V({children:e}){const t=H(),n="tight"===t?"0.125rem":"large"===t?"0.375rem":"0.25rem";/* @__PURE__ */
|
|
9
|
+
return w("div",{className:"text-xs font-medium uppercase tracking-wide",style:{color:"var(--ink-muted)",paddingLeft:"var(--menu-padding-x, 1rem)",paddingRight:"var(--menu-padding-x, 1rem)",paddingTop:n,paddingBottom:n},children:e})}function G({d:e,className:t="h-4 w-4 text-gray-400"}){/* @__PURE__ */
|
|
10
|
+
return w("svg",{className:t,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:/* @__PURE__ */w("path",{strokeLinecap:"round",strokeLinejoin:"round",d:e})})}export{j as MenuCheckMark,G as MenuIcon,P as MenuSemanticsContext,k as NATIVE_MENU_ATTR,D as PopupMenu,J as PopupMenuDivider,S as PopupMenuItem,V as PopupMenuLabel,K as PopupSubmenu,A as clampMenuTop,M as closeMenuBelow,E as describeContextTarget,F as itemLook,N as keepsNativeMenu,L as leavesContextMenuAlone,W as menuPanelLeft,B as openMenuLevel,$ as resolveMenuLevels};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{Modal as e}from"./chunk-
|
|
1
|
+
import{Modal as e}from"./chunk-6SCHK75C.js";import{keepsNativeMenu as a}from"./chunk-4JGNJYVL.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"}),
|