boss-css 0.0.1 → 0.0.2
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/README.md +1 -0
- package/dist/_virtual/rolldown_runtime.cjs +43 -0
- package/dist/_virtual/rolldown_runtime.mjs +20 -0
- package/dist/api/browser.cjs +54 -0
- package/dist/api/browser.mjs +48 -0
- package/dist/api/config.cjs +94 -0
- package/dist/api/config.mjs +91 -0
- package/dist/api/css.cjs +304 -0
- package/dist/api/css.mjs +303 -0
- package/dist/api/dictionary.cjs +218 -0
- package/dist/api/dictionary.mjs +215 -0
- package/dist/api/file/dts.cjs +21 -0
- package/dist/api/file/dts.mjs +21 -0
- package/dist/api/file/file.cjs +123 -0
- package/dist/api/file/file.mjs +120 -0
- package/dist/api/file/js.cjs +118 -0
- package/dist/api/file/js.mjs +116 -0
- package/dist/api/names.cjs +52 -0
- package/dist/api/names.mjs +46 -0
- package/dist/api/noopCss.cjs +37 -0
- package/dist/api/noopCss.mjs +36 -0
- package/dist/api/propTree.cjs +54 -0
- package/dist/api/propTree.mjs +48 -0
- package/dist/api/server.cjs +112 -0
- package/dist/api/server.mjs +106 -0
- package/dist/cli/build.cjs +1 -0
- package/dist/cli/build.mjs +3 -0
- package/dist/cli/index.cjs +30 -0
- package/dist/cli/index.mjs +29 -0
- package/dist/cli/tasks/build.cjs +24 -0
- package/dist/cli/tasks/build.mjs +23 -0
- package/dist/cli/tasks/choose.cjs +47 -0
- package/dist/cli/tasks/choose.mjs +46 -0
- package/dist/cli/tasks/compile.cjs +68 -0
- package/dist/cli/tasks/compile.mjs +67 -0
- package/dist/cli/tasks/dev.cjs +51 -0
- package/dist/cli/tasks/dev.mjs +48 -0
- package/dist/cli/tasks/init.cjs +1835 -0
- package/dist/cli/tasks/init.mjs +1831 -0
- package/dist/cli/tasks/watch.cjs +38 -0
- package/dist/cli/tasks/watch.mjs +37 -0
- package/dist/cli/templates/init.cjs +82 -0
- package/dist/cli/templates/init.mjs +78 -0
- package/dist/cli/types.cjs +13 -0
- package/dist/cli/types.mjs +13 -0
- package/dist/cli/utils.cjs +43 -0
- package/dist/cli/utils.mjs +41 -0
- package/dist/compile/classname-strategy.cjs +79 -0
- package/dist/compile/classname-strategy.mjs +77 -0
- package/dist/compile/classname.cjs +366 -0
- package/dist/compile/classname.mjs +360 -0
- package/dist/compile/index.cjs +238 -0
- package/dist/compile/index.mjs +235 -0
- package/dist/compile/jsx.cjs +803 -0
- package/dist/compile/jsx.mjs +800 -0
- package/dist/compile/prepared.cjs +88 -0
- package/dist/compile/prepared.mjs +87 -0
- package/dist/compile/runtime.cjs +33 -0
- package/dist/compile/runtime.mjs +32 -0
- package/dist/compile/transform.cjs +371 -0
- package/dist/compile/transform.mjs +369 -0
- package/dist/cx/index.cjs +93 -0
- package/dist/cx/index.mjs +85 -0
- package/dist/detect-fw/index.cjs +384 -0
- package/dist/detect-fw/index.mjs +379 -0
- package/dist/dev/client.cjs +39 -0
- package/dist/dev/client.mjs +38 -0
- package/dist/dev/plugin/browser.cjs +11 -0
- package/dist/dev/plugin/browser.mjs +9 -0
- package/dist/dev/plugin/server.cjs +86 -0
- package/dist/dev/plugin/server.mjs +78 -0
- package/dist/dev/port.cjs +46 -0
- package/dist/dev/port.mjs +43 -0
- package/dist/dev/runtime.cjs +28 -0
- package/dist/dev/runtime.mjs +29 -0
- package/dist/dev/server.cjs +808 -0
- package/dist/dev/server.mjs +805 -0
- package/dist/dev/shared.cjs +6 -0
- package/dist/dev/shared.mjs +5 -0
- package/dist/eslint-plugin/index.cjs +66 -0
- package/dist/eslint-plugin/index.mjs +66 -0
- package/dist/eslint-plugin/rules/classnames-only.cjs +68 -0
- package/dist/eslint-plugin/rules/classnames-only.mjs +68 -0
- package/dist/eslint-plugin/rules/format-classnames.cjs +137 -0
- package/dist/eslint-plugin/rules/format-classnames.mjs +136 -0
- package/dist/eslint-plugin/rules/no-unknown-classes.cjs +119 -0
- package/dist/eslint-plugin/rules/no-unknown-classes.mjs +119 -0
- package/dist/eslint-plugin/rules/prefer-classnames.cjs +69 -0
- package/dist/eslint-plugin/rules/prefer-classnames.mjs +69 -0
- package/dist/eslint-plugin/rules/prefer-token-values.cjs +197 -0
- package/dist/eslint-plugin/rules/prefer-token-values.mjs +197 -0
- package/dist/eslint-plugin/rules/props-only.cjs +115 -0
- package/dist/eslint-plugin/rules/props-only.mjs +115 -0
- package/dist/eslint-plugin/rules/redundant-cx.cjs +66 -0
- package/dist/eslint-plugin/rules/redundant-cx.mjs +66 -0
- package/dist/eslint-plugin/rules/require-prop-functions.cjs +130 -0
- package/dist/eslint-plugin/rules/require-prop-functions.mjs +130 -0
- package/dist/eslint-plugin/utils/api.cjs +30 -0
- package/dist/eslint-plugin/utils/api.mjs +29 -0
- package/dist/eslint-plugin/utils/ast.cjs +119 -0
- package/dist/eslint-plugin/utils/ast.mjs +112 -0
- package/dist/eslint-plugin/utils/boss-classes.cjs +185 -0
- package/dist/eslint-plugin/utils/boss-classes.mjs +175 -0
- package/dist/eslint-plugin/utils/defaults.cjs +99 -0
- package/dist/eslint-plugin/utils/defaults.mjs +93 -0
- package/dist/eslint-plugin/utils/format.cjs +20 -0
- package/dist/eslint-plugin/utils/format.mjs +19 -0
- package/dist/eslint-plugin/utils/order.cjs +76 -0
- package/dist/eslint-plugin/utils/order.mjs +76 -0
- package/dist/eslint-plugin/utils/property-order.cjs +449 -0
- package/dist/eslint-plugin/utils/property-order.mjs +448 -0
- package/dist/eslint-plugin/utils/static.cjs +36 -0
- package/dist/eslint-plugin/utils/static.mjs +35 -0
- package/dist/fontsource/directory.cjs +39588 -0
- package/dist/fontsource/directory.mjs +39587 -0
- package/dist/fontsource/server.cjs +291 -0
- package/dist/fontsource/server.mjs +282 -0
- package/dist/index.cjs +10 -0
- package/dist/index.mjs +6 -0
- package/dist/log/browser.cjs +28 -0
- package/dist/log/browser.mjs +28 -0
- package/dist/log/server.cjs +32 -0
- package/dist/log/server.mjs +30 -0
- package/dist/merge/index.cjs +590 -0
- package/dist/merge/index.mjs +586 -0
- package/dist/native/browser.cjs +78 -0
- package/dist/native/browser.mjs +77 -0
- package/dist/native/server.cjs +180 -0
- package/dist/native/server.mjs +176 -0
- package/dist/native/styleTypes.cjs +168 -0
- package/dist/native/styleTypes.mjs +164 -0
- package/dist/parser/classname/server.cjs +239 -0
- package/dist/parser/classname/server.mjs +232 -0
- package/dist/parser/jsx/browser.cjs +66 -0
- package/dist/parser/jsx/browser.mjs +63 -0
- package/dist/parser/jsx/extractCode.cjs +99 -0
- package/dist/parser/jsx/extractCode.mjs +98 -0
- package/dist/parser/jsx/extractPrepared.cjs +123 -0
- package/dist/parser/jsx/extractPrepared.mjs +122 -0
- package/dist/parser/jsx/extractProps.cjs +234 -0
- package/dist/parser/jsx/extractProps.mjs +232 -0
- package/dist/parser/jsx/isDOMProp.cjs +17 -0
- package/dist/parser/jsx/isDOMProp.mjs +15 -0
- package/dist/parser/jsx/native.cjs +110 -0
- package/dist/parser/jsx/native.mjs +108 -0
- package/dist/parser/jsx/runtime.cjs +4 -0
- package/dist/parser/jsx/runtime.mjs +3 -0
- package/dist/parser/jsx/server.cjs +278 -0
- package/dist/parser/jsx/server.mjs +268 -0
- package/dist/postcss/index.cjs +16 -0
- package/dist/postcss/index.mjs +16 -0
- package/dist/prop/at/runtime-only.cjs +90 -0
- package/dist/prop/at/runtime-only.mjs +88 -0
- package/dist/prop/at/server.cjs +282 -0
- package/dist/prop/at/server.mjs +268 -0
- package/dist/prop/at/shared.cjs +153 -0
- package/dist/prop/at/shared.mjs +144 -0
- package/dist/prop/bosswind/browser.cjs +18 -0
- package/dist/prop/bosswind/browser.mjs +16 -0
- package/dist/prop/bosswind/runtime-only.cjs +18 -0
- package/dist/prop/bosswind/runtime-only.mjs +16 -0
- package/dist/prop/bosswind/server.cjs +81 -0
- package/dist/prop/bosswind/server.mjs +72 -0
- package/dist/prop/bosswind/shared.cjs +861 -0
- package/dist/prop/bosswind/shared.mjs +855 -0
- package/dist/prop/bosswind/tailwind-theme.cjs +703 -0
- package/dist/prop/bosswind/tailwind-theme.mjs +702 -0
- package/dist/prop/child/runtime-only.cjs +18 -0
- package/dist/prop/child/runtime-only.mjs +15 -0
- package/dist/prop/child/server.cjs +81 -0
- package/dist/prop/child/server.mjs +72 -0
- package/dist/prop/css/getDtsTemplate.cjs +65 -0
- package/dist/prop/css/getDtsTemplate.mjs +63 -0
- package/dist/prop/css/runtime-only.cjs +14 -0
- package/dist/prop/css/runtime-only.mjs +13 -0
- package/dist/prop/css/server.cjs +99 -0
- package/dist/prop/css/server.mjs +90 -0
- package/dist/prop/pseudo/runtime-only.cjs +23 -0
- package/dist/prop/pseudo/runtime-only.mjs +21 -0
- package/dist/prop/pseudo/server.cjs +91 -0
- package/dist/prop/pseudo/server.mjs +82 -0
- package/dist/prop/pseudo/shared.cjs +61 -0
- package/dist/prop/pseudo/shared.mjs +60 -0
- package/dist/reset/server.cjs +34 -0
- package/dist/reset/server.mjs +26 -0
- package/dist/runtime/index.cjs +119 -0
- package/dist/runtime/index.mjs +118 -0
- package/dist/runtime/preact.cjs +4 -0
- package/dist/runtime/preact.mjs +3 -0
- package/dist/runtime/qwik.cjs +21 -0
- package/dist/runtime/qwik.mjs +18 -0
- package/dist/runtime/react.cjs +4 -0
- package/dist/runtime/react.mjs +3 -0
- package/dist/runtime/solid.cjs +15 -0
- package/dist/runtime/solid.mjs +14 -0
- package/dist/runtime/stencil.cjs +25 -0
- package/dist/runtime/stencil.mjs +21 -0
- package/dist/runtime/style.cjs +14 -0
- package/dist/runtime/style.mjs +13 -0
- package/dist/shared/boundaries.cjs +288 -0
- package/dist/shared/boundaries.mjs +285 -0
- package/dist/shared/customCss.cjs +212 -0
- package/dist/shared/customCss.mjs +211 -0
- package/dist/shared/debug.cjs +76 -0
- package/dist/shared/debug.mjs +74 -0
- package/dist/shared/file.cjs +21 -0
- package/dist/shared/file.mjs +19 -0
- package/dist/shared/framework.cjs +10 -0
- package/dist/shared/framework.mjs +9 -0
- package/dist/shared/json.cjs +58 -0
- package/dist/shared/json.mjs +57 -0
- package/dist/shared/types.cjs +11 -0
- package/dist/shared/types.mjs +10 -0
- package/dist/strategy/classic/runtime-only.cjs +190 -0
- package/dist/strategy/classic/runtime-only.mjs +186 -0
- package/dist/strategy/classname-first/runtime-only.cjs +138 -0
- package/dist/strategy/classname-first/runtime-only.mjs +134 -0
- package/dist/strategy/classname-first/server.cjs +139 -0
- package/dist/strategy/classname-first/server.mjs +133 -0
- package/dist/strategy/classname-only/server.cjs +43 -0
- package/dist/strategy/classname-only/server.mjs +35 -0
- package/dist/strategy/inline-first/browser.cjs +61 -0
- package/dist/strategy/inline-first/browser.mjs +58 -0
- package/dist/strategy/inline-first/runtime-only.cjs +159 -0
- package/dist/strategy/inline-first/runtime-only.mjs +155 -0
- package/dist/strategy/inline-first/server.cjs +92 -0
- package/dist/strategy/inline-first/server.mjs +83 -0
- package/dist/strategy/runtime/runtime-only.cjs +24 -0
- package/dist/strategy/runtime/runtime-only.mjs +22 -0
- package/dist/strategy/runtime/server.cjs +72 -0
- package/dist/strategy/runtime/server.mjs +63 -0
- package/dist/strategy/runtime-only/css.cjs +183 -0
- package/dist/strategy/runtime-only/css.mjs +181 -0
- package/dist/tasks/build.cjs +88 -0
- package/dist/tasks/build.mjs +84 -0
- package/dist/tasks/compile.cjs +12 -0
- package/dist/tasks/compile.mjs +12 -0
- package/dist/tasks/postcss.cjs +116 -0
- package/dist/tasks/postcss.mjs +113 -0
- package/dist/tasks/session.cjs +46 -0
- package/dist/tasks/session.mjs +42 -0
- package/dist/tasks/watch.cjs +102 -0
- package/dist/tasks/watch.mjs +99 -0
- package/dist/transform/cache.cjs +24 -0
- package/dist/transform/cache.mjs +21 -0
- package/dist/transform/processFile.cjs +26 -0
- package/dist/transform/processFile.mjs +24 -0
- package/dist/use/token/browser.cjs +65 -0
- package/dist/use/token/browser.mjs +61 -0
- package/dist/use/token/runtime-only.cjs +245 -0
- package/dist/use/token/runtime-only.mjs +239 -0
- package/dist/use/token/server.cjs +325 -0
- package/dist/use/token/server.mjs +313 -0
- package/dist/use/token/vars.cjs +47 -0
- package/dist/use/token/vars.mjs +46 -0
- package/package.json +300 -4
- package/src/api/config.d.ts +1 -0
- package/src/fontsource/types.d.ts +50 -0
- package/src/packages/document-create-element/createElement.browser.js +3 -0
- package/src/packages/document-create-element/createElement.js +7 -0
- package/src/packages/document-create-element/package.json +17 -0
- package/src/packages/is-css-prop/browser.js +13 -0
- package/src/packages/is-css-prop/index.js +13 -0
- package/src/packages/is-css-prop/package-lock.json +52 -0
- package/src/packages/is-css-prop/package.json +17 -0
- package/src/prop/css/csstype.json +4387 -0
- package/src/prop/css/package.json +3 -0
- package/src/reset/reset.css +259 -0
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
const require_rolldown_runtime = require('../../_virtual/rolldown_runtime.cjs');
|
|
2
|
+
const require_tailwind_theme = require('./tailwind-theme.cjs');
|
|
3
|
+
const require_shared = require('./shared.cjs');
|
|
4
|
+
let ts_deepmerge = require("ts-deepmerge");
|
|
5
|
+
|
|
6
|
+
//#region src/prop/bosswind/server.ts
|
|
7
|
+
var server_exports = /* @__PURE__ */ require_rolldown_runtime.__exportAll({
|
|
8
|
+
name: () => name,
|
|
9
|
+
onBoot: () => onBoot,
|
|
10
|
+
onPropTree: () => onPropTree,
|
|
11
|
+
onReady: () => onReady
|
|
12
|
+
});
|
|
13
|
+
const name = "bosswind";
|
|
14
|
+
let needsRuntime = false;
|
|
15
|
+
const theme = require_tailwind_theme.default;
|
|
16
|
+
const defaults = require_shared.getBosswindDefaults(theme);
|
|
17
|
+
const fontSizeKeys = require_shared.getBosswindFontSizeKeys(theme);
|
|
18
|
+
const bosswindTokens = {
|
|
19
|
+
...theme,
|
|
20
|
+
color: theme.color ?? theme.colors
|
|
21
|
+
};
|
|
22
|
+
const onBoot = async (api) => {
|
|
23
|
+
const existing = api.tokens;
|
|
24
|
+
if (typeof existing === "function") api.tokens = (valueMap) => (0, ts_deepmerge.merge)(bosswindTokens, existing(valueMap) ?? {});
|
|
25
|
+
else api.tokens = (0, ts_deepmerge.merge)(bosswindTokens, existing ?? {});
|
|
26
|
+
require_shared.registerBosswindDictionary(api);
|
|
27
|
+
const runtimeConfig = api.runtime;
|
|
28
|
+
const runtimeModule = Boolean(runtimeConfig && (runtimeConfig.only !== void 0 || runtimeConfig.strategy)) ? "boss-css/prop/bosswind/runtime-only" : "boss-css/prop/bosswind/browser";
|
|
29
|
+
const shouldEmitRuntime = () => needsRuntime;
|
|
30
|
+
api.file.js.importAndConfig({
|
|
31
|
+
name: "onInit",
|
|
32
|
+
from: runtimeModule
|
|
33
|
+
}, shouldEmitRuntime);
|
|
34
|
+
api.file.js.importAndConfig({
|
|
35
|
+
name: "onBrowserObjectStart",
|
|
36
|
+
from: runtimeModule
|
|
37
|
+
}, shouldEmitRuntime);
|
|
38
|
+
api.file.js.config({
|
|
39
|
+
from: runtimeModule,
|
|
40
|
+
config: { bosswind: {
|
|
41
|
+
defaults,
|
|
42
|
+
fontSizeKeys
|
|
43
|
+
} }
|
|
44
|
+
}, shouldEmitRuntime);
|
|
45
|
+
api.file.js.dts.set("body", "bosswind:PropsStart", "export interface $$BosswindProps {");
|
|
46
|
+
for (const entry of require_shared.bosswindProps) api.file.js.dts.set("body", `bosswind:${entry.name}:description`, entry.description).set("body", `bosswind:${entry.name}:declaration`, ` ${entry.name}?: $$PropValues | undefined\n`);
|
|
47
|
+
api.file.js.dts.set("body", "bosswind:PropsEnd", "}");
|
|
48
|
+
api.file.js.dts.replace("body", "$$:FinalProps", (value) => `${value} & $$BosswindProps`);
|
|
49
|
+
};
|
|
50
|
+
const onReady = async (api) => {
|
|
51
|
+
const flex = api.dictionary.get("flex");
|
|
52
|
+
if (flex) flex.single = true;
|
|
53
|
+
const grid = api.dictionary.get("grid");
|
|
54
|
+
if (grid) grid.single = true;
|
|
55
|
+
const border = api.dictionary.get("border");
|
|
56
|
+
if (border) border.single = true;
|
|
57
|
+
const flexWrap = api.dictionary.get("flexWrap");
|
|
58
|
+
if (flexWrap) flexWrap.single = true;
|
|
59
|
+
};
|
|
60
|
+
const onPropTree = async (api, { tree, parser }) => {
|
|
61
|
+
const resolvedTokens = typeof api.tokens === "function" ? api.tokens({}) : api.tokens;
|
|
62
|
+
const { tree: next, usedBosswind, usedText } = require_shared.rewriteBosswindTree(api, tree, {
|
|
63
|
+
defaults,
|
|
64
|
+
fontSizeKeys
|
|
65
|
+
}, resolvedTokens);
|
|
66
|
+
if (usedBosswind && parser === "jsx") needsRuntime = true;
|
|
67
|
+
Object.keys(tree).forEach((key) => delete tree[key]);
|
|
68
|
+
Object.assign(tree, next);
|
|
69
|
+
};
|
|
70
|
+
|
|
71
|
+
//#endregion
|
|
72
|
+
exports.name = name;
|
|
73
|
+
exports.onBoot = onBoot;
|
|
74
|
+
exports.onPropTree = onPropTree;
|
|
75
|
+
exports.onReady = onReady;
|
|
76
|
+
Object.defineProperty(exports, 'server_exports', {
|
|
77
|
+
enumerable: true,
|
|
78
|
+
get: function () {
|
|
79
|
+
return server_exports;
|
|
80
|
+
}
|
|
81
|
+
});
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { __exportAll } from "../../_virtual/rolldown_runtime.mjs";
|
|
2
|
+
import tailwind_theme_default from "./tailwind-theme.mjs";
|
|
3
|
+
import { bosswindProps, getBosswindDefaults, getBosswindFontSizeKeys, registerBosswindDictionary, rewriteBosswindTree } from "./shared.mjs";
|
|
4
|
+
import { merge } from "ts-deepmerge";
|
|
5
|
+
|
|
6
|
+
//#region src/prop/bosswind/server.ts
|
|
7
|
+
var server_exports = /* @__PURE__ */ __exportAll({
|
|
8
|
+
name: () => name,
|
|
9
|
+
onBoot: () => onBoot,
|
|
10
|
+
onPropTree: () => onPropTree,
|
|
11
|
+
onReady: () => onReady
|
|
12
|
+
});
|
|
13
|
+
const name = "bosswind";
|
|
14
|
+
let needsRuntime = false;
|
|
15
|
+
const theme = tailwind_theme_default;
|
|
16
|
+
const defaults = getBosswindDefaults(theme);
|
|
17
|
+
const fontSizeKeys = getBosswindFontSizeKeys(theme);
|
|
18
|
+
const bosswindTokens = {
|
|
19
|
+
...theme,
|
|
20
|
+
color: theme.color ?? theme.colors
|
|
21
|
+
};
|
|
22
|
+
const onBoot = async (api) => {
|
|
23
|
+
const existing = api.tokens;
|
|
24
|
+
if (typeof existing === "function") api.tokens = (valueMap) => merge(bosswindTokens, existing(valueMap) ?? {});
|
|
25
|
+
else api.tokens = merge(bosswindTokens, existing ?? {});
|
|
26
|
+
registerBosswindDictionary(api);
|
|
27
|
+
const runtimeConfig = api.runtime;
|
|
28
|
+
const runtimeModule = Boolean(runtimeConfig && (runtimeConfig.only !== void 0 || runtimeConfig.strategy)) ? "boss-css/prop/bosswind/runtime-only" : "boss-css/prop/bosswind/browser";
|
|
29
|
+
const shouldEmitRuntime = () => needsRuntime;
|
|
30
|
+
api.file.js.importAndConfig({
|
|
31
|
+
name: "onInit",
|
|
32
|
+
from: runtimeModule
|
|
33
|
+
}, shouldEmitRuntime);
|
|
34
|
+
api.file.js.importAndConfig({
|
|
35
|
+
name: "onBrowserObjectStart",
|
|
36
|
+
from: runtimeModule
|
|
37
|
+
}, shouldEmitRuntime);
|
|
38
|
+
api.file.js.config({
|
|
39
|
+
from: runtimeModule,
|
|
40
|
+
config: { bosswind: {
|
|
41
|
+
defaults,
|
|
42
|
+
fontSizeKeys
|
|
43
|
+
} }
|
|
44
|
+
}, shouldEmitRuntime);
|
|
45
|
+
api.file.js.dts.set("body", "bosswind:PropsStart", "export interface $$BosswindProps {");
|
|
46
|
+
for (const entry of bosswindProps) api.file.js.dts.set("body", `bosswind:${entry.name}:description`, entry.description).set("body", `bosswind:${entry.name}:declaration`, ` ${entry.name}?: $$PropValues | undefined\n`);
|
|
47
|
+
api.file.js.dts.set("body", "bosswind:PropsEnd", "}");
|
|
48
|
+
api.file.js.dts.replace("body", "$$:FinalProps", (value) => `${value} & $$BosswindProps`);
|
|
49
|
+
};
|
|
50
|
+
const onReady = async (api) => {
|
|
51
|
+
const flex = api.dictionary.get("flex");
|
|
52
|
+
if (flex) flex.single = true;
|
|
53
|
+
const grid = api.dictionary.get("grid");
|
|
54
|
+
if (grid) grid.single = true;
|
|
55
|
+
const border = api.dictionary.get("border");
|
|
56
|
+
if (border) border.single = true;
|
|
57
|
+
const flexWrap = api.dictionary.get("flexWrap");
|
|
58
|
+
if (flexWrap) flexWrap.single = true;
|
|
59
|
+
};
|
|
60
|
+
const onPropTree = async (api, { tree, parser }) => {
|
|
61
|
+
const resolvedTokens = typeof api.tokens === "function" ? api.tokens({}) : api.tokens;
|
|
62
|
+
const { tree: next, usedBosswind, usedText } = rewriteBosswindTree(api, tree, {
|
|
63
|
+
defaults,
|
|
64
|
+
fontSizeKeys
|
|
65
|
+
}, resolvedTokens);
|
|
66
|
+
if (usedBosswind && parser === "jsx") needsRuntime = true;
|
|
67
|
+
Object.keys(tree).forEach((key) => delete tree[key]);
|
|
68
|
+
Object.assign(tree, next);
|
|
69
|
+
};
|
|
70
|
+
|
|
71
|
+
//#endregion
|
|
72
|
+
export { name, onBoot, onPropTree, onReady, server_exports };
|