@ecopages/react 0.2.0-beta.4 → 0.2.0-beta.41
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 +175 -7
- package/package.json +54 -29
- package/src/app/client-only.js +15 -0
- package/src/app/dynamic.js +9 -0
- package/src/app/dynamic.test.browser.js +31 -0
- package/src/bundling/bootstrap-package-paths.d.ts +5 -0
- package/src/bundling/bootstrap-package-paths.js +5 -0
- package/src/{services/react-bundle.service.d.ts → bundling/bundle.d.ts} +23 -8
- package/src/bundling/bundle.js +120 -0
- package/src/bundling/discover-layout-runtime-modules.d.ts +32 -0
- package/src/bundling/discover-layout-runtime-modules.js +191 -0
- package/src/bundling/runtime-alias-map.d.ts +13 -0
- package/src/bundling/runtime-alias-map.js +113 -0
- package/src/{services/react-runtime-bundle.service.d.ts → bundling/runtime-bundle.d.ts} +30 -5
- package/src/bundling/runtime-bundle.js +258 -0
- package/src/bundling/runtime-interop-plugin.js +34 -0
- package/src/bundling/runtime-mode.d.ts +9 -0
- package/src/bundling/runtime-mode.js +11 -0
- package/src/bundling/runtime-modules.d.ts +29 -0
- package/src/bundling/runtime-modules.js +49 -0
- package/src/client-graph/ast-transform.d.ts +18 -0
- package/src/client-graph/ast-transform.js +426 -0
- package/src/{utils/client-graph-boundary-cache.d.ts → client-graph/boundary-cache.d.ts} +23 -13
- package/src/client-graph/boundary-cache.js +182 -0
- package/src/{utils/client-graph-boundary-plugin.d.ts → client-graph/boundary-plugin.d.ts} +4 -13
- package/src/client-graph/boundary-plugin.js +149 -0
- package/src/client-graph/component-config-traversal.js +77 -0
- package/src/client-graph/declared-modules.js +69 -0
- package/src/client-graph/module-classification.d.ts +3 -0
- package/src/client-graph/module-classification.js +43 -0
- package/src/{utils → client-graph}/reachability-analyzer.d.ts +4 -12
- package/src/client-graph/reachability-analyzer.js +515 -0
- package/src/client-graph/specifier-classification.d.ts +75 -0
- package/src/client-graph/specifier-classification.js +223 -0
- package/src/contracts/router-adapter.js +6 -0
- package/src/dev-transform/react-dev-transform-contributor.d.ts +17 -0
- package/src/dev-transform/react-dev-transform-contributor.js +22 -0
- package/src/hmr/hmr-scripts.js +44 -0
- package/src/hmr/hmr-strategy.d.ts +74 -0
- package/src/hmr/hmr-strategy.js +351 -0
- package/src/{services/react-hmr-page-metadata-cache.d.ts → hmr/page-metadata-cache.d.ts} +5 -1
- package/src/hmr/page-metadata-cache.js +44 -0
- package/src/hmr/react-hmr-dev-transform-plugins.d.ts +23 -0
- package/src/hmr/react-hmr-dev-transform-plugins.js +20 -0
- package/src/hydration/assert-no-bare-ecopages-imports.d.ts +4 -0
- package/src/hydration/assert-no-bare-ecopages-imports.js +7 -0
- package/src/hydration/bootstrap-imports.d.ts +25 -0
- package/src/hydration/bootstrap-imports.js +33 -0
- package/src/hydration/hydration-asset.d.ts +84 -0
- package/src/hydration/hydration-asset.js +227 -0
- package/src/hydration/hydration-scripts.d.ts +104 -0
- package/src/hydration/hydration-scripts.js +483 -0
- package/src/hydration/hydration-scripts.test.browser.js +199 -0
- package/src/hydration/page-data-manifest.d.ts +58 -0
- package/src/hydration/page-data-manifest.js +97 -0
- package/src/hydration/page-data-reader.d.ts +31 -0
- package/src/hydration/page-data-reader.js +77 -0
- package/src/hydration/page-payload.d.ts +67 -0
- package/src/hydration/page-payload.js +106 -0
- package/src/hydration/serialize-page-data-script.d.ts +27 -0
- package/src/hydration/serialize-page-data-script.js +30 -0
- package/src/{services/react-mdx-config-dependency.service.d.ts → mdx/mdx-config-dependency.d.ts} +6 -6
- package/src/mdx/mdx-config-dependency.js +110 -0
- package/src/mdx/mdx-loader-plugin.d.ts +2 -0
- package/src/mdx/mdx-loader-plugin.js +8 -0
- package/src/page/page-module.d.ts +46 -0
- package/src/page/page-module.js +74 -0
- package/src/plugin/react.constants.js +1 -0
- package/src/{react.plugin.d.ts → plugin/react.plugin.d.ts} +9 -3
- package/src/plugin/react.plugin.js +241 -0
- package/src/plugin/react.types.d.ts +152 -0
- package/src/plugin/react.types.js +1 -0
- package/src/render/component-ownership.d.ts +49 -0
- package/src/render/component-ownership.js +46 -0
- package/src/render/component-ssr.d.ts +113 -0
- package/src/render/component-ssr.js +180 -0
- package/src/render/eco-embed.js +9 -0
- package/src/render/errors.d.ts +16 -0
- package/src/render/errors.js +23 -0
- package/src/render/html-boundary.js +59 -0
- package/src/render/layout-compose.d.ts +66 -0
- package/src/render/layout-compose.js +134 -0
- package/src/render/react-renderer.d.ts +138 -0
- package/src/render/react-renderer.js +448 -0
- package/src/render/react-runtime.d.ts +13 -0
- package/src/render/react-runtime.js +26 -0
- package/src/render/unified-layout-composition.d.ts +53 -0
- package/src/render/unified-layout-composition.js +78 -0
- package/src/runtime/use-sync-external-store-with-selector.js +52 -54
- package/src/eco-embed.js +0 -11
- package/src/react-hmr-strategy.d.ts +0 -230
- package/src/react-hmr-strategy.js +0 -657
- package/src/react-renderer.d.ts +0 -233
- package/src/react-renderer.js +0 -622
- package/src/react.constants.js +0 -4
- package/src/react.plugin.js +0 -205
- package/src/react.types.d.ts +0 -88
- package/src/react.types.js +0 -0
- package/src/router-adapter.js +0 -0
- package/src/services/pages-index.d.ts +0 -64
- package/src/services/pages-index.js +0 -73
- package/src/services/react-bundle.service.js +0 -86
- package/src/services/react-hmr-page-metadata-cache.js +0 -35
- package/src/services/react-hydration-asset.service.d.ts +0 -84
- package/src/services/react-hydration-asset.service.js +0 -217
- package/src/services/react-mdx-config-dependency.service.js +0 -122
- package/src/services/react-page-module.service.d.ts +0 -88
- package/src/services/react-page-module.service.js +0 -166
- package/src/services/react-page-payload.service.d.ts +0 -46
- package/src/services/react-page-payload.service.js +0 -67
- package/src/services/react-runtime-bundle.service.js +0 -186
- package/src/utils/client-graph-boundary-cache.js +0 -116
- package/src/utils/client-graph-boundary-plugin.js +0 -552
- package/src/utils/client-only.js +0 -19
- package/src/utils/component-config-traversal.js +0 -54
- package/src/utils/declared-modules.js +0 -47
- package/src/utils/dynamic.js +0 -12
- package/src/utils/dynamic.test.browser.js +0 -33
- package/src/utils/hmr-scripts.js +0 -31
- package/src/utils/html-boundary.js +0 -55
- package/src/utils/hydration-scripts.d.ts +0 -92
- package/src/utils/hydration-scripts.js +0 -358
- package/src/utils/hydration-scripts.test.browser.js +0 -198
- package/src/utils/reachability-analyzer.js +0 -339
- package/src/utils/react-dom-runtime-interop-plugin.js +0 -38
- package/src/utils/react-mdx-loader-plugin.d.ts +0 -3
- package/src/utils/react-mdx-loader-plugin.js +0 -45
- package/src/utils/react-runtime-alias-map.d.ts +0 -8
- package/src/utils/react-runtime-alias-map.js +0 -90
- /package/src/{utils → app}/client-only.d.ts +0 -0
- /package/src/{utils → app}/dynamic.d.ts +0 -0
- /package/src/{utils → app}/dynamic.test.browser.d.ts +0 -0
- /package/src/{utils/react-dom-runtime-interop-plugin.d.ts → bundling/runtime-interop-plugin.d.ts} +0 -0
- /package/src/{utils → client-graph}/component-config-traversal.d.ts +0 -0
- /package/src/{utils → client-graph}/declared-modules.d.ts +0 -0
- /package/src/{declarations.d.ts → contracts/declarations.d.ts} +0 -0
- /package/src/{router-adapter.d.ts → contracts/router-adapter.d.ts} +0 -0
- /package/src/{utils → hmr}/hmr-scripts.d.ts +0 -0
- /package/src/{utils → hydration}/hydration-scripts.test.browser.d.ts +0 -0
- /package/src/{react.constants.d.ts → plugin/react.constants.d.ts} +0 -0
- /package/src/{eco-embed.d.ts → render/eco-embed.d.ts} +0 -0
- /package/src/{utils → render}/html-boundary.d.ts +0 -0
|
@@ -1,90 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
createBrowserRuntimeManifest,
|
|
3
|
-
getBrowserRuntimeSpecifierMap
|
|
4
|
-
} from "@ecopages/core/build/browser-runtime-manifest";
|
|
5
|
-
const REACT_RUNTIME_SPECIFIERS = [
|
|
6
|
-
"react",
|
|
7
|
-
"react-dom",
|
|
8
|
-
"react/jsx-runtime",
|
|
9
|
-
"react/jsx-dev-runtime",
|
|
10
|
-
"react-dom/client"
|
|
11
|
-
];
|
|
12
|
-
function buildReactRuntimeAliasMap(runtimeImports) {
|
|
13
|
-
return Object.fromEntries(getBrowserRuntimeSpecifierMap(buildReactRuntimeManifest(runtimeImports)));
|
|
14
|
-
}
|
|
15
|
-
function buildReactRuntimeManifest(runtimeImports) {
|
|
16
|
-
return createBrowserRuntimeManifest([
|
|
17
|
-
{
|
|
18
|
-
specifier: "react",
|
|
19
|
-
owner: "@ecopages/react",
|
|
20
|
-
importPath: "react",
|
|
21
|
-
publicPath: runtimeImports.react
|
|
22
|
-
},
|
|
23
|
-
{
|
|
24
|
-
specifier: "react/jsx-runtime",
|
|
25
|
-
owner: "@ecopages/react",
|
|
26
|
-
importPath: "react/jsx-runtime",
|
|
27
|
-
publicPath: runtimeImports.reactJsxRuntime
|
|
28
|
-
},
|
|
29
|
-
{
|
|
30
|
-
specifier: "react/jsx-dev-runtime",
|
|
31
|
-
owner: "@ecopages/react",
|
|
32
|
-
importPath: "react/jsx-dev-runtime",
|
|
33
|
-
publicPath: runtimeImports.reactJsxDevRuntime
|
|
34
|
-
},
|
|
35
|
-
{
|
|
36
|
-
specifier: "react-dom",
|
|
37
|
-
owner: "@ecopages/react",
|
|
38
|
-
importPath: "react-dom",
|
|
39
|
-
publicPath: runtimeImports.reactDom
|
|
40
|
-
},
|
|
41
|
-
{
|
|
42
|
-
specifier: "react-dom/client",
|
|
43
|
-
owner: "@ecopages/react",
|
|
44
|
-
importPath: "react-dom/client",
|
|
45
|
-
publicPath: runtimeImports.reactDomClient
|
|
46
|
-
},
|
|
47
|
-
{
|
|
48
|
-
specifier: "use-sync-external-store/shim",
|
|
49
|
-
owner: "@ecopages/react",
|
|
50
|
-
importPath: "use-sync-external-store/shim",
|
|
51
|
-
publicPath: runtimeImports.react
|
|
52
|
-
},
|
|
53
|
-
{
|
|
54
|
-
specifier: "use-sync-external-store/shim/index.js",
|
|
55
|
-
owner: "@ecopages/react",
|
|
56
|
-
importPath: "use-sync-external-store/shim/index.js",
|
|
57
|
-
publicPath: runtimeImports.react
|
|
58
|
-
},
|
|
59
|
-
{
|
|
60
|
-
specifier: "use-sync-external-store/shim/with-selector",
|
|
61
|
-
owner: "@ecopages/react",
|
|
62
|
-
importPath: "use-sync-external-store/shim/with-selector",
|
|
63
|
-
publicPath: runtimeImports.useSyncExternalStoreWithSelector
|
|
64
|
-
},
|
|
65
|
-
{
|
|
66
|
-
specifier: "use-sync-external-store/shim/with-selector.js",
|
|
67
|
-
owner: "@ecopages/react",
|
|
68
|
-
importPath: "use-sync-external-store/shim/with-selector.js",
|
|
69
|
-
publicPath: runtimeImports.useSyncExternalStoreWithSelector
|
|
70
|
-
}
|
|
71
|
-
]);
|
|
72
|
-
}
|
|
73
|
-
function getReactRuntimeExternalSpecifiers() {
|
|
74
|
-
return [...REACT_RUNTIME_SPECIFIERS];
|
|
75
|
-
}
|
|
76
|
-
function getReactClientGraphAllowSpecifiers(runtimeSpecifiers, routerAdapter) {
|
|
77
|
-
return [
|
|
78
|
-
"@ecopages/core",
|
|
79
|
-
...REACT_RUNTIME_SPECIFIERS,
|
|
80
|
-
...routerAdapter ? [routerAdapter.bundle.importPath] : [],
|
|
81
|
-
...Array.from(runtimeSpecifiers)
|
|
82
|
-
];
|
|
83
|
-
}
|
|
84
|
-
export {
|
|
85
|
-
REACT_RUNTIME_SPECIFIERS,
|
|
86
|
-
buildReactRuntimeAliasMap,
|
|
87
|
-
buildReactRuntimeManifest,
|
|
88
|
-
getReactClientGraphAllowSpecifiers,
|
|
89
|
-
getReactRuntimeExternalSpecifiers
|
|
90
|
-
};
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/src/{utils/react-dom-runtime-interop-plugin.d.ts → bundling/runtime-interop-plugin.d.ts}
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|