@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/CHANGELOG.md +32 -32
- package/LICENSE +20 -20
- package/README.ja.md +279 -143
- package/README.md +278 -224
- package/dist/chuci.js +3866 -3952
- package/dist/chuci.umd.js +177 -201
- package/package.json +8 -8
- package/src/components/swiper/cc-swiper-slide.ts +49 -49
- package/src/components/swiper/cc-swiper-styles.ts +28 -28
- package/src/components/swiper/cc-swiper.ts +379 -379
- package/src/components/swiper/swiper-styles.css +4 -4
- package/src/components/viewer/cc-viewer-3dmodel.ts +495 -495
- package/src/components/viewer/cc-viewer-base.ts +278 -278
- package/src/components/viewer/cc-viewer-gaussian.ts +384 -384
- package/src/components/viewer/cc-viewer-image.ts +189 -189
- package/src/components/viewer/cc-viewer-panorama.ts +85 -85
- package/src/components/viewer/cc-viewer-styles.ts +55 -55
- package/src/components/viewer/cc-viewer-video.ts +109 -109
- package/src/components/viewer/cc-viewer-youtube.ts +75 -75
- package/src/components/viewer/cc-viewer.ts +290 -290
- package/src/index.ts +24 -24
- package/src/types/css-modules.d.ts +1 -1
- package/src/types/global.d.ts +10 -10
- package/src/utils/base-element.ts +76 -76
package/CHANGELOG.md
CHANGED
|
@@ -1,33 +1,33 @@
|
|
|
1
|
-
# Changelog
|
|
2
|
-
|
|
3
|
-
All notable changes to this project will be documented in this file.
|
|
4
|
-
|
|
5
|
-
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
|
-
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
|
-
|
|
8
|
-
## [0.1.0] - 2025-01-13
|
|
9
|
-
|
|
10
|
-
### Added
|
|
11
|
-
- Initial release of Chuci Web Components library
|
|
12
|
-
- `cc-swiper` component for creating multimedia carousels
|
|
13
|
-
- `cc-swiper-slide` component for individual carousel slides
|
|
14
|
-
- `cc-viewer` base viewer component with navigation support
|
|
15
|
-
- `cc-viewer-image` for displaying images with ViewerJS integration
|
|
16
|
-
- `cc-viewer-video` for HTML5 video playback
|
|
17
|
-
- `cc-viewer-youtube` for YouTube video embedding
|
|
18
|
-
- `cc-viewer-panorama` for 360° panoramic images
|
|
19
|
-
- `cc-viewer-3dmodel` for 3D model viewing with Three.js
|
|
20
|
-
- `cc-viewer-gaussian` for Gaussian Splatting visualization
|
|
21
|
-
- TypeScript type definitions
|
|
22
|
-
- ESM, CommonJS, and UMD build outputs
|
|
23
|
-
|
|
24
|
-
### Fixed
|
|
25
|
-
- Shadow DOM rendering issues for WebGL-based viewers (3D Model and Gaussian)
|
|
26
|
-
- Navigation button event handling across all viewer types
|
|
27
|
-
- Duplicate event listener registration
|
|
28
|
-
- ViewerJS timing issues in image viewer
|
|
29
|
-
|
|
30
|
-
### Changed
|
|
31
|
-
- Unified viewer implementation using Template Method pattern
|
|
32
|
-
- Simplified 3D model data format from pipe-separated to separate attributes
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to this project will be documented in this file.
|
|
4
|
+
|
|
5
|
+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
|
+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
|
+
|
|
8
|
+
## [0.1.0] - 2025-01-13
|
|
9
|
+
|
|
10
|
+
### Added
|
|
11
|
+
- Initial release of Chuci Web Components library
|
|
12
|
+
- `cc-swiper` component for creating multimedia carousels
|
|
13
|
+
- `cc-swiper-slide` component for individual carousel slides
|
|
14
|
+
- `cc-viewer` base viewer component with navigation support
|
|
15
|
+
- `cc-viewer-image` for displaying images with ViewerJS integration
|
|
16
|
+
- `cc-viewer-video` for HTML5 video playback
|
|
17
|
+
- `cc-viewer-youtube` for YouTube video embedding
|
|
18
|
+
- `cc-viewer-panorama` for 360° panoramic images
|
|
19
|
+
- `cc-viewer-3dmodel` for 3D model viewing with Three.js
|
|
20
|
+
- `cc-viewer-gaussian` for Gaussian Splatting visualization
|
|
21
|
+
- TypeScript type definitions
|
|
22
|
+
- ESM, CommonJS, and UMD build outputs
|
|
23
|
+
|
|
24
|
+
### Fixed
|
|
25
|
+
- Shadow DOM rendering issues for WebGL-based viewers (3D Model and Gaussian)
|
|
26
|
+
- Navigation button event handling across all viewer types
|
|
27
|
+
- Duplicate event listener registration
|
|
28
|
+
- ViewerJS timing issues in image viewer
|
|
29
|
+
|
|
30
|
+
### Changed
|
|
31
|
+
- Unified viewer implementation using Template Method pattern
|
|
32
|
+
- Simplified 3D model data format from pipe-separated to separate attributes
|
|
33
33
|
- Migrated to Code4History standards with @c4h scope
|
package/LICENSE
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2024 Code for History
|
|
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
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2024-2026 Code for History
|
|
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
21
|
SOFTWARE.
|
package/README.ja.md
CHANGED
|
@@ -1,144 +1,280 @@
|
|
|
1
|
-
# Chuci (楚辞)
|
|
2
|
-
|
|
3
|
-
[
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
###
|
|
55
|
-
|
|
56
|
-
```html
|
|
57
|
-
<cc-swiper
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
-
|
|
65
|
-
-
|
|
66
|
-
-
|
|
67
|
-
-
|
|
68
|
-
|
|
69
|
-
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
-
|
|
98
|
-
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
1
|
+
# Chuci (楚辞)
|
|
2
|
+
|
|
3
|
+
[](https://github.com/code4history/Chuci/actions/workflows/ci.yml)
|
|
4
|
+
[](https://www.npmjs.com/package/@c4h/chuci)
|
|
5
|
+
[](https://opensource.org/licenses/MIT)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
[Quyuan](https://github.com/code4history/Quyuan)から抽出されたスタンドアロンのマルチメディアスワイパーとビューアWebコンポーネントライブラリです。フレームワークに依存せず、タッチ対応のカルーセルとマルチメディアビューアを提供します。
|
|
9
|
+
|
|
10
|
+
## 特徴
|
|
11
|
+
|
|
12
|
+
- 🚀 **フレームワーク非依存**: 純粋なWeb Components、任意のフレームワークまたはバニラJSで動作
|
|
13
|
+
- 📱 **タッチ対応**: Swiper.jsをベースとしたスムーズなタッチ操作
|
|
14
|
+
- 🎬 **複数のメディアタイプ**: 画像、パノラマ、動画、YouTube、3Dモデル、Gaussianスプラットに対応
|
|
15
|
+
- 🔧 **ゼロ依存関係**: すべての依存関係がバンドル済み(Lit依存なし)
|
|
16
|
+
- 📦 **軽量**: tree-shakingサポートによる最適化されたバンドルサイズ
|
|
17
|
+
- 🛠️ **TypeScript**: 型定義付きの完全なTypeScriptサポート
|
|
18
|
+
|
|
19
|
+
## 要件
|
|
20
|
+
|
|
21
|
+
- **Node.js**: 20以降
|
|
22
|
+
- **パッケージマネージャー**: pnpm 9.0.0以降(推奨)
|
|
23
|
+
- **ブラウザ**: Web Componentsをサポートするモダンブラウザ
|
|
24
|
+
- Chrome/Edge 79+
|
|
25
|
+
- Firefox 63+
|
|
26
|
+
- Safari 12.1+
|
|
27
|
+
|
|
28
|
+
## インストール
|
|
29
|
+
|
|
30
|
+
### pnpmを使用(推奨)
|
|
31
|
+
|
|
32
|
+
```bash
|
|
33
|
+
pnpm add @c4h/chuci
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
### npmを使用
|
|
37
|
+
|
|
38
|
+
```bash
|
|
39
|
+
npm install @c4h/chuci
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
### CDN(ブラウザ)
|
|
43
|
+
|
|
44
|
+
```html
|
|
45
|
+
<script src="https://cdn.jsdelivr.net/npm/@c4h/chuci@latest/dist/chuci.umd.js"></script>
|
|
46
|
+
<script>
|
|
47
|
+
// コンポーネントはグローバルにChuciとして利用可能
|
|
48
|
+
// HTMLで直接カスタム要素を使用できます
|
|
49
|
+
</script>
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
## 使用方法
|
|
53
|
+
|
|
54
|
+
### 基本的なスワイパー
|
|
55
|
+
|
|
56
|
+
```html
|
|
57
|
+
<cc-swiper>
|
|
58
|
+
<cc-swiper-slide
|
|
59
|
+
thumbnail-url="thumb1.jpg"
|
|
60
|
+
image-url="full1.jpg"
|
|
61
|
+
image-type="image"
|
|
62
|
+
caption="最初の画像">
|
|
63
|
+
</cc-swiper-slide>
|
|
64
|
+
<cc-swiper-slide
|
|
65
|
+
thumbnail-url="thumb2.jpg"
|
|
66
|
+
image-url="full2.jpg"
|
|
67
|
+
image-type="image"
|
|
68
|
+
caption="2番目の画像">
|
|
69
|
+
</cc-swiper-slide>
|
|
70
|
+
</cc-swiper>
|
|
71
|
+
|
|
72
|
+
<script type="module">
|
|
73
|
+
import '@c4h/chuci'
|
|
74
|
+
</script>
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
### プログラムによる使用
|
|
78
|
+
|
|
79
|
+
```javascript
|
|
80
|
+
import '@c4h/chuci';
|
|
81
|
+
|
|
82
|
+
// スワイパー要素を取得
|
|
83
|
+
const swiper = document.querySelector('cc-swiper');
|
|
84
|
+
|
|
85
|
+
// プログラムでビューアを開く
|
|
86
|
+
swiper.openViewer('path/to/image.jpg', 'image', 0);
|
|
87
|
+
|
|
88
|
+
// スライド変更イベントをリッスン
|
|
89
|
+
swiper.addEventListener('slidechange', (e) => {
|
|
90
|
+
console.log('現在のスライド:', e.detail.activeIndex);
|
|
91
|
+
});
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
### サムネイルギャラリー付き
|
|
95
|
+
|
|
96
|
+
```html
|
|
97
|
+
<cc-swiper has-thumb>
|
|
98
|
+
<cc-swiper-slide thumbnail-url="..." image-url="..." image-type="image"></cc-swiper-slide>
|
|
99
|
+
<cc-swiper-slide thumbnail-url="..." image-url="..." image-type="image"></cc-swiper-slide>
|
|
100
|
+
</cc-swiper>
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
### 自動再生
|
|
104
|
+
|
|
105
|
+
```html
|
|
106
|
+
<cc-swiper autoplay>
|
|
107
|
+
<!-- スライド -->
|
|
108
|
+
</cc-swiper>
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
## サポートされるメディアタイプ
|
|
112
|
+
|
|
113
|
+
- **image**: 通常の画像(jpg, png, gif など)
|
|
114
|
+
- **panorama**: 360°パノラマ画像
|
|
115
|
+
- **youtube**: YouTube動画(YouTube URLを提供)
|
|
116
|
+
- **video**: HTML5動画(mp4, webm など)
|
|
117
|
+
- **3dmodel**: 3Dモデル(OBJ/MTL形式)
|
|
118
|
+
- **gaussian**: Gaussianスプラッティングファイル(.splat, .ply)
|
|
119
|
+
|
|
120
|
+
## コンポーネント
|
|
121
|
+
|
|
122
|
+
### `<cc-swiper>`
|
|
123
|
+
|
|
124
|
+
メインのカルーセルコンポーネント。
|
|
125
|
+
|
|
126
|
+
**属性:**
|
|
127
|
+
- `has-thumb`: サムネイルギャラリーを表示
|
|
128
|
+
- `autoplay`: 自動再生を有効化
|
|
129
|
+
|
|
130
|
+
**メソッド:**
|
|
131
|
+
- `openViewer(imageUrl: string, imageType: string, slideIndex?: number)`: プログラムでビューアを開く
|
|
132
|
+
- `imageUrl`: 表示するメディアのURL
|
|
133
|
+
- `imageType`: メディアのタイプ(上記のサポートされるタイプを参照)
|
|
134
|
+
- `slideIndex`: オプションのスライドインデックス(デフォルト: 0)
|
|
135
|
+
|
|
136
|
+
**イベント:**
|
|
137
|
+
- `slidechange`: スライドが変更されたときに発火
|
|
138
|
+
- `detail.activeIndex`: 現在のアクティブなスライドインデックス
|
|
139
|
+
|
|
140
|
+
**プロパティ:**
|
|
141
|
+
- `slider`: 基盤となるSwiperインスタンスへのアクセス
|
|
142
|
+
|
|
143
|
+
### `<cc-swiper-slide>`
|
|
144
|
+
|
|
145
|
+
個別のスライドコンポーネント。
|
|
146
|
+
|
|
147
|
+
**属性:**
|
|
148
|
+
- `thumbnail-url`: サムネイル画像のURL(必須)
|
|
149
|
+
- `image-url`: フルメディアのURL(必須)
|
|
150
|
+
- `image-type`: メディアタイプ(上記のサポートされるタイプを参照)(必須)
|
|
151
|
+
- `caption`: オプションのキャプションテキスト
|
|
152
|
+
|
|
153
|
+
**3DモデルとGaussianスプラット用の属性:**
|
|
154
|
+
- `material-url`: 3Dモデル用のマテリアルファイルURL(OBJ/MTL)
|
|
155
|
+
- `debug-mode`: デバッグ情報の表示を有効化(`"true"` または `"false"`)
|
|
156
|
+
- `camera-position`: 初期カメラ位置を `"x,y,z"` 形式で指定(例: `"0,1,5"`)
|
|
157
|
+
- `camera-target`: カメラターゲット位置を `"x,y,z"` 形式で指定(例: `"0,0,0"`)
|
|
158
|
+
- `show-texture`: 3Dモデルのテクスチャの表示/非表示(`"true"` または `"false"`)
|
|
159
|
+
- `fit-to-container`: モデルをコンテナサイズに合わせる(`"true"` または `"false"`)
|
|
160
|
+
|
|
161
|
+
### ビューアコンポーネント
|
|
162
|
+
|
|
163
|
+
すべてのビューアコンポーネントは`CcViewerBase`を継承し、以下をサポートします:
|
|
164
|
+
|
|
165
|
+
**メソッド:**
|
|
166
|
+
- `open(url: string)`: メディアURLでビューアを開く
|
|
167
|
+
- `close()`: ビューアを閉じる
|
|
168
|
+
|
|
169
|
+
**プロパティ:**
|
|
170
|
+
- `showPrevButton` (boolean): 前へナビゲーションボタンの表示/非表示
|
|
171
|
+
- `showNextButton` (boolean): 次へナビゲーションボタンの表示/非表示
|
|
172
|
+
|
|
173
|
+
**イベント:**
|
|
174
|
+
- `close`: ビューアが閉じられたときに発火
|
|
175
|
+
- `navigate-prev`: 前へボタンがクリックされたときに発火
|
|
176
|
+
- `navigate-next`: 次へボタンがクリックされたときに発火
|
|
177
|
+
|
|
178
|
+
### メディア固有の例
|
|
179
|
+
|
|
180
|
+
#### 3Dモデルビューア
|
|
181
|
+
```html
|
|
182
|
+
<cc-swiper-slide
|
|
183
|
+
thumbnail-url="thumb.jpg"
|
|
184
|
+
image-url="model.obj"
|
|
185
|
+
image-type="3dmodel"
|
|
186
|
+
material-url="model.mtl"
|
|
187
|
+
debug-mode="true"
|
|
188
|
+
camera-position="0,1,5"
|
|
189
|
+
camera-target="0,0,0"
|
|
190
|
+
show-texture="true">
|
|
191
|
+
</cc-swiper-slide>
|
|
192
|
+
```
|
|
193
|
+
|
|
194
|
+
#### Gaussianスプラッティングビューア
|
|
195
|
+
```html
|
|
196
|
+
<cc-swiper-slide
|
|
197
|
+
thumbnail-url="thumb.jpg"
|
|
198
|
+
image-url="scene.splat"
|
|
199
|
+
image-type="gaussian"
|
|
200
|
+
debug-mode="true"
|
|
201
|
+
camera-position="0,0,10">
|
|
202
|
+
</cc-swiper-slide>
|
|
203
|
+
```
|
|
204
|
+
|
|
205
|
+
#### YouTube動画
|
|
206
|
+
```html
|
|
207
|
+
<cc-swiper-slide
|
|
208
|
+
thumbnail-url="thumb.jpg"
|
|
209
|
+
image-url="https://www.youtube.com/watch?v=VIDEO_ID"
|
|
210
|
+
image-type="youtube">
|
|
211
|
+
</cc-swiper-slide>
|
|
212
|
+
```
|
|
213
|
+
|
|
214
|
+
## スタイリング
|
|
215
|
+
|
|
216
|
+
CSSカスタムプロパティ:
|
|
217
|
+
|
|
218
|
+
```css
|
|
219
|
+
cc-swiper {
|
|
220
|
+
--cc-slider-theme-color: #007aff;
|
|
221
|
+
--cc-slider-navigation-color: #007aff;
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
cc-viewer-base,
|
|
225
|
+
cc-viewer-image,
|
|
226
|
+
cc-viewer-panorama,
|
|
227
|
+
cc-viewer-youtube,
|
|
228
|
+
cc-viewer-video,
|
|
229
|
+
cc-viewer-3dmodel,
|
|
230
|
+
cc-viewer-gaussian {
|
|
231
|
+
--cc-viewer-z-index: 1000;
|
|
232
|
+
}
|
|
233
|
+
```
|
|
234
|
+
|
|
235
|
+
## ブラウザサポート
|
|
236
|
+
|
|
237
|
+
ブラウザ互換性の詳細については、[要件](#要件)セクションを参照してください。
|
|
238
|
+
|
|
239
|
+
## 開発
|
|
240
|
+
|
|
241
|
+
```bash
|
|
242
|
+
# 依存関係のインストール
|
|
243
|
+
pnpm install
|
|
244
|
+
|
|
245
|
+
# 開発サーバーの起動
|
|
246
|
+
pnpm run dev
|
|
247
|
+
|
|
248
|
+
# テストの実行
|
|
249
|
+
pnpm test
|
|
250
|
+
|
|
251
|
+
# ライブラリのビルド
|
|
252
|
+
pnpm run build
|
|
253
|
+
```
|
|
254
|
+
|
|
255
|
+
## ライセンス
|
|
256
|
+
|
|
257
|
+
MIT License
|
|
258
|
+
|
|
259
|
+
Copyright (c) 2024-2026 Code for History
|
|
260
|
+
|
|
261
|
+
詳細は[LICENSE](LICENSE)ファイルを参照してください。
|
|
262
|
+
|
|
263
|
+
## Quyuanからの移行
|
|
264
|
+
|
|
265
|
+
元のQuyuan実装から移行する場合:
|
|
266
|
+
|
|
267
|
+
1. インポートを`quyuan`から`@c4h/chuci`に変更
|
|
268
|
+
2. コンポーネント名は同じまま(`cc-swiper`、`cc-swiper-slide`など)
|
|
269
|
+
3. 3DモデルのURLはパイプ区切り形式を使用しなくなりました:
|
|
270
|
+
```html
|
|
271
|
+
<!-- 旧 -->
|
|
272
|
+
<cc-swiper-slide image-url="model.obj|model.mtl" ...>
|
|
273
|
+
|
|
274
|
+
<!-- 新 -->
|
|
275
|
+
<cc-swiper-slide image-url="model.obj" material-url="model.mtl" ...>
|
|
276
|
+
```
|
|
277
|
+
|
|
278
|
+
## クレジット
|
|
279
|
+
|
|
144
280
|
Code for Historyによる[Quyuan](https://github.com/code4history/Quyuan)から抽出。
|