bippy 0.6.1-dev.3a24abf → 0.6.1-dev.b88fcb4

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 (48) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +7 -1
  3. package/dist/core.cjs +1 -1
  4. package/dist/core.d.cts +39 -41
  5. package/dist/core.d.ts +39 -41
  6. package/dist/core.js +1 -1
  7. package/dist/core2.cjs +1 -1
  8. package/dist/core2.d.cts +11 -3
  9. package/dist/core2.d.ts +11 -3
  10. package/dist/core2.js +1 -1
  11. package/dist/{types.d.cts → errors.d.cts} +205 -31
  12. package/dist/{types.d.ts → errors.d.ts} +205 -31
  13. package/dist/index.cjs +1 -1
  14. package/dist/index.d.cts +11 -3
  15. package/dist/index.d.ts +11 -3
  16. package/dist/index.iife.js +1 -1
  17. package/dist/index.js +1 -1
  18. package/dist/install-hook-only.cjs +1 -1
  19. package/dist/install-hook-only.d.cts +8 -0
  20. package/dist/install-hook-only.d.ts +8 -0
  21. package/dist/install-hook-only.iife.js +1 -1
  22. package/dist/install-hook-only.js +1 -1
  23. package/dist/rdt-hook.cjs +1 -1
  24. package/dist/rdt-hook.js +1 -1
  25. package/dist/source.cjs +13 -13
  26. package/dist/source.d.cts +27 -9
  27. package/dist/source.d.ts +27 -9
  28. package/dist/source.js +13 -13
  29. package/package.json +10 -6
  30. package/src/core.ts +269 -224
  31. package/src/errors.ts +99 -0
  32. package/src/rdt-hook.ts +154 -99
  33. package/src/react-internals/generated/react-work-tags.ts +314 -0
  34. package/src/react-internals/index.ts +67 -0
  35. package/src/react-internals/semver.ts +78 -0
  36. package/src/{types.ts → react-internals/types.ts} +13 -3
  37. package/src/source/error-stack.ts +11 -0
  38. package/src/source/get-display-name-from-source.ts +1 -1
  39. package/src/source/get-source.ts +2 -2
  40. package/src/source/index.ts +9 -1
  41. package/src/source/inspect-hooks.ts +199 -165
  42. package/src/source/owner-stack.ts +26 -39
  43. package/src/source/parse-debug-stack.ts +4 -4
  44. package/src/source/parse-hook-names.ts +1 -1
  45. package/src/source/symbolication.ts +468 -101
  46. package/src/generated/react-work-tags.ts +0 -169
  47. package/src/react-internals.ts +0 -67
  48. package/src/unsubscribe.ts +0 -17
@@ -1,6 +1,38 @@
1
+ /**
2
+ * @license bippy
3
+ *
4
+ * Copyright (c) Aiden Bai
5
+ *
6
+ * This source code is licensed under the MIT license found in the
7
+ * LICENSE file in the root directory of this source tree.
8
+ */
1
9
  import { ReactNode } from "react";
2
10
  import ReactReconciler from "react-reconciler";
3
- //#region src/generated/react-work-tags.d.ts
11
+ //#region src/react-internals/generated/react-work-tags.d.ts
12
+ declare const ReactBuildType: {
13
+ readonly Development: 1;
14
+ readonly Production: 0;
15
+ };
16
+ declare const ReactFiberFlags: {
17
+ readonly ChildDeletion: 16;
18
+ readonly Cloned: 8;
19
+ readonly ContentReset: 32;
20
+ readonly Hydrating: 4096;
21
+ readonly PerformedWork: 1;
22
+ readonly Placement: 2;
23
+ readonly Snapshot: 1024;
24
+ readonly Update: 4;
25
+ readonly Visibility: 8192;
26
+ };
27
+ declare const ReactSymbols: {
28
+ readonly CONCURRENT_MODE_NUMBER: 60111;
29
+ readonly CONCURRENT_MODE_SYMBOL_DESCRIPTION: "react.concurrent_mode";
30
+ readonly CONCURRENT_MODE_SYMBOL_STRING: "Symbol(react.concurrent_mode)";
31
+ readonly DEPRECATED_ASYNC_MODE_SYMBOL_DESCRIPTION: "react.async_mode";
32
+ readonly DEPRECATED_ASYNC_MODE_SYMBOL_STRING: "Symbol(react.async_mode)";
33
+ readonly ELEMENT_SYMBOL_STRING: "Symbol(react.transitional.element)";
34
+ readonly LEGACY_ELEMENT_SYMBOL_STRING: "Symbol(react.element)";
35
+ };
4
36
  interface ReactWorkTagMap {
5
37
  ActivityComponent: number;
6
38
  CacheComponent: number;
@@ -37,8 +69,116 @@ interface ReactWorkTagMap {
37
69
  ViewTransitionComponent: number;
38
70
  YieldComponent: number;
39
71
  }
40
- declare const ReactWorkTags: {
41
- readonly "17.0.1": {
72
+ declare const reactWorkTagsByVersion: {
73
+ readonly "16.0.0": {
74
+ readonly ActivityComponent: -1;
75
+ readonly CacheComponent: -1;
76
+ readonly ClassComponent: 2;
77
+ readonly ContextConsumer: 12;
78
+ readonly ContextProvider: 13;
79
+ readonly CoroutineComponent: 7;
80
+ readonly CoroutineHandlerPhase: 8;
81
+ readonly DehydratedSuspenseComponent: -1;
82
+ readonly ForwardRef: 14;
83
+ readonly Fragment: 10;
84
+ readonly FunctionComponent: 1;
85
+ readonly HostComponent: 5;
86
+ readonly HostHoistable: -1;
87
+ readonly HostPortal: 4;
88
+ readonly HostRoot: 3;
89
+ readonly HostSingleton: -1;
90
+ readonly HostText: 6;
91
+ readonly IncompleteClassComponent: -1;
92
+ readonly IncompleteFunctionComponent: -1;
93
+ readonly IndeterminateComponent: 0;
94
+ readonly LazyComponent: -1;
95
+ readonly LegacyHiddenComponent: -1;
96
+ readonly MemoComponent: -1;
97
+ readonly Mode: 11;
98
+ readonly OffscreenComponent: -1;
99
+ readonly Profiler: 15;
100
+ readonly ScopeComponent: -1;
101
+ readonly SimpleMemoComponent: -1;
102
+ readonly SuspenseComponent: 16;
103
+ readonly SuspenseListComponent: -1;
104
+ readonly Throw: -1;
105
+ readonly TracingMarkerComponent: -1;
106
+ readonly ViewTransitionComponent: -1;
107
+ readonly YieldComponent: 9;
108
+ };
109
+ readonly "16.4.3-alpha": {
110
+ readonly ActivityComponent: -1;
111
+ readonly CacheComponent: -1;
112
+ readonly ClassComponent: 2;
113
+ readonly ContextConsumer: 11;
114
+ readonly ContextProvider: 12;
115
+ readonly CoroutineComponent: -1;
116
+ readonly CoroutineHandlerPhase: -1;
117
+ readonly DehydratedSuspenseComponent: -1;
118
+ readonly ForwardRef: 13;
119
+ readonly Fragment: 9;
120
+ readonly FunctionComponent: 0;
121
+ readonly HostComponent: 7;
122
+ readonly HostHoistable: -1;
123
+ readonly HostPortal: 6;
124
+ readonly HostRoot: 5;
125
+ readonly HostSingleton: -1;
126
+ readonly HostText: 8;
127
+ readonly IncompleteClassComponent: -1;
128
+ readonly IncompleteFunctionComponent: -1;
129
+ readonly IndeterminateComponent: 4;
130
+ readonly LazyComponent: -1;
131
+ readonly LegacyHiddenComponent: -1;
132
+ readonly MemoComponent: -1;
133
+ readonly Mode: 10;
134
+ readonly OffscreenComponent: -1;
135
+ readonly Profiler: 15;
136
+ readonly ScopeComponent: -1;
137
+ readonly SimpleMemoComponent: -1;
138
+ readonly SuspenseComponent: 16;
139
+ readonly SuspenseListComponent: -1;
140
+ readonly Throw: -1;
141
+ readonly TracingMarkerComponent: -1;
142
+ readonly ViewTransitionComponent: -1;
143
+ readonly YieldComponent: -1;
144
+ };
145
+ readonly "16.6.0-beta.0": {
146
+ readonly ActivityComponent: -1;
147
+ readonly CacheComponent: -1;
148
+ readonly ClassComponent: 1;
149
+ readonly ContextConsumer: 9;
150
+ readonly ContextProvider: 10;
151
+ readonly CoroutineComponent: -1;
152
+ readonly CoroutineHandlerPhase: -1;
153
+ readonly DehydratedSuspenseComponent: 18;
154
+ readonly ForwardRef: 11;
155
+ readonly Fragment: 7;
156
+ readonly FunctionComponent: 0;
157
+ readonly HostComponent: 5;
158
+ readonly HostHoistable: -1;
159
+ readonly HostPortal: 4;
160
+ readonly HostRoot: 3;
161
+ readonly HostSingleton: -1;
162
+ readonly HostText: 6;
163
+ readonly IncompleteClassComponent: 17;
164
+ readonly IncompleteFunctionComponent: -1;
165
+ readonly IndeterminateComponent: 2;
166
+ readonly LazyComponent: 16;
167
+ readonly LegacyHiddenComponent: -1;
168
+ readonly MemoComponent: 14;
169
+ readonly Mode: 8;
170
+ readonly OffscreenComponent: -1;
171
+ readonly Profiler: 12;
172
+ readonly ScopeComponent: -1;
173
+ readonly SimpleMemoComponent: 15;
174
+ readonly SuspenseComponent: 13;
175
+ readonly SuspenseListComponent: 19;
176
+ readonly Throw: -1;
177
+ readonly TracingMarkerComponent: -1;
178
+ readonly ViewTransitionComponent: -1;
179
+ readonly YieldComponent: -1;
180
+ };
181
+ readonly "17.0.0-alpha": {
42
182
  readonly ActivityComponent: -1;
43
183
  readonly CacheComponent: -1;
44
184
  readonly ClassComponent: 1;
@@ -111,32 +251,16 @@ declare const ReactWorkTags: {
111
251
  readonly YieldComponent: -1;
112
252
  };
113
253
  };
114
- type ReactWorkTagVersion = keyof typeof ReactWorkTags;
115
- declare const ActivityComponentTag: 31;
116
- declare const ClassComponentTag: 1;
117
- declare const ContextConsumerTag: 9;
118
- declare const DehydratedSuspenseComponentTag: 18;
119
- declare const ForwardRefTag: 11;
120
- declare const FragmentTag: 7;
121
- declare const FunctionComponentTag: 0;
122
- declare const HostComponentTag: 5;
123
- declare const HostHoistableTag: 26;
124
- declare const HostPortalTag: 4;
125
- declare const HostRootTag: 3;
126
- declare const HostSingletonTag: 27;
127
- declare const HostTextTag: 6;
128
- declare const LazyComponentTag: 16;
129
- declare const LegacyHiddenComponentTag: 23;
130
- declare const MemoComponentTag: 14;
131
- declare const OffscreenComponentTag: 22;
132
- declare const SimpleMemoComponentTag: 15;
133
- declare const SuspenseComponentTag: 13;
134
- declare const SuspenseListComponentTag: 19;
135
- declare const ViewTransitionComponentTag: 30;
136
- type ReactWorkTag = Exclude<(typeof ReactWorkTags)[ReactWorkTagVersion][keyof ReactWorkTagMap], -1>;
137
- type HostWorkTag = typeof HostComponentTag | typeof HostHoistableTag | typeof HostSingletonTag | typeof HostTextTag;
254
+ type ReactWorkTagVersion = keyof typeof reactWorkTagsByVersion;
255
+ interface GetReactWorkTags {
256
+ <Version extends ReactWorkTagVersion>(reactVersion: Version): Readonly<(typeof reactWorkTagsByVersion)[Version]>;
257
+ (reactVersion: string): Readonly<ReactWorkTagMap>;
258
+ }
259
+ type ReactWorkTag = Exclude<(typeof reactWorkTagsByVersion)[ReactWorkTagVersion][keyof ReactWorkTagMap], -1>;
260
+ type HostWorkTag = Exclude<(typeof reactWorkTagsByVersion)[ReactWorkTagVersion]["HostComponent"] | (typeof reactWorkTagsByVersion)[ReactWorkTagVersion]["HostHoistable"] | (typeof reactWorkTagsByVersion)[ReactWorkTagVersion]["HostSingleton"] | (typeof reactWorkTagsByVersion)[ReactWorkTagVersion]["HostText"], -1>;
261
+ declare const getReactWorkTags: GetReactWorkTags;
138
262
  //#endregion
139
- //#region src/types.d.ts
263
+ //#region src/react-internals/types.d.ts
140
264
  type BundleType = ReactReconciler.BundleType;
141
265
  type Flags = ReactReconciler.Flags;
142
266
  type HookType = ReactReconciler.HookType;
@@ -171,7 +295,11 @@ interface ContextDependency<T> extends Omit<ReactReconciler.ContextDependency<T>
171
295
  memoizedValue?: T;
172
296
  observedBits?: number;
173
297
  }
298
+ interface DebugThenableState {
299
+ thenables?: unknown[];
300
+ }
174
301
  interface Dependencies extends Omit<ReactReconciler.Dependencies, "firstContext"> {
302
+ _debugThenableState?: DebugThenableState | unknown[];
175
303
  firstContext: ContextDependency<unknown> | null;
176
304
  }
177
305
  interface Effect {
@@ -193,6 +321,10 @@ interface ReactDebugInfo {
193
321
  env?: string;
194
322
  name?: string;
195
323
  }
324
+ interface ReactMemoCache {
325
+ data: unknown[][];
326
+ index: number;
327
+ }
196
328
  interface FiberDebugSource extends Source {
197
329
  columnNumber?: number;
198
330
  }
@@ -200,7 +332,7 @@ interface FiberUpdateQueue {
200
332
  [key: string]: unknown;
201
333
  dispatch?: unknown;
202
334
  lastEffect: Effect | null;
203
- memoCache?: unknown;
335
+ memoCache?: ReactMemoCache;
204
336
  }
205
337
  interface Fiber<T = unknown> extends Omit<ReactReconciler.Fiber, "alternate" | "_debugOwner" | "_debugSource" | "child" | "deletions" | "dependencies" | "memoizedProps" | "memoizedState" | "pendingProps" | "return" | "sibling" | "stateNode" | "tag" | "updateQueue"> {
206
338
  _debugInfo?: ReactDebugInfo[];
@@ -221,7 +353,7 @@ interface Fiber<T = unknown> extends Omit<ReactReconciler.Fiber, "alternate" | "
221
353
  sibling: Fiber | null;
222
354
  stateNode: T;
223
355
  tag: WorkTag;
224
- updateQueue: FiberUpdateQueue;
356
+ updateQueue: FiberUpdateQueue | null;
225
357
  }
226
358
  interface HostFiber<T = unknown> extends Fiber<T> {
227
359
  tag: HostWorkTag;
@@ -288,4 +420,46 @@ declare global {
288
420
  var __REACT_DEVTOOLS_GLOBAL_HOOK__: ReactDevToolsGlobalHook | undefined;
289
421
  }
290
422
  //#endregion
291
- export { ForwardRefTag as $, ReactDevToolsGlobalHook as A, ServerComponentInfo as B, OpaqueRoot as C, ReactContext as D, ReactConsumer as E, RefObject as F, Thenable as G, SuspenseHydrationCallbacks as H, RendererDispatcherRef as I, WorkTag as J, TransitionTracingCallbacks as K, RoleSelector as L, ReactProvider as M, ReactProviderType as N, ReactDebugInfo as O, ReactRenderer as P, DehydratedSuspenseComponentTag as Q, RootTag as R, OpaqueHandle as S, React$AbstractComponent as T, TestNameSelector as U, Source as V, TextSelector as W, ClassComponentTag as X, ActivityComponentTag as Y, ContextConsumerTag as Z, LanePriority as _, Dependencies as a, HostRootTag as at, MemoizedState as b, Fiber as c, LazyComponentTag as ct, FiberUpdateQueue as d, OffscreenComponentTag as dt, FragmentTag as et, Flags as f, SimpleMemoComponentTag as ft, HostFiber as g, HostConfig as h, ViewTransitionComponentTag as ht, CurrentDispatcherRef as i, HostPortalTag as it, ReactPortal as j, ReactDevToolsEventHandler as k, FiberDebugSource as l, LegacyHiddenComponentTag as lt, HookType as m, SuspenseListComponentTag as mt, ComponentSelector as n, HostComponentTag as nt, DevToolsConfig as o, HostSingletonTag as ot, HasPseudoClassSelector as p, SuspenseComponentTag as pt, TypeOfMode as q, ContextDependency as r, HostHoistableTag as rt, Effect as s, HostTextTag as st, BundleType as t, FunctionComponentTag as tt, FiberRoot as u, MemoComponentTag as ut, Lanes as v, Props as w, MutableSource as x, LegacyDispatcherRef as y, Selector as z };
423
+ //#region src/react-internals/index.d.ts
424
+ declare const getReactWorkTagsForRenderer: (renderer?: ReactRenderer | null) => Readonly<ReactWorkTagMap>;
425
+ declare const setReactWorkTagsForFiber: (fiber: Fiber, renderer?: ReactRenderer) => void;
426
+ declare const getReactWorkTagsForFiber: (fiber: Fiber) => Readonly<ReactWorkTagMap>;
427
+ declare const MutationMask: number;
428
+ //#endregion
429
+ //#region src/errors.d.ts
430
+ declare class BippyError extends Error {
431
+ constructor(message: string, cause?: unknown);
432
+ }
433
+ declare class BippyInstrumentationError extends BippyError {
434
+ readonly callbackName: string;
435
+ readonly instrumentationName: string;
436
+ constructor(instrumentationName: string, callbackName: string, cause: unknown);
437
+ }
438
+ declare class BippyReactDevToolsError extends BippyError {
439
+ readonly callbackName: string;
440
+ constructor(callbackName: string, cause: unknown);
441
+ }
442
+ declare class BippyHookListenerError extends BippyError {
443
+ readonly listenerName: string;
444
+ constructor(listenerName: string, cause: unknown);
445
+ }
446
+ declare class BippyHookInstallationError extends BippyError {
447
+ constructor(cause: unknown);
448
+ }
449
+ declare class BippyReactBuildError extends BippyError {
450
+ constructor(message: string, cause?: unknown);
451
+ }
452
+ declare class BippyHookInspectionError extends BippyError {
453
+ constructor(message: string, cause?: unknown);
454
+ }
455
+ declare class BippyUnsupportedHookError extends BippyHookInspectionError {
456
+ constructor(message: string, cause?: unknown);
457
+ }
458
+ declare class BippyHookRenderError extends BippyHookInspectionError {
459
+ constructor(message: string, cause?: unknown);
460
+ }
461
+ declare class BippySourceMapError extends BippyError {
462
+ constructor(message: string, cause?: unknown);
463
+ }
464
+ //#endregion
465
+ export { RoleSelector as $, HostConfig as A, React$AbstractComponent as B, Fiber as C, Flags as D, FiberUpdateQueue as E, MemoizedState as F, ReactDevToolsGlobalHook as G, ReactContext as H, MutableSource as I, ReactProvider as J, ReactMemoCache as K, OpaqueHandle as L, LanePriority as M, Lanes as N, HasPseudoClassSelector as O, LegacyDispatcherRef as P, RendererDispatcherRef as Q, OpaqueRoot as R, Effect as S, FiberRoot as T, ReactDebugInfo as U, ReactConsumer as V, ReactDevToolsEventHandler as W, ReactRenderer as X, ReactProviderType as Y, RefObject as Z, ContextDependency as _, ReactWorkTagVersion as _t, BippyHookRenderError as a, TestNameSelector as at, Dependencies as b, BippyReactDevToolsError as c, TransitionTracingCallbacks as ct, MutationMask as d, HostWorkTag as dt, RootTag as et, getReactWorkTagsForFiber as f, ReactBuildType as ft, ComponentSelector as g, ReactWorkTagMap as gt, BundleType as h, ReactWorkTag as ht, BippyHookListenerError as i, SuspenseHydrationCallbacks as it, HostFiber as j, HookType as k, BippySourceMapError as l, TypeOfMode as lt, setReactWorkTagsForFiber as m, ReactSymbols as mt, BippyHookInspectionError as n, ServerComponentInfo as nt, BippyInstrumentationError as o, TextSelector as ot, getReactWorkTagsForRenderer as p, ReactFiberFlags as pt, ReactPortal as q, BippyHookInstallationError as r, Source as rt, BippyReactBuildError as s, Thenable as st, BippyError as t, Selector as tt, BippyUnsupportedHookError as u, WorkTag as ut, CurrentDispatcherRef as v, getReactWorkTags as vt, FiberDebugSource as w, DevToolsConfig as x, DebugThenableState as y, Props as z };
@@ -1,6 +1,38 @@
1
+ /**
2
+ * @license bippy
3
+ *
4
+ * Copyright (c) Aiden Bai
5
+ *
6
+ * This source code is licensed under the MIT license found in the
7
+ * LICENSE file in the root directory of this source tree.
8
+ */
1
9
  import { ReactNode } from "react";
2
10
  import ReactReconciler from "react-reconciler";
3
- //#region src/generated/react-work-tags.d.ts
11
+ //#region src/react-internals/generated/react-work-tags.d.ts
12
+ declare const ReactBuildType: {
13
+ readonly Development: 1;
14
+ readonly Production: 0;
15
+ };
16
+ declare const ReactFiberFlags: {
17
+ readonly ChildDeletion: 16;
18
+ readonly Cloned: 8;
19
+ readonly ContentReset: 32;
20
+ readonly Hydrating: 4096;
21
+ readonly PerformedWork: 1;
22
+ readonly Placement: 2;
23
+ readonly Snapshot: 1024;
24
+ readonly Update: 4;
25
+ readonly Visibility: 8192;
26
+ };
27
+ declare const ReactSymbols: {
28
+ readonly CONCURRENT_MODE_NUMBER: 60111;
29
+ readonly CONCURRENT_MODE_SYMBOL_DESCRIPTION: "react.concurrent_mode";
30
+ readonly CONCURRENT_MODE_SYMBOL_STRING: "Symbol(react.concurrent_mode)";
31
+ readonly DEPRECATED_ASYNC_MODE_SYMBOL_DESCRIPTION: "react.async_mode";
32
+ readonly DEPRECATED_ASYNC_MODE_SYMBOL_STRING: "Symbol(react.async_mode)";
33
+ readonly ELEMENT_SYMBOL_STRING: "Symbol(react.transitional.element)";
34
+ readonly LEGACY_ELEMENT_SYMBOL_STRING: "Symbol(react.element)";
35
+ };
4
36
  interface ReactWorkTagMap {
5
37
  ActivityComponent: number;
6
38
  CacheComponent: number;
@@ -37,8 +69,116 @@ interface ReactWorkTagMap {
37
69
  ViewTransitionComponent: number;
38
70
  YieldComponent: number;
39
71
  }
40
- declare const ReactWorkTags: {
41
- readonly "17.0.1": {
72
+ declare const reactWorkTagsByVersion: {
73
+ readonly "16.0.0": {
74
+ readonly ActivityComponent: -1;
75
+ readonly CacheComponent: -1;
76
+ readonly ClassComponent: 2;
77
+ readonly ContextConsumer: 12;
78
+ readonly ContextProvider: 13;
79
+ readonly CoroutineComponent: 7;
80
+ readonly CoroutineHandlerPhase: 8;
81
+ readonly DehydratedSuspenseComponent: -1;
82
+ readonly ForwardRef: 14;
83
+ readonly Fragment: 10;
84
+ readonly FunctionComponent: 1;
85
+ readonly HostComponent: 5;
86
+ readonly HostHoistable: -1;
87
+ readonly HostPortal: 4;
88
+ readonly HostRoot: 3;
89
+ readonly HostSingleton: -1;
90
+ readonly HostText: 6;
91
+ readonly IncompleteClassComponent: -1;
92
+ readonly IncompleteFunctionComponent: -1;
93
+ readonly IndeterminateComponent: 0;
94
+ readonly LazyComponent: -1;
95
+ readonly LegacyHiddenComponent: -1;
96
+ readonly MemoComponent: -1;
97
+ readonly Mode: 11;
98
+ readonly OffscreenComponent: -1;
99
+ readonly Profiler: 15;
100
+ readonly ScopeComponent: -1;
101
+ readonly SimpleMemoComponent: -1;
102
+ readonly SuspenseComponent: 16;
103
+ readonly SuspenseListComponent: -1;
104
+ readonly Throw: -1;
105
+ readonly TracingMarkerComponent: -1;
106
+ readonly ViewTransitionComponent: -1;
107
+ readonly YieldComponent: 9;
108
+ };
109
+ readonly "16.4.3-alpha": {
110
+ readonly ActivityComponent: -1;
111
+ readonly CacheComponent: -1;
112
+ readonly ClassComponent: 2;
113
+ readonly ContextConsumer: 11;
114
+ readonly ContextProvider: 12;
115
+ readonly CoroutineComponent: -1;
116
+ readonly CoroutineHandlerPhase: -1;
117
+ readonly DehydratedSuspenseComponent: -1;
118
+ readonly ForwardRef: 13;
119
+ readonly Fragment: 9;
120
+ readonly FunctionComponent: 0;
121
+ readonly HostComponent: 7;
122
+ readonly HostHoistable: -1;
123
+ readonly HostPortal: 6;
124
+ readonly HostRoot: 5;
125
+ readonly HostSingleton: -1;
126
+ readonly HostText: 8;
127
+ readonly IncompleteClassComponent: -1;
128
+ readonly IncompleteFunctionComponent: -1;
129
+ readonly IndeterminateComponent: 4;
130
+ readonly LazyComponent: -1;
131
+ readonly LegacyHiddenComponent: -1;
132
+ readonly MemoComponent: -1;
133
+ readonly Mode: 10;
134
+ readonly OffscreenComponent: -1;
135
+ readonly Profiler: 15;
136
+ readonly ScopeComponent: -1;
137
+ readonly SimpleMemoComponent: -1;
138
+ readonly SuspenseComponent: 16;
139
+ readonly SuspenseListComponent: -1;
140
+ readonly Throw: -1;
141
+ readonly TracingMarkerComponent: -1;
142
+ readonly ViewTransitionComponent: -1;
143
+ readonly YieldComponent: -1;
144
+ };
145
+ readonly "16.6.0-beta.0": {
146
+ readonly ActivityComponent: -1;
147
+ readonly CacheComponent: -1;
148
+ readonly ClassComponent: 1;
149
+ readonly ContextConsumer: 9;
150
+ readonly ContextProvider: 10;
151
+ readonly CoroutineComponent: -1;
152
+ readonly CoroutineHandlerPhase: -1;
153
+ readonly DehydratedSuspenseComponent: 18;
154
+ readonly ForwardRef: 11;
155
+ readonly Fragment: 7;
156
+ readonly FunctionComponent: 0;
157
+ readonly HostComponent: 5;
158
+ readonly HostHoistable: -1;
159
+ readonly HostPortal: 4;
160
+ readonly HostRoot: 3;
161
+ readonly HostSingleton: -1;
162
+ readonly HostText: 6;
163
+ readonly IncompleteClassComponent: 17;
164
+ readonly IncompleteFunctionComponent: -1;
165
+ readonly IndeterminateComponent: 2;
166
+ readonly LazyComponent: 16;
167
+ readonly LegacyHiddenComponent: -1;
168
+ readonly MemoComponent: 14;
169
+ readonly Mode: 8;
170
+ readonly OffscreenComponent: -1;
171
+ readonly Profiler: 12;
172
+ readonly ScopeComponent: -1;
173
+ readonly SimpleMemoComponent: 15;
174
+ readonly SuspenseComponent: 13;
175
+ readonly SuspenseListComponent: 19;
176
+ readonly Throw: -1;
177
+ readonly TracingMarkerComponent: -1;
178
+ readonly ViewTransitionComponent: -1;
179
+ readonly YieldComponent: -1;
180
+ };
181
+ readonly "17.0.0-alpha": {
42
182
  readonly ActivityComponent: -1;
43
183
  readonly CacheComponent: -1;
44
184
  readonly ClassComponent: 1;
@@ -111,32 +251,16 @@ declare const ReactWorkTags: {
111
251
  readonly YieldComponent: -1;
112
252
  };
113
253
  };
114
- type ReactWorkTagVersion = keyof typeof ReactWorkTags;
115
- declare const ActivityComponentTag: 31;
116
- declare const ClassComponentTag: 1;
117
- declare const ContextConsumerTag: 9;
118
- declare const DehydratedSuspenseComponentTag: 18;
119
- declare const ForwardRefTag: 11;
120
- declare const FragmentTag: 7;
121
- declare const FunctionComponentTag: 0;
122
- declare const HostComponentTag: 5;
123
- declare const HostHoistableTag: 26;
124
- declare const HostPortalTag: 4;
125
- declare const HostRootTag: 3;
126
- declare const HostSingletonTag: 27;
127
- declare const HostTextTag: 6;
128
- declare const LazyComponentTag: 16;
129
- declare const LegacyHiddenComponentTag: 23;
130
- declare const MemoComponentTag: 14;
131
- declare const OffscreenComponentTag: 22;
132
- declare const SimpleMemoComponentTag: 15;
133
- declare const SuspenseComponentTag: 13;
134
- declare const SuspenseListComponentTag: 19;
135
- declare const ViewTransitionComponentTag: 30;
136
- type ReactWorkTag = Exclude<(typeof ReactWorkTags)[ReactWorkTagVersion][keyof ReactWorkTagMap], -1>;
137
- type HostWorkTag = typeof HostComponentTag | typeof HostHoistableTag | typeof HostSingletonTag | typeof HostTextTag;
254
+ type ReactWorkTagVersion = keyof typeof reactWorkTagsByVersion;
255
+ interface GetReactWorkTags {
256
+ <Version extends ReactWorkTagVersion>(reactVersion: Version): Readonly<(typeof reactWorkTagsByVersion)[Version]>;
257
+ (reactVersion: string): Readonly<ReactWorkTagMap>;
258
+ }
259
+ type ReactWorkTag = Exclude<(typeof reactWorkTagsByVersion)[ReactWorkTagVersion][keyof ReactWorkTagMap], -1>;
260
+ type HostWorkTag = Exclude<(typeof reactWorkTagsByVersion)[ReactWorkTagVersion]["HostComponent"] | (typeof reactWorkTagsByVersion)[ReactWorkTagVersion]["HostHoistable"] | (typeof reactWorkTagsByVersion)[ReactWorkTagVersion]["HostSingleton"] | (typeof reactWorkTagsByVersion)[ReactWorkTagVersion]["HostText"], -1>;
261
+ declare const getReactWorkTags: GetReactWorkTags;
138
262
  //#endregion
139
- //#region src/types.d.ts
263
+ //#region src/react-internals/types.d.ts
140
264
  type BundleType = ReactReconciler.BundleType;
141
265
  type Flags = ReactReconciler.Flags;
142
266
  type HookType = ReactReconciler.HookType;
@@ -171,7 +295,11 @@ interface ContextDependency<T> extends Omit<ReactReconciler.ContextDependency<T>
171
295
  memoizedValue?: T;
172
296
  observedBits?: number;
173
297
  }
298
+ interface DebugThenableState {
299
+ thenables?: unknown[];
300
+ }
174
301
  interface Dependencies extends Omit<ReactReconciler.Dependencies, "firstContext"> {
302
+ _debugThenableState?: DebugThenableState | unknown[];
175
303
  firstContext: ContextDependency<unknown> | null;
176
304
  }
177
305
  interface Effect {
@@ -193,6 +321,10 @@ interface ReactDebugInfo {
193
321
  env?: string;
194
322
  name?: string;
195
323
  }
324
+ interface ReactMemoCache {
325
+ data: unknown[][];
326
+ index: number;
327
+ }
196
328
  interface FiberDebugSource extends Source {
197
329
  columnNumber?: number;
198
330
  }
@@ -200,7 +332,7 @@ interface FiberUpdateQueue {
200
332
  [key: string]: unknown;
201
333
  dispatch?: unknown;
202
334
  lastEffect: Effect | null;
203
- memoCache?: unknown;
335
+ memoCache?: ReactMemoCache;
204
336
  }
205
337
  interface Fiber<T = unknown> extends Omit<ReactReconciler.Fiber, "alternate" | "_debugOwner" | "_debugSource" | "child" | "deletions" | "dependencies" | "memoizedProps" | "memoizedState" | "pendingProps" | "return" | "sibling" | "stateNode" | "tag" | "updateQueue"> {
206
338
  _debugInfo?: ReactDebugInfo[];
@@ -221,7 +353,7 @@ interface Fiber<T = unknown> extends Omit<ReactReconciler.Fiber, "alternate" | "
221
353
  sibling: Fiber | null;
222
354
  stateNode: T;
223
355
  tag: WorkTag;
224
- updateQueue: FiberUpdateQueue;
356
+ updateQueue: FiberUpdateQueue | null;
225
357
  }
226
358
  interface HostFiber<T = unknown> extends Fiber<T> {
227
359
  tag: HostWorkTag;
@@ -288,4 +420,46 @@ declare global {
288
420
  var __REACT_DEVTOOLS_GLOBAL_HOOK__: ReactDevToolsGlobalHook | undefined;
289
421
  }
290
422
  //#endregion
291
- export { ForwardRefTag as $, ReactDevToolsGlobalHook as A, ServerComponentInfo as B, OpaqueRoot as C, ReactContext as D, ReactConsumer as E, RefObject as F, Thenable as G, SuspenseHydrationCallbacks as H, RendererDispatcherRef as I, WorkTag as J, TransitionTracingCallbacks as K, RoleSelector as L, ReactProvider as M, ReactProviderType as N, ReactDebugInfo as O, ReactRenderer as P, DehydratedSuspenseComponentTag as Q, RootTag as R, OpaqueHandle as S, React$AbstractComponent as T, TestNameSelector as U, Source as V, TextSelector as W, ClassComponentTag as X, ActivityComponentTag as Y, ContextConsumerTag as Z, LanePriority as _, Dependencies as a, HostRootTag as at, MemoizedState as b, Fiber as c, LazyComponentTag as ct, FiberUpdateQueue as d, OffscreenComponentTag as dt, FragmentTag as et, Flags as f, SimpleMemoComponentTag as ft, HostFiber as g, HostConfig as h, ViewTransitionComponentTag as ht, CurrentDispatcherRef as i, HostPortalTag as it, ReactPortal as j, ReactDevToolsEventHandler as k, FiberDebugSource as l, LegacyHiddenComponentTag as lt, HookType as m, SuspenseListComponentTag as mt, ComponentSelector as n, HostComponentTag as nt, DevToolsConfig as o, HostSingletonTag as ot, HasPseudoClassSelector as p, SuspenseComponentTag as pt, TypeOfMode as q, ContextDependency as r, HostHoistableTag as rt, Effect as s, HostTextTag as st, BundleType as t, FunctionComponentTag as tt, FiberRoot as u, MemoComponentTag as ut, Lanes as v, Props as w, MutableSource as x, LegacyDispatcherRef as y, Selector as z };
423
+ //#region src/react-internals/index.d.ts
424
+ declare const getReactWorkTagsForRenderer: (renderer?: ReactRenderer | null) => Readonly<ReactWorkTagMap>;
425
+ declare const setReactWorkTagsForFiber: (fiber: Fiber, renderer?: ReactRenderer) => void;
426
+ declare const getReactWorkTagsForFiber: (fiber: Fiber) => Readonly<ReactWorkTagMap>;
427
+ declare const MutationMask: number;
428
+ //#endregion
429
+ //#region src/errors.d.ts
430
+ declare class BippyError extends Error {
431
+ constructor(message: string, cause?: unknown);
432
+ }
433
+ declare class BippyInstrumentationError extends BippyError {
434
+ readonly callbackName: string;
435
+ readonly instrumentationName: string;
436
+ constructor(instrumentationName: string, callbackName: string, cause: unknown);
437
+ }
438
+ declare class BippyReactDevToolsError extends BippyError {
439
+ readonly callbackName: string;
440
+ constructor(callbackName: string, cause: unknown);
441
+ }
442
+ declare class BippyHookListenerError extends BippyError {
443
+ readonly listenerName: string;
444
+ constructor(listenerName: string, cause: unknown);
445
+ }
446
+ declare class BippyHookInstallationError extends BippyError {
447
+ constructor(cause: unknown);
448
+ }
449
+ declare class BippyReactBuildError extends BippyError {
450
+ constructor(message: string, cause?: unknown);
451
+ }
452
+ declare class BippyHookInspectionError extends BippyError {
453
+ constructor(message: string, cause?: unknown);
454
+ }
455
+ declare class BippyUnsupportedHookError extends BippyHookInspectionError {
456
+ constructor(message: string, cause?: unknown);
457
+ }
458
+ declare class BippyHookRenderError extends BippyHookInspectionError {
459
+ constructor(message: string, cause?: unknown);
460
+ }
461
+ declare class BippySourceMapError extends BippyError {
462
+ constructor(message: string, cause?: unknown);
463
+ }
464
+ //#endregion
465
+ export { RoleSelector as $, HostConfig as A, React$AbstractComponent as B, Fiber as C, Flags as D, FiberUpdateQueue as E, MemoizedState as F, ReactDevToolsGlobalHook as G, ReactContext as H, MutableSource as I, ReactProvider as J, ReactMemoCache as K, OpaqueHandle as L, LanePriority as M, Lanes as N, HasPseudoClassSelector as O, LegacyDispatcherRef as P, RendererDispatcherRef as Q, OpaqueRoot as R, Effect as S, FiberRoot as T, ReactDebugInfo as U, ReactConsumer as V, ReactDevToolsEventHandler as W, ReactRenderer as X, ReactProviderType as Y, RefObject as Z, ContextDependency as _, ReactWorkTagVersion as _t, BippyHookRenderError as a, TestNameSelector as at, Dependencies as b, BippyReactDevToolsError as c, TransitionTracingCallbacks as ct, MutationMask as d, HostWorkTag as dt, RootTag as et, getReactWorkTagsForFiber as f, ReactBuildType as ft, ComponentSelector as g, ReactWorkTagMap as gt, BundleType as h, ReactWorkTag as ht, BippyHookListenerError as i, SuspenseHydrationCallbacks as it, HostFiber as j, HookType as k, BippySourceMapError as l, TypeOfMode as lt, setReactWorkTagsForFiber as m, ReactSymbols as mt, BippyHookInspectionError as n, ServerComponentInfo as nt, BippyInstrumentationError as o, TextSelector as ot, getReactWorkTagsForRenderer as p, ReactFiberFlags as pt, ReactPortal as q, BippyHookInstallationError as r, Source as rt, BippyReactBuildError as s, Thenable as st, BippyError as t, Selector as tt, BippyUnsupportedHookError as u, WorkTag as ut, CurrentDispatcherRef as v, getReactWorkTags as vt, FiberDebugSource as w, DevToolsConfig as x, DebugThenableState as y, Props as z };
package/dist/index.cjs CHANGED
@@ -6,4 +6,4 @@
6
6
  * This source code is licensed under the MIT license found in the
7
7
  * LICENSE file in the root directory of this source tree.
8
8
  */
9
- Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./rdt-hook.cjs");require("./install-hook-only.cjs");const t=require("./core2.cjs");exports.ActivityComponentTag=t.z,exports.BIPPY_INSTRUMENTATION_STRING=e.t,exports.CONCURRENT_MODE_NUMBER=t.M,exports.CONCURRENT_MODE_SYMBOL_DESCRIPTION=t.N,exports.CONCURRENT_MODE_SYMBOL_STRING=t.P,exports.ClassComponentTag=t.B,exports.ContextConsumerTag=t.V,exports.DEPRECATED_ASYNC_MODE_SYMBOL_DESCRIPTION=t.F,exports.DEPRECATED_ASYNC_MODE_SYMBOL_STRING=t.I,exports.DehydratedSuspenseComponentTag=t.H,exports.ELEMENT_TYPE_SYMBOL_STRING=t.L,exports.ForwardRefTag=t.U,exports.FragmentTag=t.W,exports.FunctionComponentTag=t.G,exports.HostComponentTag=t.K,exports.HostHoistableTag=t.q,exports.HostPortalTag=t.J,exports.HostRootTag=t.Y,exports.HostSingletonTag=t.X,exports.HostTextTag=t.Z,exports.LazyComponentTag=t.Q,exports.LegacyHiddenComponentTag=t.$,exports.MemoComponentTag=t.et,exports.OffscreenComponentTag=t.tt,exports.SimpleMemoComponentTag=t.nt,exports.SuspenseComponentTag=t.rt,exports.SuspenseListComponentTag=t.it,exports.TRANSITIONAL_ELEMENT_TYPE_SYMBOL_STRING=t.R,exports.ViewTransitionComponentTag=t.at,exports._fiberRoots=t.t,exports._onActiveListeners=e.n,exports._renderers=e.r,exports.detectReactBuildType=t.n,exports.didFiberCommit=t.r,exports.didFiberRender=t.i,exports.getDisplayName=t.a,exports.getFiberFromHostInstance=t.o,exports.getFiberId=t.s,exports.getFiberStack=t.c,exports.getLatestFiber=t.l,exports.getMutatedHostFibers=t.u,exports.getNearestHostFiber=t.d,exports.getNearestHostFibers=t.f,exports.getRDTHook=e.i,exports.getTimings=t.p,exports.getType=t.m,exports.hasMemoCache=t.h,exports.hasRDTHook=e.a,exports.installRDTHook=e.o,exports.instrument=t.g,exports.isClientEnvironment=e.s,exports.isCompositeFiber=t._,exports.isFiber=t.v,exports.isHostFiber=t.y,exports.isInstrumentationActive=t.b,exports.isRealReactDevtools=e.c,exports.isValidElement=t.x,exports.isValidFiber=t.S,exports.onRendererInject=e.l,exports.overrideContext=t.C,exports.overrideHookState=t.w,exports.overrideProps=t.T,exports.patchRDTHook=e.u,exports.safelyInstallRDTHook=e.d,exports.setFiberId=t.E,exports.toUnsubscribe=e.p,exports.traverseContexts=t.D,exports.traverseFiber=t.O,exports.traverseProps=t.k,exports.traverseRenderedFibers=t.A,exports.traverseState=t.j,exports.version=e.f;
9
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./rdt-hook.cjs");require("./install-hook-only.cjs");const t=require("./core2.cjs");exports.BIPPY_INSTRUMENTATION_STRING=e.t,exports.BippyError=e.m,exports.BippyHookInspectionError=e.h,exports.BippyHookInstallationError=e.g,exports.BippyHookListenerError=e._,exports.BippyHookRenderError=e.v,exports.BippyInstrumentationError=e.y,exports.BippyReactBuildError=e.b,exports.BippyReactDevToolsError=e.x,exports.BippySourceMapError=e.S,exports.BippyUnsupportedHookError=e.C,exports.ReactSymbols=t.N,exports._fiberRoots=t.t,exports._onActiveListeners=e.n,exports._renderers=e.r,exports.detectReactBuildType=t.n,exports.didFiberCommit=t.r,exports.didFiberRender=t.i,exports.getDisplayName=t.a,exports.getFiberFromHostInstance=t.o,exports.getFiberId=t.s,exports.getFiberStack=t.c,exports.getLatestFiber=t.l,exports.getMutatedHostFibers=t.u,exports.getNearestHostFiber=t.d,exports.getNearestHostFibers=t.f,exports.getRDTHook=e.a,exports.getReactWorkTags=t.P,exports.getTimings=t.p,exports.getType=t.m,exports.hasMemoCache=t.h,exports.hasRDTHook=e.o,exports.installRDTHook=e.s,exports.instrument=t.g,exports.isCompositeFiber=t._,exports.isFiber=t.v,exports.isHostFiber=t.y,exports.isInstrumentationActive=t.b,exports.isRealReactDevtools=e.c,exports.isValidElement=t.x,exports.isValidFiber=t.S,exports.onRendererInject=e.u,exports.overrideContext=t.C,exports.overrideHookState=t.w,exports.overrideProps=t.T,exports.patchRDTHook=e.d,exports.safelyInstallRDTHook=e.f,exports.setFiberId=t.E,exports.traverseContexts=t.D,exports.traverseFiber=t.O,exports.traverseProps=t.k,exports.traverseRenderedFibers=t.A,exports.traverseState=t.j,exports.version=e.p;
package/dist/index.d.cts CHANGED
@@ -1,3 +1,11 @@
1
- import { $ as ForwardRefTag, A as ReactDevToolsGlobalHook, B as ServerComponentInfo, C as OpaqueRoot, D as ReactContext, E as ReactConsumer, F as RefObject, G as Thenable, H as SuspenseHydrationCallbacks, I as RendererDispatcherRef, J as WorkTag, K as TransitionTracingCallbacks, L as RoleSelector, M as ReactProvider, N as ReactProviderType, O as ReactDebugInfo, P as ReactRenderer, Q as DehydratedSuspenseComponentTag, R as RootTag, S as OpaqueHandle, T as React$AbstractComponent, U as TestNameSelector, V as Source, W as TextSelector, X as ClassComponentTag, Y as ActivityComponentTag, Z as ContextConsumerTag, _ as LanePriority, a as Dependencies, at as HostRootTag, b as MemoizedState, c as Fiber, ct as LazyComponentTag, d as FiberUpdateQueue, dt as OffscreenComponentTag, et as FragmentTag, f as Flags, ft as SimpleMemoComponentTag, g as HostFiber, h as HostConfig, ht as ViewTransitionComponentTag, i as CurrentDispatcherRef, it as HostPortalTag, j as ReactPortal, k as ReactDevToolsEventHandler, l as FiberDebugSource, lt as LegacyHiddenComponentTag, m as HookType, mt as SuspenseListComponentTag, n as ComponentSelector, nt as HostComponentTag, o as DevToolsConfig, ot as HostSingletonTag, p as HasPseudoClassSelector, pt as SuspenseComponentTag, q as TypeOfMode, r as ContextDependency, rt as HostHoistableTag, s as Effect, st as HostTextTag, t as BundleType, tt as FunctionComponentTag, u as FiberRoot, ut as MemoComponentTag, v as Lanes, w as Props, x as MutableSource, y as LegacyDispatcherRef, z as Selector } from "./types.cjs";
2
- import { $ as DEPRECATED_ASYNC_MODE_SYMBOL_STRING, A as traverseContexts, B as installRDTHook, C as isInstrumentationActive, D as overrideHookState, E as overrideContext, F as BIPPY_INSTRUMENTATION_STRING, G as safelyInstallRDTHook, H as isRealReactDevtools, I as _onActiveListeners, J as toUnsubscribe, K as version, L as _renderers, M as traverseProps, N as traverseRenderedFibers, O as overrideProps, P as traverseState, Q as DEPRECATED_ASYNC_MODE_SYMBOL_DESCRIPTION, R as getRDTHook, S as isHostFiber, T as isValidFiber, U as onRendererInject, V as isClientEnvironment, W as patchRDTHook, X as CONCURRENT_MODE_SYMBOL_DESCRIPTION, Y as CONCURRENT_MODE_NUMBER, Z as CONCURRENT_MODE_SYMBOL_STRING, _ as getType, a as detectReactBuildType, b as isCompositeFiber, c as getDisplayName, d as getFiberStack, et as ELEMENT_TYPE_SYMBOL_STRING, f as getLatestFiber, g as getTimings, h as getNearestHostFibers, i as _fiberRoots, j as traverseFiber, k as setFiberId, l as getFiberFromHostInstance, m as getNearestHostFiber, n as RenderHandler, o as didFiberCommit, p as getMutatedHostFibers, q as Unsubscribe, r as RenderPhase, s as didFiberRender, t as InstrumentationOptions, tt as TRANSITIONAL_ELEMENT_TYPE_SYMBOL_STRING, u as getFiberId, v as hasMemoCache, w as isValidElement, x as isFiber, y as instrument, z as hasRDTHook } from "./core.cjs";
3
- export { ActivityComponentTag, BIPPY_INSTRUMENTATION_STRING, type BundleType, CONCURRENT_MODE_NUMBER, CONCURRENT_MODE_SYMBOL_DESCRIPTION, CONCURRENT_MODE_SYMBOL_STRING, ClassComponentTag, type ComponentSelector, ContextConsumerTag, type ContextDependency, type CurrentDispatcherRef, DEPRECATED_ASYNC_MODE_SYMBOL_DESCRIPTION, DEPRECATED_ASYNC_MODE_SYMBOL_STRING, DehydratedSuspenseComponentTag, type Dependencies, type DevToolsConfig, ELEMENT_TYPE_SYMBOL_STRING, type Effect, type Fiber, type FiberDebugSource, type FiberRoot, type FiberUpdateQueue, type Flags, ForwardRefTag, FragmentTag, FunctionComponentTag, type HasPseudoClassSelector, type HookType, HostComponentTag, type HostConfig, type HostFiber, HostHoistableTag, HostPortalTag, HostRootTag, HostSingletonTag, HostTextTag, InstrumentationOptions, type LanePriority, type Lanes, LazyComponentTag, type LegacyDispatcherRef, LegacyHiddenComponentTag, MemoComponentTag, type MemoizedState, type MutableSource, OffscreenComponentTag, type OpaqueHandle, type OpaqueRoot, type Props, type React$AbstractComponent, type ReactConsumer, type ReactContext, type ReactDebugInfo, type ReactDevToolsEventHandler, type ReactDevToolsGlobalHook, type ReactPortal, type ReactProvider, type ReactProviderType, type ReactRenderer, type RefObject, RenderHandler, RenderPhase, type RendererDispatcherRef, type RoleSelector, type RootTag, type Selector, type ServerComponentInfo, SimpleMemoComponentTag, type Source, SuspenseComponentTag, type SuspenseHydrationCallbacks, SuspenseListComponentTag, TRANSITIONAL_ELEMENT_TYPE_SYMBOL_STRING, type TestNameSelector, type TextSelector, type Thenable, type TransitionTracingCallbacks, type TypeOfMode, Unsubscribe, ViewTransitionComponentTag, type WorkTag, _fiberRoots, _onActiveListeners, _renderers, detectReactBuildType, didFiberCommit, didFiberRender, getDisplayName, getFiberFromHostInstance, getFiberId, getFiberStack, getLatestFiber, getMutatedHostFibers, getNearestHostFiber, getNearestHostFibers, getRDTHook, getTimings, getType, hasMemoCache, hasRDTHook, installRDTHook, instrument, isClientEnvironment, isCompositeFiber, isFiber, isHostFiber, isInstrumentationActive, isRealReactDevtools, isValidElement, isValidFiber, onRendererInject, overrideContext, overrideHookState, overrideProps, patchRDTHook, safelyInstallRDTHook, setFiberId, toUnsubscribe, traverseContexts, traverseFiber, traverseProps, traverseRenderedFibers, traverseState, version };
1
+ /**
2
+ * @license bippy
3
+ *
4
+ * Copyright (c) Aiden Bai
5
+ *
6
+ * This source code is licensed under the MIT license found in the
7
+ * LICENSE file in the root directory of this source tree.
8
+ */
9
+ import { $ as RoleSelector, A as HostConfig, B as React$AbstractComponent, C as Fiber, D as Flags, E as FiberUpdateQueue, F as MemoizedState, G as ReactDevToolsGlobalHook, H as ReactContext, I as MutableSource, J as ReactProvider, K as ReactMemoCache, L as OpaqueHandle, M as LanePriority, N as Lanes, O as HasPseudoClassSelector, P as LegacyDispatcherRef, Q as RendererDispatcherRef, R as OpaqueRoot, S as Effect, T as FiberRoot, U as ReactDebugInfo, V as ReactConsumer, W as ReactDevToolsEventHandler, X as ReactRenderer, Y as ReactProviderType, Z as RefObject, _ as ContextDependency, _t as ReactWorkTagVersion, a as BippyHookRenderError, at as TestNameSelector, b as Dependencies, c as BippyReactDevToolsError, ct as TransitionTracingCallbacks, d as MutationMask, dt as HostWorkTag, et as RootTag, f as getReactWorkTagsForFiber, ft as ReactBuildType, g as ComponentSelector, gt as ReactWorkTagMap, h as BundleType, ht as ReactWorkTag, i as BippyHookListenerError, it as SuspenseHydrationCallbacks, j as HostFiber, k as HookType, l as BippySourceMapError, lt as TypeOfMode, m as setReactWorkTagsForFiber, mt as ReactSymbols, n as BippyHookInspectionError, nt as ServerComponentInfo, o as BippyInstrumentationError, ot as TextSelector, p as getReactWorkTagsForRenderer, pt as ReactFiberFlags, q as ReactPortal, r as BippyHookInstallationError, rt as Source, s as BippyReactBuildError, st as Thenable, t as BippyError, tt as Selector, u as BippyUnsupportedHookError, ut as WorkTag, v as CurrentDispatcherRef, vt as getReactWorkTags, w as FiberDebugSource, x as DevToolsConfig, y as DebugThenableState, z as Props } from "./errors.cjs";
10
+ import { A as setFiberId, B as getRDTHook, C as isHostFiber, D as overrideContext, E as isValidFiber, F as traverseState, G as patchRDTHook, H as installRDTHook, I as BIPPY_INSTRUMENTATION_STRING, J as compareSemver, K as safelyInstallRDTHook, L as Unsubscribe, M as traverseFiber, N as traverseProps, O as overrideHookState, P as traverseRenderedFibers, R as _onActiveListeners, S as isFiber, T as isValidElement, U as isRealReactDevtools, V as hasRDTHook, W as onRendererInject, _ as getTimings, a as _fiberRoots, b as instrument, c as didFiberRender, d as getFiberId, f as getFiberStack, g as getNearestHostFibers, h as getNearestHostFiber, i as RenderPhase, j as traverseContexts, k as overrideProps, l as getDisplayName, m as getMutatedHostFibers, n as InstrumentationOptions, o as detectReactBuildType, p as getLatestFiber, q as version, r as RenderHandler, s as didFiberCommit, t as FiberTimings, u as getFiberFromHostInstance, v as getType, w as isInstrumentationActive, x as isCompositeFiber, y as hasMemoCache, z as _renderers } from "./core.cjs";
11
+ export { BIPPY_INSTRUMENTATION_STRING, BippyError, BippyHookInspectionError, BippyHookInstallationError, BippyHookListenerError, BippyHookRenderError, BippyInstrumentationError, BippyReactBuildError, BippyReactDevToolsError, BippySourceMapError, BippyUnsupportedHookError, type BundleType, type ComponentSelector, type ContextDependency, type CurrentDispatcherRef, type DebugThenableState, type Dependencies, type DevToolsConfig, type Effect, type Fiber, type FiberDebugSource, type FiberRoot, FiberTimings, type FiberUpdateQueue, type Flags, type HasPseudoClassSelector, type HookType, type HostConfig, type HostFiber, type HostWorkTag, InstrumentationOptions, type LanePriority, type Lanes, type LegacyDispatcherRef, type MemoizedState, type MutableSource, type MutationMask, type OpaqueHandle, type OpaqueRoot, type Props, type React$AbstractComponent, type ReactBuildType, type ReactConsumer, type ReactContext, type ReactDebugInfo, type ReactDevToolsEventHandler, type ReactDevToolsGlobalHook, type ReactFiberFlags, type ReactMemoCache, type ReactPortal, type ReactProvider, type ReactProviderType, type ReactRenderer, ReactSymbols, type ReactWorkTag, type ReactWorkTagMap, type ReactWorkTagVersion, type RefObject, RenderHandler, RenderPhase, type RendererDispatcherRef, type RoleSelector, type RootTag, type Selector, type ServerComponentInfo, type Source, type SuspenseHydrationCallbacks, type TestNameSelector, type TextSelector, type Thenable, type TransitionTracingCallbacks, type TypeOfMode, type Unsubscribe, type WorkTag, _fiberRoots, _onActiveListeners, _renderers, type compareSemver, detectReactBuildType, didFiberCommit, didFiberRender, getDisplayName, getFiberFromHostInstance, getFiberId, getFiberStack, getLatestFiber, getMutatedHostFibers, getNearestHostFiber, getNearestHostFibers, getRDTHook, getReactWorkTags, type getReactWorkTagsForFiber, type getReactWorkTagsForRenderer, getTimings, getType, hasMemoCache, hasRDTHook, installRDTHook, instrument, isCompositeFiber, isFiber, isHostFiber, isInstrumentationActive, isRealReactDevtools, isValidElement, isValidFiber, onRendererInject, overrideContext, overrideHookState, overrideProps, patchRDTHook, safelyInstallRDTHook, setFiberId, type setReactWorkTagsForFiber, traverseContexts, traverseFiber, traverseProps, traverseRenderedFibers, traverseState, version };
package/dist/index.d.ts CHANGED
@@ -1,3 +1,11 @@
1
- import { $ as ForwardRefTag, A as ReactDevToolsGlobalHook, B as ServerComponentInfo, C as OpaqueRoot, D as ReactContext, E as ReactConsumer, F as RefObject, G as Thenable, H as SuspenseHydrationCallbacks, I as RendererDispatcherRef, J as WorkTag, K as TransitionTracingCallbacks, L as RoleSelector, M as ReactProvider, N as ReactProviderType, O as ReactDebugInfo, P as ReactRenderer, Q as DehydratedSuspenseComponentTag, R as RootTag, S as OpaqueHandle, T as React$AbstractComponent, U as TestNameSelector, V as Source, W as TextSelector, X as ClassComponentTag, Y as ActivityComponentTag, Z as ContextConsumerTag, _ as LanePriority, a as Dependencies, at as HostRootTag, b as MemoizedState, c as Fiber, ct as LazyComponentTag, d as FiberUpdateQueue, dt as OffscreenComponentTag, et as FragmentTag, f as Flags, ft as SimpleMemoComponentTag, g as HostFiber, h as HostConfig, ht as ViewTransitionComponentTag, i as CurrentDispatcherRef, it as HostPortalTag, j as ReactPortal, k as ReactDevToolsEventHandler, l as FiberDebugSource, lt as LegacyHiddenComponentTag, m as HookType, mt as SuspenseListComponentTag, n as ComponentSelector, nt as HostComponentTag, o as DevToolsConfig, ot as HostSingletonTag, p as HasPseudoClassSelector, pt as SuspenseComponentTag, q as TypeOfMode, r as ContextDependency, rt as HostHoistableTag, s as Effect, st as HostTextTag, t as BundleType, tt as FunctionComponentTag, u as FiberRoot, ut as MemoComponentTag, v as Lanes, w as Props, x as MutableSource, y as LegacyDispatcherRef, z as Selector } from "./types.js";
2
- import { $ as DEPRECATED_ASYNC_MODE_SYMBOL_STRING, A as traverseContexts, B as installRDTHook, C as isInstrumentationActive, D as overrideHookState, E as overrideContext, F as BIPPY_INSTRUMENTATION_STRING, G as safelyInstallRDTHook, H as isRealReactDevtools, I as _onActiveListeners, J as toUnsubscribe, K as version, L as _renderers, M as traverseProps, N as traverseRenderedFibers, O as overrideProps, P as traverseState, Q as DEPRECATED_ASYNC_MODE_SYMBOL_DESCRIPTION, R as getRDTHook, S as isHostFiber, T as isValidFiber, U as onRendererInject, V as isClientEnvironment, W as patchRDTHook, X as CONCURRENT_MODE_SYMBOL_DESCRIPTION, Y as CONCURRENT_MODE_NUMBER, Z as CONCURRENT_MODE_SYMBOL_STRING, _ as getType, a as detectReactBuildType, b as isCompositeFiber, c as getDisplayName, d as getFiberStack, et as ELEMENT_TYPE_SYMBOL_STRING, f as getLatestFiber, g as getTimings, h as getNearestHostFibers, i as _fiberRoots, j as traverseFiber, k as setFiberId, l as getFiberFromHostInstance, m as getNearestHostFiber, n as RenderHandler, o as didFiberCommit, p as getMutatedHostFibers, q as Unsubscribe, r as RenderPhase, s as didFiberRender, t as InstrumentationOptions, tt as TRANSITIONAL_ELEMENT_TYPE_SYMBOL_STRING, u as getFiberId, v as hasMemoCache, w as isValidElement, x as isFiber, y as instrument, z as hasRDTHook } from "./core.js";
3
- export { ActivityComponentTag, BIPPY_INSTRUMENTATION_STRING, type BundleType, CONCURRENT_MODE_NUMBER, CONCURRENT_MODE_SYMBOL_DESCRIPTION, CONCURRENT_MODE_SYMBOL_STRING, ClassComponentTag, type ComponentSelector, ContextConsumerTag, type ContextDependency, type CurrentDispatcherRef, DEPRECATED_ASYNC_MODE_SYMBOL_DESCRIPTION, DEPRECATED_ASYNC_MODE_SYMBOL_STRING, DehydratedSuspenseComponentTag, type Dependencies, type DevToolsConfig, ELEMENT_TYPE_SYMBOL_STRING, type Effect, type Fiber, type FiberDebugSource, type FiberRoot, type FiberUpdateQueue, type Flags, ForwardRefTag, FragmentTag, FunctionComponentTag, type HasPseudoClassSelector, type HookType, HostComponentTag, type HostConfig, type HostFiber, HostHoistableTag, HostPortalTag, HostRootTag, HostSingletonTag, HostTextTag, InstrumentationOptions, type LanePriority, type Lanes, LazyComponentTag, type LegacyDispatcherRef, LegacyHiddenComponentTag, MemoComponentTag, type MemoizedState, type MutableSource, OffscreenComponentTag, type OpaqueHandle, type OpaqueRoot, type Props, type React$AbstractComponent, type ReactConsumer, type ReactContext, type ReactDebugInfo, type ReactDevToolsEventHandler, type ReactDevToolsGlobalHook, type ReactPortal, type ReactProvider, type ReactProviderType, type ReactRenderer, type RefObject, RenderHandler, RenderPhase, type RendererDispatcherRef, type RoleSelector, type RootTag, type Selector, type ServerComponentInfo, SimpleMemoComponentTag, type Source, SuspenseComponentTag, type SuspenseHydrationCallbacks, SuspenseListComponentTag, TRANSITIONAL_ELEMENT_TYPE_SYMBOL_STRING, type TestNameSelector, type TextSelector, type Thenable, type TransitionTracingCallbacks, type TypeOfMode, Unsubscribe, ViewTransitionComponentTag, type WorkTag, _fiberRoots, _onActiveListeners, _renderers, detectReactBuildType, didFiberCommit, didFiberRender, getDisplayName, getFiberFromHostInstance, getFiberId, getFiberStack, getLatestFiber, getMutatedHostFibers, getNearestHostFiber, getNearestHostFibers, getRDTHook, getTimings, getType, hasMemoCache, hasRDTHook, installRDTHook, instrument, isClientEnvironment, isCompositeFiber, isFiber, isHostFiber, isInstrumentationActive, isRealReactDevtools, isValidElement, isValidFiber, onRendererInject, overrideContext, overrideHookState, overrideProps, patchRDTHook, safelyInstallRDTHook, setFiberId, toUnsubscribe, traverseContexts, traverseFiber, traverseProps, traverseRenderedFibers, traverseState, version };
1
+ /**
2
+ * @license bippy
3
+ *
4
+ * Copyright (c) Aiden Bai
5
+ *
6
+ * This source code is licensed under the MIT license found in the
7
+ * LICENSE file in the root directory of this source tree.
8
+ */
9
+ import { $ as RoleSelector, A as HostConfig, B as React$AbstractComponent, C as Fiber, D as Flags, E as FiberUpdateQueue, F as MemoizedState, G as ReactDevToolsGlobalHook, H as ReactContext, I as MutableSource, J as ReactProvider, K as ReactMemoCache, L as OpaqueHandle, M as LanePriority, N as Lanes, O as HasPseudoClassSelector, P as LegacyDispatcherRef, Q as RendererDispatcherRef, R as OpaqueRoot, S as Effect, T as FiberRoot, U as ReactDebugInfo, V as ReactConsumer, W as ReactDevToolsEventHandler, X as ReactRenderer, Y as ReactProviderType, Z as RefObject, _ as ContextDependency, _t as ReactWorkTagVersion, a as BippyHookRenderError, at as TestNameSelector, b as Dependencies, c as BippyReactDevToolsError, ct as TransitionTracingCallbacks, d as MutationMask, dt as HostWorkTag, et as RootTag, f as getReactWorkTagsForFiber, ft as ReactBuildType, g as ComponentSelector, gt as ReactWorkTagMap, h as BundleType, ht as ReactWorkTag, i as BippyHookListenerError, it as SuspenseHydrationCallbacks, j as HostFiber, k as HookType, l as BippySourceMapError, lt as TypeOfMode, m as setReactWorkTagsForFiber, mt as ReactSymbols, n as BippyHookInspectionError, nt as ServerComponentInfo, o as BippyInstrumentationError, ot as TextSelector, p as getReactWorkTagsForRenderer, pt as ReactFiberFlags, q as ReactPortal, r as BippyHookInstallationError, rt as Source, s as BippyReactBuildError, st as Thenable, t as BippyError, tt as Selector, u as BippyUnsupportedHookError, ut as WorkTag, v as CurrentDispatcherRef, vt as getReactWorkTags, w as FiberDebugSource, x as DevToolsConfig, y as DebugThenableState, z as Props } from "./errors.js";
10
+ import { A as setFiberId, B as getRDTHook, C as isHostFiber, D as overrideContext, E as isValidFiber, F as traverseState, G as patchRDTHook, H as installRDTHook, I as BIPPY_INSTRUMENTATION_STRING, J as compareSemver, K as safelyInstallRDTHook, L as Unsubscribe, M as traverseFiber, N as traverseProps, O as overrideHookState, P as traverseRenderedFibers, R as _onActiveListeners, S as isFiber, T as isValidElement, U as isRealReactDevtools, V as hasRDTHook, W as onRendererInject, _ as getTimings, a as _fiberRoots, b as instrument, c as didFiberRender, d as getFiberId, f as getFiberStack, g as getNearestHostFibers, h as getNearestHostFiber, i as RenderPhase, j as traverseContexts, k as overrideProps, l as getDisplayName, m as getMutatedHostFibers, n as InstrumentationOptions, o as detectReactBuildType, p as getLatestFiber, q as version, r as RenderHandler, s as didFiberCommit, t as FiberTimings, u as getFiberFromHostInstance, v as getType, w as isInstrumentationActive, x as isCompositeFiber, y as hasMemoCache, z as _renderers } from "./core.js";
11
+ export { BIPPY_INSTRUMENTATION_STRING, BippyError, BippyHookInspectionError, BippyHookInstallationError, BippyHookListenerError, BippyHookRenderError, BippyInstrumentationError, BippyReactBuildError, BippyReactDevToolsError, BippySourceMapError, BippyUnsupportedHookError, type BundleType, type ComponentSelector, type ContextDependency, type CurrentDispatcherRef, type DebugThenableState, type Dependencies, type DevToolsConfig, type Effect, type Fiber, type FiberDebugSource, type FiberRoot, FiberTimings, type FiberUpdateQueue, type Flags, type HasPseudoClassSelector, type HookType, type HostConfig, type HostFiber, type HostWorkTag, InstrumentationOptions, type LanePriority, type Lanes, type LegacyDispatcherRef, type MemoizedState, type MutableSource, type MutationMask, type OpaqueHandle, type OpaqueRoot, type Props, type React$AbstractComponent, type ReactBuildType, type ReactConsumer, type ReactContext, type ReactDebugInfo, type ReactDevToolsEventHandler, type ReactDevToolsGlobalHook, type ReactFiberFlags, type ReactMemoCache, type ReactPortal, type ReactProvider, type ReactProviderType, type ReactRenderer, ReactSymbols, type ReactWorkTag, type ReactWorkTagMap, type ReactWorkTagVersion, type RefObject, RenderHandler, RenderPhase, type RendererDispatcherRef, type RoleSelector, type RootTag, type Selector, type ServerComponentInfo, type Source, type SuspenseHydrationCallbacks, type TestNameSelector, type TextSelector, type Thenable, type TransitionTracingCallbacks, type TypeOfMode, type Unsubscribe, type WorkTag, _fiberRoots, _onActiveListeners, _renderers, type compareSemver, detectReactBuildType, didFiberCommit, didFiberRender, getDisplayName, getFiberFromHostInstance, getFiberId, getFiberStack, getLatestFiber, getMutatedHostFibers, getNearestHostFiber, getNearestHostFibers, getRDTHook, getReactWorkTags, type getReactWorkTagsForFiber, type getReactWorkTagsForRenderer, getTimings, getType, hasMemoCache, hasRDTHook, installRDTHook, instrument, isCompositeFiber, isFiber, isHostFiber, isInstrumentationActive, isRealReactDevtools, isValidElement, isValidFiber, onRendererInject, overrideContext, overrideHookState, overrideProps, patchRDTHook, safelyInstallRDTHook, setFiberId, type setReactWorkTagsForFiber, traverseContexts, traverseFiber, traverseProps, traverseRenderedFibers, traverseState, version };