css-typed-vars 0.10.0 → 0.11.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/schema.json ADDED
@@ -0,0 +1,84 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "$id": "https://unpkg.com/css-typed-vars/schema.json",
4
+ "title": "css-typed-vars config",
5
+ "description": "Options for the css-typed-vars CLI: one target, or an array of targets.",
6
+ "oneOf": [
7
+ { "$ref": "#/definitions/config" },
8
+ {
9
+ "type": "array",
10
+ "minItems": 1,
11
+ "items": { "$ref": "#/definitions/config" }
12
+ }
13
+ ],
14
+ "definitions": {
15
+ "globs": {
16
+ "oneOf": [
17
+ { "type": "string" },
18
+ { "type": "array", "items": { "type": "string" } }
19
+ ]
20
+ },
21
+ "config": {
22
+ "type": "object",
23
+ "additionalProperties": false,
24
+ "properties": {
25
+ "$schema": { "type": "string" },
26
+ "input": {
27
+ "$ref": "#/definitions/globs",
28
+ "description": "Glob(s) of the CSS files to scan."
29
+ },
30
+ "output": {
31
+ "type": "string",
32
+ "description": "Output file: .ts, .js/.mjs/.cjs (plus a .d.ts), or .json for W3C design tokens (DTCG)."
33
+ },
34
+ "exclude": {
35
+ "$ref": "#/definitions/globs",
36
+ "description": "Glob(s) of files to skip."
37
+ },
38
+ "prefix": {
39
+ "type": "string",
40
+ "description": "Prefix every generated key. Can't be combined with group."
41
+ },
42
+ "naming": {
43
+ "enum": ["camelCase", "snake", "kebab", "constant", "pascal"],
44
+ "description": "Naming convention of the generated keys. Defaults to camelCase."
45
+ },
46
+ "selectors": {
47
+ "type": "array",
48
+ "items": { "type": "string" },
49
+ "description": "Also scan these selectors' blocks, not just :root and @theme."
50
+ },
51
+ "themes": {
52
+ "type": "object",
53
+ "additionalProperties": { "type": "string" },
54
+ "description": "Theme name -> selector ('[data-theme=\"dark\"]') or @media prelude ('@media (prefers-color-scheme: dark)'). Values are emitted as @theme JSDoc tags."
55
+ },
56
+ "group": {
57
+ "type": "boolean",
58
+ "description": "Nest keys by the first hyphen segment of the name (cssVars.color.primary)."
59
+ },
60
+ "helpers": {
61
+ "type": "boolean",
62
+ "description": "Also emit the CssVarRef type and the getCssVar/setCssVar/withFallback helpers."
63
+ },
64
+ "prune": {
65
+ "type": "boolean",
66
+ "description": "Drop vars with no detected cssVars.<key> usage. Requires usage."
67
+ },
68
+ "usage": {
69
+ "$ref": "#/definitions/globs",
70
+ "description": "Glob(s) of the source files to scan for cssVars usage (prune, --prune-check)."
71
+ },
72
+ "usageExclude": {
73
+ "$ref": "#/definitions/globs",
74
+ "description": "Glob(s) of source files to skip in the usage scan."
75
+ },
76
+ "refsIgnore": {
77
+ "type": "array",
78
+ "items": { "type": "string" },
79
+ "description": "Names (or --prefix-* patterns) that --lint-refs shouldn't report, e.g. vars set from JS."
80
+ }
81
+ }
82
+ }
83
+ }
84
+ }