@module-federation/bridge-react 0.0.0-next-20250708033956 → 0.0.0-next-20250708104625

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.
Files changed (40) hide show
  1. package/CHANGELOG.md +3 -3
  2. package/dist/data-fetch-server-middleware.d.ts +9 -0
  3. package/dist/data-fetch-server-middleware.es.js +1 -1
  4. package/dist/data-fetch-utils.cjs.js +4 -1253
  5. package/dist/data-fetch-utils.d.ts +10 -1
  6. package/dist/data-fetch-utils.es.js +11 -1260
  7. package/dist/index.cjs.js +7 -433
  8. package/dist/index.d.ts +11 -11
  9. package/dist/index.es.js +20 -447
  10. package/dist/lazy-load-component-plugin-CttAWi8N.js +500 -0
  11. package/dist/lazy-load-component-plugin-hOC-Yus_.mjs +501 -0
  12. package/dist/lazy-load-component-plugin.cjs.js +6 -0
  13. package/dist/lazy-load-component-plugin.d.ts +16 -0
  14. package/dist/lazy-load-component-plugin.es.js +6 -0
  15. package/dist/lazy-utils.d.ts +9 -0
  16. package/dist/lazy-utils.es.js +19 -19
  17. package/dist/plugin.d.ts +9 -0
  18. package/dist/prefetch-Cx6MrkdU.mjs +1330 -0
  19. package/dist/prefetch-cGDaDkgV.js +1329 -0
  20. package/dist/router-v5.d.ts +9 -0
  21. package/dist/router-v6.d.ts +9 -0
  22. package/dist/router.d.ts +9 -0
  23. package/dist/{utils-Bk8hGjjF.mjs → utils-BTYYwZcb.mjs} +31 -31
  24. package/dist/v18.d.ts +9 -0
  25. package/dist/v19.d.ts +9 -0
  26. package/package.json +11 -11
  27. package/src/index.ts +3 -1
  28. package/src/lazy/createLazyComponent.tsx +88 -74
  29. package/src/lazy/data-fetch/index.ts +1 -0
  30. package/src/lazy/data-fetch/prefetch.ts +1 -1
  31. package/src/lazy/data-fetch/runtime-plugin.ts +80 -81
  32. package/src/lazy/index.ts +6 -2
  33. package/src/plugins/lazy-load-component-plugin.ts +72 -0
  34. package/vite.config.ts +2 -2
  35. package/dist/data-fetch-runtime-plugin.cjs.js +0 -73
  36. package/dist/data-fetch-runtime-plugin.d.ts +0 -6
  37. package/dist/data-fetch-runtime-plugin.es.js +0 -74
  38. package/dist/inject-data-fetch-CAvi-gSf.js +0 -79
  39. package/dist/inject-data-fetch-errCdqBS.mjs +0 -80
  40. package/src/.eslintrc.js +0 -9
package/CHANGELOG.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # @module-federation/bridge-react
2
2
 
3
- ## 0.0.0-next-20250708033956
3
+ ## 0.0.0-next-20250708104625
4
4
 
5
5
  ### Minor Changes
6
6
 
@@ -9,8 +9,8 @@
9
9
  ### Patch Changes
10
10
 
11
11
  - eb0d1dc: feat(bridge-react): export createLazyCompoent api
12
- - @module-federation/sdk@0.0.0-next-20250708033956
13
- - @module-federation/bridge-shared@0.0.0-next-20250708033956
12
+ - @module-federation/sdk@0.0.0-next-20250708104625
13
+ - @module-federation/bridge-shared@0.0.0-next-20250708104625
14
14
 
15
15
  ## 0.16.0
16
16
 
@@ -4,3 +4,12 @@ declare const dataFetchServerMiddleware: MiddlewareHandler;
4
4
  export default dataFetchServerMiddleware;
5
5
 
6
6
  export { }
7
+
8
+
9
+ declare module '@module-federation/runtime' {
10
+ interface FederationHost {
11
+ createLazyComponent<T, E extends keyof T>(options: Omit<CreateLazyComponentOptions<T, E>, 'instance'>): ReturnType<typeof createLazyComponent<T, E>>;
12
+ prefetch(options: Omit<PrefetchOptions, 'instance'>): ReturnType<typeof prefetch>;
13
+ collectSSRAssets(options: Omit<Parameters<typeof collectSSRAssets>[0], 'instance'>): ReturnType<typeof collectSSRAssets>;
14
+ }
15
+ }
@@ -1,4 +1,4 @@
1
- import { k as DATA_FETCH_QUERY, l as logger, h as getDataFetchMap, j as initDataFetchMap, f as MF_DATA_FETCH_STATUS, m as fetchData, e as loadDataFetchModule } from "./utils-Bk8hGjjF.mjs";
1
+ import { D as DATA_FETCH_QUERY, l as logger, g as getDataFetchMap, i as initDataFetchMap, M as MF_DATA_FETCH_STATUS, f as fetchData, a as loadDataFetchModule } from "./utils-BTYYwZcb.mjs";
2
2
  import { M as MANIFEST_EXT, S as SEPARATOR } from "./index.esm-BCeUd-x9.mjs";
3
3
  function wrapSetTimeout(targetPromise, delay = 2e4, id) {
4
4
  if (targetPromise && typeof targetPromise.then === "function") {