@ericchen1990/pano-view 2.1.0 → 2.2.0

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,339 @@
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
+ display: flex;
100
+ gap: 0.5rem;
101
+ text-align: left;
102
+ width: 100%;
103
+ }
104
+
105
+ .pano-context-menu-item-icon {
106
+ align-items: center;
107
+ display: inline-flex;
108
+ flex-shrink: 0;
109
+ justify-content: center;
110
+ }
111
+
112
+ .pano-context-menu-shell {
113
+ position: absolute;
114
+ z-index: 20;
115
+ }
116
+
117
+ .pano-webvr-button {
118
+ backdrop-filter: blur(4px);
119
+ border: 1px solid rgb(255 255 255 / 0.2);
120
+ box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
121
+ cursor: pointer;
122
+ font: inherit;
123
+ font-weight: 600;
124
+ padding: 0.5rem 0.75rem;
125
+ pointer-events: auto;
126
+ }
127
+
128
+ .pano-webvr-setup {
129
+ backdrop-filter: blur(12px);
130
+ border: 1px solid rgb(255 255 255 / 0.2);
131
+ box-shadow: 0 25px 50px -12px rgb(0 0 0 / 0.25);
132
+ left: 50%;
133
+ padding: 1.25rem;
134
+ pointer-events: auto;
135
+ position: absolute;
136
+ text-align: center;
137
+ top: 50%;
138
+ transform: translate(-50%, -50%);
139
+ width: min(22rem, calc(100% - 2rem));
140
+ }
141
+
142
+ .pano-webvr-setup-title {
143
+ font-size: 1.5rem;
144
+ font-weight: 800;
145
+ margin: 0 0 1.25rem;
146
+ }
147
+
148
+ .pano-webvr-setup-field {
149
+ display: block;
150
+ font-weight: 600;
151
+ margin-bottom: 1.25rem;
152
+ }
153
+
154
+ .pano-webvr-setup-row {
155
+ align-items: center;
156
+ display: flex;
157
+ gap: 0.75rem;
158
+ justify-content: center;
159
+ margin-top: 0.5rem;
160
+ }
161
+
162
+ .pano-webvr-setup-stepper {
163
+ background: transparent;
164
+ border: 0;
165
+ color: inherit;
166
+ cursor: pointer;
167
+ font: inherit;
168
+ font-size: 1.5rem;
169
+ padding: 0;
170
+ }
171
+
172
+ .pano-webvr-setup-value {
173
+ font-size: 1.25rem;
174
+ min-width: 4rem;
175
+ }
176
+
177
+ .pano-webvr-setup-value-wide {
178
+ font-size: 1.25rem;
179
+ min-width: 8rem;
180
+ }
181
+
182
+ .pano-webvr-setup-fieldset {
183
+ border: 0;
184
+ margin: 0 0 1.25rem;
185
+ padding: 0;
186
+ }
187
+
188
+ .pano-webvr-setup-legend {
189
+ font-weight: 600;
190
+ margin-bottom: 0.5rem;
191
+ }
192
+
193
+ .pano-webvr-toolbar {
194
+ display: flex;
195
+ inset-inline: 0;
196
+ justify-content: center;
197
+ pointer-events: none;
198
+ position: absolute;
199
+ top: 1rem;
200
+ }
201
+
202
+ .pano-webvr-toolbar-actions {
203
+ display: flex;
204
+ gap: 0.5rem;
205
+ }
206
+
207
+ .pano-webvr-hint {
208
+ bottom: 1.25rem;
209
+ color: #fff;
210
+ filter: drop-shadow(0 1px 1px rgb(0 0 0 / 0.06))
211
+ drop-shadow(0 1px 2px rgb(0 0 0 / 0.1));
212
+ font-size: 0.75rem;
213
+ font-weight: 600;
214
+ inset-inline: 0;
215
+ margin: 0;
216
+ pointer-events: none;
217
+ position: absolute;
218
+ text-align: center;
219
+ }
220
+
221
+ .pano-video-chrome-button {
222
+ align-items: center;
223
+ background: transparent;
224
+ border: 0;
225
+ border-radius: 4px;
226
+ cursor: pointer;
227
+ display: inline-flex;
228
+ height: 28px;
229
+ justify-content: center;
230
+ min-width: 28px;
231
+ padding: 4px;
232
+ }
233
+
234
+ .pano-video-chrome-button:disabled {
235
+ cursor: default;
236
+ opacity: 0.45;
237
+ }
238
+
239
+ .pano-video-chrome-menu {
240
+ display: flex;
241
+ flex-direction: column;
242
+ min-width: 7rem;
243
+ padding: 0.25rem;
244
+ pointer-events: auto;
245
+ position: absolute;
246
+ right: 0;
247
+ }
248
+
249
+ .pano-video-chrome-menu-item,
250
+ .pano-video-chrome-menu-action {
251
+ background: transparent;
252
+ border: 0;
253
+ border-radius: 0.25rem;
254
+ cursor: pointer;
255
+ padding: 0.375rem 0.625rem;
256
+ text-align: left;
257
+ white-space: nowrap;
258
+ }
259
+
260
+ .pano-video-chrome-menu-action {
261
+ align-items: center;
262
+ display: flex;
263
+ gap: 0.75rem;
264
+ justify-content: space-between;
265
+ }
266
+
267
+ .pano-video-chrome-menu-label {
268
+ font-size: 10px;
269
+ letter-spacing: 0.08em;
270
+ opacity: 0.7;
271
+ padding: 0.5rem 0.625rem 0.25rem;
272
+ text-transform: uppercase;
273
+ }
274
+
275
+ .pano-video-chrome-menu-divider {
276
+ background: rgb(255 255 255 / 0.1);
277
+ height: 1px;
278
+ margin: 0.25rem 0;
279
+ }
280
+
281
+ .pano-video-chrome-menu-list {
282
+ display: flex;
283
+ flex-direction: column;
284
+ max-height: 12rem;
285
+ overflow-y: auto;
286
+ }
287
+
288
+ .pano-video-volume {
289
+ position: relative;
290
+ }
291
+
292
+ .pano-video-volume-popover {
293
+ align-items: center;
294
+ display: flex;
295
+ flex-direction: column;
296
+ left: 50%;
297
+ min-width: 2.75rem;
298
+ pointer-events: auto;
299
+ position: absolute;
300
+ transform: translateX(-50%);
301
+ }
302
+
303
+ .pano-video-volume-percent {
304
+ font-variant-numeric: tabular-nums;
305
+ font-weight: 700;
306
+ line-height: 1;
307
+ margin-bottom: 0.875rem;
308
+ }
309
+
310
+ .pano-video-volume-track {
311
+ border-radius: 999px;
312
+ cursor: pointer;
313
+ position: relative;
314
+ }
315
+
316
+ .pano-video-menu {
317
+ position: relative;
318
+ }
319
+
320
+ .pano-video-chrome-label {
321
+ font-size: 11px;
322
+ padding: 0 0.125rem;
323
+ }
324
+
325
+ .pano-video-controls {
326
+ align-items: center;
327
+ display: flex;
328
+ gap: 0.5rem;
329
+ pointer-events: auto;
330
+ position: absolute;
331
+ transition: opacity 160ms ease;
332
+ z-index: 2;
333
+ }
334
+
335
+ .pano-video-time {
336
+ font-variant-numeric: tabular-nums;
337
+ min-width: 2.125rem;
338
+ opacity: 0.85;
339
+ }
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.0",
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
  }