@page-speed/lightbox 0.0.1
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/README.md +244 -0
- package/dist/__mocks__/styleMock.d.ts +4 -0
- package/dist/components/Layouts/HorizontalLayout.d.ts +16 -0
- package/dist/components/Lightbox.d.ts +10 -0
- package/dist/components/LightboxChrome.d.ts +21 -0
- package/dist/components/LightboxContent.d.ts +13 -0
- package/dist/components/LightboxOverlay.d.ts +12 -0
- package/dist/components/index.css +99 -0
- package/dist/components/index.d.ts +5 -0
- package/dist/components/index.js +21964 -0
- package/dist/core/index.d.ts +2 -0
- package/dist/core/index.js +2033 -0
- package/dist/hooks/index.d.ts +5 -0
- package/dist/hooks/index.js +2079 -0
- package/dist/hooks/useGalleryState.d.ts +14 -0
- package/dist/hooks/useKeyboardShortcuts.d.ts +1 -0
- package/dist/hooks/useLightbox.d.ts +20 -0
- package/dist/hooks/useLightboxState.d.ts +9 -0
- package/dist/hooks/useResponsiveness.d.ts +7 -0
- package/dist/index.cjs +22043 -0
- package/dist/index.css +99 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.js +22043 -0
- package/dist/renderers/ComponentRenderer.d.ts +9 -0
- package/dist/renderers/ImageRenderer.d.ts +14 -0
- package/dist/renderers/PDFRenderer.d.ts +11 -0
- package/dist/renderers/VideoRenderer.d.ts +13 -0
- package/dist/renderers/index.css +99 -0
- package/dist/renderers/index.d.ts +4 -0
- package/dist/renderers/index.js +21620 -0
- package/dist/types.d.ts +62 -0
- package/package.json +84 -0
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { LightboxItem } from "../types";
|
|
2
|
+
export declare function useGalleryState({ items, initialIndex, onSelect, }: {
|
|
3
|
+
items: LightboxItem[];
|
|
4
|
+
initialIndex?: number;
|
|
5
|
+
onSelect?: (index: number) => void;
|
|
6
|
+
}): {
|
|
7
|
+
currentIndex: number;
|
|
8
|
+
currentItem: LightboxItem;
|
|
9
|
+
goToIndex: (index: number) => void;
|
|
10
|
+
next: () => void;
|
|
11
|
+
prev: () => void;
|
|
12
|
+
canNext: boolean;
|
|
13
|
+
canPrev: boolean;
|
|
14
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function useKeyboardShortcuts(shortcuts: Record<string, (e?: KeyboardEvent) => void>, enabled?: boolean): void;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { LightboxProps } from "../types";
|
|
2
|
+
/**
|
|
3
|
+
* Main hook for controlling lightbox state and behavior
|
|
4
|
+
*
|
|
5
|
+
* @param props - Partial lightbox configuration
|
|
6
|
+
* @returns Lightbox API with state and control methods
|
|
7
|
+
*/
|
|
8
|
+
export declare function useLightbox(props?: Partial<LightboxProps>): {
|
|
9
|
+
items: import("..").LightboxItem[];
|
|
10
|
+
currentIndex: number;
|
|
11
|
+
currentItem: import("..").LightboxItem;
|
|
12
|
+
isOpen: boolean;
|
|
13
|
+
canNext: boolean;
|
|
14
|
+
canPrev: boolean;
|
|
15
|
+
next: () => void;
|
|
16
|
+
prev: () => void;
|
|
17
|
+
goTo: (index: number) => void;
|
|
18
|
+
open: () => void;
|
|
19
|
+
close: () => void;
|
|
20
|
+
};
|