efficient-shell 7.21.1 → 7.23.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 +47 -0
- package/dist/{Browser-XPRHVZJS.js → Browser-GSPJTRX3.js} +15 -15
- package/dist/Calculator-S4SULQZG.js +29 -0
- package/dist/ConfirmDialog-TGAPFTMU.js +1 -0
- package/dist/CurrencyConverter-6A5U4LH3.js +21 -0
- package/dist/Documents-LUEBMB23.js +52 -0
- package/dist/Files-SPFE23UK.js +87 -0
- package/dist/Notepad-D3QV7R6T.js +25 -0
- package/dist/PdfViewer-2OHHAS7B.js +1 -0
- package/dist/PomodoroTimer-F7BGUOY2.js +91 -0
- package/dist/Preview-5JLBKQWH.js +179 -0
- package/dist/Sidebar-PU6MUQEQ.js +44 -0
- package/dist/Spreadsheet-3F5P5SC2.js +37 -0
- package/dist/{Stock-44LXLO2A.js → Stock-EC62JSPA.js} +2 -2
- package/dist/Weather-VHHULAGC.js +60 -0
- package/dist/WorldClock-AM54TQZB.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-43KURNHH.js +1 -0
- package/dist/{chunk-2QC3VXCS.js → chunk-6CC3IJ7Y.js} +1 -1
- package/dist/{chunk-M4TRVJTO.js → chunk-75BDNIYU.js} +1 -1
- package/dist/{chunk-GIWC2ZTG.js → chunk-AW7GP54G.js} +4 -4
- package/dist/{chunk-ZGUQLVY4.js → chunk-B427NVDP.js} +28 -12
- package/dist/chunk-BSCGC2HA.js +1 -0
- package/dist/{chunk-JQRIAZDP.js → chunk-CZZYMC7P.js} +17 -17
- package/dist/{chunk-2GJNH4XW.js → chunk-D5CGXUQK.js} +51 -51
- package/dist/{chunk-RN3NG35J.js → chunk-E64SHLPT.js} +1 -1
- package/dist/{chunk-ITCBLL72.js → chunk-EEXHZUG5.js} +2 -2
- package/dist/{chunk-RUHUTZN4.js → chunk-G6LV5Z2W.js} +1 -1
- package/dist/{chunk-IQDY2YFN.js → chunk-GNW45MGV.js} +10 -10
- package/dist/{chunk-RBKIYZ7H.js → chunk-ISEM2MNY.js} +1 -1
- package/dist/{chunk-BVYOUFSW.js → chunk-ISN4DJJ7.js} +8 -8
- package/dist/{chunk-SCJT2XXU.js → chunk-JI2JL7ZQ.js} +1 -1
- package/dist/chunk-K7PQXJO7.js +1 -0
- package/dist/chunk-MMHI7WBL.js +24 -0
- package/dist/{chunk-GNCH3JEH.js → chunk-MUDY7BV4.js} +7 -7
- package/dist/{chunk-7HLTPMQV.js → chunk-MZHH3MC7.js} +1 -1
- package/dist/{chunk-XM2IIPJO.js → chunk-NKMK6WRI.js} +1 -1
- package/dist/chunk-NVFKXL52.js +2 -0
- package/dist/chunk-ODGCVNYP.js +10 -0
- package/dist/{chunk-JUISSKJW.js → chunk-R3IJQGAB.js} +1 -1
- package/dist/{chunk-VOFDPOB6.js → chunk-RVPQRXC4.js} +1 -1
- package/dist/{chunk-IJ7RXIWX.js → chunk-SZTKBF3D.js} +8 -8
- package/dist/{chunk-KBOYLXAT.js → chunk-TTUVL25O.js} +1 -1
- package/dist/{chunk-76VCH7N6.js → chunk-U5H3Q5JM.js} +19 -19
- package/dist/{chunk-Z2TTHY7G.js → chunk-UQOFRZMX.js} +1 -1
- package/dist/chunk-VKCLCFEE.js +1034 -0
- package/dist/{chunk-B4PGVDB6.js → chunk-W77WLTTH.js} +1 -1
- package/dist/{chunk-XN7CAWSZ.js → chunk-Y6UUDJNU.js} +2 -2
- package/dist/chunk-YJRAJD27.js +27 -0
- package/dist/file-intake/index.js +1 -1
- package/dist/i18n/index.d.ts +1 -1
- package/dist/icons/efficient-looks.js +189 -177
- package/dist/icons/efficient.d.ts +16 -1
- package/dist/icons/efficient.js +92 -86
- package/dist/icons/index.d.ts +1 -1
- package/dist/icons/index.js +1 -1
- package/dist/{index-DbNqOkOy.d.ts → index-91i1XDHz.d.ts} +82 -8
- package/dist/index.d.ts +3 -3
- package/dist/index.js +631 -631
- 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-BQtq9300.d.ts → strings-D9AIYTbE.d.ts} +28 -2
- package/dist/telemetry/index.js +1 -1
- package/dist/themes.css +20 -20
- package/dist/ui/index.d.ts +2 -2
- package/dist/ui/index.js +1 -1
- package/dist/ui.css +122 -7
- package/package.json +1 -1
- package/dist/Calculator-BLKI5RDH.js +0 -29
- package/dist/ConfirmDialog-AVFQGXKL.js +0 -1
- package/dist/CurrencyConverter-MELIA5ZN.js +0 -21
- package/dist/Documents-BC5M2PBJ.js +0 -52
- package/dist/Files-AOQNEOZ7.js +0 -87
- package/dist/Notepad-DWVT66EF.js +0 -25
- package/dist/PdfViewer-PHABUM7K.js +0 -1
- package/dist/PomodoroTimer-RHJHTLSU.js +0 -91
- package/dist/Preview-7LYC662F.js +0 -182
- package/dist/Sidebar-PYURV2S2.js +0 -44
- package/dist/Spreadsheet-PDA4JIJ6.js +0 -37
- package/dist/Weather-TCGDUHYK.js +0 -60
- package/dist/WorldClock-GIRESICQ.js +0 -32
- package/dist/chunk-BQ7GR7H6.js +0 -27
- package/dist/chunk-FTJ2G343.js +0 -24
- package/dist/chunk-G3WYQP4R.js +0 -1027
- package/dist/chunk-IDJPDSA3.js +0 -1
- package/dist/chunk-JTNKC4CR.js +0 -1
- package/dist/chunk-QRCDQPJA.js +0 -1
- package/dist/chunk-ZRU5F2XT.js +0 -11
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import{AVAILABLE_CITIES as e,fetchCityWeather as t,getCondition as r,toFahrenheit as a}from"./chunk-FBDZGO3V.js";import{loadAppearance as n,WidgetSettingsModal as s}from"./chunk-JUISSKJW.js";import{useWidgetSettings as i}from"./chunk-2GJNH4XW.js";import"./chunk-DSSLOQDW.js";import"./chunk-SCJT2XXU.js";import{useShellPrefs as c}from"./chunk-ZRU5F2XT.js";import"./chunk-5A7MWTXX.js";import"./chunk-76VCH7N6.js";import"./chunk-IQDY2YFN.js";import"./chunk-UVBK6YSR.js";import"./chunk-IJ7RXIWX.js";import"./chunk-JTNKC4CR.js";import"./chunk-7IQ3B77H.js";import"./chunk-FIEA5CGB.js";import"./chunk-D65T4H6J.js";import"./chunk-KNUR2UEG.js";import"./chunk-QRCDQPJA.js";import"./chunk-C3QOHMR6.js";import"./chunk-ZGUQLVY4.js";import{useState as l,useEffect as o,useCallback as m}from"react";import{jsxs as h,Fragment as d,jsx as p}from"react/jsx-runtime";var u="world_clock_appearance",g=["London","Shanghai","New York"];function x(){const{prefs:x,save:y}=c(),[b,f]=l(()=>n(u)),[k,N]=l(!1),[v,j]=l([]),[w,C]=l(b),F={useFahrenheit:!!x.weather_prefs?.useFahrenheit},[S,D]=l(F),[I,U]=l(()=>/* @__PURE__ */new Date);o(()=>{const e=setInterval(()=>U(/* @__PURE__ */new Date),3e4);return()=>clearInterval(e)},[]);const J=Object.fromEntries(Object.entries(e).map(([e,t])=>[t.tz,e])),T=x.world_clocks,O=(()=>{if(!Array.isArray(T)||0===T.length)return g;const t=[];for(const r of T){const a=e[r]?r:J[r];a&&!t.includes(a)&&t.push(a)}return t.length?t:g})(),[X,Q]=l({}),[R,W]=l(!0);o(()=>{let e=!1;return W(!0),(async()=>{const r={};await Promise.all(O.map(async e=>{const a=await t(e);a&&(r[e]=a)})),e||(Q(r),W(!1))})(),()=>{e=!0}},[O.join(",")]),i(m(()=>{j([...O]),C({...b}),D({...F}),N(!0)},[O.join(","),b,F.useFahrenheit]));const _=e=>F.useFahrenheit?`${a(e)}°`:`${e}°`;/* @__PURE__ */
|
|
2
|
-
return h(d,{children:[
|
|
3
|
-
/* @__PURE__ */p("div",{style:{backgroundColor:`rgb(var(--taskbar-bg-rgb, 243 244 246) / ${b.activeOpacity/100})`,backdropFilter:b.activeBlur>0?`blur(${b.activeBlur}px)`:void 0},children:/* @__PURE__ */h("div",{className:"divide-y divide-gray-200",children:[R&&O.every(e=>!X[e])&&/* @__PURE__ */p("div",{className:"px-3 py-6 text-center text-xs text-gray-500",children:"Loading…"}),O.map(t=>{const a=X[t],n=e[t]?.tz??"UTC",{time:s,ampm:i}=function(e,t){try{const r=new Intl.DateTimeFormat("en-US",{timeZone:e,hour:"numeric",minute:"2-digit",hour12:!0}).formatToParts(t),a=r.find(e=>"hour"===e.type)?.value||"12";return{time:`${a}:${r.find(e=>"minute"===e.type)?.value||"00"}`,ampm:(r.find(e=>"dayPeriod"===e.type)?.value||"").toUpperCase()}}catch{return{time:"",ampm:""}}}(n,I);if(!a)/* @__PURE__ */
|
|
4
|
-
return h("div",{className:"px-4 py-3",children:[
|
|
5
|
-
/* @__PURE__ */h("div",{className:"flex items-baseline justify-between gap-2",children:[
|
|
6
|
-
/* @__PURE__ */p("span",{className:"text-base font-semibold tracking-tight text-gray-900 truncate",children:t}),
|
|
7
|
-
/* @__PURE__ */h("span",{className:"tabular-nums text-sm font-medium text-gray-500",children:[s,
|
|
8
|
-
/* @__PURE__ */p("span",{className:"text-3xs ml-0.5 opacity-70",children:i})]})]}),
|
|
9
|
-
/* @__PURE__ */p("div",{className:"text-2xs text-gray-400 mt-1",children:"Loading weather…"})]},t);const[c,l]=r(a.code,a.isDay);/* @__PURE__ */
|
|
10
|
-
return h("div",{className:"px-4 py-3",children:[
|
|
11
|
-
/* @__PURE__ */h("div",{className:"flex items-baseline justify-between gap-2",children:[
|
|
12
|
-
/* @__PURE__ */p("span",{className:"text-base font-semibold tracking-tight text-gray-900 truncate",children:t}),
|
|
13
|
-
/* @__PURE__ */p("span",{className:"text-2xl font-extralight leading-none tabular-nums tracking-tight text-gray-900 shrink-0",children:_(a.temp)})]}),
|
|
14
|
-
/* @__PURE__ */h("div",{className:"flex items-center justify-between gap-2 mt-2 text-2xs",children:[
|
|
15
|
-
/* @__PURE__ */h("div",{className:"flex items-center gap-2 min-w-0 text-gray-500",children:[
|
|
16
|
-
/* @__PURE__ */p("span",{className:"text-base leading-none shrink-0",children:l}),
|
|
17
|
-
/* @__PURE__ */h("span",{className:"tabular-nums font-semibold text-gray-700 shrink-0",children:[s,
|
|
18
|
-
/* @__PURE__ */p("span",{className:"text-3xs font-medium ml-0.5 opacity-70",children:i})]}),
|
|
19
|
-
/* @__PURE__ */p("span",{className:"text-gray-300 shrink-0",children:"·"}),
|
|
20
|
-
/* @__PURE__ */p("span",{className:"truncate",children:c})]}),
|
|
21
|
-
/* @__PURE__ */h("span",{className:"tabular-nums text-gray-500 shrink-0",children:["H:",_(a.high)," L:",_(a.low)]})]})]},t)})]})}),
|
|
22
|
-
/* @__PURE__ */h(s,{open:k,onClose:()=>N(!1),title:"World Clock Settings",appearance:w,onAppearanceChange:C,onSave:()=>{0!==v.length&&(y({world_clocks:v,weather_prefs:{...x.weather_prefs??{},useFahrenheit:S.useFahrenheit}}),f(w),localStorage.setItem(u,JSON.stringify(w)),N(!1))},children:[
|
|
23
|
-
/* @__PURE__ */h("div",{children:[
|
|
24
|
-
/* @__PURE__ */p("h3",{className:"text-sm font-semibold text-gray-700 mb-2",children:"Display"}),
|
|
25
|
-
/* @__PURE__ */h("div",{className:"flex items-center gap-3 mb-2",children:[
|
|
26
|
-
/* @__PURE__ */p("span",{className:"text-sm text-gray-600 w-24",children:"Temperature"}),
|
|
27
|
-
/* @__PURE__ */p("div",{className:"flex gap-1",children:[{key:!1,label:"°C"},{key:!0,label:"°F"}].map(e=>/* @__PURE__ */p("button",{onClick:()=>D(t=>({...t,useFahrenheit:e.key})),className:"px-3 py-1 text-xs font-medium rounded-lg border transition-colors "+(S.useFahrenheit===e.key?"bg-blue-600 text-white border-blue-600":"bg-white text-gray-700 border-gray-300 hover:bg-gray-50"),children:e.label},String(e.key)))})]}),
|
|
28
|
-
/* @__PURE__ */p("p",{className:"text-2xs text-gray-400 mt-1",children:"Shared with the Weather widget."})]}),
|
|
29
|
-
/* @__PURE__ */h("div",{children:[
|
|
30
|
-
/* @__PURE__ */p("h3",{className:"text-sm font-semibold text-gray-700 mb-2",children:"Cities"}),
|
|
31
|
-
/* @__PURE__ */p("div",{className:"grid grid-cols-2 gap-1 max-h-56 overflow-y-auto",children:Object.keys(e).map(e=>/* @__PURE__ */h("label",{className:"flex items-center gap-2 text-sm py-1 cursor-pointer hover:bg-gray-50 rounded px-2",children:[
|
|
32
|
-
/* @__PURE__ */p("input",{type:"checkbox",checked:v.includes(e),onChange:()=>j(t=>t.includes(e)?t.filter(t=>t!==e):[...t,e]),className:"rounded border-gray-300 text-blue-600 focus:ring-blue-500 h-3.5 w-3.5"}),e]},e))})]})]})]})}export{x as default};
|
package/dist/chunk-BQ7GR7H6.js
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import{navVisible as e,isReachable as t,visibleChildren as n,isSection as r}from"./chunk-5A7MWTXX.js";import{useDismissPopupsOnOpen as a}from"./chunk-UVBK6YSR.js";import{glassStyle as l}from"./chunk-7IQ3B77H.js";import{Z_LAYERS as o}from"./chunk-FIEA5CGB.js";import{useShellStrings as s}from"./chunk-QRCDQPJA.js";import{useState as i,useEffect as c,useRef as d,useMemo as u,useId as p,useCallback as y}from"react";import{jsx as f,jsxs as m}from"react/jsx-runtime";import{createPortal as h}from"react-dom";var b={favicon:"h-8 w-8",compact:"h-10 w-10",wordmark:"h-10 w-40"};function g(e){return e.trim().charAt(0).toLocaleUpperCase()||"·"}function k(e,t,n){return!1===e?"framed":null==e||null==t?"plate-light":t?"light"===n?"plate-dark":"bare":"dark"===n?"plate-light":"bare"}var x={"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 v(e,t,n){return"bare"===e?{}:"framed"===e?{borderRadius:t}:{borderRadius:t,padding:n}}function w({src:e,fallbackSrc:t,fallbackHasAlpha:n=null,fallbackIsLight:r=null,fallbackAdaptive:a,alt:l,slot:o="compact",surface:s="light",size:d,width:u,height:p,decorative:y=!1,fallbackMode:m="monogram",adaptive:h=!1,hasAlpha:w=null,isLight:N=null,treatmentPadding:_=4,treatmentRadius:L=8,className:A="",style:C}){const[$,E]=i(e||t||"");c(()=>{E(e||t||"")},[e,t]);const I=Boolean(t&&$===t&&$!==e),T=(I?a??h:h)?k(I?n:w,I?r:N,s):"bare",j=["inline-flex shrink-0 items-center justify-center overflow-hidden",null==d&&null==u&&null==p?b[o]:"","dark"===s?"text-white":"text-gray-700",x[T],A].filter(Boolean).join(" "),S={...v(T,L,_),...null==d?{width:u,height:p}:{width:d,height:d},...C};return $?/* @__PURE__ */f("span",{className:j,"data-brand-treatment":T,style:S,children:/* @__PURE__ */f("img",{src:$,alt:y?"":l,"data-brand-slot":o,className:"block max-h-full max-w-full",style:{objectFit:"contain"},onError:()=>E(e=>t&&e!==t?t:"")})}):"none"===m?null:/* @__PURE__ */f("span",{"data-brand-fallback":!0,"data-brand-slot":o,"aria-label":y?void 0:l,"aria-hidden":y||void 0,role:y?void 0:"img",className:`${j} rounded-md bg-gray-100 font-semibold`,style:S,children:y?null:g(l)})}function N(n,r){return e(n,r)?n.items.filter(n=>e(n,r)&&t(n,r)):[]}function _(e,r){return n(e,r).filter(e=>t(e,r))}function L(n,a,l){const o=new Set(a.erp),s=new Set(a.system),i=new Set(a.footer??[]),c=n.filter(r),d=e=>c.filter(t=>e.has(t.label)&&N(t,l).length>0);return{topItems:n.filter(e=>!r(e)).filter(n=>e(n,l)&&t(n,l)),erpSections:d(o),systemSections:d(s),virtualSections:(a.virtual??[]).filter(e=>e.items.length>0),footerSections:d(i),footerItems:(a.footerItems??[]).filter(n=>e(n,l)&&t(n,l))}}function A(e,t,n){return!!t&&e.some(e=>e.to===t||A(_(e,n),t,n))}var C="__page__";function $(e){const t=e.indexOf("?");if(t<0)return{path:e,search:""};const n=new URLSearchParams(e.slice(t+1));return{path:e.slice(0,t),search:n.get("search")??""}}function E(e,t,n){const r=function(e,t){const n=[],r=e=>{const a=_(e,t);0===a.length?n.push(e):a.forEach(r)};e.topItems.forEach(r);for(const n of[...e.erpSections,...e.systemSections,...e.footerSections])N(n,t).forEach(r);for(const t of e.virtualSections)t.items.forEach(r);return e.footerItems.forEach(r),n}(e,t);return Object.assign(async e=>{const t=e.trim().toLowerCase();if(!t)return[];const a=/* @__PURE__ */new Set,l=[];for(const e of r){const r=e.menuLabel??e.label;a.has(e.to)||!e.label.toLowerCase().includes(t)&&!r.toLowerCase().includes(t)||(a.add(e.to),l.push({type:n,label:e.label,entity_type:C,entity_id:e.to}))}return l.slice(0,8)},{destinations:r})}function I(e,t){if(!Array.isArray(e))return[];const n=[];for(const r of e){if(!r||"string"!=typeof r.entityType||"string"!=typeof r.entityId||"string"!=typeof r.label)continue;if("preview-file"===r.entityType)continue;const e="page"===r.entityType;n.push({type:e?t:"",label:r.label,entity_type:e?C:r.entityType,entity_id:r.entityId})}return n}var T="M21 21l-5.197-5.197m0 0A7.5 7.5 0 105.196 5.196a7.5 7.5 0 0010.607 10.607z";function j(e){return e.typeKey??e.type}function S(e,t){return t?.[j(e)]??e.type}function M(e,t,n){return 0===n.length?null:{key:e,title:t,rows:n.map((e,t)=>({kind:"action",key:`action:${t}:${e.label}`,label:e.label,icon:e.icon,action:e})),count:n.length}}function R(e,t,n,r){return{type:e,label:t,entity_type:C,entity_id:`${n}?search=${encodeURIComponent(r.trim())}`}}function K(e,t,n,r,a){const l=function(e){const t=/* @__PURE__ */new Map;for(const n of e){const e=j(n),r=t.get(e);r?r.results.push(n):t.set(e,{type:n.type,results:[n]})}return Array.from(t,([e,t])=>({key:e,...t}))}(e).map(e=>{const t=e.results.map((t,n)=>({kind:"result",key:`result:${e.key}:${t.entity_type}:${t.entity_id}:${n}`,label:t.label,sub:t.sub,result:t})),r=!!a?.truncatedTypes?.includes(e.key),l=r?a?.listRoutes?.[e.key]:void 0,o=a?.typeLabels?.[e.key]??e.type;if(a&&l){const r=a.seeAllLabel(l.label);t.push({kind:"seeAll",key:`seeall:${e.key}`,label:r,result:R(o,r,l.path,n)})}return{key:`type:${e.key}`,title:o,rows:t,count:e.results.length,truncated:r}}),o=M("actions",r,function(e,t){const n=t.trim().toLowerCase();return e&&n?e.filter(e=>e.label.toLowerCase().includes(n)||(e.keywords??[]).some(e=>e.toLowerCase().includes(n))):[]}(t,n));return o?[...l,o]:l}function D(e,t,n){return 0===n?0:Math.min(Math.max(e+t,0),n-1)}var B=(e,t)=>e.entity_type===t.entity_type&&e.entity_id===t.entity_id;function P(e,t,n=8){return[t,...e.filter(e=>!B(e,t))].slice(0,n)}function z(e){if(!Array.isArray(e))return[];const t=[];for(const n of e){if(!n||"object"!=typeof n)continue;const e=n;if("string"!=typeof e.type||"string"!=typeof e.label||"string"!=typeof e.entity_type||"string"!=typeof e.entity_id)continue;const r={type:e.type,label:e.label,entity_type:e.entity_type,entity_id:e.entity_id};"string"==typeof e.sub&&(r.sub=e.sub),"string"==typeof e.typeKey&&(r.typeKey=e.typeKey),t.some(e=>B(e,r))||t.push(r)}return t.slice(0,8)}function H(e){if(Array.isArray(e))return{results:e,truncatedTypes:[]};if(e&&"object"==typeof e&&Array.isArray(e.results)){const{results:t,truncatedTypes:n}=e;return{results:t,truncatedTypes:Array.isArray(n)?n:[]}}return{results:[],truncatedTypes:[]}}var U=[];function F(e,t,n){const[r,a]=i([]),[l,o]=i(U),[s,u]=i(!1),[p,f]=i("none"),m=d(function(){let e=0,t=null;const n=()=>{e+=1,t?.abort(),t=null};return{begin:()=>{n();const r=e,a=new AbortController;return t=a,{signal:a.signal,isCurrent:()=>r===e}},cancel:n}}());c(()=>{const r=m.current;if(e.length<n||!t||0===t.length)return r.cancel(),a(e=>0===e.length?e:[]),o(U),f("none"),void u(!1);u(!0);const l=setTimeout(async()=>{const n=r.begin(),l=await async function(e,t,n){const r=await Promise.all(e.map(async e=>{try{return{failed:!1,...H(await e(t,{signal:n}))}}catch(e){const t=n.aborted||function(e){if(!e||"object"!=typeof e)return!1;const{name:t,code:n}=e;return"AbortError"===t||"CanceledError"===t||"ERR_CANCELED"===n}(e);return{failed:!t,results:[],truncatedTypes:[]}}}));return{results:r.flatMap(e=>e.results),truncatedTypes:Array.from(new Set(r.flatMap(e=>e.truncatedTypes))),failed:r.filter(e=>e.failed).length}}(t,e,n.signal);n.isCurrent()&&(a(l.results),o(l.truncatedTypes),f(0===l.failed?"none":l.failed>=t.length?"all":"some"),u(!1))},250);return()=>{clearTimeout(l),r.cancel()}},[e,t,n]);return{results:r,truncatedTypes:l,loading:s,failure:p,reset:y(()=>{m.current.cancel(),a(e=>0===e.length?e:[]),o(U),f("none"),u(!1)},[])}}var Q=(e,t)=>`${e}-opt-${t}`;function W(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??T;if(e.icon)return e.icon;const n=t?.[j(e.result)];return n||T}function G({sections:e,activeIdx:t,listId:n,label:r,typeIcons:a,groupCount:l,groupLabel:o,onHover:s,onPick:i}){let c=0;/* @__PURE__ */
|
|
2
|
-
return f("div",{id:n,role:"listbox","aria-label":r,className:"py-1",children:e.map(e=>/* @__PURE__ */m("div",{role:"group","aria-label":o(e.title,e.count,!!e.truncated),children:[
|
|
3
|
-
/* @__PURE__ */m("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
|
-
/* @__PURE__ */f("span",{children:e.title}),
|
|
5
|
-
/* @__PURE__ */f("span",{className:"font-medium normal-case tracking-normal",children:l(e.count,!!e.truncated)})]}),e.rows.map(e=>{const r=c++,l=r===t,o="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
|
-
return m("div",{id:Q(n,r),role:"option","aria-selected":l,className:"flex items-center gap-3 w-full px-4 py-3 text-left cursor-pointer transition-colors "+(l?"bg-blue-50":"hover:bg-gray-50"),onMouseDown:e=>e.preventDefault(),onClick:()=>i(e),onMouseEnter:()=>s(r),children:[
|
|
7
|
-
/* @__PURE__ */f("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__ */f("path",{strokeLinecap:"round",strokeLinejoin:"round",d:W(e,a)})}),
|
|
8
|
-
/* @__PURE__ */m("div",{className:"flex-1 min-w-0",children:[
|
|
9
|
-
/* @__PURE__ */f("p",{className:"text-sm font-medium truncate "+(u?"text-blue-600":"text-gray-900"),children:e.label}),d&&/* @__PURE__ */f("p",{className:"text-xs text-gray-400 truncate",children:d})]}),o&&/* @__PURE__ */f("span",{className:"shrink-0 rounded-full bg-gray-100 px-2 py-0.5 text-3xs font-medium text-gray-500",children:o})]},e.key)})]},e.key))})}var O="react-os-shell:open-global-search";function V(){"undefined"!=typeof window&&window.dispatchEvent(new CustomEvent(O))}function X({providers:e,typeIcons:t,typeLabels:n,listRoutes:r,placeholder:b,quickActions:g,onSelect:k,recent:x,onRecord:v,favorites:w,hotkey:N=!0}={}){const _=s().search,L=b??_.placeholder,[A,C]=i(!1),[$,E]=i(""),[I,j]=i(0),R=d(null),{results:B,truncatedTypes:P,loading:z,failure:H,reset:U}=F($,e,2);c(()=>{const e=e=>{N&&!e.defaultPrevented&&(e.ctrlKey||e.metaKey)&&"k"===e.key&&(e.preventDefault(),C(e=>!e)),"Escape"===e.key&&A&&C(!1)},t=()=>C(!0);return window.addEventListener("keydown",e),window.addEventListener(O,t),()=>{window.removeEventListener("keydown",e),window.removeEventListener(O,t)}},[A,N]),a(A);const[W,V]=i(!1);A!==W&&(V(A),A&&(E(""),j(0),U())),c(()=>{A?setTimeout(()=>R.current?.focus(),50):E("")},[A]),c(()=>{j(0)},[B]);const X=$.length>=2,q=u(()=>X?K(B,g,$,_.actions,{truncatedTypes:P,listRoutes:r,typeLabels:n,seeAllLabel:_.seeAll}):function(e,t){const n=[];e.recent?.length&&n.push({key:"recent",title:t.recent,rows:e.recent.map((t,n)=>({kind:"recent",key:`recent:${t.entity_type}:${t.entity_id}:${n}`,label:t.label,sub:t.sub,badge:S(t,e.typeLabels),result:t})),count:e.recent.length}),e.favorites?.length&&n.push({key:"favorites",title:t.favorites,rows:e.favorites.map((t,n)=>({kind:"favorite",key:`favorite:${t.entity_type}:${t.entity_id}:${n}`,label:t.label,sub:t.sub,badge:S(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 r=M("actions",t.actions,e.actions??[]);return r&&n.push(r),n}({recent:x,favorites:w,actions:g,typeLabels:n},_),[X,B,P,r,n,g,$,x,w,_]),J=u(()=>function(e){return e.flatMap(e=>e.rows)}(q),[q]),Y=Math.min(I,Math.max(J.length-1,0)),Z=p(),ee=J.length>0;c(()=>{A&&0!==J.length&&document.getElementById(Q(Z,Y))?.scrollIntoView?.({block:"nearest"})},[A,Y,J.length,Z]);const te=y(e=>{C(!1),"action"!==e.kind?("result"!==e.kind&&"recent"!==e.kind||v?.(e.result),k?.(e.result)):e.action.onSelect()},[k,v]);return A?h(
|
|
10
|
-
/* @__PURE__ */m("div",{"data-global-search":"",className:"fixed inset-0 flex items-start justify-center pt-[15vh]",style:{zIndex:o.overlay},onClick:()=>C(!1),children:[
|
|
11
|
-
/* @__PURE__ */f("div",{"data-global-search-backdrop":"",className:"absolute inset-0 bg-black/50 backdrop-blur-sm"}),
|
|
12
|
-
/* @__PURE__ */m("div",{className:"relative z-10 w-full max-w-xl rounded-(--radius-popup) overflow-hidden",onClick:e=>e.stopPropagation(),style:l(),children:[
|
|
13
|
-
/* @__PURE__ */m("div",{className:"flex items-center gap-3 px-4 py-3 border-b border-gray-200",children:[
|
|
14
|
-
/* @__PURE__ */f("svg",{className:"h-5 w-5 text-gray-400 shrink-0",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:/* @__PURE__ */f("path",{strokeLinecap:"round",strokeLinejoin:"round",d:T})}),
|
|
15
|
-
/* @__PURE__ */f("input",{ref:R,type:"text",value:$,onChange:e=>{E(e.target.value),j(0)},onKeyDown:e=>{"ArrowDown"===e.key?(e.preventDefault(),j(D(Y,1,J.length))):"ArrowUp"===e.key?(e.preventDefault(),j(D(Y,-1,J.length))):"Tab"===e.key&&J.length>0?(e.preventDefault(),j(function(e,t,n){const r=e.length;if(0===r)return 0;const a=[];let l=0;for(const t of e)a.push(l),l+=t;let o=0;for(let e=0;e<r;e++)t>=a[e]&&(o=e);return a[(o+n+r)%r]}(q.map(e=>e.rows.length),Y,e.shiftKey?-1:1))):"Enter"===e.key&&J[Y]&&te(J[Y])},placeholder:L,role:"combobox","aria-expanded":ee,"aria-controls":ee?Z:void 0,"aria-activedescendant":ee?Q(Z,Y):void 0,"aria-autocomplete":"list",className:"flex-1 text-sm bg-transparent border-0 rosh-focus-ring placeholder-gray-400"}),z&&/* @__PURE__ */f("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
|
-
/* @__PURE__ */f("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__ */m("div",{className:"max-h-[50vh] overflow-y-auto",children:[z&&0===J.length&&/* @__PURE__ */f("div",{className:"px-4 py-6 text-center text-sm text-gray-400",children:_.searching}),!z&&"all"===H&&X&&/* @__PURE__ */f("div",{role:"alert",className:"px-4 py-3 text-center text-sm text-red-600",children:_.searchFailed}),!z&&X&&0===J.length&&"all"!==H&&/* @__PURE__ */f("div",{className:"px-4 py-6 text-center text-sm text-gray-400",children:_.noResults}),ee&&/* @__PURE__ */f(G,{sections:q,activeIdx:Y,listId:Z,label:_.listLabel,typeIcons:t,groupCount:_.groupCount,groupLabel:_.groupLabel,onHover:j,onPick:te}),!z&&"some"===H&&X&&/* @__PURE__ */f("div",{role:"status",className:"px-4 py-2 text-xs text-amber-600",children:_.partialFailure}),!z&&!X&&0===J.length&&/* @__PURE__ */f("div",{className:"px-4 py-6 text-center text-sm text-gray-400",children:_.minChars(2)})]}),
|
|
18
|
-
/* @__PURE__ */m("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
|
-
/* @__PURE__ */m("div",{className:"flex items-center gap-3",children:[
|
|
20
|
-
/* @__PURE__ */m("span",{className:"flex items-center gap-1",children:[
|
|
21
|
-
/* @__PURE__ */f("kbd",{className:"rounded border border-gray-300 px-1 py-0.5 font-medium",children:"↑"}),
|
|
22
|
-
/* @__PURE__ */f("kbd",{className:"rounded border border-gray-300 px-1 py-0.5 font-medium",children:"↓"}),` ${_.navigate}`]}),
|
|
23
|
-
/* @__PURE__ */m("span",{className:"flex items-center gap-1",children:[
|
|
24
|
-
/* @__PURE__ */f("kbd",{className:"rounded border border-gray-300 px-1 py-0.5 font-medium",children:_.enterKey}),` ${_.open}`]}),q.length>1&&/* @__PURE__ */m("span",{className:"flex items-center gap-1",children:[
|
|
25
|
-
/* @__PURE__ */f("kbd",{className:"rounded border border-gray-300 px-1 py-0.5 font-medium",children:_.tabKey}),` ${_.nextGroup}`]})]}),
|
|
26
|
-
/* @__PURE__ */m("span",{className:"flex items-center gap-1",children:[
|
|
27
|
-
/* @__PURE__ */f("kbd",{className:"rounded border border-gray-300 px-1 py-0.5 font-medium",children:_.escKey}),` ${_.close}`]})]})]})]}),document.body):null}export{w as BrandMark,X as GlobalSearch,C as PAGE_RESULT_ENTITY,I as favoritesToResults,E as navPagesProvider,V as openGlobalSearch,$ as parsePageResultTarget,L as partitionNav,P as pushRecent,k as resolveBrandMarkTreatment,A as rowsContainRoute,z as sanitizeRecent,_ as visibleNavChildren,N as visibleSectionItems};
|
package/dist/chunk-FTJ2G343.js
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import{toast_default as e}from"./chunk-RUHUTZN4.js";import{useShellStrings as t}from"./chunk-QRCDQPJA.js";import{Icon as n}from"./chunk-ZGUQLVY4.js";import{createContext as r,useContext as a,useRef as o,useState as i,useEffect as s}from"react";import*as l from"pdfjs-dist";import{createPortal as c}from"react-dom";import{jsx as d,jsxs as u}from"react/jsx-runtime";function m(e,t,n){return new Error(`The response for ${e} is not a WebAssembly module (got ${function(e){if(0===e.length)return"an empty response";const t=Array.from(e.subarray(0,24)).map(e=>e>=32&&e<127?String.fromCharCode(e):".").join("");return`${e.length} bytes starting "${t}"`}(n)}). The bundler did not emit "${t}" as an asset, and the host answered with a fallback page instead of a 404. Serve pdfjs-dist/wasm/ yourself and point window.__REACT_OS_SHELL_PDF_WASM__ at it.`)}var h=r(null);function p({children:e}){const t=a(h);return t?c(e,t):
|
|
2
|
-
/* @__PURE__ */d("div",{className:"flex shrink-0 flex-wrap items-center gap-1 border-b border-gray-200 bg-gray-50 px-3 py-2 text-xs",children:e})}"undefined"==typeof window||l.GlobalWorkerOptions.workerSrc||(l.GlobalWorkerOptions.workerSrc=`https://unpkg.com/pdfjs-dist@${l.version}/build/pdf.worker.min.mjs`);var f={"jbig2.wasm":new URL("pdfjs-dist/wasm/jbig2.wasm",import.meta.url).href,"openjpeg.wasm":new URL("pdfjs-dist/wasm/openjpeg.wasm",import.meta.url).href},g=class{async fetch({kind:e,filename:t}){if("wasmUrl"!==e)throw new Error(`Ensure that the \`${e}\` API parameter is provided.`);const n=f[t];if(!n)throw new Error(`No bundled pdf.js wasm module for "${t}".`);const r=await fetch(n);if(!r.ok)throw new Error(`Unable to load wasm data at: ${n}`);const a=new Uint8Array(await r.arrayBuffer());if(!function(e){return e.length>=4&&0===e[0]&&97===e[1]&&115===e[2]&&109===e[3]}(a))throw m(n,t,a);return a}};function w(e){const t=e||("undefined"!=typeof window?window.__REACT_OS_SHELL_PDF_WASM__:void 0);return"string"==typeof t&&t?{wasmUrl:t.endsWith("/")?t:`${t}/`}:{BinaryDataFactory:g}}var y=[50,75,100,125,150,200,300,400];function v(e,t,n){const r=(t.width-40)/n.width,a="page"===e?Math.min(r,(t.height-40)/n.height):r;return Math.min(Math.max(a,.3),4)}function b({url:r,filename:a,fit:c="width",onDownload:m,onEmail:h,workerSrc:f,wasmUrl:g}){const b=t().pdf,x=o(null),k=o(null),C=o(null),[N,j]=i(null),[M,E]=i(1),[P,_]=i(0),[z,D]=i(1),[L,W]=i(!0),[S,T]=i(!0),$=o(b.loadFailed);$.current=b.loadFailed,s(()=>{let t=!1;return T(!0),E(1),f&&(l.GlobalWorkerOptions.workerSrc=f),l.getDocument({url:r,...w(g)}).promise.then(e=>{t||(j(e),_(e.numPages),T(!1))}).catch(()=>{t||(e.error($.current),T(!1))}),()=>{t=!0}},[r,f,g]),s(()=>{if(!N||!L||!C.current)return;const e=()=>{const e=C.current;e&&N.getPage(M).then(t=>{if(!C.current)return;const n=t.getViewport({scale:1}),r=v(c,{width:e.clientWidth,height:e.clientHeight},{width:n.width,height:n.height});D(e=>Math.abs(e-r)<.005?e:r)})};e();const t=new ResizeObserver(e);return t.observe(C.current),()=>t.disconnect()},[N,M,L,c]),s(()=>{if(!N||!x.current)return;let e=!1,t=null,n=null;return N.getPage(M).then(r=>{if(e||!x.current)return;const a=r.getViewport({scale:z}),o=x.current;o.width=a.width,o.height=a.height,o.style.width=`${a.width}px`,o.style.height=`${a.height}px`;const i=o.getContext("2d");t=r.render({canvas:o,canvasContext:i,viewport:a}),t.promise.catch(()=>{});const s=k.current;s&&(s.replaceChildren(),s.style.setProperty("--total-scale-factor",String(a.scale)),n=new l.TextLayer({textContentSource:r.streamTextContent(),container:s,viewport:a}),n.render().then(()=>{if(e)return;const t=document.createElement("div");t.className="endOfContent",s.append(t)}).catch(()=>{}))}),()=>{e=!0,t?.cancel(),n?.cancel()}},[N,M,z]),s(()=>{const e=()=>k.current?.classList.remove("selecting");return window.addEventListener("pointerup",e),()=>window.removeEventListener("pointerup",e)},[]);const A="page"===c?b.fitPage:b.fitWidth,O="px-2 py-1 rounded hover:bg-gray-200 transition-colors text-gray-600 flex items-center gap-1";/* @__PURE__ */
|
|
3
|
-
return u("div",{className:"flex flex-col h-full",children:[
|
|
4
|
-
/* @__PURE__ */u(p,{children:[
|
|
5
|
-
/* @__PURE__ */d("button",{type:"button","aria-label":b.previousPage,onClick:()=>E(e=>Math.max(1,e-1)),disabled:M<=1,className:"px-1 py-1 rounded hover:bg-gray-200 disabled:opacity-30 text-gray-600",children:/* @__PURE__ */d(n,{name:"chevron-left",className:"h-3.5 w-3.5",strokeWidth:2})}),
|
|
6
|
-
/* @__PURE__ */d("span",{className:"text-gray-600 font-medium tabular-nums whitespace-nowrap",children:b.pageOf(M,P)}),
|
|
7
|
-
/* @__PURE__ */d("button",{type:"button","aria-label":b.nextPage,onClick:()=>E(e=>Math.min(P,e+1)),disabled:M>=P,className:"px-1 py-1 rounded hover:bg-gray-200 disabled:opacity-30 text-gray-600",children:/* @__PURE__ */d(n,{name:"chevron-right",className:"h-3.5 w-3.5",strokeWidth:2})}),
|
|
8
|
-
/* @__PURE__ */d("div",{className:"h-4 w-px bg-gray-300 mx-1"}),
|
|
9
|
-
/* @__PURE__ */d("button",{type:"button","aria-label":b.zoomOut,title:b.zoomOut,onClick:()=>{W(!1),D(e=>Math.max(.3,Math.round(100*(e-.25))/100))},className:O,children:/* @__PURE__ */d("span",{"aria-hidden":"true",children:"−"})}),
|
|
10
|
-
/* @__PURE__ */u("select",{value:L?"fit":y.includes(Math.round(100*z))?Math.round(100*z):"custom",onChange:e=>{const t=e.target.value;"fit"!==t?"custom"!==t&&(W(!1),D(Number(t)/100)):W(!0)},className:"bg-transparent hover:bg-gray-200 rounded px-1 py-1 text-gray-600 tabular-nums cursor-pointer focus:outline-none focus:ring-1 focus:ring-blue-400","aria-label":b.zoom,title:b.zoom,children:[
|
|
11
|
-
/* @__PURE__ */d("option",{value:"fit",children:A}),!L&&!y.includes(Math.round(100*z))&&/* @__PURE__ */u("option",{value:"custom",children:[Math.round(100*z),"%"]}),y.map(e=>/* @__PURE__ */u("option",{value:e,children:[e,"%"]},e))]}),
|
|
12
|
-
/* @__PURE__ */d("button",{type:"button","aria-label":b.zoomIn,title:b.zoomIn,onClick:()=>{W(!1),D(e=>Math.min(4,Math.round(100*(e+.25))/100))},className:O,children:/* @__PURE__ */d("span",{"aria-hidden":"true",children:"+"})}),
|
|
13
|
-
/* @__PURE__ */d("button",{type:"button",onClick:()=>W(!0),"aria-pressed":L,className:O+(L?" bg-gray-200 text-gray-900":""),title:b.fitHint,children:b.fit}),
|
|
14
|
-
/* @__PURE__ */d("div",{className:"h-4 w-px bg-gray-300 mx-1"}),
|
|
15
|
-
/* @__PURE__ */u("button",{type:"button",onClick:()=>{if(!N)return;const t=window.open("","_blank");if(!t)return void e.error(b.allowPopups);const n=[];for(let e=1;e<=P;e++)n.push(N.getPage(e).then(e=>{const t=e.getViewport({scale:2}),n=document.createElement("canvas");return n.width=t.width,n.height=t.height,e.render({canvas:n,canvasContext:n.getContext("2d"),viewport:t}).promise.then(()=>n.toDataURL())}));Promise.all(n).then(e=>{var n;t.document.write(`<html><head><title>${n=a,n.replace(/[&<>"]/g,e=>({"&":"&","<":"<",">":">",'"':"""}[e]))}</title><style>@media print{body{margin:0}img{width:100%;page-break-after:always}}</style></head><body>`),t.document.write(e.map(e=>`<img src="${e}"/>`).join("")),t.document.write("</body></html>"),t.document.close(),setTimeout(()=>{t.print(),t.close()},300)})},className:O,children:[
|
|
16
|
-
/* @__PURE__ */d(n,{name:"print",className:"h-3.5 w-3.5",strokeWidth:1.5}),b.print]}),
|
|
17
|
-
/* @__PURE__ */u("button",{type:"button",onClick:m??(()=>{const e=document.createElement("a");e.href=r,e.download=a,e.click()}),className:O,children:[
|
|
18
|
-
/* @__PURE__ */d(n,{name:"download",className:"h-3.5 w-3.5",strokeWidth:1.5}),b.download]}),h&&/* @__PURE__ */u("button",{type:"button",onClick:h,className:O,children:[
|
|
19
|
-
/* @__PURE__ */d(n,{name:"email",className:"h-3.5 w-3.5",strokeWidth:1.5}),b.email]})]}),
|
|
20
|
-
/* @__PURE__ */d("div",{ref:C,className:"flex-1 overflow-auto bg-gray-100 outline-none",tabIndex:0,onWheel:e=>{if(!N)return;if(e.ctrlKey||e.metaKey)return;const t=C.current;if(!t)return;const n=t.scrollTop<=0,r=t.scrollTop+t.clientHeight>=t.scrollHeight-1;e.deltaY>0&&r&&M<P?(e.preventDefault(),E(e=>Math.min(P,e+1)),requestAnimationFrame(()=>{C.current&&(C.current.scrollTop=0)})):e.deltaY<0&&n&&M>1&&(e.preventDefault(),E(e=>Math.max(1,e-1)),requestAnimationFrame(()=>{C.current&&(C.current.scrollTop=C.current.scrollHeight)}))},onKeyDown:e=>{if(!N)return;const t=(document.activeElement?.tagName||"").toLowerCase();"input"===t||"textarea"===t||document.activeElement?.isContentEditable||("PageDown"===e.key||"ArrowRight"===e.key?M<P&&(e.preventDefault(),E(e=>Math.min(P,e+1))):"PageUp"===e.key||"ArrowLeft"===e.key?M>1&&(e.preventDefault(),E(e=>Math.max(1,e-1))):"Home"===e.key?(e.preventDefault(),E(1)):"End"===e.key&&(e.preventDefault(),E(P)))},children:S?/* @__PURE__ */d("div",{className:"flex items-center justify-center h-full text-gray-500 text-sm",role:"status",children:b.loading}):/* @__PURE__ */u("div",{className:"min-h-full flex items-center justify-center p-4",children:[
|
|
21
|
-
/* @__PURE__ */d("style",{children:'\n.preview-pdf-textlayer {\n position: absolute;\n inset: 0;\n overflow: clip;\n line-height: 1;\n text-align: initial;\n text-size-adjust: none;\n forced-color-adjust: none;\n transform-origin: 0 0;\n caret-color: CanvasText;\n --min-font-size: 1;\n --text-scale-factor: calc(var(--total-scale-factor, 1) * var(--min-font-size));\n --min-font-size-inv: calc(1 / var(--min-font-size));\n}\n.preview-pdf-textlayer :is(span, br) {\n color: transparent;\n position: absolute;\n white-space: pre;\n cursor: text;\n transform-origin: 0% 0%;\n}\n.preview-pdf-textlayer > :not(.markedContent),\n.preview-pdf-textlayer .markedContent span:not(.markedContent) {\n z-index: 1;\n --font-height: 0;\n font-size: calc(var(--text-scale-factor) * var(--font-height));\n --scale-x: 1;\n --rotate: 0deg;\n transform: rotate(var(--rotate)) scaleX(var(--scale-x)) scale(var(--min-font-size-inv));\n}\n.preview-pdf-textlayer .markedContent {\n display: contents;\n}\n.preview-pdf-textlayer span[role="img"] {\n user-select: none;\n cursor: default;\n}\n.preview-pdf-textlayer ::selection {\n background: rgba(0, 80, 255, 0.25);\n}\n.preview-pdf-textlayer br::selection {\n background: transparent;\n}\n.preview-pdf-textlayer .endOfContent {\n display: block;\n position: absolute;\n inset: 100% 0 0;\n z-index: 0;\n cursor: default;\n user-select: none;\n}\n.preview-pdf-textlayer.selecting .endOfContent {\n top: 0;\n}\n'}),
|
|
22
|
-
/* @__PURE__ */u("div",{className:"relative shadow-lg rounded",children:[
|
|
23
|
-
/* @__PURE__ */d("canvas",{ref:x,className:"block rounded"}),
|
|
24
|
-
/* @__PURE__ */d("div",{ref:k,className:"preview-pdf-textlayer",onPointerDown:e=>e.currentTarget.classList.add("selecting")})]})]})})]})}export{p as PanelActions,b as PdfViewer,h as ToolbarSlotContext,v as fitScale,w as pdfWasmParams};
|