@papack/csr 1.0.1 → 1.1.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/dist/index.cjs CHANGED
@@ -1 +1 @@
1
- const e=[];function t(){return e.length>0}function n(){e.push({mounts:[],unmounts:[]})}function r(t){let n=e.pop();if(!n)throw Error(`endMountSession called without active mount session`);for(let e of n.mounts)try{let n=e(t);n instanceof Promise&&n.catch(e=>console.error(`async mount callback failed`,e))}catch(e){console.error(`mount callback failed`,e)}if(n.unmounts.length>0){let e=t.__unmountCbs;e?e.push(...n.unmounts):t.__unmountCbs=[...n.unmounts]}}function i(t){let n=e[e.length-1];if(!n)throw Error(`mount(cb) called outside of a render session`);n.mounts.push(t)}function a(t){let n=e[e.length-1];if(!n)throw Error(`unmount(cb) called outside of a render session`);n.unmounts.push(t)}function o(e){let t=e.__unmountCbs;if(!(!t||t.length===0)){for(let e=t.length-1;e>=0;e--)try{let n=t[e]();n instanceof Promise&&n.catch(e=>console.error(`async unmount callback failed`,e))}catch(e){console.error(`unmount callback failed`,e)}e.__unmountCbs=void 0}}function s(e){let t=e,n=crypto.randomUUID();l.addTopic(n);let r=e=>(e&&(l.registerClbk(n,e),e(t)),t);return r.type=`signal`,[r,async e=>{let r=e(t);t=r instanceof Promise?await r:r,l.update(n,t)}]}var c=class{topics=new Map;callbackMap=new Map;addTopic(e){this.topics.set(e,new Set)}removeTopic(e){let t=this.topics.get(e);if(t)for(let e of t)this.callbackMap.delete(e);this.topics.delete(e)}registerClbk(e,t){let n=this.topics.get(e);if(!n)throw Error(`Connector: unknown topic ${e}`);let r=this.callbackMap.get(t);if(r){r.refCount++;return}n.add(t),this.callbackMap.set(t,{uuid:e,refCount:1})}removeClbk(e,t){let n=this.callbackMap.get(t);n&&(n.refCount--,!(n.refCount>0)&&(this.topics.get(n.uuid)?.delete(t),this.callbackMap.delete(t)))}update(e,t){let n=this.topics.get(e);if(n)for(let e of n)e(t)}getUuidByClbk(e){let t=this.callbackMap.get(e);if(!t)throw Error(`Connector: no UUID for callback`);return t.uuid}};const l=new c;function u(e,n){let r=!1,i=e=>{if(!r){r=!0;return}try{let t=n(e);t instanceof Promise&&t.catch(e=>{console.error(`effect async callback failed`,e)})}catch(e){console.error(`effect callback failed`,e)}};e(i),t()&&a(()=>{let e=l.getUuidByClbk(i);l.removeClbk(e,i)})}function d(e,t){if(e==null)return{el:t.parent};if(Array.isArray(e)){let n=t.parent;for(let r of e)n=d(r,t).el;return{el:n}}if(e.kind===`text`)return{el:m(e,t)};if(e.kind===`signal`)return{el:te(e,t)};if(typeof e.tag==`function`){let i=e,a=i.tag;n();let o=d(a({...i.props,ctx:t},i.children),t);if(!(o.el instanceof Element))throw Error(`Component root must be a DOM Element`);return r(o.el),t.self=o.el,o}let i=p(e,t),a={...t,parent:i,self:t.self};for(let t of e.children)d(t,a);return{el:i}}const ee=`http://www.w3.org/2000/svg`,f=new Set([`svg`,`path`,`circle`,`rect`,`line`,`polyline`,`polygon`,`g`,`defs`,`linearGradient`,`radialGradient`,`stop`,`mask`,`clipPath`,`pattern`,`text`,`tspan`,`use`,`symbol`,`view`,`ellipse`,`foreignObject`]);function p(e,t){if(typeof e.tag!=`string`)throw Error(`Host renderer expects string tag`);let n=e.tag,r=f.has(n),i=r?document.createElementNS(`http://www.w3.org/2000/svg`,n):document.createElement(n),a=e.props??{};for(let[e,t]of Object.entries(a))if(!(e===`ctx`||e===`children`)){if(e.startsWith(`on`)&&typeof t==`function`){let n=e.slice(2).toLowerCase();i.addEventListener(n,t);continue}if(e===`style`&&t&&typeof t==`object`){for(let[e,n]of Object.entries(t))if(typeof n==`function`&&n.type===`signal`){let t=n();i.style[e]=String(t),n(t=>{i.style[e]=String(t)})}else i.style[e]=String(n);continue}if(typeof t==`function`&&t.type===`signal`){let n=t=>{r?i.setAttribute(e,String(t)):i[e]=t};n(t()),h(t,n);continue}r?i.setAttribute(e,String(t)):e in i?i[e]=t:i.setAttribute(e,String(t))}return t.parent.appendChild(i),i}function m(e,t){let n=document.createTextNode(e.value);return t.parent.appendChild(n),n}function te(e,n){let r=document.createTextNode(``);n.parent.appendChild(r);let i=e=>{r.nodeValue=String(e)};return r.nodeValue=String(e.read()),e.read(i),t()&&a(()=>{let e=l.getUuidByClbk(i);l.removeClbk(e,i)}),r}function h(e,n){let r=e=>n(e);e(r),t()&&a(()=>{let e=l.getUuidByClbk(r);l.removeClbk(e,r)})}function g(e){let t=Array.from(e.childNodes);for(let e of t)_(e);o(e),e.parentNode?e.parentNode.removeChild(e):e.remove()}function _(e){if(e instanceof Element){let t=Array.from(e.childNodes);for(let e of t)_(e);o(e),e.parentNode?e.parentNode.removeChild(e):e.remove();return}e.parentNode&&e.parentNode.removeChild(e)}function v(e,t,...n){return{kind:`element`,tag:e,props:t??{},children:n.flatMap(y)}}function y(e){return e==null||e===!1||e===!0?[]:typeof e==`function`&&e?.type===`signal`?{kind:`signal`,read:e}:typeof e==`string`||typeof e==`number`?{kind:`text`,value:String(e)}:Array.isArray(e)?e.flatMap(y):e}function b(e,[t]){let n=v(`csr-for-host`,{style:{display:`contents`}});return i(r=>{let{el:i}=d(n,{parent:r}),a=i,o=new Map,s=[];function c(n){let r=[];for(let i of n){if(!i||i.uuid==null)continue;let n=i.uuid;if(r.push(n),!o.has(n)){let{el:r}=d(t(i),{...e.ctx,parent:a});if(!(r instanceof Element))throw Error(`For: child root must be an Element`);o.set(n,r)}}for(let e of s)if(!r.includes(e)){let t=o.get(e);t&&g(t),o.delete(e)}let i=null;for(let e=r.length-1;e>=0;e--){let t=o.get(r[e]);a.insertBefore(t,i),i=t}s=r}c(e.each()),u(e.each,c)}),null}function x(e,...t){return t}function S(e,t){let n=v(`csr-show-host`,{style:{display:`contents`}}),r=v(`csr-show-content`,{style:{display:`contents`}},...t),a=null,o=null,s=!1;return i(t=>{let{el:i}=d(n,{parent:t});a=i,e.when(t=>{if(t===s)return;if(s=t,!s){o&&=(g(o),null);return}let{el:n}=d(r,{...e.ctx,parent:a});if(!(n instanceof Element))throw Error(`Show: content root must be an Element`);o=n})}),null}function C(e,t){if(typeof e.n==`number`){let n=[];for(let r=0;r<e.n;r++)n.push(t);return n}let n=e.n,[r,i]=s([]);return n(e=>{let t=[];for(let n=0;n<e;n++)t.push({uuid:String(n)});i(()=>t)}),v(b,{each:r},()=>t)}const w={mobile:0,tablet:601,laptop:1025,desktop:1441,large:1921};function T(e){return e>=w.large?`large`:e>=w.desktop?`desktop`:e>=w.laptop?`laptop`:e>=w.tablet?`tablet`:`mobile`}const[E,D]=s(T(window.innerWidth));let O=E();window.addEventListener(`resize`,()=>{let e=T(window.innerWidth);e!==O&&(O=e,D(()=>e))});function k(){return E}function A(e,t){if(t){let n=e=>{t(e.detail)};window.addEventListener(e,n),a(()=>{window.removeEventListener(e,n)})}return function(t){window.dispatchEvent(new CustomEvent(e,{detail:t}))}}const[j,M]=s(`en-US`);function N(){return{locale:j,setLocale(e){M(()=>e)}}}const[P,F]=s(`/`);window.addEventListener(`popstate`,e=>{let t=e.state?.route;typeof t==`string`&&F(()=>t)});function I(){return{route:P,navigate:e=>{e!==P()&&(history.pushState({route:e},``),F(()=>e))}}}function L(e,t){return v(`div`,{...e,style:{marginBottom:e.mb??e.my??e.m,marginLeft:e.ml??e.mx??e.m,marginRight:e.mr??e.mx??e.m,marginTop:e.mt??e.my??e.m,paddingBottom:e.pb??e.py??e.p,paddingLeft:e.pl??e.px??e.p,paddingRight:e.pr??e.px??e.p,paddingTop:e.pt??e.py??e.p,background:e.bg,opacity:e.o,boxShadow:e.sh,borderTop:e.bt??e.by??e.b,borderRight:e.br??e.bx??e.b,borderBottom:e.bb??e.by??e.b,borderLeft:e.bl??e.bx??e.b,borderTopRightRadius:e.rtr??e.rt??e.rr??e.r,borderTopLeftRadius:e.rtl??e.rt??e.rl??e.r,borderBottomRightRadius:e.rbr??e.rb??e.rr??e.r,borderBottomLeftRadius:e.rbl??e.rb??e.rl??e.r,width:e.w??e.s,height:e.h??e.s,maxWidth:e.maxW,maxHeight:e.maxH,minWidth:e.minW,minHeight:e.minH,...e.style}},t)}function R(e,t){return v(L,{...e,style:{position:`absolute`,top:e.top,right:e.right,bottom:e.bottom,left:e.left,...e.style}},t)}function z(e,t){return v(L,{...e,style:{flex:e.flx,alignSelf:e.as,flexGrow:e.flxGrow,flexShrink:e.flxShrink,flexBasis:e.flxBasis,...e.style}},t)}function B(e,t){return v(z,{...e,style:{display:`flex`,justifyContent:e.jc,alignItems:e.ai,alignContent:e.ac,gap:e.g,flexDirection:e.flxDirection,flexWrap:e.flxWrap,flexFlow:e.flxFlow,...e.style}},t)}function V(e,t){return v(B,{...e,ai:e.ai??`center`,jc:e.jc??`center`},t)}function H(e,t){return v(L,{...e,style:{position:`fixed`,top:e.top,right:e.right,bottom:e.bottom,left:e.left,zIndex:e.zIndex,...e.style}},t)}function U(e,t){return v(L,{...e,style:{gridArea:e.grdArea,gridColumn:e.grdColumn,gridRow:e.grdRow,...e.style}},t)}function ne(e,t){return v(U,{...e,style:{display:`grid`,gap:e.g,alignItems:e.ai,justifyItems:e.ji,alignSelf:e.as,gridTemplateColumns:e.grdTemplateColumns,gridTemplateRows:e.grdTemplateRows,gridTemplateAreas:e.grdTemplateAreas,gridTemplate:e.grdTemplate,gridAutoColumns:e.grdAutoColumns,gridAutoRows:e.grdAutoRows,gridAutoFlow:e.grdAutoFlow,gridArea:e.grd,gridRowStart:e.grdRowStart,gridColumnStart:e.grdColumnStart,gridRowEnd:e.grdRowEnd,gridColumnEnd:e.grdColumnEnd,gridRow:e.grdRow,gridColumn:e.grdColumn,rowGap:e.grdRowGap,columnGap:e.grdColumnGap,...e.style}},t)}function W(e,t){return v(L,{...e,style:{position:`relative`,zIndex:e.zIndex,...e.style}},t)}function G(e,t){return v(W,{s:`100%`},v(R,{top:`0`,right:`0`,bottom:`0`,left:`0`,...e,style:{overflow:`auto`,...e.style}},t))}function K(e,t){return v(B,{...e,flxDirection:e.flxDirection??`column`},t)}function q(e,t){return v(L,{...e,style:{position:`sticky`,top:e.top,right:e.right,bottom:e.bottom,left:e.left,zIndex:e.zIndex,...e.style}},t)}function J(e,t){return v(e.tag??`p`,{...e,style:{textAlign:e.a,fontFamily:e.ff,fontWeight:e.fw,fontSize:e.fs,lineHeight:e.lh,letterSpacing:e.ls,fontStyle:e.s,color:e.c,margin:e.m,marginBottom:e.mb??e.my??e.m,marginLeft:e.ml??e.mx??e.m,marginRight:e.mr??e.mx??e.m,marginTop:e.mt??e.my??e.m,padding:e.p,paddingBottom:e.pb??e.py??e.p,paddingLeft:e.pl??e.px??e.p,paddingRight:e.pr??e.px??e.p,paddingTop:e.pt??e.py??e.p,background:e.bg}},...t)}const Y={brand:`#000`,onBrand:`#fff`,gray0:`#f8f9fa`,gray100:`#f1f3f5`,gray200:`#e9ecef`,gray300:`#dee2e6`,gray400:`#ced4da`,gray500:`#adb5bd`,gray600:`#868e96`,gray700:`#495057`,gray800:`#343a40`,gray900:`#212529`,red0:`#fff5f5`,red100:`#ffe3e3`,red200:`#ffc9c9`,red300:`#ffa8a8`,red400:`#ff8787`,red500:`#ff6b6b`,red600:`#fa5252`,red700:`#f03e3e`,red800:`#e03131`,red900:`#c92a2a`,pink0:`#fff0f6`,pink100:`#ffdeeb`,pink200:`#fcc2d7`,pink300:`#faa2c1`,pink400:`#f783ac`,pink500:`#f06595`,pink600:`#e64980`,pink700:`#d6336c`,pink800:`#c2255c`,pink900:`#a61e4d`,grape0:`#f8f0fc`,grape100:`#f3d9fa`,grape200:`#eebefa`,grape300:`#e599f7`,grape400:`#da77f2`,grape500:`#cc5de8`,grape600:`#be4bdb`,grape700:`#ae3ec9`,grape800:`#9c36b5`,grape900:`#862e9c`,violet0:`#f3f0ff`,violet100:`#e5dbff`,violet200:`#d0bfff`,violet300:`#b197fc`,violet400:`#9775fa`,violet500:`#845ef7`,violet600:`#7950f2`,violet700:`#7048e8`,violet800:`#6741d9`,violet900:`#5f3dc4`,indigo0:`#edf2ff`,indigo100:`#dbe4ff`,indigo200:`#bac8ff`,indigo300:`#91a7ff`,indigo400:`#748ffc`,indigo500:`#5c7cfa`,indigo600:`#4c6ef5`,indigo700:`#4263eb`,indigo800:`#3b5bdb`,indigo900:`#364fc7`,blue0:`#e7f5ff`,blue100:`#d0ebff`,blue200:`#a5d8ff`,blue300:`#74c0fc`,blue400:`#4dabf7`,blue500:`#339af0`,blue600:`#228be6`,blue700:`#1c7ed6`,blue800:`#1971c2`,blue900:`#1864ab`,cyan0:`#e3fafc`,cyan100:`#c5f6fa`,cyan200:`#99e9f2`,cyan300:`#66d9e8`,cyan400:`#3bc9db`,cyan500:`#22b8cf`,cyan600:`#15aabf`,cyan700:`#1098ad`,cyan800:`#0c8599`,cyan900:`#0b7285`,teal0:`#e6fcf5`,teal100:`#c3fae8`,teal200:`#96f2d7`,teal300:`#63e6be`,teal400:`#38d9a9`,teal500:`#20c997`,teal600:`#12b886`,teal700:`#0ca678`,teal800:`#099268`,teal900:`#087f5b`,green0:`#ebfbee`,green100:`#d3f9d8`,green200:`#b2f2bb`,green300:`#8ce99a`,green400:`#69db7c`,green500:`#51cf66`,green600:`#40c057`,green700:`#37b24d`,green800:`#2f9e44`,green900:`#2b8a3e`,lime0:`#f4fce3`,lime100:`#e9fac8`,lime200:`#d8f5a2`,lime300:`#c0eb75`,lime400:`#a9e34b`,lime500:`#94d82d`,lime600:`#82c91e`,lime700:`#74b816`,lime800:`#66a80f`,lime900:`#5c940d`,yellow0:`#fff9db`,yellow100:`#fff3bf`,yellow200:`#ffec99`,yellow300:`#ffe066`,yellow400:`#ffd43b`,yellow500:`#fcc419`,yellow600:`#fab005`,yellow700:`#f59f00`,yellow800:`#f08c00`,yellow900:`#e67700`,orange0:`#fff4e6`,orange100:`#ffe8cc`,orange200:`#ffd8a8`,orange300:`#ffc078`,orange400:`#ffa94d`,orange500:`#ff922b`,orange600:`#fd7e14`,orange700:`#f76707`,orange800:`#e8590c`,orange900:`#d9480f`},X={sans:`sans-serif`,serif:`serif`,mono:`monospace`},Z={xs:`-0.05em`,sm:`-0.025em`,md:`0em`,lg:`0.025em`,xl:`0.05em`,"2xl":`0.1em`,"3xl":`0.15em`,"4xl":`0.2em`,"5xl":`0.25em`,"6xl":`0.3em`,"7xl":`0.35em`,"8xl":`0.4em`,"9xl":`0.45em`},Q={xs:`1rem`,sm:`1.25rem`,md:`1.5rem`,lg:`1.75rem`,xl:`2rem`,"2xl":`2.25rem`,"3xl":`2.5rem`,"4xl":`2.75rem`,"5xl":`3rem`,"6xl":`3.25rem`,"7xl":`3.5rem`,"8xl":`3.75rem`,"9xl":`4rem`},re={xs:`0.75rem`,sm:`0.875rem`,md:`1rem`,lg:`1.125rem`,xl:`1.25rem`,"2xl":`1.5rem`,"3xl":`1.875rem`,"4xl":`2.25rem`,"5xl":`3rem`,"6xl":`3.75rem`,"7xl":`4.5rem`,"8xl":`6rem`,"9xl":`8rem`},ie={normal:`normal`,italic:`italic`},$={thin:100,extralight:200,light:300,normal:400,medium:500,semibold:600,bold:700,extrabold:800,black:900},ae={family:X,size:re,weight:$,style:ie,lineHeight:Q,letterSpacing:Z},oe={sm:`0.125rem`,md:`0.375rem`,lg:`0.5rem`,xl:`0.75rem`,"2xl":`1rem`,"3xl":`1.5rem`,full:`9999px`},se={sm:`0 1px 2px 0 rgb(0 0 0 / 0.05)`,md:`0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1)`,lg:`0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)`,xl:`0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1)`,"2xl":`0 25px 50px -12px rgb(0 0 0 / 0.25)`,inner:`inset 0 2px 4px 0 rgb(0 0 0 / 0.05)`},ce={xs:`0.75rem`,sm:`0.875rem`,md:`1rem`,lg:`1.125rem`,xl:`1.25rem`,"2xl":`1.5rem`,"3xl":`1.875rem`,"4xl":`2.25rem`,"5xl":`3rem`,"6xl":`3.75rem`,"7xl":`4.5rem`,"8xl":`6rem`,"9xl":`8rem`,"1/12":`8.333333%`,"2/12":`16.666667%`,"3/12":`25%`,"4/12":`33.333333%`,"5/12":`41.666667%`,"6/12":`50%`,"7/12":`58.333333%`,"8/12":`66.666667%`,"9/12":`75%`,"10/12":`83.333333%`,"11/12":`91.666667%`,"1/5":`20%`,"2/5":`40%`,"3/5":`60%`,"4/5":`80%`,"1/4":`25%`,"3/4":`75%`,"1/3":`33.333333%`,"2/3":`66.666667%`,"1/2":`50%`,full:`100%`},le={xs:`0.125rem`,sm:`0.25rem`,md:`0.5rem`,lg:`0.75rem`,xl:`1rem`,xxl:`1.5rem`,"3xl":`2rem`,"4xl":`2.5rem`,"5xl":`3rem`,"6xl":`3.5rem`,"7xl":`4rem`,"8xl":`4.5rem`},ue={normal:`normal`,italic:`italic`},de={thin:100,extralight:200,light:300,normal:400,medium:500,semibold:600,bold:700,extrabold:800,black:900},fe={base:`100`,background:`200`,menu:`300`};exports.Absolute=R,exports.Box=L,exports.Center=V,exports.Fixed=H,exports.Flex=B,exports.FlexItem=z,exports.For=b,exports.Grid=ne,exports.GridItem=U,exports.Relative=W,exports.Repeat=C,exports.Scroll=G,exports.Show=S,exports.Stack=K,exports.Sticky=q,exports.Text=J,exports.beginMountSession=n,exports.breakpoint=w,exports.color=Y,exports.connector=l,exports.effect=u,exports.endMountSession=r,exports.font=ae,exports.fragment=x,exports.hasActiveMountSession=t,exports.jsx=v,exports.mount=i,exports.radius=oe,exports.render=d,exports.runUnmountsForElement=o,exports.shadow=se,exports.signal=s,exports.size=ce,exports.space=le,exports.style=ue,exports.unmount=a,exports.useBreakpoint=k,exports.useCustomEvent=A,exports.useLocale=N,exports.useRouter=I,exports.weight=de,exports.zIndex=fe;
1
+ const e=[];function t(){return e.length>0}function n(){e.push({mounts:[],unmounts:[]})}function r(t){let n=e.pop();if(!n)throw Error(`endMountSession called without active mount session`);for(let e of n.mounts)try{let n=e(t);n instanceof Promise&&n.catch(e=>console.error(`async mount callback failed`,e))}catch(e){console.error(`mount callback failed`,e)}if(n.unmounts.length>0){let e=t.__unmountCbs;e?e.push(...n.unmounts):t.__unmountCbs=[...n.unmounts]}}function i(t){let n=e[e.length-1];if(!n)throw Error(`mount(cb) called outside of a render session`);n.mounts.push(t)}function a(t){let n=e[e.length-1];if(!n)throw Error(`unmount(cb) called outside of a render session`);n.unmounts.push(t)}function o(e){let t=e.__unmountCbs;if(!(!t||t.length===0)){for(let e=t.length-1;e>=0;e--)try{let n=t[e]();n instanceof Promise&&n.catch(e=>console.error(`async unmount callback failed`,e))}catch(e){console.error(`unmount callback failed`,e)}e.__unmountCbs=void 0}}function s(e){let t=e,n=crypto.randomUUID();l.addTopic(n);let r=e=>(e&&(l.registerClbk(n,e),e(t)),t);return r.type=`signal`,[r,async e=>{let r=e(t);t=r instanceof Promise?await r:r,l.update(n,t)}]}var c=class{topics=new Map;callbackMap=new Map;addTopic(e){this.topics.set(e,new Set)}removeTopic(e){let t=this.topics.get(e);if(t)for(let e of t)this.callbackMap.delete(e);this.topics.delete(e)}registerClbk(e,t){let n=this.topics.get(e);if(!n)throw Error(`Connector: unknown topic ${e}`);let r=this.callbackMap.get(t);if(r){r.refCount++;return}n.add(t),this.callbackMap.set(t,{uuid:e,refCount:1})}removeClbk(e,t){let n=this.callbackMap.get(t);n&&(n.refCount--,!(n.refCount>0)&&(this.topics.get(n.uuid)?.delete(t),this.callbackMap.delete(t)))}update(e,t){let n=this.topics.get(e);if(n)for(let e of n)e(t)}getUuidByClbk(e){let t=this.callbackMap.get(e);if(!t)throw Error(`Connector: no UUID for callback`);return t.uuid}};const l=new c;function u(e,n){let r=!1,i=e=>{if(!r){r=!0;return}try{let t=n(e);t instanceof Promise&&t.catch(e=>{console.error(`effect async callback failed`,e)})}catch(e){console.error(`effect callback failed`,e)}};e(i),t()&&a(()=>{let e=l.getUuidByClbk(i);l.removeClbk(e,i)})}function d(e,t){if(e==null)return{el:t.parent};if(Array.isArray(e)){let n=t.parent;for(let r of e)n=d(r,t).el;return{el:n}}if(e.kind===`text`)return{el:m(e,t)};if(e.kind===`signal`)return{el:h(e,t)};if(typeof e.tag==`function`){let i=e,a=i.tag;n();let o=d(a({...i.props,ctx:t},i.children),t);if(!(o.el instanceof Element))throw Error(`Component root must be a DOM Element`);return r(o.el),t.self=o.el,o}let i=p(e,t),a={...t,parent:i,self:t.self};for(let t of e.children)d(t,a);return{el:i}}const ee=`http://www.w3.org/2000/svg`,f=new Set([`svg`,`path`,`circle`,`rect`,`line`,`polyline`,`polygon`,`g`,`defs`,`linearGradient`,`radialGradient`,`stop`,`mask`,`clipPath`,`pattern`,`text`,`tspan`,`use`,`symbol`,`view`,`ellipse`,`foreignObject`]);function p(e,t){if(typeof e.tag!=`string`)throw Error(`Host renderer expects string tag`);let n=e.tag,r=f.has(n),i=r?document.createElementNS(`http://www.w3.org/2000/svg`,n):document.createElement(n),a=e.props??{};for(let[e,t]of Object.entries(a))if(!(e===`ctx`||e===`children`)){if(e.startsWith(`on`)&&typeof t==`function`){let n=e.slice(2).toLowerCase();i.addEventListener(n,t);continue}if(e===`style`&&t&&typeof t==`object`){for(let[e,n]of Object.entries(t))if(n!==void 0)if(typeof n==`function`&&n.type===`signal`){let t=n();i.style[e]=String(t),n(t=>{i.style[e]=String(t)})}else i.style[e]=String(n);continue}if(typeof t==`function`&&t.type===`signal`){let n=t=>{r?i.setAttribute(e,String(t)):i[e]=t};n(t()),g(t,n);continue}r?i.setAttribute(e,String(t)):e in i?i[e]=t:i.setAttribute(e,String(t))}return t.parent.appendChild(i),i}function m(e,t){let n=document.createTextNode(e.value);return t.parent.appendChild(n),n}function h(e,n){let r=document.createTextNode(``);n.parent.appendChild(r);let i=e=>{r.nodeValue=String(e)};return r.nodeValue=String(e.read()),e.read(i),t()&&a(()=>{let e=l.getUuidByClbk(i);l.removeClbk(e,i)}),r}function g(e,n){let r=e=>n(e);e(r),t()&&a(()=>{let e=l.getUuidByClbk(r);l.removeClbk(e,r)})}function _(e){let t=Array.from(e.childNodes);for(let e of t)v(e);o(e),e.parentNode?e.parentNode.removeChild(e):e.remove()}function v(e){if(e instanceof Element){let t=Array.from(e.childNodes);for(let e of t)v(e);o(e),e.parentNode?e.parentNode.removeChild(e):e.remove();return}e.parentNode&&e.parentNode.removeChild(e)}function y(e,t,...n){return{kind:`element`,tag:e,props:t??{},children:n.flatMap(b)}}function b(e){return e==null||e===!1||e===!0?[]:typeof e==`function`&&e?.type===`signal`?{kind:`signal`,read:e}:typeof e==`string`||typeof e==`number`?{kind:`text`,value:String(e)}:Array.isArray(e)?e.flatMap(b):e}function x(e,[t]){let n=y(`csr-for-host`,{style:{display:`contents`}});return i(r=>{let{el:i}=d(n,{parent:r}),a=i,o=new Map,s=[];function c(n){let r=[];for(let i of n){if(!i||i.uuid==null)continue;let n=i.uuid;if(r.push(n),!o.has(n)){let{el:r}=d(t(i),{...e.ctx,parent:a});if(!(r instanceof Element))throw Error(`For: child root must be an Element`);o.set(n,r)}}for(let e of s)if(!r.includes(e)){let t=o.get(e);t&&_(t),o.delete(e)}let i=null;for(let e=r.length-1;e>=0;e--){let t=o.get(r[e]);a.insertBefore(t,i),i=t}s=r}c(e.each()),u(e.each,c)}),null}function S(e,...t){return t}function C(e,t){let n=y(`csr-show-host`,{style:{display:`contents`}}),r=y(`csr-show-content`,{style:{display:`contents`}},...t),a=null,o=null,s=!1;return i(t=>{let{el:i}=d(n,{parent:t});a=i,e.when(t=>{if(t===s)return;if(s=t,!s){o&&=(_(o),null);return}let{el:n}=d(r,{...e.ctx,parent:a});if(!(n instanceof Element))throw Error(`Show: content root must be an Element`);o=n})}),null}function w(e,t){if(typeof e.n==`number`){let n=[];for(let r=0;r<e.n;r++)n.push(t);return n}let n=e.n,[r,i]=s([]);return n(e=>{let t=[];for(let n=0;n<e;n++)t.push({uuid:String(n)});i(()=>t)}),y(x,{each:r},()=>t)}const T={mobile:0,tablet:601,laptop:1025,desktop:1441,large:1921};function E(e){return e>=T.large?`large`:e>=T.desktop?`desktop`:e>=T.laptop?`laptop`:e>=T.tablet?`tablet`:`mobile`}const[D,te]=s(E(window.innerWidth));let O=D();window.addEventListener(`resize`,()=>{let e=E(window.innerWidth);e!==O&&(O=e,te(()=>e))});function k(){return D}function A(e,t){if(t){let n=e=>{t(e.detail)};window.addEventListener(e,n),a(()=>{window.removeEventListener(e,n)})}return function(t){window.dispatchEvent(new CustomEvent(e,{detail:t}))}}function j(e,t){let n=t;try{let t=localStorage.getItem(e);t!==null&&(n=JSON.parse(t))}catch(t){console.error(`[useLocalStorage] Failed to read key "${e}"`,t)}let[r,i]=s(n);function a(t){try{localStorage.setItem(e,JSON.stringify(t))}catch(t){console.error(`[useLocalStorage] Failed to write key "${e}"`,t)}i(()=>t)}function o(){try{localStorage.removeItem(e)}catch(t){console.error(`[useLocalStorage] Failed to remove key "${e}"`,t)}i(()=>t)}return[r,a,o]}const[M,N]=s(`en-US`);function P(){return{locale:M,setLocale(e){N(()=>e)}}}const[F,I]=s(`/`);window.addEventListener(`popstate`,e=>{let t=e.state?.route;typeof t==`string`&&I(()=>t)});function L(){return{route:F,navigate:e=>{e!==F()&&(history.pushState({route:e},``),I(()=>e))}}}function R(e,t){let n=t;try{let t=sessionStorage.getItem(e);t!==null&&(n=JSON.parse(t))}catch(t){console.error(`[useSessionStorage] Failed to read key "${e}"`,t)}let[r,i]=s(n);function a(t){try{sessionStorage.setItem(e,JSON.stringify(t))}catch(t){console.error(`[useSessionStorage] Failed to write key "${e}"`,t)}i(()=>t)}function o(){try{sessionStorage.removeItem(e)}catch(t){console.error(`[useSessionStorage] Failed to remove key "${e}"`,t)}i(()=>t)}return[r,a,o]}function z(e,t){return y(`div`,{...e,style:{marginBottom:e.mb??e.my??e.m,marginLeft:e.ml??e.mx??e.m,marginRight:e.mr??e.mx??e.m,marginTop:e.mt??e.my??e.m,paddingBottom:e.pb??e.py??e.p,paddingLeft:e.pl??e.px??e.p,paddingRight:e.pr??e.px??e.p,paddingTop:e.pt??e.py??e.p,background:e.bg,opacity:e.o,boxShadow:e.sh,borderTop:e.bt??e.by??e.b,borderRight:e.br??e.bx??e.b,borderBottom:e.bb??e.by??e.b,borderLeft:e.bl??e.bx??e.b,borderTopRightRadius:e.rtr??e.rt??e.rr??e.r,borderTopLeftRadius:e.rtl??e.rt??e.rl??e.r,borderBottomRightRadius:e.rbr??e.rb??e.rr??e.r,borderBottomLeftRadius:e.rbl??e.rb??e.rl??e.r,width:e.w??e.s,height:e.h??e.s,maxWidth:e.maxW,maxHeight:e.maxH,minWidth:e.minW,minHeight:e.minH,...e.style}},t)}function B(e,t){return y(z,{...e,style:{position:`absolute`,top:e.top,right:e.right,bottom:e.bottom,left:e.left,...e.style}},t)}function V(e,t){return y(z,{...e,style:{flex:e.flx,alignSelf:e.as,flexGrow:e.flxGrow,flexShrink:e.flxShrink,flexBasis:e.flxBasis,...e.style}},t)}function H(e,t){return y(V,{...e,style:{display:`flex`,justifyContent:e.jc,alignItems:e.ai,alignContent:e.ac,gap:e.g,flexDirection:e.flxDirection,flexWrap:e.flxWrap,flexFlow:e.flxFlow,...e.style}},t)}function U(e,t){return y(H,{...e,ai:e.ai??`center`,jc:e.jc??`center`},t)}function ne(e,t){return y(z,{...e,style:{position:`fixed`,top:e.top,right:e.right,bottom:e.bottom,left:e.left,zIndex:e.zIndex,...e.style}},t)}function W(e,t){return y(z,{...e,style:{gridArea:e.grdArea,gridColumn:e.grdColumn,gridRow:e.grdRow,...e.style}},t)}function G(e,t){return y(W,{...e,style:{display:`grid`,gap:e.g,alignItems:e.ai,justifyItems:e.ji,alignSelf:e.as,gridTemplateColumns:e.grdTemplateColumns,gridTemplateRows:e.grdTemplateRows,gridTemplateAreas:e.grdTemplateAreas,gridTemplate:e.grdTemplate,gridAutoColumns:e.grdAutoColumns,gridAutoRows:e.grdAutoRows,gridAutoFlow:e.grdAutoFlow,gridArea:e.grd,gridRowStart:e.grdRowStart,gridColumnStart:e.grdColumnStart,gridRowEnd:e.grdRowEnd,gridColumnEnd:e.grdColumnEnd,gridRow:e.grdRow,gridColumn:e.grdColumn,rowGap:e.grdRowGap,columnGap:e.grdColumnGap,...e.style}},t)}function K(e,t){return y(z,{...e,style:{position:`relative`,zIndex:e.zIndex,...e.style}},t)}function q(e,t){return y(K,{s:`100%`},y(B,{top:`0`,right:`0`,bottom:`0`,left:`0`,...e,style:{overflow:`auto`,...e.style}},t))}function J(e,t){return y(H,{...e,flxDirection:e.flxDirection??`column`},t)}function Y(e,t){return y(z,{...e,style:{position:`sticky`,top:e.top,right:e.right,bottom:e.bottom,left:e.left,zIndex:e.zIndex,...e.style}},t)}function X(e,t){return y(e.tag??`p`,{...e,style:{textAlign:e.a,fontFamily:e.ff,fontWeight:e.fw,fontSize:e.fs,lineHeight:e.lh,letterSpacing:e.ls,fontStyle:e.s,color:e.c,margin:e.m,marginBottom:e.mb??e.my??e.m,marginLeft:e.ml??e.mx??e.m,marginRight:e.mr??e.mx??e.m,marginTop:e.mt??e.my??e.m,padding:e.p,paddingBottom:e.pb??e.py??e.p,paddingLeft:e.pl??e.px??e.p,paddingRight:e.pr??e.px??e.p,paddingTop:e.pt??e.py??e.p,background:e.bg}},...t)}const Z={brand:`#000`,onBrand:`#fff`,gray0:`#f8f9fa`,gray100:`#f1f3f5`,gray200:`#e9ecef`,gray300:`#dee2e6`,gray400:`#ced4da`,gray500:`#adb5bd`,gray600:`#868e96`,gray700:`#495057`,gray800:`#343a40`,gray900:`#212529`,red0:`#fff5f5`,red100:`#ffe3e3`,red200:`#ffc9c9`,red300:`#ffa8a8`,red400:`#ff8787`,red500:`#ff6b6b`,red600:`#fa5252`,red700:`#f03e3e`,red800:`#e03131`,red900:`#c92a2a`,pink0:`#fff0f6`,pink100:`#ffdeeb`,pink200:`#fcc2d7`,pink300:`#faa2c1`,pink400:`#f783ac`,pink500:`#f06595`,pink600:`#e64980`,pink700:`#d6336c`,pink800:`#c2255c`,pink900:`#a61e4d`,grape0:`#f8f0fc`,grape100:`#f3d9fa`,grape200:`#eebefa`,grape300:`#e599f7`,grape400:`#da77f2`,grape500:`#cc5de8`,grape600:`#be4bdb`,grape700:`#ae3ec9`,grape800:`#9c36b5`,grape900:`#862e9c`,violet0:`#f3f0ff`,violet100:`#e5dbff`,violet200:`#d0bfff`,violet300:`#b197fc`,violet400:`#9775fa`,violet500:`#845ef7`,violet600:`#7950f2`,violet700:`#7048e8`,violet800:`#6741d9`,violet900:`#5f3dc4`,indigo0:`#edf2ff`,indigo100:`#dbe4ff`,indigo200:`#bac8ff`,indigo300:`#91a7ff`,indigo400:`#748ffc`,indigo500:`#5c7cfa`,indigo600:`#4c6ef5`,indigo700:`#4263eb`,indigo800:`#3b5bdb`,indigo900:`#364fc7`,blue0:`#e7f5ff`,blue100:`#d0ebff`,blue200:`#a5d8ff`,blue300:`#74c0fc`,blue400:`#4dabf7`,blue500:`#339af0`,blue600:`#228be6`,blue700:`#1c7ed6`,blue800:`#1971c2`,blue900:`#1864ab`,cyan0:`#e3fafc`,cyan100:`#c5f6fa`,cyan200:`#99e9f2`,cyan300:`#66d9e8`,cyan400:`#3bc9db`,cyan500:`#22b8cf`,cyan600:`#15aabf`,cyan700:`#1098ad`,cyan800:`#0c8599`,cyan900:`#0b7285`,teal0:`#e6fcf5`,teal100:`#c3fae8`,teal200:`#96f2d7`,teal300:`#63e6be`,teal400:`#38d9a9`,teal500:`#20c997`,teal600:`#12b886`,teal700:`#0ca678`,teal800:`#099268`,teal900:`#087f5b`,green0:`#ebfbee`,green100:`#d3f9d8`,green200:`#b2f2bb`,green300:`#8ce99a`,green400:`#69db7c`,green500:`#51cf66`,green600:`#40c057`,green700:`#37b24d`,green800:`#2f9e44`,green900:`#2b8a3e`,lime0:`#f4fce3`,lime100:`#e9fac8`,lime200:`#d8f5a2`,lime300:`#c0eb75`,lime400:`#a9e34b`,lime500:`#94d82d`,lime600:`#82c91e`,lime700:`#74b816`,lime800:`#66a80f`,lime900:`#5c940d`,yellow0:`#fff9db`,yellow100:`#fff3bf`,yellow200:`#ffec99`,yellow300:`#ffe066`,yellow400:`#ffd43b`,yellow500:`#fcc419`,yellow600:`#fab005`,yellow700:`#f59f00`,yellow800:`#f08c00`,yellow900:`#e67700`,orange0:`#fff4e6`,orange100:`#ffe8cc`,orange200:`#ffd8a8`,orange300:`#ffc078`,orange400:`#ffa94d`,orange500:`#ff922b`,orange600:`#fd7e14`,orange700:`#f76707`,orange800:`#e8590c`,orange900:`#d9480f`},Q={sans:`sans-serif`,serif:`serif`,mono:`monospace`},re={xs:`-0.05em`,sm:`-0.025em`,md:`0em`,lg:`0.025em`,xl:`0.05em`,"2xl":`0.1em`,"3xl":`0.15em`,"4xl":`0.2em`,"5xl":`0.25em`,"6xl":`0.3em`,"7xl":`0.35em`,"8xl":`0.4em`,"9xl":`0.45em`},ie={xs:`1rem`,sm:`1.25rem`,md:`1.5rem`,lg:`1.75rem`,xl:`2rem`,"2xl":`2.25rem`,"3xl":`2.5rem`,"4xl":`2.75rem`,"5xl":`3rem`,"6xl":`3.25rem`,"7xl":`3.5rem`,"8xl":`3.75rem`,"9xl":`4rem`},ae={xs:`0.75rem`,sm:`0.875rem`,md:`1rem`,lg:`1.125rem`,xl:`1.25rem`,"2xl":`1.5rem`,"3xl":`1.875rem`,"4xl":`2.25rem`,"5xl":`3rem`,"6xl":`3.75rem`,"7xl":`4.5rem`,"8xl":`6rem`,"9xl":`8rem`},oe={normal:`normal`,italic:`italic`},$={thin:100,extralight:200,light:300,normal:400,medium:500,semibold:600,bold:700,extrabold:800,black:900},se={family:Q,size:ae,weight:$,style:oe,lineHeight:ie,letterSpacing:re},ce={sm:`0.125rem`,md:`0.375rem`,lg:`0.5rem`,xl:`0.75rem`,"2xl":`1rem`,"3xl":`1.5rem`,full:`9999px`},le={sm:`0 1px 2px 0 rgb(0 0 0 / 0.05)`,md:`0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1)`,lg:`0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)`,xl:`0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1)`,"2xl":`0 25px 50px -12px rgb(0 0 0 / 0.25)`,inner:`inset 0 2px 4px 0 rgb(0 0 0 / 0.05)`},ue={xs:`0.75rem`,sm:`0.875rem`,md:`1rem`,lg:`1.125rem`,xl:`1.25rem`,"2xl":`1.5rem`,"3xl":`1.875rem`,"4xl":`2.25rem`,"5xl":`3rem`,"6xl":`3.75rem`,"7xl":`4.5rem`,"8xl":`6rem`,"9xl":`8rem`,"1/12":`8.333333%`,"2/12":`16.666667%`,"3/12":`25%`,"4/12":`33.333333%`,"5/12":`41.666667%`,"6/12":`50%`,"7/12":`58.333333%`,"8/12":`66.666667%`,"9/12":`75%`,"10/12":`83.333333%`,"11/12":`91.666667%`,"1/5":`20%`,"2/5":`40%`,"3/5":`60%`,"4/5":`80%`,"1/4":`25%`,"3/4":`75%`,"1/3":`33.333333%`,"2/3":`66.666667%`,"1/2":`50%`,full:`100%`},de={xs:`0.125rem`,sm:`0.25rem`,md:`0.5rem`,lg:`0.75rem`,xl:`1rem`,xxl:`1.5rem`,"3xl":`2rem`,"4xl":`2.5rem`,"5xl":`3rem`,"6xl":`3.5rem`,"7xl":`4rem`,"8xl":`4.5rem`},fe={normal:`normal`,italic:`italic`},pe={base:`100`,background:`200`,menu:`300`};exports.Absolute=B,exports.Box=z,exports.Center=U,exports.Fixed=ne,exports.Flex=H,exports.FlexItem=V,exports.For=x,exports.Grid=G,exports.GridItem=W,exports.Relative=K,exports.Repeat=w,exports.Scroll=q,exports.Show=C,exports.Stack=J,exports.Sticky=Y,exports.Text=X,exports.beginMountSession=n,exports.breakpoint=T,exports.color=Z,exports.connector=l,exports.effect=u,exports.endMountSession=r,exports.font=se,exports.fragment=S,exports.hasActiveMountSession=t,exports.jsx=y,exports.mount=i,exports.radius=ce,exports.render=d,exports.runUnmountsForElement=o,exports.shadow=le,exports.signal=s,exports.size=ue,exports.space=de,exports.style=fe,exports.unmount=a,exports.useBreakpoint=k,exports.useCustomEvent=A,exports.useLocalStorage=j,exports.useLocale=P,exports.useRouter=L,exports.useSessionStorage=R,exports.zIndex=pe;
package/dist/index.d.cts CHANGED
@@ -28,7 +28,9 @@ declare const connector: Connector;
28
28
  declare function effect<T>(readFn: ReadFn<T>, fn: (value: T) => void | Promise<void>): void;
29
29
  //#endregion
30
30
  //#region core/for.d.ts
31
- type Uuid = string;
31
+ type Uuid = string & {
32
+ readonly __brand?: "uuid";
33
+ };
32
34
  interface Keyed {
33
35
  uuid: Uuid;
34
36
  }
@@ -126,6 +128,10 @@ type Handler<T> = (data: T) => void;
126
128
  */
127
129
  declare function useCustomEvent<T = any>(topic: string, handler?: Handler<T>): (data: T) => void;
128
130
  //#endregion
131
+ //#region hooks/use-local-storage.d.ts
132
+ type LocalStorageHook<T> = [value: ReadFn<T>, setValue: (next: T) => void, remove: () => void];
133
+ declare function useLocalStorage<T>(key: string, initial: T): LocalStorageHook<T>;
134
+ //#endregion
129
135
  //#region hooks/use-locale.d.ts
130
136
  interface LocaleController {
131
137
  locale: ReadFn<string>;
@@ -174,6 +180,10 @@ declare function useRouter(): {
174
180
  navigate: (to: Route) => void;
175
181
  };
176
182
  //#endregion
183
+ //#region hooks/use-session-storage.d.ts
184
+ type SessionStorageHook<T> = [value: ReadFn<T>, setValue: (next: T) => void, remove: () => void];
185
+ declare function useSessionStorage<T>(key: string, initial: T): SessionStorageHook<T>;
186
+ //#endregion
177
187
  //#region core/dom.d.ts
178
188
  type CSSValue = string | number;
179
189
  type MaybeSignal<T> = T | ReadFn<T>;
@@ -873,19 +883,6 @@ declare const style: {
873
883
  italic: string;
874
884
  };
875
885
  //#endregion
876
- //#region style/weight.d.ts
877
- declare const weight: {
878
- thin: number;
879
- extralight: number;
880
- light: number;
881
- normal: number;
882
- medium: number;
883
- semibold: number;
884
- bold: number;
885
- extrabold: number;
886
- black: number;
887
- };
888
- //#endregion
889
886
  //#region style/z-index.d.ts
890
887
  declare const zIndex: {
891
888
  base: string;
@@ -893,4 +890,4 @@ declare const zIndex: {
893
890
  menu: string;
894
891
  };
895
892
  //#endregion
896
- export { Absolute, AbsolutePropertiesInterface, Box, BoxProps, BreakpointName, Center, CenterPropertiesInterface, ComponentFn, ConnectorInterface, Fixed, FixedPropertiesInterface, Flex, FlexItem, FlexItemPropertiesInterface, FlexPropertiesInterface, For, Grid, GridItem, GridItemPropertiesInterface, GridPropertiesInterface, JsxNode, LocaleController, MountCallback, PropsInterface, ReadFn, Relative, RelativePropertiesInterface, RenderCtx, RenderResult, Repeat, Scroll, ScrollPropertiesInterface, Show, Stack, StackPropertiesInterface, Sticky, StickyPropertiesInterface, Text, TextPropertiesInterface, UnmountCallback, VElement, VSignal, VText, beginMountSession, breakpoint, color, connector, effect, endMountSession, font, fragment, hasActiveMountSession, jsx, mount, radius, render, runUnmountsForElement, shadow, signal, size, space, style, unmount, useBreakpoint, useCustomEvent, useLocale, useRouter, weight, zIndex };
893
+ export { Absolute, AbsolutePropertiesInterface, Box, BoxProps, BreakpointName, Center, CenterPropertiesInterface, ComponentFn, ConnectorInterface, Fixed, FixedPropertiesInterface, Flex, FlexItem, FlexItemPropertiesInterface, FlexPropertiesInterface, For, Grid, GridItem, GridItemPropertiesInterface, GridPropertiesInterface, JsxNode, LocalStorageHook, LocaleController, MountCallback, PropsInterface, ReadFn, Relative, RelativePropertiesInterface, RenderCtx, RenderResult, Repeat, Scroll, ScrollPropertiesInterface, SessionStorageHook, Show, Stack, StackPropertiesInterface, Sticky, StickyPropertiesInterface, Text, TextPropertiesInterface, UnmountCallback, VElement, VSignal, VText, beginMountSession, breakpoint, color, connector, effect, endMountSession, font, fragment, hasActiveMountSession, jsx, mount, radius, render, runUnmountsForElement, shadow, signal, size, space, style, unmount, useBreakpoint, useCustomEvent, useLocalStorage, useLocale, useRouter, useSessionStorage, zIndex };
package/dist/index.d.mts CHANGED
@@ -29,7 +29,9 @@ declare const connector: Connector;
29
29
  declare function effect<T$1>(readFn: ReadFn<T$1>, fn: (value: T$1) => void | Promise<void>): void;
30
30
  //#endregion
31
31
  //#region core/for.d.ts
32
- type Uuid = string;
32
+ type Uuid = string & {
33
+ readonly __brand?: "uuid";
34
+ };
33
35
  interface Keyed {
34
36
  uuid: Uuid;
35
37
  }
@@ -127,6 +129,10 @@ type Handler<T$1> = (data: T$1) => void;
127
129
  */
128
130
  declare function useCustomEvent<T$1 = any>(topic: string, handler?: Handler<T$1>): (data: T$1) => void;
129
131
  //#endregion
132
+ //#region hooks/use-local-storage.d.ts
133
+ type LocalStorageHook<T$1> = [value: ReadFn<T$1>, setValue: (next: T$1) => void, remove: () => void];
134
+ declare function useLocalStorage<T$1>(key: string, initial: T$1): LocalStorageHook<T$1>;
135
+ //#endregion
130
136
  //#region hooks/use-locale.d.ts
131
137
  interface LocaleController {
132
138
  locale: ReadFn<string>;
@@ -139,6 +145,10 @@ declare function useRouter(): {
139
145
  navigate: (to: Route) => void;
140
146
  };
141
147
  //#endregion
148
+ //#region hooks/use-session-storage.d.ts
149
+ type SessionStorageHook<T$1> = [value: ReadFn<T$1>, setValue: (next: T$1) => void, remove: () => void];
150
+ declare function useSessionStorage<T$1>(key: string, initial: T$1): SessionStorageHook<T$1>;
151
+ //#endregion
142
152
  //#region core/dom.d.ts
143
153
  type CSSValue = string | number;
144
154
  type MaybeSignal<T$1> = T$1 | ReadFn<T$1>;
@@ -836,19 +846,6 @@ declare const style: {
836
846
  italic: string;
837
847
  };
838
848
  //#endregion
839
- //#region style/weight.d.ts
840
- declare const weight: {
841
- thin: number;
842
- extralight: number;
843
- light: number;
844
- normal: number;
845
- medium: number;
846
- semibold: number;
847
- bold: number;
848
- extrabold: number;
849
- black: number;
850
- };
851
- //#endregion
852
849
  //#region style/z-index.d.ts
853
850
  declare const zIndex: {
854
851
  base: string;
@@ -856,5 +853,5 @@ declare const zIndex: {
856
853
  menu: string;
857
854
  };
858
855
  //#endregion
859
- export { Absolute, AbsolutePropertiesInterface, Box, BoxProps, BreakpointName, Center, CenterPropertiesInterface, ComponentFn, ConnectorInterface, Fixed, FixedPropertiesInterface, Flex, FlexItem, FlexItemPropertiesInterface, FlexPropertiesInterface, For, Grid, GridItem, GridItemPropertiesInterface, GridPropertiesInterface, JsxNode, LocaleController, MountCallback, PropsInterface, ReadFn, Relative, RelativePropertiesInterface, RenderCtx, RenderResult, Repeat, Scroll, ScrollPropertiesInterface, Show, Stack, StackPropertiesInterface, Sticky, StickyPropertiesInterface, Text, TextPropertiesInterface, UnmountCallback, VElement, VSignal, VText, beginMountSession, breakpoint, color, connector, effect, endMountSession, font, fragment, hasActiveMountSession, jsx, mount, radius, render, runUnmountsForElement, shadow, signal, size, space, style, unmount, useBreakpoint, useCustomEvent, useLocale, useRouter, weight, zIndex };
856
+ export { Absolute, AbsolutePropertiesInterface, Box, BoxProps, BreakpointName, Center, CenterPropertiesInterface, ComponentFn, ConnectorInterface, Fixed, FixedPropertiesInterface, Flex, FlexItem, FlexItemPropertiesInterface, FlexPropertiesInterface, For, Grid, GridItem, GridItemPropertiesInterface, GridPropertiesInterface, JsxNode, LocalStorageHook, LocaleController, MountCallback, PropsInterface, ReadFn, Relative, RelativePropertiesInterface, RenderCtx, RenderResult, Repeat, Scroll, ScrollPropertiesInterface, SessionStorageHook, Show, Stack, StackPropertiesInterface, Sticky, StickyPropertiesInterface, Text, TextPropertiesInterface, UnmountCallback, VElement, VSignal, VText, beginMountSession, breakpoint, color, connector, effect, endMountSession, font, fragment, hasActiveMountSession, jsx, mount, radius, render, runUnmountsForElement, shadow, signal, size, space, style, unmount, useBreakpoint, useCustomEvent, useLocalStorage, useLocale, useRouter, useSessionStorage, zIndex };
860
857
  //# sourceMappingURL=index.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.mts","names":["n","e","t","r","i","a","o","s","c"],"sources":["../core/signal.ts","../core/effect.ts","../core/for.ts","../core/fragment.ts","../core/jsx.ts","../core/lifecycle.ts","../core/render.ts","../core/show.ts","../helper/repeat.tsx","../style/breakpoint.ts","../hooks/use-breakpoint.ts","../hooks/use-custom-event.ts","../hooks/use-locale.ts","index.cjs","../hooks/use-router.ts","../core/dom.ts","../layout/box.tsx","../layout/absolute.tsx","../layout/flex-item.tsx","../layout/flex.tsx","../layout/center.tsx","../layout/fixed.tsx","../layout/grid-item.tsx","../layout/grid.tsx","../layout/relative.tsx","../layout/scroll.tsx","../layout/stack.tsx","../layout/sticky.tsx","../layout/text.tsx","../style/color.ts","../style/font.ts","../style/radius.ts","../style/shadow.ts","../style/size.ts","../style/space.ts","../style/style.ts","../style/weight.ts","../style/z-index.ts"],"sourcesContent":["const e=[];function t(){return e.length>0}function n(){e.push({mounts:[],unmounts:[]})}function r(t){let n=e.pop();if(!n)throw Error(`endMountSession called without active mount session`);for(let e of n.mounts)try{let n=e(t);n instanceof Promise&&n.catch(e=>console.error(`async mount callback failed`,e))}catch(e){console.error(`mount callback failed`,e)}if(n.unmounts.length>0){let e=t.__unmountCbs;e?e.push(...n.unmounts):t.__unmountCbs=[...n.unmounts]}}function i(t){let n=e[e.length-1];if(!n)throw Error(`mount(cb) called outside of a render session`);n.mounts.push(t)}function a(t){let n=e[e.length-1];if(!n)throw Error(`unmount(cb) called outside of a render session`);n.unmounts.push(t)}function o(e){let t=e.__unmountCbs;if(!(!t||t.length===0)){for(let e=t.length-1;e>=0;e--)try{let n=t[e]();n instanceof Promise&&n.catch(e=>console.error(`async unmount callback failed`,e))}catch(e){console.error(`unmount callback failed`,e)}e.__unmountCbs=void 0}}function s(e){let t=e,n=crypto.randomUUID();l.addTopic(n);let r=e=>(e&&(l.registerClbk(n,e),e(t)),t);return r.type=`signal`,[r,async e=>{let r=e(t);t=r instanceof Promise?await r:r,l.update(n,t)}]}var c=class{topics=new Map;callbackMap=new Map;addTopic(e){this.topics.set(e,new Set)}removeTopic(e){let t=this.topics.get(e);if(t)for(let e of t)this.callbackMap.delete(e);this.topics.delete(e)}registerClbk(e,t){let n=this.topics.get(e);if(!n)throw Error(`Connector: unknown topic ${e}`);let r=this.callbackMap.get(t);if(r){r.refCount++;return}n.add(t),this.callbackMap.set(t,{uuid:e,refCount:1})}removeClbk(e,t){let n=this.callbackMap.get(t);n&&(n.refCount--,!(n.refCount>0)&&(this.topics.get(n.uuid)?.delete(t),this.callbackMap.delete(t)))}update(e,t){let n=this.topics.get(e);if(n)for(let e of n)e(t)}getUuidByClbk(e){let t=this.callbackMap.get(e);if(!t)throw Error(`Connector: no UUID for callback`);return t.uuid}};const l=new c;function u(e,n){let r=!1,i=e=>{if(!r){r=!0;return}try{let t=n(e);t instanceof Promise&&t.catch(e=>{console.error(`effect async callback failed`,e)})}catch(e){console.error(`effect callback failed`,e)}};e(i),t()&&a(()=>{let e=l.getUuidByClbk(i);l.removeClbk(e,i)})}function d(e,t){if(e==null)return{el:t.parent};if(Array.isArray(e)){let n=t.parent;for(let r of e)n=d(r,t).el;return{el:n}}if(e.kind===`text`)return{el:m(e,t)};if(e.kind===`signal`)return{el:te(e,t)};if(typeof e.tag==`function`){let i=e,a=i.tag;n();let o=d(a({...i.props,ctx:t},i.children),t);if(!(o.el instanceof Element))throw Error(`Component root must be a DOM Element`);return r(o.el),t.self=o.el,o}let i=p(e,t),a={...t,parent:i,self:t.self};for(let t of e.children)d(t,a);return{el:i}}const ee=`http://www.w3.org/2000/svg`,f=new Set([`svg`,`path`,`circle`,`rect`,`line`,`polyline`,`polygon`,`g`,`defs`,`linearGradient`,`radialGradient`,`stop`,`mask`,`clipPath`,`pattern`,`text`,`tspan`,`use`,`symbol`,`view`,`ellipse`,`foreignObject`]);function p(e,t){if(typeof e.tag!=`string`)throw Error(`Host renderer expects string tag`);let n=e.tag,r=f.has(n),i=r?document.createElementNS(`http://www.w3.org/2000/svg`,n):document.createElement(n),a=e.props??{};for(let[e,t]of Object.entries(a))if(!(e===`ctx`||e===`children`)){if(e.startsWith(`on`)&&typeof t==`function`){let n=e.slice(2).toLowerCase();i.addEventListener(n,t);continue}if(e===`style`&&t&&typeof t==`object`){for(let[e,n]of Object.entries(t))if(typeof n==`function`&&n.type===`signal`){let t=n();i.style[e]=String(t),n(t=>{i.style[e]=String(t)})}else i.style[e]=String(n);continue}if(typeof t==`function`&&t.type===`signal`){let n=t=>{r?i.setAttribute(e,String(t)):i[e]=t};n(t()),h(t,n);continue}r?i.setAttribute(e,String(t)):e in i?i[e]=t:i.setAttribute(e,String(t))}return t.parent.appendChild(i),i}function m(e,t){let n=document.createTextNode(e.value);return t.parent.appendChild(n),n}function te(e,n){let r=document.createTextNode(``);n.parent.appendChild(r);let i=e=>{r.nodeValue=String(e)};return r.nodeValue=String(e.read()),e.read(i),t()&&a(()=>{let e=l.getUuidByClbk(i);l.removeClbk(e,i)}),r}function h(e,n){let r=e=>n(e);e(r),t()&&a(()=>{let e=l.getUuidByClbk(r);l.removeClbk(e,r)})}function g(e){let t=Array.from(e.childNodes);for(let e of t)_(e);o(e),e.parentNode?e.parentNode.removeChild(e):e.remove()}function _(e){if(e instanceof Element){let t=Array.from(e.childNodes);for(let e of t)_(e);o(e),e.parentNode?e.parentNode.removeChild(e):e.remove();return}e.parentNode&&e.parentNode.removeChild(e)}function v(e,t,...n){return{kind:`element`,tag:e,props:t??{},children:n.flatMap(y)}}function y(e){return e==null||e===!1||e===!0?[]:typeof e==`function`&&e?.type===`signal`?{kind:`signal`,read:e}:typeof e==`string`||typeof e==`number`?{kind:`text`,value:String(e)}:Array.isArray(e)?e.flatMap(y):e}function b(e,[t]){let n=v(`csr-for-host`,{style:{display:`contents`}});return i(r=>{let{el:i}=d(n,{parent:r}),a=i,o=new Map,s=[];function c(n){let r=[];for(let i of n){if(!i||i.uuid==null)continue;let n=i.uuid;if(r.push(n),!o.has(n)){let{el:r}=d(t(i),{...e.ctx,parent:a});if(!(r instanceof Element))throw Error(`For: child root must be an Element`);o.set(n,r)}}for(let e of s)if(!r.includes(e)){let t=o.get(e);t&&g(t),o.delete(e)}let i=null;for(let e=r.length-1;e>=0;e--){let t=o.get(r[e]);a.insertBefore(t,i),i=t}s=r}c(e.each()),u(e.each,c)}),null}function x(e,...t){return t}function S(e,t){let n=v(`csr-show-host`,{style:{display:`contents`}}),r=v(`csr-show-content`,{style:{display:`contents`}},...t),a=null,o=null,s=!1;return i(t=>{let{el:i}=d(n,{parent:t});a=i,e.when(t=>{if(t===s)return;if(s=t,!s){o&&=(g(o),null);return}let{el:n}=d(r,{...e.ctx,parent:a});if(!(n instanceof Element))throw Error(`Show: content root must be an Element`);o=n})}),null}function C(e,t){if(typeof e.n==`number`){let n=[];for(let r=0;r<e.n;r++)n.push(t);return n}let n=e.n,[r,i]=s([]);return n(e=>{let t=[];for(let n=0;n<e;n++)t.push({uuid:String(n)});i(()=>t)}),v(b,{each:r},()=>t)}const w={mobile:0,tablet:601,laptop:1025,desktop:1441,large:1921};function T(e){return e>=w.large?`large`:e>=w.desktop?`desktop`:e>=w.laptop?`laptop`:e>=w.tablet?`tablet`:`mobile`}const[E,D]=s(T(window.innerWidth));let O=E();window.addEventListener(`resize`,()=>{let e=T(window.innerWidth);e!==O&&(O=e,D(()=>e))});function k(){return E}function A(e,t){if(t){let n=e=>{t(e.detail)};window.addEventListener(e,n),a(()=>{window.removeEventListener(e,n)})}return function(t){window.dispatchEvent(new CustomEvent(e,{detail:t}))}}const[j,M]=s(`en-US`);function N(){return{locale:j,setLocale(e){M(()=>e)}}}const[P,F]=s(`/`);window.addEventListener(`popstate`,e=>{let t=e.state?.route;typeof t==`string`&&F(()=>t)});function I(){return{route:P,navigate:e=>{e!==P()&&(history.pushState({route:e},``),F(()=>e))}}}function L(e,t){return v(`div`,{...e,style:{marginBottom:e.mb??e.my??e.m,marginLeft:e.ml??e.mx??e.m,marginRight:e.mr??e.mx??e.m,marginTop:e.mt??e.my??e.m,paddingBottom:e.pb??e.py??e.p,paddingLeft:e.pl??e.px??e.p,paddingRight:e.pr??e.px??e.p,paddingTop:e.pt??e.py??e.p,background:e.bg,opacity:e.o,boxShadow:e.sh,borderTop:e.bt??e.by??e.b,borderRight:e.br??e.bx??e.b,borderBottom:e.bb??e.by??e.b,borderLeft:e.bl??e.bx??e.b,borderTopRightRadius:e.rtr??e.rt??e.rr??e.r,borderTopLeftRadius:e.rtl??e.rt??e.rl??e.r,borderBottomRightRadius:e.rbr??e.rb??e.rr??e.r,borderBottomLeftRadius:e.rbl??e.rb??e.rl??e.r,width:e.w??e.s,height:e.h??e.s,maxWidth:e.maxW,maxHeight:e.maxH,minWidth:e.minW,minHeight:e.minH,...e.style}},t)}function R(e,t){return v(L,{...e,style:{position:`absolute`,top:e.top,right:e.right,bottom:e.bottom,left:e.left,...e.style}},t)}function z(e,t){return v(L,{...e,style:{flex:e.flx,alignSelf:e.as,flexGrow:e.flxGrow,flexShrink:e.flxShrink,flexBasis:e.flxBasis,...e.style}},t)}function B(e,t){return v(z,{...e,style:{display:`flex`,justifyContent:e.jc,alignItems:e.ai,alignContent:e.ac,gap:e.g,flexDirection:e.flxDirection,flexWrap:e.flxWrap,flexFlow:e.flxFlow,...e.style}},t)}function V(e,t){return v(B,{...e,ai:e.ai??`center`,jc:e.jc??`center`},t)}function H(e,t){return v(L,{...e,style:{position:`fixed`,top:e.top,right:e.right,bottom:e.bottom,left:e.left,zIndex:e.zIndex,...e.style}},t)}function U(e,t){return v(L,{...e,style:{gridArea:e.grdArea,gridColumn:e.grdColumn,gridRow:e.grdRow,...e.style}},t)}function ne(e,t){return v(U,{...e,style:{display:`grid`,gap:e.g,alignItems:e.ai,justifyItems:e.ji,alignSelf:e.as,gridTemplateColumns:e.grdTemplateColumns,gridTemplateRows:e.grdTemplateRows,gridTemplateAreas:e.grdTemplateAreas,gridTemplate:e.grdTemplate,gridAutoColumns:e.grdAutoColumns,gridAutoRows:e.grdAutoRows,gridAutoFlow:e.grdAutoFlow,gridArea:e.grd,gridRowStart:e.grdRowStart,gridColumnStart:e.grdColumnStart,gridRowEnd:e.grdRowEnd,gridColumnEnd:e.grdColumnEnd,gridRow:e.grdRow,gridColumn:e.grdColumn,rowGap:e.grdRowGap,columnGap:e.grdColumnGap,...e.style}},t)}function W(e,t){return v(L,{...e,style:{position:`relative`,zIndex:e.zIndex,...e.style}},t)}function G(e,t){return v(W,{s:`100%`},v(R,{top:`0`,right:`0`,bottom:`0`,left:`0`,...e,style:{overflow:`auto`,...e.style}},t))}function K(e,t){return v(B,{...e,flxDirection:e.flxDirection??`column`},t)}function q(e,t){return v(L,{...e,style:{position:`sticky`,top:e.top,right:e.right,bottom:e.bottom,left:e.left,zIndex:e.zIndex,...e.style}},t)}function J(e,t){return v(e.tag??`p`,{...e,style:{textAlign:e.a,fontFamily:e.ff,fontWeight:e.fw,fontSize:e.fs,lineHeight:e.lh,letterSpacing:e.ls,fontStyle:e.s,color:e.c,margin:e.m,marginBottom:e.mb??e.my??e.m,marginLeft:e.ml??e.mx??e.m,marginRight:e.mr??e.mx??e.m,marginTop:e.mt??e.my??e.m,padding:e.p,paddingBottom:e.pb??e.py??e.p,paddingLeft:e.pl??e.px??e.p,paddingRight:e.pr??e.px??e.p,paddingTop:e.pt??e.py??e.p,background:e.bg}},...t)}const Y={brand:`#000`,onBrand:`#fff`,gray0:`#f8f9fa`,gray100:`#f1f3f5`,gray200:`#e9ecef`,gray300:`#dee2e6`,gray400:`#ced4da`,gray500:`#adb5bd`,gray600:`#868e96`,gray700:`#495057`,gray800:`#343a40`,gray900:`#212529`,red0:`#fff5f5`,red100:`#ffe3e3`,red200:`#ffc9c9`,red300:`#ffa8a8`,red400:`#ff8787`,red500:`#ff6b6b`,red600:`#fa5252`,red700:`#f03e3e`,red800:`#e03131`,red900:`#c92a2a`,pink0:`#fff0f6`,pink100:`#ffdeeb`,pink200:`#fcc2d7`,pink300:`#faa2c1`,pink400:`#f783ac`,pink500:`#f06595`,pink600:`#e64980`,pink700:`#d6336c`,pink800:`#c2255c`,pink900:`#a61e4d`,grape0:`#f8f0fc`,grape100:`#f3d9fa`,grape200:`#eebefa`,grape300:`#e599f7`,grape400:`#da77f2`,grape500:`#cc5de8`,grape600:`#be4bdb`,grape700:`#ae3ec9`,grape800:`#9c36b5`,grape900:`#862e9c`,violet0:`#f3f0ff`,violet100:`#e5dbff`,violet200:`#d0bfff`,violet300:`#b197fc`,violet400:`#9775fa`,violet500:`#845ef7`,violet600:`#7950f2`,violet700:`#7048e8`,violet800:`#6741d9`,violet900:`#5f3dc4`,indigo0:`#edf2ff`,indigo100:`#dbe4ff`,indigo200:`#bac8ff`,indigo300:`#91a7ff`,indigo400:`#748ffc`,indigo500:`#5c7cfa`,indigo600:`#4c6ef5`,indigo700:`#4263eb`,indigo800:`#3b5bdb`,indigo900:`#364fc7`,blue0:`#e7f5ff`,blue100:`#d0ebff`,blue200:`#a5d8ff`,blue300:`#74c0fc`,blue400:`#4dabf7`,blue500:`#339af0`,blue600:`#228be6`,blue700:`#1c7ed6`,blue800:`#1971c2`,blue900:`#1864ab`,cyan0:`#e3fafc`,cyan100:`#c5f6fa`,cyan200:`#99e9f2`,cyan300:`#66d9e8`,cyan400:`#3bc9db`,cyan500:`#22b8cf`,cyan600:`#15aabf`,cyan700:`#1098ad`,cyan800:`#0c8599`,cyan900:`#0b7285`,teal0:`#e6fcf5`,teal100:`#c3fae8`,teal200:`#96f2d7`,teal300:`#63e6be`,teal400:`#38d9a9`,teal500:`#20c997`,teal600:`#12b886`,teal700:`#0ca678`,teal800:`#099268`,teal900:`#087f5b`,green0:`#ebfbee`,green100:`#d3f9d8`,green200:`#b2f2bb`,green300:`#8ce99a`,green400:`#69db7c`,green500:`#51cf66`,green600:`#40c057`,green700:`#37b24d`,green800:`#2f9e44`,green900:`#2b8a3e`,lime0:`#f4fce3`,lime100:`#e9fac8`,lime200:`#d8f5a2`,lime300:`#c0eb75`,lime400:`#a9e34b`,lime500:`#94d82d`,lime600:`#82c91e`,lime700:`#74b816`,lime800:`#66a80f`,lime900:`#5c940d`,yellow0:`#fff9db`,yellow100:`#fff3bf`,yellow200:`#ffec99`,yellow300:`#ffe066`,yellow400:`#ffd43b`,yellow500:`#fcc419`,yellow600:`#fab005`,yellow700:`#f59f00`,yellow800:`#f08c00`,yellow900:`#e67700`,orange0:`#fff4e6`,orange100:`#ffe8cc`,orange200:`#ffd8a8`,orange300:`#ffc078`,orange400:`#ffa94d`,orange500:`#ff922b`,orange600:`#fd7e14`,orange700:`#f76707`,orange800:`#e8590c`,orange900:`#d9480f`},X={sans:`sans-serif`,serif:`serif`,mono:`monospace`},Z={xs:`-0.05em`,sm:`-0.025em`,md:`0em`,lg:`0.025em`,xl:`0.05em`,\"2xl\":`0.1em`,\"3xl\":`0.15em`,\"4xl\":`0.2em`,\"5xl\":`0.25em`,\"6xl\":`0.3em`,\"7xl\":`0.35em`,\"8xl\":`0.4em`,\"9xl\":`0.45em`},Q={xs:`1rem`,sm:`1.25rem`,md:`1.5rem`,lg:`1.75rem`,xl:`2rem`,\"2xl\":`2.25rem`,\"3xl\":`2.5rem`,\"4xl\":`2.75rem`,\"5xl\":`3rem`,\"6xl\":`3.25rem`,\"7xl\":`3.5rem`,\"8xl\":`3.75rem`,\"9xl\":`4rem`},re={xs:`0.75rem`,sm:`0.875rem`,md:`1rem`,lg:`1.125rem`,xl:`1.25rem`,\"2xl\":`1.5rem`,\"3xl\":`1.875rem`,\"4xl\":`2.25rem`,\"5xl\":`3rem`,\"6xl\":`3.75rem`,\"7xl\":`4.5rem`,\"8xl\":`6rem`,\"9xl\":`8rem`},ie={normal:`normal`,italic:`italic`},$={thin:100,extralight:200,light:300,normal:400,medium:500,semibold:600,bold:700,extrabold:800,black:900},ae={family:X,size:re,weight:$,style:ie,lineHeight:Q,letterSpacing:Z},oe={sm:`0.125rem`,md:`0.375rem`,lg:`0.5rem`,xl:`0.75rem`,\"2xl\":`1rem`,\"3xl\":`1.5rem`,full:`9999px`},se={sm:`0 1px 2px 0 rgb(0 0 0 / 0.05)`,md:`0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1)`,lg:`0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)`,xl:`0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1)`,\"2xl\":`0 25px 50px -12px rgb(0 0 0 / 0.25)`,inner:`inset 0 2px 4px 0 rgb(0 0 0 / 0.05)`},ce={xs:`0.75rem`,sm:`0.875rem`,md:`1rem`,lg:`1.125rem`,xl:`1.25rem`,\"2xl\":`1.5rem`,\"3xl\":`1.875rem`,\"4xl\":`2.25rem`,\"5xl\":`3rem`,\"6xl\":`3.75rem`,\"7xl\":`4.5rem`,\"8xl\":`6rem`,\"9xl\":`8rem`,\"1/12\":`8.333333%`,\"2/12\":`16.666667%`,\"3/12\":`25%`,\"4/12\":`33.333333%`,\"5/12\":`41.666667%`,\"6/12\":`50%`,\"7/12\":`58.333333%`,\"8/12\":`66.666667%`,\"9/12\":`75%`,\"10/12\":`83.333333%`,\"11/12\":`91.666667%`,\"1/5\":`20%`,\"2/5\":`40%`,\"3/5\":`60%`,\"4/5\":`80%`,\"1/4\":`25%`,\"3/4\":`75%`,\"1/3\":`33.333333%`,\"2/3\":`66.666667%`,\"1/2\":`50%`,full:`100%`},le={xs:`0.125rem`,sm:`0.25rem`,md:`0.5rem`,lg:`0.75rem`,xl:`1rem`,xxl:`1.5rem`,\"3xl\":`2rem`,\"4xl\":`2.5rem`,\"5xl\":`3rem`,\"6xl\":`3.5rem`,\"7xl\":`4rem`,\"8xl\":`4.5rem`},ue={normal:`normal`,italic:`italic`},de={thin:100,extralight:200,light:300,normal:400,medium:500,semibold:600,bold:700,extrabold:800,black:900},fe={base:`100`,background:`200`,menu:`300`};exports.Absolute=R,exports.Box=L,exports.Center=V,exports.Fixed=H,exports.Flex=B,exports.FlexItem=z,exports.For=b,exports.Grid=ne,exports.GridItem=U,exports.Relative=W,exports.Repeat=C,exports.Scroll=G,exports.Show=S,exports.Stack=K,exports.Sticky=q,exports.Text=J,exports.beginMountSession=n,exports.breakpoint=w,exports.color=Y,exports.connector=l,exports.effect=u,exports.endMountSession=r,exports.font=ae,exports.fragment=x,exports.hasActiveMountSession=t,exports.jsx=v,exports.mount=i,exports.radius=oe,exports.render=d,exports.runUnmountsForElement=o,exports.shadow=se,exports.signal=s,exports.size=ce,exports.space=le,exports.style=ue,exports.unmount=a,exports.useBreakpoint=k,exports.useCustomEvent=A,exports.useLocale=N,exports.useRouter=I,exports.weight=de,exports.zIndex=fe;"],"mappings":";;KAGK,IAAA;KAEO,6BAA2B,iBAAe;;;iBAItC,0BAAwB,gBAAC,OAAA,kBAgBP,QAAM,MAAI,QAAQ,SAAK;UAkBxC,kBAAA;iBACA;oBACG;0BAEI,kBAAkB;wBACpB,kBAAkB;oBAEtB,aAAa;iCACA,eAAa;;cAGtC,SAAA,YAAqB;;;iBAOH;oBAIG;0BAUI,kBAAkB;wBAmBpB,kBAAkB;oBAatB,aAAa;iCASA,eAAa;;cAStC,WAAS;;;iBCxHN,oBACN,OAAO,kBACH,eAAa;;;KCCtB,IAAA;UAEK,KAAA;QACF;;UAGE,qBAAmB;QACrB,OAAO;;iBAGC,gBAAc,UAAU,SAAS;;;iBCjBjC,QAAA;;;KCEJ,OAAA,GAAU,WAAW,QAAQ;;;;;;;;;UAYxB,QAAA;;gBAED;SACP;YACG;;UAGK,KAAA;;;;UAKA,OAAA;;QAET;;UAGS,cAAA;;;KAIL,WAAA,WACH,0BACG,cACP;iBAEW,GAAA,eACA,iDAGb;;;KC1CS,aAAA,QAAqB,mBAAmB;KACxC,eAAA,gBAA+B;iBAS3B,qBAAA,CAAA;iBAIA,iBAAA,CAAA;iBAOA,eAAA,OAAsB;iBA4BtB,KAAA,KAAU;iBAQV,OAAA,KAAY;iBAQZ,qBAAA,KAA0B;;;UCvDzB,SAAA;UACP,OAAO;SACR;;;UAIQ,YAAA;MACX;;iBAGU,MAAA,OAAa,qBAAqB,YAAY;;;UChBpD,kBAAA;QACF;;iBAGQ,IAAA,IAAQ;;;KCLnB,qBAAiB,MAAI,OAAO;UAEvB,oBAA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EAAA,MAAA;IAEtB,KAAA,EAAA,MAAA;IAAa,KAAA,EAAA,MAAA;EACA,CAAA;EAAa,aAAA,EAAA;IAAI,EAAA,EAAA,MAAA;IAG1C,EAAA,EAAA,MAAU;IAOQ,EAAA,EAAA,MAAA;IAIG,EAAA,EAAA,MAAA;IAUI,EAAA,EAAA,MAAA;IAAkB,KAAA,EAAA,MAAA;IAmBpB,KAAA,EAAA,MAAA;IAAkB,KAAA,EAAA,MAAA;IAatB,KAAA,EAAA,MAAA;IAAa,KAAA,EAAA,MAAA;IASA,KAAA,EAAA,MAAA;IAAa,KAAA,EAAA,MAAA;IA9DxB,KAAA,EAAA,MAAA;EAAkB,CAAA;AAuE7C,CAAA;;;c+B7Ha;;;;;;;;;;;cCAA;;;;;;;;;;cCAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EjCGR,KAAA,EAAI,MAAA;EAEG,KAAA,EAAA,MAAM;EAIF,KAAA,EAAA,MAAM;EAAkB,KAAA,EAAA,MAAA;EAAC,KAAA,EAAA,MAAA;EAAA,IAAA,EAAA,MAAA;CAgBP;;;ckCzBrB;;;;;;;;;;;;;;;;cCAA;;;;;;cCAA;;;;;;;;;;;;;cCAA"}
1
+ {"version":3,"file":"index.d.mts","names":["n","e","t","r","i","a","o","s","c"],"sources":["../core/signal.ts","../core/effect.ts","../core/for.ts","../core/fragment.ts","../core/jsx.ts","../core/lifecycle.ts","../core/render.ts","../core/show.ts","../helper/repeat.tsx","../style/breakpoint.ts","../hooks/use-breakpoint.ts","../hooks/use-custom-event.ts","../hooks/use-local-storage.ts","../hooks/use-locale.ts","index.cjs","../hooks/use-router.ts","../hooks/use-session-storage.ts","../core/dom.ts","../layout/box.tsx","../layout/absolute.tsx","../layout/flex-item.tsx","../layout/flex.tsx","../layout/center.tsx","../layout/fixed.tsx","../layout/grid-item.tsx","../layout/grid.tsx","../layout/relative.tsx","../layout/scroll.tsx","../layout/stack.tsx","../layout/sticky.tsx","../layout/text.tsx","../style/color.ts","../style/font.ts","../style/radius.ts","../style/shadow.ts","../style/size.ts","../style/space.ts","../style/style.ts","../style/z-index.ts"],"sourcesContent":["const e=[];function t(){return e.length>0}function n(){e.push({mounts:[],unmounts:[]})}function r(t){let n=e.pop();if(!n)throw Error(`endMountSession called without active mount session`);for(let e of n.mounts)try{let n=e(t);n instanceof Promise&&n.catch(e=>console.error(`async mount callback failed`,e))}catch(e){console.error(`mount callback failed`,e)}if(n.unmounts.length>0){let e=t.__unmountCbs;e?e.push(...n.unmounts):t.__unmountCbs=[...n.unmounts]}}function i(t){let n=e[e.length-1];if(!n)throw Error(`mount(cb) called outside of a render session`);n.mounts.push(t)}function a(t){let n=e[e.length-1];if(!n)throw Error(`unmount(cb) called outside of a render session`);n.unmounts.push(t)}function o(e){let t=e.__unmountCbs;if(!(!t||t.length===0)){for(let e=t.length-1;e>=0;e--)try{let n=t[e]();n instanceof Promise&&n.catch(e=>console.error(`async unmount callback failed`,e))}catch(e){console.error(`unmount callback failed`,e)}e.__unmountCbs=void 0}}function s(e){let t=e,n=crypto.randomUUID();l.addTopic(n);let r=e=>(e&&(l.registerClbk(n,e),e(t)),t);return r.type=`signal`,[r,async e=>{let r=e(t);t=r instanceof Promise?await r:r,l.update(n,t)}]}var c=class{topics=new Map;callbackMap=new Map;addTopic(e){this.topics.set(e,new Set)}removeTopic(e){let t=this.topics.get(e);if(t)for(let e of t)this.callbackMap.delete(e);this.topics.delete(e)}registerClbk(e,t){let n=this.topics.get(e);if(!n)throw Error(`Connector: unknown topic ${e}`);let r=this.callbackMap.get(t);if(r){r.refCount++;return}n.add(t),this.callbackMap.set(t,{uuid:e,refCount:1})}removeClbk(e,t){let n=this.callbackMap.get(t);n&&(n.refCount--,!(n.refCount>0)&&(this.topics.get(n.uuid)?.delete(t),this.callbackMap.delete(t)))}update(e,t){let n=this.topics.get(e);if(n)for(let e of n)e(t)}getUuidByClbk(e){let t=this.callbackMap.get(e);if(!t)throw Error(`Connector: no UUID for callback`);return t.uuid}};const l=new c;function u(e,n){let r=!1,i=e=>{if(!r){r=!0;return}try{let t=n(e);t instanceof Promise&&t.catch(e=>{console.error(`effect async callback failed`,e)})}catch(e){console.error(`effect callback failed`,e)}};e(i),t()&&a(()=>{let e=l.getUuidByClbk(i);l.removeClbk(e,i)})}function d(e,t){if(e==null)return{el:t.parent};if(Array.isArray(e)){let n=t.parent;for(let r of e)n=d(r,t).el;return{el:n}}if(e.kind===`text`)return{el:m(e,t)};if(e.kind===`signal`)return{el:h(e,t)};if(typeof e.tag==`function`){let i=e,a=i.tag;n();let o=d(a({...i.props,ctx:t},i.children),t);if(!(o.el instanceof Element))throw Error(`Component root must be a DOM Element`);return r(o.el),t.self=o.el,o}let i=p(e,t),a={...t,parent:i,self:t.self};for(let t of e.children)d(t,a);return{el:i}}const ee=`http://www.w3.org/2000/svg`,f=new Set([`svg`,`path`,`circle`,`rect`,`line`,`polyline`,`polygon`,`g`,`defs`,`linearGradient`,`radialGradient`,`stop`,`mask`,`clipPath`,`pattern`,`text`,`tspan`,`use`,`symbol`,`view`,`ellipse`,`foreignObject`]);function p(e,t){if(typeof e.tag!=`string`)throw Error(`Host renderer expects string tag`);let n=e.tag,r=f.has(n),i=r?document.createElementNS(`http://www.w3.org/2000/svg`,n):document.createElement(n),a=e.props??{};for(let[e,t]of Object.entries(a))if(!(e===`ctx`||e===`children`)){if(e.startsWith(`on`)&&typeof t==`function`){let n=e.slice(2).toLowerCase();i.addEventListener(n,t);continue}if(e===`style`&&t&&typeof t==`object`){for(let[e,n]of Object.entries(t))if(n!==void 0)if(typeof n==`function`&&n.type===`signal`){let t=n();i.style[e]=String(t),n(t=>{i.style[e]=String(t)})}else i.style[e]=String(n);continue}if(typeof t==`function`&&t.type===`signal`){let n=t=>{r?i.setAttribute(e,String(t)):i[e]=t};n(t()),g(t,n);continue}r?i.setAttribute(e,String(t)):e in i?i[e]=t:i.setAttribute(e,String(t))}return t.parent.appendChild(i),i}function m(e,t){let n=document.createTextNode(e.value);return t.parent.appendChild(n),n}function h(e,n){let r=document.createTextNode(``);n.parent.appendChild(r);let i=e=>{r.nodeValue=String(e)};return r.nodeValue=String(e.read()),e.read(i),t()&&a(()=>{let e=l.getUuidByClbk(i);l.removeClbk(e,i)}),r}function g(e,n){let r=e=>n(e);e(r),t()&&a(()=>{let e=l.getUuidByClbk(r);l.removeClbk(e,r)})}function _(e){let t=Array.from(e.childNodes);for(let e of t)v(e);o(e),e.parentNode?e.parentNode.removeChild(e):e.remove()}function v(e){if(e instanceof Element){let t=Array.from(e.childNodes);for(let e of t)v(e);o(e),e.parentNode?e.parentNode.removeChild(e):e.remove();return}e.parentNode&&e.parentNode.removeChild(e)}function y(e,t,...n){return{kind:`element`,tag:e,props:t??{},children:n.flatMap(b)}}function b(e){return e==null||e===!1||e===!0?[]:typeof e==`function`&&e?.type===`signal`?{kind:`signal`,read:e}:typeof e==`string`||typeof e==`number`?{kind:`text`,value:String(e)}:Array.isArray(e)?e.flatMap(b):e}function x(e,[t]){let n=y(`csr-for-host`,{style:{display:`contents`}});return i(r=>{let{el:i}=d(n,{parent:r}),a=i,o=new Map,s=[];function c(n){let r=[];for(let i of n){if(!i||i.uuid==null)continue;let n=i.uuid;if(r.push(n),!o.has(n)){let{el:r}=d(t(i),{...e.ctx,parent:a});if(!(r instanceof Element))throw Error(`For: child root must be an Element`);o.set(n,r)}}for(let e of s)if(!r.includes(e)){let t=o.get(e);t&&_(t),o.delete(e)}let i=null;for(let e=r.length-1;e>=0;e--){let t=o.get(r[e]);a.insertBefore(t,i),i=t}s=r}c(e.each()),u(e.each,c)}),null}function S(e,...t){return t}function C(e,t){let n=y(`csr-show-host`,{style:{display:`contents`}}),r=y(`csr-show-content`,{style:{display:`contents`}},...t),a=null,o=null,s=!1;return i(t=>{let{el:i}=d(n,{parent:t});a=i,e.when(t=>{if(t===s)return;if(s=t,!s){o&&=(_(o),null);return}let{el:n}=d(r,{...e.ctx,parent:a});if(!(n instanceof Element))throw Error(`Show: content root must be an Element`);o=n})}),null}function w(e,t){if(typeof e.n==`number`){let n=[];for(let r=0;r<e.n;r++)n.push(t);return n}let n=e.n,[r,i]=s([]);return n(e=>{let t=[];for(let n=0;n<e;n++)t.push({uuid:String(n)});i(()=>t)}),y(x,{each:r},()=>t)}const T={mobile:0,tablet:601,laptop:1025,desktop:1441,large:1921};function E(e){return e>=T.large?`large`:e>=T.desktop?`desktop`:e>=T.laptop?`laptop`:e>=T.tablet?`tablet`:`mobile`}const[D,te]=s(E(window.innerWidth));let O=D();window.addEventListener(`resize`,()=>{let e=E(window.innerWidth);e!==O&&(O=e,te(()=>e))});function k(){return D}function A(e,t){if(t){let n=e=>{t(e.detail)};window.addEventListener(e,n),a(()=>{window.removeEventListener(e,n)})}return function(t){window.dispatchEvent(new CustomEvent(e,{detail:t}))}}function j(e,t){let n=t;try{let t=localStorage.getItem(e);t!==null&&(n=JSON.parse(t))}catch(t){console.error(`[useLocalStorage] Failed to read key \"${e}\"`,t)}let[r,i]=s(n);function a(t){try{localStorage.setItem(e,JSON.stringify(t))}catch(t){console.error(`[useLocalStorage] Failed to write key \"${e}\"`,t)}i(()=>t)}function o(){try{localStorage.removeItem(e)}catch(t){console.error(`[useLocalStorage] Failed to remove key \"${e}\"`,t)}i(()=>t)}return[r,a,o]}const[M,N]=s(`en-US`);function P(){return{locale:M,setLocale(e){N(()=>e)}}}const[F,I]=s(`/`);window.addEventListener(`popstate`,e=>{let t=e.state?.route;typeof t==`string`&&I(()=>t)});function L(){return{route:F,navigate:e=>{e!==F()&&(history.pushState({route:e},``),I(()=>e))}}}function R(e,t){let n=t;try{let t=sessionStorage.getItem(e);t!==null&&(n=JSON.parse(t))}catch(t){console.error(`[useSessionStorage] Failed to read key \"${e}\"`,t)}let[r,i]=s(n);function a(t){try{sessionStorage.setItem(e,JSON.stringify(t))}catch(t){console.error(`[useSessionStorage] Failed to write key \"${e}\"`,t)}i(()=>t)}function o(){try{sessionStorage.removeItem(e)}catch(t){console.error(`[useSessionStorage] Failed to remove key \"${e}\"`,t)}i(()=>t)}return[r,a,o]}function z(e,t){return y(`div`,{...e,style:{marginBottom:e.mb??e.my??e.m,marginLeft:e.ml??e.mx??e.m,marginRight:e.mr??e.mx??e.m,marginTop:e.mt??e.my??e.m,paddingBottom:e.pb??e.py??e.p,paddingLeft:e.pl??e.px??e.p,paddingRight:e.pr??e.px??e.p,paddingTop:e.pt??e.py??e.p,background:e.bg,opacity:e.o,boxShadow:e.sh,borderTop:e.bt??e.by??e.b,borderRight:e.br??e.bx??e.b,borderBottom:e.bb??e.by??e.b,borderLeft:e.bl??e.bx??e.b,borderTopRightRadius:e.rtr??e.rt??e.rr??e.r,borderTopLeftRadius:e.rtl??e.rt??e.rl??e.r,borderBottomRightRadius:e.rbr??e.rb??e.rr??e.r,borderBottomLeftRadius:e.rbl??e.rb??e.rl??e.r,width:e.w??e.s,height:e.h??e.s,maxWidth:e.maxW,maxHeight:e.maxH,minWidth:e.minW,minHeight:e.minH,...e.style}},t)}function B(e,t){return y(z,{...e,style:{position:`absolute`,top:e.top,right:e.right,bottom:e.bottom,left:e.left,...e.style}},t)}function V(e,t){return y(z,{...e,style:{flex:e.flx,alignSelf:e.as,flexGrow:e.flxGrow,flexShrink:e.flxShrink,flexBasis:e.flxBasis,...e.style}},t)}function H(e,t){return y(V,{...e,style:{display:`flex`,justifyContent:e.jc,alignItems:e.ai,alignContent:e.ac,gap:e.g,flexDirection:e.flxDirection,flexWrap:e.flxWrap,flexFlow:e.flxFlow,...e.style}},t)}function U(e,t){return y(H,{...e,ai:e.ai??`center`,jc:e.jc??`center`},t)}function ne(e,t){return y(z,{...e,style:{position:`fixed`,top:e.top,right:e.right,bottom:e.bottom,left:e.left,zIndex:e.zIndex,...e.style}},t)}function W(e,t){return y(z,{...e,style:{gridArea:e.grdArea,gridColumn:e.grdColumn,gridRow:e.grdRow,...e.style}},t)}function G(e,t){return y(W,{...e,style:{display:`grid`,gap:e.g,alignItems:e.ai,justifyItems:e.ji,alignSelf:e.as,gridTemplateColumns:e.grdTemplateColumns,gridTemplateRows:e.grdTemplateRows,gridTemplateAreas:e.grdTemplateAreas,gridTemplate:e.grdTemplate,gridAutoColumns:e.grdAutoColumns,gridAutoRows:e.grdAutoRows,gridAutoFlow:e.grdAutoFlow,gridArea:e.grd,gridRowStart:e.grdRowStart,gridColumnStart:e.grdColumnStart,gridRowEnd:e.grdRowEnd,gridColumnEnd:e.grdColumnEnd,gridRow:e.grdRow,gridColumn:e.grdColumn,rowGap:e.grdRowGap,columnGap:e.grdColumnGap,...e.style}},t)}function K(e,t){return y(z,{...e,style:{position:`relative`,zIndex:e.zIndex,...e.style}},t)}function q(e,t){return y(K,{s:`100%`},y(B,{top:`0`,right:`0`,bottom:`0`,left:`0`,...e,style:{overflow:`auto`,...e.style}},t))}function J(e,t){return y(H,{...e,flxDirection:e.flxDirection??`column`},t)}function Y(e,t){return y(z,{...e,style:{position:`sticky`,top:e.top,right:e.right,bottom:e.bottom,left:e.left,zIndex:e.zIndex,...e.style}},t)}function X(e,t){return y(e.tag??`p`,{...e,style:{textAlign:e.a,fontFamily:e.ff,fontWeight:e.fw,fontSize:e.fs,lineHeight:e.lh,letterSpacing:e.ls,fontStyle:e.s,color:e.c,margin:e.m,marginBottom:e.mb??e.my??e.m,marginLeft:e.ml??e.mx??e.m,marginRight:e.mr??e.mx??e.m,marginTop:e.mt??e.my??e.m,padding:e.p,paddingBottom:e.pb??e.py??e.p,paddingLeft:e.pl??e.px??e.p,paddingRight:e.pr??e.px??e.p,paddingTop:e.pt??e.py??e.p,background:e.bg}},...t)}const Z={brand:`#000`,onBrand:`#fff`,gray0:`#f8f9fa`,gray100:`#f1f3f5`,gray200:`#e9ecef`,gray300:`#dee2e6`,gray400:`#ced4da`,gray500:`#adb5bd`,gray600:`#868e96`,gray700:`#495057`,gray800:`#343a40`,gray900:`#212529`,red0:`#fff5f5`,red100:`#ffe3e3`,red200:`#ffc9c9`,red300:`#ffa8a8`,red400:`#ff8787`,red500:`#ff6b6b`,red600:`#fa5252`,red700:`#f03e3e`,red800:`#e03131`,red900:`#c92a2a`,pink0:`#fff0f6`,pink100:`#ffdeeb`,pink200:`#fcc2d7`,pink300:`#faa2c1`,pink400:`#f783ac`,pink500:`#f06595`,pink600:`#e64980`,pink700:`#d6336c`,pink800:`#c2255c`,pink900:`#a61e4d`,grape0:`#f8f0fc`,grape100:`#f3d9fa`,grape200:`#eebefa`,grape300:`#e599f7`,grape400:`#da77f2`,grape500:`#cc5de8`,grape600:`#be4bdb`,grape700:`#ae3ec9`,grape800:`#9c36b5`,grape900:`#862e9c`,violet0:`#f3f0ff`,violet100:`#e5dbff`,violet200:`#d0bfff`,violet300:`#b197fc`,violet400:`#9775fa`,violet500:`#845ef7`,violet600:`#7950f2`,violet700:`#7048e8`,violet800:`#6741d9`,violet900:`#5f3dc4`,indigo0:`#edf2ff`,indigo100:`#dbe4ff`,indigo200:`#bac8ff`,indigo300:`#91a7ff`,indigo400:`#748ffc`,indigo500:`#5c7cfa`,indigo600:`#4c6ef5`,indigo700:`#4263eb`,indigo800:`#3b5bdb`,indigo900:`#364fc7`,blue0:`#e7f5ff`,blue100:`#d0ebff`,blue200:`#a5d8ff`,blue300:`#74c0fc`,blue400:`#4dabf7`,blue500:`#339af0`,blue600:`#228be6`,blue700:`#1c7ed6`,blue800:`#1971c2`,blue900:`#1864ab`,cyan0:`#e3fafc`,cyan100:`#c5f6fa`,cyan200:`#99e9f2`,cyan300:`#66d9e8`,cyan400:`#3bc9db`,cyan500:`#22b8cf`,cyan600:`#15aabf`,cyan700:`#1098ad`,cyan800:`#0c8599`,cyan900:`#0b7285`,teal0:`#e6fcf5`,teal100:`#c3fae8`,teal200:`#96f2d7`,teal300:`#63e6be`,teal400:`#38d9a9`,teal500:`#20c997`,teal600:`#12b886`,teal700:`#0ca678`,teal800:`#099268`,teal900:`#087f5b`,green0:`#ebfbee`,green100:`#d3f9d8`,green200:`#b2f2bb`,green300:`#8ce99a`,green400:`#69db7c`,green500:`#51cf66`,green600:`#40c057`,green700:`#37b24d`,green800:`#2f9e44`,green900:`#2b8a3e`,lime0:`#f4fce3`,lime100:`#e9fac8`,lime200:`#d8f5a2`,lime300:`#c0eb75`,lime400:`#a9e34b`,lime500:`#94d82d`,lime600:`#82c91e`,lime700:`#74b816`,lime800:`#66a80f`,lime900:`#5c940d`,yellow0:`#fff9db`,yellow100:`#fff3bf`,yellow200:`#ffec99`,yellow300:`#ffe066`,yellow400:`#ffd43b`,yellow500:`#fcc419`,yellow600:`#fab005`,yellow700:`#f59f00`,yellow800:`#f08c00`,yellow900:`#e67700`,orange0:`#fff4e6`,orange100:`#ffe8cc`,orange200:`#ffd8a8`,orange300:`#ffc078`,orange400:`#ffa94d`,orange500:`#ff922b`,orange600:`#fd7e14`,orange700:`#f76707`,orange800:`#e8590c`,orange900:`#d9480f`},Q={sans:`sans-serif`,serif:`serif`,mono:`monospace`},re={xs:`-0.05em`,sm:`-0.025em`,md:`0em`,lg:`0.025em`,xl:`0.05em`,\"2xl\":`0.1em`,\"3xl\":`0.15em`,\"4xl\":`0.2em`,\"5xl\":`0.25em`,\"6xl\":`0.3em`,\"7xl\":`0.35em`,\"8xl\":`0.4em`,\"9xl\":`0.45em`},ie={xs:`1rem`,sm:`1.25rem`,md:`1.5rem`,lg:`1.75rem`,xl:`2rem`,\"2xl\":`2.25rem`,\"3xl\":`2.5rem`,\"4xl\":`2.75rem`,\"5xl\":`3rem`,\"6xl\":`3.25rem`,\"7xl\":`3.5rem`,\"8xl\":`3.75rem`,\"9xl\":`4rem`},ae={xs:`0.75rem`,sm:`0.875rem`,md:`1rem`,lg:`1.125rem`,xl:`1.25rem`,\"2xl\":`1.5rem`,\"3xl\":`1.875rem`,\"4xl\":`2.25rem`,\"5xl\":`3rem`,\"6xl\":`3.75rem`,\"7xl\":`4.5rem`,\"8xl\":`6rem`,\"9xl\":`8rem`},oe={normal:`normal`,italic:`italic`},$={thin:100,extralight:200,light:300,normal:400,medium:500,semibold:600,bold:700,extrabold:800,black:900},se={family:Q,size:ae,weight:$,style:oe,lineHeight:ie,letterSpacing:re},ce={sm:`0.125rem`,md:`0.375rem`,lg:`0.5rem`,xl:`0.75rem`,\"2xl\":`1rem`,\"3xl\":`1.5rem`,full:`9999px`},le={sm:`0 1px 2px 0 rgb(0 0 0 / 0.05)`,md:`0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1)`,lg:`0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)`,xl:`0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1)`,\"2xl\":`0 25px 50px -12px rgb(0 0 0 / 0.25)`,inner:`inset 0 2px 4px 0 rgb(0 0 0 / 0.05)`},ue={xs:`0.75rem`,sm:`0.875rem`,md:`1rem`,lg:`1.125rem`,xl:`1.25rem`,\"2xl\":`1.5rem`,\"3xl\":`1.875rem`,\"4xl\":`2.25rem`,\"5xl\":`3rem`,\"6xl\":`3.75rem`,\"7xl\":`4.5rem`,\"8xl\":`6rem`,\"9xl\":`8rem`,\"1/12\":`8.333333%`,\"2/12\":`16.666667%`,\"3/12\":`25%`,\"4/12\":`33.333333%`,\"5/12\":`41.666667%`,\"6/12\":`50%`,\"7/12\":`58.333333%`,\"8/12\":`66.666667%`,\"9/12\":`75%`,\"10/12\":`83.333333%`,\"11/12\":`91.666667%`,\"1/5\":`20%`,\"2/5\":`40%`,\"3/5\":`60%`,\"4/5\":`80%`,\"1/4\":`25%`,\"3/4\":`75%`,\"1/3\":`33.333333%`,\"2/3\":`66.666667%`,\"1/2\":`50%`,full:`100%`},de={xs:`0.125rem`,sm:`0.25rem`,md:`0.5rem`,lg:`0.75rem`,xl:`1rem`,xxl:`1.5rem`,\"3xl\":`2rem`,\"4xl\":`2.5rem`,\"5xl\":`3rem`,\"6xl\":`3.5rem`,\"7xl\":`4rem`,\"8xl\":`4.5rem`},fe={normal:`normal`,italic:`italic`},pe={base:`100`,background:`200`,menu:`300`};exports.Absolute=B,exports.Box=z,exports.Center=U,exports.Fixed=ne,exports.Flex=H,exports.FlexItem=V,exports.For=x,exports.Grid=G,exports.GridItem=W,exports.Relative=K,exports.Repeat=w,exports.Scroll=q,exports.Show=C,exports.Stack=J,exports.Sticky=Y,exports.Text=X,exports.beginMountSession=n,exports.breakpoint=T,exports.color=Z,exports.connector=l,exports.effect=u,exports.endMountSession=r,exports.font=se,exports.fragment=S,exports.hasActiveMountSession=t,exports.jsx=y,exports.mount=i,exports.radius=ce,exports.render=d,exports.runUnmountsForElement=o,exports.shadow=le,exports.signal=s,exports.size=ue,exports.space=de,exports.style=fe,exports.unmount=a,exports.useBreakpoint=k,exports.useCustomEvent=A,exports.useLocalStorage=j,exports.useLocale=P,exports.useRouter=L,exports.useSessionStorage=R,exports.zIndex=pe;"],"mappings":";;KAGK,IAAA;KAEO,6BAA2B,iBAAe;;;iBAItC,0BAAwB,gBAAC,OAAA,kBAgBP,QAAM,MAAI,QAAQ,SAAK;UAkBxC,kBAAA;iBACA;oBACG;0BAEI,kBAAkB;wBACpB,kBAAkB;oBAEtB,aAAa;iCACA,eAAa;;cAGtC,SAAA,YAAqB;;;iBAOH;oBAIG;0BAUI,kBAAkB;wBAmBpB,kBAAkB;oBAatB,aAAa;iCASA,eAAa;;cAStC,WAAS;;;iBCxHN,oBACN,OAAO,kBACH,eAAa;;;KCCtB,IAAA;;;UAEK,KAAA;QACF;;UAGE,qBAAmB;QACrB,OAAO;;iBAGC,gBAAc,UAAU,SAAS;;;iBCjBjC,QAAA;;;KCEJ,OAAA,GAAU,WAAW,QAAQ;;;;;;;;;UAYxB,QAAA;;gBAED;SACP;YACG;;UAGK,KAAA;;;;UAKA,OAAA;;QAET;;UAGS,cAAA;;;KAIL,WAAA,WACH,0BACG,cACP;iBAEW,GAAA,eACA,iDAGb;;;KC1CS,aAAA,QAAqB,mBAAmB;KACxC,eAAA,gBAA+B;iBAS3B,qBAAA,CAAA;iBAIA,iBAAA,CAAA;iB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Error(`endMountSession called without active mount session`);for(let e of n.mounts)try{let n=e(t);n instanceof Promise&&n.catch(e=>console.error(`async mount callback failed`,e))}catch(e){console.error(`mount callback failed`,e)}if(n.unmounts.length>0){let e=t.__unmountCbs;e?e.push(...n.unmounts):t.__unmountCbs=[...n.unmounts]}}function i(t){let n=e[e.length-1];if(!n)throw Error(`mount(cb) called outside of a render session`);n.mounts.push(t)}function a(t){let n=e[e.length-1];if(!n)throw Error(`unmount(cb) called outside of a render session`);n.unmounts.push(t)}function o(e){let t=e.__unmountCbs;if(!(!t||t.length===0)){for(let e=t.length-1;e>=0;e--)try{let n=t[e]();n instanceof Promise&&n.catch(e=>console.error(`async unmount callback failed`,e))}catch(e){console.error(`unmount callback failed`,e)}e.__unmountCbs=void 0}}function s(e){let t=e,n=crypto.randomUUID();c.addTopic(n);let r=e=>(e&&(c.registerClbk(n,e),e(t)),t);return r.type=`signal`,[r,async e=>{let r=e(t);t=r instanceof Promise?await r:r,c.update(n,t)}]}const c=new class{topics=new Map;callbackMap=new Map;addTopic(e){this.topics.set(e,new Set)}removeTopic(e){let t=this.topics.get(e);if(t)for(let e of t)this.callbackMap.delete(e);this.topics.delete(e)}registerClbk(e,t){let n=this.topics.get(e);if(!n)throw Error(`Connector: unknown topic ${e}`);let r=this.callbackMap.get(t);if(r){r.refCount++;return}n.add(t),this.callbackMap.set(t,{uuid:e,refCount:1})}removeClbk(e,t){let n=this.callbackMap.get(t);n&&(n.refCount--,!(n.refCount>0)&&(this.topics.get(n.uuid)?.delete(t),this.callbackMap.delete(t)))}update(e,t){let n=this.topics.get(e);if(n)for(let e of n)e(t)}getUuidByClbk(e){let t=this.callbackMap.get(e);if(!t)throw Error(`Connector: no UUID for callback`);return t.uuid}};function l(e,n){let r=!1,i=e=>{if(!r){r=!0;return}try{let t=n(e);t instanceof Promise&&t.catch(e=>{console.error(`effect async callback failed`,e)})}catch(e){console.error(`effect callback failed`,e)}};e(i),t()&&a(()=>{let e=c.getUuidByClbk(i);c.removeClbk(e,i)})}function u(e,t){if(e==null)return{el:t.parent};if(Array.isArray(e)){let n=t.parent;for(let r of e)n=u(r,t).el;return{el:n}}if(e.kind===`text`)return{el:f(e,t)};if(e.kind===`signal`)return{el:p(e,t)};if(typeof e.tag==`function`){let i=e,a=i.tag;n();let o=u(a({...i.props,ctx:t},i.children),t);if(!(o.el instanceof Element))throw Error(`Component root must be a DOM Element`);return r(o.el),t.self=o.el,o}let i=ee(e,t),a={...t,parent:i,self:t.self};for(let t of e.children)u(t,a);return{el:i}}const d=new Set([`svg`,`path`,`circle`,`rect`,`line`,`polyline`,`polygon`,`g`,`defs`,`linearGradient`,`radialGradient`,`stop`,`mask`,`clipPath`,`pattern`,`text`,`tspan`,`use`,`symbol`,`view`,`ellipse`,`foreignObject`]);function ee(e,t){if(typeof e.tag!=`string`)throw Error(`Host renderer expects string tag`);let n=e.tag,r=d.has(n),i=r?document.createElementNS(`http://www.w3.org/2000/svg`,n):document.createElement(n),a=e.props??{};for(let[e,t]of Object.entries(a))if(!(e===`ctx`||e===`children`)){if(e.startsWith(`on`)&&typeof t==`function`){let n=e.slice(2).toLowerCase();i.addEventListener(n,t);continue}if(e===`style`&&t&&typeof t==`object`){for(let[e,n]of Object.entries(t))if(typeof n==`function`&&n.type===`signal`){let t=n();i.style[e]=String(t),n(t=>{i.style[e]=String(t)})}else i.style[e]=String(n);continue}if(typeof t==`function`&&t.type===`signal`){let n=t=>{r?i.setAttribute(e,String(t)):i[e]=t};n(t()),m(t,n);continue}r?i.setAttribute(e,String(t)):e in i?i[e]=t:i.setAttribute(e,String(t))}return t.parent.appendChild(i),i}function f(e,t){let n=document.createTextNode(e.value);return t.parent.appendChild(n),n}function p(e,n){let r=document.createTextNode(``);n.parent.appendChild(r);let i=e=>{r.nodeValue=String(e)};return r.nodeValue=String(e.read()),e.read(i),t()&&a(()=>{let e=c.getUuidByClbk(i);c.removeClbk(e,i)}),r}function m(e,n){let r=e=>n(e);e(r),t()&&a(()=>{let e=c.getUuidByClbk(r);c.removeClbk(e,r)})}function h(e){let t=Array.from(e.childNodes);for(let e of t)g(e);o(e),e.parentNode?e.parentNode.removeChild(e):e.remove()}function g(e){if(e instanceof Element){let t=Array.from(e.childNodes);for(let e of t)g(e);o(e),e.parentNode?e.parentNode.removeChild(e):e.remove();return}e.parentNode&&e.parentNode.removeChild(e)}function _(e,t,...n){return{kind:`element`,tag:e,props:t??{},children:n.flatMap(v)}}function v(e){return e==null||e===!1||e===!0?[]:typeof e==`function`&&e?.type===`signal`?{kind:`signal`,read:e}:typeof e==`string`||typeof e==`number`?{kind:`text`,value:String(e)}:Array.isArray(e)?e.flatMap(v):e}function y(e,[t]){let n=_(`csr-for-host`,{style:{display:`contents`}});return i(r=>{let{el:i}=u(n,{parent:r}),a=i,o=new Map,s=[];function c(n){let r=[];for(let i of n){if(!i||i.uuid==null)continue;let n=i.uuid;if(r.push(n),!o.has(n)){let{el:r}=u(t(i),{...e.ctx,parent:a});if(!(r instanceof Element))throw Error(`For: child root must be an Element`);o.set(n,r)}}for(let e of s)if(!r.includes(e)){let t=o.get(e);t&&h(t),o.delete(e)}let i=null;for(let e=r.length-1;e>=0;e--){let t=o.get(r[e]);a.insertBefore(t,i),i=t}s=r}c(e.each()),l(e.each,c)}),null}function b(e,...t){return t}function x(e,t){let n=_(`csr-show-host`,{style:{display:`contents`}}),r=_(`csr-show-content`,{style:{display:`contents`}},...t),a=null,o=null,s=!1;return i(t=>{let{el:i}=u(n,{parent:t});a=i,e.when(t=>{if(t===s)return;if(s=t,!s){o&&=(h(o),null);return}let{el:n}=u(r,{...e.ctx,parent:a});if(!(n instanceof Element))throw Error(`Show: content root must be an Element`);o=n})}),null}function S(e,t){if(typeof e.n==`number`){let n=[];for(let r=0;r<e.n;r++)n.push(t);return n}let n=e.n,[r,i]=s([]);return n(e=>{let t=[];for(let n=0;n<e;n++)t.push({uuid:String(n)});i(()=>t)}),_(y,{each:r},()=>t)}const C={mobile:0,tablet:601,laptop:1025,desktop:1441,large:1921};function w(e){return e>=C.large?`large`:e>=C.desktop?`desktop`:e>=C.laptop?`laptop`:e>=C.tablet?`tablet`:`mobile`}const[T,E]=s(w(window.innerWidth));let D=T();window.addEventListener(`resize`,()=>{let e=w(window.innerWidth);e!==D&&(D=e,E(()=>e))});function O(){return T}function k(e,t){if(t){let n=e=>{t(e.detail)};window.addEventListener(e,n),a(()=>{window.removeEventListener(e,n)})}return function(t){window.dispatchEvent(new CustomEvent(e,{detail:t}))}}const[A,j]=s(`en-US`);function M(){return{locale:A,setLocale(e){j(()=>e)}}}const[N,P]=s(`/`);window.addEventListener(`popstate`,e=>{let t=e.state?.route;typeof t==`string`&&P(()=>t)});function F(){return{route:N,navigate:e=>{e!==N()&&(history.pushState({route:e},``),P(()=>e))}}}function I(e,t){return _(`div`,{...e,style:{marginBottom:e.mb??e.my??e.m,marginLeft:e.ml??e.mx??e.m,marginRight:e.mr??e.mx??e.m,marginTop:e.mt??e.my??e.m,paddingBottom:e.pb??e.py??e.p,paddingLeft:e.pl??e.px??e.p,paddingRight:e.pr??e.px??e.p,paddingTop:e.pt??e.py??e.p,background:e.bg,opacity:e.o,boxShadow:e.sh,borderTop:e.bt??e.by??e.b,borderRight:e.br??e.bx??e.b,borderBottom:e.bb??e.by??e.b,borderLeft:e.bl??e.bx??e.b,borderTopRightRadius:e.rtr??e.rt??e.rr??e.r,borderTopLeftRadius:e.rtl??e.rt??e.rl??e.r,borderBottomRightRadius:e.rbr??e.rb??e.rr??e.r,borderBottomLeftRadius:e.rbl??e.rb??e.rl??e.r,width:e.w??e.s,height:e.h??e.s,maxWidth:e.maxW,maxHeight:e.maxH,minWidth:e.minW,minHeight:e.minH,...e.style}},t)}function L(e,t){return _(I,{...e,style:{position:`absolute`,top:e.top,right:e.right,bottom:e.bottom,left:e.left,...e.style}},t)}function R(e,t){return _(I,{...e,style:{flex:e.flx,alignSelf:e.as,flexGrow:e.flxGrow,flexShrink:e.flxShrink,flexBasis:e.flxBasis,...e.style}},t)}function z(e,t){return _(R,{...e,style:{display:`flex`,justifyContent:e.jc,alignItems:e.ai,alignContent:e.ac,gap:e.g,flexDirection:e.flxDirection,flexWrap:e.flxWrap,flexFlow:e.flxFlow,...e.style}},t)}function B(e,t){return _(z,{...e,ai:e.ai??`center`,jc:e.jc??`center`},t)}function V(e,t){return _(I,{...e,style:{position:`fixed`,top:e.top,right:e.right,bottom:e.bottom,left:e.left,zIndex:e.zIndex,...e.style}},t)}function H(e,t){return _(I,{...e,style:{gridArea:e.grdArea,gridColumn:e.grdColumn,gridRow:e.grdRow,...e.style}},t)}function U(e,t){return _(H,{...e,style:{display:`grid`,gap:e.g,alignItems:e.ai,justifyItems:e.ji,alignSelf:e.as,gridTemplateColumns:e.grdTemplateColumns,gridTemplateRows:e.grdTemplateRows,gridTemplateAreas:e.grdTemplateAreas,gridTemplate:e.grdTemplate,gridAutoColumns:e.grdAutoColumns,gridAutoRows:e.grdAutoRows,gridAutoFlow:e.grdAutoFlow,gridArea:e.grd,gridRowStart:e.grdRowStart,gridColumnStart:e.grdColumnStart,gridRowEnd:e.grdRowEnd,gridColumnEnd:e.grdColumnEnd,gridRow:e.grdRow,gridColumn:e.grdColumn,rowGap:e.grdRowGap,columnGap:e.grdColumnGap,...e.style}},t)}function W(e,t){return _(I,{...e,style:{position:`relative`,zIndex:e.zIndex,...e.style}},t)}function G(e,t){return _(W,{s:`100%`},_(L,{top:`0`,right:`0`,bottom:`0`,left:`0`,...e,style:{overflow:`auto`,...e.style}},t))}function K(e,t){return _(z,{...e,flxDirection:e.flxDirection??`column`},t)}function q(e,t){return _(I,{...e,style:{position:`sticky`,top:e.top,right:e.right,bottom:e.bottom,left:e.left,zIndex:e.zIndex,...e.style}},t)}function J(e,t){return _(e.tag??`p`,{...e,style:{textAlign:e.a,fontFamily:e.ff,fontWeight:e.fw,fontSize:e.fs,lineHeight:e.lh,letterSpacing:e.ls,fontStyle:e.s,color:e.c,margin:e.m,marginBottom:e.mb??e.my??e.m,marginLeft:e.ml??e.mx??e.m,marginRight:e.mr??e.mx??e.m,marginTop:e.mt??e.my??e.m,padding:e.p,paddingBottom:e.pb??e.py??e.p,paddingLeft:e.pl??e.px??e.p,paddingRight:e.pr??e.px??e.p,paddingTop:e.pt??e.py??e.p,background:e.bg}},...t)}const Y={brand:`#000`,onBrand:`#fff`,gray0:`#f8f9fa`,gray100:`#f1f3f5`,gray200:`#e9ecef`,gray300:`#dee2e6`,gray400:`#ced4da`,gray500:`#adb5bd`,gray600:`#868e96`,gray700:`#495057`,gray800:`#343a40`,gray900:`#212529`,red0:`#fff5f5`,red100:`#ffe3e3`,red200:`#ffc9c9`,red300:`#ffa8a8`,red400:`#ff8787`,red500:`#ff6b6b`,red600:`#fa5252`,red700:`#f03e3e`,red800:`#e03131`,red900:`#c92a2a`,pink0:`#fff0f6`,pink100:`#ffdeeb`,pink200:`#fcc2d7`,pink300:`#faa2c1`,pink400:`#f783ac`,pink500:`#f06595`,pink600:`#e64980`,pink700:`#d6336c`,pink800:`#c2255c`,pink900:`#a61e4d`,grape0:`#f8f0fc`,grape100:`#f3d9fa`,grape200:`#eebefa`,grape300:`#e599f7`,grape400:`#da77f2`,grape500:`#cc5de8`,grape600:`#be4bdb`,grape700:`#ae3ec9`,grape800:`#9c36b5`,grape900:`#862e9c`,violet0:`#f3f0ff`,violet100:`#e5dbff`,violet200:`#d0bfff`,violet300:`#b197fc`,violet400:`#9775fa`,violet500:`#845ef7`,violet600:`#7950f2`,violet700:`#7048e8`,violet800:`#6741d9`,violet900:`#5f3dc4`,indigo0:`#edf2ff`,indigo100:`#dbe4ff`,indigo200:`#bac8ff`,indigo300:`#91a7ff`,indigo400:`#748ffc`,indigo500:`#5c7cfa`,indigo600:`#4c6ef5`,indigo700:`#4263eb`,indigo800:`#3b5bdb`,indigo900:`#364fc7`,blue0:`#e7f5ff`,blue100:`#d0ebff`,blue200:`#a5d8ff`,blue300:`#74c0fc`,blue400:`#4dabf7`,blue500:`#339af0`,blue600:`#228be6`,blue700:`#1c7ed6`,blue800:`#1971c2`,blue900:`#1864ab`,cyan0:`#e3fafc`,cyan100:`#c5f6fa`,cyan200:`#99e9f2`,cyan300:`#66d9e8`,cyan400:`#3bc9db`,cyan500:`#22b8cf`,cyan600:`#15aabf`,cyan700:`#1098ad`,cyan800:`#0c8599`,cyan900:`#0b7285`,teal0:`#e6fcf5`,teal100:`#c3fae8`,teal200:`#96f2d7`,teal300:`#63e6be`,teal400:`#38d9a9`,teal500:`#20c997`,teal600:`#12b886`,teal700:`#0ca678`,teal800:`#099268`,teal900:`#087f5b`,green0:`#ebfbee`,green100:`#d3f9d8`,green200:`#b2f2bb`,green300:`#8ce99a`,green400:`#69db7c`,green500:`#51cf66`,green600:`#40c057`,green700:`#37b24d`,green800:`#2f9e44`,green900:`#2b8a3e`,lime0:`#f4fce3`,lime100:`#e9fac8`,lime200:`#d8f5a2`,lime300:`#c0eb75`,lime400:`#a9e34b`,lime500:`#94d82d`,lime600:`#82c91e`,lime700:`#74b816`,lime800:`#66a80f`,lime900:`#5c940d`,yellow0:`#fff9db`,yellow100:`#fff3bf`,yellow200:`#ffec99`,yellow300:`#ffe066`,yellow400:`#ffd43b`,yellow500:`#fcc419`,yellow600:`#fab005`,yellow700:`#f59f00`,yellow800:`#f08c00`,yellow900:`#e67700`,orange0:`#fff4e6`,orange100:`#ffe8cc`,orange200:`#ffd8a8`,orange300:`#ffc078`,orange400:`#ffa94d`,orange500:`#ff922b`,orange600:`#fd7e14`,orange700:`#f76707`,orange800:`#e8590c`,orange900:`#d9480f`},X={sans:`sans-serif`,serif:`serif`,mono:`monospace`},Z={xs:`-0.05em`,sm:`-0.025em`,md:`0em`,lg:`0.025em`,xl:`0.05em`,"2xl":`0.1em`,"3xl":`0.15em`,"4xl":`0.2em`,"5xl":`0.25em`,"6xl":`0.3em`,"7xl":`0.35em`,"8xl":`0.4em`,"9xl":`0.45em`},Q={xs:`1rem`,sm:`1.25rem`,md:`1.5rem`,lg:`1.75rem`,xl:`2rem`,"2xl":`2.25rem`,"3xl":`2.5rem`,"4xl":`2.75rem`,"5xl":`3rem`,"6xl":`3.25rem`,"7xl":`3.5rem`,"8xl":`3.75rem`,"9xl":`4rem`},$={family:X,size:{xs:`0.75rem`,sm:`0.875rem`,md:`1rem`,lg:`1.125rem`,xl:`1.25rem`,"2xl":`1.5rem`,"3xl":`1.875rem`,"4xl":`2.25rem`,"5xl":`3rem`,"6xl":`3.75rem`,"7xl":`4.5rem`,"8xl":`6rem`,"9xl":`8rem`},weight:{thin:100,extralight:200,light:300,normal:400,medium:500,semibold:600,bold:700,extrabold:800,black:900},style:{normal:`normal`,italic:`italic`},lineHeight:Q,letterSpacing:Z},te={sm:`0.125rem`,md:`0.375rem`,lg:`0.5rem`,xl:`0.75rem`,"2xl":`1rem`,"3xl":`1.5rem`,full:`9999px`},ne={sm:`0 1px 2px 0 rgb(0 0 0 / 0.05)`,md:`0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1)`,lg:`0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)`,xl:`0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1)`,"2xl":`0 25px 50px -12px rgb(0 0 0 / 0.25)`,inner:`inset 0 2px 4px 0 rgb(0 0 0 / 0.05)`},re={xs:`0.75rem`,sm:`0.875rem`,md:`1rem`,lg:`1.125rem`,xl:`1.25rem`,"2xl":`1.5rem`,"3xl":`1.875rem`,"4xl":`2.25rem`,"5xl":`3rem`,"6xl":`3.75rem`,"7xl":`4.5rem`,"8xl":`6rem`,"9xl":`8rem`,"1/12":`8.333333%`,"2/12":`16.666667%`,"3/12":`25%`,"4/12":`33.333333%`,"5/12":`41.666667%`,"6/12":`50%`,"7/12":`58.333333%`,"8/12":`66.666667%`,"9/12":`75%`,"10/12":`83.333333%`,"11/12":`91.666667%`,"1/5":`20%`,"2/5":`40%`,"3/5":`60%`,"4/5":`80%`,"1/4":`25%`,"3/4":`75%`,"1/3":`33.333333%`,"2/3":`66.666667%`,"1/2":`50%`,full:`100%`},ie={xs:`0.125rem`,sm:`0.25rem`,md:`0.5rem`,lg:`0.75rem`,xl:`1rem`,xxl:`1.5rem`,"3xl":`2rem`,"4xl":`2.5rem`,"5xl":`3rem`,"6xl":`3.5rem`,"7xl":`4rem`,"8xl":`4.5rem`},ae={normal:`normal`,italic:`italic`},oe={thin:100,extralight:200,light:300,normal:400,medium:500,semibold:600,bold:700,extrabold:800,black:900},se={base:`100`,background:`200`,menu:`300`};export{L as Absolute,I as Box,B as Center,V as Fixed,z as Flex,R as FlexItem,y as For,U as Grid,H as GridItem,W as Relative,S as Repeat,G as Scroll,x as Show,K as Stack,q as Sticky,J as Text,n as beginMountSession,C as breakpoint,Y as color,c as connector,l as effect,r as endMountSession,$ as font,b as fragment,t as hasActiveMountSession,_ as jsx,i as mount,te as radius,u as render,o as runUnmountsForElement,ne as shadow,s as signal,re as size,ie as space,ae as style,a as unmount,O as useBreakpoint,k as useCustomEvent,M as useLocale,F as useRouter,oe as weight,se as zIndex};
1
+ const e=[];function t(){return e.length>0}function n(){e.push({mounts:[],unmounts:[]})}function r(t){let n=e.pop();if(!n)throw Error(`endMountSession called without active mount session`);for(let e of n.mounts)try{let n=e(t);n instanceof Promise&&n.catch(e=>console.error(`async mount callback failed`,e))}catch(e){console.error(`mount callback failed`,e)}if(n.unmounts.length>0){let e=t.__unmountCbs;e?e.push(...n.unmounts):t.__unmountCbs=[...n.unmounts]}}function i(t){let n=e[e.length-1];if(!n)throw Error(`mount(cb) called outside of a render session`);n.mounts.push(t)}function a(t){let n=e[e.length-1];if(!n)throw Error(`unmount(cb) called outside of a render session`);n.unmounts.push(t)}function o(e){let t=e.__unmountCbs;if(!(!t||t.length===0)){for(let e=t.length-1;e>=0;e--)try{let n=t[e]();n instanceof Promise&&n.catch(e=>console.error(`async unmount callback failed`,e))}catch(e){console.error(`unmount callback failed`,e)}e.__unmountCbs=void 0}}function s(e){let t=e,n=crypto.randomUUID();c.addTopic(n);let r=e=>(e&&(c.registerClbk(n,e),e(t)),t);return r.type=`signal`,[r,async e=>{let r=e(t);t=r instanceof Promise?await r:r,c.update(n,t)}]}const c=new class{topics=new Map;callbackMap=new Map;addTopic(e){this.topics.set(e,new Set)}removeTopic(e){let t=this.topics.get(e);if(t)for(let e of t)this.callbackMap.delete(e);this.topics.delete(e)}registerClbk(e,t){let n=this.topics.get(e);if(!n)throw Error(`Connector: unknown topic ${e}`);let r=this.callbackMap.get(t);if(r){r.refCount++;return}n.add(t),this.callbackMap.set(t,{uuid:e,refCount:1})}removeClbk(e,t){let n=this.callbackMap.get(t);n&&(n.refCount--,!(n.refCount>0)&&(this.topics.get(n.uuid)?.delete(t),this.callbackMap.delete(t)))}update(e,t){let n=this.topics.get(e);if(n)for(let e of n)e(t)}getUuidByClbk(e){let t=this.callbackMap.get(e);if(!t)throw Error(`Connector: no UUID for callback`);return t.uuid}};function l(e,n){let r=!1,i=e=>{if(!r){r=!0;return}try{let t=n(e);t instanceof Promise&&t.catch(e=>{console.error(`effect async callback failed`,e)})}catch(e){console.error(`effect callback failed`,e)}};e(i),t()&&a(()=>{let e=c.getUuidByClbk(i);c.removeClbk(e,i)})}function u(e,t){if(e==null)return{el:t.parent};if(Array.isArray(e)){let n=t.parent;for(let r of e)n=u(r,t).el;return{el:n}}if(e.kind===`text`)return{el:p(e,t)};if(e.kind===`signal`)return{el:m(e,t)};if(typeof e.tag==`function`){let i=e,a=i.tag;n();let o=u(a({...i.props,ctx:t},i.children),t);if(!(o.el instanceof Element))throw Error(`Component root must be a DOM Element`);return r(o.el),t.self=o.el,o}let i=f(e,t),a={...t,parent:i,self:t.self};for(let t of e.children)u(t,a);return{el:i}}const d=new Set([`svg`,`path`,`circle`,`rect`,`line`,`polyline`,`polygon`,`g`,`defs`,`linearGradient`,`radialGradient`,`stop`,`mask`,`clipPath`,`pattern`,`text`,`tspan`,`use`,`symbol`,`view`,`ellipse`,`foreignObject`]);function f(e,t){if(typeof e.tag!=`string`)throw Error(`Host renderer expects string tag`);let n=e.tag,r=d.has(n),i=r?document.createElementNS(`http://www.w3.org/2000/svg`,n):document.createElement(n),a=e.props??{};for(let[e,t]of Object.entries(a))if(!(e===`ctx`||e===`children`)){if(e.startsWith(`on`)&&typeof t==`function`){let n=e.slice(2).toLowerCase();i.addEventListener(n,t);continue}if(e===`style`&&t&&typeof t==`object`){for(let[e,n]of Object.entries(t))if(n!==void 0)if(typeof n==`function`&&n.type===`signal`){let t=n();i.style[e]=String(t),n(t=>{i.style[e]=String(t)})}else i.style[e]=String(n);continue}if(typeof t==`function`&&t.type===`signal`){let n=t=>{r?i.setAttribute(e,String(t)):i[e]=t};n(t()),h(t,n);continue}r?i.setAttribute(e,String(t)):e in i?i[e]=t:i.setAttribute(e,String(t))}return t.parent.appendChild(i),i}function p(e,t){let n=document.createTextNode(e.value);return t.parent.appendChild(n),n}function m(e,n){let r=document.createTextNode(``);n.parent.appendChild(r);let i=e=>{r.nodeValue=String(e)};return r.nodeValue=String(e.read()),e.read(i),t()&&a(()=>{let e=c.getUuidByClbk(i);c.removeClbk(e,i)}),r}function h(e,n){let r=e=>n(e);e(r),t()&&a(()=>{let e=c.getUuidByClbk(r);c.removeClbk(e,r)})}function g(e){let t=Array.from(e.childNodes);for(let e of t)_(e);o(e),e.parentNode?e.parentNode.removeChild(e):e.remove()}function _(e){if(e instanceof Element){let t=Array.from(e.childNodes);for(let e of t)_(e);o(e),e.parentNode?e.parentNode.removeChild(e):e.remove();return}e.parentNode&&e.parentNode.removeChild(e)}function v(e,t,...n){return{kind:`element`,tag:e,props:t??{},children:n.flatMap(y)}}function y(e){return e==null||e===!1||e===!0?[]:typeof e==`function`&&e?.type===`signal`?{kind:`signal`,read:e}:typeof e==`string`||typeof e==`number`?{kind:`text`,value:String(e)}:Array.isArray(e)?e.flatMap(y):e}function b(e,[t]){let n=v(`csr-for-host`,{style:{display:`contents`}});return i(r=>{let{el:i}=u(n,{parent:r}),a=i,o=new Map,s=[];function c(n){let r=[];for(let i of n){if(!i||i.uuid==null)continue;let n=i.uuid;if(r.push(n),!o.has(n)){let{el:r}=u(t(i),{...e.ctx,parent:a});if(!(r instanceof Element))throw Error(`For: child root must be an Element`);o.set(n,r)}}for(let e of s)if(!r.includes(e)){let t=o.get(e);t&&g(t),o.delete(e)}let i=null;for(let e=r.length-1;e>=0;e--){let t=o.get(r[e]);a.insertBefore(t,i),i=t}s=r}c(e.each()),l(e.each,c)}),null}function x(e,...t){return t}function S(e,t){let n=v(`csr-show-host`,{style:{display:`contents`}}),r=v(`csr-show-content`,{style:{display:`contents`}},...t),a=null,o=null,s=!1;return i(t=>{let{el:i}=u(n,{parent:t});a=i,e.when(t=>{if(t===s)return;if(s=t,!s){o&&=(g(o),null);return}let{el:n}=u(r,{...e.ctx,parent:a});if(!(n instanceof Element))throw Error(`Show: content root must be an Element`);o=n})}),null}function C(e,t){if(typeof e.n==`number`){let n=[];for(let r=0;r<e.n;r++)n.push(t);return n}let n=e.n,[r,i]=s([]);return n(e=>{let t=[];for(let n=0;n<e;n++)t.push({uuid:String(n)});i(()=>t)}),v(b,{each:r},()=>t)}const w={mobile:0,tablet:601,laptop:1025,desktop:1441,large:1921};function T(e){return e>=w.large?`large`:e>=w.desktop?`desktop`:e>=w.laptop?`laptop`:e>=w.tablet?`tablet`:`mobile`}const[E,ee]=s(T(window.innerWidth));let D=E();window.addEventListener(`resize`,()=>{let e=T(window.innerWidth);e!==D&&(D=e,ee(()=>e))});function O(){return E}function k(e,t){if(t){let n=e=>{t(e.detail)};window.addEventListener(e,n),a(()=>{window.removeEventListener(e,n)})}return function(t){window.dispatchEvent(new CustomEvent(e,{detail:t}))}}function A(e,t){let n=t;try{let t=localStorage.getItem(e);t!==null&&(n=JSON.parse(t))}catch(t){console.error(`[useLocalStorage] Failed to read key "${e}"`,t)}let[r,i]=s(n);function a(t){try{localStorage.setItem(e,JSON.stringify(t))}catch(t){console.error(`[useLocalStorage] Failed to write key "${e}"`,t)}i(()=>t)}function o(){try{localStorage.removeItem(e)}catch(t){console.error(`[useLocalStorage] Failed to remove key "${e}"`,t)}i(()=>t)}return[r,a,o]}const[j,M]=s(`en-US`);function N(){return{locale:j,setLocale(e){M(()=>e)}}}const[P,F]=s(`/`);window.addEventListener(`popstate`,e=>{let t=e.state?.route;typeof t==`string`&&F(()=>t)});function I(){return{route:P,navigate:e=>{e!==P()&&(history.pushState({route:e},``),F(()=>e))}}}function L(e,t){let n=t;try{let t=sessionStorage.getItem(e);t!==null&&(n=JSON.parse(t))}catch(t){console.error(`[useSessionStorage] Failed to read key "${e}"`,t)}let[r,i]=s(n);function a(t){try{sessionStorage.setItem(e,JSON.stringify(t))}catch(t){console.error(`[useSessionStorage] Failed to write key "${e}"`,t)}i(()=>t)}function o(){try{sessionStorage.removeItem(e)}catch(t){console.error(`[useSessionStorage] Failed to remove key "${e}"`,t)}i(()=>t)}return[r,a,o]}function R(e,t){return v(`div`,{...e,style:{marginBottom:e.mb??e.my??e.m,marginLeft:e.ml??e.mx??e.m,marginRight:e.mr??e.mx??e.m,marginTop:e.mt??e.my??e.m,paddingBottom:e.pb??e.py??e.p,paddingLeft:e.pl??e.px??e.p,paddingRight:e.pr??e.px??e.p,paddingTop:e.pt??e.py??e.p,background:e.bg,opacity:e.o,boxShadow:e.sh,borderTop:e.bt??e.by??e.b,borderRight:e.br??e.bx??e.b,borderBottom:e.bb??e.by??e.b,borderLeft:e.bl??e.bx??e.b,borderTopRightRadius:e.rtr??e.rt??e.rr??e.r,borderTopLeftRadius:e.rtl??e.rt??e.rl??e.r,borderBottomRightRadius:e.rbr??e.rb??e.rr??e.r,borderBottomLeftRadius:e.rbl??e.rb??e.rl??e.r,width:e.w??e.s,height:e.h??e.s,maxWidth:e.maxW,maxHeight:e.maxH,minWidth:e.minW,minHeight:e.minH,...e.style}},t)}function z(e,t){return v(R,{...e,style:{position:`absolute`,top:e.top,right:e.right,bottom:e.bottom,left:e.left,...e.style}},t)}function B(e,t){return v(R,{...e,style:{flex:e.flx,alignSelf:e.as,flexGrow:e.flxGrow,flexShrink:e.flxShrink,flexBasis:e.flxBasis,...e.style}},t)}function V(e,t){return v(B,{...e,style:{display:`flex`,justifyContent:e.jc,alignItems:e.ai,alignContent:e.ac,gap:e.g,flexDirection:e.flxDirection,flexWrap:e.flxWrap,flexFlow:e.flxFlow,...e.style}},t)}function H(e,t){return v(V,{...e,ai:e.ai??`center`,jc:e.jc??`center`},t)}function U(e,t){return v(R,{...e,style:{position:`fixed`,top:e.top,right:e.right,bottom:e.bottom,left:e.left,zIndex:e.zIndex,...e.style}},t)}function W(e,t){return v(R,{...e,style:{gridArea:e.grdArea,gridColumn:e.grdColumn,gridRow:e.grdRow,...e.style}},t)}function G(e,t){return v(W,{...e,style:{display:`grid`,gap:e.g,alignItems:e.ai,justifyItems:e.ji,alignSelf:e.as,gridTemplateColumns:e.grdTemplateColumns,gridTemplateRows:e.grdTemplateRows,gridTemplateAreas:e.grdTemplateAreas,gridTemplate:e.grdTemplate,gridAutoColumns:e.grdAutoColumns,gridAutoRows:e.grdAutoRows,gridAutoFlow:e.grdAutoFlow,gridArea:e.grd,gridRowStart:e.grdRowStart,gridColumnStart:e.grdColumnStart,gridRowEnd:e.grdRowEnd,gridColumnEnd:e.grdColumnEnd,gridRow:e.grdRow,gridColumn:e.grdColumn,rowGap:e.grdRowGap,columnGap:e.grdColumnGap,...e.style}},t)}function K(e,t){return v(R,{...e,style:{position:`relative`,zIndex:e.zIndex,...e.style}},t)}function q(e,t){return v(K,{s:`100%`},v(z,{top:`0`,right:`0`,bottom:`0`,left:`0`,...e,style:{overflow:`auto`,...e.style}},t))}function J(e,t){return v(V,{...e,flxDirection:e.flxDirection??`column`},t)}function Y(e,t){return v(R,{...e,style:{position:`sticky`,top:e.top,right:e.right,bottom:e.bottom,left:e.left,zIndex:e.zIndex,...e.style}},t)}function X(e,t){return v(e.tag??`p`,{...e,style:{textAlign:e.a,fontFamily:e.ff,fontWeight:e.fw,fontSize:e.fs,lineHeight:e.lh,letterSpacing:e.ls,fontStyle:e.s,color:e.c,margin:e.m,marginBottom:e.mb??e.my??e.m,marginLeft:e.ml??e.mx??e.m,marginRight:e.mr??e.mx??e.m,marginTop:e.mt??e.my??e.m,padding:e.p,paddingBottom:e.pb??e.py??e.p,paddingLeft:e.pl??e.px??e.p,paddingRight:e.pr??e.px??e.p,paddingTop:e.pt??e.py??e.p,background:e.bg}},...t)}const Z={brand:`#000`,onBrand:`#fff`,gray0:`#f8f9fa`,gray100:`#f1f3f5`,gray200:`#e9ecef`,gray300:`#dee2e6`,gray400:`#ced4da`,gray500:`#adb5bd`,gray600:`#868e96`,gray700:`#495057`,gray800:`#343a40`,gray900:`#212529`,red0:`#fff5f5`,red100:`#ffe3e3`,red200:`#ffc9c9`,red300:`#ffa8a8`,red400:`#ff8787`,red500:`#ff6b6b`,red600:`#fa5252`,red700:`#f03e3e`,red800:`#e03131`,red900:`#c92a2a`,pink0:`#fff0f6`,pink100:`#ffdeeb`,pink200:`#fcc2d7`,pink300:`#faa2c1`,pink400:`#f783ac`,pink500:`#f06595`,pink600:`#e64980`,pink700:`#d6336c`,pink800:`#c2255c`,pink900:`#a61e4d`,grape0:`#f8f0fc`,grape100:`#f3d9fa`,grape200:`#eebefa`,grape300:`#e599f7`,grape400:`#da77f2`,grape500:`#cc5de8`,grape600:`#be4bdb`,grape700:`#ae3ec9`,grape800:`#9c36b5`,grape900:`#862e9c`,violet0:`#f3f0ff`,violet100:`#e5dbff`,violet200:`#d0bfff`,violet300:`#b197fc`,violet400:`#9775fa`,violet500:`#845ef7`,violet600:`#7950f2`,violet700:`#7048e8`,violet800:`#6741d9`,violet900:`#5f3dc4`,indigo0:`#edf2ff`,indigo100:`#dbe4ff`,indigo200:`#bac8ff`,indigo300:`#91a7ff`,indigo400:`#748ffc`,indigo500:`#5c7cfa`,indigo600:`#4c6ef5`,indigo700:`#4263eb`,indigo800:`#3b5bdb`,indigo900:`#364fc7`,blue0:`#e7f5ff`,blue100:`#d0ebff`,blue200:`#a5d8ff`,blue300:`#74c0fc`,blue400:`#4dabf7`,blue500:`#339af0`,blue600:`#228be6`,blue700:`#1c7ed6`,blue800:`#1971c2`,blue900:`#1864ab`,cyan0:`#e3fafc`,cyan100:`#c5f6fa`,cyan200:`#99e9f2`,cyan300:`#66d9e8`,cyan400:`#3bc9db`,cyan500:`#22b8cf`,cyan600:`#15aabf`,cyan700:`#1098ad`,cyan800:`#0c8599`,cyan900:`#0b7285`,teal0:`#e6fcf5`,teal100:`#c3fae8`,teal200:`#96f2d7`,teal300:`#63e6be`,teal400:`#38d9a9`,teal500:`#20c997`,teal600:`#12b886`,teal700:`#0ca678`,teal800:`#099268`,teal900:`#087f5b`,green0:`#ebfbee`,green100:`#d3f9d8`,green200:`#b2f2bb`,green300:`#8ce99a`,green400:`#69db7c`,green500:`#51cf66`,green600:`#40c057`,green700:`#37b24d`,green800:`#2f9e44`,green900:`#2b8a3e`,lime0:`#f4fce3`,lime100:`#e9fac8`,lime200:`#d8f5a2`,lime300:`#c0eb75`,lime400:`#a9e34b`,lime500:`#94d82d`,lime600:`#82c91e`,lime700:`#74b816`,lime800:`#66a80f`,lime900:`#5c940d`,yellow0:`#fff9db`,yellow100:`#fff3bf`,yellow200:`#ffec99`,yellow300:`#ffe066`,yellow400:`#ffd43b`,yellow500:`#fcc419`,yellow600:`#fab005`,yellow700:`#f59f00`,yellow800:`#f08c00`,yellow900:`#e67700`,orange0:`#fff4e6`,orange100:`#ffe8cc`,orange200:`#ffd8a8`,orange300:`#ffc078`,orange400:`#ffa94d`,orange500:`#ff922b`,orange600:`#fd7e14`,orange700:`#f76707`,orange800:`#e8590c`,orange900:`#d9480f`},Q={sans:`sans-serif`,serif:`serif`,mono:`monospace`},$={xs:`-0.05em`,sm:`-0.025em`,md:`0em`,lg:`0.025em`,xl:`0.05em`,"2xl":`0.1em`,"3xl":`0.15em`,"4xl":`0.2em`,"5xl":`0.25em`,"6xl":`0.3em`,"7xl":`0.35em`,"8xl":`0.4em`,"9xl":`0.45em`},te={xs:`1rem`,sm:`1.25rem`,md:`1.5rem`,lg:`1.75rem`,xl:`2rem`,"2xl":`2.25rem`,"3xl":`2.5rem`,"4xl":`2.75rem`,"5xl":`3rem`,"6xl":`3.25rem`,"7xl":`3.5rem`,"8xl":`3.75rem`,"9xl":`4rem`},ne={family:Q,size:{xs:`0.75rem`,sm:`0.875rem`,md:`1rem`,lg:`1.125rem`,xl:`1.25rem`,"2xl":`1.5rem`,"3xl":`1.875rem`,"4xl":`2.25rem`,"5xl":`3rem`,"6xl":`3.75rem`,"7xl":`4.5rem`,"8xl":`6rem`,"9xl":`8rem`},weight:{thin:100,extralight:200,light:300,normal:400,medium:500,semibold:600,bold:700,extrabold:800,black:900},style:{normal:`normal`,italic:`italic`},lineHeight:te,letterSpacing:$},re={sm:`0.125rem`,md:`0.375rem`,lg:`0.5rem`,xl:`0.75rem`,"2xl":`1rem`,"3xl":`1.5rem`,full:`9999px`},ie={sm:`0 1px 2px 0 rgb(0 0 0 / 0.05)`,md:`0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1)`,lg:`0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)`,xl:`0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1)`,"2xl":`0 25px 50px -12px rgb(0 0 0 / 0.25)`,inner:`inset 0 2px 4px 0 rgb(0 0 0 / 0.05)`},ae={xs:`0.75rem`,sm:`0.875rem`,md:`1rem`,lg:`1.125rem`,xl:`1.25rem`,"2xl":`1.5rem`,"3xl":`1.875rem`,"4xl":`2.25rem`,"5xl":`3rem`,"6xl":`3.75rem`,"7xl":`4.5rem`,"8xl":`6rem`,"9xl":`8rem`,"1/12":`8.333333%`,"2/12":`16.666667%`,"3/12":`25%`,"4/12":`33.333333%`,"5/12":`41.666667%`,"6/12":`50%`,"7/12":`58.333333%`,"8/12":`66.666667%`,"9/12":`75%`,"10/12":`83.333333%`,"11/12":`91.666667%`,"1/5":`20%`,"2/5":`40%`,"3/5":`60%`,"4/5":`80%`,"1/4":`25%`,"3/4":`75%`,"1/3":`33.333333%`,"2/3":`66.666667%`,"1/2":`50%`,full:`100%`},oe={xs:`0.125rem`,sm:`0.25rem`,md:`0.5rem`,lg:`0.75rem`,xl:`1rem`,xxl:`1.5rem`,"3xl":`2rem`,"4xl":`2.5rem`,"5xl":`3rem`,"6xl":`3.5rem`,"7xl":`4rem`,"8xl":`4.5rem`},se={normal:`normal`,italic:`italic`},ce={base:`100`,background:`200`,menu:`300`};export{z as Absolute,R as Box,H as Center,U as Fixed,V as Flex,B as FlexItem,b as For,G as Grid,W as GridItem,K as Relative,C as Repeat,q as Scroll,S as Show,J as Stack,Y as Sticky,X as Text,n as beginMountSession,w as breakpoint,Z as color,c as connector,l as effect,r as endMountSession,ne as font,x as fragment,t as hasActiveMountSession,v as jsx,i as mount,re as radius,u as render,o as runUnmountsForElement,ie as shadow,s as signal,ae as size,oe as space,se as style,a as unmount,O as useBreakpoint,k as useCustomEvent,A as useLocalStorage,N as useLocale,I as useRouter,L as useSessionStorage,ce as zIndex};
2
2
  //# sourceMappingURL=index.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","names":["sessionStack: Session[]","read: ReadFn<T>","write","last: Node","last","childCtx: RenderCtx","order: Uuid[]","nextOrder: Uuid[]","el","anchor: ChildNode | null","hostEl: Element | null","contentEl: Element | null","out: any[]","next: { uuid: string }[]","write","size","style","weight"],"sources":["../core/lifecycle.ts","../core/signal.ts","../core/effect.ts","../core/render.ts","../core/destroy.ts","../core/jsx.ts","../core/for.ts","../core/fragment.ts","../core/show.ts","../helper/repeat.tsx","../style/breakpoint.ts","../hooks/use-breakpoint.ts","../hooks/use-custom-event.ts","../hooks/use-locale.ts","../hooks/use-router.ts","../layout/box.tsx","../layout/absolute.tsx","../layout/flex-item.tsx","../layout/flex.tsx","../layout/center.tsx","../layout/fixed.tsx","../layout/grid-item.tsx","../layout/grid.tsx","../layout/relative.tsx","../layout/scroll.tsx","../layout/stack.tsx","../layout/sticky.tsx","../layout/text.tsx","../style/color.ts","../style/font.ts","../style/radius.ts","../style/shadow.ts","../style/size.ts","../style/space.ts","../style/style.ts","../style/weight.ts","../style/z-index.ts"],"sourcesContent":["// lifecycle.ts\n// Synchronous render lifecycle with async-tolerant mount/unmount callbacks\n\nexport type MountCallback = (el: Element) => void | Promise<void>;\nexport type UnmountCallback = () => void | Promise<void>;\n\ninterface Session {\n mounts: MountCallback[];\n unmounts: UnmountCallback[];\n}\n\nconst sessionStack: Session[] = [];\n\nexport function hasActiveMountSession(): boolean {\n return sessionStack.length > 0;\n}\n\nexport function beginMountSession(): void {\n sessionStack.push({\n mounts: [],\n unmounts: [],\n });\n}\n\nexport function endMountSession(root: Element): void {\n const session = sessionStack.pop();\n if (!session) {\n throw new Error(\"endMountSession called without active mount session\");\n }\n\n // fire-and-forget mount callbacks\n for (const cb of session.mounts) {\n try {\n const r = cb(root);\n if (r instanceof Promise) {\n r.catch((err) => console.error(\"async mount callback failed\", err));\n }\n } catch (err) {\n console.error(\"mount callback failed\", err);\n }\n }\n\n if (session.unmounts.length > 0) {\n const store = (root as any).__unmountCbs as UnmountCallback[] | undefined;\n if (store) {\n store.push(...session.unmounts);\n } else {\n (root as any).__unmountCbs = [...session.unmounts];\n }\n }\n}\n\nexport function mount(cb: MountCallback): void {\n const session = sessionStack[sessionStack.length - 1];\n if (!session) {\n throw new Error(\"mount(cb) called outside of a render session\");\n }\n session.mounts.push(cb);\n}\n\nexport function unmount(cb: UnmountCallback): void {\n const session = sessionStack[sessionStack.length - 1];\n if (!session) {\n throw new Error(\"unmount(cb) called outside of a render session\");\n }\n session.unmounts.push(cb);\n}\n\nexport function runUnmountsForElement(el: Element): void {\n const list = (el as any).__unmountCbs as UnmountCallback[] | undefined;\n if (!list || list.length === 0) return;\n\n for (let i = list.length - 1; i >= 0; i--) {\n try {\n const r = list[i]!();\n if (r instanceof Promise) {\n r.catch((err) => console.error(\"async unmount callback failed\", err));\n }\n } catch (err) {\n console.error(\"unmount callback failed\", err);\n }\n }\n\n (el as any).__unmountCbs = undefined;\n}\n","// signal.ts\n// Synchronous signal with ref-counted subscriptions (prop-safe, leak-safe)\n\ntype UUID = string;\n\nexport type ReadFn<T> = ((cb?: (value: T) => void) => T) & {\n type: \"signal\";\n};\n\nexport function signal<T>(initialValue: T) {\n let value = initialValue;\n const uuid = crypto.randomUUID();\n\n connector.addTopic(uuid);\n\n const read: ReadFn<T> = (cb?: (v: T) => void): T => {\n if (cb) {\n connector.registerClbk(uuid, cb);\n cb(value);\n }\n return value;\n };\n\n read.type = \"signal\";\n\n const write = async (fn: (prev: T) => T | Promise<T>): Promise<void> => {\n const next = fn(value);\n value = next instanceof Promise ? await next : next;\n connector.update(uuid, value);\n };\n\n return [read, write] as const;\n}\n\n/* ============================================================\n * Connector\n * ============================================================ */\n\ninterface CallbackEntry {\n uuid: UUID;\n refCount: number;\n}\n\nexport interface ConnectorInterface {\n addTopic(uuid: UUID): void;\n removeTopic(uuid: UUID): void;\n\n registerClbk<T>(uuid: UUID, cb: (value: T) => void): void;\n removeClbk<T>(uuid: UUID, cb: (value: T) => void): void;\n\n update<T>(uuid: UUID, value: T): void;\n getUuidByClbk<T>(cb: (value: T) => void): UUID;\n}\n\nclass Connector implements ConnectorInterface {\n // uuid → listeners\n private topics = new Map<UUID, Set<(value: any) => void>>();\n\n // callback → { uuid, refCount }\n private callbackMap = new Map<(value: any) => void, CallbackEntry>();\n\n public addTopic(uuid: UUID): void {\n this.topics.set(uuid, new Set());\n }\n\n public removeTopic(uuid: UUID): void {\n const listeners = this.topics.get(uuid);\n if (listeners) {\n for (const cb of listeners) {\n this.callbackMap.delete(cb);\n }\n }\n this.topics.delete(uuid);\n }\n\n public registerClbk<T>(uuid: UUID, cb: (value: T) => void): void {\n const listeners = this.topics.get(uuid);\n if (!listeners) {\n throw new Error(`Connector: unknown topic ${uuid}`);\n }\n\n const existing = this.callbackMap.get(cb as any);\n if (existing) {\n existing.refCount++;\n return;\n }\n\n listeners.add(cb as any);\n this.callbackMap.set(cb as any, {\n uuid,\n refCount: 1,\n });\n }\n\n public removeClbk<T>(uuid: UUID, cb: (value: T) => void): void {\n const entry = this.callbackMap.get(cb as any);\n if (!entry) return;\n\n entry.refCount--;\n if (entry.refCount > 0) return;\n\n const listeners = this.topics.get(entry.uuid);\n listeners?.delete(cb as any);\n\n this.callbackMap.delete(cb as any);\n }\n\n public update<T>(uuid: UUID, value: T): void {\n const listeners = this.topics.get(uuid);\n if (!listeners) return;\n\n for (const listener of listeners) {\n listener(value);\n }\n }\n\n public getUuidByClbk<T>(cb: (value: T) => void): UUID {\n const entry = this.callbackMap.get(cb as any);\n if (!entry) {\n throw new Error(\"Connector: no UUID for callback\");\n }\n return entry.uuid;\n }\n}\n\nexport const connector = new Connector();\n","// effect.ts\nimport type { ReadFn } from \"./signal\";\nimport { unmount, hasActiveMountSession } from \"./lifecycle\";\nimport { connector } from \"./signal\";\n\nexport function effect<T>(\n readFn: ReadFn<T>,\n fn: (value: T) => void | Promise<void>\n): void {\n let initialized = false;\n\n const cb = (val: T) => {\n if (!initialized) {\n initialized = true;\n return;\n }\n\n try {\n const r = fn(val);\n if (r instanceof Promise) {\n r.catch((err) => {\n console.error(\"effect async callback failed\", err);\n });\n }\n } catch (err) {\n console.error(\"effect callback failed\", err);\n }\n };\n\n // subscribe (initial call is ignored)\n readFn(cb);\n\n // cleanup\n if (hasActiveMountSession()) {\n unmount(() => {\n const uuid = connector.getUuidByClbk(cb);\n connector.removeClbk(uuid, cb);\n });\n }\n}\n","// render.ts\n// Fully synchronous renderer.\n// Signal subscriptions are ref-counted and cleaned up via lifecycle unmount.\n\nimport type { JsxNode, VElement, VText, VSignal, ComponentFn } from \"./jsx\";\nimport {\n beginMountSession,\n endMountSession,\n unmount,\n hasActiveMountSession,\n} from \"./lifecycle\";\nimport { connector } from \"./signal\";\n\nexport interface RenderCtx {\n parent: Node & ParentNode;\n self?: Node;\n [k: string]: any;\n}\n\nexport interface RenderResult {\n el: Node;\n}\n\nexport function render(node: JsxNode | null, ctx: RenderCtx): RenderResult {\n if (node == null) {\n return { el: ctx.parent };\n }\n\n // FRAGMENT\n if (Array.isArray(node)) {\n let last: Node = ctx.parent;\n\n for (const child of node) {\n const r = render(child, ctx);\n last = r.el;\n }\n\n return { el: last };\n }\n\n // TEXT\n if (node.kind === \"text\") {\n const el = renderText(node as VText, ctx);\n return { el };\n }\n\n // SIGNAL (text binding)\n if (node.kind === \"signal\") {\n const el = renderSignal(node as VSignal, ctx);\n return { el };\n }\n\n // COMPONENT\n if (typeof (node as VElement).tag === \"function\") {\n const vnode = node as VElement;\n const fn = vnode.tag as ComponentFn;\n\n beginMountSession();\n\n const resolved = fn({ ...vnode.props, ctx }, vnode.children);\n const result = render(resolved, ctx);\n\n if (!(result.el instanceof Element)) {\n throw new Error(\"Component root must be a DOM Element\");\n }\n\n endMountSession(result.el);\n ctx.self = result.el;\n return result;\n }\n\n // HOST\n const el = renderHost(node as VElement, ctx);\n\n const childCtx: RenderCtx = {\n ...ctx,\n parent: el,\n self: ctx.self,\n };\n\n for (const child of (node as VElement).children) {\n render(child, childCtx);\n }\n\n return { el };\n}\n\n/* ------------------------------------------------------------\n * Host rendering\n * ------------------------------------------------------------ */\n\nconst SVG_NS = \"http://www.w3.org/2000/svg\";\n\nconst SVG_TAGS = new Set([\n \"svg\",\n \"path\",\n \"circle\",\n \"rect\",\n \"line\",\n \"polyline\",\n \"polygon\",\n \"g\",\n \"defs\",\n \"linearGradient\",\n \"radialGradient\",\n \"stop\",\n \"mask\",\n \"clipPath\",\n \"pattern\",\n \"text\",\n \"tspan\",\n \"use\",\n \"symbol\",\n \"view\",\n \"ellipse\",\n \"foreignObject\",\n]);\n\nfunction renderHost(node: VElement, ctx: RenderCtx): Element {\n if (typeof node.tag !== \"string\") {\n throw new Error(\"Host renderer expects string tag\");\n }\n\n const tag = node.tag;\n const isSvg = SVG_TAGS.has(tag);\n\n const el = isSvg\n ? document.createElementNS(SVG_NS, tag)\n : document.createElement(tag);\n\n const props = node.props ?? {};\n\n for (const [key, value] of Object.entries(props)) {\n if (key === \"ctx\" || key === \"children\") continue;\n\n // EVENTS\n if (key.startsWith(\"on\") && typeof value === \"function\") {\n const evt = key.slice(2).toLowerCase();\n el.addEventListener(evt, value as EventListener);\n continue;\n }\n\n // STYLE (supports signals)\n if (key === \"style\" && value && typeof value === \"object\") {\n for (const [k, v] of Object.entries(value as Record<string, any>)) {\n if (typeof v === \"function\" && v.type === \"signal\") {\n const initial = v();\n (el.style as any)[k] = String(initial);\n\n v((nv: any) => {\n (el.style as any)[k] = String(nv);\n });\n } else {\n (el.style as any)[k] = String(v);\n }\n }\n continue;\n }\n\n // SIGNAL PROPS\n if (typeof value === \"function\" && value.type === \"signal\") {\n const apply = (nv: any) => {\n if (isSvg) {\n el.setAttribute(key, String(nv));\n } else {\n // @ts-ignore\n el[key] = nv;\n }\n };\n\n apply(value());\n bindSignal(value, apply);\n continue;\n }\n\n // NORMAL PROPS\n if (isSvg) {\n el.setAttribute(key, String(value));\n } else if (key in el) {\n // @ts-ignore\n el[key] = value;\n } else {\n el.setAttribute(key, String(value));\n }\n }\n\n ctx.parent.appendChild(el);\n return el;\n}\n\n/* ------------------------------------------------------------\n * Text & Signal rendering\n * ------------------------------------------------------------ */\n\nfunction renderText(node: VText, ctx: RenderCtx): Text {\n const t = document.createTextNode(node.value);\n ctx.parent.appendChild(t);\n return t;\n}\n\nfunction renderSignal(node: VSignal, ctx: RenderCtx): Text {\n const t = document.createTextNode(\"\");\n ctx.parent.appendChild(t);\n\n const cb = (v: any) => {\n t.nodeValue = String(v);\n };\n\n // initial\n t.nodeValue = String(node.read());\n\n // subscribe\n node.read(cb);\n\n // cleanup via lifecycle (ref-count aware)\n if (hasActiveMountSession()) {\n unmount(() => {\n const uuid = connector.getUuidByClbk(cb);\n connector.removeClbk(uuid, cb);\n });\n }\n\n return t;\n}\n\n/* ------------------------------------------------------------\n * Shared signal binding helper\n * ------------------------------------------------------------ */\n\nfunction bindSignal<T>(\n read: (cb?: (value: T) => void) => T,\n apply: (value: T) => void\n): void {\n const cb = (v: any) => apply(v as T);\n\n read(cb);\n\n if (hasActiveMountSession()) {\n unmount(() => {\n const uuid = connector.getUuidByClbk(cb);\n connector.removeClbk(uuid, cb);\n });\n }\n}\n","// destroy.ts\n\nimport { runUnmountsForElement } from \"./lifecycle\";\n\nexport function destroy(root: Element): void {\n const children = Array.from(root.childNodes);\n\n for (const child of children) {\n destroyChild(child);\n }\n\n runUnmountsForElement(root);\n\n if (root.parentNode) {\n root.parentNode.removeChild(root);\n } else {\n root.remove();\n }\n}\n\nfunction destroyChild(node: Node): void {\n if (node instanceof Element) {\n const children = Array.from(node.childNodes);\n\n for (const child of children) {\n destroyChild(child);\n }\n\n runUnmountsForElement(node);\n\n if (node.parentNode) {\n node.parentNode.removeChild(node);\n } else {\n node.remove();\n }\n\n return;\n }\n\n // Text, Comment, etc.\n if (node.parentNode) {\n node.parentNode.removeChild(node);\n }\n}\n","// jsx.ts\nimport type { ReadFn } from \"./signal\";\n\nexport type JsxNode = VElement | VText | VSignal;\n\ndeclare global {\n namespace JSX {\n type Element = any;\n\n interface IntrinsicElements {\n [key: string]: any;\n }\n }\n}\n\nexport interface VElement {\n kind: \"element\";\n tag: string | ComponentFn;\n props: Record<string, any>;\n children: JsxNode[];\n}\n\nexport interface VText {\n kind: \"text\";\n value: string;\n}\n\nexport interface VSignal {\n kind: \"signal\";\n read: ReadFn<any>;\n}\n\nexport interface PropsInterface {\n ctx?: any;\n}\n\nexport type ComponentFn = (\n props: PropsInterface,\n children: JsxNode[]\n) => JsxNode | null;\n\nexport function jsx(\n tag: string | ComponentFn,\n props: any,\n ...rawChildren: any[]\n): VElement {\n return {\n kind: \"element\",\n tag,\n props: props ?? {},\n children: rawChildren.flatMap(normalizeChild),\n };\n}\n\nfunction normalizeChild(input: any): JsxNode | JsxNode[] {\n if (input == null || input === false || input === true) return [];\n\n if (typeof input === \"function\" && input?.type === \"signal\") {\n return {\n kind: \"signal\",\n read: input,\n };\n }\n\n if (typeof input === \"string\" || typeof input === \"number\") {\n return {\n kind: \"text\",\n value: String(input),\n };\n }\n\n if (Array.isArray(input)) {\n return input.flatMap(normalizeChild);\n }\n\n return input;\n}\n","// for.ts\nimport { effect } from \"./effect\";\nimport { mount } from \"./lifecycle\";\nimport { render } from \"./render\";\nimport { destroy } from \"./destroy\";\nimport type { ReadFn } from \"./signal\";\nimport { jsx } from \"./jsx\";\n\ntype Uuid = string;\n\ninterface Keyed {\n uuid: Uuid;\n}\n\ninterface ForProps<T extends Keyed> {\n each: ReadFn<T[]>;\n}\n\nexport function For<T extends Keyed>(p: ForProps<T>, [child]: any) {\n const container = jsx(\"csr-for-host\", { style: { display: \"contents\" } });\n\n mount((parent) => {\n const { el } = render(container, { parent });\n const host = el as Element;\n\n const nodes = new Map<Uuid, Element>();\n let order: Uuid[] = [];\n\n function reconcile(values: T[]) {\n const nextOrder: Uuid[] = [];\n\n for (const v of values) {\n if (!v || v.uuid == null) continue;\n\n const id = v.uuid;\n nextOrder.push(id);\n\n if (!nodes.has(id)) {\n const { el } = render(child(v), {\n ...(p as any).ctx,\n parent: host,\n });\n\n if (!(el instanceof Element)) {\n throw new Error(\"For: child root must be an Element\");\n }\n\n nodes.set(id, el);\n }\n }\n\n // remove\n for (const id of order) {\n if (!nextOrder.includes(id)) {\n const el = nodes.get(id);\n if (el) destroy(el);\n nodes.delete(id);\n }\n }\n\n // reorder\n let anchor: ChildNode | null = null;\n for (let i = nextOrder.length - 1; i >= 0; i--) {\n const el = nodes.get(nextOrder[i]!)!;\n host.insertBefore(el, anchor);\n anchor = el;\n }\n\n order = nextOrder;\n }\n\n // initial render (sync, explicit)\n reconcile(p.each());\n\n // reactive updates\n effect(p.each, reconcile);\n });\n\n return null;\n}\n","//fragment.ts\nexport function fragment(p: null, ...childs: any) {\n return childs;\n}\n","// show.ts\nimport { jsx } from \"./jsx\";\nimport { destroy } from \"./destroy\";\nimport { render } from \"./render\";\nimport type { ReadFn } from \"./signal\";\nimport { mount } from \"./lifecycle\";\n\ninterface ShowPropsInterface {\n when: ReadFn<boolean>;\n}\n\nexport function Show(p: ShowPropsInterface, children: any) {\n const host = jsx(\"csr-show-host\", { style: { display: \"contents\" } });\n const content = jsx(\n \"csr-show-content\",\n { style: { display: \"contents\" } },\n ...children\n );\n\n let hostEl: Element | null = null;\n let contentEl: Element | null = null;\n let visible = false;\n\n mount((parent) => {\n // render host once\n const { el: h } = render(host, { parent });\n hostEl = h as Element;\n\n // subscribe to condition signal\n p.when((b) => {\n if (b === visible) return;\n visible = b;\n\n // hide\n if (!visible) {\n if (contentEl) {\n destroy(contentEl);\n contentEl = null;\n }\n return;\n }\n\n // show\n const { el: c } = render(content, {\n ...(p as any).ctx,\n parent: hostEl!,\n });\n\n if (!(c instanceof Element)) {\n throw new Error(\"Show: content root must be an Element\");\n }\n\n contentEl = c;\n });\n });\n\n return null;\n}\n","// repeat.ts\nimport type { ReadFn } from \"../core/signal\";\nimport { signal } from \"../core/signal\";\nimport { For } from \"../core/for\";\nimport { jsx } from \"../core/jsx\";\n\ntype MaybeSignal<T> = T | ReadFn<T>;\n\ninterface RepeatPropsInterface {\n n: MaybeSignal<number>;\n}\n\nexport function Repeat(p: RepeatPropsInterface, children: any[]) {\n // static case\n if (typeof p.n === \"number\") {\n const out: any[] = [];\n for (let i = 0; i < p.n; i++) {\n out.push(children);\n }\n return out;\n }\n\n // reactive case -> delegate to For\n const count = p.n;\n\n const [items, setItems] = signal<{ uuid: string }[]>([]);\n\n // derive structure from n\n count((n) => {\n const next: { uuid: string }[] = [];\n for (let i = 0; i < n; i++) {\n next.push({ uuid: String(i) });\n }\n setItems(() => next);\n });\n\n return <For each={items}>{() => children}</For>;\n}\n","export const breakpoint = {\n mobile: 0, // 0–599 px\n tablet: 601, // 600–1024 px\n laptop: 1025, // 1024–1440 px\n desktop: 1441, // 1440–1920 px\n large: 1921, // >1920 px\n};\n","// use-breakpoint.ts\nimport { signal, type ReadFn } from \"../core/signal\";\nimport { breakpoint } from \"../style/breakpoint\";\n\nexport type BreakpointName = keyof typeof breakpoint;\n\nfunction detectBreakpoint(width: number): BreakpointName {\n if (width >= breakpoint.large) return \"large\";\n if (width >= breakpoint.desktop) return \"desktop\";\n if (width >= breakpoint.laptop) return \"laptop\";\n if (width >= breakpoint.tablet) return \"tablet\";\n return \"mobile\";\n}\n\n// initial value from real window\nconst [breakepoint, write] = signal<BreakpointName>(\n detectBreakpoint(window.innerWidth)\n);\n\n// attach resize listener once\nlet last = breakepoint();\n\nwindow.addEventListener(\"resize\", () => {\n const next = detectBreakpoint(window.innerWidth);\n if (next !== last) {\n last = next;\n write(() => next);\n }\n});\n\nexport function useBreakpoint(): ReadFn<BreakpointName> {\n return breakepoint;\n}\n","// use-custom-event.ts\nimport { unmount } from \"../core/lifecycle\";\n\ntype Handler<T> = (data: T) => void;\n\n/**\n * Creates a custom browser event emitter.\n * If a handler is provided, it is automatically\n * cleaned up on component unmount.\n */\nexport function useCustomEvent<T = any>(topic: string, handler?: Handler<T>) {\n // register listener if handler exists\n if (handler) {\n const listener = (e: Event) => {\n const ce = e as CustomEvent<T>;\n handler(ce.detail);\n };\n\n window.addEventListener(topic, listener);\n\n // automatic cleanup on unmount\n unmount(() => {\n window.removeEventListener(topic, listener);\n });\n }\n\n // emitter (always returned)\n return function emit(data: T) {\n window.dispatchEvent(new CustomEvent(topic, { detail: data }));\n };\n}\n","// use-locale.ts\nimport { signal } from \"../core/signal\";\nimport type { ReadFn } from \"../core/signal\";\n\nexport interface LocaleController {\n locale: ReadFn<string>;\n setLocale: (next: string) => void;\n}\nconst [locale, write] = signal(\"en-US\");\n\nexport function useLocale(): LocaleController {\n return {\n locale,\n setLocale(next: string) {\n write(() => next);\n },\n };\n}\n","// use-router.ts\nimport { signal } from \"../core\";\n\ntype Route = string;\n\nconst [route, setRoute] = signal<Route>(\"/\");\n\nwindow.addEventListener(\"popstate\", (e: PopStateEvent) => {\n const r = e.state?.route;\n if (typeof r === \"string\") {\n setRoute(() => r);\n }\n});\n\nexport function useRouter() {\n const navigate = (to: Route) => {\n if (to === route()) return;\n history.pushState({ route: to }, \"\");\n setRoute(() => to);\n };\n\n return {\n route,\n navigate,\n };\n}\n","// box.ts\nimport type { ReadFn } from \"../core/signal\";\nimport { jsx } from \"../core/jsx\";\nimport type { DOMEvents, DOMAttrs, MaybeSignal, CSSValue } from \"../core/dom\";\n\nexport interface BoxProps extends DOMEvents, DOMAttrs {\n /**\n * Child nodes rendered inside the box\n */\n children?: any;\n\n // ─────────────────────────────\n // Spacing – Margin\n // ─────────────────────────────\n\n /** Margin (all sides) */\n m?: MaybeSignal<CSSValue>;\n\n /** Margin-bottom */\n mb?: MaybeSignal<CSSValue>;\n\n /** Margin-left */\n ml?: MaybeSignal<CSSValue>;\n\n /** Margin-right */\n mr?: MaybeSignal<CSSValue>;\n\n /** Margin-top */\n mt?: MaybeSignal<CSSValue>;\n\n /** Margin horizontal (left + right) */\n mx?: MaybeSignal<CSSValue>;\n\n /** Margin vertical (top + bottom) */\n my?: MaybeSignal<CSSValue>;\n\n // ─────────────────────────────\n // Spacing – Padding\n // ─────────────────────────────\n\n /** Padding (all sides) */\n p?: MaybeSignal<CSSValue>;\n\n /** Padding-bottom */\n pb?: MaybeSignal<CSSValue>;\n\n /** Padding-left */\n pl?: MaybeSignal<CSSValue>;\n\n /** Padding-right */\n pr?: MaybeSignal<CSSValue>;\n\n /** Padding-top */\n pt?: MaybeSignal<CSSValue>;\n\n /** Padding horizontal (left + right) */\n px?: MaybeSignal<CSSValue>;\n\n /** Padding vertical (top + bottom) */\n py?: MaybeSignal<CSSValue>;\n\n // ─────────────────────────────\n // Borders\n // ─────────────────────────────\n\n /** Border (all sides) */\n b?: MaybeSignal<CSSValue>;\n\n /** Border-top */\n bt?: MaybeSignal<CSSValue>;\n\n /** Border-right */\n br?: MaybeSignal<CSSValue>;\n\n /** Border-bottom */\n bb?: MaybeSignal<CSSValue>;\n\n /** Border-left */\n bl?: MaybeSignal<CSSValue>;\n\n /** Border horizontal (left + right) */\n bx?: MaybeSignal<CSSValue>;\n\n /** Border vertical (top + bottom) */\n by?: MaybeSignal<CSSValue>;\n\n // ─────────────────────────────\n // Border Radius\n // ─────────────────────────────\n\n /** Border radius (all corners) */\n r?: MaybeSignal<CSSValue>;\n\n /** Border-top radius */\n rt?: MaybeSignal<CSSValue>;\n\n /** Border-right radius */\n rr?: MaybeSignal<CSSValue>;\n\n /** Border-bottom radius */\n rb?: MaybeSignal<CSSValue>;\n\n /** Border-left radius */\n rl?: MaybeSignal<CSSValue>;\n\n /** Border-top-right radius */\n rtr?: MaybeSignal<CSSValue>;\n\n /** Border-top-left radius */\n rtl?: MaybeSignal<CSSValue>;\n\n /** Border-bottom-right radius */\n rbr?: MaybeSignal<CSSValue>;\n\n /** Border-bottom-left radius */\n rbl?: MaybeSignal<CSSValue>;\n\n // ─────────────────────────────\n // Sizing\n // ─────────────────────────────\n\n /** Size shortcut (width + height) */\n s?: MaybeSignal<CSSValue>;\n\n /** Height */\n h?: MaybeSignal<CSSValue>;\n\n /** Width */\n w?: MaybeSignal<CSSValue>;\n\n /** Max height */\n maxH?: MaybeSignal<CSSValue>;\n\n /** Max width */\n maxW?: MaybeSignal<CSSValue>;\n\n /** Min height */\n minH?: MaybeSignal<CSSValue>;\n\n /** Min width */\n minW?: MaybeSignal<CSSValue>;\n\n // ─────────────────────────────\n // Appearance\n // ─────────────────────────────\n\n /** Opacity (0–1) */\n o?: MaybeSignal<CSSValue>;\n\n /** Box shadow */\n sh?: MaybeSignal<CSSValue>;\n\n /** Background */\n bg?: MaybeSignal<CSSValue>;\n\n /**\n * Additional inline styles (merged last)\n * Values support signals\n */\n style?: Record<string, MaybeSignal<CSSValue> | undefined>;\n}\n\nexport function Box(p: BoxProps, children: any[]) {\n return (\n <div\n {...p}\n style={{\n marginBottom: p.mb ?? p.my ?? p.m,\n marginLeft: p.ml ?? p.mx ?? p.m,\n marginRight: p.mr ?? p.mx ?? p.m,\n marginTop: p.mt ?? p.my ?? p.m,\n\n paddingBottom: p.pb ?? p.py ?? p.p,\n paddingLeft: p.pl ?? p.px ?? p.p,\n paddingRight: p.pr ?? p.px ?? p.p,\n paddingTop: p.pt ?? p.py ?? p.p,\n\n background: p.bg,\n opacity: p.o,\n boxShadow: p.sh,\n\n borderTop: p.bt ?? p.by ?? p.b,\n borderRight: p.br ?? p.bx ?? p.b,\n borderBottom: p.bb ?? p.by ?? p.b,\n borderLeft: p.bl ?? p.bx ?? p.b,\n\n borderTopRightRadius: p.rtr ?? p.rt ?? p.rr ?? p.r,\n borderTopLeftRadius: p.rtl ?? p.rt ?? p.rl ?? p.r,\n borderBottomRightRadius: p.rbr ?? p.rb ?? p.rr ?? p.r,\n borderBottomLeftRadius: p.rbl ?? p.rb ?? p.rl ?? p.r,\n\n width: p.w ?? p.s,\n height: p.h ?? p.s,\n maxWidth: p.maxW,\n maxHeight: p.maxH,\n minWidth: p.minW,\n minHeight: p.minH,\n\n ...p.style,\n }}\n >\n {children}\n </div>\n );\n}\n","import { Box } from \"./box\";\nimport { jsx } from \"../core/jsx\";\nimport type { BoxProps } from \"./box\";\n\n/**\n * Absolute positioned component\n * Positions element absolutely within the nearest positioned ancestor\n */\nexport interface AbsolutePropertiesInterface extends BoxProps {\n /**\n * Distance from top edge of containing block\n * (e.g. \"10px\", \"1rem\", \"5%\")\n */\n top?: string;\n\n /**\n * Distance from right edge of containing block\n * (e.g. \"10px\", \"1rem\", \"5%\")\n */\n right?: string;\n\n /**\n * Distance from bottom edge of containing block\n * (e.g. \"10px\", \"1rem\", \"5%\")\n */\n bottom?: string;\n\n /**\n * Distance from left edge of containing block\n * (e.g. \"10px\", \"1rem\", \"5%\")\n */\n left?: string;\n}\n\nexport function Absolute(p: AbsolutePropertiesInterface, children: any[]) {\n return (\n <Box\n {...p}\n style={{\n position: \"absolute\",\n\n top: p.top,\n right: p.right,\n bottom: p.bottom,\n left: p.left,\n\n ...p.style,\n }}\n >\n {children}\n </Box>\n );\n}\n","import { jsx } from \"../core/jsx\";\nimport { Box } from \"./box\";\nimport type { BoxProps } from \"./box\";\n\n/**\n * Flex item component\n * Controls individual item behavior in flex containers\n */\nexport interface FlexItemPropertiesInterface extends BoxProps {\n /**\n * Flex shorthand (grow, shrink, basis)\n * e.g. \"1\", \"none\", \"0 1 auto\"\n */\n flx?: string;\n\n /**\n * Align-self (cross-axis alignment)\n */\n as?: \"auto\" | \"flex-start\" | \"flex-end\" | \"center\" | \"baseline\" | \"stretch\";\n\n /**\n * Flex grow factor\n */\n flxGrow?: string;\n\n /**\n * Flex shrink factor\n */\n flxShrink?: string;\n\n /**\n * Flex basis\n */\n flxBasis?: string;\n}\n\nexport function FlexItem(p: FlexItemPropertiesInterface, children: any[]) {\n return (\n <Box\n {...p}\n style={{\n flex: p.flx,\n alignSelf: p.as,\n flexGrow: p.flxGrow,\n flexShrink: p.flxShrink,\n flexBasis: p.flxBasis,\n\n ...p.style,\n }}\n >\n {children}\n </Box>\n );\n}\n","import { jsx } from \"../core/jsx\";\nimport { FlexItem } from \"./flex-item\";\nimport type { FlexItemPropertiesInterface } from \"./flex-item\";\n\n/**\n * Flex container component\n * Core flexbox layout primitive\n */\nexport interface FlexPropertiesInterface extends FlexItemPropertiesInterface {\n /**\n * Justify-content (main axis alignment)\n */\n jc?:\n | \"flex-start\"\n | \"flex-end\"\n | \"center\"\n | \"space-between\"\n | \"space-around\"\n | \"space-evenly\";\n\n /**\n * Align-items (cross axis alignment)\n */\n ai?: \"stretch\" | \"flex-start\" | \"flex-end\" | \"center\" | \"baseline\";\n\n /**\n * Align-content (multi-line alignment)\n */\n ac?:\n | \"flex-start\"\n | \"flex-end\"\n | \"center\"\n | \"space-between\"\n | \"space-around\"\n | \"stretch\";\n\n /**\n * Gap between items\n */\n g?: string;\n\n /**\n * Flex direction\n */\n flxDirection?: \"row\" | \"row-reverse\" | \"column\" | \"column-reverse\";\n\n /**\n * Flex wrap\n */\n flxWrap?: \"nowrap\" | \"wrap\" | \"wrap-reverse\";\n\n /**\n * Flex-flow shorthand\n */\n flxFlow?: `${\"row\" | \"row-reverse\" | \"column\" | \"column-reverse\"} ${\n | \"nowrap\"\n | \"wrap\"\n | \"wrap-reverse\"}`;\n}\n\nexport function Flex(p: FlexPropertiesInterface, children: any[]) {\n return (\n <FlexItem\n {...p}\n style={{\n display: \"flex\",\n\n justifyContent: p.jc,\n alignItems: p.ai,\n alignContent: p.ac,\n\n gap: p.g,\n\n flexDirection: p.flxDirection,\n flexWrap: p.flxWrap,\n flexFlow: p.flxFlow,\n\n ...p.style,\n }}\n >\n {children}\n </FlexItem>\n );\n}\n","import { jsx } from \"../core/jsx\";\nimport { Flex } from \"./flex\";\nimport type { FlexPropertiesInterface } from \"./flex\";\n\n/**\n * Center component\n * Centers children horizontally and vertically using flexbox\n */\nexport interface CenterPropertiesInterface extends FlexPropertiesInterface {}\n\nexport function Center(p: CenterPropertiesInterface, children: any[]) {\n return (\n <Flex {...p} ai={p.ai ?? \"center\"} jc={p.jc ?? \"center\"}>\n {children}\n </Flex>\n );\n}\n","import { jsx } from \"../core/jsx\";\nimport { Box } from \"./box\";\nimport type { BoxProps } from \"./box\";\n\n/**\n * Fixed positioned component\n * Positions element relative to the viewport\n */\nexport interface FixedPropertiesInterface extends BoxProps {\n /** Top offset (e.g. \"10px\") */\n top?: string;\n\n /** Right offset */\n right?: string;\n\n /** Bottom offset */\n bottom?: string;\n\n /** Left offset */\n left?: string;\n\n /** Stacking order (z-index) */\n zIndex?: string;\n}\n\nexport function Fixed(p: FixedPropertiesInterface, children: any[]) {\n return (\n <Box\n {...p}\n style={{\n position: \"fixed\",\n\n top: p.top,\n right: p.right,\n bottom: p.bottom,\n left: p.left,\n zIndex: p.zIndex,\n\n ...p.style,\n }}\n >\n {children}\n </Box>\n );\n}\n","import { jsx } from \"../core/jsx\";\nimport { Box } from \"./box\";\nimport type { BoxProps } from \"./box\";\n\n/**\n * Grid item component\n * Controls individual item placement inside CSS Grid containers\n */\nexport interface GridItemPropertiesInterface extends BoxProps {\n /**\n * Grid area name or shorthand\n * (e.g. \"header\", \"1 / 1 / 3 / 2\")\n */\n grdArea?: string;\n\n /**\n * Grid column placement\n * (e.g. \"1 / span 2\", \"sidebar\")\n */\n grdColumn?: string;\n\n /**\n * Grid row placement\n * (e.g. \"1 / span 3\", \"content\")\n */\n grdRow?: string;\n}\n\nexport function GridItem(p: GridItemPropertiesInterface, children: any[]) {\n return (\n <Box\n {...p}\n style={{\n gridArea: p.grdArea,\n gridColumn: p.grdColumn,\n gridRow: p.grdRow,\n\n ...p.style,\n }}\n >\n {children}\n </Box>\n );\n}\n","import { jsx } from \"../core/jsx\";\nimport { GridItem } from \"./grid-item\";\nimport type { GridItemPropertiesInterface } from \"./grid-item\";\n\n/**\n * Grid container component\n * Core CSS Grid layout primitive\n */\nexport interface GridPropertiesInterface extends GridItemPropertiesInterface {\n /** Gap between grid items */\n g?: string;\n\n /** Align-items (block axis) */\n ai?: \"stretch\" | \"start\" | \"end\" | \"center\" | \"baseline\";\n\n /** Justify-items (inline axis) */\n ji?: \"stretch\" | \"start\" | \"end\" | \"center\" | \"baseline\";\n\n /** Align-self (container as grid item) */\n as?:\n | \"auto\"\n | \"normal\"\n | \"stretch\"\n | \"center\"\n | \"start\"\n | \"end\"\n | \"self-start\"\n | \"self-end\"\n | \"flex-start\"\n | \"flex-end\"\n | \"left\"\n | \"right\";\n\n // Grid templates\n grdTemplateColumns?: string;\n grdTemplateRows?: string;\n grdTemplateAreas?: string;\n grdTemplate?: string;\n\n // Auto grid\n grdAutoColumns?: string;\n grdAutoRows?: string;\n grdAutoFlow?: \"row\" | \"column\" | \"row dense\" | \"column dense\";\n\n // Placement\n grd?: string;\n grdRowStart?: string;\n grdColumnStart?: string;\n grdRowEnd?: string;\n grdColumnEnd?: string;\n grdRow?: string;\n grdColumn?: string;\n\n // Gaps\n grdRowGap?: string;\n grdColumnGap?: string;\n}\n\nexport function Grid(p: GridPropertiesInterface, children: any[]) {\n return (\n <GridItem\n {...p}\n style={{\n display: \"grid\",\n\n gap: p.g,\n\n alignItems: p.ai,\n justifyItems: p.ji,\n alignSelf: p.as,\n\n gridTemplateColumns: p.grdTemplateColumns,\n gridTemplateRows: p.grdTemplateRows,\n gridTemplateAreas: p.grdTemplateAreas,\n gridTemplate: p.grdTemplate,\n\n gridAutoColumns: p.grdAutoColumns,\n gridAutoRows: p.grdAutoRows,\n gridAutoFlow: p.grdAutoFlow,\n\n gridArea: p.grd,\n gridRowStart: p.grdRowStart,\n gridColumnStart: p.grdColumnStart,\n gridRowEnd: p.grdRowEnd,\n gridColumnEnd: p.grdColumnEnd,\n gridRow: p.grdRow,\n gridColumn: p.grdColumn,\n\n rowGap: p.grdRowGap,\n columnGap: p.grdColumnGap,\n\n ...p.style,\n }}\n >\n {children}\n </GridItem>\n );\n}\n","import { jsx } from \"../core/jsx\";\nimport { Box } from \"./box\";\nimport type { BoxProps } from \"./box\";\n\n/**\n * Relative positioned component\n * Establishes a positioning context for absolute children\n */\nexport interface RelativePropertiesInterface extends BoxProps {\n /**\n * Stacking order (z-index)\n * (e.g. \"1\", \"auto\", \"var(--z-index-modal)\")\n */\n zIndex?: string;\n}\n\nexport function Relative(p: RelativePropertiesInterface, children: any[]) {\n return (\n <Box\n {...p}\n style={{\n position: \"relative\",\n zIndex: p.zIndex,\n\n ...p.style,\n }}\n >\n {children}\n </Box>\n );\n}\n","import { jsx } from \"../core/jsx\";\nimport { Relative } from \"./relative\";\nimport { Absolute } from \"./absolute\";\nimport type { BoxProps } from \"./box\";\n\n/**\n * Scroll component\n * Creates a scrollable container filling its parent\n */\nexport interface ScrollPropertiesInterface extends BoxProps {}\n\nexport function Scroll(p: ScrollPropertiesInterface, children: any[]) {\n return (\n <Relative s=\"100%\">\n <Absolute\n top=\"0\"\n right=\"0\"\n bottom=\"0\"\n left=\"0\"\n {...p}\n style={{\n overflow: \"auto\",\n ...p.style,\n }}\n >\n {children}\n </Absolute>\n </Relative>\n );\n}\n","import { Flex } from \"./flex\";\nimport { jsx } from \"../core\";\nimport type { FlexPropertiesInterface } from \"./flex\";\n\n/**\n * Stack component\n * Vertical layout primitive (flex-direction: column by default)\n */\nexport interface StackPropertiesInterface extends FlexPropertiesInterface {}\n\nexport function Stack(p: StackPropertiesInterface, children: any[]) {\n return (\n <Flex {...p} flxDirection={p.flxDirection ?? \"column\"}>\n {children}\n </Flex>\n );\n}\n","import { jsx } from \"../core/jsx\";\nimport { Box } from \"./box\";\nimport type { BoxProps } from \"./box\";\n\n/**\n * Sticky positioned component\n * Sticks to a position within its scroll container\n */\nexport interface StickyPropertiesInterface extends BoxProps {\n /** Top offset (e.g. \"10px\") */\n top?: string;\n\n /** Right offset */\n right?: string;\n\n /** Bottom offset */\n bottom?: string;\n\n /** Left offset */\n left?: string;\n\n /** Stacking order (z-index) */\n zIndex?: string;\n}\n\nexport function Sticky(p: StickyPropertiesInterface, children: any[]) {\n return (\n <Box\n {...p}\n style={{\n position: \"sticky\",\n\n top: p.top,\n right: p.right,\n bottom: p.bottom,\n left: p.left,\n zIndex: p.zIndex,\n\n ...p.style,\n }}\n >\n {children}\n </Box>\n );\n}\n","import { jsx } from \"../core/jsx\";\nimport type { DOMAttrs, DOMEvents } from \"../core/dom\";\n\n/**\n * Text component\n * Typographic primitive for rendering text elements\n */\nexport interface TextPropertiesInterface extends DOMAttrs, DOMEvents {\n /** Text content */\n children?: any;\n\n /**\n * HTML tag to render\n * @default \"p\"\n */\n tag?: \"span\" | \"p\" | \"h1\" | \"h2\" | \"h3\" | \"h4\" | \"h5\" | \"h6\";\n\n // ─────────────────────────────\n // Text styling\n // ─────────────────────────────\n\n /** Text alignment */\n a?: \"left\" | \"right\" | \"center\" | \"justify\";\n\n /** Font family */\n ff?: string;\n\n /** Font weight */\n fw?: number;\n\n /** Font size */\n fs?: string;\n\n /** Line height */\n lh?: string;\n\n /** Letter spacing */\n ls?: string;\n\n /** Font style */\n s?: \"normal\" | \"italic\";\n\n /** Text color */\n c?: string;\n\n // ─────────────────────────────\n // Spacing – Margin\n // ─────────────────────────────\n\n m?: string;\n mb?: string;\n ml?: string;\n mr?: string;\n mt?: string;\n mx?: string;\n my?: string;\n\n // ─────────────────────────────\n // Spacing – Padding\n // ─────────────────────────────\n\n p?: string;\n pb?: string;\n pl?: string;\n pr?: string;\n pt?: string;\n px?: string;\n py?: string;\n\n /** Background */\n bg?: string;\n}\n\nexport function Text(p: TextPropertiesInterface, children: any[]) {\n const Tag = p.tag ?? \"p\";\n\n return jsx(\n Tag,\n {\n ...p,\n style: {\n textAlign: p.a,\n fontFamily: p.ff,\n fontWeight: p.fw,\n fontSize: p.fs,\n lineHeight: p.lh,\n letterSpacing: p.ls,\n fontStyle: p.s,\n color: p.c,\n\n margin: p.m,\n marginBottom: p.mb ?? p.my ?? p.m,\n marginLeft: p.ml ?? p.mx ?? p.m,\n marginRight: p.mr ?? p.mx ?? p.m,\n marginTop: p.mt ?? p.my ?? p.m,\n\n padding: p.p,\n paddingBottom: p.pb ?? p.py ?? p.p,\n paddingLeft: p.pl ?? p.px ?? p.p,\n paddingRight: p.pr ?? p.px ?? p.p,\n paddingTop: p.pt ?? p.py ?? p.p,\n\n background: p.bg,\n },\n },\n ...children\n );\n}\n","export const color = {\n brand: \"#000\",\n onBrand: \"#fff\",\n\n gray0: \"#f8f9fa\",\n gray100: \"#f1f3f5\",\n gray200: \"#e9ecef\",\n gray300: \"#dee2e6\",\n gray400: \"#ced4da\",\n gray500: \"#adb5bd\",\n gray600: \"#868e96\",\n gray700: \"#495057\",\n gray800: \"#343a40\",\n gray900: \"#212529\",\n\n red0: \"#fff5f5\",\n red100: \"#ffe3e3\",\n red200: \"#ffc9c9\",\n red300: \"#ffa8a8\",\n red400: \"#ff8787\",\n red500: \"#ff6b6b\",\n red600: \"#fa5252\",\n red700: \"#f03e3e\",\n red800: \"#e03131\",\n red900: \"#c92a2a\",\n\n pink0: \"#fff0f6\",\n pink100: \"#ffdeeb\",\n pink200: \"#fcc2d7\",\n pink300: \"#faa2c1\",\n pink400: \"#f783ac\",\n pink500: \"#f06595\",\n pink600: \"#e64980\",\n pink700: \"#d6336c\",\n pink800: \"#c2255c\",\n pink900: \"#a61e4d\",\n\n grape0: \"#f8f0fc\",\n grape100: \"#f3d9fa\",\n grape200: \"#eebefa\",\n grape300: \"#e599f7\",\n grape400: \"#da77f2\",\n grape500: \"#cc5de8\",\n grape600: \"#be4bdb\",\n grape700: \"#ae3ec9\",\n grape800: \"#9c36b5\",\n grape900: \"#862e9c\",\n\n violet0: \"#f3f0ff\",\n violet100: \"#e5dbff\",\n violet200: \"#d0bfff\",\n violet300: \"#b197fc\",\n violet400: \"#9775fa\",\n violet500: \"#845ef7\",\n violet600: \"#7950f2\",\n violet700: \"#7048e8\",\n violet800: \"#6741d9\",\n violet900: \"#5f3dc4\",\n\n indigo0: \"#edf2ff\",\n indigo100: \"#dbe4ff\",\n indigo200: \"#bac8ff\",\n indigo300: \"#91a7ff\",\n indigo400: \"#748ffc\",\n indigo500: \"#5c7cfa\",\n indigo600: \"#4c6ef5\",\n indigo700: \"#4263eb\",\n indigo800: \"#3b5bdb\",\n indigo900: \"#364fc7\",\n\n blue0: \"#e7f5ff\",\n blue100: \"#d0ebff\",\n blue200: \"#a5d8ff\",\n blue300: \"#74c0fc\",\n blue400: \"#4dabf7\",\n blue500: \"#339af0\",\n blue600: \"#228be6\",\n blue700: \"#1c7ed6\",\n blue800: \"#1971c2\",\n blue900: \"#1864ab\",\n\n cyan0: \"#e3fafc\",\n cyan100: \"#c5f6fa\",\n cyan200: \"#99e9f2\",\n cyan300: \"#66d9e8\",\n cyan400: \"#3bc9db\",\n cyan500: \"#22b8cf\",\n cyan600: \"#15aabf\",\n cyan700: \"#1098ad\",\n cyan800: \"#0c8599\",\n cyan900: \"#0b7285\",\n\n teal0: \"#e6fcf5\",\n teal100: \"#c3fae8\",\n teal200: \"#96f2d7\",\n teal300: \"#63e6be\",\n teal400: \"#38d9a9\",\n teal500: \"#20c997\",\n teal600: \"#12b886\",\n teal700: \"#0ca678\",\n teal800: \"#099268\",\n teal900: \"#087f5b\",\n\n green0: \"#ebfbee\",\n green100: \"#d3f9d8\",\n green200: \"#b2f2bb\",\n green300: \"#8ce99a\",\n green400: \"#69db7c\",\n green500: \"#51cf66\",\n green600: \"#40c057\",\n green700: \"#37b24d\",\n green800: \"#2f9e44\",\n green900: \"#2b8a3e\",\n\n lime0: \"#f4fce3\",\n lime100: \"#e9fac8\",\n lime200: \"#d8f5a2\",\n lime300: \"#c0eb75\",\n lime400: \"#a9e34b\",\n lime500: \"#94d82d\",\n lime600: \"#82c91e\",\n lime700: \"#74b816\",\n lime800: \"#66a80f\",\n lime900: \"#5c940d\",\n\n yellow0: \"#fff9db\",\n yellow100: \"#fff3bf\",\n yellow200: \"#ffec99\",\n yellow300: \"#ffe066\",\n yellow400: \"#ffd43b\",\n yellow500: \"#fcc419\",\n yellow600: \"#fab005\",\n yellow700: \"#f59f00\",\n yellow800: \"#f08c00\",\n yellow900: \"#e67700\",\n\n orange0: \"#fff4e6\",\n orange100: \"#ffe8cc\",\n orange200: \"#ffd8a8\",\n orange300: \"#ffc078\",\n orange400: \"#ffa94d\",\n orange500: \"#ff922b\",\n orange600: \"#fd7e14\",\n orange700: \"#f76707\",\n orange800: \"#e8590c\",\n orange900: \"#d9480f\",\n};\n","const family = {\n sans: \"sans-serif\",\n serif: \"serif\",\n mono: \"monospace\",\n};\n\nconst letterSpacing = {\n xs: \"-0.05em\", // Extra small\n sm: \"-0.025em\", // Small\n md: \"0em\", // Medium\n lg: \"0.025em\", // Large\n xl: \"0.05em\", // Extra large\n \"2xl\": \"0.1em\", // 2 times extra large\n \"3xl\": \"0.15em\", // 3 times extra large\n \"4xl\": \"0.2em\", // 4 times extra large\n \"5xl\": \"0.25em\", // 5 times extra large\n \"6xl\": \"0.3em\", // 6 times extra large\n \"7xl\": \"0.35em\", // 7 times extra large\n \"8xl\": \"0.4em\", // 8 times extra large\n \"9xl\": \"0.45em\", // 9 times extra large\n};\n\nconst lineHeight = {\n xs: \"1rem\", // Extra small\n sm: \"1.25rem\", // Small\n md: \"1.5rem\", // Medium\n lg: \"1.75rem\", // Large\n xl: \"2rem\", // Extra large\n \"2xl\": \"2.25rem\", // 2 times extra large\n \"3xl\": \"2.5rem\", // 3 times extra large\n \"4xl\": \"2.75rem\", // 4 times extra large\n \"5xl\": \"3rem\", // 5 times extra large\n \"6xl\": \"3.25rem\", // 6 times extra large\n \"7xl\": \"3.5rem\", // 7 times extra large\n \"8xl\": \"3.75rem\", // 8 times extra large\n \"9xl\": \"4rem\", // 9 times extra large\n};\n\nconst size = {\n xs: \"0.75rem\", // Extra small\n sm: \"0.875rem\", // Small\n md: \"1rem\", // Medium\n lg: \"1.125rem\", // Large\n xl: \"1.25rem\", // Extra large\n \"2xl\": \"1.5rem\", // 2 times extra large\n \"3xl\": \"1.875rem\", // 3 times extra large\n \"4xl\": \"2.25rem\", // 4 times extra large\n \"5xl\": \"3rem\", // 5 times extra large\n \"6xl\": \"3.75rem\", // 6 times extra large\n \"7xl\": \"4.5rem\", // 7 times extra large\n \"8xl\": \"6rem\", // 8 times extra large\n \"9xl\": \"8rem\", // 9 times extra large\n};\n\nconst style = {\n normal: \"normal\",\n italic: \"italic\",\n};\nconst weight = {\n thin: 100, // Thin\n extralight: 200, // Extra Light\n light: 300, // Light\n normal: 400, // Normal\n medium: 500, // Medium\n semibold: 600, // Semi-bold\n bold: 700, // Bold\n extrabold: 800, // Extra Bold\n black: 900, // Black\n};\n\nexport const font = {\n family,\n size,\n weight,\n style,\n lineHeight,\n letterSpacing,\n};\n","export const radius = {\n sm: \"0.125rem\", // 2px\n md: \"0.375rem\", // 6px\n lg: \"0.5rem\", // 8px\n xl: \"0.75rem\", // 12px\n \"2xl\": \"1rem\", // 16px\n \"3xl\": \"1.5rem\", // 24px\n full: \"9999px\", // full circle\n}\n","export const shadow = {\n sm: \"0 1px 2px 0 rgb(0 0 0 / 0.05)\",\n md: \"0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1)\",\n lg: \"0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)\",\n xl: \"0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1)\",\n \"2xl\": \"0 25px 50px -12px rgb(0 0 0 / 0.25)\",\n inner: \"inset 0 2px 4px 0 rgb(0 0 0 / 0.05)\",\n}\n","export const size = {\n xs: \"0.75rem\", // Extra small\n sm: \"0.875rem\", // Small\n md: \"1rem\", // Medium\n lg: \"1.125rem\", // Large\n xl: \"1.25rem\", // Extra large\n \"2xl\": \"1.5rem\", // 2 times extra large\n \"3xl\": \"1.875rem\", // 3 times extra large\n \"4xl\": \"2.25rem\", // 4 times extra large\n \"5xl\": \"3rem\", // 5 times extra large\n \"6xl\": \"3.75rem\", // 6 times extra large\n \"7xl\": \"4.5rem\", // 7 times extra large\n \"8xl\": \"6rem\", // 8 times extra large\n \"9xl\": \"8rem\", // 9 times extra large\n\n // Fractional sizes\n \"1/12\": \"8.333333%\",\n \"2/12\": \"16.666667%\", // = 1/6\n \"3/12\": \"25%\", // = 1/4\n \"4/12\": \"33.333333%\", // = 1/3\n \"5/12\": \"41.666667%\",\n \"6/12\": \"50%\", // = 1/2\n \"7/12\": \"58.333333%\",\n \"8/12\": \"66.666667%\", // = 2/3\n \"9/12\": \"75%\", // = 3/4\n \"10/12\": \"83.333333%\", // = 5/6\n \"11/12\": \"91.666667%\",\n \"1/5\": \"20%\",\n \"2/5\": \"40%\",\n \"3/5\": \"60%\",\n \"4/5\": \"80%\",\n \"1/4\": \"25%\",\n \"3/4\": \"75%\",\n \"1/3\": \"33.333333%\",\n \"2/3\": \"66.666667%\",\n \"1/2\": \"50%\",\n full: \"100%\",\n};\n","export const space = {\n xs: \"0.125rem\", // Extra Small (2px)\n sm: \"0.25rem\", // Small (4px)\n md: \"0.5rem\", // Medium (8px)\n lg: \"0.75rem\", // Large (12px)\n xl: \"1rem\", // Extra Large (16px)\n xxl: \"1.5rem\", // 2 Extra Large (24px)\n \"3xl\": \"2rem\", // 3 Extra Large (32px)\n \"4xl\": \"2.5rem\", // 4 Extra Large (40px)\n \"5xl\": \"3rem\", // 5 Extra Large (48px)\n \"6xl\": \"3.5rem\", // 6 Extra Large (56px)\n \"7xl\": \"4rem\", // 7 Extra Large (64px)\n \"8xl\": \"4.5rem\", // 8 Extra Large (72px)\n}\n","export const style = {\n normal: \"normal\",\n italic: \"italic\",\n}\n","export const weight = {\n thin: 100, // Thin\n extralight: 200, // Extra Light\n light: 300, // Light\n normal: 400, // Normal\n medium: 500, // Medium\n semibold: 600, // Semi-bold\n bold: 700, // Bold\n extrabold: 800, // Extra Bold\n black: 900, // Black\n}\n","export const zIndex = {\n base: \"100\",\n background: \"200\",\n menu: \"300\",\n}\n"],"mappings":"AAWA,MAAMA,EAA0B,EAAE,CAElC,SAAgB,GAAiC,CAC/C,OAAO,EAAa,OAAS,EAG/B,SAAgB,GAA0B,CACxC,EAAa,KAAK,CAChB,OAAQ,EAAE,CACV,SAAU,EAAE,CACb,CAAC,CAGJ,SAAgB,EAAgB,EAAqB,CACnD,IAAM,EAAU,EAAa,KAAK,CAClC,GAAI,CAAC,EACH,MAAU,MAAM,sDAAsD,CAIxE,IAAK,IAAM,KAAM,EAAQ,OACvB,GAAI,CACF,IAAM,EAAI,EAAG,EAAK,CACd,aAAa,SACf,EAAE,MAAO,GAAQ,QAAQ,MAAM,8BAA+B,EAAI,CAAC,OAE9D,EAAK,CACZ,QAAQ,MAAM,wBAAyB,EAAI,CAI/C,GAAI,EAAQ,SAAS,OAAS,EAAG,CAC/B,IAAM,EAAS,EAAa,aACxB,EACF,EAAM,KAAK,GAAG,EAAQ,SAAS,CAE9B,EAAa,aAAe,CAAC,GAAG,EAAQ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AQ,aACR,OAAQ,MACR,OAAQ,aACR,OAAQ,aACR,OAAQ,MACR,OAAQ,aACR,OAAQ,aACR,OAAQ,MACR,QAAS,aACT,QAAS,aACT,MAAO,MACP,MAAO,MACP,MAAO,MACP,MAAO,MACP,MAAO,MACP,MAAO,MACP,MAAO,aACP,MAAO,aACP,MAAO,MACP,KAAM,OACP,CCrCY,GAAQ,CACnB,GAAI,WACJ,GAAI,UACJ,GAAI,SACJ,GAAI,UACJ,GAAI,OACJ,IAAK,SACL,MAAO,OACP,MAAO,SACP,MAAO,OACP,MAAO,SACP,MAAO,OACP,MAAO,SACR,CCbY,GAAQ,CACnB,OAAQ,SACR,OAAQ,SACT,CCHY,GAAS,CACpB,KAAM,IACN,WAAY,IACZ,MAAO,IACP,OAAQ,IACR,OAAQ,IACR,SAAU,IACV,KAAM,IACN,UAAW,IACX,MAAO,IACR,CCVY,GAAS,CACpB,KAAM,MACN,WAAY,MACZ,KAAM,MACP"}
1
+ {"version":3,"file":"index.mjs","names":["sessionStack: Session[]","read: ReadFn<T>","write","last: Node","last","childCtx: RenderCtx","order: Uuid[]","nextOrder: Uuid[]","el","anchor: ChildNode | null","hostEl: Element | null","contentEl: Element | null","out: any[]","next: { uuid: string }[]","write","write","write","size","style"],"sources":["../core/lifecycle.ts","../core/signal.ts","../core/effect.ts","../core/render.ts","../core/destroy.ts","../core/jsx.ts","../core/for.ts","../core/fragment.ts","../core/show.ts","../helper/repeat.tsx","../style/breakpoint.ts","../hooks/use-breakpoint.ts","../hooks/use-custom-event.ts","../hooks/use-local-storage.ts","../hooks/use-locale.ts","../hooks/use-router.ts","../hooks/use-session-storage.ts","../layout/box.tsx","../layout/absolute.tsx","../layout/flex-item.tsx","../layout/flex.tsx","../layout/center.tsx","../layout/fixed.tsx","../layout/grid-item.tsx","../layout/grid.tsx","../layout/relative.tsx","../layout/scroll.tsx","../layout/stack.tsx","../layout/sticky.tsx","../layout/text.tsx","../style/color.ts","../style/font.ts","../style/radius.ts","../style/shadow.ts","../style/size.ts","../style/space.ts","../style/style.ts","../style/z-index.ts"],"sourcesContent":["// lifecycle.ts\n// Synchronous render lifecycle with async-tolerant mount/unmount callbacks\n\nexport type MountCallback = (el: Element) => void | Promise<void>;\nexport type UnmountCallback = () => void | Promise<void>;\n\ninterface Session {\n mounts: MountCallback[];\n unmounts: UnmountCallback[];\n}\n\nconst sessionStack: Session[] = [];\n\nexport function hasActiveMountSession(): boolean {\n return sessionStack.length > 0;\n}\n\nexport function beginMountSession(): void {\n sessionStack.push({\n mounts: [],\n unmounts: [],\n });\n}\n\nexport function endMountSession(root: Element): void {\n const session = sessionStack.pop();\n if (!session) {\n throw new Error(\"endMountSession called without active mount session\");\n }\n\n // fire-and-forget mount callbacks\n for (const cb of session.mounts) {\n try {\n const r = cb(root);\n if (r instanceof Promise) {\n r.catch((err) => console.error(\"async mount callback failed\", err));\n }\n } catch (err) {\n console.error(\"mount callback failed\", err);\n }\n }\n\n if (session.unmounts.length > 0) {\n const store = (root as any).__unmountCbs as UnmountCallback[] | undefined;\n if (store) {\n store.push(...session.unmounts);\n } else {\n (root as any).__unmountCbs = [...session.unmounts];\n }\n }\n}\n\nexport function mount(cb: MountCallback): void {\n const session = sessionStack[sessionStack.length - 1];\n if (!session) {\n throw new Error(\"mount(cb) called outside of a render session\");\n }\n session.mounts.push(cb);\n}\n\nexport function unmount(cb: UnmountCallback): void {\n const session = sessionStack[sessionStack.length - 1];\n if (!session) {\n throw new Error(\"unmount(cb) called outside of a render session\");\n }\n session.unmounts.push(cb);\n}\n\nexport function runUnmountsForElement(el: Element): void {\n const list = (el as any).__unmountCbs as UnmountCallback[] | undefined;\n if (!list || list.length === 0) return;\n\n for (let i = list.length - 1; i >= 0; i--) {\n try {\n const r = list[i]!();\n if (r instanceof Promise) {\n r.catch((err) => console.error(\"async unmount callback failed\", err));\n }\n } catch (err) {\n console.error(\"unmount callback failed\", err);\n }\n }\n\n (el as any).__unmountCbs = undefined;\n}\n","// signal.ts\n// Synchronous signal with ref-counted subscriptions (prop-safe, leak-safe)\n\ntype UUID = string;\n\nexport type ReadFn<T> = ((cb?: (value: T) => void) => T) & {\n type: \"signal\";\n};\n\nexport function signal<T>(initialValue: T) {\n let value = initialValue;\n const uuid = crypto.randomUUID();\n\n connector.addTopic(uuid);\n\n const read: ReadFn<T> = (cb?: (v: T) => void): T => {\n if (cb) {\n connector.registerClbk(uuid, cb);\n cb(value);\n }\n return value;\n };\n\n read.type = \"signal\";\n\n const write = async (fn: (prev: T) => T | Promise<T>): Promise<void> => {\n const next = fn(value);\n value = next instanceof Promise ? await next : next;\n connector.update(uuid, value);\n };\n\n return [read, write] as const;\n}\n\n/* ============================================================\n * Connector\n * ============================================================ */\n\ninterface CallbackEntry {\n uuid: UUID;\n refCount: number;\n}\n\nexport interface ConnectorInterface {\n addTopic(uuid: UUID): void;\n removeTopic(uuid: UUID): void;\n\n registerClbk<T>(uuid: UUID, cb: (value: T) => void): void;\n removeClbk<T>(uuid: UUID, cb: (value: T) => void): void;\n\n update<T>(uuid: UUID, value: T): void;\n getUuidByClbk<T>(cb: (value: T) => void): UUID;\n}\n\nclass Connector implements ConnectorInterface {\n // uuid → listeners\n private topics = new Map<UUID, Set<(value: any) => void>>();\n\n // callback → { uuid, refCount }\n private callbackMap = new Map<(value: any) => void, CallbackEntry>();\n\n public addTopic(uuid: UUID): void {\n this.topics.set(uuid, new Set());\n }\n\n public removeTopic(uuid: UUID): void {\n const listeners = this.topics.get(uuid);\n if (listeners) {\n for (const cb of listeners) {\n this.callbackMap.delete(cb);\n }\n }\n this.topics.delete(uuid);\n }\n\n public registerClbk<T>(uuid: UUID, cb: (value: T) => void): void {\n const listeners = this.topics.get(uuid);\n if (!listeners) {\n throw new Error(`Connector: unknown topic ${uuid}`);\n }\n\n const existing = this.callbackMap.get(cb as any);\n if (existing) {\n existing.refCount++;\n return;\n }\n\n listeners.add(cb as any);\n this.callbackMap.set(cb as any, {\n uuid,\n refCount: 1,\n });\n }\n\n public removeClbk<T>(uuid: UUID, cb: (value: T) => void): void {\n const entry = this.callbackMap.get(cb as any);\n if (!entry) return;\n\n entry.refCount--;\n if (entry.refCount > 0) return;\n\n const listeners = this.topics.get(entry.uuid);\n listeners?.delete(cb as any);\n\n this.callbackMap.delete(cb as any);\n }\n\n public update<T>(uuid: UUID, value: T): void {\n const listeners = this.topics.get(uuid);\n if (!listeners) return;\n\n for (const listener of listeners) {\n listener(value);\n }\n }\n\n public getUuidByClbk<T>(cb: (value: T) => void): UUID {\n const entry = this.callbackMap.get(cb as any);\n if (!entry) {\n throw new Error(\"Connector: no UUID for callback\");\n }\n return entry.uuid;\n }\n}\n\nexport const connector = new Connector();\n","// effect.ts\nimport type { ReadFn } from \"./signal\";\nimport { unmount, hasActiveMountSession } from \"./lifecycle\";\nimport { connector } from \"./signal\";\n\nexport function effect<T>(\n readFn: ReadFn<T>,\n fn: (value: T) => void | Promise<void>\n): void {\n let initialized = false;\n\n const cb = (val: T) => {\n if (!initialized) {\n initialized = true;\n return;\n }\n\n try {\n const r = fn(val);\n if (r instanceof Promise) {\n r.catch((err) => {\n console.error(\"effect async callback failed\", err);\n });\n }\n } catch (err) {\n console.error(\"effect callback failed\", err);\n }\n };\n\n // subscribe (initial call is ignored)\n readFn(cb);\n\n // cleanup\n if (hasActiveMountSession()) {\n unmount(() => {\n const uuid = connector.getUuidByClbk(cb);\n connector.removeClbk(uuid, cb);\n });\n }\n}\n","// render.ts\n// Fully synchronous renderer.\n// Signal subscriptions are ref-counted and cleaned up via lifecycle unmount.\n\nimport type { JsxNode, VElement, VText, VSignal, ComponentFn } from \"./jsx\";\nimport {\n beginMountSession,\n endMountSession,\n unmount,\n hasActiveMountSession,\n} from \"./lifecycle\";\nimport { connector } from \"./signal\";\n\nexport interface RenderCtx {\n parent: Node & ParentNode;\n self?: Node;\n [k: string]: any;\n}\n\nexport interface RenderResult {\n el: Node;\n}\n\nexport function render(node: JsxNode | null, ctx: RenderCtx): RenderResult {\n if (node == null) {\n return { el: ctx.parent };\n }\n\n // FRAGMENT\n if (Array.isArray(node)) {\n let last: Node = ctx.parent;\n\n for (const child of node) {\n const r = render(child, ctx);\n last = r.el;\n }\n\n return { el: last };\n }\n\n // TEXT\n if (node.kind === \"text\") {\n const el = renderText(node as VText, ctx);\n return { el };\n }\n\n // SIGNAL (text binding)\n if (node.kind === \"signal\") {\n const el = renderSignal(node as VSignal, ctx);\n return { el };\n }\n\n // COMPONENT\n if (typeof (node as VElement).tag === \"function\") {\n const vnode = node as VElement;\n const fn = vnode.tag as ComponentFn;\n\n beginMountSession();\n\n const resolved = fn({ ...vnode.props, ctx }, vnode.children);\n const result = render(resolved, ctx);\n\n if (!(result.el instanceof Element)) {\n throw new Error(\"Component root must be a DOM Element\");\n }\n\n endMountSession(result.el);\n ctx.self = result.el;\n return result;\n }\n\n // HOST\n const el = renderHost(node as VElement, ctx);\n\n const childCtx: RenderCtx = {\n ...ctx,\n parent: el,\n self: ctx.self,\n };\n\n for (const child of (node as VElement).children) {\n render(child, childCtx);\n }\n\n return { el };\n}\n\n/* ------------------------------------------------------------\n * Host rendering\n * ------------------------------------------------------------ */\n\nconst SVG_NS = \"http://www.w3.org/2000/svg\";\n\nconst SVG_TAGS = new Set([\n \"svg\",\n \"path\",\n \"circle\",\n \"rect\",\n \"line\",\n \"polyline\",\n \"polygon\",\n \"g\",\n \"defs\",\n \"linearGradient\",\n \"radialGradient\",\n \"stop\",\n \"mask\",\n \"clipPath\",\n \"pattern\",\n \"text\",\n \"tspan\",\n \"use\",\n \"symbol\",\n \"view\",\n \"ellipse\",\n \"foreignObject\",\n]);\n\nfunction renderHost(node: VElement, ctx: RenderCtx): Element {\n if (typeof node.tag !== \"string\") {\n throw new Error(\"Host renderer expects string tag\");\n }\n\n const tag = node.tag;\n const isSvg = SVG_TAGS.has(tag);\n\n const el = isSvg\n ? document.createElementNS(SVG_NS, tag)\n : document.createElement(tag);\n\n const props = node.props ?? {};\n\n for (const [key, value] of Object.entries(props)) {\n if (key === \"ctx\" || key === \"children\") continue;\n\n // EVENTS\n if (key.startsWith(\"on\") && typeof value === \"function\") {\n const evt = key.slice(2).toLowerCase();\n el.addEventListener(evt, value as EventListener);\n continue;\n }\n\n // STYLE (supports signals)\n if (key === \"style\" && value && typeof value === \"object\") {\n for (const [k, v] of Object.entries(value as Record<string, any>)) {\n if (v === undefined) continue;\n\n if (typeof v === \"function\" && v.type === \"signal\") {\n const initial = v();\n (el.style as any)[k] = String(initial);\n\n v((nv: any) => {\n (el.style as any)[k] = String(nv);\n });\n } else {\n (el.style as any)[k] = String(v);\n }\n }\n continue;\n }\n\n // SIGNAL PROPS\n if (typeof value === \"function\" && value.type === \"signal\") {\n const apply = (nv: any) => {\n if (isSvg) {\n el.setAttribute(key, String(nv));\n } else {\n // @ts-ignore\n el[key] = nv;\n }\n };\n\n apply(value());\n bindSignal(value, apply);\n continue;\n }\n\n // NORMAL PROPS\n if (isSvg) {\n el.setAttribute(key, String(value));\n } else if (key in el) {\n // @ts-ignore\n el[key] = value;\n } else {\n el.setAttribute(key, String(value));\n }\n }\n\n ctx.parent.appendChild(el);\n return el;\n}\n\n/* ------------------------------------------------------------\n * Text & Signal rendering\n * ------------------------------------------------------------ */\n\nfunction renderText(node: VText, ctx: RenderCtx): Text {\n const t = document.createTextNode(node.value);\n ctx.parent.appendChild(t);\n return t;\n}\n\nfunction renderSignal(node: VSignal, ctx: RenderCtx): Text {\n const t = document.createTextNode(\"\");\n ctx.parent.appendChild(t);\n\n const cb = (v: any) => {\n t.nodeValue = String(v);\n };\n\n // initial\n t.nodeValue = String(node.read());\n\n // subscribe\n node.read(cb);\n\n // cleanup via lifecycle (ref-count aware)\n if (hasActiveMountSession()) {\n unmount(() => {\n const uuid = connector.getUuidByClbk(cb);\n connector.removeClbk(uuid, cb);\n });\n }\n\n return t;\n}\n\n/* ------------------------------------------------------------\n * Shared signal binding helper\n * ------------------------------------------------------------ */\n\nfunction bindSignal<T>(\n read: (cb?: (value: T) => void) => T,\n apply: (value: T) => void,\n): void {\n const cb = (v: any) => apply(v as T);\n\n read(cb);\n\n if (hasActiveMountSession()) {\n unmount(() => {\n const uuid = connector.getUuidByClbk(cb);\n connector.removeClbk(uuid, cb);\n });\n }\n}\n","// destroy.ts\n\nimport { runUnmountsForElement } from \"./lifecycle\";\n\nexport function destroy(root: Element): void {\n const children = Array.from(root.childNodes);\n\n for (const child of children) {\n destroyChild(child);\n }\n\n runUnmountsForElement(root);\n\n if (root.parentNode) {\n root.parentNode.removeChild(root);\n } else {\n root.remove();\n }\n}\n\nfunction destroyChild(node: Node): void {\n if (node instanceof Element) {\n const children = Array.from(node.childNodes);\n\n for (const child of children) {\n destroyChild(child);\n }\n\n runUnmountsForElement(node);\n\n if (node.parentNode) {\n node.parentNode.removeChild(node);\n } else {\n node.remove();\n }\n\n return;\n }\n\n // Text, Comment, etc.\n if (node.parentNode) {\n node.parentNode.removeChild(node);\n }\n}\n","// jsx.ts\nimport type { ReadFn } from \"./signal\";\n\nexport type JsxNode = VElement | VText | VSignal;\n\ndeclare global {\n namespace JSX {\n type Element = any;\n\n interface IntrinsicElements {\n [key: string]: any;\n }\n }\n}\n\nexport interface VElement {\n kind: \"element\";\n tag: string | ComponentFn;\n props: Record<string, any>;\n children: JsxNode[];\n}\n\nexport interface VText {\n kind: \"text\";\n value: string;\n}\n\nexport interface VSignal {\n kind: \"signal\";\n read: ReadFn<any>;\n}\n\nexport interface PropsInterface {\n ctx?: any;\n}\n\nexport type ComponentFn = (\n props: PropsInterface,\n children: JsxNode[]\n) => JsxNode | null;\n\nexport function jsx(\n tag: string | ComponentFn,\n props: any,\n ...rawChildren: any[]\n): VElement {\n return {\n kind: \"element\",\n tag,\n props: props ?? {},\n children: rawChildren.flatMap(normalizeChild),\n };\n}\n\nfunction normalizeChild(input: any): JsxNode | JsxNode[] {\n if (input == null || input === false || input === true) return [];\n\n if (typeof input === \"function\" && input?.type === \"signal\") {\n return {\n kind: \"signal\",\n read: input,\n };\n }\n\n if (typeof input === \"string\" || typeof input === \"number\") {\n return {\n kind: \"text\",\n value: String(input),\n };\n }\n\n if (Array.isArray(input)) {\n return input.flatMap(normalizeChild);\n }\n\n return input;\n}\n","// for.ts\nimport { effect } from \"./effect\";\nimport { mount } from \"./lifecycle\";\nimport { render } from \"./render\";\nimport { destroy } from \"./destroy\";\nimport type { ReadFn } from \"./signal\";\nimport { jsx } from \"./jsx\";\n\ntype Uuid = string & { readonly __brand?: \"uuid\" };\n\ninterface Keyed {\n uuid: Uuid;\n}\n\ninterface ForProps<T extends Keyed> {\n each: ReadFn<T[]>;\n}\n\nexport function For<T extends Keyed>(p: ForProps<T>, [child]: any) {\n const container = jsx(\"csr-for-host\", { style: { display: \"contents\" } });\n\n mount((parent) => {\n const { el } = render(container, { parent });\n const host = el as Element;\n\n const nodes = new Map<Uuid, Element>();\n let order: Uuid[] = [];\n\n function reconcile(values: T[]) {\n const nextOrder: Uuid[] = [];\n\n for (const v of values) {\n if (!v || v.uuid == null) continue;\n\n const id = v.uuid;\n nextOrder.push(id);\n\n if (!nodes.has(id)) {\n const { el } = render(child(v), {\n ...(p as any).ctx,\n parent: host,\n });\n\n if (!(el instanceof Element)) {\n throw new Error(\"For: child root must be an Element\");\n }\n\n nodes.set(id, el);\n }\n }\n\n // remove\n for (const id of order) {\n if (!nextOrder.includes(id)) {\n const el = nodes.get(id);\n if (el) destroy(el);\n nodes.delete(id);\n }\n }\n\n // reorder\n let anchor: ChildNode | null = null;\n for (let i = nextOrder.length - 1; i >= 0; i--) {\n const el = nodes.get(nextOrder[i]!)!;\n host.insertBefore(el, anchor);\n anchor = el;\n }\n\n order = nextOrder;\n }\n\n // initial render (sync, explicit)\n reconcile(p.each());\n\n // reactive updates\n effect(p.each, reconcile);\n });\n\n return null;\n}\n","//fragment.ts\nexport function fragment(p: null, ...childs: any) {\n return childs;\n}\n","// show.ts\nimport { jsx } from \"./jsx\";\nimport { destroy } from \"./destroy\";\nimport { render } from \"./render\";\nimport type { ReadFn } from \"./signal\";\nimport { mount } from \"./lifecycle\";\n\ninterface ShowPropsInterface {\n when: ReadFn<boolean>;\n}\n\nexport function Show(p: ShowPropsInterface, children: any) {\n const host = jsx(\"csr-show-host\", { style: { display: \"contents\" } });\n const content = jsx(\n \"csr-show-content\",\n { style: { display: \"contents\" } },\n ...children\n );\n\n let hostEl: Element | null = null;\n let contentEl: Element | null = null;\n let visible = false;\n\n mount((parent) => {\n // render host once\n const { el: h } = render(host, { parent });\n hostEl = h as Element;\n\n // subscribe to condition signal\n p.when((b) => {\n if (b === visible) return;\n visible = b;\n\n // hide\n if (!visible) {\n if (contentEl) {\n destroy(contentEl);\n contentEl = null;\n }\n return;\n }\n\n // show\n const { el: c } = render(content, {\n ...(p as any).ctx,\n parent: hostEl!,\n });\n\n if (!(c instanceof Element)) {\n throw new Error(\"Show: content root must be an Element\");\n }\n\n contentEl = c;\n });\n });\n\n return null;\n}\n","// repeat.ts\nimport type { ReadFn } from \"../core/signal\";\nimport { signal } from \"../core/signal\";\nimport { For } from \"../core/for\";\nimport { jsx } from \"../core/jsx\";\n\ntype MaybeSignal<T> = T | ReadFn<T>;\n\ninterface RepeatPropsInterface {\n n: MaybeSignal<number>;\n}\n\nexport function Repeat(p: RepeatPropsInterface, children: any[]) {\n // static case\n if (typeof p.n === \"number\") {\n const out: any[] = [];\n for (let i = 0; i < p.n; i++) {\n out.push(children);\n }\n return out;\n }\n\n // reactive case -> delegate to For\n const count = p.n;\n\n const [items, setItems] = signal<{ uuid: string }[]>([]);\n\n // derive structure from n\n count((n) => {\n const next: { uuid: string }[] = [];\n for (let i = 0; i < n; i++) {\n next.push({ uuid: String(i) });\n }\n setItems(() => next);\n });\n\n return <For each={items}>{() => children}</For>;\n}\n","export const breakpoint = {\n mobile: 0, // 0–599 px\n tablet: 601, // 600–1024 px\n laptop: 1025, // 1024–1440 px\n desktop: 1441, // 1440–1920 px\n large: 1921, // >1920 px\n};\n","// use-breakpoint.ts\nimport { signal, type ReadFn } from \"../core/signal\";\nimport { breakpoint } from \"../style/breakpoint\";\n\nexport type BreakpointName = keyof typeof breakpoint;\n\nfunction detectBreakpoint(width: number): BreakpointName {\n if (width >= breakpoint.large) return \"large\";\n if (width >= breakpoint.desktop) return \"desktop\";\n if (width >= breakpoint.laptop) return \"laptop\";\n if (width >= breakpoint.tablet) return \"tablet\";\n return \"mobile\";\n}\n\n// initial value from real window\nconst [breakepoint, write] = signal<BreakpointName>(\n detectBreakpoint(window.innerWidth)\n);\n\n// attach resize listener once\nlet last = breakepoint();\n\nwindow.addEventListener(\"resize\", () => {\n const next = detectBreakpoint(window.innerWidth);\n if (next !== last) {\n last = next;\n write(() => next);\n }\n});\n\nexport function useBreakpoint(): ReadFn<BreakpointName> {\n return breakepoint;\n}\n","// use-custom-event.ts\nimport { unmount } from \"../core/lifecycle\";\n\ntype Handler<T> = (data: T) => void;\n\n/**\n * Creates a custom browser event emitter.\n * If a handler is provided, it is automatically\n * cleaned up on component unmount.\n */\nexport function useCustomEvent<T = any>(topic: string, handler?: Handler<T>) {\n // register listener if handler exists\n if (handler) {\n const listener = (e: Event) => {\n const ce = e as CustomEvent<T>;\n handler(ce.detail);\n };\n\n window.addEventListener(topic, listener);\n\n // automatic cleanup on unmount\n unmount(() => {\n window.removeEventListener(topic, listener);\n });\n }\n\n // emitter (always returned)\n return function emit(data: T) {\n window.dispatchEvent(new CustomEvent(topic, { detail: data }));\n };\n}\n","// use-local-storage.ts\nimport { signal } from \"../core/signal\";\nimport type { ReadFn } from \"../core/signal\";\n\nexport type LocalStorageHook<T> = [\n value: ReadFn<T>,\n setValue: (next: T) => void,\n remove: () => void,\n];\n\nexport function useLocalStorage<T>(\n key: string,\n initial: T,\n): LocalStorageHook<T> {\n // Resolve initial value from localStorage or fallback\n let start = initial;\n\n try {\n const raw = localStorage.getItem(key);\n if (raw !== null) {\n start = JSON.parse(raw);\n }\n } catch (err) {\n console.error(`[useLocalStorage] Failed to read key \"${key}\"`, err);\n }\n\n const [value, write] = signal<T>(start);\n\n // Update both signal and localStorage\n function setValue(next: T) {\n try {\n localStorage.setItem(key, JSON.stringify(next));\n } catch (err) {\n console.error(`[useLocalStorage] Failed to write key \"${key}\"`, err);\n }\n write(() => next);\n }\n\n // Remove from storage and reset signal\n function remove() {\n try {\n localStorage.removeItem(key);\n } catch (err) {\n console.error(`[useLocalStorage] Failed to remove key \"${key}\"`, err);\n }\n write(() => initial);\n }\n\n return [value, setValue, remove];\n}\n","// use-locale.ts\nimport { signal } from \"../core/signal\";\nimport type { ReadFn } from \"../core/signal\";\n\nexport interface LocaleController {\n locale: ReadFn<string>;\n setLocale: (next: string) => void;\n}\nconst [locale, write] = signal(\"en-US\");\n\nexport function useLocale(): LocaleController {\n return {\n locale,\n setLocale(next: string) {\n write(() => next);\n },\n };\n}\n","// use-router.ts\nimport { signal } from \"../core\";\n\ntype Route = string;\n\nconst [route, setRoute] = signal<Route>(\"/\");\n\nwindow.addEventListener(\"popstate\", (e: PopStateEvent) => {\n const r = e.state?.route;\n if (typeof r === \"string\") {\n setRoute(() => r);\n }\n});\n\nexport function useRouter() {\n const navigate = (to: Route) => {\n if (to === route()) return;\n history.pushState({ route: to }, \"\");\n setRoute(() => to);\n };\n\n return {\n route,\n navigate,\n };\n}\n","// use-session-storage.ts\nimport { signal } from \"../core/signal\";\nimport type { ReadFn } from \"../core/signal\";\n\nexport type SessionStorageHook<T> = [\n value: ReadFn<T>,\n setValue: (next: T) => void,\n remove: () => void,\n];\n\nexport function useSessionStorage<T>(\n key: string,\n initial: T,\n): SessionStorageHook<T> {\n // Resolve initial value from sessionStorage or fallback\n let start = initial;\n\n try {\n const raw = sessionStorage.getItem(key);\n if (raw !== null) {\n start = JSON.parse(raw);\n }\n } catch (err) {\n console.error(`[useSessionStorage] Failed to read key \"${key}\"`, err);\n }\n\n const [value, write] = signal<T>(start);\n\n function setValue(next: T) {\n try {\n sessionStorage.setItem(key, JSON.stringify(next));\n } catch (err) {\n console.error(`[useSessionStorage] Failed to write key \"${key}\"`, err);\n }\n write(() => next);\n }\n\n function remove() {\n try {\n sessionStorage.removeItem(key);\n } catch (err) {\n console.error(`[useSessionStorage] Failed to remove key \"${key}\"`, err);\n }\n write(() => initial);\n }\n\n return [value, setValue, remove];\n}\n","// box.ts\nimport type { ReadFn } from \"../core/signal\";\nimport { jsx } from \"../core/jsx\";\nimport type { DOMEvents, DOMAttrs, MaybeSignal, CSSValue } from \"../core/dom\";\n\nexport interface BoxProps extends DOMEvents, DOMAttrs {\n /**\n * Child nodes rendered inside the box\n */\n children?: any;\n\n // ─────────────────────────────\n // Spacing – Margin\n // ─────────────────────────────\n\n /** Margin (all sides) */\n m?: MaybeSignal<CSSValue>;\n\n /** Margin-bottom */\n mb?: MaybeSignal<CSSValue>;\n\n /** Margin-left */\n ml?: MaybeSignal<CSSValue>;\n\n /** Margin-right */\n mr?: MaybeSignal<CSSValue>;\n\n /** Margin-top */\n mt?: MaybeSignal<CSSValue>;\n\n /** Margin horizontal (left + right) */\n mx?: MaybeSignal<CSSValue>;\n\n /** Margin vertical (top + bottom) */\n my?: MaybeSignal<CSSValue>;\n\n // ─────────────────────────────\n // Spacing – Padding\n // ─────────────────────────────\n\n /** Padding (all sides) */\n p?: MaybeSignal<CSSValue>;\n\n /** Padding-bottom */\n pb?: MaybeSignal<CSSValue>;\n\n /** Padding-left */\n pl?: MaybeSignal<CSSValue>;\n\n /** Padding-right */\n pr?: MaybeSignal<CSSValue>;\n\n /** Padding-top */\n pt?: MaybeSignal<CSSValue>;\n\n /** Padding horizontal (left + right) */\n px?: MaybeSignal<CSSValue>;\n\n /** Padding vertical (top + bottom) */\n py?: MaybeSignal<CSSValue>;\n\n // ─────────────────────────────\n // Borders\n // ─────────────────────────────\n\n /** Border (all sides) */\n b?: MaybeSignal<CSSValue>;\n\n /** Border-top */\n bt?: MaybeSignal<CSSValue>;\n\n /** Border-right */\n br?: MaybeSignal<CSSValue>;\n\n /** Border-bottom */\n bb?: MaybeSignal<CSSValue>;\n\n /** Border-left */\n bl?: MaybeSignal<CSSValue>;\n\n /** Border horizontal (left + right) */\n bx?: MaybeSignal<CSSValue>;\n\n /** Border vertical (top + bottom) */\n by?: MaybeSignal<CSSValue>;\n\n // ─────────────────────────────\n // Border Radius\n // ─────────────────────────────\n\n /** Border radius (all corners) */\n r?: MaybeSignal<CSSValue>;\n\n /** Border-top radius */\n rt?: MaybeSignal<CSSValue>;\n\n /** Border-right radius */\n rr?: MaybeSignal<CSSValue>;\n\n /** Border-bottom radius */\n rb?: MaybeSignal<CSSValue>;\n\n /** Border-left radius */\n rl?: MaybeSignal<CSSValue>;\n\n /** Border-top-right radius */\n rtr?: MaybeSignal<CSSValue>;\n\n /** Border-top-left radius */\n rtl?: MaybeSignal<CSSValue>;\n\n /** Border-bottom-right radius */\n rbr?: MaybeSignal<CSSValue>;\n\n /** Border-bottom-left radius */\n rbl?: MaybeSignal<CSSValue>;\n\n // ─────────────────────────────\n // Sizing\n // ─────────────────────────────\n\n /** Size shortcut (width + height) */\n s?: MaybeSignal<CSSValue>;\n\n /** Height */\n h?: MaybeSignal<CSSValue>;\n\n /** Width */\n w?: MaybeSignal<CSSValue>;\n\n /** Max height */\n maxH?: MaybeSignal<CSSValue>;\n\n /** Max width */\n maxW?: MaybeSignal<CSSValue>;\n\n /** Min height */\n minH?: MaybeSignal<CSSValue>;\n\n /** Min width */\n minW?: MaybeSignal<CSSValue>;\n\n // ─────────────────────────────\n // Appearance\n // ─────────────────────────────\n\n /** Opacity (0–1) */\n o?: MaybeSignal<CSSValue>;\n\n /** Box shadow */\n sh?: MaybeSignal<CSSValue>;\n\n /** Background */\n bg?: MaybeSignal<CSSValue>;\n\n /**\n * Additional inline styles (merged last)\n * Values support signals\n */\n style?: Record<string, MaybeSignal<CSSValue> | undefined>;\n}\n\nexport function Box(p: BoxProps, children: any[]) {\n return (\n <div\n {...p}\n style={{\n marginBottom: p.mb ?? p.my ?? p.m,\n marginLeft: p.ml ?? p.mx ?? p.m,\n marginRight: p.mr ?? p.mx ?? p.m,\n marginTop: p.mt ?? p.my ?? p.m,\n\n paddingBottom: p.pb ?? p.py ?? p.p,\n paddingLeft: p.pl ?? p.px ?? p.p,\n paddingRight: p.pr ?? p.px ?? p.p,\n paddingTop: p.pt ?? p.py ?? p.p,\n\n background: p.bg,\n opacity: p.o,\n boxShadow: p.sh,\n\n borderTop: p.bt ?? p.by ?? p.b,\n borderRight: p.br ?? p.bx ?? p.b,\n borderBottom: p.bb ?? p.by ?? p.b,\n borderLeft: p.bl ?? p.bx ?? p.b,\n\n borderTopRightRadius: p.rtr ?? p.rt ?? p.rr ?? p.r,\n borderTopLeftRadius: p.rtl ?? p.rt ?? p.rl ?? p.r,\n borderBottomRightRadius: p.rbr ?? p.rb ?? p.rr ?? p.r,\n borderBottomLeftRadius: p.rbl ?? p.rb ?? p.rl ?? p.r,\n\n width: p.w ?? p.s,\n height: p.h ?? p.s,\n maxWidth: p.maxW,\n maxHeight: p.maxH,\n minWidth: p.minW,\n minHeight: p.minH,\n\n ...p.style,\n }}\n >\n {children}\n </div>\n );\n}\n","import { Box } from \"./box\";\nimport { jsx } from \"../core/jsx\";\nimport type { BoxProps } from \"./box\";\n\n/**\n * Absolute positioned component\n * Positions element absolutely within the nearest positioned ancestor\n */\nexport interface AbsolutePropertiesInterface extends BoxProps {\n /**\n * Distance from top edge of containing block\n * (e.g. \"10px\", \"1rem\", \"5%\")\n */\n top?: string;\n\n /**\n * Distance from right edge of containing block\n * (e.g. \"10px\", \"1rem\", \"5%\")\n */\n right?: string;\n\n /**\n * Distance from bottom edge of containing block\n * (e.g. \"10px\", \"1rem\", \"5%\")\n */\n bottom?: string;\n\n /**\n * Distance from left edge of containing block\n * (e.g. \"10px\", \"1rem\", \"5%\")\n */\n left?: string;\n}\n\nexport function Absolute(p: AbsolutePropertiesInterface, children: any[]) {\n return (\n <Box\n {...p}\n style={{\n position: \"absolute\",\n\n top: p.top,\n right: p.right,\n bottom: p.bottom,\n left: p.left,\n\n ...p.style,\n }}\n >\n {children}\n </Box>\n );\n}\n","import { jsx } from \"../core/jsx\";\nimport { Box } from \"./box\";\nimport type { BoxProps } from \"./box\";\n\n/**\n * Flex item component\n * Controls individual item behavior in flex containers\n */\nexport interface FlexItemPropertiesInterface extends BoxProps {\n /**\n * Flex shorthand (grow, shrink, basis)\n * e.g. \"1\", \"none\", \"0 1 auto\"\n */\n flx?: string;\n\n /**\n * Align-self (cross-axis alignment)\n */\n as?: \"auto\" | \"flex-start\" | \"flex-end\" | \"center\" | \"baseline\" | \"stretch\";\n\n /**\n * Flex grow factor\n */\n flxGrow?: string;\n\n /**\n * Flex shrink factor\n */\n flxShrink?: string;\n\n /**\n * Flex basis\n */\n flxBasis?: string;\n}\n\nexport function FlexItem(p: FlexItemPropertiesInterface, children: any[]) {\n return (\n <Box\n {...p}\n style={{\n flex: p.flx,\n alignSelf: p.as,\n flexGrow: p.flxGrow,\n flexShrink: p.flxShrink,\n flexBasis: p.flxBasis,\n\n ...p.style,\n }}\n >\n {children}\n </Box>\n );\n}\n","import { jsx } from \"../core/jsx\";\nimport { FlexItem } from \"./flex-item\";\nimport type { FlexItemPropertiesInterface } from \"./flex-item\";\n\n/**\n * Flex container component\n * Core flexbox layout primitive\n */\nexport interface FlexPropertiesInterface extends FlexItemPropertiesInterface {\n /**\n * Justify-content (main axis alignment)\n */\n jc?:\n | \"flex-start\"\n | \"flex-end\"\n | \"center\"\n | \"space-between\"\n | \"space-around\"\n | \"space-evenly\";\n\n /**\n * Align-items (cross axis alignment)\n */\n ai?: \"stretch\" | \"flex-start\" | \"flex-end\" | \"center\" | \"baseline\";\n\n /**\n * Align-content (multi-line alignment)\n */\n ac?:\n | \"flex-start\"\n | \"flex-end\"\n | \"center\"\n | \"space-between\"\n | \"space-around\"\n | \"stretch\";\n\n /**\n * Gap between items\n */\n g?: string;\n\n /**\n * Flex direction\n */\n flxDirection?: \"row\" | \"row-reverse\" | \"column\" | \"column-reverse\";\n\n /**\n * Flex wrap\n */\n flxWrap?: \"nowrap\" | \"wrap\" | \"wrap-reverse\";\n\n /**\n * Flex-flow shorthand\n */\n flxFlow?: `${\"row\" | \"row-reverse\" | \"column\" | \"column-reverse\"} ${\n | \"nowrap\"\n | \"wrap\"\n | \"wrap-reverse\"}`;\n}\n\nexport function Flex(p: FlexPropertiesInterface, children: any[]) {\n return (\n <FlexItem\n {...p}\n style={{\n display: \"flex\",\n\n justifyContent: p.jc,\n alignItems: p.ai,\n alignContent: p.ac,\n\n gap: p.g,\n\n flexDirection: p.flxDirection,\n flexWrap: p.flxWrap,\n flexFlow: p.flxFlow,\n\n ...p.style,\n }}\n >\n {children}\n </FlexItem>\n );\n}\n","import { jsx } from \"../core/jsx\";\nimport { Flex } from \"./flex\";\nimport type { FlexPropertiesInterface } from \"./flex\";\n\n/**\n * Center component\n * Centers children horizontally and vertically using flexbox\n */\nexport interface CenterPropertiesInterface extends FlexPropertiesInterface {}\n\nexport function Center(p: CenterPropertiesInterface, children: any[]) {\n return (\n <Flex {...p} ai={p.ai ?? \"center\"} jc={p.jc ?? \"center\"}>\n {children}\n </Flex>\n );\n}\n","import { jsx } from \"../core/jsx\";\nimport { Box } from \"./box\";\nimport type { BoxProps } from \"./box\";\n\n/**\n * Fixed positioned component\n * Positions element relative to the viewport\n */\nexport interface FixedPropertiesInterface extends BoxProps {\n /** Top offset (e.g. \"10px\") */\n top?: string;\n\n /** Right offset */\n right?: string;\n\n /** Bottom offset */\n bottom?: string;\n\n /** Left offset */\n left?: string;\n\n /** Stacking order (z-index) */\n zIndex?: string;\n}\n\nexport function Fixed(p: FixedPropertiesInterface, children: any[]) {\n return (\n <Box\n {...p}\n style={{\n position: \"fixed\",\n\n top: p.top,\n right: p.right,\n bottom: p.bottom,\n left: p.left,\n zIndex: p.zIndex,\n\n ...p.style,\n }}\n >\n {children}\n </Box>\n );\n}\n","import { jsx } from \"../core/jsx\";\nimport { Box } from \"./box\";\nimport type { BoxProps } from \"./box\";\n\n/**\n * Grid item component\n * Controls individual item placement inside CSS Grid containers\n */\nexport interface GridItemPropertiesInterface extends BoxProps {\n /**\n * Grid area name or shorthand\n * (e.g. \"header\", \"1 / 1 / 3 / 2\")\n */\n grdArea?: string;\n\n /**\n * Grid column placement\n * (e.g. \"1 / span 2\", \"sidebar\")\n */\n grdColumn?: string;\n\n /**\n * Grid row placement\n * (e.g. \"1 / span 3\", \"content\")\n */\n grdRow?: string;\n}\n\nexport function GridItem(p: GridItemPropertiesInterface, children: any[]) {\n return (\n <Box\n {...p}\n style={{\n gridArea: p.grdArea,\n gridColumn: p.grdColumn,\n gridRow: p.grdRow,\n\n ...p.style,\n }}\n >\n {children}\n </Box>\n );\n}\n","import { jsx } from \"../core/jsx\";\nimport { GridItem } from \"./grid-item\";\nimport type { GridItemPropertiesInterface } from \"./grid-item\";\n\n/**\n * Grid container component\n * Core CSS Grid layout primitive\n */\nexport interface GridPropertiesInterface extends GridItemPropertiesInterface {\n /** Gap between grid items */\n g?: string;\n\n /** Align-items (block axis) */\n ai?: \"stretch\" | \"start\" | \"end\" | \"center\" | \"baseline\";\n\n /** Justify-items (inline axis) */\n ji?: \"stretch\" | \"start\" | \"end\" | \"center\" | \"baseline\";\n\n /** Align-self (container as grid item) */\n as?:\n | \"auto\"\n | \"normal\"\n | \"stretch\"\n | \"center\"\n | \"start\"\n | \"end\"\n | \"self-start\"\n | \"self-end\"\n | \"flex-start\"\n | \"flex-end\"\n | \"left\"\n | \"right\";\n\n // Grid templates\n grdTemplateColumns?: string;\n grdTemplateRows?: string;\n grdTemplateAreas?: string;\n grdTemplate?: string;\n\n // Auto grid\n grdAutoColumns?: string;\n grdAutoRows?: string;\n grdAutoFlow?: \"row\" | \"column\" | \"row dense\" | \"column dense\";\n\n // Placement\n grd?: string;\n grdRowStart?: string;\n grdColumnStart?: string;\n grdRowEnd?: string;\n grdColumnEnd?: string;\n grdRow?: string;\n grdColumn?: string;\n\n // Gaps\n grdRowGap?: string;\n grdColumnGap?: string;\n}\n\nexport function Grid(p: GridPropertiesInterface, children: any[]) {\n return (\n <GridItem\n {...p}\n style={{\n display: \"grid\",\n\n gap: p.g,\n\n alignItems: p.ai,\n justifyItems: p.ji,\n alignSelf: p.as,\n\n gridTemplateColumns: p.grdTemplateColumns,\n gridTemplateRows: p.grdTemplateRows,\n gridTemplateAreas: p.grdTemplateAreas,\n gridTemplate: p.grdTemplate,\n\n gridAutoColumns: p.grdAutoColumns,\n gridAutoRows: p.grdAutoRows,\n gridAutoFlow: p.grdAutoFlow,\n\n gridArea: p.grd,\n gridRowStart: p.grdRowStart,\n gridColumnStart: p.grdColumnStart,\n gridRowEnd: p.grdRowEnd,\n gridColumnEnd: p.grdColumnEnd,\n gridRow: p.grdRow,\n gridColumn: p.grdColumn,\n\n rowGap: p.grdRowGap,\n columnGap: p.grdColumnGap,\n\n ...p.style,\n }}\n >\n {children}\n </GridItem>\n );\n}\n","import { jsx } from \"../core/jsx\";\nimport { Box } from \"./box\";\nimport type { BoxProps } from \"./box\";\n\n/**\n * Relative positioned component\n * Establishes a positioning context for absolute children\n */\nexport interface RelativePropertiesInterface extends BoxProps {\n /**\n * Stacking order (z-index)\n * (e.g. \"1\", \"auto\", \"var(--z-index-modal)\")\n */\n zIndex?: string;\n}\n\nexport function Relative(p: RelativePropertiesInterface, children: any[]) {\n return (\n <Box\n {...p}\n style={{\n position: \"relative\",\n zIndex: p.zIndex,\n\n ...p.style,\n }}\n >\n {children}\n </Box>\n );\n}\n","import { jsx } from \"../core/jsx\";\nimport { Relative } from \"./relative\";\nimport { Absolute } from \"./absolute\";\nimport type { BoxProps } from \"./box\";\n\n/**\n * Scroll component\n * Creates a scrollable container filling its parent\n */\nexport interface ScrollPropertiesInterface extends BoxProps {}\n\nexport function Scroll(p: ScrollPropertiesInterface, children: any[]) {\n return (\n <Relative s=\"100%\">\n <Absolute\n top=\"0\"\n right=\"0\"\n bottom=\"0\"\n left=\"0\"\n {...p}\n style={{\n overflow: \"auto\",\n ...p.style,\n }}\n >\n {children}\n </Absolute>\n </Relative>\n );\n}\n","import { Flex } from \"./flex\";\nimport { jsx } from \"../core\";\nimport type { FlexPropertiesInterface } from \"./flex\";\n\n/**\n * Stack component\n * Vertical layout primitive (flex-direction: column by default)\n */\nexport interface StackPropertiesInterface extends FlexPropertiesInterface {}\n\nexport function Stack(p: StackPropertiesInterface, children: any[]) {\n return (\n <Flex {...p} flxDirection={p.flxDirection ?? \"column\"}>\n {children}\n </Flex>\n );\n}\n","import { jsx } from \"../core/jsx\";\nimport { Box } from \"./box\";\nimport type { BoxProps } from \"./box\";\n\n/**\n * Sticky positioned component\n * Sticks to a position within its scroll container\n */\nexport interface StickyPropertiesInterface extends BoxProps {\n /** Top offset (e.g. \"10px\") */\n top?: string;\n\n /** Right offset */\n right?: string;\n\n /** Bottom offset */\n bottom?: string;\n\n /** Left offset */\n left?: string;\n\n /** Stacking order (z-index) */\n zIndex?: string;\n}\n\nexport function Sticky(p: StickyPropertiesInterface, children: any[]) {\n return (\n <Box\n {...p}\n style={{\n position: \"sticky\",\n\n top: p.top,\n right: p.right,\n bottom: p.bottom,\n left: p.left,\n zIndex: p.zIndex,\n\n ...p.style,\n }}\n >\n {children}\n </Box>\n );\n}\n","import { jsx } from \"../core/jsx\";\nimport type { DOMAttrs, DOMEvents } from \"../core/dom\";\n\n/**\n * Text component\n * Typographic primitive for rendering text elements\n */\nexport interface TextPropertiesInterface extends DOMAttrs, DOMEvents {\n /** Text content */\n children?: any;\n\n /**\n * HTML tag to render\n * @default \"p\"\n */\n tag?: \"span\" | \"p\" | \"h1\" | \"h2\" | \"h3\" | \"h4\" | \"h5\" | \"h6\";\n\n // ─────────────────────────────\n // Text styling\n // ─────────────────────────────\n\n /** Text alignment */\n a?: \"left\" | \"right\" | \"center\" | \"justify\";\n\n /** Font family */\n ff?: string;\n\n /** Font weight */\n fw?: number;\n\n /** Font size */\n fs?: string;\n\n /** Line height */\n lh?: string;\n\n /** Letter spacing */\n ls?: string;\n\n /** Font style */\n s?: \"normal\" | \"italic\";\n\n /** Text color */\n c?: string;\n\n // ─────────────────────────────\n // Spacing – Margin\n // ─────────────────────────────\n\n m?: string;\n mb?: string;\n ml?: string;\n mr?: string;\n mt?: string;\n mx?: string;\n my?: string;\n\n // ─────────────────────────────\n // Spacing – Padding\n // ─────────────────────────────\n\n p?: string;\n pb?: string;\n pl?: string;\n pr?: string;\n pt?: string;\n px?: string;\n py?: string;\n\n /** Background */\n bg?: string;\n}\n\nexport function Text(p: TextPropertiesInterface, children: any[]) {\n const Tag = p.tag ?? \"p\";\n\n return jsx(\n Tag,\n {\n ...p,\n style: {\n textAlign: p.a,\n fontFamily: p.ff,\n fontWeight: p.fw,\n fontSize: p.fs,\n lineHeight: p.lh,\n letterSpacing: p.ls,\n fontStyle: p.s,\n color: p.c,\n\n margin: p.m,\n marginBottom: p.mb ?? p.my ?? p.m,\n marginLeft: p.ml ?? p.mx ?? p.m,\n marginRight: p.mr ?? p.mx ?? p.m,\n marginTop: p.mt ?? p.my ?? p.m,\n\n padding: p.p,\n paddingBottom: p.pb ?? p.py ?? p.p,\n paddingLeft: p.pl ?? p.px ?? p.p,\n paddingRight: p.pr ?? p.px ?? p.p,\n paddingTop: p.pt ?? p.py ?? p.p,\n\n background: p.bg,\n },\n },\n ...children\n );\n}\n","export const color = {\n brand: \"#000\",\n onBrand: \"#fff\",\n\n gray0: \"#f8f9fa\",\n gray100: \"#f1f3f5\",\n gray200: \"#e9ecef\",\n gray300: \"#dee2e6\",\n gray400: \"#ced4da\",\n gray500: \"#adb5bd\",\n gray600: \"#868e96\",\n gray700: \"#495057\",\n gray800: \"#343a40\",\n gray900: \"#212529\",\n\n red0: \"#fff5f5\",\n red100: \"#ffe3e3\",\n red200: \"#ffc9c9\",\n red300: \"#ffa8a8\",\n red400: \"#ff8787\",\n red500: \"#ff6b6b\",\n red600: \"#fa5252\",\n red700: \"#f03e3e\",\n red800: \"#e03131\",\n red900: \"#c92a2a\",\n\n pink0: \"#fff0f6\",\n pink100: \"#ffdeeb\",\n pink200: \"#fcc2d7\",\n pink300: \"#faa2c1\",\n pink400: \"#f783ac\",\n pink500: \"#f06595\",\n pink600: \"#e64980\",\n pink700: \"#d6336c\",\n pink800: \"#c2255c\",\n pink900: \"#a61e4d\",\n\n grape0: \"#f8f0fc\",\n grape100: \"#f3d9fa\",\n grape200: \"#eebefa\",\n grape300: \"#e599f7\",\n grape400: \"#da77f2\",\n grape500: \"#cc5de8\",\n grape600: \"#be4bdb\",\n grape700: \"#ae3ec9\",\n grape800: \"#9c36b5\",\n grape900: \"#862e9c\",\n\n violet0: \"#f3f0ff\",\n violet100: \"#e5dbff\",\n violet200: \"#d0bfff\",\n violet300: \"#b197fc\",\n violet400: \"#9775fa\",\n violet500: \"#845ef7\",\n violet600: \"#7950f2\",\n violet700: \"#7048e8\",\n violet800: \"#6741d9\",\n violet900: \"#5f3dc4\",\n\n indigo0: \"#edf2ff\",\n indigo100: \"#dbe4ff\",\n indigo200: \"#bac8ff\",\n indigo300: \"#91a7ff\",\n indigo400: \"#748ffc\",\n indigo500: \"#5c7cfa\",\n indigo600: \"#4c6ef5\",\n indigo700: \"#4263eb\",\n indigo800: \"#3b5bdb\",\n indigo900: \"#364fc7\",\n\n blue0: \"#e7f5ff\",\n blue100: \"#d0ebff\",\n blue200: \"#a5d8ff\",\n blue300: \"#74c0fc\",\n blue400: \"#4dabf7\",\n blue500: \"#339af0\",\n blue600: \"#228be6\",\n blue700: \"#1c7ed6\",\n blue800: \"#1971c2\",\n blue900: \"#1864ab\",\n\n cyan0: \"#e3fafc\",\n cyan100: \"#c5f6fa\",\n cyan200: \"#99e9f2\",\n cyan300: \"#66d9e8\",\n cyan400: \"#3bc9db\",\n cyan500: \"#22b8cf\",\n cyan600: \"#15aabf\",\n cyan700: \"#1098ad\",\n cyan800: \"#0c8599\",\n cyan900: \"#0b7285\",\n\n teal0: \"#e6fcf5\",\n teal100: \"#c3fae8\",\n teal200: \"#96f2d7\",\n teal300: \"#63e6be\",\n teal400: \"#38d9a9\",\n teal500: \"#20c997\",\n teal600: \"#12b886\",\n teal700: \"#0ca678\",\n teal800: \"#099268\",\n teal900: \"#087f5b\",\n\n green0: \"#ebfbee\",\n green100: \"#d3f9d8\",\n green200: \"#b2f2bb\",\n green300: \"#8ce99a\",\n green400: \"#69db7c\",\n green500: \"#51cf66\",\n green600: \"#40c057\",\n green700: \"#37b24d\",\n green800: \"#2f9e44\",\n green900: \"#2b8a3e\",\n\n lime0: \"#f4fce3\",\n lime100: \"#e9fac8\",\n lime200: \"#d8f5a2\",\n lime300: \"#c0eb75\",\n lime400: \"#a9e34b\",\n lime500: \"#94d82d\",\n lime600: \"#82c91e\",\n lime700: \"#74b816\",\n lime800: \"#66a80f\",\n lime900: \"#5c940d\",\n\n yellow0: \"#fff9db\",\n yellow100: \"#fff3bf\",\n yellow200: \"#ffec99\",\n yellow300: \"#ffe066\",\n yellow400: \"#ffd43b\",\n yellow500: \"#fcc419\",\n yellow600: \"#fab005\",\n yellow700: \"#f59f00\",\n yellow800: \"#f08c00\",\n yellow900: \"#e67700\",\n\n orange0: \"#fff4e6\",\n orange100: \"#ffe8cc\",\n orange200: \"#ffd8a8\",\n orange300: \"#ffc078\",\n orange400: \"#ffa94d\",\n orange500: \"#ff922b\",\n orange600: \"#fd7e14\",\n orange700: \"#f76707\",\n orange800: \"#e8590c\",\n orange900: \"#d9480f\",\n};\n","const family = {\n sans: \"sans-serif\",\n serif: \"serif\",\n mono: \"monospace\",\n};\n\nconst letterSpacing = {\n xs: \"-0.05em\", // Extra small\n sm: \"-0.025em\", // Small\n md: \"0em\", // Medium\n lg: \"0.025em\", // Large\n xl: \"0.05em\", // Extra large\n \"2xl\": \"0.1em\", // 2 times extra large\n \"3xl\": \"0.15em\", // 3 times extra large\n \"4xl\": \"0.2em\", // 4 times extra large\n \"5xl\": \"0.25em\", // 5 times extra large\n \"6xl\": \"0.3em\", // 6 times extra large\n \"7xl\": \"0.35em\", // 7 times extra large\n \"8xl\": \"0.4em\", // 8 times extra large\n \"9xl\": \"0.45em\", // 9 times extra large\n};\n\nconst lineHeight = {\n xs: \"1rem\", // Extra small\n sm: \"1.25rem\", // Small\n md: \"1.5rem\", // Medium\n lg: \"1.75rem\", // Large\n xl: \"2rem\", // Extra large\n \"2xl\": \"2.25rem\", // 2 times extra large\n \"3xl\": \"2.5rem\", // 3 times extra large\n \"4xl\": \"2.75rem\", // 4 times extra large\n \"5xl\": \"3rem\", // 5 times extra large\n \"6xl\": \"3.25rem\", // 6 times extra large\n \"7xl\": \"3.5rem\", // 7 times extra large\n \"8xl\": \"3.75rem\", // 8 times extra large\n \"9xl\": \"4rem\", // 9 times extra large\n};\n\nconst size = {\n xs: \"0.75rem\", // Extra small\n sm: \"0.875rem\", // Small\n md: \"1rem\", // Medium\n lg: \"1.125rem\", // Large\n xl: \"1.25rem\", // Extra large\n \"2xl\": \"1.5rem\", // 2 times extra large\n \"3xl\": \"1.875rem\", // 3 times extra large\n \"4xl\": \"2.25rem\", // 4 times extra large\n \"5xl\": \"3rem\", // 5 times extra large\n \"6xl\": \"3.75rem\", // 6 times extra large\n \"7xl\": \"4.5rem\", // 7 times extra large\n \"8xl\": \"6rem\", // 8 times extra large\n \"9xl\": \"8rem\", // 9 times extra large\n};\n\nconst style = {\n normal: \"normal\",\n italic: \"italic\",\n};\nconst weight = {\n thin: 100, // Thin\n extralight: 200, // Extra Light\n light: 300, // Light\n normal: 400, // Normal\n medium: 500, // Medium\n semibold: 600, // Semi-bold\n bold: 700, // Bold\n extrabold: 800, // Extra Bold\n black: 900, // Black\n};\n\nexport const font = {\n family,\n size,\n weight,\n style,\n lineHeight,\n letterSpacing,\n};\n","export const radius = {\n sm: \"0.125rem\", // 2px\n md: \"0.375rem\", // 6px\n lg: \"0.5rem\", // 8px\n xl: \"0.75rem\", // 12px\n \"2xl\": \"1rem\", // 16px\n \"3xl\": \"1.5rem\", // 24px\n full: \"9999px\", // full circle\n}\n","export const shadow = {\n sm: \"0 1px 2px 0 rgb(0 0 0 / 0.05)\",\n md: \"0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1)\",\n lg: \"0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)\",\n xl: \"0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1)\",\n \"2xl\": \"0 25px 50px -12px rgb(0 0 0 / 0.25)\",\n inner: \"inset 0 2px 4px 0 rgb(0 0 0 / 0.05)\",\n}\n","export const size = {\n xs: \"0.75rem\", // Extra small\n sm: \"0.875rem\", // Small\n md: \"1rem\", // Medium\n lg: \"1.125rem\", // Large\n xl: \"1.25rem\", // Extra large\n \"2xl\": \"1.5rem\", // 2 times extra large\n \"3xl\": \"1.875rem\", // 3 times extra large\n \"4xl\": \"2.25rem\", // 4 times extra large\n \"5xl\": \"3rem\", // 5 times extra large\n \"6xl\": \"3.75rem\", // 6 times extra large\n \"7xl\": \"4.5rem\", // 7 times extra large\n \"8xl\": \"6rem\", // 8 times extra large\n \"9xl\": \"8rem\", // 9 times extra large\n\n // Fractional sizes\n \"1/12\": \"8.333333%\",\n \"2/12\": \"16.666667%\", // = 1/6\n \"3/12\": \"25%\", // = 1/4\n \"4/12\": \"33.333333%\", // = 1/3\n \"5/12\": \"41.666667%\",\n \"6/12\": \"50%\", // = 1/2\n \"7/12\": \"58.333333%\",\n \"8/12\": \"66.666667%\", // = 2/3\n \"9/12\": \"75%\", // = 3/4\n \"10/12\": \"83.333333%\", // = 5/6\n \"11/12\": \"91.666667%\",\n \"1/5\": \"20%\",\n \"2/5\": \"40%\",\n \"3/5\": \"60%\",\n \"4/5\": \"80%\",\n \"1/4\": \"25%\",\n \"3/4\": \"75%\",\n \"1/3\": \"33.333333%\",\n \"2/3\": \"66.666667%\",\n \"1/2\": \"50%\",\n full: \"100%\",\n};\n","export const space = {\n xs: \"0.125rem\", // Extra Small (2px)\n sm: \"0.25rem\", // Small (4px)\n md: \"0.5rem\", // Medium (8px)\n lg: \"0.75rem\", // Large (12px)\n xl: \"1rem\", // Extra Large (16px)\n xxl: \"1.5rem\", // 2 Extra Large (24px)\n \"3xl\": \"2rem\", // 3 Extra Large (32px)\n \"4xl\": \"2.5rem\", // 4 Extra Large (40px)\n \"5xl\": \"3rem\", // 5 Extra Large (48px)\n \"6xl\": \"3.5rem\", // 6 Extra Large (56px)\n \"7xl\": \"4rem\", // 7 Extra Large (64px)\n \"8xl\": \"4.5rem\", // 8 Extra Large (72px)\n}\n","export const style = {\n normal: \"normal\",\n italic: \"italic\",\n}\n","export const zIndex = {\n base: \"100\",\n background: \"200\",\n menu: \"300\",\n}\n"],"mappings":"AAWA,MAAMA,EAA0B,EAAE,CAElC,SAAgB,GAAiC,CAC/C,OAAO,EAAa,OAAS,EAG/B,SAAgB,GAA0B,CACxC,EAAa,KAAK,CAChB,OAAQ,EAAE,CACV,SAAU,EAAE,CACb,CAAC,CAGJ,SAAgB,EAAgB,EAAqB,CACnD,IAAM,EAAU,EAAa,KAAK,CAClC,GAAI,CAAC,EACH,MAAU,MAAM,sDAAsD,CAIxE,IAAK,IAAM,KAAM,EAAQ,OACvB,GAAI,CACF,IAAM,EAAI,EAAG,EAAK,CACd,aAAa,SACf,EAAE,MAAO,GAAQ,QAAQ,MAAM,8BAA+B,EAAI,CAAC,OAE9D,EAAK,CACZ,QAAQ,MAAM,wBAAyB,EAAI,CAI/C,GAAI,EAAQ,SAAS,OAAS,EAAG,CAC/B,IAAM,EAAS,EAAa,aACxB,EACF,EAAM,KAAK,GAAG,EAAQ,SAAS,CAE9B,EAAa,aAAe,CAAC,GAAG,EAAQ,SAAS,EAKxD,SAAgB,EAAM,EAAyB,CAC7C,IAAM,EAAU,EAAa,EAAa,OAAS,GACnD,GAAI,CAAC,EACH,MAAU,MAAM,+CAA+C,CAEjE,EAAQ,OAAO,KAAK,EAAG,CAGzB,SAAgB,EAAQ,EAA2B,CACjD,IAAM,EAAU,EAAa,EAAa,OAAS,GACnD,GAAI,CAAC,EACH,MAAU,MAAM,iDAAiD,CAEnE,EAAQ,S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,MAAO,OACP,MAAO,SACP,MAAO,OACP,MAAO,SACR,CCbY,GAAQ,CACnB,OAAQ,SACR,OAAQ,SACT,CCHY,GAAS,CACpB,KAAM,MACN,WAAY,MACZ,KAAM,MACP"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@papack/csr",
3
3
  "description": "CSR UI Dom runtime",
4
- "version": "1.0.1",
4
+ "version": "1.1.0",
5
5
  "author": "Matthias Steiner",
6
6
  "repository": "github:papack/csr",
7
7
  "homepage": "https://github.com/papack/csr",
package/readme.md CHANGED
@@ -63,8 +63,8 @@ effect(count, (value) => {
63
63
 
64
64
  Characteristics:
65
65
 
66
- - runs immediately with the current value
67
- - runs on **every** write
66
+ - NOT runs immediately on mount
67
+ - only runs on **every** write to the signal
68
68
  - only one singal, no dependency arrays
69
69
  - async callbacks are allowed (fire-and-forget)
70
70
 
@@ -94,8 +94,7 @@ unmount(() => {
94
94
  ## Example
95
95
 
96
96
  ```ts
97
- import { render, signal } from "@papack/csr";
98
- import { For } from "@papack/csr/for";
97
+ import { render, signal, for } from "@papack/csr";
99
98
 
100
99
  const [items, setItems] = signal([
101
100
  { uuid: "a", name: "A" },
@@ -150,13 +149,11 @@ type Item = {
150
149
  What `For` does:
151
150
 
152
151
  - detects:
153
-
154
152
  - additions
155
153
  - removals
156
154
  - order changes
157
155
 
158
156
  - performs:
159
-
160
157
  - DOM moves (`insertBefore`)
161
158
  - rendering only for new keys
162
159
  - `destroy()` for removed keys