react-native-keyboard-controller 1.12.6 → 1.13.0

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 (152) hide show
  1. package/android/src/fabric/java/com/reactnativekeyboardcontroller/KeyboardGestureAreaViewManager.kt +5 -0
  2. package/android/src/main/java/com/reactnativekeyboardcontroller/extensions/ReactContext.kt +13 -0
  3. package/android/src/main/java/com/reactnativekeyboardcontroller/extensions/ThemedReactContext.kt +0 -10
  4. package/android/src/main/java/com/reactnativekeyboardcontroller/interactive/interpolators/Interpolator.kt +2 -1
  5. package/android/src/main/java/com/reactnativekeyboardcontroller/interactive/interpolators/IosInterpolator.kt +2 -1
  6. package/android/src/main/java/com/reactnativekeyboardcontroller/interactive/interpolators/LinearInterpolator.kt +1 -0
  7. package/android/src/main/java/com/reactnativekeyboardcontroller/listeners/FocusedInputObserver.kt +15 -8
  8. package/android/src/main/java/com/reactnativekeyboardcontroller/listeners/KeyboardAnimationCallback.kt +71 -59
  9. package/android/src/main/java/com/reactnativekeyboardcontroller/managers/KeyboardGestureAreaViewManagerImpl.kt +4 -0
  10. package/android/src/main/java/com/reactnativekeyboardcontroller/modal/ModalAttachedWatcher.kt +80 -0
  11. package/android/src/main/java/com/reactnativekeyboardcontroller/modules/StatusBarManagerCompatModuleImpl.kt +6 -12
  12. package/android/src/main/java/com/reactnativekeyboardcontroller/views/EdgeToEdgeReactViewGroup.kt +31 -4
  13. package/android/src/main/java/com/reactnativekeyboardcontroller/views/KeyboardGestureAreaReactViewGroup.kt +7 -0
  14. package/android/src/paper/java/com/reactnativekeyboardcontroller/KeyboardGestureAreaViewManager.kt +5 -0
  15. package/ios/core/KeyboardAnimation.swift +1 -1
  16. package/ios/core/TimingAnimation.swift +108 -0
  17. package/ios/extensions/UIApplication.swift +29 -0
  18. package/ios/extensions/UIView.swift +10 -0
  19. package/ios/observers/FocusedInputObserver.swift +2 -0
  20. package/ios/observers/KeyboardMovementObserver.swift +19 -10
  21. package/ios/traversal/ViewHierarchyNavigator.swift +1 -1
  22. package/ios/views/KeyboardControllerView.mm +30 -39
  23. package/lib/commonjs/animated.js +16 -30
  24. package/lib/commonjs/animated.js.map +1 -1
  25. package/lib/commonjs/bindings.js.map +1 -1
  26. package/lib/commonjs/bindings.native.js.map +1 -1
  27. package/lib/commonjs/components/KeyboardAvoidingView/hooks.js +3 -14
  28. package/lib/commonjs/components/KeyboardAvoidingView/hooks.js.map +1 -1
  29. package/lib/commonjs/components/KeyboardAvoidingView/index.js +5 -4
  30. package/lib/commonjs/components/KeyboardAvoidingView/index.js.map +1 -1
  31. package/lib/commonjs/components/KeyboardAwareScrollView/index.js +42 -16
  32. package/lib/commonjs/components/KeyboardAwareScrollView/index.js.map +1 -1
  33. package/lib/commonjs/components/KeyboardAwareScrollView/useSmoothKeyboardHandler.js +1 -0
  34. package/lib/commonjs/components/KeyboardAwareScrollView/useSmoothKeyboardHandler.js.map +1 -1
  35. package/lib/commonjs/components/KeyboardAwareScrollView/utils.js.map +1 -1
  36. package/lib/commonjs/components/KeyboardStickyView/index.js +2 -2
  37. package/lib/commonjs/components/KeyboardStickyView/index.js.map +1 -1
  38. package/lib/commonjs/components/KeyboardToolbar/Arrow.js +2 -2
  39. package/lib/commonjs/components/KeyboardToolbar/Arrow.js.map +1 -1
  40. package/lib/commonjs/components/KeyboardToolbar/Button.js +12 -12
  41. package/lib/commonjs/components/KeyboardToolbar/Button.js.map +1 -1
  42. package/lib/commonjs/components/KeyboardToolbar/index.js +33 -27
  43. package/lib/commonjs/components/KeyboardToolbar/index.js.map +1 -1
  44. package/lib/commonjs/components/index.js +2 -2
  45. package/lib/commonjs/components/index.js.map +1 -1
  46. package/lib/commonjs/context.js +3 -2
  47. package/lib/commonjs/context.js.map +1 -1
  48. package/lib/commonjs/event-handler.js +19 -0
  49. package/lib/commonjs/event-handler.js.map +1 -0
  50. package/lib/commonjs/event-handler.web.js +10 -0
  51. package/lib/commonjs/event-handler.web.js.map +1 -0
  52. package/lib/commonjs/event-mappings.js +9 -0
  53. package/lib/commonjs/event-mappings.js.map +1 -0
  54. package/lib/commonjs/hooks/index.js +8 -21
  55. package/lib/commonjs/hooks/index.js.map +1 -1
  56. package/lib/commonjs/hooks/useSyncEffect/index.js +37 -0
  57. package/lib/commonjs/hooks/useSyncEffect/index.js.map +1 -0
  58. package/lib/commonjs/internal.js +20 -43
  59. package/lib/commonjs/internal.js.map +1 -1
  60. package/lib/commonjs/monkey-patch.android.js +1 -1
  61. package/lib/commonjs/monkey-patch.android.js.map +1 -1
  62. package/lib/commonjs/monkey-patch.js.map +1 -1
  63. package/lib/commonjs/reanimated.js +1 -3
  64. package/lib/commonjs/reanimated.js.map +1 -1
  65. package/lib/commonjs/reanimated.native.js +1 -35
  66. package/lib/commonjs/reanimated.native.js.map +1 -1
  67. package/lib/commonjs/specs/KeyboardControllerViewNativeComponent.js +1 -1
  68. package/lib/commonjs/specs/KeyboardControllerViewNativeComponent.js.map +1 -1
  69. package/lib/commonjs/specs/KeyboardGestureAreaNativeComponent.js +1 -1
  70. package/lib/commonjs/specs/KeyboardGestureAreaNativeComponent.js.map +1 -1
  71. package/lib/commonjs/types.js.map +1 -1
  72. package/lib/module/animated.js +17 -32
  73. package/lib/module/animated.js.map +1 -1
  74. package/lib/module/bindings.js.map +1 -1
  75. package/lib/module/bindings.native.js.map +1 -1
  76. package/lib/module/components/KeyboardAvoidingView/hooks.js +3 -14
  77. package/lib/module/components/KeyboardAvoidingView/hooks.js.map +1 -1
  78. package/lib/module/components/KeyboardAvoidingView/index.js +4 -3
  79. package/lib/module/components/KeyboardAvoidingView/index.js.map +1 -1
  80. package/lib/module/components/KeyboardAwareScrollView/index.js +41 -15
  81. package/lib/module/components/KeyboardAwareScrollView/index.js.map +1 -1
  82. package/lib/module/components/KeyboardAwareScrollView/useSmoothKeyboardHandler.js +1 -0
  83. package/lib/module/components/KeyboardAwareScrollView/useSmoothKeyboardHandler.js.map +1 -1
  84. package/lib/module/components/KeyboardAwareScrollView/utils.js.map +1 -1
  85. package/lib/module/components/KeyboardStickyView/index.js +1 -1
  86. package/lib/module/components/KeyboardToolbar/Button.js +10 -10
  87. package/lib/module/components/KeyboardToolbar/Button.js.map +1 -1
  88. package/lib/module/components/KeyboardToolbar/index.js +31 -25
  89. package/lib/module/components/KeyboardToolbar/index.js.map +1 -1
  90. package/lib/module/context.js +3 -2
  91. package/lib/module/context.js.map +1 -1
  92. package/lib/module/event-handler.js +13 -0
  93. package/lib/module/event-handler.js.map +1 -0
  94. package/lib/module/event-handler.web.js +5 -0
  95. package/lib/module/event-handler.web.js.map +1 -0
  96. package/lib/module/event-mappings.js +3 -0
  97. package/lib/module/event-mappings.js.map +1 -0
  98. package/lib/module/hooks/index.js +7 -21
  99. package/lib/module/hooks/index.js.map +1 -1
  100. package/lib/module/hooks/useSyncEffect/index.js +31 -0
  101. package/lib/module/hooks/useSyncEffect/index.js.map +1 -0
  102. package/lib/module/internal.js +21 -44
  103. package/lib/module/internal.js.map +1 -1
  104. package/lib/module/monkey-patch.js.map +1 -1
  105. package/lib/module/reanimated.js +0 -2
  106. package/lib/module/reanimated.js.map +1 -1
  107. package/lib/module/reanimated.native.js +0 -32
  108. package/lib/module/reanimated.native.js.map +1 -1
  109. package/lib/module/specs/KeyboardGestureAreaNativeComponent.js.map +1 -1
  110. package/lib/module/types.js.map +1 -1
  111. package/lib/typescript/components/KeyboardToolbar/Button.d.ts +2 -2
  112. package/lib/typescript/components/KeyboardToolbar/index.d.ts +4 -3
  113. package/lib/typescript/context.d.ts +3 -3
  114. package/lib/typescript/event-handler.d.ts +3 -0
  115. package/lib/typescript/event-mappings.d.ts +2 -0
  116. package/lib/typescript/hooks/index.d.ts +1 -1
  117. package/lib/typescript/hooks/useSyncEffect/index.d.ts +14 -0
  118. package/lib/typescript/internal.d.ts +5 -19
  119. package/lib/typescript/reanimated.d.ts +1 -3
  120. package/lib/typescript/reanimated.native.d.ts +1 -3
  121. package/lib/typescript/specs/KeyboardGestureAreaNativeComponent.d.ts +2 -1
  122. package/lib/typescript/types.d.ts +6 -0
  123. package/package.json +14 -7
  124. package/src/animated.tsx +21 -43
  125. package/src/bindings.native.ts +1 -0
  126. package/src/bindings.ts +1 -0
  127. package/src/components/KeyboardAvoidingView/hooks.ts +3 -13
  128. package/src/components/KeyboardAvoidingView/index.tsx +2 -1
  129. package/src/components/KeyboardAwareScrollView/index.tsx +51 -13
  130. package/src/components/KeyboardAwareScrollView/useSmoothKeyboardHandler.ts +2 -0
  131. package/src/components/KeyboardAwareScrollView/utils.ts +1 -0
  132. package/src/components/KeyboardToolbar/Button.tsx +11 -11
  133. package/src/components/KeyboardToolbar/index.tsx +45 -25
  134. package/src/context.ts +8 -6
  135. package/src/event-handler.js +15 -0
  136. package/src/event-handler.ts +8 -0
  137. package/src/event-handler.web.js +5 -0
  138. package/src/event-mappings.ts +14 -0
  139. package/src/hooks/index.ts +9 -16
  140. package/src/hooks/useSyncEffect/index.ts +36 -0
  141. package/src/internal.ts +34 -53
  142. package/src/monkey-patch.ts +1 -0
  143. package/src/reanimated.native.ts +0 -50
  144. package/src/reanimated.ts +1 -12
  145. package/src/specs/KeyboardGestureAreaNativeComponent.ts +5 -1
  146. package/src/types.ts +6 -0
  147. package/lib/commonjs/utils.js +0 -9
  148. package/lib/commonjs/utils.js.map +0 -1
  149. package/lib/module/utils.js +0 -2
  150. package/lib/module/utils.js.map +0 -1
  151. package/lib/typescript/utils.d.ts +0 -1
  152. package/src/utils.ts +0 -1
@@ -3,7 +3,8 @@ import { useEffect } from "react";
3
3
  import { KeyboardController } from "../bindings";
4
4
  import { AndroidSoftInputModes } from "../constants";
5
5
  import { useKeyboardContext } from "../context";
6
- import { uuid } from "../utils";
6
+
7
+ import useSyncEffect from "./useSyncEffect";
7
8
 
8
9
  import type { AnimatedContext, ReanimatedContext } from "../context";
9
10
  import type { FocusedInputHandler, KeyboardHandler } from "../types";
@@ -39,14 +40,10 @@ export function useGenericKeyboardHandler(
39
40
  ) {
40
41
  const context = useKeyboardContext();
41
42
 
42
- useEffect(() => {
43
- const key = uuid();
44
-
45
- context.setKeyboardHandlers({ [key]: handler });
43
+ useSyncEffect(() => {
44
+ const cleanup = context.setKeyboardHandlers(handler);
46
45
 
47
- return () => {
48
- context.setKeyboardHandlers({ [key]: undefined });
49
- };
46
+ return () => cleanup();
50
47
  }, deps);
51
48
  }
52
49
 
@@ -71,19 +68,15 @@ export function useReanimatedFocusedInput() {
71
68
  }
72
69
 
73
70
  export function useFocusedInputHandler(
74
- handler?: FocusedInputHandler,
71
+ handler: FocusedInputHandler,
75
72
  deps?: DependencyList,
76
73
  ) {
77
74
  const context = useKeyboardContext();
78
75
 
79
- useEffect(() => {
80
- const key = uuid();
81
-
82
- context.setInputHandlers({ [key]: handler });
76
+ useSyncEffect(() => {
77
+ const cleanup = context.setInputHandlers(handler);
83
78
 
84
- return () => {
85
- context.setInputHandlers({ [key]: undefined });
86
- };
79
+ return () => cleanup();
87
80
  }, deps);
88
81
  }
89
82
 
@@ -0,0 +1,36 @@
1
+ import { useEffect, useRef } from "react";
2
+
3
+ import type { DependencyList } from "react";
4
+
5
+ /**
6
+ * @description
7
+ * Equivalent to `useEffect` but will run the effect synchronously, i. e. before render.
8
+ *
9
+ * @param {effect} - imperative function
10
+ * @param {deps} - if present, effect will only activate if the values in the list change
11
+ *
12
+ * @author Kiryl Ziusko
13
+ * @since 1.13.0
14
+ * @version 1.0.0
15
+ */
16
+ const useSyncEffect: typeof useEffect = (effect, deps) => {
17
+ const cachedDeps = useRef<DependencyList | undefined | null>(null);
18
+ const areDepsEqual = deps?.every(
19
+ (el, index) => cachedDeps.current && el === cachedDeps.current[index],
20
+ );
21
+ const cleanupRef = useRef<(() => void) | void>();
22
+
23
+ if (!areDepsEqual || !cachedDeps.current) {
24
+ cleanupRef.current?.();
25
+ cleanupRef.current = effect();
26
+ cachedDeps.current = deps;
27
+ }
28
+
29
+ useEffect(() => {
30
+ return () => {
31
+ cleanupRef.current?.();
32
+ };
33
+ }, []);
34
+ };
35
+
36
+ export default useSyncEffect;
package/src/internal.ts CHANGED
@@ -1,63 +1,44 @@
1
- import { useCallback, useRef } from "react";
2
- import { Animated } from "react-native";
3
- import { useSharedValue } from "react-native-reanimated";
1
+ import { useRef } from "react";
2
+ import { Animated, findNodeHandle } from "react-native";
4
3
 
5
- import type { Handlers } from "./types";
4
+ import { registerEventHandler, unregisterEventHandler } from "./event-handler";
6
5
 
7
- type UntypedHandler = Record<string, (event: never) => void>;
8
- type SharedHandlersReturnType<T extends UntypedHandler> = [
9
- (handler: Handlers<T>) => void,
10
- <K extends keyof T>(type: K, event: Parameters<T[K]>[0]) => void,
11
- ];
6
+ type EventHandler = (event: never) => void;
7
+ type ComponentOrHandle = Parameters<typeof findNodeHandle>[0];
12
8
 
13
- /**
14
- * Hook for storing worklet handlers (objects with keys, where values are worklets).
15
- * Returns methods for setting handlers and broadcasting events in them.
16
- *
17
- * T is a generic that looks like:
18
- * @example
19
- * {
20
- * onEvent: () => {},
21
- * onEvent2: () => {},
22
- * }
23
- */
24
- export function useSharedHandlers<
25
- T extends UntypedHandler,
26
- >(): SharedHandlersReturnType<T> {
27
- const handlers = useSharedValue<Handlers<T>>({});
28
- const jsHandlers = useRef<Handlers<T>>({});
9
+ export function useEventHandlerRegistration<
10
+ H extends Partial<Record<string, EventHandler>>,
11
+ >(
12
+ map: Map<keyof H, string>,
13
+ viewTagRef: React.MutableRefObject<ComponentOrHandle>,
14
+ ) {
15
+ const onRegisterHandler = (handler: H) => {
16
+ const viewTag = findNodeHandle(viewTagRef.current);
17
+ const ids = Object.keys(handler).map((handlerName) => {
18
+ const eventName = map.get(handlerName as keyof H);
19
+ const functionToCall = handler[handlerName as keyof H];
29
20
 
30
- // since js -> worklet -> js call is asynchronous, we can not write handlers
31
- // straight into shared variable (using current shared value as a previous result),
32
- // since there may be a race condition in a call, and closure may have out-of-dated
33
- // values. As a result, some of handlers may be not written to "all handlers" object.
34
- // Below we are writing all handlers to `ref` and afterwards synchronize them with
35
- // shared value (since `refs` are not referring to actual value in worklets).
36
- // This approach allow us to update synchronously handlers in js thread (and it assures,
37
- // that it will have all of them) and then update them in worklet thread (calls are
38
- // happening in FIFO order, so we will always have actual value).
39
- const updateSharedHandlers = () => {
40
- handlers.value = jsHandlers.current;
41
- };
42
- const setHandlers = useCallback((handler: Handlers<T>) => {
43
- jsHandlers.current = {
44
- ...jsHandlers.current,
45
- ...handler,
46
- };
47
- updateSharedHandlers();
48
- }, []);
49
- const broadcast = <K extends keyof T>(
50
- type: K,
51
- event: Parameters<T[K]>[0],
52
- ) => {
53
- "worklet";
21
+ if (eventName && viewTag) {
22
+ return registerEventHandler(
23
+ (event: Parameters<NonNullable<H[keyof H]>>[0]) => {
24
+ "worklet";
25
+
26
+ functionToCall?.(event);
27
+ },
28
+ eventName,
29
+ viewTag,
30
+ );
31
+ }
54
32
 
55
- Object.keys(handlers.value).forEach((key) => {
56
- handlers.value[key]?.[type]?.(event);
33
+ return null;
57
34
  });
35
+
36
+ return () => {
37
+ ids.forEach((id) => (id ? unregisterEventHandler(id) : null));
38
+ };
58
39
  };
59
40
 
60
- return [setHandlers, broadcast];
41
+ return onRegisterHandler;
61
42
  }
62
43
 
63
44
  /**
@@ -75,7 +56,7 @@ export function useAnimatedValue(
75
56
  ): Animated.Value {
76
57
  const ref = useRef<Animated.Value | null>(null);
77
58
 
78
- if (ref.current == null) {
59
+ if (ref.current === null) {
79
60
  ref.current = new Animated.Value(initialValue, config);
80
61
  }
81
62
 
@@ -1,4 +1,5 @@
1
1
  // stub for all platforms
2
2
  const NOOP = () => {};
3
+
3
4
  export const applyMonkeyPatch = NOOP;
4
5
  export const revertMonkeyPatch = NOOP;
@@ -4,10 +4,6 @@ import type {
4
4
  EventWithName,
5
5
  FocusedInputLayoutChangedEvent,
6
6
  FocusedInputLayoutHandlerHook,
7
- FocusedInputSelectionChangedEvent,
8
- FocusedInputSelectionHandlerHook,
9
- FocusedInputTextChangedEvent,
10
- FocusedInputTextHandlerHook,
11
7
  KeyboardHandlerHook,
12
8
  NativeEvent,
13
9
  } from "./types";
@@ -84,49 +80,3 @@ export const useFocusedInputLayoutHandler: FocusedInputLayoutHandlerHook<
84
80
  doDependenciesDiffer,
85
81
  );
86
82
  };
87
-
88
- export const useFocusedInputTextHandler: FocusedInputTextHandlerHook<
89
- EventContext,
90
- EventWithName<FocusedInputTextChangedEvent>
91
- > = (handlers, dependencies) => {
92
- const { context, doDependenciesDiffer } = useHandler(handlers, dependencies);
93
-
94
- return useEvent(
95
- (event) => {
96
- "worklet";
97
- const { onFocusedInputTextChanged } = handlers;
98
-
99
- if (
100
- onFocusedInputTextChanged &&
101
- event.eventName.endsWith("onFocusedInputTextChanged")
102
- ) {
103
- onFocusedInputTextChanged(event, context);
104
- }
105
- },
106
- ["onFocusedInputTextChanged"],
107
- doDependenciesDiffer,
108
- );
109
- };
110
-
111
- export const useFocusedInputSelectionHandler: FocusedInputSelectionHandlerHook<
112
- EventContext,
113
- EventWithName<FocusedInputSelectionChangedEvent>
114
- > = (handlers, dependencies) => {
115
- const { context, doDependenciesDiffer } = useHandler(handlers, dependencies);
116
-
117
- return useEvent(
118
- (event) => {
119
- "worklet";
120
- const { onFocusedInputSelectionChanged } = handlers;
121
-
122
- if (
123
- onFocusedInputSelectionChanged &&
124
- event.eventName.endsWith("onFocusedInputSelectionChanged")
125
- ) {
126
- onFocusedInputSelectionChanged(event, context);
127
- }
128
- },
129
- ["onFocusedInputSelectionChanged"],
130
- doDependenciesDiffer,
131
- );
132
- };
package/src/reanimated.ts CHANGED
@@ -2,15 +2,12 @@ import type {
2
2
  EventWithName,
3
3
  FocusedInputLayoutChangedEvent,
4
4
  FocusedInputLayoutHandlerHook,
5
- FocusedInputSelectionChangedEvent,
6
- FocusedInputSelectionHandlerHook,
7
- FocusedInputTextChangedEvent,
8
- FocusedInputTextHandlerHook,
9
5
  KeyboardHandlerHook,
10
6
  NativeEvent,
11
7
  } from "./types";
12
8
 
13
9
  const NOOP = () => () => {};
10
+
14
11
  export const useAnimatedKeyboardHandler: KeyboardHandlerHook<
15
12
  Record<string, unknown>,
16
13
  EventWithName<NativeEvent>
@@ -19,11 +16,3 @@ export const useFocusedInputLayoutHandler: FocusedInputLayoutHandlerHook<
19
16
  Record<string, unknown>,
20
17
  EventWithName<FocusedInputLayoutChangedEvent>
21
18
  > = NOOP;
22
- export const useFocusedInputTextHandler: FocusedInputTextHandlerHook<
23
- Record<string, unknown>,
24
- EventWithName<FocusedInputTextChangedEvent>
25
- > = NOOP;
26
- export const useFocusedInputSelectionHandler: FocusedInputSelectionHandlerHook<
27
- Record<string, unknown>,
28
- EventWithName<FocusedInputSelectionChangedEvent>
29
- > = NOOP;
@@ -2,12 +2,16 @@ import codegenNativeComponent from "react-native/Libraries/Utilities/codegenNati
2
2
 
3
3
  import type { HostComponent } from "react-native";
4
4
  import type { ViewProps } from "react-native/Libraries/Components/View/ViewPropTypes";
5
- import type { WithDefault } from "react-native/Libraries/Types/CodegenTypes";
5
+ import type {
6
+ Double,
7
+ WithDefault,
8
+ } from "react-native/Libraries/Types/CodegenTypes";
6
9
 
7
10
  export interface NativeProps extends ViewProps {
8
11
  interpolator?: WithDefault<"linear" | "ios", "linear">;
9
12
  showOnSwipeUp?: boolean;
10
13
  enableSwipeToDismiss?: boolean;
14
+ offset?: Double;
11
15
  }
12
16
 
13
17
  export default codegenNativeComponent<NativeProps>("KeyboardGestureArea", {
package/src/types.ts CHANGED
@@ -47,6 +47,8 @@ export type EventWithName<T> = {
47
47
 
48
48
  // native View/Module declarations
49
49
  export type KeyboardControllerProps = {
50
+ //ref prop
51
+ ref?: React.Ref<React.Component<KeyboardControllerProps>>;
50
52
  // callback props
51
53
  onKeyboardMoveStart?: (
52
54
  e: NativeSyntheticEvent<EventWithName<NativeEvent>>,
@@ -101,6 +103,10 @@ export type KeyboardGestureAreaProps = {
101
103
  * Defaults to `true`.
102
104
  */
103
105
  enableSwipeToDismiss?: boolean;
106
+ /**
107
+ * Extra distance to the keyboard.
108
+ */
109
+ offset?: number;
104
110
  } & ViewProps;
105
111
 
106
112
  export type Direction = "next" | "prev" | "current";
@@ -1,9 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.uuid = void 0;
7
- const uuid = () => Math.random().toString(36).slice(-6);
8
- exports.uuid = uuid;
9
- //# sourceMappingURL=utils.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["uuid","Math","random","toString","slice","exports"],"sources":["utils.ts"],"sourcesContent":["export const uuid = () => Math.random().toString(36).slice(-6);\n"],"mappings":";;;;;;AAAO,MAAMA,IAAI,GAAGA,CAAA,KAAMC,IAAI,CAACC,MAAM,CAAC,CAAC,CAACC,QAAQ,CAAC,EAAE,CAAC,CAACC,KAAK,CAAC,CAAC,CAAC,CAAC;AAACC,OAAA,CAAAL,IAAA,GAAAA,IAAA","ignoreList":[]}
@@ -1,2 +0,0 @@
1
- export const uuid = () => Math.random().toString(36).slice(-6);
2
- //# sourceMappingURL=utils.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["uuid","Math","random","toString","slice"],"sources":["utils.ts"],"sourcesContent":["export const uuid = () => Math.random().toString(36).slice(-6);\n"],"mappings":"AAAA,OAAO,MAAMA,IAAI,GAAGA,CAAA,KAAMC,IAAI,CAACC,MAAM,CAAC,CAAC,CAACC,QAAQ,CAAC,EAAE,CAAC,CAACC,KAAK,CAAC,CAAC,CAAC,CAAC","ignoreList":[]}
@@ -1 +0,0 @@
1
- export declare const uuid: () => string;
package/src/utils.ts DELETED
@@ -1 +0,0 @@
1
- export const uuid = () => Math.random().toString(36).slice(-6);