@tamagui/sheet 2.0.0-1769536410877 → 2.0.0-1769546410712
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/cjs/SheetImplementationCustom.cjs +31 -66
- package/dist/cjs/SheetImplementationCustom.js +40 -70
- package/dist/cjs/SheetImplementationCustom.js.map +1 -1
- package/dist/cjs/SheetImplementationCustom.native.js +33 -73
- package/dist/cjs/SheetImplementationCustom.native.js.map +1 -1
- package/dist/cjs/SheetScrollView.cjs +0 -2
- package/dist/cjs/SheetScrollView.js +0 -2
- package/dist/cjs/SheetScrollView.js.map +1 -1
- package/dist/cjs/SheetScrollView.native.js +0 -2
- package/dist/cjs/SheetScrollView.native.js.map +1 -1
- package/dist/cjs/useGestureHandlerPan.cjs +11 -21
- package/dist/cjs/useGestureHandlerPan.js +11 -20
- package/dist/cjs/useGestureHandlerPan.js.map +1 -1
- package/dist/cjs/useGestureHandlerPan.native.js +11 -21
- package/dist/cjs/useGestureHandlerPan.native.js.map +1 -1
- package/dist/esm/SheetImplementationCustom.js +41 -73
- package/dist/esm/SheetImplementationCustom.js.map +1 -1
- package/dist/esm/SheetImplementationCustom.mjs +33 -68
- package/dist/esm/SheetImplementationCustom.mjs.map +1 -1
- package/dist/esm/SheetImplementationCustom.native.js +35 -75
- package/dist/esm/SheetImplementationCustom.native.js.map +1 -1
- package/dist/esm/SheetScrollView.js +0 -2
- package/dist/esm/SheetScrollView.js.map +1 -1
- package/dist/esm/SheetScrollView.mjs +0 -2
- package/dist/esm/SheetScrollView.mjs.map +1 -1
- package/dist/esm/SheetScrollView.native.js +0 -2
- package/dist/esm/SheetScrollView.native.js.map +1 -1
- package/dist/esm/useGestureHandlerPan.js +11 -20
- package/dist/esm/useGestureHandlerPan.js.map +1 -1
- package/dist/esm/useGestureHandlerPan.mjs +11 -21
- package/dist/esm/useGestureHandlerPan.mjs.map +1 -1
- package/dist/esm/useGestureHandlerPan.native.js +11 -21
- package/dist/esm/useGestureHandlerPan.native.js.map +1 -1
- package/dist/jsx/SheetImplementationCustom.js +41 -73
- package/dist/jsx/SheetImplementationCustom.js.map +1 -1
- package/dist/jsx/SheetImplementationCustom.mjs +33 -68
- package/dist/jsx/SheetImplementationCustom.mjs.map +1 -1
- package/dist/jsx/SheetImplementationCustom.native.js +33 -73
- package/dist/jsx/SheetImplementationCustom.native.js.map +1 -1
- package/dist/jsx/SheetScrollView.js +0 -2
- package/dist/jsx/SheetScrollView.js.map +1 -1
- package/dist/jsx/SheetScrollView.mjs +0 -2
- package/dist/jsx/SheetScrollView.mjs.map +1 -1
- package/dist/jsx/SheetScrollView.native.js +0 -2
- package/dist/jsx/SheetScrollView.native.js.map +1 -1
- package/dist/jsx/useGestureHandlerPan.js +11 -20
- package/dist/jsx/useGestureHandlerPan.js.map +1 -1
- package/dist/jsx/useGestureHandlerPan.mjs +11 -21
- package/dist/jsx/useGestureHandlerPan.mjs.map +1 -1
- package/dist/jsx/useGestureHandlerPan.native.js +11 -21
- package/dist/jsx/useGestureHandlerPan.native.js.map +1 -1
- package/package.json +20 -20
- package/src/SheetImplementationCustom.tsx +46 -138
- package/src/SheetScrollView.tsx +0 -2
- package/src/types.tsx +0 -47
- package/src/useGestureHandlerPan.tsx +10 -57
- package/types/SheetImplementationCustom.d.ts.map +1 -1
- package/types/SheetScrollView.d.ts.map +1 -1
- package/types/types.d.ts +0 -38
- package/types/types.d.ts.map +1 -1
- package/types/useGestureHandlerPan.d.ts +1 -2
- package/types/useGestureHandlerPan.d.ts.map +1 -1
- package/dist/cjs/useKeyboardControllerSheet.cjs +0 -38
- package/dist/cjs/useKeyboardControllerSheet.js +0 -34
- package/dist/cjs/useKeyboardControllerSheet.js.map +0 -6
- package/dist/cjs/useKeyboardControllerSheet.native.js +0 -114
- package/dist/cjs/useKeyboardControllerSheet.native.js.map +0 -1
- package/dist/esm/useKeyboardControllerSheet.js +0 -18
- package/dist/esm/useKeyboardControllerSheet.js.map +0 -6
- package/dist/esm/useKeyboardControllerSheet.mjs +0 -15
- package/dist/esm/useKeyboardControllerSheet.mjs.map +0 -1
- package/dist/esm/useKeyboardControllerSheet.native.js +0 -88
- package/dist/esm/useKeyboardControllerSheet.native.js.map +0 -1
- package/dist/jsx/useKeyboardControllerSheet.js +0 -18
- package/dist/jsx/useKeyboardControllerSheet.js.map +0 -6
- package/dist/jsx/useKeyboardControllerSheet.mjs +0 -15
- package/dist/jsx/useKeyboardControllerSheet.mjs.map +0 -1
- package/dist/jsx/useKeyboardControllerSheet.native.js +0 -114
- package/dist/jsx/useKeyboardControllerSheet.native.js.map +0 -1
- package/src/useKeyboardControllerSheet.native.ts +0 -136
- package/src/useKeyboardControllerSheet.ts +0 -26
- package/types/useKeyboardControllerSheet.d.ts +0 -7
- package/types/useKeyboardControllerSheet.d.ts.map +0 -1
- package/types/useKeyboardControllerSheet.native.d.ts +0 -13
- package/types/useKeyboardControllerSheet.native.d.ts.map +0 -1
|
@@ -10,7 +10,7 @@ interface GesturePanConfig {
|
|
|
10
10
|
positions: number[]
|
|
11
11
|
frameSize: number
|
|
12
12
|
setPosition: (pos: number) => void
|
|
13
|
-
animateTo: (pos: number
|
|
13
|
+
animateTo: (pos: number) => void
|
|
14
14
|
stopSpring: () => void
|
|
15
15
|
scrollBridge: ScrollBridge
|
|
16
16
|
setIsDragging: (val: boolean) => void
|
|
@@ -22,8 +22,6 @@ interface GesturePanConfig {
|
|
|
22
22
|
setAnimatedPosition: (val: number) => void
|
|
23
23
|
// ref to scroll gesture for simultaneousWithExternalGesture
|
|
24
24
|
scrollGestureRef?: RefObject<any> | null
|
|
25
|
-
// ref to pause keyboard hide events during gesture (action-sheet pattern)
|
|
26
|
-
pauseKeyboardHandler?: RefObject<boolean>
|
|
27
25
|
}
|
|
28
26
|
|
|
29
27
|
interface GesturePanResult {
|
|
@@ -82,26 +80,21 @@ export function useGestureHandlerPan(config: GesturePanConfig): GesturePanResult
|
|
|
82
80
|
prevTranslationY: 0,
|
|
83
81
|
// track if scroll was engaged (scrollY > 0) at some point
|
|
84
82
|
scrollEngaged: false,
|
|
85
|
-
// positions frozen at gesture start — keyboard may dismiss during drag (input blur),
|
|
86
|
-
// causing positions to revert. Frozen positions ensure stable snap calculation.
|
|
87
|
-
frozenPositions: [] as number[],
|
|
88
|
-
frozenMinY: 0,
|
|
89
|
-
// whether pan gesture actually started (vs just a tap in onBegin)
|
|
90
|
-
panStarted: false,
|
|
91
83
|
})
|
|
92
84
|
|
|
93
85
|
const onStart = useCallback(() => {
|
|
94
86
|
stopSpring()
|
|
95
|
-
|
|
87
|
+
setIsDragging(true)
|
|
88
|
+
}, [stopSpring, setIsDragging])
|
|
96
89
|
|
|
97
90
|
const onEnd = useCallback(
|
|
98
|
-
(closestPoint: number
|
|
91
|
+
(closestPoint: number) => {
|
|
99
92
|
setIsDragging(false)
|
|
100
93
|
scrollBridge.setParentDragging(false)
|
|
101
94
|
// re-enable scroll when gesture ends
|
|
102
95
|
scrollBridge.setScrollEnabled?.(true)
|
|
103
96
|
setPosition(closestPoint)
|
|
104
|
-
animateTo(closestPoint
|
|
97
|
+
animateTo(closestPoint)
|
|
105
98
|
},
|
|
106
99
|
[setIsDragging, scrollBridge, setPosition, animateTo]
|
|
107
100
|
)
|
|
@@ -129,18 +122,6 @@ export function useGestureHandlerPan(config: GesturePanConfig): GesturePanResult
|
|
|
129
122
|
.failOffsetX([-20, 20])
|
|
130
123
|
.shouldCancelWhenOutside(false)
|
|
131
124
|
.onBegin(() => {
|
|
132
|
-
// onBegin fires on ANY touch (including taps to focus inputs).
|
|
133
|
-
// We do NOT set isDragging here — that would block keyboard animation.
|
|
134
|
-
// Instead, isDragging is set in onStart (actual pan gesture recognized).
|
|
135
|
-
gs.panStarted = false
|
|
136
|
-
|
|
137
|
-
// lightweight: pause keyboard handler to suppress hide events during gesture.
|
|
138
|
-
// This prevents keyboard flicker if input blurs before onStart.
|
|
139
|
-
// If this is just a tap, onFinalize un-pauses without setting isDragging.
|
|
140
|
-
if (config.pauseKeyboardHandler) {
|
|
141
|
-
config.pauseKeyboardHandler.current = true
|
|
142
|
-
}
|
|
143
|
-
|
|
144
125
|
// check position at gesture begin - before direction is known
|
|
145
126
|
const pos = getCurrentPosition()
|
|
146
127
|
const atTop = pos <= minY + AT_TOP_THRESHOLD
|
|
@@ -151,10 +132,6 @@ export function useGestureHandlerPan(config: GesturePanConfig): GesturePanResult
|
|
|
151
132
|
gs.accumulatedOffset = 0
|
|
152
133
|
gs.prevTranslationY = 0
|
|
153
134
|
gs.scrollEngaged = currentScrollY > 0 // track if scroll is already engaged
|
|
154
|
-
// freeze positions at gesture start so keyboard dismiss during drag
|
|
155
|
-
// doesn't change snap targets mid-gesture
|
|
156
|
-
gs.frozenPositions = [...positions]
|
|
157
|
-
gs.frozenMinY = minY
|
|
158
135
|
|
|
159
136
|
// if sheet not at top, DISABLE SCROLL immediately and lock to 0
|
|
160
137
|
// this prevents scroll from firing before pan takes over
|
|
@@ -163,11 +140,6 @@ export function useGestureHandlerPan(config: GesturePanConfig): GesturePanResult
|
|
|
163
140
|
}
|
|
164
141
|
})
|
|
165
142
|
.onStart(() => {
|
|
166
|
-
// onStart fires only when pan gesture is recognized (finger moved enough).
|
|
167
|
-
// Safe to set isDragging here — this won't fire for taps to focus inputs.
|
|
168
|
-
gs.panStarted = true
|
|
169
|
-
setIsDragging(true)
|
|
170
|
-
|
|
171
143
|
// console.warn('[RNGH-Pan] onStart', { startY: gs.startY, minY })
|
|
172
144
|
scrollBridge.initialPosition = gs.startY
|
|
173
145
|
onStart()
|
|
@@ -278,30 +250,21 @@ export function useGestureHandlerPan(config: GesturePanConfig): GesturePanResult
|
|
|
278
250
|
// clear scroll lock
|
|
279
251
|
scrollBridge.scrollLockY = undefined
|
|
280
252
|
|
|
281
|
-
// use frozen positions from gesture start — keyboard may have dismissed
|
|
282
|
-
// during drag (input blur), reverting activePositions. Frozen positions
|
|
283
|
-
// ensure the snap index reflects the user's intent at drag start.
|
|
284
|
-
// The onEnd callback's animateTo uses latest activePositions for the
|
|
285
|
-
// actual animation target, so the sheet ends up at the right place.
|
|
286
|
-
const snapPositions =
|
|
287
|
-
gs.frozenPositions.length > 0 ? gs.frozenPositions : positions
|
|
288
|
-
const snapMinY = gs.frozenPositions.length > 0 ? gs.frozenMinY : minY
|
|
289
|
-
|
|
290
253
|
// if sheet is at top and scroll is engaged, just stay at top
|
|
291
|
-
if (currentPos <=
|
|
254
|
+
if (currentPos <= minY + AT_TOP_THRESHOLD && scrollBridge.y > 0) {
|
|
292
255
|
onEnd(0)
|
|
293
256
|
return
|
|
294
257
|
}
|
|
295
258
|
|
|
296
|
-
// snap
|
|
259
|
+
// find closest snap point using current position and velocity
|
|
297
260
|
const velocity = velocityY / 1000
|
|
298
261
|
const projectedEnd = currentPos + frameSize * velocity * 0.2
|
|
299
262
|
|
|
300
263
|
let closestPoint = 0
|
|
301
264
|
let minDist = Number.POSITIVE_INFINITY
|
|
302
265
|
|
|
303
|
-
for (let i = 0; i <
|
|
304
|
-
const pos =
|
|
266
|
+
for (let i = 0; i < positions.length; i++) {
|
|
267
|
+
const pos = positions[i]
|
|
305
268
|
const dist = Math.abs(projectedEnd - pos)
|
|
306
269
|
if (dist < minDist) {
|
|
307
270
|
minDist = dist
|
|
@@ -312,19 +275,9 @@ export function useGestureHandlerPan(config: GesturePanConfig): GesturePanResult
|
|
|
312
275
|
onEnd(closestPoint)
|
|
313
276
|
})
|
|
314
277
|
.onFinalize(() => {
|
|
315
|
-
// console.warn('[RNGH-Pan] onFinalize'
|
|
278
|
+
// console.warn('[RNGH-Pan] onFinalize')
|
|
316
279
|
// clear scroll lock on finalize too (safety)
|
|
317
280
|
scrollBridge.scrollLockY = undefined
|
|
318
|
-
if (gs.panStarted) {
|
|
319
|
-
// real pan gesture — reset isDragging (also un-pauses keyboard handler + flushes)
|
|
320
|
-
setIsDragging(false)
|
|
321
|
-
} else {
|
|
322
|
-
// just a tap (onBegin fired but onStart never did) — un-pause keyboard handler
|
|
323
|
-
// without setting isDragging (which would block keyboard animation effect)
|
|
324
|
-
if (config.pauseKeyboardHandler) {
|
|
325
|
-
config.pauseKeyboardHandler.current = false
|
|
326
|
-
}
|
|
327
|
-
}
|
|
328
281
|
})
|
|
329
282
|
.runOnJS(true)
|
|
330
283
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SheetImplementationCustom.d.ts","sourceRoot":"","sources":["../src/SheetImplementationCustom.tsx"],"names":[],"mappings":"AAcA,OAAO,KAAmB,MAAM,OAAO,CAAA;AAOvC,OAAO,
|
|
1
|
+
{"version":3,"file":"SheetImplementationCustom.d.ts","sourceRoot":"","sources":["../src/SheetImplementationCustom.tsx"],"names":[],"mappings":"AAcA,OAAO,KAAmB,MAAM,OAAO,CAAA;AAOvC,OAAO,EAAsC,IAAI,EAAE,MAAM,cAAc,CAAA;AAMvE,OAAO,KAAK,EAAc,cAAc,EAAE,MAAM,SAAS,CAAA;AAYzD,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;;;;;;;;;;;;;;8BA+nBrC,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SheetScrollView.d.ts","sourceRoot":"","sources":["../src/SheetScrollView.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAsC,MAAM,OAAO,CAAA;AAC1D,OAAO,KAAK,EAAE,UAAU,IAAI,YAAY,EAAE,MAAM,cAAc,CAAA;AAc9D,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"SheetScrollView.d.ts","sourceRoot":"","sources":["../src/SheetScrollView.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAsC,MAAM,OAAO,CAAA;AAC1D,OAAO,KAAK,EAAE,UAAU,IAAI,YAAY,EAAE,MAAM,cAAc,CAAA;AAc9D,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wCAoZ3B,CAAA"}
|
package/types/types.d.ts
CHANGED
|
@@ -98,43 +98,5 @@ export type ScrollBridge = {
|
|
|
98
98
|
forceScrollTo?: (y: number) => void;
|
|
99
99
|
isAtTop?: boolean;
|
|
100
100
|
};
|
|
101
|
-
export interface KeyboardControllerSheetOptions {
|
|
102
|
-
/**
|
|
103
|
-
* Whether keyboard handling is enabled.
|
|
104
|
-
* When false, the hook is a no-op.
|
|
105
|
-
*/
|
|
106
|
-
enabled: boolean;
|
|
107
|
-
}
|
|
108
|
-
export interface KeyboardControllerSheetResult {
|
|
109
|
-
/**
|
|
110
|
-
* Whether keyboard-controller is available and enabled.
|
|
111
|
-
*/
|
|
112
|
-
keyboardControllerEnabled: boolean;
|
|
113
|
-
/**
|
|
114
|
-
* Current keyboard height (0 when hidden).
|
|
115
|
-
* On web or when keyboard-controller is not available, always 0.
|
|
116
|
-
*/
|
|
117
|
-
keyboardHeight: number;
|
|
118
|
-
/**
|
|
119
|
-
* Whether the keyboard is currently visible.
|
|
120
|
-
*/
|
|
121
|
-
isKeyboardVisible: boolean;
|
|
122
|
-
/**
|
|
123
|
-
* Dismiss the keyboard programmatically.
|
|
124
|
-
* Called when sheet closes to dismiss the keyboard.
|
|
125
|
-
*/
|
|
126
|
-
dismissKeyboard: () => void;
|
|
127
|
-
/**
|
|
128
|
-
* Ref to pause keyboard hide state updates (action-sheet pattern).
|
|
129
|
-
* When true, keyboard hide events are ignored — keeps isKeyboardVisible=true
|
|
130
|
-
* and keyboardHeight at their last values during drag.
|
|
131
|
-
*/
|
|
132
|
-
pauseKeyboardHandler: React.RefObject<boolean>;
|
|
133
|
-
/**
|
|
134
|
-
* Flush any keyboard hide event that was suppressed while paused.
|
|
135
|
-
* Call after drag ends to reconcile actual keyboard state.
|
|
136
|
-
*/
|
|
137
|
-
flushPendingHide: () => void;
|
|
138
|
-
}
|
|
139
101
|
export {};
|
|
140
102
|
//# sourceMappingURL=types.d.ts.map
|
package/types/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version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A;IAE9D,WAAW,CAAC,EAAE,MAAM,CAAA;IAEpB,WAAW,CAAC,EAAE,MAAM,CAAA;IAEpB,aAAa,CAAC,EAAE,CAAC,CAAC,EAAE,MAAM,KAAK,IAAI,CAAA;IAEnC,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB,CAAA"}
|
|
@@ -4,7 +4,7 @@ interface GesturePanConfig {
|
|
|
4
4
|
positions: number[];
|
|
5
5
|
frameSize: number;
|
|
6
6
|
setPosition: (pos: number) => void;
|
|
7
|
-
animateTo: (pos: number
|
|
7
|
+
animateTo: (pos: number) => void;
|
|
8
8
|
stopSpring: () => void;
|
|
9
9
|
scrollBridge: ScrollBridge;
|
|
10
10
|
setIsDragging: (val: boolean) => void;
|
|
@@ -14,7 +14,6 @@ interface GesturePanConfig {
|
|
|
14
14
|
isShowingInnerSheet?: boolean;
|
|
15
15
|
setAnimatedPosition: (val: number) => void;
|
|
16
16
|
scrollGestureRef?: RefObject<any> | null;
|
|
17
|
-
pauseKeyboardHandler?: RefObject<boolean>;
|
|
18
17
|
}
|
|
19
18
|
interface GesturePanResult {
|
|
20
19
|
panGesture: any | null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useGestureHandlerPan.d.ts","sourceRoot":"","sources":["../src/useGestureHandlerPan.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAgC,KAAK,SAAS,EAAE,MAAM,OAAO,CAAA;AAEpE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA;AAM3C,UAAU,gBAAgB;IACxB,SAAS,EAAE,MAAM,EAAE,CAAA;IACnB,SAAS,EAAE,MAAM,CAAA;IACjB,WAAW,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAA;IAClC,SAAS,EAAE,CAAC,GAAG,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"useGestureHandlerPan.d.ts","sourceRoot":"","sources":["../src/useGestureHandlerPan.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAgC,KAAK,SAAS,EAAE,MAAM,OAAO,CAAA;AAEpE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA;AAM3C,UAAU,gBAAgB;IACxB,SAAS,EAAE,MAAM,EAAE,CAAA;IACnB,SAAS,EAAE,MAAM,CAAA;IACjB,WAAW,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAA;IAClC,SAAS,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAA;IAChC,UAAU,EAAE,MAAM,IAAI,CAAA;IACtB,YAAY,EAAE,YAAY,CAAA;IAC1B,aAAa,EAAE,CAAC,GAAG,EAAE,OAAO,KAAK,IAAI,CAAA;IACrC,kBAAkB,EAAE,MAAM,MAAM,CAAA;IAChC,QAAQ,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,KAAK,MAAM,CAAA;IAC/C,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,mBAAmB,CAAC,EAAE,OAAO,CAAA;IAE7B,mBAAmB,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAA;IAE1C,gBAAgB,CAAC,EAAE,SAAS,CAAC,GAAG,CAAC,GAAG,IAAI,CAAA;CACzC;AAED,UAAU,gBAAgB;IACxB,UAAU,EAAE,GAAG,GAAG,IAAI,CAAA;IACtB,aAAa,EAAE,SAAS,CAAC,GAAG,CAAC,CAAA;IAC7B,qBAAqB,EAAE,OAAO,CAAA;CAC/B;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,gBAAgB,GAAG,gBAAgB,CAqQ/E"}
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
-
var __export = (target, all) => {
|
|
6
|
-
for (var name in all) __defProp(target, name, {
|
|
7
|
-
get: all[name],
|
|
8
|
-
enumerable: !0
|
|
9
|
-
});
|
|
10
|
-
},
|
|
11
|
-
__copyProps = (to, from, except, desc) => {
|
|
12
|
-
if (from && typeof from == "object" || typeof from == "function") for (let key of __getOwnPropNames(from)) !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, {
|
|
13
|
-
get: () => from[key],
|
|
14
|
-
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
15
|
-
});
|
|
16
|
-
return to;
|
|
17
|
-
};
|
|
18
|
-
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
19
|
-
value: !0
|
|
20
|
-
}), mod);
|
|
21
|
-
var useKeyboardControllerSheet_exports = {};
|
|
22
|
-
__export(useKeyboardControllerSheet_exports, {
|
|
23
|
-
useKeyboardControllerSheet: () => useKeyboardControllerSheet
|
|
24
|
-
});
|
|
25
|
-
module.exports = __toCommonJS(useKeyboardControllerSheet_exports);
|
|
26
|
-
var import_react = require("react");
|
|
27
|
-
const noop = () => {};
|
|
28
|
-
function useKeyboardControllerSheet(_options) {
|
|
29
|
-
const pauseKeyboardHandler = (0, import_react.useRef)(!1);
|
|
30
|
-
return {
|
|
31
|
-
keyboardControllerEnabled: !1,
|
|
32
|
-
keyboardHeight: 0,
|
|
33
|
-
isKeyboardVisible: !1,
|
|
34
|
-
dismissKeyboard: noop,
|
|
35
|
-
pauseKeyboardHandler,
|
|
36
|
-
flushPendingHide: noop
|
|
37
|
-
};
|
|
38
|
-
}
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
-
var __export = (target, all) => {
|
|
6
|
-
for (var name in all)
|
|
7
|
-
__defProp(target, name, { get: all[name], enumerable: !0 });
|
|
8
|
-
}, __copyProps = (to, from, except, desc) => {
|
|
9
|
-
if (from && typeof from == "object" || typeof from == "function")
|
|
10
|
-
for (let key of __getOwnPropNames(from))
|
|
11
|
-
!__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
12
|
-
return to;
|
|
13
|
-
};
|
|
14
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
|
|
15
|
-
var useKeyboardControllerSheet_exports = {};
|
|
16
|
-
__export(useKeyboardControllerSheet_exports, {
|
|
17
|
-
useKeyboardControllerSheet: () => useKeyboardControllerSheet
|
|
18
|
-
});
|
|
19
|
-
module.exports = __toCommonJS(useKeyboardControllerSheet_exports);
|
|
20
|
-
var import_react = require("react");
|
|
21
|
-
const noop = () => {
|
|
22
|
-
};
|
|
23
|
-
function useKeyboardControllerSheet(_options) {
|
|
24
|
-
const pauseKeyboardHandler = (0, import_react.useRef)(!1);
|
|
25
|
-
return {
|
|
26
|
-
keyboardControllerEnabled: !1,
|
|
27
|
-
keyboardHeight: 0,
|
|
28
|
-
isKeyboardVisible: !1,
|
|
29
|
-
dismissKeyboard: noop,
|
|
30
|
-
pauseKeyboardHandler,
|
|
31
|
-
flushPendingHide: noop
|
|
32
|
-
};
|
|
33
|
-
}
|
|
34
|
-
//# sourceMappingURL=useKeyboardControllerSheet.js.map
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../src/useKeyboardControllerSheet.ts"],
|
|
4
|
-
"mappings": ";;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAKA,mBAAuB;AAMvB,MAAM,OAAO,MAAM;AAAC;AAEb,SAAS,2BACd,UAC+B;AAC/B,QAAM,2BAAuB,qBAAO,EAAK;AACzC,SAAO;AAAA,IACL,2BAA2B;AAAA,IAC3B,gBAAgB;AAAA,IAChB,mBAAmB;AAAA,IACnB,iBAAiB;AAAA,IACjB;AAAA,IACA,kBAAkB;AAAA,EACpB;AACF;",
|
|
5
|
-
"names": []
|
|
6
|
-
}
|
|
@@ -1,114 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var __defProp = Object.defineProperty;
|
|
4
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
-
var __export = (target, all) => {
|
|
8
|
-
for (var name in all) __defProp(target, name, {
|
|
9
|
-
get: all[name],
|
|
10
|
-
enumerable: !0
|
|
11
|
-
});
|
|
12
|
-
},
|
|
13
|
-
__copyProps = (to, from, except, desc) => {
|
|
14
|
-
if (from && typeof from == "object" || typeof from == "function") for (let key of __getOwnPropNames(from)) !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, {
|
|
15
|
-
get: () => from[key],
|
|
16
|
-
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
17
|
-
});
|
|
18
|
-
return to;
|
|
19
|
-
};
|
|
20
|
-
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
21
|
-
value: !0
|
|
22
|
-
}), mod);
|
|
23
|
-
var useKeyboardControllerSheet_native_exports = {};
|
|
24
|
-
__export(useKeyboardControllerSheet_native_exports, {
|
|
25
|
-
useKeyboardControllerSheet: () => useKeyboardControllerSheet
|
|
26
|
-
});
|
|
27
|
-
module.exports = __toCommonJS(useKeyboardControllerSheet_native_exports);
|
|
28
|
-
var import_react = require("react"),
|
|
29
|
-
import_react_native = require("react-native"),
|
|
30
|
-
isKeyboardControllerEnabled = function () {
|
|
31
|
-
return !1;
|
|
32
|
-
},
|
|
33
|
-
getKeyboardControllerState = function () {
|
|
34
|
-
return {};
|
|
35
|
-
};
|
|
36
|
-
try {
|
|
37
|
-
var nativeModule = require("@tamagui/native");
|
|
38
|
-
isKeyboardControllerEnabled = nativeModule.isKeyboardControllerEnabled, getKeyboardControllerState = nativeModule.getKeyboardControllerState;
|
|
39
|
-
} catch {}
|
|
40
|
-
function useKeyboardControllerSheet(options) {
|
|
41
|
-
var {
|
|
42
|
-
enabled
|
|
43
|
-
} = options,
|
|
44
|
-
[keyboardHeight, setKeyboardHeight] = (0, import_react.useState)(0),
|
|
45
|
-
[isKeyboardVisible, setIsKeyboardVisible] = (0, import_react.useState)(!1),
|
|
46
|
-
keyboardControllerEnabled = isKeyboardControllerEnabled(),
|
|
47
|
-
pauseKeyboardHandler = (0, import_react.useRef)(!1),
|
|
48
|
-
pendingHide = (0, import_react.useRef)(!1),
|
|
49
|
-
dismissKeyboard = (0, import_react.useCallback)(function () {
|
|
50
|
-
if (import_react_native.Keyboard.dismiss(), keyboardControllerEnabled) try {
|
|
51
|
-
var _KeyboardController_dismiss,
|
|
52
|
-
{
|
|
53
|
-
KeyboardController
|
|
54
|
-
} = getKeyboardControllerState();
|
|
55
|
-
KeyboardController == null || (_KeyboardController_dismiss = KeyboardController.dismiss) === null || _KeyboardController_dismiss === void 0 || _KeyboardController_dismiss.call(KeyboardController);
|
|
56
|
-
} catch {}
|
|
57
|
-
},
|
|
58
|
-
// ignore errors from keyboard-controller
|
|
59
|
-
[keyboardControllerEnabled]),
|
|
60
|
-
flushPendingHide = (0, import_react.useCallback)(function () {
|
|
61
|
-
pendingHide.current && (pendingHide.current = !1, setIsKeyboardVisible(!1), setKeyboardHeight(0));
|
|
62
|
-
}, []);
|
|
63
|
-
return (0, import_react.useEffect)(function () {
|
|
64
|
-
if (!(!enabled || !keyboardControllerEnabled)) {
|
|
65
|
-
var {
|
|
66
|
-
KeyboardEvents
|
|
67
|
-
} = getKeyboardControllerState();
|
|
68
|
-
if (KeyboardEvents?.addListener) {
|
|
69
|
-
var showSub = KeyboardEvents.addListener("keyboardWillShow", function (e) {
|
|
70
|
-
var _e_height,
|
|
71
|
-
height = (_e_height = e?.height) !== null && _e_height !== void 0 ? _e_height : 0;
|
|
72
|
-
height > 0 && setKeyboardHeight(height), setIsKeyboardVisible(!0);
|
|
73
|
-
}),
|
|
74
|
-
hideSub = KeyboardEvents.addListener("keyboardWillHide", function () {
|
|
75
|
-
if (pauseKeyboardHandler.current) {
|
|
76
|
-
pendingHide.current = !0;
|
|
77
|
-
return;
|
|
78
|
-
}
|
|
79
|
-
setIsKeyboardVisible(!1), setKeyboardHeight(0);
|
|
80
|
-
});
|
|
81
|
-
return function () {
|
|
82
|
-
var _showSub_remove, _hideSub_remove;
|
|
83
|
-
showSub == null || (_showSub_remove = showSub.remove) === null || _showSub_remove === void 0 || _showSub_remove.call(showSub), hideSub == null || (_hideSub_remove = hideSub.remove) === null || _hideSub_remove === void 0 || _hideSub_remove.call(hideSub);
|
|
84
|
-
};
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
}, [enabled, keyboardControllerEnabled]), (0, import_react.useEffect)(function () {
|
|
88
|
-
if (enabled && !keyboardControllerEnabled) {
|
|
89
|
-
var showEvent = import_react_native.Platform.OS === "ios" ? "keyboardWillShow" : "keyboardDidShow",
|
|
90
|
-
hideEvent = import_react_native.Platform.OS === "ios" ? "keyboardWillHide" : "keyboardDidHide",
|
|
91
|
-
showListener = import_react_native.Keyboard.addListener(showEvent, function (e) {
|
|
92
|
-
setKeyboardHeight(e.endCoordinates.height), setIsKeyboardVisible(!0);
|
|
93
|
-
}),
|
|
94
|
-
hideListener = import_react_native.Keyboard.addListener(hideEvent, function () {
|
|
95
|
-
if (pauseKeyboardHandler.current) {
|
|
96
|
-
pendingHide.current = !0;
|
|
97
|
-
return;
|
|
98
|
-
}
|
|
99
|
-
setIsKeyboardVisible(!1), setKeyboardHeight(0);
|
|
100
|
-
});
|
|
101
|
-
return function () {
|
|
102
|
-
showListener.remove(), hideListener.remove();
|
|
103
|
-
};
|
|
104
|
-
}
|
|
105
|
-
}, [enabled, keyboardControllerEnabled]), {
|
|
106
|
-
keyboardControllerEnabled,
|
|
107
|
-
keyboardHeight,
|
|
108
|
-
isKeyboardVisible,
|
|
109
|
-
dismissKeyboard,
|
|
110
|
-
pauseKeyboardHandler,
|
|
111
|
-
flushPendingHide
|
|
112
|
-
};
|
|
113
|
-
}
|
|
114
|
-
//# sourceMappingURL=useKeyboardControllerSheet.native.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["useKeyboardControllerSheet_native_exports","__export","useKeyboardControllerSheet","module","exports","__toCommonJS","import_react","require","import_react_native","isKeyboardControllerEnabled","getKeyboardControllerState","nativeModule","options","enabled","keyboardHeight","setKeyboardHeight","useState","isKeyboardVisible","setIsKeyboardVisible","keyboardControllerEnabled","pauseKeyboardHandler","useRef","pendingHide","dismissKeyboard","useCallback","Keyboard","dismiss","_KeyboardController_dismiss","KeyboardController","call","flushPendingHide","current","useEffect","KeyboardEvents","addListener","showSub","e","_e_height","height","hideSub","_showSub_remove","_hideSub_remove","remove","showEvent","Platform","OS","hideEvent","showListener","endCoordinates","hideListener"],"sources":["../../src/useKeyboardControllerSheet.native.ts"],"sourcesContent":[null],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,yCAAA;AAAAC,QAAA,CAAAD,yCAAA;EAAAE,0BAAA,EAAAA,CAAA,KAAAA;AAAA;AAAAC,MAAA,CAAAC,OAAA,GAAAC,YAAA,CAAAL,yCAAA;AASI,IAAAM,YAAA,GAAyDC,OAAA;EAC7DC,mBAAA,GAAmCD,OAAA;EAE/BE,2BAAA,GAA8B,SAAAA,CAAA,EAAW;IACzC,OAAO;EACX;EACIC,0BAAA,GAA6B,SAAAA,CAAA,EAAW;IACxC,OAAO,CAAC;EACZ;AACA,IAAI;EACA,IAAIC,YAAA,GAAeJ,OAAA,CAAQ,iBAAiB;EAC5CE,2BAAA,GAA8BE,YAAA,CAAaF,2BAAA,EAC3CC,0BAAA,GAA6BC,YAAA,CAAa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AC7B,CAAC;QACG+B,YAAA,GAAezC,mBAAA,CAAAiB,QAAA,CAASS,WAAA,CAAYY,SAAA,EAAW,YAAW;UAC1D,IAAI1B,oBAAA,CAAqBW,OAAA,EAAS;YAC9BT,WAAA,CAAYS,OAAA,GAAU;YACtB;UACJ;UACAb,oBAAA,CAAqB,EAAK,GAC1BH,iBAAA,CAAkB,CAAC;QACvB,CAAC;MACD,OAAO,YAAW;QACdgC,YAAA,CAAaL,MAAA,CAAO,GACpBO,YAAA,CAAaP,MAAA,CAAO;MACxB;IAAA;EACJ,GAAG,CACC7B,OAAA,EACAM,yBAAA,CACH,GACM;IACHA,yBAAA;IACAL,cAAA;IACAG,iBAAA;IACAM,eAAA;IACAH,oBAAA;IACAU;EACJ;AACJ","ignoreList":[]}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { useRef } from "react";
|
|
2
|
-
const noop = () => {
|
|
3
|
-
};
|
|
4
|
-
function useKeyboardControllerSheet(_options) {
|
|
5
|
-
const pauseKeyboardHandler = useRef(!1);
|
|
6
|
-
return {
|
|
7
|
-
keyboardControllerEnabled: !1,
|
|
8
|
-
keyboardHeight: 0,
|
|
9
|
-
isKeyboardVisible: !1,
|
|
10
|
-
dismissKeyboard: noop,
|
|
11
|
-
pauseKeyboardHandler,
|
|
12
|
-
flushPendingHide: noop
|
|
13
|
-
};
|
|
14
|
-
}
|
|
15
|
-
export {
|
|
16
|
-
useKeyboardControllerSheet
|
|
17
|
-
};
|
|
18
|
-
//# sourceMappingURL=useKeyboardControllerSheet.js.map
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../src/useKeyboardControllerSheet.ts"],
|
|
4
|
-
"mappings": "AAKA,SAAS,cAAc;AAMvB,MAAM,OAAO,MAAM;AAAC;AAEb,SAAS,2BACd,UAC+B;AAC/B,QAAM,uBAAuB,OAAO,EAAK;AACzC,SAAO;AAAA,IACL,2BAA2B;AAAA,IAC3B,gBAAgB;AAAA,IAChB,mBAAmB;AAAA,IACnB,iBAAiB;AAAA,IACjB;AAAA,IACA,kBAAkB;AAAA,EACpB;AACF;",
|
|
5
|
-
"names": []
|
|
6
|
-
}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { useRef } from "react";
|
|
2
|
-
const noop = () => {};
|
|
3
|
-
function useKeyboardControllerSheet(_options) {
|
|
4
|
-
const pauseKeyboardHandler = useRef(!1);
|
|
5
|
-
return {
|
|
6
|
-
keyboardControllerEnabled: !1,
|
|
7
|
-
keyboardHeight: 0,
|
|
8
|
-
isKeyboardVisible: !1,
|
|
9
|
-
dismissKeyboard: noop,
|
|
10
|
-
pauseKeyboardHandler,
|
|
11
|
-
flushPendingHide: noop
|
|
12
|
-
};
|
|
13
|
-
}
|
|
14
|
-
export { useKeyboardControllerSheet };
|
|
15
|
-
//# sourceMappingURL=useKeyboardControllerSheet.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["useRef","noop","useKeyboardControllerSheet","_options","pauseKeyboardHandler","keyboardControllerEnabled","keyboardHeight","isKeyboardVisible","dismissKeyboard","flushPendingHide"],"sources":["../../src/useKeyboardControllerSheet.ts"],"sourcesContent":[null],"mappings":"AAKA,SAASA,MAAA,QAAc;AAMvB,MAAMC,IAAA,GAAOA,CAAA,KAAM,CAAC;AAEb,SAASC,2BACdC,QAAA,EAC+B;EAC/B,MAAMC,oBAAA,GAAuBJ,MAAA,CAAO,EAAK;EACzC,OAAO;IACLK,yBAAA,EAA2B;IAC3BC,cAAA,EAAgB;IAChBC,iBAAA,EAAmB;IACnBC,eAAA,EAAiBP,IAAA;IACjBG,oBAAA;IACAK,gBAAA,EAAkBR;EACpB;AACF","ignoreList":[]}
|
|
@@ -1,88 +0,0 @@
|
|
|
1
|
-
import { useCallback, useEffect, useRef, useState } from "react";
|
|
2
|
-
import { Keyboard, Platform } from "react-native";
|
|
3
|
-
var isKeyboardControllerEnabled = function () {
|
|
4
|
-
return !1;
|
|
5
|
-
},
|
|
6
|
-
getKeyboardControllerState = function () {
|
|
7
|
-
return {};
|
|
8
|
-
};
|
|
9
|
-
try {
|
|
10
|
-
var nativeModule = require("@tamagui/native");
|
|
11
|
-
isKeyboardControllerEnabled = nativeModule.isKeyboardControllerEnabled, getKeyboardControllerState = nativeModule.getKeyboardControllerState;
|
|
12
|
-
} catch {}
|
|
13
|
-
function useKeyboardControllerSheet(options) {
|
|
14
|
-
var {
|
|
15
|
-
enabled
|
|
16
|
-
} = options,
|
|
17
|
-
[keyboardHeight, setKeyboardHeight] = useState(0),
|
|
18
|
-
[isKeyboardVisible, setIsKeyboardVisible] = useState(!1),
|
|
19
|
-
keyboardControllerEnabled = isKeyboardControllerEnabled(),
|
|
20
|
-
pauseKeyboardHandler = useRef(!1),
|
|
21
|
-
pendingHide = useRef(!1),
|
|
22
|
-
dismissKeyboard = useCallback(function () {
|
|
23
|
-
if (Keyboard.dismiss(), keyboardControllerEnabled) try {
|
|
24
|
-
var _KeyboardController_dismiss,
|
|
25
|
-
{
|
|
26
|
-
KeyboardController
|
|
27
|
-
} = getKeyboardControllerState();
|
|
28
|
-
KeyboardController == null || (_KeyboardController_dismiss = KeyboardController.dismiss) === null || _KeyboardController_dismiss === void 0 || _KeyboardController_dismiss.call(KeyboardController);
|
|
29
|
-
} catch {}
|
|
30
|
-
},
|
|
31
|
-
// ignore errors from keyboard-controller
|
|
32
|
-
[keyboardControllerEnabled]),
|
|
33
|
-
flushPendingHide = useCallback(function () {
|
|
34
|
-
pendingHide.current && (pendingHide.current = !1, setIsKeyboardVisible(!1), setKeyboardHeight(0));
|
|
35
|
-
}, []);
|
|
36
|
-
return useEffect(function () {
|
|
37
|
-
if (!(!enabled || !keyboardControllerEnabled)) {
|
|
38
|
-
var {
|
|
39
|
-
KeyboardEvents
|
|
40
|
-
} = getKeyboardControllerState();
|
|
41
|
-
if (KeyboardEvents?.addListener) {
|
|
42
|
-
var showSub = KeyboardEvents.addListener("keyboardWillShow", function (e) {
|
|
43
|
-
var _e_height,
|
|
44
|
-
height = (_e_height = e?.height) !== null && _e_height !== void 0 ? _e_height : 0;
|
|
45
|
-
height > 0 && setKeyboardHeight(height), setIsKeyboardVisible(!0);
|
|
46
|
-
}),
|
|
47
|
-
hideSub = KeyboardEvents.addListener("keyboardWillHide", function () {
|
|
48
|
-
if (pauseKeyboardHandler.current) {
|
|
49
|
-
pendingHide.current = !0;
|
|
50
|
-
return;
|
|
51
|
-
}
|
|
52
|
-
setIsKeyboardVisible(!1), setKeyboardHeight(0);
|
|
53
|
-
});
|
|
54
|
-
return function () {
|
|
55
|
-
var _showSub_remove, _hideSub_remove;
|
|
56
|
-
showSub == null || (_showSub_remove = showSub.remove) === null || _showSub_remove === void 0 || _showSub_remove.call(showSub), hideSub == null || (_hideSub_remove = hideSub.remove) === null || _hideSub_remove === void 0 || _hideSub_remove.call(hideSub);
|
|
57
|
-
};
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
}, [enabled, keyboardControllerEnabled]), useEffect(function () {
|
|
61
|
-
if (enabled && !keyboardControllerEnabled) {
|
|
62
|
-
var showEvent = Platform.OS === "ios" ? "keyboardWillShow" : "keyboardDidShow",
|
|
63
|
-
hideEvent = Platform.OS === "ios" ? "keyboardWillHide" : "keyboardDidHide",
|
|
64
|
-
showListener = Keyboard.addListener(showEvent, function (e) {
|
|
65
|
-
setKeyboardHeight(e.endCoordinates.height), setIsKeyboardVisible(!0);
|
|
66
|
-
}),
|
|
67
|
-
hideListener = Keyboard.addListener(hideEvent, function () {
|
|
68
|
-
if (pauseKeyboardHandler.current) {
|
|
69
|
-
pendingHide.current = !0;
|
|
70
|
-
return;
|
|
71
|
-
}
|
|
72
|
-
setIsKeyboardVisible(!1), setKeyboardHeight(0);
|
|
73
|
-
});
|
|
74
|
-
return function () {
|
|
75
|
-
showListener.remove(), hideListener.remove();
|
|
76
|
-
};
|
|
77
|
-
}
|
|
78
|
-
}, [enabled, keyboardControllerEnabled]), {
|
|
79
|
-
keyboardControllerEnabled,
|
|
80
|
-
keyboardHeight,
|
|
81
|
-
isKeyboardVisible,
|
|
82
|
-
dismissKeyboard,
|
|
83
|
-
pauseKeyboardHandler,
|
|
84
|
-
flushPendingHide
|
|
85
|
-
};
|
|
86
|
-
}
|
|
87
|
-
export { useKeyboardControllerSheet };
|
|
88
|
-
//# sourceMappingURL=useKeyboardControllerSheet.native.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["useCallback","useEffect","useRef","useState","Keyboard","Platform","isKeyboardControllerEnabled","getKeyboardControllerState","nativeModule","require","useKeyboardControllerSheet","options","enabled","keyboardHeight","setKeyboardHeight","isKeyboardVisible","setIsKeyboardVisible","keyboardControllerEnabled","pauseKeyboardHandler","pendingHide","dismissKeyboard","dismiss","_KeyboardController_dismiss","KeyboardController","call","flushPendingHide","current","KeyboardEvents","addListener","showSub","e","_e_height","height","hideSub","_showSub_remove","_hideSub_remove","remove","showEvent","OS","hideEvent","showListener","endCoordinates","hideListener"],"sources":["../../src/useKeyboardControllerSheet.native.ts"],"sourcesContent":[null],"mappings":"AASI,SAASA,WAAA,EAAaC,SAAA,EAAWC,MAAA,EAAQC,QAAA,QAAgB;AAC7D,SAASC,QAAA,EAAUC,QAAA,QAAgB;AAEnC,IAAIC,2BAAA,GAA8B,SAAAA,CAAA,EAAW;IACzC,OAAO;EACX;EACIC,0BAAA,GAA6B,SAAAA,CAAA,EAAW;IACxC,OAAO,CAAC;EACZ;AACA,IAAI;EACA,IAAIC,YAAA,GAAeC,OAAA,CAAQ,iBAAiB;EAC5CH,2BAAA,GAA8BE,YAAA,CAAaF,2BAAA,EAC3CC,0BAAA,GAA6BC,YAAA,CAAaD,0BAAA;AAC9C,QAAY,CAAC;AAEN,SAASG,2BAA2BC,OAAA,EAAS;EAChD,IAAI;MAAEC;IAAQ,IAAID,OAAA;IACd,CAACE,cAAA,EAAgBC,iBAAiB,IAAIX,QAAA,CAAS,CAAC;IAChD,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EACJ,GAAG,CACCxB,OAAA,EACAK,yBAAA,CACH,GACM;IACHA,yBAAA;IACAJ,cAAA;IACAE,iBAAA;IACAK,eAAA;IACAF,oBAAA;IACAO;EACJ;AACJ","ignoreList":[]}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { useRef } from "react";
|
|
2
|
-
const noop = () => {
|
|
3
|
-
};
|
|
4
|
-
function useKeyboardControllerSheet(_options) {
|
|
5
|
-
const pauseKeyboardHandler = useRef(!1);
|
|
6
|
-
return {
|
|
7
|
-
keyboardControllerEnabled: !1,
|
|
8
|
-
keyboardHeight: 0,
|
|
9
|
-
isKeyboardVisible: !1,
|
|
10
|
-
dismissKeyboard: noop,
|
|
11
|
-
pauseKeyboardHandler,
|
|
12
|
-
flushPendingHide: noop
|
|
13
|
-
};
|
|
14
|
-
}
|
|
15
|
-
export {
|
|
16
|
-
useKeyboardControllerSheet
|
|
17
|
-
};
|
|
18
|
-
//# sourceMappingURL=useKeyboardControllerSheet.js.map
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../src/useKeyboardControllerSheet.ts"],
|
|
4
|
-
"mappings": "AAKA,SAAS,cAAc;AAMvB,MAAM,OAAO,MAAM;AAAC;AAEb,SAAS,2BACd,UAC+B;AAC/B,QAAM,uBAAuB,OAAO,EAAK;AACzC,SAAO;AAAA,IACL,2BAA2B;AAAA,IAC3B,gBAAgB;AAAA,IAChB,mBAAmB;AAAA,IACnB,iBAAiB;AAAA,IACjB;AAAA,IACA,kBAAkB;AAAA,EACpB;AACF;",
|
|
5
|
-
"names": []
|
|
6
|
-
}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { useRef } from "react";
|
|
2
|
-
const noop = () => {};
|
|
3
|
-
function useKeyboardControllerSheet(_options) {
|
|
4
|
-
const pauseKeyboardHandler = useRef(!1);
|
|
5
|
-
return {
|
|
6
|
-
keyboardControllerEnabled: !1,
|
|
7
|
-
keyboardHeight: 0,
|
|
8
|
-
isKeyboardVisible: !1,
|
|
9
|
-
dismissKeyboard: noop,
|
|
10
|
-
pauseKeyboardHandler,
|
|
11
|
-
flushPendingHide: noop
|
|
12
|
-
};
|
|
13
|
-
}
|
|
14
|
-
export { useKeyboardControllerSheet };
|
|
15
|
-
//# sourceMappingURL=useKeyboardControllerSheet.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["useRef","noop","useKeyboardControllerSheet","_options","pauseKeyboardHandler","keyboardControllerEnabled","keyboardHeight","isKeyboardVisible","dismissKeyboard","flushPendingHide"],"sources":["../../src/useKeyboardControllerSheet.ts"],"sourcesContent":[null],"mappings":"AAKA,SAASA,MAAA,QAAc;AAMvB,MAAMC,IAAA,GAAOA,CAAA,KAAM,CAAC;AAEb,SAASC,2BACdC,QAAA,EAC+B;EAC/B,MAAMC,oBAAA,GAAuBJ,MAAA,CAAO,EAAK;EACzC,OAAO;IACLK,yBAAA,EAA2B;IAC3BC,cAAA,EAAgB;IAChBC,iBAAA,EAAmB;IACnBC,eAAA,EAAiBP,IAAA;IACjBG,oBAAA;IACAK,gBAAA,EAAkBR;EACpB;AACF","ignoreList":[]}
|