@yuktishaalaa/yuktai 5.3.1 → 5.3.2

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.
@@ -1 +0,0 @@
1
- var H="[data-yuktai-panel]";function B(){return typeof window<"u"&&typeof document<"u"}function Ht(t){return typeof t=="object"&&t!==null&&t.nodeType===9}function Vt(t){return t||(B()?document:null)}function Wt(t,o,n={}){return Array.from(t.querySelectorAll(o)).filter(r=>!r.closest(H)&&(n.includeHidden||V(r)))}function V(t){if(!B()||t.closest("[hidden],[aria-hidden='true']"))return!1;let o=t;for(;o;){let n=window.getComputedStyle(o);if(n.display==="none"||n.visibility==="hidden")return!1;o=o.parentElement}return!0}function h(t){return(t??"").replace(/\s+/g," ").trim()}function Yt(t,o=60){let n=h(t);return n.length>o?`${n.slice(0,o-1)}\u2026`:n}function qt(t){let o=[],n=t;for(;n&&n.nodeType===1&&o.length<4;){let r=n.tagName.toLowerCase();if(n.id&&/^[A-Za-z][\w-]*$/.test(n.id)){o.unshift(`${r}#${n.id}`);break}let e=n.parentElement;if(!e){o.unshift(r);break}let a=Array.from(e.children).filter(l=>l.tagName===n.tagName);o.unshift(a.length>1?`${r}:nth-of-type(${a.indexOf(n)+1})`:r),n=e}return o.join(" > ")}function W(t,o){return t.split(/\s+/).map(n=>h(o.getElementById(n)?.textContent)).filter(Boolean).join(" ")}function Ut(t){let o=t.ownerDocument,n=t.getAttribute("aria-labelledby");if(n){let a=W(n,o);if(a)return a}let r=h(t.getAttribute("aria-label"));if(r)return r;let e=t.tagName.toLowerCase();if(e==="input"||e==="select"||e==="textarea"){let a=t.getAttribute("id");if(a){let u=o.querySelector(`label[for="${Y(a)}"]`),d=h(u?.textContent);if(d)return d}let l=t.closest("label");if(l){let u=h(l.textContent);if(u)return u}let i=(t.getAttribute("type")??"").toLowerCase();if(i==="submit"||i==="button"||i==="reset")return h(t.getAttribute("value"))||(i==="submit"?"Submit":"");if(i==="image")return h(t.getAttribute("alt"))}if(e==="img")return h(t.getAttribute("alt"));if(e==="button"||e==="a"||t.getAttribute("role")){let a=h(t.textContent);if(a)return a;let l=Array.from(t.querySelectorAll("img[alt], svg[aria-label]")).map(i=>h(i.getAttribute("alt")??i.getAttribute("aria-label"))).filter(Boolean).join(" ");if(l)return l}return h(t.getAttribute("title"))}function Y(t){return typeof CSS<"u"&&typeof CSS.escape=="function"?CSS.escape(t):t.replace(/["\\]/g,"\\$&")}function b(t){if(!t)return null;let o=t.trim().toLowerCase();if(o==="transparent")return{r:0,g:0,b:0,a:0};let n=o.match(/^rgba?\(([^)]+)\)$/);if(n){let e=n[1].split(/[\s,/]+/).filter(Boolean),[a,l,i]=e.slice(0,3).map(Number),u=e[3],d=u===void 0?1:u.endsWith("%")?Number(u.slice(0,-1))/100:Number(u);return[a,l,i,d].some(m=>!Number.isFinite(m))?null:{r:a,g:l,b:i,a:d}}let r=o.match(/^#([0-9a-f]{3,8})$/);if(r){let e=r[1];return(e.length===3||e.length===4)&&(e=e.split("").map(a=>a+a).join("")),e.length!==6&&e.length!==8?null:{r:parseInt(e.slice(0,2),16),g:parseInt(e.slice(2,4),16),b:parseInt(e.slice(4,6),16),a:e.length===8?parseInt(e.slice(6,8),16)/255:1}}return null}function P(t,o){let n=t.a+o.a*(1-t.a);if(n===0)return{r:0,g:0,b:0,a:0};let r=(e,a)=>(e*t.a+a*o.a*(1-t.a))/n;return{r:r(t.r,o.r),g:r(t.g,o.g),b:r(t.b,o.b),a:n}}function k(t){let o=n=>{let r=n/255;return r<=.04045?r/12.92:Math.pow((r+.055)/1.055,2.4)};return .2126*o(t.r)+.7152*o(t.g)+.0722*o(t.b)}function N(t,o){let n=o.a<1?P(o,{r:255,g:255,b:255,a:1}):o,r=t.a<1?P(t,n):t,e=k(r),a=k(n),[l,i]=e>a?[e,a]:[a,e];return Math.round((l+.05)/(i+.05)*100)/100}function Kt(t){let o=[],n=t;for(;n;){let e=window.getComputedStyle(n);if(e.backgroundImage&&e.backgroundImage!=="none")return null;let a=b(e.backgroundColor);if(a&&a.a>0&&(o.push(a),a.a>=1))break;n=n.parentElement}let r={r:255,g:255,b:255,a:1};for(let e=o.length-1;e>=0;e--)r=P(o[e],r);return r}function Zt(t){let o=window.getComputedStyle(t),n=parseFloat(o.fontSize)||16,r=parseInt(o.fontWeight,10)||400;return n>=24||n>=18.66&&r>=700}function Jt(t){return Array.from(t.childNodes).some(o=>o.nodeType===3&&h(o.textContent).length>0)}var Qt="a[href],button,input:not([type='hidden']),select,textarea,summary,[tabindex]:not([tabindex='-1']),[contenteditable='true']",Xt="a[href],button,input:not([type='hidden']),select,textarea,summary,[role='button'],[role='link'],[role='checkbox'],[role='tab'],[role='menuitem']";var f={accessibility:'<circle cx="12" cy="4" r="2"/><path d="M4 8l8-1 8 1M12 7v5m-5 9 5-8 5 8M7 12l-2 5m12-5 2 5"/>',contrast:'<circle cx="12" cy="12" r="9"/><path d="M12 3a9 9 0 0 0 0 18z"/>',moon:'<path d="M20 14.5A8.5 8.5 0 0 1 9.5 4 8.5 8.5 0 1 0 20 14.5z"/>',motion:'<path d="M4 12h12m-5-5 5 5-5 5M20 5v14"/>',reading:'<path d="M4 5h16M4 10h12M4 15h16M4 20h10"/>',target:'<circle cx="12" cy="12" r="9"/><circle cx="12" cy="12" r="4"/>',speaker:'<path d="M4 9v6h4l5 4V5L8 9H4z"/><path d="M16 9a4 4 0 0 1 0 6M18.5 6.5a8 8 0 0 1 0 11"/>',palette:'<circle cx="12" cy="12" r="9"/><circle cx="8" cy="10" r="1.3"/><circle cx="12" cy="7.5" r="1.3"/><circle cx="16" cy="10" r="1.3"/><path d="M12 21a3 3 0 0 1 0-6h2"/>',skip:'<path d="M5 5l7 7-7 7M13 5l7 7-7 7"/>',close:'<path d="m18 6-12 12M6 6l12 12"/>',plus:'<path d="M12 5v14M5 12h14"/>',minus:'<path d="M5 12h14"/>',reset:'<path d="M3 12a9 9 0 1 0 3-6.7L3 8"/><path d="M3 3v5h5"/>',search:'<circle cx="11" cy="11" r="6.5"/><path d="m16 16 5 5"/>',sort:'<path d="m8 9 4-4 4 4m-8 6 4 4 4-4"/>',sortUp:'<path d="m6 15 6-6 6 6"/>',sortDown:'<path d="m6 9 6 6 6-6"/>',chevrons:'<path d="m8 9 4-4 4 4m-8 6 4 4 4-4"/>',grid:'<rect x="3" y="3" width="7" height="7" rx="1"/><rect x="14" y="3" width="7" height="7" rx="1"/><rect x="3" y="14" width="7" height="7" rx="1"/><rect x="14" y="14" width="7" height="7" rx="1"/>',cards:'<rect x="3" y="4" width="18" height="7" rx="1.5"/><rect x="3" y="13" width="18" height="7" rx="1.5"/>',chat:'<path d="M21 11.5a8.5 8.5 0 0 1-8.5 8.5 9 9 0 0 1-4-.9L3 21l1.9-5.5a9 9 0 0 1-.9-4A8.5 8.5 0 0 1 12.5 3H13a8.5 8.5 0 0 1 8 8z"/>',mic:'<rect x="9" y="2" width="6" height="12" rx="3"/><path d="M5 10a7 7 0 0 0 14 0M12 17v5m-4 0h8"/>',stop:'<rect x="6" y="6" width="12" height="12" rx="2"/>',download:'<path d="M12 3v12m-5-5 5 5 5-5M4 21h16"/>',copy:'<rect x="9" y="9" width="11" height="11" rx="2"/><path d="M5 15V5a2 2 0 0 1 2-2h10"/>',filter:'<path d="M4 5h16l-6 7v6l-4 2v-8z"/>',check:'<path d="m5 12 4 4L19 6"/>',left:'<path d="m15 18-6-6 6-6"/>',right:'<path d="m9 18 6-6-6-6"/>',first:'<path d="m11 18-6-6 6-6M19 18l-6-6 6-6"/>',last:'<path d="m13 18 6-6-6-6M5 18l6-6-6-6"/>',spark:'<path d="m12 3 1.9 5.8L20 11l-6.1 2.2L12 19l-1.9-5.8L4 11l6.1-2.2zM19 14l1.2 2.8L23 18l-2.8 1.2L19 22l-1.2-2.8L15 18l2.8-1.2z"/>',alert:'<path d="m12 3 10 18H2L12 3z"/><path d="M12 9v5m0 3h.01"/>',info:'<circle cx="12" cy="12" r="9"/><path d="M12 11v6m0-9h.01"/>',form:'<rect x="5" y="3" width="14" height="18" rx="2"/><path d="M9 8h6M9 12h6M9 16h3"/>',eye:'<path d="M2 12s3.5-7 10-7 10 7 10 7-3.5 7-10 7S2 12 2 12z"/><circle cx="12" cy="12" r="3"/>',layout:'<rect x="3" y="3" width="18" height="18" rx="2"/><path d="M3 9h18M9 21V9"/>',wand:'<path d="m15 4 5 5L9 20H4v-5z"/><path d="m13 6 5 5"/>',undo:'<path d="M9 14 4 9l5-5"/><path d="M4 9h10a6 6 0 0 1 0 12h-3"/>',tools:'<path d="M14.7 6.3a4 4 0 0 0-5.4 5.4L3 18l3 3 6.3-6.3a4 4 0 0 0 5.4-5.4l-2.5 2.5-2.4-.6-.6-2.4z"/>',plug:'<path d="M9 2v6M15 2v6M6 8h12v4a6 6 0 0 1-12 0zM12 18v4"/>'},q=Object.keys(f);var $=3,w="#ffffff",R="#111827";function C(t,o){let n=b(t),r=b(o);return n&&r?N(n,r):null}function E(t){let o=C(w,t),n=C(R,t);return o===null||n===null||o>=n?w:R}var L=new Set;function U(t,o){L.has(t)||(L.add(t),typeof console<"u"&&console.warn(`[yuktai icons] ${o}`))}function M(t={}){let o=t.variant==="filled"?"filled":"outline",n=t.color||"currentColor";if(o==="outline")return{variant:o,color:n,glyph:n,contrast:null};let r=t.glyphColor||E(n),e=C(r,n);return e!==null&&e<$&&U(`${r}|${n}`,`glyph ${r} on ${n} is ${e}:1. WCAG 1.4.11 needs at least 3:1 for icons.`),{variant:o,color:n,glyph:r,contrast:e}}var S="translate(3.6 3.6) scale(0.7)",v="@media (forced-colors: active){.yi-bg{fill:CanvasText}.yi-glyph{stroke:Canvas}}",g=t=>String(t).replace(/[&<>"']/g,o=>({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"})[o]);function K(t,o={}){let n=f[t]??f.spark,r=o.size??20,{variant:e,color:a,glyph:l}=M(o),i=o.strokeWidth??(e==="filled"?2.4:1.9),d=`<svg xmlns="http://www.w3.org/2000/svg" ${o.label?`role="img" aria-label="${g(o.label)}"`:'aria-hidden="true"'} focusable="false" width="${g(r)}" height="${g(r)}" viewBox="0 0 24 24" fill="none" stroke-linecap="round" stroke-linejoin="round" data-variant="${e}">`;if(e==="outline")return`${d}<g stroke="${g(a)}" stroke-width="${i}">${n}</g></svg>`;let m=o.shape==="circle"?`<circle class="yi-bg" cx="12" cy="12" r="12" fill="${g(a)}"/>`:`<rect class="yi-bg" width="24" height="24" rx="6" fill="${g(a)}"/>`;return`${d}<style>${v}</style>${m}<g class="yi-glyph" stroke="${g(l)}" stroke-width="${i}" transform="${S}">${n}</g></svg>`}import{Fragment as Z,jsx as x,jsxs as J}from"react/jsx-runtime";function p({size:t=20,color:o,strokeWidth:n,label:r,variant:e,glyphColor:a,shape:l,children:i,...u}){let d=!r,m=M({variant:e,color:o,glyphColor:a,shape:l}),y=m.variant==="filled",A=n??(y?2.6:2.5);return x("svg",{xmlns:"http://www.w3.org/2000/svg",width:t,height:t,viewBox:"0 0 24 24",fill:"none",stroke:y?void 0:m.color,strokeWidth:y?void 0:A,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":d?"true":void 0,"aria-label":r,role:r?"img":void 0,focusable:"false","data-variant":m.variant,...u,children:y?J(Z,{children:[x("style",{children:v}),l==="circle"?x("circle",{className:"yi-bg",cx:"12",cy:"12",r:"12",fill:m.color}):x("rect",{className:"yi-bg",width:"24",height:"24",rx:"6",fill:m.color}),x("g",{className:"yi-glyph",stroke:m.glyph,strokeWidth:A,transform:S,children:i})]}):i})}import{jsx as O,jsxs as X}from"react/jsx-runtime";function Q(t){return X(p,{...t,children:[O("circle",{cx:"11",cy:"11",r:"7"}),O("path",{d:"m20 20-4-4"})]})}import{jsx as T,jsxs as tt}from"react/jsx-runtime";function j(t){return tt(p,{...t,children:[T("path",{d:"M12 19V5"}),T("path",{d:"m5 12 7-7 7 7"})]})}import{jsx as G,jsxs as nt}from"react/jsx-runtime";function ot(t){return nt(p,{...t,children:[G("path",{d:"M12 5v14"}),G("path",{d:"m5 12 7 7 7-7"})]})}import{jsx as _}from"react/jsx-runtime";function et(t){return _(p,{...t,children:_("path",{d:"m15 18-6-6 6-6"})})}import{jsx as z}from"react/jsx-runtime";function rt(t){return z(p,{...t,children:z("path",{d:"m9 18 6-6-6-6"})})}import{jsx as F}from"react/jsx-runtime";function ct(t){return F(p,{...t,children:F("path",{d:"M5 12.5 10 17.5 19.5 7"})})}import{jsx as D,jsxs as at}from"react/jsx-runtime";function st(t){return at(p,{...t,children:[D("path",{d:"M18 6 6 18"}),D("path",{d:"m6 6 12 12"})]})}import{jsx as c}from"react/jsx-runtime";function s({name:t,...o}){let n=f[t]??f.spark;return c(p,{...o,children:c("g",{dangerouslySetInnerHTML:{__html:n}})})}var it=t=>c(s,{...t,name:"accessibility"}),lt=t=>c(s,{...t,name:"contrast"}),pt=t=>c(s,{...t,name:"moon"}),ut=t=>c(s,{...t,name:"motion"}),ht=t=>c(s,{...t,name:"reading"}),It=t=>c(s,{...t,name:"target"}),dt=t=>c(s,{...t,name:"speaker"}),mt=t=>c(s,{...t,name:"palette"}),ft=t=>c(s,{...t,name:"skip"}),gt=t=>c(s,{...t,name:"plus"}),xt=t=>c(s,{...t,name:"minus"}),yt=t=>c(s,{...t,name:"reset"}),bt=t=>c(s,{...t,name:"sort"}),Ct=t=>c(s,{...t,name:"chevrons"}),Mt=t=>c(s,{...t,name:"grid"}),Pt=t=>c(s,{...t,name:"cards"}),wt=t=>c(s,{...t,name:"chat"}),St=t=>c(s,{...t,name:"mic"}),vt=t=>c(s,{...t,name:"stop"}),At=t=>c(s,{...t,name:"download"}),kt=t=>c(s,{...t,name:"copy"}),Bt=t=>c(s,{...t,name:"filter"}),Nt=t=>c(s,{...t,name:"first"}),Rt=t=>c(s,{...t,name:"last"}),Lt=t=>c(s,{...t,name:"spark"}),$t=t=>c(s,{...t,name:"alert"}),Et=t=>c(s,{...t,name:"info"}),Ot=t=>c(s,{...t,name:"form"}),Tt=t=>c(s,{...t,name:"eye"}),Gt=t=>c(s,{...t,name:"layout"}),_t=t=>c(s,{...t,name:"wand"}),zt=t=>c(s,{...t,name:"undo"}),Ft=t=>c(s,{...t,name:"tools"}),Dt=t=>c(s,{...t,name:"plug"});export{B as a,Ht as b,Vt as c,Wt as d,h as e,Yt as f,qt as g,Ut as h,b as i,k as j,N as k,Kt as l,Zt as m,Jt as n,Qt as o,Xt as p,f as q,q as r,$ as s,C as t,E as u,M as v,K as w,p as x,Q as y,j as z,ot as A,et as B,rt as C,ct as D,st as E,s as F,it as G,lt as H,pt as I,ut as J,ht as K,It as L,dt as M,mt as N,ft as O,gt as P,xt as Q,yt as R,bt as S,Ct as T,Mt as U,Pt as V,wt as W,St as X,vt as Y,At as Z,kt as _,Bt as $,Nt as aa,Rt as ba,Lt as ca,$t as da,Et as ea,Ot as fa,Tt as ga,Gt as ha,_t as ia,zt as ja,Ft as ka,Dt as la};