Skip to content

Commit

Permalink
fix(index.d.ts): cleanup
Browse files Browse the repository at this point in the history
chore: bump version
  • Loading branch information
tomasvn committed Aug 31, 2024
1 parent 039e1b3 commit 6c4c43b
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 41 deletions.
38 changes: 15 additions & 23 deletions dist/js/glightbox.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,20 @@
(global = global || self, global.GLightbox = factory());
}(this, (function () { 'use strict';

function _classCallCheck(a, n) {
if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function");
}
function _defineProperties(e, r) {
for (var t = 0; t < r.length; t++) {
var o = r[t];
o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o);
}
}
function _createClass(e, r, t) {
return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", {
writable: !1
}), e;
}
function _toPrimitive(t, r) {
if ("object" != typeof t || !t) return t;
var e = t[Symbol.toPrimitive];
Expand All @@ -27,28 +41,6 @@
return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
}, _typeof(o);
}
function _classCallCheck(instance, Constructor) {
if (!(instance instanceof Constructor)) {
throw new TypeError("Cannot call a class as a function");
}
}
function _defineProperties(target, props) {
for (var i = 0; i < props.length; i++) {
var descriptor = props[i];
descriptor.enumerable = descriptor.enumerable || false;
descriptor.configurable = true;
if ("value" in descriptor) descriptor.writable = true;
Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor);
}
}
function _createClass(Constructor, protoProps, staticProps) {
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
if (staticProps) _defineProperties(Constructor, staticProps);
Object.defineProperty(Constructor, "prototype", {
writable: false
});
return Constructor;
}

var uid = Date.now();
function extend() {
Expand Down Expand Up @@ -2037,7 +2029,7 @@
instance.events['touch'] = touchInstance;
}

var _version = '3.3.0';
var _version = '3.3.1';
var isMobile$1 = isMobile();
var isTouch$1 = isTouch();
var html = document.getElementsByTagName('html')[0];
Expand Down
2 changes: 1 addition & 1 deletion dist/js/glightbox.min.js

Large diffs are not rendered by default.

30 changes: 15 additions & 15 deletions index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -335,17 +335,17 @@ declare class GlightboxInit {
/**
* Initialize lightbox
*/
init(): void;
private init(): void;

/**
* Open lightbox
*/
open(element?: Element, startAt?: number): void
public open(element?: Element, startAt?: number): void

/**
* Open at specific index
*/
openAt(index?: number): void;
public openAt(index?: number): void;

/**
* Set Slide
Expand All @@ -361,19 +361,19 @@ declare class GlightboxInit {
* Load previous slide
* calls goToslide
*/
prevSlide(): void;
public prevSlide(): void;

/**
* Load next slide
* calls goToslide
*/
nextSlide(): void;
public nextSlide(): void;

/**
* Go to slide
* calls set slide
*/
goToSlide(index?: number): void;
public goToSlide(index?: number): void;

/**
* Insert slide
Expand All @@ -383,7 +383,7 @@ declare class GlightboxInit {
/**
* Remove slide
*/
removeSlide(index?: number): boolean | undefined;
public removeSlide(index?: number): boolean | undefined;

/**
* Slide In
Expand Down Expand Up @@ -477,12 +477,12 @@ declare class GlightboxInit {
/**
* Get the active slide
*/
getActiveSlide(): Element;
public getActiveSlide(): Element;

/**
* Get the active index
*/
getActiveSlideIndex(): number | undefined;
public getActiveSlideIndex(): number | undefined;

/**
* Get the defined
Expand All @@ -509,7 +509,7 @@ declare class GlightboxInit {
* Reload Lightbox
* reload and apply events to nodes
*/
reload(): void;
public reload(): void;

/**
* Update navigation classes on slide change
Expand All @@ -526,29 +526,29 @@ declare class GlightboxInit {
* closes the lightbox and removes the slides
* and some classes
*/
close(): boolean | undefined;
public close(): boolean | undefined;

/**
* Destroy lightbox
* and all events
*/
destroy(): void;
public destroy(): void;

/**
* Set event
*/
on(eventName: Glightbox.EventTypes, callback: () => void, once?: boolean): void;
public on(eventName: Glightbox.EventTypes, callback: () => void, once?: boolean): void;

/**
* Set event once
*/
once(eventName: Glightbox.EventTypes, callback: () => void): void;
public once(eventName: Glightbox.EventTypes, callback: () => void): void;

/**
* Triggers an specific event
* with data
*/
trigger<T extends Glightbox.EventTypes>(eventName: T, data?: Glightbox.Payload<T>): void;
public trigger<T extends Glightbox.EventTypes>(eventName: T, data?: Glightbox.Payload<T>): void;

/**
* Removes all events
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "glightbox",
"version": "3.3.0",
"version": "3.3.1",
"description": "Pure Javascript lightbox",
"main": "dist/js/glightbox.min.js",
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion src/js/glightbox.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import Slide from './core/slide.js';
import touchNavigation from './core/touch-navigation.js';
import * as _ from './utils/helpers.js';

const version = '3.3.0';
const version = '3.3.1';
const isMobile = _.isMobile();
const isTouch = _.isTouch();
const html = document.getElementsByTagName('html')[0];
Expand Down

0 comments on commit 6c4c43b

Please sign in to comment.