boss-css 0.0.23 → 0.0.25

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 (278) hide show
  1. package/dist/_virtual/{rolldown_runtime.cjs → _rolldown/runtime.cjs} +14 -24
  2. package/dist/_virtual/_rolldown/runtime.mjs +14 -0
  3. package/dist/ai/server.cjs +15 -16
  4. package/dist/ai/server.mjs +4 -6
  5. package/dist/ai/skills.cjs +2 -3
  6. package/dist/ai/skills.mjs +1 -2
  7. package/dist/api/browser.cjs +11 -12
  8. package/dist/api/browser.mjs +1 -3
  9. package/dist/api/config.cjs +6 -7
  10. package/dist/api/config.mjs +1 -3
  11. package/dist/api/css.cjs +1 -3
  12. package/dist/api/css.mjs +1 -2
  13. package/dist/api/dictionary.cjs +1 -3
  14. package/dist/api/dictionary.mjs +1 -2
  15. package/dist/api/file/dts.cjs +2 -4
  16. package/dist/api/file/dts.mjs +1 -3
  17. package/dist/api/file/file.cjs +4 -6
  18. package/dist/api/file/file.mjs +1 -3
  19. package/dist/api/file/js.cjs +6 -8
  20. package/dist/api/file/js.mjs +2 -4
  21. package/dist/api/file/text.cjs +2 -4
  22. package/dist/api/file/text.mjs +1 -3
  23. package/dist/api/names.cjs +1 -3
  24. package/dist/api/names.mjs +1 -3
  25. package/dist/api/noopCss.cjs +2 -3
  26. package/dist/api/noopCss.mjs +1 -2
  27. package/dist/api/propTree.cjs +1 -3
  28. package/dist/api/propTree.mjs +1 -2
  29. package/dist/api/server.cjs +15 -16
  30. package/dist/api/server.mjs +1 -3
  31. package/dist/cli/build.cjs +1 -1
  32. package/dist/cli/build.mjs +2 -3
  33. package/dist/cli/index.cjs +5 -7
  34. package/dist/cli/index.mjs +1 -3
  35. package/dist/cli/tasks/build.cjs +4 -7
  36. package/dist/cli/tasks/build.mjs +1 -4
  37. package/dist/cli/tasks/choose.cjs +3 -6
  38. package/dist/cli/tasks/choose.mjs +1 -4
  39. package/dist/cli/tasks/compile.cjs +3 -6
  40. package/dist/cli/tasks/compile.mjs +1 -4
  41. package/dist/cli/tasks/dev.cjs +8 -11
  42. package/dist/cli/tasks/dev.mjs +2 -5
  43. package/dist/cli/tasks/init.cjs +163 -44
  44. package/dist/cli/tasks/init.mjs +135 -17
  45. package/dist/cli/tasks/watch.cjs +3 -6
  46. package/dist/cli/tasks/watch.mjs +1 -4
  47. package/dist/cli/templates/init.cjs +1 -3
  48. package/dist/cli/templates/init.mjs +1 -2
  49. package/dist/cli/types.cjs +2 -4
  50. package/dist/cli/types.mjs +2 -4
  51. package/dist/cli/utils.cjs +2 -4
  52. package/dist/cli/utils.mjs +1 -3
  53. package/dist/compile/classname-strategy.cjs +3 -5
  54. package/dist/compile/classname-strategy.mjs +1 -3
  55. package/dist/compile/classname.cjs +6 -8
  56. package/dist/compile/classname.mjs +5 -7
  57. package/dist/compile/index.cjs +18 -20
  58. package/dist/compile/index.mjs +6 -8
  59. package/dist/compile/jsx.cjs +8 -10
  60. package/dist/compile/jsx.mjs +6 -8
  61. package/dist/compile/prepared.cjs +3 -5
  62. package/dist/compile/prepared.mjs +1 -3
  63. package/dist/compile/runtime.cjs +4 -5
  64. package/dist/compile/runtime.mjs +1 -3
  65. package/dist/compile/transform.cjs +7 -9
  66. package/dist/compile/transform.mjs +3 -5
  67. package/dist/cx/index.cjs +6 -7
  68. package/dist/cx/index.mjs +3 -5
  69. package/dist/detect-fw/index.cjs +6 -7
  70. package/dist/detect-fw/index.mjs +1 -3
  71. package/dist/dev/client.cjs +2 -3
  72. package/dist/dev/client.mjs +1 -2
  73. package/dist/dev/plugin/browser.cjs +2 -3
  74. package/dist/dev/plugin/browser.mjs +1 -2
  75. package/dist/dev/plugin/server.cjs +13 -14
  76. package/dist/dev/plugin/server.mjs +3 -5
  77. package/dist/dev/port.cjs +3 -5
  78. package/dist/dev/port.mjs +1 -3
  79. package/dist/dev/runtime.cjs +3 -5
  80. package/dist/dev/runtime.mjs +1 -3
  81. package/dist/dev/server.cjs +12 -13
  82. package/dist/dev/server.mjs +15 -17
  83. package/dist/dev/shared.cjs +1 -3
  84. package/dist/dev/shared.mjs +1 -2
  85. package/dist/eslint-plugin/index.cjs +10 -13
  86. package/dist/eslint-plugin/index.mjs +1 -4
  87. package/dist/eslint-plugin/rules/classnames-only.cjs +4 -6
  88. package/dist/eslint-plugin/rules/classnames-only.mjs +1 -3
  89. package/dist/eslint-plugin/rules/format-classnames.cjs +8 -10
  90. package/dist/eslint-plugin/rules/format-classnames.mjs +1 -3
  91. package/dist/eslint-plugin/rules/no-unknown-classes.cjs +5 -7
  92. package/dist/eslint-plugin/rules/no-unknown-classes.mjs +1 -3
  93. package/dist/eslint-plugin/rules/prefer-classnames.cjs +5 -7
  94. package/dist/eslint-plugin/rules/prefer-classnames.mjs +1 -3
  95. package/dist/eslint-plugin/rules/prefer-token-values.cjs +6 -8
  96. package/dist/eslint-plugin/rules/prefer-token-values.mjs +1 -3
  97. package/dist/eslint-plugin/rules/prefer-unitless-values.cjs +7 -9
  98. package/dist/eslint-plugin/rules/prefer-unitless-values.mjs +1 -3
  99. package/dist/eslint-plugin/rules/props-only.cjs +5 -7
  100. package/dist/eslint-plugin/rules/props-only.mjs +1 -3
  101. package/dist/eslint-plugin/rules/redundant-cx.cjs +3 -5
  102. package/dist/eslint-plugin/rules/redundant-cx.mjs +1 -3
  103. package/dist/eslint-plugin/rules/require-prop-functions.cjs +6 -8
  104. package/dist/eslint-plugin/rules/require-prop-functions.mjs +1 -3
  105. package/dist/eslint-plugin/utils/api.cjs +3 -5
  106. package/dist/eslint-plugin/utils/api.mjs +1 -3
  107. package/dist/eslint-plugin/utils/ast.cjs +1 -3
  108. package/dist/eslint-plugin/utils/ast.mjs +1 -2
  109. package/dist/eslint-plugin/utils/boss-classes.cjs +5 -7
  110. package/dist/eslint-plugin/utils/boss-classes.mjs +1 -3
  111. package/dist/eslint-plugin/utils/context.cjs +1 -3
  112. package/dist/eslint-plugin/utils/context.mjs +1 -2
  113. package/dist/eslint-plugin/utils/defaults.cjs +1 -3
  114. package/dist/eslint-plugin/utils/defaults.mjs +1 -2
  115. package/dist/eslint-plugin/utils/format.cjs +1 -3
  116. package/dist/eslint-plugin/utils/format.mjs +1 -2
  117. package/dist/eslint-plugin/utils/order.cjs +3 -5
  118. package/dist/eslint-plugin/utils/order.mjs +1 -3
  119. package/dist/eslint-plugin/utils/property-order.cjs +1 -3
  120. package/dist/eslint-plugin/utils/property-order.mjs +1 -2
  121. package/dist/eslint-plugin/utils/static.cjs +1 -3
  122. package/dist/eslint-plugin/utils/static.mjs +1 -2
  123. package/dist/fontsource/directory.cjs +1 -3
  124. package/dist/fontsource/directory.mjs +1 -2
  125. package/dist/fontsource/server.cjs +12 -13
  126. package/dist/fontsource/server.mjs +2 -4
  127. package/dist/index.cjs +6 -6
  128. package/dist/index.mjs +1 -2
  129. package/dist/log/browser.cjs +2 -4
  130. package/dist/log/browser.mjs +1 -3
  131. package/dist/log/server.cjs +6 -8
  132. package/dist/log/server.mjs +1 -3
  133. package/dist/merge/index.cjs +8 -9
  134. package/dist/merge/index.mjs +5 -7
  135. package/dist/native/browser.cjs +3 -4
  136. package/dist/native/browser.mjs +1 -3
  137. package/dist/native/server.cjs +7 -8
  138. package/dist/native/server.mjs +1 -3
  139. package/dist/native/styleTypes.cjs +5 -7
  140. package/dist/native/styleTypes.mjs +1 -3
  141. package/dist/parser/classname/server.cjs +17 -19
  142. package/dist/parser/classname/server.mjs +11 -13
  143. package/dist/parser/jsx/browser.cjs +7 -8
  144. package/dist/parser/jsx/browser.mjs +1 -3
  145. package/dist/parser/jsx/extractCode.cjs +2 -4
  146. package/dist/parser/jsx/extractCode.mjs +2 -3
  147. package/dist/parser/jsx/extractPrepared.cjs +3 -5
  148. package/dist/parser/jsx/extractPrepared.mjs +1 -3
  149. package/dist/parser/jsx/extractProps.cjs +3 -5
  150. package/dist/parser/jsx/extractProps.mjs +1 -3
  151. package/dist/parser/jsx/isDOMProp.cjs +3 -5
  152. package/dist/parser/jsx/isDOMProp.mjs +1 -3
  153. package/dist/parser/jsx/native.cjs +6 -7
  154. package/dist/parser/jsx/native.d.cts +2 -2
  155. package/dist/parser/jsx/native.d.mts +2 -2
  156. package/dist/parser/jsx/native.mjs +1 -3
  157. package/dist/parser/jsx/runtime.cjs +3 -3
  158. package/dist/parser/jsx/runtime.mjs +1 -2
  159. package/dist/parser/jsx/server.cjs +16 -17
  160. package/dist/parser/jsx/server.mjs +3 -5
  161. package/dist/postcss/index.cjs +2 -5
  162. package/dist/postcss/index.mjs +1 -4
  163. package/dist/prop/at/runtime-only.cjs +8 -9
  164. package/dist/prop/at/runtime-only.mjs +6 -8
  165. package/dist/prop/at/server.cjs +27 -28
  166. package/dist/prop/at/server.mjs +17 -19
  167. package/dist/prop/at/shared.cjs +1 -3
  168. package/dist/prop/at/shared.mjs +1 -2
  169. package/dist/prop/bosswind/browser.cjs +4 -5
  170. package/dist/prop/bosswind/browser.mjs +1 -3
  171. package/dist/prop/bosswind/runtime-only.cjs +4 -5
  172. package/dist/prop/bosswind/runtime-only.mjs +1 -3
  173. package/dist/prop/bosswind/selectors.cjs +1 -3
  174. package/dist/prop/bosswind/selectors.mjs +1 -2
  175. package/dist/prop/bosswind/server.cjs +12 -12
  176. package/dist/prop/bosswind/server.mjs +6 -7
  177. package/dist/prop/bosswind/shared.cjs +59 -9
  178. package/dist/prop/bosswind/shared.mjs +57 -8
  179. package/dist/prop/bosswind/tailwind-theme.cjs +2 -38
  180. package/dist/prop/bosswind/tailwind-theme.mjs +2 -37
  181. package/dist/prop/child/runtime-only.cjs +2 -3
  182. package/dist/prop/child/runtime-only.mjs +1 -2
  183. package/dist/prop/child/server.cjs +10 -11
  184. package/dist/prop/child/server.mjs +2 -4
  185. package/dist/prop/css/getDtsTemplate.cjs +7 -6
  186. package/dist/prop/css/getDtsTemplate.mjs +5 -4
  187. package/dist/prop/css/runtime-only.cjs +4 -5
  188. package/dist/prop/css/runtime-only.mjs +1 -3
  189. package/dist/prop/css/server.cjs +12 -13
  190. package/dist/prop/css/server.mjs +4 -6
  191. package/dist/prop/pseudo/runtime-only.cjs +3 -5
  192. package/dist/prop/pseudo/runtime-only.mjs +1 -3
  193. package/dist/prop/pseudo/server.cjs +19 -20
  194. package/dist/prop/pseudo/server.mjs +11 -13
  195. package/dist/prop/pseudo/shared.cjs +1 -3
  196. package/dist/prop/pseudo/shared.mjs +1 -2
  197. package/dist/reset/server.cjs +10 -11
  198. package/dist/reset/server.mjs +2 -4
  199. package/dist/runtime/index.cjs +5 -6
  200. package/dist/runtime/index.mjs +1 -3
  201. package/dist/runtime/preact.cjs +3 -3
  202. package/dist/runtime/preact.mjs +1 -2
  203. package/dist/runtime/qwik.cjs +3 -4
  204. package/dist/runtime/qwik.mjs +1 -3
  205. package/dist/runtime/react.cjs +3 -3
  206. package/dist/runtime/react.mjs +1 -2
  207. package/dist/runtime/solid.cjs +3 -4
  208. package/dist/runtime/solid.mjs +1 -3
  209. package/dist/runtime/stencil.cjs +4 -5
  210. package/dist/runtime/stencil.mjs +1 -3
  211. package/dist/runtime/style.cjs +2 -3
  212. package/dist/runtime/style.mjs +1 -2
  213. package/dist/shared/boundaries.cjs +4 -6
  214. package/dist/shared/boundaries.mjs +1 -3
  215. package/dist/shared/customCss.cjs +1 -3
  216. package/dist/shared/customCss.mjs +1 -2
  217. package/dist/shared/debug.cjs +2 -4
  218. package/dist/shared/debug.mjs +2 -3
  219. package/dist/shared/file.cjs +3 -5
  220. package/dist/shared/file.mjs +1 -3
  221. package/dist/shared/framework.cjs +1 -3
  222. package/dist/shared/framework.mjs +1 -2
  223. package/dist/shared/json.cjs +1 -3
  224. package/dist/shared/json.mjs +1 -2
  225. package/dist/shared/types.cjs +1 -3
  226. package/dist/shared/types.mjs +1 -2
  227. package/dist/strategy/classic/runtime-only.cjs +15 -16
  228. package/dist/strategy/classic/runtime-only.mjs +3 -5
  229. package/dist/strategy/classname-first/browser.cjs +7 -8
  230. package/dist/strategy/classname-first/browser.mjs +1 -3
  231. package/dist/strategy/classname-first/runtime-only.cjs +13 -14
  232. package/dist/strategy/classname-first/runtime-only.mjs +1 -3
  233. package/dist/strategy/classname-first/server.cjs +9 -11
  234. package/dist/strategy/classname-first/server.mjs +3 -5
  235. package/dist/strategy/classname-only/server.cjs +8 -10
  236. package/dist/strategy/classname-only/server.mjs +2 -4
  237. package/dist/strategy/inline-first/browser.cjs +6 -7
  238. package/dist/strategy/inline-first/browser.mjs +1 -3
  239. package/dist/strategy/inline-first/runtime-only.cjs +12 -13
  240. package/dist/strategy/inline-first/runtime-only.mjs +1 -3
  241. package/dist/strategy/inline-first/server.cjs +9 -11
  242. package/dist/strategy/inline-first/server.mjs +3 -5
  243. package/dist/strategy/runtime/runtime-only.cjs +6 -8
  244. package/dist/strategy/runtime/runtime-only.mjs +1 -4
  245. package/dist/strategy/runtime/server.cjs +11 -12
  246. package/dist/strategy/runtime/server.mjs +2 -4
  247. package/dist/strategy/runtime-only/css.cjs +5 -6
  248. package/dist/strategy/runtime-only/css.mjs +4 -5
  249. package/dist/tasks/build.cjs +8 -10
  250. package/dist/tasks/build.mjs +1 -3
  251. package/dist/tasks/compile.cjs +2 -4
  252. package/dist/tasks/compile.mjs +1 -3
  253. package/dist/tasks/postcss.cjs +11 -13
  254. package/dist/tasks/postcss.mjs +1 -3
  255. package/dist/tasks/session.cjs +4 -6
  256. package/dist/tasks/session.mjs +1 -3
  257. package/dist/tasks/watch.cjs +7 -9
  258. package/dist/tasks/watch.mjs +1 -3
  259. package/dist/transform/cache.cjs +1 -3
  260. package/dist/transform/cache.mjs +1 -2
  261. package/dist/transform/processFile.cjs +4 -6
  262. package/dist/transform/processFile.mjs +1 -3
  263. package/dist/use/token/browser.cjs +4 -5
  264. package/dist/use/token/browser.mjs +1 -3
  265. package/dist/use/token/normalize.cjs +1 -3
  266. package/dist/use/token/normalize.mjs +1 -2
  267. package/dist/use/token/propMap.cjs +1 -3
  268. package/dist/use/token/propMap.d.cts +1 -1
  269. package/dist/use/token/propMap.d.mts +1 -1
  270. package/dist/use/token/propMap.mjs +1 -2
  271. package/dist/use/token/runtime-only.cjs +5 -6
  272. package/dist/use/token/runtime-only.mjs +1 -3
  273. package/dist/use/token/server.cjs +13 -14
  274. package/dist/use/token/server.mjs +4 -6
  275. package/dist/use/token/vars.cjs +2 -4
  276. package/dist/use/token/vars.mjs +1 -3
  277. package/package.json +23 -23
  278. package/dist/_virtual/rolldown_runtime.mjs +0 -20
@@ -1,7 +1,6 @@
1
- const require_rolldown_runtime = require('../_virtual/rolldown_runtime.cjs');
2
- const require_jsx = require('./jsx.cjs');
1
+ require("../_virtual/_rolldown/runtime.cjs");
2
+ const require_jsx = require("./jsx.cjs");
3
3
  let _swc_core = require("@swc/core");
4
-
5
4
  //#region src/compile/prepared.ts
6
5
  function scanPrepared(source, options) {
7
6
  const parsed = (0, _swc_core.parseSync)(source, {
@@ -83,6 +82,5 @@ const getPreparedObjectExpression = (expression) => {
83
82
  }
84
83
  return null;
85
84
  };
86
-
87
85
  //#endregion
88
- exports.scanPrepared = scanPrepared;
86
+ exports.scanPrepared = scanPrepared;
@@ -1,6 +1,5 @@
1
1
  import { buildPreparedDefinition, isPreparedDefinitionStatic } from "./jsx.mjs";
2
2
  import { parseSync } from "@swc/core";
3
-
4
3
  //#region src/compile/prepared.ts
5
4
  function scanPrepared(source, options) {
6
5
  const parsed = parseSync(source, {
@@ -82,6 +81,5 @@ const getPreparedObjectExpression = (expression) => {
82
81
  }
83
82
  return null;
84
83
  };
85
-
86
84
  //#endregion
87
- export { scanPrepared };
85
+ export { scanPrepared };
@@ -1,6 +1,6 @@
1
- const require_dictionary = require('../api/dictionary.cjs');
2
- const require_vars = require('../use/token/vars.cjs');
3
-
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
+ const require_dictionary = require("../api/dictionary.cjs");
3
+ const require_vars = require("../use/token/vars.cjs");
4
4
  //#region src/compile/runtime.ts
5
5
  const createBossValue = (unit) => {
6
6
  return (value) => {
@@ -27,7 +27,6 @@ const createBossTokenVars = (unit, prefix = "") => {
27
27
  });
28
28
  return (input) => builder(input);
29
29
  };
30
-
31
30
  //#endregion
32
31
  exports.createBossTokenVars = createBossTokenVars;
33
- exports.createBossValue = createBossValue;
32
+ exports.createBossValue = createBossValue;
@@ -1,6 +1,5 @@
1
1
  import { isNumericValue, unitlessProperties } from "../api/dictionary.mjs";
2
2
  import { createTokenVars } from "../use/token/vars.mjs";
3
-
4
3
  //#region src/compile/runtime.ts
5
4
  const createBossValue = (unit) => {
6
5
  return (value) => {
@@ -27,6 +26,5 @@ const createBossTokenVars = (unit, prefix = "") => {
27
26
  });
28
27
  return (input) => builder(input);
29
28
  };
30
-
31
29
  //#endregion
32
- export { createBossTokenVars, createBossValue };
30
+ export { createBossTokenVars, createBossValue };
@@ -1,12 +1,11 @@
1
- const require_rolldown_runtime = require('../_virtual/rolldown_runtime.cjs');
2
- const require_framework = require('../shared/framework.cjs');
3
- const require_classname = require('./classname.cjs');
4
- const require_jsx = require('./jsx.cjs');
5
- const require_customCss = require('../shared/customCss.cjs');
1
+ const require_runtime = require("../_virtual/_rolldown/runtime.cjs");
2
+ const require_framework = require("../shared/framework.cjs");
3
+ const require_classname = require("./classname.cjs");
4
+ const require_jsx = require("./jsx.cjs");
5
+ const require_customCss = require("../shared/customCss.cjs");
6
6
  let node_path = require("node:path");
7
- node_path = require_rolldown_runtime.__toESM(node_path);
7
+ node_path = require_runtime.__toESM(node_path);
8
8
  let _swc_core = require("@swc/core");
9
-
10
9
  //#region src/compile/transform.ts
11
10
  const jsxExtensions = new Set([
12
11
  ".jsx",
@@ -402,6 +401,5 @@ const getPreparedObjectExpression = (expression) => {
402
401
  }
403
402
  return null;
404
403
  };
405
-
406
404
  //#endregion
407
- exports.transformSource = transformSource;
405
+ exports.transformSource = transformSource;
@@ -4,7 +4,6 @@ import { buildPreparedDefinition, transformJsxElement } from "./jsx.mjs";
4
4
  import { extractCustomCssText } from "../shared/customCss.mjs";
5
5
  import path from "node:path";
6
6
  import { parseSync, printSync } from "@swc/core";
7
-
8
7
  //#region src/compile/transform.ts
9
8
  const jsxExtensions = new Set([
10
9
  ".jsx",
@@ -33,8 +32,8 @@ const createStringLiteral = (value, span) => ({
33
32
  value,
34
33
  raw: JSON.stringify(value)
35
34
  });
36
- const tokenPathToVar = (path$1, prefix) => {
37
- return `var(--${prefix}${path$1.replace(/\./g, "-")})`;
35
+ const tokenPathToVar = (path, prefix) => {
36
+ return `var(--${prefix}${path.replace(/\./g, "-")})`;
38
37
  };
39
38
  const getTokenPathFromMemberExpression = (expression) => {
40
39
  const parts = [];
@@ -400,6 +399,5 @@ const getPreparedObjectExpression = (expression) => {
400
399
  }
401
400
  return null;
402
401
  };
403
-
404
402
  //#endregion
405
- export { transformSource };
403
+ export { transformSource };
package/dist/cx/index.cjs CHANGED
@@ -1,12 +1,12 @@
1
- const require_rolldown_runtime = require('../_virtual/rolldown_runtime.cjs');
2
- const require_merge_index = require('../merge/index.cjs');
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
+ require("../_virtual/_rolldown/runtime.cjs");
3
+ const require_merge_index = require("../merge/index.cjs");
3
4
  let css_variants = require("css-variants");
4
-
5
5
  //#region src/cx/index.ts
6
6
  const createBossClassNameResolver = (mergeConfig, resolver = css_variants.cx) => {
7
- const merge$1 = require_merge_index.createBossMerge(mergeConfig);
7
+ const merge = require_merge_index.createBossMerge(mergeConfig);
8
8
  return (...inputs) => {
9
- return merge$1(resolver(...inputs));
9
+ return merge(resolver(...inputs));
10
10
  };
11
11
  };
12
12
  const createBossCx = (config = {}) => {
@@ -81,7 +81,6 @@ const createBossSv = () => {
81
81
  };
82
82
  };
83
83
  const sv = createBossSv();
84
-
85
84
  //#endregion
86
85
  exports.createBossCv = createBossCv;
87
86
  exports.createBossCx = createBossCx;
@@ -90,4 +89,4 @@ exports.createBossSv = createBossSv;
90
89
  exports.cv = cv;
91
90
  exports.cx = cx;
92
91
  exports.scv = scv;
93
- exports.sv = sv;
92
+ exports.sv = sv;
package/dist/cx/index.mjs CHANGED
@@ -1,11 +1,10 @@
1
1
  import { createBossMerge, merge } from "../merge/index.mjs";
2
2
  import { cv as cv$1, cx as cx$1, scv as scv$1 } from "css-variants";
3
-
4
3
  //#region src/cx/index.ts
5
4
  const createBossClassNameResolver = (mergeConfig, resolver = cx$1) => {
6
- const merge$1 = createBossMerge(mergeConfig);
5
+ const merge = createBossMerge(mergeConfig);
7
6
  return (...inputs) => {
8
- return merge$1(resolver(...inputs));
7
+ return merge(resolver(...inputs));
9
8
  };
10
9
  };
11
10
  const createBossCx = (config = {}) => {
@@ -80,6 +79,5 @@ const createBossSv = () => {
80
79
  };
81
80
  };
82
81
  const sv = createBossSv();
83
-
84
82
  //#endregion
85
- export { createBossCv, createBossCx, createBossScv, createBossSv, cv, cx, scv, sv };
83
+ export { createBossCv, createBossCx, createBossScv, createBossSv, cv, cx, scv, sv };
@@ -1,10 +1,10 @@
1
- const require_rolldown_runtime = require('../_virtual/rolldown_runtime.cjs');
2
- const require_json = require('../shared/json.cjs');
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
+ const require_runtime = require("../_virtual/_rolldown/runtime.cjs");
3
+ const require_json = require("../shared/json.cjs");
3
4
  let node_fs_promises = require("node:fs/promises");
4
- node_fs_promises = require_rolldown_runtime.__toESM(node_fs_promises);
5
+ node_fs_promises = require_runtime.__toESM(node_fs_promises);
5
6
  let node_path = require("node:path");
6
- node_path = require_rolldown_runtime.__toESM(node_path);
7
-
7
+ node_path = require_runtime.__toESM(node_path);
8
8
  //#region src/detect-fw/index.ts
9
9
  const jsxFrameworks = [
10
10
  {
@@ -377,8 +377,7 @@ const listFrameworks = () => jsxFrameworks.map((entry) => ({
377
377
  className: entry.className,
378
378
  jsx: entry.jsx
379
379
  }));
380
-
381
380
  //#endregion
382
381
  exports.detectFramework = detectFramework;
383
382
  exports.getJsxTypes = getJsxTypes;
384
- exports.listFrameworks = listFrameworks;
383
+ exports.listFrameworks = listFrameworks;
@@ -1,7 +1,6 @@
1
1
  import { parseJson } from "../shared/json.mjs";
2
2
  import fs from "node:fs/promises";
3
3
  import path from "node:path";
4
-
5
4
  //#region src/detect-fw/index.ts
6
5
  const jsxFrameworks = [
7
6
  {
@@ -374,6 +373,5 @@ const listFrameworks = () => jsxFrameworks.map((entry) => ({
374
373
  className: entry.className,
375
374
  jsx: entry.jsx
376
375
  }));
377
-
378
376
  //#endregion
379
- export { detectFramework, getJsxTypes, listFrameworks };
377
+ export { detectFramework, getJsxTypes, listFrameworks };
@@ -1,4 +1,4 @@
1
-
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
2
  //#region src/dev/client.ts
3
3
  const DEVTOOLS_ATTR = "data-boss-devtools";
4
4
  const ROOT_ID = "boss-devtools-root";
@@ -34,6 +34,5 @@ async function loadDevtools() {
34
34
  return null;
35
35
  }
36
36
  }
37
-
38
37
  //#endregion
39
- exports.startDevClient = startDevClient;
38
+ exports.startDevClient = startDevClient;
@@ -33,6 +33,5 @@ async function loadDevtools() {
33
33
  return null;
34
34
  }
35
35
  }
36
-
37
36
  //#endregion
38
- export { startDevClient };
37
+ export { startDevClient };
@@ -1,11 +1,10 @@
1
-
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
2
  //#region src/dev/plugin/browser.ts
3
3
  const name = "devtools";
4
4
  const onBrowserObjectStart = (api, { output = {}, contexts = [] }) => {
5
5
  if (contexts.length) return;
6
6
  output["data-boss"] = "true";
7
7
  };
8
-
9
8
  //#endregion
10
9
  exports.name = name;
11
- exports.onBrowserObjectStart = onBrowserObjectStart;
10
+ exports.onBrowserObjectStart = onBrowserObjectStart;
@@ -4,6 +4,5 @@ const onBrowserObjectStart = (api, { output = {}, contexts = [] }) => {
4
4
  if (contexts.length) return;
5
5
  output["data-boss"] = "true";
6
6
  };
7
-
8
7
  //#endregion
9
- export { name, onBrowserObjectStart };
8
+ export { name, onBrowserObjectStart };
@@ -1,10 +1,10 @@
1
- const require_rolldown_runtime = require('../../_virtual/rolldown_runtime.cjs');
2
- const require_shared = require('../shared.cjs');
3
- const require_dev_server = require('../server.cjs');
4
- const require_port = require('../port.cjs');
5
-
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
+ const require_runtime = require("../../_virtual/_rolldown/runtime.cjs");
3
+ const require_shared = require("../shared.cjs");
4
+ const require_dev_server = require("../server.cjs");
5
+ const require_port = require("../port.cjs");
6
6
  //#region src/dev/plugin/server.ts
7
- var server_exports = /* @__PURE__ */ require_rolldown_runtime.__exportAll({
7
+ var server_exports = /* @__PURE__ */ require_runtime.__exportAll({
8
8
  name: () => name,
9
9
  onBoot: () => onBoot,
10
10
  onSession: () => onSession
@@ -26,7 +26,7 @@ const onBoot = async (api) => {
26
26
  });
27
27
  api.file.js.set("body", "devtools:globalThis", `globalThis.host$$ = ${hostApiVar}`);
28
28
  const port = Number(api.devServer?.port);
29
- if (Number.isFinite(port) && port !== require_shared.DEFAULT_DEV_PORT) api.file.js.config({
29
+ if (Number.isFinite(port) && port !== 48400) api.file.js.config({
30
30
  from: "boss-css/dev/plugin",
31
31
  config: { devServer: { port } }
32
32
  });
@@ -91,14 +91,13 @@ const onSession = async (api, session) => {
91
91
  if (api?.devServer?.autoStart === false) return;
92
92
  await ensureDevServer(api, session);
93
93
  };
94
-
95
94
  //#endregion
96
95
  exports.name = name;
97
96
  exports.onBoot = onBoot;
98
97
  exports.onSession = onSession;
99
- Object.defineProperty(exports, 'server_exports', {
100
- enumerable: true,
101
- get: function () {
102
- return server_exports;
103
- }
104
- });
98
+ Object.defineProperty(exports, "server_exports", {
99
+ enumerable: true,
100
+ get: function() {
101
+ return server_exports;
102
+ }
103
+ });
@@ -1,8 +1,7 @@
1
- import { __exportAll } from "../../_virtual/rolldown_runtime.mjs";
1
+ import { __exportAll } from "../../_virtual/_rolldown/runtime.mjs";
2
2
  import { DEFAULT_DEV_PORT } from "../shared.mjs";
3
3
  import { startDevServer } from "../server.mjs";
4
4
  import { updateDevPort, updateRuntimePort } from "../port.mjs";
5
-
6
5
  //#region src/dev/plugin/server.ts
7
6
  var server_exports = /* @__PURE__ */ __exportAll({
8
7
  name: () => name,
@@ -26,7 +25,7 @@ const onBoot = async (api) => {
26
25
  });
27
26
  api.file.js.set("body", "devtools:globalThis", `globalThis.host$$ = ${hostApiVar}`);
28
27
  const port = Number(api.devServer?.port);
29
- if (Number.isFinite(port) && port !== DEFAULT_DEV_PORT) api.file.js.config({
28
+ if (Number.isFinite(port) && port !== 48400) api.file.js.config({
30
29
  from: "boss-css/dev/plugin",
31
30
  config: { devServer: { port } }
32
31
  });
@@ -91,6 +90,5 @@ const onSession = async (api, session) => {
91
90
  if (api?.devServer?.autoStart === false) return;
92
91
  await ensureDevServer(api, session);
93
92
  };
94
-
95
93
  //#endregion
96
- export { name, onBoot, onSession, server_exports };
94
+ export { name, onBoot, onSession, server_exports };
package/dist/dev/port.cjs CHANGED
@@ -1,7 +1,6 @@
1
- const require_rolldown_runtime = require('../_virtual/rolldown_runtime.cjs');
1
+ const require_runtime = require("../_virtual/_rolldown/runtime.cjs");
2
2
  let node_fs_promises = require("node:fs/promises");
3
- node_fs_promises = require_rolldown_runtime.__toESM(node_fs_promises);
4
-
3
+ node_fs_promises = require_runtime.__toESM(node_fs_promises);
5
4
  //#region src/dev/port.ts
6
5
  const updateDevPort = async (configPath, port, allowInsert) => {
7
6
  const raw = await node_fs_promises.default.readFile(configPath, "utf8");
@@ -40,7 +39,6 @@ const updateRuntimePort = async (runtimePath, port) => {
40
39
  return false;
41
40
  }
42
41
  };
43
-
44
42
  //#endregion
45
43
  exports.updateDevPort = updateDevPort;
46
- exports.updateRuntimePort = updateRuntimePort;
44
+ exports.updateRuntimePort = updateRuntimePort;
package/dist/dev/port.mjs CHANGED
@@ -1,5 +1,4 @@
1
1
  import fs from "node:fs/promises";
2
-
3
2
  //#region src/dev/port.ts
4
3
  const updateDevPort = async (configPath, port, allowInsert) => {
5
4
  const raw = await fs.readFile(configPath, "utf8");
@@ -38,6 +37,5 @@ const updateRuntimePort = async (runtimePath, port) => {
38
37
  return false;
39
38
  }
40
39
  };
41
-
42
40
  //#endregion
43
- export { updateDevPort, updateRuntimePort };
41
+ export { updateDevPort, updateRuntimePort };
@@ -1,6 +1,5 @@
1
- const require_api_browser = require('../api/browser.cjs');
2
- const require_shared = require('./shared.cjs');
3
-
1
+ const require_api_browser = require("../api/browser.cjs");
2
+ const require_shared = require("./shared.cjs");
4
3
  //#region src/dev/runtime.ts
5
4
  const getDevPort = () => {
6
5
  const rawPort = require_api_browser.api?.devServer?.port;
@@ -24,5 +23,4 @@ const isDevEnvironment = () => {
24
23
  return true;
25
24
  };
26
25
  startDevtools();
27
-
28
- //#endregion
26
+ //#endregion
@@ -1,6 +1,5 @@
1
1
  import { api } from "../api/browser.mjs";
2
2
  import { DEFAULT_DEV_PORT } from "./shared.mjs";
3
-
4
3
  //#region src/dev/runtime.ts
5
4
  const getDevPort = () => {
6
5
  const rawPort = api?.devServer?.port;
@@ -24,6 +23,5 @@ const isDevEnvironment = () => {
24
23
  return true;
25
24
  };
26
25
  startDevtools();
27
-
28
26
  //#endregion
29
- export { };
27
+ export {};
@@ -1,16 +1,16 @@
1
- const require_rolldown_runtime = require('../_virtual/rolldown_runtime.cjs');
2
- const require_api_server = require('../api/server.cjs');
3
- const require_api_config = require('../api/config.cjs');
4
- const require_propMap = require('../use/token/propMap.cjs');
5
- const require_use_token_server = require('../use/token/server.cjs');
6
- const require_shared = require('./shared.cjs');
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
+ const require_runtime = require("../_virtual/_rolldown/runtime.cjs");
3
+ const require_api_server = require("../api/server.cjs");
4
+ const require_api_config = require("../api/config.cjs");
5
+ const require_propMap = require("../use/token/propMap.cjs");
6
+ const require_use_token_server = require("../use/token/server.cjs");
7
+ const require_shared = require("./shared.cjs");
7
8
  let node_fs_promises = require("node:fs/promises");
8
- node_fs_promises = require_rolldown_runtime.__toESM(node_fs_promises);
9
+ node_fs_promises = require_runtime.__toESM(node_fs_promises);
9
10
  let node_path = require("node:path");
10
- node_path = require_rolldown_runtime.__toESM(node_path);
11
+ node_path = require_runtime.__toESM(node_path);
11
12
  let node_url = require("node:url");
12
13
  let ws = require("ws");
13
-
14
14
  //#region src/dev/server.ts
15
15
  const DEFAULT_MAX_PORT = require_shared.DEFAULT_DEV_PORT + 49;
16
16
  async function startDevServer({ port = require_shared.DEFAULT_DEV_PORT, maxPort = DEFAULT_MAX_PORT, host = "127.0.0.1" } = {}) {
@@ -263,8 +263,8 @@ async function applyEdit(message) {
263
263
  start = target.attrRange.start;
264
264
  end = target.attrRange.end;
265
265
  const nextAttr = `${target.attrName ?? propPath[0] ?? "prop"}${kind === "boolean" && parsedValue === true ? "" : `={${replacement}}`}`;
266
- const updated$1 = replaceText(code, start, end, nextAttr);
267
- await node_fs_promises.default.writeFile(filePath, updated$1);
266
+ const updated = replaceText(code, start, end, nextAttr);
267
+ await node_fs_promises.default.writeFile(filePath, updated);
268
268
  return;
269
269
  }
270
270
  const updated = replaceText(code, start, end, replacement);
@@ -886,6 +886,5 @@ const formatString = (value, quote) => {
886
886
  const replaceText = (code, start, end, replacement) => {
887
887
  return code.slice(0, start) + replacement + code.slice(end);
888
888
  };
889
-
890
889
  //#endregion
891
- exports.startDevServer = startDevServer;
890
+ exports.startDevServer = startDevServer;
@@ -7,7 +7,6 @@ import fs from "node:fs/promises";
7
7
  import path from "node:path";
8
8
  import { fileURLToPath } from "node:url";
9
9
  import { WebSocketServer } from "ws";
10
-
11
10
  //#region src/dev/server.ts
12
11
  const DEFAULT_MAX_PORT = DEFAULT_DEV_PORT + 49;
13
12
  async function startDevServer({ port = DEFAULT_DEV_PORT, maxPort = DEFAULT_MAX_PORT, host = "127.0.0.1" } = {}) {
@@ -260,8 +259,8 @@ async function applyEdit(message) {
260
259
  start = target.attrRange.start;
261
260
  end = target.attrRange.end;
262
261
  const nextAttr = `${target.attrName ?? propPath[0] ?? "prop"}${kind === "boolean" && parsedValue === true ? "" : `={${replacement}}`}`;
263
- const updated$1 = replaceText(code, start, end, nextAttr);
264
- await fs.writeFile(filePath, updated$1);
262
+ const updated = replaceText(code, start, end, nextAttr);
263
+ await fs.writeFile(filePath, updated);
265
264
  return;
266
265
  }
267
266
  const updated = replaceText(code, start, end, replacement);
@@ -745,15 +744,15 @@ const buildPropEntries = (tag, code) => {
745
744
  index
746
745
  };
747
746
  };
748
- const collectParsedNode = (node, path$1, attr, entries, index, code) => {
747
+ const collectParsedNode = (node, path, attr, entries, index, code) => {
749
748
  if (node.kind === "string") {
750
749
  entries.push({
751
- path: path$1,
750
+ path,
752
751
  value: node.value,
753
752
  editable: true,
754
753
  kind: "string"
755
754
  });
756
- index.set(path$1.join("."), {
755
+ index.set(path.join("."), {
757
756
  attrName: attr.name,
758
757
  attrRange: attr.range,
759
758
  range: node.range,
@@ -764,12 +763,12 @@ const collectParsedNode = (node, path$1, attr, entries, index, code) => {
764
763
  }
765
764
  if (node.kind === "number") {
766
765
  entries.push({
767
- path: path$1,
766
+ path,
768
767
  value: node.value,
769
768
  editable: true,
770
769
  kind: "number"
771
770
  });
772
- index.set(path$1.join("."), {
771
+ index.set(path.join("."), {
773
772
  attrName: attr.name,
774
773
  attrRange: attr.range,
775
774
  range: node.range,
@@ -779,12 +778,12 @@ const collectParsedNode = (node, path$1, attr, entries, index, code) => {
779
778
  }
780
779
  if (node.kind === "boolean") {
781
780
  entries.push({
782
- path: path$1,
781
+ path,
783
782
  value: node.value,
784
783
  editable: true,
785
784
  kind: "boolean"
786
785
  });
787
- index.set(path$1.join("."), {
786
+ index.set(path.join("."), {
788
787
  attrName: attr.name,
789
788
  attrRange: attr.range,
790
789
  range: node.range,
@@ -795,19 +794,19 @@ const collectParsedNode = (node, path$1, attr, entries, index, code) => {
795
794
  if (node.kind === "array") {
796
795
  if (node.value.every(isPrimitiveNode)) {
797
796
  entries.push({
798
- path: path$1,
797
+ path,
799
798
  value: node.value.map((item) => item.value),
800
799
  editable: true,
801
800
  kind: "array"
802
801
  });
803
- index.set(path$1.join("."), {
802
+ index.set(path.join("."), {
804
803
  attrName: attr.name,
805
804
  attrRange: attr.range,
806
805
  range: node.range,
807
806
  kind: "array"
808
807
  });
809
808
  } else entries.push({
810
- path: path$1,
809
+ path,
811
810
  value: null,
812
811
  editable: false,
813
812
  kind: "expression",
@@ -816,11 +815,11 @@ const collectParsedNode = (node, path$1, attr, entries, index, code) => {
816
815
  return;
817
816
  }
818
817
  if (node.kind === "object") {
819
- for (const [key, value] of Object.entries(node.value)) collectParsedNode(value, [...path$1, key], attr, entries, index, code);
818
+ for (const [key, value] of Object.entries(node.value)) collectParsedNode(value, [...path, key], attr, entries, index, code);
820
819
  return;
821
820
  }
822
821
  entries.push({
823
- path: path$1,
822
+ path,
824
823
  value: null,
825
824
  editable: false,
826
825
  kind: "expression",
@@ -883,6 +882,5 @@ const formatString = (value, quote) => {
883
882
  const replaceText = (code, start, end, replacement) => {
884
883
  return code.slice(0, start) + replacement + code.slice(end);
885
884
  };
886
-
887
885
  //#endregion
888
- export { startDevServer };
886
+ export { startDevServer };
@@ -1,6 +1,4 @@
1
-
2
1
  //#region src/dev/shared.ts
3
2
  const DEFAULT_DEV_PORT = 48400;
4
-
5
3
  //#endregion
6
- exports.DEFAULT_DEV_PORT = DEFAULT_DEV_PORT;
4
+ exports.DEFAULT_DEV_PORT = DEFAULT_DEV_PORT;
@@ -1,5 +1,4 @@
1
1
  //#region src/dev/shared.ts
2
2
  const DEFAULT_DEV_PORT = 48400;
3
-
4
3
  //#endregion
5
- export { DEFAULT_DEV_PORT };
4
+ export { DEFAULT_DEV_PORT };
@@ -1,13 +1,12 @@
1
- const require_format_classnames = require('./rules/format-classnames.cjs');
2
- const require_no_unknown_classes = require('./rules/no-unknown-classes.cjs');
3
- const require_props_only = require('./rules/props-only.cjs');
4
- const require_classnames_only = require('./rules/classnames-only.cjs');
5
- const require_prefer_classnames = require('./rules/prefer-classnames.cjs');
6
- const require_require_prop_functions = require('./rules/require-prop-functions.cjs');
7
- const require_redundant_cx = require('./rules/redundant-cx.cjs');
8
- const require_prefer_token_values = require('./rules/prefer-token-values.cjs');
9
- const require_prefer_unitless_values = require('./rules/prefer-unitless-values.cjs');
10
-
1
+ const require_format_classnames = require("./rules/format-classnames.cjs");
2
+ const require_no_unknown_classes = require("./rules/no-unknown-classes.cjs");
3
+ const require_props_only = require("./rules/props-only.cjs");
4
+ const require_classnames_only = require("./rules/classnames-only.cjs");
5
+ const require_prefer_classnames = require("./rules/prefer-classnames.cjs");
6
+ const require_require_prop_functions = require("./rules/require-prop-functions.cjs");
7
+ const require_redundant_cx = require("./rules/redundant-cx.cjs");
8
+ const require_prefer_token_values = require("./rules/prefer-token-values.cjs");
9
+ const require_prefer_unitless_values = require("./rules/prefer-unitless-values.cjs");
11
10
  //#region src/eslint-plugin/index.js
12
11
  const plugin = {
13
12
  meta: { name: "boss-css" },
@@ -63,7 +62,5 @@ const config = {
63
62
  }))
64
63
  }
65
64
  };
66
- var eslint_plugin_default = config;
67
-
68
65
  //#endregion
69
- module.exports = eslint_plugin_default;
66
+ module.exports = config;
@@ -7,7 +7,6 @@ import require_prop_functions_default from "./rules/require-prop-functions.mjs";
7
7
  import redundant_cx_default from "./rules/redundant-cx.mjs";
8
8
  import prefer_token_values_default from "./rules/prefer-token-values.mjs";
9
9
  import prefer_unitless_values_default from "./rules/prefer-unitless-values.mjs";
10
-
11
10
  //#region src/eslint-plugin/index.js
12
11
  const plugin = {
13
12
  meta: { name: "boss-css" },
@@ -63,7 +62,5 @@ const config = {
63
62
  }))
64
63
  }
65
64
  };
66
- var eslint_plugin_default = config;
67
-
68
65
  //#endregion
69
- export { eslint_plugin_default as default };
66
+ export { config as default };
@@ -1,7 +1,6 @@
1
- const require_ast = require('../utils/ast.cjs');
2
- const require_defaults = require('../utils/defaults.cjs');
3
- const require_boss_classes = require('../utils/boss-classes.cjs');
4
-
1
+ const require_ast = require("../utils/ast.cjs");
2
+ const require_defaults = require("../utils/defaults.cjs");
3
+ const require_boss_classes = require("../utils/boss-classes.cjs");
5
4
  //#region src/eslint-plugin/rules/classnames-only.js
6
5
  const RULE_NAME = "classnames-only";
7
6
  const defaultOptions = {
@@ -63,6 +62,5 @@ var classnames_only_default = {
63
62
  },
64
63
  create
65
64
  };
66
-
67
65
  //#endregion
68
- exports.default = classnames_only_default;
66
+ exports.default = classnames_only_default;