@plumeria/core 0.7.18 → 0.7.20

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.
Files changed (3) hide show
  1. package/LICENSE +21 -0
  2. package/package.json +8 -8
  3. package/readme.md +12 -5
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) zss-in-js contributer
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@plumeria/core",
3
- "version": "0.7.18",
3
+ "version": "0.7.20",
4
4
  "description": "Near Zero-runtime CSS-in-JS for efficient design systems.",
5
5
  "keywords": [
6
6
  "css",
@@ -40,19 +40,19 @@
40
40
  "types/",
41
41
  "stylesheet/"
42
42
  ],
43
- "scripts": {
44
- "build": "rimraf dist types && pnpm esm && pnpm cjs",
45
- "cjs": "tsc --project tsconfig.cjs.json",
46
- "esm": "tsc --project tsconfig.esm.json && node __direname"
47
- },
48
43
  "dependencies": {
49
44
  "zss-utils": "0.0.4",
50
45
  "zss-engine": "0.2.26"
51
46
  },
52
47
  "peerDependencies": {
53
- "@plumeria/compiler": ">=0.7.6"
48
+ "@plumeria/compiler": ">=0.7.7"
54
49
  },
55
50
  "publishConfig": {
56
51
  "access": "public"
52
+ },
53
+ "scripts": {
54
+ "build": "rimraf dist types && pnpm esm && pnpm cjs",
55
+ "cjs": "tsc --project tsconfig.cjs.json",
56
+ "esm": "tsc --project tsconfig.esm.json && node __direname"
57
57
  }
58
- }
58
+ }
package/readme.md CHANGED
@@ -1,5 +1,7 @@
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.
4
+
3
5
  ## Installation
4
6
 
5
7
  To start using Plumeria, install the following two packages:
@@ -11,15 +13,20 @@ npm install --save @plumeria/core
11
13
  ### Compiler
12
14
 
13
15
  To compile `@plumeria/core`, for example, to use `npx css`, install
14
- [`@plumeria/compiler`](https://www.npmjs.com/package/@plumeria/compiler) for static extraction through the build process.
16
+ [`@plumeria/compiler`](https://www.npmjs.com/package/@plumeria/compiler) for static extraction through the Command Line.
17
+ Also, it can be easily integrated into the build process.
18
+
19
+ The compiler is built using [**SWC**](https://swc.rs/) and performs high-speed transpilation in memory.
15
20
 
16
21
  ```sh
17
22
  npm install --save-dev @plumeria/compiler
18
23
  ```
19
24
 
20
- ### Entry StyleSheet
25
+ ### Static StyleSheet
21
26
 
22
27
  Import stylesheet in your application's entry point.
28
+ CSS for all APIs is collected here.
29
+
23
30
  Applies the static stylesheet for production environments.
24
31
 
25
32
  ```ts
@@ -68,7 +75,7 @@ const styles = css.create({
68
75
  ### css.global()
69
76
 
70
77
  This API lets you define global CSS.
71
- You need to import the file containing css.global() wherever you use it (e.g. the top-level root).
78
+ Due to restrictions on avoiding collisions in HTML selectors, css.global() is designed to throw a compilation error if written more than once.
72
79
 
73
80
  ```ts
74
81
  css.global({
@@ -178,8 +185,8 @@ Mixes #000 or #FFF into the color.
178
185
  The first argument takes the color and the second argument takes the same value as opacity (string % or number).
179
186
 
180
187
  ```ts
181
- css.colors.darken('skyblue', 0.12);
182
- css.colors.darken('skyblue', '12%');
188
+ color: css.colors.darken('skyblue', 0.12),
189
+ color: css.colors.lighten('navy', 0.6),
183
190
  ```
184
191
 
185
192
  ## Linter