react-native-swipeable-actions 0.1.6 → 0.1.7-canary.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.
- package/build/Swipeable.d.ts +1 -1
- package/build/Swipeable.d.ts.map +1 -1
- package/build/Swipeable.js +2 -2
- package/build/Swipeable.js.map +1 -1
- package/build/Swipeable.types.d.ts +2 -2
- package/build/Swipeable.types.d.ts.map +1 -1
- package/build/SwipeableActions.d.ts +2 -2
- package/build/SwipeableActions.d.ts.map +1 -1
- package/build/SwipeableActions.js +0 -4
- package/build/SwipeableActions.js.map +1 -1
- package/build/SwipeableView.d.ts +1 -1
- package/build/SwipeableView.d.ts.map +1 -1
- package/build/SwipeableView.js +1 -1
- package/build/SwipeableView.js.map +1 -1
- package/build/index.d.ts +4 -4
- package/build/index.d.ts.map +1 -1
- package/build/index.js +6 -6
- package/build/index.js.map +1 -1
- package/ios/SwipeableView.swift +18 -73
- package/jestSetup.js +2 -1
- package/package.json +8 -13
- package/src/Swipeable.tsx +10 -11
- package/src/Swipeable.types.ts +2 -2
- package/src/SwipeableActions.tsx +1 -1
- package/src/SwipeableView.tsx +3 -3
- package/src/index.ts +8 -11
package/build/Swipeable.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { SwipeableMethods, SwipeableProps } from './Swipeable.types';
|
|
2
2
|
declare const Swipeable: import("react").ForwardRefExoticComponent<Omit<SwipeableProps, "ref"> & import("react").RefAttributes<SwipeableMethods>>;
|
|
3
3
|
type SwipeableWithStatic = typeof Swipeable & {
|
|
4
4
|
open: (recyclingKey: string) => void;
|
package/build/Swipeable.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Swipeable.d.ts","sourceRoot":"","sources":["../src/Swipeable.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Swipeable.d.ts","sourceRoot":"","sources":["../src/Swipeable.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAEV,gBAAgB,EAChB,cAAc,EAGf,MAAM,mBAAmB,CAAA;AAe1B,QAAA,MAAM,SAAS,0HAiJb,CAAA;AAgBF,KAAK,mBAAmB,GAAG,OAAO,SAAS,GAAG;IAC5C,IAAI,EAAE,CAAC,YAAY,EAAE,MAAM,KAAK,IAAI,CAAA;IACpC,KAAK,EAAE,CAAC,YAAY,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,OAAO,KAAK,IAAI,CAAA;IACzD,QAAQ,EAAE,CAAC,QAAQ,CAAC,EAAE,OAAO,KAAK,IAAI,CAAA;CACvC,CAAA;AAED,QAAA,MAAM,eAAe,EAAgB,mBAAmB,CAAA;AAsBxD,eAAe,eAAe,CAAA"}
|
package/build/Swipeable.js
CHANGED
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const react_1 = require("react");
|
|
4
4
|
const react_native_1 = require("react-native");
|
|
5
|
-
const SwipeableView_1 = require("./SwipeableView");
|
|
6
|
-
const SwipeableActions_1 = require("./SwipeableActions");
|
|
7
5
|
const constants_1 = require("./constants");
|
|
8
6
|
const nativeModuleUtils_1 = require("./nativeModuleUtils");
|
|
7
|
+
const SwipeableActions_1 = require("./SwipeableActions");
|
|
8
|
+
const SwipeableView_1 = require("./SwipeableView");
|
|
9
9
|
function normalizeRecyclingKey(key) {
|
|
10
10
|
if (key == null)
|
|
11
11
|
return undefined;
|
package/build/Swipeable.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Swipeable.js","sourceRoot":"","sources":["../src/Swipeable.tsx"],"names":[],"mappings":";;AAAA,iCAAiG;AACjG,+CAAyD;
|
|
1
|
+
{"version":3,"file":"Swipeable.js","sourceRoot":"","sources":["../src/Swipeable.tsx"],"names":[],"mappings":";;AAAA,iCAAiG;AACjG,+CAAyD;AACzD,2CAA4C;AAC5C,2DAAkF;AAQlF,yDAAqD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EAAE;QACT,uDAAuD;QACvD,8DAA8D;QAC9D,QAAQ,EAAE,uBAAQ,CAAC,EAAE,KAAK,KAAK,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,SAAS;KACvD;IACD,OAAO,EAAE;QACP,KAAK,EAAE,MAAM;KACd;CACF,CAAC,CAAA;AAEF,SAAS,CAAC,WAAW,GAAG,WAAW,CAAA;AASnC,MAAM,eAAe,GAAG,SAAgC,CAAA;AAExD,eAAe,CAAC,IAAI,GAAG,CAAC,YAAoB,EAAE,EAAE;IAC9C,IAAI,OAAO,IAAI,CAAC,CAAC,YAAY,IAAI,OAAO,YAAY,KAAK,QAAQ,CAAC,EAAE,CAAC;QACnE,OAAO,CAAC,IAAI,CAAC,0DAA0D,CAAC,CAAA;QACxE,OAAM;IACR,CAAC;IACD,IAAA,6BAAS,EAAC,YAAY,CAAC,CAAA;AACzB,CAAC,CAAA;AAED,eAAe,CAAC,KAAK,GAAG,CAAC,YAAoB,EAAE,QAAkB,EAAE,EAAE;IACnE,IAAI,OAAO,IAAI,CAAC,CAAC,YAAY,IAAI,OAAO,YAAY,KAAK,QAAQ,CAAC,EAAE,CAAC;QACnE,OAAO,CAAC,IAAI,CAAC,2DAA2D,CAAC,CAAA;QACzE,OAAM;IACR,CAAC;IACD,IAAA,8BAAU,EAAC,YAAY,EAAE,QAAQ,CAAC,CAAA;AACpC,CAAC,CAAA;AAED,eAAe,CAAC,QAAQ,GAAG,CAAC,QAAkB,EAAE,EAAE;IAChD,IAAA,4BAAQ,EAAC,QAAQ,CAAC,CAAA;AACpB,CAAC,CAAA;AAED,kBAAe,eAAe,CAAA"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ReactNode, Ref } from 'react';
|
|
2
|
-
import {
|
|
1
|
+
import type { ReactNode, Ref } from 'react';
|
|
2
|
+
import type { StyleProp, ViewProps, ViewStyle } from 'react-native';
|
|
3
3
|
export interface SwipeProgressEvent {
|
|
4
4
|
nativeEvent: {
|
|
5
5
|
progress: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Swipeable.types.d.ts","sourceRoot":"","sources":["../src/Swipeable.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,GAAG,EAAE,MAAM,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"Swipeable.types.d.ts","sourceRoot":"","sources":["../src/Swipeable.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,GAAG,EAAE,MAAM,OAAO,CAAA;AAC3C,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAA;AAEnE,MAAM,WAAW,kBAAkB;IACjC,WAAW,EAAE;QACX,QAAQ,EAAE,MAAM,CAAA;QAChB,YAAY,EAAE,MAAM,CAAA;KACrB,CAAA;CACF;AAED,MAAM,WAAW,eAAe;IAC9B,WAAW,EAAE;QACX,KAAK,EAAE,MAAM,GAAG,QAAQ,CAAA;KACzB,CAAA;CACF;AAED,MAAM,WAAW,kBAAkB;IACjC,KAAK,EAAE,CAAC,QAAQ,CAAC,EAAE,OAAO,KAAK,OAAO,CAAC,IAAI,CAAC,CAAA;IAC5C,IAAI,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAA;CAC1B;AAED,MAAM,WAAW,kBAAmB,SAAQ,SAAS;IACnD,YAAY,EAAE,MAAM,CAAA;IACpB,eAAe,CAAC,EAAE,MAAM,GAAG,OAAO,CAAA;IAClC,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,cAAc,CAAC,EAAE,OAAO,CAAA;IACxB,kBAAkB,CAAC,EAAE,MAAM,CAAA;IAC3B,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,eAAe,CAAC,EAAE,CAAC,KAAK,EAAE,kBAAkB,KAAK,IAAI,CAAA;IACrD,YAAY,CAAC,EAAE,MAAM,IAAI,CAAA;IACzB,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,GAAG,MAAM,CAAA;CAC/B;AAED,MAAM,WAAW,gBAAgB;IAC/B,KAAK,EAAE,CAAC,QAAQ,CAAC,EAAE,OAAO,KAAK,IAAI,CAAA;IACnC,IAAI,EAAE,MAAM,IAAI,CAAA;CACjB;AAED,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,CAAC,YAAY,EAAE,MAAM,KAAK,IAAI,CAAA;IACpC,KAAK,EAAE,CAAC,YAAY,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,OAAO,KAAK,IAAI,CAAA;IACzD,QAAQ,EAAE,CAAC,QAAQ,CAAC,EAAE,OAAO,KAAK,IAAI,CAAA;CACvC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
2
|
/**
|
|
3
3
|
* Props for SwipeableActions component
|
|
4
4
|
*/
|
|
@@ -15,5 +15,5 @@ export interface SwipeableActionsProps {
|
|
|
15
15
|
*
|
|
16
16
|
* Handles entrance animation when children mount.
|
|
17
17
|
*/
|
|
18
|
-
export declare function SwipeableActions({ children, actionsPosition, testID }: SwipeableActionsProps):
|
|
18
|
+
export declare function SwipeableActions({ children, actionsPosition, testID }: SwipeableActionsProps): import("react").JSX.Element;
|
|
19
19
|
//# sourceMappingURL=SwipeableActions.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SwipeableActions.d.ts","sourceRoot":"","sources":["../src/SwipeableActions.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"SwipeableActions.d.ts","sourceRoot":"","sources":["../src/SwipeableActions.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAGtC;;GAEG;AACH,MAAM,WAAW,qBAAqB;IACpC,kCAAkC;IAClC,QAAQ,EAAE,SAAS,CAAA;IACnB,6CAA6C;IAC7C,eAAe,EAAE,MAAM,GAAG,OAAO,CAAA;IACjC,8BAA8B;IAC9B,MAAM,CAAC,EAAE,MAAM,CAAA;CAChB;AAED;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,EAAE,QAAQ,EAAE,eAAe,EAAE,MAAM,EAAE,EAAE,qBAAqB,+BAU5F"}
|
|
@@ -1,10 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
3
|
exports.SwipeableActions = SwipeableActions;
|
|
7
|
-
const react_1 = __importDefault(require("react"));
|
|
8
4
|
const react_native_1 = require("react-native");
|
|
9
5
|
/**
|
|
10
6
|
* SwipeableActions - Internal layout component for swipeable actions
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SwipeableActions.js","sourceRoot":"","sources":["../src/SwipeableActions.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"SwipeableActions.js","sourceRoot":"","sources":["../src/SwipeableActions.tsx"],"names":[],"mappings":";;AAoBA,4CAUC;AA7BD,+CAA+C;AAc/C;;;;GAIG;AACH,SAAgB,gBAAgB,CAAC,EAAE,QAAQ,EAAE,eAAe,EAAE,MAAM,EAAyB;IAC3F,OAAO,CACL,CAAC,mBAAI,CACH,KAAK,CAAC,CAAC,eAAe,KAAK,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC,CAAC,MAAM,CAAC,eAAe,CAAC,CACnF,aAAa,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,CAC1C,MAAM,CAAC,CAAC,MAAM,CAAC,CAEf;MAAA,CAAC,QAAQ,CACX;IAAA,EAAE,mBAAI,CAAC,CACR,CAAA;AACH,CAAC;AAED,MAAM,MAAM,GAAG,yBAAU,CAAC,MAAM,CAAC;IAC/B,eAAe,EAAE;QACf,GAAG,yBAAU,CAAC,YAAY;QAC1B,aAAa,EAAE,KAAK;QACpB,cAAc,EAAE,UAAU;KAC3B;IACD,cAAc,EAAE;QACd,GAAG,yBAAU,CAAC,YAAY;QAC1B,aAAa,EAAE,KAAK;QACpB,cAAc,EAAE,YAAY;KAC7B;CACF,CAAC,CAAA"}
|
package/build/SwipeableView.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { NativeSwipeableRef, SwipeableViewProps } from './Swipeable.types';
|
|
2
2
|
interface SwipeableNativeModule {
|
|
3
3
|
openByKey: (key: string) => void;
|
|
4
4
|
closeByKey: (key: string, animated?: boolean) => void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SwipeableView.d.ts","sourceRoot":"","sources":["../src/SwipeableView.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAA;
|
|
1
|
+
{"version":3,"file":"SwipeableView.d.ts","sourceRoot":"","sources":["../src/SwipeableView.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAA;AAK/E,UAAU,qBAAqB;IAC7B,SAAS,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAA;IAChC,UAAU,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,OAAO,KAAK,IAAI,CAAA;IACrD,QAAQ,EAAE,CAAC,QAAQ,CAAC,EAAE,OAAO,KAAK,IAAI,CAAA;IACtC,WAAW,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAA;CACtC;AAED,eAAO,MAAM,eAAe,uBAA0D,CAAA;AAEtF,eAAO,MAAM,aAAa,mHAIzB,CAAA"}
|
package/build/SwipeableView.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.SwipeableView = exports.SwipeableModule = void 0;
|
|
4
|
-
const react_1 = require("react");
|
|
5
4
|
const expo_modules_core_1 = require("expo-modules-core");
|
|
5
|
+
const react_1 = require("react");
|
|
6
6
|
const NativeView = (0, expo_modules_core_1.requireNativeViewManager)('Swipeable');
|
|
7
7
|
exports.SwipeableModule = (0, expo_modules_core_1.requireNativeModule)('Swipeable');
|
|
8
8
|
exports.SwipeableView = (0, react_1.forwardRef)(function SwipeableView(props, ref) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SwipeableView.js","sourceRoot":"","sources":["../src/SwipeableView.tsx"],"names":[],"mappings":";;;AAAA,
|
|
1
|
+
{"version":3,"file":"SwipeableView.js","sourceRoot":"","sources":["../src/SwipeableView.tsx"],"names":[],"mappings":";;;AAAA,yDAAiF;AACjF,iCAAsE;AAGtE,MAAM,UAAU,GAAG,IAAA,4CAAwB,EAAqB,WAAW,CAAC,CAAA;AAU/D,QAAA,eAAe,GAAG,IAAA,uCAAmB,EAAwB,WAAW,CAAC,CAAA;AAEzE,QAAA,aAAa,GAAG,IAAA,kBAAU,EACrC,SAAS,aAAa,CAAC,KAAK,EAAE,GAAG;IAC/B,OAAO,IAAA,qBAAa,EAAC,UAAU,EAAE,EAAE,GAAG,KAAK,EAAE,GAAG,EAAuC,CAAC,CAAA;AAC1F,CAAC,CACF,CAAA;AAED,qBAAa,CAAC,WAAW,GAAG,eAAe,CAAA"}
|
package/build/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
+
export { SWIPE_DEFAULTS, SWIPE_PROGRESS } from './constants';
|
|
2
|
+
export type { NativeModuleError, SwipeableErrorHandler } from './nativeModuleUtils';
|
|
3
|
+
export { setGlobalErrorHandler } from './nativeModuleUtils';
|
|
1
4
|
export { default as Swipeable } from './Swipeable';
|
|
5
|
+
export type { NativeSwipeableRef, SwipeableMethods, SwipeableProps, SwipeableStatic, SwipeableViewProps, SwipeProgressEvent, SwipeStateEvent } from './Swipeable.types';
|
|
2
6
|
export { SwipeableView } from './SwipeableView';
|
|
3
|
-
export type { SwipeableProps, SwipeableMethods, SwipeableStatic, SwipeableViewProps, SwipeProgressEvent, SwipeStateEvent, NativeSwipeableRef } from './Swipeable.types';
|
|
4
|
-
export { SWIPE_PROGRESS, SWIPE_DEFAULTS } from './constants';
|
|
5
|
-
export { setGlobalErrorHandler } from './nativeModuleUtils';
|
|
6
|
-
export type { SwipeableErrorHandler, NativeModuleError } from './nativeModuleUtils';
|
|
7
7
|
//# sourceMappingURL=index.d.ts.map
|
package/build/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,aAAa,CAAA;AAC5D,YAAY,EAAE,iBAAiB,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAA;AAEnF,OAAO,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAA;AAC3D,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,aAAa,CAAA;AAClD,YAAY,EACV,kBAAkB,EAClB,gBAAgB,EAChB,cAAc,EACd,eAAe,EACf,kBAAkB,EAClB,kBAAkB,EAClB,eAAe,EAChB,MAAM,mBAAmB,CAAA;AAC1B,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAA"}
|
package/build/index.js
CHANGED
|
@@ -3,15 +3,15 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.
|
|
7
|
-
var Swipeable_1 = require("./Swipeable");
|
|
8
|
-
Object.defineProperty(exports, "Swipeable", { enumerable: true, get: function () { return __importDefault(Swipeable_1).default; } });
|
|
9
|
-
var SwipeableView_1 = require("./SwipeableView");
|
|
10
|
-
Object.defineProperty(exports, "SwipeableView", { enumerable: true, get: function () { return SwipeableView_1.SwipeableView; } });
|
|
6
|
+
exports.SwipeableView = exports.Swipeable = exports.setGlobalErrorHandler = exports.SWIPE_PROGRESS = exports.SWIPE_DEFAULTS = void 0;
|
|
11
7
|
var constants_1 = require("./constants");
|
|
12
|
-
Object.defineProperty(exports, "SWIPE_PROGRESS", { enumerable: true, get: function () { return constants_1.SWIPE_PROGRESS; } });
|
|
13
8
|
Object.defineProperty(exports, "SWIPE_DEFAULTS", { enumerable: true, get: function () { return constants_1.SWIPE_DEFAULTS; } });
|
|
9
|
+
Object.defineProperty(exports, "SWIPE_PROGRESS", { enumerable: true, get: function () { return constants_1.SWIPE_PROGRESS; } });
|
|
14
10
|
// Error handling utilities
|
|
15
11
|
var nativeModuleUtils_1 = require("./nativeModuleUtils");
|
|
16
12
|
Object.defineProperty(exports, "setGlobalErrorHandler", { enumerable: true, get: function () { return nativeModuleUtils_1.setGlobalErrorHandler; } });
|
|
13
|
+
var Swipeable_1 = require("./Swipeable");
|
|
14
|
+
Object.defineProperty(exports, "Swipeable", { enumerable: true, get: function () { return __importDefault(Swipeable_1).default; } });
|
|
15
|
+
var SwipeableView_1 = require("./SwipeableView");
|
|
16
|
+
Object.defineProperty(exports, "SwipeableView", { enumerable: true, get: function () { return SwipeableView_1.SwipeableView; } });
|
|
17
17
|
//# sourceMappingURL=index.js.map
|
package/build/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;AAAA,yCAA4D;AAAnD,2GAAA,cAAc,OAAA;AAAE,2GAAA,cAAc,OAAA;AAEvC,2BAA2B;AAC3B,yDAA2D;AAAlD,0HAAA,qBAAqB,OAAA;AAC9B,yCAAkD;AAAzC,uHAAA,OAAO,OAAa;AAU7B,iDAA+C;AAAtC,8GAAA,aAAa,OAAA"}
|
package/ios/SwipeableView.swift
CHANGED
|
@@ -31,23 +31,13 @@ public class SwipeableView: ExpoView {
|
|
|
31
31
|
return typeName.contains("SurfaceTouchHandler") || typeName.contains("RCTTouchHandler")
|
|
32
32
|
}
|
|
33
33
|
|
|
34
|
-
///
|
|
35
|
-
///
|
|
36
|
-
|
|
37
|
-
private static func isRNGHGestureHandler(_ recognizer: UIGestureRecognizer) -> Bool {
|
|
38
|
-
let typeName = String(describing: type(of: recognizer))
|
|
39
|
-
return typeName.hasPrefix("RNBetter") || typeName.hasPrefix("RNManualActivation")
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
/// Walk from a hit-tested view up to (but not including) self, checking for RNGH recognizers.
|
|
43
|
-
/// Used to prevent our pan gesture from beginning when the touch landed on a RNGH-managed view.
|
|
44
|
-
private func hasRNGHGesture(from view: UIView) -> Bool {
|
|
34
|
+
/// Walk from a hit-tested view up to (but not including) self, checking for gesture recognizers.
|
|
35
|
+
/// Any child view with a gesture recognizer (RNGH, custom, etc.) takes priority over our pan.
|
|
36
|
+
private func hasChildGesture(from view: UIView) -> Bool {
|
|
45
37
|
var current: UIView? = view
|
|
46
38
|
while let v = current, v !== self {
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
return true
|
|
50
|
-
}
|
|
39
|
+
if !(v.gestureRecognizers ?? []).isEmpty {
|
|
40
|
+
return true
|
|
51
41
|
}
|
|
52
42
|
current = v.superview
|
|
53
43
|
}
|
|
@@ -57,9 +47,7 @@ public class SwipeableView: ExpoView {
|
|
|
57
47
|
// MARK: - Thread-Safe Static Registry
|
|
58
48
|
|
|
59
49
|
private static let registryQueue = DispatchQueue(label: "com.swipeable.registry", qos: .userInteractive)
|
|
60
|
-
private static let maxCacheSize = 1000
|
|
61
50
|
private static var _openStateCache: [String: Bool] = [:]
|
|
62
|
-
private static var _openStateCacheOrder: [String] = []
|
|
63
51
|
private static var _viewRegistry: [String: WeakRef<SwipeableView>] = [:]
|
|
64
52
|
|
|
65
53
|
static func getOpenState(for key: String) -> Bool {
|
|
@@ -67,17 +55,7 @@ public class SwipeableView: ExpoView {
|
|
|
67
55
|
}
|
|
68
56
|
|
|
69
57
|
private static func setOpenState(for key: String, isOpen: Bool) {
|
|
70
|
-
registryQueue.async(flags: .barrier) {
|
|
71
|
-
if _openStateCache[key] == nil {
|
|
72
|
-
_openStateCacheOrder.append(key)
|
|
73
|
-
}
|
|
74
|
-
_openStateCache[key] = isOpen
|
|
75
|
-
// Evict oldest entries when cache exceeds max size
|
|
76
|
-
while _openStateCacheOrder.count > maxCacheSize {
|
|
77
|
-
let oldest = _openStateCacheOrder.removeFirst()
|
|
78
|
-
_openStateCache.removeValue(forKey: oldest)
|
|
79
|
-
}
|
|
80
|
-
}
|
|
58
|
+
registryQueue.async(flags: .barrier) { _openStateCache[key] = isOpen }
|
|
81
59
|
}
|
|
82
60
|
|
|
83
61
|
private static func getView(for key: String) -> SwipeableView? {
|
|
@@ -313,17 +291,17 @@ public class SwipeableView: ExpoView {
|
|
|
313
291
|
currentAnimator = nil
|
|
314
292
|
isAnimating = false
|
|
315
293
|
|
|
316
|
-
//
|
|
294
|
+
// Reset layer properties to prevent corruption
|
|
295
|
+
contentView?.transform = .identity
|
|
296
|
+
contentView?.layer.zPosition = 0
|
|
297
|
+
actionsView?.transform = .identity
|
|
298
|
+
actionsView?.layer.zPosition = 0
|
|
299
|
+
|
|
300
|
+
// Unregister from static registry and clear cached state
|
|
317
301
|
if let key = recyclingKey {
|
|
318
302
|
Self.unregisterView(for: key)
|
|
303
|
+
Self.clearOpenState(for: key)
|
|
319
304
|
}
|
|
320
|
-
|
|
321
|
-
// Note: transforms and zPositions are NOT reset here.
|
|
322
|
-
// Fabric may remove and re-insert views during list reorder (DELETE+INSERT),
|
|
323
|
-
// which triggers this callback. Resetting transforms would cause open
|
|
324
|
-
// swipeables to visually close even though native state (isOpen,
|
|
325
|
-
// currentTranslation) remains correct. The recyclingKey setter handles
|
|
326
|
-
// resetting transforms when the view is actually recycled for a new item.
|
|
327
305
|
}
|
|
328
306
|
super.willMove(toSuperview: newSuperview)
|
|
329
307
|
}
|
|
@@ -351,28 +329,6 @@ public class SwipeableView: ExpoView {
|
|
|
351
329
|
panGesture.view?.removeGestureRecognizer(panGesture)
|
|
352
330
|
addGestureRecognizer(panGesture)
|
|
353
331
|
}
|
|
354
|
-
|
|
355
|
-
// Restore visual state after Fabric reorder (DELETE+INSERT cycle).
|
|
356
|
-
// Fabric may reset child transforms during prop reconciliation. Re-apply
|
|
357
|
-
// on next runloop tick to ensure we run after Fabric finishes mutations.
|
|
358
|
-
if isOpen && currentTranslation != 0 {
|
|
359
|
-
DispatchQueue.main.async { [weak self] in
|
|
360
|
-
guard let self = self,
|
|
361
|
-
self.isOpen,
|
|
362
|
-
self.currentTranslation != 0,
|
|
363
|
-
!self.isDragging,
|
|
364
|
-
!self.isAnimating else { return }
|
|
365
|
-
self.contentView?.transform = CGAffineTransform(translationX: self.currentTranslation, y: 0)
|
|
366
|
-
self.contentView?.layer.zPosition = 1
|
|
367
|
-
self.actionsView?.layer.zPosition = -1
|
|
368
|
-
self.updateActionsTransform()
|
|
369
|
-
}
|
|
370
|
-
|
|
371
|
-
// Restart autoClose timer if it was cancelled during detach
|
|
372
|
-
if autoClose {
|
|
373
|
-
scheduleAutoClose()
|
|
374
|
-
}
|
|
375
|
-
}
|
|
376
332
|
}
|
|
377
333
|
|
|
378
334
|
public override func hitTest(_ point: CGPoint, with event: UIEvent?) -> UIView? {
|
|
@@ -563,17 +519,6 @@ public class SwipeableView: ExpoView {
|
|
|
563
519
|
if currentTranslation != 0 {
|
|
564
520
|
contentView?.transform = CGAffineTransform(translationX: currentTranslation, y: 0)
|
|
565
521
|
updateActionsTransform()
|
|
566
|
-
|
|
567
|
-
// Fabric may reset child transforms during prop reconciliation after a list
|
|
568
|
-
// reorder. The async dispatch ensures we run after Fabric finishes mutations.
|
|
569
|
-
DispatchQueue.main.async { [weak self] in
|
|
570
|
-
guard let self = self,
|
|
571
|
-
self.currentTranslation != 0,
|
|
572
|
-
!self.isDragging,
|
|
573
|
-
!self.isAnimating else { return }
|
|
574
|
-
self.contentView?.transform = CGAffineTransform(translationX: self.currentTranslation, y: 0)
|
|
575
|
-
self.updateActionsTransform()
|
|
576
|
-
}
|
|
577
522
|
}
|
|
578
523
|
}
|
|
579
524
|
|
|
@@ -930,11 +875,11 @@ extension SwipeableView: UIGestureRecognizerDelegate {
|
|
|
930
875
|
let shouldBegin = isOpen || (isLeading ? velocity.x > 0 : velocity.x < 0)
|
|
931
876
|
|
|
932
877
|
if shouldBegin {
|
|
933
|
-
// Prevent our pan from starting when the touch is on a
|
|
934
|
-
//
|
|
935
|
-
// so we
|
|
878
|
+
// Prevent our pan from starting when the touch is on a child view that has
|
|
879
|
+
// its own gesture recognizers (e.g. RNGH). Delegate-based conflict resolution
|
|
880
|
+
// doesn't work with RNGH (it overrides delegates), so we yield via hit-test.
|
|
936
881
|
let touchPoint = pan.location(in: self)
|
|
937
|
-
if let hitView = super.hitTest(touchPoint, with: nil),
|
|
882
|
+
if let hitView = super.hitTest(touchPoint, with: nil), hasChildGesture(from: hitView) {
|
|
938
883
|
return false
|
|
939
884
|
}
|
|
940
885
|
cancelFabricTouches()
|
package/jestSetup.js
CHANGED
|
@@ -5,7 +5,8 @@ jest.mock('./src/SwipeableView.tsx', () => {
|
|
|
5
5
|
const SwipeableModule = {
|
|
6
6
|
openByKey: jest.fn(),
|
|
7
7
|
closeByKey: jest.fn(),
|
|
8
|
-
closeAll: jest.fn()
|
|
8
|
+
closeAll: jest.fn(),
|
|
9
|
+
isOpenByKey: jest.fn().mockReturnValue(false)
|
|
9
10
|
}
|
|
10
11
|
|
|
11
12
|
const SwipeableView = React.forwardRef((props, ref) => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-native-swipeable-actions",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.7-canary.1",
|
|
4
4
|
"description": "High-performance native swipeable row component for React Native using Expo Modules",
|
|
5
5
|
"main": "src/index.ts",
|
|
6
6
|
"types": "build/index.d.ts",
|
|
@@ -27,10 +27,11 @@
|
|
|
27
27
|
"test:all": "npm test && npm run test:ios && npm run test:android",
|
|
28
28
|
"test:watch": "jest --watch",
|
|
29
29
|
"test:coverage": "jest --coverage",
|
|
30
|
-
"lint": "
|
|
31
|
-
"lint:fix": "
|
|
32
|
-
"format": "
|
|
33
|
-
"format:check": "
|
|
30
|
+
"lint": "biome lint src example e2e",
|
|
31
|
+
"lint:fix": "biome lint --write src example e2e",
|
|
32
|
+
"format": "biome format --write src example e2e",
|
|
33
|
+
"format:check": "biome format src example e2e",
|
|
34
|
+
"check": "biome check src example e2e",
|
|
34
35
|
"typecheck": "tsc --noEmit",
|
|
35
36
|
"android": "expo run:android",
|
|
36
37
|
"ios": "expo run:ios",
|
|
@@ -64,19 +65,13 @@
|
|
|
64
65
|
"react-native": ">=0.73.0"
|
|
65
66
|
},
|
|
66
67
|
"devDependencies": {
|
|
68
|
+
"@biomejs/biome": "2.4.9",
|
|
67
69
|
"@testing-library/react-native": "^12.4.0",
|
|
68
70
|
"@types/jest": "^29.5.0",
|
|
69
71
|
"@types/react": "19.1.1",
|
|
70
|
-
"@typescript-eslint/eslint-plugin": "^6.0.0",
|
|
71
|
-
"@typescript-eslint/parser": "^6.0.0",
|
|
72
|
-
"eslint": "^8.57.0",
|
|
73
|
-
"eslint-config-prettier": "^9.1.0",
|
|
74
|
-
"eslint-plugin-react": "^7.34.0",
|
|
75
|
-
"eslint-plugin-react-hooks": "^4.6.0",
|
|
76
72
|
"expo-modules-core": "^3.0.26",
|
|
77
73
|
"jest": "^29.7.0",
|
|
78
|
-
"prettier": "^3.
|
|
79
|
-
"prettier-config-holepunch": "^2.0.0",
|
|
74
|
+
"prettier": "^3.8.1",
|
|
80
75
|
"react": "19.1.1",
|
|
81
76
|
"react-native": "0.82.1",
|
|
82
77
|
"react-test-renderer": "19.1.1",
|
package/src/Swipeable.tsx
CHANGED
|
@@ -1,17 +1,16 @@
|
|
|
1
|
-
import { forwardRef,
|
|
2
|
-
import { StyleSheet, View
|
|
3
|
-
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
SwipeableProps,
|
|
1
|
+
import { forwardRef, useCallback, useEffect, useImperativeHandle, useRef, useState } from 'react'
|
|
2
|
+
import { Platform, StyleSheet, View } from 'react-native'
|
|
3
|
+
import { SWIPE_DEFAULTS } from './constants'
|
|
4
|
+
import { closeAll, closeByKey, isOpenByKey, openByKey } from './nativeModuleUtils'
|
|
5
|
+
import type {
|
|
6
|
+
NativeSwipeableRef,
|
|
8
7
|
SwipeableMethods,
|
|
8
|
+
SwipeableProps,
|
|
9
9
|
SwipeProgressEvent,
|
|
10
|
-
SwipeStateEvent
|
|
11
|
-
NativeSwipeableRef
|
|
10
|
+
SwipeStateEvent
|
|
12
11
|
} from './Swipeable.types'
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
12
|
+
import { SwipeableActions } from './SwipeableActions'
|
|
13
|
+
import { SwipeableView } from './SwipeableView'
|
|
15
14
|
|
|
16
15
|
function normalizeRecyclingKey(key: string | number | undefined): string | undefined {
|
|
17
16
|
if (key == null) return undefined
|
package/src/Swipeable.types.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ReactNode, Ref } from 'react'
|
|
2
|
-
import {
|
|
1
|
+
import type { ReactNode, Ref } from 'react'
|
|
2
|
+
import type { StyleProp, ViewProps, ViewStyle } from 'react-native'
|
|
3
3
|
|
|
4
4
|
export interface SwipeProgressEvent {
|
|
5
5
|
nativeEvent: {
|
package/src/SwipeableActions.tsx
CHANGED
package/src/SwipeableView.tsx
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { requireNativeModule, requireNativeViewManager } from 'expo-modules-core'
|
|
2
|
+
import { type ComponentProps, createElement, forwardRef } from 'react'
|
|
3
|
+
import type { NativeSwipeableRef, SwipeableViewProps } from './Swipeable.types'
|
|
4
4
|
|
|
5
5
|
const NativeView = requireNativeViewManager<SwipeableViewProps>('Swipeable')
|
|
6
6
|
|
package/src/index.ts
CHANGED
|
@@ -1,18 +1,15 @@
|
|
|
1
|
+
export { SWIPE_DEFAULTS, SWIPE_PROGRESS } from './constants'
|
|
2
|
+
export type { NativeModuleError, SwipeableErrorHandler } from './nativeModuleUtils'
|
|
3
|
+
// Error handling utilities
|
|
4
|
+
export { setGlobalErrorHandler } from './nativeModuleUtils'
|
|
1
5
|
export { default as Swipeable } from './Swipeable'
|
|
2
|
-
export { SwipeableView } from './SwipeableView'
|
|
3
|
-
|
|
4
6
|
export type {
|
|
5
|
-
|
|
7
|
+
NativeSwipeableRef,
|
|
6
8
|
SwipeableMethods,
|
|
9
|
+
SwipeableProps,
|
|
7
10
|
SwipeableStatic,
|
|
8
11
|
SwipeableViewProps,
|
|
9
12
|
SwipeProgressEvent,
|
|
10
|
-
SwipeStateEvent
|
|
11
|
-
NativeSwipeableRef
|
|
13
|
+
SwipeStateEvent
|
|
12
14
|
} from './Swipeable.types'
|
|
13
|
-
|
|
14
|
-
export { SWIPE_PROGRESS, SWIPE_DEFAULTS } from './constants'
|
|
15
|
-
|
|
16
|
-
// Error handling utilities
|
|
17
|
-
export { setGlobalErrorHandler } from './nativeModuleUtils'
|
|
18
|
-
export type { SwipeableErrorHandler, NativeModuleError } from './nativeModuleUtils'
|
|
15
|
+
export { SwipeableView } from './SwipeableView'
|