@plumeria/core 0.8.0-beta.2 → 0.8.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/dist/cjs/css.js CHANGED
@@ -2,34 +2,24 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.rx = exports.cx = exports.css = void 0;
4
4
  const zss_utils_1 = require("zss-utils");
5
- const zss_utils_2 = require("zss-utils");
6
- const zss_utils_3 = require("zss-utils");
7
- const zss_utils_4 = require("zss-utils");
8
- const zss_utils_5 = require("zss-utils");
9
- Object.defineProperty(exports, "cx", { enumerable: true, get: function () { return zss_utils_5.cx; } });
10
- Object.defineProperty(exports, "rx", { enumerable: true, get: function () { return zss_utils_5.rx; } });
5
+ Object.defineProperty(exports, "cx", { enumerable: true, get: function () { return zss_utils_1.cx; } });
6
+ Object.defineProperty(exports, "rx", { enumerable: true, get: function () { return zss_utils_1.rx; } });
11
7
  class css {
12
8
  static create(object) {
13
9
  return (0, zss_utils_1.create)(object);
14
10
  }
15
- static global = ((called = false) => {
16
- return (object) => {
17
- if (called) {
18
- throw new Error('css.global() must be one');
19
- }
20
- called = true;
21
- return (0, zss_utils_2.global)(object);
22
- };
23
- })();
11
+ static global(object) {
12
+ return (0, zss_utils_1.global)(object);
13
+ }
24
14
  static defineThemeVars(object) {
25
- return (0, zss_utils_3.defineThemeVars)(object);
15
+ return (0, zss_utils_1.defineThemeVars)(object);
26
16
  }
27
17
  static keyframes(object) {
28
- return (0, zss_utils_4.keyframes)(object);
18
+ return (0, zss_utils_1.keyframes)(object);
29
19
  }
30
- static media = zss_utils_5.media;
31
- static pseudo = zss_utils_5.pseudo;
32
- static colors = zss_utils_5.colors;
33
- static container = zss_utils_5.container;
20
+ static media = zss_utils_1.media;
21
+ static pseudo = zss_utils_1.pseudo;
22
+ static colors = zss_utils_1.colors;
23
+ static container = zss_utils_1.container;
34
24
  }
35
25
  exports.css = css;
package/dist/esm/css.js CHANGED
@@ -1,21 +1,11 @@
1
- import { create } from 'zss-utils';
2
- import { global } from 'zss-utils';
3
- import { defineThemeVars } from 'zss-utils';
4
- import { keyframes } from 'zss-utils';
5
- import { media, pseudo, colors, container, cx, rx } from 'zss-utils';
1
+ import { create, global, keyframes, defineThemeVars, media, pseudo, colors, container, cx, rx, } from 'zss-utils';
6
2
  class css {
7
3
  static create(object) {
8
4
  return create(object);
9
5
  }
10
- static global = ((called = false) => {
11
- return (object) => {
12
- if (called) {
13
- throw new Error('css.global() must be one');
14
- }
15
- called = true;
16
- return global(object);
17
- };
18
- })();
6
+ static global(object) {
7
+ return global(object);
8
+ }
19
9
  static defineThemeVars(object) {
20
10
  return defineThemeVars(object);
21
11
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@plumeria/core",
3
- "version": "0.8.0-beta.2",
3
+ "version": "0.8.0",
4
4
  "description": "Near Zero-runtime CSS-in-JS for efficient design systems.",
5
5
  "keywords": [
6
6
  "css",
@@ -44,7 +44,7 @@
44
44
  "zss-utils": "0.0.8"
45
45
  },
46
46
  "peerDependencies": {
47
- "@plumeria/compiler": ">=0.7.7"
47
+ "@plumeria/compiler": ">=0.8.2"
48
48
  },
49
49
  "publishConfig": {
50
50
  "access": "public"
package/readme.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # @plumeria/core
2
2
 
3
- Plumeria is a CSS-in-JS built using [**zss-engine**](https://www.npmjs.com/package/zss-engine) and [**zss-utils**](https://www.npmjs.com/package/zss-utils) that provides a speedy development cycle.
3
+ Plumeria is a CSS-in-JS built with [**zss-utils**](https://www.npmjs.com/package/zss-utils) that provides a speedy development cycle.
4
4
 
5
5
  ## Installation
6
6
 
@@ -16,8 +16,6 @@ To compile `@plumeria/core`, for example, to use `npx css`, install
16
16
  [`@plumeria/compiler`](https://www.npmjs.com/package/@plumeria/compiler) for static extraction through the Command Line.
17
17
  Also, it can be easily integrated into the build process.
18
18
 
19
- The compiler is built using [**SWC**](https://swc.rs/) and performs high-speed transpilation in memory.
20
-
21
19
  ```sh
22
20
  npm install --save-dev @plumeria/compiler
23
21
  ```
@@ -75,7 +73,7 @@ const styles = css.create({
75
73
  ### css.global()
76
74
 
77
75
  This API lets you define global CSS.
78
- Due to restrictions on avoiding collisions in HTML selectors, css.global() is designed to throw a compilation error if written more than once.
76
+ \*Please be careful not to create selectors that conflict by creating more than one global object.
79
77
 
80
78
  ```ts
81
79
  css.global({
@@ -88,8 +86,6 @@ css.global({
88
86
  });
89
87
  ```
90
88
 
91
- The compiler extracts the CSS rules, replacing the rules in the source code with the compiled CSS.
92
-
93
89
  ### cx
94
90
 
95
91
  Merges strings such as class names and pseudos.
package/types/css.d.ts CHANGED
@@ -2,7 +2,7 @@ import type { CreateStyle, CustomHTMLType, CustomProperties, KeyframesDefinition
2
2
  import { cx, rx } from 'zss-utils';
3
3
  declare class css {
4
4
  static create<T extends Record<string, CustomProperties>>(object: CreateStyle<T>): ReturnType<T>;
5
- static global: (object: CustomHTMLType) => void;
5
+ static global(object: CustomHTMLType): void;
6
6
  static defineThemeVars<const T extends VarsDefinition>(object: T): { [K in keyof T]: `var(--${string & K})`; };
7
7
  static keyframes(object: KeyframesDefinition): string;
8
8
  static media: {