react.py 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501
  1. """Constants used to compile element classes.
  2. Ported from React DOM's possibleStandardNames.js. See the following link for
  3. more information:
  4. https://github.com/facebook/react/blob/d1ad984db1591b131d16739a24dee4ba44886a09/packages/react-dom-bindings/src/shared/possibleStandardNames.js
  5. """
  6. # Possible misspellings of React prop names, including incorrect casing.
  7. POSSIBLE_STANDARD_NAMES = {
  8. # HTML
  9. "accept": "accept",
  10. "acceptcharset": "acceptCharset",
  11. "accept-charset": "acceptCharset",
  12. "accesskey": "accessKey",
  13. "action": "action",
  14. "allowfullscreen": "allowFullScreen",
  15. "alt": "alt",
  16. "as": "as",
  17. "async": "async",
  18. "autocapitalize": "autoCapitalize",
  19. "autocomplete": "autoComplete",
  20. "autocorrect": "autoCorrect",
  21. "autofocus": "autoFocus",
  22. "autoplay": "autoPlay",
  23. "autosave": "autoSave",
  24. "capture": "capture",
  25. "cellpadding": "cellPadding",
  26. "cellspacing": "cellSpacing",
  27. "challenge": "challenge",
  28. "charset": "charSet",
  29. "checked": "checked",
  30. "children": "children",
  31. "cite": "cite",
  32. "class": "className",
  33. "classid": "classID",
  34. "classname": "className",
  35. "cols": "cols",
  36. "colspan": "colSpan",
  37. "content": "content",
  38. "contenteditable": "contentEditable",
  39. "contextmenu": "contextMenu",
  40. "controls": "controls",
  41. "controlslist": "controlsList",
  42. "coords": "coords",
  43. "crossorigin": "crossOrigin",
  44. "dangerouslysetinnerhtml": "dangerouslySetInnerHTML",
  45. "data": "data",
  46. "datetime": "dateTime",
  47. "default": "default",
  48. "defaultchecked": "defaultChecked",
  49. "defaultvalue": "defaultValue",
  50. "defer": "defer",
  51. "dir": "dir",
  52. "disabled": "disabled",
  53. "disablepictureinpicture": "disablePictureInPicture",
  54. "disableremoteplayback": "disableRemotePlayback",
  55. "download": "download",
  56. "draggable": "draggable",
  57. "enctype": "encType",
  58. "enterkeyhint": "enterKeyHint",
  59. "fetchpriority": "fetchPriority",
  60. "for": "htmlFor",
  61. "form": "form",
  62. "formmethod": "formMethod",
  63. "formaction": "formAction",
  64. "formenctype": "formEncType",
  65. "formnovalidate": "formNoValidate",
  66. "formtarget": "formTarget",
  67. "frameborder": "frameBorder",
  68. "headers": "headers",
  69. "height": "height",
  70. "hidden": "hidden",
  71. "high": "high",
  72. "href": "href",
  73. "hreflang": "hrefLang",
  74. "htmlfor": "htmlFor",
  75. "httpequiv": "httpEquiv",
  76. "http-equiv": "httpEquiv",
  77. "icon": "icon",
  78. "id": "id",
  79. "imagesizes": "imageSizes",
  80. "imagesrcset": "imageSrcSet",
  81. "innerhtml": "innerHTML",
  82. "inputmode": "inputMode",
  83. "integrity": "integrity",
  84. "is": "is",
  85. "itemid": "itemID",
  86. "itemprop": "itemProp",
  87. "itemref": "itemRef",
  88. "itemscope": "itemScope",
  89. "itemtype": "itemType",
  90. "keyparams": "keyParams",
  91. "keytype": "keyType",
  92. "kind": "kind",
  93. "label": "label",
  94. "lang": "lang",
  95. "list": "list",
  96. "loop": "loop",
  97. "low": "low",
  98. "manifest": "manifest",
  99. "marginwidth": "marginWidth",
  100. "marginheight": "marginHeight",
  101. "max": "max",
  102. "maxlength": "maxLength",
  103. "media": "media",
  104. "mediagroup": "mediaGroup",
  105. "method": "method",
  106. "min": "min",
  107. "minlength": "minLength",
  108. "multiple": "multiple",
  109. "muted": "muted",
  110. "name": "name",
  111. "nomodule": "noModule",
  112. "nonce": "nonce",
  113. "novalidate": "noValidate",
  114. "open": "open",
  115. "optimum": "optimum",
  116. "pattern": "pattern",
  117. "placeholder": "placeholder",
  118. "playsinline": "playsInline",
  119. "poster": "poster",
  120. "preload": "preload",
  121. "profile": "profile",
  122. "radiogroup": "radioGroup",
  123. "readonly": "readOnly",
  124. "referrerpolicy": "referrerPolicy",
  125. "rel": "rel",
  126. "required": "required",
  127. "reversed": "reversed",
  128. "role": "role",
  129. "rows": "rows",
  130. "rowspan": "rowSpan",
  131. "sandbox": "sandbox",
  132. "scope": "scope",
  133. "scoped": "scoped",
  134. "scrolling": "scrolling",
  135. "seamless": "seamless",
  136. "selected": "selected",
  137. "shape": "shape",
  138. "size": "size",
  139. "sizes": "sizes",
  140. "span": "span",
  141. "spellcheck": "spellCheck",
  142. "src": "src",
  143. "srcdoc": "srcDoc",
  144. "srclang": "srcLang",
  145. "srcset": "srcSet",
  146. "start": "start",
  147. "step": "step",
  148. "style": "style",
  149. "summary": "summary",
  150. "tabindex": "tabIndex",
  151. "target": "target",
  152. "title": "title",
  153. "type": "type",
  154. "usemap": "useMap",
  155. "value": "value",
  156. "width": "width",
  157. "wmode": "wmode",
  158. "wrap": "wrap",
  159. # SVG
  160. "about": "about",
  161. "accentheight": "accentHeight",
  162. "accent-height": "accentHeight",
  163. "accumulate": "accumulate",
  164. "additive": "additive",
  165. "alignmentbaseline": "alignmentBaseline",
  166. "alignment-baseline": "alignmentBaseline",
  167. "allowreorder": "allowReorder",
  168. "alphabetic": "alphabetic",
  169. "amplitude": "amplitude",
  170. "arabicform": "arabicForm",
  171. "arabic-form": "arabicForm",
  172. "ascent": "ascent",
  173. "attributename": "attributeName",
  174. "attributetype": "attributeType",
  175. "autoreverse": "autoReverse",
  176. "azimuth": "azimuth",
  177. "basefrequency": "baseFrequency",
  178. "baselineshift": "baselineShift",
  179. "baseline-shift": "baselineShift",
  180. "baseprofile": "baseProfile",
  181. "bbox": "bbox",
  182. "begin": "begin",
  183. "bias": "bias",
  184. "by": "by",
  185. "calcmode": "calcMode",
  186. "capheight": "capHeight",
  187. "cap-height": "capHeight",
  188. "clip": "clip",
  189. "clippath": "clipPath",
  190. "clip-path": "clipPath",
  191. "clippathunits": "clipPathUnits",
  192. "cliprule": "clipRule",
  193. "clip-rule": "clipRule",
  194. "color": "color",
  195. "colorinterpolation": "colorInterpolation",
  196. "color-interpolation": "colorInterpolation",
  197. "colorinterpolationfilters": "colorInterpolationFilters",
  198. "color-interpolation-filters": "colorInterpolationFilters",
  199. "colorprofile": "colorProfile",
  200. "color-profile": "colorProfile",
  201. "colorrendering": "colorRendering",
  202. "color-rendering": "colorRendering",
  203. "contentscripttype": "contentScriptType",
  204. "contentstyletype": "contentStyleType",
  205. "cursor": "cursor",
  206. "cx": "cx",
  207. "cy": "cy",
  208. "d": "d",
  209. "datatype": "datatype",
  210. "decelerate": "decelerate",
  211. "descent": "descent",
  212. "diffuseconstant": "diffuseConstant",
  213. "direction": "direction",
  214. "display": "display",
  215. "divisor": "divisor",
  216. "dominantbaseline": "dominantBaseline",
  217. "dominant-baseline": "dominantBaseline",
  218. "dur": "dur",
  219. "dx": "dx",
  220. "dy": "dy",
  221. "edgemode": "edgeMode",
  222. "elevation": "elevation",
  223. "enablebackground": "enableBackground",
  224. "enable-background": "enableBackground",
  225. "end": "end",
  226. "exponent": "exponent",
  227. "externalresourcesrequired": "externalResourcesRequired",
  228. "fill": "fill",
  229. "fillopacity": "fillOpacity",
  230. "fill-opacity": "fillOpacity",
  231. "fillrule": "fillRule",
  232. "fill-rule": "fillRule",
  233. "filter": "filter",
  234. "filterres": "filterRes",
  235. "filterunits": "filterUnits",
  236. "floodopacity": "floodOpacity",
  237. "flood-opacity": "floodOpacity",
  238. "floodcolor": "floodColor",
  239. "flood-color": "floodColor",
  240. "focusable": "focusable",
  241. "fontfamily": "fontFamily",
  242. "font-family": "fontFamily",
  243. "fontsize": "fontSize",
  244. "font-size": "fontSize",
  245. "fontsizeadjust": "fontSizeAdjust",
  246. "font-size-adjust": "fontSizeAdjust",
  247. "fontstretch": "fontStretch",
  248. "font-stretch": "fontStretch",
  249. "fontstyle": "fontStyle",
  250. "font-style": "fontStyle",
  251. "fontvariant": "fontVariant",
  252. "font-variant": "fontVariant",
  253. "fontweight": "fontWeight",
  254. "font-weight": "fontWeight",
  255. "format": "format",
  256. "from": "from",
  257. "fx": "fx",
  258. "fy": "fy",
  259. "g1": "g1",
  260. "g2": "g2",
  261. "glyphname": "glyphName",
  262. "glyph-name": "glyphName",
  263. "glyphorientationhorizontal": "glyphOrientationHorizontal",
  264. "glyph-orientation-horizontal": "glyphOrientationHorizontal",
  265. "glyphorientationvertical": "glyphOrientationVertical",
  266. "glyph-orientation-vertical": "glyphOrientationVertical",
  267. "glyphref": "glyphRef",
  268. "gradienttransform": "gradientTransform",
  269. "gradientunits": "gradientUnits",
  270. "hanging": "hanging",
  271. "horizadvx": "horizAdvX",
  272. "horiz-adv-x": "horizAdvX",
  273. "horizoriginx": "horizOriginX",
  274. "horiz-origin-x": "horizOriginX",
  275. "ideographic": "ideographic",
  276. "imagerendering": "imageRendering",
  277. "image-rendering": "imageRendering",
  278. "in2": "in2",
  279. "in": "in",
  280. "inlist": "inlist",
  281. "intercept": "intercept",
  282. "k1": "k1",
  283. "k2": "k2",
  284. "k3": "k3",
  285. "k4": "k4",
  286. "k": "k",
  287. "kernelmatrix": "kernelMatrix",
  288. "kernelunitlength": "kernelUnitLength",
  289. "kerning": "kerning",
  290. "keypoints": "keyPoints",
  291. "keysplines": "keySplines",
  292. "keytimes": "keyTimes",
  293. "lengthadjust": "lengthAdjust",
  294. "letterspacing": "letterSpacing",
  295. "letter-spacing": "letterSpacing",
  296. "lightingcolor": "lightingColor",
  297. "lighting-color": "lightingColor",
  298. "limitingconeangle": "limitingConeAngle",
  299. "local": "local",
  300. "markerend": "markerEnd",
  301. "marker-end": "markerEnd",
  302. "markerheight": "markerHeight",
  303. "markermid": "markerMid",
  304. "marker-mid": "markerMid",
  305. "markerstart": "markerStart",
  306. "marker-start": "markerStart",
  307. "markerunits": "markerUnits",
  308. "markerwidth": "markerWidth",
  309. "mask": "mask",
  310. "maskcontentunits": "maskContentUnits",
  311. "maskunits": "maskUnits",
  312. "mathematical": "mathematical",
  313. "mode": "mode",
  314. "numoctaves": "numOctaves",
  315. "offset": "offset",
  316. "opacity": "opacity",
  317. "operator": "operator",
  318. "order": "order",
  319. "orient": "orient",
  320. "orientation": "orientation",
  321. "origin": "origin",
  322. "overflow": "overflow",
  323. "overlineposition": "overlinePosition",
  324. "overline-position": "overlinePosition",
  325. "overlinethickness": "overlineThickness",
  326. "overline-thickness": "overlineThickness",
  327. "paintorder": "paintOrder",
  328. "paint-order": "paintOrder",
  329. "panose1": "panose1",
  330. "panose-1": "panose1",
  331. "pathlength": "pathLength",
  332. "patterncontentunits": "patternContentUnits",
  333. "patterntransform": "patternTransform",
  334. "patternunits": "patternUnits",
  335. "pointerevents": "pointerEvents",
  336. "pointer-events": "pointerEvents",
  337. "points": "points",
  338. "pointsatx": "pointsAtX",
  339. "pointsaty": "pointsAtY",
  340. "pointsatz": "pointsAtZ",
  341. "prefix": "prefix",
  342. "preservealpha": "preserveAlpha",
  343. "preserveaspectratio": "preserveAspectRatio",
  344. "primitiveunits": "primitiveUnits",
  345. "property": "property",
  346. "r": "r",
  347. "radius": "radius",
  348. "refx": "refX",
  349. "refy": "refY",
  350. "renderingintent": "renderingIntent",
  351. "rendering-intent": "renderingIntent",
  352. "repeatcount": "repeatCount",
  353. "repeatdur": "repeatDur",
  354. "requiredextensions": "requiredExtensions",
  355. "requiredfeatures": "requiredFeatures",
  356. "resource": "resource",
  357. "restart": "restart",
  358. "result": "result",
  359. "results": "results",
  360. "rotate": "rotate",
  361. "rx": "rx",
  362. "ry": "ry",
  363. "scale": "scale",
  364. "security": "security",
  365. "seed": "seed",
  366. "shaperendering": "shapeRendering",
  367. "shape-rendering": "shapeRendering",
  368. "slope": "slope",
  369. "spacing": "spacing",
  370. "specularconstant": "specularConstant",
  371. "specularexponent": "specularExponent",
  372. "speed": "speed",
  373. "spreadmethod": "spreadMethod",
  374. "startoffset": "startOffset",
  375. "stddeviation": "stdDeviation",
  376. "stemh": "stemh",
  377. "stemv": "stemv",
  378. "stitchtiles": "stitchTiles",
  379. "storxolor": "stopColor",
  380. "stop-color": "stopColor",
  381. "stopopacity": "stopOpacity",
  382. "stop-opacity": "stopOpacity",
  383. "strikethroughposition": "strikethroughPosition",
  384. "strikethrough-position": "strikethroughPosition",
  385. "strikethroughthickness": "strikethroughThickness",
  386. "strikethrough-thickness": "strikethroughThickness",
  387. "string": "string",
  388. "stroke": "stroke",
  389. "strokedasharray": "strokeDasharray",
  390. "stroke-dasharray": "strokeDasharray",
  391. "strokedashoffset": "strokeDashoffset",
  392. "stroke-dashoffset": "strokeDashoffset",
  393. "strokelinecap": "strokeLinecap",
  394. "stroke-linecap": "strokeLinecap",
  395. "strokelinejoin": "strokeLinejoin",
  396. "stroke-linejoin": "strokeLinejoin",
  397. "strokemiterlimit": "strokeMiterlimit",
  398. "stroke-miterlimit": "strokeMiterlimit",
  399. "strokewidth": "strokeWidth",
  400. "stroke-width": "strokeWidth",
  401. "strokeopacity": "strokeOpacity",
  402. "stroke-opacity": "strokeOpacity",
  403. "suppresscontenteditablewarning": "suppressContentEditableWarning",
  404. "suppresshydrationwarning": "suppressHydrationWarning",
  405. "surfacescale": "surfaceScale",
  406. "systemlanguage": "systemLanguage",
  407. "tablevalues": "tableValues",
  408. "targetx": "targetX",
  409. "targety": "targetY",
  410. "textanchor": "textAnchor",
  411. "text-anchor": "textAnchor",
  412. "textdecoration": "textDecoration",
  413. "text-decoration": "textDecoration",
  414. "textlength": "textLength",
  415. "textrendering": "textRendering",
  416. "text-rendering": "textRendering",
  417. "to": "to",
  418. "transform": "transform",
  419. "transformorigin": "transformOrigin",
  420. "transform-origin": "transformOrigin",
  421. "typeof": "typeof",
  422. "u1": "u1",
  423. "u2": "u2",
  424. "underlineposition": "underlinePosition",
  425. "underline-position": "underlinePosition",
  426. "underlinethickness": "underlineThickness",
  427. "underline-thickness": "underlineThickness",
  428. "unicode": "unicode",
  429. "unicodebidi": "unicodeBidi",
  430. "unicode-bidi": "unicodeBidi",
  431. "unicoderange": "unicodeRange",
  432. "unicode-range": "unicodeRange",
  433. "unitsperem": "unitsPerEm",
  434. "units-per-em": "unitsPerEm",
  435. "unselectable": "unselectable",
  436. "valphabetic": "vAlphabetic",
  437. "v-alphabetic": "vAlphabetic",
  438. "values": "values",
  439. "vectoreffect": "vectorEffect",
  440. "vector-effect": "vectorEffect",
  441. "version": "version",
  442. "vertadvy": "vertAdvY",
  443. "vert-adv-y": "vertAdvY",
  444. "vertoriginx": "vertOriginX",
  445. "vert-origin-x": "vertOriginX",
  446. "vertoriginy": "vertOriginY",
  447. "vert-origin-y": "vertOriginY",
  448. "vhanging": "vHanging",
  449. "v-hanging": "vHanging",
  450. "videographic": "vIdeographic",
  451. "v-ideographic": "vIdeographic",
  452. "viewbox": "viewBox",
  453. "viewtarget": "viewTarget",
  454. "visibility": "visibility",
  455. "vmathematical": "vMathematical",
  456. "v-mathematical": "vMathematical",
  457. "vocab": "vocab",
  458. "widths": "widths",
  459. "wordspacing": "wordSpacing",
  460. "word-spacing": "wordSpacing",
  461. "writingmode": "writingMode",
  462. "writing-mode": "writingMode",
  463. "x1": "x1",
  464. "x2": "x2",
  465. "x": "x",
  466. "xchannelselector": "xChannelSelector",
  467. "xheight": "xHeight",
  468. "x-height": "xHeight",
  469. "xlinkactuate": "xlinkActuate",
  470. "xlink:actuate": "xlinkActuate",
  471. "xlinkarcrole": "xlinkArcrole",
  472. "xlink:arcrole": "xlinkArcrole",
  473. "xlinkhref": "xlinkHref",
  474. "xlink:href": "xlinkHref",
  475. "xlinkrole": "xlinkRole",
  476. "xlink:role": "xlinkRole",
  477. "xlinkshow": "xlinkShow",
  478. "xlink:show": "xlinkShow",
  479. "xlinktitle": "xlinkTitle",
  480. "xlink:title": "xlinkTitle",
  481. "xlinktype": "xlinkType",
  482. "xlink:type": "xlinkType",
  483. "xmlbase": "xmlBase",
  484. "xml:base": "xmlBase",
  485. "xmllang": "xmlLang",
  486. "xml:lang": "xmlLang",
  487. "xmlns": "xmlns",
  488. "xml:space": "xmlSpace",
  489. "xmlnsxlink": "xmlnsXlink",
  490. "xmlns:xlink": "xmlnsXlink",
  491. "xmlspace": "xmlSpace",
  492. "y1": "y1",
  493. "y2": "y2",
  494. "y": "y",
  495. "ychannelselector": "yChannelSelector",
  496. "z": "z",
  497. "zoomandpan": "zoomAndPan",
  498. }