From fc87c009806dcc98867f6b58efe29b042aa01dee Mon Sep 17 00:00:00 2001 From: littleblack111 Date: Mon, 18 May 2026 23:10:59 +0800 Subject: node: update --- node_modules/svgo/plugins/applyTransforms.js | 388 --------------------------- 1 file changed, 388 deletions(-) delete mode 100644 node_modules/svgo/plugins/applyTransforms.js (limited to 'node_modules/svgo/plugins/applyTransforms.js') diff --git a/node_modules/svgo/plugins/applyTransforms.js b/node_modules/svgo/plugins/applyTransforms.js deleted file mode 100644 index ae492d54..00000000 --- a/node_modules/svgo/plugins/applyTransforms.js +++ /dev/null @@ -1,388 +0,0 @@ -'use strict'; - -/** - * @typedef {import('../lib/types').PathDataItem} PathDataItem - * @typedef {import('../lib/types').XastElement} XastElement - */ - -const { collectStylesheet, computeStyle } = require('../lib/style.js'); -const { - transformsMultiply, - transform2js, - transformArc, -} = require('./_transforms.js'); -const { path2js } = require('./_path.js'); -const { - removeLeadingZero, - includesUrlReference, -} = require('../lib/svgo/tools.js'); -const { referencesProps, attrsGroupsDefaults } = require('./_collections.js'); - -/** - * @typedef {PathDataItem[]} PathData - * @typedef {number[]} Matrix - */ - -const regNumericValues = /[-+]?(\d*\.\d+|\d+\.?)(?:[eE][-+]?\d+)?/g; - -/** - * Apply transformation(s) to the Path data. - * - * @type {import('../lib/types').Plugin<{ - * transformPrecision: number, - * applyTransformsStroked: boolean, - * }>} - */ -const applyTransforms = (root, params) => { - const stylesheet = collectStylesheet(root); - return { - element: { - enter: (node) => { - if (node.attributes.d == null) { - return; - } - - // stroke and stroke-width can be redefined with - if (node.attributes.id != null) { - return; - } - - // if there are no 'stroke' attr and references to other objects such as - // gradients or clip-path which are also subjects to transform. - if ( - node.attributes.transform == null || - node.attributes.transform === '' || - // styles are not considered when applying transform - // can be fixed properly with new style engine - node.attributes.style != null || - Object.entries(node.attributes).some( - ([name, value]) => - referencesProps.has(name) && includesUrlReference(value), - ) - ) { - return; - } - - const computedStyle = computeStyle(stylesheet, node); - const transformStyle = computedStyle.transform; - - // Transform overridden in