react-component-instance 0.0.17 → 0.0.18

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-component-instance",
3
- "version": "0.0.17",
3
+ "version": "0.0.18",
4
4
  "description": "Get a React class component instance from its DOM Element",
5
5
  "keywords": [
6
6
  "react",
@@ -42,6 +42,7 @@
42
42
  "@types/debug": "^4.1.12",
43
43
  "@types/jest": "^29.5.14",
44
44
  "@types/react": "^19.0.12",
45
+ "@types/react-dom": "^19.0.4",
45
46
  "core-js": "^3.41.0",
46
47
  "eslint": "^9.23.0",
47
48
  "eslint-plugin-react": "^7.37.4",
@@ -49,10 +50,12 @@
49
50
  "husky": "^9.1.7",
50
51
  "jest": "^29.7.0",
51
52
  "jest-environment-jsdom": "^29.7.0",
52
- "react": "^19.1.0"
53
+ "react": "^19.1.0",
54
+ "react-dom": "^19.1.0"
53
55
  },
54
56
  "imports": {
55
- "#react-component-instance": "./src/index.mjs"
57
+ "#react-component-instance": "./src/index.mjs",
58
+ "#react-component-instance/utils": "./src/utils/index.mjs"
56
59
  },
57
60
  "exports": {
58
61
  ".": "./src/index.mjs"
package/src/index.d.mts CHANGED
@@ -3,6 +3,8 @@ import type {
3
3
  RenderResult as RenderType
4
4
  } from '@testing-library/react'
5
5
 
6
+ import '#react-component-instance/utils'
7
+
6
8
  type FiberRootNode = ReactComponentInstanceTypes.FiberRootNode
7
9
  type FiberNode = ReactComponentInstanceTypes.FiberNode
8
10
 
@@ -21,7 +21,7 @@ export function getParentFiberFrom (element: Element): FiberNode | null | undefi
21
21
 
22
22
  export function getChildFiberFrom (element: Element): FiberNode | null | undefined
23
23
 
24
- export function getContainerFiberFrom (element: Element): FiberNode | null | undefined
24
+ export function getContainerFiberFrom (element: Element): FiberRootNode | null | undefined
25
25
 
26
26
  export function getParentFiber (fiber: FiberNode): FiberNode | null | undefined
27
27
 
@@ -1,6 +1,6 @@
1
1
  /**
2
- * @typedef {ReactComponentInstanceTypes.FiberNode} FiberNode
3
2
  * @typedef {ReactComponentInstanceTypes.FiberRootNode} FiberRootNode
3
+ * @typedef {ReactComponentInstanceTypes.FiberNode} FiberNode
4
4
  */
5
5
 
6
6
  /**