@plumeria/core 0.7.14 → 0.7.16
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 +7 -9
- package/dist/esm/css.js +1 -3
- package/package.json +5 -7
- package/types/css.d.ts +2 -3
- package/dist/cjs/cx.js +0 -23
- package/dist/cjs/rx.js +0 -8
- package/dist/esm/cx.js +0 -19
- package/dist/esm/rx.js +0 -4
- package/types/cx.d.ts +0 -1
- package/types/rx.d.ts +0 -8
package/dist/cjs/css.js
CHANGED
|
@@ -5,11 +5,9 @@ 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
|
|
9
|
-
|
|
10
|
-
Object.defineProperty(exports, "
|
|
11
|
-
const rx_js_1 = require("./rx.js");
|
|
12
|
-
Object.defineProperty(exports, "rx", { enumerable: true, get: function () { return rx_js_1.rx; } });
|
|
8
|
+
const zss_utils_1 = require("zss-utils");
|
|
9
|
+
Object.defineProperty(exports, "cx", { enumerable: true, get: function () { return zss_utils_1.cx; } });
|
|
10
|
+
Object.defineProperty(exports, "rx", { enumerable: true, get: function () { return zss_utils_1.rx; } });
|
|
13
11
|
class css {
|
|
14
12
|
static create(object) {
|
|
15
13
|
return (0, create_js_1.create)(object);
|
|
@@ -29,9 +27,9 @@ class css {
|
|
|
29
27
|
static keyframes(object) {
|
|
30
28
|
return (0, keyframes_js_1.keyframes)(object);
|
|
31
29
|
}
|
|
32
|
-
static media =
|
|
33
|
-
static pseudo =
|
|
34
|
-
static colors =
|
|
35
|
-
static container =
|
|
30
|
+
static media = zss_utils_1.media;
|
|
31
|
+
static pseudo = zss_utils_1.pseudo;
|
|
32
|
+
static colors = zss_utils_1.colors;
|
|
33
|
+
static container = zss_utils_1.container;
|
|
36
34
|
}
|
|
37
35
|
exports.css = css;
|
package/dist/esm/css.js
CHANGED
|
@@ -2,9 +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 '
|
|
6
|
-
import { cx } from './cx.js';
|
|
7
|
-
import { rx } from './rx.js';
|
|
5
|
+
import { media, pseudo, colors, container, cx, rx } from 'zss-utils';
|
|
8
6
|
class css {
|
|
9
7
|
static create(object) {
|
|
10
8
|
return create(object);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@plumeria/core",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.16",
|
|
4
4
|
"description": "Near Zero-runtime CSS-in-JS for efficient design systems.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"css",
|
|
@@ -18,13 +18,11 @@
|
|
|
18
18
|
"./stylesheet": "./stylesheet/core.css",
|
|
19
19
|
"./dist/method/create-build-helper": {
|
|
20
20
|
"types": "./types/method/create-build-helper.d.ts",
|
|
21
|
-
"import": "./dist/esm/method/create-build-helper.js"
|
|
22
|
-
"default": "./dist/cjs/method/create-build-helper.js"
|
|
21
|
+
"import": "./dist/esm/method/create-build-helper.js"
|
|
23
22
|
},
|
|
24
23
|
"./dist/method/global-build-helper": {
|
|
25
24
|
"types": "./types/method/global-build-helper.d.ts",
|
|
26
|
-
"import": "./dist/esm/method/global-build-helper.js"
|
|
27
|
-
"default": "./dist/cjs//method/global-build-helper.js"
|
|
25
|
+
"import": "./dist/esm/method/global-build-helper.js"
|
|
28
26
|
},
|
|
29
27
|
".": {
|
|
30
28
|
"types": "./types/index.d.ts",
|
|
@@ -46,11 +44,11 @@
|
|
|
46
44
|
"esm": "tsc --project tsconfig.esm.json && node __direname"
|
|
47
45
|
},
|
|
48
46
|
"dependencies": {
|
|
49
|
-
"
|
|
47
|
+
"zss-utils": "0.0.4",
|
|
50
48
|
"zss-engine": "0.2.26"
|
|
51
49
|
},
|
|
52
50
|
"peerDependencies": {
|
|
53
|
-
"@plumeria/compiler": ">=0.
|
|
51
|
+
"@plumeria/compiler": ">=0.7.3"
|
|
54
52
|
},
|
|
55
53
|
"publishConfig": {
|
|
56
54
|
"access": "public"
|
package/types/css.d.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import type { CreateStyle, CustomHTMLType, CustomProperties, KeyframesDefinition, ReturnType, VarsDefinition } from 'zss-engine';
|
|
2
|
-
import { cx } from '
|
|
3
|
-
import { rx } from './rx.js';
|
|
2
|
+
import { cx, rx } from 'zss-utils';
|
|
4
3
|
declare class css {
|
|
5
4
|
static create<T extends Record<string, CustomProperties>>(object: CreateStyle<T>): ReturnType<T>;
|
|
6
5
|
static global: (object: CustomHTMLType) => void;
|
|
@@ -121,8 +120,8 @@ declare class css {
|
|
|
121
120
|
};
|
|
122
121
|
};
|
|
123
122
|
static colors: {
|
|
124
|
-
darken: (color: string, amount: string | number) => string;
|
|
125
123
|
lighten: (color: string, amount: string | number) => string;
|
|
124
|
+
darken: (color: string, amount: string | number) => string;
|
|
126
125
|
};
|
|
127
126
|
static container: {
|
|
128
127
|
range: (range: string) => "@container ()";
|
package/dist/cjs/cx.js
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.cx = void 0;
|
|
4
|
-
const cx = (...strings) => {
|
|
5
|
-
let result = '';
|
|
6
|
-
let isFirst = true;
|
|
7
|
-
strings.filter(Boolean).forEach((str) => {
|
|
8
|
-
if (str?.toString().startsWith(':')) {
|
|
9
|
-
result += str.toString();
|
|
10
|
-
}
|
|
11
|
-
else if (typeof str === 'string') {
|
|
12
|
-
if (isFirst) {
|
|
13
|
-
result += str;
|
|
14
|
-
isFirst = false;
|
|
15
|
-
}
|
|
16
|
-
else {
|
|
17
|
-
result += ` ${str}`;
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
});
|
|
21
|
-
return result;
|
|
22
|
-
};
|
|
23
|
-
exports.cx = cx;
|
package/dist/cjs/rx.js
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
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/esm/cx.js
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
export const cx = (...strings) => {
|
|
2
|
-
let result = '';
|
|
3
|
-
let isFirst = true;
|
|
4
|
-
strings.filter(Boolean).forEach((str) => {
|
|
5
|
-
if (str?.toString().startsWith(':')) {
|
|
6
|
-
result += str.toString();
|
|
7
|
-
}
|
|
8
|
-
else if (typeof str === 'string') {
|
|
9
|
-
if (isFirst) {
|
|
10
|
-
result += str;
|
|
11
|
-
isFirst = false;
|
|
12
|
-
}
|
|
13
|
-
else {
|
|
14
|
-
result += ` ${str}`;
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
});
|
|
18
|
-
return result;
|
|
19
|
-
};
|
package/dist/esm/rx.js
DELETED
package/types/cx.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const cx: (...strings: Array<string | null | undefined | false>) => string & ":";
|