impact-nova 3.0.0-alpha.22 → 3.0.0-alpha.23
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/_virtual/index.js +4 -4
- package/dist/_virtual/index2.js +4 -4
- package/dist/components/data-display/hex-tilemap/hex-tilemap.js +35 -33
- package/dist/components/data-display/hex-tilemap/hex-tilemap.types.d.ts +2 -0
- package/dist/components/data-display/hex-tilemap/internals/hex-camera.js +30 -28
- package/dist/components/data-display/hex-tilemap/internals/hex-tilemap-context.d.ts +1 -0
- package/dist/components/data-display/hex-tilemap/internals/hex-tilemap-viewport.js +36 -34
- package/dist/components/data-display/hex-tilemap/internals/use-hex-camera.d.ts +2 -1
- package/dist/components/data-display/hex-tilemap/internals/use-hex-camera.js +87 -84
- package/dist/components/flows/iris-chat/iris-chat-chrome.js +203 -185
- package/dist/impact-nova.css +1 -1
- package/dist/lib/primitives/use-field-chrome.js +22 -22
- package/dist/llms/rules/installation.js +1 -1
- package/dist/llms/rules/requirements.js +1 -1
- package/dist/node_modules/hast-util-to-jsx-runtime/lib/index.js +1 -1
- package/dist/node_modules/unified/lib/index.js +1 -1
- package/package.json +1 -1
package/dist/_virtual/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { getDefaultExportFromCjs as
|
|
2
|
-
import { __require as
|
|
3
|
-
var t =
|
|
4
|
-
const a = /* @__PURE__ */
|
|
1
|
+
import { getDefaultExportFromCjs as e } from "./_commonjsHelpers.js";
|
|
2
|
+
import { __require as r } from "../node_modules/extend/index.js";
|
|
3
|
+
var t = r();
|
|
4
|
+
const a = /* @__PURE__ */ e(t);
|
|
5
5
|
export {
|
|
6
6
|
a as default
|
|
7
7
|
};
|
package/dist/_virtual/index2.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { getDefaultExportFromCjs as
|
|
2
|
-
import { __require as
|
|
3
|
-
var t =
|
|
4
|
-
const a = /* @__PURE__ */
|
|
1
|
+
import { getDefaultExportFromCjs as r } from "./_commonjsHelpers.js";
|
|
2
|
+
import { __require as o } from "../node_modules/style-to-js/cjs/index.js";
|
|
3
|
+
var t = o();
|
|
4
|
+
const a = /* @__PURE__ */ r(t);
|
|
5
5
|
export {
|
|
6
6
|
a as default
|
|
7
7
|
};
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { jsx as r, jsxs as
|
|
1
|
+
import { jsx as r, jsxs as O, Fragment as R } from "react/jsx-runtime";
|
|
2
2
|
import * as t from "react";
|
|
3
3
|
import { useControllableState as c } from "@radix-ui/react-use-controllable-state";
|
|
4
|
-
import { createComponent as
|
|
5
|
-
import { cn as
|
|
6
|
-
import { useImpactNovaI18n as
|
|
7
|
-
import { hexTilemapRootVariants as
|
|
8
|
-
import { HEX_ZOOM_DEFAULT as
|
|
9
|
-
import { layoutHexTilemap as
|
|
10
|
-
import { HexTilemapProvider as
|
|
11
|
-
import { HexTilemapLegend as
|
|
12
|
-
import { HexTilemapViewport as
|
|
13
|
-
const
|
|
4
|
+
import { createComponent as _ } from "../../../lib/primitives/create-component.js";
|
|
5
|
+
import { cn as k } from "../../../lib/utils.js";
|
|
6
|
+
import { useImpactNovaI18n as A } from "../../../i18n/use-impact-nova-i18n.js";
|
|
7
|
+
import { hexTilemapRootVariants as D } from "./hex-tilemap.variants.js";
|
|
8
|
+
import { HEX_ZOOM_DEFAULT as U } from "./internals/hex-camera.js";
|
|
9
|
+
import { layoutHexTilemap as X } from "./internals/hex-layout.js";
|
|
10
|
+
import { HexTilemapProvider as Z } from "./internals/hex-tilemap-context.js";
|
|
11
|
+
import { HexTilemapLegend as q } from "./internals/hex-tilemap-legend.js";
|
|
12
|
+
import { HexTilemapViewport as B } from "./internals/hex-tilemap-viewport.js";
|
|
13
|
+
const me = _(
|
|
14
14
|
"HexTilemap",
|
|
15
15
|
({
|
|
16
16
|
className: d,
|
|
@@ -21,16 +21,17 @@ const re = R(
|
|
|
21
21
|
metricLabel: h = "Value",
|
|
22
22
|
formatValue: x = String,
|
|
23
23
|
zoom: S,
|
|
24
|
-
defaultZoom: s =
|
|
24
|
+
defaultZoom: s = U,
|
|
25
25
|
onZoomChange: H,
|
|
26
26
|
hiddenSeriesIds: T,
|
|
27
27
|
defaultHiddenSeriesIds: v = [],
|
|
28
28
|
onHiddenSeriesIdsChange: b,
|
|
29
29
|
height: P,
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
30
|
+
wheelZoomMode: g = "always",
|
|
31
|
+
"aria-label": C,
|
|
32
|
+
...I
|
|
33
|
+
}, w) => {
|
|
34
|
+
const { t: L } = A(), [M, y] = c({
|
|
34
35
|
prop: S,
|
|
35
36
|
defaultProp: s,
|
|
36
37
|
onChange: H
|
|
@@ -38,21 +39,21 @@ const re = R(
|
|
|
38
39
|
prop: T,
|
|
39
40
|
defaultProp: v,
|
|
40
41
|
onChange: b
|
|
41
|
-
}), [z, V] = t.useState(null), a = t.useMemo(() =>
|
|
42
|
+
}), [z, V] = t.useState(null), a = t.useMemo(() => X(m, i), [i, m]), p = t.useMemo(
|
|
42
43
|
() => new Set(e ?? []),
|
|
43
44
|
[e]
|
|
44
45
|
), j = t.useMemo(
|
|
45
46
|
() => a.points.filter((o) => !p.has(o.seriesId)),
|
|
46
47
|
[p, a.points]
|
|
47
|
-
),
|
|
48
|
+
), E = t.useCallback(
|
|
48
49
|
(o) => {
|
|
49
|
-
const n = e ?? [],
|
|
50
|
-
l(
|
|
50
|
+
const n = e ?? [], F = n.includes(o) ? n.filter((N) => N !== o) : [...n, o];
|
|
51
|
+
l(F);
|
|
51
52
|
},
|
|
52
53
|
[e, l]
|
|
53
54
|
);
|
|
54
55
|
return /* @__PURE__ */ r(
|
|
55
|
-
|
|
56
|
+
Z,
|
|
56
57
|
{
|
|
57
58
|
value: {
|
|
58
59
|
region: m,
|
|
@@ -63,23 +64,24 @@ const re = R(
|
|
|
63
64
|
metricLabel: h,
|
|
64
65
|
formatValue: x,
|
|
65
66
|
zoom: M ?? s,
|
|
66
|
-
setZoom:
|
|
67
|
+
setZoom: y,
|
|
67
68
|
hiddenSeriesIds: e ?? [],
|
|
68
|
-
toggleSeries:
|
|
69
|
+
toggleSeries: E,
|
|
69
70
|
hoverPoint: z,
|
|
70
71
|
setHoverPoint: V,
|
|
71
|
-
mapLabel:
|
|
72
|
+
mapLabel: C ?? L("hexTilemap.mapLabel"),
|
|
73
|
+
wheelZoomMode: g
|
|
72
74
|
},
|
|
73
75
|
children: /* @__PURE__ */ r(
|
|
74
76
|
"div",
|
|
75
77
|
{
|
|
76
|
-
ref:
|
|
78
|
+
ref: w,
|
|
77
79
|
"data-component": "hex-tilemap",
|
|
78
|
-
className:
|
|
79
|
-
...
|
|
80
|
-
children: u ?? /* @__PURE__ */
|
|
81
|
-
/* @__PURE__ */ r(
|
|
82
|
-
/* @__PURE__ */ r(
|
|
80
|
+
className: k(D(), d),
|
|
81
|
+
...I,
|
|
82
|
+
children: u ?? /* @__PURE__ */ O(R, { children: [
|
|
83
|
+
/* @__PURE__ */ r(B, { height: P }),
|
|
84
|
+
/* @__PURE__ */ r(q, {})
|
|
83
85
|
] })
|
|
84
86
|
}
|
|
85
87
|
)
|
|
@@ -88,7 +90,7 @@ const re = R(
|
|
|
88
90
|
}
|
|
89
91
|
);
|
|
90
92
|
export {
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
93
|
+
me as HexTilemap,
|
|
94
|
+
q as HexTilemapLegend,
|
|
95
|
+
B as HexTilemapViewport
|
|
94
96
|
};
|
|
@@ -34,6 +34,8 @@ export interface HexTilemapProps extends Omit<React.HTMLAttributes<HTMLDivElemen
|
|
|
34
34
|
defaultHiddenSeriesIds?: string[];
|
|
35
35
|
onHiddenSeriesIdsChange?: (hiddenSeriesIds: string[]) => void;
|
|
36
36
|
height?: number;
|
|
37
|
+
/** `always` — wheel zooms; `pinch-only` — zoom on pinch (ctrl+wheel) and toolbar only. */
|
|
38
|
+
wheelZoomMode?: "always" | "pinch-only";
|
|
37
39
|
"aria-label"?: string;
|
|
38
40
|
}
|
|
39
41
|
export interface HexTilemapViewportProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
const O = 50, _ = 300,
|
|
2
|
-
function
|
|
1
|
+
const O = 50, _ = 300, f = 100, E = [50, 100, 150, 200], g = 6, X = 25;
|
|
2
|
+
function d(t, n, i) {
|
|
3
3
|
return Math.min(i, Math.max(n, t));
|
|
4
4
|
}
|
|
5
5
|
function x(t) {
|
|
6
|
-
return
|
|
6
|
+
return d(Math.round(t), 50, 300);
|
|
7
7
|
}
|
|
8
|
-
function
|
|
8
|
+
function y(t, n) {
|
|
9
9
|
const i = 100 / x(n);
|
|
10
10
|
return {
|
|
11
11
|
width: t.width * i,
|
|
@@ -13,7 +13,7 @@ function M(t, n) {
|
|
|
13
13
|
};
|
|
14
14
|
}
|
|
15
15
|
function p(t, n) {
|
|
16
|
-
const { width: i, height: h } =
|
|
16
|
+
const { width: i, height: h } = y(t, n);
|
|
17
17
|
return {
|
|
18
18
|
x: (t.width - i) / 2,
|
|
19
19
|
y: (t.height - h) / 2,
|
|
@@ -22,31 +22,31 @@ function p(t, n) {
|
|
|
22
22
|
};
|
|
23
23
|
}
|
|
24
24
|
const w = 0.3;
|
|
25
|
-
function
|
|
26
|
-
const i = t.width * w, h = t.height * w, o = Math.min(0, n.width - t.width) - i, e = Math.max(0, n.width - t.width) + i, u = Math.min(0, n.height - t.height) - h,
|
|
25
|
+
function c(t, n) {
|
|
26
|
+
const i = t.width * w, h = t.height * w, o = Math.min(0, n.width - t.width) - i, e = Math.max(0, n.width - t.width) + i, u = Math.min(0, n.height - t.height) - h, r = Math.max(0, n.height - t.height) + h;
|
|
27
27
|
return {
|
|
28
28
|
...t,
|
|
29
|
-
x:
|
|
30
|
-
y:
|
|
29
|
+
x: d(t.x, o, e),
|
|
30
|
+
y: d(t.y, u, r)
|
|
31
31
|
};
|
|
32
32
|
}
|
|
33
33
|
function l(t, n, i, h) {
|
|
34
|
-
const { width: o, height: e } =
|
|
34
|
+
const { width: o, height: e } = y(n, i);
|
|
35
35
|
if (h) {
|
|
36
|
-
const
|
|
37
|
-
return
|
|
38
|
-
{ x: h.x -
|
|
36
|
+
const s = t.width === 0 ? 0.5 : (h.x - t.x) / t.width, M = t.height === 0 ? 0.5 : (h.y - t.y) / t.height;
|
|
37
|
+
return c(
|
|
38
|
+
{ x: h.x - s * o, y: h.y - M * e, width: o, height: e },
|
|
39
39
|
n
|
|
40
40
|
);
|
|
41
41
|
}
|
|
42
|
-
const u = t.x + t.width / 2,
|
|
43
|
-
return
|
|
44
|
-
{ x: u - o / 2, y:
|
|
42
|
+
const u = t.x + t.width / 2, r = t.y + t.height / 2;
|
|
43
|
+
return c(
|
|
44
|
+
{ x: u - o / 2, y: r - e / 2, width: o, height: e },
|
|
45
45
|
n
|
|
46
46
|
);
|
|
47
47
|
}
|
|
48
|
-
function
|
|
49
|
-
return
|
|
48
|
+
function T(t, n, i, h) {
|
|
49
|
+
return c(
|
|
50
50
|
{
|
|
51
51
|
...t,
|
|
52
52
|
x: t.x - i,
|
|
@@ -55,7 +55,7 @@ function H(t, n, i, h) {
|
|
|
55
55
|
n
|
|
56
56
|
);
|
|
57
57
|
}
|
|
58
|
-
function
|
|
58
|
+
function H(t, n, i) {
|
|
59
59
|
return {
|
|
60
60
|
x: t.x + (n.x - t.x) * i,
|
|
61
61
|
y: t.y + (n.y - t.y) * i,
|
|
@@ -73,6 +73,8 @@ function S(t, n, i) {
|
|
|
73
73
|
const h = t.getScreenCTM();
|
|
74
74
|
if (!h) return null;
|
|
75
75
|
const o = t.createSVGPoint();
|
|
76
|
+
if (typeof o.matrixTransform != "function" || typeof h.inverse != "function")
|
|
77
|
+
return null;
|
|
76
78
|
o.x = n, o.y = i;
|
|
77
79
|
const e = o.matrixTransform(h.inverse());
|
|
78
80
|
return { x: e.x, y: e.y };
|
|
@@ -81,23 +83,23 @@ function A(t, n) {
|
|
|
81
83
|
t.setAttribute("viewBox", `${n.x} ${n.y} ${n.width} ${n.height}`);
|
|
82
84
|
}
|
|
83
85
|
export {
|
|
84
|
-
|
|
86
|
+
X as HEX_BUTTON_ZOOM_STEP,
|
|
85
87
|
w as HEX_PAN_OVERSCROLL,
|
|
86
|
-
|
|
87
|
-
|
|
88
|
+
g as HEX_WHEEL_ZOOM_STEP,
|
|
89
|
+
f as HEX_ZOOM_DEFAULT,
|
|
88
90
|
_ as HEX_ZOOM_MAX,
|
|
89
91
|
O as HEX_ZOOM_MIN,
|
|
90
|
-
|
|
92
|
+
E as HEX_ZOOM_PRESETS,
|
|
91
93
|
A as applyCameraViewBox,
|
|
92
94
|
p as centeredCamera,
|
|
93
|
-
|
|
94
|
-
|
|
95
|
+
c as clampCamera,
|
|
96
|
+
d as clampNumber,
|
|
95
97
|
x as clampZoom,
|
|
96
98
|
S as clientToSvgPoint,
|
|
97
99
|
Z as easeOutCubic,
|
|
98
|
-
|
|
99
|
-
|
|
100
|
+
H as interpolateCamera,
|
|
101
|
+
T as panCamera,
|
|
100
102
|
C as prefersReducedMotion,
|
|
101
|
-
|
|
103
|
+
y as sizeForZoom,
|
|
102
104
|
l as zoomCameraAt
|
|
103
105
|
};
|
|
@@ -16,6 +16,7 @@ export interface HexTilemapContextValue {
|
|
|
16
16
|
hoverPoint: HexTilemapHoverPoint | null;
|
|
17
17
|
setHoverPoint: (point: HexTilemapHoverPoint | null) => void;
|
|
18
18
|
mapLabel: string;
|
|
19
|
+
wheelZoomMode: "always" | "pinch-only";
|
|
19
20
|
}
|
|
20
21
|
export declare function HexTilemapProvider({ value, children, }: {
|
|
21
22
|
value: HexTilemapContextValue;
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import { jsxs as w, jsx as i } from "react/jsx-runtime";
|
|
2
2
|
import * as n from "react";
|
|
3
|
-
import { createComponent as
|
|
4
|
-
import { cn as
|
|
5
|
-
import { hexTilemapViewportVariants as
|
|
3
|
+
import { createComponent as k } from "../../../../lib/primitives/create-component.js";
|
|
4
|
+
import { cn as L } from "../../../../lib/utils.js";
|
|
5
|
+
import { hexTilemapViewportVariants as $ } from "../hex-tilemap.variants.js";
|
|
6
6
|
import { HEX_BUTTON_ZOOM_STEP as g } from "./hex-camera.js";
|
|
7
|
-
import { extentsFromTiles as
|
|
8
|
-
import { useHexTilemapContext as
|
|
9
|
-
import { HexTilemapTooltip as
|
|
10
|
-
import { HexTilemapZoom as
|
|
11
|
-
import { useHexCamera as
|
|
12
|
-
const
|
|
7
|
+
import { extentsFromTiles as E, buildLandPath as V, hexTileToPixel as D } from "./hex-geometry.js";
|
|
8
|
+
import { useHexTilemapContext as O } from "./hex-tilemap-context.js";
|
|
9
|
+
import { HexTilemapTooltip as _ } from "./hex-tilemap-tooltip.js";
|
|
10
|
+
import { HexTilemapZoom as z } from "./hex-tilemap-zoom.js";
|
|
11
|
+
import { useHexCamera as F } from "./use-hex-camera.js";
|
|
12
|
+
const N = 315, A = "M9.56148 9.69087C9.20834 10.3244 8.53986 10.7171 7.81452 10.7171H3.94774C3.23129 10.7171 2.56957 10.3339 2.21301 9.71249L0.265298 6.3179C-0.090937 5.69704-0.0882008 4.93312 0.272474 4.31482L2.21064 0.992257C2.56906 0.377822 3.22686 0 3.93819 0H7.824C8.54428 0 9.20893 0.387309 9.56404 1.01397L11.4467 4.33636C11.7909 4.94364 11.7935 5.6864 11.4536 6.2961L9.56148 9.69087Z", Q = k(
|
|
13
13
|
"HexTilemapViewport",
|
|
14
|
-
({ className: v, height: T =
|
|
14
|
+
({ className: v, height: T = N, ...C }, r) => {
|
|
15
15
|
const {
|
|
16
16
|
layout: s,
|
|
17
17
|
visiblePoints: P,
|
|
@@ -19,37 +19,39 @@ const F = 315, N = "M9.56148 9.69087C9.20834 10.3244 8.53986 10.7171 7.81452 10.
|
|
|
19
19
|
setHoverPoint: m,
|
|
20
20
|
mapLabel: b,
|
|
21
21
|
setZoom: H,
|
|
22
|
-
zoom: Z
|
|
23
|
-
|
|
22
|
+
zoom: Z,
|
|
23
|
+
wheelZoomMode: M
|
|
24
|
+
} = O(), c = n.useRef(null), p = n.useRef(null), f = n.useId(), y = n.useMemo(
|
|
24
25
|
() => new Map(h.map((e) => [e.id, e.color])),
|
|
25
26
|
[h]
|
|
26
|
-
), t = n.useMemo(() =>
|
|
27
|
+
), t = n.useMemo(() => E(s.land), [s.land]), R = n.useMemo(
|
|
27
28
|
() => ({ width: t.width, height: t.height }),
|
|
28
29
|
[t.height, t.width]
|
|
29
|
-
),
|
|
30
|
-
() =>
|
|
30
|
+
), B = n.useMemo(
|
|
31
|
+
() => V(s.land, t.originColumn, t.originRow),
|
|
31
32
|
[t.originColumn, t.originRow, s.land]
|
|
32
|
-
), o =
|
|
33
|
-
extents:
|
|
33
|
+
), o = F({
|
|
34
|
+
extents: R,
|
|
34
35
|
zoom: Z,
|
|
35
36
|
onZoomChange: H,
|
|
36
37
|
svgRef: p,
|
|
37
|
-
viewportRef: c
|
|
38
|
-
|
|
38
|
+
viewportRef: c,
|
|
39
|
+
wheelZoomMode: M
|
|
40
|
+
}), I = n.useCallback(
|
|
39
41
|
(e) => {
|
|
40
42
|
c.current = e, typeof r == "function" ? r(e) : r && (r.current = e);
|
|
41
43
|
},
|
|
42
44
|
[r]
|
|
43
45
|
), x = n.useCallback(
|
|
44
46
|
(e, d) => {
|
|
45
|
-
const
|
|
46
|
-
|
|
47
|
+
const l = c.current?.getBoundingClientRect(), a = d.getBoundingClientRect();
|
|
48
|
+
l && m({
|
|
47
49
|
id: e.id,
|
|
48
50
|
label: e.label,
|
|
49
51
|
value: e.value,
|
|
50
52
|
seriesId: e.seriesId,
|
|
51
|
-
clientX:
|
|
52
|
-
clientY:
|
|
53
|
+
clientX: a.left + a.width / 2 - l.left,
|
|
54
|
+
clientY: a.top - l.top
|
|
53
55
|
});
|
|
54
56
|
},
|
|
55
57
|
[m]
|
|
@@ -57,10 +59,10 @@ const F = 315, N = "M9.56148 9.69087C9.20834 10.3244 8.53986 10.7171 7.81452 10.
|
|
|
57
59
|
return /* @__PURE__ */ w(
|
|
58
60
|
"div",
|
|
59
61
|
{
|
|
60
|
-
ref:
|
|
62
|
+
ref: I,
|
|
61
63
|
"data-component": "hex-tilemap-viewport",
|
|
62
64
|
tabIndex: 0,
|
|
63
|
-
className:
|
|
65
|
+
className: L($({ panning: o.isPanning }), v),
|
|
64
66
|
style: { height: T },
|
|
65
67
|
...C,
|
|
66
68
|
onPointerDown: o.handlePointerDown,
|
|
@@ -85,25 +87,25 @@ const F = 315, N = "M9.56148 9.69087C9.20834 10.3244 8.53986 10.7171 7.81452 10.
|
|
|
85
87
|
/* @__PURE__ */ i(
|
|
86
88
|
"path",
|
|
87
89
|
{
|
|
88
|
-
d:
|
|
90
|
+
d: B,
|
|
89
91
|
className: "pointer-events-none fill-canvas-elevated stroke-content/15",
|
|
90
92
|
strokeWidth: 0.35,
|
|
91
93
|
filter: `url(#${f})`
|
|
92
94
|
}
|
|
93
95
|
),
|
|
94
96
|
P.map((e) => {
|
|
95
|
-
const { pixelX: d, pixelY:
|
|
97
|
+
const { pixelX: d, pixelY: l } = D(
|
|
96
98
|
e.tile.x - t.originColumn,
|
|
97
99
|
e.tile.y - t.originRow
|
|
98
|
-
),
|
|
100
|
+
), a = y.get(e.seriesId) ?? "var(--color-success)";
|
|
99
101
|
return /* @__PURE__ */ i(
|
|
100
102
|
"path",
|
|
101
103
|
{
|
|
102
104
|
"data-testid": "hex-tilemap-point",
|
|
103
105
|
"data-point-id": e.id,
|
|
104
|
-
d:
|
|
105
|
-
transform: `translate(${d}, ${
|
|
106
|
-
fill:
|
|
106
|
+
d: A,
|
|
107
|
+
transform: `translate(${d}, ${l})`,
|
|
108
|
+
fill: a,
|
|
107
109
|
className: "cursor-pointer stroke-content/10 outline-none focus-visible:stroke-brand",
|
|
108
110
|
strokeWidth: 0.3,
|
|
109
111
|
tabIndex: 0,
|
|
@@ -124,9 +126,9 @@ const F = 315, N = "M9.56148 9.69087C9.20834 10.3244 8.53986 10.7171 7.81452 10.
|
|
|
124
126
|
]
|
|
125
127
|
}
|
|
126
128
|
),
|
|
127
|
-
/* @__PURE__ */ i(
|
|
129
|
+
/* @__PURE__ */ i(_, {}),
|
|
128
130
|
/* @__PURE__ */ i(
|
|
129
|
-
|
|
131
|
+
z,
|
|
130
132
|
{
|
|
131
133
|
onZoomIn: () => o.zoomBy(g),
|
|
132
134
|
onZoomOut: () => o.zoomBy(-g),
|
|
@@ -143,5 +145,5 @@ const F = 315, N = "M9.56148 9.69087C9.20834 10.3244 8.53986 10.7171 7.81452 10.
|
|
|
143
145
|
}
|
|
144
146
|
);
|
|
145
147
|
export {
|
|
146
|
-
|
|
148
|
+
Q as HexTilemapViewport
|
|
147
149
|
};
|
|
@@ -6,8 +6,9 @@ interface UseHexCameraOptions {
|
|
|
6
6
|
onZoomChange: (zoom: number) => void;
|
|
7
7
|
svgRef: React.RefObject<SVGSVGElement | null>;
|
|
8
8
|
viewportRef: React.RefObject<HTMLDivElement | null>;
|
|
9
|
+
wheelZoomMode: "always" | "pinch-only";
|
|
9
10
|
}
|
|
10
|
-
export declare function useHexCamera({ extents, zoom, onZoomChange, svgRef, viewportRef, }: UseHexCameraOptions): {
|
|
11
|
+
export declare function useHexCamera({ extents, zoom, onZoomChange, svgRef, viewportRef, wheelZoomMode, }: UseHexCameraOptions): {
|
|
11
12
|
isPanning: boolean;
|
|
12
13
|
handlePointerDown: (event: React.PointerEvent<HTMLDivElement>) => void;
|
|
13
14
|
handlePointerMove: (event: React.PointerEvent<HTMLDivElement>) => void;
|