Skip to content

Commit

Permalink
v1.4.0-alpha.18+sha.a8adfbf
Browse files Browse the repository at this point in the history
  • Loading branch information
taye committed Jan 28, 2019
1 parent a8adfbf commit 1fcc7f9
Show file tree
Hide file tree
Showing 255 changed files with 29,177 additions and 19,175 deletions.
2 changes: 1 addition & 1 deletion lerna.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "1.4.0-alpha.17",
"version": "1.4.0-alpha.18",
"packages": [
".",
"packages/*"
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

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

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@interactjs/_dev",
"private": "true",
"version": "1.4.0-alpha.17+sha.793e5fa",
"version": "1.4.0-alpha.18+sha.a8adfbf",
"bin": {
"_dev": "scripts/_dev",
"@build": "scripts/build.js",
Expand Down
2 changes: 1 addition & 1 deletion packages/actions/LICENSE
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright (c) 2012-2018 Taye Adeyemi <[email protected]>
Copyright (c) 2012-2019 Taye Adeyemi <[email protected]>

Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated
Expand Down
82 changes: 82 additions & 0 deletions packages/actions/drag.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
import { Scope } from '@interactjs/core/scope';
declare module '@interactjs/core/Interactable' {
interface Interactable {
draggable?: (options: any) => Interactable | {
[key: string]: any;
};
}
}
declare module '@interactjs/core/defaultOptions' {
interface Defaults {
drag?: any;
}
}
declare module '@interactjs/core/scope' {
interface Actions {
drag?: typeof drag;
}
}
declare function install(scope: Scope): void;
declare function beforeMove({ interaction }: {
interaction: any;
}): void;
declare function move({ iEvent, interaction }: {
iEvent: any;
interaction: any;
}): 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(options: any): any;
declare const drag: {
install: typeof install;
draggable: typeof draggable;
beforeMove: typeof beforeMove;
move: typeof move;
defaults: {
startAxis: string;
lockAxis: string;
};
checker(_pointer: any, _event: any, interactable: any): {
name: string;
axis: any;
};
getCursor(): string;
};
export default drag;
135 changes: 135 additions & 0 deletions packages/actions/drag.js

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

1 change: 1 addition & 0 deletions packages/actions/drag.js.map

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

32 changes: 32 additions & 0 deletions packages/actions/drop/DropEvent.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
import Interactable from '@interactjs/core/Interactable';
import InteractEvent from '@interactjs/core/InteractEvent';
import Interaction from '@interactjs/core/Interaction';
declare class DropEvent {
type: string;
target: Element;
currentTarget: Element;
dropzone: Interactable;
dragEvent: InteractEvent;
relatedTarget: Element;
interaction: Interaction;
draggable: Interactable;
timeStamp: number;
propagationStopped: boolean;
immediatePropagationStopped: boolean;
/**
* Class of events fired on dropzones during drags with acceptable targets.
*/
constructor(dropStatus: any, dragEvent: any, type: any);
/**
* If this is a `dropactivate` event, the dropzone element will be
* deactivated.
*
* If this is a `dragmove` or `dragenter`, a `dragleave` will be fired on the
* dropzone element and more.
*/
reject(): void;
preventDefault(): void;
stopPropagation(): void;
stopImmediatePropagation(): void;
}
export default DropEvent;
66 changes: 66 additions & 0 deletions packages/actions/drop/DropEvent.js

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

1 change: 1 addition & 0 deletions packages/actions/drop/DropEvent.js.map

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

Loading

0 comments on commit 1fcc7f9

Please sign in to comment.