@plumeria/core 19.15.0 → 21.0.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/README.md CHANGED
@@ -124,16 +124,18 @@ Explore the [documentation](https://plumeria.dev/) for the core principles, full
124
124
 
125
125
  Plumeria publishes frequently. To make that legible, every public API is rated for **future** change likelihood — not past churn. The rating is a commitment about what will happen next, not a description of what already has.
126
126
 
127
- | API | Stability | |
128
- | ---------------------- | --------- | ------ |
129
- | `css.create` | ★★★★★ | Frozen |
130
- | `css.createTheme` | ★★★★★ | Frozen |
131
- | `css.createStatic` | ★★★★★ | Frozen |
132
- | `css.keyframes` | ★★★★★ | Frozen |
133
- | `css.viewTransition` | ★★★★★ | Frozen |
134
- | `css.marker` | ★★★★☆ | Stable |
135
- | `css.extended` | ★★★★☆ | Stable |
136
- | `css.use`/`classStyle` | ★★★★★ | Frozen |
127
+ | API | Stability | |
128
+ | ------------------------- | --------- | ------ |
129
+ | `css.create` | ★★★★★ | Frozen |
130
+ | `css.createTheme` | ★★★★★ | Frozen |
131
+ | `css.createStatic` | ★★★★★ | Frozen |
132
+ | `css.keyframes` | ★★★★★ | Frozen |
133
+ | `css.viewTransitionClass` | ★★★★★ | Frozen |
134
+ | `css.positionTry` | ★★★★☆ | Stable |
135
+ | `css.varType` | ★★★★☆ | Stable |
136
+ | `css.marker` | ★★★★☆ | Stable |
137
+ | `css.extended` | ★★★★☆ | Stable |
138
+ | `css.use`/`classStyle` | ★★★★★ | Frozen |
137
139
 
138
140
  > The **`classStyle`** can be renamed via configuration
139
141
 
package/lib/css.d.ts CHANGED
@@ -6,7 +6,8 @@
6
6
  * type createTheme = <const T extends CreateTheme>(themeSelector: CreateThemeSelector, rule: T) => CreateThemeReturnType<T>;
7
7
  * type createStatic = <const T extends CreateStatic>(rule: T)=> T;
8
8
  * type keyframes = <const T extends Keyframes>(rule: T) => string;
9
- * type viewTransition = <const T extends ViewTransition>(rule: T) => string;
9
+ * type viewTransitionClass = <const T extends ViewTransition>(rule: T) => string;
10
+ * type positionTry = <const T extends PositionTry>(rule: T) => CSSVariableKey;
10
11
  * type varType = <const T extends VarType>(rule: T) => CSSVariableKey;
11
12
  * type marker = (id: string, pseudo: string) => Marker;
12
13
  * type extended = <I extends string, P extends string>(id: I, pseudo: P) => Extended<I, P>;
@@ -32,6 +33,7 @@ declare module '@plumeria/core' {
32
33
  CreateStatic,
33
34
  Keyframes,
34
35
  ViewTransition,
36
+ PositionTry,
35
37
  VarType,
36
38
  CSSVariableKey,
37
39
  Marker,
@@ -67,11 +69,16 @@ declare module '@plumeria/core' {
67
69
  export const keyframes: keyframes;
68
70
  export type keyframes = <const T extends Keyframes>(rule: T) => string;
69
71
 
70
- export const viewTransition: viewTransition;
71
- export type viewTransition = <const T extends ViewTransition>(
72
+ export const viewTransitionClass: viewTransitionClass;
73
+ export type viewTransitionClass = <const T extends ViewTransition>(
72
74
  rule: T,
73
75
  ) => string;
74
76
 
77
+ export const positionTry: positionTry;
78
+ export type positionTry = <const T extends PositionTry>(
79
+ rule: T,
80
+ ) => CSSVariableKey;
81
+
75
82
  export const varType: varType;
76
83
  export type varType = <const T extends VarType>(rule: T) => CSSVariableKey;
77
84
 
package/lib/types.d.ts CHANGED
@@ -24,8 +24,11 @@ type ColonSelector = {
24
24
  [key in ColonString]: CommonProperties | CSSVariableProperty;
25
25
  };
26
26
 
27
- type AtKeyword = '@media' | '@container' | '@supports' | '@layer' | '@scope';
28
- type AtRule = `${AtKeyword} ${string}` | `${AtKeyword}(${string}`;
27
+ type AtKeyword = '@media' | '@container' | '@supports';
28
+ type AtRule =
29
+ | `${AtKeyword} ${string}`
30
+ | `${AtKeyword}(${string}`
31
+ | '@starting-style';
29
32
 
30
33
  type StyleKey = keyof CSSTypes;
31
34
  type NestedKey = ColonString | ArrayString | AtRule;
@@ -152,6 +155,49 @@ type ViewTransition = {
152
155
  old?: CSSProperties;
153
156
  };
154
157
 
158
+ type PositionTryProperty =
159
+ | 'positionAnchor'
160
+ | 'positionArea'
161
+ | 'inset'
162
+ | 'insetBlock'
163
+ | 'insetBlockStart'
164
+ | 'insetBlockEnd'
165
+ | 'insetInline'
166
+ | 'insetInlineStart'
167
+ | 'insetInlineEnd'
168
+ | 'top'
169
+ | 'right'
170
+ | 'bottom'
171
+ | 'left'
172
+ | 'placeSelf'
173
+ | 'alignSelf'
174
+ | 'justifySelf'
175
+ | 'inlineSize'
176
+ | 'minInlineSize'
177
+ | 'maxInlineSize'
178
+ | 'width'
179
+ | 'minWidth'
180
+ | 'maxWidth'
181
+ | 'blockSize'
182
+ | 'minBlockSize'
183
+ | 'maxBlockSize'
184
+ | 'height'
185
+ | 'minHeight'
186
+ | 'maxHeight'
187
+ | 'margin'
188
+ | 'marginBlock'
189
+ | 'marginBlockStart'
190
+ | 'marginBlockEnd'
191
+ | 'marginInline'
192
+ | 'marginInlineStart'
193
+ | 'marginInlineEnd'
194
+ | 'marginTop'
195
+ | 'marginRight'
196
+ | 'marginBottom'
197
+ | 'marginLeft';
198
+
199
+ type PositionTry = Pick<CommonProperties, PositionTryProperty>;
200
+
155
201
  type VarTypeSyntax =
156
202
  | '<angle>'
157
203
  | '<color>'
@@ -209,6 +255,7 @@ export type {
209
255
  CreateStatic,
210
256
  Keyframes,
211
257
  ViewTransition,
258
+ PositionTry,
212
259
  VarType,
213
260
  CSSVariableKey,
214
261
  Marker,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@plumeria/core",
3
- "version": "19.15.0",
3
+ "version": "21.0.0",
4
4
  "description": "Zero-cost abstraction layer for styling React components.",
5
5
  "author": "Refirst 11",
6
6
  "license": "MIT",