@plumeria/core 0.7.9 → 0.7.11
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/LICENSE +1 -1
- package/dist/cjs/css.js +5 -5
- package/dist/cjs/method/create-build-helper.js +3 -6
- package/dist/cjs/method/global-build-helper.js +2 -5
- package/dist/esm/css.js +1 -1
- package/dist/esm/method/create-build-helper.js +3 -3
- package/dist/esm/method/global-build-helper.js +2 -2
- package/package.json +4 -8
- package/readme.md +11 -2
- package/stylesheet/index.d.ts +0 -2
- package/stylesheet/index.js +0 -1
- package/stylesheet/index.mjs +0 -1
package/LICENSE
CHANGED
package/dist/cjs/css.js
CHANGED
|
@@ -5,7 +5,7 @@ const create_js_1 = require("./method/create.js");
|
|
|
5
5
|
const global_js_1 = require("./method/global.js");
|
|
6
6
|
const define_theme_vars_js_1 = require("./method/define-theme-vars.js");
|
|
7
7
|
const keyframes_js_1 = require("./method/keyframes.js");
|
|
8
|
-
const
|
|
8
|
+
const style_preset_1 = require("style-preset");
|
|
9
9
|
const cx_js_1 = require("./cx.js");
|
|
10
10
|
Object.defineProperty(exports, "cx", { enumerable: true, get: function () { return cx_js_1.cx; } });
|
|
11
11
|
const rx_js_1 = require("./rx.js");
|
|
@@ -23,9 +23,9 @@ class css {
|
|
|
23
23
|
static keyframes(object) {
|
|
24
24
|
return (0, keyframes_js_1.keyframes)(object);
|
|
25
25
|
}
|
|
26
|
-
static media =
|
|
27
|
-
static pseudo =
|
|
28
|
-
static colors =
|
|
29
|
-
static container =
|
|
26
|
+
static media = style_preset_1.media;
|
|
27
|
+
static pseudo = style_preset_1.pseudo;
|
|
28
|
+
static colors = style_preset_1.colors;
|
|
29
|
+
static container = style_preset_1.container;
|
|
30
30
|
}
|
|
31
31
|
exports.css = css;
|
|
@@ -1,13 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
3
|
exports.globalPromise = exports.resolvePromise = void 0;
|
|
7
4
|
exports.buildCreate = buildCreate;
|
|
8
5
|
exports.initPromise = initPromise;
|
|
9
6
|
const zss_engine_1 = require("zss-engine");
|
|
10
|
-
const path_1 = __importDefault(require("path"));
|
|
11
7
|
let resolvePromise;
|
|
12
8
|
let globalPromise;
|
|
13
9
|
const sheetQueue = [];
|
|
@@ -20,8 +16,9 @@ function initPromise() {
|
|
|
20
16
|
};
|
|
21
17
|
});
|
|
22
18
|
}
|
|
23
|
-
function processQueue() {
|
|
24
|
-
const
|
|
19
|
+
async function processQueue() {
|
|
20
|
+
const path = await import('path');
|
|
21
|
+
const filePath = path.join(__dirname, '../../../stylesheet/core.css');
|
|
25
22
|
while (sheetQueue.length > 0) {
|
|
26
23
|
const styleSheet = sheetQueue.shift();
|
|
27
24
|
if (!zss_engine_1.isDevelopment && styleSheet)
|
|
@@ -1,13 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
3
|
exports.globalPromise = exports.resolvePromise = void 0;
|
|
7
4
|
exports.buildGlobal = buildGlobal;
|
|
8
5
|
exports.initPromise = initPromise;
|
|
9
6
|
const zss_engine_1 = require("zss-engine");
|
|
10
|
-
const path_1 = __importDefault(require("path"));
|
|
11
7
|
let resolvePromise;
|
|
12
8
|
let globalPromise;
|
|
13
9
|
const seetQueue = [];
|
|
@@ -21,7 +17,8 @@ function initPromise() {
|
|
|
21
17
|
});
|
|
22
18
|
}
|
|
23
19
|
async function processSheets() {
|
|
24
|
-
const
|
|
20
|
+
const path = await import('path');
|
|
21
|
+
const filePath = path.join(__dirname, '../../../stylesheet/core.css');
|
|
25
22
|
while (seetQueue.length > 0) {
|
|
26
23
|
const [styleSheet, option] = seetQueue.shift();
|
|
27
24
|
if (!zss_engine_1.isDevelopment && styleSheet)
|
package/dist/esm/css.js
CHANGED
|
@@ -2,7 +2,7 @@ import { create } from './method/create.js';
|
|
|
2
2
|
import { global } from './method/global.js';
|
|
3
3
|
import { defineThemeVars } from './method/define-theme-vars.js';
|
|
4
4
|
import { keyframes } from './method/keyframes.js';
|
|
5
|
-
import { media, pseudo, colors, container } from '
|
|
5
|
+
import { media, pseudo, colors, container } from 'style-preset';
|
|
6
6
|
import { cx } from './cx.js';
|
|
7
7
|
import { rx } from './rx.js';
|
|
8
8
|
class css {
|
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
import { build, isDevelopment } from 'zss-engine';
|
|
2
|
-
import path from 'path';
|
|
3
|
-
const __dirname = import.meta.dirname;
|
|
4
2
|
let resolvePromise;
|
|
5
3
|
let globalPromise;
|
|
6
4
|
const sheetQueue = [];
|
|
@@ -13,7 +11,9 @@ function initPromise() {
|
|
|
13
11
|
};
|
|
14
12
|
});
|
|
15
13
|
}
|
|
16
|
-
function processQueue() {
|
|
14
|
+
async function processQueue() {
|
|
15
|
+
const path = await import('path');
|
|
16
|
+
const __dirname = import.meta.dirname;
|
|
17
17
|
const filePath = path.join(__dirname, '../../../stylesheet/core.css');
|
|
18
18
|
while (sheetQueue.length > 0) {
|
|
19
19
|
const styleSheet = sheetQueue.shift();
|
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
import { build, isDevelopment } from 'zss-engine';
|
|
2
|
-
import path from 'path';
|
|
3
|
-
const __dirname = import.meta.dirname;
|
|
4
2
|
let resolvePromise;
|
|
5
3
|
let globalPromise;
|
|
6
4
|
const seetQueue = [];
|
|
@@ -14,6 +12,8 @@ function initPromise() {
|
|
|
14
12
|
});
|
|
15
13
|
}
|
|
16
14
|
async function processSheets() {
|
|
15
|
+
const path = await import('path');
|
|
16
|
+
const __dirname = import.meta.dirname;
|
|
17
17
|
const filePath = path.join(__dirname, '../../../stylesheet/core.css');
|
|
18
18
|
while (seetQueue.length > 0) {
|
|
19
19
|
const [styleSheet, option] = seetQueue.shift();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@plumeria/core",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.11",
|
|
4
4
|
"description": "Near Zero-runtime CSS-in-JS for efficient design systems.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react",
|
|
@@ -17,11 +17,7 @@
|
|
|
17
17
|
"sideEffects": false,
|
|
18
18
|
"exports": {
|
|
19
19
|
"./package.json": "./package.json",
|
|
20
|
-
"./stylesheet":
|
|
21
|
-
"types": "./stylesheet/index.d.ts",
|
|
22
|
-
"import": "./stylesheet/index.mjs",
|
|
23
|
-
"default": "./stylesheet/index.js"
|
|
24
|
-
},
|
|
20
|
+
"./stylesheet": "./stylesheet/core.css",
|
|
25
21
|
"./dist/method/create-build-helper": {
|
|
26
22
|
"types": "./types/method/create-build-helper.d.ts",
|
|
27
23
|
"import": "./dist/esm/method/create-build-helper.js",
|
|
@@ -47,8 +43,8 @@
|
|
|
47
43
|
"stylesheet/"
|
|
48
44
|
],
|
|
49
45
|
"dependencies": {
|
|
50
|
-
"
|
|
51
|
-
"
|
|
46
|
+
"style-preset": "0.0.14",
|
|
47
|
+
"zss-engine": "0.2.25"
|
|
52
48
|
},
|
|
53
49
|
"peerDependencies": {
|
|
54
50
|
"@plumeria/compiler": ">=0.6.5"
|
package/readme.md
CHANGED
|
@@ -17,13 +17,22 @@ To compile `@plumeria/core`, for example, to use `npx css`, install
|
|
|
17
17
|
npm install --save-dev @plumeria/compiler
|
|
18
18
|
```
|
|
19
19
|
|
|
20
|
+
### Entry StyleSheet
|
|
21
|
+
|
|
22
|
+
Import stylesheet in your application's entry point.
|
|
23
|
+
Applies the static stylesheet for production environments.
|
|
24
|
+
|
|
25
|
+
```ts
|
|
26
|
+
import '@plumeria/core/stylesheet';
|
|
27
|
+
```
|
|
28
|
+
|
|
20
29
|
## API
|
|
21
30
|
|
|
22
31
|
### css.create()
|
|
23
32
|
|
|
24
33
|
Styles are defined as a map of CSS rules using css.create(). In the example below, there are 2 different CSS rules. The names "box" and "text" are arbitrary names given to the rules.
|
|
25
34
|
|
|
26
|
-
```
|
|
35
|
+
```ts
|
|
27
36
|
import { css } from '@plumeria/core';
|
|
28
37
|
|
|
29
38
|
const styles = css.create({
|
|
@@ -188,7 +197,7 @@ Type safety relies on this eslint-plugin. It includes all properties, excluding
|
|
|
188
197
|
|
|
189
198
|
Plumeria complies with Semantic HTML, which means that it uses one style for each class name.
|
|
190
199
|
|
|
191
|
-
```
|
|
200
|
+
```ts
|
|
192
201
|
import { css } from '@plumeria/core';
|
|
193
202
|
|
|
194
203
|
const styles = css.create({
|
package/stylesheet/index.d.ts
DELETED
package/stylesheet/index.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
require('./core.css');
|
package/stylesheet/index.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import './core.css';
|