@mmmmzxe/react-360-viewer 0.1.15 → 0.1.16
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/README.md +9 -1
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/styles.css +4 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -34,7 +34,15 @@ Import the stylesheet once in your app (e.g. in your root layout or entry file):
|
|
|
34
34
|
import '@mmmmzxe/react-360-viewer/styles.css';
|
|
35
35
|
```
|
|
36
36
|
|
|
37
|
-
Styles are scoped to `[data-viewer-360]` and will not override your app's global theme. Requires a **client component** in Next.js App Router (`'use client'`).
|
|
37
|
+
Styles are scoped to `[data-viewer-360]` via CSS `@scope` and will not override your app's global theme or Tailwind classes. Requires a **client component** in Next.js App Router (`'use client'`).
|
|
38
|
+
|
|
39
|
+
Wrap the viewer in a sized container if needed:
|
|
40
|
+
|
|
41
|
+
```tsx
|
|
42
|
+
<div className="w-full max-w-3xl">
|
|
43
|
+
<Viewer360 frames={frames} />
|
|
44
|
+
</div>
|
|
45
|
+
```
|
|
38
46
|
|
|
39
47
|
If styles don't appear after updating, delete `.next` and restart the dev server.
|
|
40
48
|
|
package/dist/index.js
CHANGED
|
@@ -19,8 +19,8 @@ var defaultViewer360Labels = {
|
|
|
19
19
|
|
|
20
20
|
// src/constants/viewer360ClassNames.ts
|
|
21
21
|
var viewer360ClassNames = {
|
|
22
|
-
root: "overflow-hidden rounded-lg border bg-card text-card-foreground",
|
|
23
|
-
viewport: "relative aspect-[16/10] w-full touch-none select-none bg-muted",
|
|
22
|
+
root: "w-full max-w-full min-w-0 overflow-hidden rounded-lg border bg-card text-card-foreground",
|
|
23
|
+
viewport: "relative aspect-[16/10] w-full max-w-full min-w-0 touch-none select-none bg-muted",
|
|
24
24
|
canvas: "absolute inset-0 size-full",
|
|
25
25
|
overlay: "pointer-events-none absolute inset-0 overflow-hidden",
|
|
26
26
|
loading: "absolute inset-0 flex items-center justify-center bg-muted/80",
|