@@ -189,246 +189,6 @@ function getIteratorFn(maybeIterable) {
189189 return null ;
190190}
191191
192- // Re-export dynamic flags from the www version.
193- require ( "ReactFeatureFlags" ) ;
194-
195- // A simple string attribute.
196- // Attributes that aren't in the filter are presumed to have this type.
197- var STRING = 1 ; // A string attribute that accepts booleans in React. In HTML, these are called
198- // "enumerated" attributes with "true" and "false" as possible values.
199- // When true, it should be set to a "true" string.
200- // When false, it should be set to a "false" string.
201-
202- var BOOLEANISH_STRING = 2 ; // A real boolean attribute.
203- // When true, it should be present (set either to an empty string or its name).
204- // When false, it should be omitted.
205-
206- var BOOLEAN = 3 ; // An attribute that can be used as a flag as well as with a value.
207- // When true, it should be present (set either to an empty string or its name).
208- // When false, it should be omitted.
209- // For any other value, should be present with that value.
210-
211- var OVERLOADED_BOOLEAN = 4 ; // An attribute that must be numeric or parse as a numeric.
212- // When falsy, it should be removed.
213-
214- var NUMERIC = 5 ; // An attribute that must be positive numeric or parse as a positive numeric.
215-
216- function PropertyInfoRecord (
217- type ,
218- attributeName ,
219- attributeNamespace ,
220- sanitizeURL ,
221- removeEmptyString
222- ) {
223- this . acceptsBooleans =
224- type === BOOLEANISH_STRING ||
225- type === BOOLEAN ||
226- type === OVERLOADED_BOOLEAN ;
227- this . attributeName = attributeName ;
228- this . attributeNamespace = attributeNamespace ;
229- this . type = type ;
230- this . sanitizeURL = sanitizeURL ;
231- this . removeEmptyString = removeEmptyString ;
232- } // When adding attributes to this list, be sure to also add them to
233- // In React, we let users pass `true` and `false` even though technically
234- // these aren't boolean attributes (they are coerced to strings).
235-
236- [ "contentEditable" , "draggable" , "spellCheck" , "value" ] . forEach ( function (
237- name
238- ) {
239- // $FlowFixMe[invalid-constructor] Flow no longer supports calling new on functions
240- new PropertyInfoRecord (
241- BOOLEANISH_STRING ,
242- name . toLowerCase ( ) , // attributeName
243- null , // attributeNamespace
244- false , // sanitizeURL
245- false
246- ) ;
247- } ) ; // These are "enumerated" SVG attributes that accept "true" and "false".
248-
249- [
250- "allowFullScreen" ,
251- "async" , // Note: there is a special case that prevents it from being written to the DOM
252- // on the client side because the browsers are inconsistent. Instead we call focus().
253- "autoFocus" ,
254- "autoPlay" ,
255- "controls" ,
256- "default" ,
257- "defer" ,
258- "disabled" ,
259- "disablePictureInPicture" ,
260- "disableRemotePlayback" ,
261- "formNoValidate" ,
262- "hidden" ,
263- "loop" ,
264- "noModule" ,
265- "noValidate" ,
266- "open" ,
267- "playsInline" ,
268- "readOnly" ,
269- "required" ,
270- "reversed" ,
271- "scoped" ,
272- "seamless" , // Microdata
273- "itemScope"
274- ] . forEach ( function ( name ) {
275- // $FlowFixMe[invalid-constructor] Flow no longer supports calling new on functions
276- new PropertyInfoRecord (
277- BOOLEAN ,
278- name . toLowerCase ( ) , // attributeName
279- null , // attributeNamespace
280- false , // sanitizeURL
281- false
282- ) ;
283- } ) ; // These are HTML attributes that are "overloaded booleans": they behave like
284-
285- [ "rowSpan" , "start" ] . forEach ( function ( name ) {
286- // $FlowFixMe[invalid-constructor] Flow no longer supports calling new on functions
287- new PropertyInfoRecord (
288- NUMERIC ,
289- name . toLowerCase ( ) , // attributeName
290- null , // attributeNamespace
291- false , // sanitizeURL
292- false
293- ) ;
294- } ) ;
295- var CAMELIZE = / [ \- \: ] ( [ a - z ] ) / g;
296-
297- var capitalize = function ( token ) {
298- return token [ 1 ] . toUpperCase ( ) ;
299- } ; // This is a list of all SVG attributes that need special casing, namespacing,
300- // or boolean value assignment. Regular attributes that just accept strings
301- // and have the same names are omitted, just like in the HTML attribute filter.
302- // Some of these attributes can be hard to find. This list was created by
303- // scraping the MDN documentation.
304-
305- [
306- "accent-height" ,
307- "alignment-baseline" ,
308- "arabic-form" ,
309- "baseline-shift" ,
310- "cap-height" ,
311- "clip-path" ,
312- "clip-rule" ,
313- "color-interpolation" ,
314- "color-interpolation-filters" ,
315- "color-profile" ,
316- "color-rendering" ,
317- "dominant-baseline" ,
318- "enable-background" ,
319- "fill-opacity" ,
320- "fill-rule" ,
321- "flood-color" ,
322- "flood-opacity" ,
323- "font-family" ,
324- "font-size" ,
325- "font-size-adjust" ,
326- "font-stretch" ,
327- "font-style" ,
328- "font-variant" ,
329- "font-weight" ,
330- "glyph-name" ,
331- "glyph-orientation-horizontal" ,
332- "glyph-orientation-vertical" ,
333- "horiz-adv-x" ,
334- "horiz-origin-x" ,
335- "image-rendering" ,
336- "letter-spacing" ,
337- "lighting-color" ,
338- "marker-end" ,
339- "marker-mid" ,
340- "marker-start" ,
341- "overline-position" ,
342- "overline-thickness" ,
343- "paint-order" ,
344- "panose-1" ,
345- "pointer-events" ,
346- "rendering-intent" ,
347- "shape-rendering" ,
348- "stop-color" ,
349- "stop-opacity" ,
350- "strikethrough-position" ,
351- "strikethrough-thickness" ,
352- "stroke-dasharray" ,
353- "stroke-dashoffset" ,
354- "stroke-linecap" ,
355- "stroke-linejoin" ,
356- "stroke-miterlimit" ,
357- "stroke-opacity" ,
358- "stroke-width" ,
359- "text-anchor" ,
360- "text-decoration" ,
361- "text-rendering" ,
362- "transform-origin" ,
363- "underline-position" ,
364- "underline-thickness" ,
365- "unicode-bidi" ,
366- "unicode-range" ,
367- "units-per-em" ,
368- "v-alphabetic" ,
369- "v-hanging" ,
370- "v-ideographic" ,
371- "v-mathematical" ,
372- "vector-effect" ,
373- "vert-adv-y" ,
374- "vert-origin-x" ,
375- "vert-origin-y" ,
376- "word-spacing" ,
377- "writing-mode" ,
378- "xmlns:xlink" ,
379- "x-height" // NOTE: if you add a camelCased prop to this list,
380- // you'll need to set attributeName to name.toLowerCase()
381- // instead in the assignment below.
382- ] . forEach ( function ( attributeName ) {
383- attributeName . replace ( CAMELIZE , capitalize ) ; // $FlowFixMe[invalid-constructor] Flow no longer supports calling new on functions
384- } ) ; // String SVG attributes with the xlink namespace.
385-
386- [
387- "xlink:actuate" ,
388- "xlink:arcrole" ,
389- "xlink:role" ,
390- "xlink:show" ,
391- "xlink:title" ,
392- "xlink:type" // NOTE: if you add a camelCased prop to this list,
393- // you'll need to set attributeName to name.toLowerCase()
394- // instead in the assignment below.
395- ] . forEach ( function ( attributeName ) {
396- attributeName . replace ( CAMELIZE , capitalize ) ; // $FlowFixMe[invalid-constructor] Flow no longer supports calling new on functions
397- } ) ; // String SVG attributes with the xml namespace.
398-
399- [
400- "xml:base" ,
401- "xml:lang" ,
402- "xml:space" // NOTE: if you add a camelCased prop to this list,
403- // you'll need to set attributeName to name.toLowerCase()
404- // instead in the assignment below.
405- ] . forEach ( function ( attributeName ) {
406- attributeName . replace ( CAMELIZE , capitalize ) ; // $FlowFixMe[invalid-constructor] Flow no longer supports calling new on functions
407- } ) ; // These attribute exists both in HTML and SVG.
408- // The attribute name is case-sensitive in SVG so we can't just use
409- // the React name like we do for attributes that exist only in HTML.
410-
411- [ "tabIndex" , "crossOrigin" ] . forEach ( function ( attributeName ) {
412- // $FlowFixMe[invalid-constructor] Flow no longer supports calling new on functions
413- new PropertyInfoRecord (
414- STRING ,
415- attributeName . toLowerCase ( ) , // attributeName
416- null , // attributeNamespace
417- false , // sanitizeURL
418- false
419- ) ;
420- } ) ; // These attributes accept URLs. These must not allow javascript: URLS.
421- [ "src" , "href" , "action" ] . forEach ( function ( attributeName ) {
422- // $FlowFixMe[invalid-constructor] Flow no longer supports calling new on functions
423- new PropertyInfoRecord (
424- STRING ,
425- attributeName . toLowerCase ( ) , // attributeName
426- null , // attributeNamespace
427- true , // sanitizeURL
428- true
429- ) ;
430- } ) ;
431-
432192var rendererSigil ;
433193
434194{
@@ -637,6 +397,9 @@ function readContext$1(context) {
637397 return value ;
638398}
639399
400+ // Re-export dynamic flags from the www version.
401+ require ( "ReactFeatureFlags" ) ;
402+
640403// Corresponds to ReactFiberWakeable and ReactFizzWakeable modules. Generally,
641404// changes to one module should be reflected in the others.
642405// TODO: Rename this module and the corresponding Fiber one to "Thenable"
0 commit comments