@tomasvn/glightbox 0.0.0-stage → 3.3.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.editorconfig +16 -0
- package/.eslintrc.json +94 -0
- package/.github/FUNDING.yml +3 -0
- package/.github/ISSUE_TEMPLATE/bug_report.md +41 -0
- package/.github/ISSUE_TEMPLATE/feature_request.md +23 -0
- package/.github/stale.yml +21 -0
- package/.github/workflows/greetings.yml +13 -0
- package/.lando.yml +10 -0
- package/.prettierignore +1 -0
- package/.prettierrc.json +31 -0
- package/CHANGELOG.md +247 -0
- package/CONTRIBUTING.md +29 -0
- package/LICENSE.md +21 -0
- package/README.md +710 -2
- package/bower.json +29 -0
- package/development/jscompiler.js +84 -0
- package/development/notifications.js +15 -0
- package/development/package.js +116 -0
- package/development/postcss.js +63 -0
- package/development/watcher.js +105 -0
- package/dist/css/glightbox.css +939 -0
- package/dist/css/glightbox.min.css +1 -0
- package/dist/js/glightbox.js +3087 -0
- package/dist/js/glightbox.min.js +1 -0
- package/index.d.ts +570 -0
- package/package.json +55 -4
- package/src/js/.jshintrc +6 -0
- package/src/js/core/drag.js +219 -0
- package/src/js/core/keyboard-navigation.js +98 -0
- package/src/js/core/slide-parser.js +231 -0
- package/src/js/core/slide.js +245 -0
- package/src/js/core/touch-events.js +378 -0
- package/src/js/core/touch-navigation.js +287 -0
- package/src/js/core/zoom.js +156 -0
- package/src/js/glightbox.js +1341 -0
- package/src/js/slides/iframe.js +24 -0
- package/src/js/slides/image.js +56 -0
- package/src/js/slides/inline.js +71 -0
- package/src/js/slides/video.js +105 -0
- package/src/js/utils/helpers.js +541 -0
- package/src/postcss/glightbox.css +723 -0
package/.editorconfig
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# editorconfig.org
|
|
2
|
+
|
|
3
|
+
root = true
|
|
4
|
+
|
|
5
|
+
[*]
|
|
6
|
+
charset = utf-8
|
|
7
|
+
indent_size = 4
|
|
8
|
+
indent_style = space
|
|
9
|
+
insert_final_newline = true
|
|
10
|
+
trim_trailing_whitespace = true
|
|
11
|
+
|
|
12
|
+
[*.{json,yml}]
|
|
13
|
+
indent_size = 2
|
|
14
|
+
|
|
15
|
+
[*.md]
|
|
16
|
+
trim_trailing_whitespace = false
|
package/.eslintrc.json
ADDED
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
{
|
|
2
|
+
"parserOptions": {
|
|
3
|
+
"ecmaVersion": 12,
|
|
4
|
+
"sourceType": "module",
|
|
5
|
+
"ecmaFeatures": {
|
|
6
|
+
"jsx": true
|
|
7
|
+
}
|
|
8
|
+
},
|
|
9
|
+
"rules": {
|
|
10
|
+
"semi": ["warn", "always"],
|
|
11
|
+
"no-extra-semi": "error",
|
|
12
|
+
"brace-style": "error",
|
|
13
|
+
"curly": "error",
|
|
14
|
+
"eqeqeq": "off",
|
|
15
|
+
"block-spacing": "error",
|
|
16
|
+
"camelcase": "error",
|
|
17
|
+
"new-cap": "error",
|
|
18
|
+
"no-const-assign": "error",
|
|
19
|
+
"no-dupe-args": "error",
|
|
20
|
+
"no-dupe-class-members": "error",
|
|
21
|
+
"no-dupe-keys": "error",
|
|
22
|
+
"no-duplicate-imports": "error",
|
|
23
|
+
"no-empty-character-class": "error",
|
|
24
|
+
"no-empty": "off",
|
|
25
|
+
"no-eval": "error",
|
|
26
|
+
"no-ex-assign": "error",
|
|
27
|
+
"no-extend-native": "error",
|
|
28
|
+
"no-extra-boolean-cast": "error",
|
|
29
|
+
"no-extra-parens": ["warn", "functions"],
|
|
30
|
+
"no-fallthrough": "error",
|
|
31
|
+
"no-floating-decimal": "error",
|
|
32
|
+
"no-implied-eval": "error",
|
|
33
|
+
"no-inner-declarations": "error",
|
|
34
|
+
"no-lone-blocks": "error",
|
|
35
|
+
"no-mixed-spaces-and-tabs": "error",
|
|
36
|
+
"no-multi-spaces": "error",
|
|
37
|
+
"no-new-func": "error",
|
|
38
|
+
"no-new-object": "error",
|
|
39
|
+
"no-new-require": "error",
|
|
40
|
+
"no-new-symbol": "error",
|
|
41
|
+
"no-new-wrappers": "error",
|
|
42
|
+
"no-redeclare": "error",
|
|
43
|
+
"no-self-assign": "error",
|
|
44
|
+
"no-self-compare": "error",
|
|
45
|
+
"no-sequences": "error",
|
|
46
|
+
"no-shadow-restricted-names": "error",
|
|
47
|
+
"no-sparse-arrays": "error",
|
|
48
|
+
"no-template-curly-in-string": "error",
|
|
49
|
+
"no-this-before-super": "error",
|
|
50
|
+
"no-throw-literal": "error",
|
|
51
|
+
"no-undef-init": "error",
|
|
52
|
+
"no-unsafe-finally": "error",
|
|
53
|
+
"no-useless-constructor": "error",
|
|
54
|
+
"no-useless-rename": "error",
|
|
55
|
+
"no-unexpected-multiline": "error",
|
|
56
|
+
"no-whitespace-before-property": "error",
|
|
57
|
+
"space-before-blocks": "warn",
|
|
58
|
+
"new-parens": "error",
|
|
59
|
+
"space-in-parens": "error",
|
|
60
|
+
"space-unary-ops": "error",
|
|
61
|
+
"keyword-spacing": "warn",
|
|
62
|
+
"template-curly-spacing": "warn",
|
|
63
|
+
"use-isnan": "warn",
|
|
64
|
+
"constructor-super": "error",
|
|
65
|
+
"no-array-constructor": "error",
|
|
66
|
+
"quotes": ["error", "single"],
|
|
67
|
+
"comma-style": ["error", "last"],
|
|
68
|
+
"comma-dangle": [
|
|
69
|
+
"warn",
|
|
70
|
+
{
|
|
71
|
+
"arrays": "never",
|
|
72
|
+
"objects": "never",
|
|
73
|
+
"imports": "never",
|
|
74
|
+
"exports": "never",
|
|
75
|
+
"functions": "never"
|
|
76
|
+
}
|
|
77
|
+
],
|
|
78
|
+
"space-before-function-paren": [
|
|
79
|
+
"off",
|
|
80
|
+
{
|
|
81
|
+
"anonymous": "always",
|
|
82
|
+
"named": "always",
|
|
83
|
+
"asyncArrow": "always"
|
|
84
|
+
}
|
|
85
|
+
],
|
|
86
|
+
"func-call-spacing": ["error", "never"],
|
|
87
|
+
"key-spacing": ["error", { "beforeColon": false }],
|
|
88
|
+
"one-var": ["off"],
|
|
89
|
+
"operator-linebreak": "off",
|
|
90
|
+
"space-infix-ops": ["error"],
|
|
91
|
+
"comma-spacing": ["error", { "before": false, "after": true }],
|
|
92
|
+
"no-unused-vars": ["warn", { "vars": "local", "args": "none", "ignoreRestSiblings": false }]
|
|
93
|
+
}
|
|
94
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: Bug report
|
|
3
|
+
about: Create a report to help us improve
|
|
4
|
+
title: ''
|
|
5
|
+
labels: ''
|
|
6
|
+
assignees: ''
|
|
7
|
+
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
**Describe the bug**
|
|
11
|
+
A clear and concise description of what the bug is.
|
|
12
|
+
|
|
13
|
+
**Are you able to reproduce the bug in the demo site**
|
|
14
|
+
Yes|No.
|
|
15
|
+
|
|
16
|
+
**To Reproduce**
|
|
17
|
+
Steps to reproduce the behavior:
|
|
18
|
+
1. Go to '...'
|
|
19
|
+
2. Click on '....'
|
|
20
|
+
3. Scroll down to '....'
|
|
21
|
+
4. See error
|
|
22
|
+
|
|
23
|
+
**Expected behavior**
|
|
24
|
+
A clear and concise description of what you expected to happen.
|
|
25
|
+
|
|
26
|
+
**Post the code you are using**
|
|
27
|
+
Help me solve issues faster, if I can copy paste your code I can try to reproduce and fix the bug faster.
|
|
28
|
+
|
|
29
|
+
**Screenshots**
|
|
30
|
+
If applicable, add screenshots to help explain your problem.
|
|
31
|
+
|
|
32
|
+
**Desktop:**
|
|
33
|
+
- OS: [e.g. iOS]
|
|
34
|
+
- Browser [e.g. chrome, safari]
|
|
35
|
+
- Version [e.g. 22]
|
|
36
|
+
|
|
37
|
+
**Smartphone:**
|
|
38
|
+
- Device: [e.g. iPhone6]
|
|
39
|
+
- OS: [e.g. iOS8.1]
|
|
40
|
+
- Browser [e.g. stock browser, safari]
|
|
41
|
+
- Version [e.g. 22]
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: Feature request
|
|
3
|
+
about: Suggest an idea for this project
|
|
4
|
+
title: ''
|
|
5
|
+
labels: ''
|
|
6
|
+
assignees: ''
|
|
7
|
+
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
**Important.**
|
|
11
|
+
Before posting a feature request please make sure to search the closed issues, maybe the feature you want to implement has already been asked and denied for not providing a valid explanation or simply because it was something the user wanted for him or his project.
|
|
12
|
+
|
|
13
|
+
**Please describe the feature you want to be implemented.**
|
|
14
|
+
Please note: features should be something that everyone can use and not just something you need for your project.
|
|
15
|
+
|
|
16
|
+
**Explain why the feature is useful**
|
|
17
|
+
Describe some usage cases.
|
|
18
|
+
|
|
19
|
+
**Have you seen it somewhere else?**
|
|
20
|
+
If so please provide live examples, images, videos, etc. anything that help us understand the feature request
|
|
21
|
+
|
|
22
|
+
**Additional context**
|
|
23
|
+
Add any other context or screenshots about the feature request here.
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# Number of days of inactivity before an issue becomes stale
|
|
2
|
+
daysUntilStale: 280
|
|
3
|
+
# Number of days of inactivity before a stale issue is closed
|
|
4
|
+
daysUntilClose: 200
|
|
5
|
+
# Issues with these labels will never be considered stale
|
|
6
|
+
exemptLabels:
|
|
7
|
+
- pinned
|
|
8
|
+
- security
|
|
9
|
+
- enhancement
|
|
10
|
+
- bug
|
|
11
|
+
- wontfix
|
|
12
|
+
- feature-request
|
|
13
|
+
- feature request
|
|
14
|
+
# Label to use when marking an issue as stale
|
|
15
|
+
staleLabel: wontfix
|
|
16
|
+
# Comment to post when marking an issue as stale. Set to `false` to disable
|
|
17
|
+
markComment: >
|
|
18
|
+
This issue has been automatically marked as stale because it has not had
|
|
19
|
+
recent activity. It will be closed if no further activity occurs.
|
|
20
|
+
# Comment to post when closing a stale issue. Set to `false` to disable
|
|
21
|
+
closeComment: false
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
name: Greetings
|
|
2
|
+
|
|
3
|
+
on: [pull_request]
|
|
4
|
+
|
|
5
|
+
jobs:
|
|
6
|
+
greeting:
|
|
7
|
+
runs-on: ubuntu-latest
|
|
8
|
+
steps:
|
|
9
|
+
- uses: actions/first-interaction@v1
|
|
10
|
+
with:
|
|
11
|
+
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
|
12
|
+
issue-message: ''
|
|
13
|
+
pr-message: 'Thank you for your contribution to this project, please make sure that you have read the CONTRIBUTING.md file and that your PR follows the guidelines mentioned there, if everything is ok we will review it as soon as posible'
|
package/.lando.yml
ADDED
package/.prettierignore
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
dist/*.js
|
package/.prettierrc.json
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
{
|
|
2
|
+
"trailingComma": "none",
|
|
3
|
+
"tabWidth": 4,
|
|
4
|
+
"printWidth": 220,
|
|
5
|
+
"proseWrap": "never",
|
|
6
|
+
"semi": true,
|
|
7
|
+
"singleQuote": true,
|
|
8
|
+
"jsxBracketSameLine": true,
|
|
9
|
+
"arrowParens": "always",
|
|
10
|
+
"htmlWhitespaceSensitivity": "ignore",
|
|
11
|
+
"overrides": [
|
|
12
|
+
{
|
|
13
|
+
"files": "*.json",
|
|
14
|
+
"options": {
|
|
15
|
+
"tabWidth": 2
|
|
16
|
+
}
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
"files": "*.md",
|
|
20
|
+
"options": {
|
|
21
|
+
"tabWidth": 2
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
"files": "*.yml",
|
|
26
|
+
"options": {
|
|
27
|
+
"tabWidth": 2
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
]
|
|
31
|
+
}
|
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,247 @@
|
|
|
1
|
+
# Change Log
|
|
2
|
+
|
|
3
|
+
All notable changes to this project will be documented in this file.
|
|
4
|
+
|
|
5
|
+
### 3.3.2
|
|
6
|
+
|
|
7
|
+
- Fixed: elements array type
|
|
8
|
+
- Fixed: `open` / `close` type correction, resolve local TS error
|
|
9
|
+
- Feat: release patched version under `@tomasvn/glightbox`
|
|
10
|
+
|
|
11
|
+
## 3.3.1
|
|
12
|
+
|
|
13
|
+
- Fixed: handle optional slide trigger node for max height calculation
|
|
14
|
+
- Improved: types.d.ts mark some params as optional
|
|
15
|
+
|
|
16
|
+
## 3.3.0
|
|
17
|
+
|
|
18
|
+
- New: glightbox types #411
|
|
19
|
+
- New: extend provider regex for ytb shorts #404
|
|
20
|
+
- Fixed: Fix height calculation for lightbox with description and height set #426
|
|
21
|
+
- Fixed: Don't set any font-family #424
|
|
22
|
+
|
|
23
|
+
## 3.2.0
|
|
24
|
+
|
|
25
|
+
- New: Support for videos without extension
|
|
26
|
+
- Updated: Plyr to 3.6.12
|
|
27
|
+
- Fixed: Inline content not centered on tablets #295
|
|
28
|
+
- Fixed: Duplicated CSS properties #293
|
|
29
|
+
- Fixed: YouTube video button not clickable on iOS #298
|
|
30
|
+
|
|
31
|
+
## 3.1.0
|
|
32
|
+
|
|
33
|
+
- New: Added Avif image support [@dramspro](https://github.com/biati-digital/glightbox/pull/266)
|
|
34
|
+
- New: Add support for responsive images [@gaborbsd](https://github.com/biati-digital/glightbox/pull/264)
|
|
35
|
+
- Updated: playsinline video attribute
|
|
36
|
+
- Updated: url check to allow query parameters in video and images
|
|
37
|
+
- Fixed: Image description/shadow off on mobile device #268
|
|
38
|
+
- Fixed: You can zoom next slide image if current slide is not full height #261
|
|
39
|
+
- Fixed: Draggable option not working with "setElements" #257
|
|
40
|
+
|
|
41
|
+
## 3.0.9
|
|
42
|
+
|
|
43
|
+
- Updated: Plyr to 3.6.8
|
|
44
|
+
- Improved: JS error when the description attribute is an invalid selector
|
|
45
|
+
- Fixed: Media Buttons Not responding on Android #233
|
|
46
|
+
- Fixed: When touch is activated images swipe independently of their descriptions #238
|
|
47
|
+
- Fixed: Width / Height data attributes do not work for image types #234
|
|
48
|
+
- Fixed: Adds missing size unit of video description on resize #229
|
|
49
|
+
|
|
50
|
+
## 3.0.8
|
|
51
|
+
|
|
52
|
+
- New: Added Aria-hidden on all root elements except the glightbox-container
|
|
53
|
+
- Fixed: Video in portrait mode is cropped
|
|
54
|
+
- Fixed: Video always has maxWidth 900px because of hardcoded setting
|
|
55
|
+
- Fixed: Removed explicit tabindex from navigation buttons
|
|
56
|
+
|
|
57
|
+
## 3.0.7
|
|
58
|
+
|
|
59
|
+
- Fixed: Lightbox playing incorrect video with multiple videos in gallery #187
|
|
60
|
+
- Fixed: Draggable: false option not working #192
|
|
61
|
+
- Fixed: Links not working inside inline content in mobile devices
|
|
62
|
+
- Fixed: moreLength not working correctly on mobile if description has HTML
|
|
63
|
+
- Added: Added plugins option for a future release that will allow extending GLightbox with plugins
|
|
64
|
+
- Changed: Plyr fullscreen set to iosNative
|
|
65
|
+
- Changed: Renamed skin option to theme for a future release that will allow creating themes like plugins, skin still works but will be replaced in a future relase
|
|
66
|
+
|
|
67
|
+
## 3.0.6
|
|
68
|
+
|
|
69
|
+
- Fixed: Events cleanup on `destroy()` method causes exception #175
|
|
70
|
+
- Fixed: "data-title" Getting Overwritten when "title" is present #178
|
|
71
|
+
- Fixed: IE 11 "Multiple definitions of a property not allowed in strict mode when bundling and minifying glightbox #155
|
|
72
|
+
- Fixed: Cannot add new slides #166
|
|
73
|
+
- Fixed: Video not playing on mobile #160
|
|
74
|
+
- Improved: Plyr will only be loaded if it's already used in the site
|
|
75
|
+
- New: Updated PLYR version to 3.6.3
|
|
76
|
+
- New: Added new option "autofocusVideos" to enable all Plyr shortcuts for the video player
|
|
77
|
+
- New: Improved events to use a generic way to access data
|
|
78
|
+
- New: Improved code
|
|
79
|
+
|
|
80
|
+
## 3.0.5
|
|
81
|
+
|
|
82
|
+
- Fixed: IE11 does not support ".includes()"
|
|
83
|
+
- Fixed: Clicking outside the content to close only works in specific areas
|
|
84
|
+
- Fixed: openEffect / closeEffect no longer accepting "none"
|
|
85
|
+
|
|
86
|
+
## 3.0.4
|
|
87
|
+
|
|
88
|
+
- New: New way to listen for events, the old events will still work but will be removed in a future update. See the Events section in the README
|
|
89
|
+
- New: Added new methods "slidePlayerPause" and "slidePlayerPlay" so in the future they will replace "playSlideVideo" and "stopSlideVideo" to provide support for audio slides in a future update
|
|
90
|
+
- New: Add preventDefault via touchstart on lightbox to prevent navigation swipe
|
|
91
|
+
- Fixed: e.getAttribute is not a function when there are no nodes in the gallery
|
|
92
|
+
|
|
93
|
+
## 3.0.3
|
|
94
|
+
|
|
95
|
+
- New: Option "dragAutoSnap" to control the mouse drag auto close or change slide
|
|
96
|
+
- Fixed: Multiple galleries not working
|
|
97
|
+
- Fixed: Setting the elements directly using an object triggered error
|
|
98
|
+
|
|
99
|
+
## 3.0.2
|
|
100
|
+
|
|
101
|
+
- New: Option "zoomable" to enable or disable zoomable images
|
|
102
|
+
- New: Option "preload" to enable or disable preloading
|
|
103
|
+
- New: Option "draggable" to go to prev/next slide by mouse dragging. Thanks to @Hirbod for the donation to make this happen
|
|
104
|
+
- New: Option "dragToleranceX" Used with draggable. Number of pixels the user has to drag to go to prev or next slide
|
|
105
|
+
- New: Option "dragToleranceY" Used with draggable. Number of pixels the user has to drag up or down to close the lightbox (Set 0 to disable vertical drag)
|
|
106
|
+
- New: The code was refactored to make it easier to maintain
|
|
107
|
+
- Fixed: data gallery stopped working
|
|
108
|
+
- Fixed: iOS bug with Vimeo iframe when fullscreen button pressed
|
|
109
|
+
- Fixed: "See more" link in the description throws an JS error when clicked
|
|
110
|
+
- Fixed: Videos not resized vertically when window height was smaller than the window width
|
|
111
|
+
|
|
112
|
+
## 3.0.1
|
|
113
|
+
|
|
114
|
+
- Fixed: vertical scrolling of descriptions [@zothynine](https://github.com/biati-digital/glightbox/pull/134)
|
|
115
|
+
- Fixed: CSS properties bug
|
|
116
|
+
- Fixed: Passing null as selector throws an exception
|
|
117
|
+
|
|
118
|
+
## 3.0.0
|
|
119
|
+
|
|
120
|
+
- New: New methods to access player instances "getSlidePlayerInstance(index or node) and getAllPlayers"
|
|
121
|
+
- New: Access player instance from afterSlideChange and beforeSlideChange"
|
|
122
|
+
- New: New Method removeSlide(1) remove slide at the specified index, it works even when the lightbox is open
|
|
123
|
+
- New: insertSlide now works even when the lightbox is open
|
|
124
|
+
- New: Added Accesibility features to slides
|
|
125
|
+
- New: Enabled touchNavigation for all devices that support touch events and not only mobile devices
|
|
126
|
+
- Changed: afterSlideLoad and beforeSlideLoad methods to follow the same variables as afterSlideChange, beforeSlideChange
|
|
127
|
+
- Fixed: Calling `destroy()` throws an error when modal is not open
|
|
128
|
+
- Fixed: Navigation not disabled correctly when only one slide
|
|
129
|
+
|
|
130
|
+
## 2.0.6
|
|
131
|
+
|
|
132
|
+
- New: Now you can define width and height as 900px, 95%, 100vw, 100vh so you can have full screen content
|
|
133
|
+
- New: Now you can define custom html or a node in the slide data to append it to the slide (view the API section)
|
|
134
|
+
- New: Now you can use any attribute as selector for example '.glightbox' or 'data-glightbox' or '\*[data-glightbox]'
|
|
135
|
+
- New: Method "openAt" you can open the lightbox at specific index eg: lightbox.openAt(2);
|
|
136
|
+
- New: Method "insertSlide" that allows you to append a slide at specified index
|
|
137
|
+
- Fixed Tab Key Doesn't Work on Form Within GLightbox Inline Content
|
|
138
|
+
- Fixed Scrolling Description triggers closing the lightbox on touch devices
|
|
139
|
+
- Fixed Page jumps depending on page scrollbar
|
|
140
|
+
- Fixed Overriding default plyr settings does not merge correctly
|
|
141
|
+
- Fixed fullscreen video button on ios
|
|
142
|
+
- Moved plyr.ratio to plyr.config.ratio
|
|
143
|
+
|
|
144
|
+
## 2.0.5
|
|
145
|
+
|
|
146
|
+
- New: Loop, renamed loopAtEnd to loop and now works in both directions
|
|
147
|
+
- New: added touchFollowAxis, for mobile when dragging the media will follow the same axis, set to false to move media as you wish
|
|
148
|
+
- New: added jpe format
|
|
149
|
+
- Fixed .mov videos not recognized as videos
|
|
150
|
+
|
|
151
|
+
## 2.0.4
|
|
152
|
+
|
|
153
|
+
- Fixed some errors when zooming and dragging images
|
|
154
|
+
- Fixed description position not respected when configured globally
|
|
155
|
+
- Fixed local videos not resized correctly when entered fullscreen
|
|
156
|
+
|
|
157
|
+
## 2.0.3
|
|
158
|
+
|
|
159
|
+
- New: Zooming images. Now you can zoom images on desktop if image is too large
|
|
160
|
+
- New: Now you can also define the slide description using the content of any div you want.
|
|
161
|
+
- New: Replaced png icons with svg and added options to customize them.
|
|
162
|
+
- Fixed responsive videos not resizing correctly when resizing the window vertically
|
|
163
|
+
- Fixed responsive images not resizing correctly if they have description and the window height is lower that the slide height
|
|
164
|
+
- Fixed youtube video not detected correctly for urls like youtube(-nocookie).com/embed/...
|
|
165
|
+
|
|
166
|
+
## 2.0.2
|
|
167
|
+
|
|
168
|
+
- New: [Plyr player](https://plyr.io/), we have changed to this player so that way only one api is managed instead of 3
|
|
169
|
+
- New: Added tabindex accesibility to loop the controls with the tab key
|
|
170
|
+
- New: Inside inline content you can close the lightbox by adding the class **gtrigger-close** to any element
|
|
171
|
+
- Fixed StartAt not taking specified index
|
|
172
|
+
- Removed JWPlayer because that player implemented some restrictions unless you pay for a license
|
|
173
|
+
- Improved mobile touch events, swipe, move, zoom, etc.
|
|
174
|
+
- Changed: Youtube now by default uses youtube-nocookie.com, you can enable cookies in the config with youtube.nocookie to false
|
|
175
|
+
- Removed option videosHeight. The height is automatic depending the video width and ratio.
|
|
176
|
+
- Removed Gulp and replaced for pure nodejs scripts
|
|
177
|
+
- Improved documentation
|
|
178
|
+
|
|
179
|
+
## 2.0.1
|
|
180
|
+
|
|
181
|
+
- Fixed Mobile navigation
|
|
182
|
+
- Fixed slide width for external sources
|
|
183
|
+
|
|
184
|
+
## 2.0.0
|
|
185
|
+
|
|
186
|
+
- New: Delegated permissions to cross-origin iframes (for the new browsers autoplay restrictions)
|
|
187
|
+
- Fixed youtube, vimeo autoplay when changing slides
|
|
188
|
+
- Fixed lightbox won't fit screen with description
|
|
189
|
+
- Fixed Removed global body variable that was causing some problems
|
|
190
|
+
|
|
191
|
+
## 1.0.9
|
|
192
|
+
|
|
193
|
+
- Added svg to source types so it can be displayed as an image [@tuomassalo](https://github.com/mcstudios/glightbox/pull/40)
|
|
194
|
+
- Added contributing file
|
|
195
|
+
- Updated dependencies [@tuomassalo](https://github.com/mcstudios/glightbox/pull/40).
|
|
196
|
+
- Removed demo folder from npm
|
|
197
|
+
|
|
198
|
+
## 1.0.8
|
|
199
|
+
|
|
200
|
+
- New: You can define each slide option in a different data attribute (data-title="example" data-description="...")
|
|
201
|
+
- Fixed youtube and vimeo autoplay when opened for the first time
|
|
202
|
+
- Fixed global slide params not working
|
|
203
|
+
- Fixed some issues on IE11
|
|
204
|
+
- Fixed using characters : or ; in slide description
|
|
205
|
+
|
|
206
|
+
## 1.0.7
|
|
207
|
+
|
|
208
|
+
- New: Added reload method, useful when injecting content with ajax, cloning nodes, etc.
|
|
209
|
+
- Fixed closeButton setting not removing the element
|
|
210
|
+
- Fixed video not displayed on mobile devices
|
|
211
|
+
|
|
212
|
+
## 1.0.6
|
|
213
|
+
|
|
214
|
+
- New: Now you can set individual width and height for each slide with inlines or iframes.
|
|
215
|
+
- New: Now you can set individual source types for each slide ('type': 'image' | 'iframe' | 'video' | 'inline' | 'external).
|
|
216
|
+
- New: Published on npm
|
|
217
|
+
- New: Published on bower
|
|
218
|
+
- Fixed afterSlideLoad only triggered one time for all the slides
|
|
219
|
+
- Fixed a small space between the image and description when is set to top or bottom
|
|
220
|
+
|
|
221
|
+
## 1.0.5
|
|
222
|
+
|
|
223
|
+
- New: Added none as a new option to disable open, close and slide animations
|
|
224
|
+
- New: Added new options (touchNavigation, keyboardNavigation, closeOnOutsideClick) to enable or disable user interaction
|
|
225
|
+
- Fixed open and close effect not taking a custom animation
|
|
226
|
+
- Fixed an error when calling the destroy method and no videos were present in the slider
|
|
227
|
+
|
|
228
|
+
## 1.0.4
|
|
229
|
+
|
|
230
|
+
- Improved the open method so it can be called without duplicating the structure and events
|
|
231
|
+
- New: The original node is passed to events like beforeSlideChange, afterSlideChange, etc.
|
|
232
|
+
|
|
233
|
+
## 1.0.3
|
|
234
|
+
|
|
235
|
+
- New: Added option moreLength to control the number of characters in the description for mobile devices
|
|
236
|
+
|
|
237
|
+
## 1.0.2
|
|
238
|
+
|
|
239
|
+
- Fixed instance not returned and unable to call public methods
|
|
240
|
+
|
|
241
|
+
## 1.0.1
|
|
242
|
+
|
|
243
|
+
- Fixed large images not displayed correctly
|
|
244
|
+
|
|
245
|
+
## 1.0.0
|
|
246
|
+
|
|
247
|
+
- Initial release
|
package/CONTRIBUTING.md
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# Contributing to GLightbox.js
|
|
2
|
+
|
|
3
|
+
Please read these guidelines before contributing code.
|
|
4
|
+
|
|
5
|
+
## :nut_and_bolt: Setting up the development environment
|
|
6
|
+
|
|
7
|
+
- Fork and clone the repository
|
|
8
|
+
- `npm install`
|
|
9
|
+
- `npm run watch`
|
|
10
|
+
- To update js and css files, use the `src` folder: src/js/glightbox.js and src/postcss/glightbox.css These files will be compiled automatically with every change to the `dist` folder (do not modify the dist files directly)
|
|
11
|
+
|
|
12
|
+
## :bug: Fixing a Bug
|
|
13
|
+
|
|
14
|
+
When fixing a bug please make sure to test it in several browsers including ie11. If you are not able to do so, mention that in a PR comment, so other contributors can do it. once your code is working please run the following command "eslint src/js" to verify that your code is following the same coding standards
|
|
15
|
+
|
|
16
|
+
## :tada: Proposing a Change
|
|
17
|
+
|
|
18
|
+
When implementing a feature please create an issue first explaining your idea and asking whether there's need for such a feature. Remember the script's core philosophy is to stay simple and minimal, doing one thing and doing it right.
|
|
19
|
+
|
|
20
|
+
## :pencil: Before you open a Pull Request
|
|
21
|
+
|
|
22
|
+
- Follow the same coding style.
|
|
23
|
+
- Run eslint to verify your code, run the following command "eslint src/js" and fix any error you find in your code
|
|
24
|
+
- **DO NOT** commit changes in the dist directory, this files are created automatically.
|
|
25
|
+
- Follow Git best practices (especially use meaningful commit messages).
|
|
26
|
+
- Describe thoroughly you work in a PR comment.
|
|
27
|
+
- Be patient and understanding. It's a side project, done in free time.
|
|
28
|
+
|
|
29
|
+
Thank you to everyone who has contributed to GLightbox.js!
|
package/LICENSE.md
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2018 Biati Digital https://www.biati.digital
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|