@plumeria/core 0.7.14 → 0.7.15
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 +21 -0
- package/dist/cjs/css.js +7 -9
- package/dist/esm/css.js +1 -3
- package/package.json +9 -9
- 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/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/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.15",
|
|
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.
|
|
48
|
+
"@plumeria/compiler": ">=0.7.3"
|
|
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/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 & ":";
|