@c4h/chuci 0.2.4 → 0.2.6

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@c4h/chuci",
3
- "version": "0.2.4",
3
+ "version": "0.2.6",
4
4
  "description": "Standalone multimedia swiper and viewer web components",
5
5
  "type": "module",
6
6
  "private": false,
@@ -38,18 +38,18 @@
38
38
  "@testing-library/dom": "^10.4.1",
39
39
  "@testing-library/jest-dom": "^6.9.1",
40
40
  "@types/jsdom": "^21.1.7",
41
- "@types/node": "^22.19.3",
41
+ "@types/node": "^25.5.1",
42
42
  "@types/three": "^0.171.0",
43
- "@typescript-eslint/eslint-plugin": "^8.50.1",
44
- "@typescript-eslint/parser": "^8.50.1",
43
+ "@typescript-eslint/eslint-plugin": "^8.58.0",
44
+ "@typescript-eslint/parser": "^8.58.0",
45
45
  "@vitest/coverage-v8": "^3.2.4",
46
- "cross-env": "^7.0.3",
46
+ "cross-env": "^10.1.0",
47
47
  "eslint": "^9.39.2",
48
- "eslint-config-prettier": "^9.1.2",
49
- "jsdom": "^25.0.1",
48
+ "eslint-config-prettier": "^10.1.8",
49
+ "jsdom": "^27.4.0",
50
50
  "prettier": "^3.7.4",
51
51
  "typescript": "^5.9.3",
52
- "vite": "^6.4.1",
52
+ "vite": "^7.3.0",
53
53
  "vite-plugin-dts": "^4.5.4",
54
54
  "vitest": "^3.2.4"
55
55
  },
@@ -1,50 +1,50 @@
1
- import { ChuciElement } from '@/utils/base-element'
2
-
3
- export class CcSwiperSlide extends ChuciElement {
4
- static get observedAttributes() {
5
- return ['thumbnail-url', 'image-url', 'image-type', 'caption']
6
- }
7
-
8
- get thumbnailUrl() {
9
- return this.getAttribute('thumbnail-url') || ''
10
- }
11
-
12
- get imageUrl() {
13
- return this.getAttribute('image-url') || ''
14
- }
15
-
16
- get imageType() {
17
- return this.getAttribute('image-type') || ''
18
- }
19
-
20
- get caption() {
21
- return this.getAttribute('caption') || ''
22
- }
23
-
24
- protected render() {
25
- const styles = this.css`
26
- :host {
27
- display: flex;
28
- justify-content: center;
29
- align-items: center;
30
- height: 100%;
31
- width: 100%;
32
- background-size: cover !important;
33
- background-repeat: no-repeat !important;
34
- background-position: center !important;
35
- }
36
- `
37
-
38
- this.updateShadowRoot(styles)
39
- }
40
- }
41
-
42
- if (!customElements.get('cc-swiper-slide')) {
43
- customElements.define('cc-swiper-slide', CcSwiperSlide)
44
- }
45
-
46
- declare global {
47
- interface HTMLElementTagNameMap {
48
- 'cc-swiper-slide': CcSwiperSlide
49
- }
1
+ import { ChuciElement } from '@/utils/base-element'
2
+
3
+ export class CcSwiperSlide extends ChuciElement {
4
+ static get observedAttributes() {
5
+ return ['thumbnail-url', 'image-url', 'image-type', 'caption']
6
+ }
7
+
8
+ get thumbnailUrl() {
9
+ return this.getAttribute('thumbnail-url') || ''
10
+ }
11
+
12
+ get imageUrl() {
13
+ return this.getAttribute('image-url') || ''
14
+ }
15
+
16
+ get imageType() {
17
+ return this.getAttribute('image-type') || ''
18
+ }
19
+
20
+ get caption() {
21
+ return this.getAttribute('caption') || ''
22
+ }
23
+
24
+ protected render() {
25
+ const styles = this.css`
26
+ :host {
27
+ display: flex;
28
+ justify-content: center;
29
+ align-items: center;
30
+ height: 100%;
31
+ width: 100%;
32
+ background-size: cover !important;
33
+ background-repeat: no-repeat !important;
34
+ background-position: center !important;
35
+ }
36
+ `
37
+
38
+ this.updateShadowRoot(styles)
39
+ }
40
+ }
41
+
42
+ if (!customElements.get('cc-swiper-slide')) {
43
+ customElements.define('cc-swiper-slide', CcSwiperSlide)
44
+ }
45
+
46
+ declare global {
47
+ interface HTMLElementTagNameMap {
48
+ 'cc-swiper-slide': CcSwiperSlide
49
+ }
50
50
  }
@@ -1,29 +1,29 @@
1
- export const swiperStyles = `
2
- :host {
3
- display: block;
4
- --swiper-theme-color: #007aff;
5
- --swiper-navigation-size: 44px;
6
- --swiper-navigation-color: #007aff;
7
- }
8
-
9
- .swiper {
10
- width: 100%;
11
- height: 100%;
12
- }
13
-
14
- .swiper-slide {
15
- text-align: center;
16
- font-size: 18px;
17
- background: #fff;
18
- display: flex;
19
- justify-content: center;
20
- align-items: center;
21
- }
22
-
23
- .swiper-slide img {
24
- display: block;
25
- width: 100%;
26
- height: 100%;
27
- object-fit: cover;
28
- }
1
+ export const swiperStyles = `
2
+ :host {
3
+ display: block;
4
+ --swiper-theme-color: #007aff;
5
+ --swiper-navigation-size: 44px;
6
+ --swiper-navigation-color: #007aff;
7
+ }
8
+
9
+ .swiper {
10
+ width: 100%;
11
+ height: 100%;
12
+ }
13
+
14
+ .swiper-slide {
15
+ text-align: center;
16
+ font-size: 18px;
17
+ background: #fff;
18
+ display: flex;
19
+ justify-content: center;
20
+ align-items: center;
21
+ }
22
+
23
+ .swiper-slide img {
24
+ display: block;
25
+ width: 100%;
26
+ height: 100%;
27
+ object-fit: cover;
28
+ }
29
29
  `