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.
Files changed (268) hide show
  1. package/README.md +1 -0
  2. package/dist/_virtual/rolldown_runtime.cjs +43 -0
  3. package/dist/_virtual/rolldown_runtime.mjs +20 -0
  4. package/dist/api/browser.cjs +54 -0
  5. package/dist/api/browser.mjs +48 -0
  6. package/dist/api/config.cjs +94 -0
  7. package/dist/api/config.mjs +91 -0
  8. package/dist/api/css.cjs +304 -0
  9. package/dist/api/css.mjs +303 -0
  10. package/dist/api/dictionary.cjs +218 -0
  11. package/dist/api/dictionary.mjs +215 -0
  12. package/dist/api/file/dts.cjs +21 -0
  13. package/dist/api/file/dts.mjs +21 -0
  14. package/dist/api/file/file.cjs +123 -0
  15. package/dist/api/file/file.mjs +120 -0
  16. package/dist/api/file/js.cjs +118 -0
  17. package/dist/api/file/js.mjs +116 -0
  18. package/dist/api/names.cjs +52 -0
  19. package/dist/api/names.mjs +46 -0
  20. package/dist/api/noopCss.cjs +37 -0
  21. package/dist/api/noopCss.mjs +36 -0
  22. package/dist/api/propTree.cjs +54 -0
  23. package/dist/api/propTree.mjs +48 -0
  24. package/dist/api/server.cjs +112 -0
  25. package/dist/api/server.mjs +106 -0
  26. package/dist/cli/build.cjs +1 -0
  27. package/dist/cli/build.mjs +3 -0
  28. package/dist/cli/index.cjs +30 -0
  29. package/dist/cli/index.mjs +29 -0
  30. package/dist/cli/tasks/build.cjs +24 -0
  31. package/dist/cli/tasks/build.mjs +23 -0
  32. package/dist/cli/tasks/choose.cjs +47 -0
  33. package/dist/cli/tasks/choose.mjs +46 -0
  34. package/dist/cli/tasks/compile.cjs +68 -0
  35. package/dist/cli/tasks/compile.mjs +67 -0
  36. package/dist/cli/tasks/dev.cjs +51 -0
  37. package/dist/cli/tasks/dev.mjs +48 -0
  38. package/dist/cli/tasks/init.cjs +1835 -0
  39. package/dist/cli/tasks/init.mjs +1831 -0
  40. package/dist/cli/tasks/watch.cjs +38 -0
  41. package/dist/cli/tasks/watch.mjs +37 -0
  42. package/dist/cli/templates/init.cjs +82 -0
  43. package/dist/cli/templates/init.mjs +78 -0
  44. package/dist/cli/types.cjs +13 -0
  45. package/dist/cli/types.mjs +13 -0
  46. package/dist/cli/utils.cjs +43 -0
  47. package/dist/cli/utils.mjs +41 -0
  48. package/dist/compile/classname-strategy.cjs +79 -0
  49. package/dist/compile/classname-strategy.mjs +77 -0
  50. package/dist/compile/classname.cjs +366 -0
  51. package/dist/compile/classname.mjs +360 -0
  52. package/dist/compile/index.cjs +238 -0
  53. package/dist/compile/index.mjs +235 -0
  54. package/dist/compile/jsx.cjs +803 -0
  55. package/dist/compile/jsx.mjs +800 -0
  56. package/dist/compile/prepared.cjs +88 -0
  57. package/dist/compile/prepared.mjs +87 -0
  58. package/dist/compile/runtime.cjs +33 -0
  59. package/dist/compile/runtime.mjs +32 -0
  60. package/dist/compile/transform.cjs +371 -0
  61. package/dist/compile/transform.mjs +369 -0
  62. package/dist/cx/index.cjs +93 -0
  63. package/dist/cx/index.mjs +85 -0
  64. package/dist/detect-fw/index.cjs +384 -0
  65. package/dist/detect-fw/index.mjs +379 -0
  66. package/dist/dev/client.cjs +39 -0
  67. package/dist/dev/client.mjs +38 -0
  68. package/dist/dev/plugin/browser.cjs +11 -0
  69. package/dist/dev/plugin/browser.mjs +9 -0
  70. package/dist/dev/plugin/server.cjs +86 -0
  71. package/dist/dev/plugin/server.mjs +78 -0
  72. package/dist/dev/port.cjs +46 -0
  73. package/dist/dev/port.mjs +43 -0
  74. package/dist/dev/runtime.cjs +28 -0
  75. package/dist/dev/runtime.mjs +29 -0
  76. package/dist/dev/server.cjs +808 -0
  77. package/dist/dev/server.mjs +805 -0
  78. package/dist/dev/shared.cjs +6 -0
  79. package/dist/dev/shared.mjs +5 -0
  80. package/dist/eslint-plugin/index.cjs +66 -0
  81. package/dist/eslint-plugin/index.mjs +66 -0
  82. package/dist/eslint-plugin/rules/classnames-only.cjs +68 -0
  83. package/dist/eslint-plugin/rules/classnames-only.mjs +68 -0
  84. package/dist/eslint-plugin/rules/format-classnames.cjs +137 -0
  85. package/dist/eslint-plugin/rules/format-classnames.mjs +136 -0
  86. package/dist/eslint-plugin/rules/no-unknown-classes.cjs +119 -0
  87. package/dist/eslint-plugin/rules/no-unknown-classes.mjs +119 -0
  88. package/dist/eslint-plugin/rules/prefer-classnames.cjs +69 -0
  89. package/dist/eslint-plugin/rules/prefer-classnames.mjs +69 -0
  90. package/dist/eslint-plugin/rules/prefer-token-values.cjs +197 -0
  91. package/dist/eslint-plugin/rules/prefer-token-values.mjs +197 -0
  92. package/dist/eslint-plugin/rules/props-only.cjs +115 -0
  93. package/dist/eslint-plugin/rules/props-only.mjs +115 -0
  94. package/dist/eslint-plugin/rules/redundant-cx.cjs +66 -0
  95. package/dist/eslint-plugin/rules/redundant-cx.mjs +66 -0
  96. package/dist/eslint-plugin/rules/require-prop-functions.cjs +130 -0
  97. package/dist/eslint-plugin/rules/require-prop-functions.mjs +130 -0
  98. package/dist/eslint-plugin/utils/api.cjs +30 -0
  99. package/dist/eslint-plugin/utils/api.mjs +29 -0
  100. package/dist/eslint-plugin/utils/ast.cjs +119 -0
  101. package/dist/eslint-plugin/utils/ast.mjs +112 -0
  102. package/dist/eslint-plugin/utils/boss-classes.cjs +185 -0
  103. package/dist/eslint-plugin/utils/boss-classes.mjs +175 -0
  104. package/dist/eslint-plugin/utils/defaults.cjs +99 -0
  105. package/dist/eslint-plugin/utils/defaults.mjs +93 -0
  106. package/dist/eslint-plugin/utils/format.cjs +20 -0
  107. package/dist/eslint-plugin/utils/format.mjs +19 -0
  108. package/dist/eslint-plugin/utils/order.cjs +76 -0
  109. package/dist/eslint-plugin/utils/order.mjs +76 -0
  110. package/dist/eslint-plugin/utils/property-order.cjs +449 -0
  111. package/dist/eslint-plugin/utils/property-order.mjs +448 -0
  112. package/dist/eslint-plugin/utils/static.cjs +36 -0
  113. package/dist/eslint-plugin/utils/static.mjs +35 -0
  114. package/dist/fontsource/directory.cjs +39588 -0
  115. package/dist/fontsource/directory.mjs +39587 -0
  116. package/dist/fontsource/server.cjs +291 -0
  117. package/dist/fontsource/server.mjs +282 -0
  118. package/dist/index.cjs +10 -0
  119. package/dist/index.mjs +6 -0
  120. package/dist/log/browser.cjs +28 -0
  121. package/dist/log/browser.mjs +28 -0
  122. package/dist/log/server.cjs +32 -0
  123. package/dist/log/server.mjs +30 -0
  124. package/dist/merge/index.cjs +590 -0
  125. package/dist/merge/index.mjs +586 -0
  126. package/dist/native/browser.cjs +78 -0
  127. package/dist/native/browser.mjs +77 -0
  128. package/dist/native/server.cjs +180 -0
  129. package/dist/native/server.mjs +176 -0
  130. package/dist/native/styleTypes.cjs +168 -0
  131. package/dist/native/styleTypes.mjs +164 -0
  132. package/dist/parser/classname/server.cjs +239 -0
  133. package/dist/parser/classname/server.mjs +232 -0
  134. package/dist/parser/jsx/browser.cjs +66 -0
  135. package/dist/parser/jsx/browser.mjs +63 -0
  136. package/dist/parser/jsx/extractCode.cjs +99 -0
  137. package/dist/parser/jsx/extractCode.mjs +98 -0
  138. package/dist/parser/jsx/extractPrepared.cjs +123 -0
  139. package/dist/parser/jsx/extractPrepared.mjs +122 -0
  140. package/dist/parser/jsx/extractProps.cjs +234 -0
  141. package/dist/parser/jsx/extractProps.mjs +232 -0
  142. package/dist/parser/jsx/isDOMProp.cjs +17 -0
  143. package/dist/parser/jsx/isDOMProp.mjs +15 -0
  144. package/dist/parser/jsx/native.cjs +110 -0
  145. package/dist/parser/jsx/native.mjs +108 -0
  146. package/dist/parser/jsx/runtime.cjs +4 -0
  147. package/dist/parser/jsx/runtime.mjs +3 -0
  148. package/dist/parser/jsx/server.cjs +278 -0
  149. package/dist/parser/jsx/server.mjs +268 -0
  150. package/dist/postcss/index.cjs +16 -0
  151. package/dist/postcss/index.mjs +16 -0
  152. package/dist/prop/at/runtime-only.cjs +90 -0
  153. package/dist/prop/at/runtime-only.mjs +88 -0
  154. package/dist/prop/at/server.cjs +282 -0
  155. package/dist/prop/at/server.mjs +268 -0
  156. package/dist/prop/at/shared.cjs +153 -0
  157. package/dist/prop/at/shared.mjs +144 -0
  158. package/dist/prop/bosswind/browser.cjs +18 -0
  159. package/dist/prop/bosswind/browser.mjs +16 -0
  160. package/dist/prop/bosswind/runtime-only.cjs +18 -0
  161. package/dist/prop/bosswind/runtime-only.mjs +16 -0
  162. package/dist/prop/bosswind/server.cjs +81 -0
  163. package/dist/prop/bosswind/server.mjs +72 -0
  164. package/dist/prop/bosswind/shared.cjs +861 -0
  165. package/dist/prop/bosswind/shared.mjs +855 -0
  166. package/dist/prop/bosswind/tailwind-theme.cjs +703 -0
  167. package/dist/prop/bosswind/tailwind-theme.mjs +702 -0
  168. package/dist/prop/child/runtime-only.cjs +18 -0
  169. package/dist/prop/child/runtime-only.mjs +15 -0
  170. package/dist/prop/child/server.cjs +81 -0
  171. package/dist/prop/child/server.mjs +72 -0
  172. package/dist/prop/css/getDtsTemplate.cjs +65 -0
  173. package/dist/prop/css/getDtsTemplate.mjs +63 -0
  174. package/dist/prop/css/runtime-only.cjs +14 -0
  175. package/dist/prop/css/runtime-only.mjs +13 -0
  176. package/dist/prop/css/server.cjs +99 -0
  177. package/dist/prop/css/server.mjs +90 -0
  178. package/dist/prop/pseudo/runtime-only.cjs +23 -0
  179. package/dist/prop/pseudo/runtime-only.mjs +21 -0
  180. package/dist/prop/pseudo/server.cjs +91 -0
  181. package/dist/prop/pseudo/server.mjs +82 -0
  182. package/dist/prop/pseudo/shared.cjs +61 -0
  183. package/dist/prop/pseudo/shared.mjs +60 -0
  184. package/dist/reset/server.cjs +34 -0
  185. package/dist/reset/server.mjs +26 -0
  186. package/dist/runtime/index.cjs +119 -0
  187. package/dist/runtime/index.mjs +118 -0
  188. package/dist/runtime/preact.cjs +4 -0
  189. package/dist/runtime/preact.mjs +3 -0
  190. package/dist/runtime/qwik.cjs +21 -0
  191. package/dist/runtime/qwik.mjs +18 -0
  192. package/dist/runtime/react.cjs +4 -0
  193. package/dist/runtime/react.mjs +3 -0
  194. package/dist/runtime/solid.cjs +15 -0
  195. package/dist/runtime/solid.mjs +14 -0
  196. package/dist/runtime/stencil.cjs +25 -0
  197. package/dist/runtime/stencil.mjs +21 -0
  198. package/dist/runtime/style.cjs +14 -0
  199. package/dist/runtime/style.mjs +13 -0
  200. package/dist/shared/boundaries.cjs +288 -0
  201. package/dist/shared/boundaries.mjs +285 -0
  202. package/dist/shared/customCss.cjs +212 -0
  203. package/dist/shared/customCss.mjs +211 -0
  204. package/dist/shared/debug.cjs +76 -0
  205. package/dist/shared/debug.mjs +74 -0
  206. package/dist/shared/file.cjs +21 -0
  207. package/dist/shared/file.mjs +19 -0
  208. package/dist/shared/framework.cjs +10 -0
  209. package/dist/shared/framework.mjs +9 -0
  210. package/dist/shared/json.cjs +58 -0
  211. package/dist/shared/json.mjs +57 -0
  212. package/dist/shared/types.cjs +11 -0
  213. package/dist/shared/types.mjs +10 -0
  214. package/dist/strategy/classic/runtime-only.cjs +190 -0
  215. package/dist/strategy/classic/runtime-only.mjs +186 -0
  216. package/dist/strategy/classname-first/runtime-only.cjs +138 -0
  217. package/dist/strategy/classname-first/runtime-only.mjs +134 -0
  218. package/dist/strategy/classname-first/server.cjs +139 -0
  219. package/dist/strategy/classname-first/server.mjs +133 -0
  220. package/dist/strategy/classname-only/server.cjs +43 -0
  221. package/dist/strategy/classname-only/server.mjs +35 -0
  222. package/dist/strategy/inline-first/browser.cjs +61 -0
  223. package/dist/strategy/inline-first/browser.mjs +58 -0
  224. package/dist/strategy/inline-first/runtime-only.cjs +159 -0
  225. package/dist/strategy/inline-first/runtime-only.mjs +155 -0
  226. package/dist/strategy/inline-first/server.cjs +92 -0
  227. package/dist/strategy/inline-first/server.mjs +83 -0
  228. package/dist/strategy/runtime/runtime-only.cjs +24 -0
  229. package/dist/strategy/runtime/runtime-only.mjs +22 -0
  230. package/dist/strategy/runtime/server.cjs +72 -0
  231. package/dist/strategy/runtime/server.mjs +63 -0
  232. package/dist/strategy/runtime-only/css.cjs +183 -0
  233. package/dist/strategy/runtime-only/css.mjs +181 -0
  234. package/dist/tasks/build.cjs +88 -0
  235. package/dist/tasks/build.mjs +84 -0
  236. package/dist/tasks/compile.cjs +12 -0
  237. package/dist/tasks/compile.mjs +12 -0
  238. package/dist/tasks/postcss.cjs +116 -0
  239. package/dist/tasks/postcss.mjs +113 -0
  240. package/dist/tasks/session.cjs +46 -0
  241. package/dist/tasks/session.mjs +42 -0
  242. package/dist/tasks/watch.cjs +102 -0
  243. package/dist/tasks/watch.mjs +99 -0
  244. package/dist/transform/cache.cjs +24 -0
  245. package/dist/transform/cache.mjs +21 -0
  246. package/dist/transform/processFile.cjs +26 -0
  247. package/dist/transform/processFile.mjs +24 -0
  248. package/dist/use/token/browser.cjs +65 -0
  249. package/dist/use/token/browser.mjs +61 -0
  250. package/dist/use/token/runtime-only.cjs +245 -0
  251. package/dist/use/token/runtime-only.mjs +239 -0
  252. package/dist/use/token/server.cjs +325 -0
  253. package/dist/use/token/server.mjs +313 -0
  254. package/dist/use/token/vars.cjs +47 -0
  255. package/dist/use/token/vars.mjs +46 -0
  256. package/package.json +300 -4
  257. package/src/api/config.d.ts +1 -0
  258. package/src/fontsource/types.d.ts +50 -0
  259. package/src/packages/document-create-element/createElement.browser.js +3 -0
  260. package/src/packages/document-create-element/createElement.js +7 -0
  261. package/src/packages/document-create-element/package.json +17 -0
  262. package/src/packages/is-css-prop/browser.js +13 -0
  263. package/src/packages/is-css-prop/index.js +13 -0
  264. package/src/packages/is-css-prop/package-lock.json +52 -0
  265. package/src/packages/is-css-prop/package.json +17 -0
  266. package/src/prop/css/csstype.json +4387 -0
  267. package/src/prop/css/package.json +3 -0
  268. 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.1",
3
+ "version": "0.0.2",
4
4
  "description": "",
5
- "main": "index.js",
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
- "test": "echo \"Error: no test specified\" && exit 1"
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": "ISC"
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": "file:src/packages/document-create-element",
274
+ "@boss-css/is-css-prop": "file:src/packages/is-css-prop",
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,3 @@
1
+ export default function createElement(tag) {
2
+ return document.createElement(tag)
3
+ }
@@ -0,0 +1,7 @@
1
+ import { JSDOM } from 'jsdom'
2
+
3
+ const document = new JSDOM().window.document
4
+
5
+ export default function createElement(tag) {
6
+ return document.createElement(tag)
7
+ }
@@ -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
+ }