@cntrl-site/components 1.0.12-alpha.3 → 1.0.12-alpha.30

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.
Files changed (29) hide show
  1. package/LICENSE +21 -21
  2. package/README.md +2 -2
  3. package/dist/Components/Form/Form.d.ts +3 -1
  4. package/dist/Components/Form/FormComponent.d.ts +5 -17
  5. package/dist/Components/Grid/Grid.d.ts +24 -7
  6. package/dist/Components/Lightbox/Lightbox.d.ts +2 -1
  7. package/dist/Components/LightboxJournal/LightboxJournal.d.ts +104 -0
  8. package/dist/Components/LightboxJournal/LightboxJournalComponent.d.ts +44 -0
  9. package/dist/Components/LightboxStrip/LightboxStrip.d.ts +115 -0
  10. package/dist/Components/LightboxStrip/LightboxStripComponent.d.ts +44 -0
  11. package/dist/Components/List/List.d.ts +27 -17
  12. package/dist/Components/List/ListComponent.d.ts +2 -1
  13. package/dist/Components/Marquee/Marquee.d.ts +8 -3
  14. package/dist/Components/Marquee/MarqueeComponent.d.ts +2 -1
  15. package/dist/Components/OnelinerForm/OnelinerForm.d.ts +2 -1
  16. package/dist/Components/OnelinerForm/OnelinerFormComponent.d.ts +2 -1
  17. package/dist/Components/TestimonialGrid/TestimonialGrid.d.ts +2 -2
  18. package/dist/Components/TestimonialGrid/TestimonialGridComponent.d.ts +2 -2
  19. package/dist/Components/TestimonialSingle/TestimonialSingle.d.ts +3 -3
  20. package/dist/Components/TestimonialSingle/TestimonialSingleComponent.d.ts +3 -3
  21. package/dist/Components/utils/imageFitStyles.d.ts +7 -0
  22. package/dist/Components/utils/textStylesToCss.d.ts +1 -0
  23. package/dist/index.d.ts +2 -2
  24. package/dist/index.js +11224 -6219
  25. package/dist/index.mjs +18910 -10667
  26. package/dist/types/Component.d.ts +8 -4
  27. package/dist/types/SchemaV1.d.ts +6 -1
  28. package/package.json +85 -85
  29. package/dist/Components/utils/getMainFontBaseOnSystem.d.ts +0 -1
@@ -1,5 +1,11 @@
1
1
  import { default as React } from 'react';
2
2
  import { ComponentSchemaV1 } from './SchemaV1';
3
+ export type Breakpoint = 'd' | 't' | 'm';
4
+ export type ComponentSize = {
5
+ width?: number | string;
6
+ height?: number | string;
7
+ };
8
+ export type ComponentDefaultSize = Partial<Record<Breakpoint, ComponentSize>>;
3
9
  export type Component = {
4
10
  element: (props: any) => React.ReactElement;
5
11
  id: string;
@@ -7,10 +13,7 @@ export type Component = {
7
13
  category?: string;
8
14
  version?: number;
9
15
  layoutMode?: 'freeform' | 'structured';
10
- defaultSize?: Record<string, {
11
- width?: number | string;
12
- height?: number | string;
13
- }>;
16
+ defaultSize?: ComponentDefaultSize;
14
17
  schema: any;
15
18
  preview?: {
16
19
  type: 'image' | 'video';
@@ -25,6 +28,7 @@ export type Component = {
25
28
  content: Path[];
26
29
  parameters: Path[];
27
30
  };
31
+ normalizeLayoutSettingsUpdate?: (nextSettings: Record<string, any>, prevSettings: Record<string, any>, options?: any) => Record<string, any>;
28
32
  };
29
33
  type Path = {
30
34
  path: string;
@@ -40,7 +40,12 @@ export type LayoutPaletteBookmark = {
40
40
  type: 'palette-bookmark';
41
41
  items: string[];
42
42
  };
43
- export type LayoutItem = string | LayoutRow | LayoutGroup | LayoutSwitcher | LayoutPaletteBookmark;
43
+ export type LayoutTab = {
44
+ type: 'tab';
45
+ id?: string;
46
+ tabs: Record<string, LayoutItem[]>;
47
+ };
48
+ export type LayoutItem = string | LayoutRow | LayoutGroup | LayoutSwitcher | LayoutPaletteBookmark | LayoutTab;
44
49
  export type SchemaDisplayRule = {
45
50
  if: {
46
51
  name: string;
package/package.json CHANGED
@@ -1,85 +1,85 @@
1
- {
2
- "name": "@cntrl-site/components",
3
- "version": "1.0.12-alpha.3",
4
- "description": "Custom components for control editor and public websites.",
5
- "main": "dist/index.js",
6
- "module": "dist/index.mjs",
7
- "types": "dist/index.d.ts",
8
- "style": "dist/components.css",
9
- "sideEffects": [
10
- "**/*.css"
11
- ],
12
- "exports": {
13
- ".": {
14
- "types": "./dist/index.d.ts",
15
- "import": "./dist/index.mjs",
16
- "require": "./dist/index.js"
17
- },
18
- "./utils": {
19
- "types": "./dist/Components/utils/index.d.ts",
20
- "import": "./dist/utils.mjs",
21
- "require": "./dist/utils.js"
22
- },
23
- "./style/components.css": {
24
- "default": "./dist/components.css"
25
- }
26
- },
27
- "typesVersions": {
28
- "*": {
29
- "utils": [
30
- "./dist/Components/utils/index.d.ts"
31
- ]
32
- }
33
- },
34
- "scripts": {
35
- "test": "jest",
36
- "dev": "vite development",
37
- "prebuild": "rimraf ./dist",
38
- "build": "vite build",
39
- "build:watch": "vite build --watch",
40
- "prepublishOnly": "cross-env NODE_ENV=production npm run build"
41
- },
42
- "files": [
43
- "dist",
44
- "resources"
45
- ],
46
- "repository": {
47
- "type": "git",
48
- "url": "git+https://github.com/cntrl-site/components.git"
49
- },
50
- "author": "arsen@momdesign.nyc",
51
- "license": "MIT",
52
- "bugs": {
53
- "url": "https://github.com/cntrl-site/components/issues"
54
- },
55
- "homepage": "https://github.com/cntrl-site/components#readme",
56
- "directories": {
57
- "lib": "dist"
58
- },
59
- "dependencies": {
60
- "classnames": "^2.5.1"
61
- },
62
- "peerDependencies": {
63
- "react": "^18.0.0",
64
- "react-dom": "^18.0.0"
65
- },
66
- "devDependencies": {
67
- "@antfu/eslint-config": "^3.16.0",
68
- "@splidejs/react-splide": "^0.7.12",
69
- "ts-node": "^10.9.1",
70
- "@tsconfig/node16": "^1.0.3",
71
- "@tsconfig/recommended": "^1.0.1",
72
- "@types/node": "^18.11.7",
73
- "@types/react": "^18.2.0",
74
- "@types/react-dom": "^18.2.0",
75
- "@vitejs/plugin-react": "^4.3.4",
76
- "cross-env": "^10.1.0",
77
- "react": "^18.2.0",
78
- "react-dom": "^18.2.0",
79
- "rimraf": "^6.0.1",
80
- "sass": "^1.86.3",
81
- "typescript": "^5.2.2",
82
- "vite": "^6.2.5",
83
- "vite-plugin-dts": "^4.5.3"
84
- }
85
- }
1
+ {
2
+ "name": "@cntrl-site/components",
3
+ "version": "1.0.12-alpha.30",
4
+ "description": "Custom components for control editor and public websites.",
5
+ "main": "dist/index.js",
6
+ "module": "dist/index.mjs",
7
+ "types": "dist/index.d.ts",
8
+ "style": "dist/components.css",
9
+ "sideEffects": [
10
+ "**/*.css"
11
+ ],
12
+ "exports": {
13
+ ".": {
14
+ "types": "./dist/index.d.ts",
15
+ "import": "./dist/index.mjs",
16
+ "require": "./dist/index.js"
17
+ },
18
+ "./utils": {
19
+ "types": "./dist/Components/utils/index.d.ts",
20
+ "import": "./dist/utils.mjs",
21
+ "require": "./dist/utils.js"
22
+ },
23
+ "./style/components.css": {
24
+ "default": "./dist/components.css"
25
+ }
26
+ },
27
+ "typesVersions": {
28
+ "*": {
29
+ "utils": [
30
+ "./dist/Components/utils/index.d.ts"
31
+ ]
32
+ }
33
+ },
34
+ "scripts": {
35
+ "test": "jest",
36
+ "dev": "vite development",
37
+ "prebuild": "rimraf ./dist",
38
+ "build": "vite build",
39
+ "build:watch": "vite build --watch",
40
+ "prepublishOnly": "cross-env NODE_ENV=production npm run build"
41
+ },
42
+ "files": [
43
+ "dist",
44
+ "resources"
45
+ ],
46
+ "repository": {
47
+ "type": "git",
48
+ "url": "git+https://github.com/cntrl-site/components.git"
49
+ },
50
+ "author": "arsen@momdesign.nyc",
51
+ "license": "MIT",
52
+ "bugs": {
53
+ "url": "https://github.com/cntrl-site/components/issues"
54
+ },
55
+ "homepage": "https://github.com/cntrl-site/components#readme",
56
+ "directories": {
57
+ "lib": "dist"
58
+ },
59
+ "dependencies": {
60
+ "classnames": "^2.5.1"
61
+ },
62
+ "peerDependencies": {
63
+ "react": "^18.0.0",
64
+ "react-dom": "^18.0.0"
65
+ },
66
+ "devDependencies": {
67
+ "@antfu/eslint-config": "^3.16.0",
68
+ "@splidejs/react-splide": "^0.7.12",
69
+ "ts-node": "^10.9.1",
70
+ "@tsconfig/node16": "^1.0.3",
71
+ "@tsconfig/recommended": "^1.0.1",
72
+ "@types/node": "^18.11.7",
73
+ "@types/react": "^18.2.0",
74
+ "@types/react-dom": "^18.2.0",
75
+ "@vitejs/plugin-react": "^4.3.4",
76
+ "cross-env": "^10.1.0",
77
+ "react": "^18.2.0",
78
+ "react-dom": "^18.2.0",
79
+ "rimraf": "^6.0.1",
80
+ "sass": "^1.86.3",
81
+ "typescript": "^5.2.2",
82
+ "vite": "^6.2.5",
83
+ "vite-plugin-dts": "^4.5.3"
84
+ }
85
+ }
@@ -1 +0,0 @@
1
- export declare function getFontBasedOnSystem(): string;