/** * @license * Copyright 2020 Google LLC * SPDX-License-Identifier: Apache-2.0 */ /** * Defines the Svg class. Its constants enumerate * all SVG tag names used by Blockly. * * @class */ // Former goog.module ID: Blockly.utils.Svg /** * A name with the type of the SVG element stored in the generic. */ export class Svg<_T> { /** @internal */ static ANIMATE = new Svg('animate'); /** @internal */ static CIRCLE = new Svg('circle'); /** @internal */ static CLIPPATH = new Svg('clipPath'); /** @internal */ static DEFS = new Svg('defs'); /** @internal */ static FECOMPOSITE = new Svg('feComposite'); /** @internal */ static FECOMPONENTTRANSFER = new Svg( 'feComponentTransfer', ); /** @internal */ static FEFLOOD = new Svg('feFlood'); /** @internal */ static FEFUNCA = new Svg('feFuncA'); /** @internal */ static FEGAUSSIANBLUR = new Svg('feGaussianBlur'); /** @internal */ static FEPOINTLIGHT = new Svg('fePointLight'); /** @internal */ static FESPECULARLIGHTING = new Svg( 'feSpecularLighting', ); /** @internal */ static FILTER = new Svg('filter'); /** @internal */ static FOREIGNOBJECT = new Svg('foreignObject'); /** @internal */ static G = new Svg('g'); /** @internal */ static IMAGE = new Svg('image'); /** @internal */ static LINE = new Svg('line'); /** @internal */ static PATH = new Svg('path'); /** @internal */ static PATTERN = new Svg('pattern'); /** @internal */ static POLYGON = new Svg('polygon'); /** @internal */ static RECT = new Svg('rect'); /** @internal */ static SVG = new Svg('svg'); /** @internal */ static TEXT = new Svg('text'); /** @internal */ static TSPAN = new Svg('tspan'); /** * @param tagName The SVG element tag name. * @internal */ constructor(private readonly tagName: string) {} /** * Returns the SVG element tag name. * * @returns The name. */ toString(): string { return this.tagName; } }