efficient-shell 7.28.0 → 7.29.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-CUAQCAZ2.js → Browser-5DWPCWSB.js} +14 -14
- package/dist/Calculator-756J7AGT.js +29 -0
- package/dist/ConfirmDialog-GY3PLMAD.js +1 -0
- package/dist/{CurrencyConverter-ZIERKELA.js → CurrencyConverter-TVIYMDYE.js} +9 -9
- package/dist/{Documents-GOOHQYBQ.js → Documents-ZHENRDK2.js} +4 -4
- package/dist/Files-YKUTWABM.js +87 -0
- package/dist/{Notepad-YV4JDSRK.js → Notepad-7MXZE6S4.js} +10 -10
- package/dist/PdfViewer-T6SP6R6J.js +1 -0
- package/dist/{PomodoroTimer-GYLJIAWS.js → PomodoroTimer-IUPEDDQV.js} +6 -6
- package/dist/{Preview-K4QOB3J2.js → Preview-6XGCKFXK.js} +23 -23
- package/dist/Sidebar-P3WJQSY5.js +44 -0
- package/dist/{Spreadsheet-7WU4NDJP.js → Spreadsheet-POFCH3DZ.js} +12 -12
- package/dist/{Stock-7AOF4PKL.js → Stock-MKUCNEAH.js} +6 -6
- package/dist/{Weather-23SUCMNL.js → Weather-6Q7DSJR4.js} +15 -15
- package/dist/{WorldClock-ENURKJG6.js → WorldClock-LTJJP4SS.js} +4 -4
- package/dist/apps/index.js +1 -1
- package/dist/bin/ui-check.js +1 -1
- package/dist/{chunk-IUBESHKK.js → chunk-2ECESCBH.js} +1 -1
- package/dist/{chunk-EZ73LTEI.js → chunk-2PNYIWIN.js} +1 -1
- package/dist/{chunk-KROUETJQ.js → chunk-4EMCPU7W.js} +18 -18
- package/dist/{chunk-A22D3FXG.js → chunk-BDXFODVC.js} +2 -2
- package/dist/chunk-BTLM7W6P.js +1 -0
- package/dist/{chunk-ITW5DB2J.js → chunk-C4QIJNW3.js} +12 -12
- package/dist/{chunk-4MSDABE3.js → chunk-DFCTQOIL.js} +1 -1
- package/dist/{chunk-5TFUQOEM.js → chunk-DFEO2CGF.js} +1 -1
- package/dist/{chunk-FHKJQU3U.js → chunk-EFYGUYEZ.js} +8 -8
- package/dist/{chunk-7776CT23.js → chunk-GPHWFPXA.js} +1 -1
- package/dist/{chunk-HCQ7SIGC.js → chunk-H3ODY2XB.js} +1 -1
- package/dist/{chunk-AHBO5PKR.js → chunk-IIIUHK3J.js} +8 -8
- package/dist/{chunk-BJN6DNDM.js → chunk-JIHKEOLY.js} +1 -1
- package/dist/{chunk-MQUGCJRS.js → chunk-LKFJPLTO.js} +208 -208
- package/dist/{chunk-QHL3LL5F.js → chunk-LU7X6LLY.js} +28 -28
- package/dist/{chunk-I4GL7BVS.js → chunk-OD3MT6SF.js} +2 -2
- package/dist/{chunk-XTAGVLZJ.js → chunk-RAFTWZF5.js} +1 -1
- package/dist/{chunk-QJ4YAH34.js → chunk-REZ2UWJT.js} +41 -41
- package/dist/{chunk-ABXVRYKR.js → chunk-T3UAIICC.js} +1 -1
- package/dist/chunk-V5MNUKAJ.js +1 -0
- package/dist/{chunk-76VZ67RK.js → chunk-X6ALQ2S6.js} +3 -3
- package/dist/{chunk-SUXBGACL.js → chunk-YO4FRA7Y.js} +6 -6
- package/dist/{chunk-EBTCC5N3.js → chunk-Z756FAL6.js} +9 -9
- package/dist/file-intake/index.js +1 -1
- package/dist/i18n/index.d.ts +1 -1
- package/dist/{index-HJwNWiNU.d.ts → index-CLkh3Bps.d.ts} +42 -2
- package/dist/index.d.ts +3 -3
- package/dist/index.js +56 -56
- package/dist/locales/zh-Hans.d.ts +1 -1
- package/dist/locales/zh-Hans.js +1 -1
- package/dist/map/index.js +7 -7
- package/dist/page-tabs/index.js +4 -4
- package/dist/pdf/index.js +1 -1
- package/dist/{strings-BuYlsGKG.d.ts → strings-DzmlWMRe.d.ts} +2 -0
- package/dist/telemetry/index.js +1 -1
- package/dist/ui/index.d.ts +2 -2
- package/dist/ui/index.js +1 -1
- package/package.json +1 -1
- package/dist/Calculator-YQS2NTUZ.js +0 -29
- package/dist/ConfirmDialog-YZCM3HJP.js +0 -1
- package/dist/Files-R4Z3BYJL.js +0 -87
- package/dist/PdfViewer-JLIMTMVK.js +0 -1
- package/dist/Sidebar-4RJEWBBN.js +0 -44
- package/dist/chunk-3VYANOTN.js +0 -1
- package/dist/chunk-KWW5PPQN.js +0 -1
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import{navVisible as e,isReachable as t,visibleChildren as r,isSection as n}from"./chunk-5A7MWTXX.js";import{LoadingSpinner as a}from"./chunk-NVFKXL52.js";import{isAriaDisabled as s,swallowPress as l,describedByWith as o,OffWithReason as i}from"./chunk-WOZ36LPR.js";import{useDismissPopupsOnOpen as c}from"./chunk-UVBK6YSR.js";import{glassStyle as d}from"./chunk-7IQ3B77H.js";import{Z_LAYERS as u}from"./chunk-FIEA5CGB.js";import{iconButtonClasses as p}from"./chunk-K7PQXJO7.js";import{useShellStrings as y}from"./chunk-
|
|
1
|
+
import{navVisible as e,isReachable as t,visibleChildren as r,isSection as n}from"./chunk-5A7MWTXX.js";import{LoadingSpinner as a}from"./chunk-NVFKXL52.js";import{isAriaDisabled as s,swallowPress as l,describedByWith as o,OffWithReason as i}from"./chunk-WOZ36LPR.js";import{useDismissPopupsOnOpen as c}from"./chunk-UVBK6YSR.js";import{glassStyle as d}from"./chunk-7IQ3B77H.js";import{Z_LAYERS as u}from"./chunk-FIEA5CGB.js";import{iconButtonClasses as p}from"./chunk-K7PQXJO7.js";import{useShellStrings as y}from"./chunk-2PNYIWIN.js";import{forwardRef as f,useId as m,useState as h,useEffect as b,useRef as g,useMemo as k,useCallback as v}from"react";import{jsx as x,jsxs as w}from"react/jsx-runtime";import{createPortal as N}from"react-dom";var L=f(function({children:e,variant:t="ghost",size:r="md",type:n="button",className:a="",pressed:c,disabledReason:d,ink:u,disabled:y,onClick:f,"aria-disabled":h,"aria-describedby":b,...g},k){const v=m(),w=(Boolean(y)||s(h))&&null!=d&&""!==d,N=w||s(h),L=/* @__PURE__ */x("button",{ref:k,type:n,className:p({variant:t,size:r,pressed:c??(!0===g["aria-pressed"]||"true"===g["aria-pressed"]),ink:u,className:a}),...g,disabled:w?void 0:y,"aria-disabled":!!N||h,"aria-describedby":o(b,w?v:void 0),onClick:N?l:f,children:e});return w?/* @__PURE__ */x(i,{reason:d,id:v,children:L}):L}),_={favicon:"h-8 w-8",compact:"h-10 w-10",wordmark:"h-10 w-40"};function A(e){return e.trim().charAt(0).toLocaleUpperCase()||"·"}function C(e,t,r){return!1===e?"framed":null==e||null==t?"plate-light":t?"light"===r?"plate-dark":"bare":"dark"===r?"plate-light":"bare"}var I={"plate-light":"bg-white shadow-[0_2px_12px_var(--rosh-mark-plate-shadow)]","plate-dark":"bg-neutral-900 shadow-[0_2px_12px_var(--rosh-mark-plate-shadow-strong)]",framed:"border border-black/10 shadow-[0_2px_12px_var(--rosh-mark-plate-shadow)]",bare:""};function $(e,t,r){return"bare"===e?{}:"framed"===e?{borderRadius:t}:{borderRadius:t,padding:r}}function E({src:e,fallbackSrc:t,fallbackHasAlpha:r=null,fallbackIsLight:n=null,fallbackAdaptive:a,alt:s,slot:l="compact",surface:o="light",size:i,width:c,height:d,decorative:u=!1,fallbackMode:p="monogram",adaptive:y=!1,hasAlpha:f=null,isLight:m=null,treatmentPadding:g=4,treatmentRadius:k=8,className:v="",style:w}){const[N,L]=h(e||t||"");b(()=>{L(e||t||"")},[e,t]);const E=Boolean(t&&N===t&&N!==e),j=(E?a??y:y)?C(E?r:f,E?n:m,o):"bare",T=["inline-flex shrink-0 items-center justify-center overflow-hidden",null==i&&null==c&&null==d?_[l]:"","dark"===o?"text-white":"text-gray-700",I[j],v].filter(Boolean).join(" "),S={...$(j,k,g),...null==i?{width:c,height:d}:{width:i,height:i},...w};return N?/* @__PURE__ */x("span",{className:T,"data-brand-treatment":j,style:S,children:/* @__PURE__ */x("img",{src:N,alt:u?"":s,"data-brand-slot":l,className:"block max-h-full max-w-full",style:{objectFit:"contain"},onError:()=>L(e=>t&&e!==t?t:"")})}):"none"===p?null:/* @__PURE__ */x("span",{"data-brand-fallback":!0,"data-brand-slot":l,"aria-label":u?void 0:s,"aria-hidden":u||void 0,role:u?void 0:"img",className:`${T} rounded-md bg-gray-100 font-semibold`,style:S,children:u?null:A(s)})}function j(r,n){return e(r,n)?r.items.filter(r=>e(r,n)&&t(r,n)):[]}function T(e,n){return r(e,n).filter(e=>t(e,n))}function S(r,a,s){const l=new Set(a.erp),o=new Set(a.system),i=new Set(a.footer??[]),c=r.filter(n),d=e=>c.filter(t=>e.has(t.label)&&j(t,s).length>0);return{topItems:r.filter(e=>!n(e)).filter(r=>e(r,s)&&t(r,s)),erpSections:d(l),systemSections:d(o),virtualSections:(a.virtual??[]).filter(e=>e.items.length>0),footerSections:d(i),footerItems:(a.footerItems??[]).filter(r=>e(r,s)&&t(r,s))}}function M(e,t,r){return!!t&&e.some(e=>e.to===t||M(T(e,r),t,r))}var R="__page__";function K(e){const t=e.indexOf("?");if(t<0)return{path:e,search:""};const r=new URLSearchParams(e.slice(t+1));return{path:e.slice(0,t),search:r.get("search")??""}}function B(e,t,r){const n=function(e,t){const r=[],n=e=>{const a=T(e,t);0===a.length?r.push(e):a.forEach(n)};e.topItems.forEach(n);for(const r of[...e.erpSections,...e.systemSections,...e.footerSections])j(r,t).forEach(n);for(const t of e.virtualSections)t.items.forEach(n);return e.footerItems.forEach(n),r}(e,t);return Object.assign(async e=>{const t=e.trim().toLowerCase();if(!t)return[];const a=/* @__PURE__ */new Set,s=[];for(const e of n){const n=e.menuLabel??e.label;a.has(e.to)||!e.label.toLowerCase().includes(t)&&!n.toLowerCase().includes(t)||(a.add(e.to),s.push({type:r,label:e.label,entity_type:R,entity_id:e.to}))}return s.slice(0,8)},{destinations:n})}function P(e,t){if(!Array.isArray(e))return[];const r=[];for(const n of e){if(!n||"string"!=typeof n.entityType||"string"!=typeof n.entityId||"string"!=typeof n.label)continue;if("preview-file"===n.entityType)continue;const e="page"===n.entityType;r.push({type:e?t:"",label:n.label,entity_type:e?R:n.entityType,entity_id:n.entityId})}return r}var D="M21 21l-5.197-5.197m0 0A7.5 7.5 0 105.196 5.196a7.5 7.5 0 0010.607 10.607z";function z(e){return e.typeKey??e.type}function F(e,t){return t?.[z(e)]??e.type}function H(e,t,r){return 0===r.length?null:{key:e,title:t,rows:r.map((e,t)=>({kind:"action",key:`action:${t}:${e.label}`,label:e.label,icon:e.icon,action:e})),count:r.length}}function U(e,t,r,n){return{type:e,label:t,entity_type:R,entity_id:`${r}?search=${encodeURIComponent(n.trim())}`}}function W(e,t,r,n,a){const s=function(e){const t=/* @__PURE__ */new Map;for(const r of e){const e=z(r),n=t.get(e);n?n.results.push(r):t.set(e,{type:r.type,results:[r]})}return Array.from(t,([e,t])=>({key:e,...t}))}(e).map(e=>{const t=e.results.map((t,r)=>({kind:"result",key:`result:${e.key}:${t.entity_type}:${t.entity_id}:${r}`,label:t.label,sub:t.sub,result:t})),n=!!a?.truncatedTypes?.includes(e.key),s=n?a?.listRoutes?.[e.key]:void 0,l=a?.typeLabels?.[e.key]??e.type;if(a&&s){const n=a.seeAllLabel(s.label);t.push({kind:"seeAll",key:`seeall:${e.key}`,label:n,result:U(l,n,s.path,r)})}return{key:`type:${e.key}`,title:l,rows:t,count:e.results.length,truncated:n}}),l=H("actions",n,function(e,t){const r=t.trim().toLowerCase();return e&&r?e.filter(e=>e.label.toLowerCase().includes(r)||(e.keywords??[]).some(e=>e.toLowerCase().includes(r))):[]}(t,r));return l?[...s,l]:s}function O(e,t,r){return 0===r?0:Math.min(Math.max(e+t,0),r-1)}var X=(e,t)=>e.entity_type===t.entity_type&&e.entity_id===t.entity_id;function V(e,t,r=8){return[t,...e.filter(e=>!X(e,t))].slice(0,r)}function G(e){if(!Array.isArray(e))return[];const t=[];for(const r of e){if(!r||"object"!=typeof r)continue;const e=r;if("string"!=typeof e.type||"string"!=typeof e.label||"string"!=typeof e.entity_type||"string"!=typeof e.entity_id)continue;const n={type:e.type,label:e.label,entity_type:e.entity_type,entity_id:e.entity_id};"string"==typeof e.sub&&(n.sub=e.sub),"string"==typeof e.typeKey&&(n.typeKey=e.typeKey),t.some(e=>X(e,n))||t.push(n)}return t.slice(0,8)}function Q(e){if(Array.isArray(e))return{results:e,truncatedTypes:[]};if(e&&"object"==typeof e&&Array.isArray(e.results)){const{results:t,truncatedTypes:r}=e;return{results:t,truncatedTypes:Array.isArray(r)?r:[]}}return{results:[],truncatedTypes:[]}}var Y=[];function q(e,t,r){const[n,a]=h([]),[s,l]=h(Y),[o,i]=h(!1),[c,d]=h("none"),u=g(function(){let e=0,t=null;const r=()=>{e+=1,t?.abort(),t=null};return{begin:()=>{r();const n=e,a=new AbortController;return t=a,{signal:a.signal,isCurrent:()=>n===e}},cancel:r}}());b(()=>{const n=u.current;if(e.length<r||!t||0===t.length)return n.cancel(),a(e=>0===e.length?e:[]),l(Y),d("none"),void i(!1);i(!0);const s=setTimeout(async()=>{const r=n.begin(),s=await async function(e,t,r){const n=await Promise.all(e.map(async e=>{try{return{failed:!1,...Q(await e(t,{signal:r}))}}catch(e){const t=r.aborted||function(e){if(!e||"object"!=typeof e)return!1;const{name:t,code:r}=e;return"AbortError"===t||"CanceledError"===t||"ERR_CANCELED"===r}(e);return{failed:!t,results:[],truncatedTypes:[]}}}));return{results:n.flatMap(e=>e.results),truncatedTypes:Array.from(new Set(n.flatMap(e=>e.truncatedTypes))),failed:n.filter(e=>e.failed).length}}(t,e,r.signal);r.isCurrent()&&(a(s.results),l(s.truncatedTypes),d(0===s.failed?"none":s.failed>=t.length?"all":"some"),i(!1))},250);return()=>{clearTimeout(s),n.cancel()}},[e,t,r]);return{results:n,truncatedTypes:s,loading:o,failure:c,reset:v(()=>{u.current.cancel(),a(e=>0===e.length?e:[]),l(Y),d("none"),i(!1)},[])}}var J=(e,t)=>`${e}-opt-${t}`;function Z(e,t){if("seeAll"===e.kind)return"M13.5 4.5L21 12m0 0l-7.5 7.5M21 12H3";if("action"===e.kind)return e.icon??D;if(e.icon)return e.icon;const r=t?.[z(e.result)];return r||D}function ee({sections:e,activeIdx:t,listId:r,label:n,typeIcons:a,groupCount:s,groupLabel:l,onHover:o,onPick:i}){let c=0;/* @__PURE__ */
|
|
2
2
|
return x("div",{id:r,role:"listbox","aria-label":n,className:"py-1",children:e.map(e=>/* @__PURE__ */w("div",{role:"group","aria-label":l(e.title,e.count,!!e.truncated),children:[
|
|
3
3
|
/* @__PURE__ */w("div",{"aria-hidden":"true",className:"flex items-center justify-between px-4 pt-2 pb-1 text-2xs font-semibold uppercase tracking-wide text-gray-400",children:[
|
|
4
4
|
/* @__PURE__ */x("span",{children:e.title}),
|
|
5
5
|
/* @__PURE__ */x("span",{className:"font-medium normal-case tracking-normal",children:s(e.count,!!e.truncated)})]}),e.rows.map(e=>{const n=c++,s=n===t,l="action"===e.kind||"seeAll"===e.kind?void 0:e.badge,d="action"===e.kind||"seeAll"===e.kind?void 0:e.sub,u="seeAll"===e.kind;/* @__PURE__ */
|
|
6
6
|
return w("div",{id:J(r,n),role:"option","aria-selected":s,className:"flex items-center gap-3 w-full px-4 py-3 text-left cursor-pointer transition-colors "+(s?"bg-blue-50":"hover:bg-gray-50"),onMouseDown:e=>e.preventDefault(),onClick:()=>i(e),onMouseEnter:()=>o(n),children:[
|
|
7
|
-
/* @__PURE__ */x("svg",{className:"h-4 w-4 text-gray-400 shrink-0",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,"aria-hidden":"true",children:/* @__PURE__ */x("path",{strokeLinecap:"round",strokeLinejoin:"round",d:
|
|
7
|
+
/* @__PURE__ */x("svg",{className:"h-4 w-4 text-gray-400 shrink-0",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,"aria-hidden":"true",children:/* @__PURE__ */x("path",{strokeLinecap:"round",strokeLinejoin:"round",d:Z(e,a)})}),
|
|
8
8
|
/* @__PURE__ */w("div",{className:"flex-1 min-w-0",children:[
|
|
9
|
-
/* @__PURE__ */x("p",{className:"text-sm font-medium truncate "+(u?"text-blue-600":"text-gray-900"),children:e.label}),d&&/* @__PURE__ */x("p",{className:"text-xs text-gray-400 truncate",children:d})]}),l&&/* @__PURE__ */x("span",{className:"shrink-0 rounded-full bg-gray-100 px-2 py-0.5 text-3xs font-medium text-gray-500",children:l})]},e.key)})]},e.key))})}var te="react-os-shell:open-global-search";function re(){"undefined"!=typeof window&&window.dispatchEvent(new CustomEvent(te))}function ne({providers:e,typeIcons:t,typeLabels:r,listRoutes:n,placeholder:s,quickActions:l,onSelect:o,recent:i,onRecord:p,favorites:f,hotkey:L=!0}={}){const _=y().search,A=s??_.placeholder,[C,
|
|
10
|
-
/* @__PURE__ */w("div",{"data-global-search":"",className:"fixed inset-0 flex items-start justify-center pt-[15vh]",style:{zIndex:u.overlay},onClick:()=>
|
|
9
|
+
/* @__PURE__ */x("p",{className:"text-sm font-medium truncate "+(u?"text-blue-600":"text-gray-900"),children:e.label}),d&&/* @__PURE__ */x("p",{className:"text-xs text-gray-400 truncate",children:d})]}),l&&/* @__PURE__ */x("span",{className:"shrink-0 rounded-full bg-gray-100 px-2 py-0.5 text-3xs font-medium text-gray-500",children:l})]},e.key)})]},e.key))})}var te="react-os-shell:open-global-search";function re(){"undefined"!=typeof window&&window.dispatchEvent(new CustomEvent(te))}function ne({providers:e,typeIcons:t,typeLabels:r,listRoutes:n,placeholder:s,quickActions:l,onSelect:o,recent:i,onRecord:p,favorites:f,hotkey:L=!0}={}){const _=y().search,A=s??_.placeholder,[C,I]=h(!1),[$,E]=h(""),[j,T]=h(0),S=g(null),{results:M,truncatedTypes:R,loading:K,failure:B,reset:P}=q($,e,2);b(()=>{const e=e=>{L&&!e.defaultPrevented&&(e.ctrlKey||e.metaKey)&&"k"===e.key&&(e.preventDefault(),I(e=>!e)),"Escape"===e.key&&C&&I(!1)},t=()=>I(!0);return window.addEventListener("keydown",e),window.addEventListener(te,t),()=>{window.removeEventListener("keydown",e),window.removeEventListener(te,t)}},[C,L]),c(C);const[z,U]=h(!1);C!==z&&(U(C),C&&(E(""),T(0),P())),b(()=>{C?setTimeout(()=>S.current?.focus(),50):E("")},[C]),b(()=>{T(0)},[M]);const X=$.length>=2,V=k(()=>X?W(M,l,$,_.actions,{truncatedTypes:R,listRoutes:n,typeLabels:r,seeAllLabel:_.seeAll}):function(e,t){const r=[];e.recent?.length&&r.push({key:"recent",title:t.recent,rows:e.recent.map((t,r)=>({kind:"recent",key:`recent:${t.entity_type}:${t.entity_id}:${r}`,label:t.label,sub:t.sub,badge:F(t,e.typeLabels),result:t})),count:e.recent.length}),e.favorites?.length&&r.push({key:"favorites",title:t.favorites,rows:e.favorites.map((t,r)=>({kind:"favorite",key:`favorite:${t.entity_type}:${t.entity_id}:${r}`,label:t.label,sub:t.sub,badge:F(t,e.typeLabels)||void 0,icon:"M11.48 3.499a.562.562 0 011.04 0l2.125 5.111a.563.563 0 00.475.345l5.518.442c.499.04.701.663.321.988l-4.204 3.602a.563.563 0 00-.182.557l1.285 5.385a.562.562 0 01-.84.61l-4.725-2.885a.563.563 0 00-.586 0L6.982 20.54a.562.562 0 01-.84-.61l1.285-5.386a.562.562 0 00-.182-.557l-4.204-3.602a.563.563 0 01.321-.988l5.518-.442a.563.563 0 00.475-.345L11.48 3.5z",result:t})),count:e.favorites.length});const n=H("actions",t.actions,e.actions??[]);return n&&r.push(n),r}({recent:i,favorites:f,actions:l,typeLabels:r},_),[X,M,R,n,r,l,$,i,f,_]),G=k(()=>function(e){return e.flatMap(e=>e.rows)}(V),[V]),Q=Math.min(j,Math.max(G.length-1,0)),Y=m(),Z=G.length>0;b(()=>{C&&0!==G.length&&document.getElementById(J(Y,Q))?.scrollIntoView?.({block:"nearest"})},[C,Q,G.length,Y]);const re=v(e=>{I(!1),"action"!==e.kind?("result"!==e.kind&&"recent"!==e.kind||p?.(e.result),o?.(e.result)):e.action.onSelect()},[o,p]);return C?N(
|
|
10
|
+
/* @__PURE__ */w("div",{"data-global-search":"",className:"fixed inset-0 flex items-start justify-center pt-[15vh]",style:{zIndex:u.overlay},onClick:()=>I(!1),children:[
|
|
11
11
|
/* @__PURE__ */x("div",{"data-global-search-backdrop":"",className:"absolute inset-0 bg-black/50 backdrop-blur-sm"}),
|
|
12
12
|
/* @__PURE__ */w("div",{className:"relative z-10 w-full max-w-xl rounded-(--radius-popup) overflow-hidden",onClick:e=>e.stopPropagation(),style:d(),children:[
|
|
13
13
|
/* @__PURE__ */w("div",{className:"flex items-center gap-3 px-4 py-3 border-b border-gray-200",children:[
|
|
14
|
-
/* @__PURE__ */x("svg",{className:"h-5 w-5 text-gray-400 shrink-0",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:/* @__PURE__ */x("path",{strokeLinecap:"round",strokeLinejoin:"round",d:
|
|
15
|
-
/* @__PURE__ */x("input",{ref:S,type:"text",value:$,onChange:e=>{
|
|
14
|
+
/* @__PURE__ */x("svg",{className:"h-5 w-5 text-gray-400 shrink-0",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:/* @__PURE__ */x("path",{strokeLinecap:"round",strokeLinejoin:"round",d:D})}),
|
|
15
|
+
/* @__PURE__ */x("input",{ref:S,type:"text",value:$,onChange:e=>{E(e.target.value),T(0)},onKeyDown:e=>{"ArrowDown"===e.key?(e.preventDefault(),T(O(Q,1,G.length))):"ArrowUp"===e.key?(e.preventDefault(),T(O(Q,-1,G.length))):"Tab"===e.key&&G.length>0?(e.preventDefault(),T(function(e,t,r){const n=e.length;if(0===n)return 0;const a=[];let s=0;for(const t of e)a.push(s),s+=t;let l=0;for(let e=0;e<n;e++)t>=a[e]&&(l=e);return a[(l+r+n)%n]}(V.map(e=>e.rows.length),Q,e.shiftKey?-1:1))):"Enter"===e.key&&G[Q]&&re(G[Q])},placeholder:A,role:"combobox","aria-expanded":Z,"aria-controls":Z?Y:void 0,"aria-activedescendant":Z?J(Y,Q):void 0,"aria-autocomplete":"list",className:"flex-1 text-sm bg-transparent border-0 rosh-focus-ring placeholder-gray-400"}),K&&/* @__PURE__ */x("span",{"data-global-search-spinner":"",role:"status","aria-label":_.searching,className:"h-4 w-4 shrink-0 animate-spin rounded-full border-2 border-gray-300 border-t-gray-500"}),
|
|
16
16
|
/* @__PURE__ */x("kbd",{className:"hidden sm:inline-flex items-center rounded border border-gray-300 px-2 py-0.5 text-2xs font-medium text-gray-400",children:_.escBadge})]}),
|
|
17
|
-
/* @__PURE__ */w("div",{className:"max-h-[50vh] overflow-y-auto",children:[K&&0===G.length&&/* @__PURE__ */x(a,{size:"sm",padding:"py-6",label:_.searching}),!K&&"all"===B&&X&&/* @__PURE__ */x("div",{role:"alert",className:"px-4 py-3 text-center text-sm text-red-600",children:_.searchFailed}),!K&&X&&0===G.length&&"all"!==B&&/* @__PURE__ */x("div",{className:"px-4 py-6 text-center text-sm text-gray-400",children:_.noResults}),
|
|
17
|
+
/* @__PURE__ */w("div",{className:"max-h-[50vh] overflow-y-auto",children:[K&&0===G.length&&/* @__PURE__ */x(a,{size:"sm",padding:"py-6",label:_.searching}),!K&&"all"===B&&X&&/* @__PURE__ */x("div",{role:"alert",className:"px-4 py-3 text-center text-sm text-red-600",children:_.searchFailed}),!K&&X&&0===G.length&&"all"!==B&&/* @__PURE__ */x("div",{className:"px-4 py-6 text-center text-sm text-gray-400",children:_.noResults}),Z&&/* @__PURE__ */x(ee,{sections:V,activeIdx:Q,listId:Y,label:_.listLabel,typeIcons:t,groupCount:_.groupCount,groupLabel:_.groupLabel,onHover:T,onPick:re}),!K&&"some"===B&&X&&/* @__PURE__ */x("div",{role:"status",className:"px-4 py-2 text-xs text-amber-600",children:_.partialFailure}),!K&&!X&&0===G.length&&/* @__PURE__ */x("div",{className:"px-4 py-6 text-center text-sm text-gray-400",children:_.minChars(2)})]}),
|
|
18
18
|
/* @__PURE__ */w("div",{className:"flex items-center justify-between px-4 py-2 border-t border-gray-100 bg-gray-50 text-2xs text-gray-400",children:[
|
|
19
19
|
/* @__PURE__ */w("div",{className:"flex items-center gap-3",children:[
|
|
20
20
|
/* @__PURE__ */w("span",{className:"flex items-center gap-1",children:[
|
|
@@ -24,4 +24,4 @@ return w("div",{id:J(r,n),role:"option","aria-selected":s,className:"flex items-
|
|
|
24
24
|
/* @__PURE__ */x("kbd",{className:"rounded border border-gray-300 px-1 py-0.5 font-medium",children:_.enterKey}),` ${_.open}`]}),V.length>1&&/* @__PURE__ */w("span",{className:"flex items-center gap-1",children:[
|
|
25
25
|
/* @__PURE__ */x("kbd",{className:"rounded border border-gray-300 px-1 py-0.5 font-medium",children:_.tabKey}),` ${_.nextGroup}`]})]}),
|
|
26
26
|
/* @__PURE__ */w("span",{className:"flex items-center gap-1",children:[
|
|
27
|
-
/* @__PURE__ */x("kbd",{className:"rounded border border-gray-300 px-1 py-0.5 font-medium",children:_.escKey}),` ${_.close}`]})]})]})]}),document.body):null}export{
|
|
27
|
+
/* @__PURE__ */x("kbd",{className:"rounded border border-gray-300 px-1 py-0.5 font-medium",children:_.escKey}),` ${_.close}`]})]})]})]}),document.body):null}export{E as BrandMark,ne as GlobalSearch,L as IconButton_default,R as PAGE_RESULT_ENTITY,P as favoritesToResults,B as navPagesProvider,re as openGlobalSearch,K as parsePageResultTarget,S as partitionNav,V as pushRecent,C as resolveBrandMarkTreatment,M as rowsContainRoute,G as sanitizeRecent,T as visibleNavChildren,j as visibleSectionItems};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{Modal as e}from"./chunk-
|
|
1
|
+
import{Modal as e}from"./chunk-REZ2UWJT.js";import{keepsNativeMenu as a}from"./chunk-GNW45MGV.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,3 +1,3 @@
|
|
|
1
|
-
import{useShellStrings as e}from"./chunk-
|
|
1
|
+
import{useShellStrings as e}from"./chunk-2PNYIWIN.js";import{Icon as t}from"./chunk-B427NVDP.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:e,className:r="w-4 h-4"}){/* @__PURE__ */
|
|
2
2
|
return n(t,e?{name:"check",className:`${r} text-green-600`,"aria-hidden":"true"}:{name:"copy",className:r,"aria-hidden":"true"})}function m({text:t}){const{copied:r,copy:o}=a(t),c=e().copy;/* @__PURE__ */
|
|
3
3
|
return n("button",{onClick:o,title:r?c.copiedValue:c.copyValue(t),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,9 +1,9 @@
|
|
|
1
|
-
import{useCopyText as e,CopyGlyph as t}from"./chunk-
|
|
1
|
+
import{useCopyText as e,CopyGlyph as t}from"./chunk-H3ODY2XB.js";import{PopupMenu as n,PopupMenuItem as r,PopupMenuDivider as l}from"./chunk-GNW45MGV.js";import{useShellStrings as i}from"./chunk-2PNYIWIN.js";import{Icon as a}from"./chunk-B427NVDP.js";import{useState as o,useEffect as s,Fragment as c}from"react";import{jsxs as d,jsx as m,Fragment as u}from"react/jsx-runtime";var y="outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-blue-500";function p(){/* @__PURE__ */
|
|
2
2
|
return m(a,{name:"close",look:"mini","aria-hidden":"true",className:"size-3.5"})}function h({text:n,label:r,copiedLabel:l}){const{copied:i,copy:a}=e(n);/* @__PURE__ */
|
|
3
|
-
return m("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__ */m(t,{copied:i,className:"size-3.5"})})}function b({tabs:e,activeKey:t,idFor:a,panelMounted:b,onActivate:f,onClose:g,onCloseMany:x,label:k,className:v,activeClassName:N,end:w,onIconMenu:C,menuItems:j}){const I=i().pageTabs,[$,z]=o(null),D=e.length;s(()=>{if(!t)return;const e=document.getElementById(a(t,"tab"));e?.scrollIntoView?.({block:"nearest",inline:"nearest"})},[a,t,D]);const M=e.some(e=>e.key===t)?t:e[0]?.key,
|
|
3
|
+
return m("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__ */m(t,{copied:i,className:"size-3.5"})})}function b({tabs:e,activeKey:t,idFor:a,panelMounted:b,onActivate:f,onClose:g,onCloseMany:x,label:k,className:v,activeClassName:N,end:w,onIconMenu:C,menuItems:j}){const I=i().pageTabs,[$,z]=o(null),D=e.length;s(()=>{if(!t)return;const e=document.getElementById(a(t,"tab"));e?.scrollIntoView?.({block:"nearest",inline:"nearest"})},[a,t,D]);const M=e.some(e=>e.key===t)?t:e[0]?.key,B=t=>{const n=e[(t+e.length)%e.length];n&&document.getElementById(a(n.key,"tab"))?.focus()},_=$?e.find(e=>e.key===$.key):void 0,A=_&&j?j(_.key):[],E=_?e.indexOf(_):-1,L=e=>e.some(e=>!e.pinned),O=e=>()=>{z(null),e()};/* @__PURE__ */
|
|
4
4
|
return d("div",{className:v??"relative flex h-10 shrink-0 items-end gap-3 bg-gray-100 px-3",children:[
|
|
5
5
|
/* @__PURE__ */m("div",{"aria-hidden":"true",className:"pointer-events-none absolute inset-x-0 bottom-0 h-px bg-gray-200"}),
|
|
6
|
-
/* @__PURE__ */m("div",{role:"tablist","aria-label":k,onKeyDown:t=>{const n=e.findIndex(e=>document.getElementById(a(e.key,"tab"))===t.target);if(!(n<0)){if("ArrowRight"===t.key)
|
|
6
|
+
/* @__PURE__ */m("div",{role:"tablist","aria-label":k,onKeyDown:t=>{const n=e.findIndex(e=>document.getElementById(a(e.key,"tab"))===t.target);if(!(n<0)){if("ArrowRight"===t.key)B(n+1);else if("ArrowLeft"===t.key)B(n-1);else if("Home"===t.key)B(0);else if("End"===t.key)B(e.length-1);else{if("Delete"!==t.key||e[n].pinned)return;g(e[n].key)}t.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((n,r)=>{const l=n.key===t,i=!!n.dirty,o=n.icon,s=l?N??"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",u=r>0&&!l&&e[r-1].key!==t,x={type:"button",role:"tab",id:a(n.key,"tab"),"aria-selected":l,"aria-controls":b?.(n.key)?a(n.key,"panel"):void 0,tabIndex:n.key===M?0:-1,title:n.title,onClick:()=>f(n.key)},k={onContextMenu:e=>((e,t)=>{e.preventDefault(),z({x:e.clientX,y:e.clientY,key:t.key})})(e,n),onAuxClick:e=>((e,t)=>{1!==e.button||t.pinned||(e.preventDefault(),g(t.key))})(e,n),onMouseDown:e=>{1===e.button&&e.preventDefault()}},v=o&&
|
|
7
7
|
/* @__PURE__ */d("span",{className:"relative flex size-4 shrink-0 items-center justify-center text-gray-500 [&>svg]:size-4","aria-hidden":"true",children:[o,i&&!l&&!n.pinned&&
|
|
8
8
|
/* @__PURE__ */m("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"})]}),w=l&&!!C&&!!o;return n.pinned?/* @__PURE__ */m("div",{role:"presentation",className:`group relative flex h-9 flex-none items-center justify-center rounded-t-md border border-b-0 transition-colors ${o?"w-10":""} ${s}`,...k,children:/* @__PURE__ */d("button",{...x,className:`flex h-full items-center justify-center rounded-t-md ${o?"w-full":"px-3"} ${y}`,children:[v,
|
|
9
9
|
/* @__PURE__ */m("span",{className:o?"sr-only":"whitespace-nowrap text-sm",children:n.title})]})},n.key):/* @__PURE__ */d(c,{children:[u&&/* @__PURE__ */m("span",{"aria-hidden":"true",className:"mb-3 h-4 w-px shrink-0 self-end border-l border-gray-300"}),
|
|
@@ -12,10 +12,10 @@ return d("div",{className:v??"relative flex h-10 shrink-0 items-end gap-3 bg-gra
|
|
|
12
12
|
/* @__PURE__ */d("button",{...x,className:`flex h-full min-w-0 flex-1 items-center gap-2 rounded-t-md pr-1 text-left ${w?"pl-2":"pl-3"} ${y} ${l?w?"":"@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:[!w&&v,
|
|
13
13
|
/* @__PURE__ */m("span",{className:"min-w-0 flex-1 overflow-hidden whitespace-nowrap [mask-image:linear-gradient(to_right,#000_calc(100%-1rem),transparent)] "+(o?l?"@max-[5rem]:sr-only":"@max-[4.5rem]:sr-only":""),children:n.title})]}),l&&n.copy&&/* @__PURE__ */m(h,{text:n.copy,label:I.copy(n.copy),copiedLabel:I.copied}),
|
|
14
14
|
/* @__PURE__ */d("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:[i&&/* @__PURE__ */m("span",{role:"img","aria-label":I.unsaved,className:"size-2 rounded-full bg-gray-500 group-hover:hidden"}),
|
|
15
|
-
/* @__PURE__ */m("button",{type:"button",tabIndex:-1,"aria-label":I.closeTab?.(n.title)??`${I.close} ${n.title}`,onClick:()=>g(n.key),className:"size-5 items-center justify-center rounded text-gray-400 hover:bg-gray-200 hover:text-gray-700 "+(i?"hidden group-hover:flex":l?"flex":"flex opacity-0 group-hover:opacity-100 focus-visible:opacity-100"),children:/* @__PURE__ */m(p,{})})]})]})]},n.key)})}),w&&/* @__PURE__ */m("div",{className:"flex shrink-0 items-center gap-2 self-center",children:w}),$&&_&&/* @__PURE__ */d(n,{portal:!0,style:{left:$.x,top:$.y},onClose:()=>z(null),children:[A.length>0&&/* @__PURE__ */d(u,{children:[A.map((e,t)=>/* @__PURE__ */d(r,{onClick:
|
|
15
|
+
/* @__PURE__ */m("button",{type:"button",tabIndex:-1,"aria-label":I.closeTab?.(n.title)??`${I.close} ${n.title}`,onClick:()=>g(n.key),className:"size-5 items-center justify-center rounded text-gray-400 hover:bg-gray-200 hover:text-gray-700 "+(i?"hidden group-hover:flex":l?"flex":"flex opacity-0 group-hover:opacity-100 focus-visible:opacity-100"),children:/* @__PURE__ */m(p,{})})]})]})]},n.key)})}),w&&/* @__PURE__ */m("div",{className:"flex shrink-0 items-center gap-2 self-center",children:w}),$&&_&&/* @__PURE__ */d(n,{portal:!0,style:{left:$.x,top:$.y},onClose:()=>z(null),children:[A.length>0&&/* @__PURE__ */d(u,{children:[A.map((e,t)=>/* @__PURE__ */d(r,{onClick:O(e.onSelect),children:[e.icon,e.label]},t)),
|
|
16
16
|
/* @__PURE__ */m(l,{})]}),
|
|
17
|
-
/* @__PURE__ */m(r,{disabled:_.pinned,onClick:
|
|
17
|
+
/* @__PURE__ */m(r,{disabled:_.pinned,onClick:O(()=>g(_.key)),children:I.close}),
|
|
18
18
|
/* @__PURE__ */m(l,{}),
|
|
19
|
-
/* @__PURE__ */m(r,{disabled:!L(e.filter(e=>e.key!==_.key)),onClick:
|
|
20
|
-
/* @__PURE__ */m(r,{disabled:!L(e.slice(
|
|
21
|
-
/* @__PURE__ */m(r,{disabled:!L(e),onClick:
|
|
19
|
+
/* @__PURE__ */m(r,{disabled:!L(e.filter(e=>e.key!==_.key)),onClick:O(()=>x("others",_.key)),children:I.closeOthers}),
|
|
20
|
+
/* @__PURE__ */m(r,{disabled:!L(e.slice(E+1)),onClick:O(()=>x("right",_.key)),children:I.closeRight}),
|
|
21
|
+
/* @__PURE__ */m(r,{disabled:!L(e),onClick:O(()=>x("all",null)),children:I.closeAll})]})]})}export{b as TabStrip};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{client_default as a}from"./chunk-
|
|
1
|
+
import{client_default as a}from"./chunk-REZ2UWJT.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};
|