efficient-shell 14.1.1 → 14.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.
- package/README.md +39 -1
- package/dist/Browser-YFL2F4RL.js +44 -0
- package/dist/Calculator-VUM3R6HA.js +29 -0
- package/dist/CodeEditor-D6V_rQOK.d.ts +55 -0
- package/dist/CodeEditor-ZTFRQLZM.js +1 -0
- package/dist/{CurrencyConverter-FXWM3DBQ.js → CurrencyConverter-HEMRND5M.js} +5 -5
- package/dist/Files-INFMXPDR.js +141 -0
- package/dist/Notepad-B6Z7RWAN.js +24 -0
- package/dist/{PdfViewer-FWGHFO4N.js → PdfViewer-MSQ2RVGH.js} +1 -1
- package/dist/PomodoroTimer-W6IPEIRY.js +91 -0
- package/dist/{Preview-OBI4WD6A.js → Preview-WN6DQEL4.js} +39 -39
- package/dist/{Sidebar-2TYZENQL.js → Sidebar-6DMRN4XR.js} +1 -1
- package/dist/{Stock-TUPZORQN.js → Stock-A6O3UHM4.js} +3 -3
- package/dist/{Weather-URCO6JML.js → Weather-LUQQVJ2E.js} +16 -16
- package/dist/WorldClock-ZO5EEEBS.js +32 -0
- package/dist/ai/index.js +50 -50
- package/dist/apps/index.js +1 -1
- package/dist/bin/browser-check.js +1 -1
- package/dist/bin/media-host-check.js +1 -1
- package/dist/bin/ui-check.js +1 -1
- package/dist/brand.css +1 -1
- package/dist/charts/FlowChart.js +1 -1
- package/dist/{chunk-BUUAALHH.js → chunk-26BUX7P6.js} +7 -7
- package/dist/chunk-366URRSE.js +4 -0
- package/dist/chunk-4K32E3AO.js +1 -0
- package/dist/{chunk-K3LSKG6L.js → chunk-4MJNMXNJ.js} +1 -1
- package/dist/{chunk-PI2W6MML.js → chunk-6GDVURG7.js} +1 -1
- package/dist/{chunk-PWERFHOU.js → chunk-6JPSVHUK.js} +9 -9
- package/dist/chunk-AFI3WCVM.js +1 -0
- package/dist/chunk-AKDPGEBE.js +1 -0
- package/dist/{chunk-XLPUIGMO.js → chunk-CG2GLJBL.js} +1 -1
- package/dist/{chunk-WNFZYTWW.js → chunk-D4Q33KXQ.js} +1 -1
- package/dist/{chunk-AZZ4NO2D.js → chunk-EEAOFYW5.js} +1 -1
- package/dist/{chunk-EHSK43WG.js → chunk-F7XL3XA2.js} +4 -4
- package/dist/{chunk-Y2M5PP2C.js → chunk-GNJXN5TU.js} +9 -9
- package/dist/chunk-J44PLTRE.js +92 -0
- package/dist/chunk-JRRTJ3NV.js +1 -0
- package/dist/chunk-SKMXSDRJ.js +1 -0
- package/dist/{chunk-PEA5Y6DD.js → chunk-TFQC67XR.js} +12 -12
- package/dist/{chunk-G2A74XGO.js → chunk-UB6DFJKA.js} +1 -1
- package/dist/{chunk-REFPTKRD.js → chunk-UYUNREAL.js} +2 -2
- package/dist/{chunk-Z2Z653OO.js → chunk-VR5MGNKG.js} +9 -9
- package/dist/{chunk-YTLUSBDY.js → chunk-W2HDWDS6.js} +10 -10
- package/dist/{chunk-Y7D2CZ4H.js → chunk-WTWAFKFN.js} +3 -3
- package/dist/{chunk-GTZML3V3.js → chunk-XAPK3RVF.js} +1 -1
- package/dist/chunk-YPXONNBV.js +1 -0
- package/dist/chunk-YYGA4Y6E.js +1 -0
- package/dist/code/format.d.ts +16 -0
- package/dist/code/format.js +1 -0
- package/dist/code/index.d.ts +3 -15
- package/dist/code/index.js +1 -1
- package/dist/data/EntityList.js +1 -1
- package/dist/data/ListLoadError.js +1 -1
- package/dist/data/ResizableTable.js +1 -1
- package/dist/format/index.d.ts +1 -0
- package/dist/format/index.js +1 -1
- package/dist/forms/BorderInput.js +1 -1
- package/dist/forms/BrandAssetEditor.js +1 -1
- package/dist/forms/ColorPicker.js +1 -1
- package/dist/forms/ComposerAttachments.js +1 -1
- package/dist/forms/FilePicker.js +1 -1
- package/dist/forms/LinkPicker.js +1 -1
- package/dist/forms/MediaLibrary.js +1 -1
- package/dist/forms/MediaUploadField.js +1 -1
- package/dist/forms/MediaUploadGrid.js +1 -1
- package/dist/forms/MediaUsedInList.js +1 -1
- package/dist/forms/SplitButton.js +1 -1
- package/dist/hooks/useTheme.js +1 -1
- package/dist/icons/brands.node.js +1 -1
- package/dist/icons/efficient-glyphs.js +1 -1
- package/dist/icons/efficient-looks.js +1 -1
- package/dist/icons/efficient.js +1 -1
- package/dist/icons/looks/map.js +1 -1
- package/dist/icons/payment.js +3 -3
- package/dist/icons/sets.js +1 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.js +662 -662
- package/dist/map/index.js +7 -7
- package/dist/motion/entrance.js +1 -1
- package/dist/pdf/index.js +1 -1
- package/dist/routine-index.json +1 -1
- package/dist/shell/AppUpdateBanner.js +1 -1
- package/dist/shell/EditableGrid.js +1 -1
- package/dist/shell/HelpCenter.js +1 -1
- package/dist/shell/ImageLightbox.js +1 -1
- package/dist/shell/LanguageSelect.js +1 -1
- package/dist/shell/Markdown.js +1 -1
- package/dist/shell/SearchableSelect.js +1 -1
- package/dist/shell/StepChain.js +1 -1
- package/dist/shell/Text.d.ts +4 -2
- package/dist/shell/Text.js +1 -1
- package/dist/telemetry/index.js +1 -1
- package/dist/templates/AuthScreen.js +1 -1
- package/dist/templates/ChatTemplate.js +1 -1
- package/dist/templates/CheckoutTemplate.js +1 -1
- package/dist/templates/DataTablePage.js +1 -1
- package/dist/templates/EmailTemplate.js +1 -1
- package/dist/templates/FormLayoutPage.js +1 -1
- package/dist/ui/index.d.ts +1 -0
- package/dist/ui/index.js +1 -1
- package/dist/ui.css +6 -0
- package/dist/utils/parseOption.d.ts +23 -0
- package/dist/utils/parseOption.js +1 -0
- package/dist/value-index.json +1 -1
- package/dist/version.js +1 -1
- package/package.json +11 -1
- package/dist/Browser-GIEQUIBI.js +0 -44
- package/dist/Calculator-7CY2CRGB.js +0 -29
- package/dist/CodeEditor-VN76K3MD.js +0 -1
- package/dist/Files-DZWY256Z.js +0 -141
- package/dist/Notepad-CDTN6MHV.js +0 -24
- package/dist/PomodoroTimer-RPGWT26T.js +0 -91
- package/dist/WorldClock-EBBUWG5L.js +0 -32
- package/dist/chunk-5KUE6IHF.js +0 -4
- package/dist/chunk-6IP4Q3AT.js +0 -92
- package/dist/chunk-CSMFF6LM.js +0 -1
- package/dist/chunk-M3HBGN5K.js +0 -1
- package/dist/chunk-N4FUMDAI.js +0 -1
- package/dist/chunk-S4RFJTGR.js +0 -1
- package/dist/chunk-ZSEB7XW4.js +0 -1
- /package/dist/{chunk-7UCZAUAU.js → chunk-PF6RXLWQ.js} +0 -0
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import{
|
|
2
|
-
return d("div",{...n,dangerouslySetInnerHTML:r})}function f({columns:
|
|
1
|
+
import{textWidth as e}from"./chunk-UVCMV2TL.js";import{escapeHtml as t}from"./chunk-G6DKCCWH.js";import{TH_ONE_LINE as n}from"./chunk-G3TC2GIA.js";import{useBrowserLayoutEffect as r}from"./chunk-PU2GJVMG.js";import{useShellStrings as o}from"./chunk-NRHG4R2Q.js";import{useRef as l,useState as c,useEffect as a,useCallback as s,useMemo as i}from"react";import{createPortal as u}from"react-dom";import{jsxs as h,jsx as d,Fragment as w}from"react/jsx-runtime";function m(e,t){const n=e[e.length-1];return n&&!n.some(e=>e.trim())?e:[...e,Array(t).fill("")]}function g({text:e,...n}){const r=i(()=>({__html:t(e)}),[e]);/* @__PURE__ */
|
|
2
|
+
return d("div",{...n,dangerouslySetInnerHTML:r})}function f({columns:t,data:f,onChange:p,onColumnsChange:b,fixedRows:y=!1,minRows:v=15,maxHeight:x="260px",cellStyles:M,onFocusChange:D,onSelectionChange:k}){const C=l(null),E=o().grid,[L,$]=c(null);a(()=>{D?.(L)},[L,D]);const[S,N]=c({}),z=l(null),[A,O]=c({}),R=l(null),[K,T]=c(null),[P,F]=c(null),[I,j]=c(null),[H,X]=c(null),[Y,G]=c(null),W=l(null);r(()=>{const e=W.current;if(!e||e.row!==Y?.row||e.col!==Y?.col)return;W.current=null;const t=C.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)},[Y]);const[q,V]=c(null),[B,U]=c(null);a(()=>{k?.(q&&B?{anchor:q,end:B}:null)},[q,B,k]);const _=l(!1),[J,Q]=c(null),Z=l(!1),ee=l({a:null,e:null});ee.current={a:q,e:B};const te=q&&B&&(q.row!==B.row||q.col!==B.col),ne=[...f];if(!y)for(;ne.length<v;)ne.push(Array(t.length).fill(""));const re=s((e,n,r)=>{const o=ne.map(e=>[...e]);for(;o.length<=e;)o.push(Array(t.length).fill(""));for(;o[e].length<t.length;)o[e].push("");o[e][n]=r,p(o)},[ne,t.length,p]),oe=s((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!==(ne[e]?.[t]||"")){const r=ne.map(e=>[...e]);r[e]&&(r[e][t]=n,p(r))}}_.current=!0,e.shiftKey&&q||V({row:t,col:n}),U({row:t,col:n})},[ne,p,q]),le=s((e,t)=>{_.current&&U({row:e,col:t})},[]);a(()=>{const e=()=>{_.current=!1};return window.addEventListener("mouseup",e),()=>window.removeEventListener("mouseup",e)},[]),a(()=>{const e=e=>{if(!e.ctrlKey&&!e.metaKey||"c"!==e.key)return;if(!q||!B)return;const t=window.getSelection();if(t&&t.toString().length>0&&!te)return;const n=Math.min(q.row,B.row),r=Math.max(q.row,B.row),o=Math.min(q.col,B.col),l=Math.max(q.col,B.col),c=[];for(let e=n;e<=r;e++){const t=[];for(let n=o;n<=l;n++)t.push(ne[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,B,ne,te]),a(()=>{const e=e=>{if(!L)return;const n=document.activeElement;if(n?.isContentEditable)return;if(!C.current?.contains(n))return;const r=e.clipboardData?.getData("text/plain");if(!r)return;e.preventDefault();const o=r.split("\n").filter(e=>e).map(e=>e.split("\t")),l=ne.map(e=>[...e]);for(let e=0;e<o.length;e++){const n=L.row+e;for(;l.length<=n;)l.push(Array(t.length).fill(""));for(;l[n].length<t.length;)l[n].push("");for(let r=0;r<o[e].length;r++){const c=L.col+r;if(c>=t.length)break;t[c].readOnly||(l[n][c]=o[e][r].trim())}}p(y?l:m(l,t.length)),V({row:L.row,col:L.col}),U({row:Math.min(L.row+o.length-1,l.length-1),col:Math.min(L.col+(o[0]?.length||1)-1,t.length-1)})};return window.addEventListener("paste",e),()=>window.removeEventListener("paste",e)},[L,ne,t,p,y]);const ce=s((e,n,r)=>{const o=e.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;e.preventDefault();const c=ne.map(e=>[...e]);for(let e=0;e<l.length;e++){const o=n+e;for(;c.length<=o;)c.push(Array(t.length).fill(""));for(;c[o].length<t.length;)c[o].push("");for(let n=0;n<l[e].length;n++){const a=r+n;if(a>=t.length)break;t[a].readOnly||(c[o][a]=l[e][n].trim())}}p(y?c:m(c,t.length))},[ne,t,p,y]),ae=s((e,n,r)=>{let o=n,l=r;if("Tab"===e.key)e.preventDefault(),l=e.shiftKey?r-1:r+1,l>=t.length&&(l=0,o=n+1),l<0&&(l=t.length-1,o=n-1);else if("Enter"===e.key)e.preventDefault(),o=e.shiftKey?n-1:n+1;else if("ArrowDown"===e.key)e.preventDefault(),o=n+1;else if("ArrowUp"===e.key)e.preventDefault(),o=n-1;else if("ArrowLeft"===e.key)e.preventDefault(),l=r-1;else{if("ArrowRight"!==e.key){if("Delete"===e.key||"Backspace"===e.key){const o=e.target;if(o.isContentEditable)return void(o.textContent&&window.getSelection()?.toString()===o.textContent&&(e.preventDefault(),re(n,r,"")));if(e.preventDefault(),q&&B){const e=Math.min(q.row,B.row),n=Math.max(q.row,B.row),r=Math.min(q.col,B.col),o=Math.max(q.col,B.col),l=ne.map(e=>[...e]);for(let c=e;c<=n;c++)for(let e=r;e<=o;e++)l[c]&&!t[e]?.readOnly&&(l[c][e]="");p(l)}else re(n,r,"");return}return}e.preventDefault(),l=r+1}for(;l>=0&&l<t.length&&t[l].readOnly;)l+="Tab"===e.key&&e.shiftKey?-1:1;if(o>=0&&o<ne.length&&l>=0&&l<t.length){const e=C.current?.querySelector(`[data-row="${o}"][data-col="${l}"]`);e&&(e.focus({preventScroll:!0}),e.scrollIntoView({block:"nearest",inline:"nearest"}),$({row:o,col:l}),G(null),V({row:o,col:l}),U({row:o,col:l}))}},[t,ne,ne.length,re,q,B,p]),se=s(e=>{if(!y&&e>=ne.length-2){const e=ne.map(e=>[...e]);for(let n=0;n<5;n++)e.push(Array(t.length).fill(""));p(e)}},[y,ne,t.length,p]),[ie,ue]=c(null);a(()=>{if(!ie)return;const e=()=>ue(null);return window.addEventListener("pointerdown",e),()=>window.removeEventListener("pointerdown",e)},[ie]);const he=s(e=>{const n=ne.map(e=>[...e]);n.splice(e,0,Array(t.length).fill("")),p(n)},[ne,t.length,p]),de=s(e=>{if(ne.length<=1)return;const t=ne.filter((t,n)=>n!==e);p(t)},[ne,p]),we=s(e=>{const t=ne.map(t=>{const n=[...t];return n.splice(e,0,""),n});p(t)},[ne,p]),me=s(e=>{if(t.length<=1)return;const n=ne.map(t=>{const n=[...t];return n.splice(e,1),n});p(n)},[ne,t.length,p]),ge=s((e,t)=>{e.preventDefault(),y||ue({x:e.clientX,y:e.clientY,items:[{label:E.insertRowAbove,onClick:()=>{he(t),ue(null)}},{label:E.insertRowBelow,onClick:()=>{he(t+1),ue(null)}},{label:E.deleteRow(t+1),onClick:()=>{de(t),ue(null)}}]})},[y,he,de,E]),fe=s((e,n)=>{e.preventDefault(),y||ue({x:e.clientX,y:e.clientY,items:[{label:E.insertColumnLeft,onClick:()=>{we(n),ue(null)}},{label:E.insertColumnRight,onClick:()=>{we(n+1),ue(null)}},{label:E.deleteColumn(String(t[n]?.title||n+1)),onClick:()=>{me(n),ue(null)}}]})},[y,t,we,me,E]),pe=e=>S[e]??t[e]?.width??150;a(()=>{const e=e=>{if(!z.current)return;const t=e.clientX-z.current.startX,n=Math.max(40,z.current.startW+t);N(e=>({...e,[z.current.col]:n}))},n=()=>{if(z.current&&b){const e=t.map((e,t)=>({...e,width:S[t]??e.width}));e[z.current.col]={...e[z.current.col],width:S[z.current.col]??t[z.current.col].width},b(e)}z.current=null,document.body.style.cursor=""};return window.addEventListener("mousemove",e),window.addEventListener("mouseup",n),()=>{window.removeEventListener("mousemove",e),window.removeEventListener("mouseup",n)}},[t,S,b]);const be=e=>A[e]??28;a(()=>{const e=e=>{if(!R.current)return;const t=e.clientY-R.current.startY,n=Math.max(20,R.current.startH+t);O(e=>({...e,[R.current.row]:n}))},t=()=>{R.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=s(n=>{const r="12px ui-monospace, SFMono-Regular, Menlo, monospace";if(null===e("",r))return;let o=0;for(const t of ne){const l=String(t[n]??"").replace(/<[^>]*>/g,""),c=e(l,r)??0;c>o&&(o=c)}const l=e(t[n]?.title??"",r)??0;l>o&&(o=l);const c=Math.max(40,Math.ceil(o+24));if(N(e=>({...e,[n]:c})),b){const e=t.map((e,t)=>({...e,width:t===n?c:S[t]??e.width}));b(e)}},[ne,t,S,b]),ve=s(e=>{O(t=>{const n={...t};return delete n[e],n})},[]),xe=s(e=>{const{a:n,e:r}=ee.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;e.row>l?i=e.row:e.row<o&&(s=e.row),e.col>a?h=e.col:e.col<c&&(u=e.col);const d=l-o+1,w=a-c+1,m=ne.map(e=>[...e]);for(;m.length<=i;)m.push(Array(t.length).fill(""));for(const e of m)for(;e.length<=h;)e.push("");function g(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=g(Array.from({length:d},(e,n)=>m[o+n]?.[t]??""));if(r){const c=parseFloat(m[l]?.[t]??"0"),a=parseFloat(m[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=m[o+r]?.[t]??""}}else if(1===d&&s===o&&i===l){const r=g(Array.from({length:w},(t,n)=>m[e]?.[c+n]??""));if(r){const o=parseFloat(m[e]?.[a]??"0"),l=parseFloat(m[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=m[e]?.[c+r]??""}}else{const r=((e-o)%d+d)%d,l=((t-c)%w+w)%w;n=m[o+r]?.[c+l]??""}m[e][t]=n}p(m),V({row:s,col:u}),U({row:i,col:h})},[ne,t.length,p]);a(()=>{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);Q({row:r,col:o})},t=()=>{Z.current&&J&&xe(J),Z.current=!1,Q(null),document.body.style.cursor=""};return window.addEventListener("mousemove",e),window.addEventListener("mouseup",t),()=>{window.removeEventListener("mousemove",e),window.removeEventListener("mouseup",t)}},[J,xe]);const Me=e=>{e.preventDefault(),e.stopPropagation(),Z.current=!0,document.body.style.cursor="crosshair"},De=l(null),[ke,Ce]=c(0),[Ee,Le]=c(800);a(()=>{const e=De.current;if(!e)return;const t=()=>Le(e.clientHeight||800);t();const n=new ResizeObserver(t);return n.observe(e),()=>n.disconnect()},[]);const $e=ne.length>100,Se=$e?Math.max(0,Math.floor(ke/28)-20):0,Ne=$e?Math.min(ne.length,Math.ceil((ke+Ee)/28)+20):ne.length,ze=i(()=>ne.slice(Se,Ne),[ne,Se,Ne]),Ae=28*Se,Oe=28*(ne.length-Ne),Re="px-2 h-8 text-left text-xs font-medium text-ink-faint uppercase bg-gray-100 border-b border-r border-line select-none";/* @__PURE__ */
|
|
3
3
|
return h("div",{ref:De,className:"border border-gray-300 rounded overflow-scroll grid-scroll",style:{maxHeight:x,height:x},onScroll:e=>Ce(e.target.scrollTop),children:[
|
|
4
|
-
/* @__PURE__ */h("table",{ref:C,className:"border-collapse select-none",style:{tableLayout:"fixed",minWidth:36+
|
|
4
|
+
/* @__PURE__ */h("table",{ref:C,className:"border-collapse select-none",style:{tableLayout:"fixed",minWidth:36+t.reduce((e,n)=>e+pe(t.indexOf(n)),0)},children:[
|
|
5
5
|
/* @__PURE__ */h("colgroup",{children:[
|
|
6
|
-
/* @__PURE__ */d("col",{style:{width:36}}),
|
|
6
|
+
/* @__PURE__ */d("col",{style:{width:36}}),t.map((e,t)=>/* @__PURE__ */d("col",{style:{width:pe(t)}},e.key))]}),
|
|
7
7
|
/* @__PURE__ */d("thead",{className:"sticky top-0 z-10",children:/* @__PURE__ */h("tr",{children:[
|
|
8
|
-
/* @__PURE__ */d("th",{className:`${n} ${Re} text-center w-9 cursor-pointer hover:bg-gray-200`,onClick:()=>{V({row:0,col:0}),U({row:ne.length-1,col:
|
|
9
|
-
return h("th",{className:`${n} ${Re} cursor-pointer hover:bg-gray-200 relative${o?" !bg-blue-200":""}${H===r?" !bg-blue-100":""}`,style:{width:pe(r)},draggable:!0,onDragStart:()=>(e=>j(e))(r),onDragOver:e=>((e,t)=>{e.preventDefault(),X(t)})(e,r),onDrop:()=>(
|
|
10
|
-
/* @__PURE__ */d("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:E.resize})]},
|
|
11
|
-
/* @__PURE__ */h("tbody",{children:[Ae>0&&/* @__PURE__ */d("tr",{style:{height:Ae}}),ze.map((
|
|
8
|
+
/* @__PURE__ */d("th",{className:`${n} ${Re} text-center w-9 cursor-pointer hover:bg-gray-200`,onClick:()=>{V({row:0,col:0}),U({row:ne.length-1,col:t.length-1})},title:E.selectAll,children:"#"}),t.map((e,r)=>{const o=q&&B&&Math.min(q.col,B.col)<=r&&r<=Math.max(q.col,B.col)&&0===Math.min(q.row,B.row)&&Math.max(q.row,B.row)===ne.length-1;/* @__PURE__ */
|
|
9
|
+
return h("th",{className:`${n} ${Re} cursor-pointer hover:bg-gray-200 relative${o?" !bg-blue-200":""}${H===r?" !bg-blue-100":""}`,style:{width:pe(r)},draggable:!0,onDragStart:()=>(e=>j(e))(r),onDragOver:e=>((e,t)=>{e.preventDefault(),X(t)})(e,r),onDrop:()=>(e=>{if(null===I||I===e)return j(null),void X(null);const n=ne.map(t=>{const n=[...t],[r]=n.splice(I,1);return n.splice(e,0,r),n});if(p(n),b){const n=[...t],[r]=n.splice(I,1);n.splice(e,0,r),b(n)}j(null),X(null)})(r),onDragEnd:()=>{j(null),X(null)},onClick:e=>{e.shiftKey&&q||V({row:0,col:r}),U({row:ne.length-1,col:r})},onContextMenu:e=>fe(e,r),children:[e.title,
|
|
10
|
+
/* @__PURE__ */d("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:E.resize})]},e.key)})]})}),
|
|
11
|
+
/* @__PURE__ */h("tbody",{children:[Ae>0&&/* @__PURE__ */d("tr",{style:{height:Ae}}),ze.map((e,n)=>{const r=Se+n,o=q&&B&&Math.min(q.row,B.row)<=r&&r<=Math.max(q.row,B.row)&&0===Math.min(q.col,B.col)&&Math.max(q.col,B.col)===t.length-1;/* @__PURE__ */
|
|
12
12
|
return h("tr",{style:{height:be(r)},children:[
|
|
13
|
-
/* @__PURE__ */h("td",{className:`relative px-1 py-1 text-center text-2xs text-ink-faintest border-b border-r border-line bg-surface-sunken select-none cursor-pointer hover:bg-gray-200${o?" !bg-blue-200 !text-gray-700":""}${P===r?" !bg-blue-100":""}`,draggable:!0,onDragStart:()=>(e=>T(e))(r),onDragOver:e=>((e,t)=>{e.preventDefault(),F(t)})(e,r),onDrop:()=>(e=>{if(null===K||K===e)return T(null),void F(null);const t=ne.map(e=>[...e]),[n]=t.splice(K,1);t.splice(e,0,n),p(t),T(null),F(null)})(r),onDragEnd:()=>{T(null),F(null)},onClick:
|
|
14
|
-
/* @__PURE__ */d("div",{className:"absolute -bottom-1 left-0 right-0 h-2 cursor-row-resize z-20",onMouseDown:e=>((e,t)=>{e.preventDefault(),e.stopPropagation(),R.current={row:t,startY:e.clientY,startH:be(t)},document.body.style.cursor="row-resize"})(e,r),onDoubleClick:e=>{e.stopPropagation(),ve(r)},title:E.resize})]}),
|
|
15
|
-
return h("td",{className:`relative px-0 py-0 border-b border-r border-gray-200 text-sm${
|
|
16
|
-
/* @__PURE__ */d(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"===
|
|
13
|
+
/* @__PURE__ */h("td",{className:`relative px-1 py-1 text-center text-2xs text-ink-faintest border-b border-r border-line bg-surface-sunken select-none cursor-pointer hover:bg-gray-200${o?" !bg-blue-200 !text-gray-700":""}${P===r?" !bg-blue-100":""}`,draggable:!0,onDragStart:()=>(e=>T(e))(r),onDragOver:e=>((e,t)=>{e.preventDefault(),F(t)})(e,r),onDrop:()=>(e=>{if(null===K||K===e)return T(null),void F(null);const t=ne.map(e=>[...e]),[n]=t.splice(K,1);t.splice(e,0,n),p(t),T(null),F(null)})(r),onDragEnd:()=>{T(null),F(null)},onClick:e=>{e.shiftKey&&q||V({row:r,col:0}),U({row:r,col:t.length-1})},onContextMenu:e=>ge(e,r),children:[r+1,
|
|
14
|
+
/* @__PURE__ */d("div",{className:"absolute -bottom-1 left-0 right-0 h-2 cursor-row-resize z-20",onMouseDown:e=>((e,t)=>{e.preventDefault(),e.stopPropagation(),R.current={row:t,startY:e.clientY,startH:be(t)},document.body.style.cursor="row-resize"})(e,r),onDoubleClick:e=>{e.stopPropagation(),ve(r)},title:E.resize})]}),t.map((t,n)=>{const o=q&&B&&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,B,r,n),l=Y?.row===r&&Y?.col===n&&!t.readOnly,c=L?.row===r&&L?.col===n,a=M?.[`${r}:${n}`],s=q&&B?Math.max(q.row,B.row):-1,i=q&&B?Math.max(q.col,B.col):-1,u=q&&B&&r===s&&n===i,w=Z.current&&J&&q&&B&&(()=>{const e=Math.min(q.row,B.row),t=Math.max(q.row,B.row),o=Math.min(q.col,B.col),l=Math.max(q.col,B.col);let c=e,a=t,s=o,i=l;return J.row>t?a=J.row:J.row<e&&(c=J.row),J.col>l?i=J.col:J.col<o&&(s=J.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",f=`${a?.bold?" font-bold":""}${a?.italic?" italic":""}${a?.underline?" underline":""}`;/* @__PURE__ */
|
|
15
|
+
return h("td",{className:`relative px-0 py-0 border-b border-r border-gray-200 text-sm${t.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){oe(e,r,n);const t=e.currentTarget.querySelector("[data-row][data-col]");t?.focus()}},onMouseEnter:()=>le(r,n),onClick:e=>{if(e.target===e.currentTarget){const t=e.currentTarget.querySelector("[data-row][data-col]");t?.focus()}},onDoubleClick:e=>{e.target!==e.currentTarget||t.readOnly||G({row:r,col:n})},children:[
|
|
16
|
+
/* @__PURE__ */d(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"===t.align?"text-right":"center"===t.align?"text-center":""} ${t.readOnly?"cursor-default":"cursor-cell"} font-mono ${m}${f}`,onMouseDown:e=>oe(e,r,n),onMouseEnter:()=>le(r,n),onDoubleClick:()=>{t.readOnly||G({row:r,col:n})},onFocus:()=>{$({row:r,col:n}),_.current||(V({row:r,col:n}),U({row:r,col:n}))},onBlur:t=>{const o=t.currentTarget.textContent||"";o!==(e[n]||"")&&re(r,n,o),G(null)},onInput:()=>se(r),onPaste:e=>ce(e,r,n),onKeyDown:e=>{if(!(l||t.readOnly||1!==e.key.length||e.ctrlKey||e.metaKey||e.altKey))return e.preventDefault(),re(r,n,e.key),W.current={row:r,col:n},void G({row:r,col:n});ae(e,r,n)},text:e[n]||""}),u&&/* @__PURE__ */d("div",{onMouseDown:Me,title:E.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)}),Oe>0&&/* @__PURE__ */d("tr",{style:{height:Oe}})]})]}),ie&&u(
|
|
17
17
|
/* @__PURE__ */h(w,{children:[
|
|
18
18
|
/* @__PURE__ */d("div",{className:"fixed inset-0 z-(--z-popup)",onPointerDown:()=>ue(null)}),
|
|
19
19
|
/* @__PURE__ */d("div",{className:"fixed z-(--z-popup) bg-surface rounded-lg shadow-lg border border-line py-1 min-w-[160px]",style:{left:ie.x,top:ie.y},children:ie.items.map((e,t)=>/* @__PURE__ */d("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-ink hover:bg-gray-100",children:e.label},t))})]}),document.body)]})}export{f as EditableGrid,m as withSpareRow};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{setBoundaryErrorReporter as e}from"./chunk-KNUR2UEG.js";import{VERSION as t}from"./chunk-CSMFF6LM.js";var n=-1,i=()=>n,a=e=>{addEventListener("pageshow",t=>{t.persisted&&(n=t.timeStamp,e(t))},!0)},r=(e,t,n,i)=>{let a,r;return o=>{var s,c;t.value>=0&&(o||i)&&(r=t.value-(a??0),(r||void 0===a)&&(a=t.value,t.delta=r,t.rating=(s=t.value)>(c=n)[1]?"poor":s>c[0]?"needs-improvement":"good",e(t)))}},o=e=>{requestAnimationFrame(()=>requestAnimationFrame(()=>e()))},s=()=>{const e=performance.getEntriesByType("navigation")[0];if(e&&e.responseStart>0&&e.responseStart<performance.now())return e},c=()=>s()?.activationStart??0,d=-1,l=/* @__PURE__ */new Set,u=()=>"hidden"!==document.visibilityState||document.prerendering?1/0:0,f=e=>{if("hidden"===document.visibilityState){if("visibilitychange"===e.type)for(const e of l)e();isFinite(d)||(d="visibilitychange"===e.type?e.timeStamp:0,removeEventListener("prerenderingchange",f,!0))}},h=(e=!1)=>{if(e&&(d=1/0),d<0){const e=c(),t=document.prerendering?void 0:globalThis.performance.getEntriesByType("visibility-state").find(t=>"hidden"===t.name&&t.startTime>=e)?.startTime;d=t??u(),addEventListener("visibilitychange",f,!0),addEventListener("prerenderingchange",f,!0),a(()=>{setTimeout(()=>{d=u()})})}return{get firstHiddenTime(){return d},onHidden(e){l.add(e)}}},g=(e,t=-1,n,a=0,r,o,d)=>{const l=s(),u=l?.navigationId||0;let f="navigate";return n?f=n:i()>=0?f="back-forward-cache":l&&(document.prerendering||c()>0?f="prerender":document.wasDiscarded?f="restore":l.type&&(f=l.type.replace(/_/g,"-"))),{name:e,value:t,rating:"good",delta:0,entries:[],id:`v6-${Date.now()}-${Math.floor(8999999999999*Math.random())+1e12}`,navigationType:f,navigationId:a||u,navigationInteractionId:r,navigationURL:o||l?.name,navigationStartTime:d||0}},v=/* @__PURE__ */new WeakMap;function p(e,t){let n=v.get(t);return n||(n=/* @__PURE__ */new WeakMap,v.set(t,n)),n.get(e)||n.set(e,new t),n.get(e)}var m,y=class{t;i=0;o=[];h(e){if(e.hadRecentInput)return;const t=this.o[0],n=this.o.at(-1);this.i&&t&&n&&e.startTime-n.startTime<1e3&&e.startTime-t.startTime<5e3?(this.i+=e.value,this.o.push(e)):(this.i=e.value,this.o=[e]),this.t?.(e)}},T=(e,t,n={})=>{try{const i=e.filter(e=>PerformanceObserver.supportedEntryTypes.includes(e));if(i.length>0){const e=new PerformanceObserver(e=>{queueMicrotask(()=>{const n=e.getEntries();i.length>1&&n.sort((e,t)=>e.startTime+e.duration-(t.startTime+t.duration)),t(n)})});for(const t of i)e.observe({type:t,buffered:!0,...n});return e}}catch{}},w=e=>globalThis.PerformanceObserver?.supportedEntryTypes?.includes("soft-navigation")&&"function"==typeof globalThis.PerformanceSoftNavigation?.prototype?.getLargestInteractionContentfulPaint&&e&&e.reportSoftNavs,I=(e,t)=>{if(e.set(t.navigationId,t),e.size>2){const t=e.keys().next().value;void 0!==t&&e.delete(t)}},b=e=>{let t=!1;return()=>{t||(e(),t=!0)}},C=class{l},E=e=>{document.prerendering?addEventListener("prerenderingchange",e,!0):e()},L=[1800,3e3],P=(e,t={})=>{const n=w(t);E(()=>{const s=p(t,C),d=h();let l,u=g("FCP");const f=T(["paint"],e=>{for(const t of e)"first-contentful-paint"===t.name&&(f.disconnect(),t.startTime<d.firstHiddenTime&&(u.value=Math.max(t.startTime-c(),0),u.entries.push(t),u.navigationId=t.navigationId||u.navigationId,l(!0)))});f&&(l=r(e,u,L,t.reportAllChanges),a(n=>{u=g("FCP",-1,"back-forward-cache",u.navigationId,u.navigationInteractionId,u.navigationURL,i()),l=r(e,u,L,t.reportAllChanges),o(()=>{u.value=performance.now()-n.timeStamp,l(!0)})})),n&&T(["soft-navigation"],n=>{n.forEach(n=>{s.l&&n.navigationId&&I(s.l,n);const i=Math.max((n.presentationTime||n.paintTime||0)-n.startTime,0);u=g("FCP",i,"soft-navigation",n.navigationId,n.interactionId,n.name,n.startTime),l=r(e,u,L,t.reportAllChanges),l(!0)})},t)})},A=[.1,.25],k=0,S=1/0,M=0,z=e=>{for(const t of e)t.interactionId&&(S=Math.min(S,t.interactionId),M=Math.max(M,t.interactionId),k=M?(M-S)/7+1:0)},$=()=>m?k:performance.interactionCount??0,F=class{u=0;v=[];m=/* @__PURE__ */new Map;p;T;_(){return $()-this.u}M(){this.u=$(),this.v.length=0,this.m.clear()}L(e){const t=this._(),n=Math.min(this.v.length-1,Math.floor(t/50));return!t||-1!==n||"soft-navigation"!==e&&"back-forward-cache"!==e?this.v[n]:{P:8,id:-1,entries:[]}}h(e){if(this.p?.(e),!e.interactionId)return;const t=this.v.at(-1);let n=this.m.get(e.interactionId);if(n||this.v.length<10||e.duration>t.P){if(n?e.duration>n.P?(n.entries=[e],n.P=e.duration):e.duration===n.P&&e.startTime===n.entries[0].startTime&&n.entries.push(e):(n={id:e.interactionId,entries:[e],P:e.duration},this.m.set(n.id,n),this.v.push(n)),this.v.sort((e,t)=>t.P-e.P),this.v.length>10){const e=this.v.splice(10);for(const t of e)this.m.delete(t.id)}this.T?.(n)}}},_=e=>{const t="requestIdleCallback"in globalThis?1e3:0,n=globalThis.requestIdleCallback||setTimeout,i=globalThis.cancelIdleCallback||clearTimeout;if("hidden"===document.visibilityState)e();else{const a=b(e);let r=-1;const o=()=>{i(r),a()};addEventListener("visibilitychange",o,{once:!0,capture:!0}),r=n(()=>{removeEventListener("visibilitychange",o,{capture:!0}),a()},{timeout:t})}},Z=[200,500],R=(e,t={})=>{if(!globalThis.PerformanceEventTiming||!("interactionId"in PerformanceEventTiming.prototype))return;const n=h();E(()=>{"interactionCount"in performance||m||(m=T(["event"],z,{durationThreshold:0}));let o,s=g("INP");const c=p(t,F),d=(n,i,a,d,l)=>{c.M(),s=g("INP",-1,n,i,a,d,l),o=r(e,s,Z,t.reportAllChanges)},l=()=>{const e=c.L(s.navigationType);e&&e.P!==s.value&&(s.value=e.P,s.entries=e.entries,o())},u=e=>{l(),o(!0),d("soft-navigation",e.navigationId,e.interactionId,e.name,e.startTime)},f=(e,t=!1)=>{_(()=>{for(const t of e)"soft-navigation"!==t.entryType?c.h(t):u(t);l(),t&&o(!0)})},h=["event","first-input"];w(t)&&h.push("soft-navigation");const v=T(h,f,{...t,durationThreshold:t.durationThreshold??40});o=r(e,s,Z,t.reportAllChanges),v&&(n.onHidden(()=>{f(v.takeRecords(),!0)}),a(()=>{d("back-forward-cache",s.navigationId,s.navigationInteractionId,s.navigationURL,i())}))})},j=class{p;l;h(e){this.p?.(e)}},x=[2500,4e3],B=[800,1800],N=e=>{document.prerendering?E(()=>N(e)):"complete"!==document.readyState?addEventListener("load",()=>N(e),!0):setTimeout(e)};var U=/^[A-Za-z0-9/_:.\-[\]{}*@~]+$/,O=/^[A-Za-z_$][A-Za-z0-9_$.]*$/,H=/^[A-Za-z0-9][A-Za-z0-9.+_-]*$/;var q=class{constructor(e){this.head=e}head;events=[];waiting=/* @__PURE__ */new Map;seen=/* @__PURE__ */new Set;get size(){return this.events.length}addVital(e){this.events.push(e)}addError(e){const t=function(e){return e.frames.length?`${e.name}|${e.frames.join("|")}`:`${e.name}|${e.message.replace(/\d/g,"0")}`}(e),n=this.waiting.get(t);return n?(n.count=Math.min(1e3,n.count+e.count),!0):!(this.seen.has(t)||this.seen.size>=20)&&(this.seen.add(t),this.waiting.set(t,e),this.events.push(e),!0)}drain(){const e=this.events;this.events=[],this.waiting.clear();const t=[],n=JSON.stringify({...this.head,events:[]}).length;let i=[],a=n;for(const r of e){const e=JSON.stringify(r).length+1;n+e>30720||((50===i.length||a+e>30720)&&(t.push({...this.head,events:i}),i=[],a=n),i.push(r),a+=e)}return i.length&&t.push({...this.head,events:i}),t}},J=/[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,}/g,K=/\beyJ[A-Za-z0-9_-]{8,}\.[A-Za-z0-9_-]{8,}(?:\.[A-Za-z0-9_-]*)?|\b[Bb]earer\s+[A-Za-z0-9._~+/=-]{8,}/g,V=/\b[a-z][a-z0-9+.-]*:\/\/\S+/gi,W=/\b[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}\b/gi,D=/\d{4,}/g,G=/(^|[/:])(?:\d+|[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}|[0-9a-f]{16,})(?=$|[/:])/gi,Q=/^[a-z][a-z0-9+.-]*:\/\/[^/]*/i,X=/(?:\(|@|\bat\s+)?((?:[a-z][a-z0-9+.-]*:\/\/|\/)[^\s()@]*?):(\d+):(\d+)\)?\s*$/i;function Y(e,t,n){const i=e.replace(Q,"").split(/[?#]/,1)[0];return i?`${i}:${t}:${n}`.slice(0,256):null}function ee(e){if("string"!=typeof e)return[];const t=[];for(const n of e.split("\n")){const e=X.exec(n.trim()),i=e&&Y(e[1],e[2],e[3]);if(i&&t.push(i),5===t.length)break}return t}function te(e){const t=e instanceof Error?e.name:void 0;return"string"==typeof t&&t.length<=64&&O.test(t)?t:"Error"}function ne(e){if("string"!=typeof e)return"unknown";const t=e.trim().replace(Q,"").split(/[?#]/,1)[0].replace(G,(e,t)=>":"===t?":id":`${t}:id`);return t&&t.length<=128&&!t.includes("//")&&U.test(t)?t:"unknown"}var ie={flush(){},reportError(){},stop(){}},ae=null,re=/* @__PURE__ */new Set(["LCP","FCP","TTFB"]);function oe(e,t,n){const i=function(e){if(e.anonymous)return{credentials:"omit",headers:{"Content-Type":"application/json"}};const t=e.getAccessToken();return t?{credentials:"same-origin",headers:{"Content-Type":"application/json",Authorization:`Bearer ${t}`}}:null}(t);if(!i)return;const a=t.anonymous?"/api/storefront-analytics/web-vitals/":"/api/client-telemetry/web-batches/";n(t.endpoint??a,{...i,method:"POST",keepalive:!0,body:JSON.stringify(e)}).catch(e=>{console.debug("[efficient-shell] client telemetry batch dropped:",e)})}function se(e){((e,t={})=>{let n=!1;const s=w(t);E(()=>{let d,l=h(),u=g("LCP");const f=p(t,j),v=(i,a,o,s,c)=>{u=g("LCP",-1,i,a,o,s,c),d=r(e,u,x,t.reportAllChanges),n=!1,"soft-navigation"===i&&(l=h(!0))},m=e=>{f.l&&e.navigationId&&I(f.l,e),n||d(!0),v("soft-navigation",e.navigationId,e.interactionId,e.name,e.startTime);const t=e.getLargestInteractionContentfulPaint?.();t&&y([t])},y=e=>{t.reportAllChanges||s||(e=e.slice(-1));for(const t of e){if(!t)continue;if("soft-navigation"===t.entryType){m(t);continue}let e=0,n=[],i=t.startTime;if("largest-contentful-paint"===t.entryType)e=Math.max(t.startTime-c(),0),f.h(t),n=[t];else if("interaction-contentful-paint"===t.entryType){const a=t;if(!u.navigationId)continue;if("interactionId"in a&&a.interactionId!=u.navigationInteractionId)continue;i=a.largestContentfulPaint?.renderTime||0,e=Math.max(i-t.startTime,0),a.largestContentfulPaint&&(f.h(a.largestContentfulPaint),n=[a.largestContentfulPaint])}i<l.firstHiddenTime&&(u.value=e,u.entries=n,d())}},w=["largest-contentful-paint"];s&&w.push("interaction-contentful-paint","soft-navigation");const b=T(w,y);if(b){d=r(e,u,x,t.reportAllChanges);const c=["keydown","click","visibilitychange"],l=e=>{if(e.isTrusted&&!n){const e=u.id;_(()=>{if(!n){if(!s){b.disconnect();for(const e of c)removeEventListener(e,l,{capture:!0})}e===u.id&&(n=!0,d(!0))}})}};for(const e of c)addEventListener(e,l,{capture:!0});a(a=>{v("back-forward-cache",u.navigationId,u.navigationInteractionId,u.navigationURL,i()),d=r(e,u,x,t.reportAllChanges),o(()=>{u.value=performance.now()-a.timeStamp,n=!0,d(!0)})})}})})(e),R(e),((e,t={})=>{const n=h();P(b(()=>{let s,c=g("CLS",0);const d=p(t,y),l=(n,i,a,o,l)=>{c=g("CLS",0,n,i,a,o,l),d.i=0,s=r(e,c,A,t.reportAllChanges)},u=(e=!1)=>{d.i>c.value&&(c.value=d.i,c.entries=d.o),s(e)},f=e=>{u(!0),l("soft-navigation",e.navigationId,e.interactionId,e.name,e.startTime)},h=e=>{for(const t of e)"soft-navigation"!==t.entryType?d.h(t):f(t);u()},v=["layout-shift"];w(t)&&v.push("soft-navigation");const m=T(v,h);m&&(s=r(e,c,A,t.reportAllChanges),n.onHidden(()=>{h(m.takeRecords()),s(!0)}),a(()=>{l("back-forward-cache",c.navigationId,c.navigationInteractionId,c.navigationURL,i()),o(s)}),setTimeout(s))}))})(e),P(e),((e,t={})=>{const n=w(t);let o=g("TTFB"),d=r(e,o,B,t.reportAllChanges);N(()=>{const l=s();if(l){const s=l.responseStart;o.value=Math.max(s-c(),0),o.entries=[l],d(!0),a(()=>{o=g("TTFB",0,"back-forward-cache",o.navigationId,o.navigationInteractionId,o.navigationURL,i()),d=r(e,o,B,t.reportAllChanges),d(!0)}),n&&T(["soft-navigation"],n=>{n.forEach(n=>{n.navigationId&&(o=g("TTFB",0,"soft-navigation",n.navigationId,n.interactionId,n.name,n.startTime),o.entries=[n],d=r(e,o,B,t.reportAllChanges),d(!0))})},t)}})})(e)}function ce(n){if(ae?.stop(),ae=null,!1===n.enabled||"undefined"==typeof window||"undefined"==typeof document)return ie;if(!function(e){const t="string"==typeof e.app&&H.test(e.app),n="string"==typeof e.release&&H.test(e.release);return t&&n||console.warn("[efficient-shell] client telemetry not started: `app` and `release` must be version-like strings."),t&&n}(n))return ie;const i=function(e){const t=e.vitalsSampleRate??1;return t>0&&(t>=1||(e.random??Math.random)()<t)}(n);if(n.anonymous&&!i)return ie;const a=n.fetch??window.fetch.bind(window),r=new q({app:n.app,release:n.release,shell_version:H.test(t)?t:""}),o=ne(n.routeKey()),s=function(e=("undefined"==typeof window?void 0:window)){if(!e)return"desktop";const t="function"==typeof e.matchMedia&&e.matchMedia("(pointer: coarse)").matches,n=e.innerWidth;return n<600?"mobile":t&&n<1280?"tablet":"desktop"}(window);let c=!1;const d=()=>{for(const e of r.drain())oe(e,n,a)},l=e=>{c||n.anonymous||(r.addError(e),r.size>=50&&d())},u=(e,t)=>{return{type:"error",source:t,name:te(e),message:(a=e,i=a instanceof Error?a.message:"string"==typeof a?a:a&&"object"==typeof a&&"string"==typeof a.message?a.message:"",i.slice(0,640).replace(J,"[redacted]").replace(K,"[redacted]").replace(V,"[url]").replace(W,"[id]").replace(D,"[n]").replace(/\s+/g," ").trim().slice(0,160)),frames:ee(e instanceof Error?e.stack:void 0),route:ne(n.routeKey()),count:1};var i,a};i&&(n.observeVitals??se)(e=>{c||(r.addVital(function(e,t,n,i){return{type:"vital",name:e.name,value:e.value,route:re.has(e.name)?t:n(),navigation:e.navigationType??"navigate",device:i}}(e,o,()=>ne(n.routeKey()),s)),r.size>=50&&d())});const f=n.anonymous?()=>{}:function(t,n){const i=e=>{const{error:i,message:a,filename:r,lineno:o,colno:s}=e;if(null!=i)return void t(n(i,"onerror"));const c=r?ee(`at ${r}:${o??0}:${s??0}`):[];t({...n(a??"","onerror"),frames:c})},a=e=>t(n(e.reason,"unhandledrejection"));window.addEventListener("error",i),window.addEventListener("unhandledrejection",a);const r=e(e=>t(n(e,"boundary")));return()=>{window.removeEventListener("error",i),window.removeEventListener("unhandledrejection",a),r()}}(l,u),h=()=>{"hidden"===document.visibilityState&&d()};document.addEventListener("visibilitychange",h),window.addEventListener("pagehide",d);const g=window.setInterval(d,n.flushIntervalMs??6e4),v={flush:d,reportError:e=>l(u(e,"boundary")),stop(){c||(d(),c=!0,f(),document.removeEventListener("visibilitychange",h),window.removeEventListener("pagehide",d),window.clearInterval(g),ae===v&&(ae=null))}};return ae=v,v}export{ce as startClientTelemetry};
|
|
1
|
+
import{setBoundaryErrorReporter as e}from"./chunk-KNUR2UEG.js";import{VERSION as t}from"./chunk-AFI3WCVM.js";var n=-1,i=()=>n,a=e=>{addEventListener("pageshow",t=>{t.persisted&&(n=t.timeStamp,e(t))},!0)},r=(e,t,n,i)=>{let a,r;return o=>{var s,c;t.value>=0&&(o||i)&&(r=t.value-(a??0),(r||void 0===a)&&(a=t.value,t.delta=r,t.rating=(s=t.value)>(c=n)[1]?"poor":s>c[0]?"needs-improvement":"good",e(t)))}},o=e=>{requestAnimationFrame(()=>requestAnimationFrame(()=>e()))},s=()=>{const e=performance.getEntriesByType("navigation")[0];if(e&&e.responseStart>0&&e.responseStart<performance.now())return e},c=()=>s()?.activationStart??0,d=-1,l=/* @__PURE__ */new Set,u=()=>"hidden"!==document.visibilityState||document.prerendering?1/0:0,f=e=>{if("hidden"===document.visibilityState){if("visibilitychange"===e.type)for(const e of l)e();isFinite(d)||(d="visibilitychange"===e.type?e.timeStamp:0,removeEventListener("prerenderingchange",f,!0))}},h=(e=!1)=>{if(e&&(d=1/0),d<0){const e=c(),t=document.prerendering?void 0:globalThis.performance.getEntriesByType("visibility-state").find(t=>"hidden"===t.name&&t.startTime>=e)?.startTime;d=t??u(),addEventListener("visibilitychange",f,!0),addEventListener("prerenderingchange",f,!0),a(()=>{setTimeout(()=>{d=u()})})}return{get firstHiddenTime(){return d},onHidden(e){l.add(e)}}},g=(e,t=-1,n,a=0,r,o,d)=>{const l=s(),u=l?.navigationId||0;let f="navigate";return n?f=n:i()>=0?f="back-forward-cache":l&&(document.prerendering||c()>0?f="prerender":document.wasDiscarded?f="restore":l.type&&(f=l.type.replace(/_/g,"-"))),{name:e,value:t,rating:"good",delta:0,entries:[],id:`v6-${Date.now()}-${Math.floor(8999999999999*Math.random())+1e12}`,navigationType:f,navigationId:a||u,navigationInteractionId:r,navigationURL:o||l?.name,navigationStartTime:d||0}},v=/* @__PURE__ */new WeakMap;function p(e,t){let n=v.get(t);return n||(n=/* @__PURE__ */new WeakMap,v.set(t,n)),n.get(e)||n.set(e,new t),n.get(e)}var m,y=class{t;i=0;o=[];h(e){if(e.hadRecentInput)return;const t=this.o[0],n=this.o.at(-1);this.i&&t&&n&&e.startTime-n.startTime<1e3&&e.startTime-t.startTime<5e3?(this.i+=e.value,this.o.push(e)):(this.i=e.value,this.o=[e]),this.t?.(e)}},T=(e,t,n={})=>{try{const i=e.filter(e=>PerformanceObserver.supportedEntryTypes.includes(e));if(i.length>0){const e=new PerformanceObserver(e=>{queueMicrotask(()=>{const n=e.getEntries();i.length>1&&n.sort((e,t)=>e.startTime+e.duration-(t.startTime+t.duration)),t(n)})});for(const t of i)e.observe({type:t,buffered:!0,...n});return e}}catch{}},w=e=>globalThis.PerformanceObserver?.supportedEntryTypes?.includes("soft-navigation")&&"function"==typeof globalThis.PerformanceSoftNavigation?.prototype?.getLargestInteractionContentfulPaint&&e&&e.reportSoftNavs,I=(e,t)=>{if(e.set(t.navigationId,t),e.size>2){const t=e.keys().next().value;void 0!==t&&e.delete(t)}},b=e=>{let t=!1;return()=>{t||(e(),t=!0)}},C=class{l},E=e=>{document.prerendering?addEventListener("prerenderingchange",e,!0):e()},L=[1800,3e3],P=(e,t={})=>{const n=w(t);E(()=>{const s=p(t,C),d=h();let l,u=g("FCP");const f=T(["paint"],e=>{for(const t of e)"first-contentful-paint"===t.name&&(f.disconnect(),t.startTime<d.firstHiddenTime&&(u.value=Math.max(t.startTime-c(),0),u.entries.push(t),u.navigationId=t.navigationId||u.navigationId,l(!0)))});f&&(l=r(e,u,L,t.reportAllChanges),a(n=>{u=g("FCP",-1,"back-forward-cache",u.navigationId,u.navigationInteractionId,u.navigationURL,i()),l=r(e,u,L,t.reportAllChanges),o(()=>{u.value=performance.now()-n.timeStamp,l(!0)})})),n&&T(["soft-navigation"],n=>{n.forEach(n=>{s.l&&n.navigationId&&I(s.l,n);const i=Math.max((n.presentationTime||n.paintTime||0)-n.startTime,0);u=g("FCP",i,"soft-navigation",n.navigationId,n.interactionId,n.name,n.startTime),l=r(e,u,L,t.reportAllChanges),l(!0)})},t)})},A=[.1,.25],k=0,S=1/0,z=0,M=e=>{for(const t of e)t.interactionId&&(S=Math.min(S,t.interactionId),z=Math.max(z,t.interactionId),k=z?(z-S)/7+1:0)},$=()=>m?k:performance.interactionCount??0,_=class{u=0;v=[];m=/* @__PURE__ */new Map;p;T;_(){return $()-this.u}M(){this.u=$(),this.v.length=0,this.m.clear()}L(e){const t=this._(),n=Math.min(this.v.length-1,Math.floor(t/50));return!t||-1!==n||"soft-navigation"!==e&&"back-forward-cache"!==e?this.v[n]:{P:8,id:-1,entries:[]}}h(e){if(this.p?.(e),!e.interactionId)return;const t=this.v.at(-1);let n=this.m.get(e.interactionId);if(n||this.v.length<10||e.duration>t.P){if(n?e.duration>n.P?(n.entries=[e],n.P=e.duration):e.duration===n.P&&e.startTime===n.entries[0].startTime&&n.entries.push(e):(n={id:e.interactionId,entries:[e],P:e.duration},this.m.set(n.id,n),this.v.push(n)),this.v.sort((e,t)=>t.P-e.P),this.v.length>10){const e=this.v.splice(10);for(const t of e)this.m.delete(t.id)}this.T?.(n)}}},F=e=>{const t="requestIdleCallback"in globalThis?1e3:0,n=globalThis.requestIdleCallback||setTimeout,i=globalThis.cancelIdleCallback||clearTimeout;if("hidden"===document.visibilityState)e();else{const a=b(e);let r=-1;const o=()=>{i(r),a()};addEventListener("visibilitychange",o,{once:!0,capture:!0}),r=n(()=>{removeEventListener("visibilitychange",o,{capture:!0}),a()},{timeout:t})}},Z=[200,500],R=(e,t={})=>{if(!globalThis.PerformanceEventTiming||!("interactionId"in PerformanceEventTiming.prototype))return;const n=h();E(()=>{"interactionCount"in performance||m||(m=T(["event"],M,{durationThreshold:0}));let o,s=g("INP");const c=p(t,_),d=(n,i,a,d,l)=>{c.M(),s=g("INP",-1,n,i,a,d,l),o=r(e,s,Z,t.reportAllChanges)},l=()=>{const e=c.L(s.navigationType);e&&e.P!==s.value&&(s.value=e.P,s.entries=e.entries,o())},u=e=>{l(),o(!0),d("soft-navigation",e.navigationId,e.interactionId,e.name,e.startTime)},f=(e,t=!1)=>{F(()=>{for(const t of e)"soft-navigation"!==t.entryType?c.h(t):u(t);l(),t&&o(!0)})},h=["event","first-input"];w(t)&&h.push("soft-navigation");const v=T(h,f,{...t,durationThreshold:t.durationThreshold??40});o=r(e,s,Z,t.reportAllChanges),v&&(n.onHidden(()=>{f(v.takeRecords(),!0)}),a(()=>{d("back-forward-cache",s.navigationId,s.navigationInteractionId,s.navigationURL,i())}))})},j=class{p;l;h(e){this.p?.(e)}},x=[2500,4e3],B=[800,1800],N=e=>{document.prerendering?E(()=>N(e)):"complete"!==document.readyState?addEventListener("load",()=>N(e),!0):setTimeout(e)};var U=/^[A-Za-z0-9/_:.\-[\]{}*@~]+$/,O=/^[A-Za-z_$][A-Za-z0-9_$.]*$/,H=/^[A-Za-z0-9][A-Za-z0-9.+_-]*$/;var q=class{constructor(e){this.head=e}head;events=[];waiting=/* @__PURE__ */new Map;seen=/* @__PURE__ */new Set;get size(){return this.events.length}addVital(e){this.events.push(e)}addError(e){const t=function(e){return e.frames.length?`${e.name}|${e.frames.join("|")}`:`${e.name}|${e.message.replace(/\d/g,"0")}`}(e),n=this.waiting.get(t);return n?(n.count=Math.min(1e3,n.count+e.count),!0):!(this.seen.has(t)||this.seen.size>=20)&&(this.seen.add(t),this.waiting.set(t,e),this.events.push(e),!0)}drain(){const e=this.events;this.events=[],this.waiting.clear();const t=[],n=JSON.stringify({...this.head,events:[]}).length;let i=[],a=n;for(const r of e){const e=JSON.stringify(r).length+1;n+e>30720||((50===i.length||a+e>30720)&&(t.push({...this.head,events:i}),i=[],a=n),i.push(r),a+=e)}return i.length&&t.push({...this.head,events:i}),t}},J=/[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,}/g,K=/\beyJ[A-Za-z0-9_-]{8,}\.[A-Za-z0-9_-]{8,}(?:\.[A-Za-z0-9_-]*)?|\b[Bb]earer\s+[A-Za-z0-9._~+/=-]{8,}/g,V=/\b[a-z][a-z0-9+.-]*:\/\/\S+/gi,W=/\b[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}\b/gi,D=/\d{4,}/g,G=/(^|[/:])(?:\d+|[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}|[0-9a-f]{16,})(?=$|[/:])/gi,Q=/^[a-z][a-z0-9+.-]*:\/\/[^/]*/i,X=/(?:\(|@|\bat\s+)?((?:[a-z][a-z0-9+.-]*:\/\/|\/)[^\s()@]*?):(\d+):(\d+)\)?\s*$/i;function Y(e,t,n){const i=e.replace(Q,"").split(/[?#]/,1)[0];return i?`${i}:${t}:${n}`.slice(0,256):null}function ee(e){if("string"!=typeof e)return[];const t=[];for(const n of e.split("\n")){const e=X.exec(n.trim()),i=e&&Y(e[1],e[2],e[3]);if(i&&t.push(i),5===t.length)break}return t}function te(e){const t=e instanceof Error?e.name:void 0;return"string"==typeof t&&t.length<=64&&O.test(t)?t:"Error"}function ne(e){if("string"!=typeof e)return"unknown";const t=e.trim().replace(Q,"").split(/[?#]/,1)[0].replace(G,(e,t)=>":"===t?":id":`${t}:id`);return t&&t.length<=128&&!t.includes("//")&&U.test(t)?t:"unknown"}var ie={flush(){},reportError(){},stop(){}},ae=null,re=/* @__PURE__ */new Set(["LCP","FCP","TTFB"]);function oe(e,t,n){const i=function(e){if(e.anonymous)return{credentials:"omit",headers:{"Content-Type":"application/json"}};const t=e.getAccessToken();return t?{credentials:"same-origin",headers:{"Content-Type":"application/json",Authorization:`Bearer ${t}`}}:null}(t);if(!i)return;const a=t.anonymous?"/api/storefront-analytics/web-vitals/":"/api/client-telemetry/web-batches/";n(t.endpoint??a,{...i,method:"POST",keepalive:!0,body:JSON.stringify(e)}).catch(e=>{console.debug("[efficient-shell] client telemetry batch dropped:",e)})}function se(e){((e,t={})=>{let n=!1;const s=w(t);E(()=>{let d,l=h(),u=g("LCP");const f=p(t,j),v=(i,a,o,s,c)=>{u=g("LCP",-1,i,a,o,s,c),d=r(e,u,x,t.reportAllChanges),n=!1,"soft-navigation"===i&&(l=h(!0))},m=e=>{f.l&&e.navigationId&&I(f.l,e),n||d(!0),v("soft-navigation",e.navigationId,e.interactionId,e.name,e.startTime);const t=e.getLargestInteractionContentfulPaint?.();t&&y([t])},y=e=>{t.reportAllChanges||s||(e=e.slice(-1));for(const t of e){if(!t)continue;if("soft-navigation"===t.entryType){m(t);continue}let e=0,n=[],i=t.startTime;if("largest-contentful-paint"===t.entryType)e=Math.max(t.startTime-c(),0),f.h(t),n=[t];else if("interaction-contentful-paint"===t.entryType){const a=t;if(!u.navigationId)continue;if("interactionId"in a&&a.interactionId!=u.navigationInteractionId)continue;i=a.largestContentfulPaint?.renderTime||0,e=Math.max(i-t.startTime,0),a.largestContentfulPaint&&(f.h(a.largestContentfulPaint),n=[a.largestContentfulPaint])}i<l.firstHiddenTime&&(u.value=e,u.entries=n,d())}},w=["largest-contentful-paint"];s&&w.push("interaction-contentful-paint","soft-navigation");const b=T(w,y);if(b){d=r(e,u,x,t.reportAllChanges);const c=["keydown","click","visibilitychange"],l=e=>{if(e.isTrusted&&!n){const e=u.id;F(()=>{if(!n){if(!s){b.disconnect();for(const e of c)removeEventListener(e,l,{capture:!0})}e===u.id&&(n=!0,d(!0))}})}};for(const e of c)addEventListener(e,l,{capture:!0});a(a=>{v("back-forward-cache",u.navigationId,u.navigationInteractionId,u.navigationURL,i()),d=r(e,u,x,t.reportAllChanges),o(()=>{u.value=performance.now()-a.timeStamp,n=!0,d(!0)})})}})})(e),R(e),((e,t={})=>{const n=h();P(b(()=>{let s,c=g("CLS",0);const d=p(t,y),l=(n,i,a,o,l)=>{c=g("CLS",0,n,i,a,o,l),d.i=0,s=r(e,c,A,t.reportAllChanges)},u=(e=!1)=>{d.i>c.value&&(c.value=d.i,c.entries=d.o),s(e)},f=e=>{u(!0),l("soft-navigation",e.navigationId,e.interactionId,e.name,e.startTime)},h=e=>{for(const t of e)"soft-navigation"!==t.entryType?d.h(t):f(t);u()},v=["layout-shift"];w(t)&&v.push("soft-navigation");const m=T(v,h);m&&(s=r(e,c,A,t.reportAllChanges),n.onHidden(()=>{h(m.takeRecords()),s(!0)}),a(()=>{l("back-forward-cache",c.navigationId,c.navigationInteractionId,c.navigationURL,i()),o(s)}),setTimeout(s))}))})(e),P(e),((e,t={})=>{const n=w(t);let o=g("TTFB"),d=r(e,o,B,t.reportAllChanges);N(()=>{const l=s();if(l){const s=l.responseStart;o.value=Math.max(s-c(),0),o.entries=[l],d(!0),a(()=>{o=g("TTFB",0,"back-forward-cache",o.navigationId,o.navigationInteractionId,o.navigationURL,i()),d=r(e,o,B,t.reportAllChanges),d(!0)}),n&&T(["soft-navigation"],n=>{n.forEach(n=>{n.navigationId&&(o=g("TTFB",0,"soft-navigation",n.navigationId,n.interactionId,n.name,n.startTime),o.entries=[n],d=r(e,o,B,t.reportAllChanges),d(!0))})},t)}})})(e)}function ce(n){if(ae?.stop(),ae=null,!1===n.enabled||"undefined"==typeof window||"undefined"==typeof document)return ie;if(!function(e){const t="string"==typeof e.app&&H.test(e.app),n="string"==typeof e.release&&H.test(e.release);return t&&n||console.warn("[efficient-shell] client telemetry not started: `app` and `release` must be version-like strings."),t&&n}(n))return ie;const i=function(e){const t=e.vitalsSampleRate??1;return t>0&&(t>=1||(e.random??Math.random)()<t)}(n);if(n.anonymous&&!i)return ie;const a=n.fetch??window.fetch.bind(window),r=new q({app:n.app,release:n.release,shell_version:H.test(t)?t:""}),o=ne(n.routeKey()),s=function(e=("undefined"==typeof window?void 0:window)){if(!e)return"desktop";const t="function"==typeof e.matchMedia&&e.matchMedia("(pointer: coarse)").matches,n=e.innerWidth;return n<600?"mobile":t&&n<1280?"tablet":"desktop"}(window);let c=!1;const d=()=>{for(const e of r.drain())oe(e,n,a)},l=e=>{c||n.anonymous||(r.addError(e),r.size>=50&&d())},u=(e,t)=>{return{type:"error",source:t,name:te(e),message:(a=e,i=a instanceof Error?a.message:"string"==typeof a?a:a&&"object"==typeof a&&"string"==typeof a.message?a.message:"",i.slice(0,640).replace(J,"[redacted]").replace(K,"[redacted]").replace(V,"[url]").replace(W,"[id]").replace(D,"[n]").replace(/\s+/g," ").trim().slice(0,160)),frames:ee(e instanceof Error?e.stack:void 0),route:ne(n.routeKey()),count:1};var i,a};i&&(n.observeVitals??se)(e=>{c||(r.addVital(function(e,t,n,i){return{type:"vital",name:e.name,value:e.value,route:re.has(e.name)?t:n(),navigation:e.navigationType??"navigate",device:i}}(e,o,()=>ne(n.routeKey()),s)),r.size>=50&&d())});const f=n.anonymous?()=>{}:function(t,n){const i=e=>{const{error:i,message:a,filename:r,lineno:o,colno:s}=e;if(null!=i)return void t(n(i,"onerror"));const c=r?ee(`at ${r}:${o??0}:${s??0}`):[];t({...n(a??"","onerror"),frames:c})},a=e=>t(n(e.reason,"unhandledrejection"));window.addEventListener("error",i),window.addEventListener("unhandledrejection",a);const r=e(e=>t(n(e,"boundary")));return()=>{window.removeEventListener("error",i),window.removeEventListener("unhandledrejection",a),r()}}(l,u),h=()=>{"hidden"===document.visibilityState&&d()};document.addEventListener("visibilitychange",h),window.addEventListener("pagehide",d);const g=window.setInterval(d,n.flushIntervalMs??6e4),v={flush:d,reportError:e=>l(u(e,"boundary")),stop(){c||(d(),c=!0,f(),document.removeEventListener("visibilitychange",h),window.removeEventListener("pagehide",d),window.clearInterval(g),ae===v&&(ae=null))}};return ae=v,v}export{ce as startClientTelemetry};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{IconPicker as e}from"./chunk-3ZJAQSFS.js";import{ColorPicker as t}from"./chunk-
|
|
2
|
-
return i("div",{role:"group","aria-label":a,"data-border":c?"each":"all",className:"grid w-full min-w-0 grid-cols-2 gap-2",children:[g?c?/* @__PURE__ */i(s,{children:[C("left",w.sides.left,u.left,
|
|
1
|
+
import{IconPicker as e}from"./chunk-3ZJAQSFS.js";import{ColorPicker as t}from"./chunk-EEAOFYW5.js";import{InputNumber_default as r,stepRounding as l}from"./chunk-I7WAOKU2.js";import{BORDER_LINE_STYLES as o}from"./chunk-NOMWJTN2.js";import{Icon as a}from"./chunk-ISVODSRP.js";import{jsxs as i,Fragment as s,jsx as n}from"react/jsx-runtime";var d=["top","right","bottom","left"];function m(e){const t=e??{},r="number"==typeof t.width?t.width:0;return Object.fromEntries(d.map(e=>[e,"number"==typeof t[e]?t[e]:r]))}function h(e,t){const r=e??{},l=m(t),o=d.some(e=>"number"==typeof r[e]),a=d.map(e=>"number"==typeof r[e]?r[e]:"number"==typeof r.width?r.width:o?0:l[e]);return!a.every(e=>e===a[0])}var c="h-3.5 w-3.5",u={all:/* @__PURE__ */n(a,{name:"border-all","aria-hidden":"true",className:c}),top:/* @__PURE__ */n(a,{name:"border-top","aria-hidden":"true",className:c}),right:/* @__PURE__ */n(a,{name:"border-right","aria-hidden":"true",className:c}),bottom:/* @__PURE__ */n(a,{name:"border-bottom","aria-hidden":"true",className:c}),left:/* @__PURE__ */n(a,{name:"border-left","aria-hidden":"true",className:c})},p={solid:/* @__PURE__ */n(a,{name:"line-solid","aria-hidden":"true",className:c}),dashed:/* @__PURE__ */n(a,{name:"line-dashed","aria-hidden":"true",className:c}),dotted:/* @__PURE__ */n(a,{name:"line-dotted","aria-hidden":"true",className:c})};function f({label:a,value:m,onChange:h,each:c,placeholder:f,presets:b,words:w,widths:g=!0,styles:y=!0,min:v=0,max:N=20,step:S=1,readOnly:x,units:j}){const O=e=>"number"==typeof m[e]?m[e]:null,k=(e,t)=>{const r={...m};if("number"==typeof m.width)for(const e of d)null===O(e)&&(r[e]=m.width);r[e]=t,delete r.width,h(r)},C=(e,t,o,a,i,s)=>/* @__PURE__ */n("div",{"data-side":e,className:"all"===e?"col-span-2 min-w-0":"min-w-0",children:/* @__PURE__ */n(r,{value:a,onChange:s,min:v,max:N,step:S,...l(S),steppers:"compact",readOnly:x,placeholder:i,prefix:o,suffix:w.unit,units:j,"aria-label":t})}),A=d.map(O),E="number"==typeof m.width?m.width:A.every(e=>null!==e&&e===A[0])?A[0]:null,I=null===E&&A.some(e=>null!==e),W=d.every(e=>f.sides[e]===f.sides.top)?String(f.sides.top):"–",F=e=>O(e)??("number"==typeof m.width?m.width:null),J=m.style??f.style;/* @__PURE__ */
|
|
2
|
+
return i("div",{role:"group","aria-label":a,"data-border":c?"each":"all",className:"grid w-full min-w-0 grid-cols-2 gap-2",children:[g?c?/* @__PURE__ */i(s,{children:[C("left",w.sides.left,u.left,F("left"),String(f.sides.left),e=>k("left",e)),C("top",w.sides.top,u.top,F("top"),String(f.sides.top),e=>k("top",e)),C("right",w.sides.right,u.right,F("right"),String(f.sides.right),e=>k("right",e)),C("bottom",w.sides.bottom,u.bottom,F("bottom"),String(f.sides.bottom),e=>k("bottom",e))]}):C("all",w.width,u.all,E,I?"–":W,e=>{const t={...m,width:e};for(const e of d)delete t[e];h(t)}):null,y&&/* @__PURE__ */n("div",{"data-border-style":"",className:"col-span-2 min-w-0",children:/* @__PURE__ */n(e,{label:w.style,value:J,disabled:x,onChange:e=>{x||h({...m,style:e})},options:o.map(e=>({value:e,label:w.styles[e],icon:p[e]}))})}),
|
|
3
3
|
/* @__PURE__ */n("div",{"data-border-color":"",className:"col-span-2 flex min-w-0 items-center",children:/* @__PURE__ */n(t,{value:m.color??"",onChange:e=>{x||h({...m,color:e})},label:w.color,presets:b,fallback:f.color,showHexInput:!0,size:"md",disabled:x})})]})}export{f as BorderInput,m as borderSides,h as borderStartEach};
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{SpinnerRing as e}from"./chunk-R2VKEMZH.js";import{Icon as t}from"./chunk-ISVODSRP.js";import{useState as a,useId as r,Children as s,isValidElement as i}from"react";import{jsx as n,jsxs as l}from"react/jsx-runtime";function c({summary:e,busy:c=!1,open:o,onOpenChange:d,label:m="Steps",className:u="",children:p}){const[f,h]=a(null),g=r(),x=o??f??c;return 1===s.toArray(p).filter(i).length?/* @__PURE__ */n("div",{className:`text-xs text-gray-500 ${u}`.trim(),children:/* @__PURE__ */n("ol",{"aria-label":m,children:p})}):/* @__PURE__ */l("div",{className:`text-xs text-gray-500 ${u}`.trim(),children:[
|
|
2
2
|
/* @__PURE__ */l("button",{type:"button",onClick:()=>{h(!x),d?.(!x)},"aria-expanded":x,"aria-controls":x?g:void 0,className:"flex w-full items-center gap-2 rounded text-left hover:text-gray-700 focus-visible:outline focus-visible:outline-2 focus-visible:outline-blue-600",children:[
|
|
3
|
-
/* @__PURE__ */n(
|
|
4
|
-
/* @__PURE__ */n("span",{"aria-live":"polite",className:"min-w-0 flex-1 truncate",children:
|
|
5
|
-
return n(
|
|
6
|
-
return n(
|
|
7
|
-
return n(
|
|
8
|
-
return n(
|
|
9
|
-
return n(
|
|
10
|
-
return n(
|
|
3
|
+
/* @__PURE__ */n(t,{name:"chevron-right",size:12,className:"shrink-0 motion-safe:transition-transform "+(x?"rotate-90":"")}),
|
|
4
|
+
/* @__PURE__ */n("span",{"aria-live":"polite",className:"min-w-0 flex-1 truncate",children:e})]}),x&&/* @__PURE__ */n("ol",{id:g,"aria-label":m,className:"mt-2 ml-2 space-y-2 border-l border-gray-200 pl-3",children:p})]})}var o={pending:"text-gray-400",active:"text-gray-800",complete:"text-gray-600",failed:"text-red-600",stopped:"text-gray-500",waiting:"text-amber-700",skipped:"text-gray-400"},d={pending:"Pending",active:"In progress",complete:"Done",failed:"Failed",stopped:"Stopped",waiting:"Waiting for you",skipped:"Skipped"};function m({status:a}){switch(a){case"active":/* @__PURE__ */
|
|
5
|
+
return n(e,{className:"size-3 motion-reduce:animate-none"});case"complete":/* @__PURE__ */
|
|
6
|
+
return n(t,{name:"check-circle",size:14,tone:"success"});case"failed":/* @__PURE__ */
|
|
7
|
+
return n(t,{name:"close-circle",size:14,tone:"danger"});case"stopped":/* @__PURE__ */
|
|
8
|
+
return n(t,{name:"no-symbol",size:14,tone:"muted"});case"waiting":/* @__PURE__ */
|
|
9
|
+
return n(t,{name:"pause",size:14,tone:"warning"});case"skipped":/* @__PURE__ */
|
|
10
|
+
return n(t,{name:"remove",size:14,tone:"muted"});default:/* @__PURE__ */
|
|
11
11
|
return n("span",{className:"block size-3 rounded-full border border-gray-300"})}}function u({label:e,description:t,status:a="complete",statusWord:r,icon:s,children:i}){/* @__PURE__ */
|
|
12
12
|
return l("li",{className:`flex items-start gap-2 ${o[a]}`,"data-status":a,children:[
|
|
13
13
|
/* @__PURE__ */n("span",{"aria-hidden":"true",className:"mt-1 flex size-3.5 shrink-0 items-center justify-center",children:s??/* @__PURE__ */n(m,{status:a})}),
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import{SearchableSelect as e}from"./chunk-
|
|
2
|
-
return f(e,{"aria-label":a,value:t,options:o,disabled:
|
|
3
|
-
return f(l,{size:"sm","aria-label":a,value:t,options:o,readOnly:
|
|
4
|
-
return f("div",{ref:z,className:`flex min-w-0 flex-auto flex-col gap-2 ${
|
|
5
|
-
return v("div",{ref:z,role:"dialog","aria-label":
|
|
6
|
-
/* @__PURE__ */v("div",{className:"flex items-center justify-between gap-2",children:[we?/* @__PURE__ */f(i,{variant:"ghost-danger",size:"sm","data-window-action":"remove",onClick:we,children:
|
|
1
|
+
import{SearchableSelect as e}from"./chunk-WTWAFKFN.js";import{labelClasses as a}from"./chunk-EQKUFYX6.js";import{Select_default as l}from"./chunk-EBODRYXS.js";import{isSafeLinkHref as t}from"./chunk-Z5TE3MEG.js";import{Input_default as r}from"./chunk-W6REY3SV.js";import{INPUT_SIZES as n}from"./chunk-AYZY3YNC.js";import{Button_default as i}from"./chunk-MEP6CZJ3.js";import{Icon as o}from"./chunk-ISVODSRP.js";import{registerModalEscapeInterceptor as s}from"./chunk-TWVUQUUD.js";import{useShellStrings as u}from"./chunk-NRHG4R2Q.js";import{useId as d,useRef as c,useState as p,useEffect as m}from"react";import{jsx as f,jsxs as v,Fragment as g}from"react/jsx-runtime";function h(e){return"select"===e.type?e.options:"groups"===e.type?e.groups.flatMap(e=>e.options):[]}var b="address",x={kindOf:()=>b,targetOf:e=>e,readFilter:()=>null,withFilter:e=>e},k=e=>t(e.trim());function y(t){const{value:n,kinds:o,rules:y=x,filtersFor:w,label:N,readOnly:C,placeholder:F,className:O="",tidyAddress:j,addressAddon:E}=t,$=void 0!==t.onApply,A=u().link,R=y.isSafe??k,T=d(),z=c(null),D=c(null),[S,W]=p({url:n}),Y=$?S.url:n,[P,K]=p(!1),[M,U]=p(null),[B,Q]=p(null),[V,Z]=p(!1),G=c(null),H=c(()=>{});H.current=$?t.onCancel:()=>{},m(()=>{if($)return s(e=>{const a=z.current;return!!("Escape"===e.key&&a&&e.target instanceof Node&&a.contains(e.target))&&(H.current(),!0)},()=>z.current)},[$]),m(()=>{if(!$)return;const e=D.current;e?(e.focus(),e.select()):z.current?.querySelector("button, input")?.focus()},[]);const L=o??[{value:b,label:A.address,target:{type:"text"}}],X=M&&M.against===Y?M.kind:y.kindOf(Y),q=L.filter(e=>!e.hideWhenEmpty||h(e.target).length>0||e.value===X),I=q.find(e=>"text"===e.target.type),J=q.find(e=>e.value===X)??I??q[0];if(!J)return null;const _="text"!==J.target.type,ee=_?y.targetOf(Y):Y,ae=h(J.target),le=ae.find(e=>e.value===ee),te=e=>({value:e,label:A.unavailable(e)}),re="select"===J.target.type&&ee&&w?w(ee):null,ne=re?y.readFilter(Y):null,ie=ne?re?.find(e=>e.param===ne.param):void 0,oe=B&&B.against===Y?B.text:Y,se=_?Y:j?j(oe.trim()).trim():oe.trim(),ue=$&&j?se:oe,de=!_&&""!==ue.trim()&&!R(ue),ce=de&&(!$||P);_&&V&&Z(!1);const pe=(e,a)=>{$?W({url:e,name:a}):void 0===a?t.onChange(e):t.onChange(e,a)},me=(e,a)=>{U(a=>a?{...a,against:e}:a),pe(e,a)},fe=e=>{if(!e)return me("");const a=ae.find(a=>a.value===e);me(e,a?.label)},ve=e=>{K(!1);const a=e.trim();a?R(e)?(Q({text:e,against:a}),me(a)):Q({text:e,against:Y}):(Q({text:e,against:""}),me(""))},ge=e=>{const a=e.relatedTarget;if(a&&(a===D.current||G.current?.contains(a)))return;if(Z(!1),$||!j||C)return;const l=j(oe.trim());l.trim()!==oe.trim()&&ve(l)},he=()=>{if(!$||!se)return;if(!_&&de)return void K(!0);const e=_&&S.url===se?S.name:void 0,a=t.onApply;void 0===e?a(se):a(se,e)},be=(e,a)=>a&&!e.some(e=>e.value===a)?[te(a),...e]:[...e],xe=(a,t,r,n,i)=>{const o=[];for(const e of r){const a=o[o.length-1],l={value:e.value,label:e.label};e.group?a&&"options"in a&&a.label===e.group?a.options.push(l):o.push({label:e.group,options:[l]}):o.push(l)}if(i){const l=r.some(e=>""===e.value);/* @__PURE__ */
|
|
2
|
+
return f(e,{"aria-label":a,value:t,options:o,disabled:C,clearable:l,placeholder:r.find(e=>""===e.value)?.label,onChange:n})}/* @__PURE__ */
|
|
3
|
+
return f(l,{size:"sm","aria-label":a,value:t,options:o,readOnly:C,onChange:n})};let ke;if("text"===J.target.type)ke=/* @__PURE__ */f(r,{ref:D,id:`${T}-address`,size:"sm",type:"text",invalid:ce,"aria-label":A.address,"aria-describedby":ce?`${T}-why`:void 0,placeholder:F??A.addressPlaceholder,spellCheck:!1,autoComplete:"off",value:oe,readOnly:C,onChange:e=>ve(e.target.value),onFocus:()=>Z(!0),onBlur:ge,onKeyDown:j&&!$?e=>{"Enter"===e.key&&e.currentTarget.blur()}:void 0});else{const e="groups"===J.target.type?J.target.groups.flatMap(e=>e.options.map(a=>({value:a.value,label:a.label,group:e.label}))):J.target.options.map(e=>({value:e.value,label:e.label})),a=[{value:"",label:J.target.placeholder},...be(e,ee)];ke=xe(J.label,ee,a,fe,e.length>10)}const ye=/* @__PURE__ */v(g,{children:[o&&xe(A.linkType,J.value,q.map(e=>({value:e.value,label:e.label})),e=>{Q(null),K(!1);const a=q.find(a=>a.value===e);if(!a||"text"===a.target.type)return void U({kind:e,against:Y});const l=h(a.target)[0];U({kind:e,against:l?l.value:""}),l?pe(l.value,l.label):pe("")},!1),ke,E&&V&&!C&&"text"===J.target.type&&/* @__PURE__ */f("div",{ref:G,onBlur:ge,children:E({url:oe,onChange:ve})}),re&&xe(A.filter,ne?.param??"",[{value:"",label:A.noFilter},...ne&&!ie?[te(ne.param)]:[],...re.map(e=>({value:e.param,label:e.label}))],e=>{if(!e)return me(ee,le?.label);const a=re?.find(a=>a.param===e),l=a?.values[0];l&&me(y.withFilter(ee,{param:e,value:l.value}),l.label)},!1),re&&ne&&xe(A.value,ne.value,be((ie?.values??[]).map(e=>({value:e.value,label:e.label})),ne.value),e=>{if(!ne)return;const a=ie?.values.find(a=>a.value===e);me(y.withFilter(ee,{param:ne.param,value:e}),a?.label)},(ie?.values.length??0)>10),ce&&/* @__PURE__ */f("p",{id:`${T}-why`,role:"alert",className:"text-2xs leading-4 text-red-600",children:A.unsafe}),J.hint&&/* @__PURE__ */f("p",{className:"text-2xs leading-4 text-ink-faintest",children:J.hint}),re&&/* @__PURE__ */f("p",{className:"text-2xs leading-4 text-ink-faintest",children:A.filterHint})]});if(!$)/* @__PURE__ */
|
|
4
|
+
return f("div",{ref:z,className:`flex min-w-0 flex-auto flex-col gap-2 ${O}`.trim(),role:N?"group":void 0,"aria-label":N,children:ye});const we=t.onRemove;/* @__PURE__ */
|
|
5
|
+
return v("div",{ref:z,role:"dialog","aria-label":N??A.title,className:`flex min-w-0 flex-col gap-2 rounded-xl border border-line bg-surface p-3 shadow-lg ${O}`.trim(),onKeyDown:e=>{"Enter"!==e.key||e.defaultPrevented||e.target instanceof Element&&e.target.closest("button")||(e.preventDefault(),he())},children:[_?/* @__PURE__ */f("span",{className:a({inline:!0}),children:A.title}):/* @__PURE__ */f("label",{htmlFor:`${T}-address`,className:a({inline:!0}),children:A.title}),ye,
|
|
6
|
+
/* @__PURE__ */v("div",{className:"flex items-center justify-between gap-2",children:[we?/* @__PURE__ */f(i,{variant:"ghost-danger",size:"sm","data-window-action":"remove",onClick:we,children:A.remove}):null,
|
|
7
7
|
/* @__PURE__ */v("span",{className:"ml-auto flex gap-1",children:[
|
|
8
|
-
/* @__PURE__ */f(i,{variant:"secondary",size:"sm","data-window-action":"cancel",onClick:()=>
|
|
9
|
-
/* @__PURE__ */f(i,{variant:"primary",size:"sm","data-window-action":"apply",onClick:he,disabled:
|
|
8
|
+
/* @__PURE__ */f(i,{variant:"secondary",size:"sm","data-window-action":"cancel",onClick:()=>H.current(),children:A.cancel}),
|
|
9
|
+
/* @__PURE__ */f(i,{variant:"primary",size:"sm","data-window-action":"apply",onClick:he,disabled:C||""===se,children:A.apply})]})]})]})}function w({label:e,text:a,onTextChange:l,link:t,onLinkChange:i,kinds:s,rules:m,filtersFor:g,textPlaceholder:h,readOnly:b,className:x=""}){const k=u().link,[w,N]=p(!1),C=c(null),F=d(),O=()=>{N(!1),C.current?.focus()};/* @__PURE__ */
|
|
10
10
|
return v("div",{className:`flex min-w-0 flex-auto flex-col ${x}`.trim(),children:[
|
|
11
11
|
/* @__PURE__ */f(r,{size:"md",type:"text",className:"rounded-b-none","aria-label":k.text(e),placeholder:h,value:a,readOnly:b,onChange:e=>l(e.target.value)}),
|
|
12
|
-
/* @__PURE__ */v("button",{ref:
|
|
12
|
+
/* @__PURE__ */v("button",{ref:C,type:"button","aria-label":k.linkOf(e,t),"aria-expanded":w,"aria-controls":w?F:void 0,disabled:b,onClick:()=>N(e=>!e),className:`flex w-full min-w-0 items-center gap-2 rounded-b-(--radius-control) border border-t-0 border-line-strong bg-surface-sunken ${n.md} text-left hover:bg-gray-100 rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring)] disabled:cursor-not-allowed disabled:opacity-60`,children:[
|
|
13
13
|
/* @__PURE__ */f(o,{name:"link",strokeWidth:1.5,className:"h-4 w-4 shrink-0 "+(t?"text-blue-600":"text-ink-faintest")}),
|
|
14
|
-
/* @__PURE__ */f("span",{className:"min-w-0 truncate "+(t?"text-blue-600":"text-ink-faintest"),children:t||k.addLink})]}),w&&/* @__PURE__ */f("div",{id:
|
|
14
|
+
/* @__PURE__ */f("span",{className:"min-w-0 truncate "+(t?"text-blue-600":"text-ink-faintest"),children:t||k.addLink})]}),w&&/* @__PURE__ */f("div",{id:F,className:"mt-2",children:/* @__PURE__ */f(y,{value:t,label:k.linkOf(e,t),kinds:s,rules:m,filtersFor:g,onApply:(e,a)=>{void 0===a?i(e):i(e,a),O()},onRemove:t?()=>{i(""),O()}:void 0,onCancel:O})})]})}export{y as LinkPicker,w as TextLinkField};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import{nextEnabledIndex as e}from"./chunk-EO5RLFRX.js";import{flattenOptionItems as t,filterOptionItems as n,optionMatches as r,groupedRows as l,OptionCheck as o,OptionSublabel as i}from"./chunk-K5YT5PMJ.js";import{END_ACTIONS_PAD as a,InputEndActionSlot as s,InputEndActionButton as c}from"./chunk-W6REY3SV.js";import{INPUT_BASE_ON as u,INPUT_BASE as d}from"./chunk-AYZY3YNC.js";import{Button_default as h}from"./chunk-MEP6CZJ3.js";import{
|
|
1
|
+
import{nextEnabledIndex as e}from"./chunk-EO5RLFRX.js";import{flattenOptionItems as t,filterOptionItems as n,optionMatches as r,groupedRows as l,OptionCheck as o,OptionSublabel as i}from"./chunk-K5YT5PMJ.js";import{END_ACTIONS_PAD as a,InputEndActionSlot as s,InputEndActionButton as c}from"./chunk-W6REY3SV.js";import{INPUT_BASE_ON as u,INPUT_BASE as d}from"./chunk-AYZY3YNC.js";import{Button_default as h}from"./chunk-MEP6CZJ3.js";import{LoadingSpinner as p}from"./chunk-R2VKEMZH.js";import{Icon as m}from"./chunk-ISVODSRP.js";import{Tooltip as f}from"./chunk-AJPQJ7TC.js";import{onOverlayOpen as b}from"./chunk-PGN5ME7B.js";import{Z_LAYERS as g}from"./chunk-62LW225J.js";import{useDropdownPosition as v,MENU_MAX_HEIGHT as w}from"./chunk-TAHHZGRH.js";import{useBrowserLayoutEffect as y}from"./chunk-PU2GJVMG.js";import{registerModalEscapeInterceptor as x}from"./chunk-TWVUQUUD.js";import{GLASS_DIVIDER as k,glassStyle as j}from"./chunk-5FYDNH4Y.js";import{useShellStrings as $}from"./chunk-NRHG4R2Q.js";import{useState as N,useId as D,useRef as C,useMemo as S,useEffect as R}from"react";import{createPortal as M}from"react-dom";import{jsxs as W,jsx as E}from"react/jsx-runtime";function T(e,t){const n=e.length;if(0===n||t(e.join(", ")))return{shown:n,cut:!1};if(1===n)return{shown:1,cut:!0};let r=0;for(let l=1;l<n&&t(`${e.slice(0,l).join(", ")} +${n-l}`);l+=1)r=l;return{shown:r,cut:!1}}var A=["right-2","right-8","right-16"],F=[8,32,64];function z(z){const{options:H,placeholder:L,emptyOptionLabel:O,className:Y="",disabled:J,id:P,filter:G=!1,allowFreeText:I=!1,freeTextOption:U,onSearchChange:V,loading:Z=!1,error:B,onRetry:K,rightAdornment:Q,endAction:X,renderOption:q,clearable:_=!0,"aria-label":ee,"aria-labelledby":te,"aria-describedby":ne}=z,re=!0===z.multiple,le=z.multiple?z.value:z.value?[z.value]:[],oe=z.multiple?"":z.value,ie=e=>{z.multiple?z.onChange(e):z.onChange(e[0]??"")},ae=le.length>0,se=G&&ae&&!J,ce=re||G,ue=null!=U,de=I||ue,[he,pe]=N(!1),[me,fe]=N(-1),be=D(),ge=P??`${be}-input`,ve=`${be}-listbox`,we=e=>`${be}-opt-${e}`,[ye,xe]=N(""),ke=$(),je=O??ke.select.none,$e=e=>{xe(e),fe(-1),V?.(e)},Ne=C(null),De=C(null),Ce=C(null),Se=C(null),Re=C(he);Re.current=he;const Me=C(!1),We=e=>{Re.current&&(Re.current=!1,e&&I&&!ue&&et&&(re?le.includes(et)||ie([...le,et]):et!==oe&&ie([et])),pe(!1),$e(""))},Ee=(e,t)=>{if(!e.disabled){if(re)return ie(le.includes(e.value)?le.filter(t=>t!==e.value):[...le,e.value]),void(e===tt?$e(""):fe(t));ie([e.value]),We(!1)}},[Te,Ae]=N(null);y(()=>{if(!Q||he)return void Ae(null);const e=Se.current?.offsetWidth??0;Ae(e?e+F[Je]+6:null)});const Fe=v(De,he,ce?{popupRef:Ce}:{matchTriggerWidth:!0}),ze=S(()=>t(H),[H]),He=le.join("\0"),Le=S(()=>{const e=[],t=/* @__PURE__ */new Set;for(const n of ze)le.includes(n.value)&&!t.has(n.value)&&(t.add(n.value),e.push(n.label));if(de)for(const n of le)t.has(n)||e.push(n);return e},[ze,He,de]),Oe=Le.join(", "),Ye=_&&ae&&!J,Je=(Ye?1:0)+(X?1:0),[Pe,Ge]=N(null),Ie=C(null),Ue=C(""),Ve=C(()=>{});Ve.current=()=>{const e=De.current,t=Ie.current;if(!re||!e||!t)return;const n=getComputedStyle(e),r=e.clientWidth-(parseFloat(n.paddingLeft)||0)-(parseFloat(n.paddingRight)||0),l=[n.fontStyle,n.fontWeight,n.fontSize,n.fontFamily,n.letterSpacing].join("|"),o=`${r}|${l}|${Le.join("\0")}`;if(o===Ue.current)return;Ue.current=o;let i=null;r>0&&Le.length>0&&(t.style.fontStyle=n.fontStyle,t.style.fontWeight=n.fontWeight,t.style.fontSize=n.fontSize,t.style.fontFamily=n.fontFamily,t.style.letterSpacing=n.letterSpacing,i=T(Le,e=>(t.textContent=e,t.getBoundingClientRect().width<=r)),t.textContent=""),Ge(e=>e?.shown===i?.shown&&e?.cut===i?.cut?e:i)},y(()=>{Ve.current()}),R(()=>{const e=De.current;if(!re||!e||"undefined"==typeof ResizeObserver)return;const t=new ResizeObserver(()=>Ve.current());return t.observe(e),()=>t.disconnect()},[re]);const Ze=Le.length,Be=!re||!Pe||Pe.shown>=Ze?Oe:0===Pe.shown?ke.select.selectedCount(Ze):`${Le.slice(0,Pe.shown).join(", ")} +${Ze-Pe.shown}`,Ke=re&&null!==Pe&&(Pe.shown<Ze||Pe.cut),Qe=he&&ae&&ce;R(()=>{if(!he)return;const e=e=>{const t=e.target;Ne.current?.contains(t)||Ce.current?.contains(t)||We(!0)};document.addEventListener("mousedown",e);const t=b(()=>We(!0));return()=>{document.removeEventListener("mousedown",e),t()}},[he,I,ye,He,z.onChange]),R(()=>{if(he)return x(e=>!("Escape"!==e.key||!Re.current)&&(We(!1),De.current?.blur(),!0),()=>Ce.current)},[he]);const Xe=S(()=>{const e=/* @__PURE__ */new Set;return n(H,t=>!e.has(t.value)&&(e.add(t.value),!0))},[H]),qe=S(()=>{if(V)return Xe;const e=ye.trim().toLowerCase();return e?n(Xe,t=>r(t,e)):Xe},[Xe,ye,V]),_e=S(()=>t(qe),[qe]),et=ye.trim(),tt=S(()=>ue&&et?ze.some(e=>e.label===et)||le.includes(et)?null:{value:et,label:et}:null,[ue,et,ze,He]),nt=S(()=>tt?[..._e,tt]:_e,[_e,tt]);/* @__PURE__ */
|
|
2
2
|
return W("div",{ref:Ne,className:"relative group",onBlur:e=>{const t=e.relatedTarget;t&&(Ne.current?.contains(t)||Ce.current?.contains(t))||Me.current||document.activeElement!==De.current&&We(!0)},children:[(rt=/* @__PURE__ */E("input",{id:ge,ref:De,type:"text",autoComplete:"off",role:"combobox","aria-expanded":he,"aria-haspopup":"listbox","aria-autocomplete":"list","aria-controls":he?ve:void 0,"aria-activedescendant":he&&me>=0&&me<nt.length?we(me):void 0,"aria-label":te?void 0:ee,"aria-labelledby":te,"aria-describedby":ne,value:he?ye:Be,onChange:e=>{$e(e.target.value),pe(!0)},onFocus:()=>{J||($e(""),pe(!0))},onKeyDown:t=>{if("ArrowDown"===t.key||"ArrowUp"===t.key){if(J)return;if(t.preventDefault(),!he)return void pe(!0);if(0===nt.length)return;const n="ArrowDown"===t.key?1:-1;return void fe(t=>e(nt,t,n))}"Enter"===t.key?(t.preventDefault(),he&&me>=0&&me<nt.length?Ee(nt[me],me):1!==_e.length||_e[0].disabled?I&&!ue&&et&&(re?(le.includes(et)||ie([...le,et]),$e("")):(ie([et]),We(!1),De.current?.blur())):Ee(_e[0],0)):"Escape"===t.key?(We(!1),De.current?.blur()):"Tab"===t.key&&We(!0)},placeholder:Qe?Be:L||je,className:`${se?u:d} ${Y} ${a[Je]}${J?"bg-surface-sunken text-ink-faintest cursor-not-allowed":""} truncate${Qe?" rosh-field-shows-choice":""}`,style:Te?{paddingRight:Te}:void 0,disabled:J}),re?/* @__PURE__ */E(f,{content:!he&&Ke?Oe:null,className:"block",children:rt}):rt),re&&
|
|
3
3
|
/* @__PURE__ */E("div",{"aria-hidden":"true",className:"pointer-events-none invisible absolute left-0 top-0 h-0 w-0 overflow-hidden",children:/* @__PURE__ */E("span",{ref:Ie,className:"whitespace-pre"})}),Je>0&&
|
|
4
4
|
/* @__PURE__ */W(s,{children:[Ye&&
|
|
5
|
-
/* @__PURE__ */E("span",{onMouseDown:e=>e.preventDefault(),className:"flex opacity-0 transition-opacity group-hover:opacity-100 focus-within:opacity-100",children:/* @__PURE__ */E(c,{action:{label:ke.select.clear,icon:/* @__PURE__ */E(
|
|
5
|
+
/* @__PURE__ */E("span",{onMouseDown:e=>e.preventDefault(),className:"flex opacity-0 transition-opacity group-hover:opacity-100 focus-within:opacity-100",children:/* @__PURE__ */E(c,{action:{label:ke.select.clear,icon:/* @__PURE__ */E(m,{name:"close"}),onClick:()=>{ie([]),We(!1)}}})}),X&&/* @__PURE__ */E("span",{onMouseDown:e=>e.preventDefault(),className:"flex",children:/* @__PURE__ */E(c,{action:X})})]}),Q&&!he&&/* @__PURE__ */E("div",{ref:Se,className:`absolute top-1/2 -translate-y-1/2 ${A[Je]} flex items-center gap-1 flex-nowrap justify-end pointer-events-none`,children:Q}),he&&M(
|
|
6
6
|
/* @__PURE__ */W("div",{ref:Ce,onMouseDownCapture:()=>{Me.current=!0,setTimeout(()=>{Me.current=!1},0)},className:"fixed rounded-(--radius-popup) overflow-hidden",style:{zIndex:g.popup,left:Fe?.left,right:Fe?.right,top:Fe?.top,bottom:Fe?.bottom,minWidth:Fe?.minWidth,width:Fe?.width,...ce&&{maxWidth:Fe?.maxWidth},visibility:Fe?void 0:"hidden",...j()},children:[re&&ae&&_&&!J&&
|
|
7
7
|
/* @__PURE__ */E("button",{type:"button",tabIndex:-1,onMouseDown:e=>{e.preventDefault(),ie([])},className:`block w-full text-left px-3 min-h-(--row-height-menu) py-2 leading-5 text-sm text-gray-600 hover:bg-row-hover border-b ${k}`,children:ke.select.clearAll}),Z?
|
|
8
|
-
/* @__PURE__ */E(
|
|
8
|
+
/* @__PURE__ */E(p,{size:"sm",padding:"py-2",label:ke.search.searching}):B?/* @__PURE__ */W("div",{role:"alert",className:"flex items-center gap-2 px-3 py-2 text-sm text-red-600",children:[
|
|
9
9
|
/* @__PURE__ */E("span",{className:"min-w-0 flex-1",children:B}),K&&/* @__PURE__ */E(h,{variant:"link",size:"sm",onMouseDown:e=>e.preventDefault(),onClick:K,className:"shrink-0",children:ke.list.retry})]}):null,
|
|
10
10
|
/* @__PURE__ */W("div",{id:ve,role:nt.length?"listbox":void 0,"aria-labelledby":nt.length?te??(ee?void 0:ge):void 0,"aria-label":nt.length&&!te?ee:void 0,"aria-multiselectable":!(!nt.length||!re)||void 0,className:"overflow-y-auto",style:{maxHeight:Fe?.maxHeight??w},children:[0===nt.length?Z||B?null:/* @__PURE__ */E("p",{className:"px-3 py-3 text-sm text-ink-faintest text-center",children:ke.select.noMatches}):0===_e.length?null:l(qe,(e,t)=>{const n=le.includes(e.value);/* @__PURE__ */
|
|
11
11
|
return W("button",{id:we(t),type:"button",role:"option","aria-selected":n,"aria-disabled":e.disabled||void 0,tabIndex:-1,onMouseDown:n=>{(e.disabled||re)&&n.preventDefault(),Ee(e,t)},className:"w-full overflow-hidden text-left px-3 min-h-(--row-height-menu) py-2 text-sm flex items-center justify-between gap-2 whitespace-nowrap "+(e.disabled?"cursor-not-allowed text-gray-400":`hover:bg-gray-50 ${n?"text-blue-600 font-medium":"text-gray-700"} ${t===me?"bg-gray-100":n?"bg-blue-50/50":""}`),children:[re&&/* @__PURE__ */E(o,{selected:n}),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{client_default as a}from"./chunk-
|
|
1
|
+
import{client_default as a}from"./chunk-J44PLTRE.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};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function e(e,o,t){return e.some(e=>("object"==typeof e?e.value:e)===t)?t:o}export{e as parseOption};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{motionSeconds as t}from"./chunk-AIJ3G6BD.js";import{parseOption as e}from"./chunk-YPXONNBV.js";var n=["none","fade","rise","scale","glide","bounce","flip","reveal","spin"],r=["glide","bounce","flip","reveal"],o=["top","bottom","left","right"],i="bottom",a="data-motion-entrance",d="--motion-entrance-duration",s="--motion-entrance-delay",u="data-motion-from",c="data-motion-state";function f(a,d,s,u){const c=e(n,"none",a),f=(t=>r.includes(t))(c)?e(o,i,d):null;return{kind:c,from:f,duration:t("entrance","duration",s),delay:t("entrance","delay",u)}}function m(t){if("none"===t.kind)return{attrs:{},style:{}};const e={[a]:t.kind};t.from&&(e[u]=t.from);const n={},r=f("fade");return t.duration!==r.duration&&(n[d]=`${t.duration}s`),t.delay!==r.delay&&(n[s]=`${t.delay}s`),{attrs:e,style:n}}function l(t){const e=()=>{};if("undefined"==typeof IntersectionObserver)return e;if(!t.getAttribute(a))return e;const n=window.innerHeight||document.documentElement.clientHeight;if(t.getBoundingClientRect().top<n)return e;t.setAttribute(c,"armed");const r=new IntersectionObserver(e=>{for(const n of e)if(n.isIntersecting){r.disconnect(),b(t);break}},{threshold:0});return r.observe(t),()=>{r.disconnect(),t.removeAttribute(c)}}function b(t){if(!t.getAttribute(a))return;t.removeAttribute(c),t.offsetWidth,t.setAttribute(c,"play");const e=n=>{n.target===t&&(t.removeAttribute(c),t.removeEventListener("animationend",e))};t.addEventListener("animationend",e)}export{a as ENTRANCE_ATTR,s as ENTRANCE_DELAY_VAR,d as ENTRANCE_DURATION_VAR,o as ENTRANCE_FROM,u as ENTRANCE_FROM_ATTR,i as ENTRANCE_FROM_DEFAULT,n as ENTRANCE_KINDS,r as ENTRANCE_KINDS_WITH_FROM,c as ENTRANCE_STATE_ATTR,l as armEntrance,m as entranceAttrs,b as playEntrance,f as readEntrance};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { C as CodeFormatter } from '../CodeEditor-D6V_rQOK.js';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* `efficient-shell/code/format` — the kit's code formatter, prettier's HTML
|
|
5
|
+
* printer with its CSS printer for the text in `<style>`.
|
|
6
|
+
*
|
|
7
|
+
* prettier is an OPTIONAL peer: only a host that imports this entry installs
|
|
8
|
+
* it, and `efficient-shell/code` never imports it, so a host without prettier
|
|
9
|
+
* builds and simply passes no `formatter` (the editor then formats nothing).
|
|
10
|
+
* The three prettier modules load with `import()` on the first format, never
|
|
11
|
+
* with the page. `scripts/verify-dist.mjs` holds the built entry to that.
|
|
12
|
+
*/
|
|
13
|
+
|
|
14
|
+
declare const prettierFormatter: CodeFormatter;
|
|
15
|
+
|
|
16
|
+
export { CodeFormatter, prettierFormatter };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var t={async format(t,r){const[s,i,o]=await Promise.all([import("prettier/standalone"),import("prettier/plugins/html"),import("prettier/plugins/postcss")]),e=await s.formatWithCursor(t,{parser:"html",plugins:[i,o],cursorOffset:r,printWidth:80,tabWidth:2});return{code:e.formatted,cursor:e.cursorOffset}}};export{t as prettierFormatter};
|
package/dist/code/index.d.ts
CHANGED
|
@@ -1,20 +1,8 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
/** Replace the selection (or insert at the cursor) with `text`, then focus. */
|
|
5
|
-
insert(text: string): void;
|
|
6
|
-
focus(): void;
|
|
7
|
-
}
|
|
8
|
-
interface CodeEditorProps {
|
|
9
|
-
value: string;
|
|
10
|
-
onChange(value: string): void;
|
|
11
|
-
/** What the editable area is called for a screen reader. */
|
|
12
|
-
label: string;
|
|
13
|
-
readOnly?: boolean;
|
|
14
|
-
className?: string;
|
|
15
|
-
}
|
|
2
|
+
import { a as CodeEditorProps, b as CodeEditorHandle } from '../CodeEditor-D6V_rQOK.js';
|
|
3
|
+
export { c as CodeEdit, d as CodeFormatResult, C as CodeFormatter, e as CodePlaced } from '../CodeEditor-D6V_rQOK.js';
|
|
16
4
|
|
|
17
5
|
/** The editor — its frame now, CodeMirror once mounted. */
|
|
18
6
|
declare const CodeEditor: react.ForwardRefExoticComponent<CodeEditorProps & react.RefAttributes<CodeEditorHandle>>;
|
|
19
7
|
|
|
20
|
-
export { CodeEditor,
|
|
8
|
+
export { CodeEditor, CodeEditorHandle, CodeEditorProps };
|
package/dist/code/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import{forwardRef as
|
|
2
|
+
import{REST_EDGE as r}from"../chunk-AKDPGEBE.js";import{forwardRef as e,useState as t,useRef as o,useEffect as n,useImperativeHandle as c,createElement as s}from"react";var u={height:"100%",backgroundColor:"var(--surface)",boxShadow:`inset 0 0 0 ${r.width} ${r.colour}`};var a,i=(a=()=>import("../CodeEditor-ZTFRQLZM.js"),e(function(r,e){const[i,l]=t(null),[f,m]=t(null),h=o(null),p=o([]);if(n(()=>{let r=!0;return a().then(e=>{r&&l(()=>e.default)},e=>{r&&m({error:e})}),()=>{r=!1}},[]),n(()=>{const r=h.current;if(i&&r)for(const e of p.current.splice(0))e(r)},[i]),c(e,()=>{const r=r=>{h.current?r(h.current):p.current.push(r)};return{insert:e=>r(r=>r.insert(e)),place:e=>new Promise(t=>r(r=>{r.place(e).then(t)})),format:()=>new Promise(e=>r(r=>{r.format().then(e)})),focus:()=>r(r=>r.focus())}},[]),f)throw f.error;return i?s(i,{...r,ref:h}):s("div",{className:r.className,style:u,"aria-busy":!0})}));export{i as CodeEditor};
|
package/dist/data/EntityList.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
export{EntityList as default}from"../chunk-
|
|
2
|
+
export{EntityList as default}from"../chunk-6JPSVHUK.js";import"../chunk-XYVFJLAU.js";import"../chunk-ATMJ5ZPK.js";import"../chunk-G6DKCCWH.js";import"../chunk-CGZBDI6C.js";import"../chunk-U73K3ICC.js";import"../chunk-7OVMWXFM.js";import"../chunk-D4Q33KXQ.js";import"../chunk-SI26KESU.js";import"../chunk-XGEN76DG.js";import"../chunk-ULJQYXHB.js";import"../chunk-4PJFL26P.js";import"../chunk-F3ZOO23R.js";import"../chunk-2QY5BJLA.js";import"../chunk-UGTRSRIW.js";import"../chunk-POBVGDZP.js";import"../chunk-RTK77DMP.js";import"../chunk-URHGHXDN.js";import"../chunk-5QFPTDQF.js";import"../chunk-MEP6CZJ3.js";import"../chunk-IVEM2BPC.js";import"../chunk-R2VKEMZH.js";import"../chunk-ISVODSRP.js";import"../chunk-J75ZT2JQ.js";import"../chunk-G3TC2GIA.js";import"../chunk-AJPQJ7TC.js";import"../chunk-PGN5ME7B.js";import"../chunk-62LW225J.js";import"../chunk-TAHHZGRH.js";import"../chunk-KEFNQEXZ.js";import"../chunk-PU2GJVMG.js";import"../chunk-STKJA4PV.js";import"../chunk-I2NVBDKH.js";import"../chunk-UQYNPYF4.js";import"../chunk-MRJKZWWV.js";import"../chunk-TWVUQUUD.js";import"../chunk-5FYDNH4Y.js";import"../chunk-LNXBTK7Q.js";import"../chunk-NRHG4R2Q.js";import"../chunk-C3QOHMR6.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{ListLoadError as default}from"../chunk-7OVMWXFM.js";import"../chunk-MEP6CZJ3.js";import"../chunk-IVEM2BPC.js";import"../chunk-
|
|
1
|
+
export{ListLoadError as default}from"../chunk-7OVMWXFM.js";import"../chunk-MEP6CZJ3.js";import"../chunk-IVEM2BPC.js";import"../chunk-R2VKEMZH.js";import"../chunk-ISVODSRP.js";import"../chunk-J75ZT2JQ.js";import"../chunk-AJPQJ7TC.js";import"../chunk-PGN5ME7B.js";import"../chunk-62LW225J.js";import"../chunk-TAHHZGRH.js";import"../chunk-KEFNQEXZ.js";import"../chunk-PU2GJVMG.js";import"../chunk-UQYNPYF4.js";import"../chunk-MRJKZWWV.js";import"../chunk-TWVUQUUD.js";import"../chunk-5FYDNH4Y.js";import"../chunk-LNXBTK7Q.js";import"../chunk-NRHG4R2Q.js";import"../chunk-C3QOHMR6.js";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
export{ResizableTable as default}from"../chunk-
|
|
2
|
+
export{ResizableTable as default}from"../chunk-D4Q33KXQ.js";import"../chunk-SI26KESU.js";import"../chunk-XGEN76DG.js";import"../chunk-ULJQYXHB.js";import"../chunk-2QY5BJLA.js";import"../chunk-UGTRSRIW.js";import"../chunk-POBVGDZP.js";import"../chunk-ISVODSRP.js";import"../chunk-J75ZT2JQ.js";import"../chunk-G3TC2GIA.js";import"../chunk-AJPQJ7TC.js";import"../chunk-PGN5ME7B.js";import"../chunk-62LW225J.js";import"../chunk-TAHHZGRH.js";import"../chunk-KEFNQEXZ.js";import"../chunk-PU2GJVMG.js";import"../chunk-STKJA4PV.js";import"../chunk-TWVUQUUD.js";import"../chunk-5FYDNH4Y.js";import"../chunk-LNXBTK7Q.js";import"../chunk-NRHG4R2Q.js";import"../chunk-C3QOHMR6.js";
|
package/dist/format/index.d.ts
CHANGED
|
@@ -4,6 +4,7 @@ export { CurrencyFormat, EMPTY_VALUE, FormatMoneyOptions, TimeAgoOptions, curren
|
|
|
4
4
|
export { slugify } from '../utils/slugify.js';
|
|
5
5
|
export { escapeHtml } from '../utils/escapeHtml.js';
|
|
6
6
|
export { gridColumnCount } from '../utils/gridColumns.js';
|
|
7
|
+
export { parseOption } from '../utils/parseOption.js';
|
|
7
8
|
export { Rgb, contrastRatio, hexToRgb, parseHexColor, readableInk, relativeLuminance } from '../forms/color.js';
|
|
8
9
|
export { hexWithAlpha, mixHex, rgbToHex } from '../forms/colorMix.js';
|
|
9
10
|
export { ROOT_THEME_ATTRIBUTES, RootThemeOptions, rootIsDark, watchRootTheme } from '../utils/rootTheme.js';
|
package/dist/format/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{slugify}from"../chunk-24AL3CDS.js";import{ENTRANCE_ATTR as t}from"../chunk-
|
|
1
|
+
export{slugify}from"../chunk-24AL3CDS.js";import{ENTRANCE_ATTR as t}from"../chunk-YYGA4Y6E.js";export{ENTRANCE_ATTR,ENTRANCE_DELAY_VAR,ENTRANCE_DURATION_VAR,ENTRANCE_FROM,ENTRANCE_FROM_ATTR,ENTRANCE_FROM_DEFAULT,ENTRANCE_KINDS,ENTRANCE_KINDS_WITH_FROM,ENTRANCE_STATE_ATTR,armEntrance,entranceAttrs,playEntrance,readEntrance}from"../chunk-YYGA4Y6E.js";export{HOVER_MOTION,MOTION_EASING,MOTION_GROUPS,MOTION_TIMING,motionSeconds,rotateDegrees}from"../chunk-AIJ3G6BD.js";export{hexWithAlpha,mixHex,rgbToHex}from"../chunk-CJSZW3OS.js";export{addShowWhenFacts,isShown,lazyShowWhenContext,showWhenFactReaders,showWhenFactsContext,showWhenOf,shownForOption,truthy,withRowRules,withRowsShownWhen,withShowWhen,withShowWhenFacts}from"../chunk-HCP7WOAL.js";export{gridColumnCount}from"../chunk-VNNVG4NR.js";export{BORDER_LINE_STYLES}from"../chunk-NOMWJTN2.js";export{FOCAL_DEFAULT,FOCAL_NUDGE_COARSE,FOCAL_NUDGE_STEP,focalFromRect,formatFocal,nudgeFocal,parseFocal}from"../chunk-25RR3GQW.js";export{contrastRatio,hexToRgb,parseHexColor,readableInk,relativeLuminance}from"../chunk-S6OB6HJB.js";export{escapeHtml}from"../chunk-G6DKCCWH.js";export{currencyDecimals,currencySymbol,formatBytes,formatMoney,setCurrencyFormats,timeAgo}from"../chunk-OJI4ROSD.js";export{DATE_FORMAT_OPTIONS,TZ_AUTO,dayKeyInZone,formatDate,formatDateTime,formatTime,getUserDateFormat,getUserTimezone,instantOnDayKey,knownZone,setUserDateFormat,setUserTimezone,syncTimezoneFromProfile,userToday,userZone}from"../chunk-NHKT5IH6.js";export{EMPTY_VALUE}from"../chunk-36BRD5J3.js";export{fromDateKey,toDateKey}from"../chunk-JRQMX4PK.js";import"../chunk-LF27WIN2.js";import{parseOption as e}from"../chunk-YPXONNBV.js";export{parseOption}from"../chunk-YPXONNBV.js";export{ROOT_THEME_ATTRIBUTES,rootIsDark,watchRootTheme}from"../chunk-LNXBTK7Q.js";var o=["none","zoom-in","zoom-out","fade-in","fade-out","move-up","move-down","reveal","parallax"],n=["zoom-in","zoom-out"],r=(t,e,o,n)=>({default:t,min:e,max:o,step:n}),i=r(30,0,100,10),s=r(0,0,100,5),a=r(100,0,100,5),m=r(2,0,4,.5),u="data-motion-scroll",c="data-motion-pin",f="data-motion-pin-frame",l="data-motion-pin-above",h="--motion-zoom",p="--motion-origin",d="--motion-scroll-start",N="--motion-scroll-end",T="--motion-p",E="--motion-pin-on",y="--motion-pin-top",A="--motion-pin-length",R="--motion-pin-position",g="--motion-pin-stick",O="--motion-pin-track-position",S="--motion-pin-above-z",w=["track","stick"],x=/^\s*-?\d+(\.\d+)?\s*$/;function F(t,e){const o="number"==typeof e?e:"string"==typeof e&&x.test(e)?Number(e):Number.NaN;if(!Number.isFinite(o))return t.default;const n=Math.min(t.max,Math.max(t.min,o)),r=Math.round(Number((n/t.step).toFixed(6)));return Number((r*t.step).toFixed(3))}function _(t,n,r,m){const u=e(o,"none",t),c=F(s,r),f=F(a,m);return{effect:u,zoom:F(i,n),start:Math.min(c,f),end:Math.max(c,f)}}function k(t,e){if("none"===t.effect)return{attrs:{},style:{}};const o={};var r;return r=t.effect,n.includes(r)&&(o[h]=String(Number((1+t.zoom/100).toFixed(3))),e&&(o[p]=e)),t.start!==s.default&&(o[d]=String(t.start)),t.end!==a.default&&(o[N]=String(t.end)),{attrs:{[u]:t.effect},style:o}}function C(t,e){return{on:!0===t,length:F(m,e)}}function v(t){return t?{[g]:"1",[O]:"sticky"}:{[g]:"0",[O]:"relative"}}function D(t,e="track",o={}){if(!t.on)return{attrs:{},style:{}};const n=!0===o.above?{[l]:""}:{};if("stick"===e)return{attrs:{[c]:"stick",...n},style:{}};const r=t.length===m.default?{}:{[A]:String(t.length)};return{attrs:{[c]:"",...n},style:!0===o.stick?{...r,...v(!0)}:r}}function I(t,e,o,n){let r;if(e){const t=e.length*e.vh;r=t>0?((e.stop??0)-e.top)/t:1}else r=(t.vh-t.top)/(t.vh+t.height);const i=o/100,s=n/100,a=s>i?(r-i)/(s-i):r>=s?1:0;return Math.min(1,Math.max(0,Number(a.toFixed(4))))}var M=(t,e)=>{const o=Number.parseFloat(t);return Number.isFinite(o)?o:e};function j(e=document){const o=()=>{};if("undefined"==typeof window||"undefined"==typeof CSS)return o;if(CSS.supports("animation-timeline: view()"))return o;let n=0;const r=()=>{n=0;const o=window.innerHeight||document.documentElement.clientHeight,r=[];for(const n of e.querySelectorAll(`[${u}]`)){if(n.hasAttribute(t))continue;const e=getComputedStyle(n),i=n.closest(`[${c}]:not([${c}="stick"])`),u=i?getComputedStyle(i):null,l=!!u&&(0===M(u.getPropertyValue(E),1)||0!==M(u.getPropertyValue(g),0)),h=b(l&&i?i:n,o),p=i?.querySelector(`[${f}]`),T=i&&!l?{...b(i,o),length:M(u.getPropertyValue(A),m.default),stop:p?M(getComputedStyle(p).top,0):0}:null;r.push({el:n,p:I({top:h.top,height:h.height,vh:o},T,M(e.getPropertyValue(d),s.default),M(e.getPropertyValue(N),a.default))})}for(const{el:t,p:e}of r)t.style.setProperty(T,String(e))},i=()=>{n||(n=requestAnimationFrame(r))};return r(),window.addEventListener("scroll",i,{passive:!0}),window.addEventListener("resize",i,{passive:!0}),()=>{n&&cancelAnimationFrame(n),window.removeEventListener("scroll",i),window.removeEventListener("resize",i)}}function b(t,e,o=("undefined"==typeof window?0:window.scrollY)){let n=0;for(let e=t;e;e=e.offsetParent)n+=e.offsetTop;return{top:n-o,height:t.offsetHeight,vh:e}}var L=["none","nextImage","rotate","zoom","lift","mono"];function P(t){return L.filter(e=>t.includes(e))}export{L as HOVER_KINDS,l as PIN_ABOVE_ATTR,S as PIN_ABOVE_Z_VAR,c as PIN_ATTR,w as PIN_FORMS,f as PIN_FRAME_ATTR,m as PIN_LENGTH,A as PIN_LENGTH_VAR,E as PIN_ON_VAR,R as PIN_POSITION_VAR,g as PIN_STICK_VAR,y as PIN_TOP_VAR,O as PIN_TRACK_POSITION_VAR,u as SCROLL_ATTR,o as SCROLL_EFFECTS,n as SCROLL_EFFECTS_WITH_ZOOM,a as SCROLL_END,N as SCROLL_END_VAR,p as SCROLL_ORIGIN_VAR,T as SCROLL_PROGRESS_VAR,s as SCROLL_START,d as SCROLL_START_VAR,i as SCROLL_ZOOM,h as SCROLL_ZOOM_VAR,j as armScrollProgress,P as hoverKindsOf,b as layoutBox,D as pinAttrs,v as pinStickVars,C as readPin,_ as readScroll,k as scrollAttrs,I as scrollProgress};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
export{borderSides,borderStartEach,BorderInput as default}from"../chunk-
|
|
2
|
+
export{borderSides,borderStartEach,BorderInput as default}from"../chunk-UYUNREAL.js";import"../chunk-3ZJAQSFS.js";import"../chunk-EEAOFYW5.js";import"../chunk-VUBDHFG5.js";import"../chunk-I7WAOKU2.js";import"../chunk-GVAVIYE6.js";import"../chunk-X3LMTOMA.js";import"../chunk-2NMW66P5.js";export{BORDER_LINE_STYLES}from"../chunk-NOMWJTN2.js";import"../chunk-S6OB6HJB.js";import"../chunk-AYZY3YNC.js";import"../chunk-M5IZ7QLQ.js";import"../chunk-XNKNX5L3.js";import"../chunk-DWGYC7OD.js";import"../chunk-MYH5H43C.js";import"../chunk-RTK77DMP.js";import"../chunk-URHGHXDN.js";import"../chunk-5QFPTDQF.js";import"../chunk-IVEM2BPC.js";import"../chunk-ISVODSRP.js";import"../chunk-J75ZT2JQ.js";import"../chunk-BWJZTHZ6.js";import"../chunk-AJPQJ7TC.js";import"../chunk-PGN5ME7B.js";import"../chunk-62LW225J.js";import"../chunk-TAHHZGRH.js";import"../chunk-KEFNQEXZ.js";import"../chunk-PU2GJVMG.js";import"../chunk-UQYNPYF4.js";import"../chunk-TWVUQUUD.js";import"../chunk-5FYDNH4Y.js";import"../chunk-LNXBTK7Q.js";import"../chunk-NRHG4R2Q.js";import"../chunk-C3QOHMR6.js";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
export{BrandAssetEditor as default}from"../chunk-PTLVNC3V.js";import"../chunk-Y6FULJWJ.js";import"../chunk-CUJ537IY.js";import"../chunk-6KBDNYRW.js";import"../chunk-MI67DI3H.js";import"../chunk-25RR3GQW.js";import"../chunk-ALZHFQRX.js";import"../chunk-EFKJLUYP.js";import"../chunk-MPC3CHAO.js";import"../chunk-ION3XGLN.js";import"../chunk-TNGIXSTM.js";import"../chunk-EDRELF6L.js";import"../chunk-MEP6CZJ3.js";import"../chunk-IVEM2BPC.js";import"../chunk-
|
|
2
|
+
export{BrandAssetEditor as default}from"../chunk-PTLVNC3V.js";import"../chunk-Y6FULJWJ.js";import"../chunk-CUJ537IY.js";import"../chunk-6KBDNYRW.js";import"../chunk-MI67DI3H.js";import"../chunk-25RR3GQW.js";import"../chunk-ALZHFQRX.js";import"../chunk-EFKJLUYP.js";import"../chunk-MPC3CHAO.js";import"../chunk-ION3XGLN.js";import"../chunk-TNGIXSTM.js";import"../chunk-EDRELF6L.js";import"../chunk-MEP6CZJ3.js";import"../chunk-IVEM2BPC.js";import"../chunk-R2VKEMZH.js";import"../chunk-ISVODSRP.js";import"../chunk-J75ZT2JQ.js";import"../chunk-G3TC2GIA.js";import"../chunk-AJPQJ7TC.js";import"../chunk-PGN5ME7B.js";import"../chunk-62LW225J.js";import"../chunk-TAHHZGRH.js";import"../chunk-KEFNQEXZ.js";import"../chunk-PU2GJVMG.js";import"../chunk-UQYNPYF4.js";import"../chunk-MRJKZWWV.js";import"../chunk-TWVUQUUD.js";import"../chunk-5FYDNH4Y.js";import"../chunk-LNXBTK7Q.js";import"../chunk-NRHG4R2Q.js";import"../chunk-C3QOHMR6.js";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
export{ColorPickerPanel,ColorSwatch,HexInput,NO_COLOR_FILL,clampOpacity,colorFill,colorSwatchClasses,ColorPicker as default,stepHue,stepOpacity,stepSquare}from"../chunk-
|
|
2
|
+
export{ColorPickerPanel,ColorSwatch,HexInput,NO_COLOR_FILL,clampOpacity,colorFill,colorSwatchClasses,ColorPicker as default,stepHue,stepOpacity,stepSquare}from"../chunk-EEAOFYW5.js";import"../chunk-VUBDHFG5.js";import"../chunk-I7WAOKU2.js";import"../chunk-GVAVIYE6.js";import"../chunk-X3LMTOMA.js";import"../chunk-2NMW66P5.js";import"../chunk-S6OB6HJB.js";import"../chunk-AYZY3YNC.js";import"../chunk-M5IZ7QLQ.js";import"../chunk-XNKNX5L3.js";import"../chunk-DWGYC7OD.js";import"../chunk-MYH5H43C.js";import"../chunk-RTK77DMP.js";import"../chunk-URHGHXDN.js";import"../chunk-5QFPTDQF.js";import"../chunk-IVEM2BPC.js";import"../chunk-ISVODSRP.js";import"../chunk-J75ZT2JQ.js";import"../chunk-BWJZTHZ6.js";import"../chunk-AJPQJ7TC.js";import"../chunk-PGN5ME7B.js";import"../chunk-62LW225J.js";import"../chunk-TAHHZGRH.js";import"../chunk-KEFNQEXZ.js";import"../chunk-PU2GJVMG.js";import"../chunk-UQYNPYF4.js";import"../chunk-TWVUQUUD.js";import"../chunk-5FYDNH4Y.js";import"../chunk-LNXBTK7Q.js";import"../chunk-NRHG4R2Q.js";import"../chunk-C3QOHMR6.js";
|