Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@interactjs/actions

Package Overview
Dependencies
Maintainers
2
Versions
137
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@interactjs/actions - npm Package Compare versions

Comparing version 1.4.0-alpha.27 to 1.4.0-alpha.28

46

drag.d.ts

@@ -21,3 +21,3 @@ import { ActionName, Scope } from '@interactjs/core/scope';

export declare type DragEvent = Interact.InteractEvent<ActionName.Drag>;
export declare type DraggableMethod = (options?: Interact.OrBoolean<Interact.DraggableOptions> | boolean) => Interact.Interactable | Interact.DropzoneOptions;
export declare type DraggableMethod = Interact.ActionMethod<Interact.DraggableOptions>;
declare function install(scope: Scope): void;

@@ -31,48 +31,8 @@ declare function beforeMove({ interaction }: {

}): void;
/**
* ```js
* interact(element).draggable({
* onstart: function (event) {},
* onmove : function (event) {},
* onend : function (event) {},
*
* // the axis in which the first movement must be
* // for the drag sequence to start
* // 'xy' by default - any direction
* startAxis: 'x' || 'y' || 'xy',
*
* // 'xy' by default - don't restrict to one axis (move in any direction)
* // 'x' or 'y' to restrict movement to either axis
* // 'start' to restrict movement to the axis the drag started in
* lockAxis: 'x' || 'y' || 'xy' || 'start',
*
* // max number of drags that can happen concurrently
* // with elements of this Interactable. Infinity by default
* max: Infinity,
*
* // max number of drags that can target the same element+Interactable
* // 1 by default
* maxPerElement: 2
* });
*
* var isDraggable = interact('element').draggable(); // true
* ```
*
* Get or set whether drag actions can be performed on the target
*
* @alias Interactable.prototype.draggable
*
* @param {boolean | object} [options] true/false or An object with event
* listeners to be fired on drag events (object makes the Interactable
* draggable)
* @return {boolean | Interactable} boolean indicating if this can be the
* target of drag events, or this Interctable
*/
declare function draggable(this: Interact.Interactable, options?: Interact.DraggableOptions | boolean): import("@interactjs/core/Interactable").Interactable | import("../types").DraggableOptions;
declare const drag: {
install: typeof install;
draggable: typeof draggable;
draggable: import("../types/types").ActionMethod<import("../types/types").DraggableOptions>;
beforeMove: typeof beforeMove;
move: typeof move;
defaults: import("../types").DropzoneOptions;
defaults: import("../types/types").DropzoneOptions;
checker(_pointer: any, _event: any, interactable: any): {

@@ -79,0 +39,0 @@ name: string;

8

drag.js

@@ -12,3 +12,3 @@ import { ActionName } from '@interactjs/core/scope';

Interactable.prototype.draggable = drag.draggable;
actions.drag = drag;
actions[ActionName.Drag] = drag;
actions.names.push(ActionName.Drag);

@@ -94,3 +94,3 @@ arr.merge(actions.eventTypes, [

*/
function draggable(options) {
const draggable = function draggable(options) {
if (is.object(options)) {

@@ -113,3 +113,3 @@ this.options.drag.enabled = options.enabled !== false;

return this.options.drag;
}
};
const drag = {

@@ -140,2 +140,2 @@ install,

export default drag;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZHJhZy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbImRyYWcudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLFVBQVUsRUFBUyxNQUFNLHdCQUF3QixDQUFBO0FBQzFELE9BQU8sS0FBSyxHQUFHLE1BQU0sdUJBQXVCLENBQUE7QUFDNUMsT0FBTyxLQUFLLEVBQUUsTUFBTSxzQkFBc0IsQ0FBQTtBQXlCekMsVUFBa0IsQ0FBQyxJQUFJLEdBQUcsTUFBTSxDQUFBO0FBT2pDLFNBQVMsT0FBTyxDQUFFLEtBQVk7SUFDNUIsTUFBTSxFQUNKLE9BQU8sRUFDUCxZQUFZLEVBQ1osWUFBWSxFQUNaLFFBQVEsR0FDVCxHQUFHLEtBQUssQ0FBQTtJQUVULFlBQVksQ0FBQyxPQUFPLENBQUMsRUFBRSxDQUFDLG9CQUFvQixFQUFFLFVBQVUsQ0FBQyxDQUFBO0lBQ3pELFlBQVksQ0FBQyxPQUFPLENBQUMsRUFBRSxDQUFDLGVBQWUsRUFBRSxVQUFVLENBQUMsQ0FBQTtJQUVwRCxXQUFXO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cmV0dXJuIHRoaXMub3B0aW9ucy5kcmFnXG59XG5cbmNvbnN0IGRyYWcgPSB7XG4gIGluc3RhbGwsXG4gIGRyYWdnYWJsZSxcbiAgYmVmb3JlTW92ZSxcbiAgbW92ZSxcbiAgZGVmYXVsdHM6IHtcbiAgICBzdGFydEF4aXMgOiAneHknLFxuICAgIGxvY2tBeGlzICA6ICd4eScsXG4gIH0gYXMgSW50ZXJhY3QuRHJvcHpvbmVPcHRpb25zLFxuXG4gIGNoZWNrZXIgKF9wb2ludGVyLCBfZXZlbnQsIGludGVyYWN0YWJsZSkge1xuICAgIGNvbnN0IGRyYWdPcHRpb25zID0gaW50ZXJhY3RhYmxlLm9wdGlvbnMuZHJhZ1xuXG4gICAgcmV0dXJuIGRyYWdPcHRpb25zLmVuYWJsZWRcbiAgICAgID8ge1xuICAgICAgICBuYW1lOiAnZHJhZycsXG4gICAgICAgIGF4aXM6IChkcmFnT3B0aW9ucy5sb2NrQXhpcyA9PT0gJ3N0YXJ0J1xuICAgICAgICAgID8gZHJhZ09wdGlvbnMuc3RhcnRBeGlzXG4gICAgICAgICAgOiBkcmFnT3B0aW9ucy5sb2NrQXhpcyksXG4gICAgICB9XG4gICAgICA6IG51bGxcbiAgfSxcblxuICBnZXRDdXJzb3IgKCkge1xuICAgIHJldHVybiAnbW92ZSdcbiAgfSxcbn1cblxuZXhwb3J0IGRlZmF1bHQgZHJhZ1xuIl19

@@ -0,1 +1,2 @@

import Interactable from '@interactjs/core/Interactable';
import InteractEvent from '@interactjs/core/InteractEvent';

@@ -13,3 +14,17 @@ import { Scope } from '@interactjs/core/scope';

dropStatus?: {
[key: string]: any;
cur: {
dropzone: Interactable;
element: Element;
};
prev: {
dropzone: Interactable;
element: Element;
};
rejected: boolean;
events: any;
activeDrops: Array<{
dropzone: Interactable;
Element: Element;
rect: Interact.Rect;
}>;
};

@@ -55,4 +70,4 @@ }

fireDropEvents: typeof fireDropEvents;
defaults: import("../../types").DropzoneOptions;
defaults: import("../../types/types").DropzoneOptions;
};
export default drop;

@@ -8,3 +8,4 @@ import * as utils from '@interactjs/utils';

/** @lends Interactable */
Interactable, interactions, defaults, } = scope;
Interactable, // eslint-disable-line no-shadow
interactions, defaults, } = scope;
interactions.signals.on('after-action-start', ({ interaction, event, iEvent: dragEvent }) => {

@@ -14,3 +15,15 @@ if (interaction.prepared.name !== 'drag') {

}
const { dropStatus } = interaction;
const dropStatus = interaction.dropStatus = interaction.dropStatus || {
cur: {
dropzone: null,
element: null,
},
prev: {
dropzone: null,
element: null,
},
rejected: null,
events: null,
activeDrops: null,
};
// reset active dropzones

@@ -47,17 +60,2 @@ dropStatus.activeDrops = null;

});
interactions.signals.on('new', (interaction) => {
interaction.dropStatus = {
cur: {
dropzone: null,
element: null,
},
prev: {
dropzone: null,
element: null,
},
rejected: false,
events: null,
activeDrops: null,
};
});
interactions.signals.on('stop', ({ interaction: { dropStatus } }) => {

@@ -417,2 +415,2 @@ dropStatus.cur.dropzone = dropStatus.cur.element =

export default drop;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJpbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFFQSxPQUFPLEtBQUssS0FBSyxNQUFNLG1CQUFtQixDQUFBO0FBQzFDLE9BQU8sU0FBUyxNQUFNLGFBQWEsQ0FBQTtBQTBDbkMsU0FBUyxPQUFPLENBQUUsS0FBWTtJQUM1QixNQUFNLEVBQ0osT0FBTztJQUNQLDZCQUE2QjtJQUM3QixRQUFRO0lBQ1IsMEJBQTBCO0lBQzFCLFlBQVksRUFDWixZQUFZLEVBQ1osUUFBUSxHQUNULEdBQUcsS0FBSyxDQUFBO0lBRVQsWUFBWSxDQUFDLE9BQU8sQ0FBQyxFQUFFLENBQUMsb0JBQW9CLEVBQUUsQ0FBQyxFQUFFLFdBQVcsRUFBRSxLQUFLLEVBQUUsTUFBTS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AgKlxuICAgKiBAcGFyYW0ge2Jvb2xlYW4gfCBvYmplY3QgfCBudWxsfSBbb3B0aW9uc10gVGhlIG5ldyBvcHRpb25zIHRvIGJlIHNldC5cbiAgICogQHJldHVybiB7Ym9vbGVhbiB8IEludGVyYWN0YWJsZX0gVGhlIGN1cnJlbnQgc2V0dGluZyBvciB0aGlzIEludGVyYWN0YWJsZVxuICAgKi9cbiAgSW50ZXJhY3RhYmxlLnByb3RvdHlwZS5kcm9wem9uZSA9IGZ1bmN0aW9uICh0aGlzOiBJbnRlcmFjdC5JbnRlcmFjdGFibGUsIG9wdGlvbnMpIHtcbiAgICByZXR1cm4gZHJvcHpvbmVNZXRob2QodGhpcywgb3B0aW9ucylcbiAgfVxuXG4gIC8qKlxuICAgKiBgYGBqc1xuICAgKiBpbnRlcmFjdCh0YXJnZXQpXG4gICAqIC5kcm9wQ2hlY2tlcihmdW5jdGlvbihkcmFnRXZlbnQsICAgICAgICAgLy8gcmVsYXRlZCBkcmFnbW92ZSBvciBkcmFnZW5kIGV2ZW50XG4gICAqICAgICAgICAgICAgICAgICAgICAgICBldmVudCwgICAgICAgICAgICAgLy8gVG91Y2hFdmVudC9Qb2ludGVyRXZlbnQvTW91c2VFdmVudFxuICAgKiAgICAgICAgICAgICAgICAgICAgICAgZHJvcHBlZCwgICAgICAgICAgIC8vIGJvb2wgcmVzdWx0IG9mIHRoZSBkZWZhdWx0IGNoZWNrZXJcbiAgICogICAgICAgICAgICAgICAgICAgICAgIGRyb3B6b25lLCAgICAgICAgICAvLyBkcm9wem9uZSBJbnRlcmFjdGFibGVcbiAgICogICAgICAgICAgICAgICAgICAgICAgIGRyb3BFbGVtZW50LCAgICAgICAvLyBkcm9wem9uZSBlbGVtbnRcbiAgICogICAgICAgICAgICAgICAgICAgICAgIGRyYWdnYWJsZSwgICAgICAgICAvLyBkcmFnZ2FibGUgSW50ZXJhY3RhYmxlXG4gICAqICAgICAgICAgICAgICAgICAgICAgICBkcmFnZ2FibGVFbGVt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ubGVmdCwgZHJhZ1JlY3QubGVmdCkpICpcbiAgICAgICAgICAgICAgICAgICAgICAgICAgTWF0aC5tYXgoMCwgTWF0aC5taW4ocmVjdC5ib3R0b20sIGRyYWdSZWN0LmJvdHRvbSkgLSBNYXRoLm1heChyZWN0LnRvcCwgZHJhZ1JlY3QudG9wKSkpXG5cbiAgICBjb25zdCBvdmVybGFwUmF0aW8gPSBvdmVybGFwQXJlYSAvIChkcmFnUmVjdC53aWR0aCAqIGRyYWdSZWN0LmhlaWdodClcblxuICAgIGRyb3BwZWQgPSBvdmVybGFwUmF0aW8gPj0gZHJvcE92ZXJsYXBcbiAgfVxuXG4gIGlmIChpbnRlcmFjdGFibGUub3B0aW9ucy5kcm9wLmNoZWNrZXIpIHtcbiAgICBkcm9wcGVkID0gaW50ZXJhY3RhYmxlLm9wdGlvbnMuZHJvcC5jaGVja2VyKGRyYWdFdmVudCwgZXZlbnQsIGRyb3BwZWQsIGludGVyYWN0YWJsZSwgZHJvcEVsZW1lbnQsIGRyYWdnYWJsZSwgZHJhZ2dhYmxlRWxlbWVudClcbiAgfVxuXG4gIHJldHVybiBkcm9wcGVkXG59XG5cbmNvbnN0IGRyb3AgPSB7XG4gIGluc3RhbGwsXG4gIGdldEFjdGl2ZURyb3BzLFxuICBnZXREcm9wLFxuICBnZXREcm9wRXZlbnRzLFxuICBmaXJlRHJvcEV2ZW50cyxcbiAgZGVmYXVsdHM6IHtcbiAgICBlbmFibGVkOiBmYWxzZSxcbiAgICBhY2NlcHQgOiBudWxsLFxuICAgIG92ZXJsYXA6ICdwb2ludGVyJyxcbiAgfSBhcyBJbnRlcmFjdC5Ecm9wem9uZU9wdGlvbnMsXG59XG5cbmV4cG9ydCBkZWZhdWx0IGRyb3BcbiJdfQ==
import { ActionName, Scope } from '@interactjs/core/scope';
export declare type GesturableMethod = (options?: Interact.GesturableOptions | boolean) => Interact.Interactable | Interact.GesturableOptions;
export declare type GesturableMethod = Interact.ActionMethod<Interact.GesturableOptions>;
declare module '@interactjs/core/Interaction' {
interface Interaction {
gesture?: {
startAngle: number;
startDistance: number;
prevScale: number;
prevAngle: number;
prevDistance: number;
};
}
}
declare module '@interactjs/core/Interactable' {

@@ -21,3 +32,16 @@ interface Interactable {

}
export declare type GestureEvent = Interact.InteractEvent<ActionName.Gesture>;
export interface GestureEvent extends Interact.InteractEvent<ActionName.Gesture> {
distance: number;
angle: number;
da: number;
scale: number;
ds: number;
box: Interact.Rect;
touches: Interact.PointerType[];
}
export interface GestureSignalArg extends Interact.SignalArg {
iEvent: GestureEvent;
interaction: Interact.Interaction<ActionName.Gesture>;
event: Interact.PointerEventType | GestureEvent;
}
declare function install(scope: Scope): void;

@@ -24,0 +48,0 @@ declare const gesture: {

@@ -114,3 +114,3 @@ import InteractEvent from '@interactjs/core/InteractEvent';

const deltaSource = interaction.target.options.deltaSource;
iEvent.touches = [pointers[0].pointer, pointers[1].pointer];
iEvent.touches = [pointers[0], pointers[1]];
if (starting) {

@@ -125,7 +125,8 @@ iEvent.distance = utils.pointer.touchDistance(pointers, deltaSource);

else if (ending || event instanceof InteractEvent) {
iEvent.distance = interaction.prevEvent.distance;
iEvent.box = interaction.prevEvent.box;
iEvent.scale = interaction.prevEvent.scale;
const prevEvent = interaction.prevEvent;
iEvent.distance = prevEvent.distance;
iEvent.box = prevEvent.box;
iEvent.scale = prevEvent.scale;
iEvent.ds = iEvent.scale - 1;
iEvent.angle = interaction.prevEvent.angle;
iEvent.angle = prevEvent.angle;
iEvent.da = iEvent.angle - interaction.gesture.startAngle;

@@ -143,2 +144,2 @@ }

export default gesture;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZ2VzdHVyZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbImdlc3R1cmUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxhQUFhLE1BQU0sZ0NBQWdDLENBQUE7QUFDMUQsT0FBTyxFQUFFL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zdHVyZVxuIl19
{
"name": "@interactjs/actions",
"version": "1.4.0-alpha.27+sha.12b8f8f",
"version": "1.4.0-alpha.28+sha.e624c4d",
"peerDependencies": {
"@interactjs/core": "1.4.0-alpha.27+sha.12b8f8f",
"@interactjs/utils": "1.4.0-alpha.27+sha.12b8f8f"
"@interactjs/core": "1.4.0-alpha.28+sha.e624c4d",
"@interactjs/utils": "1.4.0-alpha.28+sha.e624c4d"
},
"devDependencies": {
"@interactjs/_dev": "1.4.0-alpha.27+sha.12b8f8f",
"@interactjs/core": "1.4.0-alpha.27+sha.12b8f8f",
"@interactjs/utils": "1.4.0-alpha.27+sha.12b8f8f"
"@interactjs/_dev": "1.4.0-alpha.28+sha.e624c4d",
"@interactjs/core": "1.4.0-alpha.28+sha.e624c4d",
"@interactjs/utils": "1.4.0-alpha.28+sha.e624c4d"
},

@@ -13,0 +13,0 @@ "publishConfig": {

@@ -1,5 +0,5 @@

import { Action, Interaction } from '@interactjs/core/Interaction';
import { ActionProps, Interaction } from '@interactjs/core/Interaction';
import { ActionName, Scope } from '@interactjs/core/scope';
export declare type EdgeName = 'top' | 'left' | 'bottom' | 'right';
export declare type ResizableMethod = (options?: Interact.OrBoolean<Interact.ResizableOptions> | boolean) => Interact.Interactable | Interact.ResizableOptions;
export declare type ResizableMethod = Interact.ActionMethod<Interact.ResizableOptions>;
declare module '@interactjs/core/Interactable' {

@@ -13,3 +13,16 @@ interface Interactable {

resizeAxes: 'x' | 'y' | 'xy';
resizeRects: {
start: Interact.Rect;
current: Interact.Rect;
inverted: Interact.Rect;
previous: Interact.Rect;
delta: Interact.Rect;
};
resizeStartAspectRatio: number;
}
interface ActionProps {
_linkedEdges?: {
[key: string]: boolean;
};
}
}

@@ -36,4 +49,4 @@ declare module '@interactjs/core/defaultOptions' {

install: typeof install;
defaults: import("../types").ResizableOptions;
checker(_pointer: import("../types").PointerType, _event: import("../types").PointerEventType, interactable: import("@interactjs/core/Interactable").Interactable, element: Element, interaction: Interaction, rect: import("../types").Rect): {
defaults: import("../types/types").ResizableOptions;
checker(_pointer: import("../types/types").PointerType, _event: import("../types/types").PointerEventType, interactable: import("@interactjs/core/Interactable").Interactable, element: Element, interaction: Interaction<any>, rect: import("../types/types").Rect): {
name: string;

@@ -62,5 +75,5 @@ edges: {

};
getCursor(action: Action): string;
getCursor(action: ActionProps<any>): string;
defaultMargin: number;
};
export default resize;

@@ -159,3 +159,3 @@ import { ActionName } from '@interactjs/core/scope';

interactable.setOnEvents('resize', options);
if (/^x$|^y$|^xy$/.test(options.axis)) {
if (utils.is.string(options.axis) && /^x$|^y$|^xy$/.test(options.axis)) {
interactable.options.resize.axis = options.axis;

@@ -407,2 +407,2 @@ }

export default resize;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicmVzaXplLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsicmVzaXplLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUNBLE9BQU8sRUFBRSxVQUFVLEVBQVMsTUFBTSx3QkFBd0IsQ0FBQTtBQUMxRCxPQUFPLEtBQUssS0FBSyxNQUFNLG1CQUFtQixDQUFBO0FBa0N6QyxVQUFrQixDQUFDLE1BQU0sR0FBRyxRQUFRLENBQUE7QUFPckMsU0FBUyxPQUFPLENBQUUsS0FBWTtJQUM1QixNQUFNLEVBQ0osT0FBTyxFQUNQLE9BQU87SUFDUCwwQkFBMEI7SUFDMUIsWUFBWSxFQUFFLDJDQUEyQztJQUN6RCxZQUFZLEVBQ1osUUFBUSxHQUNULEdBQUcsS0FBSyxDQUFBO0lBRVQsa0NBQWtDO0lBRWxDLFlBQVksQ0FBQyxPQUFPLENBQUMsRUFBRSxDQUFDLEtBQUssRUFBRSxDQUFDLFdBQVcsRUFBRSxFQUFFO1FBQzdDLFdBQVcsQ0FBQyxVQUFVLEdBQUcsSUFBSSxDQUFBO0lBQy9CLENBQUMsQ0FBQyxDQUFBO0lBRUYsWUFBWSxDQUF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ID0gMFxuICAgIH1cbiAgfVxufVxuXG5leHBvcnQgZGVmYXVsdCByZXNpemVcbiJdfQ==
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc