@cntrl-site/components 0.0.2 → 0.0.3

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,9 @@ export declare const ControlSliderComponent: {
335
338
  type: string;
336
339
  display: {
337
340
  type: string;
341
+ minWidth: number;
342
+ defaultWidth: number;
343
+ maxWidth: number;
338
344
  };
339
345
  properties: {
340
346
  url: {
@@ -354,18 +360,9 @@ export declare const ControlSliderComponent: {
354
360
  display: {
355
361
  type: string;
356
362
  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
- };
363
+ minWidth: number;
364
+ defaultWidth: number;
365
+ maxWidth: number;
369
366
  };
370
367
  };
371
368
  };
@@ -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: {
@@ -170,6 +173,9 @@ export declare const ControlImageRevealSliderComponent: {
170
173
  display: {
171
174
  type: string;
172
175
  isObjectFitEditable: boolean;
176
+ minWidth: number;
177
+ defaultWidth: number;
178
+ maxWidth: number;
173
179
  };
174
180
  properties: {
175
181
  url: {
@@ -190,6 +196,9 @@ export declare const ControlImageRevealSliderComponent: {
190
196
  display: {
191
197
  type: string;
192
198
  placeholder: string;
199
+ minWidth: number;
200
+ defaultWidth: number;
201
+ maxWidth: number;
193
202
  };
194
203
  };
195
204
  };
@@ -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,19 @@ 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
+ minWidth: 48,
796
+ defaultWidth: 108,
797
+ maxWidth: 108
791
798
  },
792
799
  properties: {
793
800
  url: {
@@ -806,19 +813,10 @@ const ControlSliderComponent = {
806
813
  imageCaption: {
807
814
  display: {
808
815
  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
- }
816
+ placeholder: "Add Caption...",
817
+ minWidth: 100,
818
+ defaultWidth: 300,
819
+ maxWidth: 500
822
820
  }
823
821
  }
824
822
  },
@@ -1360,6 +1358,9 @@ const ControlImageRevealSliderComponent = {
1360
1358
  content: {
1361
1359
  layoutBased: false,
1362
1360
  type: "array",
1361
+ settings: {
1362
+ addItemFromFileExplorer: true
1363
+ },
1363
1364
  items: {
1364
1365
  type: "object",
1365
1366
  properties: {
@@ -1367,7 +1368,10 @@ const ControlImageRevealSliderComponent = {
1367
1368
  type: "object",
1368
1369
  display: {
1369
1370
  type: "media-input",
1370
- isObjectFitEditable: false
1371
+ isObjectFitEditable: false,
1372
+ minWidth: 48,
1373
+ defaultWidth: 108,
1374
+ maxWidth: 108
1371
1375
  },
1372
1376
  properties: {
1373
1377
  url: {
@@ -1387,7 +1391,10 @@ const ControlImageRevealSliderComponent = {
1387
1391
  type: "string",
1388
1392
  display: {
1389
1393
  type: "text-input",
1390
- placeholder: "Enter link..."
1394
+ placeholder: "Enter link...",
1395
+ minWidth: 100,
1396
+ defaultWidth: 300,
1397
+ maxWidth: 500
1391
1398
  }
1392
1399
  }
1393
1400
  },
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,19 @@ 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
+ minWidth: 48,
794
+ defaultWidth: 108,
795
+ maxWidth: 108
789
796
  },
790
797
  properties: {
791
798
  url: {
@@ -804,19 +811,10 @@ const ControlSliderComponent = {
804
811
  imageCaption: {
805
812
  display: {
806
813
  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
- }
814
+ placeholder: "Add Caption...",
815
+ minWidth: 100,
816
+ defaultWidth: 300,
817
+ maxWidth: 500
820
818
  }
821
819
  }
822
820
  },
@@ -1358,6 +1356,9 @@ const ControlImageRevealSliderComponent = {
1358
1356
  content: {
1359
1357
  layoutBased: false,
1360
1358
  type: "array",
1359
+ settings: {
1360
+ addItemFromFileExplorer: true
1361
+ },
1361
1362
  items: {
1362
1363
  type: "object",
1363
1364
  properties: {
@@ -1365,7 +1366,10 @@ const ControlImageRevealSliderComponent = {
1365
1366
  type: "object",
1366
1367
  display: {
1367
1368
  type: "media-input",
1368
- isObjectFitEditable: false
1369
+ isObjectFitEditable: false,
1370
+ minWidth: 48,
1371
+ defaultWidth: 108,
1372
+ maxWidth: 108
1369
1373
  },
1370
1374
  properties: {
1371
1375
  url: {
@@ -1385,7 +1389,10 @@ const ControlImageRevealSliderComponent = {
1385
1389
  type: "string",
1386
1390
  display: {
1387
1391
  type: "text-input",
1388
- placeholder: "Enter link..."
1392
+ placeholder: "Enter link...",
1393
+ minWidth: 100,
1394
+ defaultWidth: 300,
1395
+ maxWidth: 500
1389
1396
  }
1390
1397
  }
1391
1398
  },
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.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
+ "./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
+ }