Skip to content

Commit

Permalink
0.5.0
Browse files Browse the repository at this point in the history
  • Loading branch information
iliubinskii committed Feb 24, 2024
1 parent ab266de commit c09b162
Show file tree
Hide file tree
Showing 54 changed files with 133 additions and 36 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,13 @@ All notable changes to this project will be documented in this file. Dates are d

Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).

#### [v0.5.0](https://github.com/iliubinskii/react-native-misc/compare/v0.4.0...v0.5.0)

> 24 February 2024
- feat: Explicitly mark worklets [`1ad7be4`](https://github.com/iliubinskii/react-native-misc/commit/1ad7be48e65445cb4a62281fc42a344a890eea17)
- fix(DateTimePicker): For not seeing global interfaces [`ab266de`](https://github.com/iliubinskii/react-native-misc/commit/ab266deb789369dc150064b77150d4ba7e9ce67b)

#### [v0.4.0](https://github.com/iliubinskii/react-native-misc/compare/v0.3.0...v0.4.0)

> 24 February 2024
Expand Down
2 changes: 1 addition & 1 deletion dist/components/CandlestickChart/CandlestickChart.d.ts.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions dist/components/CandlestickChart/CandlestickChart.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,17 @@ exports.default = (0, react_misc_1.memo)("CandlestickChart", ({ data, initialRan
.enabled(enabled)
.minDistance(core_1.consts.Gesture.pan.minDistance)
.onBegin(({ numberOfPointers, translationX }) => {
"worklet";
pan0.value = pan.value;
panNumberOfPointers.value = numberOfPointers;
panTranslationX.value = translationX;
})
.onStart(() => {
"worklet";
(0, react_native_reanimated_1.runOnJS)(hideSnackbar)();
})
.onUpdate(({ numberOfPointers, translationX }) => {
"worklet";
if (numberOfPointers <= 1) {
if (panNumberOfPointers.value === numberOfPointers) {
// No need to restart
Expand All @@ -65,14 +68,17 @@ exports.default = (0, react_misc_1.memo)("CandlestickChart", ({ data, initialRan
}), react_native_gesture_handler_1.Gesture.Pinch()
.enabled(enabled)
.onBegin(({ numberOfPointers, scale }) => {
"worklet";
pan0.value = pan.value;
panNumberOfPointers.value = numberOfPointers;
panScale.value = scale;
})
.onStart(() => {
"worklet";
(0, react_native_reanimated_1.runOnJS)(hideSnackbar)();
})
.onUpdate(({ numberOfPointers, scale }) => {
"worklet";
if (numberOfPointers >= 2) {
if (panNumberOfPointers.value === numberOfPointers) {
// No need to restart
Expand All @@ -94,6 +100,7 @@ exports.default = (0, react_misc_1.memo)("CandlestickChart", ({ data, initialRan
(0, react_native_reanimated_1.runOnJS)(updateRange)();
}
})), react_native_gesture_handler_1.Gesture.Tap().onEnd(({ x }) => {
"worklet";
const dataWidth = width - paddingStart - paddingEnd;
const barCount = pan0.value[1] - pan0.value[0];
const barWidth = dataWidth / barCount;
Expand Down
2 changes: 1 addition & 1 deletion dist/components/CandlestickChart/CandlestickChart.jsx.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/components/DateTimePicker/Calendar/index.d.ts.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions dist/components/DateTimePicker/Calendar/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -80,12 +80,15 @@ exports.default = (0, react_misc_1.memo)("Calendar", ({ SelectDateRangeHint = co
const gesture = React.useMemo(() => react_native_gesture_handler_1.Gesture.Pan()
.minDistance(core_1.consts.Gesture.pan.minDistance)
.onBegin(({ x, y }) => {
"worklet";
setRange(x, y, GestureStep.start);
})
.onUpdate(({ x, y }) => {
"worklet";
setRange(x, y, GestureStep.update);
})
.onFinalize(({ x, y }) => {
"worklet";
setRange(x, y, GestureStep.end);
}), [setRange]);
(0, react_misc_1.useRealEffect)(() => {
Expand Down
Loading

0 comments on commit c09b162

Please sign in to comment.