@cntrl-site/components 1.0.43-alpha.3 → 1.0.43-alpha.4

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.
@@ -4,6 +4,7 @@ export type MarqueeItem = {
4
4
  image?: {
5
5
  url?: string;
6
6
  name?: string;
7
+ type?: 'image' | 'video';
7
8
  };
8
9
  link?: string;
9
10
  };
@@ -26,8 +26,8 @@ type SimpleButtonSettings = {
26
26
  alignA?: 'left' | 'center' | 'right';
27
27
  order?: 'text-icon' | 'icon-text';
28
28
  gap?: number;
29
- iconScale?: number;
30
29
  iconSize?: number;
30
+ iconWidthC?: number;
31
31
  iconColor?: string;
32
32
  dimensions?: boolean;
33
33
  padding?: Padding;
@@ -58,6 +58,8 @@ type SimpleButtonSettings = {
58
58
  stateOverrides?: Record<string, Partial<Record<ColorKeys, string>>>;
59
59
  minWidth?: number;
60
60
  minHeight?: number;
61
+ width?: number;
62
+ height?: number;
61
63
  };
62
64
  type ColorKeys = 'backgroundColor' | 'textColor' | 'borderColor' | 'iconColor' | 'boxShadowColor' | 'innerBoxShadowColor';
63
65
  type SimpleButtonProps = {
@@ -5,16 +5,6 @@ export declare const SimpleButtonComponent: {
5
5
  name: string;
6
6
  category: string;
7
7
  version: number;
8
- defaultSize: {
9
- d: {
10
- width: number;
11
- height: number;
12
- };
13
- m: {
14
- width: number;
15
- height: number;
16
- };
17
- };
18
8
  schema: {
19
9
  type: "object";
20
10
  version: 1;
@@ -88,7 +78,7 @@ export declare const SimpleButtonComponent: {
88
78
  min: number;
89
79
  max: number;
90
80
  };
91
- iconScale: {
81
+ iconSize: {
92
82
  type: "number";
93
83
  scope: "layout";
94
84
  title: string;
@@ -99,7 +89,7 @@ export declare const SimpleButtonComponent: {
99
89
  min: number;
100
90
  max: number;
101
91
  };
102
- iconSize: {
92
+ iconWidthC: {
103
93
  type: "number";
104
94
  scope: "layout";
105
95
  title: string;
@@ -157,6 +147,11 @@ export declare const SimpleButtonComponent: {
157
147
  type: "string";
158
148
  scope: "common";
159
149
  title: string;
150
+ titleByState: {
151
+ default: string;
152
+ hover: string;
153
+ active: string;
154
+ };
160
155
  display: {
161
156
  type: string;
162
157
  };
@@ -183,6 +178,11 @@ export declare const SimpleButtonComponent: {
183
178
  type: "string";
184
179
  scope: "common";
185
180
  title: string;
181
+ titleByState: {
182
+ default: string;
183
+ hover: string;
184
+ active: string;
185
+ };
186
186
  display: {
187
187
  type: string;
188
188
  };
@@ -201,6 +201,11 @@ export declare const SimpleButtonComponent: {
201
201
  type: "string";
202
202
  scope: "common";
203
203
  title: string;
204
+ titleByState: {
205
+ default: string;
206
+ hover: string;
207
+ active: string;
208
+ };
204
209
  display: {
205
210
  type: string;
206
211
  };
@@ -209,6 +214,11 @@ export declare const SimpleButtonComponent: {
209
214
  type: "string";
210
215
  scope: "common";
211
216
  title: string;
217
+ titleByState: {
218
+ default: string;
219
+ hover: string;
220
+ active: string;
221
+ };
212
222
  display: {
213
223
  type: string;
214
224
  };
@@ -217,6 +227,11 @@ export declare const SimpleButtonComponent: {
217
227
  type: "string";
218
228
  scope: "common";
219
229
  title: string;
230
+ titleByState: {
231
+ default: string;
232
+ hover: string;
233
+ active: string;
234
+ };
220
235
  display: {
221
236
  type: string;
222
237
  };
@@ -225,6 +240,11 @@ export declare const SimpleButtonComponent: {
225
240
  type: "string";
226
241
  scope: "common";
227
242
  title: string;
243
+ titleByState: {
244
+ default: string;
245
+ hover: string;
246
+ active: string;
247
+ };
228
248
  display: {
229
249
  type: string;
230
250
  };
@@ -326,6 +346,28 @@ export declare const SimpleButtonComponent: {
326
346
  min: number;
327
347
  max: number;
328
348
  };
349
+ width: {
350
+ type: "number";
351
+ scope: "layout";
352
+ title: string;
353
+ display: {
354
+ type: string;
355
+ visible: boolean;
356
+ };
357
+ min: number;
358
+ max: number;
359
+ };
360
+ height: {
361
+ type: "number";
362
+ scope: "layout";
363
+ title: string;
364
+ display: {
365
+ type: string;
366
+ visible: boolean;
367
+ };
368
+ min: number;
369
+ max: number;
370
+ };
329
371
  };
330
372
  defaults: {
331
373
  type: string;
@@ -335,8 +377,8 @@ export declare const SimpleButtonComponent: {
335
377
  alignA: string;
336
378
  order: string;
337
379
  gap: number;
338
- iconScale: number;
339
380
  iconSize: number;
381
+ iconWidthC: number;
340
382
  dimensions: boolean;
341
383
  padding: {
342
384
  top: number;
@@ -392,6 +434,8 @@ export declare const SimpleButtonComponent: {
392
434
  };
393
435
  minWidth: number;
394
436
  minHeight: number;
437
+ width: number;
438
+ height: number;
395
439
  };
396
440
  layoutDefaults: {
397
441
  m: {
@@ -404,7 +448,10 @@ export declare const SimpleButtonComponent: {
404
448
  };
405
449
  minWidth: number;
406
450
  minHeight: number;
451
+ width: number;
452
+ height: number;
407
453
  iconSize: number;
454
+ iconWidthC: number;
408
455
  fontSize: number;
409
456
  lineHeight: number;
410
457
  };
@@ -418,7 +465,10 @@ export declare const SimpleButtonComponent: {
418
465
  };
419
466
  minWidth: number;
420
467
  minHeight: number;
468
+ width: number;
469
+ height: number;
421
470
  iconSize: number;
471
+ iconWidthC: number;
422
472
  fontSize: number;
423
473
  lineHeight: number;
424
474
  };
@@ -432,7 +482,10 @@ export declare const SimpleButtonComponent: {
432
482
  };
433
483
  minWidth: number;
434
484
  minHeight: number;
485
+ width: number;
486
+ height: number;
435
487
  iconSize: number;
488
+ iconWidthC: number;
436
489
  fontSize: number;
437
490
  lineHeight: number;
438
491
  };
@@ -0,0 +1,47 @@
1
+ import { CommonComponentProps } from '../props';
2
+ import { TextStyles } from '../utils/textStylesToCss';
3
+ import { WaterfallLightboxSettings, WaterfallMedia } from './WaterfallLightbox';
4
+ export type WaterfallContentItem = {
5
+ title?: string;
6
+ subtitle?: string;
7
+ caption?: string;
8
+ image?: WaterfallMedia;
9
+ };
10
+ export type WaterfallSettings = {
11
+ wrapperWidth?: number;
12
+ imageDisplay?: {
13
+ display: 'fit' | 'cover';
14
+ ratioValue: '1:1' | '2:3' | '3:4' | '4:5' | '16:9';
15
+ reversed: boolean;
16
+ };
17
+ titleColor?: string;
18
+ titleFontFamily?: string;
19
+ titleFontSettings?: {
20
+ fontWeight: number;
21
+ fontStyle: string;
22
+ };
23
+ titleFontSize?: number;
24
+ titleLineHeight?: number;
25
+ titleLetterSpacing?: number;
26
+ titleWordSpacing?: number;
27
+ titleTextAppearance?: TextStyles['textAppearance'];
28
+ horizontalGap?: number;
29
+ imageHoverEffect?: {
30
+ sizeType: 'none' | 'scale' | 'saturate';
31
+ value: number;
32
+ min?: number;
33
+ max?: number;
34
+ };
35
+ lightbox?: 'on' | 'off';
36
+ } & WaterfallLightboxSettings;
37
+ type WaterfallProps = {
38
+ settings?: WaterfallSettings;
39
+ content?: WaterfallContentItem[];
40
+ isEditor?: boolean;
41
+ isPreviewMode?: boolean;
42
+ isEditMode?: boolean;
43
+ layoutId?: string;
44
+ portalId?: string;
45
+ } & CommonComponentProps;
46
+ export declare function Waterfall({ settings, content, isEditor, isPreviewMode, isEditMode, layoutId, portalId, }: WaterfallProps): import("react/jsx-runtime").JSX.Element;
47
+ export {};
@@ -0,0 +1,38 @@
1
+ import { Waterfall } from './Waterfall';
2
+ import { ComponentSchemaV1 } from '../../types/SchemaV1';
3
+ export declare const WaterfallComponent: {
4
+ element: typeof Waterfall;
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
+ titleFontSettings: string;
35
+ };
36
+ schema: ComponentSchemaV1;
37
+ sourceCode: string;
38
+ };
@@ -0,0 +1,52 @@
1
+ import { HiveLightboxTextEntry, HiveLightboxTitleSettings } from '../Hive/HiveLightboxTitles';
2
+ export type WaterfallMedia = {
3
+ url: string;
4
+ name?: string;
5
+ objectFit?: 'cover' | 'contain';
6
+ type?: 'image' | 'video';
7
+ };
8
+ export type WaterfallLightboxContentItem = {
9
+ title?: string;
10
+ subtitle?: string;
11
+ caption?: string;
12
+ image?: WaterfallMedia;
13
+ };
14
+ export type WaterfallLightboxSettings = HiveLightboxTitleSettings;
15
+ export type LightboxEntryData = {
16
+ gridIndex: number;
17
+ items: WaterfallMedia[];
18
+ entry: HiveLightboxTextEntry;
19
+ };
20
+ export type AnimRect = {
21
+ top: number;
22
+ left: number;
23
+ width: number;
24
+ height: number;
25
+ };
26
+ export declare function getLightboxCSS(P: string): string;
27
+ export declare function getMediaClickSourceRect(target: HTMLElement, objectFit: 'cover' | 'contain'): AnimRect;
28
+ export declare function getItemSourceRect(container: HTMLElement, gridIndex: number, objectFit: 'cover' | 'contain'): AnimRect | null;
29
+ export declare function buildLightboxEntries(content: WaterfallLightboxContentItem[]): LightboxEntryData[];
30
+ export declare function collectAllWaterfallMedia(content: WaterfallLightboxContentItem[]): WaterfallMedia[];
31
+ export declare function PreloadedMediaPool({ mediaList }: {
32
+ mediaList: WaterfallMedia[];
33
+ }): 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, }: {
35
+ prefix: string;
36
+ items: WaterfallMedia[];
37
+ index: number;
38
+ entry: HiveLightboxTextEntry;
39
+ settings: HiveLightboxTitleSettings;
40
+ isEditor?: boolean;
41
+ isEditMode?: boolean;
42
+ isPreviewMode?: boolean;
43
+ canNavigate: boolean;
44
+ lightboxEntries: LightboxEntryData[];
45
+ entryIdx: number;
46
+ layoutId?: string;
47
+ sourceRect?: AnimRect | null;
48
+ resolveCloseSourceRect?: () => AnimRect | null;
49
+ onClose: () => void;
50
+ onPrev: () => void;
51
+ onNext: () => void;
52
+ }): import("react/jsx-runtime").JSX.Element;