nemcss 0.5.0 → 0.6.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nemcss",
3
- "version": "0.5.0",
3
+ "version": "0.6.0",
4
4
  "description": "Command-line interface for nemcss, a design-token-driven CSS utility generator",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -27,10 +27,10 @@
27
27
  "schemas"
28
28
  ],
29
29
  "optionalDependencies": {
30
- "@nemcss/cli-darwin-arm64": "0.5.0",
31
- "@nemcss/cli-darwin-x64": "0.5.0",
32
- "@nemcss/cli-linux-x64": "0.5.0",
33
- "@nemcss/cli-linux-arm64": "0.5.0",
34
- "@nemcss/cli-win32-x64": "0.5.0"
30
+ "@nemcss/cli-darwin-arm64": "0.6.0",
31
+ "@nemcss/cli-darwin-x64": "0.6.0",
32
+ "@nemcss/cli-linux-x64": "0.6.0",
33
+ "@nemcss/cli-linux-arm64": "0.6.0",
34
+ "@nemcss/cli-win32-x64": "0.6.0"
35
35
  }
36
36
  }
@@ -1,134 +0,0 @@
1
- {
2
- "$schema": "https://json-schema.org/draft/2020-12/schema",
3
- "title": "NemCssConfig",
4
- "description": "NemCssConfig represents the configuration of the NemCSS util.\nIt contains the paths to the content files and the design tokens, as well as the theme configuration.",
5
- "type": "object",
6
- "properties": {
7
- "content": {
8
- "description": "Vector of glob patterns to determine which content files to target.\nContent files will be used to determine which CSS classes to generate.",
9
- "type": "array",
10
- "items": {
11
- "type": "string"
12
- }
13
- },
14
- "semantic": {
15
- "description": "Semantic tokens",
16
- "anyOf": [
17
- {
18
- "$ref": "#/$defs/SemanticConfig"
19
- },
20
- {
21
- "type": "null"
22
- }
23
- ]
24
- },
25
- "theme": {
26
- "description": "Theme configuration.",
27
- "anyOf": [
28
- {
29
- "$ref": "#/$defs/ThemeConfig"
30
- },
31
- {
32
- "type": "null"
33
- }
34
- ]
35
- },
36
- "tokensDir": {
37
- "description": "Path to directory containing the design tokens.",
38
- "type": "string",
39
- "default": "design-tokens"
40
- }
41
- },
42
- "additionalProperties": false,
43
- "required": [
44
- "content"
45
- ],
46
- "$defs": {
47
- "SemanticConfig": {
48
- "description": "The semantic config enables the creation of groups of semantic tokens (e.g. for \"text\",\n\"background\") with their own configuration (e.g. the CSS property they target and the tokens\nthey use)",
49
- "type": "object",
50
- "additionalProperties": {
51
- "$ref": "#/$defs/SemanticGroupConfig"
52
- }
53
- },
54
- "SemanticGroupConfig": {
55
- "description": "A single semantic token config",
56
- "type": "object",
57
- "properties": {
58
- "property": {
59
- "description": "CSS property this group targets (e.g. \"color\", \"background-color\")",
60
- "type": "string",
61
- "minLength": 1
62
- },
63
- "tokens": {
64
- "description": "Mapping between a semantic name and an existing design token value\ne.g. \"primary\" -> \"{colors.blue-800}\"",
65
- "type": "object",
66
- "additionalProperties": {
67
- "type": "string"
68
- }
69
- }
70
- },
71
- "required": [
72
- "property",
73
- "tokens"
74
- ]
75
- },
76
- "ThemeConfig": {
77
- "description": "ThemeConfig represents the configuration of the theme.\nIt contains the design tokens configuration per token type.",
78
- "type": "object",
79
- "additionalProperties": {
80
- "$ref": "#/$defs/TokenConfig"
81
- }
82
- },
83
- "TokenConfig": {
84
- "description": "TokenConfig represents the configuration of a single design token.\nYou can override the default configuration by specifying the source, prefix, and utilities.\n\n# Examples\n\nIn your `nemcss.config.json`:\n\n```json\n{\n \"theme\": {\n \"colors\": {\n \"source\": \"design-tokens/colors.json\",\n \"prefix\": \"color\",\n \"utilities\": [\n {\n \"prefix\": \"highlight\",\n \"property\": \"background-color\"\n }\n ]\n }\n\n }\n}\n```\n\nWith a token variant \"primary\" in colors.json, this generates:\n- CSS custom property: `--color-primary`\n- Utility class: `.highlight-primary { background-color: var(--color-primary); }`",
85
- "type": "object",
86
- "properties": {
87
- "prefix": {
88
- "description": "The token prefix is used to generate the custom properties for the given token.\nFor example, if prefix is \"color\", the token prefix will be \"color-\".\nIf the color tokens include a \"primary\" variant, the custom property generated will be\n\"--color-primary\".",
89
- "type": [
90
- "string",
91
- "null"
92
- ]
93
- },
94
- "source": {
95
- "description": "Path to the tokens file.\nIt will make it possible to override the default configuration for a given token.",
96
- "type": "string"
97
- },
98
- "utilities": {
99
- "description": "Utilities are used to generate utility classes for the given token.",
100
- "type": [
101
- "array",
102
- "null"
103
- ],
104
- "items": {
105
- "$ref": "#/$defs/TokenUtilityConfig"
106
- }
107
- }
108
- },
109
- "required": [
110
- "source"
111
- ]
112
- },
113
- "TokenUtilityConfig": {
114
- "description": "TokenUtilityConfig represents the configuration of a utility class for a given token.",
115
- "type": "object",
116
- "properties": {
117
- "prefix": {
118
- "description": "The prefix that will be used to generate the utility class.\nFor example, if the prefix is \"bg\", the utility class will be \"bg-[TOKEN VARIANT]\".",
119
- "type": "string",
120
- "minLength": 1
121
- },
122
- "property": {
123
- "description": "The CSS property that will use the design token value.",
124
- "type": "string",
125
- "minLength": 1
126
- }
127
- },
128
- "required": [
129
- "prefix",
130
- "property"
131
- ]
132
- }
133
- }
134
- }