flexium 0.16.17 → 0.16.18

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.
@@ -0,0 +1,2 @@
1
+ import {a,c}from'./chunk-FJNIW7B2.mjs';import {f}from'./chunk-TIUNOZRI.mjs';import {a as a$1}from'./chunk-RUYGSYEV.mjs';function b(t){if(!t)return {};if(typeof URLSearchParams<"u"){let e=new URLSearchParams(t),o={};return e.forEach((n,i)=>o[i]=n),o}return t.substring(1).split("&").reduce((e,o)=>{let[n,i]=o.split("=");return n&&(e[decodeURIComponent(n)]=decodeURIComponent(i||"")),e},{})}function q(t){return !!(!t||typeof t!="string"||t.length>2048||t.includes("__proto__")||t.includes("constructor")||/^\s*javascript:/i.test(t))}function v(t){let e=[];return t.forEach(o=>{if(!o)return;let{path:n,component:i,children:a,beforeEnter:l}=o.props||{},c={path:n||"/",component:i,beforeEnter:l};if(a){let h=Array.isArray(a)?a:[a];c.children=v(h);}!c.children&&o.children&&o.children.length>0&&(c.children=v(o.children)),e.push(c);}),e}function A(t,e){for(let o of t){let n=o.path,i=j(n,e);if(i)return [{route:o,params:i.params,pathname:i.path}]}return null}function j(t,e){let o=t.split("/").filter(Boolean),n=e.split("/").filter(Boolean);if(o.length!==n.length)return null;let i={};for(let a=0;a<o.length;a++){let l=o[a],c=n[a];if(l.startsWith(":")){let h=l.slice(1);i[h]=c;}else if(l!==c)return null}return {params:i,path:e}}var k=new f(null),d=new f(0),_=()=>({pathname:"/",search:"",hash:"",query:{}}),N=()=>{if(typeof window>"u")return _();let t=window.location.pathname;return (!t||t==="srcdoc"||t==="/srcdoc")&&(t="/"),{pathname:t,search:window.location.search,hash:window.location.hash,query:b(window.location.search)}},s=null,p=null,S=false;function I(){if(s){let t=N();s.pathname=t.pathname,s.search=t.search,s.hash=t.hash,s.query=t.query;}else s=null,p=null;}function g(){if(s&&p)return [s,p];s=a(N());let t=e=>{s&&(s.pathname=e.pathname,s.search=e.search,s.hash=e.hash,s.query=e.query);};return p=e=>{if(console.log("[Router] Navigate called:",e,"globalLocation:",s),typeof window>"u")return;if(q(e)){console.error("[Flexium Router] Blocked navigation to unsafe path:",e);return}try{window.history.pushState({},"",e);}catch{}let o={pathname:e.split("?")[0].split("#")[0],search:e.includes("?")?"?"+e.split("?")[1].split("#")[0]:"",hash:e.includes("#")?"#"+e.split("#")[1]:"",query:b(e.includes("?")?"?"+e.split("?")[1].split("#")[0]:"")};console.log("[Router] Updating location to:",o),t(o),console.log("[Router] After update, globalLocation:",s);},typeof window<"u"&&!S&&(window.addEventListener("popstate",()=>{t(N());}),S=true),[s,p]}function C(){let[t]=c(k);if(!t)throw new Error("useRouter() must be called within a <Routes> component");return t}function Q(){let[,t]=g();return t}function D(){return p||g(),p}function B(){return C().params}function M(){let[t]=g();return t.query}function m(t){return null}function R(t){return t&&typeof t=="object"&&("type"in t||Array.isArray(t))}function O(t){let[e,o]=g(),n=Array.isArray(t.children)?t.children:[t.children],i=n.filter(r=>R(r)&&r.type===m),a=n.findIndex(r=>R(r)&&r.type===m),l=[],c=[];a===-1?l=n.filter(r=>!R(r)||r.type!==m):(l=n.slice(0,a).filter(r=>!R(r)||r.type!==m),c=n.slice(a).filter(r=>!R(r)||r.type!==m));let h=v(i),L=e.pathname;console.log("[Routes] currentPath:",L,"routeDefinitions:",h);let f=A(h,L)||[];console.log("[Routes] matches:",f);let U=f.length>0?f[f.length-1].params:{},T={location:e,navigate:o,matches:f,params:U},w=null;if(f.length>0){let r=f[0],E=r.route.component,x=L;r.route.beforeEnter?r.route.beforeEnter(r.params)!==false&&(w=a$1(d.Provider,{value:1,key:x,children:a$1(E,{params:r.params,key:x})})):w=a$1(d.Provider,{value:1,key:x,children:a$1(E,{params:r.params,key:x})});}return a$1(k.Provider,{value:T,children:[...l,w,...c]})}function K(){let t=C(),[e]=c(d),o=e??0,[n]=c(()=>t.matches);if(o>=n.length)return null;let i=n[o],a=i.route.component;return i.route.beforeEnter&&i.route.beforeEnter(i.params)===false?null:a$1(d.Provider,{value:o+1,children:a$1(a,{params:i.params})})}function V(t){return a$1("a",{href:t.to,class:t.class||t.className,style:t.style?t.style+"; cursor: pointer;":"cursor: pointer;",onclick:e=>{console.log("Link clicked:",t.to),e.preventDefault(),D()(t.to);},children:t.children})}export{I as a,g as b,C as c,Q as d,D as e,B as f,M as g,m as h,O as i,K as j,V as k};//# sourceMappingURL=chunk-2OBMCCAZ.mjs.map
2
+ //# sourceMappingURL=chunk-2OBMCCAZ.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/router/utils.ts","../src/router/router.ts","../src/router/dom/Route.tsx","../src/router/dom/Routes.tsx","../src/router/dom/Outlet.tsx","../src/router/dom/Link.tsx"],"names":["parseQuery","search","params","result","value","key","accumulator","part","isUnsafePath","path","createRoutesFromChildren","children","routes","child","component","subChildren","beforeEnter","route","nestedChildren","matchRoutes","locationPathname","routePath","matchResult","matchPath","locationPath","routeSegments","locationSegments","i","routeSegment","locationSegment","RouterCtx","Context","RouteDepthCtx","getDefaultLocation","getCurrentLocation","pathname","globalLocation","globalNavigate","popstateListenerAttached","resetRouter","initial","useLocation","reactive","updateLocation","newLocation","useRouter","routerContext","use","useNavigate","navigate","getNavigate","useParams","useQuery","location","Route","_props","isFNode","node","Routes","props","currentLocation","childrenList","routeNodes","firstRouteIndex","beforeRouteChildren","afterRouteChildren","routeDefinitions","currentPath","matches","matchedContent","rootMatch","Component","routeKey","jsx","Outlet","depthValue","depth","match","Link","event"],"mappings":"wHAGA,SAASA,CAAAA,CAAWC,CAAAA,CAAwC,CAC1D,GAAI,CAACA,CAAAA,CAAQ,OAAO,EAAC,CACrB,GAAI,OAAO,eAAA,CAAoB,GAAA,CAAa,CAC1C,IAAMC,CAAAA,CAAS,IAAI,eAAA,CAAgBD,CAAM,CAAA,CACnCE,CAAAA,CAAiC,EAAC,CACxC,OAAAD,CAAAA,CAAO,OAAA,CAAQ,CAACE,CAAAA,CAAOC,CAAAA,GAAQF,CAAAA,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,IAAA,CAEpC,IAAMS,CAAAA,CAAQT,CAAAA,CAAQQ,CAAK,CAAA,CACrBL,CAAAA,CAAYM,CAAAA,CAAM,KAAA,CAAM,SAAA,CAG9B,OAAIA,CAAAA,CAAM,KAAA,CAAM,WAAA,EACRA,CAAAA,CAAM,KAAA,CAAM,WAAA,CAAYA,CAAAA,CAAM,MAAM,CAAA,GAAM,MAAc,IAAA,CAIzDJ,GAAAA,CAAEzC,CAAAA,CAAc,QAAA,CAAU,CAC7B,KAAA,CAAO4C,CAAAA,CAAQ,CAAA,CACf,QAAA,CAAUH,GAAAA,CAAEF,CAAAA,CAAW,CAAE,MAAA,CAAQM,CAAAA,CAAM,MAAO,CAAC,CACnD,CAAC,CACL,CCnBO,SAASC,CAAAA,CAAKnB,CAAAA,CAAkB,CACnC,OAAOc,GAAAA,CAAE,GAAA,CAAK,CACV,IAAA,CAAMd,CAAAA,CAAM,EAAA,CACZ,KAAA,CAAOA,CAAAA,CAAM,KAAA,EAASA,CAAAA,CAAM,SAAA,CAC5B,KAAA,CAAOA,CAAAA,CAAM,KAAA,CAAQA,CAAAA,CAAM,KAAA,CAAQ,oBAAA,CAAuB,kBAAA,CAC1D,OAAA,CAAUoB,CAAAA,EAAiB,CACvB,OAAA,CAAQ,GAAA,CAAI,eAAA,CAAiBpB,CAAAA,CAAM,EAAE,CAAA,CACrCoB,CAAAA,CAAM,cAAA,EAAe,CAErB7B,CAAAA,EAAY,CAAES,CAAAA,CAAM,EAAE,EAC1B,CAAA,CACA,QAAA,CAAUA,CAAAA,CAAM,QACpB,CAAC,CACL","file":"chunk-2OBMCCAZ.mjs","sourcesContent":["import { RouteDefinition, RouteMatch } from './types'\n\n// Simple query parser (native URLSearchParams fallback) - internal use only\nfunction parseQuery(search: string): Record<string, string> {\n if (!search) return {}\n if (typeof URLSearchParams !== 'undefined') {\n const params = new URLSearchParams(search)\n const result: Record<string, string> = {}\n params.forEach((value, key) => result[key] = value)\n return result\n }\n return search\n .substring(1)\n .split('&')\n .reduce((accumulator, part) => {\n const [key, value] = part.split('=')\n if (key) accumulator[decodeURIComponent(key)] = decodeURIComponent(value || '')\n return accumulator\n }, {} as Record<string, string>)\n}\n\nfunction isUnsafePath(path: string): boolean {\n // Handle undefined or null path\n if (!path || typeof path !== 'string') return true\n // Prevent prototype pollution or massive strings\n if (path.length > 2048) return true\n if (path.includes('__proto__') || path.includes('constructor')) return true\n // Basic XSS check for javascript: protocol\n if (/^\\s*javascript:/i.test(path)) return true\n return false\n}\n\n// Convert children FNodes to RouteDefinitions - internal use only\nfunction createRoutesFromChildren(children: any[]): RouteDefinition[] {\n const routes: RouteDefinition[] = []\n\n children.forEach(child => {\n if (!child) return\n\n // Assuming child is an FNode-like object (config)\n // In Flexium, Route component returns null, but 'createNode' isn't called here.\n // We are traversing the props passed to Router.\n\n const { path, component, children: subChildren, beforeEnter } = child.props || {}\n\n const route: RouteDefinition = {\n path: path || '/',\n component: component,\n beforeEnter\n }\n\n if (subChildren) {\n // If subChildren is array\n const nestedChildren = Array.isArray(subChildren) ? subChildren : [subChildren]\n // We expect the children of a Route to be other Routes\n // However, the 'children' prop in JSX might be the Route components themselves.\n route.children = createRoutesFromChildren(nestedChildren)\n }\n\n // Also check child.children if props.children is empty (direct FNode structure)\n if (!route.children && child.children && child.children.length > 0) {\n route.children = createRoutesFromChildren(child.children)\n }\n\n routes.push(route)\n })\n return routes\n}\n\n// Simple Matcher - internal use only\nfunction matchRoutes(routes: RouteDefinition[], locationPathname: string): RouteMatch[] | null {\n // We want to find the best matching branch\n\n for (const route of routes) {\n // 1. Match current segment\n // Simple exact match or parameter match logic needed?\n // Let's implement simple param matching: /user/:id\n\n const routePath = route.path\n\n const matchResult = matchPath(routePath, locationPathname)\n if (matchResult) {\n return [{ route, params: matchResult.params, pathname: matchResult.path }]\n }\n }\n return null\n}\n\nfunction matchPath(routePath: string, locationPath: string) {\n // 1. Split into segments\n const routeSegments = routePath.split('/').filter(Boolean)\n const locationSegments = locationPath.split('/').filter(Boolean)\n\n if (routeSegments.length !== locationSegments.length) return null\n\n const params: Record<string, string> = {}\n\n for (let i = 0; i < routeSegments.length; i++) {\n const routeSegment = routeSegments[i]\n const locationSegment = locationSegments[i]\n\n if (routeSegment.startsWith(':')) {\n const key = routeSegment.slice(1)\n params[key] = locationSegment\n } else if (routeSegment !== locationSegment) {\n return null\n }\n }\n\n return { params, path: locationPath }\n}\n\n// Export only what's needed by other router files\nexport { parseQuery, isUnsafePath, createRoutesFromChildren, matchRoutes }\n","import { reactive } from '../core/reactive'\nimport { Context } from '../core/context'\nimport { use } from '../core/use'\nimport type { Location, RouterContext } from './types'\nimport { parseQuery, isUnsafePath } from './utils'\n\n// Contexts\nexport const RouterCtx = new Context<RouterContext>(null as any)\nexport const RouteDepthCtx = new Context<number>(0)\n\n// Helper functions\nconst getDefaultLocation = (): Location => ({\n pathname: '/',\n search: '',\n hash: '',\n query: {},\n})\n\nconst getCurrentLocation = (): Location => {\n if (typeof window === 'undefined') {\n return getDefaultLocation()\n }\n\n // Handle srcdoc iframe - pathname may be empty or 'srcdoc'\n let pathname = window.location.pathname\n if (!pathname || pathname === 'srcdoc' || pathname === '/srcdoc') {\n pathname = '/'\n }\n\n return {\n pathname,\n search: window.location.search,\n hash: window.location.hash,\n query: parseQuery(window.location.search),\n }\n}\n\n// Global singleton location state\nlet globalLocation: Location | null = null\nlet globalNavigate: ((path: string) => void) | null = null\nlet popstateListenerAttached = false\n\n// Reset router state - used when app is re-rendered (e.g., srcdoc iframe update)\nexport function resetRouter(): void {\n // Reset the location to initial state, but keep the reactive object\n // This ensures existing subscriptions (like Routes) still work\n if (globalLocation) {\n const initial = getCurrentLocation()\n globalLocation.pathname = initial.pathname\n globalLocation.search = initial.search\n globalLocation.hash = initial.hash\n globalLocation.query = initial.query\n } else {\n // First time - will be initialized on first useLocation() call\n globalLocation = null\n globalNavigate = null\n }\n // Note: we don't reset popstateListenerAttached since the listener persists\n}\n\n// Create location state and navigation (singleton pattern)\nexport function useLocation(): [Location, (path: string) => void] {\n // Return existing singleton if already created\n if (globalLocation && globalNavigate) {\n return [globalLocation, globalNavigate]\n }\n\n // Create a reactive location object (only once)\n globalLocation = reactive<Location>(getCurrentLocation())\n\n const updateLocation = (newLocation: Location) => {\n if (!globalLocation) return\n globalLocation.pathname = newLocation.pathname\n globalLocation.search = newLocation.search\n globalLocation.hash = newLocation.hash\n globalLocation.query = newLocation.query\n }\n\n globalNavigate = (path: string) => {\n console.log('[Router] Navigate called:', path, 'globalLocation:', globalLocation)\n if (typeof window === 'undefined') return\n if (isUnsafePath(path)) {\n console.error('[Flexium Router] Blocked navigation to unsafe path:', path)\n return\n }\n\n // Try to update browser history, but continue even if it fails (e.g., in srcdoc iframe)\n try {\n window.history.pushState({}, '', path)\n } catch {\n // SecurityError in srcdoc iframe - ignore but continue with internal state update\n }\n\n // Always update internal location state for SPA navigation\n const newLocation = {\n pathname: path.split('?')[0].split('#')[0],\n search: path.includes('?') ? '?' + path.split('?')[1].split('#')[0] : '',\n hash: path.includes('#') ? '#' + path.split('#')[1] : '',\n query: parseQuery(path.includes('?') ? '?' + path.split('?')[1].split('#')[0] : '')\n }\n console.log('[Router] Updating location to:', newLocation)\n updateLocation(newLocation)\n console.log('[Router] After update, globalLocation:', globalLocation)\n }\n\n // Listen to popstate (only once)\n if (typeof window !== 'undefined' && !popstateListenerAttached) {\n window.addEventListener('popstate', () => {\n updateLocation(getCurrentLocation())\n })\n popstateListenerAttached = true\n }\n\n return [globalLocation, globalNavigate]\n}\n\n// Router hook - returns full router context\nexport function useRouter(): RouterContext {\n const [routerContext] = use(RouterCtx)\n if (!routerContext) {\n throw new Error('useRouter() must be called within a <Routes> component')\n }\n return routerContext\n}\n\n// Navigate hook - returns navigate function\nexport function useNavigate(): (path: string) => void {\n const [, navigate] = useLocation()\n return navigate\n}\n\n// Get navigate function directly (for use in event handlers to avoid stale closures)\nexport function getNavigate(): (path: string) => void {\n if (!globalNavigate) {\n useLocation() // Initialize if needed\n }\n return globalNavigate!\n}\n\n// Params hook - returns route params\nexport function useParams<T extends Record<string, string> = Record<string, string>>(): T {\n const router = useRouter()\n return router.params as T\n}\n\n// Query hook - returns query params\nexport function useQuery<T extends Record<string, string> = Record<string, string>>(): T {\n const [location] = useLocation()\n return location.query as T\n}\n","import type { RouteProps } from '../types'\n\nexport function Route(_props: RouteProps) {\n return null\n}\n","import { jsx as f } from '../../jsx-runtime'\nimport type { FNode, FNodeChild } from '../../dom/types'\nimport { RouterCtx, RouteDepthCtx, useLocation } from '../router'\nimport { createRoutesFromChildren, matchRoutes } from '../utils'\nimport { Route } from './Route'\n\nfunction isFNode(node: any): node is FNode {\n return node && typeof node === 'object' && ('type' in node || Array.isArray(node))\n}\n\nexport function Routes(props: { children: FNodeChild }) {\n const [currentLocation, navigate] = useLocation()\n\n // Parse children to find <Route> definitions and other content\n let childrenList: any[] = Array.isArray(props.children) ? props.children : [props.children]\n\n // Find routes for matching (but keep order with other children)\n const routeNodes = childrenList.filter(child => isFNode(child) && child.type === Route)\n // Track first Route index to insert matched content there\n const firstRouteIndex = childrenList.findIndex(child => isFNode(child) && child.type === Route)\n\n // Other children (non-Route) keep their positions relative to routes\n let beforeRouteChildren: any[] = []\n let afterRouteChildren: any[] = []\n\n if (firstRouteIndex === -1) {\n // No Route children - all are \"other\" children\n beforeRouteChildren = childrenList.filter(child => !isFNode(child) || child.type !== Route)\n } else {\n // Split at first Route position\n beforeRouteChildren = childrenList.slice(0, firstRouteIndex).filter(child => !isFNode(child) || child.type !== Route)\n afterRouteChildren = childrenList.slice(firstRouteIndex).filter(child => !isFNode(child) || child.type !== Route)\n }\n\n // Create route definitions\n const routeDefinitions = createRoutesFromChildren(routeNodes)\n\n // DIRECT access to currentLocation.pathname\n // This should trigger reactive tracking in the component's effect context\n const currentPath = currentLocation.pathname\n console.log('[Routes] currentPath:', currentPath, 'routeDefinitions:', routeDefinitions)\n const matches = matchRoutes(routeDefinitions, currentPath) || []\n console.log('[Routes] matches:', matches)\n const params = matches.length > 0 ? matches[matches.length - 1].params : {}\n\n const routerContext = {\n location: currentLocation,\n navigate,\n matches: matches,\n params: params\n }\n\n // Render matched component\n let matchedContent: FNodeChild = null\n\n if (matches.length > 0) {\n const rootMatch = matches[0]\n const Component = rootMatch.route.component\n\n // Use pathname as key to force re-mount on route change\n const routeKey = currentPath\n\n // Guard Check\n if (rootMatch.route.beforeEnter) {\n const result = rootMatch.route.beforeEnter(rootMatch.params)\n if (result !== false) {\n matchedContent = f(RouteDepthCtx.Provider, {\n value: 1,\n key: routeKey,\n children: f(Component, { params: rootMatch.params, key: routeKey })\n })\n }\n } else {\n matchedContent = f(RouteDepthCtx.Provider, {\n value: 1,\n key: routeKey,\n children: f(Component, { params: rootMatch.params, key: routeKey })\n })\n }\n }\n\n return f(RouterCtx.Provider, {\n value: routerContext,\n children: [...beforeRouteChildren, matchedContent, ...afterRouteChildren]\n })\n}\n","import { use } from '../../core/use'\nimport { jsx as f } from '../../jsx-runtime'\nimport { RouteDepthCtx, useRouter } from '../router'\n\nexport function Outlet() {\n const routerContext = useRouter()\n const [depthValue] = use(RouteDepthCtx)\n const depth = depthValue ?? 0\n\n const [matches] = use(() => routerContext.matches)\n\n if (depth >= matches.length) return null\n\n const match = matches[depth]\n const Component = match.route.component\n\n // Guard\n if (match.route.beforeEnter) {\n if (match.route.beforeEnter(match.params) === false) return null\n }\n\n // Render next level\n return f(RouteDepthCtx.Provider, {\n value: depth + 1,\n children: f(Component, { params: match.params })\n })\n}\n","import { jsx as f } from '../../jsx-runtime'\nimport type { LinkProps } from '../types'\n\n// Import the navigate function getter, not the function itself\n// This ensures we always use the current navigate implementation\nimport { getNavigate } from '../router'\n\nexport function Link(props: LinkProps) {\n return f('a', {\n href: props.to,\n class: props.class || props.className,\n style: props.style ? props.style + '; cursor: pointer;' : 'cursor: pointer;',\n onclick: (event: Event) => {\n console.log('Link clicked:', props.to)\n event.preventDefault()\n // Get current navigate function at click time\n getNavigate()(props.to)\n },\n children: props.children\n })\n}\n"]}
@@ -0,0 +1,2 @@
1
+ 'use strict';var chunkBP5PDE6F_js=require('./chunk-BP5PDE6F.js'),chunkOU6XJZ76_js=require('./chunk-OU6XJZ76.js'),chunkTFXBDC6C_js=require('./chunk-TFXBDC6C.js');function b(t){if(!t)return {};if(typeof URLSearchParams<"u"){let e=new URLSearchParams(t),o={};return e.forEach((n,i)=>o[i]=n),o}return t.substring(1).split("&").reduce((e,o)=>{let[n,i]=o.split("=");return n&&(e[decodeURIComponent(n)]=decodeURIComponent(i||"")),e},{})}function q(t){return !!(!t||typeof t!="string"||t.length>2048||t.includes("__proto__")||t.includes("constructor")||/^\s*javascript:/i.test(t))}function v(t){let e=[];return t.forEach(o=>{if(!o)return;let{path:n,component:i,children:a,beforeEnter:l}=o.props||{},c={path:n||"/",component:i,beforeEnter:l};if(a){let h=Array.isArray(a)?a:[a];c.children=v(h);}!c.children&&o.children&&o.children.length>0&&(c.children=v(o.children)),e.push(c);}),e}function A(t,e){for(let o of t){let n=o.path,i=j(n,e);if(i)return [{route:o,params:i.params,pathname:i.path}]}return null}function j(t,e){let o=t.split("/").filter(Boolean),n=e.split("/").filter(Boolean);if(o.length!==n.length)return null;let i={};for(let a=0;a<o.length;a++){let l=o[a],c=n[a];if(l.startsWith(":")){let h=l.slice(1);i[h]=c;}else if(l!==c)return null}return {params:i,path:e}}var k=new chunkOU6XJZ76_js.f(null),d=new chunkOU6XJZ76_js.f(0),_=()=>({pathname:"/",search:"",hash:"",query:{}}),N=()=>{if(typeof window>"u")return _();let t=window.location.pathname;return (!t||t==="srcdoc"||t==="/srcdoc")&&(t="/"),{pathname:t,search:window.location.search,hash:window.location.hash,query:b(window.location.search)}},s=null,p=null,S=false;function I(){if(s){let t=N();s.pathname=t.pathname,s.search=t.search,s.hash=t.hash,s.query=t.query;}else s=null,p=null;}function g(){if(s&&p)return [s,p];s=chunkBP5PDE6F_js.a(N());let t=e=>{s&&(s.pathname=e.pathname,s.search=e.search,s.hash=e.hash,s.query=e.query);};return p=e=>{if(console.log("[Router] Navigate called:",e,"globalLocation:",s),typeof window>"u")return;if(q(e)){console.error("[Flexium Router] Blocked navigation to unsafe path:",e);return}try{window.history.pushState({},"",e);}catch{}let o={pathname:e.split("?")[0].split("#")[0],search:e.includes("?")?"?"+e.split("?")[1].split("#")[0]:"",hash:e.includes("#")?"#"+e.split("#")[1]:"",query:b(e.includes("?")?"?"+e.split("?")[1].split("#")[0]:"")};console.log("[Router] Updating location to:",o),t(o),console.log("[Router] After update, globalLocation:",s);},typeof window<"u"&&!S&&(window.addEventListener("popstate",()=>{t(N());}),S=true),[s,p]}function C(){let[t]=chunkBP5PDE6F_js.c(k);if(!t)throw new Error("useRouter() must be called within a <Routes> component");return t}function Q(){let[,t]=g();return t}function D(){return p||g(),p}function B(){return C().params}function M(){let[t]=g();return t.query}function m(t){return null}function R(t){return t&&typeof t=="object"&&("type"in t||Array.isArray(t))}function O(t){let[e,o]=g(),n=Array.isArray(t.children)?t.children:[t.children],i=n.filter(r=>R(r)&&r.type===m),a=n.findIndex(r=>R(r)&&r.type===m),l=[],c=[];a===-1?l=n.filter(r=>!R(r)||r.type!==m):(l=n.slice(0,a).filter(r=>!R(r)||r.type!==m),c=n.slice(a).filter(r=>!R(r)||r.type!==m));let h=v(i),L=e.pathname;console.log("[Routes] currentPath:",L,"routeDefinitions:",h);let f=A(h,L)||[];console.log("[Routes] matches:",f);let U=f.length>0?f[f.length-1].params:{},T={location:e,navigate:o,matches:f,params:U},w=null;if(f.length>0){let r=f[0],E=r.route.component,x=L;r.route.beforeEnter?r.route.beforeEnter(r.params)!==false&&(w=chunkTFXBDC6C_js.a(d.Provider,{value:1,key:x,children:chunkTFXBDC6C_js.a(E,{params:r.params,key:x})})):w=chunkTFXBDC6C_js.a(d.Provider,{value:1,key:x,children:chunkTFXBDC6C_js.a(E,{params:r.params,key:x})});}return chunkTFXBDC6C_js.a(k.Provider,{value:T,children:[...l,w,...c]})}function K(){let t=C(),[e]=chunkBP5PDE6F_js.c(d),o=e??0,[n]=chunkBP5PDE6F_js.c(()=>t.matches);if(o>=n.length)return null;let i=n[o],a=i.route.component;return i.route.beforeEnter&&i.route.beforeEnter(i.params)===false?null:chunkTFXBDC6C_js.a(d.Provider,{value:o+1,children:chunkTFXBDC6C_js.a(a,{params:i.params})})}function V(t){return chunkTFXBDC6C_js.a("a",{href:t.to,class:t.class||t.className,style:t.style?t.style+"; cursor: pointer;":"cursor: pointer;",onclick:e=>{console.log("Link clicked:",t.to),e.preventDefault(),D()(t.to);},children:t.children})}exports.a=I;exports.b=g;exports.c=C;exports.d=Q;exports.e=D;exports.f=B;exports.g=M;exports.h=m;exports.i=O;exports.j=K;exports.k=V;//# sourceMappingURL=chunk-FPEJ43DE.js.map
2
+ //# sourceMappingURL=chunk-FPEJ43DE.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/router/utils.ts","../src/router/router.ts","../src/router/dom/Route.tsx","../src/router/dom/Routes.tsx","../src/router/dom/Outlet.tsx","../src/router/dom/Link.tsx"],"names":["parseQuery","search","params","result","value","key","accumulator","part","isUnsafePath","path","createRoutesFromChildren","children","routes","child","component","subChildren","beforeEnter","route","nestedChildren","matchRoutes","locationPathname","routePath","matchResult","matchPath","locationPath","routeSegments","locationSegments","i","routeSegment","locationSegment","RouterCtx","Context","RouteDepthCtx","getDefaultLocation","getCurrentLocation","pathname","globalLocation","globalNavigate","popstateListenerAttached","resetRouter","initial","useLocation","reactive","updateLocation","newLocation","useRouter","routerContext","use","useNavigate","navigate","getNavigate","useParams","useQuery","location","Route","_props","isFNode","node","Routes","props","currentLocation","childrenList","routeNodes","firstRouteIndex","beforeRouteChildren","afterRouteChildren","routeDefinitions","currentPath","matches","matchedContent","rootMatch","Component","routeKey","jsx","Outlet","depthValue","depth","match","Link","event"],"mappings":"iKAGA,SAASA,CAAAA,CAAWC,CAAAA,CAAwC,CAC1D,GAAI,CAACA,CAAAA,CAAQ,OAAO,EAAC,CACrB,GAAI,OAAO,eAAA,CAAoB,GAAA,C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Simple query parser (native URLSearchParams fallback) - internal use only\nfunction parseQuery(search: string): Record<string, string> {\n if (!search) return {}\n if (typeof URLSearchParams !== 'undefined') {\n const params = new URLSearchParams(search)\n const result: Record<string, string> = {}\n params.forEach((value, key) => result[key] = value)\n return result\n }\n return search\n .substring(1)\n .split('&')\n .reduce((accumulator, part) => {\n const [key, value] = part.split('=')\n if (key) accumulator[decodeURIComponent(key)] = decodeURIComponent(value || '')\n return accumulator\n }, {} as Record<string, string>)\n}\n\nfunction isUnsafePath(path: string): boolean {\n // Handle undefined or null path\n if (!path || typeof path !== 'string') return true\n // Prevent prototype pollution or massive strings\n if (path.length > 2048) return true\n if (path.includes('__proto__') || path.includes('constructor')) return true\n // Basic XSS check for javascript: protocol\n if (/^\\s*javascript:/i.test(path)) return true\n return false\n}\n\n// Convert children FNodes to RouteDefinitions - internal use only\nfunction createRoutesFromChildren(children: any[]): RouteDefinition[] {\n const routes: RouteDefinition[] = []\n\n children.forEach(child => {\n if (!child) return\n\n // Assuming child is an FNode-like object (config)\n // In Flexium, Route component returns null, but 'createNode' isn't called here.\n // We are traversing the props passed to Router.\n\n const { path, component, children: subChildren, beforeEnter } = child.props || {}\n\n const route: RouteDefinition = {\n path: path || '/',\n component: component,\n beforeEnter\n }\n\n if (subChildren) {\n // If subChildren is array\n const nestedChildren = Array.isArray(subChildren) ? subChildren : [subChildren]\n // We expect the children of a Route to be other Routes\n // However, the 'children' prop in JSX might be the Route components themselves.\n route.children = createRoutesFromChildren(nestedChildren)\n }\n\n // Also check child.children if props.children is empty (direct FNode structure)\n if (!route.children && child.children && child.children.length > 0) {\n route.children = createRoutesFromChildren(child.children)\n }\n\n routes.push(route)\n })\n return routes\n}\n\n// Simple Matcher - internal use only\nfunction matchRoutes(routes: RouteDefinition[], locationPathname: string): RouteMatch[] | null {\n // We want to find the best matching branch\n\n for (const route of routes) {\n // 1. Match current segment\n // Simple exact match or parameter match logic needed?\n // Let's implement simple param matching: /user/:id\n\n const routePath = route.path\n\n const matchResult = matchPath(routePath, locationPathname)\n if (matchResult) {\n return [{ route, params: matchResult.params, pathname: matchResult.path }]\n }\n }\n return null\n}\n\nfunction matchPath(routePath: string, locationPath: string) {\n // 1. Split into segments\n const routeSegments = routePath.split('/').filter(Boolean)\n const locationSegments = locationPath.split('/').filter(Boolean)\n\n if (routeSegments.length !== locationSegments.length) return null\n\n const params: Record<string, string> = {}\n\n for (let i = 0; i < routeSegments.length; i++) {\n const routeSegment = routeSegments[i]\n const locationSegment = locationSegments[i]\n\n if (routeSegment.startsWith(':')) {\n const key = routeSegment.slice(1)\n params[key] = locationSegment\n } else if (routeSegment !== locationSegment) {\n return null\n }\n }\n\n return { params, path: locationPath }\n}\n\n// Export only what's needed by other router files\nexport { parseQuery, isUnsafePath, createRoutesFromChildren, matchRoutes }\n","import { reactive } from '../core/reactive'\nimport { Context } from '../core/context'\nimport { use } from '../core/use'\nimport type { Location, RouterContext } from './types'\nimport { parseQuery, isUnsafePath } from './utils'\n\n// Contexts\nexport const RouterCtx = new Context<RouterContext>(null as any)\nexport const RouteDepthCtx = new Context<number>(0)\n\n// Helper functions\nconst getDefaultLocation = (): Location => ({\n pathname: '/',\n search: '',\n hash: '',\n query: {},\n})\n\nconst getCurrentLocation = (): Location => {\n if (typeof window === 'undefined') {\n return getDefaultLocation()\n }\n\n // Handle srcdoc iframe - pathname may be empty or 'srcdoc'\n let pathname = window.location.pathname\n if (!pathname || pathname === 'srcdoc' || pathname === '/srcdoc') {\n pathname = '/'\n }\n\n return {\n pathname,\n search: window.location.search,\n hash: window.location.hash,\n query: parseQuery(window.location.search),\n }\n}\n\n// Global singleton location state\nlet globalLocation: Location | null = null\nlet globalNavigate: ((path: string) => void) | null = null\nlet popstateListenerAttached = false\n\n// Reset router state - used when app is re-rendered (e.g., srcdoc iframe update)\nexport function resetRouter(): void {\n // Reset the location to initial state, but keep the reactive object\n // This ensures existing subscriptions (like Routes) still work\n if (globalLocation) {\n const initial = getCurrentLocation()\n globalLocation.pathname = initial.pathname\n globalLocation.search = initial.search\n globalLocation.hash = initial.hash\n globalLocation.query = initial.query\n } else {\n // First time - will be initialized on first useLocation() call\n globalLocation = null\n globalNavigate = null\n }\n // Note: we don't reset popstateListenerAttached since the listener persists\n}\n\n// Create location state and navigation (singleton pattern)\nexport function useLocation(): [Location, (path: string) => void] {\n // Return existing singleton if already created\n if (globalLocation && globalNavigate) {\n return [globalLocation, globalNavigate]\n }\n\n // Create a reactive location object (only once)\n globalLocation = reactive<Location>(getCurrentLocation())\n\n const updateLocation = (newLocation: Location) => {\n if (!globalLocation) return\n globalLocation.pathname = newLocation.pathname\n globalLocation.search = newLocation.search\n globalLocation.hash = newLocation.hash\n globalLocation.query = newLocation.query\n }\n\n globalNavigate = (path: string) => {\n console.log('[Router] Navigate called:', path, 'globalLocation:', globalLocation)\n if (typeof window === 'undefined') return\n if (isUnsafePath(path)) {\n console.error('[Flexium Router] Blocked navigation to unsafe path:', path)\n return\n }\n\n // Try to update browser history, but continue even if it fails (e.g., in srcdoc iframe)\n try {\n window.history.pushState({}, '', path)\n } catch {\n // SecurityError in srcdoc iframe - ignore but continue with internal state update\n }\n\n // Always update internal location state for SPA navigation\n const newLocation = {\n pathname: path.split('?')[0].split('#')[0],\n search: path.includes('?') ? '?' + path.split('?')[1].split('#')[0] : '',\n hash: path.includes('#') ? '#' + path.split('#')[1] : '',\n query: parseQuery(path.includes('?') ? '?' + path.split('?')[1].split('#')[0] : '')\n }\n console.log('[Router] Updating location to:', newLocation)\n updateLocation(newLocation)\n console.log('[Router] After update, globalLocation:', globalLocation)\n }\n\n // Listen to popstate (only once)\n if (typeof window !== 'undefined' && !popstateListenerAttached) {\n window.addEventListener('popstate', () => {\n updateLocation(getCurrentLocation())\n })\n popstateListenerAttached = true\n }\n\n return [globalLocation, globalNavigate]\n}\n\n// Router hook - returns full router context\nexport function useRouter(): RouterContext {\n const [routerContext] = use(RouterCtx)\n if (!routerContext) {\n throw new Error('useRouter() must be called within a <Routes> component')\n }\n return routerContext\n}\n\n// Navigate hook - returns navigate function\nexport function useNavigate(): (path: string) => void {\n const [, navigate] = useLocation()\n return navigate\n}\n\n// Get navigate function directly (for use in event handlers to avoid stale closures)\nexport function getNavigate(): (path: string) => void {\n if (!globalNavigate) {\n useLocation() // Initialize if needed\n }\n return globalNavigate!\n}\n\n// Params hook - returns route params\nexport function useParams<T extends Record<string, string> = Record<string, string>>(): T {\n const router = useRouter()\n return router.params as T\n}\n\n// Query hook - returns query params\nexport function useQuery<T extends Record<string, string> = Record<string, string>>(): T {\n const [location] = useLocation()\n return location.query as T\n}\n","import type { RouteProps } from '../types'\n\nexport function Route(_props: RouteProps) {\n return null\n}\n","import { jsx as f } from '../../jsx-runtime'\nimport type { FNode, FNodeChild } from '../../dom/types'\nimport { RouterCtx, RouteDepthCtx, useLocation } from '../router'\nimport { createRoutesFromChildren, matchRoutes } from '../utils'\nimport { Route } from './Route'\n\nfunction isFNode(node: any): node is FNode {\n return node && typeof node === 'object' && ('type' in node || Array.isArray(node))\n}\n\nexport function Routes(props: { children: FNodeChild }) {\n const [currentLocation, navigate] = useLocation()\n\n // Parse children to find <Route> definitions and other content\n let childrenList: any[] = Array.isArray(props.children) ? props.children : [props.children]\n\n // Find routes for matching (but keep order with other children)\n const routeNodes = childrenList.filter(child => isFNode(child) && child.type === Route)\n // Track first Route index to insert matched content there\n const firstRouteIndex = childrenList.findIndex(child => isFNode(child) && child.type === Route)\n\n // Other children (non-Route) keep their positions relative to routes\n let beforeRouteChildren: any[] = []\n let afterRouteChildren: any[] = []\n\n if (firstRouteIndex === -1) {\n // No Route children - all are \"other\" children\n beforeRouteChildren = childrenList.filter(child => !isFNode(child) || child.type !== Route)\n } else {\n // Split at first Route position\n beforeRouteChildren = childrenList.slice(0, firstRouteIndex).filter(child => !isFNode(child) || child.type !== Route)\n afterRouteChildren = childrenList.slice(firstRouteIndex).filter(child => !isFNode(child) || child.type !== Route)\n }\n\n // Create route definitions\n const routeDefinitions = createRoutesFromChildren(routeNodes)\n\n // DIRECT access to currentLocation.pathname\n // This should trigger reactive tracking in the component's effect context\n const currentPath = currentLocation.pathname\n console.log('[Routes] currentPath:', currentPath, 'routeDefinitions:', routeDefinitions)\n const matches = matchRoutes(routeDefinitions, currentPath) || []\n console.log('[Routes] matches:', matches)\n const params = matches.length > 0 ? matches[matches.length - 1].params : {}\n\n const routerContext = {\n location: currentLocation,\n navigate,\n matches: matches,\n params: params\n }\n\n // Render matched component\n let matchedContent: FNodeChild = null\n\n if (matches.length > 0) {\n const rootMatch = matches[0]\n const Component = rootMatch.route.component\n\n // Use pathname as key to force re-mount on route change\n const routeKey = currentPath\n\n // Guard Check\n if (rootMatch.route.beforeEnter) {\n const result = rootMatch.route.beforeEnter(rootMatch.params)\n if (result !== false) {\n matchedContent = f(RouteDepthCtx.Provider, {\n value: 1,\n key: routeKey,\n children: f(Component, { params: rootMatch.params, key: routeKey })\n })\n }\n } else {\n matchedContent = f(RouteDepthCtx.Provider, {\n value: 1,\n key: routeKey,\n children: f(Component, { params: rootMatch.params, key: routeKey })\n })\n }\n }\n\n return f(RouterCtx.Provider, {\n value: routerContext,\n children: [...beforeRouteChildren, matchedContent, ...afterRouteChildren]\n })\n}\n","import { use } from '../../core/use'\nimport { jsx as f } from '../../jsx-runtime'\nimport { RouteDepthCtx, useRouter } from '../router'\n\nexport function Outlet() {\n const routerContext = useRouter()\n const [depthValue] = use(RouteDepthCtx)\n const depth = depthValue ?? 0\n\n const [matches] = use(() => routerContext.matches)\n\n if (depth >= matches.length) return null\n\n const match = matches[depth]\n const Component = match.route.component\n\n // Guard\n if (match.route.beforeEnter) {\n if (match.route.beforeEnter(match.params) === false) return null\n }\n\n // Render next level\n return f(RouteDepthCtx.Provider, {\n value: depth + 1,\n children: f(Component, { params: match.params })\n })\n}\n","import { jsx as f } from '../../jsx-runtime'\nimport type { LinkProps } from '../types'\n\n// Import the navigate function getter, not the function itself\n// This ensures we always use the current navigate implementation\nimport { getNavigate } from '../router'\n\nexport function Link(props: LinkProps) {\n return f('a', {\n href: props.to,\n class: props.class || props.className,\n style: props.style ? props.style + '; cursor: pointer;' : 'cursor: pointer;',\n onclick: (event: Event) => {\n console.log('Link clicked:', props.to)\n event.preventDefault()\n // Get current navigate function at click time\n getNavigate()(props.to)\n },\n children: props.children\n })\n}\n"]}
package/dist/index.d.cts CHANGED
@@ -6,6 +6,6 @@ export { getIsServer, renderToStaticMarkup, renderToString } from './server.cjs'
6
6
  export { CSSProperties, CSSValue, DefaultVariants, KeyframeDefinition, StyleObject, StyledConfig, StyledProps, VariantConfig, css, cx, getStyleTag, getStyles, hydrateStyles, keyframes, resetStyles, styled } from './css.cjs';
7
7
  import './types-DH8L3A5z.cjs';
8
8
 
9
- declare const VERSION = "0.16.17";
9
+ declare const VERSION = "0.16.18";
10
10
 
11
11
  export { VERSION };
package/dist/index.d.ts CHANGED
@@ -6,6 +6,6 @@ export { getIsServer, renderToStaticMarkup, renderToString } from './server.js';
6
6
  export { CSSProperties, CSSValue, DefaultVariants, KeyframeDefinition, StyleObject, StyledConfig, StyledProps, VariantConfig, css, cx, getStyleTag, getStyles, hydrateStyles, keyframes, resetStyles, styled } from './css.js';
7
7
  import './types-DH8L3A5z.js';
8
8
 
9
- declare const VERSION = "0.16.17";
9
+ declare const VERSION = "0.16.18";
10
10
 
11
11
  export { VERSION };
package/dist/index.js CHANGED
@@ -1,2 +1,2 @@
1
- 'use strict';var chunkAD2E2FQE_js=require('./chunk-AD2E2FQE.js'),chunk47EPSC5Q_js=require('./chunk-47EPSC5Q.js'),chunk4E3YIGJX_js=require('./chunk-4E3YIGJX.js'),chunkA4VGFEMF_js=require('./chunk-A4VGFEMF.js'),chunkDDYQX5XV_js=require('./chunk-DDYQX5XV.js'),chunkBP5PDE6F_js=require('./chunk-BP5PDE6F.js'),chunk3CKIHQIE_js=require('./chunk-3CKIHQIE.js'),chunkOU6XJZ76_js=require('./chunk-OU6XJZ76.js'),chunkZJZRDYA2_js=require('./chunk-ZJZRDYA2.js');require('./chunk-TFXBDC6C.js');var J="0.16.17";Object.defineProperty(exports,"useRef",{enumerable:true,get:function(){return chunkAD2E2FQE_js.a}});Object.defineProperty(exports,"ErrorBoundary",{enumerable:true,get:function(){return chunk47EPSC5Q_js.d}});Object.defineProperty(exports,"Suspense",{enumerable:true,get:function(){return chunk47EPSC5Q_js.c}});Object.defineProperty(exports,"f",{enumerable:true,get:function(){return chunk47EPSC5Q_js.a}});Object.defineProperty(exports,"hydrate",{enumerable:true,get:function(){return chunk47EPSC5Q_js.b}});Object.defineProperty(exports,"lazy",{enumerable:true,get:function(){return chunk47EPSC5Q_js.e}});Object.defineProperty(exports,"render",{enumerable:true,get:function(){return chunk4E3YIGJX_js.d}});Object.defineProperty(exports,"resetRender",{enumerable:true,get:function(){return chunk4E3YIGJX_js.a}});Object.defineProperty(exports,"getIsServer",{enumerable:true,get:function(){return chunkA4VGFEMF_js.a}});Object.defineProperty(exports,"renderToStaticMarkup",{enumerable:true,get:function(){return chunkA4VGFEMF_js.c}});Object.defineProperty(exports,"renderToString",{enumerable:true,get:function(){return chunkA4VGFEMF_js.b}});Object.defineProperty(exports,"Link",{enumerable:true,get:function(){return chunkDDYQX5XV_js.k}});Object.defineProperty(exports,"Outlet",{enumerable:true,get:function(){return chunkDDYQX5XV_js.j}});Object.defineProperty(exports,"Route",{enumerable:true,get:function(){return chunkDDYQX5XV_js.h}});Object.defineProperty(exports,"Routes",{enumerable:true,get:function(){return chunkDDYQX5XV_js.i}});Object.defineProperty(exports,"getNavigate",{enumerable:true,get:function(){return chunkDDYQX5XV_js.e}});Object.defineProperty(exports,"resetRouter",{enumerable:true,get:function(){return chunkDDYQX5XV_js.a}});Object.defineProperty(exports,"useLocation",{enumerable:true,get:function(){return chunkDDYQX5XV_js.b}});Object.defineProperty(exports,"useNavigate",{enumerable:true,get:function(){return chunkDDYQX5XV_js.d}});Object.defineProperty(exports,"useParams",{enumerable:true,get:function(){return chunkDDYQX5XV_js.f}});Object.defineProperty(exports,"useQuery",{enumerable:true,get:function(){return chunkDDYQX5XV_js.g}});Object.defineProperty(exports,"useRouter",{enumerable:true,get:function(){return chunkDDYQX5XV_js.c}});Object.defineProperty(exports,"isReactive",{enumerable:true,get:function(){return chunkBP5PDE6F_js.b}});Object.defineProperty(exports,"use",{enumerable:true,get:function(){return chunkBP5PDE6F_js.c}});Object.defineProperty(exports,"sync",{enumerable:true,get:function(){return chunk3CKIHQIE_js.e}});Object.defineProperty(exports,"Context",{enumerable:true,get:function(){return chunkOU6XJZ76_js.f}});Object.defineProperty(exports,"Useable",{enumerable:true,get:function(){return chunkOU6XJZ76_js.c}});Object.defineProperty(exports,"getContextValue",{enumerable:true,get:function(){return chunkOU6XJZ76_js.g}});Object.defineProperty(exports,"isUseable",{enumerable:true,get:function(){return chunkOU6XJZ76_js.d}});Object.defineProperty(exports,"popContext",{enumerable:true,get:function(){return chunkOU6XJZ76_js.i}});Object.defineProperty(exports,"pushContext",{enumerable:true,get:function(){return chunkOU6XJZ76_js.h}});Object.defineProperty(exports,"resetContext",{enumerable:true,get:function(){return chunkOU6XJZ76_js.e}});Object.defineProperty(exports,"css",{enumerable:true,get:function(){return chunkZJZRDYA2_js.e}});Object.defineProperty(exports,"cx",{enumerable:true,get:function(){return chunkZJZRDYA2_js.f}});Object.defineProperty(exports,"getStyleTag",{enumerable:true,get:function(){return chunkZJZRDYA2_js.b}});Object.defineProperty(exports,"getStyles",{enumerable:true,get:function(){return chunkZJZRDYA2_js.a}});Object.defineProperty(exports,"hydrateStyles",{enumerable:true,get:function(){return chunkZJZRDYA2_js.d}});Object.defineProperty(exports,"keyframes",{enumerable:true,get:function(){return chunkZJZRDYA2_js.h}});Object.defineProperty(exports,"resetStyles",{enumerable:true,get:function(){return chunkZJZRDYA2_js.c}});Object.defineProperty(exports,"styled",{enumerable:true,get:function(){return chunkZJZRDYA2_js.g}});exports.VERSION=J;//# sourceMappingURL=index.js.map
1
+ 'use strict';var chunkAD2E2FQE_js=require('./chunk-AD2E2FQE.js'),chunk47EPSC5Q_js=require('./chunk-47EPSC5Q.js'),chunk4E3YIGJX_js=require('./chunk-4E3YIGJX.js'),chunkA4VGFEMF_js=require('./chunk-A4VGFEMF.js'),chunkFPEJ43DE_js=require('./chunk-FPEJ43DE.js'),chunkBP5PDE6F_js=require('./chunk-BP5PDE6F.js'),chunk3CKIHQIE_js=require('./chunk-3CKIHQIE.js'),chunkOU6XJZ76_js=require('./chunk-OU6XJZ76.js'),chunkZJZRDYA2_js=require('./chunk-ZJZRDYA2.js');require('./chunk-TFXBDC6C.js');var J="0.16.18";Object.defineProperty(exports,"useRef",{enumerable:true,get:function(){return chunkAD2E2FQE_js.a}});Object.defineProperty(exports,"ErrorBoundary",{enumerable:true,get:function(){return chunk47EPSC5Q_js.d}});Object.defineProperty(exports,"Suspense",{enumerable:true,get:function(){return chunk47EPSC5Q_js.c}});Object.defineProperty(exports,"f",{enumerable:true,get:function(){return chunk47EPSC5Q_js.a}});Object.defineProperty(exports,"hydrate",{enumerable:true,get:function(){return chunk47EPSC5Q_js.b}});Object.defineProperty(exports,"lazy",{enumerable:true,get:function(){return chunk47EPSC5Q_js.e}});Object.defineProperty(exports,"render",{enumerable:true,get:function(){return chunk4E3YIGJX_js.d}});Object.defineProperty(exports,"resetRender",{enumerable:true,get:function(){return chunk4E3YIGJX_js.a}});Object.defineProperty(exports,"getIsServer",{enumerable:true,get:function(){return chunkA4VGFEMF_js.a}});Object.defineProperty(exports,"renderToStaticMarkup",{enumerable:true,get:function(){return chunkA4VGFEMF_js.c}});Object.defineProperty(exports,"renderToString",{enumerable:true,get:function(){return chunkA4VGFEMF_js.b}});Object.defineProperty(exports,"Link",{enumerable:true,get:function(){return chunkFPEJ43DE_js.k}});Object.defineProperty(exports,"Outlet",{enumerable:true,get:function(){return chunkFPEJ43DE_js.j}});Object.defineProperty(exports,"Route",{enumerable:true,get:function(){return chunkFPEJ43DE_js.h}});Object.defineProperty(exports,"Routes",{enumerable:true,get:function(){return chunkFPEJ43DE_js.i}});Object.defineProperty(exports,"getNavigate",{enumerable:true,get:function(){return chunkFPEJ43DE_js.e}});Object.defineProperty(exports,"resetRouter",{enumerable:true,get:function(){return chunkFPEJ43DE_js.a}});Object.defineProperty(exports,"useLocation",{enumerable:true,get:function(){return chunkFPEJ43DE_js.b}});Object.defineProperty(exports,"useNavigate",{enumerable:true,get:function(){return chunkFPEJ43DE_js.d}});Object.defineProperty(exports,"useParams",{enumerable:true,get:function(){return chunkFPEJ43DE_js.f}});Object.defineProperty(exports,"useQuery",{enumerable:true,get:function(){return chunkFPEJ43DE_js.g}});Object.defineProperty(exports,"useRouter",{enumerable:true,get:function(){return chunkFPEJ43DE_js.c}});Object.defineProperty(exports,"isReactive",{enumerable:true,get:function(){return chunkBP5PDE6F_js.b}});Object.defineProperty(exports,"use",{enumerable:true,get:function(){return chunkBP5PDE6F_js.c}});Object.defineProperty(exports,"sync",{enumerable:true,get:function(){return chunk3CKIHQIE_js.e}});Object.defineProperty(exports,"Context",{enumerable:true,get:function(){return chunkOU6XJZ76_js.f}});Object.defineProperty(exports,"Useable",{enumerable:true,get:function(){return chunkOU6XJZ76_js.c}});Object.defineProperty(exports,"getContextValue",{enumerable:true,get:function(){return chunkOU6XJZ76_js.g}});Object.defineProperty(exports,"isUseable",{enumerable:true,get:function(){return chunkOU6XJZ76_js.d}});Object.defineProperty(exports,"popContext",{enumerable:true,get:function(){return chunkOU6XJZ76_js.i}});Object.defineProperty(exports,"pushContext",{enumerable:true,get:function(){return chunkOU6XJZ76_js.h}});Object.defineProperty(exports,"resetContext",{enumerable:true,get:function(){return chunkOU6XJZ76_js.e}});Object.defineProperty(exports,"css",{enumerable:true,get:function(){return chunkZJZRDYA2_js.e}});Object.defineProperty(exports,"cx",{enumerable:true,get:function(){return chunkZJZRDYA2_js.f}});Object.defineProperty(exports,"getStyleTag",{enumerable:true,get:function(){return chunkZJZRDYA2_js.b}});Object.defineProperty(exports,"getStyles",{enumerable:true,get:function(){return chunkZJZRDYA2_js.a}});Object.defineProperty(exports,"hydrateStyles",{enumerable:true,get:function(){return chunkZJZRDYA2_js.d}});Object.defineProperty(exports,"keyframes",{enumerable:true,get:function(){return chunkZJZRDYA2_js.h}});Object.defineProperty(exports,"resetStyles",{enumerable:true,get:function(){return chunkZJZRDYA2_js.c}});Object.defineProperty(exports,"styled",{enumerable:true,get:function(){return chunkZJZRDYA2_js.g}});exports.VERSION=J;//# sourceMappingURL=index.js.map
2
2
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/index.ts"],"names":["VERSION"],"mappings":"geAAO,IAAMA,CAAAA,CAAU","file":"index.js","sourcesContent":["export const VERSION = '0.16.17' // Bump version to signify rebuild\n\n// Re-export all from submodules\nexport * from './core'\nexport * from './dom'\nexport * from './router'\nexport * from './server'\nexport * from './css'\n"]}
1
+ {"version":3,"sources":["../src/index.ts"],"names":["VERSION"],"mappings":"geAAO,IAAMA,CAAAA,CAAU","file":"index.js","sourcesContent":["export const VERSION = '0.16.18' // Bump version to signify rebuild\n\n// Re-export all from submodules\nexport * from './core'\nexport * from './dom'\nexport * from './router'\nexport * from './server'\nexport * from './css'\n"]}
package/dist/index.mjs CHANGED
@@ -1,2 +1,2 @@
1
- export{a as useRef}from'./chunk-VB564E5E.mjs';export{d as ErrorBoundary,c as Suspense,a as f,b as hydrate,e as lazy}from'./chunk-33M3W7D4.mjs';export{d as render,a as resetRender}from'./chunk-P6NMD5QH.mjs';export{a as getIsServer,c as renderToStaticMarkup,b as renderToString}from'./chunk-UQNPGF7C.mjs';export{k as Link,j as Outlet,h as Route,i as Routes,e as getNavigate,a as resetRouter,b as useLocation,d as useNavigate,f as useParams,g as useQuery,c as useRouter}from'./chunk-6237HPKV.mjs';export{b as isReactive,c as use}from'./chunk-FJNIW7B2.mjs';export{e as sync}from'./chunk-NRPWBHKP.mjs';export{f as Context,c as Useable,g as getContextValue,d as isUseable,i as popContext,h as pushContext,e as resetContext}from'./chunk-TIUNOZRI.mjs';export{e as css,f as cx,b as getStyleTag,a as getStyles,d as hydrateStyles,h as keyframes,c as resetStyles,g as styled}from'./chunk-FU4W2BKL.mjs';import'./chunk-RUYGSYEV.mjs';var J="0.16.17";export{J as VERSION};//# sourceMappingURL=index.mjs.map
1
+ export{a as useRef}from'./chunk-VB564E5E.mjs';export{d as ErrorBoundary,c as Suspense,a as f,b as hydrate,e as lazy}from'./chunk-33M3W7D4.mjs';export{d as render,a as resetRender}from'./chunk-P6NMD5QH.mjs';export{a as getIsServer,c as renderToStaticMarkup,b as renderToString}from'./chunk-UQNPGF7C.mjs';export{k as Link,j as Outlet,h as Route,i as Routes,e as getNavigate,a as resetRouter,b as useLocation,d as useNavigate,f as useParams,g as useQuery,c as useRouter}from'./chunk-2OBMCCAZ.mjs';export{b as isReactive,c as use}from'./chunk-FJNIW7B2.mjs';export{e as sync}from'./chunk-NRPWBHKP.mjs';export{f as Context,c as Useable,g as getContextValue,d as isUseable,i as popContext,h as pushContext,e as resetContext}from'./chunk-TIUNOZRI.mjs';export{e as css,f as cx,b as getStyleTag,a as getStyles,d as hydrateStyles,h as keyframes,c as resetStyles,g as styled}from'./chunk-FU4W2BKL.mjs';import'./chunk-RUYGSYEV.mjs';var J="0.16.18";export{J as VERSION};//# sourceMappingURL=index.mjs.map
2
2
  //# sourceMappingURL=index.mjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/index.ts"],"names":["VERSION"],"mappings":"u5BAAO,IAAMA,CAAAA,CAAU","file":"index.mjs","sourcesContent":["export const VERSION = '0.16.17' // Bump version to signify rebuild\n\n// Re-export all from submodules\nexport * from './core'\nexport * from './dom'\nexport * from './router'\nexport * from './server'\nexport * from './css'\n"]}
1
+ {"version":3,"sources":["../src/index.ts"],"names":["VERSION"],"mappings":"u5BAAO,IAAMA,CAAAA,CAAU","file":"index.mjs","sourcesContent":["export const VERSION = '0.16.18' // Bump version to signify rebuild\n\n// Re-export all from submodules\nexport * from './core'\nexport * from './dom'\nexport * from './router'\nexport * from './server'\nexport * from './css'\n"]}
@@ -1 +1 @@
1
- {"inputs":{"src/core/lifecycle.ts":{"bytes":2686,"imports":[],"format":"esm"},"src/core/reactive.ts":{"bytes":2080,"imports":[{"path":"src/core/lifecycle.ts","kind":"import-statement","original":"./lifecycle"}],"format":"esm"},"src/core/hook.ts":{"bytes":986,"imports":[],"format":"esm"},"src/core/devtools.ts":{"bytes":1841,"imports":[],"format":"esm"},"src/core/useable.ts":{"bytes":2083,"imports":[],"format":"esm"},"src/core/context.ts":{"bytes":2473,"imports":[{"path":"src/core/useable.ts","kind":"import-statement","original":"./useable"}],"format":"esm"},"src/core/use.ts":{"bytes":8860,"imports":[{"path":"src/core/reactive.ts","kind":"import-statement","original":"./reactive"},{"path":"src/core/lifecycle.ts","kind":"import-statement","original":"./lifecycle"},{"path":"src/core/hook.ts","kind":"import-statement","original":"./hook"},{"path":"src/core/devtools.ts","kind":"import-statement","original":"./devtools"},{"path":"./context","kind":"import-statement","external":true},{"path":"src/core/useable.ts","kind":"import-statement","original":"./useable"},{"path":"src/core/context.ts","kind":"import-statement","original":"./context"},{"path":"src/core/useable.ts","kind":"import-statement","original":"./useable"}],"format":"esm"},"src/core/ref.ts":{"bytes":812,"imports":[{"path":"src/core/hook.ts","kind":"import-statement","original":"./hook"}],"format":"esm"},"src/core/index.ts":{"bytes":525,"imports":[{"path":"src/core/use.ts","kind":"import-statement","original":"./use"},{"path":"src/core/lifecycle.ts","kind":"import-statement","original":"./lifecycle"},{"path":"src/core/ref.ts","kind":"import-statement","original":"./ref"},{"path":"src/core/useable.ts","kind":"import-statement","original":"./useable"},{"path":"src/core/context.ts","kind":"import-statement","original":"./context"},{"path":"src/core/reactive.ts","kind":"import-statement","original":"./reactive"}],"format":"esm"},"src/dom/f.ts":{"bytes":285,"imports":[],"format":"esm"},"src/dom/render.ts":{"bytes":16363,"imports":[{"path":"src/core/context.ts","kind":"import-statement","original":"../core/context"},{"path":"src/core/hook.ts","kind":"import-statement","original":"../core/hook"},{"path":"src/core/lifecycle.ts","kind":"import-statement","original":"../core/lifecycle"}],"format":"esm"},"src/dom/hydrate.ts":{"bytes":10437,"imports":[{"path":"src/core/hook.ts","kind":"import-statement","original":"../core/hook"},{"path":"src/core/context.ts","kind":"import-statement","original":"../core/context"},{"path":"src/core/lifecycle.ts","kind":"import-statement","original":"../core/lifecycle"},{"path":"src/dom/render.ts","kind":"import-statement","original":"./render"},{"path":"src/dom/render.ts","kind":"dynamic-import","original":"./render"}],"format":"esm"},"src/dom/components/suspenseContext.ts":{"bytes":412,"imports":[{"path":"src/core/context.ts","kind":"import-statement","original":"../../core/context"},{"path":"src/core/use.ts","kind":"import-statement","original":"../../core/use"}],"format":"esm"},"src/dom/components/Suspense.tsx":{"bytes":1770,"imports":[{"path":"src/core/use.ts","kind":"import-statement","original":"../../core/use"},{"path":"src/core/hook.ts","kind":"import-statement","original":"../../core/hook"},{"path":"src/dom/components/suspenseContext.ts","kind":"import-statement","original":"./suspenseContext"}],"format":"esm"},"src/dom/components/ErrorBoundary.tsx":{"bytes":2854,"imports":[{"path":"src/core/use.ts","kind":"import-statement","original":"../../core/use"},{"path":"src/core/hook.ts","kind":"import-statement","original":"../../core/hook"}],"format":"esm"},"src/dom/components/lazy.ts":{"bytes":1767,"imports":[{"path":"src/dom/components/suspenseContext.ts","kind":"import-statement","original":"./suspenseContext"}],"format":"esm"},"src/dom/components/index.ts":{"bytes":549,"imports":[{"path":"src/dom/components/Suspense.tsx","kind":"import-statement","original":"./Suspense"},{"path":"src/dom/components/ErrorBoundary.tsx","kind":"import-statement","original":"./ErrorBoundary"},{"path":"src/dom/components/lazy.ts","kind":"import-statement","original":"./lazy"},{"path":"src/dom/components/suspenseContext.ts","kind":"import-statement","original":"./suspenseContext"},{"path":"src/dom/components/ErrorBoundary.tsx","kind":"import-statement","original":"./ErrorBoundary"}],"format":"esm"},"src/dom/index.ts":{"bytes":361,"imports":[{"path":"src/dom/f.ts","kind":"import-statement","original":"./f"},{"path":"src/dom/render.ts","kind":"import-statement","original":"./render"},{"path":"src/dom/hydrate.ts","kind":"import-statement","original":"./hydrate"},{"path":"src/dom/components/index.ts","kind":"import-statement","original":"./components"}],"format":"esm"},"src/router/types.ts":{"bytes":845,"imports":[],"format":"esm"},"src/router/utils.ts":{"bytes":3833,"imports":[{"path":"./types","kind":"import-statement","external":true}],"format":"esm"},"src/router/router.ts":{"bytes":5238,"imports":[{"path":"src/core/reactive.ts","kind":"import-statement","original":"../core/reactive"},{"path":"src/core/context.ts","kind":"import-statement","original":"../core/context"},{"path":"src/core/use.ts","kind":"import-statement","original":"../core/use"},{"path":"src/router/utils.ts","kind":"import-statement","original":"./utils"}],"format":"esm"},"src/jsx-runtime.ts":{"bytes":897,"imports":[],"format":"esm"},"src/router/dom/Route.tsx":{"bytes":106,"imports":[],"format":"esm"},"src/router/dom/Routes.tsx":{"bytes":3343,"imports":[{"path":"src/jsx-runtime.ts","kind":"import-statement","original":"../../jsx-runtime"},{"path":"src/router/router.ts","kind":"import-statement","original":"../router"},{"path":"src/router/utils.ts","kind":"import-statement","original":"../utils"},{"path":"src/router/dom/Route.tsx","kind":"import-statement","original":"./Route"}],"format":"esm"},"src/router/dom/Outlet.tsx":{"bytes":744,"imports":[{"path":"src/core/use.ts","kind":"import-statement","original":"../../core/use"},{"path":"src/jsx-runtime.ts","kind":"import-statement","original":"../../jsx-runtime"},{"path":"src/router/router.ts","kind":"import-statement","original":"../router"}],"format":"esm"},"src/router/dom/Link.tsx":{"bytes":748,"imports":[{"path":"src/jsx-runtime.ts","kind":"import-statement","original":"../../jsx-runtime"},{"path":"src/router/router.ts","kind":"import-statement","original":"../router"}],"format":"esm"},"src/router/index.ts":{"bytes":335,"imports":[{"path":"src/router/types.ts","kind":"import-statement","original":"./types"},{"path":"src/router/router.ts","kind":"import-statement","original":"./router"},{"path":"src/router/dom/Routes.tsx","kind":"import-statement","original":"./dom/Routes"},{"path":"src/router/dom/Route.tsx","kind":"import-statement","original":"./dom/Route"},{"path":"src/router/dom/Outlet.tsx","kind":"import-statement","original":"./dom/Outlet"},{"path":"src/router/dom/Link.tsx","kind":"import-statement","original":"./dom/Link"}],"format":"esm"},"src/server/escape.ts":{"bytes":364,"imports":[],"format":"esm"},"src/server/serverState.ts":{"bytes":896,"imports":[],"format":"esm"},"src/server/renderToString.ts":{"bytes":6572,"imports":[{"path":"src/server/escape.ts","kind":"import-statement","original":"./escape"},{"path":"src/server/serverState.ts","kind":"import-statement","original":"./serverState"},{"path":"src/core/hook.ts","kind":"import-statement","original":"../core/hook"},{"path":"src/core/context.ts","kind":"import-statement","original":"../core/context"}],"format":"esm"},"src/server/index.ts":{"bytes":243,"imports":[{"path":"src/server/renderToString.ts","kind":"import-statement","original":"./renderToString"},{"path":"src/server/serverState.ts","kind":"import-statement","original":"./serverState"}],"format":"esm"},"src/css/runtime/hash.ts":{"bytes":290,"imports":[],"format":"esm"},"src/css/runtime/serialize.ts":{"bytes":2900,"imports":[],"format":"esm"},"src/css/runtime/sheet.ts":{"bytes":2860,"imports":[],"format":"esm"},"src/css/css.ts":{"bytes":1214,"imports":[{"path":"src/css/runtime/hash.ts","kind":"import-statement","original":"./runtime/hash"},{"path":"src/css/runtime/serialize.ts","kind":"import-statement","original":"./runtime/serialize"},{"path":"src/css/runtime/sheet.ts","kind":"import-statement","original":"./runtime/sheet"}],"format":"esm"},"src/css/styled.ts":{"bytes":5571,"imports":[{"path":"src/css/css.ts","kind":"import-statement","original":"./css"}],"format":"esm"},"src/css/keyframes.ts":{"bytes":1005,"imports":[{"path":"src/css/runtime/hash.ts","kind":"import-statement","original":"./runtime/hash"},{"path":"src/css/runtime/serialize.ts","kind":"import-statement","original":"./runtime/serialize"},{"path":"src/css/runtime/sheet.ts","kind":"import-statement","original":"./runtime/sheet"}],"format":"esm"},"src/css/index.ts":{"bytes":1086,"imports":[{"path":"src/css/css.ts","kind":"import-statement","original":"./css"},{"path":"src/css/styled.ts","kind":"import-statement","original":"./styled"},{"path":"src/css/keyframes.ts","kind":"import-statement","original":"./keyframes"},{"path":"src/css/runtime/sheet.ts","kind":"import-statement","original":"./runtime/sheet"}],"format":"esm"},"src/index.ts":{"bytes":219,"imports":[{"path":"src/core/index.ts","kind":"import-statement","original":"./core"},{"path":"src/dom/index.ts","kind":"import-statement","original":"./dom"},{"path":"src/router/index.ts","kind":"import-statement","original":"./router"},{"path":"src/server/index.ts","kind":"import-statement","original":"./server"},{"path":"src/css/index.ts","kind":"import-statement","original":"./css"}],"format":"esm"},"src/jsx-dev-runtime.ts":{"bytes":211,"imports":[{"path":"src/jsx-runtime.ts","kind":"import-statement","original":"./jsx-runtime"}],"format":"esm"}},"outputs":{"dist/render-FMQNBA7X.js.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"dist/render-FMQNBA7X.js":{"imports":[{"path":"dist/chunk-4E3YIGJX.js","kind":"import-statement"},{"path":"dist/chunk-3CKIHQIE.js","kind":"import-statement"},{"path":"dist/chunk-OU6XJZ76.js","kind":"import-statement"}],"exports":["reconcile","render","renderNode","resetRender"],"entryPoint":"src/dom/render.ts","inputs":{},"bytes":166},"dist/index.js.map":{"imports":[],"exports":[],"inputs":{},"bytes":365},"dist/index.js":{"imports":[{"path":"dist/chunk-AD2E2FQE.js","kind":"import-statement"},{"path":"dist/chunk-47EPSC5Q.js","kind":"import-statement"},{"path":"dist/chunk-4E3YIGJX.js","kind":"import-statement"},{"path":"dist/chunk-A4VGFEMF.js","kind":"import-statement"},{"path":"dist/chunk-DDYQX5XV.js","kind":"import-statement"},{"path":"dist/chunk-BP5PDE6F.js","kind":"import-statement"},{"path":"dist/chunk-3CKIHQIE.js","kind":"import-statement"},{"path":"dist/chunk-OU6XJZ76.js","kind":"import-statement"},{"path":"dist/chunk-ZJZRDYA2.js","kind":"import-statement"},{"path":"dist/chunk-TFXBDC6C.js","kind":"import-statement"}],"exports":["Context","ErrorBoundary","Link","Outlet","Route","Routes","Suspense","Useable","VERSION","css","cx","f","getContextValue","getIsServer","getNavigate","getStyleTag","getStyles","hydrate","hydrateStyles","isReactive","isUseable","keyframes","lazy","popContext","pushContext","render","renderToStaticMarkup","renderToString","resetContext","resetRender","resetRouter","resetStyles","styled","sync","use","useLocation","useNavigate","useParams","useQuery","useRef","useRouter"],"entryPoint":"src/index.ts","inputs":{"src/index.ts":{"bytesInOutput":16}},"bytes":1217},"dist/core.js.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"dist/core.js":{"imports":[{"path":"dist/chunk-AD2E2FQE.js","kind":"import-statement"},{"path":"dist/chunk-BP5PDE6F.js","kind":"import-statement"},{"path":"dist/chunk-3CKIHQIE.js","kind":"import-statement"},{"path":"dist/chunk-OU6XJZ76.js","kind":"import-statement"}],"exports":["Context","Useable","getContextValue","isReactive","isUseable","popContext","pushContext","resetContext","sync","use","useRef"],"entryPoint":"src/core/index.ts","inputs":{},"bytes":338},"dist/chunk-AD2E2FQE.js.map":{"imports":[],"exports":[],"inputs":{},"bytes":1066},"dist/chunk-AD2E2FQE.js":{"imports":[{"path":"dist/chunk-OU6XJZ76.js","kind":"import-statement"}],"exports":["a"],"inputs":{"src/core/index.ts":{"bytesInOutput":0},"src/core/ref.ts":{"bytesInOutput":42}},"bytes":98},"dist/dom.js.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"dist/dom.js":{"imports":[{"path":"dist/chunk-47EPSC5Q.js","kind":"import-statement"},{"path":"dist/chunk-4E3YIGJX.js","kind":"import-statement"},{"path":"dist/chunk-BP5PDE6F.js","kind":"import-statement"},{"path":"dist/chunk-3CKIHQIE.js","kind":"import-statement"},{"path":"dist/chunk-OU6XJZ76.js","kind":"import-statement"}],"exports":["ErrorBoundary","Suspense","f","hydrate","lazy","render","resetRender"],"entryPoint":"src/dom/index.ts","inputs":{},"bytes":295},"dist/chunk-47EPSC5Q.js.map":{"imports":[],"exports":[],"inputs":{},"bytes":26910},"dist/chunk-47EPSC5Q.js":{"imports":[{"path":"dist/chunk-4E3YIGJX.js","kind":"import-statement"},{"path":"dist/chunk-BP5PDE6F.js","kind":"import-statement"},{"path":"dist/chunk-3CKIHQIE.js","kind":"import-statement"},{"path":"dist/chunk-OU6XJZ76.js","kind":"import-statement"},{"path":"dist/render-FMQNBA7X.js","kind":"dynamic-import"}],"exports":["a","b","c","d","e"],"inputs":{"src/dom/f.ts":{"bytesInOutput":70},"src/dom/index.ts":{"bytesInOutput":0},"src/dom/hydrate.ts":{"bytesInOutput":3135},"src/dom/components/suspenseContext.ts":{"bytesInOutput":86},"src/dom/components/Suspense.tsx":{"bytesInOutput":293},"src/dom/components/index.ts":{"bytesInOutput":0},"src/dom/components/ErrorBoundary.tsx":{"bytesInOutput":508},"src/dom/components/lazy.ts":{"bytesInOutput":249}},"bytes":4580},"dist/chunk-4E3YIGJX.js.map":{"imports":[],"exports":[],"inputs":{},"bytes":25574},"dist/chunk-4E3YIGJX.js":{"imports":[{"path":"dist/chunk-3CKIHQIE.js","kind":"import-statement"},{"path":"dist/chunk-OU6XJZ76.js","kind":"import-statement"}],"exports":["a","b","c","d"],"inputs":{"src/dom/render.ts":{"bytesInOutput":5056}},"bytes":5180},"dist/server.js.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"dist/server.js":{"imports":[{"path":"dist/chunk-A4VGFEMF.js","kind":"import-statement"},{"path":"dist/chunk-OU6XJZ76.js","kind":"import-statement"}],"exports":["getIsServer","renderToStaticMarkup","renderToString"],"entryPoint":"src/server/index.ts","inputs":{},"bytes":139},"dist/chunk-A4VGFEMF.js.map":{"imports":[],"exports":[],"inputs":{},"bytes":12945},"dist/chunk-A4VGFEMF.js":{"imports":[{"path":"dist/chunk-OU6XJZ76.js","kind":"import-statement"}],"exports":["a","b","c"],"inputs":{"src/server/escape.ts":{"bytesInOutput":157},"src/server/serverState.ts":{"bytesInOutput":186},"src/server/renderToString.ts":{"bytesInOutput":2125},"src/server/index.ts":{"bytesInOutput":0}},"bytes":2552},"dist/router.js.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"dist/router.js":{"imports":[{"path":"dist/chunk-DDYQX5XV.js","kind":"import-statement"},{"path":"dist/chunk-BP5PDE6F.js","kind":"import-statement"},{"path":"dist/chunk-3CKIHQIE.js","kind":"import-statement"},{"path":"dist/chunk-OU6XJZ76.js","kind":"import-statement"},{"path":"dist/chunk-TFXBDC6C.js","kind":"import-statement"}],"exports":["Link","Outlet","Route","Routes","getNavigate","resetRouter","useLocation","useNavigate","useParams","useQuery","useRouter"],"entryPoint":"src/router/index.ts","inputs":{},"bytes":333},"dist/chunk-DDYQX5XV.js.map":{"imports":[],"exports":[],"inputs":{},"bytes":21846},"dist/chunk-DDYQX5XV.js":{"imports":[{"path":"dist/chunk-BP5PDE6F.js","kind":"import-statement"},{"path":"dist/chunk-OU6XJZ76.js","kind":"import-statement"},{"path":"dist/chunk-TFXBDC6C.js","kind":"import-statement"}],"exports":["a","b","c","d","e","f","g","h","i","j","k"],"inputs":{"src/router/index.ts":{"bytesInOutput":0},"src/router/utils.ts":{"bytesInOutput":1097},"src/router/router.ts":{"bytesInOutput":1456},"src/router/dom/Route.tsx":{"bytesInOutput":26},"src/router/dom/Routes.tsx":{"bytesInOutput":787},"src/router/dom/Outlet.tsx":{"bytesInOutput":244},"src/router/dom/Link.tsx":{"bytesInOutput":225}},"bytes":4048},"dist/chunk-BP5PDE6F.js.map":{"imports":[],"exports":[],"inputs":{},"bytes":19014},"dist/chunk-BP5PDE6F.js":{"imports":[{"path":"dist/chunk-3CKIHQIE.js","kind":"import-statement"},{"path":"dist/chunk-OU6XJZ76.js","kind":"import-statement"}],"exports":["a","b","c"],"inputs":{"src/core/reactive.ts":{"bytesInOutput":590},"src/core/devtools.ts":{"bytesInOutput":372},"src/core/use.ts":{"bytesInOutput":2119}},"bytes":3219},"dist/chunk-3CKIHQIE.js.map":{"imports":[],"exports":[],"inputs":{},"bytes":4599},"dist/chunk-3CKIHQIE.js":{"imports":[],"exports":["a","b","c","d","e"],"inputs":{"src/core/lifecycle.ts":{"bytesInOutput":813}},"bytes":857},"dist/chunk-OU6XJZ76.js.map":{"imports":[],"exports":[],"inputs":{},"bytes":7505},"dist/chunk-OU6XJZ76.js":{"imports":[],"exports":["a","b","c","d","e","f","g","h","i"],"inputs":{"src/core/hook.ts":{"bytesInOutput":227},"src/core/useable.ts":{"bytesInOutput":151},"src/core/context.ts":{"bytesInOutput":424}},"bytes":874},"dist/css.js.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"dist/css.js":{"imports":[{"path":"dist/chunk-ZJZRDYA2.js","kind":"import-statement"}],"exports":["css","cx","getStyleTag","getStyles","hydrateStyles","keyframes","resetStyles","styled"],"entryPoint":"src/css/index.ts","inputs":{},"bytes":170},"dist/chunk-ZJZRDYA2.js.map":{"imports":[],"exports":[],"inputs":{},"bytes":20385},"dist/chunk-ZJZRDYA2.js":{"imports":[],"exports":["a","b","c","d","e","f","g","h"],"inputs":{"src/css/runtime/hash.ts":{"bytesInOutput":112},"src/css/runtime/serialize.ts":{"bytesInOutput":1199},"src/css/runtime/sheet.ts":{"bytesInOutput":892},"src/css/css.ts":{"bytesInOutput":147},"src/css/index.ts":{"bytesInOutput":0},"src/css/styled.ts":{"bytesInOutput":777},"src/css/keyframes.ts":{"bytesInOutput":91}},"bytes":3283},"dist/jsx-runtime.js.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"dist/jsx-runtime.js":{"imports":[{"path":"dist/chunk-TFXBDC6C.js","kind":"import-statement"}],"exports":["Fragment","jsx","jsxDEV","jsxs"],"entryPoint":"src/jsx-runtime.ts","inputs":{},"bytes":95},"dist/jsx-dev-runtime.js.map":{"imports":[],"exports":[],"inputs":{},"bytes":510},"dist/jsx-dev-runtime.js":{"imports":[{"path":"dist/chunk-TFXBDC6C.js","kind":"import-statement"}],"exports":["Fragment","jsxDEV"],"entryPoint":"src/jsx-dev-runtime.ts","inputs":{"src/jsx-dev-runtime.ts":{"bytesInOutput":40}},"bytes":122},"dist/chunk-TFXBDC6C.js.map":{"imports":[],"exports":[],"inputs":{},"bytes":1544},"dist/chunk-TFXBDC6C.js":{"imports":[],"exports":["a","b","c","d"],"inputs":{"src/jsx-runtime.ts":{"bytesInOutput":217}},"bytes":254}}}
1
+ {"inputs":{"src/core/lifecycle.ts":{"bytes":2686,"imports":[],"format":"esm"},"src/core/reactive.ts":{"bytes":2080,"imports":[{"path":"src/core/lifecycle.ts","kind":"import-statement","original":"./lifecycle"}],"format":"esm"},"src/core/hook.ts":{"bytes":986,"imports":[],"format":"esm"},"src/core/devtools.ts":{"bytes":1841,"imports":[],"format":"esm"},"src/core/useable.ts":{"bytes":2083,"imports":[],"format":"esm"},"src/core/context.ts":{"bytes":2473,"imports":[{"path":"src/core/useable.ts","kind":"import-statement","original":"./useable"}],"format":"esm"},"src/core/use.ts":{"bytes":8860,"imports":[{"path":"src/core/reactive.ts","kind":"import-statement","original":"./reactive"},{"path":"src/core/lifecycle.ts","kind":"import-statement","original":"./lifecycle"},{"path":"src/core/hook.ts","kind":"import-statement","original":"./hook"},{"path":"src/core/devtools.ts","kind":"import-statement","original":"./devtools"},{"path":"./context","kind":"import-statement","external":true},{"path":"src/core/useable.ts","kind":"import-statement","original":"./useable"},{"path":"src/core/context.ts","kind":"import-statement","original":"./context"},{"path":"src/core/useable.ts","kind":"import-statement","original":"./useable"}],"format":"esm"},"src/core/ref.ts":{"bytes":812,"imports":[{"path":"src/core/hook.ts","kind":"import-statement","original":"./hook"}],"format":"esm"},"src/core/index.ts":{"bytes":525,"imports":[{"path":"src/core/use.ts","kind":"import-statement","original":"./use"},{"path":"src/core/lifecycle.ts","kind":"import-statement","original":"./lifecycle"},{"path":"src/core/ref.ts","kind":"import-statement","original":"./ref"},{"path":"src/core/useable.ts","kind":"import-statement","original":"./useable"},{"path":"src/core/context.ts","kind":"import-statement","original":"./context"},{"path":"src/core/reactive.ts","kind":"import-statement","original":"./reactive"}],"format":"esm"},"src/dom/f.ts":{"bytes":285,"imports":[],"format":"esm"},"src/dom/render.ts":{"bytes":16363,"imports":[{"path":"src/core/context.ts","kind":"import-statement","original":"../core/context"},{"path":"src/core/hook.ts","kind":"import-statement","original":"../core/hook"},{"path":"src/core/lifecycle.ts","kind":"import-statement","original":"../core/lifecycle"}],"format":"esm"},"src/dom/hydrate.ts":{"bytes":10437,"imports":[{"path":"src/core/hook.ts","kind":"import-statement","original":"../core/hook"},{"path":"src/core/context.ts","kind":"import-statement","original":"../core/context"},{"path":"src/core/lifecycle.ts","kind":"import-statement","original":"../core/lifecycle"},{"path":"src/dom/render.ts","kind":"import-statement","original":"./render"},{"path":"src/dom/render.ts","kind":"dynamic-import","original":"./render"}],"format":"esm"},"src/dom/components/suspenseContext.ts":{"bytes":412,"imports":[{"path":"src/core/context.ts","kind":"import-statement","original":"../../core/context"},{"path":"src/core/use.ts","kind":"import-statement","original":"../../core/use"}],"format":"esm"},"src/dom/components/Suspense.tsx":{"bytes":1770,"imports":[{"path":"src/core/use.ts","kind":"import-statement","original":"../../core/use"},{"path":"src/core/hook.ts","kind":"import-statement","original":"../../core/hook"},{"path":"src/dom/components/suspenseContext.ts","kind":"import-statement","original":"./suspenseContext"}],"format":"esm"},"src/dom/components/ErrorBoundary.tsx":{"bytes":2854,"imports":[{"path":"src/core/use.ts","kind":"import-statement","original":"../../core/use"},{"path":"src/core/hook.ts","kind":"import-statement","original":"../../core/hook"}],"format":"esm"},"src/dom/components/lazy.ts":{"bytes":1767,"imports":[{"path":"src/dom/components/suspenseContext.ts","kind":"import-statement","original":"./suspenseContext"}],"format":"esm"},"src/dom/components/index.ts":{"bytes":549,"imports":[{"path":"src/dom/components/Suspense.tsx","kind":"import-statement","original":"./Suspense"},{"path":"src/dom/components/ErrorBoundary.tsx","kind":"import-statement","original":"./ErrorBoundary"},{"path":"src/dom/components/lazy.ts","kind":"import-statement","original":"./lazy"},{"path":"src/dom/components/suspenseContext.ts","kind":"import-statement","original":"./suspenseContext"},{"path":"src/dom/components/ErrorBoundary.tsx","kind":"import-statement","original":"./ErrorBoundary"}],"format":"esm"},"src/dom/index.ts":{"bytes":361,"imports":[{"path":"src/dom/f.ts","kind":"import-statement","original":"./f"},{"path":"src/dom/render.ts","kind":"import-statement","original":"./render"},{"path":"src/dom/hydrate.ts","kind":"import-statement","original":"./hydrate"},{"path":"src/dom/components/index.ts","kind":"import-statement","original":"./components"}],"format":"esm"},"src/router/types.ts":{"bytes":845,"imports":[],"format":"esm"},"src/router/utils.ts":{"bytes":3833,"imports":[{"path":"./types","kind":"import-statement","external":true}],"format":"esm"},"src/router/router.ts":{"bytes":5238,"imports":[{"path":"src/core/reactive.ts","kind":"import-statement","original":"../core/reactive"},{"path":"src/core/context.ts","kind":"import-statement","original":"../core/context"},{"path":"src/core/use.ts","kind":"import-statement","original":"../core/use"},{"path":"src/router/utils.ts","kind":"import-statement","original":"./utils"}],"format":"esm"},"src/jsx-runtime.ts":{"bytes":897,"imports":[],"format":"esm"},"src/router/dom/Route.tsx":{"bytes":106,"imports":[],"format":"esm"},"src/router/dom/Routes.tsx":{"bytes":3482,"imports":[{"path":"src/jsx-runtime.ts","kind":"import-statement","original":"../../jsx-runtime"},{"path":"src/router/router.ts","kind":"import-statement","original":"../router"},{"path":"src/router/utils.ts","kind":"import-statement","original":"../utils"},{"path":"src/router/dom/Route.tsx","kind":"import-statement","original":"./Route"}],"format":"esm"},"src/router/dom/Outlet.tsx":{"bytes":744,"imports":[{"path":"src/core/use.ts","kind":"import-statement","original":"../../core/use"},{"path":"src/jsx-runtime.ts","kind":"import-statement","original":"../../jsx-runtime"},{"path":"src/router/router.ts","kind":"import-statement","original":"../router"}],"format":"esm"},"src/router/dom/Link.tsx":{"bytes":748,"imports":[{"path":"src/jsx-runtime.ts","kind":"import-statement","original":"../../jsx-runtime"},{"path":"src/router/router.ts","kind":"import-statement","original":"../router"}],"format":"esm"},"src/router/index.ts":{"bytes":335,"imports":[{"path":"src/router/types.ts","kind":"import-statement","original":"./types"},{"path":"src/router/router.ts","kind":"import-statement","original":"./router"},{"path":"src/router/dom/Routes.tsx","kind":"import-statement","original":"./dom/Routes"},{"path":"src/router/dom/Route.tsx","kind":"import-statement","original":"./dom/Route"},{"path":"src/router/dom/Outlet.tsx","kind":"import-statement","original":"./dom/Outlet"},{"path":"src/router/dom/Link.tsx","kind":"import-statement","original":"./dom/Link"}],"format":"esm"},"src/server/escape.ts":{"bytes":364,"imports":[],"format":"esm"},"src/server/serverState.ts":{"bytes":896,"imports":[],"format":"esm"},"src/server/renderToString.ts":{"bytes":6572,"imports":[{"path":"src/server/escape.ts","kind":"import-statement","original":"./escape"},{"path":"src/server/serverState.ts","kind":"import-statement","original":"./serverState"},{"path":"src/core/hook.ts","kind":"import-statement","original":"../core/hook"},{"path":"src/core/context.ts","kind":"import-statement","original":"../core/context"}],"format":"esm"},"src/server/index.ts":{"bytes":243,"imports":[{"path":"src/server/renderToString.ts","kind":"import-statement","original":"./renderToString"},{"path":"src/server/serverState.ts","kind":"import-statement","original":"./serverState"}],"format":"esm"},"src/css/runtime/hash.ts":{"bytes":290,"imports":[],"format":"esm"},"src/css/runtime/serialize.ts":{"bytes":2900,"imports":[],"format":"esm"},"src/css/runtime/sheet.ts":{"bytes":2860,"imports":[],"format":"esm"},"src/css/css.ts":{"bytes":1214,"imports":[{"path":"src/css/runtime/hash.ts","kind":"import-statement","original":"./runtime/hash"},{"path":"src/css/runtime/serialize.ts","kind":"import-statement","original":"./runtime/serialize"},{"path":"src/css/runtime/sheet.ts","kind":"import-statement","original":"./runtime/sheet"}],"format":"esm"},"src/css/styled.ts":{"bytes":5571,"imports":[{"path":"src/css/css.ts","kind":"import-statement","original":"./css"}],"format":"esm"},"src/css/keyframes.ts":{"bytes":1005,"imports":[{"path":"src/css/runtime/hash.ts","kind":"import-statement","original":"./runtime/hash"},{"path":"src/css/runtime/serialize.ts","kind":"import-statement","original":"./runtime/serialize"},{"path":"src/css/runtime/sheet.ts","kind":"import-statement","original":"./runtime/sheet"}],"format":"esm"},"src/css/index.ts":{"bytes":1086,"imports":[{"path":"src/css/css.ts","kind":"import-statement","original":"./css"},{"path":"src/css/styled.ts","kind":"import-statement","original":"./styled"},{"path":"src/css/keyframes.ts","kind":"import-statement","original":"./keyframes"},{"path":"src/css/runtime/sheet.ts","kind":"import-statement","original":"./runtime/sheet"}],"format":"esm"},"src/index.ts":{"bytes":219,"imports":[{"path":"src/core/index.ts","kind":"import-statement","original":"./core"},{"path":"src/dom/index.ts","kind":"import-statement","original":"./dom"},{"path":"src/router/index.ts","kind":"import-statement","original":"./router"},{"path":"src/server/index.ts","kind":"import-statement","original":"./server"},{"path":"src/css/index.ts","kind":"import-statement","original":"./css"}],"format":"esm"},"src/jsx-dev-runtime.ts":{"bytes":211,"imports":[{"path":"src/jsx-runtime.ts","kind":"import-statement","original":"./jsx-runtime"}],"format":"esm"}},"outputs":{"dist/render-FMQNBA7X.js.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"dist/render-FMQNBA7X.js":{"imports":[{"path":"dist/chunk-4E3YIGJX.js","kind":"import-statement"},{"path":"dist/chunk-3CKIHQIE.js","kind":"import-statement"},{"path":"dist/chunk-OU6XJZ76.js","kind":"import-statement"}],"exports":["reconcile","render","renderNode","resetRender"],"entryPoint":"src/dom/render.ts","inputs":{},"bytes":166},"dist/index.js.map":{"imports":[],"exports":[],"inputs":{},"bytes":365},"dist/index.js":{"imports":[{"path":"dist/chunk-AD2E2FQE.js","kind":"import-statement"},{"path":"dist/chunk-47EPSC5Q.js","kind":"import-statement"},{"path":"dist/chunk-4E3YIGJX.js","kind":"import-statement"},{"path":"dist/chunk-A4VGFEMF.js","kind":"import-statement"},{"path":"dist/chunk-FPEJ43DE.js","kind":"import-statement"},{"path":"dist/chunk-BP5PDE6F.js","kind":"import-statement"},{"path":"dist/chunk-3CKIHQIE.js","kind":"import-statement"},{"path":"dist/chunk-OU6XJZ76.js","kind":"import-statement"},{"path":"dist/chunk-ZJZRDYA2.js","kind":"import-statement"},{"path":"dist/chunk-TFXBDC6C.js","kind":"import-statement"}],"exports":["Context","ErrorBoundary","Link","Outlet","Route","Routes","Suspense","Useable","VERSION","css","cx","f","getContextValue","getIsServer","getNavigate","getStyleTag","getStyles","hydrate","hydrateStyles","isReactive","isUseable","keyframes","lazy","popContext","pushContext","render","renderToStaticMarkup","renderToString","resetContext","resetRender","resetRouter","resetStyles","styled","sync","use","useLocation","useNavigate","useParams","useQuery","useRef","useRouter"],"entryPoint":"src/index.ts","inputs":{"src/index.ts":{"bytesInOutput":16}},"bytes":1217},"dist/core.js.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"dist/core.js":{"imports":[{"path":"dist/chunk-AD2E2FQE.js","kind":"import-statement"},{"path":"dist/chunk-BP5PDE6F.js","kind":"import-statement"},{"path":"dist/chunk-3CKIHQIE.js","kind":"import-statement"},{"path":"dist/chunk-OU6XJZ76.js","kind":"import-statement"}],"exports":["Context","Useable","getContextValue","isReactive","isUseable","popContext","pushContext","resetContext","sync","use","useRef"],"entryPoint":"src/core/index.ts","inputs":{},"bytes":338},"dist/chunk-AD2E2FQE.js.map":{"imports":[],"exports":[],"inputs":{},"bytes":1066},"dist/chunk-AD2E2FQE.js":{"imports":[{"path":"dist/chunk-OU6XJZ76.js","kind":"import-statement"}],"exports":["a"],"inputs":{"src/core/index.ts":{"bytesInOutput":0},"src/core/ref.ts":{"bytesInOutput":42}},"bytes":98},"dist/dom.js.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"dist/dom.js":{"imports":[{"path":"dist/chunk-47EPSC5Q.js","kind":"import-statement"},{"path":"dist/chunk-4E3YIGJX.js","kind":"import-statement"},{"path":"dist/chunk-BP5PDE6F.js","kind":"import-statement"},{"path":"dist/chunk-3CKIHQIE.js","kind":"import-statement"},{"path":"dist/chunk-OU6XJZ76.js","kind":"import-statement"}],"exports":["ErrorBoundary","Suspense","f","hydrate","lazy","render","resetRender"],"entryPoint":"src/dom/index.ts","inputs":{},"bytes":295},"dist/chunk-47EPSC5Q.js.map":{"imports":[],"exports":[],"inputs":{},"bytes":26910},"dist/chunk-47EPSC5Q.js":{"imports":[{"path":"dist/chunk-4E3YIGJX.js","kind":"import-statement"},{"path":"dist/chunk-BP5PDE6F.js","kind":"import-statement"},{"path":"dist/chunk-3CKIHQIE.js","kind":"import-statement"},{"path":"dist/chunk-OU6XJZ76.js","kind":"import-statement"},{"path":"dist/render-FMQNBA7X.js","kind":"dynamic-import"}],"exports":["a","b","c","d","e"],"inputs":{"src/dom/f.ts":{"bytesInOutput":70},"src/dom/index.ts":{"bytesInOutput":0},"src/dom/hydrate.ts":{"bytesInOutput":3135},"src/dom/components/suspenseContext.ts":{"bytesInOutput":86},"src/dom/components/Suspense.tsx":{"bytesInOutput":293},"src/dom/components/index.ts":{"bytesInOutput":0},"src/dom/components/ErrorBoundary.tsx":{"bytesInOutput":508},"src/dom/components/lazy.ts":{"bytesInOutput":249}},"bytes":4580},"dist/chunk-4E3YIGJX.js.map":{"imports":[],"exports":[],"inputs":{},"bytes":25574},"dist/chunk-4E3YIGJX.js":{"imports":[{"path":"dist/chunk-3CKIHQIE.js","kind":"import-statement"},{"path":"dist/chunk-OU6XJZ76.js","kind":"import-statement"}],"exports":["a","b","c","d"],"inputs":{"src/dom/render.ts":{"bytesInOutput":5056}},"bytes":5180},"dist/server.js.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"dist/server.js":{"imports":[{"path":"dist/chunk-A4VGFEMF.js","kind":"import-statement"},{"path":"dist/chunk-OU6XJZ76.js","kind":"import-statement"}],"exports":["getIsServer","renderToStaticMarkup","renderToString"],"entryPoint":"src/server/index.ts","inputs":{},"bytes":139},"dist/chunk-A4VGFEMF.js.map":{"imports":[],"exports":[],"inputs":{},"bytes":12945},"dist/chunk-A4VGFEMF.js":{"imports":[{"path":"dist/chunk-OU6XJZ76.js","kind":"import-statement"}],"exports":["a","b","c"],"inputs":{"src/server/escape.ts":{"bytesInOutput":157},"src/server/serverState.ts":{"bytesInOutput":186},"src/server/renderToString.ts":{"bytesInOutput":2125},"src/server/index.ts":{"bytesInOutput":0}},"bytes":2552},"dist/router.js.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"dist/router.js":{"imports":[{"path":"dist/chunk-FPEJ43DE.js","kind":"import-statement"},{"path":"dist/chunk-BP5PDE6F.js","kind":"import-statement"},{"path":"dist/chunk-3CKIHQIE.js","kind":"import-statement"},{"path":"dist/chunk-OU6XJZ76.js","kind":"import-statement"},{"path":"dist/chunk-TFXBDC6C.js","kind":"import-statement"}],"exports":["Link","Outlet","Route","Routes","getNavigate","resetRouter","useLocation","useNavigate","useParams","useQuery","useRouter"],"entryPoint":"src/router/index.ts","inputs":{},"bytes":333},"dist/chunk-FPEJ43DE.js.map":{"imports":[],"exports":[],"inputs":{},"bytes":22069},"dist/chunk-FPEJ43DE.js":{"imports":[{"path":"dist/chunk-BP5PDE6F.js","kind":"import-statement"},{"path":"dist/chunk-OU6XJZ76.js","kind":"import-statement"},{"path":"dist/chunk-TFXBDC6C.js","kind":"import-statement"}],"exports":["a","b","c","d","e","f","g","h","i","j","k"],"inputs":{"src/router/index.ts":{"bytesInOutput":0},"src/router/utils.ts":{"bytesInOutput":1097},"src/router/router.ts":{"bytesInOutput":1456},"src/router/dom/Route.tsx":{"bytesInOutput":26},"src/router/dom/Routes.tsx":{"bytesInOutput":891},"src/router/dom/Outlet.tsx":{"bytesInOutput":244},"src/router/dom/Link.tsx":{"bytesInOutput":225}},"bytes":4152},"dist/chunk-BP5PDE6F.js.map":{"imports":[],"exports":[],"inputs":{},"bytes":19014},"dist/chunk-BP5PDE6F.js":{"imports":[{"path":"dist/chunk-3CKIHQIE.js","kind":"import-statement"},{"path":"dist/chunk-OU6XJZ76.js","kind":"import-statement"}],"exports":["a","b","c"],"inputs":{"src/core/reactive.ts":{"bytesInOutput":590},"src/core/devtools.ts":{"bytesInOutput":372},"src/core/use.ts":{"bytesInOutput":2119}},"bytes":3219},"dist/chunk-3CKIHQIE.js.map":{"imports":[],"exports":[],"inputs":{},"bytes":4599},"dist/chunk-3CKIHQIE.js":{"imports":[],"exports":["a","b","c","d","e"],"inputs":{"src/core/lifecycle.ts":{"bytesInOutput":813}},"bytes":857},"dist/chunk-OU6XJZ76.js.map":{"imports":[],"exports":[],"inputs":{},"bytes":7505},"dist/chunk-OU6XJZ76.js":{"imports":[],"exports":["a","b","c","d","e","f","g","h","i"],"inputs":{"src/core/hook.ts":{"bytesInOutput":227},"src/core/useable.ts":{"bytesInOutput":151},"src/core/context.ts":{"bytesInOutput":424}},"bytes":874},"dist/css.js.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"dist/css.js":{"imports":[{"path":"dist/chunk-ZJZRDYA2.js","kind":"import-statement"}],"exports":["css","cx","getStyleTag","getStyles","hydrateStyles","keyframes","resetStyles","styled"],"entryPoint":"src/css/index.ts","inputs":{},"bytes":170},"dist/chunk-ZJZRDYA2.js.map":{"imports":[],"exports":[],"inputs":{},"bytes":20385},"dist/chunk-ZJZRDYA2.js":{"imports":[],"exports":["a","b","c","d","e","f","g","h"],"inputs":{"src/css/runtime/hash.ts":{"bytesInOutput":112},"src/css/runtime/serialize.ts":{"bytesInOutput":1199},"src/css/runtime/sheet.ts":{"bytesInOutput":892},"src/css/css.ts":{"bytesInOutput":147},"src/css/index.ts":{"bytesInOutput":0},"src/css/styled.ts":{"bytesInOutput":777},"src/css/keyframes.ts":{"bytesInOutput":91}},"bytes":3283},"dist/jsx-runtime.js.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"dist/jsx-runtime.js":{"imports":[{"path":"dist/chunk-TFXBDC6C.js","kind":"import-statement"}],"exports":["Fragment","jsx","jsxDEV","jsxs"],"entryPoint":"src/jsx-runtime.ts","inputs":{},"bytes":95},"dist/jsx-dev-runtime.js.map":{"imports":[],"exports":[],"inputs":{},"bytes":510},"dist/jsx-dev-runtime.js":{"imports":[{"path":"dist/chunk-TFXBDC6C.js","kind":"import-statement"}],"exports":["Fragment","jsxDEV"],"entryPoint":"src/jsx-dev-runtime.ts","inputs":{"src/jsx-dev-runtime.ts":{"bytesInOutput":40}},"bytes":122},"dist/chunk-TFXBDC6C.js.map":{"imports":[],"exports":[],"inputs":{},"bytes":1544},"dist/chunk-TFXBDC6C.js":{"imports":[],"exports":["a","b","c","d"],"inputs":{"src/jsx-runtime.ts":{"bytesInOutput":217}},"bytes":254}}}
@@ -1 +1 @@
1
- {"inputs":{"src/core/lifecycle.ts":{"bytes":2686,"imports":[],"format":"esm"},"src/core/reactive.ts":{"bytes":2080,"imports":[{"path":"src/core/lifecycle.ts","kind":"import-statement","original":"./lifecycle"}],"format":"esm"},"src/core/hook.ts":{"bytes":986,"imports":[],"format":"esm"},"src/core/devtools.ts":{"bytes":1841,"imports":[],"format":"esm"},"src/core/useable.ts":{"bytes":2083,"imports":[],"format":"esm"},"src/core/context.ts":{"bytes":2473,"imports":[{"path":"src/core/useable.ts","kind":"import-statement","original":"./useable"}],"format":"esm"},"src/core/use.ts":{"bytes":8860,"imports":[{"path":"src/core/reactive.ts","kind":"import-statement","original":"./reactive"},{"path":"src/core/lifecycle.ts","kind":"import-statement","original":"./lifecycle"},{"path":"src/core/hook.ts","kind":"import-statement","original":"./hook"},{"path":"src/core/devtools.ts","kind":"import-statement","original":"./devtools"},{"path":"./context","kind":"import-statement","external":true},{"path":"src/core/useable.ts","kind":"import-statement","original":"./useable"},{"path":"src/core/context.ts","kind":"import-statement","original":"./context"},{"path":"src/core/useable.ts","kind":"import-statement","original":"./useable"}],"format":"esm"},"src/core/ref.ts":{"bytes":812,"imports":[{"path":"src/core/hook.ts","kind":"import-statement","original":"./hook"}],"format":"esm"},"src/core/index.ts":{"bytes":525,"imports":[{"path":"src/core/use.ts","kind":"import-statement","original":"./use"},{"path":"src/core/lifecycle.ts","kind":"import-statement","original":"./lifecycle"},{"path":"src/core/ref.ts","kind":"import-statement","original":"./ref"},{"path":"src/core/useable.ts","kind":"import-statement","original":"./useable"},{"path":"src/core/context.ts","kind":"import-statement","original":"./context"},{"path":"src/core/reactive.ts","kind":"import-statement","original":"./reactive"}],"format":"esm"},"src/dom/f.ts":{"bytes":285,"imports":[],"format":"esm"},"src/dom/render.ts":{"bytes":16363,"imports":[{"path":"src/core/context.ts","kind":"import-statement","original":"../core/context"},{"path":"src/core/hook.ts","kind":"import-statement","original":"../core/hook"},{"path":"src/core/lifecycle.ts","kind":"import-statement","original":"../core/lifecycle"}],"format":"esm"},"src/dom/hydrate.ts":{"bytes":10437,"imports":[{"path":"src/core/hook.ts","kind":"import-statement","original":"../core/hook"},{"path":"src/core/context.ts","kind":"import-statement","original":"../core/context"},{"path":"src/core/lifecycle.ts","kind":"import-statement","original":"../core/lifecycle"},{"path":"src/dom/render.ts","kind":"import-statement","original":"./render"},{"path":"src/dom/render.ts","kind":"dynamic-import","original":"./render"}],"format":"esm"},"src/dom/components/suspenseContext.ts":{"bytes":412,"imports":[{"path":"src/core/context.ts","kind":"import-statement","original":"../../core/context"},{"path":"src/core/use.ts","kind":"import-statement","original":"../../core/use"}],"format":"esm"},"src/dom/components/Suspense.tsx":{"bytes":1770,"imports":[{"path":"src/core/use.ts","kind":"import-statement","original":"../../core/use"},{"path":"src/core/hook.ts","kind":"import-statement","original":"../../core/hook"},{"path":"src/dom/components/suspenseContext.ts","kind":"import-statement","original":"./suspenseContext"}],"format":"esm"},"src/dom/components/ErrorBoundary.tsx":{"bytes":2854,"imports":[{"path":"src/core/use.ts","kind":"import-statement","original":"../../core/use"},{"path":"src/core/hook.ts","kind":"import-statement","original":"../../core/hook"}],"format":"esm"},"src/dom/components/lazy.ts":{"bytes":1767,"imports":[{"path":"src/dom/components/suspenseContext.ts","kind":"import-statement","original":"./suspenseContext"}],"format":"esm"},"src/dom/components/index.ts":{"bytes":549,"imports":[{"path":"src/dom/components/Suspense.tsx","kind":"import-statement","original":"./Suspense"},{"path":"src/dom/components/ErrorBoundary.tsx","kind":"import-statement","original":"./ErrorBoundary"},{"path":"src/dom/components/lazy.ts","kind":"import-statement","original":"./lazy"},{"path":"src/dom/components/suspenseContext.ts","kind":"import-statement","original":"./suspenseContext"},{"path":"src/dom/components/ErrorBoundary.tsx","kind":"import-statement","original":"./ErrorBoundary"}],"format":"esm"},"src/dom/index.ts":{"bytes":361,"imports":[{"path":"src/dom/f.ts","kind":"import-statement","original":"./f"},{"path":"src/dom/render.ts","kind":"import-statement","original":"./render"},{"path":"src/dom/hydrate.ts","kind":"import-statement","original":"./hydrate"},{"path":"src/dom/components/index.ts","kind":"import-statement","original":"./components"}],"format":"esm"},"src/router/types.ts":{"bytes":845,"imports":[],"format":"esm"},"src/router/utils.ts":{"bytes":3833,"imports":[{"path":"./types","kind":"import-statement","external":true}],"format":"esm"},"src/router/router.ts":{"bytes":5238,"imports":[{"path":"src/core/reactive.ts","kind":"import-statement","original":"../core/reactive"},{"path":"src/core/context.ts","kind":"import-statement","original":"../core/context"},{"path":"src/core/use.ts","kind":"import-statement","original":"../core/use"},{"path":"src/router/utils.ts","kind":"import-statement","original":"./utils"}],"format":"esm"},"src/jsx-runtime.ts":{"bytes":897,"imports":[],"format":"esm"},"src/router/dom/Route.tsx":{"bytes":106,"imports":[],"format":"esm"},"src/router/dom/Routes.tsx":{"bytes":3343,"imports":[{"path":"src/jsx-runtime.ts","kind":"import-statement","original":"../../jsx-runtime"},{"path":"src/router/router.ts","kind":"import-statement","original":"../router"},{"path":"src/router/utils.ts","kind":"import-statement","original":"../utils"},{"path":"src/router/dom/Route.tsx","kind":"import-statement","original":"./Route"}],"format":"esm"},"src/router/dom/Outlet.tsx":{"bytes":744,"imports":[{"path":"src/core/use.ts","kind":"import-statement","original":"../../core/use"},{"path":"src/jsx-runtime.ts","kind":"import-statement","original":"../../jsx-runtime"},{"path":"src/router/router.ts","kind":"import-statement","original":"../router"}],"format":"esm"},"src/router/dom/Link.tsx":{"bytes":748,"imports":[{"path":"src/jsx-runtime.ts","kind":"import-statement","original":"../../jsx-runtime"},{"path":"src/router/router.ts","kind":"import-statement","original":"../router"}],"format":"esm"},"src/router/index.ts":{"bytes":335,"imports":[{"path":"src/router/types.ts","kind":"import-statement","original":"./types"},{"path":"src/router/router.ts","kind":"import-statement","original":"./router"},{"path":"src/router/dom/Routes.tsx","kind":"import-statement","original":"./dom/Routes"},{"path":"src/router/dom/Route.tsx","kind":"import-statement","original":"./dom/Route"},{"path":"src/router/dom/Outlet.tsx","kind":"import-statement","original":"./dom/Outlet"},{"path":"src/router/dom/Link.tsx","kind":"import-statement","original":"./dom/Link"}],"format":"esm"},"src/server/escape.ts":{"bytes":364,"imports":[],"format":"esm"},"src/server/serverState.ts":{"bytes":896,"imports":[],"format":"esm"},"src/server/renderToString.ts":{"bytes":6572,"imports":[{"path":"src/server/escape.ts","kind":"import-statement","original":"./escape"},{"path":"src/server/serverState.ts","kind":"import-statement","original":"./serverState"},{"path":"src/core/hook.ts","kind":"import-statement","original":"../core/hook"},{"path":"src/core/context.ts","kind":"import-statement","original":"../core/context"}],"format":"esm"},"src/server/index.ts":{"bytes":243,"imports":[{"path":"src/server/renderToString.ts","kind":"import-statement","original":"./renderToString"},{"path":"src/server/serverState.ts","kind":"import-statement","original":"./serverState"}],"format":"esm"},"src/css/runtime/hash.ts":{"bytes":290,"imports":[],"format":"esm"},"src/css/runtime/serialize.ts":{"bytes":2900,"imports":[],"format":"esm"},"src/css/runtime/sheet.ts":{"bytes":2860,"imports":[],"format":"esm"},"src/css/css.ts":{"bytes":1214,"imports":[{"path":"src/css/runtime/hash.ts","kind":"import-statement","original":"./runtime/hash"},{"path":"src/css/runtime/serialize.ts","kind":"import-statement","original":"./runtime/serialize"},{"path":"src/css/runtime/sheet.ts","kind":"import-statement","original":"./runtime/sheet"}],"format":"esm"},"src/css/styled.ts":{"bytes":5571,"imports":[{"path":"src/css/css.ts","kind":"import-statement","original":"./css"}],"format":"esm"},"src/css/keyframes.ts":{"bytes":1005,"imports":[{"path":"src/css/runtime/hash.ts","kind":"import-statement","original":"./runtime/hash"},{"path":"src/css/runtime/serialize.ts","kind":"import-statement","original":"./runtime/serialize"},{"path":"src/css/runtime/sheet.ts","kind":"import-statement","original":"./runtime/sheet"}],"format":"esm"},"src/css/index.ts":{"bytes":1086,"imports":[{"path":"src/css/css.ts","kind":"import-statement","original":"./css"},{"path":"src/css/styled.ts","kind":"import-statement","original":"./styled"},{"path":"src/css/keyframes.ts","kind":"import-statement","original":"./keyframes"},{"path":"src/css/runtime/sheet.ts","kind":"import-statement","original":"./runtime/sheet"}],"format":"esm"},"src/index.ts":{"bytes":219,"imports":[{"path":"src/core/index.ts","kind":"import-statement","original":"./core"},{"path":"src/dom/index.ts","kind":"import-statement","original":"./dom"},{"path":"src/router/index.ts","kind":"import-statement","original":"./router"},{"path":"src/server/index.ts","kind":"import-statement","original":"./server"},{"path":"src/css/index.ts","kind":"import-statement","original":"./css"}],"format":"esm"},"src/jsx-dev-runtime.ts":{"bytes":211,"imports":[{"path":"src/jsx-runtime.ts","kind":"import-statement","original":"./jsx-runtime"}],"format":"esm"}},"outputs":{"dist/render-HZQ6HEMS.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"dist/render-HZQ6HEMS.mjs":{"imports":[{"path":"dist/chunk-P6NMD5QH.mjs","kind":"import-statement"},{"path":"dist/chunk-NRPWBHKP.mjs","kind":"import-statement"},{"path":"dist/chunk-TIUNOZRI.mjs","kind":"import-statement"}],"exports":["reconcile","render","renderNode","resetRender"],"entryPoint":"src/dom/render.ts","inputs":{},"bytes":169},"dist/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":365},"dist/index.mjs":{"imports":[{"path":"dist/chunk-VB564E5E.mjs","kind":"import-statement"},{"path":"dist/chunk-33M3W7D4.mjs","kind":"import-statement"},{"path":"dist/chunk-P6NMD5QH.mjs","kind":"import-statement"},{"path":"dist/chunk-UQNPGF7C.mjs","kind":"import-statement"},{"path":"dist/chunk-6237HPKV.mjs","kind":"import-statement"},{"path":"dist/chunk-FJNIW7B2.mjs","kind":"import-statement"},{"path":"dist/chunk-NRPWBHKP.mjs","kind":"import-statement"},{"path":"dist/chunk-TIUNOZRI.mjs","kind":"import-statement"},{"path":"dist/chunk-FU4W2BKL.mjs","kind":"import-statement"},{"path":"dist/chunk-RUYGSYEV.mjs","kind":"import-statement"}],"exports":["Context","ErrorBoundary","Link","Outlet","Route","Routes","Suspense","Useable","VERSION","css","cx","f","getContextValue","getIsServer","getNavigate","getStyleTag","getStyles","hydrate","hydrateStyles","isReactive","isUseable","keyframes","lazy","popContext","pushContext","render","renderToStaticMarkup","renderToString","resetContext","resetRender","resetRouter","resetStyles","styled","sync","use","useLocation","useNavigate","useParams","useQuery","useRef","useRouter"],"entryPoint":"src/index.ts","inputs":{"src/index.ts":{"bytesInOutput":16}},"bytes":1227},"dist/core.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"dist/core.mjs":{"imports":[{"path":"dist/chunk-VB564E5E.mjs","kind":"import-statement"},{"path":"dist/chunk-FJNIW7B2.mjs","kind":"import-statement"},{"path":"dist/chunk-NRPWBHKP.mjs","kind":"import-statement"},{"path":"dist/chunk-TIUNOZRI.mjs","kind":"import-statement"}],"exports":["Context","Useable","getContextValue","isReactive","isUseable","popContext","pushContext","resetContext","sync","use","useRef"],"entryPoint":"src/core/index.ts","inputs":{},"bytes":342},"dist/chunk-VB564E5E.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":1066},"dist/chunk-VB564E5E.mjs":{"imports":[{"path":"dist/chunk-TIUNOZRI.mjs","kind":"import-statement"}],"exports":["a"],"inputs":{"src/core/index.ts":{"bytesInOutput":0},"src/core/ref.ts":{"bytesInOutput":42}},"bytes":99},"dist/dom.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"dist/dom.mjs":{"imports":[{"path":"dist/chunk-33M3W7D4.mjs","kind":"import-statement"},{"path":"dist/chunk-P6NMD5QH.mjs","kind":"import-statement"},{"path":"dist/chunk-FJNIW7B2.mjs","kind":"import-statement"},{"path":"dist/chunk-NRPWBHKP.mjs","kind":"import-statement"},{"path":"dist/chunk-TIUNOZRI.mjs","kind":"import-statement"}],"exports":["ErrorBoundary","Suspense","f","hydrate","lazy","render","resetRender"],"entryPoint":"src/dom/index.ts","inputs":{},"bytes":300},"dist/chunk-33M3W7D4.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":26910},"dist/chunk-33M3W7D4.mjs":{"imports":[{"path":"dist/chunk-P6NMD5QH.mjs","kind":"import-statement"},{"path":"dist/chunk-FJNIW7B2.mjs","kind":"import-statement"},{"path":"dist/chunk-NRPWBHKP.mjs","kind":"import-statement"},{"path":"dist/chunk-TIUNOZRI.mjs","kind":"import-statement"},{"path":"dist/render-HZQ6HEMS.mjs","kind":"dynamic-import"}],"exports":["a","b","c","d","e"],"inputs":{"src/dom/f.ts":{"bytesInOutput":70},"src/dom/index.ts":{"bytesInOutput":0},"src/dom/hydrate.ts":{"bytesInOutput":3136},"src/dom/components/suspenseContext.ts":{"bytesInOutput":86},"src/dom/components/Suspense.tsx":{"bytesInOutput":293},"src/dom/components/index.ts":{"bytesInOutput":0},"src/dom/components/ErrorBoundary.tsx":{"bytesInOutput":508},"src/dom/components/lazy.ts":{"bytesInOutput":249}},"bytes":4585},"dist/chunk-P6NMD5QH.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":25574},"dist/chunk-P6NMD5QH.mjs":{"imports":[{"path":"dist/chunk-NRPWBHKP.mjs","kind":"import-statement"},{"path":"dist/chunk-TIUNOZRI.mjs","kind":"import-statement"}],"exports":["a","b","c","d"],"inputs":{"src/dom/render.ts":{"bytesInOutput":5056}},"bytes":5182},"dist/server.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"dist/server.mjs":{"imports":[{"path":"dist/chunk-UQNPGF7C.mjs","kind":"import-statement"},{"path":"dist/chunk-TIUNOZRI.mjs","kind":"import-statement"}],"exports":["getIsServer","renderToStaticMarkup","renderToString"],"entryPoint":"src/server/index.ts","inputs":{},"bytes":141},"dist/chunk-UQNPGF7C.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":12945},"dist/chunk-UQNPGF7C.mjs":{"imports":[{"path":"dist/chunk-TIUNOZRI.mjs","kind":"import-statement"}],"exports":["a","b","c"],"inputs":{"src/server/escape.ts":{"bytesInOutput":157},"src/server/serverState.ts":{"bytesInOutput":186},"src/server/renderToString.ts":{"bytesInOutput":2125},"src/server/index.ts":{"bytesInOutput":0}},"bytes":2553},"dist/router.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"dist/router.mjs":{"imports":[{"path":"dist/chunk-6237HPKV.mjs","kind":"import-statement"},{"path":"dist/chunk-FJNIW7B2.mjs","kind":"import-statement"},{"path":"dist/chunk-NRPWBHKP.mjs","kind":"import-statement"},{"path":"dist/chunk-TIUNOZRI.mjs","kind":"import-statement"},{"path":"dist/chunk-RUYGSYEV.mjs","kind":"import-statement"}],"exports":["Link","Outlet","Route","Routes","getNavigate","resetRouter","useLocation","useNavigate","useParams","useQuery","useRouter"],"entryPoint":"src/router/index.ts","inputs":{},"bytes":338},"dist/chunk-6237HPKV.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":21846},"dist/chunk-6237HPKV.mjs":{"imports":[{"path":"dist/chunk-FJNIW7B2.mjs","kind":"import-statement"},{"path":"dist/chunk-TIUNOZRI.mjs","kind":"import-statement"},{"path":"dist/chunk-RUYGSYEV.mjs","kind":"import-statement"}],"exports":["a","b","c","d","e","f","g","h","i","j","k"],"inputs":{"src/router/index.ts":{"bytesInOutput":0},"src/router/utils.ts":{"bytesInOutput":1097},"src/router/router.ts":{"bytesInOutput":1456},"src/router/dom/Route.tsx":{"bytesInOutput":26},"src/router/dom/Routes.tsx":{"bytesInOutput":787},"src/router/dom/Outlet.tsx":{"bytesInOutput":244},"src/router/dom/Link.tsx":{"bytesInOutput":225}},"bytes":4051},"dist/chunk-FJNIW7B2.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":19014},"dist/chunk-FJNIW7B2.mjs":{"imports":[{"path":"dist/chunk-NRPWBHKP.mjs","kind":"import-statement"},{"path":"dist/chunk-TIUNOZRI.mjs","kind":"import-statement"}],"exports":["a","b","c"],"inputs":{"src/core/reactive.ts":{"bytesInOutput":590},"src/core/devtools.ts":{"bytesInOutput":372},"src/core/use.ts":{"bytesInOutput":2119}},"bytes":3221},"dist/chunk-NRPWBHKP.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":4599},"dist/chunk-NRPWBHKP.mjs":{"imports":[],"exports":["a","b","c","d","e"],"inputs":{"src/core/lifecycle.ts":{"bytesInOutput":813}},"bytes":857},"dist/chunk-TIUNOZRI.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":7505},"dist/chunk-TIUNOZRI.mjs":{"imports":[],"exports":["a","b","c","d","e","f","g","h","i"],"inputs":{"src/core/hook.ts":{"bytesInOutput":227},"src/core/useable.ts":{"bytesInOutput":151},"src/core/context.ts":{"bytesInOutput":424}},"bytes":874},"dist/css.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"dist/css.mjs":{"imports":[{"path":"dist/chunk-FU4W2BKL.mjs","kind":"import-statement"}],"exports":["css","cx","getStyleTag","getStyles","hydrateStyles","keyframes","resetStyles","styled"],"entryPoint":"src/css/index.ts","inputs":{},"bytes":171},"dist/chunk-FU4W2BKL.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":20385},"dist/chunk-FU4W2BKL.mjs":{"imports":[],"exports":["a","b","c","d","e","f","g","h"],"inputs":{"src/css/runtime/hash.ts":{"bytesInOutput":112},"src/css/runtime/serialize.ts":{"bytesInOutput":1199},"src/css/runtime/sheet.ts":{"bytesInOutput":892},"src/css/css.ts":{"bytesInOutput":147},"src/css/index.ts":{"bytesInOutput":0},"src/css/styled.ts":{"bytesInOutput":777},"src/css/keyframes.ts":{"bytesInOutput":91}},"bytes":3283},"dist/jsx-runtime.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"dist/jsx-runtime.mjs":{"imports":[{"path":"dist/chunk-RUYGSYEV.mjs","kind":"import-statement"}],"exports":["Fragment","jsx","jsxDEV","jsxs"],"entryPoint":"src/jsx-runtime.ts","inputs":{},"bytes":96},"dist/jsx-dev-runtime.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":510},"dist/jsx-dev-runtime.mjs":{"imports":[{"path":"dist/chunk-RUYGSYEV.mjs","kind":"import-statement"}],"exports":["Fragment","jsxDEV"],"entryPoint":"src/jsx-dev-runtime.ts","inputs":{"src/jsx-dev-runtime.ts":{"bytesInOutput":40}},"bytes":123},"dist/chunk-RUYGSYEV.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":1544},"dist/chunk-RUYGSYEV.mjs":{"imports":[],"exports":["a","b","c","d"],"inputs":{"src/jsx-runtime.ts":{"bytesInOutput":217}},"bytes":254}}}
1
+ {"inputs":{"src/core/lifecycle.ts":{"bytes":2686,"imports":[],"format":"esm"},"src/core/reactive.ts":{"bytes":2080,"imports":[{"path":"src/core/lifecycle.ts","kind":"import-statement","original":"./lifecycle"}],"format":"esm"},"src/core/hook.ts":{"bytes":986,"imports":[],"format":"esm"},"src/core/devtools.ts":{"bytes":1841,"imports":[],"format":"esm"},"src/core/useable.ts":{"bytes":2083,"imports":[],"format":"esm"},"src/core/context.ts":{"bytes":2473,"imports":[{"path":"src/core/useable.ts","kind":"import-statement","original":"./useable"}],"format":"esm"},"src/core/use.ts":{"bytes":8860,"imports":[{"path":"src/core/reactive.ts","kind":"import-statement","original":"./reactive"},{"path":"src/core/lifecycle.ts","kind":"import-statement","original":"./lifecycle"},{"path":"src/core/hook.ts","kind":"import-statement","original":"./hook"},{"path":"src/core/devtools.ts","kind":"import-statement","original":"./devtools"},{"path":"./context","kind":"import-statement","external":true},{"path":"src/core/useable.ts","kind":"import-statement","original":"./useable"},{"path":"src/core/context.ts","kind":"import-statement","original":"./context"},{"path":"src/core/useable.ts","kind":"import-statement","original":"./useable"}],"format":"esm"},"src/core/ref.ts":{"bytes":812,"imports":[{"path":"src/core/hook.ts","kind":"import-statement","original":"./hook"}],"format":"esm"},"src/core/index.ts":{"bytes":525,"imports":[{"path":"src/core/use.ts","kind":"import-statement","original":"./use"},{"path":"src/core/lifecycle.ts","kind":"import-statement","original":"./lifecycle"},{"path":"src/core/ref.ts","kind":"import-statement","original":"./ref"},{"path":"src/core/useable.ts","kind":"import-statement","original":"./useable"},{"path":"src/core/context.ts","kind":"import-statement","original":"./context"},{"path":"src/core/reactive.ts","kind":"import-statement","original":"./reactive"}],"format":"esm"},"src/dom/f.ts":{"bytes":285,"imports":[],"format":"esm"},"src/dom/render.ts":{"bytes":16363,"imports":[{"path":"src/core/context.ts","kind":"import-statement","original":"../core/context"},{"path":"src/core/hook.ts","kind":"import-statement","original":"../core/hook"},{"path":"src/core/lifecycle.ts","kind":"import-statement","original":"../core/lifecycle"}],"format":"esm"},"src/dom/hydrate.ts":{"bytes":10437,"imports":[{"path":"src/core/hook.ts","kind":"import-statement","original":"../core/hook"},{"path":"src/core/context.ts","kind":"import-statement","original":"../core/context"},{"path":"src/core/lifecycle.ts","kind":"import-statement","original":"../core/lifecycle"},{"path":"src/dom/render.ts","kind":"import-statement","original":"./render"},{"path":"src/dom/render.ts","kind":"dynamic-import","original":"./render"}],"format":"esm"},"src/dom/components/suspenseContext.ts":{"bytes":412,"imports":[{"path":"src/core/context.ts","kind":"import-statement","original":"../../core/context"},{"path":"src/core/use.ts","kind":"import-statement","original":"../../core/use"}],"format":"esm"},"src/dom/components/Suspense.tsx":{"bytes":1770,"imports":[{"path":"src/core/use.ts","kind":"import-statement","original":"../../core/use"},{"path":"src/core/hook.ts","kind":"import-statement","original":"../../core/hook"},{"path":"src/dom/components/suspenseContext.ts","kind":"import-statement","original":"./suspenseContext"}],"format":"esm"},"src/dom/components/ErrorBoundary.tsx":{"bytes":2854,"imports":[{"path":"src/core/use.ts","kind":"import-statement","original":"../../core/use"},{"path":"src/core/hook.ts","kind":"import-statement","original":"../../core/hook"}],"format":"esm"},"src/dom/components/lazy.ts":{"bytes":1767,"imports":[{"path":"src/dom/components/suspenseContext.ts","kind":"import-statement","original":"./suspenseContext"}],"format":"esm"},"src/dom/components/index.ts":{"bytes":549,"imports":[{"path":"src/dom/components/Suspense.tsx","kind":"import-statement","original":"./Suspense"},{"path":"src/dom/components/ErrorBoundary.tsx","kind":"import-statement","original":"./ErrorBoundary"},{"path":"src/dom/components/lazy.ts","kind":"import-statement","original":"./lazy"},{"path":"src/dom/components/suspenseContext.ts","kind":"import-statement","original":"./suspenseContext"},{"path":"src/dom/components/ErrorBoundary.tsx","kind":"import-statement","original":"./ErrorBoundary"}],"format":"esm"},"src/dom/index.ts":{"bytes":361,"imports":[{"path":"src/dom/f.ts","kind":"import-statement","original":"./f"},{"path":"src/dom/render.ts","kind":"import-statement","original":"./render"},{"path":"src/dom/hydrate.ts","kind":"import-statement","original":"./hydrate"},{"path":"src/dom/components/index.ts","kind":"import-statement","original":"./components"}],"format":"esm"},"src/router/types.ts":{"bytes":845,"imports":[],"format":"esm"},"src/router/utils.ts":{"bytes":3833,"imports":[{"path":"./types","kind":"import-statement","external":true}],"format":"esm"},"src/router/router.ts":{"bytes":5238,"imports":[{"path":"src/core/reactive.ts","kind":"import-statement","original":"../core/reactive"},{"path":"src/core/context.ts","kind":"import-statement","original":"../core/context"},{"path":"src/core/use.ts","kind":"import-statement","original":"../core/use"},{"path":"src/router/utils.ts","kind":"import-statement","original":"./utils"}],"format":"esm"},"src/jsx-runtime.ts":{"bytes":897,"imports":[],"format":"esm"},"src/router/dom/Route.tsx":{"bytes":106,"imports":[],"format":"esm"},"src/router/dom/Routes.tsx":{"bytes":3482,"imports":[{"path":"src/jsx-runtime.ts","kind":"import-statement","original":"../../jsx-runtime"},{"path":"src/router/router.ts","kind":"import-statement","original":"../router"},{"path":"src/router/utils.ts","kind":"import-statement","original":"../utils"},{"path":"src/router/dom/Route.tsx","kind":"import-statement","original":"./Route"}],"format":"esm"},"src/router/dom/Outlet.tsx":{"bytes":744,"imports":[{"path":"src/core/use.ts","kind":"import-statement","original":"../../core/use"},{"path":"src/jsx-runtime.ts","kind":"import-statement","original":"../../jsx-runtime"},{"path":"src/router/router.ts","kind":"import-statement","original":"../router"}],"format":"esm"},"src/router/dom/Link.tsx":{"bytes":748,"imports":[{"path":"src/jsx-runtime.ts","kind":"import-statement","original":"../../jsx-runtime"},{"path":"src/router/router.ts","kind":"import-statement","original":"../router"}],"format":"esm"},"src/router/index.ts":{"bytes":335,"imports":[{"path":"src/router/types.ts","kind":"import-statement","original":"./types"},{"path":"src/router/router.ts","kind":"import-statement","original":"./router"},{"path":"src/router/dom/Routes.tsx","kind":"import-statement","original":"./dom/Routes"},{"path":"src/router/dom/Route.tsx","kind":"import-statement","original":"./dom/Route"},{"path":"src/router/dom/Outlet.tsx","kind":"import-statement","original":"./dom/Outlet"},{"path":"src/router/dom/Link.tsx","kind":"import-statement","original":"./dom/Link"}],"format":"esm"},"src/server/escape.ts":{"bytes":364,"imports":[],"format":"esm"},"src/server/serverState.ts":{"bytes":896,"imports":[],"format":"esm"},"src/server/renderToString.ts":{"bytes":6572,"imports":[{"path":"src/server/escape.ts","kind":"import-statement","original":"./escape"},{"path":"src/server/serverState.ts","kind":"import-statement","original":"./serverState"},{"path":"src/core/hook.ts","kind":"import-statement","original":"../core/hook"},{"path":"src/core/context.ts","kind":"import-statement","original":"../core/context"}],"format":"esm"},"src/server/index.ts":{"bytes":243,"imports":[{"path":"src/server/renderToString.ts","kind":"import-statement","original":"./renderToString"},{"path":"src/server/serverState.ts","kind":"import-statement","original":"./serverState"}],"format":"esm"},"src/css/runtime/hash.ts":{"bytes":290,"imports":[],"format":"esm"},"src/css/runtime/serialize.ts":{"bytes":2900,"imports":[],"format":"esm"},"src/css/runtime/sheet.ts":{"bytes":2860,"imports":[],"format":"esm"},"src/css/css.ts":{"bytes":1214,"imports":[{"path":"src/css/runtime/hash.ts","kind":"import-statement","original":"./runtime/hash"},{"path":"src/css/runtime/serialize.ts","kind":"import-statement","original":"./runtime/serialize"},{"path":"src/css/runtime/sheet.ts","kind":"import-statement","original":"./runtime/sheet"}],"format":"esm"},"src/css/styled.ts":{"bytes":5571,"imports":[{"path":"src/css/css.ts","kind":"import-statement","original":"./css"}],"format":"esm"},"src/css/keyframes.ts":{"bytes":1005,"imports":[{"path":"src/css/runtime/hash.ts","kind":"import-statement","original":"./runtime/hash"},{"path":"src/css/runtime/serialize.ts","kind":"import-statement","original":"./runtime/serialize"},{"path":"src/css/runtime/sheet.ts","kind":"import-statement","original":"./runtime/sheet"}],"format":"esm"},"src/css/index.ts":{"bytes":1086,"imports":[{"path":"src/css/css.ts","kind":"import-statement","original":"./css"},{"path":"src/css/styled.ts","kind":"import-statement","original":"./styled"},{"path":"src/css/keyframes.ts","kind":"import-statement","original":"./keyframes"},{"path":"src/css/runtime/sheet.ts","kind":"import-statement","original":"./runtime/sheet"}],"format":"esm"},"src/index.ts":{"bytes":219,"imports":[{"path":"src/core/index.ts","kind":"import-statement","original":"./core"},{"path":"src/dom/index.ts","kind":"import-statement","original":"./dom"},{"path":"src/router/index.ts","kind":"import-statement","original":"./router"},{"path":"src/server/index.ts","kind":"import-statement","original":"./server"},{"path":"src/css/index.ts","kind":"import-statement","original":"./css"}],"format":"esm"},"src/jsx-dev-runtime.ts":{"bytes":211,"imports":[{"path":"src/jsx-runtime.ts","kind":"import-statement","original":"./jsx-runtime"}],"format":"esm"}},"outputs":{"dist/render-HZQ6HEMS.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"dist/render-HZQ6HEMS.mjs":{"imports":[{"path":"dist/chunk-P6NMD5QH.mjs","kind":"import-statement"},{"path":"dist/chunk-NRPWBHKP.mjs","kind":"import-statement"},{"path":"dist/chunk-TIUNOZRI.mjs","kind":"import-statement"}],"exports":["reconcile","render","renderNode","resetRender"],"entryPoint":"src/dom/render.ts","inputs":{},"bytes":169},"dist/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":365},"dist/index.mjs":{"imports":[{"path":"dist/chunk-VB564E5E.mjs","kind":"import-statement"},{"path":"dist/chunk-33M3W7D4.mjs","kind":"import-statement"},{"path":"dist/chunk-P6NMD5QH.mjs","kind":"import-statement"},{"path":"dist/chunk-UQNPGF7C.mjs","kind":"import-statement"},{"path":"dist/chunk-2OBMCCAZ.mjs","kind":"import-statement"},{"path":"dist/chunk-FJNIW7B2.mjs","kind":"import-statement"},{"path":"dist/chunk-NRPWBHKP.mjs","kind":"import-statement"},{"path":"dist/chunk-TIUNOZRI.mjs","kind":"import-statement"},{"path":"dist/chunk-FU4W2BKL.mjs","kind":"import-statement"},{"path":"dist/chunk-RUYGSYEV.mjs","kind":"import-statement"}],"exports":["Context","ErrorBoundary","Link","Outlet","Route","Routes","Suspense","Useable","VERSION","css","cx","f","getContextValue","getIsServer","getNavigate","getStyleTag","getStyles","hydrate","hydrateStyles","isReactive","isUseable","keyframes","lazy","popContext","pushContext","render","renderToStaticMarkup","renderToString","resetContext","resetRender","resetRouter","resetStyles","styled","sync","use","useLocation","useNavigate","useParams","useQuery","useRef","useRouter"],"entryPoint":"src/index.ts","inputs":{"src/index.ts":{"bytesInOutput":16}},"bytes":1227},"dist/core.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"dist/core.mjs":{"imports":[{"path":"dist/chunk-VB564E5E.mjs","kind":"import-statement"},{"path":"dist/chunk-FJNIW7B2.mjs","kind":"import-statement"},{"path":"dist/chunk-NRPWBHKP.mjs","kind":"import-statement"},{"path":"dist/chunk-TIUNOZRI.mjs","kind":"import-statement"}],"exports":["Context","Useable","getContextValue","isReactive","isUseable","popContext","pushContext","resetContext","sync","use","useRef"],"entryPoint":"src/core/index.ts","inputs":{},"bytes":342},"dist/chunk-VB564E5E.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":1066},"dist/chunk-VB564E5E.mjs":{"imports":[{"path":"dist/chunk-TIUNOZRI.mjs","kind":"import-statement"}],"exports":["a"],"inputs":{"src/core/index.ts":{"bytesInOutput":0},"src/core/ref.ts":{"bytesInOutput":42}},"bytes":99},"dist/dom.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"dist/dom.mjs":{"imports":[{"path":"dist/chunk-33M3W7D4.mjs","kind":"import-statement"},{"path":"dist/chunk-P6NMD5QH.mjs","kind":"import-statement"},{"path":"dist/chunk-FJNIW7B2.mjs","kind":"import-statement"},{"path":"dist/chunk-NRPWBHKP.mjs","kind":"import-statement"},{"path":"dist/chunk-TIUNOZRI.mjs","kind":"import-statement"}],"exports":["ErrorBoundary","Suspense","f","hydrate","lazy","render","resetRender"],"entryPoint":"src/dom/index.ts","inputs":{},"bytes":300},"dist/chunk-33M3W7D4.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":26910},"dist/chunk-33M3W7D4.mjs":{"imports":[{"path":"dist/chunk-P6NMD5QH.mjs","kind":"import-statement"},{"path":"dist/chunk-FJNIW7B2.mjs","kind":"import-statement"},{"path":"dist/chunk-NRPWBHKP.mjs","kind":"import-statement"},{"path":"dist/chunk-TIUNOZRI.mjs","kind":"import-statement"},{"path":"dist/render-HZQ6HEMS.mjs","kind":"dynamic-import"}],"exports":["a","b","c","d","e"],"inputs":{"src/dom/f.ts":{"bytesInOutput":70},"src/dom/index.ts":{"bytesInOutput":0},"src/dom/hydrate.ts":{"bytesInOutput":3136},"src/dom/components/suspenseContext.ts":{"bytesInOutput":86},"src/dom/components/Suspense.tsx":{"bytesInOutput":293},"src/dom/components/index.ts":{"bytesInOutput":0},"src/dom/components/ErrorBoundary.tsx":{"bytesInOutput":508},"src/dom/components/lazy.ts":{"bytesInOutput":249}},"bytes":4585},"dist/chunk-P6NMD5QH.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":25574},"dist/chunk-P6NMD5QH.mjs":{"imports":[{"path":"dist/chunk-NRPWBHKP.mjs","kind":"import-statement"},{"path":"dist/chunk-TIUNOZRI.mjs","kind":"import-statement"}],"exports":["a","b","c","d"],"inputs":{"src/dom/render.ts":{"bytesInOutput":5056}},"bytes":5182},"dist/server.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"dist/server.mjs":{"imports":[{"path":"dist/chunk-UQNPGF7C.mjs","kind":"import-statement"},{"path":"dist/chunk-TIUNOZRI.mjs","kind":"import-statement"}],"exports":["getIsServer","renderToStaticMarkup","renderToString"],"entryPoint":"src/server/index.ts","inputs":{},"bytes":141},"dist/chunk-UQNPGF7C.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":12945},"dist/chunk-UQNPGF7C.mjs":{"imports":[{"path":"dist/chunk-TIUNOZRI.mjs","kind":"import-statement"}],"exports":["a","b","c"],"inputs":{"src/server/escape.ts":{"bytesInOutput":157},"src/server/serverState.ts":{"bytesInOutput":186},"src/server/renderToString.ts":{"bytesInOutput":2125},"src/server/index.ts":{"bytesInOutput":0}},"bytes":2553},"dist/router.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"dist/router.mjs":{"imports":[{"path":"dist/chunk-2OBMCCAZ.mjs","kind":"import-statement"},{"path":"dist/chunk-FJNIW7B2.mjs","kind":"import-statement"},{"path":"dist/chunk-NRPWBHKP.mjs","kind":"import-statement"},{"path":"dist/chunk-TIUNOZRI.mjs","kind":"import-statement"},{"path":"dist/chunk-RUYGSYEV.mjs","kind":"import-statement"}],"exports":["Link","Outlet","Route","Routes","getNavigate","resetRouter","useLocation","useNavigate","useParams","useQuery","useRouter"],"entryPoint":"src/router/index.ts","inputs":{},"bytes":338},"dist/chunk-2OBMCCAZ.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":22069},"dist/chunk-2OBMCCAZ.mjs":{"imports":[{"path":"dist/chunk-FJNIW7B2.mjs","kind":"import-statement"},{"path":"dist/chunk-TIUNOZRI.mjs","kind":"import-statement"},{"path":"dist/chunk-RUYGSYEV.mjs","kind":"import-statement"}],"exports":["a","b","c","d","e","f","g","h","i","j","k"],"inputs":{"src/router/index.ts":{"bytesInOutput":0},"src/router/utils.ts":{"bytesInOutput":1097},"src/router/router.ts":{"bytesInOutput":1456},"src/router/dom/Route.tsx":{"bytesInOutput":26},"src/router/dom/Routes.tsx":{"bytesInOutput":891},"src/router/dom/Outlet.tsx":{"bytesInOutput":244},"src/router/dom/Link.tsx":{"bytesInOutput":225}},"bytes":4155},"dist/chunk-FJNIW7B2.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":19014},"dist/chunk-FJNIW7B2.mjs":{"imports":[{"path":"dist/chunk-NRPWBHKP.mjs","kind":"import-statement"},{"path":"dist/chunk-TIUNOZRI.mjs","kind":"import-statement"}],"exports":["a","b","c"],"inputs":{"src/core/reactive.ts":{"bytesInOutput":590},"src/core/devtools.ts":{"bytesInOutput":372},"src/core/use.ts":{"bytesInOutput":2119}},"bytes":3221},"dist/chunk-NRPWBHKP.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":4599},"dist/chunk-NRPWBHKP.mjs":{"imports":[],"exports":["a","b","c","d","e"],"inputs":{"src/core/lifecycle.ts":{"bytesInOutput":813}},"bytes":857},"dist/chunk-TIUNOZRI.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":7505},"dist/chunk-TIUNOZRI.mjs":{"imports":[],"exports":["a","b","c","d","e","f","g","h","i"],"inputs":{"src/core/hook.ts":{"bytesInOutput":227},"src/core/useable.ts":{"bytesInOutput":151},"src/core/context.ts":{"bytesInOutput":424}},"bytes":874},"dist/css.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"dist/css.mjs":{"imports":[{"path":"dist/chunk-FU4W2BKL.mjs","kind":"import-statement"}],"exports":["css","cx","getStyleTag","getStyles","hydrateStyles","keyframes","resetStyles","styled"],"entryPoint":"src/css/index.ts","inputs":{},"bytes":171},"dist/chunk-FU4W2BKL.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":20385},"dist/chunk-FU4W2BKL.mjs":{"imports":[],"exports":["a","b","c","d","e","f","g","h"],"inputs":{"src/css/runtime/hash.ts":{"bytesInOutput":112},"src/css/runtime/serialize.ts":{"bytesInOutput":1199},"src/css/runtime/sheet.ts":{"bytesInOutput":892},"src/css/css.ts":{"bytesInOutput":147},"src/css/index.ts":{"bytesInOutput":0},"src/css/styled.ts":{"bytesInOutput":777},"src/css/keyframes.ts":{"bytesInOutput":91}},"bytes":3283},"dist/jsx-runtime.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"dist/jsx-runtime.mjs":{"imports":[{"path":"dist/chunk-RUYGSYEV.mjs","kind":"import-statement"}],"exports":["Fragment","jsx","jsxDEV","jsxs"],"entryPoint":"src/jsx-runtime.ts","inputs":{},"bytes":96},"dist/jsx-dev-runtime.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":510},"dist/jsx-dev-runtime.mjs":{"imports":[{"path":"dist/chunk-RUYGSYEV.mjs","kind":"import-statement"}],"exports":["Fragment","jsxDEV"],"entryPoint":"src/jsx-dev-runtime.ts","inputs":{"src/jsx-dev-runtime.ts":{"bytesInOutput":40}},"bytes":123},"dist/chunk-RUYGSYEV.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":1544},"dist/chunk-RUYGSYEV.mjs":{"imports":[],"exports":["a","b","c","d"],"inputs":{"src/jsx-runtime.ts":{"bytesInOutput":217}},"bytes":254}}}
package/dist/router.js CHANGED
@@ -1,2 +1,2 @@
1
- 'use strict';var chunkDDYQX5XV_js=require('./chunk-DDYQX5XV.js');require('./chunk-BP5PDE6F.js'),require('./chunk-3CKIHQIE.js'),require('./chunk-OU6XJZ76.js'),require('./chunk-TFXBDC6C.js');Object.defineProperty(exports,"Link",{enumerable:true,get:function(){return chunkDDYQX5XV_js.k}});Object.defineProperty(exports,"Outlet",{enumerable:true,get:function(){return chunkDDYQX5XV_js.j}});Object.defineProperty(exports,"Route",{enumerable:true,get:function(){return chunkDDYQX5XV_js.h}});Object.defineProperty(exports,"Routes",{enumerable:true,get:function(){return chunkDDYQX5XV_js.i}});Object.defineProperty(exports,"getNavigate",{enumerable:true,get:function(){return chunkDDYQX5XV_js.e}});Object.defineProperty(exports,"resetRouter",{enumerable:true,get:function(){return chunkDDYQX5XV_js.a}});Object.defineProperty(exports,"useLocation",{enumerable:true,get:function(){return chunkDDYQX5XV_js.b}});Object.defineProperty(exports,"useNavigate",{enumerable:true,get:function(){return chunkDDYQX5XV_js.d}});Object.defineProperty(exports,"useParams",{enumerable:true,get:function(){return chunkDDYQX5XV_js.f}});Object.defineProperty(exports,"useQuery",{enumerable:true,get:function(){return chunkDDYQX5XV_js.g}});Object.defineProperty(exports,"useRouter",{enumerable:true,get:function(){return chunkDDYQX5XV_js.c}});//# sourceMappingURL=router.js.map
1
+ 'use strict';var chunkFPEJ43DE_js=require('./chunk-FPEJ43DE.js');require('./chunk-BP5PDE6F.js'),require('./chunk-3CKIHQIE.js'),require('./chunk-OU6XJZ76.js'),require('./chunk-TFXBDC6C.js');Object.defineProperty(exports,"Link",{enumerable:true,get:function(){return chunkFPEJ43DE_js.k}});Object.defineProperty(exports,"Outlet",{enumerable:true,get:function(){return chunkFPEJ43DE_js.j}});Object.defineProperty(exports,"Route",{enumerable:true,get:function(){return chunkFPEJ43DE_js.h}});Object.defineProperty(exports,"Routes",{enumerable:true,get:function(){return chunkFPEJ43DE_js.i}});Object.defineProperty(exports,"getNavigate",{enumerable:true,get:function(){return chunkFPEJ43DE_js.e}});Object.defineProperty(exports,"resetRouter",{enumerable:true,get:function(){return chunkFPEJ43DE_js.a}});Object.defineProperty(exports,"useLocation",{enumerable:true,get:function(){return chunkFPEJ43DE_js.b}});Object.defineProperty(exports,"useNavigate",{enumerable:true,get:function(){return chunkFPEJ43DE_js.d}});Object.defineProperty(exports,"useParams",{enumerable:true,get:function(){return chunkFPEJ43DE_js.f}});Object.defineProperty(exports,"useQuery",{enumerable:true,get:function(){return chunkFPEJ43DE_js.g}});Object.defineProperty(exports,"useRouter",{enumerable:true,get:function(){return chunkFPEJ43DE_js.c}});//# sourceMappingURL=router.js.map
2
2
  //# sourceMappingURL=router.js.map
package/dist/router.mjs CHANGED
@@ -1,2 +1,2 @@
1
- export{k as Link,j as Outlet,h as Route,i as Routes,e as getNavigate,a as resetRouter,b as useLocation,d as useNavigate,f as useParams,g as useQuery,c as useRouter}from'./chunk-6237HPKV.mjs';import'./chunk-FJNIW7B2.mjs';import'./chunk-NRPWBHKP.mjs';import'./chunk-TIUNOZRI.mjs';import'./chunk-RUYGSYEV.mjs';//# sourceMappingURL=router.mjs.map
1
+ export{k as Link,j as Outlet,h as Route,i as Routes,e as getNavigate,a as resetRouter,b as useLocation,d as useNavigate,f as useParams,g as useQuery,c as useRouter}from'./chunk-2OBMCCAZ.mjs';import'./chunk-FJNIW7B2.mjs';import'./chunk-NRPWBHKP.mjs';import'./chunk-TIUNOZRI.mjs';import'./chunk-RUYGSYEV.mjs';//# sourceMappingURL=router.mjs.map
2
2
  //# sourceMappingURL=router.mjs.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "flexium",
3
- "version": "0.16.17",
3
+ "version": "0.16.18",
4
4
  "description": "A lightweight, signals-based UI framework with cross-platform renderers",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -1,2 +0,0 @@
1
- import {a,c}from'./chunk-FJNIW7B2.mjs';import {f as f$1}from'./chunk-TIUNOZRI.mjs';import {a as a$1}from'./chunk-RUYGSYEV.mjs';function b(t){if(!t)return {};if(typeof URLSearchParams<"u"){let e=new URLSearchParams(t),r={};return e.forEach((n,i)=>r[i]=n),r}return t.substring(1).split("&").reduce((e,r)=>{let[n,i]=r.split("=");return n&&(e[decodeURIComponent(n)]=decodeURIComponent(i||"")),e},{})}function q(t){return !!(!t||typeof t!="string"||t.length>2048||t.includes("__proto__")||t.includes("constructor")||/^\s*javascript:/i.test(t))}function v(t){let e=[];return t.forEach(r=>{if(!r)return;let{path:n,component:i,children:a,beforeEnter:l}=r.props||{},c={path:n||"/",component:i,beforeEnter:l};if(a){let g=Array.isArray(a)?a:[a];c.children=v(g);}!c.children&&r.children&&r.children.length>0&&(c.children=v(r.children)),e.push(c);}),e}function A(t,e){for(let r of t){let n=r.path,i=j(n,e);if(i)return [{route:r,params:i.params,pathname:i.path}]}return null}function j(t,e){let r=t.split("/").filter(Boolean),n=e.split("/").filter(Boolean);if(r.length!==n.length)return null;let i={};for(let a=0;a<r.length;a++){let l=r[a],c=n[a];if(l.startsWith(":")){let g=l.slice(1);i[g]=c;}else if(l!==c)return null}return {params:i,path:e}}var N=new f$1(null),h=new f$1(0),_=()=>({pathname:"/",search:"",hash:"",query:{}}),P=()=>{if(typeof window>"u")return _();let t=window.location.pathname;return (!t||t==="srcdoc"||t==="/srcdoc")&&(t="/"),{pathname:t,search:window.location.search,hash:window.location.hash,query:b(window.location.search)}},s=null,f=null,S=false;function I(){if(s){let t=P();s.pathname=t.pathname,s.search=t.search,s.hash=t.hash,s.query=t.query;}else s=null,f=null;}function d(){if(s&&f)return [s,f];s=a(P());let t=e=>{s&&(s.pathname=e.pathname,s.search=e.search,s.hash=e.hash,s.query=e.query);};return f=e=>{if(console.log("[Router] Navigate called:",e,"globalLocation:",s),typeof window>"u")return;if(q(e)){console.error("[Flexium Router] Blocked navigation to unsafe path:",e);return}try{window.history.pushState({},"",e);}catch{}let r={pathname:e.split("?")[0].split("#")[0],search:e.includes("?")?"?"+e.split("?")[1].split("#")[0]:"",hash:e.includes("#")?"#"+e.split("#")[1]:"",query:b(e.includes("?")?"?"+e.split("?")[1].split("#")[0]:"")};console.log("[Router] Updating location to:",r),t(r),console.log("[Router] After update, globalLocation:",s);},typeof window<"u"&&!S&&(window.addEventListener("popstate",()=>{t(P());}),S=true),[s,f]}function C(){let[t]=c(N);if(!t)throw new Error("useRouter() must be called within a <Routes> component");return t}function Q(){let[,t]=d();return t}function k(){return f||d(),f}function B(){return C().params}function M(){let[t]=d();return t.query}function p(t){return null}function R(t){return t&&typeof t=="object"&&("type"in t||Array.isArray(t))}function O(t){let[e,r]=d(),n=Array.isArray(t.children)?t.children:[t.children],i=n.filter(o=>R(o)&&o.type===p),a=n.findIndex(o=>R(o)&&o.type===p),l=[],c=[];a===-1?l=n.filter(o=>!R(o)||o.type!==p):(l=n.slice(0,a).filter(o=>!R(o)||o.type!==p),c=n.slice(a).filter(o=>!R(o)||o.type!==p));let g=v(i),D=e.pathname,m=A(g,D)||[],U=m.length>0?m[m.length-1].params:{},T={location:e,navigate:r,matches:m,params:U},L=null;if(m.length>0){let o=m[0],E=o.route.component,x=D;o.route.beforeEnter?o.route.beforeEnter(o.params)!==false&&(L=a$1(h.Provider,{value:1,key:x,children:a$1(E,{params:o.params,key:x})})):L=a$1(h.Provider,{value:1,key:x,children:a$1(E,{params:o.params,key:x})});}return a$1(N.Provider,{value:T,children:[...l,L,...c]})}function K(){let t=C(),[e]=c(h),r=e??0,[n]=c(()=>t.matches);if(r>=n.length)return null;let i=n[r],a=i.route.component;return i.route.beforeEnter&&i.route.beforeEnter(i.params)===false?null:a$1(h.Provider,{value:r+1,children:a$1(a,{params:i.params})})}function V(t){return a$1("a",{href:t.to,class:t.class||t.className,style:t.style?t.style+"; cursor: pointer;":"cursor: pointer;",onclick:e=>{console.log("Link clicked:",t.to),e.preventDefault(),k()(t.to);},children:t.children})}export{I as a,d as b,C as c,Q as d,k as e,B as f,M as g,p as h,O as i,K as j,V as k};//# sourceMappingURL=chunk-6237HPKV.mjs.map
2
- //# sourceMappingURL=chunk-6237HPKV.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/router/utils.ts","../src/router/router.ts","../src/router/dom/Route.tsx","../src/router/dom/Routes.tsx","../src/router/dom/Outlet.tsx","../src/router/dom/Link.tsx"],"names":["parseQuery","search","params","result","value","key","accumulator","part","isUnsafePath","path","createRoutesFromChildren","children","routes","child","component","subChildren","beforeEnter","route","nestedChildren","matchRoutes","locationPathname","routePath","matchResult","matchPath","locationPath","routeSegments","locationSegments","i","routeSegment","locationSegment","RouterCtx","Context","RouteDepthCtx","getDefaultLocation","getCurrentLocation","pathname","globalLocation","globalNavigate","popstateListenerAttached","resetRouter","initial","useLocation","reactive","updateLocation","newLocation","useRouter","routerContext","use","useNavigate","navigate","getNavigate","useParams","useQuery","location","Route","_props","isFNode","node","Routes","props","currentLocation","childrenList","routeNodes","firstRouteIndex","beforeRouteChildren","afterRouteChildren","routeDefinitions","currentPath","matches","matchedContent","rootMatch","Component","routeK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import { RouteDefinition, RouteMatch } from './types'\n\n// Simple query parser (native URLSearchParams fallback) - internal use only\nfunction parseQuery(search: string): Record<string, string> {\n if (!search) return {}\n if (typeof URLSearchParams !== 'undefined') {\n const params = new URLSearchParams(search)\n const result: Record<string, string> = {}\n params.forEach((value, key) => result[key] = value)\n return result\n }\n return search\n .substring(1)\n .split('&')\n .reduce((accumulator, part) => {\n const [key, value] = part.split('=')\n if (key) accumulator[decodeURIComponent(key)] = decodeURIComponent(value || '')\n return accumulator\n }, {} as Record<string, string>)\n}\n\nfunction isUnsafePath(path: string): boolean {\n // Handle undefined or null path\n if (!path || typeof path !== 'string') return true\n // Prevent prototype pollution or massive strings\n if (path.length > 2048) return true\n if (path.includes('__proto__') || path.includes('constructor')) return true\n // Basic XSS check for javascript: protocol\n if (/^\\s*javascript:/i.test(path)) return true\n return false\n}\n\n// Convert children FNodes to RouteDefinitions - internal use only\nfunction createRoutesFromChildren(children: any[]): RouteDefinition[] {\n const routes: RouteDefinition[] = []\n\n children.forEach(child => {\n if (!child) return\n\n // Assuming child is an FNode-like object (config)\n // In Flexium, Route component returns null, but 'createNode' isn't called here.\n // We are traversing the props passed to Router.\n\n const { path, component, children: subChildren, beforeEnter } = child.props || {}\n\n const route: RouteDefinition = {\n path: path || '/',\n component: component,\n beforeEnter\n }\n\n if (subChildren) {\n // If subChildren is array\n const nestedChildren = Array.isArray(subChildren) ? subChildren : [subChildren]\n // We expect the children of a Route to be other Routes\n // However, the 'children' prop in JSX might be the Route components themselves.\n route.children = createRoutesFromChildren(nestedChildren)\n }\n\n // Also check child.children if props.children is empty (direct FNode structure)\n if (!route.children && child.children && child.children.length > 0) {\n route.children = createRoutesFromChildren(child.children)\n }\n\n routes.push(route)\n })\n return routes\n}\n\n// Simple Matcher - internal use only\nfunction matchRoutes(routes: RouteDefinition[], locationPathname: string): RouteMatch[] | null {\n // We want to find the best matching branch\n\n for (const route of routes) {\n // 1. Match current segment\n // Simple exact match or parameter match logic needed?\n // Let's implement simple param matching: /user/:id\n\n const routePath = route.path\n\n const matchResult = matchPath(routePath, locationPathname)\n if (matchResult) {\n return [{ route, params: matchResult.params, pathname: matchResult.path }]\n }\n }\n return null\n}\n\nfunction matchPath(routePath: string, locationPath: string) {\n // 1. Split into segments\n const routeSegments = routePath.split('/').filter(Boolean)\n const locationSegments = locationPath.split('/').filter(Boolean)\n\n if (routeSegments.length !== locationSegments.length) return null\n\n const params: Record<string, string> = {}\n\n for (let i = 0; i < routeSegments.length; i++) {\n const routeSegment = routeSegments[i]\n const locationSegment = locationSegments[i]\n\n if (routeSegment.startsWith(':')) {\n const key = routeSegment.slice(1)\n params[key] = locationSegment\n } else if (routeSegment !== locationSegment) {\n return null\n }\n }\n\n return { params, path: locationPath }\n}\n\n// Export only what's needed by other router files\nexport { parseQuery, isUnsafePath, createRoutesFromChildren, matchRoutes }\n","import { reactive } from '../core/reactive'\nimport { Context } from '../core/context'\nimport { use } from '../core/use'\nimport type { Location, RouterContext } from './types'\nimport { parseQuery, isUnsafePath } from './utils'\n\n// Contexts\nexport const RouterCtx = new Context<RouterContext>(null as any)\nexport const RouteDepthCtx = new Context<number>(0)\n\n// Helper functions\nconst getDefaultLocation = (): Location => ({\n pathname: '/',\n search: '',\n hash: '',\n query: {},\n})\n\nconst getCurrentLocation = (): Location => {\n if (typeof window === 'undefined') {\n return getDefaultLocation()\n }\n\n // Handle srcdoc iframe - pathname may be empty or 'srcdoc'\n let pathname = window.location.pathname\n if (!pathname || pathname === 'srcdoc' || pathname === '/srcdoc') {\n pathname = '/'\n }\n\n return {\n pathname,\n search: window.location.search,\n hash: window.location.hash,\n query: parseQuery(window.location.search),\n }\n}\n\n// Global singleton location state\nlet globalLocation: Location | null = null\nlet globalNavigate: ((path: string) => void) | null = null\nlet popstateListenerAttached = false\n\n// Reset router state - used when app is re-rendered (e.g., srcdoc iframe update)\nexport function resetRouter(): void {\n // Reset the location to initial state, but keep the reactive object\n // This ensures existing subscriptions (like Routes) still work\n if (globalLocation) {\n const initial = getCurrentLocation()\n globalLocation.pathname = initial.pathname\n globalLocation.search = initial.search\n globalLocation.hash = initial.hash\n globalLocation.query = initial.query\n } else {\n // First time - will be initialized on first useLocation() call\n globalLocation = null\n globalNavigate = null\n }\n // Note: we don't reset popstateListenerAttached since the listener persists\n}\n\n// Create location state and navigation (singleton pattern)\nexport function useLocation(): [Location, (path: string) => void] {\n // Return existing singleton if already created\n if (globalLocation && globalNavigate) {\n return [globalLocation, globalNavigate]\n }\n\n // Create a reactive location object (only once)\n globalLocation = reactive<Location>(getCurrentLocation())\n\n const updateLocation = (newLocation: Location) => {\n if (!globalLocation) return\n globalLocation.pathname = newLocation.pathname\n globalLocation.search = newLocation.search\n globalLocation.hash = newLocation.hash\n globalLocation.query = newLocation.query\n }\n\n globalNavigate = (path: string) => {\n console.log('[Router] Navigate called:', path, 'globalLocation:', globalLocation)\n if (typeof window === 'undefined') return\n if (isUnsafePath(path)) {\n console.error('[Flexium Router] Blocked navigation to unsafe path:', path)\n return\n }\n\n // Try to update browser history, but continue even if it fails (e.g., in srcdoc iframe)\n try {\n window.history.pushState({}, '', path)\n } catch {\n // SecurityError in srcdoc iframe - ignore but continue with internal state update\n }\n\n // Always update internal location state for SPA navigation\n const newLocation = {\n pathname: path.split('?')[0].split('#')[0],\n search: path.includes('?') ? '?' + path.split('?')[1].split('#')[0] : '',\n hash: path.includes('#') ? '#' + path.split('#')[1] : '',\n query: parseQuery(path.includes('?') ? '?' + path.split('?')[1].split('#')[0] : '')\n }\n console.log('[Router] Updating location to:', newLocation)\n updateLocation(newLocation)\n console.log('[Router] After update, globalLocation:', globalLocation)\n }\n\n // Listen to popstate (only once)\n if (typeof window !== 'undefined' && !popstateListenerAttached) {\n window.addEventListener('popstate', () => {\n updateLocation(getCurrentLocation())\n })\n popstateListenerAttached = true\n }\n\n return [globalLocation, globalNavigate]\n}\n\n// Router hook - returns full router context\nexport function useRouter(): RouterContext {\n const [routerContext] = use(RouterCtx)\n if (!routerContext) {\n throw new Error('useRouter() must be called within a <Routes> component')\n }\n return routerContext\n}\n\n// Navigate hook - returns navigate function\nexport function useNavigate(): (path: string) => void {\n const [, navigate] = useLocation()\n return navigate\n}\n\n// Get navigate function directly (for use in event handlers to avoid stale closures)\nexport function getNavigate(): (path: string) => void {\n if (!globalNavigate) {\n useLocation() // Initialize if needed\n }\n return globalNavigate!\n}\n\n// Params hook - returns route params\nexport function useParams<T extends Record<string, string> = Record<string, string>>(): T {\n const router = useRouter()\n return router.params as T\n}\n\n// Query hook - returns query params\nexport function useQuery<T extends Record<string, string> = Record<string, string>>(): T {\n const [location] = useLocation()\n return location.query as T\n}\n","import type { RouteProps } from '../types'\n\nexport function Route(_props: RouteProps) {\n return null\n}\n","import { jsx as f } from '../../jsx-runtime'\nimport type { FNode, FNodeChild } from '../../dom/types'\nimport { RouterCtx, RouteDepthCtx, useLocation } from '../router'\nimport { createRoutesFromChildren, matchRoutes } from '../utils'\nimport { Route } from './Route'\n\nfunction isFNode(node: any): node is FNode {\n return node && typeof node === 'object' && ('type' in node || Array.isArray(node))\n}\n\nexport function Routes(props: { children: FNodeChild }) {\n const [currentLocation, navigate] = useLocation()\n\n // Parse children to find <Route> definitions and other content\n let childrenList: any[] = Array.isArray(props.children) ? props.children : [props.children]\n\n // Find routes for matching (but keep order with other children)\n const routeNodes = childrenList.filter(child => isFNode(child) && child.type === Route)\n // Track first Route index to insert matched content there\n const firstRouteIndex = childrenList.findIndex(child => isFNode(child) && child.type === Route)\n\n // Other children (non-Route) keep their positions relative to routes\n let beforeRouteChildren: any[] = []\n let afterRouteChildren: any[] = []\n\n if (firstRouteIndex === -1) {\n // No Route children - all are \"other\" children\n beforeRouteChildren = childrenList.filter(child => !isFNode(child) || child.type !== Route)\n } else {\n // Split at first Route position\n beforeRouteChildren = childrenList.slice(0, firstRouteIndex).filter(child => !isFNode(child) || child.type !== Route)\n afterRouteChildren = childrenList.slice(firstRouteIndex).filter(child => !isFNode(child) || child.type !== Route)\n }\n\n // Create route definitions\n const routeDefinitions = createRoutesFromChildren(routeNodes)\n\n // DIRECT access to currentLocation.pathname\n // This should trigger reactive tracking in the component's effect context\n const currentPath = currentLocation.pathname\n const matches = matchRoutes(routeDefinitions, currentPath) || []\n const params = matches.length > 0 ? matches[matches.length - 1].params : {}\n\n const routerContext = {\n location: currentLocation,\n navigate,\n matches: matches,\n params: params\n }\n\n // Render matched component\n let matchedContent: FNodeChild = null\n\n if (matches.length > 0) {\n const rootMatch = matches[0]\n const Component = rootMatch.route.component\n\n // Use pathname as key to force re-mount on route change\n const routeKey = currentPath\n\n // Guard Check\n if (rootMatch.route.beforeEnter) {\n const result = rootMatch.route.beforeEnter(rootMatch.params)\n if (result !== false) {\n matchedContent = f(RouteDepthCtx.Provider, {\n value: 1,\n key: routeKey,\n children: f(Component, { params: rootMatch.params, key: routeKey })\n })\n }\n } else {\n matchedContent = f(RouteDepthCtx.Provider, {\n value: 1,\n key: routeKey,\n children: f(Component, { params: rootMatch.params, key: routeKey })\n })\n }\n }\n\n return f(RouterCtx.Provider, {\n value: routerContext,\n children: [...beforeRouteChildren, matchedContent, ...afterRouteChildren]\n })\n}\n","import { use } from '../../core/use'\nimport { jsx as f } from '../../jsx-runtime'\nimport { RouteDepthCtx, useRouter } from '../router'\n\nexport function Outlet() {\n const routerContext = useRouter()\n const [depthValue] = use(RouteDepthCtx)\n const depth = depthValue ?? 0\n\n const [matches] = use(() => routerContext.matches)\n\n if (depth >= matches.length) return null\n\n const match = matches[depth]\n const Component = match.route.component\n\n // Guard\n if (match.route.beforeEnter) {\n if (match.route.beforeEnter(match.params) === false) return null\n }\n\n // Render next level\n return f(RouteDepthCtx.Provider, {\n value: depth + 1,\n children: f(Component, { params: match.params })\n })\n}\n","import { jsx as f } from '../../jsx-runtime'\nimport type { LinkProps } from '../types'\n\n// Import the navigate function getter, not the function itself\n// This ensures we always use the current navigate implementation\nimport { getNavigate } from '../router'\n\nexport function Link(props: LinkProps) {\n return f('a', {\n href: props.to,\n class: props.class || props.className,\n style: props.style ? props.style + '; cursor: pointer;' : 'cursor: pointer;',\n onclick: (event: Event) => {\n console.log('Link clicked:', props.to)\n event.preventDefault()\n // Get current navigate function at click time\n getNavigate()(props.to)\n },\n children: props.children\n })\n}\n"]}
@@ -1,2 +0,0 @@
1
- 'use strict';var chunkBP5PDE6F_js=require('./chunk-BP5PDE6F.js'),chunkOU6XJZ76_js=require('./chunk-OU6XJZ76.js'),chunkTFXBDC6C_js=require('./chunk-TFXBDC6C.js');function b(t){if(!t)return {};if(typeof URLSearchParams<"u"){let e=new URLSearchParams(t),r={};return e.forEach((n,i)=>r[i]=n),r}return t.substring(1).split("&").reduce((e,r)=>{let[n,i]=r.split("=");return n&&(e[decodeURIComponent(n)]=decodeURIComponent(i||"")),e},{})}function q(t){return !!(!t||typeof t!="string"||t.length>2048||t.includes("__proto__")||t.includes("constructor")||/^\s*javascript:/i.test(t))}function v(t){let e=[];return t.forEach(r=>{if(!r)return;let{path:n,component:i,children:a,beforeEnter:l}=r.props||{},c={path:n||"/",component:i,beforeEnter:l};if(a){let g=Array.isArray(a)?a:[a];c.children=v(g);}!c.children&&r.children&&r.children.length>0&&(c.children=v(r.children)),e.push(c);}),e}function A(t,e){for(let r of t){let n=r.path,i=j(n,e);if(i)return [{route:r,params:i.params,pathname:i.path}]}return null}function j(t,e){let r=t.split("/").filter(Boolean),n=e.split("/").filter(Boolean);if(r.length!==n.length)return null;let i={};for(let a=0;a<r.length;a++){let l=r[a],c=n[a];if(l.startsWith(":")){let g=l.slice(1);i[g]=c;}else if(l!==c)return null}return {params:i,path:e}}var N=new chunkOU6XJZ76_js.f(null),h=new chunkOU6XJZ76_js.f(0),_=()=>({pathname:"/",search:"",hash:"",query:{}}),P=()=>{if(typeof window>"u")return _();let t=window.location.pathname;return (!t||t==="srcdoc"||t==="/srcdoc")&&(t="/"),{pathname:t,search:window.location.search,hash:window.location.hash,query:b(window.location.search)}},s=null,f=null,S=false;function I(){if(s){let t=P();s.pathname=t.pathname,s.search=t.search,s.hash=t.hash,s.query=t.query;}else s=null,f=null;}function d(){if(s&&f)return [s,f];s=chunkBP5PDE6F_js.a(P());let t=e=>{s&&(s.pathname=e.pathname,s.search=e.search,s.hash=e.hash,s.query=e.query);};return f=e=>{if(console.log("[Router] Navigate called:",e,"globalLocation:",s),typeof window>"u")return;if(q(e)){console.error("[Flexium Router] Blocked navigation to unsafe path:",e);return}try{window.history.pushState({},"",e);}catch{}let r={pathname:e.split("?")[0].split("#")[0],search:e.includes("?")?"?"+e.split("?")[1].split("#")[0]:"",hash:e.includes("#")?"#"+e.split("#")[1]:"",query:b(e.includes("?")?"?"+e.split("?")[1].split("#")[0]:"")};console.log("[Router] Updating location to:",r),t(r),console.log("[Router] After update, globalLocation:",s);},typeof window<"u"&&!S&&(window.addEventListener("popstate",()=>{t(P());}),S=true),[s,f]}function C(){let[t]=chunkBP5PDE6F_js.c(N);if(!t)throw new Error("useRouter() must be called within a <Routes> component");return t}function Q(){let[,t]=d();return t}function k(){return f||d(),f}function B(){return C().params}function M(){let[t]=d();return t.query}function p(t){return null}function R(t){return t&&typeof t=="object"&&("type"in t||Array.isArray(t))}function O(t){let[e,r]=d(),n=Array.isArray(t.children)?t.children:[t.children],i=n.filter(o=>R(o)&&o.type===p),a=n.findIndex(o=>R(o)&&o.type===p),l=[],c=[];a===-1?l=n.filter(o=>!R(o)||o.type!==p):(l=n.slice(0,a).filter(o=>!R(o)||o.type!==p),c=n.slice(a).filter(o=>!R(o)||o.type!==p));let g=v(i),D=e.pathname,m=A(g,D)||[],U=m.length>0?m[m.length-1].params:{},T={location:e,navigate:r,matches:m,params:U},L=null;if(m.length>0){let o=m[0],E=o.route.component,x=D;o.route.beforeEnter?o.route.beforeEnter(o.params)!==false&&(L=chunkTFXBDC6C_js.a(h.Provider,{value:1,key:x,children:chunkTFXBDC6C_js.a(E,{params:o.params,key:x})})):L=chunkTFXBDC6C_js.a(h.Provider,{value:1,key:x,children:chunkTFXBDC6C_js.a(E,{params:o.params,key:x})});}return chunkTFXBDC6C_js.a(N.Provider,{value:T,children:[...l,L,...c]})}function K(){let t=C(),[e]=chunkBP5PDE6F_js.c(h),r=e??0,[n]=chunkBP5PDE6F_js.c(()=>t.matches);if(r>=n.length)return null;let i=n[r],a=i.route.component;return i.route.beforeEnter&&i.route.beforeEnter(i.params)===false?null:chunkTFXBDC6C_js.a(h.Provider,{value:r+1,children:chunkTFXBDC6C_js.a(a,{params:i.params})})}function V(t){return chunkTFXBDC6C_js.a("a",{href:t.to,class:t.class||t.className,style:t.style?t.style+"; cursor: pointer;":"cursor: pointer;",onclick:e=>{console.log("Link clicked:",t.to),e.preventDefault(),k()(t.to);},children:t.children})}exports.a=I;exports.b=d;exports.c=C;exports.d=Q;exports.e=k;exports.f=B;exports.g=M;exports.h=p;exports.i=O;exports.j=K;exports.k=V;//# sourceMappingURL=chunk-DDYQX5XV.js.map
2
- //# sourceMappingURL=chunk-DDYQX5XV.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/router/utils.ts","../src/router/router.ts","../src/router/dom/Route.tsx","../src/router/dom/Routes.tsx","../src/router/dom/Outlet.tsx","../src/router/dom/Link.tsx"],"names":["parseQuery","search","params","result","value","key","accumulator","part","isUnsafePath","path","createRoutesFromChildren","children","routes","child","component","subChildren","beforeEnter","route","nestedChildren","matchRoutes","locationPathname","routePath","matchResult","matchPath","locationPath","routeSegments","locationSegments","i","routeSegment","locationSegment","RouterCtx","Context","RouteDepthCtx","getDefaultLocation","getCurrentLocation","pathname","globalLocation","globalNavigate","popstateListenerAttached","resetRouter","initial","useLocation","reactive","updateLocation","newLocation","useRouter","routerContext","use","useNavigate","navigate","getNavigate","useParams","useQuery","location","Route","_props","isFNode","node","Routes","props","currentLocation","childrenList","routeNodes","firstRouteIndex","beforeRouteChildren","afterRouteChildren","routeDefinitions","currentPath","matches","matchedContent","rootMatch","Component","routeKey","jsx","Outlet","depthValue","depth","match","Link","event"],"mappings":"iKAGA,SAASA,CAAAA,CAAWC,CAAAA,CA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AAc,CAAA,CAEtB,CAACP,CAAO,CAAA,CAAIrB,kBAAAA,CAAI,IAAMD,CAAAA,CAAc,OAAO,CAAA,CAEjD,GAAI8B,CAAAA,EAASR,CAAAA,CAAQ,MAAA,CAAQ,OAAO,IAAA,CAEpC,IAAMS,CAAAA,CAAQT,CAAAA,CAAQQ,CAAK,CAAA,CACrBL,CAAAA,CAAYM,CAAAA,CAAM,KAAA,CAAM,SAAA,CAG9B,OAAIA,CAAAA,CAAM,KAAA,CAAM,WAAA,EACRA,CAAAA,CAAM,KAAA,CAAM,WAAA,CAAYA,CAAAA,CAAM,MAAM,CAAA,GAAM,KAAA,CAAc,IAAA,CAIzDJ,kBAAAA,CAAEzC,CAAAA,CAAc,QAAA,CAAU,CAC7B,KAAA,CAAO4C,CAAAA,CAAQ,CAAA,CACf,QAAA,CAAUH,kBAAAA,CAAEF,CAAAA,CAAW,CAAE,MAAA,CAAQM,CAAAA,CAAM,MAAO,CAAC,CACnD,CAAC,CACL,CCnBO,SAASC,CAAAA,CAAKnB,CAAAA,CAAkB,CACnC,OAAOc,kBAAAA,CAAE,GAAA,CAAK,CACV,IAAA,CAAMd,CAAAA,CAAM,EAAA,CACZ,KAAA,CAAOA,CAAAA,CAAM,KAAA,EAASA,CAAAA,CAAM,SAAA,CAC5B,KAAA,CAAOA,CAAAA,CAAM,KAAA,CAAQA,CAAAA,CAAM,KAAA,CAAQ,oBAAA,CAAuB,kBAAA,CAC1D,OAAA,CAAUoB,CAAAA,EAAiB,CACvB,OAAA,CAAQ,GAAA,CAAI,eAAA,CAAiBpB,CAAAA,CAAM,EAAE,CAAA,CACrCoB,CAAAA,CAAM,cAAA,EAAe,CAErB7B,CAAAA,EAAY,CAAES,CAAAA,CAAM,EAAE,EAC1B,CAAA,CACA,QAAA,CAAUA,CAAAA,CAAM,QACpB,CAAC,CACL","file":"chunk-DDYQX5XV.js","sourcesContent":["import { RouteDefinition, RouteMatch } from './types'\n\n// Simple query parser (native URLSearchParams fallback) - internal use only\nfunction parseQuery(search: string): Record<string, string> {\n if (!search) return {}\n if (typeof URLSearchParams !== 'undefined') {\n const params = new URLSearchParams(search)\n const result: Record<string, string> = {}\n params.forEach((value, key) => result[key] = value)\n return result\n }\n return search\n .substring(1)\n .split('&')\n .reduce((accumulator, part) => {\n const [key, value] = part.split('=')\n if (key) accumulator[decodeURIComponent(key)] = decodeURIComponent(value || '')\n return accumulator\n }, {} as Record<string, string>)\n}\n\nfunction isUnsafePath(path: string): boolean {\n // Handle undefined or null path\n if (!path || typeof path !== 'string') return true\n // Prevent prototype pollution or massive strings\n if (path.length > 2048) return true\n if (path.includes('__proto__') || path.includes('constructor')) return true\n // Basic XSS check for javascript: protocol\n if (/^\\s*javascript:/i.test(path)) return true\n return false\n}\n\n// Convert children FNodes to RouteDefinitions - internal use only\nfunction createRoutesFromChildren(children: any[]): RouteDefinition[] {\n const routes: RouteDefinition[] = []\n\n children.forEach(child => {\n if (!child) return\n\n // Assuming child is an FNode-like object (config)\n // In Flexium, Route component returns null, but 'createNode' isn't called here.\n // We are traversing the props passed to Router.\n\n const { path, component, children: subChildren, beforeEnter } = child.props || {}\n\n const route: RouteDefinition = {\n path: path || '/',\n component: component,\n beforeEnter\n }\n\n if (subChildren) {\n // If subChildren is array\n const nestedChildren = Array.isArray(subChildren) ? subChildren : [subChildren]\n // We expect the children of a Route to be other Routes\n // However, the 'children' prop in JSX might be the Route components themselves.\n route.children = createRoutesFromChildren(nestedChildren)\n }\n\n // Also check child.children if props.children is empty (direct FNode structure)\n if (!route.children && child.children && child.children.length > 0) {\n route.children = createRoutesFromChildren(child.children)\n }\n\n routes.push(route)\n })\n return routes\n}\n\n// Simple Matcher - internal use only\nfunction matchRoutes(routes: RouteDefinition[], locationPathname: string): RouteMatch[] | null {\n // We want to find the best matching branch\n\n for (const route of routes) {\n // 1. Match current segment\n // Simple exact match or parameter match logic needed?\n // Let's implement simple param matching: /user/:id\n\n const routePath = route.path\n\n const matchResult = matchPath(routePath, locationPathname)\n if (matchResult) {\n return [{ route, params: matchResult.params, pathname: matchResult.path }]\n }\n }\n return null\n}\n\nfunction matchPath(routePath: string, locationPath: string) {\n // 1. Split into segments\n const routeSegments = routePath.split('/').filter(Boolean)\n const locationSegments = locationPath.split('/').filter(Boolean)\n\n if (routeSegments.length !== locationSegments.length) return null\n\n const params: Record<string, string> = {}\n\n for (let i = 0; i < routeSegments.length; i++) {\n const routeSegment = routeSegments[i]\n const locationSegment = locationSegments[i]\n\n if (routeSegment.startsWith(':')) {\n const key = routeSegment.slice(1)\n params[key] = locationSegment\n } else if (routeSegment !== locationSegment) {\n return null\n }\n }\n\n return { params, path: locationPath }\n}\n\n// Export only what's needed by other router files\nexport { parseQuery, isUnsafePath, createRoutesFromChildren, matchRoutes }\n","import { reactive } from '../core/reactive'\nimport { Context } from '../core/context'\nimport { use } from '../core/use'\nimport type { Location, RouterContext } from './types'\nimport { parseQuery, isUnsafePath } from './utils'\n\n// Contexts\nexport const RouterCtx = new Context<RouterContext>(null as any)\nexport const RouteDepthCtx = new Context<number>(0)\n\n// Helper functions\nconst getDefaultLocation = (): Location => ({\n pathname: '/',\n search: '',\n hash: '',\n query: {},\n})\n\nconst getCurrentLocation = (): Location => {\n if (typeof window === 'undefined') {\n return getDefaultLocation()\n }\n\n // Handle srcdoc iframe - pathname may be empty or 'srcdoc'\n let pathname = window.location.pathname\n if (!pathname || pathname === 'srcdoc' || pathname === '/srcdoc') {\n pathname = '/'\n }\n\n return {\n pathname,\n search: window.location.search,\n hash: window.location.hash,\n query: parseQuery(window.location.search),\n }\n}\n\n// Global singleton location state\nlet globalLocation: Location | null = null\nlet globalNavigate: ((path: string) => void) | null = null\nlet popstateListenerAttached = false\n\n// Reset router state - used when app is re-rendered (e.g., srcdoc iframe update)\nexport function resetRouter(): void {\n // Reset the location to initial state, but keep the reactive object\n // This ensures existing subscriptions (like Routes) still work\n if (globalLocation) {\n const initial = getCurrentLocation()\n globalLocation.pathname = initial.pathname\n globalLocation.search = initial.search\n globalLocation.hash = initial.hash\n globalLocation.query = initial.query\n } else {\n // First time - will be initialized on first useLocation() call\n globalLocation = null\n globalNavigate = null\n }\n // Note: we don't reset popstateListenerAttached since the listener persists\n}\n\n// Create location state and navigation (singleton pattern)\nexport function useLocation(): [Location, (path: string) => void] {\n // Return existing singleton if already created\n if (globalLocation && globalNavigate) {\n return [globalLocation, globalNavigate]\n }\n\n // Create a reactive location object (only once)\n globalLocation = reactive<Location>(getCurrentLocation())\n\n const updateLocation = (newLocation: Location) => {\n if (!globalLocation) return\n globalLocation.pathname = newLocation.pathname\n globalLocation.search = newLocation.search\n globalLocation.hash = newLocation.hash\n globalLocation.query = newLocation.query\n }\n\n globalNavigate = (path: string) => {\n console.log('[Router] Navigate called:', path, 'globalLocation:', globalLocation)\n if (typeof window === 'undefined') return\n if (isUnsafePath(path)) {\n console.error('[Flexium Router] Blocked navigation to unsafe path:', path)\n return\n }\n\n // Try to update browser history, but continue even if it fails (e.g., in srcdoc iframe)\n try {\n window.history.pushState({}, '', path)\n } catch {\n // SecurityError in srcdoc iframe - ignore but continue with internal state update\n }\n\n // Always update internal location state for SPA navigation\n const newLocation = {\n pathname: path.split('?')[0].split('#')[0],\n search: path.includes('?') ? '?' + path.split('?')[1].split('#')[0] : '',\n hash: path.includes('#') ? '#' + path.split('#')[1] : '',\n query: parseQuery(path.includes('?') ? '?' + path.split('?')[1].split('#')[0] : '')\n }\n console.log('[Router] Updating location to:', newLocation)\n updateLocation(newLocation)\n console.log('[Router] After update, globalLocation:', globalLocation)\n }\n\n // Listen to popstate (only once)\n if (typeof window !== 'undefined' && !popstateListenerAttached) {\n window.addEventListener('popstate', () => {\n updateLocation(getCurrentLocation())\n })\n popstateListenerAttached = true\n }\n\n return [globalLocation, globalNavigate]\n}\n\n// Router hook - returns full router context\nexport function useRouter(): RouterContext {\n const [routerContext] = use(RouterCtx)\n if (!routerContext) {\n throw new Error('useRouter() must be called within a <Routes> component')\n }\n return routerContext\n}\n\n// Navigate hook - returns navigate function\nexport function useNavigate(): (path: string) => void {\n const [, navigate] = useLocation()\n return navigate\n}\n\n// Get navigate function directly (for use in event handlers to avoid stale closures)\nexport function getNavigate(): (path: string) => void {\n if (!globalNavigate) {\n useLocation() // Initialize if needed\n }\n return globalNavigate!\n}\n\n// Params hook - returns route params\nexport function useParams<T extends Record<string, string> = Record<string, string>>(): T {\n const router = useRouter()\n return router.params as T\n}\n\n// Query hook - returns query params\nexport function useQuery<T extends Record<string, string> = Record<string, string>>(): T {\n const [location] = useLocation()\n return location.query as T\n}\n","import type { RouteProps } from '../types'\n\nexport function Route(_props: RouteProps) {\n return null\n}\n","import { jsx as f } from '../../jsx-runtime'\nimport type { FNode, FNodeChild } from '../../dom/types'\nimport { RouterCtx, RouteDepthCtx, useLocation } from '../router'\nimport { createRoutesFromChildren, matchRoutes } from '../utils'\nimport { Route } from './Route'\n\nfunction isFNode(node: any): node is FNode {\n return node && typeof node === 'object' && ('type' in node || Array.isArray(node))\n}\n\nexport function Routes(props: { children: FNodeChild }) {\n const [currentLocation, navigate] = useLocation()\n\n // Parse children to find <Route> definitions and other content\n let childrenList: any[] = Array.isArray(props.children) ? props.children : [props.children]\n\n // Find routes for matching (but keep order with other children)\n const routeNodes = childrenList.filter(child => isFNode(child) && child.type === Route)\n // Track first Route index to insert matched content there\n const firstRouteIndex = childrenList.findIndex(child => isFNode(child) && child.type === Route)\n\n // Other children (non-Route) keep their positions relative to routes\n let beforeRouteChildren: any[] = []\n let afterRouteChildren: any[] = []\n\n if (firstRouteIndex === -1) {\n // No Route children - all are \"other\" children\n beforeRouteChildren = childrenList.filter(child => !isFNode(child) || child.type !== Route)\n } else {\n // Split at first Route position\n beforeRouteChildren = childrenList.slice(0, firstRouteIndex).filter(child => !isFNode(child) || child.type !== Route)\n afterRouteChildren = childrenList.slice(firstRouteIndex).filter(child => !isFNode(child) || child.type !== Route)\n }\n\n // Create route definitions\n const routeDefinitions = createRoutesFromChildren(routeNodes)\n\n // DIRECT access to currentLocation.pathname\n // This should trigger reactive tracking in the component's effect context\n const currentPath = currentLocation.pathname\n const matches = matchRoutes(routeDefinitions, currentPath) || []\n const params = matches.length > 0 ? matches[matches.length - 1].params : {}\n\n const routerContext = {\n location: currentLocation,\n navigate,\n matches: matches,\n params: params\n }\n\n // Render matched component\n let matchedContent: FNodeChild = null\n\n if (matches.length > 0) {\n const rootMatch = matches[0]\n const Component = rootMatch.route.component\n\n // Use pathname as key to force re-mount on route change\n const routeKey = currentPath\n\n // Guard Check\n if (rootMatch.route.beforeEnter) {\n const result = rootMatch.route.beforeEnter(rootMatch.params)\n if (result !== false) {\n matchedContent = f(RouteDepthCtx.Provider, {\n value: 1,\n key: routeKey,\n children: f(Component, { params: rootMatch.params, key: routeKey })\n })\n }\n } else {\n matchedContent = f(RouteDepthCtx.Provider, {\n value: 1,\n key: routeKey,\n children: f(Component, { params: rootMatch.params, key: routeKey })\n })\n }\n }\n\n return f(RouterCtx.Provider, {\n value: routerContext,\n children: [...beforeRouteChildren, matchedContent, ...afterRouteChildren]\n })\n}\n","import { use } from '../../core/use'\nimport { jsx as f } from '../../jsx-runtime'\nimport { RouteDepthCtx, useRouter } from '../router'\n\nexport function Outlet() {\n const routerContext = useRouter()\n const [depthValue] = use(RouteDepthCtx)\n const depth = depthValue ?? 0\n\n const [matches] = use(() => routerContext.matches)\n\n if (depth >= matches.length) return null\n\n const match = matches[depth]\n const Component = match.route.component\n\n // Guard\n if (match.route.beforeEnter) {\n if (match.route.beforeEnter(match.params) === false) return null\n }\n\n // Render next level\n return f(RouteDepthCtx.Provider, {\n value: depth + 1,\n children: f(Component, { params: match.params })\n })\n}\n","import { jsx as f } from '../../jsx-runtime'\nimport type { LinkProps } from '../types'\n\n// Import the navigate function getter, not the function itself\n// This ensures we always use the current navigate implementation\nimport { getNavigate } from '../router'\n\nexport function Link(props: LinkProps) {\n return f('a', {\n href: props.to,\n class: props.class || props.className,\n style: props.style ? props.style + '; cursor: pointer;' : 'cursor: pointer;',\n onclick: (event: Event) => {\n console.log('Link clicked:', props.to)\n event.preventDefault()\n // Get current navigate function at click time\n getNavigate()(props.to)\n },\n children: props.children\n })\n}\n"]}