@spiriit/vite-plugin-svg-spritemap
Version:
Generates symbol-based SVG spritemap from all .svg files in a directory
2,527 lines (2,521 loc) • 110 kB
JavaScript
// node_modules/.pnpm/tsup@8.4.0_jiti@2.4.2_postcss@8.5.3_typescript@5.8.2_yaml@2.7.0/node_modules/tsup/assets/esm_shims.js
import { fileURLToPath } from "url";
import path from "path";
var getFilename = () => fileURLToPath(import.meta.url);
var getDirname = () => path.dirname(getFilename());
var __dirname = /* @__PURE__ */ getDirname();
// src/helpers/options.ts
function createOptions(options = {}) {
let prefix = "sprite-";
if (options.prefix === false)
prefix = "";
else if (typeof options.prefix === "string")
prefix = options.prefix;
let styles = false;
const stylesLang = ["css", "scss", "less", "styl"];
if (typeof options.styles === "string") {
let lang = options.styles.split(".").pop();
if (typeof lang === "undefined" || !stylesLang.includes(lang)) {
lang = "css";
console.warn(
"[vite-plugin-spritemap]",
"Invalid styles lang, fallback to css"
);
}
styles = {
filename: options.styles,
lang,
include: true,
names: {
prefix: "sprites-prefix",
sprites: "sprites",
mixin: "sprite"
}
};
} else if (typeof options.styles === "object" && typeof options.styles.filename === "string") {
const stylesNames = {
prefix: options.styles.names?.prefix || "sprites-prefix",
sprites: options.styles.names?.sprites || "sprites",
mixin: options.styles.names?.mixin || "sprite"
};
let lang = options.styles.filename.split(".").pop();
if (typeof lang === "undefined" || !stylesLang.includes(lang)) {
lang = "css";
console.warn(
"[vite-plugin-spritemap]",
"Invalid styles lang, fallback to css"
);
}
styles = {
filename: options.styles.filename,
lang,
include: typeof options.styles.include === "undefined" ? true : options.styles.include,
names: stylesNames,
callback: options.styles.callback
};
}
let output = {
filename: "[name].[hash][extname]",
name: "spritemap.svg",
use: true,
view: true
};
if (options.output === false) {
output = false;
} else if (typeof options.output === "string") {
output.filename = options.output;
} else if (typeof options.output === "object") {
output = {
filename: options.output.filename || output.filename,
name: options.output.name || output.name,
use: typeof options.output.use !== "undefined" ? options.output.use : output.use,
view: typeof options.output.view !== "undefined" ? options.output.view : output.view
};
}
const injectSvgOnDev = options.injectSvgOnDev || options.injectSVGOnDev || false;
let idify = (name) => name;
if (typeof options.idify === "function")
idify = options.idify;
let route = "__spritemap";
if (typeof options.route === "string")
route = options.route;
return {
svgo: options.svgo,
output,
prefix,
styles,
injectSvgOnDev,
idify,
route
};
}
// src/plugins/build.ts
import { posix as path3 } from "node:path";
// src/helpers/filename.ts
import hash_sum from "hash-sum";
function getFileName(fileName, name, content, ext) {
const hash = hash_sum(content);
fileName = fileName.replace(/\[hash\]/g, hash);
fileName = fileName.replace(/\[ext\]/g, ext);
fileName = fileName.replace(/\[extname\]/g, `.${ext}`);
fileName = fileName.replace(/\[name\]/g, name);
return fileName;
}
// src/svgManager.ts
import { promises as fs } from "node:fs";
import { basename, resolve } from "node:path";
import { DOMImplementation, DOMParser, XMLSerializer } from "@xmldom/xmldom";
import hash_sum2 from "hash-sum";
import { glob } from "tinyglobby";
// src/helpers/calculateY.ts
function calculateY(heights = [], gutter = 0) {
return heights.reduce((a, b) => a + b, 0) + heights.length * gutter;
}
// node_modules/.pnpm/svg-element-attributes@2.1.0/node_modules/svg-element-attributes/index.js
var svgElementAttributes = {
"*": [
"about",
"class",
"content",
"datatype",
"id",
"lang",
"property",
"rel",
"resource",
"rev",
"style",
"tabindex",
"typeof"
],
a: [
"alignment-baseline",
"baseline-shift",
"clip",
"clip-path",
"clip-rule",
"color",
"color-interpolation",
"color-interpolation-filters",
"color-profile",
"color-rendering",
"cursor",
"direction",
"display",
"dominant-baseline",
"download",
"enable-background",
"externalResourcesRequired",
"fill",
"fill-opacity",
"fill-rule",
"filter",
"flood-color",
"flood-opacity",
"focusHighlight",
"focusable",
"font-family",
"font-size",
"font-size-adjust",
"font-stretch",
"font-style",
"font-variant",
"font-weight",
"glyph-orientation-horizontal",
"glyph-orientation-vertical",
"href",
"hreflang",
"image-rendering",
"kerning",
"letter-spacing",
"lighting-color",
"marker-end",
"marker-mid",
"marker-start",
"mask",
"nav-down",
"nav-down-left",
"nav-down-right",
"nav-left",
"nav-next",
"nav-prev",
"nav-right",
"nav-up",
"nav-up-left",
"nav-up-right",
"opacity",
"overflow",
"ping",
"pointer-events",
"referrerpolicy",
"requiredExtensions",
"requiredFeatures",
"requiredFonts",
"requiredFormats",
"shape-rendering",
"stop-color",
"stop-opacity",
"stroke",
"stroke-dasharray",
"stroke-dashoffset",
"stroke-linecap",
"stroke-linejoin",
"stroke-miterlimit",
"stroke-opacity",
"stroke-width",
"systemLanguage",
"target",
"text-anchor",
"text-decoration",
"text-rendering",
"transform",
"type",
"unicode-bidi",
"visibility",
"word-spacing",
"writing-mode"
],
altGlyph: [
"alignment-baseline",
"baseline-shift",
"clip",
"clip-path",
"clip-rule",
"color",
"color-interpolation",
"color-interpolation-filters",
"color-profile",
"color-rendering",
"cursor",
"direction",
"display",
"dominant-baseline",
"dx",
"dy",
"enable-background",
"externalResourcesRequired",
"fill",
"fill-opacity",
"fill-rule",
"filter",
"flood-color",
"flood-opacity",
"font-family",
"font-size",
"font-size-adjust",
"font-stretch",
"font-style",
"font-variant",
"font-weight",
"format",
"glyph-orientation-horizontal",
"glyph-orientation-vertical",
"glyphRef",
"image-rendering",
"kerning",
"letter-spacing",
"lighting-color",
"marker-end",
"marker-mid",
"marker-start",
"mask",
"opacity",
"overflow",
"pointer-events",
"requiredExtensions",
"requiredFeatures",
"rotate",
"shape-rendering",
"stop-color",
"stop-opacity",
"stroke",
"stroke-dasharray",
"stroke-dashoffset",
"stroke-linecap",
"stroke-linejoin",
"stroke-miterlimit",
"stroke-opacity",
"stroke-width",
"systemLanguage",
"text-anchor",
"text-decoration",
"text-rendering",
"unicode-bidi",
"visibility",
"word-spacing",
"writing-mode",
"x",
"y"
],
altGlyphDef: [],
altGlyphItem: [],
animate: [
"accumulate",
"additive",
"alignment-baseline",
"attributeName",
"attributeType",
"baseline-shift",
"begin",
"by",
"calcMode",
"clip",
"clip-path",
"clip-rule",
"color",
"color-interpolation",
"color-interpolation-filters",
"color-profile",
"color-rendering",
"cursor",
"direction",
"display",
"dominant-baseline",
"dur",
"enable-background",
"end",
"externalResourcesRequired",
"fill",
"fill-opacity",
"fill-rule",
"filter",
"flood-color",
"flood-opacity",
"font-family",
"font-size",
"font-size-adjust",
"font-stretch",
"font-style",
"font-variant",
"font-weight",
"from",
"glyph-orientation-horizontal",
"glyph-orientation-vertical",
"href",
"image-rendering",
"kerning",
"keySplines",
"keyTimes",
"letter-spacing",
"lighting-color",
"marker-end",
"marker-mid",
"marker-start",
"mask",
"max",
"min",
"opacity",
"overflow",
"pointer-events",
"repeatCount",
"repeatDur",
"requiredExtensions",
"requiredFeatures",
"requiredFonts",
"requiredFormats",
"restart",
"shape-rendering",
"stop-color",
"stop-opacity",
"stroke",
"stroke-dasharray",
"stroke-dashoffset",
"stroke-linecap",
"stroke-linejoin",
"stroke-miterlimit",
"stroke-opacity",
"stroke-width",
"systemLanguage",
"text-anchor",
"text-decoration",
"text-rendering",
"to",
"unicode-bidi",
"values",
"visibility",
"word-spacing",
"writing-mode"
],
animateColor: [
"accumulate",
"additive",
"alignment-baseline",
"attributeName",
"attributeType",
"baseline-shift",
"begin",
"by",
"calcMode",
"clip",
"clip-path",
"clip-rule",
"color",
"color-interpolation",
"color-interpolation-filters",
"color-profile",
"color-rendering",
"cursor",
"direction",
"display",
"dominant-baseline",
"dur",
"enable-background",
"end",
"externalResourcesRequired",
"fill",
"fill-opacity",
"fill-rule",
"filter",
"flood-color",
"flood-opacity",
"font-family",
"font-size",
"font-size-adjust",
"font-stretch",
"font-style",
"font-variant",
"font-weight",
"from",
"glyph-orientation-horizontal",
"glyph-orientation-vertical",
"image-rendering",
"kerning",
"keySplines",
"keyTimes",
"letter-spacing",
"lighting-color",
"marker-end",
"marker-mid",
"marker-start",
"mask",
"max",
"min",
"opacity",
"overflow",
"pointer-events",
"repeatCount",
"repeatDur",
"requiredExtensions",
"requiredFeatures",
"requiredFonts",
"requiredFormats",
"restart",
"shape-rendering",
"stop-color",
"stop-opacity",
"stroke",
"stroke-dasharray",
"stroke-dashoffset",
"stroke-linecap",
"stroke-linejoin",
"stroke-miterlimit",
"stroke-opacity",
"stroke-width",
"systemLanguage",
"text-anchor",
"text-decoration",
"text-rendering",
"to",
"unicode-bidi",
"values",
"visibility",
"word-spacing",
"writing-mode"
],
animateMotion: [
"accumulate",
"additive",
"begin",
"by",
"calcMode",
"dur",
"end",
"externalResourcesRequired",
"fill",
"from",
"href",
"keyPoints",
"keySplines",
"keyTimes",
"max",
"min",
"origin",
"path",
"repeatCount",
"repeatDur",
"requiredExtensions",
"requiredFeatures",
"requiredFonts",
"requiredFormats",
"restart",
"rotate",
"systemLanguage",
"to",
"values"
],
animateTransform: [
"accumulate",
"additive",
"attributeName",
"attributeType",
"begin",
"by",
"calcMode",
"dur",
"end",
"externalResourcesRequired",
"fill",
"from",
"href",
"keySplines",
"keyTimes",
"max",
"min",
"repeatCount",
"repeatDur",
"requiredExtensions",
"requiredFeatures",
"requiredFonts",
"requiredFormats",
"restart",
"systemLanguage",
"to",
"type",
"values"
],
animation: [
"begin",
"dur",
"end",
"externalResourcesRequired",
"fill",
"focusHighlight",
"focusable",
"height",
"initialVisibility",
"max",
"min",
"nav-down",
"nav-down-left",
"nav-down-right",
"nav-left",
"nav-next",
"nav-prev",
"nav-right",
"nav-up",
"nav-up-left",
"nav-up-right",
"preserveAspectRatio",
"repeatCount",
"repeatDur",
"requiredExtensions",
"requiredFeatures",
"requiredFonts",
"requiredFormats",
"restart",
"syncBehavior",
"syncMaster",
"syncTolerance",
"systemLanguage",
"transform",
"width",
"x",
"y"
],
audio: [
"begin",
"dur",
"end",
"externalResourcesRequired",
"fill",
"max",
"min",
"repeatCount",
"repeatDur",
"requiredExtensions",
"requiredFeatures",
"requiredFonts",
"requiredFormats",
"restart",
"syncBehavior",
"syncMaster",
"syncTolerance",
"systemLanguage",
"type"
],
canvas: ["preserveAspectRatio", "requiredExtensions", "systemLanguage"],
circle: [
"alignment-baseline",
"baseline-shift",
"clip",
"clip-path",
"clip-rule",
"color",
"color-interpolation",
"color-interpolation-filters",
"color-profile",
"color-rendering",
"cursor",
"cx",
"cy",
"direction",
"display",
"dominant-baseline",
"enable-background",
"externalResourcesRequired",
"fill",
"fill-opacity",
"fill-rule",
"filter",
"flood-color",
"flood-opacity",
"focusHighlight",
"focusable",
"font-family",
"font-size",
"font-size-adjust",
"font-stretch",
"font-style",
"font-variant",
"font-weight",
"glyph-orientation-horizontal",
"glyph-orientation-vertical",
"image-rendering",
"kerning",
"letter-spacing",
"lighting-color",
"marker-end",
"marker-mid",
"marker-start",
"mask",
"nav-down",
"nav-down-left",
"nav-down-right",
"nav-left",
"nav-next",
"nav-prev",
"nav-right",
"nav-up",
"nav-up-left",
"nav-up-right",
"opacity",
"overflow",
"pathLength",
"pointer-events",
"r",
"requiredExtensions",
"requiredFeatures",
"requiredFonts",
"requiredFormats",
"shape-rendering",
"stop-color",
"stop-opacity",
"stroke",
"stroke-dasharray",
"stroke-dashoffset",
"stroke-linecap",
"stroke-linejoin",
"stroke-miterlimit",
"stroke-opacity",
"stroke-width",
"systemLanguage",
"text-anchor",
"text-decoration",
"text-rendering",
"transform",
"unicode-bidi",
"visibility",
"word-spacing",
"writing-mode"
],
clipPath: [
"alignment-baseline",
"baseline-shift",
"clip",
"clip-path",
"clip-rule",
"clipPathUnits",
"color",
"color-interpolation",
"color-interpolation-filters",
"color-profile",
"color-rendering",
"cursor",
"direction",
"display",
"dominant-baseline",
"enable-background",
"externalResourcesRequired",
"fill",
"fill-opacity",
"fill-rule",
"filter",
"flood-color",
"flood-opacity",
"font-family",
"font-size",
"font-size-adjust",
"font-stretch",
"font-style",
"font-variant",
"font-weight",
"glyph-orientation-horizontal",
"glyph-orientation-vertical",
"image-rendering",
"kerning",
"letter-spacing",
"lighting-color",
"marker-end",
"marker-mid",
"marker-start",
"mask",
"opacity",
"overflow",
"pointer-events",
"requiredExtensions",
"requiredFeatures",
"shape-rendering",
"stop-color",
"stop-opacity",
"stroke",
"stroke-dasharray",
"stroke-dashoffset",
"stroke-linecap",
"stroke-linejoin",
"stroke-miterlimit",
"stroke-opacity",
"stroke-width",
"systemLanguage",
"text-anchor",
"text-decoration",
"text-rendering",
"transform",
"unicode-bidi",
"visibility",
"word-spacing",
"writing-mode"
],
"color-profile": ["local", "name", "rendering-intent"],
cursor: [
"externalResourcesRequired",
"requiredExtensions",
"requiredFeatures",
"systemLanguage",
"x",
"y"
],
defs: [
"alignment-baseline",
"baseline-shift",
"clip",
"clip-path",
"clip-rule",
"color",
"color-interpolation",
"color-interpolation-filters",
"color-profile",
"color-rendering",
"cursor",
"direction",
"display",
"dominant-baseline",
"enable-background",
"externalResourcesRequired",
"fill",
"fill-opacity",
"fill-rule",
"filter",
"flood-color",
"flood-opacity",
"font-family",
"font-size",
"font-size-adjust",
"font-stretch",
"font-style",
"font-variant",
"font-weight",
"glyph-orientation-horizontal",
"glyph-orientation-vertical",
"image-rendering",
"kerning",
"letter-spacing",
"lighting-color",
"marker-end",
"marker-mid",
"marker-start",
"mask",
"opacity",
"overflow",
"pointer-events",
"requiredExtensions",
"requiredFeatures",
"shape-rendering",
"stop-color",
"stop-opacity",
"stroke",
"stroke-dasharray",
"stroke-dashoffset",
"stroke-linecap",
"stroke-linejoin",
"stroke-miterlimit",
"stroke-opacity",
"stroke-width",
"systemLanguage",
"text-anchor",
"text-decoration",
"text-rendering",
"transform",
"unicode-bidi",
"visibility",
"word-spacing",
"writing-mode"
],
desc: [
"requiredExtensions",
"requiredFeatures",
"requiredFonts",
"requiredFormats",
"systemLanguage"
],
discard: [
"begin",
"href",
"requiredExtensions",
"requiredFeatures",
"requiredFonts",
"requiredFormats",
"systemLanguage"
],
ellipse: [
"alignment-baseline",
"baseline-shift",
"clip",
"clip-path",
"clip-rule",
"color",
"color-interpolation",
"color-interpolation-filters",
"color-profile",
"color-rendering",
"cursor",
"cx",
"cy",
"direction",
"display",
"dominant-baseline",
"enable-background",
"externalResourcesRequired",
"fill",
"fill-opacity",
"fill-rule",
"filter",
"flood-color",
"flood-opacity",
"focusHighlight",
"focusable",
"font-family",
"font-size",
"font-size-adjust",
"font-stretch",
"font-style",
"font-variant",
"font-weight",
"glyph-orientation-horizontal",
"glyph-orientation-vertical",
"image-rendering",
"kerning",
"letter-spacing",
"lighting-color",
"marker-end",
"marker-mid",
"marker-start",
"mask",
"nav-down",
"nav-down-left",
"nav-down-right",
"nav-left",
"nav-next",
"nav-prev",
"nav-right",
"nav-up",
"nav-up-left",
"nav-up-right",
"opacity",
"overflow",
"pathLength",
"pointer-events",
"requiredExtensions",
"requiredFeatures",
"requiredFonts",
"requiredFormats",
"rx",
"ry",
"shape-rendering",
"stop-color",
"stop-opacity",
"stroke",
"stroke-dasharray",
"stroke-dashoffset",
"stroke-linecap",
"stroke-linejoin",
"stroke-miterlimit",
"stroke-opacity",
"stroke-width",
"systemLanguage",
"text-anchor",
"text-decoration",
"text-rendering",
"transform",
"unicode-bidi",
"visibility",
"word-spacing",
"writing-mode"
],
feBlend: [
"alignment-baseline",
"baseline-shift",
"clip",
"clip-path",
"clip-rule",
"color",
"color-interpolation",
"color-interpolation-filters",
"color-profile",
"color-rendering",
"cursor",
"direction",
"display",
"dominant-baseline",
"enable-background",
"fill",
"fill-opacity",
"fill-rule",
"filter",
"flood-color",
"flood-opacity",
"font-family",
"font-size",
"font-size-adjust",
"font-stretch",
"font-style",
"font-variant",
"font-weight",
"glyph-orientation-horizontal",
"glyph-orientation-vertical",
"height",
"image-rendering",
"in",
"in2",
"kerning",
"letter-spacing",
"lighting-color",
"marker-end",
"marker-mid",
"marker-start",
"mask",
"mode",
"opacity",
"overflow",
"pointer-events",
"result",
"shape-rendering",
"stop-color",
"stop-opacity",
"stroke",
"stroke-dasharray",
"stroke-dashoffset",
"stroke-linecap",
"stroke-linejoin",
"stroke-miterlimit",
"stroke-opacity",
"stroke-width",
"text-anchor",
"text-decoration",
"text-rendering",
"unicode-bidi",
"visibility",
"width",
"word-spacing",
"writing-mode",
"x",
"y"
],
feColorMatrix: [
"alignment-baseline",
"baseline-shift",
"clip",
"clip-path",
"clip-rule",
"color",
"color-interpolation",
"color-interpolation-filters",
"color-profile",
"color-rendering",
"cursor",
"direction",
"display",
"dominant-baseline",
"enable-background",
"fill",
"fill-opacity",
"fill-rule",
"filter",
"flood-color",
"flood-opacity",
"font-family",
"font-size",
"font-size-adjust",
"font-stretch",
"font-style",
"font-variant",
"font-weight",
"glyph-orientation-horizontal",
"glyph-orientation-vertical",
"height",
"image-rendering",
"in",
"kerning",
"letter-spacing",
"lighting-color",
"marker-end",
"marker-mid",
"marker-start",
"mask",
"opacity",
"overflow",
"pointer-events",
"result",
"shape-rendering",
"stop-color",
"stop-opacity",
"stroke",
"stroke-dasharray",
"stroke-dashoffset",
"stroke-linecap",
"stroke-linejoin",
"stroke-miterlimit",
"stroke-opacity",
"stroke-width",
"text-anchor",
"text-decoration",
"text-rendering",
"type",
"unicode-bidi",
"values",
"visibility",
"width",
"word-spacing",
"writing-mode",
"x",
"y"
],
feComponentTransfer: [
"alignment-baseline",
"baseline-shift",
"clip",
"clip-path",
"clip-rule",
"color",
"color-interpolation",
"color-interpolation-filters",
"color-profile",
"color-rendering",
"cursor",
"direction",
"display",
"dominant-baseline",
"enable-background",
"fill",
"fill-opacity",
"fill-rule",
"filter",
"flood-color",
"flood-opacity",
"font-family",
"font-size",
"font-size-adjust",
"font-stretch",
"font-style",
"font-variant",
"font-weight",
"glyph-orientation-horizontal",
"glyph-orientation-vertical",
"height",
"image-rendering",
"in",
"kerning",
"letter-spacing",
"lighting-color",
"marker-end",
"marker-mid",
"marker-start",
"mask",
"opacity",
"overflow",
"pointer-events",
"result",
"shape-rendering",
"stop-color",
"stop-opacity",
"stroke",
"stroke-dasharray",
"stroke-dashoffset",
"stroke-linecap",
"stroke-linejoin",
"stroke-miterlimit",
"stroke-opacity",
"stroke-width",
"text-anchor",
"text-decoration",
"text-rendering",
"unicode-bidi",
"visibility",
"width",
"word-spacing",
"writing-mode",
"x",
"y"
],
feComposite: [
"alignment-baseline",
"baseline-shift",
"clip",
"clip-path",
"clip-rule",
"color",
"color-interpolation",
"color-interpolation-filters",
"color-profile",
"color-rendering",
"cursor",
"direction",
"display",
"dominant-baseline",
"enable-background",
"fill",
"fill-opacity",
"fill-rule",
"filter",
"flood-color",
"flood-opacity",
"font-family",
"font-size",
"font-size-adjust",
"font-stretch",
"font-style",
"font-variant",
"font-weight",
"glyph-orientation-horizontal",
"glyph-orientation-vertical",
"height",
"image-rendering",
"in",
"in2",
"k1",
"k2",
"k3",
"k4",
"kerning",
"letter-spacing",
"lighting-color",
"marker-end",
"marker-mid",
"marker-start",
"mask",
"opacity",
"operator",
"overflow",
"pointer-events",
"result",
"shape-rendering",
"stop-color",
"stop-opacity",
"stroke",
"stroke-dasharray",
"stroke-dashoffset",
"stroke-linecap",
"stroke-linejoin",
"stroke-miterlimit",
"stroke-opacity",
"stroke-width",
"text-anchor",
"text-decoration",
"text-rendering",
"unicode-bidi",
"visibility",
"width",
"word-spacing",
"writing-mode",
"x",
"y"
],
feConvolveMatrix: [
"alignment-baseline",
"baseline-shift",
"bias",
"clip",
"clip-path",
"clip-rule",
"color",
"color-interpolation",
"color-interpolation-filters",
"color-profile",
"color-rendering",
"cursor",
"direction",
"display",
"divisor",
"dominant-baseline",
"edgeMode",
"enable-background",
"fill",
"fill-opacity",
"fill-rule",
"filter",
"flood-color",
"flood-opacity",
"font-family",
"font-size",
"font-size-adjust",
"font-stretch",
"font-style",
"font-variant",
"font-weight",
"glyph-orientation-horizontal",
"glyph-orientation-vertical",
"height",
"image-rendering",
"in",
"kernelMatrix",
"kernelUnitLength",
"kerning",
"letter-spacing",
"lighting-color",
"marker-end",
"marker-mid",
"marker-start",
"mask",
"opacity",
"order",
"overflow",
"pointer-events",
"preserveAlpha",
"result",
"shape-rendering",
"stop-color",
"stop-opacity",
"stroke",
"stroke-dasharray",
"stroke-dashoffset",
"stroke-linecap",
"stroke-linejoin",
"stroke-miterlimit",
"stroke-opacity",
"stroke-width",
"targetX",
"targetY",
"text-anchor",
"text-decoration",
"text-rendering",
"unicode-bidi",
"visibility",
"width",
"word-spacing",
"writing-mode",
"x",
"y"
],
feDiffuseLighting: [
"alignment-baseline",
"baseline-shift",
"clip",
"clip-path",
"clip-rule",
"color",
"color-interpolation",
"color-interpolation-filters",
"color-profile",
"color-rendering",
"cursor",
"diffuseConstant",
"direction",
"display",
"dominant-baseline",
"enable-background",
"fill",
"fill-opacity",
"fill-rule",
"filter",
"flood-color",
"flood-opacity",
"font-family",
"font-size",
"font-size-adjust",
"font-stretch",
"font-style",
"font-variant",
"font-weight",
"glyph-orientation-horizontal",
"glyph-orientation-vertical",
"height",
"image-rendering",
"in",
"kernelUnitLength",
"kerning",
"letter-spacing",
"lighting-color",
"marker-end",
"marker-mid",
"marker-start",
"mask",
"opacity",
"overflow",
"pointer-events",
"result",
"shape-rendering",
"stop-color",
"stop-opacity",
"stroke",
"stroke-dasharray",
"stroke-dashoffset",
"stroke-linecap",
"stroke-linejoin",
"stroke-miterlimit",
"stroke-opacity",
"stroke-width",
"surfaceScale",
"text-anchor",
"text-decoration",
"text-rendering",
"unicode-bidi",
"visibility",
"width",
"word-spacing",
"writing-mode",
"x",
"y"
],
feDisplacementMap: [
"alignment-baseline",
"baseline-shift",
"clip",
"clip-path",
"clip-rule",
"color",
"color-interpolation",
"color-interpolation-filters",
"color-profile",
"color-rendering",
"cursor",
"direction",
"display",
"dominant-baseline",
"enable-background",
"fill",
"fill-opacity",
"fill-rule",
"filter",
"flood-color",
"flood-opacity",
"font-family",
"font-size",
"font-size-adjust",
"font-stretch",
"font-style",
"font-variant",
"font-weight",
"glyph-orientation-horizontal",
"glyph-orientation-vertical",
"height",
"image-rendering",
"in",
"in2",
"kerning",
"letter-spacing",
"lighting-color",
"marker-end",
"marker-mid",
"marker-start",
"mask",
"opacity",
"overflow",
"pointer-events",
"result",
"scale",
"shape-rendering",
"stop-color",
"stop-opacity",
"stroke",
"stroke-dasharray",
"stroke-dashoffset",
"stroke-linecap",
"stroke-linejoin",
"stroke-miterlimit",
"stroke-opacity",
"stroke-width",
"text-anchor",
"text-decoration",
"text-rendering",
"unicode-bidi",
"visibility",
"width",
"word-spacing",
"writing-mode",
"x",
"xChannelSelector",
"y",
"yChannelSelector"
],
feDistantLight: ["azimuth", "elevation"],
feDropShadow: [
"dx",
"dy",
"height",
"in",
"result",
"stdDeviation",
"width",
"x",
"y"
],
feFlood: [
"alignment-baseline",
"baseline-shift",
"clip",
"clip-path",
"clip-rule",
"color",
"color-interpolation",
"color-interpolation-filters",
"color-profile",
"color-rendering",
"cursor",
"direction",
"display",
"dominant-baseline",
"enable-background",
"fill",
"fill-opacity",
"fill-rule",
"filter",
"flood-color",
"flood-opacity",
"font-family",
"font-size",
"font-size-adjust",
"font-stretch",
"font-style",
"font-variant",
"font-weight",
"glyph-orientation-horizontal",
"glyph-orientation-vertical",
"height",
"image-rendering",
"kerning",
"letter-spacing",
"lighting-color",
"marker-end",
"marker-mid",
"marker-start",
"mask",
"opacity",
"overflow",
"pointer-events",
"result",
"shape-rendering",
"stop-color",
"stop-opacity",
"stroke",
"stroke-dasharray",
"stroke-dashoffset",
"stroke-linecap",
"stroke-linejoin",
"stroke-miterlimit",
"stroke-opacity",
"stroke-width",
"text-anchor",
"text-decoration",
"text-rendering",
"unicode-bidi",
"visibility",
"width",
"word-spacing",
"writing-mode",
"x",
"y"
],
feFuncA: [
"amplitude",
"exponent",
"intercept",
"offset",
"slope",
"tableValues",
"type"
],
feFuncB: [
"amplitude",
"exponent",
"intercept",
"offset",
"slope",
"tableValues",
"type"
],
feFuncG: [
"amplitude",
"exponent",
"intercept",
"offset",
"slope",
"tableValues",
"type"
],
feFuncR: [
"amplitude",
"exponent",
"intercept",
"offset",
"slope",
"tableValues",
"type"
],
feGaussianBlur: [
"alignment-baseline",
"baseline-shift",
"clip",
"clip-path",
"clip-rule",
"color",
"color-interpolation",
"color-interpolation-filters",
"color-profile",
"color-rendering",
"cursor",
"direction",
"display",
"dominant-baseline",
"edgeMode",
"enable-background",
"fill",
"fill-opacity",
"fill-rule",
"filter",
"flood-color",
"flood-opacity",
"font-family",
"font-size",
"font-size-adjust",
"font-stretch",
"font-style",
"font-variant",
"font-weight",
"glyph-orientation-horizontal",
"glyph-orientation-vertical",
"height",
"image-rendering",
"in",
"kerning",
"letter-spacing",
"lighting-color",
"marker-end",
"marker-mid",
"marker-start",
"mask",
"opacity",
"overflow",
"pointer-events",
"result",
"shape-rendering",
"stdDeviation",
"stop-color",
"stop-opacity",
"stroke",
"stroke-dasharray",
"stroke-dashoffset",
"stroke-linecap",
"stroke-linejoin",
"stroke-miterlimit",
"stroke-opacity",
"stroke-width",
"text-anchor",
"text-decoration",
"text-rendering",
"unicode-bidi",
"visibility",
"width",
"word-spacing",
"writing-mode",
"x",
"y"
],
feImage: [
"alignment-baseline",
"baseline-shift",
"clip",
"clip-path",
"clip-rule",
"color",
"color-interpolation",
"color-interpolation-filters",
"color-profile",
"color-rendering",
"crossorigin",
"cursor",
"direction",
"display",
"dominant-baseline",
"enable-background",
"externalResourcesRequired",
"fill",
"fill-opacity",
"fill-rule",
"filter",
"flood-color",
"flood-opacity",
"font-family",
"font-size",
"font-size-adjust",
"font-stretch",
"font-style",
"font-variant",
"font-weight",
"glyph-orientation-horizontal",
"glyph-orientation-vertical",
"height",
"href",
"image-rendering",
"kerning",
"letter-spacing",
"lighting-color",
"marker-end",
"marker-mid",
"marker-start",
"mask",
"opacity",
"overflow",
"pointer-events",
"preserveAspectRatio",
"result",
"shape-rendering",
"stop-color",
"stop-opacity",
"stroke",
"stroke-dasharray",
"stroke-dashoffset",
"stroke-linecap",
"stroke-linejoin",
"stroke-miterlimit",
"stroke-opacity",
"stroke-width",
"text-anchor",
"text-decoration",
"text-rendering",
"unicode-bidi",
"visibility",
"width",
"word-spacing",
"writing-mode",
"x",
"y"
],
feMerge: [
"alignment-baseline",
"baseline-shift",
"clip",
"clip-path",
"clip-rule",
"color",
"color-interpolation",
"color-interpolation-filters",
"color-profile",
"color-rendering",
"cursor",
"direction",
"display",
"dominant-baseline",
"enable-background",
"fill",
"fill-opacity",
"fill-rule",
"filter",
"flood-color",
"flood-opacity",
"font-family",
"font-size",
"font-size-adjust",
"font-stretch",
"font-style",
"font-variant",
"font-weight",
"glyph-orientation-horizontal",
"glyph-orientation-vertical",
"height",
"image-rendering",
"kerning",
"letter-spacing",
"lighting-color",
"marker-end",
"marker-mid",
"marker-start",
"mask",
"opacity",
"overflow",
"pointer-events",
"result",
"shape-rendering",
"stop-color",
"stop-opacity",
"stroke",
"stroke-dasharray",
"stroke-dashoffset",
"stroke-linecap",
"stroke-linejoin",
"stroke-miterlimit",
"stroke-opacity",
"stroke-width",
"text-anchor",
"text-decoration",
"text-rendering",
"unicode-bidi",
"visibility",
"width",
"word-spacing",
"writing-mode",
"x",
"y"
],
feMergeNode: ["in"],
feMorphology: [
"alignment-baseline",
"baseline-shift",
"clip",
"clip-path",
"clip-rule",
"color",
"color-interpolation",
"color-interpolation-filters",
"color-profile",
"color-rendering",
"cursor",
"direction",
"display",
"dominant-baseline",
"enable-background",
"fill",
"fill-opacity",
"fill-rule",
"filter",
"flood-color",
"flood-opacity",
"font-family",
"font-size",
"font-size-adjust",
"font-stretch",
"font-style",
"font-variant",
"font-weight",
"glyph-orientation-horizontal",
"glyph-orientation-vertical",
"height",
"image-rendering",
"in",
"kerning",
"letter-spacing",
"lighting-color",
"marker-end",
"marker-mid",
"marker-start",
"mask",
"opacity",
"operator",
"overflow",
"pointer-events",
"radius",
"result",
"shape-rendering",
"stop-color",
"stop-opacity",
"stroke",
"stroke-dasharray",
"stroke-dashoffset",
"stroke-linecap",
"stroke-linejoin",
"stroke-miterlimit",
"stroke-opacity",
"stroke-width",
"text-anchor",
"text-decoration",
"text-rendering",
"unicode-bidi",
"visibility",
"width",
"word-spacing",
"writing-mode",
"x",
"y"
],
feOffset: [
"alignment-baseline",
"baseline-shift",
"clip",
"clip-path",
"clip-rule",
"color",
"color-interpolation",
"color-interpolation-filters",
"color-profile",
"color-rendering",
"cursor",
"direction",
"display",
"dominant-baseline",
"dx",
"dy",
"enable-background",
"fill",
"fill-opacity",
"fill-rule",
"filter",
"flood-color",
"flood-opacity",
"font-family",
"font-size",
"font-size-adjust",
"font-stretch",
"font-style",
"font-variant",
"font-weight",
"glyph-orientation-horizontal",
"glyph-orientation-vertical",
"height",
"image-rendering",
"in",
"kerning",
"letter-spacing",
"lighting-color",
"marker-end",
"marker-mid",
"marker-start",
"mask",
"opacity",
"overflow",
"pointer-events",
"result",
"shape-rendering",
"stop-color",
"stop-opacity",
"stroke",
"stroke-dasharray",
"stroke-dashoffset",
"stroke-linecap",
"stroke-linejoin",
"stroke-miterlimit",
"stroke-opacity",
"stroke-width",
"text-anchor",
"text-decoration",
"text-rendering",
"unicode-bidi",
"visibility",
"width",
"word-spacing",
"writing-mode",
"x",
"y"
],
fePointLight: ["x", "y", "z"],
feSpecularLighting: [
"alignment-baseline",
"baseline-shift",
"clip",
"clip-path",
"clip-rule",
"color",
"color-interpolation",
"color-interpolation-filters",
"color-profile",
"color-rendering",
"cursor",
"direction",
"display",
"dominant-baseline",
"enable-background",
"fill",
"fill-opacity",
"fill-rule",
"filter",
"flood-color",
"flood-opacity",
"font-family",
"font-size",
"font-size-adjust",
"font-stretch",
"font-style",
"font-variant",
"font-weight",
"glyph-orientation-horizontal",
"glyph-orientation-vertical",
"height",
"image-rendering",
"in",
"kernelUnitLength",
"kerning",
"letter-spacing",
"lighting-color",
"marker-end",
"marker-mid",
"marker-start",
"mask",
"opacity",
"overflow",
"pointer-events",
"result",
"shape-rendering",
"specularConstant",
"specularExponent",
"stop-color",
"stop-opacity",
"stroke",
"stroke-dasharray",
"stroke-dashoffset",
"stroke-linecap",
"stroke-linejoin",
"stroke-miterlimit",
"stroke-opacity",
"stroke-width",
"surfaceScale",
"text-anchor",
"text-decoration",
"text-rendering",
"unicode-bidi",
"visibility",
"width",
"word-spacing",
"writing-mode",
"x",
"y"
],
feSpotLight: [
"limitingConeAngle",
"pointsAtX",
"pointsAtY",
"pointsAtZ",
"specularExponent",
"x",
"y",
"z"
],
feTile: [
"alignment-baseline",
"baseline-shift",
"clip",
"clip-path",
"clip-rule",
"color",
"color-interpolation",
"color-interpolation-filters",
"color-profile",
"color-rendering",
"cursor",
"direction",
"display",
"dominant-baseline",
"enable-background",
"fill",
"fill-opacity",
"fill-rule",
"filter",
"flood-color",
"flood-opacity",
"font-family",
"font-size",
"font-size-adjust",
"font-stretch",
"font-style",
"font-variant",
"font-weight",
"glyph-orientation-horizontal",
"glyph-orientation-vertical",
"height",
"image-rendering",
"in",
"kerning",
"letter-spacing",
"lighting-color",
"marker-end",
"marker-mid",
"marker-start",
"mask",
"opacity",
"overflow",
"pointer-events",
"result",
"shape-rendering",
"stop-color",
"stop-opacity",
"stroke",
"stroke-dasharray",
"stroke-dashoffset",
"stroke-linecap",
"stroke-linejoin",
"stroke-miterlimit",
"stroke-opacity",
"stroke-width",
"text-anchor",
"text-decoration",
"text-rendering",
"unicode-bidi",
"visibility",
"width",
"word-spacing",
"writing-mode",
"x",
"y"
],
feTurbulence: [
"alignment-baseline",
"baseFrequency",
"baseline-shift",
"clip",
"clip-path",
"clip-rule",
"color",
"color-interpolation",
"color-interpolation-filters",
"color-profile",
"color-rendering",
"cursor",
"direction",
"display",
"dominant-baseline",
"enable-background",
"fill",
"fill-opacity",
"fill-rule",
"filter",
"flood-color",
"flood-opacity",
"font-family",
"font-size",
"font-size-adjust",
"font-stretch",
"font-style",
"font-variant",
"font-weight",
"glyph-orientation-horizontal",
"glyph-orientation-vertical",
"height",
"image-rendering",
"kerning",
"letter-spacing",
"lighting-color",
"marker-end",
"marker-mid",
"marker-start",
"mask",
"numOctaves",
"opacity",
"overflow",
"pointer-events",
"result",
"seed",
"shape-rendering",
"stitchTiles",
"stop-color",
"stop-opacity",
"stroke",
"stroke-dasharray",
"stroke-dashoffset",
"stroke-linecap",
"stroke-linejoin",
"stroke-miterlimit",
"stroke-opacity",
"stroke-width",
"text-anchor",
"text-decoration",
"text-rendering",
"type",
"unicode-bidi",
"visibility",
"width",
"word-spacing",
"writing-mode",
"x",
"y"
],
filter: [
"alignment-baseline",
"baseline-shift",
"clip",
"clip-path",
"clip-rule",
"color",
"color-interpolation",
"color-interpolation-filters",
"color-profile",
"color-rendering",
"cursor",
"direction",
"display",
"dominant-baseline",
"enable-background",
"externalResourcesRequired",
"fill",
"fill-opacity",
"fill-rule",
"filter",
"filterRes",
"filterUnits",
"flood-color",
"flood-opacity",
"font-family",
"font-size",
"font-size-adjust",
"font-stretch",
"font-style",
"font-variant",
"font-weight",
"glyph-orientation-horizontal",
"glyph-orientation-vertical",
"height",
"image-rendering",
"kerning",
"letter-spacing",
"lighting-color",
"marker-end",
"marker-mid",
"marker-start",
"mask",
"opacity",
"overflow",
"pointer-events",
"primitiveUnits",
"shape-rendering",
"stop-color",
"stop-opacity",
"stroke",
"stroke-dasharray",
"stroke-dashoffset",
"stroke-linecap",
"stroke-linejoin",
"stroke-miterlimit",
"stroke-opacity",
"stroke-width",
"text-anchor",
"text-decoration",
"text-rendering",
"unicode-bidi",
"visibility",
"width",
"word-spacing",
"writing-mode",
"x",
"y"
],
font: [
"alignment-baseline",
"baseline-shift",
"clip",
"clip-path",
"clip-rule",
"color",
"color-interpolation",
"color-interpolation-filters",
"color-profile",
"color-rendering",
"cursor",
"direction",
"display",
"dominant-baseline",
"enable-background",
"externalResourcesRequired",
"fill",
"fill-opacity",
"fill-rule",
"filter",
"flood-color",
"flood-opacity",
"font-family",
"font-size",
"font-size-adjust",
"font-stretch",
"font-style",
"font-variant",
"font-weight",
"glyph-orientation-horizontal",
"glyph-orientation-vertical",
"horiz-adv-x",
"horiz-origin-x",
"horiz-origin-y",
"image-rendering",
"kerning",
"letter-spacing",
"lighting-color",
"marker-end",
"marker-mid",
"marker-start",
"mask",
"opacity",
"overflow",
"pointer-events",
"shape-rendering",
"stop-color",
"stop-opacity",
"stroke",
"stroke-dasharray",
"stroke-dashoffset",
"stroke-linecap",
"stroke-linejoin",
"stroke-miterlimit",
"stroke-opacity",
"stroke-width",
"text-anchor",
"text-decoration",
"text-rendering",
"unicode-bidi",
"vert-adv-y",
"vert-origin-x",
"vert-origin-y",
"visibility",
"word-spacing",
"writing-mode"
],
"font-face": [
"accent-height",
"alphabetic",
"ascent",
"bbox",
"cap-height",
"descent",
"externalResourcesRequired",
"font-family",
"font-size",
"font-stretch",
"font-style",
"font-variant",
"font-weight",
"hanging",
"ideographic",
"mathematical",
"overline-position",
"overline-thickness",
"panose-1",
"slope",
"stemh",
"stemv",
"strikethrough-position",
"strikethrough-thickness",
"underline-position",
"underline-thickness",
"unicode-range",
"units-per-em",
"v-alphabetic",
"v-hanging",
"v-ideographic",
"v-mathematical",
"widths",
"x-height"
],
"font-face-format": ["string"],
"font-face-name": ["name"],
"font-face-src": [],
"font-face-uri": ["externalResourcesRequired"],
foreignObject: [
"alignment-baseline",
"baseline-shift",
"clip",
"clip-path",
"clip-rule",
"color",
"color-interpolation",
"color-interpolation-filters",
"color-profile",
"color-rendering",
"cursor",
"direction",
"display",
"dominant-baseline",
"enable-background",
"externalResourcesRequired",
"fill",
"fill-opacity",
"fill-rule",
"filter",
"flood-color",
"flood-opacity",
"focusHighlight",
"focusable",
"font-family",
"font-size",
"font-size-adjust",
"font-stretch",
"font-style",
"font-variant",
"font-weight",
"glyph-orientation-horizontal",
"glyph-orientation-vertical",
"height",
"image-rendering",
"kerning",
"letter-spacing",
"lighting-color",
"marker-end",
"marker-mid",
"marker-start",
"mask",
"nav-down",
"nav-down-left",
"nav-down-right",
"nav-left",
"nav-next",
"nav-prev",
"nav-right",
"nav-up",
"nav-up-left",
"nav-up-right",
"opacity",
"overflow",
"pointer-events",
"requiredExtensions",
"requiredFeatures",
"requiredFonts",
"requiredFormats",
"shape-rendering",
"stop-color",
"stop-opacity",
"stroke",
"stroke-dasharray",
"stroke-dashoffset",
"stroke-linecap",
"stroke-linejoin",
"stroke-miterlimit",
"stroke-opacity",
"stroke-width",
"systemLanguage",
"text-anchor",
"text-decoration",
"text-rendering",
"transform",
"unicode-bidi",
"visibility",
"width",
"word-spacing",
"writing-mode",
"x",
"y"
],
g: [
"alignment-baseline",
"baseline-shift",
"clip",
"clip-path",
"clip-rule",
"color",
"color-interpolation",
"color-interpolation-filters",
"color-profile",
"color-rendering",
"cursor",
"direction",
"display",
"dominant-baseline",
"enable-background",
"externalResourcesRequired",
"fill",
"fill-opacity",
"fill-rule",
"filter",
"flood-color",
"flood-opacity",
"focusHighlight",
"focusable",
"font-family",
"font-size",
"font-size-adjust",
"font-stretch",
"font-style",
"font-variant",
"font-weight",
"glyph-orientation-horizontal",
"glyph-orientation-vertical",
"image-rendering",
"kerning",
"letter-spacing",
"lighting-color",
"marker-end",
"marker-mid",
"marker-start",
"mask",
"nav-down",
"nav-down-left",
"nav-down-right",
"nav-left",
"nav-next",
"nav-prev",
"nav-right",
"nav-up",
"nav-up-left",
"nav-up-right",
"opacity",
"overflow",
"pointer-events",
"requiredExtensions",
"requiredFeatures",
"requiredFonts",
"requiredFormats",
"shape-rendering",
"stop-color",
"stop-opacity",
"stroke",
"stroke-dasharray",
"stroke-dashoffset",
"stroke-linecap",
"stroke-linejoin",
"stroke-miterlimit",
"stroke-opacity",
"stroke-width",
"systemLanguage",
"text-anchor",
"text-decoration",
"text-rendering",
"transform",
"unicode-bidi",
"visibility",
"word-spacing",
"writing-mode"
],
glyph: [
"alignment-baseline",
"arabic-form",
"baseline-shift",
"clip",
"clip-path",
"clip-rule",
"color",
"color-interpolation",
"color-interpolation-filters",
"color-profile",
"color-rendering",
"cursor",
"d",
"direction",
"display",
"dominant-baseline",
"enable-background",
"fill",
"fill-opacity",
"fill-rule",
"filter",
"flood-color",
"flood-opacity",
"font-family",
"font-size",
"font-size-adjust",
"font-stretch",
"font-style",
"font-variant",
"font-weight",
"glyph-name",
"glyph-orientation-horizontal",
"glyph-orientation-vertical",
"horiz-adv-x",
"image-rendering",
"kerning",
"letter-spacing",
"lighting-color",
"marker-end",
"marker-mid",
"marker-start",
"mask",
"opacity",
"orientation",
"overflow",
"pointer-events",
"shape-rendering",
"stop-color",
"stop-opacity",
"stroke",
"stroke-dasharray",
"stroke-dashoffset",
"stroke-linecap",
"stroke-linejoin",
"stroke-miterlimit",
"stroke-opacity",
"stroke-width",
"text-anchor",
"text-decoration",
"text-rendering",
"unicode",
"unicode-bidi",
"vert-adv-y",
"vert-origin-x",
"vert-origin-y",
"visibility",
"word-spacing",
"writing-mode"
],
glyphRef: [
"alignment-baseline",
"baseline-shift",
"clip",
"clip-path",
"clip-rule",
"color",
"color-interpolation",
"color-interpolation-filters",
"color-profile",
"color-rendering",
"cursor",
"direction",
"display",
"dominant-baseline",
"dx",
"dy",
"enable-background",
"fill",
"fill-opacity",
"fill-rule",
"filter",
"flood-color",
"