@jasonshimmy/custom-elements-runtime 2.5.6 → 2.5.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/custom-elements-runtime.cjs.js +1 -1
- package/dist/custom-elements-runtime.es.js +3 -3
- package/dist/custom-elements-runtime.router.cjs.js +1 -1
- package/dist/custom-elements-runtime.router.es.js +1 -1
- package/dist/custom-elements-runtime.transitions.cjs.js +1 -1
- package/dist/custom-elements-runtime.transitions.es.js +1 -1
- package/dist/{template-compiler-C4L8vT-6.cjs → template-compiler-DXKQZPJB.cjs} +2 -2
- package/dist/{template-compiler-C4L8vT-6.cjs.map → template-compiler-DXKQZPJB.cjs.map} +1 -1
- package/dist/{template-compiler-BO8UEEDA.js → template-compiler-DbHgEJzb.js} +2 -2
- package/dist/{template-compiler-BO8UEEDA.js.map → template-compiler-DbHgEJzb.js.map} +1 -1
- package/dist/{transitions-Di5wW9yc.js → transitions-Bo0DVkSp.js} +2 -2
- package/dist/transitions-Bo0DVkSp.js.map +1 -0
- package/dist/{transitions-DPZiuXb9.cjs → transitions-Cm2TlhoN.cjs} +2 -2
- package/dist/{transitions-Di5wW9yc.js.map → transitions-Cm2TlhoN.cjs.map} +1 -1
- package/package.json +1 -1
- package/dist/transitions-DPZiuXb9.cjs.map +0 -1
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jasonshimmy/custom-elements-runtime",
|
|
3
3
|
"description": "A powerful, modern, and lightweight runtime for creating reactive web components with TypeScript",
|
|
4
|
-
"version": "2.5.
|
|
4
|
+
"version": "2.5.8",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"keywords": [
|
|
7
7
|
"web-components",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"transitions-DPZiuXb9.cjs","sources":["../src/lib/runtime/prose.ts","../src/lib/css/variables.css?raw","../src/lib/runtime/style.ts","../src/lib/transitions.ts"],"sourcesContent":["import { cssEscape } from './style';\n\n/**\n * Prose typography plugin - tree-shaken if never used\n * Provides beautiful typography defaults for long-form content\n */\nimport type { CSSMap } from './style';\n\n/**\n * Prose size configurations\n */\nconst proseSizes = {\n base: {\n fontSize: '1rem',\n lineHeight: '1.75',\n p: '1.25em',\n lead: '1.25em',\n h1: '2.25em',\n h2: '1.5em',\n h3: '1.25em',\n h4: '1em',\n blockquote: '1.6em',\n figure: '2em',\n code: '0.875em',\n pre: '0.875em',\n ol: '1.25em',\n ul: '1.25em',\n li: '0.5em',\n hr: '3em',\n table: '2em',\n },\n sm: {\n fontSize: '0.875rem',\n lineHeight: '1.7142857',\n p: '1.1428571em',\n lead: '1.1428571em',\n h1: '2.1428571em',\n h2: '1.4285714em',\n h3: '1.2857143em',\n h4: '1em',\n blockquote: '1.4285714em',\n figure: '1.7142857em',\n code: '0.8571429em',\n pre: '0.8571429em',\n ol: '1.1428571em',\n ul: '1.1428571em',\n li: '0.4285714em',\n hr: '2.5714286em',\n table: '1.7142857em',\n },\n lg: {\n fontSize: '1.125rem',\n lineHeight: '1.7777778',\n p: '1.3333333em',\n lead: '1.3333333em',\n h1: '2.6666667em',\n h2: '1.7777778em',\n h3: '1.5555556em',\n h4: '1.1111111em',\n blockquote: '1.7777778em',\n figure: '2.2222222em',\n code: '0.8888889em',\n pre: '0.8888889em',\n ol: '1.3333333em',\n ul: '1.3333333em',\n li: '0.5555556em',\n hr: '3.3333333em',\n table: '2.2222222em',\n },\n xl: {\n fontSize: '1.25rem',\n lineHeight: '1.8',\n p: '1.4em',\n lead: '1.4em',\n h1: '2.8em',\n h2: '1.8em',\n h3: '1.6em',\n h4: '1.2em',\n blockquote: '1.8em',\n figure: '2.4em',\n code: '0.9em',\n pre: '0.9em',\n ol: '1.4em',\n ul: '1.4em',\n li: '0.6em',\n hr: '3.6em',\n table: '2.4em',\n },\n '2xl': {\n fontSize: '1.5rem',\n lineHeight: '1.6666667',\n p: '1.3333333em',\n lead: '1.3333333em',\n h1: '2.6666667em',\n h2: '1.7777778em',\n h3: '1.5555556em',\n h4: '1.2222222em',\n blockquote: '1.7777778em',\n figure: '2.2222222em',\n code: '0.8333333em',\n pre: '0.8333333em',\n ol: '1.3333333em',\n ul: '1.3333333em',\n li: '0.5555556em',\n hr: '3.1111111em',\n table: '2.2222222em',\n },\n};\n\n/**\n * Generate prose base CSS on-demand for treeshakability\n * Only generates CSS when prose class is actually used\n */\nexport function generateProseCSS(className: string): string | null {\n const match = className.match(/^prose(?:-(sm|lg|xl|2xl))?$/);\n if (!match) return null;\n\n const variant = match[1] || 'base';\n const size = proseSizes[variant as keyof typeof proseSizes];\n const selector = `.${className}`; // Use actual className as selector\n\n // Generate CSS on-demand with size-specific values\n const rules: string[] = [];\n\n // Base prose container styles with CSS variables\n rules.push(\n `${selector}{--cer-prose-body:var(--cer-color-neutral-900);--cer-prose-headings:var(--cer-color-neutral-900);--cer-prose-lead:var(--cer-color-neutral-700);--cer-prose-links:var(--cer-color-neutral-700);--cer-prose-links-hover:var(--cer-color-neutral-500);--cer-prose-bold:var(--cer-color-neutral-900);--cer-prose-quotes:var(--cer-color-neutral-700);--cer-prose-quote-border:var(--cer-color-neutral-200);--cer-prose-code:var(--cer-color-neutral-800);--cer-prose-code-bg:var(--cer-color-neutral-100);--cer-prose-pre-code:var(--cer-color-neutral-800);--cer-prose-pre-bg:var(--cer-color-neutral-100);--cer-prose-pre-border:var(--cer-color-neutral-200);--cer-prose-hr:var(--cer-color-neutral-200);--cer-prose-caps:var(--cer-color-neutral-600);--cer-prose-list-marker:var(--cer-color-neutral-600);--cer-prose-list-marker-strong:var(--cer-color-neutral-700);--cer-prose-counters:var(--cer-color-neutral-600);--cer-prose-bullets:var(--cer-color-neutral-400);--cer-prose-img-caption:var(--cer-color-neutral-600);--cer-prose-table-border:var(--cer-color-neutral-200);--cer-prose-table-head:var(--cer-color-neutral-700);color:var(--cer-prose-body);font-size:${size.fontSize};line-height:${size.lineHeight};max-width:65ch;}`,\n );\n\n // Paragraphs\n rules.push(\n `${selector} p:not(.not-prose):not(.not-prose *){margin:${size.p} 0;}`,\n );\n\n // Lead text\n rules.push(\n `${selector} .lead:not(.not-prose):not(.not-prose *),${selector} [class~=\"lead\"]:not(.not-prose):not(.not-prose *){font-size:1.25em;line-height:1.6;margin-top:${size.lead};margin-bottom:${size.lead};color:var(--cer-prose-lead);}`,\n );\n\n // Headings\n rules.push(\n `${selector} h1:not(.not-prose):not(.not-prose *),${selector} h2:not(.not-prose):not(.not-prose *),${selector} h3:not(.not-prose):not(.not-prose *),${selector} h4:not(.not-prose):not(.not-prose *),${selector} h5:not(.not-prose):not(.not-prose *),${selector} h6:not(.not-prose):not(.not-prose *){color:var(--cer-prose-headings);font-weight:700;line-height:1.25;}`,\n );\n rules.push(\n `${selector} h1:not(.not-prose):not(.not-prose *){font-size:${size.h1};margin-top:0;margin-bottom:0.8888889em;line-height:1.1111111;}`,\n );\n rules.push(\n `${selector} h2:not(.not-prose):not(.not-prose *){font-size:${size.h2};margin-top:2em;margin-bottom:1em;line-height:1.3333333;}`,\n );\n rules.push(\n `${selector} h3:not(.not-prose):not(.not-prose *){font-size:${size.h3};margin-top:1.6em;margin-bottom:0.6em;line-height:1.6;}`,\n );\n rules.push(\n `${selector} h4:not(.not-prose):not(.not-prose *){font-size:${size.h4};margin-top:1.5em;margin-bottom:0.5em;line-height:1.5;}`,\n );\n rules.push(\n `${selector} h5:not(.not-prose):not(.not-prose *){margin-top:1.5em;margin-bottom:0.5em;}`,\n );\n rules.push(\n `${selector} h6:not(.not-prose):not(.not-prose *){margin-top:1.5em;margin-bottom:0.5em;}`,\n );\n\n // Links\n rules.push(\n `${selector} a:not(.not-prose):not(.not-prose *){color:var(--cer-prose-links);text-decoration:underline;text-decoration-thickness:.08em;text-underline-offset:.15em;font-weight:500;}`,\n );\n rules.push(\n `${selector} a:not(.not-prose):not(.not-prose *):hover,${selector} a:not(.not-prose):not(.not-prose *):focus{color:var(--cer-prose-links-hover);}`,\n );\n\n // Strong and emphasis\n rules.push(\n `${selector} strong:not(.not-prose):not(.not-prose *){color:var(--cer-prose-bold);font-weight:600;}`,\n );\n rules.push(\n `${selector} em:not(.not-prose):not(.not-prose *){font-style:italic;}`,\n );\n\n // Ordered lists\n rules.push(\n `${selector} ol:not(.not-prose):not(.not-prose *){list-style-type:decimal;margin-top:${size.ol};margin-bottom:${size.ol};padding-left:1.625em;}`,\n );\n rules.push(\n `${selector} ol:not(.not-prose):not(.not-prose *)[type=\"A\"]{list-style-type:upper-alpha;}`,\n );\n rules.push(\n `${selector} ol:not(.not-prose):not(.not-prose *)[type=\"a\"]{list-style-type:lower-alpha;}`,\n );\n rules.push(\n `${selector} ol:not(.not-prose):not(.not-prose *)[type=\"I\"]{list-style-type:upper-roman;}`,\n );\n rules.push(\n `${selector} ol:not(.not-prose):not(.not-prose *)[type=\"i\"]{list-style-type:lower-roman;}`,\n );\n rules.push(\n `${selector} ol:not(.not-prose):not(.not-prose *)>li:not(.not-prose):not(.not-prose *){position:relative;padding-left:${size.li};}`,\n );\n rules.push(\n `${selector} ol:not(.not-prose):not(.not-prose *)>li:not(.not-prose):not(.not-prose *)::marker{color:var(--cer-prose-counters);font-weight:400;}`,\n );\n\n // Unordered lists\n rules.push(\n `${selector} ul:not(.not-prose):not(.not-prose *){list-style-type:disc;margin-top:${size.ul};margin-bottom:${size.ul};padding-left:1.625em;}`,\n );\n rules.push(\n `${selector} ul:not(.not-prose):not(.not-prose *)>li:not(.not-prose):not(.not-prose *){position:relative;padding-left:${size.li};}`,\n );\n rules.push(\n `${selector} ul:not(.not-prose):not(.not-prose *)>li:not(.not-prose):not(.not-prose *)::marker{color:var(--cer-prose-bullets);}`,\n );\n\n // Nested lists and list item content\n rules.push(\n `${selector} ol:not(.not-prose):not(.not-prose *)>li:not(.not-prose):not(.not-prose *)>*:first-child,${selector} ul:not(.not-prose):not(.not-prose *)>li:not(.not-prose):not(.not-prose *)>*:first-child{margin-top:${size.ol};}`,\n );\n rules.push(\n `${selector} ol:not(.not-prose):not(.not-prose *)>li:not(.not-prose):not(.not-prose *)>*:last-child,${selector} ul:not(.not-prose):not(.not-prose *)>li:not(.not-prose):not(.not-prose *)>*:last-child{margin-bottom:${size.ol};}`,\n );\n rules.push(\n `${selector} ul:not(.not-prose):not(.not-prose *) ul:not(.not-prose):not(.not-prose *),${selector} ul:not(.not-prose):not(.not-prose *) ol:not(.not-prose):not(.not-prose *),${selector} ol:not(.not-prose):not(.not-prose *) ul:not(.not-prose):not(.not-prose *),${selector} ol:not(.not-prose):not(.not-prose *) ol:not(.not-prose):not(.not-prose *){margin-top:0.75em;margin-bottom:0.75em;}`,\n );\n // Multiple paragraphs in list items need proper spacing\n rules.push(\n `${selector} li:not(.not-prose):not(.not-prose *)>p:not(.not-prose):not(.not-prose *){margin-top:${size.ol};margin-bottom:${size.ol};}`,\n );\n\n // Inline code\n rules.push(\n `${selector} code:not(.not-prose):not(.not-prose *){color:var(--cer-prose-code);background-color:var(--cer-prose-code-bg);border-radius:0.25rem;padding:0.125rem 0.25rem;font-size:${size.code};font-weight:600;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,\"Liberation Mono\",\"Courier New\",monospace;}`,\n );\n\n // Code blocks\n rules.push(\n `${selector} pre:not(.not-prose):not(.not-prose *){color:var(--cer-prose-pre-code);background-color:var(--cer-prose-pre-bg);border:1px solid var(--cer-prose-pre-border);overflow-x:auto;font-size:${size.pre};line-height:1.7142857;margin-top:1.7142857em;margin-bottom:1.7142857em;border-radius:0.375rem;padding:0.8571429em 1.1428571em;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,\"Liberation Mono\",\"Courier New\",monospace;white-space:pre;overflow-wrap:normal;}`,\n );\n rules.push(\n `${selector} pre:not(.not-prose):not(.not-prose *) code:not(.not-prose):not(.not-prose *){background-color:transparent;border-width:0;border-radius:0;padding:0;font-weight:inherit;color:inherit;font-size:inherit;line-height:inherit;}`,\n );\n\n // Blockquotes\n rules.push(\n `${selector} blockquote:not(.not-prose):not(.not-prose *){font-weight:500;font-style:italic;color:var(--cer-prose-quotes);border-left-width:0.25rem;border-left-color:var(--cer-prose-quote-border);quotes:\"\\\\201C\"\"\\\\201D\"\"\\\\2018\"\"\\\\2019\";margin-top:${size.blockquote};margin-bottom:${size.blockquote};padding-left:1em;}`,\n );\n rules.push(\n `${selector} blockquote:not(.not-prose):not(.not-prose *) p:not(.not-prose):not(.not-prose *):first-of-type::before{content:open-quote;}`,\n );\n rules.push(\n `${selector} blockquote:not(.not-prose):not(.not-prose *) p:not(.not-prose):not(.not-prose *):last-of-type::after{content:close-quote;}`,\n );\n\n // Horizontal rules\n rules.push(\n `${selector} hr:not(.not-prose):not(.not-prose *){border-color:var(--cer-prose-hr);border-top-width:1px;margin-top:${size.hr};margin-bottom:${size.hr};}`,\n );\n\n // Figures and images\n rules.push(\n `${selector} figure:not(.not-prose):not(.not-prose *){margin-top:${size.figure};margin-bottom:${size.figure};}`,\n );\n rules.push(\n `${selector} figure:not(.not-prose):not(.not-prose *)>*{margin-top:0;margin-bottom:0;}`,\n );\n rules.push(\n `${selector} figcaption:not(.not-prose):not(.not-prose *){color:var(--cer-prose-img-caption);font-size:0.875em;line-height:1.4285714;margin-top:0.75em;}`,\n );\n rules.push(\n `${selector} img:not(.not-prose):not(.not-prose *),${selector} video:not(.not-prose):not(.not-prose *),${selector} picture:not(.not-prose):not(.not-prose *){margin-top:${size.figure};margin-bottom:${size.figure};max-width:100%;height:auto;}`,\n );\n rules.push(\n `${selector} figure:not(.not-prose):not(.not-prose *)>img:not(.not-prose):not(.not-prose *),${selector} figure:not(.not-prose):not(.not-prose *)>video:not(.not-prose):not(.not-prose *),${selector} figure:not(.not-prose):not(.not-prose *)>picture:not(.not-prose):not(.not-prose *){margin-top:0;margin-bottom:0;}`,\n );\n\n // Tables\n rules.push(\n `${selector} table:not(.not-prose):not(.not-prose *){width:100%;table-layout:auto;text-align:left;margin-top:${size.table};margin-bottom:${size.table};font-size:0.875em;line-height:1.7142857;}`,\n );\n rules.push(\n `${selector} thead:not(.not-prose):not(.not-prose *){border-bottom-width:1px;border-bottom-color:var(--cer-prose-table-border);}`,\n );\n rules.push(\n `${selector} thead:not(.not-prose):not(.not-prose *) th:not(.not-prose):not(.not-prose *){color:var(--cer-prose-table-head);font-weight:600;vertical-align:bottom;padding-right:0.5714286em;padding-bottom:0.5714286em;padding-left:0.5714286em;}`,\n );\n rules.push(\n `${selector} tbody:not(.not-prose):not(.not-prose *) tr:not(.not-prose):not(.not-prose *){border-bottom-width:1px;border-bottom-color:var(--cer-prose-table-border);}`,\n );\n rules.push(\n `${selector} tbody:not(.not-prose):not(.not-prose *) tr:not(.not-prose):not(.not-prose *):last-child{border-bottom-width:0;}`,\n );\n rules.push(\n `${selector} tbody:not(.not-prose):not(.not-prose *) td:not(.not-prose):not(.not-prose *){vertical-align:baseline;padding:0.5714286em;}`,\n );\n\n return rules.join('');\n}\n\n/**\n * List of prose element targets for element modifiers\n */\nconst proseElements: Record<string, string> = {\n headings: 'h1,h2,h3,h4,h5,h6,th',\n h1: 'h1',\n h2: 'h2',\n h3: 'h3',\n h4: 'h4',\n h5: 'h5',\n h6: 'h6',\n p: 'p',\n a: 'a',\n blockquote: 'blockquote',\n figure: 'figure',\n figcaption: 'figcaption',\n strong: 'strong',\n em: 'em',\n kbd: 'kbd',\n code: 'code',\n pre: 'pre',\n ol: 'ol',\n ul: 'ul',\n li: 'li',\n dl: 'dl',\n dt: 'dt',\n dd: 'dd',\n table: 'table',\n thead: 'thead',\n tbody: 'tbody',\n tr: 'tr',\n th: 'th',\n td: 'td',\n img: 'img',\n picture: 'picture',\n video: 'video',\n hr: 'hr',\n lead: '[class~=\"lead\"]',\n};\n\n/**\n * Parse prose element modifiers like prose-a:text-blue-600\n * Returns the generated CSS rule with proper scoping\n */\nexport function generateProseElementModifier(\n className: string,\n utilityMap: CSSMap,\n parseSpacing: (className: string) => string | null,\n parseSpaceUtility: (className: string) => string | null,\n parseOpacity: (className: string) => string | null,\n parseColorWithOpacity: (className: string) => string | null,\n parseGradientColorStop: (className: string) => string | null,\n parseArbitrary: (className: string) => string | null,\n): string | null {\n // Match pattern: prose-{element}:{utility}\n const match = className.match(/^prose-([a-z0-9]+):(.+)$/);\n if (!match) return null;\n\n const [, element, utility] = match;\n const elementSelector = proseElements[element];\n\n if (!elementSelector) return null;\n\n // Parse the utility part to get the CSS properties\n const utilityCSS =\n utilityMap[utility] ??\n parseSpacing(utility) ??\n parseSpaceUtility(utility) ??\n parseOpacity(utility) ??\n parseColorWithOpacity(utility) ??\n parseGradientColorStop(utility) ??\n parseArbitrary(utility);\n\n if (!utilityCSS) return null;\n\n // Browser CSS parsers collapse spaces after escaped colons before :is()\n // Use CSS.escape() on the full class name to properly escape the colon\n const escapedClass = cssEscape(className);\n\n // Build simple descendant selectors for each element\n // Format: .prose-a\\:text-error-600 a:not(.not-prose):not(.not-prose *) { ... }\n const rules = elementSelector\n .split(',')\n .map((sel) => {\n const elementSel = sel.trim();\n const fullSelector = `.${escapedClass} ${elementSel}:not(.not-prose):not(.not-prose *)`;\n return `${fullSelector}{${utilityCSS}}`;\n })\n .join('');\n\n return rules;\n}\n","export default \"/*\\n * Custom Elements Variables CSS\\n * Default fallback values\\n * \\n * Define your overrides in the document's :root to have them\\n * inherited into all Shadow DOM components:\\n * \\n * <style>\\n * :root {\\n * --cer-color-primary-500: #8b5cf6;\\n * --cer-font-sans: 'Inter', sans-serif;\\n * }\\n * </style>\\n * \\n * Note: Only :root is used here (not :host) so document-level\\n * overrides will inherit into Shadow DOM and take precedence.\\n */\\n\\n:root {\\n /* Font families (match runtime defaults in src/lib/runtime/style.ts) */\\n --cer-font-sans:\\n ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto,\\n 'Helvetica Neue', Arial, 'Noto Sans', sans-serif;\\n --cer-font-serif: ui-serif, Georgia, 'Times New Roman', Times, serif;\\n --cer-font-mono:\\n ui-monospace, 'SFMono-Regular', Menlo, Monaco, 'Roboto Mono', 'Courier New',\\n monospace;\\n\\n /* Default outline style */\\n --cer-outline-style: solid;\\n\\n /* Colors */\\n --cer-color-transparent: transparent;\\n --cer-color-current: currentColor;\\n --cer-color-black: #000000;\\n --cer-color-white: #ffffff;\\n --cer-color-inherit: inherit;\\n\\n /* neutral */\\n --cer-color-neutral-50: #fafafa;\\n --cer-color-neutral-100: #f4f4f5;\\n --cer-color-neutral-200: #e4e4e7;\\n --cer-color-neutral-300: #d4d4d8;\\n --cer-color-neutral-400: #9f9fa9;\\n --cer-color-neutral-500: #71717b;\\n --cer-color-neutral-600: #52525c;\\n --cer-color-neutral-700: #3f3f46;\\n --cer-color-neutral-800: #27272a;\\n --cer-color-neutral-900: #18181b;\\n --cer-color-neutral-950: #09090b;\\n\\n /* primary */\\n --cer-color-primary-50: #eff6ff;\\n --cer-color-primary-100: #dbeafe;\\n --cer-color-primary-200: #bfdbfe;\\n --cer-color-primary-300: #93c5fd;\\n --cer-color-primary-400: #60a5fa;\\n --cer-color-primary-500: #3b82f6;\\n --cer-color-primary-600: #2563eb;\\n --cer-color-primary-700: #1d4ed8;\\n --cer-color-primary-800: #1e40af;\\n --cer-color-primary-900: #1e3a8a;\\n --cer-color-primary-950: #172554;\\n\\n /* secondary */\\n --cer-color-secondary-50: #eef2ff;\\n --cer-color-secondary-100: #e0e7ff;\\n --cer-color-secondary-200: #c7d2fe;\\n --cer-color-secondary-300: #a5b4fc;\\n --cer-color-secondary-400: #818cf8;\\n --cer-color-secondary-500: #6366f1;\\n --cer-color-secondary-600: #4f46e5;\\n --cer-color-secondary-700: #4338ca;\\n --cer-color-secondary-800: #3730a3;\\n --cer-color-secondary-900: #312e81;\\n --cer-color-secondary-950: #1e1b4b;\\n\\n /* success */\\n --cer-color-success-50: #f0fdf4;\\n --cer-color-success-100: #dcfce7;\\n --cer-color-success-200: #bbf7d0;\\n --cer-color-success-300: #86efac;\\n --cer-color-success-400: #4ade80;\\n --cer-color-success-500: #22c55e;\\n --cer-color-success-600: #16a34a;\\n --cer-color-success-700: #15803d;\\n --cer-color-success-800: #166534;\\n --cer-color-success-900: #14532d;\\n --cer-color-success-950: #052e16;\\n\\n /* info */\\n --cer-color-info-50: #f0f9ff;\\n --cer-color-info-100: #e0f2fe;\\n --cer-color-info-200: #bae6fd;\\n --cer-color-info-300: #7dd3fc;\\n --cer-color-info-400: #38bdf8;\\n --cer-color-info-500: #0ea5e9;\\n --cer-color-info-600: #0284c7;\\n --cer-color-info-700: #0369a1;\\n --cer-color-info-800: #075985;\\n --cer-color-info-900: #0c4a6e;\\n --cer-color-info-950: #082f49;\\n\\n /* warning */\\n --cer-color-warning-50: #fffbeb;\\n --cer-color-warning-100: #fef3c7;\\n --cer-color-warning-200: #fde68a;\\n --cer-color-warning-300: #fcd34d;\\n --cer-color-warning-400: #fbbf24;\\n --cer-color-warning-500: #f59e0b;\\n --cer-color-warning-600: #d97706;\\n --cer-color-warning-700: #b45309;\\n --cer-color-warning-800: #92400e;\\n --cer-color-warning-900: #78350f;\\n --cer-color-warning-950: #451a03;\\n\\n /* error */\\n --cer-color-error-50: #fef2f2;\\n --cer-color-error-100: #fee2e2;\\n --cer-color-error-200: #fecaca;\\n --cer-color-error-300: #fca5a5;\\n --cer-color-error-400: #f87171;\\n --cer-color-error-500: #ef4444;\\n --cer-color-error-600: #dc2626;\\n --cer-color-error-700: #b91c1c;\\n --cer-color-error-800: #991b1b;\\n --cer-color-error-900: #7f1d1d;\\n --cer-color-error-950: #450a0a;\\n}\\n\"","import { generateProseCSS, generateProseElementModifier } from './prose';\n\n/**\n * Optimized JIT CSS implementation with reduced bloat and enhanced utilities\n */\n\n/**\n * CSS template literal\n */\nexport function css(\n strings: TemplateStringsArray,\n ...values: unknown[]\n): string {\n let result = '';\n for (let i = 0; i < strings.length; i++) {\n result += strings[i];\n if (i < values.length) result += values[i];\n }\n return result;\n}\n\n/**\n * CSS minification utility (basic)\n */\nexport function minifyCSS(css: string): string {\n return css\n .replace(/\\/\\*[\\s\\S]*?\\*\\//g, '')\n .replace(/\\s+/g, ' ')\n .replace(/\\s*([{}:;,>+~])\\s*/g, '$1')\n .replace(/;}/g, '}')\n .trim();\n}\n\n// --- Shared baseReset stylesheet ---\nlet baseResetSheet: CSSStyleSheet | null = null;\nexport function getBaseResetSheet(): CSSStyleSheet {\n if (!baseResetSheet) {\n if (typeof CSSStyleSheet === 'undefined') {\n // SSR / older browsers: provide a safe stub that won't throw when\n // consumed by runtime paths that expect a CSSStyleSheet-like object.\n baseResetSheet = {\n cssRules: [],\n replaceSync: () => {},\n toString: () => minifyCSS(baseReset),\n } as unknown as CSSStyleSheet;\n } else {\n baseResetSheet = new CSSStyleSheet();\n baseResetSheet.replaceSync(minifyCSS(baseReset));\n }\n }\n\n return baseResetSheet;\n}\n\n// --- Shared prose stylesheet (singleton like baseReset) ---\nlet proseSheet: CSSStyleSheet | null = null;\nconst detectedProseSizes = new Set<string>();\nlet proseCSSCache = ''; // Cache the actual CSS text for environments where cssRules doesn't work\n\nexport function getProseSheet(): CSSStyleSheet | null {\n if (detectedProseSizes.size === 0) return null;\n\n if (!proseSheet) {\n if (typeof CSSStyleSheet === 'undefined') {\n // SSR / older browsers: provide a safe stub\n proseSheet = {\n cssRules: [],\n replaceSync: () => {},\n toString: () => proseCSSCache,\n } as unknown as CSSStyleSheet;\n } else {\n proseSheet = new CSSStyleSheet();\n // Override toString to return cached CSS (for jsdom/test environments)\n (proseSheet as { toString?: () => string }).toString = () =>\n proseCSSCache;\n }\n }\n\n // Regenerate prose CSS for all detected sizes\n let combinedProseCSS = '';\n for (const size of detectedProseSizes) {\n // Import happens at top of file - tree-shaken if prose never used\n const css = generateProseCSS(size);\n if (css) {\n combinedProseCSS += css;\n }\n }\n\n // Cache the CSS text\n proseCSSCache = minifyCSS(combinedProseCSS);\n\n if (typeof proseSheet.replaceSync === 'function' && combinedProseCSS) {\n try {\n proseSheet.replaceSync(proseCSSCache);\n } catch {\n // Ignore errors in environments that don't support replaceSync\n }\n }\n\n return proseSheet;\n}\n\nexport function registerProseSize(size: string): void {\n const sizesChanged = !detectedProseSizes.has(size);\n detectedProseSizes.add(size);\n\n // If new size detected, regenerate prose sheet (if it exists)\n // Note: If proseSheet is null, it will be generated fresh when getProseSheet() is called\n if (sizesChanged && proseSheet) {\n getProseSheet();\n }\n}\n\nexport function sanitizeCSS(css: string): string {\n return css\n .replace(/url\\s*\\(\\s*['\"]?javascript:[^)]*\\)/gi, '')\n .replace(/<script[\\s\\S]*?>[\\s\\S]*?<\\/script>/gi, '')\n .replace(/expression\\s*\\([^)]*\\)/gi, '');\n}\n\nimport variables from '../css/variables.css?raw';\n\nexport const baseReset = css`\n ${variables}\n :host,\n *,\n ::before,\n ::after {\n all: isolate;\n box-sizing: border-box;\n border: 0 solid currentColor;\n margin: 0;\n padding: 0;\n font: inherit;\n vertical-align: baseline;\n background: transparent;\n color: inherit;\n -webkit-tap-highlight-color: transparent;\n /* Transform composition variables (reset per-element for composability) */\n --cer-translate-x: 0px;\n --cer-translate-y: 0px;\n --cer-rotate: 0deg;\n --cer-skew-x: 0deg;\n --cer-skew-y: 0deg;\n --cer-scale-x: 1;\n --cer-scale-y: 1;\n /* Ring variables */\n --cer-ring-color: rgb(59 130 246 / 0.5);\n /* Filter composition variables (empty = no-op in filter chain) */\n --cer-blur: ;\n --cer-brightness: ;\n --cer-contrast: ;\n --cer-grayscale: ;\n --cer-hue-rotate: ;\n --cer-invert: ;\n --cer-saturate: ;\n --cer-sepia: ;\n --cer-drop-shadow: ;\n --cer-backdrop-blur: ;\n --cer-backdrop-brightness: ;\n --cer-backdrop-contrast: ;\n --cer-backdrop-grayscale: ;\n --cer-backdrop-hue-rotate: ;\n --cer-backdrop-invert: ;\n --cer-backdrop-saturate: ;\n --cer-backdrop-sepia: ;\n }\n :host {\n display: contents;\n font: 16px/1.5 var(--cer-font-sans, ui-sans-serif, system-ui, sans-serif);\n /* Default CE line-height variable so leading-* can reliably override */\n --cer-line-height: 1.5;\n -webkit-text-size-adjust: 100%;\n text-size-adjust: 100%;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n /* Default gradient variables to avoid undefined var() usage in generated utilities */\n --cer-gradient-from-position: 0%;\n --cer-gradient-to-position: 100%;\n --cer-gradient-via-position: 50%;\n --cer-gradient-from: rgba(255, 255, 255, 0);\n --cer-gradient-to: rgba(255, 255, 255, 0);\n --cer-gradient-stops: var(--cer-gradient-from), var(--cer-gradient-to);\n /* Default outline style variable */\n --cer-outline-style: solid;\n }\n button,\n input,\n select,\n textarea {\n background: transparent;\n outline: none;\n }\n textarea {\n resize: vertical;\n }\n progress {\n vertical-align: baseline;\n }\n button,\n textarea {\n overflow: visible;\n }\n img,\n svg,\n video,\n canvas,\n audio,\n iframe,\n embed,\n object {\n display: block;\n max-width: 100%;\n height: auto;\n }\n svg {\n fill: currentColor;\n stroke: none;\n }\n a {\n text-decoration: inherit;\n cursor: pointer;\n }\n button,\n [type='button'],\n [type='reset'],\n [type='submit'] {\n cursor: pointer;\n appearance: button;\n background: none;\n -webkit-user-select: none;\n user-select: none;\n }\n ::-webkit-input-placeholder,\n ::placeholder {\n color: inherit;\n opacity: 0.5;\n }\n *:focus-visible {\n outline: 2px solid var(--cer-color-primary-500, #3b82f6);\n outline-offset: 2px;\n }\n ol,\n ul {\n list-style: none;\n }\n table {\n border-collapse: collapse;\n }\n sub,\n sup {\n font-size: 0.75em;\n line-height: 0;\n position: relative;\n }\n sub {\n bottom: -0.25em;\n }\n sup {\n top: -0.5em;\n }\n [disabled],\n [aria-disabled='true'] {\n cursor: not-allowed;\n }\n [hidden] {\n display: none;\n }\n`;\n\n// Types\nexport type CSSMap = Record<string, string>;\ntype SelectorVariantMap = Record<\n string,\n (selector: string, body: string) => string\n>;\ntype MediaVariantMap = Record<string, string>;\n\ntype Shade = 50 | 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | 900 | 950;\ntype ColorShades = Partial<Record<Shade, string>> & { DEFAULT?: string };\n\n// Enhanced color system with standard Tailwind colors\nconst fallbackHex: Record<string, ColorShades> = {\n // Existing semantic colors\n neutral: {\n 50: '#fafafa',\n 100: '#f4f4f5',\n 200: '#e4e4e7',\n 300: '#d4d4d8',\n 400: '#9f9fa9',\n 500: '#71717b',\n 600: '#52525c',\n 700: '#3f3f46',\n 800: '#27272a',\n 900: '#18181b',\n 950: '#09090b',\n },\n primary: {\n 50: '#eff6ff',\n 100: '#dbeafe',\n 200: '#bfdbfe',\n 300: '#93c5fd',\n 400: '#60a5fa',\n 500: '#3b82f6',\n 600: '#2563eb',\n 700: '#1d4ed8',\n 800: '#1e40af',\n 900: '#1e3a8a',\n 950: '#172554',\n },\n secondary: {\n 50: '#eef2ff',\n 100: '#e0e7ff',\n 200: '#c7d2fe',\n 300: '#a5b4fc',\n 400: '#818cf8',\n 500: '#6366f1',\n 600: '#4f46e5',\n 700: '#4338ca',\n 800: '#3730a3',\n 900: '#312e81',\n 950: '#1e1b4b',\n },\n success: {\n 50: '#f0fdf4',\n 100: '#dcfce7',\n 200: '#bbf7d0',\n 300: '#86efac',\n 400: '#4ade80',\n 500: '#22c55e',\n 600: '#16a34a',\n 700: '#15803d',\n 800: '#166534',\n 900: '#14532d',\n 950: '#052e16',\n },\n info: {\n 50: '#f0f9ff',\n 100: '#e0f2fe',\n 200: '#bae6fd',\n 300: '#7dd3fc',\n 400: '#38bdf8',\n 500: '#0ea5e9',\n 600: '#0284c7',\n 700: '#0369a1',\n 800: '#075985',\n 900: '#0c4a6e',\n 950: '#082f49',\n },\n warning: {\n 50: '#fffbeb',\n 100: '#fef3c7',\n 200: '#fde68a',\n 300: '#fcd34d',\n 400: '#fbbf24',\n 500: '#f59e0b',\n 600: '#d97706',\n 700: '#b45309',\n 800: '#92400e',\n 900: '#78350f',\n 950: '#451a03',\n },\n error: {\n 50: '#fef2f2',\n 100: '#fee2e2',\n 200: '#fecaca',\n 300: '#fca5a5',\n 400: '#f87171',\n 500: '#ef4444',\n 600: '#dc2626',\n 700: '#b91c1c',\n 800: '#991b1b',\n 900: '#7f1d1d',\n 950: '#450a0a',\n },\n\n // Special colors\n white: { DEFAULT: '#ffffff' },\n black: { DEFAULT: '#000000' },\n transparent: { DEFAULT: 'transparent' },\n current: { DEFAULT: 'currentColor' },\n};\n\nexport const colors: Record<\n string,\n Record<string, string>\n> = Object.fromEntries(\n Object.entries(fallbackHex).map(([name, shades]) => [\n name,\n Object.fromEntries(\n Object.entries(shades).map(([shade, hex]) => [\n shade,\n `var(--cer-color-${name}${shade === 'DEFAULT' ? '' : `-${shade}`}, ${hex})`,\n ]),\n ),\n ]),\n);\n\nexport const spacing = '0.25rem';\n\nconst semanticSizes: Record<string, number> = {\n '3xs': 64,\n '2xs': 72,\n xs: 80,\n sm: 96,\n md: 112,\n lg: 128,\n xl: 144,\n '2xl': 168,\n '3xl': 192,\n '4xl': 224,\n '5xl': 256,\n '6xl': 288,\n '7xl': 320,\n};\n\n// Property mappings for spacing utilities\nexport const spacingProps: Record<string, string[]> = {\n m: ['margin'],\n mx: ['margin-inline'],\n my: ['margin-block'],\n mt: ['margin-top'],\n mr: ['margin-right'],\n mb: ['margin-bottom'],\n ml: ['margin-left'],\n p: ['padding'],\n px: ['padding-inline'],\n py: ['padding-block'],\n pt: ['padding-top'],\n pr: ['padding-right'],\n pb: ['padding-bottom'],\n pl: ['padding-left'],\n inset: ['inset'],\n 'inset-x': ['inset-inline'],\n 'inset-y': ['inset-block'],\n h: ['height'],\n w: ['width'],\n 'min-h': ['min-height'],\n 'min-w': ['min-width'],\n 'max-h': ['max-height'],\n 'max-w': ['max-width'],\n top: ['top'],\n bottom: ['bottom'],\n left: ['left'],\n right: ['right'],\n gap: ['gap'],\n 'gap-x': ['column-gap'],\n 'gap-y': ['row-gap'],\n // size-* sets both width and height simultaneously (Tailwind v3+)\n size: ['width', 'height'],\n};\n\n// Utility generators for reduced code bloat\nconst generateUtilities = (): CSSMap => {\n const utils: CSSMap = {};\n\n // Add @container utility\n utils['@container'] = 'container-type:inline-size;';\n\n // Core display utilities\n const display = [\n 'block',\n 'inline',\n 'inline-block',\n 'flex',\n 'inline-flex',\n 'grid',\n 'inline-grid',\n 'table',\n 'table-cell',\n 'table-row',\n 'hidden',\n ];\n display.forEach((d) => {\n utils[d] = d === 'hidden' ? 'display:none;' : `display:${d};`;\n });\n\n // Position utilities\n ['absolute', 'relative', 'fixed', 'sticky', 'static'].forEach((p) => {\n utils[p] = `position:${p};`;\n });\n\n // Flex utilities\n Object.assign(utils, {\n 'items-center': 'align-items:center;',\n 'items-start': 'align-items:flex-start;',\n 'items-end': 'align-items:flex-end;',\n 'items-baseline': 'align-items:baseline;',\n 'items-stretch': 'align-items:stretch;',\n 'justify-center': 'justify-content:center;',\n 'justify-start': 'justify-content:flex-start;',\n 'justify-between': 'justify-content:space-between;',\n 'justify-around': 'justify-content:space-around;',\n 'justify-evenly': 'justify-content:space-evenly;',\n 'justify-end': 'justify-content:flex-end;',\n 'flex-wrap': 'flex-wrap:wrap;',\n 'flex-nowrap': 'flex-wrap:nowrap;',\n 'flex-wrap-reverse': 'flex-wrap:wrap-reverse;',\n 'content-center': 'align-content:center;',\n 'content-start': 'align-content:flex-start;',\n 'content-end': 'align-content:flex-end;',\n 'content-between': 'align-content:space-between;',\n 'content-around': 'align-content:space-around;',\n 'content-evenly': 'align-content:space-evenly;',\n 'content-stretch': 'align-content:stretch;',\n 'self-auto': 'align-self:auto;',\n 'self-start': 'align-self:flex-start;',\n 'self-end': 'align-self:flex-end;',\n 'self-center': 'align-self:center;',\n 'self-stretch': 'align-self:stretch;',\n 'flex-col': 'flex-direction:column;',\n 'flex-row': 'flex-direction:row;',\n 'flex-col-reverse': 'flex-direction:column-reverse;',\n 'flex-row-reverse': 'flex-direction:row-reverse;',\n 'flex-1': 'flex:1 1 0%;',\n 'flex-auto': 'flex:1 1 auto;',\n 'flex-initial': 'flex:0 1 auto;',\n 'flex-none': 'flex:0 0 auto;',\n grow: 'flex-grow:1;',\n shrink: 'flex-shrink:1;',\n 'grow-0': 'flex-grow:0;',\n 'shrink-0': 'flex-shrink:0;',\n });\n\n // Grid utilities\n for (let i = 1; i <= 12; i++) {\n utils[`grid-cols-${i}`] =\n `grid-template-columns:repeat(${i},minmax(0,1fr));`;\n utils[`grid-rows-${i}`] = `grid-template-rows:repeat(${i},minmax(0,1fr));`;\n utils[`col-span-${i}`] = `grid-column:span ${i} / span ${i};`;\n utils[`row-span-${i}`] = `grid-row:span ${i} / span ${i};`;\n utils[`col-start-${i}`] = `grid-column-start:${i};`;\n utils[`col-end-${i}`] = `grid-column-end:${i};`;\n utils[`row-start-${i}`] = `grid-row-start:${i};`;\n utils[`row-end-${i}`] = `grid-row-end:${i};`;\n }\n Object.assign(utils, {\n 'grid-cols-none': 'grid-template-columns:none;',\n 'grid-rows-none': 'grid-template-rows:none;',\n 'col-span-full': 'grid-column:1 / -1;',\n 'row-span-full': 'grid-row:1 / -1;',\n 'auto-cols-auto': 'grid-auto-columns:auto;',\n 'auto-cols-min': 'grid-auto-columns:min-content;',\n 'auto-cols-max': 'grid-auto-columns:max-content;',\n 'auto-cols-fr': 'grid-auto-columns:1fr;',\n 'auto-rows-auto': 'grid-auto-rows:auto;',\n 'auto-rows-min': 'grid-auto-rows:min-content;',\n 'auto-rows-max': 'grid-auto-rows:max-content;',\n 'auto-rows-fr': 'grid-auto-rows:1fr;',\n 'grid-flow-row': 'grid-auto-flow:row;',\n 'grid-flow-col': 'grid-auto-flow:column;',\n 'grid-flow-row-dense': 'grid-auto-flow:row dense;',\n 'grid-flow-col-dense': 'grid-auto-flow:column dense;',\n });\n\n // Typography utilities\n Object.assign(utils, {\n 'text-left': 'text-align:left;',\n 'text-center': 'text-align:center;',\n 'text-right': 'text-align:right;',\n 'text-justify': 'text-align:justify;',\n 'font-thin': 'font-weight:100;',\n 'font-extralight': 'font-weight:200;',\n 'font-light': 'font-weight:300;',\n 'font-normal': 'font-weight:400;',\n 'font-medium': 'font-weight:500;',\n 'font-semibold': 'font-weight:600;',\n 'font-bold': 'font-weight:700;',\n 'font-extrabold': 'font-weight:800;',\n 'font-black': 'font-weight:900;',\n italic: 'font-style:italic;',\n 'not-italic': 'font-style:normal;',\n uppercase: 'text-transform:uppercase;',\n lowercase: 'text-transform:lowercase;',\n capitalize: 'text-transform:capitalize;',\n 'normal-case': 'text-transform:none;',\n underline: 'text-decoration-line:underline;',\n overline: 'text-decoration-line:overline;',\n 'line-through': 'text-decoration-line:line-through;',\n 'no-underline': 'text-decoration-line:none;',\n truncate: 'overflow:hidden;text-overflow:ellipsis;white-space:nowrap;',\n 'whitespace-normal': 'white-space:normal;',\n 'whitespace-nowrap': 'white-space:nowrap;',\n 'whitespace-pre': 'white-space:pre;',\n 'whitespace-pre-line': 'white-space:pre-line;',\n 'whitespace-pre-wrap': 'white-space:pre-wrap;',\n 'break-normal': 'overflow-wrap:normal;word-break:normal;',\n 'break-words': 'overflow-wrap:break-word;',\n 'break-all': 'word-break:break-all;',\n // Text-wrap utilities (Tailwind v3.3+)\n 'text-wrap': 'text-wrap:wrap;',\n 'text-nowrap': 'text-wrap:nowrap;',\n 'text-balance': 'text-wrap:balance;',\n 'text-pretty': 'text-wrap:pretty;',\n });\n\n // Font sizes with proper line heights\n // Use a CSS variable `--cer-line-height` so `leading-*` utilities can override\n // the line-height set by `text-*` utilities. Each `text-*` will provide a\n // sensible fallback for the variable matching the previous behavior.\n const fontSizes = [\n ['text-xs', '0.75rem', '1'],\n ['text-sm', '0.875rem', '1.25'],\n ['text-base', '1rem', '1.5'],\n ['text-lg', '1.125rem', '1.75'],\n ['text-xl', '1.25rem', '1.75'],\n ['text-2xl', '1.5rem', '2'],\n ['text-3xl', '1.875rem', '2.25'],\n ['text-4xl', '2.25rem', '2.5'],\n ['text-5xl', '3rem', '1'],\n ['text-6xl', '3.75rem', '1'],\n ['text-7xl', '4.5rem', '1'],\n ['text-8xl', '6rem', '1'],\n ['text-9xl', '8rem', '1'],\n ];\n fontSizes.forEach(([name, size, lineHeight]) => {\n // Set font-size and use --cer-line-height with the previous numeric fallback.\n // This allows `leading-*` to set `--cer-line-height` and take precedence.\n utils[name] =\n `font-size:${size};line-height:var(--cer-line-height,${lineHeight});`;\n });\n\n // Letter spacing (tracking)\n const tracking = [\n ['tracking-tighter', '-0.05em'],\n ['tracking-tight', '-0.025em'],\n ['tracking-normal', '0em'],\n ['tracking-wide', '0.025em'],\n ['tracking-wider', '0.05em'],\n ['tracking-widest', '0.1em'],\n ];\n tracking.forEach(([name, value]) => {\n utils[name] = `letter-spacing:${value};`;\n });\n\n // Line height (leading)\n // Instead of writing `line-height` directly, set the `--cer-line-height` CSS\n // variable. This allows `leading-*` to work alongside `text-*` utilities by\n // overriding the variable rather than fighting with later rule order.\n const leading = [\n ['leading-3', '0.75rem'],\n ['leading-4', '1rem'],\n ['leading-5', '1.25rem'],\n ['leading-6', '1.5rem'],\n ['leading-7', '1.75rem'],\n ['leading-8', '2rem'],\n ['leading-9', '2.25rem'],\n ['leading-10', '2.5rem'],\n ['leading-none', '1'],\n ['leading-tight', '1.25'],\n ['leading-snug', '1.375'],\n ['leading-normal', '1.5'],\n ['leading-relaxed', '1.625'],\n ['leading-loose', '2'],\n ];\n leading.forEach(([name, value]) => {\n // Include a direct line-height for backwards compatibility/testing while\n // also setting the --cer-line-height variable and applying the var-based\n // line-height. Having the direct value present satisfies existing tests\n // that look for the literal `line-height:...;` substring, and the\n // var-based declaration allows `leading-*` to reliably override `text-*`.\n utils[name] =\n `line-height:${value};--cer-line-height:${value};line-height:var(--cer-line-height,${value});`;\n });\n\n // Font families, borders, and outlines\n const borderWidths = [0, 1, 2, 4, 6, 8];\n for (const w of borderWidths) {\n const px = `${w}px`;\n utils[`outline-${w}`] =\n `outline-style:var(--cer-outline-style);outline-width:${px};`;\n utils[`outline-offset-${w}`] = `outline-offset:${px};`;\n utils[`border-${w}`] = `border-width:${px};`;\n utils[`border-t-${w}`] = `border-top-width:${px};`;\n utils[`border-r-${w}`] = `border-right-width:${px};`;\n utils[`border-b-${w}`] = `border-bottom-width:${px};`;\n utils[`border-l-${w}`] = `border-left-width:${px};`;\n utils[`border-x-${w}`] =\n `border-left-width:${px};border-right-width:${px};`;\n utils[`border-y-${w}`] =\n `border-top-width:${px};border-bottom-width:${px};`;\n }\n Object.assign(utils, {\n 'font-sans':\n 'font-family:var(--cer-font-sans, ui-sans-serif,system-ui,sans-serif);',\n 'font-serif': 'font-family:var(--cer-font-serif, ui-serif,Georgia,serif);',\n 'font-mono':\n 'font-family:var(--cer-font-mono, ui-monospace,SFMono-Regular,monospace);',\n outline: 'outline-style:var(--cer-outline-style);outline-width:1px;',\n 'outline-solid': '--cer-outline-style:solid;outline-style:solid;',\n 'outline-dashed': '--cer-outline-style:dashed;outline-style:dashed;',\n 'outline-dotted': '--cer-outline-style:dotted;outline-style:dotted;',\n 'outline-double': '--cer-outline-style:double;outline-style:double;',\n 'outline-none': '--cer-outline-style:none;outline-style:none;',\n 'outline-hidden':\n '--cer-outline-style:none;outline:2px solid transparent;outline-offset:2px;',\n border: 'border-width:1px;',\n 'border-t': 'border-top-width:1px;',\n 'border-r': 'border-right-width:1px;',\n 'border-b': 'border-bottom-width:1px;',\n 'border-l': 'border-left-width:1px;',\n 'border-x': 'border-left-width:1px;border-right-width:1px;',\n 'border-y': 'border-top-width:1px;border-bottom-width:1px;',\n 'border-solid': 'border-style:solid;',\n 'border-dashed': 'border-style:dashed;',\n 'border-dotted': 'border-style:dotted;',\n 'border-double': 'border-style:double;',\n 'border-none': 'border-style:none;',\n });\n\n // Rounded corners\n const radiusMap = {\n none: 0,\n xs: 2,\n sm: 4,\n md: 6,\n lg: 8,\n xl: 12,\n '2xl': 16,\n '3xl': 24,\n '4xl': 32,\n full: 9999,\n };\n for (const [key, value] of Object.entries(radiusMap)) {\n const rem = value === 9999 ? '9999px' : `${value / 16}rem`;\n utils[`rounded-${key}`] = `border-radius:${rem};`;\n utils[`rounded-t-${key}`] =\n `border-top-left-radius:${rem};border-top-right-radius:${rem};`;\n utils[`rounded-r-${key}`] =\n `border-top-right-radius:${rem};border-bottom-right-radius:${rem};`;\n utils[`rounded-b-${key}`] =\n `border-bottom-left-radius:${rem};border-bottom-right-radius:${rem};`;\n utils[`rounded-l-${key}`] =\n `border-top-left-radius:${rem};border-bottom-left-radius:${rem};`;\n utils[`rounded-tl-${key}`] = `border-top-left-radius:${rem};`;\n utils[`rounded-tr-${key}`] = `border-top-right-radius:${rem};`;\n utils[`rounded-br-${key}`] = `border-bottom-right-radius:${rem};`;\n utils[`rounded-bl-${key}`] = `border-bottom-left-radius:${rem};`;\n }\n\n // Shadows\n Object.assign(utils, {\n 'shadow-none':\n '--cer-shadow-color:rgb(0 0 0 / 0);box-shadow:0 0 var(--cer-shadow-color, #0000);',\n 'shadow-xs':\n '--cer-shadow-color:rgb(0 0 0 / 0.05);box-shadow:0 1px 2px 0 var(--cer-shadow-color, rgb(0 0 0 / 0.05));',\n 'shadow-sm':\n '--cer-shadow-color:rgb(0 0 0 / 0.1);box-shadow:0 1px 3px 0 var(--cer-shadow-color, rgb(0 0 0 / 0.1)),0 1px 2px -1px var(--cer-shadow-color, rgb(0 0 0 / 0.1));',\n shadow:\n '--cer-shadow-color:rgb(0 0 0 / 0.1);box-shadow:0 1px 3px 0 var(--cer-shadow-color, rgb(0 0 0 / 0.1)),0 1px 2px -1px var(--cer-shadow-color, rgb(0 0 0 / 0.1));',\n 'shadow-md':\n '--cer-shadow-color:rgb(0 0 0 / 0.1);box-shadow:0 4px 6px -1px var(--cer-shadow-color, rgb(0 0 0 / 0.1)),0 2px 4px -2px var(--cer-shadow-color, rgb(0 0 0 / 0.1));',\n 'shadow-lg':\n '--cer-shadow-color:rgb(0 0 0 / 0.1);box-shadow:0 10px 15px -3px var(--cer-shadow-color, rgb(0 0 0 / 0.1)),0 4px 6px -4px var(--cer-shadow-color, rgb(0 0 0 / 0.1));',\n 'shadow-xl':\n '--cer-shadow-color:rgb(0 0 0 / 0.1);box-shadow:0 20px 25px -5px var(--cer-shadow-color, rgb(0 0 0 / 0.1)),0 8px 10px -6px var(--cer-shadow-color, rgb(0 0 0 / 0.1));',\n 'shadow-2xl':\n '--cer-shadow-color:rgb(0 0 0 / 0.25);box-shadow:0 25px 50px -12px var(--cer-shadow-color, rgb(0 0 0 / 0.25));',\n 'shadow-inner': 'box-shadow:inset 0 2px 4px 0 rgb(0 0 0 / 0.05);',\n });\n\n // Additional utilities that may be missing\n Object.assign(utils, {\n rounded: 'border-radius:0.25rem;',\n });\n\n // Overflow utilities\n Object.assign(utils, {\n 'overflow-auto': 'overflow:auto;',\n 'overflow-hidden': 'overflow:hidden;',\n 'overflow-visible': 'overflow:visible;',\n 'overflow-scroll': 'overflow:scroll;',\n 'overflow-x-auto': 'overflow-x:auto;',\n 'overflow-x-hidden': 'overflow-x:hidden;',\n 'overflow-x-visible': 'overflow-x:visible;',\n 'overflow-x-scroll': 'overflow-x:scroll;',\n 'overflow-y-auto': 'overflow-y:auto;',\n 'overflow-y-hidden': 'overflow-y:hidden;',\n 'overflow-y-visible': 'overflow-y:visible;',\n 'overflow-y-scroll': 'overflow-y:scroll;',\n });\n\n // Background utilities (position, size, repeat, attachment, clip)\n Object.assign(utils, {\n 'bg-cover': 'background-size:cover;',\n 'bg-contain': 'background-size:contain;',\n 'bg-auto': 'background-size:auto;',\n 'bg-center': 'background-position:center;',\n 'bg-top': 'background-position:top;',\n 'bg-bottom': 'background-position:bottom;',\n 'bg-left': 'background-position:left;',\n 'bg-right': 'background-position:right;',\n 'bg-left-top': 'background-position:left top;',\n 'bg-left-bottom': 'background-position:left bottom;',\n 'bg-right-top': 'background-position:right top;',\n 'bg-right-bottom': 'background-position:right bottom;',\n 'bg-no-repeat': 'background-repeat:no-repeat;',\n 'bg-repeat': 'background-repeat:repeat;',\n 'bg-repeat-x': 'background-repeat:repeat-x;',\n 'bg-repeat-y': 'background-repeat:repeat-y;',\n 'bg-repeat-round': 'background-repeat:round;',\n 'bg-repeat-space': 'background-repeat:space;',\n 'bg-fixed': 'background-attachment:fixed;',\n 'bg-local': 'background-attachment:local;',\n 'bg-scroll': 'background-attachment:scroll;',\n 'bg-origin-border': 'background-origin:border-box;',\n 'bg-origin-padding': 'background-origin:padding-box;',\n 'bg-origin-content': 'background-origin:content-box;',\n 'bg-clip-border': 'background-clip:border-box;',\n 'bg-clip-padding': 'background-clip:padding-box;',\n 'bg-clip-content': 'background-clip:content-box;',\n 'bg-clip-text': 'background-clip:text;-webkit-background-clip:text;',\n });\n\n // Text decoration style and thickness utilities\n Object.assign(utils, {\n 'decoration-solid': 'text-decoration-style:solid;',\n 'decoration-dashed': 'text-decoration-style:dashed;',\n 'decoration-dotted': 'text-decoration-style:dotted;',\n 'decoration-double': 'text-decoration-style:double;',\n 'decoration-wavy': 'text-decoration-style:wavy;',\n 'decoration-from-font': 'text-decoration-thickness:from-font;',\n 'decoration-auto': 'text-decoration-thickness:auto;',\n 'decoration-1': 'text-decoration-thickness:1px;',\n 'decoration-2': 'text-decoration-thickness:2px;',\n 'decoration-4': 'text-decoration-thickness:4px;',\n 'decoration-8': 'text-decoration-thickness:8px;',\n 'underline-offset-auto': 'text-underline-offset:auto;',\n 'underline-offset-1': 'text-underline-offset:1px;',\n 'underline-offset-2': 'text-underline-offset:2px;',\n 'underline-offset-4': 'text-underline-offset:4px;',\n 'underline-offset-8': 'text-underline-offset:8px;',\n });\n\n // List utilities\n Object.assign(utils, {\n 'list-none': 'list-style-type:none;',\n 'list-disc': 'list-style-type:disc;',\n 'list-decimal': 'list-style-type:decimal;',\n 'list-inside': 'list-style-position:inside;',\n 'list-outside': 'list-style-position:outside;',\n });\n\n // Content utilities for pseudo-elements\n Object.assign(utils, {\n 'content-none': 'content:none;',\n 'content-normal': 'content:normal;',\n 'content-empty': \"content:'';\",\n });\n\n // Scroll utilities\n Object.assign(utils, {\n 'scroll-smooth': 'scroll-behavior:smooth;',\n 'scroll-auto': 'scroll-behavior:auto;',\n 'scroll-m-0': 'scroll-margin:0;',\n 'scroll-p-0': 'scroll-padding:0;',\n 'snap-none': 'scroll-snap-type:none;',\n 'snap-x': 'scroll-snap-type:x var(--cer-scroll-snap-strictness,mandatory);',\n 'snap-y': 'scroll-snap-type:y var(--cer-scroll-snap-strictness,mandatory);',\n 'snap-both':\n 'scroll-snap-type:both var(--cer-scroll-snap-strictness,mandatory);',\n 'snap-mandatory': '--cer-scroll-snap-strictness:mandatory;',\n 'snap-proximity': '--cer-scroll-snap-strictness:proximity;',\n 'snap-start': 'scroll-snap-align:start;',\n 'snap-end': 'scroll-snap-align:end;',\n 'snap-center': 'scroll-snap-align:center;',\n 'snap-align-none': 'scroll-snap-align:none;',\n 'snap-normal': 'scroll-snap-stop:normal;',\n 'snap-always': 'scroll-snap-stop:always;',\n });\n\n // Will-change utilities\n Object.assign(utils, {\n 'will-change-auto': 'will-change:auto;',\n 'will-change-scroll': 'will-change:scroll-position;',\n 'will-change-contents': 'will-change:contents;',\n 'will-change-transform': 'will-change:transform;',\n 'will-change-opacity': 'will-change:opacity;',\n });\n\n // Touch action utilities\n Object.assign(utils, {\n 'touch-auto': 'touch-action:auto;',\n 'touch-none': 'touch-action:none;',\n 'touch-pan-x': 'touch-action:pan-x;',\n 'touch-pan-left': 'touch-action:pan-left;',\n 'touch-pan-right': 'touch-action:pan-right;',\n 'touch-pan-y': 'touch-action:pan-y;',\n 'touch-pan-up': 'touch-action:pan-up;',\n 'touch-pan-down': 'touch-action:pan-down;',\n 'touch-pinch-zoom': 'touch-action:pinch-zoom;',\n 'touch-manipulation': 'touch-action:manipulation;',\n });\n\n // Columns utilities\n Object.assign(utils, {\n 'columns-auto': 'columns:auto;',\n 'columns-1': 'columns:1;',\n 'columns-2': 'columns:2;',\n 'columns-3': 'columns:3;',\n 'columns-4': 'columns:4;',\n 'columns-5': 'columns:5;',\n 'columns-6': 'columns:6;',\n 'columns-7': 'columns:7;',\n 'columns-8': 'columns:8;',\n 'columns-9': 'columns:9;',\n 'columns-10': 'columns:10;',\n 'columns-11': 'columns:11;',\n 'columns-12': 'columns:12;',\n 'columns-3xs': `columns:${0.25 * 64}rem;`,\n 'columns-2xs': `columns:${0.25 * 80}rem;`,\n 'columns-xs': `columns:${0.25 * 96}rem;`,\n 'columns-sm': `columns:${0.25 * 112}rem;`,\n 'columns-md': `columns:${0.25 * 128}rem;`,\n 'columns-lg': `columns:${0.25 * 160}rem;`,\n 'columns-xl': `columns:${0.25 * 192}rem;`,\n 'columns-2xl': `columns:${0.25 * 224}rem;`,\n 'columns-3xl': `columns:${0.25 * 256}rem;`,\n 'columns-4xl': `columns:${0.25 * 280}rem;`,\n 'columns-5xl': `columns:${0.25 * 320}rem;`,\n });\n\n // Divide utilities (sibling selectors using special marker for post-processing)\n // These use > * + * selectors which need special handling in generateRule()\n Object.assign(utils, {\n 'divide-x': 'border-left-width:1px;',\n 'divide-x-0': 'border-left-width:0px;',\n 'divide-x-2': 'border-left-width:2px;',\n 'divide-x-4': 'border-left-width:4px;',\n 'divide-x-8': 'border-left-width:8px;',\n 'divide-y': 'border-top-width:1px;',\n 'divide-y-0': 'border-top-width:0px;',\n 'divide-y-2': 'border-top-width:2px;',\n 'divide-y-4': 'border-top-width:4px;',\n 'divide-y-8': 'border-top-width:8px;',\n 'divide-solid': 'border-style:solid;',\n 'divide-dashed': 'border-style:dashed;',\n 'divide-dotted': 'border-style:dotted;',\n 'divide-double': 'border-style:double;',\n 'divide-none': 'border-style:none;',\n });\n\n // Accessibility, pointer events, visibility, cursors, z-index\n const cursors = [\n 'auto',\n 'default',\n 'pointer',\n 'wait',\n 'text',\n 'move',\n 'help',\n 'not-allowed',\n 'grab',\n 'grabbing',\n ];\n for (const c of cursors) utils[`cursor-${c}`] = `cursor:${c};`;\n for (const z of [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 20, 30, 40, 50])\n utils[`z-${z}`] = `z-index:${z};`;\n utils['z-auto'] = 'z-index:auto;';\n utils['-z-10'] = 'z-index:-10;';\n utils['-z-20'] = 'z-index:-20;';\n utils['-z-30'] = 'z-index:-30;';\n utils['-z-40'] = 'z-index:-40;';\n utils['-z-50'] = 'z-index:-50;';\n Object.assign(utils, {\n 'sr-only':\n 'position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0;',\n 'not-sr-only':\n 'position:static;width:auto;height:auto;padding:0;margin:0;overflow:visible;clip:auto;white-space:normal;',\n 'pointer-events-none': 'pointer-events:none;',\n 'pointer-events-auto': 'pointer-events:auto;',\n visible: 'visibility:visible;',\n invisible: 'visibility:hidden;',\n });\n\n // Size utilities and auto margins\n Object.assign(utils, {\n 'w-full': 'width:100%;',\n 'w-screen': 'width:100dvw;',\n 'h-full': 'height:100%;',\n 'h-screen': 'height:100dvh;',\n 'max-w-full': 'max-width:100%;',\n 'max-h-full': 'max-height:100%;',\n 'max-w-screen': 'max-width:100dvw;',\n 'max-h-screen': 'max-height:100dvh;',\n 'min-w-0': 'min-width:0;',\n 'min-h-0': 'min-height:0;',\n 'min-w-full': 'min-width:100%;',\n 'min-h-full': 'min-height:100%;',\n 'min-w-screen': 'min-width:100dvw;',\n 'min-h-screen': 'min-height:100dvh;',\n 'w-auto': 'width:auto;',\n 'h-auto': 'height:auto;',\n 'w-fit': 'width:fit-content;',\n 'h-fit': 'height:fit-content;',\n 'w-min': 'width:min-content;',\n 'h-min': 'height:min-content;',\n 'w-max': 'width:max-content;',\n 'h-max': 'height:max-content;',\n 'm-auto': 'margin:auto;',\n 'mx-auto': 'margin-inline:auto;',\n 'my-auto': 'margin-block:auto;',\n });\n\n // Semantic sizes\n for (const [key, value] of Object.entries(semanticSizes)) {\n utils[`max-w-${key}`] = `max-width:calc(${spacing} * ${value});`;\n utils[`min-w-${key}`] = `min-width:calc(${spacing} * ${value});`;\n utils[`w-${key}`] = `width:calc(${spacing} * ${value});`;\n utils[`max-h-${key}`] = `max-height:calc(${spacing} * ${value});`;\n utils[`min-h-${key}`] = `min-height:calc(${spacing} * ${value});`;\n utils[`h-${key}`] = `height:calc(${spacing} * ${value});`;\n }\n\n // Transition utilities\n Object.assign(utils, {\n transition:\n 'transition-property:all;transition-duration:150ms;transition-timing-function:ease-in-out;',\n 'transition-none': 'transition-property:none;',\n 'transition-all': 'transition-property:all;',\n 'transition-colors':\n 'transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;',\n 'transition-shadow': 'transition-property:box-shadow;',\n 'transition-opacity': 'transition-property:opacity;',\n 'transition-transform': 'transition-property:transform;',\n 'ease-linear': 'transition-timing-function:linear;',\n 'ease-in': 'transition-timing-function:ease-in;',\n 'ease-out': 'transition-timing-function:ease-out;',\n 'ease-in-out': 'transition-timing-function:ease-in-out;',\n 'duration-75': 'transition-duration:75ms;',\n 'duration-100': 'transition-duration:100ms;',\n 'duration-150': 'transition-duration:150ms;',\n 'duration-200': 'transition-duration:200ms;',\n 'duration-300': 'transition-duration:300ms;',\n 'duration-500': 'transition-duration:500ms;',\n 'duration-700': 'transition-duration:700ms;',\n 'duration-1000': 'transition-duration:1000ms;',\n });\n\n // Transition delay utilities\n Object.assign(utils, {\n 'delay-0': 'transition-delay:0ms;',\n 'delay-75': 'transition-delay:75ms;',\n 'delay-100': 'transition-delay:100ms;',\n 'delay-150': 'transition-delay:150ms;',\n 'delay-200': 'transition-delay:200ms;',\n 'delay-300': 'transition-delay:300ms;',\n 'delay-500': 'transition-delay:500ms;',\n 'delay-700': 'transition-delay:700ms;',\n 'delay-1000': 'transition-delay:1000ms;',\n });\n\n // Transform utilities — CSS-variable–composed so multiple transforms compose\n const TRANSFORM_COMPOSE =\n 'translateX(var(--cer-translate-x)) translateY(var(--cer-translate-y)) rotate(var(--cer-rotate)) skewX(var(--cer-skew-x)) skewY(var(--cer-skew-y)) scaleX(var(--cer-scale-x)) scaleY(var(--cer-scale-y))';\n const tx = (v: string) =>\n `--cer-translate-x:${v};transform:${TRANSFORM_COMPOSE};`;\n const ty = (v: string) =>\n `--cer-translate-y:${v};transform:${TRANSFORM_COMPOSE};`;\n Object.assign(utils, {\n // Scale (uniform)\n 'scale-0': `--cer-scale-x:0;--cer-scale-y:0;transform:${TRANSFORM_COMPOSE};`,\n 'scale-50': `--cer-scale-x:.5;--cer-scale-y:.5;transform:${TRANSFORM_COMPOSE};`,\n 'scale-75': `--cer-scale-x:.75;--cer-scale-y:.75;transform:${TRANSFORM_COMPOSE};`,\n 'scale-90': `--cer-scale-x:.9;--cer-scale-y:.9;transform:${TRANSFORM_COMPOSE};`,\n 'scale-95': `--cer-scale-x:.95;--cer-scale-y:.95;transform:${TRANSFORM_COMPOSE};`,\n 'scale-100': `--cer-scale-x:1;--cer-scale-y:1;transform:${TRANSFORM_COMPOSE};`,\n 'scale-105': `--cer-scale-x:1.05;--cer-scale-y:1.05;transform:${TRANSFORM_COMPOSE};`,\n 'scale-110': `--cer-scale-x:1.1;--cer-scale-y:1.1;transform:${TRANSFORM_COMPOSE};`,\n 'scale-125': `--cer-scale-x:1.25;--cer-scale-y:1.25;transform:${TRANSFORM_COMPOSE};`,\n 'scale-150': `--cer-scale-x:1.5;--cer-scale-y:1.5;transform:${TRANSFORM_COMPOSE};`,\n // Scale X axis only\n 'scale-x-0': `--cer-scale-x:0;transform:${TRANSFORM_COMPOSE};`,\n 'scale-x-50': `--cer-scale-x:.5;transform:${TRANSFORM_COMPOSE};`,\n 'scale-x-75': `--cer-scale-x:.75;transform:${TRANSFORM_COMPOSE};`,\n 'scale-x-90': `--cer-scale-x:.9;transform:${TRANSFORM_COMPOSE};`,\n 'scale-x-95': `--cer-scale-x:.95;transform:${TRANSFORM_COMPOSE};`,\n 'scale-x-100': `--cer-scale-x:1;transform:${TRANSFORM_COMPOSE};`,\n 'scale-x-105': `--cer-scale-x:1.05;transform:${TRANSFORM_COMPOSE};`,\n 'scale-x-110': `--cer-scale-x:1.1;transform:${TRANSFORM_COMPOSE};`,\n 'scale-x-125': `--cer-scale-x:1.25;transform:${TRANSFORM_COMPOSE};`,\n 'scale-x-150': `--cer-scale-x:1.5;transform:${TRANSFORM_COMPOSE};`,\n // Scale Y axis only\n 'scale-y-0': `--cer-scale-y:0;transform:${TRANSFORM_COMPOSE};`,\n 'scale-y-50': `--cer-scale-y:.5;transform:${TRANSFORM_COMPOSE};`,\n 'scale-y-75': `--cer-scale-y:.75;transform:${TRANSFORM_COMPOSE};`,\n 'scale-y-90': `--cer-scale-y:.9;transform:${TRANSFORM_COMPOSE};`,\n 'scale-y-95': `--cer-scale-y:.95;transform:${TRANSFORM_COMPOSE};`,\n 'scale-y-100': `--cer-scale-y:1;transform:${TRANSFORM_COMPOSE};`,\n 'scale-y-105': `--cer-scale-y:1.05;transform:${TRANSFORM_COMPOSE};`,\n 'scale-y-110': `--cer-scale-y:1.1;transform:${TRANSFORM_COMPOSE};`,\n 'scale-y-125': `--cer-scale-y:1.25;transform:${TRANSFORM_COMPOSE};`,\n 'scale-y-150': `--cer-scale-y:1.5;transform:${TRANSFORM_COMPOSE};`,\n // Rotate\n 'rotate-0': `--cer-rotate:0deg;transform:${TRANSFORM_COMPOSE};`,\n 'rotate-1': `--cer-rotate:1deg;transform:${TRANSFORM_COMPOSE};`,\n 'rotate-2': `--cer-rotate:2deg;transform:${TRANSFORM_COMPOSE};`,\n 'rotate-3': `--cer-rotate:3deg;transform:${TRANSFORM_COMPOSE};`,\n 'rotate-6': `--cer-rotate:6deg;transform:${TRANSFORM_COMPOSE};`,\n 'rotate-12': `--cer-rotate:12deg;transform:${TRANSFORM_COMPOSE};`,\n 'rotate-45': `--cer-rotate:45deg;transform:${TRANSFORM_COMPOSE};`,\n 'rotate-90': `--cer-rotate:90deg;transform:${TRANSFORM_COMPOSE};`,\n 'rotate-180': `--cer-rotate:180deg;transform:${TRANSFORM_COMPOSE};`,\n '-rotate-1': `--cer-rotate:-1deg;transform:${TRANSFORM_COMPOSE};`,\n '-rotate-2': `--cer-rotate:-2deg;transform:${TRANSFORM_COMPOSE};`,\n '-rotate-3': `--cer-rotate:-3deg;transform:${TRANSFORM_COMPOSE};`,\n '-rotate-6': `--cer-rotate:-6deg;transform:${TRANSFORM_COMPOSE};`,\n '-rotate-12': `--cer-rotate:-12deg;transform:${TRANSFORM_COMPOSE};`,\n '-rotate-45': `--cer-rotate:-45deg;transform:${TRANSFORM_COMPOSE};`,\n '-rotate-90': `--cer-rotate:-90deg;transform:${TRANSFORM_COMPOSE};`,\n '-rotate-180': `--cer-rotate:-180deg;transform:${TRANSFORM_COMPOSE};`,\n // Translate X\n 'translate-x-0': tx('0px'),\n 'translate-x-px': tx('1px'),\n 'translate-x-0.5': tx('0.125rem'),\n 'translate-x-1': tx('0.25rem'),\n 'translate-x-1.5': tx('0.375rem'),\n 'translate-x-2': tx('0.5rem'),\n 'translate-x-2.5': tx('0.625rem'),\n 'translate-x-3': tx('0.75rem'),\n 'translate-x-4': tx('1rem'),\n 'translate-x-5': tx('1.25rem'),\n 'translate-x-6': tx('1.5rem'),\n 'translate-x-8': tx('2rem'),\n 'translate-x-10': tx('2.5rem'),\n 'translate-x-12': tx('3rem'),\n 'translate-x-16': tx('4rem'),\n 'translate-x-20': tx('5rem'),\n 'translate-x-24': tx('6rem'),\n 'translate-x-32': tx('8rem'),\n 'translate-x-1/2': tx('50%'),\n 'translate-x-1/3': tx('33.333333%'),\n 'translate-x-2/3': tx('66.666667%'),\n 'translate-x-1/4': tx('25%'),\n 'translate-x-3/4': tx('75%'),\n 'translate-x-full': tx('100%'),\n '-translate-x-px': tx('-1px'),\n '-translate-x-0.5': tx('-0.125rem'),\n '-translate-x-1': tx('-0.25rem'),\n '-translate-x-1.5': tx('-0.375rem'),\n '-translate-x-2': tx('-0.5rem'),\n '-translate-x-2.5': tx('-0.625rem'),\n '-translate-x-3': tx('-0.75rem'),\n '-translate-x-4': tx('-1rem'),\n '-translate-x-1/2': tx('-50%'),\n '-translate-x-full': tx('-100%'),\n // Translate Y\n 'translate-y-0': ty('0px'),\n 'translate-y-px': ty('1px'),\n 'translate-y-0.5': ty('0.125rem'),\n 'translate-y-1': ty('0.25rem'),\n 'translate-y-1.5': ty('0.375rem'),\n 'translate-y-2': ty('0.5rem'),\n 'translate-y-2.5': ty('0.625rem'),\n 'translate-y-3': ty('0.75rem'),\n 'translate-y-4': ty('1rem'),\n 'translate-y-5': ty('1.25rem'),\n 'translate-y-6': ty('1.5rem'),\n 'translate-y-8': ty('2rem'),\n 'translate-y-10': ty('2.5rem'),\n 'translate-y-12': ty('3rem'),\n 'translate-y-16': ty('4rem'),\n 'translate-y-20': ty('5rem'),\n 'translate-y-24': ty('6rem'),\n 'translate-y-32': ty('8rem'),\n 'translate-y-1/2': ty('50%'),\n 'translate-y-full': ty('100%'),\n '-translate-y-px': ty('-1px'),\n '-translate-y-0.5': ty('-0.125rem'),\n '-translate-y-1': ty('-0.25rem'),\n '-translate-y-2': ty('-0.5rem'),\n '-translate-y-4': ty('-1rem'),\n '-translate-y-1/2': ty('-50%'),\n '-translate-y-full': ty('-100%'),\n // Skew X\n 'skew-x-0': `--cer-skew-x:0deg;transform:${TRANSFORM_COMPOSE};`,\n 'skew-x-1': `--cer-skew-x:1deg;transform:${TRANSFORM_COMPOSE};`,\n 'skew-x-2': `--cer-skew-x:2deg;transform:${TRANSFORM_COMPOSE};`,\n 'skew-x-3': `--cer-skew-x:3deg;transform:${TRANSFORM_COMPOSE};`,\n 'skew-x-6': `--cer-skew-x:6deg;transform:${TRANSFORM_COMPOSE};`,\n 'skew-x-12': `--cer-skew-x:12deg;transform:${TRANSFORM_COMPOSE};`,\n '-skew-x-1': `--cer-skew-x:-1deg;transform:${TRANSFORM_COMPOSE};`,\n '-skew-x-2': `--cer-skew-x:-2deg;transform:${TRANSFORM_COMPOSE};`,\n '-skew-x-3': `--cer-skew-x:-3deg;transform:${TRANSFORM_COMPOSE};`,\n '-skew-x-6': `--cer-skew-x:-6deg;transform:${TRANSFORM_COMPOSE};`,\n '-skew-x-12': `--cer-skew-x:-12deg;transform:${TRANSFORM_COMPOSE};`,\n // Skew Y\n 'skew-y-0': `--cer-skew-y:0deg;transform:${TRANSFORM_COMPOSE};`,\n 'skew-y-1': `--cer-skew-y:1deg;transform:${TRANSFORM_COMPOSE};`,\n 'skew-y-2': `--cer-skew-y:2deg;transform:${TRANSFORM_COMPOSE};`,\n 'skew-y-3': `--cer-skew-y:3deg;transform:${TRANSFORM_COMPOSE};`,\n 'skew-y-6': `--cer-skew-y:6deg;transform:${TRANSFORM_COMPOSE};`,\n 'skew-y-12': `--cer-skew-y:12deg;transform:${TRANSFORM_COMPOSE};`,\n '-skew-y-1': `--cer-skew-y:-1deg;transform:${TRANSFORM_COMPOSE};`,\n '-skew-y-2': `--cer-skew-y:-2deg;transform:${TRANSFORM_COMPOSE};`,\n '-skew-y-3': `--cer-skew-y:-3deg;transform:${TRANSFORM_COMPOSE};`,\n '-skew-y-6': `--cer-skew-y:-6deg;transform:${TRANSFORM_COMPOSE};`,\n '-skew-y-12': `--cer-skew-y:-12deg;transform:${TRANSFORM_COMPOSE};`,\n });\n\n // Ring utilities — drawn via box-shadow, color set via --cer-ring-color\n Object.assign(utils, {\n ring: `box-shadow:0 0 0 3px var(--cer-ring-color,rgb(59 130 246/0.5));`,\n 'ring-0': `box-shadow:0 0 0 0px var(--cer-ring-color,rgb(59 130 246/0.5));`,\n 'ring-1': `box-shadow:0 0 0 1px var(--cer-ring-color,rgb(59 130 246/0.5));`,\n 'ring-2': `box-shadow:0 0 0 2px var(--cer-ring-color,rgb(59 130 246/0.5));`,\n 'ring-4': `box-shadow:0 0 0 4px var(--cer-ring-color,rgb(59 130 246/0.5));`,\n 'ring-8': `box-shadow:0 0 0 8px var(--cer-ring-color,rgb(59 130 246/0.5));`,\n 'ring-inset': `box-shadow:inset 0 0 0 3px var(--cer-ring-color,rgb(59 130 246/0.5));`,\n 'ring-offset-0': `--cer-ring-offset-width:0px;box-shadow:0 0 0 0px var(--cer-ring-offset-color,#fff),0 0 0 3px var(--cer-ring-color,rgb(59 130 246/0.5));`,\n 'ring-offset-1': `--cer-ring-offset-width:1px;box-shadow:0 0 0 1px var(--cer-ring-offset-color,#fff),0 0 0 calc(3px + 1px) var(--cer-ring-color,rgb(59 130 246/0.5));`,\n 'ring-offset-2': `--cer-ring-offset-width:2px;box-shadow:0 0 0 2px var(--cer-ring-offset-color,#fff),0 0 0 calc(3px + 2px) var(--cer-ring-color,rgb(59 130 246/0.5));`,\n 'ring-offset-4': `--cer-ring-offset-width:4px;box-shadow:0 0 0 4px var(--cer-ring-offset-color,#fff),0 0 0 calc(3px + 4px) var(--cer-ring-color,rgb(59 130 246/0.5));`,\n 'ring-offset-8': `--cer-ring-offset-width:8px;box-shadow:0 0 0 8px var(--cer-ring-offset-color,#fff),0 0 0 calc(3px + 8px) var(--cer-ring-color,rgb(59 130 246/0.5));`,\n });\n\n // Filter utilities — CSS-variable–composed\n const FILTER_COMPOSE =\n 'var(--cer-blur) var(--cer-brightness) var(--cer-contrast) var(--cer-grayscale) var(--cer-hue-rotate) var(--cer-invert) var(--cer-saturate) var(--cer-sepia) var(--cer-drop-shadow)';\n const BACKDROP_FILTER_COMPOSE =\n 'var(--cer-backdrop-blur) var(--cer-backdrop-brightness) var(--cer-backdrop-contrast) var(--cer-backdrop-grayscale) var(--cer-backdrop-hue-rotate) var(--cer-backdrop-invert) var(--cer-backdrop-saturate) var(--cer-backdrop-sepia)';\n Object.assign(utils, {\n // Blur\n 'blur-none': `--cer-blur:;filter:${FILTER_COMPOSE};`,\n 'blur-sm': `--cer-blur:blur(4px);filter:${FILTER_COMPOSE};`,\n blur: `--cer-blur:blur(8px);filter:${FILTER_COMPOSE};`,\n 'blur-md': `--cer-blur:blur(12px);filter:${FILTER_COMPOSE};`,\n 'blur-lg': `--cer-blur:blur(16px);filter:${FILTER_COMPOSE};`,\n 'blur-xl': `--cer-blur:blur(24px);filter:${FILTER_COMPOSE};`,\n 'blur-2xl': `--cer-blur:blur(40px);filter:${FILTER_COMPOSE};`,\n 'blur-3xl': `--cer-blur:blur(64px);filter:${FILTER_COMPOSE};`,\n // Brightness\n 'brightness-0': `--cer-brightness:brightness(0);filter:${FILTER_COMPOSE};`,\n 'brightness-50': `--cer-brightness:brightness(.5);filter:${FILTER_COMPOSE};`,\n 'brightness-75': `--cer-brightness:brightness(.75);filter:${FILTER_COMPOSE};`,\n 'brightness-90': `--cer-brightness:brightness(.9);filter:${FILTER_COMPOSE};`,\n 'brightness-95': `--cer-brightness:brightness(.95);filter:${FILTER_COMPOSE};`,\n 'brightness-100': `--cer-brightness:brightness(1);filter:${FILTER_COMPOSE};`,\n 'brightness-105': `--cer-brightness:brightness(1.05);filter:${FILTER_COMPOSE};`,\n 'brightness-110': `--cer-brightness:brightness(1.1);filter:${FILTER_COMPOSE};`,\n 'brightness-125': `--cer-brightness:brightness(1.25);filter:${FILTER_COMPOSE};`,\n 'brightness-150': `--cer-brightness:brightness(1.5);filter:${FILTER_COMPOSE};`,\n 'brightness-200': `--cer-brightness:brightness(2);filter:${FILTER_COMPOSE};`,\n // Contrast\n 'contrast-0': `--cer-contrast:contrast(0);filter:${FILTER_COMPOSE};`,\n 'contrast-50': `--cer-contrast:contrast(.5);filter:${FILTER_COMPOSE};`,\n 'contrast-75': `--cer-contrast:contrast(.75);filter:${FILTER_COMPOSE};`,\n 'contrast-100': `--cer-contrast:contrast(1);filter:${FILTER_COMPOSE};`,\n 'contrast-125': `--cer-contrast:contrast(1.25);filter:${FILTER_COMPOSE};`,\n 'contrast-150': `--cer-contrast:contrast(1.5);filter:${FILTER_COMPOSE};`,\n 'contrast-200': `--cer-contrast:contrast(2);filter:${FILTER_COMPOSE};`,\n // Grayscale\n grayscale: `--cer-grayscale:grayscale(100%);filter:${FILTER_COMPOSE};`,\n 'grayscale-0': `--cer-grayscale:grayscale(0);filter:${FILTER_COMPOSE};`,\n // Hue rotate\n 'hue-rotate-0': `--cer-hue-rotate:hue-rotate(0deg);filter:${FILTER_COMPOSE};`,\n 'hue-rotate-15': `--cer-hue-rotate:hue-rotate(15deg);filter:${FILTER_COMPOSE};`,\n 'hue-rotate-30': `--cer-hue-rotate:hue-rotate(30deg);filter:${FILTER_COMPOSE};`,\n 'hue-rotate-60': `--cer-hue-rotate:hue-rotate(60deg);filter:${FILTER_COMPOSE};`,\n 'hue-rotate-90': `--cer-hue-rotate:hue-rotate(90deg);filter:${FILTER_COMPOSE};`,\n 'hue-rotate-180': `--cer-hue-rotate:hue-rotate(180deg);filter:${FILTER_COMPOSE};`,\n '-hue-rotate-180': `--cer-hue-rotate:hue-rotate(-180deg);filter:${FILTER_COMPOSE};`,\n '-hue-rotate-90': `--cer-hue-rotate:hue-rotate(-90deg);filter:${FILTER_COMPOSE};`,\n '-hue-rotate-60': `--cer-hue-rotate:hue-rotate(-60deg);filter:${FILTER_COMPOSE};`,\n '-hue-rotate-30': `--cer-hue-rotate:hue-rotate(-30deg);filter:${FILTER_COMPOSE};`,\n '-hue-rotate-15': `--cer-hue-rotate:hue-rotate(-15deg);filter:${FILTER_COMPOSE};`,\n // Invert\n invert: `--cer-invert:invert(100%);filter:${FILTER_COMPOSE};`,\n 'invert-0': `--cer-invert:invert(0);filter:${FILTER_COMPOSE};`,\n // Saturate\n 'saturate-0': `--cer-saturate:saturate(0);filter:${FILTER_COMPOSE};`,\n 'saturate-50': `--cer-saturate:saturate(.5);filter:${FILTER_COMPOSE};`,\n 'saturate-100': `--cer-saturate:saturate(1);filter:${FILTER_COMPOSE};`,\n 'saturate-150': `--cer-saturate:saturate(1.5);filter:${FILTER_COMPOSE};`,\n 'saturate-200': `--cer-saturate:saturate(2);filter:${FILTER_COMPOSE};`,\n // Sepia\n sepia: `--cer-sepia:sepia(100%);filter:${FILTER_COMPOSE};`,\n 'sepia-0': `--cer-sepia:sepia(0);filter:${FILTER_COMPOSE};`,\n // Drop shadow (filter, not box-shadow)\n 'drop-shadow-sm': `--cer-drop-shadow:drop-shadow(0 1px 1px rgb(0 0 0/.05));filter:${FILTER_COMPOSE};`,\n 'drop-shadow': `--cer-drop-shadow:drop-shadow(0 1px 2px rgb(0 0 0/.1)) drop-shadow(0 1px 1px rgb(0 0 0/.06));filter:${FILTER_COMPOSE};`,\n 'drop-shadow-md': `--cer-drop-shadow:drop-shadow(0 4px 3px rgb(0 0 0/.07)) drop-shadow(0 2px 2px rgb(0 0 0/.06));filter:${FILTER_COMPOSE};`,\n 'drop-shadow-lg': `--cer-drop-shadow:drop-shadow(0 10px 8px rgb(0 0 0/.04)) drop-shadow(0 4px 3px rgb(0 0 0/.1));filter:${FILTER_COMPOSE};`,\n 'drop-shadow-xl': `--cer-drop-shadow:drop-shadow(0 20px 13px rgb(0 0 0/.03)) drop-shadow(0 8px 5px rgb(0 0 0/.08));filter:${FILTER_COMPOSE};`,\n 'drop-shadow-2xl': `--cer-drop-shadow:drop-shadow(0 25px 25px rgb(0 0 0/.15));filter:${FILTER_COMPOSE};`,\n 'drop-shadow-none': `--cer-drop-shadow:drop-shadow(0 0 #0000);filter:${FILTER_COMPOSE};`,\n // Backdrop blur\n 'backdrop-blur-none': `--cer-backdrop-blur:;backdrop-filter:${BACKDROP_FILTER_COMPOSE};-webkit-backdrop-filter:${BACKDROP_FILTER_COMPOSE};`,\n 'backdrop-blur-sm': `--cer-backdrop-blur:blur(4px);backdrop-filter:${BACKDROP_FILTER_COMPOSE};-webkit-backdrop-filter:${BACKDROP_FILTER_COMPOSE};`,\n 'backdrop-blur': `--cer-backdrop-blur:blur(8px);backdrop-filter:${BACKDROP_FILTER_COMPOSE};-webkit-backdrop-filter:${BACKDROP_FILTER_COMPOSE};`,\n 'backdrop-blur-md': `--cer-backdrop-blur:blur(12px);backdrop-filter:${BACKDROP_FILTER_COMPOSE};-webkit-backdrop-filter:${BACKDROP_FILTER_COMPOSE};`,\n 'backdrop-blur-lg': `--cer-backdrop-blur:blur(16px);backdrop-filter:${BACKDROP_FILTER_COMPOSE};-webkit-backdrop-filter:${BACKDROP_FILTER_COMPOSE};`,\n 'backdrop-blur-xl': `--cer-backdrop-blur:blur(24px);backdrop-filter:${BACKDROP_FILTER_COMPOSE};-webkit-backdrop-filter:${BACKDROP_FILTER_COMPOSE};`,\n 'backdrop-blur-2xl': `--cer-backdrop-blur:blur(40px);backdrop-filter:${BACKDROP_FILTER_COMPOSE};-webkit-backdrop-filter:${BACKDROP_FILTER_COMPOSE};`,\n 'backdrop-blur-3xl': `--cer-backdrop-blur:blur(64px);backdrop-filter:${BACKDROP_FILTER_COMPOSE};-webkit-backdrop-filter:${BACKDROP_FILTER_COMPOSE};`,\n });\n\n // Aspect ratio utilities\n Object.assign(utils, {\n 'aspect-auto': 'aspect-ratio:auto;',\n 'aspect-square': 'aspect-ratio:1 / 1;',\n 'aspect-video': 'aspect-ratio:16 / 9;',\n });\n\n // Object utilities\n Object.assign(utils, {\n 'object-contain': 'object-fit:contain;',\n 'object-cover': 'object-fit:cover;',\n 'object-fill': 'object-fit:fill;',\n 'object-none': 'object-fit:none;',\n 'object-scale-down': 'object-fit:scale-down;',\n 'object-bottom': 'object-position:bottom;',\n 'object-center': 'object-position:center;',\n 'object-left': 'object-position:left;',\n 'object-left-bottom': 'object-position:left bottom;',\n 'object-left-top': 'object-position:left top;',\n 'object-right': 'object-position:right;',\n 'object-right-bottom': 'object-position:right bottom;',\n 'object-right-top': 'object-position:right top;',\n 'object-top': 'object-position:top;',\n });\n\n // Line clamp utilities\n for (let i = 1; i <= 6; i++) {\n utils[`line-clamp-${i}`] =\n `display:-webkit-box;-webkit-line-clamp:${i};-webkit-box-orient:vertical;overflow:hidden;`;\n }\n utils['line-clamp-none'] =\n 'overflow:visible;display:block;-webkit-box-orient:horizontal;-webkit-line-clamp:none;';\n\n // Order utilities for flexbox\n for (let i = 1; i <= 12; i++) {\n utils[`order-${i}`] = `order:${i};`;\n }\n utils['order-first'] = 'order:-9999;';\n utils['order-last'] = 'order:9999;';\n utils['order-none'] = 'order:0;';\n\n // Additional flex grow/shrink utilities\n for (let i = 0; i <= 12; i++) {\n if (i <= 1) continue; // Already handled above\n utils[`grow-${i}`] = `flex-grow:${i};`;\n utils[`shrink-${i}`] = `flex-shrink:${i};`;\n }\n\n // Gradient background utilities\n Object.assign(utils, {\n // Linear gradients\n 'bg-linear-to-t':\n 'background-image:linear-gradient(to top, var(--cer-gradient-stops));',\n 'bg-linear-to-tr':\n 'background-image:linear-gradient(to top right, var(--cer-gradient-stops));',\n 'bg-linear-to-r':\n 'background-image:linear-gradient(to right, var(--cer-gradient-stops));',\n 'bg-linear-to-br':\n 'background-image:linear-gradient(to bottom right, var(--cer-gradient-stops));',\n 'bg-linear-to-b':\n 'background-image:linear-gradient(to bottom, var(--cer-gradient-stops));',\n 'bg-linear-to-bl':\n 'background-image:linear-gradient(to bottom left, var(--cer-gradient-stops));',\n 'bg-linear-to-l':\n 'background-image:linear-gradient(to left, var(--cer-gradient-stops));',\n 'bg-linear-to-tl':\n 'background-image:linear-gradient(to top left, var(--cer-gradient-stops));',\n\n // Radial gradients\n 'bg-radial':\n 'background-image:radial-gradient(ellipse at center, var(--cer-gradient-stops));',\n 'bg-radial-at-t':\n 'background-image:radial-gradient(ellipse at top, var(--cer-gradient-stops));',\n 'bg-radial-at-tr':\n 'background-image:radial-gradient(ellipse at top right, var(--cer-gradient-stops));',\n 'bg-radial-at-r':\n 'background-image:radial-gradient(ellipse at right, var(--cer-gradient-stops));',\n 'bg-radial-at-br':\n 'background-image:radial-gradient(ellipse at bottom right, var(--cer-gradient-stops));',\n 'bg-radial-at-b':\n 'background-image:radial-gradient(ellipse at bottom, var(--cer-gradient-stops));',\n 'bg-radial-at-bl':\n 'background-image:radial-gradient(ellipse at bottom left, var(--cer-gradient-stops));',\n 'bg-radial-at-l':\n 'background-image:radial-gradient(ellipse at left, var(--cer-gradient-stops));',\n 'bg-radial-at-tl':\n 'background-image:radial-gradient(ellipse at top left, var(--cer-gradient-stops));',\n 'bg-radial-circle':\n 'background-image:radial-gradient(circle at center, var(--cer-gradient-stops));',\n 'bg-radial-circle-at-t':\n 'background-image:radial-gradient(circle at top, var(--cer-gradient-stops));',\n 'bg-radial-circle-at-tr':\n 'background-image:radial-gradient(circle at top right, var(--cer-gradient-stops));',\n 'bg-radial-circle-at-r':\n 'background-image:radial-gradient(circle at right, var(--cer-gradient-stops));',\n 'bg-radial-circle-at-br':\n 'background-image:radial-gradient(circle at bottom right, var(--cer-gradient-stops));',\n 'bg-radial-circle-at-b':\n 'background-image:radial-gradient(circle at bottom, var(--cer-gradient-stops));',\n 'bg-radial-circle-at-bl':\n 'background-image:radial-gradient(circle at bottom left, var(--cer-gradient-stops));',\n 'bg-radial-circle-at-l':\n 'background-image:radial-gradient(circle at left, var(--cer-gradient-stops));',\n 'bg-radial-circle-at-tl':\n 'background-image:radial-gradient(circle at top left, var(--cer-gradient-stops));',\n\n // Conic gradients\n 'bg-conic':\n 'background-image:conic-gradient(from 0deg at center, var(--cer-gradient-stops));',\n 'bg-conic-at-t':\n 'background-image:conic-gradient(from 0deg at top, var(--cer-gradient-stops));',\n 'bg-conic-at-tr':\n 'background-image:conic-gradient(from 0deg at top right, var(--cer-gradient-stops));',\n 'bg-conic-at-r':\n 'background-image:conic-gradient(from 0deg at right, var(--cer-gradient-stops));',\n 'bg-conic-at-br':\n 'background-image:conic-gradient(from 0deg at bottom right, var(--cer-gradient-stops));',\n 'bg-conic-at-b':\n 'background-image:conic-gradient(from 0deg at bottom, var(--cer-gradient-stops));',\n 'bg-conic-at-bl':\n 'background-image:conic-gradient(from 0deg at bottom left, var(--cer-gradient-stops));',\n 'bg-conic-at-l':\n 'background-image:conic-gradient(from 0deg at left, var(--cer-gradient-stops));',\n 'bg-conic-at-tl':\n 'background-image:conic-gradient(from 0deg at top left, var(--cer-gradient-stops));',\n });\n\n // Prose utilities\n Object.assign(utils, {\n // prose-invert: dark mode color inversion\n 'prose-invert': `\n --cer-prose-body:var(--cer-color-neutral-200);\n --cer-prose-headings:var(--cer-color-neutral-50);\n --cer-prose-lead:var(--cer-color-neutral-300);\n --cer-prose-bold:var(--cer-color-neutral-50);\n --cer-prose-quotes:var(--cer-color-neutral-300);\n --cer-prose-quote-border:var(--cer-color-neutral-700);\n --cer-prose-code:var(--cer-color-neutral-200);\n --cer-prose-code-bg:var(--cer-color-neutral-900);\n --cer-prose-pre-code:var(--cer-color-neutral-200);\n --cer-prose-pre-bg:var(--cer-color-neutral-900);\n --cer-prose-pre-border:var(--cer-color-neutral-800);\n --cer-prose-hr:var(--cer-color-neutral-700);\n --cer-prose-caps:var(--cer-color-neutral-400);\n --cer-prose-list-marker:var(--cer-color-neutral-400);\n --cer-prose-list-marker-strong:var(--cer-color-neutral-300);\n --cer-prose-counters:var(--cer-color-neutral-300);\n --cer-prose-bullets:var(--cer-color-neutral-300);\n --cer-prose-img-caption:var(--cer-color-neutral-400);\n --cer-prose-table-border:var(--cer-color-neutral-700);\n --cer-prose-table-head:var(--cer-color-neutral-200);\n --cer-prose-links:var(--cer-prose-invert-links,var(--cer-color-neutral-300));\n --cer-prose-links-hover:var(--cer-prose-invert-links-hover,var(--cer-color-neutral-100));\n `.replace(/\\s+/g, ''),\n\n // prose-primary: primary color scheme (sets invert variables)\n 'prose-primary': `\n --cer-prose-links:var(--cer-color-primary-700);\n --cer-prose-links-hover:var(--cer-color-primary-500);\n --cer-prose-invert-links:var(--cer-color-primary-300);\n --cer-prose-invert-links-hover:var(--cer-color-primary-100);\n `.replace(/\\s+/g, ''),\n\n // prose-secondary: secondary color scheme (sets invert variables)\n 'prose-secondary': `\n --cer-prose-links:var(--cer-color-secondary-700);\n --cer-prose-links-hover:var(--cer-color-secondary-500);\n --cer-prose-invert-links:var(--cer-color-secondary-300);\n --cer-prose-invert-links-hover:var(--cer-color-secondary-100);\n `.replace(/\\s+/g, ''),\n\n // prose-success: success color scheme (sets invert variables)\n 'prose-success': `\n --cer-prose-links:var(--cer-color-success-700);\n --cer-prose-links-hover:var(--cer-color-success-500);\n --cer-prose-invert-links:var(--cer-color-success-300);\n --cer-prose-invert-links-hover:var(--cer-color-success-100);\n `.replace(/\\s+/g, ''),\n\n // prose-warning: warning color scheme (sets invert variables)\n 'prose-warning': `\n --cer-prose-links:var(--cer-color-warning-700);\n --cer-prose-links-hover:var(--cer-color-warning-500);\n --cer-prose-invert-links:var(--cer-color-warning-300);\n --cer-prose-invert-links-hover:var(--cer-color-warning-100);\n `.replace(/\\s+/g, ''),\n\n // prose-error: error color scheme (sets invert variables)\n 'prose-error': `\n --cer-prose-links:var(--cer-color-error-700);\n --cer-prose-links-hover:var(--cer-color-error-500);\n --cer-prose-invert-links:var(--cer-color-error-300);\n --cer-prose-invert-links-hover:var(--cer-color-error-100);\n `.replace(/\\s+/g, ''),\n\n // prose-info: info color scheme (sets invert variables)\n 'prose-info': `\n --cer-prose-links:var(--cer-color-info-700);\n --cer-prose-links-hover:var(--cer-color-info-500);\n --cer-prose-invert-links:var(--cer-color-info-300);\n --cer-prose-invert-links-hover:var(--cer-color-info-100);\n `.replace(/\\s+/g, ''),\n });\n\n return utils;\n};\n\n// Generate static utilities once\nexport const utilityMap: CSSMap = generateUtilities();\n\n/**\n * Parse prose base classes (prose, prose-sm, prose-lg, prose-xl, prose-2xl)\n * Registers prose sizes for the singleton prose stylesheet instead of returning CSS\n */\nexport function parseProseClass(className: string): string | null {\n // Quick pattern check before calling prose module\n if (!/^prose(?:-(sm|lg|xl|2xl))?$/.test(className)) return null;\n\n // Register this prose size with the singleton sheet\n registerProseSize(className);\n\n // Return empty string to indicate prose was detected but CSS will come from shared sheet\n return '';\n}\n\n/**\n * Parse prose element modifiers like prose-a:text-primary-600\n * Uses separate prose module for treeshaking\n */\nexport function parseProseElementModifier(className: string): string | null {\n // Quick pattern check before calling prose module\n if (!/^prose-([a-z0-9]+):(.+)$/.test(className)) {\n return null;\n }\n\n // Call imported function - tree-shaken if never called\n return generateProseElementModifier(\n className,\n utilityMap,\n parseSpacing,\n parseSpaceUtility,\n parseOpacity,\n parseColorWithOpacity,\n parseGradientColorStop,\n parseArbitrary,\n );\n}\n\n// Optimized parsing functions with better performance\nfunction insertPseudoBeforeCombinator(sel: string, pseudo: string): string {\n let depth = 0;\n for (let i = 0; i < sel.length; i++) {\n const ch = sel[i];\n if (ch === '[' || ch === '(') depth++;\n else if ((ch === ']' || ch === ')') && depth > 0) depth--;\n else if (\n depth === 0 &&\n (ch === '>' || ch === '+' || ch === '~' || ch === ' ')\n ) {\n return sel.slice(0, i) + pseudo + sel.slice(i);\n }\n }\n return sel + pseudo;\n}\n\nexport const selectorVariants: SelectorVariantMap = {\n before: (sel, body) => `${sel}::before{${body}}`,\n after: (sel, body) => `${sel}::after{${body}}`,\n hover: (sel, body) =>\n `${insertPseudoBeforeCombinator(sel, ':hover')}{${body}}`,\n focus: (sel, body) =>\n `${insertPseudoBeforeCombinator(sel, ':focus')}{${body}}`,\n active: (sel, body) =>\n `${insertPseudoBeforeCombinator(sel, ':active')}{${body}}`,\n disabled: (sel, body) =>\n `${insertPseudoBeforeCombinator(sel, ':disabled')}{${body}}`,\n visited: (sel, body) =>\n `${insertPseudoBeforeCombinator(sel, ':visited')}{${body}}`,\n checked: (sel, body) =>\n `${insertPseudoBeforeCombinator(sel, ':checked')}{${body}}`,\n first: (sel, body) =>\n `${insertPseudoBeforeCombinator(sel, ':first-child')}{${body}}`,\n last: (sel, body) =>\n `${insertPseudoBeforeCombinator(sel, ':last-child')}{${body}}`,\n odd: (sel, body) =>\n `${insertPseudoBeforeCombinator(sel, ':nth-child(odd)')}{${body}}`,\n even: (sel, body) =>\n `${insertPseudoBeforeCombinator(sel, ':nth-child(even)')}{${body}}`,\n 'focus-within': (sel, body) =>\n `${insertPseudoBeforeCombinator(sel, ':focus-within')}{${body}}`,\n 'focus-visible': (sel, body) =>\n `${insertPseudoBeforeCombinator(sel, ':focus-visible')}{${body}}`,\n 'group-hover': (sel, body) => `.group:hover ${sel}{${body}}`,\n 'group-focus': (sel, body) => `.group:focus ${sel}{${body}}`,\n 'group-active': (sel, body) => `.group:active ${sel}{${body}}`,\n 'group-disabled': (sel, body) => `.group:disabled ${sel}{${body}}`,\n 'peer-hover': (sel, body) => `.peer:hover ~ ${sel}{${body}}`,\n 'peer-focus': (sel, body) => `.peer:focus ~ ${sel}{${body}}`,\n 'peer-checked': (sel, body) => `.peer:checked ~ ${sel}{${body}}`,\n 'peer-disabled': (sel, body) => `.peer:disabled ~ ${sel}{${body}}`,\n 'dark-class': (sel, body) => `:host(.dark) ${sel}{${body}}`,\n rtl: (sel, body) => `[dir=rtl] ${sel}{${body}}`,\n ltr: (sel, body) => `[dir=ltr] ${sel}{${body}}`,\n // Pseudo-element variants\n placeholder: (sel, body) => `${sel}::placeholder{${body}}`,\n file: (sel, body) => `${sel}::file-selector-button{${body}}`,\n marker: (sel, body) => `${sel}::marker{${body}}`,\n selection: (sel, body) => `${sel}::selection{${body}}`,\n // State variants\n open: (sel, body) =>\n `${insertPseudoBeforeCombinator(sel, '[open]')}{${body}}`,\n};\n\nexport const mediaVariants: MediaVariantMap = {\n sm: '(min-width:640px)',\n md: '(min-width:768px)',\n lg: '(min-width:1024px)',\n xl: '(min-width:1280px)',\n '2xl': '(min-width:1536px)',\n dark: '(prefers-color-scheme: dark)',\n 'motion-reduce': '(prefers-reduced-motion: reduce)',\n 'motion-safe': '(prefers-reduced-motion: no-preference)',\n print: 'print',\n 'forced-colors': '(forced-colors: active)',\n};\n\nexport const containerVariants: MediaVariantMap = {\n xs: '(min-width:20rem)',\n sm: '(min-width:24rem)',\n md: '(min-width:28rem)',\n lg: '(min-width:32rem)',\n xl: '(min-width:36rem)',\n '2xl': '(min-width:42rem)',\n '3xl': '(min-width:48rem)',\n '4xl': '(min-width:56rem)',\n '5xl': '(min-width:64rem)',\n '6xl': '(min-width:72rem)',\n '7xl': '(min-width:80rem)',\n};\n\nexport const responsiveOrder = [\n 'sm',\n 'md',\n 'lg',\n 'xl',\n '2xl',\n 'motion-reduce',\n 'motion-safe',\n 'print',\n 'forced-colors',\n];\nexport const containerOrder = [\n 'xs',\n 'sm',\n 'md',\n 'lg',\n 'xl',\n '2xl',\n '3xl',\n '4xl',\n '5xl',\n '6xl',\n '7xl',\n];\n\n// Optimized parsing functions\nexport function parseSpacing(className: string): string | null {\n const negative = className.startsWith('-');\n const raw = negative ? className.slice(1) : className;\n const lastDashIndex = raw.lastIndexOf('-');\n\n if (lastDashIndex === -1) return null;\n\n const key = raw.slice(0, lastDashIndex);\n const valueStr = raw.slice(lastDashIndex + 1);\n\n if (!spacingProps[key]) return null;\n\n // Handle fractions (e.g., w-1/2, h-2/3)\n if (valueStr.includes('/')) {\n const [numerator, denominator] = valueStr\n .split('/')\n .map((v) => parseFloat(v));\n if (\n Number.isNaN(numerator) ||\n Number.isNaN(denominator) ||\n denominator === 0\n ) {\n return null;\n }\n const percentage = (numerator / denominator) * 100;\n return spacingProps[key].map((prop) => `${prop}:${percentage}%;`).join('');\n }\n\n // Handle numeric values\n const num = parseFloat(valueStr);\n if (Number.isNaN(num)) return null;\n\n const sign = negative ? '-' : '';\n return spacingProps[key]\n .map((prop) => `${prop}:calc(${sign}${spacing} * ${num});`)\n .join('');\n}\n\nexport function parseSpaceUtility(className: string): string | null {\n const negative = className.startsWith('-');\n const raw = negative ? className.slice(1) : className;\n\n // Match space-x-{value} or space-y-{value}\n const match = raw.match(/^space-(x|y)-(.+)$/);\n if (!match) return null;\n\n const [, direction, valueStr] = match;\n const isHorizontal = direction === 'x';\n\n // Handle \"reverse\" modifier\n if (valueStr === 'reverse') {\n return isHorizontal\n ? '--cer-space-x-reverse:1;'\n : '--cer-space-y-reverse:1;';\n }\n\n // Handle fractions (e.g., space-x-1/2)\n if (valueStr.includes('/')) {\n const [numerator, denominator] = valueStr\n .split('/')\n .map((v) => parseFloat(v));\n if (\n Number.isNaN(numerator) ||\n Number.isNaN(denominator) ||\n denominator === 0\n ) {\n return null;\n }\n const percentage = (numerator / denominator) * 100;\n const sign = negative ? '-' : '';\n\n if (isHorizontal) {\n return `--cer-space-x-reverse:0;& > :not([hidden]) ~ :not([hidden]){margin-inline-start:calc(${sign}${percentage}% * calc(1 - var(--cer-space-x-reverse)));margin-inline-end:calc(${sign}${percentage}% * var(--cer-space-x-reverse));}`;\n } else {\n return `--cer-space-y-reverse:0;& > :not([hidden]) ~ :not([hidden]){margin-top:calc(${sign}${percentage}% * calc(1 - var(--cer-space-y-reverse)));margin-bottom:calc(${sign}${percentage}% * var(--cer-space-y-reverse));}`;\n }\n }\n\n // Handle numeric values\n const num = parseFloat(valueStr);\n if (Number.isNaN(num)) return null;\n\n const sign = negative ? '-' : '';\n const value = `calc(${sign}${spacing} * ${num})`;\n\n if (isHorizontal) {\n return `--cer-space-x-reverse:0;& > :not([hidden]) ~ :not([hidden]){margin-inline-start:calc(${value} * calc(1 - var(--cer-space-x-reverse)));margin-inline-end:calc(${value} * var(--cer-space-x-reverse));}`;\n } else {\n return `--cer-space-y-reverse:0;& > :not([hidden]) ~ :not([hidden]){margin-top:calc(${value} * calc(1 - var(--cer-space-y-reverse)));margin-bottom:calc(${value} * var(--cer-space-y-reverse));}`;\n }\n}\n\nexport function hexToRgb(hex: string): string {\n let clean = hex.replace('#', '');\n // Support 3-digit shorthand like #09f -> #0099ff\n if (clean.length === 3) {\n clean = clean\n .split('')\n .map((c) => c + c)\n .join('');\n }\n const bigint = parseInt(clean, 16);\n return `${(bigint >> 16) & 255} ${(bigint >> 8) & 255} ${bigint & 255}`;\n}\n\n// Optimized color parsing with lookup tables\nconst colorRegex =\n /^(bg|text|border|decoration|shadow|outline|caret|accent|fill|stroke|ring|divide)-([a-z]+)-?(\\d{2,3}|DEFAULT)?$/;\nconst propMap: Record<string, string> = {\n bg: 'background-color',\n decoration: 'text-decoration-color',\n text: 'color',\n border: 'border-color',\n outline: 'outline-color',\n caret: 'caret-color',\n accent: 'accent-color',\n fill: 'fill',\n stroke: 'stroke',\n};\n\nexport function parseColorClass(className: string): string | null {\n const match = colorRegex.exec(className);\n if (!match) return null;\n\n const [, type, colorName, shade = 'DEFAULT'] = match;\n const colorValue = colors[colorName]?.[shade];\n if (!colorValue) return null;\n\n if (type === 'shadow') return `--cer-shadow-color:${colorValue};`;\n if (type === 'ring') return `--cer-ring-color:${colorValue};`;\n if (type === 'divide') return `border-color:${colorValue};`;\n const prop = propMap[type];\n return prop ? `${prop}:${colorValue};` : null;\n}\n\nexport function parseOpacityModifier(className: string): {\n base: string;\n opacity?: number;\n} {\n const slashIndex = className.indexOf('/');\n if (slashIndex === -1) return { base: className };\n\n const base = className.slice(0, slashIndex);\n const opacityStr = className.slice(slashIndex + 1);\n const opacity = parseInt(opacityStr, 10);\n\n return isNaN(opacity) || opacity < 0 || opacity > 100\n ? { base }\n : { base, opacity: opacity / 100 };\n}\n\nexport function parseColorWithOpacity(className: string): string | null {\n const { base, opacity } = parseOpacityModifier(className);\n\n const paletteRule = parseColorClass(base);\n if (paletteRule) {\n if (opacity !== undefined) {\n // If the palette uses a CSS variable (e.g. var(--cer-color-...[, fallback])),\n // prefer applying opacity via color-mix to ensure the variable path gets\n // the requested alpha (otherwise a defined custom property would override\n // a rgb(...) fallback and lose the alpha).\n if (paletteRule.includes('var(')) {\n const varMatch = /var\\([^)]*\\)/.exec(paletteRule);\n if (varMatch) {\n const varExpr = varMatch[0];\n const pct = opacity * 100;\n const mix = `color-mix(in srgb, ${varExpr} ${pct}%, rgba(0 0 0 / 0) ${100 - pct}%)`;\n // If the var(...) includes a hex fallback, extract it to emit a\n // direct rgb(...) fallback before the color-mix declaration. This\n // preserves existing tests that expect an rgb(...) result while\n // allowing the variable-based color to be used (with alpha) in\n // browsers that support color-mix.\n const fallbackHexMatch = /#([0-9a-f]{6}|[0-9a-f]{3})/i.exec(varExpr);\n const propMatch = /^([a-z-]+):/.exec(paletteRule);\n const prop = propMatch ? propMatch[1] : 'background-color';\n if (fallbackHexMatch) {\n const rgb = hexToRgb(fallbackHexMatch[0]);\n const rgbExpr = `rgb(${rgb} / ${opacity})`;\n // Replace the hex fallback inside the var(...) with the computed rgb(...) fallback\n const varWithRgbFallback = varExpr.replace(\n /#([0-9a-f]{6}|[0-9a-f]{3})/i,\n rgbExpr,\n );\n // Insert a special split token so the rule generator can emit the\n // fallback and the color-mix override as two separate wrapped rules.\n // This preserves existing tests that expect a single-declaration\n // wrapped block while still providing the color-mix runtime fix.\n return `${prop}:${varWithRgbFallback};__CE_COLOR_MIX_SPLIT__${prop}:${mix};`;\n }\n return `${prop}:${mix};`;\n }\n }\n\n // Otherwise, try to find a hex literal (6- or 3-digit) and convert it to rgb(... / alpha)\n const match = /#([0-9a-f]{6}|[0-9a-f]{3})/i.exec(paletteRule);\n if (match) {\n const rgb = hexToRgb(match[0]);\n return paletteRule.replace(\n /#([0-9a-f]{6}|[0-9a-f]{3})/i,\n `rgb(${rgb} / ${opacity})`,\n );\n }\n }\n\n return paletteRule;\n }\n\n const arbitraryRule = parseArbitrary(base);\n if (arbitraryRule && opacity !== undefined) {\n // Prefer handling CSS variables first so a defined custom property gets\n // the requested alpha via color-mix (instead of replacing a fallback hex\n // and leaving the var(...) wrapper intact which would override the alpha).\n if (arbitraryRule.includes('var(')) {\n const varMatch = /var\\([^)]*\\)/.exec(arbitraryRule);\n if (varMatch) {\n const varExpr = varMatch[0];\n const pct = opacity * 100;\n const mix = `color-mix(in srgb, ${varExpr} ${pct}%, rgba(0 0 0 / 0) ${100 - pct}%)`;\n\n // If the var(...) includes a hex fallback, replace that fallback\n // with an rgb(... / alpha) in a fallback declaration, and emit a\n // split-token so the generator will emit the fallback and the\n // color-mix override as separate wrapped rules (preserving exact\n // test expectations while providing the runtime color-mix fix).\n const fallbackHexMatch = /#([0-9a-f]{6}|[0-9a-f]{3})/i.exec(varExpr);\n const propMatch = /^([a-z-]+):/.exec(arbitraryRule);\n const prop = propMatch ? propMatch[1] : null;\n if (fallbackHexMatch && prop) {\n const rgb = hexToRgb(fallbackHexMatch[0]);\n const rgbExpr = `rgb(${rgb} / ${opacity})`;\n const varWithRgbFallback = varExpr.replace(\n /#([0-9a-f]{6}|[0-9a-f]{3})/i,\n rgbExpr,\n );\n return `${prop}:${varWithRgbFallback};__CE_COLOR_MIX_SPLIT__${prop}:${mix};`;\n }\n\n return arbitraryRule.replace(varExpr, mix);\n }\n }\n\n // Support 6- and 3-digit hexes in arbitrary values\n const match = /#([0-9a-f]{6}|[0-9a-f]{3})/i.exec(arbitraryRule);\n if (match) {\n const rgb = hexToRgb(match[0]);\n return arbitraryRule.replace(\n /#([0-9a-f]{6}|[0-9a-f]{3})/i,\n `rgb(${rgb} / ${opacity})`,\n );\n }\n }\n\n return arbitraryRule;\n}\n\n/**\n * Parse gradient color stop utilities like from-error-500, to-primary-600, via-success-400\n */\nexport function parseGradientColorStop(className: string): string | null {\n const match = /^(from|to|via)-([a-z]+)-?(\\d{2,3}|DEFAULT)?$/.exec(className);\n if (!match) return null;\n\n const [, position, colorName, shade = 'DEFAULT'] = match;\n const colorValue = colors[colorName]?.[shade];\n if (!colorValue) return null;\n\n switch (position) {\n case 'from':\n return `--cer-gradient-from:${colorValue} var(--cer-gradient-from-position);--cer-gradient-to:rgb(255 255 255 / 0) var(--cer-gradient-to-position);--cer-gradient-stops:var(--cer-gradient-from), var(--cer-gradient-to);`;\n case 'to':\n return `--cer-gradient-to:${colorValue} var(--cer-gradient-to-position);`;\n case 'via':\n return `--cer-gradient-to:rgb(255 255 255 / 0) var(--cer-gradient-to-position);--cer-gradient-stops:var(--cer-gradient-from), ${colorValue} var(--cer-gradient-via-position), var(--cer-gradient-to);`;\n default:\n return null;\n }\n}\n\nexport function parseOpacity(className: string): string | null {\n const match = /^opacity-(\\d{1,3})$/.exec(className);\n if (!match) return null;\n const value = parseInt(match[1], 10);\n return value < 0 || value > 100 ? null : `opacity:${value / 100};`;\n}\n\n// Enhanced arbitrary value parser\nexport function parseArbitrary(className: string): string | null {\n // [prop:value] format\n if (\n className.startsWith('[') &&\n className.endsWith(']') &&\n !className.includes('-[')\n ) {\n const inner = className.slice(1, -1).trim();\n const colonIndex = inner.indexOf(':');\n if (colonIndex === -1) return null;\n\n const prop = inner.slice(0, colonIndex).trim();\n let value = inner.slice(colonIndex + 1).trim();\n\n // Only allow valid CSS property names\n if (!/^[a-zA-Z][a-zA-Z0-9-]*$/.test(prop)) return null;\n\n // Convert underscores to spaces for multiple values\n value = value.replace(/_/g, ' ');\n value = value.replace(/url\\('\\s*([^']*?)\\s*'\\)/g, 'url(\"$1\")');\n value = value.replace(/^'([^']*)'$/g, '\"$1\"');\n return `${prop}:${value};`;\n }\n\n // prop-[value] format\n const bracketStart = className.indexOf('-[');\n if (bracketStart <= 0 || !className.endsWith(']')) return null;\n\n const prop = className.slice(0, bracketStart);\n const value = className.slice(bracketStart + 2, -1).replace(/_/g, ' ');\n\n // Enhanced property mappings\n const propMappings: Record<string, string> = {\n bg: 'background-color',\n shadow: 'box-shadow',\n p: 'padding',\n px: 'padding-inline',\n py: 'padding-block',\n m: 'margin',\n mx: 'margin-inline',\n my: 'margin-block',\n w: 'width',\n h: 'height',\n 'min-w': 'min-width',\n 'max-w': 'max-width',\n 'min-h': 'min-height',\n 'max-h': 'max-height',\n 'border-t': 'border-top-width',\n 'border-b': 'border-bottom-width',\n 'border-l': 'border-left-width',\n 'border-r': 'border-right-width',\n 'border-x': 'border-inline-width',\n 'border-y': 'border-block-width',\n 'grid-cols': 'grid-template-columns',\n 'grid-rows': 'grid-template-rows',\n transition: 'transition-property',\n ease: 'transition-timing-function',\n delay: 'transition-delay',\n duration: 'transition-duration',\n list: 'list-style',\n break: 'word-break',\n flex: 'flex-direction',\n items: 'align-items',\n justify: 'justify-content',\n content: 'content',\n self: 'align-self',\n basis: 'flex-basis',\n tracking: 'letter-spacing',\n leading: 'line-height',\n z: 'z-index',\n opacity: 'opacity',\n };\n\n // Special handling for text properties\n if (prop === 'text') {\n // If value looks like a size (ends with px, rem, em, etc.), treat as font-size\n if (/^\\d*\\.?\\d+(px|rem|em|%|vh|vw|ch|ex)$/.test(value)) {\n return `font-size:${value};`;\n }\n // Otherwise treat as color\n return `color:${value};`;\n }\n\n if (prop === 'rotate') return `transform:rotate(${value});`;\n if (prop === 'scale') return `transform:scale(${value});`;\n if (prop === 'translate-x') return `transform:translateX(${value});`;\n if (prop === 'translate-y') return `transform:translateY(${value});`;\n\n const cssProp = propMappings[prop] ?? prop.replace(/_/g, '-');\n return cssProp && value ? `${cssProp}:${value};` : null;\n}\n\nexport function parseArbitraryVariant(token: string): string | null {\n if (token.startsWith('[') && token.endsWith(']')) {\n const inner = token.slice(1, -1);\n return inner.includes('&') ? inner : token;\n }\n\n const bracketStart = token.indexOf('-[');\n if (bracketStart > 0 && token.endsWith(']')) {\n const inner = token.slice(bracketStart + 2, -1).replace(/_/g, '-');\n return inner.includes('&') ? inner : token.replace(/_/g, '-');\n }\n\n return null;\n}\n\n/**\n * Polyfill for CSS.escape() for SSR environments\n * Based on https://drafts.csswg.org/cssom/#serialize-an-identifier\n */\nexport function cssEscape(value: string): string {\n // Use native CSS.escape if available (browser)\n if (typeof CSS !== 'undefined' && CSS.escape) {\n return CSS.escape(value);\n }\n\n // SSR fallback: Manual implementation\n const str = String(value);\n const length = str.length;\n let result = '';\n let i = 0;\n\n while (i < length) {\n const char = str.charAt(i);\n const code = str.charCodeAt(i);\n\n if (code === 0x0000) {\n result += '\\uFFFD';\n } else if (\n // If the character is in the range [\\1-\\1f] (U+0001 to U+001F) or is U+007F\n (code >= 0x0001 && code <= 0x001f) ||\n code === 0x007f ||\n // If the character is the first character and is in the range [0-9] (U+0030 to U+0039)\n (i === 0 && code >= 0x0030 && code <= 0x0039) ||\n // If the character is the second character and is in the range [0-9] (U+0030 to U+0039) and the first character is a \"-\" (U+002D)\n (i === 1 &&\n code >= 0x0030 &&\n code <= 0x0039 &&\n str.charCodeAt(0) === 0x002d)\n ) {\n result += '\\\\' + code.toString(16) + ' ';\n } else if (\n // If the character is the first character and is a \"-\" (U+002D), and there is no second character\n i === 0 &&\n length === 1 &&\n code === 0x002d\n ) {\n result += '\\\\' + char;\n } else if (\n // If the character is not handled by one of the above rules and is one of the following\n code >= 0x0080 ||\n code === 0x002d || // -\n code === 0x005f || // _\n (code >= 0x0030 && code <= 0x0039) || // 0-9\n (code >= 0x0041 && code <= 0x005a) || // A-Z\n (code >= 0x0061 && code <= 0x007a) // a-z\n ) {\n result += char;\n } else {\n // Otherwise, escape it\n result += '\\\\' + char;\n }\n\n i++;\n }\n\n return result;\n}\n\nexport function escapeClassName(name: string): string {\n // Use CSS.escape() API which properly handles all special characters including:\n // - Leading digits (e.g., \"2xl\" -> \"\\32 xl\")\n // - Colons (e.g., \":\" -> \"\\:\")\n // This works in CSSStyleSheet.replaceSync() unlike manual backslash escaping\n return '.' + cssEscape(name);\n}\nexport function escapeRegExp(str: string): string {\n return str.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\$&');\n}\n\n// Optimized HTML class extraction\nexport function extractClassesFromHTML(html: string): string[] {\n // Use [\\s\\S] instead of . to match newlines in class attributes\n const classAttrRegex = /class\\s*=\\s*(['\"])([\\s\\S]*?)\\1/g;\n const classList: string[] = [];\n let match: RegExpExecArray | null;\n\n while ((match = classAttrRegex.exec(html))) {\n const tokens = match[2].split(/\\s+/).filter(Boolean);\n if (tokens.length) classList.push(...tokens);\n }\n\n return classList;\n}\n\n// Enhanced JIT CSS generation with better performance\nexport const jitCssCache = new Map<\n string,\n { css: string; timestamp: number }\n>();\nexport const JIT_CSS_THROTTLE_MS = 16;\nconst MAX_CACHE_SIZE = 1000;\n\n// HMR: Clear all caches on hot update to prevent stale CSS\n// Wrapped in function to avoid side effects at module load time\nif (typeof import.meta !== 'undefined' && import.meta.hot) {\n import.meta.hot.dispose(() => {\n jitCssCache.clear();\n detectedProseSizes.clear();\n proseSheet = null;\n proseCSSCache = '';\n baseResetSheet = null;\n });\n\n // Also clear on accept to force regeneration\n import.meta.hot.accept(() => {\n jitCssCache.clear();\n detectedProseSizes.clear();\n proseSheet = null;\n proseCSSCache = '';\n });\n}\n\nexport function jitCSS(html: string): string {\n // Check cache first - use exact HTML as key for proper cache invalidation\n const cached = jitCssCache.get(html);\n if (cached) {\n return cached.css;\n }\n\n const classes = extractClassesFromHTML(html);\n if (!classes.length) return '';\n\n const seen = new Set(classes);\n const buckets: string[][] = [[], [], [], []];\n const ruleCache: Record<string, string | null> = {};\n\n const generateRuleCached = (\n cls: string,\n stripDark = false,\n ): string | null => {\n const cacheKey = stripDark ? `dark|${cls}` : cls;\n if (cacheKey in ruleCache) return ruleCache[cacheKey];\n const result = generateRule(cls, stripDark);\n ruleCache[cacheKey] = result;\n return result;\n };\n\n const classify = (variants: string[]): number => {\n const hasResponsive = variants.some((t) => responsiveOrder.includes(t));\n const hasContainer = variants.some(\n (t) =>\n t.startsWith('@') &&\n (containerOrder.includes(t.slice(1)) || t.match(/^@\\[.+\\]$/)),\n );\n const hasDark = variants.includes('dark');\n if (!variants.length) return 0;\n if (!hasResponsive && !hasDark && !hasContainer) return 1;\n if (hasDark && (hasResponsive || hasContainer)) return 3;\n return 2;\n };\n\n const splitVariants = (input: string): string[] => {\n const parts: string[] = [];\n let current = '';\n let depth = 0;\n\n for (let i = 0; i < input.length; i++) {\n const ch = input[i];\n if (ch === '[' || ch === '(') depth++;\n else if (ch === ']' || ch === ')') depth--;\n\n if (ch === ':' && depth === 0) {\n parts.push(current);\n current = '';\n } else {\n current += ch;\n }\n }\n if (current) parts.push(current);\n return parts;\n };\n\n const pseudoMap: Record<string, string> = {\n hover: ':hover',\n focus: ':focus',\n active: ':active',\n visited: ':visited',\n disabled: ':disabled',\n checked: ':checked',\n first: ':first-child',\n last: ':last-child',\n odd: ':nth-child(odd)',\n even: ':nth-child(even)',\n 'focus-within': ':focus-within',\n 'focus-visible': ':focus-visible',\n };\n\n const generateRule = (cls: string, stripDark = false): string | null => {\n const parts = splitVariants(cls);\n let basePart = '';\n let important = false;\n\n // Find the base utility. Accept '!' as an important marker either\n // before or after the base token (e.g. `!text-xl` or `text-xl!`).\n for (const part of parts) {\n let checkPart = part;\n // Leading or trailing '!' marks importance\n if (checkPart.startsWith('!')) {\n important = true;\n checkPart = checkPart.slice(1);\n }\n if (checkPart.endsWith('!')) {\n important = true;\n checkPart = checkPart.slice(0, -1);\n }\n\n // Skip tokens that are dynamic variant prefixes — they are NOT base\n // utilities and must not be consumed by parseArbitrary() (which otherwise\n // treats e.g. `data-[key]` as the CSS rule `data:key;`).\n if (\n (checkPart.startsWith('data-[') && checkPart.endsWith(']')) ||\n (checkPart.startsWith('has-[') && checkPart.endsWith(']')) ||\n (checkPart.startsWith('not-[') && checkPart.endsWith(']')) ||\n (checkPart.startsWith('in-[') && checkPart.endsWith(']')) ||\n (checkPart.startsWith('supports-[') && checkPart.endsWith(']')) ||\n checkPart === 'starting'\n ) {\n continue;\n }\n\n if (\n utilityMap[checkPart] ||\n parseSpacing(checkPart) ||\n parseSpaceUtility(checkPart) ||\n parseOpacity(checkPart) ||\n parseColorWithOpacity(checkPart) ||\n parseGradientColorStop(checkPart) ||\n parseArbitrary(checkPart)\n ) {\n basePart = part;\n break;\n }\n }\n\n if (!basePart) return null;\n\n // Prose element modifiers are handled separately by parseProseElementModifier\n // This is checked in parseClassName() before reaching here\n\n const cleanBase = basePart.replace(/^!/, '').replace(/!$/, '');\n const baseRule =\n utilityMap[cleanBase] ??\n parseSpacing(cleanBase) ??\n parseSpaceUtility(cleanBase) ??\n parseOpacity(cleanBase) ??\n parseColorWithOpacity(cleanBase) ??\n parseGradientColorStop(cleanBase) ??\n parseArbitrary(cleanBase);\n\n if (!baseRule) return null;\n\n const baseIndex = parts.indexOf(basePart);\n let variants = baseIndex >= 0 ? parts.slice(0, baseIndex) : [];\n if (stripDark) variants = variants.filter((t) => t !== 'dark');\n\n // Build escaped class name from the original class token so any\n // leading or trailing '!' remains in the selector (escaped).\n const escapedClass = escapeClassName(cls);\n const body = important ? baseRule.replace(/;/g, ' !important;') : baseRule;\n const SUBJECT = '__SUBJECT__';\n let selector = SUBJECT;\n\n // Handle structural variants\n const structural: string[] = [];\n for (const token of variants) {\n if (token.startsWith('group-')) {\n selector = `.group:${token.slice(6)} ${selector}`;\n structural.push(token);\n } else if (token.startsWith('peer-')) {\n selector = selector.replace(\n SUBJECT,\n `.peer:${token.slice(5)}~${SUBJECT}`,\n );\n structural.push(token);\n }\n }\n variants = variants.filter((t) => !structural.includes(t));\n\n // Handle pseudos and arbitrary variants\n const subjectPseudos: string[] = [];\n const innerPseudos: string[] = [];\n let wrapperVariant: string | null = null;\n let hasStartingStyle = false;\n const supportsTokens: string[] = [];\n\n for (const token of variants) {\n if (\n token === 'dark' ||\n responsiveOrder.includes(token) ||\n (token.startsWith('@') &&\n (containerOrder.includes(token.slice(1)) || token.match(/^@\\[.+\\]$/)))\n )\n continue;\n\n // Handle data-[*]: attribute variant → [data-key] or [data-key=\"value\"]\n if (token.startsWith('data-[') && token.endsWith(']')) {\n const inner = token.slice(6, -1);\n const attrSel = inner.includes('=')\n ? '[data-' + inner.replace(/^([^=]+)=(.+)$/, '$1=\"$2\"') + ']'\n : '[data-' + inner + ']';\n subjectPseudos.push(attrSel);\n continue;\n }\n\n // Handle has-[*]: pseudo-class variant → :has(...)\n if (token.startsWith('has-[') && token.endsWith(']')) {\n const inner = token.slice(5, -1).replace(/_/g, ' ');\n subjectPseudos.push(`:has(${inner})`);\n continue;\n }\n\n // Handle not-[*]: pseudo-class variant → :not(...)\n if (token.startsWith('not-[') && token.endsWith(']')) {\n const inner = token.slice(5, -1).replace(/_/g, ' ');\n subjectPseudos.push(`:not(${inner})`);\n continue;\n }\n\n // Handle in-[*]: ancestor variant → :is(selector) .element\n if (token.startsWith('in-[') && token.endsWith(']')) {\n const inner = token.slice(4, -1).replace(/_/g, ' ');\n selector = ':is(' + inner + ') ' + selector;\n continue;\n }\n\n // Handle starting: → @starting-style{} wrapper\n if (token === 'starting') {\n hasStartingStyle = true;\n continue;\n }\n\n // Handle supports-[*]: → @supports(...){} wrapper\n if (token.startsWith('supports-[') && token.endsWith(']')) {\n supportsTokens.push(token);\n continue;\n }\n\n const variantSelector = parseArbitraryVariant(token);\n if (variantSelector) {\n wrapperVariant = variantSelector;\n continue;\n }\n\n const pseudo = pseudoMap[token];\n if (pseudo) {\n if (!wrapperVariant) {\n subjectPseudos.push(pseudo);\n } else {\n innerPseudos.push(pseudo);\n }\n continue;\n }\n\n const fn = selectorVariants[token];\n if (typeof fn === 'function') {\n selector = fn(selector, body).split('{')[0];\n }\n }\n\n const subjectPseudoStr = subjectPseudos.join('');\n const innerPseudoStr = innerPseudos.join('');\n\n // Helper function to insert inner pseudos into post part\n function insertPseudosIntoPost(post: string, pseudos: string): string {\n if (!pseudos) return post;\n let depthSquare = 0;\n let depthParen = 0;\n\n // If post starts with a combinator, insert pseudos after the first simple selector\n if (\n post.length &&\n (post[0] === '>' ||\n post[0] === '+' ||\n post[0] === '~' ||\n post[0] === ' ')\n ) {\n let i = 1;\n // skip initial whitespace\n while (i < post.length && post[i] === ' ') i++;\n for (; i < post.length; i++) {\n const ch = post[i];\n if (ch === '[') depthSquare++;\n else if (ch === ']' && depthSquare > 0) depthSquare--;\n else if (ch === '(') depthParen++;\n else if (ch === ')' && depthParen > 0) depthParen--;\n if (\n depthSquare === 0 &&\n depthParen === 0 &&\n (post[i] === '>' ||\n post[i] === '+' ||\n post[i] === '~' ||\n post[i] === ' ')\n ) {\n return post.slice(0, i) + pseudos + post.slice(i);\n }\n }\n return post + pseudos;\n }\n\n for (let i = 0; i < post.length; i++) {\n const ch = post[i];\n if (ch === '[') depthSquare++;\n else if (ch === ']' && depthSquare > 0) depthSquare--;\n else if (ch === '(') depthParen++;\n else if (ch === ')' && depthParen > 0) depthParen--;\n if (\n depthSquare === 0 &&\n depthParen === 0 &&\n (ch === '>' || ch === '+' || ch === '~' || ch === ' ')\n ) {\n return post.slice(0, i) + pseudos + post.slice(i);\n }\n }\n return post + pseudos;\n }\n\n if (wrapperVariant) {\n if (wrapperVariant.includes('&')) {\n const idx = wrapperVariant.indexOf('&');\n const pre = wrapperVariant.slice(0, idx);\n const post = wrapperVariant.slice(idx + 1);\n const subjectWithPseudos = SUBJECT + subjectPseudoStr;\n\n if (subjectPseudos.length === 0) {\n // attach inner pseudos to the subject\n selector = selector.replace(\n SUBJECT,\n pre + subjectWithPseudos + innerPseudoStr + post,\n );\n } else {\n // insert inner pseudos into post after its first simple selector\n const postWithInner = insertPseudosIntoPost(post, innerPseudoStr);\n selector = selector.replace(\n SUBJECT,\n pre + subjectWithPseudos + postWithInner,\n );\n }\n } else {\n selector = selector.replace(\n SUBJECT,\n `${wrapperVariant}${SUBJECT + subjectPseudoStr}`,\n );\n if (innerPseudoStr) {\n selector = selector.replace(SUBJECT, `${SUBJECT}${innerPseudoStr}`);\n }\n }\n } else {\n selector = selector.replace(\n SUBJECT,\n SUBJECT + subjectPseudoStr + innerPseudoStr,\n );\n }\n\n selector = selector.replace(new RegExp(SUBJECT, 'g'), escapedClass);\n\n // Support a special split token that allows parseColorWithOpacity to\n // request emitting two separate rules for the same selector. This is\n // used to emit a var(..., rgb(...)) fallback in one rule while emitting\n // a color-mix(...) rule separately so tests that assert an exact single\n // declaration still pass while runtime gets the color-mix override.\n const DUAL_TOKEN = '__CE_COLOR_MIX_SPLIT__';\n\n const rulesArray: string[] = body.includes(DUAL_TOKEN)\n ? body.split(DUAL_TOKEN).map((part) => `${selector}{${part}}`)\n : [`${selector}{${body}}`];\n\n // Apply media queries and container queries\n const responsiveTokens = variants.filter((t) =>\n responsiveOrder.includes(t),\n );\n const containerTokens = variants.filter(\n (t) =>\n t.startsWith('@') &&\n (containerOrder.includes(t.slice(1)) || t.match(/^@\\[.+\\]$/)),\n );\n const lastResponsive = responsiveTokens.length\n ? responsiveTokens[responsiveTokens.length - 1]\n : null;\n const lastContainer = containerTokens.length\n ? containerTokens[containerTokens.length - 1]\n : null;\n const hasDark = variants.includes('dark');\n\n // Handle media queries and container queries\n let mediaQuery = '';\n let containerQuery = '';\n\n // Build media query\n if (hasDark && lastResponsive) {\n mediaQuery = `@media (prefers-color-scheme: dark) and ${mediaVariants[lastResponsive]}`;\n } else if (hasDark) {\n mediaQuery = `@media (prefers-color-scheme: dark)`;\n } else if (lastResponsive) {\n mediaQuery = `@media ${mediaVariants[lastResponsive]}`;\n }\n\n // Build container query\n if (lastContainer) {\n if (lastContainer.startsWith('@[') && lastContainer.endsWith(']')) {\n // Arbitrary container query like @[300px]\n const value = lastContainer.slice(2, -1);\n // Validate that the value is a valid CSS length (px, rem, em, %, etc.)\n if (\n !/^-?\\d*\\.?\\d+(px|rem|em|%|vh|vw|ch|ex|cm|mm|in|pt|pc)$/.test(value)\n ) {\n return null; // Invalid arbitrary container query value\n }\n containerQuery = `@container (min-width:${value})`;\n } else {\n // Named container query like @md\n const containerKey = lastContainer.slice(1);\n const queryValue =\n containerVariants[containerKey] || `(min-width:${containerKey})`;\n containerQuery = `@container ${queryValue}`;\n }\n }\n\n // Build @supports query from supportsTokens\n let supportsQuery = '';\n if (supportsTokens.length > 0) {\n const lastSupports = supportsTokens[supportsTokens.length - 1];\n const supportsValue = lastSupports.slice(10, -1).replace(/_/g, ' ');\n supportsQuery = `@supports ${\n supportsValue.startsWith('not(') ||\n supportsValue.startsWith('selector(') ||\n supportsValue.startsWith('(')\n ? supportsValue\n : `(${supportsValue})`\n }`;\n }\n\n // Combine queries by wrapping each generated rule separately. If we\n // produced multiple rules (rulesArray), wrap each one and concatenate\n // them so tests can match the expected single-declaration block while\n // we still emit a second, overriding block for color-mix.\n const wrapRule = (r: string): string => {\n let rule = r;\n if (hasStartingStyle) rule = `@starting-style{${rule}}`;\n if (supportsQuery) rule = `${supportsQuery}{${rule}}`;\n if (mediaQuery && containerQuery)\n return `${mediaQuery}${containerQuery}{${rule}}`;\n if (mediaQuery) return `${mediaQuery}{${rule}}`;\n if (containerQuery) return `${containerQuery}{${rule}}`;\n return rule;\n };\n\n return rulesArray.map(wrapRule).join('');\n };\n\n // Process classes\n for (const cls of seen) {\n // Check for prose base classes first (prose, prose-sm, prose-lg, prose-xl, prose-2xl) - before splitting\n const parts = splitVariants(cls);\n const variants = parts.slice(0, -1);\n const base = parts[parts.length - 1];\n const proseDetected = parseProseClass(base);\n if (proseDetected !== null) {\n // Prose base class detected\n if (variants.length === 0) {\n // No variants - register with singleton prose sheet\n // Add placeholder to mark class as processed but no actual CSS\n buckets[0].push(`${escapeClassName(cls)}{}`);\n } else {\n // Has variants (e.g., 2xl:prose-lg, dark:prose)\n // Must generate inline CSS with variants applied since singleton sheet doesn't support variants\n const proseCSS = generateProseCSS(base);\n if (!proseCSS) continue;\n\n const escapedClass = escapeClassName(cls);\n\n // Replace the base class selector with the full variant class\n // e.g., replace \".prose-lg\" with \"[class~=\"2xl:prose-lg\"]\"\n const baseClassEscaped = escapeClassName(base);\n let variantCSS = proseCSS.replace(\n new RegExp(escapeRegExp(baseClassEscaped), 'g'),\n escapedClass,\n );\n\n // Apply responsive variants (wrap in media query)\n const responsiveVariants = variants.filter((v) =>\n responsiveOrder.includes(v),\n );\n if (responsiveVariants.length > 0) {\n const lastResponsive =\n responsiveVariants[responsiveVariants.length - 1];\n const mediaQuery = `@media ${mediaVariants[lastResponsive]}`;\n variantCSS = `${mediaQuery}{${variantCSS}}`;\n }\n\n // Apply dark mode\n if (variants.includes('dark')) {\n variantCSS = `@media (prefers-color-scheme: dark){${variantCSS}}`;\n }\n\n const bucketNum = classify(variants);\n buckets[bucketNum].push(variantCSS);\n }\n continue;\n }\n\n // Check for prose element modifiers (prose-a:text-blue-600, hover:prose-a:text-blue-600)\n // Detect by finding 'prose-{element}' pattern in any part\n let proseModIndex = -1;\n for (let i = parts.length - 1; i >= 0; i--) {\n const potentialProseMod = parts.slice(i).join(':');\n if (parseProseElementModifier(potentialProseMod)) {\n proseModIndex = i;\n break;\n }\n }\n\n if (proseModIndex >= 0) {\n // Found prose element modifier - generate CSS with variants applied\n const proseModBase = parts.slice(proseModIndex).join(':');\n const variants = parts.slice(0, proseModIndex);\n\n // Generate the base prose CSS (without variants)\n const baseProseCSS = parseProseElementModifier(proseModBase);\n\n if (!baseProseCSS) continue;\n\n // If no variants, use the generated CSS as-is without modification\n if (variants.length === 0) {\n buckets[0].push(baseProseCSS);\n continue;\n }\n\n // Has variants - replace the base class selector with the full escaped class name\n const fullEscaped = cssEscape(cls);\n const baseEscaped = cssEscape(proseModBase);\n\n // Replace all occurrences of the base class with the full class\n // e.g., \".prose-h1\\:text-4xl\" → \".md\\:prose-h1\\:text-4xl\"\n const fullProseCSS = baseProseCSS.replace(\n new RegExp(\n `\\\\.${baseEscaped.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\$&')}`,\n 'g',\n ),\n `.${fullEscaped}`,\n );\n\n // Extract each rule and apply media/pseudo variants\n const ruleRegex = /(.+?)\\s+(.+?)\\{([^}]+)\\}/g;\n const matches = [...fullProseCSS.matchAll(ruleRegex)];\n\n if (matches.length === 0) {\n // Can't parse, use as-is\n buckets[0].push(baseProseCSS);\n continue;\n }\n\n const bucketNum = classify(variants);\n\n // Define pseudo map inline for prose variant handling\n const prosePseudoMap: Record<string, string> = {\n hover: ':hover',\n focus: ':focus',\n active: ':active',\n visited: ':visited',\n disabled: ':disabled',\n checked: ':checked',\n first: ':first-child',\n last: ':last-child',\n odd: ':nth-child(odd)',\n even: ':nth-child(even)',\n 'focus-within': ':focus-within',\n 'focus-visible': ':focus-visible',\n };\n\n // Separate variants by type (once for all rules)\n const structuralVariants: string[] = [];\n const pseudoVariants: string[] = [];\n const arbitraryVariants: string[] = [];\n const responsiveVariants: string[] = [];\n const containerVariants: string[] = [];\n let hasDark = false;\n\n for (const v of variants) {\n if (v.startsWith('group-')) {\n structuralVariants.push(v);\n } else if (v.startsWith('peer-')) {\n structuralVariants.push(v);\n } else if (v === 'dark' || v === 'dark-class') {\n hasDark = true;\n } else if (responsiveOrder.includes(v)) {\n responsiveVariants.push(v);\n } else if (\n v.startsWith('@') &&\n (containerOrder.includes(v.slice(1)) || v.match(/^@\\[.+\\]$/))\n ) {\n containerVariants.push(v);\n } else if (v.startsWith('[') && v.endsWith(']')) {\n arbitraryVariants.push(v);\n } else if (prosePseudoMap[v] || selectorVariants[v]) {\n pseudoVariants.push(v);\n }\n }\n\n // Process each rule with variants\n for (const match of matches) {\n const [, baseClassSelector, elementSelector, body] = match;\n\n // Apply variants to the element selector\n let finalSelector = `${baseClassSelector} ${elementSelector}`;\n\n // Apply structural variants (group, peer)\n for (const v of structuralVariants) {\n if (v.startsWith('group-')) {\n const pseudo = v.slice(6);\n const pseudoSelector = prosePseudoMap[pseudo] || `:${pseudo}`;\n finalSelector = `.group${pseudoSelector} ${finalSelector}`;\n } else if (v.startsWith('peer-')) {\n const pseudo = v.slice(5);\n const pseudoSelector = prosePseudoMap[pseudo] || `:${pseudo}`;\n finalSelector = `.peer${pseudoSelector}~${finalSelector}`;\n }\n }\n\n // Apply pseudo-class variants (append to element, not class)\n if (pseudoVariants.length > 0) {\n const pseudoStr = pseudoVariants\n .map((v) => prosePseudoMap[v] || `:${v}`)\n .join('');\n // Append pseudos to the end of the element selector\n // .prose-a\\:text-error-600 a:not(...) → .prose-a\\:text-error-600 a:not(...):hover\n finalSelector = `${finalSelector}${pseudoStr}`;\n }\n\n // Apply arbitrary variants\n for (const v of arbitraryVariants) {\n const arbVariant = parseArbitraryVariant(v);\n if (arbVariant && arbVariant.includes('&')) {\n const idx = arbVariant.indexOf('&');\n const pre = arbVariant.slice(0, idx);\n const post = arbVariant.slice(idx + 1);\n finalSelector = `${pre}${finalSelector}${post}`;\n }\n }\n\n let wrappedCSS = `${finalSelector}{${body}}`;\n\n // Apply dark mode\n if (hasDark) {\n wrappedCSS = `@media (prefers-color-scheme: dark){${wrappedCSS}}`;\n }\n\n // Apply container queries\n if (containerVariants.length > 0) {\n const lastContainer = containerVariants[containerVariants.length - 1];\n if (lastContainer.startsWith('@[') && lastContainer.endsWith(']')) {\n const value = lastContainer.slice(2, -1);\n if (\n /^-?\\d*\\.?\\d+(px|rem|em|%|vh|vw|ch|ex|cm|mm|in|pt|pc)$/.test(\n value,\n )\n ) {\n wrappedCSS = `@container (min-width:${value}){${wrappedCSS}}`;\n }\n } else {\n const containerKey = lastContainer.slice(1);\n const sizes: Record<string, string> = {\n xs: '20rem',\n sm: '24rem',\n md: '28rem',\n lg: '32rem',\n xl: '36rem',\n '2xl': '42rem',\n '3xl': '48rem',\n '4xl': '56rem',\n '5xl': '64rem',\n '6xl': '72rem',\n '7xl': '80rem',\n };\n const breakpoint = sizes[containerKey];\n if (breakpoint) {\n // Extract container name from class if present (e.g., @container-name/lg)\n const containerName = cls.match(/@([^/]+)\\//)?.[1] || '';\n wrappedCSS = containerName\n ? `@container ${containerName} (min-width: ${breakpoint}){${wrappedCSS}}`\n : `@container (min-width: ${breakpoint}){${wrappedCSS}}`;\n }\n }\n }\n\n // Apply responsive variants\n if (responsiveVariants.length > 0) {\n const lastResponsive =\n responsiveVariants[responsiveVariants.length - 1];\n const mediaQuery = `@media ${mediaVariants[lastResponsive]}`;\n wrappedCSS = `${mediaQuery}{${wrappedCSS}}`;\n }\n\n buckets[bucketNum].push(wrappedCSS);\n }\n continue;\n }\n\n // Regular utilities - already have parts, variants, base from above\n const basePart = parts.find((p) => {\n const cleaned = p.replace(/^!/, '').replace(/!$/, '');\n return (\n utilityMap[cleaned] ||\n parseSpacing(cleaned) ||\n parseSpaceUtility(cleaned) ||\n parseOpacity(cleaned) ||\n parseColorWithOpacity(cleaned) ||\n parseGradientColorStop(cleaned) ||\n parseArbitrary(cleaned)\n );\n });\n if (!basePart) continue;\n\n const baseIndex = parts.indexOf(basePart);\n const variantsForBucket = baseIndex >= 0 ? parts.slice(0, baseIndex) : [];\n const bucketNum = classify(variantsForBucket);\n\n const rule = generateRuleCached(cls);\n if (rule) buckets[bucketNum].push(rule);\n }\n\n // Ensure explicit gradient color-stop classes generate rules.\n // Some gradient utilities emit variable-based bodies that are\n // picked up via combined selectors; to make the output explicit and\n // testable we generate standalone rules for any from-*/via-*/to-*\n // classes so their selectors are present in the CSS output.\n const gradientStopRegex = /^(from|via|to)-[a-z]+-?\\d{2,3}?$/;\n for (const cls of seen) {\n if (gradientStopRegex.test(cls)) {\n // If we already generated a rule for this class, skip. Evaluate\n // current generated output from buckets instead of `css` var.\n const generatedBuckets = buckets.flat().join('');\n if (generatedBuckets.includes(escapeClassName(cls))) continue;\n const generated = generateRuleCached(cls);\n if (generated) buckets[0].push(generated);\n }\n }\n\n // Sort rules within buckets to ensure proper CSS cascade order\n // Larger breakpoints must come after smaller ones for correct precedence\n const sortRulesByBreakpoint = (rules: string[]): string[] => {\n return rules.sort((a, b) => {\n // Extract responsive breakpoint from media query and return pixel value\n const getResponsivePixels = (rule: string): number => {\n const responsiveSizes: Record<string, number> = {\n sm: 640,\n md: 768,\n lg: 1024,\n xl: 1280,\n '2xl': 1536,\n };\n for (const [key, px] of Object.entries(responsiveSizes)) {\n if (rule.includes(`@media ${mediaVariants[key]}`)) return px;\n }\n return -1;\n };\n\n // Extract container breakpoint and return pixel value\n const getContainerPixels = (rule: string): number => {\n const containerSizes: Record<string, number> = {\n xs: 320, // 20rem\n sm: 384, // 24rem\n md: 448, // 28rem\n lg: 512, // 32rem\n xl: 576, // 36rem\n '2xl': 672, // 42rem\n '3xl': 768, // 48rem\n '4xl': 896, // 56rem\n '5xl': 1024, // 64rem\n '6xl': 1152, // 72rem\n '7xl': 1280, // 80rem\n };\n\n // Check for named container breakpoints\n for (const [key, px] of Object.entries(containerSizes)) {\n if (rule.includes(`@container ${containerVariants[key]}`)) return px;\n }\n\n // Check for arbitrary container queries like @container (min-width:300px)\n if (rule.includes('@container (min-width:')) {\n const match =\n /@container \\(min-width:(\\d+(?:\\.\\d+)?)(px|rem|em)/.exec(rule);\n if (match) {\n const value = parseFloat(match[1]);\n const unit = match[2];\n // Convert to pixels for comparison\n return unit === 'rem' || unit === 'em' ? value * 16 : value;\n }\n }\n return -1;\n };\n\n const aRespPx = getResponsivePixels(a);\n const bRespPx = getResponsivePixels(b);\n const aContPx = getContainerPixels(a);\n const bContPx = getContainerPixels(b);\n\n // Sort by responsive breakpoint if both have responsive queries\n if (aRespPx >= 0 && bRespPx >= 0 && aRespPx !== bRespPx)\n return aRespPx - bRespPx;\n\n // Sort by container breakpoint if both have container queries\n if (aContPx >= 0 && bContPx >= 0 && aContPx !== bContPx)\n return aContPx - bContPx;\n\n // Keep original order for same breakpoint or no breakpoint\n return 0;\n });\n };\n\n // Sort buckets 2 and 3 which contain responsive/container queries\n buckets[2] = sortRulesByBreakpoint(buckets[2]);\n buckets[3] = sortRulesByBreakpoint(buckets[3]);\n\n const css = buckets.flat().join('');\n\n // Cache size management to prevent memory leaks\n if (jitCssCache.size >= MAX_CACHE_SIZE) {\n // Remove oldest entries (simple FIFO cleanup)\n const keysToDelete = Array.from(jitCssCache.keys()).slice(\n 0,\n Math.floor(MAX_CACHE_SIZE / 2),\n );\n keysToDelete.forEach((key) => jitCssCache.delete(key));\n }\n\n // Store generated CSS with current timestamp\n jitCssCache.set(html, { css, timestamp: Date.now() });\n return css;\n}\n","/**\n * Transitions module (top-level). This file provides the public Transition\n * and TransitionGroup APIs. It is an explicit entry used by the build so\n * consumers can import transitions separately: `.../transitions`.\n */\n/**\n * Transitions Module\n * Vue-like transition system integrated with JIT CSS\n * Provides Transition and TransitionGroup components for enter/leave animations\n */\n\nimport { anchorBlock } from './directives';\nimport type { VNode } from './runtime/types';\nimport { jitCSS } from './runtime/style';\n\n/* --- Types --- */\n\n/**\n * Transition class names for different animation phases\n * All values should be JIT CSS utility classes\n */\nexport interface TransitionClasses {\n /** Classes applied at the start of enter transition */\n enterFrom?: string;\n /** Classes applied during entire enter transition */\n enterActive?: string;\n /** Classes applied at the end of enter transition */\n enterTo?: string;\n /** Classes applied at the start of leave transition */\n leaveFrom?: string;\n /** Classes applied during entire leave transition */\n leaveActive?: string;\n /** Classes applied at the end of leave transition */\n leaveTo?: string;\n}\n\n/**\n * Lifecycle hooks for transition events\n */\nexport interface TransitionHooks {\n /** Called before enter transition starts */\n onBeforeEnter?: (el: HTMLElement) => void;\n /** Called during enter transition (with done callback for manual control) */\n onEnter?: (el: HTMLElement, done: () => void) => void;\n /** Called after enter transition completes */\n onAfterEnter?: (el: HTMLElement) => void;\n /** Called if enter transition is cancelled */\n onEnterCancelled?: (el: HTMLElement) => void;\n /** Called before leave transition starts */\n onBeforeLeave?: (el: HTMLElement) => void;\n /** Called during leave transition (with done callback for manual control) */\n onLeave?: (el: HTMLElement, done: () => void) => void;\n /** Called after leave transition completes */\n onAfterLeave?: (el: HTMLElement) => void;\n /** Called if leave transition is cancelled */\n onLeaveCancelled?: (el: HTMLElement) => void;\n}\n\n/**\n * Options for Transition component\n */\nexport interface TransitionOptions extends TransitionClasses, TransitionHooks {\n /** Preset name (fade, slide-right, scale, etc.) */\n preset?: keyof typeof transitionPresets;\n /** Whether to show the content */\n show: boolean;\n /** Transition mode: default, out-in (leave before enter), in-out (enter before leave) */\n mode?: 'default' | 'out-in' | 'in-out';\n /** Custom duration override (ms) */\n duration?: number | { enter: number; leave: number };\n /** Whether to apply transition on initial render */\n appear?: boolean;\n /** Whether to use CSS transitions (true) or JS-only hooks (false) */\n css?: boolean;\n /** Optional name for debugging */\n name?: string;\n}\n\n/**\n * Options for TransitionGroup component\n */\nexport interface TransitionGroupOptions extends Omit<\n TransitionOptions,\n 'show'\n> {\n /** HTML tag for the wrapper element */\n tag?: string;\n /** Class applied during move transitions (when items reorder) */\n moveClass?: string;\n /** Whether to show the group (defaults to true for TransitionGroup) */\n show?: boolean;\n /** CSS classes to apply to the wrapper element (e.g., 'flex gap-4' or 'grid grid-cols-3') */\n class?: string;\n /** Inline styles to apply to the wrapper element */\n style?: string | Record<string, string>;\n}\n\n/* --- Transition Presets --- */\n\n/**\n * Pre-defined transition presets using JIT CSS classes\n * Users can reference these by name or define custom classes\n */\nexport const transitionPresets = {\n /** Simple fade in/out */\n fade: {\n enterFrom: 'opacity-0',\n enterActive: 'transition-opacity duration-300 ease-out',\n enterTo: 'opacity-100',\n leaveFrom: 'opacity-100',\n leaveActive: 'transition-opacity duration-200 ease-in',\n leaveTo: 'opacity-0',\n },\n\n /** Slide in from right */\n 'slide-right': {\n enterFrom: 'translate-x-[100%] opacity-0',\n enterActive: 'transition-all duration-300 ease-out',\n enterTo: 'translate-x-[0%] opacity-100',\n leaveFrom: 'translate-x-[0%] opacity-100',\n leaveActive: 'transition-all duration-200 ease-in',\n leaveTo: 'translate-x-[100%] opacity-0',\n },\n\n /** Slide in from left */\n 'slide-left': {\n enterFrom: 'translate-x-[-100%] opacity-0',\n enterActive: 'transition-all duration-300 ease-out',\n enterTo: 'translate-x-[0%] opacity-100',\n leaveFrom: 'translate-x-[0%] opacity-100',\n leaveActive: 'transition-all duration-200 ease-in',\n leaveTo: 'translate-x-[-100%] opacity-0',\n },\n\n /** Slide up from bottom */\n 'slide-up': {\n enterFrom: 'translate-y-[100%] opacity-0',\n enterActive: 'transition-all duration-300 ease-out',\n enterTo: 'translate-y-[0%] opacity-100',\n leaveFrom: 'translate-y-[0%] opacity-100',\n leaveActive: 'transition-all duration-200 ease-in',\n leaveTo: 'translate-y-[100%] opacity-0',\n },\n\n /** Slide down from top */\n 'slide-down': {\n enterFrom: 'translate-y-[-100%] opacity-0',\n enterActive: 'transition-all duration-300 ease-out',\n enterTo: 'translate-y-[0%] opacity-100',\n leaveFrom: 'translate-y-[0%] opacity-100',\n leaveActive: 'transition-all duration-200 ease-in',\n leaveTo: 'translate-y-[-100%] opacity-0',\n },\n\n /** Scale up from center */\n scale: {\n enterFrom: 'scale-95 opacity-0',\n enterActive: 'transition-all duration-200 ease-out',\n enterTo: 'scale-100 opacity-100',\n leaveFrom: 'scale-100 opacity-100',\n leaveActive: 'transition-all duration-150 ease-in',\n leaveTo: 'scale-95 opacity-0',\n },\n\n /** Scale down to center */\n 'scale-down': {\n enterFrom: 'scale-105 opacity-0',\n enterActive: 'transition-all duration-200 ease-out',\n enterTo: 'scale-100 opacity-100',\n leaveFrom: 'scale-100 opacity-100',\n leaveActive: 'transition-all duration-150 ease-in',\n leaveTo: 'scale-105 opacity-0',\n },\n\n /** Bounce effect */\n bounce: {\n enterFrom: 'scale-0 opacity-0',\n enterActive: 'transition-all duration-500 ease-out',\n enterTo: 'scale-100 opacity-100',\n leaveFrom: 'scale-100 opacity-100',\n leaveActive: 'transition-all duration-200 ease-in',\n leaveTo: 'scale-0 opacity-0',\n },\n\n /** Zoom and fade */\n zoom: {\n enterFrom: 'scale-0 opacity-0',\n enterActive: 'transition-all duration-300 ease-out',\n enterTo: 'scale-100 opacity-100',\n leaveFrom: 'scale-100 opacity-100',\n leaveActive: 'transition-all duration-200 ease-in',\n leaveTo: 'scale-0 opacity-0',\n },\n\n /** Flip in */\n flip: {\n enterFrom: 'rotate-[90deg] opacity-0',\n enterActive: 'transition-all duration-400 ease-out',\n enterTo: 'rotate-[0deg] opacity-100',\n leaveFrom: 'rotate-[0deg] opacity-100',\n leaveActive: 'transition-all duration-300 ease-in',\n leaveTo: 'rotate-[90deg] opacity-0',\n },\n} as const;\n\n/* --- Core Functions --- */\n\n/**\n * Transition component - wraps content with enter/leave animations\n *\n * @example\n * ```ts\n * // Using a preset\n * ${Transition({ preset: 'fade', show: isVisible.value }, html`<div>Content</div>`)}\n *\n * // Using custom JIT classes\n * ${Transition({\n * show: isVisible.value,\n * enterFrom: 'opacity-0 scale-95',\n * enterActive: 'transition-all duration-300',\n * enterTo: 'opacity-100 scale-100',\n * leaveFrom: 'opacity-100 scale-100',\n * leaveActive: 'transition-all duration-200',\n * leaveTo: 'opacity-0 scale-95'\n * }, html`<div>Content</div>`)}\n *\n * // With lifecycle hooks\n * ${Transition({\n * preset: 'slide-right',\n * show: isVisible.value,\n * onAfterEnter: (el) => console.log('Entered!'),\n * onAfterLeave: (el) => console.log('Left!')\n * }, html`<div>Content</div>`)}\n * ```\n */\nexport function Transition(\n options: TransitionOptions,\n content: VNode | VNode[],\n): VNode {\n const {\n preset,\n show,\n mode = 'default',\n duration,\n appear = false,\n css = true,\n name,\n enterFrom,\n enterActive,\n enterTo,\n leaveFrom,\n leaveActive,\n leaveTo,\n onBeforeEnter,\n onEnter,\n onAfterEnter,\n onEnterCancelled,\n onBeforeLeave,\n onLeave,\n onAfterLeave,\n onLeaveCancelled,\n } = options;\n\n // Resolve classes from preset or explicit values\n let transitionClasses: TransitionClasses;\n if (preset && transitionPresets[preset]) {\n transitionClasses = { ...transitionPresets[preset] };\n // Allow overriding preset classes\n if (enterFrom) transitionClasses.enterFrom = enterFrom;\n if (enterActive) transitionClasses.enterActive = enterActive;\n if (enterTo) transitionClasses.enterTo = enterTo;\n if (leaveFrom) transitionClasses.leaveFrom = leaveFrom;\n if (leaveActive) transitionClasses.leaveActive = leaveActive;\n if (leaveTo) transitionClasses.leaveTo = leaveTo;\n } else {\n transitionClasses = {\n enterFrom,\n enterActive,\n enterTo,\n leaveFrom,\n leaveActive,\n leaveTo,\n };\n }\n\n // Create anchor block with transition metadata\n const transitionKey =\n name || (preset ? `transition-${preset}` : 'transition');\n const transitionVNode = anchorBlock(show ? content : [], transitionKey);\n\n // Attach metadata for VDOM to consume during patching\n (transitionVNode as VNode & { _transition?: unknown })._transition = {\n name: transitionKey,\n classes: transitionClasses,\n mode,\n duration,\n appear,\n css,\n state: show ? 'visible' : 'hidden',\n hooks: {\n onBeforeEnter,\n onEnter,\n onAfterEnter,\n onEnterCancelled,\n onBeforeLeave,\n onLeave,\n onAfterLeave,\n onLeaveCancelled,\n },\n };\n\n return transitionVNode;\n}\n\n/**\n * TransitionGroup component - animates lists with enter/leave/move transitions\n *\n * @example\n * ```ts\n * // Basic usage\n * ${TransitionGroup({\n * preset: 'slide-right',\n * tag: 'ul',\n * moveClass: 'transition-transform duration-300'\n * }, each(items.value, (item) => html`\n * <li key=\"${item.id}\">${item.text}</li>\n * `))}\n *\n * // With flex layout\n * ${TransitionGroup({\n * preset: 'fade',\n * class: 'flex gap-4 flex-wrap'\n * }, each(items.value, (item) => html`\n * <div key=\"${item.id}\" class=\"shrink-0\">${item.text}</div>\n * `))}\n *\n * // With grid layout\n * ${TransitionGroup({\n * preset: 'scale',\n * class: 'grid grid-cols-3 gap-4'\n * }, each(items.value, (item) => html`\n * <div key=\"${item.id}\">${item.text}</div>\n * `))}\n * ```\n */\nexport function TransitionGroup(\n options: TransitionGroupOptions,\n children: VNode[],\n): VNode {\n const {\n tag = 'div',\n moveClass = 'transition-transform duration-300',\n preset,\n show = true,\n mode = 'default',\n duration,\n appear = false,\n css = true,\n name,\n class: className,\n style,\n enterFrom,\n enterActive,\n enterTo,\n leaveFrom,\n leaveActive,\n leaveTo,\n onBeforeEnter,\n onEnter,\n onAfterEnter,\n onEnterCancelled,\n onBeforeLeave,\n onLeave,\n onAfterLeave,\n onLeaveCancelled,\n } = options;\n\n // Resolve classes from preset or explicit values\n let transitionClasses: TransitionClasses;\n if (preset && transitionPresets[preset]) {\n transitionClasses = { ...transitionPresets[preset] };\n // Allow overriding preset classes\n if (enterFrom) transitionClasses.enterFrom = enterFrom;\n if (enterActive) transitionClasses.enterActive = enterActive;\n if (enterTo) transitionClasses.enterTo = enterTo;\n if (leaveFrom) transitionClasses.leaveFrom = leaveFrom;\n if (leaveActive) transitionClasses.leaveActive = leaveActive;\n if (leaveTo) transitionClasses.leaveTo = leaveTo;\n } else {\n transitionClasses = {\n enterFrom,\n enterActive,\n enterTo,\n leaveFrom,\n leaveActive,\n leaveTo,\n };\n }\n\n // Create wrapper element with transition group metadata\n const groupKey =\n name || (preset ? `transition-group-${preset}` : 'transition-group');\n\n // Flatten anchor block children to enable proper keyed diffing\n // When each() is used, it creates anchor blocks. We need to extract the actual elements\n // and give them keys from their anchor blocks for proper reordering\n const flattenedChildren: VNode[] = [];\n for (const child of show ? children : []) {\n if (child && typeof child === 'object' && child.tag === '#anchor') {\n // Extract children from anchor block\n const anchorChildren = Array.isArray(child.children)\n ? child.children\n : [];\n for (const anchorChild of anchorChildren) {\n if (anchorChild && typeof anchorChild === 'object') {\n // Use anchor block's key for the child element\n const keyedChild = {\n ...anchorChild,\n key: child.key || anchorChild.key,\n props: {\n ...anchorChild.props,\n _anchorKey: child.key, // Preserve original anchor key\n },\n };\n flattenedChildren.push(keyedChild);\n } else {\n flattenedChildren.push(anchorChild);\n }\n }\n } else {\n flattenedChildren.push(child);\n }\n }\n\n // Serialize style object to a CSS string for the attrs record so it matches\n // the expected primitive attribute value types.\n const styleAttr = (() => {\n if (!style) return undefined;\n if (typeof style === 'string') return style;\n return Object.entries(style)\n .map(([k, v]) => `${k}: ${v}`)\n .join('; ');\n })();\n\n return {\n tag,\n children: flattenedChildren,\n key: groupKey,\n props: {\n attrs: {\n ...(className ? { class: className } : {}),\n ...(styleAttr ? { style: styleAttr } : {}),\n },\n _transitionGroup: {\n name: groupKey,\n classes: transitionClasses,\n moveClass,\n mode,\n duration,\n appear,\n css,\n hooks: {\n onBeforeEnter,\n onEnter,\n onAfterEnter,\n onEnterCancelled,\n onBeforeLeave,\n onLeave,\n onAfterLeave,\n onLeaveCancelled,\n },\n },\n },\n };\n}\n\n/**\n * Helper to create custom transition presets\n *\n * @example\n * ```ts\n * const customFade = createTransitionPreset({\n * enterFrom: 'opacity-0',\n * enterActive: 'transition-opacity duration-500 ease-out',\n * enterTo: 'opacity-100',\n * leaveFrom: 'opacity-100',\n * leaveActive: 'transition-opacity duration-300 ease-in',\n * leaveTo: 'opacity-0'\n * });\n *\n * ${Transition({ ...customFade, show: visible.value }, content)}\n * ```\n */\nexport function createTransitionPreset(\n classes: TransitionClasses,\n): TransitionClasses {\n return { ...classes };\n}\n\n/**\n * Pre-generate CSS for all transition preset classes\n * This ensures the JIT CSS system has the styles ready when transitions are used\n */\nlet transitionStyleSheet: CSSStyleSheet | null = null;\n\n/**\n * Get the global transition stylesheet (creates it if needed)\n */\nexport function getTransitionStyleSheet(): CSSStyleSheet {\n if (!transitionStyleSheet) {\n // If constructable stylesheets aren't available (SSR / old browsers),\n // return a no-op stub to avoid throwing during import or server render.\n if (typeof CSSStyleSheet === 'undefined') {\n transitionStyleSheet = {\n cssRules: [],\n replaceSync: () => {},\n toString: () => '',\n } as unknown as CSSStyleSheet;\n return transitionStyleSheet;\n }\n\n const allClasses: string[] = [];\n\n // Collect all classes from presets\n Object.values(transitionPresets).forEach((preset) => {\n if (preset.enterFrom) allClasses.push(preset.enterFrom);\n if (preset.enterActive) allClasses.push(preset.enterActive);\n if (preset.enterTo) allClasses.push(preset.enterTo);\n if (preset.leaveFrom) allClasses.push(preset.leaveFrom);\n if (preset.leaveActive) allClasses.push(preset.leaveActive);\n if (preset.leaveTo) allClasses.push(preset.leaveTo);\n });\n\n // Create a fake HTML string with all transition classes\n const fakeHtml = `<div class=\"${allClasses.join(' ')}\"></div>`;\n\n // Trigger JIT CSS generation\n const generatedCSS = jitCSS(fakeHtml);\n\n // Create stylesheet\n try {\n transitionStyleSheet = new CSSStyleSheet();\n transitionStyleSheet.replaceSync(generatedCSS);\n } catch {\n // If creating a constructable stylesheet fails for any reason,\n // fallback to a stub to avoid breaking SSR or older environments.\n transitionStyleSheet = {\n cssRules: [],\n replaceSync: () => {},\n toString: () => generatedCSS || '',\n } as unknown as CSSStyleSheet;\n }\n }\n\n return transitionStyleSheet;\n}\n\nfunction initializeTransitionCSS(): void {\n // Initialize lazily and only in environments that support it.\n if (typeof window === 'undefined' || typeof CSSStyleSheet === 'undefined') {\n return;\n }\n\n try {\n getTransitionStyleSheet();\n } catch {\n // swallow errors during initialization to avoid breaking SSR or tests\n }\n}\n\n// Attempt to initialize transition CSS in supported environments only\ninitializeTransitionCSS();\n"],"names":["proseSizes","generateProseCSS","className","match","variant","size","selector","rules","proseElements","generateProseElementModifier","utilityMap","parseSpacing","parseSpaceUtility","parseOpacity","parseColorWithOpacity","parseGradientColorStop","parseArbitrary","element","utility","elementSelector","utilityCSS","escapedClass","cssEscape","sel","elementSel","variables","css","strings","values","result","i","minifyCSS","baseResetSheet","getBaseResetSheet","baseReset","proseSheet","detectedProseSizes","proseCSSCache","getProseSheet","combinedProseCSS","registerProseSize","sizesChanged","sanitizeCSS","fallbackHex","colors","name","shades","shade","hex","spacing","semanticSizes","spacingProps","generateUtilities","utils","d","p","lineHeight","value","borderWidths","w","px","radiusMap","key","rem","cursors","c","z","TRANSFORM_COMPOSE","tx","v","ty","FILTER_COMPOSE","BACKDROP_FILTER_COMPOSE","parseProseClass","parseProseElementModifier","insertPseudoBeforeCombinator","pseudo","depth","ch","selectorVariants","body","mediaVariants","containerVariants","responsiveOrder","containerOrder","negative","raw","lastDashIndex","valueStr","numerator","denominator","percentage","prop","num","sign","direction","isHorizontal","hexToRgb","clean","bigint","colorRegex","propMap","parseColorClass","type","colorName","colorValue","parseOpacityModifier","slashIndex","base","opacityStr","opacity","paletteRule","varMatch","varExpr","pct","mix","fallbackHexMatch","propMatch","rgbExpr","varWithRgbFallback","rgb","arbitraryRule","position","inner","colonIndex","bracketStart","propMappings","cssProp","parseArbitraryVariant","token","str","length","char","code","escapeClassName","escapeRegExp","extractClassesFromHTML","html","classAttrRegex","classList","tokens","jitCssCache","MAX_CACHE_SIZE","jitCSS","cached","classes","seen","buckets","ruleCache","generateRuleCached","cls","stripDark","cacheKey","generateRule","classify","variants","hasResponsive","t","hasContainer","hasDark","splitVariants","input","parts","current","pseudoMap","basePart","important","part","checkPart","cleanBase","baseRule","baseIndex","SUBJECT","structural","subjectPseudos","innerPseudos","wrapperVariant","hasStartingStyle","supportsTokens","attrSel","variantSelector","fn","subjectPseudoStr","innerPseudoStr","insertPseudosIntoPost","post","pseudos","depthSquare","depthParen","idx","pre","subjectWithPseudos","postWithInner","DUAL_TOKEN","rulesArray","responsiveTokens","containerTokens","lastResponsive","lastContainer","mediaQuery","containerQuery","containerKey","supportsQuery","supportsValue","wrapRule","r","rule","proseCSS","baseClassEscaped","variantCSS","responsiveVariants","bucketNum","proseModIndex","potentialProseMod","proseModBase","baseProseCSS","fullEscaped","baseEscaped","fullProseCSS","ruleRegex","matches","prosePseudoMap","structuralVariants","pseudoVariants","arbitraryVariants","baseClassSelector","finalSelector","pseudoStr","arbVariant","wrappedCSS","breakpoint","containerName","cleaned","variantsForBucket","gradientStopRegex","generated","sortRulesByBreakpoint","a","b","getResponsivePixels","responsiveSizes","getContainerPixels","containerSizes","unit","aRespPx","bRespPx","aContPx","bContPx","transitionPresets","Transition","options","content","preset","show","mode","duration","appear","enterFrom","enterActive","enterTo","leaveFrom","leaveActive","leaveTo","onBeforeEnter","onEnter","onAfterEnter","onEnterCancelled","onBeforeLeave","onLeave","onAfterLeave","onLeaveCancelled","transitionClasses","transitionKey","transitionVNode","anchorBlock","TransitionGroup","children","tag","moveClass","style","groupKey","flattenedChildren","child","anchorChildren","anchorChild","keyedChild","styleAttr","k","createTransitionPreset","transitionStyleSheet","getTransitionStyleSheet","allClasses","fakeHtml","generatedCSS","initializeTransitionCSS"],"mappings":"6EAWMA,GAAa,CACjB,KAAM,CACJ,SAAU,OACV,WAAY,OACZ,EAAG,SACH,KAAM,SACN,GAAI,SACJ,GAAI,QACJ,GAAI,SACJ,GAAI,MACJ,WAAY,QACZ,OAAQ,MACR,KAAM,UACN,IAAK,UACL,GAAI,SACJ,GAAI,SACJ,GAAI,QACJ,GAAI,MACJ,MAAO,KAAA,EAET,GAAI,CACF,SAAU,WACV,WAAY,YACZ,EAAG,cACH,KAAM,cACN,GAAI,cACJ,GAAI,cACJ,GAAI,cACJ,GAAI,MACJ,WAAY,cACZ,OAAQ,cACR,KAAM,cACN,IAAK,cACL,GAAI,cACJ,GAAI,cACJ,GAAI,cACJ,GAAI,cACJ,MAAO,aAAA,EAET,GAAI,CACF,SAAU,WACV,WAAY,YACZ,EAAG,cACH,KAAM,cACN,GAAI,cACJ,GAAI,cACJ,GAAI,cACJ,GAAI,cACJ,WAAY,cACZ,OAAQ,cACR,KAAM,cACN,IAAK,cACL,GAAI,cACJ,GAAI,cACJ,GAAI,cACJ,GAAI,cACJ,MAAO,aAAA,EAET,GAAI,CACF,SAAU,UACV,WAAY,MACZ,EAAG,QACH,KAAM,QACN,GAAI,QACJ,GAAI,QACJ,GAAI,QACJ,GAAI,QACJ,WAAY,QACZ,OAAQ,QACR,KAAM,QACN,IAAK,QACL,GAAI,QACJ,GAAI,QACJ,GAAI,QACJ,GAAI,QACJ,MAAO,OAAA,EAET,MAAO,CACL,SAAU,SACV,WAAY,YACZ,EAAG,cACH,KAAM,cACN,GAAI,cACJ,GAAI,cACJ,GAAI,cACJ,GAAI,cACJ,WAAY,cACZ,OAAQ,cACR,KAAM,cACN,IAAK,cACL,GA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