efficient-shell 5.6.1 → 6.4.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.
Files changed (112) hide show
  1. package/README.md +184 -44
  2. package/THIRD_PARTY_NOTICES.md +212 -0
  3. package/dist/Browser-USPZWDYH.js +43 -0
  4. package/dist/Calculator-FP5HUWCW.js +29 -0
  5. package/dist/ConfirmDialog-3TIHKJRT.js +1 -0
  6. package/dist/{CurrencyConverter-2IGOOR3I.js → CurrencyConverter-XD5LYOCD.js} +8 -8
  7. package/dist/Documents-ADFEHEUW.js +52 -0
  8. package/dist/Files-BVUVRNC5.js +87 -0
  9. package/dist/Notepad-WJI5ODGS.js +25 -0
  10. package/dist/PdfViewer-226I3LSD.js +1 -0
  11. package/dist/PomodoroTimer-GEMQHIPJ.js +91 -0
  12. package/dist/Preview-HNSEYNZL.js +182 -0
  13. package/dist/Sidebar-PVHZPNIY.js +44 -0
  14. package/dist/{Spreadsheet-SRAUU3OA.js → Spreadsheet-6Z5ACGTT.js} +14 -14
  15. package/dist/{Stock-7EKOAQ7C.js → Stock-X3LIU4ZX.js} +4 -4
  16. package/dist/{Weather-RWI6NKB2.js → Weather-BLO354GM.js} +14 -14
  17. package/dist/{WorldClock-CEHWDFEO.js → WorldClock-BAH7QFRG.js} +7 -7
  18. package/dist/apps/index.js +1 -1
  19. package/dist/bin/ui-check.js +1 -1
  20. package/dist/brand.css +1 -1
  21. package/dist/chunk-2SSRFEOZ.js +91 -0
  22. package/dist/{chunk-TFETN2GI.js → chunk-4JZZLUGG.js} +1 -1
  23. package/dist/{chunk-GG7AE6OC.js → chunk-5K76RQML.js} +1 -1
  24. package/dist/chunk-5LUN632W.js +5 -0
  25. package/dist/chunk-5MDQNFOG.js +9 -0
  26. package/dist/chunk-7IQ3B77H.js +1 -0
  27. package/dist/{chunk-SKB6L53D.js → chunk-7PGHRG6J.js} +9 -9
  28. package/dist/chunk-CXJQ42XT.js +21 -0
  29. package/dist/chunk-DBXZS7OA.js +29 -0
  30. package/dist/{chunk-X4FJ54PP.js → chunk-FIEA5CGB.js} +1 -1
  31. package/dist/chunk-GJ37JCC2.js +1 -0
  32. package/dist/{chunk-KXAUDC3A.js → chunk-GWDVD3VQ.js} +27 -27
  33. package/dist/chunk-HQLAISFX.js +11 -0
  34. package/dist/chunk-I2H2CKID.js +3 -0
  35. package/dist/{chunk-YIH6JLMV.js → chunk-I534M65N.js} +2 -2
  36. package/dist/{chunk-WWF2EQXF.js → chunk-IHZL3GJU.js} +1 -1
  37. package/dist/chunk-K6DKX55N.js +1 -0
  38. package/dist/chunk-KNUR2UEG.js +1 -0
  39. package/dist/{chunk-JXAAZGLJ.js → chunk-MORDXCV6.js} +1 -1
  40. package/dist/chunk-PFKMIPZH.js +1028 -0
  41. package/dist/chunk-PJPK2ADX.js +1 -0
  42. package/dist/chunk-Q5O5UMJY.js +6 -0
  43. package/dist/chunk-QJHWLDEN.js +108 -0
  44. package/dist/chunk-R5VRLW5Z.js +1 -0
  45. package/dist/chunk-S3LGKIZ3.js +12 -0
  46. package/dist/chunk-SBF5A6XV.js +1 -0
  47. package/dist/chunk-SK5DL6JX.js +24 -0
  48. package/dist/{chunk-CLPJDJH4.js → chunk-UUYPUKP7.js} +1 -1
  49. package/dist/{chunk-AFYQTVZO.js → chunk-UVBK6YSR.js} +1 -1
  50. package/dist/chunk-VR6TR575.js +13 -0
  51. package/dist/{chunk-7WC3EOFS.js → chunk-XO2AMGVU.js} +1 -1
  52. package/dist/{chunk-N3A3GWJI.js → chunk-YX2IMURA.js} +12 -12
  53. package/dist/chunk-ZEIKSMFR.js +10 -0
  54. package/dist/client-DLm3Fvbc.d.ts +65 -0
  55. package/dist/file-intake/index.js +1 -1
  56. package/dist/i18n/index.d.ts +1 -1
  57. package/dist/icons/efficient-looks.d.ts +1 -1
  58. package/dist/icons/efficient.d.ts +1 -1
  59. package/dist/icons/index.d.ts +12 -12
  60. package/dist/icons/index.js +1 -1
  61. package/dist/{index-ZI6vl2Wq.d.ts → index-D5bms_uA.d.ts} +186 -76
  62. package/dist/index.d.ts +6 -4
  63. package/dist/index.js +639 -639
  64. package/dist/locales/zh-Hans.d.ts +1 -1
  65. package/dist/locales/zh-Hans.js +1 -1
  66. package/dist/map/index.js +22 -22
  67. package/dist/markdown/index.js +6 -6
  68. package/dist/markup/index.d.ts +460 -36
  69. package/dist/markup/index.js +1 -1
  70. package/dist/page-tabs/index.js +5 -5
  71. package/dist/pdf/index.js +1 -1
  72. package/dist/{registry-J-TU7zKx.d.ts → registry-Dw6QO2Ch.d.ts} +12 -9
  73. package/dist/{strings-BVB64Nck.d.ts → strings-fYzxZPn4.d.ts} +5 -0
  74. package/dist/telemetry/index.d.ts +39 -0
  75. package/dist/telemetry/index.js +1 -0
  76. package/dist/ui/index.d.ts +4 -3
  77. package/dist/ui/index.js +1 -1
  78. package/dist/ui.css +62 -21
  79. package/package.json +7 -21
  80. package/dist/Browser-RXGEZ77D.js +0 -43
  81. package/dist/Calculator-MVPKTZZF.js +0 -29
  82. package/dist/ConfirmDialog-XOYCYFA7.js +0 -1
  83. package/dist/Documents-YBLR7WVX.js +0 -52
  84. package/dist/Files-7XNR5IL2.js +0 -87
  85. package/dist/Notepad-ZQYQXV75.js +0 -25
  86. package/dist/PdfViewer-SQVMMA7B.js +0 -1
  87. package/dist/PomodoroTimer-XIUN4M73.js +0 -91
  88. package/dist/Preview-YCOA5JPP.js +0 -182
  89. package/dist/Sidebar-VI7E3EKI.js +0 -44
  90. package/dist/chunk-3HJTOINK.js +0 -1
  91. package/dist/chunk-4SWPNARR.js +0 -5
  92. package/dist/chunk-5ABLFFC5.js +0 -24
  93. package/dist/chunk-6LTDJKIL.js +0 -138
  94. package/dist/chunk-F6B3J3GW.js +0 -6
  95. package/dist/chunk-HZZNJHRH.js +0 -1
  96. package/dist/chunk-IMMHJIV5.js +0 -29
  97. package/dist/chunk-OGXU7QFW.js +0 -12
  98. package/dist/chunk-P4CIOJHP.js +0 -3
  99. package/dist/chunk-RBDGN4YU.js +0 -9
  100. package/dist/chunk-RC2EG6P4.js +0 -1026
  101. package/dist/chunk-RL626E7Q.js +0 -13
  102. package/dist/chunk-RMJZOKHY.js +0 -10
  103. package/dist/chunk-SFCDHHQP.js +0 -1
  104. package/dist/chunk-TNBCUZVE.js +0 -1
  105. package/dist/chunk-VWBQ2P5G.js +0 -108
  106. package/dist/chunk-XWSWYMGM.js +0 -2
  107. package/dist/chunk-YGC7AX3X.js +0 -11
  108. package/dist/chunk-Z7D6Y5WA.js +0 -21
  109. package/dist/icons/heroicons.d.ts +0 -6
  110. package/dist/icons/heroicons.js +0 -1
  111. package/dist/icons/lucide.d.ts +0 -6
  112. package/dist/icons/lucide.js +0 -1
@@ -1,19 +1,19 @@
1
- import{escapeHtml as e}from"./chunk-BR22X7E5.js";import{useBrowserLayoutEffect as t}from"./chunk-D65T4H6J.js";import{useShellStrings as n}from"./chunk-TNBCUZVE.js";import{useRef as r,useState as o,useEffect as l,useCallback as c,useMemo as a}from"react";import{createPortal as s}from"react-dom";import{jsxs as i,jsx as u,Fragment as d}from"react/jsx-runtime";function h(e,t){const n=e[e.length-1];return n&&!n.some(e=>e.trim())?e:[...e,Array(t).fill("")]}function w({text:t,...n}){const r=a(()=>({__html:e(t)}),[t]);/* @__PURE__ */
2
- return u("div",{...n,dangerouslySetInnerHTML:r})}function g({columns:e,data:g,onChange:m,onColumnsChange:f,fixedRows:p=!1,minRows:y=15,maxHeight:b="260px",cellStyles:v,onFocusChange:x,onSelectionChange:M}){const D=r(null),k=n().grid,[C,E]=o(null);l(()=>{x?.(C)},[C,x]);const[L,S]=o({}),$=r(null),[N,A]=o({}),z=r(null),[T,O]=o(null),[R,K]=o(null),[P,F]=o(null),[I,X]=o(null),[H,Y]=o(null),j=r(null);t(()=>{const e=j.current;if(!e||e.row!==H?.row||e.col!==H?.col)return;j.current=null;const t=D.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)},[H]);const[B,q]=o(null),[W,U]=o(null);l(()=>{M?.(B&&W?{anchor:B,end:W}:null)},[B,W,M]);const V=r(!1),[_,J]=o(null),Z=r(!1),G=r({a:null,e:null});G.current={a:B,e:W};const Q=B&&W&&(B.row!==W.row||B.col!==W.col),ee=[...g];if(!p)for(;ee.length<y;)ee.push(Array(e.length).fill(""));const te=c((t,n,r)=>{const o=ee.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,m(o)},[ee,e.length,m]),ne=c((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!==(ee[e]?.[t]||"")){const r=ee.map(e=>[...e]);r[e]&&(r[e][t]=n,m(r))}}V.current=!0,e.shiftKey&&B||q({row:t,col:n}),U({row:t,col:n})},[ee,m,B]),re=c((e,t)=>{V.current&&U({row:e,col:t})},[]);l(()=>{const e=()=>{V.current=!1};return window.addEventListener("mouseup",e),()=>window.removeEventListener("mouseup",e)},[]),l(()=>{const e=e=>{if(!e.ctrlKey&&!e.metaKey||"c"!==e.key)return;if(!B||!W)return;const t=window.getSelection();if(t&&t.toString().length>0&&!Q)return;const n=Math.min(B.row,W.row),r=Math.max(B.row,W.row),o=Math.min(B.col,W.col),l=Math.max(B.col,W.col),c=[];for(let e=n;e<=r;e++){const t=[];for(let n=o;n<=l;n++)t.push(ee[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)},[B,W,ee,Q]),l(()=>{const t=t=>{if(!C)return;const n=document.activeElement;if(n?.isContentEditable)return;if(!D.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=ee.map(e=>[...e]);for(let t=0;t<o.length;t++){const n=C.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=C.col+r;if(c>=e.length)break;e[c].readOnly||(l[n][c]=o[t][r].trim())}}m(p?l:h(l,e.length)),q({row:C.row,col:C.col}),U({row:Math.min(C.row+o.length-1,l.length-1),col:Math.min(C.col+(o[0]?.length||1)-1,e.length-1)})};return window.addEventListener("paste",t),()=>window.removeEventListener("paste",t)},[C,ee,e,m,p]);const oe=c((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=ee.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())}}m(p?c:h(c,e.length))},[ee,e,m,p]),le=c((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(),te(n,r,"")));if(t.preventDefault(),B&&W){const t=Math.min(B.row,W.row),n=Math.max(B.row,W.row),r=Math.min(B.col,W.col),o=Math.max(B.col,W.col),l=ee.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]="");m(l)}else te(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<ee.length&&l>=0&&l<e.length){const e=D.current?.querySelector(`[data-row="${o}"][data-col="${l}"]`);e&&(e.focus({preventScroll:!0}),e.scrollIntoView({block:"nearest",inline:"nearest"}),E({row:o,col:l}),Y(null),q({row:o,col:l}),U({row:o,col:l}))}},[e,ee,ee.length,te,B,W,m]),ce=c(t=>{if(!p&&t>=ee.length-2){const t=ee.map(e=>[...e]);for(let n=0;n<5;n++)t.push(Array(e.length).fill(""));m(t)}},[p,ee,e.length,m]),[ae,se]=o(null);l(()=>{if(!ae)return;const e=()=>se(null);return window.addEventListener("pointerdown",e),()=>window.removeEventListener("pointerdown",e)},[ae]);const ie=c(t=>{const n=ee.map(e=>[...e]);n.splice(t,0,Array(e.length).fill("")),m(n)},[ee,e.length,m]),ue=c(e=>{if(ee.length<=1)return;const t=ee.filter((t,n)=>n!==e);m(t)},[ee,m]),de=c(e=>{const t=ee.map(t=>{const n=[...t];return n.splice(e,0,""),n});m(t)},[ee,m]),he=c(t=>{if(e.length<=1)return;const n=ee.map(e=>{const n=[...e];return n.splice(t,1),n});m(n)},[ee,e.length,m]),we=c((e,t)=>{e.preventDefault(),p||se({x:e.clientX,y:e.clientY,items:[{label:k.insertRowAbove,onClick:()=>{ie(t),se(null)}},{label:k.insertRowBelow,onClick:()=>{ie(t+1),se(null)}},{label:k.deleteRow(t+1),onClick:()=>{ue(t),se(null)}}]})},[p,ie,ue,k]),ge=c((t,n)=>{t.preventDefault(),p||se({x:t.clientX,y:t.clientY,items:[{label:k.insertColumnLeft,onClick:()=>{de(n),se(null)}},{label:k.insertColumnRight,onClick:()=>{de(n+1),se(null)}},{label:k.deleteColumn(String(e[n]?.title||n+1)),onClick:()=>{he(n),se(null)}}]})},[p,e,de,he,k]),me=t=>L[t]??e[t]?.width??150;l(()=>{const t=e=>{if(!$.current)return;const t=e.clientX-$.current.startX,n=Math.max(40,$.current.startW+t);S(e=>({...e,[$.current.col]:n}))},n=()=>{if($.current&&f){const t=e.map((e,t)=>({...e,width:L[t]??e.width}));t[$.current.col]={...t[$.current.col],width:L[$.current.col]??e[$.current.col].width},f(t)}$.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;l(()=>{const e=e=>{if(!z.current)return;const t=e.clientY-z.current.startY,n=Math.max(20,z.current.startH+t);A(e=>({...e,[z.current.row]:n}))},t=()=>{z.current=null,document.body.style.cursor=""};return window.addEventListener("mousemove",e),window.addEventListener("mouseup",t),()=>{window.removeEventListener("mousemove",e),window.removeEventListener("mouseup",t)}},[]);const pe=c(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 ee){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)}},[ee,e,L,f]),ye=c(e=>{A(t=>{const n={...t};return delete n[e],n})},[]),be=c(t=>{const{a:n,e:r}=G.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,d=a;t.row>l?i=t.row:t.row<o&&(s=t.row),t.col>a?d=t.col:t.col<c&&(u=t.col);const h=l-o+1,w=a-c+1,g=ee.map(e=>[...e]);for(;g.length<=i;)g.push(Array(e.length).fill(""));for(const e of g)for(;e.length<=d;)e.push("");function f(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<=d;t++){if(e>=o&&e<=l&&t>=c&&t<=a)continue;let n;if(1===w&&u===c&&d===a){const r=f(Array.from({length:h},(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)%h+h)%h;n=g[o+r]?.[t]??""}}else if(1===h&&s===o&&i===l){const r=f(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)%h+h)%h,l=((t-c)%w+w)%w;n=g[o+r]?.[c+l]??""}g[e][t]=n}m(g),q({row:s,col:u}),U({row:i,col:d})},[ee,e.length,m]);l(()=>{const e=e=>{if(!Z.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);J({row:r,col:o})},t=()=>{Z.current&&_&&be(_),Z.current=!1,J(null),document.body.style.cursor=""};return window.addEventListener("mousemove",e),window.addEventListener("mouseup",t),()=>{window.removeEventListener("mousemove",e),window.removeEventListener("mouseup",t)}},[_,be]);const ve=e=>{e.preventDefault(),e.stopPropagation(),Z.current=!0,document.body.style.cursor="crosshair"},xe=r(null),[Me,De]=o(0),[ke,Ce]=o(800);l(()=>{const e=xe.current;if(!e)return;const t=()=>Ce(e.clientHeight||800);t();const n=new ResizeObserver(t);return n.observe(e),()=>n.disconnect()},[]);const Ee=ee.length>100,Le=Ee?Math.max(0,Math.floor(Me/28)-20):0,Se=Ee?Math.min(ee.length,Math.ceil((Me+ke)/28)+20):ee.length,$e=a(()=>ee.slice(Le,Se),[ee,Le,Se]),Ne=28*Le,Ae=28*(ee.length-Se),ze="px-2 py-1.5 text-left text-xs font-medium text-gray-500 uppercase bg-gray-100 border-b border-r border-gray-200 select-none";/* @__PURE__ */
1
+ import{escapeHtml as e}from"./chunk-BR22X7E5.js";import{useBrowserLayoutEffect as t}from"./chunk-D65T4H6J.js";import{useShellStrings as n}from"./chunk-K6DKX55N.js";import{useRef as r,useState as o,useEffect as l,useCallback as c,useMemo as a}from"react";import{createPortal as s}from"react-dom";import{jsxs as i,jsx as u,Fragment as d}from"react/jsx-runtime";function h(e,t){const n=e[e.length-1];return n&&!n.some(e=>e.trim())?e:[...e,Array(t).fill("")]}function w({text:t,...n}){const r=a(()=>({__html:e(t)}),[t]);/* @__PURE__ */
2
+ return u("div",{...n,dangerouslySetInnerHTML:r})}function g({columns:e,data:g,onChange:m,onColumnsChange:p,fixedRows:f=!1,minRows:y=15,maxHeight:b="260px",cellStyles:v,onFocusChange:x,onSelectionChange:M}){const D=r(null),k=n().grid,[C,E]=o(null);l(()=>{x?.(C)},[C,x]);const[L,S]=o({}),$=r(null),[N,z]=o({}),A=r(null),[K,O]=o(null),[T,R]=o(null),[P,F]=o(null),[X,I]=o(null),[H,Y]=o(null),j=r(null);t(()=>{const e=j.current;if(!e||e.row!==H?.row||e.col!==H?.col)return;j.current=null;const t=D.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)},[H]);const[q,B]=o(null),[W,_]=o(null);l(()=>{M?.(q&&W?{anchor:q,end:W}:null)},[q,W,M]);const J=r(!1),[U,V]=o(null),G=r(!1),Q=r({a:null,e:null});Q.current={a:q,e:W};const Z=q&&W&&(q.row!==W.row||q.col!==W.col),ee=[...g];if(!f)for(;ee.length<y;)ee.push(Array(e.length).fill(""));const te=c((t,n,r)=>{const o=ee.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,m(o)},[ee,e.length,m]),ne=c((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!==(ee[e]?.[t]||"")){const r=ee.map(e=>[...e]);r[e]&&(r[e][t]=n,m(r))}}J.current=!0,e.shiftKey&&q||B({row:t,col:n}),_({row:t,col:n})},[ee,m,q]),re=c((e,t)=>{J.current&&_({row:e,col:t})},[]);l(()=>{const e=()=>{J.current=!1};return window.addEventListener("mouseup",e),()=>window.removeEventListener("mouseup",e)},[]),l(()=>{const e=e=>{if(!e.ctrlKey&&!e.metaKey||"c"!==e.key)return;if(!q||!W)return;const t=window.getSelection();if(t&&t.toString().length>0&&!Z)return;const n=Math.min(q.row,W.row),r=Math.max(q.row,W.row),o=Math.min(q.col,W.col),l=Math.max(q.col,W.col),c=[];for(let e=n;e<=r;e++){const t=[];for(let n=o;n<=l;n++)t.push(ee[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)},[q,W,ee,Z]),l(()=>{const t=t=>{if(!C)return;const n=document.activeElement;if(n?.isContentEditable)return;if(!D.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=ee.map(e=>[...e]);for(let t=0;t<o.length;t++){const n=C.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=C.col+r;if(c>=e.length)break;e[c].readOnly||(l[n][c]=o[t][r].trim())}}m(f?l:h(l,e.length)),B({row:C.row,col:C.col}),_({row:Math.min(C.row+o.length-1,l.length-1),col:Math.min(C.col+(o[0]?.length||1)-1,e.length-1)})};return window.addEventListener("paste",t),()=>window.removeEventListener("paste",t)},[C,ee,e,m,f]);const oe=c((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=ee.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())}}m(f?c:h(c,e.length))},[ee,e,m,f]),le=c((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(),te(n,r,"")));if(t.preventDefault(),q&&W){const t=Math.min(q.row,W.row),n=Math.max(q.row,W.row),r=Math.min(q.col,W.col),o=Math.max(q.col,W.col),l=ee.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]="");m(l)}else te(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<ee.length&&l>=0&&l<e.length){const e=D.current?.querySelector(`[data-row="${o}"][data-col="${l}"]`);e&&(e.focus({preventScroll:!0}),e.scrollIntoView({block:"nearest",inline:"nearest"}),E({row:o,col:l}),Y(null),B({row:o,col:l}),_({row:o,col:l}))}},[e,ee,ee.length,te,q,W,m]),ce=c(t=>{if(!f&&t>=ee.length-2){const t=ee.map(e=>[...e]);for(let n=0;n<5;n++)t.push(Array(e.length).fill(""));m(t)}},[f,ee,e.length,m]),[ae,se]=o(null);l(()=>{if(!ae)return;const e=()=>se(null);return window.addEventListener("pointerdown",e),()=>window.removeEventListener("pointerdown",e)},[ae]);const ie=c(t=>{const n=ee.map(e=>[...e]);n.splice(t,0,Array(e.length).fill("")),m(n)},[ee,e.length,m]),ue=c(e=>{if(ee.length<=1)return;const t=ee.filter((t,n)=>n!==e);m(t)},[ee,m]),de=c(e=>{const t=ee.map(t=>{const n=[...t];return n.splice(e,0,""),n});m(t)},[ee,m]),he=c(t=>{if(e.length<=1)return;const n=ee.map(e=>{const n=[...e];return n.splice(t,1),n});m(n)},[ee,e.length,m]),we=c((e,t)=>{e.preventDefault(),f||se({x:e.clientX,y:e.clientY,items:[{label:k.insertRowAbove,onClick:()=>{ie(t),se(null)}},{label:k.insertRowBelow,onClick:()=>{ie(t+1),se(null)}},{label:k.deleteRow(t+1),onClick:()=>{ue(t),se(null)}}]})},[f,ie,ue,k]),ge=c((t,n)=>{t.preventDefault(),f||se({x:t.clientX,y:t.clientY,items:[{label:k.insertColumnLeft,onClick:()=>{de(n),se(null)}},{label:k.insertColumnRight,onClick:()=>{de(n+1),se(null)}},{label:k.deleteColumn(String(e[n]?.title||n+1)),onClick:()=>{he(n),se(null)}}]})},[f,e,de,he,k]),me=t=>L[t]??e[t]?.width??150;l(()=>{const t=e=>{if(!$.current)return;const t=e.clientX-$.current.startX,n=Math.max(40,$.current.startW+t);S(e=>({...e,[$.current.col]:n}))},n=()=>{if($.current&&p){const t=e.map((e,t)=>({...e,width:L[t]??e.width}));t[$.current.col]={...t[$.current.col],width:L[$.current.col]??e[$.current.col].width},p(t)}$.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,p]);const pe=e=>N[e]??28;l(()=>{const e=e=>{if(!A.current)return;const t=e.clientY-A.current.startY,n=Math.max(20,A.current.startH+t);z(e=>({...e,[A.current.row]:n}))},t=()=>{A.current=null,document.body.style.cursor=""};return window.addEventListener("mousemove",e),window.addEventListener("mouseup",t),()=>{window.removeEventListener("mousemove",e),window.removeEventListener("mouseup",t)}},[]);const fe=c(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 ee){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})),p){const n=e.map((e,n)=>({...e,width:n===t?l:L[n]??e.width}));p(n)}},[ee,e,L,p]),ye=c(e=>{z(t=>{const n={...t};return delete n[e],n})},[]),be=c(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,d=a;t.row>l?i=t.row:t.row<o&&(s=t.row),t.col>a?d=t.col:t.col<c&&(u=t.col);const h=l-o+1,w=a-c+1,g=ee.map(e=>[...e]);for(;g.length<=i;)g.push(Array(e.length).fill(""));for(const e of g)for(;e.length<=d;)e.push("");function p(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<=d;t++){if(e>=o&&e<=l&&t>=c&&t<=a)continue;let n;if(1===w&&u===c&&d===a){const r=p(Array.from({length:h},(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)%h+h)%h;n=g[o+r]?.[t]??""}}else if(1===h&&s===o&&i===l){const r=p(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)%h+h)%h,l=((t-c)%w+w)%w;n=g[o+r]?.[c+l]??""}g[e][t]=n}m(g),B({row:s,col:u}),_({row:i,col:d})},[ee,e.length,m]);l(()=>{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&&be(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,be]);const ve=e=>{e.preventDefault(),e.stopPropagation(),G.current=!0,document.body.style.cursor="crosshair"},xe=r(null),[Me,De]=o(0),[ke,Ce]=o(800);l(()=>{const e=xe.current;if(!e)return;const t=()=>Ce(e.clientHeight||800);t();const n=new ResizeObserver(t);return n.observe(e),()=>n.disconnect()},[]);const Ee=ee.length>100,Le=Ee?Math.max(0,Math.floor(Me/28)-20):0,Se=Ee?Math.min(ee.length,Math.ceil((Me+ke)/28)+20):ee.length,$e=a(()=>ee.slice(Le,Se),[ee,Le,Se]),Ne=28*Le,ze=28*(ee.length-Se),Ae="px-2 py-1.5 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 i("div",{ref:xe,className:"border border-gray-300 rounded overflow-scroll grid-scroll",style:{maxHeight:b,height:b},onScroll:e=>De(e.target.scrollTop),children:[
4
4
  /* @__PURE__ */i("table",{ref:D,className:"border-collapse select-none",style:{tableLayout:"fixed",minWidth:36+e.reduce((t,n)=>t+me(e.indexOf(n)),0)},children:[
5
5
  /* @__PURE__ */i("colgroup",{children:[
6
6
  /* @__PURE__ */u("col",{style:{width:36}}),e.map((e,t)=>/* @__PURE__ */u("col",{style:{width:me(t)}},e.key))]}),
7
7
  /* @__PURE__ */u("thead",{className:"sticky top-0 z-10",children:/* @__PURE__ */i("tr",{children:[
8
- /* @__PURE__ */u("th",{className:ze+" text-center w-9 cursor-pointer hover:bg-gray-200",onClick:()=>{q({row:0,col:0}),U({row:ee.length-1,col:e.length-1})},title:k.selectAll,children:"#"}),e.map((t,n)=>{const r=B&&W&&Math.min(B.col,W.col)<=n&&n<=Math.max(B.col,W.col)&&0===Math.min(B.row,W.row)&&Math.max(B.row,W.row)===ee.length-1;/* @__PURE__ */
9
- return i("th",{className:`${ze} cursor-pointer hover:bg-gray-200 relative${r?" !bg-blue-200":""}${I===n?" !bg-blue-100":""}`,style:{width:me(n)},draggable:!0,onDragStart:()=>(e=>F(e))(n),onDragOver:e=>((e,t)=>{e.preventDefault(),X(t)})(e,n),onDrop:()=>(t=>{if(null===P||P===t)return F(null),void X(null);const n=ee.map(e=>{const n=[...e],[r]=n.splice(P,1);return n.splice(t,0,r),n});if(m(n),f){const n=[...e],[r]=n.splice(P,1);n.splice(t,0,r),f(n)}F(null),X(null)})(n),onDragEnd:()=>{F(null),X(null)},onClick:e=>{e.shiftKey&&B||q({row:0,col:n}),U({row:ee.length-1,col:n})},onContextMenu:e=>ge(e,n),children:[t.title,
10
- /* @__PURE__ */u("div",{className:"absolute -right-1 top-0 bottom-0 w-2 cursor-col-resize z-20",onMouseDown:e=>((e,t)=>{e.preventDefault(),e.stopPropagation(),$.current={col:t,startX:e.clientX,startW:me(t)},document.body.style.cursor="col-resize"})(e,n),onDoubleClick:e=>{e.stopPropagation(),pe(n)},title:k.resize})]},t.key)})]})}),
11
- /* @__PURE__ */i("tbody",{children:[Ne>0&&/* @__PURE__ */u("tr",{style:{height:Ne}}),$e.map((t,n)=>{const r=Le+n,o=B&&W&&Math.min(B.row,W.row)<=r&&r<=Math.max(B.row,W.row)&&0===Math.min(B.col,W.col)&&Math.max(B.col,W.col)===e.length-1;/* @__PURE__ */
12
- return i("tr",{style:{height:fe(r)},children:[
13
- /* @__PURE__ */i("td",{className:`relative px-1 py-1 text-center text-[10px] 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=>O(e))(r),onDragOver:e=>((e,t)=>{e.preventDefault(),K(t)})(e,r),onDrop:()=>(e=>{if(null===T||T===e)return O(null),void K(null);const t=ee.map(e=>[...e]),[n]=t.splice(T,1);t.splice(e,0,n),m(t),O(null),K(null)})(r),onDragEnd:()=>{O(null),K(null)},onClick:t=>{t.shiftKey&&B||q({row:r,col:0}),U({row:r,col:e.length-1})},onContextMenu:e=>we(e,r),children:[r+1,
14
- /* @__PURE__ */u("div",{className:"absolute -bottom-1 left-0 right-0 h-2 cursor-row-resize z-20",onMouseDown:e=>((e,t)=>{e.preventDefault(),e.stopPropagation(),z.current={row:t,startY:e.clientY,startH:fe(t)},document.body.style.cursor="row-resize"})(e,r),onDoubleClick:e=>{e.stopPropagation(),ye(r)},title:k.resize})]}),e.map((e,n)=>{const o=B&&W&&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}(B,W,r,n),l=H?.row===r&&H?.col===n&&!e.readOnly,c=C?.row===r&&C?.col===n,a=v?.[`${r}:${n}`],s=B&&W?Math.max(B.row,W.row):-1,d=B&&W?Math.max(B.col,W.col):-1,h=B&&W&&r===s&&n===d,g=Z.current&&_&&B&&W&&(()=>{const e=Math.min(B.row,W.row),t=Math.max(B.row,W.row),o=Math.min(B.col,W.col),l=Math.max(B.col,W.col);let c=e,a=t,s=o,i=l;return _.row>t?a=_.row:_.row<e&&(c=_.row),_.col>l?i=_.col:_.col<o&&(s=_.col),r>=c&&r<=a&&n>=s&&n<=i&&!(r>=e&&r<=t&&n>=o&&n<=l)})(),m="sm"===a?.fontSize?"text-[11px]":"lg"===a?.fontSize?"text-sm":"xl"===a?.fontSize?"text-base":"text-xs",f=`${a?.bold?" font-bold":""}${a?.italic?" italic":""}${a?.underline?" underline":""}`;/* @__PURE__ */
8
+ /* @__PURE__ */u("th",{className:Ae+" text-center w-9 cursor-pointer hover:bg-gray-200",onClick:()=>{B({row:0,col:0}),_({row:ee.length-1,col:e.length-1})},title:k.selectAll,children:"#"}),e.map((t,n)=>{const r=q&&W&&Math.min(q.col,W.col)<=n&&n<=Math.max(q.col,W.col)&&0===Math.min(q.row,W.row)&&Math.max(q.row,W.row)===ee.length-1;/* @__PURE__ */
9
+ return i("th",{className:`${Ae} cursor-pointer hover:bg-gray-200 relative${r?" !bg-blue-200":""}${X===n?" !bg-blue-100":""}`,style:{width:me(n)},draggable:!0,onDragStart:()=>(e=>F(e))(n),onDragOver:e=>((e,t)=>{e.preventDefault(),I(t)})(e,n),onDrop:()=>(t=>{if(null===P||P===t)return F(null),void I(null);const n=ee.map(e=>{const n=[...e],[r]=n.splice(P,1);return n.splice(t,0,r),n});if(m(n),p){const n=[...e],[r]=n.splice(P,1);n.splice(t,0,r),p(n)}F(null),I(null)})(n),onDragEnd:()=>{F(null),I(null)},onClick:e=>{e.shiftKey&&q||B({row:0,col:n}),_({row:ee.length-1,col:n})},onContextMenu:e=>ge(e,n),children:[t.title,
10
+ /* @__PURE__ */u("div",{className:"absolute -right-1 top-0 bottom-0 w-2 cursor-col-resize z-20",onMouseDown:e=>((e,t)=>{e.preventDefault(),e.stopPropagation(),$.current={col:t,startX:e.clientX,startW:me(t)},document.body.style.cursor="col-resize"})(e,n),onDoubleClick:e=>{e.stopPropagation(),fe(n)},title:k.resize})]},t.key)})]})}),
11
+ /* @__PURE__ */i("tbody",{children:[Ne>0&&/* @__PURE__ */u("tr",{style:{height:Ne}}),$e.map((t,n)=>{const r=Le+n,o=q&&W&&Math.min(q.row,W.row)<=r&&r<=Math.max(q.row,W.row)&&0===Math.min(q.col,W.col)&&Math.max(q.col,W.col)===e.length-1;/* @__PURE__ */
12
+ return i("tr",{style:{height:pe(r)},children:[
13
+ /* @__PURE__ */i("td",{className:`relative px-1 py-1 text-center text-[10px] 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":""}${T===r?" !bg-blue-100":""}`,draggable:!0,onDragStart:()=>(e=>O(e))(r),onDragOver:e=>((e,t)=>{e.preventDefault(),R(t)})(e,r),onDrop:()=>(e=>{if(null===K||K===e)return O(null),void R(null);const t=ee.map(e=>[...e]),[n]=t.splice(K,1);t.splice(e,0,n),m(t),O(null),R(null)})(r),onDragEnd:()=>{O(null),R(null)},onClick:t=>{t.shiftKey&&q||B({row:r,col:0}),_({row:r,col:e.length-1})},onContextMenu:e=>we(e,r),children:[r+1,
14
+ /* @__PURE__ */u("div",{className:"absolute -bottom-1 left-0 right-0 h-2 cursor-row-resize z-20",onMouseDown:e=>((e,t)=>{e.preventDefault(),e.stopPropagation(),A.current={row:t,startY:e.clientY,startH:pe(t)},document.body.style.cursor="row-resize"})(e,r),onDoubleClick:e=>{e.stopPropagation(),ye(r)},title:k.resize})]}),e.map((e,n)=>{const o=q&&W&&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}(q,W,r,n),l=H?.row===r&&H?.col===n&&!e.readOnly,c=C?.row===r&&C?.col===n,a=v?.[`${r}:${n}`],s=q&&W?Math.max(q.row,W.row):-1,d=q&&W?Math.max(q.col,W.col):-1,h=q&&W&&r===s&&n===d,g=G.current&&U&&q&&W&&(()=>{const e=Math.min(q.row,W.row),t=Math.max(q.row,W.row),o=Math.min(q.col,W.col),l=Math.max(q.col,W.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-[11px]":"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
15
  return i("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":""}${g?" !bg-blue-50 ring-1 ring-inset ring-blue-300":""}`,onMouseDown:e=>{if(e.target===e.currentTarget){ne(e,r,n);const t=e.currentTarget.querySelector("[data-row][data-col]");t?.focus()}},onMouseEnter:()=>re(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||Y({row:r,col:n})},children:[
16
- /* @__PURE__ */u(w,{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}${f}`,onMouseDown:e=>ne(e,r,n),onMouseEnter:()=>re(r,n),onDoubleClick:()=>{e.readOnly||Y({row:r,col:n})},onFocus:()=>{E({row:r,col:n}),V.current||(q({row:r,col:n}),U({row:r,col:n}))},onBlur:e=>{const o=e.currentTarget.textContent||"";o!==(t[n]||"")&&te(r,n,o),Y(null)},onInput:()=>ce(r),onPaste:e=>oe(e,r,n),onKeyDown:t=>{if(!(l||e.readOnly||1!==t.key.length||t.ctrlKey||t.metaKey||t.altKey))return t.preventDefault(),te(r,n,t.key),j.current={row:r,col:n},void Y({row:r,col:n});le(t,r,n)},text:t[n]||""}),h&&/* @__PURE__ */u("div",{onMouseDown:ve,title:k.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__ */u("tr",{style:{height:Ae}})]})]}),ae&&s(
16
+ /* @__PURE__ */u(w,{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=>ne(e,r,n),onMouseEnter:()=>re(r,n),onDoubleClick:()=>{e.readOnly||Y({row:r,col:n})},onFocus:()=>{E({row:r,col:n}),J.current||(B({row:r,col:n}),_({row:r,col:n}))},onBlur:e=>{const o=e.currentTarget.textContent||"";o!==(t[n]||"")&&te(r,n,o),Y(null)},onInput:()=>ce(r),onPaste:e=>oe(e,r,n),onKeyDown:t=>{if(!(l||e.readOnly||1!==t.key.length||t.ctrlKey||t.metaKey||t.altKey))return t.preventDefault(),te(r,n,t.key),j.current={row:r,col:n},void Y({row:r,col:n});le(t,r,n)},text:t[n]||""}),h&&/* @__PURE__ */u("div",{onMouseDown:ve,title:k.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)}),ze>0&&/* @__PURE__ */u("tr",{style:{height:ze}})]})]}),ae&&s(
17
17
  /* @__PURE__ */i(d,{children:[
18
- /* @__PURE__ */u("div",{className:"fixed inset-0 z-[200]",onPointerDown:()=>se(null)}),
19
- /* @__PURE__ */u("div",{className:"fixed z-[201] bg-white rounded-lg shadow-lg border border-gray-200 py-1 min-w-[160px]",style:{left:ae.x,top:ae.y},children:ae.items.map((e,t)=>/* @__PURE__ */u("button",{onPointerDown:t=>{t.stopPropagation(),e.onClick()},className:"w-full text-left px-3 py-1.5 text-sm text-gray-700 hover:bg-gray-100",children:e.label},t))})]}),document.body)]})}export{g as EditableGrid,h as withSpareRow};
18
+ /* @__PURE__ */u("div",{className:"fixed inset-0 z-(--z-popup)",onPointerDown:()=>se(null)}),
19
+ /* @__PURE__ */u("div",{className:"fixed z-(--z-popup) bg-white rounded-lg shadow-lg border border-gray-200 py-1 min-w-[160px]",style:{left:ae.x,top:ae.y},children:ae.items.map((e,t)=>/* @__PURE__ */u("button",{onPointerDown:t=>{t.stopPropagation(),e.onClick()},className:"w-full text-left px-3 py-1.5 text-sm text-gray-700 hover:bg-gray-100",children:e.label},t))})]}),document.body)]})}export{g as EditableGrid,h as withSpareRow};
@@ -0,0 +1,10 @@
1
+ import{glassStyle as e,GLASS_DIVIDER as t}from"./chunk-7IQ3B77H.js";import{onOverlayOpen as n,registerModalEscapeInterceptor as r,Z_LAYERS as o}from"./chunk-FIEA5CGB.js";import{useHydrated as i,useBrowserLayoutEffect as a}from"./chunk-D65T4H6J.js";import{Icon as l}from"./chunk-2SSRFEOZ.js";import{createContext as u,forwardRef as c,useContext as s,useRef as d,useId as p,useState as m,useEffect as h,useMemo as f,useCallback as g}from"react";import{createPortal as y}from"react-dom";import{jsxs as x,jsx as w,Fragment as b}from"react/jsx-runtime";var v=/* @__PURE__ */new Set(["text","search","url","tel","email","password","number","date","datetime-local","month","week","time"]),k="data-native-context-menu";function C(e,t){return e&&"function"==typeof e.closest?e.closest(t):null}function N(e){const t=e;if(!t||"function"!=typeof t.closest)return!1;if(C(t,`[${k}]`))return!0;if(C(t,"textarea"))return!0;if(C(t,"img, picture, canvas, video, audio"))return!0;const n=C(t,"input");if(n){const e=(n.type||"text").toLowerCase();if(v.has(e))return!0}const r=C(t,"[contenteditable]");if(r){const e=(r.getAttribute("contenteditable")||"").toLowerCase();if(""===e||"true"===e||"plaintext-only"===e)return!0}return!1}var E=/* @__PURE__ */new Set(["http:","https:","mailto:","tel:","blob:"]);function T(e,t,n){const r=C(e,"a[href]"),o=(t||"").trim(),i=function(e,t){if(e&&"#"!==e)try{const n=new URL(e,t??("undefined"!=typeof document?document.baseURI:void 0));return E.has(n.protocol)?n.href:void 0}catch{return}}(r?.getAttribute("href"),n);return{kind:o?"selection":i?"link":"default",...o?{selectionText:o}:{},...i?{linkUrl:i}:{}}}function L(e){if(e.defaultPrevented)return!0;if(e.shiftKey)return!0;if("touch"===e.pointerType)return!0;return N(("function"==typeof e.composedPath?e.composedPath()[0]:void 0)??e.target)}function B(e,t,n){return e.length===t+1&&e[t].key===n.key?e:[...e.slice(0,t),n]}function M(e,t){const n=Math.max(0,t);return e.length>n?e.slice(0,n):e}function $(e,t,n){if(0===t.length||0===e.length)return[];const r=[e];for(let e=1;e<t.length;e++){const o=r[e-1].find(n=>n.to===t[e].key),i=o?n(o):[];if(0===i.length)break;r.push(i)}return r}function A(e,t,n,r){const o=Math.max(0,r-n),i=Math.min(t,o),a=e-i/2;return a<n?n:a+i>r?Math.max(n,r-i):a}function R(e,t,n,r,o,i=!1,a=8){const l=t+o,u=e-o-n,c=u>=a;return i&&c?{left:u,flipped:!0}:l+n<=r-a?{left:l,flipped:!1}:c?{left:u,flipped:!0}:i?{left:a,flipped:!0}:{left:Math.max(a,r-a-n),flipped:!1}}function W(){try{return getComputedStyle(document.documentElement).getPropertyValue("--menu-density")?.trim()||"normal"}catch{return"normal"}}var P=u(null),H=u(!1);function S({children:t,style:a,className:l="",onClose:u,minWidth:c=180,portal:s=!1}){const g=d(null),x=p(),[b,v]=m([]),k=d();h(()=>()=>clearTimeout(k.current),[]);const C=i(),E=f(()=>{const e=()=>clearTimeout(k.current);return{id:x,depth:0,path:b,open:(t,n)=>{e(),v(e=>B(e,t,n))},scheduleClose:t=>{e(),k.current=setTimeout(()=>v(e=>M(e,t)),200)},closeBelow:t=>{e(),v(e=>M(e,t))},cancelClose:e,closeTree:()=>{e(),v([]),u?.()},root:g}},[x,b,u]);h(()=>{if(!u)return;const e=e=>{e.target.closest("[data-menu-toggle]")||e.target.closest?.(`[data-popup-menu-tree="${x}"]`)||g.current&&!g.current.contains(e.target)&&u()},t=e=>{"Escape"===e.key&&u()};window.addEventListener("pointerdown",e),window.addEventListener("keydown",t);const o=n(u),i=r(()=>!1,()=>g.current);return()=>{window.removeEventListener("pointerdown",e),window.removeEventListener("keydown",t),o(),i()}},[u,x]),h(()=>{const e=g.current;e&&requestAnimationFrame(()=>{const t=e.getBoundingClientRect();if(t.right>window.innerWidth-8){const n=t.right-window.innerWidth+8;e.style.left?e.style.left=parseFloat(e.style.left)-n+"px":e.style.right||(e.style.left=t.left-n+"px")}if(t.left<8&&(e.style.left?e.style.left="8px":e.style.right&&(e.style.right=window.innerWidth-t.width-8+"px")),t.bottom>window.innerHeight-8){const n=t.bottom-window.innerHeight+8;e.style.top?e.style.top=parseFloat(e.style.top)-n+"px":e.style.bottom?e.style.bottom="8px":e.style.top=t.top-n+"px"}t.top<8&&(e.style.top?e.style.top="8px":e.style.bottom&&(e.style.bottom=window.innerHeight-t.height-8+"px"))})});const T=W(),L=/(^|[\s:])!?z-/.test(l),$=/* @__PURE__ */w("div",{ref:g,"data-popup-menu-tree":x,className:`fixed rounded-(--radius-popup) ${"tight"===T?"py-1":"large"===T?"py-2":"py-1.5"} ${l}`,onContextMenu:e=>{N(e.target)||e.preventDefault()},style:{...L?{}:{zIndex:o.menu},minWidth:c,animation:"popup-in 0.12s ease-out",...e(),...a},children:/* @__PURE__ */w(P.Provider,{value:E,children:t})});return s?C?y($,document.body):null:$}function D(e,t,n,r=!1){const o=W(),i="tight"===o?"0.25rem":"large"===o?"0.6rem":"max(0.25rem, calc(var(--menu-padding-y, 0.5rem) - 0.1rem))";return{className:`w-full flex items-center gap-2 text-left transition-colors rounded-lg mx-auto\n ${e?"text-red-600 hover:bg-red-50":r?"bg-blue-50 text-blue-700":"text-gray-700 hover:bg-blue-50 hover:text-blue-700"}\n ${t?"opacity-40 cursor-not-allowed":""}\n ${n}`,style:{width:"calc(100% - 8px)",marginLeft:4,marginRight:4,fontSize:"var(--menu-font-size, 14px)",paddingLeft:"var(--menu-padding-x, 1rem)",paddingRight:"var(--menu-padding-x, 1rem)",paddingTop:i,paddingBottom:i}}}var F=/* @__PURE__ */w(l,{name:"check","aria-hidden":!0,className:"h-4 w-4",strokeWidth:2});function I({kind:e,checked:t}){/* @__PURE__ */
2
+ return w("span","checkbox"===e?{"aria-hidden":!0,"data-menu-check":"",className:"inline-flex h-4 w-4 shrink-0 items-center justify-center rounded border "+(t?"border-blue-600 bg-blue-600 text-white":"border-gray-400"),children:t&&F}:{"aria-hidden":!0,"data-menu-check":"",className:"inline-flex h-4 w-4 shrink-0 items-center justify-center",children:t&&F})}var j=c(function({onClick:e,children:t,className:n="",danger:r,disabled:o,role:i,checked:a,tabIndex:l,id:u,onMouseEnter:c},d){const p=s(P),m=s(H),h=D(r,o,n),f=void 0===a?null:"menuitemradio"===i?"radio":"checkbox";/* @__PURE__ */
3
+ return x("button",{ref:d,id:u,role:"radio"===f?"menuitemradio":"checkbox"===f?"menuitemcheckbox":i??(m?"menuitem":void 0),"aria-checked":f?a:void 0,tabIndex:l,onClick:()=>{e?.(),p&&p.depth>0&&"checkbox"!==f&&p.closeTree()},onMouseEnter:()=>{p?.scheduleClose(p.depth),c?.()},disabled:o,className:h.className,style:h.style,children:[f&&/* @__PURE__ */w(I,{kind:f,checked:!!a}),t]})}),z=/* @__PURE__ */w(l,{name:"chevron-right","aria-hidden":!0,className:"h-3.5 w-3.5 shrink-0 ml-auto text-gray-500",strokeWidth:2});function q(e){let t=o.menu;for(let n=e;n&&n!==document.body;n=n.parentElement){const e=parseInt(getComputedStyle(n).zIndex,10);Number.isNaN(e)||(t=e)}return t}function U(e){return e?[...e.querySelectorAll("button:not([disabled])")].filter(t=>t.closest("[data-popup-submenu-panel]")===e):[]}function K({label:t,icon:n,children:o,disabled:i,className:l="",minWidth:u=180,maxHeight:c}){const m=s(P),v=p(),k=d(null),C=d(null),E=d(),T=d(!1),L=`${v}-menu`;h(()=>()=>clearTimeout(E.current),[]);const B=m?.depth??0,M=m?.path[B],$=!!M&&M.key===v&&!i,H=g(e=>{if(!m||i||!k.current)return;clearTimeout(E.current),T.current=e;const t=k.current.getBoundingClientRect(),n=k.current.closest("[data-popup-submenu-panel]")??k.current.closest("[data-popup-menu-tree]"),r=n?.getBoundingClientRect()??t,o=B>0&&(m.path[B-1]?.flipped??!1),a=R(r.left,r.right,u,window.innerWidth,4,o);m.open(B,{key:v,y:t.top,...a})},[m,i,B,v,u]),S=e=>{m?.closeBelow(B),k.current?.focus()};h(()=>{if($)return r(e=>"Escape"===e.key&&(!(m&&m.path.length>B+1)&&(S(),!0)),()=>C.current)}),a(()=>{if(!$||!M)return;const e=()=>{const e=C.current;if(!e||!k.current)return;const t=k.current.closest("[data-popup-submenu-panel]")??k.current.closest("[data-popup-menu-tree]"),n=t?.getBoundingClientRect()??k.current.getBoundingClientRect(),r=B>0&&(m?.path[B-1]?.flipped??!1),o=e.offsetWidth||u,i=R(n.left,n.right,o,window.innerWidth,4,r,8),a=e.offsetHeight,l=A(k.current.getBoundingClientRect().top+a/2,a,8,window.innerHeight-8);e.style.left=`${i.left}px`,e.style.top=`${l}px`,e.dataset.flipped=String(i.flipped)};e();let t=0;const n=requestAnimationFrame(()=>{t=requestAnimationFrame(e)});return()=>{cancelAnimationFrame(n),cancelAnimationFrame(t)}}),h(()=>{$&&T.current&&(T.current=!1,U(C.current)[0]?.focus())},[$]);const F=f(()=>m&&{...m,depth:B+1},[m,B]);if(!m)throw new Error("PopupSubmenu must be rendered inside a PopupMenu");const I=D(!1,i,l,$),j=W();/* @__PURE__ */
4
+ return x(b,{children:[
5
+ /* @__PURE__ */x("button",{ref:k,type:"button",role:"menuitem","aria-haspopup":"menu","aria-expanded":$,"aria-controls":$?L:void 0,disabled:i,"data-popup-submenu-row":!0,className:I.className,style:I.style,onClick:e=>{const t=0===e.detail;$?t&&U(C.current)[0]?.focus():H(t)},onKeyDown:e=>{"ArrowRight"===e.key&&(e.preventDefault(),e.stopPropagation(),H(!0))},onMouseEnter:()=>{i||(m.cancelClose(),$?m.closeBelow(B+1):(clearTimeout(E.current),E.current=setTimeout(()=>H(!1),120)))},onMouseLeave:()=>{clearTimeout(E.current),m.scheduleClose(B)},children:[n,
6
+ /* @__PURE__ */w("span",{className:"min-w-0 flex-1 truncate",children:t}),z]}),$&&y(
7
+ /* @__PURE__ */w("div",{ref:C,id:L,role:"menu","data-popup-menu-tree":m.id,"data-popup-submenu-panel":!0,className:"fixed rounded-(--radius-popup) overflow-x-hidden overflow-y-auto overscroll-contain "+("tight"===j?"py-1":"large"===j?"py-2":"py-1.5"),style:{left:M.left,top:M.y,minWidth:u,maxHeight:void 0===c?"calc(100vh - 16px)":`min(${"number"==typeof c?`${c}px`:c}, calc(100vh - 16px))`,zIndex:q(m.root.current)+B+1,animation:(M.flipped?"popup-submenu-in-left":"popup-submenu-in")+" 0.1s ease-out",...e()},onKeyDown:e=>{if(e.target.closest("[data-popup-submenu-panel]")!==e.currentTarget)return;const t=U(C.current),n=t.indexOf(document.activeElement),r=n=>{e.preventDefault(),e.stopPropagation(),t[(n+t.length)%t.length]?.focus()};"ArrowDown"===e.key?r(n+1):"ArrowUp"===e.key?r(n<0?t.length-1:n-1):"Home"===e.key?r(0):"End"===e.key?r(t.length-1):"ArrowLeft"===e.key&&(e.preventDefault(),e.stopPropagation(),S())},onMouseEnter:()=>{m.cancelClose(),clearTimeout(E.current)},onMouseLeave:()=>m.scheduleClose(B+1),onContextMenu:e=>{N(e.target)||e.preventDefault()},children:/* @__PURE__ */w(P.Provider,{value:F,children:o})}),document.body)]})}function O(){const e=W();/* @__PURE__ */
8
+ return w("div",{className:`border-t ${t} ${"tight"===e?"my-0.5":"large"===e?"my-1.5":"my-1"} mx-3`})}function G({children:e}){const t=W(),n="tight"===t?"0.125rem":"large"===t?"0.375rem":"0.25rem";/* @__PURE__ */
9
+ return w("div",{className:"text-xs font-medium uppercase tracking-wide",style:{color:"var(--ink-muted)",paddingLeft:"var(--menu-padding-x, 1rem)",paddingRight:"var(--menu-padding-x, 1rem)",paddingTop:n,paddingBottom:n},children:e})}function J({d:e,className:t="h-4 w-4 text-gray-400"}){/* @__PURE__ */
10
+ return w("svg",{className:t,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:/* @__PURE__ */w("path",{strokeLinecap:"round",strokeLinejoin:"round",d:e})})}export{I as MenuCheckMark,J as MenuIcon,H as MenuSemanticsContext,k as NATIVE_MENU_ATTR,S as PopupMenu,O as PopupMenuDivider,j as PopupMenuItem,G as PopupMenuLabel,K as PopupSubmenu,A as clampMenuTop,M as closeMenuBelow,T as describeContextTarget,D as itemLook,N as keepsNativeMenu,L as leavesContextMenuAlone,R as menuPanelLeft,B as openMenuLevel,$ as resolveMenuLevels};
@@ -0,0 +1,65 @@
1
+ /**
2
+ * `startClientTelemetry` — web vitals and client errors from a portal page to
3
+ * the backend's intake (docs/adr/0057 section 4).
4
+ *
5
+ * Once, here, for every host (HAR-SSOT-001): a portal adds a few lines of
6
+ * wiring and owns nothing of the wire format. What is collected:
7
+ *
8
+ * - LCP, INP, CLS, FCP and TTFB through `web-vitals`, for a share of page
9
+ * loads the host picks (`vitalsSampleRate`, every load by default);
10
+ * - uncaught errors (`error`), unhandled rejections (`unhandledrejection`)
11
+ * and the render errors both error boundaries catch (`boundary`).
12
+ *
13
+ * What leaves the browser: the route template or window key the host names
14
+ * (never the URL), the error's class, a redacted message and the top frames
15
+ * as `path:line:column`. No user, no URL, no query string, no record id.
16
+ *
17
+ * Sending: queued, then posted every minute and when the page is hidden or
18
+ * left, with `fetch(..., { keepalive: true })` and the in-memory bearer token.
19
+ * Not `sendBeacon`: it cannot carry an `Authorization` header, and the intake
20
+ * is authenticated (ADR 0057 rejects a cookie-only telemetry session). A
21
+ * failed send is dropped, never retried.
22
+ */
23
+
24
+ interface ClientTelemetryConfig {
25
+ /** The web app's code at the intake: `admin-portal`, `customer-portal`,
26
+ * `supplier-portal`, `dealer-portal` or `pos`. */
27
+ app: string;
28
+ /** This build's version, as the host's own package names it. */
29
+ release: string;
30
+ /** The bearer token for the intake, read at send time. Nothing is sent
31
+ * while it answers null (signed out). */
32
+ getAccessToken: () => string | null | undefined;
33
+ /** The current route TEMPLATE (`/sales-orders/:id`) or the active window's
34
+ * key — never `location.href`. A raw path is cleaned, but a template is
35
+ * what groups well. */
36
+ routeKey: () => string | null | undefined;
37
+ /** The host's switch. `false` starts nothing. Default `true`. */
38
+ enabled?: boolean;
39
+ /** Same-origin intake path. Default `/api/client-telemetry/web-batches/`. */
40
+ endpoint?: string;
41
+ /** Share of page loads whose vitals are collected, 0 to 1. Default 1.
42
+ * Errors are never sampled. */
43
+ vitalsSampleRate?: number;
44
+ /** How often the queue is sent while the page stays open. Default 60 s. */
45
+ flushIntervalMs?: number;
46
+ /** For tests; defaults to the global `fetch`. */
47
+ fetch?: typeof fetch;
48
+ /** For tests; defaults to `Math.random`. */
49
+ random?: () => number;
50
+ }
51
+ interface ClientTelemetry {
52
+ /** Send what is queued now. */
53
+ flush(): void;
54
+ /** Record an error the host caught and handled itself. */
55
+ reportError(error: unknown): void;
56
+ /** Stop collecting and listening; what is queued is sent first. */
57
+ stop(): void;
58
+ }
59
+ /**
60
+ * Start collecting for this page. Call once, after sign-in is known; a second
61
+ * call replaces the first. Returns a handle to flush, report or stop.
62
+ */
63
+ declare function startClientTelemetry(config: ClientTelemetryConfig): ClientTelemetry;
64
+
65
+ export { type ClientTelemetry as C, type ClientTelemetryConfig as a, startClientTelemetry as s };
@@ -1,2 +1,2 @@
1
1
  "use client";
2
- export{FileIntakeAlert,acceptsFile,useFileIntake}from"../chunk-CLPJDJH4.js";import"../chunk-TNBCUZVE.js";import"../chunk-C3QOHMR6.js";
2
+ export{FileIntakeAlert,acceptsFile,useFileIntake}from"../chunk-UUYPUKP7.js";import"../chunk-K6DKX55N.js";import"../chunk-C3QOHMR6.js";
@@ -1,5 +1,5 @@
1
1
  import { ResourceLanguage, i18n, TFunction } from 'i18next';
2
- import { S as ShellStringsOverride } from '../strings-BVB64Nck.js';
2
+ import { S as ShellStringsOverride } from '../strings-fYzxZPn4.js';
3
3
  import 'react/jsx-runtime';
4
4
  import 'react';
5
5
 
@@ -1,5 +1,5 @@
1
1
  import { SVGProps } from 'react';
2
- import { I as IconSet } from '../registry-J-TU7zKx.js';
2
+ import { I as IconSet } from '../registry-Dw6QO2Ch.js';
3
3
 
4
4
  /**
5
5
  * GENERATED FILE. Do not edit by hand.
@@ -1,6 +1,6 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
2
  import { SVGProps } from 'react';
3
- import { I as IconSet } from '../registry-J-TU7zKx.js';
3
+ import { I as IconSet } from '../registry-Dw6QO2Ch.js';
4
4
 
5
5
  /**
6
6
  * The one icon set (Lewis 2026-10-12: one set; the meanings and drawings he picked).
@@ -1,27 +1,27 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
2
  import { SVGProps } from 'react';
3
- import { a as IconDrawing } from '../registry-J-TU7zKx.js';
4
- export { I as IconSet, b as activeIconSet, i as iconSets, c as iconsVersion, r as registerIconSet, d as registerIcons, e as resolveIcon, s as setDefaultIconSet, f as setIconSet, g as subscribeIcons } from '../registry-J-TU7zKx.js';
3
+ import { a as IconDrawing } from '../registry-Dw6QO2Ch.js';
4
+ export { I as IconSet, b as activeIconSet, i as iconSets, c as iconsVersion, r as registerIconSet, d as registerIcons, e as resolveIcon, s as setDefaultIconSet, f as setIconSet, g as subscribeIcons } from '../registry-Dw6QO2Ch.js';
5
5
 
6
6
  /**
7
7
  * GENERATED FILE. Do not edit by hand.
8
- * Source: ./catalogue.json. Regenerate: node scripts/icons/generate.mjs
8
+ * Source: ./efficient.json. Regenerate: node scripts/icons/generate.mjs
9
9
  */
10
10
  /**
11
- * Every meaning in the catalogue. A set that calls itself complete draws all
12
- * of them; `<Icon name>` takes exactly these.
11
+ * Every meaning the one set draws. `<Icon name>` takes exactly these.
13
12
  */
14
13
  declare const ICON_NAMES: readonly ["academic-cap", "accent", "account", "account-circle", "add", "add-circle", "add-person", "adjust", "align-center", "align-justify", "align-left", "align-right", "align-separate", "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", "braces", "breadcrumb", "briefcase", "bug", "bug-ant", "building-library", "building-office-2", "button", "button-arrow", "calculator", "calendar", "calendar-check", "camera", "caption", "car", "card-payment", "caret", "cart", "case", "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-download", "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", "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", "identification", "image", "image-off", "images", "inbox", "info", "italic", "key", "layers", "layout", "letter-spacing", "lightbulb", "line-between", "line-style", "link", "link-slash", "list", "location", "lock", "logo", "logout", "map", "media", "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-bottom", "padding-left", "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", "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", "signal", "signal-slash", "sitemap", "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", "theme", "ticket", "title", "trash", "trigger", "truck", "tv", "type", "tyre", "underline", "undo", "upload", "v-align", "verified", "video-off", "view-columns", "wallet", "warning", "weight", "wheel", "width", "window", "windows", "words-from", "wrap", "wrench", "wrench-screwdriver", "zoom-in"];
15
14
  type IconName = (typeof ICON_NAMES)[number];
16
- /** Whether `value` is a meaning in the catalogue. */
15
+ /** Whether `value` is a meaning the set draws. */
17
16
  declare const isIconName: (value: unknown) => value is IconName;
18
17
 
19
18
  /**
20
19
  * `<Icon name="trash" />`: an icon by what it means.
21
20
  *
22
- * Which drawing appears is the registry's answer (`registry.ts`): the set the
23
- * theme chose, falling back to the default set. So a portal writes the meaning
24
- * once and the icons change with the theme, the way colours and corners do.
21
+ * Which drawing appears is the registry's answer (`registry.ts`): the one set,
22
+ * `efficient`, that the host registered at startup. The shell's own parts draw
23
+ * from a copy of the drawings they use (`kit.tsx`, generated from the same
24
+ * source) when the host registered nothing.
25
25
  *
26
26
  * The caller owns size and colour. Unsized, an icon is `1em` square and follows
27
27
  * the text it sits in; `size` or a class (`h-5 w-5`) overrides that. Colour is
@@ -46,9 +46,9 @@ interface IconOwnProps {
46
46
  /** Names the icon for a screen reader, and makes it an image instead of decoration. */
47
47
  title?: string;
48
48
  /**
49
- * What to draw when no registered set has this icon. For the kit's own
50
- * components, which must draw their close button in a host that registered
51
- * nothing; a host's code registers a set instead.
49
+ * What to draw when no registered set has this icon. A host's code registers
50
+ * the set instead; the shell's own parts need neither (they fall back to
51
+ * `kit.tsx`).
52
52
  */
53
53
  fallback?: IconDrawing;
54
54
  }
@@ -1,2 +1,2 @@
1
1
  "use client";
2
- export{ICON_NAMES,isIconName}from"../chunk-WOEFPBQF.js";export{Icon,activeIconSet,iconSets,iconsVersion,registerIconSet,registerIcons,resolveIcon,setDefaultIconSet,setIconSet,subscribeIcons}from"../chunk-XWSWYMGM.js";
2
+ export{ICON_NAMES,isIconName}from"../chunk-WOEFPBQF.js";export{Icon,activeIconSet,iconSets,iconsVersion,registerIconSet,registerIcons,resolveIcon,setDefaultIconSet,setIconSet,subscribeIcons}from"../chunk-2SSRFEOZ.js";