@almadar/ui 5.62.0 → 5.63.2
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/avl/index.cjs +526 -161
- package/dist/avl/index.js +526 -161
- package/dist/components/core/atoms/Box.d.ts +2 -0
- package/dist/components/core/molecules/CalendarGrid.d.ts +9 -1
- package/dist/components/core/molecules/PositionedCanvas.d.ts +14 -1
- package/dist/components/core/molecules/ReplyTree.d.ts +13 -1
- package/dist/components/game/molecules/three/index.cjs +64 -0
- package/dist/components/game/molecules/three/index.js +64 -0
- package/dist/components/game/organisms/hooks/useCamera.d.ts +16 -0
- package/dist/components/index.cjs +526 -162
- package/dist/components/index.js +526 -162
- package/dist/components/marketing/organisms/CaseStudyOrganism.d.ts +10 -1
- package/dist/components/marketing/organisms/FeatureGridOrganism.d.ts +10 -1
- package/dist/components/marketing/organisms/HeroOrganism.d.ts +24 -1
- package/dist/components/marketing/organisms/PricingOrganism.d.ts +14 -1
- package/dist/components/marketing/organisms/ShowcaseOrganism.d.ts +14 -1
- package/dist/components/marketing/organisms/StatsOrganism.d.ts +6 -1
- package/dist/components/marketing/organisms/StepFlowOrganism.d.ts +9 -1
- package/dist/components/marketing/organisms/TeamOrganism.d.ts +10 -1
- package/dist/docs/index.cjs +64 -0
- package/dist/docs/index.d.cts +2 -0
- package/dist/docs/index.js +64 -0
- package/dist/hooks/index.cjs +148 -0
- package/dist/hooks/index.d.ts +2 -0
- package/dist/hooks/index.js +147 -1
- package/dist/hooks/useCanvasGestures.d.ts +44 -0
- package/dist/hooks/useTapReveal.d.ts +32 -0
- package/dist/marketing/index.cjs +59 -0
- package/dist/marketing/index.d.cts +2 -0
- package/dist/marketing/index.js +59 -0
- package/dist/providers/index.cjs +526 -161
- package/dist/providers/index.js +526 -161
- package/dist/runtime/index.cjs +526 -161
- package/dist/runtime/index.js +526 -161
- package/package.json +2 -2
package/dist/providers/index.cjs
CHANGED
|
@@ -293,12 +293,60 @@ var init_cn = __esm({
|
|
|
293
293
|
"lib/cn.ts"() {
|
|
294
294
|
}
|
|
295
295
|
});
|
|
296
|
+
function useTapReveal(options = {}) {
|
|
297
|
+
const { onReveal, onDismiss, refs, enabled = true } = options;
|
|
298
|
+
const [revealed, setRevealed] = React85.useState(false);
|
|
299
|
+
const onRevealRef = React85.useRef(onReveal);
|
|
300
|
+
const onDismissRef = React85.useRef(onDismiss);
|
|
301
|
+
onRevealRef.current = onReveal;
|
|
302
|
+
onDismissRef.current = onDismiss;
|
|
303
|
+
const reveal = React85.useCallback(() => {
|
|
304
|
+
setRevealed((wasRevealed) => {
|
|
305
|
+
if (!wasRevealed) onRevealRef.current?.();
|
|
306
|
+
return true;
|
|
307
|
+
});
|
|
308
|
+
}, []);
|
|
309
|
+
const dismiss = React85.useCallback(() => {
|
|
310
|
+
setRevealed((wasRevealed) => {
|
|
311
|
+
if (wasRevealed) onDismissRef.current?.();
|
|
312
|
+
return false;
|
|
313
|
+
});
|
|
314
|
+
}, []);
|
|
315
|
+
const onPointerDown = React85.useCallback(
|
|
316
|
+
(e) => {
|
|
317
|
+
if (!enabled || e.pointerType === "mouse") return;
|
|
318
|
+
if (revealed) dismiss();
|
|
319
|
+
else reveal();
|
|
320
|
+
},
|
|
321
|
+
[enabled, revealed, reveal, dismiss]
|
|
322
|
+
);
|
|
323
|
+
React85.useEffect(() => {
|
|
324
|
+
if (!revealed || typeof document === "undefined") return;
|
|
325
|
+
const onDocDown = (ev) => {
|
|
326
|
+
const target = ev.target;
|
|
327
|
+
if (!(target instanceof Node)) return;
|
|
328
|
+
const inside = (refs ?? []).some((r) => r.current?.contains(target));
|
|
329
|
+
if (!inside) dismiss();
|
|
330
|
+
};
|
|
331
|
+
const id = setTimeout(() => document.addEventListener("pointerdown", onDocDown), 0);
|
|
332
|
+
return () => {
|
|
333
|
+
clearTimeout(id);
|
|
334
|
+
document.removeEventListener("pointerdown", onDocDown);
|
|
335
|
+
};
|
|
336
|
+
}, [revealed, refs, dismiss]);
|
|
337
|
+
return { revealed, triggerProps: { onPointerDown }, reveal, dismiss };
|
|
338
|
+
}
|
|
339
|
+
var init_useTapReveal = __esm({
|
|
340
|
+
"hooks/useTapReveal.ts"() {
|
|
341
|
+
}
|
|
342
|
+
});
|
|
296
343
|
var paddingStyles, paddingXStyles, paddingYStyles, marginStyles, marginXStyles, marginYStyles, bgStyles, roundedStyles, shadowStyles, displayStyles, overflowStyles, positionStyles, Box;
|
|
297
344
|
var init_Box = __esm({
|
|
298
345
|
"components/core/atoms/Box.tsx"() {
|
|
299
346
|
"use client";
|
|
300
347
|
init_cn();
|
|
301
348
|
init_useEventBus();
|
|
349
|
+
init_useTapReveal();
|
|
302
350
|
paddingStyles = {
|
|
303
351
|
none: "p-0",
|
|
304
352
|
xs: "p-1",
|
|
@@ -424,10 +472,12 @@ var init_Box = __esm({
|
|
|
424
472
|
action,
|
|
425
473
|
actionPayload,
|
|
426
474
|
hoverEvent,
|
|
475
|
+
tapReveal = true,
|
|
427
476
|
maxWidth,
|
|
428
477
|
onClick,
|
|
429
478
|
onMouseEnter,
|
|
430
479
|
onMouseLeave,
|
|
480
|
+
onPointerDown,
|
|
431
481
|
...rest
|
|
432
482
|
}, ref) => {
|
|
433
483
|
const eventBus = useEventBus();
|
|
@@ -450,6 +500,19 @@ var init_Box = __esm({
|
|
|
450
500
|
}
|
|
451
501
|
onMouseLeave?.(e);
|
|
452
502
|
}, [hoverEvent, eventBus, onMouseLeave]);
|
|
503
|
+
const { triggerProps } = useTapReveal({
|
|
504
|
+
enabled: tapReveal && !!hoverEvent,
|
|
505
|
+
onReveal: React85.useCallback(() => {
|
|
506
|
+
if (hoverEvent) eventBus.emit(`UI:${hoverEvent}`, { hovered: true });
|
|
507
|
+
}, [hoverEvent, eventBus]),
|
|
508
|
+
onDismiss: React85.useCallback(() => {
|
|
509
|
+
if (hoverEvent) eventBus.emit(`UI:${hoverEvent}`, { hovered: false });
|
|
510
|
+
}, [hoverEvent, eventBus])
|
|
511
|
+
});
|
|
512
|
+
const handlePointerDown = React85.useCallback((e) => {
|
|
513
|
+
if (hoverEvent && tapReveal) triggerProps.onPointerDown(e);
|
|
514
|
+
onPointerDown?.(e);
|
|
515
|
+
}, [hoverEvent, tapReveal, triggerProps, onPointerDown]);
|
|
453
516
|
const isClickable = action || onClick;
|
|
454
517
|
return React85__namespace.default.createElement(
|
|
455
518
|
Component2,
|
|
@@ -477,6 +540,7 @@ var init_Box = __esm({
|
|
|
477
540
|
onClick: isClickable ? handleClick : void 0,
|
|
478
541
|
onMouseEnter: hoverEvent || onMouseEnter ? handleMouseEnter : void 0,
|
|
479
542
|
onMouseLeave: hoverEvent || onMouseLeave ? handleMouseLeave : void 0,
|
|
543
|
+
onPointerDown: hoverEvent && tapReveal || onPointerDown ? handlePointerDown : void 0,
|
|
480
544
|
style: maxWidth ? { maxWidth, ...rest.style } : rest.style,
|
|
481
545
|
...rest
|
|
482
546
|
},
|
|
@@ -4887,6 +4951,11 @@ var init_TextHighlight = __esm({
|
|
|
4887
4951
|
if (hoverEvent) eventBus.emit(`UI:${hoverEvent}`, { hovered: false, annotationId });
|
|
4888
4952
|
onMouseLeave?.();
|
|
4889
4953
|
},
|
|
4954
|
+
onPointerDown: (e) => {
|
|
4955
|
+
if (e.pointerType === "mouse") return;
|
|
4956
|
+
if (hoverEvent) eventBus.emit(`UI:${hoverEvent}`, { hovered: true, annotationId });
|
|
4957
|
+
onMouseEnter?.();
|
|
4958
|
+
},
|
|
4890
4959
|
role: "button",
|
|
4891
4960
|
tabIndex: 0,
|
|
4892
4961
|
onKeyDown: (e) => {
|
|
@@ -5062,6 +5131,7 @@ var init_LawReferenceTooltip = __esm({
|
|
|
5062
5131
|
init_Typography();
|
|
5063
5132
|
init_Divider();
|
|
5064
5133
|
init_cn();
|
|
5134
|
+
init_useTapReveal();
|
|
5065
5135
|
positionStyles2 = {
|
|
5066
5136
|
top: "bottom-full left-1/2 -translate-x-1/2 mb-2",
|
|
5067
5137
|
bottom: "top-full left-1/2 -translate-x-1/2 mt-2",
|
|
@@ -5083,6 +5153,7 @@ var init_LawReferenceTooltip = __esm({
|
|
|
5083
5153
|
const { t } = hooks.useTranslate();
|
|
5084
5154
|
const [isVisible, setIsVisible] = React85__namespace.default.useState(false);
|
|
5085
5155
|
const timeoutRef = React85__namespace.default.useRef(null);
|
|
5156
|
+
const triggerRef = React85__namespace.default.useRef(null);
|
|
5086
5157
|
const handleMouseEnter = () => {
|
|
5087
5158
|
if (timeoutRef.current) clearTimeout(timeoutRef.current);
|
|
5088
5159
|
timeoutRef.current = setTimeout(() => setIsVisible(true), 200);
|
|
@@ -5091,6 +5162,8 @@ var init_LawReferenceTooltip = __esm({
|
|
|
5091
5162
|
if (timeoutRef.current) clearTimeout(timeoutRef.current);
|
|
5092
5163
|
setIsVisible(false);
|
|
5093
5164
|
};
|
|
5165
|
+
const { revealed, triggerProps } = useTapReveal({ refs: [triggerRef] });
|
|
5166
|
+
const open = isVisible || revealed;
|
|
5094
5167
|
React85__namespace.default.useEffect(() => {
|
|
5095
5168
|
return () => {
|
|
5096
5169
|
if (timeoutRef.current) clearTimeout(timeoutRef.current);
|
|
@@ -5099,6 +5172,7 @@ var init_LawReferenceTooltip = __esm({
|
|
|
5099
5172
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
5100
5173
|
Box,
|
|
5101
5174
|
{
|
|
5175
|
+
ref: triggerRef,
|
|
5102
5176
|
as: "span",
|
|
5103
5177
|
position: "relative",
|
|
5104
5178
|
display: "inline-block",
|
|
@@ -5107,9 +5181,10 @@ var init_LawReferenceTooltip = __esm({
|
|
|
5107
5181
|
onMouseLeave: handleMouseLeave,
|
|
5108
5182
|
onFocus: handleMouseEnter,
|
|
5109
5183
|
onBlur: handleMouseLeave,
|
|
5184
|
+
onPointerDown: triggerProps.onPointerDown,
|
|
5110
5185
|
children: [
|
|
5111
5186
|
children,
|
|
5112
|
-
|
|
5187
|
+
open && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
5113
5188
|
Box,
|
|
5114
5189
|
{
|
|
5115
5190
|
padding: "sm",
|
|
@@ -10869,6 +10944,36 @@ function useCamera() {
|
|
|
10869
10944
|
cameraRef.current.zoom = Math.max(0.5, Math.min(3, cameraRef.current.zoom * zoomDelta));
|
|
10870
10945
|
drawFn?.();
|
|
10871
10946
|
}, []);
|
|
10947
|
+
const handlePointerDown = React85.useCallback((e) => {
|
|
10948
|
+
handleMouseDown(e);
|
|
10949
|
+
}, [handleMouseDown]);
|
|
10950
|
+
const handlePointerUp = React85.useCallback(() => {
|
|
10951
|
+
handleMouseUp();
|
|
10952
|
+
}, [handleMouseUp]);
|
|
10953
|
+
const handlePointerMove = React85.useCallback((e, drawFn) => {
|
|
10954
|
+
return handleMouseMove(e, drawFn);
|
|
10955
|
+
}, [handleMouseMove]);
|
|
10956
|
+
const panBy = React85.useCallback((dx, dy, drawFn) => {
|
|
10957
|
+
cameraRef.current.x -= dx;
|
|
10958
|
+
cameraRef.current.y -= dy;
|
|
10959
|
+
targetCameraRef.current = null;
|
|
10960
|
+
drawFn?.();
|
|
10961
|
+
}, []);
|
|
10962
|
+
const zoomAtPoint = React85.useCallback((factor, centerX, centerY, viewportSize, drawFn) => {
|
|
10963
|
+
const cam = cameraRef.current;
|
|
10964
|
+
const oldZoom = cam.zoom;
|
|
10965
|
+
const newZoom = Math.max(0.5, Math.min(3, oldZoom * factor));
|
|
10966
|
+
if (newZoom === oldZoom) {
|
|
10967
|
+
drawFn?.();
|
|
10968
|
+
return;
|
|
10969
|
+
}
|
|
10970
|
+
const inv = 1 / oldZoom - 1 / newZoom;
|
|
10971
|
+
cam.x += (centerX - viewportSize.width / 2) * inv;
|
|
10972
|
+
cam.y += (centerY - viewportSize.height / 2) * inv;
|
|
10973
|
+
cam.zoom = newZoom;
|
|
10974
|
+
targetCameraRef.current = null;
|
|
10975
|
+
drawFn?.();
|
|
10976
|
+
}, []);
|
|
10872
10977
|
const screenToWorld = React85.useCallback((clientX, clientY, canvas, viewportSize) => {
|
|
10873
10978
|
const rect = canvas.getBoundingClientRect();
|
|
10874
10979
|
const screenX = clientX - rect.left;
|
|
@@ -10900,6 +11005,11 @@ function useCamera() {
|
|
|
10900
11005
|
handleMouseMove,
|
|
10901
11006
|
handleMouseLeave,
|
|
10902
11007
|
handleWheel,
|
|
11008
|
+
handlePointerDown,
|
|
11009
|
+
handlePointerUp,
|
|
11010
|
+
handlePointerMove,
|
|
11011
|
+
panBy,
|
|
11012
|
+
zoomAtPoint,
|
|
10903
11013
|
screenToWorld,
|
|
10904
11014
|
lerpToTarget
|
|
10905
11015
|
};
|
|
@@ -10909,6 +11019,113 @@ var init_useCamera = __esm({
|
|
|
10909
11019
|
"use client";
|
|
10910
11020
|
}
|
|
10911
11021
|
});
|
|
11022
|
+
function localPoint(canvas, clientX, clientY) {
|
|
11023
|
+
if (!canvas) return { x: clientX, y: clientY };
|
|
11024
|
+
const rect = canvas.getBoundingClientRect();
|
|
11025
|
+
return { x: clientX - rect.left, y: clientY - rect.top };
|
|
11026
|
+
}
|
|
11027
|
+
function useCanvasGestures(options) {
|
|
11028
|
+
const {
|
|
11029
|
+
canvasRef,
|
|
11030
|
+
enabled = true,
|
|
11031
|
+
wheelStep = 1.1,
|
|
11032
|
+
onPointerDown,
|
|
11033
|
+
onPointerMove,
|
|
11034
|
+
onPointerUp,
|
|
11035
|
+
onZoom,
|
|
11036
|
+
onPanDelta,
|
|
11037
|
+
onMultiTouchStart
|
|
11038
|
+
} = options;
|
|
11039
|
+
const pointers = React85.useRef(/* @__PURE__ */ new Map());
|
|
11040
|
+
const pinch = React85.useRef(null);
|
|
11041
|
+
const computePinch = React85.useCallback(() => {
|
|
11042
|
+
const pts = [...pointers.current.values()];
|
|
11043
|
+
const dx = pts[1].x - pts[0].x;
|
|
11044
|
+
const dy = pts[1].y - pts[0].y;
|
|
11045
|
+
return {
|
|
11046
|
+
distance: Math.hypot(dx, dy) || 1,
|
|
11047
|
+
centroid: { x: (pts[0].x + pts[1].x) / 2, y: (pts[0].y + pts[1].y) / 2 }
|
|
11048
|
+
};
|
|
11049
|
+
}, []);
|
|
11050
|
+
const handlePointerDown = React85.useCallback(
|
|
11051
|
+
(e) => {
|
|
11052
|
+
if (!enabled) return;
|
|
11053
|
+
e.currentTarget.setPointerCapture(e.pointerId);
|
|
11054
|
+
pointers.current.set(e.pointerId, localPoint(canvasRef.current, e.clientX, e.clientY));
|
|
11055
|
+
if (pointers.current.size === 2) {
|
|
11056
|
+
onMultiTouchStart?.();
|
|
11057
|
+
pinch.current = computePinch();
|
|
11058
|
+
} else if (pointers.current.size === 1) {
|
|
11059
|
+
onPointerDown?.(e);
|
|
11060
|
+
}
|
|
11061
|
+
},
|
|
11062
|
+
[enabled, canvasRef, onMultiTouchStart, computePinch, onPointerDown]
|
|
11063
|
+
);
|
|
11064
|
+
const handlePointerMove = React85.useCallback(
|
|
11065
|
+
(e) => {
|
|
11066
|
+
if (!enabled) return;
|
|
11067
|
+
if (pointers.current.has(e.pointerId)) {
|
|
11068
|
+
pointers.current.set(e.pointerId, localPoint(canvasRef.current, e.clientX, e.clientY));
|
|
11069
|
+
}
|
|
11070
|
+
if (pointers.current.size >= 2 && pinch.current) {
|
|
11071
|
+
const next = computePinch();
|
|
11072
|
+
const prev = pinch.current;
|
|
11073
|
+
if (next.distance !== prev.distance) {
|
|
11074
|
+
onZoom?.(next.distance / prev.distance, next.centroid.x, next.centroid.y);
|
|
11075
|
+
}
|
|
11076
|
+
onPanDelta?.(next.centroid.x - prev.centroid.x, next.centroid.y - prev.centroid.y);
|
|
11077
|
+
pinch.current = next;
|
|
11078
|
+
return;
|
|
11079
|
+
}
|
|
11080
|
+
onPointerMove?.(e);
|
|
11081
|
+
},
|
|
11082
|
+
[enabled, canvasRef, computePinch, onZoom, onPanDelta, onPointerMove]
|
|
11083
|
+
);
|
|
11084
|
+
const endPointer = React85.useCallback(
|
|
11085
|
+
(e, fireUp) => {
|
|
11086
|
+
const wasMulti = pointers.current.size >= 2;
|
|
11087
|
+
pointers.current.delete(e.pointerId);
|
|
11088
|
+
if (pointers.current.size < 2) pinch.current = null;
|
|
11089
|
+
if (wasMulti && pointers.current.size === 1) return;
|
|
11090
|
+
if (pointers.current.size === 0 && fireUp) onPointerUp?.(e);
|
|
11091
|
+
},
|
|
11092
|
+
[onPointerUp]
|
|
11093
|
+
);
|
|
11094
|
+
const handlePointerUp = React85.useCallback(
|
|
11095
|
+
(e) => {
|
|
11096
|
+
if (!enabled) return;
|
|
11097
|
+
endPointer(e, true);
|
|
11098
|
+
},
|
|
11099
|
+
[enabled, endPointer]
|
|
11100
|
+
);
|
|
11101
|
+
const handlePointerCancel = React85.useCallback(
|
|
11102
|
+
(e) => {
|
|
11103
|
+
if (!enabled) return;
|
|
11104
|
+
endPointer(e, false);
|
|
11105
|
+
},
|
|
11106
|
+
[enabled, endPointer]
|
|
11107
|
+
);
|
|
11108
|
+
const handleWheel = React85.useCallback(
|
|
11109
|
+
(e) => {
|
|
11110
|
+
if (!enabled) return;
|
|
11111
|
+
e.preventDefault();
|
|
11112
|
+
const { x, y } = localPoint(canvasRef.current, e.clientX, e.clientY);
|
|
11113
|
+
onZoom?.(e.deltaY < 0 ? wheelStep : 1 / wheelStep, x, y);
|
|
11114
|
+
},
|
|
11115
|
+
[enabled, canvasRef, wheelStep, onZoom]
|
|
11116
|
+
);
|
|
11117
|
+
return {
|
|
11118
|
+
onPointerDown: handlePointerDown,
|
|
11119
|
+
onPointerMove: handlePointerMove,
|
|
11120
|
+
onPointerUp: handlePointerUp,
|
|
11121
|
+
onPointerCancel: handlePointerCancel,
|
|
11122
|
+
onWheel: handleWheel
|
|
11123
|
+
};
|
|
11124
|
+
}
|
|
11125
|
+
var init_useCanvasGestures = __esm({
|
|
11126
|
+
"hooks/useCanvasGestures.ts"() {
|
|
11127
|
+
}
|
|
11128
|
+
});
|
|
10912
11129
|
function unitAtlasUrl(unit) {
|
|
10913
11130
|
if (unit.spriteSheet) return unit.spriteSheet;
|
|
10914
11131
|
const sprite = unit.sprite;
|
|
@@ -11287,11 +11504,12 @@ function IsometricCanvas({
|
|
|
11287
11504
|
cameraRef,
|
|
11288
11505
|
targetCameraRef,
|
|
11289
11506
|
dragDistance,
|
|
11290
|
-
handleMouseDown,
|
|
11291
|
-
handleMouseUp,
|
|
11292
|
-
handleMouseMove,
|
|
11293
11507
|
handleMouseLeave,
|
|
11294
|
-
|
|
11508
|
+
handlePointerDown,
|
|
11509
|
+
handlePointerUp,
|
|
11510
|
+
handlePointerMove,
|
|
11511
|
+
panBy,
|
|
11512
|
+
zoomAtPoint,
|
|
11295
11513
|
screenToWorld,
|
|
11296
11514
|
lerpToTarget
|
|
11297
11515
|
} = useCamera();
|
|
@@ -11726,11 +11944,16 @@ function IsometricCanvas({
|
|
|
11726
11944
|
cancelAnimationFrame(rafIdRef.current);
|
|
11727
11945
|
};
|
|
11728
11946
|
}, [draw, units.length, validMoves.length, attackTargets.length, selectedUnitId, hasActiveEffects2, pendingCount, atlasPending, lerpToTarget, targetCameraRef]);
|
|
11729
|
-
const
|
|
11730
|
-
|
|
11731
|
-
|
|
11732
|
-
|
|
11733
|
-
|
|
11947
|
+
const singlePointerActiveRef = React85.useRef(false);
|
|
11948
|
+
const handleCanvasPointerDown = React85.useCallback((e) => {
|
|
11949
|
+
singlePointerActiveRef.current = true;
|
|
11950
|
+
if (enableCamera) handlePointerDown(e);
|
|
11951
|
+
}, [enableCamera, handlePointerDown]);
|
|
11952
|
+
const handleCanvasPointerMove = React85.useCallback((e) => {
|
|
11953
|
+
if (enableCamera) handlePointerMove(e, () => draw(animTimeRef.current));
|
|
11954
|
+
}, [enableCamera, handlePointerMove, draw]);
|
|
11955
|
+
const handleCanvasHover = React85.useCallback((e) => {
|
|
11956
|
+
if (singlePointerActiveRef.current) return;
|
|
11734
11957
|
if (!onTileHover && !tileHoverEvent || !canvasRef.current) return;
|
|
11735
11958
|
const world = screenToWorld(e.clientX, e.clientY, canvasRef.current, viewportSize);
|
|
11736
11959
|
const adjustedX = world.x - scaledTileWidth / 2;
|
|
@@ -11741,26 +11964,10 @@ function IsometricCanvas({
|
|
|
11741
11964
|
if (tileHoverEvent) eventBus.emit(`UI:${tileHoverEvent}`, { x: isoPos.x, y: isoPos.y });
|
|
11742
11965
|
onTileHover?.(isoPos.x, isoPos.y);
|
|
11743
11966
|
}
|
|
11744
|
-
}, [
|
|
11745
|
-
const
|
|
11746
|
-
|
|
11747
|
-
if (
|
|
11748
|
-
onTileLeave?.();
|
|
11749
|
-
}, [handleMouseLeave, onTileLeave, tileLeaveEvent, eventBus]);
|
|
11750
|
-
const handleWheelWithCamera = React85.useCallback((e) => {
|
|
11751
|
-
if (enableCamera) {
|
|
11752
|
-
handleWheel(e, () => draw(animTimeRef.current));
|
|
11753
|
-
}
|
|
11754
|
-
}, [enableCamera, handleWheel, draw]);
|
|
11755
|
-
React85.useEffect(() => {
|
|
11756
|
-
const canvas = canvasRef.current;
|
|
11757
|
-
if (!canvas) return;
|
|
11758
|
-
canvas.addEventListener("wheel", handleWheelWithCamera, { passive: false });
|
|
11759
|
-
return () => {
|
|
11760
|
-
canvas.removeEventListener("wheel", handleWheelWithCamera);
|
|
11761
|
-
};
|
|
11762
|
-
}, [handleWheelWithCamera]);
|
|
11763
|
-
const handleClick = React85.useCallback((e) => {
|
|
11967
|
+
}, [onTileHover, screenToWorld, viewportSize, scaledTileWidth, scaledDiamondTopY, scaledFloorHeight, scale, baseOffsetX, tilesProp, tileHoverEvent, eventBus]);
|
|
11968
|
+
const handleCanvasPointerUp = React85.useCallback((e) => {
|
|
11969
|
+
singlePointerActiveRef.current = false;
|
|
11970
|
+
if (enableCamera) handlePointerUp();
|
|
11764
11971
|
if (dragDistance() > 5) return;
|
|
11765
11972
|
if (!canvasRef.current) return;
|
|
11766
11973
|
const world = screenToWorld(e.clientX, e.clientY, canvasRef.current, viewportSize);
|
|
@@ -11778,7 +11985,32 @@ function IsometricCanvas({
|
|
|
11778
11985
|
onTileClick?.(isoPos.x, isoPos.y);
|
|
11779
11986
|
}
|
|
11780
11987
|
}
|
|
11781
|
-
}, [dragDistance, screenToWorld, viewportSize, scaledTileWidth, scaledDiamondTopY, scaledFloorHeight, scale, baseOffsetX, units, tilesProp, onUnitClick, onTileClick, unitClickEvent, tileClickEvent, eventBus]);
|
|
11988
|
+
}, [enableCamera, handlePointerUp, dragDistance, screenToWorld, viewportSize, scaledTileWidth, scaledDiamondTopY, scaledFloorHeight, scale, baseOffsetX, units, tilesProp, onUnitClick, onTileClick, unitClickEvent, tileClickEvent, eventBus]);
|
|
11989
|
+
const handleCanvasPointerLeave = React85.useCallback(() => {
|
|
11990
|
+
handleMouseLeave();
|
|
11991
|
+
if (tileLeaveEvent) eventBus.emit(`UI:${tileLeaveEvent}`, {});
|
|
11992
|
+
onTileLeave?.();
|
|
11993
|
+
}, [handleMouseLeave, onTileLeave, tileLeaveEvent, eventBus]);
|
|
11994
|
+
const applyZoom = React85.useCallback((factor, centerX, centerY) => {
|
|
11995
|
+
if (enableCamera) zoomAtPoint(factor, centerX, centerY, viewportSize, () => draw(animTimeRef.current));
|
|
11996
|
+
}, [enableCamera, zoomAtPoint, viewportSize, draw]);
|
|
11997
|
+
const applyPanDelta = React85.useCallback((dx, dy) => {
|
|
11998
|
+
if (enableCamera) panBy(dx, dy, () => draw(animTimeRef.current));
|
|
11999
|
+
}, [enableCamera, panBy, draw]);
|
|
12000
|
+
const cancelSinglePointer = React85.useCallback(() => {
|
|
12001
|
+
singlePointerActiveRef.current = false;
|
|
12002
|
+
if (enableCamera) handlePointerUp();
|
|
12003
|
+
}, [enableCamera, handlePointerUp]);
|
|
12004
|
+
const gestureHandlers = useCanvasGestures({
|
|
12005
|
+
canvasRef,
|
|
12006
|
+
enabled: enableCamera || !!onTileHover || !!tileHoverEvent || !!onTileClick || !!tileClickEvent || !!onUnitClick || !!unitClickEvent,
|
|
12007
|
+
onPointerDown: handleCanvasPointerDown,
|
|
12008
|
+
onPointerMove: handleCanvasPointerMove,
|
|
12009
|
+
onPointerUp: handleCanvasPointerUp,
|
|
12010
|
+
onZoom: applyZoom,
|
|
12011
|
+
onPanDelta: applyPanDelta,
|
|
12012
|
+
onMultiTouchStart: cancelSinglePointer
|
|
12013
|
+
});
|
|
11782
12014
|
if (error) {
|
|
11783
12015
|
return /* @__PURE__ */ jsxRuntime.jsx(ErrorState, { title: t("canvas.errorTitle"), message: error.message, className });
|
|
11784
12016
|
}
|
|
@@ -11810,13 +12042,17 @@ function IsometricCanvas({
|
|
|
11810
12042
|
{
|
|
11811
12043
|
ref: canvasRef,
|
|
11812
12044
|
"data-testid": "game-canvas",
|
|
11813
|
-
|
|
11814
|
-
|
|
11815
|
-
|
|
11816
|
-
|
|
11817
|
-
|
|
12045
|
+
onPointerDown: gestureHandlers.onPointerDown,
|
|
12046
|
+
onPointerMove: (e) => {
|
|
12047
|
+
gestureHandlers.onPointerMove(e);
|
|
12048
|
+
handleCanvasHover(e);
|
|
12049
|
+
},
|
|
12050
|
+
onPointerUp: gestureHandlers.onPointerUp,
|
|
12051
|
+
onPointerCancel: gestureHandlers.onPointerCancel,
|
|
12052
|
+
onPointerLeave: handleCanvasPointerLeave,
|
|
12053
|
+
onWheel: gestureHandlers.onWheel,
|
|
11818
12054
|
onContextMenu: (e) => e.preventDefault(),
|
|
11819
|
-
className: "cursor-pointer",
|
|
12055
|
+
className: "cursor-pointer touch-none",
|
|
11820
12056
|
style: {
|
|
11821
12057
|
width: viewportSize.width,
|
|
11822
12058
|
height: viewportSize.height
|
|
@@ -11870,6 +12106,7 @@ var init_IsometricCanvas = __esm({
|
|
|
11870
12106
|
init_ErrorState();
|
|
11871
12107
|
init_useImageCache();
|
|
11872
12108
|
init_useCamera();
|
|
12109
|
+
init_useCanvasGestures();
|
|
11873
12110
|
init_useUnitSpriteAtlas();
|
|
11874
12111
|
init_verificationRegistry();
|
|
11875
12112
|
init_isometric();
|
|
@@ -14985,6 +15222,10 @@ var init_StateMachineView = __esm({
|
|
|
14985
15222
|
const handleMouseLeave2 = () => {
|
|
14986
15223
|
onHover(null, 0, 0);
|
|
14987
15224
|
};
|
|
15225
|
+
const handlePointerDown2 = (e) => {
|
|
15226
|
+
if (e.pointerType === "mouse") return;
|
|
15227
|
+
handleMouseEnter2();
|
|
15228
|
+
};
|
|
14988
15229
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
14989
15230
|
"g",
|
|
14990
15231
|
{
|
|
@@ -14994,6 +15235,7 @@ var init_StateMachineView = __esm({
|
|
|
14994
15235
|
onClick: () => onClick?.(bundle),
|
|
14995
15236
|
onMouseEnter: handleMouseEnter2,
|
|
14996
15237
|
onMouseLeave: handleMouseLeave2,
|
|
15238
|
+
onPointerDown: handlePointerDown2,
|
|
14997
15239
|
style: { pointerEvents: "auto" },
|
|
14998
15240
|
children: [
|
|
14999
15241
|
/* @__PURE__ */ jsxRuntime.jsx("defs", { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -15111,6 +15353,10 @@ var init_StateMachineView = __esm({
|
|
|
15111
15353
|
const handleMouseLeave = React85.useCallback(() => {
|
|
15112
15354
|
onHover(null, 0, 0);
|
|
15113
15355
|
}, [onHover]);
|
|
15356
|
+
const handlePointerDown = React85.useCallback((e) => {
|
|
15357
|
+
if (e.pointerType === "mouse") return;
|
|
15358
|
+
handleMouseEnter();
|
|
15359
|
+
}, [handleMouseEnter]);
|
|
15114
15360
|
const uniqueMarkerId = `arrow-${bundle.id}`;
|
|
15115
15361
|
const hasDetails = bundle.labels.some((l) => l.hasDetails);
|
|
15116
15362
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -15122,6 +15368,7 @@ var init_StateMachineView = __esm({
|
|
|
15122
15368
|
onClick: () => onClick?.(bundle),
|
|
15123
15369
|
onMouseEnter: handleMouseEnter,
|
|
15124
15370
|
onMouseLeave: handleMouseLeave,
|
|
15371
|
+
onPointerDown: handlePointerDown,
|
|
15125
15372
|
style: { pointerEvents: "auto" },
|
|
15126
15373
|
children: [
|
|
15127
15374
|
/* @__PURE__ */ jsxRuntime.jsx("defs", { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -23620,10 +23867,84 @@ function SubMenu({
|
|
|
23620
23867
|
);
|
|
23621
23868
|
return typeof document !== "undefined" ? reactDom.createPortal(panel, document.body) : panel;
|
|
23622
23869
|
}
|
|
23870
|
+
function MenuItemRow({
|
|
23871
|
+
item,
|
|
23872
|
+
itemId,
|
|
23873
|
+
hasSubMenu,
|
|
23874
|
+
isDanger,
|
|
23875
|
+
direction,
|
|
23876
|
+
isSubMenuOpen,
|
|
23877
|
+
activeSubMenuRef,
|
|
23878
|
+
eventBus,
|
|
23879
|
+
onItemClick,
|
|
23880
|
+
openSubMenu
|
|
23881
|
+
}) {
|
|
23882
|
+
const rowRef = React85.useRef(null);
|
|
23883
|
+
const { triggerProps } = useTapReveal({
|
|
23884
|
+
enabled: hasSubMenu,
|
|
23885
|
+
onReveal: () => openSubMenu(itemId, rowRef.current),
|
|
23886
|
+
refs: [rowRef]
|
|
23887
|
+
});
|
|
23888
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(Box, { children: [
|
|
23889
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
23890
|
+
Box,
|
|
23891
|
+
{
|
|
23892
|
+
ref: rowRef,
|
|
23893
|
+
as: "button",
|
|
23894
|
+
onClick: () => onItemClick({ ...item, id: itemId }, itemId),
|
|
23895
|
+
"aria-disabled": item.disabled || void 0,
|
|
23896
|
+
onMouseEnter: (e) => {
|
|
23897
|
+
if (hasSubMenu) openSubMenu(itemId, e.currentTarget);
|
|
23898
|
+
},
|
|
23899
|
+
onPointerDown: hasSubMenu ? triggerProps.onPointerDown : void 0,
|
|
23900
|
+
"data-testid": item.event ? `action-${item.event}` : void 0,
|
|
23901
|
+
className: cn(
|
|
23902
|
+
"w-full flex items-center justify-between gap-3 px-4 py-2 text-start",
|
|
23903
|
+
"text-sm transition-colors",
|
|
23904
|
+
"hover:bg-muted",
|
|
23905
|
+
"focus:outline-none focus:bg-muted",
|
|
23906
|
+
"disabled:opacity-50 disabled:cursor-not-allowed",
|
|
23907
|
+
item.disabled && "cursor-not-allowed",
|
|
23908
|
+
isDanger && "text-error hover:bg-error/10"
|
|
23909
|
+
),
|
|
23910
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs(Box, { className: "flex items-center gap-3 flex-1 min-w-0", children: [
|
|
23911
|
+
item.icon && (typeof item.icon === "string" ? /* @__PURE__ */ jsxRuntime.jsx(Icon, { name: item.icon, size: "sm", className: "flex-shrink-0" }) : /* @__PURE__ */ jsxRuntime.jsx(Icon, { icon: item.icon, size: "sm", className: "flex-shrink-0" })),
|
|
23912
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
23913
|
+
Typography,
|
|
23914
|
+
{
|
|
23915
|
+
variant: "small",
|
|
23916
|
+
className: cn("flex-1", isDanger && "text-red-600"),
|
|
23917
|
+
children: item.label
|
|
23918
|
+
}
|
|
23919
|
+
),
|
|
23920
|
+
item.badge !== void 0 && /* @__PURE__ */ jsxRuntime.jsx(Badge, { variant: "default", size: "sm", children: item.badge }),
|
|
23921
|
+
hasSubMenu && /* @__PURE__ */ jsxRuntime.jsx(
|
|
23922
|
+
Icon,
|
|
23923
|
+
{
|
|
23924
|
+
name: direction === "rtl" ? "chevron-left" : "chevron-right",
|
|
23925
|
+
size: "sm",
|
|
23926
|
+
className: "flex-shrink-0"
|
|
23927
|
+
}
|
|
23928
|
+
)
|
|
23929
|
+
] })
|
|
23930
|
+
}
|
|
23931
|
+
),
|
|
23932
|
+
hasSubMenu && isSubMenuOpen && item.subMenu && /* @__PURE__ */ jsxRuntime.jsx(
|
|
23933
|
+
SubMenu,
|
|
23934
|
+
{
|
|
23935
|
+
items: item.subMenu,
|
|
23936
|
+
itemRef: activeSubMenuRef,
|
|
23937
|
+
direction,
|
|
23938
|
+
eventBus
|
|
23939
|
+
}
|
|
23940
|
+
)
|
|
23941
|
+
] });
|
|
23942
|
+
}
|
|
23623
23943
|
var MENU_GAP, menuContainerStyles, Menu;
|
|
23624
23944
|
var init_Menu = __esm({
|
|
23625
23945
|
"components/core/molecules/Menu.tsx"() {
|
|
23626
23946
|
"use client";
|
|
23947
|
+
init_useTapReveal();
|
|
23627
23948
|
init_Box();
|
|
23628
23949
|
init_Icon();
|
|
23629
23950
|
init_Divider();
|
|
@@ -23678,6 +23999,10 @@ var init_Menu = __esm({
|
|
|
23678
23999
|
setIsOpen(false);
|
|
23679
24000
|
}
|
|
23680
24001
|
};
|
|
24002
|
+
const openSubMenu = (itemId, el) => {
|
|
24003
|
+
setActiveSubMenu(itemId);
|
|
24004
|
+
setActiveSubMenuRef(el);
|
|
24005
|
+
};
|
|
23681
24006
|
React85.useEffect(() => {
|
|
23682
24007
|
if (isOpen) {
|
|
23683
24008
|
updatePosition();
|
|
@@ -23721,61 +24046,22 @@ var init_Menu = __esm({
|
|
|
23721
24046
|
if (isDivider) {
|
|
23722
24047
|
return /* @__PURE__ */ jsxRuntime.jsx(Divider, { className: "my-1" }, `divider-${index}`);
|
|
23723
24048
|
}
|
|
23724
|
-
return /* @__PURE__ */ jsxRuntime.
|
|
23725
|
-
|
|
23726
|
-
|
|
23727
|
-
|
|
23728
|
-
|
|
23729
|
-
|
|
23730
|
-
|
|
23731
|
-
|
|
23732
|
-
|
|
23733
|
-
|
|
23734
|
-
|
|
23735
|
-
|
|
23736
|
-
|
|
23737
|
-
|
|
23738
|
-
|
|
23739
|
-
|
|
23740
|
-
"text-sm transition-colors",
|
|
23741
|
-
"hover:bg-muted",
|
|
23742
|
-
"focus:outline-none focus:bg-muted",
|
|
23743
|
-
"disabled:opacity-50 disabled:cursor-not-allowed",
|
|
23744
|
-
item.disabled && "cursor-not-allowed",
|
|
23745
|
-
isDanger && "text-error hover:bg-error/10"
|
|
23746
|
-
),
|
|
23747
|
-
children: /* @__PURE__ */ jsxRuntime.jsxs(Box, { className: "flex items-center gap-3 flex-1 min-w-0", children: [
|
|
23748
|
-
item.icon && (typeof item.icon === "string" ? /* @__PURE__ */ jsxRuntime.jsx(Icon, { name: item.icon, size: "sm", className: "flex-shrink-0" }) : /* @__PURE__ */ jsxRuntime.jsx(Icon, { icon: item.icon, size: "sm", className: "flex-shrink-0" })),
|
|
23749
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
23750
|
-
Typography,
|
|
23751
|
-
{
|
|
23752
|
-
variant: "small",
|
|
23753
|
-
className: cn("flex-1", isDanger && "text-red-600"),
|
|
23754
|
-
children: item.label
|
|
23755
|
-
}
|
|
23756
|
-
),
|
|
23757
|
-
item.badge !== void 0 && /* @__PURE__ */ jsxRuntime.jsx(Badge, { variant: "default", size: "sm", children: item.badge }),
|
|
23758
|
-
hasSubMenu && /* @__PURE__ */ jsxRuntime.jsx(
|
|
23759
|
-
Icon,
|
|
23760
|
-
{
|
|
23761
|
-
name: direction === "rtl" ? "chevron-left" : "chevron-right",
|
|
23762
|
-
size: "sm",
|
|
23763
|
-
className: "flex-shrink-0"
|
|
23764
|
-
}
|
|
23765
|
-
)
|
|
23766
|
-
] })
|
|
23767
|
-
}
|
|
23768
|
-
),
|
|
23769
|
-
hasSubMenu && activeSubMenu === itemId && item.subMenu && /* @__PURE__ */ jsxRuntime.jsx(
|
|
23770
|
-
SubMenu,
|
|
23771
|
-
{
|
|
23772
|
-
items: item.subMenu,
|
|
23773
|
-
itemRef: activeSubMenuRef,
|
|
23774
|
-
direction,
|
|
23775
|
-
eventBus
|
|
23776
|
-
}
|
|
23777
|
-
)
|
|
23778
|
-
] }, itemId);
|
|
24049
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
24050
|
+
MenuItemRow,
|
|
24051
|
+
{
|
|
24052
|
+
item,
|
|
24053
|
+
itemId,
|
|
24054
|
+
hasSubMenu,
|
|
24055
|
+
isDanger,
|
|
24056
|
+
direction,
|
|
24057
|
+
isSubMenuOpen: activeSubMenu === itemId,
|
|
24058
|
+
activeSubMenuRef,
|
|
24059
|
+
eventBus,
|
|
24060
|
+
onItemClick: handleItemClick,
|
|
24061
|
+
openSubMenu
|
|
24062
|
+
},
|
|
24063
|
+
itemId
|
|
24064
|
+
);
|
|
23779
24065
|
});
|
|
23780
24066
|
const panel = isOpen && triggerRect ? /* @__PURE__ */ jsxRuntime.jsxs(
|
|
23781
24067
|
"div",
|
|
@@ -26078,6 +26364,7 @@ var init_Popover = __esm({
|
|
|
26078
26364
|
"use client";
|
|
26079
26365
|
init_Typography();
|
|
26080
26366
|
init_cn();
|
|
26367
|
+
init_useTapReveal();
|
|
26081
26368
|
arrowClasses = {
|
|
26082
26369
|
top: "top-full left-1/2 -translate-x-1/2 border-t-white border-l-transparent border-r-transparent border-b-transparent",
|
|
26083
26370
|
bottom: "bottom-full left-1/2 -translate-x-1/2 border-b-white border-l-transparent border-r-transparent border-t-transparent",
|
|
@@ -26148,18 +26435,32 @@ var init_Popover = __esm({
|
|
|
26148
26435
|
document.addEventListener("mousedown", handleClickOutside);
|
|
26149
26436
|
return () => document.removeEventListener("mousedown", handleClickOutside);
|
|
26150
26437
|
}, [isOpen, trigger]);
|
|
26151
|
-
const triggerProps
|
|
26438
|
+
const { triggerProps: tapTriggerProps } = useTapReveal({
|
|
26439
|
+
enabled: trigger === "hover",
|
|
26440
|
+
onReveal: handleOpen,
|
|
26441
|
+
onDismiss: handleClose,
|
|
26442
|
+
refs: [triggerRef, popoverRef]
|
|
26443
|
+
});
|
|
26444
|
+
const handlerProps = trigger === "click" ? {
|
|
26152
26445
|
onClick: handleToggle
|
|
26153
26446
|
} : {
|
|
26154
26447
|
onMouseEnter: handleOpen,
|
|
26155
|
-
onMouseLeave: handleClose
|
|
26448
|
+
onMouseLeave: handleClose,
|
|
26449
|
+
onPointerDown: tapTriggerProps.onPointerDown
|
|
26156
26450
|
};
|
|
26157
26451
|
const childElement = React85__namespace.default.isValidElement(children) ? children : /* @__PURE__ */ jsxRuntime.jsx("span", { children });
|
|
26452
|
+
const childPointerDown = childElement.props.onPointerDown;
|
|
26158
26453
|
const triggerElement = React85__namespace.default.cloneElement(
|
|
26159
26454
|
childElement,
|
|
26160
26455
|
{
|
|
26161
26456
|
ref: triggerRef,
|
|
26162
|
-
...
|
|
26457
|
+
...handlerProps,
|
|
26458
|
+
...trigger === "hover" ? {
|
|
26459
|
+
onPointerDown: (e) => {
|
|
26460
|
+
tapTriggerProps.onPointerDown(e);
|
|
26461
|
+
childPointerDown?.(e);
|
|
26462
|
+
}
|
|
26463
|
+
} : void 0
|
|
26163
26464
|
}
|
|
26164
26465
|
);
|
|
26165
26466
|
const panel = isOpen && triggerRect ? /* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -26690,6 +26991,7 @@ var init_Tooltip = __esm({
|
|
|
26690
26991
|
"use client";
|
|
26691
26992
|
init_Typography();
|
|
26692
26993
|
init_cn();
|
|
26994
|
+
init_useTapReveal();
|
|
26693
26995
|
TRIGGER_GAP2 = 8;
|
|
26694
26996
|
arrowClasses2 = {
|
|
26695
26997
|
top: "top-full left-1/2 -translate-x-1/2 border-t-primary border-l-transparent border-r-transparent border-b-transparent",
|
|
@@ -26734,6 +27036,11 @@ var init_Tooltip = __esm({
|
|
|
26734
27036
|
setIsVisible(false);
|
|
26735
27037
|
}, hideDelay);
|
|
26736
27038
|
};
|
|
27039
|
+
const { triggerProps } = useTapReveal({
|
|
27040
|
+
onReveal: handleMouseEnter,
|
|
27041
|
+
onDismiss: handleMouseLeave,
|
|
27042
|
+
refs: [triggerRef, tooltipRef]
|
|
27043
|
+
});
|
|
26737
27044
|
React85.useLayoutEffect(() => {
|
|
26738
27045
|
if (isVisible) {
|
|
26739
27046
|
updatePosition();
|
|
@@ -26746,12 +27053,17 @@ var init_Tooltip = __esm({
|
|
|
26746
27053
|
};
|
|
26747
27054
|
}, []);
|
|
26748
27055
|
const triggerElement = React85__namespace.default.isValidElement(children) ? children : /* @__PURE__ */ jsxRuntime.jsx("span", { children });
|
|
27056
|
+
const childPointerDown = triggerElement.props.onPointerDown;
|
|
26749
27057
|
const trigger = React85__namespace.default.cloneElement(triggerElement, {
|
|
26750
27058
|
ref: triggerRef,
|
|
26751
27059
|
onMouseEnter: handleMouseEnter,
|
|
26752
27060
|
onMouseLeave: handleMouseLeave,
|
|
26753
27061
|
onFocus: handleMouseEnter,
|
|
26754
|
-
onBlur: handleMouseLeave
|
|
27062
|
+
onBlur: handleMouseLeave,
|
|
27063
|
+
onPointerDown: (e) => {
|
|
27064
|
+
triggerProps.onPointerDown(e);
|
|
27065
|
+
childPointerDown?.(e);
|
|
27066
|
+
}
|
|
26755
27067
|
});
|
|
26756
27068
|
const tooltipContent = isVisible && triggerRect ? /* @__PURE__ */ jsxRuntime.jsxs(
|
|
26757
27069
|
"div",
|
|
@@ -30101,6 +30413,14 @@ var init_GraphView = __esm({
|
|
|
30101
30413
|
},
|
|
30102
30414
|
[onNodeClick]
|
|
30103
30415
|
);
|
|
30416
|
+
const handleNodePointerDown = React85.useCallback(
|
|
30417
|
+
(e, node) => {
|
|
30418
|
+
if (e.pointerType === "mouse") return;
|
|
30419
|
+
handleNodeMouseEnter(node);
|
|
30420
|
+
handleNodeClickInternal(node);
|
|
30421
|
+
},
|
|
30422
|
+
[handleNodeMouseEnter, handleNodeClickInternal]
|
|
30423
|
+
);
|
|
30104
30424
|
if (nodes.length === 0) {
|
|
30105
30425
|
return /* @__PURE__ */ jsxRuntime.jsx(Box, { className: cn("flex items-center justify-center", className), style: { width: w, height: h }, children: /* @__PURE__ */ jsxRuntime.jsx(Box, { className: "text-muted-foreground text-sm", children: t("display.noGraphData") }) });
|
|
30106
30426
|
}
|
|
@@ -30160,6 +30480,7 @@ var init_GraphView = __esm({
|
|
|
30160
30480
|
onMouseEnter: () => handleNodeMouseEnter(node),
|
|
30161
30481
|
onMouseLeave: handleNodeMouseLeave,
|
|
30162
30482
|
onClick: () => handleNodeClickInternal(node),
|
|
30483
|
+
onPointerDown: (e) => handleNodePointerDown(e, node),
|
|
30163
30484
|
children: [
|
|
30164
30485
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
30165
30486
|
"circle",
|
|
@@ -30240,13 +30561,13 @@ var init_MapView = __esm({
|
|
|
30240
30561
|
shadowSize: [41, 41]
|
|
30241
30562
|
});
|
|
30242
30563
|
L.Marker.prototype.options.icon = defaultIcon;
|
|
30243
|
-
const { useEffect:
|
|
30564
|
+
const { useEffect: useEffect82, useRef: useRef80, useCallback: useCallback125, useState: useState111 } = React85__namespace.default;
|
|
30244
30565
|
const { Typography: Typography2 } = await Promise.resolve().then(() => (init_Typography(), Typography_exports));
|
|
30245
30566
|
const { useEventBus: useEventBus3 } = await Promise.resolve().then(() => (init_useEventBus(), useEventBus_exports));
|
|
30246
30567
|
function MapUpdater({ centerLat, centerLng, zoom }) {
|
|
30247
30568
|
const map = useMap();
|
|
30248
|
-
const prevRef =
|
|
30249
|
-
|
|
30569
|
+
const prevRef = useRef80({ centerLat, centerLng, zoom });
|
|
30570
|
+
useEffect82(() => {
|
|
30250
30571
|
const prev = prevRef.current;
|
|
30251
30572
|
if (prev.centerLat !== centerLat || prev.centerLng !== centerLng || prev.zoom !== zoom) {
|
|
30252
30573
|
map.setView([centerLat, centerLng], zoom);
|
|
@@ -30257,7 +30578,7 @@ var init_MapView = __esm({
|
|
|
30257
30578
|
}
|
|
30258
30579
|
function MapClickHandler({ onMapClick }) {
|
|
30259
30580
|
const map = useMap();
|
|
30260
|
-
|
|
30581
|
+
useEffect82(() => {
|
|
30261
30582
|
if (!onMapClick) return;
|
|
30262
30583
|
const handler = (e) => {
|
|
30263
30584
|
onMapClick(e.latlng.lat, e.latlng.lng);
|
|
@@ -30285,8 +30606,8 @@ var init_MapView = __esm({
|
|
|
30285
30606
|
showAttribution = true
|
|
30286
30607
|
}) {
|
|
30287
30608
|
const eventBus = useEventBus3();
|
|
30288
|
-
const [clickedPosition, setClickedPosition] =
|
|
30289
|
-
const handleMapClick =
|
|
30609
|
+
const [clickedPosition, setClickedPosition] = useState111(null);
|
|
30610
|
+
const handleMapClick = useCallback125((lat, lng) => {
|
|
30290
30611
|
if (showClickedPin) {
|
|
30291
30612
|
setClickedPosition({ lat, lng });
|
|
30292
30613
|
}
|
|
@@ -30295,7 +30616,7 @@ var init_MapView = __esm({
|
|
|
30295
30616
|
eventBus.emit(`UI:${mapClickEvent}`, { latitude: lat, longitude: lng });
|
|
30296
30617
|
}
|
|
30297
30618
|
}, [onMapClick, mapClickEvent, eventBus, showClickedPin]);
|
|
30298
|
-
const handleMarkerClick =
|
|
30619
|
+
const handleMarkerClick = useCallback125((marker) => {
|
|
30299
30620
|
onMarkerClick?.(marker);
|
|
30300
30621
|
if (markerClickEvent) {
|
|
30301
30622
|
eventBus.emit(`UI:${markerClickEvent}`, { ...marker });
|
|
@@ -30636,7 +30957,7 @@ var init_StarRating = __esm({
|
|
|
30636
30957
|
"aria-valuenow": value,
|
|
30637
30958
|
tabIndex: readOnly ? void 0 : 0,
|
|
30638
30959
|
onKeyDown: handleKeyDown,
|
|
30639
|
-
|
|
30960
|
+
onPointerLeave: () => setHoverValue(null),
|
|
30640
30961
|
children: Array.from({ length: max }, (_, i) => {
|
|
30641
30962
|
const fillLevel = Math.max(0, Math.min(1, displayValue - i));
|
|
30642
30963
|
const isFull = fillLevel >= 1;
|
|
@@ -30646,7 +30967,7 @@ var init_StarRating = __esm({
|
|
|
30646
30967
|
{
|
|
30647
30968
|
className: "relative inline-block",
|
|
30648
30969
|
onClick: () => handleStarClick(i, false),
|
|
30649
|
-
|
|
30970
|
+
onPointerMove: (e) => {
|
|
30650
30971
|
if (readOnly) return;
|
|
30651
30972
|
const rect = e.currentTarget.getBoundingClientRect();
|
|
30652
30973
|
const isLeftHalf = e.clientX - rect.left < rect.width / 2;
|
|
@@ -34536,7 +34857,7 @@ var init_PositionedCanvas = __esm({
|
|
|
34536
34857
|
{
|
|
34537
34858
|
ref: containerRef,
|
|
34538
34859
|
"data-testid": "positioned-canvas",
|
|
34539
|
-
className: "relative bg-background border border-border rounded-container overflow-hidden",
|
|
34860
|
+
className: "relative bg-background border border-border rounded-container overflow-hidden touch-none",
|
|
34540
34861
|
style: { width, height },
|
|
34541
34862
|
onClick: handleContainerClick,
|
|
34542
34863
|
children: items.map((item) => {
|
|
@@ -38683,6 +39004,13 @@ var init_DocumentViewer = __esm({
|
|
|
38683
39004
|
DocumentViewer.displayName = "DocumentViewer";
|
|
38684
39005
|
}
|
|
38685
39006
|
});
|
|
39007
|
+
function measureLabelWidth(text) {
|
|
39008
|
+
if (typeof document === "undefined") return text.length * 6;
|
|
39009
|
+
if (!labelMeasureCtx) labelMeasureCtx = document.createElement("canvas").getContext("2d");
|
|
39010
|
+
if (!labelMeasureCtx) return text.length * 6;
|
|
39011
|
+
labelMeasureCtx.font = "10px system-ui";
|
|
39012
|
+
return labelMeasureCtx.measureText(text).width;
|
|
39013
|
+
}
|
|
38686
39014
|
function getGroupColor(group, groups) {
|
|
38687
39015
|
if (!group) return GROUP_COLORS2[0];
|
|
38688
39016
|
const idx = groups.indexOf(group);
|
|
@@ -38694,7 +39022,7 @@ function resolveColor2(color, el) {
|
|
|
38694
39022
|
const resolved = getComputedStyle(el).getPropertyValue(m[1]).trim();
|
|
38695
39023
|
return resolved || (m[2]?.trim() ?? "#888888");
|
|
38696
39024
|
}
|
|
38697
|
-
var GROUP_COLORS2, GraphCanvas;
|
|
39025
|
+
var GROUP_COLORS2, labelMeasureCtx, GraphCanvas;
|
|
38698
39026
|
var init_GraphCanvas = __esm({
|
|
38699
39027
|
"components/core/molecules/GraphCanvas.tsx"() {
|
|
38700
39028
|
"use client";
|
|
@@ -38705,6 +39033,7 @@ var init_GraphCanvas = __esm({
|
|
|
38705
39033
|
init_ErrorState();
|
|
38706
39034
|
init_EmptyState();
|
|
38707
39035
|
init_useEventBus();
|
|
39036
|
+
init_useCanvasGestures();
|
|
38708
39037
|
GROUP_COLORS2 = [
|
|
38709
39038
|
"var(--color-primary)",
|
|
38710
39039
|
"var(--color-success)",
|
|
@@ -38713,6 +39042,7 @@ var init_GraphCanvas = __esm({
|
|
|
38713
39042
|
"var(--color-info)",
|
|
38714
39043
|
"var(--color-accent)"
|
|
38715
39044
|
];
|
|
39045
|
+
labelMeasureCtx = null;
|
|
38716
39046
|
GraphCanvas = ({
|
|
38717
39047
|
title,
|
|
38718
39048
|
nodes: propNodes = [],
|
|
@@ -38742,6 +39072,10 @@ var init_GraphCanvas = __esm({
|
|
|
38742
39072
|
const animRef = React85.useRef(0);
|
|
38743
39073
|
const [zoom, setZoom] = React85.useState(1);
|
|
38744
39074
|
const [offset, setOffset] = React85.useState({ x: 0, y: 0 });
|
|
39075
|
+
const zoomRef = React85.useRef(zoom);
|
|
39076
|
+
zoomRef.current = zoom;
|
|
39077
|
+
const offsetRef = React85.useRef(offset);
|
|
39078
|
+
offsetRef.current = offset;
|
|
38745
39079
|
const [hoveredNode, setHoveredNode] = React85.useState(null);
|
|
38746
39080
|
const nodesRef = React85.useRef([]);
|
|
38747
39081
|
const [, forceUpdate] = React85.useState(0);
|
|
@@ -38889,22 +39223,36 @@ var init_GraphCanvas = __esm({
|
|
|
38889
39223
|
node.x = Math.max(30, Math.min(w - 30, node.x));
|
|
38890
39224
|
node.y = Math.max(30, Math.min(h - 30, node.y));
|
|
38891
39225
|
}
|
|
39226
|
+
const LABEL_GAP = 12;
|
|
39227
|
+
const LABEL_H = 12;
|
|
39228
|
+
const pad = nodeSpacing / 2;
|
|
38892
39229
|
for (let i = 0; i < nodes.length; i++) {
|
|
38893
39230
|
for (let j = i + 1; j < nodes.length; j++) {
|
|
38894
39231
|
const a = nodes[i];
|
|
38895
39232
|
const b = nodes[j];
|
|
38896
|
-
const
|
|
38897
|
-
const
|
|
38898
|
-
|
|
38899
|
-
|
|
38900
|
-
|
|
38901
|
-
|
|
38902
|
-
|
|
38903
|
-
|
|
38904
|
-
|
|
38905
|
-
|
|
38906
|
-
|
|
38907
|
-
|
|
39233
|
+
const ar = a.size || 8;
|
|
39234
|
+
const br = b.size || 8;
|
|
39235
|
+
if (showLabels) {
|
|
39236
|
+
if (a.labelW === void 0) a.labelW = a.label ? measureLabelWidth(a.label) : 0;
|
|
39237
|
+
if (b.labelW === void 0) b.labelW = b.label ? measureLabelWidth(b.label) : 0;
|
|
39238
|
+
}
|
|
39239
|
+
const labelBelow = showLabels ? LABEL_GAP + LABEL_H : 0;
|
|
39240
|
+
const aHalfW = Math.max(ar, (a.labelW ?? 0) / 2) + pad;
|
|
39241
|
+
const bHalfW = Math.max(br, (b.labelW ?? 0) / 2) + pad;
|
|
39242
|
+
const aTop = a.y - ar - pad, aBot = a.y + ar + labelBelow + pad;
|
|
39243
|
+
const bTop = b.y - br - pad, bBot = b.y + br + labelBelow + pad;
|
|
39244
|
+
const overlapX = Math.min(a.x + aHalfW, b.x + bHalfW) - Math.max(a.x - aHalfW, b.x - bHalfW);
|
|
39245
|
+
const overlapY = Math.min(aBot, bBot) - Math.max(aTop, bTop);
|
|
39246
|
+
if (overlapX > 0 && overlapY > 0) {
|
|
39247
|
+
if (overlapX <= overlapY) {
|
|
39248
|
+
const push = overlapX / 2 * (b.x >= a.x ? 1 : -1);
|
|
39249
|
+
a.x = Math.max(30, Math.min(w - 30, a.x - push));
|
|
39250
|
+
b.x = Math.max(30, Math.min(w - 30, b.x + push));
|
|
39251
|
+
} else {
|
|
39252
|
+
const push = overlapY / 2 * (bTop + bBot >= aTop + aBot ? 1 : -1);
|
|
39253
|
+
a.y = Math.max(30, Math.min(h - 30, a.y - push));
|
|
39254
|
+
b.y = Math.max(30, Math.min(h - 30, b.y + push));
|
|
39255
|
+
}
|
|
38908
39256
|
}
|
|
38909
39257
|
}
|
|
38910
39258
|
}
|
|
@@ -38921,7 +39269,7 @@ var init_GraphCanvas = __esm({
|
|
|
38921
39269
|
return () => {
|
|
38922
39270
|
cancelAnimationFrame(animRef.current);
|
|
38923
39271
|
};
|
|
38924
|
-
}, [propNodes, propEdges, layout, repulsion, linkDistance, nodeSpacing, logicalW, height]);
|
|
39272
|
+
}, [propNodes, propEdges, layout, repulsion, linkDistance, nodeSpacing, showLabels, logicalW, height]);
|
|
38925
39273
|
React85.useEffect(() => {
|
|
38926
39274
|
const canvas = canvasRef.current;
|
|
38927
39275
|
if (!canvas) return;
|
|
@@ -39001,25 +39349,27 @@ var init_GraphCanvas = __esm({
|
|
|
39001
39349
|
setZoom(1);
|
|
39002
39350
|
setOffset({ x: 0, y: 0 });
|
|
39003
39351
|
}, []);
|
|
39004
|
-
const
|
|
39005
|
-
(
|
|
39006
|
-
|
|
39007
|
-
|
|
39008
|
-
|
|
39009
|
-
|
|
39010
|
-
|
|
39011
|
-
|
|
39012
|
-
|
|
39013
|
-
|
|
39014
|
-
|
|
39015
|
-
|
|
39016
|
-
|
|
39017
|
-
|
|
39018
|
-
|
|
39019
|
-
|
|
39020
|
-
|
|
39021
|
-
|
|
39022
|
-
|
|
39352
|
+
const applyZoom = React85.useCallback((factor, cx, cy) => {
|
|
39353
|
+
if (!interactive) return;
|
|
39354
|
+
const oldZoom = zoomRef.current;
|
|
39355
|
+
const newZoom = Math.max(0.3, Math.min(3, oldZoom * factor));
|
|
39356
|
+
if (newZoom === oldZoom) return;
|
|
39357
|
+
const o = offsetRef.current;
|
|
39358
|
+
setOffset({
|
|
39359
|
+
x: cx - (cx - o.x) * (newZoom / oldZoom),
|
|
39360
|
+
y: cy - (cy - o.y) * (newZoom / oldZoom)
|
|
39361
|
+
});
|
|
39362
|
+
setZoom(newZoom);
|
|
39363
|
+
}, [interactive]);
|
|
39364
|
+
const applyPanDelta = React85.useCallback((dx, dy) => {
|
|
39365
|
+
if (!interactive) return;
|
|
39366
|
+
setOffset((o) => ({ x: o.x + dx, y: o.y + dy }));
|
|
39367
|
+
}, [interactive]);
|
|
39368
|
+
const cancelSinglePointer = React85.useCallback(() => {
|
|
39369
|
+
interactionRef.current.mode = "none";
|
|
39370
|
+
interactionRef.current.dragNodeId = null;
|
|
39371
|
+
}, []);
|
|
39372
|
+
const handlePointerDown = React85.useCallback(
|
|
39023
39373
|
(e) => {
|
|
39024
39374
|
const coords = toCoords(e);
|
|
39025
39375
|
if (!coords) return;
|
|
@@ -39041,7 +39391,7 @@ var init_GraphCanvas = __esm({
|
|
|
39041
39391
|
},
|
|
39042
39392
|
[toCoords, nodeAt, draggable, interactive, offset]
|
|
39043
39393
|
);
|
|
39044
|
-
const
|
|
39394
|
+
const handlePointerMove = React85.useCallback(
|
|
39045
39395
|
(e) => {
|
|
39046
39396
|
const state = interactionRef.current;
|
|
39047
39397
|
if (state.mode === "panning") {
|
|
@@ -39070,7 +39420,7 @@ var init_GraphCanvas = __esm({
|
|
|
39070
39420
|
},
|
|
39071
39421
|
[toCoords, nodeAt]
|
|
39072
39422
|
);
|
|
39073
|
-
const
|
|
39423
|
+
const handlePointerUp = React85.useCallback(
|
|
39074
39424
|
(e) => {
|
|
39075
39425
|
const state = interactionRef.current;
|
|
39076
39426
|
const moved = Math.abs(e.clientX - state.downPos.x) + Math.abs(e.clientY - state.downPos.y);
|
|
@@ -39087,11 +39437,19 @@ var init_GraphCanvas = __esm({
|
|
|
39087
39437
|
},
|
|
39088
39438
|
[toCoords, nodeAt, handleNodeClick]
|
|
39089
39439
|
);
|
|
39090
|
-
const
|
|
39091
|
-
interactionRef.current.mode = "none";
|
|
39092
|
-
interactionRef.current.dragNodeId = null;
|
|
39440
|
+
const handlePointerLeave = React85.useCallback(() => {
|
|
39093
39441
|
setHoveredNode(null);
|
|
39094
39442
|
}, []);
|
|
39443
|
+
const gestureHandlers = useCanvasGestures({
|
|
39444
|
+
canvasRef,
|
|
39445
|
+
enabled: interactive || draggable,
|
|
39446
|
+
onPointerDown: handlePointerDown,
|
|
39447
|
+
onPointerMove: handlePointerMove,
|
|
39448
|
+
onPointerUp: handlePointerUp,
|
|
39449
|
+
onZoom: applyZoom,
|
|
39450
|
+
onPanDelta: applyPanDelta,
|
|
39451
|
+
onMultiTouchStart: cancelSinglePointer
|
|
39452
|
+
});
|
|
39095
39453
|
const handleDoubleClick = React85.useCallback(
|
|
39096
39454
|
(e) => {
|
|
39097
39455
|
const coords = toCoords(e);
|
|
@@ -39160,13 +39518,14 @@ var init_GraphCanvas = __esm({
|
|
|
39160
39518
|
ref: canvasRef,
|
|
39161
39519
|
width: Math.round(logicalW * (typeof window !== "undefined" && window.devicePixelRatio || 1)),
|
|
39162
39520
|
height: Math.round(height * (typeof window !== "undefined" && window.devicePixelRatio || 1)),
|
|
39163
|
-
className: "w-full cursor-grab active:cursor-grabbing",
|
|
39521
|
+
className: "w-full cursor-grab active:cursor-grabbing touch-none",
|
|
39164
39522
|
style: { height },
|
|
39165
|
-
|
|
39166
|
-
|
|
39167
|
-
|
|
39168
|
-
|
|
39169
|
-
|
|
39523
|
+
onPointerDown: gestureHandlers.onPointerDown,
|
|
39524
|
+
onPointerMove: gestureHandlers.onPointerMove,
|
|
39525
|
+
onPointerUp: gestureHandlers.onPointerUp,
|
|
39526
|
+
onPointerCancel: gestureHandlers.onPointerCancel,
|
|
39527
|
+
onPointerLeave: handlePointerLeave,
|
|
39528
|
+
onWheel: gestureHandlers.onWheel,
|
|
39170
39529
|
onDoubleClick: handleDoubleClick
|
|
39171
39530
|
}
|
|
39172
39531
|
) }),
|
|
@@ -43638,6 +43997,9 @@ var init_GameCanvas3D2 = __esm({
|
|
|
43638
43997
|
target: cameraTarget,
|
|
43639
43998
|
enableDamping: true,
|
|
43640
43999
|
dampingFactor: 0.05,
|
|
44000
|
+
enableZoom: true,
|
|
44001
|
+
enablePan: true,
|
|
44002
|
+
touches: { ONE: THREE3__namespace.TOUCH.ROTATE, TWO: THREE3__namespace.TOUCH.DOLLY_PAN },
|
|
43641
44003
|
minDistance: 2,
|
|
43642
44004
|
maxDistance: 100,
|
|
43643
44005
|
maxPolarAngle: Math.PI / 2 - 0.1
|
|
@@ -48949,20 +49311,21 @@ var init_SplitPane = __esm({
|
|
|
48949
49311
|
const [ratio, setRatio] = React85.useState(initialRatio);
|
|
48950
49312
|
const containerRef = React85.useRef(null);
|
|
48951
49313
|
const isDragging = React85.useRef(false);
|
|
48952
|
-
const
|
|
49314
|
+
const handlePointerDown = React85.useCallback(
|
|
48953
49315
|
(e) => {
|
|
48954
49316
|
if (!resizable) return;
|
|
48955
49317
|
e.preventDefault();
|
|
48956
49318
|
isDragging.current = true;
|
|
48957
|
-
|
|
49319
|
+
e.currentTarget.setPointerCapture(e.pointerId);
|
|
49320
|
+
const handlePointerMove = (ev) => {
|
|
48958
49321
|
if (!isDragging.current || !containerRef.current) return;
|
|
48959
49322
|
const rect = containerRef.current.getBoundingClientRect();
|
|
48960
49323
|
let newRatio;
|
|
48961
49324
|
if (direction === "horizontal") {
|
|
48962
|
-
const x =
|
|
49325
|
+
const x = ev.clientX - rect.left;
|
|
48963
49326
|
newRatio = x / rect.width * 100;
|
|
48964
49327
|
} else {
|
|
48965
|
-
const y =
|
|
49328
|
+
const y = ev.clientY - rect.top;
|
|
48966
49329
|
newRatio = y / rect.height * 100;
|
|
48967
49330
|
}
|
|
48968
49331
|
const minRatio = minSize / (direction === "horizontal" ? rect.width : rect.height) * 100;
|
|
@@ -48970,13 +49333,15 @@ var init_SplitPane = __esm({
|
|
|
48970
49333
|
newRatio = Math.max(minRatio, Math.min(maxRatio, newRatio));
|
|
48971
49334
|
setRatio(newRatio);
|
|
48972
49335
|
};
|
|
48973
|
-
const
|
|
49336
|
+
const handlePointerUp = () => {
|
|
48974
49337
|
isDragging.current = false;
|
|
48975
|
-
document.removeEventListener("
|
|
48976
|
-
document.removeEventListener("
|
|
49338
|
+
document.removeEventListener("pointermove", handlePointerMove);
|
|
49339
|
+
document.removeEventListener("pointerup", handlePointerUp);
|
|
49340
|
+
document.removeEventListener("pointercancel", handlePointerUp);
|
|
48977
49341
|
};
|
|
48978
|
-
document.addEventListener("
|
|
48979
|
-
document.addEventListener("
|
|
49342
|
+
document.addEventListener("pointermove", handlePointerMove);
|
|
49343
|
+
document.addEventListener("pointerup", handlePointerUp);
|
|
49344
|
+
document.addEventListener("pointercancel", handlePointerUp);
|
|
48980
49345
|
},
|
|
48981
49346
|
[direction, minSize, resizable]
|
|
48982
49347
|
);
|
|
@@ -49005,9 +49370,9 @@ var init_SplitPane = __esm({
|
|
|
49005
49370
|
resizable && /* @__PURE__ */ jsxRuntime.jsx(
|
|
49006
49371
|
"div",
|
|
49007
49372
|
{
|
|
49008
|
-
|
|
49373
|
+
onPointerDown: handlePointerDown,
|
|
49009
49374
|
className: cn(
|
|
49010
|
-
"flex-shrink-0 bg-border transition-colors",
|
|
49375
|
+
"flex-shrink-0 bg-border transition-colors touch-none",
|
|
49011
49376
|
isHorizontal ? "w-1 cursor-col-resize hover:w-1.5 hover:bg-muted-foreground" : "h-1 cursor-row-resize hover:h-1.5 hover:bg-muted-foreground"
|
|
49012
49377
|
)
|
|
49013
49378
|
}
|