@cntrl-site/components 0.0.2 → 0.0.4-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.
package/LICENSE CHANGED
@@ -1,21 +1,21 @@
1
- MIT License
2
-
3
- Copyright (c) 2025 GX Platform
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
1
+ MIT License
2
+
3
+ Copyright (c) 2025 GX Platform
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,3 +1,3 @@
1
- # Control Components
2
-
1
+ # Control Components
2
+
3
3
  This is custom components for control editor and public websites.
@@ -4,7 +4,7 @@ interface SliderProps {
4
4
  styles: SliderStyles;
5
5
  isEditor?: boolean;
6
6
  }
7
- export declare function ControlSlider({ settings, content, styles: sliderStyles, isEditor }: SliderProps): JSX.Element;
7
+ export declare function ControlSlider({ settings, content, styles: sliderStyles, isEditor }: SliderProps): import("react/jsx-runtime").JSX.Element;
8
8
  type SliderItem = {
9
9
  image: {
10
10
  url: string;
@@ -328,6 +328,9 @@ export declare const ControlSliderComponent: {
328
328
  content: {
329
329
  layoutBased: boolean;
330
330
  type: string;
331
+ settings: {
332
+ addItemFromFileExplorer: boolean;
333
+ };
331
334
  items: {
332
335
  type: string;
333
336
  properties: {
@@ -335,6 +338,10 @@ export declare const ControlSliderComponent: {
335
338
  type: string;
336
339
  display: {
337
340
  type: string;
341
+ label: string;
342
+ minWidth: number;
343
+ defaultWidth: number;
344
+ maxWidth: number;
338
345
  };
339
346
  properties: {
340
347
  url: {
@@ -353,19 +360,11 @@ export declare const ControlSliderComponent: {
353
360
  imageCaption: {
354
361
  display: {
355
362
  type: string;
363
+ label: string;
356
364
  placeholder: string;
357
- };
358
- };
359
- link: {
360
- type: string;
361
- display: {
362
- type: string;
363
- placeholder: string;
364
- };
365
- properties: {
366
- text: {
367
- type: string;
368
- };
365
+ minWidth: number;
366
+ defaultWidth: number;
367
+ maxWidth: number;
369
368
  };
370
369
  };
371
370
  };
@@ -162,6 +162,9 @@ export declare const ControlImageRevealSliderComponent: {
162
162
  content: {
163
163
  layoutBased: boolean;
164
164
  type: string;
165
+ settings: {
166
+ addItemFromFileExplorer: boolean;
167
+ };
165
168
  items: {
166
169
  type: string;
167
170
  properties: {
@@ -169,7 +172,11 @@ export declare const ControlImageRevealSliderComponent: {
169
172
  type: string;
170
173
  display: {
171
174
  type: string;
175
+ label: string;
172
176
  isObjectFitEditable: boolean;
177
+ minWidth: number;
178
+ defaultWidth: number;
179
+ maxWidth: number;
173
180
  };
174
181
  properties: {
175
182
  url: {
@@ -189,7 +196,11 @@ export declare const ControlImageRevealSliderComponent: {
189
196
  type: string;
190
197
  display: {
191
198
  type: string;
199
+ label: string;
192
200
  placeholder: string;
201
+ minWidth: number;
202
+ defaultWidth: number;
203
+ maxWidth: number;
193
204
  };
194
205
  };
195
206
  };
@@ -34,5 +34,5 @@ type ImageRevealSliderItem = {
34
34
  };
35
35
  link: string;
36
36
  };
37
- export declare function ImageRevealSlider({ settings, content, isEditor }: ImageRevealSliderProps): JSX.Element;
37
+ export declare function ImageRevealSlider({ settings, content, isEditor }: ImageRevealSliderProps): import("react/jsx-runtime").JSX.Element;
38
38
  export {};
package/dist/index.js CHANGED
@@ -110,6 +110,7 @@ const RichTextRenderer = ({ content }) => {
110
110
  };
111
111
  function getLeafCss(leaf) {
112
112
  return {
113
+ ...leaf.fontFamily && { fontFamily: leaf.fontFamily },
113
114
  ...leaf.fontWeight && { fontWeight: leaf.fontWeight },
114
115
  ...leaf.fontStyle && { fontStyle: leaf.fontStyle },
115
116
  ...leaf.textDecoration && { textDecoration: leaf.textDecoration },
@@ -781,13 +782,20 @@ const ControlSliderComponent = {
781
782
  content: {
782
783
  layoutBased: false,
783
784
  type: "array",
785
+ settings: {
786
+ addItemFromFileExplorer: true
787
+ },
784
788
  items: {
785
789
  type: "object",
786
790
  properties: {
787
791
  image: {
788
792
  type: "object",
789
793
  display: {
790
- type: "media-input"
794
+ type: "media-input",
795
+ label: "Image",
796
+ minWidth: 48,
797
+ defaultWidth: 108,
798
+ maxWidth: 108
791
799
  },
792
800
  properties: {
793
801
  url: {
@@ -806,19 +814,11 @@ const ControlSliderComponent = {
806
814
  imageCaption: {
807
815
  display: {
808
816
  type: "rich-text",
809
- placeholder: "Add Caption..."
810
- }
811
- },
812
- link: {
813
- type: "object",
814
- display: {
815
- type: "text-input",
816
- placeholder: "Add Caption..."
817
- },
818
- properties: {
819
- text: {
820
- type: "string"
821
- }
817
+ label: "Description",
818
+ placeholder: "Add Caption...",
819
+ minWidth: 100,
820
+ defaultWidth: 300,
821
+ maxWidth: 500
822
822
  }
823
823
  }
824
824
  },
@@ -1360,6 +1360,9 @@ const ControlImageRevealSliderComponent = {
1360
1360
  content: {
1361
1361
  layoutBased: false,
1362
1362
  type: "array",
1363
+ settings: {
1364
+ addItemFromFileExplorer: true
1365
+ },
1363
1366
  items: {
1364
1367
  type: "object",
1365
1368
  properties: {
@@ -1367,7 +1370,11 @@ const ControlImageRevealSliderComponent = {
1367
1370
  type: "object",
1368
1371
  display: {
1369
1372
  type: "media-input",
1370
- isObjectFitEditable: false
1373
+ label: "Image",
1374
+ isObjectFitEditable: false,
1375
+ minWidth: 48,
1376
+ defaultWidth: 108,
1377
+ maxWidth: 108
1371
1378
  },
1372
1379
  properties: {
1373
1380
  url: {
@@ -1387,7 +1394,11 @@ const ControlImageRevealSliderComponent = {
1387
1394
  type: "string",
1388
1395
  display: {
1389
1396
  type: "text-input",
1390
- placeholder: "Enter link..."
1397
+ label: "URL",
1398
+ placeholder: "Enter link...",
1399
+ minWidth: 100,
1400
+ defaultWidth: 300,
1401
+ maxWidth: 500
1391
1402
  }
1392
1403
  }
1393
1404
  },
package/dist/index.mjs CHANGED
@@ -108,6 +108,7 @@ const RichTextRenderer = ({ content }) => {
108
108
  };
109
109
  function getLeafCss(leaf) {
110
110
  return {
111
+ ...leaf.fontFamily && { fontFamily: leaf.fontFamily },
111
112
  ...leaf.fontWeight && { fontWeight: leaf.fontWeight },
112
113
  ...leaf.fontStyle && { fontStyle: leaf.fontStyle },
113
114
  ...leaf.textDecoration && { textDecoration: leaf.textDecoration },
@@ -779,13 +780,20 @@ const ControlSliderComponent = {
779
780
  content: {
780
781
  layoutBased: false,
781
782
  type: "array",
783
+ settings: {
784
+ addItemFromFileExplorer: true
785
+ },
782
786
  items: {
783
787
  type: "object",
784
788
  properties: {
785
789
  image: {
786
790
  type: "object",
787
791
  display: {
788
- type: "media-input"
792
+ type: "media-input",
793
+ label: "Image",
794
+ minWidth: 48,
795
+ defaultWidth: 108,
796
+ maxWidth: 108
789
797
  },
790
798
  properties: {
791
799
  url: {
@@ -804,19 +812,11 @@ const ControlSliderComponent = {
804
812
  imageCaption: {
805
813
  display: {
806
814
  type: "rich-text",
807
- placeholder: "Add Caption..."
808
- }
809
- },
810
- link: {
811
- type: "object",
812
- display: {
813
- type: "text-input",
814
- placeholder: "Add Caption..."
815
- },
816
- properties: {
817
- text: {
818
- type: "string"
819
- }
815
+ label: "Description",
816
+ placeholder: "Add Caption...",
817
+ minWidth: 100,
818
+ defaultWidth: 300,
819
+ maxWidth: 500
820
820
  }
821
821
  }
822
822
  },
@@ -1358,6 +1358,9 @@ const ControlImageRevealSliderComponent = {
1358
1358
  content: {
1359
1359
  layoutBased: false,
1360
1360
  type: "array",
1361
+ settings: {
1362
+ addItemFromFileExplorer: true
1363
+ },
1361
1364
  items: {
1362
1365
  type: "object",
1363
1366
  properties: {
@@ -1365,7 +1368,11 @@ const ControlImageRevealSliderComponent = {
1365
1368
  type: "object",
1366
1369
  display: {
1367
1370
  type: "media-input",
1368
- isObjectFitEditable: false
1371
+ label: "Image",
1372
+ isObjectFitEditable: false,
1373
+ minWidth: 48,
1374
+ defaultWidth: 108,
1375
+ maxWidth: 108
1369
1376
  },
1370
1377
  properties: {
1371
1378
  url: {
@@ -1385,7 +1392,11 @@ const ControlImageRevealSliderComponent = {
1385
1392
  type: "string",
1386
1393
  display: {
1387
1394
  type: "text-input",
1388
- placeholder: "Enter link..."
1395
+ label: "URL",
1396
+ placeholder: "Enter link...",
1397
+ minWidth: 100,
1398
+ defaultWidth: 300,
1399
+ maxWidth: 500
1389
1400
  }
1390
1401
  }
1391
1402
  },
package/package.json CHANGED
@@ -1,68 +1,68 @@
1
- {
2
- "name": "@cntrl-site/components",
3
- "version": "0.0.2",
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
- "./style/components.css": {
19
- "default": "./dist/components.css"
20
- }
21
- },
22
- "scripts": {
23
- "test": "jest",
24
- "dev": "vite development",
25
- "prebuild": "rimraf ./dist",
26
- "build": "vite build",
27
- "prepublishOnly": "cross-env NODE_ENV=production npm run build"
28
- },
29
- "files": [
30
- "dist",
31
- "resources"
32
- ],
33
- "repository": {
34
- "type": "git",
35
- "url": "git+https://github.com/cntrl-site/components.git"
36
- },
37
- "author": "arsen@momdesign.nyc",
38
- "license": "MIT",
39
- "bugs": {
40
- "url": "https://github.com/cntrl-site/components/issues"
41
- },
42
- "homepage": "https://github.com/cntrl-site/components#readme",
43
- "directories": {
44
- "lib": "dist"
45
- },
46
- "dependencies": {
47
- "@antfu/eslint-config": "^3.16.0",
48
- "@splidejs/react-splide": "^0.7.12",
49
- "classnames": "^2.5.1",
50
- "ts-node": "^10.9.1"
51
- },
52
- "devDependencies": {
53
- "@tsconfig/node16": "^1.0.3",
54
- "@tsconfig/recommended": "^1.0.1",
55
- "@types/node": "^18.11.7",
56
- "@types/react": "^18.2.0",
57
- "@types/react-dom": "^18.2.0",
58
- "@vitejs/plugin-react": "^4.3.4",
59
- "cross-env": "^10.1.0",
60
- "react": "^18.2.0",
61
- "react-dom": "^18.2.0",
62
- "rimraf": "^6.0.1",
63
- "sass": "^1.86.3",
64
- "typescript": "^5.2.2",
65
- "vite": "^6.2.5",
66
- "vite-plugin-dts": "^4.5.3"
67
- }
68
- }
1
+ {
2
+ "name": "@cntrl-site/components",
3
+ "version": "0.0.4-0",
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
+ "./style/components.css": {
19
+ "default": "./dist/components.css"
20
+ }
21
+ },
22
+ "scripts": {
23
+ "test": "jest",
24
+ "dev": "vite development",
25
+ "prebuild": "rimraf ./dist",
26
+ "build": "vite build",
27
+ "prepublishOnly": "cross-env NODE_ENV=production npm run build"
28
+ },
29
+ "files": [
30
+ "dist",
31
+ "resources"
32
+ ],
33
+ "repository": {
34
+ "type": "git",
35
+ "url": "git+https://github.com/cntrl-site/components.git"
36
+ },
37
+ "author": "arsen@momdesign.nyc",
38
+ "license": "MIT",
39
+ "bugs": {
40
+ "url": "https://github.com/cntrl-site/components/issues"
41
+ },
42
+ "homepage": "https://github.com/cntrl-site/components#readme",
43
+ "directories": {
44
+ "lib": "dist"
45
+ },
46
+ "dependencies": {
47
+ "@antfu/eslint-config": "^3.16.0",
48
+ "@splidejs/react-splide": "^0.7.12",
49
+ "classnames": "^2.5.1",
50
+ "ts-node": "^10.9.1"
51
+ },
52
+ "devDependencies": {
53
+ "@tsconfig/node16": "^1.0.3",
54
+ "@tsconfig/recommended": "^1.0.1",
55
+ "@types/node": "^18.11.7",
56
+ "@types/react": "^18.2.0",
57
+ "@types/react-dom": "^18.2.0",
58
+ "@vitejs/plugin-react": "^4.3.4",
59
+ "cross-env": "^10.1.0",
60
+ "react": "^18.2.0",
61
+ "react-dom": "^18.2.0",
62
+ "rimraf": "^6.0.1",
63
+ "sass": "^1.86.3",
64
+ "typescript": "^5.2.2",
65
+ "vite": "^6.2.5",
66
+ "vite-plugin-dts": "^4.5.3"
67
+ }
68
+ }