efficient-shell 7.70.0 → 7.71.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/dist/{Browser-XDIOSJS4.js → Browser-NFUPN5EC.js} +14 -14
- package/dist/Calculator-GQGK6DO3.js +29 -0
- package/dist/ConfirmDialog-YVFPLUQH.js +1 -0
- package/dist/{CurrencyConverter-YEG2OFM7.js → CurrencyConverter-UPCIPOFS.js} +8 -8
- package/dist/{Documents-MRYWQZ6F.js → Documents-JNWP623S.js} +29 -29
- package/dist/Files-ZHLMQ5IK.js +87 -0
- package/dist/{Notepad-PWMJWNUE.js → Notepad-37KKX6KP.js} +15 -15
- package/dist/PdfViewer-YELEO346.js +1 -0
- package/dist/{PomodoroTimer-7PWB2HLD.js → PomodoroTimer-JPWZ4DDT.js} +8 -8
- package/dist/{Preview-XMWD3UNB.js → Preview-GESXUZK2.js} +53 -53
- package/dist/Sidebar-FS2PX6DU.js +43 -0
- package/dist/{Spreadsheet-M2KRJ7BF.js → Spreadsheet-IFQINTC4.js} +13 -13
- package/dist/{Stock-EO7DOEEF.js → Stock-FRUP3BIN.js} +3 -3
- package/dist/{Weather-Y6E3HASC.js → Weather-MQOSCQQR.js} +16 -16
- package/dist/{WorldClock-HXGPRRQZ.js → WorldClock-7GQYAE4T.js} +6 -6
- package/dist/ai/index.js +18 -18
- package/dist/apps/index.js +1 -1
- package/dist/bin/ui-check.js +1 -1
- package/dist/{chunk-RDLWLATO.js → chunk-3E27HV76.js} +2 -2
- package/dist/{chunk-BIR6UUSP.js → chunk-3NYPZO4K.js} +4 -4
- package/dist/{chunk-YSJA274H.js → chunk-5G76CZPP.js} +2 -2
- package/dist/{chunk-I7OLF2FL.js → chunk-5MCD5KGU.js} +8 -8
- package/dist/chunk-7FA25555.js +466 -0
- package/dist/{chunk-JVSFX53V.js → chunk-A5UR5LGU.js} +7 -7
- package/dist/chunk-BUIZD247.js +1 -0
- package/dist/chunk-F6FTF37T.js +46 -0
- package/dist/chunk-G5GERM76.js +2 -0
- package/dist/{chunk-4EOL3HTG.js → chunk-IF3ZX46R.js} +13 -13
- package/dist/{chunk-XMSL2GJP.js → chunk-L5X6V677.js} +1 -1
- package/dist/{chunk-XA4APY3B.js → chunk-MY4HINJT.js} +1 -1
- package/dist/{chunk-2WZP2RMC.js → chunk-MYUJDXQC.js} +1 -1
- package/dist/{chunk-Q2A75VYD.js → chunk-NUTXXB74.js} +3 -3
- package/dist/{chunk-PZ53QKHH.js → chunk-OKFO3XYS.js} +3 -3
- package/dist/{chunk-EU4BCXGA.js → chunk-RWNNFCSA.js} +1 -1
- package/dist/{chunk-4ZBKHQVW.js → chunk-RZHHSQDO.js} +13 -13
- package/dist/{chunk-WS3P7QXT.js → chunk-SBA7JZ72.js} +65 -65
- package/dist/{chunk-CCCVRRC7.js → chunk-U5Q7QGW6.js} +1 -1
- package/dist/{chunk-6MZFPE5S.js → chunk-U6GNXBIR.js} +485 -485
- package/dist/{chunk-44BJ3XGZ.js → chunk-USHLHGAH.js} +8 -8
- package/dist/chunk-UULKUZAG.js +1 -0
- package/dist/{chunk-6I4ZV67D.js → chunk-VB2Q65XD.js} +2 -2
- package/dist/{chunk-YJIG2KT3.js → chunk-YIC644QO.js} +3 -3
- package/dist/icons/efficient-glyphs.d.ts +486 -0
- package/dist/icons/efficient-glyphs.js +1 -0
- package/dist/icons/efficient-meanings.d.ts +425 -0
- package/dist/icons/efficient-meanings.js +1 -0
- package/dist/icons/efficient.d.ts +5 -897
- package/dist/icons/efficient.js +1 -466
- package/dist/index.js +559 -559
- package/dist/map/index.d.ts +9 -3
- package/dist/map/index.js +13 -13
- package/dist/map-site.css +4 -3
- package/dist/page-tabs/index.js +5 -5
- package/dist/pdf/index.js +1 -1
- package/dist/telemetry/index.js +1 -1
- package/dist/ui/index.js +1 -1
- package/package.json +11 -1
- package/dist/Calculator-TTFPAPP7.js +0 -29
- package/dist/ConfirmDialog-JP35CDMP.js +0 -1
- package/dist/Files-MJPDM7I3.js +0 -87
- package/dist/PdfViewer-LALOZLBP.js +0 -1
- package/dist/Sidebar-NWSMRAIE.js +0 -43
- package/dist/chunk-7AQUUDJL.js +0 -1
- package/dist/chunk-AA5RO6ER.js +0 -47
- package/dist/chunk-DELNCIUK.js +0 -2
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import{readStoredWidth as e,ResizeHandle as l}from"./chunk-
|
|
2
|
-
/* @__PURE__ */f("div",{className:`flex h-full flex-col ${
|
|
3
|
-
/* @__PURE__ */p(l,{side:m,width:P,onResize:
|
|
4
|
-
return f("div",
|
|
5
|
-
/* @__PURE__ */p(y,{phone:
|
|
6
|
-
/* @__PURE__ */p(k,{phone:
|
|
1
|
+
import{readStoredWidth as e,ResizeHandle as l}from"./chunk-VB2Q65XD.js";import{useIsPhone as r}from"./chunk-RZHHSQDO.js";import{useBrowserState as t}from"./chunk-D65T4H6J.js";import{Icon as a}from"./chunk-76DRQSJM.js";import{useShellStrings as n}from"./chunk-2EJRVQ3Y.js";import{createContext as o,useContext as i,useState as s,useRef as c,useReducer as d,useMemo as u,Fragment as h,useEffect as m}from"react";import{jsxs as f,jsx as p}from"react/jsx-runtime";var b=o(null),x=o(!1);function g(){return i(b)}function v(){return i(x)}var N=(e,l,r)=>Math.min(Math.max(e,l),r);function w({sidebar:a,sidebarTop:o,sidebarBottom:i,children:h,side:m="left",storageKey:b,defaultWidth:x=256,minWidth:g=180,maxWidth:v=480,className:w="",sidebarClassName:D=("right"===m?"border-l border-gray-200 bg-gray-50":"border-r border-gray-200 bg-gray-50"),contentClassName:z="bg-white"}){const C="right"===m,O=n().sidebar,j=r(),E=function(){const[e,l]=s(!1),r=c(null),t=c(/* @__PURE__ */new Map),[,a]=d(e=>e+1,0),n=u(()=>({report(e,l,r){const n={label:l,el:r};return t.current.set(e,n),a(),()=>{t.current.get(e)===n&&(t.current.delete(e),a())}}}),[]);return{api:n,open:e,setOpen:l,current:()=>[...t.current.values()].sort((e,l)=>e.el&&l.el&&e.el.compareDocumentPosition(l.el)&Node.DOCUMENT_POSITION_PRECEDING?1:-1).map(e=>e.label()),trigger:r}}(),[P,M]=t(()=>(b?e(b,g,v):null)??N(x,g,v),N(x,g,v)),R=null!=o||null!=i,W=/* @__PURE__ */f("div",{className:"relative flex h-full shrink-0 flex-col",style:{width:P},children:[
|
|
2
|
+
/* @__PURE__ */f("div",{className:`flex h-full flex-col ${R?"overflow-hidden":"overflow-y-auto"} ${D}`,children:[null!=o&&/* @__PURE__ */p("div",{className:"flex shrink-0 flex-col gap-2 px-2 pt-3 pb-2",children:o}),R?/* @__PURE__ */p("div",{className:"min-h-0 flex-1 overflow-y-auto",children:a}):a,null!=i&&/* @__PURE__ */p("div",{className:"mt-auto flex shrink-0 flex-col gap-2 border-t border-gray-200 px-2 py-3",children:i})]}),
|
|
3
|
+
/* @__PURE__ */p(l,{side:m,width:P,onResize:M,min:g,max:v,defaultWidth:N(x,g,v),storageKey:b,hint:O.resize})]}),$=/* @__PURE__ */p("div",{className:`flex min-w-0 flex-1 flex-col ${z}`,children:h});/* @__PURE__ */
|
|
4
|
+
return f("div",j?{className:`relative flex h-full w-full flex-col overflow-hidden ${w}`,children:[
|
|
5
|
+
/* @__PURE__ */p(y,{phone:E,top:o,fallback:O.sections}),$,
|
|
6
|
+
/* @__PURE__ */p(k,{phone:E,bottom:i,label:O.sections,closeLabel:O.closeSections,children:a})]}:{className:`flex h-full w-full overflow-hidden ${w}`,children:[C?null:W,$,C?W:null]})}function y({phone:e,top:l,fallback:r}){const t=e.current();/* @__PURE__ */
|
|
7
7
|
return f("div",{"data-sidebar-section-bar":!0,className:"flex h-11 shrink-0 items-center gap-2 border-b border-gray-200 bg-white px-3",children:[
|
|
8
8
|
/* @__PURE__ */f("button",{ref:e.trigger,type:"button","aria-haspopup":"dialog","aria-expanded":e.open,onClick:()=>e.setOpen(!0),className:"flex h-8 min-w-0 flex-1 items-center gap-1 text-left text-sm font-semibold text-gray-900",children:[
|
|
9
9
|
/* @__PURE__ */p("span",{className:"min-w-0 truncate",children:0===t.length?r:t.map((e,l)=>/* @__PURE__ */f(h,{children:[l>0&&" · ",e]},l))}),
|
|
10
|
-
/* @__PURE__ */p(
|
|
10
|
+
/* @__PURE__ */p(a,{name:"chevron-down",className:"size-4 shrink-0",strokeWidth:2,"aria-hidden":"true"})]}),null!=l&&/* @__PURE__ */p(x.Provider,{value:!0,children:/* @__PURE__ */p("div",{className:"flex min-w-0 max-w-[60%] shrink-0 items-center gap-2",children:l})})]})}function k({phone:e,bottom:l,label:r,closeLabel:t,children:a}){const n=c(null),{open:o,setOpen:i,trigger:s}=e,d=()=>{i(!1),n.current?.contains(document.activeElement)&&s.current?.focus()};return m(()=>{o&&n.current?.focus()},[o]),
|
|
11
11
|
/* @__PURE__ */f(b.Provider,{value:e.api,children:[o&&/* @__PURE__ */p("button",{type:"button","aria-label":t,onClick:d,className:"absolute inset-0 z-(--z-in-box) cursor-default bg-gray-900/40"}),
|
|
12
12
|
/* @__PURE__ */f("div",{ref:n,role:"dialog","aria-modal":"true","aria-label":r,tabIndex:-1,"data-sidebar-section-sheet":!0,onKeyDown:e=>{"Escape"===e.key&&(e.stopPropagation(),d())},onClick:e=>{const l=e.target.closest("button, a");!l||l.hasAttribute("aria-expanded")||l.closest("[data-sheet-keep-open]")||d()},className:(o?"flex":"hidden")+" absolute inset-x-0 bottom-0 z-(--z-in-box) max-h-[75%] flex-col rounded-t-2xl bg-white pt-2 shadow-(--elevation-dialog)",children:[
|
|
13
13
|
/* @__PURE__ */p("div",{className:"mx-auto mb-2 h-1 w-9 shrink-0 rounded-full bg-gray-300","aria-hidden":"true"}),
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var r="7.71.0",a=r;export{a as APP_VERSION,r as VERSION};
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import{inputClasses as e}from"./chunk-CU3GY5Y2.js";import{isSafeLinkHref as t}from"./chunk-PJPK2ADX.js";import{Icon as r}from"./chunk-76DRQSJM.js";import{useShellStrings as n}from"./chunk-2EJRVQ3Y.js";import{SpinnerRing as a}from"./chunk-2J6F4EE7.js";import{forwardRef as s,useCallback as i,useState as l,useId as o,Children as c,isValidElement as d}from"react";import{jsx as m,jsxs as u,Fragment as h}from"react/jsx-runtime";var g=s(function({invalid:t,autoGrow:r,className:n="",onInput:a,rows:s=3,size:l,readOnly:o,...c},d){const u=i(e=>{if(r){const t=e.currentTarget;t.style.height="auto",t.style.height=`${t.scrollHeight}px`}a?.(e)},[r,a]);/* @__PURE__ */
|
|
2
|
+
return m("textarea",{ref:d,"aria-invalid":t||void 0,rows:s,onInput:u,readOnly:o,className:e({invalid:t,size:l,readOnly:o,multiline:!0,className:`${r?"resize-none overflow-hidden":""} ${n}`.trim()}),...c})}),p={info:{box:"bg-blue-50 border-blue-200",icon:"text-blue-600"},success:{box:"bg-green-50 border-green-200",icon:"text-green-600"},warning:{box:"bg-amber-50 border-amber-200",icon:"text-amber-600"},danger:{box:"bg-red-50 border-red-200",icon:"text-red-600"},neutral:{box:"bg-[var(--status-neutral-soft)] border-[color:var(--line)]",icon:"text-[color:var(--status-neutral-soft-ink)]"}},x={info:"bg-blue-700 border-blue-700 text-white",success:"bg-green-700 border-green-700 text-white",warning:"bg-amber-700 border-amber-700 text-white",danger:"bg-red-700 border-red-700 text-white",neutral:"bg-[var(--status-neutral-solid)] border-[color:var(--status-neutral-solid)] text-[color:var(--status-on-solid)]"};function b({tone:e}){const t={className:"h-5 w-5","aria-hidden":!0};switch(e){case"success":/* @__PURE__ */
|
|
3
|
+
return m(r,{name:"check-circle",look:"mini",...t});case"warning":/* @__PURE__ */
|
|
4
|
+
return m(r,{name:"warning",look:"mini",...t});case"danger":/* @__PURE__ */
|
|
5
|
+
return m(r,{name:"close-circle",look:"mini",...t});default:/* @__PURE__ */
|
|
6
|
+
return m(r,{name:"info",look:"mini",...t})}}function f({tone:e="info",emphasis:t="subtle",title:a,children:s,icon:i,action:l,onDismiss:o,sticky:c=!1,className:d=""}){const g=p[e],f="solid"===t,y=n().banner,v=f?x[e]:g.box,N=c?"sticky top-0 z-30":"",k=/* @__PURE__ */u(h,{children:[a&&/* @__PURE__ */m("div",{className:("font-semibold "+(f?"":"text-gray-900")).trim(),children:a}),s&&/* @__PURE__ */m("div",{className:`${f?"":"text-gray-700"} ${a?"mt-0.5":""}`.trim(),children:s})]});/* @__PURE__ */
|
|
7
|
+
return u("div",{role:"danger"===e?"alert":"status",className:`${N} flex items-start gap-3 rounded-lg border px-4 py-3 ${v} ${d}`.trim(),children:[
|
|
8
|
+
/* @__PURE__ */m("span",{className:`mt-0.5 shrink-0 ${f?"":g.icon}`.trim(),children:i??/* @__PURE__ */m(b,{tone:e})}),null==l?/* @__PURE__ */m("div",{className:"min-w-0 flex-1 text-sm",children:k}):
|
|
9
|
+
/* @__PURE__ */u("div",{className:"flex min-w-0 flex-1 flex-wrap items-start gap-x-3 gap-y-2",children:[
|
|
10
|
+
/* @__PURE__ */m("div",{className:"min-w-0 grow basis-48 text-sm",children:k}),
|
|
11
|
+
/* @__PURE__ */m("div",{className:"shrink-0 self-center",children:l})]}),o&&/* @__PURE__ */m("button",{type:"button",onClick:o,"aria-label":y.dismiss,className:"shrink-0 "+(f?"opacity-80 hover:opacity-100":"text-gray-400 hover:text-gray-600"),children:/* @__PURE__ */m(r,{name:"close",className:"h-4 w-4",strokeWidth:"2",strokeLinecap:"round","aria-hidden":"true"})})]})}function y({summary:e,busy:t=!1,open:n,onOpenChange:a,label:s="Steps",className:i="",children:h}){const[g,p]=l(null),x=o(),b=n??g??t;return 1===c.toArray(h).filter(d).length?/* @__PURE__ */m("div",{className:`text-xs text-gray-500 ${i}`.trim(),children:/* @__PURE__ */m("ol",{"aria-label":s,children:h})}):/* @__PURE__ */u("div",{className:`text-xs text-gray-500 ${i}`.trim(),children:[
|
|
12
|
+
/* @__PURE__ */u("button",{type:"button",onClick:()=>{p(!b),a?.(!b)},"aria-expanded":b,"aria-controls":b?x:void 0,className:"flex w-full items-center gap-2 rounded text-left hover:text-gray-700 focus-visible:outline focus-visible:outline-2 focus-visible:outline-blue-600",children:[
|
|
13
|
+
/* @__PURE__ */m(r,{name:"chevron-right",size:12,className:"shrink-0 motion-safe:transition-transform "+(b?"rotate-90":"")}),
|
|
14
|
+
/* @__PURE__ */m("span",{"aria-live":"polite",className:"min-w-0 flex-1 truncate",children:e})]}),b&&/* @__PURE__ */m("ol",{id:x,"aria-label":s,className:"mt-2 ml-2 space-y-2 border-l border-gray-200 pl-3",children:h})]})}var v={pending:"text-gray-400",active:"text-gray-800",complete:"text-gray-600",failed:"text-red-600",stopped:"text-gray-500",waiting:"text-amber-700",skipped:"text-gray-400"},N={pending:"Pending",active:"In progress",complete:"Done",failed:"Failed",stopped:"Stopped",waiting:"Waiting for you",skipped:"Skipped"};function k({status:e}){switch(e){case"active":/* @__PURE__ */
|
|
15
|
+
return m(a,{className:"size-3 motion-reduce:animate-none"});case"complete":/* @__PURE__ */
|
|
16
|
+
return m(r,{name:"check-circle",size:14,tone:"success"});case"failed":/* @__PURE__ */
|
|
17
|
+
return m(r,{name:"close-circle",size:14,tone:"danger"});case"stopped":/* @__PURE__ */
|
|
18
|
+
return m(r,{name:"no-symbol",size:14,tone:"muted"});case"waiting":/* @__PURE__ */
|
|
19
|
+
return m(r,{name:"pause",size:14,tone:"warning"});case"skipped":/* @__PURE__ */
|
|
20
|
+
return m(r,{name:"remove",size:14,tone:"muted"});default:/* @__PURE__ */
|
|
21
|
+
return m("span",{className:"block size-3 rounded-full border border-gray-300"})}}function w({label:e,description:t,status:r="complete",statusWord:n,icon:a,children:s}){/* @__PURE__ */
|
|
22
|
+
return u("li",{className:`flex items-start gap-2 ${v[r]}`,"data-status":r,children:[
|
|
23
|
+
/* @__PURE__ */m("span",{"aria-hidden":"true",className:"mt-1 flex size-3.5 shrink-0 items-center justify-center",children:a??/* @__PURE__ */m(k,{status:r})}),
|
|
24
|
+
/* @__PURE__ */u("div",{className:"min-w-0 flex-1",children:[
|
|
25
|
+
/* @__PURE__ */u("span",{className:"sr-only",children:[n??N[r],": "]}),
|
|
26
|
+
/* @__PURE__ */m("div",{className:"break-words",children:e}),t&&/* @__PURE__ */m("div",{className:"break-words text-gray-500",children:t}),s&&/* @__PURE__ */m("div",{className:"mt-1",children:s})]})]})}var $=/!\[([^\]]*)\]\(([^)]+)\)|\[([^\]]+)\]\(([^)]+)\)|\*\*([^*]+)\*\*|`([^`]+)`|\*([^*]+)\*/g,z=e=>t(e.trim());function j(e){const t=[];let r,n=0,a=0;for($.lastIndex=0;null!==(r=$.exec(e));)r.index>n&&t.push(e.slice(n,r.index)),void 0!==r[1]?t.push(
|
|
27
|
+
/* @__PURE__ */u("span",{className:"text-gray-400",children:["[",r[1],"]"]},a++)):void 0!==r[3]?t.push(
|
|
28
|
+
/* @__PURE__ */m("a",{href:z(r[4])?r[4]:void 0,target:"_blank",rel:"noreferrer",className:"text-blue-600 hover:underline",children:r[3]},a++)):void 0!==r[5]?t.push(
|
|
29
|
+
/* @__PURE__ */m("strong",{className:"font-semibold text-gray-900",children:r[5]},a++)):void 0!==r[6]?t.push(
|
|
30
|
+
/* @__PURE__ */m("code",{className:"rounded bg-gray-200 px-1 py-0.5 font-mono text-[0.85em] text-gray-800",children:r[6]},a++)):void 0!==r[7]&&t.push(/* @__PURE__ */m("em",{children:r[7]},a++)),n=$.lastIndex;return n<e.length&&t.push(e.slice(n)),t}function I({alt:e}){const t=e.replace(/^screenshot:\s*/i,""),a=n().markdown;/* @__PURE__ */
|
|
31
|
+
return u("div",{className:"my-1 flex items-start gap-2 rounded-lg border border-dashed border-gray-300 bg-gray-50 px-3 py-3 text-gray-500",children:[
|
|
32
|
+
/* @__PURE__ */m(r,{name:"camera",look:"mini",className:"mt-0.5 h-4 w-4 shrink-0","aria-hidden":"true"}),
|
|
33
|
+
/* @__PURE__ */u("span",{className:"text-xs",children:[
|
|
34
|
+
/* @__PURE__ */m("span",{className:"font-medium text-gray-600",children:`${a.screenshot} — `}),t]})]})}function C(e,t){const r=[];for(const n of e){const e=t.exec(n);e?r.push(e[1]):r.length&&(r[r.length-1]+=" "+n.trim())}return r}var D=e=>e.replace(/^\s*\|/,"").replace(/\|\s*$/,"").split("|").map(e=>e.trim());function E(e,t){const r=e.split("\n"),n=r[0],a=/^(#{2,4})\s+(.*)$/.exec(n);if(a&&1===r.length){const e=a[1].length;/* @__PURE__ */
|
|
35
|
+
return m(`h${e}`,{className:2===e?"mt-2 text-sm font-semibold uppercase tracking-wide text-gray-500":3===e?"mt-1 text-base font-semibold text-gray-900":"mt-1 text-sm font-semibold text-gray-900",children:j(a[2])},t)}if(1===r.length&&/^---+$/.test(n))/* @__PURE__ */
|
|
36
|
+
return m("hr",{className:"border-gray-200"},t);if(function(e){return e.length>=2&&e[0].includes("|")&&/^\s*\|?[\s:|-]*-[\s:|-]*\|?\s*$/.test(e[1])&&e[1].includes("-")}(r))return function(e,t){const r=D(e[0]),n=e.slice(2).map(D);/* @__PURE__ */
|
|
37
|
+
return m("div",{className:"my-1 overflow-x-auto rounded-lg border border-gray-200",children:/* @__PURE__ */u("table",{className:"w-full border-collapse text-sm",children:[
|
|
38
|
+
/* @__PURE__ */m("thead",{children:/* @__PURE__ */m("tr",{className:"bg-gray-50",children:r.map((e,t)=>/* @__PURE__ */m("th",{className:"border-b border-gray-200 px-3 py-2 text-left font-semibold text-gray-700",children:j(e)},t))})}),
|
|
39
|
+
/* @__PURE__ */m("tbody",{children:n.map((e,t)=>/* @__PURE__ */m("tr",{className:"even:bg-gray-50/50",children:e.map((e,t)=>/* @__PURE__ */m("td",{className:"border-t border-gray-100 px-3 h-8 align-top text-gray-700",children:j(e)},t))},t))})]})},t)}(r,t);if(/^>\s?/.test(n)){const e=r.map(e=>e.replace(/^>\s?/,"")).join(" ");/* @__PURE__ */
|
|
40
|
+
return m("div",{className:"my-1 rounded-r-lg border-l-4 border-blue-300 bg-blue-50/60 px-3 py-2 text-gray-700",children:j(e)},t)}const s=/^!\[([^\]]*)\]\(([^)]+)\)$/.exec(n);if(s&&1===r.length)/* @__PURE__ */
|
|
41
|
+
return m(I,{alt:s[1]},t);if(/^[-*]\s+/.test(n)){const e=C(r,/^[-*]\s+(.*)$/);/* @__PURE__ */
|
|
42
|
+
return m("ul",{className:"list-disc space-y-1 pl-5 marker:text-gray-400",children:e.map((e,t)=>/* @__PURE__ */m("li",{children:j(e)},t))},t)}const i=/^(\d+)\.\s+/.exec(n);if(i){const e=C(r,/^\d+\.\s+(.*)$/);/* @__PURE__ */
|
|
43
|
+
return m("ol",{start:Number(i[1]),className:"list-decimal space-y-1 pl-5 marker:text-gray-400",children:e.map((e,t)=>/* @__PURE__ */m("li",{className:"pl-1",children:j(e)},t))},t)}/* @__PURE__ */
|
|
44
|
+
return m("p",{children:j(r.join(" "))},t)}var J=/^( {0,3})(`{3,}|~{3,})[ \t]*(.*?)[ \t]*$/;function O(e){const t=e.replace(/\r\n/g,"\n").split("\n"),r=[];let n=[];const a=()=>{for(const e of n.join("\n").split(/\n{2,}/)){const t=e.replace(/\s+$/,"");""!==t.trim()&&r.push({text:t})}n=[]};for(let e=0;e<t.length;e+=1){const s=J.exec(t[e]);if(!(null!==s&&!("`"===s[2][0]&&s[3].includes("`")))){n.push(t[e]);continue}a();const[,i,l,o]=s,c=[];for(e+=1;e<t.length;e+=1){const r=J.exec(t[e]);if(null!==r&&r[2][0]===l[0]&&r[2].length>=l.length&&""===r[3])break;c.push(i?t[e].replace(new RegExp(`^ {0,${i.length}}`),""):t[e])}r.push({fence:{lang:o.split(/[ \t]/)[0],code:c.join("\n")}})}return a(),r}function S({children:e,className:t}){/* @__PURE__ */
|
|
45
|
+
return m("div",{className:`space-y-3 text-sm leading-relaxed text-gray-700 ${t??""}`.trim(),children:O(e??"").map((e,t)=>"fence"in e?function({lang:e,code:t},r){/* @__PURE__ */
|
|
46
|
+
return m("pre",{"data-language":e||void 0,className:"my-1 overflow-x-auto rounded-lg border border-gray-200 bg-gray-50 p-3 font-mono text-xs text-gray-800",children:/* @__PURE__ */m("code",{children:t})},r)}(e.fence,t):E(e.text,t))})}export{f as Banner,S as Markdown,y as StepChain,w as StepChainItem,g as Textarea_default};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{isAriaDisabled as e,swallowPress as a,describedByWith as r,OffWithReason as i}from"./chunk-3E27HV76.js";import{buttonClasses as s}from"./chunk-K7PQXJO7.js";import{SpinnerRing as l}from"./chunk-2J6F4EE7.js";import{forwardRef as d,useId as n}from"react";import{jsxs as t,jsx as c}from"react/jsx-runtime";var o=d(function({variant:d="primary",size:o="md",loading:m=!1,leftIcon:p,rightIcon:b,block:f=!1,disabled:u,type:h="button",children:k,className:x="",disabledReason:y,onClick:N,pressed:v,"aria-disabled":g,"aria-describedby":j,...E},w){const z=n(),C=u||m,I=null!=y&&""!==y,J=C&&I,F=!C&&e(g),H=F&&I,K=J||H?z:void 0,O=/* @__PURE__ */t("button",{ref:w,type:h,disabled:C,"aria-busy":m||void 0,"aria-disabled":!!F||g,"aria-describedby":r(j,K),onClick:F?a:N,className:s({variant:d,size:o,block:f,pressed:v??(!0===E["aria-pressed"]||"true"===E["aria-pressed"]),className:x}),...E,children:[m?/* @__PURE__ */c(l,{className:"h-3.5 w-3.5",ink:""}):p,k,!m&&b]});return H?/* @__PURE__ */c(i,{reason:y,id:z,block:f,children:O}):J?/* @__PURE__ */t("span",{className:f?"flex w-full flex-col gap-1":"inline-flex flex-col items-start gap-1",children:[O,
|
|
2
|
+
/* @__PURE__ */c("span",{id:K,className:"text-xs text-red-600",children:y})]}):O});export{o as Button_default};
|
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
import{useCopyText as e,CopyGlyph as n}from"./chunk-
|
|
2
|
-
return p(
|
|
3
|
-
return p("button",{type:"button",tabIndex:-1,"aria-label":i?l:r,title:i?l:r,onClick:a,className:"flex size-5 shrink-0 items-center justify-center rounded text-gray-400 hover:bg-gray-200 hover:text-gray-700 @max-[10rem]:hidden",children:/* @__PURE__ */p(n,{copied:i,className:"size-3.5"})})}function k({node:e}){const n=d(null);return m(()=>{const t=n.current;if(t)return t.appendChild(e),()=>{e.parentNode===t&&t.removeChild(e)}},[e]),/* @__PURE__ */p("span",{ref:n,className:"ml-1 flex shrink-0 items-center"})}function v({tabs:e,activeKey:n,idFor:d,panelMounted:m,onActivate:v,onClose:N,onCloseMany:w,label:C,className:$,activeClassName:j,end:z,afterPinned:I,onIconMenu:D,menuItems:M,sizing:_="even"}){const A=
|
|
1
|
+
import{useCopyText as e,CopyGlyph as n}from"./chunk-OKFO3XYS.js";import{PopupMenu as t,PopupMenuItem as r,PopupMenuDivider as l}from"./chunk-YIC644QO.js";import{Icon as i}from"./chunk-76DRQSJM.js";import{useShellStrings as a}from"./chunk-2EJRVQ3Y.js";import{useState as o,useEffect as s,Fragment as c,useRef as d,useLayoutEffect as m}from"react";import{jsxs as u,jsx as p,Fragment as h}from"react/jsx-runtime";var f="flex-[0_1_15rem]",y=f,b="outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-blue-500";function x(){/* @__PURE__ */
|
|
2
|
+
return p(i,{name:"close",look:"mini","aria-hidden":"true",className:"size-3.5"})}function g({text:t,label:r,copiedLabel:l}){const{copied:i,copy:a}=e(t);/* @__PURE__ */
|
|
3
|
+
return p("button",{type:"button",tabIndex:-1,"aria-label":i?l:r,title:i?l:r,onClick:a,className:"flex size-5 shrink-0 items-center justify-center rounded text-gray-400 hover:bg-gray-200 hover:text-gray-700 @max-[10rem]:hidden",children:/* @__PURE__ */p(n,{copied:i,className:"size-3.5"})})}function k({node:e}){const n=d(null);return m(()=>{const t=n.current;if(t)return t.appendChild(e),()=>{e.parentNode===t&&t.removeChild(e)}},[e]),/* @__PURE__ */p("span",{ref:n,className:"ml-1 flex shrink-0 items-center"})}function v({tabs:e,activeKey:n,idFor:d,panelMounted:m,onActivate:v,onClose:N,onCloseMany:w,label:C,className:$,activeClassName:j,end:z,afterPinned:I,onIconMenu:D,menuItems:M,sizing:_="even"}){const A=a().pageTabs,[E,O]=o(null),R=e.length;s(()=>{if(!n)return;const e=document.getElementById(d(n,"tab"));e?.scrollIntoView?.({block:"nearest",inline:"nearest"})},[d,n,R]);const B=I?e.findIndex(e=>!e.pinned):-1,Y=e.some(e=>e.key===n)?n:e[0]?.key,F=n=>{const t=e[(n+e.length)%e.length];t&&document.getElementById(d(t.key,"tab"))?.focus()},K=E?e.find(e=>e.key===E.key):void 0,L=K&&M?M(K.key):[],Q=K?e.indexOf(K):-1,S=e=>e.some(e=>!e.pinned),T=e=>()=>{O(null),e()};/* @__PURE__ */
|
|
4
4
|
return u("div",{className:$??"relative flex h-10 shrink-0 items-end gap-3 bg-gray-100 px-3",children:[
|
|
5
5
|
/* @__PURE__ */p("div",{"aria-hidden":"true",className:"pointer-events-none absolute inset-x-0 bottom-0 h-px bg-gray-200"}),
|
|
6
|
-
/* @__PURE__ */u("div",{role:"tablist","aria-label":C,onKeyDown:n=>{const t=e.findIndex(e=>document.getElementById(d(e.key,"tab"))===n.target);if(!(t<0)){if("ArrowRight"===n.key)
|
|
7
|
-
/* @__PURE__ */u("span",{className:"relative flex size-4 shrink-0 items-center justify-center text-gray-500 [&>svg]:size-4","aria-hidden":"true",children:[o,
|
|
6
|
+
/* @__PURE__ */u("div",{role:"tablist","aria-label":C,onKeyDown:n=>{const t=e.findIndex(e=>document.getElementById(d(e.key,"tab"))===n.target);if(!(t<0)){if("ArrowRight"===n.key)F(t+1);else if("ArrowLeft"===n.key)F(t-1);else if("Home"===n.key)F(0);else if("End"===n.key)F(e.length-1);else{if("Delete"!==n.key||e[t].pinned)return;N(e[t].key)}n.preventDefault()}},className:"flex min-w-0 flex-1 items-end overflow-x-auto overflow-y-hidden [scrollbar-width:none] [&::-webkit-scrollbar]:hidden",children:[e.map((t,r)=>{const l=t.key===n,a=!!t.dirty,o=t.icon,s=l?j??"z-[1] border-gray-200 bg-gray-50 text-gray-900":"border-transparent text-gray-600 hover:bg-gray-200/70 hover:text-gray-900",h=r>0&&r!==B&&!l&&e[r-1].key!==n,w={type:"button",role:"tab",id:d(t.key,"tab"),"aria-selected":l,"aria-controls":m?.(t.key)?d(t.key,"panel"):void 0,tabIndex:t.key===Y?0:-1,title:t.title,onClick:()=>v(t.key)},C={onContextMenu:e=>((e,n)=>{e.preventDefault(),O({x:e.clientX,y:e.clientY,key:n.key})})(e,t),onAuxClick:e=>((e,n)=>{1!==e.button||n.pinned||(e.preventDefault(),N(n.key))})(e,t),onMouseDown:e=>{1===e.button&&e.preventDefault()}},$=o&&
|
|
7
|
+
/* @__PURE__ */u("span",{className:"relative flex size-4 shrink-0 items-center justify-center text-gray-500 [&>svg]:size-4","aria-hidden":"true",children:[o,a&&!l&&!t.pinned&&
|
|
8
8
|
/* @__PURE__ */p("span",{className:"absolute -right-1 -top-1 hidden size-2 rounded-full bg-gray-500 ring-2 ring-gray-100 @max-[6.5rem]:block @max-[6.5rem]:group-hover:hidden"})]}),z=l&&!!D&&!!o;return t.pinned?/* @__PURE__ */p("div",{role:"presentation",className:`group relative flex h-8 flex-none items-center justify-center rounded-t-md border border-b-0 transition-colors ${o?"w-10":""} ${s}`,...C,children:/* @__PURE__ */u("button",{...w,className:`flex h-full items-center justify-center rounded-t-md ${o?"w-full":"px-3"} ${b}`,children:[$,
|
|
9
|
-
/* @__PURE__ */p("span",{className:o?"sr-only":"whitespace-nowrap text-sm",children:t.title})]})},t.key):/* @__PURE__ */u(c,{children:[r===
|
|
9
|
+
/* @__PURE__ */p("span",{className:o?"sr-only":"whitespace-nowrap text-sm",children:t.title})]})},t.key):/* @__PURE__ */u(c,{children:[r===B&&I,h&&/* @__PURE__ */p("span",{"aria-hidden":"true",className:"mb-3 h-4 w-px shrink-0 self-end border-l border-gray-300"}),
|
|
10
10
|
/* @__PURE__ */u("div",{role:"presentation",className:`group relative flex h-8 items-center rounded-t-md border border-b-0 text-sm transition-colors ${"active-full"===_&&l?"":"@container"} ${"active-full"===_?l?"flex-none min-w-[12rem] max-w-[40rem]":y:l&&(t.copy||z)?"flex-[0_1_20rem]":f} ${l?"active-full"===_?"":"min-w-[4.25rem]":"min-w-[2.75rem]"} ${s}`,...C,children:[z&&
|
|
11
11
|
/* @__PURE__ */p("button",{type:"button",tabIndex:-1,"aria-haspopup":"menu","aria-label":A.tabMenu,title:A.tabMenu,onClick:e=>{const n=e.currentTarget.getBoundingClientRect();D?.(t.key,n.left,n.bottom+4)},className:`ml-2 flex size-6 shrink-0 items-center justify-center rounded hover:bg-gray-200 @max-[5rem]:ml-2 ${b}`,children:$}),
|
|
12
12
|
/* @__PURE__ */u("button",{...w,className:`flex h-full min-w-0 flex-1 items-center gap-2 rounded-t-md pr-1 text-left ${z?"pl-2":"pl-3"} ${b} ${l?z?"":"@max-[5rem]:pl-3":"@max-[6.5rem]:pr-3 @max-[6.5rem]:group-hover:pr-1 @max-[4.5rem]:justify-center @max-[4.5rem]:px-0 @max-[4.5rem]:group-hover:pl-2"}`,children:[!z&&$,
|
|
13
13
|
/* @__PURE__ */u("span",{className:`min-w-0 flex-1 overflow-hidden whitespace-nowrap [mask-image:linear-gradient(to_right,#000_calc(100%-1rem),transparent)] ${"active-full"===_&&l?"pr-4":""} ${o?l?"@max-[5rem]:sr-only":"@max-[4.5rem]:sr-only":""}`,children:[t.title,t.favorite&&
|
|
14
|
-
/* @__PURE__ */p("span",{role:"img","aria-label":A.favorite,title:A.favorite,className:"ml-1 inline-flex align-[-0.125em] text-yellow-500",children:/* @__PURE__ */p(
|
|
15
|
-
/* @__PURE__ */u("span",{className:"mr-2 flex size-5 shrink-0 items-center justify-center "+(l?"":"@max-[6.5rem]:hidden @max-[6.5rem]:group-hover:flex"),children:[
|
|
16
|
-
/* @__PURE__ */p("button",{type:"button",tabIndex:-1,"aria-label":A.closeTab?.(t.title)??`${A.close} ${t.title}`,onClick:()=>N(t.key),className:"size-5 items-center justify-center rounded text-gray-400 hover:bg-gray-200 hover:text-gray-700 "+(
|
|
14
|
+
/* @__PURE__ */p("span",{role:"img","aria-label":A.favorite,title:A.favorite,className:"ml-1 inline-flex align-[-0.125em] text-yellow-500",children:/* @__PURE__ */p(i,{name:"star","aria-hidden":"true",className:"size-3.5",fill:"currentColor",strokeWidth:1.5})})]})]}),l&&t.actions&&/* @__PURE__ */p(k,{node:t.actions}),l&&t.copy&&/* @__PURE__ */p(g,{text:t.copy,label:A.copy(t.copy),copiedLabel:A.copied}),
|
|
15
|
+
/* @__PURE__ */u("span",{className:"mr-2 flex size-5 shrink-0 items-center justify-center "+(l?"":"@max-[6.5rem]:hidden @max-[6.5rem]:group-hover:flex"),children:[a&&/* @__PURE__ */p("span",{role:"img","aria-label":A.unsaved,className:"size-2 rounded-full bg-gray-500 group-hover:hidden"}),
|
|
16
|
+
/* @__PURE__ */p("button",{type:"button",tabIndex:-1,"aria-label":A.closeTab?.(t.title)??`${A.close} ${t.title}`,onClick:()=>N(t.key),className:"size-5 items-center justify-center rounded text-gray-400 hover:bg-gray-200 hover:text-gray-700 "+(a?"hidden group-hover:flex":l?"flex":"flex opacity-0 group-hover:opacity-100 focus-visible:opacity-100"),children:/* @__PURE__ */p(x,{})})]})]})]},t.key)}),I&&B<0&&I]}),z&&/* @__PURE__ */p("div",{className:"flex shrink-0 items-center gap-2 self-center",children:z}),E&&K&&/* @__PURE__ */u(t,{portal:!0,style:{left:E.x,top:E.y},onClose:()=>O(null),children:[L.length>0&&/* @__PURE__ */u(h,{children:[L.map((e,n)=>/* @__PURE__ */u(r,{onClick:T(e.onSelect),children:[e.icon,e.label]},n)),
|
|
17
17
|
/* @__PURE__ */p(l,{})]}),
|
|
18
|
-
/* @__PURE__ */p(r,{disabled:
|
|
18
|
+
/* @__PURE__ */p(r,{disabled:K.pinned,onClick:T(()=>N(K.key)),children:A.close}),
|
|
19
19
|
/* @__PURE__ */p(l,{}),
|
|
20
|
-
/* @__PURE__ */p(r,{disabled:!
|
|
21
|
-
/* @__PURE__ */p(r,{disabled:!
|
|
22
|
-
/* @__PURE__ */p(r,{disabled:!
|
|
20
|
+
/* @__PURE__ */p(r,{disabled:!S(e.filter(e=>e.key!==K.key)),onClick:T(()=>w("others",K.key)),children:A.closeOthers}),
|
|
21
|
+
/* @__PURE__ */p(r,{disabled:!S(e.slice(Q+1)),onClick:T(()=>w("right",K.key)),children:A.closeRight}),
|
|
22
|
+
/* @__PURE__ */p(r,{disabled:!S(e),onClick:T(()=>w("all",null)),children:A.closeAll})]})]})}export{v as TabStrip};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{Icon as e}from"./chunk-76DRQSJM.js";import{useShellStrings as i}from"./chunk-2EJRVQ3Y.js";import{Fragment as t}from"react";import{jsx as n,jsxs as a}from"react/jsx-runtime";var s=/* @__PURE__ */n(e,{name:"chevron-right",look:"mini",className:"h-3.5 w-3.5 shrink-0 text-gray-300","aria-hidden":!0}),r="inline-flex min-w-0 items-center gap-1 truncate rounded px-1 -mx-1 text-gray-500 transition-colors hover:text-gray-900 hover:underline rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)]";function l({items:e,separator:l,maxItems:c=0,className:m}){const o=i().breadcrumbs;if(0===e.length)return null;const h=l??s,d=[],u=e.length-1;if(c>0&&e.length>c&&c>=2){const i=Math.max(1,c-1);d.push({kind:"item",item:e[0],isLast:!1}),d.push({kind:"ellipsis"});for(let t=e.length-i;t<=u;t++)d.push({kind:"item",item:e[t],isLast:t===u})}else e.forEach((e,i)=>d.push({kind:"item",item:e,isLast:i===u}));/* @__PURE__ */
|
|
2
2
|
return n("nav",{"aria-label":o.label,className:`min-w-0 ${m??""}`,children:/* @__PURE__ */n("ol",{className:"flex items-center gap-2 text-sm",children:d.map((e,i)=>/* @__PURE__ */a(t,{children:[i>0&&/* @__PURE__ */n("li",{"aria-hidden":!0,className:"flex items-center",children:h}),
|
|
3
3
|
/* @__PURE__ */n("li",{className:"flex min-w-0 items-center",children:"ellipsis"===e.kind?/* @__PURE__ */n("span",{className:"px-0.5 text-gray-400 select-none","aria-label":o.hidden,children:"…"}):e.isLast||!e.item.href&&!e.item.onClick?/* @__PURE__ */a("span",{"aria-current":e.isLast?"page":void 0,className:"inline-flex min-w-0 items-center gap-1 truncate "+(e.isLast?"font-medium text-gray-900":"text-gray-500"),children:[e.item.icon,
|
|
4
4
|
/* @__PURE__ */n("span",{className:"truncate",children:e.item.label})]}):e.item.href?/* @__PURE__ */a("a",{href:e.item.href,onClick:e.item.onClick,className:r,children:[e.item.icon,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{Modal as e}from"./chunk-
|
|
1
|
+
import{Modal as e}from"./chunk-SBA7JZ72.js";import{keepsNativeMenu as a}from"./chunk-YIC644QO.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"}),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{client_default as a}from"./chunk-
|
|
1
|
+
import{client_default as a}from"./chunk-SBA7JZ72.js";var t=()=>a.get("/auth/numbering-configs/").then(a=>a.data?.results??a.data??[]),e="uploaded:wallpaper";function r(a,t){return"string"!=typeof a||!a||"none"===a||a.startsWith("#")?"":a===e?t||"":a}var l=()=>a.get("/auth/me/wallpaper/").then(a=>a.data),n=(t,e)=>{const r=new FormData;r.append("wallpaper",t);const l=e?{onUploadProgress:a=>e(a.total?Math.round(a.loaded/a.total*100):null)}:void 0;return a.post("/auth/me/wallpaper/",r,l).then(a=>a.data)},p=()=>a.delete("/auth/me/wallpaper/").then(a=>a.data);function o(a){const t=a?.response?.status,e=a?.response?.data,r=Array.isArray(e?.wallpaper)?e.wallpaper[0]:void 0;return r||(413===t?"That picture is too large to use as a wallpaper.":415===t?"That file is not a picture this can use as a wallpaper.":"The wallpaper could not be saved. Please try again.")}export{e as WALLPAPER_PREF_TOKEN,p as deleteWallpaper,t as getNumberingConfigs,l as getWallpaper,n as uploadWallpaper,r as wallpaperSrc,o as wallpaperUploadError};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import{useWindowMenuItem as e,Modal as t}from"./chunk-
|
|
1
|
+
import{useWindowMenuItem as e,Modal as t}from"./chunk-SBA7JZ72.js";import{navIcons as r}from"./chunk-TPDOOCFS.js";import{VERSION as s}from"./chunk-BUIZD247.js";import{Icon as o}from"./chunk-76DRQSJM.js";import{DEFAULT_SHELL_STRINGS as n,useShellStrings as i,splitAround as a}from"./chunk-2EJRVQ3Y.js";import{useState as m,useCallback as c,isValidElement as l,cloneElement as d}from"react";import{jsx as p,jsxs as h}from"react/jsx-runtime";var u=n.aboutApp,f={spreadsheet:{name:"Spreadsheets",version:"1.1.3",route:"/spreadsheet",description:u.spreadsheet},notepad:{name:"Notepad",version:"1.0.2",route:"/notepad",description:u.notepad},documents:{name:"Documents",version:"1.1.1",route:"/documents",description:u.documents},preview:{name:"Preview",version:"1.4.3",route:"/preview",description:u.preview},files:{name:"Files",version:"1.1.3",route:"/files",description:u.files},browser:{name:"Browser",version:"1.0.2",route:"/browser",description:u.browser}},x=/* @__PURE__ */p(o,{name:"info",className:"h-4 w-4",strokeWidth:1.5}),v=/* @__PURE__ */p(o,{name:"window",className:"h-9 w-9",strokeWidth:1.5});function w({app:o}){const n=f[o],[u,w]=m(!1),g=c(()=>w(!0),[]),N=i().aboutApp,b=N.title(n.name);if(e(b,g,x),!u)return null;const y=r[n.route],k=l(y)?d(y,{className:"h-9 w-9"}):v,[j,S]=a(N.partOf);/* @__PURE__ */
|
|
2
2
|
return p(t,{open:!0,onClose:()=>w(!1),title:b,size:"sm",compact:!0,bodyScroll:!1,autoHeight:!0,dimensions:[320,320],children:/* @__PURE__ */h("div",{className:"flex flex-col items-center text-center px-5 pt-5 pb-4",children:[
|
|
3
3
|
/* @__PURE__ */p("div",{className:"flex h-16 w-16 items-center justify-center rounded-2xl bg-gray-100 text-gray-600 shrink-0",children:k}),
|
|
4
|
-
/* @__PURE__ */p("h2",{className:"mt-3 text-lg font-bold text-gray-900",children:
|
|
5
|
-
/* @__PURE__ */p("p",{className:"text-2xs font-mono text-gray-400",children:N.version(
|
|
4
|
+
/* @__PURE__ */p("h2",{className:"mt-3 text-lg font-bold text-gray-900",children:n.name}),
|
|
5
|
+
/* @__PURE__ */p("p",{className:"text-2xs font-mono text-gray-400",children:N.version(n.version)}),
|
|
6
6
|
/* @__PURE__ */p("p",{className:"mt-2 text-xs text-gray-500 leading-relaxed",children:N[o]}),
|
|
7
7
|
/* @__PURE__ */h("div",{className:"mt-4 pt-3 border-t border-gray-200 w-full",children:[
|
|
8
8
|
/* @__PURE__ */h("p",{className:"text-2xs text-gray-500",children:[j,
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{
|
|
2
|
-
return n(t
|
|
3
|
-
return n("button",{onClick:o,title:r?c.copiedValue:c.copyValue(
|
|
1
|
+
import{Icon as e}from"./chunk-76DRQSJM.js";import{useShellStrings as t}from"./chunk-2EJRVQ3Y.js";import{useState as r,useRef as o,useEffect as c,useCallback as i}from"react";import{jsx as n}from"react/jsx-runtime";function a(e){const[t,n]=r(!1),a=o(void 0);c(()=>()=>clearTimeout(a.current),[]);return{copied:t,copy:i(t=>{t?.stopPropagation(),navigator.clipboard?.writeText(e).then(()=>{n(!0),clearTimeout(a.current),a.current=setTimeout(()=>n(!1),1500)},()=>{})},[e])}}function u({copied:t,className:r="w-4 h-4"}){/* @__PURE__ */
|
|
2
|
+
return n(e,t?{name:"check",className:`${r} text-green-600`,"aria-hidden":"true"}:{name:"copy",className:r,"aria-hidden":"true"})}function m({text:e}){const{copied:r,copy:o}=a(e),c=t().copy;/* @__PURE__ */
|
|
3
|
+
return n("button",{onClick:o,title:r?c.copiedValue:c.copyValue(e),className:"shrink-0 text-gray-400 hover:text-gray-600 transition-colors",children:/* @__PURE__ */n(u,{copied:r})})}export{m as CopyButton,u as CopyGlyph,a as useCopyText};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{isAriaDisabled as e,swallowPress as r,describedByWith as a,OffWithReason as i}from"./chunk-
|
|
1
|
+
import{isAriaDisabled as e,swallowPress as r,describedByWith as a,OffWithReason as i}from"./chunk-3E27HV76.js";import{iconButtonClasses as s}from"./chunk-K7PQXJO7.js";import{forwardRef as d,useId as n}from"react";import{jsx as o}from"react/jsx-runtime";var t=d(function({children:d,variant:t="ghost",size:c="md",type:l="button",className:m="",pressed:b,disabledReason:p,ink:u,disabled:f,onClick:h,"aria-disabled":k,"aria-describedby":v,...y},j){const N=n(),x=(Boolean(f)||e(k))&&null!=p&&""!==p,z=x||e(k),C=/* @__PURE__ */o("button",{ref:j,type:l,className:s({variant:t,size:c,pressed:b??(!0===y["aria-pressed"]||"true"===y["aria-pressed"]),ink:u,className:m}),...y,disabled:x?void 0:f,"aria-disabled":!!z||k,"aria-describedby":a(v,x?N:void 0),onClick:z?r:h,children:d});return x?/* @__PURE__ */o(i,{reason:p,id:N,children:C}):C});export{t as IconButton_default};
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import{useInsideTooltip as t,Tooltip as e}from"./chunk-
|
|
2
|
-
return m(A.Provider,{value:t,children:/* @__PURE__ */m(j.Provider,{value:e,children:r})})}function
|
|
3
|
-
return m("span",{className:`${
|
|
4
|
-
return m(
|
|
5
|
-
return m(
|
|
6
|
-
return m(
|
|
7
|
-
return m(
|
|
1
|
+
import{useInsideTooltip as t,Tooltip as e}from"./chunk-3E27HV76.js";import{useBrowserState as r,useHydrated as n}from"./chunk-D65T4H6J.js";import{Icon as o}from"./chunk-76DRQSJM.js";import{useShellStrings as s}from"./chunk-2EJRVQ3Y.js";import{createContext as a,useSyncExternalStore as i,useRef as l,useState as c,useContext as u,useCallback as d,useMemo as f}from"react";import{jsx as m,jsxs as h}from"react/jsx-runtime";var v="(max-width: 767px), (pointer: coarse)",g="(max-width: 767px)";function p(t){return!("undefined"==typeof window||!window.matchMedia)&&window.matchMedia(t).matches}var w=()=>p(v),x=()=>p(g);function b(){return!1}var y=t=>_(v,t),C=t=>_(g,t);function _(t,e){if("undefined"==typeof window||!window.matchMedia)return()=>{};const r=window.matchMedia(t);return r.addEventListener?(r.addEventListener("change",e),()=>r.removeEventListener("change",e)):(r.addListener(e),()=>r.removeListener(e))}function k(){return i(y,w,b)}function E(){return i(C,x,b)}var N="whitespace-nowrap";function S({children:r}){const n=t(),o=l(null),[s,a]=c(!1),i=/* @__PURE__ */m("span",{ref:o,className:"min-w-0 truncate",onMouseEnter:()=>{const t=o.current;a(!!t&&t.scrollWidth>t.clientWidth+1)},children:r});return n?i:/* @__PURE__ */m(e,{content:s?r:null,describe:!1,className:"relative inline-flex min-w-0 max-w-full",children:i})}var D="inline-flex max-w-full items-center whitespace-nowrap rounded-full",M={success:"bg-[var(--status-success-soft)] text-[color:var(--status-success-soft-ink)]",active:"bg-[var(--status-active-soft)] text-[color:var(--status-active-soft-ink)]",queued:"bg-[var(--status-queued-soft)] text-[color:var(--status-queued-soft-ink)]",info:"bg-[var(--status-info-soft)] text-[color:var(--status-info-soft-ink)]",pending:"bg-[var(--status-pending-soft)] text-[color:var(--status-pending-soft-ink)]",warning:"bg-[var(--status-warning-soft)] text-[color:var(--status-warning-soft-ink)]",danger:"bg-[var(--status-danger-soft)] text-[color:var(--status-danger-soft-ink)]",draft:"bg-[var(--status-draft-soft)] text-[color:var(--status-draft-soft-ink)]",neutral:"bg-[var(--status-neutral-soft)] text-[color:var(--status-neutral-soft-ink)]"},L={success:"bg-[var(--status-success-solid)] text-[color:var(--status-on-solid)]",active:"bg-[var(--status-active-solid)] text-[color:var(--status-on-solid)]",queued:"bg-[var(--status-queued-solid)] text-[color:var(--status-on-solid)]",info:"bg-[var(--status-info-solid)] text-[color:var(--status-on-solid)]",pending:"bg-[var(--status-pending-solid)] text-[color:var(--status-on-solid)]",warning:"bg-[var(--status-warning-solid)] text-[color:var(--status-on-solid)]",danger:"bg-[var(--status-danger-solid)] text-[color:var(--status-on-solid)]",draft:"bg-[var(--status-draft-solid)] text-[color:var(--status-on-solid)]",neutral:"bg-[var(--status-neutral-solid)] text-[color:var(--status-on-solid)]"};function T(t,e="subtle"){return"solid"===e?L[t]:M[t]}var A=a({}),j=a(void 0);function I(t){return t.replace(/_/g," ").replace(/\b\w/g,t=>t.toUpperCase())}function H({groups:t,labelFor:e,children:r}){/* @__PURE__ */
|
|
2
|
+
return m(A.Provider,{value:t,children:/* @__PURE__ */m(j.Provider,{value:e,children:r})})}function F(){const t=u(j);return d(e=>t?.(e)??I(e),[t])}function P({status:t,label:e,emphasis:r="subtle"}){const n=T(u(A)[t]??"neutral",r),o=u(j),s=e??o?.(t)??I(t);/* @__PURE__ */
|
|
3
|
+
return m("span",{className:`${D} px-3 py-0.5 text-xs font-medium ${n}`,children:/* @__PURE__ */m(S,{children:s})})}var Z={success:"success",error:"error",warning:"warning",info:"info",404:"info",403:"warning",500:"error"},O={success:"text-green-600 bg-green-100",error:"text-red-600 bg-red-100",warning:"text-amber-600 bg-amber-100",info:"text-blue-600 bg-blue-100"},z={404:t=>t.notFound,403:t=>t.noAccess,500:t=>t.serverError};function R({tone:t}){const e={className:"h-6 w-6",strokeWidth:1.5,"aria-hidden":!0};switch(t){case"success":/* @__PURE__ */
|
|
4
|
+
return m(o,{name:"check",...e});case"error":/* @__PURE__ */
|
|
5
|
+
return m(o,{name:"close",...e});case"warning":/* @__PURE__ */
|
|
6
|
+
return m(o,{name:"error",...e});default:/* @__PURE__ */
|
|
7
|
+
return m(o,{name:"info",...e})}}function q({status:t="info",title:e,subTitle:r,extra:n,icon:o,children:a,className:i=""}){const l=Z[t],c=s().errors;/* @__PURE__ */
|
|
8
8
|
return h("div",{role:"error"===l?"alert":void 0,className:`flex flex-col items-center justify-center px-6 py-12 text-center ${i}`.trim(),children:[
|
|
9
|
-
/* @__PURE__ */m("div",{className:`flex h-14 w-14 items-center justify-center rounded-full ${
|
|
10
|
-
/* @__PURE__ */m("h2",{className:"mt-4 text-lg font-semibold text-gray-900",children:e??
|
|
11
|
-
return h("span",{className:[
|
|
12
|
-
/* @__PURE__ */m(
|
|
13
|
-
return m(
|
|
14
|
-
return m("kbd",{className:[yt[r],Ct[e],o].filter(Boolean).join(" "),children:s})}export{it as ALT,pt as ALT_SHIFT_D,wt as ALT_SHIFT_E,xt as ALT_SHIFT_N,ht as CMD_A,mt as CMD_DOT,ut as CMD_ENTER,ft as CMD_K,dt as CMD_S,gt as CMD_SHIFT_Z,vt as CMD_Z,J as ColoredBadge,ct as ENTER,
|
|
9
|
+
/* @__PURE__ */m("div",{className:`flex h-14 w-14 items-center justify-center rounded-full ${O[l]}`,children:o??/* @__PURE__ */m(R,{tone:l})}),
|
|
10
|
+
/* @__PURE__ */m("h2",{className:"mt-4 text-lg font-semibold text-gray-900",children:e??z[t]?.(c)??""}),r&&/* @__PURE__ */m("p",{className:"mt-1 max-w-md text-sm text-gray-500",children:r}),a&&/* @__PURE__ */m("div",{className:"mt-4 w-full max-w-md text-left",children:a}),n&&/* @__PURE__ */m("div",{className:"mt-6 flex flex-wrap items-center justify-center gap-3",children:n})]})}function J({colorClass:t,tone:e,children:r,size:n="sm",capitalize:a=!1,closable:i=!1,onClose:l,closeLabel:c,className:u=""}){const d=t??M[e??"neutral"],f="xs"===n?"px-2 py-0.5 text-3xs":"md"===n?"px-3 py-0.5 text-xs":"px-2 py-0.5 text-xs",v=a?"capitalize":"",g=s().badge,p=c??("string"==typeof r?g.removeItem(r):g.remove),w="xs"===n?"h-2.5 w-2.5":"h-3 w-3";/* @__PURE__ */
|
|
11
|
+
return h("span",{className:[D,"font-medium",f,v,d,u].filter(Boolean).join(" "),children:[
|
|
12
|
+
/* @__PURE__ */m(S,{children:r}),i&&/* @__PURE__ */m("button",{type:"button",onClick:l,"aria-label":p,className:"-mr-0.5 ml-1 inline-flex shrink-0 items-center justify-center rounded-full opacity-70 transition-opacity hover:opacity-100 rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-strong)]",children:/* @__PURE__ */m(o,{name:"close",look:"mini",className:w,"aria-hidden":"true"})})]})}var K=a(null);function U({value:t,children:e}){/* @__PURE__ */
|
|
13
|
+
return m(K.Provider,{value:t,children:e})}function W(t="react-os-shell:prefs",e){const[n,o]=r(()=>{try{const r=JSON.parse(localStorage.getItem(t)||"{}");return{...e??{},...r}}catch{return{...e??{}}}},{...e??{}});return{prefs:n,save:d(e=>{o(r=>{const n={...r,...e};try{localStorage.setItem(t,JSON.stringify(n))}catch{}return n})},[t])}}var $={prefs:{},save:()=>{}};function B(){return u(K)??$}function Q(){const{prefs:t,save:e}=B(),r=d(t=>{const r=e(t);return r&&"function"==typeof r.then?r.catch(()=>{}):r},[e]);return f(()=>({prefs:t,save:r}),[t,r])}var V="react-os-shell:stale-chunk-reload-at",Y=3e4,G="vite:preloadError",X="/_next/static/",tt=/Failed to fetch dynamically imported module|error loading dynamically imported module|Importing a module script failed|Unable to preload CSS/i;function et(t){if(t instanceof Error&&"ChunkLoadError"===t.name)return!0;const e=t instanceof Error?t.message:"string"==typeof t?t:"";return tt.test(e)}function rt(t={}){if("undefined"==typeof window)return()=>{};const e=t.cooldownMs??3e4,r=t.reload??(()=>window.location.reload()),n=t.now??Date.now,o=void 0===t.storage?function(){try{const t=window.sessionStorage;return t.getItem(V),t}catch{return null}}():t.storage,s=void 0===t.chunkPathPrefix?X:t.chunkPathPrefix,a=t=>{const r=n(),s=function(t){if(!t)return null;try{const e=t.getItem(V),r=null===e?NaN:Number(e);return Number.isFinite(r)?r:null}catch{return null}}(o);return null!==s&&r-s<e?(console.error("[efficient-shell] a lazy chunk is still missing after a reload; letting the failure through:",t),!1):(function(t,e){if(t)try{t.setItem(V,String(e))}catch{}}(o,r),console.warn("[efficient-shell] a lazy chunk is no longer on the server (new deploy?); reloading onto the current build:",t),!0)},i=t=>{const e=t.payload;et(e)&&a(e)&&(t.preventDefault(),r())};let l=!0,c=!1;const u=/* @__PURE__ */new Set,d=null===s?null:t=>{const e=function(t,e){const r=t.target;let n="";if(r instanceof window.HTMLScriptElement?n=r.src:r instanceof window.HTMLLinkElement&&function(t){const e=t.rel.toLowerCase().split(/\s+/);if(e.includes("stylesheet")||e.includes("modulepreload"))return!0;const r=(t.getAttribute("as")??"").toLowerCase();return e.includes("preload")&&("script"===r||"style"===r)}(r)?n=r.href:t instanceof window.ErrorEvent&&"SyntaxError"===t.error?.name&&(n=t.filename),!n)return null;try{const t=new URL(e,window.location.origin).href,r=new URL(n,window.location.href).href;return r.startsWith(t)?r:null}catch{return null}}(t,s);!e||c||u.has(e)||(u.add(e),async function(t){try{const e=await fetch(t,{method:"HEAD",cache:"no-store"});return 404===e.status||410===e.status||e.ok&&/\btext\/html\b/i.test(e.headers.get("content-type")??"")}catch{return!1}}(e).then(t=>{u.delete(e),t&&l&&!c&&a(e)&&(c=!0,r())}))};return window.addEventListener(G,i),d&&window.addEventListener("error",d,!0),()=>{l=!1,window.removeEventListener(G,i),d&&window.removeEventListener("error",d,!0)}}var nt="undefined"!=typeof window&&"undefined"!=typeof navigator&&/Mac|iPhone|iPad/.test(navigator.platform||navigator.userAgent),ot={MOD:["⌘","Ctrl"],ALT:["⌥","Alt"],CMD_ENTER:["⌘⏎","Ctrl⏎"],CMD_S:["⌘S","Ctrl+S"],CMD_K:["⌘K","Ctrl+K"],CMD_DOT:["⌘.","Ctrl+."],CMD_A:["⌘A","Ctrl+A"],CMD_Z:["⌘Z","Ctrl+Z"],CMD_SHIFT_Z:["⌘⇧Z","Ctrl+Shift+Z"],ALT_SHIFT_D:["⌥⇧D","Alt+Shift+D"],ALT_SHIFT_E:["⌥⇧E","Alt+Shift+E"],ALT_SHIFT_N:["⌥⇧N","Alt+Shift+N"]},st=nt?0:1,at=ot.MOD[st],it=ot.ALT[st],lt="⇧",ct="⏎",ut=ot.CMD_ENTER[st],dt=ot.CMD_S[st],ft=ot.CMD_K[st],mt=ot.CMD_DOT[st],ht=ot.CMD_A[st],vt=ot.CMD_Z[st],gt=ot.CMD_SHIFT_Z[st],pt=ot.ALT_SHIFT_D[st],wt=ot.ALT_SHIFT_E[st],xt=ot.ALT_SHIFT_N[st],bt=new Map(nt?Object.values(ot).map(([t,e])=>[t,e]):[]);var yt={neutral:"inline-flex items-center justify-center rounded border border-gray-200 bg-gray-50 font-medium text-gray-500",accent:"inline-flex items-center justify-center rounded border kbd-submit font-medium",warning:"inline-flex items-center justify-center rounded border border-amber-300 bg-amber-100 font-medium"},Ct={sm:"px-1 py-0.5 text-2xs",md:"px-2 py-0.5 text-2xs"};function _t({keys:t,size:e="md",tone:r="neutral",className:o=""}){const s=function(t){return n()?t:bt.get(t)??t}(t);/* @__PURE__ */
|
|
14
|
+
return m("kbd",{className:[yt[r],Ct[e],o].filter(Boolean).join(" "),children:s})}export{it as ALT,pt as ALT_SHIFT_D,wt as ALT_SHIFT_E,xt as ALT_SHIFT_N,ht as CMD_A,mt as CMD_DOT,ut as CMD_ENTER,ft as CMD_K,dt as CMD_S,gt as CMD_SHIFT_Z,vt as CMD_Z,J as ColoredBadge,ct as ENTER,M as GROUP_COLORS,L as GROUP_COLORS_SOLID,_t as Kbd,at as MOD,X as NEXT_CHUNK_PATH_PREFIX,S as OneLineLabel,q as Result,lt as SHIFT,Y as STALE_CHUNK_RELOAD_COOLDOWN_MS,V as STALE_CHUNK_RELOAD_KEY,U as ShellPrefsProvider,P as StatusBadge,H as StatusBadgeProvider,N as TH_ONE_LINE,G as VITE_PRELOAD_ERROR_EVENT,T as groupColors,rt as installStaleChunkReload,nt as isMac,et as isStaleChunkError,k as useIsMobile,E as useIsPhone,W as useLocalStoragePrefs,Q as useShellPrefs,B as useShellPrefsAdapter,F as useStatusLabel};
|