source: trip-planner-front/node_modules/svgo/plugins/_collections.js@ 6fe77af

Last change on this file since 6fe77af was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago

initial commit

  • Property mode set to 100644
File size: 43.4 KB
Line 
1'use strict';
2
3// https://www.w3.org/TR/SVG11/intro.html#Definitions
4
5/**
6 * @type {Record<string, Array<string>>}
7 */
8exports.elemsGroups = {
9 animation: [
10 'animate',
11 'animateColor',
12 'animateMotion',
13 'animateTransform',
14 'set',
15 ],
16 descriptive: ['desc', 'metadata', 'title'],
17 shape: ['circle', 'ellipse', 'line', 'path', 'polygon', 'polyline', 'rect'],
18 structural: ['defs', 'g', 'svg', 'symbol', 'use'],
19 paintServer: [
20 'solidColor',
21 'linearGradient',
22 'radialGradient',
23 'meshGradient',
24 'pattern',
25 'hatch',
26 ],
27 nonRendering: [
28 'linearGradient',
29 'radialGradient',
30 'pattern',
31 'clipPath',
32 'mask',
33 'marker',
34 'symbol',
35 'filter',
36 'solidColor',
37 ],
38 container: [
39 'a',
40 'defs',
41 'g',
42 'marker',
43 'mask',
44 'missing-glyph',
45 'pattern',
46 'svg',
47 'switch',
48 'symbol',
49 'foreignObject',
50 ],
51 textContent: [
52 'altGlyph',
53 'altGlyphDef',
54 'altGlyphItem',
55 'glyph',
56 'glyphRef',
57 'textPath',
58 'text',
59 'tref',
60 'tspan',
61 ],
62 textContentChild: ['altGlyph', 'textPath', 'tref', 'tspan'],
63 lightSource: [
64 'feDiffuseLighting',
65 'feSpecularLighting',
66 'feDistantLight',
67 'fePointLight',
68 'feSpotLight',
69 ],
70 filterPrimitive: [
71 'feBlend',
72 'feColorMatrix',
73 'feComponentTransfer',
74 'feComposite',
75 'feConvolveMatrix',
76 'feDiffuseLighting',
77 'feDisplacementMap',
78 'feDropShadow',
79 'feFlood',
80 'feFuncA',
81 'feFuncB',
82 'feFuncG',
83 'feFuncR',
84 'feGaussianBlur',
85 'feImage',
86 'feMerge',
87 'feMergeNode',
88 'feMorphology',
89 'feOffset',
90 'feSpecularLighting',
91 'feTile',
92 'feTurbulence',
93 ],
94};
95
96exports.textElems = exports.elemsGroups.textContent.concat('title');
97
98exports.pathElems = ['path', 'glyph', 'missing-glyph'];
99
100// https://www.w3.org/TR/SVG11/intro.html#Definitions
101/**
102 * @type {Record<string, Array<string>>}
103 */
104exports.attrsGroups = {
105 animationAddition: ['additive', 'accumulate'],
106 animationAttributeTarget: ['attributeType', 'attributeName'],
107 animationEvent: ['onbegin', 'onend', 'onrepeat', 'onload'],
108 animationTiming: [
109 'begin',
110 'dur',
111 'end',
112 'min',
113 'max',
114 'restart',
115 'repeatCount',
116 'repeatDur',
117 'fill',
118 ],
119 animationValue: [
120 'calcMode',
121 'values',
122 'keyTimes',
123 'keySplines',
124 'from',
125 'to',
126 'by',
127 ],
128 conditionalProcessing: [
129 'requiredFeatures',
130 'requiredExtensions',
131 'systemLanguage',
132 ],
133 core: ['id', 'tabindex', 'xml:base', 'xml:lang', 'xml:space'],
134 graphicalEvent: [
135 'onfocusin',
136 'onfocusout',
137 'onactivate',
138 'onclick',
139 'onmousedown',
140 'onmouseup',
141 'onmouseover',
142 'onmousemove',
143 'onmouseout',
144 'onload',
145 ],
146 presentation: [
147 'alignment-baseline',
148 'baseline-shift',
149 'clip',
150 'clip-path',
151 'clip-rule',
152 'color',
153 'color-interpolation',
154 'color-interpolation-filters',
155 'color-profile',
156 'color-rendering',
157 'cursor',
158 'direction',
159 'display',
160 'dominant-baseline',
161 'enable-background',
162 'fill',
163 'fill-opacity',
164 'fill-rule',
165 'filter',
166 'flood-color',
167 'flood-opacity',
168 'font-family',
169 'font-size',
170 'font-size-adjust',
171 'font-stretch',
172 'font-style',
173 'font-variant',
174 'font-weight',
175 'glyph-orientation-horizontal',
176 'glyph-orientation-vertical',
177 'image-rendering',
178 'letter-spacing',
179 'lighting-color',
180 'marker-end',
181 'marker-mid',
182 'marker-start',
183 'mask',
184 'opacity',
185 'overflow',
186 'paint-order',
187 'pointer-events',
188 'shape-rendering',
189 'stop-color',
190 'stop-opacity',
191 'stroke',
192 'stroke-dasharray',
193 'stroke-dashoffset',
194 'stroke-linecap',
195 'stroke-linejoin',
196 'stroke-miterlimit',
197 'stroke-opacity',
198 'stroke-width',
199 'text-anchor',
200 'text-decoration',
201 'text-overflow',
202 'text-rendering',
203 'transform',
204 'transform-origin',
205 'unicode-bidi',
206 'vector-effect',
207 'visibility',
208 'word-spacing',
209 'writing-mode',
210 ],
211 xlink: [
212 'xlink:href',
213 'xlink:show',
214 'xlink:actuate',
215 'xlink:type',
216 'xlink:role',
217 'xlink:arcrole',
218 'xlink:title',
219 ],
220 documentEvent: [
221 'onunload',
222 'onabort',
223 'onerror',
224 'onresize',
225 'onscroll',
226 'onzoom',
227 ],
228 filterPrimitive: ['x', 'y', 'width', 'height', 'result'],
229 transferFunction: [
230 'type',
231 'tableValues',
232 'slope',
233 'intercept',
234 'amplitude',
235 'exponent',
236 'offset',
237 ],
238};
239
240/**
241 * @type {Record<string, Record<string, string>>}
242 */
243exports.attrsGroupsDefaults = {
244 core: { 'xml:space': 'default' },
245 presentation: {
246 clip: 'auto',
247 'clip-path': 'none',
248 'clip-rule': 'nonzero',
249 mask: 'none',
250 opacity: '1',
251 'stop-color': '#000',
252 'stop-opacity': '1',
253 'fill-opacity': '1',
254 'fill-rule': 'nonzero',
255 fill: '#000',
256 stroke: 'none',
257 'stroke-width': '1',
258 'stroke-linecap': 'butt',
259 'stroke-linejoin': 'miter',
260 'stroke-miterlimit': '4',
261 'stroke-dasharray': 'none',
262 'stroke-dashoffset': '0',
263 'stroke-opacity': '1',
264 'paint-order': 'normal',
265 'vector-effect': 'none',
266 display: 'inline',
267 visibility: 'visible',
268 'marker-start': 'none',
269 'marker-mid': 'none',
270 'marker-end': 'none',
271 'color-interpolation': 'sRGB',
272 'color-interpolation-filters': 'linearRGB',
273 'color-rendering': 'auto',
274 'shape-rendering': 'auto',
275 'text-rendering': 'auto',
276 'image-rendering': 'auto',
277 'font-style': 'normal',
278 'font-variant': 'normal',
279 'font-weight': 'normal',
280 'font-stretch': 'normal',
281 'font-size': 'medium',
282 'font-size-adjust': 'none',
283 kerning: 'auto',
284 'letter-spacing': 'normal',
285 'word-spacing': 'normal',
286 'text-decoration': 'none',
287 'text-anchor': 'start',
288 'text-overflow': 'clip',
289 'writing-mode': 'lr-tb',
290 'glyph-orientation-vertical': 'auto',
291 'glyph-orientation-horizontal': '0deg',
292 direction: 'ltr',
293 'unicode-bidi': 'normal',
294 'dominant-baseline': 'auto',
295 'alignment-baseline': 'baseline',
296 'baseline-shift': 'baseline',
297 },
298 transferFunction: {
299 slope: '1',
300 intercept: '0',
301 amplitude: '1',
302 exponent: '1',
303 offset: '0',
304 },
305};
306
307// https://www.w3.org/TR/SVG11/eltindex.html
308/**
309 * @type {Record<string, {
310 * attrsGroups: Array<string>,
311 * attrs?: Array<string>,
312 * defaults?: Record<string, string>,
313 * contentGroups?: Array<string>,
314 * content?: Array<string>,
315 * }>}
316 */
317exports.elems = {
318 a: {
319 attrsGroups: [
320 'conditionalProcessing',
321 'core',
322 'graphicalEvent',
323 'presentation',
324 'xlink',
325 ],
326 attrs: [
327 'class',
328 'style',
329 'externalResourcesRequired',
330 'transform',
331 'target',
332 ],
333 defaults: {
334 target: '_self',
335 },
336 contentGroups: [
337 'animation',
338 'descriptive',
339 'shape',
340 'structural',
341 'paintServer',
342 ],
343 content: [
344 'a',
345 'altGlyphDef',
346 'clipPath',
347 'color-profile',
348 'cursor',
349 'filter',
350 'font',
351 'font-face',
352 'foreignObject',
353 'image',
354 'marker',
355 'mask',
356 'pattern',
357 'script',
358 'style',
359 'switch',
360 'text',
361 'view',
362 // not spec compliant
363 'tspan',
364 ],
365 },
366 altGlyph: {
367 attrsGroups: [
368 'conditionalProcessing',
369 'core',
370 'graphicalEvent',
371 'presentation',
372 'xlink',
373 ],
374 attrs: [
375 'class',
376 'style',
377 'externalResourcesRequired',
378 'x',
379 'y',
380 'dx',
381 'dy',
382 'glyphRef',
383 'format',
384 'rotate',
385 ],
386 },
387 altGlyphDef: {
388 attrsGroups: ['core'],
389 content: ['glyphRef'],
390 },
391 altGlyphItem: {
392 attrsGroups: ['core'],
393 content: ['glyphRef', 'altGlyphItem'],
394 },
395 animate: {
396 attrsGroups: [
397 'conditionalProcessing',
398 'core',
399 'animationAddition',
400 'animationAttributeTarget',
401 'animationEvent',
402 'animationTiming',
403 'animationValue',
404 'presentation',
405 'xlink',
406 ],
407 attrs: ['externalResourcesRequired'],
408 contentGroups: ['descriptive'],
409 },
410 animateColor: {
411 attrsGroups: [
412 'conditionalProcessing',
413 'core',
414 'animationEvent',
415 'xlink',
416 'animationAttributeTarget',
417 'animationTiming',
418 'animationValue',
419 'animationAddition',
420 'presentation',
421 ],
422 attrs: ['externalResourcesRequired'],
423 contentGroups: ['descriptive'],
424 },
425 animateMotion: {
426 attrsGroups: [
427 'conditionalProcessing',
428 'core',
429 'animationEvent',
430 'xlink',
431 'animationTiming',
432 'animationValue',
433 'animationAddition',
434 ],
435 attrs: [
436 'externalResourcesRequired',
437 'path',
438 'keyPoints',
439 'rotate',
440 'origin',
441 ],
442 defaults: {
443 rotate: '0',
444 },
445 contentGroups: ['descriptive'],
446 content: ['mpath'],
447 },
448 animateTransform: {
449 attrsGroups: [
450 'conditionalProcessing',
451 'core',
452 'animationEvent',
453 'xlink',
454 'animationAttributeTarget',
455 'animationTiming',
456 'animationValue',
457 'animationAddition',
458 ],
459 attrs: ['externalResourcesRequired', 'type'],
460 contentGroups: ['descriptive'],
461 },
462 circle: {
463 attrsGroups: [
464 'conditionalProcessing',
465 'core',
466 'graphicalEvent',
467 'presentation',
468 ],
469 attrs: [
470 'class',
471 'style',
472 'externalResourcesRequired',
473 'transform',
474 'cx',
475 'cy',
476 'r',
477 ],
478 defaults: {
479 cx: '0',
480 cy: '0',
481 },
482 contentGroups: ['animation', 'descriptive'],
483 },
484 clipPath: {
485 attrsGroups: ['conditionalProcessing', 'core', 'presentation'],
486 attrs: [
487 'class',
488 'style',
489 'externalResourcesRequired',
490 'transform',
491 'clipPathUnits',
492 ],
493 defaults: {
494 clipPathUnits: 'userSpaceOnUse',
495 },
496 contentGroups: ['animation', 'descriptive', 'shape'],
497 content: ['text', 'use'],
498 },
499 'color-profile': {
500 attrsGroups: ['core', 'xlink'],
501 attrs: ['local', 'name', 'rendering-intent'],
502 defaults: {
503 name: 'sRGB',
504 'rendering-intent': 'auto',
505 },
506 contentGroups: ['descriptive'],
507 },
508 cursor: {
509 attrsGroups: ['core', 'conditionalProcessing', 'xlink'],
510 attrs: ['externalResourcesRequired', 'x', 'y'],
511 defaults: {
512 x: '0',
513 y: '0',
514 },
515 contentGroups: ['descriptive'],
516 },
517 defs: {
518 attrsGroups: [
519 'conditionalProcessing',
520 'core',
521 'graphicalEvent',
522 'presentation',
523 ],
524 attrs: ['class', 'style', 'externalResourcesRequired', 'transform'],
525 contentGroups: [
526 'animation',
527 'descriptive',
528 'shape',
529 'structural',
530 'paintServer',
531 ],
532 content: [
533 'a',
534 'altGlyphDef',
535 'clipPath',
536 'color-profile',
537 'cursor',
538 'filter',
539 'font',
540 'font-face',
541 'foreignObject',
542 'image',
543 'marker',
544 'mask',
545 'pattern',
546 'script',
547 'style',
548 'switch',
549 'text',
550 'view',
551 ],
552 },
553 desc: {
554 attrsGroups: ['core'],
555 attrs: ['class', 'style'],
556 },
557 ellipse: {
558 attrsGroups: [
559 'conditionalProcessing',
560 'core',
561 'graphicalEvent',
562 'presentation',
563 ],
564 attrs: [
565 'class',
566 'style',
567 'externalResourcesRequired',
568 'transform',
569 'cx',
570 'cy',
571 'rx',
572 'ry',
573 ],
574 defaults: {
575 cx: '0',
576 cy: '0',
577 },
578 contentGroups: ['animation', 'descriptive'],
579 },
580 feBlend: {
581 attrsGroups: ['core', 'presentation', 'filterPrimitive'],
582 attrs: [
583 'class',
584 'style',
585 // TODO: in - 'If no value is provided and this is the first filter primitive,
586 // then this filter primitive will use SourceGraphic as its input'
587 'in',
588 'in2',
589 'mode',
590 ],
591 defaults: {
592 mode: 'normal',
593 },
594 content: ['animate', 'set'],
595 },
596 feColorMatrix: {
597 attrsGroups: ['core', 'presentation', 'filterPrimitive'],
598 attrs: ['class', 'style', 'in', 'type', 'values'],
599 defaults: {
600 type: 'matrix',
601 },
602 content: ['animate', 'set'],
603 },
604 feComponentTransfer: {
605 attrsGroups: ['core', 'presentation', 'filterPrimitive'],
606 attrs: ['class', 'style', 'in'],
607 content: ['feFuncA', 'feFuncB', 'feFuncG', 'feFuncR'],
608 },
609 feComposite: {
610 attrsGroups: ['core', 'presentation', 'filterPrimitive'],
611 attrs: ['class', 'style', 'in', 'in2', 'operator', 'k1', 'k2', 'k3', 'k4'],
612 defaults: {
613 operator: 'over',
614 k1: '0',
615 k2: '0',
616 k3: '0',
617 k4: '0',
618 },
619 content: ['animate', 'set'],
620 },
621 feConvolveMatrix: {
622 attrsGroups: ['core', 'presentation', 'filterPrimitive'],
623 attrs: [
624 'class',
625 'style',
626 'in',
627 'order',
628 'kernelMatrix',
629 // TODO: divisor - 'The default value is the sum of all values in kernelMatrix,
630 // with the exception that if the sum is zero, then the divisor is set to 1'
631 'divisor',
632 'bias',
633 // TODO: targetX - 'By default, the convolution matrix is centered in X over each
634 // pixel of the input image (i.e., targetX = floor ( orderX / 2 ))'
635 'targetX',
636 'targetY',
637 'edgeMode',
638 // TODO: kernelUnitLength - 'The first number is the <dx> value. The second number
639 // is the <dy> value. If the <dy> value is not specified, it defaults to the same value as <dx>'
640 'kernelUnitLength',
641 'preserveAlpha',
642 ],
643 defaults: {
644 order: '3',
645 bias: '0',
646 edgeMode: 'duplicate',
647 preserveAlpha: 'false',
648 },
649 content: ['animate', 'set'],
650 },
651 feDiffuseLighting: {
652 attrsGroups: ['core', 'presentation', 'filterPrimitive'],
653 attrs: [
654 'class',
655 'style',
656 'in',
657 'surfaceScale',
658 'diffuseConstant',
659 'kernelUnitLength',
660 ],
661 defaults: {
662 surfaceScale: '1',
663 diffuseConstant: '1',
664 },
665 contentGroups: ['descriptive'],
666 content: [
667 // TODO: 'exactly one light source element, in any order'
668 'feDistantLight',
669 'fePointLight',
670 'feSpotLight',
671 ],
672 },
673 feDisplacementMap: {
674 attrsGroups: ['core', 'presentation', 'filterPrimitive'],
675 attrs: [
676 'class',
677 'style',
678 'in',
679 'in2',
680 'scale',
681 'xChannelSelector',
682 'yChannelSelector',
683 ],
684 defaults: {
685 scale: '0',
686 xChannelSelector: 'A',
687 yChannelSelector: 'A',
688 },
689 content: ['animate', 'set'],
690 },
691 feDistantLight: {
692 attrsGroups: ['core'],
693 attrs: ['azimuth', 'elevation'],
694 defaults: {
695 azimuth: '0',
696 elevation: '0',
697 },
698 content: ['animate', 'set'],
699 },
700 feFlood: {
701 attrsGroups: ['core', 'presentation', 'filterPrimitive'],
702 attrs: ['class', 'style'],
703 content: ['animate', 'animateColor', 'set'],
704 },
705 feFuncA: {
706 attrsGroups: ['core', 'transferFunction'],
707 content: ['set', 'animate'],
708 },
709 feFuncB: {
710 attrsGroups: ['core', 'transferFunction'],
711 content: ['set', 'animate'],
712 },
713 feFuncG: {
714 attrsGroups: ['core', 'transferFunction'],
715 content: ['set', 'animate'],
716 },
717 feFuncR: {
718 attrsGroups: ['core', 'transferFunction'],
719 content: ['set', 'animate'],
720 },
721 feGaussianBlur: {
722 attrsGroups: ['core', 'presentation', 'filterPrimitive'],
723 attrs: ['class', 'style', 'in', 'stdDeviation'],
724 defaults: {
725 stdDeviation: '0',
726 },
727 content: ['set', 'animate'],
728 },
729 feImage: {
730 attrsGroups: ['core', 'presentation', 'filterPrimitive', 'xlink'],
731 attrs: [
732 'class',
733 'style',
734 'externalResourcesRequired',
735 'preserveAspectRatio',
736 'href',
737 'xlink:href',
738 ],
739 defaults: {
740 preserveAspectRatio: 'xMidYMid meet',
741 },
742 content: ['animate', 'animateTransform', 'set'],
743 },
744 feMerge: {
745 attrsGroups: ['core', 'presentation', 'filterPrimitive'],
746 attrs: ['class', 'style'],
747 content: ['feMergeNode'],
748 },
749 feMergeNode: {
750 attrsGroups: ['core'],
751 attrs: ['in'],
752 content: ['animate', 'set'],
753 },
754 feMorphology: {
755 attrsGroups: ['core', 'presentation', 'filterPrimitive'],
756 attrs: ['class', 'style', 'in', 'operator', 'radius'],
757 defaults: {
758 operator: 'erode',
759 radius: '0',
760 },
761 content: ['animate', 'set'],
762 },
763 feOffset: {
764 attrsGroups: ['core', 'presentation', 'filterPrimitive'],
765 attrs: ['class', 'style', 'in', 'dx', 'dy'],
766 defaults: {
767 dx: '0',
768 dy: '0',
769 },
770 content: ['animate', 'set'],
771 },
772 fePointLight: {
773 attrsGroups: ['core'],
774 attrs: ['x', 'y', 'z'],
775 defaults: {
776 x: '0',
777 y: '0',
778 z: '0',
779 },
780 content: ['animate', 'set'],
781 },
782 feSpecularLighting: {
783 attrsGroups: ['core', 'presentation', 'filterPrimitive'],
784 attrs: [
785 'class',
786 'style',
787 'in',
788 'surfaceScale',
789 'specularConstant',
790 'specularExponent',
791 'kernelUnitLength',
792 ],
793 defaults: {
794 surfaceScale: '1',
795 specularConstant: '1',
796 specularExponent: '1',
797 },
798 contentGroups: [
799 'descriptive',
800 // TODO: exactly one 'light source element'
801 'lightSource',
802 ],
803 },
804 feSpotLight: {
805 attrsGroups: ['core'],
806 attrs: [
807 'x',
808 'y',
809 'z',
810 'pointsAtX',
811 'pointsAtY',
812 'pointsAtZ',
813 'specularExponent',
814 'limitingConeAngle',
815 ],
816 defaults: {
817 x: '0',
818 y: '0',
819 z: '0',
820 pointsAtX: '0',
821 pointsAtY: '0',
822 pointsAtZ: '0',
823 specularExponent: '1',
824 },
825 content: ['animate', 'set'],
826 },
827 feTile: {
828 attrsGroups: ['core', 'presentation', 'filterPrimitive'],
829 attrs: ['class', 'style', 'in'],
830 content: ['animate', 'set'],
831 },
832 feTurbulence: {
833 attrsGroups: ['core', 'presentation', 'filterPrimitive'],
834 attrs: [
835 'class',
836 'style',
837 'baseFrequency',
838 'numOctaves',
839 'seed',
840 'stitchTiles',
841 'type',
842 ],
843 defaults: {
844 baseFrequency: '0',
845 numOctaves: '1',
846 seed: '0',
847 stitchTiles: 'noStitch',
848 type: 'turbulence',
849 },
850 content: ['animate', 'set'],
851 },
852 filter: {
853 attrsGroups: ['core', 'presentation', 'xlink'],
854 attrs: [
855 'class',
856 'style',
857 'externalResourcesRequired',
858 'x',
859 'y',
860 'width',
861 'height',
862 'filterRes',
863 'filterUnits',
864 'primitiveUnits',
865 'href',
866 'xlink:href',
867 ],
868 defaults: {
869 primitiveUnits: 'userSpaceOnUse',
870 x: '-10%',
871 y: '-10%',
872 width: '120%',
873 height: '120%',
874 },
875 contentGroups: ['descriptive', 'filterPrimitive'],
876 content: ['animate', 'set'],
877 },
878 font: {
879 attrsGroups: ['core', 'presentation'],
880 attrs: [
881 'class',
882 'style',
883 'externalResourcesRequired',
884 'horiz-origin-x',
885 'horiz-origin-y',
886 'horiz-adv-x',
887 'vert-origin-x',
888 'vert-origin-y',
889 'vert-adv-y',
890 ],
891 defaults: {
892 'horiz-origin-x': '0',
893 'horiz-origin-y': '0',
894 },
895 contentGroups: ['descriptive'],
896 content: ['font-face', 'glyph', 'hkern', 'missing-glyph', 'vkern'],
897 },
898 'font-face': {
899 attrsGroups: ['core'],
900 attrs: [
901 'font-family',
902 'font-style',
903 'font-variant',
904 'font-weight',
905 'font-stretch',
906 'font-size',
907 'unicode-range',
908 'units-per-em',
909 'panose-1',
910 'stemv',
911 'stemh',
912 'slope',
913 'cap-height',
914 'x-height',
915 'accent-height',
916 'ascent',
917 'descent',
918 'widths',
919 'bbox',
920 'ideographic',
921 'alphabetic',
922 'mathematical',
923 'hanging',
924 'v-ideographic',
925 'v-alphabetic',
926 'v-mathematical',
927 'v-hanging',
928 'underline-position',
929 'underline-thickness',
930 'strikethrough-position',
931 'strikethrough-thickness',
932 'overline-position',
933 'overline-thickness',
934 ],
935 defaults: {
936 'font-style': 'all',
937 'font-variant': 'normal',
938 'font-weight': 'all',
939 'font-stretch': 'normal',
940 'unicode-range': 'U+0-10FFFF',
941 'units-per-em': '1000',
942 'panose-1': '0 0 0 0 0 0 0 0 0 0',
943 slope: '0',
944 },
945 contentGroups: ['descriptive'],
946 content: [
947 // TODO: "at most one 'font-face-src' element"
948 'font-face-src',
949 ],
950 },
951 // TODO: empty content
952 'font-face-format': {
953 attrsGroups: ['core'],
954 attrs: ['string'],
955 },
956 'font-face-name': {
957 attrsGroups: ['core'],
958 attrs: ['name'],
959 },
960 'font-face-src': {
961 attrsGroups: ['core'],
962 content: ['font-face-name', 'font-face-uri'],
963 },
964 'font-face-uri': {
965 attrsGroups: ['core', 'xlink'],
966 attrs: ['href', 'xlink:href'],
967 content: ['font-face-format'],
968 },
969 foreignObject: {
970 attrsGroups: [
971 'core',
972 'conditionalProcessing',
973 'graphicalEvent',
974 'presentation',
975 ],
976 attrs: [
977 'class',
978 'style',
979 'externalResourcesRequired',
980 'transform',
981 'x',
982 'y',
983 'width',
984 'height',
985 ],
986 defaults: {
987 x: '0',
988 y: '0',
989 },
990 },
991 g: {
992 attrsGroups: [
993 'conditionalProcessing',
994 'core',
995 'graphicalEvent',
996 'presentation',
997 ],
998 attrs: ['class', 'style', 'externalResourcesRequired', 'transform'],
999 contentGroups: [
1000 'animation',
1001 'descriptive',
1002 'shape',
1003 'structural',
1004 'paintServer',
1005 ],
1006 content: [
1007 'a',
1008 'altGlyphDef',
1009 'clipPath',
1010 'color-profile',
1011 'cursor',
1012 'filter',
1013 'font',
1014 'font-face',
1015 'foreignObject',
1016 'image',
1017 'marker',
1018 'mask',
1019 'pattern',
1020 'script',
1021 'style',
1022 'switch',
1023 'text',
1024 'view',
1025 ],
1026 },
1027 glyph: {
1028 attrsGroups: ['core', 'presentation'],
1029 attrs: [
1030 'class',
1031 'style',
1032 'd',
1033 'horiz-adv-x',
1034 'vert-origin-x',
1035 'vert-origin-y',
1036 'vert-adv-y',
1037 'unicode',
1038 'glyph-name',
1039 'orientation',
1040 'arabic-form',
1041 'lang',
1042 ],
1043 defaults: {
1044 'arabic-form': 'initial',
1045 },
1046 contentGroups: [
1047 'animation',
1048 'descriptive',
1049 'shape',
1050 'structural',
1051 'paintServer',
1052 ],
1053 content: [
1054 'a',
1055 'altGlyphDef',
1056 'clipPath',
1057 'color-profile',
1058 'cursor',
1059 'filter',
1060 'font',
1061 'font-face',
1062 'foreignObject',
1063 'image',
1064 'marker',
1065 'mask',
1066 'pattern',
1067 'script',
1068 'style',
1069 'switch',
1070 'text',
1071 'view',
1072 ],
1073 },
1074 glyphRef: {
1075 attrsGroups: ['core', 'presentation'],
1076 attrs: [
1077 'class',
1078 'style',
1079 'd',
1080 'horiz-adv-x',
1081 'vert-origin-x',
1082 'vert-origin-y',
1083 'vert-adv-y',
1084 ],
1085 contentGroups: [
1086 'animation',
1087 'descriptive',
1088 'shape',
1089 'structural',
1090 'paintServer',
1091 ],
1092 content: [
1093 'a',
1094 'altGlyphDef',
1095 'clipPath',
1096 'color-profile',
1097 'cursor',
1098 'filter',
1099 'font',
1100 'font-face',
1101 'foreignObject',
1102 'image',
1103 'marker',
1104 'mask',
1105 'pattern',
1106 'script',
1107 'style',
1108 'switch',
1109 'text',
1110 'view',
1111 ],
1112 },
1113 hatch: {
1114 attrsGroups: ['core', 'presentation', 'xlink'],
1115 attrs: [
1116 'class',
1117 'style',
1118 'x',
1119 'y',
1120 'pitch',
1121 'rotate',
1122 'hatchUnits',
1123 'hatchContentUnits',
1124 'transform',
1125 ],
1126 defaults: {
1127 hatchUnits: 'objectBoundingBox',
1128 hatchContentUnits: 'userSpaceOnUse',
1129 x: '0',
1130 y: '0',
1131 pitch: '0',
1132 rotate: '0',
1133 },
1134 contentGroups: ['animation', 'descriptive'],
1135 content: ['hatchPath'],
1136 },
1137 hatchPath: {
1138 attrsGroups: ['core', 'presentation', 'xlink'],
1139 attrs: ['class', 'style', 'd', 'offset'],
1140 defaults: {
1141 offset: '0',
1142 },
1143 contentGroups: ['animation', 'descriptive'],
1144 },
1145 hkern: {
1146 attrsGroups: ['core'],
1147 attrs: ['u1', 'g1', 'u2', 'g2', 'k'],
1148 },
1149 image: {
1150 attrsGroups: [
1151 'core',
1152 'conditionalProcessing',
1153 'graphicalEvent',
1154 'xlink',
1155 'presentation',
1156 ],
1157 attrs: [
1158 'class',
1159 'style',
1160 'externalResourcesRequired',
1161 'preserveAspectRatio',
1162 'transform',
1163 'x',
1164 'y',
1165 'width',
1166 'height',
1167 'href',
1168 'xlink:href',
1169 ],
1170 defaults: {
1171 x: '0',
1172 y: '0',
1173 preserveAspectRatio: 'xMidYMid meet',
1174 },
1175 contentGroups: ['animation', 'descriptive'],
1176 },
1177 line: {
1178 attrsGroups: [
1179 'conditionalProcessing',
1180 'core',
1181 'graphicalEvent',
1182 'presentation',
1183 ],
1184 attrs: [
1185 'class',
1186 'style',
1187 'externalResourcesRequired',
1188 'transform',
1189 'x1',
1190 'y1',
1191 'x2',
1192 'y2',
1193 ],
1194 defaults: {
1195 x1: '0',
1196 y1: '0',
1197 x2: '0',
1198 y2: '0',
1199 },
1200 contentGroups: ['animation', 'descriptive'],
1201 },
1202 linearGradient: {
1203 attrsGroups: ['core', 'presentation', 'xlink'],
1204 attrs: [
1205 'class',
1206 'style',
1207 'externalResourcesRequired',
1208 'x1',
1209 'y1',
1210 'x2',
1211 'y2',
1212 'gradientUnits',
1213 'gradientTransform',
1214 'spreadMethod',
1215 'href',
1216 'xlink:href',
1217 ],
1218 defaults: {
1219 x1: '0',
1220 y1: '0',
1221 x2: '100%',
1222 y2: '0',
1223 spreadMethod: 'pad',
1224 },
1225 contentGroups: ['descriptive'],
1226 content: ['animate', 'animateTransform', 'set', 'stop'],
1227 },
1228 marker: {
1229 attrsGroups: ['core', 'presentation'],
1230 attrs: [
1231 'class',
1232 'style',
1233 'externalResourcesRequired',
1234 'viewBox',
1235 'preserveAspectRatio',
1236 'refX',
1237 'refY',
1238 'markerUnits',
1239 'markerWidth',
1240 'markerHeight',
1241 'orient',
1242 ],
1243 defaults: {
1244 markerUnits: 'strokeWidth',
1245 refX: '0',
1246 refY: '0',
1247 markerWidth: '3',
1248 markerHeight: '3',
1249 },
1250 contentGroups: [
1251 'animation',
1252 'descriptive',
1253 'shape',
1254 'structural',
1255 'paintServer',
1256 ],
1257 content: [
1258 'a',
1259 'altGlyphDef',
1260 'clipPath',
1261 'color-profile',
1262 'cursor',
1263 'filter',
1264 'font',
1265 'font-face',
1266 'foreignObject',
1267 'image',
1268 'marker',
1269 'mask',
1270 'pattern',
1271 'script',
1272 'style',
1273 'switch',
1274 'text',
1275 'view',
1276 ],
1277 },
1278 mask: {
1279 attrsGroups: ['conditionalProcessing', 'core', 'presentation'],
1280 attrs: [
1281 'class',
1282 'style',
1283 'externalResourcesRequired',
1284 'x',
1285 'y',
1286 'width',
1287 'height',
1288 'mask-type',
1289 'maskUnits',
1290 'maskContentUnits',
1291 ],
1292 defaults: {
1293 maskUnits: 'objectBoundingBox',
1294 maskContentUnits: 'userSpaceOnUse',
1295 x: '-10%',
1296 y: '-10%',
1297 width: '120%',
1298 height: '120%',
1299 },
1300 contentGroups: [
1301 'animation',
1302 'descriptive',
1303 'shape',
1304 'structural',
1305 'paintServer',
1306 ],
1307 content: [
1308 'a',
1309 'altGlyphDef',
1310 'clipPath',
1311 'color-profile',
1312 'cursor',
1313 'filter',
1314 'font',
1315 'font-face',
1316 'foreignObject',
1317 'image',
1318 'marker',
1319 'mask',
1320 'pattern',
1321 'script',
1322 'style',
1323 'switch',
1324 'text',
1325 'view',
1326 ],
1327 },
1328 metadata: {
1329 attrsGroups: ['core'],
1330 },
1331 'missing-glyph': {
1332 attrsGroups: ['core', 'presentation'],
1333 attrs: [
1334 'class',
1335 'style',
1336 'd',
1337 'horiz-adv-x',
1338 'vert-origin-x',
1339 'vert-origin-y',
1340 'vert-adv-y',
1341 ],
1342 contentGroups: [
1343 'animation',
1344 'descriptive',
1345 'shape',
1346 'structural',
1347 'paintServer',
1348 ],
1349 content: [
1350 'a',
1351 'altGlyphDef',
1352 'clipPath',
1353 'color-profile',
1354 'cursor',
1355 'filter',
1356 'font',
1357 'font-face',
1358 'foreignObject',
1359 'image',
1360 'marker',
1361 'mask',
1362 'pattern',
1363 'script',
1364 'style',
1365 'switch',
1366 'text',
1367 'view',
1368 ],
1369 },
1370 mpath: {
1371 attrsGroups: ['core', 'xlink'],
1372 attrs: ['externalResourcesRequired', 'href', 'xlink:href'],
1373 contentGroups: ['descriptive'],
1374 },
1375 path: {
1376 attrsGroups: [
1377 'conditionalProcessing',
1378 'core',
1379 'graphicalEvent',
1380 'presentation',
1381 ],
1382 attrs: [
1383 'class',
1384 'style',
1385 'externalResourcesRequired',
1386 'transform',
1387 'd',
1388 'pathLength',
1389 ],
1390 contentGroups: ['animation', 'descriptive'],
1391 },
1392 pattern: {
1393 attrsGroups: ['conditionalProcessing', 'core', 'presentation', 'xlink'],
1394 attrs: [
1395 'class',
1396 'style',
1397 'externalResourcesRequired',
1398 'viewBox',
1399 'preserveAspectRatio',
1400 'x',
1401 'y',
1402 'width',
1403 'height',
1404 'patternUnits',
1405 'patternContentUnits',
1406 'patternTransform',
1407 'href',
1408 'xlink:href',
1409 ],
1410 defaults: {
1411 patternUnits: 'objectBoundingBox',
1412 patternContentUnits: 'userSpaceOnUse',
1413 x: '0',
1414 y: '0',
1415 width: '0',
1416 height: '0',
1417 preserveAspectRatio: 'xMidYMid meet',
1418 },
1419 contentGroups: [
1420 'animation',
1421 'descriptive',
1422 'paintServer',
1423 'shape',
1424 'structural',
1425 ],
1426 content: [
1427 'a',
1428 'altGlyphDef',
1429 'clipPath',
1430 'color-profile',
1431 'cursor',
1432 'filter',
1433 'font',
1434 'font-face',
1435 'foreignObject',
1436 'image',
1437 'marker',
1438 'mask',
1439 'pattern',
1440 'script',
1441 'style',
1442 'switch',
1443 'text',
1444 'view',
1445 ],
1446 },
1447 polygon: {
1448 attrsGroups: [
1449 'conditionalProcessing',
1450 'core',
1451 'graphicalEvent',
1452 'presentation',
1453 ],
1454 attrs: [
1455 'class',
1456 'style',
1457 'externalResourcesRequired',
1458 'transform',
1459 'points',
1460 ],
1461 contentGroups: ['animation', 'descriptive'],
1462 },
1463 polyline: {
1464 attrsGroups: [
1465 'conditionalProcessing',
1466 'core',
1467 'graphicalEvent',
1468 'presentation',
1469 ],
1470 attrs: [
1471 'class',
1472 'style',
1473 'externalResourcesRequired',
1474 'transform',
1475 'points',
1476 ],
1477 contentGroups: ['animation', 'descriptive'],
1478 },
1479 radialGradient: {
1480 attrsGroups: ['core', 'presentation', 'xlink'],
1481 attrs: [
1482 'class',
1483 'style',
1484 'externalResourcesRequired',
1485 'cx',
1486 'cy',
1487 'r',
1488 'fx',
1489 'fy',
1490 'fr',
1491 'gradientUnits',
1492 'gradientTransform',
1493 'spreadMethod',
1494 'href',
1495 'xlink:href',
1496 ],
1497 defaults: {
1498 gradientUnits: 'objectBoundingBox',
1499 cx: '50%',
1500 cy: '50%',
1501 r: '50%',
1502 },
1503 contentGroups: ['descriptive'],
1504 content: ['animate', 'animateTransform', 'set', 'stop'],
1505 },
1506 meshGradient: {
1507 attrsGroups: ['core', 'presentation', 'xlink'],
1508 attrs: ['class', 'style', 'x', 'y', 'gradientUnits', 'transform'],
1509 contentGroups: ['descriptive', 'paintServer', 'animation'],
1510 content: ['meshRow'],
1511 },
1512 meshRow: {
1513 attrsGroups: ['core', 'presentation'],
1514 attrs: ['class', 'style'],
1515 contentGroups: ['descriptive'],
1516 content: ['meshPatch'],
1517 },
1518 meshPatch: {
1519 attrsGroups: ['core', 'presentation'],
1520 attrs: ['class', 'style'],
1521 contentGroups: ['descriptive'],
1522 content: ['stop'],
1523 },
1524 rect: {
1525 attrsGroups: [
1526 'conditionalProcessing',
1527 'core',
1528 'graphicalEvent',
1529 'presentation',
1530 ],
1531 attrs: [
1532 'class',
1533 'style',
1534 'externalResourcesRequired',
1535 'transform',
1536 'x',
1537 'y',
1538 'width',
1539 'height',
1540 'rx',
1541 'ry',
1542 ],
1543 defaults: {
1544 x: '0',
1545 y: '0',
1546 },
1547 contentGroups: ['animation', 'descriptive'],
1548 },
1549 script: {
1550 attrsGroups: ['core', 'xlink'],
1551 attrs: ['externalResourcesRequired', 'type', 'href', 'xlink:href'],
1552 },
1553 set: {
1554 attrsGroups: [
1555 'conditionalProcessing',
1556 'core',
1557 'animation',
1558 'xlink',
1559 'animationAttributeTarget',
1560 'animationTiming',
1561 ],
1562 attrs: ['externalResourcesRequired', 'to'],
1563 contentGroups: ['descriptive'],
1564 },
1565 solidColor: {
1566 attrsGroups: ['core', 'presentation'],
1567 attrs: ['class', 'style'],
1568 contentGroups: ['paintServer'],
1569 },
1570 stop: {
1571 attrsGroups: ['core', 'presentation'],
1572 attrs: ['class', 'style', 'offset', 'path'],
1573 content: ['animate', 'animateColor', 'set'],
1574 },
1575 style: {
1576 attrsGroups: ['core'],
1577 attrs: ['type', 'media', 'title'],
1578 defaults: {
1579 type: 'text/css',
1580 },
1581 },
1582 svg: {
1583 attrsGroups: [
1584 'conditionalProcessing',
1585 'core',
1586 'documentEvent',
1587 'graphicalEvent',
1588 'presentation',
1589 ],
1590 attrs: [
1591 'class',
1592 'style',
1593 'x',
1594 'y',
1595 'width',
1596 'height',
1597 'viewBox',
1598 'preserveAspectRatio',
1599 'zoomAndPan',
1600 'version',
1601 'baseProfile',
1602 'contentScriptType',
1603 'contentStyleType',
1604 ],
1605 defaults: {
1606 x: '0',
1607 y: '0',
1608 width: '100%',
1609 height: '100%',
1610 preserveAspectRatio: 'xMidYMid meet',
1611 zoomAndPan: 'magnify',
1612 version: '1.1',
1613 baseProfile: 'none',
1614 contentScriptType: 'application/ecmascript',
1615 contentStyleType: 'text/css',
1616 },
1617 contentGroups: [
1618 'animation',
1619 'descriptive',
1620 'shape',
1621 'structural',
1622 'paintServer',
1623 ],
1624 content: [
1625 'a',
1626 'altGlyphDef',
1627 'clipPath',
1628 'color-profile',
1629 'cursor',
1630 'filter',
1631 'font',
1632 'font-face',
1633 'foreignObject',
1634 'image',
1635 'marker',
1636 'mask',
1637 'pattern',
1638 'script',
1639 'style',
1640 'switch',
1641 'text',
1642 'view',
1643 ],
1644 },
1645 switch: {
1646 attrsGroups: [
1647 'conditionalProcessing',
1648 'core',
1649 'graphicalEvent',
1650 'presentation',
1651 ],
1652 attrs: ['class', 'style', 'externalResourcesRequired', 'transform'],
1653 contentGroups: ['animation', 'descriptive', 'shape'],
1654 content: [
1655 'a',
1656 'foreignObject',
1657 'g',
1658 'image',
1659 'svg',
1660 'switch',
1661 'text',
1662 'use',
1663 ],
1664 },
1665 symbol: {
1666 attrsGroups: ['core', 'graphicalEvent', 'presentation'],
1667 attrs: [
1668 'class',
1669 'style',
1670 'externalResourcesRequired',
1671 'preserveAspectRatio',
1672 'viewBox',
1673 'refX',
1674 'refY',
1675 ],
1676 defaults: {
1677 refX: '0',
1678 refY: '0',
1679 },
1680 contentGroups: [
1681 'animation',
1682 'descriptive',
1683 'shape',
1684 'structural',
1685 'paintServer',
1686 ],
1687 content: [
1688 'a',
1689 'altGlyphDef',
1690 'clipPath',
1691 'color-profile',
1692 'cursor',
1693 'filter',
1694 'font',
1695 'font-face',
1696 'foreignObject',
1697 'image',
1698 'marker',
1699 'mask',
1700 'pattern',
1701 'script',
1702 'style',
1703 'switch',
1704 'text',
1705 'view',
1706 ],
1707 },
1708 text: {
1709 attrsGroups: [
1710 'conditionalProcessing',
1711 'core',
1712 'graphicalEvent',
1713 'presentation',
1714 ],
1715 attrs: [
1716 'class',
1717 'style',
1718 'externalResourcesRequired',
1719 'transform',
1720 'lengthAdjust',
1721 'x',
1722 'y',
1723 'dx',
1724 'dy',
1725 'rotate',
1726 'textLength',
1727 ],
1728 defaults: {
1729 x: '0',
1730 y: '0',
1731 lengthAdjust: 'spacing',
1732 },
1733 contentGroups: ['animation', 'descriptive', 'textContentChild'],
1734 content: ['a'],
1735 },
1736 textPath: {
1737 attrsGroups: [
1738 'conditionalProcessing',
1739 'core',
1740 'graphicalEvent',
1741 'presentation',
1742 'xlink',
1743 ],
1744 attrs: [
1745 'class',
1746 'style',
1747 'externalResourcesRequired',
1748 'href',
1749 'xlink:href',
1750 'startOffset',
1751 'method',
1752 'spacing',
1753 'd',
1754 ],
1755 defaults: {
1756 startOffset: '0',
1757 method: 'align',
1758 spacing: 'exact',
1759 },
1760 contentGroups: ['descriptive'],
1761 content: [
1762 'a',
1763 'altGlyph',
1764 'animate',
1765 'animateColor',
1766 'set',
1767 'tref',
1768 'tspan',
1769 ],
1770 },
1771 title: {
1772 attrsGroups: ['core'],
1773 attrs: ['class', 'style'],
1774 },
1775 tref: {
1776 attrsGroups: [
1777 'conditionalProcessing',
1778 'core',
1779 'graphicalEvent',
1780 'presentation',
1781 'xlink',
1782 ],
1783 attrs: [
1784 'class',
1785 'style',
1786 'externalResourcesRequired',
1787 'href',
1788 'xlink:href',
1789 ],
1790 contentGroups: ['descriptive'],
1791 content: ['animate', 'animateColor', 'set'],
1792 },
1793 tspan: {
1794 attrsGroups: [
1795 'conditionalProcessing',
1796 'core',
1797 'graphicalEvent',
1798 'presentation',
1799 ],
1800 attrs: [
1801 'class',
1802 'style',
1803 'externalResourcesRequired',
1804 'x',
1805 'y',
1806 'dx',
1807 'dy',
1808 'rotate',
1809 'textLength',
1810 'lengthAdjust',
1811 ],
1812 contentGroups: ['descriptive'],
1813 content: [
1814 'a',
1815 'altGlyph',
1816 'animate',
1817 'animateColor',
1818 'set',
1819 'tref',
1820 'tspan',
1821 ],
1822 },
1823 use: {
1824 attrsGroups: [
1825 'core',
1826 'conditionalProcessing',
1827 'graphicalEvent',
1828 'presentation',
1829 'xlink',
1830 ],
1831 attrs: [
1832 'class',
1833 'style',
1834 'externalResourcesRequired',
1835 'transform',
1836 'x',
1837 'y',
1838 'width',
1839 'height',
1840 'href',
1841 'xlink:href',
1842 ],
1843 defaults: {
1844 x: '0',
1845 y: '0',
1846 },
1847 contentGroups: ['animation', 'descriptive'],
1848 },
1849 view: {
1850 attrsGroups: ['core'],
1851 attrs: [
1852 'externalResourcesRequired',
1853 'viewBox',
1854 'preserveAspectRatio',
1855 'zoomAndPan',
1856 'viewTarget',
1857 ],
1858 contentGroups: ['descriptive'],
1859 },
1860 vkern: {
1861 attrsGroups: ['core'],
1862 attrs: ['u1', 'g1', 'u2', 'g2', 'k'],
1863 },
1864};
1865
1866// https://wiki.inkscape.org/wiki/index.php/Inkscape-specific_XML_attributes
1867exports.editorNamespaces = [
1868 'http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd',
1869 'http://inkscape.sourceforge.net/DTD/sodipodi-0.dtd',
1870 'http://www.inkscape.org/namespaces/inkscape',
1871 'http://www.bohemiancoding.com/sketch/ns',
1872 'http://ns.adobe.com/AdobeIllustrator/10.0/',
1873 'http://ns.adobe.com/Graphs/1.0/',
1874 'http://ns.adobe.com/AdobeSVGViewerExtensions/3.0/',
1875 'http://ns.adobe.com/Variables/1.0/',
1876 'http://ns.adobe.com/SaveForWeb/1.0/',
1877 'http://ns.adobe.com/Extensibility/1.0/',
1878 'http://ns.adobe.com/Flows/1.0/',
1879 'http://ns.adobe.com/ImageReplacement/1.0/',
1880 'http://ns.adobe.com/GenericCustomNamespace/1.0/',
1881 'http://ns.adobe.com/XPath/1.0/',
1882 'http://schemas.microsoft.com/visio/2003/SVGExtensions/',
1883 'http://taptrix.com/vectorillustrator/svg_extensions',
1884 'http://www.figma.com/figma/ns',
1885 'http://purl.org/dc/elements/1.1/',
1886 'http://creativecommons.org/ns#',
1887 'http://www.w3.org/1999/02/22-rdf-syntax-ns#',
1888 'http://www.serif.com/',
1889 'http://www.vector.evaxdesign.sk',
1890];
1891
1892// https://www.w3.org/TR/SVG11/linking.html#processingIRI
1893exports.referencesProps = [
1894 'clip-path',
1895 'color-profile',
1896 'fill',
1897 'filter',
1898 'marker-start',
1899 'marker-mid',
1900 'marker-end',
1901 'mask',
1902 'stroke',
1903 'style',
1904];
1905
1906// https://www.w3.org/TR/SVG11/propidx.html
1907exports.inheritableAttrs = [
1908 'clip-rule',
1909 'color',
1910 'color-interpolation',
1911 'color-interpolation-filters',
1912 'color-profile',
1913 'color-rendering',
1914 'cursor',
1915 'direction',
1916 'dominant-baseline',
1917 'fill',
1918 'fill-opacity',
1919 'fill-rule',
1920 'font',
1921 'font-family',
1922 'font-size',
1923 'font-size-adjust',
1924 'font-stretch',
1925 'font-style',
1926 'font-variant',
1927 'font-weight',
1928 'glyph-orientation-horizontal',
1929 'glyph-orientation-vertical',
1930 'image-rendering',
1931 'letter-spacing',
1932 'marker',
1933 'marker-end',
1934 'marker-mid',
1935 'marker-start',
1936 'paint-order',
1937 'pointer-events',
1938 'shape-rendering',
1939 'stroke',
1940 'stroke-dasharray',
1941 'stroke-dashoffset',
1942 'stroke-linecap',
1943 'stroke-linejoin',
1944 'stroke-miterlimit',
1945 'stroke-opacity',
1946 'stroke-width',
1947 'text-anchor',
1948 'text-rendering',
1949 'transform',
1950 'visibility',
1951 'word-spacing',
1952 'writing-mode',
1953];
1954
1955exports.presentationNonInheritableGroupAttrs = [
1956 'display',
1957 'clip-path',
1958 'filter',
1959 'mask',
1960 'opacity',
1961 'text-decoration',
1962 'transform',
1963 'unicode-bidi',
1964];
1965
1966/**
1967 * https://www.w3.org/TR/SVG11/single-page.html#types-ColorKeywords
1968 *
1969 * @type {Record<string, string>}
1970 */
1971exports.colorsNames = {
1972 aliceblue: '#f0f8ff',
1973 antiquewhite: '#faebd7',
1974 aqua: '#0ff',
1975 aquamarine: '#7fffd4',
1976 azure: '#f0ffff',
1977 beige: '#f5f5dc',
1978 bisque: '#ffe4c4',
1979 black: '#000',
1980 blanchedalmond: '#ffebcd',
1981 blue: '#00f',
1982 blueviolet: '#8a2be2',
1983 brown: '#a52a2a',
1984 burlywood: '#deb887',
1985 cadetblue: '#5f9ea0',
1986 chartreuse: '#7fff00',
1987 chocolate: '#d2691e',
1988 coral: '#ff7f50',
1989 cornflowerblue: '#6495ed',
1990 cornsilk: '#fff8dc',
1991 crimson: '#dc143c',
1992 cyan: '#0ff',
1993 darkblue: '#00008b',
1994 darkcyan: '#008b8b',
1995 darkgoldenrod: '#b8860b',
1996 darkgray: '#a9a9a9',
1997 darkgreen: '#006400',
1998 darkgrey: '#a9a9a9',
1999 darkkhaki: '#bdb76b',
2000 darkmagenta: '#8b008b',
2001 darkolivegreen: '#556b2f',
2002 darkorange: '#ff8c00',
2003 darkorchid: '#9932cc',
2004 darkred: '#8b0000',
2005 darksalmon: '#e9967a',
2006 darkseagreen: '#8fbc8f',
2007 darkslateblue: '#483d8b',
2008 darkslategray: '#2f4f4f',
2009 darkslategrey: '#2f4f4f',
2010 darkturquoise: '#00ced1',
2011 darkviolet: '#9400d3',
2012 deeppink: '#ff1493',
2013 deepskyblue: '#00bfff',
2014 dimgray: '#696969',
2015 dimgrey: '#696969',
2016 dodgerblue: '#1e90ff',
2017 firebrick: '#b22222',
2018 floralwhite: '#fffaf0',
2019 forestgreen: '#228b22',
2020 fuchsia: '#f0f',
2021 gainsboro: '#dcdcdc',
2022 ghostwhite: '#f8f8ff',
2023 gold: '#ffd700',
2024 goldenrod: '#daa520',
2025 gray: '#808080',
2026 green: '#008000',
2027 greenyellow: '#adff2f',
2028 grey: '#808080',
2029 honeydew: '#f0fff0',
2030 hotpink: '#ff69b4',
2031 indianred: '#cd5c5c',
2032 indigo: '#4b0082',
2033 ivory: '#fffff0',
2034 khaki: '#f0e68c',
2035 lavender: '#e6e6fa',
2036 lavenderblush: '#fff0f5',
2037 lawngreen: '#7cfc00',
2038 lemonchiffon: '#fffacd',
2039 lightblue: '#add8e6',
2040 lightcoral: '#f08080',
2041 lightcyan: '#e0ffff',
2042 lightgoldenrodyellow: '#fafad2',
2043 lightgray: '#d3d3d3',
2044 lightgreen: '#90ee90',
2045 lightgrey: '#d3d3d3',
2046 lightpink: '#ffb6c1',
2047 lightsalmon: '#ffa07a',
2048 lightseagreen: '#20b2aa',
2049 lightskyblue: '#87cefa',
2050 lightslategray: '#789',
2051 lightslategrey: '#789',
2052 lightsteelblue: '#b0c4de',
2053 lightyellow: '#ffffe0',
2054 lime: '#0f0',
2055 limegreen: '#32cd32',
2056 linen: '#faf0e6',
2057 magenta: '#f0f',
2058 maroon: '#800000',
2059 mediumaquamarine: '#66cdaa',
2060 mediumblue: '#0000cd',
2061 mediumorchid: '#ba55d3',
2062 mediumpurple: '#9370db',
2063 mediumseagreen: '#3cb371',
2064 mediumslateblue: '#7b68ee',
2065 mediumspringgreen: '#00fa9a',
2066 mediumturquoise: '#48d1cc',
2067 mediumvioletred: '#c71585',
2068 midnightblue: '#191970',
2069 mintcream: '#f5fffa',
2070 mistyrose: '#ffe4e1',
2071 moccasin: '#ffe4b5',
2072 navajowhite: '#ffdead',
2073 navy: '#000080',
2074 oldlace: '#fdf5e6',
2075 olive: '#808000',
2076 olivedrab: '#6b8e23',
2077 orange: '#ffa500',
2078 orangered: '#ff4500',
2079 orchid: '#da70d6',
2080 palegoldenrod: '#eee8aa',
2081 palegreen: '#98fb98',
2082 paleturquoise: '#afeeee',
2083 palevioletred: '#db7093',
2084 papayawhip: '#ffefd5',
2085 peachpuff: '#ffdab9',
2086 peru: '#cd853f',
2087 pink: '#ffc0cb',
2088 plum: '#dda0dd',
2089 powderblue: '#b0e0e6',
2090 purple: '#800080',
2091 rebeccapurple: '#639',
2092 red: '#f00',
2093 rosybrown: '#bc8f8f',
2094 royalblue: '#4169e1',
2095 saddlebrown: '#8b4513',
2096 salmon: '#fa8072',
2097 sandybrown: '#f4a460',
2098 seagreen: '#2e8b57',
2099 seashell: '#fff5ee',
2100 sienna: '#a0522d',
2101 silver: '#c0c0c0',
2102 skyblue: '#87ceeb',
2103 slateblue: '#6a5acd',
2104 slategray: '#708090',
2105 slategrey: '#708090',
2106 snow: '#fffafa',
2107 springgreen: '#00ff7f',
2108 steelblue: '#4682b4',
2109 tan: '#d2b48c',
2110 teal: '#008080',
2111 thistle: '#d8bfd8',
2112 tomato: '#ff6347',
2113 turquoise: '#40e0d0',
2114 violet: '#ee82ee',
2115 wheat: '#f5deb3',
2116 white: '#fff',
2117 whitesmoke: '#f5f5f5',
2118 yellow: '#ff0',
2119 yellowgreen: '#9acd32',
2120};
2121
2122/**
2123 * @type {Record<string, string>}
2124 */
2125exports.colorsShortNames = {
2126 '#f0ffff': 'azure',
2127 '#f5f5dc': 'beige',
2128 '#ffe4c4': 'bisque',
2129 '#a52a2a': 'brown',
2130 '#ff7f50': 'coral',
2131 '#ffd700': 'gold',
2132 '#808080': 'gray',
2133 '#008000': 'green',
2134 '#4b0082': 'indigo',
2135 '#fffff0': 'ivory',
2136 '#f0e68c': 'khaki',
2137 '#faf0e6': 'linen',
2138 '#800000': 'maroon',
2139 '#000080': 'navy',
2140 '#808000': 'olive',
2141 '#ffa500': 'orange',
2142 '#da70d6': 'orchid',
2143 '#cd853f': 'peru',
2144 '#ffc0cb': 'pink',
2145 '#dda0dd': 'plum',
2146 '#800080': 'purple',
2147 '#f00': 'red',
2148 '#ff0000': 'red',
2149 '#fa8072': 'salmon',
2150 '#a0522d': 'sienna',
2151 '#c0c0c0': 'silver',
2152 '#fffafa': 'snow',
2153 '#d2b48c': 'tan',
2154 '#008080': 'teal',
2155 '#ff6347': 'tomato',
2156 '#ee82ee': 'violet',
2157 '#f5deb3': 'wheat',
2158};
2159
2160// https://www.w3.org/TR/SVG11/single-page.html#types-DataTypeColor
2161exports.colorsProps = [
2162 'color',
2163 'fill',
2164 'stroke',
2165 'stop-color',
2166 'flood-color',
2167 'lighting-color',
2168];
Note: See TracBrowser for help on using the repository browser.