@cntrl-site/components 0.1.4-3 → 0.1.5
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 +21 -21
- package/README.md +2 -2
- package/dist/Components/ControlSlider/ControlSlider.d.ts +1 -1
- package/dist/Components/ImageRevealSlider/ControlImageRevealSliderComponent.d.ts +4 -0
- package/dist/Components/ImageRevealSlider/ImageRevealSlider.d.ts +1 -1
- package/dist/Components/Lightbox/Lightbox.d.ts +1 -1
- package/dist/index.js +8 -20
- package/dist/index.mjs +8 -20
- package/package.json +68 -68
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):
|
|
7
|
+
export declare function ControlSlider({ settings, content, styles: sliderStyles, isEditor }: SliderProps): JSX.Element;
|
|
8
8
|
type SliderItem = {
|
|
9
9
|
image: {
|
|
10
10
|
url: string;
|
|
@@ -34,5 +34,5 @@ type ImageRevealSliderItem = {
|
|
|
34
34
|
};
|
|
35
35
|
link: string;
|
|
36
36
|
};
|
|
37
|
-
export declare function ImageRevealSlider({ settings, content, isEditor }: ImageRevealSliderProps):
|
|
37
|
+
export declare function ImageRevealSlider({ settings, content, isEditor }: ImageRevealSliderProps): JSX.Element;
|
|
38
38
|
export {};
|
|
@@ -7,7 +7,7 @@ type LightboxGalleryProps = {
|
|
|
7
7
|
activeEvent: 'close' | 'open';
|
|
8
8
|
isEditor?: boolean;
|
|
9
9
|
};
|
|
10
|
-
export declare const LightboxGallery: ({ settings, content, styles, portalId, activeEvent, isEditor }: LightboxGalleryProps) =>
|
|
10
|
+
export declare const LightboxGallery: ({ settings, content, styles, portalId, activeEvent, isEditor }: LightboxGalleryProps) => JSX.Element;
|
|
11
11
|
type LightboxImage = {
|
|
12
12
|
image: {
|
|
13
13
|
url: string;
|
package/dist/index.js
CHANGED
|
@@ -1221,6 +1221,10 @@ const ControlImageRevealSliderComponent = {
|
|
|
1221
1221
|
type: "video",
|
|
1222
1222
|
url: "https://cdn.cntrl.site/projects/01JJKT02AWY2FGN2QJ7A173RNZ/articles-assets/01K7EQ3WSW43JG5YMC8B2HTPKT.mp4"
|
|
1223
1223
|
},
|
|
1224
|
+
defaultSize: {
|
|
1225
|
+
width: "100%",
|
|
1226
|
+
height: "100%"
|
|
1227
|
+
},
|
|
1224
1228
|
schema: {
|
|
1225
1229
|
type: "object",
|
|
1226
1230
|
properties: {
|
|
@@ -1939,6 +1943,10 @@ const Lightbox = ({ isOpen, onClose, content, lightboxStyles, settings, portalId
|
|
|
1939
1943
|
e.stopPropagation();
|
|
1940
1944
|
return;
|
|
1941
1945
|
}
|
|
1946
|
+
const target = e.target;
|
|
1947
|
+
if (target && (target.closest(`.${classes.thumbsContainer}`) || target.closest(`.${classes.thumbItem}`))) {
|
|
1948
|
+
return;
|
|
1949
|
+
}
|
|
1942
1950
|
if (e.touches.length === 0 && e.changedTouches.length > 0) {
|
|
1943
1951
|
const currentImage = content[currentIndex];
|
|
1944
1952
|
const isCover = (currentImage == null ? void 0 : currentImage.image.objectFit) === "cover";
|
|
@@ -3053,26 +3061,6 @@ const LightboxComponent = {
|
|
|
3053
3061
|
value: false
|
|
3054
3062
|
}
|
|
3055
3063
|
},
|
|
3056
|
-
{
|
|
3057
|
-
if: {
|
|
3058
|
-
name: "lightboxBlock.slider.type",
|
|
3059
|
-
value: "fade"
|
|
3060
|
-
},
|
|
3061
|
-
then: {
|
|
3062
|
-
name: "properties.lightboxBlock.properties.slider.properties.direction.display.visible",
|
|
3063
|
-
value: false
|
|
3064
|
-
}
|
|
3065
|
-
},
|
|
3066
|
-
{
|
|
3067
|
-
if: {
|
|
3068
|
-
name: "lightboxBlock.slider.type",
|
|
3069
|
-
value: "scale"
|
|
3070
|
-
},
|
|
3071
|
-
then: {
|
|
3072
|
-
name: "properties.lightboxBlock.properties.slider.properties.direction.display.visible",
|
|
3073
|
-
value: false
|
|
3074
|
-
}
|
|
3075
|
-
},
|
|
3076
3064
|
{
|
|
3077
3065
|
if: [
|
|
3078
3066
|
{ name: "lightboxBlock.triggers.type", value: "click" },
|
package/dist/index.mjs
CHANGED
|
@@ -1219,6 +1219,10 @@ const ControlImageRevealSliderComponent = {
|
|
|
1219
1219
|
type: "video",
|
|
1220
1220
|
url: "https://cdn.cntrl.site/projects/01JJKT02AWY2FGN2QJ7A173RNZ/articles-assets/01K7EQ3WSW43JG5YMC8B2HTPKT.mp4"
|
|
1221
1221
|
},
|
|
1222
|
+
defaultSize: {
|
|
1223
|
+
width: "100%",
|
|
1224
|
+
height: "100%"
|
|
1225
|
+
},
|
|
1222
1226
|
schema: {
|
|
1223
1227
|
type: "object",
|
|
1224
1228
|
properties: {
|
|
@@ -1937,6 +1941,10 @@ const Lightbox = ({ isOpen, onClose, content, lightboxStyles, settings, portalId
|
|
|
1937
1941
|
e.stopPropagation();
|
|
1938
1942
|
return;
|
|
1939
1943
|
}
|
|
1944
|
+
const target = e.target;
|
|
1945
|
+
if (target && (target.closest(`.${classes.thumbsContainer}`) || target.closest(`.${classes.thumbItem}`))) {
|
|
1946
|
+
return;
|
|
1947
|
+
}
|
|
1940
1948
|
if (e.touches.length === 0 && e.changedTouches.length > 0) {
|
|
1941
1949
|
const currentImage = content[currentIndex];
|
|
1942
1950
|
const isCover = (currentImage == null ? void 0 : currentImage.image.objectFit) === "cover";
|
|
@@ -3051,26 +3059,6 @@ const LightboxComponent = {
|
|
|
3051
3059
|
value: false
|
|
3052
3060
|
}
|
|
3053
3061
|
},
|
|
3054
|
-
{
|
|
3055
|
-
if: {
|
|
3056
|
-
name: "lightboxBlock.slider.type",
|
|
3057
|
-
value: "fade"
|
|
3058
|
-
},
|
|
3059
|
-
then: {
|
|
3060
|
-
name: "properties.lightboxBlock.properties.slider.properties.direction.display.visible",
|
|
3061
|
-
value: false
|
|
3062
|
-
}
|
|
3063
|
-
},
|
|
3064
|
-
{
|
|
3065
|
-
if: {
|
|
3066
|
-
name: "lightboxBlock.slider.type",
|
|
3067
|
-
value: "scale"
|
|
3068
|
-
},
|
|
3069
|
-
then: {
|
|
3070
|
-
name: "properties.lightboxBlock.properties.slider.properties.direction.display.visible",
|
|
3071
|
-
value: false
|
|
3072
|
-
}
|
|
3073
|
-
},
|
|
3074
3062
|
{
|
|
3075
3063
|
if: [
|
|
3076
3064
|
{ name: "lightboxBlock.triggers.type", value: "click" },
|
package/package.json
CHANGED
|
@@ -1,68 +1,68 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@cntrl-site/components",
|
|
3
|
-
"version": "0.1.
|
|
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.1.5",
|
|
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
|
+
}
|