@cntrl-site/components 1.0.11-alpha.1 → 1.0.11-alpha.10

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,7 +4,7 @@ export type SchemaDisplay = {
4
4
  [key: string]: unknown;
5
5
  };
6
6
  export type SchemaProperty = {
7
- type: 'string' | 'number' | 'boolean' | 'object' | 'array' | 'fields' | readonly ['string', 'null'] | 'grid-layout';
7
+ type: 'string' | 'number' | 'boolean' | 'object' | 'array' | 'fields' | readonly ['string', 'null'];
8
8
  scope?: PropertyScope;
9
9
  title?: string;
10
10
  message?: string;
@@ -15,7 +15,6 @@ export type SchemaProperty = {
15
15
  properties?: Record<string, SchemaProperty>;
16
16
  layout?: LayoutItem[];
17
17
  items?: SchemaProperty;
18
- gridParams?: SchemaProperty;
19
18
  default?: unknown;
20
19
  min?: number;
21
20
  max?: number;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cntrl-site/components",
3
- "version": "1.0.11-alpha.1",
3
+ "version": "1.0.11-alpha.10",
4
4
  "description": "Custom components for control editor and public websites.",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
@@ -1,61 +0,0 @@
1
- import { CommonComponentProps } from '../props';
2
- import { TextStyles } from '../utils/textStylesToCss';
3
- type GridProps = {
4
- layoutId?: string;
5
- settings: GridSettings;
6
- content?: any;
7
- isEditor?: boolean;
8
- isPreviewMode?: boolean;
9
- activeEvent: string | undefined;
10
- onUpdateSettings?: (settings: GridSettings) => void;
11
- } & CommonComponentProps;
12
- export declare function Grid({ settings, content, isEditor, isPreviewMode, metadata, activeEvent, layoutId }: GridProps): import("react/jsx-runtime").JSX.Element;
13
- type GridLayoutConfig = {
14
- entryWidth: number;
15
- horizontalGap: number;
16
- wrapperWidth: number;
17
- columnsCount: number;
18
- lockedParam?: 'wrapperWidth' | 'entryWidth' | 'horizontalGap' | null;
19
- };
20
- type GridSettings = {
21
- type: 'A' | 'B';
22
- gridLayout: GridLayoutConfig;
23
- textBoxWidth: number;
24
- verticalGap: number;
25
- entriesCount: number;
26
- lightbox: 'On' | 'Off';
27
- imageDisplay: {
28
- display: 'Fit' | 'Cover';
29
- ratioValue: '1:1' | '2:3' | '3:4' | '4:5' | '16:9';
30
- reversed: boolean;
31
- };
32
- slider: 'On' | 'Off';
33
- sliderTiming: number;
34
- direction: 'Horizontal' | 'Vertical' | 'Random';
35
- transition: 'Fade' | 'Slide';
36
- titleMarginTop: number;
37
- subtitleMarginTop: number;
38
- titleColor: string;
39
- subtitleColor: string;
40
- titleFontFamily: string;
41
- titleFontSettings?: {
42
- fontWeight: number;
43
- fontStyle: string;
44
- };
45
- titleFontSize?: number;
46
- titleLineHeight?: number;
47
- titleLetterSpacing?: number;
48
- titleWordSpacing?: number;
49
- titleTextAppearance?: TextStyles['textAppearance'];
50
- subtitleFontFamily: string;
51
- subtitleFontSettings?: {
52
- fontWeight: number;
53
- fontStyle: string;
54
- };
55
- subtitleFontSize?: number;
56
- subtitleLineHeight?: number;
57
- subtitleLetterSpacing?: number;
58
- subtitleWordSpacing?: number;
59
- subtitleTextAppearance?: TextStyles['textAppearance'];
60
- };
61
- export {};
@@ -1,39 +0,0 @@
1
- import { Grid } from './Grid';
2
- import { ComponentSchemaV1 } from '../../types/SchemaV1';
3
- type GridSchema = ComponentSchemaV1 & {
4
- properties: {
5
- content: {
6
- type: 'array';
7
- settings?: {
8
- addItemFromFileExplorer?: boolean;
9
- };
10
- items: any;
11
- default: any[];
12
- };
13
- };
14
- };
15
- export declare const GridComponent: {
16
- element: typeof Grid;
17
- id: string;
18
- name: string;
19
- category: string;
20
- preview: {
21
- type: "image";
22
- url: string;
23
- };
24
- version: number;
25
- defaultSize: {
26
- width: number;
27
- height: number;
28
- };
29
- assetsPaths: {
30
- content: {
31
- path: string;
32
- placeholderEnabled: boolean;
33
- }[];
34
- parameters: never[];
35
- };
36
- schema: GridSchema;
37
- sourceCode: string;
38
- };
39
- export {};
@@ -1,61 +0,0 @@
1
- import { CommonComponentProps } from '../props';
2
- import { TextStyles } from '../utils/textStylesToCss';
3
- type ListContentItem = {
4
- firstColumn?: string;
5
- secondColumn?: string;
6
- thirdColumn?: string;
7
- fourthColumn?: string;
8
- fifthColumn?: string;
9
- image?: {
10
- objectFit?: 'cover' | 'contain';
11
- url: string;
12
- name: string;
13
- };
14
- link?: string;
15
- };
16
- type ListProps = {
17
- layoutId?: string;
18
- settings: ListSettings;
19
- content?: ListContentItem[];
20
- isEditor?: boolean;
21
- isPreviewMode?: boolean;
22
- activeEvent: string | undefined;
23
- onUpdateSettings?: (settings: ListSettings) => void;
24
- } & CommonComponentProps;
25
- export declare function List({ settings, content, isEditor, isPreviewMode, metadata, activeEvent, layoutId }: ListProps): import("react/jsx-runtime").JSX.Element;
26
- type ListSettings = {
27
- columns: number;
28
- wrapperWidth: number;
29
- entriesCount: number;
30
- cellMinHeight: number;
31
- imageOnHover: 'On' | 'Off';
32
- imageSize?: {
33
- min: number;
34
- max: number;
35
- };
36
- dividerWidth: number;
37
- cut: number;
38
- entryHoverEffect: 'None' | 'Default' | 'Blinds';
39
- firstColumnWidth: number;
40
- secondColumnWidth: number;
41
- thirdColumnWidth: number;
42
- fourthColumnWidth: number;
43
- fifthColumnWidth: number;
44
- textColor: string;
45
- textFontFamily: string;
46
- textFontSettings?: {
47
- fontWeight: number;
48
- fontStyle: string;
49
- };
50
- textFontSize?: number;
51
- textLineHeight?: number;
52
- textLetterSpacing?: number;
53
- textWordSpacing?: number;
54
- textTextAppearance?: TextStyles['textAppearance'];
55
- backgroundColor: string;
56
- dividerColor: string;
57
- textHoverColor: string;
58
- backgroundHoverColor: string;
59
- dividerHoverColor: string;
60
- };
61
- export {};
@@ -1,39 +0,0 @@
1
- import { List } from './List';
2
- import { ComponentSchemaV1 } from '../../types/SchemaV1';
3
- type GridSchema = ComponentSchemaV1 & {
4
- properties: {
5
- content: {
6
- type: 'array';
7
- settings?: {
8
- addItemFromFileExplorer?: boolean;
9
- };
10
- items: any;
11
- default: any[];
12
- };
13
- };
14
- };
15
- export declare const ListComponent: {
16
- element: typeof List;
17
- id: string;
18
- name: string;
19
- category: string;
20
- preview: {
21
- type: "image";
22
- url: string;
23
- };
24
- version: number;
25
- defaultSize: {
26
- width: number;
27
- height: number;
28
- };
29
- assetsPaths: {
30
- content: {
31
- path: string;
32
- placeholderEnabled: boolean;
33
- }[];
34
- parameters: never[];
35
- };
36
- schema: GridSchema;
37
- sourceCode: string;
38
- };
39
- export {};
@@ -1 +0,0 @@
1
- export declare function getFontBasedOnSystem(): string;
@@ -1,24 +0,0 @@
1
- export type TextElementStyles = {
2
- fontSettings: {
3
- fontFamily: string;
4
- fontWeight: number;
5
- fontStyle: string;
6
- };
7
- widthSettings: {
8
- width: number;
9
- sizing: 'auto' | 'manual';
10
- };
11
- letterSpacing: number;
12
- textAlign: 'left' | 'center' | 'right';
13
- wordSpacing: number;
14
- fontSizeLineHeight: {
15
- fontSize: number;
16
- lineHeight: number;
17
- };
18
- textAppearance: {
19
- textTransform: 'none' | 'uppercase' | 'lowercase';
20
- textDecoration: 'none' | 'underline';
21
- fontVariant: 'normal' | 'small-caps';
22
- };
23
- color: string;
24
- };