Skip to content

Commit 9e5b8af

Browse files
committed
Update compiled-rn destination paths to vendor/react (#28989)
I'm changing the destination paths in fbsource from `vendor/*` to `vendor/react/*`. DiffTrain build for commit 46abd7b.
1 parent 01110ac commit 9e5b8af

21 files changed

+54750
-1
lines changed
Lines changed: 201 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,201 @@
1+
/**
2+
* Copyright (c) Meta Platforms, Inc. and affiliates.
3+
*
4+
* This source code is licensed under the MIT license found in the
5+
* LICENSE file in the root directory of this source tree.
6+
*
7+
* @noflow
8+
* @nolint
9+
* @preventMunge
10+
* @generated SignedSource<<cc5ff8fe75f7cb7812ce459378d61959>>
11+
*/
12+
13+
'use strict';
14+
15+
if (__DEV__) {
16+
(function() {
17+
'use strict';
18+
19+
// Re-export dynamic flags from the internal module.
20+
var enableDebugTracing = false;
21+
var enableRenderableContext = true;
22+
var enableScopeAPI = false;
23+
var enableLegacyHidden = false;
24+
var enableTransitionTracing = false;
25+
26+
// When adding new symbols to this file,
27+
// Please consider also adding to 'react-devtools-shared/src/backend/ReactSymbols'
28+
// The Symbol used to tag the ReactElement-like types.
29+
30+
var REACT_LEGACY_ELEMENT_TYPE = Symbol.for('react.element');
31+
var REACT_ELEMENT_TYPE = REACT_LEGACY_ELEMENT_TYPE;
32+
var REACT_PORTAL_TYPE = Symbol.for('react.portal');
33+
var REACT_FRAGMENT_TYPE = Symbol.for('react.fragment');
34+
var REACT_STRICT_MODE_TYPE = Symbol.for('react.strict_mode');
35+
var REACT_PROFILER_TYPE = Symbol.for('react.profiler');
36+
var REACT_PROVIDER_TYPE = Symbol.for('react.provider'); // TODO: Delete with enableRenderableContext
37+
38+
var REACT_CONSUMER_TYPE = Symbol.for('react.consumer');
39+
var REACT_CONTEXT_TYPE = Symbol.for('react.context');
40+
var REACT_FORWARD_REF_TYPE = Symbol.for('react.forward_ref');
41+
var REACT_SUSPENSE_TYPE = Symbol.for('react.suspense');
42+
var REACT_SUSPENSE_LIST_TYPE = Symbol.for('react.suspense_list');
43+
var REACT_MEMO_TYPE = Symbol.for('react.memo');
44+
var REACT_LAZY_TYPE = Symbol.for('react.lazy');
45+
var REACT_OFFSCREEN_TYPE = Symbol.for('react.offscreen');
46+
47+
var REACT_CLIENT_REFERENCE = Symbol.for('react.client.reference');
48+
function isValidElementType(type) {
49+
if (typeof type === 'string' || typeof type === 'function') {
50+
return true;
51+
} // Note: typeof might be other than 'symbol' or 'number' (e.g. if it's a polyfill).
52+
53+
54+
if (type === REACT_FRAGMENT_TYPE || type === REACT_PROFILER_TYPE || enableDebugTracing || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || enableLegacyHidden || type === REACT_OFFSCREEN_TYPE || enableScopeAPI || enableTransitionTracing ) {
55+
return true;
56+
}
57+
58+
if (typeof type === 'object' && type !== null) {
59+
if (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || !enableRenderableContext || type.$$typeof === REACT_CONSUMER_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || // This needs to include all possible module reference object
60+
// types supported by any Flight configuration anywhere since
61+
// we don't know which Flight build this will end up being used
62+
// with.
63+
type.$$typeof === REACT_CLIENT_REFERENCE || type.getModuleId !== undefined) {
64+
return true;
65+
}
66+
}
67+
68+
return false;
69+
}
70+
71+
function typeOf(object) {
72+
if (typeof object === 'object' && object !== null) {
73+
var $$typeof = object.$$typeof;
74+
75+
switch ($$typeof) {
76+
case REACT_ELEMENT_TYPE:
77+
var type = object.type;
78+
79+
switch (type) {
80+
case REACT_FRAGMENT_TYPE:
81+
case REACT_PROFILER_TYPE:
82+
case REACT_STRICT_MODE_TYPE:
83+
case REACT_SUSPENSE_TYPE:
84+
case REACT_SUSPENSE_LIST_TYPE:
85+
return type;
86+
87+
default:
88+
var $$typeofType = type && type.$$typeof;
89+
90+
switch ($$typeofType) {
91+
case REACT_CONTEXT_TYPE:
92+
case REACT_FORWARD_REF_TYPE:
93+
case REACT_LAZY_TYPE:
94+
case REACT_MEMO_TYPE:
95+
return $$typeofType;
96+
97+
case REACT_CONSUMER_TYPE:
98+
{
99+
return $$typeofType;
100+
}
101+
102+
// Fall through
103+
104+
case REACT_PROVIDER_TYPE:
105+
106+
// Fall through
107+
108+
default:
109+
return $$typeof;
110+
}
111+
112+
}
113+
114+
case REACT_PORTAL_TYPE:
115+
return $$typeof;
116+
}
117+
}
118+
119+
return undefined;
120+
}
121+
var ContextConsumer = REACT_CONSUMER_TYPE ;
122+
var ContextProvider = REACT_CONTEXT_TYPE ;
123+
var Element = REACT_ELEMENT_TYPE;
124+
var ForwardRef = REACT_FORWARD_REF_TYPE;
125+
var Fragment = REACT_FRAGMENT_TYPE;
126+
var Lazy = REACT_LAZY_TYPE;
127+
var Memo = REACT_MEMO_TYPE;
128+
var Portal = REACT_PORTAL_TYPE;
129+
var Profiler = REACT_PROFILER_TYPE;
130+
var StrictMode = REACT_STRICT_MODE_TYPE;
131+
var Suspense = REACT_SUSPENSE_TYPE;
132+
var SuspenseList = REACT_SUSPENSE_LIST_TYPE;
133+
function isContextConsumer(object) {
134+
{
135+
return typeOf(object) === REACT_CONSUMER_TYPE;
136+
}
137+
}
138+
function isContextProvider(object) {
139+
{
140+
return typeOf(object) === REACT_CONTEXT_TYPE;
141+
}
142+
}
143+
function isElement(object) {
144+
return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
145+
}
146+
function isForwardRef(object) {
147+
return typeOf(object) === REACT_FORWARD_REF_TYPE;
148+
}
149+
function isFragment(object) {
150+
return typeOf(object) === REACT_FRAGMENT_TYPE;
151+
}
152+
function isLazy(object) {
153+
return typeOf(object) === REACT_LAZY_TYPE;
154+
}
155+
function isMemo(object) {
156+
return typeOf(object) === REACT_MEMO_TYPE;
157+
}
158+
function isPortal(object) {
159+
return typeOf(object) === REACT_PORTAL_TYPE;
160+
}
161+
function isProfiler(object) {
162+
return typeOf(object) === REACT_PROFILER_TYPE;
163+
}
164+
function isStrictMode(object) {
165+
return typeOf(object) === REACT_STRICT_MODE_TYPE;
166+
}
167+
function isSuspense(object) {
168+
return typeOf(object) === REACT_SUSPENSE_TYPE;
169+
}
170+
function isSuspenseList(object) {
171+
return typeOf(object) === REACT_SUSPENSE_LIST_TYPE;
172+
}
173+
174+
exports.ContextConsumer = ContextConsumer;
175+
exports.ContextProvider = ContextProvider;
176+
exports.Element = Element;
177+
exports.ForwardRef = ForwardRef;
178+
exports.Fragment = Fragment;
179+
exports.Lazy = Lazy;
180+
exports.Memo = Memo;
181+
exports.Portal = Portal;
182+
exports.Profiler = Profiler;
183+
exports.StrictMode = StrictMode;
184+
exports.Suspense = Suspense;
185+
exports.SuspenseList = SuspenseList;
186+
exports.isContextConsumer = isContextConsumer;
187+
exports.isContextProvider = isContextProvider;
188+
exports.isElement = isElement;
189+
exports.isForwardRef = isForwardRef;
190+
exports.isFragment = isFragment;
191+
exports.isLazy = isLazy;
192+
exports.isMemo = isMemo;
193+
exports.isPortal = isPortal;
194+
exports.isProfiler = isProfiler;
195+
exports.isStrictMode = isStrictMode;
196+
exports.isSuspense = isSuspense;
197+
exports.isSuspenseList = isSuspenseList;
198+
exports.isValidElementType = isValidElementType;
199+
exports.typeOf = typeOf;
200+
})();
201+
}
Lines changed: 132 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,132 @@
1+
/**
2+
* Copyright (c) Meta Platforms, Inc. and affiliates.
3+
*
4+
* This source code is licensed under the MIT license found in the
5+
* LICENSE file in the root directory of this source tree.
6+
*
7+
* @noflow
8+
* @nolint
9+
* @preventMunge
10+
* @generated SignedSource<<b5f0f82fdd9d6e3043c1259e7ffcf255>>
11+
*/
12+
13+
"use strict";
14+
var REACT_LEGACY_ELEMENT_TYPE = Symbol.for("react.element"),
15+
REACT_PORTAL_TYPE = Symbol.for("react.portal"),
16+
REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"),
17+
REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode"),
18+
REACT_PROFILER_TYPE = Symbol.for("react.profiler");
19+
Symbol.for("react.provider");
20+
var REACT_CONSUMER_TYPE = Symbol.for("react.consumer"),
21+
REACT_CONTEXT_TYPE = Symbol.for("react.context"),
22+
REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref"),
23+
REACT_SUSPENSE_TYPE = Symbol.for("react.suspense"),
24+
REACT_SUSPENSE_LIST_TYPE = Symbol.for("react.suspense_list"),
25+
REACT_MEMO_TYPE = Symbol.for("react.memo"),
26+
REACT_LAZY_TYPE = Symbol.for("react.lazy"),
27+
REACT_OFFSCREEN_TYPE = Symbol.for("react.offscreen"),
28+
REACT_CLIENT_REFERENCE = Symbol.for("react.client.reference");
29+
function typeOf(object) {
30+
if ("object" === typeof object && null !== object) {
31+
var $$typeof = object.$$typeof;
32+
switch ($$typeof) {
33+
case REACT_LEGACY_ELEMENT_TYPE:
34+
switch (((object = object.type), object)) {
35+
case REACT_FRAGMENT_TYPE:
36+
case REACT_PROFILER_TYPE:
37+
case REACT_STRICT_MODE_TYPE:
38+
case REACT_SUSPENSE_TYPE:
39+
case REACT_SUSPENSE_LIST_TYPE:
40+
return object;
41+
default:
42+
switch (((object = object && object.$$typeof), object)) {
43+
case REACT_CONTEXT_TYPE:
44+
case REACT_FORWARD_REF_TYPE:
45+
case REACT_LAZY_TYPE:
46+
case REACT_MEMO_TYPE:
47+
return object;
48+
case REACT_CONSUMER_TYPE:
49+
return object;
50+
default:
51+
return $$typeof;
52+
}
53+
}
54+
case REACT_PORTAL_TYPE:
55+
return $$typeof;
56+
}
57+
}
58+
}
59+
exports.ContextConsumer = REACT_CONSUMER_TYPE;
60+
exports.ContextProvider = REACT_CONTEXT_TYPE;
61+
exports.Element = REACT_LEGACY_ELEMENT_TYPE;
62+
exports.ForwardRef = REACT_FORWARD_REF_TYPE;
63+
exports.Fragment = REACT_FRAGMENT_TYPE;
64+
exports.Lazy = REACT_LAZY_TYPE;
65+
exports.Memo = REACT_MEMO_TYPE;
66+
exports.Portal = REACT_PORTAL_TYPE;
67+
exports.Profiler = REACT_PROFILER_TYPE;
68+
exports.StrictMode = REACT_STRICT_MODE_TYPE;
69+
exports.Suspense = REACT_SUSPENSE_TYPE;
70+
exports.SuspenseList = REACT_SUSPENSE_LIST_TYPE;
71+
exports.isContextConsumer = function (object) {
72+
return typeOf(object) === REACT_CONSUMER_TYPE;
73+
};
74+
exports.isContextProvider = function (object) {
75+
return typeOf(object) === REACT_CONTEXT_TYPE;
76+
};
77+
exports.isElement = function (object) {
78+
return (
79+
"object" === typeof object &&
80+
null !== object &&
81+
object.$$typeof === REACT_LEGACY_ELEMENT_TYPE
82+
);
83+
};
84+
exports.isForwardRef = function (object) {
85+
return typeOf(object) === REACT_FORWARD_REF_TYPE;
86+
};
87+
exports.isFragment = function (object) {
88+
return typeOf(object) === REACT_FRAGMENT_TYPE;
89+
};
90+
exports.isLazy = function (object) {
91+
return typeOf(object) === REACT_LAZY_TYPE;
92+
};
93+
exports.isMemo = function (object) {
94+
return typeOf(object) === REACT_MEMO_TYPE;
95+
};
96+
exports.isPortal = function (object) {
97+
return typeOf(object) === REACT_PORTAL_TYPE;
98+
};
99+
exports.isProfiler = function (object) {
100+
return typeOf(object) === REACT_PROFILER_TYPE;
101+
};
102+
exports.isStrictMode = function (object) {
103+
return typeOf(object) === REACT_STRICT_MODE_TYPE;
104+
};
105+
exports.isSuspense = function (object) {
106+
return typeOf(object) === REACT_SUSPENSE_TYPE;
107+
};
108+
exports.isSuspenseList = function (object) {
109+
return typeOf(object) === REACT_SUSPENSE_LIST_TYPE;
110+
};
111+
exports.isValidElementType = function (type) {
112+
return "string" === typeof type ||
113+
"function" === typeof type ||
114+
type === REACT_FRAGMENT_TYPE ||
115+
type === REACT_PROFILER_TYPE ||
116+
type === REACT_STRICT_MODE_TYPE ||
117+
type === REACT_SUSPENSE_TYPE ||
118+
type === REACT_SUSPENSE_LIST_TYPE ||
119+
type === REACT_OFFSCREEN_TYPE ||
120+
("object" === typeof type &&
121+
null !== type &&
122+
(type.$$typeof === REACT_LAZY_TYPE ||
123+
type.$$typeof === REACT_MEMO_TYPE ||
124+
type.$$typeof === REACT_CONTEXT_TYPE ||
125+
type.$$typeof === REACT_CONSUMER_TYPE ||
126+
type.$$typeof === REACT_FORWARD_REF_TYPE ||
127+
type.$$typeof === REACT_CLIENT_REFERENCE ||
128+
void 0 !== type.getModuleId))
129+
? !0
130+
: !1;
131+
};
132+
exports.typeOf = typeOf;

0 commit comments

Comments
 (0)