Framework updates

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
root
2026-03-04 23:20:19 +00:00
parent a89daf3d43
commit 3ed8517b2a
891 changed files with 11126 additions and 9600 deletions

29
node_modules/svgo/lib/svgo/coa.js generated vendored
View File

@@ -140,7 +140,7 @@ async function action(args, opts, command) {
!opts.string &&
!opts.stdin &&
!opts.folder &&
process.stdin.isTTY === true
process.stdin.isTTY
) {
return command.help();
}
@@ -524,10 +524,33 @@ function checkWriteFileError(input, output, data, error) {
}
}
/** Show list of available plugins with short description. */
/**
* Show list of available plugins with short description with the presets it belongs to.
*/
function showAvailablePlugins() {
const pluginToPresetsMap = new Map();
for (const plugin of builtinPlugins) {
if (plugin.isPreset) {
for (const presetPlugins of plugin.plugins) {
if (!pluginToPresetsMap.has(presetPlugins.name)) {
pluginToPresetsMap.set(presetPlugins.name, [plugin.name]);
} else {
pluginToPresetsMap.get(presetPlugins.name).push(plugin.name);
}
}
}
}
const list = builtinPlugins
.map((plugin) => ` [ ${colors.green(plugin.name)} ] ${plugin.description}`)
.map((plugin) => {
const name = plugin.name;
let description = plugin.description || '';
const presetsForThisPlugin = pluginToPresetsMap.get(name) || [];
if (presetsForThisPlugin && presetsForThisPlugin.length > 0) {
description += ` (${presetsForThisPlugin.join(', ')})`;
}
return ` [ ${colors.green(name)} ] ${description}`;
})
.join('\n');
console.log('Currently available plugins:\n' + list);
}

View File

@@ -33,7 +33,7 @@ export const invokePlugins = (
};
/**
* @template {string} T
* @template {`preset-${string}`} T
* @param {{ name: T, plugins: ReadonlyArray<import('../types.js').BuiltinPlugin<string, any>> }} arg0
* @returns {import('../types.js').BuiltinPluginOrPreset<T, any>}
*/

18
node_modules/svgo/lib/svgo/tools.js generated vendored
View File

@@ -145,6 +145,14 @@ export const removeLeadingZero = (value) => {
return strValue;
};
const hasScriptsEventAttrs = [
...attrsGroups.animationEvent,
...attrsGroups.documentEvent,
...attrsGroups.documentElementEvent,
...attrsGroups.globalEvent,
...attrsGroups.graphicalEvent,
];
/**
* If the current node contains any scripts. This does not check parents or
* children of the node, only the properties and attributes of the node itself.
@@ -170,15 +178,7 @@ export const hasScripts = (node) => {
}
}
const eventAttrs = [
...attrsGroups.animationEvent,
...attrsGroups.documentEvent,
...attrsGroups.documentElementEvent,
...attrsGroups.globalEvent,
...attrsGroups.graphicalEvent,
];
return eventAttrs.some((attr) => node.attributes[attr] != null);
return hasScriptsEventAttrs.some((attr) => node.attributes[attr] != null);
};
/**

26
node_modules/svgo/lib/types.ts generated vendored
View File

@@ -136,18 +136,26 @@ export type BuiltinPlugin<Name extends string, Params> = {
fn: Plugin<Params>;
};
type PresetProperties<IsPreset extends boolean> = {
name: IsPreset extends true ? `preset-${string}` : string;
/** If the plugin is itself a preset that invokes other plugins. */
isPreset: IsPreset extends true ? true : undefined;
/**
* If {@link #isPreset} is true, an array of the plugins in the preset
* in the order that they are invoked.
*/
plugins: IsPreset extends true
? ReadonlyArray<BuiltinPlugin<string, Object>>
: undefined;
};
export type BuiltinPluginOrPreset<Name extends string, Params> = BuiltinPlugin<
Name,
Params
> & {
/** If the plugin is itself a preset that invokes other plugins. */
isPreset?: true;
/**
* If the plugin is a preset that invokes other plugins, this returns an
* array of the plugins in the preset in the order that they are invoked.
*/
plugins?: ReadonlyArray<BuiltinPlugin<string, Object>>;
};
> &
(PresetProperties<true> | Partial<PresetProperties<false>>);
export type XastDoctype = {
type: 'doctype';

2
node_modules/svgo/lib/version.js generated vendored
View File

@@ -4,4 +4,4 @@
* @type {string}
* @since 4.0.0
*/
export const VERSION = '4.0.0';
export const VERSION = '4.0.1';