@plumeria/core 10.0.7 → 10.1.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/lib/css.d.ts +31 -14
- package/lib/csstype.d.ts +1691 -0
- package/lib/types.d.ts +8 -87
- package/package.json +1 -4
package/lib/types.d.ts
CHANGED
|
@@ -1,86 +1,11 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { CSSType } from './csstype';
|
|
2
2
|
|
|
3
3
|
type CSSVariableKey = `--${string}`;
|
|
4
4
|
type CSSVariableValue = `var(${CSSVariableKey})`;
|
|
5
5
|
type CSSVariableProperty = { [key: CSSVariableKey]: string | number };
|
|
6
6
|
|
|
7
|
-
type ColorValue = Exclude<Property.Color, '-moz-initial'> | (string & {});
|
|
8
|
-
type CSSColorProperty = Exclude<ColorValue, SystemColorKeyword>;
|
|
9
|
-
|
|
10
|
-
type SystemColorKeyword =
|
|
11
|
-
| 'ActiveBorder'
|
|
12
|
-
| 'ActiveCaption'
|
|
13
|
-
| 'AppWorkspace'
|
|
14
|
-
| 'Background'
|
|
15
|
-
| 'ButtonFace'
|
|
16
|
-
| 'ButtonHighlight'
|
|
17
|
-
| 'ButtonShadow'
|
|
18
|
-
| 'ButtonText'
|
|
19
|
-
| 'CaptionText'
|
|
20
|
-
| 'GrayText'
|
|
21
|
-
| 'Highlight'
|
|
22
|
-
| 'HighlightText'
|
|
23
|
-
| 'InactiveBorder'
|
|
24
|
-
| 'InactiveCaption'
|
|
25
|
-
| 'InactiveCaptionText'
|
|
26
|
-
| 'InfoBackground'
|
|
27
|
-
| 'InfoText'
|
|
28
|
-
| 'Menu'
|
|
29
|
-
| 'MenuText'
|
|
30
|
-
| 'Scrollbar'
|
|
31
|
-
| 'ThreeDDarkShadow'
|
|
32
|
-
| 'ThreeDFace'
|
|
33
|
-
| 'ThreeDHighlight'
|
|
34
|
-
| 'ThreeDLightShadow'
|
|
35
|
-
| 'ThreeDShadow'
|
|
36
|
-
| 'Window'
|
|
37
|
-
| 'WindowFrame'
|
|
38
|
-
| 'WindowText'
|
|
39
|
-
| 'AccentColor'
|
|
40
|
-
| 'AccentColorText'
|
|
41
|
-
| 'ActiveText'
|
|
42
|
-
| 'ButtonBorder'
|
|
43
|
-
| 'Canvas'
|
|
44
|
-
| 'CanvasText'
|
|
45
|
-
| 'Field'
|
|
46
|
-
| 'FieldText'
|
|
47
|
-
| 'LinkText'
|
|
48
|
-
| 'Mark'
|
|
49
|
-
| 'MarkText'
|
|
50
|
-
| 'SelectedItem'
|
|
51
|
-
| 'SelectedItemText'
|
|
52
|
-
| 'VisitedText';
|
|
53
|
-
|
|
54
|
-
type VendorPrefixedValue = `-${'webkit' | 'moz' | 'ms' | 'o'}-${string}`;
|
|
55
|
-
|
|
56
|
-
type CleanValue<T> = Exclude<T, VendorPrefixedValue>;
|
|
57
|
-
|
|
58
|
-
type CSSTypeProperties = Properties<number | (string & {})>;
|
|
59
|
-
|
|
60
|
-
type ColorProperties = {
|
|
61
|
-
accentColor?: CSSColorProperty;
|
|
62
|
-
color?: CSSColorProperty;
|
|
63
|
-
borderLeftColor?: CSSColorProperty;
|
|
64
|
-
borderRightColor?: CSSColorProperty;
|
|
65
|
-
borderTopColor?: CSSColorProperty;
|
|
66
|
-
borderBottomColor?: CSSColorProperty;
|
|
67
|
-
borderBlockColor?: CSSColorProperty;
|
|
68
|
-
borderBlockStartColor?: CSSColorProperty;
|
|
69
|
-
borderBlockEndColor?: CSSColorProperty;
|
|
70
|
-
borderInlineColor?: CSSColorProperty;
|
|
71
|
-
borderInlineStartColor?: CSSColorProperty;
|
|
72
|
-
borderInlineEndColor?: CSSColorProperty;
|
|
73
|
-
backgroundColor?: CSSColorProperty;
|
|
74
|
-
outlineColor?: CSSColorProperty;
|
|
75
|
-
textDecorationColor?: CSSColorProperty;
|
|
76
|
-
caretColor?: CSSColorProperty;
|
|
77
|
-
columnRuleColor?: CSSColorProperty;
|
|
78
|
-
};
|
|
79
|
-
|
|
80
7
|
type CommonProperties = {
|
|
81
|
-
[K in keyof
|
|
82
|
-
? ColorProperties[K]
|
|
83
|
-
: CleanValue<CSSTypeProperties[K]> | CSSVariableValue;
|
|
8
|
+
[K in keyof CSSType]: CSSType[K] | CSSVariableValue;
|
|
84
9
|
};
|
|
85
10
|
|
|
86
11
|
type ArrayString = `[${string}`;
|
|
@@ -109,17 +34,13 @@ type CSSProperties =
|
|
|
109
34
|
| QuerySelector
|
|
110
35
|
| CSSVariableProperty;
|
|
111
36
|
|
|
112
|
-
type CreateStyleType<T> = {
|
|
113
|
-
readonly [K in keyof T]: T[K] extends CSSProperties ? CSSProperties : T[K];
|
|
114
|
-
};
|
|
115
|
-
|
|
116
37
|
type CreateReturnType<T> = {
|
|
117
38
|
[K in keyof T]: T[K] extends (...args: infer A) => infer R
|
|
118
39
|
? (...args: A) => Readonly<{ [P in keyof R]: R[P] }>
|
|
119
40
|
: Readonly<{ [P in keyof T[K]]: T[K][P] }>;
|
|
120
41
|
};
|
|
121
42
|
|
|
122
|
-
type CreateStyleValue = CSSProperties | ((...args: never) => CSSProperties)
|
|
43
|
+
type CreateStyleValue = CSSProperties | ((...args: never) => CSSProperties);
|
|
123
44
|
|
|
124
45
|
type StyleName = CSSProperties | (false | CSSProperties | null | undefined)[];
|
|
125
46
|
|
|
@@ -144,17 +65,17 @@ type Variants = Record<string, Record<string, CSSProperties>>;
|
|
|
144
65
|
|
|
145
66
|
type Marker = Record<string, CSSProperties>;
|
|
146
67
|
|
|
147
|
-
type StripColon<T extends string> = T extends `:${infer R}`
|
|
148
|
-
? StripColon<R>
|
|
149
|
-
: T;
|
|
68
|
+
type StripColon<T extends string> = T extends `:${infer R}` ? StripColon<R> : T;
|
|
150
69
|
|
|
151
|
-
type Extended<
|
|
70
|
+
type Extended<
|
|
71
|
+
I extends string,
|
|
72
|
+
P extends string,
|
|
73
|
+
> = `@container style(--${I}-${StripColon<P>}: 1)`;
|
|
152
74
|
|
|
153
75
|
export type {
|
|
154
76
|
CSSProperties,
|
|
155
77
|
StyleName,
|
|
156
78
|
CreateStyleValue,
|
|
157
|
-
CreateStyleType,
|
|
158
79
|
CreateReturnType,
|
|
159
80
|
CreateStatic,
|
|
160
81
|
CreateTheme,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@plumeria/core",
|
|
3
|
-
"version": "10.0
|
|
3
|
+
"version": "10.1.0",
|
|
4
4
|
"description": "A styling system that disappears.",
|
|
5
5
|
"author": "Refirst 11",
|
|
6
6
|
"license": "MIT",
|
|
@@ -35,9 +35,6 @@
|
|
|
35
35
|
"files": [
|
|
36
36
|
"lib/"
|
|
37
37
|
],
|
|
38
|
-
"dependencies": {
|
|
39
|
-
"csstype": "^3.2.3"
|
|
40
|
-
},
|
|
41
38
|
"publishConfig": {
|
|
42
39
|
"access": "public",
|
|
43
40
|
"provenance": true
|