gesture-kit-transform 1.0.0

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.
@@ -0,0 +1,11 @@
1
+ /**
2
+ * Compress Gesture - Detects compress transforms
3
+ * @module gestures
4
+ */
5
+ import React from 'react';
6
+ export interface CompressGestureProps {
7
+ children: React.ReactNode;
8
+ enabled?: boolean;
9
+ [key: string]: any;
10
+ }
11
+ export declare const CompressGesture: React.FC<CompressGestureProps>;
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ /**
3
+ * Compress Gesture - Detects compress transforms
4
+ * @module gestures
5
+ */
6
+ var __importDefault = (this && this.__importDefault) || function (mod) {
7
+ return (mod && mod.__esModule) ? mod : { "default": mod };
8
+ };
9
+ Object.defineProperty(exports, "__esModule", { value: true });
10
+ exports.CompressGesture = void 0;
11
+ const react_1 = __importDefault(require("react"));
12
+ const react_native_1 = require("react-native");
13
+ const CompressGesture = ({ children, enabled = true, ...rest }) => {
14
+ // TODO: Implement Compress Gesture logic
15
+ return react_1.default.createElement(react_native_1.View, { ...rest }, children);
16
+ };
17
+ exports.CompressGesture = CompressGesture;
18
+ exports.CompressGesture.displayName = 'CompressGesture';
@@ -0,0 +1,11 @@
1
+ /**
2
+ * Pinch Gesture - Detects pinch in/out
3
+ * @module gestures
4
+ */
5
+ import React from 'react';
6
+ export interface PinchGestureProps {
7
+ children: React.ReactNode;
8
+ enabled?: boolean;
9
+ [key: string]: any;
10
+ }
11
+ export declare const PinchGesture: React.FC<PinchGestureProps>;
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ /**
3
+ * Pinch Gesture - Detects pinch in/out
4
+ * @module gestures
5
+ */
6
+ var __importDefault = (this && this.__importDefault) || function (mod) {
7
+ return (mod && mod.__esModule) ? mod : { "default": mod };
8
+ };
9
+ Object.defineProperty(exports, "__esModule", { value: true });
10
+ exports.PinchGesture = void 0;
11
+ const react_1 = __importDefault(require("react"));
12
+ const react_native_1 = require("react-native");
13
+ const PinchGesture = ({ children, enabled = true, ...rest }) => {
14
+ // TODO: Implement Pinch Gesture logic
15
+ return react_1.default.createElement(react_native_1.View, { ...rest }, children);
16
+ };
17
+ exports.PinchGesture = PinchGesture;
18
+ exports.PinchGesture.displayName = 'PinchGesture';
@@ -0,0 +1,11 @@
1
+ /**
2
+ * Pinch Rotate Gesture - Detects simultaneous pinch and rotate
3
+ * @module gestures
4
+ */
5
+ import React from 'react';
6
+ export interface PinchRotateGestureProps {
7
+ children: React.ReactNode;
8
+ enabled?: boolean;
9
+ [key: string]: any;
10
+ }
11
+ export declare const PinchRotateGesture: React.FC<PinchRotateGestureProps>;
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ /**
3
+ * Pinch Rotate Gesture - Detects simultaneous pinch and rotate
4
+ * @module gestures
5
+ */
6
+ var __importDefault = (this && this.__importDefault) || function (mod) {
7
+ return (mod && mod.__esModule) ? mod : { "default": mod };
8
+ };
9
+ Object.defineProperty(exports, "__esModule", { value: true });
10
+ exports.PinchRotateGesture = void 0;
11
+ const react_1 = __importDefault(require("react"));
12
+ const react_native_1 = require("react-native");
13
+ const PinchRotateGesture = ({ children, enabled = true, ...rest }) => {
14
+ // TODO: Implement Pinch Rotate Gesture logic
15
+ return react_1.default.createElement(react_native_1.View, { ...rest }, children);
16
+ };
17
+ exports.PinchRotateGesture = PinchRotateGesture;
18
+ exports.PinchRotateGesture.displayName = 'PinchRotateGesture';
@@ -0,0 +1,11 @@
1
+ /**
2
+ * Rotation Gesture - Detects rotation
3
+ * @module gestures
4
+ */
5
+ import React from 'react';
6
+ export interface RotationGestureProps {
7
+ children: React.ReactNode;
8
+ enabled?: boolean;
9
+ [key: string]: any;
10
+ }
11
+ export declare const RotationGesture: React.FC<RotationGestureProps>;
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ /**
3
+ * Rotation Gesture - Detects rotation
4
+ * @module gestures
5
+ */
6
+ var __importDefault = (this && this.__importDefault) || function (mod) {
7
+ return (mod && mod.__esModule) ? mod : { "default": mod };
8
+ };
9
+ Object.defineProperty(exports, "__esModule", { value: true });
10
+ exports.RotationGesture = void 0;
11
+ const react_1 = __importDefault(require("react"));
12
+ const react_native_1 = require("react-native");
13
+ const RotationGesture = ({ children, enabled = true, ...rest }) => {
14
+ // TODO: Implement Rotation Gesture logic
15
+ return react_1.default.createElement(react_native_1.View, { ...rest }, children);
16
+ };
17
+ exports.RotationGesture = RotationGesture;
18
+ exports.RotationGesture.displayName = 'RotationGesture';
@@ -0,0 +1,11 @@
1
+ /**
2
+ * Stretch Gesture - Detects stretch transforms
3
+ * @module gestures
4
+ */
5
+ import React from 'react';
6
+ export interface StretchGestureProps {
7
+ children: React.ReactNode;
8
+ enabled?: boolean;
9
+ [key: string]: any;
10
+ }
11
+ export declare const StretchGesture: React.FC<StretchGestureProps>;
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ /**
3
+ * Stretch Gesture - Detects stretch transforms
4
+ * @module gestures
5
+ */
6
+ var __importDefault = (this && this.__importDefault) || function (mod) {
7
+ return (mod && mod.__esModule) ? mod : { "default": mod };
8
+ };
9
+ Object.defineProperty(exports, "__esModule", { value: true });
10
+ exports.StretchGesture = void 0;
11
+ const react_1 = __importDefault(require("react"));
12
+ const react_native_1 = require("react-native");
13
+ const StretchGesture = ({ children, enabled = true, ...rest }) => {
14
+ // TODO: Implement Stretch Gesture logic
15
+ return react_1.default.createElement(react_native_1.View, { ...rest }, children);
16
+ };
17
+ exports.StretchGesture = StretchGesture;
18
+ exports.StretchGesture.displayName = 'StretchGesture';
@@ -0,0 +1,5 @@
1
+ export { usePinch } from './usePinch';
2
+ export { useRotation } from './useRotation';
3
+ export { usePinchRotate } from './usePinchRotate';
4
+ export { useStretch } from './useStretch';
5
+ export { useCompress } from './useCompress';
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.useCompress = exports.useStretch = exports.usePinchRotate = exports.useRotation = exports.usePinch = void 0;
4
+ var usePinch_1 = require("./usePinch");
5
+ Object.defineProperty(exports, "usePinch", { enumerable: true, get: function () { return usePinch_1.usePinch; } });
6
+ var useRotation_1 = require("./useRotation");
7
+ Object.defineProperty(exports, "useRotation", { enumerable: true, get: function () { return useRotation_1.useRotation; } });
8
+ var usePinchRotate_1 = require("./usePinchRotate");
9
+ Object.defineProperty(exports, "usePinchRotate", { enumerable: true, get: function () { return usePinchRotate_1.usePinchRotate; } });
10
+ var useStretch_1 = require("./useStretch");
11
+ Object.defineProperty(exports, "useStretch", { enumerable: true, get: function () { return useStretch_1.useStretch; } });
12
+ var useCompress_1 = require("./useCompress");
13
+ Object.defineProperty(exports, "useCompress", { enumerable: true, get: function () { return useCompress_1.useCompress; } });
@@ -0,0 +1,10 @@
1
+ /**
2
+ * useCompress - useCompress hook
3
+ */
4
+ export interface useCompressOptions {
5
+ enabled?: boolean;
6
+ [key: string]: any;
7
+ }
8
+ export declare function useCompress(options?: useCompressOptions): {
9
+ enabled: boolean;
10
+ };
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ /**
3
+ * useCompress - useCompress hook
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.useCompress = useCompress;
7
+ const react_1 = require("react");
8
+ function useCompress(options = {}) {
9
+ const { enabled = true } = options;
10
+ return (0, react_1.useMemo)(() => {
11
+ // TODO: Implement useCompress logic
12
+ return { enabled };
13
+ }, [enabled]);
14
+ }
@@ -0,0 +1,10 @@
1
+ /**
2
+ * usePinch - usePinch hook
3
+ */
4
+ export interface usePinchOptions {
5
+ enabled?: boolean;
6
+ [key: string]: any;
7
+ }
8
+ export declare function usePinch(options?: usePinchOptions): {
9
+ enabled: boolean;
10
+ };
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ /**
3
+ * usePinch - usePinch hook
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.usePinch = usePinch;
7
+ const react_1 = require("react");
8
+ function usePinch(options = {}) {
9
+ const { enabled = true } = options;
10
+ return (0, react_1.useMemo)(() => {
11
+ // TODO: Implement usePinch logic
12
+ return { enabled };
13
+ }, [enabled]);
14
+ }
@@ -0,0 +1,10 @@
1
+ /**
2
+ * usePinchRotate - usePinchRotate hook
3
+ */
4
+ export interface usePinchRotateOptions {
5
+ enabled?: boolean;
6
+ [key: string]: any;
7
+ }
8
+ export declare function usePinchRotate(options?: usePinchRotateOptions): {
9
+ enabled: boolean;
10
+ };
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ /**
3
+ * usePinchRotate - usePinchRotate hook
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.usePinchRotate = usePinchRotate;
7
+ const react_1 = require("react");
8
+ function usePinchRotate(options = {}) {
9
+ const { enabled = true } = options;
10
+ return (0, react_1.useMemo)(() => {
11
+ // TODO: Implement usePinchRotate logic
12
+ return { enabled };
13
+ }, [enabled]);
14
+ }
@@ -0,0 +1,10 @@
1
+ /**
2
+ * useRotation - useRotation hook
3
+ */
4
+ export interface useRotationOptions {
5
+ enabled?: boolean;
6
+ [key: string]: any;
7
+ }
8
+ export declare function useRotation(options?: useRotationOptions): {
9
+ enabled: boolean;
10
+ };
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ /**
3
+ * useRotation - useRotation hook
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.useRotation = useRotation;
7
+ const react_1 = require("react");
8
+ function useRotation(options = {}) {
9
+ const { enabled = true } = options;
10
+ return (0, react_1.useMemo)(() => {
11
+ // TODO: Implement useRotation logic
12
+ return { enabled };
13
+ }, [enabled]);
14
+ }
@@ -0,0 +1,10 @@
1
+ /**
2
+ * useStretch - useStretch hook
3
+ */
4
+ export interface useStretchOptions {
5
+ enabled?: boolean;
6
+ [key: string]: any;
7
+ }
8
+ export declare function useStretch(options?: useStretchOptions): {
9
+ enabled: boolean;
10
+ };
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ /**
3
+ * useStretch - useStretch hook
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.useStretch = useStretch;
7
+ const react_1 = require("react");
8
+ function useStretch(options = {}) {
9
+ const { enabled = true } = options;
10
+ return (0, react_1.useMemo)(() => {
11
+ // TODO: Implement useStretch logic
12
+ return { enabled };
13
+ }, [enabled]);
14
+ }
@@ -0,0 +1,7 @@
1
+ export * from './types';
2
+ export { PinchGesture } from './PinchGesture';
3
+ export { RotationGesture } from './RotationGesture';
4
+ export { PinchRotateGesture } from './PinchRotateGesture';
5
+ export { StretchGesture } from './StretchGesture';
6
+ export { CompressGesture } from './CompressGesture';
7
+ export * from './hooks';
package/dist/index.js ADDED
@@ -0,0 +1,32 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ exports.CompressGesture = exports.StretchGesture = exports.PinchRotateGesture = exports.RotationGesture = exports.PinchGesture = void 0;
18
+ // Transform Gestures
19
+ __exportStar(require("./types"), exports);
20
+ // Components
21
+ var PinchGesture_1 = require("./PinchGesture");
22
+ Object.defineProperty(exports, "PinchGesture", { enumerable: true, get: function () { return PinchGesture_1.PinchGesture; } });
23
+ var RotationGesture_1 = require("./RotationGesture");
24
+ Object.defineProperty(exports, "RotationGesture", { enumerable: true, get: function () { return RotationGesture_1.RotationGesture; } });
25
+ var PinchRotateGesture_1 = require("./PinchRotateGesture");
26
+ Object.defineProperty(exports, "PinchRotateGesture", { enumerable: true, get: function () { return PinchRotateGesture_1.PinchRotateGesture; } });
27
+ var StretchGesture_1 = require("./StretchGesture");
28
+ Object.defineProperty(exports, "StretchGesture", { enumerable: true, get: function () { return StretchGesture_1.StretchGesture; } });
29
+ var CompressGesture_1 = require("./CompressGesture");
30
+ Object.defineProperty(exports, "CompressGesture", { enumerable: true, get: function () { return CompressGesture_1.CompressGesture; } });
31
+ // Hooks
32
+ __exportStar(require("./hooks"), exports);
@@ -0,0 +1,21 @@
1
+ /**
2
+ * Type definitions for this gesture category.
3
+ */
4
+ import type { BaseGestureEvent, PinchEvent } from 'gesture-kit-core';
5
+ export type { PinchEvent };
6
+ export interface RotateEvent extends BaseGestureEvent {
7
+ rotation: number;
8
+ velocity: number;
9
+ anchorX: number;
10
+ anchorY: number;
11
+ }
12
+ export interface PinchRotateEvent extends BaseGestureEvent {
13
+ scale: number;
14
+ rotation: number;
15
+ focalX: number;
16
+ focalY: number;
17
+ }
18
+ export interface StretchEvent extends BaseGestureEvent {
19
+ scaleX: number;
20
+ scaleY: number;
21
+ }
package/dist/types.js ADDED
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ /**
3
+ * Type definitions for this gesture category.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
package/package.json ADDED
@@ -0,0 +1,33 @@
1
+ {
2
+ "name": "gesture-kit-transform",
3
+ "version": "1.0.0",
4
+ "description": "Transform gestures: pinch, rotate, stretch, compress",
5
+ "main": "dist/index.js",
6
+ "types": "dist/index.d.ts",
7
+ "files": ["dist", "README.md"],
8
+ "scripts": {
9
+ "build": "tsc",
10
+ "prepare": "npm run build",
11
+ "typecheck": "tsc --noEmit"
12
+ },
13
+ "dependencies": {
14
+ "gesture-kit-core": "^1.0.0"
15
+ },
16
+ "peerDependencies": {
17
+ "react": ">=18.0.0",
18
+ "react-native": ">=0.71.0",
19
+ "react-native-gesture-handler": ">=2.10.0"
20
+ },
21
+ "peerDependenciesMeta": {
22
+ "react-native-reanimated": { "optional": true }
23
+ },
24
+ "devDependencies": {
25
+ "@types/react": "^18.2.0",
26
+ "react": "^18.2.0",
27
+ "react-native": "^0.73.11",
28
+ "react-native-gesture-handler": "^2.30.0",
29
+ "typescript": "^5.9.3"
30
+ },
31
+ "keywords": ["react-native", "gesture", "pinch", "rotate", "transform"],
32
+ "license": "MIT"
33
+ }