flexium 0.16.7 → 0.16.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{chunk-DVG7OZ3X.js → chunk-DZKR3RLN.js} +2 -2
- package/dist/chunk-DZKR3RLN.js.map +1 -0
- package/dist/{chunk-AJL63VBW.mjs → chunk-REYBGD7A.mjs} +2 -2
- package/dist/chunk-REYBGD7A.mjs.map +1 -0
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1 -1
- package/dist/index.mjs.map +1 -1
- package/dist/metafile-cjs.json +1 -1
- package/dist/metafile-esm.json +1 -1
- package/dist/router.d.cts +2 -0
- package/dist/router.d.ts +2 -0
- package/dist/router.js +1 -1
- package/dist/router.mjs +1 -1
- package/package.json +1 -1
- package/dist/chunk-AJL63VBW.mjs.map +0 -1
- package/dist/chunk-DVG7OZ3X.js.map +0 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
'use strict';var chunkLOKMOGSA_js=require('./chunk-LOKMOGSA.js'),chunkVNYPOCV7_js=require('./chunk-VNYPOCV7.js'),chunkTFXBDC6C_js=require('./chunk-TFXBDC6C.js');function w(t){if(!t)return {};if(typeof URLSearchParams<"u"){let e=new URLSearchParams(t),r={};return e.forEach((n,o)=>r[o]=n),r}return t.substring(1).split("&").reduce((e,r)=>{let[n,o]=r.split("=");return n&&(e[decodeURIComponent(n)]=decodeURIComponent(o||"")),e},{})}function
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
'use strict';var chunkLOKMOGSA_js=require('./chunk-LOKMOGSA.js'),chunkVNYPOCV7_js=require('./chunk-VNYPOCV7.js'),chunkTFXBDC6C_js=require('./chunk-TFXBDC6C.js');function w(t){if(!t)return {};if(typeof URLSearchParams<"u"){let e=new URLSearchParams(t),r={};return e.forEach((n,o)=>r[o]=n),r}return t.substring(1).split("&").reduce((e,r)=>{let[n,o]=r.split("=");return n&&(e[decodeURIComponent(n)]=decodeURIComponent(o||"")),e},{})}function N(t){return !!(!t||typeof t!="string"||t.length>2048||t.includes("__proto__")||t.includes("constructor")||/^\s*javascript:/i.test(t))}function g(t){let e=[];return t.forEach(r=>{if(!r)return;let{path:n,component:o,children:i,beforeEnter:f}=r.props||{},a={path:n||"/",component:o,beforeEnter:f};if(i){let c=Array.isArray(i)?i:[i];a.children=g(c);}!a.children&&r.children&&r.children.length>0&&(a.children=g(r.children)),e.push(a);}),e}function D(t,e){for(let r of t){let n=r.path,o=T(n,e);if(o)return [{route:r,params:o.params,pathname:o.path}]}return null}function T(t,e){let r=t.split("/").filter(Boolean),n=e.split("/").filter(Boolean);if(r.length!==n.length)return null;let o={};for(let i=0;i<r.length;i++){let f=r[i],a=n[i];if(f.startsWith(":")){let c=f.slice(1);o[c]=a;}else if(f!==a)return null}return {params:o,path:e}}var L=new chunkVNYPOCV7_js.e(null),p=new chunkVNYPOCV7_js.e(0),U=()=>({pathname:"/",search:"",hash:"",query:{}}),E=()=>{if(typeof window>"u")return U();let t=window.location.pathname;return (!t||t==="srcdoc"||t==="/srcdoc")&&(t="/"),{pathname:t,search:window.location.search,hash:window.location.hash,query:w(window.location.search)}},l=null,y=null,F=false;function h(){if(l&&y)return [l,y];l=chunkLOKMOGSA_js.a(E());let t=e=>{l&&(l.pathname=e.pathname,l.search=e.search,l.hash=e.hash,l.query=e.query);};return y=e=>{if(!(typeof window>"u")){if(N(e)){console.error("[Flexium Router] Blocked navigation to unsafe path:",e);return}try{window.history.pushState({},"",e);}catch{}t({pathname:e.split("?")[0].split("#")[0],search:e.includes("?")?"?"+e.split("?")[1].split("#")[0]:"",hash:e.includes("#")?"#"+e.split("#")[1]:"",query:w(e.includes("?")?"?"+e.split("?")[1].split("#")[0]:"")});}},typeof window<"u"&&!F&&(window.addEventListener("popstate",()=>{t(E());}),F=true),[l,y]}function R(){let[t]=chunkLOKMOGSA_js.c(L);if(!t)throw new Error("useRouter() must be called within a <Routes> component");return t}function P(){let[,t]=h();return t}function j(){return R().params}function _(){let[t]=h();return t.query}function x(t){return null}function A(t){return t&&typeof t=="object"&&("type"in t||Array.isArray(t))}function Q(t){let[e,r]=h(),n=Array.isArray(t.children)?t.children:[t.children],o=n.filter(s=>A(s)&&s.type===x),i=n.filter(s=>!A(s)||s.type!==x),f=g(o),a=e.pathname,c=D(f,a)||[],S=c.length>0?c[c.length-1].params:{},q={location:e,navigate:r,matches:c,params:S},C=null;if(c.length>0){let s=c[0],b=s.route.component,d=a;s.route.beforeEnter?s.route.beforeEnter(s.params)!==false&&(C=chunkTFXBDC6C_js.a(p.Provider,{value:1,key:d,children:chunkTFXBDC6C_js.a(b,{params:s.params,key:d})})):C=chunkTFXBDC6C_js.a(p.Provider,{value:1,key:d,children:chunkTFXBDC6C_js.a(b,{params:s.params,key:d})});}return chunkTFXBDC6C_js.a(L.Provider,{value:q,children:[...i,C]})}function B(){let t=R(),[e]=chunkLOKMOGSA_js.c(p),r=e??0,[n]=chunkLOKMOGSA_js.c(()=>t.matches);if(r>=n.length)return null;let o=n[r],i=o.route.component;return o.route.beforeEnter&&o.route.beforeEnter(o.params)===false?null:chunkTFXBDC6C_js.a(p.Provider,{value:r+1,children:chunkTFXBDC6C_js.a(i,{params:o.params})})}function M(t){let e=P();return chunkTFXBDC6C_js.a("a",{href:t.to,class:t.class||t.className,style:t.style?t.style+"; cursor: pointer;":"cursor: pointer;",onclick:r=>{r.preventDefault(),e(t.to);},children:t.children})}exports.a=h;exports.b=R;exports.c=P;exports.d=j;exports.e=_;exports.f=x;exports.g=Q;exports.h=B;exports.i=M;//# sourceMappingURL=chunk-DZKR3RLN.js.map
|
|
2
|
+
//# sourceMappingURL=chunk-DZKR3RLN.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","routeSegment","locationSegment","RouterCtx","Context","RouteDepthCtx","getDefaultLocation","getCurrentLocation","pathname","globalLocation","globalNavigate","popstateListenerAttached","useLocation","reactive","updateLocation","newLocation","useRouter","routerContext","use","useNavigate","navigate","useParams","useQuery","location","Route","_props","isFNode","node","Routes","props","currentLocation","childrenList","routeNodes","otherChildren","routeDefinitions","currentPath","matches","matchedContent","rootMatch","Component","routeKey","jsx","Outlet","depthValue","depth","match","Link","event"],"mappings":"iKAGA,SAASA,CAAAA,CAAWC,CAAAA,CAAwC,CAC1D,GAAI,CAACA,EAAQ,OAAO,EAAC,CACrB,GAAI,OAAO,eAAA,CAAoB,IAAa,CAC1C,IAAMC,CAAAA,CAAS,IAAI,eAAA,CAAgBD,CAAM,EACnCE,CAAAA,CAAiC,EAAC,CACxC,OAAAD,CAAAA,CAAO,OAAA,CAAQ,CAACE,CAAAA,CAAOC,CAAAA,GAAQF,CAAAA,CAAOE,CAAG,CAAA,CAAID,CAAK,EAC3CD,CACT,CACA,OAAOF,CAAAA,CACJ,SAAA,CAAU,CAAC,EACX,KAAA,CAAM,GAAG,CAAA,CACT,MAAA,CAAO,CAACK,CAAAA,CAAaC,IAAS,CAC7B,GAAM,CAACF,CAAAA,CAAKD,CAAK,CAAA,CAAIG,EAAK,KAAA,CAAM,GAAG,CAAA,CACnC,OAAIF,CAAAA,GAAKC,CAAAA,CAAY,mBAAmBD,CAAG,CAAC,CAAA,CAAI,kBAAA,CAAmBD,CAAAA,EAAS,EAAE,GACvEE,CACT,CAAA,CAAG,EAA4B,CACnC,CAEA,SAASE,CAAAA,CAAaC,CAAAA,CAAuB,CAO3C,OALI,CAAA,EAAA,CAACA,CAAAA,EAAQ,OAAOA,CAAAA,EAAS,QAAA,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,CAAAA,CAAc,OAAO,CAAA,CAEjD,GAAI2B,CAAAA,EAASR,CAAAA,CAAQ,MAAA,CAAQ,OAAO,KAEpC,IAAMS,CAAAA,CAAQT,CAAAA,CAAQQ,CAAK,CAAA,CACrBL,CAAAA,CAAYM,EAAM,KAAA,CAAM,SAAA,CAG9B,OAAIA,CAAAA,CAAM,KAAA,CAAM,WAAA,EACRA,EAAM,KAAA,CAAM,WAAA,CAAYA,CAAAA,CAAM,MAAM,CAAA,GAAM,KAAA,CAAc,KAIzDJ,kBAAAA,CAAEpC,CAAAA,CAAc,QAAA,CAAU,CAC7B,KAAA,CAAOuC,CAAAA,CAAQ,EACf,QAAA,CAAUH,kBAAAA,CAAEF,CAAAA,CAAW,CAAE,MAAA,CAAQM,CAAAA,CAAM,MAAO,CAAC,CACnD,CAAC,CACL,CCtBO,SAASC,EAAKjB,CAAAA,CAAkB,CACnC,IAAMT,CAAAA,CAAWD,CAAAA,EAAY,CAC7B,OAAOsB,kBAAAA,CAAE,GAAA,CAAK,CACV,IAAA,CAAMZ,CAAAA,CAAM,EAAA,CACZ,MAAOA,CAAAA,CAAM,KAAA,EAASA,CAAAA,CAAM,SAAA,CAC5B,KAAA,CAAOA,CAAAA,CAAM,MAAQA,CAAAA,CAAM,KAAA,CAAQ,oBAAA,CAAuB,kBAAA,CAC1D,OAAA,CAAUkB,CAAAA,EAAiB,CACvBA,CAAAA,CAAM,cAAA,EAAe,CACrB3B,CAAAA,CAASS,CAAAA,CAAM,EAAE,EACrB,CAAA,CACA,QAAA,CAAUA,CAAAA,CAAM,QACpB,CAAC,CACL","file":"chunk-DZKR3RLN.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// 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 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 updateLocation({\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 }\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// 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 // Separate routes from other children (like Nav components)\n const routeNodes = childrenList.filter(child => isFNode(child) && child.type === Route)\n const otherChildren = childrenList.filter(child => !isFNode(child) || child.type !== Route)\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: [...otherChildren, matchedContent]\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'\nimport { useNavigate } from '../router'\n\nexport function Link(props: LinkProps) {\n const navigate = useNavigate()\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 event.preventDefault()\n navigate(props.to)\n },\n children: props.children\n })\n}\n"]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {a,c}from'./chunk-CB6CIG76.mjs';import {e}from'./chunk-WHRUAZR4.mjs';import {a as a$1}from'./chunk-RUYGSYEV.mjs';function w(t){if(!t)return {};if(typeof URLSearchParams<"u"){let e=new URLSearchParams(t),r={};return e.forEach((n,o)=>r[o]=n),r}return t.substring(1).split("&").reduce((e,r)=>{let[n,o]=r.split("=");return n&&(e[decodeURIComponent(n)]=decodeURIComponent(o||"")),e},{})}function
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import {a,c}from'./chunk-CB6CIG76.mjs';import {e}from'./chunk-WHRUAZR4.mjs';import {a as a$1}from'./chunk-RUYGSYEV.mjs';function w(t){if(!t)return {};if(typeof URLSearchParams<"u"){let e=new URLSearchParams(t),r={};return e.forEach((n,o)=>r[o]=n),r}return t.substring(1).split("&").reduce((e,r)=>{let[n,o]=r.split("=");return n&&(e[decodeURIComponent(n)]=decodeURIComponent(o||"")),e},{})}function N(t){return !!(!t||typeof t!="string"||t.length>2048||t.includes("__proto__")||t.includes("constructor")||/^\s*javascript:/i.test(t))}function g(t){let e=[];return t.forEach(r=>{if(!r)return;let{path:n,component:o,children:i,beforeEnter:f}=r.props||{},a={path:n||"/",component:o,beforeEnter:f};if(i){let c=Array.isArray(i)?i:[i];a.children=g(c);}!a.children&&r.children&&r.children.length>0&&(a.children=g(r.children)),e.push(a);}),e}function D(t,e){for(let r of t){let n=r.path,o=T(n,e);if(o)return [{route:r,params:o.params,pathname:o.path}]}return null}function T(t,e){let r=t.split("/").filter(Boolean),n=e.split("/").filter(Boolean);if(r.length!==n.length)return null;let o={};for(let i=0;i<r.length;i++){let f=r[i],a=n[i];if(f.startsWith(":")){let c=f.slice(1);o[c]=a;}else if(f!==a)return null}return {params:o,path:e}}var L=new e(null),p=new e(0),U=()=>({pathname:"/",search:"",hash:"",query:{}}),E=()=>{if(typeof window>"u")return U();let t=window.location.pathname;return (!t||t==="srcdoc"||t==="/srcdoc")&&(t="/"),{pathname:t,search:window.location.search,hash:window.location.hash,query:w(window.location.search)}},l=null,y=null,F=false;function h(){if(l&&y)return [l,y];l=a(E());let t=e=>{l&&(l.pathname=e.pathname,l.search=e.search,l.hash=e.hash,l.query=e.query);};return y=e=>{if(!(typeof window>"u")){if(N(e)){console.error("[Flexium Router] Blocked navigation to unsafe path:",e);return}try{window.history.pushState({},"",e);}catch{}t({pathname:e.split("?")[0].split("#")[0],search:e.includes("?")?"?"+e.split("?")[1].split("#")[0]:"",hash:e.includes("#")?"#"+e.split("#")[1]:"",query:w(e.includes("?")?"?"+e.split("?")[1].split("#")[0]:"")});}},typeof window<"u"&&!F&&(window.addEventListener("popstate",()=>{t(E());}),F=true),[l,y]}function R(){let[t]=c(L);if(!t)throw new Error("useRouter() must be called within a <Routes> component");return t}function P(){let[,t]=h();return t}function j(){return R().params}function _(){let[t]=h();return t.query}function x(t){return null}function A(t){return t&&typeof t=="object"&&("type"in t||Array.isArray(t))}function Q(t){let[e,r]=h(),n=Array.isArray(t.children)?t.children:[t.children],o=n.filter(s=>A(s)&&s.type===x),i=n.filter(s=>!A(s)||s.type!==x),f=g(o),a=e.pathname,c=D(f,a)||[],S=c.length>0?c[c.length-1].params:{},q={location:e,navigate:r,matches:c,params:S},C=null;if(c.length>0){let s=c[0],b=s.route.component,d=a;s.route.beforeEnter?s.route.beforeEnter(s.params)!==false&&(C=a$1(p.Provider,{value:1,key:d,children:a$1(b,{params:s.params,key:d})})):C=a$1(p.Provider,{value:1,key:d,children:a$1(b,{params:s.params,key:d})});}return a$1(L.Provider,{value:q,children:[...i,C]})}function B(){let t=R(),[e]=c(p),r=e??0,[n]=c(()=>t.matches);if(r>=n.length)return null;let o=n[r],i=o.route.component;return o.route.beforeEnter&&o.route.beforeEnter(o.params)===false?null:a$1(p.Provider,{value:r+1,children:a$1(i,{params:o.params})})}function M(t){let e=P();return a$1("a",{href:t.to,class:t.class||t.className,style:t.style?t.style+"; cursor: pointer;":"cursor: pointer;",onclick:r=>{r.preventDefault(),e(t.to);},children:t.children})}export{h as a,R as b,P as c,j as d,_ as e,x as f,Q as g,B as h,M as i};//# sourceMappingURL=chunk-REYBGD7A.mjs.map
|
|
2
|
+
//# sourceMappingURL=chunk-REYBGD7A.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","routeSegment","locationSegment","RouterCtx","Context","RouteDepthCtx","getDefaultLocation","getCurrentLocation","pathname","globalLocation","globalNavigate","popstateListenerAttached","useLocation","reactive","updateLocation","newLocation","useRouter","routerContext","use","useNavigate","navigate","useParams","useQuery","location","Route","_props","isFNode","node","Routes","props","currentLocation","childrenList","routeNodes","otherChildren","routeDefinitions","currentPath","matches","matchedContent","rootMatch","Component","routeKey","jsx","Outlet","depthValue","depth","match","Link","event"],"mappings":"wHAGA,SAASA,CAAAA,CAAWC,CAAAA,CAAwC,CAC1D,GAAI,CAACA,EAAQ,OAAO,EAAC,CACrB,GAAI,OAAO,eAAA,CAAoB,IAAa,CAC1C,IAAMC,CAAAA,CAAS,IAAI,eAAA,CAAgBD,CAAM,EACnCE,CAAAA,CAAiC,EAAC,CACxC,OAAAD,CAAAA,CAAO,OAAA,CAAQ,CAACE,CAAAA,CAAOC,CAA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CAC5B,KAAA,CAAOA,CAAAA,CAAM,MAAQA,CAAAA,CAAM,KAAA,CAAQ,oBAAA,CAAuB,kBAAA,CAC1D,OAAA,CAAUkB,CAAAA,EAAiB,CACvBA,CAAAA,CAAM,cAAA,EAAe,CACrB3B,CAAAA,CAASS,CAAAA,CAAM,EAAE,EACrB,CAAA,CACA,QAAA,CAAUA,CAAAA,CAAM,QACpB,CAAC,CACL","file":"chunk-REYBGD7A.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// 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 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 updateLocation({\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 }\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// 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 // Separate routes from other children (like Nav components)\n const routeNodes = childrenList.filter(child => isFNode(child) && child.type === Route)\n const otherChildren = childrenList.filter(child => !isFNode(child) || child.type !== Route)\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: [...otherChildren, matchedContent]\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'\nimport { useNavigate } from '../router'\n\nexport function Link(props: LinkProps) {\n const navigate = useNavigate()\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 event.preventDefault()\n navigate(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.
|
|
9
|
+
declare const VERSION = "0.16.8";
|
|
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.
|
|
9
|
+
declare const VERSION = "0.16.8";
|
|
10
10
|
|
|
11
11
|
export { VERSION };
|
package/dist/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
'use strict';var chunkEROGYZGA_js=require('./chunk-EROGYZGA.js'),chunkJNWUZKHF_js=require('./chunk-JNWUZKHF.js'),chunkTHUSQSDY_js=require('./chunk-THUSQSDY.js'),chunkHUE2TOCR_js=require('./chunk-HUE2TOCR.js'),
|
|
1
|
+
'use strict';var chunkEROGYZGA_js=require('./chunk-EROGYZGA.js'),chunkJNWUZKHF_js=require('./chunk-JNWUZKHF.js'),chunkTHUSQSDY_js=require('./chunk-THUSQSDY.js'),chunkHUE2TOCR_js=require('./chunk-HUE2TOCR.js'),chunkDZKR3RLN_js=require('./chunk-DZKR3RLN.js'),chunkLOKMOGSA_js=require('./chunk-LOKMOGSA.js'),chunk3CKIHQIE_js=require('./chunk-3CKIHQIE.js'),chunkVNYPOCV7_js=require('./chunk-VNYPOCV7.js'),chunkZJZRDYA2_js=require('./chunk-ZJZRDYA2.js');require('./chunk-TFXBDC6C.js');var D="0.16.8";Object.defineProperty(exports,"useRef",{enumerable:true,get:function(){return chunkEROGYZGA_js.a}});Object.defineProperty(exports,"ErrorBoundary",{enumerable:true,get:function(){return chunkJNWUZKHF_js.d}});Object.defineProperty(exports,"Suspense",{enumerable:true,get:function(){return chunkJNWUZKHF_js.c}});Object.defineProperty(exports,"f",{enumerable:true,get:function(){return chunkJNWUZKHF_js.a}});Object.defineProperty(exports,"hydrate",{enumerable:true,get:function(){return chunkJNWUZKHF_js.b}});Object.defineProperty(exports,"lazy",{enumerable:true,get:function(){return chunkJNWUZKHF_js.e}});Object.defineProperty(exports,"render",{enumerable:true,get:function(){return chunkTHUSQSDY_js.c}});Object.defineProperty(exports,"getIsServer",{enumerable:true,get:function(){return chunkHUE2TOCR_js.a}});Object.defineProperty(exports,"renderToStaticMarkup",{enumerable:true,get:function(){return chunkHUE2TOCR_js.c}});Object.defineProperty(exports,"renderToString",{enumerable:true,get:function(){return chunkHUE2TOCR_js.b}});Object.defineProperty(exports,"Link",{enumerable:true,get:function(){return chunkDZKR3RLN_js.i}});Object.defineProperty(exports,"Outlet",{enumerable:true,get:function(){return chunkDZKR3RLN_js.h}});Object.defineProperty(exports,"Route",{enumerable:true,get:function(){return chunkDZKR3RLN_js.f}});Object.defineProperty(exports,"Routes",{enumerable:true,get:function(){return chunkDZKR3RLN_js.g}});Object.defineProperty(exports,"useLocation",{enumerable:true,get:function(){return chunkDZKR3RLN_js.a}});Object.defineProperty(exports,"useNavigate",{enumerable:true,get:function(){return chunkDZKR3RLN_js.c}});Object.defineProperty(exports,"useParams",{enumerable:true,get:function(){return chunkDZKR3RLN_js.d}});Object.defineProperty(exports,"useQuery",{enumerable:true,get:function(){return chunkDZKR3RLN_js.e}});Object.defineProperty(exports,"useRouter",{enumerable:true,get:function(){return chunkDZKR3RLN_js.b}});Object.defineProperty(exports,"isReactive",{enumerable:true,get:function(){return chunkLOKMOGSA_js.b}});Object.defineProperty(exports,"use",{enumerable:true,get:function(){return chunkLOKMOGSA_js.c}});Object.defineProperty(exports,"sync",{enumerable:true,get:function(){return chunk3CKIHQIE_js.e}});Object.defineProperty(exports,"Context",{enumerable:true,get:function(){return chunkVNYPOCV7_js.e}});Object.defineProperty(exports,"Useable",{enumerable:true,get:function(){return chunkVNYPOCV7_js.c}});Object.defineProperty(exports,"getContextValue",{enumerable:true,get:function(){return chunkVNYPOCV7_js.f}});Object.defineProperty(exports,"isUseable",{enumerable:true,get:function(){return chunkVNYPOCV7_js.d}});Object.defineProperty(exports,"popContext",{enumerable:true,get:function(){return chunkVNYPOCV7_js.h}});Object.defineProperty(exports,"pushContext",{enumerable:true,get:function(){return chunkVNYPOCV7_js.g}});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=D;//# 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.
|
|
1
|
+
{"version":3,"sources":["../src/index.ts"],"names":["VERSION"],"mappings":"geAAO,IAAMA,CAAAA,CAAU","file":"index.js","sourcesContent":["export const VERSION = '0.16.8' // 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-PPPU2XSA.mjs';export{d as ErrorBoundary,c as Suspense,a as f,b as hydrate,e as lazy}from'./chunk-HBBTT5I5.mjs';export{c as render}from'./chunk-NABWFBEA.mjs';export{a as getIsServer,c as renderToStaticMarkup,b as renderToString}from'./chunk-S5DHAAMO.mjs';export{i as Link,h as Outlet,f as Route,g as Routes,a as useLocation,c as useNavigate,d as useParams,e as useQuery,b as useRouter}from'./chunk-
|
|
1
|
+
export{a as useRef}from'./chunk-PPPU2XSA.mjs';export{d as ErrorBoundary,c as Suspense,a as f,b as hydrate,e as lazy}from'./chunk-HBBTT5I5.mjs';export{c as render}from'./chunk-NABWFBEA.mjs';export{a as getIsServer,c as renderToStaticMarkup,b as renderToString}from'./chunk-S5DHAAMO.mjs';export{i as Link,h as Outlet,f as Route,g as Routes,a as useLocation,c as useNavigate,d as useParams,e as useQuery,b as useRouter}from'./chunk-REYBGD7A.mjs';export{b as isReactive,c as use}from'./chunk-CB6CIG76.mjs';export{e as sync}from'./chunk-NRPWBHKP.mjs';export{e as Context,c as Useable,f as getContextValue,d as isUseable,h as popContext,g as pushContext}from'./chunk-WHRUAZR4.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 D="0.16.8";export{D as VERSION};//# sourceMappingURL=index.mjs.map
|
|
2
2
|
//# sourceMappingURL=index.mjs.map
|
package/dist/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.ts"],"names":["VERSION"],"mappings":"k1BAAO,IAAMA,CAAAA,CAAU","file":"index.mjs","sourcesContent":["export const VERSION = '0.16.
|
|
1
|
+
{"version":3,"sources":["../src/index.ts"],"names":["VERSION"],"mappings":"k1BAAO,IAAMA,CAAAA,CAAU","file":"index.mjs","sourcesContent":["export const VERSION = '0.16.8' // 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/metafile-cjs.json
CHANGED
|
@@ -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":2396,"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":511,"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":15640,"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":348,"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":807,"imports":[],"format":"esm"},"src/router/utils.ts":{"bytes":3833,"imports":[{"path":"./types","kind":"import-statement","external":true}],"format":"esm"},"src/router/router.ts":{"bytes":3959,"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":2590,"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":467,"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":309,"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":218,"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-IBWAHNEZ.js.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"dist/render-IBWAHNEZ.js":{"imports":[{"path":"dist/chunk-THUSQSDY.js","kind":"import-statement"},{"path":"dist/chunk-3CKIHQIE.js","kind":"import-statement"},{"path":"dist/chunk-VNYPOCV7.js","kind":"import-statement"}],"exports":["reconcile","render","renderNode"],"entryPoint":"src/dom/render.ts","inputs":{},"bytes":147},"dist/index.js.map":{"imports":[],"exports":[],"inputs":{},"bytes":364},"dist/index.js":{"imports":[{"path":"dist/chunk-EROGYZGA.js","kind":"import-statement"},{"path":"dist/chunk-JNWUZKHF.js","kind":"import-statement"},{"path":"dist/chunk-THUSQSDY.js","kind":"import-statement"},{"path":"dist/chunk-HUE2TOCR.js","kind":"import-statement"},{"path":"dist/chunk-DVG7OZ3X.js","kind":"import-statement"},{"path":"dist/chunk-LOKMOGSA.js","kind":"import-statement"},{"path":"dist/chunk-3CKIHQIE.js","kind":"import-statement"},{"path":"dist/chunk-VNYPOCV7.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","getStyleTag","getStyles","hydrate","hydrateStyles","isReactive","isUseable","keyframes","lazy","popContext","pushContext","render","renderToStaticMarkup","renderToString","resetStyles","styled","sync","use","useLocation","useNavigate","useParams","useQuery","useRef","useRouter"],"entryPoint":"src/index.ts","inputs":{"src/index.ts":{"bytesInOutput":15}},"bytes":1124},"dist/core.js.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"dist/core.js":{"imports":[{"path":"dist/chunk-EROGYZGA.js","kind":"import-statement"},{"path":"dist/chunk-LOKMOGSA.js","kind":"import-statement"},{"path":"dist/chunk-3CKIHQIE.js","kind":"import-statement"},{"path":"dist/chunk-VNYPOCV7.js","kind":"import-statement"}],"exports":["Context","Useable","getContextValue","isReactive","isUseable","popContext","pushContext","sync","use","useRef"],"entryPoint":"src/core/index.ts","inputs":{},"bytes":318},"dist/chunk-EROGYZGA.js.map":{"imports":[],"exports":[],"inputs":{},"bytes":1066},"dist/chunk-EROGYZGA.js":{"imports":[{"path":"dist/chunk-VNYPOCV7.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-JNWUZKHF.js","kind":"import-statement"},{"path":"dist/chunk-THUSQSDY.js","kind":"import-statement"},{"path":"dist/chunk-LOKMOGSA.js","kind":"import-statement"},{"path":"dist/chunk-3CKIHQIE.js","kind":"import-statement"},{"path":"dist/chunk-VNYPOCV7.js","kind":"import-statement"}],"exports":["ErrorBoundary","Suspense","f","hydrate","lazy","render"],"entryPoint":"src/dom/index.ts","inputs":{},"bytes":271},"dist/chunk-JNWUZKHF.js.map":{"imports":[],"exports":[],"inputs":{},"bytes":26910},"dist/chunk-JNWUZKHF.js":{"imports":[{"path":"dist/chunk-THUSQSDY.js","kind":"import-statement"},{"path":"dist/chunk-LOKMOGSA.js","kind":"import-statement"},{"path":"dist/chunk-3CKIHQIE.js","kind":"import-statement"},{"path":"dist/chunk-VNYPOCV7.js","kind":"import-statement"},{"path":"dist/render-IBWAHNEZ.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-THUSQSDY.js.map":{"imports":[],"exports":[],"inputs":{},"bytes":24696},"dist/chunk-THUSQSDY.js":{"imports":[{"path":"dist/chunk-3CKIHQIE.js","kind":"import-statement"},{"path":"dist/chunk-VNYPOCV7.js","kind":"import-statement"}],"exports":["a","b","c"],"inputs":{"src/dom/render.ts":{"bytesInOutput":4952}},"bytes":5069},"dist/server.js.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"dist/server.js":{"imports":[{"path":"dist/chunk-HUE2TOCR.js","kind":"import-statement"},{"path":"dist/chunk-VNYPOCV7.js","kind":"import-statement"}],"exports":["getIsServer","renderToStaticMarkup","renderToString"],"entryPoint":"src/server/index.ts","inputs":{},"bytes":139},"dist/chunk-HUE2TOCR.js.map":{"imports":[],"exports":[],"inputs":{},"bytes":12945},"dist/chunk-HUE2TOCR.js":{"imports":[{"path":"dist/chunk-VNYPOCV7.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":2547},"dist/router.js.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"dist/router.js":{"imports":[{"path":"dist/chunk-DVG7OZ3X.js","kind":"import-statement"},{"path":"dist/chunk-LOKMOGSA.js","kind":"import-statement"},{"path":"dist/chunk-3CKIHQIE.js","kind":"import-statement"},{"path":"dist/chunk-VNYPOCV7.js","kind":"import-statement"},{"path":"dist/chunk-TFXBDC6C.js","kind":"import-statement"}],"exports":["Link","Outlet","Route","Routes","useLocation","useNavigate","useParams","useQuery","useRouter"],"entryPoint":"src/router/index.ts","inputs":{},"bytes":295},"dist/chunk-DVG7OZ3X.js.map":{"imports":[],"exports":[],"inputs":{},"bytes":18667},"dist/chunk-DVG7OZ3X.js":{"imports":[{"path":"dist/chunk-LOKMOGSA.js","kind":"import-statement"},{"path":"dist/chunk-VNYPOCV7.js","kind":"import-statement"},{"path":"dist/chunk-TFXBDC6C.js","kind":"import-statement"}],"exports":["a","b","c","d","e","f","g","h","i"],"inputs":{"src/router/index.ts":{"bytesInOutput":0},"src/router/utils.ts":{"bytesInOutput":1097},"src/router/router.ts":{"bytesInOutput":1132},"src/router/dom/Route.tsx":{"bytesInOutput":26},"src/router/dom/Routes.tsx":{"bytesInOutput":638},"src/router/dom/Outlet.tsx":{"bytesInOutput":244},"src/router/dom/Link.tsx":{"bytesInOutput":149}},"bytes":3485},"dist/chunk-LOKMOGSA.js.map":{"imports":[],"exports":[],"inputs":{},"bytes":19014},"dist/chunk-LOKMOGSA.js":{"imports":[{"path":"dist/chunk-3CKIHQIE.js","kind":"import-statement"},{"path":"dist/chunk-VNYPOCV7.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-VNYPOCV7.js.map":{"imports":[],"exports":[],"inputs":{},"bytes":7360},"dist/chunk-VNYPOCV7.js":{"imports":[],"exports":["a","b","c","d","e","f","g","h"],"inputs":{"src/core/hook.ts":{"bytesInOutput":227},"src/core/useable.ts":{"bytesInOutput":151},"src/core/context.ts":{"bytesInOutput":397}},"bytes":840},"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":2396,"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":511,"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":15640,"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":348,"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":3959,"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":2590,"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":537,"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":309,"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":218,"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-IBWAHNEZ.js.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"dist/render-IBWAHNEZ.js":{"imports":[{"path":"dist/chunk-THUSQSDY.js","kind":"import-statement"},{"path":"dist/chunk-3CKIHQIE.js","kind":"import-statement"},{"path":"dist/chunk-VNYPOCV7.js","kind":"import-statement"}],"exports":["reconcile","render","renderNode"],"entryPoint":"src/dom/render.ts","inputs":{},"bytes":147},"dist/index.js.map":{"imports":[],"exports":[],"inputs":{},"bytes":364},"dist/index.js":{"imports":[{"path":"dist/chunk-EROGYZGA.js","kind":"import-statement"},{"path":"dist/chunk-JNWUZKHF.js","kind":"import-statement"},{"path":"dist/chunk-THUSQSDY.js","kind":"import-statement"},{"path":"dist/chunk-HUE2TOCR.js","kind":"import-statement"},{"path":"dist/chunk-DZKR3RLN.js","kind":"import-statement"},{"path":"dist/chunk-LOKMOGSA.js","kind":"import-statement"},{"path":"dist/chunk-3CKIHQIE.js","kind":"import-statement"},{"path":"dist/chunk-VNYPOCV7.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","getStyleTag","getStyles","hydrate","hydrateStyles","isReactive","isUseable","keyframes","lazy","popContext","pushContext","render","renderToStaticMarkup","renderToString","resetStyles","styled","sync","use","useLocation","useNavigate","useParams","useQuery","useRef","useRouter"],"entryPoint":"src/index.ts","inputs":{"src/index.ts":{"bytesInOutput":15}},"bytes":1124},"dist/core.js.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"dist/core.js":{"imports":[{"path":"dist/chunk-EROGYZGA.js","kind":"import-statement"},{"path":"dist/chunk-LOKMOGSA.js","kind":"import-statement"},{"path":"dist/chunk-3CKIHQIE.js","kind":"import-statement"},{"path":"dist/chunk-VNYPOCV7.js","kind":"import-statement"}],"exports":["Context","Useable","getContextValue","isReactive","isUseable","popContext","pushContext","sync","use","useRef"],"entryPoint":"src/core/index.ts","inputs":{},"bytes":318},"dist/chunk-EROGYZGA.js.map":{"imports":[],"exports":[],"inputs":{},"bytes":1066},"dist/chunk-EROGYZGA.js":{"imports":[{"path":"dist/chunk-VNYPOCV7.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-JNWUZKHF.js","kind":"import-statement"},{"path":"dist/chunk-THUSQSDY.js","kind":"import-statement"},{"path":"dist/chunk-LOKMOGSA.js","kind":"import-statement"},{"path":"dist/chunk-3CKIHQIE.js","kind":"import-statement"},{"path":"dist/chunk-VNYPOCV7.js","kind":"import-statement"}],"exports":["ErrorBoundary","Suspense","f","hydrate","lazy","render"],"entryPoint":"src/dom/index.ts","inputs":{},"bytes":271},"dist/chunk-JNWUZKHF.js.map":{"imports":[],"exports":[],"inputs":{},"bytes":26910},"dist/chunk-JNWUZKHF.js":{"imports":[{"path":"dist/chunk-THUSQSDY.js","kind":"import-statement"},{"path":"dist/chunk-LOKMOGSA.js","kind":"import-statement"},{"path":"dist/chunk-3CKIHQIE.js","kind":"import-statement"},{"path":"dist/chunk-VNYPOCV7.js","kind":"import-statement"},{"path":"dist/render-IBWAHNEZ.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-THUSQSDY.js.map":{"imports":[],"exports":[],"inputs":{},"bytes":24696},"dist/chunk-THUSQSDY.js":{"imports":[{"path":"dist/chunk-3CKIHQIE.js","kind":"import-statement"},{"path":"dist/chunk-VNYPOCV7.js","kind":"import-statement"}],"exports":["a","b","c"],"inputs":{"src/dom/render.ts":{"bytesInOutput":4952}},"bytes":5069},"dist/server.js.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"dist/server.js":{"imports":[{"path":"dist/chunk-HUE2TOCR.js","kind":"import-statement"},{"path":"dist/chunk-VNYPOCV7.js","kind":"import-statement"}],"exports":["getIsServer","renderToStaticMarkup","renderToString"],"entryPoint":"src/server/index.ts","inputs":{},"bytes":139},"dist/chunk-HUE2TOCR.js.map":{"imports":[],"exports":[],"inputs":{},"bytes":12945},"dist/chunk-HUE2TOCR.js":{"imports":[{"path":"dist/chunk-VNYPOCV7.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":2547},"dist/router.js.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"dist/router.js":{"imports":[{"path":"dist/chunk-DZKR3RLN.js","kind":"import-statement"},{"path":"dist/chunk-LOKMOGSA.js","kind":"import-statement"},{"path":"dist/chunk-3CKIHQIE.js","kind":"import-statement"},{"path":"dist/chunk-VNYPOCV7.js","kind":"import-statement"},{"path":"dist/chunk-TFXBDC6C.js","kind":"import-statement"}],"exports":["Link","Outlet","Route","Routes","useLocation","useNavigate","useParams","useQuery","useRouter"],"entryPoint":"src/router/index.ts","inputs":{},"bytes":295},"dist/chunk-DZKR3RLN.js.map":{"imports":[],"exports":[],"inputs":{},"bytes":18779},"dist/chunk-DZKR3RLN.js":{"imports":[{"path":"dist/chunk-LOKMOGSA.js","kind":"import-statement"},{"path":"dist/chunk-VNYPOCV7.js","kind":"import-statement"},{"path":"dist/chunk-TFXBDC6C.js","kind":"import-statement"}],"exports":["a","b","c","d","e","f","g","h","i"],"inputs":{"src/router/index.ts":{"bytesInOutput":0},"src/router/utils.ts":{"bytesInOutput":1097},"src/router/router.ts":{"bytesInOutput":1132},"src/router/dom/Route.tsx":{"bytesInOutput":26},"src/router/dom/Routes.tsx":{"bytesInOutput":638},"src/router/dom/Outlet.tsx":{"bytesInOutput":244},"src/router/dom/Link.tsx":{"bytesInOutput":199}},"bytes":3535},"dist/chunk-LOKMOGSA.js.map":{"imports":[],"exports":[],"inputs":{},"bytes":19014},"dist/chunk-LOKMOGSA.js":{"imports":[{"path":"dist/chunk-3CKIHQIE.js","kind":"import-statement"},{"path":"dist/chunk-VNYPOCV7.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-VNYPOCV7.js.map":{"imports":[],"exports":[],"inputs":{},"bytes":7360},"dist/chunk-VNYPOCV7.js":{"imports":[],"exports":["a","b","c","d","e","f","g","h"],"inputs":{"src/core/hook.ts":{"bytesInOutput":227},"src/core/useable.ts":{"bytesInOutput":151},"src/core/context.ts":{"bytesInOutput":397}},"bytes":840},"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}}}
|
package/dist/metafile-esm.json
CHANGED
|
@@ -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":2396,"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":511,"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":15640,"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":348,"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":807,"imports":[],"format":"esm"},"src/router/utils.ts":{"bytes":3833,"imports":[{"path":"./types","kind":"import-statement","external":true}],"format":"esm"},"src/router/router.ts":{"bytes":3959,"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":2590,"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":467,"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":309,"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":218,"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-Z4FL7ORX.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"dist/render-Z4FL7ORX.mjs":{"imports":[{"path":"dist/chunk-NABWFBEA.mjs","kind":"import-statement"},{"path":"dist/chunk-NRPWBHKP.mjs","kind":"import-statement"},{"path":"dist/chunk-WHRUAZR4.mjs","kind":"import-statement"}],"exports":["reconcile","render","renderNode"],"entryPoint":"src/dom/render.ts","inputs":{},"bytes":150},"dist/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":364},"dist/index.mjs":{"imports":[{"path":"dist/chunk-PPPU2XSA.mjs","kind":"import-statement"},{"path":"dist/chunk-HBBTT5I5.mjs","kind":"import-statement"},{"path":"dist/chunk-NABWFBEA.mjs","kind":"import-statement"},{"path":"dist/chunk-S5DHAAMO.mjs","kind":"import-statement"},{"path":"dist/chunk-AJL63VBW.mjs","kind":"import-statement"},{"path":"dist/chunk-CB6CIG76.mjs","kind":"import-statement"},{"path":"dist/chunk-NRPWBHKP.mjs","kind":"import-statement"},{"path":"dist/chunk-WHRUAZR4.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","getStyleTag","getStyles","hydrate","hydrateStyles","isReactive","isUseable","keyframes","lazy","popContext","pushContext","render","renderToStaticMarkup","renderToString","resetStyles","styled","sync","use","useLocation","useNavigate","useParams","useQuery","useRef","useRouter"],"entryPoint":"src/index.ts","inputs":{"src/index.ts":{"bytesInOutput":15}},"bytes":1134},"dist/core.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"dist/core.mjs":{"imports":[{"path":"dist/chunk-PPPU2XSA.mjs","kind":"import-statement"},{"path":"dist/chunk-CB6CIG76.mjs","kind":"import-statement"},{"path":"dist/chunk-NRPWBHKP.mjs","kind":"import-statement"},{"path":"dist/chunk-WHRUAZR4.mjs","kind":"import-statement"}],"exports":["Context","Useable","getContextValue","isReactive","isUseable","popContext","pushContext","sync","use","useRef"],"entryPoint":"src/core/index.ts","inputs":{},"bytes":322},"dist/chunk-PPPU2XSA.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":1066},"dist/chunk-PPPU2XSA.mjs":{"imports":[{"path":"dist/chunk-WHRUAZR4.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-HBBTT5I5.mjs","kind":"import-statement"},{"path":"dist/chunk-NABWFBEA.mjs","kind":"import-statement"},{"path":"dist/chunk-CB6CIG76.mjs","kind":"import-statement"},{"path":"dist/chunk-NRPWBHKP.mjs","kind":"import-statement"},{"path":"dist/chunk-WHRUAZR4.mjs","kind":"import-statement"}],"exports":["ErrorBoundary","Suspense","f","hydrate","lazy","render"],"entryPoint":"src/dom/index.ts","inputs":{},"bytes":276},"dist/chunk-HBBTT5I5.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":26910},"dist/chunk-HBBTT5I5.mjs":{"imports":[{"path":"dist/chunk-NABWFBEA.mjs","kind":"import-statement"},{"path":"dist/chunk-CB6CIG76.mjs","kind":"import-statement"},{"path":"dist/chunk-NRPWBHKP.mjs","kind":"import-statement"},{"path":"dist/chunk-WHRUAZR4.mjs","kind":"import-statement"},{"path":"dist/render-Z4FL7ORX.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-NABWFBEA.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":24696},"dist/chunk-NABWFBEA.mjs":{"imports":[{"path":"dist/chunk-NRPWBHKP.mjs","kind":"import-statement"},{"path":"dist/chunk-WHRUAZR4.mjs","kind":"import-statement"}],"exports":["a","b","c"],"inputs":{"src/dom/render.ts":{"bytesInOutput":4952}},"bytes":5071},"dist/server.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"dist/server.mjs":{"imports":[{"path":"dist/chunk-S5DHAAMO.mjs","kind":"import-statement"},{"path":"dist/chunk-WHRUAZR4.mjs","kind":"import-statement"}],"exports":["getIsServer","renderToStaticMarkup","renderToString"],"entryPoint":"src/server/index.ts","inputs":{},"bytes":141},"dist/chunk-S5DHAAMO.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":12945},"dist/chunk-S5DHAAMO.mjs":{"imports":[{"path":"dist/chunk-WHRUAZR4.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":2548},"dist/router.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"dist/router.mjs":{"imports":[{"path":"dist/chunk-AJL63VBW.mjs","kind":"import-statement"},{"path":"dist/chunk-CB6CIG76.mjs","kind":"import-statement"},{"path":"dist/chunk-NRPWBHKP.mjs","kind":"import-statement"},{"path":"dist/chunk-WHRUAZR4.mjs","kind":"import-statement"},{"path":"dist/chunk-RUYGSYEV.mjs","kind":"import-statement"}],"exports":["Link","Outlet","Route","Routes","useLocation","useNavigate","useParams","useQuery","useRouter"],"entryPoint":"src/router/index.ts","inputs":{},"bytes":300},"dist/chunk-AJL63VBW.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":18667},"dist/chunk-AJL63VBW.mjs":{"imports":[{"path":"dist/chunk-CB6CIG76.mjs","kind":"import-statement"},{"path":"dist/chunk-WHRUAZR4.mjs","kind":"import-statement"},{"path":"dist/chunk-RUYGSYEV.mjs","kind":"import-statement"}],"exports":["a","b","c","d","e","f","g","h","i"],"inputs":{"src/router/index.ts":{"bytesInOutput":0},"src/router/utils.ts":{"bytesInOutput":1097},"src/router/router.ts":{"bytesInOutput":1132},"src/router/dom/Route.tsx":{"bytesInOutput":26},"src/router/dom/Routes.tsx":{"bytesInOutput":638},"src/router/dom/Outlet.tsx":{"bytesInOutput":244},"src/router/dom/Link.tsx":{"bytesInOutput":149}},"bytes":3488},"dist/chunk-CB6CIG76.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":19014},"dist/chunk-CB6CIG76.mjs":{"imports":[{"path":"dist/chunk-NRPWBHKP.mjs","kind":"import-statement"},{"path":"dist/chunk-WHRUAZR4.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-WHRUAZR4.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":7360},"dist/chunk-WHRUAZR4.mjs":{"imports":[],"exports":["a","b","c","d","e","f","g","h"],"inputs":{"src/core/hook.ts":{"bytesInOutput":227},"src/core/useable.ts":{"bytesInOutput":151},"src/core/context.ts":{"bytesInOutput":397}},"bytes":840},"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":2396,"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":511,"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":15640,"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":348,"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":3959,"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":2590,"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":537,"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":309,"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":218,"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-Z4FL7ORX.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"dist/render-Z4FL7ORX.mjs":{"imports":[{"path":"dist/chunk-NABWFBEA.mjs","kind":"import-statement"},{"path":"dist/chunk-NRPWBHKP.mjs","kind":"import-statement"},{"path":"dist/chunk-WHRUAZR4.mjs","kind":"import-statement"}],"exports":["reconcile","render","renderNode"],"entryPoint":"src/dom/render.ts","inputs":{},"bytes":150},"dist/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":364},"dist/index.mjs":{"imports":[{"path":"dist/chunk-PPPU2XSA.mjs","kind":"import-statement"},{"path":"dist/chunk-HBBTT5I5.mjs","kind":"import-statement"},{"path":"dist/chunk-NABWFBEA.mjs","kind":"import-statement"},{"path":"dist/chunk-S5DHAAMO.mjs","kind":"import-statement"},{"path":"dist/chunk-REYBGD7A.mjs","kind":"import-statement"},{"path":"dist/chunk-CB6CIG76.mjs","kind":"import-statement"},{"path":"dist/chunk-NRPWBHKP.mjs","kind":"import-statement"},{"path":"dist/chunk-WHRUAZR4.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","getStyleTag","getStyles","hydrate","hydrateStyles","isReactive","isUseable","keyframes","lazy","popContext","pushContext","render","renderToStaticMarkup","renderToString","resetStyles","styled","sync","use","useLocation","useNavigate","useParams","useQuery","useRef","useRouter"],"entryPoint":"src/index.ts","inputs":{"src/index.ts":{"bytesInOutput":15}},"bytes":1134},"dist/core.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"dist/core.mjs":{"imports":[{"path":"dist/chunk-PPPU2XSA.mjs","kind":"import-statement"},{"path":"dist/chunk-CB6CIG76.mjs","kind":"import-statement"},{"path":"dist/chunk-NRPWBHKP.mjs","kind":"import-statement"},{"path":"dist/chunk-WHRUAZR4.mjs","kind":"import-statement"}],"exports":["Context","Useable","getContextValue","isReactive","isUseable","popContext","pushContext","sync","use","useRef"],"entryPoint":"src/core/index.ts","inputs":{},"bytes":322},"dist/chunk-PPPU2XSA.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":1066},"dist/chunk-PPPU2XSA.mjs":{"imports":[{"path":"dist/chunk-WHRUAZR4.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-HBBTT5I5.mjs","kind":"import-statement"},{"path":"dist/chunk-NABWFBEA.mjs","kind":"import-statement"},{"path":"dist/chunk-CB6CIG76.mjs","kind":"import-statement"},{"path":"dist/chunk-NRPWBHKP.mjs","kind":"import-statement"},{"path":"dist/chunk-WHRUAZR4.mjs","kind":"import-statement"}],"exports":["ErrorBoundary","Suspense","f","hydrate","lazy","render"],"entryPoint":"src/dom/index.ts","inputs":{},"bytes":276},"dist/chunk-HBBTT5I5.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":26910},"dist/chunk-HBBTT5I5.mjs":{"imports":[{"path":"dist/chunk-NABWFBEA.mjs","kind":"import-statement"},{"path":"dist/chunk-CB6CIG76.mjs","kind":"import-statement"},{"path":"dist/chunk-NRPWBHKP.mjs","kind":"import-statement"},{"path":"dist/chunk-WHRUAZR4.mjs","kind":"import-statement"},{"path":"dist/render-Z4FL7ORX.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-NABWFBEA.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":24696},"dist/chunk-NABWFBEA.mjs":{"imports":[{"path":"dist/chunk-NRPWBHKP.mjs","kind":"import-statement"},{"path":"dist/chunk-WHRUAZR4.mjs","kind":"import-statement"}],"exports":["a","b","c"],"inputs":{"src/dom/render.ts":{"bytesInOutput":4952}},"bytes":5071},"dist/server.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"dist/server.mjs":{"imports":[{"path":"dist/chunk-S5DHAAMO.mjs","kind":"import-statement"},{"path":"dist/chunk-WHRUAZR4.mjs","kind":"import-statement"}],"exports":["getIsServer","renderToStaticMarkup","renderToString"],"entryPoint":"src/server/index.ts","inputs":{},"bytes":141},"dist/chunk-S5DHAAMO.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":12945},"dist/chunk-S5DHAAMO.mjs":{"imports":[{"path":"dist/chunk-WHRUAZR4.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":2548},"dist/router.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"dist/router.mjs":{"imports":[{"path":"dist/chunk-REYBGD7A.mjs","kind":"import-statement"},{"path":"dist/chunk-CB6CIG76.mjs","kind":"import-statement"},{"path":"dist/chunk-NRPWBHKP.mjs","kind":"import-statement"},{"path":"dist/chunk-WHRUAZR4.mjs","kind":"import-statement"},{"path":"dist/chunk-RUYGSYEV.mjs","kind":"import-statement"}],"exports":["Link","Outlet","Route","Routes","useLocation","useNavigate","useParams","useQuery","useRouter"],"entryPoint":"src/router/index.ts","inputs":{},"bytes":300},"dist/chunk-REYBGD7A.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":18779},"dist/chunk-REYBGD7A.mjs":{"imports":[{"path":"dist/chunk-CB6CIG76.mjs","kind":"import-statement"},{"path":"dist/chunk-WHRUAZR4.mjs","kind":"import-statement"},{"path":"dist/chunk-RUYGSYEV.mjs","kind":"import-statement"}],"exports":["a","b","c","d","e","f","g","h","i"],"inputs":{"src/router/index.ts":{"bytesInOutput":0},"src/router/utils.ts":{"bytesInOutput":1097},"src/router/router.ts":{"bytesInOutput":1132},"src/router/dom/Route.tsx":{"bytesInOutput":26},"src/router/dom/Routes.tsx":{"bytesInOutput":638},"src/router/dom/Outlet.tsx":{"bytesInOutput":244},"src/router/dom/Link.tsx":{"bytesInOutput":199}},"bytes":3538},"dist/chunk-CB6CIG76.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":19014},"dist/chunk-CB6CIG76.mjs":{"imports":[{"path":"dist/chunk-NRPWBHKP.mjs","kind":"import-statement"},{"path":"dist/chunk-WHRUAZR4.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-WHRUAZR4.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":7360},"dist/chunk-WHRUAZR4.mjs":{"imports":[],"exports":["a","b","c","d","e","f","g","h"],"inputs":{"src/core/hook.ts":{"bytesInOutput":227},"src/core/useable.ts":{"bytesInOutput":151},"src/core/context.ts":{"bytesInOutput":397}},"bytes":840},"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.d.cts
CHANGED
package/dist/router.d.ts
CHANGED
package/dist/router.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
'use strict';var
|
|
1
|
+
'use strict';var chunkDZKR3RLN_js=require('./chunk-DZKR3RLN.js');require('./chunk-LOKMOGSA.js'),require('./chunk-3CKIHQIE.js'),require('./chunk-VNYPOCV7.js'),require('./chunk-TFXBDC6C.js');Object.defineProperty(exports,"Link",{enumerable:true,get:function(){return chunkDZKR3RLN_js.i}});Object.defineProperty(exports,"Outlet",{enumerable:true,get:function(){return chunkDZKR3RLN_js.h}});Object.defineProperty(exports,"Route",{enumerable:true,get:function(){return chunkDZKR3RLN_js.f}});Object.defineProperty(exports,"Routes",{enumerable:true,get:function(){return chunkDZKR3RLN_js.g}});Object.defineProperty(exports,"useLocation",{enumerable:true,get:function(){return chunkDZKR3RLN_js.a}});Object.defineProperty(exports,"useNavigate",{enumerable:true,get:function(){return chunkDZKR3RLN_js.c}});Object.defineProperty(exports,"useParams",{enumerable:true,get:function(){return chunkDZKR3RLN_js.d}});Object.defineProperty(exports,"useQuery",{enumerable:true,get:function(){return chunkDZKR3RLN_js.e}});Object.defineProperty(exports,"useRouter",{enumerable:true,get:function(){return chunkDZKR3RLN_js.b}});//# sourceMappingURL=router.js.map
|
|
2
2
|
//# sourceMappingURL=router.js.map
|
package/dist/router.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export{i as Link,h as Outlet,f as Route,g as Routes,a as useLocation,c as useNavigate,d as useParams,e as useQuery,b as useRouter}from'./chunk-
|
|
1
|
+
export{i as Link,h as Outlet,f as Route,g as Routes,a as useLocation,c as useNavigate,d as useParams,e as useQuery,b as useRouter}from'./chunk-REYBGD7A.mjs';import'./chunk-CB6CIG76.mjs';import'./chunk-NRPWBHKP.mjs';import'./chunk-WHRUAZR4.mjs';import'./chunk-RUYGSYEV.mjs';//# sourceMappingURL=router.mjs.map
|
|
2
2
|
//# sourceMappingURL=router.mjs.map
|
package/package.json
CHANGED
|
@@ -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","routeSegment","locationSegment","RouterCtx","Context","RouteDepthCtx","getDefaultLocation","getCurrentLocation","pathname","globalLocation","globalNavigate","popstateListenerAttached","useLocation","reactive","updateLocation","newLocation","useRouter","routerContext","use","useNavigate","navigate","useParams","useQuery","location","Route","_props","isFNode","node","Routes","props","currentLocation","childrenList","routeNodes","otherChildren","routeDefinitions","currentPath","matches","matchedContent","rootMatch","Component","routeKey","jsx","Outlet","depthValue","depth","match","Link","event"],"mappings":"wHAGA,SAASA,CAAAA,CAAWC,CAAAA,CAAwC,CAC1D,GAAI,CAACA,EAAQ,OAAO,EAAC,CACrB,GAAI,OAAO,eAAA,CAAoB,IAAa,CAC1C,IAAMC,CAAAA,CAAS,IAAI,eAAA,CAAgBD,CAAM,EACnCE,CAAAA,CAAiC,EAAC,CACxC,OAAAD,CAAAA,CAAO,OAAA,CAAQ,CAACE,CAAAA,CAAOC,CAAAA,GAAQF,CAAAA,CAAOE,CAAG,CAAA,CAAID,CAAK,EAC3CD,CACT,CACA,OAAOF,CAAAA,CACJ,SAAA,CAAU,CAAC,EACX,KAAA,CAAM,GAAG,CAAA,CACT,MAAA,CAAO,CAACK,CAAAA,CAAaC,IAAS,CAC7B,GAAM,CAACF,CAA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C/C,CAAC,CACL,CCjEO,SAASK,CAAAA,EAAS,CACrB,IAAMzB,CAAAA,CAAgBD,CAAAA,EAAU,CAC1B,CAAC2B,CAAU,EAAIzB,CAAAA,CAAIb,CAAa,CAAA,CAChCuC,CAAAA,CAAQD,CAAAA,EAAc,CAAA,CAEtB,CAACP,CAAO,CAAA,CAAIlB,CAAAA,CAAI,IAAMD,CAAAA,CAAc,OAAO,EAEjD,GAAI2B,CAAAA,EAASR,CAAAA,CAAQ,MAAA,CAAQ,OAAO,IAAA,CAEpC,IAAMS,CAAAA,CAAQT,CAAAA,CAAQQ,CAAK,CAAA,CACrBL,CAAAA,CAAYM,CAAAA,CAAM,MAAM,SAAA,CAG9B,OAAIA,CAAAA,CAAM,KAAA,CAAM,WAAA,EACRA,CAAAA,CAAM,MAAM,WAAA,CAAYA,CAAAA,CAAM,MAAM,CAAA,GAAM,KAAA,CAAc,IAAA,CAIzDJ,IAAEpC,CAAAA,CAAc,QAAA,CAAU,CAC7B,KAAA,CAAOuC,CAAAA,CAAQ,CAAA,CACf,SAAUH,GAAAA,CAAEF,CAAAA,CAAW,CAAE,MAAA,CAAQM,CAAAA,CAAM,MAAO,CAAC,CACnD,CAAC,CACL,CCtBO,SAASC,CAAAA,CAAKjB,EAAkB,CACnC,IAAMT,CAAAA,CAAWD,CAAAA,EAAY,CAC7B,OAAOsB,IAAE,GAAA,CAAK,CACV,IAAA,CAAMZ,CAAAA,CAAM,EAAA,CACZ,KAAA,CAAOA,EAAM,KAAA,CACb,KAAA,CAAO,kBAAA,CACP,OAAA,CAAUkB,CAAAA,EAAiB,CACvBA,EAAM,cAAA,EAAe,CACrB3B,CAAAA,CAASS,CAAAA,CAAM,EAAE,EACrB,EACA,QAAA,CAAUA,CAAAA,CAAM,QACpB,CAAC,CACL","file":"chunk-AJL63VBW.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// 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 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 updateLocation({\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 }\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// 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 // Separate routes from other children (like Nav components)\n const routeNodes = childrenList.filter(child => isFNode(child) && child.type === Route)\n const otherChildren = childrenList.filter(child => !isFNode(child) || child.type !== Route)\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: [...otherChildren, matchedContent]\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'\nimport { useNavigate } from '../router'\n\nexport function Link(props: LinkProps) {\n const navigate = useNavigate()\n return f('a', {\n href: props.to,\n class: props.class,\n style: 'cursor: pointer;',\n onclick: (event: Event) => {\n event.preventDefault()\n navigate(props.to)\n },\n children: props.children\n })\n}\n"]}
|
|
@@ -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","routeSegment","locationSegment","RouterCtx","Context","RouteDepthCtx","getDefaultLocation","getCurrentLocation","pathname","globalLocation","globalNavigate","popstateListenerAttached","useLocation","reactive","updateLocation","newLocation","useRouter","routerContext","use","useNavigate","navigate","useParams","useQuery","location","Route","_props","isFNode","node","Routes","props","currentLocation","childrenList","routeNodes","otherChildren","routeDefinitions","currentPath","matches","matchedContent","rootMatch","Component","routeKey","jsx","Outlet","depthValue","depth","match","Link","event"],"mappings":"iKAGA,SAASA,CAAAA,CAAWC,CAAAA,CAAwC,CAC1D,GAAI,CAACA,EAAQ,OAAO,EAAC,CACrB,GAAI,OAAO,eAAA,CAAoB,IAAa,CAC1C,IAAMC,CAAAA,CAAS,IAAI,eAAA,CAAgBD,CAAM,EACnCE,CAAAA,CAAiC,EAAC,CACxC,OAAAD,CAAAA,CAAO,OAAA,CAAQ,CAACE,CAAAA,CAAOC,CAAAA,GAAQF,CAAAA,CAAOE,CAAG,CAAA,CAAID,CAAK,EAC3CD,CACT,CACA,OAAOF,CA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QACpB,CAAC,CACL","file":"chunk-DVG7OZ3X.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// 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 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 updateLocation({\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 }\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// 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 // Separate routes from other children (like Nav components)\n const routeNodes = childrenList.filter(child => isFNode(child) && child.type === Route)\n const otherChildren = childrenList.filter(child => !isFNode(child) || child.type !== Route)\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: [...otherChildren, matchedContent]\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'\nimport { useNavigate } from '../router'\n\nexport function Link(props: LinkProps) {\n const navigate = useNavigate()\n return f('a', {\n href: props.to,\n class: props.class,\n style: 'cursor: pointer;',\n onclick: (event: Event) => {\n event.preventDefault()\n navigate(props.to)\n },\n children: props.children\n })\n}\n"]}
|