@dreamboard-games/sdk 0.4.0-alpha.1 → 0.4.0-alpha.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/REFERENCE.md +1215 -125
- package/dist/{ResourceCounter-BTXklCEZ.d.ts → ResourceCounter-BuiNstXs.d.ts} +5 -1
- package/dist/{ThemeProvider-DvMl17Ny.d.ts → ThemeProvider-B1sIoBlX.d.ts} +1 -1
- package/dist/{attributes-BrZtP9az.d.ts → attributes-DbvyMbXw.d.ts} +17 -2
- package/dist/authoring/index.d.ts +66 -0
- package/dist/authoring/index.js +560 -0
- package/dist/authoring/index.js.map +1 -0
- package/dist/browser-interaction.d.ts +205 -5
- package/dist/browser-interaction.js +14 -2
- package/dist/{chunk-7W6TQO3X.js → chunk-45FI6XII.js} +613 -366
- package/dist/chunk-45FI6XII.js.map +1 -0
- package/dist/{chunk-3K362ZKR.js → chunk-6JQFGSLD.js} +202 -38
- package/dist/chunk-6JQFGSLD.js.map +1 -0
- package/dist/{chunk-XXBSIPJX.js → chunk-CP35NPPY.js} +131 -59
- package/dist/chunk-CP35NPPY.js.map +1 -0
- package/dist/{chunk-XJYUSD5F.js → chunk-FWVV2X74.js} +2 -2
- package/dist/{chunk-IUGKW2GS.js → chunk-HWJS3VOJ.js} +6 -2
- package/dist/chunk-HWJS3VOJ.js.map +1 -0
- package/dist/chunk-K5ZRJTZZ.js +328 -0
- package/dist/chunk-K5ZRJTZZ.js.map +1 -0
- package/dist/{chunk-7LZZEI25.js → chunk-N6ZDIMRB.js} +1 -1
- package/dist/chunk-N6ZDIMRB.js.map +1 -0
- package/dist/chunk-O6M6PN4E.js +1225 -0
- package/dist/chunk-O6M6PN4E.js.map +1 -0
- package/dist/{chunk-AEUXCFGM.js → chunk-PF7L4BMG.js} +1 -8
- package/dist/{chunk-AEUXCFGM.js.map → chunk-PF7L4BMG.js.map} +1 -1
- package/dist/{chunk-CZMFAS3E.js → chunk-WOWFONLZ.js} +517 -1274
- package/dist/chunk-WOWFONLZ.js.map +1 -0
- package/dist/{chunk-MALRKLRR.js → chunk-WUIVY2KE.js} +301 -12
- package/dist/chunk-WUIVY2KE.js.map +1 -0
- package/dist/chunk-ZAS2SENW.js +12 -0
- package/dist/chunk-ZAS2SENW.js.map +1 -0
- package/dist/codegen.d.ts +11 -3
- package/dist/codegen.js +1 -1
- package/dist/{components-Dqr_LuZJ.d.ts → components-BbWPnZCF.d.ts} +37 -6
- package/dist/{hex-board-view-UCUjMALd.d.ts → hex-board-view-Kz9Q_zsv.d.ts} +1 -1
- package/dist/index.js +2 -1
- package/dist/package-set.d.ts +2 -2
- package/dist/package-set.js +2 -1
- package/dist/player-state-Cqpyeql0.d.ts +371 -0
- package/dist/protocol-BP193lva.d.ts +267 -0
- package/dist/reducer/advanced.js +1 -1
- package/dist/reducer-contract.js +1 -1
- package/dist/reducer.js +2 -2
- package/dist/reducer.js.map +1 -1
- package/dist/runtime/primitives.d.ts +10 -10
- package/dist/runtime/primitives.js +9 -7
- package/dist/runtime/runtime-api.d.ts +2 -2
- package/dist/runtime/workspace-contract.d.ts +23 -12
- package/dist/runtime/workspace-contract.js +7 -6
- package/dist/runtime-api-BJharVaj.d.ts +198 -0
- package/dist/runtime-api-C6aWo9c0.d.ts +95 -0
- package/dist/runtime.d.ts +35 -31
- package/dist/runtime.js +87 -797
- package/dist/runtime.js.map +1 -1
- package/dist/testing.d.ts +254 -140
- package/dist/testing.js +964 -149
- package/dist/testing.js.map +1 -1
- package/dist/types-CYeN0wLK.d.ts +29 -0
- package/dist/{types-BqzHkNMA.d.ts → types-DJj5MJkl.d.ts} +32 -5
- package/dist/types.d.ts +13 -8
- package/dist/ui/components.d.ts +4 -5
- package/dist/ui/components.js +19 -1
- package/dist/ui/player-state.d.ts +2 -365
- package/dist/{ui-contract-W2-kxObe.d.ts → ui-contract-CY7cxsCC.d.ts} +16 -26
- package/dist/ui.d.ts +7 -8
- package/dist/ui.js +20 -2
- package/package.json +25 -19
- package/dist/chunk-3K362ZKR.js.map +0 -1
- package/dist/chunk-7LZZEI25.js.map +0 -1
- package/dist/chunk-7W6TQO3X.js.map +0 -1
- package/dist/chunk-CZMFAS3E.js.map +0 -1
- package/dist/chunk-IUGKW2GS.js.map +0 -1
- package/dist/chunk-MALRKLRR.js.map +0 -1
- package/dist/chunk-XXBSIPJX.js.map +0 -1
- package/dist/hex-color-MhOyuY-o.d.ts +0 -8
- package/dist/runtime-api-BXd70c2e.d.ts +0 -490
- /package/dist/{chunk-XJYUSD5F.js.map → chunk-FWVV2X74.js.map} +0 -0
|
@@ -3631,7 +3631,8 @@ function CardDropTargetView({
|
|
|
3631
3631
|
className,
|
|
3632
3632
|
style,
|
|
3633
3633
|
order,
|
|
3634
|
-
role = "button"
|
|
3634
|
+
role = "button",
|
|
3635
|
+
browserInteractionAttributes
|
|
3635
3636
|
}) {
|
|
3636
3637
|
const surface = useCardDragSurface();
|
|
3637
3638
|
const ref = useRef4(null);
|
|
@@ -3715,6 +3716,7 @@ function CardDropTargetView({
|
|
|
3715
3716
|
"div",
|
|
3716
3717
|
{
|
|
3717
3718
|
ref,
|
|
3719
|
+
...browserInteractionAttributes,
|
|
3718
3720
|
"data-dreamboard-card-drop-target": "",
|
|
3719
3721
|
"data-target-id": targetId,
|
|
3720
3722
|
"data-keyboard-focused": keyboardFocused ? "true" : void 0,
|
|
@@ -4711,6 +4713,9 @@ import { jsx as jsx14, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
|
4711
4713
|
var MobileHandTrayContext = createContext4(
|
|
4712
4714
|
null
|
|
4713
4715
|
);
|
|
4716
|
+
var OverlayInsetContext = createContext4(
|
|
4717
|
+
null
|
|
4718
|
+
);
|
|
4714
4719
|
var MobileHandTrayStateContext = createContext4({
|
|
4715
4720
|
active: false
|
|
4716
4721
|
});
|
|
@@ -4728,6 +4733,7 @@ var DOCK_SNAP_MAX_HEIGHT = {
|
|
|
4728
4733
|
};
|
|
4729
4734
|
function MobileHandTrayProvider({ children }) {
|
|
4730
4735
|
const [handsById, setHandsById] = useState11(() => /* @__PURE__ */ new Map());
|
|
4736
|
+
const [bottomOverlayInsets, setBottomOverlayInsets] = useState11(() => /* @__PURE__ */ new Map());
|
|
4731
4737
|
const isMobile = useIsMobile();
|
|
4732
4738
|
const registerHand = useCallback10((hand) => {
|
|
4733
4739
|
setHandsById((current) => {
|
|
@@ -4752,6 +4758,38 @@ function MobileHandTrayProvider({ children }) {
|
|
|
4752
4758
|
() => ({ registerHand }),
|
|
4753
4759
|
[registerHand]
|
|
4754
4760
|
);
|
|
4761
|
+
const registerBottomOverlayInset = useCallback10(
|
|
4762
|
+
(id, height) => {
|
|
4763
|
+
const normalizedHeight = Math.max(0, Math.ceil(height));
|
|
4764
|
+
setBottomOverlayInsets((current) => {
|
|
4765
|
+
if (current.get(id) === normalizedHeight) return current;
|
|
4766
|
+
const next = new Map(current);
|
|
4767
|
+
if (normalizedHeight === 0) next.delete(id);
|
|
4768
|
+
else next.set(id, normalizedHeight);
|
|
4769
|
+
return next;
|
|
4770
|
+
});
|
|
4771
|
+
return () => {
|
|
4772
|
+
setBottomOverlayInsets((current) => {
|
|
4773
|
+
if (!current.has(id)) return current;
|
|
4774
|
+
const next = new Map(current);
|
|
4775
|
+
next.delete(id);
|
|
4776
|
+
return next;
|
|
4777
|
+
});
|
|
4778
|
+
};
|
|
4779
|
+
},
|
|
4780
|
+
[]
|
|
4781
|
+
);
|
|
4782
|
+
const bottomInset = useMemo9(
|
|
4783
|
+
() => [...bottomOverlayInsets.values()].reduce(
|
|
4784
|
+
(total, height) => total + height,
|
|
4785
|
+
0
|
|
4786
|
+
),
|
|
4787
|
+
[bottomOverlayInsets]
|
|
4788
|
+
);
|
|
4789
|
+
const overlayValue = useMemo9(
|
|
4790
|
+
() => ({ bottomInset, registerBottomOverlayInset }),
|
|
4791
|
+
[bottomInset, registerBottomOverlayInset]
|
|
4792
|
+
);
|
|
4755
4793
|
const hands = useMemo9(
|
|
4756
4794
|
() => [...handsById.values()].sort(
|
|
4757
4795
|
(a, b) => (a.order ?? ROLE_PRIORITY[a.role]) - (b.order ?? ROLE_PRIORITY[b.role]) || ROLE_PRIORITY[a.role] - ROLE_PRIORITY[b.role] || a.label.localeCompare(b.label)
|
|
@@ -4760,22 +4798,19 @@ function MobileHandTrayProvider({ children }) {
|
|
|
4760
4798
|
);
|
|
4761
4799
|
const trayActive = isMobile && hands.length > 0;
|
|
4762
4800
|
const stateValue = useMemo9(() => ({ active: trayActive }), [trayActive]);
|
|
4763
|
-
return /* @__PURE__ */ jsx14(MobileHandTrayContext.Provider, { value, children: /* @__PURE__ */ jsxs6(MobileHandTrayStateContext.Provider, { value: stateValue, children: [
|
|
4801
|
+
return /* @__PURE__ */ jsx14(MobileHandTrayContext.Provider, { value, children: /* @__PURE__ */ jsx14(OverlayInsetContext.Provider, { value: overlayValue, children: /* @__PURE__ */ jsxs6(MobileHandTrayStateContext.Provider, { value: stateValue, children: [
|
|
4764
4802
|
/* @__PURE__ */ jsx14(
|
|
4765
4803
|
"div",
|
|
4766
4804
|
{
|
|
4767
4805
|
"data-dreamboard-mobile-hand-shell": "",
|
|
4768
4806
|
"data-mobile-hand-count": hands.length,
|
|
4769
4807
|
"data-mobile-hand-tray-active": trayActive ? "true" : void 0,
|
|
4770
|
-
style: {
|
|
4771
|
-
minHeight: "100%",
|
|
4772
|
-
paddingBottom: trayActive ? "calc(92px + env(safe-area-inset-bottom, 0px))" : void 0
|
|
4773
|
-
},
|
|
4808
|
+
style: { minHeight: "100%" },
|
|
4774
4809
|
children
|
|
4775
4810
|
}
|
|
4776
4811
|
),
|
|
4777
4812
|
trayActive ? /* @__PURE__ */ jsx14(MobileHandTray, { hands }) : null
|
|
4778
|
-
] }) });
|
|
4813
|
+
] }) }) });
|
|
4779
4814
|
}
|
|
4780
4815
|
function useRegisterMobileHand(hand) {
|
|
4781
4816
|
const context = useContext4(MobileHandTrayContext);
|
|
@@ -4789,6 +4824,17 @@ function useRegisterMobileHand(hand) {
|
|
|
4789
4824
|
function useMobileHandTrayActive() {
|
|
4790
4825
|
return useContext4(MobileHandTrayStateContext).active;
|
|
4791
4826
|
}
|
|
4827
|
+
function useOverlayInsets() {
|
|
4828
|
+
const context = useContext4(OverlayInsetContext);
|
|
4829
|
+
return { bottom: context?.bottomInset ?? 0 };
|
|
4830
|
+
}
|
|
4831
|
+
function useRegisterBottomOverlayInset(id, height) {
|
|
4832
|
+
const context = useContext4(OverlayInsetContext);
|
|
4833
|
+
useEffect10(() => {
|
|
4834
|
+
if (!context) return void 0;
|
|
4835
|
+
return context.registerBottomOverlayInset(id, height);
|
|
4836
|
+
}, [context, height, id]);
|
|
4837
|
+
}
|
|
4792
4838
|
function MobileHandTray({
|
|
4793
4839
|
hands
|
|
4794
4840
|
}) {
|
|
@@ -4806,6 +4852,7 @@ function MobileHandTray({
|
|
|
4806
4852
|
}, []);
|
|
4807
4853
|
const [activeId, setActiveId] = useState11(null);
|
|
4808
4854
|
const themeCssVars = useThemeCssVars();
|
|
4855
|
+
const panelRef = useRef7(null);
|
|
4809
4856
|
const preferredHand = hands.find((hand) => hand.id === activeId) ?? hands.find((hand) => hand.active) ?? hands.find((hand) => hand.role === "primary") ?? hands[0] ?? null;
|
|
4810
4857
|
const selectedHand = hands.find((hand) => hand.id === activeId) ?? preferredHand;
|
|
4811
4858
|
useEffect10(() => {
|
|
@@ -4837,6 +4884,50 @@ function MobileHandTray({
|
|
|
4837
4884
|
const activeBadges = hands.filter(
|
|
4838
4885
|
(hand) => hand.id !== selectedHand.id && hand.active
|
|
4839
4886
|
);
|
|
4887
|
+
return /* @__PURE__ */ jsx14(
|
|
4888
|
+
MobileHandTrayFrame,
|
|
4889
|
+
{
|
|
4890
|
+
panelRef,
|
|
4891
|
+
snap,
|
|
4892
|
+
selectedHand,
|
|
4893
|
+
hands,
|
|
4894
|
+
open,
|
|
4895
|
+
active,
|
|
4896
|
+
activeBadges,
|
|
4897
|
+
bindDrag,
|
|
4898
|
+
setSnap,
|
|
4899
|
+
setActiveId,
|
|
4900
|
+
themeCssVars
|
|
4901
|
+
}
|
|
4902
|
+
);
|
|
4903
|
+
}
|
|
4904
|
+
function MobileHandTrayFrame({
|
|
4905
|
+
panelRef,
|
|
4906
|
+
snap,
|
|
4907
|
+
selectedHand,
|
|
4908
|
+
hands,
|
|
4909
|
+
open,
|
|
4910
|
+
active,
|
|
4911
|
+
activeBadges,
|
|
4912
|
+
bindDrag,
|
|
4913
|
+
setSnap,
|
|
4914
|
+
setActiveId,
|
|
4915
|
+
themeCssVars
|
|
4916
|
+
}) {
|
|
4917
|
+
const [measuredHeight, setMeasuredHeight] = useState11(0);
|
|
4918
|
+
useEffect10(() => {
|
|
4919
|
+
const node = panelRef.current;
|
|
4920
|
+
if (!node) {
|
|
4921
|
+
setMeasuredHeight(0);
|
|
4922
|
+
return void 0;
|
|
4923
|
+
}
|
|
4924
|
+
const update = () => setMeasuredHeight(node.getBoundingClientRect().height);
|
|
4925
|
+
update();
|
|
4926
|
+
const observer = new ResizeObserver(update);
|
|
4927
|
+
observer.observe(node);
|
|
4928
|
+
return () => observer.disconnect();
|
|
4929
|
+
}, [panelRef, snap, selectedHand.id, hands.length]);
|
|
4930
|
+
useRegisterBottomOverlayInset("dreamboard-mobile-hand-tray", measuredHeight);
|
|
4840
4931
|
return /* @__PURE__ */ jsx14(
|
|
4841
4932
|
"div",
|
|
4842
4933
|
{
|
|
@@ -4859,6 +4950,7 @@ function MobileHandTray({
|
|
|
4859
4950
|
children: /* @__PURE__ */ jsxs6(
|
|
4860
4951
|
"div",
|
|
4861
4952
|
{
|
|
4953
|
+
ref: panelRef,
|
|
4862
4954
|
className: "flex w-full flex-col overflow-hidden rounded-t-2xl",
|
|
4863
4955
|
style: {
|
|
4864
4956
|
pointerEvents: "auto",
|
|
@@ -4974,7 +5066,7 @@ function MobileHandTray({
|
|
|
4974
5066
|
{
|
|
4975
5067
|
className: "px-3 pt-2 sm:px-4",
|
|
4976
5068
|
style: {
|
|
4977
|
-
paddingBottom:
|
|
5069
|
+
paddingBottom: 20
|
|
4978
5070
|
},
|
|
4979
5071
|
children: selectedHand.content
|
|
4980
5072
|
}
|
|
@@ -6449,6 +6541,172 @@ function PrimaryButton({
|
|
|
6449
6541
|
);
|
|
6450
6542
|
}
|
|
6451
6543
|
|
|
6544
|
+
// src/ui/components/Panel.tsx
|
|
6545
|
+
import { clsx as clsx13 } from "clsx";
|
|
6546
|
+
import { jsx as jsx29 } from "react/jsx-runtime";
|
|
6547
|
+
function PanelRoot({
|
|
6548
|
+
tone = "card",
|
|
6549
|
+
className,
|
|
6550
|
+
children,
|
|
6551
|
+
style,
|
|
6552
|
+
...props
|
|
6553
|
+
}) {
|
|
6554
|
+
const theme = useTheme();
|
|
6555
|
+
return /* @__PURE__ */ jsx29(
|
|
6556
|
+
"section",
|
|
6557
|
+
{
|
|
6558
|
+
"data-dreamboard-panel": "",
|
|
6559
|
+
"data-tone": tone,
|
|
6560
|
+
className,
|
|
6561
|
+
style: {
|
|
6562
|
+
...surfaceStyle(theme, { tone, radius: "hud" }),
|
|
6563
|
+
boxShadow: theme.elevation.rest,
|
|
6564
|
+
overflow: "hidden",
|
|
6565
|
+
fontFamily: theme.typography.fontFamily.body,
|
|
6566
|
+
...style
|
|
6567
|
+
},
|
|
6568
|
+
...props,
|
|
6569
|
+
children
|
|
6570
|
+
}
|
|
6571
|
+
);
|
|
6572
|
+
}
|
|
6573
|
+
function PanelHeader({
|
|
6574
|
+
className,
|
|
6575
|
+
style,
|
|
6576
|
+
children,
|
|
6577
|
+
...props
|
|
6578
|
+
}) {
|
|
6579
|
+
const theme = useTheme();
|
|
6580
|
+
return /* @__PURE__ */ jsx29(
|
|
6581
|
+
"div",
|
|
6582
|
+
{
|
|
6583
|
+
"data-dreamboard-panel-header": "",
|
|
6584
|
+
className,
|
|
6585
|
+
style: {
|
|
6586
|
+
display: "flex",
|
|
6587
|
+
flexDirection: "column",
|
|
6588
|
+
gap: theme.space[1],
|
|
6589
|
+
padding: `${theme.space[3]} ${theme.space[4]}`,
|
|
6590
|
+
borderBottom: `1px solid ${theme.semantic.border.subtle}`,
|
|
6591
|
+
background: theme.semantic.surface.hud,
|
|
6592
|
+
...style
|
|
6593
|
+
},
|
|
6594
|
+
...props,
|
|
6595
|
+
children
|
|
6596
|
+
}
|
|
6597
|
+
);
|
|
6598
|
+
}
|
|
6599
|
+
function PanelTitle({
|
|
6600
|
+
className,
|
|
6601
|
+
style,
|
|
6602
|
+
children,
|
|
6603
|
+
...props
|
|
6604
|
+
}) {
|
|
6605
|
+
const theme = useTheme();
|
|
6606
|
+
return /* @__PURE__ */ jsx29(
|
|
6607
|
+
"h2",
|
|
6608
|
+
{
|
|
6609
|
+
"data-dreamboard-panel-title": "",
|
|
6610
|
+
className,
|
|
6611
|
+
style: {
|
|
6612
|
+
margin: 0,
|
|
6613
|
+
fontFamily: theme.typography.fontFamily.display,
|
|
6614
|
+
fontSize: theme.typography.fontSize.lg,
|
|
6615
|
+
fontWeight: theme.typography.fontWeight.bold,
|
|
6616
|
+
lineHeight: theme.typography.lineHeight.tight,
|
|
6617
|
+
color: theme.semantic.text.primary,
|
|
6618
|
+
...style
|
|
6619
|
+
},
|
|
6620
|
+
...props,
|
|
6621
|
+
children
|
|
6622
|
+
}
|
|
6623
|
+
);
|
|
6624
|
+
}
|
|
6625
|
+
function PanelDescription({
|
|
6626
|
+
className,
|
|
6627
|
+
style,
|
|
6628
|
+
children,
|
|
6629
|
+
...props
|
|
6630
|
+
}) {
|
|
6631
|
+
const theme = useTheme();
|
|
6632
|
+
return /* @__PURE__ */ jsx29(
|
|
6633
|
+
"p",
|
|
6634
|
+
{
|
|
6635
|
+
"data-dreamboard-panel-description": "",
|
|
6636
|
+
className,
|
|
6637
|
+
style: {
|
|
6638
|
+
margin: 0,
|
|
6639
|
+
color: theme.semantic.text.muted,
|
|
6640
|
+
fontSize: theme.typography.fontSize.sm,
|
|
6641
|
+
lineHeight: theme.typography.lineHeight.normal,
|
|
6642
|
+
...style
|
|
6643
|
+
},
|
|
6644
|
+
...props,
|
|
6645
|
+
children
|
|
6646
|
+
}
|
|
6647
|
+
);
|
|
6648
|
+
}
|
|
6649
|
+
function PanelBody({
|
|
6650
|
+
className,
|
|
6651
|
+
style,
|
|
6652
|
+
children,
|
|
6653
|
+
...props
|
|
6654
|
+
}) {
|
|
6655
|
+
const theme = useTheme();
|
|
6656
|
+
return /* @__PURE__ */ jsx29(
|
|
6657
|
+
"div",
|
|
6658
|
+
{
|
|
6659
|
+
"data-dreamboard-panel-body": "",
|
|
6660
|
+
className: clsx13("min-w-0", className),
|
|
6661
|
+
style: {
|
|
6662
|
+
padding: theme.space[4],
|
|
6663
|
+
display: "flex",
|
|
6664
|
+
flexDirection: "column",
|
|
6665
|
+
gap: theme.space[4],
|
|
6666
|
+
...style
|
|
6667
|
+
},
|
|
6668
|
+
...props,
|
|
6669
|
+
children
|
|
6670
|
+
}
|
|
6671
|
+
);
|
|
6672
|
+
}
|
|
6673
|
+
function PanelActions({
|
|
6674
|
+
className,
|
|
6675
|
+
style,
|
|
6676
|
+
children,
|
|
6677
|
+
...props
|
|
6678
|
+
}) {
|
|
6679
|
+
const theme = useTheme();
|
|
6680
|
+
return /* @__PURE__ */ jsx29(
|
|
6681
|
+
"div",
|
|
6682
|
+
{
|
|
6683
|
+
"data-dreamboard-panel-actions": "",
|
|
6684
|
+
className,
|
|
6685
|
+
style: {
|
|
6686
|
+
display: "flex",
|
|
6687
|
+
flexWrap: "wrap",
|
|
6688
|
+
alignItems: "center",
|
|
6689
|
+
justifyContent: "flex-end",
|
|
6690
|
+
gap: theme.space[2],
|
|
6691
|
+
padding: `${theme.space[3]} ${theme.space[4]}`,
|
|
6692
|
+
borderTop: `1px solid ${theme.semantic.border.subtle}`,
|
|
6693
|
+
background: theme.semantic.surface.inset,
|
|
6694
|
+
...style
|
|
6695
|
+
},
|
|
6696
|
+
...props,
|
|
6697
|
+
children
|
|
6698
|
+
}
|
|
6699
|
+
);
|
|
6700
|
+
}
|
|
6701
|
+
var Panel = {
|
|
6702
|
+
Root: PanelRoot,
|
|
6703
|
+
Header: PanelHeader,
|
|
6704
|
+
Title: PanelTitle,
|
|
6705
|
+
Description: PanelDescription,
|
|
6706
|
+
Body: PanelBody,
|
|
6707
|
+
Actions: PanelActions
|
|
6708
|
+
};
|
|
6709
|
+
|
|
6452
6710
|
// src/ui/components/PrimaryActionButton.tsx
|
|
6453
6711
|
import {
|
|
6454
6712
|
useEffect as useEffect11,
|
|
@@ -6456,7 +6714,7 @@ import {
|
|
|
6456
6714
|
useState as useState13
|
|
6457
6715
|
} from "react";
|
|
6458
6716
|
import { motion as motion5 } from "framer-motion";
|
|
6459
|
-
import { Fragment as Fragment4, jsx as
|
|
6717
|
+
import { Fragment as Fragment4, jsx as jsx30, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
6460
6718
|
function PrimaryActionButton({
|
|
6461
6719
|
variant = "primary",
|
|
6462
6720
|
size = "lg",
|
|
@@ -6493,7 +6751,7 @@ function PrimaryActionButton({
|
|
|
6493
6751
|
const haloEnabled = !reducedMotion && available && attention !== "off" && !submitted;
|
|
6494
6752
|
const tooltip = available ? void 0 : formatUnavailableReason(unavailableReason);
|
|
6495
6753
|
const resolvedLabel = submitted ? whenSubmitted?.label ?? label : label;
|
|
6496
|
-
const resolvedIcon = submitted && whenSubmitted?.icon ? /* @__PURE__ */
|
|
6754
|
+
const resolvedIcon = submitted && whenSubmitted?.icon ? /* @__PURE__ */ jsx30("span", { "aria-hidden": true, style: { fontSize: "1.15em" }, children: whenSubmitted.icon }) : icon ?? null;
|
|
6497
6755
|
return /* @__PURE__ */ jsxs14(
|
|
6498
6756
|
"span",
|
|
6499
6757
|
{
|
|
@@ -6513,7 +6771,7 @@ function PrimaryActionButton({
|
|
|
6513
6771
|
},
|
|
6514
6772
|
children: [
|
|
6515
6773
|
haloEnabled ? /* @__PURE__ */ jsxs14(Fragment4, { children: [
|
|
6516
|
-
/* @__PURE__ */
|
|
6774
|
+
/* @__PURE__ */ jsx30(
|
|
6517
6775
|
motion5.span,
|
|
6518
6776
|
{
|
|
6519
6777
|
"aria-hidden": true,
|
|
@@ -6536,7 +6794,7 @@ function PrimaryActionButton({
|
|
|
6536
6794
|
}
|
|
6537
6795
|
}
|
|
6538
6796
|
),
|
|
6539
|
-
/* @__PURE__ */
|
|
6797
|
+
/* @__PURE__ */ jsx30(
|
|
6540
6798
|
motion5.span,
|
|
6541
6799
|
{
|
|
6542
6800
|
"aria-hidden": true,
|
|
@@ -6593,7 +6851,7 @@ function PrimaryActionButton({
|
|
|
6593
6851
|
},
|
|
6594
6852
|
children: [
|
|
6595
6853
|
resolvedIcon,
|
|
6596
|
-
/* @__PURE__ */
|
|
6854
|
+
/* @__PURE__ */ jsx30("span", { children: resolvedLabel })
|
|
6597
6855
|
]
|
|
6598
6856
|
}
|
|
6599
6857
|
)
|
|
@@ -6631,7 +6889,7 @@ function withAlpha(color, alpha) {
|
|
|
6631
6889
|
import { useId as useId4, useState as useState14 } from "react";
|
|
6632
6890
|
import { motion as motion6, AnimatePresence as AnimatePresence4 } from "framer-motion";
|
|
6633
6891
|
import { ChevronUp } from "lucide-react";
|
|
6634
|
-
import { jsx as
|
|
6892
|
+
import { jsx as jsx31, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
6635
6893
|
function ActionPanel({
|
|
6636
6894
|
title = "Actions",
|
|
6637
6895
|
state,
|
|
@@ -6647,154 +6905,134 @@ function ActionPanel({
|
|
|
6647
6905
|
const [isExpanded, setIsExpanded] = useState14(defaultExpanded);
|
|
6648
6906
|
const [isHovered, setIsHovered] = useState14(false);
|
|
6649
6907
|
const stateLabel = state ? stateLabels?.[state] || state.replace(/([A-Z])/g, " $1").trim() : void 0;
|
|
6650
|
-
return /* @__PURE__ */
|
|
6908
|
+
return /* @__PURE__ */ jsx31(
|
|
6651
6909
|
motion6.div,
|
|
6652
6910
|
{
|
|
6653
6911
|
initial: reducedMotion ? { opacity: 0 } : { opacity: 0, y: 20 },
|
|
6654
6912
|
animate: reducedMotion ? { opacity: 1 } : { opacity: 1, y: 0 },
|
|
6655
6913
|
className,
|
|
6656
|
-
|
|
6657
|
-
|
|
6658
|
-
|
|
6659
|
-
|
|
6660
|
-
|
|
6661
|
-
|
|
6662
|
-
|
|
6663
|
-
|
|
6664
|
-
|
|
6665
|
-
|
|
6666
|
-
|
|
6667
|
-
|
|
6668
|
-
|
|
6669
|
-
|
|
6670
|
-
|
|
6671
|
-
|
|
6672
|
-
|
|
6673
|
-
|
|
6674
|
-
|
|
6675
|
-
|
|
6676
|
-
|
|
6677
|
-
|
|
6678
|
-
|
|
6679
|
-
|
|
6680
|
-
|
|
6681
|
-
|
|
6682
|
-
|
|
6683
|
-
|
|
6684
|
-
|
|
6685
|
-
|
|
6686
|
-
|
|
6687
|
-
|
|
6688
|
-
|
|
6689
|
-
transition: `background ${theme.motion.duration.fast} ${theme.motion.easing.out}`,
|
|
6690
|
-
// Reset native button look.
|
|
6691
|
-
border: "none",
|
|
6692
|
-
textAlign: "left",
|
|
6693
|
-
appearance: "none"
|
|
6694
|
-
},
|
|
6695
|
-
children: [
|
|
6696
|
-
/* @__PURE__ */ jsxs15("div", { children: [
|
|
6697
|
-
/* @__PURE__ */ jsx30(
|
|
6698
|
-
"h2",
|
|
6699
|
-
{
|
|
6700
|
-
style: {
|
|
6701
|
-
margin: 0,
|
|
6702
|
-
fontFamily: theme.typography.fontFamily.display,
|
|
6703
|
-
fontSize: theme.typography.fontSize.xl,
|
|
6704
|
-
fontWeight: theme.typography.fontWeight.bold,
|
|
6705
|
-
color: theme.semantic.text.primary,
|
|
6706
|
-
lineHeight: theme.typography.lineHeight.tight
|
|
6707
|
-
},
|
|
6708
|
-
children: title
|
|
6709
|
-
}
|
|
6710
|
-
),
|
|
6711
|
-
stateLabel && /* @__PURE__ */ jsxs15(
|
|
6712
|
-
"p",
|
|
6914
|
+
children: /* @__PURE__ */ jsxs15(
|
|
6915
|
+
Panel.Root,
|
|
6916
|
+
{
|
|
6917
|
+
"data-dreamboard-action-panel": "",
|
|
6918
|
+
"data-state": isExpanded ? "open" : "closed",
|
|
6919
|
+
"data-collapsible": collapsible ? "true" : void 0,
|
|
6920
|
+
role: "region",
|
|
6921
|
+
"aria-label": title,
|
|
6922
|
+
children: [
|
|
6923
|
+
/* @__PURE__ */ jsx31(
|
|
6924
|
+
"button",
|
|
6925
|
+
{
|
|
6926
|
+
type: "button",
|
|
6927
|
+
onClick: () => collapsible && setIsExpanded(!isExpanded),
|
|
6928
|
+
onMouseEnter: () => setIsHovered(true),
|
|
6929
|
+
onMouseLeave: () => setIsHovered(false),
|
|
6930
|
+
disabled: !collapsible,
|
|
6931
|
+
"aria-expanded": isExpanded,
|
|
6932
|
+
"aria-controls": contentId,
|
|
6933
|
+
style: {
|
|
6934
|
+
width: "100%",
|
|
6935
|
+
display: "block",
|
|
6936
|
+
background: collapsible && isHovered ? theme.semantic.surface.inset : "transparent",
|
|
6937
|
+
color: theme.semantic.text.primary,
|
|
6938
|
+
cursor: collapsible ? "pointer" : "default",
|
|
6939
|
+
transition: `background ${theme.motion.duration.fast} ${theme.motion.easing.out}`,
|
|
6940
|
+
border: "none",
|
|
6941
|
+
textAlign: "left",
|
|
6942
|
+
appearance: "none",
|
|
6943
|
+
padding: 0
|
|
6944
|
+
},
|
|
6945
|
+
children: /* @__PURE__ */ jsxs15(
|
|
6946
|
+
Panel.Header,
|
|
6713
6947
|
{
|
|
6714
6948
|
style: {
|
|
6715
|
-
margin: 0,
|
|
6716
|
-
marginTop: theme.space[1],
|
|
6717
|
-
fontSize: theme.typography.fontSize.sm,
|
|
6718
|
-
fontWeight: theme.typography.fontWeight.medium,
|
|
6719
|
-
color: theme.semantic.text.muted,
|
|
6720
|
-
display: "flex",
|
|
6721
6949
|
alignItems: "center",
|
|
6722
|
-
|
|
6950
|
+
flexDirection: "row",
|
|
6951
|
+
justifyContent: "space-between",
|
|
6952
|
+
gap: theme.space[3],
|
|
6953
|
+
borderBottom: isExpanded ? `1px dashed ${theme.semantic.border.subtle}` : "1px solid transparent",
|
|
6954
|
+
background: "transparent"
|
|
6723
6955
|
},
|
|
6724
6956
|
children: [
|
|
6725
|
-
/* @__PURE__ */
|
|
6726
|
-
|
|
6957
|
+
/* @__PURE__ */ jsxs15("div", { children: [
|
|
6958
|
+
/* @__PURE__ */ jsx31(Panel.Title, { style: { fontSize: theme.typography.fontSize.xl }, children: title }),
|
|
6959
|
+
stateLabel && /* @__PURE__ */ jsxs15(
|
|
6960
|
+
Panel.Description,
|
|
6961
|
+
{
|
|
6962
|
+
style: {
|
|
6963
|
+
marginTop: theme.space[1],
|
|
6964
|
+
fontWeight: theme.typography.fontWeight.medium,
|
|
6965
|
+
display: "flex",
|
|
6966
|
+
alignItems: "center",
|
|
6967
|
+
gap: theme.space[2]
|
|
6968
|
+
},
|
|
6969
|
+
children: [
|
|
6970
|
+
/* @__PURE__ */ jsx31(
|
|
6971
|
+
"span",
|
|
6972
|
+
{
|
|
6973
|
+
style: {
|
|
6974
|
+
width: 8,
|
|
6975
|
+
height: 8,
|
|
6976
|
+
borderRadius: theme.radius.pill,
|
|
6977
|
+
background: theme.semantic.intent.primary.solid,
|
|
6978
|
+
border: `1px solid ${theme.semantic.intent.primary.border}`,
|
|
6979
|
+
display: "inline-block"
|
|
6980
|
+
}
|
|
6981
|
+
}
|
|
6982
|
+
),
|
|
6983
|
+
"Phase: ",
|
|
6984
|
+
stateLabel
|
|
6985
|
+
]
|
|
6986
|
+
}
|
|
6987
|
+
)
|
|
6988
|
+
] }),
|
|
6989
|
+
collapsible && /* @__PURE__ */ jsx31(
|
|
6990
|
+
motion6.span,
|
|
6727
6991
|
{
|
|
6992
|
+
animate: reducedMotion ? void 0 : { rotate: isExpanded ? 0 : 180 },
|
|
6993
|
+
transition: { duration: 0.2 },
|
|
6728
6994
|
style: {
|
|
6729
|
-
|
|
6730
|
-
|
|
6731
|
-
|
|
6732
|
-
background: theme.semantic.
|
|
6733
|
-
|
|
6734
|
-
display: "inline-
|
|
6735
|
-
}
|
|
6995
|
+
padding: theme.space[1],
|
|
6996
|
+
borderRadius: theme.radius.md,
|
|
6997
|
+
border: `1px solid ${theme.semantic.border.default}`,
|
|
6998
|
+
background: theme.semantic.surface.card,
|
|
6999
|
+
color: theme.semantic.text.primary,
|
|
7000
|
+
display: "inline-flex"
|
|
7001
|
+
},
|
|
7002
|
+
children: /* @__PURE__ */ jsx31(
|
|
7003
|
+
ChevronUp,
|
|
7004
|
+
{
|
|
7005
|
+
size: 20,
|
|
7006
|
+
strokeWidth: 2.5,
|
|
7007
|
+
"aria-hidden": "true",
|
|
7008
|
+
style: { display: "block" }
|
|
7009
|
+
}
|
|
7010
|
+
)
|
|
6736
7011
|
}
|
|
6737
|
-
)
|
|
6738
|
-
"Phase: ",
|
|
6739
|
-
stateLabel
|
|
7012
|
+
)
|
|
6740
7013
|
]
|
|
6741
7014
|
}
|
|
6742
7015
|
)
|
|
6743
|
-
|
|
6744
|
-
|
|
6745
|
-
|
|
6746
|
-
|
|
6747
|
-
animate: reducedMotion ? void 0 : { rotate: isExpanded ? 0 : 180 },
|
|
6748
|
-
transition: { duration: 0.2 },
|
|
6749
|
-
style: {
|
|
6750
|
-
padding: theme.space[1],
|
|
6751
|
-
borderRadius: theme.radius.md,
|
|
6752
|
-
border: `1px solid ${theme.semantic.border.default}`,
|
|
6753
|
-
background: theme.semantic.surface.card,
|
|
6754
|
-
color: theme.semantic.text.primary,
|
|
6755
|
-
display: "inline-flex"
|
|
6756
|
-
},
|
|
6757
|
-
children: /* @__PURE__ */ jsx30(
|
|
6758
|
-
ChevronUp,
|
|
6759
|
-
{
|
|
6760
|
-
size: 20,
|
|
6761
|
-
strokeWidth: 2.5,
|
|
6762
|
-
"aria-hidden": "true",
|
|
6763
|
-
style: { display: "block" }
|
|
6764
|
-
}
|
|
6765
|
-
)
|
|
6766
|
-
}
|
|
6767
|
-
)
|
|
6768
|
-
]
|
|
6769
|
-
}
|
|
6770
|
-
),
|
|
6771
|
-
/* @__PURE__ */ jsx30(AnimatePresence4, { initial: false, children: isExpanded && /* @__PURE__ */ jsx30(
|
|
6772
|
-
motion6.div,
|
|
6773
|
-
{
|
|
6774
|
-
id: contentId,
|
|
6775
|
-
initial: reducedMotion ? { opacity: 0 } : { height: 0, opacity: 0 },
|
|
6776
|
-
animate: reducedMotion ? { opacity: 1 } : { height: "auto", opacity: 1 },
|
|
6777
|
-
exit: reducedMotion ? { opacity: 0 } : { height: 0, opacity: 0 },
|
|
6778
|
-
transition: { duration: 0.2, ease: "easeInOut" },
|
|
6779
|
-
style: {
|
|
6780
|
-
overflow: "hidden",
|
|
6781
|
-
background: theme.semantic.surface.card
|
|
6782
|
-
},
|
|
6783
|
-
children: /* @__PURE__ */ jsx30(
|
|
6784
|
-
"div",
|
|
7016
|
+
}
|
|
7017
|
+
),
|
|
7018
|
+
/* @__PURE__ */ jsx31(AnimatePresence4, { initial: false, children: isExpanded && /* @__PURE__ */ jsx31(
|
|
7019
|
+
motion6.div,
|
|
6785
7020
|
{
|
|
7021
|
+
id: contentId,
|
|
7022
|
+
initial: reducedMotion ? { opacity: 0 } : { height: 0, opacity: 0 },
|
|
7023
|
+
animate: reducedMotion ? { opacity: 1 } : { height: "auto", opacity: 1 },
|
|
7024
|
+
exit: reducedMotion ? { opacity: 0 } : { height: 0, opacity: 0 },
|
|
7025
|
+
transition: { duration: 0.2, ease: "easeInOut" },
|
|
6786
7026
|
style: {
|
|
6787
|
-
|
|
6788
|
-
|
|
6789
|
-
flexDirection: "column",
|
|
6790
|
-
gap: theme.space[6]
|
|
7027
|
+
overflow: "hidden",
|
|
7028
|
+
background: theme.semantic.surface.card
|
|
6791
7029
|
},
|
|
6792
|
-
children
|
|
7030
|
+
children: /* @__PURE__ */ jsx31(Panel.Body, { style: { gap: theme.space[6] }, children })
|
|
6793
7031
|
}
|
|
6794
|
-
)
|
|
6795
|
-
|
|
6796
|
-
|
|
6797
|
-
|
|
7032
|
+
) })
|
|
7033
|
+
]
|
|
7034
|
+
}
|
|
7035
|
+
)
|
|
6798
7036
|
}
|
|
6799
7037
|
);
|
|
6800
7038
|
}
|
|
@@ -6847,7 +7085,7 @@ function ActionGroup({
|
|
|
6847
7085
|
role: "group",
|
|
6848
7086
|
"aria-labelledby": `action-group-${title.toLowerCase().replace(/\s+/g, "-")}`,
|
|
6849
7087
|
children: [
|
|
6850
|
-
/* @__PURE__ */
|
|
7088
|
+
/* @__PURE__ */ jsx31(
|
|
6851
7089
|
"span",
|
|
6852
7090
|
{
|
|
6853
7091
|
style: {
|
|
@@ -6860,7 +7098,7 @@ function ActionGroup({
|
|
|
6860
7098
|
children: "Group"
|
|
6861
7099
|
}
|
|
6862
7100
|
),
|
|
6863
|
-
/* @__PURE__ */
|
|
7101
|
+
/* @__PURE__ */ jsx31(
|
|
6864
7102
|
"h3",
|
|
6865
7103
|
{
|
|
6866
7104
|
id: `action-group-${title.toLowerCase().replace(/\s+/g, "-")}`,
|
|
@@ -6875,7 +7113,7 @@ function ActionGroup({
|
|
|
6875
7113
|
children: title
|
|
6876
7114
|
}
|
|
6877
7115
|
),
|
|
6878
|
-
description && /* @__PURE__ */
|
|
7116
|
+
description && /* @__PURE__ */ jsx31(
|
|
6879
7117
|
"p",
|
|
6880
7118
|
{
|
|
6881
7119
|
style: {
|
|
@@ -6889,7 +7127,7 @@ function ActionGroup({
|
|
|
6889
7127
|
children: description
|
|
6890
7128
|
}
|
|
6891
7129
|
),
|
|
6892
|
-
/* @__PURE__ */
|
|
7130
|
+
/* @__PURE__ */ jsx31(
|
|
6893
7131
|
"div",
|
|
6894
7132
|
{
|
|
6895
7133
|
style: {
|
|
@@ -6908,7 +7146,7 @@ function ActionGroup({
|
|
|
6908
7146
|
// src/ui/components/MoreActions.tsx
|
|
6909
7147
|
import { useId as useId5, useState as useState15 } from "react";
|
|
6910
7148
|
import { ChevronDown, MoreHorizontal } from "lucide-react";
|
|
6911
|
-
import { jsx as
|
|
7149
|
+
import { jsx as jsx32, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
6912
7150
|
function MoreActions({
|
|
6913
7151
|
children,
|
|
6914
7152
|
label = "More",
|
|
@@ -6952,8 +7190,8 @@ function MoreActions({
|
|
|
6952
7190
|
...style
|
|
6953
7191
|
},
|
|
6954
7192
|
children: [
|
|
6955
|
-
/* @__PURE__ */
|
|
6956
|
-
/* @__PURE__ */
|
|
7193
|
+
/* @__PURE__ */ jsx32(MoreHorizontal, { size: 16, "aria-hidden": true }),
|
|
7194
|
+
/* @__PURE__ */ jsx32("span", { children: label }),
|
|
6957
7195
|
showCount ? /* @__PURE__ */ jsxs16(
|
|
6958
7196
|
"span",
|
|
6959
7197
|
{
|
|
@@ -6969,7 +7207,7 @@ function MoreActions({
|
|
|
6969
7207
|
]
|
|
6970
7208
|
}
|
|
6971
7209
|
) : null,
|
|
6972
|
-
/* @__PURE__ */
|
|
7210
|
+
/* @__PURE__ */ jsx32(
|
|
6973
7211
|
ChevronDown,
|
|
6974
7212
|
{
|
|
6975
7213
|
size: 14,
|
|
@@ -6983,7 +7221,7 @@ function MoreActions({
|
|
|
6983
7221
|
]
|
|
6984
7222
|
}
|
|
6985
7223
|
),
|
|
6986
|
-
open ? /* @__PURE__ */
|
|
7224
|
+
open ? /* @__PURE__ */ jsx32(
|
|
6987
7225
|
"div",
|
|
6988
7226
|
{
|
|
6989
7227
|
id: regionId,
|
|
@@ -7010,7 +7248,7 @@ function MoreActions({
|
|
|
7010
7248
|
}
|
|
7011
7249
|
|
|
7012
7250
|
// src/ui/components/DiceRoller.tsx
|
|
7013
|
-
import { clsx as
|
|
7251
|
+
import { clsx as clsx14 } from "clsx";
|
|
7014
7252
|
import { motion as motion7 } from "framer-motion";
|
|
7015
7253
|
import {
|
|
7016
7254
|
useCallback as useCallback12,
|
|
@@ -7021,7 +7259,7 @@ import {
|
|
|
7021
7259
|
|
|
7022
7260
|
// src/ui/primitives/dice.tsx
|
|
7023
7261
|
import { createContext as createContext7, useContext as useContext7 } from "react";
|
|
7024
|
-
import { jsx as
|
|
7262
|
+
import { jsx as jsx33 } from "react/jsx-runtime";
|
|
7025
7263
|
var DiceContext = createContext7(null);
|
|
7026
7264
|
function normalizeDiceState({
|
|
7027
7265
|
values,
|
|
@@ -7042,7 +7280,7 @@ function normalizeDiceState({
|
|
|
7042
7280
|
}
|
|
7043
7281
|
|
|
7044
7282
|
// src/ui/components/DiceRoller.tsx
|
|
7045
|
-
import { jsx as
|
|
7283
|
+
import { jsx as jsx34, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
7046
7284
|
var DEFAULT_MIN_SPIN_MS = 1200;
|
|
7047
7285
|
var DEFAULT_REVEAL_HOLD_MS = 1400;
|
|
7048
7286
|
var FACE_SEQUENCE = [1, 2, 3, 4, 5, 6];
|
|
@@ -7057,12 +7295,12 @@ function DiceRoller({
|
|
|
7057
7295
|
return /* @__PURE__ */ jsxs17(
|
|
7058
7296
|
"div",
|
|
7059
7297
|
{
|
|
7060
|
-
className:
|
|
7298
|
+
className: clsx14("flex flex-col items-center gap-4", className),
|
|
7061
7299
|
role: "region",
|
|
7062
7300
|
"aria-label": "Dice roller",
|
|
7063
7301
|
children: [
|
|
7064
|
-
render ? render(renderProps) : /* @__PURE__ */
|
|
7065
|
-
rollAction ? /* @__PURE__ */
|
|
7302
|
+
render ? render(renderProps) : /* @__PURE__ */ jsx34(DefaultDiceReadout, { ...renderProps }),
|
|
7303
|
+
rollAction ? /* @__PURE__ */ jsx34(
|
|
7066
7304
|
DiceRollDialog,
|
|
7067
7305
|
{
|
|
7068
7306
|
action: rollAction,
|
|
@@ -7070,7 +7308,7 @@ function DiceRoller({
|
|
|
7070
7308
|
diceCount: renderProps.diceCount
|
|
7071
7309
|
}
|
|
7072
7310
|
) : null,
|
|
7073
|
-
/* @__PURE__ */
|
|
7311
|
+
/* @__PURE__ */ jsx34("div", { className: "sr-only", "aria-live": "polite", children: renderProps.allRolled && renderProps.values ? `Rolled ${renderProps.values.join(", ")}. Total: ${renderProps.sum}` : "Dice not rolled yet" })
|
|
7074
7312
|
]
|
|
7075
7313
|
}
|
|
7076
7314
|
);
|
|
@@ -7108,7 +7346,7 @@ function DefaultDiceReadout({
|
|
|
7108
7346
|
]
|
|
7109
7347
|
}
|
|
7110
7348
|
) : null,
|
|
7111
|
-
/* @__PURE__ */
|
|
7349
|
+
/* @__PURE__ */ jsx34(DiceRow, { values: dice, size: 44, rolling: false })
|
|
7112
7350
|
]
|
|
7113
7351
|
}
|
|
7114
7352
|
);
|
|
@@ -7219,7 +7457,7 @@ function DiceRollDialog({
|
|
|
7219
7457
|
const rollLabel = action.rollLabel ?? "Roll dice";
|
|
7220
7458
|
const disabled = action.available === false || phase === "rolling";
|
|
7221
7459
|
const canClose = true;
|
|
7222
|
-
return /* @__PURE__ */
|
|
7460
|
+
return /* @__PURE__ */ jsx34(Dialog, { open, onOpenChange: canClose ? setOpen : void 0, children: /* @__PURE__ */ jsxs17(
|
|
7223
7461
|
DialogContent,
|
|
7224
7462
|
{
|
|
7225
7463
|
"data-dismiss-behavior": "dismiss",
|
|
@@ -7235,7 +7473,7 @@ function DiceRollDialog({
|
|
|
7235
7473
|
onInteractOutside: canClose ? void 0 : (event) => event.preventDefault(),
|
|
7236
7474
|
children: [
|
|
7237
7475
|
/* @__PURE__ */ jsxs17(DialogHeader, { className: "text-center sm:text-center", children: [
|
|
7238
|
-
/* @__PURE__ */
|
|
7476
|
+
/* @__PURE__ */ jsx34(
|
|
7239
7477
|
DialogTitle,
|
|
7240
7478
|
{
|
|
7241
7479
|
style: {
|
|
@@ -7245,7 +7483,7 @@ function DiceRollDialog({
|
|
|
7245
7483
|
children: title
|
|
7246
7484
|
}
|
|
7247
7485
|
),
|
|
7248
|
-
/* @__PURE__ */
|
|
7486
|
+
/* @__PURE__ */ jsx34(DialogDescription, { children: description })
|
|
7249
7487
|
] }),
|
|
7250
7488
|
/* @__PURE__ */ jsxs17(
|
|
7251
7489
|
"div",
|
|
@@ -7257,8 +7495,8 @@ function DiceRollDialog({
|
|
|
7257
7495
|
gap: theme.space[4]
|
|
7258
7496
|
},
|
|
7259
7497
|
children: [
|
|
7260
|
-
/* @__PURE__ */
|
|
7261
|
-
/* @__PURE__ */
|
|
7498
|
+
/* @__PURE__ */ jsx34(RollResult, { label: resultLabel, sum: displaySum, phase }),
|
|
7499
|
+
/* @__PURE__ */ jsx34(
|
|
7262
7500
|
DiceRow,
|
|
7263
7501
|
{
|
|
7264
7502
|
values: displayValues,
|
|
@@ -7266,7 +7504,7 @@ function DiceRollDialog({
|
|
|
7266
7504
|
rolling: phase === "rolling"
|
|
7267
7505
|
}
|
|
7268
7506
|
),
|
|
7269
|
-
error ? /* @__PURE__ */
|
|
7507
|
+
error ? /* @__PURE__ */ jsx34(
|
|
7270
7508
|
"span",
|
|
7271
7509
|
{
|
|
7272
7510
|
role: "alert",
|
|
@@ -7278,7 +7516,7 @@ function DiceRollDialog({
|
|
|
7278
7516
|
children: error
|
|
7279
7517
|
}
|
|
7280
7518
|
) : null,
|
|
7281
|
-
/* @__PURE__ */
|
|
7519
|
+
/* @__PURE__ */ jsx34(
|
|
7282
7520
|
ThemedButton,
|
|
7283
7521
|
{
|
|
7284
7522
|
type: "button",
|
|
@@ -7318,7 +7556,7 @@ function RollResult({
|
|
|
7318
7556
|
textAlign: "center"
|
|
7319
7557
|
},
|
|
7320
7558
|
children: [
|
|
7321
|
-
/* @__PURE__ */
|
|
7559
|
+
/* @__PURE__ */ jsx34(
|
|
7322
7560
|
"div",
|
|
7323
7561
|
{
|
|
7324
7562
|
style: {
|
|
@@ -7331,7 +7569,7 @@ function RollResult({
|
|
|
7331
7569
|
children: label
|
|
7332
7570
|
}
|
|
7333
7571
|
),
|
|
7334
|
-
/* @__PURE__ */
|
|
7572
|
+
/* @__PURE__ */ jsx34(
|
|
7335
7573
|
"div",
|
|
7336
7574
|
{
|
|
7337
7575
|
style: {
|
|
@@ -7355,7 +7593,7 @@ function DiceRow({
|
|
|
7355
7593
|
rolling
|
|
7356
7594
|
}) {
|
|
7357
7595
|
const gap = Math.max(8, Math.round(size * 0.18));
|
|
7358
|
-
return /* @__PURE__ */
|
|
7596
|
+
return /* @__PURE__ */ jsx34(
|
|
7359
7597
|
"div",
|
|
7360
7598
|
{
|
|
7361
7599
|
role: "list",
|
|
@@ -7366,7 +7604,7 @@ function DiceRow({
|
|
|
7366
7604
|
gap,
|
|
7367
7605
|
flexWrap: "wrap"
|
|
7368
7606
|
},
|
|
7369
|
-
children: values.map((value, index) => /* @__PURE__ */
|
|
7607
|
+
children: values.map((value, index) => /* @__PURE__ */ jsx34(
|
|
7370
7608
|
DieFace,
|
|
7371
7609
|
{
|
|
7372
7610
|
value,
|
|
@@ -7402,7 +7640,7 @@ function DieFace({
|
|
|
7402
7640
|
flex: "0 0 auto",
|
|
7403
7641
|
overflow: "hidden"
|
|
7404
7642
|
};
|
|
7405
|
-
return /* @__PURE__ */
|
|
7643
|
+
return /* @__PURE__ */ jsx34(
|
|
7406
7644
|
motion7.div,
|
|
7407
7645
|
{
|
|
7408
7646
|
role: "listitem",
|
|
@@ -7419,7 +7657,7 @@ function DieFace({
|
|
|
7419
7657
|
delay: index * 0.06,
|
|
7420
7658
|
ease: "easeInOut"
|
|
7421
7659
|
} : { duration: 0.2 },
|
|
7422
|
-
children: showPips ? /* @__PURE__ */
|
|
7660
|
+
children: showPips ? /* @__PURE__ */ jsx34(PipFace, { value }) : /* @__PURE__ */ jsx34(
|
|
7423
7661
|
"span",
|
|
7424
7662
|
{
|
|
7425
7663
|
style: {
|
|
@@ -7437,7 +7675,7 @@ function DieFace({
|
|
|
7437
7675
|
function PipFace({ value }) {
|
|
7438
7676
|
const theme = useTheme();
|
|
7439
7677
|
const pips = pipPositions(value);
|
|
7440
|
-
return /* @__PURE__ */
|
|
7678
|
+
return /* @__PURE__ */ jsx34(
|
|
7441
7679
|
"span",
|
|
7442
7680
|
{
|
|
7443
7681
|
"aria-hidden": true,
|
|
@@ -7445,7 +7683,7 @@ function PipFace({ value }) {
|
|
|
7445
7683
|
position: "absolute",
|
|
7446
7684
|
inset: "18%"
|
|
7447
7685
|
},
|
|
7448
|
-
children: pips.map(([left, top], index) => /* @__PURE__ */
|
|
7686
|
+
children: pips.map(([left, top], index) => /* @__PURE__ */ jsx34(
|
|
7449
7687
|
"span",
|
|
7450
7688
|
{
|
|
7451
7689
|
style: {
|
|
@@ -7521,8 +7759,8 @@ function sumValues(values) {
|
|
|
7521
7759
|
|
|
7522
7760
|
// src/ui/components/PhaseIndicator.tsx
|
|
7523
7761
|
import { motion as motion8 } from "framer-motion";
|
|
7524
|
-
import { clsx as
|
|
7525
|
-
import { jsx as
|
|
7762
|
+
import { clsx as clsx15 } from "clsx";
|
|
7763
|
+
import { jsx as jsx35, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
7526
7764
|
function PhaseIndicator({
|
|
7527
7765
|
currentPhase,
|
|
7528
7766
|
phaseLabels,
|
|
@@ -7535,7 +7773,7 @@ function PhaseIndicator({
|
|
|
7535
7773
|
const reducedMotion = theme.motion.reducedMotion === "true";
|
|
7536
7774
|
const label = phaseLabels?.[currentPhase] ?? formatPhase(currentPhase);
|
|
7537
7775
|
if (variant === "minimal") {
|
|
7538
|
-
return /* @__PURE__ */
|
|
7776
|
+
return /* @__PURE__ */ jsx35(
|
|
7539
7777
|
"span",
|
|
7540
7778
|
{
|
|
7541
7779
|
className,
|
|
@@ -7570,10 +7808,10 @@ function PhaseIndicator({
|
|
|
7570
7808
|
reducedMotion
|
|
7571
7809
|
});
|
|
7572
7810
|
const ariaLabel = state === "your-turn" ? `Your turn \u2014 ${label}` : state === "waiting" ? `Waiting for ${formatPlayerList(activePlayerNames ?? [])} \u2014 ${label}` : label;
|
|
7573
|
-
return /* @__PURE__ */
|
|
7811
|
+
return /* @__PURE__ */ jsx35(
|
|
7574
7812
|
"div",
|
|
7575
7813
|
{
|
|
7576
|
-
className:
|
|
7814
|
+
className: clsx15("flex items-center gap-3 flex-wrap", className),
|
|
7577
7815
|
style: containerStyle,
|
|
7578
7816
|
role: "status",
|
|
7579
7817
|
"aria-live": "polite",
|
|
@@ -7601,7 +7839,7 @@ function renderHeadline({
|
|
|
7601
7839
|
reducedMotion
|
|
7602
7840
|
}) {
|
|
7603
7841
|
if (state === "phase-only") {
|
|
7604
|
-
return /* @__PURE__ */
|
|
7842
|
+
return /* @__PURE__ */ jsx35("div", { style: textBlockStyle(theme), children: /* @__PURE__ */ jsx35("span", { style: titleTextStyle(theme), children: label }) });
|
|
7605
7843
|
}
|
|
7606
7844
|
const isYourTurn = state === "your-turn";
|
|
7607
7845
|
const intent = isYourTurn ? theme.semantic.intent.success : theme.semantic.intent.info;
|
|
@@ -7617,7 +7855,7 @@ function renderHeadline({
|
|
|
7617
7855
|
gap: theme.space[3]
|
|
7618
7856
|
},
|
|
7619
7857
|
children: [
|
|
7620
|
-
/* @__PURE__ */
|
|
7858
|
+
/* @__PURE__ */ jsx35(
|
|
7621
7859
|
StatusIndicator,
|
|
7622
7860
|
{
|
|
7623
7861
|
intent,
|
|
@@ -7626,8 +7864,8 @@ function renderHeadline({
|
|
|
7626
7864
|
}
|
|
7627
7865
|
),
|
|
7628
7866
|
/* @__PURE__ */ jsxs18("div", { style: textBlockStyle(theme), children: [
|
|
7629
|
-
/* @__PURE__ */
|
|
7630
|
-
/* @__PURE__ */
|
|
7867
|
+
/* @__PURE__ */ jsx35("span", { style: titleTextStyle(theme), children: titleText }),
|
|
7868
|
+
/* @__PURE__ */ jsx35("span", { style: subtitleTextStyle(theme), children: label })
|
|
7631
7869
|
] })
|
|
7632
7870
|
]
|
|
7633
7871
|
}
|
|
@@ -7683,7 +7921,7 @@ function StatusIndicator({
|
|
|
7683
7921
|
flexShrink: 0
|
|
7684
7922
|
},
|
|
7685
7923
|
children: [
|
|
7686
|
-
/* @__PURE__ */
|
|
7924
|
+
/* @__PURE__ */ jsx35(
|
|
7687
7925
|
motion8.span,
|
|
7688
7926
|
{
|
|
7689
7927
|
style: {
|
|
@@ -7700,7 +7938,7 @@ function StatusIndicator({
|
|
|
7700
7938
|
}
|
|
7701
7939
|
}
|
|
7702
7940
|
),
|
|
7703
|
-
/* @__PURE__ */
|
|
7941
|
+
/* @__PURE__ */ jsx35(
|
|
7704
7942
|
"span",
|
|
7705
7943
|
{
|
|
7706
7944
|
style: {
|
|
@@ -7731,7 +7969,7 @@ function StatusIndicator({
|
|
|
7731
7969
|
flexShrink: 0
|
|
7732
7970
|
},
|
|
7733
7971
|
children: [
|
|
7734
|
-
/* @__PURE__ */
|
|
7972
|
+
/* @__PURE__ */ jsx35(
|
|
7735
7973
|
"span",
|
|
7736
7974
|
{
|
|
7737
7975
|
style: {
|
|
@@ -7742,7 +7980,7 @@ function StatusIndicator({
|
|
|
7742
7980
|
}
|
|
7743
7981
|
}
|
|
7744
7982
|
),
|
|
7745
|
-
/* @__PURE__ */
|
|
7983
|
+
/* @__PURE__ */ jsx35(
|
|
7746
7984
|
motion8.span,
|
|
7747
7985
|
{
|
|
7748
7986
|
style: {
|
|
@@ -7770,7 +8008,7 @@ function StatusIndicator({
|
|
|
7770
8008
|
import { motion as motion9 } from "framer-motion";
|
|
7771
8009
|
import { Trophy, Home, Crown, Medal } from "lucide-react";
|
|
7772
8010
|
import { useEffect as useEffect13, useState as useState17 } from "react";
|
|
7773
|
-
import { jsx as
|
|
8011
|
+
import { jsx as jsx36, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
7774
8012
|
function rankIntent(rank) {
|
|
7775
8013
|
if (rank === 1) return "warning";
|
|
7776
8014
|
if (rank === 2) return "secondary";
|
|
@@ -7780,7 +8018,7 @@ function rankIntent(rank) {
|
|
|
7780
8018
|
function RankIcon({ rank, theme }) {
|
|
7781
8019
|
const intent = intentForVariant(theme, rankIntent(rank));
|
|
7782
8020
|
if (rank === 1) {
|
|
7783
|
-
return /* @__PURE__ */
|
|
8021
|
+
return /* @__PURE__ */ jsx36(
|
|
7784
8022
|
Trophy,
|
|
7785
8023
|
{
|
|
7786
8024
|
width: 20,
|
|
@@ -7792,7 +8030,7 @@ function RankIcon({ rank, theme }) {
|
|
|
7792
8030
|
);
|
|
7793
8031
|
}
|
|
7794
8032
|
if (rank === 2 || rank === 3) {
|
|
7795
|
-
return /* @__PURE__ */
|
|
8033
|
+
return /* @__PURE__ */ jsx36(
|
|
7796
8034
|
Medal,
|
|
7797
8035
|
{
|
|
7798
8036
|
width: 20,
|
|
@@ -7839,7 +8077,7 @@ function GameEndDisplay({
|
|
|
7839
8077
|
const sortedScores = [...scores].sort((a, b) => b.score - a.score);
|
|
7840
8078
|
const winningIntent = theme.semantic.intent.warning;
|
|
7841
8079
|
const title = `${winner?.name ?? "Game"} Wins!`;
|
|
7842
|
-
return /* @__PURE__ */
|
|
8080
|
+
return /* @__PURE__ */ jsx36(Dialog, { open: isOpen, onOpenChange: setIsOpen, children: /* @__PURE__ */ jsxs19(
|
|
7843
8081
|
DialogContent,
|
|
7844
8082
|
{
|
|
7845
8083
|
className: `border-0 p-6 text-center shadow-none sm:max-w-lg ${className ?? ""}`,
|
|
@@ -7857,8 +8095,8 @@ function GameEndDisplay({
|
|
|
7857
8095
|
fontFamily: theme.typography.fontFamily.body
|
|
7858
8096
|
},
|
|
7859
8097
|
children: [
|
|
7860
|
-
/* @__PURE__ */
|
|
7861
|
-
/* @__PURE__ */
|
|
8098
|
+
/* @__PURE__ */ jsx36(DialogTitle, { className: "sr-only", children: title }),
|
|
8099
|
+
/* @__PURE__ */ jsx36(
|
|
7862
8100
|
motion9.div,
|
|
7863
8101
|
{
|
|
7864
8102
|
initial: reducedMotion ? { scale: 1 } : { scale: 0.95, rotate: -180, opacity: 0 },
|
|
@@ -7881,7 +8119,7 @@ function GameEndDisplay({
|
|
|
7881
8119
|
border: `3px solid ${winningIntent.border}`,
|
|
7882
8120
|
boxShadow: theme.elevation.lifted
|
|
7883
8121
|
},
|
|
7884
|
-
children: /* @__PURE__ */
|
|
8122
|
+
children: /* @__PURE__ */ jsx36(
|
|
7885
8123
|
Trophy,
|
|
7886
8124
|
{
|
|
7887
8125
|
width: 48,
|
|
@@ -7900,7 +8138,7 @@ function GameEndDisplay({
|
|
|
7900
8138
|
animate: reducedMotion ? { opacity: 1 } : { opacity: 1, y: 0 },
|
|
7901
8139
|
transition: { delay: reducedMotion ? 0 : 0.4 },
|
|
7902
8140
|
children: [
|
|
7903
|
-
/* @__PURE__ */
|
|
8141
|
+
/* @__PURE__ */ jsx36(
|
|
7904
8142
|
"h2",
|
|
7905
8143
|
{
|
|
7906
8144
|
"aria-hidden": "true",
|
|
@@ -7916,7 +8154,7 @@ function GameEndDisplay({
|
|
|
7916
8154
|
children: title
|
|
7917
8155
|
}
|
|
7918
8156
|
),
|
|
7919
|
-
winnerMessage && /* @__PURE__ */
|
|
8157
|
+
winnerMessage && /* @__PURE__ */ jsx36(
|
|
7920
8158
|
"p",
|
|
7921
8159
|
{
|
|
7922
8160
|
style: {
|
|
@@ -7932,7 +8170,7 @@ function GameEndDisplay({
|
|
|
7932
8170
|
]
|
|
7933
8171
|
}
|
|
7934
8172
|
),
|
|
7935
|
-
/* @__PURE__ */
|
|
8173
|
+
/* @__PURE__ */ jsx36(
|
|
7936
8174
|
motion9.div,
|
|
7937
8175
|
{
|
|
7938
8176
|
initial: { opacity: 0 },
|
|
@@ -7980,8 +8218,8 @@ function GameEndDisplay({
|
|
|
7980
8218
|
gap: theme.space[3]
|
|
7981
8219
|
},
|
|
7982
8220
|
children: [
|
|
7983
|
-
/* @__PURE__ */
|
|
7984
|
-
/* @__PURE__ */
|
|
8221
|
+
/* @__PURE__ */ jsx36(RankIcon, { rank, theme }),
|
|
8222
|
+
/* @__PURE__ */ jsx36(
|
|
7985
8223
|
"span",
|
|
7986
8224
|
{
|
|
7987
8225
|
style: {
|
|
@@ -7993,7 +8231,7 @@ function GameEndDisplay({
|
|
|
7993
8231
|
children: player.name
|
|
7994
8232
|
}
|
|
7995
8233
|
),
|
|
7996
|
-
isWinner && /* @__PURE__ */
|
|
8234
|
+
isWinner && /* @__PURE__ */ jsx36(
|
|
7997
8235
|
Crown,
|
|
7998
8236
|
{
|
|
7999
8237
|
width: 20,
|
|
@@ -8006,7 +8244,7 @@ function GameEndDisplay({
|
|
|
8006
8244
|
]
|
|
8007
8245
|
}
|
|
8008
8246
|
),
|
|
8009
|
-
/* @__PURE__ */
|
|
8247
|
+
/* @__PURE__ */ jsx36(
|
|
8010
8248
|
"span",
|
|
8011
8249
|
{
|
|
8012
8250
|
style: {
|
|
@@ -8060,7 +8298,7 @@ function GameEndDisplay({
|
|
|
8060
8298
|
gap: theme.space[2]
|
|
8061
8299
|
},
|
|
8062
8300
|
children: [
|
|
8063
|
-
/* @__PURE__ */
|
|
8301
|
+
/* @__PURE__ */ jsx36(
|
|
8064
8302
|
"span",
|
|
8065
8303
|
{
|
|
8066
8304
|
style: {
|
|
@@ -8076,7 +8314,7 @@ function GameEndDisplay({
|
|
|
8076
8314
|
]
|
|
8077
8315
|
}
|
|
8078
8316
|
),
|
|
8079
|
-
/* @__PURE__ */
|
|
8317
|
+
/* @__PURE__ */ jsx36(
|
|
8080
8318
|
"div",
|
|
8081
8319
|
{
|
|
8082
8320
|
style: {
|
|
@@ -8094,8 +8332,8 @@ function GameEndDisplay({
|
|
|
8094
8332
|
color: theme.semantic.text.primary
|
|
8095
8333
|
},
|
|
8096
8334
|
children: [
|
|
8097
|
-
/* @__PURE__ */
|
|
8098
|
-
/* @__PURE__ */
|
|
8335
|
+
/* @__PURE__ */ jsx36("span", { style: { textTransform: "capitalize" }, children: key.replace(/([A-Z])/g, " $1") }),
|
|
8336
|
+
/* @__PURE__ */ jsx36(
|
|
8099
8337
|
"span",
|
|
8100
8338
|
{
|
|
8101
8339
|
style: {
|
|
@@ -8114,7 +8352,7 @@ function GameEndDisplay({
|
|
|
8114
8352
|
]
|
|
8115
8353
|
}
|
|
8116
8354
|
),
|
|
8117
|
-
onReturnToLobby && /* @__PURE__ */
|
|
8355
|
+
onReturnToLobby && /* @__PURE__ */ jsx36(
|
|
8118
8356
|
motion9.div,
|
|
8119
8357
|
{
|
|
8120
8358
|
initial: reducedMotion ? { opacity: 0 } : { opacity: 0, y: 10 },
|
|
@@ -8132,7 +8370,7 @@ function GameEndDisplay({
|
|
|
8132
8370
|
gap: theme.space[2]
|
|
8133
8371
|
},
|
|
8134
8372
|
children: [
|
|
8135
|
-
/* @__PURE__ */
|
|
8373
|
+
/* @__PURE__ */ jsx36(Home, { size: 20, strokeWidth: 3, "aria-hidden": "true" }),
|
|
8136
8374
|
"Return to Lobby"
|
|
8137
8375
|
]
|
|
8138
8376
|
}
|
|
@@ -8146,7 +8384,7 @@ function GameEndDisplay({
|
|
|
8146
8384
|
|
|
8147
8385
|
// src/ui/components/board/NetworkGraph.tsx
|
|
8148
8386
|
import { useMemo as useMemo11 } from "react";
|
|
8149
|
-
import { clsx as
|
|
8387
|
+
import { clsx as clsx16 } from "clsx";
|
|
8150
8388
|
|
|
8151
8389
|
// src/ui/components/board/interaction-accessibility.ts
|
|
8152
8390
|
function handleKeyboardActivation(event, onActivate, options) {
|
|
@@ -8164,7 +8402,7 @@ function handleKeyboardActivation(event, onActivate, options) {
|
|
|
8164
8402
|
}
|
|
8165
8403
|
|
|
8166
8404
|
// src/ui/components/board/NetworkGraph.tsx
|
|
8167
|
-
import { Fragment as Fragment5, jsx as
|
|
8405
|
+
import { Fragment as Fragment5, jsx as jsx37, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
8168
8406
|
var EMPTY_NETWORK_EDGES = [];
|
|
8169
8407
|
var EMPTY_NETWORK_PIECES = [];
|
|
8170
8408
|
function DefaultNetworkNode({
|
|
@@ -8192,7 +8430,7 @@ function DefaultNetworkNode({
|
|
|
8192
8430
|
onPointerEnter,
|
|
8193
8431
|
onPointerLeave,
|
|
8194
8432
|
onKeyDown: (event) => handleKeyboardActivation(event, onClick),
|
|
8195
|
-
className:
|
|
8433
|
+
className: clsx16(
|
|
8196
8434
|
"transition-all duration-150",
|
|
8197
8435
|
onClick && "cursor-pointer",
|
|
8198
8436
|
className
|
|
@@ -8201,7 +8439,7 @@ function DefaultNetworkNode({
|
|
|
8201
8439
|
tabIndex: onClick ? 0 : void 0,
|
|
8202
8440
|
"aria-label": onClick ? label ?? "Network node" : void 0,
|
|
8203
8441
|
children: [
|
|
8204
|
-
/* @__PURE__ */
|
|
8442
|
+
/* @__PURE__ */ jsx37(
|
|
8205
8443
|
"circle",
|
|
8206
8444
|
{
|
|
8207
8445
|
r: radius,
|
|
@@ -8210,7 +8448,7 @@ function DefaultNetworkNode({
|
|
|
8210
8448
|
strokeWidth: effectiveStrokeWidth
|
|
8211
8449
|
}
|
|
8212
8450
|
),
|
|
8213
|
-
displayLabel && /* @__PURE__ */
|
|
8451
|
+
displayLabel && /* @__PURE__ */ jsx37(
|
|
8214
8452
|
"text",
|
|
8215
8453
|
{
|
|
8216
8454
|
textAnchor: "middle",
|
|
@@ -8249,7 +8487,7 @@ function DefaultNetworkEdge({
|
|
|
8249
8487
|
onPointerEnter,
|
|
8250
8488
|
onPointerLeave,
|
|
8251
8489
|
onKeyDown: (event) => handleKeyboardActivation(event, onClick),
|
|
8252
|
-
className:
|
|
8490
|
+
className: clsx16(
|
|
8253
8491
|
"transition-all duration-150",
|
|
8254
8492
|
onClick && "cursor-pointer",
|
|
8255
8493
|
className
|
|
@@ -8258,7 +8496,7 @@ function DefaultNetworkEdge({
|
|
|
8258
8496
|
tabIndex: onClick ? 0 : void 0,
|
|
8259
8497
|
"aria-label": onClick ? label !== void 0 ? `Network edge ${label}` : "Network edge" : void 0,
|
|
8260
8498
|
children: [
|
|
8261
|
-
/* @__PURE__ */
|
|
8499
|
+
/* @__PURE__ */ jsx37(
|
|
8262
8500
|
"line",
|
|
8263
8501
|
{
|
|
8264
8502
|
x1: from.x,
|
|
@@ -8271,7 +8509,7 @@ function DefaultNetworkEdge({
|
|
|
8271
8509
|
}
|
|
8272
8510
|
),
|
|
8273
8511
|
label !== void 0 && /* @__PURE__ */ jsxs20(Fragment5, { children: [
|
|
8274
|
-
/* @__PURE__ */
|
|
8512
|
+
/* @__PURE__ */ jsx37(
|
|
8275
8513
|
"circle",
|
|
8276
8514
|
{
|
|
8277
8515
|
cx: midX,
|
|
@@ -8282,7 +8520,7 @@ function DefaultNetworkEdge({
|
|
|
8282
8520
|
strokeWidth: 1
|
|
8283
8521
|
}
|
|
8284
8522
|
),
|
|
8285
|
-
/* @__PURE__ */
|
|
8523
|
+
/* @__PURE__ */ jsx37(
|
|
8286
8524
|
"text",
|
|
8287
8525
|
{
|
|
8288
8526
|
x: midX,
|
|
@@ -8307,16 +8545,16 @@ function DefaultNetworkPiece({
|
|
|
8307
8545
|
onClick,
|
|
8308
8546
|
className
|
|
8309
8547
|
}) {
|
|
8310
|
-
return /* @__PURE__ */
|
|
8548
|
+
return /* @__PURE__ */ jsx37(
|
|
8311
8549
|
"g",
|
|
8312
8550
|
{
|
|
8313
8551
|
onClick,
|
|
8314
8552
|
onKeyDown: (event) => handleKeyboardActivation(event, onClick),
|
|
8315
|
-
className:
|
|
8553
|
+
className: clsx16(onClick && "cursor-pointer", className),
|
|
8316
8554
|
role: onClick ? "button" : void 0,
|
|
8317
8555
|
tabIndex: onClick ? 0 : void 0,
|
|
8318
8556
|
"aria-label": onClick ? "Network piece" : void 0,
|
|
8319
|
-
children: shape === "square" ? /* @__PURE__ */
|
|
8557
|
+
children: shape === "square" ? /* @__PURE__ */ jsx37(
|
|
8320
8558
|
"rect",
|
|
8321
8559
|
{
|
|
8322
8560
|
x: -radius,
|
|
@@ -8327,7 +8565,7 @@ function DefaultNetworkPiece({
|
|
|
8327
8565
|
stroke: "white",
|
|
8328
8566
|
strokeWidth: 1.5
|
|
8329
8567
|
}
|
|
8330
|
-
) : /* @__PURE__ */
|
|
8568
|
+
) : /* @__PURE__ */ jsx37("circle", { r: radius, fill: color, stroke: "white", strokeWidth: 1.5 })
|
|
8331
8569
|
}
|
|
8332
8570
|
);
|
|
8333
8571
|
}
|
|
@@ -8400,7 +8638,7 @@ function NetworkGraph({
|
|
|
8400
8638
|
width,
|
|
8401
8639
|
height,
|
|
8402
8640
|
viewBox,
|
|
8403
|
-
className:
|
|
8641
|
+
className: clsx16(
|
|
8404
8642
|
"overflow-visible",
|
|
8405
8643
|
enablePanZoom && "touch-none",
|
|
8406
8644
|
isDragging && "cursor-grabbing",
|
|
@@ -8411,11 +8649,11 @@ function NetworkGraph({
|
|
|
8411
8649
|
role: "img",
|
|
8412
8650
|
"aria-label": "Network graph",
|
|
8413
8651
|
children: [
|
|
8414
|
-
/* @__PURE__ */
|
|
8652
|
+
/* @__PURE__ */ jsx37("g", { className: "network-edges", role: "list", "aria-label": "Network connections", children: edges.map((edge) => {
|
|
8415
8653
|
const fromNode = nodeMap[edge.from];
|
|
8416
8654
|
const toNode = nodeMap[edge.to];
|
|
8417
8655
|
if (!fromNode || !toNode) return null;
|
|
8418
|
-
return /* @__PURE__ */
|
|
8656
|
+
return /* @__PURE__ */ jsx37(
|
|
8419
8657
|
"g",
|
|
8420
8658
|
{
|
|
8421
8659
|
role: "listitem",
|
|
@@ -8425,7 +8663,7 @@ function NetworkGraph({
|
|
|
8425
8663
|
edge.id
|
|
8426
8664
|
);
|
|
8427
8665
|
}) }),
|
|
8428
|
-
/* @__PURE__ */
|
|
8666
|
+
/* @__PURE__ */ jsx37("g", { className: "network-nodes", role: "list", "aria-label": "Network nodes", children: nodes.map((node) => {
|
|
8429
8667
|
const nodePieces = piecesByNode[node.id] ?? [];
|
|
8430
8668
|
return /* @__PURE__ */ jsxs20(
|
|
8431
8669
|
"g",
|
|
@@ -8435,11 +8673,11 @@ function NetworkGraph({
|
|
|
8435
8673
|
"aria-label": node.label ?? node.id,
|
|
8436
8674
|
children: [
|
|
8437
8675
|
renderNode(node, nodePieces),
|
|
8438
|
-
nodePieces.length > 0 && /* @__PURE__ */
|
|
8676
|
+
nodePieces.length > 0 && /* @__PURE__ */ jsx37("g", { className: "node-pieces", children: nodePieces.map((piece, i) => {
|
|
8439
8677
|
const angle = i / nodePieces.length * 2 * Math.PI - Math.PI / 2;
|
|
8440
8678
|
const pieceX = Math.cos(angle) * (nodeRadius + 8);
|
|
8441
8679
|
const pieceY = Math.sin(angle) * (nodeRadius + 8);
|
|
8442
|
-
return /* @__PURE__ */
|
|
8680
|
+
return /* @__PURE__ */ jsx37(
|
|
8443
8681
|
"g",
|
|
8444
8682
|
{
|
|
8445
8683
|
transform: `translate(${pieceX}, ${pieceY})`,
|
|
@@ -8458,7 +8696,7 @@ function NetworkGraph({
|
|
|
8458
8696
|
{
|
|
8459
8697
|
transform: `translate(${viewBoxX + 10}, ${viewBoxY + viewBoxHeight - 30})`,
|
|
8460
8698
|
children: [
|
|
8461
|
-
/* @__PURE__ */
|
|
8699
|
+
/* @__PURE__ */ jsx37(
|
|
8462
8700
|
"rect",
|
|
8463
8701
|
{
|
|
8464
8702
|
x: 0,
|
|
@@ -8483,8 +8721,8 @@ function NetworkGraph({
|
|
|
8483
8721
|
|
|
8484
8722
|
// src/ui/components/board/ZoneMap.tsx
|
|
8485
8723
|
import { useMemo as useMemo12 } from "react";
|
|
8486
|
-
import { clsx as
|
|
8487
|
-
import { jsx as
|
|
8724
|
+
import { clsx as clsx17 } from "clsx";
|
|
8725
|
+
import { jsx as jsx38, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
8488
8726
|
var HIGHLIGHT_COLORS = {
|
|
8489
8727
|
valid: "rgba(34, 197, 94, 0.4)",
|
|
8490
8728
|
// Green
|
|
@@ -8537,7 +8775,7 @@ function DefaultZone({
|
|
|
8537
8775
|
switch (zone.shape.type) {
|
|
8538
8776
|
case "polygon":
|
|
8539
8777
|
if (!zone.shape.points) return null;
|
|
8540
|
-
return /* @__PURE__ */
|
|
8778
|
+
return /* @__PURE__ */ jsx38(
|
|
8541
8779
|
"polygon",
|
|
8542
8780
|
{
|
|
8543
8781
|
points: zone.shape.points.map((p) => `${p.x},${p.y}`).join(" "),
|
|
@@ -8548,7 +8786,7 @@ function DefaultZone({
|
|
|
8548
8786
|
);
|
|
8549
8787
|
case "path":
|
|
8550
8788
|
if (!zone.shape.path) return null;
|
|
8551
|
-
return /* @__PURE__ */
|
|
8789
|
+
return /* @__PURE__ */ jsx38(
|
|
8552
8790
|
"path",
|
|
8553
8791
|
{
|
|
8554
8792
|
d: zone.shape.path,
|
|
@@ -8559,7 +8797,7 @@ function DefaultZone({
|
|
|
8559
8797
|
);
|
|
8560
8798
|
case "circle":
|
|
8561
8799
|
if (!zone.shape.center) return null;
|
|
8562
|
-
return /* @__PURE__ */
|
|
8800
|
+
return /* @__PURE__ */ jsx38(
|
|
8563
8801
|
"circle",
|
|
8564
8802
|
{
|
|
8565
8803
|
cx: zone.shape.center.x,
|
|
@@ -8581,13 +8819,13 @@ function DefaultZone({
|
|
|
8581
8819
|
onMouseEnter: () => onHover?.(true),
|
|
8582
8820
|
onMouseLeave: () => onHover?.(false),
|
|
8583
8821
|
onKeyDown: (event) => handleKeyboardActivation(event, onClick),
|
|
8584
|
-
className:
|
|
8822
|
+
className: clsx17(onClick && "cursor-pointer", className),
|
|
8585
8823
|
role: onClick ? "button" : "listitem",
|
|
8586
8824
|
"aria-label": zone.name,
|
|
8587
8825
|
tabIndex: onClick ? 0 : void 0,
|
|
8588
8826
|
children: [
|
|
8589
8827
|
renderShape(),
|
|
8590
|
-
showLabel && zone.shape?.center && /* @__PURE__ */
|
|
8828
|
+
showLabel && zone.shape?.center && /* @__PURE__ */ jsx38(
|
|
8591
8829
|
"text",
|
|
8592
8830
|
{
|
|
8593
8831
|
x: zone.shape.center.x,
|
|
@@ -8647,7 +8885,7 @@ function DefaultZonePieces({
|
|
|
8647
8885
|
});
|
|
8648
8886
|
const owners = Object.keys(piecesByOwner);
|
|
8649
8887
|
const startOffset = -((owners.length - 1) * spacing) / 2;
|
|
8650
|
-
return /* @__PURE__ */
|
|
8888
|
+
return /* @__PURE__ */ jsx38("g", { className: clsx17("zone-pieces", className), children: owners.map((owner, i) => {
|
|
8651
8889
|
const ownerPieces = piecesByOwner[owner] || [];
|
|
8652
8890
|
const totalCount = ownerPieces.reduce(
|
|
8653
8891
|
(sum, p) => sum + (p.count || 1),
|
|
@@ -8659,7 +8897,7 @@ function DefaultZonePieces({
|
|
|
8659
8897
|
{
|
|
8660
8898
|
transform: `translate(${centerX + offsetX}, ${centerY + yOffset})`,
|
|
8661
8899
|
children: [
|
|
8662
|
-
/* @__PURE__ */
|
|
8900
|
+
/* @__PURE__ */ jsx38(
|
|
8663
8901
|
"circle",
|
|
8664
8902
|
{
|
|
8665
8903
|
r: radius,
|
|
@@ -8668,7 +8906,7 @@ function DefaultZonePieces({
|
|
|
8668
8906
|
strokeWidth: 2
|
|
8669
8907
|
}
|
|
8670
8908
|
),
|
|
8671
|
-
/* @__PURE__ */
|
|
8909
|
+
/* @__PURE__ */ jsx38(
|
|
8672
8910
|
"text",
|
|
8673
8911
|
{
|
|
8674
8912
|
textAnchor: "middle",
|
|
@@ -8704,13 +8942,13 @@ function DefaultZonePiece({
|
|
|
8704
8942
|
onClick?.();
|
|
8705
8943
|
},
|
|
8706
8944
|
onKeyDown: (event) => handleKeyboardActivation(event, onClick, { stopPropagation: true }),
|
|
8707
|
-
className:
|
|
8945
|
+
className: clsx17(onClick && "cursor-pointer", className),
|
|
8708
8946
|
role: onClick ? "button" : void 0,
|
|
8709
8947
|
tabIndex: onClick ? 0 : void 0,
|
|
8710
8948
|
"aria-label": `Piece ${piece.id}`,
|
|
8711
8949
|
children: [
|
|
8712
|
-
/* @__PURE__ */
|
|
8713
|
-
/* @__PURE__ */
|
|
8950
|
+
/* @__PURE__ */ jsx38("circle", { r: radius, fill: color, stroke: "white", strokeWidth: 2 }),
|
|
8951
|
+
/* @__PURE__ */ jsx38(
|
|
8714
8952
|
"text",
|
|
8715
8953
|
{
|
|
8716
8954
|
textAnchor: "middle",
|
|
@@ -8769,7 +9007,7 @@ function ZoneMap({
|
|
|
8769
9007
|
width,
|
|
8770
9008
|
height,
|
|
8771
9009
|
viewBox: `${viewBoxX} ${viewBoxY} ${viewBoxWidth} ${viewBoxHeight}`,
|
|
8772
|
-
className:
|
|
9010
|
+
className: clsx17(
|
|
8773
9011
|
"overflow-visible",
|
|
8774
9012
|
enablePanZoom && "touch-none",
|
|
8775
9013
|
isDragging && "cursor-grabbing",
|
|
@@ -8780,17 +9018,17 @@ function ZoneMap({
|
|
|
8780
9018
|
role: "img",
|
|
8781
9019
|
"aria-label": "Zone map",
|
|
8782
9020
|
children: [
|
|
8783
|
-
backgroundImage && /* @__PURE__ */
|
|
8784
|
-
/* @__PURE__ */
|
|
9021
|
+
backgroundImage && /* @__PURE__ */ jsx38("image", { href: backgroundImage, width, height }),
|
|
9022
|
+
/* @__PURE__ */ jsx38("g", { className: "zones", role: "list", "aria-label": "Map zones", children: zones.map((zone) => {
|
|
8785
9023
|
const zonePieces = piecesByZone[zone.id] || [];
|
|
8786
|
-
return /* @__PURE__ */
|
|
9024
|
+
return /* @__PURE__ */ jsx38("g", { children: renderZone(zone, zonePieces) }, zone.id);
|
|
8787
9025
|
}) }),
|
|
8788
9026
|
enablePanZoom && transform.zoom !== 1 && /* @__PURE__ */ jsxs21(
|
|
8789
9027
|
"g",
|
|
8790
9028
|
{
|
|
8791
9029
|
transform: `translate(${viewBoxX + 10}, ${viewBoxY + viewBoxHeight - 30})`,
|
|
8792
9030
|
children: [
|
|
8793
|
-
/* @__PURE__ */
|
|
9031
|
+
/* @__PURE__ */ jsx38(
|
|
8794
9032
|
"rect",
|
|
8795
9033
|
{
|
|
8796
9034
|
x: 0,
|
|
@@ -8815,8 +9053,8 @@ function ZoneMap({
|
|
|
8815
9053
|
|
|
8816
9054
|
// src/ui/components/board/TrackBoard.tsx
|
|
8817
9055
|
import { useMemo as useMemo13 } from "react";
|
|
8818
|
-
import { clsx as
|
|
8819
|
-
import { jsx as
|
|
9056
|
+
import { clsx as clsx18 } from "clsx";
|
|
9057
|
+
import { jsx as jsx39, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
8820
9058
|
function DefaultTrackSpace({
|
|
8821
9059
|
space,
|
|
8822
9060
|
size = 50,
|
|
@@ -8842,12 +9080,12 @@ function DefaultTrackSpace({
|
|
|
8842
9080
|
onMouseEnter: () => onHover?.(true),
|
|
8843
9081
|
onMouseLeave: () => onHover?.(false),
|
|
8844
9082
|
onKeyDown: (event) => handleKeyboardActivation(event, onClick),
|
|
8845
|
-
className:
|
|
9083
|
+
className: clsx18(onClick && "cursor-pointer", className),
|
|
8846
9084
|
role: onClick ? "button" : "listitem",
|
|
8847
9085
|
"aria-label": space.name || `Space ${space.index}`,
|
|
8848
9086
|
tabIndex: onClick ? 0 : void 0,
|
|
8849
9087
|
children: [
|
|
8850
|
-
/* @__PURE__ */
|
|
9088
|
+
/* @__PURE__ */ jsx39(
|
|
8851
9089
|
"rect",
|
|
8852
9090
|
{
|
|
8853
9091
|
x: -halfSize,
|
|
@@ -8860,7 +9098,7 @@ function DefaultTrackSpace({
|
|
|
8860
9098
|
strokeWidth: computedStrokeWidth
|
|
8861
9099
|
}
|
|
8862
9100
|
),
|
|
8863
|
-
space.name ? /* @__PURE__ */
|
|
9101
|
+
space.name ? /* @__PURE__ */ jsx39(
|
|
8864
9102
|
"text",
|
|
8865
9103
|
{
|
|
8866
9104
|
textAnchor: "middle",
|
|
@@ -8870,7 +9108,7 @@ function DefaultTrackSpace({
|
|
|
8870
9108
|
fontWeight: "bold",
|
|
8871
9109
|
children: space.name.length > 8 ? space.name.slice(0, 7) + "\u2026" : space.name
|
|
8872
9110
|
}
|
|
8873
|
-
) : /* @__PURE__ */
|
|
9111
|
+
) : /* @__PURE__ */ jsx39(
|
|
8874
9112
|
"text",
|
|
8875
9113
|
{
|
|
8876
9114
|
textAnchor: "middle",
|
|
@@ -8882,8 +9120,8 @@ function DefaultTrackSpace({
|
|
|
8882
9120
|
}
|
|
8883
9121
|
),
|
|
8884
9122
|
showJumpIndicator && space.jumpTo && /* @__PURE__ */ jsxs22("g", { transform: `translate(${halfSize - 6}, ${-halfSize + 6})`, children: [
|
|
8885
|
-
/* @__PURE__ */
|
|
8886
|
-
/* @__PURE__ */
|
|
9123
|
+
/* @__PURE__ */ jsx39("circle", { r: 6, fill: "#fbbf24" }),
|
|
9124
|
+
/* @__PURE__ */ jsx39(
|
|
8887
9125
|
"text",
|
|
8888
9126
|
{
|
|
8889
9127
|
textAnchor: "middle",
|
|
@@ -8914,7 +9152,7 @@ function DefaultTrackPiece({
|
|
|
8914
9152
|
const offset = total > 1 ? spacing : 0;
|
|
8915
9153
|
const px = Math.cos(angle) * offset;
|
|
8916
9154
|
const py = Math.sin(angle) * offset;
|
|
8917
|
-
return /* @__PURE__ */
|
|
9155
|
+
return /* @__PURE__ */ jsx39(
|
|
8918
9156
|
"circle",
|
|
8919
9157
|
{
|
|
8920
9158
|
cx: px,
|
|
@@ -8928,7 +9166,7 @@ function DefaultTrackPiece({
|
|
|
8928
9166
|
onClick?.();
|
|
8929
9167
|
},
|
|
8930
9168
|
onKeyDown: (event) => handleKeyboardActivation(event, onClick, { stopPropagation: true }),
|
|
8931
|
-
className:
|
|
9169
|
+
className: clsx18(onClick && "cursor-pointer", className),
|
|
8932
9170
|
role: onClick ? "button" : void 0,
|
|
8933
9171
|
tabIndex: onClick ? 0 : void 0,
|
|
8934
9172
|
"aria-label": `Piece ${piece.id} owned by ${piece.owner}`
|
|
@@ -8942,7 +9180,7 @@ function DefaultTrackConnection({
|
|
|
8942
9180
|
strokeWidth = 2,
|
|
8943
9181
|
className
|
|
8944
9182
|
}) {
|
|
8945
|
-
return /* @__PURE__ */
|
|
9183
|
+
return /* @__PURE__ */ jsx39(
|
|
8946
9184
|
"line",
|
|
8947
9185
|
{
|
|
8948
9186
|
x1: from.x,
|
|
@@ -8978,7 +9216,7 @@ function DefaultTrackJump({
|
|
|
8978
9216
|
const endY = to.y - unitY * (spaceSize / 2 + 5);
|
|
8979
9217
|
const markerId = `arrow-${isUp ? "up" : "down"}-${from.x}-${from.y}`;
|
|
8980
9218
|
return /* @__PURE__ */ jsxs22("g", { className, children: [
|
|
8981
|
-
/* @__PURE__ */
|
|
9219
|
+
/* @__PURE__ */ jsx39("defs", { children: /* @__PURE__ */ jsx39(
|
|
8982
9220
|
"marker",
|
|
8983
9221
|
{
|
|
8984
9222
|
id: markerId,
|
|
@@ -8987,10 +9225,10 @@ function DefaultTrackJump({
|
|
|
8987
9225
|
refX: "9",
|
|
8988
9226
|
refY: "3.5",
|
|
8989
9227
|
orient: "auto",
|
|
8990
|
-
children: /* @__PURE__ */
|
|
9228
|
+
children: /* @__PURE__ */ jsx39("polygon", { points: "0 0, 10 3.5, 0 7", fill: color })
|
|
8991
9229
|
}
|
|
8992
9230
|
) }),
|
|
8993
|
-
/* @__PURE__ */
|
|
9231
|
+
/* @__PURE__ */ jsx39(
|
|
8994
9232
|
"line",
|
|
8995
9233
|
{
|
|
8996
9234
|
x1: startX,
|
|
@@ -9054,7 +9292,7 @@ function TrackBoard({
|
|
|
9054
9292
|
return nextSpaceIds.map((nextId) => {
|
|
9055
9293
|
const targetSpace = spaceMap.get(nextId);
|
|
9056
9294
|
if (!targetSpace) return null;
|
|
9057
|
-
return /* @__PURE__ */
|
|
9295
|
+
return /* @__PURE__ */ jsx39("g", { children: renderConnection(
|
|
9058
9296
|
space.position,
|
|
9059
9297
|
targetSpace.position,
|
|
9060
9298
|
space,
|
|
@@ -9071,7 +9309,7 @@ function TrackBoard({
|
|
|
9071
9309
|
if (!targetSpace) return [];
|
|
9072
9310
|
const isUp = targetSpace.index > space.index;
|
|
9073
9311
|
return [
|
|
9074
|
-
/* @__PURE__ */
|
|
9312
|
+
/* @__PURE__ */ jsx39("g", { children: renderJump(
|
|
9075
9313
|
space.position,
|
|
9076
9314
|
targetSpace.position,
|
|
9077
9315
|
space,
|
|
@@ -9093,7 +9331,7 @@ function TrackBoard({
|
|
|
9093
9331
|
width,
|
|
9094
9332
|
height,
|
|
9095
9333
|
viewBox: `${viewBoxX} ${viewBoxY} ${viewBoxWidth} ${viewBoxHeight}`,
|
|
9096
|
-
className:
|
|
9334
|
+
className: clsx18(
|
|
9097
9335
|
"overflow-visible",
|
|
9098
9336
|
enablePanZoom && "touch-none",
|
|
9099
9337
|
isDragging && "cursor-grabbing",
|
|
@@ -9104,11 +9342,11 @@ function TrackBoard({
|
|
|
9104
9342
|
role: "img",
|
|
9105
9343
|
"aria-label": "Track board",
|
|
9106
9344
|
children: [
|
|
9107
|
-
/* @__PURE__ */
|
|
9108
|
-
/* @__PURE__ */
|
|
9109
|
-
/* @__PURE__ */
|
|
9345
|
+
/* @__PURE__ */ jsx39("g", { className: "track-connections", children: renderConnections() }),
|
|
9346
|
+
/* @__PURE__ */ jsx39("g", { className: "track-jumps", children: renderJumps() }),
|
|
9347
|
+
/* @__PURE__ */ jsx39("g", { className: "track-spaces", role: "list", "aria-label": "Track spaces", children: spaces.map((space) => {
|
|
9110
9348
|
const spacePieces = piecesBySpace[space.id] || [];
|
|
9111
|
-
return /* @__PURE__ */
|
|
9349
|
+
return /* @__PURE__ */ jsx39(
|
|
9112
9350
|
"g",
|
|
9113
9351
|
{
|
|
9114
9352
|
transform: `translate(${space.position.x}, ${space.position.y})`,
|
|
@@ -9122,7 +9360,7 @@ function TrackBoard({
|
|
|
9122
9360
|
{
|
|
9123
9361
|
transform: `translate(${viewBoxX + 10}, ${viewBoxY + viewBoxHeight - 30})`,
|
|
9124
9362
|
children: [
|
|
9125
|
-
/* @__PURE__ */
|
|
9363
|
+
/* @__PURE__ */ jsx39(
|
|
9126
9364
|
"rect",
|
|
9127
9365
|
{
|
|
9128
9366
|
x: 0,
|
|
@@ -9147,9 +9385,9 @@ function TrackBoard({
|
|
|
9147
9385
|
|
|
9148
9386
|
// src/ui/components/board/SlotSystem.tsx
|
|
9149
9387
|
import { useMemo as useMemo14 } from "react";
|
|
9150
|
-
import { clsx as
|
|
9388
|
+
import { clsx as clsx19 } from "clsx";
|
|
9151
9389
|
import { Users, Lock, Gift, Coins } from "lucide-react";
|
|
9152
|
-
import { jsx as
|
|
9390
|
+
import { jsx as jsx40, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
9153
9391
|
var EMPTY_SLOT_OCCUPANTS = [];
|
|
9154
9392
|
function DefaultSlotItem({
|
|
9155
9393
|
name,
|
|
@@ -9180,7 +9418,7 @@ function DefaultSlotItem({
|
|
|
9180
9418
|
onPointerEnter,
|
|
9181
9419
|
onPointerLeave,
|
|
9182
9420
|
onKeyDown: (event) => handleKeyboardActivation(event, isAvailable ? onClick : void 0),
|
|
9183
|
-
className:
|
|
9421
|
+
className: clsx19(
|
|
9184
9422
|
"p-4 rounded-lg border-2 transition-all",
|
|
9185
9423
|
isAvailable && onClick && "cursor-pointer hover:opacity-90",
|
|
9186
9424
|
className
|
|
@@ -9197,7 +9435,7 @@ function DefaultSlotItem({
|
|
|
9197
9435
|
children: [
|
|
9198
9436
|
/* @__PURE__ */ jsxs23("div", { className: "flex items-start justify-between gap-2", children: [
|
|
9199
9437
|
/* @__PURE__ */ jsxs23("div", { children: [
|
|
9200
|
-
/* @__PURE__ */
|
|
9438
|
+
/* @__PURE__ */ jsx40(
|
|
9201
9439
|
"h3",
|
|
9202
9440
|
{
|
|
9203
9441
|
className: "font-bold",
|
|
@@ -9205,7 +9443,7 @@ function DefaultSlotItem({
|
|
|
9205
9443
|
children: name
|
|
9206
9444
|
}
|
|
9207
9445
|
),
|
|
9208
|
-
description && /* @__PURE__ */
|
|
9446
|
+
description && /* @__PURE__ */ jsx40(
|
|
9209
9447
|
"p",
|
|
9210
9448
|
{
|
|
9211
9449
|
className: "text-xs mt-0.5",
|
|
@@ -9215,7 +9453,7 @@ function DefaultSlotItem({
|
|
|
9215
9453
|
)
|
|
9216
9454
|
] }),
|
|
9217
9455
|
/* @__PURE__ */ jsxs23("div", { className: "flex items-center gap-1", children: [
|
|
9218
|
-
isExclusive && /* @__PURE__ */
|
|
9456
|
+
isExclusive && /* @__PURE__ */ jsx40(
|
|
9219
9457
|
Lock,
|
|
9220
9458
|
{
|
|
9221
9459
|
className: "w-4 h-4",
|
|
@@ -9230,8 +9468,8 @@ function DefaultSlotItem({
|
|
|
9230
9468
|
style: { color: theme.semantic.text.muted },
|
|
9231
9469
|
title: `Capacity: ${capacity}`,
|
|
9232
9470
|
children: [
|
|
9233
|
-
/* @__PURE__ */
|
|
9234
|
-
/* @__PURE__ */
|
|
9471
|
+
/* @__PURE__ */ jsx40(Users, { className: "w-3 h-3" }),
|
|
9472
|
+
/* @__PURE__ */ jsx40("span", { children: capacity })
|
|
9235
9473
|
]
|
|
9236
9474
|
}
|
|
9237
9475
|
)
|
|
@@ -9244,8 +9482,8 @@ function DefaultSlotItem({
|
|
|
9244
9482
|
className: "flex items-center gap-1",
|
|
9245
9483
|
style: { color: theme.semantic.intent.danger.solid },
|
|
9246
9484
|
children: [
|
|
9247
|
-
/* @__PURE__ */
|
|
9248
|
-
/* @__PURE__ */
|
|
9485
|
+
/* @__PURE__ */ jsx40(Coins, { className: "w-3 h-3", "aria-hidden": "true" }),
|
|
9486
|
+
/* @__PURE__ */ jsx40("span", { children: costLabel })
|
|
9249
9487
|
]
|
|
9250
9488
|
}
|
|
9251
9489
|
),
|
|
@@ -9255,14 +9493,14 @@ function DefaultSlotItem({
|
|
|
9255
9493
|
className: "flex items-center gap-1",
|
|
9256
9494
|
style: { color: theme.semantic.intent.success.solid },
|
|
9257
9495
|
children: [
|
|
9258
|
-
/* @__PURE__ */
|
|
9259
|
-
/* @__PURE__ */
|
|
9496
|
+
/* @__PURE__ */ jsx40(Gift, { className: "w-3 h-3", "aria-hidden": "true" }),
|
|
9497
|
+
/* @__PURE__ */ jsx40("span", { children: rewardLabel })
|
|
9260
9498
|
]
|
|
9261
9499
|
}
|
|
9262
9500
|
)
|
|
9263
9501
|
] }),
|
|
9264
|
-
renderOccupants && /* @__PURE__ */
|
|
9265
|
-
!isAvailable && !isFull && /* @__PURE__ */
|
|
9502
|
+
renderOccupants && /* @__PURE__ */ jsx40("div", { className: "mt-2", children: renderOccupants() }),
|
|
9503
|
+
!isAvailable && !isFull && /* @__PURE__ */ jsx40(
|
|
9266
9504
|
"div",
|
|
9267
9505
|
{
|
|
9268
9506
|
className: "mt-2 text-xs",
|
|
@@ -9282,12 +9520,12 @@ function DefaultSlotOccupant({
|
|
|
9282
9520
|
onClick,
|
|
9283
9521
|
className
|
|
9284
9522
|
}) {
|
|
9285
|
-
return /* @__PURE__ */
|
|
9523
|
+
return /* @__PURE__ */ jsx40(
|
|
9286
9524
|
"div",
|
|
9287
9525
|
{
|
|
9288
9526
|
onClick,
|
|
9289
9527
|
onKeyDown: (event) => handleKeyboardActivation(event, onClick),
|
|
9290
|
-
className:
|
|
9528
|
+
className: clsx19(
|
|
9291
9529
|
"transition-all",
|
|
9292
9530
|
shape === "circle" ? "rounded-full" : "rounded",
|
|
9293
9531
|
onClick && "cursor-pointer hover:scale-110",
|
|
@@ -9310,10 +9548,10 @@ function DefaultEmptySlot({
|
|
|
9310
9548
|
className
|
|
9311
9549
|
}) {
|
|
9312
9550
|
const theme = useTheme();
|
|
9313
|
-
return /* @__PURE__ */
|
|
9551
|
+
return /* @__PURE__ */ jsx40(
|
|
9314
9552
|
"div",
|
|
9315
9553
|
{
|
|
9316
|
-
className:
|
|
9554
|
+
className: clsx19("rounded-full border-2 border-dashed", className),
|
|
9317
9555
|
style: {
|
|
9318
9556
|
width: size,
|
|
9319
9557
|
height: size,
|
|
@@ -9365,18 +9603,18 @@ function SlotSystem({
|
|
|
9365
9603
|
}, [slots, layout]);
|
|
9366
9604
|
const renderSlotItem = (slot) => {
|
|
9367
9605
|
const slotOccupants = occupantsBySlot[slot.id] ?? [];
|
|
9368
|
-
return /* @__PURE__ */
|
|
9606
|
+
return /* @__PURE__ */ jsx40("div", { role: "listitem", "aria-label": slot.name, children: renderSlot(slot, slotOccupants) }, slot.id);
|
|
9369
9607
|
};
|
|
9370
9608
|
const responsiveGridStyle = {
|
|
9371
9609
|
display: "grid",
|
|
9372
9610
|
gridTemplateColumns: `repeat(auto-fit, minmax(${minSlotWidth}px, 1fr))`,
|
|
9373
9611
|
gap: "1rem"
|
|
9374
9612
|
};
|
|
9375
|
-
const wrapContent = (content) => /* @__PURE__ */
|
|
9613
|
+
const wrapContent = (content) => /* @__PURE__ */ jsx40("div", { style: { width, height }, className: clsx19("slot-system", className), children: content });
|
|
9376
9614
|
if (layout === "grouped" && slotGroups) {
|
|
9377
9615
|
return wrapContent(
|
|
9378
|
-
/* @__PURE__ */
|
|
9379
|
-
/* @__PURE__ */
|
|
9616
|
+
/* @__PURE__ */ jsx40("div", { className: "space-y-6", role: "list", children: Object.entries(slotGroups).map(([groupName, groupSlots]) => /* @__PURE__ */ jsxs23("div", { children: [
|
|
9617
|
+
/* @__PURE__ */ jsx40(
|
|
9380
9618
|
"h3",
|
|
9381
9619
|
{
|
|
9382
9620
|
className: "text-lg font-semibold mb-3",
|
|
@@ -9384,23 +9622,23 @@ function SlotSystem({
|
|
|
9384
9622
|
children: groupName
|
|
9385
9623
|
}
|
|
9386
9624
|
),
|
|
9387
|
-
/* @__PURE__ */
|
|
9625
|
+
/* @__PURE__ */ jsx40("div", { style: responsiveGridStyle, children: groupSlots.map(renderSlotItem) })
|
|
9388
9626
|
] }, groupName)) })
|
|
9389
9627
|
);
|
|
9390
9628
|
}
|
|
9391
9629
|
if (layout === "list") {
|
|
9392
9630
|
return wrapContent(
|
|
9393
|
-
/* @__PURE__ */
|
|
9631
|
+
/* @__PURE__ */ jsx40("div", { className: "flex flex-col gap-2", role: "list", children: slots.map(renderSlotItem) })
|
|
9394
9632
|
);
|
|
9395
9633
|
}
|
|
9396
9634
|
return wrapContent(
|
|
9397
|
-
/* @__PURE__ */
|
|
9635
|
+
/* @__PURE__ */ jsx40("div", { style: responsiveGridStyle, role: "list", children: slots.map(renderSlotItem) })
|
|
9398
9636
|
);
|
|
9399
9637
|
}
|
|
9400
9638
|
|
|
9401
9639
|
// src/ui/components/board/SquareGrid.tsx
|
|
9402
9640
|
import { useMemo as useMemo15 } from "react";
|
|
9403
|
-
import { clsx as
|
|
9641
|
+
import { clsx as clsx21 } from "clsx";
|
|
9404
9642
|
|
|
9405
9643
|
// src/ui/components/board/tiled-grid/use-grid-svg-frame.ts
|
|
9406
9644
|
import {
|
|
@@ -9489,7 +9727,7 @@ function GridZoomIndicator({
|
|
|
9489
9727
|
}
|
|
9490
9728
|
|
|
9491
9729
|
// src/ui/components/board/tiled-grid/interactive-layer.tsx
|
|
9492
|
-
import { clsx as
|
|
9730
|
+
import { clsx as clsx20 } from "clsx";
|
|
9493
9731
|
|
|
9494
9732
|
// src/ui/components/board/target-layer.ts
|
|
9495
9733
|
function interactiveTargetRenderState(layer, targetId, isHovered) {
|
|
@@ -9516,7 +9754,7 @@ function isInteractiveTargetSelectable(layer, state) {
|
|
|
9516
9754
|
}
|
|
9517
9755
|
|
|
9518
9756
|
// src/ui/components/board/tiled-grid/interactive-layer.tsx
|
|
9519
|
-
import { jsx as
|
|
9757
|
+
import { jsx as jsx41 } from "react/jsx-runtime";
|
|
9520
9758
|
function InteractiveTargetLayerGroup({
|
|
9521
9759
|
layer,
|
|
9522
9760
|
targets,
|
|
@@ -9532,7 +9770,7 @@ function InteractiveTargetLayerGroup({
|
|
|
9532
9770
|
renderTargetContent
|
|
9533
9771
|
}) {
|
|
9534
9772
|
const { hoveredTargetId, setHoveredTargetId } = hover;
|
|
9535
|
-
return /* @__PURE__ */
|
|
9773
|
+
return /* @__PURE__ */ jsx41("g", { className: groupClassName, role: groupRole, "aria-label": groupAriaLabel, children: targets.map((target) => {
|
|
9536
9774
|
const targetId = getTargetId(target);
|
|
9537
9775
|
const state = interactiveTargetRenderState(
|
|
9538
9776
|
layer,
|
|
@@ -9549,13 +9787,13 @@ function InteractiveTargetLayerGroup({
|
|
|
9549
9787
|
// HexGrid markup variant: browserAttributes spread first, then
|
|
9550
9788
|
// transform, role, className (preserves HexGrid's rendered
|
|
9551
9789
|
// attribute order).
|
|
9552
|
-
/* @__PURE__ */
|
|
9790
|
+
/* @__PURE__ */ jsx41(
|
|
9553
9791
|
"g",
|
|
9554
9792
|
{
|
|
9555
9793
|
...state.browserAttributes,
|
|
9556
9794
|
...getTargetTransform ? { transform: getTargetTransform(target) } : {},
|
|
9557
9795
|
role: isSelectable ? "button" : void 0,
|
|
9558
|
-
className:
|
|
9796
|
+
className: clsx20(isSelectable && "cursor-pointer"),
|
|
9559
9797
|
onPointerEnter: () => setHoveredTargetId(targetId),
|
|
9560
9798
|
onPointerLeave: () => setHoveredTargetId(
|
|
9561
9799
|
(currentId) => currentId === targetId ? null : currentId
|
|
@@ -9575,7 +9813,7 @@ function InteractiveTargetLayerGroup({
|
|
|
9575
9813
|
// SquareGrid markup variant: no browserAttributes spread;
|
|
9576
9814
|
// transform, className, role (preserves SquareGrid's rendered
|
|
9577
9815
|
// attribute order).
|
|
9578
|
-
/* @__PURE__ */
|
|
9816
|
+
/* @__PURE__ */ jsx41(
|
|
9579
9817
|
"g",
|
|
9580
9818
|
{
|
|
9581
9819
|
...getTargetTransform ? { transform: getTargetTransform(target) } : {},
|
|
@@ -9588,7 +9826,7 @@ function InteractiveTargetLayerGroup({
|
|
|
9588
9826
|
onPointerLeave: () => setHoveredTargetId(
|
|
9589
9827
|
(currentId) => currentId === targetId ? null : currentId
|
|
9590
9828
|
),
|
|
9591
|
-
className:
|
|
9829
|
+
className: clsx20(isSelectable && "cursor-pointer"),
|
|
9592
9830
|
role: isSelectable ? "button" : void 0,
|
|
9593
9831
|
tabIndex: isSelectable ? 0 : void 0,
|
|
9594
9832
|
"aria-label": isSelectable ? `Select ${targetKind} ${targetId}` : void 0,
|
|
@@ -9606,7 +9844,7 @@ function resolveBoardProp(props, buildInlineBoard) {
|
|
|
9606
9844
|
}
|
|
9607
9845
|
|
|
9608
9846
|
// src/ui/components/board/SquareGrid.tsx
|
|
9609
|
-
import { Fragment as Fragment6, jsx as
|
|
9847
|
+
import { Fragment as Fragment6, jsx as jsx42, jsxs as jsxs24 } from "react/jsx-runtime";
|
|
9610
9848
|
function DefaultGridCell({
|
|
9611
9849
|
size,
|
|
9612
9850
|
isLight = true,
|
|
@@ -9631,7 +9869,7 @@ function DefaultGridCell({
|
|
|
9631
9869
|
onPointerEnter,
|
|
9632
9870
|
onPointerLeave,
|
|
9633
9871
|
onKeyDown: (event) => handleKeyboardActivation(event, onClick),
|
|
9634
|
-
className:
|
|
9872
|
+
className: clsx21(
|
|
9635
9873
|
"transition-colors duration-100",
|
|
9636
9874
|
onClick && "cursor-pointer",
|
|
9637
9875
|
className
|
|
@@ -9640,8 +9878,8 @@ function DefaultGridCell({
|
|
|
9640
9878
|
tabIndex: onClick ? 0 : void 0,
|
|
9641
9879
|
"aria-label": onClick ? "Grid cell" : void 0,
|
|
9642
9880
|
children: [
|
|
9643
|
-
/* @__PURE__ */
|
|
9644
|
-
isSelected && /* @__PURE__ */
|
|
9881
|
+
/* @__PURE__ */ jsx42("rect", { width: size, height: size, fill: baseColor }),
|
|
9882
|
+
isSelected && /* @__PURE__ */ jsx42(
|
|
9645
9883
|
"rect",
|
|
9646
9884
|
{
|
|
9647
9885
|
width: size,
|
|
@@ -9650,7 +9888,7 @@ function DefaultGridCell({
|
|
|
9650
9888
|
pointerEvents: "none"
|
|
9651
9889
|
}
|
|
9652
9890
|
),
|
|
9653
|
-
isHighlighted && !isSelected && /* @__PURE__ */
|
|
9891
|
+
isHighlighted && !isSelected && /* @__PURE__ */ jsx42(
|
|
9654
9892
|
"rect",
|
|
9655
9893
|
{
|
|
9656
9894
|
width: size,
|
|
@@ -9659,7 +9897,7 @@ function DefaultGridCell({
|
|
|
9659
9897
|
pointerEvents: "none"
|
|
9660
9898
|
}
|
|
9661
9899
|
),
|
|
9662
|
-
isValidMove && !isCapture && /* @__PURE__ */
|
|
9900
|
+
isValidMove && !isCapture && /* @__PURE__ */ jsx42(
|
|
9663
9901
|
"circle",
|
|
9664
9902
|
{
|
|
9665
9903
|
cx: size / 2,
|
|
@@ -9669,7 +9907,7 @@ function DefaultGridCell({
|
|
|
9669
9907
|
pointerEvents: "none"
|
|
9670
9908
|
}
|
|
9671
9909
|
),
|
|
9672
|
-
isCapture && /* @__PURE__ */
|
|
9910
|
+
isCapture && /* @__PURE__ */ jsx42(
|
|
9673
9911
|
"circle",
|
|
9674
9912
|
{
|
|
9675
9913
|
cx: size / 2,
|
|
@@ -9703,7 +9941,7 @@ function DefaultGridPiece({
|
|
|
9703
9941
|
onClick,
|
|
9704
9942
|
onPointerDown,
|
|
9705
9943
|
onKeyDown: (event) => handleKeyboardActivation(event, onClick),
|
|
9706
|
-
className:
|
|
9944
|
+
className: clsx21(
|
|
9707
9945
|
"transition-transform duration-150",
|
|
9708
9946
|
(onClick || onPointerDown) && "cursor-pointer hover:scale-105",
|
|
9709
9947
|
className
|
|
@@ -9713,7 +9951,7 @@ function DefaultGridPiece({
|
|
|
9713
9951
|
tabIndex: onClick ? 0 : void 0,
|
|
9714
9952
|
"aria-label": onClick ? label ?? "Grid piece" : void 0,
|
|
9715
9953
|
children: [
|
|
9716
|
-
/* @__PURE__ */
|
|
9954
|
+
/* @__PURE__ */ jsx42(
|
|
9717
9955
|
"circle",
|
|
9718
9956
|
{
|
|
9719
9957
|
r: isDragging ? radius * 1.1 : radius,
|
|
@@ -9723,7 +9961,7 @@ function DefaultGridPiece({
|
|
|
9723
9961
|
style: { filter: "drop-shadow(1px 2px 2px rgba(0,0,0,0.4))" }
|
|
9724
9962
|
}
|
|
9725
9963
|
),
|
|
9726
|
-
label && /* @__PURE__ */
|
|
9964
|
+
label && /* @__PURE__ */ jsx42(
|
|
9727
9965
|
"text",
|
|
9728
9966
|
{
|
|
9729
9967
|
y: 4,
|
|
@@ -9768,20 +10006,20 @@ function DefaultChessPiece({
|
|
|
9768
10006
|
const symbol = CHESS_SYMBOLS[owner]?.[type] ?? "?";
|
|
9769
10007
|
const textColor = owner === "white" ? "#f8fafc" : "#1e293b";
|
|
9770
10008
|
const shadowFilter = owner === "white" ? "drop-shadow(1px 1px 1px rgba(0,0,0,0.5))" : "drop-shadow(1px 1px 1px rgba(255,255,255,0.3))";
|
|
9771
|
-
return /* @__PURE__ */
|
|
10009
|
+
return /* @__PURE__ */ jsx42(
|
|
9772
10010
|
"g",
|
|
9773
10011
|
{
|
|
9774
10012
|
onClick,
|
|
9775
10013
|
onPointerDown,
|
|
9776
10014
|
onKeyDown: (event) => handleKeyboardActivation(event, onClick),
|
|
9777
|
-
className:
|
|
10015
|
+
className: clsx21(
|
|
9778
10016
|
(onClick || onPointerDown) && "cursor-pointer",
|
|
9779
10017
|
className
|
|
9780
10018
|
),
|
|
9781
10019
|
role: onClick ? "button" : void 0,
|
|
9782
10020
|
tabIndex: onClick ? 0 : void 0,
|
|
9783
10021
|
"aria-label": onClick ? `${owner} ${type}` : void 0,
|
|
9784
|
-
children: /* @__PURE__ */
|
|
10022
|
+
children: /* @__PURE__ */ jsx42(
|
|
9785
10023
|
"text",
|
|
9786
10024
|
{
|
|
9787
10025
|
textAnchor: "middle",
|
|
@@ -10044,7 +10282,7 @@ function SquareGridImpl(props) {
|
|
|
10044
10282
|
width: svgWidth,
|
|
10045
10283
|
height: svgHeight,
|
|
10046
10284
|
viewBox,
|
|
10047
|
-
className:
|
|
10285
|
+
className: clsx21(
|
|
10048
10286
|
"square-grid",
|
|
10049
10287
|
enablePanZoom && "touch-none",
|
|
10050
10288
|
isPanning && "cursor-grabbing",
|
|
@@ -10055,11 +10293,11 @@ function SquareGridImpl(props) {
|
|
|
10055
10293
|
role: "img",
|
|
10056
10294
|
"aria-label": `${rows}x${cols} game grid`,
|
|
10057
10295
|
children: [
|
|
10058
|
-
/* @__PURE__ */
|
|
10059
|
-
/* @__PURE__ */
|
|
10296
|
+
/* @__PURE__ */ jsx42("defs", { children: /* @__PURE__ */ jsx42("filter", { id: "pieceShadow", x: "-20%", y: "-20%", width: "140%", height: "140%", children: /* @__PURE__ */ jsx42("feDropShadow", { dx: "1", dy: "2", stdDeviation: "2", floodOpacity: "0.4" }) }) }),
|
|
10297
|
+
/* @__PURE__ */ jsx42("g", { className: "cells", role: "list", "aria-label": "Grid cells", children: renderableCells.map(({ row, col }) => {
|
|
10060
10298
|
const x = labelMargin + col * cellSize;
|
|
10061
10299
|
const y = row * cellSize;
|
|
10062
|
-
return /* @__PURE__ */
|
|
10300
|
+
return /* @__PURE__ */ jsx42(
|
|
10063
10301
|
"g",
|
|
10064
10302
|
{
|
|
10065
10303
|
transform: `translate(${x}, ${y})`,
|
|
@@ -10070,7 +10308,7 @@ function SquareGridImpl(props) {
|
|
|
10070
10308
|
`${row}-${col}`
|
|
10071
10309
|
);
|
|
10072
10310
|
}) }),
|
|
10073
|
-
interactiveSpaces && /* @__PURE__ */
|
|
10311
|
+
interactiveSpaces && /* @__PURE__ */ jsx42(
|
|
10074
10312
|
InteractiveTargetLayerGroup,
|
|
10075
10313
|
{
|
|
10076
10314
|
layer: interactiveSpaces,
|
|
@@ -10084,7 +10322,7 @@ function SquareGridImpl(props) {
|
|
|
10084
10322
|
hover: spaceHover,
|
|
10085
10323
|
getTargetTransform: (space) => `translate(${labelMargin + space.col * cellSize}, ${space.row * cellSize})`,
|
|
10086
10324
|
renderTargetContent: (space, state, isSelectable) => /* @__PURE__ */ jsxs24(Fragment6, { children: [
|
|
10087
|
-
isSelectable && /* @__PURE__ */
|
|
10325
|
+
isSelectable && /* @__PURE__ */ jsx42(
|
|
10088
10326
|
"rect",
|
|
10089
10327
|
{
|
|
10090
10328
|
x: 0,
|
|
@@ -10099,8 +10337,8 @@ function SquareGridImpl(props) {
|
|
|
10099
10337
|
] })
|
|
10100
10338
|
}
|
|
10101
10339
|
),
|
|
10102
|
-
renderEdge && resolvedEdgePositions.length > 0 && /* @__PURE__ */
|
|
10103
|
-
interactiveEdges && /* @__PURE__ */
|
|
10340
|
+
renderEdge && resolvedEdgePositions.length > 0 && /* @__PURE__ */ jsx42("g", { className: "edges", "aria-label": "Board edges", children: resolvedEdgePositions.map(({ edge, interactiveEdge }) => /* @__PURE__ */ jsx42("g", { children: renderEdge(edge, interactiveEdge.position) }, edge.id)) }),
|
|
10341
|
+
interactiveEdges && /* @__PURE__ */ jsx42(
|
|
10104
10342
|
InteractiveTargetLayerGroup,
|
|
10105
10343
|
{
|
|
10106
10344
|
layer: interactiveEdges,
|
|
@@ -10112,7 +10350,7 @@ function SquareGridImpl(props) {
|
|
|
10112
10350
|
spreadBrowserAttributes: false,
|
|
10113
10351
|
selectMode: "layer-direct",
|
|
10114
10352
|
hover: edgeHover,
|
|
10115
|
-
renderTargetContent: ({ interactiveEdge: edge }, state) => renderInteractiveEdge ? renderInteractiveEdge(edge, edge.position, state) : state.isEnabled && state.isEligible ? /* @__PURE__ */
|
|
10353
|
+
renderTargetContent: ({ interactiveEdge: edge }, state) => renderInteractiveEdge ? renderInteractiveEdge(edge, edge.position, state) : state.isEnabled && state.isEligible ? /* @__PURE__ */ jsx42(
|
|
10116
10354
|
"line",
|
|
10117
10355
|
{
|
|
10118
10356
|
x1: edge.position.x1,
|
|
@@ -10126,8 +10364,8 @@ function SquareGridImpl(props) {
|
|
|
10126
10364
|
) : null
|
|
10127
10365
|
}
|
|
10128
10366
|
),
|
|
10129
|
-
renderVertex && resolvedVertexPositions.length > 0 && /* @__PURE__ */
|
|
10130
|
-
interactiveVertices && /* @__PURE__ */
|
|
10367
|
+
renderVertex && resolvedVertexPositions.length > 0 && /* @__PURE__ */ jsx42("g", { className: "vertices", "aria-label": "Board vertices", children: resolvedVertexPositions.map(({ vertex, interactiveVertex }) => /* @__PURE__ */ jsx42("g", { children: renderVertex(vertex, interactiveVertex.position) }, vertex.id)) }),
|
|
10368
|
+
interactiveVertices && /* @__PURE__ */ jsx42(
|
|
10131
10369
|
InteractiveTargetLayerGroup,
|
|
10132
10370
|
{
|
|
10133
10371
|
layer: interactiveVertices,
|
|
@@ -10139,7 +10377,7 @@ function SquareGridImpl(props) {
|
|
|
10139
10377
|
spreadBrowserAttributes: false,
|
|
10140
10378
|
selectMode: "layer-direct",
|
|
10141
10379
|
hover: vertexHover,
|
|
10142
|
-
renderTargetContent: ({ interactiveVertex: vertex }, state) => renderInteractiveVertex ? renderInteractiveVertex(vertex, vertex.position, state) : state.isEnabled && state.isEligible ? /* @__PURE__ */
|
|
10380
|
+
renderTargetContent: ({ interactiveVertex: vertex }, state) => renderInteractiveVertex ? renderInteractiveVertex(vertex, vertex.position, state) : state.isEnabled && state.isEligible ? /* @__PURE__ */ jsx42(
|
|
10143
10381
|
"circle",
|
|
10144
10382
|
{
|
|
10145
10383
|
cx: vertex.position.x,
|
|
@@ -10154,7 +10392,7 @@ function SquareGridImpl(props) {
|
|
|
10154
10392
|
showCoordinates && coordinateStyle !== "none" && /* @__PURE__ */ jsxs24("g", { className: "coordinates", "aria-hidden": "true", children: [
|
|
10155
10393
|
Array.from({ length: cols }).map((_, col) => {
|
|
10156
10394
|
const label = coordinateStyle === "algebraic" ? String.fromCharCode(97 + col) : String(col + 1);
|
|
10157
|
-
return /* @__PURE__ */
|
|
10395
|
+
return /* @__PURE__ */ jsx42(
|
|
10158
10396
|
"text",
|
|
10159
10397
|
{
|
|
10160
10398
|
x: labelMargin + col * cellSize + cellSize / 2,
|
|
@@ -10170,7 +10408,7 @@ function SquareGridImpl(props) {
|
|
|
10170
10408
|
}),
|
|
10171
10409
|
Array.from({ length: rows }).map((_, row) => {
|
|
10172
10410
|
const label = coordinateStyle === "algebraic" ? String(rows - row) : String(row + 1);
|
|
10173
|
-
return /* @__PURE__ */
|
|
10411
|
+
return /* @__PURE__ */ jsx42(
|
|
10174
10412
|
"text",
|
|
10175
10413
|
{
|
|
10176
10414
|
x: 10,
|
|
@@ -10185,10 +10423,10 @@ function SquareGridImpl(props) {
|
|
|
10185
10423
|
);
|
|
10186
10424
|
})
|
|
10187
10425
|
] }),
|
|
10188
|
-
/* @__PURE__ */
|
|
10426
|
+
/* @__PURE__ */ jsx42("g", { className: "pieces", role: "list", "aria-label": "Game pieces", children: resolvedPieces.map((piece) => {
|
|
10189
10427
|
const x = labelMargin + piece.col * cellSize + cellSize / 2;
|
|
10190
10428
|
const y = piece.row * cellSize + cellSize / 2;
|
|
10191
|
-
return /* @__PURE__ */
|
|
10429
|
+
return /* @__PURE__ */ jsx42(
|
|
10192
10430
|
"g",
|
|
10193
10431
|
{
|
|
10194
10432
|
transform: `translate(${x}, ${y})`,
|
|
@@ -10199,7 +10437,7 @@ function SquareGridImpl(props) {
|
|
|
10199
10437
|
piece.id
|
|
10200
10438
|
);
|
|
10201
10439
|
}) }),
|
|
10202
|
-
enablePanZoom && transform.zoom !== 1 && /* @__PURE__ */
|
|
10440
|
+
enablePanZoom && transform.zoom !== 1 && /* @__PURE__ */ jsx42(
|
|
10203
10441
|
GridZoomIndicator,
|
|
10204
10442
|
{
|
|
10205
10443
|
viewBoxX,
|
|
@@ -10216,8 +10454,8 @@ var SquareGrid = SquareGridImpl;
|
|
|
10216
10454
|
|
|
10217
10455
|
// src/ui/components/board/HexGrid.tsx
|
|
10218
10456
|
import { useMemo as useMemo16 } from "react";
|
|
10219
|
-
import { clsx as
|
|
10220
|
-
import { Fragment as Fragment7, jsx as
|
|
10457
|
+
import { clsx as clsx22 } from "clsx";
|
|
10458
|
+
import { Fragment as Fragment7, jsx as jsx43, jsxs as jsxs25 } from "react/jsx-runtime";
|
|
10221
10459
|
function DefaultHexTile({
|
|
10222
10460
|
size,
|
|
10223
10461
|
fill,
|
|
@@ -10245,7 +10483,7 @@ function DefaultHexTile({
|
|
|
10245
10483
|
onPointerEnter,
|
|
10246
10484
|
onPointerLeave,
|
|
10247
10485
|
onKeyDown: (event) => handleKeyboardActivation(event, onClick),
|
|
10248
|
-
className:
|
|
10486
|
+
className: clsx22(
|
|
10249
10487
|
"transition-all duration-150",
|
|
10250
10488
|
onClick && "cursor-pointer hover:brightness-110",
|
|
10251
10489
|
className
|
|
@@ -10254,7 +10492,7 @@ function DefaultHexTile({
|
|
|
10254
10492
|
tabIndex: onClick ? 0 : void 0,
|
|
10255
10493
|
"aria-label": onClick ? label ?? "Hex tile" : void 0,
|
|
10256
10494
|
children: [
|
|
10257
|
-
/* @__PURE__ */
|
|
10495
|
+
/* @__PURE__ */ jsx43(
|
|
10258
10496
|
"polygon",
|
|
10259
10497
|
{
|
|
10260
10498
|
points,
|
|
@@ -10264,7 +10502,7 @@ function DefaultHexTile({
|
|
|
10264
10502
|
filter: "url(#hexShadow)"
|
|
10265
10503
|
}
|
|
10266
10504
|
),
|
|
10267
|
-
label && /* @__PURE__ */
|
|
10505
|
+
label && /* @__PURE__ */ jsx43(
|
|
10268
10506
|
"text",
|
|
10269
10507
|
{
|
|
10270
10508
|
x: 0,
|
|
@@ -10318,7 +10556,7 @@ function DefaultHexEdge({
|
|
|
10318
10556
|
{
|
|
10319
10557
|
onClick,
|
|
10320
10558
|
onKeyDown: (event) => handleKeyboardActivation(event, onClick),
|
|
10321
|
-
className:
|
|
10559
|
+
className: clsx22(
|
|
10322
10560
|
"transition-all duration-150",
|
|
10323
10561
|
onClick && "cursor-pointer",
|
|
10324
10562
|
className
|
|
@@ -10327,7 +10565,7 @@ function DefaultHexEdge({
|
|
|
10327
10565
|
tabIndex: onClick ? 0 : void 0,
|
|
10328
10566
|
"aria-label": onClick ? "Hex edge" : void 0,
|
|
10329
10567
|
children: [
|
|
10330
|
-
/* @__PURE__ */
|
|
10568
|
+
/* @__PURE__ */ jsx43(
|
|
10331
10569
|
"rect",
|
|
10332
10570
|
{
|
|
10333
10571
|
x: position.midX - touchTargetLength / 2,
|
|
@@ -10340,7 +10578,7 @@ function DefaultHexEdge({
|
|
|
10340
10578
|
pointerEvents: "all"
|
|
10341
10579
|
}
|
|
10342
10580
|
),
|
|
10343
|
-
/* @__PURE__ */
|
|
10581
|
+
/* @__PURE__ */ jsx43(
|
|
10344
10582
|
"line",
|
|
10345
10583
|
{
|
|
10346
10584
|
x1: position.x1,
|
|
@@ -10383,7 +10621,7 @@ function DefaultHexVertex({
|
|
|
10383
10621
|
onPointerEnter,
|
|
10384
10622
|
onPointerLeave,
|
|
10385
10623
|
onKeyDown: (event) => handleKeyboardActivation(event, onClick),
|
|
10386
|
-
className:
|
|
10624
|
+
className: clsx22(
|
|
10387
10625
|
"transition-all duration-150",
|
|
10388
10626
|
onClick && "cursor-pointer hover:scale-110",
|
|
10389
10627
|
className
|
|
@@ -10393,7 +10631,7 @@ function DefaultHexVertex({
|
|
|
10393
10631
|
tabIndex: onClick ? 0 : void 0,
|
|
10394
10632
|
"aria-label": onClick ? "Hex vertex" : void 0,
|
|
10395
10633
|
children: [
|
|
10396
|
-
/* @__PURE__ */
|
|
10634
|
+
/* @__PURE__ */ jsx43(
|
|
10397
10635
|
"circle",
|
|
10398
10636
|
{
|
|
10399
10637
|
cx: position.x,
|
|
@@ -10403,7 +10641,7 @@ function DefaultHexVertex({
|
|
|
10403
10641
|
pointerEvents: "all"
|
|
10404
10642
|
}
|
|
10405
10643
|
),
|
|
10406
|
-
shape === "square" ? /* @__PURE__ */
|
|
10644
|
+
shape === "square" ? /* @__PURE__ */ jsx43(
|
|
10407
10645
|
"rect",
|
|
10408
10646
|
{
|
|
10409
10647
|
x: position.x - size,
|
|
@@ -10415,7 +10653,7 @@ function DefaultHexVertex({
|
|
|
10415
10653
|
strokeWidth: effectiveStrokeWidth,
|
|
10416
10654
|
className: hasOwner ? "" : "opacity-30"
|
|
10417
10655
|
}
|
|
10418
|
-
) : /* @__PURE__ */
|
|
10656
|
+
) : /* @__PURE__ */ jsx43(
|
|
10419
10657
|
"circle",
|
|
10420
10658
|
{
|
|
10421
10659
|
cx: position.x,
|
|
@@ -10439,7 +10677,7 @@ function DefaultInteractiveVertex({
|
|
|
10439
10677
|
hoverColor = "rgba(34, 197, 94, 0.8)",
|
|
10440
10678
|
className
|
|
10441
10679
|
}) {
|
|
10442
|
-
return /* @__PURE__ */
|
|
10680
|
+
return /* @__PURE__ */ jsx43(
|
|
10443
10681
|
"circle",
|
|
10444
10682
|
{
|
|
10445
10683
|
cx: position.x,
|
|
@@ -10448,7 +10686,7 @@ function DefaultInteractiveVertex({
|
|
|
10448
10686
|
fill: isHovered ? hoverColor : color,
|
|
10449
10687
|
stroke: isHovered ? "#22c55e" : "rgba(255,255,255,0.4)",
|
|
10450
10688
|
strokeWidth: isHovered ? 2 : 1,
|
|
10451
|
-
className:
|
|
10689
|
+
className: clsx22("transition-all duration-150", className)
|
|
10452
10690
|
}
|
|
10453
10691
|
);
|
|
10454
10692
|
}
|
|
@@ -10460,7 +10698,7 @@ function DefaultInteractiveEdge({
|
|
|
10460
10698
|
hoverColor = "rgba(251, 146, 60, 0.8)",
|
|
10461
10699
|
className
|
|
10462
10700
|
}) {
|
|
10463
|
-
return /* @__PURE__ */
|
|
10701
|
+
return /* @__PURE__ */ jsx43(
|
|
10464
10702
|
"line",
|
|
10465
10703
|
{
|
|
10466
10704
|
x1: position.x1,
|
|
@@ -10470,7 +10708,7 @@ function DefaultInteractiveEdge({
|
|
|
10470
10708
|
stroke: isHovered ? hoverColor : color,
|
|
10471
10709
|
strokeWidth: isHovered ? strokeWidth * 1.5 : strokeWidth,
|
|
10472
10710
|
strokeLinecap: "round",
|
|
10473
|
-
className:
|
|
10711
|
+
className: clsx22("transition-all duration-150", className)
|
|
10474
10712
|
}
|
|
10475
10713
|
);
|
|
10476
10714
|
}
|
|
@@ -10746,7 +10984,7 @@ function HexGridImpl(props) {
|
|
|
10746
10984
|
width,
|
|
10747
10985
|
height,
|
|
10748
10986
|
viewBox,
|
|
10749
|
-
className:
|
|
10987
|
+
className: clsx22(
|
|
10750
10988
|
"hex-grid",
|
|
10751
10989
|
effectivePanZoom && "touch-none",
|
|
10752
10990
|
isDragging && "cursor-grabbing",
|
|
@@ -10759,16 +10997,16 @@ function HexGridImpl(props) {
|
|
|
10759
10997
|
children: [
|
|
10760
10998
|
/* @__PURE__ */ jsxs25("defs", { children: [
|
|
10761
10999
|
/* @__PURE__ */ jsxs25("linearGradient", { id: "oceanGradient", x1: "0%", y1: "0%", x2: "100%", y2: "100%", children: [
|
|
10762
|
-
/* @__PURE__ */
|
|
10763
|
-
/* @__PURE__ */
|
|
11000
|
+
/* @__PURE__ */ jsx43("stop", { offset: "0%", stopColor: "#0ea5e9" }),
|
|
11001
|
+
/* @__PURE__ */ jsx43("stop", { offset: "100%", stopColor: "#0284c7" })
|
|
10764
11002
|
] }),
|
|
10765
|
-
/* @__PURE__ */
|
|
11003
|
+
/* @__PURE__ */ jsx43("filter", { id: "hexShadow", x: "-20%", y: "-20%", width: "140%", height: "140%", children: /* @__PURE__ */ jsx43("feDropShadow", { dx: "1", dy: "1", stdDeviation: "2", floodOpacity: "0.3" }) })
|
|
10766
11004
|
] }),
|
|
10767
|
-
/* @__PURE__ */
|
|
11005
|
+
/* @__PURE__ */ jsx43("g", { className: "tiles", role: "list", "aria-label": "Hex tiles", children: resolvedTiles.map((tile) => {
|
|
10768
11006
|
const pos = tilePositions.get(tile.id);
|
|
10769
11007
|
if (!pos) return null;
|
|
10770
11008
|
const geometry = buildTileGeometry(pos);
|
|
10771
|
-
return /* @__PURE__ */
|
|
11009
|
+
return /* @__PURE__ */ jsx43(
|
|
10772
11010
|
"g",
|
|
10773
11011
|
{
|
|
10774
11012
|
transform: `translate(${pos.x}, ${pos.y})`,
|
|
@@ -10779,7 +11017,7 @@ function HexGridImpl(props) {
|
|
|
10779
11017
|
tile.id
|
|
10780
11018
|
);
|
|
10781
11019
|
}) }),
|
|
10782
|
-
interactiveSpaces && resolvedTiles.length > 0 && /* @__PURE__ */
|
|
11020
|
+
interactiveSpaces && resolvedTiles.length > 0 && /* @__PURE__ */ jsx43(
|
|
10783
11021
|
InteractiveTargetLayerGroup,
|
|
10784
11022
|
{
|
|
10785
11023
|
layer: interactiveSpaces,
|
|
@@ -10794,7 +11032,7 @@ function HexGridImpl(props) {
|
|
|
10794
11032
|
hover: spaceHover,
|
|
10795
11033
|
getTargetTransform: ({ pos }) => `translate(${pos.x}, ${pos.y})`,
|
|
10796
11034
|
renderTargetContent: ({ space, pos }, state, isSelectable) => /* @__PURE__ */ jsxs25(Fragment7, { children: [
|
|
10797
|
-
isSelectable && /* @__PURE__ */
|
|
11035
|
+
isSelectable && /* @__PURE__ */ jsx43(
|
|
10798
11036
|
"polygon",
|
|
10799
11037
|
{
|
|
10800
11038
|
points: buildTileGeometry(pos).points({
|
|
@@ -10808,13 +11046,13 @@ function HexGridImpl(props) {
|
|
|
10808
11046
|
] })
|
|
10809
11047
|
}
|
|
10810
11048
|
),
|
|
10811
|
-
resolvedEdges.length > 0 && /* @__PURE__ */
|
|
10812
|
-
return /* @__PURE__ */
|
|
11049
|
+
resolvedEdges.length > 0 && /* @__PURE__ */ jsx43("g", { className: "edges", role: "list", "aria-label": "Hex edges", children: resolvedEdgePositions.map(({ edge, interactiveEdge }) => {
|
|
11050
|
+
return /* @__PURE__ */ jsx43("g", { role: "listitem", children: renderEdge(edge, interactiveEdge.position) }, edge.id);
|
|
10813
11051
|
}) }),
|
|
10814
|
-
resolvedVertices.length > 0 && /* @__PURE__ */
|
|
10815
|
-
return /* @__PURE__ */
|
|
11052
|
+
resolvedVertices.length > 0 && /* @__PURE__ */ jsx43("g", { className: "vertices", role: "list", "aria-label": "Hex vertices", children: resolvedVertexPositions.map(({ vertex, interactiveVertex }) => {
|
|
11053
|
+
return /* @__PURE__ */ jsx43("g", { role: "listitem", children: renderVertex(vertex, interactiveVertex.position) }, vertex.id);
|
|
10816
11054
|
}) }),
|
|
10817
|
-
interactiveEdges && resolvedEdgePositions.length > 0 && /* @__PURE__ */
|
|
11055
|
+
interactiveEdges && resolvedEdgePositions.length > 0 && /* @__PURE__ */ jsx43(
|
|
10818
11056
|
InteractiveTargetLayerGroup,
|
|
10819
11057
|
{
|
|
10820
11058
|
layer: interactiveEdges,
|
|
@@ -10833,7 +11071,7 @@ function HexGridImpl(props) {
|
|
|
10833
11071
|
edge.position.y2 - edge.position.y1
|
|
10834
11072
|
);
|
|
10835
11073
|
return /* @__PURE__ */ jsxs25(Fragment7, { children: [
|
|
10836
|
-
isSelectable && /* @__PURE__ */
|
|
11074
|
+
isSelectable && /* @__PURE__ */ jsx43(
|
|
10837
11075
|
"rect",
|
|
10838
11076
|
{
|
|
10839
11077
|
x: edge.position.midX - touchTargetLength / 2,
|
|
@@ -10846,7 +11084,7 @@ function HexGridImpl(props) {
|
|
|
10846
11084
|
pointerEvents: "all"
|
|
10847
11085
|
}
|
|
10848
11086
|
),
|
|
10849
|
-
renderInteractiveEdge ? renderInteractiveEdge(edge, edge.position, state) : state.isEnabled && state.isEligible ? /* @__PURE__ */
|
|
11087
|
+
renderInteractiveEdge ? renderInteractiveEdge(edge, edge.position, state) : state.isEnabled && state.isEligible ? /* @__PURE__ */ jsx43(
|
|
10850
11088
|
DefaultInteractiveEdge,
|
|
10851
11089
|
{
|
|
10852
11090
|
position: edge.position,
|
|
@@ -10858,7 +11096,7 @@ function HexGridImpl(props) {
|
|
|
10858
11096
|
}
|
|
10859
11097
|
}
|
|
10860
11098
|
),
|
|
10861
|
-
interactiveVertices && resolvedVertexPositions.length > 0 && /* @__PURE__ */
|
|
11099
|
+
interactiveVertices && resolvedVertexPositions.length > 0 && /* @__PURE__ */ jsx43(
|
|
10862
11100
|
InteractiveTargetLayerGroup,
|
|
10863
11101
|
{
|
|
10864
11102
|
layer: interactiveVertices,
|
|
@@ -10872,7 +11110,7 @@ function HexGridImpl(props) {
|
|
|
10872
11110
|
selectMode: "render-state",
|
|
10873
11111
|
hover: vertexHover,
|
|
10874
11112
|
renderTargetContent: ({ interactiveVertex: vertex }, state, isSelectable) => /* @__PURE__ */ jsxs25(Fragment7, { children: [
|
|
10875
|
-
isSelectable && /* @__PURE__ */
|
|
11113
|
+
isSelectable && /* @__PURE__ */ jsx43(
|
|
10876
11114
|
"circle",
|
|
10877
11115
|
{
|
|
10878
11116
|
cx: vertex.position.x,
|
|
@@ -10882,7 +11120,7 @@ function HexGridImpl(props) {
|
|
|
10882
11120
|
pointerEvents: "all"
|
|
10883
11121
|
}
|
|
10884
11122
|
),
|
|
10885
|
-
renderInteractiveVertex ? renderInteractiveVertex(vertex, vertex.position, state) : state.isEnabled && state.isEligible ? /* @__PURE__ */
|
|
11123
|
+
renderInteractiveVertex ? renderInteractiveVertex(vertex, vertex.position, state) : state.isEnabled && state.isEligible ? /* @__PURE__ */ jsx43(
|
|
10886
11124
|
DefaultInteractiveVertex,
|
|
10887
11125
|
{
|
|
10888
11126
|
position: vertex.position,
|
|
@@ -10893,7 +11131,7 @@ function HexGridImpl(props) {
|
|
|
10893
11131
|
] })
|
|
10894
11132
|
}
|
|
10895
11133
|
),
|
|
10896
|
-
effectivePanZoom && transform.zoom !== 1 && /* @__PURE__ */
|
|
11134
|
+
effectivePanZoom && transform.zoom !== 1 && /* @__PURE__ */ jsx43(
|
|
10897
11135
|
GridZoomIndicator,
|
|
10898
11136
|
{
|
|
10899
11137
|
viewBoxX,
|
|
@@ -10997,6 +11235,8 @@ export {
|
|
|
10997
11235
|
MobileHandTrayProvider,
|
|
10998
11236
|
useRegisterMobileHand,
|
|
10999
11237
|
useMobileHandTrayActive,
|
|
11238
|
+
useOverlayInsets,
|
|
11239
|
+
useRegisterBottomOverlayInset,
|
|
11000
11240
|
PlayArea,
|
|
11001
11241
|
GameSkeleton,
|
|
11002
11242
|
ToastProvider,
|
|
@@ -11029,6 +11269,13 @@ export {
|
|
|
11029
11269
|
CostDisplay,
|
|
11030
11270
|
ActionButton,
|
|
11031
11271
|
PrimaryButton,
|
|
11272
|
+
PanelRoot,
|
|
11273
|
+
PanelHeader,
|
|
11274
|
+
PanelTitle,
|
|
11275
|
+
PanelDescription,
|
|
11276
|
+
PanelBody,
|
|
11277
|
+
PanelActions,
|
|
11278
|
+
Panel,
|
|
11032
11279
|
PrimaryActionButton,
|
|
11033
11280
|
ActionPanel,
|
|
11034
11281
|
ActionGroup,
|
|
@@ -11066,4 +11313,4 @@ export {
|
|
|
11066
11313
|
HexGrid,
|
|
11067
11314
|
createHexBoardView
|
|
11068
11315
|
};
|
|
11069
|
-
//# sourceMappingURL=chunk-
|
|
11316
|
+
//# sourceMappingURL=chunk-45FI6XII.js.map
|