react-native-bottom-sheet-stack 1.4.1 → 1.4.3
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/README.md
CHANGED
|
@@ -324,7 +324,7 @@ Type for portal sheet IDs. If `BottomSheetPortalRegistry` is augmented, this is
|
|
|
324
324
|
|
|
325
325
|
#### `BottomSheetPortalParams<T>`
|
|
326
326
|
|
|
327
|
-
Type helper to extract params for a given portal sheet ID. Returns `undefined` if the sheet has no params (`true` in registry), or
|
|
327
|
+
Type helper to extract params for a given portal sheet ID. Returns `undefined` if the sheet has no params (`true` in registry), or `ParamType | undefined` if defined (always includes `undefined` since params can be reset).
|
|
328
328
|
|
|
329
329
|
## Example
|
|
330
330
|
|
|
@@ -24,8 +24,9 @@ export type BottomSheetPortalId = keyof BottomSheetPortalRegistry extends never
|
|
|
24
24
|
/**
|
|
25
25
|
* Extract params type for a given portal sheet ID.
|
|
26
26
|
* Returns `undefined` if the sheet has no params (value is `true`).
|
|
27
|
+
* Always includes `undefined` since params can be reset.
|
|
27
28
|
*/
|
|
28
|
-
export type BottomSheetPortalParams<T extends BottomSheetPortalId> = keyof BottomSheetPortalRegistry extends never ? Record<string, unknown> | undefined : T extends keyof BottomSheetPortalRegistry ? BottomSheetPortalRegistry[T] extends true ? undefined : BottomSheetPortalRegistry[T] : Record<string, unknown> | undefined;
|
|
29
|
+
export type BottomSheetPortalParams<T extends BottomSheetPortalId> = keyof BottomSheetPortalRegistry extends never ? Record<string, unknown> | undefined : T extends keyof BottomSheetPortalRegistry ? BottomSheetPortalRegistry[T] extends true ? undefined : BottomSheetPortalRegistry[T] | undefined : Record<string, unknown> | undefined;
|
|
29
30
|
/**
|
|
30
31
|
* Check if a portal sheet has params defined.
|
|
31
32
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"portal.types.d.ts","sourceRoot":"","sources":["../../../src/portal.types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AACH,MAAM,WAAW,yBAAyB;CAAG;AAE7C;;;;GAIG;AACH,MAAM,MAAM,mBAAmB,GAAG,MAAM,yBAAyB,SAAS,KAAK,GAC3E,MAAM,GACN,OAAO,CAAC,MAAM,yBAAyB,EAAE,MAAM,CAAC,CAAC;AAErD
|
|
1
|
+
{"version":3,"file":"portal.types.d.ts","sourceRoot":"","sources":["../../../src/portal.types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AACH,MAAM,WAAW,yBAAyB;CAAG;AAE7C;;;;GAIG;AACH,MAAM,MAAM,mBAAmB,GAAG,MAAM,yBAAyB,SAAS,KAAK,GAC3E,MAAM,GACN,OAAO,CAAC,MAAM,yBAAyB,EAAE,MAAM,CAAC,CAAC;AAErD;;;;GAIG;AACH,MAAM,MAAM,uBAAuB,CAAC,CAAC,SAAS,mBAAmB,IAC/D,MAAM,yBAAyB,SAAS,KAAK,GACzC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,GACnC,CAAC,SAAS,MAAM,yBAAyB,GACvC,yBAAyB,CAAC,CAAC,CAAC,SAAS,IAAI,GACvC,SAAS,GACT,yBAAyB,CAAC,CAAC,CAAC,GAAG,SAAS,GAC1C,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,CAAC;AAE5C;;GAEG;AACH,MAAM,MAAM,SAAS,CAAC,CAAC,SAAS,mBAAmB,IACjD,MAAM,yBAAyB,SAAS,KAAK,GACzC,KAAK,GACL,CAAC,SAAS,MAAM,yBAAyB,GACvC,yBAAyB,CAAC,CAAC,CAAC,SAAS,IAAI,GACvC,KAAK,GACL,IAAI,GACN,KAAK,CAAC"}
|
package/package.json
CHANGED
package/src/portal.types.ts
CHANGED
|
@@ -27,6 +27,7 @@ export type BottomSheetPortalId = keyof BottomSheetPortalRegistry extends never
|
|
|
27
27
|
/**
|
|
28
28
|
* Extract params type for a given portal sheet ID.
|
|
29
29
|
* Returns `undefined` if the sheet has no params (value is `true`).
|
|
30
|
+
* Always includes `undefined` since params can be reset.
|
|
30
31
|
*/
|
|
31
32
|
export type BottomSheetPortalParams<T extends BottomSheetPortalId> =
|
|
32
33
|
keyof BottomSheetPortalRegistry extends never
|
|
@@ -34,7 +35,7 @@ export type BottomSheetPortalParams<T extends BottomSheetPortalId> =
|
|
|
34
35
|
: T extends keyof BottomSheetPortalRegistry
|
|
35
36
|
? BottomSheetPortalRegistry[T] extends true
|
|
36
37
|
? undefined
|
|
37
|
-
: BottomSheetPortalRegistry[T]
|
|
38
|
+
: BottomSheetPortalRegistry[T] | undefined
|
|
38
39
|
: Record<string, unknown> | undefined;
|
|
39
40
|
|
|
40
41
|
/**
|