@tenphi/tasty 2.9.0 → 2.10.0

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.
Files changed (58) hide show
  1. package/dist/{async-storage-B7_o6FKt.js → async-storage-DKK-wTD4.js} +1 -1
  2. package/dist/{async-storage-B7_o6FKt.js.map → async-storage-DKK-wTD4.js.map} +1 -1
  3. package/dist/{collector-CpU85p2G.d.ts → collector-CddJZDOr.d.ts} +2 -2
  4. package/dist/{collector-o-UYCV-b.js → collector-DCWdN88E.js} +4 -4
  5. package/dist/{collector-o-UYCV-b.js.map → collector-DCWdN88E.js.map} +1 -1
  6. package/dist/{config-3h7BtX4l.d.ts → config-C3SKYuxY.d.ts} +2 -2
  7. package/dist/{config-DOvjo65E.js → config-DA5FBnzm.js} +61 -36
  8. package/dist/config-DA5FBnzm.js.map +1 -0
  9. package/dist/{context-CkSg-kDT.js → context-CA8YKeMn.js} +1 -1
  10. package/dist/{context-CkSg-kDT.js.map → context-CA8YKeMn.js.map} +1 -1
  11. package/dist/core/index.d.ts +5 -5
  12. package/dist/core/index.js +5 -5
  13. package/dist/{core-CPx5Lqjr.js → core-BhlL-3k-.js} +5 -5
  14. package/dist/{core-CPx5Lqjr.js.map → core-BhlL-3k-.js.map} +1 -1
  15. package/dist/{css-writer-DJvsfR1w.js → css-writer-Cnj-KrI4.js} +3 -3
  16. package/dist/{css-writer-DJvsfR1w.js.map → css-writer-Cnj-KrI4.js.map} +1 -1
  17. package/dist/{format-global-rules-Dbc_1tc3.js → format-global-rules-DklyaXv-.js} +1 -1
  18. package/dist/{format-global-rules-Dbc_1tc3.js.map → format-global-rules-DklyaXv-.js.map} +1 -1
  19. package/dist/{format-rules-aRlqFAd1.js → format-rules-COR773Tn.js} +2 -2
  20. package/dist/{format-rules-aRlqFAd1.js.map → format-rules-COR773Tn.js.map} +1 -1
  21. package/dist/{hydrate-Ddw7yjyx.js → hydrate-F9olJTHt.js} +2 -2
  22. package/dist/{hydrate-Ddw7yjyx.js.map → hydrate-F9olJTHt.js.map} +1 -1
  23. package/dist/{index-C_SRmAWj.d.ts → index-ByBYTH9l.d.ts} +4 -4
  24. package/dist/{index-BsJz5xBF.d.ts → index-C5owZ15q.d.ts} +11 -4
  25. package/dist/index.d.ts +5 -5
  26. package/dist/index.js +8 -8
  27. package/dist/index.js.map +1 -1
  28. package/dist/{keyframes-C4ObN2Vc.js → keyframes-DZbGV4H4.js} +2 -2
  29. package/dist/{keyframes-C4ObN2Vc.js.map → keyframes-DZbGV4H4.js.map} +1 -1
  30. package/dist/{merge-styles-BzOwGOGC.d.ts → merge-styles-CvUi7SOD.d.ts} +2 -2
  31. package/dist/{merge-styles-BbyWO2Gc.js → merge-styles-DRUFVZH4.js} +2 -2
  32. package/dist/{merge-styles-BbyWO2Gc.js.map → merge-styles-DRUFVZH4.js.map} +1 -1
  33. package/dist/{resolve-recipes-CqTtBOKx.js → resolve-recipes-DUfJKJef.js} +3 -3
  34. package/dist/{resolve-recipes-CqTtBOKx.js.map → resolve-recipes-DUfJKJef.js.map} +1 -1
  35. package/dist/ssr/astro-client.js +1 -1
  36. package/dist/ssr/astro-client.js.map +1 -1
  37. package/dist/ssr/astro-middleware.js.map +1 -1
  38. package/dist/ssr/astro.js +7 -9
  39. package/dist/ssr/astro.js.map +1 -1
  40. package/dist/ssr/index.d.ts +1 -1
  41. package/dist/ssr/index.js +4 -4
  42. package/dist/ssr/index.js.map +1 -1
  43. package/dist/ssr/next.d.ts +2 -3
  44. package/dist/ssr/next.js +5 -5
  45. package/dist/ssr/next.js.map +1 -1
  46. package/dist/static/index.d.ts +2 -2
  47. package/dist/static/index.js +1 -1
  48. package/dist/static/index.js.map +1 -1
  49. package/dist/static/inject.js.map +1 -1
  50. package/dist/zero/babel.d.ts +2 -3
  51. package/dist/zero/babel.js +4 -4
  52. package/dist/zero/babel.js.map +1 -1
  53. package/dist/zero/index.d.ts +1 -1
  54. package/dist/zero/index.js +1 -1
  55. package/dist/zero/next.js.map +1 -1
  56. package/docs/styles.md +16 -1
  57. package/package.json +2 -2
  58. package/dist/config-DOvjo65E.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"css-writer-DJvsfR1w.js","names":[],"sources":["../src/zero/extractor.ts","../src/zero/css-writer.ts"],"sourcesContent":["import { createHash } from 'crypto';\n\nimport {\n categorizeStyleKeys,\n generateChunkCacheKey,\n renderStylesForChunk,\n} from '../chunks';\nimport type {\n CounterStyleDescriptors,\n FontFaceDescriptors,\n FontFaceInput,\n KeyframesSteps,\n} from '../injector/types';\nimport {\n extractLocalCounterStyle,\n formatCounterStyleRule,\n hasLocalCounterStyle,\n} from '../counter-style';\nimport {\n extractLocalFontFace,\n formatFontFaceRule,\n hasLocalFontFace,\n} from '../font-face';\nimport {\n extractAnimationNamesFromStyles,\n extractLocalKeyframes,\n filterUsedKeyframes,\n hasLocalKeyframes,\n mergeKeyframes,\n} from '../keyframes';\nimport type { StyleResult } from '../pipeline';\nimport { renderStyles } from '../pipeline';\nimport { extractLocalProperties, hasLocalProperties } from '../properties';\nimport { PropertyTypeResolver } from '../properties/property-type-resolver';\nimport type { Styles } from '../styles/types';\nimport {\n DEFAULT_ZERO_NAME_PREFIX,\n makeClassName,\n makeKeyframeName,\n validateNamePrefix,\n} from '../utils/name-prefix';\n\nexport interface ExtractedChunk {\n className: string;\n css: string;\n}\n\nexport interface ExtractedSelector {\n selector: string;\n css: string;\n}\n\nexport interface ExtractedKeyframes {\n name: string;\n css: string;\n}\n\ninterface KeyframesExtractionResult {\n /** Keyframes to inject (deduplicated by content) */\n keyframes: ExtractedKeyframes[];\n /** Map from original animation name to canonical name (for replacement) */\n nameMap: Map<string, string>;\n}\n\n/**\n * Module-level prefix used by the zero-runtime extractor.\n * Defaults to `'ts'` so static classes never collide with the runtime\n * `'t'` classes when both are loaded on the same page. Override via\n * `setExtractorNamePrefix()` from the Babel plugin so user config flows\n * into the extractor.\n */\nlet currentNamePrefix: string = DEFAULT_ZERO_NAME_PREFIX;\n\n/**\n * Set the prefix used by the zero-runtime extractor.\n * Called by the Babel plugin after resolving user config so that\n * generated class and keyframe names match the user's configuration.\n */\nexport function setExtractorNamePrefix(prefix: string): void {\n validateNamePrefix(prefix);\n currentNamePrefix = prefix;\n}\n\n/**\n * Get the prefix currently used by the zero-runtime extractor.\n * Exposed primarily for tests.\n */\nexport function getExtractorNamePrefix(): string {\n return currentNamePrefix;\n}\n\n/**\n * Generate a deterministic className from a cache key using content hash.\n * This ensures the same styles always produce the same className,\n * regardless of build order or incremental compilation.\n */\nfunction generateClassName(cacheKey: string): string {\n const hash = createHash('md5').update(cacheKey).digest('hex').slice(0, 6);\n return makeClassName(currentNamePrefix, hash);\n}\n\n/**\n * Extract styles using chunking (for className mode).\n * Returns multiple classes, one per chunk.\n */\nexport function extractStylesWithChunks(styles: Styles): ExtractedChunk[] {\n const chunks: ExtractedChunk[] = [];\n\n // Categorize style keys into chunks\n const chunkMap = categorizeStyleKeys(styles as Record<string, unknown>);\n\n for (const [chunkName, chunkStyleKeys] of chunkMap) {\n if (chunkStyleKeys.length === 0) continue;\n\n // Generate cache key for this chunk (used for className hash)\n const cacheKey = generateChunkCacheKey(styles, chunkName, chunkStyleKeys);\n\n // Render styles for this chunk\n const renderResult = renderStylesForChunk(\n styles,\n chunkName,\n chunkStyleKeys,\n );\n\n if (renderResult.rules.length === 0) continue;\n\n // Generate deterministic className from content hash\n const className = generateClassName(cacheKey);\n const selector = `.${className}.${className}`;\n\n // Format CSS\n const css = formatRulesToCSS(renderResult.rules, selector);\n\n chunks.push({ className, css });\n }\n\n return chunks;\n}\n\n/**\n * Extract styles for a specific selector (for global/selector mode).\n * Returns a single CSS block.\n */\nexport function extractStylesForSelector(\n selector: string,\n styles: Styles,\n): ExtractedSelector {\n // renderStyles with selector returns StyleResult[] with selectors already applied\n const rules = renderStyles(styles, selector);\n // Format without re-prefixing - rules already have the full selector\n const css = formatRulesDirectly(rules);\n\n return { selector, css };\n}\n\n/**\n * Format StyleResult[] to CSS string.\n * Prefixes each rule's selector with the base selector.\n * Used for chunked styles where rules have relative selectors.\n */\nfunction formatRulesToCSS(rules: StyleResult[], baseSelector: string): string {\n return rules\n .map((rule) => {\n // Handle selector as array (OR conditions) or string\n // Note: renderStyles without className joins array selectors with '|||' placeholder\n const selectorParts = Array.isArray(rule.selector)\n ? rule.selector\n : rule.selector\n ? rule.selector.split('|||')\n : [''];\n\n // Prefix each selector part with the base selector\n const fullSelector = selectorParts\n .map((part) => {\n // Build selector: [rootPrefix] baseSelector[part]\n let selector: string;\n\n // If part is empty, just use base selector\n if (!part) {\n selector = baseSelector;\n } else if (part.startsWith(':') || part.startsWith('[')) {\n // If part starts with a pseudo-class or pseudo-element, append to base\n selector = `${baseSelector}${part}`;\n } else if (\n part.startsWith('>') ||\n part.startsWith('+') ||\n part.startsWith('~')\n ) {\n // If part starts with >, +, ~ combinator, append with space\n selector = `${baseSelector}${part}`;\n } else {\n // Otherwise, combine base with part\n selector = `${baseSelector}${part}`;\n }\n\n // Prepend rootPrefix if present (for @root() states)\n if (rule.rootPrefix) {\n selector = `${rule.rootPrefix} ${selector}`;\n }\n\n return selector;\n })\n .join(', ');\n\n let css = `${fullSelector} { ${rule.declarations} }`;\n\n // Wrap in at-rules (in reverse order for proper nesting)\n if (rule.atRules && rule.atRules.length > 0) {\n for (const atRule of [...rule.atRules].reverse()) {\n css = `${atRule} {\\n ${css}\\n}`;\n }\n }\n\n return css;\n })\n .join('\\n\\n');\n}\n\n/**\n * Format StyleResult[] to CSS string directly without prefixing.\n * Used for global styles where rules already have the full selector.\n */\nfunction formatRulesDirectly(rules: StyleResult[]): string {\n return rules\n .map((rule) => {\n // Prepend rootPrefix if present (for @root() states)\n const selector = rule.rootPrefix\n ? `${rule.rootPrefix} ${rule.selector}`\n : rule.selector;\n\n let css = `${selector} { ${rule.declarations} }`;\n\n // Wrap in at-rules (in reverse order for proper nesting)\n if (rule.atRules && rule.atRules.length > 0) {\n for (const atRule of [...rule.atRules].reverse()) {\n css = `${atRule} {\\n ${css}\\n}`;\n }\n }\n\n return css;\n })\n .join('\\n\\n');\n}\n\n// Note: With hash-based className generation, counter management functions\n// are no longer needed. ClassNames are deterministic based on content.\n\n/**\n * Generate a deterministic keyframes name from content hash.\n * This ensures the same keyframes content always produces the same name,\n * enabling automatic deduplication across elements and files.\n *\n * Uses the configured prefix with a `k` discriminator so keyframe names\n * stay visually distinct from class names sharing the same prefix.\n */\nfunction generateKeyframesName(steps: KeyframesSteps): string {\n const content = JSON.stringify(steps);\n const hash = createHash('md5').update(content).digest('hex').slice(0, 6);\n return makeKeyframeName(currentNamePrefix, hash);\n}\n\n/**\n * Extract keyframes that are used in styles.\n * Merges local @keyframes with global keyframes, filters to only used ones.\n * Generates hash-based names from content for automatic deduplication.\n *\n * @param styles - The styles object (may contain @keyframes and animation properties)\n * @param globalKeyframes - Optional global keyframes from config\n * @returns Keyframes to inject and name mapping for replacement\n */\nexport function extractKeyframesFromStyles(\n styles: Styles,\n globalKeyframes?: Record<string, KeyframesSteps> | null,\n): KeyframesExtractionResult {\n const emptyResult: KeyframesExtractionResult = {\n keyframes: [],\n nameMap: new Map(),\n };\n\n // Extract animation names from styles\n const usedNames = extractAnimationNamesFromStyles(styles);\n if (usedNames.size === 0) return emptyResult;\n\n // Merge local and global keyframes\n const local = hasLocalKeyframes(styles)\n ? extractLocalKeyframes(styles)\n : null;\n const allKeyframes = mergeKeyframes(local, globalKeyframes ?? null);\n\n // Filter to only used keyframes\n const usedKeyframes = filterUsedKeyframes(allKeyframes, usedNames);\n if (!usedKeyframes) return emptyResult;\n\n // Generate hash-based names and collect unique keyframes\n const seenHashes = new Set<string>();\n const nameMap = new Map<string, string>();\n const keyframesToEmit: ExtractedKeyframes[] = [];\n\n for (const [originalName, steps] of Object.entries(usedKeyframes)) {\n const hashedName = generateKeyframesName(steps);\n\n // Always map original name to hashed name (for CSS replacement)\n nameMap.set(originalName, hashedName);\n\n // Only emit each unique keyframe once\n if (!seenHashes.has(hashedName)) {\n seenHashes.add(hashedName);\n const css = keyframesToCSS(hashedName, steps);\n keyframesToEmit.push({ name: hashedName, css });\n }\n }\n\n return { keyframes: keyframesToEmit, nameMap };\n}\n\n/**\n * Convert keyframes steps to CSS string.\n */\nfunction keyframesToCSS(name: string, steps: KeyframesSteps): string {\n const stepRules: string[] = [];\n\n for (const [key, value] of Object.entries(steps)) {\n if (typeof value === 'string') {\n // Raw CSS string\n stepRules.push(`${key} { ${value.trim()} }`);\n } else if (value && typeof value === 'object') {\n // Style map - convert to CSS declarations\n const declarations = Object.entries(value)\n .map(([prop, val]) => {\n const cssProperty = camelToKebab(prop);\n return `${cssProperty}: ${val}`;\n })\n .join('; ');\n stepRules.push(`${key} { ${declarations} }`);\n }\n }\n\n return `@keyframes ${name} { ${stepRules.join(' ')} }`;\n}\n\n/**\n * Convert camelCase to kebab-case.\n */\nfunction camelToKebab(str: string): string {\n return str.replace(/[A-Z]/g, (letter) => `-${letter.toLowerCase()}`);\n}\n\n// ============================================================================\n// Property Extraction (auto-infer @property types for zero-runtime)\n// ============================================================================\n\nexport interface ExtractedProperty {\n name: string;\n css: string;\n}\n\n/**\n * Extract auto-inferred @property declarations from styles.\n * Scans rendered style declarations and keyframe declarations for custom properties\n * whose types can be inferred from their values.\n *\n * @param styles - The styles object\n * @param options - Options including autoPropertyTypes flag\n * @returns Array of @property CSS rules to inject\n */\nexport function extractPropertiesFromStyles(\n styles: Styles,\n options?: { autoPropertyTypes?: boolean },\n): ExtractedProperty[] {\n if (options?.autoPropertyTypes === false) return [];\n\n const registered = new Set<string>();\n const results: ExtractedProperty[] = [];\n\n // Collect explicitly declared properties (they take precedence)\n if (hasLocalProperties(styles)) {\n const localProps = extractLocalProperties(styles);\n if (localProps) {\n for (const token of Object.keys(localProps)) {\n // Normalize token to CSS name\n let cssName: string;\n if (token.startsWith('#')) {\n cssName = `--${token.slice(1)}-color`;\n } else if (token.startsWith('$')) {\n cssName = `--${token.slice(1)}`;\n } else if (token.startsWith('--')) {\n cssName = token;\n } else {\n cssName = `--${token}`;\n }\n registered.add(cssName);\n }\n }\n }\n\n const resolver = new PropertyTypeResolver();\n\n const registerProperty = (\n name: string,\n syntax: string,\n initialValue: string,\n ) => {\n if (registered.has(name)) return;\n registered.add(name);\n\n const parts: string[] = [];\n parts.push(`syntax: \"${syntax}\";`);\n parts.push(`inherits: true;`);\n parts.push(`initial-value: ${initialValue};`);\n\n const css = `@property ${name} { ${parts.join(' ')} }`;\n results.push({ name, css });\n };\n\n const isPropertyDefined = (name: string) => registered.has(name);\n\n // Scan rendered style declarations\n const chunkMap = categorizeStyleKeys(styles as Record<string, unknown>);\n for (const [chunkName, chunkStyleKeys] of chunkMap) {\n if (chunkStyleKeys.length === 0) continue;\n const renderResult = renderStylesForChunk(\n styles,\n chunkName,\n chunkStyleKeys,\n );\n for (const rule of renderResult.rules) {\n if (!rule.declarations) continue;\n resolver.scanDeclarations(\n rule.declarations,\n isPropertyDefined,\n registerProperty,\n );\n }\n }\n\n // Scan keyframe declarations\n if (hasLocalKeyframes(styles)) {\n const localKf = extractLocalKeyframes(styles);\n if (localKf) {\n for (const steps of Object.values(localKf)) {\n scanKeyframeSteps(steps, resolver, isPropertyDefined, registerProperty);\n }\n }\n }\n\n return results;\n}\n\nfunction scanKeyframeSteps(\n steps: KeyframesSteps,\n resolver: PropertyTypeResolver,\n isPropertyDefined: (name: string) => boolean,\n registerProperty: (\n name: string,\n syntax: string,\n initialValue: string,\n ) => void,\n): void {\n for (const value of Object.values(steps)) {\n if (typeof value === 'string') {\n resolver.scanDeclarations(value, isPropertyDefined, registerProperty);\n } else if (value && typeof value === 'object') {\n const declarations = Object.entries(value)\n .map(([prop, val]) => {\n const cssProperty = camelToKebab(prop);\n return `${cssProperty}: ${val}`;\n })\n .join('; ');\n resolver.scanDeclarations(\n declarations,\n isPropertyDefined,\n registerProperty,\n );\n }\n }\n}\n\n// ============================================================================\n// Font Face Extraction (zero-runtime)\n// ============================================================================\n\nexport interface ExtractedFontFace {\n css: string;\n}\n\n/**\n * Extract @font-face rules from styles, merging with global config.\n * Deduplicates by content hash.\n */\nexport function extractFontFaceFromStyles(\n styles: Styles,\n globalFontFace?: Record<string, FontFaceInput> | null,\n): ExtractedFontFace[] {\n const results: ExtractedFontFace[] = [];\n const seenHashes = new Set<string>();\n\n function addFontFace(family: string, input: FontFaceInput) {\n const descriptors: FontFaceDescriptors[] = Array.isArray(input)\n ? input\n : [input];\n for (const desc of descriptors) {\n const hash = createHash('md5')\n .update(JSON.stringify({ family, ...desc }))\n .digest('hex')\n .slice(0, 8);\n if (!seenHashes.has(hash)) {\n seenHashes.add(hash);\n results.push({ css: formatFontFaceRule(family, desc) });\n }\n }\n }\n\n // Global font faces first\n if (globalFontFace) {\n for (const [family, input] of Object.entries(globalFontFace)) {\n addFontFace(family, input);\n }\n }\n\n // Local font faces (override globals with same hash)\n if (hasLocalFontFace(styles)) {\n const local = extractLocalFontFace(styles);\n if (local) {\n for (const [family, input] of Object.entries(local)) {\n addFontFace(family, input);\n }\n }\n }\n\n return results;\n}\n\n// ============================================================================\n// Counter Style Extraction (zero-runtime)\n// ============================================================================\n\nexport interface ExtractedCounterStyle {\n name: string;\n css: string;\n}\n\n/**\n * Extract @counter-style rules from styles, merging with global config.\n * Deduplicates by name (first definition wins).\n */\nexport function extractCounterStyleFromStyles(\n styles: Styles,\n globalCounterStyle?: Record<string, CounterStyleDescriptors> | null,\n): ExtractedCounterStyle[] {\n const results: ExtractedCounterStyle[] = [];\n const seenNames = new Set<string>();\n\n function addCounterStyle(name: string, descriptors: CounterStyleDescriptors) {\n if (!seenNames.has(name)) {\n seenNames.add(name);\n results.push({ name, css: formatCounterStyleRule(name, descriptors) });\n }\n }\n\n // Global counter styles first\n if (globalCounterStyle) {\n for (const [name, descriptors] of Object.entries(globalCounterStyle)) {\n addCounterStyle(name, descriptors);\n }\n }\n\n // Local counter styles (override globals with same name)\n if (hasLocalCounterStyle(styles)) {\n const local = extractLocalCounterStyle(styles);\n if (local) {\n for (const [name, descriptors] of Object.entries(local)) {\n addCounterStyle(name, descriptors);\n }\n }\n }\n\n return results;\n}\n","import * as fs from 'fs';\nimport * as path from 'path';\n\ninterface CSSWriterOptions {\n /** Enable source comments in output (e.g., \"from: Button.tsx\") */\n devMode?: boolean;\n}\n\ninterface CSSBlock {\n css: string;\n source?: string;\n}\n\nexport class CSSWriter {\n private cssBlocks = new Map<string, CSSBlock>();\n private outputPath: string;\n private devMode: boolean;\n\n constructor(outputPath: string, options: CSSWriterOptions = {}) {\n this.outputPath = outputPath;\n this.devMode = options.devMode ?? false;\n }\n\n /**\n * Add CSS block with deduplication key\n * @param key - Unique key for deduplication\n * @param css - CSS content\n * @param source - Optional source file path (used in devMode)\n */\n add(key: string, css: string, source?: string): void {\n this.cssBlocks.set(key, { css, source });\n }\n\n /**\n * Check if a key already exists\n */\n has(key: string): boolean {\n return this.cssBlocks.has(key);\n }\n\n /**\n * Get the number of CSS blocks\n */\n get size(): number {\n return this.cssBlocks.size;\n }\n\n /**\n * Write all collected CSS to the output file\n */\n write(): void {\n const outputDir = path.dirname(this.outputPath);\n\n // Ensure directory exists\n if (!fs.existsSync(outputDir)) {\n fs.mkdirSync(outputDir, { recursive: true });\n }\n\n // Combine all CSS blocks with optional source comments\n const cssBlocks: string[] = [];\n for (const block of this.cssBlocks.values()) {\n if (this.devMode && block.source) {\n cssBlocks.push(`/* from: ${block.source} */\\n${block.css}`);\n } else {\n cssBlocks.push(block.css);\n }\n }\n const css = cssBlocks.join('\\n\\n');\n\n // Add header comment\n const header = `/* Generated by @tenphi/tasty/zero - DO NOT EDIT */\\n\\n`;\n\n fs.writeFileSync(this.outputPath, header + css);\n }\n\n /**\n * Get all CSS as string (for testing or in-memory use)\n */\n getCSS(): string {\n const cssBlocks: string[] = [];\n for (const block of this.cssBlocks.values()) {\n if (this.devMode && block.source) {\n cssBlocks.push(`/* from: ${block.source} */\\n${block.css}`);\n } else {\n cssBlocks.push(block.css);\n }\n }\n return cssBlocks.join('\\n\\n');\n }\n\n /**\n * Clear all collected CSS\n */\n clear(): void {\n this.cssBlocks.clear();\n }\n\n /**\n * Get the output path\n */\n getOutputPath(): string {\n return this.outputPath;\n }\n}\n"],"mappings":";;;;;;;;;;;;;AAuEA,IAAI,oBAAA;;;;;;AAOJ,SAAgB,uBAAuB,QAAsB;CAC3D,mBAAmB,OAAO;CAC1B,oBAAoB;;;;;;;AAgBtB,SAAS,kBAAkB,UAA0B;CACnD,MAAM,OAAO,WAAW,MAAM,CAAC,OAAO,SAAS,CAAC,OAAO,MAAM,CAAC,MAAM,GAAG,EAAE;CACzE,OAAO,cAAc,mBAAmB,KAAK;;;;;;AAO/C,SAAgB,wBAAwB,QAAkC;CACxE,MAAM,SAA2B,EAAE;CAGnC,MAAM,WAAW,oBAAoB,OAAkC;CAEvE,KAAK,MAAM,CAAC,WAAW,mBAAmB,UAAU;EAClD,IAAI,eAAe,WAAW,GAAG;EAGjC,MAAM,WAAW,sBAAsB,QAAQ,WAAW,eAAe;EAGzE,MAAM,eAAe,qBACnB,QACA,WACA,eACD;EAED,IAAI,aAAa,MAAM,WAAW,GAAG;EAGrC,MAAM,YAAY,kBAAkB,SAAS;EAC7C,MAAM,WAAW,IAAI,UAAU,GAAG;EAGlC,MAAM,MAAM,iBAAiB,aAAa,OAAO,SAAS;EAE1D,OAAO,KAAK;GAAE;GAAW;GAAK,CAAC;;CAGjC,OAAO;;;;;;AAOT,SAAgB,yBACd,UACA,QACmB;CAMnB,OAAO;EAAE;EAAU,KAFP,oBAFE,aAAa,QAAQ,SAEE,CAEf;EAAE;;;;;;;AAQ1B,SAAS,iBAAiB,OAAsB,cAA8B;CAC5E,OAAO,MACJ,KAAK,SAAS;EA0Cb,IAAI,MAAM,IAvCY,MAAM,QAAQ,KAAK,SAAS,GAC9C,KAAK,WACL,KAAK,WACH,KAAK,SAAS,MAAM,MAAM,GAC1B,CAAC,GAAG,EAIP,KAAK,SAAS;GAEb,IAAI;GAGJ,IAAI,CAAC,MACH,WAAW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AAY,4DAAS,IAAI;;;;;CAMjD,SAAiB;EACf,MAAM,YAAsB,EAAE;EAC9B,KAAK,MAAM,SAAS,KAAK,UAAU,QAAQ,EACzC,IAAI,KAAK,WAAW,MAAM,QACxB,UAAU,KAAK,YAAY,MAAM,OAAO,OAAO,MAAM,MAAM;OAE3D,UAAU,KAAK,MAAM,IAAI;EAG7B,OAAO,UAAU,KAAK,OAAO;;;;;CAM/B,QAAc;EACZ,KAAK,UAAU,OAAO;;;;;CAMxB,gBAAwB;EACtB,OAAO,KAAK"}
1
+ {"version":3,"file":"css-writer-Cnj-KrI4.js","names":[],"sources":["../src/zero/extractor.ts","../src/zero/css-writer.ts"],"sourcesContent":["import { createHash } from 'crypto';\n\nimport {\n categorizeStyleKeys,\n generateChunkCacheKey,\n renderStylesForChunk,\n} from '../chunks';\nimport type {\n CounterStyleDescriptors,\n FontFaceDescriptors,\n FontFaceInput,\n KeyframesSteps,\n} from '../injector/types';\nimport {\n extractLocalCounterStyle,\n formatCounterStyleRule,\n hasLocalCounterStyle,\n} from '../counter-style';\nimport {\n extractLocalFontFace,\n formatFontFaceRule,\n hasLocalFontFace,\n} from '../font-face';\nimport {\n extractAnimationNamesFromStyles,\n extractLocalKeyframes,\n filterUsedKeyframes,\n hasLocalKeyframes,\n mergeKeyframes,\n} from '../keyframes';\nimport type { StyleResult } from '../pipeline';\nimport { renderStyles } from '../pipeline';\nimport { extractLocalProperties, hasLocalProperties } from '../properties';\nimport { PropertyTypeResolver } from '../properties/property-type-resolver';\nimport type { Styles } from '../styles/types';\nimport {\n DEFAULT_ZERO_NAME_PREFIX,\n makeClassName,\n makeKeyframeName,\n validateNamePrefix,\n} from '../utils/name-prefix';\n\nexport interface ExtractedChunk {\n className: string;\n css: string;\n}\n\nexport interface ExtractedSelector {\n selector: string;\n css: string;\n}\n\nexport interface ExtractedKeyframes {\n name: string;\n css: string;\n}\n\ninterface KeyframesExtractionResult {\n /** Keyframes to inject (deduplicated by content) */\n keyframes: ExtractedKeyframes[];\n /** Map from original animation name to canonical name (for replacement) */\n nameMap: Map<string, string>;\n}\n\n/**\n * Module-level prefix used by the zero-runtime extractor.\n * Defaults to `'ts'` so static classes never collide with the runtime\n * `'t'` classes when both are loaded on the same page. Override via\n * `setExtractorNamePrefix()` from the Babel plugin so user config flows\n * into the extractor.\n */\nlet currentNamePrefix: string = DEFAULT_ZERO_NAME_PREFIX;\n\n/**\n * Set the prefix used by the zero-runtime extractor.\n * Called by the Babel plugin after resolving user config so that\n * generated class and keyframe names match the user's configuration.\n */\nexport function setExtractorNamePrefix(prefix: string): void {\n validateNamePrefix(prefix);\n currentNamePrefix = prefix;\n}\n\n/**\n * Get the prefix currently used by the zero-runtime extractor.\n * Exposed primarily for tests.\n */\nexport function getExtractorNamePrefix(): string {\n return currentNamePrefix;\n}\n\n/**\n * Generate a deterministic className from a cache key using content hash.\n * This ensures the same styles always produce the same className,\n * regardless of build order or incremental compilation.\n */\nfunction generateClassName(cacheKey: string): string {\n const hash = createHash('md5').update(cacheKey).digest('hex').slice(0, 6);\n return makeClassName(currentNamePrefix, hash);\n}\n\n/**\n * Extract styles using chunking (for className mode).\n * Returns multiple classes, one per chunk.\n */\nexport function extractStylesWithChunks(styles: Styles): ExtractedChunk[] {\n const chunks: ExtractedChunk[] = [];\n\n // Categorize style keys into chunks\n const chunkMap = categorizeStyleKeys(styles as Record<string, unknown>);\n\n for (const [chunkName, chunkStyleKeys] of chunkMap) {\n if (chunkStyleKeys.length === 0) continue;\n\n // Generate cache key for this chunk (used for className hash)\n const cacheKey = generateChunkCacheKey(styles, chunkName, chunkStyleKeys);\n\n // Render styles for this chunk\n const renderResult = renderStylesForChunk(\n styles,\n chunkName,\n chunkStyleKeys,\n );\n\n if (renderResult.rules.length === 0) continue;\n\n // Generate deterministic className from content hash\n const className = generateClassName(cacheKey);\n const selector = `.${className}.${className}`;\n\n // Format CSS\n const css = formatRulesToCSS(renderResult.rules, selector);\n\n chunks.push({ className, css });\n }\n\n return chunks;\n}\n\n/**\n * Extract styles for a specific selector (for global/selector mode).\n * Returns a single CSS block.\n */\nexport function extractStylesForSelector(\n selector: string,\n styles: Styles,\n): ExtractedSelector {\n // renderStyles with selector returns StyleResult[] with selectors already applied\n const rules = renderStyles(styles, selector);\n // Format without re-prefixing - rules already have the full selector\n const css = formatRulesDirectly(rules);\n\n return { selector, css };\n}\n\n/**\n * Format StyleResult[] to CSS string.\n * Prefixes each rule's selector with the base selector.\n * Used for chunked styles where rules have relative selectors.\n */\nfunction formatRulesToCSS(rules: StyleResult[], baseSelector: string): string {\n return rules\n .map((rule) => {\n // Handle selector as array (OR conditions) or string\n // Note: renderStyles without className joins array selectors with '|||' placeholder\n const selectorParts = Array.isArray(rule.selector)\n ? rule.selector\n : rule.selector\n ? rule.selector.split('|||')\n : [''];\n\n // Prefix each selector part with the base selector\n const fullSelector = selectorParts\n .map((part) => {\n // Build selector: [rootPrefix] baseSelector[part]\n let selector: string;\n\n // If part is empty, just use base selector\n if (!part) {\n selector = baseSelector;\n } else if (part.startsWith(':') || part.startsWith('[')) {\n // If part starts with a pseudo-class or pseudo-element, append to base\n selector = `${baseSelector}${part}`;\n } else if (\n part.startsWith('>') ||\n part.startsWith('+') ||\n part.startsWith('~')\n ) {\n // If part starts with >, +, ~ combinator, append with space\n selector = `${baseSelector}${part}`;\n } else {\n // Otherwise, combine base with part\n selector = `${baseSelector}${part}`;\n }\n\n // Prepend rootPrefix if present (for @root() states)\n if (rule.rootPrefix) {\n selector = `${rule.rootPrefix} ${selector}`;\n }\n\n return selector;\n })\n .join(', ');\n\n let css = `${fullSelector} { ${rule.declarations} }`;\n\n // Wrap in at-rules (in reverse order for proper nesting)\n if (rule.atRules && rule.atRules.length > 0) {\n for (const atRule of [...rule.atRules].reverse()) {\n css = `${atRule} {\\n ${css}\\n}`;\n }\n }\n\n return css;\n })\n .join('\\n\\n');\n}\n\n/**\n * Format StyleResult[] to CSS string directly without prefixing.\n * Used for global styles where rules already have the full selector.\n */\nfunction formatRulesDirectly(rules: StyleResult[]): string {\n return rules\n .map((rule) => {\n // Prepend rootPrefix if present (for @root() states)\n const selector = rule.rootPrefix\n ? `${rule.rootPrefix} ${rule.selector}`\n : rule.selector;\n\n let css = `${selector} { ${rule.declarations} }`;\n\n // Wrap in at-rules (in reverse order for proper nesting)\n if (rule.atRules && rule.atRules.length > 0) {\n for (const atRule of [...rule.atRules].reverse()) {\n css = `${atRule} {\\n ${css}\\n}`;\n }\n }\n\n return css;\n })\n .join('\\n\\n');\n}\n\n// Note: With hash-based className generation, counter management functions\n// are no longer needed. ClassNames are deterministic based on content.\n\n/**\n * Generate a deterministic keyframes name from content hash.\n * This ensures the same keyframes content always produces the same name,\n * enabling automatic deduplication across elements and files.\n *\n * Uses the configured prefix with a `k` discriminator so keyframe names\n * stay visually distinct from class names sharing the same prefix.\n */\nfunction generateKeyframesName(steps: KeyframesSteps): string {\n const content = JSON.stringify(steps);\n const hash = createHash('md5').update(content).digest('hex').slice(0, 6);\n return makeKeyframeName(currentNamePrefix, hash);\n}\n\n/**\n * Extract keyframes that are used in styles.\n * Merges local @keyframes with global keyframes, filters to only used ones.\n * Generates hash-based names from content for automatic deduplication.\n *\n * @param styles - The styles object (may contain @keyframes and animation properties)\n * @param globalKeyframes - Optional global keyframes from config\n * @returns Keyframes to inject and name mapping for replacement\n */\nexport function extractKeyframesFromStyles(\n styles: Styles,\n globalKeyframes?: Record<string, KeyframesSteps> | null,\n): KeyframesExtractionResult {\n const emptyResult: KeyframesExtractionResult = {\n keyframes: [],\n nameMap: new Map(),\n };\n\n // Extract animation names from styles\n const usedNames = extractAnimationNamesFromStyles(styles);\n if (usedNames.size === 0) return emptyResult;\n\n // Merge local and global keyframes\n const local = hasLocalKeyframes(styles)\n ? extractLocalKeyframes(styles)\n : null;\n const allKeyframes = mergeKeyframes(local, globalKeyframes ?? null);\n\n // Filter to only used keyframes\n const usedKeyframes = filterUsedKeyframes(allKeyframes, usedNames);\n if (!usedKeyframes) return emptyResult;\n\n // Generate hash-based names and collect unique keyframes\n const seenHashes = new Set<string>();\n const nameMap = new Map<string, string>();\n const keyframesToEmit: ExtractedKeyframes[] = [];\n\n for (const [originalName, steps] of Object.entries(usedKeyframes)) {\n const hashedName = generateKeyframesName(steps);\n\n // Always map original name to hashed name (for CSS replacement)\n nameMap.set(originalName, hashedName);\n\n // Only emit each unique keyframe once\n if (!seenHashes.has(hashedName)) {\n seenHashes.add(hashedName);\n const css = keyframesToCSS(hashedName, steps);\n keyframesToEmit.push({ name: hashedName, css });\n }\n }\n\n return { keyframes: keyframesToEmit, nameMap };\n}\n\n/**\n * Convert keyframes steps to CSS string.\n */\nfunction keyframesToCSS(name: string, steps: KeyframesSteps): string {\n const stepRules: string[] = [];\n\n for (const [key, value] of Object.entries(steps)) {\n if (typeof value === 'string') {\n // Raw CSS string\n stepRules.push(`${key} { ${value.trim()} }`);\n } else if (value && typeof value === 'object') {\n // Style map - convert to CSS declarations\n const declarations = Object.entries(value)\n .map(([prop, val]) => {\n const cssProperty = camelToKebab(prop);\n return `${cssProperty}: ${val}`;\n })\n .join('; ');\n stepRules.push(`${key} { ${declarations} }`);\n }\n }\n\n return `@keyframes ${name} { ${stepRules.join(' ')} }`;\n}\n\n/**\n * Convert camelCase to kebab-case.\n */\nfunction camelToKebab(str: string): string {\n return str.replace(/[A-Z]/g, (letter) => `-${letter.toLowerCase()}`);\n}\n\n// ============================================================================\n// Property Extraction (auto-infer @property types for zero-runtime)\n// ============================================================================\n\nexport interface ExtractedProperty {\n name: string;\n css: string;\n}\n\n/**\n * Extract auto-inferred @property declarations from styles.\n * Scans rendered style declarations and keyframe declarations for custom properties\n * whose types can be inferred from their values.\n *\n * @param styles - The styles object\n * @param options - Options including autoPropertyTypes flag\n * @returns Array of @property CSS rules to inject\n */\nexport function extractPropertiesFromStyles(\n styles: Styles,\n options?: { autoPropertyTypes?: boolean },\n): ExtractedProperty[] {\n if (options?.autoPropertyTypes === false) return [];\n\n const registered = new Set<string>();\n const results: ExtractedProperty[] = [];\n\n // Collect explicitly declared properties (they take precedence)\n if (hasLocalProperties(styles)) {\n const localProps = extractLocalProperties(styles);\n if (localProps) {\n for (const token of Object.keys(localProps)) {\n // Normalize token to CSS name\n let cssName: string;\n if (token.startsWith('#')) {\n cssName = `--${token.slice(1)}-color`;\n } else if (token.startsWith('$')) {\n cssName = `--${token.slice(1)}`;\n } else if (token.startsWith('--')) {\n cssName = token;\n } else {\n cssName = `--${token}`;\n }\n registered.add(cssName);\n }\n }\n }\n\n const resolver = new PropertyTypeResolver();\n\n const registerProperty = (\n name: string,\n syntax: string,\n initialValue: string,\n ) => {\n if (registered.has(name)) return;\n registered.add(name);\n\n const parts: string[] = [];\n parts.push(`syntax: \"${syntax}\";`);\n parts.push(`inherits: true;`);\n parts.push(`initial-value: ${initialValue};`);\n\n const css = `@property ${name} { ${parts.join(' ')} }`;\n results.push({ name, css });\n };\n\n const isPropertyDefined = (name: string) => registered.has(name);\n\n // Scan rendered style declarations\n const chunkMap = categorizeStyleKeys(styles as Record<string, unknown>);\n for (const [chunkName, chunkStyleKeys] of chunkMap) {\n if (chunkStyleKeys.length === 0) continue;\n const renderResult = renderStylesForChunk(\n styles,\n chunkName,\n chunkStyleKeys,\n );\n for (const rule of renderResult.rules) {\n if (!rule.declarations) continue;\n resolver.scanDeclarations(\n rule.declarations,\n isPropertyDefined,\n registerProperty,\n );\n }\n }\n\n // Scan keyframe declarations\n if (hasLocalKeyframes(styles)) {\n const localKf = extractLocalKeyframes(styles);\n if (localKf) {\n for (const steps of Object.values(localKf)) {\n scanKeyframeSteps(steps, resolver, isPropertyDefined, registerProperty);\n }\n }\n }\n\n return results;\n}\n\nfunction scanKeyframeSteps(\n steps: KeyframesSteps,\n resolver: PropertyTypeResolver,\n isPropertyDefined: (name: string) => boolean,\n registerProperty: (\n name: string,\n syntax: string,\n initialValue: string,\n ) => void,\n): void {\n for (const value of Object.values(steps)) {\n if (typeof value === 'string') {\n resolver.scanDeclarations(value, isPropertyDefined, registerProperty);\n } else if (value && typeof value === 'object') {\n const declarations = Object.entries(value)\n .map(([prop, val]) => {\n const cssProperty = camelToKebab(prop);\n return `${cssProperty}: ${val}`;\n })\n .join('; ');\n resolver.scanDeclarations(\n declarations,\n isPropertyDefined,\n registerProperty,\n );\n }\n }\n}\n\n// ============================================================================\n// Font Face Extraction (zero-runtime)\n// ============================================================================\n\nexport interface ExtractedFontFace {\n css: string;\n}\n\n/**\n * Extract @font-face rules from styles, merging with global config.\n * Deduplicates by content hash.\n */\nexport function extractFontFaceFromStyles(\n styles: Styles,\n globalFontFace?: Record<string, FontFaceInput> | null,\n): ExtractedFontFace[] {\n const results: ExtractedFontFace[] = [];\n const seenHashes = new Set<string>();\n\n function addFontFace(family: string, input: FontFaceInput) {\n const descriptors: FontFaceDescriptors[] = Array.isArray(input)\n ? input\n : [input];\n for (const desc of descriptors) {\n const hash = createHash('md5')\n .update(JSON.stringify({ family, ...desc }))\n .digest('hex')\n .slice(0, 8);\n if (!seenHashes.has(hash)) {\n seenHashes.add(hash);\n results.push({ css: formatFontFaceRule(family, desc) });\n }\n }\n }\n\n // Global font faces first\n if (globalFontFace) {\n for (const [family, input] of Object.entries(globalFontFace)) {\n addFontFace(family, input);\n }\n }\n\n // Local font faces (override globals with same hash)\n if (hasLocalFontFace(styles)) {\n const local = extractLocalFontFace(styles);\n if (local) {\n for (const [family, input] of Object.entries(local)) {\n addFontFace(family, input);\n }\n }\n }\n\n return results;\n}\n\n// ============================================================================\n// Counter Style Extraction (zero-runtime)\n// ============================================================================\n\nexport interface ExtractedCounterStyle {\n name: string;\n css: string;\n}\n\n/**\n * Extract @counter-style rules from styles, merging with global config.\n * Deduplicates by name (first definition wins).\n */\nexport function extractCounterStyleFromStyles(\n styles: Styles,\n globalCounterStyle?: Record<string, CounterStyleDescriptors> | null,\n): ExtractedCounterStyle[] {\n const results: ExtractedCounterStyle[] = [];\n const seenNames = new Set<string>();\n\n function addCounterStyle(name: string, descriptors: CounterStyleDescriptors) {\n if (!seenNames.has(name)) {\n seenNames.add(name);\n results.push({ name, css: formatCounterStyleRule(name, descriptors) });\n }\n }\n\n // Global counter styles first\n if (globalCounterStyle) {\n for (const [name, descriptors] of Object.entries(globalCounterStyle)) {\n addCounterStyle(name, descriptors);\n }\n }\n\n // Local counter styles (override globals with same name)\n if (hasLocalCounterStyle(styles)) {\n const local = extractLocalCounterStyle(styles);\n if (local) {\n for (const [name, descriptors] of Object.entries(local)) {\n addCounterStyle(name, descriptors);\n }\n }\n }\n\n return results;\n}\n","import * as fs from 'fs';\nimport * as path from 'path';\n\ninterface CSSWriterOptions {\n /** Enable source comments in output (e.g., \"from: Button.tsx\") */\n devMode?: boolean;\n}\n\ninterface CSSBlock {\n css: string;\n source?: string;\n}\n\nexport class CSSWriter {\n private cssBlocks = new Map<string, CSSBlock>();\n private outputPath: string;\n private devMode: boolean;\n\n constructor(outputPath: string, options: CSSWriterOptions = {}) {\n this.outputPath = outputPath;\n this.devMode = options.devMode ?? false;\n }\n\n /**\n * Add CSS block with deduplication key\n * @param key - Unique key for deduplication\n * @param css - CSS content\n * @param source - Optional source file path (used in devMode)\n */\n add(key: string, css: string, source?: string): void {\n this.cssBlocks.set(key, { css, source });\n }\n\n /**\n * Check if a key already exists\n */\n has(key: string): boolean {\n return this.cssBlocks.has(key);\n }\n\n /**\n * Get the number of CSS blocks\n */\n get size(): number {\n return this.cssBlocks.size;\n }\n\n /**\n * Write all collected CSS to the output file\n */\n write(): void {\n const outputDir = path.dirname(this.outputPath);\n\n // Ensure directory exists\n if (!fs.existsSync(outputDir)) {\n fs.mkdirSync(outputDir, { recursive: true });\n }\n\n // Combine all CSS blocks with optional source comments\n const cssBlocks: string[] = [];\n for (const block of this.cssBlocks.values()) {\n if (this.devMode && block.source) {\n cssBlocks.push(`/* from: ${block.source} */\\n${block.css}`);\n } else {\n cssBlocks.push(block.css);\n }\n }\n const css = cssBlocks.join('\\n\\n');\n\n // Add header comment\n const header = `/* Generated by @tenphi/tasty/zero - DO NOT EDIT */\\n\\n`;\n\n fs.writeFileSync(this.outputPath, header + css);\n }\n\n /**\n * Get all CSS as string (for testing or in-memory use)\n */\n getCSS(): string {\n const cssBlocks: string[] = [];\n for (const block of this.cssBlocks.values()) {\n if (this.devMode && block.source) {\n cssBlocks.push(`/* from: ${block.source} */\\n${block.css}`);\n } else {\n cssBlocks.push(block.css);\n }\n }\n return cssBlocks.join('\\n\\n');\n }\n\n /**\n * Clear all collected CSS\n */\n clear(): void {\n this.cssBlocks.clear();\n }\n\n /**\n * Get the output path\n */\n getOutputPath(): string {\n return this.outputPath;\n }\n}\n"],"mappings":";;;;;;;;;;;;;AAuEA,IAAI,oBAAA;;;;;;AAOJ,SAAgB,uBAAuB,QAAsB;CAC3D,mBAAmB,MAAM;CACzB,oBAAoB;AACtB;;;;;;AAeA,SAAS,kBAAkB,UAA0B;CACnD,MAAM,OAAO,WAAW,KAAK,CAAC,CAAC,OAAO,QAAQ,CAAC,CAAC,OAAO,KAAK,CAAC,CAAC,MAAM,GAAG,CAAC;CACxE,OAAO,cAAc,mBAAmB,IAAI;AAC9C;;;;;AAMA,SAAgB,wBAAwB,QAAkC;CACxE,MAAM,SAA2B,CAAC;CAGlC,MAAM,WAAW,oBAAoB,MAAiC;CAEtE,KAAK,MAAM,CAAC,WAAW,mBAAmB,UAAU;EAClD,IAAI,eAAe,WAAW,GAAG;EAGjC,MAAM,WAAW,sBAAsB,QAAQ,WAAW,cAAc;EAGxE,MAAM,eAAe,qBACnB,QACA,WACA,cACF;EAEA,IAAI,aAAa,MAAM,WAAW,GAAG;EAGrC,MAAM,YAAY,kBAAkB,QAAQ;EAC5C,MAAM,WAAW,IAAI,UAAU,GAAG;EAGlC,MAAM,MAAM,iBAAiB,aAAa,OAAO,QAAQ;EAEzD,OAAO,KAAK;GAAE;GAAW;EAAI,CAAC;CAChC;CAEA,OAAO;AACT;;;;;AAMA,SAAgB,yBACd,UACA,QACmB;CAMnB,OAAO;EAAE;EAAU,KAFP,oBAFE,aAAa,QAAQ,Q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AC;CACzC;;;;CAKA,IAAI,KAAsB;EACxB,OAAO,KAAK,UAAU,IAAI,GAAG;CAC/B;;;;CAKA,IAAI,OAAe;EACjB,OAAO,KAAK,UAAU;CACxB;;;;CAKA,QAAc;EACZ,MAAM,YAAY,KAAK,QAAQ,KAAK,UAAU;EAG9C,IAAI,CAAC,GAAG,WAAW,SAAS,GAC1B,GAAG,UAAU,WAAW,EAAE,WAAW,KAAK,CAAC;EAI7C,MAAM,YAAsB,CAAC;EAC7B,KAAK,MAAM,SAAS,KAAK,UAAU,OAAO,GACxC,IAAI,KAAK,WAAW,MAAM,QACxB,UAAU,KAAK,YAAY,MAAM,OAAO,OAAO,MAAM,KAAK;OAE1D,UAAU,KAAK,MAAM,GAAG;EAG5B,MAAM,MAAM,UAAU,KAAK,MAAM;EAKjC,GAAG,cAAc,KAAK,YAAY,4DAAS,GAAG;CAChD;;;;CAKA,SAAiB;EACf,MAAM,YAAsB,CAAC;EAC7B,KAAK,MAAM,SAAS,KAAK,UAAU,OAAO,GACxC,IAAI,KAAK,WAAW,MAAM,QACxB,UAAU,KAAK,YAAY,MAAM,OAAO,OAAO,MAAM,KAAK;OAE1D,UAAU,KAAK,MAAM,GAAG;EAG5B,OAAO,UAAU,KAAK,MAAM;CAC9B;;;;CAKA,QAAc;EACZ,KAAK,UAAU,MAAM;CACvB;;;;CAKA,gBAAwB;EACtB,OAAO,KAAK;CACd;AACF"}
@@ -19,4 +19,4 @@ function formatGlobalRules(rules) {
19
19
  //#endregion
20
20
  export { formatGlobalRules as t };
21
21
 
22
- //# sourceMappingURL=format-global-rules-Dbc_1tc3.js.map
22
+ //# sourceMappingURL=format-global-rules-DklyaXv-.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"format-global-rules-Dbc_1tc3.js","names":[],"sources":["../src/ssr/format-global-rules.ts"],"sourcesContent":["/**\n * Format global CSS rules for SSR output.\n *\n * Unlike formatRules() which applies className-based specificity doubling,\n * this function formats rules that already have their full selectors\n * (from renderStyles called with a selector string).\n */\n\nimport type { StyleResult } from '../pipeline';\n\n/**\n * Format an array of global StyleResult rules into a CSS text string.\n *\n * Rules already have their full selectors applied by renderStyles().\n * Handles rootPrefix prepending and at-rule wrapping.\n */\nexport function formatGlobalRules(rules: StyleResult[]): string {\n if (rules.length === 0) return '';\n\n const cssRules: string[] = [];\n\n for (const rule of rules) {\n const selector = rule.rootPrefix\n ? `${rule.rootPrefix} ${rule.selector}`\n : rule.selector;\n\n const baseRule = `${selector} { ${rule.declarations} }`;\n\n let fullRule = baseRule;\n if (rule.atRules && rule.atRules.length > 0) {\n fullRule = rule.atRules.reduce(\n (css, atRule) => `${atRule} { ${css} }`,\n baseRule,\n );\n }\n\n cssRules.push(fullRule);\n }\n\n return cssRules.join('\\n');\n}\n"],"mappings":";;;;;;;AAgBA,SAAgB,kBAAkB,OAA8B;CAC9D,IAAI,MAAM,WAAW,GAAG,OAAO;CAE/B,MAAM,WAAqB,EAAE;CAE7B,KAAK,MAAM,QAAQ,OAAO;EAKxB,MAAM,WAAW,GAJA,KAAK,aAClB,GAAG,KAAK,WAAW,GAAG,KAAK,aAC3B,KAAK,SAEoB,KAAK,KAAK,aAAa;EAEpD,IAAI,WAAW;EACf,IAAI,KAAK,WAAW,KAAK,QAAQ,SAAS,GACxC,WAAW,KAAK,QAAQ,QACrB,KAAK,WAAW,GAAG,OAAO,KAAK,IAAI,KACpC,SACD;EAGH,SAAS,KAAK,SAAS;;CAGzB,OAAO,SAAS,KAAK,KAAK"}
1
+ {"version":3,"file":"format-global-rules-DklyaXv-.js","names":[],"sources":["../src/ssr/format-global-rules.ts"],"sourcesContent":["/**\n * Format global CSS rules for SSR output.\n *\n * Unlike formatRules() which applies className-based specificity doubling,\n * this function formats rules that already have their full selectors\n * (from renderStyles called with a selector string).\n */\n\nimport type { StyleResult } from '../pipeline';\n\n/**\n * Format an array of global StyleResult rules into a CSS text string.\n *\n * Rules already have their full selectors applied by renderStyles().\n * Handles rootPrefix prepending and at-rule wrapping.\n */\nexport function formatGlobalRules(rules: StyleResult[]): string {\n if (rules.length === 0) return '';\n\n const cssRules: string[] = [];\n\n for (const rule of rules) {\n const selector = rule.rootPrefix\n ? `${rule.rootPrefix} ${rule.selector}`\n : rule.selector;\n\n const baseRule = `${selector} { ${rule.declarations} }`;\n\n let fullRule = baseRule;\n if (rule.atRules && rule.atRules.length > 0) {\n fullRule = rule.atRules.reduce(\n (css, atRule) => `${atRule} { ${css} }`,\n baseRule,\n );\n }\n\n cssRules.push(fullRule);\n }\n\n return cssRules.join('\\n');\n}\n"],"mappings":";;;;;;;AAgBA,SAAgB,kBAAkB,OAA8B;CAC9D,IAAI,MAAM,WAAW,GAAG,OAAO;CAE/B,MAAM,WAAqB,CAAC;CAE5B,KAAK,MAAM,QAAQ,OAAO;EAKxB,MAAM,WAAW,GAJA,KAAK,aAClB,GAAG,KAAK,WAAW,GAAG,KAAK,aAC3B,KAAK,SAEoB,KAAK,KAAK,aAAa;EAEpD,IAAI,WAAW;EACf,IAAI,KAAK,WAAW,KAAK,QAAQ,SAAS,GACxC,WAAW,KAAK,QAAQ,QACrB,KAAK,WAAW,GAAG,OAAO,KAAK,IAAI,KACpC,QACF;EAGF,SAAS,KAAK,QAAQ;CACxB;CAEA,OAAO,SAAS,KAAK,IAAI;AAC3B"}
@@ -1,4 +1,4 @@
1
- import { Ct as getComponentPropertySyntax, St as getColorSpaceSuffix, et as parseStyle, jt as getEffectiveDefinition, yt as colorInitialValueToComponents } from "./config-DOvjo65E.js";
1
+ import { Ct as getComponentPropertySyntax, St as getColorSpaceSuffix, et as parseStyle, jt as getEffectiveDefinition, yt as colorInitialValueToComponents } from "./config-DA5FBnzm.js";
2
2
  //#region src/ssr/ssr-collector-ref.ts
3
3
  const GETTER_KEY = "__tasty_ssr_collector_getter__";
4
4
  let _getSSRCollector = null;
@@ -140,4 +140,4 @@ function formatRules(rules, className) {
140
140
  //#endregion
141
141
  export { registerSSRCollectorGetterGlobal as a, registerSSRCollectorGetter as i, formatPropertyCSS as n, getRegisteredSSRCollector as r, formatRules as t };
142
142
 
143
- //# sourceMappingURL=format-rules-aRlqFAd1.js.map
143
+ //# sourceMappingURL=format-rules-COR773Tn.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"format-rules-aRlqFAd1.js","names":[],"sources":["../src/ssr/ssr-collector-ref.ts","../src/ssr/format-property.ts","../src/ssr/format-rules.ts"],"sourcesContent":["/**\n * Global reference to the SSR collector getter function.\n *\n * This indirection avoids importing 'node:async_hooks' in the browser bundle.\n * The SSR entry point sets this ref when loaded on the server. The useStyles\n * hook calls it if set; on the client it stays null and is never called.\n *\n * Uses a module-level variable as the primary mechanism. In Next.js App\n * Router the RSC and SSR module graphs load separate copies of this module,\n * so the getter registered by TastyRegistry (SSR layer) is invisible to\n * server components (RSC layer) — which correctly fall through to inline\n * RSC styles.\n *\n * A globalThis fallback (`registerSSRCollectorGetterGlobal`) is provided\n * for frameworks like Astro where middleware and page components live in\n * different module graphs and must share the getter across them.\n */\n\nimport type { ServerStyleCollector } from './collector';\n\ntype SSRCollectorGetter = () => ServerStyleCollector | null;\n\nconst GETTER_KEY = '__tasty_ssr_collector_getter__';\n\nlet _getSSRCollector: SSRCollectorGetter | null = null;\n\n/**\n * Register the collector getter in the current module graph only.\n * Used by Next.js TastyRegistry.\n */\nexport function registerSSRCollectorGetter(fn: SSRCollectorGetter): void {\n _getSSRCollector = fn;\n}\n\n/**\n * Register the collector getter on globalThis so it is visible across\n * separate module graphs (e.g. Astro middleware ↔ page components).\n */\nexport function registerSSRCollectorGetterGlobal(fn: SSRCollectorGetter): void {\n (globalThis as Record<string, unknown>)[GETTER_KEY] = fn;\n}\n\n/**\n * Retrieve the SSR collector: module-level first, globalThis fallback.\n */\nexport function getRegisteredSSRCollector(): ServerStyleCollector | null {\n if (_getSSRCollector) return _getSSRCollector();\n const getter = (globalThis as Record<string, unknown>)[GETTER_KEY] as\n | SSRCollectorGetter\n | undefined;\n return getter ? getter() : null;\n}\n","/**\n * Format @property CSS rules for SSR output.\n *\n * Replicates the CSS construction from StyleInjector.property()\n * but returns a CSS string instead of inserting into the DOM.\n */\n\nimport type { PropertyDefinition } from '../injector/types';\nimport { getEffectiveDefinition } from '../properties';\nimport {\n colorInitialValueToComponents,\n getColorSpaceSuffix,\n getComponentPropertySyntax,\n} from '../utils/color-space';\nimport type { StyleValue } from '../utils/styles';\nimport { parseStyle } from '../utils/styles';\n\n/**\n * Format a single @property rule as a CSS string.\n *\n * Returns the full `@property --name { ... }` text, or empty string\n * if the token is invalid. For color properties, also returns\n * the companion component property.\n */\nexport function formatPropertyCSS(\n token: string,\n definition: PropertyDefinition,\n): string {\n const result = getEffectiveDefinition(token, definition);\n if (!result.isValid) return '';\n\n const rules: string[] = [];\n\n rules.push(buildPropertyRule(result.cssName, result.definition));\n\n if (result.isColor) {\n const suffix = getColorSpaceSuffix();\n const componentCssName = `${result.cssName}-${suffix}`;\n const componentInitial = colorInitialValueToComponents(\n result.definition.initialValue,\n );\n rules.push(\n buildPropertyRule(componentCssName, {\n syntax: getComponentPropertySyntax(),\n inherits: result.definition.inherits,\n initialValue: componentInitial,\n }),\n );\n }\n\n return rules.join('\\n');\n}\n\nfunction buildPropertyRule(\n cssName: string,\n definition: PropertyDefinition,\n): string {\n const parts: string[] = [];\n\n if (definition.syntax != null) {\n let syntax = String(definition.syntax).trim();\n if (!/^['\"]/u.test(syntax)) syntax = `\"${syntax}\"`;\n parts.push(`syntax: ${syntax};`);\n }\n\n const inherits = definition.inherits ?? true;\n parts.push(`inherits: ${inherits ? 'true' : 'false'};`);\n\n if (definition.initialValue != null) {\n let initialValueStr: string;\n if (typeof definition.initialValue === 'number') {\n initialValueStr = String(definition.initialValue);\n } else {\n initialValueStr = parseStyle(\n definition.initialValue as StyleValue,\n ).output;\n }\n parts.push(`initial-value: ${initialValueStr};`);\n }\n\n const declarations = parts.join(' ').trim();\n return `@property ${cssName} { ${declarations} }`;\n}\n","/**\n * Shared CSS rule formatting utility.\n *\n * Extracted from SheetManager to allow both the DOM-based injector (client)\n * and the ServerStyleCollector (server) to produce identical CSS text\n * from StyleResult arrays.\n */\n\nimport type { StyleResult } from '../pipeline';\n\n/**\n * Resolve selectors for a rule, applying className-based specificity doubling\n * and rootPrefix handling. Mirrors the logic in StyleInjector.inject().\n */\nfunction resolveSelector(rule: StyleResult, className: string): string {\n let selector = rule.selector;\n\n if (rule.needsClassName) {\n const selectorParts = selector ? selector.split('|||') : [''];\n const classPrefix = `.${className}.${className}`;\n\n selector = selectorParts\n .map((part) => {\n const classSelector = part ? `${classPrefix}${part}` : classPrefix;\n\n if (rule.rootPrefix) {\n return `${rule.rootPrefix} ${classSelector}`;\n }\n return classSelector;\n })\n .join(', ');\n }\n\n return selector;\n}\n\ninterface GroupedRule {\n selector: string;\n declarations: string;\n atRules?: string[];\n startingStyle?: boolean;\n}\n\n/**\n * Group rules by selector + at-rules + startingStyle and merge their declarations.\n * Mirrors the grouping logic in SheetManager.insertRule().\n */\nfunction groupRules(rules: GroupedRule[]): GroupedRule[] {\n const groupMap = new Map<string, GroupedRule>();\n const order: string[] = [];\n\n const atKey = (at?: string[]) => (at && at.length ? at.join('|') : '');\n\n for (const r of rules) {\n const key = `${atKey(r.atRules)}||${r.selector}||${r.startingStyle ? '1' : '0'}`;\n const existing = groupMap.get(key);\n if (existing) {\n existing.declarations = existing.declarations\n ? `${existing.declarations} ${r.declarations}`\n : r.declarations;\n } else {\n groupMap.set(key, {\n selector: r.selector,\n atRules: r.atRules,\n startingStyle: r.startingStyle,\n declarations: r.declarations,\n });\n order.push(key);\n }\n }\n\n return order.map((key) => groupMap.get(key)!);\n}\n\n/**\n * Format an array of StyleResult rules into a CSS text string.\n *\n * Applies className-based specificity doubling (.cls.cls),\n * groups rules by selector + at-rules, and wraps with at-rule blocks.\n *\n * Produces the same CSS text as SheetManager.insertRule() would insert\n * into the DOM, but as a plain string suitable for SSR output.\n */\nexport function formatRules(rules: StyleResult[], className: string): string {\n if (rules.length === 0) return '';\n\n const resolvedRules = rules.map((rule) => ({\n selector: resolveSelector(rule, className),\n declarations: rule.declarations,\n atRules: rule.atRules,\n startingStyle: rule.startingStyle,\n }));\n\n const grouped = groupRules(resolvedRules);\n const cssRules: string[] = [];\n\n for (const rule of grouped) {\n const innerContent = rule.startingStyle\n ? `@starting-style { ${rule.declarations} }`\n : rule.declarations;\n const baseRule = `${rule.selector} { ${innerContent} }`;\n\n let fullRule = baseRule;\n if (rule.atRules && rule.atRules.length > 0) {\n fullRule = rule.atRules.reduce(\n (css, atRule) => `${atRule} { ${css} }`,\n baseRule,\n );\n }\n\n cssRules.push(fullRule);\n }\n\n return cssRules.join('\\n');\n}\n"],"mappings":";;AAsBA,MAAM,aAAa;AAEnB,IAAI,mBAA8C;;;;;AAMlD,SAAgB,2BAA2B,IAA8B;CACvE,mBAAmB;;;;;;AAOrB,SAAgB,iCAAiC,IAA8B;CAC7E,WAAwC,cAAc;;;;;AAMxD,SAAgB,4BAAyD;CACvE,IAAI,kBAAkB,OAAO,kBAAkB;CAC/C,MAAM,SAAU,WAAuC;CAGvD,OAAO,SAAS,QAAQ,GAAG;;;;;;;;;;;AC1B7B,SAAgB,kBACd,OACA,YACQ;CACR,MAAM,SAAS,uBAAuB,OAAO,WAAW;CACxD,IAAI,CAAC,OAAO,SAAS,OAAO;CAE5B,MAAM,QAAkB,EAAE;CAE1B,MAAM,KAAK,kBAAkB,OAAO,SAAS,OAAO,WAAW,CAAC;CAEhE,IAAI,OAAO,SAAS;EAClB,MAAM,SAAS,qBAAqB;EACpC,MAAM,mBAAmB,GAAG,OAAO,QAAQ,GAAG;EAC9C,MAAM,mBAAmB,8BACvB,OAAO,WAAW,aACnB;EACD,MAAM,KACJ,kBAAkB,kBAAkB;GAClC,QAAQ,4BAA4B;GACpC,UAAU,OAAO,WAAW;GAC5B,cAAc;GACf,CAAC,CACH;;CAGH,OAAO,MAAM,KAAK,KAAK;;AAGzB,SAAS,kBACP,SACA,YACQ;CACR,MAAM,QAAkB,EAAE;CAE1B,IAAI,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AS,eAC7B,GAAG,SAAS,aAAa,GAAG,EAAE,iBAC9B,EAAE;OACD;GACL,SAAS,IAAI,KAAK;IAChB,UAAU,EAAE;IACZ,SAAS,EAAE;IACX,eAAe,EAAE;IACjB,cAAc,EAAE;IACjB,CAAC;GACF,MAAM,KAAK,IAAI;;;CAInB,OAAO,MAAM,KAAK,QAAQ,SAAS,IAAI,IAAI,CAAE;;;;;;;;;;;AAY/C,SAAgB,YAAY,OAAsB,WAA2B;CAC3E,IAAI,MAAM,WAAW,GAAG,OAAO;CAS/B,MAAM,UAAU,WAPM,MAAM,KAAK,UAAU;EACzC,UAAU,gBAAgB,MAAM,UAAU;EAC1C,cAAc,KAAK;EACnB,SAAS,KAAK;EACd,eAAe,KAAK;EACrB,EAEuC,CAAC;CACzC,MAAM,WAAqB,EAAE;CAE7B,KAAK,MAAM,QAAQ,SAAS;EAC1B,MAAM,eAAe,KAAK,gBACtB,qBAAqB,KAAK,aAAa,MACvC,KAAK;EACT,MAAM,WAAW,GAAG,KAAK,SAAS,KAAK,aAAa;EAEpD,IAAI,WAAW;EACf,IAAI,KAAK,WAAW,KAAK,QAAQ,SAAS,GACxC,WAAW,KAAK,QAAQ,QACrB,KAAK,WAAW,GAAG,OAAO,KAAK,IAAI,KACpC,SACD;EAGH,SAAS,KAAK,SAAS;;CAGzB,OAAO,SAAS,KAAK,KAAK"}
1
+ {"version":3,"file":"format-rules-COR773Tn.js","names":[],"sources":["../src/ssr/ssr-collector-ref.ts","../src/ssr/format-property.ts","../src/ssr/format-rules.ts"],"sourcesContent":["/**\n * Global reference to the SSR collector getter function.\n *\n * This indirection avoids importing 'node:async_hooks' in the browser bundle.\n * The SSR entry point sets this ref when loaded on the server. The useStyles\n * hook calls it if set; on the client it stays null and is never called.\n *\n * Uses a module-level variable as the primary mechanism. In Next.js App\n * Router the RSC and SSR module graphs load separate copies of this module,\n * so the getter registered by TastyRegistry (SSR layer) is invisible to\n * server components (RSC layer) — which correctly fall through to inline\n * RSC styles.\n *\n * A globalThis fallback (`registerSSRCollectorGetterGlobal`) is provided\n * for frameworks like Astro where middleware and page components live in\n * different module graphs and must share the getter across them.\n */\n\nimport type { ServerStyleCollector } from './collector';\n\ntype SSRCollectorGetter = () => ServerStyleCollector | null;\n\nconst GETTER_KEY = '__tasty_ssr_collector_getter__';\n\nlet _getSSRCollector: SSRCollectorGetter | null = null;\n\n/**\n * Register the collector getter in the current module graph only.\n * Used by Next.js TastyRegistry.\n */\nexport function registerSSRCollectorGetter(fn: SSRCollectorGetter): void {\n _getSSRCollector = fn;\n}\n\n/**\n * Register the collector getter on globalThis so it is visible across\n * separate module graphs (e.g. Astro middleware ↔ page components).\n */\nexport function registerSSRCollectorGetterGlobal(fn: SSRCollectorGetter): void {\n (globalThis as Record<string, unknown>)[GETTER_KEY] = fn;\n}\n\n/**\n * Retrieve the SSR collector: module-level first, globalThis fallback.\n */\nexport function getRegisteredSSRCollector(): ServerStyleCollector | null {\n if (_getSSRCollector) return _getSSRCollector();\n const getter = (globalThis as Record<string, unknown>)[GETTER_KEY] as\n | SSRCollectorGetter\n | undefined;\n return getter ? getter() : null;\n}\n","/**\n * Format @property CSS rules for SSR output.\n *\n * Replicates the CSS construction from StyleInjector.property()\n * but returns a CSS string instead of inserting into the DOM.\n */\n\nimport type { PropertyDefinition } from '../injector/types';\nimport { getEffectiveDefinition } from '../properties';\nimport {\n colorInitialValueToComponents,\n getColorSpaceSuffix,\n getComponentPropertySyntax,\n} from '../utils/color-space';\nimport type { StyleValue } from '../utils/styles';\nimport { parseStyle } from '../utils/styles';\n\n/**\n * Format a single @property rule as a CSS string.\n *\n * Returns the full `@property --name { ... }` text, or empty string\n * if the token is invalid. For color properties, also returns\n * the companion component property.\n */\nexport function formatPropertyCSS(\n token: string,\n definition: PropertyDefinition,\n): string {\n const result = getEffectiveDefinition(token, definition);\n if (!result.isValid) return '';\n\n const rules: string[] = [];\n\n rules.push(buildPropertyRule(result.cssName, result.definition));\n\n if (result.isColor) {\n const suffix = getColorSpaceSuffix();\n const componentCssName = `${result.cssName}-${suffix}`;\n const componentInitial = colorInitialValueToComponents(\n result.definition.initialValue,\n );\n rules.push(\n buildPropertyRule(componentCssName, {\n syntax: getComponentPropertySyntax(),\n inherits: result.definition.inherits,\n initialValue: componentInitial,\n }),\n );\n }\n\n return rules.join('\\n');\n}\n\nfunction buildPropertyRule(\n cssName: string,\n definition: PropertyDefinition,\n): string {\n const parts: string[] = [];\n\n if (definition.syntax != null) {\n let syntax = String(definition.syntax).trim();\n if (!/^['\"]/u.test(syntax)) syntax = `\"${syntax}\"`;\n parts.push(`syntax: ${syntax};`);\n }\n\n const inherits = definition.inherits ?? true;\n parts.push(`inherits: ${inherits ? 'true' : 'false'};`);\n\n if (definition.initialValue != null) {\n let initialValueStr: string;\n if (typeof definition.initialValue === 'number') {\n initialValueStr = String(definition.initialValue);\n } else {\n initialValueStr = parseStyle(\n definition.initialValue as StyleValue,\n ).output;\n }\n parts.push(`initial-value: ${initialValueStr};`);\n }\n\n const declarations = parts.join(' ').trim();\n return `@property ${cssName} { ${declarations} }`;\n}\n","/**\n * Shared CSS rule formatting utility.\n *\n * Extracted from SheetManager to allow both the DOM-based injector (client)\n * and the ServerStyleCollector (server) to produce identical CSS text\n * from StyleResult arrays.\n */\n\nimport type { StyleResult } from '../pipeline';\n\n/**\n * Resolve selectors for a rule, applying className-based specificity doubling\n * and rootPrefix handling. Mirrors the logic in StyleInjector.inject().\n */\nfunction resolveSelector(rule: StyleResult, className: string): string {\n let selector = rule.selector;\n\n if (rule.needsClassName) {\n const selectorParts = selector ? selector.split('|||') : [''];\n const classPrefix = `.${className}.${className}`;\n\n selector = selectorParts\n .map((part) => {\n const classSelector = part ? `${classPrefix}${part}` : classPrefix;\n\n if (rule.rootPrefix) {\n return `${rule.rootPrefix} ${classSelector}`;\n }\n return classSelector;\n })\n .join(', ');\n }\n\n return selector;\n}\n\ninterface GroupedRule {\n selector: string;\n declarations: string;\n atRules?: string[];\n startingStyle?: boolean;\n}\n\n/**\n * Group rules by selector + at-rules + startingStyle and merge their declarations.\n * Mirrors the grouping logic in SheetManager.insertRule().\n */\nfunction groupRules(rules: GroupedRule[]): GroupedRule[] {\n const groupMap = new Map<string, GroupedRule>();\n const order: string[] = [];\n\n const atKey = (at?: string[]) => (at && at.length ? at.join('|') : '');\n\n for (const r of rules) {\n const key = `${atKey(r.atRules)}||${r.selector}||${r.startingStyle ? '1' : '0'}`;\n const existing = groupMap.get(key);\n if (existing) {\n existing.declarations = existing.declarations\n ? `${existing.declarations} ${r.declarations}`\n : r.declarations;\n } else {\n groupMap.set(key, {\n selector: r.selector,\n atRules: r.atRules,\n startingStyle: r.startingStyle,\n declarations: r.declarations,\n });\n order.push(key);\n }\n }\n\n return order.map((key) => groupMap.get(key)!);\n}\n\n/**\n * Format an array of StyleResult rules into a CSS text string.\n *\n * Applies className-based specificity doubling (.cls.cls),\n * groups rules by selector + at-rules, and wraps with at-rule blocks.\n *\n * Produces the same CSS text as SheetManager.insertRule() would insert\n * into the DOM, but as a plain string suitable for SSR output.\n */\nexport function formatRules(rules: StyleResult[], className: string): string {\n if (rules.length === 0) return '';\n\n const resolvedRules = rules.map((rule) => ({\n selector: resolveSelector(rule, className),\n declarations: rule.declarations,\n atRules: rule.atRules,\n startingStyle: rule.startingStyle,\n }));\n\n const grouped = groupRules(resolvedRules);\n const cssRules: string[] = [];\n\n for (const rule of grouped) {\n const innerContent = rule.startingStyle\n ? `@starting-style { ${rule.declarations} }`\n : rule.declarations;\n const baseRule = `${rule.selector} { ${innerContent} }`;\n\n let fullRule = baseRule;\n if (rule.atRules && rule.atRules.length > 0) {\n fullRule = rule.atRules.reduce(\n (css, atRule) => `${atRule} { ${css} }`,\n baseRule,\n );\n }\n\n cssRules.push(fullRule);\n }\n\n return cssRules.join('\\n');\n}\n"],"mappings":";;AAsBA,MAAM,aAAa;AAEnB,IAAI,mBAA8C;;;;;AAMlD,SAAgB,2BAA2B,IAA8B;CACvE,mBAAmB;AACrB;;;;;AAMA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AAK;EACd,eAAe,KAAK;CACtB,EAEuC,CAAC;CACxC,MAAM,WAAqB,CAAC;CAE5B,KAAK,MAAM,QAAQ,SAAS;EAC1B,MAAM,eAAe,KAAK,gBACtB,qBAAqB,KAAK,aAAa,MACvC,KAAK;EACT,MAAM,WAAW,GAAG,KAAK,SAAS,KAAK,aAAa;EAEpD,IAAI,WAAW;EACf,IAAI,KAAK,WAAW,KAAK,QAAQ,SAAS,GACxC,WAAW,KAAK,QAAQ,QACrB,KAAK,WAAW,GAAG,OAAO,KAAK,IAAI,KACpC,QACF;EAGF,SAAS,KAAK,QAAQ;CACxB;CAEA,OAAO,SAAS,KAAK,IAAI;AAC3B"}
@@ -1,4 +1,4 @@
1
- import { s as getGlobalInjector } from "./config-DOvjo65E.js";
1
+ import { s as getGlobalInjector } from "./config-DA5FBnzm.js";
2
2
  //#region src/ssr/hydrate.ts
3
3
  /**
4
4
  * Client-side cache hydration for SSR/RSC.
@@ -42,4 +42,4 @@ function hydrateTastyCache(state) {
42
42
  //#endregion
43
43
  export { hydrateTastyClasses as n, hydrateTastyCache as t };
44
44
 
45
- //# sourceMappingURL=hydrate-Ddw7yjyx.js.map
45
+ //# sourceMappingURL=hydrate-F9olJTHt.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"hydrate-Ddw7yjyx.js","names":[],"sources":["../src/ssr/hydrate.ts"],"sourcesContent":["/**\n * Client-side cache hydration for SSR/RSC.\n *\n * Pre-populates the client injector's rules map with class names\n * rendered on the server. With hash-based naming, the client derives\n * the same class name from the same cache key, so only the class name\n * list needs to cross the wire — no cache keys or counters.\n */\n\nimport { getGlobalInjector } from '../config';\nimport { HYDRATED_RULE_INDEX } from '../injector/types';\n\n/**\n * Pre-populate the client-side style registry from the server's class name list.\n *\n * Call this before ReactDOM.hydrateRoot() or ensure it runs before\n * any tasty() component renders on the client.\n *\n * When called without arguments, reads the class list from `window.__TASTY__`\n * (populated by inline scripts emitted during SSR/RSC streaming).\n */\nexport function hydrateTastyClasses(classes?: string[]): void {\n if (typeof document === 'undefined') return;\n\n if (!classes) {\n classes = typeof window !== 'undefined' ? window.__TASTY__ : undefined;\n }\n\n if (!classes?.length) return;\n\n const injector = getGlobalInjector();\n const registry = injector._sheetManager.getRegistry(document);\n\n for (const cls of classes) {\n if (!registry.rules.has(cls)) {\n registry.rules.set(cls, {\n className: cls,\n ruleIndex: HYDRATED_RULE_INDEX,\n sheetIndex: HYDRATED_RULE_INDEX,\n });\n registry.refCounts.set(cls, 0);\n }\n }\n}\n\n/**\n * @deprecated Use `hydrateTastyClasses()` instead. This alias exists\n * for backwards compatibility and will be removed in a future major version.\n */\nexport function hydrateTastyCache(state?: {\n entries?: Record<string, string>;\n}): void {\n if (state?.entries) {\n hydrateTastyClasses(Object.values(state.entries));\n } else {\n hydrateTastyClasses();\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAqBA,SAAgB,oBAAoB,SAA0B;CAC5D,IAAI,OAAO,aAAa,aAAa;CAErC,IAAI,CAAC,SACH,UAAU,OAAO,WAAW,cAAc,OAAO,YAAY,KAAA;CAG/D,IAAI,CAAC,SAAS,QAAQ;CAGtB,MAAM,WADW,mBACQ,CAAC,cAAc,YAAY,SAAS;CAE7D,KAAK,MAAM,OAAO,SAChB,IAAI,CAAC,SAAS,MAAM,IAAI,IAAI,EAAE;EAC5B,SAAS,MAAM,IAAI,KAAK;GACtB,WAAW;GACX,WAAA;GACA,YAAA;GACD,CAAC;EACF,SAAS,UAAU,IAAI,KAAK,EAAE;;;;;;;AASpC,SAAgB,kBAAkB,OAEzB;CACP,IAAI,OAAO,SACT,oBAAoB,OAAO,OAAO,MAAM,QAAQ,CAAC;MAEjD,qBAAqB"}
1
+ {"version":3,"file":"hydrate-F9olJTHt.js","names":[],"sources":["../src/ssr/hydrate.ts"],"sourcesContent":["/**\n * Client-side cache hydration for SSR/RSC.\n *\n * Pre-populates the client injector's rules map with class names\n * rendered on the server. With hash-based naming, the client derives\n * the same class name from the same cache key, so only the class name\n * list needs to cross the wire — no cache keys or counters.\n */\n\nimport { getGlobalInjector } from '../config';\nimport { HYDRATED_RULE_INDEX } from '../injector/types';\n\n/**\n * Pre-populate the client-side style registry from the server's class name list.\n *\n * Call this before ReactDOM.hydrateRoot() or ensure it runs before\n * any tasty() component renders on the client.\n *\n * When called without arguments, reads the class list from `window.__TASTY__`\n * (populated by inline scripts emitted during SSR/RSC streaming).\n */\nexport function hydrateTastyClasses(classes?: string[]): void {\n if (typeof document === 'undefined') return;\n\n if (!classes) {\n classes = typeof window !== 'undefined' ? window.__TASTY__ : undefined;\n }\n\n if (!classes?.length) return;\n\n const injector = getGlobalInjector();\n const registry = injector._sheetManager.getRegistry(document);\n\n for (const cls of classes) {\n if (!registry.rules.has(cls)) {\n registry.rules.set(cls, {\n className: cls,\n ruleIndex: HYDRATED_RULE_INDEX,\n sheetIndex: HYDRATED_RULE_INDEX,\n });\n registry.refCounts.set(cls, 0);\n }\n }\n}\n\n/**\n * @deprecated Use `hydrateTastyClasses()` instead. This alias exists\n * for backwards compatibility and will be removed in a future major version.\n */\nexport function hydrateTastyCache(state?: {\n entries?: Record<string, string>;\n}): void {\n if (state?.entries) {\n hydrateTastyClasses(Object.values(state.entries));\n } else {\n hydrateTastyClasses();\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAqBA,SAAgB,oBAAoB,SAA0B;CAC5D,IAAI,OAAO,aAAa,aAAa;CAErC,IAAI,CAAC,SACH,UAAU,OAAO,WAAW,cAAc,OAAO,YAAY,KAAA;CAG/D,IAAI,CAAC,SAAS,QAAQ;CAGtB,MAAM,WADW,kBACO,CAAC,CAAC,cAAc,YAAY,QAAQ;CAE5D,KAAK,MAAM,OAAO,SAChB,IAAI,CAAC,SAAS,MAAM,IAAI,GAAG,GAAG;EAC5B,SAAS,MAAM,IAAI,KAAK;GACtB,WAAW;GACX,WAAA;GACA,YAAA;EACF,CAAC;EACD,SAAS,UAAU,IAAI,KAAK,CAAC;CAC/B;AAEJ;;;;;AAMA,SAAgB,kBAAkB,OAEzB;CACP,IAAI,OAAO,SACT,oBAAoB,OAAO,OAAO,MAAM,OAAO,CAAC;MAEhD,oBAAoB;AAExB"}
@@ -1,6 +1,6 @@
1
- import { Dt as StyleInjectorConfig, I as StyleValue, L as StyleValueStateMap, b as Styles, bt as KeyframesResult, ct as CacheMetrics, dt as FontFaceDescriptors, ft as FontFaceInput, gt as InjectResult, ht as GlobalInjectResult, it as StyleDetails, lt as CounterStyleDescriptors, mt as GCOptions, n as StyleResult, st as CSSProperties$1, x as StylesInterface, xt as KeyframesSteps } from "./index-BsJz5xBF.js";
2
- import { g as TastyPluginFactory, x as StyleInjector } from "./config-3h7BtX4l.js";
3
- import { t as ServerStyleCollector } from "./collector-CpU85p2G.js";
1
+ import { Dt as StyleInjectorConfig, I as StyleValue, L as StyleValueStateMap, b as Styles, bt as KeyframesResult, ct as CacheMetrics, dt as FontFaceDescriptors, ft as FontFaceInput, gt as InjectResult, ht as GlobalInjectResult, it as StyleDetails, lt as CounterStyleDescriptors, mt as GCOptions, n as StyleResult, st as CSSProperties$1, x as StylesInterface, xt as KeyframesSteps } from "./index-C5owZ15q.js";
2
+ import { g as TastyPluginFactory, x as StyleInjector } from "./config-C3SKYuxY.js";
3
+ import { t as ServerStyleCollector } from "./collector-CddJZDOr.js";
4
4
  import { AllHTMLAttributes, CSSProperties, ComponentType, ElementType, ForwardRefExoticComponent, JSX, PropsWithoutRef, RefAttributes } from "react";
5
5
 
6
6
  //#region src/utils/name-prefix.d.ts
@@ -1775,4 +1775,4 @@ declare const tastyDebug: {
1775
1775
  };
1776
1776
  //#endregion
1777
1777
  export { UsePropertyOptions as $, BLOCK_OUTER_STYLES as $t, chunkSheetRegistry as A, BlockInnerStyleProps as At, DISPLAY_CHUNK_STYLES as B, Mods as Bt, injectRawCSS as C, VariantMap as Ct, property$1 as D, BaseProps as Dt, keyframes as E, AllBaseProps as Et, APPEARANCE_CHUNK_STYLES as F, DimensionStyleProps as Ft, categorizeStyleKeys as G, TagName as Gt, LAYOUT_CHUNK_STYLES as H, PositionStyleProps as Ht, CHUNK_NAMES as I, FlowStyleProps as It, okhslFunc as J, TextStyleProps as Jt, okhstFunc as K, TastyExtensionConfig as Kt, ChunkInfo$1 as L, GlobalStyledProps as Lt, ComputeStylesResult as M, BlockStyleProps as Mt, computeStyles as N, ColorStyleProps as Nt, touch as O, BasePropsWithoutChildren as Ot, styleHandlers as P, ContainerStyleProps as Pt, useFontFace as Q, BLOCK_INNER_STYLES as Qt, ChunkName as R, InnerStyleProps as Rt, injectGlobal as S, TokenPropsInput as St, isPropertyDefined as T, tasty as Tt, POSITION_CHUNK_STYLES as U, Props as Ut, FONT_CHUNK_STYLES as V, OuterStyleProps as Vt, STYLE_TO_CHUNK as W, ShortGridStyles as Wt, getDisplayName as X, Tokens as Xt, okhslPlugin as Y, TokenValue as Yt, useCounterStyle as Z, BASE_STYLES as Zt, getCssText as _, SubElementProps as _t, resolveRecipes as a, INNER_STYLES as an, UseStylesResult as at, getRawCSSText as b, TastyPolymorphicComponent as bt, color$1 as c, TEXT_STYLES as cn, Element$1 as ct, cleanup as d, ModPropsInput as dt, BLOCK_STYLES as en, useProperty as et, counterStyle as f, ResolveAsProps as ft, gc as g, SubElementDefinition as gt, fontFace as h, ResolveTokenProps as ht, warn as i, FLOW_STYLES as in, UseStylesOptions as it, ComputeStylesOptions as j, BlockOuterStyleProps as jt, ChunkSheetRegistry as k, BaseStyleProps as kt, filterBaseProps as l, DEFAULT_NAME_PREFIX as ln, ElementsDefinition as lt, destroy as m, ResolveModProps as mt, processTokens as n, CONTAINER_STYLES as nn, useRawCSS as nt, dotize as o, OUTER_STYLES as on, useStyles as ot, createInjector as p, ResolveModPropDef as pt, okhstPlugin as q, TastyThemeNames as qt, deprecationWarning as r, DIMENSION_STYLES as rn, useGlobalStyles as rt, _modAttrs as s, POSITION_STYLES as sn, AllBasePropsWithMods as st, tastyDebug as t, COLOR_STYLES as tn, useKeyframes as tt, PropertyOptions as u, DEFAULT_ZERO_NAME_PREFIX as un, ModPropDef as ut, getCssTextForNode as v, TastyElementOptions as vt, injector as w, WithVariant as wt, inject as x, TastyProps as xt, getIsTestEnvironment as y, TastyElementProps as yt, DIMENSION_CHUNK_STYLES as z, ModValue as zt };
1778
- //# sourceMappingURL=index-C_SRmAWj.d.ts.map
1778
+ //# sourceMappingURL=index-ByBYTH9l.d.ts.map
@@ -760,14 +760,17 @@ interface StylesInterface extends Omit<CSSProperties, 'color' | 'fill' | 'font'
760
760
  * Syntax: `[value] [modifiers]` | `[shape]` | `true`
761
761
  *
762
762
  * Shapes: `round` (fully rounded), `ellipse` (50%), `leaf`, `backleaf` (asymmetric), `inherit` (inherit from parent)
763
- * Directional modifiers: `top`, `right`, `bottom`, `left`
763
+ * Edge modifiers: `top`, `right`, `bottom`, `left` — the corner pair along that edge
764
+ * Corner modifiers: `top-left`, `top-right`, `bottom-right`, `bottom-left` — a single corner
764
765
  *
765
766
  * Examples:
766
767
  * - `radius="2r"` // border-radius: calc(var(--radius) * 2)
767
768
  * - `radius={true}` // default radius (1r)
768
769
  * - `radius="round"` // fully rounded (9999rem)
769
770
  * - `radius="leaf"` // asymmetric leaf shape
770
- * - `radius="1r top"` // round only top corners
771
+ * - `radius="1r top"` // round both top corners
772
+ * - `radius="top-right"` // round only the top-right corner (1r)
773
+ * - `radius="4px top-left"` // round only the top-left corner
771
774
  * - `radius="inherit"` // inherit border-radius from parent
772
775
  * - `radius="inherit right"` // inherit only right corners (uses longhand properties)
773
776
  */
@@ -929,9 +932,13 @@ interface StylesInterface extends Omit<CSSProperties, 'color' | 'fill' | 'font'
929
932
  * - `inset="0"` // all sides: 0
930
933
  * - `inset="2x top"` // only top offset: 2x
931
934
  * - `inset="1x left right"` // left and right offsets: 1x
935
+ * - `inset="bottom dock"` // bottom-anchored, full width: auto 0 0 0
932
936
  * - `inset={true}` // all sides: 0
937
+ *
938
+ * The `dock` modifier pins the named edge and spans its full length, applying
939
+ * the value to the two perpendicular sides as well.
933
940
  */
934
- inset?: 'top' | 'right' | 'bottom' | 'left' | string | CSSProperties['inset'];
941
+ inset?: 'top' | 'right' | 'bottom' | 'left' | 'dock' | string | CSSProperties['inset'];
935
942
  /**
936
943
  * Local keyframes definitions for this component.
937
944
  * Keys are animation names, values are keyframes step definitions.
@@ -1283,4 +1290,4 @@ declare function renderStyles(styles?: Styles, classNameOrSelector?: undefined,
1283
1290
  declare function renderStyles(styles: Styles | undefined, classNameOrSelector: string, options?: RenderStylesOptions): StyleResult[];
1284
1291
  //#endregion
1285
1292
  export { strToRgb as $, RawStyleHandler as A, getGlobalFuncs as B, SuffixForSelector as C, RawCSSResult as Ct, CUSTOM_UNITS as D, StyleInjectorConfig as Dt, CSSMap as E, SheetInfo as Et, StylePropValue as F, parseStyle as G, getGlobalPredefinedTokens as H, StyleValue as I, stringifyStyles as J, resetGlobalPredefinedTokens as K, StyleValueStateMap as L, StyleHandlerDefinition as M, StyleHandlerResult as N, DIRECTIONS as O, StyleRule as Ot, StyleMap as P, hslToRgbValues as Q, customFunc as R, StylesWithoutSelectors as S, PropertyDefinition as St, TastyPresetNames as T, RuleInfo as Tt, normalizeColorTokenValue as U, getGlobalParser as V, parseColor as W, getRgbValuesFromRgbaString as X, getNamedColorHex as Y, hexToRgb as Z, NotSelector as _, InjectionMode as _t, ParseStateKeyOptions as a, StyleDetailsPart as at, Styles as b, KeyframesResult as bt, ParsedAdvancedState as c, CacheMetrics as ct, getGlobalPredefinedStates as d, FontFaceDescriptors as dt, StyleParser as et, setGlobalPredefinedStates as f, FontFaceInput as ft, NoType as g, InjectResult as gt, ConfigTokens as h, GlobalInjectResult as ht, renderStyles as i, StyleDetails as it, StyleHandler as j, ParsedColor as k, StyleUsage as kt, StateParserContext as l, CounterStyleDescriptors as lt, ConfigTokenValue as m, GCOptions as mt, StyleResult as n, ParserOptions as nt, parseStateKey as o, UnitHandler as ot, ConditionNode as p, GCConfig as pt, setGlobalPredefinedTokens as q, isSelector as r, ProcessedStyle as rt, AtRuleContext as s, CSSProperties as st, RenderResult as t, Bucket as tt, createStateParserContext as u, DisposeFunction as ut, RecipeStyles as v, KeyframesCacheEntry as vt, TastyNamedColors as w, RootRegistry as wt, StylesInterface as x, KeyframesSteps as xt, Selector as y, KeyframesInfo as yt, filterMods as z };
1286
- //# sourceMappingURL=index-BsJz5xBF.d.ts.map
1293
+ //# sourceMappingURL=index-C5owZ15q.d.ts.map
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { $ as strToRgb, A as RawStyleHandler, B as getGlobalFuncs, C as SuffixForSelector, Ct as RawCSSResult, D as CUSTOM_UNITS, Dt as StyleInjectorConfig, E as CSSMap, Et as SheetInfo, F as StylePropValue, G as parseStyle, H as getGlobalPredefinedTokens, I as StyleValue, J as stringifyStyles, K as resetGlobalPredefinedTokens, L as StyleValueStateMap, M as StyleHandlerDefinition, N as StyleHandlerResult, O as DIRECTIONS, Ot as StyleRule, P as StyleMap, Q as hslToRgbValues, R as customFunc, S as StylesWithoutSelectors, St as PropertyDefinition, T as TastyPresetNames, Tt as RuleInfo, U as normalizeColorTokenValue, V as getGlobalParser, W as parseColor, X as getRgbValuesFromRgbaString, Y as getNamedColorHex, Z as hexToRgb, _ as NotSelector, _t as InjectionMode, a as ParseStateKeyOptions, at as StyleDetailsPart, b as Styles, bt as KeyframesResult, c as ParsedAdvancedState, ct as CacheMetrics, d as getGlobalPredefinedStates, dt as FontFaceDescriptors, et as StyleParser, f as setGlobalPredefinedStates, ft as FontFaceInput, g as NoType, gt as InjectResult, h as ConfigTokens, i as renderStyles, it as StyleDetails, j as StyleHandler, k as ParsedColor, kt as StyleUsage, l as StateParserContext, lt as CounterStyleDescriptors, m as ConfigTokenValue, mt as GCOptions, n as StyleResult, nt as ParserOptions, o as parseStateKey, ot as UnitHandler, p as ConditionNode, pt as GCConfig, q as setGlobalPredefinedTokens, r as isSelector, rt as ProcessedStyle, s as AtRuleContext, st as CSSProperties, t as RenderResult, tt as Bucket, u as createStateParserContext, ut as DisposeFunction, v as RecipeStyles, vt as KeyframesCacheEntry, w as TastyNamedColors, wt as RootRegistry, x as StylesInterface, xt as KeyframesSteps, y as Selector, yt as KeyframesInfo, z as filterMods } from "./index-BsJz5xBF.js";
2
- import { S as SheetManager, _ as TypographyPreset, a as getGlobalFontFace, b as ColorSpace, c as getNamePrefix, d as hasStylesGenerated, f as isConfigLocked, g as TastyPluginFactory, h as TastyPlugin, i as getGlobalCounterStyle, l as hasGlobalKeyframes, m as resetConfig, n as configure, o as getGlobalKeyframes, p as isTestEnvironment, r as getConfig, s as getGlobalRecipes, t as TastyConfig, u as hasGlobalRecipes, v as TypographyTokenValue, x as StyleInjector, y as generateTypographyTokens } from "./config-3h7BtX4l.js";
3
- import { $ as UsePropertyOptions, $t as BLOCK_OUTER_STYLES, A as chunkSheetRegistry, At as BlockInnerStyleProps, B as DISPLAY_CHUNK_STYLES, Bt as Mods, C as injectRawCSS, Ct as VariantMap, D as property, Dt as BaseProps, E as keyframes, Et as AllBaseProps, F as APPEARANCE_CHUNK_STYLES, Ft as DimensionStyleProps, G as categorizeStyleKeys, Gt as TagName, H as LAYOUT_CHUNK_STYLES, Ht as PositionStyleProps, I as CHUNK_NAMES, It as FlowStyleProps, J as okhslFunc, Jt as TextStyleProps, K as okhstFunc, Kt as TastyExtensionConfig, L as ChunkInfo, Lt as GlobalStyledProps, M as ComputeStylesResult, Mt as BlockStyleProps, N as computeStyles, Nt as ColorStyleProps, O as touch, Ot as BasePropsWithoutChildren, P as styleHandlers, Pt as ContainerStyleProps, Q as useFontFace, Qt as BLOCK_INNER_STYLES, R as ChunkName, Rt as InnerStyleProps, S as injectGlobal, St as TokenPropsInput, T as isPropertyDefined, Tt as tasty, U as POSITION_CHUNK_STYLES, Ut as Props, V as FONT_CHUNK_STYLES, Vt as OuterStyleProps, W as STYLE_TO_CHUNK, Wt as ShortGridStyles, X as getDisplayName, Xt as Tokens, Y as okhslPlugin, Yt as TokenValue, Z as useCounterStyle, Zt as BASE_STYLES, _ as getCssText, _t as SubElementProps, a as resolveRecipes, an as INNER_STYLES, at as UseStylesResult, b as getRawCSSText, bt as TastyPolymorphicComponent, c as color, cn as TEXT_STYLES, ct as Element, d as cleanup, dt as ModPropsInput, en as BLOCK_STYLES, et as useProperty, f as counterStyle, ft as ResolveAsProps, g as gc, gt as SubElementDefinition, h as fontFace, ht as ResolveTokenProps, i as warn, in as FLOW_STYLES, it as UseStylesOptions, j as ComputeStylesOptions, jt as BlockOuterStyleProps, k as ChunkSheetRegistry, kt as BaseStyleProps, l as filterBaseProps, ln as DEFAULT_NAME_PREFIX, lt as ElementsDefinition, m as destroy, mt as ResolveModProps, n as processTokens, nn as CONTAINER_STYLES, nt as useRawCSS, o as dotize, on as OUTER_STYLES, ot as useStyles, p as createInjector, pt as ResolveModPropDef, q as okhstPlugin, qt as TastyThemeNames, r as deprecationWarning, rn as DIMENSION_STYLES, rt as useGlobalStyles, s as _modAttrs, sn as POSITION_STYLES, st as AllBasePropsWithMods, t as tastyDebug, tn as COLOR_STYLES, tt as useKeyframes, u as PropertyOptions, un as DEFAULT_ZERO_NAME_PREFIX, ut as ModPropDef, v as getCssTextForNode, vt as TastyElementOptions, w as injector, wt as WithVariant, x as inject, xt as TastyProps, y as getIsTestEnvironment, yt as TastyElementProps, z as DIMENSION_CHUNK_STYLES, zt as ModValue } from "./index-C_SRmAWj.js";
4
- import { t as mergeStyles } from "./merge-styles-BzOwGOGC.js";
5
- export { APPEARANCE_CHUNK_STYLES, AllBaseProps, AllBasePropsWithMods, AtRuleContext, BASE_STYLES, BLOCK_INNER_STYLES, BLOCK_OUTER_STYLES, BLOCK_STYLES, BaseProps, BasePropsWithoutChildren, BaseStyleProps, BlockInnerStyleProps, BlockOuterStyleProps, BlockStyleProps, Bucket, CHUNK_NAMES, COLOR_STYLES, CONTAINER_STYLES, CSSMap, CSSProperties, CUSTOM_UNITS, CacheMetrics, ChunkInfo, ChunkName, ChunkSheetRegistry, ColorSpace, ColorStyleProps, ComputeStylesOptions, ComputeStylesResult, ConditionNode, ConfigTokenValue, ConfigTokens, ContainerStyleProps, CounterStyleDescriptors, DEFAULT_NAME_PREFIX, DEFAULT_ZERO_NAME_PREFIX, DIMENSION_CHUNK_STYLES, DIMENSION_STYLES, DIRECTIONS, DISPLAY_CHUNK_STYLES, DimensionStyleProps, DisposeFunction, Element, ElementsDefinition, FLOW_STYLES, FONT_CHUNK_STYLES, FlowStyleProps, FontFaceDescriptors, FontFaceInput, GCConfig, GCOptions, GlobalStyledProps, INNER_STYLES, InjectResult, InjectionMode, InnerStyleProps, KeyframesCacheEntry, KeyframesInfo, KeyframesResult, KeyframesSteps, LAYOUT_CHUNK_STYLES, ModPropDef, ModPropsInput, ModValue, Mods, NoType, NotSelector, OUTER_STYLES, OuterStyleProps, POSITION_CHUNK_STYLES, POSITION_STYLES, ParseStateKeyOptions, ParsedAdvancedState, ParsedColor, ParserOptions, PositionStyleProps, ProcessedStyle, PropertyDefinition, PropertyOptions, Props, RawCSSResult, RawStyleHandler, RecipeStyles, RenderResult, ResolveAsProps, ResolveModPropDef, ResolveModProps, ResolveTokenProps, RootRegistry, RuleInfo, STYLE_TO_CHUNK, Selector, SheetInfo, SheetManager, ShortGridStyles, StateParserContext, StyleDetails, StyleDetailsPart, StyleHandler, StyleHandlerDefinition, StyleHandlerResult, StyleInjector, StyleInjectorConfig, StyleMap, StyleParser, StylePropValue, StyleResult, StyleRule, StyleUsage, StyleValue, StyleValueStateMap, Styles, StylesInterface, StylesWithoutSelectors, SubElementDefinition, SubElementProps, SuffixForSelector, TEXT_STYLES, TagName, TastyConfig, TastyElementOptions, TastyElementProps, TastyExtensionConfig, TastyNamedColors, TastyPlugin, TastyPluginFactory, TastyPolymorphicComponent, TastyPresetNames, TastyProps, TastyThemeNames, TextStyleProps, TokenPropsInput, TokenValue, Tokens, TypographyPreset, TypographyTokenValue, UnitHandler, UsePropertyOptions, UseStylesOptions, UseStylesResult, VariantMap, WithVariant, categorizeStyleKeys, chunkSheetRegistry, cleanup, color, computeStyles, configure, counterStyle, createInjector, createStateParserContext, customFunc, deprecationWarning, destroy, dotize, filterBaseProps, filterMods, fontFace, gc, generateTypographyTokens, getConfig, getCssText, getCssTextForNode, getDisplayName, getGlobalCounterStyle, getGlobalFontFace, getGlobalFuncs, getGlobalKeyframes, getGlobalParser, getGlobalPredefinedStates, getGlobalPredefinedTokens, getGlobalRecipes, getIsTestEnvironment, getNamePrefix, getNamedColorHex, getRawCSSText, getRgbValuesFromRgbaString, hasGlobalKeyframes, hasGlobalRecipes, hasStylesGenerated, hexToRgb, hslToRgbValues, inject, injectGlobal, injectRawCSS, injector, isConfigLocked, isPropertyDefined, isSelector, isTestEnvironment, keyframes, mergeStyles, _modAttrs as modAttrs, normalizeColorTokenValue, okhslFunc, okhslPlugin, okhstFunc, okhstPlugin, parseColor, parseStateKey, parseStyle, processTokens, property, renderStyles, resetConfig, resetGlobalPredefinedTokens, resolveRecipes, setGlobalPredefinedStates, setGlobalPredefinedTokens, strToRgb, stringifyStyles, styleHandlers, tasty, tastyDebug, touch, useCounterStyle, useFontFace, useGlobalStyles, useKeyframes, useProperty, useRawCSS, useStyles, warn };
1
+ import { $ as strToRgb, A as RawStyleHandler, B as getGlobalFuncs, C as SuffixForSelector, Ct as RawCSSResult, D as CUSTOM_UNITS, Dt as StyleInjectorConfig, E as CSSMap, Et as SheetInfo, F as StylePropValue, G as parseStyle, H as getGlobalPredefinedTokens, I as StyleValue, J as stringifyStyles, K as resetGlobalPredefinedTokens, L as StyleValueStateMap, M as StyleHandlerDefinition, N as StyleHandlerResult, O as DIRECTIONS, Ot as StyleRule, P as StyleMap, Q as hslToRgbValues, R as customFunc, S as StylesWithoutSelectors, St as PropertyDefinition, T as TastyPresetNames, Tt as RuleInfo, U as normalizeColorTokenValue, V as getGlobalParser, W as parseColor, X as getRgbValuesFromRgbaString, Y as getNamedColorHex, Z as hexToRgb, _ as NotSelector, _t as InjectionMode, a as ParseStateKeyOptions, at as StyleDetailsPart, b as Styles, bt as KeyframesResult, c as ParsedAdvancedState, ct as CacheMetrics, d as getGlobalPredefinedStates, dt as FontFaceDescriptors, et as StyleParser, f as setGlobalPredefinedStates, ft as FontFaceInput, g as NoType, gt as InjectResult, h as ConfigTokens, i as renderStyles, it as StyleDetails, j as StyleHandler, k as ParsedColor, kt as StyleUsage, l as StateParserContext, lt as CounterStyleDescriptors, m as ConfigTokenValue, mt as GCOptions, n as StyleResult, nt as ParserOptions, o as parseStateKey, ot as UnitHandler, p as ConditionNode, pt as GCConfig, q as setGlobalPredefinedTokens, r as isSelector, rt as ProcessedStyle, s as AtRuleContext, st as CSSProperties, t as RenderResult, tt as Bucket, u as createStateParserContext, ut as DisposeFunction, v as RecipeStyles, vt as KeyframesCacheEntry, w as TastyNamedColors, wt as RootRegistry, x as StylesInterface, xt as KeyframesSteps, y as Selector, yt as KeyframesInfo, z as filterMods } from "./index-C5owZ15q.js";
2
+ import { S as SheetManager, _ as TypographyPreset, a as getGlobalFontFace, b as ColorSpace, c as getNamePrefix, d as hasStylesGenerated, f as isConfigLocked, g as TastyPluginFactory, h as TastyPlugin, i as getGlobalCounterStyle, l as hasGlobalKeyframes, m as resetConfig, n as configure, o as getGlobalKeyframes, p as isTestEnvironment, r as getConfig, s as getGlobalRecipes, t as TastyConfig, u as hasGlobalRecipes, v as TypographyTokenValue, x as StyleInjector, y as generateTypographyTokens } from "./config-C3SKYuxY.js";
3
+ import { $ as UsePropertyOptions, $t as BLOCK_OUTER_STYLES, A as chunkSheetRegistry, At as BlockInnerStyleProps, B as DISPLAY_CHUNK_STYLES, Bt as Mods, C as injectRawCSS, Ct as VariantMap, D as property, Dt as BaseProps, E as keyframes, Et as AllBaseProps, F as APPEARANCE_CHUNK_STYLES, Ft as DimensionStyleProps, G as categorizeStyleKeys, Gt as TagName, H as LAYOUT_CHUNK_STYLES, Ht as PositionStyleProps, I as CHUNK_NAMES, It as FlowStyleProps, J as okhslFunc, Jt as TextStyleProps, K as okhstFunc, Kt as TastyExtensionConfig, L as ChunkInfo, Lt as GlobalStyledProps, M as ComputeStylesResult, Mt as BlockStyleProps, N as computeStyles, Nt as ColorStyleProps, O as touch, Ot as BasePropsWithoutChildren, P as styleHandlers, Pt as ContainerStyleProps, Q as useFontFace, Qt as BLOCK_INNER_STYLES, R as ChunkName, Rt as InnerStyleProps, S as injectGlobal, St as TokenPropsInput, T as isPropertyDefined, Tt as tasty, U as POSITION_CHUNK_STYLES, Ut as Props, V as FONT_CHUNK_STYLES, Vt as OuterStyleProps, W as STYLE_TO_CHUNK, Wt as ShortGridStyles, X as getDisplayName, Xt as Tokens, Y as okhslPlugin, Yt as TokenValue, Z as useCounterStyle, Zt as BASE_STYLES, _ as getCssText, _t as SubElementProps, a as resolveRecipes, an as INNER_STYLES, at as UseStylesResult, b as getRawCSSText, bt as TastyPolymorphicComponent, c as color, cn as TEXT_STYLES, ct as Element, d as cleanup, dt as ModPropsInput, en as BLOCK_STYLES, et as useProperty, f as counterStyle, ft as ResolveAsProps, g as gc, gt as SubElementDefinition, h as fontFace, ht as ResolveTokenProps, i as warn, in as FLOW_STYLES, it as UseStylesOptions, j as ComputeStylesOptions, jt as BlockOuterStyleProps, k as ChunkSheetRegistry, kt as BaseStyleProps, l as filterBaseProps, ln as DEFAULT_NAME_PREFIX, lt as ElementsDefinition, m as destroy, mt as ResolveModProps, n as processTokens, nn as CONTAINER_STYLES, nt as useRawCSS, o as dotize, on as OUTER_STYLES, ot as useStyles, p as createInjector, pt as ResolveModPropDef, q as okhstPlugin, qt as TastyThemeNames, r as deprecationWarning, rn as DIMENSION_STYLES, rt as useGlobalStyles, s as _modAttrs, sn as POSITION_STYLES, st as AllBasePropsWithMods, t as tastyDebug, tn as COLOR_STYLES, tt as useKeyframes, u as PropertyOptions, un as DEFAULT_ZERO_NAME_PREFIX, ut as ModPropDef, v as getCssTextForNode, vt as TastyElementOptions, w as injector, wt as WithVariant, x as inject, xt as TastyProps, y as getIsTestEnvironment, yt as TastyElementProps, z as DIMENSION_CHUNK_STYLES, zt as ModValue } from "./index-ByBYTH9l.js";
4
+ import { t as mergeStyles } from "./merge-styles-CvUi7SOD.js";
5
+ export { APPEARANCE_CHUNK_STYLES, type AllBaseProps, type AllBasePropsWithMods, type AtRuleContext, BASE_STYLES, BLOCK_INNER_STYLES, BLOCK_OUTER_STYLES, BLOCK_STYLES, type BaseProps, type BasePropsWithoutChildren, type BaseStyleProps, type BlockInnerStyleProps, type BlockOuterStyleProps, type BlockStyleProps, Bucket, CHUNK_NAMES, COLOR_STYLES, CONTAINER_STYLES, CSSMap, type CSSProperties, CUSTOM_UNITS, type CacheMetrics, type ChunkInfo, type ChunkName, ChunkSheetRegistry, type ColorSpace, type ColorStyleProps, type ComputeStylesOptions, type ComputeStylesResult, type ConditionNode, type ConfigTokenValue, type ConfigTokens, type ContainerStyleProps, type CounterStyleDescriptors, DEFAULT_NAME_PREFIX, DEFAULT_ZERO_NAME_PREFIX, DIMENSION_CHUNK_STYLES, DIMENSION_STYLES, DIRECTIONS, DISPLAY_CHUNK_STYLES, type DimensionStyleProps, type DisposeFunction, Element, type ElementsDefinition, FLOW_STYLES, FONT_CHUNK_STYLES, type FlowStyleProps, type FontFaceDescriptors, type FontFaceInput, type GCConfig, type GCOptions, type GlobalStyledProps, INNER_STYLES, type InjectResult, type InjectionMode, type InnerStyleProps, type KeyframesCacheEntry, type KeyframesInfo, type KeyframesResult, type KeyframesSteps, LAYOUT_CHUNK_STYLES, type ModPropDef, type ModPropsInput, type ModValue, type Mods, type NoType, type NotSelector, OUTER_STYLES, type OuterStyleProps, POSITION_CHUNK_STYLES, POSITION_STYLES, type ParseStateKeyOptions, type ParsedAdvancedState, ParsedColor, type ParserOptions, type PositionStyleProps, type ProcessedStyle, type PropertyDefinition, PropertyOptions, type Props, type RawCSSResult, RawStyleHandler, type RecipeStyles, type RenderResult, type ResolveAsProps, type ResolveModPropDef, type ResolveModProps, type ResolveTokenProps, type RootRegistry, type RuleInfo, STYLE_TO_CHUNK, type Selector, type SheetInfo, SheetManager, type ShortGridStyles, type StateParserContext, type StyleDetails, type StyleDetailsPart, StyleHandler, StyleHandlerDefinition, StyleHandlerResult, StyleInjector, type StyleInjectorConfig, StyleMap, StyleParser, StylePropValue, type StyleResult, type StyleRule, type StyleUsage, StyleValue, StyleValueStateMap, type Styles, type StylesInterface, type StylesWithoutSelectors, type SubElementDefinition, type SubElementProps, type SuffixForSelector, TEXT_STYLES, type TagName, type TastyConfig, type TastyElementOptions, type TastyElementProps, type TastyExtensionConfig, type TastyNamedColors, type TastyPlugin, type TastyPluginFactory, type TastyPolymorphicComponent, type TastyPresetNames, type TastyProps, type TastyThemeNames, type TextStyleProps, type TokenPropsInput, type TokenValue, type Tokens, TypographyPreset, TypographyTokenValue, type UnitHandler, type UsePropertyOptions, type UseStylesOptions, type UseStylesResult, type VariantMap, type WithVariant, categorizeStyleKeys, chunkSheetRegistry, cleanup, color, computeStyles, configure, counterStyle, createInjector, createStateParserContext, customFunc, deprecationWarning, destroy, dotize, filterBaseProps, filterMods, fontFace, gc, generateTypographyTokens, getConfig, getCssText, getCssTextForNode, getDisplayName, getGlobalCounterStyle, getGlobalFontFace, getGlobalFuncs, getGlobalKeyframes, getGlobalParser, getGlobalPredefinedStates, getGlobalPredefinedTokens, getGlobalRecipes, getIsTestEnvironment, getNamePrefix, getNamedColorHex, getRawCSSText, getRgbValuesFromRgbaString, hasGlobalKeyframes, hasGlobalRecipes, hasStylesGenerated, hexToRgb, hslToRgbValues, inject, injectGlobal, injectRawCSS, injector, isConfigLocked, isPropertyDefined, isSelector, isTestEnvironment, keyframes, mergeStyles, _modAttrs as modAttrs, normalizeColorTokenValue, okhslFunc, okhslPlugin, okhstFunc, okhstPlugin, parseColor, parseStateKey, parseStyle, processTokens, property, renderStyles, resetConfig, resetGlobalPredefinedTokens, resolveRecipes, setGlobalPredefinedStates, setGlobalPredefinedTokens, strToRgb, stringifyStyles, styleHandlers, tasty, tastyDebug, touch, useCounterStyle, useFontFace, useGlobalStyles, useKeyframes, useProperty, useRawCSS, useStyles, warn };
package/dist/index.js CHANGED
@@ -1,11 +1,11 @@
1
- import { $ as parseColor, A as StyleInjector, B as styleHandlers, C as parseStateKey, Dt as hslToRgbValues, Et as hexToRgb, F as fontFaceContentHash, G as CUSTOM_UNITS, H as warn, I as formatFontFaceRule, J as filterMods, K as DIRECTIONS, M as formatCounterStyleRule, O as getGlobalPredefinedStates, Ot as strToRgb, Q as normalizeColorTokenValue, R as SheetManager, S as renderStyles, T as createStateParserContext, Tt as getRgbValuesFromRgbaString, V as deprecationWarning, X as getGlobalParser, Y as getGlobalFuncs, Z as getGlobalPredefinedTokens, a as getGlobalCounterStyle, at as okhstPlugin, c as getGlobalKeyframes, ct as StyleParser, d as getNamePrefix, dt as DEFAULT_ZERO_NAME_PREFIX, et as parseStyle, f as hasGlobalKeyframes, g as isTestEnvironment, h as isConfigLocked, it as okhstFunc, k as setGlobalPredefinedStates, l as getGlobalRecipes, lt as Bucket, m as hasStylesGenerated, mt as makeKeyframeName, n as getConfig, nt as setGlobalPredefinedTokens, o as getGlobalFontFace, ot as okhslFunc, p as hasGlobalRecipes, pt as makeCounterStyleName, q as customFunc, rt as stringifyStyles, s as getGlobalInjector, st as okhslPlugin, t as configure, tt as resetGlobalPredefinedTokens, ut as DEFAULT_NAME_PREFIX, v as resetConfig, vt as hashString, wt as getNamedColorHex, x as isSelector, y as generateTypographyTokens } from "./config-DOvjo65E.js";
2
- import { _ as categorizeStyleKeys, d as DIMENSION_CHUNK_STYLES, f as DISPLAY_CHUNK_STYLES, g as STYLE_TO_CHUNK, h as POSITION_CHUNK_STYLES, l as APPEARANCE_CHUNK_STYLES, m as LAYOUT_CHUNK_STYLES, p as FONT_CHUNK_STYLES, u as CHUNK_NAMES } from "./keyframes-C4ObN2Vc.js";
3
- import { A as property, B as DIMENSION_STYLES, C as getRawCSSText, D as injector, E as injectRawCSS, F as BLOCK_INNER_STYLES, G as TEXT_STYLES, H as INNER_STYLES, I as BLOCK_OUTER_STYLES, L as BLOCK_STYLES, M as ChunkSheetRegistry, N as chunkSheetRegistry, O as isPropertyDefined, P as BASE_STYLES, R as COLOR_STYLES, S as getIsTestEnvironment, T as injectGlobal, U as OUTER_STYLES, V as FLOW_STYLES, W as POSITION_STYLES, _ as destroy, a as color, b as getCssText, c as hasKeys, d as collectAutoInferredPropertiesRSC, f as getStyleTarget, g as createInjector, h as counterStyle, i as _modAttrs, j as touch, k as keyframes, l as formatKeyframesCSS, m as cleanup, n as processTokens, o as filterBaseProps, p as pushRSCCSS, r as dotize, s as computeStyles, t as tastyDebug, u as collectAutoInferredProperties, v as fontFace, w as inject, x as getCssTextForNode, y as gc, z as CONTAINER_STYLES } from "./core-CPx5Lqjr.js";
4
- import { n as formatPropertyCSS } from "./format-rules-aRlqFAd1.js";
5
- import { t as mergeStyles } from "./merge-styles-BbyWO2Gc.js";
6
- import { t as resolveRecipes } from "./resolve-recipes-CqTtBOKx.js";
7
- import { t as getTastySSRContext } from "./context-CkSg-kDT.js";
8
- import { t as formatGlobalRules } from "./format-global-rules-Dbc_1tc3.js";
1
+ import { $ as parseColor, A as StyleInjector, B as styleHandlers, C as parseStateKey, Dt as hslToRgbValues, Et as hexToRgb, F as fontFaceContentHash, G as CUSTOM_UNITS, H as warn, I as formatFontFaceRule, J as filterMods, K as DIRECTIONS, M as formatCounterStyleRule, O as getGlobalPredefinedStates, Ot as strToRgb, Q as normalizeColorTokenValue, R as SheetManager, S as renderStyles, T as createStateParserContext, Tt as getRgbValuesFromRgbaString, V as deprecationWarning, X as getGlobalParser, Y as getGlobalFuncs, Z as getGlobalPredefinedTokens, a as getGlobalCounterStyle, at as okhstPlugin, c as getGlobalKeyframes, ct as StyleParser, d as getNamePrefix, dt as DEFAULT_ZERO_NAME_PREFIX, et as parseStyle, f as hasGlobalKeyframes, g as isTestEnvironment, h as isConfigLocked, it as okhstFunc, k as setGlobalPredefinedStates, l as getGlobalRecipes, lt as Bucket, m as hasStylesGenerated, mt as makeKeyframeName, n as getConfig, nt as setGlobalPredefinedTokens, o as getGlobalFontFace, ot as okhslFunc, p as hasGlobalRecipes, pt as makeCounterStyleName, q as customFunc, rt as stringifyStyles, s as getGlobalInjector, st as okhslPlugin, t as configure, tt as resetGlobalPredefinedTokens, ut as DEFAULT_NAME_PREFIX, v as resetConfig, vt as hashString, wt as getNamedColorHex, x as isSelector, y as generateTypographyTokens } from "./config-DA5FBnzm.js";
2
+ import { _ as categorizeStyleKeys, d as DIMENSION_CHUNK_STYLES, f as DISPLAY_CHUNK_STYLES, g as STYLE_TO_CHUNK, h as POSITION_CHUNK_STYLES, l as APPEARANCE_CHUNK_STYLES, m as LAYOUT_CHUNK_STYLES, p as FONT_CHUNK_STYLES, u as CHUNK_NAMES } from "./keyframes-DZbGV4H4.js";
3
+ import { A as property, B as DIMENSION_STYLES, C as getRawCSSText, D as injector, E as injectRawCSS, F as BLOCK_INNER_STYLES, G as TEXT_STYLES, H as INNER_STYLES, I as BLOCK_OUTER_STYLES, L as BLOCK_STYLES, M as ChunkSheetRegistry, N as chunkSheetRegistry, O as isPropertyDefined, P as BASE_STYLES, R as COLOR_STYLES, S as getIsTestEnvironment, T as injectGlobal, U as OUTER_STYLES, V as FLOW_STYLES, W as POSITION_STYLES, _ as destroy, a as color, b as getCssText, c as hasKeys, d as collectAutoInferredPropertiesRSC, f as getStyleTarget, g as createInjector, h as counterStyle, i as _modAttrs, j as touch, k as keyframes, l as formatKeyframesCSS, m as cleanup, n as processTokens, o as filterBaseProps, p as pushRSCCSS, r as dotize, s as computeStyles, t as tastyDebug, u as collectAutoInferredProperties, v as fontFace, w as inject, x as getCssTextForNode, y as gc, z as CONTAINER_STYLES } from "./core-BhlL-3k-.js";
4
+ import { n as formatPropertyCSS } from "./format-rules-COR773Tn.js";
5
+ import { t as mergeStyles } from "./merge-styles-DRUFVZH4.js";
6
+ import { t as resolveRecipes } from "./resolve-recipes-DUfJKJef.js";
7
+ import { t as getTastySSRContext } from "./context-CA8YKeMn.js";
8
+ import { t as formatGlobalRules } from "./format-global-rules-DklyaXv-.js";
9
9
  import { Fragment, createElement, forwardRef, useContext } from "react";
10
10
  //#region src/utils/get-display-name.ts
11
11
  const DEFAULT_NAME = "Anonymous";