_collections.js 56 KB

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