@plumeria/core 6.0.2 → 6.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/README.md CHANGED
@@ -3,7 +3,7 @@
3
3
  An atomic CSS runtime designed to disappear.
4
4
 
5
5
  ```ts
6
- import { css } from '@plumeria/core';
6
+ import * as css from '@plumeria/core';
7
7
 
8
8
  const styles = css.create({
9
9
  text: {
@@ -18,6 +18,12 @@ const styles = css.create({
18
18
  const className = css.props(styles.text, styles.size);
19
19
  ```
20
20
 
21
+ **Compiled:**
22
+
23
+ ```tsx
24
+ className="xhrr6ses xvbwmxqp xhk51flp"
25
+ ```
26
+
21
27
  **Generated CSS:**
22
28
 
23
29
  ```css
@@ -32,10 +38,6 @@ const className = css.props(styles.text, styles.size);
32
38
  }
33
39
  ```
34
40
 
35
- ```
36
- "xhrr6ses xvbwmxqp xhk51flp"
37
- ```
38
-
39
41
  ## Documentation
40
42
 
41
43
  Read the [documentation](https://plumeria.dev/) for more details.
package/dist/css.d.mts CHANGED
@@ -49,9 +49,6 @@ type ReturnType<T> = { [K in keyof T]: Readonly<{ [P in keyof T[K]]: P extends `
49
49
  type CreateStatic = Record<string, string | number>;
50
50
  type CreateTheme = Record<string, Record<string, string | number>>;
51
51
  type ReturnVariableType<T> = { [K in keyof T]: CSSVariableValue };
52
- type Style = {
53
- [key: CSSVariableKey]: string;
54
- };
55
52
  type KeyframesInSelector = 'from' | 'to' | `${number}%`;
56
53
  type Keyframes = { [K in KeyframesInSelector]?: CSSProperties };
57
54
  type ViewTransition = {
@@ -62,19 +59,19 @@ type ViewTransition = {
62
59
  };
63
60
  type Variant = Record<string, Record<string, CSSProperties>>;
64
61
 
65
- type css = typeof css;
66
- declare const x: (className: string, style: Style) => {
67
- className: string;
68
- style: Style;
69
- };
70
- declare const css: {
71
- create: <const T extends Record<string, CSSProperties>>(_rule: CreateStyleType<T>) => ReturnType<T>;
72
- props: (..._rules: (false | CSSProperties | null | undefined)[]) => string;
73
- createTheme: <const T extends CreateTheme>(_rule: T) => ReturnVariableType<T>;
74
- createStatic: <const T extends CreateStatic>(_rule: T) => T;
75
- keyframes: (_rule: Keyframes) => string;
76
- viewTransition: (_rule: ViewTransition) => string;
77
- variants: <T extends Variant>(_rule: T) => (_props: { [K in keyof T]?: keyof T[K] }) => CSSProperties;
78
- };
62
+ type create = typeof create;
63
+ type props = typeof props;
64
+ type createTheme = typeof createTheme;
65
+ type createStatic = typeof createStatic;
66
+ type keyframes = typeof keyframes;
67
+ type viewTransition = typeof viewTransition;
68
+ type variants = typeof variants;
69
+ declare const create: <const T extends Record<string, CSSProperties>>(_rule: CreateStyleType<T>) => ReturnType<T>;
70
+ declare const props: (..._rules: (false | CSSProperties | null | undefined)[]) => string;
71
+ declare const createTheme: <const T extends CreateTheme>(_rule: T) => ReturnVariableType<T>;
72
+ declare const createStatic: <const T extends CreateStatic>(_rule: T) => T;
73
+ declare const keyframes: (_rule: Keyframes) => string;
74
+ declare const viewTransition: (_rule: ViewTransition) => string;
75
+ declare const variants: <T extends Variant>(_rule: T) => (_props: { [K in keyof T]?: keyof T[K] }) => CSSProperties;
79
76
 
80
- export { type CSSProperties, type CreateStyle, css, x };
77
+ export { type CSSProperties, type CreateStyle, create, createStatic, createTheme, keyframes, props, variants, viewTransition };
package/dist/css.mjs CHANGED
@@ -1,25 +1,12 @@
1
1
  const errorFn = () => {
2
2
  throw new Error("Runtime is not supported. Configure the bundler plugin.");
3
3
  };
4
- const props = (..._rules) => errorFn();
5
4
  const create = (_rule) => errorFn();
5
+ const props = (..._rules) => errorFn();
6
6
  const createTheme = (_rule) => errorFn();
7
7
  const createStatic = (_rule) => errorFn();
8
8
  const keyframes = (_rule) => errorFn();
9
9
  const viewTransition = (_rule) => errorFn();
10
10
  const variants = (_rule) => (_props) => errorFn();
11
- const x = (className, style) => ({
12
- className,
13
- style
14
- });
15
- const css = {
16
- create,
17
- props,
18
- createTheme,
19
- createStatic,
20
- keyframes,
21
- viewTransition,
22
- variants
23
- };
24
11
 
25
- export { css, x };
12
+ export { create, createStatic, createTheme, keyframes, props, variants, viewTransition };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@plumeria/core",
3
- "version": "6.0.2",
3
+ "version": "6.1.0",
4
4
  "description": "An atomic CSS runtime designed to disappear.",
5
5
  "author": "Refirst 11",
6
6
  "license": "MIT",