@tokenami/config 0.0.65 → 0.0.67
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/dist/index.cjs +1 -1
- package/dist/index.d.cts +4 -3
- package/dist/index.d.ts +4 -3
- package/dist/index.js +1 -1
- package/package.json +3 -4
package/dist/index.cjs
CHANGED
|
@@ -17,7 +17,7 @@ var gridValueRegex = /^\d+/;
|
|
|
17
17
|
var GridValue = {
|
|
18
18
|
safeParse: (input) => validate(gridValueRegex, input)
|
|
19
19
|
};
|
|
20
|
-
var tokenPropertyRegex = /(?<!var\()--(?:[
|
|
20
|
+
var tokenPropertyRegex = /(?<!var\()--(?:[^'":{}]+|{&:[^}]*})+/g;
|
|
21
21
|
var TokenProperty = {
|
|
22
22
|
safeParse: (input) => validate(tokenPropertyRegex, input)
|
|
23
23
|
};
|
package/dist/index.d.cts
CHANGED
|
@@ -7,7 +7,7 @@ type DeepReadonly<T> = T extends Function | any[] ? T : {
|
|
|
7
7
|
readonly [P in keyof T]: DeepReadonly<T[P]>;
|
|
8
8
|
};
|
|
9
9
|
type ThemeKey = 'alpha' | 'border' | 'color' | 'ease' | 'font-size' | 'leading' | 'line-style' | 'radii' | 'size' | 'shadow' | 'tracking' | 'transition' | 'weight' | 'z' | (string & {});
|
|
10
|
-
type ThemeValues = Record<string, string>;
|
|
10
|
+
type ThemeValues = Record<string, string | number>;
|
|
11
11
|
type Theme = {
|
|
12
12
|
[themeKey in ThemeKey]?: ThemeValues;
|
|
13
13
|
};
|
|
@@ -20,6 +20,7 @@ type ThemeModes<T = Theme> = {
|
|
|
20
20
|
type ThemeConfig = Theme | ThemeModes;
|
|
21
21
|
type Aliases = Record<string, readonly CSSProperty[]>;
|
|
22
22
|
type PropertiesOptions = readonly ('grid' | ThemeKey)[];
|
|
23
|
+
type Selector = string | string[];
|
|
23
24
|
interface Config {
|
|
24
25
|
include: string[];
|
|
25
26
|
exclude?: string[];
|
|
@@ -29,7 +30,7 @@ interface Config {
|
|
|
29
30
|
[atRule: string]: string;
|
|
30
31
|
};
|
|
31
32
|
selectors?: {
|
|
32
|
-
[name: string]:
|
|
33
|
+
[name: string]: Selector;
|
|
33
34
|
};
|
|
34
35
|
keyframes?: {
|
|
35
36
|
[name: string]: {
|
|
@@ -37,7 +38,7 @@ interface Config {
|
|
|
37
38
|
};
|
|
38
39
|
};
|
|
39
40
|
aliases?: Aliases;
|
|
40
|
-
themeSelector?: (mode: string) =>
|
|
41
|
+
themeSelector?: (mode: string) => Selector;
|
|
41
42
|
theme: ThemeConfig;
|
|
42
43
|
properties?: Partial<Record<CSSProperty | (string & {}), PropertiesOptions>>;
|
|
43
44
|
}
|
package/dist/index.d.ts
CHANGED
|
@@ -7,7 +7,7 @@ type DeepReadonly<T> = T extends Function | any[] ? T : {
|
|
|
7
7
|
readonly [P in keyof T]: DeepReadonly<T[P]>;
|
|
8
8
|
};
|
|
9
9
|
type ThemeKey = 'alpha' | 'border' | 'color' | 'ease' | 'font-size' | 'leading' | 'line-style' | 'radii' | 'size' | 'shadow' | 'tracking' | 'transition' | 'weight' | 'z' | (string & {});
|
|
10
|
-
type ThemeValues = Record<string, string>;
|
|
10
|
+
type ThemeValues = Record<string, string | number>;
|
|
11
11
|
type Theme = {
|
|
12
12
|
[themeKey in ThemeKey]?: ThemeValues;
|
|
13
13
|
};
|
|
@@ -20,6 +20,7 @@ type ThemeModes<T = Theme> = {
|
|
|
20
20
|
type ThemeConfig = Theme | ThemeModes;
|
|
21
21
|
type Aliases = Record<string, readonly CSSProperty[]>;
|
|
22
22
|
type PropertiesOptions = readonly ('grid' | ThemeKey)[];
|
|
23
|
+
type Selector = string | string[];
|
|
23
24
|
interface Config {
|
|
24
25
|
include: string[];
|
|
25
26
|
exclude?: string[];
|
|
@@ -29,7 +30,7 @@ interface Config {
|
|
|
29
30
|
[atRule: string]: string;
|
|
30
31
|
};
|
|
31
32
|
selectors?: {
|
|
32
|
-
[name: string]:
|
|
33
|
+
[name: string]: Selector;
|
|
33
34
|
};
|
|
34
35
|
keyframes?: {
|
|
35
36
|
[name: string]: {
|
|
@@ -37,7 +38,7 @@ interface Config {
|
|
|
37
38
|
};
|
|
38
39
|
};
|
|
39
40
|
aliases?: Aliases;
|
|
40
|
-
themeSelector?: (mode: string) =>
|
|
41
|
+
themeSelector?: (mode: string) => Selector;
|
|
41
42
|
theme: ThemeConfig;
|
|
42
43
|
properties?: Partial<Record<CSSProperty | (string & {}), PropertiesOptions>>;
|
|
43
44
|
}
|
package/dist/index.js
CHANGED
|
@@ -15,7 +15,7 @@ var gridValueRegex = /^\d+/;
|
|
|
15
15
|
var GridValue = {
|
|
16
16
|
safeParse: (input) => validate(gridValueRegex, input)
|
|
17
17
|
};
|
|
18
|
-
var tokenPropertyRegex = /(?<!var\()--(?:[
|
|
18
|
+
var tokenPropertyRegex = /(?<!var\()--(?:[^'":{}]+|{&:[^}]*})+/g;
|
|
19
19
|
var TokenProperty = {
|
|
20
20
|
safeParse: (input) => validate(tokenPropertyRegex, input)
|
|
21
21
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tokenami/config",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.67",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.cjs",
|
|
@@ -29,8 +29,7 @@
|
|
|
29
29
|
"scripts": {
|
|
30
30
|
"build": "tsup",
|
|
31
31
|
"dev": "tsup --watch",
|
|
32
|
-
"typecheck": "tsc --noEmit"
|
|
33
|
-
"typecheck:ci": "tsc --noEmit"
|
|
32
|
+
"typecheck": "tsc --noEmit"
|
|
34
33
|
},
|
|
35
34
|
"dependencies": {
|
|
36
35
|
"csstype": "^3.1.2"
|
|
@@ -39,5 +38,5 @@
|
|
|
39
38
|
"tsup": "^7.0.0",
|
|
40
39
|
"typescript": "^5.1.3"
|
|
41
40
|
},
|
|
42
|
-
"gitHead": "
|
|
41
|
+
"gitHead": "2dc80026fb2915c8a74fe284b880e93afa749c3e"
|
|
43
42
|
}
|