@plumeria/core 19.14.3 → 19.15.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/LICENSE +1 -1
- package/lib/css.d.ts +6 -0
- package/lib/types.d.ts +32 -0
- package/package.json +1 -1
package/LICENSE
CHANGED
package/lib/css.d.ts
CHANGED
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
* type createStatic = <const T extends CreateStatic>(rule: T)=> T;
|
|
8
8
|
* type keyframes = <const T extends Keyframes>(rule: T) => string;
|
|
9
9
|
* type viewTransition = <const T extends ViewTransition>(rule: T) => string;
|
|
10
|
+
* type varType = <const T extends VarType>(rule: T) => CSSVariableKey;
|
|
10
11
|
* type marker = (id: string, pseudo: string) => Marker;
|
|
11
12
|
* type extended = <I extends string, P extends string>(id: I, pseudo: P) => Extended<I, P>;
|
|
12
13
|
* type use = (...rules: Style[]) => string;
|
|
@@ -31,6 +32,8 @@ declare module '@plumeria/core' {
|
|
|
31
32
|
CreateStatic,
|
|
32
33
|
Keyframes,
|
|
33
34
|
ViewTransition,
|
|
35
|
+
VarType,
|
|
36
|
+
CSSVariableKey,
|
|
34
37
|
Marker,
|
|
35
38
|
Extended,
|
|
36
39
|
} from '#types';
|
|
@@ -69,6 +72,9 @@ declare module '@plumeria/core' {
|
|
|
69
72
|
rule: T,
|
|
70
73
|
) => string;
|
|
71
74
|
|
|
75
|
+
export const varType: varType;
|
|
76
|
+
export type varType = <const T extends VarType>(rule: T) => CSSVariableKey;
|
|
77
|
+
|
|
72
78
|
export const marker: marker;
|
|
73
79
|
export type marker = (id: string, pseudo: string) => Marker;
|
|
74
80
|
|
package/lib/types.d.ts
CHANGED
|
@@ -152,6 +152,36 @@ type ViewTransition = {
|
|
|
152
152
|
old?: CSSProperties;
|
|
153
153
|
};
|
|
154
154
|
|
|
155
|
+
type VarTypeSyntax =
|
|
156
|
+
| '<angle>'
|
|
157
|
+
| '<color>'
|
|
158
|
+
| '<custom-ident>'
|
|
159
|
+
| '<image>'
|
|
160
|
+
| '<integer>'
|
|
161
|
+
| '<length>'
|
|
162
|
+
| '<length-percentage>'
|
|
163
|
+
| '<number>'
|
|
164
|
+
| '<percentage>'
|
|
165
|
+
| '<resolution>'
|
|
166
|
+
| '<string>'
|
|
167
|
+
| '<time>'
|
|
168
|
+
| '<transform-function>'
|
|
169
|
+
| '<transform-list>'
|
|
170
|
+
| '<url>'
|
|
171
|
+
| (string & {});
|
|
172
|
+
|
|
173
|
+
type VarType =
|
|
174
|
+
| {
|
|
175
|
+
syntax: '*';
|
|
176
|
+
inherits?: boolean;
|
|
177
|
+
initialValue?: string;
|
|
178
|
+
}
|
|
179
|
+
| {
|
|
180
|
+
syntax: VarTypeSyntax;
|
|
181
|
+
inherits?: boolean;
|
|
182
|
+
initialValue: string;
|
|
183
|
+
};
|
|
184
|
+
|
|
155
185
|
type StripColon<T extends string> = T extends `:${infer R}` ? StripColon<R> : T;
|
|
156
186
|
|
|
157
187
|
type Extended<
|
|
@@ -179,6 +209,8 @@ export type {
|
|
|
179
209
|
CreateStatic,
|
|
180
210
|
Keyframes,
|
|
181
211
|
ViewTransition,
|
|
212
|
+
VarType,
|
|
213
|
+
CSSVariableKey,
|
|
182
214
|
Marker,
|
|
183
215
|
Extended,
|
|
184
216
|
};
|