@plumeria/core 7.3.0 → 7.3.1
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 +1 -1
- package/types/css.d.ts +17 -15
- package/types/{definition.d.ts → definitions.d.ts} +10 -13
package/package.json
CHANGED
package/types/css.d.ts
CHANGED
|
@@ -8,22 +8,24 @@
|
|
|
8
8
|
* type keyframes = (_rule: Keyframes) => string;
|
|
9
9
|
* type viewTransition = (_rule: ViewTransition) => string;
|
|
10
10
|
* type variants = <T extends Variants>(_rule: T) => (_props: { [K in keyof T]?: keyof T[K] }) => CSSProperties;
|
|
11
|
-
* type marker = (_id: string, _pseudo: string) =>
|
|
12
|
-
* type extended = (_id:
|
|
11
|
+
* type marker = (_id: string, _pseudo: string) => Marker;
|
|
12
|
+
* type extended = <I extends string, P extends string>(_id: I, _pseudo: P) => Extended<I, P>;
|
|
13
13
|
* ```
|
|
14
14
|
*/
|
|
15
15
|
declare module '@plumeria/core' {
|
|
16
|
-
export type CSSProperties = import('./
|
|
17
|
-
export type CreateStyle = import('./
|
|
18
|
-
export type CreateStyleType<T> = import('./
|
|
19
|
-
export type CreateStatic = import('./
|
|
20
|
-
export type CreateTheme = import('./
|
|
21
|
-
export type Keyframes = import('./
|
|
22
|
-
export type ViewTransition = import('./
|
|
23
|
-
export type ReturnType<T> = import('./
|
|
24
|
-
export type ReturnVariableType<T> = import('./
|
|
25
|
-
export type Variants = import('./
|
|
26
|
-
export type
|
|
16
|
+
export type CSSProperties = import('./definitions').CSSProperties;
|
|
17
|
+
export type CreateStyle = import('./definitions').CreateStyle;
|
|
18
|
+
export type CreateStyleType<T> = import('./definitions').CreateStyleType<T>;
|
|
19
|
+
export type CreateStatic = import('./definitions').CreateStatic;
|
|
20
|
+
export type CreateTheme = import('./definitions').CreateTheme;
|
|
21
|
+
export type Keyframes = import('./definitions').Keyframes;
|
|
22
|
+
export type ViewTransition = import('./definitions').ViewTransition;
|
|
23
|
+
export type ReturnType<T> = import('./definitions').ReturnType<T>;
|
|
24
|
+
export type ReturnVariableType<T> = import('./definitions').ReturnVariableType<T>;
|
|
25
|
+
export type Variants = import('./definitions').Variants;
|
|
26
|
+
export type Marker = import('./definitions').Marker;
|
|
27
|
+
export type Extended<I extends string, P extends string> = import('./definitions').Extended<I, P>;
|
|
28
|
+
export type ContainerStyleQuery = import('./definitions').ContainerStyleQuery;
|
|
27
29
|
export type create = <const T extends Record<string, CSSProperties>>(_rule: CreateStyleType<T>)=> ReturnType<T>;
|
|
28
30
|
export type props = (..._rules: (false | CSSProperties | null | undefined)[])=> string;
|
|
29
31
|
export type createTheme = <const T extends CreateTheme>(_rule: T)=> ReturnVariableType<T>;
|
|
@@ -31,8 +33,8 @@ declare module '@plumeria/core' {
|
|
|
31
33
|
export type keyframes = (_rule: Keyframes) => string;
|
|
32
34
|
export type viewTransition = (_rule: ViewTransition) => string;
|
|
33
35
|
export type variants = <T extends Variants>(_rule: T) => (_props: { [K in keyof T]?: keyof T[K] }) => CSSProperties;
|
|
34
|
-
export type marker = (_id: string, _pseudo: string) =>
|
|
35
|
-
export type extended = (_id:
|
|
36
|
+
export type marker = (_id: string, _pseudo: string) => Marker;
|
|
37
|
+
export type extended = <I extends string, P extends string>(_id: I, _pseudo: P) => Extended<I, P>;
|
|
36
38
|
export const create: create;
|
|
37
39
|
export const props: props;
|
|
38
40
|
export const createTheme: createTheme;
|
|
@@ -103,19 +103,9 @@ type CreateStyle = {
|
|
|
103
103
|
[key: string]: CSSProperties;
|
|
104
104
|
};
|
|
105
105
|
|
|
106
|
-
type Selector<Properties> = {
|
|
107
|
-
readonly properties: Properties;
|
|
108
|
-
};
|
|
109
|
-
|
|
110
106
|
type ReturnType<T> = {
|
|
111
107
|
[K in keyof T]: Readonly<{
|
|
112
|
-
[P in keyof T[K]]: P
|
|
113
|
-
| `@media ${string}`
|
|
114
|
-
| `@container ${string}`
|
|
115
|
-
| `:${string}`
|
|
116
|
-
| `[${string}`
|
|
117
|
-
? Selector<keyof T[K][P]>
|
|
118
|
-
: T[K][P];
|
|
108
|
+
[P in keyof T[K]]: T[K][P];
|
|
119
109
|
}>;
|
|
120
110
|
};
|
|
121
111
|
|
|
@@ -138,7 +128,13 @@ type ViewTransition = {
|
|
|
138
128
|
|
|
139
129
|
type Variants = Record<string, Record<string, CSSProperties>>;
|
|
140
130
|
|
|
141
|
-
type
|
|
131
|
+
type Marker = Record<string, CSSProperties>;
|
|
132
|
+
|
|
133
|
+
type StripColon<T extends string> = T extends `:${infer R}`
|
|
134
|
+
? StripColon<R>
|
|
135
|
+
: T;
|
|
136
|
+
|
|
137
|
+
type Extended<I extends string, P extends string> = `@container style(--${I}-${StripColon<P>}: 1)`;
|
|
142
138
|
|
|
143
139
|
export type {
|
|
144
140
|
CSSProperties,
|
|
@@ -151,5 +147,6 @@ export type {
|
|
|
151
147
|
ReturnType,
|
|
152
148
|
ReturnVariableType,
|
|
153
149
|
Variants,
|
|
154
|
-
|
|
150
|
+
Marker,
|
|
151
|
+
Extended,
|
|
155
152
|
};
|