@unocss/postcss 66.1.2 → 66.1.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.
Files changed (2) hide show
  1. package/dist/esm.mjs +1 -7
  2. package/package.json +4 -4
package/dist/esm.mjs CHANGED
@@ -3,7 +3,7 @@ import { normalize } from 'node:path';
3
3
  import process from 'node:process';
4
4
  import { expandVariantGroup, notNull, regexScopePlaceholder, createGenerator } from '@unocss/core';
5
5
  import { createRecoveryConfigLoader } from '@unocss/config';
6
- import { transformThemeFn, hasThemeFn } from '@unocss/rule-utils';
6
+ import { calcMaxWidthBySize, transformThemeFn, hasThemeFn } from '@unocss/rule-utils';
7
7
  import postcss from 'postcss';
8
8
  import { glob } from 'tinyglobby';
9
9
  import { parse, generate, clone } from 'css-tree';
@@ -118,12 +118,6 @@ async function parseScreen(root, uno, directiveName) {
118
118
  rule.params = `${generateMediaQuery(breakpointName, prefix)}`;
119
119
  });
120
120
  }
121
- function calcMaxWidthBySize(size) {
122
- const value = size.match(/^-?\d+\.?\d*/)?.[0] || "";
123
- const unit = size.slice(value.length);
124
- const maxWidth = Number.parseFloat(value) - 0.1;
125
- return Number.isNaN(maxWidth) ? size : `${maxWidth}${unit}`;
126
- }
127
121
 
128
122
  async function parseTheme(root, uno) {
129
123
  root.walkDecls((decl) => {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@unocss/postcss",
3
3
  "type": "module",
4
- "version": "66.1.2",
4
+ "version": "66.1.3",
5
5
  "description": "PostCSS plugin for UnoCSS",
6
6
  "author": "sibbng <sibbngheid@gmail.com>",
7
7
  "license": "MIT",
@@ -57,9 +57,9 @@
57
57
  "css-tree": "^3.1.0",
58
58
  "postcss": "^8.5.3",
59
59
  "tinyglobby": "^0.2.13",
60
- "@unocss/config": "66.1.2",
61
- "@unocss/core": "66.1.2",
62
- "@unocss/rule-utils": "66.1.2"
60
+ "@unocss/rule-utils": "66.1.3",
61
+ "@unocss/config": "66.1.3",
62
+ "@unocss/core": "66.1.3"
63
63
  },
64
64
  "scripts": {
65
65
  "build": "unbuild",