@tamagui/sheet 1.135.4-1761749240853 → 1.135.4

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 (86) hide show
  1. package/dist/cjs/Sheet.native.js +90 -96
  2. package/dist/cjs/Sheet.native.js.map +6 -1
  3. package/dist/cjs/SheetContext.native.js +18 -21
  4. package/dist/cjs/SheetContext.native.js.map +6 -1
  5. package/dist/cjs/SheetController.cjs +1 -1
  6. package/dist/cjs/SheetController.js +1 -1
  7. package/dist/cjs/SheetController.js.map +1 -1
  8. package/dist/cjs/SheetController.native.js +38 -51
  9. package/dist/cjs/SheetController.native.js.map +6 -1
  10. package/dist/cjs/SheetImplementationCustom.cjs +1 -1
  11. package/dist/cjs/SheetImplementationCustom.js +1 -1
  12. package/dist/cjs/SheetImplementationCustom.js.map +1 -1
  13. package/dist/cjs/SheetImplementationCustom.native.js +312 -362
  14. package/dist/cjs/SheetImplementationCustom.native.js.map +6 -1
  15. package/dist/cjs/SheetScrollView.cjs +1 -1
  16. package/dist/cjs/SheetScrollView.js +1 -1
  17. package/dist/cjs/SheetScrollView.js.map +1 -1
  18. package/dist/cjs/SheetScrollView.native.js +107 -137
  19. package/dist/cjs/SheetScrollView.native.js.map +6 -1
  20. package/dist/cjs/constants.native.js +18 -21
  21. package/dist/cjs/constants.native.js.map +6 -1
  22. package/dist/cjs/contexts.cjs +1 -1
  23. package/dist/cjs/contexts.js +1 -1
  24. package/dist/cjs/contexts.native.js +21 -28
  25. package/dist/cjs/contexts.native.js.map +6 -1
  26. package/dist/cjs/createSheet.native.js +101 -148
  27. package/dist/cjs/createSheet.native.js.map +6 -1
  28. package/dist/cjs/helpers.native.js +17 -20
  29. package/dist/cjs/helpers.native.js.map +6 -1
  30. package/dist/cjs/index.native.js +32 -23
  31. package/dist/cjs/index.native.js.map +6 -1
  32. package/dist/cjs/nativeSheet.native.js +53 -65
  33. package/dist/cjs/nativeSheet.native.js.map +6 -1
  34. package/dist/cjs/types.native.js +5 -9
  35. package/dist/cjs/types.native.js.map +6 -1
  36. package/dist/cjs/useSheet.native.js +17 -21
  37. package/dist/cjs/useSheet.native.js.map +6 -1
  38. package/dist/cjs/useSheetController.cjs +1 -1
  39. package/dist/cjs/useSheetController.js +1 -1
  40. package/dist/cjs/useSheetController.native.js +27 -36
  41. package/dist/cjs/useSheetController.native.js.map +6 -1
  42. package/dist/cjs/useSheetOffscreenSize.native.js +23 -41
  43. package/dist/cjs/useSheetOffscreenSize.native.js.map +6 -1
  44. package/dist/cjs/useSheetOpenState.native.js +30 -44
  45. package/dist/cjs/useSheetOpenState.native.js.map +6 -1
  46. package/dist/cjs/useSheetProviderProps.cjs +1 -1
  47. package/dist/cjs/useSheetProviderProps.js +1 -1
  48. package/dist/cjs/useSheetProviderProps.js.map +1 -1
  49. package/dist/cjs/useSheetProviderProps.native.js +108 -119
  50. package/dist/cjs/useSheetProviderProps.native.js.map +6 -1
  51. package/dist/jsx/Sheet.native.js +84 -114
  52. package/dist/jsx/Sheet.native.js.map +6 -1
  53. package/dist/jsx/SheetContext.native.js +10 -35
  54. package/dist/jsx/SheetContext.native.js.map +6 -1
  55. package/dist/jsx/SheetController.native.js +29 -67
  56. package/dist/jsx/SheetController.native.js.map +6 -1
  57. package/dist/jsx/SheetImplementationCustom.native.js +312 -377
  58. package/dist/jsx/SheetImplementationCustom.native.js.map +6 -1
  59. package/dist/jsx/SheetScrollView.native.js +104 -156
  60. package/dist/jsx/SheetScrollView.native.js.map +6 -1
  61. package/dist/jsx/constants.native.js +8 -35
  62. package/dist/jsx/constants.native.js.map +6 -1
  63. package/dist/jsx/contexts.native.js +9 -45
  64. package/dist/jsx/contexts.native.js.map +6 -1
  65. package/dist/jsx/createSheet.native.js +109 -160
  66. package/dist/jsx/createSheet.native.js.map +6 -1
  67. package/dist/jsx/helpers.native.js +7 -31
  68. package/dist/jsx/helpers.native.js.map +6 -1
  69. package/dist/jsx/index.native.js +12 -31
  70. package/dist/jsx/index.native.js.map +6 -1
  71. package/dist/jsx/nativeSheet.native.js +50 -77
  72. package/dist/jsx/nativeSheet.native.js.map +6 -1
  73. package/dist/jsx/types.native.js +1 -19
  74. package/dist/jsx/types.native.js.map +6 -1
  75. package/dist/jsx/useSheet.native.js +8 -32
  76. package/dist/jsx/useSheet.native.js.map +6 -1
  77. package/dist/jsx/useSheetController.native.js +14 -52
  78. package/dist/jsx/useSheetController.native.js.map +6 -1
  79. package/dist/jsx/useSheetOffscreenSize.native.js +13 -52
  80. package/dist/jsx/useSheetOffscreenSize.native.js.map +6 -1
  81. package/dist/jsx/useSheetOpenState.native.js +22 -55
  82. package/dist/jsx/useSheetOpenState.native.js.map +6 -1
  83. package/dist/jsx/useSheetProviderProps.native.js +98 -135
  84. package/dist/jsx/useSheetProviderProps.native.js.map +6 -1
  85. package/package.json +19 -20
  86. package/types/SheetContext.d.ts.map +1 -1
@@ -1,146 +1,101 @@
1
1
  "use strict";
2
-
3
2
  var __defProp = Object.defineProperty;
4
3
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
4
  var __getOwnPropNames = Object.getOwnPropertyNames;
6
5
  var __hasOwnProp = Object.prototype.hasOwnProperty;
7
6
  var __export = (target, all) => {
8
- for (var name in all) __defProp(target, name, {
9
- get: all[name],
10
- enumerable: !0
11
- });
12
- },
13
- __copyProps = (to, from, except, desc) => {
14
- if (from && typeof from == "object" || typeof from == "function") for (let key of __getOwnPropNames(from)) !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, {
15
- get: () => from[key],
16
- enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
17
- });
18
- return to;
19
- };
20
- var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
21
- value: !0
22
- }), mod);
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: !0 });
9
+ }, __copyProps = (to, from, except, desc) => {
10
+ if (from && typeof from == "object" || typeof from == "function")
11
+ for (let key of __getOwnPropNames(from))
12
+ !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
13
+ return to;
14
+ };
15
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
23
16
  var createSheet_exports = {};
24
17
  __export(createSheet_exports, {
25
18
  createSheet: () => createSheet
26
19
  });
27
20
  module.exports = __toCommonJS(createSheet_exports);
28
- var import_jsx_runtime = require("react/jsx-runtime"),
29
- import_compose_refs = require("@tamagui/compose-refs"),
30
- import_constants = require("@tamagui/constants"),
31
- import_core = require("@tamagui/core"),
32
- import_helpers = require("@tamagui/helpers"),
33
- import_portal = require("@tamagui/portal"),
34
- import_remove_scroll = require("@tamagui/remove-scroll"),
35
- import_use_did_finish_ssr = require("@tamagui/use-did-finish-ssr"),
36
- import_z_index_stack = require("@tamagui/z-index-stack"),
37
- import_react = require("react"),
38
- import_react_native = require("react-native"),
39
- import_constants2 = require("./constants.native.js"),
40
- import_nativeSheet = require("./nativeSheet.native.js"),
41
- import_SheetContext = require("./SheetContext.native.js"),
42
- import_SheetImplementationCustom = require("./SheetImplementationCustom.native.js"),
43
- import_SheetScrollView = require("./SheetScrollView.native.js"),
44
- import_useSheetController = require("./useSheetController.native.js"),
45
- import_useSheetOffscreenSize = require("./useSheetOffscreenSize.native.js");
21
+ var import_jsx_runtime = require("react/jsx-runtime"), import_compose_refs = require("@tamagui/compose-refs"), import_constants = require("@tamagui/constants"), import_core = require("@tamagui/core"), import_helpers = require("@tamagui/helpers"), import_portal = require("@tamagui/portal"), import_remove_scroll = require("@tamagui/remove-scroll"), import_use_did_finish_ssr = require("@tamagui/use-did-finish-ssr"), import_z_index_stack = require("@tamagui/z-index-stack"), import_react = require("react"), import_react_native = require("react-native"), import_constants2 = require("./constants"), import_nativeSheet = require("./nativeSheet"), import_SheetContext = require("./SheetContext"), import_SheetImplementationCustom = require("./SheetImplementationCustom"), import_SheetScrollView = require("./SheetScrollView"), import_useSheetController = require("./useSheetController"), import_useSheetOffscreenSize = require("./useSheetOffscreenSize");
46
22
  function createSheet(param) {
47
- var {
48
- Handle,
49
- Frame,
50
- Overlay
51
- } = param,
52
- SheetHandle = Handle.styleable(function (param2, forwardedRef) {
53
- var {
54
- __scopeSheet,
55
- ...props
56
- } = param2,
57
- context = (0, import_SheetContext.useSheetContext)(import_constants2.SHEET_HANDLE_NAME, __scopeSheet),
58
- composedRef = (0, import_compose_refs.useComposedRefs)(context.handleRef, forwardedRef);
59
- return context.onlyShowFrame ? null :
23
+ var { Handle, Frame, Overlay } = param, SheetHandle = Handle.styleable(function(param2, forwardedRef) {
24
+ var { __scopeSheet, ...props } = param2, context = (0, import_SheetContext.useSheetContext)(import_constants2.SHEET_HANDLE_NAME, __scopeSheet), composedRef = (0, import_compose_refs.useComposedRefs)(context.handleRef, forwardedRef);
25
+ return context.onlyShowFrame ? null : (
60
26
  // @ts-ignore
61
- /* @__PURE__ */
62
- (0, import_jsx_runtime.jsx)(Handle, {
27
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Handle, {
63
28
  ref: composedRef,
64
- onPress: function () {
65
- var max = context.snapPoints.length + (context.dismissOnSnapToBottom ? -1 : 0),
66
- nextPos = (context.position + 1) % max;
29
+ onPress: function() {
30
+ var max = context.snapPoints.length + (context.dismissOnSnapToBottom ? -1 : 0), nextPos = (context.position + 1) % max;
67
31
  context.setPosition(nextPos);
68
32
  },
69
33
  open: context.open,
70
34
  ...props
71
- });
72
- }),
73
- SheetOverlay = Overlay.extractable(/* @__PURE__ */(0, import_react.memo)(function (propsIn) {
74
- var {
75
- __scopeSheet,
76
- ...props
77
- } = propsIn,
78
- context = (0, import_SheetContext.useSheetContext)(import_constants2.SHEET_OVERLAY_NAME, __scopeSheet),
79
- element = (0, import_react.useMemo)(function () {
80
- return (
81
- // @ts-ignore
82
- /* @__PURE__ */
83
- (0, import_jsx_runtime.jsx)(Overlay, {
84
- ...props,
85
- onPress: (0, import_helpers.composeEventHandlers)(props.onPress, context.dismissOnOverlayPress ? function () {
86
- context.setOpen(!1);
87
- } : void 0)
88
- })
89
- );
90
- }, [props.onPress, props.opacity, context.dismissOnOverlayPress]);
91
- return (0, import_constants.useIsomorphicLayoutEffect)(function () {
92
- var _context_onOverlayComponent;
93
- (_context_onOverlayComponent = context.onOverlayComponent) === null || _context_onOverlayComponent === void 0 || _context_onOverlayComponent.call(context, element);
94
- }, [element]), context.onlyShowFrame, null;
95
- })),
96
- SheetFrame = Frame.extractable(/* @__PURE__ */(0, import_react.forwardRef)(function (param2, forwardedRef) {
97
- var {
98
- __scopeSheet,
99
- adjustPaddingForOffscreenContent,
100
- disableHideBottomOverflow,
101
- children,
102
- ...props
103
- } = param2,
104
- context = (0, import_SheetContext.useSheetContext)(import_constants2.SHEET_NAME, __scopeSheet),
105
- {
106
- hasFit,
107
- removeScrollEnabled = !0,
108
- frameSize,
109
- contentRef,
110
- open
111
- } = context,
112
- composedContentRef = (0, import_compose_refs.useComposedRefs)(forwardedRef, contentRef),
113
- offscreenSize = (0, import_useSheetOffscreenSize.useSheetOffscreenSize)(context),
114
- sheetContents = (0, import_react.useMemo)(function () {
115
- return (
116
- // @ts-expect-error
117
- /* @__PURE__ */
118
- (0, import_jsx_runtime.jsxs)(Frame, {
119
- ref: composedContentRef,
120
- flex: hasFit ? 0 : 1,
121
- height: hasFit ? void 0 : frameSize,
122
- pointerEvents: open ? "auto" : "none",
123
- ...props,
124
- children: [/* @__PURE__ */(0, import_jsx_runtime.jsx)(import_z_index_stack.StackZIndexContext, {
125
- zIndex: (0, import_portal.resolveViewZIndex)(props.zIndex),
126
- children
127
- }), adjustPaddingForOffscreenContent && /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_core.Stack, {
128
- "data-sheet-offscreen-pad": !0,
129
- height: offscreenSize,
130
- width: "100%"
131
- })]
35
+ })
36
+ );
37
+ }), SheetOverlay = Overlay.extractable(/* @__PURE__ */ (0, import_react.memo)(function(propsIn) {
38
+ var { __scopeSheet, ...props } = propsIn, context = (0, import_SheetContext.useSheetContext)(import_constants2.SHEET_OVERLAY_NAME, __scopeSheet), element = (0, import_react.useMemo)(function() {
39
+ return (
40
+ // @ts-ignore
41
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Overlay, {
42
+ ...props,
43
+ onPress: (0, import_helpers.composeEventHandlers)(props.onPress, context.dismissOnOverlayPress ? function() {
44
+ context.setOpen(!1);
45
+ } : void 0)
46
+ })
47
+ );
48
+ }, [
49
+ props.onPress,
50
+ props.opacity,
51
+ context.dismissOnOverlayPress
52
+ ]);
53
+ return (0, import_constants.useIsomorphicLayoutEffect)(function() {
54
+ var _context_onOverlayComponent;
55
+ (_context_onOverlayComponent = context.onOverlayComponent) === null || _context_onOverlayComponent === void 0 || _context_onOverlayComponent.call(context, element);
56
+ }, [
57
+ element
58
+ ]), context.onlyShowFrame, null;
59
+ })), SheetFrame = Frame.extractable(/* @__PURE__ */ (0, import_react.forwardRef)(function(param2, forwardedRef) {
60
+ var { __scopeSheet, adjustPaddingForOffscreenContent, disableHideBottomOverflow, children, ...props } = param2, context = (0, import_SheetContext.useSheetContext)(import_constants2.SHEET_NAME, __scopeSheet), { hasFit, removeScrollEnabled = !0, frameSize, contentRef, open } = context, composedContentRef = (0, import_compose_refs.useComposedRefs)(forwardedRef, contentRef), offscreenSize = (0, import_useSheetOffscreenSize.useSheetOffscreenSize)(context), sheetContents = (0, import_react.useMemo)(function() {
61
+ return (
62
+ // @ts-expect-error
63
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Frame, {
64
+ ref: composedContentRef,
65
+ flex: hasFit ? 0 : 1,
66
+ height: hasFit ? void 0 : frameSize,
67
+ pointerEvents: open ? "auto" : "none",
68
+ ...props,
69
+ children: [
70
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_z_index_stack.StackZIndexContext, {
71
+ zIndex: (0, import_portal.resolveViewZIndex)(props.zIndex),
72
+ children
73
+ }),
74
+ adjustPaddingForOffscreenContent && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_core.Stack, {
75
+ "data-sheet-offscreen-pad": !0,
76
+ height: offscreenSize,
77
+ width: "100%"
132
78
  })
133
- );
134
- }, [open, props, frameSize, offscreenSize, adjustPaddingForOffscreenContent, hasFit]);
135
- return /* @__PURE__ */(0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, {
136
- children: [/* @__PURE__ */(0, import_jsx_runtime.jsx)(import_remove_scroll.RemoveScroll, {
79
+ ]
80
+ })
81
+ );
82
+ }, [
83
+ open,
84
+ props,
85
+ frameSize,
86
+ offscreenSize,
87
+ adjustPaddingForOffscreenContent,
88
+ hasFit
89
+ ]);
90
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, {
91
+ children: [
92
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_remove_scroll.RemoveScroll, {
137
93
  enabled: removeScrollEnabled && context.open,
138
94
  children: sheetContents
139
- }), /* below frame hide when bouncing past 100% */
140
- !disableHideBottomOverflow &&
141
- // @ts-ignore
142
- /* @__PURE__ */
143
- (0, import_jsx_runtime.jsx)(Frame, {
95
+ }),
96
+ /* below frame hide when bouncing past 100% */
97
+ !disableHideBottomOverflow && // @ts-ignore
98
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Frame, {
144
99
  ...props,
145
100
  "data-testid": "ensure-sheet-cover-not-overlapping",
146
101
  componentName: "SheetCover",
@@ -155,34 +110,32 @@ function createSheet(param) {
155
110
  borderWidth: 0,
156
111
  borderRadius: 0,
157
112
  shadowOpacity: 0
158
- })]
159
- });
160
- })),
161
- Sheet = /* @__PURE__ */(0, import_react.forwardRef)(function (props, ref) {
162
- var hydrated = (0, import_use_did_finish_ssr.useDidFinishSSR)(),
163
- {
164
- isShowingNonSheet
165
- } = (0, import_useSheetController.useSheetController)(),
166
- SheetImplementation = import_SheetImplementationCustom.SheetImplementationCustom;
167
- if (props.native && import_react_native.Platform.OS === "ios") {
168
- var impl = (0, import_nativeSheet.getNativeSheet)("ios");
169
- impl && (SheetImplementation = impl);
170
- }
171
- return isShowingNonSheet || !hydrated ? null : /* @__PURE__ */(0, import_jsx_runtime.jsx)(SheetImplementation, {
172
- ref,
173
- ...props
174
- });
175
- }),
176
- components = {
177
- Frame: SheetFrame,
178
- Overlay: SheetOverlay,
179
- Handle: SheetHandle,
180
- ScrollView: import_SheetScrollView.SheetScrollView
181
- },
182
- Controlled = (0, import_helpers.withStaticProperties)(Sheet, components);
113
+ })
114
+ ]
115
+ });
116
+ })), Sheet = /* @__PURE__ */ (0, import_react.forwardRef)(function(props, ref) {
117
+ var hydrated = (0, import_use_did_finish_ssr.useDidFinishSSR)(), { isShowingNonSheet } = (0, import_useSheetController.useSheetController)(), SheetImplementation = import_SheetImplementationCustom.SheetImplementationCustom;
118
+ if (props.native && import_react_native.Platform.OS === "ios") {
119
+ var impl = (0, import_nativeSheet.getNativeSheet)("ios");
120
+ impl && (SheetImplementation = impl);
121
+ }
122
+ return isShowingNonSheet || !hydrated ? null : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SheetImplementation, {
123
+ ref,
124
+ ...props
125
+ });
126
+ }), components = {
127
+ Frame: SheetFrame,
128
+ Overlay: SheetOverlay,
129
+ Handle: SheetHandle,
130
+ ScrollView: import_SheetScrollView.SheetScrollView
131
+ }, Controlled = (0, import_helpers.withStaticProperties)(Sheet, components);
183
132
  return (0, import_helpers.withStaticProperties)(Sheet, {
184
133
  ...components,
185
134
  Controlled
186
135
  });
187
136
  }
188
- //# sourceMappingURL=createSheet.native.js.map
137
+ // Annotate the CommonJS export names for ESM import in node:
138
+ 0 && (module.exports = {
139
+ createSheet
140
+ });
141
+ //# sourceMappingURL=createSheet.js.map
@@ -1 +1,6 @@
1
- {"version":3,"names":["__toCommonJS","mod","__copyProps","__defProp","value","createSheet_exports","__export","createSheet","module","exports","import_jsx_runtime","require","import_compose_refs","import_constants","import_core","import_helpers","import_portal","import_remove_scroll","import_use_did_finish_ssr","import_z_index_stack","import_react","import_react_native","import_constants2","import_nativeSheet","import_SheetContext","import_SheetImplementationCustom","import_SheetScrollView","import_useSheetController","import_useSheetOffscreenSize","param","Handle","Frame","Overlay","SheetHandle","styleable","param2","forwardedRef","__scopeSheet","props","context","useSheetContext","SHEET_HANDLE_NAME","composedRef","useComposedRefs","handleRef","onlyShowFrame","jsx","ref","onPress","max","snapPoints","length","dismissOnSnapToBottom","nextPos","position","setPosition","open","SheetOverlay","extractable","memo","propsIn","SHEET_OVERLAY_NAME","element","useMemo","composeEventHandlers","dismissOnOverlayPress","setOpen","opacity","useIsomorphicLayoutEffect","_context_onOverlayComponent","onOverlayComponent","call","SheetFrame","forwardRef","adjustPaddingForOffscreenContent","disableHideBottomOverflow","children","SHEET_NAME","hasFit","removeScrollEnabled","frameSize","contentRef","composedContentRef","offscreenSize","useSheetOffscreenSize","sheetContents","jsxs","flex","height","pointerEvents","StackZIndexContext","zIndex","resolveViewZIndex","Stack","width","Fragment","RemoveScroll","enabled","componentName","bottom","left","right","borderWidth","borderRadius","shadowOpacity","Sheet","hydrated","useDidFinishSSR","isShowingNonSheet","useSheetController","SheetImplementation","SheetImplementationCustom","native","Platform","OS","impl","getNativeSheet","components","ScrollView","SheetScrollView","Controlled","withStaticProperties"],"sources":["../../src/createSheet.tsx"],"sourcesContent":[null],"mappings":";;;;;;;;;;;;;;;;;;;AAAA,IAAAA,YAAA,GAAAC,GAAA,IAAAC,WAAA,CAAAC,SAAA;EAAAC,KAAA;AAAA,IAAAH,GAAA;AAAA,IAAAI,mBAAA;AAAAC,QAAA,CAAAD,mBAAA;EAAAE,WAAA,EAAAA,CAAA,KAAAA;AAAA;AAAAC,MAAA,CAAAC,OAAA,GAAAT,YAAgC,CAAAK,mBAAA;AAuDxB,IAAAK,kBAAA,GAAAC,OAAA;EAAAC,mBAAA,GAAAD,OAAA;EAAAE,gBAAA,GAAAF,OAAA;EAAAG,WAAA,GAAAH,OAAA;EAAAI,cAAA,GAAAJ,OAAA;EAAAK,aAAA,G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MAAM;AAAA,UACN,OAAO;AAAA,UACP,aAAa;AAAA,UACb,cAAc;AAAA,UACd,eAAe;AAAA,QACnB,CAAC;AAAA,MACL;AAAA,IACJ,CAAC;AAAA,EACL,CAAC,CAAC,GACE,QAAsB,6CAAW,SAAe,OAAO,KAAK;AAC5D,QAAI,eAAW,2CAAgB,GAC3B,EAAE,kBAAkB,QAAI,8CAAmB,GAC3C,sBAAsB;AAC1B,QAAI,MAAM,UAAU,6BAAS,OAAO,OAAO;AAEnC,UAAI,WAAO,mCAAe,KAAK;AAC/B,MAAI,SAEA,sBAAsB;AAAA,IAGlC;AAGA,WAAI,qBAAqB,CAAC,WACf,OAEU,uCAAAA,KAAK,qBAAqB;AAAA,MAC3C;AAAA,MACA,GAAG;AAAA,IACP,CAAC;AAAA,EACL,CAAC,GACG,aAAa;AAAA,IACb,OAAO;AAAA,IACP,SAAS;AAAA,IACT,QAAQ;AAAA,IACR,YAAY;AAAA,EAChB,GACI,iBAAa,qCAAqB,OAAO,UAAU;AACvD,aAAO,qCAAqB,OAAO;AAAA,IAC/B,GAAG;AAAA,IACH;AAAA,EACJ,CAAC;AACL;",
5
+ "names": ["import_constants", "param", "_jsx", "_jsxs", "_Fragment"]
6
+ }
@@ -1,25 +1,18 @@
1
1
  "use strict";
2
-
3
2
  var __defProp = Object.defineProperty;
4
3
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
4
  var __getOwnPropNames = Object.getOwnPropertyNames;
6
5
  var __hasOwnProp = Object.prototype.hasOwnProperty;
7
6
  var __export = (target, all) => {
8
- for (var name in all) __defProp(target, name, {
9
- get: all[name],
10
- enumerable: !0
11
- });
12
- },
13
- __copyProps = (to, from, except, desc) => {
14
- if (from && typeof from == "object" || typeof from == "function") for (let key of __getOwnPropNames(from)) !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, {
15
- get: () => from[key],
16
- enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
17
- });
18
- return to;
19
- };
20
- var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
21
- value: !0
22
- }), mod);
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: !0 });
9
+ }, __copyProps = (to, from, except, desc) => {
10
+ if (from && typeof from == "object" || typeof from == "function")
11
+ for (let key of __getOwnPropNames(from))
12
+ !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
13
+ return to;
14
+ };
15
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
23
16
  var helpers_exports = {};
24
17
  __export(helpers_exports, {
25
18
  resisted: () => resisted
@@ -27,9 +20,13 @@ __export(helpers_exports, {
27
20
  module.exports = __toCommonJS(helpers_exports);
28
21
  function resisted(y, minY) {
29
22
  var maxOverflow = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : 25;
30
- if (y >= minY) return y;
31
- var pastBoundary = minY - y,
32
- resistedDistance = Math.sqrt(pastBoundary) * 2;
23
+ if (y >= minY)
24
+ return y;
25
+ var pastBoundary = minY - y, resistedDistance = Math.sqrt(pastBoundary) * 2;
33
26
  return minY - resistedDistance;
34
27
  }
35
- //# sourceMappingURL=helpers.native.js.map
28
+ // Annotate the CommonJS export names for ESM import in node:
29
+ 0 && (module.exports = {
30
+ resisted
31
+ });
32
+ //# sourceMappingURL=helpers.js.map
@@ -1 +1,6 @@
1
- {"version":3,"names":["__toCommonJS","mod","__copyProps","__defProp","value","helpers_exports","__export","resisted","module","exports","y","minY","maxOverflow","arguments","length","pastBoundary","resistedDistance","Math","sqrt"],"sources":["../../src/helpers.tsx"],"sourcesContent":[null],"mappings":";;;;;;;;;;;;;;;;;;;AAAA,IAAAA,YAAA,GAAAC,GAAA,IAAAC,WAAA,CAAAC,SAAA;EAAAC,KAAA;AAAA,IAAAH,GAAA;AAAA,IAAAI,eAAA;AAAAC,QAAA,CAAAD,eAAA;EAAAE,QAAA,EAAAA,CAAA,KAAAA;AAAA;AAAOC,MAAA,CAAAC,OAAS,GAAAT,YAAkC,CAAAK,eAAkB;AAElE,SAAIE,QAAKA,CAAAG,CAAA,EAAAC,IAAA;EACP,IAAAC,WAAO,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,iBAAAA,SAAA;EAIT,IAAAH,CAAA,IAAMC,IAAA,EAQN,OAAOD,CAAA;EACT,IAAAK,YAAA,GAAAJ,IAAA,GAAAD,CAAA;IAAAM,gBAAA,GAAAC,IAAA,CAAAC,IAAA,CAAAH,YAAA","ignoreList":[]}
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/helpers.tsx"],
4
+ "mappings": ";;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAO,SAAS,SAAS,GAAG,MAAM;AAC9B,MAAI,cAAc,UAAU,SAAS,KAAK,UAAU,CAAC,MAAM,SAAS,UAAU,CAAC,IAAI;AAEnF,MAAI,KAAK;AACL,WAAO;AAGX,MAAI,eAAe,OAAO,GAItB,mBAAmB,KAAK,KAAK,YAAY,IAAI;AAEjD,SAAO,OAAO;AAClB;",
5
+ "names": []
6
+ }
@@ -1,31 +1,40 @@
1
1
  "use strict";
2
-
3
2
  var __defProp = Object.defineProperty;
4
3
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
4
  var __getOwnPropNames = Object.getOwnPropertyNames;
6
5
  var __hasOwnProp = Object.prototype.hasOwnProperty;
7
6
  var __copyProps = (to, from, except, desc) => {
8
- if (from && typeof from == "object" || typeof from == "function") for (let key of __getOwnPropNames(from)) !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, {
9
- get: () => from[key],
10
- enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
11
- });
12
- return to;
13
- },
14
- __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
15
- var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
16
- value: !0
17
- }), mod);
7
+ if (from && typeof from == "object" || typeof from == "function")
8
+ for (let key of __getOwnPropNames(from))
9
+ !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
10
+ return to;
11
+ }, __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
12
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
18
13
  var index_exports = {};
19
14
  module.exports = __toCommonJS(index_exports);
20
- __reExport(index_exports, require("./Sheet.native.js"), module.exports);
21
- __reExport(index_exports, require("./useSheet.native.js"), module.exports);
22
- __reExport(index_exports, require("./createSheet.native.js"), module.exports);
23
- __reExport(index_exports, require("./SheetController.native.js"), module.exports);
24
- __reExport(index_exports, require("./useSheetController.native.js"), module.exports);
25
- __reExport(index_exports, require("./useSheetOpenState.native.js"), module.exports);
26
- __reExport(index_exports, require("./useSheetOffscreenSize.native.js"), module.exports);
27
- __reExport(index_exports, require("./SheetScrollView.native.js"), module.exports);
28
- __reExport(index_exports, require("./nativeSheet.native.js"), module.exports);
29
- __reExport(index_exports, require("./types.native.js"), module.exports);
30
- __reExport(index_exports, require("./contexts.native.js"), module.exports);
31
- //# sourceMappingURL=index.native.js.map
15
+ __reExport(index_exports, require("./Sheet"), module.exports);
16
+ __reExport(index_exports, require("./useSheet"), module.exports);
17
+ __reExport(index_exports, require("./createSheet"), module.exports);
18
+ __reExport(index_exports, require("./SheetController"), module.exports);
19
+ __reExport(index_exports, require("./useSheetController"), module.exports);
20
+ __reExport(index_exports, require("./useSheetOpenState"), module.exports);
21
+ __reExport(index_exports, require("./useSheetOffscreenSize"), module.exports);
22
+ __reExport(index_exports, require("./SheetScrollView"), module.exports);
23
+ __reExport(index_exports, require("./nativeSheet"), module.exports);
24
+ __reExport(index_exports, require("./types"), module.exports);
25
+ __reExport(index_exports, require("./contexts"), module.exports);
26
+ // Annotate the CommonJS export names for ESM import in node:
27
+ 0 && (module.exports = {
28
+ ...require("./Sheet"),
29
+ ...require("./useSheet"),
30
+ ...require("./createSheet"),
31
+ ...require("./SheetController"),
32
+ ...require("./useSheetController"),
33
+ ...require("./useSheetOpenState"),
34
+ ...require("./useSheetOffscreenSize"),
35
+ ...require("./SheetScrollView"),
36
+ ...require("./nativeSheet"),
37
+ ...require("./types"),
38
+ ...require("./contexts")
39
+ });
40
+ //# sourceMappingURL=index.js.map
@@ -1 +1,6 @@
1
- {"version":3,"names":["__toCommonJS","mod","__copyProps","__defProp","value","index_exports","module","exports","__reExport","require"],"sources":["../../src/index.ts"],"sourcesContent":[null],"mappings":";;;;;;;;;;;;;;AAAA,IAAAA,YAAA,GAAAC,GAAA,IAAAC,WAAA,CAAAC,SAAA;EAAAC,KAAA;AAAA,IAAAH,GAAA;AAAA,IAAAI,aAAA;AAAAC,MAAA,CAAAC,OAAA,GAAAP,YAAc,CAAAK,aAAA;AACdG,UAAA,CAAAH,aAAA,EAAcI,OAAA,uBAAAH,MADd,CAAAC,OAAA;AAEAC,UAAA,CAAAH,aAAA,EAAcI,OAAA,0BAAAH,MAFd,CAAAC,OAAA;AAGAC,UAAA,CAAAH,aAAA,EAAcI,OAAA,6BAAAH,MAHd,CAAAC,OAAA;AAIAC,UAAA,CAAAH,aAAA,EAAcI,OAAA,iCAAAH,MAJd,CAAAC,OAAA;AAKAC,UAAA,CAAAH,aAAA,EAAcI,OAAA,oCALdH,MAAA,CAAAC,OAAA;AAMAC,UAAA,CAAAH,aAAA,EAAcI,OAAA,mCAAAH,MANd,CAAAC,OAAA;AAOAC,UAAA,CAAAH,aAAA,EAAcI,OAAA,oCAPd,GAAAH,MAAA,CAAAC,OAAA;AAQAC,UAAA,CAAAH,aAAA,EAAcI,OAAA,8BARd,GAAAH,MAAA,CAAAC,OAAA;AASAC,UAAA,CAAAH,aAAA,EAAcI,OAAA,0BATd,GAAAH,MAAA,CAAAC,OAAA;AAUAC,UAAA,CAAAH,aAAA,EAAcI,OAAA,uBAAAH,MAVd,CAAAC,OAAA","ignoreList":[]}
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/index.ts"],
4
+ "mappings": ";;;;;;;;;;;;AAAA;AAAA;AAAA,0BAAc,oBAAd;AACA,0BAAc,uBADd;AAEA,0BAAc,0BAFd;AAGA,0BAAc,8BAHd;AAIA,0BAAc,iCAJd;AAKA,0BAAc,gCALd;AAMA,0BAAc,oCANd;AAOA,0BAAc,8BAPd;AAQA,0BAAc,0BARd;AASA,0BAAc,oBATd;AAUA,0BAAc,uBAVd;",
5
+ "names": []
6
+ }
@@ -1,58 +1,35 @@
1
1
  "use strict";
2
-
3
2
  var __defProp = Object.defineProperty;
4
3
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
4
  var __getOwnPropNames = Object.getOwnPropertyNames;
6
5
  var __hasOwnProp = Object.prototype.hasOwnProperty;
7
6
  var __export = (target, all) => {
8
- for (var name in all) __defProp(target, name, {
9
- get: all[name],
10
- enumerable: !0
11
- });
12
- },
13
- __copyProps = (to, from, except, desc) => {
14
- if (from && typeof from == "object" || typeof from == "function") for (let key of __getOwnPropNames(from)) !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, {
15
- get: () => from[key],
16
- enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
17
- });
18
- return to;
19
- };
20
- var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
21
- value: !0
22
- }), mod);
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: !0 });
9
+ }, __copyProps = (to, from, except, desc) => {
10
+ if (from && typeof from == "object" || typeof from == "function")
11
+ for (let key of __getOwnPropNames(from))
12
+ !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
13
+ return to;
14
+ };
15
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
23
16
  var nativeSheet_exports = {};
24
17
  __export(nativeSheet_exports, {
25
18
  getNativeSheet: () => getNativeSheet,
26
19
  setupNativeSheet: () => setupNativeSheet
27
20
  });
28
21
  module.exports = __toCommonJS(nativeSheet_exports);
29
- var import_jsx_runtime = require("react/jsx-runtime"),
30
- import_stacks = require("@tamagui/stacks"),
31
- import_react = require("react"),
32
- import_react_native = require("react-native"),
33
- import_SheetContext = require("./SheetContext.native.js"),
34
- import_useSheetOpenState = require("./useSheetOpenState.native.js"),
35
- import_useSheetProviderProps = require("./useSheetProviderProps.native.js"),
36
- nativeSheets = {
37
- ios: null
38
- };
22
+ var import_jsx_runtime = require("react/jsx-runtime"), import_stacks = require("@tamagui/stacks"), import_react = require("react"), import_react_native = require("react-native"), import_SheetContext = require("./SheetContext"), import_useSheetOpenState = require("./useSheetOpenState"), import_useSheetProviderProps = require("./useSheetProviderProps"), nativeSheets = {
23
+ ios: null
24
+ };
39
25
  function getNativeSheet(platform) {
40
26
  return nativeSheets[platform];
41
27
  }
42
28
  function setupNativeSheet(platform, RNIOSModal) {
43
- var {
44
- ModalSheetView,
45
- ModalSheetViewMainContent
46
- } = RNIOSModal;
47
- platform === "ios" && (nativeSheets[platform] = function (props) {
48
- var state = (0, import_useSheetOpenState.useSheetOpenState)(props),
49
- providerProps = (0, import_useSheetProviderProps.useSheetProviderProps)(props, state),
50
- {
51
- open,
52
- setOpen
53
- } = state,
54
- ref = (0, import_react.useRef)(void 0);
55
- (0, import_react.useEffect)(function () {
29
+ var { ModalSheetView, ModalSheetViewMainContent } = RNIOSModal;
30
+ platform === "ios" && (nativeSheets[platform] = function(props) {
31
+ var state = (0, import_useSheetOpenState.useSheetOpenState)(props), providerProps = (0, import_useSheetProviderProps.useSheetProviderProps)(props, state), { open, setOpen } = state, ref = (0, import_react.useRef)(void 0);
32
+ (0, import_react.useEffect)(function() {
56
33
  if (open) {
57
34
  var _ref_current;
58
35
  (_ref_current = ref.current) === null || _ref_current === void 0 || _ref_current.presentModal();
@@ -60,42 +37,53 @@ function setupNativeSheet(platform, RNIOSModal) {
60
37
  var _ref_current1;
61
38
  (_ref_current1 = ref.current) === null || _ref_current1 === void 0 || _ref_current1.dismissModal();
62
39
  }
63
- }, [open]);
40
+ }, [
41
+ open
42
+ ]);
64
43
  function setOpenInternal(next) {
65
44
  var _props_onOpenChange;
66
45
  (_props_onOpenChange = props.onOpenChange) === null || _props_onOpenChange === void 0 || _props_onOpenChange.call(props, open), setOpen(next);
67
46
  }
68
- return /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_jsx_runtime.Fragment, {
69
- children: /* @__PURE__ */(0, import_jsx_runtime.jsxs)(import_SheetContext.SheetProvider, {
47
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_jsx_runtime.Fragment, {
48
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_SheetContext.SheetProvider, {
70
49
  setHasScrollView: emptyFn,
71
50
  ...providerProps,
72
51
  onlyShowFrame: !0,
73
- children: [/* @__PURE__ */(0, import_jsx_runtime.jsx)(ModalSheetView, {
74
- ref,
75
- onModalDidDismiss: function () {
76
- return setOpenInternal(!1);
77
- },
78
- children: /* @__PURE__ */(0, import_jsx_runtime.jsx)(ModalSheetViewMainContent, {
79
- children: /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_react_native.View, {
80
- style: {
81
- flex: 1
82
- },
83
- children: props.children
52
+ children: [
53
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ModalSheetView, {
54
+ ref,
55
+ onModalDidDismiss: function() {
56
+ return setOpenInternal(!1);
57
+ },
58
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ModalSheetViewMainContent, {
59
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_native.View, {
60
+ style: {
61
+ flex: 1
62
+ },
63
+ children: props.children
64
+ })
84
65
  })
66
+ }),
67
+ /* for some reason select triggers wont show on native if this isn't inside the actual tree not inside implementation... */
68
+ /* so just hiding it here for now... not great... */
69
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_stacks.YStack, {
70
+ position: "absolute",
71
+ opacity: 0,
72
+ pointerEvents: "none",
73
+ width: 0,
74
+ height: 0,
75
+ children: props.children
85
76
  })
86
- }), /* for some reason select triggers wont show on native if this isn't inside the actual tree not inside implementation... */
87
- /* so just hiding it here for now... not great... */
88
- /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_stacks.YStack, {
89
- position: "absolute",
90
- opacity: 0,
91
- pointerEvents: "none",
92
- width: 0,
93
- height: 0,
94
- children: props.children
95
- })]
77
+ ]
96
78
  })
97
79
  });
98
80
  });
99
81
  }
100
- var emptyFn = function () {};
101
- //# sourceMappingURL=nativeSheet.native.js.map
82
+ var emptyFn = function() {
83
+ };
84
+ // Annotate the CommonJS export names for ESM import in node:
85
+ 0 && (module.exports = {
86
+ getNativeSheet,
87
+ setupNativeSheet
88
+ });
89
+ //# sourceMappingURL=nativeSheet.js.map
@@ -1 +1,6 @@
1
- {"version":3,"names":["__toCommonJS","mod","__copyProps","__defProp","value","nativeSheet_exports","__export","getNativeSheet","setupNativeSheet","module","exports","import_jsx_runtime","require","import_stacks","import_react","import_react_native","import_SheetContext","import_useSheetOpenState","import_useSheetProviderProps","nativeSheets","ios","platform","RNIOSModal","ModalSheetView","ModalSheetViewMainContent","props","state","useSheetOpenState","providerProps","useSheetProviderProps","open","setOpen","ref","useRef","useEffect","_ref_current","current","presentModal","_ref_current1","dismissModal","setOpenInternal","next","_props_onOpenChange","onOpenChange","call","jsx","Fragment","children","jsxs","SheetProvider","setHasScrollView","emptyFn","onlyShowFrame","onModalDidDismiss"],"sources":["../../src/nativeSheet.tsx"],"sourcesContent":[null],"mappings":";;;;;;;;;;;;;;;;;;;AAAA,IAAAA,YAAA,GAAAC,GAAA,IAAAC,WAAA,CAAAC,SAAA;EAAAC,KAAA;AAAA,IAAAH,GAAA;AAAA,IAAAI,mBAAA;AAAAC,QAAA,CAAAD,mBAAA;EAAAE,cAAA,EAAAA,CAAA,KAAAA,cA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