@tenphi/eslint-plugin-tasty 1.13.1 → 1.14.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.
- package/README.md +1 -0
- package/dist/config.js +32 -1
- package/dist/config.js.map +1 -1
- package/dist/configs.js +1 -0
- package/dist/configs.js.map +1 -1
- package/dist/constants.js +5 -8
- package/dist/constants.js.map +1 -1
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -1
- package/dist/parsers/value-parser.js +2 -1
- package/dist/parsers/value-parser.js.map +1 -1
- package/dist/rules/prefer-fill-mix.js +163 -0
- package/dist/rules/prefer-fill-mix.js.map +1 -0
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -268,6 +268,7 @@ not matched.
|
|
|
268
268
|
| `tasty/prefer-state-negation` | warn | Top-level `:not(...)` in state keys instead of the `!` prefix (autofixable; nested CSS selectors stay intact) |
|
|
269
269
|
| `tasty/prefer-custom-property-syntax` | warn | `var(--prop)` / `$x-color` / `transparent` / `currentColor` instead of `$prop` / `#color` / `#clear` / `#current` |
|
|
270
270
|
| `tasty/prefer-hide` | warn | `display: 'none'` instead of `hide: true` |
|
|
271
|
+
| `tasty/prefer-fill-mix` | warn | Deprecated two-color `fill` (`'#surface #dark.04'`) instead of a comma mix (`'#dark 4%, #surface'`), autofixed when the overlay's opacity is written on it; mix parts weighted by their opacity (`'#dark.04, #surface'`). Needs `@tenphi/tasty` 3.15 ([details](docs/rules/prefer-fill-mix.md)) |
|
|
271
272
|
| `tasty/prefer-directional-shorthand` | warn | 4-value `margin`/`padding`/`inset`/`radius`/`fade`/`border` with placeholder positions instead of directional form |
|
|
272
273
|
| `tasty/prefer-longhand-property` | error | Lossy `flex` shorthand instead of `flexGrow` / `flexShrink` / `flexBasis` |
|
|
273
274
|
|
package/dist/config.js
CHANGED
|
@@ -377,6 +377,37 @@ function mtimesMatch(cached, current) {
|
|
|
377
377
|
for (const [path, mtime] of cached) if (current.get(path) !== mtime) return false;
|
|
378
378
|
return true;
|
|
379
379
|
}
|
|
380
|
+
const tastyVersionCache = /* @__PURE__ */ new Map();
|
|
381
|
+
/**
|
|
382
|
+
* The version of `@tenphi/tasty` installed for the project `filePath` belongs
|
|
383
|
+
* to, or `null` when it cannot be found. Rules whose fixes need a newer Tasty
|
|
384
|
+
* check it, so `--fix` never writes syntax the installed Tasty cannot render.
|
|
385
|
+
*/
|
|
386
|
+
function getInstalledTastyVersion(filePath) {
|
|
387
|
+
const projectRoot = findProjectRoot(dirname(resolve(filePath)));
|
|
388
|
+
if (!projectRoot) return null;
|
|
389
|
+
const pkgDir = resolvePackageDir(TASTY_PACKAGE_NAME, projectRoot);
|
|
390
|
+
if (!pkgDir) return null;
|
|
391
|
+
const pkgJson = join(pkgDir, "package.json");
|
|
392
|
+
let mtime;
|
|
393
|
+
try {
|
|
394
|
+
mtime = statSync(pkgJson).mtimeMs;
|
|
395
|
+
} catch {
|
|
396
|
+
return null;
|
|
397
|
+
}
|
|
398
|
+
const cached = tastyVersionCache.get(pkgJson);
|
|
399
|
+
if (cached?.mtime === mtime) return cached.version;
|
|
400
|
+
let version = null;
|
|
401
|
+
try {
|
|
402
|
+
const parsed = JSON.parse(readFileSync(pkgJson, "utf-8"));
|
|
403
|
+
if (typeof parsed.version === "string") version = parsed.version;
|
|
404
|
+
} catch {}
|
|
405
|
+
tastyVersionCache.set(pkgJson, {
|
|
406
|
+
mtime,
|
|
407
|
+
version
|
|
408
|
+
});
|
|
409
|
+
return version;
|
|
410
|
+
}
|
|
380
411
|
function loadConfig(filePath) {
|
|
381
412
|
const fileDir = dirname(resolve(filePath));
|
|
382
413
|
const projectRoot = findProjectRoot(fileDir);
|
|
@@ -409,5 +440,5 @@ function loadConfig(filePath) {
|
|
|
409
440
|
}
|
|
410
441
|
|
|
411
442
|
//#endregion
|
|
412
|
-
export { loadConfig };
|
|
443
|
+
export { getInstalledTastyVersion, loadConfig };
|
|
413
444
|
//# sourceMappingURL=config.js.map
|
package/dist/config.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.js","names":["pluginVersion"],"sources":["../src/config.ts"],"sourcesContent":["import { existsSync, readFileSync, statSync } from 'fs';\nimport { dirname, join, resolve } from 'path';\n\nimport { createJiti } from 'jiti';\nimport semver from 'semver';\n\nimport type { ResolvedConfig, TastyValidationConfig } from './types.js';\nimport { DEFAULT_IMPORT_SOURCES } from './constants.js';\nimport { version as pluginVersion } from './version.js';\n\nconst CONFIG_FILENAMES = [\n 'tasty.config.ts',\n 'tasty.config.js',\n 'tasty.config.mjs',\n 'tasty.config.json',\n];\n\ninterface CachedConfig {\n /** The resolved config, or the error that loading it failed with. */\n result: ResolvedConfig | Error;\n fileMtimes: Map<string, number>;\n}\n\nconst configCache = new Map<string, CachedConfig>();\n\n/**\n * Every key a config may carry; anything else is a typo or from a newer plugin.\n * Typed against the config interface so a new key cannot be missed here.\n */\nconst KNOWN_KEYS = new Set(\n Object.keys({\n extends: true,\n requires: true,\n tokens: true,\n units: true,\n functions: true,\n funcs: true,\n states: true,\n presets: true,\n recipes: true,\n styles: true,\n importSources: true,\n ownedSources: true,\n styleFunctions: true,\n protectedComponents: true,\n // The Tasty VS Code extension reads these from the same file.\n presetDescriptions: true,\n stateDescriptions: true,\n } satisfies Record<keyof TastyValidationConfig, true>),\n);\n\nconst warnings = new Set<string>();\n\n/** A config problem worth a message but not a failed run, said once per process. */\nfunction warnOnce(message: string): void {\n if (warnings.has(message)) return;\n warnings.add(message);\n console.warn(`[eslint-plugin-tasty] ${message}`);\n}\n\n/** Fails the run when the installed plugin is outside the config's `requires`. */\nfunction checkRequires(config: TastyValidationConfig, configPath: string) {\n const range: unknown = config.requires;\n if (range === undefined) return;\n if (\n typeof range !== 'string' ||\n range.trim() === '' ||\n semver.validRange(range) === null\n ) {\n throw new Error(\n `tasty: ${configPath}: 'requires' must be a semver range of @tenphi/eslint-plugin-tasty versions, such as '>=1.13.0'.`,\n );\n }\n // A snapshot of the next release still satisfies `>=` the current one.\n if (!semver.satisfies(pluginVersion, range, { includePrerelease: true })) {\n throw new Error(\n `tasty: ${configPath} requires @tenphi/eslint-plugin-tasty ${range}, but ${pluginVersion} is installed. Upgrade the plugin.`,\n );\n }\n}\n\n/** List keys, and whether `false` (turning the check off) is allowed. */\nconst LIST_KEYS = {\n tokens: true,\n units: true,\n functions: true,\n funcs: true,\n states: false,\n presets: false,\n recipes: false,\n styles: false,\n importSources: false,\n ownedSources: false,\n} as const;\n\n/** Keys Tasty's runtime config (`configure()`) holds as objects keyed by name. */\nconst RUNTIME_OBJECT_KEYS = [\n 'tokens',\n 'units',\n 'functions',\n 'states',\n 'presets',\n 'recipes',\n];\n\nfunction isPlainObject(value: unknown): value is Record<string, unknown> {\n return typeof value === 'object' && value !== null && !Array.isArray(value);\n}\n\nfunction describe(value: unknown): string {\n if (value === null) return 'null';\n if (Array.isArray(value)) {\n return value.every((item) => typeof item === 'string')\n ? 'a list'\n : 'a list with a non-string entry';\n }\n return isPlainObject(value) ? 'an object' : `a ${typeof value}`;\n}\n\n/**\n * Warns about keys the plugin does not read and known keys of the wrong shape,\n * and returns the config without the latter, so `states: '@mobile'` is not\n * read character by character.\n */\nfunction checkKeys(\n config: TastyValidationConfig,\n configPath: string,\n): TastyValidationConfig {\n // Tasty's SSR guide keeps the runtime config in a `tasty.config.ts` too.\n const runtime = RUNTIME_OBJECT_KEYS.some((key) =>\n isPlainObject((config as Record<string, unknown>)[key]),\n )\n ? \" It looks like Tasty's runtime config, which the plugin does not read.\"\n : '';\n\n const unknown = Object.keys(config).filter(\n (key) => !KNOWN_KEYS.has(key) && key !== '__esModule',\n );\n if (unknown.length > 0) {\n const keys = unknown.map((key) => `'${key}'`).join(', ');\n warnOnce(\n `${configPath}: ignoring unknown ${unknown.length === 1 ? 'key' : 'keys'} ${keys}.${\n runtime ||\n ` Check the spelling, or upgrade @tenphi/eslint-plugin-tasty (${pluginVersion} is installed) if the config was written for a newer version.`\n }`,\n );\n }\n\n const checked: Record<string, unknown> = { ...config };\n const ignore = (key: string, expected: string) => {\n warnOnce(\n `${configPath}: ignoring '${key}', which must be ${expected}, not ${describe(checked[key])}.${runtime}`,\n );\n delete checked[key];\n };\n for (const [key, allowsFalse] of Object.entries(LIST_KEYS)) {\n const value = checked[key];\n if (\n value === undefined ||\n (value === false && allowsFalse) ||\n (Array.isArray(value) && value.every((item) => typeof item === 'string'))\n ) {\n continue;\n }\n ignore(key, `${allowsFalse ? 'false or ' : ''}a list of names`);\n }\n if (\n checked.styleFunctions !== undefined &&\n !isPlainObject(checked.styleFunctions)\n ) {\n ignore('styleFunctions', 'an object keyed by function name');\n }\n return checked as TastyValidationConfig;\n}\n\nfunction findProjectRoot(startDir: string): string | null {\n let dir = startDir;\n while (dir !== dirname(dir)) {\n if (existsSync(join(dir, 'package.json'))) {\n return dir;\n }\n dir = dirname(dir);\n }\n return null;\n}\n\nfunction resolvePackageDir(\n packageName: string,\n startDir: string,\n): string | null {\n let dir = startDir;\n while (dir !== dirname(dir)) {\n const candidate = join(dir, 'node_modules', ...packageName.split('/'));\n if (existsSync(candidate) && existsSync(join(candidate, 'package.json'))) {\n return candidate;\n }\n dir = dirname(dir);\n }\n return null;\n}\n\nfunction findConfigInDir(dir: string): string | null {\n for (const name of CONFIG_FILENAMES) {\n const path = join(dir, name);\n if (existsSync(path)) {\n return path;\n }\n }\n return null;\n}\n\nfunction collectConfigFiles(startDir: string, projectRoot: string): string[] {\n const configs: string[] = [];\n let dir = startDir;\n const root = resolve(projectRoot);\n\n while (true) {\n const found = findConfigInDir(dir);\n if (found) configs.push(found);\n if (resolve(dir) === root) break;\n const parent = dirname(dir);\n if (parent === dir) break;\n dir = parent;\n }\n\n return configs;\n}\n\nconst TASTY_PACKAGE_NAME = '@tenphi/tasty';\n\nfunction stripComments(source: string): string {\n let result = '';\n let i = 0;\n while (i < source.length) {\n const ch = source[i];\n if (ch === '\"' || ch === \"'\" || ch === '`') {\n result += ch;\n i++;\n while (i < source.length && source[i] !== ch) {\n if (source[i] === '\\\\') {\n result += source[i++];\n }\n if (i < source.length) {\n result += source[i++];\n }\n }\n if (i < source.length) {\n result += source[i++];\n }\n continue;\n }\n if (ch === '/' && source[i + 1] === '*') {\n i += 2;\n while (\n i < source.length &&\n !(source[i] === '*' && source[i + 1] === '/')\n ) {\n i++;\n }\n i += 2;\n continue;\n }\n if (ch === '/' && source[i + 1] === '/') {\n while (i < source.length && source[i] !== '\\n') {\n i++;\n }\n continue;\n }\n result += source[i++];\n }\n return result;\n}\n\nfunction stripImports(source: string): string {\n return source.replace(/^\\s*import\\s+.*?;\\s*$/gm, '');\n}\n\nfunction extractBalancedBraces(content: string, start: number): string | null {\n if (content[start] !== '{') return null;\n let depth = 0;\n for (let i = start; i < content.length; i++) {\n const ch = content[i];\n if (ch === '\"' || ch === \"'\" || ch === '`') {\n i++;\n while (i < content.length && content[i] !== ch) {\n if (content[i] === '\\\\') i++;\n i++;\n }\n continue;\n }\n if (ch === '{') depth++;\n else if (ch === '}') depth--;\n if (depth === 0) return content.slice(start, i + 1);\n }\n return null;\n}\n\nfunction extractImportPaths(configPath: string): string[] {\n const source = readFileSync(configPath, 'utf-8');\n const configDir = dirname(configPath);\n const paths: string[] = [];\n const re = /^\\s*import\\s+.*?\\s+from\\s+['\"]([^'\"]+)['\"]/gm;\n let m;\n\n while ((m = re.exec(source)) !== null) {\n const specifier = m[1];\n\n if (!specifier.startsWith('.')) continue;\n\n const abs = resolve(configDir, specifier);\n\n for (const ext of ['', '.ts', '.js', '.mjs', '.tsx', '.jsx']) {\n const candidate = abs + ext;\n\n if (existsSync(candidate)) {\n paths.push(candidate);\n break;\n }\n }\n }\n\n return paths;\n}\n\nfunction stripTypeScriptSyntax(source: string): string {\n return source\n .replace(/\\bas\\s+const\\b/g, '')\n .replace(/\\bsatisfies\\s+[A-Z]\\w*(?:<[^>]*>)?/g, '')\n .replace(/\\bas\\s+[A-Z]\\w*(?:<[^>]*>)?/g, '');\n}\n\nfunction loadRawConfig(configPath: string): TastyValidationConfig {\n if (configPath.endsWith('.json')) {\n return JSON.parse(\n readFileSync(configPath, 'utf-8'),\n ) as TastyValidationConfig;\n }\n\n // Try jiti first — it resolves imports and TypeScript natively.\n try {\n const jiti = createJiti(dirname(configPath), { moduleCache: false });\n const mod = jiti(configPath) as Record<string, unknown>;\n const config = (mod.default ?? mod) as TastyValidationConfig;\n\n if (config && typeof config === 'object') {\n return config;\n }\n } catch {\n // Fall through to text-based parsing.\n }\n\n // Fallback: text-based extraction (no import support).\n const content = readFileSync(configPath, 'utf-8');\n const stripped = stripImports(stripComments(content));\n const match = stripped.match(/export\\s+default\\s+/);\n\n if (match && match.index != null) {\n const braceStart = match.index + match[0].length;\n const objectStr = extractBalancedBraces(stripped, braceStart);\n\n if (objectStr) {\n const cleaned = stripTypeScriptSyntax(objectStr);\n\n try {\n const fn = new Function(`return (${cleaned})`);\n return fn() as TastyValidationConfig;\n } catch (err) {\n console.warn(\n `[eslint-plugin-tasty] Failed to parse config file ${configPath}: ${err instanceof Error ? err.message : err}`,\n );\n }\n }\n }\n\n return {};\n}\n\nfunction mergeConfigs(\n parent: TastyValidationConfig,\n child: TastyValidationConfig,\n): TastyValidationConfig {\n const result: TastyValidationConfig = { ...parent };\n\n const arrayKeys = [\n ...(Object.keys(LIST_KEYS) as (keyof typeof LIST_KEYS)[]),\n 'protectedComponents',\n ] as const;\n\n for (const key of arrayKeys) {\n const childVal = child[key];\n if (childVal === undefined) continue;\n\n if (childVal === false) {\n (result as Record<string, unknown>)[key] = false;\n continue;\n }\n\n const parentVal = parent[key];\n if (Array.isArray(parentVal) && Array.isArray(childVal)) {\n (result as Record<string, unknown>)[key] = [\n ...new Set([...parentVal, ...childVal]),\n ];\n } else {\n (result as Record<string, unknown>)[key] = childVal;\n }\n }\n\n if (child.styleFunctions !== undefined) {\n result.styleFunctions = {\n ...parent.styleFunctions,\n ...child.styleFunctions,\n };\n }\n\n return result;\n}\n\n/**\n * The config file `extends` points to, or null when there is none. A relative\n * or absolute path that is not a file fails the run, as reading it always has; a\n * value that names nothing usable is skipped with a warning.\n */\nfunction resolveExtends(\n config: TastyValidationConfig,\n configPath: string,\n touched: string[],\n): string | null {\n const target: unknown = config.extends;\n if (target === undefined) return null;\n const configDir = dirname(configPath);\n if (typeof target !== 'string' || target === '') {\n warnOnce(\n `${configPath}: 'extends' must be a config path or a package name, not ${JSON.stringify(target)}. It is ignored.`,\n );\n return null;\n }\n\n if (target.startsWith('.') || target.startsWith('/')) {\n const parentPath = resolve(configDir, target);\n // Watched, so creating the file clears a cached failure.\n touched.push(parentPath);\n if (!isFile(parentPath)) {\n throw new Error(\n `tasty: ${configPath}: 'extends' points to ${parentPath}, which is not a file.`,\n );\n }\n return parentPath;\n }\n\n // `@scope/pkg/path/to/config` names a file inside the package.\n const parts = target.split('/');\n const packageName = parts.slice(0, target.startsWith('@') ? 2 : 1).join('/');\n const subpath = target.slice(packageName.length + 1);\n const pkgDir = resolvePackageDir(packageName, configDir);\n if (!pkgDir) {\n warnOnce(\n `${configPath}: 'extends' names '${packageName}', which cannot be resolved from ${configDir}. It is ignored.`,\n );\n return null;\n }\n const pkgConfig = subpath\n ? findConfigFile(join(pkgDir, subpath))\n : findConfigInDir(pkgDir);\n if (!pkgConfig) {\n warnOnce(\n subpath\n ? `${configPath}: 'extends' names '${target}', but ${join(pkgDir, subpath)} is not a config file. It is ignored.`\n : `${configPath}: 'extends' names '${target}', which has no tasty.config.* at ${pkgDir}. It is ignored.`,\n );\n }\n return pkgConfig;\n}\n\nfunction isFile(path: string): boolean {\n return statSync(path, { throwIfNoEntry: false })?.isFile() ?? false;\n}\n\n/** A config file at `path`, with or without its extension, or in that directory. */\nfunction findConfigFile(path: string): string | null {\n for (const ext of ['', '.ts', '.js', '.mjs', '.json']) {\n if (isFile(path + ext)) return path + ext;\n }\n return statSync(path, { throwIfNoEntry: false })?.isDirectory()\n ? findConfigInDir(path)\n : null;\n}\n\n/**\n * Loads a config and the chain it extends, parents merged first. Every file\n * read (or expected) is pushed to `touched`, whose mtimes decide when the\n * result, or a failure, is stale.\n */\nfunction resolveConfigChain(\n configPath: string,\n touched: string[],\n visited = new Set<string>(),\n): TastyValidationConfig {\n const absPath = resolve(configPath);\n if (visited.has(absPath)) {\n warnOnce(\n `${absPath} is extended again by its own extends chain. The cycle is ignored.`,\n );\n return {};\n }\n visited.add(absPath);\n touched.push(absPath);\n\n let config = loadRawConfig(absPath);\n touched.push(...extractImportPaths(absPath));\n\n if (!config || typeof config !== 'object' || Array.isArray(config)) {\n warnOnce(`${absPath}: the config must be an object. It is ignored.`);\n config = {};\n }\n checkRequires(config, absPath);\n config = checkKeys(config, absPath);\n\n const parentPath = resolveExtends(config, absPath, touched);\n if (!parentPath) return config;\n\n return mergeConfigs(resolveConfigChain(parentPath, touched, visited), config);\n}\n\nfunction toResolved(config: TastyValidationConfig): ResolvedConfig {\n return {\n tokens: config.tokens ?? [],\n units: config.units ?? [],\n // `funcs` is the v2 spelling; `functions` wins when both are present.\n functions: config.functions ?? config.funcs ?? [],\n states: config.states ?? [],\n presets: config.presets ?? [],\n recipes: config.recipes ?? [],\n styles: config.styles ?? [],\n importSources: config.importSources ?? DEFAULT_IMPORT_SOURCES,\n ownedSources: config.ownedSources ?? [],\n styleFunctions: config.styleFunctions ?? {},\n protectedComponents: config.protectedComponents || [],\n };\n}\n\nconst DEFAULT_CONFIG: ResolvedConfig = {\n tokens: [],\n units: [],\n functions: [],\n states: [],\n presets: [],\n recipes: [],\n styles: [],\n importSources: DEFAULT_IMPORT_SOURCES,\n ownedSources: [],\n styleFunctions: {},\n protectedComponents: [],\n};\n\nfunction getMtimes(paths: string[]): Map<string, number> {\n const mtimes = new Map<string, number>();\n for (const p of paths) {\n try {\n mtimes.set(p, statSync(p).mtimeMs);\n } catch {\n mtimes.set(p, -1);\n }\n }\n return mtimes;\n}\n\nfunction mtimesMatch(\n cached: Map<string, number>,\n current: Map<string, number>,\n): boolean {\n if (cached.size !== current.size) return false;\n for (const [path, mtime] of cached) {\n if (current.get(path) !== mtime) return false;\n }\n return true;\n}\n\nexport function loadConfig(filePath: string): ResolvedConfig {\n const fileDir = dirname(resolve(filePath));\n const projectRoot = findProjectRoot(fileDir);\n if (!projectRoot) return DEFAULT_CONFIG;\n\n const configFiles = collectConfigFiles(fileDir, projectRoot);\n\n const pkgDir = resolvePackageDir(TASTY_PACKAGE_NAME, projectRoot);\n const pkgConfigFile = pkgDir ? findConfigInDir(pkgDir) : null;\n\n if (configFiles.length === 0 && !pkgConfigFile) return DEFAULT_CONFIG;\n\n const cacheKey = [pkgConfigFile ?? '', ...configFiles].join('\\0');\n\n const cached = configCache.get(cacheKey);\n if (\n cached &&\n mtimesMatch(cached.fileMtimes, getMtimes([...cached.fileMtimes.keys()]))\n ) {\n if (cached.result instanceof Error) throw cached.result;\n return cached.result;\n }\n\n // A failure is cached too: oxlint keeps linting after a plugin error, and\n // every rule on every file would otherwise reload the chain to fail again.\n const touched: string[] = [];\n let result: ResolvedConfig | Error;\n try {\n let merged: TastyValidationConfig = pkgConfigFile\n ? resolveConfigChain(pkgConfigFile, touched)\n : {};\n for (let i = configFiles.length - 1; i >= 0; i--) {\n merged = mergeConfigs(\n merged,\n resolveConfigChain(configFiles[i], touched),\n );\n }\n result = toResolved(merged);\n } catch (error) {\n result = error instanceof Error ? error : new Error(String(error));\n }\n\n configCache.set(cacheKey, { result, fileMtimes: getMtimes(touched) });\n if (result instanceof Error) throw result;\n return result;\n}\n"],"mappings":";;;;;;;;AAUA,MAAM,mBAAmB;CACvB;CACA;CACA;CACA;CACD;AAQD,MAAM,8BAAc,IAAI,KAA2B;;;;;AAMnD,MAAM,aAAa,IAAI,IACrB,OAAO,KAAK;CACV,SAAS;CACT,UAAU;CACV,QAAQ;CACR,OAAO;CACP,WAAW;CACX,OAAO;CACP,QAAQ;CACR,SAAS;CACT,SAAS;CACT,QAAQ;CACR,eAAe;CACf,cAAc;CACd,gBAAgB;CAChB,qBAAqB;CAErB,oBAAoB;CACpB,mBAAmB;C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E,CAAC;AACrE,KAAI,kBAAkB,MAAO,OAAM;AACnC,QAAO"}
|
|
1
|
+
{"version":3,"file":"config.js","names":["pluginVersion"],"sources":["../src/config.ts"],"sourcesContent":["import { existsSync, readFileSync, statSync } from 'fs';\nimport { dirname, join, resolve } from 'path';\n\nimport { createJiti } from 'jiti';\nimport semver from 'semver';\n\nimport type { ResolvedConfig, TastyValidationConfig } from './types.js';\nimport { DEFAULT_IMPORT_SOURCES } from './constants.js';\nimport { version as pluginVersion } from './version.js';\n\nconst CONFIG_FILENAMES = [\n 'tasty.config.ts',\n 'tasty.config.js',\n 'tasty.config.mjs',\n 'tasty.config.json',\n];\n\ninterface CachedConfig {\n /** The resolved config, or the error that loading it failed with. */\n result: ResolvedConfig | Error;\n fileMtimes: Map<string, number>;\n}\n\nconst configCache = new Map<string, CachedConfig>();\n\n/**\n * Every key a config may carry; anything else is a typo or from a newer plugin.\n * Typed against the config interface so a new key cannot be missed here.\n */\nconst KNOWN_KEYS = new Set(\n Object.keys({\n extends: true,\n requires: true,\n tokens: true,\n units: true,\n functions: true,\n funcs: true,\n states: true,\n presets: true,\n recipes: true,\n styles: true,\n importSources: true,\n ownedSources: true,\n styleFunctions: true,\n protectedComponents: true,\n // The Tasty VS Code extension reads these from the same file.\n presetDescriptions: true,\n stateDescriptions: true,\n } satisfies Record<keyof TastyValidationConfig, true>),\n);\n\nconst warnings = new Set<string>();\n\n/** A config problem worth a message but not a failed run, said once per process. */\nfunction warnOnce(message: string): void {\n if (warnings.has(message)) return;\n warnings.add(message);\n console.warn(`[eslint-plugin-tasty] ${message}`);\n}\n\n/** Fails the run when the installed plugin is outside the config's `requires`. */\nfunction checkRequires(config: TastyValidationConfig, configPath: string) {\n const range: unknown = config.requires;\n if (range === undefined) return;\n if (\n typeof range !== 'string' ||\n range.trim() === '' ||\n semver.validRange(range) === null\n ) {\n throw new Error(\n `tasty: ${configPath}: 'requires' must be a semver range of @tenphi/eslint-plugin-tasty versions, such as '>=1.13.0'.`,\n );\n }\n // A snapshot of the next release still satisfies `>=` the current one.\n if (!semver.satisfies(pluginVersion, range, { includePrerelease: true })) {\n throw new Error(\n `tasty: ${configPath} requires @tenphi/eslint-plugin-tasty ${range}, but ${pluginVersion} is installed. Upgrade the plugin.`,\n );\n }\n}\n\n/** List keys, and whether `false` (turning the check off) is allowed. */\nconst LIST_KEYS = {\n tokens: true,\n units: true,\n functions: true,\n funcs: true,\n states: false,\n presets: false,\n recipes: false,\n styles: false,\n importSources: false,\n ownedSources: false,\n} as const;\n\n/** Keys Tasty's runtime config (`configure()`) holds as objects keyed by name. */\nconst RUNTIME_OBJECT_KEYS = [\n 'tokens',\n 'units',\n 'functions',\n 'states',\n 'presets',\n 'recipes',\n];\n\nfunction isPlainObject(value: unknown): value is Record<string, unknown> {\n return typeof value === 'object' && value !== null && !Array.isArray(value);\n}\n\nfunction describe(value: unknown): string {\n if (value === null) return 'null';\n if (Array.isArray(value)) {\n return value.every((item) => typeof item === 'string')\n ? 'a list'\n : 'a list with a non-string entry';\n }\n return isPlainObject(value) ? 'an object' : `a ${typeof value}`;\n}\n\n/**\n * Warns about keys the plugin does not read and known keys of the wrong shape,\n * and returns the config without the latter, so `states: '@mobile'` is not\n * read character by character.\n */\nfunction checkKeys(\n config: TastyValidationConfig,\n configPath: string,\n): TastyValidationConfig {\n // Tasty's SSR guide keeps the runtime config in a `tasty.config.ts` too.\n const runtime = RUNTIME_OBJECT_KEYS.some((key) =>\n isPlainObject((config as Record<string, unknown>)[key]),\n )\n ? \" It looks like Tasty's runtime config, which the plugin does not read.\"\n : '';\n\n const unknown = Object.keys(config).filter(\n (key) => !KNOWN_KEYS.has(key) && key !== '__esModule',\n );\n if (unknown.length > 0) {\n const keys = unknown.map((key) => `'${key}'`).join(', ');\n warnOnce(\n `${configPath}: ignoring unknown ${unknown.length === 1 ? 'key' : 'keys'} ${keys}.${\n runtime ||\n ` Check the spelling, or upgrade @tenphi/eslint-plugin-tasty (${pluginVersion} is installed) if the config was written for a newer version.`\n }`,\n );\n }\n\n const checked: Record<string, unknown> = { ...config };\n const ignore = (key: string, expected: string) => {\n warnOnce(\n `${configPath}: ignoring '${key}', which must be ${expected}, not ${describe(checked[key])}.${runtime}`,\n );\n delete checked[key];\n };\n for (const [key, allowsFalse] of Object.entries(LIST_KEYS)) {\n const value = checked[key];\n if (\n value === undefined ||\n (value === false && allowsFalse) ||\n (Array.isArray(value) && value.every((item) => typeof item === 'string'))\n ) {\n continue;\n }\n ignore(key, `${allowsFalse ? 'false or ' : ''}a list of names`);\n }\n if (\n checked.styleFunctions !== undefined &&\n !isPlainObject(checked.styleFunctions)\n ) {\n ignore('styleFunctions', 'an object keyed by function name');\n }\n return checked as TastyValidationConfig;\n}\n\nfunction findProjectRoot(startDir: string): string | null {\n let dir = startDir;\n while (dir !== dirname(dir)) {\n if (existsSync(join(dir, 'package.json'))) {\n return dir;\n }\n dir = dirname(dir);\n }\n return null;\n}\n\nfunction resolvePackageDir(\n packageName: string,\n startDir: string,\n): string | null {\n let dir = startDir;\n while (dir !== dirname(dir)) {\n const candidate = join(dir, 'node_modules', ...packageName.split('/'));\n if (existsSync(candidate) && existsSync(join(candidate, 'package.json'))) {\n return candidate;\n }\n dir = dirname(dir);\n }\n return null;\n}\n\nfunction findConfigInDir(dir: string): string | null {\n for (const name of CONFIG_FILENAMES) {\n const path = join(dir, name);\n if (existsSync(path)) {\n return path;\n }\n }\n return null;\n}\n\nfunction collectConfigFiles(startDir: string, projectRoot: string): string[] {\n const configs: string[] = [];\n let dir = startDir;\n const root = resolve(projectRoot);\n\n while (true) {\n const found = findConfigInDir(dir);\n if (found) configs.push(found);\n if (resolve(dir) === root) break;\n const parent = dirname(dir);\n if (parent === dir) break;\n dir = parent;\n }\n\n return configs;\n}\n\nconst TASTY_PACKAGE_NAME = '@tenphi/tasty';\n\nfunction stripComments(source: string): string {\n let result = '';\n let i = 0;\n while (i < source.length) {\n const ch = source[i];\n if (ch === '\"' || ch === \"'\" || ch === '`') {\n result += ch;\n i++;\n while (i < source.length && source[i] !== ch) {\n if (source[i] === '\\\\') {\n result += source[i++];\n }\n if (i < source.length) {\n result += source[i++];\n }\n }\n if (i < source.length) {\n result += source[i++];\n }\n continue;\n }\n if (ch === '/' && source[i + 1] === '*') {\n i += 2;\n while (\n i < source.length &&\n !(source[i] === '*' && source[i + 1] === '/')\n ) {\n i++;\n }\n i += 2;\n continue;\n }\n if (ch === '/' && source[i + 1] === '/') {\n while (i < source.length && source[i] !== '\\n') {\n i++;\n }\n continue;\n }\n result += source[i++];\n }\n return result;\n}\n\nfunction stripImports(source: string): string {\n return source.replace(/^\\s*import\\s+.*?;\\s*$/gm, '');\n}\n\nfunction extractBalancedBraces(content: string, start: number): string | null {\n if (content[start] !== '{') return null;\n let depth = 0;\n for (let i = start; i < content.length; i++) {\n const ch = content[i];\n if (ch === '\"' || ch === \"'\" || ch === '`') {\n i++;\n while (i < content.length && content[i] !== ch) {\n if (content[i] === '\\\\') i++;\n i++;\n }\n continue;\n }\n if (ch === '{') depth++;\n else if (ch === '}') depth--;\n if (depth === 0) return content.slice(start, i + 1);\n }\n return null;\n}\n\nfunction extractImportPaths(configPath: string): string[] {\n const source = readFileSync(configPath, 'utf-8');\n const configDir = dirname(configPath);\n const paths: string[] = [];\n const re = /^\\s*import\\s+.*?\\s+from\\s+['\"]([^'\"]+)['\"]/gm;\n let m;\n\n while ((m = re.exec(source)) !== null) {\n const specifier = m[1];\n\n if (!specifier.startsWith('.')) continue;\n\n const abs = resolve(configDir, specifier);\n\n for (const ext of ['', '.ts', '.js', '.mjs', '.tsx', '.jsx']) {\n const candidate = abs + ext;\n\n if (existsSync(candidate)) {\n paths.push(candidate);\n break;\n }\n }\n }\n\n return paths;\n}\n\nfunction stripTypeScriptSyntax(source: string): string {\n return source\n .replace(/\\bas\\s+const\\b/g, '')\n .replace(/\\bsatisfies\\s+[A-Z]\\w*(?:<[^>]*>)?/g, '')\n .replace(/\\bas\\s+[A-Z]\\w*(?:<[^>]*>)?/g, '');\n}\n\nfunction loadRawConfig(configPath: string): TastyValidationConfig {\n if (configPath.endsWith('.json')) {\n return JSON.parse(\n readFileSync(configPath, 'utf-8'),\n ) as TastyValidationConfig;\n }\n\n // Try jiti first — it resolves imports and TypeScript natively.\n try {\n const jiti = createJiti(dirname(configPath), { moduleCache: false });\n const mod = jiti(configPath) as Record<string, unknown>;\n const config = (mod.default ?? mod) as TastyValidationConfig;\n\n if (config && typeof config === 'object') {\n return config;\n }\n } catch {\n // Fall through to text-based parsing.\n }\n\n // Fallback: text-based extraction (no import support).\n const content = readFileSync(configPath, 'utf-8');\n const stripped = stripImports(stripComments(content));\n const match = stripped.match(/export\\s+default\\s+/);\n\n if (match && match.index != null) {\n const braceStart = match.index + match[0].length;\n const objectStr = extractBalancedBraces(stripped, braceStart);\n\n if (objectStr) {\n const cleaned = stripTypeScriptSyntax(objectStr);\n\n try {\n const fn = new Function(`return (${cleaned})`);\n return fn() as TastyValidationConfig;\n } catch (err) {\n console.warn(\n `[eslint-plugin-tasty] Failed to parse config file ${configPath}: ${err instanceof Error ? err.message : err}`,\n );\n }\n }\n }\n\n return {};\n}\n\nfunction mergeConfigs(\n parent: TastyValidationConfig,\n child: TastyValidationConfig,\n): TastyValidationConfig {\n const result: TastyValidationConfig = { ...parent };\n\n const arrayKeys = [\n ...(Object.keys(LIST_KEYS) as (keyof typeof LIST_KEYS)[]),\n 'protectedComponents',\n ] as const;\n\n for (const key of arrayKeys) {\n const childVal = child[key];\n if (childVal === undefined) continue;\n\n if (childVal === false) {\n (result as Record<string, unknown>)[key] = false;\n continue;\n }\n\n const parentVal = parent[key];\n if (Array.isArray(parentVal) && Array.isArray(childVal)) {\n (result as Record<string, unknown>)[key] = [\n ...new Set([...parentVal, ...childVal]),\n ];\n } else {\n (result as Record<string, unknown>)[key] = childVal;\n }\n }\n\n if (child.styleFunctions !== undefined) {\n result.styleFunctions = {\n ...parent.styleFunctions,\n ...child.styleFunctions,\n };\n }\n\n return result;\n}\n\n/**\n * The config file `extends` points to, or null when there is none. A relative\n * or absolute path that is not a file fails the run, as reading it always has; a\n * value that names nothing usable is skipped with a warning.\n */\nfunction resolveExtends(\n config: TastyValidationConfig,\n configPath: string,\n touched: string[],\n): string | null {\n const target: unknown = config.extends;\n if (target === undefined) return null;\n const configDir = dirname(configPath);\n if (typeof target !== 'string' || target === '') {\n warnOnce(\n `${configPath}: 'extends' must be a config path or a package name, not ${JSON.stringify(target)}. It is ignored.`,\n );\n return null;\n }\n\n if (target.startsWith('.') || target.startsWith('/')) {\n const parentPath = resolve(configDir, target);\n // Watched, so creating the file clears a cached failure.\n touched.push(parentPath);\n if (!isFile(parentPath)) {\n throw new Error(\n `tasty: ${configPath}: 'extends' points to ${parentPath}, which is not a file.`,\n );\n }\n return parentPath;\n }\n\n // `@scope/pkg/path/to/config` names a file inside the package.\n const parts = target.split('/');\n const packageName = parts.slice(0, target.startsWith('@') ? 2 : 1).join('/');\n const subpath = target.slice(packageName.length + 1);\n const pkgDir = resolvePackageDir(packageName, configDir);\n if (!pkgDir) {\n warnOnce(\n `${configPath}: 'extends' names '${packageName}', which cannot be resolved from ${configDir}. It is ignored.`,\n );\n return null;\n }\n const pkgConfig = subpath\n ? findConfigFile(join(pkgDir, subpath))\n : findConfigInDir(pkgDir);\n if (!pkgConfig) {\n warnOnce(\n subpath\n ? `${configPath}: 'extends' names '${target}', but ${join(pkgDir, subpath)} is not a config file. It is ignored.`\n : `${configPath}: 'extends' names '${target}', which has no tasty.config.* at ${pkgDir}. It is ignored.`,\n );\n }\n return pkgConfig;\n}\n\nfunction isFile(path: string): boolean {\n return statSync(path, { throwIfNoEntry: false })?.isFile() ?? false;\n}\n\n/** A config file at `path`, with or without its extension, or in that directory. */\nfunction findConfigFile(path: string): string | null {\n for (const ext of ['', '.ts', '.js', '.mjs', '.json']) {\n if (isFile(path + ext)) return path + ext;\n }\n return statSync(path, { throwIfNoEntry: false })?.isDirectory()\n ? findConfigInDir(path)\n : null;\n}\n\n/**\n * Loads a config and the chain it extends, parents merged first. Every file\n * read (or expected) is pushed to `touched`, whose mtimes decide when the\n * result, or a failure, is stale.\n */\nfunction resolveConfigChain(\n configPath: string,\n touched: string[],\n visited = new Set<string>(),\n): TastyValidationConfig {\n const absPath = resolve(configPath);\n if (visited.has(absPath)) {\n warnOnce(\n `${absPath} is extended again by its own extends chain. The cycle is ignored.`,\n );\n return {};\n }\n visited.add(absPath);\n touched.push(absPath);\n\n let config = loadRawConfig(absPath);\n touched.push(...extractImportPaths(absPath));\n\n if (!config || typeof config !== 'object' || Array.isArray(config)) {\n warnOnce(`${absPath}: the config must be an object. It is ignored.`);\n config = {};\n }\n checkRequires(config, absPath);\n config = checkKeys(config, absPath);\n\n const parentPath = resolveExtends(config, absPath, touched);\n if (!parentPath) return config;\n\n return mergeConfigs(resolveConfigChain(parentPath, touched, visited), config);\n}\n\nfunction toResolved(config: TastyValidationConfig): ResolvedConfig {\n return {\n tokens: config.tokens ?? [],\n units: config.units ?? [],\n // `funcs` is the v2 spelling; `functions` wins when both are present.\n functions: config.functions ?? config.funcs ?? [],\n states: config.states ?? [],\n presets: config.presets ?? [],\n recipes: config.recipes ?? [],\n styles: config.styles ?? [],\n importSources: config.importSources ?? DEFAULT_IMPORT_SOURCES,\n ownedSources: config.ownedSources ?? [],\n styleFunctions: config.styleFunctions ?? {},\n protectedComponents: config.protectedComponents || [],\n };\n}\n\nconst DEFAULT_CONFIG: ResolvedConfig = {\n tokens: [],\n units: [],\n functions: [],\n states: [],\n presets: [],\n recipes: [],\n styles: [],\n importSources: DEFAULT_IMPORT_SOURCES,\n ownedSources: [],\n styleFunctions: {},\n protectedComponents: [],\n};\n\nfunction getMtimes(paths: string[]): Map<string, number> {\n const mtimes = new Map<string, number>();\n for (const p of paths) {\n try {\n mtimes.set(p, statSync(p).mtimeMs);\n } catch {\n mtimes.set(p, -1);\n }\n }\n return mtimes;\n}\n\nfunction mtimesMatch(\n cached: Map<string, number>,\n current: Map<string, number>,\n): boolean {\n if (cached.size !== current.size) return false;\n for (const [path, mtime] of cached) {\n if (current.get(path) !== mtime) return false;\n }\n return true;\n}\n\nconst tastyVersionCache = new Map<\n string,\n { mtime: number; version: string | null }\n>();\n\n/**\n * The version of `@tenphi/tasty` installed for the project `filePath` belongs\n * to, or `null` when it cannot be found. Rules whose fixes need a newer Tasty\n * check it, so `--fix` never writes syntax the installed Tasty cannot render.\n */\nexport function getInstalledTastyVersion(filePath: string): string | null {\n const projectRoot = findProjectRoot(dirname(resolve(filePath)));\n if (!projectRoot) return null;\n\n const pkgDir = resolvePackageDir(TASTY_PACKAGE_NAME, projectRoot);\n if (!pkgDir) return null;\n\n const pkgJson = join(pkgDir, 'package.json');\n let mtime: number;\n try {\n mtime = statSync(pkgJson).mtimeMs;\n } catch {\n return null;\n }\n\n const cached = tastyVersionCache.get(pkgJson);\n if (cached?.mtime === mtime) return cached.version;\n\n let version: string | null = null;\n try {\n const parsed = JSON.parse(readFileSync(pkgJson, 'utf-8')) as {\n version?: unknown;\n };\n if (typeof parsed.version === 'string') version = parsed.version;\n } catch {\n // An unreadable manifest is the same as no Tasty at all.\n }\n\n tastyVersionCache.set(pkgJson, { mtime, version });\n return version;\n}\n\nexport function loadConfig(filePath: string): ResolvedConfig {\n const fileDir = dirname(resolve(filePath));\n const projectRoot = findProjectRoot(fileDir);\n if (!projectRoot) return DEFAULT_CONFIG;\n\n const configFiles = collectConfigFiles(fileDir, projectRoot);\n\n const pkgDir = resolvePackageDir(TASTY_PACKAGE_NAME, projectRoot);\n const pkgConfigFile = pkgDir ? findConfigInDir(pkgDir) : null;\n\n if (configFiles.length === 0 && !pkgConfigFile) return DEFAULT_CONFIG;\n\n const cacheKey = [pkgConfigFile ?? '', ...configFiles].join('\\0');\n\n const cached = configCache.get(cacheKey);\n if (\n cached &&\n mtimesMatch(cached.fileMtimes, getMtimes([...cached.fileMtimes.keys()]))\n ) {\n if (cached.result instanceof Error) throw cached.result;\n return cached.result;\n }\n\n // A failure is cached too: oxlint keeps linting after a plugin error, and\n // every rule on every file would otherwise reload the chain to fail again.\n const touched: string[] = [];\n let result: ResolvedConfig | Error;\n try {\n let merged: TastyValidationConfig = pkgConfigFile\n ? resolveConfigChain(pkgConfigFile, touched)\n : {};\n for (let i = configFiles.length - 1; i >= 0; i--) {\n merged = mergeConfigs(\n merged,\n resolveConfigChain(configFiles[i], touched),\n );\n }\n result = toResolved(merged);\n } catch (error) {\n result = error instanceof Error ? error : new Error(String(error));\n }\n\n configCache.set(cacheKey, { result, fileMtimes: getMtimes(touched) });\n if (result instanceof Error) throw result;\n return result;\n}\n"],"mappings":";;;;;;;;AAUA,MAAM,mBAAmB;CACvB;CACA;CACA;CACA;CACD;AAQD,MAAM,8BAAc,IAAI,KAA2B;;;;;AAMnD,MAAM,aAAa,IAAI,IACrB,OAAO,KAAK;CACV,SAAS;CACT,UAAU;CACV,QAAQ;CACR,OAAO;CACP,WAAW;CACX,OAAO;CACP,QAAQ;CACR,SAAS;CACT,SAAS;CACT,QAAQ;CACR,eAAe;CACf,cAAc;CACd,gBAAgB;CAChB,qBAAqB;CAErB,oBAAoB;CACpB,mBAAmB;CACpB,CAAqD,CACvD;AAED,MAAM,2BAAW,IAAI,KAAa;;AAGlC,SAAS,SAAS,SAAuB;AACvC,KAAI,SAAS,IAAI,QAAQ,CAAE;AAC3B,UAAS,IAAI,QAAQ;AACrB,SAAQ,KAAK,yBAAyB,UAAU;;;AAIlD,SAAS,cAAc,QAA+B,YAAoB;CACxE,MAAM,QAAiB,OAAO;AAC9B,KAAI,UAAU,OAAW;AACzB,KACE,OAAO,UAAU,YACjB,MAAM,MAAM,KAAK,MACjB,OAAO,WAAW,MAAM,KAAK,KAE7B,OAAM,IAAI,MACR,UAAU,WAAW,kGACtB;AAGH,KAAI,CAAC,OAAO,UAAUA,SAAe,OAAO,EAAE,mBAAmB,MAAM,CAAC,CACtE,OAAM,IAAI,MACR,UAAU,WAAW,wCAAwC,MAAM,QAAQA,QAAc,oCAC1F;;;AAKL,MAAM,YAAY;CA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IAAI,MAAM,OAAO,MAAM,CAAC;;AAGpE,aAAY,IAAI,UAAU;EAAE;EAAQ,YAAY,UAAU,QAAQ;EAAE,CAAC;AACrE,KAAI,kBAAkB,MAAO,OAAM;AACnC,QAAO"}
|
package/dist/configs.js
CHANGED
|
@@ -38,6 +38,7 @@ const recommended = {
|
|
|
38
38
|
"tasty/prefer-state-negation": "warn",
|
|
39
39
|
"tasty/prefer-custom-property-syntax": "warn",
|
|
40
40
|
"tasty/prefer-hide": "warn",
|
|
41
|
+
"tasty/prefer-fill-mix": "warn",
|
|
41
42
|
"tasty/prefer-directional-shorthand": "warn",
|
|
42
43
|
"tasty/prefer-longhand-property": "error"
|
|
43
44
|
};
|
package/dist/configs.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"configs.js","names":[],"sources":["../src/configs.ts"],"sourcesContent":["import type { TSESLint } from '@typescript-eslint/utils';\n\nexport const recommended: TSESLint.SharedConfig.RulesRecord = {\n 'tasty/known-property': 'warn',\n 'tasty/valid-value': 'error',\n 'tasty/valid-color-token': 'error',\n 'tasty/valid-custom-unit': 'error',\n 'tasty/valid-boolean-property': 'error',\n 'tasty/valid-state-key': 'error',\n 'tasty/valid-styles-structure': 'error',\n 'tasty/no-nested-state-map': 'error',\n 'tasty/no-important': 'error',\n 'tasty/valid-sub-element': 'error',\n 'tasty/valid-directional-modifier': 'error',\n 'tasty/valid-radius-shape': 'error',\n 'tasty/no-nested-selector': 'error',\n 'tasty/no-state-in-selector': 'warn',\n 'tasty/prefer-element-selector': 'warn',\n 'tasty/static-no-dynamic-values': 'error',\n 'tasty/static-valid-selector': 'error',\n 'tasty/valid-preset': 'error',\n 'tasty/valid-recipe': 'error',\n 'tasty/valid-transition': 'warn',\n 'tasty/require-default-state': 'error',\n 'tasty/no-own-at-root': 'warn',\n 'tasty/no-ignored-pseudo-element-state': 'error',\n 'tasty/valid-default-state-order': 'warn',\n 'tasty/prefer-shorthand-property': 'warn',\n 'tasty/no-raw-color-values': 'warn',\n 'tasty/no-raw-transition-duration': 'warn',\n 'tasty/no-runtime-styles-mutation': 'warn',\n 'tasty/no-style-spread': 'warn',\n 'tasty/no-style-prop': 'warn',\n 'tasty/no-classname-prop': 'warn',\n 'tasty/no-styles-prop': 'warn',\n 'tasty/no-protected-restyle': 'warn',\n 'tasty/consistent-token-usage': 'warn',\n 'tasty/prefer-auto-calc': 'warn',\n 'tasty/prefer-state-negation': 'warn',\n 'tasty/prefer-custom-property-syntax': 'warn',\n 'tasty/prefer-hide': 'warn',\n 'tasty/prefer-directional-shorthand': 'warn',\n 'tasty/prefer-longhand-property': 'error',\n};\n\nexport const strict: TSESLint.SharedConfig.RulesRecord = {\n ...recommended,\n 'tasty/valid-custom-property': 'warn',\n 'tasty/no-unknown-state-alias': 'warn',\n 'tasty/valid-state-definition': 'warn',\n};\n"],"mappings":";AAEA,MAAa,cAAiD;CAC5D,wBAAwB;CACxB,qBAAqB;CACrB,2BAA2B;CAC3B,2BAA2B;CAC3B,gCAAgC;CAChC,yBAAyB;CACzB,gCAAgC;CAChC,6BAA6B;CAC7B,sBAAsB;CACtB,2BAA2B;CAC3B,oCAAoC;CACpC,4BAA4B;CAC5B,4BAA4B;CAC5B,8BAA8B;CAC9B,iCAAiC;CACjC,kCAAkC;CAClC,+BAA+B;CAC/B,sBAAsB;CACtB,sBAAsB;CACtB,0BAA0B;CAC1B,+BAA+B;CAC/B,wBAAwB;CACxB,yCAAyC;CACzC,mCAAmC;CACnC,mCAAmC;CACnC,6BAA6B;CAC7B,oCAAoC;CACpC,oCAAoC;CACpC,yBAAyB;CACzB,uBAAuB;CACvB,2BAA2B;CAC3B,wBAAwB;CACxB,8BAA8B;CAC9B,gCAAgC;CAChC,0BAA0B;CAC1B,+BAA+B;CAC/B,uCAAuC;CACvC,qBAAqB;CACrB,sCAAsC;CACtC,kCAAkC;CACnC;AAED,MAAa,SAA4C;CACvD,GAAG;CACH,+BAA+B;CAC/B,gCAAgC;CAChC,gCAAgC;CACjC"}
|
|
1
|
+
{"version":3,"file":"configs.js","names":[],"sources":["../src/configs.ts"],"sourcesContent":["import type { TSESLint } from '@typescript-eslint/utils';\n\nexport const recommended: TSESLint.SharedConfig.RulesRecord = {\n 'tasty/known-property': 'warn',\n 'tasty/valid-value': 'error',\n 'tasty/valid-color-token': 'error',\n 'tasty/valid-custom-unit': 'error',\n 'tasty/valid-boolean-property': 'error',\n 'tasty/valid-state-key': 'error',\n 'tasty/valid-styles-structure': 'error',\n 'tasty/no-nested-state-map': 'error',\n 'tasty/no-important': 'error',\n 'tasty/valid-sub-element': 'error',\n 'tasty/valid-directional-modifier': 'error',\n 'tasty/valid-radius-shape': 'error',\n 'tasty/no-nested-selector': 'error',\n 'tasty/no-state-in-selector': 'warn',\n 'tasty/prefer-element-selector': 'warn',\n 'tasty/static-no-dynamic-values': 'error',\n 'tasty/static-valid-selector': 'error',\n 'tasty/valid-preset': 'error',\n 'tasty/valid-recipe': 'error',\n 'tasty/valid-transition': 'warn',\n 'tasty/require-default-state': 'error',\n 'tasty/no-own-at-root': 'warn',\n 'tasty/no-ignored-pseudo-element-state': 'error',\n 'tasty/valid-default-state-order': 'warn',\n 'tasty/prefer-shorthand-property': 'warn',\n 'tasty/no-raw-color-values': 'warn',\n 'tasty/no-raw-transition-duration': 'warn',\n 'tasty/no-runtime-styles-mutation': 'warn',\n 'tasty/no-style-spread': 'warn',\n 'tasty/no-style-prop': 'warn',\n 'tasty/no-classname-prop': 'warn',\n 'tasty/no-styles-prop': 'warn',\n 'tasty/no-protected-restyle': 'warn',\n 'tasty/consistent-token-usage': 'warn',\n 'tasty/prefer-auto-calc': 'warn',\n 'tasty/prefer-state-negation': 'warn',\n 'tasty/prefer-custom-property-syntax': 'warn',\n 'tasty/prefer-hide': 'warn',\n 'tasty/prefer-fill-mix': 'warn',\n 'tasty/prefer-directional-shorthand': 'warn',\n 'tasty/prefer-longhand-property': 'error',\n};\n\nexport const strict: TSESLint.SharedConfig.RulesRecord = {\n ...recommended,\n 'tasty/valid-custom-property': 'warn',\n 'tasty/no-unknown-state-alias': 'warn',\n 'tasty/valid-state-definition': 'warn',\n};\n"],"mappings":";AAEA,MAAa,cAAiD;CAC5D,wBAAwB;CACxB,qBAAqB;CACrB,2BAA2B;CAC3B,2BAA2B;CAC3B,gCAAgC;CAChC,yBAAyB;CACzB,gCAAgC;CAChC,6BAA6B;CAC7B,sBAAsB;CACtB,2BAA2B;CAC3B,oCAAoC;CACpC,4BAA4B;CAC5B,4BAA4B;CAC5B,8BAA8B;CAC9B,iCAAiC;CACjC,kCAAkC;CAClC,+BAA+B;CAC/B,sBAAsB;CACtB,sBAAsB;CACtB,0BAA0B;CAC1B,+BAA+B;CAC/B,wBAAwB;CACxB,yCAAyC;CACzC,mCAAmC;CACnC,mCAAmC;CACnC,6BAA6B;CAC7B,oCAAoC;CACpC,oCAAoC;CACpC,yBAAyB;CACzB,uBAAuB;CACvB,2BAA2B;CAC3B,wBAAwB;CACxB,8BAA8B;CAC9B,gCAAgC;CAChC,0BAA0B;CAC1B,+BAA+B;CAC/B,uCAAuC;CACvC,qBAAqB;CACrB,yBAAyB;CACzB,sCAAsC;CACtC,kCAAkC;CACnC;AAED,MAAa,SAA4C;CACvD,GAAG;CACH,+BAA+B;CAC/B,gCAAgC;CAChC,gCAAgC;CACjC"}
|
package/dist/constants.js
CHANGED
|
@@ -1110,14 +1110,10 @@ const CSS_UNITS = new Set([
|
|
|
1110
1110
|
/**
|
|
1111
1111
|
* Properties that accept `true` as a value (means "use default").
|
|
1112
1112
|
*
|
|
1113
|
-
* `fill`
|
|
1114
|
-
*
|
|
1115
|
-
*
|
|
1116
|
-
*
|
|
1117
|
-
* `constants.round-trip.test.ts` pins both halves of that: no property in this
|
|
1118
|
-
* set may swallow `true`, and `fill` still does — so whichever way tasty
|
|
1119
|
-
* resolves it (docs or implementation), a test says so rather than the plugin
|
|
1120
|
-
* quietly disagreeing with the runtime.
|
|
1113
|
+
* `fill` has no default color, so `fill: true` stays an error. Older Tasty
|
|
1114
|
+
* versions emitted invalid CSS; Tasty 3.14 ignores it instead. Neither gives
|
|
1115
|
+
* the element a background. The runtime guard in `constants.round-trip.test.ts`
|
|
1116
|
+
* checks that accepted properties resolve their defaults and fill stays absent.
|
|
1121
1117
|
*/
|
|
1122
1118
|
const BOOLEAN_TRUE_PROPERTIES = new Set([
|
|
1123
1119
|
"border",
|
|
@@ -2191,6 +2187,7 @@ const PROPERTIES_WITHOUT_COLOR_TOKEN_EXPANSION = new Set([
|
|
|
2191
2187
|
"font",
|
|
2192
2188
|
"fontFamily",
|
|
2193
2189
|
"fontSize",
|
|
2190
|
+
"fontStyle",
|
|
2194
2191
|
"fontWeight",
|
|
2195
2192
|
"justify",
|
|
2196
2193
|
"justifyContent",
|
package/dist/constants.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.js","names":[],"sources":["../src/constants.ts"],"sourcesContent":["// ---------------------------------------------------------------------------\n// Enhanced logical style families, mirroring `@tenphi/tasty`'s `logical-list.ts`.\n//\n// Tasty v3.8 gave each logical axis/category pair its own handler, named\n// `<axis><Category>` — `blockPadding`, `inlineBorder` — which emits native\n// logical CSS (`padding-block`, `border-inline`) rather than converting the\n// value to a physical edge. The browser resolves `start`/`end` from the\n// element's `writingMode` and `direction`.\n//\n// The native CSS spellings (`paddingBlock`, `insetInlineStart`, …) stay valid\n// keys, but they are now *ordinary* CSS properties: tasty stopped reading\n// `paddingBlock`/`paddingInline`/`insetBlock`/`insetInline` in its physical\n// handlers, so they no longer get category defaults or directional behaviour.\n// That is why they are absent from `KNOWN_TASTY_PROPERTIES` (they are still\n// recognised, via `KNOWN_CSS_PROPERTIES`) and why `SHORTHAND_MAPPING` points\n// them at the enhanced style instead.\n//\n// The groups are split by *vocabulary*, not for tidiness: each one is spread\n// into a different set below, and the splits are what keep `true` off the size\n// constraints and the single-value rule off the borders.\n// ---------------------------------------------------------------------------\n\n/** Logical edge modifiers, the `start`/`end` counterpart of {@link BOX_SIDES}. */\nexport const LOGICAL_EDGES = ['start', 'end'] as const;\n\n/** Enhanced logical sizes. `min`/`max` variants are read by the same handler. */\nexport const LOGICAL_SIZE_STYLES = ['blockSize', 'inlineSize'] as const;\nexport const LOGICAL_SIZE_CONSTRAINT_STYLES = [\n 'minBlockSize',\n 'maxBlockSize',\n 'minInlineSize',\n 'maxInlineSize',\n] as const;\n\n/**\n * Enhanced logical spacing and inset axes — the categories that take a value\n * per logical edge, so they share the `start`/`end` modifier vocabulary and the\n * one-value-per-directional-group rule.\n */\nexport const LOGICAL_SPACING_STYLES = [\n 'blockPadding',\n 'inlinePadding',\n 'blockMargin',\n 'inlineMargin',\n 'blockInset',\n 'inlineInset',\n 'blockScrollMargin',\n 'inlineScrollMargin',\n 'blockScrollPadding',\n 'inlineScrollPadding',\n] as const;\n\n/**\n * Enhanced logical borders. Kept apart from {@link LOGICAL_SPACING_STYLES}\n * because a border group legitimately carries width + style + colour, exactly\n * as physical `border` does, so it is not subject to the single-value rule.\n */\nexport const LOGICAL_BORDER_STYLES = ['blockBorder', 'inlineBorder'] as const;\n\n/** Every enhanced logical style, in the order tasty's own lists declare them. */\nexport const LOGICAL_STYLES = [\n ...LOGICAL_SIZE_STYLES,\n ...LOGICAL_SIZE_CONSTRAINT_STYLES,\n ...LOGICAL_SPACING_STYLES,\n ...LOGICAL_BORDER_STYLES,\n] as const;\n\n/** Tasty's `POSITION_STYLES`: style props that place an element. */\nexport const POSITION_STYLES = [\n 'gridArea',\n 'order',\n 'gridColumn',\n 'gridRow',\n 'placeSelf',\n 'alignSelf',\n 'justifySelf',\n 'zIndex',\n 'margin',\n 'blockMargin',\n 'inlineMargin',\n 'inset',\n 'blockInset',\n 'inlineInset',\n 'position',\n 'scrollMargin',\n 'blockScrollMargin',\n 'inlineScrollMargin',\n 'scrollPadding',\n 'blockScrollPadding',\n 'inlineScrollPadding',\n] as const;\n\n/** Tasty's `DIMENSION_STYLES`: style props that size an element. */\nexport const DIMENSION_STYLES = [\n 'width',\n 'height',\n ...LOGICAL_SIZE_STYLES,\n 'flexBasis',\n 'flexGrow',\n 'flexShrink',\n 'flex',\n] as const;\n\n/**\n * Built-in tasty style properties that are always valid as style keys.\n */\nexport const KNOWN_TASTY_PROPERTIES = new Set([\n 'display',\n 'font',\n 'preset',\n 'hide',\n 'whiteSpace',\n 'opacity',\n 'transition',\n 'gridArea',\n 'order',\n 'gridColumn',\n 'gridRow',\n 'placeSelf',\n 'alignSelf',\n 'justifySelf',\n 'zIndex',\n 'margin',\n 'inset',\n 'position',\n 'padding',\n 'overflow',\n 'scrollbar',\n 'textAlign',\n 'border',\n 'radius',\n 'shadow',\n 'outline',\n 'color',\n 'fill',\n 'svgFill',\n 'fade',\n 'image',\n 'textTransform',\n 'fontWeight',\n 'fontStyle',\n 'width',\n 'height',\n 'flexBasis',\n 'flexGrow',\n 'flexShrink',\n 'flex',\n 'flow',\n 'place',\n 'placeItems',\n 'placeContent',\n 'alignItems',\n 'alignContent',\n 'justifyItems',\n 'justifyContent',\n 'align',\n 'justify',\n 'gap',\n 'columnGap',\n 'rowGap',\n 'gridColumns',\n 'gridRows',\n 'gridTemplate',\n 'gridAreas',\n 'recipe',\n 'textOverflow',\n 'textDecoration',\n 'animation',\n 'cursor',\n 'pointerEvents',\n 'userSelect',\n 'transform',\n 'transformOrigin',\n 'filter',\n 'backdropFilter',\n 'mixBlendMode',\n 'objectFit',\n 'objectPosition',\n 'resize',\n 'appearance',\n 'listStyle',\n 'listStyleType',\n 'content',\n 'boxSizing',\n 'verticalAlign',\n 'wordBreak',\n 'overflowWrap',\n 'hyphens',\n 'tabSize',\n 'direction',\n 'unicodeBidi',\n 'writingMode',\n 'lineClamp',\n 'aspectRatio',\n 'contain',\n 'container',\n 'containerType',\n 'containerName',\n 'interpolateSize',\n 'willChange',\n 'isolation',\n 'touchAction',\n 'scrollBehavior',\n 'scrollSnapType',\n 'scrollSnapAlign',\n 'caretColor',\n 'accentColor',\n 'colorScheme',\n // Physical scroll shorthands: tasty v3.8 gave `scrollPadding` its own\n // directional handler alongside the `scrollMargin` one, so both take the\n // padding vocabulary (modifiers, `true`, one value per directional group).\n 'scrollMargin',\n 'scrollPadding',\n ...LOGICAL_STYLES,\n]);\n\n/**\n * Special top-level keys that are valid but not regular style properties.\n *\n * These match the real CSS at-rule names Tasty emits, so they are kebab-case.\n */\nexport const SPECIAL_STYLE_KEYS = new Set([\n '@keyframes',\n '@property',\n '@font-face',\n '@counter-style',\n '@function',\n]);\n\n/**\n * At-rule style keys renamed in Tasty v3, mapped old spelling -> new.\n *\n * The v2 spellings were camelCase; v3 uses the CSS at-rule names Tasty already\n * emitted. Reported (and auto-fixed) so upgrading is mechanical.\n */\nexport const RENAMED_SPECIAL_STYLE_KEYS: Record<string, string> = {\n '@properties': '@property',\n '@fontFace': '@font-face',\n '@counterStyle': '@counter-style',\n};\n\n/**\n * CSS property names, camelCase, derived from `known-css-properties` — the\n * MDN/W3C-sourced dataset stylelint uses for `property-no-unknown`.\n *\n * Generated. Run `pnpm generate:css-properties` after bumping the dataset rather\n * than editing this list; `constants.css-properties.test.ts` fails on drift.\n *\n * Tasty renders any camelCase style key straight through to its kebab-case CSS\n * declaration (`maskSize` -> `mask-size`), so anything absent here is a false\n * positive from `known-property` on valid CSS — which is why the list is derived\n * from data instead of maintained by hand.\n *\n * The dataset also carries at-rule descriptors (`src`, `prefix`, `syntax`,\n * `symbols`), which stylelint keeps. They are left out here: a style rule cannot\n * declare them, so as style keys they render declarations browsers drop, and as\n * JSX props (`<NumberInput prefix=\"$\" />`) they would be read as style values.\n * `@webref/css` says which names are descriptors only; one that is also a\n * property (`fontWeight`, `speakAs`, `size`) stays. Inside an at-rule block\n * nothing validates them: `known-property` exempts every `@`-prefixed key and\n * does not descend.\n */\nconst DATASET_CSS_PROPERTIES = [\n 'accelerator',\n 'accentColor',\n 'alignContent',\n 'alignItems',\n 'alignSelf',\n 'alignmentBaseline',\n 'all',\n 'alt',\n 'anchorName',\n 'anchorScope',\n 'animation',\n 'animationComposition',\n 'animationDelay',\n 'animationDirection',\n 'animationDuration',\n 'animationFillMode',\n 'animationIterationCount',\n 'animationName',\n 'animationPlayState',\n 'animationRange',\n 'animationRangeEnd',\n 'animationRangeStart',\n 'animationTimeline',\n 'animationTimingFunction',\n 'animationTrigger',\n 'animationTriggerBehavior',\n 'animationTriggerExitRange',\n 'animationTriggerExitRangeEnd',\n 'animationTriggerExitRangeStart',\n 'animationTriggerRange',\n 'animationTriggerRangeEnd',\n 'animationTriggerRangeStart',\n 'animationTriggerTimeline',\n 'appRegion',\n 'appearance',\n 'aspectRatio',\n 'audioLevel',\n 'azimuth',\n 'backdropFilter',\n 'backfaceVisibility',\n 'background',\n 'backgroundAttachment',\n 'backgroundBlendMode',\n 'backgroundClip',\n 'backgroundColor',\n 'backgroundImage',\n 'backgroundOrigin',\n 'backgroundPosition',\n 'backgroundPositionX',\n 'backgroundPositionY',\n 'backgroundRepeat',\n 'backgroundRepeatX',\n 'backgroundRepeatY',\n 'backgroundSize',\n 'baselineShift',\n 'baselineSource',\n 'behavior',\n 'blockEllipsis',\n 'blockSize',\n 'blockStep',\n 'blockStepAlign',\n 'blockStepInsert',\n 'blockStepRound',\n 'blockStepSize',\n 'bookmarkLabel',\n 'bookmarkLevel',\n 'bookmarkState',\n 'border',\n 'borderBlock',\n 'borderBlockColor',\n 'borderBlockEnd',\n 'borderBlockEndColor',\n 'borderBlockEndStyle',\n 'borderBlockEndWidth',\n 'borderBlockStart',\n 'borderBlockStartColor',\n 'borderBlockStartStyle',\n 'borderBlockStartWidth',\n 'borderBlockStyle',\n 'borderBlockWidth',\n 'borderBottom',\n 'borderBottomColor',\n 'borderBottomLeftRadius',\n 'borderBottomRightRadius',\n 'borderBottomStyle',\n 'borderBottomWidth',\n 'borderBoundary',\n 'borderCollapse',\n 'borderColor',\n 'borderEndEndRadius',\n 'borderEndStartRadius',\n 'borderImage',\n 'borderImageOutset',\n 'borderImageRepeat',\n 'borderImageSlice',\n 'borderImageSource',\n 'borderImageWidth',\n 'borderInline',\n 'borderInlineColor',\n 'borderInlineEnd',\n 'borderInlineEndColor',\n 'borderInlineEndStyle',\n 'borderInlineEndWidth',\n 'borderInlineStart',\n 'borderInlineStartColor',\n 'borderInlineStartStyle',\n 'borderInlineStartWidth',\n 'borderInlineStyle',\n 'borderInlineWidth',\n 'borderLeft',\n 'borderLeftColor',\n 'borderLeftStyle',\n 'borderLeftWidth',\n 'borderRadius',\n 'borderRight',\n 'borderRightColor',\n 'borderRightStyle',\n 'borderRightWidth',\n 'borderSpacing',\n 'borderStartEndRadius',\n 'borderStartStartRadius',\n 'borderStyle',\n 'borderTop',\n 'borderTopColor',\n 'borderTopLeftRadius',\n 'borderTopRightRadius',\n 'borderTopStyle',\n 'borderTopWidth',\n 'borderWidth',\n 'bottom',\n 'boxDecorationBreak',\n 'boxShadow',\n 'boxSizing',\n 'boxSnap',\n 'breakAfter',\n 'breakBefore',\n 'breakInside',\n 'bufferedRendering',\n 'captionSide',\n 'caret',\n 'caretAnimation',\n 'caretColor',\n 'caretShape',\n 'chains',\n 'clear',\n 'clip',\n 'clipPath',\n 'clipRule',\n 'color',\n 'colorAdjust',\n 'colorInterpolation',\n 'colorInterpolationFilters',\n 'colorProfile',\n 'colorRendering',\n 'colorScheme',\n 'columnCount',\n 'columnFill',\n 'columnGap',\n 'columnHeight',\n 'columnProgression',\n 'columnRule',\n 'columnRuleBreak',\n 'columnRuleColor',\n 'columnRuleOutset',\n 'columnRuleStyle',\n 'columnRuleWidth',\n 'columnSpan',\n 'columnWidth',\n 'columnWrap',\n 'columns',\n 'contain',\n 'containIntrinsicBlockSize',\n 'containIntrinsicHeight',\n 'containIntrinsicInlineSize',\n 'containIntrinsicSize',\n 'containIntrinsicWidth',\n 'container',\n 'containerName',\n 'containerType',\n 'content',\n 'contentVisibility',\n 'continue',\n 'counterIncrement',\n 'counterReset',\n 'counterSet',\n 'cue',\n 'cueAfter',\n 'cueBefore',\n 'cursor',\n 'cx',\n 'cy',\n 'd',\n 'direction',\n 'display',\n 'displayAlign',\n 'dominantBaseline',\n 'dynamicRangeLimit',\n 'elevation',\n 'emptyCells',\n 'enableBackground',\n 'epubCaptionSide',\n 'epubHyphens',\n 'epubTextCombine',\n 'epubTextEmphasis',\n 'epubTextEmphasisColor',\n 'epubTextEmphasisStyle',\n 'epubTextOrientation',\n 'epubTextTransform',\n 'epubWordBreak',\n 'epubWritingMode',\n 'fieldSizing',\n 'fill',\n 'fillBreak',\n 'fillColor',\n 'fillImage',\n 'fillOpacity',\n 'fillOrigin',\n 'fillPosition',\n 'fillRepeat',\n 'fillRule',\n 'fillSize',\n 'filter',\n 'flex',\n 'flexBasis',\n 'flexDirection',\n 'flexFlow',\n 'flexGrow',\n 'flexShrink',\n 'flexWrap',\n 'float',\n 'floatDefer',\n 'floatOffset',\n 'floatReference',\n 'floodColor',\n 'floodOpacity',\n 'flow',\n 'flowFrom',\n 'flowInto',\n 'font',\n 'fontFamily',\n 'fontFeatureSettings',\n 'fontKerning',\n 'fontLanguageOverride',\n 'fontOpticalSizing',\n 'fontPalette',\n 'fontSize',\n 'fontSizeAdjust',\n 'fontStretch',\n 'fontStyle',\n 'fontSynthesis',\n 'fontSynthesisPosition',\n 'fontSynthesisSmallCaps',\n 'fontSynthesisStyle',\n 'fontSynthesisWeight',\n 'fontVariant',\n 'fontVariantAlternates',\n 'fontVariantCaps',\n 'fontVariantEastAsian',\n 'fontVariantEmoji',\n 'fontVariantLigatures',\n 'fontVariantNumeric',\n 'fontVariantPosition',\n 'fontVariationSettings',\n 'fontWeight',\n 'fontWidth',\n 'footnoteDisplay',\n 'footnotePolicy',\n 'forcedColorAdjust',\n 'gap',\n 'glyphOrientationHorizontal',\n 'glyphOrientationVertical',\n 'grid',\n 'gridArea',\n 'gridAutoColumns',\n 'gridAutoFlow',\n 'gridAutoRows',\n 'gridColumn',\n 'gridColumnEnd',\n 'gridColumnGap',\n 'gridColumnStart',\n 'gridGap',\n 'gridRow',\n 'gridRowEnd',\n 'gridRowGap',\n 'gridRowStart',\n 'gridTemplate',\n 'gridTemplateAreas',\n 'gridTemplateColumns',\n 'gridTemplateRows',\n 'hangingPunctuation',\n 'height',\n 'hyphenateCharacter',\n 'hyphenateLimitChars',\n 'hyphenateLimitLast',\n 'hyphenateLimitLines',\n 'hyphenateLimitZone',\n 'hyphens',\n 'imageOrientation',\n 'imageRendering',\n 'imageResolution',\n 'imeMode',\n 'initialLetter',\n 'initialLetterAlign',\n 'initialLetterWrap',\n 'inlineSize',\n 'inlineSizing',\n 'inputFormat',\n 'inputSecurity',\n 'inset',\n 'insetArea',\n 'insetBlock',\n 'insetBlockEnd',\n 'insetBlockStart',\n 'insetInline',\n 'insetInlineEnd',\n 'insetInlineStart',\n 'interactivity',\n 'interpolateSize',\n 'isolation',\n 'itemCross',\n 'itemDirection',\n 'itemFlow',\n 'itemPack',\n 'itemSlack',\n 'itemTrack',\n 'itemWrap',\n 'justifyContent',\n 'justifyItems',\n 'justifySelf',\n 'kerning',\n 'layoutFlow',\n 'layoutGrid',\n 'layoutGridChar',\n 'layoutGridLine',\n 'layoutGridMode',\n 'layoutGridType',\n 'left',\n 'letterSpacing',\n 'lightingColor',\n 'lineBreak',\n 'lineClamp',\n 'lineFitEdge',\n 'lineGrid',\n 'lineHeight',\n 'lineHeightStep',\n 'lineIncrement',\n 'linePadding',\n 'lineSnap',\n 'listStyle',\n 'listStyleImage',\n 'listStylePosition',\n 'listStyleType',\n 'margin',\n 'marginBlock',\n 'marginBlockEnd',\n 'marginBlockStart',\n 'marginBottom',\n 'marginBreak',\n 'marginInline',\n 'marginInlineEnd',\n 'marginInlineStart',\n 'marginLeft',\n 'marginRight',\n 'marginTop',\n 'marginTrim',\n 'marker',\n 'markerEnd',\n 'markerKnockoutLeft',\n 'markerKnockoutRight',\n 'markerMid',\n 'markerOffset',\n 'markerPattern',\n 'markerSegment',\n 'markerSide',\n 'markerStart',\n 'mask',\n 'maskBorder',\n 'maskBorderMode',\n 'maskBorderOutset',\n 'maskBorderRepeat',\n 'maskBorderSlice',\n 'maskBorderSource',\n 'maskBorderWidth',\n 'maskClip',\n 'maskComposite',\n 'maskImage',\n 'maskMode',\n 'maskOrigin',\n 'maskPosition',\n 'maskPositionX',\n 'maskPositionY',\n 'maskRepeat',\n 'maskSize',\n 'maskSourceType',\n 'maskType',\n 'mathDepth',\n 'mathShift',\n 'mathStyle',\n 'maxBlockSize',\n 'maxHeight',\n 'maxInlineSize',\n 'maxLines',\n 'maxWidth',\n 'maxZoom',\n 'minBlockSize',\n 'minHeight',\n 'minInlineSize',\n 'minIntrinsicSizing',\n 'minWidth',\n 'minZoom',\n 'mixBlendMode',\n 'motion',\n 'motionOffset',\n 'motionPath',\n 'motionRotation',\n 'navDown',\n 'navIndex',\n 'navLeft',\n 'navRight',\n 'navUp',\n 'objectFit',\n 'objectPosition',\n 'objectViewBox',\n 'offset',\n 'offsetAnchor',\n 'offsetBlockEnd',\n 'offsetBlockStart',\n 'offsetDistance',\n 'offsetInlineEnd',\n 'offsetInlineStart',\n 'offsetPath',\n 'offsetPosition',\n 'offsetRotate',\n 'offsetRotation',\n 'opacity',\n 'order',\n 'orphans',\n 'outline',\n 'outlineColor',\n 'outlineOffset',\n 'outlineStyle',\n 'outlineWidth',\n 'overflow',\n 'overflowAnchor',\n 'overflowBlock',\n 'overflowClipMargin',\n 'overflowClipMarginBlock',\n 'overflowClipMarginBlockEnd',\n 'overflowClipMarginBlockStart',\n 'overflowClipMarginBottom',\n 'overflowClipMarginInline',\n 'overflowClipMarginInlineEnd',\n 'overflowClipMarginInlineStart',\n 'overflowClipMarginLeft',\n 'overflowClipMarginRight',\n 'overflowClipMarginTop',\n 'overflowInline',\n 'overflowWrap',\n 'overflowX',\n 'overflowY',\n 'overlay',\n 'overscrollBehavior',\n 'overscrollBehaviorBlock',\n 'overscrollBehaviorInline',\n 'overscrollBehaviorX',\n 'overscrollBehaviorY',\n 'padding',\n 'paddingBlock',\n 'paddingBlockEnd',\n 'paddingBlockStart',\n 'paddingBottom',\n 'paddingInline',\n 'paddingInlineEnd',\n 'paddingInlineStart',\n 'paddingLeft',\n 'paddingRight',\n 'paddingTop',\n 'page',\n 'pageBreakAfter',\n 'pageBreakBefore',\n 'pageBreakInside',\n 'paintOrder',\n 'pause',\n 'pauseAfter',\n 'pauseBefore',\n 'penAction',\n 'perspective',\n 'perspectiveOrigin',\n 'perspectiveOriginX',\n 'perspectiveOriginY',\n 'pitch',\n 'pitchRange',\n 'placeContent',\n 'placeItems',\n 'placeSelf',\n 'playDuring',\n 'pointerEvents',\n 'position',\n 'positionAnchor',\n 'positionArea',\n 'positionTry',\n 'positionTryFallbacks',\n 'positionTryOptions',\n 'positionTryOrder',\n 'positionVisibility',\n 'printColorAdjust',\n 'propertyName',\n 'quotes',\n 'r',\n 'readingFlow',\n 'readingOrder',\n 'regionFragment',\n 'resize',\n 'rest',\n 'restAfter',\n 'restBefore',\n 'richness',\n 'right',\n 'rotate',\n 'rowGap',\n 'rowRule',\n 'rowRuleBreak',\n 'rowRuleColor',\n 'rowRuleOutset',\n 'rowRuleStyle',\n 'rowRuleWidth',\n 'rubyAlign',\n 'rubyMerge',\n 'rubyOverhang',\n 'rubyPosition',\n 'rule',\n 'ruleBreak',\n 'ruleColor',\n 'ruleOutset',\n 'rulePaintOrder',\n 'ruleStyle',\n 'ruleWidth',\n 'running',\n 'rx',\n 'ry',\n 'scale',\n 'scrollBehavior',\n 'scrollInitialTarget',\n 'scrollMargin',\n 'scrollMarginBlock',\n 'scrollMarginBlockEnd',\n 'scrollMarginBlockStart',\n 'scrollMarginBottom',\n 'scrollMarginInline',\n 'scrollMarginInlineEnd',\n 'scrollMarginInlineStart',\n 'scrollMarginLeft',\n 'scrollMarginRight',\n 'scrollMarginTop',\n 'scrollMarkerGroup',\n 'scrollPadding',\n 'scrollPaddingBlock',\n 'scrollPaddingBlockEnd',\n 'scrollPaddingBlockStart',\n 'scrollPaddingBottom',\n 'scrollPaddingInline',\n 'scrollPaddingInlineEnd',\n 'scrollPaddingInlineStart',\n 'scrollPaddingLeft',\n 'scrollPaddingRight',\n 'scrollPaddingTop',\n 'scrollSnapAlign',\n 'scrollSnapCoordinate',\n 'scrollSnapDestination',\n 'scrollSnapMargin',\n 'scrollSnapMarginBottom',\n 'scrollSnapMarginLeft',\n 'scrollSnapMarginRight',\n 'scrollSnapMarginTop',\n 'scrollSnapPointsX',\n 'scrollSnapPointsY',\n 'scrollSnapStop',\n 'scrollSnapType',\n 'scrollSnapTypeX',\n 'scrollSnapTypeY',\n 'scrollStartTarget',\n 'scrollTargetGroup',\n 'scrollTimeline',\n 'scrollTimelineAxis',\n 'scrollTimelineName',\n 'scrollbar3dLightColor',\n 'scrollbar3dlightColor',\n 'scrollbarArrowColor',\n 'scrollbarBaseColor',\n 'scrollbarColor',\n 'scrollbarDarkShadowColor',\n 'scrollbarDarkshadowColor',\n 'scrollbarFaceColor',\n 'scrollbarGutter',\n 'scrollbarHighlightColor',\n 'scrollbarShadowColor',\n 'scrollbarTrackColor',\n 'scrollbarWidth',\n 'shapeImageThreshold',\n 'shapeInside',\n 'shapeMargin',\n 'shapeOutside',\n 'shapeRendering',\n 'size',\n 'sliderOrientation',\n 'snapHeight',\n 'solidColor',\n 'solidOpacity',\n 'spatialNavigationAction',\n 'spatialNavigationContain',\n 'spatialNavigationFunction',\n 'speak',\n 'speakAs',\n 'speakHeader',\n 'speakNumeral',\n 'speakPunctuation',\n 'speechRate',\n 'stopColor',\n 'stopOpacity',\n 'stress',\n 'stringSet',\n 'stroke',\n 'strokeAlign',\n 'strokeAlignment',\n 'strokeBreak',\n 'strokeColor',\n 'strokeDashCorner',\n 'strokeDashJustify',\n 'strokeDashadjust',\n 'strokeDasharray',\n 'strokeDashcorner',\n 'strokeDashoffset',\n 'strokeImage',\n 'strokeLinecap',\n 'strokeLinejoin',\n 'strokeMiterlimit',\n 'strokeOpacity',\n 'strokeOrigin',\n 'strokePosition',\n 'strokeRepeat',\n 'strokeSize',\n 'strokeWidth',\n 'supportedColorSchemes',\n 'tabSize',\n 'tableLayout',\n 'textAlign',\n 'textAlignAll',\n 'textAlignLast',\n 'textAnchor',\n 'textAutospace',\n 'textBox',\n 'textBoxEdge',\n 'textBoxTrim',\n 'textCombineUpright',\n 'textDecoration',\n 'textDecorationBlink',\n 'textDecorationColor',\n 'textDecorationLine',\n 'textDecorationLineThrough',\n 'textDecorationNone',\n 'textDecorationOverline',\n 'textDecorationSkip',\n 'textDecorationSkipBox',\n 'textDecorationSkipInk',\n 'textDecorationSkipInset',\n 'textDecorationSkipSelf',\n 'textDecorationSkipSpaces',\n 'textDecorationStyle',\n 'textDecorationThickness',\n 'textDecorationTrim',\n 'textDecorationUnderline',\n 'textEmphasis',\n 'textEmphasisColor',\n 'textEmphasisPosition',\n 'textEmphasisSkip',\n 'textEmphasisStyle',\n 'textGroupAlign',\n 'textIndent',\n 'textJustify',\n 'textJustifyTrim',\n 'textKashida',\n 'textKashidaSpace',\n 'textLineThrough',\n 'textLineThroughColor',\n 'textLineThroughMode',\n 'textLineThroughStyle',\n 'textLineThroughWidth',\n 'textOrientation',\n 'textOverflow',\n 'textOverline',\n 'textOverlineColor',\n 'textOverlineMode',\n 'textOverlineStyle',\n 'textOverlineWidth',\n 'textRendering',\n 'textShadow',\n 'textSizeAdjust',\n 'textSpacing',\n 'textSpacingTrim',\n 'textTransform',\n 'textUnderline',\n 'textUnderlineColor',\n 'textUnderlineMode',\n 'textUnderlineOffset',\n 'textUnderlinePosition',\n 'textUnderlineStyle',\n 'textUnderlineWidth',\n 'textWrap',\n 'textWrapMode',\n 'textWrapStyle',\n 'timelineScope',\n 'top',\n 'touchAction',\n 'touchActionDelay',\n 'transform',\n 'transformBox',\n 'transformOrigin',\n 'transformOriginX',\n 'transformOriginY',\n 'transformOriginZ',\n 'transformStyle',\n 'transition',\n 'transitionBehavior',\n 'transitionDelay',\n 'transitionDuration',\n 'transitionProperty',\n 'transitionTimingFunction',\n 'translate',\n 'ucAltSkin',\n 'ucSkin',\n 'unicodeBidi',\n 'userSelect',\n 'userZoom',\n 'vectorEffect',\n 'verticalAlign',\n 'viewTimeline',\n 'viewTimelineAxis',\n 'viewTimelineInset',\n 'viewTimelineName',\n 'viewTransitionClass',\n 'viewTransitionGroup',\n 'viewTransitionName',\n 'viewportFill',\n 'viewportFillOpacity',\n 'viewportFit',\n 'visibility',\n 'voiceBalance',\n 'voiceDuration',\n 'voiceFamily',\n 'voicePitch',\n 'voiceRange',\n 'voiceRate',\n 'voiceStress',\n 'voiceVolume',\n 'volume',\n 'whiteSpace',\n 'whiteSpaceCollapse',\n 'whiteSpaceTrim',\n 'widows',\n 'width',\n 'willChange',\n 'wordBreak',\n 'wordSpaceTransform',\n 'wordSpacing',\n 'wordWrap',\n 'wrapAfter',\n 'wrapBefore',\n 'wrapFlow',\n 'wrapInside',\n 'wrapThrough',\n 'writingMode',\n 'x',\n 'y',\n 'zIndex',\n 'zoom',\n];\n\n/**\n * Properties that ship in browsers or sit in a spec, but have not landed in\n * `known-css-properties` yet. Hand-maintained, and pruned as the dataset catches\n * up — the guard test fails on any entry the dataset already covers.\n */\nexport const EMERGING_CSS_PROPERTIES = [\n // CSS Borders and Box Decorations 4 — squircles and notched corners, shipped in\n // Chromium 139.\n 'cornerShape',\n 'cornerTopShape',\n 'cornerRightShape',\n 'cornerBottomShape',\n 'cornerLeftShape',\n 'cornerBlockStartShape',\n 'cornerBlockEndShape',\n 'cornerInlineStartShape',\n 'cornerInlineEndShape',\n 'cornerTopLeftShape',\n 'cornerTopRightShape',\n 'cornerBottomRightShape',\n 'cornerBottomLeftShape',\n 'cornerStartStartShape',\n 'cornerStartEndShape',\n 'cornerEndStartShape',\n 'cornerEndEndShape',\n];\n\n/**\n * Every CSS property `known-property` accepts as a camelCase style key.\n */\nexport const KNOWN_CSS_PROPERTIES = new Set([\n ...DATASET_CSS_PROPERTIES,\n ...EMERGING_CSS_PROPERTIES,\n]);\n\n/**\n * Built-in custom units recognized by the tasty parser.\n */\nexport const BUILT_IN_UNITS = new Set(['x', 'r', 'cr', 'bw', 'ow', 'lh', 'sf']);\n\n/**\n * Custom properties Tasty registers as default `@property` rules, so they are\n * always defined whatever the config's `tokens` list says. The scale tokens\n * match their built-in units; style handlers read the rest as bare `var()`s\n * (`radius: 'leaf'`, `preset: 'h1 / strong'`, the font fallbacks, timings).\n */\nexport const BUILT_IN_CUSTOM_PROPERTIES = new Set([\n '$gap',\n '$radius',\n '$border-width',\n '$outline-width',\n '$transition',\n '$sharp-radius',\n '$bold-font-weight',\n '$font-sans-fallback',\n '$font-mono-fallback',\n]);\n\n/**\n * Standard CSS units (always valid).\n */\nexport const CSS_UNITS = new Set([\n 'px',\n 'em',\n 'rem',\n '%',\n 'vw',\n 'vh',\n 'vmin',\n 'vmax',\n 'ch',\n 'ex',\n 'cm',\n 'mm',\n 'in',\n 'pt',\n 'pc',\n 'fr',\n 'deg',\n 'rad',\n 'turn',\n 'grad',\n 's',\n 'ms',\n 'dpi',\n 'dpcm',\n 'dppx',\n 'svw',\n 'svh',\n 'lvw',\n 'lvh',\n 'dvw',\n 'dvh',\n 'cqw',\n 'cqh',\n 'cqi',\n 'cqb',\n 'cqmin',\n 'cqmax',\n 'cap',\n 'ic',\n 'rlh',\n 'vi',\n 'vb',\n]);\n\n/**\n * Properties that accept `true` as a value (means \"use default\").\n *\n * `fill` is documented as accepting `true` but is deliberately absent: as of\n * tasty 3.8 the handler passes the boolean straight through, so `fill: true`\n * emits `background-color: true` — a declaration the browser drops, leaving no\n * background at all. Reporting it is the useful answer while that is what runs.\n * `constants.round-trip.test.ts` pins both halves of that: no property in this\n * set may swallow `true`, and `fill` still does — so whichever way tasty\n * resolves it (docs or implementation), a test says so rather than the plugin\n * quietly disagreeing with the runtime.\n */\nexport const BOOLEAN_TRUE_PROPERTIES = new Set([\n 'border',\n 'radius',\n 'padding',\n 'margin',\n 'gap',\n 'color',\n 'shadow',\n 'outline',\n 'inset',\n 'width',\n 'height',\n // `fade: true` falls back to `2x`, which follows `configure({ units })`.\n 'fade',\n 'hide',\n 'preset',\n 'font',\n 'scrollbar',\n 'scrollMargin',\n 'scrollPadding',\n // Every enhanced logical *category* carries the same design-system default as\n // its physical counterpart: `1x` for spacing and scroll edges, `0` for inset,\n // `1bw` for border, a reset for the sizes.\n //\n // The min/max size constraints are deliberately excluded, mirroring the\n // absence of `minWidth`/`maxWidth` here. The runtime does accept `true` on\n // them — they route through the same dimension handler as the axis — but what\n // it does with it is reset the whole axis: `minBlockSize: true` emits\n // `block-size: auto; min-block-size: initial; max-block-size: initial`, not a\n // default for the one constraint named. `blockSize: true` is how you ask for\n // that, so the constraint spellings stay an error, exactly as `minWidth: true`\n // already is.\n ...LOGICAL_SIZE_STYLES,\n ...LOGICAL_SPACING_STYLES,\n ...LOGICAL_BORDER_STYLES,\n]);\n\n/**\n * Directional modifiers and which properties accept them.\n */\nexport const DIRECTIONAL_MODIFIERS: Record<string, Set<string>> = {\n border: new Set(['top', 'right', 'bottom', 'left']),\n radius: new Set([\n 'top',\n 'right',\n 'bottom',\n 'left',\n 'top-left',\n 'top-right',\n 'bottom-left',\n 'bottom-right',\n ]),\n padding: new Set(['top', 'right', 'bottom', 'left']),\n margin: new Set(['top', 'right', 'bottom', 'left']),\n fade: new Set(['top', 'right', 'bottom', 'left']),\n scrollMargin: new Set(['top', 'right', 'bottom', 'left']),\n scrollPadding: new Set(['top', 'right', 'bottom', 'left']),\n inset: new Set(['top', 'right', 'bottom', 'left', 'dock']),\n // Enhanced logical styles take `start`/`end` and nothing else. Listing them\n // here is what makes a physical modifier on a logical axis — `blockPadding:\n // '1x top'`, which the handler silently drops — a report rather than silence.\n ...Object.fromEntries(\n [...LOGICAL_SPACING_STYLES, ...LOGICAL_BORDER_STYLES].map((style) => [\n style,\n new Set<string>(LOGICAL_EDGES),\n ]),\n ),\n};\n\n/**\n * Properties where a group naming directions carries exactly **one** value.\n *\n * Tasty v3 dropped the positional multi-value form for these: values and\n * modifiers are bucketed separately per comma group, so `'2x 4x top right'` and\n * `'2x top 4x right'` were the same input and the pairing depended on modifier\n * order. Per-side values now come from comma groups.\n *\n * Deliberately excludes `border` and `radius`. A `border` group legitimately\n * carries width + style + color, and a `radius` group can carry two values with\n * `leaf`/`backleaf`; neither takes the positional-per-side form, so neither is\n * subject to the rule.\n */\nexport const SINGLE_VALUE_DIRECTIONAL_PROPERTIES = new Set<string>([\n 'padding',\n 'margin',\n 'inset',\n 'scrollMargin',\n 'scrollPadding',\n 'fade',\n // The logical axis handlers bucket values and modifiers the same way, and warn\n // on a second value in a group that names an edge. `blockBorder`/`inlineBorder`\n // are excluded for the same reason `border` is: width + style + colour.\n ...LOGICAL_SPACING_STYLES,\n]);\n\n/**\n * Position names a 4-value box maps onto, in source order.\n */\nexport const BOX_SIDES = ['top', 'right', 'bottom', 'left'] as const;\nexport const BOX_CORNERS = [\n 'top-left',\n 'top-right',\n 'bottom-right',\n 'bottom-left',\n] as const;\n\nexport interface DirectionalBoxConfig {\n /**\n * The token that marks an unset position — dropping it from the shorthand\n * leaves the emitted CSS unchanged. This is the CSS initial value of the\n * longhand, which is not always `0`: `inset` initialises to `auto`, so a `0`\n * there is a real offset the shorthand must not drop.\n */\n identity: string;\n /** Modifier names for each of the four positions, in source order. */\n positions: readonly string[];\n /**\n * Whether `eslint --fix` may apply the rewrite. False when the rewrite is\n * still an improvement but changes what the browser renders, so a human has\n * to opt in.\n */\n fixable: boolean;\n /**\n * Set when the 4-value form is not interpreted per-position at all, so the\n * current output is wrong rather than merely verbose. Surfaced in the report.\n */\n note?: string;\n}\n\n/**\n * Properties whose 4-value box syntax has a directional-shorthand equivalent.\n *\n * `radius` uses corner names rather than sides: a directional modifier\n * addresses the corner *pair* along an edge, so only `top-left` & co. can\n * express a single corner (requires `@tenphi/tasty` >= 2.10).\n */\nexport const DIRECTIONAL_BOX: Record<string, DirectionalBoxConfig> = {\n margin: { identity: '0', positions: BOX_SIDES, fixable: true },\n padding: { identity: '0', positions: BOX_SIDES, fixable: true },\n inset: { identity: 'auto', positions: BOX_SIDES, fixable: true },\n radius: { identity: '0', positions: BOX_CORNERS, fixable: true },\n fade: { identity: '0', positions: BOX_SIDES, fixable: true },\n // Four `border` tokens parse as a single border value (width/style/color),\n // not as a box: `border: '0 0 1bw 0'` emits `border: 0 solid …` — no border\n // on any side. The directional form is what the author meant, but applying\n // it changes rendering, so it stays a manual fix.\n border: {\n identity: '0',\n positions: BOX_SIDES,\n fixable: false,\n note: 'four border tokens parse as one border value, so the current style sets no border at all',\n },\n};\n\n/**\n * Properties that support a `dock` modifier — pin one edge and span its full\n * length. Lets a 4-value box with a single `identity` side collapse, e.g.\n * `inset: 'auto 0 0 0'` -> `inset: '0 bottom dock'`.\n * Requires `@tenphi/tasty` >= 2.10.\n */\nexport const DOCK_PROPERTIES = new Set(['inset']);\n\n/**\n * Valid radius shape keywords.\n */\nexport const RADIUS_SHAPES = new Set(['round', 'ellipse', 'leaf', 'backleaf']);\n\n/**\n * Known semantic transition names — the keys of Tasty's transition map, plus\n * `zIndex`, which Tasty compiles to `z-index`. Any other name is emitted\n * verbatim as a CSS property.\n */\nexport const SEMANTIC_TRANSITIONS = new Set([\n 'fade',\n 'fill',\n 'border',\n 'radius',\n 'shadow',\n 'preset',\n 'gap',\n 'theme',\n 'color',\n 'outline',\n 'inset',\n 'text',\n 'opacity',\n 'translate',\n 'rotate',\n 'scale',\n 'filter',\n 'image',\n 'background',\n 'width',\n 'height',\n 'zIndex',\n]);\n\n/**\n * Mapping of native CSS properties to tasty shorthand alternatives.\n */\nexport const SHORTHAND_MAPPING: Record<\n string,\n { property: string; hint: string; safeFix?: boolean }\n> = {\n backgroundColor: { property: 'fill', hint: \"fill: '...'\", safeFix: true },\n borderColor: { property: 'border', hint: \"border: '...'\" },\n borderWidth: { property: 'border', hint: \"border: '...'\" },\n borderStyle: { property: 'border', hint: \"border: '...'\" },\n borderTop: { property: 'border', hint: \"border: '... top'\" },\n borderRight: { property: 'border', hint: \"border: '... right'\" },\n borderBottom: { property: 'border', hint: \"border: '... bottom'\" },\n borderLeft: { property: 'border', hint: \"border: '... left'\" },\n borderRadius: { property: 'radius', hint: \"radius: '...'\", safeFix: true },\n maxWidth: { property: 'width', hint: \"width: 'max ...'\" },\n minWidth: { property: 'width', hint: \"width: 'min ...'\" },\n maxHeight: { property: 'height', hint: \"height: 'max ...'\" },\n minHeight: { property: 'height', hint: \"height: 'min ...'\" },\n flexDirection: { property: 'flow', hint: \"flow: '...'\" },\n flexWrap: { property: 'flow', hint: \"flow: '...'\" },\n flexFlow: { property: 'flow', hint: \"flow: '...'\" },\n gridAutoFlow: { property: 'flow', hint: \"flow: '...'\" },\n outlineOffset: { property: 'outline', hint: \"outline: '... / offset'\" },\n paddingTop: { property: 'padding', hint: \"padding: '... top'\" },\n paddingRight: { property: 'padding', hint: \"padding: '... right'\" },\n paddingBottom: { property: 'padding', hint: \"padding: '... bottom'\" },\n paddingLeft: { property: 'padding', hint: \"padding: '... left'\" },\n marginTop: { property: 'margin', hint: \"margin: '... top'\" },\n marginRight: { property: 'margin', hint: \"margin: '... right'\" },\n marginBottom: { property: 'margin', hint: \"margin: '... bottom'\" },\n marginLeft: { property: 'margin', hint: \"margin: '... left'\" },\n fontSize: { property: 'preset', hint: \"preset: '...'\" },\n fontWeight: {\n property: 'preset',\n hint: \"preset: 'name / strong' (with strong modifier)\",\n },\n lineHeight: {\n property: 'preset',\n hint: \"preset: 'name / tight' (with tight modifier)\",\n },\n boxShadow: { property: 'shadow', hint: \"shadow: '...'\" },\n backgroundImage: { property: 'image', hint: \"image: '...'\" },\n fontFamily: { property: 'font', hint: \"font: '...'\" },\n fontStyle: {\n property: 'preset',\n hint: \"preset: 'name / italic' (with italic modifier)\",\n },\n letterSpacing: { property: 'preset', hint: \"preset: '...'\" },\n textTransform: { property: 'preset', hint: \"preset: '...'\" },\n flexGap: { property: 'gap', hint: \"gap: '...'\" },\n scrollbarWidth: { property: 'scrollbar', hint: \"scrollbar: '...'\" },\n scrollbarColor: { property: 'scrollbar', hint: \"scrollbar: '...'\" },\n scrollbarGutter: { property: 'scrollbar', hint: \"scrollbar: '...'\" },\n gridTemplateColumns: {\n property: 'gridColumns',\n hint: \"gridColumns: '...'\",\n },\n gridTemplateRows: { property: 'gridRows', hint: \"gridRows: '...'\" },\n gridTemplateAreas: { property: 'gridAreas', hint: \"gridAreas: '...'\" },\n top: { property: 'inset', hint: \"inset: '... top'\" },\n right: { property: 'inset', hint: \"inset: '... right'\" },\n bottom: { property: 'inset', hint: \"inset: '... bottom'\" },\n left: { property: 'inset', hint: \"inset: '... left'\" },\n outlineColor: { property: 'outline', hint: \"outline: '...'\" },\n outlineWidth: { property: 'outline', hint: \"outline: '...'\" },\n outlineStyle: { property: 'outline', hint: \"outline: '...'\" },\n lineClamp: {\n property: 'textOverflow',\n hint: \"textOverflow: 'ellipsis / {lines}'\",\n },\n\n // --- Native logical CSS -> the enhanced Tasty logical style. ---\n //\n // These mirror the physical rows above one for one. Tasty v3.8 moved the\n // enhanced behaviour onto `<axis><Category>` names and stopped reading the\n // native spellings in its handlers, so `paddingBlock` is now a plain CSS\n // declaration with no category default: the rename is the same advice as\n // `paddingTop` -> `padding: '... top'`, not a new opinion.\n //\n // Only the axis shorthands carry `safeFix`. `paddingBlock: '1x 2x'` and\n // `blockPadding: '1x 2x'` both emit `padding-block: 1x 2x`, so the key rename\n // is the whole edit — `constants.round-trip.test.ts` asserts that against the\n // installed runtime rather than trusting this comment. An edge longhand needs\n // a `start`/`end` modifier added to the value, and a `border-*` rename also\n // gains the style/colour defaults `border-block` never had (`border-block:\n // 1bw` renders nothing at all), so those stay report-only.\n //\n // These renames are why the `@tenphi/tasty` peer floor is 3.8.0. The plugin\n // never imports tasty, so its constants are fixed at publish time and cannot\n // adapt to the consumer's version: on 3.7 and below `blockPadding` is not a\n // style tasty knows, and an unhandled camelCase key renders straight through\n // to `block-padding`, which the browser drops. The fix would silently delete\n // the padding, so the floor is the only thing standing between that and a\n // consumer — recognising the logical names is harmless on an older tasty\n // (a missed warning), but rewriting *to* them is not.\n paddingBlock: {\n property: 'blockPadding',\n hint: \"blockPadding: '...'\",\n safeFix: true,\n },\n paddingBlockStart: {\n property: 'blockPadding',\n hint: \"blockPadding: '... start'\",\n },\n paddingBlockEnd: {\n property: 'blockPadding',\n hint: \"blockPadding: '... end'\",\n },\n paddingInline: {\n property: 'inlinePadding',\n hint: \"inlinePadding: '...'\",\n safeFix: true,\n },\n paddingInlineStart: {\n property: 'inlinePadding',\n hint: \"inlinePadding: '... start'\",\n },\n paddingInlineEnd: {\n property: 'inlinePadding',\n hint: \"inlinePadding: '... end'\",\n },\n marginBlock: {\n property: 'blockMargin',\n hint: \"blockMargin: '...'\",\n safeFix: true,\n },\n marginBlockStart: {\n property: 'blockMargin',\n hint: \"blockMargin: '... start'\",\n },\n marginBlockEnd: { property: 'blockMargin', hint: \"blockMargin: '... end'\" },\n marginInline: {\n property: 'inlineMargin',\n hint: \"inlineMargin: '...'\",\n safeFix: true,\n },\n marginInlineStart: {\n property: 'inlineMargin',\n hint: \"inlineMargin: '... start'\",\n },\n marginInlineEnd: {\n property: 'inlineMargin',\n hint: \"inlineMargin: '... end'\",\n },\n insetBlock: {\n property: 'blockInset',\n hint: \"blockInset: '...'\",\n safeFix: true,\n },\n insetBlockStart: { property: 'blockInset', hint: \"blockInset: '... start'\" },\n insetBlockEnd: { property: 'blockInset', hint: \"blockInset: '... end'\" },\n insetInline: {\n property: 'inlineInset',\n hint: \"inlineInset: '...'\",\n safeFix: true,\n },\n insetInlineStart: {\n property: 'inlineInset',\n hint: \"inlineInset: '... start'\",\n },\n insetInlineEnd: { property: 'inlineInset', hint: \"inlineInset: '... end'\" },\n scrollMarginBlock: {\n property: 'blockScrollMargin',\n hint: \"blockScrollMargin: '...'\",\n safeFix: true,\n },\n scrollMarginBlockStart: {\n property: 'blockScrollMargin',\n hint: \"blockScrollMargin: '... start'\",\n },\n scrollMarginBlockEnd: {\n property: 'blockScrollMargin',\n hint: \"blockScrollMargin: '... end'\",\n },\n scrollMarginInline: {\n property: 'inlineScrollMargin',\n hint: \"inlineScrollMargin: '...'\",\n safeFix: true,\n },\n scrollMarginInlineStart: {\n property: 'inlineScrollMargin',\n hint: \"inlineScrollMargin: '... start'\",\n },\n scrollMarginInlineEnd: {\n property: 'inlineScrollMargin',\n hint: \"inlineScrollMargin: '... end'\",\n },\n scrollPaddingBlock: {\n property: 'blockScrollPadding',\n hint: \"blockScrollPadding: '...'\",\n safeFix: true,\n },\n scrollPaddingBlockStart: {\n property: 'blockScrollPadding',\n hint: \"blockScrollPadding: '... start'\",\n },\n scrollPaddingBlockEnd: {\n property: 'blockScrollPadding',\n hint: \"blockScrollPadding: '... end'\",\n },\n scrollPaddingInline: {\n property: 'inlineScrollPadding',\n hint: \"inlineScrollPadding: '...'\",\n safeFix: true,\n },\n scrollPaddingInlineStart: {\n property: 'inlineScrollPadding',\n hint: \"inlineScrollPadding: '... start'\",\n },\n scrollPaddingInlineEnd: {\n property: 'inlineScrollPadding',\n hint: \"inlineScrollPadding: '... end'\",\n },\n borderBlock: { property: 'blockBorder', hint: \"blockBorder: '...'\" },\n borderBlockColor: { property: 'blockBorder', hint: \"blockBorder: '...'\" },\n borderBlockWidth: { property: 'blockBorder', hint: \"blockBorder: '...'\" },\n borderBlockStyle: { property: 'blockBorder', hint: \"blockBorder: '...'\" },\n borderBlockStart: {\n property: 'blockBorder',\n hint: \"blockBorder: '... start'\",\n },\n borderBlockEnd: { property: 'blockBorder', hint: \"blockBorder: '... end'\" },\n borderInline: { property: 'inlineBorder', hint: \"inlineBorder: '...'\" },\n borderInlineColor: { property: 'inlineBorder', hint: \"inlineBorder: '...'\" },\n borderInlineWidth: { property: 'inlineBorder', hint: \"inlineBorder: '...'\" },\n borderInlineStyle: { property: 'inlineBorder', hint: \"inlineBorder: '...'\" },\n borderInlineStart: {\n property: 'inlineBorder',\n hint: \"inlineBorder: '... start'\",\n },\n borderInlineEnd: {\n property: 'inlineBorder',\n hint: \"inlineBorder: '... end'\",\n },\n minBlockSize: { property: 'blockSize', hint: \"blockSize: 'min ...'\" },\n maxBlockSize: { property: 'blockSize', hint: \"blockSize: 'max ...'\" },\n minInlineSize: { property: 'inlineSize', hint: \"inlineSize: 'min ...'\" },\n maxInlineSize: { property: 'inlineSize', hint: \"inlineSize: 'max ...'\" },\n};\n\n/**\n * CSS shorthands whose *longhands* are the preferred Tasty form — the reverse\n * of `SHORTHAND_MAPPING`.\n *\n * `flex` is lossy in a way the longhands are not: it resets the two components\n * you did not write to values that are not their CSS initial. `flex: '0'`\n * expands to `flex-grow: 0; flex-shrink: 1; flex-basis: 0%`, so it cannot\n * express \"do not shrink\" (`flexShrink: 0`) at all, and it silently changes\n * `flex-basis`. Writing the longhands keeps each component independent, which\n * also lets them carry separate state maps.\n */\nexport const LONGHAND_MAPPING: Record<\n string,\n { longhands: string[]; hint: string }\n> = {\n flex: {\n longhands: ['flexGrow', 'flexShrink', 'flexBasis'],\n hint: 'flexGrow / flexShrink / flexBasis',\n },\n};\n\n/**\n * CSS transition property names mapped to Tasty semantic transition names.\n */\nexport const TRANSITION_SEMANTIC_MAPPING: Record<string, string> = {\n backgroundColor: 'fill',\n 'background-color': 'fill',\n backgroundImage: 'image',\n 'background-image': 'image',\n borderRadius: 'radius',\n 'border-radius': 'radius',\n borderColor: 'border',\n 'border-color': 'border',\n borderWidth: 'border',\n 'border-width': 'border',\n borderStyle: 'border',\n 'border-style': 'border',\n boxShadow: 'shadow',\n 'box-shadow': 'shadow',\n outlineColor: 'outline',\n 'outline-color': 'outline',\n outlineWidth: 'outline',\n 'outline-width': 'outline',\n outlineOffset: 'outline',\n 'outline-offset': 'outline',\n fontSize: 'preset',\n 'font-size': 'preset',\n lineHeight: 'preset',\n 'line-height': 'preset',\n letterSpacing: 'preset',\n 'letter-spacing': 'preset',\n};\n\n/**\n * Known preset modifiers, mirroring Tasty's preset handler. `normal` sets\n * `line-height: normal`.\n */\nexport const PRESET_MODIFIERS = new Set([\n 'strong',\n 'bold',\n 'italic',\n 'icon',\n 'tight',\n 'normal',\n]);\n\n/**\n * Default import sources for tasty.\n */\nexport const DEFAULT_IMPORT_SOURCES = ['@tenphi/tasty', '@tenphi/tasty/static'];\n\n/**\n * Built-in state prefixes that are always valid (not aliases).\n */\nexport const BUILT_IN_STATE_PREFIXES = new Set([\n '@media',\n '@root',\n '@parent',\n '@own',\n '@supports',\n '@starting',\n '@keyframes',\n '@property',\n '@font-face',\n '@counter-style',\n '@function',\n]);\n\n/**\n * Known CSS pseudo-classes: every standard element pseudo-class in MDN's\n * browser-compat-data (`css.selectors`), plus the Selectors Level 4 ones it\n * does not list yet (`:local-link`, `:target-within`, `:blank`, `:current`).\n * Functional pseudo-classes are listed by name, so `:dir` covers `:dir(rtl)`.\n * The `@page` pseudo-classes (`:first`, `:left`, `:right`) never match elements.\n */\nexport const KNOWN_PSEUDO_CLASSES = new Set([\n // User action\n ':hover',\n ':active',\n ':focus',\n ':focus-visible',\n ':focus-within',\n // Location\n ':any-link',\n ':link',\n ':visited',\n ':local-link',\n ':target',\n ':target-within',\n ':target-current',\n ':target-before',\n ':target-after',\n ':scope',\n // Linguistic\n ':dir',\n ':lang',\n // Input\n ':autofill',\n ':enabled',\n ':disabled',\n ':read-only',\n ':read-write',\n ':placeholder-shown',\n ':default',\n ':checked',\n ':indeterminate',\n ':blank',\n ':valid',\n ':invalid',\n ':user-valid',\n ':user-invalid',\n ':in-range',\n ':out-of-range',\n ':required',\n ':optional',\n // Element display state\n ':open',\n ':popover-open',\n ':modal',\n ':fullscreen',\n ':picture-in-picture',\n // Media resource state\n ':playing',\n ':paused',\n ':seeking',\n ':buffering',\n ':stalled',\n ':muted',\n ':volume-locked',\n // Time-dimensional\n ':current',\n ':past',\n ':future',\n // Tree-structural\n ':root',\n ':empty',\n ':first-child',\n ':last-child',\n ':only-child',\n ':first-of-type',\n ':last-of-type',\n ':only-of-type',\n ':nth-child',\n ':nth-last-child',\n ':nth-of-type',\n ':nth-last-of-type',\n ':heading',\n // Logical combinations\n ':is',\n ':not',\n ':where',\n ':has',\n // Custom elements and shadow DOM\n ':defined',\n ':state',\n ':host',\n ':host-context',\n ':has-slotted',\n // View transitions, interest invokers, navigation and WebXR\n ':active-view-transition',\n ':active-view-transition-type',\n ':interest-source',\n ':interest-target',\n ':navigation-source',\n ':xr-overlay',\n // Pseudo-elements\n '::before',\n '::after',\n '::placeholder',\n '::selection',\n '::first-line',\n '::first-letter',\n '::marker',\n '::backdrop',\n]);\n\n/**\n * Color tokens Tasty provides without any project configuration, so they are\n * always defined whatever the config's `tokens` list says.\n *\n * `#current` compiles to the `currentcolor` keyword, `#clear` is a default\n * replace token for `transparent`, and the rest are registered as default\n * `@property` rules (`#white`, `#black`, and `#border`/`#outline`, which fall\n * back to `currentcolor`). `prefer-custom-property-syntax` rewrites\n * `transparent` / `currentColor` to `#clear` / `#current`, so both must stay here.\n */\nexport const BUILT_IN_COLOR_TOKENS = new Set([\n '#current',\n '#clear',\n '#white',\n '#black',\n '#border',\n '#outline',\n]);\n\n/**\n * CSS named colors (level 1–4) that should be replaced by `#color` tokens.\n * `transparent` and `currentcolor` are excluded — they have their own token\n * suggestions (`#clear`, `#current`) handled by `prefer-custom-property-syntax`.\n */\nexport const NAMED_CSS_COLORS = new Set<string>([\n 'aliceblue',\n 'antiquewhite',\n 'aqua',\n 'aquamarine',\n 'azure',\n 'beige',\n 'bisque',\n 'black',\n 'blanchedalmond',\n 'blue',\n 'blueviolet',\n 'brown',\n 'burlywood',\n 'cadetblue',\n 'chartreuse',\n 'chocolate',\n 'coral',\n 'cornflowerblue',\n 'cornsilk',\n 'crimson',\n 'cyan',\n 'darkblue',\n 'darkcyan',\n 'darkgoldenrod',\n 'darkgray',\n 'darkgreen',\n 'darkgrey',\n 'darkkhaki',\n 'darkmagenta',\n 'darkolivegreen',\n 'darkorange',\n 'darkorchid',\n 'darkred',\n 'darksalmon',\n 'darkseagreen',\n 'darkslateblue',\n 'darkslategray',\n 'darkslategrey',\n 'darkturquoise',\n 'darkviolet',\n 'deeppink',\n 'deepskyblue',\n 'dimgray',\n 'dimgrey',\n 'dodgerblue',\n 'firebrick',\n 'floralwhite',\n 'forestgreen',\n 'fuchsia',\n 'gainsboro',\n 'ghostwhite',\n 'gold',\n 'goldenrod',\n 'gray',\n 'green',\n 'greenyellow',\n 'grey',\n 'honeydew',\n 'hotpink',\n 'indianred',\n 'indigo',\n 'ivory',\n 'khaki',\n 'lavender',\n 'lavenderblush',\n 'lawngreen',\n 'lemonchiffon',\n 'lightblue',\n 'lightcoral',\n 'lightcyan',\n 'lightgoldenrodyellow',\n 'lightgray',\n 'lightgreen',\n 'lightgrey',\n 'lightpink',\n 'lightsalmon',\n 'lightseagreen',\n 'lightskyblue',\n 'lightslategray',\n 'lightslategrey',\n 'lightsteelblue',\n 'lightyellow',\n 'lime',\n 'limegreen',\n 'linen',\n 'magenta',\n 'maroon',\n 'mediumaquamarine',\n 'mediumblue',\n 'mediumorchid',\n 'mediumpurple',\n 'mediumseagreen',\n 'mediumslateblue',\n 'mediumspringgreen',\n 'mediumturquoise',\n 'mediumvioletred',\n 'midnightblue',\n 'mintcream',\n 'mistyrose',\n 'moccasin',\n 'navajowhite',\n 'navy',\n 'oldlace',\n 'olive',\n 'olivedrab',\n 'orange',\n 'orangered',\n 'orchid',\n 'palegoldenrod',\n 'palegreen',\n 'paleturquoise',\n 'palevioletred',\n 'papayawhip',\n 'peachpuff',\n 'peru',\n 'pink',\n 'plum',\n 'powderblue',\n 'purple',\n 'rebeccapurple',\n 'red',\n 'rosybrown',\n 'royalblue',\n 'saddlebrown',\n 'salmon',\n 'sandybrown',\n 'seagreen',\n 'seashell',\n 'sienna',\n 'silver',\n 'skyblue',\n 'slateblue',\n 'slategray',\n 'slategrey',\n 'snow',\n 'springgreen',\n 'steelblue',\n 'tan',\n 'teal',\n 'thistle',\n 'tomato',\n 'turquoise',\n 'violet',\n 'wheat',\n 'white',\n 'whitesmoke',\n 'yellow',\n 'yellowgreen',\n]);\n\n/**\n * CSS system colors (CSS Color 4), lowercase. Tasty (>= 3.12) reads these as\n * colors, matched case-insensitively. Forced-colors styles are written in them,\n * so unlike `NAMED_CSS_COLORS` they are not something to replace with a token.\n * The deprecated system colors (`Menu`, `Window`, `ButtonHighlight`, …) are\n * left out, as Tasty leaves them out.\n */\nexport const SYSTEM_COLORS = new Set<string>([\n 'accentcolor',\n 'accentcolortext',\n 'activetext',\n 'buttonborder',\n 'buttonface',\n 'buttontext',\n 'canvas',\n 'canvastext',\n 'field',\n 'fieldtext',\n 'graytext',\n 'highlight',\n 'highlighttext',\n 'linktext',\n 'mark',\n 'marktext',\n 'selecteditem',\n 'selecteditemtext',\n 'visitedtext',\n]);\n\n/**\n * Properties that accept color values. Used to scope named-color checks so\n * string properties like `content` or `cursor` don't false-positive.\n */\nexport const COLOR_BEARING_PROPERTIES = new Set<string>([\n // Tasty enhanced properties\n 'fill',\n 'svgFill',\n 'color',\n 'caretColor',\n 'accentColor',\n 'shadow',\n 'border',\n 'blockBorder',\n 'inlineBorder',\n 'outline',\n 'fade',\n // CSS background\n 'background',\n 'backgroundColor',\n // CSS border colors\n 'borderColor',\n 'borderTopColor',\n 'borderRightColor',\n 'borderBottomColor',\n 'borderLeftColor',\n // CSS logical border colors — the `block`/`inline` counterparts of the four\n // above, which a writing-mode-aware codebase reaches for just as often.\n 'borderBlockColor',\n 'borderBlockStartColor',\n 'borderBlockEndColor',\n 'borderInlineColor',\n 'borderInlineStartColor',\n 'borderInlineEndColor',\n // CSS shadows\n 'boxShadow',\n 'textShadow',\n // CSS text decoration\n 'textDecorationColor',\n // CSS outline / misc\n 'outlineColor',\n 'scrollbarColor',\n 'columnRuleColor',\n // SVG\n 'stroke',\n 'stopColor',\n 'floodColor',\n 'lightingColor',\n]);\n\n/**\n * Properties where tasty does NOT expand a `$name` custom-property reference.\n *\n * **Empty since tasty 3.0.2**, which taught the pass-through style handlers to\n * substitute `$name` refs too (tasty#264). Before that, `fontFamily:\n * '$font-sans'` emitted a literal `font-family: $font-sans` — an invalid\n * declaration the browser drops — so `prefer-custom-property-syntax` had to\n * suppress the rewrite for two dozen properties. It no longer does, which means\n * those rewrites are now offered where they were previously (and, since 3.0.2,\n * needlessly) held back.\n *\n * The set is kept rather than deleted: it is the seam the round-trip guard\n * writes to, so a future handler that regains pass-through behaviour surfaces\n * as a failing test instead of a silently broken autofix.\n *\n * An empty list here would let `--fix` delete a declaration on 3.0.0/3.0.1,\n * which the `@tenphi/tasty` peer floor rules out — that floor is 3.8.0, set by\n * the logical renames in {@link SHORTHAND_MAPPING} rather than by this list.\n *\n * Note that {@link PROPERTIES_WITHOUT_COLOR_TOKEN_EXPANSION} is *not* empty:\n * `#token` expansion is still property-scoped (`fontSize: '#accent'` is\n * meaningless and passes through). The two sets are genuinely different.\n *\n * Derived from the runtime, not by hand — `constants.round-trip.test.ts` rebuilds\n * both sets against the installed `@tenphi/tasty` and fails if either drifts.\n */\nexport const PROPERTIES_WITHOUT_CUSTOM_PROPERTY_EXPANSION = new Set<string>([]);\n\n/**\n * Properties where tasty does NOT expand a `#name` colour token.\n *\n * Mostly dimension and keyword properties: `fontSize: '#accent'` is meaningless,\n * so the handler leaves the value alone and the declaration is dropped. Suggesting\n * `#x` for a `var(--x-color)` inside one of these would break it.\n *\n * See {@link PROPERTIES_WITHOUT_CUSTOM_PROPERTY_EXPANSION} for why this is a\n * separate list rather than the same one.\n */\nexport const PROPERTIES_WITHOUT_COLOR_TOKEN_EXPANSION = new Set([\n 'align',\n 'alignContent',\n 'alignItems',\n 'backgroundAttachment',\n 'backgroundClip',\n 'backgroundOrigin',\n 'backgroundRepeat',\n 'display',\n 'font',\n 'fontFamily',\n 'fontSize',\n 'fontWeight',\n 'justify',\n 'justifyContent',\n 'justifyItems',\n 'letterSpacing',\n 'lineHeight',\n 'outlineOffset',\n 'overflow',\n 'place',\n 'placeContent',\n 'placeItems',\n 'textTransform',\n 'whiteSpace',\n]);\n"],"mappings":";;AAuBA,MAAa,gBAAgB,CAAC,SAAS,MAAM;;AAG7C,MAAa,sBAAsB,CAAC,aAAa,aAAa;AAC9D,MAAa,iCAAiC;CAC5C;CACA;CACA;CACA;CACD;;;;;;AAOD,MAAa,yBAAyB;CACpC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACD;;;;;;AAOD,MAAa,wBAAwB,CAAC,eAAe,eAAe;;AAGpE,MAAa,iBAAiB;CAC5B,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACJ;;AAGD,MAAa,kBAAkB;CAC7B;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACD;;AAGD,MAAa,mBAAmB;CAC9B;CACA;CACA,GAAG;CACH;CACA;CACA;CACA;CACD;;;;AAKD,MAAa,yBAAyB,IAAI,IAAI;CAC5C;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CAIA;CACA;CACA,GAAG;CACJ,CAAC;;;;;;AAOF,MAAa,qBAAqB,IAAI,IAAI;CACxC;CACA;CACA;CACA;CACA;CACD,CAAC;;;;;;;AAQF,MAAa,6BAAqD;CAChE,eAAe;CACf,aAAa;CACb,iBAAiB;CAClB;;;;;;;;;;;;;;;;;;;;;;AAuBD,MAAM,yBAAyB;CAC7B;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACD;;;;;;AAOD,MAAa,0BAA0B;CAGrC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACD;;;;AAKD,MAAa,uBAAuB,IAAI,IAAI,CAC1C,GAAG,wBACH,GAAG,wBACJ,CAAC;;;;AAKF,MAAa,iBAAiB,IAAI,IAAI;CAAC;CAAK;CAAK;CAAM;CAAM;CAAM;CAAM;CAAK,CAAC;;;;;;;AAQ/E,MAAa,6BAA6B,IAAI,IAAI;CAChD;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACD,CAAC;;;;AAKF,MAAa,YAAY,IAAI,IAAI;CAC/B;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACD,CAAC;;;;;;;;;;;;;AAcF,MAAa,0BAA0B,IAAI,IAAI;CAC7C;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CAEA;CACA;CACA;CACA;CACA;CACA;CACA;CAaA,GAAG;CACH,GAAG;CACH,GAAG;CACJ,CAAC;;;;AAKF,MAAa,wBAAqD;CAChE,QAAQ,IAAI,IAAI;EAAC;EAAO;EAAS;EAAU;EAAO,CAAC;CACnD,QAAQ,IAAI,IAAI;EACd;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACD,CAAC;CACF,SAAS,IAAI,IAAI;EAAC;EAAO;EAAS;EAAU;EAAO,CAAC;CACpD,QAAQ,IAAI,IAAI;EAAC;EAAO;EAAS;EAAU;EAAO,CAAC;CACnD,MAAM,IAAI,IAAI;EAAC;EAAO;EAAS;EAAU;EAAO,CAAC;CACjD,cAAc,IAAI,IAAI;EAAC;EAAO;EAAS;EAAU;EA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;CAEA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CAEA;CACA;CAEA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CAEA;CACA;CACA;CACA;CACA;CAEA;CACA;CACA;CACA;CACA;CACA;CACA;CAEA;CACA;CACA;CAEA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CAEA;CACA;CACA;CACA;CAEA;CACA;CACA;CACA;CACA;CAEA;CACA;CACA;CACA;CACA;CACA;CAEA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACD,CAAC;;;;;;;;;;;AAYF,MAAa,wBAAwB,IAAI,IAAI;CAC3C;CACA;CACA;CACA;CACA;CACA;CACD,CAAC;;;;;;AAOF,MAAa,mBAAmB,IAAI,IAAY;CAC9C;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACD,CAAC;;;;;;;;AASF,MAAa,gBAAgB,IAAI,IAAY;CAC3C;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACD,CAAC;;;;;AAMF,MAAa,2BAA2B,IAAI,IAAY;CAEtD;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CAEA;CACA;CAEA;CACA;CACA;CACA;CACA;CAGA;CACA;CACA;CACA;CACA;CACA;CAEA;CACA;CAEA;CAEA;CACA;CACA;CAEA;CACA;CACA;CACA;CACD,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;AA4BF,MAAa,+DAA+C,IAAI,IAAY,EAAE,CAAC;;;;;;;;;;;AAY/E,MAAa,2CAA2C,IAAI,IAAI;CAC9D;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACD,CAAC"}
|
|
1
|
+
{"version":3,"file":"constants.js","names":[],"sources":["../src/constants.ts"],"sourcesContent":["// ---------------------------------------------------------------------------\n// Enhanced logical style families, mirroring `@tenphi/tasty`'s `logical-list.ts`.\n//\n// Tasty v3.8 gave each logical axis/category pair its own handler, named\n// `<axis><Category>` — `blockPadding`, `inlineBorder` — which emits native\n// logical CSS (`padding-block`, `border-inline`) rather than converting the\n// value to a physical edge. The browser resolves `start`/`end` from the\n// element's `writingMode` and `direction`.\n//\n// The native CSS spellings (`paddingBlock`, `insetInlineStart`, …) stay valid\n// keys, but they are now *ordinary* CSS properties: tasty stopped reading\n// `paddingBlock`/`paddingInline`/`insetBlock`/`insetInline` in its physical\n// handlers, so they no longer get category defaults or directional behaviour.\n// That is why they are absent from `KNOWN_TASTY_PROPERTIES` (they are still\n// recognised, via `KNOWN_CSS_PROPERTIES`) and why `SHORTHAND_MAPPING` points\n// them at the enhanced style instead.\n//\n// The groups are split by *vocabulary*, not for tidiness: each one is spread\n// into a different set below, and the splits are what keep `true` off the size\n// constraints and the single-value rule off the borders.\n// ---------------------------------------------------------------------------\n\n/** Logical edge modifiers, the `start`/`end` counterpart of {@link BOX_SIDES}. */\nexport const LOGICAL_EDGES = ['start', 'end'] as const;\n\n/** Enhanced logical sizes. `min`/`max` variants are read by the same handler. */\nexport const LOGICAL_SIZE_STYLES = ['blockSize', 'inlineSize'] as const;\nexport const LOGICAL_SIZE_CONSTRAINT_STYLES = [\n 'minBlockSize',\n 'maxBlockSize',\n 'minInlineSize',\n 'maxInlineSize',\n] as const;\n\n/**\n * Enhanced logical spacing and inset axes — the categories that take a value\n * per logical edge, so they share the `start`/`end` modifier vocabulary and the\n * one-value-per-directional-group rule.\n */\nexport const LOGICAL_SPACING_STYLES = [\n 'blockPadding',\n 'inlinePadding',\n 'blockMargin',\n 'inlineMargin',\n 'blockInset',\n 'inlineInset',\n 'blockScrollMargin',\n 'inlineScrollMargin',\n 'blockScrollPadding',\n 'inlineScrollPadding',\n] as const;\n\n/**\n * Enhanced logical borders. Kept apart from {@link LOGICAL_SPACING_STYLES}\n * because a border group legitimately carries width + style + colour, exactly\n * as physical `border` does, so it is not subject to the single-value rule.\n */\nexport const LOGICAL_BORDER_STYLES = ['blockBorder', 'inlineBorder'] as const;\n\n/** Every enhanced logical style, in the order tasty's own lists declare them. */\nexport const LOGICAL_STYLES = [\n ...LOGICAL_SIZE_STYLES,\n ...LOGICAL_SIZE_CONSTRAINT_STYLES,\n ...LOGICAL_SPACING_STYLES,\n ...LOGICAL_BORDER_STYLES,\n] as const;\n\n/** Tasty's `POSITION_STYLES`: style props that place an element. */\nexport const POSITION_STYLES = [\n 'gridArea',\n 'order',\n 'gridColumn',\n 'gridRow',\n 'placeSelf',\n 'alignSelf',\n 'justifySelf',\n 'zIndex',\n 'margin',\n 'blockMargin',\n 'inlineMargin',\n 'inset',\n 'blockInset',\n 'inlineInset',\n 'position',\n 'scrollMargin',\n 'blockScrollMargin',\n 'inlineScrollMargin',\n 'scrollPadding',\n 'blockScrollPadding',\n 'inlineScrollPadding',\n] as const;\n\n/** Tasty's `DIMENSION_STYLES`: style props that size an element. */\nexport const DIMENSION_STYLES = [\n 'width',\n 'height',\n ...LOGICAL_SIZE_STYLES,\n 'flexBasis',\n 'flexGrow',\n 'flexShrink',\n 'flex',\n] as const;\n\n/**\n * Built-in tasty style properties that are always valid as style keys.\n */\nexport const KNOWN_TASTY_PROPERTIES = new Set([\n 'display',\n 'font',\n 'preset',\n 'hide',\n 'whiteSpace',\n 'opacity',\n 'transition',\n 'gridArea',\n 'order',\n 'gridColumn',\n 'gridRow',\n 'placeSelf',\n 'alignSelf',\n 'justifySelf',\n 'zIndex',\n 'margin',\n 'inset',\n 'position',\n 'padding',\n 'overflow',\n 'scrollbar',\n 'textAlign',\n 'border',\n 'radius',\n 'shadow',\n 'outline',\n 'color',\n 'fill',\n 'svgFill',\n 'fade',\n 'image',\n 'textTransform',\n 'fontWeight',\n 'fontStyle',\n 'width',\n 'height',\n 'flexBasis',\n 'flexGrow',\n 'flexShrink',\n 'flex',\n 'flow',\n 'place',\n 'placeItems',\n 'placeContent',\n 'alignItems',\n 'alignContent',\n 'justifyItems',\n 'justifyContent',\n 'align',\n 'justify',\n 'gap',\n 'columnGap',\n 'rowGap',\n 'gridColumns',\n 'gridRows',\n 'gridTemplate',\n 'gridAreas',\n 'recipe',\n 'textOverflow',\n 'textDecoration',\n 'animation',\n 'cursor',\n 'pointerEvents',\n 'userSelect',\n 'transform',\n 'transformOrigin',\n 'filter',\n 'backdropFilter',\n 'mixBlendMode',\n 'objectFit',\n 'objectPosition',\n 'resize',\n 'appearance',\n 'listStyle',\n 'listStyleType',\n 'content',\n 'boxSizing',\n 'verticalAlign',\n 'wordBreak',\n 'overflowWrap',\n 'hyphens',\n 'tabSize',\n 'direction',\n 'unicodeBidi',\n 'writingMode',\n 'lineClamp',\n 'aspectRatio',\n 'contain',\n 'container',\n 'containerType',\n 'containerName',\n 'interpolateSize',\n 'willChange',\n 'isolation',\n 'touchAction',\n 'scrollBehavior',\n 'scrollSnapType',\n 'scrollSnapAlign',\n 'caretColor',\n 'accentColor',\n 'colorScheme',\n // Physical scroll shorthands: tasty v3.8 gave `scrollPadding` its own\n // directional handler alongside the `scrollMargin` one, so both take the\n // padding vocabulary (modifiers, `true`, one value per directional group).\n 'scrollMargin',\n 'scrollPadding',\n ...LOGICAL_STYLES,\n]);\n\n/**\n * Special top-level keys that are valid but not regular style properties.\n *\n * These match the real CSS at-rule names Tasty emits, so they are kebab-case.\n */\nexport const SPECIAL_STYLE_KEYS = new Set([\n '@keyframes',\n '@property',\n '@font-face',\n '@counter-style',\n '@function',\n]);\n\n/**\n * At-rule style keys renamed in Tasty v3, mapped old spelling -> new.\n *\n * The v2 spellings were camelCase; v3 uses the CSS at-rule names Tasty already\n * emitted. Reported (and auto-fixed) so upgrading is mechanical.\n */\nexport const RENAMED_SPECIAL_STYLE_KEYS: Record<string, string> = {\n '@properties': '@property',\n '@fontFace': '@font-face',\n '@counterStyle': '@counter-style',\n};\n\n/**\n * CSS property names, camelCase, derived from `known-css-properties` — the\n * MDN/W3C-sourced dataset stylelint uses for `property-no-unknown`.\n *\n * Generated. Run `pnpm generate:css-properties` after bumping the dataset rather\n * than editing this list; `constants.css-properties.test.ts` fails on drift.\n *\n * Tasty renders any camelCase style key straight through to its kebab-case CSS\n * declaration (`maskSize` -> `mask-size`), so anything absent here is a false\n * positive from `known-property` on valid CSS — which is why the list is derived\n * from data instead of maintained by hand.\n *\n * The dataset also carries at-rule descriptors (`src`, `prefix`, `syntax`,\n * `symbols`), which stylelint keeps. They are left out here: a style rule cannot\n * declare them, so as style keys they render declarations browsers drop, and as\n * JSX props (`<NumberInput prefix=\"$\" />`) they would be read as style values.\n * `@webref/css` says which names are descriptors only; one that is also a\n * property (`fontWeight`, `speakAs`, `size`) stays. Inside an at-rule block\n * nothing validates them: `known-property` exempts every `@`-prefixed key and\n * does not descend.\n */\nconst DATASET_CSS_PROPERTIES = [\n 'accelerator',\n 'accentColor',\n 'alignContent',\n 'alignItems',\n 'alignSelf',\n 'alignmentBaseline',\n 'all',\n 'alt',\n 'anchorName',\n 'anchorScope',\n 'animation',\n 'animationComposition',\n 'animationDelay',\n 'animationDirection',\n 'animationDuration',\n 'animationFillMode',\n 'animationIterationCount',\n 'animationName',\n 'animationPlayState',\n 'animationRange',\n 'animationRangeEnd',\n 'animationRangeStart',\n 'animationTimeline',\n 'animationTimingFunction',\n 'animationTrigger',\n 'animationTriggerBehavior',\n 'animationTriggerExitRange',\n 'animationTriggerExitRangeEnd',\n 'animationTriggerExitRangeStart',\n 'animationTriggerRange',\n 'animationTriggerRangeEnd',\n 'animationTriggerRangeStart',\n 'animationTriggerTimeline',\n 'appRegion',\n 'appearance',\n 'aspectRatio',\n 'audioLevel',\n 'azimuth',\n 'backdropFilter',\n 'backfaceVisibility',\n 'background',\n 'backgroundAttachment',\n 'backgroundBlendMode',\n 'backgroundClip',\n 'backgroundColor',\n 'backgroundImage',\n 'backgroundOrigin',\n 'backgroundPosition',\n 'backgroundPositionX',\n 'backgroundPositionY',\n 'backgroundRepeat',\n 'backgroundRepeatX',\n 'backgroundRepeatY',\n 'backgroundSize',\n 'baselineShift',\n 'baselineSource',\n 'behavior',\n 'blockEllipsis',\n 'blockSize',\n 'blockStep',\n 'blockStepAlign',\n 'blockStepInsert',\n 'blockStepRound',\n 'blockStepSize',\n 'bookmarkLabel',\n 'bookmarkLevel',\n 'bookmarkState',\n 'border',\n 'borderBlock',\n 'borderBlockColor',\n 'borderBlockEnd',\n 'borderBlockEndColor',\n 'borderBlockEndStyle',\n 'borderBlockEndWidth',\n 'borderBlockStart',\n 'borderBlockStartColor',\n 'borderBlockStartStyle',\n 'borderBlockStartWidth',\n 'borderBlockStyle',\n 'borderBlockWidth',\n 'borderBottom',\n 'borderBottomColor',\n 'borderBottomLeftRadius',\n 'borderBottomRightRadius',\n 'borderBottomStyle',\n 'borderBottomWidth',\n 'borderBoundary',\n 'borderCollapse',\n 'borderColor',\n 'borderEndEndRadius',\n 'borderEndStartRadius',\n 'borderImage',\n 'borderImageOutset',\n 'borderImageRepeat',\n 'borderImageSlice',\n 'borderImageSource',\n 'borderImageWidth',\n 'borderInline',\n 'borderInlineColor',\n 'borderInlineEnd',\n 'borderInlineEndColor',\n 'borderInlineEndStyle',\n 'borderInlineEndWidth',\n 'borderInlineStart',\n 'borderInlineStartColor',\n 'borderInlineStartStyle',\n 'borderInlineStartWidth',\n 'borderInlineStyle',\n 'borderInlineWidth',\n 'borderLeft',\n 'borderLeftColor',\n 'borderLeftStyle',\n 'borderLeftWidth',\n 'borderRadius',\n 'borderRight',\n 'borderRightColor',\n 'borderRightStyle',\n 'borderRightWidth',\n 'borderSpacing',\n 'borderStartEndRadius',\n 'borderStartStartRadius',\n 'borderStyle',\n 'borderTop',\n 'borderTopColor',\n 'borderTopLeftRadius',\n 'borderTopRightRadius',\n 'borderTopStyle',\n 'borderTopWidth',\n 'borderWidth',\n 'bottom',\n 'boxDecorationBreak',\n 'boxShadow',\n 'boxSizing',\n 'boxSnap',\n 'breakAfter',\n 'breakBefore',\n 'breakInside',\n 'bufferedRendering',\n 'captionSide',\n 'caret',\n 'caretAnimation',\n 'caretColor',\n 'caretShape',\n 'chains',\n 'clear',\n 'clip',\n 'clipPath',\n 'clipRule',\n 'color',\n 'colorAdjust',\n 'colorInterpolation',\n 'colorInterpolationFilters',\n 'colorProfile',\n 'colorRendering',\n 'colorScheme',\n 'columnCount',\n 'columnFill',\n 'columnGap',\n 'columnHeight',\n 'columnProgression',\n 'columnRule',\n 'columnRuleBreak',\n 'columnRuleColor',\n 'columnRuleOutset',\n 'columnRuleStyle',\n 'columnRuleWidth',\n 'columnSpan',\n 'columnWidth',\n 'columnWrap',\n 'columns',\n 'contain',\n 'containIntrinsicBlockSize',\n 'containIntrinsicHeight',\n 'containIntrinsicInlineSize',\n 'containIntrinsicSize',\n 'containIntrinsicWidth',\n 'container',\n 'containerName',\n 'containerType',\n 'content',\n 'contentVisibility',\n 'continue',\n 'counterIncrement',\n 'counterReset',\n 'counterSet',\n 'cue',\n 'cueAfter',\n 'cueBefore',\n 'cursor',\n 'cx',\n 'cy',\n 'd',\n 'direction',\n 'display',\n 'displayAlign',\n 'dominantBaseline',\n 'dynamicRangeLimit',\n 'elevation',\n 'emptyCells',\n 'enableBackground',\n 'epubCaptionSide',\n 'epubHyphens',\n 'epubTextCombine',\n 'epubTextEmphasis',\n 'epubTextEmphasisColor',\n 'epubTextEmphasisStyle',\n 'epubTextOrientation',\n 'epubTextTransform',\n 'epubWordBreak',\n 'epubWritingMode',\n 'fieldSizing',\n 'fill',\n 'fillBreak',\n 'fillColor',\n 'fillImage',\n 'fillOpacity',\n 'fillOrigin',\n 'fillPosition',\n 'fillRepeat',\n 'fillRule',\n 'fillSize',\n 'filter',\n 'flex',\n 'flexBasis',\n 'flexDirection',\n 'flexFlow',\n 'flexGrow',\n 'flexShrink',\n 'flexWrap',\n 'float',\n 'floatDefer',\n 'floatOffset',\n 'floatReference',\n 'floodColor',\n 'floodOpacity',\n 'flow',\n 'flowFrom',\n 'flowInto',\n 'font',\n 'fontFamily',\n 'fontFeatureSettings',\n 'fontKerning',\n 'fontLanguageOverride',\n 'fontOpticalSizing',\n 'fontPalette',\n 'fontSize',\n 'fontSizeAdjust',\n 'fontStretch',\n 'fontStyle',\n 'fontSynthesis',\n 'fontSynthesisPosition',\n 'fontSynthesisSmallCaps',\n 'fontSynthesisStyle',\n 'fontSynthesisWeight',\n 'fontVariant',\n 'fontVariantAlternates',\n 'fontVariantCaps',\n 'fontVariantEastAsian',\n 'fontVariantEmoji',\n 'fontVariantLigatures',\n 'fontVariantNumeric',\n 'fontVariantPosition',\n 'fontVariationSettings',\n 'fontWeight',\n 'fontWidth',\n 'footnoteDisplay',\n 'footnotePolicy',\n 'forcedColorAdjust',\n 'gap',\n 'glyphOrientationHorizontal',\n 'glyphOrientationVertical',\n 'grid',\n 'gridArea',\n 'gridAutoColumns',\n 'gridAutoFlow',\n 'gridAutoRows',\n 'gridColumn',\n 'gridColumnEnd',\n 'gridColumnGap',\n 'gridColumnStart',\n 'gridGap',\n 'gridRow',\n 'gridRowEnd',\n 'gridRowGap',\n 'gridRowStart',\n 'gridTemplate',\n 'gridTemplateAreas',\n 'gridTemplateColumns',\n 'gridTemplateRows',\n 'hangingPunctuation',\n 'height',\n 'hyphenateCharacter',\n 'hyphenateLimitChars',\n 'hyphenateLimitLast',\n 'hyphenateLimitLines',\n 'hyphenateLimitZone',\n 'hyphens',\n 'imageOrientation',\n 'imageRendering',\n 'imageResolution',\n 'imeMode',\n 'initialLetter',\n 'initialLetterAlign',\n 'initialLetterWrap',\n 'inlineSize',\n 'inlineSizing',\n 'inputFormat',\n 'inputSecurity',\n 'inset',\n 'insetArea',\n 'insetBlock',\n 'insetBlockEnd',\n 'insetBlockStart',\n 'insetInline',\n 'insetInlineEnd',\n 'insetInlineStart',\n 'interactivity',\n 'interpolateSize',\n 'isolation',\n 'itemCross',\n 'itemDirection',\n 'itemFlow',\n 'itemPack',\n 'itemSlack',\n 'itemTrack',\n 'itemWrap',\n 'justifyContent',\n 'justifyItems',\n 'justifySelf',\n 'kerning',\n 'layoutFlow',\n 'layoutGrid',\n 'layoutGridChar',\n 'layoutGridLine',\n 'layoutGridMode',\n 'layoutGridType',\n 'left',\n 'letterSpacing',\n 'lightingColor',\n 'lineBreak',\n 'lineClamp',\n 'lineFitEdge',\n 'lineGrid',\n 'lineHeight',\n 'lineHeightStep',\n 'lineIncrement',\n 'linePadding',\n 'lineSnap',\n 'listStyle',\n 'listStyleImage',\n 'listStylePosition',\n 'listStyleType',\n 'margin',\n 'marginBlock',\n 'marginBlockEnd',\n 'marginBlockStart',\n 'marginBottom',\n 'marginBreak',\n 'marginInline',\n 'marginInlineEnd',\n 'marginInlineStart',\n 'marginLeft',\n 'marginRight',\n 'marginTop',\n 'marginTrim',\n 'marker',\n 'markerEnd',\n 'markerKnockoutLeft',\n 'markerKnockoutRight',\n 'markerMid',\n 'markerOffset',\n 'markerPattern',\n 'markerSegment',\n 'markerSide',\n 'markerStart',\n 'mask',\n 'maskBorder',\n 'maskBorderMode',\n 'maskBorderOutset',\n 'maskBorderRepeat',\n 'maskBorderSlice',\n 'maskBorderSource',\n 'maskBorderWidth',\n 'maskClip',\n 'maskComposite',\n 'maskImage',\n 'maskMode',\n 'maskOrigin',\n 'maskPosition',\n 'maskPositionX',\n 'maskPositionY',\n 'maskRepeat',\n 'maskSize',\n 'maskSourceType',\n 'maskType',\n 'mathDepth',\n 'mathShift',\n 'mathStyle',\n 'maxBlockSize',\n 'maxHeight',\n 'maxInlineSize',\n 'maxLines',\n 'maxWidth',\n 'maxZoom',\n 'minBlockSize',\n 'minHeight',\n 'minInlineSize',\n 'minIntrinsicSizing',\n 'minWidth',\n 'minZoom',\n 'mixBlendMode',\n 'motion',\n 'motionOffset',\n 'motionPath',\n 'motionRotation',\n 'navDown',\n 'navIndex',\n 'navLeft',\n 'navRight',\n 'navUp',\n 'objectFit',\n 'objectPosition',\n 'objectViewBox',\n 'offset',\n 'offsetAnchor',\n 'offsetBlockEnd',\n 'offsetBlockStart',\n 'offsetDistance',\n 'offsetInlineEnd',\n 'offsetInlineStart',\n 'offsetPath',\n 'offsetPosition',\n 'offsetRotate',\n 'offsetRotation',\n 'opacity',\n 'order',\n 'orphans',\n 'outline',\n 'outlineColor',\n 'outlineOffset',\n 'outlineStyle',\n 'outlineWidth',\n 'overflow',\n 'overflowAnchor',\n 'overflowBlock',\n 'overflowClipMargin',\n 'overflowClipMarginBlock',\n 'overflowClipMarginBlockEnd',\n 'overflowClipMarginBlockStart',\n 'overflowClipMarginBottom',\n 'overflowClipMarginInline',\n 'overflowClipMarginInlineEnd',\n 'overflowClipMarginInlineStart',\n 'overflowClipMarginLeft',\n 'overflowClipMarginRight',\n 'overflowClipMarginTop',\n 'overflowInline',\n 'overflowWrap',\n 'overflowX',\n 'overflowY',\n 'overlay',\n 'overscrollBehavior',\n 'overscrollBehaviorBlock',\n 'overscrollBehaviorInline',\n 'overscrollBehaviorX',\n 'overscrollBehaviorY',\n 'padding',\n 'paddingBlock',\n 'paddingBlockEnd',\n 'paddingBlockStart',\n 'paddingBottom',\n 'paddingInline',\n 'paddingInlineEnd',\n 'paddingInlineStart',\n 'paddingLeft',\n 'paddingRight',\n 'paddingTop',\n 'page',\n 'pageBreakAfter',\n 'pageBreakBefore',\n 'pageBreakInside',\n 'paintOrder',\n 'pause',\n 'pauseAfter',\n 'pauseBefore',\n 'penAction',\n 'perspective',\n 'perspectiveOrigin',\n 'perspectiveOriginX',\n 'perspectiveOriginY',\n 'pitch',\n 'pitchRange',\n 'placeContent',\n 'placeItems',\n 'placeSelf',\n 'playDuring',\n 'pointerEvents',\n 'position',\n 'positionAnchor',\n 'positionArea',\n 'positionTry',\n 'positionTryFallbacks',\n 'positionTryOptions',\n 'positionTryOrder',\n 'positionVisibility',\n 'printColorAdjust',\n 'propertyName',\n 'quotes',\n 'r',\n 'readingFlow',\n 'readingOrder',\n 'regionFragment',\n 'resize',\n 'rest',\n 'restAfter',\n 'restBefore',\n 'richness',\n 'right',\n 'rotate',\n 'rowGap',\n 'rowRule',\n 'rowRuleBreak',\n 'rowRuleColor',\n 'rowRuleOutset',\n 'rowRuleStyle',\n 'rowRuleWidth',\n 'rubyAlign',\n 'rubyMerge',\n 'rubyOverhang',\n 'rubyPosition',\n 'rule',\n 'ruleBreak',\n 'ruleColor',\n 'ruleOutset',\n 'rulePaintOrder',\n 'ruleStyle',\n 'ruleWidth',\n 'running',\n 'rx',\n 'ry',\n 'scale',\n 'scrollBehavior',\n 'scrollInitialTarget',\n 'scrollMargin',\n 'scrollMarginBlock',\n 'scrollMarginBlockEnd',\n 'scrollMarginBlockStart',\n 'scrollMarginBottom',\n 'scrollMarginInline',\n 'scrollMarginInlineEnd',\n 'scrollMarginInlineStart',\n 'scrollMarginLeft',\n 'scrollMarginRight',\n 'scrollMarginTop',\n 'scrollMarkerGroup',\n 'scrollPadding',\n 'scrollPaddingBlock',\n 'scrollPaddingBlockEnd',\n 'scrollPaddingBlockStart',\n 'scrollPaddingBottom',\n 'scrollPaddingInline',\n 'scrollPaddingInlineEnd',\n 'scrollPaddingInlineStart',\n 'scrollPaddingLeft',\n 'scrollPaddingRight',\n 'scrollPaddingTop',\n 'scrollSnapAlign',\n 'scrollSnapCoordinate',\n 'scrollSnapDestination',\n 'scrollSnapMargin',\n 'scrollSnapMarginBottom',\n 'scrollSnapMarginLeft',\n 'scrollSnapMarginRight',\n 'scrollSnapMarginTop',\n 'scrollSnapPointsX',\n 'scrollSnapPointsY',\n 'scrollSnapStop',\n 'scrollSnapType',\n 'scrollSnapTypeX',\n 'scrollSnapTypeY',\n 'scrollStartTarget',\n 'scrollTargetGroup',\n 'scrollTimeline',\n 'scrollTimelineAxis',\n 'scrollTimelineName',\n 'scrollbar3dLightColor',\n 'scrollbar3dlightColor',\n 'scrollbarArrowColor',\n 'scrollbarBaseColor',\n 'scrollbarColor',\n 'scrollbarDarkShadowColor',\n 'scrollbarDarkshadowColor',\n 'scrollbarFaceColor',\n 'scrollbarGutter',\n 'scrollbarHighlightColor',\n 'scrollbarShadowColor',\n 'scrollbarTrackColor',\n 'scrollbarWidth',\n 'shapeImageThreshold',\n 'shapeInside',\n 'shapeMargin',\n 'shapeOutside',\n 'shapeRendering',\n 'size',\n 'sliderOrientation',\n 'snapHeight',\n 'solidColor',\n 'solidOpacity',\n 'spatialNavigationAction',\n 'spatialNavigationContain',\n 'spatialNavigationFunction',\n 'speak',\n 'speakAs',\n 'speakHeader',\n 'speakNumeral',\n 'speakPunctuation',\n 'speechRate',\n 'stopColor',\n 'stopOpacity',\n 'stress',\n 'stringSet',\n 'stroke',\n 'strokeAlign',\n 'strokeAlignment',\n 'strokeBreak',\n 'strokeColor',\n 'strokeDashCorner',\n 'strokeDashJustify',\n 'strokeDashadjust',\n 'strokeDasharray',\n 'strokeDashcorner',\n 'strokeDashoffset',\n 'strokeImage',\n 'strokeLinecap',\n 'strokeLinejoin',\n 'strokeMiterlimit',\n 'strokeOpacity',\n 'strokeOrigin',\n 'strokePosition',\n 'strokeRepeat',\n 'strokeSize',\n 'strokeWidth',\n 'supportedColorSchemes',\n 'tabSize',\n 'tableLayout',\n 'textAlign',\n 'textAlignAll',\n 'textAlignLast',\n 'textAnchor',\n 'textAutospace',\n 'textBox',\n 'textBoxEdge',\n 'textBoxTrim',\n 'textCombineUpright',\n 'textDecoration',\n 'textDecorationBlink',\n 'textDecorationColor',\n 'textDecorationLine',\n 'textDecorationLineThrough',\n 'textDecorationNone',\n 'textDecorationOverline',\n 'textDecorationSkip',\n 'textDecorationSkipBox',\n 'textDecorationSkipInk',\n 'textDecorationSkipInset',\n 'textDecorationSkipSelf',\n 'textDecorationSkipSpaces',\n 'textDecorationStyle',\n 'textDecorationThickness',\n 'textDecorationTrim',\n 'textDecorationUnderline',\n 'textEmphasis',\n 'textEmphasisColor',\n 'textEmphasisPosition',\n 'textEmphasisSkip',\n 'textEmphasisStyle',\n 'textGroupAlign',\n 'textIndent',\n 'textJustify',\n 'textJustifyTrim',\n 'textKashida',\n 'textKashidaSpace',\n 'textLineThrough',\n 'textLineThroughColor',\n 'textLineThroughMode',\n 'textLineThroughStyle',\n 'textLineThroughWidth',\n 'textOrientation',\n 'textOverflow',\n 'textOverline',\n 'textOverlineColor',\n 'textOverlineMode',\n 'textOverlineStyle',\n 'textOverlineWidth',\n 'textRendering',\n 'textShadow',\n 'textSizeAdjust',\n 'textSpacing',\n 'textSpacingTrim',\n 'textTransform',\n 'textUnderline',\n 'textUnderlineColor',\n 'textUnderlineMode',\n 'textUnderlineOffset',\n 'textUnderlinePosition',\n 'textUnderlineStyle',\n 'textUnderlineWidth',\n 'textWrap',\n 'textWrapMode',\n 'textWrapStyle',\n 'timelineScope',\n 'top',\n 'touchAction',\n 'touchActionDelay',\n 'transform',\n 'transformBox',\n 'transformOrigin',\n 'transformOriginX',\n 'transformOriginY',\n 'transformOriginZ',\n 'transformStyle',\n 'transition',\n 'transitionBehavior',\n 'transitionDelay',\n 'transitionDuration',\n 'transitionProperty',\n 'transitionTimingFunction',\n 'translate',\n 'ucAltSkin',\n 'ucSkin',\n 'unicodeBidi',\n 'userSelect',\n 'userZoom',\n 'vectorEffect',\n 'verticalAlign',\n 'viewTimeline',\n 'viewTimelineAxis',\n 'viewTimelineInset',\n 'viewTimelineName',\n 'viewTransitionClass',\n 'viewTransitionGroup',\n 'viewTransitionName',\n 'viewportFill',\n 'viewportFillOpacity',\n 'viewportFit',\n 'visibility',\n 'voiceBalance',\n 'voiceDuration',\n 'voiceFamily',\n 'voicePitch',\n 'voiceRange',\n 'voiceRate',\n 'voiceStress',\n 'voiceVolume',\n 'volume',\n 'whiteSpace',\n 'whiteSpaceCollapse',\n 'whiteSpaceTrim',\n 'widows',\n 'width',\n 'willChange',\n 'wordBreak',\n 'wordSpaceTransform',\n 'wordSpacing',\n 'wordWrap',\n 'wrapAfter',\n 'wrapBefore',\n 'wrapFlow',\n 'wrapInside',\n 'wrapThrough',\n 'writingMode',\n 'x',\n 'y',\n 'zIndex',\n 'zoom',\n];\n\n/**\n * Properties that ship in browsers or sit in a spec, but have not landed in\n * `known-css-properties` yet. Hand-maintained, and pruned as the dataset catches\n * up — the guard test fails on any entry the dataset already covers.\n */\nexport const EMERGING_CSS_PROPERTIES = [\n // CSS Borders and Box Decorations 4 — squircles and notched corners, shipped in\n // Chromium 139.\n 'cornerShape',\n 'cornerTopShape',\n 'cornerRightShape',\n 'cornerBottomShape',\n 'cornerLeftShape',\n 'cornerBlockStartShape',\n 'cornerBlockEndShape',\n 'cornerInlineStartShape',\n 'cornerInlineEndShape',\n 'cornerTopLeftShape',\n 'cornerTopRightShape',\n 'cornerBottomRightShape',\n 'cornerBottomLeftShape',\n 'cornerStartStartShape',\n 'cornerStartEndShape',\n 'cornerEndStartShape',\n 'cornerEndEndShape',\n];\n\n/**\n * Every CSS property `known-property` accepts as a camelCase style key.\n */\nexport const KNOWN_CSS_PROPERTIES = new Set([\n ...DATASET_CSS_PROPERTIES,\n ...EMERGING_CSS_PROPERTIES,\n]);\n\n/**\n * Built-in custom units recognized by the tasty parser.\n */\nexport const BUILT_IN_UNITS = new Set(['x', 'r', 'cr', 'bw', 'ow', 'lh', 'sf']);\n\n/**\n * Custom properties Tasty registers as default `@property` rules, so they are\n * always defined whatever the config's `tokens` list says. The scale tokens\n * match their built-in units; style handlers read the rest as bare `var()`s\n * (`radius: 'leaf'`, `preset: 'h1 / strong'`, the font fallbacks, timings).\n */\nexport const BUILT_IN_CUSTOM_PROPERTIES = new Set([\n '$gap',\n '$radius',\n '$border-width',\n '$outline-width',\n '$transition',\n '$sharp-radius',\n '$bold-font-weight',\n '$font-sans-fallback',\n '$font-mono-fallback',\n]);\n\n/**\n * Standard CSS units (always valid).\n */\nexport const CSS_UNITS = new Set([\n 'px',\n 'em',\n 'rem',\n '%',\n 'vw',\n 'vh',\n 'vmin',\n 'vmax',\n 'ch',\n 'ex',\n 'cm',\n 'mm',\n 'in',\n 'pt',\n 'pc',\n 'fr',\n 'deg',\n 'rad',\n 'turn',\n 'grad',\n 's',\n 'ms',\n 'dpi',\n 'dpcm',\n 'dppx',\n 'svw',\n 'svh',\n 'lvw',\n 'lvh',\n 'dvw',\n 'dvh',\n 'cqw',\n 'cqh',\n 'cqi',\n 'cqb',\n 'cqmin',\n 'cqmax',\n 'cap',\n 'ic',\n 'rlh',\n 'vi',\n 'vb',\n]);\n\n/**\n * Properties that accept `true` as a value (means \"use default\").\n *\n * `fill` has no default color, so `fill: true` stays an error. Older Tasty\n * versions emitted invalid CSS; Tasty 3.14 ignores it instead. Neither gives\n * the element a background. The runtime guard in `constants.round-trip.test.ts`\n * checks that accepted properties resolve their defaults and fill stays absent.\n */\nexport const BOOLEAN_TRUE_PROPERTIES = new Set([\n 'border',\n 'radius',\n 'padding',\n 'margin',\n 'gap',\n 'color',\n 'shadow',\n 'outline',\n 'inset',\n 'width',\n 'height',\n // `fade: true` falls back to `2x`, which follows `configure({ units })`.\n 'fade',\n 'hide',\n 'preset',\n 'font',\n 'scrollbar',\n 'scrollMargin',\n 'scrollPadding',\n // Every enhanced logical *category* carries the same design-system default as\n // its physical counterpart: `1x` for spacing and scroll edges, `0` for inset,\n // `1bw` for border, a reset for the sizes.\n //\n // The min/max size constraints are deliberately excluded, mirroring the\n // absence of `minWidth`/`maxWidth` here. The runtime does accept `true` on\n // them — they route through the same dimension handler as the axis — but what\n // it does with it is reset the whole axis: `minBlockSize: true` emits\n // `block-size: auto; min-block-size: initial; max-block-size: initial`, not a\n // default for the one constraint named. `blockSize: true` is how you ask for\n // that, so the constraint spellings stay an error, exactly as `minWidth: true`\n // already is.\n ...LOGICAL_SIZE_STYLES,\n ...LOGICAL_SPACING_STYLES,\n ...LOGICAL_BORDER_STYLES,\n]);\n\n/**\n * Directional modifiers and which properties accept them.\n */\nexport const DIRECTIONAL_MODIFIERS: Record<string, Set<string>> = {\n border: new Set(['top', 'right', 'bottom', 'left']),\n radius: new Set([\n 'top',\n 'right',\n 'bottom',\n 'left',\n 'top-left',\n 'top-right',\n 'bottom-left',\n 'bottom-right',\n ]),\n padding: new Set(['top', 'right', 'bottom', 'left']),\n margin: new Set(['top', 'right', 'bottom', 'left']),\n fade: new Set(['top', 'right', 'bottom', 'left']),\n scrollMargin: new Set(['top', 'right', 'bottom', 'left']),\n scrollPadding: new Set(['top', 'right', 'bottom', 'left']),\n inset: new Set(['top', 'right', 'bottom', 'left', 'dock']),\n // Enhanced logical styles take `start`/`end` and nothing else. Listing them\n // here is what makes a physical modifier on a logical axis — `blockPadding:\n // '1x top'`, which the handler silently drops — a report rather than silence.\n ...Object.fromEntries(\n [...LOGICAL_SPACING_STYLES, ...LOGICAL_BORDER_STYLES].map((style) => [\n style,\n new Set<string>(LOGICAL_EDGES),\n ]),\n ),\n};\n\n/**\n * Properties where a group naming directions carries exactly **one** value.\n *\n * Tasty v3 dropped the positional multi-value form for these: values and\n * modifiers are bucketed separately per comma group, so `'2x 4x top right'` and\n * `'2x top 4x right'` were the same input and the pairing depended on modifier\n * order. Per-side values now come from comma groups.\n *\n * Deliberately excludes `border` and `radius`. A `border` group legitimately\n * carries width + style + color, and a `radius` group can carry two values with\n * `leaf`/`backleaf`; neither takes the positional-per-side form, so neither is\n * subject to the rule.\n */\nexport const SINGLE_VALUE_DIRECTIONAL_PROPERTIES = new Set<string>([\n 'padding',\n 'margin',\n 'inset',\n 'scrollMargin',\n 'scrollPadding',\n 'fade',\n // The logical axis handlers bucket values and modifiers the same way, and warn\n // on a second value in a group that names an edge. `blockBorder`/`inlineBorder`\n // are excluded for the same reason `border` is: width + style + colour.\n ...LOGICAL_SPACING_STYLES,\n]);\n\n/**\n * Position names a 4-value box maps onto, in source order.\n */\nexport const BOX_SIDES = ['top', 'right', 'bottom', 'left'] as const;\nexport const BOX_CORNERS = [\n 'top-left',\n 'top-right',\n 'bottom-right',\n 'bottom-left',\n] as const;\n\nexport interface DirectionalBoxConfig {\n /**\n * The token that marks an unset position — dropping it from the shorthand\n * leaves the emitted CSS unchanged. This is the CSS initial value of the\n * longhand, which is not always `0`: `inset` initialises to `auto`, so a `0`\n * there is a real offset the shorthand must not drop.\n */\n identity: string;\n /** Modifier names for each of the four positions, in source order. */\n positions: readonly string[];\n /**\n * Whether `eslint --fix` may apply the rewrite. False when the rewrite is\n * still an improvement but changes what the browser renders, so a human has\n * to opt in.\n */\n fixable: boolean;\n /**\n * Set when the 4-value form is not interpreted per-position at all, so the\n * current output is wrong rather than merely verbose. Surfaced in the report.\n */\n note?: string;\n}\n\n/**\n * Properties whose 4-value box syntax has a directional-shorthand equivalent.\n *\n * `radius` uses corner names rather than sides: a directional modifier\n * addresses the corner *pair* along an edge, so only `top-left` & co. can\n * express a single corner (requires `@tenphi/tasty` >= 2.10).\n */\nexport const DIRECTIONAL_BOX: Record<string, DirectionalBoxConfig> = {\n margin: { identity: '0', positions: BOX_SIDES, fixable: true },\n padding: { identity: '0', positions: BOX_SIDES, fixable: true },\n inset: { identity: 'auto', positions: BOX_SIDES, fixable: true },\n radius: { identity: '0', positions: BOX_CORNERS, fixable: true },\n fade: { identity: '0', positions: BOX_SIDES, fixable: true },\n // Four `border` tokens parse as a single border value (width/style/color),\n // not as a box: `border: '0 0 1bw 0'` emits `border: 0 solid …` — no border\n // on any side. The directional form is what the author meant, but applying\n // it changes rendering, so it stays a manual fix.\n border: {\n identity: '0',\n positions: BOX_SIDES,\n fixable: false,\n note: 'four border tokens parse as one border value, so the current style sets no border at all',\n },\n};\n\n/**\n * Properties that support a `dock` modifier — pin one edge and span its full\n * length. Lets a 4-value box with a single `identity` side collapse, e.g.\n * `inset: 'auto 0 0 0'` -> `inset: '0 bottom dock'`.\n * Requires `@tenphi/tasty` >= 2.10.\n */\nexport const DOCK_PROPERTIES = new Set(['inset']);\n\n/**\n * Valid radius shape keywords.\n */\nexport const RADIUS_SHAPES = new Set(['round', 'ellipse', 'leaf', 'backleaf']);\n\n/**\n * Known semantic transition names — the keys of Tasty's transition map, plus\n * `zIndex`, which Tasty compiles to `z-index`. Any other name is emitted\n * verbatim as a CSS property.\n */\nexport const SEMANTIC_TRANSITIONS = new Set([\n 'fade',\n 'fill',\n 'border',\n 'radius',\n 'shadow',\n 'preset',\n 'gap',\n 'theme',\n 'color',\n 'outline',\n 'inset',\n 'text',\n 'opacity',\n 'translate',\n 'rotate',\n 'scale',\n 'filter',\n 'image',\n 'background',\n 'width',\n 'height',\n 'zIndex',\n]);\n\n/**\n * Mapping of native CSS properties to tasty shorthand alternatives.\n */\nexport const SHORTHAND_MAPPING: Record<\n string,\n { property: string; hint: string; safeFix?: boolean }\n> = {\n backgroundColor: { property: 'fill', hint: \"fill: '...'\", safeFix: true },\n borderColor: { property: 'border', hint: \"border: '...'\" },\n borderWidth: { property: 'border', hint: \"border: '...'\" },\n borderStyle: { property: 'border', hint: \"border: '...'\" },\n borderTop: { property: 'border', hint: \"border: '... top'\" },\n borderRight: { property: 'border', hint: \"border: '... right'\" },\n borderBottom: { property: 'border', hint: \"border: '... bottom'\" },\n borderLeft: { property: 'border', hint: \"border: '... left'\" },\n borderRadius: { property: 'radius', hint: \"radius: '...'\", safeFix: true },\n maxWidth: { property: 'width', hint: \"width: 'max ...'\" },\n minWidth: { property: 'width', hint: \"width: 'min ...'\" },\n maxHeight: { property: 'height', hint: \"height: 'max ...'\" },\n minHeight: { property: 'height', hint: \"height: 'min ...'\" },\n flexDirection: { property: 'flow', hint: \"flow: '...'\" },\n flexWrap: { property: 'flow', hint: \"flow: '...'\" },\n flexFlow: { property: 'flow', hint: \"flow: '...'\" },\n gridAutoFlow: { property: 'flow', hint: \"flow: '...'\" },\n outlineOffset: { property: 'outline', hint: \"outline: '... / offset'\" },\n paddingTop: { property: 'padding', hint: \"padding: '... top'\" },\n paddingRight: { property: 'padding', hint: \"padding: '... right'\" },\n paddingBottom: { property: 'padding', hint: \"padding: '... bottom'\" },\n paddingLeft: { property: 'padding', hint: \"padding: '... left'\" },\n marginTop: { property: 'margin', hint: \"margin: '... top'\" },\n marginRight: { property: 'margin', hint: \"margin: '... right'\" },\n marginBottom: { property: 'margin', hint: \"margin: '... bottom'\" },\n marginLeft: { property: 'margin', hint: \"margin: '... left'\" },\n fontSize: { property: 'preset', hint: \"preset: '...'\" },\n fontWeight: {\n property: 'preset',\n hint: \"preset: 'name / strong' (with strong modifier)\",\n },\n lineHeight: {\n property: 'preset',\n hint: \"preset: 'name / tight' (with tight modifier)\",\n },\n boxShadow: { property: 'shadow', hint: \"shadow: '...'\" },\n backgroundImage: { property: 'image', hint: \"image: '...'\" },\n fontFamily: { property: 'font', hint: \"font: '...'\" },\n fontStyle: {\n property: 'preset',\n hint: \"preset: 'name / italic' (with italic modifier)\",\n },\n letterSpacing: { property: 'preset', hint: \"preset: '...'\" },\n textTransform: { property: 'preset', hint: \"preset: '...'\" },\n flexGap: { property: 'gap', hint: \"gap: '...'\" },\n scrollbarWidth: { property: 'scrollbar', hint: \"scrollbar: '...'\" },\n scrollbarColor: { property: 'scrollbar', hint: \"scrollbar: '...'\" },\n scrollbarGutter: { property: 'scrollbar', hint: \"scrollbar: '...'\" },\n gridTemplateColumns: {\n property: 'gridColumns',\n hint: \"gridColumns: '...'\",\n },\n gridTemplateRows: { property: 'gridRows', hint: \"gridRows: '...'\" },\n gridTemplateAreas: { property: 'gridAreas', hint: \"gridAreas: '...'\" },\n top: { property: 'inset', hint: \"inset: '... top'\" },\n right: { property: 'inset', hint: \"inset: '... right'\" },\n bottom: { property: 'inset', hint: \"inset: '... bottom'\" },\n left: { property: 'inset', hint: \"inset: '... left'\" },\n outlineColor: { property: 'outline', hint: \"outline: '...'\" },\n outlineWidth: { property: 'outline', hint: \"outline: '...'\" },\n outlineStyle: { property: 'outline', hint: \"outline: '...'\" },\n lineClamp: {\n property: 'textOverflow',\n hint: \"textOverflow: 'ellipsis / {lines}'\",\n },\n\n // --- Native logical CSS -> the enhanced Tasty logical style. ---\n //\n // These mirror the physical rows above one for one. Tasty v3.8 moved the\n // enhanced behaviour onto `<axis><Category>` names and stopped reading the\n // native spellings in its handlers, so `paddingBlock` is now a plain CSS\n // declaration with no category default: the rename is the same advice as\n // `paddingTop` -> `padding: '... top'`, not a new opinion.\n //\n // Only the axis shorthands carry `safeFix`. `paddingBlock: '1x 2x'` and\n // `blockPadding: '1x 2x'` both emit `padding-block: 1x 2x`, so the key rename\n // is the whole edit — `constants.round-trip.test.ts` asserts that against the\n // installed runtime rather than trusting this comment. An edge longhand needs\n // a `start`/`end` modifier added to the value, and a `border-*` rename also\n // gains the style/colour defaults `border-block` never had (`border-block:\n // 1bw` renders nothing at all), so those stay report-only.\n //\n // These renames are why the `@tenphi/tasty` peer floor is 3.8.0. The plugin\n // never imports tasty, so its constants are fixed at publish time and cannot\n // adapt to the consumer's version: on 3.7 and below `blockPadding` is not a\n // style tasty knows, and an unhandled camelCase key renders straight through\n // to `block-padding`, which the browser drops. The fix would silently delete\n // the padding, so the floor is the only thing standing between that and a\n // consumer — recognising the logical names is harmless on an older tasty\n // (a missed warning), but rewriting *to* them is not.\n paddingBlock: {\n property: 'blockPadding',\n hint: \"blockPadding: '...'\",\n safeFix: true,\n },\n paddingBlockStart: {\n property: 'blockPadding',\n hint: \"blockPadding: '... start'\",\n },\n paddingBlockEnd: {\n property: 'blockPadding',\n hint: \"blockPadding: '... end'\",\n },\n paddingInline: {\n property: 'inlinePadding',\n hint: \"inlinePadding: '...'\",\n safeFix: true,\n },\n paddingInlineStart: {\n property: 'inlinePadding',\n hint: \"inlinePadding: '... start'\",\n },\n paddingInlineEnd: {\n property: 'inlinePadding',\n hint: \"inlinePadding: '... end'\",\n },\n marginBlock: {\n property: 'blockMargin',\n hint: \"blockMargin: '...'\",\n safeFix: true,\n },\n marginBlockStart: {\n property: 'blockMargin',\n hint: \"blockMargin: '... start'\",\n },\n marginBlockEnd: { property: 'blockMargin', hint: \"blockMargin: '... end'\" },\n marginInline: {\n property: 'inlineMargin',\n hint: \"inlineMargin: '...'\",\n safeFix: true,\n },\n marginInlineStart: {\n property: 'inlineMargin',\n hint: \"inlineMargin: '... start'\",\n },\n marginInlineEnd: {\n property: 'inlineMargin',\n hint: \"inlineMargin: '... end'\",\n },\n insetBlock: {\n property: 'blockInset',\n hint: \"blockInset: '...'\",\n safeFix: true,\n },\n insetBlockStart: { property: 'blockInset', hint: \"blockInset: '... start'\" },\n insetBlockEnd: { property: 'blockInset', hint: \"blockInset: '... end'\" },\n insetInline: {\n property: 'inlineInset',\n hint: \"inlineInset: '...'\",\n safeFix: true,\n },\n insetInlineStart: {\n property: 'inlineInset',\n hint: \"inlineInset: '... start'\",\n },\n insetInlineEnd: { property: 'inlineInset', hint: \"inlineInset: '... end'\" },\n scrollMarginBlock: {\n property: 'blockScrollMargin',\n hint: \"blockScrollMargin: '...'\",\n safeFix: true,\n },\n scrollMarginBlockStart: {\n property: 'blockScrollMargin',\n hint: \"blockScrollMargin: '... start'\",\n },\n scrollMarginBlockEnd: {\n property: 'blockScrollMargin',\n hint: \"blockScrollMargin: '... end'\",\n },\n scrollMarginInline: {\n property: 'inlineScrollMargin',\n hint: \"inlineScrollMargin: '...'\",\n safeFix: true,\n },\n scrollMarginInlineStart: {\n property: 'inlineScrollMargin',\n hint: \"inlineScrollMargin: '... start'\",\n },\n scrollMarginInlineEnd: {\n property: 'inlineScrollMargin',\n hint: \"inlineScrollMargin: '... end'\",\n },\n scrollPaddingBlock: {\n property: 'blockScrollPadding',\n hint: \"blockScrollPadding: '...'\",\n safeFix: true,\n },\n scrollPaddingBlockStart: {\n property: 'blockScrollPadding',\n hint: \"blockScrollPadding: '... start'\",\n },\n scrollPaddingBlockEnd: {\n property: 'blockScrollPadding',\n hint: \"blockScrollPadding: '... end'\",\n },\n scrollPaddingInline: {\n property: 'inlineScrollPadding',\n hint: \"inlineScrollPadding: '...'\",\n safeFix: true,\n },\n scrollPaddingInlineStart: {\n property: 'inlineScrollPadding',\n hint: \"inlineScrollPadding: '... start'\",\n },\n scrollPaddingInlineEnd: {\n property: 'inlineScrollPadding',\n hint: \"inlineScrollPadding: '... end'\",\n },\n borderBlock: { property: 'blockBorder', hint: \"blockBorder: '...'\" },\n borderBlockColor: { property: 'blockBorder', hint: \"blockBorder: '...'\" },\n borderBlockWidth: { property: 'blockBorder', hint: \"blockBorder: '...'\" },\n borderBlockStyle: { property: 'blockBorder', hint: \"blockBorder: '...'\" },\n borderBlockStart: {\n property: 'blockBorder',\n hint: \"blockBorder: '... start'\",\n },\n borderBlockEnd: { property: 'blockBorder', hint: \"blockBorder: '... end'\" },\n borderInline: { property: 'inlineBorder', hint: \"inlineBorder: '...'\" },\n borderInlineColor: { property: 'inlineBorder', hint: \"inlineBorder: '...'\" },\n borderInlineWidth: { property: 'inlineBorder', hint: \"inlineBorder: '...'\" },\n borderInlineStyle: { property: 'inlineBorder', hint: \"inlineBorder: '...'\" },\n borderInlineStart: {\n property: 'inlineBorder',\n hint: \"inlineBorder: '... start'\",\n },\n borderInlineEnd: {\n property: 'inlineBorder',\n hint: \"inlineBorder: '... end'\",\n },\n minBlockSize: { property: 'blockSize', hint: \"blockSize: 'min ...'\" },\n maxBlockSize: { property: 'blockSize', hint: \"blockSize: 'max ...'\" },\n minInlineSize: { property: 'inlineSize', hint: \"inlineSize: 'min ...'\" },\n maxInlineSize: { property: 'inlineSize', hint: \"inlineSize: 'max ...'\" },\n};\n\n/**\n * CSS shorthands whose *longhands* are the preferred Tasty form — the reverse\n * of `SHORTHAND_MAPPING`.\n *\n * `flex` is lossy in a way the longhands are not: it resets the two components\n * you did not write to values that are not their CSS initial. `flex: '0'`\n * expands to `flex-grow: 0; flex-shrink: 1; flex-basis: 0%`, so it cannot\n * express \"do not shrink\" (`flexShrink: 0`) at all, and it silently changes\n * `flex-basis`. Writing the longhands keeps each component independent, which\n * also lets them carry separate state maps.\n */\nexport const LONGHAND_MAPPING: Record<\n string,\n { longhands: string[]; hint: string }\n> = {\n flex: {\n longhands: ['flexGrow', 'flexShrink', 'flexBasis'],\n hint: 'flexGrow / flexShrink / flexBasis',\n },\n};\n\n/**\n * CSS transition property names mapped to Tasty semantic transition names.\n */\nexport const TRANSITION_SEMANTIC_MAPPING: Record<string, string> = {\n backgroundColor: 'fill',\n 'background-color': 'fill',\n backgroundImage: 'image',\n 'background-image': 'image',\n borderRadius: 'radius',\n 'border-radius': 'radius',\n borderColor: 'border',\n 'border-color': 'border',\n borderWidth: 'border',\n 'border-width': 'border',\n borderStyle: 'border',\n 'border-style': 'border',\n boxShadow: 'shadow',\n 'box-shadow': 'shadow',\n outlineColor: 'outline',\n 'outline-color': 'outline',\n outlineWidth: 'outline',\n 'outline-width': 'outline',\n outlineOffset: 'outline',\n 'outline-offset': 'outline',\n fontSize: 'preset',\n 'font-size': 'preset',\n lineHeight: 'preset',\n 'line-height': 'preset',\n letterSpacing: 'preset',\n 'letter-spacing': 'preset',\n};\n\n/**\n * Known preset modifiers, mirroring Tasty's preset handler. `normal` sets\n * `line-height: normal`.\n */\nexport const PRESET_MODIFIERS = new Set([\n 'strong',\n 'bold',\n 'italic',\n 'icon',\n 'tight',\n 'normal',\n]);\n\n/**\n * Default import sources for tasty.\n */\nexport const DEFAULT_IMPORT_SOURCES = ['@tenphi/tasty', '@tenphi/tasty/static'];\n\n/**\n * Built-in state prefixes that are always valid (not aliases).\n */\nexport const BUILT_IN_STATE_PREFIXES = new Set([\n '@media',\n '@root',\n '@parent',\n '@own',\n '@supports',\n '@starting',\n '@keyframes',\n '@property',\n '@font-face',\n '@counter-style',\n '@function',\n]);\n\n/**\n * Known CSS pseudo-classes: every standard element pseudo-class in MDN's\n * browser-compat-data (`css.selectors`), plus the Selectors Level 4 ones it\n * does not list yet (`:local-link`, `:target-within`, `:blank`, `:current`).\n * Functional pseudo-classes are listed by name, so `:dir` covers `:dir(rtl)`.\n * The `@page` pseudo-classes (`:first`, `:left`, `:right`) never match elements.\n */\nexport const KNOWN_PSEUDO_CLASSES = new Set([\n // User action\n ':hover',\n ':active',\n ':focus',\n ':focus-visible',\n ':focus-within',\n // Location\n ':any-link',\n ':link',\n ':visited',\n ':local-link',\n ':target',\n ':target-within',\n ':target-current',\n ':target-before',\n ':target-after',\n ':scope',\n // Linguistic\n ':dir',\n ':lang',\n // Input\n ':autofill',\n ':enabled',\n ':disabled',\n ':read-only',\n ':read-write',\n ':placeholder-shown',\n ':default',\n ':checked',\n ':indeterminate',\n ':blank',\n ':valid',\n ':invalid',\n ':user-valid',\n ':user-invalid',\n ':in-range',\n ':out-of-range',\n ':required',\n ':optional',\n // Element display state\n ':open',\n ':popover-open',\n ':modal',\n ':fullscreen',\n ':picture-in-picture',\n // Media resource state\n ':playing',\n ':paused',\n ':seeking',\n ':buffering',\n ':stalled',\n ':muted',\n ':volume-locked',\n // Time-dimensional\n ':current',\n ':past',\n ':future',\n // Tree-structural\n ':root',\n ':empty',\n ':first-child',\n ':last-child',\n ':only-child',\n ':first-of-type',\n ':last-of-type',\n ':only-of-type',\n ':nth-child',\n ':nth-last-child',\n ':nth-of-type',\n ':nth-last-of-type',\n ':heading',\n // Logical combinations\n ':is',\n ':not',\n ':where',\n ':has',\n // Custom elements and shadow DOM\n ':defined',\n ':state',\n ':host',\n ':host-context',\n ':has-slotted',\n // View transitions, interest invokers, navigation and WebXR\n ':active-view-transition',\n ':active-view-transition-type',\n ':interest-source',\n ':interest-target',\n ':navigation-source',\n ':xr-overlay',\n // Pseudo-elements\n '::before',\n '::after',\n '::placeholder',\n '::selection',\n '::first-line',\n '::first-letter',\n '::marker',\n '::backdrop',\n]);\n\n/**\n * Color tokens Tasty provides without any project configuration, so they are\n * always defined whatever the config's `tokens` list says.\n *\n * `#current` compiles to the `currentcolor` keyword, `#clear` is a default\n * replace token for `transparent`, and the rest are registered as default\n * `@property` rules (`#white`, `#black`, and `#border`/`#outline`, which fall\n * back to `currentcolor`). `prefer-custom-property-syntax` rewrites\n * `transparent` / `currentColor` to `#clear` / `#current`, so both must stay here.\n */\nexport const BUILT_IN_COLOR_TOKENS = new Set([\n '#current',\n '#clear',\n '#white',\n '#black',\n '#border',\n '#outline',\n]);\n\n/**\n * CSS named colors (level 1–4) that should be replaced by `#color` tokens.\n * `transparent` and `currentcolor` are excluded — they have their own token\n * suggestions (`#clear`, `#current`) handled by `prefer-custom-property-syntax`.\n */\nexport const NAMED_CSS_COLORS = new Set<string>([\n 'aliceblue',\n 'antiquewhite',\n 'aqua',\n 'aquamarine',\n 'azure',\n 'beige',\n 'bisque',\n 'black',\n 'blanchedalmond',\n 'blue',\n 'blueviolet',\n 'brown',\n 'burlywood',\n 'cadetblue',\n 'chartreuse',\n 'chocolate',\n 'coral',\n 'cornflowerblue',\n 'cornsilk',\n 'crimson',\n 'cyan',\n 'darkblue',\n 'darkcyan',\n 'darkgoldenrod',\n 'darkgray',\n 'darkgreen',\n 'darkgrey',\n 'darkkhaki',\n 'darkmagenta',\n 'darkolivegreen',\n 'darkorange',\n 'darkorchid',\n 'darkred',\n 'darksalmon',\n 'darkseagreen',\n 'darkslateblue',\n 'darkslategray',\n 'darkslategrey',\n 'darkturquoise',\n 'darkviolet',\n 'deeppink',\n 'deepskyblue',\n 'dimgray',\n 'dimgrey',\n 'dodgerblue',\n 'firebrick',\n 'floralwhite',\n 'forestgreen',\n 'fuchsia',\n 'gainsboro',\n 'ghostwhite',\n 'gold',\n 'goldenrod',\n 'gray',\n 'green',\n 'greenyellow',\n 'grey',\n 'honeydew',\n 'hotpink',\n 'indianred',\n 'indigo',\n 'ivory',\n 'khaki',\n 'lavender',\n 'lavenderblush',\n 'lawngreen',\n 'lemonchiffon',\n 'lightblue',\n 'lightcoral',\n 'lightcyan',\n 'lightgoldenrodyellow',\n 'lightgray',\n 'lightgreen',\n 'lightgrey',\n 'lightpink',\n 'lightsalmon',\n 'lightseagreen',\n 'lightskyblue',\n 'lightslategray',\n 'lightslategrey',\n 'lightsteelblue',\n 'lightyellow',\n 'lime',\n 'limegreen',\n 'linen',\n 'magenta',\n 'maroon',\n 'mediumaquamarine',\n 'mediumblue',\n 'mediumorchid',\n 'mediumpurple',\n 'mediumseagreen',\n 'mediumslateblue',\n 'mediumspringgreen',\n 'mediumturquoise',\n 'mediumvioletred',\n 'midnightblue',\n 'mintcream',\n 'mistyrose',\n 'moccasin',\n 'navajowhite',\n 'navy',\n 'oldlace',\n 'olive',\n 'olivedrab',\n 'orange',\n 'orangered',\n 'orchid',\n 'palegoldenrod',\n 'palegreen',\n 'paleturquoise',\n 'palevioletred',\n 'papayawhip',\n 'peachpuff',\n 'peru',\n 'pink',\n 'plum',\n 'powderblue',\n 'purple',\n 'rebeccapurple',\n 'red',\n 'rosybrown',\n 'royalblue',\n 'saddlebrown',\n 'salmon',\n 'sandybrown',\n 'seagreen',\n 'seashell',\n 'sienna',\n 'silver',\n 'skyblue',\n 'slateblue',\n 'slategray',\n 'slategrey',\n 'snow',\n 'springgreen',\n 'steelblue',\n 'tan',\n 'teal',\n 'thistle',\n 'tomato',\n 'turquoise',\n 'violet',\n 'wheat',\n 'white',\n 'whitesmoke',\n 'yellow',\n 'yellowgreen',\n]);\n\n/**\n * CSS system colors (CSS Color 4), lowercase. Tasty (>= 3.12) reads these as\n * colors, matched case-insensitively. Forced-colors styles are written in them,\n * so unlike `NAMED_CSS_COLORS` they are not something to replace with a token.\n * The deprecated system colors (`Menu`, `Window`, `ButtonHighlight`, …) are\n * left out, as Tasty leaves them out.\n */\nexport const SYSTEM_COLORS = new Set<string>([\n 'accentcolor',\n 'accentcolortext',\n 'activetext',\n 'buttonborder',\n 'buttonface',\n 'buttontext',\n 'canvas',\n 'canvastext',\n 'field',\n 'fieldtext',\n 'graytext',\n 'highlight',\n 'highlighttext',\n 'linktext',\n 'mark',\n 'marktext',\n 'selecteditem',\n 'selecteditemtext',\n 'visitedtext',\n]);\n\n/**\n * Properties that accept color values. Used to scope named-color checks so\n * string properties like `content` or `cursor` don't false-positive.\n */\nexport const COLOR_BEARING_PROPERTIES = new Set<string>([\n // Tasty enhanced properties\n 'fill',\n 'svgFill',\n 'color',\n 'caretColor',\n 'accentColor',\n 'shadow',\n 'border',\n 'blockBorder',\n 'inlineBorder',\n 'outline',\n 'fade',\n // CSS background\n 'background',\n 'backgroundColor',\n // CSS border colors\n 'borderColor',\n 'borderTopColor',\n 'borderRightColor',\n 'borderBottomColor',\n 'borderLeftColor',\n // CSS logical border colors — the `block`/`inline` counterparts of the four\n // above, which a writing-mode-aware codebase reaches for just as often.\n 'borderBlockColor',\n 'borderBlockStartColor',\n 'borderBlockEndColor',\n 'borderInlineColor',\n 'borderInlineStartColor',\n 'borderInlineEndColor',\n // CSS shadows\n 'boxShadow',\n 'textShadow',\n // CSS text decoration\n 'textDecorationColor',\n // CSS outline / misc\n 'outlineColor',\n 'scrollbarColor',\n 'columnRuleColor',\n // SVG\n 'stroke',\n 'stopColor',\n 'floodColor',\n 'lightingColor',\n]);\n\n/**\n * Properties where tasty does NOT expand a `$name` custom-property reference.\n *\n * **Empty since tasty 3.0.2**, which taught the pass-through style handlers to\n * substitute `$name` refs too (tasty#264). Before that, `fontFamily:\n * '$font-sans'` emitted a literal `font-family: $font-sans` — an invalid\n * declaration the browser drops — so `prefer-custom-property-syntax` had to\n * suppress the rewrite for two dozen properties. It no longer does, which means\n * those rewrites are now offered where they were previously (and, since 3.0.2,\n * needlessly) held back.\n *\n * The set is kept rather than deleted: it is the seam the round-trip guard\n * writes to, so a future handler that regains pass-through behaviour surfaces\n * as a failing test instead of a silently broken autofix.\n *\n * An empty list here would let `--fix` delete a declaration on 3.0.0/3.0.1,\n * which the `@tenphi/tasty` peer floor rules out — that floor is 3.8.0, set by\n * the logical renames in {@link SHORTHAND_MAPPING} rather than by this list.\n *\n * Note that {@link PROPERTIES_WITHOUT_COLOR_TOKEN_EXPANSION} is *not* empty:\n * `#token` expansion is still property-scoped (`fontSize: '#accent'` is\n * meaningless and passes through). The two sets are genuinely different.\n *\n * Derived from the runtime, not by hand — `constants.round-trip.test.ts` rebuilds\n * both sets against the installed `@tenphi/tasty` and fails if either drifts.\n */\nexport const PROPERTIES_WITHOUT_CUSTOM_PROPERTY_EXPANSION = new Set<string>([]);\n\n/**\n * Properties where tasty does NOT expand a `#name` colour token.\n *\n * Mostly dimension and keyword properties: `fontSize: '#accent'` is meaningless,\n * so the handler leaves the value alone and the declaration is dropped. Suggesting\n * `#x` for a `var(--x-color)` inside one of these would break it.\n *\n * See {@link PROPERTIES_WITHOUT_CUSTOM_PROPERTY_EXPANSION} for why this is a\n * separate list rather than the same one.\n */\nexport const PROPERTIES_WITHOUT_COLOR_TOKEN_EXPANSION = new Set([\n 'align',\n 'alignContent',\n 'alignItems',\n 'backgroundAttachment',\n 'backgroundClip',\n 'backgroundOrigin',\n 'backgroundRepeat',\n 'display',\n 'font',\n 'fontFamily',\n 'fontSize',\n 'fontStyle',\n 'fontWeight',\n 'justify',\n 'justifyContent',\n 'justifyItems',\n 'letterSpacing',\n 'lineHeight',\n 'outlineOffset',\n 'overflow',\n 'place',\n 'placeContent',\n 'placeItems',\n 'textTransform',\n 'whiteSpace',\n]);\n"],"mappings":";;AAuBA,MAAa,gBAAgB,CAAC,SAAS,MAAM;;AAG7C,MAAa,sBAAsB,CAAC,aAAa,aAAa;AAC9D,MAAa,iCAAiC;CAC5C;CACA;CACA;CACA;CACD;;;;;;AAOD,MAAa,yBAAyB;CACpC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACD;;;;;;AAOD,MAAa,wBAAwB,CAAC,eAAe,eAAe;;AAGpE,MAAa,iBAAiB;CAC5B,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACJ;;AAGD,MAAa,kBAAkB;CAC7B;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACD;;AAGD,MAAa,mBAAmB;CAC9B;CACA;CACA,GAAG;CACH;CACA;CACA;CACA;CACD;;;;AAKD,MAAa,yBAAyB,IAAI,IAAI;CAC5C;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CAIA;CACA;CACA,GAAG;CACJ,CAAC;;;;;;AAOF,MAAa,qBAAqB,IAAI,IAAI;CACxC;CACA;CACA;CACA;CACA;CACD,CAAC;;;;;;;AAQF,MAAa,6BAAqD;CAChE,eAAe;CACf,aAAa;CACb,iBAAiB;CAClB;;;;;;;;;;;;;;;;;;;;;;AAuBD,MAAM,yBAAyB;CAC7B;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACD;;;;;;AAOD,MAAa,0BAA0B;CAGrC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACD;;;;AAKD,MAAa,uBAAuB,IAAI,IAAI,CAC1C,GAAG,wBACH,GAAG,wBACJ,CAAC;;;;AAKF,MAAa,iBAAiB,IAAI,IAAI;CAAC;CAAK;CAAK;CAAM;CAAM;CAAM;CAAM;CAAK,CAAC;;;;;;;AAQ/E,MAAa,6BAA6B,IAAI,IAAI;CAChD;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACD,CAAC;;;;AAKF,MAAa,YAAY,IAAI,IAAI;CAC/B;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACD,CAAC;;;;;;;;;AAUF,MAAa,0BAA0B,IAAI,IAAI;CAC7C;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CAEA;CACA;CACA;CACA;CACA;CACA;CACA;CAaA,GAAG;CACH,GAAG;CACH,GAAG;CACJ,CAAC;;;;AAKF,MAAa,wBAAqD;CAChE,QAAQ,IAAI,IAAI;EAAC;EAAO;EAAS;EAAU;EAAO,CAAC;CACnD,QAAQ,IAAI,IAAI;EACd;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACD,CAAC;CACF,SAAS,IAAI,IAAI;EAAC;EAAO;EAAS;EAAU;EAAO,CAAC;CACpD,QAAQ,IAAI,IAAI;EAAC;EAAO;EAAS;EAAU;EAAO,CAAC;CACnD,MAAM,IAAI,IAAI;EAAC;EAAO;EAAS;EAAU;EAAO,CAAC;CACjD,cAAc,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,IAAI,IAAI;CAE1C;CACA;CACA;CACA;CACA;CAEA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CAEA;CACA;CAEA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CAEA;CACA;CACA;CACA;CACA;CAEA;CACA;CACA;CACA;CACA;CACA;CACA;CAEA;CACA;CACA;CAEA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CAEA;CACA;CACA;CACA;CAEA;CACA;CACA;CACA;CACA;CAEA;CACA;CACA;CACA;CACA;CACA;CAEA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACD,CAAC;;;;;;;;;;;AAYF,MAAa,wBAAwB,IAAI,IAAI;CAC3C;CACA;CACA;CACA;CACA;CACA;CACD,CAAC;;;;;;AAOF,MAAa,mBAAmB,IAAI,IAAY;CAC9C;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACD,CAAC;;;;;;;;AASF,MAAa,gBAAgB,IAAI,IAAY;CAC3C;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACD,CAAC;;;;;AAMF,MAAa,2BAA2B,IAAI,IAAY;CAEtD;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CAEA;CACA;CAEA;CACA;CACA;CACA;CACA;CAGA;CACA;CACA;CACA;CACA;CACA;CAEA;CACA;CAEA;CAEA;CACA;CACA;CAEA;CACA;CACA;CACA;CACD,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;AA4BF,MAAa,+DAA+C,IAAI,IAAY,EAAE,CAAC;;;;;;;;;;;AAY/E,MAAa,2CAA2C,IAAI,IAAI;CAC9D;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACD,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -41,6 +41,7 @@ import prefer_auto_calc_default from "./rules/prefer-auto-calc.js";
|
|
|
41
41
|
import prefer_state_negation_default from "./rules/prefer-state-negation.js";
|
|
42
42
|
import prefer_custom_property_syntax_default from "./rules/prefer-custom-property-syntax.js";
|
|
43
43
|
import prefer_hide_default from "./rules/prefer-hide.js";
|
|
44
|
+
import prefer_fill_mix_default from "./rules/prefer-fill-mix.js";
|
|
44
45
|
import prefer_directional_shorthand_default from "./rules/prefer-directional-shorthand.js";
|
|
45
46
|
import prefer_longhand_property_default from "./rules/prefer-longhand-property.js";
|
|
46
47
|
import { recommended, strict } from "./configs.js";
|
|
@@ -89,6 +90,7 @@ const ruleMap = {
|
|
|
89
90
|
"prefer-state-negation": prefer_state_negation_default,
|
|
90
91
|
"prefer-custom-property-syntax": prefer_custom_property_syntax_default,
|
|
91
92
|
"prefer-hide": prefer_hide_default,
|
|
93
|
+
"prefer-fill-mix": prefer_fill_mix_default,
|
|
92
94
|
"prefer-directional-shorthand": prefer_directional_shorthand_default,
|
|
93
95
|
"prefer-longhand-property": prefer_longhand_property_default
|
|
94
96
|
};
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["rules.knownProperty","rules.validValue","rules.validColorToken","rules.validCustomUnit","rules.validStateKey","rules.validStylesStructure","rules.noNestedSelector","rules.noStateInSelector","rules.preferElementSelector","rules.validCustomProperty","rules.validPreset","rules.validRecipe","rules.validBooleanProperty","rules.validDirectionalModifier","rules.validRadiusShape","rules.noImportant","rules.validSubElement","rules.noNestedStateMap","rules.staticNoDynamicValues","rules.staticValidSelector","rules.preferShorthandProperty","rules.validTransition","rules.requireDefaultState","rules.noUnknownStateAlias","rules.noRawColorValues","rules.noRawTransitionDuration","rules.noRawMotionDuration","rules.noStylesProp","rules.noStyleProp","rules.noClassNameProp","rules.noProtectedRestyle","rules.consistentTokenUsage","rules.noRuntimeStylesMutation","rules.noStyleSpread","rules.validStateDefinition","rules.noOwnAtRoot","rules.noIgnoredPseudoElementState","rules.validDefaultStateOrder","rules.preferAutoCalc","rules.preferStateNegation","rules.preferCustomPropertySyntax","rules.preferHide","rules.preferDirectionalShorthand","rules.preferLonghandProperty"],"sources":["../src/index.ts"],"sourcesContent":["import type { TSESLint } from '@typescript-eslint/utils';\nimport * as rules from './rules/index.js';\nimport { recommended, strict } from './configs.js';\nimport { version } from './version.js';\n\nconst ruleMap: Record<string, TSESLint.RuleModule<string, unknown[]>> = {\n 'known-property': rules.knownProperty,\n 'valid-value': rules.validValue,\n 'valid-color-token': rules.validColorToken,\n 'valid-custom-unit': rules.validCustomUnit,\n 'valid-state-key': rules.validStateKey,\n 'valid-styles-structure': rules.validStylesStructure,\n 'no-nested-selector': rules.noNestedSelector,\n 'no-state-in-selector': rules.noStateInSelector,\n 'prefer-element-selector': rules.preferElementSelector,\n 'valid-custom-property': rules.validCustomProperty,\n 'valid-preset': rules.validPreset,\n 'valid-recipe': rules.validRecipe,\n 'valid-boolean-property': rules.validBooleanProperty,\n 'valid-directional-modifier': rules.validDirectionalModifier,\n 'valid-radius-shape': rules.validRadiusShape,\n 'no-important': rules.noImportant,\n 'valid-sub-element': rules.validSubElement,\n 'no-nested-state-map': rules.noNestedStateMap,\n 'static-no-dynamic-values': rules.staticNoDynamicValues,\n 'static-valid-selector': rules.staticValidSelector,\n 'prefer-shorthand-property': rules.preferShorthandProperty,\n 'valid-transition': rules.validTransition,\n 'require-default-state': rules.requireDefaultState,\n 'no-unknown-state-alias': rules.noUnknownStateAlias,\n 'no-raw-color-values': rules.noRawColorValues,\n 'no-raw-transition-duration': rules.noRawTransitionDuration,\n 'no-raw-motion-duration': rules.noRawMotionDuration,\n 'no-styles-prop': rules.noStylesProp,\n 'no-style-prop': rules.noStyleProp,\n 'no-classname-prop': rules.noClassNameProp,\n 'no-protected-restyle': rules.noProtectedRestyle,\n 'consistent-token-usage': rules.consistentTokenUsage,\n 'no-runtime-styles-mutation': rules.noRuntimeStylesMutation,\n 'no-style-spread': rules.noStyleSpread,\n 'valid-state-definition': rules.validStateDefinition,\n 'no-own-at-root': rules.noOwnAtRoot,\n 'no-ignored-pseudo-element-state': rules.noIgnoredPseudoElementState,\n 'valid-default-state-order': rules.validDefaultStateOrder,\n 'prefer-auto-calc': rules.preferAutoCalc,\n 'prefer-state-negation': rules.preferStateNegation,\n 'prefer-custom-property-syntax': rules.preferCustomPropertySyntax,\n 'prefer-hide': rules.preferHide,\n 'prefer-directional-shorthand': rules.preferDirectionalShorthand,\n 'prefer-longhand-property': rules.preferLonghandProperty,\n};\n\nconst plugin = {\n meta: {\n name: '@tenphi/eslint-plugin-tasty',\n version,\n },\n rules: ruleMap,\n configs: {\n recommended: {\n plugins: {\n get tasty() {\n return plugin;\n },\n },\n rules: recommended,\n },\n strict: {\n plugins: {\n get tasty() {\n return plugin;\n },\n },\n rules: strict,\n },\n },\n} satisfies TSESLint.FlatConfig.Plugin & {\n configs: Record<string, TSESLint.FlatConfig.Config>;\n};\n\nexport default plugin;\n\nexport { recommended, strict } from './configs.js';\nexport type { TypeAwareJSXOptions } from './type-aware-jsx.js';\nexport type {\n TastyValidationConfig,\n ResolvedConfig,\n StyleFunctionConfig,\n ProtectedComponentConfig,\n} from './types.js';\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","names":["rules.knownProperty","rules.validValue","rules.validColorToken","rules.validCustomUnit","rules.validStateKey","rules.validStylesStructure","rules.noNestedSelector","rules.noStateInSelector","rules.preferElementSelector","rules.validCustomProperty","rules.validPreset","rules.validRecipe","rules.validBooleanProperty","rules.validDirectionalModifier","rules.validRadiusShape","rules.noImportant","rules.validSubElement","rules.noNestedStateMap","rules.staticNoDynamicValues","rules.staticValidSelector","rules.preferShorthandProperty","rules.validTransition","rules.requireDefaultState","rules.noUnknownStateAlias","rules.noRawColorValues","rules.noRawTransitionDuration","rules.noRawMotionDuration","rules.noStylesProp","rules.noStyleProp","rules.noClassNameProp","rules.noProtectedRestyle","rules.consistentTokenUsage","rules.noRuntimeStylesMutation","rules.noStyleSpread","rules.validStateDefinition","rules.noOwnAtRoot","rules.noIgnoredPseudoElementState","rules.validDefaultStateOrder","rules.preferAutoCalc","rules.preferStateNegation","rules.preferCustomPropertySyntax","rules.preferHide","rules.preferFillMix","rules.preferDirectionalShorthand","rules.preferLonghandProperty"],"sources":["../src/index.ts"],"sourcesContent":["import type { TSESLint } from '@typescript-eslint/utils';\nimport * as rules from './rules/index.js';\nimport { recommended, strict } from './configs.js';\nimport { version } from './version.js';\n\nconst ruleMap: Record<string, TSESLint.RuleModule<string, unknown[]>> = {\n 'known-property': rules.knownProperty,\n 'valid-value': rules.validValue,\n 'valid-color-token': rules.validColorToken,\n 'valid-custom-unit': rules.validCustomUnit,\n 'valid-state-key': rules.validStateKey,\n 'valid-styles-structure': rules.validStylesStructure,\n 'no-nested-selector': rules.noNestedSelector,\n 'no-state-in-selector': rules.noStateInSelector,\n 'prefer-element-selector': rules.preferElementSelector,\n 'valid-custom-property': rules.validCustomProperty,\n 'valid-preset': rules.validPreset,\n 'valid-recipe': rules.validRecipe,\n 'valid-boolean-property': rules.validBooleanProperty,\n 'valid-directional-modifier': rules.validDirectionalModifier,\n 'valid-radius-shape': rules.validRadiusShape,\n 'no-important': rules.noImportant,\n 'valid-sub-element': rules.validSubElement,\n 'no-nested-state-map': rules.noNestedStateMap,\n 'static-no-dynamic-values': rules.staticNoDynamicValues,\n 'static-valid-selector': rules.staticValidSelector,\n 'prefer-shorthand-property': rules.preferShorthandProperty,\n 'valid-transition': rules.validTransition,\n 'require-default-state': rules.requireDefaultState,\n 'no-unknown-state-alias': rules.noUnknownStateAlias,\n 'no-raw-color-values': rules.noRawColorValues,\n 'no-raw-transition-duration': rules.noRawTransitionDuration,\n 'no-raw-motion-duration': rules.noRawMotionDuration,\n 'no-styles-prop': rules.noStylesProp,\n 'no-style-prop': rules.noStyleProp,\n 'no-classname-prop': rules.noClassNameProp,\n 'no-protected-restyle': rules.noProtectedRestyle,\n 'consistent-token-usage': rules.consistentTokenUsage,\n 'no-runtime-styles-mutation': rules.noRuntimeStylesMutation,\n 'no-style-spread': rules.noStyleSpread,\n 'valid-state-definition': rules.validStateDefinition,\n 'no-own-at-root': rules.noOwnAtRoot,\n 'no-ignored-pseudo-element-state': rules.noIgnoredPseudoElementState,\n 'valid-default-state-order': rules.validDefaultStateOrder,\n 'prefer-auto-calc': rules.preferAutoCalc,\n 'prefer-state-negation': rules.preferStateNegation,\n 'prefer-custom-property-syntax': rules.preferCustomPropertySyntax,\n 'prefer-hide': rules.preferHide,\n 'prefer-fill-mix': rules.preferFillMix,\n 'prefer-directional-shorthand': rules.preferDirectionalShorthand,\n 'prefer-longhand-property': rules.preferLonghandProperty,\n};\n\nconst plugin = {\n meta: {\n name: '@tenphi/eslint-plugin-tasty',\n version,\n },\n rules: ruleMap,\n configs: {\n recommended: {\n plugins: {\n get tasty() {\n return plugin;\n },\n },\n rules: recommended,\n },\n strict: {\n plugins: {\n get tasty() {\n return plugin;\n },\n },\n rules: strict,\n },\n },\n} satisfies TSESLint.FlatConfig.Plugin & {\n configs: Record<string, TSESLint.FlatConfig.Config>;\n};\n\nexport default plugin;\n\nexport { recommended, strict } from './configs.js';\nexport type { TypeAwareJSXOptions } from './type-aware-jsx.js';\nexport type {\n TastyValidationConfig,\n ResolvedConfig,\n StyleFunctionConfig,\n ProtectedComponentConfig,\n} from './types.js';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAKA,MAAM,UAAkE;CACtE,kBAAkBA;CAClB,eAAeC;CACf,qBAAqBC;CACrB,qBAAqBC;CACrB,mBAAmBC;CACnB,0BAA0BC;CAC1B,sBAAsBC;CACtB,wBAAwBC;CACxB,2BAA2BC;CAC3B,yBAAyBC;CACzB,gBAAgBC;CAChB,gBAAgBC;CAChB,0BAA0BC;CAC1B,8BAA8BC;CAC9B,sBAAsBC;CACtB,gBAAgBC;CAChB,qBAAqBC;CACrB,uBAAuBC;CACvB,4BAA4BC;CAC5B,yBAAyBC;CACzB,6BAA6BC;CAC7B,oBAAoBC;CACpB,yBAAyBC;CACzB,0BAA0BC;CAC1B,uBAAuBC;CACvB,8BAA8BC;CAC9B,0BAA0BC;CAC1B,kBAAkBC;CAClB,iBAAiBC;CACjB,qBAAqBC;CACrB,wBAAwBC;CACxB,0BAA0BC;CAC1B,8BAA8BC;CAC9B,mBAAmBC;CACnB,0BAA0BC;CAC1B,kBAAkBC;CAClB,mCAAmCC;CACnC,6BAA6BC;CAC7B,oBAAoBC;CACpB,yBAAyBC;CACzB,iCAAiCC;CACjC,eAAeC;CACf,mBAAmBC;CACnB,gCAAgCC;CAChC,4BAA4BC;CAC7B;AAED,MAAM,SAAS;CACb,MAAM;EACJ,MAAM;EACN;EACD;CACD,OAAO;CACP,SAAS;EACP,aAAa;GACX,SAAS,EACP,IAAI,QAAQ;AACV,WAAO;MAEV;GACD,OAAO;GACR;EACD,QAAQ;GACN,SAAS,EACP,IAAI,QAAQ;AACV,WAAO;MAEV;GACD,OAAO;GACR;EACF;CACF"}
|
|
@@ -7,6 +7,7 @@ const RE_NUMBER = /^[+-]?(?:\d*\.\d+|\d+)$/;
|
|
|
7
7
|
const RE_CSS_UNIT_NUM = /^[+-]?(?:\d*\.\d+|\d+)([a-z%]+)$/;
|
|
8
8
|
/** An unspaced `<ratio>`, such as `16/10`. */
|
|
9
9
|
const RE_RATIO = /^(?:\d*\.\d+|\d+)\/(?:\d*\.\d+|\d+)$/;
|
|
10
|
+
/** Functions the parser classifies as colors. */
|
|
10
11
|
const COLOR_FUNCS = new Set([
|
|
11
12
|
"rgb",
|
|
12
13
|
"rgba",
|
|
@@ -663,5 +664,5 @@ function parseValue(src, opts = {}) {
|
|
|
663
664
|
}
|
|
664
665
|
|
|
665
666
|
//#endregion
|
|
666
|
-
export { parseValue };
|
|
667
|
+
export { COLOR_FUNCS, parseValue };
|
|
667
668
|
//# sourceMappingURL=value-parser.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"value-parser.js","names":[],"sources":["../../src/parsers/value-parser.ts"],"sourcesContent":["import { scanTokens, checkBracketBalance } from './utils.js';\nimport {\n BUILT_IN_UNITS,\n CSS_UNITS,\n NAMED_CSS_COLORS,\n SYSTEM_COLORS,\n} from '../constants.js';\n\n// ============================================================================\n// Types\n// ============================================================================\n\nexport type ValueToken =\n | { type: 'color-token'; name: string; opacity?: string; raw: string }\n | { type: 'color-ref'; name: string; raw: string }\n /** A CSS named color (`rebeccapurple`) or system color (`Canvas`). */\n | { type: 'color-keyword'; raw: string }\n | { type: 'custom-prop'; name: string; raw: string }\n | { type: 'custom-prop-ref'; name: string; raw: string }\n | { type: 'custom-unit'; value: number; unit: string; raw: string }\n | { type: 'css-unit'; value: number; unit: string; raw: string }\n | { type: 'number'; value: number; raw: string }\n /** An unspaced `<ratio>`, such as `16/10`; the spaced form is two parts. */\n | { type: 'ratio'; raw: string }\n | { type: 'keyword'; value: string }\n | { type: 'css-function'; name: string; args: string; raw: string }\n /**\n * A Tasty CSS `@function` call: `$$name(args)` (emits native `--name(args)`).\n * Distinct from `custom-prop-ref`, which is the bare `$$name` form that\n * `transition` uses to name a custom property.\n */\n | { type: 'tasty-function'; name: string; args: string; raw: string }\n | { type: 'string'; value: string; raw: string }\n | { type: 'important'; raw: string }\n | { type: 'group-expr'; inner: string; raw: string }\n | { type: 'unknown'; raw: string };\n\nexport interface ValueError {\n message: string;\n offset: number;\n length: number;\n raw?: string;\n}\n\nexport interface ValuePart {\n tokens: ValueToken[];\n}\n\nexport interface ValueGroup {\n parts: ValuePart[];\n}\n\nexport interface ValueParseResult {\n groups: ValueGroup[];\n errors: ValueError[];\n}\n\nexport interface ValueParserOptions {\n knownUnits?: Set<string> | string[];\n knownFuncs?: Set<string> | string[];\n skipUnitValidation?: boolean;\n skipFuncValidation?: boolean;\n}\n\n// ============================================================================\n// Constants\n// ============================================================================\n\nconst RE_UNIT_NUM = /^[+-]?(?:\\d*\\.\\d+|\\d+)([a-z][a-z0-9]*)$/;\nconst RE_NUMBER = /^[+-]?(?:\\d*\\.\\d+|\\d+)$/;\nconst RE_CSS_UNIT_NUM = /^[+-]?(?:\\d*\\.\\d+|\\d+)([a-z%]+)$/;\n/** An unspaced `<ratio>`, such as `16/10`. */\nconst RE_RATIO = /^(?:\\d*\\.\\d+|\\d+)\\/(?:\\d*\\.\\d+|\\d+)$/;\n\nconst COLOR_FUNCS = new Set([\n 'rgb',\n 'rgba',\n 'hsl',\n 'hsla',\n 'hwb',\n 'lab',\n 'lch',\n 'oklab',\n 'oklch',\n 'color',\n 'device-cmyk',\n 'gray',\n 'color-mix',\n 'color-contrast',\n]);\n\nconst CSS_FUNCS = new Set([\n 'calc',\n 'calc-size',\n 'min',\n 'max',\n 'clamp',\n 'abs',\n 'sign',\n 'round',\n 'mod',\n 'rem',\n 'sin',\n 'cos',\n 'tan',\n 'asin',\n 'acos',\n 'atan',\n 'atan2',\n 'pow',\n 'sqrt',\n 'hypot',\n 'log',\n 'exp',\n 'var',\n 'env',\n 'attr',\n 'counter',\n 'counters',\n 'image-set',\n 'cross-fade',\n 'image',\n 'paint',\n 'element',\n 'linear-gradient',\n 'radial-gradient',\n 'conic-gradient',\n 'repeating-linear-gradient',\n 'repeating-radial-gradient',\n 'repeating-conic-gradient',\n 'url',\n 'fit-content',\n 'minmax',\n 'repeat',\n 'cubic-bezier',\n 'steps',\n 'linear',\n 'rotate',\n 'scale',\n 'translate',\n 'skew',\n 'matrix',\n 'perspective',\n 'rotate3d',\n 'rotateX',\n 'rotateY',\n 'rotateZ',\n 'scale3d',\n 'scaleX',\n 'scaleY',\n 'scaleZ',\n 'translate3d',\n 'translateX',\n 'translateY',\n 'translateZ',\n 'skewX',\n 'skewY',\n 'matrix3d',\n 'blur',\n 'brightness',\n 'contrast',\n 'drop-shadow',\n 'grayscale',\n 'hue-rotate',\n 'invert',\n 'opacity',\n 'saturate',\n 'sepia',\n 'polygon',\n 'circle',\n 'ellipse',\n 'inset',\n 'path',\n 'xywh',\n 'rect',\n 'ray',\n 'light-dark',\n 'anchor',\n 'anchor-size',\n 'scroll',\n 'view',\n 'symbols',\n]);\n\nconst VALUE_KEYWORDS = new Set([\n 'auto',\n 'none',\n 'normal',\n 'inherit',\n 'initial',\n 'unset',\n 'revert',\n 'revert-layer',\n 'max-content',\n 'min-content',\n 'fit-content',\n 'stretch',\n 'transparent',\n 'currentcolor',\n 'currentColor',\n // display\n 'block',\n 'inline',\n 'inline-block',\n 'flex',\n 'inline-flex',\n 'grid',\n 'inline-grid',\n 'contents',\n 'table',\n 'table-row',\n 'table-cell',\n 'list-item',\n 'flow-root',\n // position\n 'static',\n 'relative',\n 'absolute',\n 'fixed',\n 'sticky',\n // overflow\n 'visible',\n 'hidden',\n 'scroll',\n 'clip',\n 'overlay',\n // flex/align\n 'center',\n 'start',\n 'end',\n 'flex-start',\n 'flex-end',\n 'space-between',\n 'space-around',\n 'space-evenly',\n 'baseline',\n // flow\n 'row',\n 'column',\n 'row-reverse',\n 'column-reverse',\n 'wrap',\n 'nowrap',\n 'dense',\n // border\n 'solid',\n 'dashed',\n 'dotted',\n 'double',\n 'groove',\n 'ridge',\n 'outset',\n // directional\n 'top',\n 'right',\n 'bottom',\n 'left',\n 'top-left',\n 'top-right',\n 'bottom-left',\n 'bottom-right',\n // radius shapes\n 'round',\n 'ellipse',\n 'leaf',\n 'backleaf',\n // dimension modifiers\n 'min',\n 'max',\n // text\n 'bold',\n 'bolder',\n 'lighter',\n 'italic',\n 'oblique',\n 'uppercase',\n 'lowercase',\n 'capitalize',\n 'line-through',\n 'underline',\n 'overline',\n 'wavy',\n // cursor\n 'pointer',\n 'default',\n 'text',\n 'move',\n 'grab',\n 'grabbing',\n 'not-allowed',\n 'crosshair',\n 'wait',\n 'help',\n 'col-resize',\n 'row-resize',\n 'n-resize',\n 's-resize',\n 'e-resize',\n 'w-resize',\n 'ne-resize',\n 'nw-resize',\n 'se-resize',\n 'sw-resize',\n 'ew-resize',\n 'ns-resize',\n 'zoom-in',\n 'zoom-out',\n // misc\n 'cover',\n 'contain',\n 'fill',\n 'no-repeat',\n 'repeat-x',\n 'repeat-y',\n 'border-box',\n 'padding-box',\n 'content-box',\n 'break-word',\n 'break-all',\n 'keep-all',\n 'anywhere',\n 'pre',\n 'pre-wrap',\n 'pre-line',\n 'balance',\n 'smooth',\n 'horizontal',\n 'vertical',\n 'both',\n 'mandatory',\n 'proximity',\n // white-space\n 'collapse',\n 'preserve',\n 'preserve-breaks',\n 'break-spaces',\n // text-wrap\n 'pretty',\n 'stable',\n // will-change\n 'transform',\n 'opacity',\n // animation\n 'infinite',\n 'alternate',\n 'alternate-reverse',\n 'reverse',\n 'forwards',\n 'backwards',\n 'running',\n 'paused',\n 'ease',\n 'ease-in',\n 'ease-out',\n 'ease-in-out',\n 'step-start',\n 'step-end',\n // scrollbar\n 'thin',\n 'always',\n 'both-edges',\n // width/height\n 'fixed',\n // shadow\n 'inset',\n // textOverflow\n 'clip',\n // other\n 'ltr',\n 'rtl',\n 'embed',\n 'isolate',\n 'isolate-override',\n 'plaintext',\n 'horizontal-tb',\n 'vertical-rl',\n 'vertical-lr',\n 'sideways-rl',\n 'sideways-lr',\n 'monospace',\n 'serif',\n 'sans-serif',\n 'cursive',\n 'fantasy',\n 'system-ui',\n 'ui-serif',\n 'ui-sans-serif',\n 'ui-monospace',\n 'ui-rounded',\n 'to',\n // misc\n 'strong',\n 'tight',\n 'icon',\n]);\n\n// ============================================================================\n// Classifier\n// ============================================================================\n\nfunction toSet(input?: Set<string> | string[]): Set<string> {\n if (!input) return new Set();\n return input instanceof Set ? input : new Set(input);\n}\n\nfunction classifyToken(\n raw: string,\n offset: number,\n errors: ValueError[],\n opts: ValueParserOptions,\n): ValueToken {\n const token = raw.trim();\n if (!token) return { type: 'keyword', value: '' };\n\n // Quoted strings\n if (\n (token.startsWith('\"') && token.endsWith('\"')) ||\n (token.startsWith(\"'\") && token.endsWith(\"'\"))\n ) {\n return { type: 'string', value: token.slice(1, -1), raw: token };\n }\n\n // !important\n if (token === '!important') {\n return { type: 'important', raw: token };\n }\n\n // Double prefix: $$name(...) is a Tasty `@function` call; bare $$name is the\n // custom-property reference `transition` uses. The call form must be checked\n // first, or the bare-name regex rejects `$$negative(10px)` outright.\n if (token.startsWith('$$') || token.startsWith('##')) {\n const call = classifyTastyFunctionCall(token, offset, errors);\n if (call) return call;\n }\n\n // Double prefix: $$name (custom property reference for transitions)\n if (token.startsWith('$$')) {\n const name = token.slice(2);\n if (/^[a-z_][a-z0-9-_]*$/i.test(name)) {\n return { type: 'custom-prop-ref', name, raw: token };\n }\n errors.push({\n message: `Invalid custom property reference '${token}'.`,\n offset,\n length: token.length,\n raw: token,\n });\n return { type: 'unknown', raw: token };\n }\n\n // Double prefix: ##name (color reference for transitions)\n if (token.startsWith('##')) {\n const name = token.slice(2);\n if (/^[a-z_][a-z0-9-_]*$/i.test(name)) {\n return { type: 'color-ref', name, raw: token };\n }\n errors.push({\n message: `Invalid color reference '${token}'.`,\n offset,\n length: token.length,\n raw: token,\n });\n return { type: 'unknown', raw: token };\n }\n\n // Custom property: $name\n if (token.startsWith('$')) {\n const name = token.slice(1);\n if (/^[a-z_][a-z0-9-_]*$/i.test(name)) {\n return { type: 'custom-prop', name, raw: token };\n }\n errors.push({\n message: `Invalid custom property syntax '${token}'.`,\n offset,\n length: token.length,\n raw: token,\n });\n return { type: 'unknown', raw: token };\n }\n\n // Color token: #name, #name.N, #name.$prop, or bare # (error)\n if (token.startsWith('#')) {\n if (token.length === 1) {\n errors.push({\n message: 'Empty color token name.',\n offset,\n length: 1,\n raw: token,\n });\n return { type: 'unknown', raw: token };\n }\n return classifyColorToken(token, offset, errors);\n }\n\n // Parenthesized expression: (expr) — fallback, auto-calc, etc.\n if (token.startsWith('(') && token.endsWith(')')) {\n return { type: 'group-expr', inner: token.slice(1, -1), raw: token };\n }\n\n // Function call: name(...)\n const openIdx = token.indexOf('(');\n if (openIdx > 0 && token.endsWith(')')) {\n const fname = token.slice(0, openIdx);\n const args = token.slice(openIdx + 1, -1);\n\n if (opts.skipFuncValidation) {\n return { type: 'css-function', name: fname, args, raw: token };\n }\n\n const knownFuncs = toSet(opts.knownFuncs);\n\n if (\n COLOR_FUNCS.has(fname) ||\n CSS_FUNCS.has(fname) ||\n knownFuncs.has(fname)\n ) {\n return { type: 'css-function', name: fname, args, raw: token };\n }\n\n // Unknown function — still return as css-function but flag it\n errors.push({\n message: `Unknown function '${fname}()'.`,\n offset,\n length: token.length,\n raw: token,\n });\n return { type: 'css-function', name: fname, args, raw: token };\n }\n\n // Unit number: 2x, 1.5r, 10px, 50%, 1fr\n const unitMatch = token.match(RE_UNIT_NUM);\n if (unitMatch) {\n const unit = unitMatch[1];\n const numVal = parseFloat(token.slice(0, -unit.length));\n\n if (opts.skipUnitValidation) {\n return { type: 'custom-unit', value: numVal, unit, raw: token };\n }\n\n const knownUnits = toSet(opts.knownUnits);\n\n if (BUILT_IN_UNITS.has(unit) || knownUnits.has(unit)) {\n return { type: 'custom-unit', value: numVal, unit, raw: token };\n }\n if (CSS_UNITS.has(unit)) {\n return { type: 'css-unit', value: numVal, unit, raw: token };\n }\n\n errors.push({\n message: `Unknown unit '${unit}' in '${token}'.`,\n offset,\n length: token.length,\n raw: token,\n });\n return { type: 'unknown', raw: token };\n }\n\n // CSS unit with % (RE_UNIT_NUM doesn't match % since it expects alpha)\n const cssUnitMatch = token.match(RE_CSS_UNIT_NUM);\n if (cssUnitMatch) {\n const unit = cssUnitMatch[1];\n const numVal = parseFloat(token.slice(0, -unit.length));\n if (CSS_UNITS.has(unit)) {\n return { type: 'css-unit', value: numVal, unit, raw: token };\n }\n }\n\n // Plain number\n if (RE_NUMBER.test(token)) {\n return { type: 'number', value: parseFloat(token), raw: token };\n }\n\n // Unspaced ratio: 16/10\n if (RE_RATIO.test(token)) {\n return { type: 'ratio', raw: token };\n }\n\n // Tasty merge directive (@inherit)\n if (token === '@inherit') {\n return { type: 'keyword', value: token };\n }\n\n // Known keyword\n if (VALUE_KEYWORDS.has(token) || VALUE_KEYWORDS.has(token.toLowerCase())) {\n return { type: 'keyword', value: token };\n }\n\n // Color keyword: no token syntax, so the keyword itself is the color.\n // Matched case-insensitively, as CSS and Tasty match them.\n const lower = token.toLowerCase();\n if (NAMED_CSS_COLORS.has(lower) || SYSTEM_COLORS.has(lower)) {\n return { type: 'color-keyword', raw: token };\n }\n\n // CSS custom property function var(--name)\n if (token.startsWith('var(') && token.endsWith(')')) {\n return {\n type: 'css-function',\n name: 'var',\n args: token.slice(4, -1),\n raw: token,\n };\n }\n\n // Unknown token\n return { type: 'unknown', raw: token };\n}\n\n/**\n * Classify a `$$name(...)` / `##name(...)` Tasty `@function` call.\n *\n * Returns `null` when the token is not a call, so the caller falls through to the\n * bare `$$name` / `##name` reference handling that `transition` relies on.\n */\nfunction classifyTastyFunctionCall(\n token: string,\n offset: number,\n errors: ValueError[],\n): ValueToken | null {\n const openIdx = token.indexOf('(');\n\n if (openIdx <= 2 || !token.endsWith(')')) return null;\n\n const name = token.slice(2, openIdx);\n const args = token.slice(openIdx + 1, -1);\n\n if (!/^[a-z_][a-z0-9-_]*$/i.test(name)) {\n errors.push({\n message: `Invalid function name in '${token}'.`,\n offset,\n length: token.length,\n raw: token,\n });\n return { type: 'unknown', raw: token };\n }\n\n return { type: 'tasty-function', name, args, raw: token };\n}\n\nfunction classifyColorToken(\n token: string,\n offset: number,\n errors: ValueError[],\n): ValueToken {\n const raw = token;\n\n // Strip leading #\n const name = token.slice(1);\n\n if (name.length === 0) {\n errors.push({\n message: 'Empty color token name.',\n offset,\n length: token.length,\n raw,\n });\n return { type: 'unknown', raw };\n }\n\n // Check for opacity suffix\n const dotIndex = name.indexOf('.');\n if (dotIndex !== -1) {\n const tokenName = name.slice(0, dotIndex);\n const opacitySuffix = name.slice(dotIndex + 1);\n\n if (tokenName.length === 0) {\n errors.push({\n message: 'Empty color token name before opacity.',\n offset,\n length: token.length,\n raw,\n });\n return { type: 'unknown', raw };\n }\n\n // Dynamic opacity from CSS custom property\n if (opacitySuffix.startsWith('$')) {\n return {\n type: 'color-token',\n name: tokenName,\n opacity: opacitySuffix,\n raw,\n };\n }\n\n if (opacitySuffix.length === 0) {\n errors.push({\n message: 'Trailing dot with no opacity value.',\n offset,\n length: token.length,\n raw,\n });\n return { type: 'unknown', raw };\n }\n\n // Tasty reads the digits as a decimal fraction (`.5` and `.50` are 50%,\n // `.150` is 15%), so any digit string is in range.\n if (!/^\\d+$/.test(opacitySuffix)) {\n errors.push({\n message: /^-\\d+$/.test(opacitySuffix)\n ? 'Opacity cannot be negative.'\n : `Invalid opacity value '${opacitySuffix}'.`,\n offset,\n length: token.length,\n raw,\n });\n return { type: 'unknown', raw };\n }\n\n return {\n type: 'color-token',\n name: tokenName,\n opacity: opacitySuffix,\n raw,\n };\n }\n\n return { type: 'color-token', name, raw };\n}\n\n// ============================================================================\n// Public API\n// ============================================================================\n\n/**\n * Parse a style value string into typed tokens organized by\n * comma-separated groups and slash-separated parts.\n */\nexport function parseValue(\n src: string,\n opts: ValueParserOptions = {},\n): ValueParseResult {\n const errors: ValueError[] = [];\n\n // Check bracket balance first\n const bracketError = checkBracketBalance(src);\n if (bracketError) {\n errors.push({\n message: bracketError.message,\n offset: bracketError.position,\n length: 1,\n });\n return { groups: [], errors };\n }\n\n const scanned = scanTokens(src);\n\n const groups: ValueGroup[] = [];\n let currentParts: ValuePart[] = [];\n let currentTokens: ValueToken[] = [];\n\n const endPart = () => {\n if (currentTokens.length > 0) {\n currentParts.push({ tokens: currentTokens });\n currentTokens = [];\n }\n };\n\n const endGroup = () => {\n endPart();\n if (currentParts.length > 0) {\n groups.push({ parts: currentParts });\n } else {\n groups.push({ parts: [{ tokens: [] }] });\n }\n currentParts = [];\n };\n\n for (const scanned_token of scanned) {\n if (scanned_token.value) {\n const classified = classifyToken(\n scanned_token.value,\n scanned_token.offset,\n errors,\n opts,\n );\n currentTokens.push(classified);\n }\n if (scanned_token.isSlash) endPart();\n if (scanned_token.isComma) endGroup();\n }\n\n // Push final group\n if (\n currentTokens.length > 0 ||\n currentParts.length > 0 ||\n groups.length === 0\n ) {\n endGroup();\n }\n\n return { groups, errors };\n}\n\n/**\n * Extract all tokens of a specific type from a parse result.\n */\nexport function extractTokensByType<T extends ValueToken['type']>(\n result: ValueParseResult,\n type: T,\n): Extract<ValueToken, { type: T }>[] {\n const tokens: Extract<ValueToken, { type: T }>[] = [];\n for (const group of result.groups) {\n for (const part of group.parts) {\n for (const token of part.tokens) {\n if (token.type === type) {\n tokens.push(token as Extract<ValueToken, { type: T }>);\n }\n }\n }\n }\n return tokens;\n}\n\n/**\n * Get a flat list of all tokens from a parse result.\n */\nexport function flattenTokens(result: ValueParseResult): ValueToken[] {\n const tokens: ValueToken[] = [];\n for (const group of result.groups) {\n for (const part of group.parts) {\n tokens.push(...part.tokens);\n }\n }\n return tokens;\n}\n"],"mappings":";;;;AAoEA,MAAM,cAAc;AACpB,MAAM,YAAY;AAClB,MAAM,kBAAkB;;AAExB,MAAM,WAAW;AAEjB,MAAM,cAAc,IAAI,IAAI;CAC1B;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACD,CAAC;AAEF,MAAM,YAAY,IAAI,IAAI;CACxB;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACD,CAAC;AAEF,MAAM,iBAAiB,IAAI,IAAI;CAC7B;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CAEA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CAEA;CACA;CACA;CACA;CACA;CAEA;CACA;CACA;CACA;CACA;CAEA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CAEA;CACA;CACA;CACA;CACA;CACA;CACA;CAEA;CACA;CACA;CACA;CACA;CACA;CACA;CAEA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CAEA;CACA;CACA;CACA;CAEA;CACA;CAEA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CAEA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CAC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U,WAAW,IAAI;CAE/B,MAAM,SAAuB,EAAE;CAC/B,IAAI,eAA4B,EAAE;CAClC,IAAI,gBAA8B,EAAE;CAEpC,MAAM,gBAAgB;AACpB,MAAI,cAAc,SAAS,GAAG;AAC5B,gBAAa,KAAK,EAAE,QAAQ,eAAe,CAAC;AAC5C,mBAAgB,EAAE;;;CAItB,MAAM,iBAAiB;AACrB,WAAS;AACT,MAAI,aAAa,SAAS,EACxB,QAAO,KAAK,EAAE,OAAO,cAAc,CAAC;MAEpC,QAAO,KAAK,EAAE,OAAO,CAAC,EAAE,QAAQ,EAAE,EAAE,CAAC,EAAE,CAAC;AAE1C,iBAAe,EAAE;;AAGnB,MAAK,MAAM,iBAAiB,SAAS;AACnC,MAAI,cAAc,OAAO;GACvB,MAAM,aAAa,cACjB,cAAc,OACd,cAAc,QACd,QACA,KACD;AACD,iBAAc,KAAK,WAAW;;AAEhC,MAAI,cAAc,QAAS,UAAS;AACpC,MAAI,cAAc,QAAS,WAAU;;AAIvC,KACE,cAAc,SAAS,KACvB,aAAa,SAAS,KACtB,OAAO,WAAW,EAElB,WAAU;AAGZ,QAAO;EAAE;EAAQ;EAAQ"}
|
|
1
|
+
{"version":3,"file":"value-parser.js","names":[],"sources":["../../src/parsers/value-parser.ts"],"sourcesContent":["import { scanTokens, checkBracketBalance } from './utils.js';\nimport {\n BUILT_IN_UNITS,\n CSS_UNITS,\n NAMED_CSS_COLORS,\n SYSTEM_COLORS,\n} from '../constants.js';\n\n// ============================================================================\n// Types\n// ============================================================================\n\nexport type ValueToken =\n | { type: 'color-token'; name: string; opacity?: string; raw: string }\n | { type: 'color-ref'; name: string; raw: string }\n /** A CSS named color (`rebeccapurple`) or system color (`Canvas`). */\n | { type: 'color-keyword'; raw: string }\n | { type: 'custom-prop'; name: string; raw: string }\n | { type: 'custom-prop-ref'; name: string; raw: string }\n | { type: 'custom-unit'; value: number; unit: string; raw: string }\n | { type: 'css-unit'; value: number; unit: string; raw: string }\n | { type: 'number'; value: number; raw: string }\n /** An unspaced `<ratio>`, such as `16/10`; the spaced form is two parts. */\n | { type: 'ratio'; raw: string }\n | { type: 'keyword'; value: string }\n | { type: 'css-function'; name: string; args: string; raw: string }\n /**\n * A Tasty CSS `@function` call: `$$name(args)` (emits native `--name(args)`).\n * Distinct from `custom-prop-ref`, which is the bare `$$name` form that\n * `transition` uses to name a custom property.\n */\n | { type: 'tasty-function'; name: string; args: string; raw: string }\n | { type: 'string'; value: string; raw: string }\n | { type: 'important'; raw: string }\n | { type: 'group-expr'; inner: string; raw: string }\n | { type: 'unknown'; raw: string };\n\nexport interface ValueError {\n message: string;\n offset: number;\n length: number;\n raw?: string;\n}\n\nexport interface ValuePart {\n tokens: ValueToken[];\n}\n\nexport interface ValueGroup {\n parts: ValuePart[];\n}\n\nexport interface ValueParseResult {\n groups: ValueGroup[];\n errors: ValueError[];\n}\n\nexport interface ValueParserOptions {\n knownUnits?: Set<string> | string[];\n knownFuncs?: Set<string> | string[];\n skipUnitValidation?: boolean;\n skipFuncValidation?: boolean;\n}\n\n// ============================================================================\n// Constants\n// ============================================================================\n\nconst RE_UNIT_NUM = /^[+-]?(?:\\d*\\.\\d+|\\d+)([a-z][a-z0-9]*)$/;\nconst RE_NUMBER = /^[+-]?(?:\\d*\\.\\d+|\\d+)$/;\nconst RE_CSS_UNIT_NUM = /^[+-]?(?:\\d*\\.\\d+|\\d+)([a-z%]+)$/;\n/** An unspaced `<ratio>`, such as `16/10`. */\nconst RE_RATIO = /^(?:\\d*\\.\\d+|\\d+)\\/(?:\\d*\\.\\d+|\\d+)$/;\n\n/** Functions the parser classifies as colors. */\nexport const COLOR_FUNCS = new Set([\n 'rgb',\n 'rgba',\n 'hsl',\n 'hsla',\n 'hwb',\n 'lab',\n 'lch',\n 'oklab',\n 'oklch',\n 'color',\n 'device-cmyk',\n 'gray',\n 'color-mix',\n 'color-contrast',\n]);\n\nconst CSS_FUNCS = new Set([\n 'calc',\n 'calc-size',\n 'min',\n 'max',\n 'clamp',\n 'abs',\n 'sign',\n 'round',\n 'mod',\n 'rem',\n 'sin',\n 'cos',\n 'tan',\n 'asin',\n 'acos',\n 'atan',\n 'atan2',\n 'pow',\n 'sqrt',\n 'hypot',\n 'log',\n 'exp',\n 'var',\n 'env',\n 'attr',\n 'counter',\n 'counters',\n 'image-set',\n 'cross-fade',\n 'image',\n 'paint',\n 'element',\n 'linear-gradient',\n 'radial-gradient',\n 'conic-gradient',\n 'repeating-linear-gradient',\n 'repeating-radial-gradient',\n 'repeating-conic-gradient',\n 'url',\n 'fit-content',\n 'minmax',\n 'repeat',\n 'cubic-bezier',\n 'steps',\n 'linear',\n 'rotate',\n 'scale',\n 'translate',\n 'skew',\n 'matrix',\n 'perspective',\n 'rotate3d',\n 'rotateX',\n 'rotateY',\n 'rotateZ',\n 'scale3d',\n 'scaleX',\n 'scaleY',\n 'scaleZ',\n 'translate3d',\n 'translateX',\n 'translateY',\n 'translateZ',\n 'skewX',\n 'skewY',\n 'matrix3d',\n 'blur',\n 'brightness',\n 'contrast',\n 'drop-shadow',\n 'grayscale',\n 'hue-rotate',\n 'invert',\n 'opacity',\n 'saturate',\n 'sepia',\n 'polygon',\n 'circle',\n 'ellipse',\n 'inset',\n 'path',\n 'xywh',\n 'rect',\n 'ray',\n 'light-dark',\n 'anchor',\n 'anchor-size',\n 'scroll',\n 'view',\n 'symbols',\n]);\n\nconst VALUE_KEYWORDS = new Set([\n 'auto',\n 'none',\n 'normal',\n 'inherit',\n 'initial',\n 'unset',\n 'revert',\n 'revert-layer',\n 'max-content',\n 'min-content',\n 'fit-content',\n 'stretch',\n 'transparent',\n 'currentcolor',\n 'currentColor',\n // display\n 'block',\n 'inline',\n 'inline-block',\n 'flex',\n 'inline-flex',\n 'grid',\n 'inline-grid',\n 'contents',\n 'table',\n 'table-row',\n 'table-cell',\n 'list-item',\n 'flow-root',\n // position\n 'static',\n 'relative',\n 'absolute',\n 'fixed',\n 'sticky',\n // overflow\n 'visible',\n 'hidden',\n 'scroll',\n 'clip',\n 'overlay',\n // flex/align\n 'center',\n 'start',\n 'end',\n 'flex-start',\n 'flex-end',\n 'space-between',\n 'space-around',\n 'space-evenly',\n 'baseline',\n // flow\n 'row',\n 'column',\n 'row-reverse',\n 'column-reverse',\n 'wrap',\n 'nowrap',\n 'dense',\n // border\n 'solid',\n 'dashed',\n 'dotted',\n 'double',\n 'groove',\n 'ridge',\n 'outset',\n // directional\n 'top',\n 'right',\n 'bottom',\n 'left',\n 'top-left',\n 'top-right',\n 'bottom-left',\n 'bottom-right',\n // radius shapes\n 'round',\n 'ellipse',\n 'leaf',\n 'backleaf',\n // dimension modifiers\n 'min',\n 'max',\n // text\n 'bold',\n 'bolder',\n 'lighter',\n 'italic',\n 'oblique',\n 'uppercase',\n 'lowercase',\n 'capitalize',\n 'line-through',\n 'underline',\n 'overline',\n 'wavy',\n // cursor\n 'pointer',\n 'default',\n 'text',\n 'move',\n 'grab',\n 'grabbing',\n 'not-allowed',\n 'crosshair',\n 'wait',\n 'help',\n 'col-resize',\n 'row-resize',\n 'n-resize',\n 's-resize',\n 'e-resize',\n 'w-resize',\n 'ne-resize',\n 'nw-resize',\n 'se-resize',\n 'sw-resize',\n 'ew-resize',\n 'ns-resize',\n 'zoom-in',\n 'zoom-out',\n // misc\n 'cover',\n 'contain',\n 'fill',\n 'no-repeat',\n 'repeat-x',\n 'repeat-y',\n 'border-box',\n 'padding-box',\n 'content-box',\n 'break-word',\n 'break-all',\n 'keep-all',\n 'anywhere',\n 'pre',\n 'pre-wrap',\n 'pre-line',\n 'balance',\n 'smooth',\n 'horizontal',\n 'vertical',\n 'both',\n 'mandatory',\n 'proximity',\n // white-space\n 'collapse',\n 'preserve',\n 'preserve-breaks',\n 'break-spaces',\n // text-wrap\n 'pretty',\n 'stable',\n // will-change\n 'transform',\n 'opacity',\n // animation\n 'infinite',\n 'alternate',\n 'alternate-reverse',\n 'reverse',\n 'forwards',\n 'backwards',\n 'running',\n 'paused',\n 'ease',\n 'ease-in',\n 'ease-out',\n 'ease-in-out',\n 'step-start',\n 'step-end',\n // scrollbar\n 'thin',\n 'always',\n 'both-edges',\n // width/height\n 'fixed',\n // shadow\n 'inset',\n // textOverflow\n 'clip',\n // other\n 'ltr',\n 'rtl',\n 'embed',\n 'isolate',\n 'isolate-override',\n 'plaintext',\n 'horizontal-tb',\n 'vertical-rl',\n 'vertical-lr',\n 'sideways-rl',\n 'sideways-lr',\n 'monospace',\n 'serif',\n 'sans-serif',\n 'cursive',\n 'fantasy',\n 'system-ui',\n 'ui-serif',\n 'ui-sans-serif',\n 'ui-monospace',\n 'ui-rounded',\n 'to',\n // misc\n 'strong',\n 'tight',\n 'icon',\n]);\n\n// ============================================================================\n// Classifier\n// ============================================================================\n\nfunction toSet(input?: Set<string> | string[]): Set<string> {\n if (!input) return new Set();\n return input instanceof Set ? input : new Set(input);\n}\n\nfunction classifyToken(\n raw: string,\n offset: number,\n errors: ValueError[],\n opts: ValueParserOptions,\n): ValueToken {\n const token = raw.trim();\n if (!token) return { type: 'keyword', value: '' };\n\n // Quoted strings\n if (\n (token.startsWith('\"') && token.endsWith('\"')) ||\n (token.startsWith(\"'\") && token.endsWith(\"'\"))\n ) {\n return { type: 'string', value: token.slice(1, -1), raw: token };\n }\n\n // !important\n if (token === '!important') {\n return { type: 'important', raw: token };\n }\n\n // Double prefix: $$name(...) is a Tasty `@function` call; bare $$name is the\n // custom-property reference `transition` uses. The call form must be checked\n // first, or the bare-name regex rejects `$$negative(10px)` outright.\n if (token.startsWith('$$') || token.startsWith('##')) {\n const call = classifyTastyFunctionCall(token, offset, errors);\n if (call) return call;\n }\n\n // Double prefix: $$name (custom property reference for transitions)\n if (token.startsWith('$$')) {\n const name = token.slice(2);\n if (/^[a-z_][a-z0-9-_]*$/i.test(name)) {\n return { type: 'custom-prop-ref', name, raw: token };\n }\n errors.push({\n message: `Invalid custom property reference '${token}'.`,\n offset,\n length: token.length,\n raw: token,\n });\n return { type: 'unknown', raw: token };\n }\n\n // Double prefix: ##name (color reference for transitions)\n if (token.startsWith('##')) {\n const name = token.slice(2);\n if (/^[a-z_][a-z0-9-_]*$/i.test(name)) {\n return { type: 'color-ref', name, raw: token };\n }\n errors.push({\n message: `Invalid color reference '${token}'.`,\n offset,\n length: token.length,\n raw: token,\n });\n return { type: 'unknown', raw: token };\n }\n\n // Custom property: $name\n if (token.startsWith('$')) {\n const name = token.slice(1);\n if (/^[a-z_][a-z0-9-_]*$/i.test(name)) {\n return { type: 'custom-prop', name, raw: token };\n }\n errors.push({\n message: `Invalid custom property syntax '${token}'.`,\n offset,\n length: token.length,\n raw: token,\n });\n return { type: 'unknown', raw: token };\n }\n\n // Color token: #name, #name.N, #name.$prop, or bare # (error)\n if (token.startsWith('#')) {\n if (token.length === 1) {\n errors.push({\n message: 'Empty color token name.',\n offset,\n length: 1,\n raw: token,\n });\n return { type: 'unknown', raw: token };\n }\n return classifyColorToken(token, offset, errors);\n }\n\n // Parenthesized expression: (expr) — fallback, auto-calc, etc.\n if (token.startsWith('(') && token.endsWith(')')) {\n return { type: 'group-expr', inner: token.slice(1, -1), raw: token };\n }\n\n // Function call: name(...)\n const openIdx = token.indexOf('(');\n if (openIdx > 0 && token.endsWith(')')) {\n const fname = token.slice(0, openIdx);\n const args = token.slice(openIdx + 1, -1);\n\n if (opts.skipFuncValidation) {\n return { type: 'css-function', name: fname, args, raw: token };\n }\n\n const knownFuncs = toSet(opts.knownFuncs);\n\n if (\n COLOR_FUNCS.has(fname) ||\n CSS_FUNCS.has(fname) ||\n knownFuncs.has(fname)\n ) {\n return { type: 'css-function', name: fname, args, raw: token };\n }\n\n // Unknown function — still return as css-function but flag it\n errors.push({\n message: `Unknown function '${fname}()'.`,\n offset,\n length: token.length,\n raw: token,\n });\n return { type: 'css-function', name: fname, args, raw: token };\n }\n\n // Unit number: 2x, 1.5r, 10px, 50%, 1fr\n const unitMatch = token.match(RE_UNIT_NUM);\n if (unitMatch) {\n const unit = unitMatch[1];\n const numVal = parseFloat(token.slice(0, -unit.length));\n\n if (opts.skipUnitValidation) {\n return { type: 'custom-unit', value: numVal, unit, raw: token };\n }\n\n const knownUnits = toSet(opts.knownUnits);\n\n if (BUILT_IN_UNITS.has(unit) || knownUnits.has(unit)) {\n return { type: 'custom-unit', value: numVal, unit, raw: token };\n }\n if (CSS_UNITS.has(unit)) {\n return { type: 'css-unit', value: numVal, unit, raw: token };\n }\n\n errors.push({\n message: `Unknown unit '${unit}' in '${token}'.`,\n offset,\n length: token.length,\n raw: token,\n });\n return { type: 'unknown', raw: token };\n }\n\n // CSS unit with % (RE_UNIT_NUM doesn't match % since it expects alpha)\n const cssUnitMatch = token.match(RE_CSS_UNIT_NUM);\n if (cssUnitMatch) {\n const unit = cssUnitMatch[1];\n const numVal = parseFloat(token.slice(0, -unit.length));\n if (CSS_UNITS.has(unit)) {\n return { type: 'css-unit', value: numVal, unit, raw: token };\n }\n }\n\n // Plain number\n if (RE_NUMBER.test(token)) {\n return { type: 'number', value: parseFloat(token), raw: token };\n }\n\n // Unspaced ratio: 16/10\n if (RE_RATIO.test(token)) {\n return { type: 'ratio', raw: token };\n }\n\n // Tasty merge directive (@inherit)\n if (token === '@inherit') {\n return { type: 'keyword', value: token };\n }\n\n // Known keyword\n if (VALUE_KEYWORDS.has(token) || VALUE_KEYWORDS.has(token.toLowerCase())) {\n return { type: 'keyword', value: token };\n }\n\n // Color keyword: no token syntax, so the keyword itself is the color.\n // Matched case-insensitively, as CSS and Tasty match them.\n const lower = token.toLowerCase();\n if (NAMED_CSS_COLORS.has(lower) || SYSTEM_COLORS.has(lower)) {\n return { type: 'color-keyword', raw: token };\n }\n\n // CSS custom property function var(--name)\n if (token.startsWith('var(') && token.endsWith(')')) {\n return {\n type: 'css-function',\n name: 'var',\n args: token.slice(4, -1),\n raw: token,\n };\n }\n\n // Unknown token\n return { type: 'unknown', raw: token };\n}\n\n/**\n * Classify a `$$name(...)` / `##name(...)` Tasty `@function` call.\n *\n * Returns `null` when the token is not a call, so the caller falls through to the\n * bare `$$name` / `##name` reference handling that `transition` relies on.\n */\nfunction classifyTastyFunctionCall(\n token: string,\n offset: number,\n errors: ValueError[],\n): ValueToken | null {\n const openIdx = token.indexOf('(');\n\n if (openIdx <= 2 || !token.endsWith(')')) return null;\n\n const name = token.slice(2, openIdx);\n const args = token.slice(openIdx + 1, -1);\n\n if (!/^[a-z_][a-z0-9-_]*$/i.test(name)) {\n errors.push({\n message: `Invalid function name in '${token}'.`,\n offset,\n length: token.length,\n raw: token,\n });\n return { type: 'unknown', raw: token };\n }\n\n return { type: 'tasty-function', name, args, raw: token };\n}\n\nfunction classifyColorToken(\n token: string,\n offset: number,\n errors: ValueError[],\n): ValueToken {\n const raw = token;\n\n // Strip leading #\n const name = token.slice(1);\n\n if (name.length === 0) {\n errors.push({\n message: 'Empty color token name.',\n offset,\n length: token.length,\n raw,\n });\n return { type: 'unknown', raw };\n }\n\n // Check for opacity suffix\n const dotIndex = name.indexOf('.');\n if (dotIndex !== -1) {\n const tokenName = name.slice(0, dotIndex);\n const opacitySuffix = name.slice(dotIndex + 1);\n\n if (tokenName.length === 0) {\n errors.push({\n message: 'Empty color token name before opacity.',\n offset,\n length: token.length,\n raw,\n });\n return { type: 'unknown', raw };\n }\n\n // Dynamic opacity from CSS custom property\n if (opacitySuffix.startsWith('$')) {\n return {\n type: 'color-token',\n name: tokenName,\n opacity: opacitySuffix,\n raw,\n };\n }\n\n if (opacitySuffix.length === 0) {\n errors.push({\n message: 'Trailing dot with no opacity value.',\n offset,\n length: token.length,\n raw,\n });\n return { type: 'unknown', raw };\n }\n\n // Tasty reads the digits as a decimal fraction (`.5` and `.50` are 50%,\n // `.150` is 15%), so any digit string is in range.\n if (!/^\\d+$/.test(opacitySuffix)) {\n errors.push({\n message: /^-\\d+$/.test(opacitySuffix)\n ? 'Opacity cannot be negative.'\n : `Invalid opacity value '${opacitySuffix}'.`,\n offset,\n length: token.length,\n raw,\n });\n return { type: 'unknown', raw };\n }\n\n return {\n type: 'color-token',\n name: tokenName,\n opacity: opacitySuffix,\n raw,\n };\n }\n\n return { type: 'color-token', name, raw };\n}\n\n// ============================================================================\n// Public API\n// ============================================================================\n\n/**\n * Parse a style value string into typed tokens organized by\n * comma-separated groups and slash-separated parts.\n */\nexport function parseValue(\n src: string,\n opts: ValueParserOptions = {},\n): ValueParseResult {\n const errors: ValueError[] = [];\n\n // Check bracket balance first\n const bracketError = checkBracketBalance(src);\n if (bracketError) {\n errors.push({\n message: bracketError.message,\n offset: bracketError.position,\n length: 1,\n });\n return { groups: [], errors };\n }\n\n const scanned = scanTokens(src);\n\n const groups: ValueGroup[] = [];\n let currentParts: ValuePart[] = [];\n let currentTokens: ValueToken[] = [];\n\n const endPart = () => {\n if (currentTokens.length > 0) {\n currentParts.push({ tokens: currentTokens });\n currentTokens = [];\n }\n };\n\n const endGroup = () => {\n endPart();\n if (currentParts.length > 0) {\n groups.push({ parts: currentParts });\n } else {\n groups.push({ parts: [{ tokens: [] }] });\n }\n currentParts = [];\n };\n\n for (const scanned_token of scanned) {\n if (scanned_token.value) {\n const classified = classifyToken(\n scanned_token.value,\n scanned_token.offset,\n errors,\n opts,\n );\n currentTokens.push(classified);\n }\n if (scanned_token.isSlash) endPart();\n if (scanned_token.isComma) endGroup();\n }\n\n // Push final group\n if (\n currentTokens.length > 0 ||\n currentParts.length > 0 ||\n groups.length === 0\n ) {\n endGroup();\n }\n\n return { groups, errors };\n}\n\n/**\n * Extract all tokens of a specific type from a parse result.\n */\nexport function extractTokensByType<T extends ValueToken['type']>(\n result: ValueParseResult,\n type: T,\n): Extract<ValueToken, { type: T }>[] {\n const tokens: Extract<ValueToken, { type: T }>[] = [];\n for (const group of result.groups) {\n for (const part of group.parts) {\n for (const token of part.tokens) {\n if (token.type === type) {\n tokens.push(token as Extract<ValueToken, { type: T }>);\n }\n }\n }\n }\n return tokens;\n}\n\n/**\n * Get a flat list of all tokens from a parse result.\n */\nexport function flattenTokens(result: ValueParseResult): ValueToken[] {\n const tokens: ValueToken[] = [];\n for (const group of result.groups) {\n for (const part of group.parts) {\n tokens.push(...part.tokens);\n }\n }\n return tokens;\n}\n"],"mappings":";;;;AAoEA,MAAM,cAAc;AACpB,MAAM,YAAY;AAClB,MAAM,kBAAkB;;AAExB,MAAM,WAAW;;AAGjB,MAAa,cAAc,IAAI,IAAI;CACjC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACD,CAAC;AAEF,MAAM,YAAY,IAAI,IAAI;CACxB;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACD,CAAC;AAEF,MAAM,iBAAiB,IAAI,IAAI;CAC7B;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CAEA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CAEA;CACA;CACA;CACA;CACA;CAEA;CACA;CACA;CACA;CACA;CAEA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CAEA;CACA;CACA;CACA;CACA;CACA;CACA;CAEA;CACA;CACA;CACA;CACA;CACA;CACA;CAEA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CAEA;CACA;CACA;CACA;CAEA;CACA;CAEA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CAEA;CACA;CACA;CACA;CACA;CACA;C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GAAQ;;CAG/B,MAAM,UAAU,WAAW,IAAI;CAE/B,MAAM,SAAuB,EAAE;CAC/B,IAAI,eAA4B,EAAE;CAClC,IAAI,gBAA8B,EAAE;CAEpC,MAAM,gBAAgB;AACpB,MAAI,cAAc,SAAS,GAAG;AAC5B,gBAAa,KAAK,EAAE,QAAQ,eAAe,CAAC;AAC5C,mBAAgB,EAAE;;;CAItB,MAAM,iBAAiB;AACrB,WAAS;AACT,MAAI,aAAa,SAAS,EACxB,QAAO,KAAK,EAAE,OAAO,cAAc,CAAC;MAEpC,QAAO,KAAK,EAAE,OAAO,CAAC,EAAE,QAAQ,EAAE,EAAE,CAAC,EAAE,CAAC;AAE1C,iBAAe,EAAE;;AAGnB,MAAK,MAAM,iBAAiB,SAAS;AACnC,MAAI,cAAc,OAAO;GACvB,MAAM,aAAa,cACjB,cAAc,OACd,cAAc,QACd,QACA,KACD;AACD,iBAAc,KAAK,WAAW;;AAEhC,MAAI,cAAc,QAAS,UAAS;AACpC,MAAI,cAAc,QAAS,WAAU;;AAIvC,KACE,cAAc,SAAS,KACvB,aAAa,SAAS,KACtB,OAAO,WAAW,EAElB,WAAU;AAGZ,QAAO;EAAE;EAAQ;EAAQ"}
|
|
@@ -0,0 +1,163 @@
|
|
|
1
|
+
import { createRule } from "../create-rule.js";
|
|
2
|
+
import { getInstalledTastyVersion } from "../config.js";
|
|
3
|
+
import { TastyContext } from "../context.js";
|
|
4
|
+
import { stringStyleValueListeners } from "../style-values.js";
|
|
5
|
+
import { splitTopLevelCommas } from "../parsers/utils.js";
|
|
6
|
+
import { COLOR_FUNCS, parseValue } from "../parsers/value-parser.js";
|
|
7
|
+
import { replaceStringValue } from "../fix-utils.js";
|
|
8
|
+
import semver from "semver";
|
|
9
|
+
|
|
10
|
+
//#region src/rules/prefer-fill-mix.ts
|
|
11
|
+
/** The first `@tenphi/tasty` release that mixes comma-separated fill colors. */
|
|
12
|
+
const FILL_MIX_TASTY_VERSION = "3.15.0";
|
|
13
|
+
const FILL_PROPERTIES = new Set(["fill", "backgroundColor"]);
|
|
14
|
+
/** Color functions Tasty recognizes beyond the ones the parser classifies. */
|
|
15
|
+
const EXTRA_COLOR_FUNCS = new Set([
|
|
16
|
+
"light-dark",
|
|
17
|
+
"contrast-color",
|
|
18
|
+
"okhsl",
|
|
19
|
+
"okhst"
|
|
20
|
+
]);
|
|
21
|
+
/** Whether Tasty's parser takes this token for a color. */
|
|
22
|
+
function isColor(token) {
|
|
23
|
+
switch (token.type) {
|
|
24
|
+
case "color-token":
|
|
25
|
+
case "color-keyword": return true;
|
|
26
|
+
case "custom-prop": return token.name.endsWith("-color");
|
|
27
|
+
case "css-function": {
|
|
28
|
+
const name = token.name.toLowerCase();
|
|
29
|
+
return COLOR_FUNCS.has(name) || EXTRA_COLOR_FUNCS.has(name);
|
|
30
|
+
}
|
|
31
|
+
case "group-expr": return token.inner.includes("#");
|
|
32
|
+
default: return false;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
/** `#clear` and its fades compile to `transparent`. */
|
|
36
|
+
function isClear(token) {
|
|
37
|
+
return token.type === "color-token" && (token.raw === "#clear" || token.raw.startsWith("#clear."));
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* The weight a `#name.N` fade stands for, written the way Tasty compiles the
|
|
41
|
+
* opacity: `.04` is `4%`, `.5` is `50%`, `.$hover` is `($hover * 100%)`.
|
|
42
|
+
*/
|
|
43
|
+
function opacityWeight(opacity) {
|
|
44
|
+
if (opacity.startsWith("$")) return `(${opacity} * 100%)`;
|
|
45
|
+
return `${Number((Number(`0.${opacity}`) * 100).toFixed(6))}%`;
|
|
46
|
+
}
|
|
47
|
+
/** A faded color token split into the color and the weight its opacity is. */
|
|
48
|
+
function splitFade(token) {
|
|
49
|
+
if (token.type !== "color-token" || token.opacity === void 0) return null;
|
|
50
|
+
return {
|
|
51
|
+
color: token.raw.slice(0, -(token.opacity.length + 1)),
|
|
52
|
+
weight: opacityWeight(token.opacity)
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* The comma mix that paints what `'<base> <overlay>'` painted, or `null` when
|
|
57
|
+
* the overlay's alpha is not written on it. Exact when the overlay token holds
|
|
58
|
+
* an opaque color: drawing it at alpha `a` over the base is the base mixed with
|
|
59
|
+
* it at weight `a` in sRGB, which is what Tasty compiles the mix to.
|
|
60
|
+
*/
|
|
61
|
+
function rewriteOverlay(base, overlay) {
|
|
62
|
+
if (isClear(overlay)) return base;
|
|
63
|
+
const fade = splitFade(overlay);
|
|
64
|
+
if (!fade) return null;
|
|
65
|
+
if (fade.weight === "0%") return base;
|
|
66
|
+
return `${fade.color} ${fade.weight}, ${base}`;
|
|
67
|
+
}
|
|
68
|
+
/** A token as written. */
|
|
69
|
+
function tokenText(token) {
|
|
70
|
+
return "raw" in token ? token.raw : token.value;
|
|
71
|
+
}
|
|
72
|
+
var prefer_fill_mix_default = createRule({
|
|
73
|
+
name: "prefer-fill-mix",
|
|
74
|
+
meta: {
|
|
75
|
+
type: "suggestion",
|
|
76
|
+
fixable: "code",
|
|
77
|
+
hasSuggestions: true,
|
|
78
|
+
docs: { description: "Replace deprecated space-separated two-color fills with a comma mix ('#dark 4%, #surface'), and catch mix parts weighted by their opacity" },
|
|
79
|
+
messages: {
|
|
80
|
+
twoColorFill: "Two space-separated colors in '{{property}}' are deprecated: the second is painted as a background-image layer that contrast checkers cannot read. Use '{{suggestion}}'.",
|
|
81
|
+
twoColorFillManual: "Two space-separated colors in '{{property}}' are deprecated: the second is painted as a background-image layer that contrast checkers cannot read. Mix an opaque overlay color in by weight ('#overlay 4%, #base'), or use an opaque overlay alone.",
|
|
82
|
+
translucentMixPart: "'{{part}}' is translucent and has no percentage, so its alpha weighs it down on top of its share of the mix and the background comes out see-through. Give it a weight instead: '{{suggestion}}'.",
|
|
83
|
+
useWeight: "Use '{{suggestion}}'."
|
|
84
|
+
},
|
|
85
|
+
schema: []
|
|
86
|
+
},
|
|
87
|
+
defaultOptions: [],
|
|
88
|
+
create(context) {
|
|
89
|
+
const tastyVersion = getInstalledTastyVersion(context.filename);
|
|
90
|
+
if (!tastyVersion || !semver.satisfies(tastyVersion, `>=${FILL_MIX_TASTY_VERSION}`)) return {};
|
|
91
|
+
const ctx = new TastyContext(context);
|
|
92
|
+
function checkSpaceSeparated(tokens, colorCount, node, property) {
|
|
93
|
+
const suggestion = tokens.length === 2 && colorCount === 2 ? rewriteOverlay(tokenText(tokens[0]), tokens[1]) : null;
|
|
94
|
+
if (suggestion === null) {
|
|
95
|
+
context.report({
|
|
96
|
+
node,
|
|
97
|
+
messageId: "twoColorFillManual",
|
|
98
|
+
data: { property }
|
|
99
|
+
});
|
|
100
|
+
return;
|
|
101
|
+
}
|
|
102
|
+
context.report({
|
|
103
|
+
node,
|
|
104
|
+
messageId: "twoColorFill",
|
|
105
|
+
data: {
|
|
106
|
+
property,
|
|
107
|
+
suggestion
|
|
108
|
+
},
|
|
109
|
+
fix: (fixer) => replaceStringValue(fixer, node, suggestion)
|
|
110
|
+
});
|
|
111
|
+
}
|
|
112
|
+
function checkMix(value, groups, node) {
|
|
113
|
+
const parts = splitTopLevelCommas(value).map((part) => part.trim());
|
|
114
|
+
for (const [i, tokens] of groups.entries()) {
|
|
115
|
+
if (tokens.length !== 1) continue;
|
|
116
|
+
const [token] = tokens;
|
|
117
|
+
const other = parts[1 - i];
|
|
118
|
+
let replacement = null;
|
|
119
|
+
if (isClear(token)) replacement = other;
|
|
120
|
+
else {
|
|
121
|
+
const fade = splitFade(token);
|
|
122
|
+
if (fade) {
|
|
123
|
+
const weighted = [...parts];
|
|
124
|
+
weighted[i] = `${fade.color} ${fade.weight}`;
|
|
125
|
+
replacement = weighted.join(", ");
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
if (replacement === null) continue;
|
|
129
|
+
const suggestion = replacement;
|
|
130
|
+
context.report({
|
|
131
|
+
node,
|
|
132
|
+
messageId: "translucentMixPart",
|
|
133
|
+
data: {
|
|
134
|
+
part: parts[i],
|
|
135
|
+
suggestion
|
|
136
|
+
},
|
|
137
|
+
suggest: [{
|
|
138
|
+
messageId: "useWeight",
|
|
139
|
+
data: { suggestion },
|
|
140
|
+
fix: (fixer) => replaceStringValue(fixer, node, suggestion)
|
|
141
|
+
}]
|
|
142
|
+
});
|
|
143
|
+
return;
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
function checkValue(value, node, property) {
|
|
147
|
+
const { groups } = parseValue(value);
|
|
148
|
+
if (groups.some((group) => group.parts.length !== 1)) return;
|
|
149
|
+
const tokenGroups = groups.map((group) => group.parts[0].tokens);
|
|
150
|
+
if (tokenGroups.length === 1) {
|
|
151
|
+
const colorCount = tokenGroups[0].filter(isColor).length;
|
|
152
|
+
if (colorCount >= 2) checkSpaceSeparated(tokenGroups[0], colorCount, node, property);
|
|
153
|
+
} else if (tokenGroups.length === 2) checkMix(value, tokenGroups, node);
|
|
154
|
+
}
|
|
155
|
+
return stringStyleValueListeners(ctx, (value, node, property) => {
|
|
156
|
+
if (FILL_PROPERTIES.has(property)) checkValue(value, node, property);
|
|
157
|
+
}, { requireTastyJSX: true });
|
|
158
|
+
}
|
|
159
|
+
});
|
|
160
|
+
|
|
161
|
+
//#endregion
|
|
162
|
+
export { prefer_fill_mix_default as default };
|
|
163
|
+
//# sourceMappingURL=prefer-fill-mix.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"prefer-fill-mix.js","names":[],"sources":["../../src/rules/prefer-fill-mix.ts"],"sourcesContent":["import type { TSESTree } from '@typescript-eslint/utils';\nimport semver from 'semver';\nimport { createRule } from '../create-rule.js';\nimport { TastyContext } from '../context.js';\nimport { getInstalledTastyVersion } from '../config.js';\nimport { replaceStringValue } from '../fix-utils.js';\nimport { parseValue } from '../parsers/index.js';\nimport type { ValueToken } from '../parsers/index.js';\nimport { splitTopLevelCommas } from '../parsers/utils.js';\nimport { COLOR_FUNCS } from '../parsers/value-parser.js';\nimport { stringStyleValueListeners } from '../style-values.js';\n\ntype MessageIds =\n | 'twoColorFill'\n | 'twoColorFillManual'\n | 'translucentMixPart'\n | 'useWeight';\n\n/** The first `@tenphi/tasty` release that mixes comma-separated fill colors. */\nconst FILL_MIX_TASTY_VERSION = '3.15.0';\n\nconst FILL_PROPERTIES = new Set(['fill', 'backgroundColor']);\n\n/** Color functions Tasty recognizes beyond the ones the parser classifies. */\nconst EXTRA_COLOR_FUNCS = new Set([\n 'light-dark',\n 'contrast-color',\n 'okhsl',\n 'okhst',\n]);\n\n/** Whether Tasty's parser takes this token for a color. */\nfunction isColor(token: ValueToken): boolean {\n switch (token.type) {\n case 'color-token':\n case 'color-keyword':\n return true;\n case 'custom-prop':\n // `$name` is a color only when the name ends with `-color`.\n return token.name.endsWith('-color');\n case 'css-function': {\n const name = token.name.toLowerCase();\n return COLOR_FUNCS.has(name) || EXTRA_COLOR_FUNCS.has(name);\n }\n case 'group-expr':\n // A fallback chain such as `(#accent, #purple)`.\n return token.inner.includes('#');\n default:\n return false;\n }\n}\n\n/** `#clear` and its fades compile to `transparent`. */\nfunction isClear(token: ValueToken): boolean {\n return (\n token.type === 'color-token' &&\n (token.raw === '#clear' || token.raw.startsWith('#clear.'))\n );\n}\n\n/**\n * The weight a `#name.N` fade stands for, written the way Tasty compiles the\n * opacity: `.04` is `4%`, `.5` is `50%`, `.$hover` is `($hover * 100%)`.\n */\nfunction opacityWeight(opacity: string): string {\n if (opacity.startsWith('$')) return `(${opacity} * 100%)`;\n return `${Number((Number(`0.${opacity}`) * 100).toFixed(6))}%`;\n}\n\n/** A faded color token split into the color and the weight its opacity is. */\nfunction splitFade(\n token: ValueToken,\n): { color: string; weight: string } | null {\n if (token.type !== 'color-token' || token.opacity === undefined) return null;\n return {\n color: token.raw.slice(0, -(token.opacity.length + 1)),\n weight: opacityWeight(token.opacity),\n };\n}\n\n/**\n * The comma mix that paints what `'<base> <overlay>'` painted, or `null` when\n * the overlay's alpha is not written on it. Exact when the overlay token holds\n * an opaque color: drawing it at alpha `a` over the base is the base mixed with\n * it at weight `a` in sRGB, which is what Tasty compiles the mix to.\n */\nfunction rewriteOverlay(base: string, overlay: ValueToken): string | null {\n if (isClear(overlay)) return base;\n\n const fade = splitFade(overlay);\n if (!fade) return null;\n if (fade.weight === '0%') return base;\n\n return `${fade.color} ${fade.weight}, ${base}`;\n}\n\n/** A token as written. */\nfunction tokenText(token: ValueToken): string {\n return 'raw' in token ? token.raw : token.value;\n}\n\nexport default createRule<[], MessageIds>({\n name: 'prefer-fill-mix',\n meta: {\n type: 'suggestion',\n fixable: 'code',\n hasSuggestions: true,\n docs: {\n description:\n \"Replace deprecated space-separated two-color fills with a comma mix ('#dark 4%, #surface'), and catch mix parts weighted by their opacity\",\n },\n messages: {\n twoColorFill:\n \"Two space-separated colors in '{{property}}' are deprecated: the second is painted as a background-image layer that contrast checkers cannot read. Use '{{suggestion}}'.\",\n twoColorFillManual:\n \"Two space-separated colors in '{{property}}' are deprecated: the second is painted as a background-image layer that contrast checkers cannot read. Mix an opaque overlay color in by weight ('#overlay 4%, #base'), or use an opaque overlay alone.\",\n translucentMixPart:\n \"'{{part}}' is translucent and has no percentage, so its alpha weighs it down on top of its share of the mix and the background comes out see-through. Give it a weight instead: '{{suggestion}}'.\",\n useWeight: \"Use '{{suggestion}}'.\",\n },\n schema: [],\n },\n defaultOptions: [],\n create(context) {\n // The comma mix is new syntax: rewriting to it for an older Tasty would\n // leave the fill showing only its first color.\n const tastyVersion = getInstalledTastyVersion(context.filename);\n if (\n !tastyVersion ||\n !semver.satisfies(tastyVersion, `>=${FILL_MIX_TASTY_VERSION}`)\n ) {\n return {};\n }\n\n const ctx = new TastyContext(context);\n\n function checkSpaceSeparated(\n tokens: ValueToken[],\n colorCount: number,\n node: TSESTree.Node,\n property: string,\n ): void {\n const suggestion =\n tokens.length === 2 && colorCount === 2\n ? rewriteOverlay(tokenText(tokens[0]), tokens[1])\n : null;\n\n if (suggestion === null) {\n context.report({\n node,\n messageId: 'twoColorFillManual',\n data: { property },\n });\n return;\n }\n\n context.report({\n node,\n messageId: 'twoColorFill',\n data: { property, suggestion },\n fix: (fixer) => replaceStringValue(fixer, node, suggestion),\n });\n }\n\n function checkMix(\n value: string,\n groups: ValueToken[][],\n node: TSESTree.Node,\n ): void {\n const parts = splitTopLevelCommas(value).map((part) => part.trim());\n\n for (const [i, tokens] of groups.entries()) {\n if (tokens.length !== 1) continue;\n\n const [token] = tokens;\n const other = parts[1 - i];\n let replacement: string | null = null;\n\n if (isClear(token)) {\n // A transparent color mixes in nothing.\n replacement = other;\n } else {\n const fade = splitFade(token);\n if (fade) {\n const weighted = [...parts];\n weighted[i] = `${fade.color} ${fade.weight}`;\n replacement = weighted.join(', ');\n }\n }\n\n if (replacement === null) continue;\n\n const suggestion = replacement;\n context.report({\n node,\n messageId: 'translucentMixPart',\n data: { part: parts[i], suggestion },\n suggest: [\n {\n messageId: 'useWeight',\n data: { suggestion },\n fix: (fixer) => replaceStringValue(fixer, node, suggestion),\n },\n ],\n });\n return;\n }\n }\n\n function checkValue(\n value: string,\n node: TSESTree.Node,\n property: string,\n ): void {\n const { groups } = parseValue(value);\n\n // Slash-separated parts mean nothing to `fill`; leave such values alone.\n if (groups.some((group) => group.parts.length !== 1)) return;\n const tokenGroups = groups.map((group) => group.parts[0].tokens);\n\n if (tokenGroups.length === 1) {\n const colorCount = tokenGroups[0].filter(isColor).length;\n if (colorCount >= 2) {\n checkSpaceSeparated(tokenGroups[0], colorCount, node, property);\n }\n } else if (tokenGroups.length === 2) {\n checkMix(value, tokenGroups, node);\n }\n }\n\n return stringStyleValueListeners(\n ctx,\n (value, node, property) => {\n if (FILL_PROPERTIES.has(property)) checkValue(value, node, property);\n },\n { requireTastyJSX: true },\n );\n },\n});\n"],"mappings":";;;;;;;;;;;AAmBA,MAAM,yBAAyB;AAE/B,MAAM,kBAAkB,IAAI,IAAI,CAAC,QAAQ,kBAAkB,CAAC;;AAG5D,MAAM,oBAAoB,IAAI,IAAI;CAChC;CACA;CACA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SAAS,CACP;MACE,WAAW;MACX,MAAM,EAAE,YAAY;MACpB,MAAM,UAAU,mBAAmB,OAAO,MAAM,WAAW;MAC5D,CACF;KACF,CAAC;AACF;;;EAIJ,SAAS,WACP,OACA,MACA,UACM;GACN,MAAM,EAAE,WAAW,WAAW,MAAM;AAGpC,OAAI,OAAO,MAAM,UAAU,MAAM,MAAM,WAAW,EAAE,CAAE;GACtD,MAAM,cAAc,OAAO,KAAK,UAAU,MAAM,MAAM,GAAG,OAAO;AAEhE,OAAI,YAAY,WAAW,GAAG;IAC5B,MAAM,aAAa,YAAY,GAAG,OAAO,QAAQ,CAAC;AAClD,QAAI,cAAc,EAChB,qBAAoB,YAAY,IAAI,YAAY,MAAM,SAAS;cAExD,YAAY,WAAW,EAChC,UAAS,OAAO,aAAa,KAAK;;AAItC,SAAO,0BACL,MACC,OAAO,MAAM,aAAa;AACzB,OAAI,gBAAgB,IAAI,SAAS,CAAE,YAAW,OAAO,MAAM,SAAS;KAEtE,EAAE,iBAAiB,MAAM,CAC1B;;CAEJ,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tenphi/eslint-plugin-tasty",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.14.0",
|
|
4
4
|
"description": "ESLint plugin for validating tasty() and tastyStatic() style objects",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
"@changesets/changelog-github": "^0.5.2",
|
|
54
54
|
"@changesets/cli": "^2.29.8",
|
|
55
55
|
"@eslint/js": "^10.0.1",
|
|
56
|
-
"@tenphi/tasty": "^3.
|
|
56
|
+
"@tenphi/tasty": "^3.14.0",
|
|
57
57
|
"@types/node": "^22.0.0",
|
|
58
58
|
"@types/semver": "^7.8.0",
|
|
59
59
|
"@typescript-eslint/parser": "^8.56.1",
|