@ericchen1990/pano-view 2.1.0 → 2.2.1

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.
@@ -0,0 +1,340 @@
1
+ /* Built-in HTML chrome. Import as `@ericchen1990/pano-view/styles.css`. */
2
+
3
+ .pano-viewer,
4
+ .pano-chrome-overlay,
5
+ .pano-context-menu,
6
+ .pano-webvr-button,
7
+ .pano-webvr-setup,
8
+ .pano-video-controls,
9
+ .pano-video-chrome-button,
10
+ .pano-video-chrome-menu,
11
+ .pano-video-volume-popover {
12
+ box-sizing: border-box;
13
+ }
14
+
15
+ .pano-viewer {
16
+ overflow: hidden;
17
+ position: relative;
18
+ }
19
+
20
+ .pano-chrome-overlay {
21
+ inset: 0;
22
+ pointer-events: none;
23
+ position: absolute;
24
+ z-index: 15;
25
+ }
26
+
27
+ .pano-sr-only {
28
+ border: 0;
29
+ clip-path: inset(50%);
30
+ height: 1px;
31
+ margin: -1px;
32
+ overflow: hidden;
33
+ padding: 0;
34
+ position: absolute;
35
+ white-space: nowrap;
36
+ width: 1px;
37
+ }
38
+
39
+ .pano-hotspot-tooltip {
40
+ display: flex;
41
+ gap: 0.5rem;
42
+ pointer-events: none;
43
+ white-space: nowrap;
44
+ }
45
+
46
+ .pano-hotspot-tooltip-image {
47
+ border-radius: 0.25rem;
48
+ display: block;
49
+ height: auto;
50
+ max-height: 120px;
51
+ max-width: 220px;
52
+ object-fit: contain;
53
+ }
54
+
55
+ .pano-hotspot-tooltip-text {
56
+ line-height: 1.4;
57
+ margin: 0;
58
+ overflow: visible;
59
+ white-space: nowrap;
60
+ }
61
+
62
+ .pano-iframe-hotspot {
63
+ border: 0;
64
+ display: block;
65
+ height: 100%;
66
+ width: 100%;
67
+ }
68
+
69
+ .pano-video-captions {
70
+ display: flex;
71
+ justify-content: center;
72
+ left: 0;
73
+ pointer-events: none;
74
+ position: absolute;
75
+ right: 0;
76
+ z-index: 1;
77
+ }
78
+
79
+ .pano-context-menu {
80
+ pointer-events: auto;
81
+ position: relative;
82
+ user-select: none;
83
+ }
84
+
85
+ .pano-context-menu-backdrop {
86
+ inset: 0;
87
+ pointer-events: none;
88
+ position: absolute;
89
+ z-index: 0;
90
+ }
91
+
92
+ .pano-context-menu-items {
93
+ position: relative;
94
+ z-index: 1;
95
+ }
96
+
97
+ .pano-context-menu-item {
98
+ align-items: center;
99
+ box-sizing: border-box;
100
+ display: flex;
101
+ gap: 0.5rem;
102
+ text-align: left;
103
+ width: 100%;
104
+ }
105
+
106
+ .pano-context-menu-item-icon {
107
+ align-items: center;
108
+ display: inline-flex;
109
+ flex-shrink: 0;
110
+ justify-content: center;
111
+ }
112
+
113
+ .pano-context-menu-shell {
114
+ position: absolute;
115
+ z-index: 20;
116
+ }
117
+
118
+ .pano-webvr-button {
119
+ backdrop-filter: blur(4px);
120
+ border: 1px solid rgb(255 255 255 / 0.2);
121
+ box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
122
+ cursor: pointer;
123
+ font: inherit;
124
+ font-weight: 600;
125
+ padding: 0.5rem 0.75rem;
126
+ pointer-events: auto;
127
+ }
128
+
129
+ .pano-webvr-setup {
130
+ backdrop-filter: blur(12px);
131
+ border: 1px solid rgb(255 255 255 / 0.2);
132
+ box-shadow: 0 25px 50px -12px rgb(0 0 0 / 0.25);
133
+ left: 50%;
134
+ padding: 1.25rem;
135
+ pointer-events: auto;
136
+ position: absolute;
137
+ text-align: center;
138
+ top: 50%;
139
+ transform: translate(-50%, -50%);
140
+ width: min(22rem, calc(100% - 2rem));
141
+ }
142
+
143
+ .pano-webvr-setup-title {
144
+ font-size: 1.5rem;
145
+ font-weight: 800;
146
+ margin: 0 0 1.25rem;
147
+ }
148
+
149
+ .pano-webvr-setup-field {
150
+ display: block;
151
+ font-weight: 600;
152
+ margin-bottom: 1.25rem;
153
+ }
154
+
155
+ .pano-webvr-setup-row {
156
+ align-items: center;
157
+ display: flex;
158
+ gap: 0.75rem;
159
+ justify-content: center;
160
+ margin-top: 0.5rem;
161
+ }
162
+
163
+ .pano-webvr-setup-stepper {
164
+ background: transparent;
165
+ border: 0;
166
+ color: inherit;
167
+ cursor: pointer;
168
+ font: inherit;
169
+ font-size: 1.5rem;
170
+ padding: 0;
171
+ }
172
+
173
+ .pano-webvr-setup-value {
174
+ font-size: 1.25rem;
175
+ min-width: 4rem;
176
+ }
177
+
178
+ .pano-webvr-setup-value-wide {
179
+ font-size: 1.25rem;
180
+ min-width: 8rem;
181
+ }
182
+
183
+ .pano-webvr-setup-fieldset {
184
+ border: 0;
185
+ margin: 0 0 1.25rem;
186
+ padding: 0;
187
+ }
188
+
189
+ .pano-webvr-setup-legend {
190
+ font-weight: 600;
191
+ margin-bottom: 0.5rem;
192
+ }
193
+
194
+ .pano-webvr-toolbar {
195
+ display: flex;
196
+ inset-inline: 0;
197
+ justify-content: center;
198
+ pointer-events: none;
199
+ position: absolute;
200
+ top: 1rem;
201
+ }
202
+
203
+ .pano-webvr-toolbar-actions {
204
+ display: flex;
205
+ gap: 0.5rem;
206
+ }
207
+
208
+ .pano-webvr-hint {
209
+ bottom: 1.25rem;
210
+ color: #fff;
211
+ filter: drop-shadow(0 1px 1px rgb(0 0 0 / 0.06))
212
+ drop-shadow(0 1px 2px rgb(0 0 0 / 0.1));
213
+ font-size: 0.75rem;
214
+ font-weight: 600;
215
+ inset-inline: 0;
216
+ margin: 0;
217
+ pointer-events: none;
218
+ position: absolute;
219
+ text-align: center;
220
+ }
221
+
222
+ .pano-video-chrome-button {
223
+ align-items: center;
224
+ background: transparent;
225
+ border: 0;
226
+ border-radius: 4px;
227
+ cursor: pointer;
228
+ display: inline-flex;
229
+ height: 28px;
230
+ justify-content: center;
231
+ min-width: 28px;
232
+ padding: 4px;
233
+ }
234
+
235
+ .pano-video-chrome-button:disabled {
236
+ cursor: default;
237
+ opacity: 0.45;
238
+ }
239
+
240
+ .pano-video-chrome-menu {
241
+ display: flex;
242
+ flex-direction: column;
243
+ min-width: 7rem;
244
+ padding: 0.25rem;
245
+ pointer-events: auto;
246
+ position: absolute;
247
+ right: 0;
248
+ }
249
+
250
+ .pano-video-chrome-menu-item,
251
+ .pano-video-chrome-menu-action {
252
+ background: transparent;
253
+ border: 0;
254
+ border-radius: 0.25rem;
255
+ cursor: pointer;
256
+ padding: 0.375rem 0.625rem;
257
+ text-align: left;
258
+ white-space: nowrap;
259
+ }
260
+
261
+ .pano-video-chrome-menu-action {
262
+ align-items: center;
263
+ display: flex;
264
+ gap: 0.75rem;
265
+ justify-content: space-between;
266
+ }
267
+
268
+ .pano-video-chrome-menu-label {
269
+ font-size: 10px;
270
+ letter-spacing: 0.08em;
271
+ opacity: 0.7;
272
+ padding: 0.5rem 0.625rem 0.25rem;
273
+ text-transform: uppercase;
274
+ }
275
+
276
+ .pano-video-chrome-menu-divider {
277
+ background: rgb(255 255 255 / 0.1);
278
+ height: 1px;
279
+ margin: 0.25rem 0;
280
+ }
281
+
282
+ .pano-video-chrome-menu-list {
283
+ display: flex;
284
+ flex-direction: column;
285
+ max-height: 12rem;
286
+ overflow-y: auto;
287
+ }
288
+
289
+ .pano-video-volume {
290
+ position: relative;
291
+ }
292
+
293
+ .pano-video-volume-popover {
294
+ align-items: center;
295
+ display: flex;
296
+ flex-direction: column;
297
+ left: 50%;
298
+ min-width: 2.75rem;
299
+ pointer-events: auto;
300
+ position: absolute;
301
+ transform: translateX(-50%);
302
+ }
303
+
304
+ .pano-video-volume-percent {
305
+ font-variant-numeric: tabular-nums;
306
+ font-weight: 700;
307
+ line-height: 1;
308
+ margin-bottom: 0.875rem;
309
+ }
310
+
311
+ .pano-video-volume-track {
312
+ border-radius: 999px;
313
+ cursor: pointer;
314
+ position: relative;
315
+ }
316
+
317
+ .pano-video-menu {
318
+ position: relative;
319
+ }
320
+
321
+ .pano-video-chrome-label {
322
+ font-size: 11px;
323
+ padding: 0 0.125rem;
324
+ }
325
+
326
+ .pano-video-controls {
327
+ align-items: center;
328
+ display: flex;
329
+ gap: 0.5rem;
330
+ pointer-events: auto;
331
+ position: absolute;
332
+ transition: opacity 160ms ease;
333
+ z-index: 2;
334
+ }
335
+
336
+ .pano-video-time {
337
+ font-variant-numeric: tabular-nums;
338
+ min-width: 2.125rem;
339
+ opacity: 0.85;
340
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ericchen1990/pano-view",
3
- "version": "2.1.0",
3
+ "version": "2.2.1",
4
4
  "description": "React components for panoramic viewing experiences.",
5
5
  "author": "Eric Chen",
6
6
  "license": "MIT",
@@ -19,10 +19,13 @@
19
19
  "url": "https://github.com/Eric-Chen1990/pano-view/issues"
20
20
  },
21
21
  "homepage": "https://github.com/Eric-Chen1990/pano-view#readme",
22
- "sideEffects": false,
22
+ "sideEffects": [
23
+ "*.css"
24
+ ],
23
25
  "files": [
24
26
  "dist",
25
27
  "README.md",
28
+ "README.zh-CN.md",
26
29
  "LICENSE"
27
30
  ],
28
31
  "main": "./dist/index.cjs",
@@ -33,7 +36,8 @@
33
36
  "types": "./dist/index.d.ts",
34
37
  "import": "./dist/index.mjs",
35
38
  "require": "./dist/index.cjs"
36
- }
39
+ },
40
+ "./styles.css": "./dist/styles.css"
37
41
  },
38
42
  "dependencies": {
39
43
  "@types/three": "^0.185.0"
@@ -59,7 +63,7 @@
59
63
  "typescript": "^5.9.3"
60
64
  },
61
65
  "scripts": {
62
- "build": "tsup",
66
+ "build": "tsup && node -e \"require('node:fs').copyFileSync('src/styles.css', 'dist/styles.css')\"",
63
67
  "typecheck": "tsc --noEmit"
64
68
  }
65
69
  }