boss-css 0.0.23 → 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/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 +8 -9
- package/dist/merge/index.mjs +5 -7
- 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/prop/at/server.mjs
CHANGED
|
@@ -1,14 +1,13 @@
|
|
|
1
|
-
import { __exportAll } from "../../_virtual/
|
|
1
|
+
import { __exportAll } from "../../_virtual/_rolldown/runtime.mjs";
|
|
2
2
|
import { dependencies as dependencies$1 } from "../pseudo/server.mjs";
|
|
3
3
|
import { baseAtValues, buildContainerQuery, buildKeyframesRule, buildMediaQuery, defaultBreakpoints, normalizeKeyframeStep, parseContainerContext, parseKeyframesContext, parseRangeKey } from "./shared.mjs";
|
|
4
4
|
import hash from "@emotion/hash";
|
|
5
|
-
|
|
6
5
|
//#region src/prop/at/server.ts
|
|
7
6
|
var server_exports = /* @__PURE__ */ __exportAll({
|
|
8
|
-
DOWN: () =>
|
|
9
|
-
UP: () =>
|
|
7
|
+
DOWN: () => "-",
|
|
8
|
+
UP: () => "+",
|
|
10
9
|
dependencies: () => dependencies,
|
|
11
|
-
name: () =>
|
|
10
|
+
name: () => "at",
|
|
12
11
|
onBoot: () => onBoot,
|
|
13
12
|
onProp: () => onProp,
|
|
14
13
|
onReady: () => onReady,
|
|
@@ -32,8 +31,8 @@ const onBoot = async (api) => {
|
|
|
32
31
|
const breakpoints = api.breakpoints;
|
|
33
32
|
Object.entries(breakpoints).forEach(([name, [from, to]]) => [
|
|
34
33
|
["", [from, to]],
|
|
35
|
-
[
|
|
36
|
-
[
|
|
34
|
+
["+", [from, null]],
|
|
35
|
+
["-", [null, to]]
|
|
37
36
|
].forEach(([symbol, fromTo]) => breakpoints[`${name}${symbol}`] = fromTo));
|
|
38
37
|
Object.entries(breakpoints).forEach(([name, [from, to]]) => {
|
|
39
38
|
dependencies.add(name);
|
|
@@ -57,7 +56,7 @@ const onBoot = async (api) => {
|
|
|
57
56
|
api.file.js.dts.set("body", `pseudo:AtPropsShorthandsInterfaceEnd`, `}`).set("body", "$$:KeyframesProps", `export type $$KeyframesProps = {
|
|
58
57
|
[key: string]: $$FinalProps
|
|
59
58
|
}`).set("body", "$$:AtNamedProps", `export type $$AtNamedProps = {
|
|
60
|
-
[key in \`container_\${string}\`]?:
|
|
59
|
+
[key in \`container_\${string}\`]?: Properties['container'] | $$FinalProps
|
|
61
60
|
} & {
|
|
62
61
|
[key in \`keyframes_\${string}\`]?: $$KeyframesProps
|
|
63
62
|
}`).set("body", `$$:AtProps`, `export type $$AtProps = {
|
|
@@ -103,10 +102,10 @@ const onReady = async (api) => {
|
|
|
103
102
|
const updateFinalProps = (value) => {
|
|
104
103
|
const content = typeof value === "string" ? value : value?.content;
|
|
105
104
|
if (typeof content !== "string") return value;
|
|
106
|
-
if (!content.includes("
|
|
107
|
-
if (content.includes(`Omit<
|
|
108
|
-
return content.replace(" &
|
|
109
|
-
return ` & Omit<
|
|
105
|
+
if (!content.includes(" & Properties")) return content;
|
|
106
|
+
if (content.includes(`Omit<Properties, 'container'>`)) return content;
|
|
107
|
+
return content.replace(" & Properties", () => {
|
|
108
|
+
return ` & Omit<Properties, 'container'> & { container?: Properties['container'] | $$FinalProps }`;
|
|
110
109
|
});
|
|
111
110
|
};
|
|
112
111
|
api.file.js.dts.replace("body", "$$:FinalProps", updateFinalProps);
|
|
@@ -151,11 +150,11 @@ const resolveAtQuery = (api, contexts, key) => {
|
|
|
151
150
|
const resolveQueryFromContexts = (api, contexts) => {
|
|
152
151
|
const atIndex = contexts.lastIndexOf("at");
|
|
153
152
|
if (atIndex !== -1 && contexts[atIndex + 1]) {
|
|
154
|
-
const containerInfo
|
|
155
|
-
if (containerInfo
|
|
156
|
-
const key
|
|
157
|
-
if (!key
|
|
158
|
-
return resolveContainerQuery(api, key
|
|
153
|
+
const containerInfo = parseContainerContext(contexts[atIndex + 1]);
|
|
154
|
+
if (containerInfo) {
|
|
155
|
+
const key = contexts[atIndex + 2];
|
|
156
|
+
if (!key) return null;
|
|
157
|
+
return resolveContainerQuery(api, key, containerInfo.name);
|
|
159
158
|
}
|
|
160
159
|
const key = contexts[atIndex + 1];
|
|
161
160
|
return resolveMediaQuery(api, key);
|
|
@@ -287,6 +286,5 @@ const onProp = async (api, { name, prop, contexts, preferVariables, file }) => {
|
|
|
287
286
|
await processEntries(isAt ? prop.value : { [contextName]: { value: prop.value } }, contexts);
|
|
288
287
|
if (isAt) contexts.pop();
|
|
289
288
|
};
|
|
290
|
-
|
|
291
289
|
//#endregion
|
|
292
|
-
export { DOWN, UP, dependencies, name, onBoot, onProp, onReady, server_exports, values };
|
|
290
|
+
export { DOWN, UP, dependencies, name, onBoot, onProp, onReady, server_exports, values };
|
package/dist/prop/at/shared.cjs
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
|
|
2
1
|
//#region src/prop/at/shared.ts
|
|
3
2
|
const defaultBreakpoints = {
|
|
4
3
|
micro: [0, 375],
|
|
@@ -140,7 +139,6 @@ const parseKeyframesContext = (context) => {
|
|
|
140
139
|
}
|
|
141
140
|
return null;
|
|
142
141
|
};
|
|
143
|
-
|
|
144
142
|
//#endregion
|
|
145
143
|
exports.baseAtValues = baseAtValues;
|
|
146
144
|
exports.buildContainerQuery = buildContainerQuery;
|
|
@@ -150,4 +148,4 @@ exports.defaultBreakpoints = defaultBreakpoints;
|
|
|
150
148
|
exports.normalizeKeyframeStep = normalizeKeyframeStep;
|
|
151
149
|
exports.parseContainerContext = parseContainerContext;
|
|
152
150
|
exports.parseKeyframesContext = parseKeyframesContext;
|
|
153
|
-
exports.parseRangeKey = parseRangeKey;
|
|
151
|
+
exports.parseRangeKey = parseRangeKey;
|
package/dist/prop/at/shared.mjs
CHANGED
|
@@ -139,6 +139,5 @@ const parseKeyframesContext = (context) => {
|
|
|
139
139
|
}
|
|
140
140
|
return null;
|
|
141
141
|
};
|
|
142
|
-
|
|
143
142
|
//#endregion
|
|
144
|
-
export { baseAtValues, buildContainerQuery, buildKeyframesRule, buildMediaQuery, defaultBreakpoints, normalizeKeyframeStep, parseContainerContext, parseKeyframesContext, parseRangeKey };
|
|
143
|
+
export { baseAtValues, buildContainerQuery, buildKeyframesRule, buildMediaQuery, defaultBreakpoints, normalizeKeyframeStep, parseContainerContext, parseKeyframesContext, parseRangeKey };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
const
|
|
3
|
-
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
+
const require_selectors = require("./selectors.cjs");
|
|
3
|
+
const require_shared = require("./shared.cjs");
|
|
4
4
|
//#region src/prop/bosswind/browser.ts
|
|
5
5
|
const name = "bosswind";
|
|
6
6
|
const onInit = (api) => {
|
|
@@ -14,8 +14,7 @@ const onBrowserObjectStart = (api, { input }) => {
|
|
|
14
14
|
const selectorMap = require_selectors.getBosswindSelectorMap(rewritten);
|
|
15
15
|
if (selectorMap) require_selectors.setBosswindSelectorMap(input, selectorMap);
|
|
16
16
|
};
|
|
17
|
-
|
|
18
17
|
//#endregion
|
|
19
18
|
exports.name = name;
|
|
20
19
|
exports.onBrowserObjectStart = onBrowserObjectStart;
|
|
21
|
-
exports.onInit = onInit;
|
|
20
|
+
exports.onInit = onInit;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { getBosswindSelectorMap, setBosswindSelectorMap } from "./selectors.mjs";
|
|
2
2
|
import { registerBosswindDictionary, rewriteBosswindInput } from "./shared.mjs";
|
|
3
|
-
|
|
4
3
|
//#region src/prop/bosswind/browser.ts
|
|
5
4
|
const name = "bosswind";
|
|
6
5
|
const onInit = (api) => {
|
|
@@ -14,6 +13,5 @@ const onBrowserObjectStart = (api, { input }) => {
|
|
|
14
13
|
const selectorMap = getBosswindSelectorMap(rewritten);
|
|
15
14
|
if (selectorMap) setBosswindSelectorMap(input, selectorMap);
|
|
16
15
|
};
|
|
17
|
-
|
|
18
16
|
//#endregion
|
|
19
|
-
export { name, onBrowserObjectStart, onInit };
|
|
17
|
+
export { name, onBrowserObjectStart, onInit };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
const
|
|
3
|
-
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
+
const require_selectors = require("./selectors.cjs");
|
|
3
|
+
const require_shared = require("./shared.cjs");
|
|
4
4
|
//#region src/prop/bosswind/runtime-only.ts
|
|
5
5
|
const name = "bosswind";
|
|
6
6
|
const onInit = (api) => {
|
|
@@ -14,8 +14,7 @@ const onBrowserObjectStart = (api, { input }) => {
|
|
|
14
14
|
const selectorMap = require_selectors.getBosswindSelectorMap(rewritten);
|
|
15
15
|
if (selectorMap) require_selectors.setBosswindSelectorMap(input, selectorMap);
|
|
16
16
|
};
|
|
17
|
-
|
|
18
17
|
//#endregion
|
|
19
18
|
exports.name = name;
|
|
20
19
|
exports.onBrowserObjectStart = onBrowserObjectStart;
|
|
21
|
-
exports.onInit = onInit;
|
|
20
|
+
exports.onInit = onInit;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { getBosswindSelectorMap, setBosswindSelectorMap } from "./selectors.mjs";
|
|
2
2
|
import { registerBosswindDictionary, rewriteBosswindInput } from "./shared.mjs";
|
|
3
|
-
|
|
4
3
|
//#region src/prop/bosswind/runtime-only.ts
|
|
5
4
|
const name = "bosswind";
|
|
6
5
|
const onInit = (api) => {
|
|
@@ -14,6 +13,5 @@ const onBrowserObjectStart = (api, { input }) => {
|
|
|
14
13
|
const selectorMap = getBosswindSelectorMap(rewritten);
|
|
15
14
|
if (selectorMap) setBosswindSelectorMap(input, selectorMap);
|
|
16
15
|
};
|
|
17
|
-
|
|
18
16
|
//#endregion
|
|
19
|
-
export { name, onBrowserObjectStart, onInit };
|
|
17
|
+
export { name, onBrowserObjectStart, onInit };
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
|
|
2
1
|
//#region src/prop/bosswind/selectors.ts
|
|
3
2
|
const bosswindSelectorKey = Symbol.for("bosswind.selectorMap");
|
|
4
3
|
const getBosswindSelectorMap = (input) => {
|
|
@@ -12,7 +11,6 @@ const setBosswindSelectorMap = (input, selectors) => {
|
|
|
12
11
|
configurable: true
|
|
13
12
|
});
|
|
14
13
|
};
|
|
15
|
-
|
|
16
14
|
//#endregion
|
|
17
15
|
exports.getBosswindSelectorMap = getBosswindSelectorMap;
|
|
18
|
-
exports.setBosswindSelectorMap = setBosswindSelectorMap;
|
|
16
|
+
exports.setBosswindSelectorMap = setBosswindSelectorMap;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
const
|
|
3
|
-
const
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
+
const require_runtime = require("../../_virtual/_rolldown/runtime.cjs");
|
|
3
|
+
const require_tailwind_theme = require("./tailwind-theme.cjs");
|
|
4
|
+
const require_shared = require("./shared.cjs");
|
|
4
5
|
let ts_deepmerge = require("ts-deepmerge");
|
|
5
|
-
|
|
6
6
|
//#region src/prop/bosswind/server.ts
|
|
7
|
-
var server_exports = /* @__PURE__ */
|
|
7
|
+
var server_exports = /* @__PURE__ */ require_runtime.__exportAll({
|
|
8
8
|
name: () => name,
|
|
9
9
|
onBoot: () => onBoot,
|
|
10
10
|
onPropTree: () => onPropTree,
|
|
@@ -75,6 +75,7 @@ const onBoot = async (api) => {
|
|
|
75
75
|
});
|
|
76
76
|
};
|
|
77
77
|
const onReady = async (api) => {
|
|
78
|
+
require_shared.ensureBosswindSizeBaseVar(api, typeof api.tokens === "function" ? api.tokens({}) : api.tokens);
|
|
78
79
|
const flex = api.dictionary.get("flex");
|
|
79
80
|
if (flex) flex.single = true;
|
|
80
81
|
const grid = api.dictionary.get("grid");
|
|
@@ -94,15 +95,14 @@ const onPropTree = async (api, { tree, parser }) => {
|
|
|
94
95
|
Object.keys(tree).forEach((key) => delete tree[key]);
|
|
95
96
|
Object.assign(tree, next);
|
|
96
97
|
};
|
|
97
|
-
|
|
98
98
|
//#endregion
|
|
99
99
|
exports.name = name;
|
|
100
100
|
exports.onBoot = onBoot;
|
|
101
101
|
exports.onPropTree = onPropTree;
|
|
102
102
|
exports.onReady = onReady;
|
|
103
|
-
Object.defineProperty(exports,
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
});
|
|
103
|
+
Object.defineProperty(exports, "server_exports", {
|
|
104
|
+
enumerable: true,
|
|
105
|
+
get: function() {
|
|
106
|
+
return server_exports;
|
|
107
|
+
}
|
|
108
|
+
});
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import { __exportAll } from "../../_virtual/
|
|
2
|
-
import
|
|
3
|
-
import { bosswindProps, getBosswindDefaults, getBosswindFontSizeKeys, getBosswindMeta, registerBosswindDictionary, rewriteBosswindTree } from "./shared.mjs";
|
|
1
|
+
import { __exportAll } from "../../_virtual/_rolldown/runtime.mjs";
|
|
2
|
+
import theme$1 from "./tailwind-theme.mjs";
|
|
3
|
+
import { bosswindProps, ensureBosswindSizeBaseVar, getBosswindDefaults, getBosswindFontSizeKeys, getBosswindMeta, registerBosswindDictionary, rewriteBosswindTree } from "./shared.mjs";
|
|
4
4
|
import { merge } from "ts-deepmerge";
|
|
5
|
-
|
|
6
5
|
//#region src/prop/bosswind/server.ts
|
|
7
6
|
var server_exports = /* @__PURE__ */ __exportAll({
|
|
8
7
|
name: () => name,
|
|
@@ -12,7 +11,7 @@ var server_exports = /* @__PURE__ */ __exportAll({
|
|
|
12
11
|
});
|
|
13
12
|
const name = "bosswind";
|
|
14
13
|
let needsRuntime = false;
|
|
15
|
-
const theme =
|
|
14
|
+
const theme = theme$1;
|
|
16
15
|
const defaults = getBosswindDefaults(theme);
|
|
17
16
|
const fontSizeKeys = getBosswindFontSizeKeys(theme);
|
|
18
17
|
const bosswindTokens = {
|
|
@@ -75,6 +74,7 @@ const onBoot = async (api) => {
|
|
|
75
74
|
});
|
|
76
75
|
};
|
|
77
76
|
const onReady = async (api) => {
|
|
77
|
+
ensureBosswindSizeBaseVar(api, typeof api.tokens === "function" ? api.tokens({}) : api.tokens);
|
|
78
78
|
const flex = api.dictionary.get("flex");
|
|
79
79
|
if (flex) flex.single = true;
|
|
80
80
|
const grid = api.dictionary.get("grid");
|
|
@@ -94,6 +94,5 @@ const onPropTree = async (api, { tree, parser }) => {
|
|
|
94
94
|
Object.keys(tree).forEach((key) => delete tree[key]);
|
|
95
95
|
Object.assign(tree, next);
|
|
96
96
|
};
|
|
97
|
-
|
|
98
97
|
//#endregion
|
|
99
|
-
export { name, onBoot, onPropTree, onReady, server_exports };
|
|
98
|
+
export { name, onBoot, onPropTree, onReady, server_exports };
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
const
|
|
2
|
-
|
|
1
|
+
const require_normalize = require("../../use/token/normalize.cjs");
|
|
2
|
+
const require_propMap = require("../../use/token/propMap.cjs");
|
|
3
|
+
const require_selectors = require("./selectors.cjs");
|
|
3
4
|
//#region src/prop/bosswind/shared.ts
|
|
4
5
|
const toDashCase = (value) => value.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
|
|
5
6
|
const displayKeywords = new Map([
|
|
@@ -80,6 +81,7 @@ const aliasMap = new Map([
|
|
|
80
81
|
["z", ["zIndex"]],
|
|
81
82
|
["aspect", ["aspectRatio"]]
|
|
82
83
|
]);
|
|
84
|
+
const sizeBaseAliasNames = new Set(Array.from(aliasMap.entries()).filter(([, targets]) => targets.length > 0 && targets.every((target) => require_propMap.getTokenGroupForProp(target) === "size")).map(([name]) => name));
|
|
83
85
|
const textAlias = "text";
|
|
84
86
|
const bgAlias = "bg";
|
|
85
87
|
const borderAlias = "border";
|
|
@@ -141,6 +143,33 @@ const isLengthLike = (value) => {
|
|
|
141
143
|
if (value.startsWith("calc(") || value.startsWith("clamp(") || value.startsWith("min(") || value.startsWith("max(")) return true;
|
|
142
144
|
return /^-?\d+(?:\.\d+)?(px|rem|em|vh|vw|vmin|vmax|ch|ex|%|pt|pc|mm|cm|in)$/.test(value);
|
|
143
145
|
};
|
|
146
|
+
const isScalableBosswindSizeValue = (value) => {
|
|
147
|
+
return typeof value === "number" || typeof value === "string" && isNumericString(value);
|
|
148
|
+
};
|
|
149
|
+
const isBosswindSizeProp = (prop) => require_propMap.getTokenGroupForProp(prop) === "size";
|
|
150
|
+
const shouldScaleBosswindSizeProp = (prop, value) => {
|
|
151
|
+
return isBosswindSizeProp(prop) && isScalableBosswindSizeValue(value);
|
|
152
|
+
};
|
|
153
|
+
const resolveBosswindTokens = (tokens) => {
|
|
154
|
+
if (!tokens || typeof tokens !== "object") return null;
|
|
155
|
+
return require_normalize.normalizeTokens(tokens);
|
|
156
|
+
};
|
|
157
|
+
const getBosswindSizeBaseValue = (tokens) => {
|
|
158
|
+
const sizeGroup = resolveBosswindTokens(tokens)?.size;
|
|
159
|
+
if (!sizeGroup || typeof sizeGroup !== "object" || Array.isArray(sizeGroup)) return null;
|
|
160
|
+
const baseValue = sizeGroup.base;
|
|
161
|
+
return baseValue === void 0 ? null : baseValue;
|
|
162
|
+
};
|
|
163
|
+
const getBosswindSizeBaseVarName = (api) => `--${api.selectorPrefix ?? ""}size-base`;
|
|
164
|
+
const ensureBosswindSizeBaseVar = (api, tokens) => {
|
|
165
|
+
const baseValue = getBosswindSizeBaseValue(tokens);
|
|
166
|
+
if (baseValue === null || baseValue === void 0) return;
|
|
167
|
+
api.css?.addRoot?.(`${getBosswindSizeBaseVarName(api)}: ${api.dictionary.toValue(baseValue)};`);
|
|
168
|
+
};
|
|
169
|
+
const toBosswindSizeBaseCalc = (api, value) => {
|
|
170
|
+
if ((typeof value === "number" ? value : Number(value)) === 0) return 0;
|
|
171
|
+
return `calc(${String(value)} * var(${getBosswindSizeBaseVarName(api)}))`;
|
|
172
|
+
};
|
|
144
173
|
const readTokenGroup = (value) => {
|
|
145
174
|
if (typeof value === "function" && value.IS_TOKEN_FN) {
|
|
146
175
|
const [group, ...rest] = String(value()).replace("$$.token.", "").split(".");
|
|
@@ -769,12 +798,22 @@ const rewriteBosswindTree = (api, tree, config, tokens, parser) => {
|
|
|
769
798
|
usedBosswind = true;
|
|
770
799
|
if (value === null || value === true) return;
|
|
771
800
|
const targets = aliasMap.get(name) || [];
|
|
772
|
-
const
|
|
801
|
+
const shouldScale = sizeBaseAliasNames.has(name) && isScalableBosswindSizeValue(value) && targets.every((target) => isBosswindSizeProp(target));
|
|
802
|
+
const resolvedValue = shouldScale ? toBosswindSizeBaseCalc(api, value) : value;
|
|
803
|
+
if (shouldScale) ensureBosswindSizeBaseVar(api, tokens);
|
|
773
804
|
targets.forEach((target) => {
|
|
774
|
-
|
|
805
|
+
const selectorValue = prop.selectorValue !== void 0 ? prop.selectorValue : value;
|
|
806
|
+
output[target] = shouldScale ? cloneProp(prop, resolvedValue, getSelectorName(name), selectorValue) : cloneProp(prop, resolvedValue, getSelectorName(name));
|
|
775
807
|
});
|
|
776
808
|
return;
|
|
777
809
|
}
|
|
810
|
+
if (shouldScaleBosswindSizeProp(name, value)) {
|
|
811
|
+
usedBosswind = true;
|
|
812
|
+
ensureBosswindSizeBaseVar(api, tokens);
|
|
813
|
+
const selectorValue = prop.selectorValue !== void 0 ? prop.selectorValue : value;
|
|
814
|
+
output[name] = cloneProp(prop, toBosswindSizeBaseCalc(api, value), getSelectorName(name), selectorValue);
|
|
815
|
+
return;
|
|
816
|
+
}
|
|
778
817
|
output[name] = prop;
|
|
779
818
|
});
|
|
780
819
|
return output;
|
|
@@ -924,12 +963,23 @@ const rewriteBosswindInput = (api, input, config) => {
|
|
|
924
963
|
}
|
|
925
964
|
if (aliasMap.has(name)) {
|
|
926
965
|
if (value === null || value === true) return;
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
966
|
+
const targets = aliasMap.get(name) || [];
|
|
967
|
+
const shouldScale = sizeBaseAliasNames.has(name) && isScalableBosswindSizeValue(value) && targets.every((target) => isBosswindSizeProp(target));
|
|
968
|
+
const resolvedValue = shouldScale ? toBosswindSizeBaseCalc(api, value) : value;
|
|
969
|
+
if (shouldScale) ensureBosswindSizeBaseVar(api, api.tokens);
|
|
970
|
+
targets.forEach((target) => {
|
|
971
|
+
output[target] = resolvedValue;
|
|
972
|
+
if (shouldScale) setSelector(target, getSelectorName(name), value);
|
|
973
|
+
else setSelector(target, getSelectorName(name));
|
|
930
974
|
});
|
|
931
975
|
return;
|
|
932
976
|
}
|
|
977
|
+
if (shouldScaleBosswindSizeProp(name, value)) {
|
|
978
|
+
ensureBosswindSizeBaseVar(api, api.tokens);
|
|
979
|
+
output[name] = toBosswindSizeBaseCalc(api, value);
|
|
980
|
+
setSelector(name, getSelectorName(name), value);
|
|
981
|
+
return;
|
|
982
|
+
}
|
|
933
983
|
output[name] = value;
|
|
934
984
|
});
|
|
935
985
|
require_selectors.setBosswindSelectorMap(output, selectorMap);
|
|
@@ -949,12 +999,12 @@ const getBosswindFontSizeKeys = (theme) => {
|
|
|
949
999
|
const fontSize = theme.fontSize;
|
|
950
1000
|
return fontSize ? Object.keys(fontSize) : [];
|
|
951
1001
|
};
|
|
952
|
-
|
|
953
1002
|
//#endregion
|
|
954
1003
|
exports.bosswindProps = bosswindProps;
|
|
1004
|
+
exports.ensureBosswindSizeBaseVar = ensureBosswindSizeBaseVar;
|
|
955
1005
|
exports.getBosswindDefaults = getBosswindDefaults;
|
|
956
1006
|
exports.getBosswindFontSizeKeys = getBosswindFontSizeKeys;
|
|
957
1007
|
exports.getBosswindMeta = getBosswindMeta;
|
|
958
1008
|
exports.registerBosswindDictionary = registerBosswindDictionary;
|
|
959
1009
|
exports.rewriteBosswindInput = rewriteBosswindInput;
|
|
960
|
-
exports.rewriteBosswindTree = rewriteBosswindTree;
|
|
1010
|
+
exports.rewriteBosswindTree = rewriteBosswindTree;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
import { normalizeTokens } from "../../use/token/normalize.mjs";
|
|
2
|
+
import { getTokenGroupForProp } from "../../use/token/propMap.mjs";
|
|
1
3
|
import { setBosswindSelectorMap } from "./selectors.mjs";
|
|
2
|
-
|
|
3
4
|
//#region src/prop/bosswind/shared.ts
|
|
4
5
|
const toDashCase = (value) => value.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
|
|
5
6
|
const displayKeywords = new Map([
|
|
@@ -80,6 +81,7 @@ const aliasMap = new Map([
|
|
|
80
81
|
["z", ["zIndex"]],
|
|
81
82
|
["aspect", ["aspectRatio"]]
|
|
82
83
|
]);
|
|
84
|
+
const sizeBaseAliasNames = new Set(Array.from(aliasMap.entries()).filter(([, targets]) => targets.length > 0 && targets.every((target) => getTokenGroupForProp(target) === "size")).map(([name]) => name));
|
|
83
85
|
const textAlias = "text";
|
|
84
86
|
const bgAlias = "bg";
|
|
85
87
|
const borderAlias = "border";
|
|
@@ -141,6 +143,33 @@ const isLengthLike = (value) => {
|
|
|
141
143
|
if (value.startsWith("calc(") || value.startsWith("clamp(") || value.startsWith("min(") || value.startsWith("max(")) return true;
|
|
142
144
|
return /^-?\d+(?:\.\d+)?(px|rem|em|vh|vw|vmin|vmax|ch|ex|%|pt|pc|mm|cm|in)$/.test(value);
|
|
143
145
|
};
|
|
146
|
+
const isScalableBosswindSizeValue = (value) => {
|
|
147
|
+
return typeof value === "number" || typeof value === "string" && isNumericString(value);
|
|
148
|
+
};
|
|
149
|
+
const isBosswindSizeProp = (prop) => getTokenGroupForProp(prop) === "size";
|
|
150
|
+
const shouldScaleBosswindSizeProp = (prop, value) => {
|
|
151
|
+
return isBosswindSizeProp(prop) && isScalableBosswindSizeValue(value);
|
|
152
|
+
};
|
|
153
|
+
const resolveBosswindTokens = (tokens) => {
|
|
154
|
+
if (!tokens || typeof tokens !== "object") return null;
|
|
155
|
+
return normalizeTokens(tokens);
|
|
156
|
+
};
|
|
157
|
+
const getBosswindSizeBaseValue = (tokens) => {
|
|
158
|
+
const sizeGroup = resolveBosswindTokens(tokens)?.size;
|
|
159
|
+
if (!sizeGroup || typeof sizeGroup !== "object" || Array.isArray(sizeGroup)) return null;
|
|
160
|
+
const baseValue = sizeGroup.base;
|
|
161
|
+
return baseValue === void 0 ? null : baseValue;
|
|
162
|
+
};
|
|
163
|
+
const getBosswindSizeBaseVarName = (api) => `--${api.selectorPrefix ?? ""}size-base`;
|
|
164
|
+
const ensureBosswindSizeBaseVar = (api, tokens) => {
|
|
165
|
+
const baseValue = getBosswindSizeBaseValue(tokens);
|
|
166
|
+
if (baseValue === null || baseValue === void 0) return;
|
|
167
|
+
api.css?.addRoot?.(`${getBosswindSizeBaseVarName(api)}: ${api.dictionary.toValue(baseValue)};`);
|
|
168
|
+
};
|
|
169
|
+
const toBosswindSizeBaseCalc = (api, value) => {
|
|
170
|
+
if ((typeof value === "number" ? value : Number(value)) === 0) return 0;
|
|
171
|
+
return `calc(${String(value)} * var(${getBosswindSizeBaseVarName(api)}))`;
|
|
172
|
+
};
|
|
144
173
|
const readTokenGroup = (value) => {
|
|
145
174
|
if (typeof value === "function" && value.IS_TOKEN_FN) {
|
|
146
175
|
const [group, ...rest] = String(value()).replace("$$.token.", "").split(".");
|
|
@@ -769,12 +798,22 @@ const rewriteBosswindTree = (api, tree, config, tokens, parser) => {
|
|
|
769
798
|
usedBosswind = true;
|
|
770
799
|
if (value === null || value === true) return;
|
|
771
800
|
const targets = aliasMap.get(name) || [];
|
|
772
|
-
const
|
|
801
|
+
const shouldScale = sizeBaseAliasNames.has(name) && isScalableBosswindSizeValue(value) && targets.every((target) => isBosswindSizeProp(target));
|
|
802
|
+
const resolvedValue = shouldScale ? toBosswindSizeBaseCalc(api, value) : value;
|
|
803
|
+
if (shouldScale) ensureBosswindSizeBaseVar(api, tokens);
|
|
773
804
|
targets.forEach((target) => {
|
|
774
|
-
|
|
805
|
+
const selectorValue = prop.selectorValue !== void 0 ? prop.selectorValue : value;
|
|
806
|
+
output[target] = shouldScale ? cloneProp(prop, resolvedValue, getSelectorName(name), selectorValue) : cloneProp(prop, resolvedValue, getSelectorName(name));
|
|
775
807
|
});
|
|
776
808
|
return;
|
|
777
809
|
}
|
|
810
|
+
if (shouldScaleBosswindSizeProp(name, value)) {
|
|
811
|
+
usedBosswind = true;
|
|
812
|
+
ensureBosswindSizeBaseVar(api, tokens);
|
|
813
|
+
const selectorValue = prop.selectorValue !== void 0 ? prop.selectorValue : value;
|
|
814
|
+
output[name] = cloneProp(prop, toBosswindSizeBaseCalc(api, value), getSelectorName(name), selectorValue);
|
|
815
|
+
return;
|
|
816
|
+
}
|
|
778
817
|
output[name] = prop;
|
|
779
818
|
});
|
|
780
819
|
return output;
|
|
@@ -924,12 +963,23 @@ const rewriteBosswindInput = (api, input, config) => {
|
|
|
924
963
|
}
|
|
925
964
|
if (aliasMap.has(name)) {
|
|
926
965
|
if (value === null || value === true) return;
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
966
|
+
const targets = aliasMap.get(name) || [];
|
|
967
|
+
const shouldScale = sizeBaseAliasNames.has(name) && isScalableBosswindSizeValue(value) && targets.every((target) => isBosswindSizeProp(target));
|
|
968
|
+
const resolvedValue = shouldScale ? toBosswindSizeBaseCalc(api, value) : value;
|
|
969
|
+
if (shouldScale) ensureBosswindSizeBaseVar(api, api.tokens);
|
|
970
|
+
targets.forEach((target) => {
|
|
971
|
+
output[target] = resolvedValue;
|
|
972
|
+
if (shouldScale) setSelector(target, getSelectorName(name), value);
|
|
973
|
+
else setSelector(target, getSelectorName(name));
|
|
930
974
|
});
|
|
931
975
|
return;
|
|
932
976
|
}
|
|
977
|
+
if (shouldScaleBosswindSizeProp(name, value)) {
|
|
978
|
+
ensureBosswindSizeBaseVar(api, api.tokens);
|
|
979
|
+
output[name] = toBosswindSizeBaseCalc(api, value);
|
|
980
|
+
setSelector(name, getSelectorName(name), value);
|
|
981
|
+
return;
|
|
982
|
+
}
|
|
933
983
|
output[name] = value;
|
|
934
984
|
});
|
|
935
985
|
setBosswindSelectorMap(output, selectorMap);
|
|
@@ -949,6 +999,5 @@ const getBosswindFontSizeKeys = (theme) => {
|
|
|
949
999
|
const fontSize = theme.fontSize;
|
|
950
1000
|
return fontSize ? Object.keys(fontSize) : [];
|
|
951
1001
|
};
|
|
952
|
-
|
|
953
1002
|
//#endregion
|
|
954
|
-
export { bosswindProps, getBosswindDefaults, getBosswindFontSizeKeys, getBosswindMeta, registerBosswindDictionary, rewriteBosswindInput, rewriteBosswindTree };
|
|
1003
|
+
export { bosswindProps, ensureBosswindSizeBaseVar, getBosswindDefaults, getBosswindFontSizeKeys, getBosswindMeta, registerBosswindDictionary, rewriteBosswindInput, rewriteBosswindTree };
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
|
|
2
1
|
//#region src/prop/bosswind/tailwind-theme.ts
|
|
3
2
|
const theme = {
|
|
4
3
|
animation: {
|
|
@@ -270,41 +269,8 @@ const theme = {
|
|
|
270
269
|
"in-out": "cubic-bezier(0.4, 0, 0.2, 1)"
|
|
271
270
|
},
|
|
272
271
|
size: {
|
|
273
|
-
|
|
274
|
-
"1": 3,
|
|
275
|
-
"2": 6,
|
|
276
|
-
"3": 9,
|
|
277
|
-
"4": 12,
|
|
278
|
-
"5": 15,
|
|
279
|
-
"6": 18,
|
|
280
|
-
"7": 21,
|
|
281
|
-
"8": 24,
|
|
282
|
-
"9": 27,
|
|
283
|
-
"10": 30,
|
|
284
|
-
"11": 33,
|
|
285
|
-
"12": 36,
|
|
286
|
-
"14": 42,
|
|
287
|
-
"16": 48,
|
|
288
|
-
"20": 60,
|
|
289
|
-
"24": 72,
|
|
290
|
-
"28": 84,
|
|
291
|
-
"32": 96,
|
|
292
|
-
"36": 108,
|
|
293
|
-
"40": 120,
|
|
294
|
-
"44": 132,
|
|
295
|
-
"48": 144,
|
|
296
|
-
"52": 156,
|
|
297
|
-
"56": 168,
|
|
298
|
-
"60": 180,
|
|
299
|
-
"64": 192,
|
|
300
|
-
"72": 216,
|
|
301
|
-
"80": 240,
|
|
302
|
-
"96": 288,
|
|
272
|
+
base: 3,
|
|
303
273
|
px: 1,
|
|
304
|
-
"0.5": 1.5,
|
|
305
|
-
"1.5": 4.5,
|
|
306
|
-
"2.5": 7.5,
|
|
307
|
-
"3.5": 10.5,
|
|
308
274
|
"1/2": "50%",
|
|
309
275
|
"1/3": "33.333333%",
|
|
310
276
|
"2/3": "66.666667%",
|
|
@@ -697,7 +663,5 @@ const theme = {
|
|
|
697
663
|
fr: "minmax(0, 1fr)"
|
|
698
664
|
}
|
|
699
665
|
};
|
|
700
|
-
var tailwind_theme_default = theme;
|
|
701
|
-
|
|
702
666
|
//#endregion
|
|
703
|
-
exports.default =
|
|
667
|
+
exports.default = theme;
|
|
@@ -269,41 +269,8 @@ const theme = {
|
|
|
269
269
|
"in-out": "cubic-bezier(0.4, 0, 0.2, 1)"
|
|
270
270
|
},
|
|
271
271
|
size: {
|
|
272
|
-
|
|
273
|
-
"1": 3,
|
|
274
|
-
"2": 6,
|
|
275
|
-
"3": 9,
|
|
276
|
-
"4": 12,
|
|
277
|
-
"5": 15,
|
|
278
|
-
"6": 18,
|
|
279
|
-
"7": 21,
|
|
280
|
-
"8": 24,
|
|
281
|
-
"9": 27,
|
|
282
|
-
"10": 30,
|
|
283
|
-
"11": 33,
|
|
284
|
-
"12": 36,
|
|
285
|
-
"14": 42,
|
|
286
|
-
"16": 48,
|
|
287
|
-
"20": 60,
|
|
288
|
-
"24": 72,
|
|
289
|
-
"28": 84,
|
|
290
|
-
"32": 96,
|
|
291
|
-
"36": 108,
|
|
292
|
-
"40": 120,
|
|
293
|
-
"44": 132,
|
|
294
|
-
"48": 144,
|
|
295
|
-
"52": 156,
|
|
296
|
-
"56": 168,
|
|
297
|
-
"60": 180,
|
|
298
|
-
"64": 192,
|
|
299
|
-
"72": 216,
|
|
300
|
-
"80": 240,
|
|
301
|
-
"96": 288,
|
|
272
|
+
base: 3,
|
|
302
273
|
px: 1,
|
|
303
|
-
"0.5": 1.5,
|
|
304
|
-
"1.5": 4.5,
|
|
305
|
-
"2.5": 7.5,
|
|
306
|
-
"3.5": 10.5,
|
|
307
274
|
"1/2": "50%",
|
|
308
275
|
"1/3": "33.333333%",
|
|
309
276
|
"2/3": "66.666667%",
|
|
@@ -696,7 +663,5 @@ const theme = {
|
|
|
696
663
|
fr: "minmax(0, 1fr)"
|
|
697
664
|
}
|
|
698
665
|
};
|
|
699
|
-
var tailwind_theme_default = theme;
|
|
700
|
-
|
|
701
666
|
//#endregion
|
|
702
|
-
export {
|
|
667
|
+
export { theme as default };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
2
|
//#region src/prop/child/runtime-only.ts
|
|
3
3
|
const name = "child";
|
|
4
4
|
const createChildContext = (selector) => {
|
|
@@ -11,8 +11,7 @@ const onInit = (api) => {
|
|
|
11
11
|
description: "Arbitrary selector nesting"
|
|
12
12
|
});
|
|
13
13
|
};
|
|
14
|
-
|
|
15
14
|
//#endregion
|
|
16
15
|
exports.createChildContext = createChildContext;
|
|
17
16
|
exports.name = name;
|
|
18
|
-
exports.onInit = onInit;
|
|
17
|
+
exports.onInit = onInit;
|