@tamagui/sheet 1.134.5 → 1.135.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tamagui/sheet",
3
- "version": "1.134.5",
3
+ "version": "1.135.0",
4
4
  "sideEffects": [
5
5
  "*.css"
6
6
  ],
@@ -37,30 +37,30 @@
37
37
  }
38
38
  },
39
39
  "dependencies": {
40
- "@tamagui/adapt": "1.134.5",
41
- "@tamagui/animate-presence": "1.134.5",
42
- "@tamagui/animations-react-native": "1.134.5",
43
- "@tamagui/compose-refs": "1.134.5",
44
- "@tamagui/constants": "1.134.5",
45
- "@tamagui/core": "1.134.5",
46
- "@tamagui/create-context": "1.134.5",
47
- "@tamagui/helpers": "1.134.5",
48
- "@tamagui/portal": "1.134.5",
49
- "@tamagui/remove-scroll": "1.134.5",
50
- "@tamagui/scroll-view": "1.134.5",
51
- "@tamagui/stacks": "1.134.5",
52
- "@tamagui/use-constant": "1.134.5",
53
- "@tamagui/use-controllable-state": "1.134.5",
54
- "@tamagui/use-did-finish-ssr": "1.134.5",
55
- "@tamagui/use-keyboard-visible": "1.134.5",
56
- "@tamagui/z-index-stack": "1.134.5"
40
+ "@tamagui/adapt": "1.135.0",
41
+ "@tamagui/animate-presence": "1.135.0",
42
+ "@tamagui/animations-react-native": "1.135.0",
43
+ "@tamagui/compose-refs": "1.135.0",
44
+ "@tamagui/constants": "1.135.0",
45
+ "@tamagui/core": "1.135.0",
46
+ "@tamagui/create-context": "1.135.0",
47
+ "@tamagui/helpers": "1.135.0",
48
+ "@tamagui/portal": "1.135.0",
49
+ "@tamagui/remove-scroll": "1.135.0",
50
+ "@tamagui/scroll-view": "1.135.0",
51
+ "@tamagui/stacks": "1.135.0",
52
+ "@tamagui/use-constant": "1.135.0",
53
+ "@tamagui/use-controllable-state": "1.135.0",
54
+ "@tamagui/use-did-finish-ssr": "1.135.0",
55
+ "@tamagui/use-keyboard-visible": "1.135.0",
56
+ "@tamagui/z-index-stack": "1.135.0"
57
57
  },
58
58
  "peerDependencies": {
59
59
  "react": "*",
60
60
  "react-native": "*"
61
61
  },
62
62
  "devDependencies": {
63
- "@tamagui/build": "1.134.5",
63
+ "@tamagui/build": "1.135.0",
64
64
  "react": "*",
65
65
  "react-native": "^0.79.2"
66
66
  },
@@ -8,6 +8,7 @@ import {
8
8
  useIsomorphicLayoutEffect,
9
9
  } from '@tamagui/constants'
10
10
  import {
11
+ LayoutMeasurementController,
11
12
  Stack,
12
13
  Theme,
13
14
  useConfiguration,
@@ -501,56 +502,58 @@ export const SheetImplementationCustom = React.forwardRef<View, SheetProps>(
501
502
  // })
502
503
 
503
504
  let contents = (
504
- <ParentSheetContext.Provider value={nextParentContext}>
505
- <SheetProvider {...providerProps} setHasScrollView={setHasScrollView}>
506
- <AnimatePresence custom={{ open }}>
507
- {shouldHideParentSheet || !open ? null : overlayComponent}
508
- </AnimatePresence>
509
-
510
- {snapPointsMode !== 'percent' && (
511
- <View
512
- style={{
513
- opacity: 0,
514
- position: 'absolute',
515
- top: 0,
516
- left: 0,
517
- right: 0,
518
- bottom: 0,
519
- pointerEvents: 'none',
520
- }}
521
- onLayout={handleMaxContentViewLayout}
522
- />
523
- )}
524
-
525
- <AnimatedView
526
- ref={ref}
527
- {...panResponder?.panHandlers}
528
- onLayout={handleAnimationViewLayout}
529
- // @ts-ignore for CSS driver this is necessary to attach the transition
530
- // also motion driver at least though i suspect all drivers?
531
- animation={isDragging || disableAnimation ? null : animation}
532
- // @ts-ignore
533
- disableClassName
534
- style={[
535
- {
536
- position: 'absolute',
537
- zIndex,
538
- width: '100%',
539
- height: forcedContentHeight,
540
- minHeight: forcedContentHeight,
541
- opacity: !shouldHideParentSheet ? opacity : 0,
542
- ...((shouldHideParentSheet || !open) && {
505
+ <LayoutMeasurementController disable={!open}>
506
+ <ParentSheetContext.Provider value={nextParentContext}>
507
+ <SheetProvider {...providerProps} setHasScrollView={setHasScrollView}>
508
+ <AnimatePresence custom={{ open }}>
509
+ {shouldHideParentSheet || !open ? null : overlayComponent}
510
+ </AnimatePresence>
511
+
512
+ {snapPointsMode !== 'percent' && (
513
+ <View
514
+ style={{
515
+ opacity: 0,
516
+ position: 'absolute',
517
+ top: 0,
518
+ left: 0,
519
+ right: 0,
520
+ bottom: 0,
543
521
  pointerEvents: 'none',
544
- }),
545
- },
546
- animatedStyle,
547
- ]}
548
- >
549
- {/* <AdaptProvider>{props.children}</AdaptProvider> */}
550
- {props.children}
551
- </AnimatedView>
552
- </SheetProvider>
553
- </ParentSheetContext.Provider>
522
+ }}
523
+ onLayout={handleMaxContentViewLayout}
524
+ />
525
+ )}
526
+
527
+ <AnimatedView
528
+ ref={ref}
529
+ {...panResponder?.panHandlers}
530
+ onLayout={handleAnimationViewLayout}
531
+ // @ts-ignore for CSS driver this is necessary to attach the transition
532
+ // also motion driver at least though i suspect all drivers?
533
+ animation={isDragging || disableAnimation ? null : animation}
534
+ // @ts-ignore
535
+ disableClassName
536
+ style={[
537
+ {
538
+ position: 'absolute',
539
+ zIndex,
540
+ width: '100%',
541
+ height: forcedContentHeight,
542
+ minHeight: forcedContentHeight,
543
+ opacity: !shouldHideParentSheet ? opacity : 0,
544
+ ...((shouldHideParentSheet || !open) && {
545
+ pointerEvents: 'none',
546
+ }),
547
+ },
548
+ animatedStyle,
549
+ ]}
550
+ >
551
+ {/* <AdaptProvider>{props.children}</AdaptProvider> */}
552
+ {props.children}
553
+ </AnimatedView>
554
+ </SheetProvider>
555
+ </ParentSheetContext.Provider>
556
+ </LayoutMeasurementController>
554
557
  )
555
558
 
556
559
  if (process.env.TAMAGUI_TARGET === 'native' && !USE_NATIVE_PORTAL) {
@@ -1 +1 @@
1
- {"version":3,"file":"SheetImplementationCustom.d.ts","sourceRoot":"","sources":["../src/SheetImplementationCustom.tsx"],"names":[],"mappings":"AAkBA,OAAO,KAAmB,MAAM,OAAO,CAAA;AAOvC,OAAO,EAAsC,IAAI,EAAE,MAAM,cAAc,CAAA;AAIvE,OAAO,KAAK,EAAc,cAAc,EAAE,MAAM,SAAS,CAAA;AAWzD,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;;;;;;;;;;;;;8BA4iBrC,CAAA"}
1
+ {"version":3,"file":"SheetImplementationCustom.d.ts","sourceRoot":"","sources":["../src/SheetImplementationCustom.tsx"],"names":[],"mappings":"AAmBA,OAAO,KAAmB,MAAM,OAAO,CAAA;AAOvC,OAAO,EAAsC,IAAI,EAAE,MAAM,cAAc,CAAA;AAIvE,OAAO,KAAK,EAAc,cAAc,EAAE,MAAM,SAAS,CAAA;AAWzD,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;;;;;;;;;;;;;8BA8iBrC,CAAA"}