lightgallery 3.0.0-beta.2 → 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.
Files changed (69) hide show
  1. package/dist/lightgallery.es5.js +5 -56
  2. package/dist/lightgallery.es5.js.map +1 -1
  3. package/dist/lightgallery.min.js +1 -1
  4. package/dist/lightgallery.umd.js +5 -56
  5. package/dist/lightgallery.umd.js.map +1 -1
  6. package/dist/package.json +1 -1
  7. package/dist/plugins/autoplay/lg-autoplay.es5.js +1 -1
  8. package/dist/plugins/autoplay/lg-autoplay.umd.js +1 -1
  9. package/dist/plugins/comment/lg-comment.es5.js +1 -1
  10. package/dist/plugins/comment/lg-comment.umd.js +1 -1
  11. package/dist/plugins/fullscreen/lg-fullscreen.es5.js +1 -1
  12. package/dist/plugins/fullscreen/lg-fullscreen.umd.js +1 -1
  13. package/dist/plugins/hash/lg-hash.es5.js +1 -1
  14. package/dist/plugins/hash/lg-hash.umd.js +1 -1
  15. package/dist/plugins/justified/lg-justified.es5.js +1 -1
  16. package/dist/plugins/justified/lg-justified.umd.js +1 -1
  17. package/dist/plugins/mediumZoom/lg-medium-zoom.es5.js +1 -1
  18. package/dist/plugins/mediumZoom/lg-medium-zoom.umd.js +1 -1
  19. package/dist/plugins/originCrop/lg-origin-crop.es5.js +1 -1
  20. package/dist/plugins/originCrop/lg-origin-crop.umd.js +1 -1
  21. package/dist/plugins/pager/lg-pager.es5.js +1 -1
  22. package/dist/plugins/pager/lg-pager.umd.js +1 -1
  23. package/dist/plugins/relativeCaption/lg-relative-caption.es5.js +1 -1
  24. package/dist/plugins/relativeCaption/lg-relative-caption.umd.js +1 -1
  25. package/dist/plugins/rotate/lg-rotate.es5.js +1 -1
  26. package/dist/plugins/rotate/lg-rotate.umd.js +1 -1
  27. package/dist/plugins/share/lg-share.es5.js +1 -1
  28. package/dist/plugins/share/lg-share.umd.js +1 -1
  29. package/dist/plugins/thumbnail/lg-thumbnail.es5.js +1 -1
  30. package/dist/plugins/thumbnail/lg-thumbnail.umd.js +1 -1
  31. package/dist/plugins/video/lg-video.es5.js +1 -1
  32. package/dist/plugins/video/lg-video.umd.js +1 -1
  33. package/dist/plugins/vimeoThumbnail/lg-vimeo-thumbnail.es5.js +1 -1
  34. package/dist/plugins/vimeoThumbnail/lg-vimeo-thumbnail.umd.js +1 -1
  35. package/dist/plugins/zoom/lg-zoom.es5.js +1 -1
  36. package/dist/plugins/zoom/lg-zoom.umd.js +1 -1
  37. package/dist/types/headless/announce.d.ts +22 -0
  38. package/dist/types/headless/emitter.d.ts +14 -0
  39. package/dist/types/headless/gestures.d.ts +128 -0
  40. package/dist/types/headless/hash-driver.d.ts +77 -0
  41. package/dist/types/headless/icons.d.ts +56 -0
  42. package/dist/types/headless/index.d.ts +34 -0
  43. package/dist/types/headless/items.d.ts +92 -0
  44. package/dist/types/headless/justified-layout.d.ts +71 -0
  45. package/dist/types/headless/license.d.ts +35 -0
  46. package/dist/types/headless/origin-crop.d.ts +135 -0
  47. package/dist/types/headless/origin.d.ts +65 -0
  48. package/dist/types/headless/plugin-slices.d.ts +64 -0
  49. package/dist/types/headless/preload.d.ts +36 -0
  50. package/dist/types/headless/responsive.d.ts +90 -0
  51. package/dist/types/headless/settings.d.ts +268 -0
  52. package/dist/types/headless/share-urls.d.ts +60 -0
  53. package/dist/types/headless/spring.d.ts +42 -0
  54. package/dist/types/headless/state.d.ts +63 -0
  55. package/dist/types/headless/thumb-math.d.ts +85 -0
  56. package/dist/types/headless/toolbar-overflow.d.ts +61 -0
  57. package/dist/types/headless/transition.d.ts +33 -0
  58. package/dist/types/headless/velocity.d.ts +31 -0
  59. package/dist/types/headless/video-urls.d.ts +64 -0
  60. package/dist/types/headless/zoom-math.d.ts +89 -0
  61. package/dist/types/index.d.ts +2 -1
  62. package/dist/types/lg-icons.d.ts +1 -1
  63. package/dist/types/lg-settings.d.ts +1 -7
  64. package/dist/types/lg-spring-runner.d.ts +1 -1
  65. package/dist/types/lightgallery.d.ts +0 -1
  66. package/dist/types/plugins/hash/lg-hash-settings.d.ts +1 -1
  67. package/dist/types/plugins/video/lg-video-settings.d.ts +1 -1
  68. package/dist/types/plugins/zoom/lg-zoom.d.ts +1 -1
  69. package/package.json +56 -71
@@ -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;
@@ -2,7 +2,8 @@ import { LightGallerySettings } from './lg-settings';
2
2
  import { LightGallery } from './lightgallery';
3
3
  declare function lightGallery(el: HTMLElement, options?: LightGallerySettings): LightGallery;
4
4
  declare namespace lightGallery {
5
- var setLicenseKey: typeof import("@lightgallery/headless").setLicenseKey;
5
+ var setLicenseKey: typeof import("./headless/index").setLicenseKey;
6
6
  }
7
7
  export default lightGallery;
8
+ export type { LightGallery };
8
9
  export type { LgIconName, LgIcons } from './lg-icons';
@@ -14,7 +14,7 @@
14
14
  * pair, a half-provided pair keeps the defaults so no state ends up
15
15
  * iconless.
16
16
  */
17
- import type { LgIconName } from '@lightgallery/headless';
17
+ import type { LgIconName } from './headless/index';
18
18
  export type { LgIconName };
19
19
  /** SVG markup per icon; omitted names keep the built-in glyph. */
20
20
  export type LgIcons = Partial<Record<LgIconName, string>>;
@@ -1,4 +1,4 @@
1
- import { VirtualizationSettings } from '@lightgallery/headless';
1
+ import { VirtualizationSettings } from './headless/index';
2
2
  import { LgIcons } from './lg-icons';
3
3
  import { GalleryItem } from './lg-utils';
4
4
  import { LgQuery } from './lgQuery';
@@ -180,12 +180,6 @@ export interface LightGalleryCoreSettings {
180
180
  * </section>
181
181
  */
182
182
  slideDelay: number;
183
- /**
184
- * Support legacy browsers
185
- * @description Currently this is used only for adding support to srcset attribute via picturefill library
186
- * If true lightGallery will show warning message to include picturefill library
187
- */
188
- supportLegacyBrowser: boolean;
189
183
  /**
190
184
  * If true, toolbar, captions and thumbnails will not overlap with media element
191
185
  * This will not effect thumbnails if animateThumb is false
@@ -1,4 +1,4 @@
1
- import { type SpringConfig } from '@lightgallery/headless';
1
+ import { type SpringConfig } from './headless/index';
2
2
  /**
3
3
  * rAF driver for the shared spring math: advances one spring per track
4
4
  * each frame and hands the values to the caller's DOM writer. The math
@@ -171,7 +171,6 @@ export declare class LightGallery {
171
171
  getMediaContainerPosition(): MediaContainerPosition;
172
172
  private setMediaContainerPosition;
173
173
  hideBars(): void;
174
- initPictureFill($img: lgQuery): void;
175
174
  /**
176
175
  * @desc Create image counter
177
176
  * Ex: 1/10
@@ -1,4 +1,4 @@
1
- import { HashDriverPreference } from '@lightgallery/headless';
1
+ import { HashDriverPreference } from '../../headless/index';
2
2
  export interface HashSettings {
3
3
  /**
4
4
  * Enable/Disable hash option
@@ -1,4 +1,4 @@
1
- import { PlayerParams } from '@lightgallery/headless';
1
+ import { PlayerParams } from '../../headless/index';
2
2
  export interface VideoSettings {
3
3
  /**
4
4
  * Enable/DIsable first video autoplay.
@@ -1,4 +1,4 @@
1
- import { type Velocity } from '@lightgallery/headless';
1
+ import { type Velocity } from '../../headless/index';
2
2
  import { LgQuery, lgQuery } from '../../lgQuery';
3
3
  import { LightGallery } from '../../lightgallery';
4
4
  interface Coords {
package/package.json CHANGED
@@ -1,23 +1,6 @@
1
1
  {
2
2
  "name": "lightgallery",
3
- "version": "3.0.0-beta.2",
4
- "packageManager": "pnpm@9.15.0",
5
- "pnpm": {
6
- "overrides": {
7
- "@types/babel__traverse": "7.11.1",
8
- "@types/express": "4.17.11",
9
- "@types/express-serve-static-core": "4.17.19",
10
- "@types/react": "18.0.15",
11
- "@types/serve-static": "1.13.10"
12
- },
13
- "packageExtensions": {
14
- "@analogjs/vite-plugin-angular": {
15
- "dependencies": {
16
- "typescript": "~5.9.0"
17
- }
18
- }
19
- }
20
- },
3
+ "version": "3.0.0-beta.3",
21
4
  "description": "lightGallery is a feature-rich, modular JavaScript gallery plugin for building beautiful image and video galleries for the web and the mobile",
22
5
  "keywords": [
23
6
  "JavaScript",
@@ -138,56 +121,7 @@
138
121
  "url": "https://github.com/sachinchoolur"
139
122
  },
140
123
  "engines": {
141
- "node": ">=6.0.0"
142
- },
143
- "scripts": {
144
- "lint": "eslint 'src/**/*.ts' 'test/**/*.ts' --quiet",
145
- "lint:fix": "eslint 'src/**/*.ts' 'test/**/*.ts' --quiet --fix",
146
- "prebuild": "rimraf dist",
147
- "build": "npm run build:all:vite",
148
- "build:all:vite": "turbo run build:vite build:types --filter=@lightgallery/core && turbo run build:css build:css:min copy:assets copy:scss assemble:dist --filter=lightgallery",
149
- "build:vite": "turbo run build:vite build:types --filter=@lightgallery/core",
150
- "verify:parity": "tsx scripts/verify-build-parity.ts",
151
- "typecheck": "tsc --noEmit -p tsconfig.json",
152
- "build-scss": "sass src/scss/:dist/css/ --style=expanded",
153
- "build:css": "sass src/scss/:dist/css/ --style=expanded",
154
- "build:css:min": "cleancss -o dist/css/lightgallery-bundle.min.css dist/css/lightgallery-bundle.css",
155
- "build-scss-dev": "sass src/scss/:site/static/css/ --style=expanded",
156
- "watch-css": "nodemon --watch 'src/**/*' -e scss -x \"npm run build-scss-dev\"",
157
- "watch-site-content": "nodemon --watch dist -x \"npm run copyAssetsToSite\"",
158
- "minify-css": "cleancss -o dist/css/lightgallery-bundle.min.css dist/css/lightgallery-bundle.css",
159
- "start": "concurrently \"vite build --config packages/core/vite.config.dev.ts --watch\" \"npm run watch-site-content \" \"npm run watch-css \" ",
160
- "test": "jest",
161
- "test:coverage": "jest --coverage",
162
- "test:watch": "jest --watch",
163
- "test:prod": "npm run lint && npm run test:coverage -- --no-cache --runInBand",
164
- "deploy-docs": "ts-node tools/gh-pages-publish",
165
- "docs": "typedoc --json site/data/doc.json --entryPointStrategy expand --skipErrorChecking --categorizeByGroup src",
166
- "report-coverage": "cat ./coverage/lcov.info | coveralls",
167
- "commit": "git-cz",
168
- "semantic-release": "semantic-release",
169
- "semantic-release-prepare": "ts-node tools/semantic-release-prepare",
170
- "precommit": "lint-staged",
171
- "travis-deploy-once": "travis-deploy-once",
172
- "copyAssets": "copyfiles -u 1 src/images/** dist",
173
- "copy:assets": "copyfiles -u 1 src/images/** dist",
174
- "copy:scss": "copyfiles -f -u 1 src/scss/** dist/scss && copyfiles -u 2 src/scss/**/* dist/scss",
175
- "assemble:dist": "tsx scripts/assemble-vite-dist.ts",
176
- "sync:site": "copyfiles -f dist/*.js site/assets/js && copyfiles -u 1 dist/plugins/**/* site/assets/js && copyfiles -f dist/images/** site/static/images",
177
- "copyPackages": "copyfiles README.md dist && copyfiles -u 1 packages/**/**/* dist && copyfiles -u 1 packages/**/* dist && copyfiles -u 1 packages/* dist",
178
- "updatePackageFields": "ts-node tools/update-packages",
179
- "copyReactBuild": "copyfiles -f -u 1 -e '**/*.d.ts' lightgallery-react/dist/* dist/react && copyfiles -f -u 1 lightgallery-react/dist/Lightgallery.d.ts dist/react",
180
- "copyLitBuild": "copyfiles -f -u 1 lightgallery-lit/dist/* dist/lit",
181
- "copyVueBuild": "copyfiles -f -u 1 -e '**/*.html' lightgallery-vue/dist/* dist/vue && copyfiles -f lightgallery-vue/dist/lightgallery-vue/src/components/LightGallery.vue.d.ts dist/vue ",
182
- "copyAngularBuild": "ts-node tools/copy-angular-build",
183
- "copyAssetsToSite": "copyfiles -f dist/images/** site/static/images",
184
- "copyJsToSite": "copyfiles -f dist/*.js site/assets/js && copyfiles -u 1 dist/plugins/**/* site/assets/js",
185
- "copyScss": "copyfiles -f -u 1 src/scss/** dist/scss && copyfiles -u 2 src/scss/**/* dist/scss",
186
- "prepush": "npm run test:prod && npm run build",
187
- "commitmsg": "commitlint -E HUSKY_GIT_PARAMS",
188
- "buildLibraries": "ts-node tools/build-libraries",
189
- "publishToNpm": "pnpm publish",
190
- "prepack": "node scripts/assert-built.mjs dist/lightgallery.umd.js dist/lightgallery.es5.js dist/lightgallery.min.js dist/css/lightgallery.css dist/types/index.d.ts"
124
+ "node": ">=18"
191
125
  },
192
126
  "lint-staged": {
193
127
  "{src,test}/**/*.ts": [
@@ -208,7 +142,6 @@
208
142
  "devDependencies": {
209
143
  "@commitlint/cli": "^7.1.2",
210
144
  "@commitlint/config-conventional": "^7.1.2",
211
- "@lightgallery/headless": "workspace:*",
212
145
  "@testing-library/dom": "^7.30.4",
213
146
  "@testing-library/jest-dom": "^5.12.0",
214
147
  "@types/jest": "^30.0.0",
@@ -254,9 +187,61 @@
254
187
  "turbo": "^2.3.3",
255
188
  "typedoc": "^0.26.11",
256
189
  "typescript": "5.0.4",
257
- "vite": "^5.4.11"
190
+ "vite": "^5.4.11",
191
+ "@lightgallery/headless": "3.0.0-beta.3"
258
192
  },
259
193
  "publishConfig": {
260
194
  "tag": "next"
195
+ },
196
+ "scripts": {
197
+ "lint": "eslint 'src/**/*.ts' 'test/**/*.ts' --quiet",
198
+ "lint:fix": "eslint 'src/**/*.ts' 'test/**/*.ts' --quiet --fix",
199
+ "prebuild": "rimraf dist",
200
+ "build": "npm run build:all:vite",
201
+ "build:all:vite": "turbo run build:vite build:types --filter=@lightgallery/core && turbo run build:css build:css:min copy:assets copy:scss assemble:dist --filter=lightgallery",
202
+ "build:vite": "turbo run build:vite build:types --filter=@lightgallery/core",
203
+ "verify:parity": "tsx scripts/verify-build-parity.ts",
204
+ "typecheck": "tsc --noEmit -p tsconfig.json",
205
+ "build-scss": "sass src/scss/:dist/css/ --style=expanded",
206
+ "build:css": "sass src/scss/:dist/css/ --style=expanded",
207
+ "build:css:min": "cleancss -o dist/css/lightgallery-bundle.min.css dist/css/lightgallery-bundle.css",
208
+ "build-scss-dev": "sass src/scss/:site/static/css/ --style=expanded",
209
+ "watch-css": "nodemon --watch 'src/**/*' -e scss -x \"npm run build-scss-dev\"",
210
+ "watch-site-content": "nodemon --watch dist -x \"npm run copyAssetsToSite\"",
211
+ "minify-css": "cleancss -o dist/css/lightgallery-bundle.min.css dist/css/lightgallery-bundle.css",
212
+ "start": "concurrently \"vite build --config packages/core/vite.config.dev.ts --watch\" \"npm run watch-site-content \" \"npm run watch-css \" ",
213
+ "test": "jest",
214
+ "test:coverage": "jest --coverage",
215
+ "test:watch": "jest --watch",
216
+ "test:prod": "npm run lint && npm run test:coverage -- --no-cache --runInBand",
217
+ "deploy-docs": "ts-node tools/gh-pages-publish",
218
+ "docs": "typedoc --json site/data/doc.json --entryPointStrategy expand --skipErrorChecking --categorizeByGroup src",
219
+ "report-coverage": "cat ./coverage/lcov.info | coveralls",
220
+ "commit": "git-cz",
221
+ "semantic-release": "semantic-release",
222
+ "semantic-release-prepare": "ts-node tools/semantic-release-prepare",
223
+ "precommit": "lint-staged",
224
+ "travis-deploy-once": "travis-deploy-once",
225
+ "copyAssets": "copyfiles -u 1 src/images/** dist",
226
+ "copy:assets": "copyfiles -u 1 src/images/** dist",
227
+ "copy:scss": "copyfiles -f -u 1 src/scss/** dist/scss && copyfiles -u 2 src/scss/**/* dist/scss",
228
+ "assemble:dist": "tsx scripts/assemble-vite-dist.ts",
229
+ "sync:site": "copyfiles -f dist/*.js site/assets/js && copyfiles -u 1 dist/plugins/**/* site/assets/js && copyfiles -f dist/images/** site/static/images",
230
+ "copyPackages": "copyfiles README.md dist && copyfiles -u 1 packages/**/**/* dist && copyfiles -u 1 packages/**/* dist && copyfiles -u 1 packages/* dist",
231
+ "updatePackageFields": "ts-node tools/update-packages",
232
+ "copyReactBuild": "copyfiles -f -u 1 -e '**/*.d.ts' lightgallery-react/dist/* dist/react && copyfiles -f -u 1 lightgallery-react/dist/Lightgallery.d.ts dist/react",
233
+ "copyLitBuild": "copyfiles -f -u 1 lightgallery-lit/dist/* dist/lit",
234
+ "copyVueBuild": "copyfiles -f -u 1 -e '**/*.html' lightgallery-vue/dist/* dist/vue && copyfiles -f lightgallery-vue/dist/lightgallery-vue/src/components/LightGallery.vue.d.ts dist/vue ",
235
+ "copyAngularBuild": "ts-node tools/copy-angular-build",
236
+ "copyAssetsToSite": "copyfiles -f dist/images/** site/static/images",
237
+ "copyJsToSite": "copyfiles -f dist/*.js site/assets/js && copyfiles -u 1 dist/plugins/**/* site/assets/js",
238
+ "copyScss": "copyfiles -f -u 1 src/scss/** dist/scss && copyfiles -u 2 src/scss/**/* dist/scss",
239
+ "prepush": "npm run test:prod && npm run build",
240
+ "commitmsg": "commitlint -E HUSKY_GIT_PARAMS",
241
+ "buildLibraries": "ts-node tools/build-libraries",
242
+ "publishToNpm": "pnpm publish",
243
+ "release": "node scripts/release.mjs publish",
244
+ "release:check": "node scripts/release.mjs check",
245
+ "release:bump": "node scripts/release.mjs bump"
261
246
  }
262
- }
247
+ }