efficient-shell 12.20.0 → 12.21.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 +9 -3
- package/dist/{Browser-Z7NIFAGY.js → Browser-ZR4RSWBV.js} +11 -11
- package/dist/{Files-KOUPCFRC.js → Files-54RPAKLE.js} +45 -45
- package/dist/{Notepad-Y37G5PTB.js → Notepad-JZ5UMA6T.js} +6 -6
- package/dist/{Preview-GB33WBQY.js → Preview-WHZ4O6UT.js} +25 -25
- package/dist/apps/index.js +1 -1
- package/dist/bin/media-host-check.js +1 -1
- package/dist/bin/ui-check.js +1 -1
- package/dist/{chunk-F4XGUOVL.js → chunk-4BKJ6A5H.js} +4 -4
- package/dist/chunk-63TCQAGE.js +6 -0
- package/dist/{chunk-BDGYRQQE.js → chunk-B4GCTNGM.js} +3 -3
- package/dist/{chunk-P54AD2EM.js → chunk-C6W5P6CY.js} +3 -3
- package/dist/chunk-G2Y5I5OR.js +2 -0
- package/dist/{chunk-EEGTFJUQ.js → chunk-JUXPKGO3.js} +6 -6
- package/dist/chunk-LBKKKZ4M.js +3 -0
- package/dist/{chunk-L2Y6FZTA.js → chunk-ME7XHU3P.js} +6 -6
- package/dist/{chunk-TKUJUQK4.js → chunk-MEN4B6NP.js} +11 -11
- package/dist/chunk-OM42AUMS.js +4 -0
- package/dist/chunk-TLNZ5KEO.js +1 -0
- package/dist/chunk-TOVEZAIM.js +5 -0
- package/dist/{chunk-WLX24TG6.js → chunk-TUPPFC74.js} +4 -4
- package/dist/chunk-WBGJ4XB7.js +4 -0
- package/dist/{chunk-QTXXHKAV.js → chunk-XACIU7IR.js} +1 -1
- package/dist/{chunk-MFEPLP7Y.js → chunk-XHZVUO6F.js} +5 -5
- package/dist/{chunk-NAN2IW2H.js → chunk-YW3UKSON.js} +2 -2
- package/dist/format/index.js +1 -1
- package/dist/forms/BorderInput.d.ts +7 -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/CornersInput.d.ts +10 -1
- package/dist/forms/CornersInput.js +1 -1
- package/dist/forms/InputNumber.d.ts +12 -0
- package/dist/forms/InputNumber.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/PositionInput.d.ts +8 -1
- package/dist/forms/PositionInput.js +1 -1
- package/dist/forms/SidesInput.d.ts +3 -6
- package/dist/forms/SidesInput.js +1 -1
- package/dist/forms/Slider.d.ts +19 -1
- package/dist/forms/Slider.js +1 -1
- package/dist/forms/UnitMenu.d.ts +24 -1
- package/dist/forms/UnitMenu.js +2 -1
- package/dist/forms/WidthsBar.js +1 -1
- package/dist/icons/index.js +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +72 -72
- package/dist/shell/LanguageSelect.js +1 -1
- package/dist/shell/SettingRow.js +1 -1
- package/dist/telemetry/index.js +1 -1
- package/dist/ui/index.d.ts +1 -1
- package/dist/ui/index.js +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
- package/dist/chunk-DTSOYFQE.js +0 -4
- package/dist/chunk-FBUFB536.js +0 -6
- package/dist/chunk-FE5DH5OM.js +0 -3
- package/dist/chunk-L4QGZ26E.js +0 -1
- package/dist/chunk-QI4235JY.js +0 -2
- package/dist/chunk-S7MNRAYS.js +0 -4
- package/dist/chunk-SET3R227.js +0 -4
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import{MediaUploadField as e}from"./chunk-
|
|
2
|
-
return n("section",{"aria-label":
|
|
1
|
+
import{MediaUploadField as e}from"./chunk-B4GCTNGM.js";import{BrandMark as r}from"./chunk-MI67DI3H.js";import{Button_default as a}from"./chunk-EVYD6UFQ.js";import{useShellStrings as t}from"./chunk-JSHMIMAJ.js";import{useRef as i,useState as l,useEffect as s}from"react";import{jsxs as n,jsx as c}from"react/jsx-runtime";function d({committedUrl:d,committedHasAlpha:o=null,committedIsLight:m=null,fallbackUrl:g,fallbackHasAlpha:h=null,fallbackIsLight:u=null,subjectName:b,assetName:p,onSave:x,onRemove:f,accept:v="image/png,image/x-icon,image/vnd.microsoft.icon,.ico,image/svg+xml,image/jpeg,image/webp",acceptHint:y="PNG · ICO · SVG · JPG · WEBP",maxBytes:N=5242880,previews:w=[],disabled:k=!1}){const j=i(null),[L,U]=l(null),[R,C]=l(""),[H,I]=l(""),[A,F]=l(!1),[G,B]=l(!1),E=function(e){return e.trim().toLocaleLowerCase().split(/\s+/).at(-1)||"image"}(p),M=t().brandAsset,O=R||d||g||"",S=L?null:d?o:h,J=L?null:d?m:u;s(()=>()=>{j.current&&URL.revokeObjectURL(j.current)},[]);const P=()=>{j.current&&(URL.revokeObjectURL(j.current),j.current=null)};/* @__PURE__ */
|
|
2
|
+
return n("section",{"aria-label":M.region(p,b),className:"grid gap-4 lg:grid-cols-2",children:[
|
|
3
3
|
/* @__PURE__ */n("div",{className:"rounded-lg border border-gray-200 bg-white p-4",children:[
|
|
4
|
-
/* @__PURE__ */c(e,{value:
|
|
4
|
+
/* @__PURE__ */c(e,{value:O,onChange:()=>{},onFile:e=>{if(k)return;P();const r=URL.createObjectURL(e);j.current=r,U(e),C(r),I("")},label:p,hint:H||M.usedFor(b),error:H||void 0,accept:v,acceptHint:y,maxSizeBytes:N,fit:"contain",height:180,allowRemove:!1,busy:A||G,disabled:k}),
|
|
5
5
|
/* @__PURE__ */n("div",{className:"mt-3 flex flex-wrap gap-2",children:[
|
|
6
|
-
/* @__PURE__ */c(a,{onClick:async()=>{if(L&&!k&&!
|
|
7
|
-
/* @__PURE__ */c("h3",{className:"text-sm font-semibold text-gray-900",children:
|
|
8
|
-
/* @__PURE__ */c("div",{className:"mt-3 grid gap-3",children:w.map(e=>{const a=/* @__PURE__ */c(r,{src:
|
|
6
|
+
/* @__PURE__ */c(a,{onClick:async()=>{if(L&&!k&&!A){F(!0),I("");try{await x(L),P(),U(null),C("")}catch(e){I(e instanceof Error?e.message:M.saveFailed(E,p))}finally{F(!1)}}},disabled:!L||k,loading:A,children:M.save(E,p)}),(L||d)&&/* @__PURE__ */c(a,{variant:"ghost-danger",onClick:async()=>{if(!k&&!G){if(L)return P(),U(null),C(""),void I("");if(d){B(!0),I("");try{await f()}catch(e){I(e instanceof Error?e.message:M.removeFailed(E,p))}finally{B(!1)}}}},disabled:k,loading:G,children:L?M.discard:M.remove(E,p)})]})]}),w.length>0&&/* @__PURE__ */n("div",{className:"rounded-lg border border-gray-200 bg-white p-4","aria-label":M.previews(p),children:[
|
|
7
|
+
/* @__PURE__ */c("h3",{className:"text-sm font-semibold text-gray-900",children:M.preview}),
|
|
8
|
+
/* @__PURE__ */c("div",{className:"mt-3 grid gap-3",children:w.map(e=>{const a=/* @__PURE__ */c(r,{src:O,alt:M.alt(b,p),slot:e.slot,surface:e.surface,adaptive:!0,hasAlpha:S,isLight:J,size:"browser-tab"===e.kind?16:void 0});/* @__PURE__ */
|
|
9
9
|
return n("div",{"data-brand-preview":!0,className:"dark"===e.surface?"text-white":"text-gray-900",children:[
|
|
10
10
|
/* @__PURE__ */c("div",{className:"mb-2 text-xs font-medium text-gray-500",children:e.label}),"browser-tab"===e.kind?/* @__PURE__ */n("div",{className:"flex items-end gap-1 border-b border-gray-200",children:[
|
|
11
11
|
/* @__PURE__ */n("div",{className:"flex max-w-[220px] items-center gap-2 rounded-t-lg border border-b-0 border-gray-200 bg-white px-3 py-2",children:[a,
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import{Popover as e}from"./chunk-64RHGJXK.js";import{InputNumber_default as r}from"./chunk-
|
|
2
|
-
return v("button",{ref:l,type:o,"aria-pressed":a,className:N({size:r,selected:a,className:n}),...t,children:/* @__PURE__ */v("span",{"aria-hidden":"true",className:"absolute inset-0",style:C(e)})})}),z=(e,r,a)=>Math.min(a,Math.max(r,e)),D=e=>"string"==typeof e?{value:e}:e;function I(e,r,a){const n=a?.1:.01,o={ArrowLeft:[-n,0],ArrowRight:[n,0],ArrowDown:[0,-n],ArrowUp:[0,n]}[r];return o?{...e,s:z(e.s+o[0],0,1),v:z(e.v+o[1],0,1)}:null}function M(e,r,a){const n=a?10:1;switch(r){case"ArrowLeft":case"ArrowDown":return z(e-n,0,359);case"ArrowRight":case"ArrowUp":return z(e+n,0,359);case"PageDown":return z(e-10,0,359);case"PageUp":return z(e+10,0,359);case"Home":return 0;case"End":return 359;default:return null}}var A={boxShadow:"0 0 0 2px white, 0 0 0 3px color-mix(in srgb, black 35%, transparent)"};function
|
|
3
|
-
return w("div",{id:
|
|
1
|
+
import{Popover as e}from"./chunk-64RHGJXK.js";import{InputNumber_default as r}from"./chunk-LBKKKZ4M.js";import{parseHexColor as a,hexToHsv as n,hsvToHex as o,hexReadout as t,HUE_GRADIENT as l,HEX_MAX_LENGTH as i,svFromPoint as s,hueFromPoint as c}from"./chunk-S6OB6HJB.js";import{inputClasses as u}from"./chunk-AYZY3YNC.js";import{Tooltip as d}from"./chunk-SOZCWT6I.js";import{useShellStrings as h}from"./chunk-JSHMIMAJ.js";import{forwardRef as g,useState as p,useRef as b,useEffect as m,useId as f}from"react";import{jsx as v,jsxs as w}from"react/jsx-runtime";var x={sm:"h-6 w-6",md:"h-8 w-8",lg:"h-10 w-10"},y={backgroundImage:"conic-gradient(var(--line-strong) 25%, var(--surface) 0 50%, var(--line-strong) 0 75%, var(--surface) 0)",backgroundSize:"8px 8px"};function k(e){return null==e||Number.isNaN(e)?100:Math.round(Math.min(100,Math.max(0,e)))}function C(e,r){if(!e)return y;const a=k(r);if(a>=100)return{background:e};const n=`color-mix(in srgb, ${e} ${a}%, transparent)`;return{backgroundImage:`linear-gradient(${n}, ${n}), ${y.backgroundImage}`,backgroundSize:`auto, ${y.backgroundSize}`}}function N({size:e="md",selected:r=!1,className:a=""}={}){return["relative inline-flex shrink-0 overflow-hidden rounded-md p-0 transition-shadow","rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)]","disabled:cursor-not-allowed disabled:opacity-60",r?"border-2 border-blue-500":"border border-gray-300 hover:shadow-sm",x[e],a].filter(Boolean).join(" ")}var $=g(function({color:e,size:r="md",selected:a,className:n,type:o="button",...t},l){/* @__PURE__ */
|
|
2
|
+
return v("button",{ref:l,type:o,"aria-pressed":a,className:N({size:r,selected:a,className:n}),...t,children:/* @__PURE__ */v("span",{"aria-hidden":"true",className:"absolute inset-0",style:C(e)})})}),z=(e,r,a)=>Math.min(a,Math.max(r,e)),D=e=>"string"==typeof e?{value:e}:e;function I(e,r,a){const n=a?.1:.01,o={ArrowLeft:[-n,0],ArrowRight:[n,0],ArrowDown:[0,-n],ArrowUp:[0,n]}[r];return o?{...e,s:z(e.s+o[0],0,1),v:z(e.v+o[1],0,1)}:null}function M(e,r,a){const n=a?10:1;switch(r){case"ArrowLeft":case"ArrowDown":return z(e-n,0,359);case"ArrowRight":case"ArrowUp":return z(e+n,0,359);case"PageDown":return z(e-10,0,359);case"PageUp":return z(e+10,0,359);case"Home":return 0;case"End":return 359;default:return null}}var A={boxShadow:"0 0 0 2px white, 0 0 0 3px color-mix(in srgb, black 35%, transparent)"};function K(e,r,a){const n=a?10:1;switch(r){case"ArrowLeft":case"ArrowDown":return z(e-n,0,100);case"ArrowRight":case"ArrowUp":return z(e+n,0,100);case"PageDown":return z(e-10,0,100);case"PageUp":return z(e+10,0,100);case"Home":return 0;case"End":return 100;default:return null}}function P({value:e,onChange:r,label:i,presets:u,clearable:g=!1,fallback:f,dragWrites:x="live",disabled:N=!1,opacity:z,onOpacityChange:P,onClose:S,id:j,className:T=""}){const R=h().color,H=k(z),L=e=>{const r=k(e);N||r===H||P?.(r)},U=e=>{const r=e.currentTarget.getBoundingClientRect();return r.width>0?(e.clientX-r.left)/r.width*100:H},E=a(f??""),[J,W]=p(()=>n(e||E||"")),X=b(e);m(()=>{e!==X.current&&(X.current=e,e?W(n(e)):E&&W(n(E)))},[e]);const Y=a=>{N||a===e||(X.current=a,r(a))},q=e=>{const r=a(e);r&&(W(n(r)),Y(r))},Z=e=>{W(e),Y(o(e))},[F,G]=p(!1),V=b(J);V.current=J;const Q=e=>({onPointerDown:r=>{if(N||0!==r.button)return;r.currentTarget.setPointerCapture?.(r.pointerId),r.currentTarget.focus({preventScroll:!0});const a=e(r,V.current);"end"===x?(G(!0),W(a)):Z(a)},onPointerMove:r=>{if(N||!(1&r.buttons))return;const a=e(r,V.current);"end"===x?W(a):Z(a)},onPointerUp:r=>{"end"===x&&F&&(G(!1),Z(e(r,V.current)))}}),_=Q((e,r)=>({...r,...s(e.clientX,e.clientY,e.currentTarget.getBoundingClientRect())})),ee=Q((e,r)=>({...r,h:c(e.clientX,e.currentTarget.getBoundingClientRect())})),re=F?o(J):e,ae=e=>`${Math.round(100*e)}%`,ne=(u??[]).map(D),oe=a(e),te=re||E||"";/* @__PURE__ */
|
|
3
|
+
return w("div",{id:j,className:`flex w-56 flex-col gap-3 ${N?"opacity-60":""} ${T}`.trim(),onKeyDown:e=>{"Escape"===e.key&&S&&(e.preventDefault(),e.stopPropagation(),S())},children:[(ne.length>0||g)&&/* @__PURE__ */w("div",{role:"group","aria-label":R.presets,className:"flex flex-wrap gap-2",children:[g&&/* @__PURE__ */v(d,{content:R.clear,children:/* @__PURE__ */v($,{color:"",size:"sm","aria-label":R.clear,selected:""===e,disabled:N,onClick:()=>{N||""===e||(X.current="",r(""))}})}),ne.map(e=>{const r=a(e.value),n=e.label?`${e.label} · ${t(r??e.value)}`:t(r??e.value);/* @__PURE__ */
|
|
4
4
|
return v(d,{content:n,children:/* @__PURE__ */v($,{color:r??e.value,size:"sm","aria-label":n,selected:null!==r&&r===oe,disabled:N,onClick:()=>q(e.value)})},`${e.label??""}:${e.value}`)})]}),
|
|
5
|
-
/* @__PURE__ */v("div",{role:"slider",tabIndex:N?-1:0,"aria-label":
|
|
6
|
-
/* @__PURE__ */v("div",{role:"slider",tabIndex:N?-1:0,"aria-label":
|
|
5
|
+
/* @__PURE__ */v("div",{role:"slider",tabIndex:N?-1:0,"aria-label":R.square,"aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":Math.round(100*J.v),"aria-valuetext":R.squareValue(Math.round(100*J.s),Math.round(100*J.v)),"aria-disabled":N||void 0,"data-color-square":"",onKeyDown:e=>{if(N)return;const r=I(J,e.key,e.shiftKey);r&&(e.preventDefault(),Z(r))},..._,className:"relative h-36 w-full cursor-crosshair touch-none rounded-md rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)]",style:{backgroundColor:o({h:J.h,s:1,v:1}),backgroundImage:"linear-gradient(to top, black, transparent), linear-gradient(to right, white, transparent)"},children:/* @__PURE__ */v("span",{"aria-hidden":"true",className:"pointer-events-none absolute h-3 w-3 -translate-x-1/2 -translate-y-1/2 rounded-full",style:{left:ae(J.s),top:ae(1-J.v),...A}})}),
|
|
6
|
+
/* @__PURE__ */v("div",{role:"slider",tabIndex:N?-1:0,"aria-label":R.hue,"aria-valuemin":0,"aria-valuemax":359,"aria-valuenow":Math.round(J.h),"aria-orientation":"horizontal","aria-disabled":N||void 0,"data-color-hue":"",onKeyDown:e=>{if(N)return;const r=M(J.h,e.key,e.shiftKey);null!==r&&(e.preventDefault(),Z({...J,h:r}))},...ee,className:"relative h-3 w-full cursor-pointer touch-none rounded-full rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)]",style:{backgroundImage:l},children:/* @__PURE__ */v("span",{"aria-hidden":"true",className:"pointer-events-none absolute top-1/2 h-3.5 w-3.5 -translate-x-1/2 -translate-y-1/2 rounded-full",style:{left:J.h/360*100+"%",background:o({h:J.h,s:1,v:1}),...A}})}),P&&/* @__PURE__ */v("div",{role:"slider",tabIndex:N?-1:0,"aria-label":R.opacity(i),"aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":H,"aria-valuetext":`${H}%`,"aria-orientation":"horizontal","aria-disabled":N||void 0,"data-color-opacity":"",onKeyDown:e=>{if(N)return;const r=K(H,e.key,e.shiftKey);null!==r&&(e.preventDefault(),L(r))},onPointerDown:e=>{N||0!==e.button||(e.currentTarget.setPointerCapture?.(e.pointerId),e.currentTarget.focus({preventScroll:!0}),L(U(e)))},onPointerMove:e=>{!N&&1&e.buttons&&L(U(e))},className:"relative h-3 w-full cursor-pointer touch-none rounded-full rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)]",style:{backgroundImage:`linear-gradient(to right, transparent, ${te||"black"}), ${y.backgroundImage}`,backgroundSize:`auto, ${y.backgroundSize}`},children:/* @__PURE__ */v("span",{"aria-hidden":"true",className:"pointer-events-none absolute top-1/2 h-3.5 w-3.5 -translate-x-1/2 -translate-y-1/2 rounded-full",style:{left:`${H}%`,...C(te||"black",H),...A}})}),
|
|
7
7
|
/* @__PURE__ */w("div",{className:"flex items-center gap-2",children:[
|
|
8
|
-
/* @__PURE__ */v("span",{"aria-hidden":"true",className:"relative h-8 w-8 shrink-0 overflow-hidden rounded-md border border-line-strong",style:C(te,
|
|
9
|
-
/* @__PURE__ */v(
|
|
10
|
-
return v("input",{id:s,type:"text",value:g??(e?t(e):""),"aria-label":n,placeholder:o,maxLength:i,spellCheck:!1,autoComplete:"off",disabled:l,onChange:n=>{b(n.target.value);const o=a(n.target.value);null!==o&&o!==e&&r(o)},onFocus:e=>e.currentTarget.select(),onKeyDown:e=>{"Enter"===e.key&&(e.preventDefault(),b(null))},onBlur:()=>b(null),"data-hex-look":d,className:m})}function
|
|
11
|
-
return v("div",{"data-color-opacity-box":"",className:"w-20 shrink-0",children:/* @__PURE__ */v(r,{value:e,onChange:e=>{null!==e&&a(e)},min:0,max:100,precision:0,suffix:"%",size:t,"aria-label":n,disabled:o})})}function
|
|
8
|
+
/* @__PURE__ */v("span",{"aria-hidden":"true",className:"relative h-8 w-8 shrink-0 overflow-hidden rounded-md border border-line-strong",style:C(te,P?H:null)}),
|
|
9
|
+
/* @__PURE__ */v(B,{value:re,placeholder:!e&&E?t(E):void 0,onChange:q,label:R.hex(i),disabled:N}),P&&/* @__PURE__ */v(O,{value:H,onChange:L,label:R.opacity(i),disabled:N})]})]})}var S={sm:"w-[calc(7ch+1rem+4px)] min-w-[calc(7ch+1rem+4px)]",md:"w-[calc(7ch+1.5rem+4px)] min-w-[calc(7ch+1.5rem+4px)]",lg:"w-[calc(7ch+2rem+4px)] min-w-[calc(7ch+2rem+4px)]"},j={sm:"h-6",md:"h-8",lg:"h-10"},T=["block w-[calc(7ch+0.5rem+4px)] min-w-[calc(7ch+0.5rem+4px)] flex-none rounded-(--radius-control)","border border-transparent bg-transparent px-1 text-2xs font-mono uppercase","text-ink-strong placeholder:text-[color:var(--ink-placeholder)] hover:border-gray-300","focus:border-blue-400 focus:bg-(--surface) rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring)]","disabled:cursor-not-allowed disabled:opacity-60"].join(" ");function B({value:e,onChange:r,label:n,placeholder:o,disabled:l,id:s,size:c="md",look:d="box",className:h=""}){const[g,b]=p(null),m="text"===d?`${T} ${j[c]} ${h}`.trim():u({size:c,className:`${S[c]} flex-1 font-mono uppercase ${h}`.trim()}).replace(/(^| )w-full( |$)/," ");/* @__PURE__ */
|
|
10
|
+
return v("input",{id:s,type:"text",value:g??(e?t(e):""),"aria-label":n,placeholder:o,maxLength:i,spellCheck:!1,autoComplete:"off",disabled:l,onChange:n=>{b(n.target.value);const o=a(n.target.value);null!==o&&o!==e&&r(o)},onFocus:e=>e.currentTarget.select(),onKeyDown:e=>{"Enter"===e.key&&(e.preventDefault(),b(null))},onBlur:()=>b(null),"data-hex-look":d,className:m})}function O({value:e,onChange:a,label:n,disabled:o,size:t="md"}){/* @__PURE__ */
|
|
11
|
+
return v("div",{"data-color-opacity-box":"",className:"w-20 shrink-0",children:/* @__PURE__ */v(r,{value:e,onChange:e=>{null!==e&&a(e)},min:0,max:100,precision:0,suffix:"%",size:t,"aria-label":n,disabled:o})})}function R({value:r,onChange:n,label:o,presets:l,clearable:i,fallback:s,dragWrites:c,disabled:u,id:d,showHexInput:g=!1,opacity:p,onOpacityChange:b,size:m="md",align:x="start",open:y,onOpenChange:$,className:z=""}){const D=h().color,I=k(p),M=f(),A=a(s??""),K=r||A||"",S=r?t(r):A?t(A):D.none;
|
|
12
12
|
/* @__PURE__ */
|
|
13
13
|
return w("div",{className:`inline-flex items-center ${b?"flex-wrap justify-end gap-1":g?"gap-1":"gap-2"} ${z}`.trim(),children:[
|
|
14
|
-
/* @__PURE__ */v(e,{id:d,trigger:/* @__PURE__ */v("span",{"aria-hidden":"true",className:"absolute inset-0",style:C(
|
|
15
|
-
/* @__PURE__ */v(
|
|
14
|
+
/* @__PURE__ */v(e,{id:d,trigger:/* @__PURE__ */v("span",{"aria-hidden":"true",className:"absolute inset-0",style:C(K,b?I:null)}),triggerLabel:D.swatch(o,S),triggerClassName:N({size:m}),"aria-label":D.panel(o),align:x,open:y,onOpenChange:$,disabled:u,children:/* @__PURE__ */v(P,{id:M,value:r,onChange:n,label:o,presets:l,clearable:i,fallback:s,dragWrites:c,disabled:u,opacity:p,onOpacityChange:b})}),g&&
|
|
15
|
+
/* @__PURE__ */v(B,{value:r,placeholder:!r&&A?t(A):void 0,onChange:e=>{u||e===r||n(e)},label:D.hex(o),disabled:u,size:m,look:"text"}),b&&/* @__PURE__ */v(O,{value:I,onChange:e=>{u||e===I||b(e)},label:D.opacity(o),disabled:u,size:m})]})}export{R as ColorPicker,P as ColorPickerPanel,$ as ColorSwatch,B as HexInput,y as NO_COLOR_FILL,k as clampOpacity,C as colorFill,N as colorSwatchClasses,M as stepHue,K as stepOpacity,I as stepSquare};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import{InputNumber_default as e,stepRounding as a}from"./chunk-LBKKKZ4M.js";import{IconButton_default as t}from"./chunk-SV5RRBVA.js";import{Icon as r}from"./chunk-XZXFUZIK.js";import{Tooltip as i}from"./chunk-SOZCWT6I.js";import{jsx as n,jsxs as o,Fragment as d}from"react/jsx-runtime";var s="h-3.5 w-3.5",l={padding:{top:/* @__PURE__ */n(r,{name:"padding-top","aria-hidden":"true",className:s}),right:/* @__PURE__ */n(r,{name:"padding-right","aria-hidden":"true",className:s}),bottom:/* @__PURE__ */n(r,{name:"padding-bottom","aria-hidden":"true",className:s}),left:/* @__PURE__ */n(r,{name:"padding-left","aria-hidden":"true",className:s}),vertical:/* @__PURE__ */n(r,{name:"padding-y","aria-hidden":"true",className:s}),horizontal:/* @__PURE__ */n(r,{name:"padding-left-right","aria-hidden":"true",className:s})},crop:{top:/* @__PURE__ */n(r,{name:"crop-top","aria-hidden":"true",className:s}),right:/* @__PURE__ */n(r,{name:"crop-right","aria-hidden":"true",className:s}),bottom:/* @__PURE__ */n(r,{name:"crop-bottom","aria-hidden":"true",className:s}),left:/* @__PURE__ */n(r,{name:"crop-left","aria-hidden":"true",className:s}),vertical:/* @__PURE__ */n(r,{name:"crop-y","aria-hidden":"true",className:s}),horizontal:/* @__PURE__ */n(r,{name:"crop-left-right","aria-hidden":"true",className:s})}},m=/* @__PURE__ */n(r,{name:"sides-each","aria-hidden":"true",className:"h-4 w-4"});var c=(e,a,t)=>null===e[t]?a[t]:String(e[t]);function h(e,a){const t=t=>c(e,a,t);return t("left")!==t("right")||t("top")!==t("bottom")}function p({label:t,value:r,onChange:i,each:s,placeholder:m,words:h,min:p=0,max:u=200,step:g=4,readOnly:f,glyphs:b="padding",units:N}){const v=l[b],x=(t,o,d)=>{const s=function(e,a){const t=a.map(a=>e[a]);return t.every(e=>e===t[0])?t[0]:"mixed"}(r,t),l=t.map(e=>c(r,m,e)),b="mixed"!==s&&l.every(e=>e===l[0])?l[0]:"–";/* @__PURE__ */
|
|
2
|
+
return n("div",{"data-side":t.join("-"),className:"min-w-0",children:/* @__PURE__ */n(e,{value:"mixed"===s?null:s,onChange:e=>((e,a)=>{const t={...r};for(const r of e)t[r]=a;i(t)})(t,e),min:p,max:u,step:g,snap:!0,...a(g),steppers:"compact",readOnly:f,placeholder:b,prefix:d,suffix:h.unit,units:N,"aria-label":o})})};/* @__PURE__ */
|
|
3
|
+
return n("div",{role:"group","aria-label":t,"data-sides":s?"each":"pairs",className:"grid min-w-0 grid-cols-2 gap-2",children:/* @__PURE__ */o(d,s?{children:[x(["left"],h.sides.left,v.left),x(["top"],h.sides.top,v.top),x(["right"],h.sides.right,v.right),x(["bottom"],h.sides.bottom,v.bottom)]}:{children:[x(["left","right"],h.horizontal,v.horizontal),x(["top","bottom"],h.vertical,v.vertical)]})})}function u({each:e,onChange:a,label:r,disabled:o}){/* @__PURE__ */
|
|
4
|
+
return n(i,{content:r,children:/* @__PURE__ */n(t,{size:"md","aria-label":r,"aria-pressed":e,disabled:o,onClick:()=>a(!e),children:m})})}export{u as SidesEachToggle,p as SidesInput,h as sidesStartEach};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var r="12.21.0",a=r;export{a as APP_VERSION,r as VERSION};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import{DropdownMenu as e,TRIGGER_CLASS as n}from"./chunk-SFULX4E3.js";import{Tooltip as a}from"./chunk-SOZCWT6I.js";import{jsx as i,jsxs as l}from"react/jsx-runtime";function t(e,n,a){if(n&&!(n.options.length<2))/* @__PURE__ */
|
|
2
|
+
return i(s,{value:e,options:n.options,onChange:n.onChange,label:n.label,disabled:a})}var r=`${n} -ml-1 h-6 px-1 text-xs`;function s({value:n,options:t,onChange:s,label:o,disabled:c}){
|
|
3
|
+
/* @__PURE__ */
|
|
4
|
+
return i(a,{content:o,describe:!1,children:/* @__PURE__ */i(e,{trigger:
|
|
5
|
+
/* @__PURE__ */l("span",{className:"inline-grid justify-items-end",children:[t.includes(n)?null:/* @__PURE__ */i("span",{className:"col-start-1 row-start-1",children:n}),t.map(e=>/* @__PURE__ */i("span",{className:"col-start-1 row-start-1"+(e===n?"":" invisible"),children:e},e))]}),"aria-label":`${o}: ${n}`,align:"end",minWidth:0,disabled:c,triggerClassName:r,items:t.map(e=>({type:"radio",key:e,label:e,checked:e===n,mark:"colour",onSelect:()=>{e!==n&&s(e)}}))})})}export{s as UnitMenu,t as unitBox};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import{SearchableSelect as e}from"./chunk-ZQ24H5UO.js";import{
|
|
2
|
-
return f(e,{"aria-label":
|
|
3
|
-
return f(
|
|
1
|
+
import{SearchableSelect as e}from"./chunk-ZQ24H5UO.js";import{Select_default as a}from"./chunk-TM4CRQ3W.js";import{labelClasses as l}from"./chunk-EQKUFYX6.js";import{isSafeLinkHref as t}from"./chunk-Z5TE3MEG.js";import{Input_default as r}from"./chunk-6RK6R3RY.js";import{INPUT_SIZES as n}from"./chunk-AYZY3YNC.js";import{Button_default as i}from"./chunk-EVYD6UFQ.js";import{Icon as o}from"./chunk-XZXFUZIK.js";import{registerModalEscapeInterceptor as s}from"./chunk-TWVUQUUD.js";import{useShellStrings as u}from"./chunk-JSHMIMAJ.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:C,readOnly:N,placeholder:F,className:j="",tidyAddress:O,addressAddon:E}=t,$=void 0!==t.onApply,A=u().link,T=y.isSafe??k,U=d(),z=c(null),M=c(null),[R,Y]=p({url:n}),D=$?R.url:n,[K,Q]=p(!1),[Z,W]=p(null),[H,P]=p(null),[S,X]=p(!1),B=c(null),I=c(()=>{});I.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))&&(I.current(),!0)},()=>z.current)},[$]),m(()=>{if(!$)return;const e=M.current;e?(e.focus(),e.select()):z.current?.querySelector("button, input")?.focus()},[]);const J=o??[{value:b,label:A.address,target:{type:"text"}}],L=Z&&Z.against===D?Z.kind:y.kindOf(D),V=J.filter(e=>!e.hideWhenEmpty||h(e.target).length>0||e.value===L),q=V.find(e=>"text"===e.target.type),G=V.find(e=>e.value===L)??q??V[0];if(!G)return null;const _="text"!==G.target.type,ee=_?y.targetOf(D):D,ae=h(G.target),le=ae.find(e=>e.value===ee),te=e=>({value:e,label:A.unavailable(e)}),re="select"===G.target.type&&ee&&w?w(ee):null,ne=re?y.readFilter(D):null,ie=ne?re?.find(e=>e.param===ne.param):void 0,oe=H&&H.against===D?H.text:D,se=_?D:O?O(oe.trim()).trim():oe.trim(),ue=$&&O?se:oe,de=!_&&""!==ue.trim()&&!T(ue),ce=de&&(!$||K);_&&S&&X(!1);const pe=(e,a)=>{$?Y({url:e,name:a}):void 0===a?t.onChange(e):t.onChange(e,a)},me=(e,a)=>{W(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=>{Q(!1);const a=e.trim();a?T(e)?(P({text:e,against:a}),me(a)):P({text:e,against:D}):(P({text:e,against:""}),me(""))},ge=e=>{const a=e.relatedTarget;if(a&&(a===M.current||B.current?.contains(a)))return;if(X(!1),$||!O||N)return;const l=O(oe.trim());l.trim()!==oe.trim()&&ve(l)},he=()=>{if(!$||!se)return;if(!_&&de)return void Q(!0);const e=_&&R.url===se?R.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=(l,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 a=r.some(e=>""===e.value);/* @__PURE__ */
|
|
2
|
+
return f(e,{"aria-label":l,value:t,options:o,disabled:N,clearable:a,placeholder:r.find(e=>""===e.value)?.label,onChange:n})}/* @__PURE__ */
|
|
3
|
+
return f(a,{size:"sm","aria-label":l,value:t,options:o,readOnly:N,onChange:n})};let ke;if("text"===G.target.type)ke=/* @__PURE__ */f(r,{ref:M,id:`${U}-address`,size:"sm",type:"text",invalid:ce,"aria-label":A.address,"aria-describedby":ce?`${U}-why`:void 0,placeholder:F??A.addressPlaceholder,spellCheck:!1,autoComplete:"off",value:oe,readOnly:N,onChange:e=>ve(e.target.value),onFocus:()=>X(!0),onBlur:ge,onKeyDown:O&&!$?e=>{"Enter"===e.key&&e.currentTarget.blur()}:void 0});else{const e="groups"===G.target.type?G.target.groups.flatMap(e=>e.options.map(a=>({value:a.value,label:a.label,group:e.label}))):G.target.options.map(e=>({value:e.value,label:e.label})),a=[{value:"",label:G.target.placeholder},...be(e,ee)];ke=xe(G.label,ee,a,fe,e.length>10)}const ye=/* @__PURE__ */v(g,{children:[o&&xe(A.linkType,G.value,V.map(e=>({value:e.value,label:e.label})),e=>{P(null),Q(!1);const a=V.find(a=>a.value===e);if(!a||"text"===a.target.type)return void W({kind:e,against:D});const l=h(a.target)[0];W({kind:e,against:l?l.value:""}),l?pe(l.value,l.label):pe("")},!1),ke,E&&S&&!N&&"text"===G.target.type&&/* @__PURE__ */f("div",{ref:B,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:`${U}-why`,role:"alert",className:"text-2xs leading-4 text-red-600",children:A.unsafe}),G.hint&&/* @__PURE__ */f("p",{className:"text-2xs leading-4 text-ink-faintest",children:G.hint}),re&&/* @__PURE__ */f("p",{className:"text-2xs leading-4 text-ink-faintest",children:A.filterHint})]});if(!$)/* @__PURE__ */
|
|
4
4
|
return f("div",{ref:z,className:`flex min-w-0 flex-auto flex-col gap-2 ${j}`.trim(),role:C?"group":void 0,"aria-label":C,children:ye});const we=t.onRemove;/* @__PURE__ */
|
|
5
|
-
return v("div",{ref:z,role:"dialog","aria-label":C??A.title,className:`flex min-w-0 flex-col gap-2 rounded-xl border border-line bg-surface p-3 shadow-lg ${j}`.trim(),onKeyDown:e=>{"Enter"!==e.key||e.defaultPrevented||e.target instanceof Element&&e.target.closest("button")||(e.preventDefault(),he())},children:[_?/* @__PURE__ */f("span",{className:
|
|
5
|
+
return v("div",{ref:z,role:"dialog","aria-label":C??A.title,className:`flex min-w-0 flex-col gap-2 rounded-xl border border-line bg-surface p-3 shadow-lg ${j}`.trim(),onKeyDown:e=>{"Enter"!==e.key||e.defaultPrevented||e.target instanceof Element&&e.target.closest("button")||(e.preventDefault(),he())},children:[_?/* @__PURE__ */f("span",{className:l({inline:!0}),children:A.title}):/* @__PURE__ */f("label",{htmlFor:`${U}-address`,className:l({inline:!0}),children:A.title}),ye,
|
|
6
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
8
|
/* @__PURE__ */f(i,{variant:"secondary",size:"sm","data-window-action":"cancel",onClick:()=>I.current(),children:A.cancel}),
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import{InputNumber_default as e,stepRounding as r}from"./chunk-LBKKKZ4M.js";import{IconButton_default as a}from"./chunk-SV5RRBVA.js";import{Icon as i}from"./chunk-XZXFUZIK.js";import{Tooltip as n}from"./chunk-SOZCWT6I.js";import{useShellStrings as l}from"./chunk-JSHMIMAJ.js";import{useState as t,useRef as o}from"react";import{jsxs as s,jsx as d}from"react/jsx-runtime";var u={tl:"",tr:"rotate-90",br:"rotate-180",bl:"-rotate-90"},c=["tl","tr","bl","br"];function m({label:m,value:f,corners:p,onChange:h,radius:v=null,onRadiusChange:b,radiusLabel:k,radiusMin:g=0,radiusMax:x,radiusStep:w=1,radiusPlaceholder:y,radiusUnit:A,units:K,disabled:j=!1,disabledReason:M,id:R,className:C=""}){const I=l(),N=function(e){const r=c.map(r=>e.find(e=>e.value===r));for(const a of e){if(c.includes(a.value))continue;const e=r.findIndex(e=>void 0===e);-1===e?r.push(a):r[e]=a}return r.filter(e=>void 0!==e)}(p),[S,Z]=t(0),B=o(null);/* @__PURE__ */
|
|
2
|
+
return s("div",{id:R,role:"group","aria-label":m,className:`flex min-w-0 flex-wrap items-center gap-2 ${C}`.trim(),children:[b&&
|
|
3
|
+
/* @__PURE__ */d("div",{className:"w-30 shrink-0",children:/* @__PURE__ */d(e,{value:v,onChange:b,min:g,max:x,step:w,...r(w),placeholder:y,prefix:/* @__PURE__ */d("span",{"data-radius-mark":"","aria-hidden":"true",children:I.corners.radiusMark}),suffix:A??I.corners.unit,units:K,steppers:"compact",disabled:j,"aria-label":k??I.corners.radius})}),
|
|
4
|
+
/* @__PURE__ */d("div",{ref:B,"data-corners-grid":"",className:"grid shrink-0 grid-cols-2 gap-1",onKeyDown:e=>{if(e.altKey||e.ctrlKey||e.metaKey)return;const r=Array.from(B.current?.querySelectorAll("button[data-corner]")??[]),a=r.indexOf(document.activeElement);if(-1===a)return;const i=a%2,n=Math.floor(a/2),l="ArrowRight"===e.key?2*n+1:"ArrowLeft"===e.key?2*n:"ArrowDown"===e.key?2+i:"ArrowUp"===e.key?i:null;null!==l&&(e.preventDefault(),l<r.length&&r[l].focus())},children:N.map((e,r)=>{const l=f.includes(e.value),t=j||!0===e.disabled,o=t&&(!0===e.disabled&&e.title||(j?M:void 0))||void 0,s=/* @__PURE__ */d(a,{"aria-pressed":l,"aria-label":e.label,"aria-disabled":t||void 0,disabledReason:o,"data-corner":e.value,size:"sm",tabIndex:r===S?0:-1,onFocus:()=>Z(r),onClick:()=>{t||h(l?f.filter(r=>r!==e.value):[...f,e.value])},children:/* @__PURE__ */d(i,{name:"corner",strokeWidth:2,className:["h-4 w-4",u[e.value]??""].filter(Boolean).join(" ")})},e.value);return o?s:/* @__PURE__ */d(n,{content:e.title??e.label,children:s},e.value)})})]})}export{m as CornersInput};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{setBoundaryErrorReporter as e}from"./chunk-KNUR2UEG.js";import{VERSION as t}from"./chunk-L4QGZ26E.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)}},E=class{l},C=e=>{document.prerendering?addEventListener("prerenderingchange",e,!0):e()},L=[1800,3e3],P=(e,t={})=>{const n=w(t);C(()=>{const s=p(t,E),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,Z=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})}},F=[200,500],R=(e,t={})=>{if(!globalThis.PerformanceEventTiming||!("interactionId"in PerformanceEventTiming.prototype))return;const n=h();C(()=>{"interactionCount"in performance||m||(m=T(["event"],M,{durationThreshold:0}));let o,s=g("INP");const c=p(t,Z),d=(n,i,a,d,l)=>{c.M(),s=g("INP",-1,n,i,a,d,l),o=r(e,s,F,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,F,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?C(()=>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);C(()=>{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-TLNZ5KEO.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)}},E=class{l},C=e=>{document.prerendering?addEventListener("prerenderingchange",e,!0):e()},L=[1800,3e3],P=(e,t={})=>{const n=w(t);C(()=>{const s=p(t,E),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,Z=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})}},F=[200,500],R=(e,t={})=>{if(!globalThis.PerformanceEventTiming||!("interactionId"in PerformanceEventTiming.prototype))return;const n=h();C(()=>{"interactionCount"in performance||m||(m=T(["event"],M,{durationThreshold:0}));let o,s=g("INP");const c=p(t,Z),d=(n,i,a,d,l)=>{c.M(),s=g("INP",-1,n,i,a,d,l),o=r(e,s,F,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,F,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],N=[800,1800],B=e=>{document.prerendering?C(()=>B(e)):"complete"!==document.readyState?addEventListener("load",()=>B(e),!0):setTimeout(e)};var O=/^[A-Za-z0-9/_:.\-[\]{}*@~]+$/,U=/^[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}},K=/[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,}/g,J=/\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&&U.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("//")&&O.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);C(()=>{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,N,t.reportAllChanges);B(()=>{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,N,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,N,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(K,"[redacted]").replace(J,"[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,6 +1,6 @@
|
|
|
1
|
-
import{resolveColumnShares as e,COLUMN_SHARES_EQUAL as t,COLUMN_SHARE_MIN as r,COLUMN_COUNT_MAX as n}from"./chunk-PLGJOHEG.js";import{InputNumber_default as o}from"./chunk-
|
|
2
|
-
return h("div",{role:"group","aria-label":N?void 0:C,"aria-labelledby":N,"aria-describedby":
|
|
1
|
+
import{resolveColumnShares as e,COLUMN_SHARES_EQUAL as t,COLUMN_SHARE_MIN as r,COLUMN_COUNT_MAX as n}from"./chunk-PLGJOHEG.js";import{InputNumber_default as o}from"./chunk-LBKKKZ4M.js";import{Tooltip as i}from"./chunk-SOZCWT6I.js";import{useShellStrings as l}from"./chunk-JSHMIMAJ.js";import{useId as a,useRef as s,useState as c,useEffect as u,Fragment as d}from"react";import{jsxs as h,jsx as f}from"react/jsx-runtime";var m=(e,t,r)=>Math.min(r,Math.max(t,e)),p=e=>e.reduce((e,t)=>e+t,0),v=(e,t)=>e.length===t.length&&e.every((e,r)=>e===t[r]);var g,b="w-0.5",y=`${b} group-hover/widths:w-1 group-focus-visible/widths:w-1`;var w=["text-blue-700","text-gray-600"];function x({count:x,value:$,onChange:k,label:C,"aria-labelledby":N,readOnly:P=!1,disabled:M=!1,className:j=""}){const K=l().widths,R=a(),S=m(Math.round(x)||1,1,n),z=e($,S),A=z??[...t[S]??[]],B=[...A,100-p(A)],O=P||M,T=s(null),D=s({onChange:k,shown:A,locked:O,n:S,stored:z});D.current={onChange:k,shown:A,locked:O,n:S,stored:z};const I=t=>{const{onChange:r,shown:n,locked:o,n:i}=D.current;if(o)return!1;const l=e(t,i);return!(!l||v(l,n))&&(r(l),!0)},E=(e,t,n)=>{const o=e[t]+e[t+1],i=[...e];i[t]=m(Math.round(n),r,o-r),i[t+1]=o-i[t],I(i.slice(0,-1))&&(ne.current=null)},H=e=>t=>{if(t.altKey||t.ctrlKey||t.metaKey)return;const n=t.shiftKey?10:1,o=B[e]+B[e+1],i="ArrowRight"===t.key?B[e]+n:"ArrowLeft"===t.key?B[e]-n:"PageUp"===t.key?B[e]+10:"PageDown"===t.key?B[e]-10:"Home"===t.key?r:"End"===t.key?o-r:null;null!==i&&(t.preventDefault(),E(B,e,i))},L=s(null),[J,W]=c(null),F=()=>{L.current=null,W(null),document.body.style.removeProperty("cursor"),document.body.style.removeProperty("user-select")};u(()=>F,[]);const G=e=>t=>{if(0!==t.button||O)return;t.preventDefault();const r=T.current?.getBoundingClientRect().width??0;r<=0||(L.current={i:e,x:t.clientX,width:r,from:B,moved:!1,pointer:t.pointerId},W(e),t.currentTarget.setPointerCapture?.(t.pointerId),document.body.style.cursor="col-resize",document.body.style.userSelect="none")},U=e=>{const t=L.current;if(!t)return;if(0===e.buttons)return void F();const r=e.clientX-t.x;if(!t.moved){if(Math.abs(r)<3)return;t.moved=!0}E(t.from,t.i,t.from[t.i]+r/t.width*100)},X=e=>{const t=L.current;t&&(e.currentTarget.hasPointerCapture?.(t.pointer)&&e.currentTarget.releasePointerCapture(t.pointer),F())},Z=(e,t)=>{const{shown:n}=D.current,o=function(e,t,n){const o=e.length,i=[...e];if(o<2)return i;const l=m(Math.round(n),r,100-(o-1)*r);let a=l-i[t];i[t]=l;const s=[...Array.from({length:o-1-t},(e,r)=>t+1+r),...Array.from({length:t},(e,r)=>t-1-r)];if(a<0)return i[s[0]]-=a,i;for(const e of s){if(a<=0)break;const t=Math.min(a,i[e]-r);i[e]-=t,a-=t}return i}([...n,100-p(n)],e,t);return I(o.slice(0,-1))?o:null},[q,V]=c(0);u(()=>{const e=T.current;if(!e||"undefined"==typeof ResizeObserver)return;const t=new ResizeObserver(()=>V(e.getBoundingClientRect().width));return t.observe(e),()=>t.disconnect()},[]);const Q=s(null),[Y,_]=c(null),[ee,te]=c([]),re=(e,t)=>_(r=>t?e:r===e?null:r),ne=s(null),oe=(e,t)=>{const r=ne.current;if(!r||r.column!==e||r.share!==t)return!1;const{onChange:n,locked:o,stored:i}=D.current;var l,a;return o||(l=i,a=r.stored,void 0===l||void 0===a?l===a:v(l,a))||n(r.stored),!0},ie=B.join(",");u(()=>{const e=null===Y?[]:function(e,t){if(!e)return[];const r=Array.from(e.querySelectorAll("input[data-widths-label]")),n=r[t]?.getBoundingClientRect();if(!n||0===n.width)return[];if(void 0===g&&(g=document.createElement("canvas").getContext("2d")),!g)return[];const o=g;return r.flatMap((e,r)=>{if(r===t)return[];const i=e.getBoundingClientRect(),l=getComputedStyle(e);o.font=`${l.fontWeight} ${l.fontSize} ${l.fontFamily}`;const a=o.measureText(e.value).width/2,s=(i.left+i.right)/2;return s+a>n.left&&s-a<n.right?[r]:[]})}(Q.current,Y);te(t=>v(t,e)?t:e)},[Y,ie,q]);const le=K.hint(S,r),ae=B.slice(0,-1).map((e,t)=>p(B.slice(0,t+1)));/* @__PURE__ */
|
|
2
|
+
return h("div",{role:"group","aria-label":N?void 0:C,"aria-labelledby":N,"aria-describedby":S>1?R:void 0,className:`flex w-full min-w-0 flex-col gap-2 ${M?"opacity-60":""} ${j}`.trim(),children:[
|
|
3
3
|
/* @__PURE__ */h("div",{ref:Q,"data-widths-bar":"",className:"relative h-8",children:[
|
|
4
|
-
/* @__PURE__ */f("div",{ref:T,"data-widths-track":"",className:"flex h-full w-full overflow-hidden rounded-(--radius-control) bg-surface",children:B.map((e,t)=>/* @__PURE__ */f("div",{"data-widths-segment":"",style:{flexBasis:`${e}%`},className:`flex min-w-0 shrink-0 grow-0 items-center justify-center overflow-hidden whitespace-nowrap text-xs font-medium tabular-nums ${w[t%2]} ${t%2==0?"bg-accent-tint":""}`,children:1===
|
|
5
|
-
/* @__PURE__ */f("div",{"aria-hidden":"true",className:"pointer-events-none absolute inset-0 rounded-(--radius-control) border border-line-strong"}),
|
|
6
|
-
return f("div",{"data-widths-tip":"",className:"absolute inset-y-0 "+(n?"z-20":""),style:{left:`clamp(0px, calc(${l+e/2}% - ${a} / 2), calc(100% - ${a}))`,width:a},children:/* @__PURE__ */f(i,{content:le,delay:600,describe:!1,className:"absolute inset-0",children:/* @__PURE__ */f(o,{appearance:"bare",value:e,display:()=>(e=>
|
|
4
|
+
/* @__PURE__ */f("div",{ref:T,"data-widths-track":"",className:"flex h-full w-full overflow-hidden rounded-(--radius-control) bg-surface",children:B.map((e,t)=>/* @__PURE__ */f("div",{"data-widths-segment":"",style:{flexBasis:`${e}%`},className:`flex min-w-0 shrink-0 grow-0 items-center justify-center overflow-hidden whitespace-nowrap text-xs font-medium tabular-nums ${w[t%2]} ${t%2==0?"bg-accent-tint":""}`,children:1===S&&/* @__PURE__ */f("span",{"data-widths-label":"",children:`${e}%`})},t))}),
|
|
5
|
+
/* @__PURE__ */f("div",{"aria-hidden":"true",className:"pointer-events-none absolute inset-0 rounded-(--radius-control) border border-line-strong"}),S>1&&B.map((e,t)=>/* @__PURE__ */h(d,{children:[(()=>{const n=Y===t,l=p(B.slice(0,t)),a=n?`max(${e}%, 40px)`:`${e}%`;/* @__PURE__ */
|
|
6
|
+
return f("div",{"data-widths-tip":"",className:"absolute inset-y-0 "+(n?"z-20":""),style:{left:`clamp(0px, calc(${l+e/2}% - ${a} / 2), calc(100% - ${a}))`,width:a},children:/* @__PURE__ */f(i,{content:le,delay:600,describe:!1,className:"absolute inset-0",children:/* @__PURE__ */f(o,{appearance:"bare",value:e,display:()=>(e=>q>0&&q*e/100<36?String(e):`${e}%`)(e),suffix:"%",min:r,max:100-(S-1)*r,step:1,shiftStep:10,precision:0,allowEmpty:!1,reportWhileTyping:!1,readOnly:P,disabled:M,"aria-label":K.column(t+1),"aria-describedby":R,"data-widths-label":"",onChange:e=>{null===e||oe(t,e)||Z(t,e)},onRevert:e=>((e,t)=>{D.current.locked||null===t||oe(e,t)||Z(e,t)})(t,e),onFocus:()=>{ne.current={column:t,share:e,stored:D.current.stored},re(t,!0)},onBlur:()=>re(t,!1),className:`absolute inset-0 text-xs font-medium ${w[t%2]} ${ee.includes(t)&&!n?"opacity-0":""}`})})})})(),t<S-1&&/* @__PURE__ */f("div",{className:"absolute inset-y-0 z-10 w-3 -translate-x-1/2",style:{left:`${ae[t]}%`},children:/* @__PURE__ */f(i,{content:K.dragHint,delay:600,className:"relative flex h-full w-full",children:/* @__PURE__ */f("div",{role:"separator",tabIndex:M?-1:0,"aria-orientation":"vertical","aria-label":K.divider(t+1,t+2),"aria-valuenow":B[t],"aria-valuemin":r,"aria-valuemax":B[t]+B[t+1]-r,"aria-valuetext":K.dividerValue(t+1,B[t],t+2,B[t+1]),"aria-disabled":O||void 0,onKeyDown:O?void 0:H(t),onPointerDown:G(t),onPointerMove:U,onPointerUp:X,onPointerCancel:X,onLostPointerCapture:()=>{L.current&&F()},className:"group/widths flex h-full w-full touch-none justify-center rounded-(--radius-control) rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)] "+(O?"cursor-default":"cursor-col-resize"),children:/* @__PURE__ */f("span",{"aria-hidden":"true","data-widths-line":"",className:"h-full rounded-full "+(O?`${b} bg-gray-300`:`bg-accent-fill transition-[width,background-color] duration-(--motion-fast) group-hover/widths:bg-blue-700 ${J===t?"w-1":y}`)})})})})]},t))]}),S>1&&/* @__PURE__ */f("span",{id:R,className:"sr-only",children:le})]})}export{x as WidthsBar};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{IconPicker as e}from"./chunk-X34ZBXIU.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:[
|
|
1
|
+
import{IconPicker as e}from"./chunk-X34ZBXIU.js";import{ColorPicker as t}from"./chunk-MEN4B6NP.js";import{InputNumber_default as r,stepRounding as l}from"./chunk-LBKKKZ4M.js";import{BORDER_LINE_STYLES as o}from"./chunk-NOMWJTN2.js";import{Icon as a}from"./chunk-XZXFUZIK.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:N=0,max:v=20,step:x=1,readOnly:j,units:k}){const S=e=>"number"==typeof m[e]?m[e]:null,C=(e,t)=>{const r={...m};if("number"==typeof m.width)for(const e of d)null===S(e)&&(r[e]=m.width);r[e]=t,delete r.width,h(r)},K=(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:N,max:v,step:x,...l(x),steppers:"compact",readOnly:j,placeholder:i,prefix:o,suffix:w.unit,units:k,"aria-label":t})}),O=d.map(S),X="number"==typeof m.width?m.width:O.every(e=>null!==e&&e===O[0])?O[0]:null,Z=null===X&&O.some(e=>null!==e),B=d.every(e=>f.sides[e]===f.sides.top)?String(f.sides.top):"–",I=e=>S(e)??("number"==typeof m.width?m.width:null),M=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:[K("left",w.sides.left,u.left,I("left"),String(f.sides.left),e=>C("left",e)),K("top",w.sides.top,u.top,I("top"),String(f.sides.top),e=>C("top",e)),K("right",w.sides.right,u.right,I("right"),String(f.sides.right),e=>C("right",e)),K("bottom",w.sides.bottom,u.bottom,I("bottom"),String(f.sides.bottom),e=>C("bottom",e))]}):K("all",w.width,u.all,X,Z?"–":B,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:M,disabled:j,onChange:e=>{j||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=>{j||h({...m,color:e})},label:w.color,presets:b,fallback:f.color,showHexInput:!0,size:"md",disabled:j})})]})}export{f as BorderInput,m as borderSides,h as borderStartEach};
|
package/dist/format/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{slugify}from"../chunk-24AL3CDS.js";export{ENTRANCE_ATTR,ENTRANCE_FROM,ENTRANCE_FROM_ATTR,ENTRANCE_FROM_DEFAULT,ENTRANCE_KINDS,ENTRANCE_KINDS_WITH_FROM,ENTRANCE_STATE_ATTR,armEntrance,entranceAttrs,playEntrance,readEntrance}from"../chunk-Q2SCJQ5H.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{
|
|
1
|
+
export{slugify}from"../chunk-24AL3CDS.js";export{ENTRANCE_ATTR,ENTRANCE_FROM,ENTRANCE_FROM_ATTR,ENTRANCE_FROM_DEFAULT,ENTRANCE_KINDS,ENTRANCE_KINDS_WITH_FROM,ENTRANCE_STATE_ATTR,armEntrance,entranceAttrs,playEntrance,readEntrance}from"../chunk-Q2SCJQ5H.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{BORDER_LINE_STYLES}from"../chunk-NOMWJTN2.js";export{contrastRatio,hexToRgb,parseHexColor,readableInk,relativeLuminance}from"../chunk-S6OB6HJB.js";export{FOCAL_DEFAULT,FOCAL_NUDGE_COARSE,FOCAL_NUDGE_STEP,focalFromRect,formatFocal,nudgeFocal,parseFocal}from"../chunk-25RR3GQW.js";export{fromDateKey,toDateKey}from"../chunk-2HMNOLKX.js";export{escapeHtml}from"../chunk-G6DKCCWH.js";export{currencyDecimals,currencySymbol,formatBytes,formatMoney,setCurrencyFormats,timeAgo}from"../chunk-GEYM4WN3.js";export{DATE_FORMAT_OPTIONS,TZ_AUTO,formatDate,formatDateTime,formatTime,getUserDateFormat,getUserTimezone,setUserDateFormat,setUserTimezone,syncTimezoneFromProfile}from"../chunk-Y3JW2GW5.js";export{EMPTY_VALUE}from"../chunk-36BRD5J3.js";import"../chunk-LF27WIN2.js";export{ROOT_THEME_ATTRIBUTES,rootIsDark,watchRootTheme}from"../chunk-LNXBTK7Q.js";var t=["none","zoom-in","zoom-out","fade-in","fade-out","move-up","move-down","reveal","parallax"],e=["zoom-in","zoom-out"],o=(t,e,o,n)=>({default:t,min:e,max:o,step:n}),n=o(30,0,100,10),r=o(0,0,100,5),i=o(100,0,100,5),s=o(2,0,4,.5),a="data-motion-scroll",m="data-motion-pin",u="data-motion-pin-frame",c=["track","stick"],l=/^\s*-?\d+(\.\d+)?\s*$/;function f(t,e){const o="number"==typeof e?e:"string"==typeof e&&l.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 h(e,o,s,a){const m=t.includes(e)?e:"none",u=f(r,s),c=f(i,a);return{effect:m,zoom:f(n,o),start:Math.min(u,c),end:Math.max(u,c)}}function p(t,o){if("none"===t.effect)return{attrs:{},style:{}};const n={};var s;return s=t.effect,e.includes(s)&&(n["--motion-zoom"]=String(Number((1+t.zoom/100).toFixed(3))),o&&(n["--motion-origin"]=o)),t.start!==r.default&&(n["--motion-scroll-start"]=String(t.start)),t.end!==i.default&&(n["--motion-scroll-end"]=String(t.end)),{attrs:{[a]:t.effect},style:n}}function d(t,e){return{on:!0===t,length:f(s,e)}}function T(t,e="track"){if(!t.on)return{attrs:{},style:{}};if("stick"===e)return{attrs:{[m]:"stick"},style:{}};const o=t.length===s.default?{}:{"--motion-pin-length":String(t.length)};return{attrs:{[m]:""},style:o}}function N(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 E=(t,e)=>{const o=Number.parseFloat(t);return Number.isFinite(o)?o:e};function S(t=document){const e=()=>{};if("undefined"==typeof window||"undefined"==typeof CSS)return e;if(CSS.supports("animation-timeline: view()"))return e;let o=0;const n=()=>{o=0;const e=window.innerHeight||document.documentElement.clientHeight,n=[];for(const o of t.querySelectorAll(`[${a}]`)){if(o.hasAttribute("data-motion-entrance"))continue;const t=getComputedStyle(o),a=o.closest(`[${m}]:not([${m}="stick"])`),c=a?getComputedStyle(a):null,l=!!c&&0===E(c.getPropertyValue("--motion-pin-on"),1),f=g(l&&a?a:o,e),h=a?.querySelector(`[${u}]`),p=a&&!l?{...g(a,e),length:E(c.getPropertyValue("--motion-pin-length"),s.default),stop:h?E(getComputedStyle(h).top,0):0}:null;n.push({el:o,p:N({top:f.top,height:f.height,vh:e},p,E(t.getPropertyValue("--motion-scroll-start"),r.default),E(t.getPropertyValue("--motion-scroll-end"),i.default))})}for(const{el:t,p:e}of n)t.style.setProperty("--motion-p",String(e))},c=()=>{o||(o=requestAnimationFrame(n))};return n(),window.addEventListener("scroll",c,{passive:!0}),window.addEventListener("resize",c,{passive:!0}),()=>{o&&cancelAnimationFrame(o),window.removeEventListener("scroll",c),window.removeEventListener("resize",c)}}function g(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 w=["none","nextImage","rotate","zoom","lift","mono"];function x(t){return w.filter(e=>t.includes(e))}export{w as HOVER_KINDS,m as PIN_ATTR,c as PIN_FORMS,u as PIN_FRAME_ATTR,s as PIN_LENGTH,a as SCROLL_ATTR,t as SCROLL_EFFECTS,e as SCROLL_EFFECTS_WITH_ZOOM,i as SCROLL_END,r as SCROLL_START,n as SCROLL_ZOOM,S as armScrollProgress,x as hoverKindsOf,g as layoutBox,T as pinAttrs,d as readPin,h as readScroll,p as scrollAttrs,N as scrollProgress};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
import { ColorPreset } from './ColorPicker.js';
|
|
3
|
+
import { UnitChoice } from './UnitMenu.js';
|
|
3
4
|
import { Side } from './SidesInput.js';
|
|
4
5
|
import { a as BorderLineStyle } from '../borderLineStyles-C-W0uSzL.js';
|
|
5
6
|
export { B as BORDER_LINE_STYLES } from '../borderLineStyles-C-W0uSzL.js';
|
|
@@ -60,7 +61,12 @@ interface BorderInputProps {
|
|
|
60
61
|
max?: number;
|
|
61
62
|
step?: number;
|
|
62
63
|
readOnly?: boolean;
|
|
64
|
+
/**
|
|
65
|
+
* The units this row offers (`UnitChoice`): the unit in the box becomes the
|
|
66
|
+
* one unit menu (`unitBox`). Left out, or one unit, it is plain text.
|
|
67
|
+
*/
|
|
68
|
+
units?: UnitChoice;
|
|
63
69
|
}
|
|
64
|
-
declare function BorderInput({ label, value, onChange, each, placeholder, presets, words, widths, styles, min, max, step, readOnly, }: BorderInputProps): react_jsx_runtime.JSX.Element;
|
|
70
|
+
declare function BorderInput({ label, value, onChange, each, placeholder, presets, words, widths, styles, min, max, step, readOnly, units, }: BorderInputProps): react_jsx_runtime.JSX.Element;
|
|
65
71
|
|
|
66
72
|
export { type BorderInputProps, BorderLineStyle, type BorderValue, borderSides, borderStartEach, BorderInput as default };
|
|
@@ -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-YW3UKSON.js";import"../chunk-X34ZBXIU.js";import"../chunk-MEN4B6NP.js";import"../chunk-64RHGJXK.js";import"../chunk-LBKKKZ4M.js";import"../chunk-TOVEZAIM.js";import"../chunk-2NMW66P5.js";export{BORDER_LINE_STYLES}from"../chunk-NOMWJTN2.js";import"../chunk-S6OB6HJB.js";import"../chunk-SFULX4E3.js";import"../chunk-FTMCNC66.js";import"../chunk-SV5RRBVA.js";import"../chunk-AYZY3YNC.js";import"../chunk-DWGYC7OD.js";import"../chunk-THLXDI76.js";import"../chunk-URHGHXDN.js";import"../chunk-5QFPTDQF.js";import"../chunk-M5K4AX4E.js";import"../chunk-XZXFUZIK.js";import"../chunk-J75ZT2JQ.js";import"../chunk-SOZCWT6I.js";import"../chunk-PGN5ME7B.js";import"../chunk-62LW225J.js";import"../chunk-GLUJS42B.js";import"../chunk-D65T4H6J.js";import"../chunk-UQYNPYF4.js";import"../chunk-TWVUQUUD.js";import"../chunk-5FYDNH4Y.js";import"../chunk-LNXBTK7Q.js";import"../chunk-JSHMIMAJ.js";import"../chunk-C3QOHMR6.js";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
export{BrandAssetEditor as default}from"../chunk-
|
|
2
|
+
export{BrandAssetEditor as default}from"../chunk-ME7XHU3P.js";import"../chunk-B4GCTNGM.js";import"../chunk-HNIIDDLJ.js";import"../chunk-EFKJLUYP.js";import"../chunk-232YPI2L.js";import"../chunk-6KBDNYRW.js";import"../chunk-MI67DI3H.js";import"../chunk-25RR3GQW.js";import"../chunk-VLMBXPRM.js";import"../chunk-FJVZ2W55.js";import"../chunk-V4XR4MOS.js";import"../chunk-JMGDGNM7.js";import"../chunk-EVYD6UFQ.js";import"../chunk-M5K4AX4E.js";import"../chunk-XZXFUZIK.js";import"../chunk-J75ZT2JQ.js";import"../chunk-R2VKEMZH.js";import"../chunk-G67CJAQ2.js";import"../chunk-SOZCWT6I.js";import"../chunk-PGN5ME7B.js";import"../chunk-62LW225J.js";import"../chunk-GLUJS42B.js";import"../chunk-D65T4H6J.js";import"../chunk-UQYNPYF4.js";import"../chunk-MRJKZWWV.js";import"../chunk-TWVUQUUD.js";import"../chunk-5FYDNH4Y.js";import"../chunk-LNXBTK7Q.js";import"../chunk-JSHMIMAJ.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-MEN4B6NP.js";import"../chunk-64RHGJXK.js";import"../chunk-LBKKKZ4M.js";import"../chunk-TOVEZAIM.js";import"../chunk-2NMW66P5.js";import"../chunk-S6OB6HJB.js";import"../chunk-SFULX4E3.js";import"../chunk-FTMCNC66.js";import"../chunk-SV5RRBVA.js";import"../chunk-AYZY3YNC.js";import"../chunk-DWGYC7OD.js";import"../chunk-THLXDI76.js";import"../chunk-URHGHXDN.js";import"../chunk-5QFPTDQF.js";import"../chunk-M5K4AX4E.js";import"../chunk-XZXFUZIK.js";import"../chunk-J75ZT2JQ.js";import"../chunk-SOZCWT6I.js";import"../chunk-PGN5ME7B.js";import"../chunk-62LW225J.js";import"../chunk-GLUJS42B.js";import"../chunk-D65T4H6J.js";import"../chunk-UQYNPYF4.js";import"../chunk-TWVUQUUD.js";import"../chunk-5FYDNH4Y.js";import"../chunk-LNXBTK7Q.js";import"../chunk-JSHMIMAJ.js";import"../chunk-C3QOHMR6.js";
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import { UnitChoice } from './UnitMenu.js';
|
|
3
|
+
import 'react';
|
|
2
4
|
|
|
3
5
|
/** One of the four corners {@link CornersInputProps} offers. */
|
|
4
6
|
interface CornerOption {
|
|
@@ -54,6 +56,13 @@ interface CornersInputProps {
|
|
|
54
56
|
/** What the empty radius box shows and means — the inherited number, or
|
|
55
57
|
* "Auto". A number here is where the first step starts. */
|
|
56
58
|
radiusPlaceholder?: string;
|
|
59
|
+
/** The radius's unit in force. Default: the catalogue's ("px"). */
|
|
60
|
+
radiusUnit?: string;
|
|
61
|
+
/**
|
|
62
|
+
* The units this row offers (`UnitChoice`): the radius box's unit becomes the
|
|
63
|
+
* one unit menu (`unitBox`). Left out, or one unit, it is plain text.
|
|
64
|
+
*/
|
|
65
|
+
units?: UnitChoice;
|
|
57
66
|
/**
|
|
58
67
|
* The whole row is off: the radius box is disabled and every corner is off
|
|
59
68
|
* (`aria-disabled`, so the keyboard still reaches it), the set still shown.
|
|
@@ -66,6 +75,6 @@ interface CornersInputProps {
|
|
|
66
75
|
id?: string;
|
|
67
76
|
className?: string;
|
|
68
77
|
}
|
|
69
|
-
declare function CornersInput({ label, value, corners, onChange, radius, onRadiusChange, radiusLabel, radiusMin, radiusMax, radiusStep, radiusPlaceholder, disabled, disabledReason, id, className, }: CornersInputProps): react_jsx_runtime.JSX.Element;
|
|
78
|
+
declare function CornersInput({ label, value, corners, onChange, radius, onRadiusChange, radiusLabel, radiusMin, radiusMax, radiusStep, radiusPlaceholder, radiusUnit, units, disabled, disabledReason, id, className, }: CornersInputProps): react_jsx_runtime.JSX.Element;
|
|
70
79
|
|
|
71
80
|
export { type CornerOption, type CornersInputProps, CornersInput as default };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
export{CornersInput as default}from"../chunk-
|
|
2
|
+
export{CornersInput as default}from"../chunk-WBGJ4XB7.js";import"../chunk-LBKKKZ4M.js";import"../chunk-TOVEZAIM.js";import"../chunk-2NMW66P5.js";import"../chunk-SFULX4E3.js";import"../chunk-FTMCNC66.js";import"../chunk-SV5RRBVA.js";import"../chunk-AYZY3YNC.js";import"../chunk-DWGYC7OD.js";import"../chunk-THLXDI76.js";import"../chunk-URHGHXDN.js";import"../chunk-5QFPTDQF.js";import"../chunk-M5K4AX4E.js";import"../chunk-XZXFUZIK.js";import"../chunk-J75ZT2JQ.js";import"../chunk-SOZCWT6I.js";import"../chunk-PGN5ME7B.js";import"../chunk-62LW225J.js";import"../chunk-GLUJS42B.js";import"../chunk-D65T4H6J.js";import"../chunk-UQYNPYF4.js";import"../chunk-TWVUQUUD.js";import"../chunk-5FYDNH4Y.js";import"../chunk-LNXBTK7Q.js";import"../chunk-JSHMIMAJ.js";import"../chunk-C3QOHMR6.js";
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
2
|
import { ReactNode } from 'react';
|
|
3
3
|
import { InputSize } from './styles.js';
|
|
4
|
+
import { UnitChoice } from './UnitMenu.js';
|
|
5
|
+
import 'react/jsx-runtime';
|
|
4
6
|
|
|
5
7
|
/**
|
|
6
8
|
* `box` (default): the kit's field (`inputClasses`), with its prefix, suffix
|
|
@@ -46,6 +48,16 @@ interface InputNumberProps {
|
|
|
46
48
|
* "5%" still parses; only the drawing changes.
|
|
47
49
|
*/
|
|
48
50
|
suffixControl?: ReactNode;
|
|
51
|
+
/**
|
|
52
|
+
* The units this length box offers (`UnitChoice`): the unit text in
|
|
53
|
+
* `suffix` becomes the one unit menu (`UnitMenu`, through `unitBox`). Left
|
|
54
|
+
* out, or one unit, the unit is plain text. Every length input in the kit
|
|
55
|
+
* (`Slider`, `SidesInput`, `CornersInput`, `BorderInput`, `PositionInput`)
|
|
56
|
+
* passes its own `units` here, so the menu is drawn in this one place.
|
|
57
|
+
* Needs a string `suffix` (the unit in force). An explicit `suffixControl`
|
|
58
|
+
* wins over `units`.
|
|
59
|
+
*/
|
|
60
|
+
units?: UnitChoice;
|
|
49
61
|
id?: string;
|
|
50
62
|
name?: string;
|
|
51
63
|
/** Names the field where no `<label htmlFor>` does — a value box beside a
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
export{InputNumber_default as default,stepRounding}from"../chunk-
|
|
2
|
+
export{InputNumber_default as default,stepRounding}from"../chunk-LBKKKZ4M.js";import"../chunk-TOVEZAIM.js";import"../chunk-2NMW66P5.js";import"../chunk-SFULX4E3.js";import"../chunk-FTMCNC66.js";import"../chunk-SV5RRBVA.js";import"../chunk-AYZY3YNC.js";import"../chunk-DWGYC7OD.js";import"../chunk-THLXDI76.js";import"../chunk-URHGHXDN.js";import"../chunk-5QFPTDQF.js";import"../chunk-M5K4AX4E.js";import"../chunk-XZXFUZIK.js";import"../chunk-J75ZT2JQ.js";import"../chunk-SOZCWT6I.js";import"../chunk-PGN5ME7B.js";import"../chunk-62LW225J.js";import"../chunk-GLUJS42B.js";import"../chunk-D65T4H6J.js";import"../chunk-UQYNPYF4.js";import"../chunk-TWVUQUUD.js";import"../chunk-5FYDNH4Y.js";import"../chunk-LNXBTK7Q.js";import"../chunk-JSHMIMAJ.js";import"../chunk-C3QOHMR6.js";
|
package/dist/forms/LinkPicker.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
export{TextLinkField,LinkPicker as default}from"../chunk-
|
|
2
|
+
export{TextLinkField,LinkPicker as default}from"../chunk-TUPPFC74.js";import"../chunk-ZQ24H5UO.js";import"../chunk-TM4CRQ3W.js";import"../chunk-EO5RLFRX.js";import"../chunk-GLRRX4AL.js";import"../chunk-EQKUFYX6.js";import"../chunk-2NMW66P5.js";import"../chunk-UJUTS6LJ.js";import"../chunk-Z5TE3MEG.js";import"../chunk-6RK6R3RY.js";import"../chunk-SFULX4E3.js";import"../chunk-FTMCNC66.js";import"../chunk-SV5RRBVA.js";import"../chunk-AYZY3YNC.js";import"../chunk-UGTRSRIW.js";import"../chunk-DWGYC7OD.js";import"../chunk-THLXDI76.js";import"../chunk-URHGHXDN.js";import"../chunk-5QFPTDQF.js";import"../chunk-EVYD6UFQ.js";import"../chunk-M5K4AX4E.js";import"../chunk-XZXFUZIK.js";import"../chunk-J75ZT2JQ.js";import"../chunk-R2VKEMZH.js";import"../chunk-SOZCWT6I.js";import"../chunk-PGN5ME7B.js";import"../chunk-62LW225J.js";import"../chunk-GLUJS42B.js";import"../chunk-D65T4H6J.js";import"../chunk-UQYNPYF4.js";import"../chunk-MRJKZWWV.js";import"../chunk-TWVUQUUD.js";import"../chunk-5FYDNH4Y.js";import"../chunk-LNXBTK7Q.js";import"../chunk-JSHMIMAJ.js";import"../chunk-C3QOHMR6.js";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
export{MEDIA_FILES_DRAG_TYPE,MEDIA_FILE_DRAG_TYPE,MEDIA_FOLDER_DRAG_TYPE,MediaLibrary as default,readMediaFileDrag}from"../chunk-
|
|
2
|
+
export{MEDIA_FILES_DRAG_TYPE,MEDIA_FILE_DRAG_TYPE,MEDIA_FOLDER_DRAG_TYPE,MediaLibrary as default,readMediaFileDrag}from"../chunk-JUXPKGO3.js";import"../chunk-OLCRYT3N.js";import"../chunk-RF3ZFTAU.js";import"../chunk-IC72MGON.js";import"../chunk-T2TZBTSM.js";import"../chunk-436PJFHC.js";import"../chunk-CGUMJZUB.js";import"../chunk-SACUSHVN.js";import"../chunk-UP4HLGMZ.js";import"../chunk-QMSINDXL.js";import"../chunk-VQ4X3OBR.js";import"../chunk-NOGSS432.js";import"../chunk-GEZM6ARD.js";import"../chunk-TM4CRQ3W.js";import"../chunk-EO5RLFRX.js";import"../chunk-GLRRX4AL.js";import"../chunk-OG53D3R5.js";import"../chunk-FQ4IRBMA.js";import"../chunk-2NMW66P5.js";import"../chunk-HNIIDDLJ.js";import"../chunk-EFKJLUYP.js";import"../chunk-6KBDNYRW.js";import"../chunk-VLKDWKVR.js";import"../chunk-OLFYNMTD.js";import"../chunk-LACL4MAR.js";import"../chunk-Y7KDCC6E.js";import"../chunk-CGZBDI6C.js";import"../chunk-6FZ5JTBY.js";import"../chunk-N3R6N7LG.js";import"../chunk-6RK6R3RY.js";import"../chunk-SFULX4E3.js";import"../chunk-FTMCNC66.js";import"../chunk-SV5RRBVA.js";import"../chunk-AYZY3YNC.js";import"../chunk-VLMBXPRM.js";import"../chunk-FJVZ2W55.js";import"../chunk-V4XR4MOS.js";import"../chunk-MWTCGJAI.js";import"../chunk-RIG5FEVS.js";import"../chunk-5WK56FA3.js";import"../chunk-VWGWZY7A.js";import"../chunk-7QSDPSXP.js";import"../chunk-CJHYOHMU.js";import"../chunk-F3ZOO23R.js";import"../chunk-UGTRSRIW.js";import"../chunk-DWGYC7OD.js";import"../chunk-JMGDGNM7.js";import"../chunk-THLXDI76.js";import"../chunk-URHGHXDN.js";import"../chunk-5QFPTDQF.js";import"../chunk-EVYD6UFQ.js";import"../chunk-M5K4AX4E.js";import"../chunk-XZXFUZIK.js";import"../chunk-J75ZT2JQ.js";import"../chunk-R2VKEMZH.js";import"../chunk-G67CJAQ2.js";import"../chunk-SOZCWT6I.js";import"../chunk-PGN5ME7B.js";import"../chunk-62LW225J.js";import"../chunk-GLUJS42B.js";import"../chunk-D65T4H6J.js";import"../chunk-3YBXA72C.js";import"../chunk-UQYNPYF4.js";import"../chunk-MRJKZWWV.js";import"../chunk-MAFUXCPZ.js";import"../chunk-TWVUQUUD.js";import"../chunk-5FYDNH4Y.js";import"../chunk-LNXBTK7Q.js";import"../chunk-JSHMIMAJ.js";import"../chunk-C3QOHMR6.js";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
export{MediaUploadField as default}from"../chunk-
|
|
2
|
+
export{MediaUploadField as default}from"../chunk-B4GCTNGM.js";import"../chunk-HNIIDDLJ.js";import"../chunk-EFKJLUYP.js";import"../chunk-232YPI2L.js";import"../chunk-6KBDNYRW.js";import"../chunk-25RR3GQW.js";export{mediaFileName}from"../chunk-VLMBXPRM.js";import"../chunk-FJVZ2W55.js";import"../chunk-V4XR4MOS.js";import"../chunk-JMGDGNM7.js";import"../chunk-XZXFUZIK.js";import"../chunk-J75ZT2JQ.js";import"../chunk-R2VKEMZH.js";import"../chunk-G67CJAQ2.js";import"../chunk-SOZCWT6I.js";import"../chunk-PGN5ME7B.js";import"../chunk-62LW225J.js";import"../chunk-GLUJS42B.js";import"../chunk-D65T4H6J.js";import"../chunk-MRJKZWWV.js";import"../chunk-TWVUQUUD.js";import"../chunk-5FYDNH4Y.js";import"../chunk-LNXBTK7Q.js";import"../chunk-JSHMIMAJ.js";import"../chunk-C3QOHMR6.js";
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import { UnitChoice } from './UnitMenu.js';
|
|
3
|
+
import 'react';
|
|
2
4
|
|
|
3
5
|
type PositionAxis = 'x' | 'y';
|
|
4
6
|
type PositionValue = Record<PositionAxis, number | null>;
|
|
@@ -19,7 +21,12 @@ interface PositionInputProps {
|
|
|
19
21
|
max?: number;
|
|
20
22
|
step?: number;
|
|
21
23
|
readOnly?: boolean;
|
|
24
|
+
/**
|
|
25
|
+
* The units this row offers (`UnitChoice`): the unit in the box becomes the
|
|
26
|
+
* one unit menu (`unitBox`). Left out, or one unit, it is plain text.
|
|
27
|
+
*/
|
|
28
|
+
units?: UnitChoice;
|
|
22
29
|
}
|
|
23
|
-
declare function PositionInput({ label, value, onChange, words, placeholder, min, max, step, readOnly, }: PositionInputProps): react_jsx_runtime.JSX.Element;
|
|
30
|
+
declare function PositionInput({ label, value, onChange, words, placeholder, min, max, step, readOnly, units, }: PositionInputProps): react_jsx_runtime.JSX.Element;
|
|
24
31
|
|
|
25
32
|
export { type PositionAxis, type PositionInputProps, type PositionValue, PositionInput as default };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
export{PositionInput as default}from"../chunk-
|
|
2
|
+
export{PositionInput as default}from"../chunk-G2Y5I5OR.js";import"../chunk-LBKKKZ4M.js";import"../chunk-TOVEZAIM.js";import"../chunk-2NMW66P5.js";import"../chunk-SFULX4E3.js";import"../chunk-FTMCNC66.js";import"../chunk-SV5RRBVA.js";import"../chunk-AYZY3YNC.js";import"../chunk-DWGYC7OD.js";import"../chunk-THLXDI76.js";import"../chunk-URHGHXDN.js";import"../chunk-5QFPTDQF.js";import"../chunk-M5K4AX4E.js";import"../chunk-XZXFUZIK.js";import"../chunk-J75ZT2JQ.js";import"../chunk-SOZCWT6I.js";import"../chunk-PGN5ME7B.js";import"../chunk-62LW225J.js";import"../chunk-GLUJS42B.js";import"../chunk-D65T4H6J.js";import"../chunk-UQYNPYF4.js";import"../chunk-TWVUQUUD.js";import"../chunk-5FYDNH4Y.js";import"../chunk-LNXBTK7Q.js";import"../chunk-JSHMIMAJ.js";import"../chunk-C3QOHMR6.js";
|