lightgallery 2.9.0 → 3.0.0-beta.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/LICENSE +690 -0
- package/README.md +31 -21
- package/dist/README.md +229 -0
- package/{css → dist/css}/lg-autoplay.css +7 -4
- package/{css → dist/css}/lg-autoplay.css.map +1 -1
- package/{css → dist/css}/lg-comments.css +0 -6
- package/{css → dist/css}/lg-comments.css.map +1 -1
- package/dist/css/lg-fullscreen.css +11 -0
- package/dist/css/lg-fullscreen.css.map +1 -0
- package/dist/css/lg-justified.css +37 -0
- package/dist/css/lg-justified.css.map +1 -0
- package/{css → dist/css}/lg-pager.css.map +1 -1
- package/{css → dist/css}/lg-rotate.css +0 -16
- package/{css → dist/css}/lg-rotate.css.map +1 -1
- package/dist/css/lg-rtl.css +94 -0
- package/dist/css/lg-rtl.css.map +1 -0
- package/{css → dist/css}/lg-share.css +4 -32
- package/dist/css/lg-share.css.map +1 -0
- package/{css → dist/css}/lg-thumbnail.css +7 -3
- package/dist/css/lg-thumbnail.css.map +1 -0
- package/{css → dist/css}/lg-transitions.css +10 -0
- package/dist/css/lg-transitions.css.map +1 -0
- package/{css → dist/css}/lg-zoom.css +20 -9
- package/dist/css/lg-zoom.css.map +1 -0
- package/{css → dist/css}/lightgallery-bundle.css +150 -118
- package/dist/css/lightgallery-bundle.css.map +1 -0
- package/dist/css/lightgallery-bundle.min.css +1 -0
- package/{css → dist/css}/lightgallery-core.css +49 -7
- package/dist/css/lightgallery-core.css.map +1 -0
- package/{css → dist/css}/lightgallery.css +105 -44
- package/dist/css/lightgallery.css.map +1 -0
- package/dist/lightgallery.es5.js +3797 -0
- package/dist/lightgallery.es5.js.map +1 -0
- package/dist/lightgallery.min.js +1 -0
- package/dist/lightgallery.umd.js +3800 -0
- package/dist/lightgallery.umd.js.map +1 -0
- package/dist/package.json +33 -0
- package/dist/plugins/autoplay/lg-autoplay.es5.js +193 -0
- package/dist/plugins/autoplay/lg-autoplay.es5.js.map +1 -0
- package/dist/plugins/autoplay/lg-autoplay.min.js +1 -0
- package/dist/plugins/autoplay/lg-autoplay.umd.js +196 -0
- package/dist/plugins/autoplay/lg-autoplay.umd.js.map +1 -0
- package/dist/plugins/autoplay/package.json +7 -0
- package/dist/plugins/comment/lg-comment.es5.js +136 -0
- package/dist/plugins/comment/lg-comment.es5.js.map +1 -0
- package/dist/plugins/comment/lg-comment.min.js +1 -0
- package/dist/plugins/comment/lg-comment.umd.js +139 -0
- package/dist/plugins/comment/lg-comment.umd.js.map +1 -0
- package/dist/plugins/comment/package.json +7 -0
- package/dist/plugins/fullscreen/lg-fullscreen.es5.js +114 -0
- package/dist/plugins/fullscreen/lg-fullscreen.es5.js.map +1 -0
- package/dist/plugins/fullscreen/lg-fullscreen.min.js +1 -0
- package/dist/plugins/fullscreen/lg-fullscreen.umd.js +117 -0
- package/dist/plugins/fullscreen/lg-fullscreen.umd.js.map +1 -0
- package/dist/plugins/fullscreen/package.json +7 -0
- package/dist/plugins/hash/lg-hash.es5.js +207 -0
- package/dist/plugins/hash/lg-hash.es5.js.map +1 -0
- package/dist/plugins/hash/lg-hash.min.js +1 -0
- package/dist/plugins/hash/lg-hash.umd.js +210 -0
- package/dist/plugins/hash/lg-hash.umd.js.map +1 -0
- package/dist/plugins/hash/package.json +7 -0
- package/dist/plugins/justified/lg-justified.es5.js +415 -0
- package/dist/plugins/justified/lg-justified.es5.js.map +1 -0
- package/dist/plugins/justified/lg-justified.min.js +1 -0
- package/dist/plugins/justified/lg-justified.umd.js +418 -0
- package/dist/plugins/justified/lg-justified.umd.js.map +1 -0
- package/dist/plugins/justified/package.json +7 -0
- package/dist/plugins/mediumZoom/lg-medium-zoom.es5.js +95 -0
- package/dist/plugins/mediumZoom/lg-medium-zoom.es5.js.map +1 -0
- package/dist/plugins/mediumZoom/lg-medium-zoom.min.js +1 -0
- package/dist/plugins/mediumZoom/lg-medium-zoom.umd.js +98 -0
- package/dist/plugins/mediumZoom/lg-medium-zoom.umd.js.map +1 -0
- package/dist/plugins/mediumZoom/package.json +7 -0
- package/dist/plugins/originCrop/lg-origin-crop.es5.js +622 -0
- package/dist/plugins/originCrop/lg-origin-crop.es5.js.map +1 -0
- package/dist/plugins/originCrop/lg-origin-crop.min.js +1 -0
- package/dist/plugins/originCrop/lg-origin-crop.umd.js +625 -0
- package/dist/plugins/originCrop/lg-origin-crop.umd.js.map +1 -0
- package/dist/plugins/pager/lg-pager.es5.js +96 -0
- package/dist/plugins/pager/lg-pager.es5.js.map +1 -0
- package/dist/plugins/pager/lg-pager.min.js +1 -0
- package/dist/plugins/pager/lg-pager.umd.js +99 -0
- package/dist/plugins/pager/lg-pager.umd.js.map +1 -0
- package/dist/plugins/pager/package.json +7 -0
- package/dist/plugins/relativeCaption/lg-relative-caption.es5.js +98 -0
- package/dist/plugins/relativeCaption/lg-relative-caption.es5.js.map +1 -0
- package/dist/plugins/relativeCaption/lg-relative-caption.min.js +1 -0
- package/dist/plugins/relativeCaption/lg-relative-caption.umd.js +101 -0
- package/dist/plugins/relativeCaption/lg-relative-caption.umd.js.map +1 -0
- package/dist/plugins/relativeCaption/package.json +7 -0
- package/dist/plugins/rotate/lg-rotate.es5.js +226 -0
- package/dist/plugins/rotate/lg-rotate.es5.js.map +1 -0
- package/dist/plugins/rotate/lg-rotate.min.js +1 -0
- package/dist/plugins/rotate/lg-rotate.umd.js +229 -0
- package/dist/plugins/rotate/lg-rotate.umd.js.map +1 -0
- package/dist/plugins/rotate/package.json +7 -0
- package/dist/plugins/share/lg-share.es5.js +309 -0
- package/dist/plugins/share/lg-share.es5.js.map +1 -0
- package/dist/plugins/share/lg-share.min.js +1 -0
- package/dist/plugins/share/lg-share.umd.js +312 -0
- package/dist/plugins/share/lg-share.umd.js.map +1 -0
- package/dist/plugins/share/package.json +7 -0
- package/dist/plugins/thumbnail/lg-thumbnail.es5.js +792 -0
- package/dist/plugins/thumbnail/lg-thumbnail.es5.js.map +1 -0
- package/dist/plugins/thumbnail/lg-thumbnail.min.js +1 -0
- package/dist/plugins/thumbnail/lg-thumbnail.umd.js +795 -0
- package/dist/plugins/thumbnail/lg-thumbnail.umd.js.map +1 -0
- package/dist/plugins/thumbnail/package.json +7 -0
- package/dist/plugins/video/lg-video.es5.js +518 -0
- package/dist/plugins/video/lg-video.es5.js.map +1 -0
- package/dist/plugins/video/lg-video.min.js +1 -0
- package/dist/plugins/video/lg-video.umd.js +521 -0
- package/dist/plugins/video/lg-video.umd.js.map +1 -0
- package/dist/plugins/video/package.json +7 -0
- package/dist/plugins/vimeoThumbnail/lg-vimeo-thumbnail.es5.js +72 -0
- package/dist/plugins/vimeoThumbnail/lg-vimeo-thumbnail.es5.js.map +1 -0
- package/dist/plugins/vimeoThumbnail/lg-vimeo-thumbnail.min.js +1 -0
- package/dist/plugins/vimeoThumbnail/lg-vimeo-thumbnail.umd.js +75 -0
- package/dist/plugins/vimeoThumbnail/lg-vimeo-thumbnail.umd.js.map +1 -0
- package/dist/plugins/vimeoThumbnail/package.json +7 -0
- package/dist/plugins/zoom/lg-zoom.es5.js +1412 -0
- package/dist/plugins/zoom/lg-zoom.es5.js.map +1 -0
- package/dist/plugins/zoom/lg-zoom.min.js +1 -0
- package/dist/plugins/zoom/lg-zoom.umd.js +1415 -0
- package/dist/plugins/zoom/lg-zoom.umd.js.map +1 -0
- package/dist/plugins/zoom/package.json +7 -0
- package/{scss → dist/scss}/_lg-theme-default.scss +68 -18
- package/{scss → dist/scss}/_lg-variables.scss +0 -1
- package/{scss → dist/scss}/lg-autoplay.scss +10 -4
- package/{scss → dist/scss}/lg-comments.scss +0 -8
- package/dist/scss/lg-fullscreen.scss +15 -0
- package/dist/scss/lg-justified.scss +63 -0
- package/{scss → dist/scss}/lg-rotate.scss +0 -24
- package/dist/scss/lg-rtl.scss +145 -0
- package/{scss → dist/scss}/lg-share.scss +6 -33
- package/{scss → dist/scss}/lg-thumbnail.scss +16 -5
- package/{scss → dist/scss}/lg-zoom.scss +46 -9
- package/{scss → dist/scss}/lightgallery-bundle.scss +0 -1
- package/{scss → dist/scss}/lightgallery-core.scss +73 -6
- package/{scss → dist/scss}/lightgallery.scss +0 -1
- package/{scss → dist/scss}/transitions/_lg-scale-up.scss +6 -0
- package/{scss → dist/scss}/transitions/_lg-slide-circular-vertical.scss +6 -0
- package/{scss → dist/scss}/transitions/_lg-slide-circular.scss +6 -0
- package/{scss → dist/scss}/transitions/_lg-soft-zoom.scss +6 -0
- package/{scss → dist/scss}/transitions/_lg-zoom-in-big.scss +6 -0
- package/{scss → dist/scss}/transitions/_lg-zoom-in-out.scss +6 -0
- package/{scss → dist/scss}/transitions/_lg-zoom-in.scss +6 -0
- package/{scss → dist/scss}/transitions/_lg-zoom-out-big.scss +6 -0
- package/{scss → dist/scss}/transitions/_lg-zoom-out-in.scss +6 -0
- package/{scss → dist/scss}/transitions/_lg-zoom-out.scss +6 -0
- package/dist/types/headless/announce.d.ts +22 -0
- package/dist/types/headless/emitter.d.ts +14 -0
- package/dist/types/headless/gestures.d.ts +128 -0
- package/dist/types/headless/hash-driver.d.ts +77 -0
- package/dist/types/headless/icons.d.ts +56 -0
- package/dist/types/headless/index.d.ts +34 -0
- package/dist/types/headless/items.d.ts +92 -0
- package/dist/types/headless/justified-layout.d.ts +71 -0
- package/dist/types/headless/license.d.ts +35 -0
- package/dist/types/headless/origin-crop.d.ts +135 -0
- package/dist/types/headless/origin.d.ts +65 -0
- package/dist/types/headless/plugin-slices.d.ts +64 -0
- package/dist/types/headless/preload.d.ts +36 -0
- package/dist/types/headless/responsive.d.ts +90 -0
- package/dist/types/headless/settings.d.ts +268 -0
- package/dist/types/headless/share-urls.d.ts +60 -0
- package/dist/types/headless/spring.d.ts +42 -0
- package/dist/types/headless/state.d.ts +63 -0
- package/dist/types/headless/thumb-math.d.ts +85 -0
- package/dist/types/headless/toolbar-overflow.d.ts +61 -0
- package/dist/types/headless/transition.d.ts +33 -0
- package/dist/types/headless/velocity.d.ts +31 -0
- package/dist/types/headless/video-urls.d.ts +64 -0
- package/dist/types/headless/zoom-math.d.ts +89 -0
- package/{index.d.ts → dist/types/index.d.ts} +9 -4
- package/{lg-events.d.ts → dist/types/lg-events.d.ts} +300 -300
- package/dist/types/lg-icons.d.ts +27 -0
- package/{lg-plugin.d.ts → dist/types/lg-plugin.d.ts} +7 -7
- package/{lg-settings.d.ts → dist/types/lg-settings.d.ts} +549 -425
- package/dist/types/lg-spring-runner.d.ts +14 -0
- package/dist/types/lg-toolbar-overflow.d.ts +36 -0
- package/{lg-utils.d.ts → dist/types/lg-utils.d.ts} +236 -228
- package/{lgQuery.d.ts → dist/types/lgQuery.d.ts} +56 -56
- package/{lightgallery.d.ts → dist/types/lightgallery.d.ts} +384 -305
- package/{plugins → dist/types/plugins}/autoplay/lg-autoplay-settings.d.ts +41 -38
- package/{plugins → dist/types/plugins}/autoplay/lg-autoplay.d.ts +22 -22
- package/{plugins → dist/types/plugins}/comment/lg-comment-settings.d.ts +36 -33
- package/{plugins → dist/types/plugins}/comment/lg-comment.d.ts +25 -25
- package/{plugins → dist/types/plugins}/fullscreen/lg-fullscreen-settings.d.ts +17 -14
- package/{plugins → dist/types/plugins}/fullscreen/lg-fullscreen.d.ts +16 -16
- package/dist/types/plugins/hash/lg-hash-settings.d.ts +28 -0
- package/{plugins → dist/types/plugins}/hash/lg-hash.d.ts +25 -23
- package/dist/types/plugins/justified/lg-justified-settings.d.ts +42 -0
- package/dist/types/plugins/justified/lg-justified.d.ts +55 -0
- package/{plugins → dist/types/plugins}/mediumZoom/lg-medium-zoom-settings.d.ts +16 -16
- package/{plugins → dist/types/plugins}/mediumZoom/lg-medium-zoom.d.ts +12 -12
- package/dist/types/plugins/originCrop/lg-origin-crop-settings.d.ts +12 -0
- package/dist/types/plugins/originCrop/lg-origin-crop.d.ts +79 -0
- package/{plugins → dist/types/plugins}/pager/lg-pager-settings.d.ts +7 -7
- package/{plugins → dist/types/plugins}/pager/lg-pager.d.ts +13 -13
- package/{plugins → dist/types/plugins}/relativeCaption/lg-relative-caption-settings.d.ts +7 -7
- package/{plugins → dist/types/plugins}/relativeCaption/lg-relative-caption.d.ts +14 -14
- package/{plugins → dist/types/plugins}/rotate/lg-rotate-settings.d.ts +47 -45
- package/{plugins → dist/types/plugins}/rotate/lg-rotate.d.ts +25 -24
- package/{plugins → dist/types/plugins}/share/lg-fb-share-utils.d.ts +2 -2
- package/{plugins → dist/types/plugins}/share/lg-pinterest-share-utils.d.ts +2 -2
- package/{plugins → dist/types/plugins}/share/lg-share-settings.d.ts +71 -56
- package/dist/types/plugins/share/lg-share.d.ts +33 -0
- package/dist/types/plugins/share/lg-twitter-share-utils.d.ts +4 -0
- package/{plugins → dist/types/plugins}/share/types.d.ts +6 -6
- package/{plugins → dist/types/plugins}/thumbnail/lg-thumbnail-settings.d.ts +85 -70
- package/dist/types/plugins/thumbnail/lg-thumbnail.d.ts +88 -0
- package/{plugins → dist/types/plugins}/video/lg-video-settings.d.ts +94 -71
- package/{plugins → dist/types/plugins}/video/lg-video.d.ts +116 -104
- package/{plugins → dist/types/plugins}/video/types.d.ts +8 -8
- package/{plugins → dist/types/plugins}/vimeoThumbnail/lg-vimeo-thumbnail-settings.d.ts +11 -11
- package/{plugins → dist/types/plugins}/vimeoThumbnail/lg-vimeo-thumbnail.d.ts +14 -14
- package/{plugins → dist/types/plugins}/zoom/lg-zoom-settings.d.ts +54 -51
- package/{plugins → dist/types/plugins}/zoom/lg-zoom.d.ts +145 -108
- package/{types.d.ts → dist/types/types.d.ts} +40 -40
- package/package.json +222 -8
- package/angular/10/README.md +0 -24
- package/angular/10/bundles/lightgallery-angular-10.umd.js +0 -289
- package/angular/10/bundles/lightgallery-angular-10.umd.js.map +0 -1
- package/angular/10/bundles/lightgallery-angular-10.umd.min.js +0 -2
- package/angular/10/bundles/lightgallery-angular-10.umd.min.js.map +0 -1
- package/angular/10/esm2015/lib/lightgallery-angular.component.js +0 -225
- package/angular/10/esm2015/lib/lightgallery-angular.module.js +0 -17
- package/angular/10/esm2015/lib/lightgallery-angular.service.js +0 -14
- package/angular/10/esm2015/lightgallery-angular-10.js +0 -5
- package/angular/10/esm2015/public-api.js +0 -7
- package/angular/10/fesm2015/lightgallery-angular-10.js +0 -261
- package/angular/10/fesm2015/lightgallery-angular-10.js.map +0 -1
- package/angular/10/lib/lightgallery-angular.component.d.ts +0 -39
- package/angular/10/lib/lightgallery-angular.component.d.ts.map +0 -1
- package/angular/10/lib/lightgallery-angular.module.d.ts +0 -7
- package/angular/10/lib/lightgallery-angular.module.d.ts.map +0 -1
- package/angular/10/lib/lightgallery-angular.service.d.ts +0 -7
- package/angular/10/lib/lightgallery-angular.service.d.ts.map +0 -1
- package/angular/10/lightgallery-angular-10.d.ts +0 -6
- package/angular/10/lightgallery-angular-10.d.ts.map +0 -1
- package/angular/10/package.json +0 -21
- package/angular/10/public-api.d.ts +0 -4
- package/angular/10/public-api.d.ts.map +0 -1
- package/angular/11/README.md +0 -24
- package/angular/11/bundles/lightgallery-angular-11.umd.js +0 -290
- package/angular/11/bundles/lightgallery-angular-11.umd.js.map +0 -1
- package/angular/11/bundles/lightgallery-angular-11.umd.min.js +0 -2
- package/angular/11/bundles/lightgallery-angular-11.umd.min.js.map +0 -1
- package/angular/11/esm2015/lib/lightgallery-angular.component.js +0 -225
- package/angular/11/esm2015/lib/lightgallery-angular.module.js +0 -18
- package/angular/11/esm2015/lib/lightgallery-angular.service.js +0 -14
- package/angular/11/esm2015/lightgallery-angular-11.js +0 -5
- package/angular/11/esm2015/public-api.js +0 -7
- package/angular/11/fesm2015/lightgallery-angular-11.js +0 -262
- package/angular/11/fesm2015/lightgallery-angular-11.js.map +0 -1
- package/angular/11/lib/lightgallery-angular.component.d.ts +0 -39
- package/angular/11/lib/lightgallery-angular.component.d.ts.map +0 -1
- package/angular/11/lib/lightgallery-angular.module.d.ts +0 -8
- package/angular/11/lib/lightgallery-angular.module.d.ts.map +0 -1
- package/angular/11/lib/lightgallery-angular.service.d.ts +0 -7
- package/angular/11/lib/lightgallery-angular.service.d.ts.map +0 -1
- package/angular/11/lightgallery-angular-11.d.ts +0 -6
- package/angular/11/lightgallery-angular-11.d.ts.map +0 -1
- package/angular/11/package.json +0 -21
- package/angular/11/public-api.d.ts +0 -4
- package/angular/11/public-api.d.ts.map +0 -1
- package/angular/12/README.md +0 -24
- package/angular/12/bundles/lightgallery-angular-12.umd.js +0 -296
- package/angular/12/bundles/lightgallery-angular-12.umd.js.map +0 -1
- package/angular/12/esm2015/lib/lightgallery-angular.component.js +0 -221
- package/angular/12/esm2015/lib/lightgallery-angular.module.js +0 -17
- package/angular/12/esm2015/lib/lightgallery-angular.service.js +0 -14
- package/angular/12/esm2015/lightgallery-angular-12.js +0 -5
- package/angular/12/esm2015/public-api.js +0 -7
- package/angular/12/fesm2015/lightgallery-angular-12.js +0 -258
- package/angular/12/fesm2015/lightgallery-angular-12.js.map +0 -1
- package/angular/12/lib/lightgallery-angular.component.d.ts +0 -38
- package/angular/12/lib/lightgallery-angular.module.d.ts +0 -7
- package/angular/12/lib/lightgallery-angular.service.d.ts +0 -6
- package/angular/12/lightgallery-angular-12.d.ts +0 -5
- package/angular/12/package.json +0 -18
- package/angular/12/public-api.d.ts +0 -3
- package/angular/13/README.md +0 -24
- package/angular/13/esm2020/lib/lightgallery-angular.component.mjs +0 -221
- package/angular/13/esm2020/lib/lightgallery-angular.module.mjs +0 -17
- package/angular/13/esm2020/lib/lightgallery-angular.service.mjs +0 -14
- package/angular/13/esm2020/lightgallery-angular-13.mjs +0 -5
- package/angular/13/esm2020/public-api.mjs +0 -7
- package/angular/13/fesm2015/lightgallery-angular-13.mjs +0 -258
- package/angular/13/fesm2015/lightgallery-angular-13.mjs.map +0 -1
- package/angular/13/fesm2020/lightgallery-angular-13.mjs +0 -258
- package/angular/13/fesm2020/lightgallery-angular-13.mjs.map +0 -1
- package/angular/13/lib/lightgallery-angular.component.d.ts +0 -38
- package/angular/13/lib/lightgallery-angular.module.d.ts +0 -7
- package/angular/13/lib/lightgallery-angular.service.d.ts +0 -6
- package/angular/13/lightgallery-angular-13.d.ts +0 -5
- package/angular/13/package.json +0 -31
- package/angular/13/public-api.d.ts +0 -3
- package/angular/14/README.md +0 -24
- package/angular/14/esm2020/lib/lightgallery-angular.component.mjs +0 -217
- package/angular/14/esm2020/lib/lightgallery-angular.module.mjs +0 -17
- package/angular/14/esm2020/lib/lightgallery-angular.service.mjs +0 -14
- package/angular/14/esm2020/lightgallery-angular-14.mjs +0 -5
- package/angular/14/esm2020/public-api.mjs +0 -7
- package/angular/14/fesm2015/lightgallery-angular-14.mjs +0 -254
- package/angular/14/fesm2015/lightgallery-angular-14.mjs.map +0 -1
- package/angular/14/fesm2020/lightgallery-angular-14.mjs +0 -254
- package/angular/14/fesm2020/lightgallery-angular-14.mjs.map +0 -1
- package/angular/14/index.d.ts +0 -5
- package/angular/14/lib/lightgallery-angular.component.d.ts +0 -38
- package/angular/14/lib/lightgallery-angular.module.d.ts +0 -7
- package/angular/14/lib/lightgallery-angular.service.d.ts +0 -6
- package/angular/14/package.json +0 -31
- package/angular/14/public-api.d.ts +0 -3
- package/angular/15/README.md +0 -24
- package/angular/15/esm2022/lib/lightgallery-angular.component.mjs +0 -218
- package/angular/15/esm2022/lib/lightgallery-angular.module.mjs +0 -18
- package/angular/15/esm2022/lib/lightgallery-angular.service.mjs +0 -15
- package/angular/15/esm2022/lightgallery-angular-15.mjs +0 -5
- package/angular/15/esm2022/public-api.mjs +0 -7
- package/angular/15/fesm2022/lightgallery-angular-15.mjs +0 -254
- package/angular/15/fesm2022/lightgallery-angular-15.mjs.map +0 -1
- package/angular/15/index.d.ts +0 -5
- package/angular/15/lib/lightgallery-angular.component.d.ts +0 -38
- package/angular/15/lib/lightgallery-angular.module.d.ts +0 -7
- package/angular/15/lib/lightgallery-angular.service.d.ts +0 -6
- package/angular/15/package.json +0 -25
- package/angular/15/public-api.d.ts +0 -3
- package/angular/16/README.md +0 -24
- package/angular/16/esm2022/lib/lightgallery-angular.component.mjs +0 -218
- package/angular/16/esm2022/lib/lightgallery-angular.module.mjs +0 -18
- package/angular/16/esm2022/lib/lightgallery-angular.service.mjs +0 -15
- package/angular/16/esm2022/lightgallery-angular-16.mjs +0 -5
- package/angular/16/esm2022/public-api.mjs +0 -7
- package/angular/16/fesm2022/lightgallery-angular-16.mjs +0 -254
- package/angular/16/fesm2022/lightgallery-angular-16.mjs.map +0 -1
- package/angular/16/index.d.ts +0 -5
- package/angular/16/lib/lightgallery-angular.component.d.ts +0 -38
- package/angular/16/lib/lightgallery-angular.module.d.ts +0 -7
- package/angular/16/lib/lightgallery-angular.service.d.ts +0 -6
- package/angular/16/package.json +0 -25
- package/angular/16/public-api.d.ts +0 -3
- package/angular/9/README.md +0 -24
- package/angular/9/bundles/lightgallery-angular-9.umd.js +0 -271
- package/angular/9/bundles/lightgallery-angular-9.umd.js.map +0 -1
- package/angular/9/bundles/lightgallery-angular-9.umd.min.js +0 -2
- package/angular/9/bundles/lightgallery-angular-9.umd.min.js.map +0 -1
- package/angular/9/esm2015/lib/lightgallery-angular.component.js +0 -225
- package/angular/9/esm2015/lib/lightgallery-angular.module.js +0 -17
- package/angular/9/esm2015/lib/lightgallery-angular.service.js +0 -14
- package/angular/9/esm2015/lightgallery-angular-9.js +0 -5
- package/angular/9/esm2015/public-api.js +0 -7
- package/angular/9/esm5/lib/lightgallery-angular.component.js +0 -228
- package/angular/9/esm5/lib/lightgallery-angular.module.js +0 -21
- package/angular/9/esm5/lib/lightgallery-angular.service.js +0 -17
- package/angular/9/esm5/lightgallery-angular-9.js +0 -5
- package/angular/9/esm5/public-api.js +0 -7
- package/angular/9/fesm2015/lightgallery-angular-9.js +0 -261
- package/angular/9/fesm2015/lightgallery-angular-9.js.map +0 -1
- package/angular/9/fesm5/lightgallery-angular-9.js +0 -268
- package/angular/9/fesm5/lightgallery-angular-9.js.map +0 -1
- package/angular/9/lib/lightgallery-angular.component.d.ts +0 -38
- package/angular/9/lib/lightgallery-angular.module.d.ts +0 -6
- package/angular/9/lib/lightgallery-angular.service.d.ts +0 -6
- package/angular/9/lightgallery-angular-9.d.ts +0 -5
- package/angular/9/package.json +0 -23
- package/angular/9/public-api.d.ts +0 -3
- package/angular/README.md +0 -24
- package/angular/esm2022/lib/lightgallery-angular.component.mjs +0 -218
- package/angular/esm2022/lib/lightgallery-angular.module.mjs +0 -18
- package/angular/esm2022/lib/lightgallery-angular.service.mjs +0 -15
- package/angular/esm2022/lightgallery-angular.mjs +0 -5
- package/angular/esm2022/public-api.mjs +0 -7
- package/angular/fesm2022/lightgallery-angular.mjs +0 -254
- package/angular/fesm2022/lightgallery-angular.mjs.map +0 -1
- package/angular/index.d.ts +0 -5
- package/angular/lib/lightgallery-angular.component.d.ts +0 -38
- package/angular/lib/lightgallery-angular.module.d.ts +0 -7
- package/angular/lib/lightgallery-angular.service.d.ts +0 -6
- package/angular/package.json +0 -25
- package/angular/public-api.d.ts +0 -3
- package/css/lg-fullscreen.css +0 -8
- package/css/lg-fullscreen.css.map +0 -1
- package/css/lg-share.css.map +0 -1
- package/css/lg-thumbnail.css.map +0 -1
- package/css/lg-transitions.css.map +0 -1
- package/css/lg-zoom.css.map +0 -1
- package/css/lightgallery-bundle.css.map +0 -1
- package/css/lightgallery-bundle.min.css +0 -1
- package/css/lightgallery-core.css.map +0 -1
- package/css/lightgallery.css.map +0 -1
- package/fonts/lg.svg +0 -54
- package/fonts/lg.ttf +0 -0
- package/fonts/lg.woff +0 -0
- package/fonts/lg.woff2 +0 -0
- package/lib/index.js +0 -8
- package/lib/index.js.map +0 -1
- package/lib/lg-events.js +0 -37
- package/lib/lg-events.js.map +0 -1
- package/lib/lg-plugin.js +0 -13
- package/lib/lg-plugin.js.map +0 -1
- package/lib/lg-settings.js +0 -83
- package/lib/lg-settings.js.map +0 -1
- package/lib/lg-utils.js +0 -328
- package/lib/lg-utils.js.map +0 -1
- package/lib/lgQuery.js +0 -385
- package/lib/lgQuery.js.map +0 -1
- package/lib/lightgallery.js +0 -1949
- package/lib/lightgallery.js.map +0 -1
- package/lib/plugins/autoplay/lg-autoplay-settings.js +0 -16
- package/lib/plugins/autoplay/lg-autoplay-settings.js.map +0 -1
- package/lib/plugins/autoplay/lg-autoplay.js +0 -184
- package/lib/plugins/autoplay/lg-autoplay.js.map +0 -1
- package/lib/plugins/comment/lg-comment-settings.js +0 -17
- package/lib/plugins/comment/lg-comment-settings.js.map +0 -1
- package/lib/plugins/comment/lg-comment.js +0 -140
- package/lib/plugins/comment/lg-comment.js.map +0 -1
- package/lib/plugins/fullscreen/lg-fullscreen-settings.js +0 -10
- package/lib/plugins/fullscreen/lg-fullscreen-settings.js.map +0 -1
- package/lib/plugins/fullscreen/lg-fullscreen.js +0 -108
- package/lib/plugins/fullscreen/lg-fullscreen.js.map +0 -1
- package/lib/plugins/hash/lg-hash-settings.js +0 -9
- package/lib/plugins/hash/lg-hash-settings.js.map +0 -1
- package/lib/plugins/hash/lg-hash.js +0 -139
- package/lib/plugins/hash/lg-hash.js.map +0 -1
- package/lib/plugins/mediumZoom/lg-medium-zoom-settings.js +0 -9
- package/lib/plugins/mediumZoom/lg-medium-zoom-settings.js.map +0 -1
- package/lib/plugins/mediumZoom/lg-medium-zoom.js +0 -73
- package/lib/plugins/mediumZoom/lg-medium-zoom.js.map +0 -1
- package/lib/plugins/pager/lg-pager-settings.js +0 -7
- package/lib/plugins/pager/lg-pager-settings.js.map +0 -1
- package/lib/plugins/pager/lg-pager.js +0 -82
- package/lib/plugins/pager/lg-pager.js.map +0 -1
- package/lib/plugins/relativeCaption/lg-relative-caption-settings.js +0 -7
- package/lib/plugins/relativeCaption/lg-relative-caption-settings.js.map +0 -1
- package/lib/plugins/relativeCaption/lg-relative-caption.js +0 -97
- package/lib/plugins/relativeCaption/lg-relative-caption.js.map +0 -1
- package/lib/plugins/rotate/lg-rotate-settings.js +0 -18
- package/lib/plugins/rotate/lg-rotate-settings.js.map +0 -1
- package/lib/plugins/rotate/lg-rotate.js +0 -206
- package/lib/plugins/rotate/lg-rotate.js.map +0 -1
- package/lib/plugins/share/lg-fb-share-utils.js +0 -10
- package/lib/plugins/share/lg-fb-share-utils.js.map +0 -1
- package/lib/plugins/share/lg-pinterest-share-utils.js +0 -17
- package/lib/plugins/share/lg-pinterest-share-utils.js.map +0 -1
- package/lib/plugins/share/lg-share-settings.js +0 -15
- package/lib/plugins/share/lg-share-settings.js.map +0 -1
- package/lib/plugins/share/lg-share.js +0 -130
- package/lib/plugins/share/lg-share.js.map +0 -1
- package/lib/plugins/share/lg-twitter-share-utils.js +0 -11
- package/lib/plugins/share/lg-twitter-share-utils.js.map +0 -1
- package/lib/plugins/share/types.js +0 -3
- package/lib/plugins/share/types.js.map +0 -1
- package/lib/plugins/thumbnail/lg-thumbnail-settings.js +0 -23
- package/lib/plugins/thumbnail/lg-thumbnail-settings.js.map +0 -1
- package/lib/plugins/thumbnail/lg-thumbnail.js +0 -414
- package/lib/plugins/thumbnail/lg-thumbnail.js.map +0 -1
- package/lib/plugins/video/lg-video-settings.js +0 -15
- package/lib/plugins/video/lg-video-settings.js.map +0 -1
- package/lib/plugins/video/lg-video-utils.js +0 -84
- package/lib/plugins/video/lg-video-utils.js.map +0 -1
- package/lib/plugins/video/lg-video.js +0 -411
- package/lib/plugins/video/lg-video.js.map +0 -1
- package/lib/plugins/video/types.js +0 -3
- package/lib/plugins/video/types.js.map +0 -1
- package/lib/plugins/vimeoThumbnail/lg-vimeo-thumbnail-settings.js +0 -8
- package/lib/plugins/vimeoThumbnail/lg-vimeo-thumbnail-settings.js.map +0 -1
- package/lib/plugins/vimeoThumbnail/lg-vimeo-thumbnail.js +0 -122
- package/lib/plugins/vimeoThumbnail/lg-vimeo-thumbnail.js.map +0 -1
- package/lib/plugins/zoom/lg-zoom-settings.js +0 -21
- package/lib/plugins/zoom/lg-zoom-settings.js.map +0 -1
- package/lib/plugins/zoom/lg-zoom.js +0 -909
- package/lib/plugins/zoom/lg-zoom.js.map +0 -1
- package/lib/types.js +0 -3
- package/lib/types.js.map +0 -1
- package/lightgallery-2.9.0.tgz +0 -0
- package/lightgallery.es5.js +0 -2786
- package/lightgallery.es5.js.map +0 -1
- package/lightgallery.min.js +0 -8
- package/lightgallery.umd.js +0 -2794
- package/lightgallery.umd.js.map +0 -1
- package/lit/custom-elements.json +0 -82
- package/lit/lightgallery.esm.js +0 -59
- package/lit/lightgallery.umd.js +0 -37
- package/lit/package.json +0 -8
- package/plugins/autoplay/lg-autoplay.es5.js +0 -250
- package/plugins/autoplay/lg-autoplay.es5.js.map +0 -1
- package/plugins/autoplay/lg-autoplay.min.js +0 -8
- package/plugins/autoplay/lg-autoplay.umd.js +0 -258
- package/plugins/autoplay/lg-autoplay.umd.js.map +0 -1
- package/plugins/autoplay/package.json +0 -7
- package/plugins/comment/lg-comment.es5.js +0 -205
- package/plugins/comment/lg-comment.es5.js.map +0 -1
- package/plugins/comment/lg-comment.min.js +0 -8
- package/plugins/comment/lg-comment.umd.js +0 -213
- package/plugins/comment/lg-comment.umd.js.map +0 -1
- package/plugins/comment/package.json +0 -7
- package/plugins/fullscreen/lg-fullscreen.es5.js +0 -135
- package/plugins/fullscreen/lg-fullscreen.es5.js.map +0 -1
- package/plugins/fullscreen/lg-fullscreen.min.js +0 -8
- package/plugins/fullscreen/lg-fullscreen.umd.js +0 -143
- package/plugins/fullscreen/lg-fullscreen.umd.js.map +0 -1
- package/plugins/fullscreen/package.json +0 -7
- package/plugins/hash/lg-hash-settings.d.ts +0 -16
- package/plugins/hash/lg-hash.es5.js +0 -198
- package/plugins/hash/lg-hash.es5.js.map +0 -1
- package/plugins/hash/lg-hash.min.js +0 -8
- package/plugins/hash/lg-hash.umd.js +0 -206
- package/plugins/hash/lg-hash.umd.js.map +0 -1
- package/plugins/hash/package.json +0 -7
- package/plugins/mediumZoom/lg-medium-zoom.es5.js +0 -132
- package/plugins/mediumZoom/lg-medium-zoom.es5.js.map +0 -1
- package/plugins/mediumZoom/lg-medium-zoom.min.js +0 -8
- package/plugins/mediumZoom/lg-medium-zoom.umd.js +0 -140
- package/plugins/mediumZoom/lg-medium-zoom.umd.js.map +0 -1
- package/plugins/mediumZoom/package.json +0 -7
- package/plugins/pager/lg-pager.es5.js +0 -139
- package/plugins/pager/lg-pager.es5.js.map +0 -1
- package/plugins/pager/lg-pager.min.js +0 -8
- package/plugins/pager/lg-pager.umd.js +0 -147
- package/plugins/pager/lg-pager.umd.js.map +0 -1
- package/plugins/pager/package.json +0 -7
- package/plugins/relativeCaption/lg-relative-caption.es5.js +0 -154
- package/plugins/relativeCaption/lg-relative-caption.es5.js.map +0 -1
- package/plugins/relativeCaption/lg-relative-caption.min.js +0 -8
- package/plugins/relativeCaption/lg-relative-caption.umd.js +0 -162
- package/plugins/relativeCaption/lg-relative-caption.umd.js.map +0 -1
- package/plugins/relativeCaption/package.json +0 -7
- package/plugins/rotate/lg-rotate.es5.js +0 -274
- package/plugins/rotate/lg-rotate.es5.js.map +0 -1
- package/plugins/rotate/lg-rotate.min.js +0 -8
- package/plugins/rotate/lg-rotate.umd.js +0 -282
- package/plugins/rotate/lg-rotate.umd.js.map +0 -1
- package/plugins/rotate/package.json +0 -7
- package/plugins/share/lg-share.d.ts +0 -15
- package/plugins/share/lg-share.es5.js +0 -219
- package/plugins/share/lg-share.es5.js.map +0 -1
- package/plugins/share/lg-share.min.js +0 -8
- package/plugins/share/lg-share.umd.js +0 -227
- package/plugins/share/lg-share.umd.js.map +0 -1
- package/plugins/share/lg-twitter-share-utils.d.ts +0 -2
- package/plugins/share/package.json +0 -7
- package/plugins/thumbnail/lg-thumbnail.d.ts +0 -48
- package/plugins/thumbnail/lg-thumbnail.es5.js +0 -487
- package/plugins/thumbnail/lg-thumbnail.es5.js.map +0 -1
- package/plugins/thumbnail/lg-thumbnail.min.js +0 -8
- package/plugins/thumbnail/lg-thumbnail.umd.js +0 -495
- package/plugins/thumbnail/lg-thumbnail.umd.js.map +0 -1
- package/plugins/thumbnail/package.json +0 -7
- package/plugins/video/lg-video-utils.d.ts +0 -10
- package/plugins/video/lg-video.es5.js +0 -545
- package/plugins/video/lg-video.es5.js.map +0 -1
- package/plugins/video/lg-video.min.js +0 -8
- package/plugins/video/lg-video.umd.js +0 -553
- package/plugins/video/lg-video.umd.js.map +0 -1
- package/plugins/video/package.json +0 -7
- package/plugins/vimeoThumbnail/lg-vimeo-thumbnail.es5.js +0 -182
- package/plugins/vimeoThumbnail/lg-vimeo-thumbnail.es5.js.map +0 -1
- package/plugins/vimeoThumbnail/lg-vimeo-thumbnail.min.js +0 -8
- package/plugins/vimeoThumbnail/lg-vimeo-thumbnail.umd.js +0 -190
- package/plugins/vimeoThumbnail/lg-vimeo-thumbnail.umd.js.map +0 -1
- package/plugins/vimeoThumbnail/package.json +0 -7
- package/plugins/zoom/lg-zoom.es5.js +0 -980
- package/plugins/zoom/lg-zoom.es5.js.map +0 -1
- package/plugins/zoom/lg-zoom.min.js +0 -8
- package/plugins/zoom/lg-zoom.umd.js +0 -988
- package/plugins/zoom/lg-zoom.umd.js.map +0 -1
- package/plugins/zoom/package.json +0 -7
- package/react/Lightgallery.d.ts +0 -33
- package/react/Lightgallery.es5.js +0 -2988
- package/react/Lightgallery.es5.js.map +0 -1
- package/react/Lightgallery.umd.js +0 -2994
- package/react/Lightgallery.umd.js.map +0 -1
- package/react/package.json +0 -7
- package/scss/_lg-fonts.scss +0 -27
- package/scss/lg-fullscreen.scss +0 -9
- package/vue/LightGallery.vue.d.ts +0 -37
- package/vue/LightGalleryVue.common.js +0 -9343
- package/vue/LightGalleryVue.common.js.map +0 -1
- package/vue/LightGalleryVue.umd.js +0 -9353
- package/vue/LightGalleryVue.umd.js.map +0 -1
- package/vue/LightGalleryVue.umd.min.js +0 -8
- package/vue/LightGalleryVue.umd.min.js.map +0 -1
- package/vue/package.json +0 -7
- /package/{css → dist/css}/lg-medium-zoom.css +0 -0
- /package/{css → dist/css}/lg-medium-zoom.css.map +0 -0
- /package/{css → dist/css}/lg-pager.css +0 -0
- /package/{css → dist/css}/lg-relative-caption.css +0 -0
- /package/{css → dist/css}/lg-relative-caption.css.map +0 -0
- /package/{css → dist/css}/lg-video.css +0 -0
- /package/{css → dist/css}/lg-video.css.map +0 -0
- /package/{images → dist/images}/loading.gif +0 -0
- /package/{scss → dist/scss}/_lg-mixins.scss +0 -0
- /package/{scss → dist/scss}/lg-medium-zoom.scss +0 -0
- /package/{scss → dist/scss}/lg-pager.scss +0 -0
- /package/{scss → dist/scss}/lg-relative-caption.scss +0 -0
- /package/{scss → dist/scss}/lg-transitions.scss +0 -0
- /package/{scss → dist/scss}/lg-video.scss +0 -0
- /package/{scss → dist/scss}/transitions/_index.scss +0 -0
- /package/{scss → dist/scss}/transitions/_lg-lollipop-rev.scss +0 -0
- /package/{scss → dist/scss}/transitions/_lg-lollipop.scss +0 -0
- /package/{scss → dist/scss}/transitions/_lg-rotate-rev.scss +0 -0
- /package/{scss → dist/scss}/transitions/_lg-rotate.scss +0 -0
- /package/{scss → dist/scss}/transitions/_lg-slide-skew-cross-rev.scss +0 -0
- /package/{scss → dist/scss}/transitions/_lg-slide-skew-cross.scss +0 -0
- /package/{scss → dist/scss}/transitions/_lg-slide-skew-only-rev.scss +0 -0
- /package/{scss → dist/scss}/transitions/_lg-slide-skew-only-y-rev.scss +0 -0
- /package/{scss → dist/scss}/transitions/_lg-slide-skew-only-y.scss +0 -0
- /package/{scss → dist/scss}/transitions/_lg-slide-skew-only.scss +0 -0
- /package/{scss → dist/scss}/transitions/_lg-slide-skew-rev.scss +0 -0
- /package/{scss → dist/scss}/transitions/_lg-slide-skew-ver-cross-rev.scss +0 -0
- /package/{scss → dist/scss}/transitions/_lg-slide-skew-ver-cross.scss +0 -0
- /package/{scss → dist/scss}/transitions/_lg-slide-skew-ver-rev.scss +0 -0
- /package/{scss → dist/scss}/transitions/_lg-slide-skew-ver.scss +0 -0
- /package/{scss → dist/scss}/transitions/_lg-slide-skew.scss +0 -0
- /package/{scss → dist/scss}/transitions/_lg-slide-vertical-growth.scss +0 -0
- /package/{scss → dist/scss}/transitions/_lg-slide-vertical.scss +0 -0
- /package/{scss → dist/scss}/transitions/_lg-tube.scss +0 -0
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Math for the origin crop plugin: zoom-from-origin flights from cropped
|
|
3
|
+
* thumbnails. A grid tile cropped with `object-fit: cover` (or
|
|
4
|
+
* `background-size: cover`) shows only a window of the image. The plugin
|
|
5
|
+
* grows that window from the tile at a uniform scale while two boxes
|
|
6
|
+
* around the slides crop the rest of the image, revealed as the flight
|
|
7
|
+
* lands. Pure rect arithmetic: the plugin measures the DOM and passes
|
|
8
|
+
* plain numbers in. The core flight (`origin.ts`) never imports this.
|
|
9
|
+
*/
|
|
10
|
+
import { type ImageSize, type RectLike } from './origin';
|
|
11
|
+
/** A region of an image as fractions of its width and height (0..1). */
|
|
12
|
+
export interface FractionRect {
|
|
13
|
+
x: number;
|
|
14
|
+
y: number;
|
|
15
|
+
width: number;
|
|
16
|
+
height: number;
|
|
17
|
+
}
|
|
18
|
+
/** The whole image: the window of an uncropped thumbnail. */
|
|
19
|
+
export declare const WHOLE_IMAGE: FractionRect;
|
|
20
|
+
/** Whether a region covers the whole image (within rounding). */
|
|
21
|
+
export declare function isWholeImage(rect: FractionRect): boolean;
|
|
22
|
+
/**
|
|
23
|
+
* How a trigger paints its thumbnail file into its box: the CSS
|
|
24
|
+
* `object-fit` of an `<img>`, or the `background-size` keyword of an
|
|
25
|
+
* element with a background image.
|
|
26
|
+
*/
|
|
27
|
+
export type ThumbFit = 'fill' | 'contain' | 'cover' | 'none' | 'scale-down';
|
|
28
|
+
/**
|
|
29
|
+
* One axis of a CSS `object-position`/`background-position`: a share of
|
|
30
|
+
* the free space (the box minus the painted image) plus a px offset.
|
|
31
|
+
*/
|
|
32
|
+
export interface CssPositionAxis {
|
|
33
|
+
percent: number;
|
|
34
|
+
px: number;
|
|
35
|
+
}
|
|
36
|
+
export interface CssPosition {
|
|
37
|
+
x: CssPositionAxis;
|
|
38
|
+
y: CssPositionAxis;
|
|
39
|
+
}
|
|
40
|
+
/** The CSS default, `50% 50%`. */
|
|
41
|
+
export declare const CSS_POSITION_CENTER: CssPosition;
|
|
42
|
+
/**
|
|
43
|
+
* Parse a computed `object-position` or `background-position` value
|
|
44
|
+
* (`"50% 50%"`, `"10px 20px"`, `"calc(100% - 10px) 0%"`, keywords).
|
|
45
|
+
* Unparseable values fall back to the centre. Only the first layer of a
|
|
46
|
+
* multi-layer background is read.
|
|
47
|
+
*/
|
|
48
|
+
export declare function parseCssPosition(value: string | undefined): CssPosition;
|
|
49
|
+
/** Parse a computed `object-fit` value; the CSS default is `fill`. */
|
|
50
|
+
export declare function parseObjectFit(value: string | undefined): ThumbFit;
|
|
51
|
+
/**
|
|
52
|
+
* Parse a computed `background-size` value into the fit it paints like:
|
|
53
|
+
* `cover` and `contain` as themselves, `auto` as `none` (natural size),
|
|
54
|
+
* `100% 100%` as `fill`. Explicit lengths cannot be modelled and return
|
|
55
|
+
* undefined. Only the first layer of a multi-layer background is read.
|
|
56
|
+
*/
|
|
57
|
+
export declare function parseBackgroundFit(value: string | undefined): ThumbFit | undefined;
|
|
58
|
+
/** The first URL of a computed `background-image` value, if any. */
|
|
59
|
+
export declare function parseCssUrl(value: string | undefined): string | undefined;
|
|
60
|
+
export interface OriginWindowInput {
|
|
61
|
+
/** Rendered box of the trigger (thumbnail img or background element), viewport px. */
|
|
62
|
+
box: RectLike;
|
|
63
|
+
/** The full image; only its aspect ratio matters. */
|
|
64
|
+
imageSize: ImageSize;
|
|
65
|
+
/**
|
|
66
|
+
* Natural size of the thumbnail file when known (an `<img>`'s
|
|
67
|
+
* `naturalWidth`/`naturalHeight`). A file with a different aspect ratio
|
|
68
|
+
* than the image is taken as a centred crop of it. Unknown (a background
|
|
69
|
+
* image, an unloaded img) assumes the image's own aspect ratio.
|
|
70
|
+
*/
|
|
71
|
+
thumbSize?: ImageSize;
|
|
72
|
+
/** How the file is painted into the box. Defaults to `fill`. */
|
|
73
|
+
fit?: ThumbFit;
|
|
74
|
+
/** Where the painted file sits in the box. Defaults to the centre. */
|
|
75
|
+
position?: CssPosition;
|
|
76
|
+
}
|
|
77
|
+
export interface OriginWindow {
|
|
78
|
+
/**
|
|
79
|
+
* The part of the trigger box that shows thumbnail pixels, viewport px:
|
|
80
|
+
* the box itself unless the file is letterboxed inside it.
|
|
81
|
+
*/
|
|
82
|
+
rect: RectLike;
|
|
83
|
+
/** The part of the image visible in `rect`, as fractions of the image. */
|
|
84
|
+
window: FractionRect;
|
|
85
|
+
/**
|
|
86
|
+
* The part of the image the thumbnail file covers, as fractions: the
|
|
87
|
+
* whole image unless the file is pre-cropped. Sizes the flight's
|
|
88
|
+
* dummy, which shows the file, so its pixels land where they belong.
|
|
89
|
+
*/
|
|
90
|
+
region: FractionRect;
|
|
91
|
+
}
|
|
92
|
+
/**
|
|
93
|
+
* Where a thumbnail's visible pixels sit in the full image. Models the CSS
|
|
94
|
+
* fit and position of the file inside its box, and a pre-cropped file as a
|
|
95
|
+
* centred crop of the image.
|
|
96
|
+
*/
|
|
97
|
+
export declare function getOriginWindow(input: OriginWindowInput): OriginWindow;
|
|
98
|
+
export interface OriginCropFlightInput {
|
|
99
|
+
/**
|
|
100
|
+
* The part of the trigger showing thumbnail pixels
|
|
101
|
+
* ({@link OriginWindow.rect}), viewport px.
|
|
102
|
+
*/
|
|
103
|
+
triggerRect: RectLike;
|
|
104
|
+
/** Bounding rect of the gallery outer element, viewport coordinates. */
|
|
105
|
+
containerRect: RectLike;
|
|
106
|
+
/** Media container top offset (toolbar height), px. */
|
|
107
|
+
top: number;
|
|
108
|
+
/** Media container bottom offset (caption + thumb strip height), px. */
|
|
109
|
+
bottom: number;
|
|
110
|
+
/** Final displayed image size (see `fitImageSize`). */
|
|
111
|
+
imageSize: ImageSize;
|
|
112
|
+
/** The part of the image the trigger shows ({@link OriginWindow.window}). */
|
|
113
|
+
window: FractionRect;
|
|
114
|
+
}
|
|
115
|
+
export interface OriginCropFlight {
|
|
116
|
+
/**
|
|
117
|
+
* The slide's transform: the window lands on the trigger, at a uniform
|
|
118
|
+
* scale, inside the translated stage boxes.
|
|
119
|
+
*/
|
|
120
|
+
transform: string;
|
|
121
|
+
/** The outer stage box: its bottom-right corner on the trigger's. */
|
|
122
|
+
outer: string;
|
|
123
|
+
/** The inner stage box: its top-left corner on the trigger's. */
|
|
124
|
+
inner: string;
|
|
125
|
+
}
|
|
126
|
+
/**
|
|
127
|
+
* The start of a flight from a cropped thumbnail (and the end of the flight
|
|
128
|
+
* back to it). Two stage-sized, overflow-hidden boxes wrap the slides: the
|
|
129
|
+
* outer one translates so that its bottom-right corner sits on the
|
|
130
|
+
* trigger's, the inner one so that its top-left corner sits on the
|
|
131
|
+
* trigger's, and their intersection is exactly the trigger's box. As both
|
|
132
|
+
* transition back to rest with the slide, the crop's edges move linearly on
|
|
133
|
+
* screen out to the whole stage, and only transforms animate.
|
|
134
|
+
*/
|
|
135
|
+
export declare function getOriginCropFlight(input: OriginCropFlightInput): OriginCropFlight;
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Zoom-from-origin math, ported from 2.x `utils.getSize`/`utils.getTransform`
|
|
3
|
+
* (`src/lg-utils.ts`) as pure rect arithmetic. The framework layer measures
|
|
4
|
+
* the DOM (trigger/container bounding rects) and passes plain numbers in.
|
|
5
|
+
*
|
|
6
|
+
* Note: this module is an addition to the ADR 0001 §1 table — it
|
|
7
|
+
* follows the standing rule that pure functions needed by React live in
|
|
8
|
+
* headless. It is distinct from `zoom-math.ts` (zoom plugin).
|
|
9
|
+
*/
|
|
10
|
+
export interface ImageSize {
|
|
11
|
+
width: number;
|
|
12
|
+
height: number;
|
|
13
|
+
}
|
|
14
|
+
export interface RectLike {
|
|
15
|
+
left: number;
|
|
16
|
+
top: number;
|
|
17
|
+
width: number;
|
|
18
|
+
height: number;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Parse an item's `lgSize` value (`"1920-1280"`, or a responsive list like
|
|
22
|
+
* `"240-160-375, 1600-1067"` where the third number is the max viewport
|
|
23
|
+
* width the entry applies to).
|
|
24
|
+
*/
|
|
25
|
+
export declare function parseImageSize(lgSize: string | undefined, viewportWidth: number): ImageSize | undefined;
|
|
26
|
+
/**
|
|
27
|
+
* Fit a natural image size into the available container box, preserving
|
|
28
|
+
* aspect ratio and never scaling up (2.x `utils.getSize` math).
|
|
29
|
+
*/
|
|
30
|
+
export declare function fitImageSize(size: ImageSize, containerWidth: number, containerHeight: number): ImageSize;
|
|
31
|
+
/**
|
|
32
|
+
* Whether a measured trigger rect can anchor the zoom-from-origin flight.
|
|
33
|
+
* A trigger that is hidden (`display: none`, the `hidden` attribute),
|
|
34
|
+
* detached or collapsed measures 0×0 at the viewport origin; a flight
|
|
35
|
+
* aimed at it would shrink the slide into the top-left corner.
|
|
36
|
+
*/
|
|
37
|
+
export declare function isUsableOriginRect(rect: RectLike | null | undefined): rect is RectLike;
|
|
38
|
+
/** Scale the closing slide shrinks to when it has no trigger to return to. */
|
|
39
|
+
export declare const CENTER_CLOSE_SCALE = 0.5;
|
|
40
|
+
/**
|
|
41
|
+
* Close transform for a slide without a usable origin (hidden or
|
|
42
|
+
* collapsed trigger, no `lgSize`): shrink in place about the stage centre,
|
|
43
|
+
* the mirror of the `lg-start-zoom` open. The runtime pairs it with the
|
|
44
|
+
* `lg-close-to-center` class, which fades the slide out over the same
|
|
45
|
+
* duration.
|
|
46
|
+
*/
|
|
47
|
+
export declare function getCenterCloseTransform(scale?: number): string;
|
|
48
|
+
export interface OriginTransformInput {
|
|
49
|
+
/** Bounding rect of the trigger thumbnail image, viewport coordinates. */
|
|
50
|
+
triggerRect: RectLike;
|
|
51
|
+
/** Bounding rect of the gallery outer element, viewport coordinates. */
|
|
52
|
+
containerRect: RectLike;
|
|
53
|
+
/** Media container top offset (toolbar height), px. */
|
|
54
|
+
top: number;
|
|
55
|
+
/** Media container bottom offset (caption + thumb strip height), px. */
|
|
56
|
+
bottom: number;
|
|
57
|
+
/** Final displayed image size (see {@link fitImageSize}). */
|
|
58
|
+
imageSize: ImageSize;
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* CSS transform that places the (centered, final-size) slide image exactly
|
|
62
|
+
* over the trigger thumbnail — the starting point of the zoom-from-origin
|
|
63
|
+
* open animation and the end point of the close animation.
|
|
64
|
+
*/
|
|
65
|
+
export declare function getOriginTransform(input: OriginTransformInput): string;
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Typed per-plugin state slices (ADR 0001 §5). Framework layers hold these
|
|
3
|
+
* in their own reactivity; the shapes and transitions live here so plugin
|
|
4
|
+
* behavior matches across frameworks.
|
|
5
|
+
*/
|
|
6
|
+
import { type ZoomPan } from './zoom-math';
|
|
7
|
+
export interface ZoomSlice {
|
|
8
|
+
scale: number;
|
|
9
|
+
pan: ZoomPan;
|
|
10
|
+
zoomed: boolean;
|
|
11
|
+
}
|
|
12
|
+
export declare const initialZoomSlice: ZoomSlice;
|
|
13
|
+
/** Per-slide rotate/flip state (rotate plugin). */
|
|
14
|
+
export interface RotateSlice {
|
|
15
|
+
/** Rotation in degrees (multiples of 90, may run negative). */
|
|
16
|
+
rotate: number;
|
|
17
|
+
/** 1 or -1. */
|
|
18
|
+
flipHorizontal: number;
|
|
19
|
+
/** 1 or -1. */
|
|
20
|
+
flipVertical: number;
|
|
21
|
+
}
|
|
22
|
+
export declare const initialRotateSlice: RotateSlice;
|
|
23
|
+
export declare function rotateLeft(slice: RotateSlice): RotateSlice;
|
|
24
|
+
export declare function rotateRight(slice: RotateSlice): RotateSlice;
|
|
25
|
+
export declare function flipHorizontal(slice: RotateSlice): RotateSlice;
|
|
26
|
+
export declare function flipVertical(slice: RotateSlice): RotateSlice;
|
|
27
|
+
/** Whether the slice's rotation swaps the image's visual axes (90°/270°). */
|
|
28
|
+
export declare function isOrientationSwapped(slice: RotateSlice): boolean;
|
|
29
|
+
/**
|
|
30
|
+
* Scale that refits a rotated image into its stage. At 90°/270° the
|
|
31
|
+
* image's rendered width runs vertically (and vice versa), so the fit is
|
|
32
|
+
* computed against the swapped axes; capped at 1 — rotation never
|
|
33
|
+
* upscales. At 0°/180° (and with degenerate dimensions) the image already
|
|
34
|
+
* fits the way it was laid out: scale 1.
|
|
35
|
+
*/
|
|
36
|
+
export declare function getRotateFitScale(imageWidth: number, imageHeight: number, stageWidth: number, stageHeight: number, slice: RotateSlice): number;
|
|
37
|
+
/**
|
|
38
|
+
* CSS transform for a rotate slice (2.x `applyStyles`), with the fit
|
|
39
|
+
* scale folded into the same transform so rotate + refit animate as one
|
|
40
|
+
* motion. `fitScale` defaults to 1 (the 2.x output, byte-identical).
|
|
41
|
+
*/
|
|
42
|
+
export declare function getRotateTransform(slice: RotateSlice, fitScale?: number): string;
|
|
43
|
+
/**
|
|
44
|
+
* Visual footprint of an image sitting inside the rotate wrapper.
|
|
45
|
+
* Layout offsets ignore CSS transforms, so pan-bounds math fed by
|
|
46
|
+
* them sees the unrotated box: at 90°/270° the rendered width runs
|
|
47
|
+
* along the layout height (and vice versa), and the folded-in fit
|
|
48
|
+
* scale shrinks both axes. `transform` is the wrapper's inline style
|
|
49
|
+
* (`getRotateTransform` output); absent or unparseable input reads
|
|
50
|
+
* as unrotated.
|
|
51
|
+
*/
|
|
52
|
+
export declare function getRotatedVisualSize(width: number, height: number, transform: string | null | undefined): {
|
|
53
|
+
width: number;
|
|
54
|
+
height: number;
|
|
55
|
+
};
|
|
56
|
+
/** Autoplay run-state (autoplay plugin). */
|
|
57
|
+
export interface AutoplaySlice {
|
|
58
|
+
running: boolean;
|
|
59
|
+
pausedOnDrag: boolean;
|
|
60
|
+
pausedOnSlideChange: boolean;
|
|
61
|
+
}
|
|
62
|
+
export declare const initialAutoplaySlice: AutoplaySlice;
|
|
63
|
+
/** Commit a zoom change; scale 1 always recenters (2.x behavior). */
|
|
64
|
+
export declare function applyZoom(_slice: ZoomSlice, scale: number, pan: ZoomPan, maxScale: number, infiniteZoom: boolean): ZoomSlice;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Slide windowing and preload math, ported from 2.x
|
|
3
|
+
* `getItemsToBeInsertedToDom` / `preload` (`src/lightgallery.ts`). Pure
|
|
4
|
+
* index arithmetic — the framework layer maps the returned indexes to
|
|
5
|
+
* mounted slide components.
|
|
6
|
+
*/
|
|
7
|
+
/**
|
|
8
|
+
* Which slide indexes should be mounted for a given current/previous index.
|
|
9
|
+
*
|
|
10
|
+
* Mirrors 2.x behavior: at least 3 items (capped at the gallery length),
|
|
11
|
+
* the window centered around `index` biased by which half of the gallery it
|
|
12
|
+
* falls in, plus the far-end slide at the edges when `loop` is on, plus the
|
|
13
|
+
* previous slide so an outgoing transition can finish.
|
|
14
|
+
*/
|
|
15
|
+
export declare function getSlideIndexesInDom(index: number, prevIndex: number, slidesCount: number, numberOfItems?: number, loop?: boolean): number[];
|
|
16
|
+
/**
|
|
17
|
+
* Slide-pool policy (plan 010 virtualization): the mounted-slide window
|
|
18
|
+
* from `getSlideIndexesInDom`, plus any protected indexes that must never
|
|
19
|
+
* be recycled while they hold live state — a zoomed slide keeps its
|
|
20
|
+
* transform/gesture session, so recycling it would drop the user's zoom.
|
|
21
|
+
* Protected indexes outside the gallery bounds are ignored.
|
|
22
|
+
*/
|
|
23
|
+
export declare function getSlidePoolIndexes(options: {
|
|
24
|
+
index: number;
|
|
25
|
+
prevIndex: number;
|
|
26
|
+
slidesCount: number;
|
|
27
|
+
poolSize?: number;
|
|
28
|
+
loop?: boolean;
|
|
29
|
+
protectedIndexes?: readonly number[];
|
|
30
|
+
}): number[];
|
|
31
|
+
/**
|
|
32
|
+
* Indexes to preload around `index` once the current slide has finished
|
|
33
|
+
* loading: up to `preload` slides forward and backward, clamped at the
|
|
34
|
+
* gallery bounds (no wrap-around — 2.x parity).
|
|
35
|
+
*/
|
|
36
|
+
export declare function getPreloadIndexes(index: number, preload: number, slidesCount: number): number[];
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Responsive image selection + decode gating (plan: responsive loading).
|
|
3
|
+
*
|
|
4
|
+
* The browser already picks a candidate natively when the runtimes render
|
|
5
|
+
* `<picture>`/`srcset` — these helpers exist for the places that need the
|
|
6
|
+
* DECISION as data: preload warming at the right resolution, tooling, and
|
|
7
|
+
* the framework image-component recipes. The algorithm mirrors the HTML
|
|
8
|
+
* spec's srcset selection closely enough to be deterministic and
|
|
9
|
+
* unit-testable: parse candidates, derive the slot width from `sizes`,
|
|
10
|
+
* scale by DPR, pick the smallest candidate that covers the target
|
|
11
|
+
* (falling back to the largest available).
|
|
12
|
+
*/
|
|
13
|
+
import type { GalleryItem, ImageSources } from './items';
|
|
14
|
+
export interface SrcsetCandidate {
|
|
15
|
+
url: string;
|
|
16
|
+
/** Width descriptor (`640w`) in px, if given. */
|
|
17
|
+
width?: number;
|
|
18
|
+
/** Density descriptor (`2x`), if given; bare candidates read as 1x. */
|
|
19
|
+
density?: number;
|
|
20
|
+
}
|
|
21
|
+
export interface Viewport {
|
|
22
|
+
width: number;
|
|
23
|
+
height: number;
|
|
24
|
+
/** devicePixelRatio; defaults to 1. */
|
|
25
|
+
dpr?: number;
|
|
26
|
+
}
|
|
27
|
+
/** Parse a `srcset` attribute string into candidates. Malformed entries
|
|
28
|
+
* are skipped rather than thrown — item data is author-provided. */
|
|
29
|
+
export declare function parseSrcset(srcset: string | undefined): SrcsetCandidate[];
|
|
30
|
+
/**
|
|
31
|
+
* Effective slot width (px) from a `sizes` attribute for a viewport.
|
|
32
|
+
* Supports the common authored forms deterministically: comma-separated
|
|
33
|
+
* `(min-width: Npx) <len>` / `(max-width: Npx) <len>` clauses with a
|
|
34
|
+
* bare `<len>` default, where `<len>` is `px` or `vw`. The first
|
|
35
|
+
* matching clause wins (spec order). Unsupported conditions are skipped;
|
|
36
|
+
* no match falls back to the full viewport width (`100vw`, the spec
|
|
37
|
+
* default).
|
|
38
|
+
*/
|
|
39
|
+
export declare function resolveSizes(sizes: string | undefined, viewportWidth: number): number;
|
|
40
|
+
/** Whether a `<source media>` condition matches the viewport. Same
|
|
41
|
+
* deterministic subset as {@link resolveSizes}: min/max-width in px;
|
|
42
|
+
* unsupported conditions read as NOT matching. Absent media matches. */
|
|
43
|
+
export declare function matchesMedia(media: string | undefined, viewport: Viewport): boolean;
|
|
44
|
+
export interface ResolvedImageSource {
|
|
45
|
+
src: string;
|
|
46
|
+
/** Intrinsic width (px) when the winning candidate declared one. */
|
|
47
|
+
width?: number;
|
|
48
|
+
/** The `<source>` entry that won, when selection went through
|
|
49
|
+
* `sources` (picture semantics) rather than the item srcset. */
|
|
50
|
+
source?: ImageSources;
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Deterministically resolve which image URL a viewport displays for an
|
|
54
|
+
* item, mirroring picture/srcset semantics: the first matching
|
|
55
|
+
* `sources[]` entry wins (spec order), then the item-level
|
|
56
|
+
* `srcset`/`sizes`, then plain `src`. Returns null for items with no
|
|
57
|
+
* image source at all.
|
|
58
|
+
*/
|
|
59
|
+
export declare function resolveImageSource(item: Pick<GalleryItem, 'src' | 'srcset' | 'sizes' | 'sources'>, viewport: Viewport): ResolvedImageSource | null;
|
|
60
|
+
/**
|
|
61
|
+
* The width "actual size" zoom refers to. `img.naturalWidth` LIES under
|
|
62
|
+
* `srcset`/`sizes`: w-descriptor selection density-corrects the
|
|
63
|
+
* intrinsic size to roughly the layout slot — on phones that collapses
|
|
64
|
+
* the actual-size scale to ~1 and kills double-tap/pinch zoom. The
|
|
65
|
+
* resolution order mirrors what the item DECLARES before trusting the
|
|
66
|
+
* element: explicit `width` (2.x `data-width`), the largest candidate
|
|
67
|
+
* the srcset ladder can serve (first matching `sources[]` entry per
|
|
68
|
+
* picture semantics, else the item srcset), the `lgSize` natural dims,
|
|
69
|
+
* and only then the reported natural width. The declared tiers are what
|
|
70
|
+
* make optimizer components (next/image, NuxtImg, NgOptimizedImage) —
|
|
71
|
+
* which manage their own srcset — zoomable to full resolution.
|
|
72
|
+
*/
|
|
73
|
+
export declare function getActualSizeWidth(item: Pick<GalleryItem, 'width' | 'srcset' | 'sources' | 'lgSize'>, viewport: Viewport, naturalWidth: number): number;
|
|
74
|
+
/**
|
|
75
|
+
* How long a slide waits on `img.decode()` before completing anyway —
|
|
76
|
+
* the gate must never strand a slide on a browser that rejects or
|
|
77
|
+
* stalls decode (huge images evict decoded data; some UAs reject on
|
|
78
|
+
* detached nodes).
|
|
79
|
+
*/
|
|
80
|
+
export declare const DECODE_TIMEOUT_MS = 500;
|
|
81
|
+
/**
|
|
82
|
+
* Decode gate: resolve when the image is safe to paint — after
|
|
83
|
+
* `decode()` settles (success OR rejection; rejection still means the
|
|
84
|
+
* data arrived) or after the timeout, whichever is first. Browsers
|
|
85
|
+
* without `decode()` resolve immediately (the load event already
|
|
86
|
+
* fired). Never rejects.
|
|
87
|
+
*/
|
|
88
|
+
export declare function awaitDecode(img: {
|
|
89
|
+
decode?: () => Promise<void>;
|
|
90
|
+
}, timeoutMs?: number): Promise<void>;
|
|
@@ -0,0 +1,268 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Typed core settings and the non-mutating merge, ported from
|
|
3
|
+
* `src/lg-settings.ts` (2.x) with the ADR 0001 §7 renames applied:
|
|
4
|
+
* `appendSubHtmlTo` → `captionPosition`; DOM-scraping options
|
|
5
|
+
* (`selector`, `extraProps`, `getCaptionFromTitleOrAlt`, …), HTML-string
|
|
6
|
+
* options (`nextHtml`, `prevHtml`, `appendCounterTo`) and
|
|
7
|
+
* `supportLegacyBrowser` are gone. `container`, `addClass`/`className` and
|
|
8
|
+
* `index` are framework-layer props, not headless settings.
|
|
9
|
+
*/
|
|
10
|
+
export type GalleryMode = 'lg-slide' | 'lg-fade' | 'lg-zoom-in' | 'lg-zoom-in-big' | 'lg-zoom-out' | 'lg-zoom-out-big' | 'lg-zoom-out-in' | 'lg-zoom-in-out' | 'lg-soft-zoom' | 'lg-scale-up' | 'lg-slide-circular' | 'lg-slide-circular-vertical' | 'lg-slide-vertical' | 'lg-slide-vertical-growth' | 'lg-slide-skew-only' | 'lg-slide-skew-only-rev' | 'lg-slide-skew-only-y' | 'lg-slide-skew-only-y-rev' | 'lg-slide-skew' | 'lg-slide-skew-rev' | 'lg-slide-skew-cross' | 'lg-slide-skew-cross-rev' | 'lg-slide-skew-ver' | 'lg-slide-skew-ver-rev' | 'lg-slide-skew-ver-cross' | 'lg-slide-skew-ver-cross-rev' | 'lg-lollipop' | 'lg-lollipop-rev' | 'lg-rotate' | 'lg-rotate-rev' | 'lg-tube';
|
|
11
|
+
/** Where slide captions render (2.x `appendSubHtmlTo`, without selectors). */
|
|
12
|
+
export type CaptionPosition = 'bar' | 'slide' | 'outer';
|
|
13
|
+
/**
|
|
14
|
+
* Gallery reading direction. `'auto'` inherits the page direction —
|
|
15
|
+
* resolved by the framework layer (this module is DOM-free, so `'auto'`
|
|
16
|
+
* reaches the runtimes unresolved, like `isMobile`).
|
|
17
|
+
*/
|
|
18
|
+
export type GalleryDirection = 'ltr' | 'rtl' | 'auto';
|
|
19
|
+
/** `direction` with `'auto'` already resolved against the document. */
|
|
20
|
+
export type ResolvedGalleryDirection = 'ltr' | 'rtl';
|
|
21
|
+
/** Plan-010 virtualization knobs; the feature is off when the whole
|
|
22
|
+
* object is absent. */
|
|
23
|
+
export interface VirtualizationSettings {
|
|
24
|
+
/** Mounted-slide pool size (overrides `numberOfSlideItemsInDom`). */
|
|
25
|
+
slides?: number;
|
|
26
|
+
/**
|
|
27
|
+
* Thumbnail-strip windowing: overscan thumbs kept mounted on each
|
|
28
|
+
* side of the visible range, or 'auto' for one extra viewport.
|
|
29
|
+
*/
|
|
30
|
+
thumbs?: 'auto' | number;
|
|
31
|
+
}
|
|
32
|
+
export interface GalleryCoreStrings {
|
|
33
|
+
closeGallery: string;
|
|
34
|
+
toggleMaximize: string;
|
|
35
|
+
previousSlide: string;
|
|
36
|
+
nextSlide: string;
|
|
37
|
+
download: string;
|
|
38
|
+
playVideo: string;
|
|
39
|
+
mediaLoadingFailed: string;
|
|
40
|
+
/** Accessible name of the gallery dialog when `ariaLabelledby` is not set. */
|
|
41
|
+
galleryLabel: string;
|
|
42
|
+
/**
|
|
43
|
+
* Template announced to assistive technology on every slide change.
|
|
44
|
+
* `{index}` and `{total}` are replaced with the 1-based slide position
|
|
45
|
+
* and the slide count; the slide caption, when present, is appended.
|
|
46
|
+
*/
|
|
47
|
+
slideAnnouncement: string;
|
|
48
|
+
/** Label of the toolbar's More options menu button. */
|
|
49
|
+
moreOptions: string;
|
|
50
|
+
/** Share plugin: share button label. */
|
|
51
|
+
share: string;
|
|
52
|
+
/** Thumbnail plugin: strip toggle button label. */
|
|
53
|
+
toggleThumbnails: string;
|
|
54
|
+
/** Autoplay plugin: slideshow toggle button label. */
|
|
55
|
+
toggleAutoplay: string;
|
|
56
|
+
/** Fullscreen plugin: fullscreen toggle button label. */
|
|
57
|
+
toggleFullscreen: string;
|
|
58
|
+
/** Zoom plugin: zoom-in button label. */
|
|
59
|
+
zoomIn: string;
|
|
60
|
+
/** Zoom plugin: zoom-out button label. */
|
|
61
|
+
zoomOut: string;
|
|
62
|
+
/** Zoom plugin: actual-size button label. */
|
|
63
|
+
viewActualSize: string;
|
|
64
|
+
/** Rotate plugin: rotate-left button label. */
|
|
65
|
+
rotateLeft: string;
|
|
66
|
+
/** Rotate plugin: rotate-right button label. */
|
|
67
|
+
rotateRight: string;
|
|
68
|
+
/** Rotate plugin: horizontal flip button label. */
|
|
69
|
+
flipHorizontal: string;
|
|
70
|
+
/** Rotate plugin: vertical flip button label. */
|
|
71
|
+
flipVertical: string;
|
|
72
|
+
/** Comment plugin: comments toggle button label. */
|
|
73
|
+
toggleComments: string;
|
|
74
|
+
}
|
|
75
|
+
export interface CoreSettings {
|
|
76
|
+
/** Type of transition between slides. */
|
|
77
|
+
mode: GalleryMode;
|
|
78
|
+
/** Slide animation CSS easing property. */
|
|
79
|
+
easing: string;
|
|
80
|
+
/** Transition duration in ms. */
|
|
81
|
+
speed: number;
|
|
82
|
+
/**
|
|
83
|
+
* Commercial license key. lightGallery 3 keys start with `LIG`;
|
|
84
|
+
* `0000-0000-000-0000` is the temporary testing key.
|
|
85
|
+
*/
|
|
86
|
+
licenseKey: string;
|
|
87
|
+
/** Height of the gallery, e.g. '100%', '300px'. */
|
|
88
|
+
height: string;
|
|
89
|
+
/** Width of the gallery, e.g. '100%', '300px'. */
|
|
90
|
+
width: string;
|
|
91
|
+
/**
|
|
92
|
+
* Start animation class applied to the outer element while opening when
|
|
93
|
+
* no zoom-from-origin transform is available. Empty string disables.
|
|
94
|
+
*/
|
|
95
|
+
startClass: string;
|
|
96
|
+
/**
|
|
97
|
+
* Animate the opening slide from the trigger thumbnail's bounding rect.
|
|
98
|
+
* Needs the natural image size via the item's `lgSize` field; falls back
|
|
99
|
+
* to `startClass` when unavailable. On close, a slide with no thumbnail
|
|
100
|
+
* to return to (its trigger is hidden or collapsed behind a "+9 photos"
|
|
101
|
+
* tile, it has no `lgSize`, or the items came without trigger elements)
|
|
102
|
+
* shrinks to the centre of the stage and fades instead of flying to a
|
|
103
|
+
* thumbnail it cannot reach.
|
|
104
|
+
*/
|
|
105
|
+
zoomFromOrigin: boolean;
|
|
106
|
+
/** Zoom-from-origin animation duration in ms. */
|
|
107
|
+
startAnimationDuration: number;
|
|
108
|
+
/** Backdrop fade duration in ms. */
|
|
109
|
+
backdropDuration: number;
|
|
110
|
+
/** Delay in ms before hiding controls on idle. 0 keeps them visible. */
|
|
111
|
+
hideBarsDelay: number;
|
|
112
|
+
/** Delay before the idle-hide behavior arms after opening. */
|
|
113
|
+
showBarsAfter: number;
|
|
114
|
+
/** Delay slide transitions in ms (`lg-slide-progress` window). */
|
|
115
|
+
slideDelay: number;
|
|
116
|
+
/** If true, toolbar/captions/thumbnails may overlap the media. */
|
|
117
|
+
allowMediaOverlap: boolean;
|
|
118
|
+
/** Default video size as `"width-height"`. */
|
|
119
|
+
videoMaxSize: string;
|
|
120
|
+
/** Automatically load poster images for YouTube videos. */
|
|
121
|
+
loadYouTubePoster: boolean;
|
|
122
|
+
/** Caption height used for media positioning when overlap is off. */
|
|
123
|
+
defaultCaptionHeight: number;
|
|
124
|
+
/** aria-labelledby attribute for the gallery dialog. */
|
|
125
|
+
ariaLabelledby: string;
|
|
126
|
+
/** aria-describedby attribute for the gallery dialog. */
|
|
127
|
+
ariaDescribedby: string;
|
|
128
|
+
/** Hide the page scrollbar (with padding compensation) while open. */
|
|
129
|
+
hideScrollbar: boolean;
|
|
130
|
+
/** Restore the previous scroll position when the gallery closes. */
|
|
131
|
+
resetScrollPosition: boolean;
|
|
132
|
+
/** If false the gallery cannot be closed (inline galleries). */
|
|
133
|
+
closable: boolean;
|
|
134
|
+
/** Allow vertical drag/swipe to close (forced off when not closable). */
|
|
135
|
+
swipeToClose: boolean;
|
|
136
|
+
/** Close when clicking the black area around the slide. */
|
|
137
|
+
closeOnTap: boolean;
|
|
138
|
+
/** Show the close button. */
|
|
139
|
+
showCloseIcon: boolean;
|
|
140
|
+
/** Show the maximize button (inline galleries). */
|
|
141
|
+
showMaximizeIcon: boolean;
|
|
142
|
+
/**
|
|
143
|
+
* Keep the toolbar on one row: when its buttons do not fit beside the
|
|
144
|
+
* counter, the lowest-priority ones move into a "More options" menu.
|
|
145
|
+
* Set to `false` to let the buttons wrap onto a second row instead.
|
|
146
|
+
*/
|
|
147
|
+
toolbarOverflow: boolean;
|
|
148
|
+
/**
|
|
149
|
+
* Show the toolbar buttons that repeat a touch gesture: zoom in, zoom
|
|
150
|
+
* out and actual size (pinch and double-tap do the same). On by
|
|
151
|
+
* default; `mobileSettings` turns it off on touch devices.
|
|
152
|
+
*/
|
|
153
|
+
showGestureButtons: boolean;
|
|
154
|
+
/** Loop back to the first slide from the last. */
|
|
155
|
+
loop: boolean;
|
|
156
|
+
/** Close on Escape. */
|
|
157
|
+
escKey: boolean;
|
|
158
|
+
/** Keyboard navigation (arrow keys). */
|
|
159
|
+
keyPress: boolean;
|
|
160
|
+
/** Trap focus within the gallery. */
|
|
161
|
+
trapFocus: boolean;
|
|
162
|
+
/** Show prev/next buttons. */
|
|
163
|
+
controls: boolean;
|
|
164
|
+
/** Bounce animation when navigating past the ends without loop. */
|
|
165
|
+
slideEndAnimation: boolean;
|
|
166
|
+
/**
|
|
167
|
+
* Disable prev/next buttons on first/last slide. Ignored (forced false)
|
|
168
|
+
* when `loop` or `slideEndAnimation` is on — 2.x parity.
|
|
169
|
+
*/
|
|
170
|
+
hideControlOnEnd: boolean;
|
|
171
|
+
/** Navigate on mousewheel. */
|
|
172
|
+
mousewheel: boolean;
|
|
173
|
+
/**
|
|
174
|
+
* Gallery reading direction: keyboard arrows, swipe advance and the
|
|
175
|
+
* slide/thumbnail transforms follow it. Visual mirroring is the
|
|
176
|
+
* opt-in `lg-rtl.css` layer — load it whenever this resolves to
|
|
177
|
+
* `'rtl'`. `'auto'` inherits the page direction; the default stays
|
|
178
|
+
* `'ltr'` so upgrades never change behavior on existing pages.
|
|
179
|
+
*/
|
|
180
|
+
direction: GalleryDirection;
|
|
181
|
+
/** Where slide captions render. */
|
|
182
|
+
captionPosition: CaptionPosition;
|
|
183
|
+
/** Number of slides to preload around the current slide. */
|
|
184
|
+
preload: number;
|
|
185
|
+
/** How many slide elements are kept mounted at a time (minimum 3). */
|
|
186
|
+
numberOfSlideItemsInDom: number;
|
|
187
|
+
/** iframe slide width. */
|
|
188
|
+
iframeWidth: string;
|
|
189
|
+
/** iframe slide height. */
|
|
190
|
+
iframeHeight: string;
|
|
191
|
+
/** iframe slide max width. */
|
|
192
|
+
iframeMaxWidth: string;
|
|
193
|
+
/** iframe slide max height. */
|
|
194
|
+
iframeMaxHeight: string;
|
|
195
|
+
/** Show the download button. */
|
|
196
|
+
download: boolean;
|
|
197
|
+
/** Show the slide counter. */
|
|
198
|
+
counter: boolean;
|
|
199
|
+
/** Minimum swipe distance in px to change slides. */
|
|
200
|
+
swipeThreshold: number;
|
|
201
|
+
/**
|
|
202
|
+
* Release velocity (px/ms, measured over the gesture's final
|
|
203
|
+
* ~100ms) at which a short swipe still changes slides — a flick.
|
|
204
|
+
*/
|
|
205
|
+
flickVelocity: number;
|
|
206
|
+
/**
|
|
207
|
+
* Pinching down on an un-zoomed image and releasing closes the
|
|
208
|
+
* gallery (iOS Photos). Guarded: a pinch that went past fit zoom
|
|
209
|
+
* at any point is a zoom correction and never closes. Requires
|
|
210
|
+
* `closable`.
|
|
211
|
+
*/
|
|
212
|
+
pinchToClose: boolean;
|
|
213
|
+
/** Enable touch swipe. */
|
|
214
|
+
enableSwipe: boolean;
|
|
215
|
+
/** Enable desktop mouse drag. */
|
|
216
|
+
enableDrag: boolean;
|
|
217
|
+
/**
|
|
218
|
+
* Large-gallery virtualization (plan 010). Off when undefined — the
|
|
219
|
+
* 2.x behavior: every thumbnail renders and the mounted-slide window
|
|
220
|
+
* is `numberOfSlideItemsInDom`. `slides` overrides the mounted-slide
|
|
221
|
+
* pool size; `thumbs` turns on thumbnail-strip windowing (only the
|
|
222
|
+
* visible thumbs plus an overscan render, with spacers preserving the
|
|
223
|
+
* strip geometry) — a number is the overscan thumb count per side,
|
|
224
|
+
* 'auto' derives one extra viewport per side. The window advances at
|
|
225
|
+
* commit points (release, slide change, resize), never per
|
|
226
|
+
* pointermove — interaction stays zero-reactivity.
|
|
227
|
+
*/
|
|
228
|
+
virtualization?: VirtualizationSettings;
|
|
229
|
+
/**
|
|
230
|
+
* Announce slide changes to assistive technology through a dedicated
|
|
231
|
+
* polite live region (`strings.slideAnnouncement` + the slide caption).
|
|
232
|
+
* While enabled, the counter and caption bar are not separate live
|
|
233
|
+
* regions — the announcer is the single source of slide-change
|
|
234
|
+
* announcements. Set to `false` to restore the 2.x behavior (live
|
|
235
|
+
* counter and caption, no announcer).
|
|
236
|
+
*/
|
|
237
|
+
ariaAnnouncements: boolean;
|
|
238
|
+
/** Localizable UI strings. */
|
|
239
|
+
strings: GalleryCoreStrings;
|
|
240
|
+
/** Detect mobile devices; defaults to a UA sniff in the framework layer. */
|
|
241
|
+
isMobile?: () => boolean;
|
|
242
|
+
/** Settings overrides applied when a mobile device is detected. */
|
|
243
|
+
mobileSettings: MobileSettings;
|
|
244
|
+
}
|
|
245
|
+
export type MobileSettings = Partial<Omit<CoreSettings, 'mobileSettings' | 'isMobile'>>;
|
|
246
|
+
/** User-facing shape: everything optional, strings mergeable per-key. */
|
|
247
|
+
export type UserSettings = Partial<Omit<CoreSettings, 'strings'>> & {
|
|
248
|
+
strings?: Partial<GalleryCoreStrings>;
|
|
249
|
+
};
|
|
250
|
+
export declare const coreSettingsDefaults: CoreSettings;
|
|
251
|
+
export interface ResolveSettingsOptions {
|
|
252
|
+
/**
|
|
253
|
+
* Whether the current device is mobile — decided by the framework layer
|
|
254
|
+
* (headless cannot touch `navigator`). Applies `mobileSettings`.
|
|
255
|
+
*/
|
|
256
|
+
isMobile?: boolean;
|
|
257
|
+
/**
|
|
258
|
+
* Plugin default settings merged below user settings (plugin runtime). Merged
|
|
259
|
+
* left-to-right, never mutating any input.
|
|
260
|
+
*/
|
|
261
|
+
pluginDefaults?: ReadonlyArray<Partial<CoreSettings>>;
|
|
262
|
+
}
|
|
263
|
+
/**
|
|
264
|
+
* Merge defaults + plugin defaults + user settings + mobile overrides into a
|
|
265
|
+
* resolved settings object. Non-mutating by construction: every input object
|
|
266
|
+
* is left untouched (2.x mutated `settings` in place; 3.x never does).
|
|
267
|
+
*/
|
|
268
|
+
export declare function resolveSettings(user?: UserSettings, options?: ResolveSettingsOptions): CoreSettings;
|