@behindthemusictree/genre-tree-view 6.5.0 → 7.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/dist/index.cjs +17 -35
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +3 -8
- package/dist/index.d.ts +3 -8
- package/dist/index.js +17 -35
- package/dist/index.js.map +1 -1
- package/dist/styles.css +12 -5
- package/package.json +3 -3
package/dist/index.cjs
CHANGED
|
@@ -717,32 +717,22 @@ function BusyIndicator() {
|
|
|
717
717
|
|
|
718
718
|
// src/FloatingControls.tsx
|
|
719
719
|
var import_jsx_runtime3 = require("react/jsx-runtime");
|
|
720
|
-
function FloatingControls({ panZoom, onFit,
|
|
721
|
-
return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
|
|
722
|
-
|
|
723
|
-
{
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
onFit,
|
|
737
|
-
canZoomIn: panZoom.canZoomIn,
|
|
738
|
-
canZoomOut: panZoom.canZoomOut,
|
|
739
|
-
orientation,
|
|
740
|
-
className: zoomControls === "auto" ? "gtv-zoom-controls gtv-zoom-controls--auto" : "gtv-zoom-controls"
|
|
741
|
-
}
|
|
742
|
-
)
|
|
743
|
-
]
|
|
744
|
-
}
|
|
745
|
-
);
|
|
720
|
+
function FloatingControls({ panZoom, onFit, zoomControls, leading, busy }) {
|
|
721
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "gtv-wheel-floating-controls", children: [
|
|
722
|
+
busy && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(BusyIndicator, {}),
|
|
723
|
+
leading && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: "gtv-floating-controls-leading", children: leading }),
|
|
724
|
+
zoomControls !== "never" && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
725
|
+
import_ui.ZoomControls,
|
|
726
|
+
{
|
|
727
|
+
onZoomIn: panZoom.zoomIn,
|
|
728
|
+
onZoomOut: panZoom.zoomOut,
|
|
729
|
+
onFit,
|
|
730
|
+
canZoomIn: panZoom.canZoomIn,
|
|
731
|
+
canZoomOut: panZoom.canZoomOut,
|
|
732
|
+
className: zoomControls === "auto" ? "gtv-zoom-controls gtv-zoom-controls--auto" : "gtv-zoom-controls"
|
|
733
|
+
}
|
|
734
|
+
)
|
|
735
|
+
] });
|
|
746
736
|
}
|
|
747
737
|
|
|
748
738
|
// src/use-pan-zoom.ts
|
|
@@ -2052,7 +2042,6 @@ function GenreTree({
|
|
|
2052
2042
|
defaultViewport,
|
|
2053
2043
|
viewportRestore,
|
|
2054
2044
|
onViewportChange,
|
|
2055
|
-
controlsOrientation = "vertical",
|
|
2056
2045
|
showZoomControls = "auto",
|
|
2057
2046
|
floatingControlsLeading,
|
|
2058
2047
|
busy
|
|
@@ -2347,7 +2336,6 @@ function GenreTree({
|
|
|
2347
2336
|
FloatingControls,
|
|
2348
2337
|
{
|
|
2349
2338
|
panZoom,
|
|
2350
|
-
orientation: controlsOrientation,
|
|
2351
2339
|
zoomControls: showZoomControls,
|
|
2352
2340
|
leading: floatingControlsLeading,
|
|
2353
2341
|
busy,
|
|
@@ -2474,7 +2462,6 @@ function WheelCore({
|
|
|
2474
2462
|
defaultViewport,
|
|
2475
2463
|
viewportRestore,
|
|
2476
2464
|
onViewportChange,
|
|
2477
|
-
controlsOrientation = "vertical",
|
|
2478
2465
|
showZoomControls = "auto",
|
|
2479
2466
|
floatingControlsLeading,
|
|
2480
2467
|
busy,
|
|
@@ -2587,7 +2574,7 @@ function WheelCore({
|
|
|
2587
2574
|
(0, import_react9.useEffect)(() => {
|
|
2588
2575
|
if (!selectedNodeId || panel?.node.id === selectedNodeId) return;
|
|
2589
2576
|
const targetNode = nodes.find((node) => node.id === selectedNodeId);
|
|
2590
|
-
const element =
|
|
2577
|
+
const element = viewportRef.current?.querySelector(
|
|
2591
2578
|
`#group-${CSS.escape(selectedNodeId)}`
|
|
2592
2579
|
);
|
|
2593
2580
|
if (!targetNode || !element) return;
|
|
@@ -2856,7 +2843,6 @@ function WheelCore({
|
|
|
2856
2843
|
FloatingControls,
|
|
2857
2844
|
{
|
|
2858
2845
|
panZoom,
|
|
2859
|
-
orientation: controlsOrientation,
|
|
2860
2846
|
zoomControls: showZoomControls,
|
|
2861
2847
|
leading: floatingControlsLeading,
|
|
2862
2848
|
busy,
|
|
@@ -3590,7 +3576,6 @@ function WheelRadialCore({
|
|
|
3590
3576
|
defaultViewport,
|
|
3591
3577
|
viewportRestore,
|
|
3592
3578
|
onViewportChange,
|
|
3593
|
-
controlsOrientation = "vertical",
|
|
3594
3579
|
showZoomControls = "auto",
|
|
3595
3580
|
floatingControlsLeading,
|
|
3596
3581
|
busy,
|
|
@@ -4078,7 +4063,6 @@ function WheelRadialCore({
|
|
|
4078
4063
|
FloatingControls,
|
|
4079
4064
|
{
|
|
4080
4065
|
panZoom,
|
|
4081
|
-
orientation: controlsOrientation,
|
|
4082
4066
|
zoomControls: showZoomControls,
|
|
4083
4067
|
leading: floatingControlsLeading,
|
|
4084
4068
|
busy,
|
|
@@ -4276,7 +4260,6 @@ function WheelRadialPopCoreCore({
|
|
|
4276
4260
|
defaultViewport,
|
|
4277
4261
|
viewportRestore,
|
|
4278
4262
|
onViewportChange,
|
|
4279
|
-
controlsOrientation = "vertical",
|
|
4280
4263
|
showZoomControls = "auto",
|
|
4281
4264
|
floatingControlsLeading,
|
|
4282
4265
|
busy,
|
|
@@ -5282,7 +5265,6 @@ function WheelRadialPopCoreCore({
|
|
|
5282
5265
|
FloatingControls,
|
|
5283
5266
|
{
|
|
5284
5267
|
panZoom,
|
|
5285
|
-
orientation: controlsOrientation,
|
|
5286
5268
|
zoomControls: showZoomControls,
|
|
5287
5269
|
leading: floatingControlsLeading,
|
|
5288
5270
|
busy,
|