@plumeria/core 2.2.1 → 2.2.3
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.d.ts +6 -6
- package/dist/index.js +74 -73
- package/dist/index.mjs +74 -73
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -4,12 +4,12 @@ declare const x: (className: string, varSet: XVariableSet) => ReturnX;
|
|
|
4
4
|
|
|
5
5
|
declare class StyleSheet {
|
|
6
6
|
private constructor();
|
|
7
|
-
static create<const T extends Record<string, CSSProperties>>(
|
|
8
|
-
static props(...
|
|
9
|
-
static keyframes(
|
|
10
|
-
static viewTransition(
|
|
11
|
-
static createTheme<const T extends CreateTheme>(
|
|
12
|
-
static createStatic<const T extends CreateValues>(
|
|
7
|
+
static create<const T extends Record<string, CSSProperties>>(rule: CreateStyleType<T>): ReturnType<T>;
|
|
8
|
+
static props(...rules: (false | Readonly<CSSProperties> | null | undefined)[]): string;
|
|
9
|
+
static keyframes(rule: CreateKeyframes): string;
|
|
10
|
+
static viewTransition(rule: ViewTransitionOptions): string;
|
|
11
|
+
static createTheme<const T extends CreateTheme>(rule: T): ReturnVariableType<T>;
|
|
12
|
+
static createStatic<const T extends CreateValues>(rule: T): T;
|
|
13
13
|
}
|
|
14
14
|
declare const css: typeof StyleSheet;
|
|
15
15
|
|
package/dist/index.js
CHANGED
|
@@ -2,43 +2,43 @@ const require_css = require('./css.js');
|
|
|
2
2
|
const zss_engine = require_css.__toESM(require("zss-engine"));
|
|
3
3
|
|
|
4
4
|
const styleAtomMap = new WeakMap();
|
|
5
|
-
function create(
|
|
5
|
+
function create(rule) {
|
|
6
6
|
const result = {};
|
|
7
|
-
Object.entries(
|
|
7
|
+
Object.entries(rule).forEach(([key, styleRule]) => {
|
|
8
8
|
const flat = {};
|
|
9
9
|
const nonFlat = {};
|
|
10
|
-
(0, zss_engine.splitAtomicAndNested)(
|
|
10
|
+
(0, zss_engine.splitAtomicAndNested)(styleRule, flat, nonFlat);
|
|
11
11
|
const finalFlat = (0, zss_engine.overrideLonghand)(flat);
|
|
12
12
|
const records = [];
|
|
13
13
|
Object.entries(finalFlat).forEach(([prop, value]) => {
|
|
14
14
|
if (prop.startsWith("@media") || prop.startsWith("@container")) Object.entries(value).forEach(([innerProp, innerValue]) => {
|
|
15
15
|
const atomicMap = new Map();
|
|
16
16
|
(0, zss_engine.processAtomicProps)({ [innerProp]: innerValue }, atomicMap, prop);
|
|
17
|
-
const
|
|
18
|
-
const
|
|
17
|
+
const querySheets = [];
|
|
18
|
+
const queryHashes = [];
|
|
19
19
|
for (const [hash, sheet] of atomicMap) {
|
|
20
|
-
|
|
21
|
-
|
|
20
|
+
querySheets.push(sheet.replace(`.${hash}`, `.${hash}:not(#\\#)`));
|
|
21
|
+
queryHashes.push(hash);
|
|
22
22
|
}
|
|
23
|
-
if (
|
|
23
|
+
if (querySheets.length > 0) records.push({
|
|
24
24
|
key: prop + innerProp,
|
|
25
|
-
hash:
|
|
26
|
-
sheet:
|
|
25
|
+
hash: queryHashes.join(" "),
|
|
26
|
+
sheet: querySheets.join("")
|
|
27
27
|
});
|
|
28
28
|
});
|
|
29
29
|
else {
|
|
30
30
|
const atomicMap = new Map();
|
|
31
31
|
(0, zss_engine.processAtomicProps)({ [prop]: value }, atomicMap);
|
|
32
|
-
const
|
|
33
|
-
const
|
|
32
|
+
const sheets = [];
|
|
33
|
+
const hashes = [];
|
|
34
34
|
for (const [hash, sheet] of atomicMap) {
|
|
35
|
-
|
|
36
|
-
|
|
35
|
+
sheets.push(sheet);
|
|
36
|
+
hashes.push(hash);
|
|
37
37
|
}
|
|
38
|
-
if (
|
|
38
|
+
if (sheets.length > 0) records.push({
|
|
39
39
|
key: prop,
|
|
40
|
-
hash:
|
|
41
|
-
sheet:
|
|
40
|
+
hash: hashes.join(" "),
|
|
41
|
+
sheet: sheets.join("")
|
|
42
42
|
});
|
|
43
43
|
}
|
|
44
44
|
});
|
|
@@ -67,22 +67,22 @@ function create(object) {
|
|
|
67
67
|
});
|
|
68
68
|
});
|
|
69
69
|
}
|
|
70
|
-
styleAtomMap.set(
|
|
71
|
-
Object.defineProperty(result, key, { get: () => Object.freeze(
|
|
70
|
+
styleAtomMap.set(styleRule, records);
|
|
71
|
+
Object.defineProperty(result, key, { get: () => Object.freeze(styleRule) });
|
|
72
72
|
});
|
|
73
73
|
return Object.freeze(result);
|
|
74
74
|
}
|
|
75
75
|
|
|
76
|
-
const
|
|
77
|
-
function props(...
|
|
76
|
+
const setSheets = new Set();
|
|
77
|
+
function props(...rules) {
|
|
78
78
|
const seenSheets = new Set();
|
|
79
|
-
const
|
|
79
|
+
const baseSheets = [];
|
|
80
80
|
const classList = [];
|
|
81
81
|
const chosen = new Map();
|
|
82
82
|
const rightmostKeys = [];
|
|
83
83
|
const orderedKeys = [];
|
|
84
|
-
for (let i =
|
|
85
|
-
const obj =
|
|
84
|
+
for (let i = rules.length - 1; i >= 0; i--) {
|
|
85
|
+
const obj = rules[i];
|
|
86
86
|
if (!obj) continue;
|
|
87
87
|
const records = styleAtomMap.get(obj);
|
|
88
88
|
if (!records) continue;
|
|
@@ -92,13 +92,13 @@ function props(...objects) {
|
|
|
92
92
|
propsIdx: i
|
|
93
93
|
});
|
|
94
94
|
}
|
|
95
|
-
for (let i = 0; i <
|
|
96
|
-
const obj =
|
|
95
|
+
for (let i = 0; i < rules.length; i++) {
|
|
96
|
+
const obj = rules[i];
|
|
97
97
|
if (!obj) continue;
|
|
98
98
|
const records = styleAtomMap.get(obj);
|
|
99
99
|
if (!records) continue;
|
|
100
100
|
for (const { key } of records) if (chosen.has(key) && chosen.get(key).propsIdx === i) {
|
|
101
|
-
if (i ===
|
|
101
|
+
if (i === rules.length - 1) rightmostKeys.push({
|
|
102
102
|
...chosen.get(key),
|
|
103
103
|
key
|
|
104
104
|
});
|
|
@@ -112,69 +112,70 @@ function props(...objects) {
|
|
|
112
112
|
for (const { hash, sheet } of orderedKeys) if (!seenSheets.has(sheet)) {
|
|
113
113
|
seenSheets.add(sheet);
|
|
114
114
|
classList.push(hash);
|
|
115
|
-
|
|
115
|
+
baseSheets.push(sheet);
|
|
116
116
|
}
|
|
117
117
|
for (const { hash, sheet } of rightmostKeys) if (!seenSheets.has(sheet)) {
|
|
118
118
|
seenSheets.add(sheet);
|
|
119
119
|
classList.push(hash);
|
|
120
|
-
|
|
120
|
+
baseSheets.push(sheet);
|
|
121
121
|
}
|
|
122
|
-
const
|
|
123
|
-
|
|
122
|
+
const uniqueSheets = [...baseSheets].filter((sheet) => !setSheets.has(sheet));
|
|
123
|
+
uniqueSheets.forEach((sheet) => setSheets.add(sheet));
|
|
124
124
|
if (typeof require_css.pQueue.promise === "undefined") require_css.pQueue.init();
|
|
125
|
-
require_css.pQueue.resolve(
|
|
125
|
+
require_css.pQueue.resolve(uniqueSheets.join(""));
|
|
126
126
|
return classList.join(" ");
|
|
127
127
|
}
|
|
128
128
|
|
|
129
|
-
function global(
|
|
130
|
-
const { styleSheet } = (0, zss_engine.transpile)(
|
|
129
|
+
function global(rule) {
|
|
130
|
+
const { styleSheet } = (0, zss_engine.transpile)(rule, void 0, "--global");
|
|
131
131
|
if (typeof require_css.gQueue.promise === "undefined") require_css.gQueue.init();
|
|
132
132
|
require_css.gQueue.resolve(styleSheet);
|
|
133
133
|
}
|
|
134
134
|
|
|
135
|
-
const keyframes = (
|
|
136
|
-
const hash = (0, zss_engine.genBase36Hash)(
|
|
135
|
+
const keyframes = (rule) => {
|
|
136
|
+
const hash = (0, zss_engine.genBase36Hash)(rule, 1, 8);
|
|
137
137
|
const ident = `kf-${hash}`;
|
|
138
|
-
global({ [`@keyframes ${ident}`]:
|
|
138
|
+
global({ [`@keyframes ${ident}`]: rule });
|
|
139
139
|
return ident;
|
|
140
140
|
};
|
|
141
141
|
|
|
142
|
-
const viewTransition = (
|
|
143
|
-
const hash = (0, zss_engine.genBase36Hash)(
|
|
142
|
+
const viewTransition = (rule) => {
|
|
143
|
+
const hash = (0, zss_engine.genBase36Hash)(rule, 1, 8);
|
|
144
144
|
const ident = `vt-${hash}`;
|
|
145
145
|
global({
|
|
146
|
-
[`::view-transition-group(${ident})`]:
|
|
147
|
-
[`::view-transition-image-pair(${ident})`]:
|
|
148
|
-
[`::view-transition-old(${ident})`]:
|
|
149
|
-
[`::view-transition-new(${ident})`]:
|
|
146
|
+
[`::view-transition-group(${ident})`]: rule.group,
|
|
147
|
+
[`::view-transition-image-pair(${ident})`]: rule.imagePair,
|
|
148
|
+
[`::view-transition-old(${ident})`]: rule.old,
|
|
149
|
+
[`::view-transition-new(${ident})`]: rule.new
|
|
150
150
|
});
|
|
151
151
|
return ident;
|
|
152
152
|
};
|
|
153
153
|
|
|
154
|
-
const createTheme = (
|
|
154
|
+
const createTheme = (rule) => {
|
|
155
155
|
const styles = {};
|
|
156
156
|
const result = {};
|
|
157
|
-
|
|
158
|
-
const
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
157
|
+
for (const key in rule) {
|
|
158
|
+
const varName = `${(0, zss_engine.camelToKebabCase)(key)}`;
|
|
159
|
+
const varKey = `--${varName}`;
|
|
160
|
+
result[key] = `var(--${varName})`;
|
|
161
|
+
const themeMap = rule[key];
|
|
162
|
+
for (const themeKey in themeMap) {
|
|
163
|
+
const value = themeMap[themeKey];
|
|
164
|
+
const isQuery = themeKey.startsWith("@media") || themeKey.startsWith("@container");
|
|
165
|
+
const selector = isQuery || themeKey === "default" ? ":root" : `:root[data-theme="${themeKey}"]`;
|
|
166
|
+
const target = styles[selector] ||= {};
|
|
167
|
+
if (isQuery) {
|
|
168
|
+
const queryObj = target[themeKey] ||= {};
|
|
169
|
+
queryObj[varKey] = value;
|
|
170
|
+
} else target[varKey] = value;
|
|
171
|
+
}
|
|
172
|
+
}
|
|
172
173
|
global(styles);
|
|
173
174
|
return result;
|
|
174
175
|
};
|
|
175
176
|
|
|
176
|
-
const createStatic = (
|
|
177
|
-
return
|
|
177
|
+
const createStatic = (rule) => {
|
|
178
|
+
return rule;
|
|
178
179
|
};
|
|
179
180
|
|
|
180
181
|
const x = (className, varSet) => ({
|
|
@@ -184,23 +185,23 @@ const x = (className, varSet) => ({
|
|
|
184
185
|
|
|
185
186
|
var StyleSheet = class {
|
|
186
187
|
constructor() {}
|
|
187
|
-
static create(
|
|
188
|
-
return create(
|
|
188
|
+
static create(rule) {
|
|
189
|
+
return create(rule);
|
|
189
190
|
}
|
|
190
|
-
static props(...
|
|
191
|
-
return props(...
|
|
191
|
+
static props(...rules) {
|
|
192
|
+
return props(...rules);
|
|
192
193
|
}
|
|
193
|
-
static keyframes(
|
|
194
|
-
return keyframes(
|
|
194
|
+
static keyframes(rule) {
|
|
195
|
+
return keyframes(rule);
|
|
195
196
|
}
|
|
196
|
-
static viewTransition(
|
|
197
|
-
return viewTransition(
|
|
197
|
+
static viewTransition(rule) {
|
|
198
|
+
return viewTransition(rule);
|
|
198
199
|
}
|
|
199
|
-
static createTheme(
|
|
200
|
-
return createTheme(
|
|
200
|
+
static createTheme(rule) {
|
|
201
|
+
return createTheme(rule);
|
|
201
202
|
}
|
|
202
|
-
static createStatic(
|
|
203
|
-
return createStatic(
|
|
203
|
+
static createStatic(rule) {
|
|
204
|
+
return createStatic(rule);
|
|
204
205
|
}
|
|
205
206
|
};
|
|
206
207
|
const css = StyleSheet;
|
package/dist/index.mjs
CHANGED
|
@@ -2,43 +2,43 @@ import { gQueue, pQueue } from "./css.mjs";
|
|
|
2
2
|
import { camelToKebabCase, genBase36Hash, overrideLonghand, processAtomicProps, splitAtomicAndNested, transpile } from "zss-engine";
|
|
3
3
|
|
|
4
4
|
const styleAtomMap = new WeakMap();
|
|
5
|
-
function create(
|
|
5
|
+
function create(rule) {
|
|
6
6
|
const result = {};
|
|
7
|
-
Object.entries(
|
|
7
|
+
Object.entries(rule).forEach(([key, styleRule]) => {
|
|
8
8
|
const flat = {};
|
|
9
9
|
const nonFlat = {};
|
|
10
|
-
splitAtomicAndNested(
|
|
10
|
+
splitAtomicAndNested(styleRule, flat, nonFlat);
|
|
11
11
|
const finalFlat = overrideLonghand(flat);
|
|
12
12
|
const records = [];
|
|
13
13
|
Object.entries(finalFlat).forEach(([prop, value]) => {
|
|
14
14
|
if (prop.startsWith("@media") || prop.startsWith("@container")) Object.entries(value).forEach(([innerProp, innerValue]) => {
|
|
15
15
|
const atomicMap = new Map();
|
|
16
16
|
processAtomicProps({ [innerProp]: innerValue }, atomicMap, prop);
|
|
17
|
-
const
|
|
18
|
-
const
|
|
17
|
+
const querySheets = [];
|
|
18
|
+
const queryHashes = [];
|
|
19
19
|
for (const [hash, sheet] of atomicMap) {
|
|
20
|
-
|
|
21
|
-
|
|
20
|
+
querySheets.push(sheet.replace(`.${hash}`, `.${hash}:not(#\\#)`));
|
|
21
|
+
queryHashes.push(hash);
|
|
22
22
|
}
|
|
23
|
-
if (
|
|
23
|
+
if (querySheets.length > 0) records.push({
|
|
24
24
|
key: prop + innerProp,
|
|
25
|
-
hash:
|
|
26
|
-
sheet:
|
|
25
|
+
hash: queryHashes.join(" "),
|
|
26
|
+
sheet: querySheets.join("")
|
|
27
27
|
});
|
|
28
28
|
});
|
|
29
29
|
else {
|
|
30
30
|
const atomicMap = new Map();
|
|
31
31
|
processAtomicProps({ [prop]: value }, atomicMap);
|
|
32
|
-
const
|
|
33
|
-
const
|
|
32
|
+
const sheets = [];
|
|
33
|
+
const hashes = [];
|
|
34
34
|
for (const [hash, sheet] of atomicMap) {
|
|
35
|
-
|
|
36
|
-
|
|
35
|
+
sheets.push(sheet);
|
|
36
|
+
hashes.push(hash);
|
|
37
37
|
}
|
|
38
|
-
if (
|
|
38
|
+
if (sheets.length > 0) records.push({
|
|
39
39
|
key: prop,
|
|
40
|
-
hash:
|
|
41
|
-
sheet:
|
|
40
|
+
hash: hashes.join(" "),
|
|
41
|
+
sheet: sheets.join("")
|
|
42
42
|
});
|
|
43
43
|
}
|
|
44
44
|
});
|
|
@@ -67,22 +67,22 @@ function create(object) {
|
|
|
67
67
|
});
|
|
68
68
|
});
|
|
69
69
|
}
|
|
70
|
-
styleAtomMap.set(
|
|
71
|
-
Object.defineProperty(result, key, { get: () => Object.freeze(
|
|
70
|
+
styleAtomMap.set(styleRule, records);
|
|
71
|
+
Object.defineProperty(result, key, { get: () => Object.freeze(styleRule) });
|
|
72
72
|
});
|
|
73
73
|
return Object.freeze(result);
|
|
74
74
|
}
|
|
75
75
|
|
|
76
|
-
const
|
|
77
|
-
function props(...
|
|
76
|
+
const setSheets = new Set();
|
|
77
|
+
function props(...rules) {
|
|
78
78
|
const seenSheets = new Set();
|
|
79
|
-
const
|
|
79
|
+
const baseSheets = [];
|
|
80
80
|
const classList = [];
|
|
81
81
|
const chosen = new Map();
|
|
82
82
|
const rightmostKeys = [];
|
|
83
83
|
const orderedKeys = [];
|
|
84
|
-
for (let i =
|
|
85
|
-
const obj =
|
|
84
|
+
for (let i = rules.length - 1; i >= 0; i--) {
|
|
85
|
+
const obj = rules[i];
|
|
86
86
|
if (!obj) continue;
|
|
87
87
|
const records = styleAtomMap.get(obj);
|
|
88
88
|
if (!records) continue;
|
|
@@ -92,13 +92,13 @@ function props(...objects) {
|
|
|
92
92
|
propsIdx: i
|
|
93
93
|
});
|
|
94
94
|
}
|
|
95
|
-
for (let i = 0; i <
|
|
96
|
-
const obj =
|
|
95
|
+
for (let i = 0; i < rules.length; i++) {
|
|
96
|
+
const obj = rules[i];
|
|
97
97
|
if (!obj) continue;
|
|
98
98
|
const records = styleAtomMap.get(obj);
|
|
99
99
|
if (!records) continue;
|
|
100
100
|
for (const { key } of records) if (chosen.has(key) && chosen.get(key).propsIdx === i) {
|
|
101
|
-
if (i ===
|
|
101
|
+
if (i === rules.length - 1) rightmostKeys.push({
|
|
102
102
|
...chosen.get(key),
|
|
103
103
|
key
|
|
104
104
|
});
|
|
@@ -112,69 +112,70 @@ function props(...objects) {
|
|
|
112
112
|
for (const { hash, sheet } of orderedKeys) if (!seenSheets.has(sheet)) {
|
|
113
113
|
seenSheets.add(sheet);
|
|
114
114
|
classList.push(hash);
|
|
115
|
-
|
|
115
|
+
baseSheets.push(sheet);
|
|
116
116
|
}
|
|
117
117
|
for (const { hash, sheet } of rightmostKeys) if (!seenSheets.has(sheet)) {
|
|
118
118
|
seenSheets.add(sheet);
|
|
119
119
|
classList.push(hash);
|
|
120
|
-
|
|
120
|
+
baseSheets.push(sheet);
|
|
121
121
|
}
|
|
122
|
-
const
|
|
123
|
-
|
|
122
|
+
const uniqueSheets = [...baseSheets].filter((sheet) => !setSheets.has(sheet));
|
|
123
|
+
uniqueSheets.forEach((sheet) => setSheets.add(sheet));
|
|
124
124
|
if (typeof pQueue.promise === "undefined") pQueue.init();
|
|
125
|
-
pQueue.resolve(
|
|
125
|
+
pQueue.resolve(uniqueSheets.join(""));
|
|
126
126
|
return classList.join(" ");
|
|
127
127
|
}
|
|
128
128
|
|
|
129
|
-
function global(
|
|
130
|
-
const { styleSheet } = transpile(
|
|
129
|
+
function global(rule) {
|
|
130
|
+
const { styleSheet } = transpile(rule, void 0, "--global");
|
|
131
131
|
if (typeof gQueue.promise === "undefined") gQueue.init();
|
|
132
132
|
gQueue.resolve(styleSheet);
|
|
133
133
|
}
|
|
134
134
|
|
|
135
|
-
const keyframes = (
|
|
136
|
-
const hash = genBase36Hash(
|
|
135
|
+
const keyframes = (rule) => {
|
|
136
|
+
const hash = genBase36Hash(rule, 1, 8);
|
|
137
137
|
const ident = `kf-${hash}`;
|
|
138
|
-
global({ [`@keyframes ${ident}`]:
|
|
138
|
+
global({ [`@keyframes ${ident}`]: rule });
|
|
139
139
|
return ident;
|
|
140
140
|
};
|
|
141
141
|
|
|
142
|
-
const viewTransition = (
|
|
143
|
-
const hash = genBase36Hash(
|
|
142
|
+
const viewTransition = (rule) => {
|
|
143
|
+
const hash = genBase36Hash(rule, 1, 8);
|
|
144
144
|
const ident = `vt-${hash}`;
|
|
145
145
|
global({
|
|
146
|
-
[`::view-transition-group(${ident})`]:
|
|
147
|
-
[`::view-transition-image-pair(${ident})`]:
|
|
148
|
-
[`::view-transition-old(${ident})`]:
|
|
149
|
-
[`::view-transition-new(${ident})`]:
|
|
146
|
+
[`::view-transition-group(${ident})`]: rule.group,
|
|
147
|
+
[`::view-transition-image-pair(${ident})`]: rule.imagePair,
|
|
148
|
+
[`::view-transition-old(${ident})`]: rule.old,
|
|
149
|
+
[`::view-transition-new(${ident})`]: rule.new
|
|
150
150
|
});
|
|
151
151
|
return ident;
|
|
152
152
|
};
|
|
153
153
|
|
|
154
|
-
const createTheme = (
|
|
154
|
+
const createTheme = (rule) => {
|
|
155
155
|
const styles = {};
|
|
156
156
|
const result = {};
|
|
157
|
-
|
|
158
|
-
const
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
157
|
+
for (const key in rule) {
|
|
158
|
+
const varName = `${camelToKebabCase(key)}`;
|
|
159
|
+
const varKey = `--${varName}`;
|
|
160
|
+
result[key] = `var(--${varName})`;
|
|
161
|
+
const themeMap = rule[key];
|
|
162
|
+
for (const themeKey in themeMap) {
|
|
163
|
+
const value = themeMap[themeKey];
|
|
164
|
+
const isQuery = themeKey.startsWith("@media") || themeKey.startsWith("@container");
|
|
165
|
+
const selector = isQuery || themeKey === "default" ? ":root" : `:root[data-theme="${themeKey}"]`;
|
|
166
|
+
const target = styles[selector] ||= {};
|
|
167
|
+
if (isQuery) {
|
|
168
|
+
const queryObj = target[themeKey] ||= {};
|
|
169
|
+
queryObj[varKey] = value;
|
|
170
|
+
} else target[varKey] = value;
|
|
171
|
+
}
|
|
172
|
+
}
|
|
172
173
|
global(styles);
|
|
173
174
|
return result;
|
|
174
175
|
};
|
|
175
176
|
|
|
176
|
-
const createStatic = (
|
|
177
|
-
return
|
|
177
|
+
const createStatic = (rule) => {
|
|
178
|
+
return rule;
|
|
178
179
|
};
|
|
179
180
|
|
|
180
181
|
const x = (className, varSet) => ({
|
|
@@ -184,23 +185,23 @@ const x = (className, varSet) => ({
|
|
|
184
185
|
|
|
185
186
|
var StyleSheet = class {
|
|
186
187
|
constructor() {}
|
|
187
|
-
static create(
|
|
188
|
-
return create(
|
|
188
|
+
static create(rule) {
|
|
189
|
+
return create(rule);
|
|
189
190
|
}
|
|
190
|
-
static props(...
|
|
191
|
-
return props(...
|
|
191
|
+
static props(...rules) {
|
|
192
|
+
return props(...rules);
|
|
192
193
|
}
|
|
193
|
-
static keyframes(
|
|
194
|
-
return keyframes(
|
|
194
|
+
static keyframes(rule) {
|
|
195
|
+
return keyframes(rule);
|
|
195
196
|
}
|
|
196
|
-
static viewTransition(
|
|
197
|
-
return viewTransition(
|
|
197
|
+
static viewTransition(rule) {
|
|
198
|
+
return viewTransition(rule);
|
|
198
199
|
}
|
|
199
|
-
static createTheme(
|
|
200
|
-
return createTheme(
|
|
200
|
+
static createTheme(rule) {
|
|
201
|
+
return createTheme(rule);
|
|
201
202
|
}
|
|
202
|
-
static createStatic(
|
|
203
|
-
return createStatic(
|
|
203
|
+
static createStatic(rule) {
|
|
204
|
+
return createStatic(rule);
|
|
204
205
|
}
|
|
205
206
|
};
|
|
206
207
|
const css = StyleSheet;
|