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,60 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Share link builders + Web Share payload logic for the share plugin. The
|
|
3
|
+
* URL builders are ported from the 2.x `lg-*-share-utils` files as pure
|
|
4
|
+
* functions — the page URL fallback is a parameter instead of
|
|
5
|
+
* `window.location.href`. The Web Share helpers are pure too: the runtime
|
|
6
|
+
* hands in a structural `navigator` so nothing here touches the DOM.
|
|
7
|
+
*/
|
|
8
|
+
/**
|
|
9
|
+
* Structural slice of a gallery item the share builders read — kept
|
|
10
|
+
* narrow so any runtime's item shape (including the 2.x vanilla one)
|
|
11
|
+
* satisfies it without casts.
|
|
12
|
+
*/
|
|
13
|
+
export interface ShareItemFields {
|
|
14
|
+
src?: string;
|
|
15
|
+
alt?: string;
|
|
16
|
+
title?: string;
|
|
17
|
+
shareUrl?: string;
|
|
18
|
+
facebookShareUrl?: string;
|
|
19
|
+
tweetText?: string;
|
|
20
|
+
twitterShareUrl?: string;
|
|
21
|
+
pinterestShareUrl?: string;
|
|
22
|
+
pinterestText?: string;
|
|
23
|
+
}
|
|
24
|
+
export declare function getFacebookShareLink(item: ShareItemFields, currentUrl: string): string;
|
|
25
|
+
/**
|
|
26
|
+
* X (formerly Twitter) intent URL. The 2.x `tweetText`/`twitterShareUrl`
|
|
27
|
+
* item fields (and their `data-tweet-text` style attributes) keep working —
|
|
28
|
+
* only the target changed. Unlike the 2.x builder the text is URL-encoded.
|
|
29
|
+
*/
|
|
30
|
+
export declare function getXShareLink(item: ShareItemFields, currentUrl: string): string;
|
|
31
|
+
/** @deprecated Renamed — use {@link getXShareLink} (X intent URL). */
|
|
32
|
+
export declare const getTwitterShareLink: typeof getXShareLink;
|
|
33
|
+
export declare function getPinterestShareLink(item: ShareItemFields, currentUrl: string): string;
|
|
34
|
+
/**
|
|
35
|
+
* Data handed to `navigator.share`. URL-sharing only by design: attaching
|
|
36
|
+
* the image itself would require fetching cross-origin bytes (a proxy),
|
|
37
|
+
* which the share plugin will not do.
|
|
38
|
+
*/
|
|
39
|
+
export interface SharePayload {
|
|
40
|
+
title?: string;
|
|
41
|
+
text?: string;
|
|
42
|
+
url: string;
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Build the Web Share payload for a slide. The per-item `shareUrl` wins,
|
|
46
|
+
* then the network-specific share URLs, then the page URL; text falls back
|
|
47
|
+
* from the tweet text to the Pinterest description.
|
|
48
|
+
*/
|
|
49
|
+
export declare function getSharePayload(item: ShareItemFields, currentUrl: string): SharePayload;
|
|
50
|
+
/** Structural slice of `navigator` the Web Share decision needs. */
|
|
51
|
+
export interface NativeShareNavigator {
|
|
52
|
+
share?: (data: SharePayload) => Promise<void>;
|
|
53
|
+
canShare?: (data: SharePayload) => boolean;
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* True when the runtime can hand this payload to the OS share sheet.
|
|
57
|
+
* Feature-detected and never load-bearing: no `navigator.share` (or a
|
|
58
|
+
* `canShare` veto) simply keeps the branded dropdown menu.
|
|
59
|
+
*/
|
|
60
|
+
export declare function canNativeShare(nav: NativeShareNavigator | undefined | null, payload: SharePayload): boolean;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Gesture-release physics: momentum projection and a damped-spring
|
|
3
|
+
* stepper. Releases compute where momentum would land (`project`),
|
|
4
|
+
* clamp that into bounds, and animate there with a spring seeded by the
|
|
5
|
+
* live release velocity — velocity stays continuous across the
|
|
6
|
+
* finger-lift boundary, which is most of what native feel is.
|
|
7
|
+
*
|
|
8
|
+
* The stepper advances the standard damped harmonic oscillator by its
|
|
9
|
+
* closed-form solution over each frame, so step size never affects the
|
|
10
|
+
* trajectory and the state (position + velocity) can re-seed a new
|
|
11
|
+
* spring at any interruption point.
|
|
12
|
+
*/
|
|
13
|
+
export interface SpringState {
|
|
14
|
+
position: number;
|
|
15
|
+
/** px per ms (same unit as the windowed gesture velocity). */
|
|
16
|
+
velocity: number;
|
|
17
|
+
}
|
|
18
|
+
export interface SpringConfig {
|
|
19
|
+
/** 1 = never overshoot; < 1 overshoots and returns. */
|
|
20
|
+
dampingRatio?: number;
|
|
21
|
+
/** Rad/s — higher settles faster. */
|
|
22
|
+
naturalFrequency?: number;
|
|
23
|
+
}
|
|
24
|
+
/** Settling toward an in-bounds target: no overshoot. */
|
|
25
|
+
export declare const SPRING_SETTLE_DAMPING = 1;
|
|
26
|
+
/** Settling against a clamped bound: one soft bounce. */
|
|
27
|
+
export declare const SPRING_BOUNCE_DAMPING = 0.82;
|
|
28
|
+
export declare const SPRING_NATURAL_FREQUENCY = 12;
|
|
29
|
+
/**
|
|
30
|
+
* Momentum projection: how far a release keeps traveling when it loses
|
|
31
|
+
* `1 - decelerationRate` of its velocity every millisecond (the classic
|
|
32
|
+
* scroll-view constant; 0.995 ≈ half a percent per ms).
|
|
33
|
+
*/
|
|
34
|
+
export declare const DECELERATION_RATE = 0.995;
|
|
35
|
+
export declare function project(velocity: number, decelerationRate?: number): number;
|
|
36
|
+
/**
|
|
37
|
+
* Advance a spring toward `target` by `dtMs`, exactly (closed form with
|
|
38
|
+
* the current state as initial conditions).
|
|
39
|
+
*/
|
|
40
|
+
export declare function stepSpring(state: SpringState, target: number, dtMs: number, { dampingRatio, naturalFrequency, }?: SpringConfig): SpringState;
|
|
41
|
+
/** Whether a spring is close enough to stop animating. */
|
|
42
|
+
export declare function isSpringSettled(state: SpringState, target: number, restDelta?: number, restVelocity?: number): boolean;
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Framework-free gallery state machine. React (and later Angular/Vue) wrap
|
|
3
|
+
* this with their own reactivity; every transition lives here so behavior is
|
|
4
|
+
* identical across frameworks and testable without any DOM.
|
|
5
|
+
*/
|
|
6
|
+
export type SlideDirection = 'next' | 'prev';
|
|
7
|
+
export interface GalleryState {
|
|
8
|
+
open: boolean;
|
|
9
|
+
currentIndex: number;
|
|
10
|
+
previousIndex: number;
|
|
11
|
+
slidesCount: number;
|
|
12
|
+
loop: boolean;
|
|
13
|
+
/**
|
|
14
|
+
* True once any slide media has finished loading (or failed) since the
|
|
15
|
+
* gallery opened — 2.x `lGalleryOn`. Distinguishes the first slide
|
|
16
|
+
* (backdrop/zoom entrance, no slide animation) from navigation.
|
|
17
|
+
*/
|
|
18
|
+
galleryOn: boolean;
|
|
19
|
+
/**
|
|
20
|
+
* True while a slide transition runs — 2.x `lgBusy`. Navigation actions
|
|
21
|
+
* are ignored until `TRANSITION_END`.
|
|
22
|
+
*/
|
|
23
|
+
transitioning: boolean;
|
|
24
|
+
/** Direction of the last navigation; drives prev/next slide classes. */
|
|
25
|
+
slideDirection?: SlideDirection;
|
|
26
|
+
/** Indexes whose media has fully loaded (`lg-complete`). */
|
|
27
|
+
loadedSlides: ReadonlySet<number>;
|
|
28
|
+
}
|
|
29
|
+
export type GalleryAction = {
|
|
30
|
+
type: 'OPEN';
|
|
31
|
+
index?: number;
|
|
32
|
+
} | {
|
|
33
|
+
type: 'CLOSE';
|
|
34
|
+
} | {
|
|
35
|
+
type: 'GO_TO';
|
|
36
|
+
index: number;
|
|
37
|
+
direction?: SlideDirection;
|
|
38
|
+
} | {
|
|
39
|
+
type: 'NEXT';
|
|
40
|
+
} | {
|
|
41
|
+
type: 'PREV';
|
|
42
|
+
} | {
|
|
43
|
+
type: 'SET_SLIDES_COUNT';
|
|
44
|
+
count: number;
|
|
45
|
+
} | {
|
|
46
|
+
type: 'SET_LOOP';
|
|
47
|
+
loop: boolean;
|
|
48
|
+
} | {
|
|
49
|
+
type: 'SLIDE_LOADED';
|
|
50
|
+
index: number;
|
|
51
|
+
} | {
|
|
52
|
+
type: 'SLIDE_ERROR';
|
|
53
|
+
index: number;
|
|
54
|
+
} | {
|
|
55
|
+
type: 'TRANSITION_END';
|
|
56
|
+
};
|
|
57
|
+
export interface CreateGalleryStateOptions {
|
|
58
|
+
slidesCount: number;
|
|
59
|
+
loop?: boolean;
|
|
60
|
+
index?: number;
|
|
61
|
+
}
|
|
62
|
+
export declare function createGalleryState(options: CreateGalleryStateOptions): GalleryState;
|
|
63
|
+
export declare function galleryReducer(state: GalleryState, action: GalleryAction): GalleryState;
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Thumbnail strip math (2.x `animateThumb`/`getPossibleTransformX`) as pure
|
|
3
|
+
* functions for the thumbnail plugin.
|
|
4
|
+
*/
|
|
5
|
+
import type { ResolvedGalleryDirection } from './settings';
|
|
6
|
+
export type ThumbPagerPosition = 'left' | 'middle' | 'right';
|
|
7
|
+
/**
|
|
8
|
+
* Rubber-band a raw strip translate (plan 010 physics): inside the
|
|
9
|
+
* bounds it passes through; beyond an edge the overshoot compresses by
|
|
10
|
+
* the shared edge friction so the strip resists like the slide gestures.
|
|
11
|
+
* The release spring pulls the compressed overshoot back to the bound.
|
|
12
|
+
*/
|
|
13
|
+
export declare function getElasticThumbTranslate(raw: number, totalWidth: number, stripWidth: number, friction?: number): number;
|
|
14
|
+
export declare function getThumbTotalWidth(count: number, thumbWidth: number, thumbMargin: number): number;
|
|
15
|
+
/** Clamp a strip translate into `[0, total - visible]` (never negative). */
|
|
16
|
+
export declare function clampThumbTranslate(translate: number, totalWidth: number, stripWidth: number): number;
|
|
17
|
+
/**
|
|
18
|
+
* The window of thumbnails that must exist in the DOM for a given strip
|
|
19
|
+
* translate (plan 010 virtualization): the visible range plus `overscan`
|
|
20
|
+
* thumbs on each side, with leading/trailing pad widths so the strip keeps
|
|
21
|
+
* its full scroll geometry while only the window renders.
|
|
22
|
+
*/
|
|
23
|
+
export interface ThumbWindow {
|
|
24
|
+
/** First rendered thumb index (inclusive). */
|
|
25
|
+
start: number;
|
|
26
|
+
/** Last rendered thumb index (inclusive). */
|
|
27
|
+
end: number;
|
|
28
|
+
/** Spacer width (px) standing in for the thumbs before `start`. */
|
|
29
|
+
leadingPad: number;
|
|
30
|
+
/** Spacer width (px) standing in for the thumbs after `end`. */
|
|
31
|
+
trailingPad: number;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Compute the rendered thumb window from the strip translate. `overscan`
|
|
35
|
+
* is the number of extra thumbs kept mounted on each side of the visible
|
|
36
|
+
* range ('auto' derives one extra viewport per side — enough that a full
|
|
37
|
+
* flick lands on already-rendered thumbs).
|
|
38
|
+
*/
|
|
39
|
+
export declare function getThumbWindow(options: {
|
|
40
|
+
translate: number;
|
|
41
|
+
stripWidth: number;
|
|
42
|
+
thumbWidth: number;
|
|
43
|
+
thumbMargin: number;
|
|
44
|
+
count: number;
|
|
45
|
+
overscan?: number | 'auto';
|
|
46
|
+
}): ThumbWindow;
|
|
47
|
+
/**
|
|
48
|
+
* Window covering a fling's whole flight path (plan 010): the union of
|
|
49
|
+
* the windows at the start and end translates, so a released strip never
|
|
50
|
+
* glides over unrendered thumbs — the destination is known at release.
|
|
51
|
+
*/
|
|
52
|
+
export declare function getThumbCorridorWindow(options: {
|
|
53
|
+
from: number;
|
|
54
|
+
to: number;
|
|
55
|
+
stripWidth: number;
|
|
56
|
+
thumbWidth: number;
|
|
57
|
+
thumbMargin: number;
|
|
58
|
+
count: number;
|
|
59
|
+
overscan?: number | 'auto';
|
|
60
|
+
}): ThumbWindow;
|
|
61
|
+
/**
|
|
62
|
+
* Which slide a live strip translate selects in scrub mode (the strip
|
|
63
|
+
* drives the gallery while it moves). Proportional: the strip's full
|
|
64
|
+
* scroll travel maps onto the full index range, so the FIRST and LAST
|
|
65
|
+
* slides are always reachable — a fixed pager-point inverse cannot
|
|
66
|
+
* reach the ends, because the clamped translate never brings them
|
|
67
|
+
* under the pager slot. For long strips this converges to one index
|
|
68
|
+
* per thumb unit of travel. Translate is the logical strip scalar
|
|
69
|
+
* (RTL-agnostic); elastic overshoot clamps, pinning the ends.
|
|
70
|
+
* Exact inverse: {@link getScrubThumbTranslate}.
|
|
71
|
+
*/
|
|
72
|
+
export declare function getScrubThumbIndex(translate: number, totalWidth: number, stripWidth: number, count: number): number;
|
|
73
|
+
/**
|
|
74
|
+
* Strip translate at which {@link getScrubThumbIndex} resolves exactly
|
|
75
|
+
* `index` — for aligning the strip to the scrubbed slide after the
|
|
76
|
+
* release glide settles. (Not `getActiveThumbTranslate`: that pager
|
|
77
|
+
* alignment is a different map and would re-resolve to a neighboring
|
|
78
|
+
* index near the ends.)
|
|
79
|
+
*/
|
|
80
|
+
export declare function getScrubThumbTranslate(index: number, totalWidth: number, stripWidth: number, count: number): number;
|
|
81
|
+
/**
|
|
82
|
+
* Strip translate that brings the active thumbnail to the pager position
|
|
83
|
+
* (2.x `animateThumb`, including its off-by-one `- 1`).
|
|
84
|
+
*/
|
|
85
|
+
export declare function getActiveThumbTranslate(index: number, thumbWidth: number, thumbMargin: number, stripWidth: number, totalWidth: number, pagerPosition: ThumbPagerPosition, direction?: ResolvedGalleryDirection): number;
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Toolbar overflow: when the toolbar's icon buttons do not fit on one row
|
|
3
|
+
* beside the counter, the lowest-priority buttons move into a "More
|
|
4
|
+
* options" menu. Pure layout arithmetic over measured widths; each runtime
|
|
5
|
+
* measures its own DOM, applies the result and renders the menu.
|
|
6
|
+
*/
|
|
7
|
+
/** Priority of a button that never moves into the menu (close). */
|
|
8
|
+
export declare const TOOLBAR_PINNED: number;
|
|
9
|
+
/** Priority of a button the table does not know (custom plugin buttons). */
|
|
10
|
+
export declare const TOOLBAR_DEFAULT_PRIORITY = 20;
|
|
11
|
+
/** Overflow priority of a toolbar button from its class names. */
|
|
12
|
+
export declare function getToolbarItemPriority(classList: Iterable<string>): number;
|
|
13
|
+
export interface ToolbarOverflowItem {
|
|
14
|
+
/** Measured width, px. */
|
|
15
|
+
width: number;
|
|
16
|
+
/** From {@link getToolbarItemPriority}; higher stays longer. */
|
|
17
|
+
priority: number;
|
|
18
|
+
}
|
|
19
|
+
export interface ToolbarOverflowInput {
|
|
20
|
+
/** Width of the toolbar row, px. */
|
|
21
|
+
available: number;
|
|
22
|
+
/** Width taken by content that never moves (the counter), px. */
|
|
23
|
+
reserved: number;
|
|
24
|
+
/** Width of the More button, px. */
|
|
25
|
+
moreWidth: number;
|
|
26
|
+
/** The toolbar's icon buttons, in DOM order. */
|
|
27
|
+
items: readonly ToolbarOverflowItem[];
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Indices (in DOM order) of the buttons that move into the menu; empty
|
|
31
|
+
* when everything fits, or when the toolbar has no width yet (not laid
|
|
32
|
+
* out). Lowest priority moves first; among equals, the button later in
|
|
33
|
+
* DOM order goes first, which is the one furthest from the close button.
|
|
34
|
+
* The More button's own width is paid as soon as anything moves.
|
|
35
|
+
*/
|
|
36
|
+
export declare function getToolbarOverflow({ available, reserved, moreWidth, items, }: ToolbarOverflowInput): number[];
|
|
37
|
+
/**
|
|
38
|
+
* Whether a click's event path runs through the toolbar. Clicks there are
|
|
39
|
+
* controls, not a tap on the backdrop: Medium zoom closes on the latter
|
|
40
|
+
* only. The path (`event.composedPath()`) still lists a More menu item the
|
|
41
|
+
* click already removed from the document.
|
|
42
|
+
*/
|
|
43
|
+
export declare function isToolbarEventPath(path: readonly unknown[]): boolean;
|
|
44
|
+
/** What the dismissal of a toolbar menu reads from the dismissing press. */
|
|
45
|
+
export interface MenuDismissEvent {
|
|
46
|
+
target: unknown;
|
|
47
|
+
preventDefault(): void;
|
|
48
|
+
stopPropagation(): void;
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* A press outside an open toolbar menu (the More options menu, the share
|
|
52
|
+
* dropdown) dismisses it. A press on a control passes through, so one
|
|
53
|
+
* click on another toolbar button both dismisses the menu and runs the
|
|
54
|
+
* button. A press on the backdrop around the slide is consumed instead:
|
|
55
|
+
* there the gallery's own tap-to-close and drag would fire, and
|
|
56
|
+
* dismissing a menu must not also close the gallery. Cancelling the
|
|
57
|
+
* pointerdown suppresses the compatibility mouse events the vanilla
|
|
58
|
+
* runtime listens to; stopping it keeps the pointer-driven runtimes'
|
|
59
|
+
* handlers from arming. Returns whether the press was consumed.
|
|
60
|
+
*/
|
|
61
|
+
export declare function consumeBackdropPress(event: MenuDismissEvent): boolean;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Settle gate for a CSS transition: call back once the transition of
|
|
3
|
+
* `property` on `element` has actually ended.
|
|
4
|
+
*
|
|
5
|
+
* A fixed timer measured from the moment the target value is applied
|
|
6
|
+
* lands at the same wall-clock offset whether or not the transition has
|
|
7
|
+
* started, but the transition only starts at the first style recalc
|
|
8
|
+
* after the value lands — on a busy main thread (a gallery's first
|
|
9
|
+
* layout, a big thumbnail decode) that can be well past the offset.
|
|
10
|
+
* Anything gated on the fixed timer then fires mid-flight.
|
|
11
|
+
*
|
|
12
|
+
* Contract:
|
|
13
|
+
* - No `transitionstart` within `fallbackMs` → the element is not
|
|
14
|
+
* transitioning (reduced motion, identity transform, no CSS) and the
|
|
15
|
+
* gate settles on the timer, exactly like the fixed timer did.
|
|
16
|
+
* - `transitionstart` re-bases the timer on the real start; `transitionend`
|
|
17
|
+
* settles immediately. Interrupted transitions (`transitioncancel`)
|
|
18
|
+
* leave the timer running so a restart still settles in time.
|
|
19
|
+
* - Events bubbling from descendants, or for other properties, are
|
|
20
|
+
* ignored. The callback runs at most once.
|
|
21
|
+
*
|
|
22
|
+
* Returns a disposer; disposing after settle is a no-op.
|
|
23
|
+
*/
|
|
24
|
+
export interface TransitionSettleEvent {
|
|
25
|
+
target: unknown;
|
|
26
|
+
propertyName?: string;
|
|
27
|
+
}
|
|
28
|
+
/** Structural slice of a DOM element: headless carries no DOM lib. */
|
|
29
|
+
export interface TransitionSettleTarget {
|
|
30
|
+
addEventListener(type: string, listener: (event: TransitionSettleEvent) => void): void;
|
|
31
|
+
removeEventListener(type: string, listener: (event: TransitionSettleEvent) => void): void;
|
|
32
|
+
}
|
|
33
|
+
export declare function onTransitionSettle(element: TransitionSettleTarget, property: string, fallbackMs: number, callback: () => void): () => void;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Rolling-window velocity tracking. Release decisions must read the
|
|
3
|
+
* velocity of the gesture's final instant, not its whole-gesture
|
|
4
|
+
* average: a drag that pauses and then flicks reads fast, and a drag
|
|
5
|
+
* that ends resting reads zero. Sessions push a sample per move; the
|
|
6
|
+
* release reads the window ending at the release timestamp.
|
|
7
|
+
*/
|
|
8
|
+
export interface VelocitySample {
|
|
9
|
+
x: number;
|
|
10
|
+
y: number;
|
|
11
|
+
/** Timestamp in ms (same clock as the release read). */
|
|
12
|
+
t: number;
|
|
13
|
+
}
|
|
14
|
+
export interface Velocity {
|
|
15
|
+
/** px/ms, signed. */
|
|
16
|
+
x: number;
|
|
17
|
+
y: number;
|
|
18
|
+
}
|
|
19
|
+
/** How far back a release looks when reading the gesture velocity. */
|
|
20
|
+
export declare const VELOCITY_WINDOW_MS = 100;
|
|
21
|
+
/**
|
|
22
|
+
* Append a sample, pruning everything older than the window — the
|
|
23
|
+
* buffer stays a handful of entries regardless of gesture length.
|
|
24
|
+
*/
|
|
25
|
+
export declare function pushVelocitySample(samples: readonly VelocitySample[], sample: VelocitySample, windowMs?: number): VelocitySample[];
|
|
26
|
+
/**
|
|
27
|
+
* Velocity (px/ms per axis) over the samples inside the window ending
|
|
28
|
+
* at `releaseTime`. Fewer than two recent samples — the finger rested
|
|
29
|
+
* before lifting — reads as zero, as does sub-pixel drift.
|
|
30
|
+
*/
|
|
31
|
+
export declare function getWindowedVelocity(samples: readonly VelocitySample[], releaseTime: number, windowMs?: number): Velocity;
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Video URL detection and embed-URL builders, ported from 2.x
|
|
3
|
+
* `utils.isVideo` (`src/lg-utils.ts`) and `lg-video-utils.ts` as pure
|
|
4
|
+
* functions. The video plugin renders the returned URLs; nothing here
|
|
5
|
+
* touches the DOM.
|
|
6
|
+
*/
|
|
7
|
+
export interface VideoInfo {
|
|
8
|
+
/** RegExp match parts: `[match, videoId, urlParams?]`. */
|
|
9
|
+
youtube?: string[];
|
|
10
|
+
vimeo?: string[];
|
|
11
|
+
/** RegExp match parts; index 4 is the media id. */
|
|
12
|
+
wistia?: string[];
|
|
13
|
+
html5?: boolean;
|
|
14
|
+
}
|
|
15
|
+
export type PlayerParams = Record<string, string | number | boolean> | boolean;
|
|
16
|
+
/** Detect the video provider for a src URL (2.x `utils.isVideo`). */
|
|
17
|
+
export declare function getVideoInfo(src: string | undefined, hasHtml5Video: boolean): VideoInfo | undefined;
|
|
18
|
+
/** Serialize params as a query string (2.x `param`). */
|
|
19
|
+
export declare function param(obj: Record<string, string | number | boolean>): string;
|
|
20
|
+
/** Parse `?a=b&c=d` into an object (2.x `paramsToObject`). */
|
|
21
|
+
export declare function paramsToObject(url: string): Record<string, string>;
|
|
22
|
+
export declare function isYouTubeNoCookie(url: string): boolean;
|
|
23
|
+
/**
|
|
24
|
+
* YouTube embed URL. Precedence (2.x parity): defaults < settings < params
|
|
25
|
+
* already present on the slide URL. The privacy-enhanced
|
|
26
|
+
* `youtube-nocookie.com` host is the default; pass `preferNoCookie: false`
|
|
27
|
+
* (the `youTubeNoCookie` setting) to revert to `youtube.com`. A slide URL
|
|
28
|
+
* that already names the nocookie host always keeps it.
|
|
29
|
+
*/
|
|
30
|
+
export declare function getYouTubeEmbedUrl(videoInfo: VideoInfo, playerParamsSettings: PlayerParams, srcUrl: string, preferNoCookie?: boolean): string | undefined;
|
|
31
|
+
/**
|
|
32
|
+
* YouTube's public thumbnail endpoint for a detected video — the one
|
|
33
|
+
* provider poster that needs no API call. (Vimeo/Wistia poster endpoints
|
|
34
|
+
* require a fetch/auth, so their facades rely on the item's own
|
|
35
|
+
* poster/thumb — see getFacadePoster.)
|
|
36
|
+
*/
|
|
37
|
+
export declare function getYouTubePosterUrl(videoInfo: VideoInfo | undefined): string | undefined;
|
|
38
|
+
/**
|
|
39
|
+
* Poster for a provider-video facade (lite embed): the explicit item
|
|
40
|
+
* poster wins, then the YouTube thumbnail endpoint (when enabled), then
|
|
41
|
+
* the item's grid thumb — for Vimeo galleries the vimeoThumbnail plugin
|
|
42
|
+
* rewrites `thumb` to the oEmbed thumbnail, which feeds this chain.
|
|
43
|
+
* HTML5 slides never get a synthesized poster (unchanged 2.x behavior);
|
|
44
|
+
* a provider slide with no resolvable poster returns undefined and keeps
|
|
45
|
+
* the eager-iframe path.
|
|
46
|
+
*/
|
|
47
|
+
export declare function getFacadePoster(item: {
|
|
48
|
+
poster?: string;
|
|
49
|
+
thumb?: string;
|
|
50
|
+
}, videoInfo: VideoInfo | undefined, loadYouTubePoster: boolean): string | undefined;
|
|
51
|
+
/**
|
|
52
|
+
* Provider player-API script URLs, loaded on demand at first play (the
|
|
53
|
+
* vanilla runtime's control paths need them; the framework bindings drive
|
|
54
|
+
* players via postMessage and load nothing).
|
|
55
|
+
*/
|
|
56
|
+
export declare const VIMEO_PLAYER_SCRIPT_URL = "https://player.vimeo.com/api/player.js";
|
|
57
|
+
export declare const WISTIA_PLAYER_SCRIPT_URL = "https://fast.wistia.com/assets/external/E-v1.js";
|
|
58
|
+
/**
|
|
59
|
+
* Vimeo embed URL, including the private-video hash handling (2.x
|
|
60
|
+
* `getVimeoURLParams`).
|
|
61
|
+
*/
|
|
62
|
+
export declare function getVimeoEmbedUrl(videoInfo: VideoInfo, playerParamsSettings: PlayerParams): string | undefined;
|
|
63
|
+
/** Wistia embed URL. */
|
|
64
|
+
export declare function getWistiaEmbedUrl(videoInfo: VideoInfo, playerParamsSettings: PlayerParams): string | undefined;
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Zoom math for the zoom plugin, ported from the 2.x zoom
|
|
3
|
+
* plugin's scale/position logic as pure functions: scale stepping and
|
|
4
|
+
* clamping, actual-size scale, point-anchored zooming, pinch scale and
|
|
5
|
+
* pan bounds. The React plugin writes the resulting transforms to the DOM.
|
|
6
|
+
*/
|
|
7
|
+
export interface ZoomPan {
|
|
8
|
+
x: number;
|
|
9
|
+
y: number;
|
|
10
|
+
}
|
|
11
|
+
export interface PanBounds {
|
|
12
|
+
maxX: number;
|
|
13
|
+
maxY: number;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* How far a zoomed image may pan before its edge would detach from the
|
|
17
|
+
* container edge. At scale <= 1 the image cannot pan at all.
|
|
18
|
+
*/
|
|
19
|
+
export declare function getPanBounds(imageWidth: number, imageHeight: number, containerWidth: number, containerHeight: number, scale: number): PanBounds;
|
|
20
|
+
export declare function clampPan(pan: ZoomPan, bounds: PanBounds): ZoomPan;
|
|
21
|
+
/**
|
|
22
|
+
* Scale at which the image renders at its natural pixel size (2.x
|
|
23
|
+
* `getCurrentImageActualSizeScale`, with its `|| 2` fallback).
|
|
24
|
+
*/
|
|
25
|
+
export declare function getActualSizeScale(naturalWidth: number, renderedWidth: number): number;
|
|
26
|
+
/** Clamp a target scale: never below 1; capped unless `infiniteZoom`. */
|
|
27
|
+
export declare function clampScale(scale: number, maxScale: number, infiniteZoom: boolean): number;
|
|
28
|
+
/**
|
|
29
|
+
* Pan that keeps the given point (relative to the container center)
|
|
30
|
+
* anchored while the scale changes — used for double-click/tap zoom and
|
|
31
|
+
* pinch focal points.
|
|
32
|
+
*/
|
|
33
|
+
export declare function getPointZoomPan(point: ZoomPan, prevPan: ZoomPan, prevScale: number, newScale: number): ZoomPan;
|
|
34
|
+
/**
|
|
35
|
+
* Stage-aware pan clamp. X is symmetric. The pan-up floor on Y extends
|
|
36
|
+
* past the content box by `stageBottomExtra` — the components strip
|
|
37
|
+
* (thumbnails + caption) vacates when zoomed, so the visible stage
|
|
38
|
+
* reaches the SCREEN bottom and the image may ride up until its bottom
|
|
39
|
+
* edge meets it; a plain symmetric clamp would strand a strip-height
|
|
40
|
+
* gap of black. Inversion-guarded (min against +maxY) for images
|
|
41
|
+
* taller than the content box but shorter than the full stage.
|
|
42
|
+
*/
|
|
43
|
+
export declare function clampPanToStage(pan: ZoomPan, bounds: PanBounds, stageBottomExtra: number): ZoomPan;
|
|
44
|
+
/**
|
|
45
|
+
* Pan during a pinch: the focal zoom projection translated by the
|
|
46
|
+
* midpoint's travel — the image point between the fingers stays
|
|
47
|
+
* between the fingers wherever they go (iOS fused
|
|
48
|
+
* zoom-and-pan; two fingers moving together pan without zooming).
|
|
49
|
+
*/
|
|
50
|
+
export declare function getPinchPan(currentMid: ZoomPan, startMid: ZoomPan, startPan: ZoomPan, startScale: number, scale: number): ZoomPan;
|
|
51
|
+
/** Distance between two pointers (pinch measurement). */
|
|
52
|
+
export declare function getPointerDistance(a: {
|
|
53
|
+
x: number;
|
|
54
|
+
y: number;
|
|
55
|
+
}, b: {
|
|
56
|
+
x: number;
|
|
57
|
+
y: number;
|
|
58
|
+
}): number;
|
|
59
|
+
/**
|
|
60
|
+
* Continuous resistance below fit scale — replaces the 2.x hard 0.5
|
|
61
|
+
* floor: past the boundary the scale keeps moving at 15% per unit.
|
|
62
|
+
*/
|
|
63
|
+
export declare const PINCH_UNDER_FRICTION = 0.15;
|
|
64
|
+
/**
|
|
65
|
+
* Very stiff resistance beyond actual size instead of a hard stop;
|
|
66
|
+
* the release spring lands back inside bounds. `infiniteZoom` disables
|
|
67
|
+
* this boundary entirely.
|
|
68
|
+
*/
|
|
69
|
+
export declare const PINCH_OVER_FRICTION = 0.05;
|
|
70
|
+
/**
|
|
71
|
+
* Scale during a pinch: proportional to the distance ratio, with
|
|
72
|
+
* friction (not clamps) at both boundaries. When pinch-to-close is
|
|
73
|
+
* armed, the under-fit squeeze is free — the shrink IS the close
|
|
74
|
+
* affordance; the release verdict is {@link shouldCloseOnPinch}.
|
|
75
|
+
*/
|
|
76
|
+
export declare function getPinchScale(startDistance: number, currentDistance: number, startScale: number, maxScale: number, infiniteZoom: boolean, pinchToCloseArmed?: boolean): number;
|
|
77
|
+
/**
|
|
78
|
+
* Pinch-to-close verdict (iOS Photos signature): a pinch released
|
|
79
|
+
* below fit closes ONLY when the whole gesture stayed at or under fit
|
|
80
|
+
* — an over-then-under pinch is a zoom correction, not a dismissal.
|
|
81
|
+
* `maxGestureScale` is the largest scale seen since the pinch started
|
|
82
|
+
* (seeded with the start scale).
|
|
83
|
+
*/
|
|
84
|
+
export declare function shouldCloseOnPinch(input: {
|
|
85
|
+
scale: number;
|
|
86
|
+
maxGestureScale: number;
|
|
87
|
+
pinchToClose: boolean;
|
|
88
|
+
closable: boolean;
|
|
89
|
+
}): boolean;
|
|
@@ -1,4 +1,9 @@
|
|
|
1
|
-
import { LightGallerySettings } from './lg-settings';
|
|
2
|
-
import { LightGallery } from './lightgallery';
|
|
3
|
-
declare function lightGallery(el: HTMLElement, options?: LightGallerySettings): LightGallery;
|
|
4
|
-
|
|
1
|
+
import { LightGallerySettings } from './lg-settings';
|
|
2
|
+
import { LightGallery } from './lightgallery';
|
|
3
|
+
declare function lightGallery(el: HTMLElement, options?: LightGallerySettings): LightGallery;
|
|
4
|
+
declare namespace lightGallery {
|
|
5
|
+
var setLicenseKey: typeof import("./headless/index").setLicenseKey;
|
|
6
|
+
}
|
|
7
|
+
export default lightGallery;
|
|
8
|
+
export type { LightGallery };
|
|
9
|
+
export type { LgIconName, LgIcons } from './lg-icons';
|