react-motion-gallery 2.0.5 → 2.0.7
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/dist/index.css +1 -675
- package/dist/index.d.mts +318 -101
- package/dist/index.mjs +39 -12901
- package/dist/metafile-esm.json +1 -1
- package/package.json +1 -1
- package/dist/index.css.map +0 -1
- package/dist/index.mjs.map +0 -1
package/dist/index.d.mts
CHANGED
|
@@ -42,12 +42,10 @@ type ElementStyle = {
|
|
|
42
42
|
type ThumbnailPosition = "top" | "right" | "bottom" | "left";
|
|
43
43
|
type ResponsivePosition = ThumbnailPosition | Array<ThumbnailPosition> | Record<string, ThumbnailPosition>;
|
|
44
44
|
type ThumbnailLoadingOptions = {
|
|
45
|
-
|
|
45
|
+
enabled?: boolean;
|
|
46
|
+
force?: boolean;
|
|
46
47
|
skeletonCount?: ResponsiveNumber;
|
|
47
|
-
renderLoading?: (
|
|
48
|
-
layout: "slider" | "thumbnails";
|
|
49
|
-
count: number;
|
|
50
|
-
}) => React$1.ReactNode;
|
|
48
|
+
renderLoading?: () => React$1.ReactNode;
|
|
51
49
|
};
|
|
52
50
|
type ThumbnailIntroOptions = {
|
|
53
51
|
renderIntro?: (args: {
|
|
@@ -171,11 +169,85 @@ interface GalleryApi {
|
|
|
171
169
|
}) => void): () => void;
|
|
172
170
|
}
|
|
173
171
|
|
|
172
|
+
type SkeletonLength$3 = number | string;
|
|
173
|
+
type SkeletonShimmer$3 = {
|
|
174
|
+
enabled?: boolean;
|
|
175
|
+
durationMs?: number;
|
|
176
|
+
angleDeg?: number;
|
|
177
|
+
opacity?: number;
|
|
178
|
+
blurPx?: number;
|
|
179
|
+
timing?: string;
|
|
180
|
+
c1?: string;
|
|
181
|
+
c2?: string;
|
|
182
|
+
c3?: string;
|
|
183
|
+
};
|
|
184
|
+
type SkeletonBaseStyle$2 = {
|
|
185
|
+
width?: SkeletonLength$3;
|
|
186
|
+
maxWidth?: SkeletonLength$3;
|
|
187
|
+
height?: SkeletonLength$3;
|
|
188
|
+
maxHeight?: SkeletonLength$3;
|
|
189
|
+
backgroundColor?: string;
|
|
190
|
+
borderRadius?: SkeletonLength$3;
|
|
191
|
+
marginTop?: SkeletonLength$3;
|
|
192
|
+
marginRight?: SkeletonLength$3;
|
|
193
|
+
marginBottom?: SkeletonLength$3;
|
|
194
|
+
marginLeft?: SkeletonLength$3;
|
|
195
|
+
alignSelf?: React$1.CSSProperties["alignSelf"];
|
|
196
|
+
aspectRatio?: SkeletonLength$3;
|
|
197
|
+
};
|
|
198
|
+
type SkeletonContainerStyle$2 = {
|
|
199
|
+
gap?: SkeletonLength$3;
|
|
200
|
+
padding?: SkeletonLength$3;
|
|
201
|
+
align?: React$1.CSSProperties["alignItems"];
|
|
202
|
+
justify?: React$1.CSSProperties["justifyContent"];
|
|
203
|
+
wrap?: boolean;
|
|
204
|
+
width?: SkeletonLength$3;
|
|
205
|
+
maxWidth?: SkeletonLength$3;
|
|
206
|
+
};
|
|
207
|
+
type SkeletonContainerStyleResponsive$2 = SkeletonContainerStyle$2 | Record<string, SkeletonContainerStyle$2>;
|
|
208
|
+
type SliderSkeletonNode = {
|
|
209
|
+
kind: "slider";
|
|
210
|
+
style?: SkeletonContainerStyleResponsive$2;
|
|
211
|
+
count?: number;
|
|
212
|
+
item: SkeletonNode$2;
|
|
213
|
+
itemWrapStyle?: SkeletonBaseStyle$2;
|
|
214
|
+
direction?: "row" | "col";
|
|
215
|
+
} | SkeletonNode$2;
|
|
216
|
+
type SkeletonNode$2 = {
|
|
217
|
+
kind: "stack" | "row" | "col";
|
|
218
|
+
style?: SkeletonContainerStyleResponsive$2;
|
|
219
|
+
children: SkeletonNode$2[];
|
|
220
|
+
} | {
|
|
221
|
+
kind: "rect" | "square" | "circle";
|
|
222
|
+
style?: SkeletonBaseStyle$2;
|
|
223
|
+
shimmer?: SkeletonShimmer$3;
|
|
224
|
+
} | {
|
|
225
|
+
kind: "media";
|
|
226
|
+
count: number;
|
|
227
|
+
direction?: "row" | "col";
|
|
228
|
+
style?: SkeletonContainerStyleResponsive$2;
|
|
229
|
+
tile?: {
|
|
230
|
+
shape?: "rect" | "square" | "circle";
|
|
231
|
+
style?: SkeletonBaseStyle$2;
|
|
232
|
+
shimmer?: SkeletonShimmer$3;
|
|
233
|
+
};
|
|
234
|
+
};
|
|
235
|
+
type SliderSkeletonSpec = {
|
|
236
|
+
className?: string;
|
|
237
|
+
layout?: SliderSkeletonNode;
|
|
238
|
+
defaults?: {
|
|
239
|
+
backgroundColor?: string;
|
|
240
|
+
highlightColor?: string;
|
|
241
|
+
radius?: SkeletonLength$3;
|
|
242
|
+
shimmer?: SkeletonShimmer$3;
|
|
243
|
+
};
|
|
244
|
+
};
|
|
245
|
+
|
|
174
246
|
type ResponsiveHeightRule = {
|
|
175
247
|
query: string;
|
|
176
248
|
height: string;
|
|
177
249
|
};
|
|
178
|
-
type SliderLayout
|
|
250
|
+
type SliderLayout = {
|
|
179
251
|
gap?: number;
|
|
180
252
|
cellsPerSlide?: ResponsiveNumber;
|
|
181
253
|
};
|
|
@@ -250,21 +322,13 @@ type SliderAuto = {
|
|
|
250
322
|
scroll?: SliderAutoScroll;
|
|
251
323
|
};
|
|
252
324
|
type SliderLoadingOptions = {
|
|
253
|
-
|
|
325
|
+
enabled?: boolean;
|
|
326
|
+
force?: boolean;
|
|
254
327
|
skeletonCount?: ResponsiveNumber;
|
|
255
328
|
renderLoading?: (args: {
|
|
256
|
-
layout: "slider" | "thumbnails";
|
|
257
329
|
count: number;
|
|
258
330
|
}) => React.ReactNode;
|
|
259
|
-
|
|
260
|
-
radius?: number | string;
|
|
261
|
-
c1?: string;
|
|
262
|
-
c2?: string;
|
|
263
|
-
c3?: string;
|
|
264
|
-
size?: string;
|
|
265
|
-
duration?: string;
|
|
266
|
-
timing?: string;
|
|
267
|
-
};
|
|
331
|
+
skeleton?: SliderSkeletonSpec;
|
|
268
332
|
};
|
|
269
333
|
type SliderIntroOptions = {
|
|
270
334
|
renderIntro?: (args: {
|
|
@@ -304,7 +368,7 @@ type SliderMotion = {
|
|
|
304
368
|
friction?: number;
|
|
305
369
|
};
|
|
306
370
|
type SliderOptions = {
|
|
307
|
-
layout?: SliderLayout
|
|
371
|
+
layout?: SliderLayout;
|
|
308
372
|
direction?: SliderDirection;
|
|
309
373
|
size?: SliderSize;
|
|
310
374
|
align?: "start" | "center";
|
|
@@ -353,35 +417,71 @@ interface SliderHandle {
|
|
|
353
417
|
};
|
|
354
418
|
}
|
|
355
419
|
|
|
356
|
-
type
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
420
|
+
type SkeletonLength$2 = number | string;
|
|
421
|
+
type SkeletonShimmer$2 = {
|
|
422
|
+
enabled?: boolean;
|
|
423
|
+
durationMs?: number;
|
|
424
|
+
angleDeg?: number;
|
|
425
|
+
opacity?: number;
|
|
426
|
+
blurPx?: number;
|
|
427
|
+
timing?: string;
|
|
428
|
+
c1?: string;
|
|
429
|
+
c2?: string;
|
|
430
|
+
c3?: string;
|
|
431
|
+
};
|
|
432
|
+
type SkeletonBaseStyle$1 = {
|
|
433
|
+
width?: SkeletonLength$2;
|
|
434
|
+
maxWidth?: SkeletonLength$2;
|
|
435
|
+
height?: SkeletonLength$2;
|
|
436
|
+
maxHeight?: SkeletonLength$2;
|
|
437
|
+
backgroundColor?: string;
|
|
438
|
+
borderRadius?: SkeletonLength$2;
|
|
439
|
+
marginTop?: SkeletonLength$2;
|
|
440
|
+
marginRight?: SkeletonLength$2;
|
|
441
|
+
marginBottom?: SkeletonLength$2;
|
|
442
|
+
marginLeft?: SkeletonLength$2;
|
|
443
|
+
alignSelf?: React$1.CSSProperties["alignSelf"];
|
|
444
|
+
aspectRatio?: number | string;
|
|
445
|
+
};
|
|
446
|
+
type SkeletonContainerStyle$1 = {
|
|
447
|
+
gap?: SkeletonLength$2;
|
|
448
|
+
padding?: SkeletonLength$2;
|
|
449
|
+
align?: React$1.CSSProperties["alignItems"];
|
|
450
|
+
justify?: React$1.CSSProperties["justifyContent"];
|
|
451
|
+
wrap?: boolean;
|
|
452
|
+
width?: SkeletonLength$2;
|
|
453
|
+
maxWidth?: SkeletonLength$2;
|
|
454
|
+
};
|
|
455
|
+
type SkeletonContainerStyleResponsive$1 = SkeletonContainerStyle$1 | Record<string, SkeletonContainerStyle$1>;
|
|
456
|
+
type SkeletonNode$1 = {
|
|
457
|
+
kind: "stack" | "row" | "col";
|
|
458
|
+
style?: SkeletonContainerStyleResponsive$1;
|
|
459
|
+
children: SkeletonNode$1[];
|
|
460
|
+
} | {
|
|
461
|
+
kind: "rect" | "square" | "circle";
|
|
462
|
+
style?: SkeletonBaseStyle$1;
|
|
463
|
+
shimmer?: SkeletonShimmer$2;
|
|
464
|
+
} | {
|
|
465
|
+
kind: "media";
|
|
466
|
+
count: number;
|
|
467
|
+
direction?: "row" | "col";
|
|
468
|
+
style?: SkeletonContainerStyleResponsive$1;
|
|
469
|
+
tile?: {
|
|
470
|
+
shape?: "rect" | "square" | "circle";
|
|
471
|
+
style?: SkeletonBaseStyle$1;
|
|
472
|
+
shimmer?: SkeletonShimmer$2;
|
|
372
473
|
};
|
|
373
|
-
ratios?: number[];
|
|
374
474
|
};
|
|
375
|
-
type
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
475
|
+
type EntrySkeletonSpec = {
|
|
476
|
+
layout?: SkeletonNode$1;
|
|
477
|
+
variant?: "solid";
|
|
478
|
+
minHeight?: SkeletonLength$2;
|
|
479
|
+
defaults?: {
|
|
480
|
+
backgroundColor?: string;
|
|
481
|
+
highlightColor?: string;
|
|
482
|
+
radius?: SkeletonLength$2;
|
|
483
|
+
shimmer?: SkeletonShimmer$2;
|
|
484
|
+
};
|
|
385
485
|
};
|
|
386
486
|
|
|
387
487
|
type EntryItem = {
|
|
@@ -414,6 +514,36 @@ type EntryCardRenderArgs = {
|
|
|
414
514
|
entryIndex: number;
|
|
415
515
|
media: React.ReactNode;
|
|
416
516
|
};
|
|
517
|
+
type EntrySkeletonResolverArgs = {
|
|
518
|
+
entry: EntryItem;
|
|
519
|
+
entryIndex: number;
|
|
520
|
+
};
|
|
521
|
+
type EntriesLoadingOptions = {
|
|
522
|
+
enabled?: boolean;
|
|
523
|
+
force?: boolean;
|
|
524
|
+
skeleton?: EntrySkeletonSpec | ((args: EntrySkeletonResolverArgs) => EntrySkeletonSpec | null | undefined);
|
|
525
|
+
minHeight?: SkeletonLength$2;
|
|
526
|
+
nearMargin?: string;
|
|
527
|
+
viewMargin?: string;
|
|
528
|
+
threshold?: number;
|
|
529
|
+
waitForDecode?: boolean;
|
|
530
|
+
decodeTimeoutMs?: number;
|
|
531
|
+
skeletonWrap?: ElementStyle;
|
|
532
|
+
};
|
|
533
|
+
type IntroOptions$2 = {
|
|
534
|
+
renderIntro?: (args: {
|
|
535
|
+
active: boolean;
|
|
536
|
+
containerProps: React.HTMLAttributes<HTMLDivElement>;
|
|
537
|
+
}, content: React.ReactNode) => React.ReactNode;
|
|
538
|
+
staggerMs?: number;
|
|
539
|
+
durationMs?: number;
|
|
540
|
+
easing?: string;
|
|
541
|
+
staggerLimit?: number;
|
|
542
|
+
};
|
|
543
|
+
type EntrySkeletonRenderArgs = {
|
|
544
|
+
entry: EntryItem;
|
|
545
|
+
entryIndex: number;
|
|
546
|
+
};
|
|
417
547
|
type EntriesOptions = {
|
|
418
548
|
items?: EntryItem[];
|
|
419
549
|
mediaLayout?: EntryMediaLayout;
|
|
@@ -421,10 +551,13 @@ type EntriesOptions = {
|
|
|
421
551
|
card?: (args: EntryCardRenderArgs) => React.ReactNode;
|
|
422
552
|
media?: (args: EntryMediaRenderArgs) => React.ReactNode;
|
|
423
553
|
overlay?: (args: EntryOverlayRenderArgs) => React.ReactNode;
|
|
554
|
+
skeleton?: (args: EntrySkeletonRenderArgs) => React.ReactNode;
|
|
424
555
|
};
|
|
425
556
|
overlay?: ElementStyle;
|
|
426
|
-
loading?:
|
|
427
|
-
intro?: IntroOptions;
|
|
557
|
+
loading?: EntriesLoadingOptions;
|
|
558
|
+
intro?: IntroOptions$2;
|
|
559
|
+
entryList?: ElementStyle;
|
|
560
|
+
entryRow?: ElementStyle;
|
|
428
561
|
};
|
|
429
562
|
type SlideOwner = {
|
|
430
563
|
entryIndex: number;
|
|
@@ -438,12 +571,6 @@ type EntriesMediaContainerRender = (args: {
|
|
|
438
571
|
entrySliderRefs?: React$1.RefObject<Array<SliderHandle | null>>;
|
|
439
572
|
}) => React$1.ReactNode;
|
|
440
573
|
type FullscreenItemsInput = MediaItem[] | string[];
|
|
441
|
-
/**
|
|
442
|
-
* Flatten entries -> media list + link map + entry->flat indices + owners
|
|
443
|
-
* Useful for:
|
|
444
|
-
* - fullscreenItems (fs addon)
|
|
445
|
-
* - entryFlatIndexRef / entryMapRef bookkeeping
|
|
446
|
-
*/
|
|
447
574
|
declare function flattenEntries(items: EntryItem[] | undefined): {
|
|
448
575
|
flattenedMedia: MediaItem[];
|
|
449
576
|
flattenedMap: MediaEntryLink[];
|
|
@@ -453,37 +580,16 @@ declare function flattenEntries(items: EntryItem[] | undefined): {
|
|
|
453
580
|
type EntriesProps = {
|
|
454
581
|
enabled?: boolean;
|
|
455
582
|
entries: EntriesOptions;
|
|
456
|
-
/**
|
|
457
|
-
* If you don't pass this, Entries will default to:
|
|
458
|
-
* - fullscreen.items if provided
|
|
459
|
-
* - else flattened entries media
|
|
460
|
-
*/
|
|
461
583
|
fullscreen?: {
|
|
462
584
|
enabled?: boolean;
|
|
463
585
|
items?: FullscreenItemsInput;
|
|
464
586
|
};
|
|
465
|
-
/**
|
|
466
|
-
* Called by EntryList to wrap mediaNodes in the chosen layout container.
|
|
467
|
-
* This is what makes slider/grid/masonry *fully treeshakable*:
|
|
468
|
-
* users import ONE media renderer module and pass it here.
|
|
469
|
-
*/
|
|
470
587
|
renderMediaContainer: EntriesMediaContainerRender;
|
|
471
|
-
/**
|
|
472
|
-
* Override for media node creation when entries.render.media isn't provided.
|
|
473
|
-
*/
|
|
474
588
|
nodeFromMedia?: (m: MediaItem) => React$1.ReactNode;
|
|
475
|
-
/**
|
|
476
|
-
* Optional: provide your own refs if you want to read them outside.
|
|
477
|
-
* If omitted, Entries creates internal refs.
|
|
478
|
-
*/
|
|
479
589
|
entryFlatIndexRef?: React$1.RefObject<number[][] | null>;
|
|
480
590
|
entryMapRef?: React$1.RefObject<MediaEntryLink[] | null>;
|
|
481
591
|
fsOwnersRef?: React$1.RefObject<SlideOwner[]>;
|
|
482
592
|
entrySliderRefs?: React$1.RefObject<Array<SliderHandle | null>>;
|
|
483
|
-
/**
|
|
484
|
-
* Optional: if you're NOT inside GalleryCore and still want to open fullscreen,
|
|
485
|
-
* you can provide a callback.
|
|
486
|
-
*/
|
|
487
593
|
onOpenFullscreen?: (args: {
|
|
488
594
|
index: number;
|
|
489
595
|
img: HTMLImageElement;
|
|
@@ -517,36 +623,18 @@ type FullscreenEntryContext = {
|
|
|
517
623
|
expandableImgRefs?: React$1.RefObject<Array<HTMLImageElement | null>>;
|
|
518
624
|
};
|
|
519
625
|
type FullscreenSourceAdapter = {
|
|
520
|
-
/** for layouts that have a “real slider” behind a given index */
|
|
521
626
|
getOwnerSliderHandle?: (index: number) => SliderHandle | null;
|
|
522
|
-
/** for entries: ensure the correct media slider is ready before opening */
|
|
523
627
|
syncBeforeOpen?: (index: number) => void;
|
|
524
|
-
/** used by intro logic to find the “cell wrapper” */
|
|
525
628
|
closestSelector?: string;
|
|
526
|
-
/** extra context used by fullscreen runtime (entries only) */
|
|
527
629
|
getEntryContext?: () => FullscreenEntryContext;
|
|
528
630
|
};
|
|
529
631
|
type GalleryCoreProps = {
|
|
530
632
|
children?: React$1.ReactNode;
|
|
531
|
-
/** tells add-ons which base layout is mounted */
|
|
532
633
|
layout: CoreLayout;
|
|
533
|
-
/** optional breakpoint override */
|
|
534
634
|
breakpoints?: BreakpointMap;
|
|
535
|
-
/**
|
|
536
|
-
* optional: provide fullscreen/media items centrally.
|
|
537
|
-
* - If MediaItem[], use as-is
|
|
538
|
-
* - If string[], will be converted via toMediaItems()
|
|
539
|
-
*/
|
|
540
635
|
fullscreenItems?: MediaItem[] | string[];
|
|
541
|
-
/**
|
|
542
|
-
* optional: if user passes children nodes (e.g. SliderLayout children),
|
|
543
|
-
* core can manage them as cells.
|
|
544
|
-
*
|
|
545
|
-
* NOTE: This is intentionally "opt-in" to keep core generic.
|
|
546
|
-
*/
|
|
547
636
|
nodes?: React$1.ReactNode | React$1.ReactNode[];
|
|
548
637
|
};
|
|
549
|
-
/** Provider (internal name kept for clarity) */
|
|
550
638
|
declare function GalleryCoreProvider(props: GalleryCoreProps): react_jsx_runtime.JSX.Element;
|
|
551
639
|
type GalleryCore = {
|
|
552
640
|
layout: CoreLayout;
|
|
@@ -575,7 +663,6 @@ type GalleryCore = {
|
|
|
575
663
|
expandableImgRefs: React$1.RefObject<Array<HTMLImageElement | null>>;
|
|
576
664
|
registerExpandableImg: (index: number, node: HTMLElement | null) => void;
|
|
577
665
|
};
|
|
578
|
-
/** ✅ Option A: public component alias */
|
|
579
666
|
declare const GalleryCore: typeof GalleryCoreProvider;
|
|
580
667
|
|
|
581
668
|
type FsCounterArgs = {
|
|
@@ -775,20 +862,109 @@ declare function useFullscreenController(args: UseFullscreenArgs): {
|
|
|
775
862
|
closingModal: boolean;
|
|
776
863
|
};
|
|
777
864
|
|
|
778
|
-
declare const
|
|
865
|
+
declare const Slider: React$1.ForwardRefExoticComponent<SliderOptions & {
|
|
779
866
|
children?: React$1.ReactNode;
|
|
780
867
|
breakpoints?: BreakpointMap;
|
|
781
868
|
expandableImgRefs?: React$1.RefObject<Array<HTMLImageElement | null>>;
|
|
782
869
|
} & React$1.RefAttributes<SliderHandle>>;
|
|
783
870
|
|
|
871
|
+
type SkeletonLength$1 = number | string;
|
|
872
|
+
type SkeletonShimmer$1 = {
|
|
873
|
+
enabled?: boolean;
|
|
874
|
+
durationMs?: number;
|
|
875
|
+
angleDeg?: number;
|
|
876
|
+
opacity?: number;
|
|
877
|
+
blurPx?: number;
|
|
878
|
+
timing?: string;
|
|
879
|
+
c1?: string;
|
|
880
|
+
c2?: string;
|
|
881
|
+
c3?: string;
|
|
882
|
+
};
|
|
883
|
+
type SkeletonBaseStyle = {
|
|
884
|
+
width?: SkeletonLength$1;
|
|
885
|
+
maxWidth?: SkeletonLength$1;
|
|
886
|
+
height?: SkeletonLength$1;
|
|
887
|
+
maxHeight?: SkeletonLength$1;
|
|
888
|
+
backgroundColor?: string;
|
|
889
|
+
borderRadius?: SkeletonLength$1;
|
|
890
|
+
marginTop?: SkeletonLength$1;
|
|
891
|
+
marginRight?: SkeletonLength$1;
|
|
892
|
+
marginBottom?: SkeletonLength$1;
|
|
893
|
+
marginLeft?: SkeletonLength$1;
|
|
894
|
+
alignSelf?: React$1.CSSProperties["alignSelf"];
|
|
895
|
+
aspectRatio?: SkeletonLength$1;
|
|
896
|
+
};
|
|
897
|
+
type SkeletonContainerStyle = {
|
|
898
|
+
gap?: SkeletonLength$1;
|
|
899
|
+
padding?: SkeletonLength$1;
|
|
900
|
+
align?: React$1.CSSProperties["alignItems"];
|
|
901
|
+
justify?: React$1.CSSProperties["justifyContent"];
|
|
902
|
+
wrap?: boolean;
|
|
903
|
+
width?: SkeletonLength$1;
|
|
904
|
+
maxWidth?: SkeletonLength$1;
|
|
905
|
+
};
|
|
906
|
+
type SkeletonContainerStyleResponsive = SkeletonContainerStyle | Record<string, SkeletonContainerStyle>;
|
|
907
|
+
type GridSkeletonNode = {
|
|
908
|
+
kind: "grid";
|
|
909
|
+
style?: SkeletonContainerStyleResponsive;
|
|
910
|
+
count?: number;
|
|
911
|
+
item: SkeletonNode;
|
|
912
|
+
itemWrapStyle?: SkeletonBaseStyle;
|
|
913
|
+
} | SkeletonNode;
|
|
914
|
+
type SkeletonNode = {
|
|
915
|
+
kind: "stack" | "row" | "col";
|
|
916
|
+
style?: SkeletonContainerStyleResponsive;
|
|
917
|
+
children: SkeletonNode[];
|
|
918
|
+
} | {
|
|
919
|
+
kind: "rect" | "square" | "circle";
|
|
920
|
+
style?: SkeletonBaseStyle;
|
|
921
|
+
shimmer?: SkeletonShimmer$1;
|
|
922
|
+
} | {
|
|
923
|
+
kind: "media";
|
|
924
|
+
count: number;
|
|
925
|
+
direction?: "row" | "col";
|
|
926
|
+
style?: SkeletonContainerStyleResponsive;
|
|
927
|
+
tile?: {
|
|
928
|
+
shape?: "rect" | "square" | "circle";
|
|
929
|
+
style?: SkeletonBaseStyle;
|
|
930
|
+
shimmer?: SkeletonShimmer$1;
|
|
931
|
+
};
|
|
932
|
+
};
|
|
933
|
+
type GridSkeletonSpec = {
|
|
934
|
+
className?: string;
|
|
935
|
+
layout?: GridSkeletonNode;
|
|
936
|
+
backgroundColor?: string;
|
|
937
|
+
radius?: SkeletonLength$1;
|
|
938
|
+
shimmer?: SkeletonShimmer$1;
|
|
939
|
+
};
|
|
940
|
+
|
|
941
|
+
type LoadingOptions$1 = {
|
|
942
|
+
enabled?: boolean;
|
|
943
|
+
force?: boolean;
|
|
944
|
+
renderLoading?: (args: {
|
|
945
|
+
count: number;
|
|
946
|
+
}) => React.ReactNode;
|
|
947
|
+
skeleton?: GridSkeletonSpec;
|
|
948
|
+
};
|
|
949
|
+
type IntroOptions$1 = {
|
|
950
|
+
renderIntro?: (args: {
|
|
951
|
+
active: boolean;
|
|
952
|
+
containerProps: React.HTMLAttributes<HTMLDivElement>;
|
|
953
|
+
}, content: React.ReactNode) => React.ReactNode;
|
|
954
|
+
staggerMs?: number;
|
|
955
|
+
transform?: string;
|
|
956
|
+
durationMs?: number;
|
|
957
|
+
easing?: string;
|
|
958
|
+
staggerLimit?: number;
|
|
959
|
+
};
|
|
784
960
|
type GridOptions = {
|
|
785
961
|
columns?: ResponsiveNumber;
|
|
786
962
|
minColumnWidth?: number | string;
|
|
787
963
|
gap?: ResponsiveNumber;
|
|
788
964
|
rootClassName?: string;
|
|
789
965
|
itemClassName?: string;
|
|
790
|
-
loading?: LoadingOptions;
|
|
791
|
-
intro?: IntroOptions;
|
|
966
|
+
loading?: LoadingOptions$1;
|
|
967
|
+
intro?: IntroOptions$1;
|
|
792
968
|
};
|
|
793
969
|
|
|
794
970
|
type Props$1 = GridOptions & {
|
|
@@ -799,6 +975,47 @@ type Props$1 = GridOptions & {
|
|
|
799
975
|
};
|
|
800
976
|
declare function GridLayoutRuntime(props: Props$1): react_jsx_runtime.JSX.Element;
|
|
801
977
|
|
|
978
|
+
type SkeletonLength = number | string;
|
|
979
|
+
type SkeletonShimmer = {
|
|
980
|
+
enabled?: boolean;
|
|
981
|
+
durationMs?: number;
|
|
982
|
+
angleDeg?: number;
|
|
983
|
+
opacity?: number;
|
|
984
|
+
blurPx?: number;
|
|
985
|
+
timing?: string;
|
|
986
|
+
c1?: string;
|
|
987
|
+
c2?: string;
|
|
988
|
+
c3?: string;
|
|
989
|
+
};
|
|
990
|
+
type MasonrySkeletonSpec = {
|
|
991
|
+
className?: string;
|
|
992
|
+
ratios?: number[];
|
|
993
|
+
heightsPx?: number[];
|
|
994
|
+
backgroundColor?: string;
|
|
995
|
+
highlightColor?: string;
|
|
996
|
+
radius?: SkeletonLength;
|
|
997
|
+
shimmer?: SkeletonShimmer;
|
|
998
|
+
};
|
|
999
|
+
|
|
1000
|
+
type LoadingOptions = {
|
|
1001
|
+
enabled?: boolean;
|
|
1002
|
+
force?: boolean;
|
|
1003
|
+
renderLoading?: (args: {
|
|
1004
|
+
count: number;
|
|
1005
|
+
}) => React.ReactNode;
|
|
1006
|
+
skeleton?: MasonrySkeletonSpec;
|
|
1007
|
+
};
|
|
1008
|
+
type IntroOptions = {
|
|
1009
|
+
renderIntro?: (args: {
|
|
1010
|
+
active: boolean;
|
|
1011
|
+
containerProps: React.HTMLAttributes<HTMLDivElement>;
|
|
1012
|
+
}, content: React.ReactNode) => React.ReactNode;
|
|
1013
|
+
staggerMs?: number;
|
|
1014
|
+
transform?: string;
|
|
1015
|
+
durationMs?: number;
|
|
1016
|
+
easing?: string;
|
|
1017
|
+
staggerLimit?: number;
|
|
1018
|
+
};
|
|
802
1019
|
type MasonryOptions = {
|
|
803
1020
|
columns?: ResponsiveNumber;
|
|
804
1021
|
gap?: ResponsiveNumber;
|
|
@@ -819,7 +1036,7 @@ type Props = MasonryOptions & {
|
|
|
819
1036
|
children?: React$1.ReactNode;
|
|
820
1037
|
breakpoints?: BreakpointMap;
|
|
821
1038
|
};
|
|
822
|
-
declare function
|
|
1039
|
+
declare function Masonry(props: Props): react_jsx_runtime.JSX.Element;
|
|
823
1040
|
|
|
824
1041
|
type RmgPlyrSourceBuilder = (args: {
|
|
825
1042
|
src: string;
|
|
@@ -830,7 +1047,7 @@ type RmgPlyrOptionsResolver = any | ((args: {
|
|
|
830
1047
|
poster?: string;
|
|
831
1048
|
index: number;
|
|
832
1049
|
}) => any);
|
|
833
|
-
type
|
|
1050
|
+
type VideoProps = {
|
|
834
1051
|
src: string;
|
|
835
1052
|
poster?: string;
|
|
836
1053
|
alt?: string;
|
|
@@ -844,7 +1061,7 @@ type RmgPlyrVideoProps = {
|
|
|
844
1061
|
onApi?: (api: APITypes | null) => void;
|
|
845
1062
|
registerApiByIndex?: (index: number, api: APITypes | null) => void;
|
|
846
1063
|
};
|
|
847
|
-
declare function
|
|
1064
|
+
declare function Video(props: VideoProps): react_jsx_runtime.JSX.Element;
|
|
848
1065
|
|
|
849
1066
|
declare function PanAxis(): {
|
|
850
1067
|
scroll: "x";
|
|
@@ -891,7 +1108,7 @@ declare const DEFAULT_SLIDER: {
|
|
|
891
1108
|
readonly className: "";
|
|
892
1109
|
};
|
|
893
1110
|
};
|
|
894
|
-
readonly thumbnails: Required<Pick<ThumbnailsOptions, "
|
|
1111
|
+
readonly thumbnails: Required<Pick<ThumbnailsOptions, "scroll" | "layout" | "motion">>;
|
|
895
1112
|
readonly auto: {
|
|
896
1113
|
readonly play: {
|
|
897
1114
|
readonly enabled: false;
|
|
@@ -966,4 +1183,4 @@ declare const DEFAULT_FULLSCREEN: {
|
|
|
966
1183
|
readonly caption: {};
|
|
967
1184
|
};
|
|
968
1185
|
|
|
969
|
-
export { BREAKPOINT_MAP, DEFAULT_ENTRIES, DEFAULT_FULLSCREEN, DEFAULT_GRID, DEFAULT_MASONRY, DEFAULT_SLIDER, type ElementStyle, Entries, type EntriesOptions, type FsCaptionPlacement, type FsIntroRequest, type FullscreenOptions, type GalleryApi, GalleryCore, GridLayoutRuntime, type GridOptions, type IndexMode,
|
|
1186
|
+
export { BREAKPOINT_MAP, DEFAULT_ENTRIES, DEFAULT_FULLSCREEN, DEFAULT_GRID, DEFAULT_MASONRY, DEFAULT_SLIDER, type ElementStyle, Entries, type EntriesOptions, type FsCaptionPlacement, type FsIntroRequest, type FullscreenOptions, type GalleryApi, GalleryCore, GridLayoutRuntime as Grid, type GridOptions, type IndexMode, Masonry, type MasonryOptions, type MediaEntryLink, type MediaItem, type PanAxisType, type ResponsiveHeightRule, type SlideOwner, Slider, type SliderHandle, type SliderOptions, Video, flattenEntries, toMediaItems, useFullscreenController };
|