@cntrl-site/components 1.0.38 → 1.0.39-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.
@@ -0,0 +1,46 @@
1
+ import { CommonComponentProps } from '../props';
2
+ import { HiveLightboxTitleSettings } from './HiveLightboxTitles';
3
+ type GridLayoutConfig = {
4
+ entryWidth: number;
5
+ horizontalGap: number;
6
+ wrapperWidth: number;
7
+ columnsCount: number;
8
+ lockedParam?: 'wrapperWidth' | 'entryWidth' | 'horizontalGap' | null;
9
+ };
10
+ type HiveSettings = {
11
+ gridLayout: GridLayoutConfig;
12
+ verticalGap: number;
13
+ align?: 'top' | 'center' | 'bottom';
14
+ imageDisplay: {
15
+ display: 'fit' | 'cover';
16
+ ratioValue: '1:1' | '2:3' | '3:4' | '4:5' | '16:9';
17
+ reversed: boolean;
18
+ };
19
+ } & HiveLightboxTitleSettings;
20
+ type HiveMedia = {
21
+ url: string;
22
+ name?: string;
23
+ objectFit?: 'cover' | 'contain';
24
+ type?: 'image' | 'video';
25
+ };
26
+ type HiveMediaPair = {
27
+ media: HiveMedia[];
28
+ };
29
+ type HiveContentItem = {
30
+ title1?: string;
31
+ title2?: string;
32
+ title3?: string;
33
+ gallery?: HiveMediaPair[];
34
+ };
35
+ type HiveProps = {
36
+ settings: HiveSettings;
37
+ content?: HiveContentItem[];
38
+ isEditor?: boolean;
39
+ isPreviewMode?: boolean;
40
+ isEditMode?: boolean;
41
+ activeEvent?: string;
42
+ layoutId?: string;
43
+ portalId?: string;
44
+ } & CommonComponentProps;
45
+ export declare function Hive({ settings, content, isEditor, isPreviewMode, isEditMode, layoutId, portalId, }: HiveProps): import("react/jsx-runtime").JSX.Element;
46
+ export {};
@@ -0,0 +1,36 @@
1
+ import { Hive } from './Hive';
2
+ import { ComponentSchemaV1 } from '../../types/SchemaV1';
3
+ export declare const HiveComponent: {
4
+ element: typeof Hive;
5
+ id: string;
6
+ name: string;
7
+ category: string;
8
+ layoutMode: "structured";
9
+ preview: {
10
+ type: "image";
11
+ url: string;
12
+ };
13
+ version: number;
14
+ defaultSize: {
15
+ d: {
16
+ width: number;
17
+ height: number;
18
+ };
19
+ };
20
+ assetsPaths: {
21
+ content: {
22
+ path: string;
23
+ placeholderEnabled: boolean;
24
+ }[];
25
+ parameters: never[];
26
+ };
27
+ fontSettingsPaths: {
28
+ content: never[];
29
+ parameters: {
30
+ path: string;
31
+ }[];
32
+ };
33
+ fontRelations: {};
34
+ schema: ComponentSchemaV1;
35
+ sourceCode: string;
36
+ };
@@ -0,0 +1,35 @@
1
+ export type HiveLightboxTextEntry = {
2
+ title1: string;
3
+ title2: string;
4
+ title3: string;
5
+ };
6
+ export type HiveLightboxTitleSettings = {
7
+ title1Width?: number;
8
+ title2Width?: number;
9
+ title3Width?: number;
10
+ title1MarginLeft?: number;
11
+ title2MarginLeft?: number;
12
+ title3MarginLeft?: number;
13
+ titleRowMarginBottom?: number;
14
+ titleHeaderLayout?: 'desktop' | 'mobile';
15
+ contentMarginTop?: number;
16
+ iconMarginRight?: number;
17
+ closeIcon?: string | null;
18
+ closeIconMaxWidth?: number;
19
+ closeIconColor?: string;
20
+ closeIconHoverColor?: string;
21
+ title1Color: string;
22
+ title2Color: string;
23
+ title3Color: string;
24
+ } & Record<string, unknown>;
25
+ type HiveLightboxTitlesProps = {
26
+ prefix: string;
27
+ entry: HiveLightboxTextEntry;
28
+ settings: HiveLightboxTitleSettings;
29
+ isEditor?: boolean;
30
+ isEditMode?: boolean;
31
+ isPreviewMode?: boolean;
32
+ onClose?: () => void;
33
+ };
34
+ export declare function HiveLightboxTitles({ prefix: P, entry, settings, isEditor, isEditMode, isPreviewMode, onClose, }: HiveLightboxTitlesProps): import("react/jsx-runtime").JSX.Element | null;
35
+ export {};
@@ -12,6 +12,7 @@ type JournalEntry = {
12
12
  title3: string;
13
13
  image: JournalImage[];
14
14
  };
15
+ export type JournalTitleEntry = Pick<JournalEntry, 'title1' | 'title2' | 'title3'>;
15
16
  type JournalSettings = {
16
17
  title1Color: string;
17
18
  title2Color: string;
@@ -34,7 +35,7 @@ export declare const getGapControlSize: (gap: string) => string;
34
35
  export declare const getEntryImages: (entry: JournalEntry | undefined) => JournalImage[];
35
36
  export declare const buildJournalSlides: (entries: JournalEntry[], journalType: "A" | "B") => JournalSlide[];
36
37
  export declare const formatSlideCounter: (slides: JournalSlide[], activeSlideIndex: number, journalType: "A" | "B", entries: JournalEntry[]) => string;
37
- export declare const getEntryTitleKey: (entry: JournalEntry | undefined) => string;
38
+ export declare const getEntryTitleKey: (entry: JournalTitleEntry | undefined) => string;
38
39
  export declare const shouldShowCounter: (journalType: "A" | "B", slides: JournalSlide[], entries: JournalEntry[]) => boolean;
39
40
  type JournalTitleWidthKey = 'title1Width' | 'title2Width' | 'title3Width';
40
41
  export declare const TITLE_RESIZE_HANDLE_WIDTH = 0.004;
@@ -48,7 +49,7 @@ export type JournalTitleSlot = {
48
49
  style: CSSProperties;
49
50
  text: string;
50
51
  };
51
- export declare const buildJournalTitleSlots: (prefix: string, entry: JournalEntry, title1Style: CSSProperties, title2Style: CSSProperties, title3Style: CSSProperties) => JournalTitleSlot[];
52
+ export declare const buildJournalTitleSlots: (prefix: string, entry: JournalTitleEntry, title1Style: CSSProperties, title2Style: CSSProperties, title3Style: CSSProperties) => JournalTitleSlot[];
52
53
  export declare const resolveJournalTitleWidths: (count: number, storedWidths: number[]) => number[];
53
54
  export declare const getEffectiveJournalTitleWidths: (count: number, storedWidths: number[]) => number[];
54
55
  export declare const getJournalTitleMaxWidth: (columnIndex: number, resolvedWidths: number[]) => number;