...**/!(*.map|*.min.js)Size
Gzip
Dependencies
Publish
Install
Publish
Install
@@ -1,6 +1,6 @@ | |||
| 1 | MIT License | 1 | MIT License |
| 2 | 2 | ||
| 3 | Copyright (c) Facebook, Inc. and its affiliates. | 3 | Copyright (c) Meta Platforms, Inc. and affiliates. |
| 4 | 4 | ||
| 5 | Permission is hereby granted, free of charge, to any person obtaining a copy | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy |
| 6 | of this software and associated documentation files (the "Software"), to deal | 6 | of this software and associated documentation files (the "Software"), to deal |
@@ -1,7 +1,7 @@ | |||
| 1 | 'use strict'; | 1 | 'use strict'; |
| 2 | 2 | ||
| 3 | if (process.env.NODE_ENV === 'production') { | 3 | if (process.env.NODE_ENV === 'production') { |
| 4 | module.exports = require('./cjs/react.production.min.js'); | 4 | module.exports = require('./cjs/react.production.js'); |
| 5 | } else { | 5 | } else { |
| 6 | module.exports = require('./cjs/react.development.js'); | 6 | module.exports = require('./cjs/react.development.js'); |
| 7 | } | 7 | } |
@@ -1,7 +1,7 @@ | |||
| 1 | 'use strict'; | 1 | 'use strict'; |
| 2 | 2 | ||
| 3 | if (process.env.NODE_ENV === 'production') { | 3 | if (process.env.NODE_ENV === 'production') { |
| 4 | module.exports = require('./cjs/react-jsx-dev-runtime.production.min.js'); | 4 | module.exports = require('./cjs/react-jsx-dev-runtime.production.js'); |
| 5 | } else { | 5 | } else { |
| 6 | module.exports = require('./cjs/react-jsx-dev-runtime.development.js'); | 6 | module.exports = require('./cjs/react-jsx-dev-runtime.development.js'); |
| 7 | } | 7 | } |
@@ -1,7 +1,7 @@ | |||
| 1 | 'use strict'; | 1 | 'use strict'; |
| 2 | 2 | ||
| 3 | if (process.env.NODE_ENV === 'production') { | 3 | if (process.env.NODE_ENV === 'production') { |
| 4 | module.exports = require('./cjs/react-jsx-runtime.production.min.js'); | 4 | module.exports = require('./cjs/react-jsx-runtime.production.js'); |
| 5 | } else { | 5 | } else { |
| 6 | module.exports = require('./cjs/react-jsx-runtime.development.js'); | 6 | module.exports = require('./cjs/react-jsx-runtime.development.js'); |
| 7 | } | 7 | } |
@@ -4,8 +4,8 @@ | |||
| 4 | "keywords": [ | 4 | "keywords": [ |
| 5 | "react" | 5 | "react" |
| 6 | ], | 6 | ], |
| 7 | "version": "18.3.1", | ||
| 8 | "homepage": "https://reactjs.org/", | 7 | "version": "19.0.0", |
| 8 | "homepage": "https://react.dev/", | ||
| 9 | "bugs": "https://github.com/facebook/react/issues", | 9 | "bugs": "https://github.com/facebook/react/issues", |
| 10 | "license": "MIT", | 10 | "license": "MIT", |
| 11 | "files": [ | 11 | "files": [ |
@@ -13,20 +13,32 @@ | |||
| 13 | "README.md", | 13 | "README.md", |
| 14 | "index.js", | 14 | "index.js", |
| 15 | "cjs/", | 15 | "cjs/", |
| 16 | "umd/", | 16 | "compiler-runtime.js", |
| 17 | "jsx-runtime.js", | 17 | "jsx-runtime.js", |
| 18 | "jsx-runtime.react-server.js", | ||
| 18 | "jsx-dev-runtime.js", | 19 | "jsx-dev-runtime.js", |
| 19 | "react.shared-subset.js" | 20 | "jsx-dev-runtime.react-server.js", |
| 21 | "react.react-server.js" | ||
| 20 | ], | 22 | ], |
| 21 | "main": "index.js", | 23 | "main": "index.js", |
| 22 | "exports": { | 24 | "exports": { |
| 23 | ".": { | 25 | ".": { |
| 24 | "react-server": "./react.shared-subset.js", | 26 | "react-server": "./react.react-server.js", |
| 25 | "default": "./index.js" | 27 | "default": "./index.js" |
| 26 | }, | 28 | }, |
| 27 | "./package.json": "./package.json", | 29 | "./package.json": "./package.json", |
| 28 | "./jsx-runtime": "./jsx-runtime.js", | ||
| 29 | "./jsx-dev-runtime": "./jsx-dev-runtime.js" | 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 | } | ||
| 30 | }, | 42 | }, |
| 31 | "repository": { | 43 | "repository": { |
| 32 | "type": "git", | 44 | "type": "git", |
@@ -35,13 +47,5 @@ | |||
| 35 | }, | 47 | }, |
| 36 | "engines": { | 48 | "engines": { |
| 37 | "node": ">=0.10.0" | 49 | "node": ">=0.10.0" |
| 38 | }, | ||
| 39 | "dependencies": { | ||
| 40 | "loose-envify": "^1.1.0" | ||
| 41 | }, | ||
| 42 | "browserify": { | ||
| 43 | "transform": [ | ||
| 44 | "loose-envify" | ||
| 45 | ] | ||
| 46 | } | 50 | } |
| 47 | } | 51 | } |
@@ -25,13 +25,13 @@ | |||
| 25 | } | 25 | } |
| 26 | 26 | ||
| 27 | const root = createRoot(document.getElementById('root')); | 27 | const root = createRoot(document.getElementById('root')); |
| 28 | root.render(<App />); | 28 | root.render(<Counter />); |
| 29 | ``` | 29 | ``` |
| 30 | 30 | ||
| 31 | ## Documentation | 31 | ## Documentation |
| 32 | 32 | ||
| 33 | See https://reactjs.org/ | 33 | See https://react.dev/ |
| 34 | 34 | ||
| 35 | ## API | 35 | ## API |
| 36 | 36 | ||
| 37 | See https://reactjs.org/docs/react-api.html | 37 | See https://react.dev/reference/react |
@@ -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 | } |
@@ -0,0 +1,24 @@ | |
| 1 | /** |
| 2 | * @license React |
| 3 | * react-compiler-runtime.development.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 | "production" !== process.env.NODE_ENV && |
| 13 | (function () { |
| 14 | var ReactSharedInternals = |
| 15 | require("react").__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE; |
| 16 | exports.c = function (size) { |
| 17 | var dispatcher = ReactSharedInternals.H; |
| 18 | null === dispatcher && |
| 19 | console.error( |
| 20 | "Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:\n1. You might have mismatching versions of React and the renderer (such as React DOM)\n2. You might be breaking the Rules of Hooks\n3. You might have more than one copy of React in the same app\nSee https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem." |
| 21 | ); |
| 22 | return dispatcher.useMemoCache(size); |
| 23 | }; |
| 24 | })(); |
@@ -0,0 +1,16 @@ | |
| 1 | /** |
| 2 | * @license React |
| 3 | * react-compiler-runtime.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 = |
| 13 | require("react").__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE; |
| 14 | exports.c = function (size) { |
| 15 | return ReactSharedInternals.H.useMemoCache(size); |
| 16 | }; |
@@ -0,0 +1,16 @@ | |
| 1 | /** |
| 2 | * @license React |
| 3 | * react-compiler-runtime.profiling.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 = |
| 13 | require("react").__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE; |
| 14 | exports.c = function (size) { |
| 15 | return ReactSharedInternals.H.useMemoCache(size); |
| 16 | }; |
@@ -0,0 +1,14 @@ | |
| 1 | /** |
| 2 | * @license React |
| 3 | * react-jsx-dev-runtime.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 REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"); |
| 13 | exports.Fragment = REACT_FRAGMENT_TYPE; |
| 14 | exports.jsxDEV = void 0; |
@@ -0,0 +1,14 @@ | |
| 1 | /** |
| 2 | * @license React |
| 3 | * react-jsx-dev-runtime.profiling.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 REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"); |
| 13 | exports.Fragment = REACT_FRAGMENT_TYPE; |
| 14 | exports.jsxDEV = void 0; |
@@ -0,0 +1,40 @@ | |
| 1 | /** |
| 2 | * @license React |
| 3 | * react-jsx-dev-runtime.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 React = require("react"), |
| 13 | REACT_ELEMENT_TYPE = Symbol.for("react.transitional.element"), |
| 14 | REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"); |
| 15 | if (!React.__SERVER_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE) |
| 16 | throw Error( |
| 17 | 'The "react" package in this environment is not configured correctly. The "react-server" condition must be enabled in any environment that runs React Server Components.' |
| 18 | ); |
| 19 | function jsxProd(type, config, maybeKey) { |
| 20 | var key = null; |
| 21 | void 0 !== maybeKey && (key = "" + maybeKey); |
| 22 | void 0 !== config.key && (key = "" + config.key); |
| 23 | if ("key" in config) { |
| 24 | maybeKey = {}; |
| 25 | for (var propName in config) |
| 26 | "key" !== propName && (maybeKey[propName] = config[propName]); |
| 27 | } else maybeKey = config; |
| 28 | config = maybeKey.ref; |
| 29 | return { |
| 30 | $$typeof: REACT_ELEMENT_TYPE, |
| 31 | type: type, |
| 32 | key: key, |
| 33 | ref: void 0 !== config ? config : null, |
| 34 | props: maybeKey |
| 35 | }; |
| 36 | } |
| 37 | exports.Fragment = REACT_FRAGMENT_TYPE; |
| 38 | exports.jsx = jsxProd; |
| 39 | exports.jsxDEV = void 0; |
| 40 | exports.jsxs = jsxProd; |
@@ -0,0 +1,34 @@ | |
| 1 | /** |
| 2 | * @license React |
| 3 | * react-jsx-runtime.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 REACT_ELEMENT_TYPE = Symbol.for("react.transitional.element"), |
| 13 | REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"); |
| 14 | function jsxProd(type, config, maybeKey) { |
| 15 | var key = null; |
| 16 | void 0 !== maybeKey && (key = "" + maybeKey); |
| 17 | void 0 !== config.key && (key = "" + config.key); |
| 18 | if ("key" in config) { |
| 19 | maybeKey = {}; |
| 20 | for (var propName in config) |
| 21 | "key" !== propName && (maybeKey[propName] = config[propName]); |
| 22 | } else maybeKey = config; |
| 23 | config = maybeKey.ref; |
| 24 | return { |
| 25 | $$typeof: REACT_ELEMENT_TYPE, |
| 26 | type: type, |
| 27 | key: key, |
| 28 | ref: void 0 !== config ? config : null, |
| 29 | props: maybeKey |
| 30 | }; |
| 31 | } |
| 32 | exports.Fragment = REACT_FRAGMENT_TYPE; |
| 33 | exports.jsx = jsxProd; |
| 34 | exports.jsxs = jsxProd; |
@@ -0,0 +1,34 @@ | |
| 1 | /** |
| 2 | * @license React |
| 3 | * react-jsx-runtime.profiling.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 REACT_ELEMENT_TYPE = Symbol.for("react.transitional.element"), |
| 13 | REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"); |
| 14 | function jsxProd(type, config, maybeKey) { |
| 15 | var key = null; |
| 16 | void 0 !== maybeKey && (key = "" + maybeKey); |
| 17 | void 0 !== config.key && (key = "" + config.key); |
| 18 | if ("key" in config) { |
| 19 | maybeKey = {}; |
| 20 | for (var propName in config) |
| 21 | "key" !== propName && (maybeKey[propName] = config[propName]); |
| 22 | } else maybeKey = config; |
| 23 | config = maybeKey.ref; |
| 24 | return { |
| 25 | $$typeof: REACT_ELEMENT_TYPE, |
| 26 | type: type, |
| 27 | key: key, |
| 28 | ref: void 0 !== config ? config : null, |
| 29 | props: maybeKey |
| 30 | }; |
| 31 | } |
| 32 | exports.Fragment = REACT_FRAGMENT_TYPE; |
| 33 | exports.jsx = jsxProd; |
| 34 | exports.jsxs = jsxProd; |
@@ -0,0 +1,40 @@ | |
| 1 | /** |
| 2 | * @license React |
| 3 | * react-jsx-runtime.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 React = require("react"), |
| 13 | REACT_ELEMENT_TYPE = Symbol.for("react.transitional.element"), |
| 14 | REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"); |
| 15 | if (!React.__SERVER_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE) |
| 16 | throw Error( |
| 17 | 'The "react" package in this environment is not configured correctly. The "react-server" condition must be enabled in any environment that runs React Server Components.' |
| 18 | ); |
| 19 | function jsxProd(type, config, maybeKey) { |
| 20 | var key = null; |
| 21 | void 0 !== maybeKey && (key = "" + maybeKey); |
| 22 | void 0 !== config.key && (key = "" + config.key); |
| 23 | if ("key" in config) { |
| 24 | maybeKey = {}; |
| 25 | for (var propName in config) |
| 26 | "key" !== propName && (maybeKey[propName] = config[propName]); |
| 27 | } else maybeKey = config; |
| 28 | config = maybeKey.ref; |
| 29 | return { |
| 30 | $$typeof: REACT_ELEMENT_TYPE, |
| 31 | type: type, |
| 32 | key: key, |
| 33 | ref: void 0 !== config ? config : null, |
| 34 | props: maybeKey |
| 35 | }; |
| 36 | } |
| 37 | exports.Fragment = REACT_FRAGMENT_TYPE; |
| 38 | exports.jsx = jsxProd; |
| 39 | exports.jsxDEV = void 0; |
| 40 | exports.jsxs = jsxProd; |