boss-css 0.0.1 → 0.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/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,46 @@
|
|
|
1
|
+
//#region src/use/token/vars.ts
|
|
2
|
+
const isPlainObject = (value) => {
|
|
3
|
+
return Boolean(value && typeof value === "object" && !Array.isArray(value));
|
|
4
|
+
};
|
|
5
|
+
const hasValueEntry = (value) => {
|
|
6
|
+
return isPlainObject(value) && Object.prototype.hasOwnProperty.call(value, "value");
|
|
7
|
+
};
|
|
8
|
+
const createTokenVars = ({ prefix = "", toValue } = {}) => {
|
|
9
|
+
const resolveValue = toValue ?? ((value) => value == null ? value : String(value));
|
|
10
|
+
return (input) => {
|
|
11
|
+
const result = {};
|
|
12
|
+
if (!input || typeof input !== "object") return result;
|
|
13
|
+
const applyVar = (path, group, value) => {
|
|
14
|
+
if (!path.length) return;
|
|
15
|
+
const name = `--${prefix}${path.join("-")}`;
|
|
16
|
+
const resolved = resolveValue(value, group ?? path[0]);
|
|
17
|
+
if (typeof resolved === "number") {
|
|
18
|
+
result[name] = resolved;
|
|
19
|
+
return;
|
|
20
|
+
}
|
|
21
|
+
if (typeof resolved === "string") {
|
|
22
|
+
result[name] = resolved;
|
|
23
|
+
return;
|
|
24
|
+
}
|
|
25
|
+
if (resolved == null) return;
|
|
26
|
+
result[name] = String(resolved);
|
|
27
|
+
};
|
|
28
|
+
const walk = (node, path, group) => {
|
|
29
|
+
if (node == null) return;
|
|
30
|
+
if (Array.isArray(node) || !isPlainObject(node)) {
|
|
31
|
+
applyVar(path, group, node);
|
|
32
|
+
return;
|
|
33
|
+
}
|
|
34
|
+
if (hasValueEntry(node)) {
|
|
35
|
+
applyVar(path, group, node.value);
|
|
36
|
+
return;
|
|
37
|
+
}
|
|
38
|
+
for (const [key, value] of Object.entries(node)) walk(value, [...path, key], group ?? key);
|
|
39
|
+
};
|
|
40
|
+
walk(input, [], null);
|
|
41
|
+
return result;
|
|
42
|
+
};
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
//#endregion
|
|
46
|
+
export { createTokenVars };
|
package/package.json
CHANGED
|
@@ -1,11 +1,307 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "boss-css",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.3",
|
|
4
4
|
"description": "",
|
|
5
|
-
"
|
|
5
|
+
"bin": {
|
|
6
|
+
"boss": "./dist/cli/index.cjs",
|
|
7
|
+
"boss-css": "./dist/cli/index.cjs"
|
|
8
|
+
},
|
|
9
|
+
"exports": {
|
|
10
|
+
".": {
|
|
11
|
+
"import": "./dist/index.mjs",
|
|
12
|
+
"require": "./dist/index.cjs"
|
|
13
|
+
},
|
|
14
|
+
"./api/browser": {
|
|
15
|
+
"import": "./dist/api/browser.mjs",
|
|
16
|
+
"require": "./dist/api/browser.cjs"
|
|
17
|
+
},
|
|
18
|
+
"./api/server": {
|
|
19
|
+
"import": "./dist/api/server.mjs",
|
|
20
|
+
"require": "./dist/api/server.cjs"
|
|
21
|
+
},
|
|
22
|
+
"./api/config": {
|
|
23
|
+
"types": "./src/api/config.d.ts",
|
|
24
|
+
"import": "./dist/api/config.mjs",
|
|
25
|
+
"require": "./dist/api/config.cjs"
|
|
26
|
+
},
|
|
27
|
+
"./fontsource/types": {
|
|
28
|
+
"types": "./src/fontsource/types.d.ts"
|
|
29
|
+
},
|
|
30
|
+
"./postcss": {
|
|
31
|
+
"import": "./dist/postcss/index.mjs",
|
|
32
|
+
"require": "./dist/postcss/index.cjs"
|
|
33
|
+
},
|
|
34
|
+
"./eslint-plugin": {
|
|
35
|
+
"import": "./dist/eslint-plugin/index.mjs",
|
|
36
|
+
"require": "./dist/eslint-plugin/index.cjs"
|
|
37
|
+
},
|
|
38
|
+
"./parser/jsx/browser": {
|
|
39
|
+
"import": "./dist/parser/jsx/browser.mjs",
|
|
40
|
+
"require": "./dist/parser/jsx/browser.cjs"
|
|
41
|
+
},
|
|
42
|
+
"./parser/jsx/server": {
|
|
43
|
+
"import": "./dist/parser/jsx/server.mjs",
|
|
44
|
+
"require": "./dist/parser/jsx/server.cjs"
|
|
45
|
+
},
|
|
46
|
+
"./parser/jsx/runtime": {
|
|
47
|
+
"import": "./dist/parser/jsx/runtime.mjs",
|
|
48
|
+
"require": "./dist/parser/jsx/runtime.cjs"
|
|
49
|
+
},
|
|
50
|
+
"./runtime": {
|
|
51
|
+
"import": "./dist/runtime/index.mjs",
|
|
52
|
+
"require": "./dist/runtime/index.cjs"
|
|
53
|
+
},
|
|
54
|
+
"./runtime/react": {
|
|
55
|
+
"import": "./dist/runtime/react.mjs",
|
|
56
|
+
"require": "./dist/runtime/react.cjs"
|
|
57
|
+
},
|
|
58
|
+
"./runtime/preact": {
|
|
59
|
+
"import": "./dist/runtime/preact.mjs",
|
|
60
|
+
"require": "./dist/runtime/preact.cjs"
|
|
61
|
+
},
|
|
62
|
+
"./runtime/qwik": {
|
|
63
|
+
"import": "./dist/runtime/qwik.mjs",
|
|
64
|
+
"require": "./dist/runtime/qwik.cjs"
|
|
65
|
+
},
|
|
66
|
+
"./runtime/stencil": {
|
|
67
|
+
"import": "./dist/runtime/stencil.mjs",
|
|
68
|
+
"require": "./dist/runtime/stencil.cjs"
|
|
69
|
+
},
|
|
70
|
+
"./runtime/solid": {
|
|
71
|
+
"import": "./dist/runtime/solid.mjs",
|
|
72
|
+
"require": "./dist/runtime/solid.cjs"
|
|
73
|
+
},
|
|
74
|
+
"./parser/jsx/native": {
|
|
75
|
+
"import": "./dist/parser/jsx/native.mjs",
|
|
76
|
+
"require": "./dist/parser/jsx/native.cjs"
|
|
77
|
+
},
|
|
78
|
+
"./parser/classname/server": {
|
|
79
|
+
"import": "./dist/parser/classname/server.mjs",
|
|
80
|
+
"require": "./dist/parser/classname/server.cjs"
|
|
81
|
+
},
|
|
82
|
+
"./native/browser": {
|
|
83
|
+
"import": "./dist/native/browser.mjs",
|
|
84
|
+
"require": "./dist/native/browser.cjs"
|
|
85
|
+
},
|
|
86
|
+
"./native/server": {
|
|
87
|
+
"import": "./dist/native/server.mjs",
|
|
88
|
+
"require": "./dist/native/server.cjs"
|
|
89
|
+
},
|
|
90
|
+
"./prop/pseudo/server": {
|
|
91
|
+
"import": "./dist/prop/pseudo/server.mjs",
|
|
92
|
+
"require": "./dist/prop/pseudo/server.cjs"
|
|
93
|
+
},
|
|
94
|
+
"./prop/pseudo/runtime-only": {
|
|
95
|
+
"import": "./dist/prop/pseudo/runtime-only.mjs",
|
|
96
|
+
"require": "./dist/prop/pseudo/runtime-only.cjs"
|
|
97
|
+
},
|
|
98
|
+
"./prop/at/server": {
|
|
99
|
+
"import": "./dist/prop/at/server.mjs",
|
|
100
|
+
"require": "./dist/prop/at/server.cjs"
|
|
101
|
+
},
|
|
102
|
+
"./prop/at/runtime-only": {
|
|
103
|
+
"import": "./dist/prop/at/runtime-only.mjs",
|
|
104
|
+
"require": "./dist/prop/at/runtime-only.cjs"
|
|
105
|
+
},
|
|
106
|
+
"./prop/child/server": {
|
|
107
|
+
"import": "./dist/prop/child/server.mjs",
|
|
108
|
+
"require": "./dist/prop/child/server.cjs"
|
|
109
|
+
},
|
|
110
|
+
"./prop/child/runtime-only": {
|
|
111
|
+
"import": "./dist/prop/child/runtime-only.mjs",
|
|
112
|
+
"require": "./dist/prop/child/runtime-only.cjs"
|
|
113
|
+
},
|
|
114
|
+
"./prop/css/server": {
|
|
115
|
+
"import": "./dist/prop/css/server.mjs",
|
|
116
|
+
"require": "./dist/prop/css/server.cjs"
|
|
117
|
+
},
|
|
118
|
+
"./prop/css/runtime-only": {
|
|
119
|
+
"import": "./dist/prop/css/runtime-only.mjs",
|
|
120
|
+
"require": "./dist/prop/css/runtime-only.cjs"
|
|
121
|
+
},
|
|
122
|
+
"./prop/bosswind/server": {
|
|
123
|
+
"import": "./dist/prop/bosswind/server.mjs",
|
|
124
|
+
"require": "./dist/prop/bosswind/server.cjs"
|
|
125
|
+
},
|
|
126
|
+
"./prop/bosswind/browser": {
|
|
127
|
+
"import": "./dist/prop/bosswind/browser.mjs",
|
|
128
|
+
"require": "./dist/prop/bosswind/browser.cjs"
|
|
129
|
+
},
|
|
130
|
+
"./prop/bosswind/runtime-only": {
|
|
131
|
+
"import": "./dist/prop/bosswind/runtime-only.mjs",
|
|
132
|
+
"require": "./dist/prop/bosswind/runtime-only.cjs"
|
|
133
|
+
},
|
|
134
|
+
"./strategy/inline-first/browser": {
|
|
135
|
+
"import": "./dist/strategy/inline-first/browser.mjs",
|
|
136
|
+
"require": "./dist/strategy/inline-first/browser.cjs"
|
|
137
|
+
},
|
|
138
|
+
"./strategy/inline-first/server": {
|
|
139
|
+
"import": "./dist/strategy/inline-first/server.mjs",
|
|
140
|
+
"require": "./dist/strategy/inline-first/server.cjs"
|
|
141
|
+
},
|
|
142
|
+
"./strategy/inline-first/runtime-only": {
|
|
143
|
+
"import": "./dist/strategy/inline-first/runtime-only.mjs",
|
|
144
|
+
"require": "./dist/strategy/inline-first/runtime-only.cjs"
|
|
145
|
+
},
|
|
146
|
+
"./strategy/runtime/runtime-only": {
|
|
147
|
+
"import": "./dist/strategy/runtime/runtime-only.mjs",
|
|
148
|
+
"require": "./dist/strategy/runtime/runtime-only.cjs"
|
|
149
|
+
},
|
|
150
|
+
"./strategy/classname-first/browser": {
|
|
151
|
+
"import": "./dist/strategy/classname-first/browser.mjs",
|
|
152
|
+
"require": "./dist/strategy/classname-first/browser.cjs"
|
|
153
|
+
},
|
|
154
|
+
"./strategy/classname-first/server": {
|
|
155
|
+
"import": "./dist/strategy/classname-first/server.mjs",
|
|
156
|
+
"require": "./dist/strategy/classname-first/server.cjs"
|
|
157
|
+
},
|
|
158
|
+
"./strategy/classname-only/server": {
|
|
159
|
+
"import": "./dist/strategy/classname-only/server.mjs",
|
|
160
|
+
"require": "./dist/strategy/classname-only/server.cjs"
|
|
161
|
+
},
|
|
162
|
+
"./strategy/classname-first/runtime-only": {
|
|
163
|
+
"import": "./dist/strategy/classname-first/runtime-only.mjs",
|
|
164
|
+
"require": "./dist/strategy/classname-first/runtime-only.cjs"
|
|
165
|
+
},
|
|
166
|
+
"./strategy/runtime/server": {
|
|
167
|
+
"import": "./dist/strategy/runtime/server.mjs",
|
|
168
|
+
"require": "./dist/strategy/runtime/server.cjs"
|
|
169
|
+
},
|
|
170
|
+
"./strategy/classic/runtime-only": {
|
|
171
|
+
"import": "./dist/strategy/classic/runtime-only.mjs",
|
|
172
|
+
"require": "./dist/strategy/classic/runtime-only.cjs"
|
|
173
|
+
},
|
|
174
|
+
"./compile/runtime": {
|
|
175
|
+
"import": "./dist/compile/runtime.mjs",
|
|
176
|
+
"require": "./dist/compile/runtime.cjs"
|
|
177
|
+
},
|
|
178
|
+
"./merge": {
|
|
179
|
+
"import": "./dist/merge/index.mjs",
|
|
180
|
+
"require": "./dist/merge/index.cjs"
|
|
181
|
+
},
|
|
182
|
+
"./cx": {
|
|
183
|
+
"import": "./dist/cx/index.mjs",
|
|
184
|
+
"require": "./dist/cx/index.cjs"
|
|
185
|
+
},
|
|
186
|
+
"./detect-fw": {
|
|
187
|
+
"import": "./dist/detect-fw/index.mjs",
|
|
188
|
+
"require": "./dist/detect-fw/index.cjs"
|
|
189
|
+
},
|
|
190
|
+
"./use/token/server": {
|
|
191
|
+
"import": "./dist/use/token/server.mjs",
|
|
192
|
+
"require": "./dist/use/token/server.cjs"
|
|
193
|
+
},
|
|
194
|
+
"./use/token/browser": {
|
|
195
|
+
"import": "./dist/use/token/browser.mjs",
|
|
196
|
+
"require": "./dist/use/token/browser.cjs"
|
|
197
|
+
},
|
|
198
|
+
"./use/token/runtime-only": {
|
|
199
|
+
"import": "./dist/use/token/runtime-only.mjs",
|
|
200
|
+
"require": "./dist/use/token/runtime-only.cjs"
|
|
201
|
+
},
|
|
202
|
+
"./reset/server": {
|
|
203
|
+
"import": "./dist/reset/server.mjs",
|
|
204
|
+
"require": "./dist/reset/server.cjs"
|
|
205
|
+
},
|
|
206
|
+
"./reset.css": "./src/reset/reset.css",
|
|
207
|
+
"./prop/css/csstype.json": "./src/prop/css/csstype.json",
|
|
208
|
+
"./fontsource/server": {
|
|
209
|
+
"import": "./dist/fontsource/server.mjs",
|
|
210
|
+
"require": "./dist/fontsource/server.cjs"
|
|
211
|
+
},
|
|
212
|
+
"./dev/server": {
|
|
213
|
+
"import": "./dist/dev/server.mjs",
|
|
214
|
+
"require": "./dist/dev/server.cjs"
|
|
215
|
+
},
|
|
216
|
+
"./dev/client": {
|
|
217
|
+
"import": "./dist/dev/client.mjs",
|
|
218
|
+
"require": "./dist/dev/client.cjs"
|
|
219
|
+
},
|
|
220
|
+
"./dev/runtime": {
|
|
221
|
+
"import": "./dist/dev/runtime.mjs",
|
|
222
|
+
"require": "./dist/dev/runtime.cjs"
|
|
223
|
+
},
|
|
224
|
+
"./devtools-app": {
|
|
225
|
+
"import": "./dist/devtools-app/index.mjs"
|
|
226
|
+
},
|
|
227
|
+
"./dev/plugin/server": {
|
|
228
|
+
"import": "./dist/dev/plugin/server.mjs",
|
|
229
|
+
"require": "./dist/dev/plugin/server.cjs"
|
|
230
|
+
},
|
|
231
|
+
"./dev/plugin/browser": {
|
|
232
|
+
"import": "./dist/dev/plugin/browser.mjs",
|
|
233
|
+
"require": "./dist/dev/plugin/browser.cjs"
|
|
234
|
+
}
|
|
235
|
+
},
|
|
236
|
+
"typesVersions": {
|
|
237
|
+
"*": {
|
|
238
|
+
"api/config": [
|
|
239
|
+
"src/api/config.d.ts"
|
|
240
|
+
],
|
|
241
|
+
"fontsource/types": [
|
|
242
|
+
"src/fontsource/types.d.ts"
|
|
243
|
+
]
|
|
244
|
+
}
|
|
245
|
+
},
|
|
6
246
|
"scripts": {
|
|
7
|
-
"
|
|
247
|
+
"fontsource:sync": "node src/fontsource/fetch-directory.js",
|
|
248
|
+
"test": "vitest",
|
|
249
|
+
"build": "tsdown -c tsdown.config.mjs && npm run build:devtools-app",
|
|
250
|
+
"build:devtools-app": "npm --prefix src/packages/devtools-app run build",
|
|
251
|
+
"build:watch": "tsdown -c tsdown.config.mjs --watch",
|
|
252
|
+
"dev": "npm run build:watch"
|
|
8
253
|
},
|
|
9
254
|
"author": "",
|
|
10
|
-
"license": "
|
|
255
|
+
"license": "MIT",
|
|
256
|
+
"devDependencies": {
|
|
257
|
+
"@builder.io/qwik": "^1.18.0",
|
|
258
|
+
"@stencil/core": "^4.41.2",
|
|
259
|
+
"@types/jsdom": "^27.0.0",
|
|
260
|
+
"@types/node": "^25.0.9",
|
|
261
|
+
"@types/react": "^19.2.8",
|
|
262
|
+
"postcss": "^8.5.6",
|
|
263
|
+
"preact": "^10.28.2",
|
|
264
|
+
"prettier": "^3.8.0",
|
|
265
|
+
"solid-js": "^1.9.10",
|
|
266
|
+
"tsdown": "^0.20.0-beta.3",
|
|
267
|
+
"typescript": "^5.9.3",
|
|
268
|
+
"vite": "^7.3.1",
|
|
269
|
+
"vite-tsconfig-paths": "^6.0.4",
|
|
270
|
+
"vitest": "^4.0.17"
|
|
271
|
+
},
|
|
272
|
+
"dependencies": {
|
|
273
|
+
"@boss-css/document-create-element": "1.0.0",
|
|
274
|
+
"@boss-css/is-css-prop": "1.0.0",
|
|
275
|
+
"@clack/prompts": "^0.11.0",
|
|
276
|
+
"@emotion/hash": "^0.9.2",
|
|
277
|
+
"@parcel/watcher": "^2.5.4",
|
|
278
|
+
"@swc/core": "^1.15.8",
|
|
279
|
+
"@webref/css": "^8.2.0",
|
|
280
|
+
"@webref/elements": "^2.6.0",
|
|
281
|
+
"@webref/events": "^1.20.0",
|
|
282
|
+
"css-variants": "^2.3.4",
|
|
283
|
+
"css.escape": "^1.5.1",
|
|
284
|
+
"csstype": "^3.2.3",
|
|
285
|
+
"debug": "^4.4.3",
|
|
286
|
+
"deepmerge": "^4.3.1",
|
|
287
|
+
"fast-glob": "^3.3.3",
|
|
288
|
+
"jsdom": "^27.4.0",
|
|
289
|
+
"lightningcss": "^1.30.2",
|
|
290
|
+
"pluvo": "^0.1.1",
|
|
291
|
+
"source-map-js": "^1.2.1",
|
|
292
|
+
"ts-deepmerge": "^7.0.3",
|
|
293
|
+
"ws": "^8.19.0",
|
|
294
|
+
"yargs": "^18.0.0"
|
|
295
|
+
},
|
|
296
|
+
"peerDependencies": {
|
|
297
|
+
"react": "^19.2.3",
|
|
298
|
+
"react-dom": "^19.2.3",
|
|
299
|
+
"react-native": ">=0.83.1"
|
|
300
|
+
},
|
|
301
|
+
"bo$$": {
|
|
302
|
+
"configDir": "src/.bo$$",
|
|
303
|
+
"compile": {
|
|
304
|
+
"tempOutDir": "src/.bo$$/compiled"
|
|
305
|
+
}
|
|
306
|
+
}
|
|
11
307
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type { UserConfig } from '@/shared/types'
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import type {
|
|
2
|
+
FontCategory,
|
|
3
|
+
FontFamily,
|
|
4
|
+
FontId,
|
|
5
|
+
FontStyle,
|
|
6
|
+
FontSubset,
|
|
7
|
+
FontType,
|
|
8
|
+
FontVersion,
|
|
9
|
+
FontWeight,
|
|
10
|
+
} from '@/fontsource/directory'
|
|
11
|
+
|
|
12
|
+
type LooseString<T extends string> = T | (string & {})
|
|
13
|
+
|
|
14
|
+
type LooseNumber<T extends number> = T | (number & {})
|
|
15
|
+
|
|
16
|
+
export type FontDelivery = 'cdn' | 'local'
|
|
17
|
+
|
|
18
|
+
export type FontVariableAxes = {
|
|
19
|
+
wght?: number | [number, number]
|
|
20
|
+
wdth?: number | [number, number]
|
|
21
|
+
slnt?: number | [number, number]
|
|
22
|
+
ital?: 0 | 1
|
|
23
|
+
[axis: string]: number | [number, number] | undefined
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
type FontConfigBase = {
|
|
27
|
+
name: LooseString<FontFamily | FontId>
|
|
28
|
+
subsets?: Array<LooseString<FontSubset>>
|
|
29
|
+
version?: LooseString<FontVersion> | 'latest'
|
|
30
|
+
category?: LooseString<FontCategory>
|
|
31
|
+
type?: LooseString<FontType>
|
|
32
|
+
delivery?: FontDelivery
|
|
33
|
+
token?: string
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export type FontConfigStatic = FontConfigBase & {
|
|
37
|
+
variable?: false
|
|
38
|
+
weights?: Array<LooseNumber<FontWeight>>
|
|
39
|
+
styles?: Array<LooseString<FontStyle>>
|
|
40
|
+
variableAxes?: never
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export type FontConfigVariable = FontConfigBase & {
|
|
44
|
+
variable: true
|
|
45
|
+
variableAxes?: FontVariableAxes
|
|
46
|
+
weights?: never
|
|
47
|
+
styles?: never
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
export type FontConfig = FontConfigStatic | FontConfigVariable
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@boss-css/document-create-element",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "./createElement.js",
|
|
7
|
+
"module": "./createElement.js",
|
|
8
|
+
"browser": "./createElement.browser.js",
|
|
9
|
+
"scripts": {
|
|
10
|
+
"test": "echo \"Error: no test specified\" && exit 1"
|
|
11
|
+
},
|
|
12
|
+
"author": "",
|
|
13
|
+
"license": "ISC",
|
|
14
|
+
"dependencies": {
|
|
15
|
+
"jsdom": "^24.0.0"
|
|
16
|
+
}
|
|
17
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import createElement from '@boss-css/document-create-element'
|
|
2
|
+
|
|
3
|
+
const cache = {}
|
|
4
|
+
|
|
5
|
+
export default function isCSSProp(tag, prop) {
|
|
6
|
+
const tagEntry = (cache[tag] ??= {})
|
|
7
|
+
if (tagEntry[prop] !== undefined) return tagEntry[prop]
|
|
8
|
+
|
|
9
|
+
tagEntry.$el ??= createElement(tag)
|
|
10
|
+
tagEntry[prop] = prop in tagEntry.$el.style
|
|
11
|
+
|
|
12
|
+
return tagEntry[prop]
|
|
13
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import createElement from '@boss-css/document-create-element'
|
|
2
|
+
|
|
3
|
+
const cache = {}
|
|
4
|
+
|
|
5
|
+
export default function isCSSProp(tag, prop) {
|
|
6
|
+
const tagEntry = (cache[tag] ??= {})
|
|
7
|
+
if (tagEntry[prop] !== undefined) return tagEntry[prop]
|
|
8
|
+
|
|
9
|
+
tagEntry.$el ??= createElement(tag)
|
|
10
|
+
tagEntry[prop] = prop in tagEntry.$el.style
|
|
11
|
+
|
|
12
|
+
return tagEntry[prop]
|
|
13
|
+
}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "is-css-prop",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"lockfileVersion": 3,
|
|
5
|
+
"requires": true,
|
|
6
|
+
"packages": {
|
|
7
|
+
"": {
|
|
8
|
+
"name": "is-css-prop",
|
|
9
|
+
"version": "1.0.0",
|
|
10
|
+
"license": "ISC",
|
|
11
|
+
"dependencies": {
|
|
12
|
+
"@webref/css": "^6.10.2"
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
"node_modules/@webref/css": {
|
|
16
|
+
"version": "6.10.2",
|
|
17
|
+
"resolved": "https://registry.npmjs.org/@webref/css/-/css-6.10.2.tgz",
|
|
18
|
+
"integrity": "sha512-BQepib8uNtlsxZbeVBHk1xdKDQRKFn4Gz73zy/zgRP+0we2v+LT2e8nOqt2KCGfUjSoNkSDS0Wc8z003qJXqFQ==",
|
|
19
|
+
"peerDependencies": {
|
|
20
|
+
"css-tree": "^2.3.1"
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
"node_modules/css-tree": {
|
|
24
|
+
"version": "2.3.1",
|
|
25
|
+
"resolved": "https://registry.npmjs.org/css-tree/-/css-tree-2.3.1.tgz",
|
|
26
|
+
"integrity": "sha512-6Fv1DV/TYw//QF5IzQdqsNDjx/wc8TrMBZsqjL9eW01tWb7R7k/mq+/VXfJCl7SoD5emsJop9cOByJZfs8hYIw==",
|
|
27
|
+
"peer": true,
|
|
28
|
+
"dependencies": {
|
|
29
|
+
"mdn-data": "2.0.30",
|
|
30
|
+
"source-map-js": "^1.0.1"
|
|
31
|
+
},
|
|
32
|
+
"engines": {
|
|
33
|
+
"node": "^10 || ^12.20.0 || ^14.13.0 || >=15.0.0"
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
"node_modules/mdn-data": {
|
|
37
|
+
"version": "2.0.30",
|
|
38
|
+
"resolved": "https://registry.npmjs.org/mdn-data/-/mdn-data-2.0.30.tgz",
|
|
39
|
+
"integrity": "sha512-GaqWWShW4kv/G9IEucWScBx9G1/vsFZZJUO+tD26M8J8z3Kw5RDQjaoZe03YAClgeS/SWPOcb4nkFBTEi5DUEA==",
|
|
40
|
+
"peer": true
|
|
41
|
+
},
|
|
42
|
+
"node_modules/source-map-js": {
|
|
43
|
+
"version": "1.0.2",
|
|
44
|
+
"resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.0.2.tgz",
|
|
45
|
+
"integrity": "sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==",
|
|
46
|
+
"peer": true,
|
|
47
|
+
"engines": {
|
|
48
|
+
"node": ">=0.10.0"
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@boss-css/is-css-prop",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "./index.js",
|
|
7
|
+
"module": "./index.js",
|
|
8
|
+
"browser": "./browser.js",
|
|
9
|
+
"scripts": {
|
|
10
|
+
"test": "echo \"Error: no test specified\" && exit 1"
|
|
11
|
+
},
|
|
12
|
+
"author": "",
|
|
13
|
+
"license": "ISC",
|
|
14
|
+
"dependencies": {
|
|
15
|
+
"@webref/css": "^6.10.2"
|
|
16
|
+
}
|
|
17
|
+
}
|