bippy 0.3.0 → 0.3.2

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 (39) hide show
  1. package/README.md +24 -0
  2. package/dist/chunk-AMVCK6H6.js +2240 -0
  3. package/dist/chunk-AQ674A4M.cjs +38 -0
  4. package/dist/{chunk-2R5SJTFQ.js → chunk-E67XFKKG.js} +2 -7
  5. package/dist/chunk-EPG3GO3H.js +35 -0
  6. package/dist/{chunk-POWCTW3F.cjs → chunk-J2F3EJOS.cjs} +2 -7
  7. package/dist/chunk-LMTDJIAV.cjs +2246 -0
  8. package/dist/{chunk-R357CEJU.cjs → chunk-OZZZ2ACU.cjs} +57 -40
  9. package/dist/{chunk-NK43KTPL.js → chunk-SI6Y374H.js} +55 -39
  10. package/dist/core.cjs +80 -67
  11. package/dist/core.d.cts +13 -3
  12. package/dist/core.d.ts +13 -3
  13. package/dist/core.js +2 -1
  14. package/dist/experiments/inspect.cjs +25 -15
  15. package/dist/experiments/inspect.js +13 -3
  16. package/dist/experiments/shrinkwrap.cjs +7 -6
  17. package/dist/experiments/shrinkwrap.js +3 -2
  18. package/dist/index.cjs +81 -68
  19. package/dist/index.d.cts +3 -2
  20. package/dist/index.d.ts +3 -2
  21. package/dist/index.global.js +1 -1
  22. package/dist/index.js +3 -2
  23. package/dist/jsx-dev-runtime.cjs +47 -0
  24. package/dist/jsx-dev-runtime.d.cts +8 -0
  25. package/dist/jsx-dev-runtime.d.ts +8 -0
  26. package/dist/jsx-dev-runtime.js +37 -0
  27. package/dist/{types-bP3PNEQt.d.cts → jsx-runtime-LhDmw-G0.d.cts} +1 -0
  28. package/dist/{types-bP3PNEQt.d.ts → jsx-runtime-LhDmw-G0.d.ts} +1 -0
  29. package/dist/jsx-runtime.cjs +15 -0
  30. package/dist/jsx-runtime.d.cts +3 -0
  31. package/dist/jsx-runtime.d.ts +3 -0
  32. package/dist/jsx-runtime.js +4 -0
  33. package/dist/shrinkwrap.global.js +1 -1
  34. package/dist/source.cjs +274 -2216
  35. package/dist/source.d.cts +7 -3
  36. package/dist/source.d.ts +7 -3
  37. package/dist/source.global.js +14 -1
  38. package/dist/source.js +4 -2229
  39. package/package.json +21 -1
package/README.md CHANGED
@@ -397,6 +397,30 @@ import { isValidFiber } from 'bippy';
397
397
  console.log(isValidFiber(fiber));
398
398
  ```
399
399
 
400
+ ## getFiberFromHostInstance
401
+
402
+ returns the fiber associated with a given host instance (e.g., a DOM element).
403
+
404
+ ```typescript
405
+ import { getFiberFromHostInstance } from 'bippy';
406
+
407
+ const fiber = getFiberFromHostInstance(document.querySelector('div'));
408
+ console.log(fiber);
409
+ ```
410
+
411
+ ## getLatestFiber
412
+
413
+ returns the latest fiber (since it may be double-buffered). usually use this in combination with `getFiberFromHostInstance`.
414
+
415
+ ```typescript
416
+ import { getLatestFiber } from 'bippy';
417
+
418
+ const latestFiber = getLatestFiber(
419
+ getFiberFromHostInstance(document.querySelector('div'))
420
+ );
421
+ console.log(latestFiber);
422
+ ```
423
+
400
424
  ## examples
401
425
 
402
426
  the best way to understand bippy is to [read the source code](https://github.com/aidenybai/bippy/blob/main/src/core.ts). here are some examples of how you can use it: