@csszyx/unplugin 0.6.0 → 0.6.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.
@@ -228,7 +228,7 @@ function buildRecoveryManifest(tokens, options = {}) {
228
228
  strippedDevOnlyPaths.push(data.path);
229
229
  continue;
230
230
  }
231
- sorted[key] = data;
231
+ sorted[key] = stripped ? { mode: data.mode, component: data.component, path: "" } : data;
232
232
  }
233
233
  const serialised = JSON.stringify(sorted);
234
234
  const fullChecksum = createHash("sha256").update(serialised).digest("hex");
@@ -578,6 +578,7 @@ function mangleCodeClassesSync(code, mangleMap) {
578
578
  }
579
579
  function createCsszyxPlugins(options = {}) {
580
580
  const manglingEnabled = options.production?.mangle !== false;
581
+ const astBudgetOverride = options.build?.astBudgetLimit;
581
582
  const state = {
582
583
  classes: /* @__PURE__ */ new Set(),
583
584
  mangleMap: {},
@@ -629,7 +630,7 @@ function createCsszyxPlugins(options = {}) {
629
630
  if (!content.includes("sz=") && !content.includes("sz:")) {
630
631
  continue;
631
632
  }
632
- const result = transformSourceCode(content, filePath);
633
+ const result = transformSourceCode(content, filePath, { astBudget: astBudgetOverride });
633
634
  if (!result.transformed) {
634
635
  continue;
635
636
  }
@@ -863,7 +864,7 @@ ${sourceDirective}`
863
864
  transformed = true;
864
865
  }
865
866
  } else {
866
- const result = transformSourceCode(code, id);
867
+ const result = transformSourceCode(code, id, { astBudget: astBudgetOverride });
867
868
  transformedCode = result.code;
868
869
  usesRuntime = result.usesRuntime;
869
870
  usesMerge = result.usesMerge;
@@ -1019,7 +1020,7 @@ ${sourceDirective}`
1019
1020
  return;
1020
1021
  }
1021
1022
  try {
1022
- result = transformSourceCode(fileContent, ctx.file);
1023
+ result = transformSourceCode(fileContent, ctx.file, { astBudget: astBudgetOverride });
1023
1024
  } catch {
1024
1025
  return;
1025
1026
  }
package/dist/index.cjs CHANGED
@@ -469,7 +469,7 @@ function buildRecoveryManifest(tokens, options = {}) {
469
469
  strippedDevOnlyPaths.push(data.path);
470
470
  continue;
471
471
  }
472
- sorted[key] = data;
472
+ sorted[key] = stripped ? { mode: data.mode, component: data.component, path: "" } : data;
473
473
  }
474
474
  const serialised = JSON.stringify(sorted);
475
475
  const fullChecksum = (0, import_node_crypto.createHash)("sha256").update(serialised).digest("hex");
@@ -819,6 +819,7 @@ function mangleCodeClassesSync(code, mangleMap) {
819
819
  }
820
820
  function createCsszyxPlugins(options = {}) {
821
821
  const manglingEnabled = options.production?.mangle !== false;
822
+ const astBudgetOverride = options.build?.astBudgetLimit;
822
823
  const state = {
823
824
  classes: /* @__PURE__ */ new Set(),
824
825
  mangleMap: {},
@@ -870,7 +871,7 @@ function createCsszyxPlugins(options = {}) {
870
871
  if (!content.includes("sz=") && !content.includes("sz:")) {
871
872
  continue;
872
873
  }
873
- const result = (0, import_compiler.transformSourceCode)(content, filePath);
874
+ const result = (0, import_compiler.transformSourceCode)(content, filePath, { astBudget: astBudgetOverride });
874
875
  if (!result.transformed) {
875
876
  continue;
876
877
  }
@@ -1104,7 +1105,7 @@ ${sourceDirective}`
1104
1105
  transformed = true;
1105
1106
  }
1106
1107
  } else {
1107
- const result = (0, import_compiler.transformSourceCode)(code, id);
1108
+ const result = (0, import_compiler.transformSourceCode)(code, id, { astBudget: astBudgetOverride });
1108
1109
  transformedCode = result.code;
1109
1110
  usesRuntime = result.usesRuntime;
1110
1111
  usesMerge = result.usesMerge;
@@ -1260,7 +1261,7 @@ ${sourceDirective}`
1260
1261
  return;
1261
1262
  }
1262
1263
  try {
1263
- result = (0, import_compiler.transformSourceCode)(fileContent, ctx.file);
1264
+ result = (0, import_compiler.transformSourceCode)(fileContent, ctx.file, { astBudget: astBudgetOverride });
1264
1265
  } catch {
1265
1266
  return;
1266
1267
  }
package/dist/index.js CHANGED
@@ -8,7 +8,7 @@ import {
8
8
  unplugin,
9
9
  vitePlugin,
10
10
  webpackPlugin
11
- } from "./chunk-HOQTC45W.js";
11
+ } from "./chunk-JGJOUK2R.js";
12
12
  import {
13
13
  createPostCSSPlugin,
14
14
  escapeCSSClassName,
package/dist/vite.cjs CHANGED
@@ -214,7 +214,7 @@ function buildRecoveryManifest(tokens, options = {}) {
214
214
  strippedDevOnlyPaths.push(data.path);
215
215
  continue;
216
216
  }
217
- sorted[key] = data;
217
+ sorted[key] = stripped ? { mode: data.mode, component: data.component, path: "" } : data;
218
218
  }
219
219
  const serialised = JSON.stringify(sorted);
220
220
  const fullChecksum = (0, import_node_crypto.createHash)("sha256").update(serialised).digest("hex");
@@ -703,6 +703,7 @@ function mangleCodeClassesSync(code, mangleMap) {
703
703
  }
704
704
  function createCsszyxPlugins(options = {}) {
705
705
  const manglingEnabled = options.production?.mangle !== false;
706
+ const astBudgetOverride = options.build?.astBudgetLimit;
706
707
  const state = {
707
708
  classes: /* @__PURE__ */ new Set(),
708
709
  mangleMap: {},
@@ -754,7 +755,7 @@ function createCsszyxPlugins(options = {}) {
754
755
  if (!content.includes("sz=") && !content.includes("sz:")) {
755
756
  continue;
756
757
  }
757
- const result = (0, import_compiler.transformSourceCode)(content, filePath);
758
+ const result = (0, import_compiler.transformSourceCode)(content, filePath, { astBudget: astBudgetOverride });
758
759
  if (!result.transformed) {
759
760
  continue;
760
761
  }
@@ -988,7 +989,7 @@ ${sourceDirective}`
988
989
  transformed = true;
989
990
  }
990
991
  } else {
991
- const result = (0, import_compiler.transformSourceCode)(code, id);
992
+ const result = (0, import_compiler.transformSourceCode)(code, id, { astBudget: astBudgetOverride });
992
993
  transformedCode = result.code;
993
994
  usesRuntime = result.usesRuntime;
994
995
  usesMerge = result.usesMerge;
@@ -1144,7 +1145,7 @@ ${sourceDirective}`
1144
1145
  return;
1145
1146
  }
1146
1147
  try {
1147
- result = (0, import_compiler.transformSourceCode)(fileContent, ctx.file);
1148
+ result = (0, import_compiler.transformSourceCode)(fileContent, ctx.file, { astBudget: astBudgetOverride });
1148
1149
  } catch {
1149
1150
  return;
1150
1151
  }
package/dist/vite.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  vitePlugin
3
- } from "./chunk-HOQTC45W.js";
3
+ } from "./chunk-JGJOUK2R.js";
4
4
  import "./chunk-4M7CPGP7.js";
5
5
 
6
6
  // src/vite.ts
package/dist/webpack.cjs CHANGED
@@ -214,7 +214,7 @@ function buildRecoveryManifest(tokens, options = {}) {
214
214
  strippedDevOnlyPaths.push(data.path);
215
215
  continue;
216
216
  }
217
- sorted[key] = data;
217
+ sorted[key] = stripped ? { mode: data.mode, component: data.component, path: "" } : data;
218
218
  }
219
219
  const serialised = JSON.stringify(sorted);
220
220
  const fullChecksum = (0, import_node_crypto.createHash)("sha256").update(serialised).digest("hex");
@@ -703,6 +703,7 @@ function mangleCodeClassesSync(code, mangleMap) {
703
703
  }
704
704
  function createCsszyxPlugins(options = {}) {
705
705
  const manglingEnabled = options.production?.mangle !== false;
706
+ const astBudgetOverride = options.build?.astBudgetLimit;
706
707
  const state = {
707
708
  classes: /* @__PURE__ */ new Set(),
708
709
  mangleMap: {},
@@ -754,7 +755,7 @@ function createCsszyxPlugins(options = {}) {
754
755
  if (!content.includes("sz=") && !content.includes("sz:")) {
755
756
  continue;
756
757
  }
757
- const result = (0, import_compiler.transformSourceCode)(content, filePath);
758
+ const result = (0, import_compiler.transformSourceCode)(content, filePath, { astBudget: astBudgetOverride });
758
759
  if (!result.transformed) {
759
760
  continue;
760
761
  }
@@ -988,7 +989,7 @@ ${sourceDirective}`
988
989
  transformed = true;
989
990
  }
990
991
  } else {
991
- const result = (0, import_compiler.transformSourceCode)(code, id);
992
+ const result = (0, import_compiler.transformSourceCode)(code, id, { astBudget: astBudgetOverride });
992
993
  transformedCode = result.code;
993
994
  usesRuntime = result.usesRuntime;
994
995
  usesMerge = result.usesMerge;
@@ -1144,7 +1145,7 @@ ${sourceDirective}`
1144
1145
  return;
1145
1146
  }
1146
1147
  try {
1147
- result = (0, import_compiler.transformSourceCode)(fileContent, ctx.file);
1148
+ result = (0, import_compiler.transformSourceCode)(fileContent, ctx.file, { astBudget: astBudgetOverride });
1148
1149
  } catch {
1149
1150
  return;
1150
1151
  }
package/dist/webpack.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  webpackPlugin
3
- } from "./chunk-HOQTC45W.js";
3
+ } from "./chunk-JGJOUK2R.js";
4
4
  import "./chunk-4M7CPGP7.js";
5
5
 
6
6
  // src/webpack.ts
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@csszyx/unplugin",
3
- "version": "0.6.0",
3
+ "version": "0.6.2",
4
4
  "description": "Vite and Webpack integration for csszyx",
5
5
  "keywords": [
6
6
  "csszyx",
@@ -55,11 +55,11 @@
55
55
  "postcss": "^8.4.35",
56
56
  "postcss-selector-parser": "^6.0.15",
57
57
  "unplugin": "^1.10.1",
58
- "@csszyx/compiler": "0.6.0",
59
- "@csszyx/svelte-adapter": "0.6.0",
60
- "@csszyx/core": "0.6.0",
61
- "@csszyx/types": "0.6.0",
62
- "@csszyx/vue-adapter": "0.6.0"
58
+ "@csszyx/core": "0.6.2",
59
+ "@csszyx/compiler": "0.6.2",
60
+ "@csszyx/svelte-adapter": "0.6.2",
61
+ "@csszyx/types": "0.6.2",
62
+ "@csszyx/vue-adapter": "0.6.2"
63
63
  },
64
64
  "devDependencies": {
65
65
  "@types/node": "^20.11.0",