node-waves: Provides its own types (#22866)

This commit is contained in:
Andy
2018-01-16 07:51:02 -08:00
committed by GitHub
parent 534e06cf2d
commit da70da196d
5 changed files with 6 additions and 100 deletions
+6
View File
@@ -912,6 +912,12 @@
"sourceRepoURL": "https://github.com/theoephraim/node-pg-migrate#readme",
"asOfVersion": "2.15.0"
},
{
"libraryName": "node-waves",
"typingsPackageName": "node-waves",
"sourceRepoURL": "http://fian.my.id/Waves",
"asOfVersion": "0.7.6"
},
{
"libraryName": "Normalizr",
"typingsPackageName": "normalizr",
-66
View File
@@ -1,66 +0,0 @@
// Type definitions for node-waves 0.7
// Project: http://fian.my.id/Waves
// Definitions by: Stephen Lautier <https://github.com/stephenlautier>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
export type ElementTarget = string | Element | Element[];
export interface WavesConfig {
/**
* Determines how long the waves effect duration (in milliseconds).
*
*/
duration?: number;
/**
* Delay amount to show waves effect on touch and hide the effect if user scrolls.
* Set to 0 to disable delay (in milliseconds).
*
*/
delay?: number;
}
export interface RippleOptions {
/**
* Specify how long to wait between starting and stopping the ripple.
*
*/
wait?: number | null;
/**
* Specify the position inside the element.
*
*/
position?: {
x: number;
y: number;
} | null;
}
/**
* Initializes waves with an optional config.
*/
export function init(config?: WavesConfig): void;
/**
* Attach ripple effect by adding `.waves-effect` to HTML element.
* Make sure you call `init` to activate the ripple.
*
* @param elements elements to target.
* @param classes classes to add.
*/
export function attach(elements: ElementTarget, classes?: string | string[]): void;
/**
* Creates a ripple effect in HTML element programmatically.
* @param elements elements to target (must have `.waves-effect` already applied, ideally via `attach`).
* @param options specify how long to wait between starting and stopping the ripple, and it's position inside the element.
*/
export function ripple(elements: ElementTarget, options?: RippleOptions): void;
/**
* Removes all ripples from inside an element immediately.
*
* @param elements elements to remove ripples from.
*/
export function calm(elements: ElementTarget): void;
-9
View File
@@ -1,9 +0,0 @@
import { init, ripple, attach, calm } from "node-waves";
init({ delay: 300 });
attach("button", "waves-light");
ripple(".box", { wait: null });
calm(".box");
-24
View File
@@ -1,24 +0,0 @@
{
"compilerOptions": {
"module": "commonjs",
"lib": [
"es6",
"dom"
],
"noImplicitAny": true,
"noImplicitThis": true,
"strictNullChecks": true,
"strictFunctionTypes": true,
"baseUrl": "../",
"typeRoots": [
"../"
],
"types": [],
"noEmit": true,
"forceConsistentCasingInFileNames": true
},
"files": [
"index.d.ts",
"node-waves-tests.ts"
]
}
-1
View File
@@ -1 +0,0 @@
{ "extends": "dtslint/dt.json" }