@unocss/transformer-directives 65.4.3 → 66.0.0

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 (2) hide show
  1. package/dist/index.mjs +6 -8
  2. package/package.json +4 -4
package/dist/index.mjs CHANGED
@@ -113,7 +113,7 @@ async function transformIconString(uno, icon, color) {
113
113
  autoInstall,
114
114
  cwd: collectionsNodeResolvePath,
115
115
  // avoid warn from @iconify/loader: we'll warn below if not found
116
- warn: undefined,
116
+ warn: void 0,
117
117
  customizations: {
118
118
  ...customizations,
119
119
  trimCustomSvg: true,
@@ -128,7 +128,7 @@ async function transformIconString(uno, icon, color) {
128
128
  }
129
129
  }
130
130
  };
131
- const loader = await api.createNodeLoader?.() || (async () => undefined);
131
+ const loader = await api.createNodeLoader?.() || (async () => void 0);
132
132
  for (const p of toArray(prefix)) {
133
133
  if (icon.startsWith(p)) {
134
134
  icon = icon.slice(p.length);
@@ -193,7 +193,7 @@ function handleScreen({ code, uno }, node) {
193
193
  breakpoints = uno.userConfig.theme.breakpoints;
194
194
  if (!breakpoints)
195
195
  breakpoints = uno.config.theme.breakpoints;
196
- return breakpoints ? Object.entries(breakpoints).sort((a, b) => Number.parseInt(a[1].replace(/[a-z]+/gi, "")) - Number.parseInt(b[1].replace(/[a-z]+/gi, ""))).map(([point, size]) => ({ point, size })) : undefined;
196
+ return breakpoints ? Object.entries(breakpoints).sort((a, b) => Number.parseInt(a[1].replace(/[a-z]+/gi, "")) - Number.parseInt(b[1].replace(/[a-z]+/gi, ""))).map(([point, size]) => ({ point, size })) : void 0;
197
197
  };
198
198
  const variantEntries = (resolveBreakpoints() ?? []).map(({ point, size }, idx) => [point, size, idx]);
199
199
  const generateMediaQuery = (breakpointName2, prefix2) => {
@@ -232,8 +232,8 @@ function calcMaxWidthBySize(size) {
232
232
  async function transformDirectives(code, uno, options, filename, originalCode, offset) {
233
233
  let { applyVariable } = options;
234
234
  const varStyle = options.varStyle;
235
- if (applyVariable === undefined) {
236
- if (varStyle !== undefined)
235
+ if (applyVariable === void 0) {
236
+ if (varStyle !== void 0)
237
237
  applyVariable = varStyle ? [`${varStyle}apply`] : [];
238
238
  applyVariable = ["--at-apply", "--uno-apply", "--uno"];
239
239
  }
@@ -259,9 +259,7 @@ async function transformDirectives(code, uno, options, filename, originalCode, o
259
259
  applyVariable,
260
260
  uno,
261
261
  code,
262
- filename,
263
- offset
264
- };
262
+ filename};
265
263
  const processNode = async (node, _item, _list) => {
266
264
  if (hasScreen && node.type === "Atrule" && node.name === "screen")
267
265
  handleScreen(ctx, node);
package/package.json CHANGED
@@ -1,14 +1,14 @@
1
1
  {
2
2
  "name": "@unocss/transformer-directives",
3
3
  "type": "module",
4
- "version": "65.4.3",
4
+ "version": "66.0.0",
5
5
  "description": "UnoCSS transformer for `@apply` directive",
6
6
  "author": "hannoeru <me@hanlee.co>",
7
7
  "license": "MIT",
8
8
  "homepage": "https://unocss.dev",
9
9
  "repository": {
10
10
  "type": "git",
11
- "url": "https://github.com/unocss/unocss",
11
+ "url": "git+https://github.com/unocss/unocss",
12
12
  "directory": "packages-presets/transformer-directives"
13
13
  },
14
14
  "bugs": {
@@ -33,8 +33,8 @@
33
33
  ],
34
34
  "dependencies": {
35
35
  "css-tree": "^3.1.0",
36
- "@unocss/core": "65.4.3",
37
- "@unocss/rule-utils": "65.4.3"
36
+ "@unocss/core": "66.0.0",
37
+ "@unocss/rule-utils": "66.0.0"
38
38
  },
39
39
  "devDependencies": {
40
40
  "magic-string": "^0.30.17"