@plumeria/core 16.2.12 → 16.3.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 +2 -2
- package/lib/css.d.ts +3 -0
- package/lib/csstypes.d.ts +22 -4
- package/lib/types.d.ts +2 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
|
|
12
12
|
## Installation
|
|
13
13
|
|
|
14
|
-
`@plumeria/core` contains type definitions only. Styles are compiled away at build time by a bundler integration — [`@plumeria/next-plugin`](https://www.npmjs.com/package/@plumeria/next-plugin) for Next.js, or [`@plumeria/unplugin`](https://www.npmjs.com/package/@plumeria/unplugin) for Vite, Webpack, and others.
|
|
14
|
+
`@plumeria/core` contains type definitions only — importing it augments React's JSX types so that styleName is accepted on host elements. Styles are compiled away at build time by a bundler integration — [`@plumeria/next-plugin`](https://www.npmjs.com/package/@plumeria/next-plugin) for Next.js, or [`@plumeria/unplugin`](https://www.npmjs.com/package/@plumeria/unplugin) for Vite, Webpack, and others.
|
|
15
15
|
|
|
16
16
|
```sh
|
|
17
17
|
pnpm add -D @plumeria/core
|
|
@@ -39,7 +39,7 @@ const styles = css.create({
|
|
|
39
39
|
});
|
|
40
40
|
|
|
41
41
|
export default function App({ cond }) {
|
|
42
|
-
const scale = useScale();
|
|
42
|
+
const scale = useScale(); // from your own hook
|
|
43
43
|
return (
|
|
44
44
|
<div
|
|
45
45
|
styleName={[
|
package/lib/css.d.ts
CHANGED
package/lib/csstypes.d.ts
CHANGED
|
@@ -97,7 +97,13 @@ type animationRangeEnd = number | StableString;
|
|
|
97
97
|
type animationRangeStart = number | StableString;
|
|
98
98
|
type animationTimeline = number | StableString;
|
|
99
99
|
type animationTimingFunction = singleTimingFunction;
|
|
100
|
-
type appearance =
|
|
100
|
+
type appearance =
|
|
101
|
+
| 'auto'
|
|
102
|
+
| 'none'
|
|
103
|
+
| 'menulist-button'
|
|
104
|
+
| 'textfield'
|
|
105
|
+
| 'base'
|
|
106
|
+
| 'base-select';
|
|
101
107
|
type aspectRatio = number | StableString;
|
|
102
108
|
type attachment = 'scroll' | 'fixed' | 'local';
|
|
103
109
|
type azimuth = number | StableString;
|
|
@@ -1162,7 +1168,14 @@ type WebkitTapHighlightColor = color;
|
|
|
1162
1168
|
type WebkitTextFillColor = color;
|
|
1163
1169
|
type WebkitTextStrokeColor = color;
|
|
1164
1170
|
type WebkitTextStrokeWidth = number | StableString;
|
|
1165
|
-
type whiteSpace =
|
|
1171
|
+
type whiteSpace =
|
|
1172
|
+
| 'normal'
|
|
1173
|
+
| 'pre'
|
|
1174
|
+
| 'pre-wrap'
|
|
1175
|
+
| 'pre-line'
|
|
1176
|
+
| 'wrap'
|
|
1177
|
+
| 'nowrap'
|
|
1178
|
+
| whiteSpaceCollapse;
|
|
1166
1179
|
type whiteSpaceCollapse =
|
|
1167
1180
|
| 'collapse'
|
|
1168
1181
|
| 'discard'
|
|
@@ -1173,7 +1186,12 @@ type whiteSpaceCollapse =
|
|
|
1173
1186
|
type widows = number | StableString;
|
|
1174
1187
|
type width = 'auto' | intrinsicSize | extrinsicSize | number | StableString;
|
|
1175
1188
|
type willChange = 'auto' | animatableFeature;
|
|
1176
|
-
type wordBreak =
|
|
1189
|
+
type wordBreak =
|
|
1190
|
+
| 'normal'
|
|
1191
|
+
| 'break-all'
|
|
1192
|
+
| 'keep-all'
|
|
1193
|
+
| 'auto-phrase'
|
|
1194
|
+
| nonStandardWordBreak;
|
|
1177
1195
|
type wordSpacing = 'normal' | lengthPercentage;
|
|
1178
1196
|
type wordWrap = 'normal' | 'break-word';
|
|
1179
1197
|
type writingMode =
|
|
@@ -1184,7 +1202,7 @@ type writingMode =
|
|
|
1184
1202
|
| 'sideways-lr'
|
|
1185
1203
|
| svgWritingMode;
|
|
1186
1204
|
type zIndex = 'auto' | number | StableString;
|
|
1187
|
-
type zoom = 'normal';
|
|
1205
|
+
type zoom = 'normal' | number | StableString;
|
|
1188
1206
|
|
|
1189
1207
|
export type CSSTypes = Readonly<{
|
|
1190
1208
|
WebkitFontSmoothing?: all | WebkitFontSmoothing;
|
package/lib/types.d.ts
CHANGED
|
@@ -48,9 +48,9 @@ type CSSProperties =
|
|
|
48
48
|
|
|
49
49
|
type CreateStyleValue = CSSProperties | ((...args: any[]) => CSSProperties);
|
|
50
50
|
|
|
51
|
-
const ClassNameTag: unique symbol;
|
|
51
|
+
declare const ClassNameTag: unique symbol;
|
|
52
52
|
|
|
53
|
-
type AtomicClassNameFor<
|
|
53
|
+
type AtomicClassNameFor<P extends string, V> = string & {
|
|
54
54
|
readonly _ident: typeof ClassNameTag;
|
|
55
55
|
readonly _key: P;
|
|
56
56
|
readonly _value: V;
|