Skip to content
This repository was archived by the owner on Nov 22, 2024. It is now read-only.

Commit 4f287ec

Browse files
Add updated React runtimes to demo application
1 parent 4e1faab commit 4f287ec

File tree

8 files changed

+38482
-0
lines changed

8 files changed

+38482
-0
lines changed

demo/create-react-class-15.6.2.js

Lines changed: 1298 additions & 0 deletions
Large diffs are not rendered by default.

demo/react-16.1.1.js

Lines changed: 1672 additions & 0 deletions
Large diffs are not rendered by default.

demo/react-component/create-react-class-15.6.2.js

Lines changed: 1298 additions & 0 deletions
Large diffs are not rendered by default.

demo/react-component/react-16.1.1.js

Lines changed: 1672 additions & 0 deletions
Large diffs are not rendered by default.

demo/react-component/react-dom-16.1.1.js

Lines changed: 16076 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 195 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,195 @@
1+
'use strict';
2+
3+
/**
4+
* Copyright (c) 2015-present, Facebook, Inc.
5+
*
6+
* This source code is licensed under the MIT license found in the
7+
* LICENSE file in the root directory of this source tree.
8+
*/
9+
10+
(function(f) {
11+
if (typeof exports === 'object' && typeof module !== 'undefined') {
12+
module.exports = f(require('react'));
13+
/* global define */
14+
} else if (typeof define === 'function' && define.amd) {
15+
define(['react'], f);
16+
} else {
17+
var g;
18+
if (typeof window !== 'undefined') {
19+
g = window;
20+
} else if (typeof global !== 'undefined') {
21+
g = global;
22+
} else if (typeof self !== 'undefined') {
23+
g = self;
24+
} else {
25+
g = this;
26+
}
27+
28+
if (typeof g.React === 'undefined') {
29+
throw Error('React module should be required before ReactDOMFactories');
30+
}
31+
32+
g.ReactDOMFactories = f(g.React);
33+
}
34+
})(function(React) {
35+
/**
36+
* Create a factory that creates HTML tag elements.
37+
*/
38+
function createDOMFactory(type) {
39+
var factory = React.createElement.bind(null, type);
40+
// Expose the type on the factory and the prototype so that it can be
41+
// easily accessed on elements. E.g. `<Foo />.type === Foo`.
42+
// This should not be named `constructor` since this may not be the function
43+
// that created the element, and it may not even be a constructor.
44+
factory.type = type;
45+
return factory;
46+
};
47+
48+
/**
49+
* Creates a mapping from supported HTML tags to `ReactDOMComponent` classes.
50+
*/
51+
var ReactDOMFactories = {
52+
a: createDOMFactory('a'),
53+
abbr: createDOMFactory('abbr'),
54+
address: createDOMFactory('address'),
55+
area: createDOMFactory('area'),
56+
article: createDOMFactory('article'),
57+
aside: createDOMFactory('aside'),
58+
audio: createDOMFactory('audio'),
59+
b: createDOMFactory('b'),
60+
base: createDOMFactory('base'),
61+
bdi: createDOMFactory('bdi'),
62+
bdo: createDOMFactory('bdo'),
63+
big: createDOMFactory('big'),
64+
blockquote: createDOMFactory('blockquote'),
65+
body: createDOMFactory('body'),
66+
br: createDOMFactory('br'),
67+
button: createDOMFactory('button'),
68+
canvas: createDOMFactory('canvas'),
69+
caption: createDOMFactory('caption'),
70+
cite: createDOMFactory('cite'),
71+
code: createDOMFactory('code'),
72+
col: createDOMFactory('col'),
73+
colgroup: createDOMFactory('colgroup'),
74+
data: createDOMFactory('data'),
75+
datalist: createDOMFactory('datalist'),
76+
dd: createDOMFactory('dd'),
77+
del: createDOMFactory('del'),
78+
details: createDOMFactory('details'),
79+
dfn: createDOMFactory('dfn'),
80+
dialog: createDOMFactory('dialog'),
81+
div: createDOMFactory('div'),
82+
dl: createDOMFactory('dl'),
83+
dt: createDOMFactory('dt'),
84+
em: createDOMFactory('em'),
85+
embed: createDOMFactory('embed'),
86+
fieldset: createDOMFactory('fieldset'),
87+
figcaption: createDOMFactory('figcaption'),
88+
figure: createDOMFactory('figure'),
89+
footer: createDOMFactory('footer'),
90+
form: createDOMFactory('form'),
91+
h1: createDOMFactory('h1'),
92+
h2: createDOMFactory('h2'),
93+
h3: createDOMFactory('h3'),
94+
h4: createDOMFactory('h4'),
95+
h5: createDOMFactory('h5'),
96+
h6: createDOMFactory('h6'),
97+
head: createDOMFactory('head'),
98+
header: createDOMFactory('header'),
99+
hgroup: createDOMFactory('hgroup'),
100+
hr: createDOMFactory('hr'),
101+
html: createDOMFactory('html'),
102+
i: createDOMFactory('i'),
103+
iframe: createDOMFactory('iframe'),
104+
img: createDOMFactory('img'),
105+
input: createDOMFactory('input'),
106+
ins: createDOMFactory('ins'),
107+
kbd: createDOMFactory('kbd'),
108+
keygen: createDOMFactory('keygen'),
109+
label: createDOMFactory('label'),
110+
legend: createDOMFactory('legend'),
111+
li: createDOMFactory('li'),
112+
link: createDOMFactory('link'),
113+
main: createDOMFactory('main'),
114+
map: createDOMFactory('map'),
115+
mark: createDOMFactory('mark'),
116+
menu: createDOMFactory('menu'),
117+
menuitem: createDOMFactory('menuitem'),
118+
meta: createDOMFactory('meta'),
119+
meter: createDOMFactory('meter'),
120+
nav: createDOMFactory('nav'),
121+
noscript: createDOMFactory('noscript'),
122+
object: createDOMFactory('object'),
123+
ol: createDOMFactory('ol'),
124+
optgroup: createDOMFactory('optgroup'),
125+
option: createDOMFactory('option'),
126+
output: createDOMFactory('output'),
127+
p: createDOMFactory('p'),
128+
param: createDOMFactory('param'),
129+
picture: createDOMFactory('picture'),
130+
pre: createDOMFactory('pre'),
131+
progress: createDOMFactory('progress'),
132+
q: createDOMFactory('q'),
133+
rp: createDOMFactory('rp'),
134+
rt: createDOMFactory('rt'),
135+
ruby: createDOMFactory('ruby'),
136+
s: createDOMFactory('s'),
137+
samp: createDOMFactory('samp'),
138+
script: createDOMFactory('script'),
139+
section: createDOMFactory('section'),
140+
select: createDOMFactory('select'),
141+
small: createDOMFactory('small'),
142+
source: createDOMFactory('source'),
143+
span: createDOMFactory('span'),
144+
strong: createDOMFactory('strong'),
145+
style: createDOMFactory('style'),
146+
sub: createDOMFactory('sub'),
147+
summary: createDOMFactory('summary'),
148+
sup: createDOMFactory('sup'),
149+
table: createDOMFactory('table'),
150+
tbody: createDOMFactory('tbody'),
151+
td: createDOMFactory('td'),
152+
textarea: createDOMFactory('textarea'),
153+
tfoot: createDOMFactory('tfoot'),
154+
th: createDOMFactory('th'),
155+
thead: createDOMFactory('thead'),
156+
time: createDOMFactory('time'),
157+
title: createDOMFactory('title'),
158+
tr: createDOMFactory('tr'),
159+
track: createDOMFactory('track'),
160+
u: createDOMFactory('u'),
161+
ul: createDOMFactory('ul'),
162+
var: createDOMFactory('var'),
163+
video: createDOMFactory('video'),
164+
wbr: createDOMFactory('wbr'),
165+
166+
// SVG
167+
circle: createDOMFactory('circle'),
168+
clipPath: createDOMFactory('clipPath'),
169+
defs: createDOMFactory('defs'),
170+
ellipse: createDOMFactory('ellipse'),
171+
g: createDOMFactory('g'),
172+
image: createDOMFactory('image'),
173+
line: createDOMFactory('line'),
174+
linearGradient: createDOMFactory('linearGradient'),
175+
mask: createDOMFactory('mask'),
176+
path: createDOMFactory('path'),
177+
pattern: createDOMFactory('pattern'),
178+
polygon: createDOMFactory('polygon'),
179+
polyline: createDOMFactory('polyline'),
180+
radialGradient: createDOMFactory('radialGradient'),
181+
rect: createDOMFactory('rect'),
182+
stop: createDOMFactory('stop'),
183+
svg: createDOMFactory('svg'),
184+
text: createDOMFactory('text'),
185+
tspan: createDOMFactory('tspan'),
186+
};
187+
188+
// due to wrapper and conditionals at the top, this will either become
189+
// `module.exports ReactDOMFactories` if that is available,
190+
// otherwise it will be defined via `define(['react'], ReactDOMFactories)`
191+
// if that is available,
192+
// otherwise it will be defined as global variable.
193+
return ReactDOMFactories;
194+
});
195+

0 commit comments

Comments
 (0)