UNPKG

flexium

Version:

A lightweight, signals-based UI framework with cross-platform renderers

2 lines 1.34 kB
export{b as createRoot,a as render}from'./chunk-DKSTVAO2.mjs';export{b as DOMRenderer,g as Portal,f as createReactiveRoot,c as domRenderer,d as mountReactive}from'./chunk-JV5YLJIQ.mjs';export{a as state}from'./chunk-ZK6FOZDP.mjs';export{f as Fragment,h as createTextVNode,e as h,g as isVNode}from'./chunk-H3V4FX7A.mjs';import'./chunk-C5SJBRY2.mjs';import {h,d}from'./chunk-Z7JNAX53.mjs';export{e as batch,d as effect,g as root,f as untrack}from'./chunk-Z7JNAX53.mjs';function D(t,e){o(t,e.firstChild);}function o(t,e){if(!e||!t)return null;if((typeof t=="string"||typeof t=="number")&&e.nodeType===Node.TEXT_NODE)return e.textContent!==String(t)&&(e.textContent=String(t)),e.nextSibling;if(h(t)&&e.nodeType===Node.TEXT_NODE)return d(()=>{e.textContent=String(t.value);}),e.nextSibling;if(typeof t.type=="function"){let r=t.type(t.props||{});return o(r,e)}if(typeof t.type=="string"&&e.nodeType===Node.ELEMENT_NODE&&e.tagName.toLowerCase()===t.type.toLowerCase()){let r=e;if(t.props){for(let n in t.props)if(n.startsWith("on")){let i=n.slice(2).toLowerCase();r.addEventListener(i,t.props[n]);}}let l=r.firstChild;if(t.children){let n=Array.isArray(t.children)?t.children:[t.children];for(let i of n)l=o(i,l);}return r.nextSibling}return e.nextSibling}export{D as hydrate};//# sourceMappingURL=dom.mjs.map //# sourceMappingURL=dom.mjs.map