@plumeria/core 21.1.2 → 21.1.4
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/LICENSE +1 -1
- package/README.md +1 -1
- package/lib/types.d.ts +14 -14
- package/package.json +3 -3
package/LICENSE
CHANGED
package/README.md
CHANGED
|
@@ -141,4 +141,4 @@ Plumeria publishes frequently. To make that legible, every public API is rated f
|
|
|
141
141
|
|
|
142
142
|
## License
|
|
143
143
|
|
|
144
|
-
Plumeria is [MIT licensed](https://github.com/zss-
|
|
144
|
+
Plumeria is [MIT licensed](https://github.com/zss-labs/plumeria/blob/main/LICENSE).
|
package/lib/types.d.ts
CHANGED
|
@@ -83,17 +83,11 @@ type ClassStyled<T> = Readonly<{
|
|
|
83
83
|
|
|
84
84
|
type AtomicClassStyle<T> = ClassStyled<AtomicStyle<T>>;
|
|
85
85
|
|
|
86
|
-
type StyleMap<T> =
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
: AtomicClassNameFor<key & string, T[key]>
|
|
92
|
-
: key extends string
|
|
93
|
-
? AtomicClassNameFor<key, T[key]>
|
|
94
|
-
: never;
|
|
95
|
-
}>
|
|
96
|
-
: never;
|
|
86
|
+
type StyleMap<T> = Readonly<{
|
|
87
|
+
readonly [key in keyof T]: key extends NestedKey
|
|
88
|
+
? StyleMap<T[key]>
|
|
89
|
+
: AtomicClassNameFor<key & string, T[key]>;
|
|
90
|
+
}>;
|
|
97
91
|
|
|
98
92
|
type CreateReturnType<T> = Readonly<{
|
|
99
93
|
[K in keyof T]: T[K] extends (...args: infer A) => infer R
|
|
@@ -106,16 +100,22 @@ type FlatNamespace<K extends StyleKey, M = unknown> = {
|
|
|
106
100
|
: never;
|
|
107
101
|
};
|
|
108
102
|
|
|
109
|
-
|
|
103
|
+
type NestedNamespace<K extends StyleKey, M> = {
|
|
110
104
|
readonly [P: NestedKey]: AllowedNamespace<K, M> | undefined;
|
|
111
|
-
}
|
|
105
|
+
};
|
|
112
106
|
|
|
113
107
|
type AllowedNamespace<K extends StyleKey, M = unknown> = FlatNamespace<K, M> &
|
|
114
108
|
NestedNamespace<K, M>;
|
|
115
109
|
|
|
116
110
|
type StyleList<T> = T | false | null | undefined | StyleList<T>[];
|
|
117
111
|
|
|
118
|
-
type StyleNamespace =
|
|
112
|
+
type StyleNamespace = {
|
|
113
|
+
readonly [key: string]:
|
|
114
|
+
| AtomicClassNameFor<string, unknown>
|
|
115
|
+
| StyleNamespace
|
|
116
|
+
| undefined;
|
|
117
|
+
};
|
|
118
|
+
|
|
119
119
|
type Style = StyleList<StyleNamespace>;
|
|
120
120
|
|
|
121
121
|
type StyleProps<K extends StyleKey> = StyleList<AllowedNamespace<K>>;
|
package/package.json
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@plumeria/core",
|
|
3
|
-
"version": "21.1.
|
|
3
|
+
"version": "21.1.4",
|
|
4
4
|
"description": "Zero-cost abstraction layer for styling React components.",
|
|
5
5
|
"author": "Refirst 11",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"homepage": "https://plumeria.dev",
|
|
8
8
|
"repository": {
|
|
9
9
|
"type": "git",
|
|
10
|
-
"url": "git+https://github.com/zss-
|
|
10
|
+
"url": "git+https://github.com/zss-labs/plumeria.git",
|
|
11
11
|
"directory": "packages/core"
|
|
12
12
|
},
|
|
13
13
|
"bugs": {
|
|
14
|
-
"url": "https://github.com/zss-
|
|
14
|
+
"url": "https://github.com/zss-labs/plumeria/issues"
|
|
15
15
|
},
|
|
16
16
|
"keywords": [
|
|
17
17
|
"css",
|