efficient-shell 7.61.0 → 7.62.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 +2 -1
- package/dist/{Browser-G2JFFX3S.js → Browser-F4MUAORU.js} +14 -14
- package/dist/Calculator-PWG4G3MY.js +29 -0
- package/dist/ConfirmDialog-IZ3NJINY.js +1 -0
- package/dist/{CurrencyConverter-6EKGFJBO.js → CurrencyConverter-2KRM3NFL.js} +6 -6
- package/dist/{Documents-4FP54PLS.js → Documents-4O7TTUHG.js} +20 -20
- package/dist/Files-GXDMKGPZ.js +87 -0
- package/dist/{Notepad-BY5XAWFD.js → Notepad-PGLADU6N.js} +10 -10
- package/dist/PdfViewer-EVJRMYTK.js +1 -0
- package/dist/{PomodoroTimer-GXYZ2SJO.js → PomodoroTimer-WLVH3BFM.js} +64 -64
- package/dist/{Preview-RFBGMX6O.js → Preview-SL4HBPBL.js} +33 -33
- package/dist/Sidebar-EJKBAFU4.js +44 -0
- package/dist/{Spreadsheet-SJIYCTON.js → Spreadsheet-MA5CAMIM.js} +14 -14
- package/dist/{Stock-PWUI6WGP.js → Stock-FCPI7TKU.js} +3 -3
- package/dist/{Weather-33OWOCGM.js → Weather-5VWETSF5.js} +14 -14
- package/dist/{WorldClock-3OKI4M2W.js → WorldClock-G7CBN3J2.js} +6 -6
- package/dist/ai/index.js +15 -15
- package/dist/apps/index.js +1 -1
- package/dist/bin/ui-check.js +1 -1
- package/dist/brand.css +1 -1
- package/dist/{chunk-3TQNOXBC.js → chunk-4G4FU2ML.js} +4 -4
- package/dist/{chunk-6JB7DBBQ.js → chunk-54ZASFCH.js} +60 -60
- package/dist/{chunk-RXULW43T.js → chunk-5THIN3JV.js} +29 -29
- package/dist/{chunk-KH75SE7M.js → chunk-76DRQSJM.js} +2 -1
- package/dist/{chunk-MVDBVNIJ.js → chunk-A2MMRPU4.js} +566 -560
- package/dist/{chunk-F6BEA7V7.js → chunk-BJ47M4AR.js} +1 -1
- package/dist/{chunk-OMDIZJGV.js → chunk-C6IR6W7P.js} +6 -6
- package/dist/{chunk-UQSYTHIV.js → chunk-CCWPP3YK.js} +1 -1
- package/dist/{chunk-5PXEPQRQ.js → chunk-CICDIRBN.js} +1 -1
- package/dist/chunk-CU3GY5Y2.js +1 -0
- package/dist/{chunk-LLT243LM.js → chunk-I33KGECT.js} +4 -4
- package/dist/{chunk-L4646RA4.js → chunk-JDS2IFBP.js} +1 -1
- package/dist/{chunk-OWWIRUAW.js → chunk-KYBZBZEP.js} +8 -8
- package/dist/{chunk-UBPBDZZ7.js → chunk-MHGVLZYL.js} +1 -1
- package/dist/{chunk-O4LQMA4L.js → chunk-N5REB25E.js} +1 -1
- package/dist/{chunk-VTEZ4V6B.js → chunk-O5MZAN43.js} +8 -8
- package/dist/{chunk-7V63XT4O.js → chunk-OKPYIQ2Q.js} +10 -10
- package/dist/{chunk-5XT7DLHL.js → chunk-RUBR4GCW.js} +7 -7
- package/dist/{chunk-OBEI75WB.js → chunk-RWIFSTEK.js} +1 -1
- package/dist/{chunk-BEDROWTG.js → chunk-SMFD6EID.js} +2 -2
- package/dist/{chunk-MTBMAIFM.js → chunk-TFNELC3A.js} +1 -1
- package/dist/{chunk-FCXXSKFR.js → chunk-TJR6B3YD.js} +1 -1
- package/dist/{chunk-EIIGM74J.js → chunk-UCZFCKKS.js} +15 -15
- package/dist/{chunk-DZ5QTET2.js → chunk-UNBLH4EQ.js} +18 -18
- package/dist/{chunk-JQEAGIUK.js → chunk-UUDDYDSC.js} +1 -1
- package/dist/{chunk-QFH2UQJS.js → chunk-UYKGVCZO.js} +1 -1
- package/dist/chunk-W7W4JMOT.js +1 -0
- package/dist/{chunk-ZG423VCB.js → chunk-XVHILN6Q.js} +1 -1
- package/dist/chunk-YFK4COYT.js +1 -0
- package/dist/{chunk-RHTH3RQG.js → chunk-YJIG2KT3.js} +11 -11
- package/dist/file-intake/index.js +1 -1
- package/dist/i18n/index.d.ts +1 -1
- package/dist/icons/index.js +1 -1
- package/dist/{index-Df7KnoGi.d.ts → index-Ci1RMKEn.d.ts} +71 -6
- package/dist/index.d.ts +3 -3
- package/dist/index.js +112 -112
- package/dist/locales/zh-Hans.d.ts +1 -1
- package/dist/locales/zh-Hans.js +1 -1
- package/dist/map/index.js +3 -3
- 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-dDZPOlkC.d.ts → strings-mUwozHxH.d.ts} +27 -0
- package/dist/telemetry/index.js +1 -1
- package/dist/ui/index.d.ts +2 -2
- package/dist/ui/index.js +1 -1
- package/dist/ui.css +7 -4
- package/package.json +1 -1
- package/dist/Calculator-5CPQRITG.js +0 -29
- package/dist/ConfirmDialog-ZOQHYUNL.js +0 -1
- package/dist/Files-ZCQQ5TMI.js +0 -87
- package/dist/PdfViewer-MCWSL4ZR.js +0 -1
- package/dist/Sidebar-YJ4YSBTU.js +0 -44
- package/dist/chunk-54M2NPNH.js +0 -1
- package/dist/chunk-HJQAE6SP.js +0 -1
- package/dist/chunk-JZEBE6B6.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{buttonClasses as t}from"./chunk-K7PQXJO7.js";import{currentShellStrings as e}from"./chunk-
|
|
1
|
+
import{buttonClasses as t}from"./chunk-K7PQXJO7.js";import{currentShellStrings as e}from"./chunk-W7W4JMOT.js";import{SPINNER_RING as n}from"./chunk-2J6F4EE7.js";var o="http://www.w3.org/2000/svg",s={},r=/* @__PURE__ */new Map;function i(t,e){let n=document.getElementById(t);return n||(n=document.createElement("div"),n.id=t,n.className=e,document.body.appendChild(n)),n}var a={success:"M5 13l4 4L19 7",error:"M6 18L18 6M6 6l12 12",warning:"M12 9v3.75m-9.303 3.376c-.866 1.5.217 3.374 1.948 3.374h14.71c1.73 0 2.813-1.874 1.948-3.374L13.949 3.378c-.866-1.5-3.032-1.5-3.898 0L2.697 16.126zM12 15.75h.007v.008H12v-.008z",info:"M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z",bell:"M14.857 17.082a23.848 23.848 0 005.454-1.31A8.967 8.967 0 0118 9.75v-.7V9A6 6 0 006 9v.75a8.967 8.967 0 01-2.312 6.022c1.733.64 3.56 1.085 5.455 1.31m5.714 0a24.255 24.255 0 01-5.714 0m5.714 0a3 3 0 11-5.714 0"};function c(t,e){const n=document.createElementNS(o,"svg");n.setAttribute("class",e),n.setAttribute("fill","none"),n.setAttribute("viewBox","0 0 24 24"),n.setAttribute("stroke","currentColor"),n.setAttribute("stroke-width","2");const s=document.createElementNS(o,"path");return s.setAttribute("stroke-linecap","round"),s.setAttribute("stroke-linejoin","round"),s.setAttribute("d",a[t]),n.appendChild(s),n}function l(t,e){const n=document.createElement("div");return n.className=t,void 0!==e&&(n.textContent=e),n}function d(e,o,a){const d={...s,...a},u=d.placement??"top",m=d.sticky??!1,p=`${u}|${e}|${o}`;if(d.dedupe){const t=r.get(p);if(t)return t.restart(),{dismiss:t.dismiss}}"loading"!==e&&!1!==d.sound&&import("./sounds-E5OTSJLX.js").then(t=>{"success"===e?t.playSuccess():"error"===e?t.playError():t.playNotification()}).catch(()=>{});const f="bottom"===u?i("toast-container-bottom","fixed bottom-4 left-1/2 -translate-x-1/2 z-(--z-toast) flex flex-col-reverse gap-2 items-center pointer-events-none"):i("toast-container","fixed top-4 left-1/2 -translate-x-1/2 z-(--z-toast) flex flex-col gap-2 items-center pointer-events-none"),h="bottom"===u?"translateY(10px)":"translateY(-10px)",y=l("pointer-events-auto cursor-pointer rosh-toast");if(y.style.opacity="0",y.style.transform=`${h} scale(0.95)`,y.setAttribute("role","error"===e?"alert":"status"),y.setAttribute("aria-atomic","true"),"loading"===e){const t=document.createElement("span");t.setAttribute("aria-hidden","true"),t.className=`${n} h-4 w-4 rosh-tone-loading`,y.appendChild(t)}else y.appendChild(c(e,`h-4 w-4 rosh-tone-${e}`));const v=document.createElement("span");if(v.textContent=o,y.appendChild(v),d.action){const{label:e,onClick:n}=d.action,o=document.createElement("button");o.type="button",o.className=t({variant:"link",size:"sm"}),o.textContent=e,o.addEventListener("click",t=>{t.stopPropagation(),g||(n(),x("action"))}),y.appendChild(o)}let b;f.appendChild(y),requestAnimationFrame(()=>{y.style.opacity="1",y.style.transform="translateY(0) scale(1)"});let g=!1;const x=t=>{g||(g=!0,b&&clearTimeout(b),r.delete(p),y.style.opacity="0",y.style.transform=`${h} scale(0.95)`,setTimeout(()=>y.remove(),300),d.onClose?.(t))},E=()=>x("dismissed"),w=d.duration??("info"===e?4500:3e3),C=()=>{b&&clearTimeout(b),m||(b=setTimeout(()=>x("timeout"),w))};return C(),y.addEventListener("mouseenter",()=>{b&&clearTimeout(b)}),y.addEventListener("mouseleave",()=>{g||C()}),y.addEventListener("click",E),r.set(p,{el:y,restart:C,dismiss:E}),{dismiss:E}}var u=8e3,m=/* @__PURE__ */new Map,p=!1;var f={success:(t,e)=>d("success",t,e),error:(t,e)=>d("error",t,e),warning:(t,e)=>d("warning",t,e),info:(t,e)=>d("info",t,e),notify:(t,n)=>function(t,n){!1!==(n?.sound??s.sound)&&import("./sounds-E5OTSJLX.js").then(t=>t.playNotification()).catch(()=>{});const o=i("notif-container","fixed top-4 right-4 z-(--z-toast) flex flex-col gap-3 items-end pointer-events-none"),r=l("pointer-events-auto cursor-pointer rosh-notif");r.style.opacity="0",r.style.transform="translateX(30px) scale(0.95)";const a=l("rosh-notif-badge");a.appendChild(c("bell","h-5 w-5"));const d=l("rosh-notif-body");d.append(l("rosh-notif-title",e().toast.notification),l("notif-msg rosh-notif-msg",t));const u=document.createElement("button");u.className="rosh-notif-close",u.textContent="×",r.append(a,d,u);const m=()=>{r.style.opacity="0",r.style.transform="translateX(30px) scale(0.95)",setTimeout(()=>r.remove(),300)};u.addEventListener("click",t=>{t.stopPropagation(),m()}),r.addEventListener("click",m),o.appendChild(r),requestAnimationFrame(()=>{r.style.opacity="1",r.style.transform="translateX(0) scale(1)"}),setTimeout(m,n?.duration??1e4)}(t,n),promise:(t,e,n)=>{const o=d("loading",e.loading,{...n,sticky:!0});return t.then(t=>{o.dismiss(),d("success","function"==typeof e.success?e.success(t):e.success,n)},t=>{o.dismiss(),d("error","function"==typeof e.error?e.error(t):e.error,n)}),t},configure:t=>{s={...t}},undoable:function(t,n){p||"undefined"==typeof window||(p=!0,window.addEventListener("pagehide",()=>{const t=[...m.values()];m.clear();for(const e of t)e.run({keepalive:!0})}));const o=/* @__PURE__ */Symbol("undoable");let s=!1,r=null;const i=async t=>{if(!s){s=!0,m.delete(o);try{await(t?n.commit(t):n.commit())}catch(t){n.onFail?.(t)}}},a=()=>!s&&(s=!0,m.delete(o),n.undo(),!0);return m.set(o,{run:i}),r=d("success",t,{sound:!1,placement:n.placement,duration:n.duration??8e3,action:{label:n.actionLabel??e().toast.undo,onClick:()=>{a()}},onClose:t=>{"action"!==t&&i()}}),{undo:()=>{const t=a();return t&&r?.dismiss(),t},commit:async()=>{if(s)return;const t=i();r?.dismiss(),await t}}}};export{u as UNDOABLE_MS,f as toast_default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{inputClasses as e}from"./chunk-
|
|
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-W7W4JMOT.js";import{SpinnerRing as a}from"./chunk-2J6F4EE7.js";import{forwardRef as s,useCallback as i,useState as l,useId as o}from"react";import{jsx as c,jsxs as d,Fragment as m}from"react/jsx-runtime";var u=s(function({invalid:t,autoGrow:r,className:n="",onInput:a,rows:s=3,size:l,readOnly:o,...d},m){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
2
|
return c("textarea",{ref:m,"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()}),...d})}),h={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)]"}},p={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 g({tone:e}){const t={className:"h-5 w-5","aria-hidden":!0};switch(e){case"success":/* @__PURE__ */
|
|
3
3
|
return c(r,{name:"check-circle",look:"mini",...t});case"warning":/* @__PURE__ */
|
|
4
4
|
return c(r,{name:"warning",look:"mini",...t});case"danger":/* @__PURE__ */
|
|
@@ -32,9 +32,9 @@ return d("li",{className:`flex items-start gap-2 ${f[r]}`,"data-status":r,childr
|
|
|
32
32
|
return d("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:[
|
|
33
33
|
/* @__PURE__ */c(r,{name:"camera",look:"mini",className:"mt-0.5 h-4 w-4 shrink-0","aria-hidden":"true"}),
|
|
34
34
|
/* @__PURE__ */d("span",{className:"text-xs",children:[
|
|
35
|
-
/* @__PURE__ */c("span",{className:"font-medium text-gray-600",children:`${a.screenshot} — `}),t]})]})}function j(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
|
|
35
|
+
/* @__PURE__ */c("span",{className:"font-medium text-gray-600",children:`${a.screenshot} — `}),t]})]})}function j(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 I=e=>e.replace(/^\s*\|/,"").replace(/\|\s*$/,"").split("|").map(e=>e.trim());function O(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__ */
|
|
36
36
|
return c(`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:$(a[2])},t)}if(1===r.length&&/^---+$/.test(n))/* @__PURE__ */
|
|
37
|
-
return c("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=
|
|
37
|
+
return c("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=I(e[0]),n=e.slice(2).map(I);/* @__PURE__ */
|
|
38
38
|
return c("div",{className:"my-1 overflow-x-auto rounded-lg border border-gray-200",children:/* @__PURE__ */d("table",{className:"w-full border-collapse text-sm",children:[
|
|
39
39
|
/* @__PURE__ */c("thead",{children:/* @__PURE__ */c("tr",{className:"bg-gray-50",children:r.map((e,t)=>/* @__PURE__ */c("th",{className:"border-b border-gray-200 px-3 py-2 text-left font-semibold text-gray-700",children:$(e)},t))})}),
|
|
40
40
|
/* @__PURE__ */c("tbody",{children:n.map((e,t)=>/* @__PURE__ */c("tr",{className:"even:bg-gray-50/50",children:e.map((e,t)=>/* @__PURE__ */c("td",{className:"border-t border-gray-100 px-3 h-8 align-top text-gray-700",children:$(e)},t))},t))})]})},t)}(r,t);if(/^>\s?/.test(n)){const e=r.map(e=>e.replace(/^>\s?/,"")).join(" ");/* @__PURE__ */
|
|
@@ -42,6 +42,6 @@ return c("div",{className:"my-1 rounded-r-lg border-l-4 border-blue-300 bg-blue-
|
|
|
42
42
|
return c(z,{alt:s[1]},t);if(/^[-*]\s+/.test(n)){const e=j(r,/^[-*]\s+(.*)$/);/* @__PURE__ */
|
|
43
43
|
return c("ul",{className:"list-disc space-y-1 pl-5 marker:text-gray-400",children:e.map((e,t)=>/* @__PURE__ */c("li",{children:$(e)},t))},t)}const i=/^(\d+)\.\s+/.exec(n);if(i){const e=j(r,/^\d+\.\s+(.*)$/);/* @__PURE__ */
|
|
44
44
|
return c("ol",{start:Number(i[1]),className:"list-decimal space-y-1 pl-5 marker:text-gray-400",children:e.map((e,t)=>/* @__PURE__ */c("li",{className:"pl-1",children:$(e)},t))},t)}/* @__PURE__ */
|
|
45
|
-
return c("p",{children:$(r.join(" "))},t)}var
|
|
46
|
-
return c("div",{className:`space-y-3 text-sm leading-relaxed text-gray-700 ${t??""}`.trim(),children:
|
|
47
|
-
return c("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__ */c("code",{children:t})},r)}(e.fence,t):
|
|
45
|
+
return c("p",{children:$(r.join(" "))},t)}var W=/^( {0,3})(`{3,}|~{3,})[ \t]*(.*?)[ \t]*$/;function C(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=W.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=W.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 D({children:e,className:t}){/* @__PURE__ */
|
|
46
|
+
return c("div",{className:`space-y-3 text-sm leading-relaxed text-gray-700 ${t??""}`.trim(),children:C(e??"").map((e,t)=>"fence"in e?function({lang:e,code:t},r){/* @__PURE__ */
|
|
47
|
+
return c("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__ */c("code",{children:t})},r)}(e.fence,t):O(e.text,t))})}export{x as Banner,D as Markdown,b as StepChain,N as StepChainItem,u as Textarea_default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{loadThemeIconSet as e}from"./chunk-
|
|
1
|
+
import{loadThemeIconSet as e}from"./chunk-76DRQSJM.js";var r=["academic-cap","accent","account","account-circle","add","add-circle","add-person","adjust","align-center","align-justify","align-left","align-right","align-separate","alignment","anchor","animation","apps","archive-box","arrow","arrow-down","arrow-left","arrow-left-end-on-rectangle","arrow-long-right","arrow-right","arrow-trending-down","arrow-trending-up","arrow-up","arrow-up-right","at-symbol","attach","background","bag","bank","bars-3-bottom-left","battery","beaker","bell","bell-alert","bell-plus","billing","black-and-white","block-badge","block-banner","block-box","block-button","block-column","block-coupon","block-divider","block-footer","block-heading","block-image","block-included-list","block-layered-images","block-product","block-product-title","block-section","block-social","block-spacer","block-text","block-video","blog-post","bold","bolt","book-open","bookmark","bookmark-square","border-all","border-bottom","border-left","border-right","border-top","braces","breadcrumb","briefcase","bug","bug-ant","building-library","building-office-2","button","button-arrow","button-icon","calculator","calendar","calendar-check","camera","caption","car","card-payment","caret","cart","case","case-capitalized","case-lower","case-normal","case-upper","category","chart","chart-bar","chart-bar-square","chart-line","chat","chat-bubble-left-right","chat-bubble-oval-left-ellipsis","check","check-circle","checkbox","chevron","chevron-double","chevron-double-left","chevron-double-right","chevron-down","chevron-left","chevron-right","chevron-up","chevron-up-down","circle-stack","clear-marks","clipboard","clipboard-check","clipboard-document-list","clipboard-list","clock","close","close-circle","cloud","cloud-alert","cloud-arrow-up","cloud-check","cloud-download","cloud-pause","cloud-slash","code","code-bracket","collapse","collapse-all","column-gap","column-widths","columns","company","compose","contrast","cookie","copied","copy","copy-style","copy-to-page","corner","crop","cube-transparent","cursor","cursor-arrow-rays","cursor-click","dashboard","date","desktop","diagram","direction","direction-down","direction-left","direction-right","direction-up","document","document-check","document-magnifying-glass","dollar","dot","download","drag","drop","duplicate","edit","email","emphasis","eraser","error","expand","external","eye","eye-off","face-smile","filter","finish","fire","flag","flag-au","flag-ca","flag-eu","flag-gb","flag-nz","flag-us","folder","folder-open","folder-plus","forward","full-width","gap","gem","gift","globe","grid","ground","hand","hand-thumb-up","hash","headquarters","heart","height","help","help-off","hexagon","home","hover","icon-after-text","icon-before-text","identification","image","image-off","images","inbox","info","italic","key","layers","layout","letter-spacing","lightbulb","line-between","line-dashed","line-dotted","line-solid","line-spacing","line-style","link","link-slash","list","list-format","list-none","location","lock","logo","logout","map","media","media-layout-big-two","media-layout-inset","media-layout-side-by-side","media-layout-stacked","megaphone","menu","meta","microphone","money","moon","more","more-vertical","move-down","move-up","newspaper","no-symbol","note","nudge","numbered-list","opacity","own-text","package","package-open","padding-all","padding-bottom","padding-left","padding-left-right","padding-right","padding-top","padding-x","padding-y","page","paint-brush","panel-left","panel-right","paragraph-spacing","parcel","paste","paste-style","pause","pen","people","percent","phone","phone-hidden","placement","play","plus-minus","power","presentation-chart-bar","print","product","product-field","product-size","progress","quiet","quote","radio-dot","radius","receipt","receipt-percent","receipt-refund","rectangle-group","redo","refresh","remove","remove-circle","rename","reply","reply-all","revert","robot","rotate","scale","scroll-point","scroll-text","search","select-all","send","server","settings","shadow","shape-ellipse","shape-rect","share","shield-check","shield-exclamation","sides-each","signal","signal-slash","sitemap","slide-arrows-bare","slide-arrows-round","slide-arrows-square","slide-picker-bar","slide-picker-cards","slide-picker-dots","slide-picker-numbers","slide-picker-squares","sort","sparkles","speaker","speaker-wave","spec-table","spinner","split","square","star","state","status-circle","status-dot","sticky","stop-circle","store","strike","styles","subscript","success-burst","sun","superscript","swap","swatch","table","tablet","tabs","tag","target","team","telephone","template","text-color","text-lines","text-size","text-small","text-value","texture","theme","ticket","title","trash","trigger","truck","tv","type","tyre","underline","undo","upload","v-align","verified","video-off","view-columns","wallet","warning","weight","wheel","widgets","width","window","windows","words-from","wrap","wrench","wrench-screwdriver","zoom-in"],a=new Set(r),o=e=>"string"==typeof e&&a.has(e),t=[{name:"phosphor",label:"Phosphor"},{name:"iconoir",label:"Iconoir"},{name:"lucide",label:"Lucide"},{name:"tabler",label:"Tabler"}],l={pink:"phosphor",green:"iconoir",grey:"lucide",blue:"tabler"};function c(r){return e(r)}function i(e,r,a){return a?"string"==typeof r&&r?r:null:l[e]??null}export{r as ICON_NAMES,l as ICON_SET_FOR_THEME,t as THEME_ICON_SETS,i as iconSetFor,o as isIconName,c as loadIconSet};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{Modal as e}from"./chunk-
|
|
1
|
+
import{Modal as e}from"./chunk-54ZASFCH.js";import{keepsNativeMenu as a}from"./chunk-YJIG2KT3.js";import{jsx as i,jsxs as n}from"react/jsx-runtime";var t={activeOpacity:70,inactiveOpacity:50,activeBlur:0,inactiveBlur:0};function r(e){try{const a=JSON.parse(localStorage.getItem(e)||"");return null!=a.blur&&null==a.activeBlur&&(a.activeBlur=a.blur,a.inactiveBlur=a.blur,delete a.blur),{...t,...a}}catch{return t}}function l({open:t,onClose:r,title:l,appearance:c,onAppearanceChange:s,onSave:d,children:o}){if(!t)return null;const u="w-full h-1.5 rounded-full appearance-none bg-gray-200 cursor-pointer accent-blue-500",p="flex items-center justify-between text-xs text-gray-500";/* @__PURE__ */
|
|
2
2
|
return i("div",{onPointerDown:e=>e.stopPropagation(),onContextMenu:e=>{e.stopPropagation(),a(e.target)||e.preventDefault()},children:/* @__PURE__ */i(e,{open:t,onClose:r,title:l,size:"sm",children:/* @__PURE__ */n("div",{className:"space-y-4",children:[o,
|
|
3
3
|
/* @__PURE__ */n("div",{children:[
|
|
4
4
|
/* @__PURE__ */i("h3",{className:"text-sm font-semibold text-gray-700 mb-3",children:"Appearance"}),
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var r="block w-full rounded-(--radius-control) border border-gray-300 bg-white",e="border-blue-400 bg-blue-50",o="text-blue-700",d="border-gray-300 text-gray-600 hover:border-gray-400",l="text-gray-400",t="focus:border-blue-400 rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring)]",s=`text-gray-800 placeholder:text-gray-400 shadow-sm ${t}`,a=`text-gray-500 placeholder:text-gray-400 shadow-sm ${t}`,i={sm:"h-6 px-2 text-xs",md:"h-8 px-3 text-sm",lg:"h-10 px-4 text-base",touch:"h-14 px-4 text-base"},b=`${r} ${i.md} ${s}`,u=`${`block w-full rounded-(--radius-control) border ${e} rosh-field-on`} ${i.md} ${s}`,c="disabled:cursor-not-allowed disabled:opacity-60";function n(e){const o=e?.multiline?g:i;return[e?.readOnly?`block w-full rounded-(--radius-control) border border-gray-300 bg-gray-50 ${o[e.size??"md"]} ${s}`:e?.auto?`block w-full rounded-(--radius-control) border border-dashed border-gray-300 bg-gray-50 rosh-field-auto ${o[e.size??"md"]} ${a}`:e?.multiline||e?.size&&"md"!==e.size?`${r} ${o[e?.size??"md"]} ${s}`:b,e?.invalid?"border-red-300 focus:border-red-400 focus-visible:ring-[color:var(--rosh-focus-ring-invalid)]":"",c,e?.className??""].filter(Boolean).join(" ")}var g={sm:"px-2 py-1 text-xs",md:"px-3 py-2 text-sm",lg:"px-4 py-2 text-base",touch:i.touch};export{d as FILTER_OFF,e as FILTER_ON,o as FILTER_ON_INK,b as INPUT_BASE,u as INPUT_BASE_ON,i as INPUT_SIZES,l as PLACEHOLDER_INK,n as inputClasses};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import{Tooltip as e}from"./chunk-RDLWLATO.js";import{useBrowserLayoutEffect as r,useBrowserState as t}from"./chunk-D65T4H6J.js";import{useShellStrings as o}from"./chunk-
|
|
2
|
-
return s(e,{content:x??k.hint,side:
|
|
1
|
+
import{Tooltip as e}from"./chunk-RDLWLATO.js";import{useBrowserLayoutEffect as r,useBrowserState as t}from"./chunk-D65T4H6J.js";import{useShellStrings as o}from"./chunk-W7W4JMOT.js";import{useRef as n,useEffect as i,useCallback as l}from"react";import{jsx as s,jsxs as a,Fragment as c}from"react/jsx-runtime";var u=(e,r,t)=>Math.min(t,Math.max(r,e));function d(e,r,t,o,n){return Math.round(u("left"===t||"top"===t?e+r:e-r,o,n))}function h(e,r,t){let o=null;try{o=window.localStorage.getItem(e)}catch{return null}const n=o?parseInt(o,10):NaN;return Number.isNaN(n)?null:u(n,r,t)}function f({width:t,onResize:a,orientation:c="vertical",side:f,min:m,max:v,defaultWidth:g=m,step:b=16,storageKey:p,label:w,hint:x,controls:y,className:z=""}){const N="horizontal"===c,k=o().resizeHandle,M=n(null),P=n({onResize:a,min:m,max:v,side:f});P.current={onResize:a,min:m,max:v,side:f},r(()=>{if(!p)return;const e=h(p,m,v);null!==e&&e!==t&&a(e)},[p]),i(()=>{if(!p)return;const e=window.setTimeout(()=>{try{window.localStorage.setItem(p,String(Math.round(t)))}catch{}},200);return()=>window.clearTimeout(e)},[t,p]);const $=l(()=>{M.current=null,document.body.style.removeProperty("cursor"),document.body.style.removeProperty("user-select")},[]);i(()=>$,[$]);const T=e=>{M.current&&(e.currentTarget.hasPointerCapture?.(M.current.pointer)&&e.currentTarget.releasePointerCapture(M.current.pointer),$())},C="left"===f?"right-0":"right"===f?"left-0":"top"===f?"bottom-0":"top-0",D="left"===f?"right":"right"===f?"left":"top"===f?"bottom":"top",W=N?`absolute inset-x-0 ${C} z-10 flex h-2`:`absolute inset-y-0 ${C} z-10 flex w-2`;/* @__PURE__ */
|
|
2
|
+
return s(e,{content:x??k.hint,side:D,delay:600,className:`${W} ${z}`.trim(),children:/* @__PURE__ */s("div",{role:"separator",tabIndex:0,"aria-orientation":c,"aria-label":w??k.label,"aria-valuenow":Math.round(t),"aria-valuemin":m,"aria-valuemax":v,"aria-controls":y,"data-resize-handle":f,onPointerDown:e=>{0===e.button&&(e.preventDefault(),M.current={x:N?e.clientY:e.clientX,width:t,moved:!1,pointer:e.pointerId},e.currentTarget.setPointerCapture?.(e.pointerId),document.body.style.cursor=N?"row-resize":"col-resize",document.body.style.userSelect="none")},onPointerMove:e=>{const r=M.current;if(!r)return;if(0===e.buttons)return void $();const t=(N?e.clientY:e.clientX)-r.x;if(!r.moved){if(Math.abs(t)<3)return;r.moved=!0}const{onResize:o,min:n,max:i,side:l}=P.current;o(d(r.width,t,l,n,i))},onPointerUp:T,onPointerCancel:T,onLostPointerCapture:()=>{M.current&&$()},onDoubleClick:()=>a(u(g,m,v)),onKeyDown:e=>{const r=N?"ArrowDown":"ArrowRight",o=N?"ArrowUp":"ArrowLeft",n=e.key===r?b:e.key===o?-b:null,i=null!==n?d(t,n,f,m,v):"Home"===e.key?m:"End"===e.key?v:"Enter"===e.key?u(g,m,v):null;null!==i&&(e.preventDefault(),i!==t&&a(i))},className:N?"group/resize relative h-full w-full cursor-row-resize touch-none rosh-focus-ring focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-[color:var(--rosh-focus-ring-solid)]":"group/resize relative h-full w-full cursor-col-resize touch-none rosh-focus-ring focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-[color:var(--rosh-focus-ring-solid)]",children:/* @__PURE__ */s("div",{"aria-hidden":"true",className:N?`absolute inset-x-0 ${C} h-px bg-transparent transition-colors group-hover/resize:bg-[var(--accent-500,var(--rosh-resize-handle))] group-focus-visible/resize:h-0.5 group-focus-visible/resize:bg-[var(--accent-500,var(--rosh-resize-handle))]`:`absolute inset-y-0 ${C} w-px bg-transparent transition-colors group-hover/resize:bg-[var(--accent-500,var(--rosh-resize-handle))] group-focus-visible/resize:w-0.5 group-focus-visible/resize:bg-[var(--accent-500,var(--rosh-resize-handle))]`})})})}var m=(e,r,t)=>Math.min(Math.max(e,r),t);function v({sidebar:e,sidebarTop:r,sidebarBottom:n,children:i,side:l="left",storageKey:u,defaultWidth:d=256,minWidth:v=180,maxWidth:g=480,className:b="",sidebarClassName:p=("right"===l?"border-l border-gray-200 bg-gray-50":"border-r border-gray-200 bg-gray-50"),contentClassName:w="bg-white"}){const x="right"===l,y=o().sidebar,[z,N]=t(()=>(u?h(u,v,g):null)??m(d,v,g),m(d,v,g)),k=null!=r||null!=n,M=/* @__PURE__ */a("div",{className:"relative flex h-full shrink-0 flex-col",style:{width:z},children:[
|
|
3
3
|
/* @__PURE__ */a("div",{className:`flex h-full flex-col ${k?"overflow-hidden":"overflow-y-auto"} ${p}`,children:[null!=r&&/* @__PURE__ */s("div",{className:"flex shrink-0 flex-col gap-2 px-2 pt-3 pb-2",children:r}),k?/* @__PURE__ */s("div",{className:"min-h-0 flex-1 overflow-y-auto",children:e}):e,null!=n&&/* @__PURE__ */s("div",{className:"mt-auto flex shrink-0 flex-col gap-2 border-t border-gray-200 px-2 py-3",children:n})]}),
|
|
4
|
-
/* @__PURE__ */s(f,{side:l,width:z,onResize:N,min:v,max:g,defaultWidth:m(d,v,g),storageKey:u,hint:y.resize})]}),
|
|
5
|
-
return s("div",{className:`flex h-full w-full overflow-hidden ${b}`,children:/* @__PURE__ */a(c,x?{children:[M
|
|
4
|
+
/* @__PURE__ */s(f,{side:l,width:z,onResize:N,min:v,max:g,defaultWidth:m(d,v,g),storageKey:u,hint:y.resize})]}),P=/* @__PURE__ */s("div",{className:`flex min-w-0 flex-1 flex-col ${w}`,children:i});/* @__PURE__ */
|
|
5
|
+
return s("div",{className:`flex h-full w-full overflow-hidden ${b}`,children:/* @__PURE__ */a(c,x?{children:[P,M]}:{children:[M,P]})})}export{f as ResizeHandle,v as SidebarLayout};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{DEFAULT_SHELL_STRINGS as e,useShellStrings as t}from"./chunk-
|
|
1
|
+
import{DEFAULT_SHELL_STRINGS as e,useShellStrings as t}from"./chunk-W7W4JMOT.js";import{useRef as r,useState as n,useCallback as s}from"react";import{jsx as a}from"react/jsx-runtime";function o(e,t){const r=(t??"").split(",").map(e=>e.trim().toLocaleLowerCase()).filter(Boolean);if(0===r.length||r.includes("*")||r.includes("*/*"))return!0;const n=e.name.toLocaleLowerCase(),s=e.type.toLocaleLowerCase();return r.some(e=>e.startsWith(".")?n.endsWith(e):e.endsWith("/*")?s.startsWith(e.slice(0,-1)):s===e)}var l=(t,r=e.files)=>t<1024?r.bytes(t):t<1048576?r.kilobytes(Math.round(t/1024)):r.megabytes(t/1048576),i=e=>Array.from(e.dataTransfer?.types??[]).includes("Files");function c({onAccept:e,accept:a,maxSizeBytes:c,maxFiles:u,multiple:f=!0,currentCount:p=0,acceptHint:m,disabled:d=!1}){const h=t().files,g=r(null),[y,x]=n(!1),[v,D]=n([]),L=r(0),b="string"==typeof m?m:"",A=s(t=>{if(d||!t)return;const r=Array.from(t);if(0===r.length)return;const n=[],s=[];for(const e of f?r:r.slice(0,1))o(e,a)?null!=c&&e.size>c?s.push({file:e,reason:"size",message:h.tooLarge(e.name,l(e.size,h),l(c,h))}):f&&null!=u&&p+n.length>=u?s.push({file:e,reason:"count",message:h.tooMany(e.name,u)}):n.push(e):s.push({file:e,reason:"type",message:h.notAccepted(e.name,b)});D(s),n.length&&e(n),g.current&&(g.current.value="")},[d,f,a,b,c,u,p,e,h]),W=s(()=>{d||g.current?.click()},[d]),j=s(()=>D([]),[]);return{inputRef:g,inputProps:{ref:g,type:"file",accept:a||void 0,multiple:f,disabled:d,tabIndex:-1,"aria-hidden":!0,className:"hidden",onChange:e=>A(e.target.files)},zoneProps:d?{}:{onDragEnter:e=>{i(e)&&(e.preventDefault(),L.current+=1,x(!0))},onDragOver:e=>{i(e)&&(e.preventDefault(),y||x(!0))},onDragLeave:e=>{i(e)&&(L.current=Math.max(0,L.current-1),0===L.current&&x(!1))},onDrop:e=>{i(e)&&(e.preventDefault(),L.current=0,x(!1),A(e.dataTransfer.files))}},pasteProps:d?{}:{onPaste:e=>{const t=function(e){const t=e.clipboardData;if(!t)return[];if(t.files&&t.files.length>0)return Array.from(t.files);const r=[];for(const e of Array.from(t.items??[]))if("file"===e.kind){const t=e.getAsFile();t&&r.push(t)}return r}(e);0!==t.length&&(e.preventDefault(),A(t))}},open:W,take:A,dragOver:y,rejections:v,clearRejections:j}}function u({rejections:e,className:t="mt-2"}){return 0===e.length?null:/* @__PURE__ */a("ul",{role:"alert",className:`${t} flex flex-col gap-0.5`,children:e.map(({file:e,message:t},r)=>/* @__PURE__ */a("li",{className:"text-xs text-red-600",children:t},`${e.name}-${r}`))})}export{u as FileIntakeAlert,o as acceptsFile,l as humanSize,c as useFileIntake};
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import{useInsideTooltip as t,Tooltip as e}from"./chunk-RDLWLATO.js";import{useHydrated as r,useBrowserState as n}from"./chunk-D65T4H6J.js";import{Icon as o}from"./chunk-
|
|
2
|
-
return m(A.Provider,{value:t,children:/* @__PURE__ */m(j.Provider,{value:e,children:r})})}function
|
|
3
|
-
return m("span",{className:`${M} px-3 py-0.5 text-xs font-medium ${n}`,children:/* @__PURE__ */m(L,{children:s})})}var
|
|
1
|
+
import{useInsideTooltip as t,Tooltip as e}from"./chunk-RDLWLATO.js";import{useHydrated as r,useBrowserState as n}from"./chunk-D65T4H6J.js";import{Icon as o}from"./chunk-76DRQSJM.js";import{useShellStrings as s}from"./chunk-W7W4JMOT.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 N(){return i(C,x,b)}var D="whitespace-nowrap";function L({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 M="inline-flex max-w-full items-center whitespace-nowrap rounded-full",S={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)]"},E={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?E[t]:S[t]}var A=a({}),j=a(void 0);function I(t){return t.replace(/_/g," ").replace(/\b\w/g,t=>t.toUpperCase())}function F({groups:t,labelFor:e,children:r}){/* @__PURE__ */
|
|
2
|
+
return m(A.Provider,{value:t,children:/* @__PURE__ */m(j.Provider,{value:e,children:r})})}function H(){const t=u(j);return d(e=>t?.(e)??I(e),[t])}function O({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:`${M} px-3 py-0.5 text-xs font-medium ${n}`,children:/* @__PURE__ */m(L,{children:s})})}var P={success:"success",error:"error",warning:"warning",info:"info",404:"info",403:"warning",500:"error"},Z={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"},W={404:t=>t.notFound,403:t=>t.noAccess,500:t=>t.serverError};function z({tone:t}){const e={className:"h-6 w-6",strokeWidth:1.5,"aria-hidden":!0};switch(t){case"success":/* @__PURE__ */
|
|
4
4
|
return m(o,{name:"check",...e});case"error":/* @__PURE__ */
|
|
5
5
|
return m(o,{name:"close",...e});case"warning":/* @__PURE__ */
|
|
6
6
|
return m(o,{name:"error",...e});default:/* @__PURE__ */
|
|
7
|
-
return m(o,{name:"info",...e})}}function
|
|
7
|
+
return m(o,{name:"info",...e})}}function R({status:t="info",title:e,subTitle:r,extra:n,icon:o,children:a,className:i=""}){const l=P[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 ${Z[l]}`,children:o??/* @__PURE__ */m(
|
|
10
|
-
/* @__PURE__ */m("h2",{className:"mt-4 text-lg font-semibold text-gray-900",children:e??
|
|
9
|
+
/* @__PURE__ */m("div",{className:`flex h-14 w-14 items-center justify-center rounded-full ${Z[l]}`,children:o??/* @__PURE__ */m(z,{tone:l})}),
|
|
10
|
+
/* @__PURE__ */m("h2",{className:"mt-4 text-lg font-semibold text-gray-900",children:e??W[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 q({colorClass:t,tone:e,children:r,size:n="sm",capitalize:a=!1,closable:i=!1,onClose:l,closeLabel:c,className:u=""}){const d=t??S[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
11
|
return h("span",{className:[M,"font-medium",f,v,d,u].filter(Boolean).join(" "),children:[
|
|
12
|
-
/* @__PURE__ */m(L,{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
|
|
12
|
+
/* @__PURE__ */m(L,{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 J="undefined"!=typeof window&&"undefined"!=typeof navigator&&/Mac|iPhone|iPad/.test(navigator.platform||navigator.userAgent),K={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"]},U=J?0:1,$=K.MOD[U],B=K.ALT[U],Q="⇧",G="⏎",V=K.CMD_ENTER[U],X=K.CMD_S[U],Y=K.CMD_K[U],tt=K.CMD_DOT[U],et=K.CMD_A[U],rt=K.CMD_Z[U],nt=K.CMD_SHIFT_Z[U],ot=K.ALT_SHIFT_D[U],st=K.ALT_SHIFT_E[U],at=K.ALT_SHIFT_N[U],it=new Map(J?Object.values(K).map(([t,e])=>[t,e]):[]);function lt(t){return r()?t:it.get(t)??t}var ct={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"},ut={sm:"px-1 py-0.5 text-2xs",md:"px-2 py-0.5 text-2xs"};function dt({keys:t,size:e="md",tone:r="neutral",className:n=""}){const o=lt(t);/* @__PURE__ */
|
|
13
13
|
return m("kbd",{className:[ct[r],ut[e],n].filter(Boolean).join(" "),children:o})}var ft=a(null);function mt({value:t,children:e}){/* @__PURE__ */
|
|
14
|
-
return m(ft.Provider,{value:t,children:e})}function ht(t="react-os-shell:prefs",e){const[r,o]=n(()=>{try{const r=JSON.parse(localStorage.getItem(t)||"{}");return{...e??{},...r}}catch{return{...e??{}}}},{...e??{}});return{prefs:r,save:d(e=>{o(r=>{const n={...r,...e};try{localStorage.setItem(t,JSON.stringify(n))}catch{}return n})},[t])}}var vt={prefs:{},save:()=>{}};function gt(){return u(ft)??vt}function pt(){const{prefs:t,save:e}=gt(),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 wt="react-os-shell:stale-chunk-reload-at",xt=3e4,bt="vite:preloadError",yt="/_next/static/",
|
|
14
|
+
return m(ft.Provider,{value:t,children:e})}function ht(t="react-os-shell:prefs",e){const[r,o]=n(()=>{try{const r=JSON.parse(localStorage.getItem(t)||"{}");return{...e??{},...r}}catch{return{...e??{}}}},{...e??{}});return{prefs:r,save:d(e=>{o(r=>{const n={...r,...e};try{localStorage.setItem(t,JSON.stringify(n))}catch{}return n})},[t])}}var vt={prefs:{},save:()=>{}};function gt(){return u(ft)??vt}function pt(){const{prefs:t,save:e}=gt(),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 wt="react-os-shell:stale-chunk-reload-at",xt=3e4,bt="vite:preloadError",yt="/_next/static/",Ct=/Failed to fetch dynamically imported module|error loading dynamically imported module|Importing a module script failed|Unable to preload CSS/i;function _t(t){if(t instanceof Error&&"ChunkLoadError"===t.name)return!0;const e=t instanceof Error?t.message:"string"==typeof t?t:"";return Ct.test(e)}function kt(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(wt),t}catch{return null}}():t.storage,s=void 0===t.chunkPathPrefix?yt:t.chunkPathPrefix,a=t=>{const r=n(),s=function(t){if(!t)return null;try{const e=t.getItem(wt),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(wt,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;_t(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(bt,i),d&&window.addEventListener("error",d,!0),()=>{l=!1,window.removeEventListener(bt,i),d&&window.removeEventListener("error",d,!0)}}export{B as ALT,ot as ALT_SHIFT_D,st as ALT_SHIFT_E,at as ALT_SHIFT_N,et as CMD_A,tt as CMD_DOT,V as CMD_ENTER,Y as CMD_K,X as CMD_S,nt as CMD_SHIFT_Z,rt as CMD_Z,q as ColoredBadge,G as ENTER,S as GROUP_COLORS,E as GROUP_COLORS_SOLID,dt as Kbd,$ as MOD,yt as NEXT_CHUNK_PATH_PREFIX,L as OneLineLabel,R as Result,Q as SHIFT,xt as STALE_CHUNK_RELOAD_COOLDOWN_MS,wt as STALE_CHUNK_RELOAD_KEY,mt as ShellPrefsProvider,O as StatusBadge,F as StatusBadgeProvider,D as TH_ONE_LINE,bt as VITE_PRELOAD_ERROR_EVENT,T as groupColors,kt as installStaleChunkReload,J as isMac,_t as isStaleChunkError,k as useIsMobile,N as useIsPhone,ht as useLocalStoragePrefs,pt as useShellPrefs,gt as useShellPrefsAdapter,lt as useShortcutLabel,H as useStatusLabel};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{Icon as e}from"./chunk-
|
|
1
|
+
import{Icon as e}from"./chunk-76DRQSJM.js";import{useShellStrings as t}from"./chunk-W7W4JMOT.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
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
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{client_default as a}from"./chunk-
|
|
1
|
+
import{client_default as a}from"./chunk-54ZASFCH.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,9 +1,9 @@
|
|
|
1
|
-
import{useCopyText as e,CopyGlyph as n}from"./chunk-
|
|
1
|
+
import{useCopyText as e,CopyGlyph as n}from"./chunk-MHGVLZYL.js";import{PopupMenu as t,PopupMenuItem as r,PopupMenuDivider as l}from"./chunk-YJIG2KT3.js";import{Icon as i}from"./chunk-76DRQSJM.js";import{useShellStrings as a}from"./chunk-W7W4JMOT.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 y}from"react/jsx-runtime";var h="outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-blue-500";function f(){/* @__PURE__ */
|
|
2
2
|
return p(i,{name:"close",look:"mini","aria-hidden":"true",className:"size-3.5"})}function b({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 x({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 g({tabs:e,activeKey:n,idFor:i,panelMounted:d,onActivate:m,onClose:g,onCloseMany:k,label:v,className:N,activeClassName:w,end:C,onIconMenu:$,menuItems:j,sizing:z="even"}){const I=a().pageTabs,[M,D]=o(null),_=e.length;s(()=>{if(!n)return;const e=document.getElementById(i(n,"tab"));e?.scrollIntoView?.({block:"nearest",inline:"nearest"})},[i,n,_]);const
|
|
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 x({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 g({tabs:e,activeKey:n,idFor:i,panelMounted:d,onActivate:m,onClose:g,onCloseMany:k,label:v,className:N,activeClassName:w,end:C,onIconMenu:$,menuItems:j,sizing:z="even"}){const I=a().pageTabs,[M,D]=o(null),_=e.length;s(()=>{if(!n)return;const e=document.getElementById(i(n,"tab"));e?.scrollIntoView?.({block:"nearest",inline:"nearest"})},[i,n,_]);const A=e.some(e=>e.key===n)?n:e[0]?.key,L=n=>{const t=e[(n+e.length)%e.length];t&&document.getElementById(i(t.key,"tab"))?.focus()},T=M?e.find(e=>e.key===M.key):void 0,B=T&&j?j(T.key):[],E=T?e.indexOf(T):-1,R=e=>e.some(e=>!e.pinned),J=e=>()=>{D(null),e()};/* @__PURE__ */
|
|
4
4
|
return u("div",{className:N??"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__ */p("div",{role:"tablist","aria-label":v,onKeyDown:n=>{const t=e.findIndex(e=>document.getElementById(i(e.key,"tab"))===n.target);if(!(t<0)){if("ArrowRight"===n.key)
|
|
6
|
+
/* @__PURE__ */p("div",{role:"tablist","aria-label":v,onKeyDown:n=>{const t=e.findIndex(e=>document.getElementById(i(e.key,"tab"))===n.target);if(!(t<0)){if("ArrowRight"===n.key)L(t+1);else if("ArrowLeft"===n.key)L(t-1);else if("Home"===n.key)L(0);else if("End"===n.key)L(e.length-1);else{if("Delete"!==n.key||e[t].pinned)return;g(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?w??"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",y=r>0&&!l&&e[r-1].key!==n,k={type:"button",role:"tab",id:i(t.key,"tab"),"aria-selected":l,"aria-controls":d?.(t.key)?i(t.key,"panel"):void 0,tabIndex:t.key===A?0:-1,title:t.title,onClick:()=>m(t.key)},v={onContextMenu:e=>((e,n)=>{e.preventDefault(),D({x:e.clientX,y:e.clientY,key:n.key})})(e,t),onAuxClick:e=>((e,n)=>{1!==e.button||n.pinned||(e.preventDefault(),g(n.key))})(e,t),onMouseDown:e=>{1===e.button&&e.preventDefault()}},N=o&&
|
|
7
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"})]}),C=l&&!!$&&!!o;return t.pinned?/* @__PURE__ */p("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}`,...v,children:/* @__PURE__ */u("button",{...k,className:`flex h-full items-center justify-center rounded-t-md ${o?"w-full":"px-3"} ${h}`,children:[N,
|
|
9
9
|
/* @__PURE__ */p("span",{className:o?"sr-only":"whitespace-nowrap text-sm",children:t.title})]})},t.key):/* @__PURE__ */u(c,{children:[y&&/* @__PURE__ */p("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 u("div",{className:N??"relative flex h-10 shrink-0 items-end gap-3 bg-gra
|
|
|
12
12
|
/* @__PURE__ */u("button",{...k,className:`flex h-full min-w-0 flex-1 items-center gap-2 rounded-t-md pr-1 text-left ${C?"pl-2":"pl-3"} ${h} ${l?C?"":"@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:[!C&&N,
|
|
13
13
|
/* @__PURE__ */p("span",{className:`min-w-0 flex-1 overflow-hidden whitespace-nowrap [mask-image:linear-gradient(to_right,#000_calc(100%-1rem),transparent)] ${"active-full"===z&&l?"pr-4":""} ${o?l?"@max-[5rem]:sr-only":"@max-[4.5rem]:sr-only":""}`,children:t.title})]}),l&&t.actions&&/* @__PURE__ */p(x,{node:t.actions}),l&&t.copy&&/* @__PURE__ */p(b,{text:t.copy,label:I.copy(t.copy),copiedLabel:I.copied}),
|
|
14
14
|
/* @__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":I.unsaved,className:"size-2 rounded-full bg-gray-500 group-hover:hidden"}),
|
|
15
|
-
/* @__PURE__ */p("button",{type:"button",tabIndex:-1,"aria-label":I.closeTab?.(t.title)??`${I.close} ${t.title}`,onClick:()=>g(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(f,{})})]})]})]},t.key)})}),C&&/* @__PURE__ */p("div",{className:"flex shrink-0 items-center gap-2 self-center",children:C}),M&&
|
|
15
|
+
/* @__PURE__ */p("button",{type:"button",tabIndex:-1,"aria-label":I.closeTab?.(t.title)??`${I.close} ${t.title}`,onClick:()=>g(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(f,{})})]})]})]},t.key)})}),C&&/* @__PURE__ */p("div",{className:"flex shrink-0 items-center gap-2 self-center",children:C}),M&&T&&/* @__PURE__ */u(t,{portal:!0,style:{left:M.x,top:M.y},onClose:()=>D(null),children:[B.length>0&&/* @__PURE__ */u(y,{children:[B.map((e,n)=>/* @__PURE__ */u(r,{onClick:J(e.onSelect),children:[e.icon,e.label]},n)),
|
|
16
16
|
/* @__PURE__ */p(l,{})]}),
|
|
17
|
-
/* @__PURE__ */p(r,{disabled:
|
|
17
|
+
/* @__PURE__ */p(r,{disabled:T.pinned,onClick:J(()=>g(T.key)),children:I.close}),
|
|
18
18
|
/* @__PURE__ */p(l,{}),
|
|
19
|
-
/* @__PURE__ */p(r,{disabled:!
|
|
20
|
-
/* @__PURE__ */p(r,{disabled:!
|
|
21
|
-
/* @__PURE__ */p(r,{disabled:!
|
|
19
|
+
/* @__PURE__ */p(r,{disabled:!R(e.filter(e=>e.key!==T.key)),onClick:J(()=>k("others",T.key)),children:I.closeOthers}),
|
|
20
|
+
/* @__PURE__ */p(r,{disabled:!R(e.slice(E+1)),onClick:J(()=>k("right",T.key)),children:I.closeRight}),
|
|
21
|
+
/* @__PURE__ */p(r,{disabled:!R(e),onClick:J(()=>k("all",null)),children:I.closeAll})]})]})}export{g as TabStrip};
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import{escapeHtml as e}from"./chunk-BR22X7E5.js";import{TH_ONE_LINE as t}from"./chunk-
|
|
2
|
-
return h("div",{...n,dangerouslySetInnerHTML:r})}function m({columns:e,data:m,onChange:p,onColumnsChange:f,fixedRows:y=!1,minRows:b=15,maxHeight:v="260px",cellStyles:x,onFocusChange:M,onSelectionChange:D}){const k=o(null),C=r().grid,[E,$]=l(null);c(()=>{M?.(E)},[E,M]);const[L,S]=l({}),
|
|
1
|
+
import{escapeHtml as e}from"./chunk-BR22X7E5.js";import{TH_ONE_LINE as t}from"./chunk-KYBZBZEP.js";import{useBrowserLayoutEffect as n}from"./chunk-D65T4H6J.js";import{useShellStrings as r}from"./chunk-W7W4JMOT.js";import{useRef as o,useState as l,useEffect as c,useCallback as a,useMemo as s}from"react";import{createPortal as i}from"react-dom";import{jsxs as u,jsx as h,Fragment as d}from"react/jsx-runtime";function w(e,t){const n=e[e.length-1];return n&&!n.some(e=>e.trim())?e:[...e,Array(t).fill("")]}function g({text:t,...n}){const r=s(()=>({__html:e(t)}),[t]);/* @__PURE__ */
|
|
2
|
+
return h("div",{...n,dangerouslySetInnerHTML:r})}function m({columns:e,data:m,onChange:p,onColumnsChange:f,fixedRows:y=!1,minRows:b=15,maxHeight:v="260px",cellStyles:x,onFocusChange:M,onSelectionChange:D}){const k=o(null),C=r().grid,[E,$]=l(null);c(()=>{M?.(E)},[E,M]);const[L,S]=l({}),z=o(null),[N,A]=l({}),O=o(null),[T,K]=l(null),[R,P]=l(null),[F,I]=l(null),[X,Y]=l(null),[j,H]=l(null),B=o(null);n(()=>{const e=B.current;if(!e||e.row!==j?.row||e.col!==j?.col)return;B.current=null;const t=k.current?.querySelector(`[data-row="${e.row}"][data-col="${e.col}"]`);if(!t)return;t.focus();const n=document.createRange();n.selectNodeContents(t),n.collapse(!1);const r=window.getSelection();r?.removeAllRanges(),r?.addRange(n)},[j]);const[W,q]=l(null),[J,Z]=l(null);c(()=>{D?.(W&&J?{anchor:W,end:J}:null)},[W,J,D]);const _=o(!1),[U,V]=l(null),G=o(!1),Q=o({a:null,e:null});Q.current={a:W,e:J};const ee=W&&J&&(W.row!==J.row||W.col!==J.col),te=[...m];if(!y)for(;te.length<b;)te.push(Array(e.length).fill(""));const ne=a((t,n,r)=>{const o=te.map(e=>[...e]);for(;o.length<=t;)o.push(Array(e.length).fill(""));for(;o[t].length<e.length;)o[t].push("");o[t][n]=r,p(o)},[te,e.length,p]),re=a((e,t,n)=>{if(0!==e.button)return;const r=document.activeElement;if(r?.dataset?.row&&r?.dataset?.col){const e=parseInt(r.dataset.row),t=parseInt(r.dataset.col),n=r.textContent||"";if(n!==(te[e]?.[t]||"")){const r=te.map(e=>[...e]);r[e]&&(r[e][t]=n,p(r))}}_.current=!0,e.shiftKey&&W||q({row:t,col:n}),Z({row:t,col:n})},[te,p,W]),oe=a((e,t)=>{_.current&&Z({row:e,col:t})},[]);c(()=>{const e=()=>{_.current=!1};return window.addEventListener("mouseup",e),()=>window.removeEventListener("mouseup",e)},[]),c(()=>{const e=e=>{if(!e.ctrlKey&&!e.metaKey||"c"!==e.key)return;if(!W||!J)return;const t=window.getSelection();if(t&&t.toString().length>0&&!ee)return;const n=Math.min(W.row,J.row),r=Math.max(W.row,J.row),o=Math.min(W.col,J.col),l=Math.max(W.col,J.col),c=[];for(let e=n;e<=r;e++){const t=[];for(let n=o;n<=l;n++)t.push(te[e]?.[n]||"");c.push(t.join("\t"))}const a=c.join("\n");a&&(e.preventDefault(),navigator.clipboard.writeText(a))};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[W,J,te,ee]),c(()=>{const t=t=>{if(!E)return;const n=document.activeElement;if(n?.isContentEditable)return;if(!k.current?.contains(n))return;const r=t.clipboardData?.getData("text/plain");if(!r)return;t.preventDefault();const o=r.split("\n").filter(e=>e).map(e=>e.split("\t")),l=te.map(e=>[...e]);for(let t=0;t<o.length;t++){const n=E.row+t;for(;l.length<=n;)l.push(Array(e.length).fill(""));for(;l[n].length<e.length;)l[n].push("");for(let r=0;r<o[t].length;r++){const c=E.col+r;if(c>=e.length)break;e[c].readOnly||(l[n][c]=o[t][r].trim())}}p(y?l:w(l,e.length)),q({row:E.row,col:E.col}),Z({row:Math.min(E.row+o.length-1,l.length-1),col:Math.min(E.col+(o[0]?.length||1)-1,e.length-1)})};return window.addEventListener("paste",t),()=>window.removeEventListener("paste",t)},[E,te,e,p,y]);const le=a((t,n,r)=>{const o=t.clipboardData.getData("text/plain");if(!o)return;const l=o.split("\n").map(e=>e.split("\t"));if(l.length<=1&&l[0]?.length<=1)return;t.preventDefault();const c=te.map(e=>[...e]);for(let t=0;t<l.length;t++){const o=n+t;for(;c.length<=o;)c.push(Array(e.length).fill(""));for(;c[o].length<e.length;)c[o].push("");for(let n=0;n<l[t].length;n++){const a=r+n;if(a>=e.length)break;e[a].readOnly||(c[o][a]=l[t][n].trim())}}p(y?c:w(c,e.length))},[te,e,p,y]),ce=a((t,n,r)=>{let o=n,l=r;if("Tab"===t.key)t.preventDefault(),l=t.shiftKey?r-1:r+1,l>=e.length&&(l=0,o=n+1),l<0&&(l=e.length-1,o=n-1);else if("Enter"===t.key)t.preventDefault(),o=t.shiftKey?n-1:n+1;else if("ArrowDown"===t.key)t.preventDefault(),o=n+1;else if("ArrowUp"===t.key)t.preventDefault(),o=n-1;else if("ArrowLeft"===t.key)t.preventDefault(),l=r-1;else{if("ArrowRight"!==t.key){if("Delete"===t.key||"Backspace"===t.key){const o=t.target;if(o.isContentEditable)return void(o.textContent&&window.getSelection()?.toString()===o.textContent&&(t.preventDefault(),ne(n,r,"")));if(t.preventDefault(),W&&J){const t=Math.min(W.row,J.row),n=Math.max(W.row,J.row),r=Math.min(W.col,J.col),o=Math.max(W.col,J.col),l=te.map(e=>[...e]);for(let c=t;c<=n;c++)for(let t=r;t<=o;t++)l[c]&&!e[t]?.readOnly&&(l[c][t]="");p(l)}else ne(n,r,"");return}return}t.preventDefault(),l=r+1}for(;l>=0&&l<e.length&&e[l].readOnly;)l+="Tab"===t.key&&t.shiftKey?-1:1;if(o>=0&&o<te.length&&l>=0&&l<e.length){const e=k.current?.querySelector(`[data-row="${o}"][data-col="${l}"]`);e&&(e.focus({preventScroll:!0}),e.scrollIntoView({block:"nearest",inline:"nearest"}),$({row:o,col:l}),H(null),q({row:o,col:l}),Z({row:o,col:l}))}},[e,te,te.length,ne,W,J,p]),ae=a(t=>{if(!y&&t>=te.length-2){const t=te.map(e=>[...e]);for(let n=0;n<5;n++)t.push(Array(e.length).fill(""));p(t)}},[y,te,e.length,p]),[se,ie]=l(null);c(()=>{if(!se)return;const e=()=>ie(null);return window.addEventListener("pointerdown",e),()=>window.removeEventListener("pointerdown",e)},[se]);const ue=a(t=>{const n=te.map(e=>[...e]);n.splice(t,0,Array(e.length).fill("")),p(n)},[te,e.length,p]),he=a(e=>{if(te.length<=1)return;const t=te.filter((t,n)=>n!==e);p(t)},[te,p]),de=a(e=>{const t=te.map(t=>{const n=[...t];return n.splice(e,0,""),n});p(t)},[te,p]),we=a(t=>{if(e.length<=1)return;const n=te.map(e=>{const n=[...e];return n.splice(t,1),n});p(n)},[te,e.length,p]),ge=a((e,t)=>{e.preventDefault(),y||ie({x:e.clientX,y:e.clientY,items:[{label:C.insertRowAbove,onClick:()=>{ue(t),ie(null)}},{label:C.insertRowBelow,onClick:()=>{ue(t+1),ie(null)}},{label:C.deleteRow(t+1),onClick:()=>{he(t),ie(null)}}]})},[y,ue,he,C]),me=a((t,n)=>{t.preventDefault(),y||ie({x:t.clientX,y:t.clientY,items:[{label:C.insertColumnLeft,onClick:()=>{de(n),ie(null)}},{label:C.insertColumnRight,onClick:()=>{de(n+1),ie(null)}},{label:C.deleteColumn(String(e[n]?.title||n+1)),onClick:()=>{we(n),ie(null)}}]})},[y,e,de,we,C]),pe=t=>L[t]??e[t]?.width??150;c(()=>{const t=e=>{if(!z.current)return;const t=e.clientX-z.current.startX,n=Math.max(40,z.current.startW+t);S(e=>({...e,[z.current.col]:n}))},n=()=>{if(z.current&&f){const t=e.map((e,t)=>({...e,width:L[t]??e.width}));t[z.current.col]={...t[z.current.col],width:L[z.current.col]??e[z.current.col].width},f(t)}z.current=null,document.body.style.cursor=""};return window.addEventListener("mousemove",t),window.addEventListener("mouseup",n),()=>{window.removeEventListener("mousemove",t),window.removeEventListener("mouseup",n)}},[e,L,f]);const fe=e=>N[e]??28;c(()=>{const e=e=>{if(!O.current)return;const t=e.clientY-O.current.startY,n=Math.max(20,O.current.startH+t);A(e=>({...e,[O.current.row]:n}))},t=()=>{O.current=null,document.body.style.cursor=""};return window.addEventListener("mousemove",e),window.addEventListener("mouseup",t),()=>{window.removeEventListener("mousemove",e),window.removeEventListener("mouseup",t)}},[]);const ye=a(t=>{const n=document.createElement("canvas").getContext("2d");if(!n)return;n.font="12px ui-monospace, SFMono-Regular, Menlo, monospace";let r=0;for(const e of te){const o=String(e[t]??"").replace(/<[^>]*>/g,""),l=n.measureText(o).width;l>r&&(r=l)}const o=n.measureText(e[t]?.title??"").width;o>r&&(r=o);const l=Math.max(40,Math.ceil(r+24));if(S(e=>({...e,[t]:l})),f){const n=e.map((e,n)=>({...e,width:n===t?l:L[n]??e.width}));f(n)}},[te,e,L,f]),be=a(e=>{A(t=>{const n={...t};return delete n[e],n})},[]),ve=a(t=>{const{a:n,e:r}=Q.current;if(!n||!r)return;const o=Math.min(n.row,r.row),l=Math.max(n.row,r.row),c=Math.min(n.col,r.col),a=Math.max(n.col,r.col);let s=o,i=l,u=c,h=a;t.row>l?i=t.row:t.row<o&&(s=t.row),t.col>a?h=t.col:t.col<c&&(u=t.col);const d=l-o+1,w=a-c+1,g=te.map(e=>[...e]);for(;g.length<=i;)g.push(Array(e.length).fill(""));for(const e of g)for(;e.length<=h;)e.push("");function m(e){const t=e.map(e=>parseFloat(e));if(t.length<2||t.some(e=>Number.isNaN(e)))return null;const n=t[1]-t[0];for(let e=2;e<t.length;e++)if(Math.abs(t[e]-t[e-1]-n)>1e-9)return null;return{step:n}}for(let e=s;e<=i;e++)for(let t=u;t<=h;t++){if(e>=o&&e<=l&&t>=c&&t<=a)continue;let n;if(1===w&&u===c&&h===a){const r=m(Array.from({length:d},(e,n)=>g[o+n]?.[t]??""));if(r){const c=parseFloat(g[l]?.[t]??"0"),a=parseFloat(g[o]?.[t]??"0"),s=e>l?e-l:-(o-e);n=String((e>l?c:a)+r.step*s)}else{const r=((e-o)%d+d)%d;n=g[o+r]?.[t]??""}}else if(1===d&&s===o&&i===l){const r=m(Array.from({length:w},(t,n)=>g[e]?.[c+n]??""));if(r){const o=parseFloat(g[e]?.[a]??"0"),l=parseFloat(g[e]?.[c]??"0"),s=t>a?t-a:-(c-t);n=String((t>a?o:l)+r.step*s)}else{const r=((t-c)%w+w)%w;n=g[e]?.[c+r]??""}}else{const r=((e-o)%d+d)%d,l=((t-c)%w+w)%w;n=g[o+r]?.[c+l]??""}g[e][t]=n}p(g),q({row:s,col:u}),Z({row:i,col:h})},[te,e.length,p]);c(()=>{const e=e=>{if(!G.current)return;const t=document.elementFromPoint(e.clientX,e.clientY),n=t?.closest?.("[data-row][data-col]");if(!n)return;const r=parseInt(n.dataset.row),o=parseInt(n.dataset.col);V({row:r,col:o})},t=()=>{G.current&&U&&ve(U),G.current=!1,V(null),document.body.style.cursor=""};return window.addEventListener("mousemove",e),window.addEventListener("mouseup",t),()=>{window.removeEventListener("mousemove",e),window.removeEventListener("mouseup",t)}},[U,ve]);const xe=e=>{e.preventDefault(),e.stopPropagation(),G.current=!0,document.body.style.cursor="crosshair"},Me=o(null),[De,ke]=l(0),[Ce,Ee]=l(800);c(()=>{const e=Me.current;if(!e)return;const t=()=>Ee(e.clientHeight||800);t();const n=new ResizeObserver(t);return n.observe(e),()=>n.disconnect()},[]);const $e=te.length>100,Le=$e?Math.max(0,Math.floor(De/28)-20):0,Se=$e?Math.min(te.length,Math.ceil((De+Ce)/28)+20):te.length,ze=s(()=>te.slice(Le,Se),[te,Le,Se]),Ne=28*Le,Ae=28*(te.length-Se),Oe="px-2 h-8 text-left text-xs font-medium text-gray-500 uppercase bg-gray-100 border-b border-r border-gray-200 select-none";/* @__PURE__ */
|
|
3
3
|
return u("div",{ref:Me,className:"border border-gray-300 rounded overflow-scroll grid-scroll",style:{maxHeight:v,height:v},onScroll:e=>ke(e.target.scrollTop),children:[
|
|
4
4
|
/* @__PURE__ */u("table",{ref:k,className:"border-collapse select-none",style:{tableLayout:"fixed",minWidth:36+e.reduce((t,n)=>t+pe(e.indexOf(n)),0)},children:[
|
|
5
5
|
/* @__PURE__ */u("colgroup",{children:[
|
|
6
6
|
/* @__PURE__ */h("col",{style:{width:36}}),e.map((e,t)=>/* @__PURE__ */h("col",{style:{width:pe(t)}},e.key))]}),
|
|
7
7
|
/* @__PURE__ */h("thead",{className:"sticky top-0 z-10",children:/* @__PURE__ */u("tr",{children:[
|
|
8
|
-
/* @__PURE__ */h("th",{className:`${t} ${Oe} text-center w-9 cursor-pointer hover:bg-gray-200`,onClick:()=>{
|
|
9
|
-
return u("th",{className:`${t} ${Oe} cursor-pointer hover:bg-gray-200 relative${o?" !bg-blue-200":""}${
|
|
10
|
-
/* @__PURE__ */h("div",{className:"absolute -right-1 top-0 bottom-0 w-2 cursor-col-resize z-20",onMouseDown:e=>((e,t)=>{e.preventDefault(),e.stopPropagation(),
|
|
11
|
-
/* @__PURE__ */u("tbody",{children:[
|
|
8
|
+
/* @__PURE__ */h("th",{className:`${t} ${Oe} text-center w-9 cursor-pointer hover:bg-gray-200`,onClick:()=>{q({row:0,col:0}),Z({row:te.length-1,col:e.length-1})},title:C.selectAll,children:"#"}),e.map((n,r)=>{const o=W&&J&&Math.min(W.col,J.col)<=r&&r<=Math.max(W.col,J.col)&&0===Math.min(W.row,J.row)&&Math.max(W.row,J.row)===te.length-1;/* @__PURE__ */
|
|
9
|
+
return u("th",{className:`${t} ${Oe} cursor-pointer hover:bg-gray-200 relative${o?" !bg-blue-200":""}${X===r?" !bg-blue-100":""}`,style:{width:pe(r)},draggable:!0,onDragStart:()=>(e=>I(e))(r),onDragOver:e=>((e,t)=>{e.preventDefault(),Y(t)})(e,r),onDrop:()=>(t=>{if(null===F||F===t)return I(null),void Y(null);const n=te.map(e=>{const n=[...e],[r]=n.splice(F,1);return n.splice(t,0,r),n});if(p(n),f){const n=[...e],[r]=n.splice(F,1);n.splice(t,0,r),f(n)}I(null),Y(null)})(r),onDragEnd:()=>{I(null),Y(null)},onClick:e=>{e.shiftKey&&W||q({row:0,col:r}),Z({row:te.length-1,col:r})},onContextMenu:e=>me(e,r),children:[n.title,
|
|
10
|
+
/* @__PURE__ */h("div",{className:"absolute -right-1 top-0 bottom-0 w-2 cursor-col-resize z-20",onMouseDown:e=>((e,t)=>{e.preventDefault(),e.stopPropagation(),z.current={col:t,startX:e.clientX,startW:pe(t)},document.body.style.cursor="col-resize"})(e,r),onDoubleClick:e=>{e.stopPropagation(),ye(r)},title:C.resize})]},n.key)})]})}),
|
|
11
|
+
/* @__PURE__ */u("tbody",{children:[Ne>0&&/* @__PURE__ */h("tr",{style:{height:Ne}}),ze.map((t,n)=>{const r=Le+n,o=W&&J&&Math.min(W.row,J.row)<=r&&r<=Math.max(W.row,J.row)&&0===Math.min(W.col,J.col)&&Math.max(W.col,J.col)===e.length-1;/* @__PURE__ */
|
|
12
12
|
return u("tr",{style:{height:fe(r)},children:[
|
|
13
|
-
/* @__PURE__ */u("td",{className:`relative px-1 py-1 text-center text-2xs text-gray-400 border-b border-r border-gray-200 bg-gray-50 select-none cursor-pointer hover:bg-gray-200${o?" !bg-blue-200 !text-gray-700":""}${
|
|
14
|
-
/* @__PURE__ */h("div",{className:"absolute -bottom-1 left-0 right-0 h-2 cursor-row-resize z-20",onMouseDown:e=>((e,t)=>{e.preventDefault(),e.stopPropagation(),O.current={row:t,startY:e.clientY,startH:fe(t)},document.body.style.cursor="row-resize"})(e,r),onDoubleClick:e=>{e.stopPropagation(),be(r)},title:C.resize})]}),e.map((e,n)=>{const o=
|
|
15
|
-
return u("td",{className:`relative px-0 py-0 border-b border-r border-gray-200 text-sm${e.readOnly?" bg-gray-50 text-gray-500 cursor-default":" cursor-cell"}${o?" !bg-blue-100":""}${c&&!o?" ring-2 ring-inset ring-blue-400":""}${w?" !bg-blue-50 ring-1 ring-inset ring-blue-300":""}`,onMouseDown:e=>{if(e.target===e.currentTarget){re(e,r,n);const t=e.currentTarget.querySelector("[data-row][data-col]");t?.focus()}},onMouseEnter:()=>oe(r,n),onClick:e=>{if(e.target===e.currentTarget){const t=e.currentTarget.querySelector("[data-row][data-col]");t?.focus()}},onDoubleClick:t=>{t.target!==t.currentTarget||e.readOnly||
|
|
16
|
-
/* @__PURE__ */h(g,{contentEditable:l,suppressContentEditableWarning:!0,tabIndex:0,"data-row":r,"data-col":n,className:`w-full h-full px-2 py-1 rosh-focus-ring whitespace-nowrap overflow-hidden ${"right"===e.align?"text-right":"center"===e.align?"text-center":""} ${e.readOnly?"cursor-default":"cursor-cell"} font-mono ${m}${p}`,onMouseDown:e=>re(e,r,n),onMouseEnter:()=>oe(r,n),onDoubleClick:()=>{e.readOnly||
|
|
13
|
+
/* @__PURE__ */u("td",{className:`relative px-1 py-1 text-center text-2xs text-gray-400 border-b border-r border-gray-200 bg-gray-50 select-none cursor-pointer hover:bg-gray-200${o?" !bg-blue-200 !text-gray-700":""}${R===r?" !bg-blue-100":""}`,draggable:!0,onDragStart:()=>(e=>K(e))(r),onDragOver:e=>((e,t)=>{e.preventDefault(),P(t)})(e,r),onDrop:()=>(e=>{if(null===T||T===e)return K(null),void P(null);const t=te.map(e=>[...e]),[n]=t.splice(T,1);t.splice(e,0,n),p(t),K(null),P(null)})(r),onDragEnd:()=>{K(null),P(null)},onClick:t=>{t.shiftKey&&W||q({row:r,col:0}),Z({row:r,col:e.length-1})},onContextMenu:e=>ge(e,r),children:[r+1,
|
|
14
|
+
/* @__PURE__ */h("div",{className:"absolute -bottom-1 left-0 right-0 h-2 cursor-row-resize z-20",onMouseDown:e=>((e,t)=>{e.preventDefault(),e.stopPropagation(),O.current={row:t,startY:e.clientY,startH:fe(t)},document.body.style.cursor="row-resize"})(e,r),onDoubleClick:e=>{e.stopPropagation(),be(r)},title:C.resize})]}),e.map((e,n)=>{const o=W&&J&&function(e,t,n,r){const o=Math.min(e.row,t.row),l=Math.max(e.row,t.row),c=Math.min(e.col,t.col),a=Math.max(e.col,t.col);return n>=o&&n<=l&&r>=c&&r<=a}(W,J,r,n),l=j?.row===r&&j?.col===n&&!e.readOnly,c=E?.row===r&&E?.col===n,a=x?.[`${r}:${n}`],s=W&&J?Math.max(W.row,J.row):-1,i=W&&J?Math.max(W.col,J.col):-1,d=W&&J&&r===s&&n===i,w=G.current&&U&&W&&J&&(()=>{const e=Math.min(W.row,J.row),t=Math.max(W.row,J.row),o=Math.min(W.col,J.col),l=Math.max(W.col,J.col);let c=e,a=t,s=o,i=l;return U.row>t?a=U.row:U.row<e&&(c=U.row),U.col>l?i=U.col:U.col<o&&(s=U.col),r>=c&&r<=a&&n>=s&&n<=i&&!(r>=e&&r<=t&&n>=o&&n<=l)})(),m="sm"===a?.fontSize?"text-2xs":"lg"===a?.fontSize?"text-sm":"xl"===a?.fontSize?"text-base":"text-xs",p=`${a?.bold?" font-bold":""}${a?.italic?" italic":""}${a?.underline?" underline":""}`;/* @__PURE__ */
|
|
15
|
+
return u("td",{className:`relative px-0 py-0 border-b border-r border-gray-200 text-sm${e.readOnly?" bg-gray-50 text-gray-500 cursor-default":" cursor-cell"}${o?" !bg-blue-100":""}${c&&!o?" ring-2 ring-inset ring-blue-400":""}${w?" !bg-blue-50 ring-1 ring-inset ring-blue-300":""}`,onMouseDown:e=>{if(e.target===e.currentTarget){re(e,r,n);const t=e.currentTarget.querySelector("[data-row][data-col]");t?.focus()}},onMouseEnter:()=>oe(r,n),onClick:e=>{if(e.target===e.currentTarget){const t=e.currentTarget.querySelector("[data-row][data-col]");t?.focus()}},onDoubleClick:t=>{t.target!==t.currentTarget||e.readOnly||H({row:r,col:n})},children:[
|
|
16
|
+
/* @__PURE__ */h(g,{contentEditable:l,suppressContentEditableWarning:!0,tabIndex:0,"data-row":r,"data-col":n,className:`w-full h-full px-2 py-1 rosh-focus-ring whitespace-nowrap overflow-hidden ${"right"===e.align?"text-right":"center"===e.align?"text-center":""} ${e.readOnly?"cursor-default":"cursor-cell"} font-mono ${m}${p}`,onMouseDown:e=>re(e,r,n),onMouseEnter:()=>oe(r,n),onDoubleClick:()=>{e.readOnly||H({row:r,col:n})},onFocus:()=>{$({row:r,col:n}),_.current||(q({row:r,col:n}),Z({row:r,col:n}))},onBlur:e=>{const o=e.currentTarget.textContent||"";o!==(t[n]||"")&&ne(r,n,o),H(null)},onInput:()=>ae(r),onPaste:e=>le(e,r,n),onKeyDown:t=>{if(!(l||e.readOnly||1!==t.key.length||t.ctrlKey||t.metaKey||t.altKey))return t.preventDefault(),ne(r,n,t.key),B.current={row:r,col:n},void H({row:r,col:n});ce(t,r,n)},text:t[n]||""}),d&&/* @__PURE__ */h("div",{onMouseDown:xe,title:C.fill,className:"absolute -bottom-[3px] -right-[3px] w-[7px] h-[7px] bg-blue-500 border border-white cursor-crosshair z-30 hover:bg-blue-600"})]},n)})]},r)}),Ae>0&&/* @__PURE__ */h("tr",{style:{height:Ae}})]})]}),se&&i(
|
|
17
17
|
/* @__PURE__ */u(d,{children:[
|
|
18
18
|
/* @__PURE__ */h("div",{className:"fixed inset-0 z-(--z-popup)",onPointerDown:()=>ie(null)}),
|
|
19
19
|
/* @__PURE__ */h("div",{className:"fixed z-(--z-popup) bg-white rounded-lg shadow-lg border border-gray-200 py-1 min-w-[160px]",style:{left:se.x,top:se.y},children:se.items.map((e,t)=>/* @__PURE__ */h("button",{onPointerDown:t=>{t.stopPropagation(),e.onClick()},className:"w-full text-left px-3 min-h-(--row-height-menu) py-2 leading-5 text-sm text-gray-700 hover:bg-gray-100",children:e.label},t))})]}),document.body)]})}export{m as EditableGrid,w as withSpareRow};
|
|
@@ -1,20 +1,20 @@
|
|
|
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-
|
|
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-W7W4JMOT.js";import{SpinnerRing as i,LoadingSpinner as c}from"./chunk-2J6F4EE7.js";import{useState as d,useEffect as u,useRef as p,useMemo as y,useId as f,useCallback as m}from"react";import{jsx as h,jsxs as b}from"react/jsx-runtime";import{createPortal as g}from"react-dom";var k={favicon:"h-8 w-8",compact:"h-10 w-10",wordmark:"h-10 w-40"};function x(e){return e.trim().charAt(0).toLocaleUpperCase()||"·"}function v(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 w={"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 N(e,t,n){return"bare"===e?{}:"framed"===e?{borderRadius:t}:{borderRadius:t,padding:n}}function _({src:e,fallbackSrc:t,fallbackHasAlpha:n=null,fallbackIsLight:r=null,fallbackAdaptive:a,alt:l,slot:o="compact",surface:s="light",size:i,width:c,height:p,decorative:y=!1,fallbackMode:f="monogram",adaptive:m=!1,hasAlpha:b=null,isLight:g=null,treatmentPadding:_=4,treatmentRadius:L=8,className:A="",style:C}){const[E,$]=d(e||t||"");u(()=>{$(e||t||"")},[e,t]);const T=Boolean(t&&E===t&&E!==e),I=(T?a??m:m)?v(T?n:b,T?r:g,s):"bare",j=["inline-flex shrink-0 items-center justify-center overflow-hidden",null==i&&null==c&&null==p?k[o]:"","dark"===s?"text-white":"text-gray-700",w[I],A].filter(Boolean).join(" "),S={...N(I,L,_),...null==i?{width:c,height:p}:{width:i,height:i},...C};return E?/* @__PURE__ */h("span",{className:j,"data-brand-treatment":I,style:S,children:/* @__PURE__ */h("img",{src:E,alt:y?"":l,"data-brand-slot":o,className:"block max-h-full max-w-full",style:{objectFit:"contain"},onError:()=>$(e=>t&&e!==t?t:"")})}):"none"===f?null:/* @__PURE__ */h("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:x(l)})}function L(n,r){return e(n,r)?n.items.filter(n=>e(n,r)&&t(n,r)):[]}function A(e,r){return n(e,r).filter(e=>t(e,r))}function C(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)&&L(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 E(e,t,n){return!!t&&e.some(e=>e.to===t||E(A(e,n),t,n))}var $="__page__";function T(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 I(e,t,n){const r=function(e,t){const n=[],r=e=>{const a=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])L(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:$,entity_id:e.to}))}return l.slice(0,8)},{destinations:r})}function j(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?$:r.entityType,entity_id:r.entityId})}return n}var S="M21 21l-5.197-5.197m0 0A7.5 7.5 0 105.196 5.196a7.5 7.5 0 0010.607 10.607z";function M(e){return e.typeKey??e.type}function R(e,t){return t?.[M(e)]??e.type}function K(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 B(e,t,n,r){return{type:e,label:t,entity_type:$,entity_id:`${n}?search=${encodeURIComponent(r.trim())}`}}function D(e,t,n,r,a){const l=function(e){const t=/* @__PURE__ */new Map;for(const n of e){const e=M(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:B(o,r,l.path,n)})}return{key:`type:${e.key}`,title:o,rows:t,count:e.results.length,truncated:r}}),o=K("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 P(e,t,n){return 0===n?0:Math.min(Math.max(e+t,0),n-1)}var z=(e,t)=>e.entity_type===t.entity_type&&e.entity_id===t.entity_id;function F(e,t,n=8){return[t,...e.filter(e=>!z(e,t))].slice(0,n)}function H(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=>z(e,r))||t.push(r)}return t.slice(0,8)}function U(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 W=[];function O(e,t,n){const[r,a]=d([]),[l,o]=d(W),[s,i]=d(!1),[c,y]=d("none"),f=p(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}}());u(()=>{const r=f.current;if(e.length<n||!t||0===t.length)return r.cancel(),a(e=>0===e.length?e:[]),o(W),y("none"),void i(!1);i(!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,...U(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),y(0===l.failed?"none":l.failed>=t.length?"all":"some"),i(!1))},250);return()=>{clearTimeout(l),r.cancel()}},[e,t,n]);return{results:r,truncatedTypes:l,loading:s,failure:c,reset:m(()=>{f.current.cancel(),a(e=>0===e.length?e:[]),o(W),y("none"),i(!1)},[])}}var G=(e,t)=>`${e}-opt-${t}`;function J(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??S;if(e.icon)return e.icon;const n=t?.[M(e.result)];return n||S}function V({sections:e,activeIdx:t,listId:n,label:r,typeIcons:a,groupCount:l,groupLabel:o,onHover:s,onPick:i}){let c=0;/* @__PURE__ */
|
|
2
2
|
return h("div",{id:n,role:"listbox","aria-label":r,className:"py-1",children:e.map(e=>/* @__PURE__ */b("div",{role:"group","aria-label":o(e.title,e.count,!!e.truncated),children:[
|
|
3
3
|
/* @__PURE__ */b("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__ */h("span",{children:e.title}),
|
|
5
5
|
/* @__PURE__ */h("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 b("div",{id:
|
|
7
|
-
/* @__PURE__ */h("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__ */h("path",{strokeLinecap:"round",strokeLinejoin:"round",d:
|
|
6
|
+
return b("div",{id:G(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__ */h("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__ */h("path",{strokeLinecap:"round",strokeLinejoin:"round",d:J(e,a)})}),
|
|
8
8
|
/* @__PURE__ */b("div",{className:"flex-1 min-w-0",children:[
|
|
9
|
-
/* @__PURE__ */h("p",{className:"text-sm font-medium truncate "+(u?"text-blue-600":"text-gray-900"),children:e.label}),d&&/* @__PURE__ */h("p",{className:"text-xs text-gray-400 truncate",children:d})]}),o&&/* @__PURE__ */h("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
|
|
9
|
+
/* @__PURE__ */h("p",{className:"text-sm font-medium truncate "+(u?"text-blue-600":"text-gray-900"),children:e.label}),d&&/* @__PURE__ */h("p",{className:"text-xs text-gray-400 truncate",children:d})]}),o&&/* @__PURE__ */h("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 X="react-os-shell:open-global-search";function q(){"undefined"!=typeof window&&window.dispatchEvent(new CustomEvent(X))}function Q({providers:e,typeIcons:t,typeLabels:n,listRoutes:r,placeholder:k,quickActions:x,onSelect:v,recent:w,onRecord:N,favorites:_,hotkey:L=!0}={}){const A=s().search,C=k??A.placeholder,[E,$]=d(!1),[T,I]=d(""),[j,M]=d(0),B=p(null),{results:z,truncatedTypes:F,loading:H,failure:U,reset:W}=O(T,e,2);u(()=>{const e=e=>{L&&!e.defaultPrevented&&(e.ctrlKey||e.metaKey)&&"k"===e.key&&(e.preventDefault(),$(e=>!e)),"Escape"===e.key&&E&&$(!1)},t=()=>$(!0);return window.addEventListener("keydown",e),window.addEventListener(X,t),()=>{window.removeEventListener("keydown",e),window.removeEventListener(X,t)}},[E,L]),a(E);const[J,q]=d(!1);E!==J&&(q(E),E&&(I(""),M(0),W())),u(()=>{E?setTimeout(()=>B.current?.focus(),50):I("")},[E]),u(()=>{M(0)},[z]);const Q=T.length>=2,Y=y(()=>Q?D(z,x,T,A.actions,{truncatedTypes:F,listRoutes:r,typeLabels:n,seeAllLabel:A.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:R(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:R(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=K("actions",t.actions,e.actions??[]);return r&&n.push(r),n}({recent:w,favorites:_,actions:x,typeLabels:n},A),[Q,z,F,r,n,x,T,w,_,A]),Z=y(()=>function(e){return e.flatMap(e=>e.rows)}(Y),[Y]),ee=Math.min(j,Math.max(Z.length-1,0)),te=f(),ne=Z.length>0;u(()=>{E&&0!==Z.length&&document.getElementById(G(te,ee))?.scrollIntoView?.({block:"nearest"})},[E,ee,Z.length,te]);const re=m(e=>{$(!1),"action"!==e.kind?("result"!==e.kind&&"recent"!==e.kind||N?.(e.result),v?.(e.result)):e.action.onSelect()},[v,N]);return E?g(
|
|
10
10
|
/* @__PURE__ */b("div",{"data-global-search":"",className:"fixed inset-0 flex items-start justify-center pt-[15vh]",style:{zIndex:o.overlay},onClick:()=>$(!1),children:[
|
|
11
11
|
/* @__PURE__ */h("div",{"data-global-search-backdrop":"",className:"absolute inset-0 bg-black/50 backdrop-blur-sm"}),
|
|
12
12
|
/* @__PURE__ */b("div",{className:"relative z-10 w-full max-w-xl rounded-(--radius-popup) overflow-hidden",onClick:e=>e.stopPropagation(),style:l(),children:[
|
|
13
13
|
/* @__PURE__ */b("div",{className:"flex items-center gap-3 px-4 py-3 border-b border-gray-200",children:[
|
|
14
14
|
/* @__PURE__ */h("svg",{className:"h-5 w-5 text-gray-400 shrink-0",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:/* @__PURE__ */h("path",{strokeLinecap:"round",strokeLinejoin:"round",d:S})}),
|
|
15
|
-
/* @__PURE__ */h("input",{ref:B,type:"text",value:
|
|
15
|
+
/* @__PURE__ */h("input",{ref:B,type:"text",value:T,onChange:e=>{I(e.target.value),M(0)},onKeyDown:e=>{"ArrowDown"===e.key?(e.preventDefault(),M(P(ee,1,Z.length))):"ArrowUp"===e.key?(e.preventDefault(),M(P(ee,-1,Z.length))):"Tab"===e.key&&Z.length>0?(e.preventDefault(),M(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]}(Y.map(e=>e.rows.length),ee,e.shiftKey?-1:1))):"Enter"===e.key&&Z[ee]&&re(Z[ee])},placeholder:C,role:"combobox","aria-expanded":ne,"aria-controls":ne?te:void 0,"aria-activedescendant":ne?G(te,ee):void 0,"aria-autocomplete":"list",className:"flex-1 text-sm bg-transparent border-0 rosh-focus-ring placeholder-gray-400"}),H&&/* @__PURE__ */h("span",{"data-global-search-spinner":"",role:"status","aria-label":A.searching,className:"flex shrink-0",children:/* @__PURE__ */h(i,{className:"h-4 w-4",ink:"text-gray-500"})}),
|
|
16
16
|
/* @__PURE__ */h("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:A.escBadge})]}),
|
|
17
|
-
/* @__PURE__ */b("div",{className:"max-h-[50vh] overflow-y-auto",children:[
|
|
17
|
+
/* @__PURE__ */b("div",{className:"max-h-[50vh] overflow-y-auto",children:[H&&0===Z.length&&/* @__PURE__ */h(c,{size:"sm",padding:"py-6",label:A.searching}),!H&&"all"===U&&Q&&/* @__PURE__ */h("div",{role:"alert",className:"px-4 py-3 text-center text-sm text-red-600",children:A.searchFailed}),!H&&Q&&0===Z.length&&"all"!==U&&/* @__PURE__ */h("div",{className:"px-4 py-6 text-center text-sm text-gray-400",children:A.noResults}),ne&&/* @__PURE__ */h(V,{sections:Y,activeIdx:ee,listId:te,label:A.listLabel,typeIcons:t,groupCount:A.groupCount,groupLabel:A.groupLabel,onHover:M,onPick:re}),!H&&"some"===U&&Q&&/* @__PURE__ */h("div",{role:"status",className:"px-4 py-2 text-xs text-amber-600",children:A.partialFailure}),!H&&!Q&&0===Z.length&&/* @__PURE__ */h("div",{className:"px-4 py-6 text-center text-sm text-gray-400",children:A.minChars(2)})]}),
|
|
18
18
|
/* @__PURE__ */b("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__ */b("div",{className:"flex items-center gap-3",children:[
|
|
20
20
|
/* @__PURE__ */b("span",{className:"flex items-center gap-1",children:[
|
|
@@ -24,4 +24,4 @@ return b("div",{id:O(n,r),role:"option","aria-selected":l,className:"flex items-
|
|
|
24
24
|
/* @__PURE__ */h("kbd",{className:"rounded border border-gray-300 px-1 py-0.5 font-medium",children:A.enterKey}),` ${A.open}`]}),Y.length>1&&/* @__PURE__ */b("span",{className:"flex items-center gap-1",children:[
|
|
25
25
|
/* @__PURE__ */h("kbd",{className:"rounded border border-gray-300 px-1 py-0.5 font-medium",children:A.tabKey}),` ${A.nextGroup}`]})]}),
|
|
26
26
|
/* @__PURE__ */b("span",{className:"flex items-center gap-1",children:[
|
|
27
|
-
/* @__PURE__ */h("kbd",{className:"rounded border border-gray-300 px-1 py-0.5 font-medium",children:A.escKey}),` ${A.close}`]})]})]})]}),document.body):null}export{_ as BrandMark,Q as GlobalSearch,$ as PAGE_RESULT_ENTITY,j as favoritesToResults,
|
|
27
|
+
/* @__PURE__ */h("kbd",{className:"rounded border border-gray-300 px-1 py-0.5 font-medium",children:A.escKey}),` ${A.close}`]})]})]})]}),document.body):null}export{_ as BrandMark,Q as GlobalSearch,$ as PAGE_RESULT_ENTITY,j as favoritesToResults,I as navPagesProvider,q as openGlobalSearch,T as parsePageResultTarget,C as partitionNav,F as pushRecent,v as resolveBrandMarkTreatment,E as rowsContainRoute,H as sanitizeRecent,A as visibleNavChildren,L as visibleSectionItems};
|