zkit-ui 2.0.13 → 2.0.15
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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ActionDialog.d.ts","sourceRoot":"","sources":["../../../src/services/ActionDialogService/ActionDialog.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAyC/B,OAAO,KAAK,EAIV,iBAAiB,EACjB,eAAe,EAGhB,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"ActionDialog.d.ts","sourceRoot":"","sources":["../../../src/services/ActionDialogService/ActionDialog.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAyC/B,OAAO,KAAK,EAIV,iBAAiB,EACjB,eAAe,EAGhB,MAAM,SAAS,CAAC;AA8oBjB,eAAO,MAAM,YAAY,sFAA+B,CAAC"}
|
|
@@ -95,6 +95,9 @@ const BAR_ACTION_BUTTON_LAYOUT = {
|
|
|
95
95
|
minHeight: BAR_FOOTER_HEIGHT,
|
|
96
96
|
paddingVertical: 0,
|
|
97
97
|
};
|
|
98
|
+
// tsc emits CommonJS namespace imports. Capturing that namespace in a worklet
|
|
99
|
+
// also captures the native Worklets module, which is not serializable.
|
|
100
|
+
const scheduleOnRNFromUI = react_native_worklets_1.scheduleOnRN;
|
|
98
101
|
function getKeyboardTopInWindow(event) {
|
|
99
102
|
var _a, _b;
|
|
100
103
|
const windowHeight = react_native_1.Dimensions.get('window').height;
|
|
@@ -235,7 +238,7 @@ const ActionDialogRoot = React.forwardRef(function ActionDialog({ accessibilityL
|
|
|
235
238
|
cardScale.value = (0, react_native_reanimated_1.withTiming)(motion === 'scale' ? CARD_EXIT_SCALE : 1, EXIT_CARD_TIMING);
|
|
236
239
|
cardOpacity.value = (0, react_native_reanimated_1.withTiming)(0, EXIT_CARD_TIMING, (finished) => {
|
|
237
240
|
if (finished) {
|
|
238
|
-
(
|
|
241
|
+
scheduleOnRNFromUI(finishDismiss);
|
|
239
242
|
}
|
|
240
243
|
});
|
|
241
244
|
}, [actualOpen, backdropProgress, cardOpacity, cardScale, finishDismiss, motion]);
|
|
@@ -422,12 +425,16 @@ const ActionDialogRoot = React.forwardRef(function ActionDialog({ accessibilityL
|
|
|
422
425
|
if (resolvedDismiss.backPress)
|
|
423
426
|
dismissWithReason('back');
|
|
424
427
|
}, pointerEvents: actualOpen ? 'auto' : 'none', style: [
|
|
425
|
-
hostMode === 'inline' ?
|
|
428
|
+
hostMode === 'inline' ? react_native_1.StyleSheet.absoluteFill : styles.modalRoot,
|
|
426
429
|
{
|
|
427
430
|
elevation: react_native_1.Platform.OS === 'android' ? (_b = layer === null || layer === void 0 ? void 0 : layer.zIndex) !== null && _b !== void 0 ? _b : shared_1.ACTION_DIALOG_DEFAULT_Z_INDEX : 0,
|
|
428
431
|
zIndex: (_c = layer === null || layer === void 0 ? void 0 : layer.zIndex) !== null && _c !== void 0 ? _c : shared_1.ACTION_DIALOG_DEFAULT_Z_INDEX,
|
|
429
432
|
},
|
|
430
|
-
], testID: testID, children: [(0, jsx_runtime_1.jsx)(react_native_1.Pressable, { accessible: false, onPress: handleOverlayPress, style: react_native_1.StyleSheet.absoluteFill, children: (0, jsx_runtime_1.jsx)(react_native_reanimated_1.default.View, { pointerEvents: "none", style: [
|
|
433
|
+
], testID: testID, children: [(0, jsx_runtime_1.jsx)(react_native_1.Pressable, { accessible: false, onPress: handleOverlayPress, style: react_native_1.StyleSheet.absoluteFill, children: (0, jsx_runtime_1.jsx)(react_native_reanimated_1.default.View, { pointerEvents: "none", style: [
|
|
434
|
+
react_native_1.StyleSheet.absoluteFill,
|
|
435
|
+
{ backgroundColor: resolvedColors.backdrop },
|
|
436
|
+
overlayStyle,
|
|
437
|
+
] }) }), (0, jsx_runtime_1.jsx)(react_native_1.View, { pointerEvents: "box-none", style: [
|
|
431
438
|
styles.center,
|
|
432
439
|
{
|
|
433
440
|
paddingBottom: Math.max(insets.bottom, (0, zkit_tools_1.wp)(16)),
|
|
@@ -475,12 +482,6 @@ const styles = react_native_1.StyleSheet.create({
|
|
|
475
482
|
modalRoot: {
|
|
476
483
|
flex: 1,
|
|
477
484
|
},
|
|
478
|
-
inlineRoot: {
|
|
479
|
-
...react_native_1.StyleSheet.absoluteFillObject,
|
|
480
|
-
},
|
|
481
|
-
backdrop: {
|
|
482
|
-
...react_native_1.StyleSheet.absoluteFillObject,
|
|
483
|
-
},
|
|
484
485
|
center: {
|
|
485
486
|
alignItems: 'center',
|
|
486
487
|
flex: 1,
|
package/package.json
CHANGED
|
@@ -104,6 +104,9 @@ const BAR_ACTION_BUTTON_LAYOUT: React.ComponentProps<typeof Button>['layout'] =
|
|
|
104
104
|
minHeight: BAR_FOOTER_HEIGHT,
|
|
105
105
|
paddingVertical: 0,
|
|
106
106
|
};
|
|
107
|
+
// tsc emits CommonJS namespace imports. Capturing that namespace in a worklet
|
|
108
|
+
// also captures the native Worklets module, which is not serializable.
|
|
109
|
+
const scheduleOnRNFromUI = scheduleOnRN;
|
|
107
110
|
|
|
108
111
|
function getKeyboardTopInWindow(event: KeyboardEvent) {
|
|
109
112
|
const windowHeight = Dimensions.get('window').height;
|
|
@@ -288,7 +291,7 @@ const ActionDialogRoot = React.forwardRef<ActionDialogRef, ActionDialogProps>(fu
|
|
|
288
291
|
cardScale.value = withTiming(motion === 'scale' ? CARD_EXIT_SCALE : 1, EXIT_CARD_TIMING);
|
|
289
292
|
cardOpacity.value = withTiming(0, EXIT_CARD_TIMING, (finished) => {
|
|
290
293
|
if (finished) {
|
|
291
|
-
|
|
294
|
+
scheduleOnRNFromUI(finishDismiss);
|
|
292
295
|
}
|
|
293
296
|
});
|
|
294
297
|
}, [actualOpen, backdropProgress, cardOpacity, cardScale, finishDismiss, motion]);
|
|
@@ -570,7 +573,7 @@ const ActionDialogRoot = React.forwardRef<ActionDialogRef, ActionDialogProps>(fu
|
|
|
570
573
|
}}
|
|
571
574
|
pointerEvents={actualOpen ? 'auto' : 'none'}
|
|
572
575
|
style={[
|
|
573
|
-
hostMode === 'inline' ?
|
|
576
|
+
hostMode === 'inline' ? StyleSheet.absoluteFill : styles.modalRoot,
|
|
574
577
|
{
|
|
575
578
|
elevation: Platform.OS === 'android' ? layer?.zIndex ?? ACTION_DIALOG_DEFAULT_Z_INDEX : 0,
|
|
576
579
|
zIndex: layer?.zIndex ?? ACTION_DIALOG_DEFAULT_Z_INDEX,
|
|
@@ -581,7 +584,11 @@ const ActionDialogRoot = React.forwardRef<ActionDialogRef, ActionDialogProps>(fu
|
|
|
581
584
|
<Pressable accessible={false} onPress={handleOverlayPress} style={StyleSheet.absoluteFill}>
|
|
582
585
|
<Animated.View
|
|
583
586
|
pointerEvents="none"
|
|
584
|
-
style={[
|
|
587
|
+
style={[
|
|
588
|
+
StyleSheet.absoluteFill,
|
|
589
|
+
{ backgroundColor: resolvedColors.backdrop },
|
|
590
|
+
overlayStyle,
|
|
591
|
+
]}
|
|
585
592
|
/>
|
|
586
593
|
</Pressable>
|
|
587
594
|
|
|
@@ -700,12 +707,6 @@ const styles = StyleSheet.create({
|
|
|
700
707
|
modalRoot: {
|
|
701
708
|
flex: 1,
|
|
702
709
|
},
|
|
703
|
-
inlineRoot: {
|
|
704
|
-
...StyleSheet.absoluteFillObject,
|
|
705
|
-
},
|
|
706
|
-
backdrop: {
|
|
707
|
-
...StyleSheet.absoluteFillObject,
|
|
708
|
-
},
|
|
709
710
|
center: {
|
|
710
711
|
alignItems: 'center',
|
|
711
712
|
flex: 1,
|