Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@iconify/tailwind

Package Overview
Dependencies
Maintainers
0
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@iconify/tailwind - npm Package Compare versions

Comparing version 1.1.1 to 1.1.2

.eslintrc.cjs

1

dist/plugin.d.ts

@@ -137,2 +137,3 @@ import { Config } from 'tailwindcss/types/config';

scale?: number;
square?: boolean;
prefixes?: IconifyPluginListOptions;

@@ -139,0 +140,0 @@ customise?: (content: string, name: string, prefix: string) => string;

47

dist/plugin.js

@@ -10,3 +10,3 @@ /**

* @license MIT
* @version 1.1.1
* @version 1.1.2
*/

@@ -173,2 +173,16 @@ 'use strict';

function makeIconSquare(icon) {
if (icon.width !== icon.height) {
const max = Math.max(icon.width, icon.height);
return {
...icon,
width: max,
height: max,
left: icon.left - (max - icon.width) / 2,
top: icon.top - (max - icon.height) / 2
};
}
return icon;
}
function getCommonCSSRules(options) {

@@ -208,10 +222,3 @@ const result = {

if (options.forceSquare) {
const max = Math.max(icon.width, icon.height);
icon = {
...icon,
width: max,
height: max,
left: icon.left - (max - icon.width) / 2,
top: icon.top - (max - icon.height) / 2
};
icon = makeIconSquare(icon);
} else {

@@ -362,3 +369,5 @@ result["width"] = calculateSize("1em", icon.width / icon.height);

}
catch { }
catch {
//
}
// Try `@iconify/json`

@@ -371,3 +380,5 @@ try {

}
catch { }
catch {
//
}
}

@@ -395,3 +406,5 @@ /**

}
catch { }
catch {
//
}
}

@@ -662,2 +675,6 @@ /**

const iconSelector = options.iconSelector || '.{prefix}--{name}';
// Make icons square
const square = options.square !== false;
// Scale
const scale = options.scale ?? 1;
options.prefixes?.forEach((item) => {

@@ -725,3 +742,3 @@ let prefix;

varName,
forceSquare: true,
forceSquare: square,
});

@@ -732,2 +749,6 @@ // Generate selector

.replace('{name}', name);
// Scale non-square icons
if (!square && scale > 0 && scale !== 1 && iconRules.width) {
iconRules.width = calculateSize(iconRules.width, scale);
}
// Add to rules

@@ -734,0 +755,0 @@ rules[selector] = iconRules;

@@ -5,3 +5,3 @@ {

"author": "Vjacheslav Trushkin <cyberalien@gmail.com> (https://iconify.design)",
"version": "1.1.1",
"version": "1.1.2",
"license": "MIT",

@@ -22,10 +22,10 @@ "main": "./dist/plugin.js",

"devDependencies": {
"@iconify-json/line-md": "^1.1.37",
"@iconify-json/line-md": "^1.1.38",
"@iconify-json/mdi-light": "^1.1.10",
"@microsoft/api-extractor": "^7.43.1",
"@microsoft/api-extractor": "^7.47.2",
"@rollup/plugin-node-resolve": "^15.2.3",
"@rollup/plugin-replace": "^5.0.5",
"@rollup/plugin-replace": "^5.0.7",
"@types/jest": "^29.5.12",
"@types/jsdom": "^21.1.6",
"@types/node": "^18.19.31",
"@types/jsdom": "^21.1.7",
"@types/node": "^18.19.41",
"@typescript-eslint/eslint-plugin": "^5.62.0",

@@ -36,6 +36,6 @@ "eslint": "^8.57.0",

"rollup": "^3.29.4",
"tailwindcss": "^3.4.3",
"ts-jest": "^29.1.2",
"typescript": "^5.4.5",
"@iconify/utils": "^2.1.23"
"tailwindcss": "^3.4.6",
"ts-jest": "^29.2.3",
"typescript": "^5.5.3",
"@iconify/utils": "^2.1.25"
},

@@ -42,0 +42,0 @@ "scripts": {

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc