@tamagui/sheet 1.88.13 → 1.89.0-1706360676826

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 (114) hide show
  1. package/LICENSE +21 -0
  2. package/dist/cjs/SheetController.js.map +1 -1
  3. package/dist/cjs/SheetController.native.js.map +1 -1
  4. package/dist/cjs/SheetImplementationCustom.js +46 -50
  5. package/dist/cjs/SheetImplementationCustom.js.map +1 -1
  6. package/dist/cjs/SheetImplementationCustom.native.js +46 -50
  7. package/dist/cjs/SheetImplementationCustom.native.js.map +1 -1
  8. package/dist/cjs/SheetScrollView.js.map +1 -1
  9. package/dist/cjs/SheetScrollView.native.js.map +1 -1
  10. package/dist/cjs/createSheet.js.map +1 -1
  11. package/dist/cjs/createSheet.native.js.map +1 -1
  12. package/dist/cjs/nativeSheet.js.map +1 -1
  13. package/dist/cjs/nativeSheet.native.js.map +1 -1
  14. package/dist/cjs/useSheetProviderProps.js +0 -1
  15. package/dist/cjs/useSheetProviderProps.js.map +1 -1
  16. package/dist/cjs/useSheetProviderProps.native.js +0 -1
  17. package/dist/cjs/useSheetProviderProps.native.js.map +1 -1
  18. package/dist/esm/Sheet.mjs +91 -0
  19. package/dist/esm/SheetContext.mjs +5 -0
  20. package/dist/esm/SheetController.js.map +1 -1
  21. package/dist/esm/SheetController.mjs +22 -0
  22. package/dist/esm/SheetController.native.js.map +1 -1
  23. package/dist/esm/SheetImplementationCustom.js +47 -56
  24. package/dist/esm/SheetImplementationCustom.js.map +1 -1
  25. package/dist/esm/SheetImplementationCustom.mjs +311 -0
  26. package/dist/esm/SheetImplementationCustom.native.js +46 -50
  27. package/dist/esm/SheetImplementationCustom.native.js.map +1 -1
  28. package/dist/esm/SheetScrollView.js.map +1 -1
  29. package/dist/esm/SheetScrollView.mjs +57 -0
  30. package/dist/esm/SheetScrollView.native.js.map +1 -1
  31. package/dist/esm/constants.mjs +8 -0
  32. package/dist/esm/contexts.mjs +6 -0
  33. package/dist/esm/createSheet.js +1 -3
  34. package/dist/esm/createSheet.js.map +1 -1
  35. package/dist/esm/createSheet.mjs +138 -0
  36. package/dist/esm/createSheet.native.js.map +1 -1
  37. package/dist/esm/helpers.mjs +9 -0
  38. package/dist/esm/index.mjs +7 -0
  39. package/dist/esm/nativeSheet.js.map +1 -1
  40. package/dist/esm/nativeSheet.mjs +50 -0
  41. package/dist/esm/nativeSheet.native.js.map +1 -1
  42. package/dist/esm/types.mjs +0 -0
  43. package/dist/esm/useSheet.mjs +3 -0
  44. package/dist/esm/useSheetController.mjs +14 -0
  45. package/dist/esm/useSheetOffscreenSize.mjs +27 -0
  46. package/dist/esm/useSheetOpenState.mjs +25 -0
  47. package/dist/esm/useSheetProviderProps.js +0 -1
  48. package/dist/esm/useSheetProviderProps.js.map +1 -1
  49. package/dist/esm/useSheetProviderProps.mjs +84 -0
  50. package/dist/esm/useSheetProviderProps.native.js +0 -1
  51. package/dist/esm/useSheetProviderProps.native.js.map +1 -1
  52. package/dist/jsx/Sheet.mjs +91 -0
  53. package/dist/jsx/SheetContext.mjs +5 -0
  54. package/dist/jsx/SheetController.js.map +1 -1
  55. package/dist/jsx/SheetController.mjs +22 -0
  56. package/dist/jsx/SheetController.native.js.map +1 -1
  57. package/dist/jsx/SheetImplementationCustom.js +47 -56
  58. package/dist/jsx/SheetImplementationCustom.js.map +1 -1
  59. package/dist/jsx/SheetImplementationCustom.mjs +311 -0
  60. package/dist/jsx/SheetImplementationCustom.native.js +46 -50
  61. package/dist/jsx/SheetImplementationCustom.native.js.map +1 -1
  62. package/dist/jsx/SheetScrollView.js.map +1 -1
  63. package/dist/jsx/SheetScrollView.mjs +57 -0
  64. package/dist/jsx/SheetScrollView.native.js.map +1 -1
  65. package/dist/jsx/constants.mjs +8 -0
  66. package/dist/jsx/contexts.mjs +6 -0
  67. package/dist/jsx/createSheet.js +1 -3
  68. package/dist/jsx/createSheet.js.map +1 -1
  69. package/dist/jsx/createSheet.mjs +138 -0
  70. package/dist/jsx/createSheet.native.js.map +1 -1
  71. package/dist/jsx/helpers.mjs +9 -0
  72. package/dist/jsx/index.mjs +7 -0
  73. package/dist/jsx/nativeSheet.js.map +1 -1
  74. package/dist/jsx/nativeSheet.mjs +50 -0
  75. package/dist/jsx/nativeSheet.native.js.map +1 -1
  76. package/dist/jsx/types.mjs +0 -0
  77. package/dist/jsx/useSheet.mjs +3 -0
  78. package/dist/jsx/useSheetController.mjs +14 -0
  79. package/dist/jsx/useSheetOffscreenSize.mjs +27 -0
  80. package/dist/jsx/useSheetOpenState.mjs +25 -0
  81. package/dist/jsx/useSheetProviderProps.js +0 -1
  82. package/dist/jsx/useSheetProviderProps.js.map +1 -1
  83. package/dist/jsx/useSheetProviderProps.mjs +84 -0
  84. package/dist/jsx/useSheetProviderProps.native.js +0 -1
  85. package/dist/jsx/useSheetProviderProps.native.js.map +1 -1
  86. package/package.json +16 -16
  87. package/src/SheetContext.tsx +1 -1
  88. package/src/SheetController.tsx +2 -1
  89. package/src/SheetImplementationCustom.tsx +97 -104
  90. package/src/SheetScrollView.tsx +5 -4
  91. package/src/createSheet.tsx +7 -5
  92. package/src/nativeSheet.tsx +3 -2
  93. package/src/types.tsx +4 -3
  94. package/src/useSheetOffscreenSize.tsx +1 -1
  95. package/src/useSheetOpenState.tsx +1 -1
  96. package/src/useSheetProviderProps.tsx +5 -4
  97. package/types/SheetController.d.ts +1 -1
  98. package/types/SheetController.d.ts.map +1 -1
  99. package/types/SheetImplementationCustom.d.ts +1 -1
  100. package/types/SheetImplementationCustom.d.ts.map +1 -1
  101. package/types/SheetScrollView.d.ts +1 -1
  102. package/types/SheetScrollView.d.ts.map +1 -1
  103. package/types/createSheet.d.ts +4 -4
  104. package/types/createSheet.d.ts.map +1 -1
  105. package/types/nativeSheet.d.ts +2 -2
  106. package/types/nativeSheet.d.ts.map +1 -1
  107. package/types/types.d.ts +4 -3
  108. package/types/types.d.ts.map +1 -1
  109. package/types/useSheetOffscreenSize.d.ts +1 -1
  110. package/types/useSheetOffscreenSize.d.ts.map +1 -1
  111. package/types/useSheetOpenState.d.ts +1 -1
  112. package/types/useSheetOpenState.d.ts.map +1 -1
  113. package/types/useSheetProviderProps.d.ts +3 -3
  114. package/types/useSheetProviderProps.d.ts.map +1 -1
@@ -0,0 +1,84 @@
1
+ import { useConfiguration } from "@tamagui/core";
2
+ import { useConstant } from "@tamagui/use-constant";
3
+ import { useControllableState } from "@tamagui/use-controllable-state";
4
+ import React, { useCallback, useEffect, useMemo, useState } from "react";
5
+ function useSheetProviderProps(props, state, options = {}) {
6
+ const contentRef = React.useRef(null),
7
+ [frameSize, setFrameSize] = useState(0),
8
+ [maxContentSize, setMaxContentSize] = useState(0),
9
+ snapPointsMode = props.snapPointsMode ?? "percent",
10
+ snapPointsProp = props.snapPoints ?? (snapPointsMode === "percent" ? [80] : snapPointsMode === "constant" ? [256] : ["fit"]),
11
+ hasFit = snapPointsProp[0] === "fit",
12
+ snapPoints = useMemo(() => props.dismissOnSnapToBottom ? [...snapPointsProp, 0] : snapPointsProp, [JSON.stringify(snapPointsProp), props.dismissOnSnapToBottom]),
13
+ [position_, setPositionImmediate] = useControllableState({
14
+ prop: props.position,
15
+ defaultProp: props.defaultPosition || (state.open ? 0 : -1),
16
+ onChange: props.onPositionChange,
17
+ strategy: "most-recent-wins",
18
+ transition: !0
19
+ }),
20
+ position = state.open === !1 ? -1 : position_,
21
+ {
22
+ open
23
+ } = state,
24
+ setPosition = useCallback(next => {
25
+ props.dismissOnSnapToBottom && next === snapPoints.length - 1 ? state.setOpen(!1) : setPositionImmediate(next);
26
+ }, [props.dismissOnSnapToBottom, snapPoints.length, setPositionImmediate, state.setOpen]);
27
+ process.env.NODE_ENV === "development" && (snapPointsMode === "mixed" && snapPoints.some(p => {
28
+ if (typeof p == "string") {
29
+ if (p === "fit") return !1;
30
+ if (p.endsWith("%")) {
31
+ const n = Number(p.slice(0, -1));
32
+ return n < 0 || n > 100;
33
+ }
34
+ return !0;
35
+ }
36
+ return typeof p != "number" || p < 0;
37
+ }) && console.warn('\u26A0\uFE0F Invalid snapPoint given, snapPoints must be positive numeric values, string percentages between 0-100%, or "fit" when snapPointsMode is mixed'), snapPointsMode === "mixed" && snapPoints.indexOf("fit") > 0 && console.warn('\u26A0\uFE0F Invalid snapPoint given, "fit" must be the first/largest snap point when snapPointsMode is mixed'), snapPointsMode === "fit" && (snapPoints.length !== (props.dismissOnSnapToBottom ? 2 : 1) || snapPoints[0] !== "fit") && console.warn("\u26A0\uFE0F Invalid snapPoint given, there are no snap points when snapPointsMode is fit"), snapPointsMode === "constant" && snapPoints.some(p => typeof p != "number" || p < 0) && console.warn("\u26A0\uFE0F Invalid snapPoint given, snapPoints must be positive numeric values when snapPointsMode is constant"), snapPointsMode === "percent" && snapPoints.some(p => typeof p != "number" || p < 0 || p > 100) && console.warn("\u26A0\uFE0F Invalid snapPoint given, snapPoints must be numeric values between 0 and 100 when snapPointsMode is percent")), open && props.dismissOnSnapToBottom && position === snapPoints.length - 1 && setPositionImmediate(0);
38
+ const shouldSetPositionOpen = open && position < 0;
39
+ useEffect(() => {
40
+ shouldSetPositionOpen && setPosition(0);
41
+ }, [setPosition, shouldSetPositionOpen]);
42
+ const {
43
+ animationDriver
44
+ } = useConfiguration();
45
+ if (!animationDriver) throw new Error("Must set animations in tamagui.config.ts");
46
+ const scrollBridge = useConstant(() => ({
47
+ enabled: !1,
48
+ y: 0,
49
+ paneY: 0,
50
+ paneMinY: 0,
51
+ scrollStartY: -1,
52
+ drag: () => {},
53
+ release: () => {},
54
+ scrollLock: !1
55
+ })),
56
+ removeScrollEnabled = props.forceRemoveScrollEnabled ?? (open && props.modal),
57
+ maxSnapPoint = snapPoints[0];
58
+ return {
59
+ screenSize: snapPointsMode === "percent" ? frameSize / ((typeof maxSnapPoint == "number" ? maxSnapPoint : 100) / 100) : maxContentSize,
60
+ maxSnapPoint,
61
+ removeScrollEnabled,
62
+ scrollBridge,
63
+ modal: !!props.modal,
64
+ open: state.open,
65
+ setOpen: state.setOpen,
66
+ hidden: !!state.isHidden,
67
+ contentRef,
68
+ frameSize,
69
+ setFrameSize,
70
+ dismissOnOverlayPress: props.dismissOnOverlayPress ?? !0,
71
+ dismissOnSnapToBottom: props.dismissOnSnapToBottom ?? !1,
72
+ onOverlayComponent: options.onOverlayComponent,
73
+ scope: props.__scopeSheet,
74
+ hasFit,
75
+ position,
76
+ snapPoints,
77
+ snapPointsMode,
78
+ setMaxContentSize,
79
+ setPosition,
80
+ setPositionImmediate,
81
+ onlyShowFrame: !1
82
+ };
83
+ }
84
+ export { useSheetProviderProps };
@@ -30,7 +30,6 @@ var import_core = require("@tamagui/core"), import_use_constant = require("@tama
30
30
  function useSheetProviderProps(props, state, options = {}) {
31
31
  const contentRef = import_react.default.useRef(null), [frameSize, setFrameSize] = (0, import_react.useState)(0), [maxContentSize, setMaxContentSize] = (0, import_react.useState)(0), snapPointsMode = props.snapPointsMode ?? "percent", snapPointsProp = props.snapPoints ?? (snapPointsMode === "percent" ? [80] : snapPointsMode === "constant" ? [256] : ["fit"]), hasFit = snapPointsProp[0] === "fit", snapPoints = (0, import_react.useMemo)(
32
32
  () => props.dismissOnSnapToBottom ? [...snapPointsProp, 0] : snapPointsProp,
33
- // eslint-disable-next-line react-hooks/exhaustive-deps
34
33
  [JSON.stringify(snapPointsProp), props.dismissOnSnapToBottom]
35
34
  ), [position_, setPositionImmediate] = (0, import_use_controllable_state.useControllableState)({
36
35
  prop: props.position,
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/useSheetProviderProps.tsx"],
4
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAAiD,0BACjD,sBAA4B,kCAC5B,gCAAqC,4CACrC,eAAiE;AAO1D,SAAS,sBACd,OACA,OACA,UAEI,CAAC,GACL;AACA,QAAM,aAAa,aAAAA,QAAM,OAAuB,IAAI,GAC9C,CAAC,WAAW,YAAY,QAAI,uBAAi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,MAAM,0CAA0C;AAG5D,QAAM,mBAAe,iCAA0B,OAAO;AAAA,IACpD,SAAS;AAAA,IACT,GAAG;AAAA,IACH,OAAO;AAAA,IACP,UAAU;AAAA,IACV,cAAc;AAAA,IACd,MAAM,MAAM;AAAA,IAAC;AAAA,IACb,SAAS,MAAM;AAAA,IAAC;AAAA,IAChB,YAAY;AAAA,EACd,EAAE,GAEI,sBAAsB,MAAM,6BAA6B,QAAQ,MAAM,QAEvE,eAAe,WAAW,CAAC;AAgCjC,SA1BsB;AAAA,IACpB,YALA,mBAAmB,YACf,cAAc,OAAO,gBAAiB,WAAW,eAAe,OAAO,OACvE;AAAA,IAIJ;AAAA,IACA;AAAA,IACA;AAAA,IACA,OAAO,CAAC,CAAC,MAAM;AAAA,IACf,MAAM,MAAM;AAAA,IACZ,SAAS,MAAM;AAAA,IACf,QAAQ,CAAC,CAAC,MAAM;AAAA,IAChB;AAAA,IACA;AAAA,IACA;AAAA,IACA,uBAAuB,MAAM,yBAAyB;AAAA,IACtD,uBAAuB,MAAM,yBAAyB;AAAA,IACtD,oBAAoB,QAAQ;AAAA,IAC5B,OAAO,MAAM;AAAA,IACb;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,eAAe;AAAA,EACjB;AAGF;",
5
5
  "names": ["React"]
6
6
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tamagui/sheet",
3
- "version": "1.88.13",
3
+ "version": "1.89.0-1706360676826",
4
4
  "sideEffects": [
5
5
  "*.css"
6
6
  ],
@@ -33,27 +33,27 @@
33
33
  }
34
34
  },
35
35
  "dependencies": {
36
- "@tamagui/animate-presence": "1.88.13",
37
- "@tamagui/animations-react-native": "1.88.13",
38
- "@tamagui/compose-refs": "1.88.13",
39
- "@tamagui/constants": "1.88.13",
40
- "@tamagui/core": "1.88.13",
41
- "@tamagui/create-context": "1.88.13",
42
- "@tamagui/helpers": "1.88.13",
43
- "@tamagui/portal": "1.88.13",
44
- "@tamagui/remove-scroll": "1.88.13",
45
- "@tamagui/scroll-view": "1.88.13",
46
- "@tamagui/stacks": "1.88.13",
47
- "@tamagui/use-constant": "1.88.13",
48
- "@tamagui/use-controllable-state": "1.88.13",
49
- "@tamagui/use-keyboard-visible": "1.88.13"
36
+ "@tamagui/animate-presence": "1.89.0-1706360676826",
37
+ "@tamagui/animations-react-native": "1.89.0-1706360676826",
38
+ "@tamagui/compose-refs": "1.89.0-1706360676826",
39
+ "@tamagui/constants": "1.89.0-1706360676826",
40
+ "@tamagui/core": "1.89.0-1706360676826",
41
+ "@tamagui/create-context": "1.89.0-1706360676826",
42
+ "@tamagui/helpers": "1.89.0-1706360676826",
43
+ "@tamagui/portal": "1.89.0-1706360676826",
44
+ "@tamagui/remove-scroll": "1.89.0-1706360676826",
45
+ "@tamagui/scroll-view": "1.89.0-1706360676826",
46
+ "@tamagui/stacks": "1.89.0-1706360676826",
47
+ "@tamagui/use-constant": "1.89.0-1706360676826",
48
+ "@tamagui/use-controllable-state": "1.89.0-1706360676826",
49
+ "@tamagui/use-keyboard-visible": "1.89.0-1706360676826"
50
50
  },
51
51
  "peerDependencies": {
52
52
  "react": "*",
53
53
  "react-native": "*"
54
54
  },
55
55
  "devDependencies": {
56
- "@tamagui/build": "1.88.13",
56
+ "@tamagui/build": "1.89.0-1706360676826",
57
57
  "react": "^18.2.0",
58
58
  "react-native": "^0.72.6"
59
59
  },
@@ -1,7 +1,7 @@
1
1
  import { createContextScope } from '@tamagui/create-context'
2
2
 
3
3
  import { SHEET_NAME } from './constants'
4
- import { SheetContextValue } from './useSheetProviderProps'
4
+ import type { SheetContextValue } from './useSheetProviderProps'
5
5
 
6
6
  export const [createSheetContext, createSheetScope] = createContextScope(SHEET_NAME)
7
7
 
@@ -1,7 +1,8 @@
1
1
  import { useEvent } from '@tamagui/core'
2
2
  import React, { useMemo } from 'react'
3
3
 
4
- import { SheetControllerContext, SheetControllerContextValue } from './useSheetController'
4
+ import type { SheetControllerContextValue } from './useSheetController'
5
+ import { SheetControllerContext } from './useSheetController'
5
6
 
6
7
  export const SheetController = ({
7
8
  children,
@@ -22,22 +22,19 @@ import {
22
22
  useRef,
23
23
  useState,
24
24
  } from 'react'
25
- import {
25
+ import type {
26
26
  Animated,
27
- Dimensions,
28
27
  GestureResponderEvent,
29
- Keyboard,
30
28
  LayoutChangeEvent,
31
- PanResponder,
32
29
  PanResponderGestureState,
33
- View,
34
30
  } from 'react-native'
31
+ import { Dimensions, Keyboard, PanResponder, View } from 'react-native'
35
32
 
36
33
  import { SHEET_HIDDEN_STYLESHEET } from './constants'
37
34
  import { ParentSheetContext, SheetInsideSheetContext } from './contexts'
38
35
  import { resisted } from './helpers'
39
36
  import { SheetProvider } from './SheetContext'
40
- import { SheetProps, SnapPointsMode } from './types'
37
+ import type { SheetProps, SnapPointsMode } from './types'
41
38
  import { useSheetOpenState } from './useSheetOpenState'
42
39
  import { useSheetProviderProps } from './useSheetProviderProps'
43
40
 
@@ -215,118 +212,114 @@ export const SheetImplementationCustom = themeable(
215
212
  const themeName = useThemeName()
216
213
  const [isDragging, setIsDragging] = useState(false)
217
214
 
218
- const panResponder = useMemo(
219
- () => {
220
- if (disableDrag) return
221
- if (!frameSize) return
222
- if (isShowingInnerSheet) return
223
-
224
- const minY = positions[0]
225
- scrollBridge.paneMinY = minY
226
- let startY = at.current
227
-
228
- function setPanning(val: boolean) {
229
- setIsDragging(val)
230
-
231
- // make unselectable:
232
- if (!SHEET_HIDDEN_STYLESHEET) return
233
- if (!val) {
234
- SHEET_HIDDEN_STYLESHEET.innerText = ''
235
- } else {
236
- SHEET_HIDDEN_STYLESHEET.innerText =
237
- ':root * { user-select: none !important; -webkit-user-select: none !important; }'
238
- }
215
+ const panResponder = useMemo(() => {
216
+ if (disableDrag) return
217
+ if (!frameSize) return
218
+ if (isShowingInnerSheet) return
219
+
220
+ const minY = positions[0]
221
+ scrollBridge.paneMinY = minY
222
+ let startY = at.current
223
+
224
+ function setPanning(val: boolean) {
225
+ setIsDragging(val)
226
+
227
+ // make unselectable:
228
+ if (!SHEET_HIDDEN_STYLESHEET) return
229
+ if (!val) {
230
+ SHEET_HIDDEN_STYLESHEET.innerText = ''
231
+ } else {
232
+ SHEET_HIDDEN_STYLESHEET.innerText =
233
+ ':root * { user-select: none !important; -webkit-user-select: none !important; }'
239
234
  }
235
+ }
240
236
 
241
- const release = ({ vy, dragAt }: { dragAt: number; vy: number }) => {
242
- isExternalDrag = false
243
- previouslyScrolling = false
244
- setPanning(false)
245
- const at = dragAt + startY
246
- // seems liky vy goes up to about 4 at the very most (+ is down, - is up)
247
- // lets base our multiplier on the total layout height
248
- const end = at + frameSize * vy * 0.2
249
- let closestPoint = 0
250
- let dist = Infinity
251
- for (let i = 0; i < positions.length; i++) {
252
- const position = positions[i]
253
- const curDist = end > position ? end - position : position - end
254
- if (curDist < dist) {
255
- dist = curDist
256
- closestPoint = i
257
- }
237
+ const release = ({ vy, dragAt }: { dragAt: number; vy: number }) => {
238
+ isExternalDrag = false
239
+ previouslyScrolling = false
240
+ setPanning(false)
241
+ const at = dragAt + startY
242
+ // seems liky vy goes up to about 4 at the very most (+ is down, - is up)
243
+ // lets base our multiplier on the total layout height
244
+ const end = at + frameSize * vy * 0.2
245
+ let closestPoint = 0
246
+ let dist = Infinity
247
+ for (let i = 0; i < positions.length; i++) {
248
+ const position = positions[i]
249
+ const curDist = end > position ? end - position : position - end
250
+ if (curDist < dist) {
251
+ dist = curDist
252
+ closestPoint = i
258
253
  }
259
- // have to call both because state may not change but need to snap back
260
- setPosition(closestPoint)
261
- animateTo(closestPoint)
262
254
  }
255
+ // have to call both because state may not change but need to snap back
256
+ setPosition(closestPoint)
257
+ animateTo(closestPoint)
258
+ }
263
259
 
264
- const finish = (_e: GestureResponderEvent, state: PanResponderGestureState) => {
265
- release({
266
- vy: state.vy,
267
- dragAt: state.dy,
268
- })
269
- }
260
+ const finish = (_e: GestureResponderEvent, state: PanResponderGestureState) => {
261
+ release({
262
+ vy: state.vy,
263
+ dragAt: state.dy,
264
+ })
265
+ }
270
266
 
271
- let previouslyScrolling = false
272
-
273
- const onMoveShouldSet = (
274
- _e: GestureResponderEvent,
275
- { dy }: PanResponderGestureState
276
- ) => {
277
- const isScrolled = scrollBridge.y !== 0
278
- const isDraggingUp = dy < 0
279
- // we can treat near top instead of exactly to avoid trouble with springs
280
- const isNearTop = scrollBridge.paneY - 5 <= scrollBridge.paneMinY
281
- if (isScrolled) {
282
- previouslyScrolling = true
267
+ let previouslyScrolling = false
268
+
269
+ const onMoveShouldSet = (
270
+ _e: GestureResponderEvent,
271
+ { dy }: PanResponderGestureState
272
+ ) => {
273
+ const isScrolled = scrollBridge.y !== 0
274
+ const isDraggingUp = dy < 0
275
+ // we can treat near top instead of exactly to avoid trouble with springs
276
+ const isNearTop = scrollBridge.paneY - 5 <= scrollBridge.paneMinY
277
+ if (isScrolled) {
278
+ previouslyScrolling = true
279
+ return false
280
+ }
281
+ // prevent drag once at top and pulling up
282
+ if (isNearTop) {
283
+ if (!isScrolled && isDraggingUp) {
283
284
  return false
284
285
  }
285
- // prevent drag once at top and pulling up
286
- if (isNearTop) {
287
- if (!isScrolled && isDraggingUp) {
288
- return false
289
- }
290
- }
291
- // we could do some detection of other touchables and cancel here..
292
- return Math.abs(dy) > 5
293
286
  }
287
+ // we could do some detection of other touchables and cancel here..
288
+ return Math.abs(dy) > 5
289
+ }
294
290
 
295
- const grant = () => {
296
- setPanning(true)
297
- stopSpring()
298
- startY = at.current
299
- }
291
+ const grant = () => {
292
+ setPanning(true)
293
+ stopSpring()
294
+ startY = at.current
295
+ }
300
296
 
301
- let isExternalDrag = false
297
+ let isExternalDrag = false
302
298
 
303
- scrollBridge.drag = (dy) => {
304
- if (!isExternalDrag) {
305
- isExternalDrag = true
306
- grant()
307
- }
308
- const to = dy + startY
309
- animatedNumber.setValue(resisted(to, minY), { type: 'direct' })
299
+ scrollBridge.drag = (dy) => {
300
+ if (!isExternalDrag) {
301
+ isExternalDrag = true
302
+ grant()
310
303
  }
304
+ const to = dy + startY
305
+ animatedNumber.setValue(resisted(to, minY), { type: 'direct' })
306
+ }
311
307
 
312
- scrollBridge.release = release
313
-
314
- return PanResponder.create({
315
- onMoveShouldSetPanResponder: onMoveShouldSet,
316
- onPanResponderGrant: grant,
317
- onPanResponderMove: (_e, { dy }) => {
318
- const toFull = dy + startY
319
- const to = resisted(toFull, minY)
320
- animatedNumber.setValue(to, { type: 'direct' })
321
- },
322
- onPanResponderEnd: finish,
323
- onPanResponderTerminate: finish,
324
- onPanResponderRelease: finish,
325
- })
326
- },
327
- // eslint-disable-next-line react-hooks/exhaustive-deps
328
- [disableDrag, isShowingInnerSheet, animateTo, frameSize, positions, setPosition]
329
- )
308
+ scrollBridge.release = release
309
+
310
+ return PanResponder.create({
311
+ onMoveShouldSetPanResponder: onMoveShouldSet,
312
+ onPanResponderGrant: grant,
313
+ onPanResponderMove: (_e, { dy }) => {
314
+ const toFull = dy + startY
315
+ const to = resisted(toFull, minY)
316
+ animatedNumber.setValue(to, { type: 'direct' })
317
+ },
318
+ onPanResponderEnd: finish,
319
+ onPanResponderTerminate: finish,
320
+ onPanResponderRelease: finish,
321
+ })
322
+ }, [disableDrag, isShowingInnerSheet, animateTo, frameSize, positions, setPosition])
330
323
 
331
324
  const handleAnimationViewLayout = useCallback(
332
325
  (e: LayoutChangeEvent) => {
@@ -1,11 +1,12 @@
1
1
  import { composeRefs } from '@tamagui/compose-refs'
2
- import { GetRef } from '@tamagui/core'
3
- import { ScrollView, ScrollViewProps } from '@tamagui/scroll-view'
2
+ import type { GetRef } from '@tamagui/core'
3
+ import type { ScrollViewProps } from '@tamagui/scroll-view'
4
+ import { ScrollView } from '@tamagui/scroll-view'
4
5
  import { forwardRef, useMemo, useRef } from 'react'
5
- import { ScrollView as RNScrollView } from 'react-native'
6
+ import type { ScrollView as RNScrollView } from 'react-native'
6
7
 
7
8
  import { useSheetContext } from './SheetContext'
8
- import { SheetScopedProps } from './types'
9
+ import type { SheetScopedProps } from './types'
9
10
 
10
11
  // TODO ideally would replicate https://github.com/ammarahm-ed/react-native-actions-sheet/blob/master/src/index.tsx
11
12
 
@@ -1,24 +1,26 @@
1
1
  import { useComposedRefs } from '@tamagui/compose-refs'
2
2
  import { useIsomorphicLayoutEffect } from '@tamagui/constants'
3
- import {
3
+ import type {
4
4
  GetProps,
5
- Stack,
6
5
  StackProps,
7
6
  TamaguiComponent,
8
7
  TamaguiComponentExpectingVariants,
9
8
  } from '@tamagui/core'
9
+ import { Stack } from '@tamagui/core'
10
10
  import { composeEventHandlers, withStaticProperties } from '@tamagui/helpers'
11
11
  import { RemoveScroll } from '@tamagui/remove-scroll'
12
12
  import { useDidFinishSSR } from '@tamagui/use-did-finish-ssr'
13
- import { FunctionComponent, RefAttributes, forwardRef, memo, useMemo } from 'react'
14
- import { Platform, View } from 'react-native'
13
+ import type { FunctionComponent, RefAttributes } from 'react'
14
+ import { forwardRef, memo, useMemo } from 'react'
15
+ import type { View } from 'react-native'
16
+ import { Platform } from 'react-native'
15
17
 
16
18
  import { SHEET_HANDLE_NAME, SHEET_NAME, SHEET_OVERLAY_NAME } from './constants'
17
19
  import { getNativeSheet } from './nativeSheet'
18
20
  import { useSheetContext } from './SheetContext'
19
21
  import { SheetImplementationCustom } from './SheetImplementationCustom'
20
22
  import { SheetScrollView } from './SheetScrollView'
21
- import { SheetProps, SheetScopedProps } from './types'
23
+ import type { SheetProps, SheetScopedProps } from './types'
22
24
  import { useSheetController } from './useSheetController'
23
25
  import { useSheetOffscreenSize } from './useSheetOffscreenSize'
24
26
 
@@ -1,9 +1,10 @@
1
1
  import { YStack } from '@tamagui/stacks'
2
- import { FunctionComponent, useEffect, useRef } from 'react'
2
+ import type { FunctionComponent } from 'react'
3
+ import { useEffect, useRef } from 'react'
3
4
  import { View } from 'react-native'
4
5
 
5
6
  import { SheetProvider } from './SheetContext'
6
- import { SheetProps } from './types'
7
+ import type { SheetProps } from './types'
7
8
  import { useSheetOpenState } from './useSheetOpenState'
8
9
  import { useSheetProviderProps } from './useSheetProviderProps'
9
10
 
package/src/types.tsx CHANGED
@@ -1,8 +1,9 @@
1
- import { AnimatedNumberStrategy, AnimationProp } from '@tamagui/core'
1
+ import type { AnimatedNumberStrategy, AnimationProp } from '@tamagui/core'
2
2
  import type { ScopedProps } from '@tamagui/create-context'
3
3
  import type { PortalProps } from '@tamagui/portal'
4
- import { RemoveScroll } from '@tamagui/remove-scroll'
5
- import React, { ReactNode } from 'react'
4
+ import type { RemoveScroll } from '@tamagui/remove-scroll'
5
+ import type { ReactNode } from 'react'
6
+ import type React from 'react'
6
7
 
7
8
  export type SheetProps = ScopedProps<
8
9
  {
@@ -1,4 +1,4 @@
1
- import { SheetContextValue } from './useSheetProviderProps'
1
+ import type { SheetContextValue } from './useSheetProviderProps'
2
2
 
3
3
  export const useSheetOffscreenSize = ({
4
4
  snapPoints,
@@ -1,6 +1,6 @@
1
1
  import { useControllableState } from '@tamagui/use-controllable-state'
2
2
 
3
- import { SheetProps } from './types'
3
+ import type { SheetProps } from './types'
4
4
  import { useSheetController } from './useSheetController'
5
5
 
6
6
  export const useSheetOpenState = (props: SheetProps) => {
@@ -1,10 +1,11 @@
1
- import { TamaguiElement, useConfiguration } from '@tamagui/core'
1
+ import type { TamaguiElement } from '@tamagui/core'
2
+ import { useConfiguration } from '@tamagui/core'
2
3
  import { useConstant } from '@tamagui/use-constant'
3
4
  import { useControllableState } from '@tamagui/use-controllable-state'
4
5
  import React, { useCallback, useEffect, useMemo, useState } from 'react'
5
6
 
6
- import { ScrollBridge, SheetProps } from './types'
7
- import { SheetOpenState } from './useSheetOpenState'
7
+ import type { ScrollBridge, SheetProps } from './types'
8
+ import type { SheetOpenState } from './useSheetOpenState'
8
9
 
9
10
  export type SheetContextValue = ReturnType<typeof useSheetProviderProps>
10
11
 
@@ -30,7 +31,7 @@ export function useSheetProviderProps(
30
31
 
31
32
  const snapPoints = useMemo(
32
33
  () => (props.dismissOnSnapToBottom ? [...snapPointsProp, 0] : snapPointsProp),
33
- // eslint-disable-next-line react-hooks/exhaustive-deps
34
+
34
35
  [JSON.stringify(snapPointsProp), props.dismissOnSnapToBottom]
35
36
  )
36
37
 
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import { SheetControllerContextValue } from './useSheetController';
2
+ import type { SheetControllerContextValue } from './useSheetController';
3
3
  export declare const SheetController: ({ children, onOpenChange: onOpenChangeProp, ...value }: Partial<SheetControllerContextValue> & {
4
4
  children?: React.ReactNode;
5
5
  }) => JSX.Element;
@@ -1 +1 @@
1
- {"version":3,"file":"SheetController.d.ts","sourceRoot":"","sources":["../src/SheetController.tsx"],"names":[],"mappings":"AACA,OAAO,KAAkB,MAAM,OAAO,CAAA;AAEtC,OAAO,EAA0B,2BAA2B,EAAE,MAAM,sBAAsB,CAAA;AAE1F,eAAO,MAAM,eAAe;eAI2B,MAAM,SAAS;iBAkBrE,CAAA"}
1
+ {"version":3,"file":"SheetController.d.ts","sourceRoot":"","sources":["../src/SheetController.tsx"],"names":[],"mappings":"AACA,OAAO,KAAkB,MAAM,OAAO,CAAA;AAEtC,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,sBAAsB,CAAA;AAGvE,eAAO,MAAM,eAAe;eAI2B,MAAM,SAAS;iBAkBrE,CAAA"}
@@ -1,6 +1,6 @@
1
1
  /// <reference types="react" />
2
2
  import { View } from 'react-native';
3
- import { SnapPointsMode } from './types';
3
+ import type { SnapPointsMode } from './types';
4
4
  export declare const SheetImplementationCustom: (props: Omit<{
5
5
  open?: boolean | undefined;
6
6
  defaultOpen?: boolean | undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"SheetImplementationCustom.d.ts","sourceRoot":"","sources":["../src/SheetImplementationCustom.tsx"],"names":[],"mappings":";AAwBA,OAAO,EAQL,IAAI,EACL,MAAM,cAAc,CAAA;AAMrB,OAAO,EAAc,cAAc,EAAE,MAAM,SAAS,CAAA;AAMpD,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;;;;;;;;;;;6MA+brC,CAAA"}
1
+ {"version":3,"file":"SheetImplementationCustom.d.ts","sourceRoot":"","sources":["../src/SheetImplementationCustom.tsx"],"names":[],"mappings":";AA8BA,OAAO,EAAsC,IAAI,EAAE,MAAM,cAAc,CAAA;AAMvE,OAAO,KAAK,EAAc,cAAc,EAAE,MAAM,SAAS,CAAA;AAMzD,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;;;;;;;;;;;6MA2brC,CAAA"}
@@ -1,5 +1,5 @@
1
1
  /// <reference types="react" />
2
- import { ScrollView as RNScrollView } from 'react-native';
2
+ import type { ScrollView as RNScrollView } from 'react-native';
3
3
  export declare const SheetScrollView: import("react").ForwardRefExoticComponent<Omit<import("@tamagui/web/types/interfaces/TamaguiComponentPropsBaseBase").TamaguiComponentPropsBaseBase & import("react-native").ScrollViewProps, keyof import("@tamagui/core").StackStyleBase | "fullscreen"> & import("@tamagui/core").WithThemeValues<import("@tamagui/core").StackStyleBase> & {
4
4
  fullscreen?: boolean | undefined;
5
5
  } & import("@tamagui/core").WithShorthands<import("@tamagui/core").WithThemeValues<import("@tamagui/core").StackStyleBase>> & import("@tamagui/core").WithPseudoProps<import("@tamagui/core").WithThemeValues<import("@tamagui/core").StackStyleBase> & {
@@ -1 +1 @@
1
- {"version":3,"file":"SheetScrollView.d.ts","sourceRoot":"","sources":["../src/SheetScrollView.tsx"],"names":[],"mappings":";AAIA,OAAO,EAAE,UAAU,IAAI,YAAY,EAAE,MAAM,cAAc,CAAA;AAazD,eAAO,MAAM,eAAe;;;;;;kDA6H3B,CAAA"}
1
+ {"version":3,"file":"SheetScrollView.d.ts","sourceRoot":"","sources":["../src/SheetScrollView.tsx"],"names":[],"mappings":";AAKA,OAAO,KAAK,EAAE,UAAU,IAAI,YAAY,EAAE,MAAM,cAAc,CAAA;AAa9D,eAAO,MAAM,eAAe;;;;;;kDA6H3B,CAAA"}
@@ -1,7 +1,7 @@
1
- import { GetProps, StackProps, TamaguiComponent, TamaguiComponentExpectingVariants } from '@tamagui/core';
2
- import { FunctionComponent, RefAttributes } from 'react';
3
- import { View } from 'react-native';
4
- import { SheetProps, SheetScopedProps } from './types';
1
+ import type { GetProps, StackProps, TamaguiComponent, TamaguiComponentExpectingVariants } from '@tamagui/core';
2
+ import type { FunctionComponent, RefAttributes } from 'react';
3
+ import type { View } from 'react-native';
4
+ import type { SheetProps, SheetScopedProps } from './types';
5
5
  type SharedSheetProps = {
6
6
  open?: boolean;
7
7
  };
@@ -1 +1 @@
1
- {"version":3,"file":"createSheet.d.ts","sourceRoot":"","sources":["../src/createSheet.tsx"],"names":[],"mappings":"AAEA,OAAO,EACL,QAAQ,EAER,UAAU,EACV,gBAAgB,EAChB,iCAAiC,EAClC,MAAM,eAAe,CAAA;AAItB,OAAO,EAAE,iBAAiB,EAAE,aAAa,EAA6B,MAAM,OAAO,CAAA;AACnF,OAAO,EAAY,IAAI,EAAE,MAAM,cAAc,CAAA;AAO7C,OAAO,EAAE,UAAU,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAA;AAItD,KAAK,gBAAgB,GAAG;IACtB,IAAI,CAAC,EAAE,OAAO,CAAA;CACf,CAAA;AAED,KAAK,SAAS,GAAG,UAAU,GAAG,gBAAgB,CAAA;AAE9C,KAAK,oBAAoB,GAAG,iCAAiC,CAAC,SAAS,EAAE,gBAAgB,CAAC,CAAA;AAE1F,wBAAgB,WAAW,CACzB,CAAC,SAAS,oBAAoB,GAAG,gBAAgB,EACjD,CAAC,SAAS,oBAAoB,GAAG,gBAAgB,EACjD,CAAC,SAAS,oBAAoB,GAAG,gBAAgB,EACjD,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE;IAAE,MAAM,EAAE,CAAC,CAAC;IAAC,KAAK,EAAE,CAAC,CAAC;IAAC,OAAO,EAAE,CAAC,CAAA;CAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;YAmFrD;;;;eAIG;;YAGH;;;;eAIG;;;+DA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AAC;;;;;;;;;;QAiF9D;;;;WAIG;;QAGH;;;;WAIG;;;2DA/DI,iBAAiB,SAAS,cAAc,CAAC,CAAC;yCA7B5B,iBAAiB,SAAS,aAAa,CAAC,CAAC;;;;;;;;EAuMzE"}
@@ -1,5 +1,5 @@
1
- import { FunctionComponent } from 'react';
2
- import { SheetProps } from './types';
1
+ import type { FunctionComponent } from 'react';
2
+ import type { SheetProps } from './types';
3
3
  type SheetNativePlatforms = 'ios';
4
4
  export declare function getNativeSheet(platform: SheetNativePlatforms): FunctionComponent<SheetProps> | null;
5
5
  export declare function setupNativeSheet(platform: SheetNativePlatforms, Implementation: any): void;
@@ -1 +1 @@
1
- {"version":3,"file":"nativeSheet.d.ts","sourceRoot":"","sources":["../src/nativeSheet.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAqB,MAAM,OAAO,CAAA;AAI5D,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAA;AAMpC,KAAK,oBAAoB,GAAG,KAAK,CAAA;AAMjC,wBAAgB,cAAc,CAAC,QAAQ,EAAE,oBAAoB,wCAE5D;AAED,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,oBAAoB,EAAE,cAAc,EAAE,GAAG,QA8CnF"}
1
+ {"version":3,"file":"nativeSheet.d.ts","sourceRoot":"","sources":["../src/nativeSheet.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAA;AAK9C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,SAAS,CAAA;AAMzC,KAAK,oBAAoB,GAAG,KAAK,CAAA;AAMjC,wBAAgB,cAAc,CAAC,QAAQ,EAAE,oBAAoB,wCAE5D;AAED,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,oBAAoB,EAAE,cAAc,EAAE,GAAG,QA8CnF"}