@minejs/jsx 0.2.6 → 0.2.7
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 +19 -19
- package/dist/index.cjs +2 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/{jsx-dev-runtime-sMogz8rT.d.cts → jsx-dev-runtime-BMji0LKs.d.cts} +15 -1
- package/dist/{jsx-dev-runtime-sMogz8rT.d.ts → jsx-dev-runtime-BMji0LKs.d.ts} +15 -1
- package/dist/jsx-dev-runtime.cjs +2 -2
- package/dist/jsx-dev-runtime.cjs.map +1 -1
- package/dist/jsx-dev-runtime.d.cts +1 -1
- package/dist/jsx-dev-runtime.d.ts +1 -1
- package/dist/jsx-dev-runtime.js +2 -2
- package/dist/jsx-dev-runtime.js.map +1 -1
- package/dist/jsx-runtime.cjs +2 -2
- package/dist/jsx-runtime.cjs.map +1 -1
- package/dist/jsx-runtime.d.cts +1 -1
- package/dist/jsx-runtime.d.ts +1 -1
- package/dist/jsx-runtime.js +2 -2
- package/dist/jsx-runtime.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -8,10 +8,10 @@
|
|
|
8
8
|
</div>
|
|
9
9
|
|
|
10
10
|
<div align="center">
|
|
11
|
-
<img src="https://img.shields.io/badge/v-0.2.
|
|
11
|
+
<img src="https://img.shields.io/badge/v-0.2.7-black"/>
|
|
12
12
|
<img src="https://img.shields.io/badge/🔥-@minejs-black"/>
|
|
13
13
|
<br>
|
|
14
|
-
<img src="https://img.shields.io/badge/coverage-98.
|
|
14
|
+
<img src="https://img.shields.io/badge/coverage-98.11%25-brightgreen" alt="Test Coverage" />
|
|
15
15
|
<img src="https://img.shields.io/github/issues/minejs-org/jsx?style=flat" alt="Github Repo Issues" />
|
|
16
16
|
<img src="https://img.shields.io/github/stars/minejs-org/jsx?style=social" alt="GitHub Repo stars" />
|
|
17
17
|
</div>
|
|
@@ -52,15 +52,15 @@
|
|
|
52
52
|
```typescript
|
|
53
53
|
// Create simple element
|
|
54
54
|
const el = jsx('div', {
|
|
55
|
-
className: 'container',
|
|
56
|
-
children: 'Hello World'
|
|
55
|
+
className : 'container',
|
|
56
|
+
children : 'Hello World'
|
|
57
57
|
})
|
|
58
58
|
|
|
59
59
|
// Create with attributes
|
|
60
60
|
const button = jsx('button', {
|
|
61
|
-
id: 'submit',
|
|
62
|
-
children: 'Click me',
|
|
63
|
-
onClick: () => console.log('Clicked!')
|
|
61
|
+
id : 'submit',
|
|
62
|
+
children : 'Click me',
|
|
63
|
+
onClick : () => console.log('Clicked!')
|
|
64
64
|
})
|
|
65
65
|
```
|
|
66
66
|
|
|
@@ -107,22 +107,22 @@
|
|
|
107
107
|
```typescript
|
|
108
108
|
// Apply Tailwind-like props directly!
|
|
109
109
|
const card = jsx('div', {
|
|
110
|
-
display: 'flex',
|
|
111
|
-
direction: 'column',
|
|
112
|
-
p: 4,
|
|
113
|
-
gap: 2,
|
|
114
|
-
bg: 'white',
|
|
115
|
-
shadow: 'md',
|
|
116
|
-
radius: 'lg',
|
|
117
|
-
children: 'Beautiful Card'
|
|
110
|
+
display : 'flex',
|
|
111
|
+
direction : 'column',
|
|
112
|
+
p : 4, // padding: 1rem
|
|
113
|
+
gap : 2, // gap: 0.5rem
|
|
114
|
+
bg : 'white', // background-color
|
|
115
|
+
shadow : 'md', // box-shadow
|
|
116
|
+
radius : 'lg', // border-radius
|
|
117
|
+
children : 'Beautiful Card'
|
|
118
118
|
})
|
|
119
119
|
|
|
120
120
|
// Create Overlay
|
|
121
121
|
const modal = jsx('div', {
|
|
122
|
-
overlay: true,
|
|
123
|
-
backdrop: true,
|
|
124
|
-
location: 'center',
|
|
125
|
-
children: 'Modal Content'
|
|
122
|
+
overlay : true,
|
|
123
|
+
backdrop : true,
|
|
124
|
+
location : 'center',
|
|
125
|
+
children : 'Modal Content'
|
|
126
126
|
})
|
|
127
127
|
```
|
|
128
128
|
|
package/dist/index.cjs
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
'use strict';var signals=require('@minejs/signals');var w=[],E=false;function S(e,n,t={}){let r=typeof n=="string"?document.querySelector(n):n;if(!r)throw new Error(`Container not found: ${n}`);let o=typeof e=="function"?e():e;if(!o)throw new Error("Component returned null or undefined");switch(t.mode||"replace"){case "replace":r.innerHTML="",r.appendChild(o);break;case "append":r.appendChild(o);break;case "prepend":r.insertBefore(o,r.firstChild);break;default:r.innerHTML="",r.appendChild(o);}return t.onMount?.(),{element:o,unmount:()=>{if(o instanceof Element)o.remove();else if(o instanceof DocumentFragment)for(;o.firstChild;)o.removeChild(o.firstChild);t.onUnmount?.();},update:i=>{o instanceof Element&&i instanceof Element?o.replaceWith(i):i instanceof Element&&o instanceof DocumentFragment&&o.parentNode&&o.parentNode.replaceChild(i,o);}}}function $n(e,n){return S(e,n,{mode:"replace"})}function De(e,n){let t=typeof n=="string"?document.querySelector(n):n;if(!t)throw new Error(`Portal container not found: ${n}`);let r=document.createComment("portal");return e instanceof Node&&t.appendChild(e),r}function Mn(e,n){let t=typeof n=="string"?document.querySelector(n):n,r=t instanceof HTMLElement?t:null;if(!r)throw new Error(`Container not found: ${n}`);return S(e,r,{mode:"replace"})}function Ln(e,n){let t=null,r=false,o=null;return l=>{if(t)return t(l);if(o){let i=document.createElement("div");return i.className="crux-lazy-error",i.textContent=`Error loading component: ${o.message}`,i.style.color="red",i}return r||(r=true,e().then(i=>{t=i.default;}).catch(i=>{o=i instanceof Error?i:new Error(String(i));})),n||ze()}}function ze(){let e=document.createElement("div");return e.textContent="Loading...",e}function vn(e){try{return e.children}catch(n){return e.fallback(n)}}function Tn(e){if(e.children instanceof Promise){let n=document.createElement("div");return n.style.display="contents",e.fallback instanceof Node&&n.appendChild(e.fallback),e.children.then(t=>{n.innerHTML="",t instanceof Node&&n.appendChild(t);}),n}else return e.children}function Rn(e){return De(e.children,e.to)}function Hn(e){w.push(e),E||(E=true,queueMicrotask(_e));}function _e(){let e=w;w=[],E=false,e.forEach(n=>n());}function Fe(){return typeof window<"u"&&typeof document<"u"}function Pn(e){Fe()&&(document.readyState==="loading"?document.addEventListener("DOMContentLoaded",e):e());}function Nn(e){let n=typeof e=="string"?document.querySelector(e):e;if(!n||!(n instanceof HTMLElement))throw new Error(`Root container not found: ${e}`);let t=null;return {render(r){t&&t.unmount(),t=S(r,n);},unmount(){t&&(t.unmount(),t=null);}}}function Xn(e){return e.replace(/\s+/g," ").replace(/>\s+</g,"><").trim()}function h(e){return e.replace(/\s+/g," ").trim()}var re=[/^display-(.+)$/,/^(block|inline-block|inline|flex|inline-flex|grid|inline-grid|table|table-row|table-cell|flow-root|contents|hidden)$/,/^(static|fixed|absolute|relative|sticky)$/,/^inset-(.+)$/,/^inset-x-(.+)$/,/^inset-y-(.+)$/,/^start-(.+)$/,/^end-(.+)$/,/^top-(.+)$/,/^bottom-(.+)$/,/^z-(.+)$/,/^flex-(row|col)(-reverse)?$/,/^flex-(wrap|nowrap)(-reverse)?$/,/^flex-(1|auto|initial|none)$/,/^basis-(.+)$/,/^grow(-0)?$/,/^shrink(-0)?$/,/^order-(.+)$/,/^gap-(\d+)$/,/^gap-x-(.+)$/,/^gap-y-(.+)$/,/^justify-items-(.+)$/,/^justify-self-(.+)$/,/^justify-(start|end|center|between|around|evenly|stretch)$/,/^content-(.+)$/,/^items-(.+)$/,/^self-(.+)$/,/^place-content-(.+)$/,/^place-items-(.+)$/,/^place-self-(.+)$/,/^grid-cols-(.+)$/,/^col-span-(.+)$/,/^col-start-(.+)$/,/^col-end-(.+)$/,/^grid-rows-(.+)$/,/^row-span-(.+)$/,/^row-start-(.+)$/,/^row-end-(.+)$/,/^grid-flow-(.+)$/,/^p-(.+)$/,/^px-(.+)$/,/^py-(.+)$/,/^pt-(.+)$/,/^pb-(.+)$/,/^ps-(.+)$/,/^pe-(.+)$/,/^m-(.+)$/,/^mx-(.+)$/,/^my-(.+)$/,/^mt-(.+)$/,/^mb-(.+)$/,/^ms-(.+)$/,/^me-(.+)$/,/^w-(.+)$/,/^min-w-(.+)$/,/^max-w-(.+)$/,/^h-(.+)$/,/^min-h-(.+)$/,/^max-h-(.+)$/,/^font-(sans|serif|mono)$/,/^font-(thin|extralight|light|normal|medium|semibold|bold|extrabold|black)$/,/^text-(xs|sm|base|md|lg|xl|\d+xl)$/,/^leading-(.+)$/,/^tracking-(.+)$/,/^text-(left|center|right|justify|start|end)$/,/^text-(wrap|nowrap|balance|pretty)$/,/^(truncate|text-ellipsis|text-clip)$/,/^(uppercase|lowercase|capitalize|normal-case)$/,/^(italic|not-italic)$/,/^(underline|overline|line-through|no-underline)$/,/^text-(?!left|center|right|justify|start|end|xs|sm|base|md|lg|xl|\d+xl|wrap|nowrap|balance|pretty|ellipsis|clip).+$/,/^bg-(?!blend).+$/,/^bg-blend-(.+)$/,/^mix-blend-(.+)$/,/^shadow(.*)$/,/^opacity-(.+)$/,/^blur(.*)$/,/^brightness-(.+)$/,/^contrast-(.+)$/,/^grayscale(.*)$/,/^invert(.*)$/,/^saturate-(.+)$/,/^sepia(.*)$/,/^hue-rotate-(.+)$/,/^backdrop-blur(.*)$/,/^transition(.*)$/];function oe(e){let n=e.trim().split(/\s+/);if(n.length<=1&&n[0]==="")return "";if(n.length===1)return n[0];let t=new Set,r=[];for(let o=n.length-1;o>=0;o--){let l=n[o];if(!l)continue;let i=l;for(let s=0;s<re.length;s++)if(re[s].test(l)){i=s;break}t.has(i)||(t.add(i),r.push(l));}return r.reverse().join(" ")}var ie={center:"justify-center items-center",top:"justify-center items-start",bottom:"justify-center items-end",left:"justify-start items-center",right:"justify-end items-center","top-left":"justify-start items-start","top-right":"justify-end items-start","bottom-left":"justify-start items-end","bottom-right":"justify-end items-end"},Oe={block:"block","inline-block":"inline-block",flex:"flex","inline-flex":"inline-flex",grid:"grid","inline-grid":"inline-grid"},We={row:"flex-row","row-reverse":"flex-row-reverse",column:"flex-col","column-reverse":"flex-col-reverse"},ke={start:"items-start",center:"items-center",end:"items-end",stretch:"items-stretch",baseline:"items-baseline"},Ie={start:"justify-start",center:"justify-center",end:"justify-end",between:"justify-between",around:"justify-around",evenly:"justify-evenly"},Be={xs:"max-w-xs",sm:"max-w-sm",md:"max-w-md",lg:"max-w-lg",xl:"max-w-xl","2xl":"max-w-2xl","3xl":"max-w-3xl","4xl":"max-w-4xl","5xl":"max-w-5xl","6xl":"max-w-6xl","7xl":"max-w-7xl",full:"max-w-full",min:"max-w-min",max:"max-w-max",fit:"max-w-fit",none:"max-w-none",prose:"max-w-prose"},Ge={0:"border-0",1:"border",2:"border-2",4:"border-4",8:"border-8"},Ye={none:"rounded-none",sm:"rounded-sm",base:"rounded",md:"rounded-md",lg:"rounded-lg",xl:"rounded-xl","2xl":"rounded-2xl","3xl":"rounded-3xl",full:"rounded-full"},qe={none:"shadow-none",xs:"shadow-xs",sm:"shadow-sm",md:"shadow-md",lg:"shadow-lg",xl:"shadow-xl","2xl":"shadow-2xl",inner:"shadow-inner"},Ke={solid:"border-solid",dashed:"border-dashed",dotted:"border-dotted",double:"border-double",groove:"border-groove",ridge:"border-ridge",inset:"border-inset",hidden:"border-hidden",none:"border-none"},Ue={auto:"cursor-auto",default:"cursor-default",pointer:"cursor-pointer",wait:"cursor-wait",text:"cursor-text",move:"cursor-move",help:"cursor-help","not-allowed":"cursor-not-allowed",none:"cursor-none",grab:"cursor-grab",grabbing:"cursor-grabbing"},Ve={none:"select-none",text:"select-text",all:"select-all",auto:"select-auto"},Qe={none:"pointer-events-none",auto:"pointer-events-auto"},Ze={none:"resize-none",both:"resize",y:"resize-y",x:"resize-x"},en={none:"animate-none",spin:"animate-spin",ping:"animate-ping",pulse:"animate-pulse",bounce:"animate-bounce","fade-in":"animate-fade-in","fade-out":"animate-fade-out","slide-in-up":"animate-slide-in-up","slide-in-down":"animate-slide-in-down","slide-in-left":"animate-slide-in-left","slide-in-right":"animate-slide-in-right","zoom-in":"animate-zoom-in","zoom-out":"animate-zoom-out"},nn={linear:"animate-ease-linear",in:"animate-ease-in",out:"animate-ease-out","in-out":"animate-ease-in-out"},tn={forwards:"animate-fill-forwards",backwards:"animate-fill-backwards",both:"animate-fill-both",none:"animate-fill-none"};function u(e,n){if(n!==void 0)return `${e}-${n}`}function f(e,n){if(n!==void 0)return n==="auto"?`${e}-auto`:`${e}-${n}`}var se=new Set([0,1,2,3,4,5,6,7,8,9,10,12,14,16,20,24,28,32,36,40,48,56,64]),rn=new Set(["1/2","1/3","2/3","1/4","2/4","3/4","1/5","2/5","3/5","4/5","1/6","5/6","1/12"]),on=new Set(["auto","full","screen","min","max","fit"]),sn=new Set(["auto","full","screen","min","max","fit"]),an=new Set(["0","full","min","max","fit"]),ln=new Set(["none","full","min","max","fit"]),dn=new Set(["0","full","screen","min","max","fit"]),cn=new Set(["none","full","screen","min","max","fit"]),c=(e,n,t)=>n===void 0?null:t&&n in t?{class:t[n]}:typeof n=="number"&&se.has(n)?{class:`${e}-${n}`}:(e==="w"||e==="h")&&rn.has(n)?{class:`${e}-${n}`}:(e==="w"?on:e==="h"?sn:e==="min-w"?an:e==="min-h"?dn:e==="max-w"?ln:cn).has(n)?{class:`${e}-${n}`}:["min-w","max-w","min-h","max-h"].includes(e)&&typeof n=="number"&&se.has(n)?{class:`${e}-${n}`}:{style:{[e==="w"?"width":e==="h"?"height":e==="min-w"?"minWidth":e==="min-h"?"minHeight":e==="max-w"?"maxWidth":"maxHeight"]:n}},ae=new Set(["display","direction","align","justify","wrap","grow","shrink","basis","order","gap","gapX","gapY","w","h","size","minW","minH","maxW","maxH","p","px","py","ps","pe","pt","pb","m","mx","my","ms","me","mt","mb","bg","color","border","borderStyle","borderColor","radius","shadow","opacity","position","overflow","zIndex","overlay","location","backdrop","divider","cursor","select","pointerEvents","resize","animate","animateDuration","animateDelay","animateEase","animateFill"]);function le(e){let{display:n,direction:t,align:r,justify:o,wrap:l,grow:i,shrink:s,basis:a,order:p,gap:v,gapX:T,gapY:R,w:fe,h:pe,size:H,minW:ge,minH:he,maxW:xe,maxH:ye,p:be,px:we,py:Ee,ps:Se,pe:Ce,pt:$e,pb:Me,m:Le,mx:ve,my:Te,ms:Re,me:He,mt:Pe,mb:Ne,bg:P,color:N,border:A,borderStyle:X,borderColor:J,radius:j,shadow:D,opacity:z,position:Ae,overflow:_,zIndex:F,overlay:g,location:y,backdrop:Xe,divider:b,cursor:O,select:W,pointerEvents:k,resize:I,animate:B,animateDuration:G,animateDelay:Y,animateEase:q,animateFill:K}=e,Je=c("w",H),je=c("h",H),U=c("w",fe)||Je,V=c("h",pe)||je,Q=c("min-w",ge),Z=c("min-h",he),ee=c("max-w",xe,Be),ne=c("max-h",ye),te={...U?.style,...V?.style,...Q?.style,...Z?.style,...ee?.style,...ne?.style,...a&&typeof a=="string"&&!["auto","full"].includes(a)?{flexBasis:a}:{},...p!==void 0?{order:p}:{},...i!==void 0&&typeof i=="number"?{flexGrow:i}:{},...s!==void 0&&typeof s=="number"?{flexShrink:s}:{},...g&&Xe?{backgroundColor:"rgba(0, 0, 0, 0.5)"}:{}};return {className:[g&&"absolute inset-0 w-full h-full flex",g&&y&&ie[y],g&&!y&&ie.center,n&&Oe[n],t&&We[t],r&&ke[r],o&&Ie[o],l&&"flex-wrap",i===true&&"grow",i===false&&"grow-0",s===true&&"shrink",s===false&&"shrink-0",a&&typeof a=="string"&&["auto","full"].includes(a)&&`basis-${a}`,v!==void 0&&`gap-${v}`,T!==void 0&&`gap-x-${T}`,R!==void 0&&`gap-y-${R}`,U?.class,V?.class,Q?.class,Z?.class,ee?.class,ne?.class,u("p",be),u("px",we),u("py",Ee),u("ps",Se),u("pe",Ce),u("pt",$e),u("pb",Me),f("m",Le),f("mx",ve),f("my",Te),f("ms",Re),f("me",He),f("mt",Pe),f("mb",Ne),P&&`bg-${P}`,N&&`text-${N}`,A!==void 0&&Ge[A],X&&Ke[X],J&&`border-${J}`,j&&Ye[j],D&&qe[D],z!==void 0&&`opacity-${z}`,Ae,_&&`overflow-${_}`,F&&`z-${F}`,O&&Ue[O],W&&Ve[W],k&&Qe[k],I&&Ze[I],B&&en[B],G&&`animate-duration-${G}`,Y&&`animate-delay-${Y}`,q&&nn[q],K&&tn[K],b===true&&"border-t",b==="horizontal"&&"border-t",b==="vertical"&&"border-s"].filter(Boolean).join(" "),style:Object.keys(te).length>0?te:void 0}}function L(e,n){return typeof e=="function"?e(n||{}):pn(e,n||{})}var Fn=L;function me(e){let n=document.createDocumentFragment();return x(e.children).forEach(r=>{r instanceof Node&&n.appendChild(r);}),n}var de=false;function mn(){if(de||typeof window>"u"||typeof MutationObserver>"u")return;de=true;let e=new MutationObserver(n=>{n.forEach(t=>{t.addedNodes.forEach(r=>{r instanceof Element&&un(r);});});});document.body?e.observe(document.body,{childList:true,subtree:true}):document.addEventListener("DOMContentLoaded",()=>{document.body&&e.observe(document.body,{childList:true,subtree:true});});}function un(e){if(e.hasAttribute("data-mine-onload")){let t=e.__onload;typeof t=="function"&&t(e);}e.querySelectorAll("[data-mine-onload]").forEach(t=>{let r=t.__onload;typeof r=="function"&&r(t);});}var C=new Set(["svg","path","circle","rect","line","polyline","polygon","ellipse","g","text","tspan","defs","clipPath","linearGradient","radialGradient","stop","mask","pattern","image","use","symbol","marker","foreignObject","animate","animateTransform","animateMotion","set","filter","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","title","desc","metadata"]),$=new Set(["math","maction","maligngroup","malignmark","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mlongdiv","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mscarries","mscarry","msgroup","msline","mspace","msqrt","msrow","mstack","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","semantics","annotation","annotation-xml"]),ue="http://www.w3.org/2000/svg",fn="http://www.w3.org/1998/Math/MathML";function pn(e,n){n.as&&(e=n.as);let t;C.has(e)?t=document.createElementNS(ue,e):$.has(e)?t=document.createElementNS(fn,e):t=document.createElement(e);let r="dangerouslySetInnerHTML"in n&&n.dangerouslySetInnerHTML!=null&&typeof n.dangerouslySetInnerHTML=="object"&&"__html"in n.dangerouslySetInnerHTML&&typeof n.dangerouslySetInnerHTML.__html=="string",{className:o,style:l}=le(n);n.divider&&!n.role&&t.setAttribute("role","separator"),l&&!C.has(e)&&!$.has(e)&&M(t,l);let i=false;for(let[s,a]of Object.entries(n))if(!ae.has(s)&&s!=="as"){if(s==="children")r||gn(t,a);else if(s==="dangerouslySetInnerHTML")En(t,a);else if(s==="onload")t.__onload=a,t.setAttribute("data-mine-onload",""),mn();else if(s==="ref")hn(t,a);else if(s.startsWith("on"))xn(t,s,a);else if(s==="id")yn(t,a);else if(s==="htmlFor")bn(t,a);else if(s==="className"||s==="class")i=true,ce(t,a,o);else if(s==="style")wn(t,a);else if(signals.isSignal(a))Sn(t,s,a);else if(typeof a=="boolean")a&&t.setAttribute(s,"");else if(a!=null)if(C.has(e)||$.has(e)){let p=typeof a=="string"?h(a):String(a);t.setAttribute(s,p);}else if(s in t)t[s]=a;else {let p=typeof a=="string"?h(a):String(a);t.setAttribute(s,p);}}return !i&&o&&ce(t,o),t}function gn(e,n){x(n).forEach(r=>{if(r instanceof Node)e.appendChild(r);else if(signals.isSignal(r)){let o=document.createTextNode("");signals.effect(()=>{o.textContent=String(r());}),e.appendChild(o);}else r!=null&&r!==false&&e.appendChild(document.createTextNode(String(r)));});}function x(e){return e==null||e===false?[]:Array.isArray(e)?e.flatMap(x):[e]}function hn(e,n){signals.isSignal(n)?n.set(e):typeof n=="function"&&n(e);}function xn(e,n,t){if(typeof t!="function")return;let r=n.slice(2).toLowerCase();e.addEventListener(r,t);}function ce(e,n,t=""){let r=o=>{let l=t?`${t} ${o}`:o,i=oe(String(l));e.namespaceURI===ue?e.setAttribute("class",i):e.className=i;};signals.isSignal(n)?signals.effect(()=>{let o=n();o!=null?r(String(o)):t&&r("");}):n!=null&&r(String(n));}function yn(e,n){signals.isSignal(n)?signals.effect(()=>{let t=n();t!=null?e.id=String(t):e.removeAttribute("id");}):n!=null&&(e.id=String(n));}function bn(e,n){signals.isSignal(n)?signals.effect(()=>{let t=n();t!=null?e.setAttribute("for",String(t)):e.removeAttribute("for");}):n!=null&&e.setAttribute("for",String(n));}function wn(e,n){signals.isSignal(n)?signals.effect(()=>{let t=n();M(e,t);}):M(e,n);}function M(e,n){typeof n=="string"?e.style.cssText=n:typeof n=="object"&&n!=null&&Object.entries(n).forEach(([t,r])=>{if(r!=null){let o=t.replace(/[A-Z]/g,l=>`-${l.toLowerCase()}`);e.style.setProperty(o,String(r));}});}function En(e,n){if(n!=null&&typeof n=="object"&&"__html"in n){let t=n.__html;typeof t=="string"&&(e.innerHTML=t);}}function Sn(e,n,t){signals.effect(()=>{let r=t();if(r!=null)if(n in e)e[n]=r;else {let o=typeof r=="string"?h(r):String(r);e.setAttribute(n,o);}else e.removeAttribute(n);});}function On(e){return e}function Wn(e){return n=>e(n)()}function kn(e){let n=document.createDocumentFragment();return e.forEach(t=>{t instanceof Node&&n.appendChild(t);}),n}function In(e){if(signals.isSignal(e.when)){let n=document.createComment("show"),t=document.createDocumentFragment();t.appendChild(n);let r=null;return signals.effect(()=>{let o=e.when,l=o();l&&!r?(r=x(e.children)[0],r instanceof Node&&n.parentNode?.insertBefore(r,n)):!l&&r&&(r.remove(),r=null);}),t}else return e.when?L(me,{children:e.children}):null}function Bn(e){for(let n of e.children)if(signals.isSignal(n.when)?n.when():n.when)return L(me,{children:n.children});return null}function Gn(e){let n=document.createDocumentFragment();if(signals.isSignal(e.each)){let t=document.createElement("div");t.style.display="contents",signals.effect(()=>{let r=e.each,o=r();t.innerHTML="",o.forEach((l,i)=>{let s=e.children(l,i);s instanceof Node&&t.appendChild(s);});}),n.appendChild(t);}else e.each.forEach((r,o)=>{let l=e.children(r,o);l instanceof Node&&n.appendChild(l);});return n}
|
|
2
|
-
exports.ErrorBoundary=
|
|
1
|
+
'use strict';var signals=require('@minejs/signals');var w=[],C=false;function S(e,n,t={}){let r=typeof n=="string"?document.querySelector(n):n;if(!r)throw new Error(`Container not found: ${n}`);let o=typeof e=="function"?e():e;if(!o)throw new Error("Component returned null or undefined");switch(t.mode||"replace"){case "replace":r.innerHTML="",r.appendChild(o);break;case "append":r.appendChild(o);break;case "prepend":r.insertBefore(o,r.firstChild);break;default:r.innerHTML="",r.appendChild(o);}return t.onMount?.(),{element:o,unmount:()=>{if(o instanceof Element)o.remove();else if(o instanceof DocumentFragment)for(;o.firstChild;)o.removeChild(o.firstChild);t.onUnmount?.();},update:i=>{o instanceof Element&&i instanceof Element?o.replaceWith(i):i instanceof Element&&o instanceof DocumentFragment&&o.parentNode&&o.parentNode.replaceChild(i,o);}}}function Wn(e,n){return S(e,n,{mode:"replace"})}function Ge(e,n){let t=typeof n=="string"?document.querySelector(n):n;if(!t)throw new Error(`Portal container not found: ${n}`);let r=document.createComment("portal");return e instanceof Node&&t.appendChild(e),r}function Dn(e,n){let t=typeof n=="string"?document.querySelector(n):n,r=t instanceof HTMLElement?t:null;if(!r)throw new Error(`Container not found: ${n}`);return S(e,r,{mode:"replace"})}function _n(e,n){let t=null,r=false,o=null;return l=>{if(t)return t(l);if(o){let i=document.createElement("div");return i.className="crux-lazy-error",i.textContent=`Error loading component: ${o.message}`,i.style.color="red",i}return r||(r=true,e().then(i=>{t=i.default;}).catch(i=>{o=i instanceof Error?i:new Error(String(i));})),n||Ye()}}function Ye(){let e=document.createElement("div");return e.textContent="Loading...",e}function Fn(e){try{return e.children}catch(n){return e.fallback(n)}}function On(e){if(e.children instanceof Promise){let n=document.createElement("div");return n.style.display="contents",e.fallback instanceof Node&&n.appendChild(e.fallback),e.children.then(t=>{n.innerHTML="",t instanceof Node&&n.appendChild(t);}),n}else return e.children}function kn(e){return Ge(e.children,e.to)}function In(e){w.push(e),C||(C=true,queueMicrotask(qe));}function qe(){let e=w;w=[],C=false,e.forEach(n=>n());}function Ke(){return typeof window<"u"&&typeof document<"u"}function Bn(e){Ke()&&(document.readyState==="loading"?document.addEventListener("DOMContentLoaded",e):e());}function Gn(e){let n=typeof e=="string"?document.querySelector(e):e;if(!n||!(n instanceof HTMLElement))throw new Error(`Root container not found: ${e}`);let t=null;return {render(r){t&&t.unmount(),t=S(r,n);},unmount(){t&&(t.unmount(),t=null);}}}function qn(e){return e.replace(/\s+/g," ").replace(/>\s+</g,"><").trim()}function x(e){return e.replace(/\s+/g," ").trim()}var le=[/^display-(.+)$/,/^(block|inline-block|inline|flex|inline-flex|grid|inline-grid|table|table-row|table-cell|flow-root|contents|hidden)$/,/^(static|fixed|absolute|relative|sticky)$/,/^inset-(.+)$/,/^inset-x-(.+)$/,/^inset-y-(.+)$/,/^start-(.+)$/,/^end-(.+)$/,/^top-(.+)$/,/^bottom-(.+)$/,/^z-(.+)$/,/^flex-(row|col)(-reverse)?$/,/^flex-(wrap|nowrap)(-reverse)?$/,/^flex-(1|auto|initial|none)$/,/^basis-(.+)$/,/^grow(-0)?$/,/^shrink(-0)?$/,/^order-(.+)$/,/^gap-(\d+)$/,/^gap-x-(.+)$/,/^gap-y-(.+)$/,/^justify-items-(.+)$/,/^justify-self-(.+)$/,/^justify-(start|end|center|between|around|evenly|stretch)$/,/^content-(.+)$/,/^items-(.+)$/,/^self-(.+)$/,/^place-content-(.+)$/,/^place-items-(.+)$/,/^place-self-(.+)$/,/^grid-cols-(.+)$/,/^col-span-(.+)$/,/^col-start-(.+)$/,/^col-end-(.+)$/,/^grid-rows-(.+)$/,/^row-span-(.+)$/,/^row-start-(.+)$/,/^row-end-(.+)$/,/^grid-flow-(.+)$/,/^p-(.+)$/,/^px-(.+)$/,/^py-(.+)$/,/^pt-(.+)$/,/^pb-(.+)$/,/^ps-(.+)$/,/^pe-(.+)$/,/^m-(.+)$/,/^mx-(.+)$/,/^my-(.+)$/,/^mt-(.+)$/,/^mb-(.+)$/,/^ms-(.+)$/,/^me-(.+)$/,/^w-(.+)$/,/^min-w-(.+)$/,/^max-w-(.+)$/,/^h-(.+)$/,/^min-h-(.+)$/,/^max-h-(.+)$/,/^font-(sans|serif|mono)$/,/^font-(thin|extralight|light|normal|medium|semibold|bold|extrabold|black)$/,/^text-(xs|sm|base|md|lg|xl|\d+xl)$/,/^leading-(.+)$/,/^tracking-(.+)$/,/^text-(left|center|right|justify|start|end)$/,/^text-(wrap|nowrap|balance|pretty)$/,/^(truncate|text-ellipsis|text-clip)$/,/^(uppercase|lowercase|capitalize|normal-case)$/,/^(italic|not-italic)$/,/^(underline|no-underline)$/,/^(overline)$/,/^(line-through)$/,/^text-(?!left|center|right|justify|start|end|xs|sm|base|md|lg|xl|\d+xl|wrap|nowrap|balance|pretty|ellipsis|clip).+$/,/^bg-(?!blend).+$/,/^bg-blend-(.+)$/,/^mix-blend-(.+)$/,/^shadow(.*)$/,/^opacity-(.+)$/,/^blur(.*)$/,/^brightness-(.+)$/,/^contrast-(.+)$/,/^grayscale(.*)$/,/^invert(.*)$/,/^saturate-(.+)$/,/^sepia(.*)$/,/^hue-rotate-(.+)$/,/^backdrop-blur(.*)$/,/^transition(.*)$/];function de(e){let n=e.trim().split(/\s+/);if(n.length<=1&&n[0]==="")return "";if(n.length===1)return n[0];let t=new Set,r=[];for(let o=n.length-1;o>=0;o--){let l=n[o];if(!l)continue;let i=l;for(let a=0;a<le.length;a++)if(le[a].test(l)){i=a;break}t.has(i)||(t.add(i),r.push(l));}return r.reverse().join(" ")}var ce={center:"justify-center items-center",top:"justify-center items-start",bottom:"justify-center items-end",left:"justify-start items-center",right:"justify-end items-center","top-left":"justify-start items-start","top-right":"justify-end items-start","bottom-left":"justify-start items-end","bottom-right":"justify-end items-end"},Ue={block:"block","inline-block":"inline-block",flex:"flex","inline-flex":"inline-flex",grid:"grid","inline-grid":"inline-grid"},Ve={row:"flex-row","row-reverse":"flex-row-reverse",column:"flex-col","column-reverse":"flex-col-reverse"},Qe={start:"items-start",center:"items-center",end:"items-end",stretch:"items-stretch",baseline:"items-baseline"},Ze={start:"justify-start",center:"justify-center",end:"justify-end",between:"justify-between",around:"justify-around",evenly:"justify-evenly"},en={xs:"max-w-xs",sm:"max-w-sm",md:"max-w-md",lg:"max-w-lg",xl:"max-w-xl","2xl":"max-w-2xl","3xl":"max-w-3xl","4xl":"max-w-4xl","5xl":"max-w-5xl","6xl":"max-w-6xl","7xl":"max-w-7xl",full:"max-w-full",min:"max-w-min",max:"max-w-max",fit:"max-w-fit",none:"max-w-none",prose:"max-w-prose"},nn={0:"border-0",1:"border",2:"border-2",4:"border-4",8:"border-8"},tn={none:"rounded-none",sm:"rounded-sm",base:"rounded",md:"rounded-md",lg:"rounded-lg",xl:"rounded-xl","2xl":"rounded-2xl","3xl":"rounded-3xl",full:"rounded-full"},rn={none:"shadow-none",xs:"shadow-xs",sm:"shadow-sm",md:"shadow-md",lg:"shadow-lg",xl:"shadow-xl","2xl":"shadow-2xl",inner:"shadow-inner"},on={solid:"border-solid",dashed:"border-dashed",dotted:"border-dotted",double:"border-double",groove:"border-groove",ridge:"border-ridge",inset:"border-inset",hidden:"border-hidden",none:"border-none"},an={auto:"cursor-auto",default:"cursor-default",pointer:"cursor-pointer",wait:"cursor-wait",text:"cursor-text",move:"cursor-move",help:"cursor-help","not-allowed":"cursor-not-allowed",none:"cursor-none",grab:"cursor-grab",grabbing:"cursor-grabbing"},sn={none:"select-none",text:"select-text",all:"select-all",auto:"select-auto"},ln={none:"pointer-events-none",auto:"pointer-events-auto"},dn={none:"resize-none",both:"resize",y:"resize-y",x:"resize-x"},cn={none:"animate-none",spin:"animate-spin",ping:"animate-ping",pulse:"animate-pulse",bounce:"animate-bounce","fade-in":"animate-fade-in","fade-out":"animate-fade-out","slide-in-up":"animate-slide-in-up","slide-in-down":"animate-slide-in-down","slide-in-left":"animate-slide-in-left","slide-in-right":"animate-slide-in-right","zoom-in":"animate-zoom-in","zoom-out":"animate-zoom-out"},mn={linear:"animate-ease-linear",in:"animate-ease-in",out:"animate-ease-out","in-out":"animate-ease-in-out"},un={forwards:"animate-fill-forwards",backwards:"animate-fill-backwards",both:"animate-fill-both",none:"animate-fill-none"},fn={xs:"text-xs",sm:"text-sm",base:"text-base",md:"text-md",lg:"text-lg",xl:"text-xl","2xl":"text-2xl","3xl":"text-3xl","4xl":"text-4xl","5xl":"text-5xl","6xl":"text-6xl","7xl":"text-7xl","8xl":"text-8xl","9xl":"text-9xl"},pn={thin:"font-thin",extralight:"font-extralight",light:"font-light",normal:"font-normal",medium:"font-medium",semibold:"font-semibold",bold:"font-bold",extrabold:"font-extrabold",black:"font-black"},gn={start:"text-start",end:"text-end",left:"text-left",right:"text-right",center:"text-center",justify:"text-justify"},xn={wrap:"text-wrap",nowrap:"text-nowrap",balance:"text-balance",pretty:"text-pretty"},hn={uppercase:"uppercase",lowercase:"lowercase",capitalize:"capitalize",none:"normal-case"};function u(e,n){if(n!==void 0)return `${e}-${n}`}function f(e,n){if(n!==void 0)return n==="auto"?`${e}-auto`:`${e}-${n}`}var me=new Set([0,1,2,3,4,5,6,7,8,9,10,12,14,16,20,24,28,32,36,40,48,56,64]),yn=new Set(["1/2","1/3","2/3","1/4","2/4","3/4","1/5","2/5","3/5","4/5","1/6","5/6","1/12"]),bn=new Set(["auto","full","screen","min","max","fit"]),wn=new Set(["auto","full","screen","min","max","fit"]),Cn=new Set(["0","full","min","max","fit"]),Sn=new Set(["none","full","min","max","fit"]),En=new Set(["0","full","screen","min","max","fit"]),$n=new Set(["none","full","screen","min","max","fit"]),c=(e,n,t)=>n===void 0?null:t&&n in t?{class:t[n]}:typeof n=="number"&&me.has(n)?{class:`${e}-${n}`}:(e==="w"||e==="h")&&yn.has(n)?{class:`${e}-${n}`}:(e==="w"?bn:e==="h"?wn:e==="min-w"?Cn:e==="min-h"?En:e==="max-w"?Sn:$n).has(n)?{class:`${e}-${n}`}:["min-w","max-w","min-h","max-h"].includes(e)&&typeof n=="number"&&me.has(n)?{class:`${e}-${n}`}:{style:{[e==="w"?"width":e==="h"?"height":e==="min-w"?"minWidth":e==="min-h"?"minHeight":e==="max-w"?"maxWidth":"maxHeight"]:n}},ue=new Set(["display","direction","align","justify","wrap","grow","shrink","basis","order","gap","gapX","gapY","w","h","size","minW","minH","maxW","maxH","p","px","py","ps","pe","pt","pb","m","mx","my","ms","me","mt","mb","bg","color","border","borderStyle","borderColor","radius","shadow","opacity","position","overflow","zIndex","overlay","location","backdrop","divider","cursor","select","pointerEvents","resize","animate","animateDuration","animateDelay","animateEase","animateFill","textSize","textWeight","textAlign","textWrap","textTransform","italic","underline","lineThrough","truncate"]);function fe(e){let{display:n,direction:t,align:r,justify:o,wrap:l,grow:i,shrink:a,basis:s,order:p,gap:L,gapX:v,gapY:R,w:ye,h:be,size:H,minW:we,minH:Ce,maxW:Se,maxH:Ee,p:$e,px:Me,py:Te,ps:Le,pe:ve,pt:Re,pb:He,m:Ae,mx:Pe,my:Ne,ms:Xe,me:ze,mt:Je,mb:je,bg:A,color:P,border:N,borderStyle:X,borderColor:z,radius:J,shadow:j,opacity:W,position:We,overflow:D,zIndex:_,overlay:g,location:y,backdrop:De,divider:b,cursor:F,select:O,pointerEvents:k,resize:I,animate:B,animateDuration:G,animateDelay:Y,animateEase:q,animateFill:K,textSize:U,textWeight:V,textAlign:Q,textWrap:Z,textTransform:ee,italic:_e,underline:Fe,lineThrough:Oe,truncate:ke}=e,Ie=c("w",H),Be=c("h",H),ne=c("w",ye)||Ie,te=c("h",be)||Be,re=c("min-w",we),oe=c("min-h",Ce),ie=c("max-w",Se,en),ae=c("max-h",Ee),se={...ne?.style,...te?.style,...re?.style,...oe?.style,...ie?.style,...ae?.style,...s&&typeof s=="string"&&!["auto","full"].includes(s)?{flexBasis:s}:{},...p!==void 0?{order:p}:{},...i!==void 0&&typeof i=="number"?{flexGrow:i}:{},...a!==void 0&&typeof a=="number"?{flexShrink:a}:{},...g&&De?{backgroundColor:"rgba(0, 0, 0, 0.5)"}:{}};return {className:[g&&"absolute inset-0 w-full h-full flex",g&&y&&ce[y],g&&!y&&ce.center,n&&Ue[n],t&&Ve[t],r&&Qe[r],o&&Ze[o],l&&"flex-wrap",i===true&&"grow",i===false&&"grow-0",a===true&&"shrink",a===false&&"shrink-0",s&&typeof s=="string"&&["auto","full"].includes(s)&&`basis-${s}`,L!==void 0&&`gap-${L}`,v!==void 0&&`gap-x-${v}`,R!==void 0&&`gap-y-${R}`,ne?.class,te?.class,re?.class,oe?.class,ie?.class,ae?.class,u("p",$e),u("px",Me),u("py",Te),u("ps",Le),u("pe",ve),u("pt",Re),u("pb",He),f("m",Ae),f("mx",Pe),f("my",Ne),f("ms",Xe),f("me",ze),f("mt",Je),f("mb",je),A&&`bg-${A}`,P&&`text-${P}`,N!==void 0&&nn[N],X&&on[X],z&&`border-${z}`,J&&tn[J],j&&rn[j],W!==void 0&&`opacity-${W}`,We,D&&`overflow-${D}`,_&&`z-${_}`,F&&an[F],O&&sn[O],k&&ln[k],I&&dn[I],B&&cn[B],G&&`animate-duration-${G}`,Y&&`animate-delay-${Y}`,q&&mn[q],K&&un[K],U&&fn[U],V&&pn[V],Q&&gn[Q],Z&&xn[Z],ee&&hn[ee],_e&&"italic",Fe&&"underline",Oe&&"line-through",ke&&"truncate",b===true&&"border-t",b==="horizontal"&&"border-t",b==="vertical"&&"border-s"].filter(Boolean).join(" "),style:Object.keys(se).length>0?se:void 0}}function T(e,n){return typeof e=="function"?e(n||{}):vn(e,n||{})}var et=T;function xe(e){let n=document.createDocumentFragment();return h(e.children).forEach(r=>{r instanceof Node&&n.appendChild(r);}),n}var pe=false;function Mn(){if(pe||typeof window>"u"||typeof MutationObserver>"u")return;pe=true;let e=new MutationObserver(n=>{n.forEach(t=>{t.addedNodes.forEach(r=>{r instanceof Element&&Tn(r);});});});document.body?e.observe(document.body,{childList:true,subtree:true}):document.addEventListener("DOMContentLoaded",()=>{document.body&&e.observe(document.body,{childList:true,subtree:true});});}function Tn(e){if(e.hasAttribute("data-mine-onload")){let t=e.__onload;typeof t=="function"&&t(e);}e.querySelectorAll("[data-mine-onload]").forEach(t=>{let r=t.__onload;typeof r=="function"&&r(t);});}var E=new Set(["svg","path","circle","rect","line","polyline","polygon","ellipse","g","text","tspan","defs","clipPath","linearGradient","radialGradient","stop","mask","pattern","image","use","symbol","marker","foreignObject","animate","animateTransform","animateMotion","set","filter","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","title","desc","metadata"]),$=new Set(["math","maction","maligngroup","malignmark","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mlongdiv","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mscarries","mscarry","msgroup","msline","mspace","msqrt","msrow","mstack","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","semantics","annotation","annotation-xml"]),he="http://www.w3.org/2000/svg",Ln="http://www.w3.org/1998/Math/MathML";function vn(e,n){n.as&&(e=n.as);let t;E.has(e)?t=document.createElementNS(he,e):$.has(e)?t=document.createElementNS(Ln,e):t=document.createElement(e);let r="dangerouslySetInnerHTML"in n&&n.dangerouslySetInnerHTML!=null&&typeof n.dangerouslySetInnerHTML=="object"&&"__html"in n.dangerouslySetInnerHTML&&typeof n.dangerouslySetInnerHTML.__html=="string",{className:o,style:l}=fe(n);n.divider&&!n.role&&t.setAttribute("role","separator"),l&&!E.has(e)&&!$.has(e)&&M(t,l);let i=false;for(let[a,s]of Object.entries(n))if(!ue.has(a)&&a!=="as"){if(a==="children")r||Rn(t,s);else if(a==="dangerouslySetInnerHTML")zn(t,s);else if(a==="onload")t.__onload=s,t.setAttribute("data-mine-onload",""),Mn();else if(a==="ref")Hn(t,s);else if(a.startsWith("on"))An(t,a,s);else if(a==="id")Pn(t,s);else if(a==="htmlFor")Nn(t,s);else if(a==="className"||a==="class")i=true,ge(t,s,o);else if(a==="style")Xn(t,s);else if(signals.isSignal(s))Jn(t,a,s);else if(typeof s=="boolean")s&&t.setAttribute(a,"");else if(s!=null)if(E.has(e)||$.has(e)){let p=typeof s=="string"?x(s):String(s);t.setAttribute(a,p);}else if(a in t)t[a]=s;else {let p=typeof s=="string"?x(s):String(s);t.setAttribute(a,p);}}return !i&&o&&ge(t,o),t}function Rn(e,n){h(n).forEach(r=>{if(r instanceof Node)e.appendChild(r);else if(signals.isSignal(r)){let o=document.createTextNode("");signals.effect(()=>{o.textContent=String(r());}),e.appendChild(o);}else r!=null&&r!==false&&e.appendChild(document.createTextNode(String(r)));});}function h(e){return e==null||e===false?[]:Array.isArray(e)?e.flatMap(h):[e]}function Hn(e,n){signals.isSignal(n)?n.set(e):typeof n=="function"&&n(e);}function An(e,n,t){if(typeof t!="function")return;let r=n.slice(2).toLowerCase();e.addEventListener(r,t);}function ge(e,n,t=""){let r=o=>{let l=t?`${t} ${o}`:o,i=de(String(l));e.namespaceURI===he?e.setAttribute("class",i):e.className=i;};signals.isSignal(n)?signals.effect(()=>{let o=n();o!=null?r(String(o)):t&&r("");}):n!=null&&r(String(n));}function Pn(e,n){signals.isSignal(n)?signals.effect(()=>{let t=n();t!=null?e.id=String(t):e.removeAttribute("id");}):n!=null&&(e.id=String(n));}function Nn(e,n){signals.isSignal(n)?signals.effect(()=>{let t=n();t!=null?e.setAttribute("for",String(t)):e.removeAttribute("for");}):n!=null&&e.setAttribute("for",String(n));}function Xn(e,n){signals.isSignal(n)?signals.effect(()=>{let t=n();M(e,t);}):M(e,n);}function M(e,n){typeof n=="string"?e.style.cssText=n:typeof n=="object"&&n!=null&&Object.entries(n).forEach(([t,r])=>{if(r!=null){let o=t.replace(/[A-Z]/g,l=>`-${l.toLowerCase()}`);e.style.setProperty(o,String(r));}});}function zn(e,n){if(n!=null&&typeof n=="object"&&"__html"in n){let t=n.__html;typeof t=="string"&&(e.innerHTML=t);}}function Jn(e,n,t){signals.effect(()=>{let r=t();if(r!=null)if(n in e)e[n]=r;else {let o=typeof r=="string"?x(r):String(r);e.setAttribute(n,o);}else e.removeAttribute(n);});}function nt(e){return e}function tt(e){return n=>e(n)()}function rt(e){let n=document.createDocumentFragment();return e.forEach(t=>{t instanceof Node&&n.appendChild(t);}),n}function ot(e){if(signals.isSignal(e.when)){let n=document.createComment("show"),t=document.createDocumentFragment();t.appendChild(n);let r=null;return signals.effect(()=>{let o=e.when,l=o();l&&!r?(r=h(e.children)[0],r instanceof Node&&n.parentNode?.insertBefore(r,n)):!l&&r&&(r.remove(),r=null);}),t}else return e.when?T(xe,{children:e.children}):null}function it(e){for(let n of e.children)if(signals.isSignal(n.when)?n.when():n.when)return T(xe,{children:n.children});return null}function at(e){let n=document.createDocumentFragment();if(signals.isSignal(e.each)){let t=document.createElement("div");t.style.display="contents",signals.effect(()=>{let r=e.each,o=r();t.innerHTML="",o.forEach((l,i)=>{let a=e.children(l,i);a instanceof Node&&t.appendChild(a);});}),n.appendChild(t);}else e.each.forEach((r,o)=>{let l=e.children(r,o);l instanceof Node&&n.appendChild(l);});return n}
|
|
2
|
+
exports.ErrorBoundary=Fn;exports.For=at;exports.Fragment=xe;exports.Show=ot;exports.Suspense=On;exports.Switch=it;exports.Teleport=kn;exports.cleanClassName=de;exports.component=nt;exports.createElements=rt;exports.createPortal=Ge;exports.createRoot=Gn;exports.defineComponent=tt;exports.hydrate=Dn;exports.isBrowser=Ke;exports.jsx=T;exports.jsxs=et;exports.lazy=_n;exports.minifyHTML=qn;exports.mount=Wn;exports.normalizeString=x;exports.onDOMReady=Bn;exports.queueUpdate=In;exports.render=S;//# sourceMappingURL=index.cjs.map
|
|
3
3
|
//# sourceMappingURL=index.cjs.map
|