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

@interactjs/core

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/core - npm Package Compare versions

Comparing version 1.4.0-rc.1 to 1.4.0-rc.2

2

defaultOptions.d.ts

@@ -18,2 +18,4 @@ export interface Defaults {

listeners?: Interact.Listeners;
allowFrom?: string | Element;
ignoreFrom?: string | Element;
}

@@ -20,0 +22,0 @@ export declare type Options = Partial<BaseDefaults> & Partial<PerActionDefaults> & {

2

defaultOptions.js

@@ -14,2 +14,2 @@ // tslint:disable no-empty-interface

export default defaults;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGVmYXVsdE9wdGlvbnMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJkZWZhdWx0T3B0aW9ucy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxvQ0FBb0M7QUFpQ3BDLE1BQU0sQ0FBQyxNQUFNLFFBQVEsR0FBYTtJQUNoQyxJQUFJLEVBQUU7UUFDSixjQUFjLEVBQUUsTUFBTTtRQUN0QixXQUFXLEVBQUUsTUFBTTtLQUNwQjtJQUVELFNBQVMsRUFBRTtRQUNULE9BQU8sRUFBRSxLQUFLO1FBQ2QsTUFBTSxFQUFFLEVBQUUsQ0FBQyxFQUFFLENBQUMsRUFBRSxDQUFDLEVBQUUsQ0FBQyxFQUFFO0tBQ3ZCO0lBRUQsT0FBTyxFQUFFLEVBQW9CO0NBQzlCLENBQUE7QUFFRCxlQUFlLFFBQVEsQ0FBQSIsInNvdXJjZXNDb250ZW50IjpbIi8vIHRzbGludDpkaXNhYmxlIG5vLWVtcHR5LWludGVyZmFjZVxuXG5leHBvcnQgaW50ZXJmYWNlIERlZmF1bHRzIHtcbiAgYmFzZTogQmFzZURlZmF1bHRzXG4gIHBlckF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bGVhbjxQZXJBY3Rpb25EZWZhdWx0cz4ge31cblxuZXhwb3J0IGNvbnN0IGRlZmF1bHRzOiBEZWZhdWx0cyA9IHtcbiAgYmFzZToge1xuICAgIHByZXZlbnREZWZhdWx0OiAnYXV0bycsXG4gICAgZGVsdGFTb3VyY2U6ICdwYWdlJyxcbiAgfSxcblxuICBwZXJBY3Rpb246IHtcbiAgICBlbmFibGVkOiBmYWxzZSxcbiAgICBvcmlnaW46IHsgeDogMCwgeTogMCB9LFxuICB9LFxuXG4gIGFjdGlvbnM6IHt9IGFzIEFjdGlvbkRlZmF1bHRzLFxufVxuXG5leHBvcnQgZGVmYXVsdCBkZWZhdWx0c1xuIl19
{
"name": "@interactjs/core",
"version": "1.4.0-rc.1+sha.27a9693",
"version": "1.4.0-rc.2+sha.033f15b",
"peerDependencies": {
"@interactjs/dev-tools": "1.4.0-rc.1+sha.27a9693",
"@interactjs/utils": "1.4.0-rc.1+sha.27a9693"
"@interactjs/dev-tools": "1.4.0-rc.2+sha.033f15b",
"@interactjs/utils": "1.4.0-rc.2+sha.033f15b"
},
"devDependencies": {
"@interactjs/_dev": "1.4.0-rc.1+sha.27a9693",
"@interactjs/utils": "1.4.0-rc.1+sha.27a9693"
"@interactjs/_dev": "1.4.0-rc.2+sha.033f15b",
"@interactjs/utils": "1.4.0-rc.2+sha.033f15b"
},

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

@@ -17,2 +17,7 @@ import * as utils from '@interactjs/utils';

export declare type Defaults = typeof defaults;
export interface Plugin {
id?: string;
install(scope: Scope, options?: any): void;
[key: string]: any;
}
export declare class Scope {

@@ -79,5 +84,13 @@ signals: utils.Signals;

}>;
_plugins: Plugin[];
_pluginMap: {
[id: string]: Plugin;
};
constructor();
onWindowUnload: (event: BeforeUnloadEvent) => void;
init(window: Window): Scope;
pluginIsInstalled(plugin: Plugin): boolean | Plugin;
usePlugin(plugin: Plugin, options?: {
[key: string]: any;
}): this;
addDocument(doc: Document, options?: any): void | false;

@@ -84,0 +97,0 @@ removeDocument(doc: Document): void;

@@ -33,2 +33,4 @@ import * as utils from '@interactjs/utils';

this.documents = [];
this._plugins = [];
this._pluginMap = {};
this.onWindowUnload = (event) => this.removeDocument(event.target);

@@ -55,2 +57,16 @@ const scope = this;

}
pluginIsInstalled(plugin) {
return this._pluginMap[plugin.id] || this._plugins.indexOf(plugin) !== -1;
}
usePlugin(plugin, options) {
if (this.pluginIsInstalled(plugin)) {
return this;
}
plugin.install(this, options);
this._plugins.push(plugin);
if (plugin.id) {
this._pluginMap[plugin.id] = plugin;
}
return this;
}
addDocument(doc, options) {

@@ -160,2 +176,2 @@ // do nothing if document is already known

}
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2NvcGUuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJzY29wZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEtBQUssS0FBSyxNQUFNLG1CQUFtQixDQUFBO0FBQzFDLE9BQU8sVUFBVSxNQUFNLDhCQUE4QixDQUFBO0FBQ3JELE9BQU8sUUFBUSxNQUFNLGtCQUFrQixDQUFBO0FBQ3ZDLE9BQU8sU0FBUyxNQUFNLGFBQWEsQ0FBQTtBQUNuQyxPQUFPLGdCQUFnQixNQUFNLGdCQUFnQixDQUFBO0FBQzdDLE9BQU8sYUFBYSxNQUFNLGlCQUFpQixDQUFBO0FBQzNDLE9BQU8sWUFBWSxNQUFNLGdCQUFnQixDQUFBO0FBRXpDLE1BQU0sRUFDSixHQUFHLEVBQ0gsT0FBTyxFQUNQLEdBQUcsRUFDSCxPQUFPLEVBQ1AsTUFBTSxHQUNQLEdBQUcsS0FBSyxDQUFBO0FBRVQsTUFBTSxDQUFOLElBQVksVUFDWDtBQURELFdBQVksVUFBVTtBQUN0QixDQUFDLEVBRFcsVUFBVSxLQUFWLFVBQVUsUUFDckI7QUFRRCxNQUFNLFVBQVUsV0FBVztJQUN6QixPQUFPL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GVsZW1lbnQpKSkge1xuICAgICAgICByZXQgPSBjYWxsYmFjayhpbnRlcmFjdGFibGUpXG4gICAgICB9XG5cbiAgICAgIGlmIChyZXQgIT09IHVuZGVmaW5lZCkge1xuICAgICAgICByZXR1cm4gcmV0XG4gICAgICB9XG4gICAgfVxuICB9XG59XG5cbmV4cG9ydCBmdW5jdGlvbiBpbml0U2NvcGUgKHNjb3BlOiBTY29wZSwgd2luZG93OiBXaW5kb3cpIHtcbiAgd2luLmluaXQod2luZG93KVxuICBkb21PYmplY3RzLmluaXQod2luZG93KVxuICBicm93c2VyLmluaXQod2luZG93KVxuICByYWYuaW5pdCh3aW5kb3cpXG4gIGV2ZW50cy5pbml0KHdpbmRvdylcblxuICBpbnRlcmFjdGlvbnMuaW5zdGFsbChzY29wZSlcbiAgc2NvcGUuZG9jdW1lbnQgPSB3aW5kb3cuZG9jdW1lbnRcbiAgc2NvcGUud2luZG93ID0gd2luZG93XG5cbiAgcmV0dXJuIHNjb3BlXG59XG4iXX0=
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2NvcGUuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJzY29wZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEtBQUssS0FBSyxNQUFNLG1CQUFtQixDQUFBO0FBQzFDLE9BQU8sVUFBVSxNQUFNLDhCQUE4QixDQUFBO0FBQ3JELE9BQU8sUUFBUSxNQUFNLGtCQUFrQixDQUFBO0FBQ3ZDLE9BQU8sU0FBUyxNQUFNLGFBQWEsQ0FBQTtBQUNuQyxPQUFPLGdCQUFnQixNQUFNLGdCQUFnQixDQUFBO0FBQzdDLE9BQU8sYUFBYSxNQUFNLGlCQUFpQixDQUFBO0FBQzNDLE9BQU8sWUFBWSxNQUFNLGdCQUFnQixDQUFBO0FBRXpDLE1BQU0sRUFDSixHQUFHLEVBQ0gsT0FBTyxFQUNQLEdBQUcsRUFDS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mFjdGlvbnMuaW5zdGFsbChzY29wZSlcbiAgc2NvcGUuZG9jdW1lbnQgPSB3aW5kb3cuZG9jdW1lbnRcbiAgc2NvcGUud2luZG93ID0gd2luZG93XG5cbiAgcmV0dXJuIHNjb3BlXG59XG4iXX0=
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