@module-federation/bridge-react 0.0.0-next-20250630125121 → 0.0.0-next-20250701074404

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 (60) hide show
  1. package/CHANGELOG.md +10 -6
  2. package/__tests__/bridge.spec.tsx +7 -7
  3. package/dist/{bridge-base-UGCwcMnG.js → bridge-base-BBH982Tz.cjs} +1 -1
  4. package/dist/{bridge-base-BoshEggF.mjs → bridge-base-P6pEjY1q.js} +1 -1
  5. package/dist/index-Cv3p6r66.cjs +235 -0
  6. package/dist/index-D4yt7Udv.js +236 -0
  7. package/dist/index.cjs.js +9 -434
  8. package/dist/index.d.ts +0 -142
  9. package/dist/index.es.js +11 -437
  10. package/dist/router-v5.cjs.js +1 -1
  11. package/dist/router-v5.es.js +1 -1
  12. package/dist/router-v6.cjs.js +1 -1
  13. package/dist/router-v6.es.js +1 -1
  14. package/dist/router.cjs.js +1 -1
  15. package/dist/router.es.js +1 -1
  16. package/dist/v18.cjs.js +1 -1
  17. package/dist/v18.es.js +1 -1
  18. package/dist/v19.cjs.js +1 -1
  19. package/dist/v19.es.js +1 -1
  20. package/package.json +5 -45
  21. package/src/index.ts +1 -30
  22. package/src/remote/component.tsx +3 -3
  23. package/src/remote/create.tsx +4 -17
  24. package/tsconfig.json +1 -1
  25. package/vite.config.ts +0 -13
  26. package/dist/data-fetch-runtime-plugin.cjs.js +0 -73
  27. package/dist/data-fetch-runtime-plugin.d.ts +0 -6
  28. package/dist/data-fetch-runtime-plugin.es.js +0 -74
  29. package/dist/data-fetch-server-middleware.cjs.js +0 -163
  30. package/dist/data-fetch-server-middleware.d.ts +0 -6
  31. package/dist/data-fetch-server-middleware.es.js +0 -164
  32. package/dist/data-fetch-utils.cjs.js +0 -1271
  33. package/dist/data-fetch-utils.d.ts +0 -77
  34. package/dist/data-fetch-utils.es.js +0 -1273
  35. package/dist/index-C0fDZB5b.js +0 -45
  36. package/dist/index-CqxytsLY.mjs +0 -46
  37. package/dist/index.esm-BCeUd-x9.mjs +0 -418
  38. package/dist/index.esm-j_1sIRzg.js +0 -417
  39. package/dist/inject-data-fetch-CAvi-gSf.js +0 -79
  40. package/dist/inject-data-fetch-errCdqBS.mjs +0 -80
  41. package/dist/lazy-utils.cjs.js +0 -24
  42. package/dist/lazy-utils.d.ts +0 -140
  43. package/dist/lazy-utils.es.js +0 -24
  44. package/dist/utils-Bk8hGjjF.mjs +0 -2016
  45. package/dist/utils-iEVlDmyk.js +0 -2015
  46. package/src/lazy/AwaitDataFetch.tsx +0 -176
  47. package/src/lazy/constant.ts +0 -30
  48. package/src/lazy/createLazyComponent.tsx +0 -393
  49. package/src/lazy/data-fetch/cache.ts +0 -296
  50. package/src/lazy/data-fetch/call-data-fetch.ts +0 -13
  51. package/src/lazy/data-fetch/data-fetch-server-middleware.ts +0 -196
  52. package/src/lazy/data-fetch/index.ts +0 -15
  53. package/src/lazy/data-fetch/inject-data-fetch.ts +0 -109
  54. package/src/lazy/data-fetch/prefetch.ts +0 -102
  55. package/src/lazy/data-fetch/runtime-plugin.ts +0 -116
  56. package/src/lazy/index.ts +0 -31
  57. package/src/lazy/logger.ts +0 -6
  58. package/src/lazy/types.ts +0 -75
  59. package/src/lazy/utils.ts +0 -372
  60. package/src/lazy/wrapNoSSR.tsx +0 -10
@@ -1,77 +0,0 @@
1
- import { getInstance } from '@module-federation/runtime';
2
-
3
- export declare function cache<T>(fn: DataFetch<T>, options?: CacheOptions): DataFetch<T>;
4
-
5
- declare interface CacheConfig {
6
- maxSize?: number;
7
- unstable_shouldDisable?: ({ request, }: {
8
- request: Request;
9
- }) => boolean | Promise<boolean>;
10
- }
11
-
12
- declare interface CacheOptions {
13
- tag?: string | string[];
14
- maxAge?: number;
15
- revalidate?: number;
16
- getKey?: <Args extends any[]>(...args: Args) => string;
17
- customKey?: <Args extends any[]>(options: {
18
- params: Args;
19
- fn: (...args: Args) => any;
20
- generatedKey: string;
21
- }) => string | symbol;
22
- onCache?: (info: CacheStatsInfo) => boolean;
23
- }
24
-
25
- export declare const CacheSize: {
26
- readonly KB: 1024;
27
- readonly MB: number;
28
- readonly GB: number;
29
- };
30
-
31
- export declare interface CacheStatsInfo {
32
- status: CacheStatus;
33
- key: string | symbol;
34
- params: DataFetchParams;
35
- result: any;
36
- }
37
-
38
- export declare type CacheStatus = 'hit' | 'stale' | 'miss';
39
-
40
- export declare const CacheTime: {
41
- readonly SECOND: 1000;
42
- readonly MINUTE: number;
43
- readonly HOUR: number;
44
- readonly DAY: number;
45
- readonly WEEK: number;
46
- readonly MONTH: number;
47
- };
48
-
49
- export declare function callDataFetch(): Promise<void>;
50
-
51
- export declare function clearStore(): void;
52
-
53
- export declare function configureCache(config: CacheConfig): void;
54
-
55
- declare type DataFetch<T> = (params: DataFetchParams) => Promise<T>;
56
-
57
- declare type DataFetchParams = {
58
- isDowngrade: boolean;
59
- _id?: string;
60
- } & Record<string, unknown>;
61
-
62
- export declare function generateKey(dataFetchOptions: DataFetchParams): string;
63
-
64
- export declare function injectDataFetch(): void;
65
-
66
- export declare function prefetch(options: PrefetchOptions): Promise<void>;
67
-
68
- declare type PrefetchOptions = {
69
- id: string;
70
- instance: ReturnType<typeof getInstance>;
71
- dataFetchParams?: DataFetchParams;
72
- preloadComponentResource?: boolean;
73
- };
74
-
75
- export declare function revalidateTag(tag: string): void;
76
-
77
- export { }