@cntrl-site/components 0.1.4 → 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 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): import("react/jsx-runtime").JSX.Element;
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): import("react/jsx-runtime").JSX.Element;
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) => import("react/jsx-runtime").JSX.Element;
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
@@ -1943,6 +1943,10 @@ const Lightbox = ({ isOpen, onClose, content, lightboxStyles, settings, portalId
1943
1943
  e.stopPropagation();
1944
1944
  return;
1945
1945
  }
1946
+ const target = e.target;
1947
+ if (target && (target.closest(`.${classes.thumbsContainer}`) || target.closest(`.${classes.thumbItem}`))) {
1948
+ return;
1949
+ }
1946
1950
  if (e.touches.length === 0 && e.changedTouches.length > 0) {
1947
1951
  const currentImage = content[currentIndex];
1948
1952
  const isCover = (currentImage == null ? void 0 : currentImage.image.objectFit) === "cover";
@@ -3057,26 +3061,6 @@ const LightboxComponent = {
3057
3061
  value: false
3058
3062
  }
3059
3063
  },
3060
- {
3061
- if: {
3062
- name: "lightboxBlock.slider.type",
3063
- value: "fade"
3064
- },
3065
- then: {
3066
- name: "properties.lightboxBlock.properties.slider.properties.direction.display.visible",
3067
- value: false
3068
- }
3069
- },
3070
- {
3071
- if: {
3072
- name: "lightboxBlock.slider.type",
3073
- value: "scale"
3074
- },
3075
- then: {
3076
- name: "properties.lightboxBlock.properties.slider.properties.direction.display.visible",
3077
- value: false
3078
- }
3079
- },
3080
3064
  {
3081
3065
  if: [
3082
3066
  { name: "lightboxBlock.triggers.type", value: "click" },
package/dist/index.mjs CHANGED
@@ -1941,6 +1941,10 @@ const Lightbox = ({ isOpen, onClose, content, lightboxStyles, settings, portalId
1941
1941
  e.stopPropagation();
1942
1942
  return;
1943
1943
  }
1944
+ const target = e.target;
1945
+ if (target && (target.closest(`.${classes.thumbsContainer}`) || target.closest(`.${classes.thumbItem}`))) {
1946
+ return;
1947
+ }
1944
1948
  if (e.touches.length === 0 && e.changedTouches.length > 0) {
1945
1949
  const currentImage = content[currentIndex];
1946
1950
  const isCover = (currentImage == null ? void 0 : currentImage.image.objectFit) === "cover";
@@ -3055,26 +3059,6 @@ const LightboxComponent = {
3055
3059
  value: false
3056
3060
  }
3057
3061
  },
3058
- {
3059
- if: {
3060
- name: "lightboxBlock.slider.type",
3061
- value: "fade"
3062
- },
3063
- then: {
3064
- name: "properties.lightboxBlock.properties.slider.properties.direction.display.visible",
3065
- value: false
3066
- }
3067
- },
3068
- {
3069
- if: {
3070
- name: "lightboxBlock.slider.type",
3071
- value: "scale"
3072
- },
3073
- then: {
3074
- name: "properties.lightboxBlock.properties.slider.properties.direction.display.visible",
3075
- value: false
3076
- }
3077
- },
3078
3062
  {
3079
3063
  if: [
3080
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",
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
+ }