bippy 0.5.34 → 0.5.37
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/core.d.cts +220 -59
- package/dist/core.d.ts +220 -59
- package/dist/core2.d.cts +1 -1
- package/dist/core2.d.ts +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.iife.js +1 -1
- package/dist/install-hook-only.iife.js +1 -1
- package/dist/rdt-hook.cjs +1 -1
- package/dist/rdt-hook.js +1 -1
- package/dist/source.d.cts +1 -1
- package/dist/source.d.ts +1 -1
- package/package.json +1 -3
- package/src/types.ts +132 -68
package/dist/rdt-hook.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
|
-
const e=`0.5.
|
|
9
|
+
const e=`0.5.37`,t=`bippy-${e}`,n=Object.defineProperty,r=Object.prototype.hasOwnProperty,i=()=>{},a=e=>{try{Function.prototype.toString.call(e).indexOf(`^_^`)>-1&&setTimeout(()=>{throw Error(`React is running in production mode, but dead code elimination has not been applied. Read how to correctly configure React for production: https://reactjs.org/link/perf-use-production-build`)})}catch{}},o=(e=globalThis.__REACT_DEVTOOLS_GLOBAL_HOOK__)=>!!(e&&`getFiberRoots`in e);let s=!1,c;const l=(e=globalThis.__REACT_DEVTOOLS_GLOBAL_HOOK__)=>s?!0:(e&&typeof e.inject==`function`&&(c=e.inject.toString()),!!c?.includes(`(injected)`)),u=new Set,d=new Set,f=e=>{let r=new Map,o=0,s={_instrumentationIsActive:!1,_instrumentationSource:t,checkDCE:a,hasUnsupportedRendererAttached:!1,inject(e){let t=++o;return r.set(t,e),d.add(e),s._instrumentationIsActive||(s._instrumentationIsActive=!0,u.forEach(e=>e())),t},on:i,onCommitFiberRoot:i,onCommitFiberUnmount:i,onPostCommitFiberRoot:i,renderers:r,supportsFiber:!0,supportsFlight:!0};try{n(globalThis,`__REACT_DEVTOOLS_GLOBAL_HOOK__`,{configurable:!0,enumerable:!0,get(){return s},set(t){if(t&&typeof t==`object`){let n=s.renderers;s=t,n.size>0&&(n.forEach((e,n)=>{d.add(e),t.renderers.set(n,e)}),p(e))}}});let t=window.hasOwnProperty,r=!1;n(window,`hasOwnProperty`,{configurable:!0,value:function(...e){try{if(!r&&e[0]===`__REACT_DEVTOOLS_GLOBAL_HOOK__`)return globalThis.__REACT_DEVTOOLS_GLOBAL_HOOK__=void 0,r=!0,-0}catch{}return t.apply(this,e)},writable:!0})}catch{p(e)}return s},p=e=>{e&&u.add(e);try{let n=globalThis.__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!n)return;if(!n._instrumentationSource){n.checkDCE=a,n.supportsFiber=!0,n.supportsFlight=!0,n.hasUnsupportedRendererAttached=!1,n._instrumentationSource=t,n._instrumentationIsActive=!1;let e=o(n);if(e||(n.on=i),n.renderers.size){n._instrumentationIsActive=!0,u.forEach(e=>e());return}let r=n.inject,c=l(n);c&&!e&&(s=!0,n.inject({scheduleRefresh(){}})&&(n._instrumentationIsActive=!0)),n.inject=e=>{let t=r(e);return d.add(e),c&&n.renderers.set(t,e),n._instrumentationIsActive=!0,u.forEach(e=>e()),t}}(n.renderers.size||n._instrumentationIsActive||l())&&e?.()}catch{}},m=()=>r.call(globalThis,`__REACT_DEVTOOLS_GLOBAL_HOOK__`),h=e=>m()?(p(e),globalThis.__REACT_DEVTOOLS_GLOBAL_HOOK__):f(e),g=()=>!!(typeof window<`u`&&(window.document?.createElement||window.navigator?.product===`ReactNative`)),_=()=>{try{g()&&h()}catch{}};Object.defineProperty(exports,`a`,{enumerable:!0,get:function(){return f}}),Object.defineProperty(exports,`c`,{enumerable:!0,get:function(){return o}}),Object.defineProperty(exports,`d`,{enumerable:!0,get:function(){return e}}),Object.defineProperty(exports,`i`,{enumerable:!0,get:function(){return m}}),Object.defineProperty(exports,`l`,{enumerable:!0,get:function(){return p}}),Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return d}}),Object.defineProperty(exports,`o`,{enumerable:!0,get:function(){return g}}),Object.defineProperty(exports,`r`,{enumerable:!0,get:function(){return h}}),Object.defineProperty(exports,`s`,{enumerable:!0,get:function(){return l}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return t}}),Object.defineProperty(exports,`u`,{enumerable:!0,get:function(){return _}});
|
package/dist/rdt-hook.js
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
|
-
const e=`0.5.
|
|
9
|
+
const e=`0.5.37`,t=`bippy-${e}`,n=Object.defineProperty,r=Object.prototype.hasOwnProperty,i=()=>{},a=e=>{try{Function.prototype.toString.call(e).indexOf(`^_^`)>-1&&setTimeout(()=>{throw Error(`React is running in production mode, but dead code elimination has not been applied. Read how to correctly configure React for production: https://reactjs.org/link/perf-use-production-build`)})}catch{}},o=(e=globalThis.__REACT_DEVTOOLS_GLOBAL_HOOK__)=>!!(e&&`getFiberRoots`in e);let s=!1,c;const l=(e=globalThis.__REACT_DEVTOOLS_GLOBAL_HOOK__)=>s?!0:(e&&typeof e.inject==`function`&&(c=e.inject.toString()),!!c?.includes(`(injected)`)),u=new Set,d=new Set,f=e=>{let r=new Map,o=0,s={_instrumentationIsActive:!1,_instrumentationSource:t,checkDCE:a,hasUnsupportedRendererAttached:!1,inject(e){let t=++o;return r.set(t,e),d.add(e),s._instrumentationIsActive||(s._instrumentationIsActive=!0,u.forEach(e=>e())),t},on:i,onCommitFiberRoot:i,onCommitFiberUnmount:i,onPostCommitFiberRoot:i,renderers:r,supportsFiber:!0,supportsFlight:!0};try{n(globalThis,`__REACT_DEVTOOLS_GLOBAL_HOOK__`,{configurable:!0,enumerable:!0,get(){return s},set(t){if(t&&typeof t==`object`){let n=s.renderers;s=t,n.size>0&&(n.forEach((e,n)=>{d.add(e),t.renderers.set(n,e)}),p(e))}}});let t=window.hasOwnProperty,r=!1;n(window,`hasOwnProperty`,{configurable:!0,value:function(...e){try{if(!r&&e[0]===`__REACT_DEVTOOLS_GLOBAL_HOOK__`)return globalThis.__REACT_DEVTOOLS_GLOBAL_HOOK__=void 0,r=!0,-0}catch{}return t.apply(this,e)},writable:!0})}catch{p(e)}return s},p=e=>{e&&u.add(e);try{let n=globalThis.__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!n)return;if(!n._instrumentationSource){n.checkDCE=a,n.supportsFiber=!0,n.supportsFlight=!0,n.hasUnsupportedRendererAttached=!1,n._instrumentationSource=t,n._instrumentationIsActive=!1;let e=o(n);if(e||(n.on=i),n.renderers.size){n._instrumentationIsActive=!0,u.forEach(e=>e());return}let r=n.inject,c=l(n);c&&!e&&(s=!0,n.inject({scheduleRefresh(){}})&&(n._instrumentationIsActive=!0)),n.inject=e=>{let t=r(e);return d.add(e),c&&n.renderers.set(t,e),n._instrumentationIsActive=!0,u.forEach(e=>e()),t}}(n.renderers.size||n._instrumentationIsActive||l())&&e?.()}catch{}},m=()=>r.call(globalThis,`__REACT_DEVTOOLS_GLOBAL_HOOK__`),h=e=>m()?(p(e),globalThis.__REACT_DEVTOOLS_GLOBAL_HOOK__):f(e),g=()=>!!(typeof window<`u`&&(window.document?.createElement||window.navigator?.product===`ReactNative`)),_=()=>{try{g()&&h()}catch{}};export{f as a,o as c,e as d,m as i,p as l,d as n,g as o,h as r,l as s,t,_ as u};
|
package/dist/source.d.cts
CHANGED
package/dist/source.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "bippy",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.37",
|
|
4
4
|
"description": "hack into react internals",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"bippy",
|
|
@@ -94,14 +94,12 @@
|
|
|
94
94
|
"@types/node": "^20",
|
|
95
95
|
"@types/react": "^19.0.4",
|
|
96
96
|
"@types/react-dom": "^19.0.2",
|
|
97
|
-
"@types/react-reconciler": "^0.33.0",
|
|
98
97
|
"esbuild": "^0.27.0",
|
|
99
98
|
"happy-dom": "^15.11.7",
|
|
100
99
|
"publint": "^0.3.0",
|
|
101
100
|
"react": "19.0.0",
|
|
102
101
|
"react-devtools-inline": "^6.0.1",
|
|
103
102
|
"react-dom": "19.0.0",
|
|
104
|
-
"react-reconciler": "^0.33.0",
|
|
105
103
|
"react-refresh": "^0.16.0",
|
|
106
104
|
"terser": "^5.36.0",
|
|
107
105
|
"tsx": "^4.21.0",
|
package/src/types.ts
CHANGED
|
@@ -1,71 +1,135 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
|
+
|
|
3
|
+
// @types/react-reconciler uses `export = ReactReconciler` (CJS namespace),
|
|
4
|
+
// which downstream bundlers can't resolve as ESM exports. These types are
|
|
5
|
+
// inlined from @types/react-reconciler@0.28 to avoid the dependency.
|
|
6
|
+
|
|
7
|
+
// Simple type aliases — most are opaque in the original
|
|
8
|
+
export type BundleType = 0 | 1;
|
|
9
|
+
export type Flags = number;
|
|
10
|
+
export type Lanes = number;
|
|
11
|
+
export type TypeOfMode = number;
|
|
12
|
+
export type RootTag = 0 | 1 | 2;
|
|
13
|
+
export type LanePriority = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17;
|
|
14
|
+
export type WorkTag = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24;
|
|
15
|
+
export type HookType = "useState" | "useReducer" | "useContext" | "useRef" | "useEffect" | "useLayoutEffect" | "useCallback" | "useMemo" | "useImperativeHandle" | "useDebugValue" | "useDeferredValue" | "useTransition" | "useMutableSource" | "useOpaqueIdentifier" | "useCacheRefresh";
|
|
16
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
17
|
+
export type FiberRoot = any;
|
|
18
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
19
|
+
export type MutableSource = any;
|
|
20
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
21
|
+
export type OpaqueHandle = any;
|
|
22
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
23
|
+
export type OpaqueRoot = any;
|
|
24
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
25
|
+
export type React$AbstractComponent<_Config, _Instance = unknown> = any;
|
|
26
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
27
|
+
export type HostConfig = Record<string, any>;
|
|
28
|
+
|
|
29
|
+
// Structural interfaces
|
|
30
|
+
export interface Source { fileName: string; lineNumber: number }
|
|
31
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
32
|
+
export interface RefObject { current: any }
|
|
33
|
+
export interface Thenable<T> { then(resolve: () => T, reject?: () => T): T }
|
|
34
|
+
|
|
35
|
+
export interface ReactContext<T> {
|
|
36
|
+
$$typeof: symbol | number;
|
|
37
|
+
Consumer: ReactContext<T>;
|
|
38
|
+
Provider: ReactProviderType<T>;
|
|
39
|
+
_calculateChangedBits: ((a: T, b: T) => number) | null;
|
|
40
|
+
_currentValue: T;
|
|
41
|
+
_currentValue2: T;
|
|
42
|
+
_threadCount: number;
|
|
43
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
44
|
+
_currentRenderer?: Record<string, any> | null;
|
|
45
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
46
|
+
_currentRenderer2?: Record<string, any> | null;
|
|
47
|
+
displayName?: string;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
export interface ReactProviderType<T> { $$typeof: symbol | number; _context: ReactContext<T> }
|
|
51
|
+
export interface ReactProvider<T> { $$typeof: symbol | number; type: ReactProviderType<T>; key: null | string; ref: null; props: { value: T; children?: ReactNode } }
|
|
52
|
+
export interface ReactConsumer<T> { $$typeof: symbol | number; type: ReactContext<T>; key: null | string; ref: null; props: { children: (value: T) => ReactNode; unstable_observedBits?: number } }
|
|
53
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
54
|
+
export interface ReactPortal { $$typeof: symbol | number; key: null | string; containerInfo: any; children: ReactNode; implementation: any }
|
|
55
|
+
|
|
56
|
+
export interface ComponentSelector { $$typeof: symbol | number; value: React$AbstractComponent<never, unknown> }
|
|
57
|
+
export interface HasPseudoClassSelector { $$typeof: symbol | number; value: Selector[] }
|
|
58
|
+
export interface RoleSelector { $$typeof: symbol | number; value: string }
|
|
59
|
+
export interface TextSelector { $$typeof: symbol | number; value: string }
|
|
60
|
+
export interface TestNameSelector { $$typeof: symbol | number; value: string }
|
|
61
|
+
export type Selector = ComponentSelector | HasPseudoClassSelector | RoleSelector | TextSelector | TestNameSelector;
|
|
62
|
+
|
|
63
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
64
|
+
export interface DevToolsConfig<Instance = any, TextInstance = any, RendererInspectionConfig = any> {
|
|
65
|
+
bundleType: BundleType;
|
|
66
|
+
version: string;
|
|
67
|
+
rendererPackageName: string;
|
|
68
|
+
findFiberByHostInstance?: (instance: Instance | TextInstance) => ReactFiber | null;
|
|
69
|
+
rendererConfig?: RendererInspectionConfig;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
export interface SuspenseHydrationCallbacks<SuspenseInstance = unknown> {
|
|
73
|
+
onHydrated?: (suspenseInstance: SuspenseInstance) => void;
|
|
74
|
+
onDeleted?: (suspenseInstance: SuspenseInstance) => void;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
export interface TransitionTracingCallbacks {
|
|
78
|
+
onTransitionStart?: (transitionName: string, startTime: number) => void;
|
|
79
|
+
onTransitionProgress?: (transitionName: string, startTime: number, currentTime: number, pending: Array<{ name: null | string }>) => void;
|
|
80
|
+
onTransitionIncomplete?: (transitionName: string, startTime: number, deletions: Array<{ type: string; name?: string; newName?: string; endTime: number }>) => void;
|
|
81
|
+
onTransitionComplete?: (transitionName: string, startTime: number, endTime: number) => void;
|
|
82
|
+
onMarkerProgress?: (transitionName: string, marker: string, startTime: number, currentTime: number, pending: Array<{ name: null | string }>) => void;
|
|
83
|
+
onMarkerIncomplete?: (transitionName: string, marker: string, startTime: number, deletions: Array<{ type: string; name?: string; newName?: string; endTime: number }>) => void;
|
|
84
|
+
onMarkerComplete?: (transitionName: string, marker: string, startTime: number, endTime: number) => void;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
// The base Fiber interface from react-reconciler, used to derive bippy's Fiber below
|
|
88
|
+
interface ReactFiber {
|
|
89
|
+
tag: WorkTag;
|
|
90
|
+
key: null | string;
|
|
91
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
92
|
+
elementType: any;
|
|
93
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
94
|
+
type: any;
|
|
95
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
96
|
+
stateNode: any;
|
|
97
|
+
return: ReactFiber | null;
|
|
98
|
+
child: ReactFiber | null;
|
|
99
|
+
sibling: ReactFiber | null;
|
|
100
|
+
index: number;
|
|
101
|
+
ref: null | (((handle: unknown) => void) & { _stringRef?: string | null }) | RefObject;
|
|
102
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
103
|
+
pendingProps: any;
|
|
104
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
105
|
+
memoizedProps: any;
|
|
106
|
+
updateQueue: unknown;
|
|
107
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
108
|
+
memoizedState: any;
|
|
109
|
+
dependencies: Dependencies | null;
|
|
110
|
+
mode: TypeOfMode;
|
|
111
|
+
flags: Flags;
|
|
112
|
+
subtreeFlags: Flags;
|
|
113
|
+
deletions: ReactFiber[] | null;
|
|
114
|
+
nextEffect: ReactFiber | null;
|
|
115
|
+
firstEffect: ReactFiber | null;
|
|
116
|
+
lastEffect: ReactFiber | null;
|
|
117
|
+
lanes: Lanes;
|
|
118
|
+
childLanes: Lanes;
|
|
119
|
+
alternate: ReactFiber | null;
|
|
120
|
+
actualDuration?: number;
|
|
121
|
+
actualStartTime?: number;
|
|
122
|
+
selfBaseDuration?: number;
|
|
123
|
+
treeBaseDuration?: number;
|
|
124
|
+
_debugID?: number;
|
|
125
|
+
_debugSource?: Source | null;
|
|
126
|
+
_debugOwner?: ReactFiber | null;
|
|
127
|
+
_debugIsCurrentlyTiming?: boolean;
|
|
128
|
+
_debugNeedsRemount?: boolean;
|
|
129
|
+
_debugHookTypes?: HookType[] | null;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
// ── bippy types (not from react-reconciler) ──
|
|
69
133
|
|
|
70
134
|
export interface ContextDependency<T> {
|
|
71
135
|
context: ReactContext<T>;
|