@cntrl-site/components 1.0.96 → 1.0.97-alpha.0

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.
@@ -1,12 +1,7 @@
1
1
  import { CommonComponentProps } from '../props';
2
- type HelixMedia = {
3
- url?: string;
4
- name?: string;
5
- type?: 'image' | 'video';
6
- };
7
- export type HelixContentItem = {
8
- image?: HelixMedia;
9
- };
2
+ import { HiveLightboxTitleSettings } from '../Hive/HiveLightboxTitles';
3
+ import { HelixLightboxContentItem } from './HelixLightbox';
4
+ export type HelixContentItem = HelixLightboxContentItem;
10
5
  export type HelixSettings = {
11
6
  width?: number;
12
7
  spread?: number;
@@ -27,13 +22,15 @@ export type HelixSettings = {
27
22
  ratioValue?: '1:1' | '2:3' | '3:4' | '4:5' | '16:9';
28
23
  reversed?: boolean;
29
24
  } | string;
30
- };
25
+ } & HiveLightboxTitleSettings;
31
26
  type HelixProps = {
32
27
  settings?: HelixSettings;
33
28
  content?: HelixContentItem[];
34
29
  isEditor?: boolean;
35
30
  isPreviewMode?: boolean;
36
31
  isEditMode?: boolean;
32
+ layoutId?: string;
33
+ portalId?: string;
37
34
  } & CommonComponentProps;
38
- export declare function Helix({ settings, content, isEditor, isPreviewMode, }: HelixProps): import("react/jsx-runtime").JSX.Element;
35
+ export declare function Helix({ settings, content, isEditor, isPreviewMode, isEditMode, layoutId, portalId, }: HelixProps): import("react/jsx-runtime").JSX.Element;
39
36
  export {};
@@ -28,6 +28,9 @@ export declare const HelixComponent: {
28
28
  };
29
29
  fontSettingsPaths: {
30
30
  content: never[];
31
- parameters: never[];
31
+ parameters: {
32
+ path: string;
33
+ }[];
32
34
  };
35
+ fontRelations: {};
33
36
  };
@@ -0,0 +1,27 @@
1
+ import { AnimRect, CloseTargetTracker, LightboxEntryData, WaterfallMedia } from '../Waterfall/WaterfallLightbox';
2
+ export type HelixMedia = WaterfallMedia;
3
+ export type HelixMediaPair = {
4
+ media: HelixMedia[];
5
+ };
6
+ export type HelixLightboxContentItem = {
7
+ title1?: string;
8
+ title2?: string;
9
+ title3?: string;
10
+ /** @deprecated use `gallery` */
11
+ image?: HelixMedia;
12
+ gallery?: HelixMediaPair[] | HelixMedia[];
13
+ };
14
+ type DisplayItem = {
15
+ displayMedia: HelixMedia;
16
+ lightboxMedia: HelixMedia | null;
17
+ };
18
+ declare function isVideoMedia(media: HelixMedia): boolean;
19
+ export declare function normalizeHelixGallery(item: HelixLightboxContentItem): HelixMediaPair[] | undefined;
20
+ export declare function getHelixDisplayItems(gallery: HelixMediaPair[] | HelixMedia[] | undefined): DisplayItem[];
21
+ export declare function getHelixContentItems(content: HelixLightboxContentItem[] | undefined): HelixLightboxContentItem[];
22
+ export declare function buildHelixLightboxEntries(content: HelixLightboxContentItem[]): LightboxEntryData[];
23
+ export declare function collectAllHelixMedia(content: HelixLightboxContentItem[]): HelixMedia[];
24
+ export declare function getHelixMediaClickSourceRect(target: HTMLElement, objectFit: 'cover' | 'contain'): AnimRect;
25
+ export declare function getHelixItemSourceRect(container: HTMLElement, contentIndex: number, objectFit: 'cover' | 'contain'): AnimRect | null;
26
+ export declare function createHelixCloseTracker(container: HTMLElement, contentIndex: number, objectFit: 'cover' | 'contain'): CloseTargetTracker | null;
27
+ export { isVideoMedia as isHelixVideoMedia };
@@ -23,6 +23,10 @@ export type AnimRect = {
23
23
  width: number;
24
24
  height: number;
25
25
  };
26
+ export type CloseTargetTracker = () => {
27
+ rect: AnimRect;
28
+ opacity: number;
29
+ } | null;
26
30
  export declare function getLightboxCSS(P: string): string;
27
31
  export declare function getMediaClickSourceRect(target: HTMLElement, objectFit: 'cover' | 'contain'): AnimRect;
28
32
  export declare function getItemSourceRect(container: HTMLElement, gridIndex: number, objectFit: 'cover' | 'contain'): AnimRect | null;
@@ -31,7 +35,7 @@ export declare function collectAllWaterfallMedia(content: WaterfallLightboxConte
31
35
  export declare function PreloadedMediaPool({ mediaList }: {
32
36
  mediaList: WaterfallMedia[];
33
37
  }): import("react/jsx-runtime").JSX.Element | null;
34
- export declare function Lightbox({ prefix: P, items, index, entry, settings, isEditor, isEditMode, isPreviewMode, canNavigate, lightboxEntries, entryIdx, layoutId, sourceRect, resolveCloseSourceRect, onClose, onPrev, onNext, }: {
38
+ export declare function Lightbox({ prefix: P, items, index, entry, settings, isEditor, isEditMode, isPreviewMode, canNavigate, lightboxEntries, entryIdx, layoutId, sourceRect, resolveCloseSourceRect, createCloseTracker, onClose, onPrev, onNext, }: {
35
39
  prefix: string;
36
40
  items: WaterfallMedia[];
37
41
  index: number;
@@ -46,6 +50,7 @@ export declare function Lightbox({ prefix: P, items, index, entry, settings, isE
46
50
  layoutId?: string;
47
51
  sourceRect?: AnimRect | null;
48
52
  resolveCloseSourceRect?: () => AnimRect | null;
53
+ createCloseTracker?: () => CloseTargetTracker | null;
49
54
  onClose: () => void;
50
55
  onPrev: () => void;
51
56
  onNext: () => void;