@plumeria/core 0.11.3 → 0.11.4
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/index.js +12 -20
- package/dist/index.mjs +12 -20
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -21,7 +21,6 @@ function create(object) {
|
|
|
21
21
|
});
|
|
22
22
|
return Object.freeze(object);
|
|
23
23
|
}
|
|
24
|
-
var create_default = create;
|
|
25
24
|
|
|
26
25
|
function global(object) {
|
|
27
26
|
const base36Hash = (0, zss_engine.genBase36Hash)(object, 8);
|
|
@@ -30,7 +29,6 @@ function global(object) {
|
|
|
30
29
|
require_css.resolvePromise_2(styleSheet);
|
|
31
30
|
if (zss_engine.isTestingDevelopment) zss_engine.isServer ? (0, zss_engine.injectServerCSS)(base36Hash, styleSheet) : (0, zss_engine.injectClientGlobalCSS)(styleSheet);
|
|
32
31
|
}
|
|
33
|
-
var global_default = global;
|
|
34
32
|
|
|
35
33
|
const props = (...objects) => {
|
|
36
34
|
const classNames = objects.filter(Boolean).map((obj) => {
|
|
@@ -42,22 +40,20 @@ const props = (...objects) => {
|
|
|
42
40
|
});
|
|
43
41
|
return [...new Set(classNames)].join(" ");
|
|
44
42
|
};
|
|
45
|
-
var props_default = props;
|
|
46
43
|
|
|
47
44
|
const px = (...pseudos) => {
|
|
48
45
|
return pseudos.filter(Boolean).join("");
|
|
49
46
|
};
|
|
50
47
|
const rx = (cssProperties, varSet) => ({
|
|
51
|
-
className:
|
|
48
|
+
className: props(cssProperties),
|
|
52
49
|
style: Object.fromEntries(Object.entries(varSet).map(([key, value]) => [key, value]))
|
|
53
50
|
});
|
|
54
51
|
|
|
55
52
|
const keyframes = (object) => {
|
|
56
53
|
const prefix = (0, zss_engine.genBase36Hash)(object, 8);
|
|
57
|
-
|
|
54
|
+
global({ [`@keyframes ${prefix}`]: object });
|
|
58
55
|
return prefix;
|
|
59
56
|
};
|
|
60
|
-
var keyframes_default = keyframes;
|
|
61
57
|
|
|
62
58
|
const defineVars = (object) => {
|
|
63
59
|
const styles = { ":root": {} };
|
|
@@ -67,10 +63,9 @@ const defineVars = (object) => {
|
|
|
67
63
|
result[key] = `var(--${kebabKey})`;
|
|
68
64
|
styles[":root"][`--${key}`] = value;
|
|
69
65
|
});
|
|
70
|
-
|
|
66
|
+
global(styles);
|
|
71
67
|
return result;
|
|
72
68
|
};
|
|
73
|
-
var vars_default = defineVars;
|
|
74
69
|
|
|
75
70
|
const defineTheme = (object) => {
|
|
76
71
|
const styles = {};
|
|
@@ -90,38 +85,36 @@ const defineTheme = (object) => {
|
|
|
90
85
|
}
|
|
91
86
|
});
|
|
92
87
|
});
|
|
93
|
-
|
|
88
|
+
global(styles);
|
|
94
89
|
return result;
|
|
95
90
|
};
|
|
96
|
-
var theme_default = defineTheme;
|
|
97
91
|
|
|
98
92
|
const defineConsts = (constants) => {
|
|
99
93
|
return constants;
|
|
100
94
|
};
|
|
101
|
-
var consts_default = defineConsts;
|
|
102
95
|
|
|
103
96
|
var css = class {
|
|
104
97
|
constructor() {}
|
|
105
98
|
static create(object) {
|
|
106
|
-
return
|
|
99
|
+
return create(object);
|
|
107
100
|
}
|
|
108
101
|
static global(object) {
|
|
109
|
-
return
|
|
102
|
+
return global(object);
|
|
110
103
|
}
|
|
111
104
|
static keyframes(object) {
|
|
112
|
-
return
|
|
105
|
+
return keyframes(object);
|
|
113
106
|
}
|
|
114
107
|
static defineConsts(object) {
|
|
115
|
-
return
|
|
108
|
+
return defineConsts(object);
|
|
116
109
|
}
|
|
117
110
|
static defineVars(object) {
|
|
118
|
-
return
|
|
111
|
+
return defineVars(object);
|
|
119
112
|
}
|
|
120
113
|
static defineTheme(object) {
|
|
121
|
-
return
|
|
114
|
+
return defineTheme(object);
|
|
122
115
|
}
|
|
123
116
|
static props(...objects) {
|
|
124
|
-
return
|
|
117
|
+
return props(...objects);
|
|
125
118
|
}
|
|
126
119
|
static rx(cssProperties, varSet) {
|
|
127
120
|
return rx(cssProperties, varSet);
|
|
@@ -133,9 +126,8 @@ var css = class {
|
|
|
133
126
|
static container = zss_utils.container;
|
|
134
127
|
static color = zss_utils.color;
|
|
135
128
|
};
|
|
136
|
-
var css_default = css;
|
|
137
129
|
|
|
138
|
-
exports.css =
|
|
130
|
+
exports.css = css;
|
|
139
131
|
exports.ps = zss_utils.ps;
|
|
140
132
|
exports.px = px;
|
|
141
133
|
exports.rx = rx;
|
package/dist/index.mjs
CHANGED
|
@@ -20,7 +20,6 @@ function create(object) {
|
|
|
20
20
|
});
|
|
21
21
|
return Object.freeze(object);
|
|
22
22
|
}
|
|
23
|
-
var create_default = create;
|
|
24
23
|
|
|
25
24
|
function global(object) {
|
|
26
25
|
const base36Hash = genBase36Hash(object, 8);
|
|
@@ -29,7 +28,6 @@ function global(object) {
|
|
|
29
28
|
resolvePromise_2(styleSheet);
|
|
30
29
|
if (isTestingDevelopment) isServer ? injectServerCSS(base36Hash, styleSheet) : injectClientGlobalCSS(styleSheet);
|
|
31
30
|
}
|
|
32
|
-
var global_default = global;
|
|
33
31
|
|
|
34
32
|
const props = (...objects) => {
|
|
35
33
|
const classNames = objects.filter(Boolean).map((obj) => {
|
|
@@ -41,22 +39,20 @@ const props = (...objects) => {
|
|
|
41
39
|
});
|
|
42
40
|
return [...new Set(classNames)].join(" ");
|
|
43
41
|
};
|
|
44
|
-
var props_default = props;
|
|
45
42
|
|
|
46
43
|
const px = (...pseudos) => {
|
|
47
44
|
return pseudos.filter(Boolean).join("");
|
|
48
45
|
};
|
|
49
46
|
const rx = (cssProperties, varSet) => ({
|
|
50
|
-
className:
|
|
47
|
+
className: props(cssProperties),
|
|
51
48
|
style: Object.fromEntries(Object.entries(varSet).map(([key, value]) => [key, value]))
|
|
52
49
|
});
|
|
53
50
|
|
|
54
51
|
const keyframes = (object) => {
|
|
55
52
|
const prefix = genBase36Hash(object, 8);
|
|
56
|
-
|
|
53
|
+
global({ [`@keyframes ${prefix}`]: object });
|
|
57
54
|
return prefix;
|
|
58
55
|
};
|
|
59
|
-
var keyframes_default = keyframes;
|
|
60
56
|
|
|
61
57
|
const defineVars = (object) => {
|
|
62
58
|
const styles = { ":root": {} };
|
|
@@ -66,10 +62,9 @@ const defineVars = (object) => {
|
|
|
66
62
|
result[key] = `var(--${kebabKey})`;
|
|
67
63
|
styles[":root"][`--${key}`] = value;
|
|
68
64
|
});
|
|
69
|
-
|
|
65
|
+
global(styles);
|
|
70
66
|
return result;
|
|
71
67
|
};
|
|
72
|
-
var vars_default = defineVars;
|
|
73
68
|
|
|
74
69
|
const defineTheme = (object) => {
|
|
75
70
|
const styles = {};
|
|
@@ -89,38 +84,36 @@ const defineTheme = (object) => {
|
|
|
89
84
|
}
|
|
90
85
|
});
|
|
91
86
|
});
|
|
92
|
-
|
|
87
|
+
global(styles);
|
|
93
88
|
return result;
|
|
94
89
|
};
|
|
95
|
-
var theme_default = defineTheme;
|
|
96
90
|
|
|
97
91
|
const defineConsts = (constants) => {
|
|
98
92
|
return constants;
|
|
99
93
|
};
|
|
100
|
-
var consts_default = defineConsts;
|
|
101
94
|
|
|
102
95
|
var css = class {
|
|
103
96
|
constructor() {}
|
|
104
97
|
static create(object) {
|
|
105
|
-
return
|
|
98
|
+
return create(object);
|
|
106
99
|
}
|
|
107
100
|
static global(object) {
|
|
108
|
-
return
|
|
101
|
+
return global(object);
|
|
109
102
|
}
|
|
110
103
|
static keyframes(object) {
|
|
111
|
-
return
|
|
104
|
+
return keyframes(object);
|
|
112
105
|
}
|
|
113
106
|
static defineConsts(object) {
|
|
114
|
-
return
|
|
107
|
+
return defineConsts(object);
|
|
115
108
|
}
|
|
116
109
|
static defineVars(object) {
|
|
117
|
-
return
|
|
110
|
+
return defineVars(object);
|
|
118
111
|
}
|
|
119
112
|
static defineTheme(object) {
|
|
120
|
-
return
|
|
113
|
+
return defineTheme(object);
|
|
121
114
|
}
|
|
122
115
|
static props(...objects) {
|
|
123
|
-
return
|
|
116
|
+
return props(...objects);
|
|
124
117
|
}
|
|
125
118
|
static rx(cssProperties, varSet) {
|
|
126
119
|
return rx(cssProperties, varSet);
|
|
@@ -132,6 +125,5 @@ var css = class {
|
|
|
132
125
|
static container = container;
|
|
133
126
|
static color = color;
|
|
134
127
|
};
|
|
135
|
-
var css_default = css;
|
|
136
128
|
|
|
137
|
-
export {
|
|
129
|
+
export { css, ps, px, rx };
|