New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More

windicss

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

windicss - npm Package Compare versions

Comparing version 2.5.10 to 2.5.11

@@ -30,9 +30,6 @@ #!/usr/bin/env node

/** @deprecated */
function __spreadArrays() {
for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
for (var r = Array(s), k = 0, i = 0; i < il; i++)
for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
r[k] = a[j];
return r;
function __spreadArray(to, from) {
for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
to[j] = from[i];
return to;
}

@@ -239,3 +236,3 @@

if (deep)
result = __spreadArrays(result, walk(itemPath, deep));
result = __spreadArray(__spreadArray([], result), walk(itemPath, deep));
}

@@ -272,3 +269,3 @@ }

// eslint-disable-next-line quotes
return "windicss 2.5.10"; // replace by rollup
return "windicss 2.5.11"; // replace by rollup
}

@@ -374,4 +371,4 @@ function generateTemplate(folder, outputPath) {

outputStyle.push(utility.styleSheet);
ignoredClasses = __spreadArrays(ignoredClasses, utility.ignored);
outputHTML.push(__spreadArrays([utility.className], utility.ignored).join(' '));
ignoredClasses = __spreadArray(__spreadArray([], ignoredClasses), utility.ignored);
outputHTML.push(__spreadArray([utility.className], utility.ignored).join(' '));
indexStart = p.end;

@@ -399,3 +396,3 @@ });

styleSheets.push(utility.styleSheet);
ignoredClasses = __spreadArrays(ignoredClasses, utility.ignored);
ignoredClasses = __spreadArray(__spreadArray([], ignoredClasses), utility.ignored);
if (args['--preflight'])

@@ -402,0 +399,0 @@ preflights.push(processor.preflight(parser.html));

{
"name": "windicss",
"version": "2.5.10",
"version": "2.5.11",
"description": "Next generation tailwindcss compiler.",

@@ -112,17 +112,17 @@ "main": "index.js",

"devDependencies": {
"@rollup/plugin-commonjs": "^17.1.0",
"@rollup/plugin-commonjs": "^18.0.0",
"@rollup/plugin-json": "^4.1.0",
"@rollup/plugin-node-resolve": "^11.1.0",
"@rollup/plugin-replace": "^2.3.4",
"@rollup/plugin-node-resolve": "^11.2.1",
"@rollup/plugin-replace": "^2.4.2",
"@rollup/plugin-sucrase": "^3.1.0",
"@rollup/plugin-typescript": "^8.1.0",
"@rollup/plugin-typescript": "^8.2.1",
"@types/color-string": "^1.5.0",
"@types/diff": "^5.0.0",
"@types/fs-extra": "^9.0.7",
"@types/jasmine": "^3.6.3",
"@types/fs-extra": "^9.0.10",
"@types/jasmine": "^3.6.9",
"@types/js-yaml": "^4.0.0",
"@types/lodash.merge": "^4.6.6",
"@types/node": "^14.14.14",
"@typescript-eslint/eslint-plugin": "^4.14.1",
"@typescript-eslint/parser": "^4.14.1",
"@types/node": "^14.14.37",
"@typescript-eslint/eslint-plugin": "^4.20.0",
"@typescript-eslint/parser": "^4.20.0",
"arg": "^5.0.0",

@@ -132,20 +132,20 @@ "bumpp": "^6.0.6",

"chalk": "^4.1.0",
"color-string": "^1.5.4",
"color-string": "^1.5.5",
"cross-env": "^7.0.3",
"diff": "^5.0.0",
"domhandler": "^4.0.0",
"eslint": "^7.18.0",
"domhandler": "^4.1.0",
"eslint": "^7.23.0",
"fs-extra": "^9.1.0",
"jasmine": "^3.6.4",
"jasmine": "^3.7.0",
"jasmine-spec-reporter": "^6.0.0",
"js-yaml": "^3.14.1",
"js-yaml": "^4.0.0",
"mini-svg-data-uri": "^1.2.3",
"nyc": "^15.1.0",
"pirates": "^4.0.1",
"rollup": "^2.37.0",
"rollup": "^2.44.0",
"sucrase": "^3.17.1",
"tosource": "^2.0.0-alpha.2",
"tslib": "^2.1.0",
"typescript": "^4.1.3"
"typescript": "^4.2.3"
}
}

@@ -45,2 +45,3 @@ 'use strict';

.handleStatic(theme('blur'))
.handleSquareBrackets()
.handleNumber(0, undefined, 'float', function (number) { return number + "px"; })

@@ -47,0 +48,0 @@ .handleSize()

@@ -45,9 +45,6 @@ 'use strict';

/** @deprecated */
function __spreadArrays() {
for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
for (var r = Array(s), k = 0, i = 0; i < il; i++)
for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
r[k] = a[j];
return r;
function __spreadArray(to, from) {
for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
to[j] = from[i];
return to;
}

@@ -118,3 +115,3 @@

if (append === void 0) { append = true; }
return append ? __spreadArrays((a !== null && a !== void 0 ? a : []), (b !== null && b !== void 0 ? b : [])) : __spreadArrays((b !== null && b !== void 0 ? b : []), (a !== null && a !== void 0 ? a : []));
return append ? __spreadArray(__spreadArray([], (a !== null && a !== void 0 ? a : [])), (b !== null && b !== void 0 ? b : [])) : __spreadArray(__spreadArray([], (b !== null && b !== void 0 ? b : [])), (a !== null && a !== void 0 ? a : []));
}

@@ -265,3 +262,4 @@ function deepCopy(source) {

.substring(matchName.index + name_1.length + 1)
.match(/(?:(['"]).*?\1|[^;])*/)) === null || _a === void 0 ? void 0 : _a[0].trim() : undefined;
.match(/(?:(['"]).*?\1|[^;])*/)) === null || _a === void 0 ? void 0 : _a[0].trim()
: undefined;
if (expression && /!important;?$/.test(expression)) {

@@ -372,3 +370,4 @@ important = true;

if (!root)
root = (parent === null || parent === void 0 ? void 0 : parent.startsWith('@')) ? new Style().atRule(parent)
root = (parent === null || parent === void 0 ? void 0 : parent.startsWith('@'))
? new Style().atRule(parent)
: new Style(parent);

@@ -517,3 +516,3 @@ var output = [];

item.forEach(function (i) { return (i.important = true); });
this.property = __spreadArrays(this.property, item);
this.property = __spreadArray(__spreadArray([], this.property), item);
return this;

@@ -1070,3 +1069,3 @@ };

var hsl = /^hsla?\(\s*([+-]?(?:\d*\.)?\d+)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)$/;
var hsl = /^hsla?\(\s*([+-]?(?:\d{0,3}\.)?\d+)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)$/;
var match = string.match(hsl);

@@ -1092,3 +1091,3 @@

var hwb = /^hwb\(\s*([+-]?\d*[\.]?\d+)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)$/;
var hwb = /^hwb\(\s*([+-]?\d{0,3}(?:\.\d+)?)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)$/;
var match = string.match(hwb);

@@ -1225,2 +1224,3 @@

.handleStatic(theme(tn))
.handleSquareBrackets()
.handleSpacing()

@@ -1227,0 +1227,0 @@ .handleSize()

@@ -17,3 +17,3 @@ import { Property } from '../../utils/style';

} | unknown, callback?: (str: string) => string | undefined): this;
handleSquareBrackets(): this;
handleSquareBrackets(callback?: (number: string) => string | undefined): this;
handleNumber(start?: number, end?: number, type?: 'int' | 'float', callback?: (number: number) => string | undefined): this;

@@ -20,0 +20,0 @@ handleSpacing(): this;

@@ -6,5 +6,5 @@ import type { Color } from 'color-string';

export declare function toRGB(color: string): number[] | undefined;
export declare function toColor(color: string): {
export declare function toColor(colorStr: string): {
color: string;
opacity: string;
};

@@ -91,9 +91,6 @@ 'use strict';

/** @deprecated */
function __spreadArrays() {
for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
for (var r = Array(s), k = 0, i = 0; i < il; i++)
for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
r[k] = a[j];
return r;
function __spreadArray(to, from) {
for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
to[j] = from[i];
return to;
}

@@ -146,3 +143,3 @@

if (append === void 0) { append = true; }
return append ? __spreadArrays((a !== null && a !== void 0 ? a : []), (b !== null && b !== void 0 ? b : [])) : __spreadArrays((b !== null && b !== void 0 ? b : []), (a !== null && a !== void 0 ? a : []));
return append ? __spreadArray(__spreadArray([], (a !== null && a !== void 0 ? a : [])), (b !== null && b !== void 0 ? b : [])) : __spreadArray(__spreadArray([], (b !== null && b !== void 0 ? b : [])), (a !== null && a !== void 0 ? a : []));
}

@@ -293,3 +290,4 @@ function deepCopy(source) {

.substring(matchName.index + name_1.length + 1)
.match(/(?:(['"]).*?\1|[^;])*/)) === null || _a === void 0 ? void 0 : _a[0].trim() : undefined;
.match(/(?:(['"]).*?\1|[^;])*/)) === null || _a === void 0 ? void 0 : _a[0].trim()
: undefined;
if (expression && /!important;?$/.test(expression)) {

@@ -400,3 +398,4 @@ important = true;

if (!root)
root = (parent === null || parent === void 0 ? void 0 : parent.startsWith('@')) ? new Style().atRule(parent)
root = (parent === null || parent === void 0 ? void 0 : parent.startsWith('@'))
? new Style().atRule(parent)
: new Style(parent);

@@ -545,3 +544,3 @@ var output = [];

item.forEach(function (i) { return (i.important = true); });
this.property = __spreadArrays(this.property, item);
this.property = __spreadArray(__spreadArray([], this.property), item);
return this;

@@ -1018,3 +1017,3 @@ };

item.forEach(function (i) {
output = __spreadArrays(output, handleNest(i));
output = __spreadArray(__spreadArray([], output), handleNest(i));
});

@@ -1038,3 +1037,3 @@ }

else if (Array.isArray(item)) {
output = __spreadArrays(output, handleNest(item));
output = __spreadArray(__spreadArray([], output), handleNest(item));
}

@@ -1085,3 +1084,3 @@ else {

});
return __spreadArrays(passed, Object.values(styleMap).map(function (style) { return style.clean(); }));
return __spreadArray(__spreadArray([], passed), Object.values(styleMap).map(function (style) { return style.clean(); }));
}

@@ -1095,3 +1094,3 @@ function buildAtRule(styleList, minify, prefixer, reverse) {

var _a, _b;
var list = __spreadArrays(reverse ? ((_a = i.atRules) !== null && _a !== void 0 ? _a : []).sort(sortMediaQuery) : ((_b = i.atRules) !== null && _b !== void 0 ? _b : []).sort(sortMediaQuery).reverse(), [
var list = __spreadArray(__spreadArray([], reverse ? ((_a = i.atRules) !== null && _a !== void 0 ? _a : []).sort(sortMediaQuery) : ((_b = i.atRules) !== null && _b !== void 0 ? _b : []).sort(sortMediaQuery).reverse()), [
i.rule,

@@ -1143,3 +1142,3 @@ ]);

if (Array.isArray(item)) {
this.children = __spreadArrays(this.children, item);
this.children = __spreadArray(__spreadArray([], this.children), item);
}

@@ -1161,3 +1160,3 @@ else {

this.prefixer = styleSheet.prefixer;
this.children = append ? __spreadArrays(this.children, extended) : __spreadArrays(extended, this.children);
this.children = append ? __spreadArray(__spreadArray([], this.children), extended) : __spreadArray(__spreadArray([], extended), this.children);
}

@@ -1229,3 +1228,3 @@ return this;

if (['.', '#'].includes(rule.charAt(0)))
this._cache[rule] = (rule in this._cache) ? __spreadArrays(this._cache[rule], [deepCopy(style)]) : [deepCopy(style)];
this._cache[rule] = (rule in this._cache) ? __spreadArray(__spreadArray([], this._cache[rule]), [deepCopy(style)]) : [deepCopy(style)];
};

@@ -1490,5 +1489,6 @@ CSSParser.prototype._removeComment = function (css) {

var groupStart = this.index + 1;
var important = false;
var ignoreSpace = false;
var important = false;
var ignoreBracket = false;
var insideSquareBracket = false;
var parts = [];

@@ -1499,2 +1499,9 @@ var length = this.classNames.length;

char = this.classNames.charAt(this.index);
// ignore parsing and leave content inside square brackets as-is
if (insideSquareBracket) {
if (char === ']')
insideSquareBracket = false;
continue;
}
// handle chars
switch (char) {

@@ -1510,2 +1517,5 @@ case '!':

break;
case '[':
insideSquareBracket = true;
break;
case '(':

@@ -1512,0 +1522,0 @@ if (this.classNames.charAt(this.index - 1) === '-') {

@@ -47,9 +47,6 @@ 'use strict';

/** @deprecated */
function __spreadArrays() {
for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
for (var r = Array(s), k = 0, i = 0; i < il; i++)
for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
r[k] = a[j];
return r;
function __spreadArray(to, from) {
for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
to[j] = from[i];
return to;
}

@@ -102,3 +99,3 @@

if (append === void 0) { append = true; }
return append ? __spreadArrays((a !== null && a !== void 0 ? a : []), (b !== null && b !== void 0 ? b : [])) : __spreadArrays((b !== null && b !== void 0 ? b : []), (a !== null && a !== void 0 ? a : []));
return append ? __spreadArray(__spreadArray([], (a !== null && a !== void 0 ? a : [])), (b !== null && b !== void 0 ? b : [])) : __spreadArray(__spreadArray([], (b !== null && b !== void 0 ? b : [])), (a !== null && a !== void 0 ? a : []));
}

@@ -249,3 +246,4 @@ function deepCopy(source) {

.substring(matchName.index + name_1.length + 1)
.match(/(?:(['"]).*?\1|[^;])*/)) === null || _a === void 0 ? void 0 : _a[0].trim() : undefined;
.match(/(?:(['"]).*?\1|[^;])*/)) === null || _a === void 0 ? void 0 : _a[0].trim()
: undefined;
if (expression && /!important;?$/.test(expression)) {

@@ -356,3 +354,4 @@ important = true;

if (!root)
root = (parent === null || parent === void 0 ? void 0 : parent.startsWith('@')) ? new Style().atRule(parent)
root = (parent === null || parent === void 0 ? void 0 : parent.startsWith('@'))
? new Style().atRule(parent)
: new Style(parent);

@@ -501,3 +500,3 @@ var output = [];

item.forEach(function (i) { return (i.important = true); });
this.property = __spreadArrays(this.property, item);
this.property = __spreadArray(__spreadArray([], this.property), item);
return this;

@@ -968,3 +967,3 @@ };

item.forEach(function (i) {
output = __spreadArrays(output, handleNest(i));
output = __spreadArray(__spreadArray([], output), handleNest(i));
});

@@ -988,3 +987,3 @@ }

else if (Array.isArray(item)) {
output = __spreadArrays(output, handleNest(item));
output = __spreadArray(__spreadArray([], output), handleNest(item));
}

@@ -1035,3 +1034,3 @@ else {

});
return __spreadArrays(passed, Object.values(styleMap).map(function (style) { return style.clean(); }));
return __spreadArray(__spreadArray([], passed), Object.values(styleMap).map(function (style) { return style.clean(); }));
}

@@ -1045,3 +1044,3 @@ function buildAtRule(styleList, minify, prefixer, reverse) {

var _a, _b;
var list = __spreadArrays(reverse ? ((_a = i.atRules) !== null && _a !== void 0 ? _a : []).sort(sortMediaQuery) : ((_b = i.atRules) !== null && _b !== void 0 ? _b : []).sort(sortMediaQuery).reverse(), [
var list = __spreadArray(__spreadArray([], reverse ? ((_a = i.atRules) !== null && _a !== void 0 ? _a : []).sort(sortMediaQuery) : ((_b = i.atRules) !== null && _b !== void 0 ? _b : []).sort(sortMediaQuery).reverse()), [
i.rule,

@@ -1093,3 +1092,3 @@ ]);

if (Array.isArray(item)) {
this.children = __spreadArrays(this.children, item);
this.children = __spreadArray(__spreadArray([], this.children), item);
}

@@ -1111,3 +1110,3 @@ else {

this.prefixer = styleSheet.prefixer;
this.children = append ? __spreadArrays(this.children, extended) : __spreadArrays(extended, this.children);
this.children = append ? __spreadArray(__spreadArray([], this.children), extended) : __spreadArray(__spreadArray([], extended), this.children);
}

@@ -1114,0 +1113,0 @@ return this;

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet