react-native-bottom-sheet-stack 1.0.0 → 1.0.1

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.
@@ -5,14 +5,9 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.useMaybeBottomSheetManagerContext = exports.useBottomSheetManagerContext = exports.BottomSheetManagerProvider = void 0;
7
7
  var _react = _interopRequireDefault(require("react"));
8
- var _reactNative = require("react-native");
9
8
  var _BottomSheetManager = require("./BottomSheetManager.context");
10
9
  var _jsxRuntime = require("react/jsx-runtime");
11
10
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
12
- /**
13
- * Provider for bottom sheet manager context.
14
- * Use ScaleBackgroundWrapper inside to enable iOS-style scale effect on content.
15
- */
16
11
  function BottomSheetManagerProviderComp({
17
12
  id,
18
13
  children
@@ -21,10 +16,7 @@ function BottomSheetManagerProviderComp({
21
16
  value: {
22
17
  groupId: id
23
18
  },
24
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
25
- style: styles.container,
26
- children: children
27
- })
19
+ children: children
28
20
  }, id);
29
21
  }
30
22
  const BottomSheetManagerProvider = exports.BottomSheetManagerProvider = /*#__PURE__*/_react.default.memo(BottomSheetManagerProviderComp);
@@ -44,10 +36,4 @@ const useMaybeBottomSheetManagerContext = () => {
44
36
  return context;
45
37
  };
46
38
  exports.useMaybeBottomSheetManagerContext = useMaybeBottomSheetManagerContext;
47
- const styles = _reactNative.StyleSheet.create({
48
- container: {
49
- flex: 1,
50
- backgroundColor: '#000'
51
- }
52
- });
53
39
  //# sourceMappingURL=BottomSheetManager.provider.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["_react","_interopRequireDefault","require","_reactNative","_BottomSheetManager","_jsxRuntime","e","__esModule","default","BottomSheetManagerProviderComp","id","children","jsx","BottomSheetManagerContext","Provider","value","groupId","View","style","styles","container","BottomSheetManagerProvider","exports","React","memo","useBottomSheetManagerContext","context","useContext","Error","useMaybeBottomSheetManagerContext","StyleSheet","create","flex","backgroundColor"],"sourceRoot":"../../src","sources":["BottomSheetManager.provider.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AAEA,IAAAE,mBAAA,GAAAF,OAAA;AAGsC,IAAAG,WAAA,GAAAH,OAAA;AAAA,SAAAD,uBAAAK,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAiBtC;AACA;AACA;AACA;AACA,SAASG,8BAA8BA,CAAC;EAAEC,EAAE;EAAEC;AAAwB,CAAC,EAAE;EACvE,oBACE,IAAAN,WAAA,CAAAO,GAAA,EAACR,mBAAA,CAAAS,yBAAyB,CAACC,QAAQ;IAAUC,KAAK,EAAE;MAAEC,OAAO,EAAEN;IAAG,CAAE;IAAAC,QAAA,eAClE,IAAAN,WAAA,CAAAO,GAAA,EAACT,YAAA,CAAAc,IAAI;MAACC,KAAK,EAAEC,MAAM,CAACC,SAAU;MAAAT,QAAA,EAAEA;IAAQ,CAAO;EAAC,GADTD,EAEL,CAAC;AAEzC;AAEO,MAAMW,0BAA0B,GAAAC,OAAA,CAAAD,0BAAA,gBAAGE,cAAK,CAACC,IAAI,CAClDf,8BACF,CAAC;AAEM,MAAMgB,4BAA4B,GACvCA,CAAA,KAAsC;EACpC,MAAMC,OAAO,GAAGH,cAAK,CAACI,UAAU,CAACd,6CAAyB,CAAC;EAE3D,IAAI,CAACa,OAAO,EAAE;IACZ,MAAM,IAAIE,KAAK,CACb,+EACF,CAAC;EACH;EACA,OAAOF,OAAO;AAChB,CAAC;AAACJ,OAAA,CAAAG,4BAAA,GAAAA,4BAAA;AAEG,MAAMI,iCAAiC,GAC5CA,CAAA,KAA6C;EAC3C,MAAMH,OAAO,GAAGH,cAAK,CAACI,UAAU,CAACd,6CAAyB,CAAC;EAE3D,IAAI,CAACa,OAAO,EAAE;IACZ,OAAO,IAAI;EACb;EACA,OAAOA,OAAO;AAChB,CAAC;AAACJ,OAAA,CAAAO,iCAAA,GAAAA,iCAAA;AAEJ,MAAMV,MAAM,GAAGW,uBAAU,CAACC,MAAM,CAAC;EAC/BX,SAAS,EAAE;IACTY,IAAI,EAAE,CAAC;IACPC,eAAe,EAAE;EACnB;AACF,CAAC,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["_react","_interopRequireDefault","require","_BottomSheetManager","_jsxRuntime","e","__esModule","default","BottomSheetManagerProviderComp","id","children","jsx","BottomSheetManagerContext","Provider","value","groupId","BottomSheetManagerProvider","exports","React","memo","useBottomSheetManagerContext","context","useContext","Error","useMaybeBottomSheetManagerContext"],"sourceRoot":"../../src","sources":["BottomSheetManager.provider.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AAEA,IAAAC,mBAAA,GAAAD,OAAA;AAGsC,IAAAE,WAAA,GAAAF,OAAA;AAAA,SAAAD,uBAAAI,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAMtC,SAASG,8BAA8BA,CAAC;EAAEC,EAAE;EAAEC;AAAwB,CAAC,EAAE;EACvE,oBACE,IAAAN,WAAA,CAAAO,GAAA,EAACR,mBAAA,CAAAS,yBAAyB,CAACC,QAAQ;IAAUC,KAAK,EAAE;MAAEC,OAAO,EAAEN;IAAG,CAAE;IAAAC,QAAA,EACjEA;EAAQ,GAD8BD,EAEL,CAAC;AAEzC;AAEO,MAAMO,0BAA0B,GAAAC,OAAA,CAAAD,0BAAA,gBAAGE,cAAK,CAACC,IAAI,CAClDX,8BACF,CAAC;AAEM,MAAMY,4BAA4B,GACvCA,CAAA,KAAsC;EACpC,MAAMC,OAAO,GAAGH,cAAK,CAACI,UAAU,CAACV,6CAAyB,CAAC;EAE3D,IAAI,CAACS,OAAO,EAAE;IACZ,MAAM,IAAIE,KAAK,CACb,+EACF,CAAC;EACH;EACA,OAAOF,OAAO;AAChB,CAAC;AAACJ,OAAA,CAAAG,4BAAA,GAAAA,4BAAA;AAEG,MAAMI,iCAAiC,GAC5CA,CAAA,KAA6C;EAC3C,MAAMH,OAAO,GAAGH,cAAK,CAACI,UAAU,CAACV,6CAAyB,CAAC;EAE3D,IAAI,CAACS,OAAO,EAAE;IACZ,OAAO,IAAI;EACb;EACA,OAAOA,OAAO;AAChB,CAAC;AAACJ,OAAA,CAAAO,iCAAA,GAAAA,iCAAA","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["_BottomSheetHost","require","_BottomSheetManager","_useBottomSheetManager","_useBottomSheetState","_BottomSheetManaged","_ScaleBackgroundWrapper"],"sourceRoot":"../../src","sources":["index.tsx"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,gBAAA,GAAAC,OAAA;AACA,IAAAC,mBAAA,GAAAD,OAAA;AAIA,IAAAE,sBAAA,GAAAF,OAAA;AACA,IAAAG,oBAAA,GAAAH,OAAA;AACA,IAAAI,mBAAA,GAAAJ,OAAA;AACA,IAAAK,uBAAA,GAAAL,OAAA","ignoreList":[]}
1
+ {"version":3,"names":["_BottomSheetHost","require","_BottomSheetManager","_useBottomSheetManager","_useBottomSheetState","_BottomSheetManaged","_ScaleBackgroundWrapper"],"sourceRoot":"../../src","sources":["index.tsx"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,gBAAA,GAAAC,OAAA;AACA,IAAAC,mBAAA,GAAAD,OAAA;AACA,IAAAE,sBAAA,GAAAF,OAAA;AACA,IAAAG,oBAAA,GAAAH,OAAA;AACA,IAAAI,mBAAA,GAAAJ,OAAA;AACA,IAAAK,uBAAA,GAAAL,OAAA","ignoreList":[]}
@@ -1,22 +1,8 @@
1
1
  import React, { type PropsWithChildren } from 'react';
2
2
  import { type BottomSheetManagerContextValue } from './BottomSheetManager.context';
3
- export interface ScaleBackgroundConfig {
4
- /** Scale factor when sheet is open (default: 0.92) */
5
- scale?: number;
6
- /** Vertical translation when sheet is open (default: 10) */
7
- translateY?: number;
8
- /** Border radius when sheet is open (default: 12) */
9
- borderRadius?: number;
10
- /** Animation duration in ms (default: 300) */
11
- duration?: number;
12
- }
13
3
  interface ProviderProps extends PropsWithChildren {
14
4
  id: string;
15
5
  }
16
- /**
17
- * Provider for bottom sheet manager context.
18
- * Use ScaleBackgroundWrapper inside to enable iOS-style scale effect on content.
19
- */
20
6
  declare function BottomSheetManagerProviderComp({ id, children }: ProviderProps): import("react/jsx-runtime").JSX.Element;
21
7
  export declare const BottomSheetManagerProvider: React.MemoExoticComponent<typeof BottomSheetManagerProviderComp>;
22
8
  export declare const useBottomSheetManagerContext: () => BottomSheetManagerContextValue;
@@ -1 +1 @@
1
- {"version":3,"file":"BottomSheetManager.provider.d.ts","sourceRoot":"","sources":["../../../src/BottomSheetManager.provider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,KAAK,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAGtD,OAAO,EAEL,KAAK,8BAA8B,EACpC,MAAM,8BAA8B,CAAC;AAEtC,MAAM,WAAW,qBAAqB;IACpC,sDAAsD;IACtD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,4DAA4D;IAC5D,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,qDAAqD;IACrD,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,8CAA8C;IAC9C,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,UAAU,aAAc,SAAQ,iBAAiB;IAC/C,EAAE,EAAE,MAAM,CAAC;CACZ;AAED;;;GAGG;AACH,iBAAS,8BAA8B,CAAC,EAAE,EAAE,EAAE,QAAQ,EAAE,EAAE,aAAa,2CAMtE;AAED,eAAO,MAAM,0BAA0B,kEAEtC,CAAC;AAEF,eAAO,MAAM,4BAA4B,QACnC,8BASH,CAAC;AAEJ,eAAO,MAAM,iCAAiC,QACxC,8BAA8B,GAAG,IAOpC,CAAC"}
1
+ {"version":3,"file":"BottomSheetManager.provider.d.ts","sourceRoot":"","sources":["../../../src/BottomSheetManager.provider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,KAAK,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAEtD,OAAO,EAEL,KAAK,8BAA8B,EACpC,MAAM,8BAA8B,CAAC;AAEtC,UAAU,aAAc,SAAQ,iBAAiB;IAC/C,EAAE,EAAE,MAAM,CAAC;CACZ;AAED,iBAAS,8BAA8B,CAAC,EAAE,EAAE,EAAE,QAAQ,EAAE,EAAE,aAAa,2CAMtE;AAED,eAAO,MAAM,0BAA0B,kEAEtC,CAAC;AAEF,eAAO,MAAM,4BAA4B,QACnC,8BASH,CAAC;AAEJ,eAAO,MAAM,iCAAiC,QACxC,8BAA8B,GAAG,IAOpC,CAAC"}
@@ -1,7 +1,7 @@
1
1
  export { BottomSheetHost } from './BottomSheetHost';
2
- export { BottomSheetManagerProvider, type ScaleBackgroundConfig, } from './BottomSheetManager.provider';
2
+ export { BottomSheetManagerProvider } from './BottomSheetManager.provider';
3
3
  export { useBottomSheetManager } from './useBottomSheetManager';
4
4
  export { useBottomSheetState } from './useBottomSheetState';
5
5
  export { BottomSheetManaged } from './BottomSheetManaged';
6
- export { ScaleBackgroundWrapper } from './ScaleBackgroundWrapper';
6
+ export { ScaleBackgroundWrapper, type ScaleBackgroundConfig, } from './ScaleBackgroundWrapper';
7
7
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EACL,0BAA0B,EAC1B,KAAK,qBAAqB,GAC3B,MAAM,+BAA+B,CAAC;AACvC,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAChE,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,0BAA0B,EAAE,MAAM,+BAA+B,CAAC;AAC3E,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAChE,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EACL,sBAAsB,EACtB,KAAK,qBAAqB,GAC3B,MAAM,0BAA0B,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-bottom-sheet-stack",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "description": "Bottom Sheet Stack Manager",
5
5
  "source": "./src/index.tsx",
6
6
  "main": "lib/commonjs/index.js",
@@ -1,34 +1,18 @@
1
1
  import React, { type PropsWithChildren } from 'react';
2
- import { StyleSheet, View } from 'react-native';
3
2
 
4
3
  import {
5
4
  BottomSheetManagerContext,
6
5
  type BottomSheetManagerContextValue,
7
6
  } from './BottomSheetManager.context';
8
7
 
9
- export interface ScaleBackgroundConfig {
10
- /** Scale factor when sheet is open (default: 0.92) */
11
- scale?: number;
12
- /** Vertical translation when sheet is open (default: 10) */
13
- translateY?: number;
14
- /** Border radius when sheet is open (default: 12) */
15
- borderRadius?: number;
16
- /** Animation duration in ms (default: 300) */
17
- duration?: number;
18
- }
19
-
20
8
  interface ProviderProps extends PropsWithChildren {
21
9
  id: string;
22
10
  }
23
11
 
24
- /**
25
- * Provider for bottom sheet manager context.
26
- * Use ScaleBackgroundWrapper inside to enable iOS-style scale effect on content.
27
- */
28
12
  function BottomSheetManagerProviderComp({ id, children }: ProviderProps) {
29
13
  return (
30
14
  <BottomSheetManagerContext.Provider key={id} value={{ groupId: id }}>
31
- <View style={styles.container}>{children}</View>
15
+ {children}
32
16
  </BottomSheetManagerContext.Provider>
33
17
  );
34
18
  }
@@ -58,10 +42,3 @@ export const useMaybeBottomSheetManagerContext =
58
42
  }
59
43
  return context;
60
44
  };
61
-
62
- const styles = StyleSheet.create({
63
- container: {
64
- flex: 1,
65
- backgroundColor: '#000',
66
- },
67
- });
package/src/index.tsx CHANGED
@@ -1,9 +1,9 @@
1
1
  export { BottomSheetHost } from './BottomSheetHost';
2
- export {
3
- BottomSheetManagerProvider,
4
- type ScaleBackgroundConfig,
5
- } from './BottomSheetManager.provider';
2
+ export { BottomSheetManagerProvider } from './BottomSheetManager.provider';
6
3
  export { useBottomSheetManager } from './useBottomSheetManager';
7
4
  export { useBottomSheetState } from './useBottomSheetState';
8
5
  export { BottomSheetManaged } from './BottomSheetManaged';
9
- export { ScaleBackgroundWrapper } from './ScaleBackgroundWrapper';
6
+ export {
7
+ ScaleBackgroundWrapper,
8
+ type ScaleBackgroundConfig,
9
+ } from './ScaleBackgroundWrapper';