@ericchen1990/pano-view 3.10.0 → 4.0.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.
- package/README.md +109 -41
- package/README.zh-CN.md +94 -33
- package/dist/data.cjs +64 -17
- package/dist/data.cjs.map +1 -1
- package/dist/data.d.mts +24 -12
- package/dist/data.d.ts +24 -12
- package/dist/data.mjs +64 -17
- package/dist/data.mjs.map +1 -1
- package/dist/index.cjs +455 -196
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +88 -45
- package/dist/index.d.ts +88 -45
- package/dist/index.mjs +450 -196
- package/dist/index.mjs.map +1 -1
- package/dist/styles.css +79 -74
- package/docs/dialogs.md +1 -1
- package/docs/dialogs.zh-CN.md +1 -1
- package/package.json +1 -1
package/dist/styles.css
CHANGED
|
@@ -593,45 +593,100 @@
|
|
|
593
593
|
padding: 0 16px 16px;
|
|
594
594
|
}
|
|
595
595
|
|
|
596
|
-
.pano-
|
|
597
|
-
background: transparent;
|
|
598
|
-
display: block;
|
|
599
|
-
pointer-events: none;
|
|
600
|
-
position: absolute;
|
|
596
|
+
.pano-overlay-anchor {
|
|
601
597
|
transition: transform 240ms ease;
|
|
602
|
-
z-index: 2;
|
|
603
598
|
}
|
|
604
599
|
|
|
605
|
-
.pano-
|
|
606
|
-
transform: translateY(
|
|
607
|
-
calc(100% + var(--pano-scene-menu-dock-inset, 12px))
|
|
608
|
-
);
|
|
600
|
+
.pano-overlay-anchor[data-collapse-edge="bottom"][data-collapsed="true"] {
|
|
601
|
+
transform: translateY(calc(100% + var(--pano-overlay-dock-inset, 0px)));
|
|
609
602
|
}
|
|
610
603
|
|
|
611
|
-
.pano-
|
|
612
|
-
transform: translateY(
|
|
613
|
-
calc(-100% - var(--pano-scene-menu-dock-inset, 12px))
|
|
614
|
-
);
|
|
604
|
+
.pano-overlay-anchor[data-collapse-edge="top"][data-collapsed="true"] {
|
|
605
|
+
transform: translateY(calc(-100% - var(--pano-overlay-dock-inset, 0px)));
|
|
615
606
|
}
|
|
616
607
|
|
|
617
|
-
.pano-
|
|
618
|
-
transform: translateX(
|
|
619
|
-
calc(-100% - var(--pano-scene-menu-dock-inset, 12px))
|
|
620
|
-
);
|
|
608
|
+
.pano-overlay-anchor[data-collapse-edge="left"][data-collapsed="true"] {
|
|
609
|
+
transform: translateX(calc(-100% - var(--pano-overlay-dock-inset, 0px)));
|
|
621
610
|
}
|
|
622
611
|
|
|
623
|
-
.pano-
|
|
624
|
-
transform: translateX(
|
|
625
|
-
calc(100% + var(--pano-scene-menu-dock-inset, 12px))
|
|
626
|
-
);
|
|
612
|
+
.pano-overlay-anchor[data-collapse-edge="right"][data-collapsed="true"] {
|
|
613
|
+
transform: translateX(calc(100% + var(--pano-overlay-dock-inset, 0px)));
|
|
627
614
|
}
|
|
628
615
|
|
|
629
616
|
@media (prefers-reduced-motion: reduce) {
|
|
630
|
-
.pano-
|
|
617
|
+
.pano-overlay-anchor {
|
|
631
618
|
transition: none;
|
|
632
619
|
}
|
|
633
620
|
}
|
|
634
621
|
|
|
622
|
+
.pano-overlay-anchor-toggle {
|
|
623
|
+
pointer-events: auto;
|
|
624
|
+
position: absolute;
|
|
625
|
+
z-index: 1;
|
|
626
|
+
}
|
|
627
|
+
|
|
628
|
+
.pano-overlay-anchor[data-collapse-edge="bottom"] .pano-overlay-anchor-toggle,
|
|
629
|
+
.pano-overlay-anchor[data-collapse-edge="top"] .pano-overlay-anchor-toggle {
|
|
630
|
+
height: 1.5rem;
|
|
631
|
+
min-height: 1.5rem;
|
|
632
|
+
min-width: 4.5rem;
|
|
633
|
+
padding: 0;
|
|
634
|
+
width: 4.5rem;
|
|
635
|
+
}
|
|
636
|
+
|
|
637
|
+
.pano-overlay-anchor[data-collapse-edge="left"] .pano-overlay-anchor-toggle,
|
|
638
|
+
.pano-overlay-anchor[data-collapse-edge="right"] .pano-overlay-anchor-toggle {
|
|
639
|
+
height: 4.5rem;
|
|
640
|
+
min-height: 4.5rem;
|
|
641
|
+
min-width: 1.5rem;
|
|
642
|
+
padding: 0;
|
|
643
|
+
width: 1.5rem;
|
|
644
|
+
}
|
|
645
|
+
|
|
646
|
+
.pano-overlay-anchor-toggle svg {
|
|
647
|
+
flex: none;
|
|
648
|
+
}
|
|
649
|
+
|
|
650
|
+
.pano-overlay-anchor[data-collapse-edge="bottom"] .pano-overlay-anchor-toggle {
|
|
651
|
+
border-radius: var(--pano-overlay-anchor-radius, 8px)
|
|
652
|
+
var(--pano-overlay-anchor-radius, 8px) 0 0;
|
|
653
|
+
bottom: 100%;
|
|
654
|
+
left: 50%;
|
|
655
|
+
transform: translateX(-50%);
|
|
656
|
+
}
|
|
657
|
+
|
|
658
|
+
.pano-overlay-anchor[data-collapse-edge="top"] .pano-overlay-anchor-toggle {
|
|
659
|
+
border-radius: 0 0 var(--pano-overlay-anchor-radius, 8px)
|
|
660
|
+
var(--pano-overlay-anchor-radius, 8px);
|
|
661
|
+
left: 50%;
|
|
662
|
+
top: 100%;
|
|
663
|
+
transform: translateX(-50%);
|
|
664
|
+
}
|
|
665
|
+
|
|
666
|
+
.pano-overlay-anchor[data-collapse-edge="left"] .pano-overlay-anchor-toggle {
|
|
667
|
+
border-radius: 0 var(--pano-overlay-anchor-radius, 8px)
|
|
668
|
+
var(--pano-overlay-anchor-radius, 8px) 0;
|
|
669
|
+
left: 100%;
|
|
670
|
+
top: 50%;
|
|
671
|
+
transform: translateY(-50%);
|
|
672
|
+
}
|
|
673
|
+
|
|
674
|
+
.pano-overlay-anchor[data-collapse-edge="right"] .pano-overlay-anchor-toggle {
|
|
675
|
+
border-radius: var(--pano-overlay-anchor-radius, 8px) 0 0
|
|
676
|
+
var(--pano-overlay-anchor-radius, 8px);
|
|
677
|
+
right: 100%;
|
|
678
|
+
top: 50%;
|
|
679
|
+
transform: translateY(-50%);
|
|
680
|
+
}
|
|
681
|
+
|
|
682
|
+
.pano-scene-menu {
|
|
683
|
+
background: transparent;
|
|
684
|
+
display: block;
|
|
685
|
+
pointer-events: none;
|
|
686
|
+
position: absolute;
|
|
687
|
+
z-index: 2;
|
|
688
|
+
}
|
|
689
|
+
|
|
635
690
|
.pano-scene-menu-body {
|
|
636
691
|
align-items: center;
|
|
637
692
|
background: var(--pano-scene-menu-background, rgba(16, 16, 16, 0.72));
|
|
@@ -805,56 +860,6 @@
|
|
|
805
860
|
}
|
|
806
861
|
|
|
807
862
|
.pano-scene-menu-toggle {
|
|
863
|
+
--pano-overlay-anchor-radius: var(--pano-scene-menu-radius, 8px);
|
|
808
864
|
background: var(--pano-scene-menu-background, rgba(16, 16, 16, 0.72));
|
|
809
|
-
pointer-events: auto;
|
|
810
|
-
position: absolute;
|
|
811
|
-
z-index: 1;
|
|
812
|
-
}
|
|
813
|
-
|
|
814
|
-
.pano-scene-menu[data-placement="bottom"] .pano-scene-menu-toggle,
|
|
815
|
-
.pano-scene-menu[data-placement="top"] .pano-scene-menu-toggle {
|
|
816
|
-
height: 1.5rem;
|
|
817
|
-
min-height: 1.5rem;
|
|
818
|
-
min-width: 4.5rem;
|
|
819
|
-
width: 4.5rem;
|
|
820
|
-
}
|
|
821
|
-
|
|
822
|
-
.pano-scene-menu[data-placement="left"] .pano-scene-menu-toggle,
|
|
823
|
-
.pano-scene-menu[data-placement="right"] .pano-scene-menu-toggle {
|
|
824
|
-
height: 4.5rem;
|
|
825
|
-
min-height: 4.5rem;
|
|
826
|
-
min-width: 1.5rem;
|
|
827
|
-
width: 1.5rem;
|
|
828
|
-
}
|
|
829
|
-
|
|
830
|
-
.pano-scene-menu[data-placement="bottom"] .pano-scene-menu-toggle {
|
|
831
|
-
border-radius: var(--pano-scene-menu-radius, 8px)
|
|
832
|
-
var(--pano-scene-menu-radius, 8px) 0 0;
|
|
833
|
-
bottom: 100%;
|
|
834
|
-
left: 50%;
|
|
835
|
-
transform: translateX(-50%);
|
|
836
|
-
}
|
|
837
|
-
|
|
838
|
-
.pano-scene-menu[data-placement="top"] .pano-scene-menu-toggle {
|
|
839
|
-
border-radius: 0 0 var(--pano-scene-menu-radius, 8px)
|
|
840
|
-
var(--pano-scene-menu-radius, 8px);
|
|
841
|
-
left: 50%;
|
|
842
|
-
top: 100%;
|
|
843
|
-
transform: translateX(-50%);
|
|
844
|
-
}
|
|
845
|
-
|
|
846
|
-
.pano-scene-menu[data-placement="left"] .pano-scene-menu-toggle {
|
|
847
|
-
border-radius: 0 var(--pano-scene-menu-radius, 8px)
|
|
848
|
-
var(--pano-scene-menu-radius, 8px) 0;
|
|
849
|
-
left: 100%;
|
|
850
|
-
top: 50%;
|
|
851
|
-
transform: translateY(-50%);
|
|
852
|
-
}
|
|
853
|
-
|
|
854
|
-
.pano-scene-menu[data-placement="right"] .pano-scene-menu-toggle {
|
|
855
|
-
border-radius: var(--pano-scene-menu-radius, 8px) 0 0
|
|
856
|
-
var(--pano-scene-menu-radius, 8px);
|
|
857
|
-
right: 100%;
|
|
858
|
-
top: 50%;
|
|
859
|
-
transform: translateY(-50%);
|
|
860
865
|
}
|
package/docs/dialogs.md
CHANGED
|
@@ -122,7 +122,7 @@ The registry below contains two different articles, a video, a gallery and an if
|
|
|
122
122
|
| `entrance` | `guide` | iframe | Courtyard guide |
|
|
123
123
|
| `hall` | `story` | article | Hall story |
|
|
124
124
|
|
|
125
|
-
The complete source defines every content component, the registry, selection state and click handler.
|
|
125
|
+
The complete source defines every content component, the registry, selection state and click handler. On `/overlays`, Default dialog shows this file; Compose parts and Third-party dialog switch the sample to their own dialog shells. Save it as `multi-hotspot-example.tsx`, pass a loaded project as `project`, and replace the `/fixtures/...` URLs with your own assets outside this repository.
|
|
126
126
|
|
|
127
127
|
```tsx
|
|
128
128
|
import { useEffect, useRef, useState, type ReactNode } from "react";
|
package/docs/dialogs.zh-CN.md
CHANGED
|
@@ -122,7 +122,7 @@ export function Tour({ project }: { project: LoadedPanoProject }) {
|
|
|
122
122
|
| `entrance` | `guide` | iframe | Courtyard guide |
|
|
123
123
|
| `hall` | `story` | article | Hall story |
|
|
124
124
|
|
|
125
|
-
|
|
125
|
+
下面是完整源码,包含所有内容组件、映射、选中状态和点击处理。`/overlays` 页的 Default dialog 展示这份源码;Compose parts 与 Third-party dialog 会换成各自的弹窗示例。保存为 `multi-hotspot-example.tsx`,以 `project` 传入已加载的项目即可;在仓库外使用时,将 `/fixtures/...` 替换为自己的资源地址。
|
|
126
126
|
|
|
127
127
|
```tsx
|
|
128
128
|
import { useEffect, useRef, useState, type ReactNode } from "react";
|