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
|
@@ -3,6 +3,12 @@
|
|
|
3
3
|
.lg-css3 {
|
|
4
4
|
&.lg-zoom-out {
|
|
5
5
|
.lg-item {
|
|
6
|
+
// The crossfade IS the effect here, so it runs for the
|
|
7
|
+
// whole slide instead of the short default swap. Declared on
|
|
8
|
+
// the item: --lg-speed is published on .lg-inner, so only its
|
|
9
|
+
// descendants can resolve it.
|
|
10
|
+
--lg-opacity-speed: var(--lg-speed, 400ms);
|
|
11
|
+
|
|
6
12
|
opacity: 0;
|
|
7
13
|
|
|
8
14
|
&.lg-prev-slide {
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Slide-change announcement formatting for the shared `aria-live` region.
|
|
3
|
+
* All four runtimes build their announcer text through this helper so the
|
|
4
|
+
* wording (and its localization surface, `strings.slideAnnouncement`) stays
|
|
5
|
+
* identical everywhere.
|
|
6
|
+
*/
|
|
7
|
+
export interface SlideAnnouncementOptions {
|
|
8
|
+
/** `strings.slideAnnouncement` template with `{index}`/`{total}` slots. */
|
|
9
|
+
template: string;
|
|
10
|
+
/** 1-based position of the shown slide. */
|
|
11
|
+
index: number;
|
|
12
|
+
/** Total slide count. */
|
|
13
|
+
total: number;
|
|
14
|
+
/** Plain-text caption of the shown slide, if any. */
|
|
15
|
+
caption?: string;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Build the text announced on a slide change: the filled template, then the
|
|
19
|
+
* caption (comma-separated) when one exists. Whitespace in the caption is
|
|
20
|
+
* collapsed so multi-line/rich captions read as one sentence.
|
|
21
|
+
*/
|
|
22
|
+
export declare function formatSlideAnnouncement(options: SlideAnnouncementOptions): string;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Framework-free typed event emitter — the plugin/core event bus shared by
|
|
3
|
+
* every framework runtime (React ADR 0001 §1 boundary note; Angular ADR
|
|
4
|
+
* 0001 §5). Each framework supplies its own event map type; unknown event
|
|
5
|
+
* names stay usable for plugin-private events.
|
|
6
|
+
*/
|
|
7
|
+
export interface TypedEmitter<TMap extends object> {
|
|
8
|
+
/** Subscribe; returns the unsubscribe function. */
|
|
9
|
+
on<K extends keyof TMap & string>(name: K, listener: (detail: TMap[K]) => void): () => void;
|
|
10
|
+
on(name: string, listener: (detail: unknown) => void): () => void;
|
|
11
|
+
emit<K extends keyof TMap & string>(name: K, detail: TMap[K]): void;
|
|
12
|
+
emit(name: string, detail?: unknown): void;
|
|
13
|
+
}
|
|
14
|
+
export declare function createEmitter<TMap extends object>(): TypedEmitter<TMap>;
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Gesture math, ported from the 2.x touch/drag implementation
|
|
3
|
+
* (`touchMove`/`touchEnd` in `src/lightgallery.ts`) as pure functions. The
|
|
4
|
+
* framework layer owns pointer events and writes the returned transforms
|
|
5
|
+
* straight to the DOM (never through framework state — one render per
|
|
6
|
+
* gesture, not per move); every *decision* lives here so swipe feel is
|
|
7
|
+
* identical across frameworks.
|
|
8
|
+
*/
|
|
9
|
+
import type { ResolvedGalleryDirection } from './settings';
|
|
10
|
+
export type SwipeAxis = 'horizontal' | 'vertical';
|
|
11
|
+
/**
|
|
12
|
+
* Minimum travel (px) before a drag commits to an axis. Tuned from the
|
|
13
|
+
* 2.x 15px to ~10 (UIPanGestureRecognizer territory): drags answer a
|
|
14
|
+
* touch sooner without axis flip-flop — the commit is still sticky.
|
|
15
|
+
*/
|
|
16
|
+
export declare const SWIPE_AXIS_THRESHOLD = 10;
|
|
17
|
+
/**
|
|
18
|
+
* Flick support: a release faster than this (px/ms, windowed — see
|
|
19
|
+
* `velocity.ts`) navigates even below `swipeThreshold`. Default per the
|
|
20
|
+
* gesture-physics teardown: windowed readings run higher than the old
|
|
21
|
+
* whole-gesture averages, so this gate and windowed measurement ship as
|
|
22
|
+
* one change. Public setting: `flickVelocity`.
|
|
23
|
+
*/
|
|
24
|
+
export declare const FLICK_VELOCITY = 0.5;
|
|
25
|
+
/** Minimum travel (px) for a flick, so taps never navigate. */
|
|
26
|
+
export declare const FLICK_MIN_DISTANCE = 20;
|
|
27
|
+
/** Vertical travel (px) beyond which the drag hides the UI chrome — 2.x. */
|
|
28
|
+
export declare const VERTICAL_CLOSE_THRESHOLD = 100;
|
|
29
|
+
/**
|
|
30
|
+
* Drag-to-close verdict: the momentum-projected travel must pass this
|
|
31
|
+
* fraction of the viewport height — a small fast downward flick closes,
|
|
32
|
+
* a large slow drag released while returning does not.
|
|
33
|
+
*/
|
|
34
|
+
export declare const VERTICAL_CLOSE_RATIO = 0.4;
|
|
35
|
+
/**
|
|
36
|
+
* Minimum actual travel (px) before the projected close arms. Momentum
|
|
37
|
+
* may extend a real drag, never replace one: a grazed tap releases with
|
|
38
|
+
* a fast final instant, and projection alone would read it as a close
|
|
39
|
+
* flick.
|
|
40
|
+
*/
|
|
41
|
+
export declare const VERTICAL_CLOSE_MIN_DRAG = 40;
|
|
42
|
+
/**
|
|
43
|
+
* Rubber-band friction past the first/last slide (no loop): the drag
|
|
44
|
+
* keeps moving at this fraction of the finger instead of the 2.x
|
|
45
|
+
* un-resisted 1:1 travel — you feel that there is nothing further.
|
|
46
|
+
*/
|
|
47
|
+
export declare const SLIDE_EDGE_FRICTION = 0.35;
|
|
48
|
+
/**
|
|
49
|
+
* Horizontal drag delta with rubber-banding past the gallery ends.
|
|
50
|
+
* `hasPrev`/`hasNext` reflect whether a slide exists in that direction
|
|
51
|
+
* (loop counts); the release spring returns the frictioned distance.
|
|
52
|
+
*/
|
|
53
|
+
export declare function getEdgeFrictionedDelta(deltaX: number, hasPrev: boolean, hasNext: boolean, direction?: ResolvedGalleryDirection): number;
|
|
54
|
+
/** Decide (once) which axis a drag follows; sticky after the first commit. */
|
|
55
|
+
export declare function getSwipeAxis(deltaX: number, deltaY: number, current: SwipeAxis | undefined): SwipeAxis | undefined;
|
|
56
|
+
export interface HorizontalDragTransforms {
|
|
57
|
+
current: string;
|
|
58
|
+
prev: string;
|
|
59
|
+
next: string;
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* Follow-the-finger transforms for the current slide and its neighbors
|
|
63
|
+
* (2.x `touchMove` horizontal branch, including the shrinking gutter).
|
|
64
|
+
*/
|
|
65
|
+
export declare function getHorizontalDragTransforms(deltaX: number, slideWidth: number, direction?: ResolvedGalleryDirection): HorizontalDragTransforms;
|
|
66
|
+
export interface VerticalDragEffects {
|
|
67
|
+
/** Backdrop opacity fading out with the drag. */
|
|
68
|
+
backdropOpacity: number;
|
|
69
|
+
/** Transform for the current slide (translate + shrink). */
|
|
70
|
+
transform: string;
|
|
71
|
+
/** True once the UI chrome should hide (past the close threshold). */
|
|
72
|
+
hideUi: boolean;
|
|
73
|
+
}
|
|
74
|
+
/** Drag-to-close visuals (2.x `touchMove` vertical branch). */
|
|
75
|
+
export declare function getVerticalDragEffects(deltaY: number, viewportWidth: number, viewportHeight: number): VerticalDragEffects;
|
|
76
|
+
export type SwipeReleaseVerdict = 'next' | 'prev' | 'stay';
|
|
77
|
+
export interface SwipeReleaseInput {
|
|
78
|
+
deltaX: number;
|
|
79
|
+
/** Release velocity, px/ms signed (windowed — see `velocity.ts`). */
|
|
80
|
+
velocityX: number;
|
|
81
|
+
/** `swipeThreshold` setting (px). */
|
|
82
|
+
threshold: number;
|
|
83
|
+
/** `flickVelocity` setting (px/ms). */
|
|
84
|
+
flickVelocity?: number;
|
|
85
|
+
/**
|
|
86
|
+
* Slide width (px). When given, a release whose momentum-projected
|
|
87
|
+
* travel crosses the midpoint also navigates — a firm half-hearted
|
|
88
|
+
* swipe keeps going where a hesitant one snaps back.
|
|
89
|
+
*/
|
|
90
|
+
viewportWidth?: number;
|
|
91
|
+
/** Resolved gallery direction; in `'rtl'` the verdict mirrors. */
|
|
92
|
+
direction?: ResolvedGalleryDirection;
|
|
93
|
+
}
|
|
94
|
+
/**
|
|
95
|
+
* Horizontal release decision: past `swipeThreshold`, or a quick flick →
|
|
96
|
+
* navigate (negative delta = next, 2.x parity); otherwise snap back.
|
|
97
|
+
* The flick counts only when the release velocity points the same way
|
|
98
|
+
* as the drag — reversing direction just before lifting is a cancel,
|
|
99
|
+
* not a flick.
|
|
100
|
+
*/
|
|
101
|
+
export declare function getSwipeReleaseVerdict({ deltaX, velocityX, threshold, flickVelocity, viewportWidth, direction, }: SwipeReleaseInput): SwipeReleaseVerdict;
|
|
102
|
+
/**
|
|
103
|
+
* Vertical release decision: close when the momentum-projected travel
|
|
104
|
+
* passes {@link VERTICAL_CLOSE_RATIO} of the viewport in the drag's own
|
|
105
|
+
* direction (a release moving back toward rest never closes), and the
|
|
106
|
+
* finger actually travelled {@link VERTICAL_CLOSE_MIN_DRAG}.
|
|
107
|
+
*/
|
|
108
|
+
export declare function shouldCloseOnVerticalDrag(deltaY: number, velocityY: number, viewportHeight: number, options: {
|
|
109
|
+
closable: boolean;
|
|
110
|
+
swipeToClose: boolean;
|
|
111
|
+
}): boolean;
|
|
112
|
+
/**
|
|
113
|
+
* Which slide navigation a release verdict maps to, honoring the 2.x touch
|
|
114
|
+
* loop rule: galleries with fewer than 3 slides never wrap from touch.
|
|
115
|
+
*/
|
|
116
|
+
export declare function resolveSwipeTarget(verdict: SwipeReleaseVerdict, currentIndex: number, slidesCount: number, loop: boolean): number | null;
|
|
117
|
+
/** One live pointer, for multi-pointer consumers (zoom plugin). */
|
|
118
|
+
export interface PointerRecord {
|
|
119
|
+
id: number;
|
|
120
|
+
startX: number;
|
|
121
|
+
startY: number;
|
|
122
|
+
x: number;
|
|
123
|
+
y: number;
|
|
124
|
+
}
|
|
125
|
+
/** Add or update a pointer record, returning a new array. */
|
|
126
|
+
export declare function upsertPointer(pointers: readonly PointerRecord[], record: PointerRecord): PointerRecord[];
|
|
127
|
+
/** Remove a pointer record by id, returning a new array. */
|
|
128
|
+
export declare function removePointer(pointers: readonly PointerRecord[], id: number): PointerRecord[];
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* URL-hash drivers for the hash plugin (plan 012). The plugin's history
|
|
3
|
+
* side-effects — replace-write the deep link, restore/clear on close,
|
|
4
|
+
* follow back/forward — sit behind one interface with two engines:
|
|
5
|
+
*
|
|
6
|
+
* - `history`: today's behavior (history.replaceState + `hashchange`) —
|
|
7
|
+
* the default fallback everywhere.
|
|
8
|
+
* - `navigation`: the Navigation API (Baseline Newly Available, Jan
|
|
9
|
+
* 2026) — replace-navigations carry entry state, and back/forward is
|
|
10
|
+
* observed via `currententrychange`. Strictly a feature-detected
|
|
11
|
+
* enhancement: nothing here is load-bearing (Safari's missing
|
|
12
|
+
* `precommitHandler` is irrelevant — we never intercept), and any
|
|
13
|
+
* missing capability falls back to the history driver.
|
|
14
|
+
*
|
|
15
|
+
* The deep-link URL format (`#lg=<galleryId>&slide=<index|name>`) is
|
|
16
|
+
* public API and identical across drivers — pinned by the parity tests.
|
|
17
|
+
*
|
|
18
|
+
* Everything is structurally typed (the runtimes pass `window`); nothing
|
|
19
|
+
* in this module touches DOM globals directly.
|
|
20
|
+
*
|
|
21
|
+
* Revisit note: flip the docs' default emphasis toward `navigation` once
|
|
22
|
+
* the API reaches Widely Available (~2028 per current projection).
|
|
23
|
+
*/
|
|
24
|
+
export interface HashDriver {
|
|
25
|
+
/** Which engine this driver runs on (also used by the parity tests). */
|
|
26
|
+
readonly kind: 'history' | 'navigation';
|
|
27
|
+
/** The current URL hash including the leading '#', or ''. */
|
|
28
|
+
getHash(): string;
|
|
29
|
+
/** Replace the current entry's hash (never grows history). */
|
|
30
|
+
replaceHash(hash: string): void;
|
|
31
|
+
/** Replace the current entry with the bare URL (drops the hash). */
|
|
32
|
+
clearHash(): void;
|
|
33
|
+
/**
|
|
34
|
+
* Notify on URL changes the driver did not itself cause is NOT
|
|
35
|
+
* guaranteed — subscribers must be re-entrant-safe (the hash plugin's
|
|
36
|
+
* handlers already are: same-slide jumps no-op and close checks the
|
|
37
|
+
* open flag).
|
|
38
|
+
*/
|
|
39
|
+
subscribe(onChange: () => void): () => void;
|
|
40
|
+
}
|
|
41
|
+
export interface HashHistoryWindow {
|
|
42
|
+
location: {
|
|
43
|
+
hash: string;
|
|
44
|
+
pathname: string;
|
|
45
|
+
search: string;
|
|
46
|
+
};
|
|
47
|
+
history: {
|
|
48
|
+
replaceState(data: unknown, unused: string, url?: string): void;
|
|
49
|
+
};
|
|
50
|
+
addEventListener(type: string, listener: () => void): void;
|
|
51
|
+
removeEventListener(type: string, listener: () => void): void;
|
|
52
|
+
}
|
|
53
|
+
/** Structural slice of the Navigation API the driver uses. */
|
|
54
|
+
export interface NavigationLike {
|
|
55
|
+
currentEntry?: {
|
|
56
|
+
url?: string | null;
|
|
57
|
+
} | null;
|
|
58
|
+
navigate(url: string, options?: {
|
|
59
|
+
history?: 'auto' | 'push' | 'replace';
|
|
60
|
+
state?: unknown;
|
|
61
|
+
}): unknown;
|
|
62
|
+
addEventListener(type: string, listener: () => void): void;
|
|
63
|
+
removeEventListener(type: string, listener: () => void): void;
|
|
64
|
+
}
|
|
65
|
+
export interface HashNavigationWindow extends HashHistoryWindow {
|
|
66
|
+
navigation?: NavigationLike;
|
|
67
|
+
}
|
|
68
|
+
export type HashDriverPreference = 'auto' | 'history' | 'navigation';
|
|
69
|
+
export declare function createHistoryHashDriver(win: HashHistoryWindow): HashDriver;
|
|
70
|
+
export declare function createNavigationHashDriver(win: HashHistoryWindow, navigation: NavigationLike): HashDriver;
|
|
71
|
+
/**
|
|
72
|
+
* Pick a driver: `navigation` when preferred-or-auto and the Navigation
|
|
73
|
+
* API is present with everything the driver needs; the history driver in
|
|
74
|
+
* every other case (including an explicit `navigation` preference on a
|
|
75
|
+
* browser without support — the enhancement is never load-bearing).
|
|
76
|
+
*/
|
|
77
|
+
export declare function createHashDriver(win: HashNavigationWindow, preference?: HashDriverPreference): HashDriver;
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Built-in UI icon set: inline SVG strings, one per icon name, grouped
|
|
3
|
+
* by the feature that renders them so bundlers ship only the groups a
|
|
4
|
+
* consumer's plugins import. Pure string data — safe in this DOM-free
|
|
5
|
+
* package. Runtimes render these when the consumer supplies no custom
|
|
6
|
+
* icon for a name.
|
|
7
|
+
*
|
|
8
|
+
* The artwork is lightGallery's own icon set, carried over from the
|
|
9
|
+
* 2.x icon font: each glyph's vector outline extracted from the font
|
|
10
|
+
* and re-baselined onto a square viewBox (font ascent 960 on a 1024
|
|
11
|
+
* em). Same shapes the library has always shipped — now crisp inline
|
|
12
|
+
* SVGs that follow `currentColor`.
|
|
13
|
+
*/
|
|
14
|
+
/** The icon-name contract shared by every runtime and plugin. */
|
|
15
|
+
export type LgIconName = 'close' | 'prev' | 'next' | 'download' | 'maximize' | 'minimize' | 'more' | 'zoomIn' | 'zoomOut' | 'actualSize' | 'rotateLeft' | 'rotateRight' | 'flipHorizontal' | 'flipVertical' | 'share' | 'shareFacebook' | 'shareX' | 'sharePinterest' | 'autoplayPlay' | 'autoplayPause' | 'fullscreen' | 'fullscreenExit' | 'comment' | 'commentClose' | 'toggleThumbnails';
|
|
16
|
+
export declare const coreDefaultIcons: {
|
|
17
|
+
readonly close: "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 1024 1024\" fill=\"currentColor\"><path transform=\"translate(0, 960) scale(1, -1)\" d=\"M810 664.667l-238-238 238-238-60-60-238 238-238-238-60 60 238 238-238 238 60 60 238-238 238 238z\"/></svg>";
|
|
18
|
+
readonly more: "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 1024 1024\" fill=\"currentColor\"><circle cx=\"232\" cy=\"512\" r=\"80\"/><circle cx=\"512\" cy=\"512\" r=\"80\"/><circle cx=\"792\" cy=\"512\" r=\"80\"/></svg>";
|
|
19
|
+
readonly prev: "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 1024 1024\" fill=\"currentColor\"><path transform=\"translate(0, 960) scale(1, -1)\" d=\"M426.667 768q17.667 0 30.167-12.5t12.5-30.167q0-18-12.667-30.333l-225.667-225.667h665q17.667 0 30.167-12.5t12.5-30.167-12.5-30.167-30.167-12.5h-665l225.667-225.667q12.667-12.333 12.667-30.333 0-17.667-12.5-30.167t-30.167-12.5q-18 0-30.333 12.333l-298.667 298.667q-12.333 13-12.333 30.333t12.333 30.333l298.667 298.667q12.667 12.333 30.333 12.333z\"/></svg>";
|
|
20
|
+
readonly next: "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 1024 1024\" fill=\"currentColor\"><path transform=\"translate(0, 960) scale(1, -1)\" d=\"M597.333 768q18 0 30.333-12.333l298.667-298.667q12.333-12.333 12.333-30.333t-12.333-30.333l-298.667-298.667q-12.333-12.333-30.333-12.333-18.333 0-30.5 12.167t-12.167 30.5q0 18 12.333 30.333l226 225.667h-665q-17.667 0-30.167 12.5t-12.5 30.167 12.5 30.167 30.167 12.5h665l-226 225.667q-12.333 12.333-12.333 30.333 0 18.333 12.167 30.5t30.5 12.167z\"/></svg>";
|
|
21
|
+
readonly download: "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 1024 1024\" fill=\"currentColor\"><path transform=\"translate(0, 960) scale(1, -1)\" d=\"M170 128.667h684v-86h-684v86zM682 384.667l-170-172-170 172h128v426h84v-426h128z\"/></svg>";
|
|
22
|
+
readonly maximize: "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 1024 1024\" fill=\"currentColor\"><path transform=\"translate(0, 960) scale(1, -1)\" d=\"M793.003 768l-225.835-225.835c-16.683-16.683-16.683-43.691 0-60.331s43.691-16.683 60.331 0l225.835 225.835v-153.003c0-23.552 19.115-42.667 42.667-42.667s42.667 19.115 42.667 42.667v256c0 5.803-1.152 11.307-3.243 16.341s-5.163 9.728-9.216 13.781c-0.043 0.043-0.043 0.043-0.085 0.085-3.925 3.925-8.619 7.083-13.781 9.216-5.035 2.091-10.539 3.243-16.341 3.243h-256c-23.552 0-42.667-19.115-42.667-42.667s19.115-42.667 42.667-42.667zM230.997 85.334l225.835 225.835c16.683 16.683 16.683 43.691 0 60.331s-43.691 16.683-60.331 0l-225.835-225.835v153.003c0 23.552-19.115 42.667-42.667 42.667s-42.667-19.115-42.667-42.667v-256c0-23.552 19.115-42.667 42.667-42.667h256c23.552 0 42.667 19.115 42.667 42.667s-19.115 42.667-42.667 42.667z\"/></svg>";
|
|
23
|
+
readonly minimize: "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 1024 1024\" fill=\"currentColor\"><path transform=\"translate(0, 960) scale(1, -1)\" d=\"M700.331 554.667l225.835 225.835c16.683 16.683 16.683 43.691 0 60.331s-43.691 16.683-60.331 0l-225.835-225.835v153.003c0 23.552-19.115 42.667-42.667 42.667s-42.667-19.115-42.667-42.667v-256c0-5.803 1.152-11.307 3.243-16.341s5.163-9.728 9.216-13.781c0.043-0.043 0.043-0.043 0.085-0.085 3.925-3.925 8.619-7.083 13.781-9.216 5.035-2.091 10.539-3.243 16.341-3.243h256c23.552 0 42.667 19.115 42.667 42.667s-19.115 42.667-42.667 42.667zM158.165 12.502l225.835 225.835v-153.003c0-23.552 19.115-42.667 42.667-42.667s42.667 19.115 42.667 42.667v256c0 5.803-1.152 11.307-3.243 16.341s-5.163 9.728-9.216 13.781c-0.043 0.043-0.043 0.043-0.085 0.085-4.096 4.053-8.789 7.125-13.781 9.216-5.035 2.091-10.539 3.243-16.341 3.243h-256c-23.552 0-42.667-19.115-42.667-42.667s19.115-42.667 42.667-42.667h153.003l-225.835-225.835c-16.683-16.683-16.683-43.691 0-60.331s43.691-16.683 60.331 0z\"/></svg>";
|
|
24
|
+
};
|
|
25
|
+
export declare const zoomDefaultIcons: {
|
|
26
|
+
readonly zoomIn: "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 1024 1024\" fill=\"currentColor\"><path transform=\"translate(0, 960) scale(1, -1)\" d=\"M512 512.667h-86v-86h-42v86h-86v42h86v86h42v-86h86v-42zM406 340.667q80 0 136 56t56 136-56 136-136 56-136-56-56-136 56-136 136-56zM662 340.667l212-212-64-64-212 212v34l-12 12q-76-66-180-66-116 0-197 80t-81 196 81 197 197 81 196-81 80-197q0-104-66-180l12-12h34z\"/></svg>";
|
|
27
|
+
readonly zoomOut: "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 1024 1024\" fill=\"currentColor\"><path transform=\"translate(0, 960) scale(1, -1)\" d=\"M298 554.667h214v-42h-214v42zM406 340.667q80 0 136 56t56 136-56 136-136 56-136-56-56-136 56-136 136-56zM662 340.667l212-212-64-64-212 212v34l-12 12q-76-66-180-66-116 0-197 80t-81 196 81 197 197 81 196-81 80-197q0-104-66-180l12-12h34z\"/></svg>";
|
|
28
|
+
readonly actualSize: "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 1024 1024\" fill=\"currentColor\"><path transform=\"translate(0, 960) scale(1, -1)\" d=\"M384 853.334h426.667q53 0 90.5-37.5t37.5-90.5v-426.667q0-53-37.5-90.5t-90.5-37.5h-426.667q-53 0-90.5 37.5t-37.5 90.5v426.667q0 53 37.5 90.5t90.5 37.5zM170.667 675.334v-547.333q0-17.667 12.5-30.167t30.167-12.5h547.333q-13.333-37.667-46.333-61.5t-74.333-23.833h-426.667q-53 0-90.5 37.5t-37.5 90.5v426.667q0 41.333 23.833 74.333t61.5 46.333zM810.667 768h-426.667q-17.667 0-30.167-12.5t-12.5-30.167v-426.667q0-17.667 12.5-30.167t30.167-12.5h426.667q17.667 0 30.167 12.5t12.5 30.167v426.667q0 17.667-12.5 30.167t-30.167 12.5z\"/></svg>";
|
|
29
|
+
};
|
|
30
|
+
export declare const rotateDefaultIcons: {
|
|
31
|
+
readonly rotateLeft: "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 1024 1024\" fill=\"currentColor\"><path transform=\"translate(0, 960) scale(1, -1)\" d=\"M554 764.667q126-16 213-112t87-226-87-226-213-112v86q92 16 153 87t61 165-61 165-153 87v-166l-194 190 194 194v-132zM302 156.667l62 62q46-34 106-44v-86q-96 12-168 68zM260 384.667q10-58 42-106l-60-60q-56 74-68 166h86zM304 574.667q-36-52-44-106h-86q12 90 70 166z\"/></svg>";
|
|
32
|
+
readonly rotateRight: "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 1024 1024\" fill=\"currentColor\"><path transform=\"translate(0, 960) scale(1, -1)\" d=\"M720 278.667q34 46 44 106h86q-12-92-68-166zM554 174.667q60 10 106 44l62-62q-72-56-168-68v86zM850 468.667h-86q-10 60-44 106l62 60q58-72 68-166zM664 702.667l-194-190v166q-92-16-153-87t-61-165 61-165 153-87v-86q-126 16-213 112t-87 226 87 226 213 112v132z\"/></svg>";
|
|
33
|
+
readonly flipHorizontal: "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 1024 1024\" fill=\"currentColor\"><path transform=\"translate(0, 960) scale(1, -1)\" d=\"M896 554.667l-170-170v128h-300v84h300v128zM298 468.667v-128h300v-84h-300v-128l-170 170z\"/></svg>";
|
|
34
|
+
readonly flipVertical: "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 1024 1024\" fill=\"currentColor\"><path transform=\"translate(0, 960) scale(1, -1)\" d=\"M384 810.667l170-170h-128v-300h-84v300h-128zM682 212.667h128l-170-170-170 170h128v300h84v-300z\"/></svg>";
|
|
35
|
+
};
|
|
36
|
+
export declare const shareDefaultIcons: {
|
|
37
|
+
readonly share: "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 1024 1024\" fill=\"currentColor\"><path transform=\"translate(0, 960) scale(1, -1)\" d=\"M768 252.667c68 0 124-56 124-124s-56-126-124-126-124 58-124 126c0 10 0 20 2 28l-302 176c-24-22-54-34-88-34-70 0-128 58-128 128s58 128 128 128c34 0 64-12 88-34l300 174c-2 10-4 20-4 30 0 70 58 128 128 128s128-58 128-128-58-128-128-128c-34 0-64 14-88 36l-300-176c2-10 4-20 4-30s-2-20-4-30l304-176c22 20 52 32 84 32z\"/></svg>";
|
|
38
|
+
readonly shareFacebook: "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 1024 1024\" fill=\"currentColor\"><path transform=\"translate(0, 960) scale(1, -1)\" d=\"M512 952.32c-271.462 0-491.52-220.058-491.52-491.52s220.058-491.52 491.52-491.52 491.52 220.058 491.52 491.52-220.058 491.52-491.52 491.52zM628.429 612.659h-73.882c-8.755 0-18.483-11.52-18.483-26.829v-53.35h92.416l-13.978-76.083h-78.438v-228.403h-87.194v228.403h-79.104v76.083h79.104v44.749c0 64.205 44.544 116.378 105.677 116.378h73.882v-80.947z\"/></svg>";
|
|
39
|
+
readonly shareX: "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 1024 1024\" fill=\"currentColor\"><circle cx=\"512\" cy=\"512\" r=\"491.52\"/><path fill=\"#fff\" transform=\"translate(227 224) scale(24)\" d=\"M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-5.214-6.817L4.99 21.75H1.68l7.73-8.835L1.254 2.25H8.08l4.713 6.231zm-1.161 17.52h1.833L7.084 4.126H5.117z\"/></svg>";
|
|
40
|
+
readonly sharePinterest: "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 1024 1024\" fill=\"currentColor\"><path transform=\"translate(0, 960) scale(1, -1)\" d=\"M512 952.32c-271.462 0-491.52-220.058-491.52-491.52s220.058-491.52 491.52-491.52 491.52 220.058 491.52 491.52-220.058 491.52-491.52 491.52zM545.638 344.32c-31.539 2.406-44.749 18.022-69.427 32.973-13.568-71.219-30.157-139.52-79.309-175.206-15.206 107.725 22.221 188.518 39.629 274.381-29.645 49.92 3.533 150.323 66.099 125.645 76.954-30.515-66.662-185.6 29.747-205.005 100.659-20.173 141.773 174.694 79.36 237.978-90.214 91.494-262.502 2.099-241.306-128.87 5.12-32 38.246-41.728 13.21-85.914-57.702 12.8-74.957 58.317-72.704 118.989 3.533 99.328 89.242 168.909 175.155 178.483 108.698 12.083 210.688-39.885 224.819-142.182 15.821-115.405-49.101-240.282-165.274-231.27z\"/></svg>";
|
|
41
|
+
};
|
|
42
|
+
export declare const autoplayDefaultIcons: {
|
|
43
|
+
readonly autoplayPlay: "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 1024 1024\" fill=\"currentColor\"><path transform=\"translate(0, 960) scale(1, -1)\" d=\"M512 84.667q140 0 241 101t101 241-101 241-241 101-241-101-101-241 101-241 241-101zM512 852.667q176 0 301-125t125-301-125-301-301-125-301 125-125 301 125 301 301 125zM426 234.667v384l256-192z\"/></svg>";
|
|
44
|
+
readonly autoplayPause: "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 1024 1024\" fill=\"currentColor\"><path transform=\"translate(0, 960) scale(1, -1)\" d=\"M554 256.667v340h86v-340h-86zM512 84.667q140 0 241 101t101 241-101 241-241 101-241-101-101-241 101-241 241-101zM512 852.667q176 0 301-125t125-301-125-301-301-125-301 125-125 301 125 301 301 125zM384 256.667v340h86v-340h-86z\"/></svg>";
|
|
45
|
+
};
|
|
46
|
+
export declare const fullscreenDefaultIcons: {
|
|
47
|
+
readonly fullscreen: "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 1024 1024\" fill=\"currentColor\"><path transform=\"translate(0, 960) scale(1, -1)\" d=\"M598 724.667h212v-212h-84v128h-128v84zM726 212.667v128h84v-212h-212v84h128zM214 512.667v212h212v-84h-128v-128h-84zM298 340.667v-128h128v-84h-212v212h84z\"/></svg>";
|
|
48
|
+
readonly fullscreenExit: "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 1024 1024\" fill=\"currentColor\"><path transform=\"translate(0, 960) scale(1, -1)\" d=\"M682 596.667h128v-84h-212v212h84v-128zM598 128.667v212h212v-84h-128v-128h-84zM342 596.667v128h84v-212h-212v84h128zM214 256.667v84h212v-212h-84v128h-128z\"/></svg>";
|
|
49
|
+
};
|
|
50
|
+
export declare const commentDefaultIcons: {
|
|
51
|
+
readonly comment: "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 1024 1024\" fill=\"currentColor\"><path transform=\"translate(0, 960) scale(1, -1)\" d=\"M938.667 448.128v21.205c0 0.725-0.043 1.621-0.085 2.475-5.803 99.755-47.488 190.336-112.725 258.176-68.352 71.125-162.731 117.419-268.843 123.264-0.683 0.043-1.536 0.085-2.347 0.085h-20.864c-59.947 0.683-122.965-13.227-181.931-43.008-52.181-26.496-97.749-63.488-133.931-108.16-56.405-69.717-89.899-158.080-89.941-253.696-0.597-54.4 10.795-111.36 35.157-165.419l-75.605-226.859c-2.816-8.363-3.072-17.835 0-26.965 7.467-22.357 31.616-34.432 53.973-26.965l226.731 75.563c49.493-22.485 105.984-35.243 165.376-35.115 58.539 0.384 115.797 13.141 168.149 36.949 81.579 37.163 151.040 101.248 193.749 186.667 27.477 53.291 43.307 115.84 43.136 181.803zM853.333 447.872c0.128-52.267-12.459-101.333-33.664-142.464-34.176-68.352-88.832-118.827-153.259-148.139-41.387-18.859-86.827-28.971-133.376-29.269-52.096-0.128-101.163 12.459-142.293 33.664-10.624 5.504-22.528 6.059-33.067 2.56l-162.261-54.101 54.101 162.261c3.755 11.221 2.56 22.912-2.389 32.725-23.552 46.677-34.304 96.171-33.792 142.421 0.043 76.331 26.411 145.92 70.955 200.917 28.629 35.371 64.768 64.725 106.24 85.76 46.592 23.552 96.085 34.304 142.336 33.792h19.456c83.712-4.565 158.037-41.003 212.011-97.152 51.285-53.376 84.139-124.416 89.003-202.795z\"/></svg>";
|
|
52
|
+
readonly commentClose: "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 1024 1024\" fill=\"currentColor\"><path transform=\"translate(0, 960) scale(1, -1)\" d=\"M810 664.667l-238-238 238-238-60-60-238 238-238-238-60 60 238 238-238 238 60 60 238-238 238 238z\"/></svg>";
|
|
53
|
+
};
|
|
54
|
+
export declare const thumbnailDefaultIcons: {
|
|
55
|
+
readonly toggleThumbnails: "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 1024 1024\" fill=\"currentColor\"><path transform=\"translate(0, 960) scale(1, -1)\" d=\"M682 84.667v172h172v-172h-172zM682 340.667v172h172v-172h-172zM426 596.667v172h172v-172h-172zM682 768.667h172v-172h-172v172zM426 340.667v172h172v-172h-172zM170 340.667v172h172v-172h-172zM170 84.667v172h172v-172h-172zM426 84.667v172h172v-172h-172zM170 596.667v172h172v-172h-172z\"/></svg>";
|
|
56
|
+
};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Framework-free core logic for lightGallery. Nothing in this package may
|
|
3
|
+
* import a framework or the DOM — the tsconfig excludes the DOM lib so
|
|
4
|
+
* `window`/`document` do not typecheck here by construction.
|
|
5
|
+
*/
|
|
6
|
+
export { createGalleryState, galleryReducer, type CreateGalleryStateOptions, type GalleryAction, type GalleryState, type SlideDirection, } from './state';
|
|
7
|
+
export { getSlideType, type GalleryItem, type ImageSources, type SlideType, } from './items';
|
|
8
|
+
export { createEmitter, type TypedEmitter } from './emitter';
|
|
9
|
+
export { checkLicenseKey, LICENSE_KEY_PREFIX, resolveLicenseKey, setLicenseKey, takeLicenseNotice, TESTING_LICENSE_KEY, type LicenseNotice, } from './license';
|
|
10
|
+
export { formatSlideAnnouncement, type SlideAnnouncementOptions, } from './announce';
|
|
11
|
+
export { createHashDriver, createHistoryHashDriver, createNavigationHashDriver, type HashDriver, type HashDriverPreference, type HashHistoryWindow, type HashNavigationWindow, type NavigationLike, } from './hash-driver';
|
|
12
|
+
export { coreSettingsDefaults, resolveSettings, type CaptionPosition, type GalleryDirection, type ResolvedGalleryDirection, type CoreSettings, type GalleryCoreStrings, type GalleryMode, type MobileSettings, type ResolveSettingsOptions, type UserSettings, type VirtualizationSettings, } from './settings';
|
|
13
|
+
export { getPreloadIndexes, getSlideIndexesInDom, getSlidePoolIndexes, } from './preload';
|
|
14
|
+
export { FLICK_MIN_DISTANCE, FLICK_VELOCITY, SLIDE_EDGE_FRICTION, SWIPE_AXIS_THRESHOLD, VERTICAL_CLOSE_MIN_DRAG, VERTICAL_CLOSE_RATIO, VERTICAL_CLOSE_THRESHOLD, getEdgeFrictionedDelta, getHorizontalDragTransforms, getSwipeAxis, getSwipeReleaseVerdict, getVerticalDragEffects, removePointer, resolveSwipeTarget, shouldCloseOnVerticalDrag, upsertPointer, type HorizontalDragTransforms, type PointerRecord, type SwipeAxis, type SwipeReleaseInput, type SwipeReleaseVerdict, type VerticalDragEffects, } from './gestures';
|
|
15
|
+
export { CENTER_CLOSE_SCALE, fitImageSize, getCenterCloseTransform, getOriginTransform, isUsableOriginRect, parseImageSize, type ImageSize, type OriginTransformInput, type RectLike, } from './origin';
|
|
16
|
+
export { CSS_POSITION_CENTER, WHOLE_IMAGE, getOriginCropFlight, getOriginWindow, isWholeImage, parseBackgroundFit, parseCssPosition, parseCssUrl, parseObjectFit, type CssPosition, type CssPositionAxis, type FractionRect, type OriginCropFlight, type OriginCropFlightInput, type OriginWindow, type OriginWindowInput, type ThumbFit, } from './origin-crop';
|
|
17
|
+
export { autoplayDefaultIcons, type LgIconName, commentDefaultIcons, coreDefaultIcons, fullscreenDefaultIcons, rotateDefaultIcons, shareDefaultIcons, thumbnailDefaultIcons, zoomDefaultIcons, } from './icons';
|
|
18
|
+
export { VIMEO_PLAYER_SCRIPT_URL, WISTIA_PLAYER_SCRIPT_URL, getFacadePoster, getVideoInfo, getVimeoEmbedUrl, getWistiaEmbedUrl, getYouTubeEmbedUrl, getYouTubePosterUrl, isYouTubeNoCookie, param, paramsToObject, type PlayerParams, type VideoInfo, } from './video-urls';
|
|
19
|
+
export { PINCH_OVER_FRICTION, PINCH_UNDER_FRICTION, clampPan, clampPanToStage, clampScale, getActualSizeScale, getPanBounds, getPinchPan, getPinchScale, getPointZoomPan, getPointerDistance, shouldCloseOnPinch, type PanBounds, type ZoomPan, } from './zoom-math';
|
|
20
|
+
export { clampThumbTranslate, getActiveThumbTranslate, getElasticThumbTranslate, getScrubThumbIndex, getScrubThumbTranslate, getThumbCorridorWindow, getThumbTotalWidth, getThumbWindow, type ThumbPagerPosition, type ThumbWindow, } from './thumb-math';
|
|
21
|
+
export { TOOLBAR_DEFAULT_PRIORITY, TOOLBAR_PINNED, consumeBackdropPress, getToolbarItemPriority, getToolbarOverflow, isToolbarEventPath, type MenuDismissEvent, type ToolbarOverflowInput, type ToolbarOverflowItem, } from './toolbar-overflow';
|
|
22
|
+
export { getJustifiedLayout, getJustifiedRows, getRevealableItems, type JustifiedBox, type JustifiedLayout, type JustifiedLayoutOptions, type JustifiedReveal, } from './justified-layout';
|
|
23
|
+
export { onTransitionSettle, type TransitionSettleEvent, type TransitionSettleTarget, } from './transition';
|
|
24
|
+
export { DECODE_TIMEOUT_MS, awaitDecode, getActualSizeWidth, matchesMedia, parseSrcset, resolveImageSource, resolveSizes, type ResolvedImageSource, type SrcsetCandidate, type Viewport, } from './responsive';
|
|
25
|
+
export { DECELERATION_RATE, SPRING_BOUNCE_DAMPING, SPRING_NATURAL_FREQUENCY, SPRING_SETTLE_DAMPING, isSpringSettled, project, stepSpring, type SpringConfig, type SpringState, } from './spring';
|
|
26
|
+
export { VELOCITY_WINDOW_MS, getWindowedVelocity, pushVelocitySample, type Velocity, type VelocitySample, } from './velocity';
|
|
27
|
+
export { applyZoom, flipHorizontal, flipVertical, getRotateFitScale, getRotateTransform, getRotatedVisualSize, isOrientationSwapped, initialAutoplaySlice, initialRotateSlice, initialZoomSlice, rotateLeft, rotateRight, type AutoplaySlice, type RotateSlice, type ZoomSlice, } from './plugin-slices';
|
|
28
|
+
export { canNativeShare, getFacebookShareLink, getPinterestShareLink, getSharePayload, getTwitterShareLink, getXShareLink, type NativeShareNavigator, type ShareItemFields, type SharePayload, } from './share-urls';
|
|
29
|
+
/**
|
|
30
|
+
* Clamp a slide index into the valid range for a gallery of `length` slides.
|
|
31
|
+
* With `loop`, out-of-range indexes wrap around; without it they clamp to the
|
|
32
|
+
* nearest bound. An empty gallery always resolves to 0.
|
|
33
|
+
*/
|
|
34
|
+
export declare function clampIndex(index: number, length: number, loop: boolean): number;
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Framework-free gallery item data model, ported from the 2.x `GalleryItem`
|
|
3
|
+
* shape (`src/lg-utils.ts`) minus the DOM-scraping era fields. Data always
|
|
4
|
+
* arrives typed — there is no selector/attribute scraping in 3.x.
|
|
5
|
+
*
|
|
6
|
+
* The caption is generic so each framework can narrow it to its own node type
|
|
7
|
+
* (React narrows `TCaption` to `ReactNode`). Raw-HTML captions go through the
|
|
8
|
+
* deliberately loud `captionHtml` field instead.
|
|
9
|
+
*/
|
|
10
|
+
export interface ImageSources {
|
|
11
|
+
media?: string;
|
|
12
|
+
srcset: string;
|
|
13
|
+
sizes?: string;
|
|
14
|
+
type?: string;
|
|
15
|
+
}
|
|
16
|
+
export interface GalleryItem<TCaption = unknown> {
|
|
17
|
+
/** URL of the media. */
|
|
18
|
+
src?: string;
|
|
19
|
+
/** srcset attribute values for the main image. */
|
|
20
|
+
srcset?: string;
|
|
21
|
+
/** srcset sizes attribute for the main image. */
|
|
22
|
+
sizes?: string;
|
|
23
|
+
/** `<source>` attributes for rendering the image inside a `<picture>`. */
|
|
24
|
+
sources?: ImageSources[];
|
|
25
|
+
/** Thumbnail URL (used by thumbnail plugin and gallery triggers). */
|
|
26
|
+
thumb?: string;
|
|
27
|
+
/** alt attribute for the image. */
|
|
28
|
+
alt?: string;
|
|
29
|
+
/** Title attribute (videos). */
|
|
30
|
+
title?: string;
|
|
31
|
+
/** Caption for the slide, rendered by the framework layer. */
|
|
32
|
+
caption?: TCaption;
|
|
33
|
+
/**
|
|
34
|
+
* Raw-HTML caption opt-in — the explicit analog of 2.x `subHtml` strings.
|
|
35
|
+
* Rendered with the framework's raw-HTML escape hatch
|
|
36
|
+
* (`dangerouslySetInnerHTML` in React); prefer `caption`.
|
|
37
|
+
*/
|
|
38
|
+
captionHtml?: string;
|
|
39
|
+
/** Render the src inside an iframe instead of an image. */
|
|
40
|
+
iframe?: boolean;
|
|
41
|
+
/** Title for the iframe. */
|
|
42
|
+
iframeTitle?: string;
|
|
43
|
+
/**
|
|
44
|
+
* HTML5 video sources (video plugin). Kept loosely typed until
|
|
45
|
+
* the video plugin lands.
|
|
46
|
+
*/
|
|
47
|
+
video?: unknown;
|
|
48
|
+
/** Poster URL for video slides. */
|
|
49
|
+
poster?: string;
|
|
50
|
+
/**
|
|
51
|
+
* Download URL for the media. Pass `false` to hide the download button
|
|
52
|
+
* for this slide.
|
|
53
|
+
*/
|
|
54
|
+
downloadUrl?: string | false;
|
|
55
|
+
/** Filename for the download attribute. */
|
|
56
|
+
download?: string | boolean;
|
|
57
|
+
/**
|
|
58
|
+
* Natural size of the full image as `"width-height"` (2.x
|
|
59
|
+
* `data-lg-size`), optionally a comma separated responsive list
|
|
60
|
+
* `"240-160-375, 1600-1067"`. Required for the zoom-from-origin open
|
|
61
|
+
* animation.
|
|
62
|
+
*/
|
|
63
|
+
lgSize?: string;
|
|
64
|
+
/** Actual image width in px (zoom plugin actual-size math). */
|
|
65
|
+
width?: string;
|
|
66
|
+
/** Custom slide name for the hash plugin. */
|
|
67
|
+
slideName?: string;
|
|
68
|
+
/**
|
|
69
|
+
* Share plugin: canonical per-item URL for the native share sheet
|
|
70
|
+
* (defaults to the network-specific share URLs, then the page URL).
|
|
71
|
+
*/
|
|
72
|
+
shareUrl?: string;
|
|
73
|
+
/** Share plugin: per-item Facebook share URL (defaults to the page URL). */
|
|
74
|
+
facebookShareUrl?: string;
|
|
75
|
+
/** Share plugin: tweet text. */
|
|
76
|
+
tweetText?: string;
|
|
77
|
+
/** Share plugin: per-item Twitter share URL. */
|
|
78
|
+
twitterShareUrl?: string;
|
|
79
|
+
/** Share plugin: per-item Pinterest share URL (must be absolute). */
|
|
80
|
+
pinterestShareUrl?: string;
|
|
81
|
+
/** Share plugin: Pinterest post description. */
|
|
82
|
+
pinterestText?: string;
|
|
83
|
+
/** mediumZoom plugin: per-item backdrop color. */
|
|
84
|
+
lgBackgroundColor?: string;
|
|
85
|
+
}
|
|
86
|
+
export type SlideType = 'image' | 'video' | 'iframe';
|
|
87
|
+
/**
|
|
88
|
+
* Classify a gallery item: html5 `video` sources, a `poster`, or a
|
|
89
|
+
* YouTube/Vimeo/Wistia src URL make it a video (2.x `getSlideType` +
|
|
90
|
+
* `__slideVideoInfo` combined).
|
|
91
|
+
*/
|
|
92
|
+
export declare function getSlideType(item: GalleryItem<unknown>): SlideType;
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Justified grid layout for the trigger thumbnails: rows of equal
|
|
3
|
+
* height and varying widths that fill the container edge to edge, the
|
|
4
|
+
* row height staying as close as possible to a target. Pure math —
|
|
5
|
+
* runtimes measure the container, hand in aspect ratios, and position
|
|
6
|
+
* elements from the returned boxes.
|
|
7
|
+
*/
|
|
8
|
+
export interface JustifiedLayoutOptions {
|
|
9
|
+
/** Aspect ratios (width / height) in item order. */
|
|
10
|
+
ratios: readonly number[];
|
|
11
|
+
/** Content-box width available for rows (px). */
|
|
12
|
+
containerWidth: number;
|
|
13
|
+
/** Row height (px) the algorithm aims for. */
|
|
14
|
+
targetRowHeight?: number;
|
|
15
|
+
/** Gap between items and between rows (px). */
|
|
16
|
+
gap?: number;
|
|
17
|
+
/**
|
|
18
|
+
* Last-row policy: `'justify'` scales the leftover row to fill the
|
|
19
|
+
* width like every other row (clamped by `maxScale`), `'start'`
|
|
20
|
+
* keeps the target height aligned to the reading start, `'hide'`
|
|
21
|
+
* drops the leftover items (their boxes come back zero-sized).
|
|
22
|
+
*/
|
|
23
|
+
lastRow?: 'justify' | 'start' | 'hide';
|
|
24
|
+
/**
|
|
25
|
+
* Row-height clamp as a multiple of `targetRowHeight` — a sparse
|
|
26
|
+
* row (single portrait, justified leftovers) never renders taller
|
|
27
|
+
* than `maxScale * targetRowHeight`. Clamped rows align to the
|
|
28
|
+
* reading start instead of filling the width.
|
|
29
|
+
*/
|
|
30
|
+
maxScale?: number;
|
|
31
|
+
}
|
|
32
|
+
export interface JustifiedBox {
|
|
33
|
+
top: number;
|
|
34
|
+
/**
|
|
35
|
+
* Offset from the reading-start edge (logical): the runtime maps
|
|
36
|
+
* it to `left` in LTR and `right` in RTL, the same convention as
|
|
37
|
+
* the thumbnail strip math.
|
|
38
|
+
*/
|
|
39
|
+
start: number;
|
|
40
|
+
width: number;
|
|
41
|
+
height: number;
|
|
42
|
+
}
|
|
43
|
+
export interface JustifiedLayout {
|
|
44
|
+
/**
|
|
45
|
+
* One box per input ratio, in item order — items hidden by
|
|
46
|
+
* `lastRow: 'hide'` come back zero-sized (runtimes hide them).
|
|
47
|
+
*/
|
|
48
|
+
boxes: JustifiedBox[];
|
|
49
|
+
/** Total content height including the final row (px). */
|
|
50
|
+
containerHeight: number;
|
|
51
|
+
}
|
|
52
|
+
export declare function getJustifiedLayout(options: JustifiedLayoutOptions): JustifiedLayout;
|
|
53
|
+
/**
|
|
54
|
+
* Reveal policy for laid-out thumbnails: 'image' shows each one as it
|
|
55
|
+
* loads, 'row' shows whole rows top to bottom, a row only once every
|
|
56
|
+
* thumbnail in it (and every row above it) has loaded.
|
|
57
|
+
*/
|
|
58
|
+
export type JustifiedReveal = 'row' | 'image';
|
|
59
|
+
/**
|
|
60
|
+
* Group laid-out boxes into rows by their top offset, in layout order.
|
|
61
|
+
* Hidden boxes (0×0, the 'hide' last-row policy) belong to no row.
|
|
62
|
+
* Returns item indexes per row.
|
|
63
|
+
*/
|
|
64
|
+
export declare function getJustifiedRows(boxes: JustifiedBox[]): number[][];
|
|
65
|
+
/**
|
|
66
|
+
* Which laid-out items may show now, given which have loaded: per
|
|
67
|
+
* image, or per row in reading order (see JustifiedReveal). The result
|
|
68
|
+
* is cumulative — callers reveal every returned item that is not
|
|
69
|
+
* already showing.
|
|
70
|
+
*/
|
|
71
|
+
export declare function getRevealableItems<T>(rows: T[][], isLoaded: (item: T) => boolean, reveal: JustifiedReveal): T[];
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* License key check shared by every package. The key never limits a
|
|
3
|
+
* feature; it only decides which console message, if any, the gallery
|
|
4
|
+
* logs. `checkLicenseKey` is pure; the page-wide key and the once-per-page
|
|
5
|
+
* bookkeeping are module state, and the runtime does the logging.
|
|
6
|
+
*/
|
|
7
|
+
/** The temporary key; also the default `licenseKey`. */
|
|
8
|
+
export declare const TESTING_LICENSE_KEY = "0000-0000-000-0000";
|
|
9
|
+
/** Every lightGallery 3 key starts with this; v1 and v2 keys don't. */
|
|
10
|
+
export declare const LICENSE_KEY_PREFIX = "LIG";
|
|
11
|
+
export interface LicenseNotice {
|
|
12
|
+
level: 'error' | 'warn';
|
|
13
|
+
message: string;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* The console notice for a license key, or `null` for a lightGallery 3
|
|
17
|
+
* key. An empty key is an error; the testing key and keys from v1 or v2
|
|
18
|
+
* (no `LIG` prefix) are warnings.
|
|
19
|
+
*/
|
|
20
|
+
export declare function checkLicenseKey(licenseKey: string | undefined): LicenseNotice | null;
|
|
21
|
+
/**
|
|
22
|
+
* Set the license key once for every gallery on the page. Call it before
|
|
23
|
+
* creating galleries; a gallery's own `licenseKey` still wins.
|
|
24
|
+
*/
|
|
25
|
+
export declare function setLicenseKey(licenseKey: string): void;
|
|
26
|
+
/**
|
|
27
|
+
* The key a gallery runs with: its own `licenseKey`, or the page-wide key
|
|
28
|
+
* when it has none (or only the testing default).
|
|
29
|
+
*/
|
|
30
|
+
export declare function resolveLicenseKey(instanceKey: string | undefined): string;
|
|
31
|
+
/**
|
|
32
|
+
* The notice a new gallery should log, or `null`. Each message is logged
|
|
33
|
+
* once per page, however many galleries share the key.
|
|
34
|
+
*/
|
|
35
|
+
export declare function takeLicenseNotice(instanceKey: string | undefined): LicenseNotice | null;
|