@rootnative/inertia 0.0.3 → 0.0.4

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 (74) hide show
  1. package/CHANGELOG.md +41 -5
  2. package/README.md +5 -3
  3. package/dist/{chunk-SGUHE5CX.mjs → chunk-4ASOELLA.mjs} +1 -1
  4. package/dist/{chunk-CSODMRJ7.mjs → chunk-55W7BNO2.mjs} +475 -83
  5. package/dist/chunk-5SRD2WCO.js +8 -0
  6. package/dist/{chunk-PTRF47DA.js → chunk-7A6WTXNK.js} +10 -3
  7. package/dist/{chunk-3XTVY34H.js → chunk-CENTULW6.js} +2 -2
  8. package/dist/{chunk-4PEHWDAZ.js → chunk-D5KAHWMC.js} +7 -7
  9. package/dist/{chunk-O22NXXCZ.mjs → chunk-J5Q46OPW.mjs} +1 -1
  10. package/dist/{chunk-RGNX6UZN.mjs → chunk-K3CLP74S.mjs} +2 -2
  11. package/dist/{chunk-BP3Y2SHQ.js → chunk-MYE5NMXW.js} +495 -101
  12. package/dist/{chunk-OQV66TBQ.mjs → chunk-NAOXQJ7U.mjs} +1 -1
  13. package/dist/{chunk-R63GIUNU.mjs → chunk-QKC3APP4.mjs} +1 -1
  14. package/dist/{chunk-46P57VMY.mjs → chunk-RF7J5FRM.mjs} +1 -1
  15. package/dist/{chunk-CY7Y64C3.mjs → chunk-TU2XFPAK.mjs} +10 -4
  16. package/dist/chunk-TVFNJ25Z.js +8 -0
  17. package/dist/chunk-VLDIFL3F.js +8 -0
  18. package/dist/{chunk-7AOERN53.js → chunk-WVRCKOPO.js} +3 -3
  19. package/dist/{chunk-W5MC3P4N.js → chunk-XMEVPEMH.js} +2 -2
  20. package/dist/{chunk-BQQTHG2V.mjs → chunk-YKGY22SB.mjs} +1 -1
  21. package/dist/gestureLayer/index.d.mts +2 -2
  22. package/dist/gestureLayer/index.d.ts +2 -2
  23. package/dist/gestureLayer/index.js +10 -10
  24. package/dist/gestureLayer/index.mjs +3 -3
  25. package/dist/index.d.mts +4 -4
  26. package/dist/index.d.ts +4 -4
  27. package/dist/index.js +48 -169
  28. package/dist/index.mjs +17 -137
  29. package/dist/motion/Image.d.mts +1 -1
  30. package/dist/motion/Image.d.ts +1 -1
  31. package/dist/motion/Image.js +5 -5
  32. package/dist/motion/Image.mjs +4 -4
  33. package/dist/motion/Pressable.d.mts +1 -1
  34. package/dist/motion/Pressable.d.ts +1 -1
  35. package/dist/motion/Pressable.js +5 -5
  36. package/dist/motion/Pressable.mjs +4 -4
  37. package/dist/motion/ScrollView.d.mts +1 -1
  38. package/dist/motion/ScrollView.d.ts +1 -1
  39. package/dist/motion/ScrollView.js +5 -5
  40. package/dist/motion/ScrollView.mjs +4 -4
  41. package/dist/motion/Text.d.mts +1 -1
  42. package/dist/motion/Text.d.ts +1 -1
  43. package/dist/motion/Text.js +5 -5
  44. package/dist/motion/Text.mjs +4 -4
  45. package/dist/motion/View.d.mts +1 -1
  46. package/dist/motion/View.d.ts +1 -1
  47. package/dist/motion/View.js +5 -5
  48. package/dist/motion/View.mjs +4 -4
  49. package/dist/touch/index.d.mts +1 -1
  50. package/dist/touch/index.d.ts +1 -1
  51. package/dist/touch/index.js +3 -3
  52. package/dist/touch/index.mjs +1 -1
  53. package/dist/{types-G1dBU2IQ.d.mts → types-37pN82yh.d.mts} +49 -14
  54. package/dist/{types-G1dBU2IQ.d.ts → types-37pN82yh.d.ts} +49 -14
  55. package/dist/{useGesture-D1e4ixJo.d.ts → useGesture-Cl4uzZIr.d.ts} +1 -1
  56. package/dist/{useGesture-RFY6kTL3.d.mts → useGesture-_IKkS8Dv.d.mts} +1 -1
  57. package/llms.txt +3 -1
  58. package/package.json +1 -1
  59. package/src/index.ts +2 -1
  60. package/src/internal/boxShadow.ts +177 -6
  61. package/src/internal/nonWorkletWarning.ts +4 -6
  62. package/src/internal/warnOnce.ts +28 -0
  63. package/src/layout/index.ts +10 -0
  64. package/src/layout/measureWindow.ts +135 -0
  65. package/src/layout/sharedRegistry.ts +107 -18
  66. package/src/layout/useSharedLayout.ts +256 -91
  67. package/src/motion/createMotionComponent.tsx +378 -39
  68. package/src/motion/installCheck.ts +1 -1
  69. package/src/transitions/index.ts +1 -1
  70. package/src/types.ts +52 -12
  71. package/src/values/useColorTransition.ts +1 -1
  72. package/dist/chunk-FNVFV4EY.js +0 -8
  73. package/dist/chunk-FWQOXA43.js +0 -8
  74. package/dist/chunk-KBP4LR75.js +0 -8
@@ -0,0 +1,8 @@
1
+ 'use strict';
2
+
3
+ var chunkMYE5NMXW_js = require('./chunk-MYE5NMXW.js');
4
+ var reactNative = require('react-native');
5
+
6
+ var MotionImage = chunkMYE5NMXW_js.createMotionComponent(reactNative.Image);
7
+
8
+ exports.MotionImage = MotionImage;
@@ -5,16 +5,22 @@ var reactNativeReanimated = require('react-native-reanimated');
5
5
 
6
6
  // src/transitions/easing.ts
7
7
 
8
- // src/internal/nonWorkletWarning.ts
8
+ // src/internal/warnOnce.ts
9
9
  var warned = /* @__PURE__ */ new Set();
10
- function warnNonWorkletOnce(key, message) {
10
+ function warnOnce(key, message) {
11
11
  if (!__DEV__) return;
12
- if (typeof process !== "undefined" && process.env?.JEST_WORKER_ID) return;
13
12
  if (warned.has(key)) return;
14
13
  warned.add(key);
15
14
  console.warn(message);
16
15
  }
17
16
 
17
+ // src/internal/nonWorkletWarning.ts
18
+ function warnNonWorkletOnce(key, message) {
19
+ if (!__DEV__) return;
20
+ if (typeof process !== "undefined" && process.env?.JEST_WORKER_ID) return;
21
+ warnOnce(key, message);
22
+ }
23
+
18
24
  // src/transitions/easing.ts
19
25
  function ensureWorkletEasing(easing) {
20
26
  if (!easing) return void 0;
@@ -282,3 +288,4 @@ exports.resolveTransition = resolveTransition;
282
288
  exports.springToReanimated = springToReanimated;
283
289
  exports.stableSig = stableSig;
284
290
  exports.warnNonWorkletOnce = warnNonWorkletOnce;
291
+ exports.warnOnce = warnOnce;
@@ -1,8 +1,8 @@
1
1
  'use strict';
2
2
 
3
- var chunkBP3Y2SHQ_js = require('./chunk-BP3Y2SHQ.js');
3
+ var chunkMYE5NMXW_js = require('./chunk-MYE5NMXW.js');
4
4
  var reactNative = require('react-native');
5
5
 
6
- var MotionPressable = chunkBP3Y2SHQ_js.createMotionComponent(reactNative.Pressable);
6
+ var MotionPressable = chunkMYE5NMXW_js.createMotionComponent(reactNative.Pressable);
7
7
 
8
8
  exports.MotionPressable = MotionPressable;
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
- var chunk7AOERN53_js = require('./chunk-7AOERN53.js');
4
- var chunkPTRF47DA_js = require('./chunk-PTRF47DA.js');
3
+ var chunkWVRCKOPO_js = require('./chunk-WVRCKOPO.js');
4
+ var chunk7A6WTXNK_js = require('./chunk-7A6WTXNK.js');
5
5
  var react = require('react');
6
6
  var reactNativeReanimated = require('react-native-reanimated');
7
7
 
@@ -10,12 +10,12 @@ function useGesture(transition) {
10
10
  const focused = reactNativeReanimated.useSharedValue(0);
11
11
  const focusVisible = reactNativeReanimated.useSharedValue(0);
12
12
  const hovered = reactNativeReanimated.useSharedValue(0);
13
- const shouldReduceMotion = chunk7AOERN53_js.useShouldReduceMotion();
14
- const resolved = chunk7AOERN53_js.resolveNamedTransitionProp(transition, chunk7AOERN53_js.useNamedTransitions());
13
+ const shouldReduceMotion = chunkWVRCKOPO_js.useShouldReduceMotion();
14
+ const resolved = chunkWVRCKOPO_js.resolveNamedTransitionProp(transition, chunkWVRCKOPO_js.useNamedTransitions());
15
15
  const setLayer = react.useCallback(
16
16
  (sv, layer, target) => {
17
17
  const cfg = shouldReduceMotion ? { type: "no-animation" } : layerTransition(layer, resolved) ?? { type: "spring" };
18
- sv.value = chunkPTRF47DA_js.resolveTransition(cfg, target);
18
+ sv.value = chunk7A6WTXNK_js.resolveTransition(cfg, target);
19
19
  },
20
20
  // The transition is intentionally read on every call rather than cooked
21
21
  // into the dep array — a fresh literal each render would otherwise
@@ -34,7 +34,7 @@ function useGesture(transition) {
34
34
  onHoverOut: () => setLayer(hovered, "hovered", 0),
35
35
  onFocus: () => {
36
36
  setLayer(focused, "focused", 1);
37
- if (chunk7AOERN53_js.isFocusVisible()) setLayer(focusVisible, "focusVisible", 1);
37
+ if (chunkWVRCKOPO_js.isFocusVisible()) setLayer(focusVisible, "focusVisible", 1);
38
38
  },
39
39
  onBlur: () => {
40
40
  setLayer(focused, "focused", 0);
@@ -47,7 +47,7 @@ function useGesture(transition) {
47
47
  }
48
48
  function layerTransition(layer, transition) {
49
49
  if (!transition) return void 0;
50
- if (chunkPTRF47DA_js.isTopLevelTransition(transition)) return transition;
50
+ if (chunk7A6WTXNK_js.isTopLevelTransition(transition)) return transition;
51
51
  return transition[layer];
52
52
  }
53
53
 
@@ -1,4 +1,4 @@
1
- import { createMotionComponent } from './chunk-CSODMRJ7.mjs';
1
+ import { createMotionComponent } from './chunk-55W7BNO2.mjs';
2
2
  import { Image } from 'react-native';
3
3
 
4
4
  var MotionImage = createMotionComponent(Image);
@@ -1,5 +1,5 @@
1
- import { useShouldReduceMotion, resolveNamedTransitionProp, useNamedTransitions, isFocusVisible } from './chunk-R63GIUNU.mjs';
2
- import { resolveTransition, isTopLevelTransition } from './chunk-CY7Y64C3.mjs';
1
+ import { useShouldReduceMotion, resolveNamedTransitionProp, useNamedTransitions, isFocusVisible } from './chunk-QKC3APP4.mjs';
2
+ import { resolveTransition, isTopLevelTransition } from './chunk-TU2XFPAK.mjs';
3
3
  import { useCallback, useMemo } from 'react';
4
4
  import { useSharedValue } from 'react-native-reanimated';
5
5