@page-speed/lightbox 0.2.0 → 0.2.2

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/types.d.ts CHANGED
@@ -1,5 +1,8 @@
1
1
  import type { OptixFlowConfig as ImgOptixFlowConfig } from "@page-speed/img";
2
- export type LightboxLayoutType = "horizontal" | "vertical-split" | "custom-slide" | "fullscreen" | "inline";
2
+ export type LightboxLayoutType = "horizontal" | "horizontal-showcase" | "vertical-split" | "vertical-peek" | "custom-slide" | "fullscreen" | "inline";
3
+ export type LightboxChromeVariant = "toolbar" | "floating";
4
+ export type LightboxThumbnailsPosition = "bottom" | "sidebar" | "none";
5
+ export type LightboxThumbnailsVariant = "strip" | "grid";
3
6
  export type LightboxItemType = "image" | "video" | "pdf" | "component";
4
7
  export interface LightboxDownload {
5
8
  enabled?: boolean;
@@ -56,6 +59,12 @@ export interface LightboxControls {
56
59
  fullscreen?: boolean;
57
60
  closeButton?: boolean;
58
61
  }
62
+ export interface LightboxThumbnailsConfig {
63
+ position?: LightboxThumbnailsPosition;
64
+ variant?: LightboxThumbnailsVariant;
65
+ size?: "sm" | "md" | "lg";
66
+ showOnMobile?: boolean;
67
+ }
59
68
  export interface LightboxProps {
60
69
  items: LightboxItem[];
61
70
  initialIndex?: number;
@@ -70,6 +79,30 @@ export interface LightboxProps {
70
79
  * the underlying @page-speed/img <Img /> component.
71
80
  */
72
81
  optixFlowConfig?: LightboxOptixFlowConfig;
82
+ /**
83
+ * Custom sidebar content for vertical-split layout.
84
+ * Renders in the right sidebar area alongside the main content.
85
+ */
86
+ sidebar?: React.ReactNode;
87
+ /**
88
+ * Custom footer content for layouts that support it.
89
+ * Renders below the main content area (e.g., info cards, metadata).
90
+ */
91
+ footer?: React.ReactNode;
92
+ /**
93
+ * Chrome UI variant: "toolbar" for traditional bottom bar,
94
+ * "floating" for floating buttons around the viewport.
95
+ */
96
+ chromeVariant?: LightboxChromeVariant;
97
+ /**
98
+ * Thumbnails configuration for gallery navigation.
99
+ */
100
+ thumbnails?: LightboxThumbnailsConfig;
101
+ /**
102
+ * Enable smooth CSS animations for slide transitions.
103
+ * Respects prefers-reduced-motion automatically.
104
+ */
105
+ enableAnimations?: boolean;
73
106
  onOpen?: () => void;
74
107
  onClose?: () => void;
75
108
  onSelect?: (index: number) => void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@page-speed/lightbox",
3
- "version": "0.2.0",
3
+ "version": "0.2.2",
4
4
  "description": "High-performance, feature-rich lightbox for OpenSite platform",
5
5
  "main": "dist/index.cjs",
6
6
  "module": "dist/index.js",
@@ -80,7 +80,7 @@
80
80
  },
81
81
  "dependencies": {
82
82
  "@page-speed/img": "^0.4.3",
83
- "@page-speed/pdf-viewer": "0.1.8",
83
+ "@page-speed/pdf-viewer": "^0.1.9",
84
84
  "clsx": "^2.1.1",
85
85
  "tailwind-merge": "^3.4.0"
86
86
  }