@linyjs/plugin-docs 0.1.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.
- package/README.md +97 -0
- package/docs/api-reference/index.md +341 -0
- package/docs/best-practices/error-handling.md +462 -0
- package/docs/best-practices/naming-conventions.md +495 -0
- package/docs/best-practices/performance.md +532 -0
- package/docs/best-practices/security.md +620 -0
- package/docs/faq.md +323 -0
- package/docs/getting-started/first-plugin.md +358 -0
- package/docs/getting-started/installation.md +244 -0
- package/docs/getting-started/quick-start.md +174 -0
- package/docs/guides/client-module.md +598 -0
- package/docs/guides/data-persistence.md +536 -0
- package/docs/guides/permissions.md +440 -0
- package/docs/guides/server-module.md +371 -0
- package/docs/guides/ui-slots.md +475 -0
- package/docs/migration/v0-to-v1.md +354 -0
- package/examples/analytics-plugin/README.md +416 -0
- package/examples/analytics-plugin/dist/client/index.d.ts +36 -0
- package/examples/analytics-plugin/dist/client/index.js +173 -0
- package/examples/analytics-plugin/dist/index.d.ts +64 -0
- package/examples/analytics-plugin/dist/index.js +72 -0
- package/examples/analytics-plugin/dist/server/index.d.ts +119 -0
- package/examples/analytics-plugin/dist/server/index.js +313 -0
- package/examples/analytics-plugin/package.json +28 -0
- package/examples/analytics-plugin/src/client/index.tsx +410 -0
- package/examples/analytics-plugin/src/index.ts +71 -0
- package/examples/analytics-plugin/src/server/index.ts +348 -0
- package/examples/analytics-plugin/tsconfig.json +21 -0
- package/examples/blog-plugin/README.md +316 -0
- package/examples/blog-plugin/dist/client/index.d.ts +22 -0
- package/examples/blog-plugin/dist/client/index.js +197 -0
- package/examples/blog-plugin/dist/server/index.d.ts +5 -0
- package/examples/blog-plugin/dist/server/index.js +220 -0
- package/examples/blog-plugin/package.json +24 -0
- package/examples/blog-plugin/src/client/index.tsx +405 -0
- package/examples/blog-plugin/src/server/index.ts +240 -0
- package/examples/blog-plugin/tsconfig.json +16 -0
- package/examples/hello-world/README.md +101 -0
- package/examples/hello-world/dist/client/index.d.ts +5 -0
- package/examples/hello-world/dist/client/index.js +80 -0
- package/examples/hello-world/dist/server/index.d.ts +5 -0
- package/examples/hello-world/dist/server/index.js +38 -0
- package/examples/hello-world/node_modules/.package-lock.json +61 -0
- package/examples/hello-world/node_modules/@linyjs/client-module-interface/HOOKS_USAGE.md +281 -0
- package/examples/hello-world/node_modules/@linyjs/client-module-interface/IMPLEMENTATION_SUMMARY.md +166 -0
- package/examples/hello-world/node_modules/@linyjs/client-module-interface/QUICK_REFERENCE.md +130 -0
- package/examples/hello-world/node_modules/@linyjs/client-module-interface/README.md +214 -0
- package/examples/hello-world/node_modules/@linyjs/client-module-interface/package.json +26 -0
- package/examples/hello-world/node_modules/@linyjs/client-module-interface/src/application.ts +50 -0
- package/examples/hello-world/node_modules/@linyjs/client-module-interface/src/comparison-example.tsx +229 -0
- package/examples/hello-world/node_modules/@linyjs/client-module-interface/src/di.ts +127 -0
- package/examples/hello-world/node_modules/@linyjs/client-module-interface/src/domain.ts +52 -0
- package/examples/hello-world/node_modules/@linyjs/client-module-interface/src/hooks-example.tsx +275 -0
- package/examples/hello-world/node_modules/@linyjs/client-module-interface/src/hooks.ts +175 -0
- package/examples/hello-world/node_modules/@linyjs/client-module-interface/src/index.ts +87 -0
- package/examples/hello-world/node_modules/@linyjs/client-module-interface/src/interfaces.ts +117 -0
- package/examples/hello-world/node_modules/@linyjs/client-module-interface/src/router.ts +49 -0
- package/examples/hello-world/node_modules/@linyjs/client-module-interface/tsconfig.json +10 -0
- package/examples/hello-world/node_modules/@linyjs/server-module-interface/package.json +21 -0
- package/examples/hello-world/node_modules/@linyjs/server-module-interface/src/application.ts +21 -0
- package/examples/hello-world/node_modules/@linyjs/server-module-interface/src/di.ts +127 -0
- package/examples/hello-world/node_modules/@linyjs/server-module-interface/src/domain.ts +75 -0
- package/examples/hello-world/node_modules/@linyjs/server-module-interface/src/index.ts +55 -0
- package/examples/hello-world/node_modules/@linyjs/server-module-interface/src/interfaces.ts +58 -0
- package/examples/hello-world/node_modules/@linyjs/server-module-interface/tsconfig.json +8 -0
- package/examples/hello-world/node_modules/@types/react/LICENSE +21 -0
- package/examples/hello-world/node_modules/@types/react/README.md +15 -0
- package/examples/hello-world/node_modules/@types/react/canary.d.ts +129 -0
- package/examples/hello-world/node_modules/@types/react/compiler-runtime.d.ts +4 -0
- package/examples/hello-world/node_modules/@types/react/experimental.d.ts +184 -0
- package/examples/hello-world/node_modules/@types/react/global.d.ts +166 -0
- package/examples/hello-world/node_modules/@types/react/index.d.ts +4369 -0
- package/examples/hello-world/node_modules/@types/react/jsx-dev-runtime.d.ts +33 -0
- package/examples/hello-world/node_modules/@types/react/jsx-runtime.d.ts +24 -0
- package/examples/hello-world/node_modules/@types/react/package.json +210 -0
- package/examples/hello-world/node_modules/@types/react/ts5.0/canary.d.ts +129 -0
- package/examples/hello-world/node_modules/@types/react/ts5.0/experimental.d.ts +184 -0
- package/examples/hello-world/node_modules/@types/react/ts5.0/global.d.ts +166 -0
- package/examples/hello-world/node_modules/@types/react/ts5.0/index.d.ts +4356 -0
- package/examples/hello-world/node_modules/@types/react/ts5.0/jsx-dev-runtime.d.ts +33 -0
- package/examples/hello-world/node_modules/@types/react/ts5.0/jsx-runtime.d.ts +24 -0
- package/examples/hello-world/node_modules/csstype/LICENSE +19 -0
- package/examples/hello-world/node_modules/csstype/README.md +291 -0
- package/examples/hello-world/node_modules/csstype/index.d.ts +22569 -0
- package/examples/hello-world/node_modules/csstype/index.js.flow +6863 -0
- package/examples/hello-world/node_modules/csstype/package.json +70 -0
- package/examples/hello-world/node_modules/react/LICENSE +21 -0
- package/examples/hello-world/node_modules/react/README.md +37 -0
- package/examples/hello-world/node_modules/react/cjs/react-compiler-runtime.development.js +24 -0
- package/examples/hello-world/node_modules/react/cjs/react-compiler-runtime.production.js +16 -0
- package/examples/hello-world/node_modules/react/cjs/react-compiler-runtime.profiling.js +16 -0
- package/examples/hello-world/node_modules/react/cjs/react-jsx-dev-runtime.development.js +338 -0
- package/examples/hello-world/node_modules/react/cjs/react-jsx-dev-runtime.production.js +14 -0
- package/examples/hello-world/node_modules/react/cjs/react-jsx-dev-runtime.profiling.js +14 -0
- package/examples/hello-world/node_modules/react/cjs/react-jsx-dev-runtime.react-server.development.js +370 -0
- package/examples/hello-world/node_modules/react/cjs/react-jsx-dev-runtime.react-server.production.js +40 -0
- package/examples/hello-world/node_modules/react/cjs/react-jsx-runtime.development.js +352 -0
- package/examples/hello-world/node_modules/react/cjs/react-jsx-runtime.production.js +34 -0
- package/examples/hello-world/node_modules/react/cjs/react-jsx-runtime.profiling.js +34 -0
- package/examples/hello-world/node_modules/react/cjs/react-jsx-runtime.react-server.development.js +370 -0
- package/examples/hello-world/node_modules/react/cjs/react-jsx-runtime.react-server.production.js +40 -0
- package/examples/hello-world/node_modules/react/cjs/react.development.js +1284 -0
- package/examples/hello-world/node_modules/react/cjs/react.production.js +542 -0
- package/examples/hello-world/node_modules/react/cjs/react.react-server.development.js +848 -0
- package/examples/hello-world/node_modules/react/cjs/react.react-server.production.js +423 -0
- package/examples/hello-world/node_modules/react/compiler-runtime.js +14 -0
- package/examples/hello-world/node_modules/react/index.js +7 -0
- package/examples/hello-world/node_modules/react/jsx-dev-runtime.js +7 -0
- package/examples/hello-world/node_modules/react/jsx-dev-runtime.react-server.js +7 -0
- package/examples/hello-world/node_modules/react/jsx-runtime.js +7 -0
- package/examples/hello-world/node_modules/react/jsx-runtime.react-server.js +7 -0
- package/examples/hello-world/node_modules/react/package.json +51 -0
- package/examples/hello-world/node_modules/react/react.react-server.js +7 -0
- package/examples/hello-world/node_modules/typescript/LICENSE.txt +55 -0
- package/examples/hello-world/node_modules/typescript/README.md +50 -0
- package/examples/hello-world/node_modules/typescript/SECURITY.md +41 -0
- package/examples/hello-world/node_modules/typescript/ThirdPartyNoticeText.txt +193 -0
- package/examples/hello-world/node_modules/typescript/bin/tsc +2 -0
- package/examples/hello-world/node_modules/typescript/bin/tsserver +2 -0
- package/examples/hello-world/node_modules/typescript/lib/_tsc.js +133818 -0
- package/examples/hello-world/node_modules/typescript/lib/_tsserver.js +659 -0
- package/examples/hello-world/node_modules/typescript/lib/_typingsInstaller.js +222 -0
- package/examples/hello-world/node_modules/typescript/lib/cs/diagnosticMessages.generated.json +2122 -0
- package/examples/hello-world/node_modules/typescript/lib/de/diagnosticMessages.generated.json +2122 -0
- package/examples/hello-world/node_modules/typescript/lib/es/diagnosticMessages.generated.json +2122 -0
- package/examples/hello-world/node_modules/typescript/lib/fr/diagnosticMessages.generated.json +2122 -0
- package/examples/hello-world/node_modules/typescript/lib/it/diagnosticMessages.generated.json +2122 -0
- package/examples/hello-world/node_modules/typescript/lib/ja/diagnosticMessages.generated.json +2122 -0
- package/examples/hello-world/node_modules/typescript/lib/ko/diagnosticMessages.generated.json +2122 -0
- package/examples/hello-world/node_modules/typescript/lib/lib.d.ts +22 -0
- package/examples/hello-world/node_modules/typescript/lib/lib.decorators.d.ts +384 -0
- package/examples/hello-world/node_modules/typescript/lib/lib.decorators.legacy.d.ts +22 -0
- package/examples/hello-world/node_modules/typescript/lib/lib.dom.asynciterable.d.ts +41 -0
- package/examples/hello-world/node_modules/typescript/lib/lib.dom.d.ts +39429 -0
- package/examples/hello-world/node_modules/typescript/lib/lib.dom.iterable.d.ts +571 -0
- package/examples/hello-world/node_modules/typescript/lib/lib.es2015.collection.d.ts +147 -0
- package/examples/hello-world/node_modules/typescript/lib/lib.es2015.core.d.ts +597 -0
- package/examples/hello-world/node_modules/typescript/lib/lib.es2015.d.ts +28 -0
- package/examples/hello-world/node_modules/typescript/lib/lib.es2015.generator.d.ts +77 -0
- package/examples/hello-world/node_modules/typescript/lib/lib.es2015.iterable.d.ts +605 -0
- package/examples/hello-world/node_modules/typescript/lib/lib.es2015.promise.d.ts +81 -0
- package/examples/hello-world/node_modules/typescript/lib/lib.es2015.proxy.d.ts +128 -0
- package/examples/hello-world/node_modules/typescript/lib/lib.es2015.reflect.d.ts +144 -0
- package/examples/hello-world/node_modules/typescript/lib/lib.es2015.symbol.d.ts +46 -0
- package/examples/hello-world/node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts +326 -0
- package/examples/hello-world/node_modules/typescript/lib/lib.es2016.array.include.d.ts +116 -0
- package/examples/hello-world/node_modules/typescript/lib/lib.es2016.d.ts +21 -0
- package/examples/hello-world/node_modules/typescript/lib/lib.es2016.full.d.ts +23 -0
- package/examples/hello-world/node_modules/typescript/lib/lib.es2016.intl.d.ts +31 -0
- package/examples/hello-world/node_modules/typescript/lib/lib.es2017.arraybuffer.d.ts +21 -0
- package/examples/hello-world/node_modules/typescript/lib/lib.es2017.d.ts +26 -0
- package/examples/hello-world/node_modules/typescript/lib/lib.es2017.date.d.ts +31 -0
- package/examples/hello-world/node_modules/typescript/lib/lib.es2017.full.d.ts +23 -0
- package/examples/hello-world/node_modules/typescript/lib/lib.es2017.intl.d.ts +44 -0
- package/examples/hello-world/node_modules/typescript/lib/lib.es2017.object.d.ts +49 -0
- package/examples/hello-world/node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts +135 -0
- package/examples/hello-world/node_modules/typescript/lib/lib.es2017.string.d.ts +45 -0
- package/examples/hello-world/node_modules/typescript/lib/lib.es2017.typedarrays.d.ts +53 -0
- package/examples/hello-world/node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts +77 -0
- package/examples/hello-world/node_modules/typescript/lib/lib.es2018.asynciterable.d.ts +53 -0
- package/examples/hello-world/node_modules/typescript/lib/lib.es2018.d.ts +24 -0
- package/examples/hello-world/node_modules/typescript/lib/lib.es2018.full.d.ts +24 -0
- package/examples/hello-world/node_modules/typescript/lib/lib.es2018.intl.d.ts +83 -0
- package/examples/hello-world/node_modules/typescript/lib/lib.es2018.promise.d.ts +30 -0
- package/examples/hello-world/node_modules/typescript/lib/lib.es2018.regexp.d.ts +37 -0
- package/examples/hello-world/node_modules/typescript/lib/lib.es2019.array.d.ts +79 -0
- package/examples/hello-world/node_modules/typescript/lib/lib.es2019.d.ts +24 -0
- package/examples/hello-world/node_modules/typescript/lib/lib.es2019.full.d.ts +24 -0
- package/examples/hello-world/node_modules/typescript/lib/lib.es2019.intl.d.ts +23 -0
- package/examples/hello-world/node_modules/typescript/lib/lib.es2019.object.d.ts +33 -0
- package/examples/hello-world/node_modules/typescript/lib/lib.es2019.string.d.ts +37 -0
- package/examples/hello-world/node_modules/typescript/lib/lib.es2019.symbol.d.ts +24 -0
- package/examples/hello-world/node_modules/typescript/lib/lib.es2020.bigint.d.ts +765 -0
- package/examples/hello-world/node_modules/typescript/lib/lib.es2020.d.ts +27 -0
- package/examples/hello-world/node_modules/typescript/lib/lib.es2020.date.d.ts +42 -0
- package/examples/hello-world/node_modules/typescript/lib/lib.es2020.full.d.ts +24 -0
- package/examples/hello-world/node_modules/typescript/lib/lib.es2020.intl.d.ts +474 -0
- package/examples/hello-world/node_modules/typescript/lib/lib.es2020.number.d.ts +28 -0
- package/examples/hello-world/node_modules/typescript/lib/lib.es2020.promise.d.ts +47 -0
- package/examples/hello-world/node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts +99 -0
- package/examples/hello-world/node_modules/typescript/lib/lib.es2020.string.d.ts +44 -0
- package/examples/hello-world/node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts +41 -0
- package/examples/hello-world/node_modules/typescript/lib/lib.es2021.d.ts +23 -0
- package/examples/hello-world/node_modules/typescript/lib/lib.es2021.full.d.ts +24 -0
- package/examples/hello-world/node_modules/typescript/lib/lib.es2021.intl.d.ts +166 -0
- package/examples/hello-world/node_modules/typescript/lib/lib.es2021.promise.d.ts +48 -0
- package/examples/hello-world/node_modules/typescript/lib/lib.es2021.string.d.ts +33 -0
- package/examples/hello-world/node_modules/typescript/lib/lib.es2021.weakref.d.ts +78 -0
- package/examples/hello-world/node_modules/typescript/lib/lib.es2022.array.d.ts +121 -0
- package/examples/hello-world/node_modules/typescript/lib/lib.es2022.d.ts +25 -0
- package/examples/hello-world/node_modules/typescript/lib/lib.es2022.error.d.ts +75 -0
- package/examples/hello-world/node_modules/typescript/lib/lib.es2022.full.d.ts +24 -0
- package/examples/hello-world/node_modules/typescript/lib/lib.es2022.intl.d.ts +145 -0
- package/examples/hello-world/node_modules/typescript/lib/lib.es2022.object.d.ts +26 -0
- package/examples/hello-world/node_modules/typescript/lib/lib.es2022.regexp.d.ts +39 -0
- package/examples/hello-world/node_modules/typescript/lib/lib.es2022.string.d.ts +25 -0
- package/examples/hello-world/node_modules/typescript/lib/lib.es2023.array.d.ts +924 -0
- package/examples/hello-world/node_modules/typescript/lib/lib.es2023.collection.d.ts +21 -0
- package/examples/hello-world/node_modules/typescript/lib/lib.es2023.d.ts +22 -0
- package/examples/hello-world/node_modules/typescript/lib/lib.es2023.full.d.ts +24 -0
- package/examples/hello-world/node_modules/typescript/lib/lib.es2023.intl.d.ts +56 -0
- package/examples/hello-world/node_modules/typescript/lib/lib.es2024.arraybuffer.d.ts +65 -0
- package/examples/hello-world/node_modules/typescript/lib/lib.es2024.collection.d.ts +29 -0
- package/examples/hello-world/node_modules/typescript/lib/lib.es2024.d.ts +26 -0
- package/examples/hello-world/node_modules/typescript/lib/lib.es2024.full.d.ts +24 -0
- package/examples/hello-world/node_modules/typescript/lib/lib.es2024.object.d.ts +29 -0
- package/examples/hello-world/node_modules/typescript/lib/lib.es2024.promise.d.ts +35 -0
- package/examples/hello-world/node_modules/typescript/lib/lib.es2024.regexp.d.ts +25 -0
- package/examples/hello-world/node_modules/typescript/lib/lib.es2024.sharedmemory.d.ts +68 -0
- package/examples/hello-world/node_modules/typescript/lib/lib.es2024.string.d.ts +29 -0
- package/examples/hello-world/node_modules/typescript/lib/lib.es5.d.ts +4601 -0
- package/examples/hello-world/node_modules/typescript/lib/lib.es6.d.ts +23 -0
- package/examples/hello-world/node_modules/typescript/lib/lib.esnext.array.d.ts +35 -0
- package/examples/hello-world/node_modules/typescript/lib/lib.esnext.collection.d.ts +96 -0
- package/examples/hello-world/node_modules/typescript/lib/lib.esnext.d.ts +29 -0
- package/examples/hello-world/node_modules/typescript/lib/lib.esnext.decorators.d.ts +28 -0
- package/examples/hello-world/node_modules/typescript/lib/lib.esnext.disposable.d.ts +193 -0
- package/examples/hello-world/node_modules/typescript/lib/lib.esnext.error.d.ts +24 -0
- package/examples/hello-world/node_modules/typescript/lib/lib.esnext.float16.d.ts +445 -0
- package/examples/hello-world/node_modules/typescript/lib/lib.esnext.full.d.ts +24 -0
- package/examples/hello-world/node_modules/typescript/lib/lib.esnext.intl.d.ts +21 -0
- package/examples/hello-world/node_modules/typescript/lib/lib.esnext.iterator.d.ts +148 -0
- package/examples/hello-world/node_modules/typescript/lib/lib.esnext.promise.d.ts +34 -0
- package/examples/hello-world/node_modules/typescript/lib/lib.esnext.sharedmemory.d.ts +25 -0
- package/examples/hello-world/node_modules/typescript/lib/lib.scripthost.d.ts +322 -0
- package/examples/hello-world/node_modules/typescript/lib/lib.webworker.asynciterable.d.ts +41 -0
- package/examples/hello-world/node_modules/typescript/lib/lib.webworker.d.ts +13150 -0
- package/examples/hello-world/node_modules/typescript/lib/lib.webworker.importscripts.d.ts +23 -0
- package/examples/hello-world/node_modules/typescript/lib/lib.webworker.iterable.d.ts +340 -0
- package/examples/hello-world/node_modules/typescript/lib/pl/diagnosticMessages.generated.json +2122 -0
- package/examples/hello-world/node_modules/typescript/lib/pt-br/diagnosticMessages.generated.json +2122 -0
- package/examples/hello-world/node_modules/typescript/lib/ru/diagnosticMessages.generated.json +2122 -0
- package/examples/hello-world/node_modules/typescript/lib/tr/diagnosticMessages.generated.json +2122 -0
- package/examples/hello-world/node_modules/typescript/lib/tsc.js +8 -0
- package/examples/hello-world/node_modules/typescript/lib/tsserver.js +8 -0
- package/examples/hello-world/node_modules/typescript/lib/tsserverlibrary.d.ts +17 -0
- package/examples/hello-world/node_modules/typescript/lib/tsserverlibrary.js +21 -0
- package/examples/hello-world/node_modules/typescript/lib/typesMap.json +497 -0
- package/examples/hello-world/node_modules/typescript/lib/typescript.d.ts +11437 -0
- package/examples/hello-world/node_modules/typescript/lib/typescript.js +200276 -0
- package/examples/hello-world/node_modules/typescript/lib/typingsInstaller.js +8 -0
- package/examples/hello-world/node_modules/typescript/lib/watchGuard.js +53 -0
- package/examples/hello-world/node_modules/typescript/lib/zh-cn/diagnosticMessages.generated.json +2122 -0
- package/examples/hello-world/node_modules/typescript/lib/zh-tw/diagnosticMessages.generated.json +2122 -0
- package/examples/hello-world/node_modules/typescript/package.json +120 -0
- package/examples/hello-world/package-lock.json +74 -0
- package/examples/hello-world/package.json +23 -0
- package/examples/hello-world/src/client/index.tsx +110 -0
- package/examples/hello-world/src/server/index.ts +42 -0
- package/examples/hello-world/tsconfig.json +16 -0
- package/package.json +42 -0
- package/src/cli.ts +321 -0
|
@@ -0,0 +1,370 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license React
|
|
3
|
+
* react-jsx-dev-runtime.react-server.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
|
+
function getComponentNameFromType(type) {
|
|
15
|
+
if (null == type) return null;
|
|
16
|
+
if ("function" === typeof type)
|
|
17
|
+
return type.$$typeof === REACT_CLIENT_REFERENCE
|
|
18
|
+
? null
|
|
19
|
+
: type.displayName || type.name || null;
|
|
20
|
+
if ("string" === typeof type) return type;
|
|
21
|
+
switch (type) {
|
|
22
|
+
case REACT_FRAGMENT_TYPE:
|
|
23
|
+
return "Fragment";
|
|
24
|
+
case REACT_PROFILER_TYPE:
|
|
25
|
+
return "Profiler";
|
|
26
|
+
case REACT_STRICT_MODE_TYPE:
|
|
27
|
+
return "StrictMode";
|
|
28
|
+
case REACT_SUSPENSE_TYPE:
|
|
29
|
+
return "Suspense";
|
|
30
|
+
case REACT_SUSPENSE_LIST_TYPE:
|
|
31
|
+
return "SuspenseList";
|
|
32
|
+
case REACT_ACTIVITY_TYPE:
|
|
33
|
+
return "Activity";
|
|
34
|
+
}
|
|
35
|
+
if ("object" === typeof type)
|
|
36
|
+
switch (
|
|
37
|
+
("number" === typeof type.tag &&
|
|
38
|
+
console.error(
|
|
39
|
+
"Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
|
|
40
|
+
),
|
|
41
|
+
type.$$typeof)
|
|
42
|
+
) {
|
|
43
|
+
case REACT_PORTAL_TYPE:
|
|
44
|
+
return "Portal";
|
|
45
|
+
case REACT_CONTEXT_TYPE:
|
|
46
|
+
return type.displayName || "Context";
|
|
47
|
+
case REACT_CONSUMER_TYPE:
|
|
48
|
+
return (type._context.displayName || "Context") + ".Consumer";
|
|
49
|
+
case REACT_FORWARD_REF_TYPE:
|
|
50
|
+
var innerType = type.render;
|
|
51
|
+
type = type.displayName;
|
|
52
|
+
type ||
|
|
53
|
+
((type = innerType.displayName || innerType.name || ""),
|
|
54
|
+
(type = "" !== type ? "ForwardRef(" + type + ")" : "ForwardRef"));
|
|
55
|
+
return type;
|
|
56
|
+
case REACT_MEMO_TYPE:
|
|
57
|
+
return (
|
|
58
|
+
(innerType = type.displayName || null),
|
|
59
|
+
null !== innerType
|
|
60
|
+
? innerType
|
|
61
|
+
: getComponentNameFromType(type.type) || "Memo"
|
|
62
|
+
);
|
|
63
|
+
case REACT_LAZY_TYPE:
|
|
64
|
+
innerType = type._payload;
|
|
65
|
+
type = type._init;
|
|
66
|
+
try {
|
|
67
|
+
return getComponentNameFromType(type(innerType));
|
|
68
|
+
} catch (x) {}
|
|
69
|
+
}
|
|
70
|
+
return null;
|
|
71
|
+
}
|
|
72
|
+
function testStringCoercion(value) {
|
|
73
|
+
return "" + value;
|
|
74
|
+
}
|
|
75
|
+
function checkKeyStringCoercion(value) {
|
|
76
|
+
try {
|
|
77
|
+
testStringCoercion(value);
|
|
78
|
+
var JSCompiler_inline_result = !1;
|
|
79
|
+
} catch (e) {
|
|
80
|
+
JSCompiler_inline_result = !0;
|
|
81
|
+
}
|
|
82
|
+
if (JSCompiler_inline_result) {
|
|
83
|
+
JSCompiler_inline_result = console;
|
|
84
|
+
var JSCompiler_temp_const = JSCompiler_inline_result.error;
|
|
85
|
+
var JSCompiler_inline_result$jscomp$0 =
|
|
86
|
+
("function" === typeof Symbol &&
|
|
87
|
+
Symbol.toStringTag &&
|
|
88
|
+
value[Symbol.toStringTag]) ||
|
|
89
|
+
value.constructor.name ||
|
|
90
|
+
"Object";
|
|
91
|
+
JSCompiler_temp_const.call(
|
|
92
|
+
JSCompiler_inline_result,
|
|
93
|
+
"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
|
|
94
|
+
JSCompiler_inline_result$jscomp$0
|
|
95
|
+
);
|
|
96
|
+
return testStringCoercion(value);
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
function getTaskName(type) {
|
|
100
|
+
if (type === REACT_FRAGMENT_TYPE) return "<>";
|
|
101
|
+
if (
|
|
102
|
+
"object" === typeof type &&
|
|
103
|
+
null !== type &&
|
|
104
|
+
type.$$typeof === REACT_LAZY_TYPE
|
|
105
|
+
)
|
|
106
|
+
return "<...>";
|
|
107
|
+
try {
|
|
108
|
+
var name = getComponentNameFromType(type);
|
|
109
|
+
return name ? "<" + name + ">" : "<...>";
|
|
110
|
+
} catch (x) {
|
|
111
|
+
return "<...>";
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
function getOwner() {
|
|
115
|
+
var dispatcher = ReactSharedInternalsServer.A;
|
|
116
|
+
return null === dispatcher ? null : dispatcher.getOwner();
|
|
117
|
+
}
|
|
118
|
+
function UnknownOwner() {
|
|
119
|
+
return Error("react-stack-top-frame");
|
|
120
|
+
}
|
|
121
|
+
function hasValidKey(config) {
|
|
122
|
+
if (hasOwnProperty.call(config, "key")) {
|
|
123
|
+
var getter = Object.getOwnPropertyDescriptor(config, "key").get;
|
|
124
|
+
if (getter && getter.isReactWarning) return !1;
|
|
125
|
+
}
|
|
126
|
+
return void 0 !== config.key;
|
|
127
|
+
}
|
|
128
|
+
function defineKeyPropWarningGetter(props, displayName) {
|
|
129
|
+
function warnAboutAccessingKey() {
|
|
130
|
+
specialPropKeyWarningShown ||
|
|
131
|
+
((specialPropKeyWarningShown = !0),
|
|
132
|
+
console.error(
|
|
133
|
+
"%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",
|
|
134
|
+
displayName
|
|
135
|
+
));
|
|
136
|
+
}
|
|
137
|
+
warnAboutAccessingKey.isReactWarning = !0;
|
|
138
|
+
Object.defineProperty(props, "key", {
|
|
139
|
+
get: warnAboutAccessingKey,
|
|
140
|
+
configurable: !0
|
|
141
|
+
});
|
|
142
|
+
}
|
|
143
|
+
function elementRefGetterWithDeprecationWarning() {
|
|
144
|
+
var componentName = getComponentNameFromType(this.type);
|
|
145
|
+
didWarnAboutElementRef[componentName] ||
|
|
146
|
+
((didWarnAboutElementRef[componentName] = !0),
|
|
147
|
+
console.error(
|
|
148
|
+
"Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
|
|
149
|
+
));
|
|
150
|
+
componentName = this.props.ref;
|
|
151
|
+
return void 0 !== componentName ? componentName : null;
|
|
152
|
+
}
|
|
153
|
+
function ReactElement(type, key, props, owner, debugStack, debugTask) {
|
|
154
|
+
var refProp = props.ref;
|
|
155
|
+
type = {
|
|
156
|
+
$$typeof: REACT_ELEMENT_TYPE,
|
|
157
|
+
type: type,
|
|
158
|
+
key: key,
|
|
159
|
+
props: props,
|
|
160
|
+
_owner: owner
|
|
161
|
+
};
|
|
162
|
+
null !== (void 0 !== refProp ? refProp : null)
|
|
163
|
+
? Object.defineProperty(type, "ref", {
|
|
164
|
+
enumerable: !1,
|
|
165
|
+
get: elementRefGetterWithDeprecationWarning
|
|
166
|
+
})
|
|
167
|
+
: Object.defineProperty(type, "ref", { enumerable: !1, value: null });
|
|
168
|
+
type._store = {};
|
|
169
|
+
Object.defineProperty(type._store, "validated", {
|
|
170
|
+
configurable: !1,
|
|
171
|
+
enumerable: !1,
|
|
172
|
+
writable: !0,
|
|
173
|
+
value: 0
|
|
174
|
+
});
|
|
175
|
+
Object.defineProperty(type, "_debugInfo", {
|
|
176
|
+
configurable: !1,
|
|
177
|
+
enumerable: !1,
|
|
178
|
+
writable: !0,
|
|
179
|
+
value: null
|
|
180
|
+
});
|
|
181
|
+
Object.defineProperty(type, "_debugStack", {
|
|
182
|
+
configurable: !1,
|
|
183
|
+
enumerable: !1,
|
|
184
|
+
writable: !0,
|
|
185
|
+
value: debugStack
|
|
186
|
+
});
|
|
187
|
+
Object.defineProperty(type, "_debugTask", {
|
|
188
|
+
configurable: !1,
|
|
189
|
+
enumerable: !1,
|
|
190
|
+
writable: !0,
|
|
191
|
+
value: debugTask
|
|
192
|
+
});
|
|
193
|
+
Object.freeze && (Object.freeze(type.props), Object.freeze(type));
|
|
194
|
+
return type;
|
|
195
|
+
}
|
|
196
|
+
function jsxDEVImpl(
|
|
197
|
+
type,
|
|
198
|
+
config,
|
|
199
|
+
maybeKey,
|
|
200
|
+
isStaticChildren,
|
|
201
|
+
debugStack,
|
|
202
|
+
debugTask
|
|
203
|
+
) {
|
|
204
|
+
var children = config.children;
|
|
205
|
+
if (void 0 !== children)
|
|
206
|
+
if (isStaticChildren)
|
|
207
|
+
if (isArrayImpl(children)) {
|
|
208
|
+
for (
|
|
209
|
+
isStaticChildren = 0;
|
|
210
|
+
isStaticChildren < children.length;
|
|
211
|
+
isStaticChildren++
|
|
212
|
+
)
|
|
213
|
+
validateChildKeys(children[isStaticChildren]);
|
|
214
|
+
Object.freeze && Object.freeze(children);
|
|
215
|
+
} else
|
|
216
|
+
console.error(
|
|
217
|
+
"React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
|
|
218
|
+
);
|
|
219
|
+
else validateChildKeys(children);
|
|
220
|
+
if (hasOwnProperty.call(config, "key")) {
|
|
221
|
+
children = getComponentNameFromType(type);
|
|
222
|
+
var keys = Object.keys(config).filter(function (k) {
|
|
223
|
+
return "key" !== k;
|
|
224
|
+
});
|
|
225
|
+
isStaticChildren =
|
|
226
|
+
0 < keys.length
|
|
227
|
+
? "{key: someKey, " + keys.join(": ..., ") + ": ...}"
|
|
228
|
+
: "{key: someKey}";
|
|
229
|
+
didWarnAboutKeySpread[children + isStaticChildren] ||
|
|
230
|
+
((keys =
|
|
231
|
+
0 < keys.length ? "{" + keys.join(": ..., ") + ": ...}" : "{}"),
|
|
232
|
+
console.error(
|
|
233
|
+
'A props object containing a "key" prop is being spread into JSX:\n let props = %s;\n <%s {...props} />\nReact keys must be passed directly to JSX without using spread:\n let props = %s;\n <%s key={someKey} {...props} />',
|
|
234
|
+
isStaticChildren,
|
|
235
|
+
children,
|
|
236
|
+
keys,
|
|
237
|
+
children
|
|
238
|
+
),
|
|
239
|
+
(didWarnAboutKeySpread[children + isStaticChildren] = !0));
|
|
240
|
+
}
|
|
241
|
+
children = null;
|
|
242
|
+
void 0 !== maybeKey &&
|
|
243
|
+
(checkKeyStringCoercion(maybeKey), (children = "" + maybeKey));
|
|
244
|
+
hasValidKey(config) &&
|
|
245
|
+
(checkKeyStringCoercion(config.key), (children = "" + config.key));
|
|
246
|
+
if ("key" in config) {
|
|
247
|
+
maybeKey = {};
|
|
248
|
+
for (var propName in config)
|
|
249
|
+
"key" !== propName && (maybeKey[propName] = config[propName]);
|
|
250
|
+
} else maybeKey = config;
|
|
251
|
+
children &&
|
|
252
|
+
defineKeyPropWarningGetter(
|
|
253
|
+
maybeKey,
|
|
254
|
+
"function" === typeof type
|
|
255
|
+
? type.displayName || type.name || "Unknown"
|
|
256
|
+
: type
|
|
257
|
+
);
|
|
258
|
+
return ReactElement(
|
|
259
|
+
type,
|
|
260
|
+
children,
|
|
261
|
+
maybeKey,
|
|
262
|
+
getOwner(),
|
|
263
|
+
debugStack,
|
|
264
|
+
debugTask
|
|
265
|
+
);
|
|
266
|
+
}
|
|
267
|
+
function validateChildKeys(node) {
|
|
268
|
+
isValidElement(node)
|
|
269
|
+
? node._store && (node._store.validated = 1)
|
|
270
|
+
: "object" === typeof node &&
|
|
271
|
+
null !== node &&
|
|
272
|
+
node.$$typeof === REACT_LAZY_TYPE &&
|
|
273
|
+
("fulfilled" === node._payload.status
|
|
274
|
+
? isValidElement(node._payload.value) &&
|
|
275
|
+
node._payload.value._store &&
|
|
276
|
+
(node._payload.value._store.validated = 1)
|
|
277
|
+
: node._store && (node._store.validated = 1));
|
|
278
|
+
}
|
|
279
|
+
function isValidElement(object) {
|
|
280
|
+
return (
|
|
281
|
+
"object" === typeof object &&
|
|
282
|
+
null !== object &&
|
|
283
|
+
object.$$typeof === REACT_ELEMENT_TYPE
|
|
284
|
+
);
|
|
285
|
+
}
|
|
286
|
+
var React = require("react"),
|
|
287
|
+
REACT_ELEMENT_TYPE = Symbol.for("react.transitional.element"),
|
|
288
|
+
REACT_PORTAL_TYPE = Symbol.for("react.portal"),
|
|
289
|
+
REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"),
|
|
290
|
+
REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode"),
|
|
291
|
+
REACT_PROFILER_TYPE = Symbol.for("react.profiler"),
|
|
292
|
+
REACT_CONSUMER_TYPE = Symbol.for("react.consumer"),
|
|
293
|
+
REACT_CONTEXT_TYPE = Symbol.for("react.context"),
|
|
294
|
+
REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref"),
|
|
295
|
+
REACT_SUSPENSE_TYPE = Symbol.for("react.suspense"),
|
|
296
|
+
REACT_SUSPENSE_LIST_TYPE = Symbol.for("react.suspense_list"),
|
|
297
|
+
REACT_MEMO_TYPE = Symbol.for("react.memo"),
|
|
298
|
+
REACT_LAZY_TYPE = Symbol.for("react.lazy"),
|
|
299
|
+
REACT_ACTIVITY_TYPE = Symbol.for("react.activity"),
|
|
300
|
+
REACT_CLIENT_REFERENCE = Symbol.for("react.client.reference"),
|
|
301
|
+
ReactSharedInternalsServer =
|
|
302
|
+
React.__SERVER_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;
|
|
303
|
+
if (!ReactSharedInternalsServer)
|
|
304
|
+
throw Error(
|
|
305
|
+
'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.'
|
|
306
|
+
);
|
|
307
|
+
var hasOwnProperty = Object.prototype.hasOwnProperty,
|
|
308
|
+
isArrayImpl = Array.isArray,
|
|
309
|
+
createTask = console.createTask
|
|
310
|
+
? console.createTask
|
|
311
|
+
: function () {
|
|
312
|
+
return null;
|
|
313
|
+
};
|
|
314
|
+
React = {
|
|
315
|
+
react_stack_bottom_frame: function (callStackForError) {
|
|
316
|
+
return callStackForError();
|
|
317
|
+
}
|
|
318
|
+
};
|
|
319
|
+
var specialPropKeyWarningShown;
|
|
320
|
+
var didWarnAboutElementRef = {};
|
|
321
|
+
var unknownOwnerDebugStack = React.react_stack_bottom_frame.bind(
|
|
322
|
+
React,
|
|
323
|
+
UnknownOwner
|
|
324
|
+
)();
|
|
325
|
+
var unknownOwnerDebugTask = createTask(getTaskName(UnknownOwner));
|
|
326
|
+
var didWarnAboutKeySpread = {};
|
|
327
|
+
exports.Fragment = REACT_FRAGMENT_TYPE;
|
|
328
|
+
exports.jsx = function (type, config, maybeKey) {
|
|
329
|
+
var trackActualOwner =
|
|
330
|
+
1e4 > ReactSharedInternalsServer.recentlyCreatedOwnerStacks++;
|
|
331
|
+
return jsxDEVImpl(
|
|
332
|
+
type,
|
|
333
|
+
config,
|
|
334
|
+
maybeKey,
|
|
335
|
+
!1,
|
|
336
|
+
trackActualOwner
|
|
337
|
+
? Error("react-stack-top-frame")
|
|
338
|
+
: unknownOwnerDebugStack,
|
|
339
|
+
trackActualOwner ? createTask(getTaskName(type)) : unknownOwnerDebugTask
|
|
340
|
+
);
|
|
341
|
+
};
|
|
342
|
+
exports.jsxDEV = function (type, config, maybeKey, isStaticChildren) {
|
|
343
|
+
var trackActualOwner =
|
|
344
|
+
1e4 > ReactSharedInternalsServer.recentlyCreatedOwnerStacks++;
|
|
345
|
+
return jsxDEVImpl(
|
|
346
|
+
type,
|
|
347
|
+
config,
|
|
348
|
+
maybeKey,
|
|
349
|
+
isStaticChildren,
|
|
350
|
+
trackActualOwner
|
|
351
|
+
? Error("react-stack-top-frame")
|
|
352
|
+
: unknownOwnerDebugStack,
|
|
353
|
+
trackActualOwner ? createTask(getTaskName(type)) : unknownOwnerDebugTask
|
|
354
|
+
);
|
|
355
|
+
};
|
|
356
|
+
exports.jsxs = function (type, config, maybeKey) {
|
|
357
|
+
var trackActualOwner =
|
|
358
|
+
1e4 > ReactSharedInternalsServer.recentlyCreatedOwnerStacks++;
|
|
359
|
+
return jsxDEVImpl(
|
|
360
|
+
type,
|
|
361
|
+
config,
|
|
362
|
+
maybeKey,
|
|
363
|
+
!0,
|
|
364
|
+
trackActualOwner
|
|
365
|
+
? Error("react-stack-top-frame")
|
|
366
|
+
: unknownOwnerDebugStack,
|
|
367
|
+
trackActualOwner ? createTask(getTaskName(type)) : unknownOwnerDebugTask
|
|
368
|
+
);
|
|
369
|
+
};
|
|
370
|
+
})();
|
package/examples/hello-world/node_modules/react/cjs/react-jsx-dev-runtime.react-server.production.js
ADDED
|
@@ -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;
|