@plumeria/core 0.6.8 → 0.7.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/css.js +5 -3
- package/dist/css.mjs +3 -2
- package/dist/cx.js +4 -3
- package/dist/cx.mjs +2 -2
- package/dist/index.js +2 -1
- package/dist/index.mjs +1 -1
- package/dist/rx.js +8 -0
- package/dist/rx.mjs +4 -0
- package/package.json +6 -7
- package/types/css.d.ts +2 -1
- package/types/cx.d.ts +1 -1
- package/types/index.d.ts +1 -1
- package/types/rx.d.ts +8 -0
package/dist/css.js
CHANGED
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.cx = exports.css = void 0;
|
|
3
|
+
exports.rx = exports.cx = exports.css = void 0;
|
|
4
4
|
const create_1 = require("./method/create");
|
|
5
5
|
const global_1 = require("./method/global");
|
|
6
|
-
const cx_1 = require("./cx");
|
|
7
|
-
Object.defineProperty(exports, "cx", { enumerable: true, get: function () { return cx_1.cx; } });
|
|
8
6
|
const define_theme_vars_1 = require("./method/define-theme-vars");
|
|
9
7
|
const keyframes_1 = require("./method/keyframes");
|
|
10
8
|
const collection_1 = require("@plumeria/collection");
|
|
9
|
+
const cx_1 = require("./cx");
|
|
10
|
+
Object.defineProperty(exports, "cx", { enumerable: true, get: function () { return cx_1.cx; } });
|
|
11
|
+
const rx_1 = require("./rx");
|
|
12
|
+
Object.defineProperty(exports, "rx", { enumerable: true, get: function () { return rx_1.rx; } });
|
|
11
13
|
class css {
|
|
12
14
|
static create(object) {
|
|
13
15
|
return (0, create_1.create)(object);
|
package/dist/css.mjs
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { create } from './method/create';
|
|
2
2
|
import { global } from './method/global';
|
|
3
|
-
import { cx } from './cx';
|
|
4
3
|
import { defineThemeVars } from './method/define-theme-vars';
|
|
5
4
|
import { keyframes } from './method/keyframes';
|
|
6
5
|
import { media, pseudo, colors, container } from '@plumeria/collection';
|
|
6
|
+
import { cx } from './cx';
|
|
7
|
+
import { rx } from './rx';
|
|
7
8
|
class css {
|
|
8
9
|
static create(object) {
|
|
9
10
|
return create(object);
|
|
@@ -22,4 +23,4 @@ class css {
|
|
|
22
23
|
static colors = colors;
|
|
23
24
|
static container = container;
|
|
24
25
|
}
|
|
25
|
-
export { css, cx };
|
|
26
|
+
export { css, cx, rx };
|
package/dist/cx.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.cx =
|
|
4
|
-
|
|
3
|
+
exports.cx = void 0;
|
|
4
|
+
const cx = (...strings) => {
|
|
5
5
|
let result = '';
|
|
6
6
|
let isFirst = true;
|
|
7
7
|
strings.filter(Boolean).forEach((str) => {
|
|
@@ -19,4 +19,5 @@ function cx(...strings) {
|
|
|
19
19
|
}
|
|
20
20
|
});
|
|
21
21
|
return result;
|
|
22
|
-
}
|
|
22
|
+
};
|
|
23
|
+
exports.cx = cx;
|
package/dist/cx.mjs
CHANGED
package/dist/index.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.cx = exports.css = void 0;
|
|
3
|
+
exports.rx = exports.cx = exports.css = void 0;
|
|
4
4
|
var css_1 = require("./css");
|
|
5
5
|
Object.defineProperty(exports, "css", { enumerable: true, get: function () { return css_1.css; } });
|
|
6
6
|
Object.defineProperty(exports, "cx", { enumerable: true, get: function () { return css_1.cx; } });
|
|
7
|
+
Object.defineProperty(exports, "rx", { enumerable: true, get: function () { return css_1.rx; } });
|
package/dist/index.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { css, cx } from './css';
|
|
1
|
+
export { css, cx, rx } from './css';
|
package/dist/rx.js
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.rx = void 0;
|
|
4
|
+
const rx = (className, varSet) => ({
|
|
5
|
+
className,
|
|
6
|
+
style: Object.fromEntries(Object.entries(varSet).map(([key, value]) => [key, value])),
|
|
7
|
+
});
|
|
8
|
+
exports.rx = rx;
|
package/dist/rx.mjs
ADDED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@plumeria/core",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.7.0",
|
|
4
4
|
"description": "Near Zero-runtime CSS-in-JS for efficient design systems.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react",
|
|
@@ -9,7 +9,6 @@
|
|
|
9
9
|
"plumeria",
|
|
10
10
|
"styling"
|
|
11
11
|
],
|
|
12
|
-
"author": "Refirst",
|
|
13
12
|
"repository": "github:zss-in-js/plumeria",
|
|
14
13
|
"license": "MIT",
|
|
15
14
|
"sideEffects": false,
|
|
@@ -39,16 +38,16 @@
|
|
|
39
38
|
"types/"
|
|
40
39
|
],
|
|
41
40
|
"dependencies": {
|
|
42
|
-
"zss-engine": "^0.2.
|
|
43
|
-
"@plumeria/collection": "^0.4.
|
|
41
|
+
"zss-engine": "^0.2.9",
|
|
42
|
+
"@plumeria/collection": "^0.4.1"
|
|
44
43
|
},
|
|
45
44
|
"publishConfig": {
|
|
46
45
|
"access": "public"
|
|
47
46
|
},
|
|
48
47
|
"scripts": {
|
|
49
|
-
"build": "
|
|
50
|
-
"css": "
|
|
48
|
+
"build": "rimraf dist types && pnpm esm && pnpm cjs && pnpm css",
|
|
49
|
+
"css": "cpy 'src/styles/**' 'dist/styles'",
|
|
51
50
|
"cjs": "tsc --project tsconfig.cjs.json",
|
|
52
|
-
"esm": "tsc --project tsconfig.esm.json && node
|
|
51
|
+
"esm": "tsc --project tsconfig.esm.json && node ../../esm.create.mjs"
|
|
53
52
|
}
|
|
54
53
|
}
|
package/types/css.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { CreateStyle, CustomHTMLType, CustomProperties, KeyframesDefinition, ReturnType, VarsDefinition } from 'zss-engine';
|
|
2
2
|
import { cx } from './cx';
|
|
3
|
+
import { rx } from './rx';
|
|
3
4
|
declare class css {
|
|
4
5
|
static create<T extends Record<string, CustomProperties>>(object: CreateStyle<T>): ReturnType<T>;
|
|
5
6
|
static global(object: CustomHTMLType): void;
|
|
@@ -80,4 +81,4 @@ declare class css {
|
|
|
80
81
|
min: (str: string) => "@container (min-)";
|
|
81
82
|
};
|
|
82
83
|
}
|
|
83
|
-
export { css, cx };
|
|
84
|
+
export { css, cx, rx };
|
package/types/cx.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare
|
|
1
|
+
export declare const cx: (...strings: Array<string | null | undefined | false>) => string & ":";
|
package/types/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { css, cx } from './css';
|
|
1
|
+
export { css, cx, rx } from './css';
|