spec

package
v0.21.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 30, 2025 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Attribute

type Attribute struct {
	Field string // Go field name (CamelCase)
	Attr  string // HTML attribute name (kebab-case)
	Type  string // "string" or "bool"
}

Attribute represents an SVG element attribute

type Loader

type Loader struct {
	// contains filtered or unexported fields
}

func NewLoader

func NewLoader() *Loader

func (*Loader) CollectAllAttributes

func (l *Loader) CollectAllAttributes(specs []TagSpec) map[string]Attribute

func (*Loader) LoadAllTagSpecs

func (l *Loader) LoadAllTagSpecs() ([]TagSpec, error)

func (*Loader) LoadGlobalAttributes

func (l *Loader) LoadGlobalAttributes() ([]Attribute, error)

type SvgElementAttributes

type SvgElementAttributes map[string][]string

SvgElementAttributes represents the structure from wooorm/svg-element-attributes

type TagSpec

type TagSpec struct {
	Name       string      // SVG element name
	Void       bool        // Whether the element is self-closing
	Attributes []Attribute // Element-specific attributes
}

TagSpec represents the specification for a single SVG tag

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL