boss-css 0.0.22 → 0.0.24
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/_virtual/{rolldown_runtime.cjs → _rolldown/runtime.cjs} +14 -24
- package/dist/_virtual/_rolldown/runtime.mjs +14 -0
- package/dist/ai/server.cjs +15 -16
- package/dist/ai/server.mjs +4 -6
- package/dist/ai/skills.cjs +2 -3
- package/dist/ai/skills.mjs +1 -2
- package/dist/api/browser.cjs +11 -12
- package/dist/api/browser.mjs +1 -3
- package/dist/api/config.cjs +6 -7
- package/dist/api/config.mjs +1 -3
- package/dist/api/css.cjs +1 -3
- package/dist/api/css.mjs +1 -2
- package/dist/api/dictionary.cjs +1 -3
- package/dist/api/dictionary.mjs +1 -2
- package/dist/api/file/dts.cjs +2 -4
- package/dist/api/file/dts.mjs +1 -3
- package/dist/api/file/file.cjs +4 -6
- package/dist/api/file/file.mjs +1 -3
- package/dist/api/file/js.cjs +6 -8
- package/dist/api/file/js.mjs +2 -4
- package/dist/api/file/text.cjs +2 -4
- package/dist/api/file/text.mjs +1 -3
- package/dist/api/names.cjs +1 -3
- package/dist/api/names.mjs +1 -3
- package/dist/api/noopCss.cjs +2 -3
- package/dist/api/noopCss.mjs +1 -2
- package/dist/api/propTree.cjs +1 -3
- package/dist/api/propTree.mjs +1 -2
- package/dist/api/server.cjs +15 -16
- package/dist/api/server.mjs +1 -3
- package/dist/cli/build.cjs +1 -1
- package/dist/cli/build.mjs +2 -3
- package/dist/cli/index.cjs +5 -7
- package/dist/cli/index.mjs +1 -3
- package/dist/cli/tasks/build.cjs +4 -7
- package/dist/cli/tasks/build.mjs +1 -4
- package/dist/cli/tasks/choose.cjs +3 -6
- package/dist/cli/tasks/choose.mjs +1 -4
- package/dist/cli/tasks/compile.cjs +3 -6
- package/dist/cli/tasks/compile.mjs +1 -4
- package/dist/cli/tasks/dev.cjs +8 -11
- package/dist/cli/tasks/dev.mjs +2 -5
- package/dist/cli/tasks/init.cjs +39 -42
- package/dist/cli/tasks/init.mjs +12 -15
- package/dist/cli/tasks/watch.cjs +3 -6
- package/dist/cli/tasks/watch.mjs +1 -4
- package/dist/cli/templates/init.cjs +1 -3
- package/dist/cli/templates/init.mjs +1 -2
- package/dist/cli/types.cjs +2 -4
- package/dist/cli/types.mjs +2 -4
- package/dist/cli/utils.cjs +2 -4
- package/dist/cli/utils.mjs +1 -3
- package/dist/compile/classname-strategy.cjs +3 -5
- package/dist/compile/classname-strategy.mjs +1 -3
- package/dist/compile/classname.cjs +6 -8
- package/dist/compile/classname.mjs +5 -7
- package/dist/compile/index.cjs +18 -20
- package/dist/compile/index.mjs +6 -8
- package/dist/compile/jsx.cjs +8 -10
- package/dist/compile/jsx.mjs +6 -8
- package/dist/compile/prepared.cjs +3 -5
- package/dist/compile/prepared.mjs +1 -3
- package/dist/compile/runtime.cjs +4 -5
- package/dist/compile/runtime.mjs +1 -3
- package/dist/compile/transform.cjs +7 -9
- package/dist/compile/transform.mjs +3 -5
- package/dist/cx/index.cjs +6 -7
- package/dist/cx/index.mjs +3 -5
- package/dist/detect-fw/index.cjs +6 -7
- package/dist/detect-fw/index.mjs +1 -3
- package/dist/dev/client.cjs +2 -3
- package/dist/dev/client.mjs +1 -2
- package/dist/dev/plugin/browser.cjs +2 -3
- package/dist/dev/plugin/browser.mjs +1 -2
- package/dist/dev/plugin/server.cjs +13 -14
- package/dist/dev/plugin/server.mjs +3 -5
- package/dist/dev/port.cjs +3 -5
- package/dist/dev/port.mjs +1 -3
- package/dist/dev/runtime.cjs +3 -5
- package/dist/dev/runtime.mjs +1 -3
- package/dist/dev/server.cjs +12 -13
- package/dist/dev/server.mjs +15 -17
- package/dist/dev/shared.cjs +1 -3
- package/dist/dev/shared.mjs +1 -2
- package/dist/devtools-app/index.mjs +2 -2
- package/dist/eslint-plugin/index.cjs +10 -13
- package/dist/eslint-plugin/index.mjs +1 -4
- package/dist/eslint-plugin/rules/classnames-only.cjs +4 -6
- package/dist/eslint-plugin/rules/classnames-only.mjs +1 -3
- package/dist/eslint-plugin/rules/format-classnames.cjs +8 -10
- package/dist/eslint-plugin/rules/format-classnames.mjs +1 -3
- package/dist/eslint-plugin/rules/no-unknown-classes.cjs +5 -7
- package/dist/eslint-plugin/rules/no-unknown-classes.mjs +1 -3
- package/dist/eslint-plugin/rules/prefer-classnames.cjs +5 -7
- package/dist/eslint-plugin/rules/prefer-classnames.mjs +1 -3
- package/dist/eslint-plugin/rules/prefer-token-values.cjs +6 -8
- package/dist/eslint-plugin/rules/prefer-token-values.mjs +1 -3
- package/dist/eslint-plugin/rules/prefer-unitless-values.cjs +7 -9
- package/dist/eslint-plugin/rules/prefer-unitless-values.mjs +1 -3
- package/dist/eslint-plugin/rules/props-only.cjs +5 -7
- package/dist/eslint-plugin/rules/props-only.mjs +1 -3
- package/dist/eslint-plugin/rules/redundant-cx.cjs +3 -5
- package/dist/eslint-plugin/rules/redundant-cx.mjs +1 -3
- package/dist/eslint-plugin/rules/require-prop-functions.cjs +6 -8
- package/dist/eslint-plugin/rules/require-prop-functions.mjs +1 -3
- package/dist/eslint-plugin/utils/api.cjs +3 -5
- package/dist/eslint-plugin/utils/api.mjs +1 -3
- package/dist/eslint-plugin/utils/ast.cjs +1 -3
- package/dist/eslint-plugin/utils/ast.mjs +1 -2
- package/dist/eslint-plugin/utils/boss-classes.cjs +5 -7
- package/dist/eslint-plugin/utils/boss-classes.mjs +1 -3
- package/dist/eslint-plugin/utils/context.cjs +1 -3
- package/dist/eslint-plugin/utils/context.mjs +1 -2
- package/dist/eslint-plugin/utils/defaults.cjs +1 -3
- package/dist/eslint-plugin/utils/defaults.mjs +1 -2
- package/dist/eslint-plugin/utils/format.cjs +1 -3
- package/dist/eslint-plugin/utils/format.mjs +1 -2
- package/dist/eslint-plugin/utils/order.cjs +3 -5
- package/dist/eslint-plugin/utils/order.mjs +1 -3
- package/dist/eslint-plugin/utils/property-order.cjs +1 -3
- package/dist/eslint-plugin/utils/property-order.mjs +1 -2
- package/dist/eslint-plugin/utils/static.cjs +1 -3
- package/dist/eslint-plugin/utils/static.mjs +1 -2
- package/dist/fontsource/directory.cjs +1 -3
- package/dist/fontsource/directory.mjs +1 -2
- package/dist/fontsource/server.cjs +12 -13
- package/dist/fontsource/server.mjs +2 -4
- package/dist/index.cjs +6 -6
- package/dist/index.mjs +1 -2
- package/dist/log/browser.cjs +2 -4
- package/dist/log/browser.mjs +1 -3
- package/dist/log/server.cjs +6 -8
- package/dist/log/server.mjs +1 -3
- package/dist/merge/index.cjs +21 -284
- package/dist/merge/index.mjs +18 -282
- package/dist/native/browser.cjs +3 -4
- package/dist/native/browser.mjs +1 -3
- package/dist/native/server.cjs +7 -8
- package/dist/native/server.mjs +1 -3
- package/dist/native/styleTypes.cjs +5 -7
- package/dist/native/styleTypes.mjs +1 -3
- package/dist/parser/classname/server.cjs +17 -19
- package/dist/parser/classname/server.mjs +11 -13
- package/dist/parser/jsx/browser.cjs +7 -8
- package/dist/parser/jsx/browser.mjs +1 -3
- package/dist/parser/jsx/extractCode.cjs +2 -4
- package/dist/parser/jsx/extractCode.mjs +2 -3
- package/dist/parser/jsx/extractPrepared.cjs +3 -5
- package/dist/parser/jsx/extractPrepared.mjs +1 -3
- package/dist/parser/jsx/extractProps.cjs +3 -5
- package/dist/parser/jsx/extractProps.mjs +1 -3
- package/dist/parser/jsx/isDOMProp.cjs +3 -5
- package/dist/parser/jsx/isDOMProp.mjs +1 -3
- package/dist/parser/jsx/native.cjs +6 -7
- package/dist/parser/jsx/native.d.cts +2 -2
- package/dist/parser/jsx/native.d.mts +2 -2
- package/dist/parser/jsx/native.mjs +1 -3
- package/dist/parser/jsx/runtime.cjs +3 -3
- package/dist/parser/jsx/runtime.mjs +1 -2
- package/dist/parser/jsx/server.cjs +16 -17
- package/dist/parser/jsx/server.mjs +3 -5
- package/dist/postcss/index.cjs +2 -5
- package/dist/postcss/index.mjs +1 -4
- package/dist/prop/at/runtime-only.cjs +8 -9
- package/dist/prop/at/runtime-only.mjs +6 -8
- package/dist/prop/at/server.cjs +27 -28
- package/dist/prop/at/server.mjs +17 -19
- package/dist/prop/at/shared.cjs +1 -3
- package/dist/prop/at/shared.mjs +1 -2
- package/dist/prop/bosswind/browser.cjs +4 -5
- package/dist/prop/bosswind/browser.mjs +1 -3
- package/dist/prop/bosswind/runtime-only.cjs +4 -5
- package/dist/prop/bosswind/runtime-only.mjs +1 -3
- package/dist/prop/bosswind/selectors.cjs +1 -3
- package/dist/prop/bosswind/selectors.mjs +1 -2
- package/dist/prop/bosswind/server.cjs +12 -12
- package/dist/prop/bosswind/server.mjs +6 -7
- package/dist/prop/bosswind/shared.cjs +59 -9
- package/dist/prop/bosswind/shared.mjs +57 -8
- package/dist/prop/bosswind/tailwind-theme.cjs +2 -38
- package/dist/prop/bosswind/tailwind-theme.mjs +2 -37
- package/dist/prop/child/runtime-only.cjs +2 -3
- package/dist/prop/child/runtime-only.mjs +1 -2
- package/dist/prop/child/server.cjs +10 -11
- package/dist/prop/child/server.mjs +2 -4
- package/dist/prop/css/getDtsTemplate.cjs +7 -6
- package/dist/prop/css/getDtsTemplate.mjs +5 -4
- package/dist/prop/css/runtime-only.cjs +4 -5
- package/dist/prop/css/runtime-only.mjs +1 -3
- package/dist/prop/css/server.cjs +12 -13
- package/dist/prop/css/server.mjs +4 -6
- package/dist/prop/pseudo/runtime-only.cjs +3 -5
- package/dist/prop/pseudo/runtime-only.mjs +1 -3
- package/dist/prop/pseudo/server.cjs +19 -20
- package/dist/prop/pseudo/server.mjs +11 -13
- package/dist/prop/pseudo/shared.cjs +1 -3
- package/dist/prop/pseudo/shared.mjs +1 -2
- package/dist/reset/server.cjs +10 -11
- package/dist/reset/server.mjs +2 -4
- package/dist/runtime/index.cjs +5 -6
- package/dist/runtime/index.mjs +1 -3
- package/dist/runtime/preact.cjs +3 -3
- package/dist/runtime/preact.mjs +1 -2
- package/dist/runtime/qwik.cjs +3 -4
- package/dist/runtime/qwik.mjs +1 -3
- package/dist/runtime/react.cjs +3 -3
- package/dist/runtime/react.mjs +1 -2
- package/dist/runtime/solid.cjs +3 -4
- package/dist/runtime/solid.mjs +1 -3
- package/dist/runtime/stencil.cjs +4 -5
- package/dist/runtime/stencil.mjs +1 -3
- package/dist/runtime/style.cjs +2 -3
- package/dist/runtime/style.mjs +1 -2
- package/dist/shared/boundaries.cjs +4 -6
- package/dist/shared/boundaries.mjs +1 -3
- package/dist/shared/customCss.cjs +1 -3
- package/dist/shared/customCss.mjs +1 -2
- package/dist/shared/debug.cjs +2 -4
- package/dist/shared/debug.mjs +2 -3
- package/dist/shared/file.cjs +3 -5
- package/dist/shared/file.mjs +1 -3
- package/dist/shared/framework.cjs +1 -3
- package/dist/shared/framework.mjs +1 -2
- package/dist/shared/json.cjs +1 -3
- package/dist/shared/json.mjs +1 -2
- package/dist/shared/types.cjs +1 -3
- package/dist/shared/types.mjs +1 -2
- package/dist/strategy/classic/runtime-only.cjs +15 -16
- package/dist/strategy/classic/runtime-only.mjs +3 -5
- package/dist/strategy/classname-first/browser.cjs +7 -8
- package/dist/strategy/classname-first/browser.mjs +1 -3
- package/dist/strategy/classname-first/runtime-only.cjs +13 -14
- package/dist/strategy/classname-first/runtime-only.mjs +1 -3
- package/dist/strategy/classname-first/server.cjs +9 -11
- package/dist/strategy/classname-first/server.mjs +3 -5
- package/dist/strategy/classname-only/server.cjs +8 -10
- package/dist/strategy/classname-only/server.mjs +2 -4
- package/dist/strategy/inline-first/browser.cjs +6 -7
- package/dist/strategy/inline-first/browser.mjs +1 -3
- package/dist/strategy/inline-first/runtime-only.cjs +12 -13
- package/dist/strategy/inline-first/runtime-only.mjs +1 -3
- package/dist/strategy/inline-first/server.cjs +9 -11
- package/dist/strategy/inline-first/server.mjs +3 -5
- package/dist/strategy/runtime/runtime-only.cjs +6 -8
- package/dist/strategy/runtime/runtime-only.mjs +1 -4
- package/dist/strategy/runtime/server.cjs +11 -12
- package/dist/strategy/runtime/server.mjs +2 -4
- package/dist/strategy/runtime-only/css.cjs +5 -6
- package/dist/strategy/runtime-only/css.mjs +4 -5
- package/dist/tasks/build.cjs +8 -10
- package/dist/tasks/build.mjs +1 -3
- package/dist/tasks/compile.cjs +2 -4
- package/dist/tasks/compile.mjs +1 -3
- package/dist/tasks/postcss.cjs +11 -13
- package/dist/tasks/postcss.mjs +1 -3
- package/dist/tasks/session.cjs +4 -6
- package/dist/tasks/session.mjs +1 -3
- package/dist/tasks/watch.cjs +7 -9
- package/dist/tasks/watch.mjs +1 -3
- package/dist/transform/cache.cjs +1 -3
- package/dist/transform/cache.mjs +1 -2
- package/dist/transform/processFile.cjs +4 -6
- package/dist/transform/processFile.mjs +1 -3
- package/dist/use/token/browser.cjs +4 -5
- package/dist/use/token/browser.mjs +1 -3
- package/dist/use/token/normalize.cjs +1 -3
- package/dist/use/token/normalize.mjs +1 -2
- package/dist/use/token/propMap.cjs +1 -3
- package/dist/use/token/propMap.mjs +1 -2
- package/dist/use/token/runtime-only.cjs +5 -6
- package/dist/use/token/runtime-only.mjs +1 -3
- package/dist/use/token/server.cjs +13 -14
- package/dist/use/token/server.mjs +4 -6
- package/dist/use/token/vars.cjs +2 -4
- package/dist/use/token/vars.mjs +1 -3
- package/package.json +23 -23
- package/dist/_virtual/rolldown_runtime.mjs +0 -20
package/dist/merge/index.mjs
CHANGED
|
@@ -1,28 +1,14 @@
|
|
|
1
1
|
import { merge as merge$1 } from "ts-deepmerge";
|
|
2
2
|
import isCSSProp from "@boss-css/is-css-prop";
|
|
3
|
-
|
|
4
3
|
//#region src/merge/index.ts
|
|
5
4
|
const cssPropCache = /* @__PURE__ */ new Map();
|
|
6
5
|
const whitespaceRegexp = /\s/;
|
|
7
|
-
const borderSideVariants = [
|
|
8
|
-
"width",
|
|
9
|
-
"style",
|
|
10
|
-
"color"
|
|
11
|
-
];
|
|
12
|
-
const physicalSides = [
|
|
13
|
-
"top",
|
|
14
|
-
"right",
|
|
15
|
-
"bottom",
|
|
16
|
-
"left"
|
|
17
|
-
];
|
|
18
|
-
const logicalAxes = ["block", "inline"];
|
|
19
|
-
const logicalSides = logicalAxes.flatMap((axis) => [`${axis}-start`, `${axis}-end`]);
|
|
20
6
|
const defaultConfig = {
|
|
21
7
|
cacheSize: 500,
|
|
22
8
|
sortContexts: true,
|
|
23
9
|
orderSensitiveContexts: ["before", "after"],
|
|
24
10
|
compoundContexts: ["at", "container"],
|
|
25
|
-
conflictMap:
|
|
11
|
+
conflictMap: {}
|
|
26
12
|
};
|
|
27
13
|
const createBossMerge = (config = {}) => {
|
|
28
14
|
const resolved = resolveConfig(config);
|
|
@@ -82,13 +68,19 @@ const mergeClassList = (classList, config) => {
|
|
|
82
68
|
const parsedTokens = [];
|
|
83
69
|
const lastIndexByKey = /* @__PURE__ */ new Map();
|
|
84
70
|
for (const token of tokens.flatMap(expandGroupedSelector)) {
|
|
85
|
-
const
|
|
86
|
-
if (
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
71
|
+
const parsed = parseToken(token);
|
|
72
|
+
if (parsed) {
|
|
73
|
+
const { contexts, prop } = parsed;
|
|
74
|
+
const contextKey = normalizeContexts(contexts, config).join(":");
|
|
75
|
+
const exactKey = buildKey(contextKey, prop);
|
|
76
|
+
const previousExactIndex = lastIndexByKey.get(exactKey);
|
|
77
|
+
if (previousExactIndex !== void 0) parsedTokens[previousExactIndex] = { value: "" };
|
|
78
|
+
const shorthandConflicts = config.conflictMap.get(prop);
|
|
79
|
+
if (shorthandConflicts?.length) for (const longhand of shorthandConflicts) {
|
|
80
|
+
const previousLonghandIndex = lastIndexByKey.get(buildKey(contextKey, longhand));
|
|
81
|
+
if (previousLonghandIndex !== void 0) parsedTokens[previousLonghandIndex] = { value: "" };
|
|
90
82
|
}
|
|
91
|
-
|
|
83
|
+
lastIndexByKey.set(exactKey, parsedTokens.length);
|
|
92
84
|
}
|
|
93
85
|
parsedTokens.push({ value: token });
|
|
94
86
|
}
|
|
@@ -133,11 +125,11 @@ const splitSelectors = (input) => {
|
|
|
133
125
|
const expandGroupedSelector = (selector) => {
|
|
134
126
|
const grouped = parseGroupedSelector(selector);
|
|
135
127
|
if (!grouped) return [selector];
|
|
136
|
-
const nextEntries = grouped.entries.map((entry
|
|
137
|
-
name: entry
|
|
138
|
-
rawValue: entry
|
|
128
|
+
const nextEntries = grouped.entries.map((entry) => ({
|
|
129
|
+
name: entry.name,
|
|
130
|
+
rawValue: entry.rawValue
|
|
139
131
|
}));
|
|
140
|
-
if (nextEntries.length > 1) return [...nextEntries].sort((a, b) => a.name.localeCompare(b.name)).map((entry
|
|
132
|
+
if (nextEntries.length > 1) return [...nextEntries].sort((a, b) => a.name.localeCompare(b.name)).map((entry) => `${grouped.prefix}:${entry.name}:${entry.rawValue}`);
|
|
141
133
|
const [entry] = nextEntries;
|
|
142
134
|
return [`${grouped.prefix}:{${entry.name}:${entry.rawValue}}`];
|
|
143
135
|
};
|
|
@@ -205,16 +197,6 @@ const findGroupStart = (selector) => {
|
|
|
205
197
|
}
|
|
206
198
|
return -1;
|
|
207
199
|
};
|
|
208
|
-
const getConflictKeys = (token, config) => {
|
|
209
|
-
const parsed = parseToken(token);
|
|
210
|
-
if (!parsed) return null;
|
|
211
|
-
const { contexts, prop } = parsed;
|
|
212
|
-
const contextKey = normalizeContexts(contexts, config).join(":");
|
|
213
|
-
const keys = [buildKey(contextKey, prop)];
|
|
214
|
-
const longhands = config.conflictMap.get(prop);
|
|
215
|
-
if (longhands?.length) for (const longhand of longhands) keys.push(buildKey(contextKey, longhand));
|
|
216
|
-
return keys;
|
|
217
|
-
};
|
|
218
200
|
const parseToken = (token) => {
|
|
219
201
|
const grouped = parseGroupedSelector(token);
|
|
220
202
|
if (grouped) {
|
|
@@ -325,251 +307,6 @@ function createLruCache(maxCacheSize) {
|
|
|
325
307
|
}
|
|
326
308
|
};
|
|
327
309
|
}
|
|
328
|
-
function createDefaultConflictMap() {
|
|
329
|
-
const map = {};
|
|
330
|
-
map.margin = unique([
|
|
331
|
-
...physicalSides.map((side) => `margin-${side}`),
|
|
332
|
-
...logicalAxes.map((axis) => `margin-${axis}`),
|
|
333
|
-
...logicalSides.map((side) => `margin-${side}`)
|
|
334
|
-
]);
|
|
335
|
-
map["margin-block"] = ["margin-block-start", "margin-block-end"];
|
|
336
|
-
map["margin-inline"] = ["margin-inline-start", "margin-inline-end"];
|
|
337
|
-
map.padding = unique([
|
|
338
|
-
...physicalSides.map((side) => `padding-${side}`),
|
|
339
|
-
...logicalAxes.map((axis) => `padding-${axis}`),
|
|
340
|
-
...logicalSides.map((side) => `padding-${side}`)
|
|
341
|
-
]);
|
|
342
|
-
map["padding-block"] = ["padding-block-start", "padding-block-end"];
|
|
343
|
-
map["padding-inline"] = ["padding-inline-start", "padding-inline-end"];
|
|
344
|
-
map.inset = unique([
|
|
345
|
-
"top",
|
|
346
|
-
"right",
|
|
347
|
-
"bottom",
|
|
348
|
-
"left",
|
|
349
|
-
...logicalAxes.map((axis) => `inset-${axis}`),
|
|
350
|
-
...logicalSides.map((side) => `inset-${side}`)
|
|
351
|
-
]);
|
|
352
|
-
map["inset-block"] = ["inset-block-start", "inset-block-end"];
|
|
353
|
-
map["inset-inline"] = ["inset-inline-start", "inset-inline-end"];
|
|
354
|
-
const borderSideLonghands = (side) => borderSideVariants.map((variant) => `border-${side}-${variant}`);
|
|
355
|
-
const borderPhysicalSideLonghands = physicalSides.flatMap((side) => borderSideLonghands(side));
|
|
356
|
-
const borderLogicalSideLonghands = logicalSides.flatMap((side) => borderSideLonghands(side));
|
|
357
|
-
const borderAxisVariants = (axis) => borderSideVariants.map((variant) => `border-${axis}-${variant}`);
|
|
358
|
-
const borderAxisSides = (axis) => [`${axis}-start`, `${axis}-end`];
|
|
359
|
-
const borderAxisSideLonghands = (axis) => borderAxisSides(axis).flatMap((side) => borderSideLonghands(side));
|
|
360
|
-
const borderWidthLonghands = unique([
|
|
361
|
-
...physicalSides.map((side) => `border-${side}-width`),
|
|
362
|
-
...logicalSides.map((side) => `border-${side}-width`),
|
|
363
|
-
...logicalAxes.map((axis) => `border-${axis}-width`),
|
|
364
|
-
...logicalAxes.flatMap((axis) => borderAxisSides(axis).map((side) => `border-${side}-width`))
|
|
365
|
-
]);
|
|
366
|
-
const borderStyleLonghands = unique([
|
|
367
|
-
...physicalSides.map((side) => `border-${side}-style`),
|
|
368
|
-
...logicalSides.map((side) => `border-${side}-style`),
|
|
369
|
-
...logicalAxes.map((axis) => `border-${axis}-style`),
|
|
370
|
-
...logicalAxes.flatMap((axis) => borderAxisSides(axis).map((side) => `border-${side}-style`))
|
|
371
|
-
]);
|
|
372
|
-
const borderColorLonghands = unique([
|
|
373
|
-
...physicalSides.map((side) => `border-${side}-color`),
|
|
374
|
-
...logicalSides.map((side) => `border-${side}-color`),
|
|
375
|
-
...logicalAxes.map((axis) => `border-${axis}-color`),
|
|
376
|
-
...logicalAxes.flatMap((axis) => borderAxisSides(axis).map((side) => `border-${side}-color`))
|
|
377
|
-
]);
|
|
378
|
-
map.border = unique([
|
|
379
|
-
...physicalSides.map((side) => `border-${side}`),
|
|
380
|
-
...logicalSides.map((side) => `border-${side}`),
|
|
381
|
-
...logicalAxes.map((axis) => `border-${axis}`),
|
|
382
|
-
...borderPhysicalSideLonghands,
|
|
383
|
-
...borderLogicalSideLonghands,
|
|
384
|
-
...borderAxisVariants("block"),
|
|
385
|
-
...borderAxisVariants("inline"),
|
|
386
|
-
...borderAxisSideLonghands("block"),
|
|
387
|
-
...borderAxisSideLonghands("inline"),
|
|
388
|
-
"border-width",
|
|
389
|
-
"border-style",
|
|
390
|
-
"border-color"
|
|
391
|
-
]);
|
|
392
|
-
map["border-top"] = borderSideLonghands("top");
|
|
393
|
-
map["border-right"] = borderSideLonghands("right");
|
|
394
|
-
map["border-bottom"] = borderSideLonghands("bottom");
|
|
395
|
-
map["border-left"] = borderSideLonghands("left");
|
|
396
|
-
map["border-block"] = unique([
|
|
397
|
-
"border-block-start",
|
|
398
|
-
"border-block-end",
|
|
399
|
-
...borderAxisVariants("block"),
|
|
400
|
-
...borderAxisSideLonghands("block")
|
|
401
|
-
]);
|
|
402
|
-
map["border-inline"] = unique([
|
|
403
|
-
"border-inline-start",
|
|
404
|
-
"border-inline-end",
|
|
405
|
-
...borderAxisVariants("inline"),
|
|
406
|
-
...borderAxisSideLonghands("inline")
|
|
407
|
-
]);
|
|
408
|
-
map["border-block-start"] = borderSideLonghands("block-start");
|
|
409
|
-
map["border-block-end"] = borderSideLonghands("block-end");
|
|
410
|
-
map["border-inline-start"] = borderSideLonghands("inline-start");
|
|
411
|
-
map["border-inline-end"] = borderSideLonghands("inline-end");
|
|
412
|
-
map["border-width"] = borderWidthLonghands;
|
|
413
|
-
map["border-style"] = borderStyleLonghands;
|
|
414
|
-
map["border-color"] = borderColorLonghands;
|
|
415
|
-
map["border-block-width"] = ["border-block-start-width", "border-block-end-width"];
|
|
416
|
-
map["border-inline-width"] = ["border-inline-start-width", "border-inline-end-width"];
|
|
417
|
-
map["border-block-style"] = ["border-block-start-style", "border-block-end-style"];
|
|
418
|
-
map["border-inline-style"] = ["border-inline-start-style", "border-inline-end-style"];
|
|
419
|
-
map["border-block-color"] = ["border-block-start-color", "border-block-end-color"];
|
|
420
|
-
map["border-inline-color"] = ["border-inline-start-color", "border-inline-end-color"];
|
|
421
|
-
map["border-radius"] = [
|
|
422
|
-
"border-top-left-radius",
|
|
423
|
-
"border-top-right-radius",
|
|
424
|
-
"border-bottom-right-radius",
|
|
425
|
-
"border-bottom-left-radius",
|
|
426
|
-
"border-start-start-radius",
|
|
427
|
-
"border-start-end-radius",
|
|
428
|
-
"border-end-start-radius",
|
|
429
|
-
"border-end-end-radius"
|
|
430
|
-
];
|
|
431
|
-
map["border-image"] = [
|
|
432
|
-
"border-image-source",
|
|
433
|
-
"border-image-slice",
|
|
434
|
-
"border-image-width",
|
|
435
|
-
"border-image-outset",
|
|
436
|
-
"border-image-repeat"
|
|
437
|
-
];
|
|
438
|
-
map["background"] = [
|
|
439
|
-
"background-color",
|
|
440
|
-
"background-image",
|
|
441
|
-
"background-position",
|
|
442
|
-
"background-size",
|
|
443
|
-
"background-repeat",
|
|
444
|
-
"background-origin",
|
|
445
|
-
"background-clip",
|
|
446
|
-
"background-attachment"
|
|
447
|
-
];
|
|
448
|
-
map["background-position"] = ["background-position-x", "background-position-y"];
|
|
449
|
-
map["font"] = [
|
|
450
|
-
"font-style",
|
|
451
|
-
"font-variant",
|
|
452
|
-
"font-variant-ligatures",
|
|
453
|
-
"font-variant-caps",
|
|
454
|
-
"font-variant-numeric",
|
|
455
|
-
"font-variant-east-asian",
|
|
456
|
-
"font-weight",
|
|
457
|
-
"font-stretch",
|
|
458
|
-
"font-size",
|
|
459
|
-
"line-height",
|
|
460
|
-
"font-family"
|
|
461
|
-
];
|
|
462
|
-
map["font-variant"] = [
|
|
463
|
-
"font-variant-ligatures",
|
|
464
|
-
"font-variant-caps",
|
|
465
|
-
"font-variant-numeric",
|
|
466
|
-
"font-variant-east-asian"
|
|
467
|
-
];
|
|
468
|
-
map["list-style"] = [
|
|
469
|
-
"list-style-position",
|
|
470
|
-
"list-style-image",
|
|
471
|
-
"list-style-type"
|
|
472
|
-
];
|
|
473
|
-
map["grid"] = [
|
|
474
|
-
"grid-template",
|
|
475
|
-
"grid-template-rows",
|
|
476
|
-
"grid-template-columns",
|
|
477
|
-
"grid-template-areas",
|
|
478
|
-
"grid-auto-rows",
|
|
479
|
-
"grid-auto-columns",
|
|
480
|
-
"grid-auto-flow",
|
|
481
|
-
"grid-row",
|
|
482
|
-
"grid-row-start",
|
|
483
|
-
"grid-row-end",
|
|
484
|
-
"grid-column",
|
|
485
|
-
"grid-column-start",
|
|
486
|
-
"grid-column-end",
|
|
487
|
-
"grid-area"
|
|
488
|
-
];
|
|
489
|
-
map["grid-template"] = [
|
|
490
|
-
"grid-template-rows",
|
|
491
|
-
"grid-template-columns",
|
|
492
|
-
"grid-template-areas"
|
|
493
|
-
];
|
|
494
|
-
map["grid-row"] = ["grid-row-start", "grid-row-end"];
|
|
495
|
-
map["grid-column"] = ["grid-column-start", "grid-column-end"];
|
|
496
|
-
map["grid-area"] = [
|
|
497
|
-
"grid-row-start",
|
|
498
|
-
"grid-row-end",
|
|
499
|
-
"grid-column-start",
|
|
500
|
-
"grid-column-end"
|
|
501
|
-
];
|
|
502
|
-
map["flex"] = [
|
|
503
|
-
"flex-grow",
|
|
504
|
-
"flex-shrink",
|
|
505
|
-
"flex-basis"
|
|
506
|
-
];
|
|
507
|
-
map["flex-flow"] = ["flex-direction", "flex-wrap"];
|
|
508
|
-
map["gap"] = ["row-gap", "column-gap"];
|
|
509
|
-
map["overflow"] = ["overflow-x", "overflow-y"];
|
|
510
|
-
map["overscroll-behavior"] = ["overscroll-behavior-x", "overscroll-behavior-y"];
|
|
511
|
-
map["scroll-margin"] = unique([
|
|
512
|
-
...physicalSides.map((side) => `scroll-margin-${side}`),
|
|
513
|
-
...logicalAxes.map((axis) => `scroll-margin-${axis}`),
|
|
514
|
-
...logicalSides.map((side) => `scroll-margin-${side}`)
|
|
515
|
-
]);
|
|
516
|
-
map["scroll-margin-block"] = ["scroll-margin-block-start", "scroll-margin-block-end"];
|
|
517
|
-
map["scroll-margin-inline"] = ["scroll-margin-inline-start", "scroll-margin-inline-end"];
|
|
518
|
-
map["scroll-padding"] = unique([
|
|
519
|
-
...physicalSides.map((side) => `scroll-padding-${side}`),
|
|
520
|
-
...logicalAxes.map((axis) => `scroll-padding-${axis}`),
|
|
521
|
-
...logicalSides.map((side) => `scroll-padding-${side}`)
|
|
522
|
-
]);
|
|
523
|
-
map["scroll-padding-block"] = ["scroll-padding-block-start", "scroll-padding-block-end"];
|
|
524
|
-
map["scroll-padding-inline"] = ["scroll-padding-inline-start", "scroll-padding-inline-end"];
|
|
525
|
-
map["place-content"] = ["align-content", "justify-content"];
|
|
526
|
-
map["place-items"] = ["align-items", "justify-items"];
|
|
527
|
-
map["place-self"] = ["align-self", "justify-self"];
|
|
528
|
-
map["column-rule"] = [
|
|
529
|
-
"column-rule-width",
|
|
530
|
-
"column-rule-style",
|
|
531
|
-
"column-rule-color"
|
|
532
|
-
];
|
|
533
|
-
map["columns"] = ["column-width", "column-count"];
|
|
534
|
-
map["text-decoration"] = [
|
|
535
|
-
"text-decoration-line",
|
|
536
|
-
"text-decoration-style",
|
|
537
|
-
"text-decoration-color",
|
|
538
|
-
"text-decoration-thickness",
|
|
539
|
-
"text-decoration-skip-ink"
|
|
540
|
-
];
|
|
541
|
-
map["text-emphasis"] = [
|
|
542
|
-
"text-emphasis-style",
|
|
543
|
-
"text-emphasis-color",
|
|
544
|
-
"text-emphasis-position"
|
|
545
|
-
];
|
|
546
|
-
map["transition"] = [
|
|
547
|
-
"transition-property",
|
|
548
|
-
"transition-duration",
|
|
549
|
-
"transition-timing-function",
|
|
550
|
-
"transition-delay",
|
|
551
|
-
"transition-behavior"
|
|
552
|
-
];
|
|
553
|
-
map["animation"] = [
|
|
554
|
-
"animation-name",
|
|
555
|
-
"animation-duration",
|
|
556
|
-
"animation-timing-function",
|
|
557
|
-
"animation-delay",
|
|
558
|
-
"animation-iteration-count",
|
|
559
|
-
"animation-direction",
|
|
560
|
-
"animation-fill-mode",
|
|
561
|
-
"animation-play-state",
|
|
562
|
-
"animation-composition",
|
|
563
|
-
"animation-timeline",
|
|
564
|
-
"animation-range"
|
|
565
|
-
];
|
|
566
|
-
map["outline"] = [
|
|
567
|
-
"outline-color",
|
|
568
|
-
"outline-style",
|
|
569
|
-
"outline-width"
|
|
570
|
-
];
|
|
571
|
-
return map;
|
|
572
|
-
}
|
|
573
310
|
function normalizeConflictMap(conflictMap) {
|
|
574
311
|
const normalized = /* @__PURE__ */ new Map();
|
|
575
312
|
for (const [key, values] of Object.entries(conflictMap)) normalized.set(key, unique(values));
|
|
@@ -581,6 +318,5 @@ function unique(items) {
|
|
|
581
318
|
const isPlainObject = (value) => {
|
|
582
319
|
return !!value && typeof value === "object" && !Array.isArray(value);
|
|
583
320
|
};
|
|
584
|
-
|
|
585
321
|
//#endregion
|
|
586
|
-
export { createBossMerge, join, merge };
|
|
322
|
+
export { createBossMerge, join, merge };
|
package/dist/native/browser.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
+
const require_use_token_runtime_only = require("../use/token/runtime-only.cjs");
|
|
3
3
|
//#region src/native/browser.ts
|
|
4
4
|
const ignoredProps = new Set([
|
|
5
5
|
"ref",
|
|
@@ -85,7 +85,6 @@ const onBrowserObjectStart = (api, { input, output = {} }) => {
|
|
|
85
85
|
}
|
|
86
86
|
output.style = [output.style, bossStyle];
|
|
87
87
|
};
|
|
88
|
-
|
|
89
88
|
//#endregion
|
|
90
89
|
exports.name = name;
|
|
91
|
-
exports.onBrowserObjectStart = onBrowserObjectStart;
|
|
90
|
+
exports.onBrowserObjectStart = onBrowserObjectStart;
|
package/dist/native/browser.mjs
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { resolveRuntimeToken } from "../use/token/runtime-only.mjs";
|
|
2
|
-
|
|
3
2
|
//#region src/native/browser.ts
|
|
4
3
|
const ignoredProps = new Set([
|
|
5
4
|
"ref",
|
|
@@ -85,6 +84,5 @@ const onBrowserObjectStart = (api, { input, output = {} }) => {
|
|
|
85
84
|
}
|
|
86
85
|
output.style = [output.style, bossStyle];
|
|
87
86
|
};
|
|
88
|
-
|
|
89
87
|
//#endregion
|
|
90
|
-
export { name, onBrowserObjectStart };
|
|
88
|
+
export { name, onBrowserObjectStart };
|
package/dist/native/server.cjs
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
const
|
|
4
|
-
const
|
|
5
|
-
const
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
+
require("../_virtual/_rolldown/runtime.cjs");
|
|
3
|
+
const require_extractCode = require("../parser/jsx/extractCode.cjs");
|
|
4
|
+
const require_extractPrepared = require("../parser/jsx/extractPrepared.cjs");
|
|
5
|
+
const require_extractProps = require("../parser/jsx/extractProps.cjs");
|
|
6
|
+
const require_styleTypes = require("./styleTypes.cjs");
|
|
6
7
|
let ts_deepmerge = require("ts-deepmerge");
|
|
7
|
-
|
|
8
8
|
//#region src/native/server.ts
|
|
9
9
|
const name = "native";
|
|
10
10
|
const settings = new Map([
|
|
@@ -172,9 +172,8 @@ const onParse = async (api, input) => {
|
|
|
172
172
|
}
|
|
173
173
|
if (preparedDirty) syncPreparedDts(api);
|
|
174
174
|
};
|
|
175
|
-
|
|
176
175
|
//#endregion
|
|
177
176
|
exports.name = name;
|
|
178
177
|
exports.onBoot = onBoot;
|
|
179
178
|
exports.onParse = onParse;
|
|
180
|
-
exports.settings = settings;
|
|
179
|
+
exports.settings = settings;
|
package/dist/native/server.mjs
CHANGED
|
@@ -3,7 +3,6 @@ import { extractPreparedComponents } from "../parser/jsx/extractPrepared.mjs";
|
|
|
3
3
|
import { extractPropTrees } from "../parser/jsx/extractProps.mjs";
|
|
4
4
|
import { loadReactNativeStyleProps } from "./styleTypes.mjs";
|
|
5
5
|
import { merge } from "ts-deepmerge";
|
|
6
|
-
|
|
7
6
|
//#region src/native/server.ts
|
|
8
7
|
const name = "native";
|
|
9
8
|
const settings = new Map([
|
|
@@ -171,6 +170,5 @@ const onParse = async (api, input) => {
|
|
|
171
170
|
}
|
|
172
171
|
if (preparedDirty) syncPreparedDts(api);
|
|
173
172
|
};
|
|
174
|
-
|
|
175
173
|
//#endregion
|
|
176
|
-
export { name, onBoot, onParse, settings };
|
|
174
|
+
export { name, onBoot, onParse, settings };
|
|
@@ -1,12 +1,11 @@
|
|
|
1
|
-
const
|
|
1
|
+
const require_runtime = require("../_virtual/_rolldown/runtime.cjs");
|
|
2
2
|
let node_fs_promises = require("node:fs/promises");
|
|
3
|
-
node_fs_promises =
|
|
3
|
+
node_fs_promises = require_runtime.__toESM(node_fs_promises);
|
|
4
4
|
let node_path = require("node:path");
|
|
5
|
-
node_path =
|
|
5
|
+
node_path = require_runtime.__toESM(node_path);
|
|
6
6
|
let fast_glob = require("fast-glob");
|
|
7
|
-
fast_glob =
|
|
7
|
+
fast_glob = require_runtime.__toESM(fast_glob);
|
|
8
8
|
let node_module = require("node:module");
|
|
9
|
-
|
|
10
9
|
//#region src/native/styleTypes.ts
|
|
11
10
|
const interfaceNames = new Set([
|
|
12
11
|
"ViewStyle",
|
|
@@ -163,6 +162,5 @@ const loadReactNativeStyleProps = async () => {
|
|
|
163
162
|
sourcePath: typesFile
|
|
164
163
|
};
|
|
165
164
|
};
|
|
166
|
-
|
|
167
165
|
//#endregion
|
|
168
|
-
exports.loadReactNativeStyleProps = loadReactNativeStyleProps;
|
|
166
|
+
exports.loadReactNativeStyleProps = loadReactNativeStyleProps;
|
|
@@ -2,7 +2,6 @@ import { createRequire } from "node:module";
|
|
|
2
2
|
import fs from "node:fs/promises";
|
|
3
3
|
import path from "node:path";
|
|
4
4
|
import fg from "fast-glob";
|
|
5
|
-
|
|
6
5
|
//#region src/native/styleTypes.ts
|
|
7
6
|
const interfaceNames = new Set([
|
|
8
7
|
"ViewStyle",
|
|
@@ -159,6 +158,5 @@ const loadReactNativeStyleProps = async () => {
|
|
|
159
158
|
sourcePath: typesFile
|
|
160
159
|
};
|
|
161
160
|
};
|
|
162
|
-
|
|
163
161
|
//#endregion
|
|
164
|
-
export { loadReactNativeStyleProps };
|
|
162
|
+
export { loadReactNativeStyleProps };
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
2
|
//#region src/parser/classname/server.ts
|
|
4
|
-
var server_exports = /* @__PURE__ */
|
|
3
|
+
var server_exports = /* @__PURE__ */ require("../../_virtual/_rolldown/runtime.cjs").__exportAll({
|
|
5
4
|
name: () => name,
|
|
6
5
|
onParse: () => onParse
|
|
7
6
|
});
|
|
@@ -93,17 +92,17 @@ const extractPropTree = async (string, api) => {
|
|
|
93
92
|
selectors.forEach((selector) => {
|
|
94
93
|
const grouped = parseGroupedSelector(selector);
|
|
95
94
|
if (grouped) {
|
|
96
|
-
const rawFragments
|
|
97
|
-
if (!resolveDescriptor(stripImportantSuffix(rawFragments
|
|
98
|
-
const fragments = expandFragments(rawFragments
|
|
95
|
+
const rawFragments = splitFragments(grouped.prefix);
|
|
96
|
+
if (!resolveDescriptor(stripImportantSuffix(rawFragments[0])).descriptor || rawFragments.length === 0) return;
|
|
97
|
+
const fragments = expandFragments(rawFragments);
|
|
99
98
|
grouped.entries.forEach(({ name, rawValue }) => {
|
|
100
99
|
if (!resolveDescriptor(name).descriptor?.isCSSProp) return;
|
|
101
|
-
const { value
|
|
102
|
-
const prop = { value
|
|
103
|
-
if (important
|
|
104
|
-
const path
|
|
105
|
-
const key = pathKey(path
|
|
106
|
-
createPropPath([...path
|
|
100
|
+
const { value, important } = parseImportantValue(rawValue);
|
|
101
|
+
const prop = { value };
|
|
102
|
+
if (important) prop.important = true;
|
|
103
|
+
const path = [...fragments, name];
|
|
104
|
+
const key = pathKey(path);
|
|
105
|
+
createPropPath([...path], prop, tree);
|
|
107
106
|
selectorTokens.set(key, selector);
|
|
108
107
|
});
|
|
109
108
|
return;
|
|
@@ -263,13 +262,12 @@ const applySelectorTokens = (tree, selectorTokens, path = []) => {
|
|
|
263
262
|
if (prop.value && typeof prop.value === "object" && !Array.isArray(prop.value)) applySelectorTokens(prop.value, selectorTokens, nextPath);
|
|
264
263
|
});
|
|
265
264
|
};
|
|
266
|
-
|
|
267
265
|
//#endregion
|
|
268
266
|
exports.name = name;
|
|
269
267
|
exports.onParse = onParse;
|
|
270
|
-
Object.defineProperty(exports,
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
});
|
|
268
|
+
Object.defineProperty(exports, "server_exports", {
|
|
269
|
+
enumerable: true,
|
|
270
|
+
get: function() {
|
|
271
|
+
return server_exports;
|
|
272
|
+
}
|
|
273
|
+
});
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { __exportAll } from "../../_virtual/
|
|
2
|
-
|
|
1
|
+
import { __exportAll } from "../../_virtual/_rolldown/runtime.mjs";
|
|
3
2
|
//#region src/parser/classname/server.ts
|
|
4
3
|
var server_exports = /* @__PURE__ */ __exportAll({
|
|
5
4
|
name: () => name,
|
|
@@ -93,17 +92,17 @@ const extractPropTree = async (string, api) => {
|
|
|
93
92
|
selectors.forEach((selector) => {
|
|
94
93
|
const grouped = parseGroupedSelector(selector);
|
|
95
94
|
if (grouped) {
|
|
96
|
-
const rawFragments
|
|
97
|
-
if (!resolveDescriptor(stripImportantSuffix(rawFragments
|
|
98
|
-
const fragments = expandFragments(rawFragments
|
|
95
|
+
const rawFragments = splitFragments(grouped.prefix);
|
|
96
|
+
if (!resolveDescriptor(stripImportantSuffix(rawFragments[0])).descriptor || rawFragments.length === 0) return;
|
|
97
|
+
const fragments = expandFragments(rawFragments);
|
|
99
98
|
grouped.entries.forEach(({ name, rawValue }) => {
|
|
100
99
|
if (!resolveDescriptor(name).descriptor?.isCSSProp) return;
|
|
101
|
-
const { value
|
|
102
|
-
const prop = { value
|
|
103
|
-
if (important
|
|
104
|
-
const path
|
|
105
|
-
const key = pathKey(path
|
|
106
|
-
createPropPath([...path
|
|
100
|
+
const { value, important } = parseImportantValue(rawValue);
|
|
101
|
+
const prop = { value };
|
|
102
|
+
if (important) prop.important = true;
|
|
103
|
+
const path = [...fragments, name];
|
|
104
|
+
const key = pathKey(path);
|
|
105
|
+
createPropPath([...path], prop, tree);
|
|
107
106
|
selectorTokens.set(key, selector);
|
|
108
107
|
});
|
|
109
108
|
return;
|
|
@@ -263,6 +262,5 @@ const applySelectorTokens = (tree, selectorTokens, path = []) => {
|
|
|
263
262
|
if (prop.value && typeof prop.value === "object" && !Array.isArray(prop.value)) applySelectorTokens(prop.value, selectorTokens, nextPath);
|
|
264
263
|
});
|
|
265
264
|
};
|
|
266
|
-
|
|
267
265
|
//#endregion
|
|
268
|
-
export { name, onParse, server_exports };
|
|
266
|
+
export { name, onParse, server_exports };
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
const
|
|
3
|
-
const
|
|
4
|
-
const
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
+
const require_runtime = require("../../_virtual/_rolldown/runtime.cjs");
|
|
3
|
+
const require_framework = require("../../shared/framework.cjs");
|
|
4
|
+
const require_isDOMProp = require("./isDOMProp.cjs");
|
|
5
|
+
const require_cx_index = require("../../cx/index.cjs");
|
|
5
6
|
let _boss_css_is_css_prop = require("@boss-css/is-css-prop");
|
|
6
|
-
_boss_css_is_css_prop =
|
|
7
|
-
|
|
7
|
+
_boss_css_is_css_prop = require_runtime.__toESM(_boss_css_is_css_prop);
|
|
8
8
|
//#region src/parser/jsx/browser.ts
|
|
9
9
|
const ignoredProps = new Set([
|
|
10
10
|
"ref",
|
|
@@ -65,7 +65,6 @@ const onBrowserObjectStart = (api, { input, tag = "div", contexts = [], output =
|
|
|
65
65
|
}
|
|
66
66
|
log.log("browserObject:end", input, output);
|
|
67
67
|
};
|
|
68
|
-
|
|
69
68
|
//#endregion
|
|
70
69
|
exports.name = name;
|
|
71
|
-
exports.onBrowserObjectStart = onBrowserObjectStart;
|
|
70
|
+
exports.onBrowserObjectStart = onBrowserObjectStart;
|
|
@@ -2,7 +2,6 @@ import { getClassNameProp } from "../../shared/framework.mjs";
|
|
|
2
2
|
import isDOMProp from "./isDOMProp.mjs";
|
|
3
3
|
import { cx } from "../../cx/index.mjs";
|
|
4
4
|
import isCSSProp from "@boss-css/is-css-prop";
|
|
5
|
-
|
|
6
5
|
//#region src/parser/jsx/browser.ts
|
|
7
6
|
const ignoredProps = new Set([
|
|
8
7
|
"ref",
|
|
@@ -63,6 +62,5 @@ const onBrowserObjectStart = (api, { input, tag = "div", contexts = [], output =
|
|
|
63
62
|
}
|
|
64
63
|
log.log("browserObject:end", input, output);
|
|
65
64
|
};
|
|
66
|
-
|
|
67
65
|
//#endregion
|
|
68
|
-
export { name, onBrowserObjectStart };
|
|
66
|
+
export { name, onBrowserObjectStart };
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
|
|
2
1
|
//#region src/parser/jsx/extractCode.ts
|
|
3
2
|
const map = {
|
|
4
3
|
"<": ">",
|
|
@@ -9,7 +8,7 @@ const map = {
|
|
|
9
8
|
"`": "`",
|
|
10
9
|
"'": "'"
|
|
11
10
|
};
|
|
12
|
-
const openingRegexp =
|
|
11
|
+
const openingRegexp = new RegExp(`[${Object.keys(map).map((k) => `\\${k}`).join("")}]`);
|
|
13
12
|
const ignoredContexts = {
|
|
14
13
|
"{": true,
|
|
15
14
|
"\"": true,
|
|
@@ -95,6 +94,5 @@ function extractCode(code) {
|
|
|
95
94
|
}
|
|
96
95
|
return results;
|
|
97
96
|
}
|
|
98
|
-
|
|
99
97
|
//#endregion
|
|
100
|
-
exports.extractCode = extractCode;
|
|
98
|
+
exports.extractCode = extractCode;
|
|
@@ -8,7 +8,7 @@ const map = {
|
|
|
8
8
|
"`": "`",
|
|
9
9
|
"'": "'"
|
|
10
10
|
};
|
|
11
|
-
const openingRegexp =
|
|
11
|
+
const openingRegexp = new RegExp(`[${Object.keys(map).map((k) => `\\${k}`).join("")}]`);
|
|
12
12
|
const ignoredContexts = {
|
|
13
13
|
"{": true,
|
|
14
14
|
"\"": true,
|
|
@@ -94,6 +94,5 @@ function extractCode(code) {
|
|
|
94
94
|
}
|
|
95
95
|
return results;
|
|
96
96
|
}
|
|
97
|
-
|
|
98
97
|
//#endregion
|
|
99
|
-
export { extractCode };
|
|
98
|
+
export { extractCode };
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
const require_extractCode = require(
|
|
1
|
+
require("../../_virtual/_rolldown/runtime.cjs");
|
|
2
|
+
const require_extractCode = require("./extractCode.cjs");
|
|
3
3
|
let _swc_core = require("@swc/core");
|
|
4
|
-
|
|
5
4
|
//#region src/parser/jsx/extractPrepared.ts
|
|
6
5
|
const extractPreparedComponents = (content, filePath) => {
|
|
7
6
|
if (!content.includes("$$.")) return [];
|
|
@@ -118,6 +117,5 @@ const extractStyleText = (objectExpression) => {
|
|
|
118
117
|
if (text.startsWith("({") && text.endsWith("})")) text = text.slice(1, -1);
|
|
119
118
|
return text.replace(/\s+/g, " ");
|
|
120
119
|
};
|
|
121
|
-
|
|
122
120
|
//#endregion
|
|
123
|
-
exports.extractPreparedComponents = extractPreparedComponents;
|
|
121
|
+
exports.extractPreparedComponents = extractPreparedComponents;
|