@cleartrip/ct-design-floating-wrapper 5.27.0-SNAPSHOT-native-main.14 → 5.31.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.
@@ -1,10 +1,17 @@
1
1
  import { LayoutChangeEvent } from 'react-native';
2
- import { GestureType } from 'react-native-gesture-handler';
3
- import { AnimatedStyle } from 'react-native-reanimated';
4
2
  import { IFloatingWrapperProps } from '../type';
5
3
  export declare const useDraggable: (props: IFloatingWrapperProps) => {
6
- gesture: GestureType;
7
- animatedStyle: AnimatedStyle;
4
+ gesture: import("react-native-gesture-handler/lib/typescript/handlers/gestures/gestureComposition").ComposedGesture;
5
+ animatedStyle: {
6
+ transform: ({
7
+ translateX: number;
8
+ translateY?: undefined;
9
+ } | {
10
+ translateY: number;
11
+ translateX?: undefined;
12
+ })[];
13
+ opacity: number;
14
+ };
8
15
  onLayout: (event: LayoutChangeEvent) => void;
9
16
  };
10
17
  //# sourceMappingURL=useDraggable.native.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"useDraggable.native.d.ts","sourceRoot":"","sources":["../../packages/components/FloatingWrapper/src/hooks/useDraggable.native.ts"],"names":[],"mappings":"AACA,OAAO,EAAc,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAC7D,OAAO,EAAW,WAAW,EAAE,MAAM,8BAA8B,CAAC;AACpE,OAAO,EAAE,aAAa,EAAiE,MAAM,yBAAyB,CAAC;AAEvH,OAAO,EAAW,qBAAqB,EAA4B,MAAM,SAAS,CAAC;AAmBnF,eAAO,MAAM,YAAY,GACvB,OAAO,qBAAqB,KAC3B;IAAE,OAAO,EAAE,WAAW,CAAC;IAAC,aAAa,EAAE,aAAa,CAAC;IAAC,QAAQ,EAAE,CAAC,KAAK,EAAE,iBAAiB,KAAK,IAAI,CAAA;CAoKpG,CAAC"}
1
+ {"version":3,"file":"useDraggable.native.d.ts","sourceRoot":"","sources":["../../packages/components/FloatingWrapper/src/hooks/useDraggable.native.ts"],"names":[],"mappings":"AACA,OAAO,EAAc,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAI7D,OAAO,EAAW,qBAAqB,EAA4B,MAAM,SAAS,CAAC;AAmBnF,eAAO,MAAM,YAAY,GAAI,OAAO,qBAAqB;;;;;;;;;;;;sBAyD7C,iBAAiB;CA0G5B,CAAC"}
package/dist/style.d.ts CHANGED
@@ -1,4 +1,3 @@
1
1
  import { CSSProperties } from 'react';
2
- import { Theme } from '@cleartrip/ct-design-theme';
3
- export declare const getFloatingWidgetStyle: (theme: Theme) => Record<string, CSSProperties>;
2
+ export declare const getFloatingWidgetStyle: () => Record<string, CSSProperties>;
4
3
  //# sourceMappingURL=style.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"style.d.ts","sourceRoot":"","sources":["../packages/components/FloatingWrapper/src/style.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AACtC,OAAO,EAAE,KAAK,EAAE,MAAM,4BAA4B,CAAC;AAEnD,eAAO,MAAM,sBAAsB,GAAI,OAAO,KAAK,KAAG,MAAM,CAAC,MAAM,EAAE,aAAa,CAcjF,CAAC"}
1
+ {"version":3,"file":"style.d.ts","sourceRoot":"","sources":["../packages/components/FloatingWrapper/src/style.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAEtC,eAAO,MAAM,sBAAsB,QAAO,MAAM,CAAC,MAAM,EAAE,aAAa,CAcrE,CAAC"}
package/package.json CHANGED
@@ -1,18 +1,21 @@
1
1
  {
2
2
  "name": "@cleartrip/ct-design-floating-wrapper",
3
- "version": "5.27.0-SNAPSHOT-native-main.14",
3
+ "version": "5.31.0",
4
4
  "description": "FloatingWrapper Component",
5
5
  "types": "dist/index.d.ts",
6
- "main": "./dist/ct-design-floating-wrapper.cjs.js",
6
+ "main": "dist/ct-design-floating-wrapper.cjs.js",
7
7
  "jsnext:main": "dist/ct-design-floating-wrapper.esm.js",
8
8
  "module": "dist/ct-design-floating-wrapper.esm.js",
9
9
  "react-native": "src/index.native.ts",
10
10
  "sideEffects": false,
11
11
  "exports": {
12
12
  ".": {
13
+ "development": "./src/index.ts",
14
+ "react-native": "./src/index.native.ts",
13
15
  "types": "./dist/index.d.ts",
14
16
  "import": "./dist/ct-design-floating-wrapper.esm.js",
15
- "default": "./dist/ct-design-floating-wrapper.cjs.js"
17
+ "require": "./dist/ct-design-floating-wrapper.cjs.js",
18
+ "default": "./dist/ct-design-floating-wrapper.esm.js"
16
19
  }
17
20
  },
18
21
  "browser": {
@@ -25,8 +28,8 @@
25
28
  ],
26
29
  "dependencies": {
27
30
  "react-swipeable": "7.0.1",
28
- "@cleartrip/ct-design-style-manager": "5.27.0-SNAPSHOT-native-main.14",
29
- "@cleartrip/ct-design-theme": "5.27.0-SNAPSHOT-native-main.14"
31
+ "@cleartrip/ct-design-style-manager": "5.31.0",
32
+ "@cleartrip/ct-design-theme": "5.31.0"
30
33
  },
31
34
  "devDependencies": {
32
35
  "react-native-gesture-handler": "2.26.0",
@@ -1,7 +1,7 @@
1
1
  import { useCallback, useEffect } from 'react';
2
2
  import { Dimensions, LayoutChangeEvent } from 'react-native';
3
- import { Gesture, GestureType } from 'react-native-gesture-handler';
4
- import { AnimatedStyle, Easing, runOnJS, useAnimatedStyle, useSharedValue, withTiming } from 'react-native-reanimated';
3
+ import { Gesture } from 'react-native-gesture-handler';
4
+ import { Easing, runOnJS, useAnimatedStyle, useSharedValue, withTiming } from 'react-native-reanimated';
5
5
 
6
6
  import { IBounds, IFloatingWrapperProps, IPosition, InitialCorner } from '../type';
7
7
 
@@ -22,9 +22,7 @@ const isExplicitBounds = (bounds: IFloatingWrapperProps['bounds']): bounds is IB
22
22
  * runs on the UI thread via Reanimated shared values, so React never re-renders
23
23
  * during a drag.
24
24
  */
25
- export const useDraggable = (
26
- props: IFloatingWrapperProps,
27
- ): { gesture: GestureType; animatedStyle: AnimatedStyle; onLayout: (event: LayoutChangeEvent) => void } => {
25
+ export const useDraggable = (props: IFloatingWrapperProps) => {
28
26
  const {
29
27
  bounds = 'viewport',
30
28
  edgeOffset = DEFAULT_EDGE_OFFSET,
@@ -186,6 +184,5 @@ export const useDraggable = (
186
184
  opacity: ready.value ? 1 : 0,
187
185
  }));
188
186
 
189
- // @ts-ignore
190
187
  return { gesture, animatedStyle, onLayout };
191
188
  };
package/src/style.ts CHANGED
@@ -1,7 +1,6 @@
1
1
  import { CSSProperties } from 'react';
2
- import { Theme } from '@cleartrip/ct-design-theme';
3
2
 
4
- export const getFloatingWidgetStyle = (theme: Theme): Record<string, CSSProperties> => {
3
+ export const getFloatingWidgetStyle = (): Record<string, CSSProperties> => {
5
4
  return {
6
5
  root: {
7
6
  position: 'fixed',