@tenphi/tasty 3.15.0 → 3.17.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 (51) hide show
  1. package/dist/{babel-types-Cq4OMhXa.d.ts → babel-types-Dc5zghyE.d.ts} +2 -2
  2. package/dist/chunks/{build-config-mdijGIGa.js → build-config-D9Iq8QQm.js} +5 -5
  3. package/dist/chunks/{build-config-mdijGIGa.js.map → build-config-D9Iq8QQm.js.map} +1 -1
  4. package/dist/chunks/{collector-B4cuf4Ne.js → collector-Cb8ah2JF.js} +4 -4
  5. package/dist/chunks/{collector-B4cuf4Ne.js.map → collector-Cb8ah2JF.js.map} +1 -1
  6. package/dist/chunks/{config-engine-BlZE_Nop.js → config-engine-CMYFZYQh.js} +4 -4
  7. package/dist/chunks/{config-engine-BlZE_Nop.js.map → config-engine-CMYFZYQh.js.map} +1 -1
  8. package/dist/chunks/{css-definitions-38rLam_O.js → css-definitions-B4aWBkH3.js} +3 -3
  9. package/dist/chunks/{css-definitions-38rLam_O.js.map → css-definitions-B4aWBkH3.js.map} +1 -1
  10. package/dist/chunks/{debug-B4d71eRy.js → debug-D2Pu7Xhy.js} +4 -4
  11. package/dist/chunks/{debug-B4d71eRy.js.map → debug-D2Pu7Xhy.js.map} +1 -1
  12. package/dist/chunks/{dsl-dFfTOacf.js → dsl-CsFl9LGn.js} +82 -10
  13. package/dist/chunks/dsl-CsFl9LGn.js.map +1 -0
  14. package/dist/chunks/{react-runtime-CZeqWqBJ.js → react-runtime-DHiopXCu.js} +5 -5
  15. package/dist/chunks/{react-runtime-CZeqWqBJ.js.map → react-runtime-DHiopXCu.js.map} +1 -1
  16. package/dist/chunks/{runtime-engine-DZYyyrhB.js → runtime-engine-NGCofNXy.js} +6 -6
  17. package/dist/chunks/{runtime-engine-DZYyyrhB.js.map → runtime-engine-NGCofNXy.js.map} +1 -1
  18. package/dist/chunks/{runtime-state-B8fkpfgp.js → runtime-state-lZjMbvwV.js} +2 -2
  19. package/dist/chunks/{runtime-state-B8fkpfgp.js.map → runtime-state-lZjMbvwV.js.map} +1 -1
  20. package/dist/chunks/{style-engine-BB3Ruaa4.js → style-engine-DnkV_4Jg.js} +21 -13
  21. package/dist/chunks/style-engine-DnkV_4Jg.js.map +1 -0
  22. package/dist/chunks/{zero-engine-BLELcyfS.js → zero-engine-DcwaCvFs.js} +5 -5
  23. package/dist/chunks/{zero-engine-BLELcyfS.js.map → zero-engine-DcwaCvFs.js.map} +1 -1
  24. package/dist/{collector-sOn_LJks.d.ts → collector-D2OT6I2G.d.ts} +2 -2
  25. package/dist/{config-bnwIG-_F.d.ts → config-C4ftFxgI.d.ts} +2 -2
  26. package/dist/core/index.d.ts +4 -4
  27. package/dist/core/index.js +7 -7
  28. package/dist/{index-B-ufiyqs.d.ts → index-DxQNRj50.d.ts} +5 -5
  29. package/dist/index.d.ts +4 -4
  30. package/dist/index.js +8 -8
  31. package/dist/{merge-styles-CLE6OMiV.d.ts → merge-styles-D39qBtox.d.ts} +2 -2
  32. package/dist/ssr/astro.js +2 -2
  33. package/dist/ssr/index.d.ts +1 -1
  34. package/dist/ssr/index.js +2 -2
  35. package/dist/ssr/next-config.d.ts +1 -1
  36. package/dist/ssr/next-config.js +3 -3
  37. package/dist/ssr/next.d.ts +1 -1
  38. package/dist/ssr/next.js +3 -3
  39. package/dist/static/index.d.ts +2 -2
  40. package/dist/{types-DsK6JM1J.d.ts → types-CYQIhUg1.d.ts} +4 -3
  41. package/dist/zero/babel.d.ts +1 -1
  42. package/dist/zero/babel.js +4 -4
  43. package/dist/zero/index.d.ts +3 -3
  44. package/dist/zero/index.js +3 -3
  45. package/dist/zero/next.d.ts +1 -1
  46. package/docs/ai-agents.md +2 -1
  47. package/docs/dsl.md +52 -0
  48. package/docs/styles.md +27 -15
  49. package/package.json +6 -6
  50. package/dist/chunks/dsl-dFfTOacf.js.map +0 -1
  51. package/dist/chunks/style-engine-BB3Ruaa4.js.map +0 -1
@@ -1,7 +1,7 @@
1
- import { C as hasLocalFontFace, D as makeClassName, F as extractLocalProperties, G as hasLocalFunctions, I as getEffectiveDefinition, J as registerLocalFunctionPolyfills, K as parseFunctionName, L as hasLocalProperties, M as validateNamePrefix, P as DEFAULT_PROPERTIES, S as formatFontFaceRule, V as extractLocalFunctions, W as formatFunctionRule, _ as formatCounterStyleRule, a as formatKeyframesSteps, c as extractLocalKeyframes, d as mergeKeyframes, h as extractLocalCounterStyle, i as formatKeyframesCSS, k as makeKeyframeName, l as filterUsedKeyframes, o as formatPropertyCSS, q as registerFunctionPolyfill, s as extractAnimationNamesFromStyles, u as hasLocalKeyframes, v as hasLocalCounterStyle, w as PropertyTypeResolver, y as extractLocalFontFace } from "./css-definitions-38rLam_O.js";
2
- import { b as renderStyles, n as generateChunkCacheKey, q as isFunctionsPolyfillEnabled, r as categorizeStyleKeys, t as renderStylesForChunk } from "./style-engine-BB3Ruaa4.js";
3
- import { t as resolveRecipesWith } from "./config-engine-BlZE_Nop.js";
4
- import { i as reapplyZeroConfig, o as setActiveZeroConfig, r as getActiveZeroConfig } from "./build-config-mdijGIGa.js";
1
+ import { C as hasLocalFontFace, D as makeClassName, F as extractLocalProperties, G as hasLocalFunctions, I as getEffectiveDefinition, J as registerLocalFunctionPolyfills, K as parseFunctionName, L as hasLocalProperties, M as validateNamePrefix, P as DEFAULT_PROPERTIES, S as formatFontFaceRule, V as extractLocalFunctions, W as formatFunctionRule, _ as formatCounterStyleRule, a as formatKeyframesSteps, c as extractLocalKeyframes, d as mergeKeyframes, h as extractLocalCounterStyle, i as formatKeyframesCSS, k as makeKeyframeName, l as filterUsedKeyframes, o as formatPropertyCSS, q as registerFunctionPolyfill, s as extractAnimationNamesFromStyles, u as hasLocalKeyframes, v as hasLocalCounterStyle, w as PropertyTypeResolver, y as extractLocalFontFace } from "./css-definitions-B4aWBkH3.js";
2
+ import { b as renderStyles, n as generateChunkCacheKey, q as isFunctionsPolyfillEnabled, r as categorizeStyleKeys, t as renderStylesForChunk } from "./style-engine-DnkV_4Jg.js";
3
+ import { t as resolveRecipesWith } from "./config-engine-CMYFZYQh.js";
4
+ import { i as reapplyZeroConfig, o as setActiveZeroConfig, r as getActiveZeroConfig } from "./build-config-D9Iq8QQm.js";
5
5
  import { createHash } from "crypto";
6
6
  import * as fs from "fs";
7
7
  import * as path from "path";
@@ -307,4 +307,4 @@ function createCSSWriter(outputPath, options) {
307
307
  //#endregion
308
308
  export { extractCounterStyleFromStyles as a, extractKeyframesFromStyles as c, extractStylesForSelector as d, extractStylesWithChunks as f, setExtractorNamePrefix as h, extractConfigProperties as i, extractPropertiesFromStyles as l, replaceAnimationNamesInCSS as m, createCSSWriter as n, extractFontFaceFromStyles as o, renderSelectorCSS as p, extractChunks as r, extractFunctionsFromStyles as s, CSSWriter as t, extractSelectorCSS as u };
309
309
 
310
- //# sourceMappingURL=zero-engine-BLELcyfS.js.map
310
+ //# sourceMappingURL=zero-engine-DcwaCvFs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"zero-engine-BLELcyfS.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 FunctionDefinition,\n KeyframesSteps,\n PropertyDefinition,\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 { isFunctionsPolyfillEnabled } from '../config-state';\nimport {\n extractLocalFunctions,\n formatFunctionRule,\n hasLocalFunctions,\n parseFunctionName,\n registerFunctionPolyfill,\n registerLocalFunctionPolyfills,\n} from '../functions';\nimport {\n extractAnimationNamesFromStyles,\n extractLocalKeyframes,\n filterUsedKeyframes,\n hasLocalKeyframes,\n mergeKeyframes,\n} from '../keyframes';\nimport type { StyleResult } from '../pipeline';\nimport { renderStyles } from '../pipeline';\nimport {\n formatKeyframesCSS,\n formatKeyframesSteps,\n} from '../ssr/format-keyframes';\nimport {\n extractLocalProperties,\n getEffectiveDefinition,\n hasLocalProperties,\n} from '../properties';\nimport { DEFAULT_PROPERTIES } from '../properties/defaults';\nimport { PropertyTypeResolver } from '../properties/property-type-resolver';\nimport { formatPropertyCSS } from '../ssr/format-property';\nimport type { Styles } from '../styles/types';\nimport {\n DEFAULT_ZERO_NAME_PREFIX,\n makeClassName,\n makeKeyframeName,\n validateNamePrefix,\n} from '../utils/name-prefix';\nimport { resolveRecipesWith } from '../utils/resolve-recipes-core';\n\nimport type { ResolvedZeroConfig } from './config';\nimport {\n getActiveZeroConfig,\n reapplyZeroConfig,\n setActiveZeroConfig,\n} from './config';\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 * The configuration set through `/zero` `configure()`, applied to the engine\n * again if something else replaced it since (the state is process-wide).\n * The Babel plugin applies and passes its own, and uses the internal\n * extractors that skip this.\n */\nfunction applyActiveConfig(): ResolvedZeroConfig | null {\n const active = getActiveZeroConfig();\n if (!active) return null;\n\n const applied = reapplyZeroConfig(active);\n if (applied !== active) {\n setActiveZeroConfig(applied);\n setExtractorNamePrefix(\n applied.source.namePrefix ?? DEFAULT_ZERO_NAME_PREFIX,\n );\n }\n return applied;\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 config = applyActiveConfig();\n return extractChunks(\n config ? resolveRecipesWith(styles, config.normalized.recipes) : styles,\n );\n}\n\n/**\n * Chunked class extraction against whatever configuration is applied.\n */\nexport function extractChunks(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, led by the `@keyframes` its rules animate.\n */\nexport function extractStylesForSelector(\n selector: string,\n styles: Styles,\n): ExtractedSelector {\n const config = applyActiveConfig();\n const css = extractSelectorCSS(\n selector,\n config ? resolveRecipesWith(styles, config.normalized.recipes) : styles,\n config?.normalized.keyframes,\n );\n\n return { selector, css };\n}\n\n/**\n * Selector-mode CSS with the `@keyframes` its rules animate — local ones and\n * the given global ones — under hashed names the rules are rewritten to.\n */\nexport function extractSelectorCSS(\n selector: string,\n styles: Styles,\n globalKeyframes?: Record<string, KeyframesSteps> | null,\n): string {\n const css = renderSelectorCSS(selector, styles);\n const { keyframes, nameMap } = extractKeyframesFromStyles(\n styles,\n globalKeyframes,\n );\n if (keyframes.length === 0) return css;\n\n return [\n ...keyframes.map((kf) => kf.css),\n replaceAnimationNamesInCSS(css, nameMap),\n ].join('\\n\\n');\n}\n\n/**\n * Selector-mode rules alone, for callers that emit the keyframes themselves.\n */\nexport function renderSelectorCSS(selector: string, styles: Styles): string {\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 return formatRulesDirectly(rules);\n}\n\n/**\n * Replace animation names in formatted CSS (whole rules, not declarations).\n */\nexport function replaceAnimationNamesInCSS(\n css: string,\n nameMap: Map<string, string>,\n): string {\n if (nameMap.size === 0) return css;\n\n // The CSS contains full rules like \".class { animation: name 1s; }\".\n // Only a declaration start (after `{` or `;`) counts, so neither a selector\n // such as `.animation:hover` nor a custom property such as\n // `--my-animation` is rewritten.\n return css.replace(\n /(?<=[{;]\\s*)(animation(?:-name)?)\\s*:\\s*([^;}]+)/gi,\n (match, prop, value) => {\n let newValue = value;\n for (const [original, replacement] of nameMap) {\n // Identifier boundary: `-` continues a name, so `spin` stays out of\n // `spin-fast`.\n const pattern = new RegExp(\n `(?<![\\\\w-])${escapeRegex(original)}(?![\\\\w-])`,\n 'g',\n );\n newValue = newValue.replace(pattern, replacement);\n }\n return `${prop}: ${newValue}`;\n },\n );\n}\n\n/**\n * Escape special regex characters.\n */\nfunction escapeRegex(str: string): string {\n return str.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\$&');\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 const declarations = rule.startingStyle\n ? `@starting-style { ${rule.declarations} }`\n : rule.declarations;\n let css = `${selector} { ${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 = formatKeyframesCSS(hashedName, steps);\n keyframesToEmit.push({ name: hashedName, css });\n }\n }\n\n return { keyframes: keyframesToEmit, nameMap };\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\nexport interface PropertyExtractionOptions {\n /** `false` turns automatic `@property` inference off. */\n autoPropertyTypes?: boolean;\n /**\n * CSS names (`--gap`, `--white-color`) already registered elsewhere, such as\n * by {@link extractConfigProperties}. Inference leaves them alone, so the\n * explicit definition is the one that applies.\n */\n defined?: ReadonlySet<string>;\n}\n\n/**\n * The `@property` rules a configuration registers: Tasty's defaults (`#white`,\n * `#border`, `$gap`, `$radius`, …) overlaid with `config.properties`, the same\n * set the runtime registers.\n *\n * Style handlers read several of the defaults with no fallback of their own,\n * so CSS from `extractStylesWithChunks()` and `extractStylesForSelector()`\n * needs these rules alongside it, once per stylesheet.\n *\n * @param properties - Properties to overlay on the defaults. Without it, the\n * ones set through `/zero` `configure()` (plugins included).\n */\nexport function extractConfigProperties(\n properties: Record<string, PropertyDefinition> = getActiveZeroConfig()\n ?.normalized.properties ?? {},\n): ExtractedProperty[] {\n const results: ExtractedProperty[] = [];\n\n for (const [token, definition] of Object.entries({\n ...DEFAULT_PROPERTIES,\n ...properties,\n })) {\n const { cssName, isValid } = getEffectiveDefinition(token, definition);\n const css = isValid ? formatPropertyCSS(token, definition) : '';\n if (css) results.push({ name: cssName, css });\n }\n\n return results;\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 - Whether inference is on, and which properties to leave alone\n * @returns Array of @property CSS rules to inject\n */\nexport function extractPropertiesFromStyles(\n styles: Styles,\n options?: PropertyExtractionOptions,\n): ExtractedProperty[] {\n if (options?.autoPropertyTypes === false) return [];\n\n const registered = new Set<string>(options?.defined);\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 // The declarations the steps are emitted with, so `$name` and `#name` keys\n // register the custom properties they actually set.\n resolver.scanDeclarations(\n formatKeyframesSteps(steps).declarations,\n isPropertyDefined,\n registerProperty,\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. @font-face is keyed by content hash, not family name, so\n // distinct definitions all emit and byte-identical ones collapse — there is\n // no \"winner\" to pick between a global and a local definition.\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; component-local definitions override global ones with\n * the same name (local wins).\n */\nexport function extractCounterStyleFromStyles(\n styles: Styles,\n globalCounterStyle?: Record<string, CounterStyleDescriptors> | null,\n): ExtractedCounterStyle[] {\n const byName = new Map<string, ExtractedCounterStyle>();\n\n function addCounterStyle(name: string, descriptors: CounterStyleDescriptors) {\n byName.set(name, { name, css: formatCounterStyleRule(name, descriptors) });\n }\n\n // Global counter styles first, then local — local replaces global on conflict.\n if (globalCounterStyle) {\n for (const [name, descriptors] of Object.entries(globalCounterStyle)) {\n addCounterStyle(name, descriptors);\n }\n }\n\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 [...byName.values()];\n}\n\n// ============================================================================\n// Function Extraction (zero-runtime)\n// ============================================================================\n\nexport interface ExtractedFunction {\n name: string;\n css: string;\n}\n\n/**\n * Extract @function rules from styles, merging with global config.\n * Deduplicates by CSS function name; component-local definitions override\n * global ones with the same name (local wins).\n */\nexport function extractFunctionsFromStyles(\n styles: Styles,\n globalFunction?: Record<string, FunctionDefinition> | null,\n): ExtractedFunction[] {\n // @function polyfill: register definitions as inline closures so call sites\n // are expanded to plain CSS during chunk rendering. No native @function rules\n // are emitted. Global definitions are also registered here as a safety net in\n // case configure() ran in a separate module scope.\n if (isFunctionsPolyfillEnabled()) {\n if (globalFunction) {\n for (const [name, definition] of Object.entries(globalFunction)) {\n registerFunctionPolyfill(name, definition);\n }\n }\n registerLocalFunctionPolyfills(styles);\n return [];\n }\n\n const byName = new Map<string, ExtractedFunction>();\n\n function addFunction(name: string, definition: FunctionDefinition) {\n const cssName = parseFunctionName(name);\n byName.set(cssName, {\n name: cssName,\n css: formatFunctionRule(name, definition),\n });\n }\n\n // Global functions first, then local — local replaces global on conflict.\n if (globalFunction) {\n for (const [name, definition] of Object.entries(globalFunction)) {\n addFunction(name, definition);\n }\n }\n\n if (hasLocalFunctions(styles)) {\n const local = extractLocalFunctions(styles);\n if (local) {\n for (const [name, definition] of Object.entries(local)) {\n addFunction(name, definition);\n }\n }\n }\n\n return [...byName.values()];\n}\n","import * as fs from 'fs';\nimport * as path from 'path';\n\nexport interface 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\n/**\n * Factory for creating a {@link CSSWriter} instance.\n *\n * Canonical functional entry point; the `CSSWriter` class remains exported\n * for advanced/internal use.\n *\n * @example\n * ```ts\n * import { createCSSWriter } from '@tenphi/tasty/zero';\n *\n * const writer = createCSSWriter('output.css', { devMode: true });\n * ```\n */\nexport function createCSSWriter(\n outputPath: string,\n options?: CSSWriterOptions,\n): CSSWriter {\n return new CSSWriter(outputPath, options);\n}\n"],"mappings":";;;;;;;;AAoGA,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;AAQA,SAAS,oBAA+C;CACtD,MAAM,SAAS,oBAAoB;CACnC,IAAI,CAAC,QAAQ,OAAO;CAEpB,MAAM,UAAU,kBAAkB,MAAM;CACxC,IAAI,YAAY,QAAQ;EACtB,oBAAoB,OAAO;EAC3B,uBACE,QAAQ,OAAO,cAAA,IACjB;CACF;CACA,OAAO;AACT;AAMA,SAAgB,wBAAwB,QAAkC;CACxE,MAAM,SAAS,kBAAkB;CACjC,OAAO,cACL,SAAS,mBAAmB,QAAQ,OAAO,WAAW,OAAO,IAAI,MACnE;AACF;AAKA,SAAgB,cAAc,QAAkC;CAC9D,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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KAAa,QAAuB;EACnD,KAAK,UAAU,IAAI,KAAK;GAAE;GAAK;EAAO,CAAC;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;AAeA,SAAgB,gBACd,YACA,SACW;CACX,OAAO,IAAI,UAAU,YAAY,OAAO;AAC1C"}
1
+ {"version":3,"file":"zero-engine-DcwaCvFs.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 FunctionDefinition,\n KeyframesSteps,\n PropertyDefinition,\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 { isFunctionsPolyfillEnabled } from '../config-state';\nimport {\n extractLocalFunctions,\n formatFunctionRule,\n hasLocalFunctions,\n parseFunctionName,\n registerFunctionPolyfill,\n registerLocalFunctionPolyfills,\n} from '../functions';\nimport {\n extractAnimationNamesFromStyles,\n extractLocalKeyframes,\n filterUsedKeyframes,\n hasLocalKeyframes,\n mergeKeyframes,\n} from '../keyframes';\nimport type { StyleResult } from '../pipeline';\nimport { renderStyles } from '../pipeline';\nimport {\n formatKeyframesCSS,\n formatKeyframesSteps,\n} from '../ssr/format-keyframes';\nimport {\n extractLocalProperties,\n getEffectiveDefinition,\n hasLocalProperties,\n} from '../properties';\nimport { DEFAULT_PROPERTIES } from '../properties/defaults';\nimport { PropertyTypeResolver } from '../properties/property-type-resolver';\nimport { formatPropertyCSS } from '../ssr/format-property';\nimport type { Styles } from '../styles/types';\nimport {\n DEFAULT_ZERO_NAME_PREFIX,\n makeClassName,\n makeKeyframeName,\n validateNamePrefix,\n} from '../utils/name-prefix';\nimport { resolveRecipesWith } from '../utils/resolve-recipes-core';\n\nimport type { ResolvedZeroConfig } from './config';\nimport {\n getActiveZeroConfig,\n reapplyZeroConfig,\n setActiveZeroConfig,\n} from './config';\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 * The configuration set through `/zero` `configure()`, applied to the engine\n * again if something else replaced it since (the state is process-wide).\n * The Babel plugin applies and passes its own, and uses the internal\n * extractors that skip this.\n */\nfunction applyActiveConfig(): ResolvedZeroConfig | null {\n const active = getActiveZeroConfig();\n if (!active) return null;\n\n const applied = reapplyZeroConfig(active);\n if (applied !== active) {\n setActiveZeroConfig(applied);\n setExtractorNamePrefix(\n applied.source.namePrefix ?? DEFAULT_ZERO_NAME_PREFIX,\n );\n }\n return applied;\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 config = applyActiveConfig();\n return extractChunks(\n config ? resolveRecipesWith(styles, config.normalized.recipes) : styles,\n );\n}\n\n/**\n * Chunked class extraction against whatever configuration is applied.\n */\nexport function extractChunks(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, led by the `@keyframes` its rules animate.\n */\nexport function extractStylesForSelector(\n selector: string,\n styles: Styles,\n): ExtractedSelector {\n const config = applyActiveConfig();\n const css = extractSelectorCSS(\n selector,\n config ? resolveRecipesWith(styles, config.normalized.recipes) : styles,\n config?.normalized.keyframes,\n );\n\n return { selector, css };\n}\n\n/**\n * Selector-mode CSS with the `@keyframes` its rules animate — local ones and\n * the given global ones — under hashed names the rules are rewritten to.\n */\nexport function extractSelectorCSS(\n selector: string,\n styles: Styles,\n globalKeyframes?: Record<string, KeyframesSteps> | null,\n): string {\n const css = renderSelectorCSS(selector, styles);\n const { keyframes, nameMap } = extractKeyframesFromStyles(\n styles,\n globalKeyframes,\n );\n if (keyframes.length === 0) return css;\n\n return [\n ...keyframes.map((kf) => kf.css),\n replaceAnimationNamesInCSS(css, nameMap),\n ].join('\\n\\n');\n}\n\n/**\n * Selector-mode rules alone, for callers that emit the keyframes themselves.\n */\nexport function renderSelectorCSS(selector: string, styles: Styles): string {\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 return formatRulesDirectly(rules);\n}\n\n/**\n * Replace animation names in formatted CSS (whole rules, not declarations).\n */\nexport function replaceAnimationNamesInCSS(\n css: string,\n nameMap: Map<string, string>,\n): string {\n if (nameMap.size === 0) return css;\n\n // The CSS contains full rules like \".class { animation: name 1s; }\".\n // Only a declaration start (after `{` or `;`) counts, so neither a selector\n // such as `.animation:hover` nor a custom property such as\n // `--my-animation` is rewritten.\n return css.replace(\n /(?<=[{;]\\s*)(animation(?:-name)?)\\s*:\\s*([^;}]+)/gi,\n (match, prop, value) => {\n let newValue = value;\n for (const [original, replacement] of nameMap) {\n // Identifier boundary: `-` continues a name, so `spin` stays out of\n // `spin-fast`.\n const pattern = new RegExp(\n `(?<![\\\\w-])${escapeRegex(original)}(?![\\\\w-])`,\n 'g',\n );\n newValue = newValue.replace(pattern, replacement);\n }\n return `${prop}: ${newValue}`;\n },\n );\n}\n\n/**\n * Escape special regex characters.\n */\nfunction escapeRegex(str: string): string {\n return str.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\$&');\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 const declarations = rule.startingStyle\n ? `@starting-style { ${rule.declarations} }`\n : rule.declarations;\n let css = `${selector} { ${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 = formatKeyframesCSS(hashedName, steps);\n keyframesToEmit.push({ name: hashedName, css });\n }\n }\n\n return { keyframes: keyframesToEmit, nameMap };\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\nexport interface PropertyExtractionOptions {\n /** `false` turns automatic `@property` inference off. */\n autoPropertyTypes?: boolean;\n /**\n * CSS names (`--gap`, `--white-color`) already registered elsewhere, such as\n * by {@link extractConfigProperties}. Inference leaves them alone, so the\n * explicit definition is the one that applies.\n */\n defined?: ReadonlySet<string>;\n}\n\n/**\n * The `@property` rules a configuration registers: Tasty's defaults (`#white`,\n * `#border`, `$gap`, `$radius`, …) overlaid with `config.properties`, the same\n * set the runtime registers.\n *\n * Style handlers read several of the defaults with no fallback of their own,\n * so CSS from `extractStylesWithChunks()` and `extractStylesForSelector()`\n * needs these rules alongside it, once per stylesheet.\n *\n * @param properties - Properties to overlay on the defaults. Without it, the\n * ones set through `/zero` `configure()` (plugins included).\n */\nexport function extractConfigProperties(\n properties: Record<string, PropertyDefinition> = getActiveZeroConfig()\n ?.normalized.properties ?? {},\n): ExtractedProperty[] {\n const results: ExtractedProperty[] = [];\n\n for (const [token, definition] of Object.entries({\n ...DEFAULT_PROPERTIES,\n ...properties,\n })) {\n const { cssName, isValid } = getEffectiveDefinition(token, definition);\n const css = isValid ? formatPropertyCSS(token, definition) : '';\n if (css) results.push({ name: cssName, css });\n }\n\n return results;\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 - Whether inference is on, and which properties to leave alone\n * @returns Array of @property CSS rules to inject\n */\nexport function extractPropertiesFromStyles(\n styles: Styles,\n options?: PropertyExtractionOptions,\n): ExtractedProperty[] {\n if (options?.autoPropertyTypes === false) return [];\n\n const registered = new Set<string>(options?.defined);\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 // The declarations the steps are emitted with, so `$name` and `#name` keys\n // register the custom properties they actually set.\n resolver.scanDeclarations(\n formatKeyframesSteps(steps).declarations,\n isPropertyDefined,\n registerProperty,\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. @font-face is keyed by content hash, not family name, so\n // distinct definitions all emit and byte-identical ones collapse — there is\n // no \"winner\" to pick between a global and a local definition.\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; component-local definitions override global ones with\n * the same name (local wins).\n */\nexport function extractCounterStyleFromStyles(\n styles: Styles,\n globalCounterStyle?: Record<string, CounterStyleDescriptors> | null,\n): ExtractedCounterStyle[] {\n const byName = new Map<string, ExtractedCounterStyle>();\n\n function addCounterStyle(name: string, descriptors: CounterStyleDescriptors) {\n byName.set(name, { name, css: formatCounterStyleRule(name, descriptors) });\n }\n\n // Global counter styles first, then local — local replaces global on conflict.\n if (globalCounterStyle) {\n for (const [name, descriptors] of Object.entries(globalCounterStyle)) {\n addCounterStyle(name, descriptors);\n }\n }\n\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 [...byName.values()];\n}\n\n// ============================================================================\n// Function Extraction (zero-runtime)\n// ============================================================================\n\nexport interface ExtractedFunction {\n name: string;\n css: string;\n}\n\n/**\n * Extract @function rules from styles, merging with global config.\n * Deduplicates by CSS function name; component-local definitions override\n * global ones with the same name (local wins).\n */\nexport function extractFunctionsFromStyles(\n styles: Styles,\n globalFunction?: Record<string, FunctionDefinition> | null,\n): ExtractedFunction[] {\n // @function polyfill: register definitions as inline closures so call sites\n // are expanded to plain CSS during chunk rendering. No native @function rules\n // are emitted. Global definitions are also registered here as a safety net in\n // case configure() ran in a separate module scope.\n if (isFunctionsPolyfillEnabled()) {\n if (globalFunction) {\n for (const [name, definition] of Object.entries(globalFunction)) {\n registerFunctionPolyfill(name, definition);\n }\n }\n registerLocalFunctionPolyfills(styles);\n return [];\n }\n\n const byName = new Map<string, ExtractedFunction>();\n\n function addFunction(name: string, definition: FunctionDefinition) {\n const cssName = parseFunctionName(name);\n byName.set(cssName, {\n name: cssName,\n css: formatFunctionRule(name, definition),\n });\n }\n\n // Global functions first, then local — local replaces global on conflict.\n if (globalFunction) {\n for (const [name, definition] of Object.entries(globalFunction)) {\n addFunction(name, definition);\n }\n }\n\n if (hasLocalFunctions(styles)) {\n const local = extractLocalFunctions(styles);\n if (local) {\n for (const [name, definition] of Object.entries(local)) {\n addFunction(name, definition);\n }\n }\n }\n\n return [...byName.values()];\n}\n","import * as fs from 'fs';\nimport * as path from 'path';\n\nexport interface 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\n/**\n * Factory for creating a {@link CSSWriter} instance.\n *\n * Canonical functional entry point; the `CSSWriter` class remains exported\n * for advanced/internal use.\n *\n * @example\n * ```ts\n * import { createCSSWriter } from '@tenphi/tasty/zero';\n *\n * const writer = createCSSWriter('output.css', { devMode: true });\n * ```\n */\nexport function createCSSWriter(\n outputPath: string,\n options?: CSSWriterOptions,\n): CSSWriter {\n return new CSSWriter(outputPath, options);\n}\n"],"mappings":";;;;;;;;AAoGA,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;AAQA,SAAS,oBAA+C;CACtD,MAAM,SAAS,oBAAoB;CACnC,IAAI,CAAC,QAAQ,OAAO;CAEpB,MAAM,UAAU,kBAAkB,MAAM;CACxC,IAAI,YAAY,QAAQ;EACtB,oBAAoB,OAAO;EAC3B,uBACE,QAAQ,OAAO,cAAA,IACjB;CACF;CACA,OAAO;AACT;AAM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;EACZ,KAAK,UAAU,MAAM;CACvB;CAKA,gBAAwB;EACtB,OAAO,KAAK;CACd;AACF;AAeA,SAAgB,gBACd,YACA,SACW;CACX,OAAO,IAAI,UAAU,YAAY,OAAO;AAC1C"}
@@ -1,4 +1,4 @@
1
- import { M as StyleResult } from "./types-DsK6JM1J.js";
1
+ import { M as StyleResult } from "./types-CYQIhUg1.js";
2
2
  //#region src/ssr/artifacts.d.ts
3
3
  type ServerStyleArtifactKind = 'property' | 'font-face' | 'counter-style' | 'function' | 'raw' | 'global' | 'chunk' | 'keyframes';
4
4
  interface ServerStyleArtifact {
@@ -161,4 +161,4 @@ declare class ServerStyleCollector {
161
161
  declare function createServerStyleCollector(namePrefix?: string): ServerStyleCollector;
162
162
  //#endregion
163
163
  export { ServerStyleArtifactKind as i, createServerStyleCollector as n, ServerStyleArtifact as r, ServerStyleCollector as t };
164
- //# sourceMappingURL=collector-sOn_LJks.d.ts.map
164
+ //# sourceMappingURL=collector-D2OT6I2G.d.ts.map
@@ -1,4 +1,4 @@
1
- import { C as SheetInfo, Et as StyleDetails, M as StyleResult, Ot as UnitHandler, S as RuleInfo, T as StyleRule, W as ConfigTokens, Y as Styles, _ as KeyframesSteps, a as FontFaceInput, b as RawCSSResult, c as GCConfig, d as InjectOptions, f as InjectResult, g as KeyframesResult, h as KeyframesInfo, i as FontFaceDescriptors, l as GCOptions, lt as StyleHandlerDefinition, n as CounterStyleDescriptors, o as FunctionDefinition, q as RecipeStyles, t as CacheMetrics, u as GlobalInjectResult, v as PropertyDefinition, w as StyleInjectorConfig, x as RootRegistry } from "./types-DsK6JM1J.js";
1
+ import { C as SheetInfo, Et as StyleDetails, M as StyleResult, Ot as UnitHandler, S as RuleInfo, T as StyleRule, W as ConfigTokens, Y as Styles, _ as KeyframesSteps, a as FontFaceInput, b as RawCSSResult, c as GCConfig, d as InjectOptions, f as InjectResult, g as KeyframesResult, h as KeyframesInfo, i as FontFaceDescriptors, l as GCOptions, lt as StyleHandlerDefinition, n as CounterStyleDescriptors, o as FunctionDefinition, q as RecipeStyles, t as CacheMetrics, u as GlobalInjectResult, v as PropertyDefinition, w as StyleInjectorConfig, x as RootRegistry } from "./types-CYQIhUg1.js";
2
2
  //#region src/config-resources.d.ts
3
3
  declare function getGlobalFontFaces(): Record<string, FontFaceInput> | null;
4
4
  declare function getGlobalCounterStyles(): Record<string, CounterStyleDescriptors> | null;
@@ -1364,4 +1364,4 @@ declare function getNamePrefix(): string;
1364
1364
  declare function resetConfig(): void;
1365
1365
  //#endregion
1366
1366
  export { PropHandlerProps as C, getGlobalKeyframes as D, getGlobalFunctions as E, PropHandlerDefinition as S, getGlobalFontFaces as T, FunctionsConfig as _, getNamePrefix as a, SheetManager as b, isConfigLocked as c, TastyPlugin as d, TastyPluginFactory as f, ColorSpace as g, generateTypographyTokens as h, getGlobalRecipes as i, isTestEnvironment as l, TypographyTokenValue as m, configure as n, hasGlobalKeyframes as o, TypographyPreset as p, getConfig as r, hasGlobalRecipes as s, TastyConfig as t, resetConfig as u, ParseFunction as v, getGlobalCounterStyles as w, PropHandler as x, StyleInjector as y };
1367
- //# sourceMappingURL=config-bnwIG-_F.d.ts.map
1367
+ //# sourceMappingURL=config-C4ftFxgI.d.ts.map
@@ -1,5 +1,5 @@
1
- import { $ as TastyNamedColors, A as resetStyleBatch, B as getGlobalPredefinedStates, C as SheetInfo, Ct as StyleParser, D as QueuedWrite, Dt as StyleDetailsPart, E as StyleUsage, Et as StyleDetails, F as parseStateKey, G as NoType, H as ConditionNode, I as AtRuleContext, J as Selector, K as NotSelector, L as ParsedAdvancedState, M as StyleResult, N as renderStyles, O as flushStyles, Ot as UnitHandler, P as ParseStateKeyOptions, Q as SuffixForSelector, R as StateParserContext, S as RuleInfo, St as stringifyStyles, T as StyleRule, Tt as ProcessedStyle, U as ConfigTokenValue, V as setGlobalPredefinedStates, W as ConfigTokens, X as StylesInterface, Y as Styles, Z as StylesWithoutSelectors, _ as KeyframesSteps, _t as getGlobalParser, a as FontFaceInput, at as ParsedColor, b as RawCSSResult, bt as parseColor, c as GCConfig, ct as StyleHandler, d as InjectOptions, dt as StyleHandlerResult, et as TastyPresetNames, f as InjectResult, ft as StyleMap, g as KeyframesResult, gt as filterMods, h as KeyframesInfo, ht as StyleValueStateMap, i as FontFaceDescriptors, it as DIRECTIONS, j as RenderResult, k as hasPendingStyleWrites, kt as CSSProperties, l as GCOptions, lt as StyleHandlerDefinition, m as KeyframesCacheEntry, mt as StyleValue, n as CounterStyleDescriptors, nt as CSSMap, o as FunctionDefinition, ot as RawStyleHandler, p as InjectionMode, pt as StylePropValue, q as RecipeStyles, r as DisposeFunction, rt as CUSTOM_UNITS, s as FunctionParameter, st as ResolvedStyleValue, t as CacheMetrics, tt as AnyStyleHandler, ut as StyleHandlerProps, v as PropertyDefinition, vt as getGlobalPredefinedTokens, w as StyleInjectorConfig, wt as ParserOptions, x as RootRegistry, xt as parseStyle, y as PropertyOptions, yt as normalizeColorTokenValue, z as createStateParserContext } from "../types-DsK6JM1J.js";
2
- import { $ as createColorFunc, $t as ModValue, A as keyframes, An as hexToRgb, B as styleHandlers, C as getRawCSSText, Cn as TEXT_STYLES, D as injectRawCSS, Dn as isSelector, E as injectGlobal, En as hasStylesGenerated, F as chunkSheetRegistry, G as ChunkName, Gt as BlockOuterStyleProps, H as categorizeStyleKeys, I as ComputeStylesOptions, J as FONT_CHUNK_STYLES, Jt as ContainerStyleProps, K as DIMENSION_CHUNK_STYLES, Kt as BlockStyleProps, L as ComputeStylesResult, M as property, Mn as strToRgb, N as touch, O as injector, On as getNamedColorHex, P as ChunkSheetRegistry, Q as resolveFunctionColor, Qt as InnerStyleProps, R as computeStyles, S as getCSSTextForNode, Sn as POSITION_STYLES, T as inject, Tn as DEFAULT_ZERO_NAME_PREFIX, U as APPEARANCE_CHUNK_STYLES, Ut as BaseStyleProps, V as ChunkInfo, W as CHUNK_NAMES, Wt as BlockInnerStyleProps, X as POSITION_CHUNK_STYLES, Xt as ExtraBaseStyleProps, Y as LAYOUT_CHUNK_STYLES, Yt as DimensionStyleProps, Z as STYLE_TO_CHUNK, Zt as FlowStyleProps, _ as destroy, _n as CONTAINER_STYLES, a as DebugOptions, an as TastyBaseStylePropNames, b as gc, bn as INNER_STYLES, c as tastyDebug, cn as TastyThemeNames, d as modAttrs, dn as Tokens, en as Mods, et as okhstFunction, f as color, fn as BASE_STYLES, g as createInjector, gn as COLOR_STYLES, h as counterStyle, hn as BLOCK_STYLES, i as DebugChunkInfo, in as TagName, j as ownKeyframes, jn as hslToRgbValues, k as isPropertyDefined, kn as getRgbValuesFromRgbaString, l as processTokens, ln as TextStyleProps, m as cleanup, mn as BLOCK_OUTER_STYLES, n as CacheStatus, nn as PositionStyleProps, nt as okhslFunction, o as InspectResult, on as TastyCustomProps, p as filterBaseProps, pn as BLOCK_INNER_STYLES, q as DISPLAY_CHUNK_STYLES, qt as ColorStyleProps, r as ChunkBreakdown, rn as ShortGridStyles, rt as okhslPlugin, s as Summary, sn as TastyExtensionConfig, t as CSSOptions, tn as OuterStyleProps, tt as okhstPlugin, u as resolveRecipes, un as TokenValue, v as fontFace, vn as DIMENSION_STYLES, w as holdKeyframes, wn as DEFAULT_NAME_PREFIX, x as getCSSText, xn as OUTER_STYLES, y as func, yn as FLOW_STYLES, z as defineHandler } from "../index-B-ufiyqs.js";
3
- import { C as PropHandlerProps, D as getGlobalKeyframes, E as getGlobalFunctions, S as PropHandlerDefinition, T as getGlobalFontFaces, _ as FunctionsConfig, a as getNamePrefix, b as SheetManager, c as isConfigLocked, d as TastyPlugin, f as TastyPluginFactory, g as ColorSpace, h as generateTypographyTokens, i as getGlobalRecipes, l as isTestEnvironment, m as TypographyTokenValue, n as configure, o as hasGlobalKeyframes, p as TypographyPreset, r as getConfig, s as hasGlobalRecipes, t as TastyConfig, u as resetConfig, v as ParseFunction, w as getGlobalCounterStyles, x as PropHandler, y as StyleInjector } from "../config-bnwIG-_F.js";
4
- import { t as mergeStyles } from "../merge-styles-CLE6OMiV.js";
1
+ import { $ as TastyNamedColors, A as resetStyleBatch, B as getGlobalPredefinedStates, C as SheetInfo, Ct as StyleParser, D as QueuedWrite, Dt as StyleDetailsPart, E as StyleUsage, Et as StyleDetails, F as parseStateKey, G as NoType, H as ConditionNode, I as AtRuleContext, J as Selector, K as NotSelector, L as ParsedAdvancedState, M as StyleResult, N as renderStyles, O as flushStyles, Ot as UnitHandler, P as ParseStateKeyOptions, Q as SuffixForSelector, R as StateParserContext, S as RuleInfo, St as stringifyStyles, T as StyleRule, Tt as ProcessedStyle, U as ConfigTokenValue, V as setGlobalPredefinedStates, W as ConfigTokens, X as StylesInterface, Y as Styles, Z as StylesWithoutSelectors, _ as KeyframesSteps, _t as getGlobalParser, a as FontFaceInput, at as ParsedColor, b as RawCSSResult, bt as parseColor, c as GCConfig, ct as StyleHandler, d as InjectOptions, dt as StyleHandlerResult, et as TastyPresetNames, f as InjectResult, ft as StyleMap, g as KeyframesResult, gt as filterMods, h as KeyframesInfo, ht as StyleValueStateMap, i as FontFaceDescriptors, it as DIRECTIONS, j as RenderResult, k as hasPendingStyleWrites, kt as CSSProperties, l as GCOptions, lt as StyleHandlerDefinition, m as KeyframesCacheEntry, mt as StyleValue, n as CounterStyleDescriptors, nt as CSSMap, o as FunctionDefinition, ot as RawStyleHandler, p as InjectionMode, pt as StylePropValue, q as RecipeStyles, r as DisposeFunction, rt as CUSTOM_UNITS, s as FunctionParameter, st as ResolvedStyleValue, t as CacheMetrics, tt as AnyStyleHandler, ut as StyleHandlerProps, v as PropertyDefinition, vt as getGlobalPredefinedTokens, w as StyleInjectorConfig, wt as ParserOptions, x as RootRegistry, xt as parseStyle, y as PropertyOptions, yt as normalizeColorTokenValue, z as createStateParserContext } from "../types-CYQIhUg1.js";
2
+ import { $ as createColorFunc, $t as ModValue, A as keyframes, An as hexToRgb, B as styleHandlers, C as getRawCSSText, Cn as TEXT_STYLES, D as injectRawCSS, Dn as isSelector, E as injectGlobal, En as hasStylesGenerated, F as chunkSheetRegistry, G as ChunkName, Gt as BlockOuterStyleProps, H as categorizeStyleKeys, I as ComputeStylesOptions, J as FONT_CHUNK_STYLES, Jt as ContainerStyleProps, K as DIMENSION_CHUNK_STYLES, Kt as BlockStyleProps, L as ComputeStylesResult, M as property, Mn as strToRgb, N as touch, O as injector, On as getNamedColorHex, P as ChunkSheetRegistry, Q as resolveFunctionColor, Qt as InnerStyleProps, R as computeStyles, S as getCSSTextForNode, Sn as POSITION_STYLES, T as inject, Tn as DEFAULT_ZERO_NAME_PREFIX, U as APPEARANCE_CHUNK_STYLES, Ut as BaseStyleProps, V as ChunkInfo, W as CHUNK_NAMES, Wt as BlockInnerStyleProps, X as POSITION_CHUNK_STYLES, Xt as ExtraBaseStyleProps, Y as LAYOUT_CHUNK_STYLES, Yt as DimensionStyleProps, Z as STYLE_TO_CHUNK, Zt as FlowStyleProps, _ as destroy, _n as CONTAINER_STYLES, a as DebugOptions, an as TastyBaseStylePropNames, b as gc, bn as INNER_STYLES, c as tastyDebug, cn as TastyThemeNames, d as modAttrs, dn as Tokens, en as Mods, et as okhstFunction, f as color, fn as BASE_STYLES, g as createInjector, gn as COLOR_STYLES, h as counterStyle, hn as BLOCK_STYLES, i as DebugChunkInfo, in as TagName, j as ownKeyframes, jn as hslToRgbValues, k as isPropertyDefined, kn as getRgbValuesFromRgbaString, l as processTokens, ln as TextStyleProps, m as cleanup, mn as BLOCK_OUTER_STYLES, n as CacheStatus, nn as PositionStyleProps, nt as okhslFunction, o as InspectResult, on as TastyCustomProps, p as filterBaseProps, pn as BLOCK_INNER_STYLES, q as DISPLAY_CHUNK_STYLES, qt as ColorStyleProps, r as ChunkBreakdown, rn as ShortGridStyles, rt as okhslPlugin, s as Summary, sn as TastyExtensionConfig, t as CSSOptions, tn as OuterStyleProps, tt as okhstPlugin, u as resolveRecipes, un as TokenValue, v as fontFace, vn as DIMENSION_STYLES, w as holdKeyframes, wn as DEFAULT_NAME_PREFIX, x as getCSSText, xn as OUTER_STYLES, y as func, yn as FLOW_STYLES, z as defineHandler } from "../index-DxQNRj50.js";
3
+ import { C as PropHandlerProps, D as getGlobalKeyframes, E as getGlobalFunctions, S as PropHandlerDefinition, T as getGlobalFontFaces, _ as FunctionsConfig, a as getNamePrefix, b as SheetManager, c as isConfigLocked, d as TastyPlugin, f as TastyPluginFactory, g as ColorSpace, h as generateTypographyTokens, i as getGlobalRecipes, l as isTestEnvironment, m as TypographyTokenValue, n as configure, o as hasGlobalKeyframes, p as TypographyPreset, r as getConfig, s as hasGlobalRecipes, t as TastyConfig, u as resetConfig, v as ParseFunction, w as getGlobalCounterStyles, x as PropHandler, y as StyleInjector } from "../config-C4ftFxgI.js";
4
+ import { t as mergeStyles } from "../merge-styles-D39qBtox.js";
5
5
  export { APPEARANCE_CHUNK_STYLES, type AnyStyleHandler, type AtRuleContext, BASE_STYLES, BLOCK_INNER_STYLES, BLOCK_OUTER_STYLES, BLOCK_STYLES, type BaseStyleProps, type BlockInnerStyleProps, type BlockOuterStyleProps, type BlockStyleProps, CHUNK_NAMES, COLOR_STYLES, CONTAINER_STYLES, type CSSMap, CSSOptions, type CSSProperties, CUSTOM_UNITS, type CacheMetrics, CacheStatus, ChunkBreakdown, 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, DebugChunkInfo, DebugOptions, type DimensionStyleProps, type DisposeFunction, type ExtraBaseStyleProps, FLOW_STYLES, FONT_CHUNK_STYLES, type FlowStyleProps, type FontFaceDescriptors, type FontFaceInput, type FunctionDefinition, type FunctionParameter, type FunctionsConfig, type GCConfig, type GCOptions, INNER_STYLES, type InjectOptions, type InjectResult, type InjectionMode, type InnerStyleProps, InspectResult, type KeyframesCacheEntry, type KeyframesInfo, type KeyframesResult, type KeyframesSteps, LAYOUT_CHUNK_STYLES, type ModValue, type Mods, type NoType, type NotSelector, OUTER_STYLES, type OuterStyleProps, POSITION_CHUNK_STYLES, POSITION_STYLES, type ParseFunction, type ParseStateKeyOptions, type ParsedAdvancedState, type ParsedColor, type ParserOptions, type PositionStyleProps, type ProcessedStyle, type PropHandler, type PropHandlerDefinition, type PropHandlerProps, type PropertyDefinition, type PropertyOptions, type QueuedWrite, type RawCSSResult, type RawStyleHandler, type RecipeStyles, type RenderResult, type ResolvedStyleValue, type RootRegistry, type RuleInfo, STYLE_TO_CHUNK, type Selector, type SheetInfo, SheetManager, type ShortGridStyles, type StateParserContext, type StyleDetails, type StyleDetailsPart, type StyleHandler, type StyleHandlerDefinition, type StyleHandlerProps, type StyleHandlerResult, StyleInjector, type StyleInjectorConfig, type StyleMap, StyleParser, type StylePropValue, type StyleResult, type StyleRule, type StyleUsage, type StyleValue, type StyleValueStateMap, type Styles, type StylesInterface, type StylesWithoutSelectors, type SuffixForSelector, Summary, TEXT_STYLES, type TagName, type TastyBaseStylePropNames, type TastyConfig, type TastyCustomProps, type TastyExtensionConfig, type TastyNamedColors, type TastyPlugin, type TastyPluginFactory, type TastyPresetNames, type TastyThemeNames, type TextStyleProps, type TokenValue, type Tokens, TypographyPreset, TypographyTokenValue, type UnitHandler, categorizeStyleKeys, chunkSheetRegistry, cleanup, color, computeStyles, configure, counterStyle, createColorFunc, createInjector, createStateParserContext, defineHandler, destroy, filterBaseProps, filterMods, flushStyles, fontFace, func, gc, generateTypographyTokens, getCSSText, getCSSTextForNode, getConfig, getGlobalCounterStyles, getGlobalFontFaces, getGlobalFunctions, getGlobalKeyframes, getGlobalParser, getGlobalPredefinedStates, getGlobalPredefinedTokens, getGlobalRecipes, getNamePrefix, getNamedColorHex, getRawCSSText, getRgbValuesFromRgbaString, hasGlobalKeyframes, hasGlobalRecipes, hasPendingStyleWrites, hasStylesGenerated, hexToRgb, holdKeyframes, hslToRgbValues, inject, injectGlobal, injectRawCSS, injector, isConfigLocked, isPropertyDefined, isSelector, isTestEnvironment, keyframes, mergeStyles, modAttrs, normalizeColorTokenValue, okhslFunction, okhslPlugin, okhstFunction, okhstPlugin, ownKeyframes, parseColor, parseStateKey, parseStyle, processTokens, property, renderStyles, resetConfig, resetStyleBatch, resolveFunctionColor, resolveRecipes, setGlobalPredefinedStates, strToRgb, stringifyStyles, styleHandlers, tastyDebug, touch };
@@ -1,9 +1,9 @@
1
- import { A as hslToRgbValues, C as StyleParser, D as getNamedColorHex, M as strToRgb, O as getRgbValuesFromRgbaString, S as createColorFunc, _ as stringifyStyles, b as okhslFunction, c as getGlobalParser, d as parseColor, f as parseStyle, i as DIRECTIONS, k as hexToRgb, l as getGlobalPredefinedTokens, n as resolveFunctionColor, o as filterMods, r as CUSTOM_UNITS, t as color, u as normalizeColorTokenValue, v as okhstFunction, x as okhslPlugin, y as okhstPlugin } from "../chunks/dsl-dFfTOacf.js";
1
+ import { A as getRgbValuesFromRgbaString, C as createColorFunc, M as hslToRgbValues, P as strToRgb, S as okhslPlugin, b as okhstPlugin, c as getGlobalParser, d as normalizeColorTokenValue, f as parseColor, i as DIRECTIONS, j as hexToRgb, k as getNamedColorHex, l as getGlobalPredefinedTokens, n as resolveFunctionColor, o as filterMods, p as parseStyle, r as CUSTOM_UNITS, t as color, v as stringifyStyles, w as StyleParser, x as okhslFunction, y as okhstFunction } from "../chunks/dsl-CsFl9LGn.js";
2
2
  import { n as isSelector, t as mergeStyles } from "../chunks/shared-utils-y-HjvPN4.js";
3
- import { E as DEFAULT_ZERO_NAME_PREFIX, T as DEFAULT_NAME_PREFIX } from "../chunks/css-definitions-38rLam_O.js";
4
- import { A as styleHandlers, B as STYLE_TO_CHUNK, E as defineHandler, F as DIMENSION_CHUNK_STYLES, G as setGlobalPredefinedStates, I as DISPLAY_CHUNK_STYLES, K as hasStylesGenerated, L as FONT_CHUNK_STYLES, N as APPEARANCE_CHUNK_STYLES, P as CHUNK_NAMES, R as LAYOUT_CHUNK_STYLES, S as parseStateKey, U as createStateParserContext, W as getGlobalPredefinedStates, _ as POSITION_STYLES, b as renderStyles, c as BLOCK_INNER_STYLES, d as COLOR_STYLES, f as CONTAINER_STYLES, g as OUTER_STYLES, h as INNER_STYLES, l as BLOCK_OUTER_STYLES, m as FLOW_STYLES, p as DIMENSION_STYLES, r as categorizeStyleKeys, s as BASE_STYLES, u as BLOCK_STYLES, v as TEXT_STYLES, z as POSITION_CHUNK_STYLES } from "../chunks/style-engine-BB3Ruaa4.js";
5
- import { i as generateTypographyTokens } from "../chunks/config-engine-BlZE_Nop.js";
6
- import { c as getGlobalFontFaces, l as getGlobalFunctions, s as getGlobalCounterStyles, u as getGlobalKeyframes } from "../chunks/runtime-state-B8fkpfgp.js";
7
- import { A as injector, C as getCSSText, D as inject, E as holdKeyframes, F as touch, G as isConfigLocked, H as getNamePrefix, I as ChunkSheetRegistry, J as StyleInjector, K as isTestEnvironment, L as chunkSheetRegistry, M as keyframes, N as ownKeyframes, O as injectGlobal, P as property, Q as hasPendingStyleWrites, R as configure, S as gc, T as getRawCSSText, U as hasGlobalKeyframes, V as getGlobalRecipes, W as hasGlobalRecipes, Y as SheetManager, Z as flushStyles, _ as counterStyle, a as filterBaseProps, b as fontFace, et as resetStyleBatch, g as cleanup, i as modAttrs, j as isPropertyDefined, k as injectRawCSS, o as computeStyles, q as resetConfig, r as processTokens, s as resolveRecipes, v as createInjector, w as getCSSTextForNode, x as func, y as destroy, z as getConfig } from "../chunks/runtime-engine-DZYyyrhB.js";
8
- import { t as tastyDebug } from "../chunks/debug-B4d71eRy.js";
3
+ import { E as DEFAULT_ZERO_NAME_PREFIX, T as DEFAULT_NAME_PREFIX } from "../chunks/css-definitions-B4aWBkH3.js";
4
+ import { A as styleHandlers, B as STYLE_TO_CHUNK, E as defineHandler, F as DIMENSION_CHUNK_STYLES, G as setGlobalPredefinedStates, I as DISPLAY_CHUNK_STYLES, K as hasStylesGenerated, L as FONT_CHUNK_STYLES, N as APPEARANCE_CHUNK_STYLES, P as CHUNK_NAMES, R as LAYOUT_CHUNK_STYLES, S as parseStateKey, U as createStateParserContext, W as getGlobalPredefinedStates, _ as POSITION_STYLES, b as renderStyles, c as BLOCK_INNER_STYLES, d as COLOR_STYLES, f as CONTAINER_STYLES, g as OUTER_STYLES, h as INNER_STYLES, l as BLOCK_OUTER_STYLES, m as FLOW_STYLES, p as DIMENSION_STYLES, r as categorizeStyleKeys, s as BASE_STYLES, u as BLOCK_STYLES, v as TEXT_STYLES, z as POSITION_CHUNK_STYLES } from "../chunks/style-engine-DnkV_4Jg.js";
5
+ import { i as generateTypographyTokens } from "../chunks/config-engine-CMYFZYQh.js";
6
+ import { c as getGlobalFontFaces, l as getGlobalFunctions, s as getGlobalCounterStyles, u as getGlobalKeyframes } from "../chunks/runtime-state-lZjMbvwV.js";
7
+ import { A as injector, C as getCSSText, D as inject, E as holdKeyframes, F as touch, G as isConfigLocked, H as getNamePrefix, I as ChunkSheetRegistry, J as StyleInjector, K as isTestEnvironment, L as chunkSheetRegistry, M as keyframes, N as ownKeyframes, O as injectGlobal, P as property, Q as hasPendingStyleWrites, R as configure, S as gc, T as getRawCSSText, U as hasGlobalKeyframes, V as getGlobalRecipes, W as hasGlobalRecipes, Y as SheetManager, Z as flushStyles, _ as counterStyle, a as filterBaseProps, b as fontFace, et as resetStyleBatch, g as cleanup, i as modAttrs, j as isPropertyDefined, k as injectRawCSS, o as computeStyles, q as resetConfig, r as processTokens, s as resolveRecipes, v as createInjector, w as getCSSTextForNode, x as func, y as destroy, z as getConfig } from "../chunks/runtime-engine-NGCofNXy.js";
8
+ import { t as tastyDebug } from "../chunks/debug-D2Pu7Xhy.js";
9
9
  export { APPEARANCE_CHUNK_STYLES, BASE_STYLES, BLOCK_INNER_STYLES, BLOCK_OUTER_STYLES, BLOCK_STYLES, CHUNK_NAMES, COLOR_STYLES, CONTAINER_STYLES, CUSTOM_UNITS, ChunkSheetRegistry, DEFAULT_NAME_PREFIX, DEFAULT_ZERO_NAME_PREFIX, DIMENSION_CHUNK_STYLES, DIMENSION_STYLES, DIRECTIONS, DISPLAY_CHUNK_STYLES, FLOW_STYLES, FONT_CHUNK_STYLES, INNER_STYLES, LAYOUT_CHUNK_STYLES, OUTER_STYLES, POSITION_CHUNK_STYLES, POSITION_STYLES, STYLE_TO_CHUNK, SheetManager, StyleInjector, StyleParser, TEXT_STYLES, categorizeStyleKeys, chunkSheetRegistry, cleanup, color, computeStyles, configure, counterStyle, createColorFunc, createInjector, createStateParserContext, defineHandler, destroy, filterBaseProps, filterMods, flushStyles, fontFace, func, gc, generateTypographyTokens, getCSSText, getCSSTextForNode, getConfig, getGlobalCounterStyles, getGlobalFontFaces, getGlobalFunctions, getGlobalKeyframes, getGlobalParser, getGlobalPredefinedStates, getGlobalPredefinedTokens, getGlobalRecipes, getNamePrefix, getNamedColorHex, getRawCSSText, getRgbValuesFromRgbaString, hasGlobalKeyframes, hasGlobalRecipes, hasPendingStyleWrites, hasStylesGenerated, hexToRgb, holdKeyframes, hslToRgbValues, inject, injectGlobal, injectRawCSS, injector, isConfigLocked, isPropertyDefined, isSelector, isTestEnvironment, keyframes, mergeStyles, modAttrs, normalizeColorTokenValue, okhslFunction, okhslPlugin, okhstFunction, okhstPlugin, ownKeyframes, parseColor, parseStateKey, parseStyle, processTokens, property, renderStyles, resetConfig, resetStyleBatch, resolveFunctionColor, resolveRecipes, setGlobalPredefinedStates, strToRgb, stringifyStyles, styleHandlers, tastyDebug, touch };
@@ -1,7 +1,7 @@
1
- import { Et as StyleDetails, G as NoType, M as StyleResult, X as StylesInterface, Y as Styles, _ as KeyframesSteps, a as FontFaceInput, ct as StyleHandler, d as InjectOptions, dt as StyleHandlerResult, f as InjectResult, g as KeyframesResult, ht as StyleValueStateMap, i as FontFaceDescriptors, kt as CSSProperties$1, l as GCOptions, mt as StyleValue, n as CounterStyleDescriptors, nt as CSSMap, o as FunctionDefinition, ot as RawStyleHandler, pt as StylePropValue, st as ResolvedStyleValue, t as CacheMetrics, u as GlobalInjectResult, w as StyleInjectorConfig, y as PropertyOptions } from "./types-DsK6JM1J.js";
2
- import { f as TastyPluginFactory, y as StyleInjector } from "./config-bnwIG-_F.js";
3
- import { t as ServerStyleCollector } from "./collector-sOn_LJks.js";
4
- import "./merge-styles-CLE6OMiV.js";
1
+ import { Et as StyleDetails, G as NoType, M as StyleResult, X as StylesInterface, Y as Styles, _ as KeyframesSteps, a as FontFaceInput, ct as StyleHandler, d as InjectOptions, dt as StyleHandlerResult, f as InjectResult, g as KeyframesResult, ht as StyleValueStateMap, i as FontFaceDescriptors, kt as CSSProperties$1, l as GCOptions, mt as StyleValue, n as CounterStyleDescriptors, nt as CSSMap, o as FunctionDefinition, ot as RawStyleHandler, pt as StylePropValue, st as ResolvedStyleValue, t as CacheMetrics, u as GlobalInjectResult, w as StyleInjectorConfig, y as PropertyOptions } from "./types-CYQIhUg1.js";
2
+ import { f as TastyPluginFactory, y as StyleInjector } from "./config-C4ftFxgI.js";
3
+ import { t as ServerStyleCollector } from "./collector-D2OT6I2G.js";
4
+ import "./merge-styles-D39qBtox.js";
5
5
  import React, { AllHTMLAttributes, CSSProperties, ComponentType, ElementType, ForwardRefExoticComponent, JSX, PropsWithoutRef, ReactNode, RefAttributes } from "react";
6
6
  //#region src/utils/color-math.d.ts
7
7
  /**
@@ -1961,4 +1961,4 @@ declare const tastyDebug: {
1961
1961
  };
1962
1962
  //#endregion
1963
1963
  export { createColorFunc as $, ModValue as $t, keyframes as A, hexToRgb as An, TastyComponentPropsWithDefaults as At, styleHandlers as B, AllBaseProps as Bt, getRawCSSText as C, TEXT_STYLES as Cn, ModPropsInput as Ct, injectRawCSS as D, isSelector as Dn, ResolveTokenProps as Dt, injectGlobal as E, hasStylesGenerated as En, ResolveModProps as Et, chunkSheetRegistry as F, TastyProps as Ft, ChunkName as G, BlockOuterStyleProps as Gt, categorizeStyleKeys as H, BasePropsWithoutChildren as Ht, ComputeStylesOptions as I, TokenPropsInput as It, FONT_CHUNK_STYLES as J, ContainerStyleProps as Jt, DIMENSION_CHUNK_STYLES as K, BlockStyleProps as Kt, ComputeStylesResult as L, VariantMap as Lt, property as M, strToRgb as Mn, TastyElementProps as Mt, touch as N, TastyExtensionProps as Nt, injector as O, getNamedColorHex as On, SubElementDefinition as Ot, ChunkSheetRegistry as P, TastyPolymorphicComponent as Pt, resolveFunctionColor as Q, InnerStyleProps as Qt, computeStyles as R, WithVariant as Rt, getCSSTextForNode as S, POSITION_STYLES as Sn, ModPropDef as St, inject as T, DEFAULT_ZERO_NAME_PREFIX as Tn, ResolveModPropDef as Tt, APPEARANCE_CHUNK_STYLES as U, BaseStyleProps as Ut, ChunkInfo as V, BaseProps as Vt, CHUNK_NAMES as W, BlockInnerStyleProps as Wt, POSITION_CHUNK_STYLES as X, ExtraBaseStyleProps as Xt, LAYOUT_CHUNK_STYLES as Y, DimensionStyleProps as Yt, STYLE_TO_CHUNK as Z, FlowStyleProps as Zt, destroy as _, CONTAINER_STYLES as _n, useStyles as _t, DebugOptions as a, TastyBaseStylePropNames as an, TastyBatchProvider as at, gc as b, INNER_STYLES as bn, Element$1 as bt, tastyDebug as c, TastyThemeNames as cn, useFunction as ct, modAttrs as d, Tokens as dn, UsePropertyOptions as dt, Mods as en, okhstFunction as et, color$1 as f, BASE_STYLES as fn, useProperty as ft, createInjector as g, COLOR_STYLES as gn, UseStylesResult as gt, counterStyle as h, BLOCK_STYLES as hn, useGlobalStyles as ht, DebugChunkInfo as i, TagName as in, getDisplayName as it, ownKeyframes as j, hslToRgbValues as jn, TastyElementOptions as jt, isPropertyDefined as k, getRgbValuesFromRgbaString as kn, SubElementProps as kt, processTokens as l, TextStyleProps as ln, useCounterStyle as lt, cleanup as m, BLOCK_OUTER_STYLES as mn, useRawCSS as mt, CacheStatus as n, PositionStyleProps as nn, okhslFunction as nt, InspectResult as o, TastyCustomProps as on, TastyBatchProviderProps as ot, filterBaseProps as p, BLOCK_INNER_STYLES as pn, useKeyframes as pt, DISPLAY_CHUNK_STYLES as q, ColorStyleProps as qt, ChunkBreakdown as r, ShortGridStyles as rn, okhslPlugin as rt, Summary as s, TastyExtensionConfig as sn, UseFunctionOptions as st, CSSOptions as t, OuterStyleProps as tn, okhstPlugin as tt, resolveRecipes as u, TokenValue as un, useFontFace as ut, fontFace as v, DIMENSION_STYLES as vn, AllBasePropsWithMods as vt, holdKeyframes as w, DEFAULT_NAME_PREFIX as wn, ResolveAsProps as wt, getCSSText as x, OUTER_STYLES as xn, ElementsDefinition as xt, func as y, FLOW_STYLES as yn, ComponentStatics as yt, defineHandler as z, tasty as zt };
1964
- //# sourceMappingURL=index-B-ufiyqs.d.ts.map
1964
+ //# sourceMappingURL=index-DxQNRj50.d.ts.map
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { $ as TastyNamedColors, A as resetStyleBatch, B as getGlobalPredefinedStates, C as SheetInfo, Ct as StyleParser, D as QueuedWrite, Dt as StyleDetailsPart, E as StyleUsage, Et as StyleDetails, F as parseStateKey, G as NoType, H as ConditionNode, I as AtRuleContext, J as Selector, K as NotSelector, L as ParsedAdvancedState, M as StyleResult, N as renderStyles, O as flushStyles, Ot as UnitHandler, P as ParseStateKeyOptions, Q as SuffixForSelector, R as StateParserContext, S as RuleInfo, St as stringifyStyles, T as StyleRule, Tt as ProcessedStyle, U as ConfigTokenValue, V as setGlobalPredefinedStates, W as ConfigTokens, X as StylesInterface, Y as Styles, Z as StylesWithoutSelectors, _ as KeyframesSteps, _t as getGlobalParser, a as FontFaceInput, at as ParsedColor, b as RawCSSResult, bt as parseColor, c as GCConfig, ct as StyleHandler, d as InjectOptions, dt as StyleHandlerResult, et as TastyPresetNames, f as InjectResult, ft as StyleMap, g as KeyframesResult, gt as filterMods, h as KeyframesInfo, ht as StyleValueStateMap, i as FontFaceDescriptors, it as DIRECTIONS, j as RenderResult, k as hasPendingStyleWrites, kt as CSSProperties, l as GCOptions, lt as StyleHandlerDefinition, m as KeyframesCacheEntry, mt as StyleValue, n as CounterStyleDescriptors, nt as CSSMap, o as FunctionDefinition, ot as RawStyleHandler, p as InjectionMode, pt as StylePropValue, q as RecipeStyles, r as DisposeFunction, rt as CUSTOM_UNITS, s as FunctionParameter, st as ResolvedStyleValue, t as CacheMetrics, tt as AnyStyleHandler, ut as StyleHandlerProps, v as PropertyDefinition, vt as getGlobalPredefinedTokens, w as StyleInjectorConfig, wt as ParserOptions, x as RootRegistry, xt as parseStyle, y as PropertyOptions, yt as normalizeColorTokenValue, z as createStateParserContext } from "./types-DsK6JM1J.js";
2
- import { $ as createColorFunc, $t as ModValue, A as keyframes, An as hexToRgb, At as TastyComponentPropsWithDefaults, B as styleHandlers, Bt as AllBaseProps, C as getRawCSSText, Cn as TEXT_STYLES, Ct as ModPropsInput, D as injectRawCSS, Dn as isSelector, Dt as ResolveTokenProps, E as injectGlobal, En as hasStylesGenerated, Et as ResolveModProps, F as chunkSheetRegistry, Ft as TastyProps, G as ChunkName, Gt as BlockOuterStyleProps, H as categorizeStyleKeys, Ht as BasePropsWithoutChildren, I as ComputeStylesOptions, It as TokenPropsInput, J as FONT_CHUNK_STYLES, Jt as ContainerStyleProps, K as DIMENSION_CHUNK_STYLES, Kt as BlockStyleProps, L as ComputeStylesResult, Lt as VariantMap, M as property, Mn as strToRgb, Mt as TastyElementProps, N as touch, Nt as TastyExtensionProps, O as injector, On as getNamedColorHex, Ot as SubElementDefinition, P as ChunkSheetRegistry, Pt as TastyPolymorphicComponent, Q as resolveFunctionColor, Qt as InnerStyleProps, R as computeStyles, Rt as WithVariant, S as getCSSTextForNode, Sn as POSITION_STYLES, St as ModPropDef, T as inject, Tn as DEFAULT_ZERO_NAME_PREFIX, Tt as ResolveModPropDef, U as APPEARANCE_CHUNK_STYLES, Ut as BaseStyleProps, V as ChunkInfo, Vt as BaseProps, W as CHUNK_NAMES, Wt as BlockInnerStyleProps, X as POSITION_CHUNK_STYLES, Xt as ExtraBaseStyleProps, Y as LAYOUT_CHUNK_STYLES, Yt as DimensionStyleProps, Z as STYLE_TO_CHUNK, Zt as FlowStyleProps, _ as destroy, _n as CONTAINER_STYLES, _t as useStyles, a as DebugOptions, an as TastyBaseStylePropNames, at as TastyBatchProvider, b as gc, bn as INNER_STYLES, bt as Element, c as tastyDebug, cn as TastyThemeNames, ct as useFunction, d as modAttrs, dn as Tokens, dt as UsePropertyOptions, en as Mods, et as okhstFunction, f as color, fn as BASE_STYLES, ft as useProperty, g as createInjector, gn as COLOR_STYLES, gt as UseStylesResult, h as counterStyle, hn as BLOCK_STYLES, ht as useGlobalStyles, i as DebugChunkInfo, in as TagName, it as getDisplayName, j as ownKeyframes, jn as hslToRgbValues, jt as TastyElementOptions, k as isPropertyDefined, kn as getRgbValuesFromRgbaString, kt as SubElementProps, l as processTokens, ln as TextStyleProps, lt as useCounterStyle, m as cleanup, mn as BLOCK_OUTER_STYLES, mt as useRawCSS, n as CacheStatus, nn as PositionStyleProps, nt as okhslFunction, o as InspectResult, on as TastyCustomProps, ot as TastyBatchProviderProps, p as filterBaseProps, pn as BLOCK_INNER_STYLES, pt as useKeyframes, q as DISPLAY_CHUNK_STYLES, qt as ColorStyleProps, r as ChunkBreakdown, rn as ShortGridStyles, rt as okhslPlugin, s as Summary, sn as TastyExtensionConfig, st as UseFunctionOptions, t as CSSOptions, tn as OuterStyleProps, tt as okhstPlugin, u as resolveRecipes, un as TokenValue, ut as useFontFace, v as fontFace, vn as DIMENSION_STYLES, vt as AllBasePropsWithMods, w as holdKeyframes, wn as DEFAULT_NAME_PREFIX, wt as ResolveAsProps, x as getCSSText, xn as OUTER_STYLES, xt as ElementsDefinition, y as func, yn as FLOW_STYLES, yt as ComponentStatics, z as defineHandler, zt as tasty } from "./index-B-ufiyqs.js";
3
- import { C as PropHandlerProps, D as getGlobalKeyframes, E as getGlobalFunctions, S as PropHandlerDefinition, T as getGlobalFontFaces, _ as FunctionsConfig, a as getNamePrefix, b as SheetManager, c as isConfigLocked, d as TastyPlugin, f as TastyPluginFactory, g as ColorSpace, h as generateTypographyTokens, i as getGlobalRecipes, l as isTestEnvironment, m as TypographyTokenValue, n as configure, o as hasGlobalKeyframes, p as TypographyPreset, r as getConfig, s as hasGlobalRecipes, t as TastyConfig, u as resetConfig, v as ParseFunction, w as getGlobalCounterStyles, x as PropHandler, y as StyleInjector } from "./config-bnwIG-_F.js";
4
- import { t as mergeStyles } from "./merge-styles-CLE6OMiV.js";
1
+ import { $ as TastyNamedColors, A as resetStyleBatch, B as getGlobalPredefinedStates, C as SheetInfo, Ct as StyleParser, D as QueuedWrite, Dt as StyleDetailsPart, E as StyleUsage, Et as StyleDetails, F as parseStateKey, G as NoType, H as ConditionNode, I as AtRuleContext, J as Selector, K as NotSelector, L as ParsedAdvancedState, M as StyleResult, N as renderStyles, O as flushStyles, Ot as UnitHandler, P as ParseStateKeyOptions, Q as SuffixForSelector, R as StateParserContext, S as RuleInfo, St as stringifyStyles, T as StyleRule, Tt as ProcessedStyle, U as ConfigTokenValue, V as setGlobalPredefinedStates, W as ConfigTokens, X as StylesInterface, Y as Styles, Z as StylesWithoutSelectors, _ as KeyframesSteps, _t as getGlobalParser, a as FontFaceInput, at as ParsedColor, b as RawCSSResult, bt as parseColor, c as GCConfig, ct as StyleHandler, d as InjectOptions, dt as StyleHandlerResult, et as TastyPresetNames, f as InjectResult, ft as StyleMap, g as KeyframesResult, gt as filterMods, h as KeyframesInfo, ht as StyleValueStateMap, i as FontFaceDescriptors, it as DIRECTIONS, j as RenderResult, k as hasPendingStyleWrites, kt as CSSProperties, l as GCOptions, lt as StyleHandlerDefinition, m as KeyframesCacheEntry, mt as StyleValue, n as CounterStyleDescriptors, nt as CSSMap, o as FunctionDefinition, ot as RawStyleHandler, p as InjectionMode, pt as StylePropValue, q as RecipeStyles, r as DisposeFunction, rt as CUSTOM_UNITS, s as FunctionParameter, st as ResolvedStyleValue, t as CacheMetrics, tt as AnyStyleHandler, ut as StyleHandlerProps, v as PropertyDefinition, vt as getGlobalPredefinedTokens, w as StyleInjectorConfig, wt as ParserOptions, x as RootRegistry, xt as parseStyle, y as PropertyOptions, yt as normalizeColorTokenValue, z as createStateParserContext } from "./types-CYQIhUg1.js";
2
+ import { $ as createColorFunc, $t as ModValue, A as keyframes, An as hexToRgb, At as TastyComponentPropsWithDefaults, B as styleHandlers, Bt as AllBaseProps, C as getRawCSSText, Cn as TEXT_STYLES, Ct as ModPropsInput, D as injectRawCSS, Dn as isSelector, Dt as ResolveTokenProps, E as injectGlobal, En as hasStylesGenerated, Et as ResolveModProps, F as chunkSheetRegistry, Ft as TastyProps, G as ChunkName, Gt as BlockOuterStyleProps, H as categorizeStyleKeys, Ht as BasePropsWithoutChildren, I as ComputeStylesOptions, It as TokenPropsInput, J as FONT_CHUNK_STYLES, Jt as ContainerStyleProps, K as DIMENSION_CHUNK_STYLES, Kt as BlockStyleProps, L as ComputeStylesResult, Lt as VariantMap, M as property, Mn as strToRgb, Mt as TastyElementProps, N as touch, Nt as TastyExtensionProps, O as injector, On as getNamedColorHex, Ot as SubElementDefinition, P as ChunkSheetRegistry, Pt as TastyPolymorphicComponent, Q as resolveFunctionColor, Qt as InnerStyleProps, R as computeStyles, Rt as WithVariant, S as getCSSTextForNode, Sn as POSITION_STYLES, St as ModPropDef, T as inject, Tn as DEFAULT_ZERO_NAME_PREFIX, Tt as ResolveModPropDef, U as APPEARANCE_CHUNK_STYLES, Ut as BaseStyleProps, V as ChunkInfo, Vt as BaseProps, W as CHUNK_NAMES, Wt as BlockInnerStyleProps, X as POSITION_CHUNK_STYLES, Xt as ExtraBaseStyleProps, Y as LAYOUT_CHUNK_STYLES, Yt as DimensionStyleProps, Z as STYLE_TO_CHUNK, Zt as FlowStyleProps, _ as destroy, _n as CONTAINER_STYLES, _t as useStyles, a as DebugOptions, an as TastyBaseStylePropNames, at as TastyBatchProvider, b as gc, bn as INNER_STYLES, bt as Element, c as tastyDebug, cn as TastyThemeNames, ct as useFunction, d as modAttrs, dn as Tokens, dt as UsePropertyOptions, en as Mods, et as okhstFunction, f as color, fn as BASE_STYLES, ft as useProperty, g as createInjector, gn as COLOR_STYLES, gt as UseStylesResult, h as counterStyle, hn as BLOCK_STYLES, ht as useGlobalStyles, i as DebugChunkInfo, in as TagName, it as getDisplayName, j as ownKeyframes, jn as hslToRgbValues, jt as TastyElementOptions, k as isPropertyDefined, kn as getRgbValuesFromRgbaString, kt as SubElementProps, l as processTokens, ln as TextStyleProps, lt as useCounterStyle, m as cleanup, mn as BLOCK_OUTER_STYLES, mt as useRawCSS, n as CacheStatus, nn as PositionStyleProps, nt as okhslFunction, o as InspectResult, on as TastyCustomProps, ot as TastyBatchProviderProps, p as filterBaseProps, pn as BLOCK_INNER_STYLES, pt as useKeyframes, q as DISPLAY_CHUNK_STYLES, qt as ColorStyleProps, r as ChunkBreakdown, rn as ShortGridStyles, rt as okhslPlugin, s as Summary, sn as TastyExtensionConfig, st as UseFunctionOptions, t as CSSOptions, tn as OuterStyleProps, tt as okhstPlugin, u as resolveRecipes, un as TokenValue, ut as useFontFace, v as fontFace, vn as DIMENSION_STYLES, vt as AllBasePropsWithMods, w as holdKeyframes, wn as DEFAULT_NAME_PREFIX, wt as ResolveAsProps, x as getCSSText, xn as OUTER_STYLES, xt as ElementsDefinition, y as func, yn as FLOW_STYLES, yt as ComponentStatics, z as defineHandler, zt as tasty } from "./index-DxQNRj50.js";
3
+ import { C as PropHandlerProps, D as getGlobalKeyframes, E as getGlobalFunctions, S as PropHandlerDefinition, T as getGlobalFontFaces, _ as FunctionsConfig, a as getNamePrefix, b as SheetManager, c as isConfigLocked, d as TastyPlugin, f as TastyPluginFactory, g as ColorSpace, h as generateTypographyTokens, i as getGlobalRecipes, l as isTestEnvironment, m as TypographyTokenValue, n as configure, o as hasGlobalKeyframes, p as TypographyPreset, r as getConfig, s as hasGlobalRecipes, t as TastyConfig, u as resetConfig, v as ParseFunction, w as getGlobalCounterStyles, x as PropHandler, y as StyleInjector } from "./config-C4ftFxgI.js";
4
+ import { t as mergeStyles } from "./merge-styles-D39qBtox.js";
5
5
  export { APPEARANCE_CHUNK_STYLES, type AllBaseProps, type AllBasePropsWithMods, type AnyStyleHandler, type AtRuleContext, BASE_STYLES, BLOCK_INNER_STYLES, BLOCK_OUTER_STYLES, BLOCK_STYLES, type BaseProps, type BasePropsWithoutChildren, type BaseStyleProps, type BlockInnerStyleProps, type BlockOuterStyleProps, type BlockStyleProps, CHUNK_NAMES, COLOR_STYLES, CONTAINER_STYLES, type CSSMap, CSSOptions, type CSSProperties, CUSTOM_UNITS, type CacheMetrics, CacheStatus, ChunkBreakdown, type ChunkInfo, type ChunkName, ChunkSheetRegistry, type ColorSpace, type ColorStyleProps, type ComponentStatics, 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, DebugChunkInfo, DebugOptions, type DimensionStyleProps, type DisposeFunction, Element, type ElementsDefinition, type ExtraBaseStyleProps, FLOW_STYLES, FONT_CHUNK_STYLES, type FlowStyleProps, type FontFaceDescriptors, type FontFaceInput, type FunctionDefinition, type FunctionParameter, type FunctionsConfig, type GCConfig, type GCOptions, INNER_STYLES, type InjectOptions, type InjectResult, type InjectionMode, type InnerStyleProps, InspectResult, 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 ParseFunction, type ParseStateKeyOptions, type ParsedAdvancedState, type ParsedColor, type ParserOptions, type PositionStyleProps, type ProcessedStyle, type PropHandler, type PropHandlerDefinition, type PropHandlerProps, type PropertyDefinition, type PropertyOptions, type QueuedWrite, type RawCSSResult, type RawStyleHandler, type RecipeStyles, type RenderResult, type ResolveAsProps, type ResolveModPropDef, type ResolveModProps, type ResolveTokenProps, type ResolvedStyleValue, type RootRegistry, type RuleInfo, STYLE_TO_CHUNK, type Selector, type SheetInfo, SheetManager, type ShortGridStyles, type StateParserContext, type StyleDetails, type StyleDetailsPart, type StyleHandler, type StyleHandlerDefinition, type StyleHandlerProps, type StyleHandlerResult, StyleInjector, type StyleInjectorConfig, type StyleMap, StyleParser, type StylePropValue, type StyleResult, type StyleRule, type StyleUsage, type StyleValue, type StyleValueStateMap, type Styles, type StylesInterface, type StylesWithoutSelectors, type SubElementDefinition, type SubElementProps, type SuffixForSelector, Summary, TEXT_STYLES, type TagName, type TastyBaseStylePropNames, TastyBatchProvider, type TastyBatchProviderProps, type TastyComponentPropsWithDefaults, type TastyConfig, type TastyCustomProps, type TastyElementOptions, type TastyElementProps, type TastyExtensionConfig, type TastyExtensionProps, 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 UseFunctionOptions, type UsePropertyOptions, type UseStylesResult, type VariantMap, type WithVariant, categorizeStyleKeys, chunkSheetRegistry, cleanup, color, computeStyles, configure, counterStyle, createColorFunc, createInjector, createStateParserContext, defineHandler, destroy, filterBaseProps, filterMods, flushStyles, fontFace, func, gc, generateTypographyTokens, getCSSText, getCSSTextForNode, getConfig, getDisplayName, getGlobalCounterStyles, getGlobalFontFaces, getGlobalFunctions, getGlobalKeyframes, getGlobalParser, getGlobalPredefinedStates, getGlobalPredefinedTokens, getGlobalRecipes, getNamePrefix, getNamedColorHex, getRawCSSText, getRgbValuesFromRgbaString, hasGlobalKeyframes, hasGlobalRecipes, hasPendingStyleWrites, hasStylesGenerated, hexToRgb, holdKeyframes, hslToRgbValues, inject, injectGlobal, injectRawCSS, injector, isConfigLocked, isPropertyDefined, isSelector, isTestEnvironment, keyframes, mergeStyles, modAttrs, normalizeColorTokenValue, okhslFunction, okhslPlugin, okhstFunction, okhstPlugin, ownKeyframes, parseColor, parseStateKey, parseStyle, processTokens, property, renderStyles, resetConfig, resetStyleBatch, resolveFunctionColor, resolveRecipes, setGlobalPredefinedStates, strToRgb, stringifyStyles, styleHandlers, tasty, tastyDebug, touch, useCounterStyle, useFontFace, useFunction, useGlobalStyles, useKeyframes, useProperty, useRawCSS, useStyles };
package/dist/index.js CHANGED
@@ -1,11 +1,11 @@
1
- import { A as hslToRgbValues, C as StyleParser, D as getNamedColorHex, M as strToRgb, O as getRgbValuesFromRgbaString, S as createColorFunc, _ as stringifyStyles, b as okhslFunction, c as getGlobalParser, d as parseColor, f as parseStyle, i as DIRECTIONS, k as hexToRgb, l as getGlobalPredefinedTokens, n as resolveFunctionColor, o as filterMods, r as CUSTOM_UNITS, t as color, u as normalizeColorTokenValue, v as okhstFunction, x as okhslPlugin, y as okhstPlugin } from "./chunks/dsl-dFfTOacf.js";
1
+ import { A as getRgbValuesFromRgbaString, C as createColorFunc, M as hslToRgbValues, P as strToRgb, S as okhslPlugin, b as okhstPlugin, c as getGlobalParser, d as normalizeColorTokenValue, f as parseColor, i as DIRECTIONS, j as hexToRgb, k as getNamedColorHex, l as getGlobalPredefinedTokens, n as resolveFunctionColor, o as filterMods, p as parseStyle, r as CUSTOM_UNITS, t as color, v as stringifyStyles, w as StyleParser, x as okhslFunction, y as okhstFunction } from "./chunks/dsl-CsFl9LGn.js";
2
2
  import { n as isSelector, t as mergeStyles } from "./chunks/shared-utils-y-HjvPN4.js";
3
- import { E as DEFAULT_ZERO_NAME_PREFIX, T as DEFAULT_NAME_PREFIX } from "./chunks/css-definitions-38rLam_O.js";
4
- import { A as styleHandlers, B as STYLE_TO_CHUNK, E as defineHandler, F as DIMENSION_CHUNK_STYLES, G as setGlobalPredefinedStates, I as DISPLAY_CHUNK_STYLES, K as hasStylesGenerated, L as FONT_CHUNK_STYLES, N as APPEARANCE_CHUNK_STYLES, P as CHUNK_NAMES, R as LAYOUT_CHUNK_STYLES, S as parseStateKey, U as createStateParserContext, W as getGlobalPredefinedStates, _ as POSITION_STYLES, b as renderStyles, c as BLOCK_INNER_STYLES, d as COLOR_STYLES, f as CONTAINER_STYLES, g as OUTER_STYLES, h as INNER_STYLES, l as BLOCK_OUTER_STYLES, m as FLOW_STYLES, p as DIMENSION_STYLES, r as categorizeStyleKeys, s as BASE_STYLES, u as BLOCK_STYLES, v as TEXT_STYLES, z as POSITION_CHUNK_STYLES } from "./chunks/style-engine-BB3Ruaa4.js";
5
- import { i as generateTypographyTokens } from "./chunks/config-engine-BlZE_Nop.js";
6
- import { c as getGlobalFontFaces, l as getGlobalFunctions, s as getGlobalCounterStyles, u as getGlobalKeyframes } from "./chunks/runtime-state-B8fkpfgp.js";
7
- import { A as injector, C as getCSSText, D as inject, E as holdKeyframes, F as touch, G as isConfigLocked, H as getNamePrefix, I as ChunkSheetRegistry, J as StyleInjector, K as isTestEnvironment, L as chunkSheetRegistry, M as keyframes, N as ownKeyframes, O as injectGlobal, P as property, Q as hasPendingStyleWrites, R as configure, S as gc, T as getRawCSSText, U as hasGlobalKeyframes, V as getGlobalRecipes, W as hasGlobalRecipes, Y as SheetManager, Z as flushStyles, _ as counterStyle, a as filterBaseProps, b as fontFace, et as resetStyleBatch, g as cleanup, i as modAttrs, j as isPropertyDefined, k as injectRawCSS, o as computeStyles, q as resetConfig, r as processTokens, s as resolveRecipes, v as createInjector, w as getCSSTextForNode, x as func, y as destroy, z as getConfig } from "./chunks/runtime-engine-DZYyyrhB.js";
8
- import { t as tastyDebug } from "./chunks/debug-B4d71eRy.js";
3
+ import { E as DEFAULT_ZERO_NAME_PREFIX, T as DEFAULT_NAME_PREFIX } from "./chunks/css-definitions-B4aWBkH3.js";
4
+ import { A as styleHandlers, B as STYLE_TO_CHUNK, E as defineHandler, F as DIMENSION_CHUNK_STYLES, G as setGlobalPredefinedStates, I as DISPLAY_CHUNK_STYLES, K as hasStylesGenerated, L as FONT_CHUNK_STYLES, N as APPEARANCE_CHUNK_STYLES, P as CHUNK_NAMES, R as LAYOUT_CHUNK_STYLES, S as parseStateKey, U as createStateParserContext, W as getGlobalPredefinedStates, _ as POSITION_STYLES, b as renderStyles, c as BLOCK_INNER_STYLES, d as COLOR_STYLES, f as CONTAINER_STYLES, g as OUTER_STYLES, h as INNER_STYLES, l as BLOCK_OUTER_STYLES, m as FLOW_STYLES, p as DIMENSION_STYLES, r as categorizeStyleKeys, s as BASE_STYLES, u as BLOCK_STYLES, v as TEXT_STYLES, z as POSITION_CHUNK_STYLES } from "./chunks/style-engine-DnkV_4Jg.js";
5
+ import { i as generateTypographyTokens } from "./chunks/config-engine-CMYFZYQh.js";
6
+ import { c as getGlobalFontFaces, l as getGlobalFunctions, s as getGlobalCounterStyles, u as getGlobalKeyframes } from "./chunks/runtime-state-lZjMbvwV.js";
7
+ import { A as injector, C as getCSSText, D as inject, E as holdKeyframes, F as touch, G as isConfigLocked, H as getNamePrefix, I as ChunkSheetRegistry, J as StyleInjector, K as isTestEnvironment, L as chunkSheetRegistry, M as keyframes, N as ownKeyframes, O as injectGlobal, P as property, Q as hasPendingStyleWrites, R as configure, S as gc, T as getRawCSSText, U as hasGlobalKeyframes, V as getGlobalRecipes, W as hasGlobalRecipes, Y as SheetManager, Z as flushStyles, _ as counterStyle, a as filterBaseProps, b as fontFace, et as resetStyleBatch, g as cleanup, i as modAttrs, j as isPropertyDefined, k as injectRawCSS, o as computeStyles, q as resetConfig, r as processTokens, s as resolveRecipes, v as createInjector, w as getCSSTextForNode, x as func, y as destroy, z as getConfig } from "./chunks/runtime-engine-NGCofNXy.js";
8
+ import { t as tastyDebug } from "./chunks/debug-D2Pu7Xhy.js";
9
9
  import "./core/index.js";
10
- import { a as useProperty, c as useGlobalStyles, d as Element, f as tasty, i as useFontFace, l as useStyles, n as useFunction, o as useKeyframes, p as getDisplayName, r as useCounterStyle, s as useRawCSS, t as TastyBatchProvider } from "./chunks/react-runtime-CZeqWqBJ.js";
10
+ import { a as useProperty, c as useGlobalStyles, d as Element, f as tasty, i as useFontFace, l as useStyles, n as useFunction, o as useKeyframes, p as getDisplayName, r as useCounterStyle, s as useRawCSS, t as TastyBatchProvider } from "./chunks/react-runtime-DHiopXCu.js";
11
11
  export { APPEARANCE_CHUNK_STYLES, BASE_STYLES, BLOCK_INNER_STYLES, BLOCK_OUTER_STYLES, BLOCK_STYLES, CHUNK_NAMES, COLOR_STYLES, CONTAINER_STYLES, CUSTOM_UNITS, ChunkSheetRegistry, DEFAULT_NAME_PREFIX, DEFAULT_ZERO_NAME_PREFIX, DIMENSION_CHUNK_STYLES, DIMENSION_STYLES, DIRECTIONS, DISPLAY_CHUNK_STYLES, Element, FLOW_STYLES, FONT_CHUNK_STYLES, INNER_STYLES, LAYOUT_CHUNK_STYLES, OUTER_STYLES, POSITION_CHUNK_STYLES, POSITION_STYLES, STYLE_TO_CHUNK, SheetManager, StyleInjector, StyleParser, TEXT_STYLES, TastyBatchProvider, categorizeStyleKeys, chunkSheetRegistry, cleanup, color, computeStyles, configure, counterStyle, createColorFunc, createInjector, createStateParserContext, defineHandler, destroy, filterBaseProps, filterMods, flushStyles, fontFace, func, gc, generateTypographyTokens, getCSSText, getCSSTextForNode, getConfig, getDisplayName, getGlobalCounterStyles, getGlobalFontFaces, getGlobalFunctions, getGlobalKeyframes, getGlobalParser, getGlobalPredefinedStates, getGlobalPredefinedTokens, getGlobalRecipes, getNamePrefix, getNamedColorHex, getRawCSSText, getRgbValuesFromRgbaString, hasGlobalKeyframes, hasGlobalRecipes, hasPendingStyleWrites, hasStylesGenerated, hexToRgb, holdKeyframes, hslToRgbValues, inject, injectGlobal, injectRawCSS, injector, isConfigLocked, isPropertyDefined, isSelector, isTestEnvironment, keyframes, mergeStyles, modAttrs, normalizeColorTokenValue, okhslFunction, okhslPlugin, okhstFunction, okhstPlugin, ownKeyframes, parseColor, parseStateKey, parseStyle, processTokens, property, renderStyles, resetConfig, resetStyleBatch, resolveFunctionColor, resolveRecipes, setGlobalPredefinedStates, strToRgb, stringifyStyles, styleHandlers, tasty, tastyDebug, touch, useCounterStyle, useFontFace, useFunction, useGlobalStyles, useKeyframes, useProperty, useRawCSS, useStyles };
@@ -1,6 +1,6 @@
1
- import { Y as Styles } from "./types-DsK6JM1J.js";
1
+ import { Y as Styles } from "./types-CYQIhUg1.js";
2
2
  //#region src/utils/merge-styles.d.ts
3
3
  declare function mergeStyles(...objects: (Styles | undefined | null)[]): Styles;
4
4
  //#endregion
5
5
  export { mergeStyles as t };
6
- //# sourceMappingURL=merge-styles-CLE6OMiV.d.ts.map
6
+ //# sourceMappingURL=merge-styles-D39qBtox.d.ts.map
package/dist/ssr/astro.js CHANGED
@@ -1,5 +1,5 @@
1
- import { f as getRuntimeConfigState, r as registerSSRCollectorGetterGlobal } from "../chunks/runtime-state-B8fkpfgp.js";
2
- import { t as ServerStyleCollector } from "../chunks/collector-B4cuf4Ne.js";
1
+ import { f as getRuntimeConfigState, r as registerSSRCollectorGetterGlobal } from "../chunks/runtime-state-lZjMbvwV.js";
2
+ import { t as ServerStyleCollector } from "../chunks/collector-Cb8ah2JF.js";
3
3
  import { r as runWithCollector, t as getSSRCollector } from "../chunks/async-storage-f9j9JRtq.js";
4
4
  import { t as findUnsafeCSSResource } from "../chunks/css-resources-P7IBUUZs.js";
5
5
  import { join } from "node:path";
@@ -1,4 +1,4 @@
1
- import { i as ServerStyleArtifactKind, n as createServerStyleCollector, r as ServerStyleArtifact, t as ServerStyleCollector } from "../collector-sOn_LJks.js";
1
+ import { i as ServerStyleArtifactKind, n as createServerStyleCollector, r as ServerStyleArtifact, t as ServerStyleCollector } from "../collector-D2OT6I2G.js";
2
2
  import { t as hydrateTastyClasses } from "../hydrate-CRyjjAyl.js";
3
3
  //#region src/ssr/async-storage.d.ts
4
4
  /**
package/dist/ssr/index.js CHANGED
@@ -1,5 +1,5 @@
1
- import { r as registerSSRCollectorGetterGlobal } from "../chunks/runtime-state-B8fkpfgp.js";
2
- import { n as createServerStyleCollector, t as ServerStyleCollector } from "../chunks/collector-B4cuf4Ne.js";
1
+ import { r as registerSSRCollectorGetterGlobal } from "../chunks/runtime-state-lZjMbvwV.js";
2
+ import { n as createServerStyleCollector, t as ServerStyleCollector } from "../chunks/collector-Cb8ah2JF.js";
3
3
  import { n as isAsyncStorageAvailable, r as runWithCollector, t as getSSRCollector } from "../chunks/async-storage-f9j9JRtq.js";
4
4
  import { t as hydrateTastyClasses } from "../chunks/hydration-TRcz5vnk.js";
5
5
  //#region src/ssr/index.ts
@@ -1,4 +1,4 @@
1
- import { t as TastyConfig } from "../config-bnwIG-_F.js";
1
+ import { t as TastyConfig } from "../config-C4ftFxgI.js";
2
2
  //#region src/ssr/next-config.d.ts
3
3
  interface NextConfig {
4
4
  basePath?: string;
@@ -1,6 +1,6 @@
1
- import { K as parseFunctionName, P as DEFAULT_PROPERTIES, S as formatFontFaceRule, W as formatFunctionRule, _ as formatCounterStyleRule, b as fontFaceContentHash, i as formatKeyframesCSS, m as resolveSelectorKeyframes, n as formatGlobalRules, o as formatPropertyCSS, t as createServerStyleArtifact } from "../chunks/css-definitions-38rLam_O.js";
2
- import { b as renderStyles } from "../chunks/style-engine-BB3Ruaa4.js";
3
- import { a as resetZeroConfig, n as functionsForExtraction, t as configureZero } from "../chunks/build-config-mdijGIGa.js";
1
+ import { K as parseFunctionName, P as DEFAULT_PROPERTIES, S as formatFontFaceRule, W as formatFunctionRule, _ as formatCounterStyleRule, b as fontFaceContentHash, i as formatKeyframesCSS, m as resolveSelectorKeyframes, n as formatGlobalRules, o as formatPropertyCSS, t as createServerStyleArtifact } from "../chunks/css-definitions-B4aWBkH3.js";
2
+ import { b as renderStyles } from "../chunks/style-engine-DnkV_4Jg.js";
3
+ import { a as resetZeroConfig, n as functionsForExtraction, t as configureZero } from "../chunks/build-config-D9Iq8QQm.js";
4
4
  import { t as loadConfigFile } from "../chunks/config-file-DlZXJMj8.js";
5
5
  import { t as findUnsafeCSSResource } from "../chunks/css-resources-P7IBUUZs.js";
6
6
  import { isAbsolute, join, relative, resolve, sep } from "node:path";
@@ -1,4 +1,4 @@
1
- import { t as ServerStyleCollector } from "../collector-sOn_LJks.js";
1
+ import { t as ServerStyleCollector } from "../collector-D2OT6I2G.js";
2
2
  import { ReactNode } from "react";
3
3
  //#region src/ssr/next.d.ts
4
4
  export interface TastyRegistryProps {
package/dist/ssr/next.js CHANGED
@@ -1,7 +1,7 @@
1
1
  "use client";
2
- import { f as getRuntimeConfigState, n as registerSSRCollectorGetter } from "../chunks/runtime-state-B8fkpfgp.js";
3
- import { u as getTastySSRContext } from "../chunks/react-runtime-CZeqWqBJ.js";
4
- import { t as ServerStyleCollector } from "../chunks/collector-B4cuf4Ne.js";
2
+ import { f as getRuntimeConfigState, n as registerSSRCollectorGetter } from "../chunks/runtime-state-lZjMbvwV.js";
3
+ import { u as getTastySSRContext } from "../chunks/react-runtime-DHiopXCu.js";
4
+ import { t as ServerStyleCollector } from "../chunks/collector-Cb8ah2JF.js";
5
5
  import { t as hydrateTastyClasses } from "../chunks/hydration-TRcz5vnk.js";
6
6
  import { Fragment, createElement, useState } from "react";
7
7
  import { useServerInsertedHTML } from "next/navigation";
@@ -1,5 +1,5 @@
1
- import { Y as Styles } from "../types-DsK6JM1J.js";
2
- import { t as mergeStyles } from "../merge-styles-CLE6OMiV.js";
1
+ import { Y as Styles } from "../types-CYQIhUg1.js";
2
+ import { t as mergeStyles } from "../merge-styles-D39qBtox.js";
3
3
  //#region src/static/types.d.ts
4
4
  /**
5
5
  * Static style definition returned by tastyStatic().
@@ -235,7 +235,7 @@ interface StylesInterface extends Omit<CSSProperties, 'color' | 'fill' | 'font'
235
235
  /**
236
236
  * Set the background color of the element. Shortcut for `background-color` with enhanced support for Tasty color tokens and syntaxes.
237
237
  *
238
- * Supports double-color syntax: the second color is applied as a foreground overlay via a CSS custom property.
238
+ * To paint one color over another, use a compound color: `#surface+#dark.04` is `#dark` at 4% opacity over `#surface`, as one background color.
239
239
  *
240
240
  * Examples:
241
241
  * - `fill="#purple.10"` // purple background with 10% opacity
@@ -245,7 +245,8 @@ interface StylesInterface extends Omit<CSSProperties, 'color' | 'fill' | 'font'
245
245
  * - `fill="hsl(200 100% 50%)"` // HSL color
246
246
  * - `fill="okhsl(200 100% 50%)"` // perceptually uniform OKHSL color
247
247
  * - `fill="oklch(0.7 0.15 200)"` // OKLCH color
248
- * - `fill="#dark 4%, #surface"` // two colors mixed: `#dark` at 4% over `#surface`
248
+ * - `fill="#surface+#dark.04"` // `#dark` at 4% opacity over `#surface`, as one color
249
+ * - `fill="#dark 4%, #surface"` // deprecated: two colors mixed with a comma, the same color as `#surface+#dark.04`
249
250
  * - `fill="#surface #dark.04"` // deprecated: the second color as an overlay layer
250
251
  *
251
252
  * `fill={false}` sets no fill. `fill={true}` names no color and is ignored.
@@ -1565,4 +1566,4 @@ interface RawCSSResult {
1565
1566
  }
1566
1567
  //#endregion
1567
1568
  export { TastyNamedColors as $, resetStyleBatch as A, getGlobalPredefinedStates as B, SheetInfo as C, StyleParser as Ct, QueuedWrite as D, StyleDetailsPart as Dt, StyleUsage as E, StyleDetails as Et, parseStateKey as F, NoType as G, ConditionNode as H, AtRuleContext as I, Selector as J, NotSelector as K, ParsedAdvancedState as L, StyleResult as M, renderStyles as N, flushStyles as O, UnitHandler as Ot, ParseStateKeyOptions as P, SuffixForSelector as Q, StateParserContext as R, RuleInfo as S, stringifyStyles as St, StyleRule as T, ProcessedStyle as Tt, ConfigTokenValue as U, setGlobalPredefinedStates as V, ConfigTokens as W, StylesInterface as X, Styles as Y, StylesWithoutSelectors as Z, KeyframesSteps as _, getGlobalParser as _t, FontFaceInput as a, ParsedColor as at, RawCSSResult as b, parseColor as bt, GCConfig as c, StyleHandler as ct, InjectOptions as d, StyleHandlerResult as dt, TastyPresetNames as et, InjectResult as f, StyleMap as ft, KeyframesResult as g, filterMods as gt, KeyframesInfo as h, StyleValueStateMap as ht, FontFaceDescriptors as i, DIRECTIONS as it, RenderResult as j, hasPendingStyleWrites as k, CSSProperties as kt, GCOptions as l, StyleHandlerDefinition as lt, KeyframesCacheEntry as m, StyleValue as mt, CounterStyleDescriptors as n, CSSMap as nt, FunctionDefinition as o, RawStyleHandler as ot, InjectionMode as p, StylePropValue as pt, RecipeStyles as q, DisposeFunction as r, CUSTOM_UNITS as rt, FunctionParameter as s, ResolvedStyleValue as st, CacheMetrics as t, AnyStyleHandler as tt, GlobalInjectResult as u, StyleHandlerProps as ut, PropertyDefinition as v, getGlobalPredefinedTokens as vt, StyleInjectorConfig as w, ParserOptions as wt, RootRegistry as x, parseStyle as xt, PropertyOptions as y, normalizeColorTokenValue as yt, createStateParserContext as z };
1568
- //# sourceMappingURL=types-DsK6JM1J.d.ts.map
1569
+ //# sourceMappingURL=types-CYQIhUg1.d.ts.map
@@ -1,4 +1,4 @@
1
- import { t as TastyZeroConfig } from "../babel-types-Cq4OMhXa.js";
1
+ import { t as TastyZeroConfig } from "../babel-types-Dc5zghyE.js";
2
2
  //#region src/zero/babel.d.ts
3
3
  /**
4
4
  * Options for the `@tenphi/tasty/babel-plugin` Babel plugin.
@@ -1,8 +1,8 @@
1
1
  import { t as mergeStyles } from "../chunks/shared-utils-y-HjvPN4.js";
2
- import "../chunks/css-definitions-38rLam_O.js";
3
- import { t as resolveRecipesWith } from "../chunks/config-engine-BlZE_Nop.js";
4
- import { a as resetZeroConfig, i as reapplyZeroConfig, n as functionsForExtraction, t as configureZero } from "../chunks/build-config-mdijGIGa.js";
5
- import { a as extractCounterStyleFromStyles, c as extractKeyframesFromStyles, h as setExtractorNamePrefix, i as extractConfigProperties, l as extractPropertiesFromStyles, m as replaceAnimationNamesInCSS, o as extractFontFaceFromStyles, p as renderSelectorCSS, r as extractChunks, s as extractFunctionsFromStyles, t as CSSWriter, u as extractSelectorCSS } from "../chunks/zero-engine-BLELcyfS.js";
2
+ import "../chunks/css-definitions-B4aWBkH3.js";
3
+ import { t as resolveRecipesWith } from "../chunks/config-engine-CMYFZYQh.js";
4
+ import { a as resetZeroConfig, i as reapplyZeroConfig, n as functionsForExtraction, t as configureZero } from "../chunks/build-config-D9Iq8QQm.js";
5
+ import { a as extractCounterStyleFromStyles, c as extractKeyframesFromStyles, h as setExtractorNamePrefix, i as extractConfigProperties, l as extractPropertiesFromStyles, m as replaceAnimationNamesInCSS, o as extractFontFaceFromStyles, p as renderSelectorCSS, r as extractChunks, s as extractFunctionsFromStyles, t as CSSWriter, u as extractSelectorCSS } from "../chunks/zero-engine-DcwaCvFs.js";
6
6
  import { t as loadConfigFile } from "../chunks/config-file-DlZXJMj8.js";
7
7
  import * as fs from "fs";
8
8
  import * as path from "path";
@@ -1,6 +1,6 @@
1
- import { Y as Styles, v as PropertyDefinition } from "../types-DsK6JM1J.js";
2
- import { t as mergeStyles } from "../merge-styles-CLE6OMiV.js";
3
- import { t as TastyZeroConfig } from "../babel-types-Cq4OMhXa.js";
1
+ import { Y as Styles, v as PropertyDefinition } from "../types-CYQIhUg1.js";
2
+ import { t as mergeStyles } from "../merge-styles-D39qBtox.js";
3
+ import { t as TastyZeroConfig } from "../babel-types-Dc5zghyE.js";
4
4
  //#region src/zero/configure.d.ts
5
5
  /**
6
6
  * Configure `extractStylesForSelector()` and `extractStylesWithChunks()`.
@@ -1,7 +1,7 @@
1
1
  import { t as mergeStyles } from "../chunks/shared-utils-y-HjvPN4.js";
2
- import { M as validateNamePrefix } from "../chunks/css-definitions-38rLam_O.js";
3
- import { a as resetZeroConfig, o as setActiveZeroConfig, t as configureZero } from "../chunks/build-config-mdijGIGa.js";
4
- import { d as extractStylesForSelector, f as extractStylesWithChunks, h as setExtractorNamePrefix, i as extractConfigProperties, n as createCSSWriter, t as CSSWriter } from "../chunks/zero-engine-BLELcyfS.js";
2
+ import { M as validateNamePrefix } from "../chunks/css-definitions-B4aWBkH3.js";
3
+ import { a as resetZeroConfig, o as setActiveZeroConfig, t as configureZero } from "../chunks/build-config-D9Iq8QQm.js";
4
+ import { d as extractStylesForSelector, f as extractStylesWithChunks, h as setExtractorNamePrefix, i as extractConfigProperties, n as createCSSWriter, t as CSSWriter } from "../chunks/zero-engine-DcwaCvFs.js";
5
5
  //#region src/zero/configure.ts
6
6
  function configure(config = {}) {
7
7
  const namePrefix = config.namePrefix ?? "ts";
@@ -1,4 +1,4 @@
1
- import { t as TastyZeroConfig } from "../babel-types-Cq4OMhXa.js";
1
+ import { t as TastyZeroConfig } from "../babel-types-Dc5zghyE.js";
2
2
  import "./babel.js";
3
3
  //#region src/zero/next.d.ts
4
4
  interface WebpackConfigContext {