| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567 |
- import {caseSensitiveTransform} from './util/case-sensitive-transform.js'
- import {create} from './util/create.js'
- import {
- boolean,
- commaOrSpaceSeparated,
- commaSeparated,
- number,
- spaceSeparated
- } from './util/types.js'
- export const svg = create({
- attributes: {
- accentHeight: 'accent-height',
- alignmentBaseline: 'alignment-baseline',
- arabicForm: 'arabic-form',
- baselineShift: 'baseline-shift',
- capHeight: 'cap-height',
- className: 'class',
- clipPath: 'clip-path',
- clipRule: 'clip-rule',
- colorInterpolation: 'color-interpolation',
- colorInterpolationFilters: 'color-interpolation-filters',
- colorProfile: 'color-profile',
- colorRendering: 'color-rendering',
- crossOrigin: 'crossorigin',
- dataType: 'datatype',
- dominantBaseline: 'dominant-baseline',
- enableBackground: 'enable-background',
- fillOpacity: 'fill-opacity',
- fillRule: 'fill-rule',
- floodColor: 'flood-color',
- floodOpacity: 'flood-opacity',
- fontFamily: 'font-family',
- fontSize: 'font-size',
- fontSizeAdjust: 'font-size-adjust',
- fontStretch: 'font-stretch',
- fontStyle: 'font-style',
- fontVariant: 'font-variant',
- fontWeight: 'font-weight',
- glyphName: 'glyph-name',
- glyphOrientationHorizontal: 'glyph-orientation-horizontal',
- glyphOrientationVertical: 'glyph-orientation-vertical',
- hrefLang: 'hreflang',
- horizAdvX: 'horiz-adv-x',
- horizOriginX: 'horiz-origin-x',
- horizOriginY: 'horiz-origin-y',
- imageRendering: 'image-rendering',
- letterSpacing: 'letter-spacing',
- lightingColor: 'lighting-color',
- markerEnd: 'marker-end',
- markerMid: 'marker-mid',
- markerStart: 'marker-start',
- navDown: 'nav-down',
- navDownLeft: 'nav-down-left',
- navDownRight: 'nav-down-right',
- navLeft: 'nav-left',
- navNext: 'nav-next',
- navPrev: 'nav-prev',
- navRight: 'nav-right',
- navUp: 'nav-up',
- navUpLeft: 'nav-up-left',
- navUpRight: 'nav-up-right',
- onAbort: 'onabort',
- onActivate: 'onactivate',
- onAfterPrint: 'onafterprint',
- onBeforePrint: 'onbeforeprint',
- onBegin: 'onbegin',
- onCancel: 'oncancel',
- onCanPlay: 'oncanplay',
- onCanPlayThrough: 'oncanplaythrough',
- onChange: 'onchange',
- onClick: 'onclick',
- onClose: 'onclose',
- onCopy: 'oncopy',
- onCueChange: 'oncuechange',
- onCut: 'oncut',
- onDblClick: 'ondblclick',
- onDrag: 'ondrag',
- onDragEnd: 'ondragend',
- onDragEnter: 'ondragenter',
- onDragExit: 'ondragexit',
- onDragLeave: 'ondragleave',
- onDragOver: 'ondragover',
- onDragStart: 'ondragstart',
- onDrop: 'ondrop',
- onDurationChange: 'ondurationchange',
- onEmptied: 'onemptied',
- onEnd: 'onend',
- onEnded: 'onended',
- onError: 'onerror',
- onFocus: 'onfocus',
- onFocusIn: 'onfocusin',
- onFocusOut: 'onfocusout',
- onHashChange: 'onhashchange',
- onInput: 'oninput',
- onInvalid: 'oninvalid',
- onKeyDown: 'onkeydown',
- onKeyPress: 'onkeypress',
- onKeyUp: 'onkeyup',
- onLoad: 'onload',
- onLoadedData: 'onloadeddata',
- onLoadedMetadata: 'onloadedmetadata',
- onLoadStart: 'onloadstart',
- onMessage: 'onmessage',
- onMouseDown: 'onmousedown',
- onMouseEnter: 'onmouseenter',
- onMouseLeave: 'onmouseleave',
- onMouseMove: 'onmousemove',
- onMouseOut: 'onmouseout',
- onMouseOver: 'onmouseover',
- onMouseUp: 'onmouseup',
- onMouseWheel: 'onmousewheel',
- onOffline: 'onoffline',
- onOnline: 'ononline',
- onPageHide: 'onpagehide',
- onPageShow: 'onpageshow',
- onPaste: 'onpaste',
- onPause: 'onpause',
- onPlay: 'onplay',
- onPlaying: 'onplaying',
- onPopState: 'onpopstate',
- onProgress: 'onprogress',
- onRateChange: 'onratechange',
- onRepeat: 'onrepeat',
- onReset: 'onreset',
- onResize: 'onresize',
- onScroll: 'onscroll',
- onSeeked: 'onseeked',
- onSeeking: 'onseeking',
- onSelect: 'onselect',
- onShow: 'onshow',
- onStalled: 'onstalled',
- onStorage: 'onstorage',
- onSubmit: 'onsubmit',
- onSuspend: 'onsuspend',
- onTimeUpdate: 'ontimeupdate',
- onToggle: 'ontoggle',
- onUnload: 'onunload',
- onVolumeChange: 'onvolumechange',
- onWaiting: 'onwaiting',
- onZoom: 'onzoom',
- overlinePosition: 'overline-position',
- overlineThickness: 'overline-thickness',
- paintOrder: 'paint-order',
- panose1: 'panose-1',
- pointerEvents: 'pointer-events',
- referrerPolicy: 'referrerpolicy',
- renderingIntent: 'rendering-intent',
- shapeRendering: 'shape-rendering',
- stopColor: 'stop-color',
- stopOpacity: 'stop-opacity',
- strikethroughPosition: 'strikethrough-position',
- strikethroughThickness: 'strikethrough-thickness',
- strokeDashArray: 'stroke-dasharray',
- strokeDashOffset: 'stroke-dashoffset',
- strokeLineCap: 'stroke-linecap',
- strokeLineJoin: 'stroke-linejoin',
- strokeMiterLimit: 'stroke-miterlimit',
- strokeOpacity: 'stroke-opacity',
- strokeWidth: 'stroke-width',
- tabIndex: 'tabindex',
- textAnchor: 'text-anchor',
- textDecoration: 'text-decoration',
- textRendering: 'text-rendering',
- transformOrigin: 'transform-origin',
- typeOf: 'typeof',
- underlinePosition: 'underline-position',
- underlineThickness: 'underline-thickness',
- unicodeBidi: 'unicode-bidi',
- unicodeRange: 'unicode-range',
- unitsPerEm: 'units-per-em',
- vAlphabetic: 'v-alphabetic',
- vHanging: 'v-hanging',
- vIdeographic: 'v-ideographic',
- vMathematical: 'v-mathematical',
- vectorEffect: 'vector-effect',
- vertAdvY: 'vert-adv-y',
- vertOriginX: 'vert-origin-x',
- vertOriginY: 'vert-origin-y',
- wordSpacing: 'word-spacing',
- writingMode: 'writing-mode',
- xHeight: 'x-height',
- // These were camelcased in Tiny. Now lowercased in SVG 2
- playbackOrder: 'playbackorder',
- timelineBegin: 'timelinebegin'
- },
- properties: {
- about: commaOrSpaceSeparated,
- accentHeight: number,
- accumulate: null,
- additive: null,
- alignmentBaseline: null,
- alphabetic: number,
- amplitude: number,
- arabicForm: null,
- ascent: number,
- attributeName: null,
- attributeType: null,
- azimuth: number,
- bandwidth: null,
- baselineShift: null,
- baseFrequency: null,
- baseProfile: null,
- bbox: null,
- begin: null,
- bias: number,
- by: null,
- calcMode: null,
- capHeight: number,
- className: spaceSeparated,
- clip: null,
- clipPath: null,
- clipPathUnits: null,
- clipRule: null,
- color: null,
- colorInterpolation: null,
- colorInterpolationFilters: null,
- colorProfile: null,
- colorRendering: null,
- content: null,
- contentScriptType: null,
- contentStyleType: null,
- crossOrigin: null,
- cursor: null,
- cx: null,
- cy: null,
- d: null,
- dataType: null,
- defaultAction: null,
- descent: number,
- diffuseConstant: number,
- direction: null,
- display: null,
- dur: null,
- divisor: number,
- dominantBaseline: null,
- download: boolean,
- dx: null,
- dy: null,
- edgeMode: null,
- editable: null,
- elevation: number,
- enableBackground: null,
- end: null,
- event: null,
- exponent: number,
- externalResourcesRequired: null,
- fill: null,
- fillOpacity: number,
- fillRule: null,
- filter: null,
- filterRes: null,
- filterUnits: null,
- floodColor: null,
- floodOpacity: null,
- focusable: null,
- focusHighlight: null,
- fontFamily: null,
- fontSize: null,
- fontSizeAdjust: null,
- fontStretch: null,
- fontStyle: null,
- fontVariant: null,
- fontWeight: null,
- format: null,
- fr: null,
- from: null,
- fx: null,
- fy: null,
- g1: commaSeparated,
- g2: commaSeparated,
- glyphName: commaSeparated,
- glyphOrientationHorizontal: null,
- glyphOrientationVertical: null,
- glyphRef: null,
- gradientTransform: null,
- gradientUnits: null,
- handler: null,
- hanging: number,
- hatchContentUnits: null,
- hatchUnits: null,
- height: null,
- href: null,
- hrefLang: null,
- horizAdvX: number,
- horizOriginX: number,
- horizOriginY: number,
- id: null,
- ideographic: number,
- imageRendering: null,
- initialVisibility: null,
- in: null,
- in2: null,
- intercept: number,
- k: number,
- k1: number,
- k2: number,
- k3: number,
- k4: number,
- kernelMatrix: commaOrSpaceSeparated,
- kernelUnitLength: null,
- keyPoints: null, // SEMI_COLON_SEPARATED
- keySplines: null, // SEMI_COLON_SEPARATED
- keyTimes: null, // SEMI_COLON_SEPARATED
- kerning: null,
- lang: null,
- lengthAdjust: null,
- letterSpacing: null,
- lightingColor: null,
- limitingConeAngle: number,
- local: null,
- markerEnd: null,
- markerMid: null,
- markerStart: null,
- markerHeight: null,
- markerUnits: null,
- markerWidth: null,
- mask: null,
- maskContentUnits: null,
- maskUnits: null,
- mathematical: null,
- max: null,
- media: null,
- mediaCharacterEncoding: null,
- mediaContentEncodings: null,
- mediaSize: number,
- mediaTime: null,
- method: null,
- min: null,
- mode: null,
- name: null,
- navDown: null,
- navDownLeft: null,
- navDownRight: null,
- navLeft: null,
- navNext: null,
- navPrev: null,
- navRight: null,
- navUp: null,
- navUpLeft: null,
- navUpRight: null,
- numOctaves: null,
- observer: null,
- offset: null,
- onAbort: null,
- onActivate: null,
- onAfterPrint: null,
- onBeforePrint: null,
- onBegin: null,
- onCancel: null,
- onCanPlay: null,
- onCanPlayThrough: null,
- onChange: null,
- onClick: null,
- onClose: null,
- onCopy: null,
- onCueChange: null,
- onCut: null,
- onDblClick: null,
- onDrag: null,
- onDragEnd: null,
- onDragEnter: null,
- onDragExit: null,
- onDragLeave: null,
- onDragOver: null,
- onDragStart: null,
- onDrop: null,
- onDurationChange: null,
- onEmptied: null,
- onEnd: null,
- onEnded: null,
- onError: null,
- onFocus: null,
- onFocusIn: null,
- onFocusOut: null,
- onHashChange: null,
- onInput: null,
- onInvalid: null,
- onKeyDown: null,
- onKeyPress: null,
- onKeyUp: null,
- onLoad: null,
- onLoadedData: null,
- onLoadedMetadata: null,
- onLoadStart: null,
- onMessage: null,
- onMouseDown: null,
- onMouseEnter: null,
- onMouseLeave: null,
- onMouseMove: null,
- onMouseOut: null,
- onMouseOver: null,
- onMouseUp: null,
- onMouseWheel: null,
- onOffline: null,
- onOnline: null,
- onPageHide: null,
- onPageShow: null,
- onPaste: null,
- onPause: null,
- onPlay: null,
- onPlaying: null,
- onPopState: null,
- onProgress: null,
- onRateChange: null,
- onRepeat: null,
- onReset: null,
- onResize: null,
- onScroll: null,
- onSeeked: null,
- onSeeking: null,
- onSelect: null,
- onShow: null,
- onStalled: null,
- onStorage: null,
- onSubmit: null,
- onSuspend: null,
- onTimeUpdate: null,
- onToggle: null,
- onUnload: null,
- onVolumeChange: null,
- onWaiting: null,
- onZoom: null,
- opacity: null,
- operator: null,
- order: null,
- orient: null,
- orientation: null,
- origin: null,
- overflow: null,
- overlay: null,
- overlinePosition: number,
- overlineThickness: number,
- paintOrder: null,
- panose1: null,
- path: null,
- pathLength: number,
- patternContentUnits: null,
- patternTransform: null,
- patternUnits: null,
- phase: null,
- ping: spaceSeparated,
- pitch: null,
- playbackOrder: null,
- pointerEvents: null,
- points: null,
- pointsAtX: number,
- pointsAtY: number,
- pointsAtZ: number,
- preserveAlpha: null,
- preserveAspectRatio: null,
- primitiveUnits: null,
- propagate: null,
- property: commaOrSpaceSeparated,
- r: null,
- radius: null,
- referrerPolicy: null,
- refX: null,
- refY: null,
- rel: commaOrSpaceSeparated,
- rev: commaOrSpaceSeparated,
- renderingIntent: null,
- repeatCount: null,
- repeatDur: null,
- requiredExtensions: commaOrSpaceSeparated,
- requiredFeatures: commaOrSpaceSeparated,
- requiredFonts: commaOrSpaceSeparated,
- requiredFormats: commaOrSpaceSeparated,
- resource: null,
- restart: null,
- result: null,
- rotate: null,
- rx: null,
- ry: null,
- scale: null,
- seed: null,
- shapeRendering: null,
- side: null,
- slope: null,
- snapshotTime: null,
- specularConstant: number,
- specularExponent: number,
- spreadMethod: null,
- spacing: null,
- startOffset: null,
- stdDeviation: null,
- stemh: null,
- stemv: null,
- stitchTiles: null,
- stopColor: null,
- stopOpacity: null,
- strikethroughPosition: number,
- strikethroughThickness: number,
- string: null,
- stroke: null,
- strokeDashArray: commaOrSpaceSeparated,
- strokeDashOffset: null,
- strokeLineCap: null,
- strokeLineJoin: null,
- strokeMiterLimit: number,
- strokeOpacity: number,
- strokeWidth: null,
- style: null,
- surfaceScale: number,
- syncBehavior: null,
- syncBehaviorDefault: null,
- syncMaster: null,
- syncTolerance: null,
- syncToleranceDefault: null,
- systemLanguage: commaOrSpaceSeparated,
- tabIndex: number,
- tableValues: null,
- target: null,
- targetX: number,
- targetY: number,
- textAnchor: null,
- textDecoration: null,
- textRendering: null,
- textLength: null,
- timelineBegin: null,
- title: null,
- transformBehavior: null,
- type: null,
- typeOf: commaOrSpaceSeparated,
- to: null,
- transform: null,
- transformOrigin: null,
- u1: null,
- u2: null,
- underlinePosition: number,
- underlineThickness: number,
- unicode: null,
- unicodeBidi: null,
- unicodeRange: null,
- unitsPerEm: number,
- values: null,
- vAlphabetic: number,
- vMathematical: number,
- vectorEffect: null,
- vHanging: number,
- vIdeographic: number,
- version: null,
- vertAdvY: number,
- vertOriginX: number,
- vertOriginY: number,
- viewBox: null,
- viewTarget: null,
- visibility: null,
- width: null,
- widths: null,
- wordSpacing: null,
- writingMode: null,
- x: null,
- x1: null,
- x2: null,
- xChannelSelector: null,
- xHeight: number,
- y: null,
- y1: null,
- y2: null,
- yChannelSelector: null,
- z: null,
- zoomAndPan: null
- },
- space: 'svg',
- transform: caseSensitiveTransform
- })
|