@my-react/react-reconciler-compact 0.0.1

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 (42) hide show
  1. package/LICENSE +21 -0
  2. package/dist/cjs/index.development.js +8370 -0
  3. package/dist/cjs/index.production.js +7719 -0
  4. package/dist/types/api/append.d.ts +4 -0
  5. package/dist/types/api/append.d.ts.map +1 -0
  6. package/dist/types/api/create.d.ts +4 -0
  7. package/dist/types/api/create.d.ts.map +1 -0
  8. package/dist/types/api/index.d.ts +7 -0
  9. package/dist/types/api/index.d.ts.map +1 -0
  10. package/dist/types/api/position.d.ts +4 -0
  11. package/dist/types/api/position.d.ts.map +1 -0
  12. package/dist/types/api/ref.d.ts +10 -0
  13. package/dist/types/api/ref.d.ts.map +1 -0
  14. package/dist/types/api/remove.d.ts +4 -0
  15. package/dist/types/api/remove.d.ts.map +1 -0
  16. package/dist/types/api/update.d.ts +4 -0
  17. package/dist/types/api/update.d.ts.map +1 -0
  18. package/dist/types/devtool.d.ts +7 -0
  19. package/dist/types/devtool.d.ts.map +1 -0
  20. package/dist/types/dispatch.d.ts +326 -0
  21. package/dist/types/dispatch.d.ts.map +1 -0
  22. package/dist/types/dispatchFiber.d.ts +4 -0
  23. package/dist/types/dispatchFiber.d.ts.map +1 -0
  24. package/dist/types/dispatchMap.d.ts +8 -0
  25. package/dist/types/dispatchMap.d.ts.map +1 -0
  26. package/dist/types/dispatchMount.d.ts +4 -0
  27. package/dist/types/dispatchMount.d.ts.map +1 -0
  28. package/dist/types/feature.d.ts +17 -0
  29. package/dist/types/feature.d.ts.map +1 -0
  30. package/dist/types/hmr.d.ts +3 -0
  31. package/dist/types/hmr.d.ts.map +1 -0
  32. package/dist/types/index.d.ts +13 -0
  33. package/dist/types/index.d.ts.map +1 -0
  34. package/dist/types/polyfill.d.ts +2 -0
  35. package/dist/types/polyfill.d.ts.map +1 -0
  36. package/dist/types/portal.d.ts +6 -0
  37. package/dist/types/portal.d.ts.map +1 -0
  38. package/dist/types/scheduler.d.ts +5 -0
  39. package/dist/types/scheduler.d.ts.map +1 -0
  40. package/index.d.ts +1 -0
  41. package/index.js +15 -0
  42. package/package.json +49 -0
@@ -0,0 +1,4 @@
1
+ import type { ReconcilerDispatch } from "../dispatch";
2
+ import type { MyReactFiberNode } from "@my-react/react-reconciler";
3
+ export declare const append: (_dispatch: ReconcilerDispatch, _fiber: MyReactFiberNode, _config: any) => void;
4
+ //# sourceMappingURL=append.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"append.d.ts","sourceRoot":"","sources":["../../../src/api/append.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AACtD,OAAO,KAAK,EAAE,gBAAgB,EAAyB,MAAM,4BAA4B,CAAC;AAE1F,eAAO,MAAM,MAAM,cAAe,kBAAkB,UAAU,gBAAgB,WAAW,GAAG,SA6C3F,CAAC"}
@@ -0,0 +1,4 @@
1
+ import type { ReconcilerDispatch } from "../dispatch";
2
+ import type { MyReactFiberNode } from "@my-react/react-reconciler";
3
+ export declare const create: (_dispatch: ReconcilerDispatch, _fiber: MyReactFiberNode, _config: any) => void;
4
+ //# sourceMappingURL=create.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"create.d.ts","sourceRoot":"","sources":["../../../src/api/create.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AACtD,OAAO,KAAK,EAAyB,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAE1F,eAAO,MAAM,MAAM,cAAe,kBAAkB,UAAU,gBAAgB,WAAW,GAAG,SAoC3F,CAAC"}
@@ -0,0 +1,7 @@
1
+ export * from "./ref";
2
+ export * from "./create";
3
+ export * from "./append";
4
+ export * from "./update";
5
+ export * from "./remove";
6
+ export * from "./position";
7
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/api/index.ts"],"names":[],"mappings":"AAAA,cAAc,OAAO,CAAC;AACtB,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,YAAY,CAAC"}
@@ -0,0 +1,4 @@
1
+ import type { ReconcilerDispatch } from "../dispatch";
2
+ import type { MyReactFiberNode } from "@my-react/react-reconciler";
3
+ export declare const position: (_dispatch: ReconcilerDispatch, _fiber: MyReactFiberNode, _config: any) => void;
4
+ //# sourceMappingURL=position.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"position.d.ts","sourceRoot":"","sources":["../../../src/api/position.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AACtD,OAAO,KAAK,EAAE,gBAAgB,EAAyB,MAAM,4BAA4B,CAAC;AA6G1F,eAAO,MAAM,QAAQ,cAAe,kBAAkB,UAAU,gBAAgB,WAAW,GAAG,SAgB7F,CAAC"}
@@ -0,0 +1,10 @@
1
+ import type { MyReactFiberNode } from "@my-react/react-reconciler";
2
+ /**
3
+ * @internal
4
+ */
5
+ export declare const setRef: (_fiber: MyReactFiberNode, config: any) => void;
6
+ /**
7
+ * @internal
8
+ */
9
+ export declare const unsetRef: (_fiber: MyReactFiberNode) => void;
10
+ //# sourceMappingURL=ref.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ref.d.ts","sourceRoot":"","sources":["../../../src/api/ref.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAEnE;;GAEG;AACH,eAAO,MAAM,MAAM,WAAY,gBAAgB,UAAU,GAAG,SAgD3D,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,QAAQ,WAAY,gBAAgB,SAoBhD,CAAC"}
@@ -0,0 +1,4 @@
1
+ import type { ReconcilerDispatch } from "../dispatch";
2
+ import type { MyReactFiberNode } from "@my-react/react-reconciler";
3
+ export declare const remove: (_dispatch: ReconcilerDispatch, _fiber: MyReactFiberNode, _config: any) => void;
4
+ //# sourceMappingURL=remove.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"remove.d.ts","sourceRoot":"","sources":["../../../src/api/remove.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AACtD,OAAO,KAAK,EAAE,gBAAgB,EAAyB,MAAM,4BAA4B,CAAC;AAE1F,eAAO,MAAM,MAAM,cAAe,kBAAkB,UAAU,gBAAgB,WAAW,GAAG,SAyB3F,CAAC"}
@@ -0,0 +1,4 @@
1
+ import { type MyReactFiberNode } from "@my-react/react-reconciler";
2
+ import type { ReconcilerDispatch } from "../dispatch";
3
+ export declare const update: (_dispatch: ReconcilerDispatch, _fiber: MyReactFiberNode, _config: any) => void;
4
+ //# sourceMappingURL=update.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"update.d.ts","sourceRoot":"","sources":["../../../src/api/update.ts"],"names":[],"mappings":"AAAA,OAAO,EAAa,KAAK,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAG9E,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAEtD,eAAO,MAAM,MAAM,cAAe,kBAAkB,UAAU,gBAAgB,WAAW,GAAG,SAkC3F,CAAC"}
@@ -0,0 +1,7 @@
1
+ import type { CustomRenderDispatch } from "@my-react/react-reconciler";
2
+ export declare const DISPATCH_FIELD = "__@my-react/dispatch__";
3
+ export declare const DEV_TOOL_FIELD = "__@my-react/react-devtool-inject__";
4
+ export declare const addGlobalDispatch: (dispatch: CustomRenderDispatch) => void;
5
+ export declare const autoSetDevTools: (dispatch: CustomRenderDispatch) => void;
6
+ export declare const delGlobalDispatch: (dispatch: CustomRenderDispatch) => void;
7
+ //# sourceMappingURL=devtool.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"devtool.d.ts","sourceRoot":"","sources":["../../src/devtool.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAC;AAEvE,eAAO,MAAM,cAAc,2BAA2B,CAAC;AAEvD,eAAO,MAAM,cAAc,uCAAuC,CAAC;AAEnE,eAAO,MAAM,iBAAiB,aAAc,oBAAoB,SAU/D,CAAC;AAEF,eAAO,MAAM,eAAe,aAAc,oBAAoB,SAY7D,CAAC;AAEF,eAAO,MAAM,iBAAiB,aAAc,oBAAoB,SAM/D,CAAC"}
@@ -0,0 +1,326 @@
1
+ import { NODE_TYPE } from "@my-react/react-reconciler";
2
+ import type { MyReactElementNode, RenderHookParams, UpdateQueue } from "@my-react/react";
3
+ import type { MyReactFiberRoot, MyReactFiberNode } from "@my-react/react-reconciler";
4
+ import type { ListTree } from "@my-react/react-shared";
5
+ export declare const createDispatch: (rootNode: any, rootFiber: MyReactFiberRoot, rootElement: MyReactElementNode, config: any) => {
6
+ enableUpdate: boolean;
7
+ enableAsyncLoad: boolean;
8
+ runtimeDom: {
9
+ hostContextMap: WeakMap<MyReactFiberNode, any>;
10
+ elementMap: WeakMap<MyReactFiberNode, MyReactFiberNode>;
11
+ };
12
+ runtimeRef: Record<"typeForRef" | "typeForCreate" | "typeForUpdate" | "typeForAppend" | "typeForNativeNode", NODE_TYPE>;
13
+ dispatchFiber(_fiber: MyReactFiberNode): void;
14
+ commitCreate(_fiber: MyReactFiberNode): void;
15
+ commitUpdate(_fiber: MyReactFiberNode): void;
16
+ commitAppend(_fiber: MyReactFiberNode): void;
17
+ commitPosition(_fiber: MyReactFiberNode): void;
18
+ commitSetRef(_fiber: MyReactFiberNode): void;
19
+ commitUnsetRef(_fiber: MyReactFiberNode): void;
20
+ commitClear(_fiber: MyReactFiberNode): void;
21
+ reconcileCommit(_fiber: MyReactFiberNode): void;
22
+ reconcileUpdate(_list: ListTree<MyReactFiberNode>): void;
23
+ patchToFiberInitial(_fiber: MyReactFiberNode): void;
24
+ patchToFiberUnmount(_fiber: MyReactFiberNode): void;
25
+ dispatchState(_params: UpdateQueue): void;
26
+ dispatchHook(_params: RenderHookParams): unknown;
27
+ dispatchPromise(_params: {
28
+ fiber?: MyReactFiberNode;
29
+ promise?: Promise<unknown>;
30
+ }): MyReactElementNode;
31
+ dispatchError(_params: {
32
+ fiber?: MyReactFiberNode;
33
+ error?: Error;
34
+ }): MyReactElementNode;
35
+ readonly rootNode: any;
36
+ readonly rootFiber: MyReactFiberNode;
37
+ isAppMounted: boolean;
38
+ isAppCrashed: boolean;
39
+ isAppUnmounted: boolean;
40
+ version: string;
41
+ mode: string;
42
+ enableNewEntry: boolean;
43
+ renderMode: string;
44
+ renderPackage?: string;
45
+ pendingCommitFiberList: ListTree<MyReactFiberNode>;
46
+ pendingCommitFiberPatch: import("@my-react/react-shared").PATCH_TYPE;
47
+ pendingAsyncLoadList: ListTree<MyReactFiberNode | Promise<any>>;
48
+ pendingChangedFiberList: ListTree<MyReactFiberNode>;
49
+ pendingUpdateFiberArray: import("@my-react/react-shared").UniqueArray<MyReactFiberNode>;
50
+ performanceLogTimeLimit: number;
51
+ uniqueIdCount: number;
52
+ beforeCommit?: () => void;
53
+ afterCommit?: () => void;
54
+ beforeUpdate?: () => void;
55
+ afterUpdate?: () => void;
56
+ beforeUnmount?: () => void;
57
+ afterUnmount?: () => void;
58
+ generateCommitList(_fiber: MyReactFiberNode): void;
59
+ generateChangedList(_fiber: MyReactFiberNode, withCheck?: boolean): void;
60
+ pendingCreate(_fiber: MyReactFiberNode): void;
61
+ pendingUpdate(_fiber: MyReactFiberNode): void;
62
+ pendingAppend(_fiber: MyReactFiberNode): void;
63
+ pendingPosition(_fiber: MyReactFiberNode): void;
64
+ pendingRef(_fiber: MyReactFiberNode): void;
65
+ pendingUnmount(_fiber: MyReactFiberNode, _pendingUnmount: MyReactFiberNode): void;
66
+ pendingEffect(_fiber: MyReactFiberNode, _effect: () => void, option?: {
67
+ stickyToHead?: boolean;
68
+ stickyToFoot?: boolean;
69
+ }): void;
70
+ pendingLayoutEffect(_fiber: MyReactFiberNode, _layoutEffect: () => void, option?: {
71
+ stickyToHead?: boolean;
72
+ stickyToFoot?: boolean;
73
+ }): void;
74
+ pendingInsertionEffect(_fiber: MyReactFiberNode, _insertionEffect: () => void, option?: {
75
+ stickyToHead?: boolean;
76
+ stickyToFoot?: boolean;
77
+ }): void;
78
+ patchToFiberUpdate(_fiber: MyReactFiberNode): void;
79
+ processFiber(_fiber: MyReactFiberNode): Promise<void>;
80
+ processPromise(_promise: import("@my-react/react-reconciler").PromiseWithState<unknown>): Promise<void>;
81
+ resolveStrict(_fiber: MyReactFiberNode): boolean;
82
+ resolveScope(_fiber: MyReactFiberNode): MyReactFiberNode;
83
+ resolveSuspenseValue(_fiber: MyReactFiberNode): MyReactElementNode;
84
+ resolveSuspenseFiber(_fiber: MyReactFiberNode): MyReactFiberNode;
85
+ resolveErrorBoundaries(_fiber: MyReactFiberNode): MyReactFiberNode;
86
+ resolveContextFiber(_fiber: MyReactFiberNode, _contextObject: import("@my-react/react").ContextObjectType<{
87
+ $$typeof: symbol;
88
+ value: unknown;
89
+ Context: {
90
+ $$typeof: symbol;
91
+ displayName: string;
92
+ };
93
+ }, {
94
+ $$typeof: symbol;
95
+ Context: {
96
+ $$typeof: symbol;
97
+ displayName: string;
98
+ };
99
+ }>): MyReactFiberNode;
100
+ resolveContextValue(_fiber: MyReactFiberNode, _contextObject: import("@my-react/react").ContextObjectType<{
101
+ $$typeof: symbol;
102
+ value: unknown;
103
+ Context: {
104
+ $$typeof: symbol;
105
+ displayName: string;
106
+ };
107
+ }, {
108
+ $$typeof: symbol;
109
+ Context: {
110
+ $$typeof: symbol;
111
+ displayName: string;
112
+ };
113
+ }>): Record<string, unknown>;
114
+ reconcileUnmount(): void;
115
+ shouldYield(): boolean;
116
+ resetUpdateFlowRuntimeFiber(): void;
117
+ getFiberTree(_fiber: MyReactFiberNode): string;
118
+ readPromise(_params: Promise<unknown>): unknown;
119
+ readContext(_params: import("@my-react/react").ContextObjectType<{
120
+ $$typeof: symbol;
121
+ value: unknown;
122
+ Context: {
123
+ $$typeof: symbol;
124
+ displayName: string;
125
+ };
126
+ }, {
127
+ $$typeof: symbol;
128
+ Context: {
129
+ $$typeof: symbol;
130
+ displayName: string;
131
+ };
132
+ }>): unknown;
133
+ runtimeMap: {
134
+ effectMap: WeakMap<MyReactFiberNode, ListTree<() => void>>;
135
+ layoutEffectMap: WeakMap<MyReactFiberNode, ListTree<() => void>>;
136
+ insertionEffectMap: WeakMap<MyReactFiberNode, ListTree<() => void>>;
137
+ unmountMap: WeakMap<MyReactFiberNode, ListTree<MyReactFiberNode>>;
138
+ eventMap: WeakMap<MyReactFiberNode, Record<string, ((...args: any[]) => void) & {
139
+ cb?: any;
140
+ }>>;
141
+ triggerCallbackMap: WeakMap<MyReactFiberNode, ListTree<() => void>>;
142
+ };
143
+ runtimeFiber: Record<"scheduledFiber" | "errorCatchFiber" | "nextWorkingFiber" | "retriggerFiber" | "visibleFiber", MyReactFiberNode>;
144
+ dispatcher: {
145
+ current: {
146
+ proxy: {
147
+ readContext: <T_1 = any>(Context: import("@my-react/react").ContextObjectType<{
148
+ $$typeof: symbol;
149
+ value: T_1;
150
+ Context: {
151
+ $$typeof: symbol;
152
+ displayName: string;
153
+ };
154
+ }, {
155
+ $$typeof: symbol;
156
+ Context: {
157
+ $$typeof: symbol;
158
+ displayName: string;
159
+ };
160
+ }> | Promise<T_1>) => T_1;
161
+ use: <T_1_1 = any>(Context: import("@my-react/react").ContextObjectType<{
162
+ $$typeof: symbol;
163
+ value: T_1_1;
164
+ Context: {
165
+ $$typeof: symbol;
166
+ displayName: string;
167
+ };
168
+ }, {
169
+ $$typeof: symbol;
170
+ Context: {
171
+ $$typeof: symbol;
172
+ displayName: string;
173
+ };
174
+ }> | Promise<T_1_1>) => T_1_1;
175
+ useCallback: <T_2 extends (...args: any) => any = (...args: any) => any>(callback: T_2, deps?: any[]) => T_2;
176
+ useContext: <T_3 = any>(Context: import("@my-react/react").ContextObjectType<{
177
+ $$typeof: symbol;
178
+ value: T_3;
179
+ Context: {
180
+ $$typeof: symbol;
181
+ displayName: string;
182
+ };
183
+ }, {
184
+ $$typeof: symbol;
185
+ Context: {
186
+ $$typeof: symbol;
187
+ displayName: string;
188
+ };
189
+ }>) => T_3;
190
+ useDebugValue: (...args: any[]) => unknown;
191
+ useDeferredValue: <T_4 = any>(value: T_4) => T_4;
192
+ useEffect: (action: () => any, deps?: any[]) => void;
193
+ useId: () => string;
194
+ useImperativeHandle: (ref: any, createHandle: import("@my-react/react").Reducer, deps: any[]) => unknown;
195
+ useInsertionEffect: (action: () => any, deps: any[]) => unknown;
196
+ useLayoutEffect: (action: () => any, deps?: any[]) => void;
197
+ useMemo: <T_5 = any>(action: () => T_5, deps?: any[]) => T_5;
198
+ useReducer: (reducer: import("@my-react/react").Reducer, initialArgs: any, init?: (...args: any) => any) => unknown;
199
+ useRef: <T_6 = any>(value: T_6) => {
200
+ current: T_6;
201
+ };
202
+ useState: <T_7 = any>(initial: T_7 | (() => T_7)) => [T_7, (t?: T_7 | ((t: T_7) => T_7)) => void];
203
+ useSignal: <T_8 = any>(initial: T_8 | (() => T_8)) => unknown;
204
+ useSyncExternalStore: (subscribe: () => any, getSnapshot: () => any, getServerSnapshot?: () => any) => unknown;
205
+ useTransition: () => [boolean, (cb: () => void) => void];
206
+ };
207
+ readContext: <T_1_2 = any>(Context: import("@my-react/react").ContextObjectType<{
208
+ $$typeof: symbol;
209
+ value: T_1_2;
210
+ Context: {
211
+ $$typeof: symbol;
212
+ displayName: string;
213
+ };
214
+ }, {
215
+ $$typeof: symbol;
216
+ Context: {
217
+ $$typeof: symbol;
218
+ displayName: string;
219
+ };
220
+ }> | Promise<T_1_2>) => T_1_2;
221
+ use: <T_1_3 = any>(Context: import("@my-react/react").ContextObjectType<{
222
+ $$typeof: symbol;
223
+ value: T_1_3;
224
+ Context: {
225
+ $$typeof: symbol;
226
+ displayName: string;
227
+ };
228
+ }, {
229
+ $$typeof: symbol;
230
+ Context: {
231
+ $$typeof: symbol;
232
+ displayName: string;
233
+ };
234
+ }> | Promise<T_1_3>) => T_1_3;
235
+ useCallback: <T_2_1 extends (...args: any) => any = (...args: any) => any>(callback: T_2_1, deps?: any[]) => T_2_1;
236
+ useContext: <T_3_1 = any>(Context: import("@my-react/react").ContextObjectType<{
237
+ $$typeof: symbol;
238
+ value: T_3_1;
239
+ Context: {
240
+ $$typeof: symbol;
241
+ displayName: string;
242
+ };
243
+ }, {
244
+ $$typeof: symbol;
245
+ Context: {
246
+ $$typeof: symbol;
247
+ displayName: string;
248
+ };
249
+ }>) => T_3_1;
250
+ useDebugValue: (...args: any[]) => unknown;
251
+ useDeferredValue: <T_4_1 = any>(value: T_4_1) => T_4_1;
252
+ useEffect: (action: () => any, deps?: any[]) => void;
253
+ useId: () => string;
254
+ useImperativeHandle: (ref: any, createHandle: import("@my-react/react").Reducer, deps: any[]) => unknown;
255
+ useInsertionEffect: (action: () => any, deps: any[]) => unknown;
256
+ useLayoutEffect: (action: () => any, deps?: any[]) => void;
257
+ useMemo: <T_5_1 = any>(action: () => T_5_1, deps?: any[]) => T_5_1;
258
+ useReducer: (reducer: import("@my-react/react").Reducer, initialArgs: any, init?: (...args: any) => any) => unknown;
259
+ useRef: <T_6_1 = any>(value: T_6_1) => {
260
+ current: T_6_1;
261
+ };
262
+ useState: <T_7_1 = any>(initial: T_7_1 | (() => T_7_1)) => [T_7_1, (t?: T_7_1 | ((t: T_7_1) => T_7_1)) => void];
263
+ useSignal: <T_8_1 = any>(initial: T_8_1 | (() => T_8_1)) => unknown;
264
+ useSyncExternalStore: (subscribe: () => any, getSnapshot: () => any, getServerSnapshot?: () => any) => unknown;
265
+ useTransition: () => [boolean, (cb: () => void) => void];
266
+ };
267
+ };
268
+ rootElement: MyReactElementNode;
269
+ trigger(_fiber: MyReactFiberNode, _state?: import("@my-react/react-shared").STATE_TYPE, cb?: () => void): void;
270
+ onFiberInitial(cb: (_fiber: MyReactFiberNode) => void): () => boolean;
271
+ onceFiberInitial(cb: (_fiber: MyReactFiberNode) => void): void;
272
+ onFiberUpdate(cb: (_fiber: MyReactFiberNode) => void): () => boolean;
273
+ onFiberChange(cb: (_list: ListTree<MyReactFiberNode>) => void): () => boolean;
274
+ onceFiberChange(cb: (_list: ListTree<MyReactFiberNode>) => void): void;
275
+ onceFiberUpdate(cb: (_fiber: MyReactFiberNode) => void): void;
276
+ onFiberUnmount(cb: (_fiber: MyReactFiberNode) => void): () => boolean;
277
+ onceFiberUnmount(cb: (_fiber: MyReactFiberNode) => void): void;
278
+ onFiberState(cb: (_fiber: MyReactFiberNode, _updater: UpdateQueue) => void): () => boolean;
279
+ onceFiberState(cb: (_fiber: MyReactFiberNode, _updater: UpdateQueue) => void): void;
280
+ onFiberTrigger(cb: (_fiber: MyReactFiberNode, _state: import("@my-react/react-reconciler").UpdateState) => void): () => boolean;
281
+ onceFiberTrigger(cb: (_fiber: MyReactFiberNode, _state: import("@my-react/react-reconciler").UpdateState) => void): void;
282
+ onFiberHMR(cb: (_fiber: MyReactFiberNode, _forceRefresh?: boolean) => void): () => boolean;
283
+ onceFiberHMR(cb: (_fiber: MyReactFiberNode, _forceRefresh?: boolean) => void): void;
284
+ onFiberWarn(cb: (_fiber: MyReactFiberNode, ...args: any) => void): () => boolean;
285
+ onceFiberWarn(cb: (_fiber: MyReactFiberNode, ...args: any) => void): void;
286
+ onFiberError(cb: (_fiber: MyReactFiberNode, ...args: any) => void): () => boolean;
287
+ onceFiberError(cb: (_fiber: MyReactFiberNode, ...args: any) => void): void;
288
+ onPerformanceWarn(cb: (_fiber: MyReactFiberNode) => void): () => boolean;
289
+ oncePerformanceWarn(cb: (_fiber: MyReactFiberNode) => void): void;
290
+ onBeforeFiberRun(cb: (_fiber: MyReactFiberNode) => void): () => boolean;
291
+ onceBeforeFiberRun(cb: (_fiber: MyReactFiberNode) => void): void;
292
+ onAfterFiberRun(cb: (_fiber: MyReactFiberNode) => void): () => boolean;
293
+ onceAfterFiberRun(cb: (_fiber: MyReactFiberNode) => void): void;
294
+ onInstanceInitial(cb: (_instance: import("@my-react/react").MyReactComponent<any, any, any>, _fiber: MyReactFiberNode) => void): () => boolean;
295
+ onceInstanceInitial(cb: (_instance: import("@my-react/react").MyReactComponent<any, any, any>, _fiber: MyReactFiberNode) => void): void;
296
+ onInstanceUpdate(cb: (_instance: import("@my-react/react").MyReactComponent<any, any, any>, _fiber: MyReactFiberNode) => void): () => boolean;
297
+ onceInstanceUpdate(cb: (_instance: import("@my-react/react").MyReactComponent<any, any, any>, _fiber: MyReactFiberNode) => void): void;
298
+ onInstanceState(cb: (_instance: import("@my-react/react").MyReactComponent<any, any, any>, _fiber: MyReactFiberNode, _updater: UpdateQueue) => void): () => boolean;
299
+ onceInstanceState(cb: (_instance: import("@my-react/react").MyReactComponent<any, any, any>, _fiber: MyReactFiberNode, _updater: UpdateQueue) => void): void;
300
+ onInstanceUnmount(cb: (_instance: import("@my-react/react").MyReactComponent<any, any, any>, _fiber: MyReactFiberNode) => void): () => boolean;
301
+ onceInstanceUnmount(cb: (_instance: import("@my-react/react").MyReactComponent<any, any, any>, _fiber: MyReactFiberNode) => void): void;
302
+ onHookInitial(cb: (_hook: import("@my-react/react-reconciler").MyReactHookNode) => void): () => boolean;
303
+ onceHookInitial(cb: (_hook: import("@my-react/react-reconciler").MyReactHookNode) => void): void;
304
+ onHookUpdate(cb: (_hook: import("@my-react/react-reconciler").MyReactHookNode) => void): () => boolean;
305
+ onceHookUpdate(cb: (_hook: import("@my-react/react-reconciler").MyReactHookNode) => void): void;
306
+ onHookUnmount(cb: (_hook: import("@my-react/react-reconciler").MyReactHookNode) => void): () => boolean;
307
+ onceHookUnmount(cb: (_hook: import("@my-react/react-reconciler").MyReactHookNode) => void): void;
308
+ onHookState(cb: (_hook: import("@my-react/react-reconciler").MyReactHookNode, _fiber: MyReactFiberNode, _updater: UpdateQueue) => void): () => boolean;
309
+ onceHookTrigger(cb: (_hook: import("@my-react/react-reconciler").MyReactHookNode, _fiber: MyReactFiberNode, _updater: UpdateQueue) => void): void;
310
+ onBeforeCommit(cb: () => void): () => boolean;
311
+ onceBeforeCommit(cb: () => void): void;
312
+ onAfterCommit(cb: () => void): () => boolean;
313
+ onceAfterCommit(cb: () => void): void;
314
+ onBeforeUpdate(cb: () => void): () => boolean;
315
+ onceBeforeUpdate(cb: () => void): void;
316
+ onAfterUpdate(cb: () => void): () => boolean;
317
+ onceAfterUpdate(cb: () => void): void;
318
+ onBeforeUnmount(cb: () => void): () => boolean;
319
+ onceBeforeUnmount(cb: () => void): void;
320
+ onAfterUnmount(cb: () => void): () => boolean;
321
+ onceAfterUnmount(cb: () => void): void;
322
+ readonly isMyReactInstance: boolean;
323
+ _reactInternals: import("@my-react/react").RenderFiber;
324
+ };
325
+ export type ReconcilerDispatch = ReturnType<typeof createDispatch>;
326
+ //# sourceMappingURL=dispatch.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dispatch.d.ts","sourceRoot":"","sources":["../../src/dispatch.ts"],"names":[],"mappings":"AAEA,OAAO,EAEL,SAAS,EAcV,MAAM,4BAA4B,CAAC;AAOpC,OAAO,KAAK,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AACzF,OAAO,KAAK,EAAE,gBAAgB,EAAE,gBAAgB,EAAO,MAAM,4BAA4B,CAAC;AAC1F,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAgBvD,eAAO,MAAM,cAAc,aAAc,GAAG,aAAa,gBAAgB,eAAe,kBAAkB,UAAU,GAAG;;;;;;;;0BAa7F,gBAAgB,GAAG,IAAI;yBAIxB,gBAAgB,GAAG,IAAI;yBAIvB,gBAAgB,GAAG,IAAI;yBAIvB,gBAAgB,GAAG,IAAI;2BAIrB,gBAAgB,GAAG,IAAI;yBAIzB,gBAAgB,GAAG,IAAI;2BAIrB,gBAAgB,GAAG,IAAI;wBAI1B,gBAAgB,GAAG,IAAI;4BAInB,gBAAgB,GAAG,IAAI;2BA0BxB,SAAS,gBAAgB,CAAC,GAAG,IAAI;gCAQ5B,gBAAgB,GAAG,IAAI;gCAIvB,gBAAgB,GAAG,IAAI;2BAI5B,WAAW,GAAG,IAAI;0BAInB,gBAAgB,GAAG,OAAO;6BAIvB;QAAE,KAAK,CAAC,EAAE,gBAAgB,CAAC;QAAC,OAAO,CAAC,EAAE,QAAQ,OAAO,CAAC,CAAA;KAAE,GAAG,kBAAkB;2BAI/E;QAAE,KAAK,CAAC,EAAE,gBAAgB,CAAC;QAAC,KAAK,CAAC,EAAE,KAAK,CAAA;KAAE,GAAG,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAiC1F,CAAC;AAEF,MAAM,MAAM,kBAAkB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC"}
@@ -0,0 +1,4 @@
1
+ import type { ReconcilerDispatch } from "./dispatch";
2
+ import type { MyReactFiberNode } from "@my-react/react-reconciler";
3
+ export declare const ReconcilerDispatchFiber: (renderDispatch: ReconcilerDispatch, fiber: MyReactFiberNode) => void;
4
+ //# sourceMappingURL=dispatchFiber.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dispatchFiber.d.ts","sourceRoot":"","sources":["../../src/dispatchFiber.ts"],"names":[],"mappings":"AAcA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AACrD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAEnE,eAAO,MAAM,uBAAuB,mBAAoB,kBAAkB,SAAS,gBAAgB,SAmBlG,CAAC"}
@@ -0,0 +1,8 @@
1
+ import type { ReconcilerDispatch } from "./dispatch";
2
+ import type { MyReactFiberNode } from "@my-react/react-reconciler";
3
+ export declare const initialMap: (dispatch: ReconcilerDispatch, fiber: MyReactFiberNode, config: any) => void;
4
+ export declare const unmountMap: (dispatch: ReconcilerDispatch, fiber: MyReactFiberNode) => void;
5
+ export declare const getFiberWithNativeNode: (fiber: MyReactFiberNode | null, transform: (f: MyReactFiberNode) => MyReactFiberNode | null) => MyReactFiberNode | null;
6
+ export declare const getValidParentFiberWithNode: (_dispatch: ReconcilerDispatch, _fiber: MyReactFiberNode) => MyReactFiberNode;
7
+ export declare const getInsertBeforeNodeFromSiblingAndParent: (fiber: MyReactFiberNode | null, parentFiber: MyReactFiberNode | null) => MyReactFiberNode | null;
8
+ //# sourceMappingURL=dispatchMap.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dispatchMap.d.ts","sourceRoot":"","sources":["../../src/dispatchMap.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AACrD,OAAO,KAAK,EAAE,gBAAgB,EAA2C,MAAM,4BAA4B,CAAC;AAE5G,eAAO,MAAM,UAAU,aAAc,kBAAkB,SAAS,gBAAgB,UAAU,GAAG,SAkC5F,CAAC;AAEF,eAAO,MAAM,UAAU,aAAc,kBAAkB,SAAS,gBAAgB,SAI/E,CAAC;AAEF,eAAO,MAAM,sBAAsB,UAC1B,gBAAgB,GAAG,IAAI,iBACf,gBAAgB,KAAK,gBAAgB,GAAG,IAAI,KAC1D,gBAAgB,GAAG,IAYrB,CAAC;AAEF,eAAO,MAAM,2BAA2B,cAAe,kBAAkB,UAAU,gBAAgB,qBAUlG,CAAC;AA4BF,eAAO,MAAM,uCAAuC,UAAW,gBAAgB,GAAG,IAAI,eAAe,gBAAgB,GAAG,IAAI,KAAG,gBAAgB,GAAG,IAUjJ,CAAC"}
@@ -0,0 +1,4 @@
1
+ import type { ReconcilerDispatch } from "./dispatch";
2
+ import type { MyReactFiberNode } from "@my-react/react-reconciler";
3
+ export declare const ReconcilerDispatchMount: (_dispatch: ReconcilerDispatch, _fiber: MyReactFiberNode, config: any) => void;
4
+ //# sourceMappingURL=dispatchMount.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dispatchMount.d.ts","sourceRoot":"","sources":["../../src/dispatchMount.ts"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AACrD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAMnE,eAAO,MAAM,uBAAuB,cAAe,kBAAkB,UAAU,gBAAgB,UAAU,GAAG,SAwF3G,CAAC"}
@@ -0,0 +1,17 @@
1
+ import { type MyReactElementNode } from "@my-react/react";
2
+ import { MyReactFiberNode } from "@my-react/react-reconciler";
3
+ import type { ReconcilerDispatch } from "./dispatch";
4
+ export type RenderContainer = Record<string, any> & {
5
+ __fiber__: MyReactFiberNode;
6
+ __container__: ReconcilerDispatch;
7
+ };
8
+ export declare const Reconciler: (_config: any) => {
9
+ createPortal: (_element: MyReactElementNode, _container: RenderContainer) => import("@my-react/react").MyReactElement;
10
+ createContainer: (_container: RenderContainer) => RenderContainer;
11
+ updateContainer: (_element: MyReactElementNode, _container: RenderContainer, _ignore: any, _cb: () => void) => void;
12
+ injectIntoDevTools: (_config: any) => Promise<void>;
13
+ injectIntoDevToolsWithSocketIO: (url: string, _config: any) => Promise<void>;
14
+ flushSync: <T extends any[] = any[], K = any>(action: (...args: T) => K, ...args: T) => K;
15
+ batchedUpdates: <T extends any[] = any[], K = any>(action: (...args: T) => K, ...args: T) => K;
16
+ };
17
+ //# sourceMappingURL=feature.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"feature.d.ts","sourceRoot":"","sources":["../../src/feature.ts"],"names":[],"mappings":"AAAA,OAAO,EAA8C,KAAK,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AACtG,OAAO,EACL,gBAAgB,EASjB,MAAM,4BAA4B,CAAC;AAUpC,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAOrD,MAAM,MAAM,eAAe,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG;IAClD,SAAS,EAAE,gBAAgB,CAAC;IAC5B,aAAa,EAAE,kBAAkB,CAAC;CACnC,CAAC;AAGF,eAAO,MAAM,UAAU,YAAa,GAAG;;kCAKA,eAAe;gCAYjB,kBAAkB,cAAc,eAAe,WAAW,GAAG,OAAO,MAAM,IAAI;kCA6DtE,GAAG;0CAaK,MAAM,WAAW,GAAG;;;CAsBxE,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { ReconcilerDispatch } from "./dispatch";
2
+ export declare const autoSetDevHMR: (dispatch: ReconcilerDispatch) => void;
3
+ //# sourceMappingURL=hmr.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"hmr.d.ts","sourceRoot":"","sources":["../../src/hmr.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAOrD,eAAO,MAAM,aAAa,aAAc,kBAAkB,SAYzD,CAAC"}
@@ -0,0 +1,13 @@
1
+ import type { MyReactFiberNode } from "@my-react/react-reconciler";
2
+ import type createReconcilerType from "react-reconciler";
3
+ export * from "@my-react/react-reconciler";
4
+ export declare const version: string;
5
+ export declare const createReconciler: typeof createReconcilerType;
6
+ export interface FiberNode<T = Record<string, any>> extends MyReactFiberNode {
7
+ stateNode: T;
8
+ return: FiberNode | null;
9
+ child: FiberNode | null;
10
+ sibling: FiberNode | null;
11
+ alternate?: FiberNode | null;
12
+ }
13
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AACnE,OAAO,KAAK,oBAAoB,MAAM,kBAAkB,CAAC;AAEzD,cAAc,4BAA4B,CAAC;AAE3C,eAAO,MAAM,OAAO,QAAc,CAAC;AAEnC,eAAO,MAAM,gBAAgB,6BAAuD,CAAC;AAErF,MAAM,WAAW,SAAS,CAAC,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAE,SAAQ,gBAAgB;IAC1E,SAAS,EAAE,CAAC,CAAC;IACb,MAAM,EAAE,SAAS,GAAG,IAAI,CAAC;IACzB,KAAK,EAAE,SAAS,GAAG,IAAI,CAAC;IACxB,OAAO,EAAE,SAAS,GAAG,IAAI,CAAC;IAC1B,SAAS,CAAC,EAAE,SAAS,GAAG,IAAI,CAAC;CAC9B"}
@@ -0,0 +1,2 @@
1
+ export declare const loadScript: (url: string) => Promise<void>;
2
+ //# sourceMappingURL=polyfill.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"polyfill.d.ts","sourceRoot":"","sources":["../../src/polyfill.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,UAAU,QAAS,MAAM,kBAmDrC,CAAC"}
@@ -0,0 +1,6 @@
1
+ import { type MyReactElementNode } from "@my-react/react";
2
+ import type { RenderContainer } from "./feature";
3
+ import type { MyReactFiberNode, CustomRenderDispatch } from "@my-react/react-reconciler";
4
+ export declare const createPortal: (_element: MyReactElementNode, _container: RenderContainer) => import("@my-react/react").MyReactElement;
5
+ export declare const nextWorkPortal: (renderDispatch: CustomRenderDispatch, fiber: MyReactFiberNode) => void;
6
+ //# sourceMappingURL=portal.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"portal.d.ts","sourceRoot":"","sources":["../../src/portal.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,kBAAkB,EAAiB,MAAM,iBAAiB,CAAC;AAIzE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AACjD,OAAO,KAAK,EAAE,gBAAgB,EAAyB,oBAAoB,EAAE,MAAM,4BAA4B,CAAC;AAEhH,eAAO,MAAM,YAAY,aAAc,kBAAkB,cAAc,eAAe,6CAIrF,CAAC;AAEF,eAAO,MAAM,cAAc,mBAAoB,oBAAoB,SAAS,gBAAgB,SAgB3F,CAAC"}
@@ -0,0 +1,5 @@
1
+ /**
2
+ * @internal
3
+ */
4
+ export declare const prepareScheduler: () => void;
5
+ //# sourceMappingURL=scheduler.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"scheduler.d.ts","sourceRoot":"","sources":["../../src/scheduler.ts"],"names":[],"mappings":"AAKA;;GAEG;AACH,eAAO,MAAM,gBAAgB,YAU5B,CAAC"}
package/index.d.ts ADDED
@@ -0,0 +1 @@
1
+ export * from "./dist/types";
package/index.js ADDED
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+
3
+ const React = require("react");
4
+
5
+ if (!React.isMyReact) {
6
+ throw new Error(
7
+ "@my-react/react-reconciler-compact requires 'React' to be set as '@my-react/react'. Please ensure you have set the alias correctly in your bundler configuration."
8
+ );
9
+ }
10
+
11
+ if (process.env.NODE_ENV === "production") {
12
+ module.exports = require("./dist/cjs/index.production");
13
+ } else {
14
+ module.exports = require("./dist/cjs/index.development");
15
+ }
package/package.json ADDED
@@ -0,0 +1,49 @@
1
+ {
2
+ "name": "@my-react/react-reconciler-compact",
3
+ "description": "@my-react/react-reconciler-compact",
4
+ "author": "MrWangJustToDo",
5
+ "license": "MIT",
6
+ "version": "0.0.1",
7
+ "main": "index.js",
8
+ "types": "index.d.ts",
9
+ "files": [
10
+ "dist",
11
+ "index.js",
12
+ "index.d.ts"
13
+ ],
14
+ "repository": {
15
+ "type": "git",
16
+ "url": "https://github.com/MrWangJustToDo/MyReact",
17
+ "directory": "packages/myreact-reconciler-compact"
18
+ },
19
+ "homepage": "https://mrwangjusttodo.github.io/MyReact",
20
+ "exports": {
21
+ ".": {
22
+ "default": "./index.js",
23
+ "types": "./index.d.ts"
24
+ },
25
+ "./package.json": "./package.json"
26
+ },
27
+ "buildOptions": [
28
+ {
29
+ "input": "./src/index.ts",
30
+ "output": [
31
+ {
32
+ "dir": "./dist",
33
+ "entryFileNames": "cjs/index.js",
34
+ "format": "cjs",
35
+ "type": true,
36
+ "multiple": true
37
+ }
38
+ ]
39
+ }
40
+ ],
41
+ "devDependencies": {
42
+ "@my-react/react-reconciler": "^0.3.10",
43
+ "@my-react/react-shared": "^0.3.10",
44
+ "@types/react-reconciler": "^0.31.0"
45
+ },
46
+ "peerDependencies": {
47
+ "@my-react/react": ">=0.3.10"
48
+ }
49
+ }