flexium 0.14.1 → 0.14.3
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-RUYGSYEV.mjs +2 -0
- package/dist/chunk-RUYGSYEV.mjs.map +1 -0
- package/dist/chunk-TFXBDC6C.js +2 -0
- package/dist/chunk-TFXBDC6C.js.map +1 -0
- package/dist/css.d.cts +300 -0
- package/dist/css.d.ts +300 -0
- package/dist/css.js +2 -0
- package/dist/css.js.map +1 -0
- package/dist/css.mjs +2 -0
- package/dist/css.mjs.map +1 -0
- package/dist/dom.js +1 -1
- package/dist/dom.mjs +1 -1
- 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/jsx-dev-runtime.js +1 -1
- package/dist/jsx-dev-runtime.mjs +1 -1
- package/dist/jsx-runtime.d.cts +2 -1
- package/dist/jsx-runtime.d.ts +2 -1
- package/dist/jsx-runtime.js +1 -1
- package/dist/jsx-runtime.mjs +1 -1
- package/dist/metafile-cjs.json +1 -1
- package/dist/metafile-esm.json +1 -1
- package/dist/router.js +1 -1
- package/dist/router.mjs +1 -1
- package/package.json +6 -1
- package/dist/chunk-J3542Z77.mjs +0 -2
- package/dist/chunk-J3542Z77.mjs.map +0 -1
- package/dist/chunk-LHOIM4QY.js +0 -2
- package/dist/chunk-LHOIM4QY.js.map +0 -1
package/dist/css.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/css/runtime/hash.ts","../src/css/runtime/serialize.ts","../src/css/runtime/sheet.ts","../src/css/css.ts","../src/css/styled.ts","../src/css/keyframes.ts"],"names":["hash","str","h","i","unitlessProperties","toKebabCase","match","addUnit","property","value","serialize","styles","selector","properties","nested","key","nestedSelector","result","serializeKeyframes","name","keyframes","frames","prop","cache","serverStyles","browserSheet","supportsAdoptedStyleSheets","getBrowserSheet","insert","css","sheet","e","has","getStyles","getStyleTag","resetStyles","hydrateStyles","styleTag","text","classRegex","className","cssText","cx","classes","styled","tag","config","base","variants","defaultVariants","compoundVariants","baseClass","variantCache","getVariantClass","variantName","variantValue","cacheKey","compoundCache","StyledComponent","props","children","userClassName","rest","variantProps","elementProps","variantClasses","vc","compound","compoundStyles","conditions","matches","compoundClass","finalClassName","definition"],"mappings":"aAIO,SAASA,CAAAA,CAAKC,EAAqB,CACxC,IAAIC,EAAI,IAAA,CACR,IAAA,IAASC,EAAI,CAAA,CAAGA,CAAAA,CAAIF,EAAI,MAAA,CAAQE,CAAAA,EAAAA,CAC9BD,GAAMA,CAAAA,EAAK,CAAA,EAAKA,EAAKD,CAAAA,CAAI,UAAA,CAAWE,CAAC,CAAA,CAEvC,OAAO,KAAA,CAAA,CAASD,IAAM,CAAA,EAAG,QAAA,CAAS,EAAE,CACtC,CCLA,IAAME,CAAAA,CAAqB,IAAI,IAAI,CACjC,yBAAA,CACA,oBACA,kBAAA,CACA,kBAAA,CACA,UACA,cAAA,CACA,iBAAA,CACA,cACA,SAAA,CACA,MAAA,CACA,UAAA,CACA,cAAA,CACA,YAAA,CACA,cAAA,CACA,YACA,UAAA,CACA,SAAA,CACA,aACA,aAAA,CACA,cAAA,CACA,aACA,eAAA,CACA,gBAAA,CACA,kBACA,YAAA,CACA,WAAA,CACA,aACA,SAAA,CACA,OAAA,CACA,UACA,SAAA,CACA,QAAA,CACA,SACA,MAAA,CACA,aAAA,CACA,cAAA,CACA,aAAA,CACA,iBAAA,CACA,kBAAA,CACA,mBACA,eAAA,CACA,aACF,CAAC,CAAA,CAKM,SAASC,EAAYJ,CAAAA,CAAqB,CAC/C,OAAOA,CAAAA,CAAI,OAAA,CAAQ,SAAWK,CAAAA,EAAU,GAAA,CAAMA,EAAM,WAAA,EAAa,CACnE,CAKO,SAASC,CAAAA,CAAQC,CAAAA,CAAkBC,CAAAA,CAAyB,CACjE,OAAI,OAAOA,C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,CAIF,IAAMC,CAAAA,CAAiB9B,EAAGS,CAAAA,CAAW,GAAGc,EAAgBJ,CAAa,CAAA,CAGrE,OAAO,CACL,IAAA,CAAMhB,EACN,KAAA,CAAO,CAAE,GAAGmB,CAAAA,CAAc,SAAA,CAAWQ,CAAe,CAAA,CACpD,QAAA,CAAU,MAAM,OAAA,CAAQZ,CAAQ,CAAA,CAAIA,CAAAA,CAAWA,CAAAA,EAAY,IAAA,CAAO,CAACA,CAAQ,CAAA,CAAI,EAAC,CAChF,GAAA,CAAK,MACP,CACF,CAGA,OAAAF,CAAAA,CAAgB,WAAA,CAAc,UAAUb,CAAG,CAAA,CAAA,CAAA,CAEpCa,CACT,CChJO,SAAStC,EAAUqD,CAAAA,CAAwC,CAEhE,IAAM1D,CAAAA,CAAM,IAAA,CAAK,SAAA,CAAU0D,CAAU,CAAA,CAC/BtD,CAAAA,CAAOnB,EAAKe,CAAG,CAAA,CAGrB,GAAIiB,CAAAA,CAAIb,CAAI,EACV,OAAOA,CAAAA,CAIT,IAAMsB,CAAAA,CAAUvB,CAAAA,CAAmBC,EAAMsD,CAAsD,CAAA,CAC/F,OAAA7C,CAAAA,CAAOT,CAAAA,CAAMsB,CAAO,CAAA,CAEbtB,CACT","file":"css.js","sourcesContent":["/**\n * Generate a hash for a style object\n * Uses djb2 algorithm for fast, low-collision hashing\n */\nexport function hash(str: string): string {\n let h = 5381\n for (let i = 0; i < str.length; i++) {\n h = ((h << 5) + h) ^ str.charCodeAt(i)\n }\n return 'fx-' + (h >>> 0).toString(36)\n}\n","import type { StyleObject, CSSValue } from '../types'\n\n/**\n * Properties that should not have 'px' auto-added\n */\nconst unitlessProperties = new Set([\n 'animationIterationCount',\n 'borderImageOutset',\n 'borderImageSlice',\n 'borderImageWidth',\n 'boxFlex',\n 'boxFlexGroup',\n 'boxOrdinalGroup',\n 'columnCount',\n 'columns',\n 'flex',\n 'flexGrow',\n 'flexPositive',\n 'flexShrink',\n 'flexNegative',\n 'flexOrder',\n 'gridArea',\n 'gridRow',\n 'gridRowEnd',\n 'gridRowSpan',\n 'gridRowStart',\n 'gridColumn',\n 'gridColumnEnd',\n 'gridColumnSpan',\n 'gridColumnStart',\n 'fontWeight',\n 'lineClamp',\n 'lineHeight',\n 'opacity',\n 'order',\n 'orphans',\n 'tabSize',\n 'widows',\n 'zIndex',\n 'zoom',\n 'fillOpacity',\n 'floodOpacity',\n 'stopOpacity',\n 'strokeDasharray',\n 'strokeDashoffset',\n 'strokeMiterlimit',\n 'strokeOpacity',\n 'strokeWidth',\n])\n\n/**\n * Convert camelCase to kebab-case\n */\nexport function toKebabCase(str: string): string {\n return str.replace(/[A-Z]/g, (match) => '-' + match.toLowerCase())\n}\n\n/**\n * Add unit to numeric values where appropriate\n */\nexport function addUnit(property: string, value: CSSValue): string {\n if (typeof value === 'number' && value !== 0 && !unitlessProperties.has(property)) {\n return value + 'px'\n }\n return String(value)\n}\n\n/**\n * Serialize a style object to CSS string\n */\nexport function serialize(styles: StyleObject, selector: string): string {\n let properties = ''\n let nested = ''\n\n for (const key in styles) {\n const value = styles[key]\n\n if (value === undefined || value === null) {\n continue\n }\n\n if (key.startsWith('&')) {\n // Nested selector: &:hover, &::before, & > div\n const nestedSelector = key.replace(/&/g, selector)\n nested += serialize(value as StyleObject, nestedSelector)\n } else if (key.startsWith('@')) {\n // At-rule: @media, @supports, @container\n nested += `${key}{${serialize(value as StyleObject, selector)}}`\n } else if (typeof value === 'object') {\n // Skip invalid nested objects without & or @\n continue\n } else {\n // Regular CSS property\n properties += `${toKebabCase(key)}:${addUnit(key, value)};`\n }\n }\n\n let result = ''\n if (properties) {\n result = `${selector}{${properties}}`\n }\n result += nested\n\n return result\n}\n\n/**\n * Serialize keyframes to CSS string\n */\nexport function serializeKeyframes(\n name: string,\n keyframes: Record<string, Record<string, CSSValue>>\n): string {\n let frames = ''\n\n for (const key in keyframes) {\n const styles = keyframes[key]\n let properties = ''\n\n for (const prop in styles) {\n const value = styles[prop]\n if (value !== undefined && value !== null && typeof value !== 'object') {\n properties += `${toKebabCase(prop)}:${addUnit(prop, value)};`\n }\n }\n\n frames += `${key}{${properties}}`\n }\n\n return `@keyframes ${name}{${frames}}`\n}\n","/**\n * StyleSheet manager\n * Uses adoptedStyleSheets for efficient style injection\n * Falls back to server-side collection when not available (SSR, jsdom)\n */\n\n// Cache to track which styles have been inserted\nlet cache = new Map<string, boolean>()\n\n// Server-side collected styles\nlet serverStyles: string[] = []\n\n// Browser stylesheet (lazy initialized)\nlet browserSheet: CSSStyleSheet | null = null\n\n/**\n * Check if adoptedStyleSheets is supported\n */\nfunction supportsAdoptedStyleSheets(): boolean {\n return (\n typeof document !== 'undefined' &&\n 'adoptedStyleSheets' in document &&\n typeof CSSStyleSheet !== 'undefined' &&\n 'replaceSync' in CSSStyleSheet.prototype\n )\n}\n\nfunction getBrowserSheet(): CSSStyleSheet | null {\n if (!supportsAdoptedStyleSheets()) {\n return null\n }\n\n if (!browserSheet) {\n browserSheet = new CSSStyleSheet()\n document.adoptedStyleSheets = [...document.adoptedStyleSheets, browserSheet]\n }\n return browserSheet\n}\n\n/**\n * Insert a CSS rule\n */\nexport function insert(hash: string, css: string): void {\n if (cache.has(hash)) {\n return\n }\n\n cache.set(hash, true)\n\n const sheet = getBrowserSheet()\n if (sheet) {\n try {\n sheet.insertRule(css, sheet.cssRules.length)\n } catch (e) {\n // Handle invalid CSS gracefully in development\n if (process.env.NODE_ENV !== 'production') {\n console.warn('[flexium/css] Invalid CSS rule:', css, e)\n }\n }\n } else {\n // Server-side or unsupported environment: collect styles\n serverStyles.push(css)\n }\n}\n\n/**\n * Check if a hash is already in the cache\n */\nexport function has(hash: string): boolean {\n return cache.has(hash)\n}\n\n/**\n * Get all collected styles for SSR\n */\nexport function getStyles(): string {\n return serverStyles.join('')\n}\n\n/**\n * Get styles as a style tag for SSR\n */\nexport function getStyleTag(): string {\n const styles = getStyles()\n if (!styles) return ''\n return `<style data-flexium-css>${styles}</style>`\n}\n\n/**\n * Reset collected styles and cache (for SSR between requests or testing)\n */\nexport function resetStyles(): void {\n serverStyles = []\n cache = new Map()\n browserSheet = null\n}\n\n/**\n * Hydrate styles on the client\n * Call this after SSR to sync the cache with server-rendered styles\n */\nexport function hydrateStyles(): void {\n if (typeof document === 'undefined') return\n\n const styleTag = document.querySelector('style[data-flexium-css]')\n if (styleTag) {\n // Parse and cache existing styles\n const text = styleTag.textContent || ''\n const classRegex = /\\.fx-[a-z0-9]+/g\n let match\n while ((match = classRegex.exec(text)) !== null) {\n const hash = match[0].slice(1) // Remove the dot\n cache.set(hash, true)\n }\n }\n}\n\n// Auto-hydrate on client (only if adoptedStyleSheets is supported)\nif (supportsAdoptedStyleSheets()) {\n hydrateStyles()\n}\n","import type { StyleObject } from './types'\nimport { hash } from './runtime/hash'\nimport { serialize } from './runtime/serialize'\nimport { insert, has } from './runtime/sheet'\n\n/**\n * Create a CSS class from a style object\n *\n * @example\n * ```tsx\n * const buttonClass = css({\n * padding: '8px 16px',\n * backgroundColor: 'blue',\n * color: 'white',\n * '&:hover': {\n * backgroundColor: 'darkblue'\n * }\n * })\n *\n * <button className={buttonClass}>Click me</button>\n * ```\n */\nexport function css(styles: StyleObject): string {\n // Generate unique hash from style object\n const key = JSON.stringify(styles)\n const className = hash(key)\n\n // Skip if already inserted\n if (has(className)) {\n return className\n }\n\n // Serialize and insert CSS\n const cssText = serialize(styles, '.' + className)\n insert(className, cssText)\n\n return className\n}\n\n/**\n * Combine multiple class names, filtering out falsy values\n *\n * @example\n * ```tsx\n * const className = cx(\n * baseClass,\n * isActive && activeClass,\n * variant === 'primary' && primaryClass\n * )\n * ```\n */\nexport function cx(\n ...classes: (string | boolean | null | undefined)[]\n): string {\n return classes.filter(Boolean).join(' ')\n}\n","import type { StyleObject, VariantConfig, StyledConfig } from './types'\nimport type { FNode } from '../dom/types'\nimport { css, cx } from './css'\n\n// HTML element tag names\ntype HTMLTag = 'a' | 'abbr' | 'address' | 'area' | 'article' | 'aside' | 'audio' |\n 'b' | 'base' | 'bdi' | 'bdo' | 'blockquote' | 'body' | 'br' | 'button' |\n 'canvas' | 'caption' | 'cite' | 'code' | 'col' | 'colgroup' |\n 'data' | 'datalist' | 'dd' | 'del' | 'details' | 'dfn' | 'dialog' | 'div' | 'dl' | 'dt' |\n 'em' | 'embed' |\n 'fieldset' | 'figcaption' | 'figure' | 'footer' | 'form' |\n 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'head' | 'header' | 'hgroup' | 'hr' | 'html' |\n 'i' | 'iframe' | 'img' | 'input' | 'ins' |\n 'kbd' |\n 'label' | 'legend' | 'li' | 'link' |\n 'main' | 'map' | 'mark' | 'menu' | 'meta' | 'meter' |\n 'nav' | 'noscript' |\n 'object' | 'ol' | 'optgroup' | 'option' | 'output' |\n 'p' | 'picture' | 'pre' | 'progress' |\n 'q' |\n 'rp' | 'rt' | 'ruby' |\n 's' | 'samp' | 'script' | 'search' | 'section' | 'select' | 'slot' | 'small' | 'source' | 'span' | 'strong' | 'style' | 'sub' | 'summary' | 'sup' | 'svg' |\n 'table' | 'tbody' | 'td' | 'template' | 'textarea' | 'tfoot' | 'th' | 'thead' | 'time' | 'title' | 'tr' | 'track' |\n 'u' | 'ul' |\n 'var' | 'video' |\n 'wbr'\n\n/**\n * Create a styled component with variant support\n *\n * @example\n * ```tsx\n * const Button = styled('button', {\n * base: {\n * padding: '8px 16px',\n * border: 'none',\n * borderRadius: 4,\n * cursor: 'pointer'\n * },\n * variants: {\n * variant: {\n * primary: { backgroundColor: 'blue', color: 'white' },\n * secondary: { backgroundColor: 'gray', color: 'black' }\n * },\n * size: {\n * sm: { padding: '4px 8px', fontSize: 12 },\n * md: { padding: '8px 16px', fontSize: 14 },\n * lg: { padding: '12px 24px', fontSize: 16 }\n * }\n * },\n * defaultVariants: {\n * variant: 'primary',\n * size: 'md'\n * }\n * })\n *\n * // Usage\n * <Button variant=\"secondary\" size=\"lg\">Click me</Button>\n * ```\n */\nexport function styled<\n T extends HTMLTag,\n V extends VariantConfig = Record<string, never>\n>(\n tag: T,\n config: StyledConfig<V>\n): StyledComponent<T, V> {\n const { base, variants, defaultVariants, compoundVariants } = config\n\n // Pre-compute base class\n const baseClass = css(base)\n\n // Cache for variant classes\n const variantCache = new Map<string, string>()\n\n // Get or create variant class\n function getVariantClass(variantName: string, variantValue: string): string {\n const cacheKey = `${variantName}:${variantValue}`\n let className = variantCache.get(cacheKey)\n\n if (!className && variants?.[variantName]?.[variantValue]) {\n className = css(variants[variantName][variantValue])\n variantCache.set(cacheKey, className)\n }\n\n return className || ''\n }\n\n // Compound variant cache\n const compoundCache = new Map<string, string>()\n\n function StyledComponent(props: StyledComponentProps<V>): FNode {\n const { children, className: userClassName, ...rest } = props as any\n\n // Separate variant props from element props\n const variantProps: Record<string, string> = {}\n const elementProps: Record<string, any> = {}\n\n for (const key in rest) {\n if (variants && key in variants) {\n variantProps[key] = rest[key] ?? (defaultVariants as any)?.[key]\n } else {\n elementProps[key] = rest[key]\n }\n }\n\n // Apply default variants for missing props\n if (defaultVariants) {\n for (const key in defaultVariants) {\n if (!(key in variantProps)) {\n variantProps[key] = String(defaultVariants[key as keyof typeof defaultVariants])\n }\n }\n }\n\n // Collect variant classes\n const variantClasses: string[] = []\n for (const [name, value] of Object.entries(variantProps)) {\n if (value) {\n const vc = getVariantClass(name, String(value))\n if (vc) variantClasses.push(vc)\n }\n }\n\n // Check compound variants\n if (compoundVariants) {\n for (const compound of compoundVariants) {\n const { css: compoundStyles, ...conditions } = compound\n\n // Check if all conditions match\n let matches = true\n for (const [key, value] of Object.entries(conditions)) {\n if (variantProps[key] !== value) {\n matches = false\n break\n }\n }\n\n if (matches) {\n // Generate cache key from conditions\n const cacheKey = JSON.stringify(conditions)\n let compoundClass = compoundCache.get(cacheKey)\n\n if (!compoundClass) {\n compoundClass = css(compoundStyles)\n compoundCache.set(cacheKey, compoundClass)\n }\n\n variantClasses.push(compoundClass)\n }\n }\n }\n\n // Combine all classes\n const finalClassName = cx(baseClass, ...variantClasses, userClassName)\n\n // Return FNode element\n return {\n type: tag,\n props: { ...elementProps, className: finalClassName },\n children: Array.isArray(children) ? children : children != null ? [children] : [],\n key: undefined\n }\n }\n\n // Mark as styled component\n StyledComponent.displayName = `Styled(${tag})`\n\n return StyledComponent as unknown as StyledComponent<T, V>\n}\n\n// Types\ntype StyledComponent<\n T extends HTMLTag,\n V extends VariantConfig\n> = {\n (props: StyledComponentProps<V>): FNode\n displayName: string\n}\n\ntype StyledComponentProps<V extends VariantConfig> = {\n [K in keyof V]?: keyof V[K]\n} & {\n children?: any\n className?: string\n [key: string]: any\n}\n","import type { KeyframeDefinition, CSSValue } from './types'\nimport { hash } from './runtime/hash'\nimport { serializeKeyframes } from './runtime/serialize'\nimport { insert, has } from './runtime/sheet'\n\n/**\n * Create a keyframes animation\n *\n * @example\n * ```tsx\n * const fadeIn = keyframes({\n * from: { opacity: 0 },\n * to: { opacity: 1 }\n * })\n *\n * const slideIn = keyframes({\n * '0%': { transform: 'translateX(-100%)' },\n * '100%': { transform: 'translateX(0)' }\n * })\n *\n * const className = css({\n * animation: `${fadeIn} 0.3s ease-in-out`\n * })\n * ```\n */\nexport function keyframes(definition: KeyframeDefinition): string {\n // Generate unique name from keyframe definition\n const key = JSON.stringify(definition)\n const name = hash(key)\n\n // Skip if already inserted\n if (has(name)) {\n return name\n }\n\n // Serialize and insert keyframes\n const cssText = serializeKeyframes(name, definition as Record<string, Record<string, CSSValue>>)\n insert(name, cssText)\n\n return name\n}\n"]}
|
package/dist/css.mjs
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
function C(e){let t=5381;for(let n=0;n<e.length;n++)t=(t<<5)+t^e.charCodeAt(n);return "fx-"+(t>>>0).toString(36)}var W=new Set(["animationIterationCount","borderImageOutset","borderImageSlice","borderImageWidth","boxFlex","boxFlexGroup","boxOrdinalGroup","columnCount","columns","flex","flexGrow","flexPositive","flexShrink","flexNegative","flexOrder","gridArea","gridRow","gridRowEnd","gridRowSpan","gridRowStart","gridColumn","gridColumnEnd","gridColumnSpan","gridColumnStart","fontWeight","lineClamp","lineHeight","opacity","order","orphans","tabSize","widows","zIndex","zoom","fillOpacity","floodOpacity","stopOpacity","strokeDasharray","strokeDashoffset","strokeMiterlimit","strokeOpacity","strokeWidth"]);function K(e){return e.replace(/[A-Z]/g,t=>"-"+t.toLowerCase())}function P(e,t){return typeof t=="number"&&t!==0&&!W.has(e)?t+"px":String(t)}function k(e,t){let n="",r="";for(let i in e){let a=e[i];if(a!=null)if(i.startsWith("&")){let l=i.replace(/&/g,t);r+=k(a,l);}else if(i.startsWith("@"))r+=`${i}{${k(a,t)}}`;else {if(typeof a=="object")continue;n+=`${K(i)}:${P(i,a)};`;}}let s="";return n&&(s=`${t}{${n}}`),s+=r,s}function z(e,t){let n="";for(let r in t){let s=t[r],i="";for(let a in s){let l=s[a];l!=null&&typeof l!="object"&&(i+=`${K(a)}:${P(a,l)};`);}n+=`${r}{${i}}`;}return `@keyframes ${e}{${n}}`}var g=new Map,v=[],m=null;function M(){return typeof document<"u"&&"adoptedStyleSheets"in document&&typeof CSSStyleSheet<"u"&&"replaceSync"in CSSStyleSheet.prototype}function E(){return M()?(m||(m=new CSSStyleSheet,document.adoptedStyleSheets=[...document.adoptedStyleSheets,m]),m):null}function V(e,t){if(g.has(e))return;g.set(e,true);let n=E();if(n)try{n.insertRule(t,n.cssRules.length);}catch(r){process.env.NODE_ENV!=="production"&&console.warn("[flexium/css] Invalid CSS rule:",t,r);}else v.push(t);}function O(e){return g.has(e)}function D(){return v.join("")}function H(){let e=D();return e?`<style data-flexium-css>${e}</style>`:""}function L(){v=[],g=new Map,m=null;}function A(){if(typeof document>"u")return;let e=document.querySelector("style[data-flexium-css]");if(e){let t=e.textContent||"",n=/\.fx-[a-z0-9]+/g,r;for(;(r=n.exec(t))!==null;){let s=r[0].slice(1);g.set(s,true);}}}M()&&A();function S(e){let t=JSON.stringify(e),n=C(t);if(O(n))return n;let r=k(e,"."+n);return V(n,r),n}function N(...e){return e.filter(Boolean).join(" ")}function q(e,t){let{base:n,variants:r,defaultVariants:s,compoundVariants:i}=t,a=S(n),l=new Map;function I(d,c){let h=`${d}:${c}`,f=l.get(h);return !f&&r?.[d]?.[c]&&(f=S(r[d][c]),l.set(h,f)),f||""}let T=new Map;function $(d){let{children:c,className:h,...f}=d,u={},j={};for(let o in f)r&&o in r?u[o]=f[o]??s?.[o]:j[o]=f[o];if(s)for(let o in s)o in u||(u[o]=String(s[o]));let w=[];for(let[o,x]of Object.entries(u))if(x){let y=I(o,String(x));y&&w.push(y);}if(i)for(let o of i){let{css:x,...y}=o,R=true;for(let[b,p]of Object.entries(y))if(u[b]!==p){R=false;break}if(R){let b=JSON.stringify(y),p=T.get(b);p||(p=S(x),T.set(b,p)),w.push(p);}}let F=N(a,...w,h);return {type:e,props:{...j,className:F},children:Array.isArray(c)?c:c!=null?[c]:[],key:void 0}}return $.displayName=`Styled(${e})`,$}function G(e){let t=JSON.stringify(e),n=C(t);if(O(n))return n;let r=z(n,e);return V(n,r),n}export{S as css,N as cx,H as getStyleTag,D as getStyles,A as hydrateStyles,G as keyframes,L as resetStyles,q as styled};//# sourceMappingURL=css.mjs.map
|
|
2
|
+
//# sourceMappingURL=css.mjs.map
|
package/dist/css.mjs.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/css/runtime/hash.ts","../src/css/runtime/serialize.ts","../src/css/runtime/sheet.ts","../src/css/css.ts","../src/css/styled.ts","../src/css/keyframes.ts"],"names":["hash","str","h","i","unitlessProperties","toKebabCase","match","addUnit","property","value","serialize","styles","selector","properties","nested","key","nestedSelector","result","serializeKeyframes","name","keyframes","frames","prop","cache","serverStyles","browserSheet","supportsAdoptedStyleSheets","getBrowserSheet","insert","css","sheet","e","has","getStyles","getStyleTag","resetStyles","hydrateStyles","styleTag","text","classRegex","className","cssText","cx","classes","styled","tag","config","base","variants","defaultVariants","compoundVariants","baseClass","variantCache","getVariantClass","variantName","variantValue","cacheKey","compoundCache","StyledComponent","props","children","userClassName","rest","variantProps","elementProps","variantClasses","vc","compound","compoundStyles","conditions","matches","compoundClass","finalClassName","definition"],"mappings":"AAIO,SAASA,CAAAA,CAAKC,EAAqB,CACxC,IAAIC,EAAI,IAAA,CACR,IAAA,IAASC,EAAI,CAAA,CAAGA,CAAAA,CAAIF,EAAI,MAAA,CAAQE,CAAAA,EAAAA,CAC9BD,GAAMA,CAAAA,EAAK,CAAA,EAAKA,EAAKD,CAAAA,CAAI,UAAA,CAAWE,CAAC,CAAA,CAEvC,OAAO,KAAA,CAAA,CAASD,IAAM,CAAA,EAAG,QAAA,CAAS,EAAE,CACtC,CCLA,IAAME,CAAAA,CAAqB,IAAI,IAAI,CACjC,yBAAA,CACA,oBACA,kBAAA,CACA,kBAAA,CACA,UACA,cAAA,CACA,iBAAA,CACA,cACA,SAAA,CACA,MAAA,CACA,UAAA,CACA,cAAA,CACA,YAAA,CACA,cAAA,CACA,YACA,UAAA,CACA,SAAA,CACA,aACA,aAAA,CACA,cAAA,CACA,aACA,eAAA,CACA,gBAAA,CACA,kBACA,YAAA,CACA,WAAA,CACA,aACA,SAAA,CACA,OAAA,CACA,UACA,SAAA,CACA,QAAA,CACA,SACA,MAAA,CACA,aAAA,CACA,cAAA,CACA,aAAA,CACA,iBAAA,CACA,kBAAA,CACA,mBACA,eAAA,CACA,aACF,CAAC,CAAA,CAKM,SAASC,EAAYJ,CAAAA,CAAqB,CAC/C,OAAOA,CAAAA,CAAI,OAAA,CAAQ,SAAWK,CAAAA,EAAU,GAAA,CAAMA,EAAM,WAAA,EAAa,CACnE,CAKO,SAASC,CAAAA,CAAQC,CAAAA,CAAkBC,CAAAA,CAAyB,CACjE,OAAI,OAAOA,CAAAA,EAAU,UAAYA,CAAAA,GAAU,CAAA,EAAK,CAACL,CAAAA,CAAmB,GAAA,CAAII,CAAQ,CAAA,CACvEC,CAAAA,CAAQ,KAEV,MAAA,CAAOA,CAAK,CACrB,CAKO,SAASC,EAAUC,CAA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AWQ,CAAe,CAAA,CACpD,QAAA,CAAU,MAAM,OAAA,CAAQZ,CAAQ,CAAA,CAAIA,CAAAA,CAAWA,CAAAA,EAAY,IAAA,CAAO,CAACA,CAAQ,CAAA,CAAI,EAAC,CAChF,GAAA,CAAK,MACP,CACF,CAGA,OAAAF,CAAAA,CAAgB,WAAA,CAAc,UAAUb,CAAG,CAAA,CAAA,CAAA,CAEpCa,CACT,CChJO,SAAStC,EAAUqD,CAAAA,CAAwC,CAEhE,IAAM1D,CAAAA,CAAM,IAAA,CAAK,SAAA,CAAU0D,CAAU,CAAA,CAC/BtD,CAAAA,CAAOnB,EAAKe,CAAG,CAAA,CAGrB,GAAIiB,CAAAA,CAAIb,CAAI,EACV,OAAOA,CAAAA,CAIT,IAAMsB,CAAAA,CAAUvB,CAAAA,CAAmBC,EAAMsD,CAAsD,CAAA,CAC/F,OAAA7C,CAAAA,CAAOT,CAAAA,CAAMsB,CAAO,CAAA,CAEbtB,CACT","file":"css.mjs","sourcesContent":["/**\n * Generate a hash for a style object\n * Uses djb2 algorithm for fast, low-collision hashing\n */\nexport function hash(str: string): string {\n let h = 5381\n for (let i = 0; i < str.length; i++) {\n h = ((h << 5) + h) ^ str.charCodeAt(i)\n }\n return 'fx-' + (h >>> 0).toString(36)\n}\n","import type { StyleObject, CSSValue } from '../types'\n\n/**\n * Properties that should not have 'px' auto-added\n */\nconst unitlessProperties = new Set([\n 'animationIterationCount',\n 'borderImageOutset',\n 'borderImageSlice',\n 'borderImageWidth',\n 'boxFlex',\n 'boxFlexGroup',\n 'boxOrdinalGroup',\n 'columnCount',\n 'columns',\n 'flex',\n 'flexGrow',\n 'flexPositive',\n 'flexShrink',\n 'flexNegative',\n 'flexOrder',\n 'gridArea',\n 'gridRow',\n 'gridRowEnd',\n 'gridRowSpan',\n 'gridRowStart',\n 'gridColumn',\n 'gridColumnEnd',\n 'gridColumnSpan',\n 'gridColumnStart',\n 'fontWeight',\n 'lineClamp',\n 'lineHeight',\n 'opacity',\n 'order',\n 'orphans',\n 'tabSize',\n 'widows',\n 'zIndex',\n 'zoom',\n 'fillOpacity',\n 'floodOpacity',\n 'stopOpacity',\n 'strokeDasharray',\n 'strokeDashoffset',\n 'strokeMiterlimit',\n 'strokeOpacity',\n 'strokeWidth',\n])\n\n/**\n * Convert camelCase to kebab-case\n */\nexport function toKebabCase(str: string): string {\n return str.replace(/[A-Z]/g, (match) => '-' + match.toLowerCase())\n}\n\n/**\n * Add unit to numeric values where appropriate\n */\nexport function addUnit(property: string, value: CSSValue): string {\n if (typeof value === 'number' && value !== 0 && !unitlessProperties.has(property)) {\n return value + 'px'\n }\n return String(value)\n}\n\n/**\n * Serialize a style object to CSS string\n */\nexport function serialize(styles: StyleObject, selector: string): string {\n let properties = ''\n let nested = ''\n\n for (const key in styles) {\n const value = styles[key]\n\n if (value === undefined || value === null) {\n continue\n }\n\n if (key.startsWith('&')) {\n // Nested selector: &:hover, &::before, & > div\n const nestedSelector = key.replace(/&/g, selector)\n nested += serialize(value as StyleObject, nestedSelector)\n } else if (key.startsWith('@')) {\n // At-rule: @media, @supports, @container\n nested += `${key}{${serialize(value as StyleObject, selector)}}`\n } else if (typeof value === 'object') {\n // Skip invalid nested objects without & or @\n continue\n } else {\n // Regular CSS property\n properties += `${toKebabCase(key)}:${addUnit(key, value)};`\n }\n }\n\n let result = ''\n if (properties) {\n result = `${selector}{${properties}}`\n }\n result += nested\n\n return result\n}\n\n/**\n * Serialize keyframes to CSS string\n */\nexport function serializeKeyframes(\n name: string,\n keyframes: Record<string, Record<string, CSSValue>>\n): string {\n let frames = ''\n\n for (const key in keyframes) {\n const styles = keyframes[key]\n let properties = ''\n\n for (const prop in styles) {\n const value = styles[prop]\n if (value !== undefined && value !== null && typeof value !== 'object') {\n properties += `${toKebabCase(prop)}:${addUnit(prop, value)};`\n }\n }\n\n frames += `${key}{${properties}}`\n }\n\n return `@keyframes ${name}{${frames}}`\n}\n","/**\n * StyleSheet manager\n * Uses adoptedStyleSheets for efficient style injection\n * Falls back to server-side collection when not available (SSR, jsdom)\n */\n\n// Cache to track which styles have been inserted\nlet cache = new Map<string, boolean>()\n\n// Server-side collected styles\nlet serverStyles: string[] = []\n\n// Browser stylesheet (lazy initialized)\nlet browserSheet: CSSStyleSheet | null = null\n\n/**\n * Check if adoptedStyleSheets is supported\n */\nfunction supportsAdoptedStyleSheets(): boolean {\n return (\n typeof document !== 'undefined' &&\n 'adoptedStyleSheets' in document &&\n typeof CSSStyleSheet !== 'undefined' &&\n 'replaceSync' in CSSStyleSheet.prototype\n )\n}\n\nfunction getBrowserSheet(): CSSStyleSheet | null {\n if (!supportsAdoptedStyleSheets()) {\n return null\n }\n\n if (!browserSheet) {\n browserSheet = new CSSStyleSheet()\n document.adoptedStyleSheets = [...document.adoptedStyleSheets, browserSheet]\n }\n return browserSheet\n}\n\n/**\n * Insert a CSS rule\n */\nexport function insert(hash: string, css: string): void {\n if (cache.has(hash)) {\n return\n }\n\n cache.set(hash, true)\n\n const sheet = getBrowserSheet()\n if (sheet) {\n try {\n sheet.insertRule(css, sheet.cssRules.length)\n } catch (e) {\n // Handle invalid CSS gracefully in development\n if (process.env.NODE_ENV !== 'production') {\n console.warn('[flexium/css] Invalid CSS rule:', css, e)\n }\n }\n } else {\n // Server-side or unsupported environment: collect styles\n serverStyles.push(css)\n }\n}\n\n/**\n * Check if a hash is already in the cache\n */\nexport function has(hash: string): boolean {\n return cache.has(hash)\n}\n\n/**\n * Get all collected styles for SSR\n */\nexport function getStyles(): string {\n return serverStyles.join('')\n}\n\n/**\n * Get styles as a style tag for SSR\n */\nexport function getStyleTag(): string {\n const styles = getStyles()\n if (!styles) return ''\n return `<style data-flexium-css>${styles}</style>`\n}\n\n/**\n * Reset collected styles and cache (for SSR between requests or testing)\n */\nexport function resetStyles(): void {\n serverStyles = []\n cache = new Map()\n browserSheet = null\n}\n\n/**\n * Hydrate styles on the client\n * Call this after SSR to sync the cache with server-rendered styles\n */\nexport function hydrateStyles(): void {\n if (typeof document === 'undefined') return\n\n const styleTag = document.querySelector('style[data-flexium-css]')\n if (styleTag) {\n // Parse and cache existing styles\n const text = styleTag.textContent || ''\n const classRegex = /\\.fx-[a-z0-9]+/g\n let match\n while ((match = classRegex.exec(text)) !== null) {\n const hash = match[0].slice(1) // Remove the dot\n cache.set(hash, true)\n }\n }\n}\n\n// Auto-hydrate on client (only if adoptedStyleSheets is supported)\nif (supportsAdoptedStyleSheets()) {\n hydrateStyles()\n}\n","import type { StyleObject } from './types'\nimport { hash } from './runtime/hash'\nimport { serialize } from './runtime/serialize'\nimport { insert, has } from './runtime/sheet'\n\n/**\n * Create a CSS class from a style object\n *\n * @example\n * ```tsx\n * const buttonClass = css({\n * padding: '8px 16px',\n * backgroundColor: 'blue',\n * color: 'white',\n * '&:hover': {\n * backgroundColor: 'darkblue'\n * }\n * })\n *\n * <button className={buttonClass}>Click me</button>\n * ```\n */\nexport function css(styles: StyleObject): string {\n // Generate unique hash from style object\n const key = JSON.stringify(styles)\n const className = hash(key)\n\n // Skip if already inserted\n if (has(className)) {\n return className\n }\n\n // Serialize and insert CSS\n const cssText = serialize(styles, '.' + className)\n insert(className, cssText)\n\n return className\n}\n\n/**\n * Combine multiple class names, filtering out falsy values\n *\n * @example\n * ```tsx\n * const className = cx(\n * baseClass,\n * isActive && activeClass,\n * variant === 'primary' && primaryClass\n * )\n * ```\n */\nexport function cx(\n ...classes: (string | boolean | null | undefined)[]\n): string {\n return classes.filter(Boolean).join(' ')\n}\n","import type { StyleObject, VariantConfig, StyledConfig } from './types'\nimport type { FNode } from '../dom/types'\nimport { css, cx } from './css'\n\n// HTML element tag names\ntype HTMLTag = 'a' | 'abbr' | 'address' | 'area' | 'article' | 'aside' | 'audio' |\n 'b' | 'base' | 'bdi' | 'bdo' | 'blockquote' | 'body' | 'br' | 'button' |\n 'canvas' | 'caption' | 'cite' | 'code' | 'col' | 'colgroup' |\n 'data' | 'datalist' | 'dd' | 'del' | 'details' | 'dfn' | 'dialog' | 'div' | 'dl' | 'dt' |\n 'em' | 'embed' |\n 'fieldset' | 'figcaption' | 'figure' | 'footer' | 'form' |\n 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'head' | 'header' | 'hgroup' | 'hr' | 'html' |\n 'i' | 'iframe' | 'img' | 'input' | 'ins' |\n 'kbd' |\n 'label' | 'legend' | 'li' | 'link' |\n 'main' | 'map' | 'mark' | 'menu' | 'meta' | 'meter' |\n 'nav' | 'noscript' |\n 'object' | 'ol' | 'optgroup' | 'option' | 'output' |\n 'p' | 'picture' | 'pre' | 'progress' |\n 'q' |\n 'rp' | 'rt' | 'ruby' |\n 's' | 'samp' | 'script' | 'search' | 'section' | 'select' | 'slot' | 'small' | 'source' | 'span' | 'strong' | 'style' | 'sub' | 'summary' | 'sup' | 'svg' |\n 'table' | 'tbody' | 'td' | 'template' | 'textarea' | 'tfoot' | 'th' | 'thead' | 'time' | 'title' | 'tr' | 'track' |\n 'u' | 'ul' |\n 'var' | 'video' |\n 'wbr'\n\n/**\n * Create a styled component with variant support\n *\n * @example\n * ```tsx\n * const Button = styled('button', {\n * base: {\n * padding: '8px 16px',\n * border: 'none',\n * borderRadius: 4,\n * cursor: 'pointer'\n * },\n * variants: {\n * variant: {\n * primary: { backgroundColor: 'blue', color: 'white' },\n * secondary: { backgroundColor: 'gray', color: 'black' }\n * },\n * size: {\n * sm: { padding: '4px 8px', fontSize: 12 },\n * md: { padding: '8px 16px', fontSize: 14 },\n * lg: { padding: '12px 24px', fontSize: 16 }\n * }\n * },\n * defaultVariants: {\n * variant: 'primary',\n * size: 'md'\n * }\n * })\n *\n * // Usage\n * <Button variant=\"secondary\" size=\"lg\">Click me</Button>\n * ```\n */\nexport function styled<\n T extends HTMLTag,\n V extends VariantConfig = Record<string, never>\n>(\n tag: T,\n config: StyledConfig<V>\n): StyledComponent<T, V> {\n const { base, variants, defaultVariants, compoundVariants } = config\n\n // Pre-compute base class\n const baseClass = css(base)\n\n // Cache for variant classes\n const variantCache = new Map<string, string>()\n\n // Get or create variant class\n function getVariantClass(variantName: string, variantValue: string): string {\n const cacheKey = `${variantName}:${variantValue}`\n let className = variantCache.get(cacheKey)\n\n if (!className && variants?.[variantName]?.[variantValue]) {\n className = css(variants[variantName][variantValue])\n variantCache.set(cacheKey, className)\n }\n\n return className || ''\n }\n\n // Compound variant cache\n const compoundCache = new Map<string, string>()\n\n function StyledComponent(props: StyledComponentProps<V>): FNode {\n const { children, className: userClassName, ...rest } = props as any\n\n // Separate variant props from element props\n const variantProps: Record<string, string> = {}\n const elementProps: Record<string, any> = {}\n\n for (const key in rest) {\n if (variants && key in variants) {\n variantProps[key] = rest[key] ?? (defaultVariants as any)?.[key]\n } else {\n elementProps[key] = rest[key]\n }\n }\n\n // Apply default variants for missing props\n if (defaultVariants) {\n for (const key in defaultVariants) {\n if (!(key in variantProps)) {\n variantProps[key] = String(defaultVariants[key as keyof typeof defaultVariants])\n }\n }\n }\n\n // Collect variant classes\n const variantClasses: string[] = []\n for (const [name, value] of Object.entries(variantProps)) {\n if (value) {\n const vc = getVariantClass(name, String(value))\n if (vc) variantClasses.push(vc)\n }\n }\n\n // Check compound variants\n if (compoundVariants) {\n for (const compound of compoundVariants) {\n const { css: compoundStyles, ...conditions } = compound\n\n // Check if all conditions match\n let matches = true\n for (const [key, value] of Object.entries(conditions)) {\n if (variantProps[key] !== value) {\n matches = false\n break\n }\n }\n\n if (matches) {\n // Generate cache key from conditions\n const cacheKey = JSON.stringify(conditions)\n let compoundClass = compoundCache.get(cacheKey)\n\n if (!compoundClass) {\n compoundClass = css(compoundStyles)\n compoundCache.set(cacheKey, compoundClass)\n }\n\n variantClasses.push(compoundClass)\n }\n }\n }\n\n // Combine all classes\n const finalClassName = cx(baseClass, ...variantClasses, userClassName)\n\n // Return FNode element\n return {\n type: tag,\n props: { ...elementProps, className: finalClassName },\n children: Array.isArray(children) ? children : children != null ? [children] : [],\n key: undefined\n }\n }\n\n // Mark as styled component\n StyledComponent.displayName = `Styled(${tag})`\n\n return StyledComponent as unknown as StyledComponent<T, V>\n}\n\n// Types\ntype StyledComponent<\n T extends HTMLTag,\n V extends VariantConfig\n> = {\n (props: StyledComponentProps<V>): FNode\n displayName: string\n}\n\ntype StyledComponentProps<V extends VariantConfig> = {\n [K in keyof V]?: keyof V[K]\n} & {\n children?: any\n className?: string\n [key: string]: any\n}\n","import type { KeyframeDefinition, CSSValue } from './types'\nimport { hash } from './runtime/hash'\nimport { serializeKeyframes } from './runtime/serialize'\nimport { insert, has } from './runtime/sheet'\n\n/**\n * Create a keyframes animation\n *\n * @example\n * ```tsx\n * const fadeIn = keyframes({\n * from: { opacity: 0 },\n * to: { opacity: 1 }\n * })\n *\n * const slideIn = keyframes({\n * '0%': { transform: 'translateX(-100%)' },\n * '100%': { transform: 'translateX(0)' }\n * })\n *\n * const className = css({\n * animation: `${fadeIn} 0.3s ease-in-out`\n * })\n * ```\n */\nexport function keyframes(definition: KeyframeDefinition): string {\n // Generate unique name from keyframe definition\n const key = JSON.stringify(definition)\n const name = hash(key)\n\n // Skip if already inserted\n if (has(name)) {\n return name\n }\n\n // Serialize and insert keyframes\n const cssText = serializeKeyframes(name, definition as Record<string, Record<string, CSSValue>>)\n insert(name, cssText)\n\n return name\n}\n"]}
|
package/dist/dom.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
'use strict';var
|
|
1
|
+
'use strict';var chunkPUXZJ7OV_js=require('./chunk-PUXZJ7OV.js'),chunkACYN2UKT_js=require('./chunk-ACYN2UKT.js'),chunk3CKIHQIE_js=require('./chunk-3CKIHQIE.js'),chunkE6Z7AI4J_js=require('./chunk-E6Z7AI4J.js');function A(e,t,...o){return {type:e,props:t||{},children:o,key:t?.key}}var l=null,P=new WeakMap,h=null;function W(e,t,o={}){let{state:n,onHydrated:r,onMismatch:i}=o;l=t.firstChild;try{let s;typeof e=="function"&&!T(e)?s={type:e,props:{},children:[],key:void 0}:s=e,E(s,t),r?.();}catch(s){console.warn("[Flexium] Hydration mismatch, falling back to full render:",s),i?.(s),t.innerHTML="",import('./render-MJ2LCNSG.js').then(({render:p})=>{p(e,t);});}finally{l=null;}}function T(e){return e&&typeof e=="object"&&"type"in e&&"props"in e}function E(e,t){if(e==null||typeof e=="boolean")return F(),null;if(typeof e=="string"||typeof e=="number")return j(String(e));if(Array.isArray(e)){let o=[];for(let n of e){let r=E(n,t);r&&(Array.isArray(r)?o.push(...r):o.push(r));}return o}if(typeof e=="function")return M({type:e,props:{},children:[],key:void 0},t);if(typeof e=="object"&&T(e)){if(typeof e.type=="string")return R(e);if(typeof e.type=="function")return M(e,t)}return null}function F(){for(;l&&l.nodeType===Node.TEXT_NODE&&(!l.textContent||l.textContent.trim()==="");)l=l.nextSibling;}function j(e){F();let t=l;if(!t)return null;if(t.nodeType!==Node.TEXT_NODE){if(e.trim()==="")return null;throw new Error(`Hydration mismatch: expected text node "${e}", got ${t.nodeName}`)}return l=t.nextSibling,t}function R(e){F();let t=l,o=e.type;if(!t||t.nodeType!==Node.ELEMENT_NODE)throw new Error(`Hydration mismatch: expected element <${o}>, got ${t?.nodeName||"nothing"}`);if(t.tagName.toLowerCase()!==o.toLowerCase())throw new Error(`Hydration mismatch: expected <${o}>, got <${t.tagName.toLowerCase()}>`);if(e.props){for(let[n,r]of Object.entries(e.props))if(n==="ref")typeof r=="function"?r(t):r&&typeof r=="object"&&"current"in r&&(r.current=t);else if(n.startsWith("on")&&typeof r=="function"){let i=n.slice(2).toLowerCase();t.addEventListener(i,r),t.__eventHandlers||(t.__eventHandlers={}),t.__eventHandlers[i]=r;}}if(l=t.nextSibling,e.children&&e.children.length>0){let n=l;l=t.firstChild;for(let r of e.children)E(r,t);l=n;}return t}function M(e,t){let o=e.type,n={...e.props};e.children&&e.children.length>0&&(n.children=e.children.length===1?e.children[0]:e.children);let r=o._contextId,i=r!==void 0,s;i&&(s=chunkE6Z7AI4J_js.e(r,n.value)),P.has(t)||P.set(t,new Map);let p=P.get(t),C=e.key!==void 0,u;if(C)u=e.key;else {let y=0,f=o.name||"anonymous";p.forEach((N,x)=>{typeof x=="string"&&x.startsWith(`__auto_${f}_`)&&y++;}),u=`__auto_${f}_${y}`;}let a={hooks:[],hookIndex:0,nodes:[],parent:t,fnode:e,props:n,key:u,children:new Set,parentInstance:h||void 0};h&&h.children.add(a),p.set(u,a);let c=h;h=a;try{let y=chunkE6Z7AI4J_js.a(a,()=>o(n)),f=E(y,t);a.nodes=f?Array.isArray(f)?f:[f]:[];let N=!0,x=()=>{if(N){N=!1;return}let D=a.props;chunkE6Z7AI4J_js.a(a,()=>o(D));};return a.renderFn=x,chunk3CKIHQIE_js.b(x),a.nodes}finally{h=c,i&&chunkE6Z7AI4J_js.f(r,s);}}function _(e){let{target:t,children:o}=e,n=chunkE6Z7AI4J_js.b(()=>({container:null,mounted:false}));return chunkACYN2UKT_js.c(({onCleanup:r})=>{let i=null;if(typeof t=="string"?i=document.querySelector(t):t instanceof HTMLElement&&(i=t),!i){console.warn("[Flexium Portal] Target container not found:",t);return}let s=document.createElement("div");s.setAttribute("data-flexium-portal","true"),i.appendChild(s),n.container=s,n.mounted=true,chunkPUXZJ7OV_js.b(o,s),r(()=>{s.parentNode&&s.parentNode.removeChild(s),n.container=null,n.mounted=false;});},[t,o]),null}var K={register:()=>{},hasBoundary:false},v=new chunkE6Z7AI4J_js.c(K);function b(){let[e]=chunkACYN2UKT_js.c(v);return e}function z(e){let{fallback:t,children:o}=e,n=chunkE6Z7AI4J_js.b(()=>new Set),[,r]=chunkACYN2UKT_js.c(0),[i,s]=chunkACYN2UKT_js.c(false),C={register:a=>{n.has(a)||(n.add(a),r(c=>c+1),s(true),a.finally(()=>{n.delete(a),r(c=>{let y=c-1;return y===0&&s(false),y});}));},hasBoundary:true},u=i?t:o;return {type:v.Provider,props:{value:C},children:[u],key:void 0}}function V(e){let{fallback:t,onError:o,children:n,resetKey:r}=e,[i,s]=chunkACYN2UKT_js.c({error:null,info:null}),p=chunkE6Z7AI4J_js.b(()=>({current:r}));r!==p.current&&(p.current=r,i.error!==null&&s({error:null,info:null}));if(i.error)return typeof t=="function"?t(i.error,i.info):t;try{return n}finally{}}function $(e){let t=null,o=null,n=null,r=i=>{if(t)return t(i);if(n)throw n;let s=b();return o||(o=e().then(p=>{t=p.default;}).catch(p=>{n=p instanceof Error?p:new Error(String(p));})),s.hasBoundary&&s.register(o),null};return r._lazy=true,r._loader=e,r}Object.defineProperty(exports,"render",{enumerable:true,get:function(){return chunkPUXZJ7OV_js.b}});exports.ErrorBoundary=V;exports.Portal=_;exports.Suspense=z;exports.f=A;exports.hydrate=W;exports.lazy=$;//# sourceMappingURL=dom.js.map
|
|
2
2
|
//# sourceMappingURL=dom.js.map
|
package/dist/dom.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {b as b$3}from'./chunk-TP5HUAIN.mjs';export{b as render}from'./chunk-TP5HUAIN.mjs';import {c as c$1}from'./chunk-3AKECLKA.mjs';import {b as b$1}from'./chunk-NRPWBHKP.mjs';import {c,e,a,f,b as b$2}from'./chunk-MI76R42D.mjs';function A(e,t,...o){return {type:e,props:t||{},children:o,key:t?.key}}var l=null,P=new WeakMap,h=null;function W(e,t,o={}){let{state:n,onHydrated:r,onMismatch:i}=o;l=t.firstChild;try{let s;typeof e=="function"&&!T(e)?s={type:e,props:{},children:[],key:void 0}:s=e,E(s,t),r?.();}catch(s){console.warn("[Flexium] Hydration mismatch, falling back to full render:",s),i?.(s),t.innerHTML="",import('./render-4HB53K66.mjs').then(({render:p})=>{p(e,t);});}finally{l=null;}}function T(e){return e&&typeof e=="object"&&"type"in e&&"props"in e}function E(e,t){if(e==null||typeof e=="boolean")return F(),null;if(typeof e=="string"||typeof e=="number")return j(String(e));if(Array.isArray(e)){let o=[];for(let n of e){let r=E(n,t);r&&(Array.isArray(r)?o.push(...r):o.push(r));}return o}if(typeof e=="function")return M({type:e,props:{},children:[],key:void 0},t);if(typeof e=="object"&&T(e)){if(typeof e.type=="string")return R(e);if(typeof e.type=="function")return M(e,t)}return null}function F(){for(;l&&l.nodeType===Node.TEXT_NODE&&(!l.textContent||l.textContent.trim()==="");)l=l.nextSibling;}function j(e){F();let t=l;if(!t)return null;if(t.nodeType!==Node.TEXT_NODE){if(e.trim()==="")return null;throw new Error(`Hydration mismatch: expected text node "${e}", got ${t.nodeName}`)}return l=t.nextSibling,t}function R(e){F();let t=l,o=e.type;if(!t||t.nodeType!==Node.ELEMENT_NODE)throw new Error(`Hydration mismatch: expected element <${o}>, got ${t?.nodeName||"nothing"}`);if(t.tagName.toLowerCase()!==o.toLowerCase())throw new Error(`Hydration mismatch: expected <${o}>, got <${t.tagName.toLowerCase()}>`);if(e.props){for(let[n,r]of Object.entries(e.props))if(n==="ref")typeof r=="function"?r(t):r&&typeof r=="object"&&"current"in r&&(r.current=t);else if(n.startsWith("on")&&typeof r=="function"){let i=n.slice(2).toLowerCase();t.addEventListener(i,r),t.__eventHandlers||(t.__eventHandlers={}),t.__eventHandlers[i]=r;}}if(l=t.nextSibling,e.children&&e.children.length>0){let n=l;l=t.firstChild;for(let r of e.children)E(r,t);l=n;}return t}function M(e$1,t){let o=e$1.type,n={...e$1.props};e$1.children&&e$1.children.length>0&&(n.children=e$1.children.length===1?e$1.children[0]:e$1.children);let r=o._contextId,i=r!==void 0,s;i&&(s=e(r,n.value)),P.has(t)||P.set(t,new Map);let p=P.get(t),C=e$1.key!==void 0,u;if(C)u=e$1.key;else {let y=0,f=o.name||"anonymous";p.forEach((N,x)=>{typeof x=="string"&&x.startsWith(`__auto_${f}_`)&&y++;}),u=`__auto_${f}_${y}`;}let a$1={hooks:[],hookIndex:0,nodes:[],parent:t,fnode:e$1,props:n,key:u,children:new Set,parentInstance:h||void 0};h&&h.children.add(a$1),p.set(u,a$1);let c=h;h=a$1;try{let y=a(a$1,()=>o(n)),f=E(y,t);a$1.nodes=f?Array.isArray(f)?f:[f]:[];let N=!0,x=()=>{if(N){N=!1;return}let D=a$1.props;a(a$1,()=>o(D));};return a$1.renderFn=x,b$1(x),a$1.nodes}finally{h=c,i&&f(r,s);}}function _(e){let{target:t,children:o}=e,n=b$2(()=>({container:null,mounted:false}));return c$1(({onCleanup:r})=>{let i=null;if(typeof t=="string"?i=document.querySelector(t):t instanceof HTMLElement&&(i=t),!i){console.warn("[Flexium Portal] Target container not found:",t);return}let s=document.createElement("div");s.setAttribute("data-flexium-portal","true"),i.appendChild(s),n.container=s,n.mounted=true,b$3(o,s),r(()=>{s.parentNode&&s.parentNode.removeChild(s),n.container=null,n.mounted=false;});},[t,o]),null}var K={register:()=>{},hasBoundary:false},v=new c(K);function b(){let[e]=c$1(v);return e}function z(e){let{fallback:t,children:o}=e,n=b$2(()=>new Set),[,r]=c$1(0),[i,s]=c$1(false),C={register:a=>{n.has(a)||(n.add(a),r(c=>c+1),s(true),a.finally(()=>{n.delete(a),r(c=>{let y=c-1;return y===0&&s(false),y});}));},hasBoundary:true},u=i?t:o;return {type:v.Provider,props:{value:C},children:[u],key:void 0}}function V(e){let{fallback:t,onError:o,children:n,resetKey:r}=e,[i,s]=c$1({error:null,info:null}),p=b$2(()=>({current:r}));r!==p.current&&(p.current=r,i.error!==null&&s({error:null,info:null}));if(i.error)return typeof t=="function"?t(i.error,i.info):t;try{return n}finally{}}function $(e){let t=null,o=null,n=null,r=i=>{if(t)return t(i);if(n)throw n;let s=b();return o||(o=e().then(p=>{t=p.default;}).catch(p=>{n=p instanceof Error?p:new Error(String(p));})),s.hasBoundary&&s.register(o),null};return r._lazy=true,r._loader=e,r}export{V as ErrorBoundary,_ as Portal,z as Suspense,A as f,W as hydrate,$ as lazy};//# sourceMappingURL=dom.mjs.map
|
|
2
2
|
//# sourceMappingURL=dom.mjs.map
|
package/dist/index.d.cts
CHANGED
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
'use strict';var o="0.14.
|
|
1
|
+
'use strict';var o="0.14.3";exports.VERSION=o;//# 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":"aAAO,IAAMA,CAAAA,CAAU","file":"index.js","sourcesContent":["export const VERSION = '0.14.
|
|
1
|
+
{"version":3,"sources":["../src/index.ts"],"names":["VERSION"],"mappings":"aAAO,IAAMA,CAAAA,CAAU","file":"index.js","sourcesContent":["export const VERSION = '0.14.3' // Bump version to signify rebuild\n"]}
|
package/dist/index.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var o="0.14.
|
|
1
|
+
var o="0.14.3";export{o 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":"AAAO,IAAMA,CAAAA,CAAU","file":"index.mjs","sourcesContent":["export const VERSION = '0.14.
|
|
1
|
+
{"version":3,"sources":["../src/index.ts"],"names":["VERSION"],"mappings":"AAAO,IAAMA,CAAAA,CAAU","file":"index.mjs","sourcesContent":["export const VERSION = '0.14.3' // Bump version to signify rebuild\n"]}
|
package/dist/jsx-dev-runtime.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
'use strict';var
|
|
1
|
+
'use strict';var chunkTFXBDC6C_js=require('./chunk-TFXBDC6C.js');function x(r,a,e,t,i,s){return chunkTFXBDC6C_js.a(r,a,e)}Object.defineProperty(exports,"Fragment",{enumerable:true,get:function(){return chunkTFXBDC6C_js.d}});exports.jsxDEV=x;//# sourceMappingURL=jsx-dev-runtime.js.map
|
|
2
2
|
//# sourceMappingURL=jsx-dev-runtime.js.map
|
package/dist/jsx-dev-runtime.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {a}from'./chunk-
|
|
1
|
+
import {a}from'./chunk-RUYGSYEV.mjs';export{d as Fragment}from'./chunk-RUYGSYEV.mjs';function x(r,a$1,e,t,i,s){return a(r,a$1,e)}export{x as jsxDEV};//# sourceMappingURL=jsx-dev-runtime.mjs.map
|
|
2
2
|
//# sourceMappingURL=jsx-dev-runtime.mjs.map
|
package/dist/jsx-runtime.d.cts
CHANGED
|
@@ -2,6 +2,7 @@ import { F as FNode, a as FNodeChild } from './types-DH8L3A5z.cjs';
|
|
|
2
2
|
|
|
3
3
|
declare function jsx(type: any, props: any, key?: any): FNode;
|
|
4
4
|
declare function jsxs(type: any, props: any, key?: any): FNode;
|
|
5
|
+
declare function jsxDEV(type: any, props: any, key?: any): FNode;
|
|
5
6
|
declare function Fragment(props: any): FNodeChild;
|
|
6
7
|
declare namespace JSX {
|
|
7
8
|
interface IntrinsicElements {
|
|
@@ -13,4 +14,4 @@ declare namespace JSX {
|
|
|
13
14
|
}
|
|
14
15
|
}
|
|
15
16
|
|
|
16
|
-
export { Fragment, JSX, jsx, jsxs };
|
|
17
|
+
export { Fragment, JSX, jsx, jsxDEV, jsxs };
|
package/dist/jsx-runtime.d.ts
CHANGED
|
@@ -2,6 +2,7 @@ import { F as FNode, a as FNodeChild } from './types-DH8L3A5z.js';
|
|
|
2
2
|
|
|
3
3
|
declare function jsx(type: any, props: any, key?: any): FNode;
|
|
4
4
|
declare function jsxs(type: any, props: any, key?: any): FNode;
|
|
5
|
+
declare function jsxDEV(type: any, props: any, key?: any): FNode;
|
|
5
6
|
declare function Fragment(props: any): FNodeChild;
|
|
6
7
|
declare namespace JSX {
|
|
7
8
|
interface IntrinsicElements {
|
|
@@ -13,4 +14,4 @@ declare namespace JSX {
|
|
|
13
14
|
}
|
|
14
15
|
}
|
|
15
16
|
|
|
16
|
-
export { Fragment, JSX, jsx, jsxs };
|
|
17
|
+
export { Fragment, JSX, jsx, jsxDEV, jsxs };
|
package/dist/jsx-runtime.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
'use strict';var
|
|
1
|
+
'use strict';var chunkTFXBDC6C_js=require('./chunk-TFXBDC6C.js');Object.defineProperty(exports,"Fragment",{enumerable:true,get:function(){return chunkTFXBDC6C_js.d}});Object.defineProperty(exports,"jsx",{enumerable:true,get:function(){return chunkTFXBDC6C_js.a}});Object.defineProperty(exports,"jsxDEV",{enumerable:true,get:function(){return chunkTFXBDC6C_js.c}});Object.defineProperty(exports,"jsxs",{enumerable:true,get:function(){return chunkTFXBDC6C_js.b}});//# sourceMappingURL=jsx-runtime.js.map
|
|
2
2
|
//# sourceMappingURL=jsx-runtime.js.map
|
package/dist/jsx-runtime.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export{
|
|
1
|
+
export{d as Fragment,a as jsx,c as jsxDEV,b as jsxs}from'./chunk-RUYGSYEV.mjs';//# sourceMappingURL=jsx-runtime.mjs.map
|
|
2
2
|
//# sourceMappingURL=jsx-runtime.mjs.map
|
package/dist/metafile-cjs.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"inputs":{"src/index.ts":{"bytes":67,"imports":[],"format":"esm"},"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/context.ts":{"bytes":1918,"imports":[],"format":"esm"},"src/core/use.ts":{"bytes":8125,"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":"src/core/context.ts","kind":"import-statement","original":"./context"},{"path":"src/core/context.ts","kind":"import-statement","original":"./context"}],"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":441,"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/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":15127,"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":9324,"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":"dynamic-import","original":"./render"}],"format":"esm"},"src/dom/components/Portal.tsx":{"bytes":1937,"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/render.ts","kind":"import-statement","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":598,"imports":[{"path":"src/dom/components/Portal.tsx","kind":"import-statement","original":"./Portal"},{"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":373,"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/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/router/types.ts":{"bytes":807,"imports":[],"format":"esm"},"src/router/utils.ts":{"bytes":3745,"imports":[{"path":"./types","kind":"import-statement","external":true}],"format":"esm"},"src/router/router.ts":{"bytes":3207,"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":741,"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":447,"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/jsx-dev-runtime.ts":{"bytes":211,"imports":[{"path":"src/jsx-runtime.ts","kind":"import-statement","original":"./jsx-runtime"}],"format":"esm"}},"outputs":{"dist/index.js.map":{"imports":[],"exports":[],"inputs":{},"bytes":204},"dist/index.js":{"imports":[],"exports":["VERSION"],"entryPoint":"src/index.ts","inputs":{"src/index.ts":{"bytesInOutput":15}},"bytes":37},"dist/core.js.map":{"imports":[],"exports":[],"inputs":{},"bytes":1066},"dist/core.js":{"imports":[{"path":"dist/chunk-ACYN2UKT.js","kind":"import-statement"},{"path":"dist/chunk-3CKIHQIE.js","kind":"import-statement"},{"path":"dist/chunk-E6Z7AI4J.js","kind":"import-statement"}],"exports":["Context","getContextValue","isReactive","popContext","pushContext","sync","use","useRef"],"entryPoint":"src/core/index.ts","inputs":{"src/core/index.ts":{"bytesInOutput":0},"src/core/ref.ts":{"bytesInOutput":42}},"bytes":320},"dist/dom.js.map":{"imports":[],"exports":[],"inputs":{},"bytes":27792},"dist/dom.js":{"imports":[{"path":"dist/chunk-ACYN2UKT.js","kind":"import-statement"},{"path":"dist/chunk-PUXZJ7OV.js","kind":"import-statement"},{"path":"dist/chunk-3CKIHQIE.js","kind":"import-statement"},{"path":"dist/chunk-E6Z7AI4J.js","kind":"import-statement"},{"path":"dist/render-MJ2LCNSG.js","kind":"dynamic-import"}],"exports":["ErrorBoundary","Portal","Suspense","f","hydrate","lazy","render"],"entryPoint":"src/dom/index.ts","inputs":{"src/dom/f.ts":{"bytesInOutput":70},"src/dom/index.ts":{"bytesInOutput":0},"src/dom/hydrate.ts":{"bytesInOutput":2733},"src/dom/components/Portal.tsx":{"bytesInOutput":500},"src/dom/components/index.ts":{"bytesInOutput":0},"src/dom/components/suspenseContext.ts":{"bytesInOutput":84},"src/dom/components/Suspense.tsx":{"bytesInOutput":293},"src/dom/components/ErrorBoundary.tsx":{"bytesInOutput":500},"src/dom/components/lazy.ts":{"bytesInOutput":249}},"bytes":4713},"dist/server.js.map":{"imports":[],"exports":[],"inputs":{},"bytes":12945},"dist/server.js":{"imports":[{"path":"dist/chunk-E6Z7AI4J.js","kind":"import-statement"}],"exports":["getIsServer","renderToStaticMarkup","renderToString"],"entryPoint":"src/server/index.ts","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":2594},"dist/router.js.map":{"imports":[],"exports":[],"inputs":{},"bytes":17333},"dist/router.js":{"imports":[{"path":"dist/chunk-ACYN2UKT.js","kind":"import-statement"},{"path":"dist/chunk-LHOIM4QY.js","kind":"import-statement"},{"path":"dist/chunk-3CKIHQIE.js","kind":"import-statement"},{"path":"dist/chunk-E6Z7AI4J.js","kind":"import-statement"}],"exports":["Link","Outlet","Route","Routes","useLocation","useNavigate","useParams","useQuery","useRouter"],"entryPoint":"src/router/index.ts","inputs":{"src/router/index.ts":{"bytesInOutput":0},"src/router/utils.ts":{"bytesInOutput":1073},"src/router/router.ts":{"bytesInOutput":859},"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":133}},"bytes":3255},"dist/chunk-ACYN2UKT.js.map":{"imports":[],"exports":[],"inputs":{},"bytes":18028},"dist/chunk-ACYN2UKT.js":{"imports":[{"path":"dist/chunk-3CKIHQIE.js","kind":"import-statement"},{"path":"dist/chunk-E6Z7AI4J.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":2043}},"bytes":3143},"dist/jsx-runtime.js.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"dist/jsx-runtime.js":{"imports":[{"path":"dist/chunk-LHOIM4QY.js","kind":"import-statement"}],"exports":["Fragment","jsx","jsxs"],"entryPoint":"src/jsx-runtime.ts","inputs":{},"bytes":81},"dist/jsx-dev-runtime.js.map":{"imports":[],"exports":[],"inputs":{},"bytes":510},"dist/jsx-dev-runtime.js":{"imports":[{"path":"dist/chunk-LHOIM4QY.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-LHOIM4QY.js.map":{"imports":[],"exports":[],"inputs":{},"bytes":1297},"dist/chunk-LHOIM4QY.js":{"imports":[],"exports":["a","b","c"],"inputs":{"src/jsx-runtime.ts":{"bytesInOutput":183}},"bytes":213},"dist/render-MJ2LCNSG.js.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"dist/render-MJ2LCNSG.js":{"imports":[{"path":"dist/chunk-PUXZJ7OV.js","kind":"import-statement"},{"path":"dist/chunk-3CKIHQIE.js","kind":"import-statement"},{"path":"dist/chunk-E6Z7AI4J.js","kind":"import-statement"}],"exports":["reconcile","render"],"entryPoint":"src/dom/render.ts","inputs":{},"bytes":129},"dist/chunk-PUXZJ7OV.js.map":{"imports":[],"exports":[],"inputs":{},"bytes":23945},"dist/chunk-PUXZJ7OV.js":{"imports":[{"path":"dist/chunk-3CKIHQIE.js","kind":"import-statement"},{"path":"dist/chunk-E6Z7AI4J.js","kind":"import-statement"}],"exports":["a","b"],"inputs":{"src/dom/render.ts":{"bytesInOutput":4853}},"bytes":4963},"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-E6Z7AI4J.js.map":{"imports":[],"exports":[],"inputs":{},"bytes":4337},"dist/chunk-E6Z7AI4J.js":{"imports":[],"exports":["a","b","c","d","e","f"],"inputs":{"src/core/hook.ts":{"bytesInOutput":227},"src/core/context.ts":{"bytesInOutput":307}},"bytes":585}}}
|
|
1
|
+
{"inputs":{"src/index.ts":{"bytes":67,"imports":[],"format":"esm"},"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/context.ts":{"bytes":1918,"imports":[],"format":"esm"},"src/core/use.ts":{"bytes":8125,"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":"src/core/context.ts","kind":"import-statement","original":"./context"},{"path":"src/core/context.ts","kind":"import-statement","original":"./context"}],"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":441,"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/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":15127,"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":9324,"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":"dynamic-import","original":"./render"}],"format":"esm"},"src/dom/components/Portal.tsx":{"bytes":1937,"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/render.ts","kind":"import-statement","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":598,"imports":[{"path":"src/dom/components/Portal.tsx","kind":"import-statement","original":"./Portal"},{"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":373,"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/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/router/types.ts":{"bytes":807,"imports":[],"format":"esm"},"src/router/utils.ts":{"bytes":3745,"imports":[{"path":"./types","kind":"import-statement","external":true}],"format":"esm"},"src/router/router.ts":{"bytes":3207,"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":447,"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/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/jsx-dev-runtime.ts":{"bytes":211,"imports":[{"path":"src/jsx-runtime.ts","kind":"import-statement","original":"./jsx-runtime"}],"format":"esm"}},"outputs":{"dist/render-MJ2LCNSG.js.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"dist/render-MJ2LCNSG.js":{"imports":[{"path":"dist/chunk-PUXZJ7OV.js","kind":"import-statement"},{"path":"dist/chunk-3CKIHQIE.js","kind":"import-statement"},{"path":"dist/chunk-E6Z7AI4J.js","kind":"import-statement"}],"exports":["reconcile","render"],"entryPoint":"src/dom/render.ts","inputs":{},"bytes":129},"dist/index.js.map":{"imports":[],"exports":[],"inputs":{},"bytes":204},"dist/index.js":{"imports":[],"exports":["VERSION"],"entryPoint":"src/index.ts","inputs":{"src/index.ts":{"bytesInOutput":15}},"bytes":37},"dist/core.js.map":{"imports":[],"exports":[],"inputs":{},"bytes":1066},"dist/core.js":{"imports":[{"path":"dist/chunk-ACYN2UKT.js","kind":"import-statement"},{"path":"dist/chunk-3CKIHQIE.js","kind":"import-statement"},{"path":"dist/chunk-E6Z7AI4J.js","kind":"import-statement"}],"exports":["Context","getContextValue","isReactive","popContext","pushContext","sync","use","useRef"],"entryPoint":"src/core/index.ts","inputs":{"src/core/index.ts":{"bytesInOutput":0},"src/core/ref.ts":{"bytesInOutput":42}},"bytes":320},"dist/dom.js.map":{"imports":[],"exports":[],"inputs":{},"bytes":27792},"dist/dom.js":{"imports":[{"path":"dist/chunk-PUXZJ7OV.js","kind":"import-statement"},{"path":"dist/chunk-ACYN2UKT.js","kind":"import-statement"},{"path":"dist/chunk-3CKIHQIE.js","kind":"import-statement"},{"path":"dist/chunk-E6Z7AI4J.js","kind":"import-statement"},{"path":"dist/render-MJ2LCNSG.js","kind":"dynamic-import"}],"exports":["ErrorBoundary","Portal","Suspense","f","hydrate","lazy","render"],"entryPoint":"src/dom/index.ts","inputs":{"src/dom/f.ts":{"bytesInOutput":70},"src/dom/index.ts":{"bytesInOutput":0},"src/dom/hydrate.ts":{"bytesInOutput":2733},"src/dom/components/Portal.tsx":{"bytesInOutput":500},"src/dom/components/index.ts":{"bytesInOutput":0},"src/dom/components/suspenseContext.ts":{"bytesInOutput":84},"src/dom/components/Suspense.tsx":{"bytesInOutput":293},"src/dom/components/ErrorBoundary.tsx":{"bytesInOutput":500},"src/dom/components/lazy.ts":{"bytesInOutput":249}},"bytes":4713},"dist/chunk-PUXZJ7OV.js.map":{"imports":[],"exports":[],"inputs":{},"bytes":23945},"dist/chunk-PUXZJ7OV.js":{"imports":[{"path":"dist/chunk-3CKIHQIE.js","kind":"import-statement"},{"path":"dist/chunk-E6Z7AI4J.js","kind":"import-statement"}],"exports":["a","b"],"inputs":{"src/dom/render.ts":{"bytesInOutput":4853}},"bytes":4963},"dist/server.js.map":{"imports":[],"exports":[],"inputs":{},"bytes":12945},"dist/server.js":{"imports":[{"path":"dist/chunk-E6Z7AI4J.js","kind":"import-statement"}],"exports":["getIsServer","renderToStaticMarkup","renderToString"],"entryPoint":"src/server/index.ts","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":2594},"dist/router.js.map":{"imports":[],"exports":[],"inputs":{},"bytes":17333},"dist/router.js":{"imports":[{"path":"dist/chunk-ACYN2UKT.js","kind":"import-statement"},{"path":"dist/chunk-3CKIHQIE.js","kind":"import-statement"},{"path":"dist/chunk-E6Z7AI4J.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":{"src/router/index.ts":{"bytesInOutput":0},"src/router/utils.ts":{"bytesInOutput":1073},"src/router/router.ts":{"bytesInOutput":859},"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":133}},"bytes":3255},"dist/chunk-ACYN2UKT.js.map":{"imports":[],"exports":[],"inputs":{},"bytes":18028},"dist/chunk-ACYN2UKT.js":{"imports":[{"path":"dist/chunk-3CKIHQIE.js","kind":"import-statement"},{"path":"dist/chunk-E6Z7AI4J.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":2043}},"bytes":3143},"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-E6Z7AI4J.js.map":{"imports":[],"exports":[],"inputs":{},"bytes":4337},"dist/chunk-E6Z7AI4J.js":{"imports":[],"exports":["a","b","c","d","e","f"],"inputs":{"src/core/hook.ts":{"bytesInOutput":227},"src/core/context.ts":{"bytesInOutput":307}},"bytes":585},"dist/css.js.map":{"imports":[],"exports":[],"inputs":{},"bytes":20385},"dist/css.js":{"imports":[],"exports":["css","cx","getStyleTag","getStyles","hydrateStyles","keyframes","resetStyles","styled"],"entryPoint":"src/css/index.ts","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":3339},"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/index.ts":{"bytes":67,"imports":[],"format":"esm"},"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/context.ts":{"bytes":1918,"imports":[],"format":"esm"},"src/core/use.ts":{"bytes":8125,"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":"src/core/context.ts","kind":"import-statement","original":"./context"},{"path":"src/core/context.ts","kind":"import-statement","original":"./context"}],"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":441,"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/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":15127,"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":9324,"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":"dynamic-import","original":"./render"}],"format":"esm"},"src/dom/components/Portal.tsx":{"bytes":1937,"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/render.ts","kind":"import-statement","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":598,"imports":[{"path":"src/dom/components/Portal.tsx","kind":"import-statement","original":"./Portal"},{"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":373,"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/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/router/types.ts":{"bytes":807,"imports":[],"format":"esm"},"src/router/utils.ts":{"bytes":3745,"imports":[{"path":"./types","kind":"import-statement","external":true}],"format":"esm"},"src/router/router.ts":{"bytes":3207,"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":741,"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":447,"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/jsx-dev-runtime.ts":{"bytes":211,"imports":[{"path":"src/jsx-runtime.ts","kind":"import-statement","original":"./jsx-runtime"}],"format":"esm"}},"outputs":{"dist/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":204},"dist/index.mjs":{"imports":[],"exports":["VERSION"],"entryPoint":"src/index.ts","inputs":{"src/index.ts":{"bytesInOutput":15}},"bytes":37},"dist/core.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":1066},"dist/core.mjs":{"imports":[{"path":"dist/chunk-3AKECLKA.mjs","kind":"import-statement"},{"path":"dist/chunk-NRPWBHKP.mjs","kind":"import-statement"},{"path":"dist/chunk-MI76R42D.mjs","kind":"import-statement"}],"exports":["Context","getContextValue","isReactive","popContext","pushContext","sync","use","useRef"],"entryPoint":"src/core/index.ts","inputs":{"src/core/index.ts":{"bytesInOutput":0},"src/core/ref.ts":{"bytesInOutput":42}},"bytes":323},"dist/dom.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":27792},"dist/dom.mjs":{"imports":[{"path":"dist/chunk-3AKECLKA.mjs","kind":"import-statement"},{"path":"dist/chunk-TP5HUAIN.mjs","kind":"import-statement"},{"path":"dist/chunk-NRPWBHKP.mjs","kind":"import-statement"},{"path":"dist/chunk-MI76R42D.mjs","kind":"import-statement"},{"path":"dist/render-4HB53K66.mjs","kind":"dynamic-import"}],"exports":["ErrorBoundary","Portal","Suspense","f","hydrate","lazy","render"],"entryPoint":"src/dom/index.ts","inputs":{"src/dom/f.ts":{"bytesInOutput":70},"src/dom/index.ts":{"bytesInOutput":0},"src/dom/hydrate.ts":{"bytesInOutput":2734},"src/dom/components/Portal.tsx":{"bytesInOutput":500},"src/dom/components/index.ts":{"bytesInOutput":0},"src/dom/components/suspenseContext.ts":{"bytesInOutput":84},"src/dom/components/Suspense.tsx":{"bytesInOutput":293},"src/dom/components/ErrorBoundary.tsx":{"bytesInOutput":500},"src/dom/components/lazy.ts":{"bytesInOutput":249}},"bytes":4718},"dist/server.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":12945},"dist/server.mjs":{"imports":[{"path":"dist/chunk-MI76R42D.mjs","kind":"import-statement"}],"exports":["getIsServer","renderToStaticMarkup","renderToString"],"entryPoint":"src/server/index.ts","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":2595},"dist/router.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":17333},"dist/router.mjs":{"imports":[{"path":"dist/chunk-3AKECLKA.mjs","kind":"import-statement"},{"path":"dist/chunk-J3542Z77.mjs","kind":"import-statement"},{"path":"dist/chunk-NRPWBHKP.mjs","kind":"import-statement"},{"path":"dist/chunk-MI76R42D.mjs","kind":"import-statement"}],"exports":["Link","Outlet","Route","Routes","useLocation","useNavigate","useParams","useQuery","useRouter"],"entryPoint":"src/router/index.ts","inputs":{"src/router/index.ts":{"bytesInOutput":0},"src/router/utils.ts":{"bytesInOutput":1073},"src/router/router.ts":{"bytesInOutput":859},"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":133}},"bytes":3259},"dist/chunk-3AKECLKA.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":18028},"dist/chunk-3AKECLKA.mjs":{"imports":[{"path":"dist/chunk-NRPWBHKP.mjs","kind":"import-statement"},{"path":"dist/chunk-MI76R42D.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":2043}},"bytes":3145},"dist/jsx-runtime.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"dist/jsx-runtime.mjs":{"imports":[{"path":"dist/chunk-J3542Z77.mjs","kind":"import-statement"}],"exports":["Fragment","jsx","jsxs"],"entryPoint":"src/jsx-runtime.ts","inputs":{},"bytes":82},"dist/jsx-dev-runtime.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":510},"dist/jsx-dev-runtime.mjs":{"imports":[{"path":"dist/chunk-J3542Z77.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-J3542Z77.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":1297},"dist/chunk-J3542Z77.mjs":{"imports":[],"exports":["a","b","c"],"inputs":{"src/jsx-runtime.ts":{"bytesInOutput":183}},"bytes":213},"dist/render-4HB53K66.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"dist/render-4HB53K66.mjs":{"imports":[{"path":"dist/chunk-TP5HUAIN.mjs","kind":"import-statement"},{"path":"dist/chunk-NRPWBHKP.mjs","kind":"import-statement"},{"path":"dist/chunk-MI76R42D.mjs","kind":"import-statement"}],"exports":["reconcile","render"],"entryPoint":"src/dom/render.ts","inputs":{},"bytes":132},"dist/chunk-TP5HUAIN.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":23945},"dist/chunk-TP5HUAIN.mjs":{"imports":[{"path":"dist/chunk-NRPWBHKP.mjs","kind":"import-statement"},{"path":"dist/chunk-MI76R42D.mjs","kind":"import-statement"}],"exports":["a","b"],"inputs":{"src/dom/render.ts":{"bytesInOutput":4853}},"bytes":4965},"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-MI76R42D.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":4337},"dist/chunk-MI76R42D.mjs":{"imports":[],"exports":["a","b","c","d","e","f"],"inputs":{"src/core/hook.ts":{"bytesInOutput":227},"src/core/context.ts":{"bytesInOutput":307}},"bytes":585}}}
|
|
1
|
+
{"inputs":{"src/index.ts":{"bytes":67,"imports":[],"format":"esm"},"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/context.ts":{"bytes":1918,"imports":[],"format":"esm"},"src/core/use.ts":{"bytes":8125,"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":"src/core/context.ts","kind":"import-statement","original":"./context"},{"path":"src/core/context.ts","kind":"import-statement","original":"./context"}],"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":441,"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/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":15127,"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":9324,"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":"dynamic-import","original":"./render"}],"format":"esm"},"src/dom/components/Portal.tsx":{"bytes":1937,"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/render.ts","kind":"import-statement","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":598,"imports":[{"path":"src/dom/components/Portal.tsx","kind":"import-statement","original":"./Portal"},{"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":373,"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/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/router/types.ts":{"bytes":807,"imports":[],"format":"esm"},"src/router/utils.ts":{"bytes":3745,"imports":[{"path":"./types","kind":"import-statement","external":true}],"format":"esm"},"src/router/router.ts":{"bytes":3207,"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":447,"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/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/jsx-dev-runtime.ts":{"bytes":211,"imports":[{"path":"src/jsx-runtime.ts","kind":"import-statement","original":"./jsx-runtime"}],"format":"esm"}},"outputs":{"dist/render-4HB53K66.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"dist/render-4HB53K66.mjs":{"imports":[{"path":"dist/chunk-TP5HUAIN.mjs","kind":"import-statement"},{"path":"dist/chunk-NRPWBHKP.mjs","kind":"import-statement"},{"path":"dist/chunk-MI76R42D.mjs","kind":"import-statement"}],"exports":["reconcile","render"],"entryPoint":"src/dom/render.ts","inputs":{},"bytes":132},"dist/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":204},"dist/index.mjs":{"imports":[],"exports":["VERSION"],"entryPoint":"src/index.ts","inputs":{"src/index.ts":{"bytesInOutput":15}},"bytes":37},"dist/core.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":1066},"dist/core.mjs":{"imports":[{"path":"dist/chunk-3AKECLKA.mjs","kind":"import-statement"},{"path":"dist/chunk-NRPWBHKP.mjs","kind":"import-statement"},{"path":"dist/chunk-MI76R42D.mjs","kind":"import-statement"}],"exports":["Context","getContextValue","isReactive","popContext","pushContext","sync","use","useRef"],"entryPoint":"src/core/index.ts","inputs":{"src/core/index.ts":{"bytesInOutput":0},"src/core/ref.ts":{"bytesInOutput":42}},"bytes":323},"dist/dom.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":27792},"dist/dom.mjs":{"imports":[{"path":"dist/chunk-TP5HUAIN.mjs","kind":"import-statement"},{"path":"dist/chunk-3AKECLKA.mjs","kind":"import-statement"},{"path":"dist/chunk-NRPWBHKP.mjs","kind":"import-statement"},{"path":"dist/chunk-MI76R42D.mjs","kind":"import-statement"},{"path":"dist/render-4HB53K66.mjs","kind":"dynamic-import"}],"exports":["ErrorBoundary","Portal","Suspense","f","hydrate","lazy","render"],"entryPoint":"src/dom/index.ts","inputs":{"src/dom/f.ts":{"bytesInOutput":70},"src/dom/index.ts":{"bytesInOutput":0},"src/dom/hydrate.ts":{"bytesInOutput":2734},"src/dom/components/Portal.tsx":{"bytesInOutput":500},"src/dom/components/index.ts":{"bytesInOutput":0},"src/dom/components/suspenseContext.ts":{"bytesInOutput":84},"src/dom/components/Suspense.tsx":{"bytesInOutput":293},"src/dom/components/ErrorBoundary.tsx":{"bytesInOutput":500},"src/dom/components/lazy.ts":{"bytesInOutput":249}},"bytes":4718},"dist/chunk-TP5HUAIN.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":23945},"dist/chunk-TP5HUAIN.mjs":{"imports":[{"path":"dist/chunk-NRPWBHKP.mjs","kind":"import-statement"},{"path":"dist/chunk-MI76R42D.mjs","kind":"import-statement"}],"exports":["a","b"],"inputs":{"src/dom/render.ts":{"bytesInOutput":4853}},"bytes":4965},"dist/server.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":12945},"dist/server.mjs":{"imports":[{"path":"dist/chunk-MI76R42D.mjs","kind":"import-statement"}],"exports":["getIsServer","renderToStaticMarkup","renderToString"],"entryPoint":"src/server/index.ts","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":2595},"dist/router.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":17333},"dist/router.mjs":{"imports":[{"path":"dist/chunk-3AKECLKA.mjs","kind":"import-statement"},{"path":"dist/chunk-NRPWBHKP.mjs","kind":"import-statement"},{"path":"dist/chunk-MI76R42D.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":{"src/router/index.ts":{"bytesInOutput":0},"src/router/utils.ts":{"bytesInOutput":1073},"src/router/router.ts":{"bytesInOutput":859},"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":133}},"bytes":3259},"dist/chunk-3AKECLKA.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":18028},"dist/chunk-3AKECLKA.mjs":{"imports":[{"path":"dist/chunk-NRPWBHKP.mjs","kind":"import-statement"},{"path":"dist/chunk-MI76R42D.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":2043}},"bytes":3145},"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-MI76R42D.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":4337},"dist/chunk-MI76R42D.mjs":{"imports":[],"exports":["a","b","c","d","e","f"],"inputs":{"src/core/hook.ts":{"bytesInOutput":227},"src/core/context.ts":{"bytesInOutput":307}},"bytes":585},"dist/css.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":20385},"dist/css.mjs":{"imports":[],"exports":["css","cx","getStyleTag","getStyles","hydrateStyles","keyframes","resetStyles","styled"],"entryPoint":"src/css/index.ts","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":3339},"dist/jsx-runtime.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"dist/jsx-runtime.mjs":{"imports":[{"path":"dist/chunk-RUYGSYEV.mjs","kind":"import-statement"}],"exports":["Fragment","jsx","jsxDEV","jsxs"],"entryPoint":"src/jsx-runtime.ts","inputs":{},"bytes":96},"dist/jsx-dev-runtime.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":510},"dist/jsx-dev-runtime.mjs":{"imports":[{"path":"dist/chunk-RUYGSYEV.mjs","kind":"import-statement"}],"exports":["Fragment","jsxDEV"],"entryPoint":"src/jsx-dev-runtime.ts","inputs":{"src/jsx-dev-runtime.ts":{"bytesInOutput":40}},"bytes":123},"dist/chunk-RUYGSYEV.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":1544},"dist/chunk-RUYGSYEV.mjs":{"imports":[],"exports":["a","b","c","d"],"inputs":{"src/jsx-runtime.ts":{"bytesInOutput":217}},"bytes":254}}}
|
package/dist/router.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
'use strict';var chunkACYN2UKT_js=require('./chunk-ACYN2UKT.js')
|
|
1
|
+
'use strict';var chunkACYN2UKT_js=require('./chunk-ACYN2UKT.js');require('./chunk-3CKIHQIE.js');var chunkE6Z7AI4J_js=require('./chunk-E6Z7AI4J.js'),chunkTFXBDC6C_js=require('./chunk-TFXBDC6C.js');function k(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 D(t){return !!(t.length>2048||t.includes("__proto__")||t.includes("constructor")||/^\s*javascript:/i.test(t))}function R(t){let e=[];return t.forEach(r=>{if(!r)return;let{path:n,component:o,children:i,beforeEnter:f}=r.props||{},u={path:n||"/",component:o,beforeEnter:f};if(i){let c=Array.isArray(i)?i:[i];u.children=R(c);}!u.children&&r.children&&r.children.length>0&&(u.children=R(r.children)),e.push(u);}),e}function E(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],u=n[i];if(f.startsWith(":")){let c=f.slice(1);o[c]=u;}else if(f!==u)return null}return {params:o,path:e}}var L=new chunkE6Z7AI4J_js.c(null),p=new chunkE6Z7AI4J_js.c(0),U=()=>({pathname:"/",search:"",hash:"",query:{}}),w=()=>typeof window>"u"?U():{pathname:window.location.pathname,search:window.location.search,hash:window.location.hash,query:k(window.location.search)},l=null,y=null,N=false;function d(){if(l&&y)return [l,y];l=chunkACYN2UKT_js.a(w());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")return;if(D(e)){console.error("[Flexium Router] Blocked navigation to unsafe path:",e);return}window.history.pushState({},"",e);let r=w();t(r);},typeof window<"u"&&!N&&(window.addEventListener("popstate",()=>{t(w());}),N=true),[l,y]}function m(){let[t]=chunkACYN2UKT_js.c(L);if(!t)throw new Error("useRouter() must be called within a <Routes> component");return t}function j(){let[,t]=d();return t}function q(){return m().params}function _(){let[t]=d();return t.query}function x(t){return null}function F(t){return t&&typeof t=="object"&&("type"in t||Array.isArray(t))}function Q(t){let[e,r]=d(),n=Array.isArray(t.children)?t.children:[t.children],o=n.filter(s=>F(s)&&s.type===x),i=n.filter(s=>!F(s)||s.type!==x),f=R(o),u=e.pathname,c=E(f,u)||[],A=c.length>0?c[c.length-1].params:{},S={location:e,navigate:r,matches:c,params:A},C=null;if(c.length>0){let s=c[0],P=s.route.component,g=u;s.route.beforeEnter?s.route.beforeEnter(s.params)!==false&&(C=chunkTFXBDC6C_js.a(p.Provider,{value:1,key:g,children:chunkTFXBDC6C_js.a(P,{params:s.params,key:g})})):C=chunkTFXBDC6C_js.a(p.Provider,{value:1,key:g,children:chunkTFXBDC6C_js.a(P,{params:s.params,key:g})});}return chunkTFXBDC6C_js.a(L.Provider,{value:S,children:[...i,C]})}function B(){let t=m(),[e]=chunkACYN2UKT_js.c(p),r=e??0,[n]=chunkACYN2UKT_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=m();return chunkTFXBDC6C_js.a("a",{href:t.to,class:t.class,onclick:r=>{r.preventDefault(),e.navigate(t.to);},children:t.children})}exports.Link=M;exports.Outlet=B;exports.Route=x;exports.Routes=Q;exports.useLocation=d;exports.useNavigate=j;exports.useParams=q;exports.useQuery=_;exports.useRouter=m;//# sourceMappingURL=router.js.map
|
|
2
2
|
//# sourceMappingURL=router.js.map
|
package/dist/router.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {a,c as c$1}from'./chunk-3AKECLKA.mjs';import
|
|
1
|
+
import {a,c as c$1}from'./chunk-3AKECLKA.mjs';import'./chunk-NRPWBHKP.mjs';import {c}from'./chunk-MI76R42D.mjs';import {a as a$1}from'./chunk-RUYGSYEV.mjs';function k(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 D(t){return !!(t.length>2048||t.includes("__proto__")||t.includes("constructor")||/^\s*javascript:/i.test(t))}function R(t){let e=[];return t.forEach(r=>{if(!r)return;let{path:n,component:o,children:i,beforeEnter:f}=r.props||{},u={path:n||"/",component:o,beforeEnter:f};if(i){let c=Array.isArray(i)?i:[i];u.children=R(c);}!u.children&&r.children&&r.children.length>0&&(u.children=R(r.children)),e.push(u);}),e}function E(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],u=n[i];if(f.startsWith(":")){let c=f.slice(1);o[c]=u;}else if(f!==u)return null}return {params:o,path:e}}var L=new c(null),p=new c(0),U=()=>({pathname:"/",search:"",hash:"",query:{}}),w=()=>typeof window>"u"?U():{pathname:window.location.pathname,search:window.location.search,hash:window.location.hash,query:k(window.location.search)},l=null,y=null,N=false;function d(){if(l&&y)return [l,y];l=a(w());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")return;if(D(e)){console.error("[Flexium Router] Blocked navigation to unsafe path:",e);return}window.history.pushState({},"",e);let r=w();t(r);},typeof window<"u"&&!N&&(window.addEventListener("popstate",()=>{t(w());}),N=true),[l,y]}function m(){let[t]=c$1(L);if(!t)throw new Error("useRouter() must be called within a <Routes> component");return t}function j(){let[,t]=d();return t}function q(){return m().params}function _(){let[t]=d();return t.query}function x(t){return null}function F(t){return t&&typeof t=="object"&&("type"in t||Array.isArray(t))}function Q(t){let[e,r]=d(),n=Array.isArray(t.children)?t.children:[t.children],o=n.filter(s=>F(s)&&s.type===x),i=n.filter(s=>!F(s)||s.type!==x),f=R(o),u=e.pathname,c=E(f,u)||[],A=c.length>0?c[c.length-1].params:{},S={location:e,navigate:r,matches:c,params:A},C=null;if(c.length>0){let s=c[0],P=s.route.component,g=u;s.route.beforeEnter?s.route.beforeEnter(s.params)!==false&&(C=a$1(p.Provider,{value:1,key:g,children:a$1(P,{params:s.params,key:g})})):C=a$1(p.Provider,{value:1,key:g,children:a$1(P,{params:s.params,key:g})});}return a$1(L.Provider,{value:S,children:[...i,C]})}function B(){let t=m(),[e]=c$1(p),r=e??0,[n]=c$1(()=>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=m();return a$1("a",{href:t.to,class:t.class,onclick:r=>{r.preventDefault(),e.navigate(t.to);},children:t.children})}export{M as Link,B as Outlet,x as Route,Q as Routes,d as useLocation,j as useNavigate,q as useParams,_ as useQuery,m as useRouter};//# sourceMappingURL=router.mjs.map
|
|
2
2
|
//# sourceMappingURL=router.mjs.map
|