@ribajs/extras
Advanced tools
Comparing version 2.0.0-rc.11 to 2.0.0-rc.12
import { Binder } from "@ribajs/core"; | ||
export declare class ImageEventsBinder extends Binder<string, HTMLElement> { | ||
export declare class ImageEventsBinder extends Binder<any, HTMLElement> { | ||
static key: string; | ||
@@ -10,5 +10,5 @@ private events?; | ||
private onProgress; | ||
bind(el: HTMLImageElement): void; | ||
bind(el: HTMLElement): void; | ||
unbind(): void; | ||
routine(): void; | ||
routine(el: HTMLElement): void; | ||
} |
@@ -16,2 +16,3 @@ import { Binder } from "@ribajs/core"; | ||
bind(el) { | ||
this.unbind(); | ||
this.events = imagesLoaded(el); | ||
@@ -31,6 +32,7 @@ this.events?.on("always", this.onAlways); | ||
} | ||
routine() { | ||
routine(el) { | ||
this.bind(el); | ||
this.events?.check(); | ||
} | ||
} | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW1hZ2UtZXZlbnRzLmJpbmRlci5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9iaW5kZXJzL2ltYWdlLWV2ZW50cy5iaW5kZXIudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLE1BQU0sRUFBRSxNQUFNLGNBQWMsQ0FBQztBQUN0QyxPQUFPLFlBQVksTUFBTSxjQUFjLENBQUM7QUFzQnhDLE1BQU0sT0FBTyxpQkFBa0IsU0FBUSxNQUEyQjtJQUNoRSxNQUFNLENBQUMsR0FBRyxHQUFHLGNBQWMsQ0FBQztJQUVwQixNQUFNLENBQTZCO0lBRW5DLFFBQVEsQ0FDZCxlQUF1QixFQUN2QixJQUErQixFQUMvQixLQUFpQztRQUVqQyxJQUFJLENBQUMsRUFBRSxDQUFDLGFBQWEsQ0FDbkIsSUFBSSxXQUFXLENBQUMsZUFBZSxFQUFFO1lBQy9CLE1BQU0sRUFBRSxFQUFFLElBQUksRUFBRSxLQUFLLEVBQUU7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ksQ0FBQyxRQUFRLENBQUMsQ0FBQztZQUMxQyxJQUFJLENBQUMsTUFBTSxFQUFFLEdBQUcsQ0FBQyxNQUFNLEVBQUUsSUFBSSxDQUFDLE1BQU0sQ0FBQyxDQUFDO1lBQ3RDLElBQUksQ0FBQyxNQUFNLEVBQUUsR0FBRyxDQUFDLE1BQU0sRUFBRSxJQUFJLENBQUMsTUFBTSxDQUFDLENBQUM7WUFDdEMsSUFBSSxDQUFDLE1BQU0sRUFBRSxHQUFHLENBQUMsVUFBVSxFQUFFLElBQUksQ0FBQyxVQUFVLENBQUMsQ0FBQztRQUNoRCxDQUFDO0lBQ0gsQ0FBQztJQUVELE9BQU8sQ0FBQyxFQUFlO1FBQ3JCLElBQUksQ0FBQyxJQUFJLENBQUMsRUFBRSxDQUFDLENBQUM7UUFDZCxJQUFJLENBQUMsTUFBTSxFQUFFLEtBQUssRUFBRSxDQUFDO0lBQ3ZCLENBQUMifQ== |
{ | ||
"name": "@ribajs/extras", | ||
"description": "Extras module for Riba.js", | ||
"version": "2.0.0-rc.11", | ||
"version": "2.0.0-rc.12", | ||
"type": "module", | ||
@@ -51,7 +51,7 @@ "engines": { | ||
"@babel/runtime-corejs3": "^7.23.9", | ||
"@ribajs/eslint-config": "^2.0.0-rc.11", | ||
"@ribajs/tsconfig": "^2.0.0-rc.11", | ||
"@types/jest": "^29.5.11", | ||
"@typescript-eslint/eslint-plugin": "^6.19.1", | ||
"@typescript-eslint/parser": "^6.19.1", | ||
"@ribajs/eslint-config": "^2.0.0-rc.12", | ||
"@ribajs/tsconfig": "^2.0.0-rc.12", | ||
"@types/jest": "^29.5.12", | ||
"@typescript-eslint/eslint-plugin": "^7.0.1", | ||
"@typescript-eslint/parser": "^7.0.1", | ||
"babel-loader": "^9.1.3", | ||
@@ -65,12 +65,12 @@ "babel-plugin-array-includes": "^2.0.3", | ||
"jest-extended": "^4.0.2", | ||
"prettier": "^3.2.4", | ||
"prettier": "^3.2.5", | ||
"ts-jest": "^29.1.2", | ||
"typescript": "5.3.3", | ||
"webpack": "^5.90.0", | ||
"webpack": "^5.90.1", | ||
"webpack-cli": "^5.1.4" | ||
}, | ||
"dependencies": { | ||
"@ribajs/core": "^2.0.0-rc.11", | ||
"@ribajs/events": "^2.0.0-rc.11", | ||
"@ribajs/utils": "^2.0.0-rc.11", | ||
"@ribajs/core": "^2.0.0-rc.12", | ||
"@ribajs/events": "^2.0.0-rc.12", | ||
"@ribajs/utils": "^2.0.0-rc.12", | ||
"ev-emitter": "^2.1.2", | ||
@@ -77,0 +77,0 @@ "imagesloaded": "github:JumpLink/imagesloaded" |
@@ -24,3 +24,3 @@ import { Binder } from "@ribajs/core"; | ||
*/ | ||
export class ImageEventsBinder extends Binder<string, HTMLElement> { | ||
export class ImageEventsBinder extends Binder<any, HTMLElement> { | ||
static key = "image-events"; | ||
@@ -33,3 +33,3 @@ | ||
load: ImagesLoaded.ImagesLoaded, | ||
image?: ImagesLoaded.LoadingImage, | ||
image?: ImagesLoaded.LoadingImage | ||
) { | ||
@@ -39,3 +39,3 @@ this.el.dispatchEvent( | ||
detail: { load, image }, | ||
}), | ||
}) | ||
); | ||
@@ -49,3 +49,5 @@ } | ||
bind(el: HTMLImageElement) { | ||
bind(el: HTMLElement) { | ||
this.unbind(); | ||
this.events = imagesLoaded(el); | ||
@@ -69,6 +71,6 @@ | ||
routine() { | ||
// nothing yet | ||
routine(el: HTMLElement) { | ||
this.bind(el); | ||
this.events?.check(); | ||
} | ||
} |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
352965
5306
Updated@ribajs/core@^2.0.0-rc.12
Updated@ribajs/events@^2.0.0-rc.12
Updated@ribajs/utils@^2.0.0-rc.12