forked from ctrl-freaks/freezeframe.js
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
26c2953
commit 61c0e4c
Showing
10 changed files
with
22,806 additions
and
16,788 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
21 changes: 21 additions & 0 deletions
21
packages/freezeframe/dist/packages/freezeframe/src/constants.d.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
export declare const classes: { | ||
SELECTOR: string; | ||
CONTAINER: string; | ||
LOADING_ICON: string; | ||
IMAGE: string; | ||
CANVAS: string; | ||
READY: string; | ||
INACTIVE: string; | ||
ACTIVE: string; | ||
CANVAS_READY: string; | ||
RESPONSIVE: string; | ||
OVERLAY: string; | ||
}; | ||
export declare const defaultOptions: { | ||
selector: string; | ||
responsive: boolean; | ||
trigger: string; | ||
overlay: boolean; | ||
warnings: boolean; | ||
}; | ||
export declare const styleId = "ff-styles"; |
31 changes: 31 additions & 0 deletions
31
packages/freezeframe/dist/packages/freezeframe/src/index.d.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
import { SelectorOrNodes, Freeze, FreezeframeOptions, RequireProps } from '../types'; | ||
declare class Freezeframe { | ||
#private; | ||
options: FreezeframeOptions; | ||
items: Freeze[]; | ||
$images: HTMLImageElement[]; | ||
private _eventListeners; | ||
private get _stylesInjected(); | ||
constructor(target?: SelectorOrNodes | RequireProps<FreezeframeOptions, 'selector'>, options?: FreezeframeOptions); | ||
private _init; | ||
private _capture; | ||
private _load; | ||
private _setup; | ||
private _wrap; | ||
private _process; | ||
private _ready; | ||
private _attach; | ||
private _addEventListener; | ||
private _removeEventListener; | ||
private _injectStylesheet; | ||
private _emit; | ||
private _toggleOn; | ||
private _toggleOff; | ||
private _toggle; | ||
start(): this; | ||
stop(): this; | ||
toggle(): this; | ||
on(event: string, cb: Function): this; | ||
destroy(): void; | ||
} | ||
export default Freezeframe; |
4 changes: 4 additions & 0 deletions
4
packages/freezeframe/dist/packages/freezeframe/src/templates.d.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
export declare const stylesheet: () => string; | ||
export declare const container: () => string; | ||
export declare const canvas: () => string; | ||
export declare const overlay: () => string; |
13 changes: 13 additions & 0 deletions
13
packages/freezeframe/dist/packages/freezeframe/src/utils/index.d.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import { SelectorOrNodes, FreezeframeOptions } from '../../types/index'; | ||
export declare const pipe: (...fns: Function[]) => (...initArgs: any[]) => any; | ||
export declare const formatMessage: (string: string) => string; | ||
export declare const error: (message: string, ...args: any[]) => void; | ||
export declare const warn: (message: string, ...args: any[]) => void; | ||
export declare const isTouch: () => boolean; | ||
export declare const parseFilename: (filePath: string) => string; | ||
export declare const validateFilename: (filePath: string) => boolean; | ||
export declare const normalizeElements: (selectorOrNodes: SelectorOrNodes) => Element | HTMLCollectionOf<Element> | NodeListOf<Element>; | ||
export declare const validateElements: (elements: Element | Element[], _: any, options: FreezeframeOptions) => any[]; | ||
export declare const dedupeImages: (images: HTMLImageElement[]) => HTMLImageElement[]; | ||
export declare const htmlToNode: (html: string) => HTMLElement; | ||
export declare const wrapNode: ($el: HTMLElement, $wrapper: HTMLElement) => void; |
27 changes: 27 additions & 0 deletions
27
packages/freezeframe/dist/packages/freezeframe/types/index.d.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
export declare type RequireProps<T extends {}, K extends keyof T> = Omit<T, K> & { | ||
[MK in K]-?: NonNullable<T[MK]>; | ||
}; | ||
export declare type SelectorOrNodes = string | Element | HTMLCollectionOf<Element> | NodeListOf<Element>; | ||
export declare type TriggerType = string | false; | ||
export declare enum FreezeframeEventTypes { | ||
START = "start", | ||
STOP = "stop", | ||
TOGGLE = "toggle" | ||
} | ||
export interface FreezeframeOptions { | ||
selector?: SelectorOrNodes; | ||
responsive?: boolean; | ||
trigger?: TriggerType; | ||
overlay?: boolean; | ||
warnings?: boolean; | ||
} | ||
export interface Freeze { | ||
$container: HTMLElement; | ||
$canvas: HTMLCanvasElement; | ||
$image: HTMLImageElement; | ||
} | ||
export interface FreezeframeEvent { | ||
$image: HTMLImageElement; | ||
event: string; | ||
listener: EventListenerOrEventListenerObject; | ||
} |
Oops, something went wrong.