@dreamboard-games/sdk 0.4.0-alpha.9 → 0.5.0-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +171 -11
- package/dist/authoring/index.d.ts +3 -6
- package/dist/authoring/index.js +3 -3
- package/dist/authoring-compiler.d.ts +3 -3
- package/dist/authoring-compiler.js +4 -5
- package/dist/{authoring-materialize-cli.js → authoring-generate-cli.js} +8 -9
- package/dist/authoring-generate-cli.js.map +1 -0
- package/dist/browser-interaction.d.ts +21 -21
- package/dist/{chunk-P6IJ5YVY.js → chunk-2WJSQQT7.js} +21 -9
- package/dist/chunk-2WJSQQT7.js.map +1 -0
- package/dist/{chunk-2TRZSZGD.js → chunk-32PFKDV7.js} +177 -416
- package/dist/chunk-32PFKDV7.js.map +1 -0
- package/dist/{chunk-NGYFBNBP.js → chunk-3BAD4VC2.js} +15 -85
- package/dist/chunk-3BAD4VC2.js.map +1 -0
- package/dist/{chunk-UC2UXAC6.js → chunk-3SKDNDPG.js} +2 -2
- package/dist/{chunk-BUOODBVO.js → chunk-4ZKTGZZK.js} +9 -28
- package/dist/chunk-4ZKTGZZK.js.map +1 -0
- package/dist/{chunk-XDGRC6OR.js → chunk-7M3N5DFJ.js} +613 -487
- package/dist/chunk-7M3N5DFJ.js.map +1 -0
- package/dist/{chunk-YNW3KBDE.js → chunk-EHPEMPRZ.js} +128 -128
- package/dist/chunk-EHPEMPRZ.js.map +1 -0
- package/dist/chunk-EY2LL5WD.js +9 -0
- package/dist/chunk-EY2LL5WD.js.map +1 -0
- package/dist/{chunk-GMOBG7Y7.js → chunk-GDPKTBUR.js} +5 -5
- package/dist/{chunk-GMOBG7Y7.js.map → chunk-GDPKTBUR.js.map} +1 -1
- package/dist/{chunk-SACZWUA6.js → chunk-JUGQ6F3N.js} +172 -1574
- package/dist/{chunk-SACZWUA6.js.map → chunk-JUGQ6F3N.js.map} +1 -1
- package/dist/chunk-K2JGSRMD.js +90 -0
- package/dist/chunk-K2JGSRMD.js.map +1 -0
- package/dist/{chunk-WDR7SKBM.js → chunk-M2S3QC32.js} +4 -4
- package/dist/chunk-M2S3QC32.js.map +1 -0
- package/dist/{chunk-JRGP6W4V.js → chunk-MIKC4Y67.js} +49 -4
- package/dist/chunk-MIKC4Y67.js.map +1 -0
- package/dist/chunk-MYKS6MTR.js +1347 -0
- package/dist/chunk-MYKS6MTR.js.map +1 -0
- package/dist/{chunk-7ADPYKFT.js → chunk-QLSK3DYO.js} +5 -5
- package/dist/chunk-QLSK3DYO.js.map +1 -0
- package/dist/{chunk-3PFDHTR7.js → chunk-UGH54WZ2.js} +42 -12
- package/dist/chunk-UGH54WZ2.js.map +1 -0
- package/dist/chunk-VCDWP5VL.js +746 -0
- package/dist/chunk-VCDWP5VL.js.map +1 -0
- package/dist/{chunk-5XTAQ4EQ.js → chunk-VZ7N6WAQ.js} +2 -2
- package/dist/{chunk-L3W2FPRQ.js → chunk-XRS4AZFK.js} +84 -13
- package/dist/chunk-XRS4AZFK.js.map +1 -0
- package/dist/codegen.d.ts +1 -3
- package/dist/codegen.js +1 -5
- package/dist/{components-BPzsSRs8.d.ts → components-CuBO6rev.d.ts} +2 -18
- package/dist/{definitions-0kjPV9wh.d.ts → definitions-1Hj-pQU8.d.ts} +9 -3
- package/dist/digest.d.ts +8 -0
- package/dist/game-g9dDFYyU.d.ts +546 -0
- package/dist/{index-CWzWpQzM.d.ts → index-Bxbv3c9W.d.ts} +2 -2
- package/dist/{index.d-C7Ztirg6.d.ts → index.d-DjzoK7zn.d.ts} +389 -225
- package/dist/index.js +2 -2
- package/dist/package-set.d.ts +2 -2
- package/dist/package-set.js +2 -2
- package/dist/plugin-runtime-contract.d.ts +17 -0
- package/dist/plugin-runtime-contract.js +92 -0
- package/dist/{protocol-B2LWcqB4.d.ts → protocol-dYgafTYY.d.ts} +45 -53
- package/dist/reducer/advanced.d.ts +6 -4
- package/dist/reducer/advanced.js +14 -85
- package/dist/reducer/advanced.js.map +1 -1
- package/dist/reducer-contract.d.ts +1 -1
- package/dist/reducer-contract.js +6 -4
- package/dist/reducer.d.ts +11 -775
- package/dist/reducer.js +15 -1293
- package/dist/reducer.js.map +1 -1
- package/dist/reference-games/index.d.ts +29 -11
- package/dist/reference-games/index.js +43 -45
- package/dist/reference-games/index.js.map +1 -1
- package/dist/runtime/primitives.d.ts +3 -4
- package/dist/runtime/primitives.js +5 -5
- package/dist/runtime/runtime-api.d.ts +1 -2
- package/dist/runtime/workspace-contract.d.ts +347 -11
- package/dist/runtime/workspace-contract.js +13 -6
- package/dist/{runtime-B_w9AO2n.d.ts → runtime-DksMTWtC.d.ts} +8 -27
- package/dist/{plugin-state-BRH3UiUp.d.ts → runtime-api-C9bDgp63.d.ts} +83 -4
- package/dist/runtime.d.ts +8 -8
- package/dist/runtime.js +19 -14
- package/dist/runtime.js.map +1 -1
- package/dist/schema.d.ts +379 -0
- package/dist/testing-compiler.d.ts +6 -5
- package/dist/testing-compiler.js +41 -5
- package/dist/testing-compiler.js.map +1 -1
- package/dist/testing-runtime.d.ts +7 -6
- package/dist/testing-runtime.js +6 -6
- package/dist/testing.d.ts +30 -107
- package/dist/testing.js +44 -371
- package/dist/testing.js.map +1 -1
- package/dist/{types-_zfC_7CD.d.ts → types-DR7DoB1x.d.ts} +4 -5
- package/dist/{types-Bvptkukh.d.ts → types-Dlh4GsNp.d.ts} +2 -2
- package/dist/types.d.ts +0 -1
- package/dist/ui/components.d.ts +3 -3
- package/dist/ui/components.js +1 -5
- package/dist/ui/plugin-styles.css +1 -1
- package/dist/{ui-contract-CUC7Lyoc.d.ts → ui-contract-Mgx_k9gm.d.ts} +2 -7
- package/dist/ui.d.ts +4 -4
- package/dist/ui.js +2 -6
- package/dist/{views-DE2eZxPz.d.ts → views-B4lD4fT0.d.ts} +102 -49
- package/package.json +28 -29
- package/REFERENCE.md +0 -23787
- package/dist/authoring-materialize-cli.js.map +0 -1
- package/dist/chunk-2TRZSZGD.js.map +0 -1
- package/dist/chunk-3PFDHTR7.js.map +0 -1
- package/dist/chunk-45P5CEGH.js +0 -176
- package/dist/chunk-45P5CEGH.js.map +0 -1
- package/dist/chunk-7ADPYKFT.js.map +0 -1
- package/dist/chunk-BUOODBVO.js.map +0 -1
- package/dist/chunk-JRGP6W4V.js.map +0 -1
- package/dist/chunk-L3W2FPRQ.js.map +0 -1
- package/dist/chunk-NGYFBNBP.js.map +0 -1
- package/dist/chunk-P6IJ5YVY.js.map +0 -1
- package/dist/chunk-QQNL4WTX.js +0 -578
- package/dist/chunk-QQNL4WTX.js.map +0 -1
- package/dist/chunk-SFOAY5H4.js +0 -12
- package/dist/chunk-SFOAY5H4.js.map +0 -1
- package/dist/chunk-UNVCT5Z7.js +0 -73
- package/dist/chunk-UNVCT5Z7.js.map +0 -1
- package/dist/chunk-WDR7SKBM.js.map +0 -1
- package/dist/chunk-XDGRC6OR.js.map +0 -1
- package/dist/chunk-XLHLFTLI.js +0 -399
- package/dist/chunk-XLHLFTLI.js.map +0 -1
- package/dist/chunk-YNW3KBDE.js.map +0 -1
- package/dist/reference-game-compiler.d.ts +0 -45
- package/dist/reference-game-compiler.js +0 -25
- package/dist/reference-game-source-manifest-cli.d.ts +0 -1
- package/dist/reference-game-source-manifest-cli.js +0 -84
- package/dist/reference-game-source-manifest-cli.js.map +0 -1
- package/dist/runtime-api-xCWLMQRT.d.ts +0 -97
- package/dist/schema-9jZzlEWZ.d.ts +0 -220
- /package/dist/{authoring-materialize-cli.d.ts → authoring-generate-cli.d.ts} +0 -0
- /package/dist/{chunk-UC2UXAC6.js.map → chunk-3SKDNDPG.js.map} +0 -0
- /package/dist/{chunk-5XTAQ4EQ.js.map → chunk-VZ7N6WAQ.js.map} +0 -0
- /package/dist/{reference-game-compiler.js.map → plugin-runtime-contract.js.map} +0 -0
|
@@ -1721,7 +1721,6 @@ function CardFace({
|
|
|
1721
1721
|
"data-face-down": faceDown ? "true" : void 0,
|
|
1722
1722
|
className: clsx("relative", CARD_SIZE_CLASSES[size], className),
|
|
1723
1723
|
style: {
|
|
1724
|
-
opacity: disabled ? 0.5 : submitted ? 0.85 : 1,
|
|
1725
1724
|
transitionProperty: "transform, box-shadow, border-color",
|
|
1726
1725
|
transitionDuration: motionDuration(theme, "normal"),
|
|
1727
1726
|
transitionTimingFunction: theme.motion.easing.out,
|
|
@@ -4653,9 +4652,11 @@ function HandView({
|
|
|
4653
4652
|
"div",
|
|
4654
4653
|
{
|
|
4655
4654
|
role: "row",
|
|
4655
|
+
tabIndex: 0,
|
|
4656
4656
|
className: clsx8(
|
|
4657
4657
|
"flex items-end gap-3 overflow-x-auto px-4",
|
|
4658
|
-
"snap-x scroll-px-4"
|
|
4658
|
+
"snap-x scroll-px-4",
|
|
4659
|
+
"focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-current"
|
|
4659
4660
|
),
|
|
4660
4661
|
style: {
|
|
4661
4662
|
touchAction: pointer.scrollLocked ? "none" : "pan-x",
|
|
@@ -7843,8 +7844,8 @@ function renderHeadline({
|
|
|
7843
7844
|
return /* @__PURE__ */ jsxs18(
|
|
7844
7845
|
motion8.div,
|
|
7845
7846
|
{
|
|
7846
|
-
initial: reducedMotion ?
|
|
7847
|
-
animate:
|
|
7847
|
+
initial: reducedMotion ? false : { opacity: 0, y: -4 },
|
|
7848
|
+
animate: { opacity: 1, y: 0 },
|
|
7848
7849
|
style: {
|
|
7849
7850
|
display: "flex",
|
|
7850
7851
|
alignItems: "center",
|
|
@@ -8770,240 +8771,6 @@ function OutcomeDialog({
|
|
|
8770
8771
|
) });
|
|
8771
8772
|
}
|
|
8772
8773
|
|
|
8773
|
-
// src/ui/components/GameEventLog.tsx
|
|
8774
|
-
import { Activity, ChevronDown as ChevronDown2 } from "lucide-react";
|
|
8775
|
-
import { useId as useId7 } from "react";
|
|
8776
|
-
import { jsx as jsx38, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
8777
|
-
function formatDetailValue(value) {
|
|
8778
|
-
if (typeof value === "boolean") return value ? "Yes" : "No";
|
|
8779
|
-
return String(value);
|
|
8780
|
-
}
|
|
8781
|
-
function eventKey(event) {
|
|
8782
|
-
return `${event.version}:${event.index}`;
|
|
8783
|
-
}
|
|
8784
|
-
function SystemActionSummary({
|
|
8785
|
-
event,
|
|
8786
|
-
className,
|
|
8787
|
-
style
|
|
8788
|
-
}) {
|
|
8789
|
-
const theme = useTheme();
|
|
8790
|
-
const titleId = useId7();
|
|
8791
|
-
const summaryId = useId7();
|
|
8792
|
-
return /* @__PURE__ */ jsxs21(
|
|
8793
|
-
"article",
|
|
8794
|
-
{
|
|
8795
|
-
className,
|
|
8796
|
-
"aria-labelledby": titleId,
|
|
8797
|
-
"aria-describedby": event.summary ? summaryId : void 0,
|
|
8798
|
-
style: {
|
|
8799
|
-
...eventItemStyle(theme),
|
|
8800
|
-
...style
|
|
8801
|
-
},
|
|
8802
|
-
children: [
|
|
8803
|
-
/* @__PURE__ */ jsx38(
|
|
8804
|
-
Activity,
|
|
8805
|
-
{
|
|
8806
|
-
"aria-hidden": "true",
|
|
8807
|
-
size: 18,
|
|
8808
|
-
strokeWidth: 2.5,
|
|
8809
|
-
style: {
|
|
8810
|
-
color: theme.semantic.intent.info.solid,
|
|
8811
|
-
flex: "0 0 auto",
|
|
8812
|
-
marginTop: 2
|
|
8813
|
-
}
|
|
8814
|
-
}
|
|
8815
|
-
),
|
|
8816
|
-
/* @__PURE__ */ jsxs21("div", { style: { display: "grid", gap: theme.space[2], minWidth: 0 }, children: [
|
|
8817
|
-
/* @__PURE__ */ jsxs21("div", { style: { display: "grid", gap: theme.space[1] }, children: [
|
|
8818
|
-
/* @__PURE__ */ jsx38("h3", { id: titleId, style: eventTitleStyle(theme), children: event.title }),
|
|
8819
|
-
event.summary ? /* @__PURE__ */ jsx38("p", { id: summaryId, style: eventBodyStyle(theme), children: event.summary }) : null
|
|
8820
|
-
] }),
|
|
8821
|
-
event.details && event.details.length > 0 ? /* @__PURE__ */ jsx38("dl", { style: detailGridStyle(theme), children: event.details.map((detail, index) => /* @__PURE__ */ jsxs21(
|
|
8822
|
-
"div",
|
|
8823
|
-
{
|
|
8824
|
-
style: {
|
|
8825
|
-
display: "flex",
|
|
8826
|
-
justifyContent: "space-between",
|
|
8827
|
-
gap: theme.space[3],
|
|
8828
|
-
minWidth: 0
|
|
8829
|
-
},
|
|
8830
|
-
children: [
|
|
8831
|
-
/* @__PURE__ */ jsx38("dt", { style: detailLabelStyle(theme), children: detail.label }),
|
|
8832
|
-
/* @__PURE__ */ jsx38("dd", { style: detailValueStyle(theme), children: formatDetailValue(detail.value) })
|
|
8833
|
-
]
|
|
8834
|
-
},
|
|
8835
|
-
`${detail.label}:${index}`
|
|
8836
|
-
)) }) : null
|
|
8837
|
-
] })
|
|
8838
|
-
]
|
|
8839
|
-
}
|
|
8840
|
-
);
|
|
8841
|
-
}
|
|
8842
|
-
function GameEventLog({
|
|
8843
|
-
events,
|
|
8844
|
-
empty = "No automated actions yet.",
|
|
8845
|
-
maxVisible,
|
|
8846
|
-
className,
|
|
8847
|
-
style
|
|
8848
|
-
}) {
|
|
8849
|
-
const theme = useTheme();
|
|
8850
|
-
const titleId = useId7();
|
|
8851
|
-
const visibleEvents = maxVisible === void 0 ? events : events.slice(0, maxVisible);
|
|
8852
|
-
const hiddenCount = Math.max(0, events.length - visibleEvents.length);
|
|
8853
|
-
return /* @__PURE__ */ jsxs21(
|
|
8854
|
-
"section",
|
|
8855
|
-
{
|
|
8856
|
-
className,
|
|
8857
|
-
"aria-labelledby": titleId,
|
|
8858
|
-
style: {
|
|
8859
|
-
...logContainerStyle(theme),
|
|
8860
|
-
...style
|
|
8861
|
-
},
|
|
8862
|
-
children: [
|
|
8863
|
-
/* @__PURE__ */ jsxs21("header", { style: logHeaderStyle(theme), children: [
|
|
8864
|
-
/* @__PURE__ */ jsx38("h2", { id: titleId, style: logTitleStyle(theme), children: "Automated actions" }),
|
|
8865
|
-
/* @__PURE__ */ jsx38("span", { style: logCountStyle(theme), children: events.length })
|
|
8866
|
-
] }),
|
|
8867
|
-
visibleEvents.length === 0 ? /* @__PURE__ */ jsx38("p", { style: emptyStyle(theme), children: empty }) : /* @__PURE__ */ jsx38(
|
|
8868
|
-
"ol",
|
|
8869
|
-
{
|
|
8870
|
-
"aria-live": "polite",
|
|
8871
|
-
style: {
|
|
8872
|
-
display: "grid",
|
|
8873
|
-
gap: theme.space[2],
|
|
8874
|
-
margin: 0,
|
|
8875
|
-
padding: 0,
|
|
8876
|
-
listStyle: "none"
|
|
8877
|
-
},
|
|
8878
|
-
children: visibleEvents.map((event) => /* @__PURE__ */ jsx38("li", { children: /* @__PURE__ */ jsx38(SystemActionSummary, { event }) }, eventKey(event)))
|
|
8879
|
-
}
|
|
8880
|
-
),
|
|
8881
|
-
hiddenCount > 0 ? /* @__PURE__ */ jsxs21("div", { style: moreStyle(theme), children: [
|
|
8882
|
-
/* @__PURE__ */ jsx38(ChevronDown2, { "aria-hidden": "true", size: 16 }),
|
|
8883
|
-
/* @__PURE__ */ jsxs21("span", { children: [
|
|
8884
|
-
hiddenCount,
|
|
8885
|
-
" earlier actions hidden"
|
|
8886
|
-
] })
|
|
8887
|
-
] }) : null
|
|
8888
|
-
]
|
|
8889
|
-
}
|
|
8890
|
-
);
|
|
8891
|
-
}
|
|
8892
|
-
function logContainerStyle(theme) {
|
|
8893
|
-
return {
|
|
8894
|
-
...surfaceStyle(theme, { tone: "card" }),
|
|
8895
|
-
display: "grid",
|
|
8896
|
-
gap: theme.space[3],
|
|
8897
|
-
padding: theme.space[4],
|
|
8898
|
-
borderRadius: theme.radius.lg,
|
|
8899
|
-
border: `1px solid ${theme.semantic.border.subtle}`,
|
|
8900
|
-
minWidth: 0
|
|
8901
|
-
};
|
|
8902
|
-
}
|
|
8903
|
-
function logHeaderStyle(theme) {
|
|
8904
|
-
return {
|
|
8905
|
-
display: "flex",
|
|
8906
|
-
justifyContent: "space-between",
|
|
8907
|
-
alignItems: "center",
|
|
8908
|
-
gap: theme.space[3],
|
|
8909
|
-
minWidth: 0
|
|
8910
|
-
};
|
|
8911
|
-
}
|
|
8912
|
-
function logTitleStyle(theme) {
|
|
8913
|
-
return {
|
|
8914
|
-
margin: 0,
|
|
8915
|
-
color: theme.semantic.text.primary,
|
|
8916
|
-
fontSize: theme.typography.fontSize.lg,
|
|
8917
|
-
fontWeight: theme.typography.fontWeight.bold
|
|
8918
|
-
};
|
|
8919
|
-
}
|
|
8920
|
-
function logCountStyle(theme) {
|
|
8921
|
-
return {
|
|
8922
|
-
minWidth: 28,
|
|
8923
|
-
height: 28,
|
|
8924
|
-
display: "inline-flex",
|
|
8925
|
-
alignItems: "center",
|
|
8926
|
-
justifyContent: "center",
|
|
8927
|
-
borderRadius: theme.radius.pill,
|
|
8928
|
-
background: theme.semantic.intent.info.soft,
|
|
8929
|
-
color: theme.semantic.intent.info.onSoft,
|
|
8930
|
-
fontFamily: theme.typography.fontFamily.tabular,
|
|
8931
|
-
fontSize: theme.typography.fontSize.sm,
|
|
8932
|
-
fontWeight: theme.typography.fontWeight.bold
|
|
8933
|
-
};
|
|
8934
|
-
}
|
|
8935
|
-
function eventItemStyle(theme) {
|
|
8936
|
-
return {
|
|
8937
|
-
display: "grid",
|
|
8938
|
-
gridTemplateColumns: "20px minmax(0, 1fr)",
|
|
8939
|
-
gap: theme.space[3],
|
|
8940
|
-
padding: theme.space[3],
|
|
8941
|
-
borderRadius: theme.radius.md,
|
|
8942
|
-
border: `1px solid ${theme.semantic.intent.info.border}`,
|
|
8943
|
-
background: theme.semantic.intent.info.soft,
|
|
8944
|
-
minWidth: 0
|
|
8945
|
-
};
|
|
8946
|
-
}
|
|
8947
|
-
function eventTitleStyle(theme) {
|
|
8948
|
-
return {
|
|
8949
|
-
margin: 0,
|
|
8950
|
-
color: theme.semantic.text.primary,
|
|
8951
|
-
fontSize: theme.typography.fontSize.sm,
|
|
8952
|
-
fontWeight: theme.typography.fontWeight.bold
|
|
8953
|
-
};
|
|
8954
|
-
}
|
|
8955
|
-
function eventBodyStyle(theme) {
|
|
8956
|
-
return {
|
|
8957
|
-
margin: 0,
|
|
8958
|
-
color: theme.semantic.text.muted,
|
|
8959
|
-
fontSize: theme.typography.fontSize.sm,
|
|
8960
|
-
lineHeight: theme.typography.lineHeight.normal
|
|
8961
|
-
};
|
|
8962
|
-
}
|
|
8963
|
-
function detailGridStyle(theme) {
|
|
8964
|
-
return {
|
|
8965
|
-
display: "grid",
|
|
8966
|
-
gap: theme.space[1],
|
|
8967
|
-
margin: 0,
|
|
8968
|
-
paddingTop: theme.space[2],
|
|
8969
|
-
borderTop: `1px solid ${theme.semantic.intent.info.border}`
|
|
8970
|
-
};
|
|
8971
|
-
}
|
|
8972
|
-
function detailLabelStyle(theme) {
|
|
8973
|
-
return {
|
|
8974
|
-
color: theme.semantic.text.muted,
|
|
8975
|
-
fontSize: theme.typography.fontSize.xs,
|
|
8976
|
-
minWidth: 0
|
|
8977
|
-
};
|
|
8978
|
-
}
|
|
8979
|
-
function detailValueStyle(theme) {
|
|
8980
|
-
return {
|
|
8981
|
-
margin: 0,
|
|
8982
|
-
color: theme.semantic.text.primary,
|
|
8983
|
-
fontFamily: theme.typography.fontFamily.tabular,
|
|
8984
|
-
fontSize: theme.typography.fontSize.xs,
|
|
8985
|
-
fontWeight: theme.typography.fontWeight.bold,
|
|
8986
|
-
textAlign: "right",
|
|
8987
|
-
minWidth: 0
|
|
8988
|
-
};
|
|
8989
|
-
}
|
|
8990
|
-
function emptyStyle(theme) {
|
|
8991
|
-
return {
|
|
8992
|
-
margin: 0,
|
|
8993
|
-
color: theme.semantic.text.muted,
|
|
8994
|
-
fontSize: theme.typography.fontSize.sm
|
|
8995
|
-
};
|
|
8996
|
-
}
|
|
8997
|
-
function moreStyle(theme) {
|
|
8998
|
-
return {
|
|
8999
|
-
display: "inline-flex",
|
|
9000
|
-
alignItems: "center",
|
|
9001
|
-
gap: theme.space[1],
|
|
9002
|
-
color: theme.semantic.text.muted,
|
|
9003
|
-
fontSize: theme.typography.fontSize.xs
|
|
9004
|
-
};
|
|
9005
|
-
}
|
|
9006
|
-
|
|
9007
8774
|
// src/ui/components/board/NetworkGraph.tsx
|
|
9008
8775
|
import { useMemo as useMemo11 } from "react";
|
|
9009
8776
|
import { clsx as clsx16 } from "clsx";
|
|
@@ -9024,7 +8791,7 @@ function handleKeyboardActivation(event, onActivate, options) {
|
|
|
9024
8791
|
}
|
|
9025
8792
|
|
|
9026
8793
|
// src/ui/components/board/NetworkGraph.tsx
|
|
9027
|
-
import { Fragment as Fragment5, jsx as
|
|
8794
|
+
import { Fragment as Fragment5, jsx as jsx38, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
9028
8795
|
var EMPTY_NETWORK_EDGES = [];
|
|
9029
8796
|
var EMPTY_NETWORK_PIECES = [];
|
|
9030
8797
|
function DefaultNetworkNode({
|
|
@@ -9045,7 +8812,7 @@ function DefaultNetworkNode({
|
|
|
9045
8812
|
const effectiveStroke = isSelected ? "#60a5fa" : isHighlighted ? "#4ade80" : stroke;
|
|
9046
8813
|
const effectiveStrokeWidth = isSelected || isHighlighted ? 3 : strokeWidth;
|
|
9047
8814
|
const displayLabel = label ? label.length > maxLabelLength ? label.slice(0, maxLabelLength - 1) + "\u2026" : label : void 0;
|
|
9048
|
-
return /* @__PURE__ */
|
|
8815
|
+
return /* @__PURE__ */ jsxs21(
|
|
9049
8816
|
"g",
|
|
9050
8817
|
{
|
|
9051
8818
|
onClick,
|
|
@@ -9061,7 +8828,7 @@ function DefaultNetworkNode({
|
|
|
9061
8828
|
tabIndex: onClick ? 0 : void 0,
|
|
9062
8829
|
"aria-label": onClick ? label ?? "Network node" : void 0,
|
|
9063
8830
|
children: [
|
|
9064
|
-
/* @__PURE__ */
|
|
8831
|
+
/* @__PURE__ */ jsx38(
|
|
9065
8832
|
"circle",
|
|
9066
8833
|
{
|
|
9067
8834
|
r: radius,
|
|
@@ -9070,7 +8837,7 @@ function DefaultNetworkNode({
|
|
|
9070
8837
|
strokeWidth: effectiveStrokeWidth
|
|
9071
8838
|
}
|
|
9072
8839
|
),
|
|
9073
|
-
displayLabel && /* @__PURE__ */
|
|
8840
|
+
displayLabel && /* @__PURE__ */ jsx38(
|
|
9074
8841
|
"text",
|
|
9075
8842
|
{
|
|
9076
8843
|
textAnchor: "middle",
|
|
@@ -9102,7 +8869,7 @@ function DefaultNetworkEdge({
|
|
|
9102
8869
|
const effectiveWidth = isSelected || isHighlighted ? strokeWidth + 2 : strokeWidth;
|
|
9103
8870
|
const midX = (from.x + to.x) / 2;
|
|
9104
8871
|
const midY = (from.y + to.y) / 2;
|
|
9105
|
-
return /* @__PURE__ */
|
|
8872
|
+
return /* @__PURE__ */ jsxs21(
|
|
9106
8873
|
"g",
|
|
9107
8874
|
{
|
|
9108
8875
|
onClick,
|
|
@@ -9118,7 +8885,7 @@ function DefaultNetworkEdge({
|
|
|
9118
8885
|
tabIndex: onClick ? 0 : void 0,
|
|
9119
8886
|
"aria-label": onClick ? label !== void 0 ? `Network edge ${label}` : "Network edge" : void 0,
|
|
9120
8887
|
children: [
|
|
9121
|
-
/* @__PURE__ */
|
|
8888
|
+
/* @__PURE__ */ jsx38(
|
|
9122
8889
|
"line",
|
|
9123
8890
|
{
|
|
9124
8891
|
x1: from.x,
|
|
@@ -9130,8 +8897,8 @@ function DefaultNetworkEdge({
|
|
|
9130
8897
|
strokeLinecap: "round"
|
|
9131
8898
|
}
|
|
9132
8899
|
),
|
|
9133
|
-
label !== void 0 && /* @__PURE__ */
|
|
9134
|
-
/* @__PURE__ */
|
|
8900
|
+
label !== void 0 && /* @__PURE__ */ jsxs21(Fragment5, { children: [
|
|
8901
|
+
/* @__PURE__ */ jsx38(
|
|
9135
8902
|
"circle",
|
|
9136
8903
|
{
|
|
9137
8904
|
cx: midX,
|
|
@@ -9142,7 +8909,7 @@ function DefaultNetworkEdge({
|
|
|
9142
8909
|
strokeWidth: 1
|
|
9143
8910
|
}
|
|
9144
8911
|
),
|
|
9145
|
-
/* @__PURE__ */
|
|
8912
|
+
/* @__PURE__ */ jsx38(
|
|
9146
8913
|
"text",
|
|
9147
8914
|
{
|
|
9148
8915
|
x: midX,
|
|
@@ -9167,7 +8934,7 @@ function DefaultNetworkPiece({
|
|
|
9167
8934
|
onClick,
|
|
9168
8935
|
className
|
|
9169
8936
|
}) {
|
|
9170
|
-
return /* @__PURE__ */
|
|
8937
|
+
return /* @__PURE__ */ jsx38(
|
|
9171
8938
|
"g",
|
|
9172
8939
|
{
|
|
9173
8940
|
onClick,
|
|
@@ -9176,7 +8943,7 @@ function DefaultNetworkPiece({
|
|
|
9176
8943
|
role: onClick ? "button" : void 0,
|
|
9177
8944
|
tabIndex: onClick ? 0 : void 0,
|
|
9178
8945
|
"aria-label": onClick ? "Network piece" : void 0,
|
|
9179
|
-
children: shape === "square" ? /* @__PURE__ */
|
|
8946
|
+
children: shape === "square" ? /* @__PURE__ */ jsx38(
|
|
9180
8947
|
"rect",
|
|
9181
8948
|
{
|
|
9182
8949
|
x: -radius,
|
|
@@ -9187,7 +8954,7 @@ function DefaultNetworkPiece({
|
|
|
9187
8954
|
stroke: "white",
|
|
9188
8955
|
strokeWidth: 1.5
|
|
9189
8956
|
}
|
|
9190
|
-
) : /* @__PURE__ */
|
|
8957
|
+
) : /* @__PURE__ */ jsx38("circle", { r: radius, fill: color, stroke: "white", strokeWidth: 1.5 })
|
|
9191
8958
|
}
|
|
9192
8959
|
);
|
|
9193
8960
|
}
|
|
@@ -9254,7 +9021,7 @@ function NetworkGraph({
|
|
|
9254
9021
|
const viewBoxX = viewBoxParts[0] ?? 0;
|
|
9255
9022
|
const viewBoxY = viewBoxParts[1] ?? 0;
|
|
9256
9023
|
const viewBoxHeight = viewBoxParts[3] ?? 0;
|
|
9257
|
-
return /* @__PURE__ */
|
|
9024
|
+
return /* @__PURE__ */ jsxs21(
|
|
9258
9025
|
"svg",
|
|
9259
9026
|
{
|
|
9260
9027
|
width,
|
|
@@ -9271,11 +9038,11 @@ function NetworkGraph({
|
|
|
9271
9038
|
role: "img",
|
|
9272
9039
|
"aria-label": "Network graph",
|
|
9273
9040
|
children: [
|
|
9274
|
-
/* @__PURE__ */
|
|
9041
|
+
/* @__PURE__ */ jsx38("g", { className: "network-edges", role: "list", "aria-label": "Network connections", children: edges.map((edge) => {
|
|
9275
9042
|
const fromNode = nodeMap[edge.from];
|
|
9276
9043
|
const toNode = nodeMap[edge.to];
|
|
9277
9044
|
if (!fromNode || !toNode) return null;
|
|
9278
|
-
return /* @__PURE__ */
|
|
9045
|
+
return /* @__PURE__ */ jsx38(
|
|
9279
9046
|
"g",
|
|
9280
9047
|
{
|
|
9281
9048
|
role: "listitem",
|
|
@@ -9285,9 +9052,9 @@ function NetworkGraph({
|
|
|
9285
9052
|
edge.id
|
|
9286
9053
|
);
|
|
9287
9054
|
}) }),
|
|
9288
|
-
/* @__PURE__ */
|
|
9055
|
+
/* @__PURE__ */ jsx38("g", { className: "network-nodes", role: "list", "aria-label": "Network nodes", children: nodes.map((node) => {
|
|
9289
9056
|
const nodePieces = piecesByNode[node.id] ?? [];
|
|
9290
|
-
return /* @__PURE__ */
|
|
9057
|
+
return /* @__PURE__ */ jsxs21(
|
|
9291
9058
|
"g",
|
|
9292
9059
|
{
|
|
9293
9060
|
transform: `translate(${node.position.x}, ${node.position.y})`,
|
|
@@ -9295,11 +9062,11 @@ function NetworkGraph({
|
|
|
9295
9062
|
"aria-label": node.label ?? node.id,
|
|
9296
9063
|
children: [
|
|
9297
9064
|
renderNode(node, nodePieces),
|
|
9298
|
-
nodePieces.length > 0 && /* @__PURE__ */
|
|
9065
|
+
nodePieces.length > 0 && /* @__PURE__ */ jsx38("g", { className: "node-pieces", children: nodePieces.map((piece, i) => {
|
|
9299
9066
|
const angle = i / nodePieces.length * 2 * Math.PI - Math.PI / 2;
|
|
9300
9067
|
const pieceX = Math.cos(angle) * (nodeRadius + 8);
|
|
9301
9068
|
const pieceY = Math.sin(angle) * (nodeRadius + 8);
|
|
9302
|
-
return /* @__PURE__ */
|
|
9069
|
+
return /* @__PURE__ */ jsx38(
|
|
9303
9070
|
"g",
|
|
9304
9071
|
{
|
|
9305
9072
|
transform: `translate(${pieceX}, ${pieceY})`,
|
|
@@ -9313,12 +9080,12 @@ function NetworkGraph({
|
|
|
9313
9080
|
node.id
|
|
9314
9081
|
);
|
|
9315
9082
|
}) }),
|
|
9316
|
-
enablePanZoom && transform.zoom !== 1 && /* @__PURE__ */
|
|
9083
|
+
enablePanZoom && transform.zoom !== 1 && /* @__PURE__ */ jsxs21(
|
|
9317
9084
|
"g",
|
|
9318
9085
|
{
|
|
9319
9086
|
transform: `translate(${viewBoxX + 10}, ${viewBoxY + viewBoxHeight - 30})`,
|
|
9320
9087
|
children: [
|
|
9321
|
-
/* @__PURE__ */
|
|
9088
|
+
/* @__PURE__ */ jsx38(
|
|
9322
9089
|
"rect",
|
|
9323
9090
|
{
|
|
9324
9091
|
x: 0,
|
|
@@ -9329,7 +9096,7 @@ function NetworkGraph({
|
|
|
9329
9096
|
fill: "rgba(0,0,0,0.6)"
|
|
9330
9097
|
}
|
|
9331
9098
|
),
|
|
9332
|
-
/* @__PURE__ */
|
|
9099
|
+
/* @__PURE__ */ jsxs21("text", { x: 30, y: 14, textAnchor: "middle", fill: "white", fontSize: 12, children: [
|
|
9333
9100
|
Math.round(transform.zoom * 100),
|
|
9334
9101
|
"%"
|
|
9335
9102
|
] })
|
|
@@ -9344,7 +9111,7 @@ function NetworkGraph({
|
|
|
9344
9111
|
// src/ui/components/board/ZoneMap.tsx
|
|
9345
9112
|
import { useMemo as useMemo12 } from "react";
|
|
9346
9113
|
import { clsx as clsx17 } from "clsx";
|
|
9347
|
-
import { jsx as
|
|
9114
|
+
import { jsx as jsx39, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
9348
9115
|
var HIGHLIGHT_COLORS = {
|
|
9349
9116
|
valid: "rgba(34, 197, 94, 0.4)",
|
|
9350
9117
|
// Green
|
|
@@ -9397,7 +9164,7 @@ function DefaultZone({
|
|
|
9397
9164
|
switch (zone.shape.type) {
|
|
9398
9165
|
case "polygon":
|
|
9399
9166
|
if (!zone.shape.points) return null;
|
|
9400
|
-
return /* @__PURE__ */
|
|
9167
|
+
return /* @__PURE__ */ jsx39(
|
|
9401
9168
|
"polygon",
|
|
9402
9169
|
{
|
|
9403
9170
|
points: zone.shape.points.map((p) => `${p.x},${p.y}`).join(" "),
|
|
@@ -9408,7 +9175,7 @@ function DefaultZone({
|
|
|
9408
9175
|
);
|
|
9409
9176
|
case "path":
|
|
9410
9177
|
if (!zone.shape.path) return null;
|
|
9411
|
-
return /* @__PURE__ */
|
|
9178
|
+
return /* @__PURE__ */ jsx39(
|
|
9412
9179
|
"path",
|
|
9413
9180
|
{
|
|
9414
9181
|
d: zone.shape.path,
|
|
@@ -9419,7 +9186,7 @@ function DefaultZone({
|
|
|
9419
9186
|
);
|
|
9420
9187
|
case "circle":
|
|
9421
9188
|
if (!zone.shape.center) return null;
|
|
9422
|
-
return /* @__PURE__ */
|
|
9189
|
+
return /* @__PURE__ */ jsx39(
|
|
9423
9190
|
"circle",
|
|
9424
9191
|
{
|
|
9425
9192
|
cx: zone.shape.center.x,
|
|
@@ -9434,7 +9201,7 @@ function DefaultZone({
|
|
|
9434
9201
|
return null;
|
|
9435
9202
|
}
|
|
9436
9203
|
};
|
|
9437
|
-
return /* @__PURE__ */
|
|
9204
|
+
return /* @__PURE__ */ jsxs22(
|
|
9438
9205
|
"g",
|
|
9439
9206
|
{
|
|
9440
9207
|
onClick,
|
|
@@ -9447,7 +9214,7 @@ function DefaultZone({
|
|
|
9447
9214
|
tabIndex: onClick ? 0 : void 0,
|
|
9448
9215
|
children: [
|
|
9449
9216
|
renderShape(),
|
|
9450
|
-
showLabel && zone.shape?.center && /* @__PURE__ */
|
|
9217
|
+
showLabel && zone.shape?.center && /* @__PURE__ */ jsx39(
|
|
9451
9218
|
"text",
|
|
9452
9219
|
{
|
|
9453
9220
|
x: zone.shape.center.x,
|
|
@@ -9461,7 +9228,7 @@ function DefaultZone({
|
|
|
9461
9228
|
children: zone.name
|
|
9462
9229
|
}
|
|
9463
9230
|
),
|
|
9464
|
-
showValue && zone.value !== void 0 && zone.shape?.center && /* @__PURE__ */
|
|
9231
|
+
showValue && zone.value !== void 0 && zone.shape?.center && /* @__PURE__ */ jsxs22(
|
|
9465
9232
|
"text",
|
|
9466
9233
|
{
|
|
9467
9234
|
x: zone.shape.center.x,
|
|
@@ -9507,19 +9274,19 @@ function DefaultZonePieces({
|
|
|
9507
9274
|
});
|
|
9508
9275
|
const owners = Object.keys(piecesByOwner);
|
|
9509
9276
|
const startOffset = -((owners.length - 1) * spacing) / 2;
|
|
9510
|
-
return /* @__PURE__ */
|
|
9277
|
+
return /* @__PURE__ */ jsx39("g", { className: clsx17("zone-pieces", className), children: owners.map((owner, i) => {
|
|
9511
9278
|
const ownerPieces = piecesByOwner[owner] || [];
|
|
9512
9279
|
const totalCount = ownerPieces.reduce(
|
|
9513
9280
|
(sum, p) => sum + (p.count || 1),
|
|
9514
9281
|
0
|
|
9515
9282
|
);
|
|
9516
9283
|
const offsetX = startOffset + i * spacing;
|
|
9517
|
-
return /* @__PURE__ */
|
|
9284
|
+
return /* @__PURE__ */ jsxs22(
|
|
9518
9285
|
"g",
|
|
9519
9286
|
{
|
|
9520
9287
|
transform: `translate(${centerX + offsetX}, ${centerY + yOffset})`,
|
|
9521
9288
|
children: [
|
|
9522
|
-
/* @__PURE__ */
|
|
9289
|
+
/* @__PURE__ */ jsx39(
|
|
9523
9290
|
"circle",
|
|
9524
9291
|
{
|
|
9525
9292
|
r: radius,
|
|
@@ -9528,7 +9295,7 @@ function DefaultZonePieces({
|
|
|
9528
9295
|
strokeWidth: 2
|
|
9529
9296
|
}
|
|
9530
9297
|
),
|
|
9531
|
-
/* @__PURE__ */
|
|
9298
|
+
/* @__PURE__ */ jsx39(
|
|
9532
9299
|
"text",
|
|
9533
9300
|
{
|
|
9534
9301
|
textAnchor: "middle",
|
|
@@ -9555,7 +9322,7 @@ function DefaultZonePiece({
|
|
|
9555
9322
|
className
|
|
9556
9323
|
}) {
|
|
9557
9324
|
const count = piece.count || 1;
|
|
9558
|
-
return /* @__PURE__ */
|
|
9325
|
+
return /* @__PURE__ */ jsxs22(
|
|
9559
9326
|
"g",
|
|
9560
9327
|
{
|
|
9561
9328
|
transform: `translate(${x}, ${y})`,
|
|
@@ -9569,8 +9336,8 @@ function DefaultZonePiece({
|
|
|
9569
9336
|
tabIndex: onClick ? 0 : void 0,
|
|
9570
9337
|
"aria-label": `Piece ${piece.id}`,
|
|
9571
9338
|
children: [
|
|
9572
|
-
/* @__PURE__ */
|
|
9573
|
-
/* @__PURE__ */
|
|
9339
|
+
/* @__PURE__ */ jsx39("circle", { r: radius, fill: color, stroke: "white", strokeWidth: 2 }),
|
|
9340
|
+
/* @__PURE__ */ jsx39(
|
|
9574
9341
|
"text",
|
|
9575
9342
|
{
|
|
9576
9343
|
textAnchor: "middle",
|
|
@@ -9623,7 +9390,7 @@ function ZoneMap({
|
|
|
9623
9390
|
const viewBoxHeight = baseHeight / transform.zoom;
|
|
9624
9391
|
const viewBoxX = (baseWidth - viewBoxWidth) / 2 - transform.pan.x;
|
|
9625
9392
|
const viewBoxY = (baseHeight - viewBoxHeight) / 2 - transform.pan.y;
|
|
9626
|
-
return /* @__PURE__ */
|
|
9393
|
+
return /* @__PURE__ */ jsxs22(
|
|
9627
9394
|
"svg",
|
|
9628
9395
|
{
|
|
9629
9396
|
width,
|
|
@@ -9640,17 +9407,17 @@ function ZoneMap({
|
|
|
9640
9407
|
role: "img",
|
|
9641
9408
|
"aria-label": "Zone map",
|
|
9642
9409
|
children: [
|
|
9643
|
-
backgroundImage && /* @__PURE__ */
|
|
9644
|
-
/* @__PURE__ */
|
|
9410
|
+
backgroundImage && /* @__PURE__ */ jsx39("image", { href: backgroundImage, width, height }),
|
|
9411
|
+
/* @__PURE__ */ jsx39("g", { className: "zones", role: "list", "aria-label": "Map zones", children: zones.map((zone) => {
|
|
9645
9412
|
const zonePieces = piecesByZone[zone.id] || [];
|
|
9646
|
-
return /* @__PURE__ */
|
|
9413
|
+
return /* @__PURE__ */ jsx39("g", { children: renderZone(zone, zonePieces) }, zone.id);
|
|
9647
9414
|
}) }),
|
|
9648
|
-
enablePanZoom && transform.zoom !== 1 && /* @__PURE__ */
|
|
9415
|
+
enablePanZoom && transform.zoom !== 1 && /* @__PURE__ */ jsxs22(
|
|
9649
9416
|
"g",
|
|
9650
9417
|
{
|
|
9651
9418
|
transform: `translate(${viewBoxX + 10}, ${viewBoxY + viewBoxHeight - 30})`,
|
|
9652
9419
|
children: [
|
|
9653
|
-
/* @__PURE__ */
|
|
9420
|
+
/* @__PURE__ */ jsx39(
|
|
9654
9421
|
"rect",
|
|
9655
9422
|
{
|
|
9656
9423
|
x: 0,
|
|
@@ -9661,7 +9428,7 @@ function ZoneMap({
|
|
|
9661
9428
|
fill: "rgba(0,0,0,0.6)"
|
|
9662
9429
|
}
|
|
9663
9430
|
),
|
|
9664
|
-
/* @__PURE__ */
|
|
9431
|
+
/* @__PURE__ */ jsxs22("text", { x: 30, y: 14, textAnchor: "middle", fill: "white", fontSize: 12, children: [
|
|
9665
9432
|
Math.round(transform.zoom * 100),
|
|
9666
9433
|
"%"
|
|
9667
9434
|
] })
|
|
@@ -9676,7 +9443,7 @@ function ZoneMap({
|
|
|
9676
9443
|
// src/ui/components/board/TrackBoard.tsx
|
|
9677
9444
|
import { useMemo as useMemo13 } from "react";
|
|
9678
9445
|
import { clsx as clsx18 } from "clsx";
|
|
9679
|
-
import { jsx as
|
|
9446
|
+
import { jsx as jsx40, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
9680
9447
|
function DefaultTrackSpace({
|
|
9681
9448
|
space,
|
|
9682
9449
|
size = 50,
|
|
@@ -9695,7 +9462,7 @@ function DefaultTrackSpace({
|
|
|
9695
9462
|
const computedFill = isHighlighted ? "rgba(59, 130, 246, 0.3)" : fill;
|
|
9696
9463
|
const computedStroke = isSelected ? "#3b82f6" : isHighlighted ? "#60a5fa" : stroke;
|
|
9697
9464
|
const computedStrokeWidth = isHighlighted || isSelected ? 3 : strokeWidth;
|
|
9698
|
-
return /* @__PURE__ */
|
|
9465
|
+
return /* @__PURE__ */ jsxs23(
|
|
9699
9466
|
"g",
|
|
9700
9467
|
{
|
|
9701
9468
|
onClick,
|
|
@@ -9707,7 +9474,7 @@ function DefaultTrackSpace({
|
|
|
9707
9474
|
"aria-label": space.name || `Space ${space.index}`,
|
|
9708
9475
|
tabIndex: onClick ? 0 : void 0,
|
|
9709
9476
|
children: [
|
|
9710
|
-
/* @__PURE__ */
|
|
9477
|
+
/* @__PURE__ */ jsx40(
|
|
9711
9478
|
"rect",
|
|
9712
9479
|
{
|
|
9713
9480
|
x: -halfSize,
|
|
@@ -9720,7 +9487,7 @@ function DefaultTrackSpace({
|
|
|
9720
9487
|
strokeWidth: computedStrokeWidth
|
|
9721
9488
|
}
|
|
9722
9489
|
),
|
|
9723
|
-
space.name ? /* @__PURE__ */
|
|
9490
|
+
space.name ? /* @__PURE__ */ jsx40(
|
|
9724
9491
|
"text",
|
|
9725
9492
|
{
|
|
9726
9493
|
textAnchor: "middle",
|
|
@@ -9730,7 +9497,7 @@ function DefaultTrackSpace({
|
|
|
9730
9497
|
fontWeight: "bold",
|
|
9731
9498
|
children: space.name.length > 8 ? space.name.slice(0, 7) + "\u2026" : space.name
|
|
9732
9499
|
}
|
|
9733
|
-
) : /* @__PURE__ */
|
|
9500
|
+
) : /* @__PURE__ */ jsx40(
|
|
9734
9501
|
"text",
|
|
9735
9502
|
{
|
|
9736
9503
|
textAnchor: "middle",
|
|
@@ -9741,9 +9508,9 @@ function DefaultTrackSpace({
|
|
|
9741
9508
|
children: space.index
|
|
9742
9509
|
}
|
|
9743
9510
|
),
|
|
9744
|
-
showJumpIndicator && space.jumpTo && /* @__PURE__ */
|
|
9745
|
-
/* @__PURE__ */
|
|
9746
|
-
/* @__PURE__ */
|
|
9511
|
+
showJumpIndicator && space.jumpTo && /* @__PURE__ */ jsxs23("g", { transform: `translate(${halfSize - 6}, ${-halfSize + 6})`, children: [
|
|
9512
|
+
/* @__PURE__ */ jsx40("circle", { r: 6, fill: "#fbbf24" }),
|
|
9513
|
+
/* @__PURE__ */ jsx40(
|
|
9747
9514
|
"text",
|
|
9748
9515
|
{
|
|
9749
9516
|
textAnchor: "middle",
|
|
@@ -9774,7 +9541,7 @@ function DefaultTrackPiece({
|
|
|
9774
9541
|
const offset = total > 1 ? spacing : 0;
|
|
9775
9542
|
const px = Math.cos(angle) * offset;
|
|
9776
9543
|
const py = Math.sin(angle) * offset;
|
|
9777
|
-
return /* @__PURE__ */
|
|
9544
|
+
return /* @__PURE__ */ jsx40(
|
|
9778
9545
|
"circle",
|
|
9779
9546
|
{
|
|
9780
9547
|
cx: px,
|
|
@@ -9802,7 +9569,7 @@ function DefaultTrackConnection({
|
|
|
9802
9569
|
strokeWidth = 2,
|
|
9803
9570
|
className
|
|
9804
9571
|
}) {
|
|
9805
|
-
return /* @__PURE__ */
|
|
9572
|
+
return /* @__PURE__ */ jsx40(
|
|
9806
9573
|
"line",
|
|
9807
9574
|
{
|
|
9808
9575
|
x1: from.x,
|
|
@@ -9837,8 +9604,8 @@ function DefaultTrackJump({
|
|
|
9837
9604
|
const endX = to.x - unitX * (spaceSize / 2 + 5);
|
|
9838
9605
|
const endY = to.y - unitY * (spaceSize / 2 + 5);
|
|
9839
9606
|
const markerId = `arrow-${isUp ? "up" : "down"}-${from.x}-${from.y}`;
|
|
9840
|
-
return /* @__PURE__ */
|
|
9841
|
-
/* @__PURE__ */
|
|
9607
|
+
return /* @__PURE__ */ jsxs23("g", { className, children: [
|
|
9608
|
+
/* @__PURE__ */ jsx40("defs", { children: /* @__PURE__ */ jsx40(
|
|
9842
9609
|
"marker",
|
|
9843
9610
|
{
|
|
9844
9611
|
id: markerId,
|
|
@@ -9847,10 +9614,10 @@ function DefaultTrackJump({
|
|
|
9847
9614
|
refX: "9",
|
|
9848
9615
|
refY: "3.5",
|
|
9849
9616
|
orient: "auto",
|
|
9850
|
-
children: /* @__PURE__ */
|
|
9617
|
+
children: /* @__PURE__ */ jsx40("polygon", { points: "0 0, 10 3.5, 0 7", fill: color })
|
|
9851
9618
|
}
|
|
9852
9619
|
) }),
|
|
9853
|
-
/* @__PURE__ */
|
|
9620
|
+
/* @__PURE__ */ jsx40(
|
|
9854
9621
|
"line",
|
|
9855
9622
|
{
|
|
9856
9623
|
x1: startX,
|
|
@@ -9914,7 +9681,7 @@ function TrackBoard({
|
|
|
9914
9681
|
return nextSpaceIds.map((nextId) => {
|
|
9915
9682
|
const targetSpace = spaceMap.get(nextId);
|
|
9916
9683
|
if (!targetSpace) return null;
|
|
9917
|
-
return /* @__PURE__ */
|
|
9684
|
+
return /* @__PURE__ */ jsx40("g", { children: renderConnection(
|
|
9918
9685
|
space.position,
|
|
9919
9686
|
targetSpace.position,
|
|
9920
9687
|
space,
|
|
@@ -9931,7 +9698,7 @@ function TrackBoard({
|
|
|
9931
9698
|
if (!targetSpace) return [];
|
|
9932
9699
|
const isUp = targetSpace.index > space.index;
|
|
9933
9700
|
return [
|
|
9934
|
-
/* @__PURE__ */
|
|
9701
|
+
/* @__PURE__ */ jsx40("g", { children: renderJump(
|
|
9935
9702
|
space.position,
|
|
9936
9703
|
targetSpace.position,
|
|
9937
9704
|
space,
|
|
@@ -9947,7 +9714,7 @@ function TrackBoard({
|
|
|
9947
9714
|
const viewBoxHeight = baseHeight / transform.zoom;
|
|
9948
9715
|
const viewBoxX = (baseWidth - viewBoxWidth) / 2 - transform.pan.x;
|
|
9949
9716
|
const viewBoxY = (baseHeight - viewBoxHeight) / 2 - transform.pan.y;
|
|
9950
|
-
return /* @__PURE__ */
|
|
9717
|
+
return /* @__PURE__ */ jsxs23(
|
|
9951
9718
|
"svg",
|
|
9952
9719
|
{
|
|
9953
9720
|
width,
|
|
@@ -9964,11 +9731,11 @@ function TrackBoard({
|
|
|
9964
9731
|
role: "img",
|
|
9965
9732
|
"aria-label": "Track board",
|
|
9966
9733
|
children: [
|
|
9967
|
-
/* @__PURE__ */
|
|
9968
|
-
/* @__PURE__ */
|
|
9969
|
-
/* @__PURE__ */
|
|
9734
|
+
/* @__PURE__ */ jsx40("g", { className: "track-connections", children: renderConnections() }),
|
|
9735
|
+
/* @__PURE__ */ jsx40("g", { className: "track-jumps", children: renderJumps() }),
|
|
9736
|
+
/* @__PURE__ */ jsx40("g", { className: "track-spaces", role: "list", "aria-label": "Track spaces", children: spaces.map((space) => {
|
|
9970
9737
|
const spacePieces = piecesBySpace[space.id] || [];
|
|
9971
|
-
return /* @__PURE__ */
|
|
9738
|
+
return /* @__PURE__ */ jsx40(
|
|
9972
9739
|
"g",
|
|
9973
9740
|
{
|
|
9974
9741
|
transform: `translate(${space.position.x}, ${space.position.y})`,
|
|
@@ -9977,12 +9744,12 @@ function TrackBoard({
|
|
|
9977
9744
|
space.id
|
|
9978
9745
|
);
|
|
9979
9746
|
}) }),
|
|
9980
|
-
enablePanZoom && transform.zoom !== 1 && /* @__PURE__ */
|
|
9747
|
+
enablePanZoom && transform.zoom !== 1 && /* @__PURE__ */ jsxs23(
|
|
9981
9748
|
"g",
|
|
9982
9749
|
{
|
|
9983
9750
|
transform: `translate(${viewBoxX + 10}, ${viewBoxY + viewBoxHeight - 30})`,
|
|
9984
9751
|
children: [
|
|
9985
|
-
/* @__PURE__ */
|
|
9752
|
+
/* @__PURE__ */ jsx40(
|
|
9986
9753
|
"rect",
|
|
9987
9754
|
{
|
|
9988
9755
|
x: 0,
|
|
@@ -9993,7 +9760,7 @@ function TrackBoard({
|
|
|
9993
9760
|
fill: "rgba(0,0,0,0.6)"
|
|
9994
9761
|
}
|
|
9995
9762
|
),
|
|
9996
|
-
/* @__PURE__ */
|
|
9763
|
+
/* @__PURE__ */ jsxs23("text", { x: 30, y: 14, textAnchor: "middle", fill: "white", fontSize: 12, children: [
|
|
9997
9764
|
Math.round(transform.zoom * 100),
|
|
9998
9765
|
"%"
|
|
9999
9766
|
] })
|
|
@@ -10009,7 +9776,7 @@ function TrackBoard({
|
|
|
10009
9776
|
import { useMemo as useMemo14 } from "react";
|
|
10010
9777
|
import { clsx as clsx19 } from "clsx";
|
|
10011
9778
|
import { Users, Lock, Gift, Coins } from "lucide-react";
|
|
10012
|
-
import { jsx as
|
|
9779
|
+
import { jsx as jsx41, jsxs as jsxs24 } from "react/jsx-runtime";
|
|
10013
9780
|
var EMPTY_SLOT_OCCUPANTS = [];
|
|
10014
9781
|
function DefaultSlotItem({
|
|
10015
9782
|
name,
|
|
@@ -10033,7 +9800,7 @@ function DefaultSlotItem({
|
|
|
10033
9800
|
const borderColor = isSelected ? theme.semantic.intent.primary.border : isFull ? theme.semantic.border.strong : isAvailable ? theme.semantic.border.default : theme.semantic.border.subtle;
|
|
10034
9801
|
const background = isSelected ? theme.semantic.intent.primary.soft : isFull ? theme.semantic.surface.inset : theme.semantic.surface.card;
|
|
10035
9802
|
const ringColor = isSelected ? theme.semantic.intent.primary.border : isHighlighted ? theme.semantic.intent.warning.border : void 0;
|
|
10036
|
-
return /* @__PURE__ */
|
|
9803
|
+
return /* @__PURE__ */ jsxs24(
|
|
10037
9804
|
"div",
|
|
10038
9805
|
{
|
|
10039
9806
|
onClick: isAvailable ? onClick : void 0,
|
|
@@ -10055,9 +9822,9 @@ function DefaultSlotItem({
|
|
|
10055
9822
|
"aria-disabled": !isAvailable,
|
|
10056
9823
|
tabIndex: isAvailable && onClick ? 0 : void 0,
|
|
10057
9824
|
children: [
|
|
10058
|
-
/* @__PURE__ */
|
|
10059
|
-
/* @__PURE__ */
|
|
10060
|
-
/* @__PURE__ */
|
|
9825
|
+
/* @__PURE__ */ jsxs24("div", { className: "flex items-start justify-between gap-2", children: [
|
|
9826
|
+
/* @__PURE__ */ jsxs24("div", { children: [
|
|
9827
|
+
/* @__PURE__ */ jsx41(
|
|
10061
9828
|
"h3",
|
|
10062
9829
|
{
|
|
10063
9830
|
className: "font-bold",
|
|
@@ -10065,7 +9832,7 @@ function DefaultSlotItem({
|
|
|
10065
9832
|
children: name
|
|
10066
9833
|
}
|
|
10067
9834
|
),
|
|
10068
|
-
description && /* @__PURE__ */
|
|
9835
|
+
description && /* @__PURE__ */ jsx41(
|
|
10069
9836
|
"p",
|
|
10070
9837
|
{
|
|
10071
9838
|
className: "text-xs mt-0.5",
|
|
@@ -10074,8 +9841,8 @@ function DefaultSlotItem({
|
|
|
10074
9841
|
}
|
|
10075
9842
|
)
|
|
10076
9843
|
] }),
|
|
10077
|
-
/* @__PURE__ */
|
|
10078
|
-
isExclusive && /* @__PURE__ */
|
|
9844
|
+
/* @__PURE__ */ jsxs24("div", { className: "flex items-center gap-1", children: [
|
|
9845
|
+
isExclusive && /* @__PURE__ */ jsx41(
|
|
10079
9846
|
Lock,
|
|
10080
9847
|
{
|
|
10081
9848
|
className: "w-4 h-4",
|
|
@@ -10083,46 +9850,46 @@ function DefaultSlotItem({
|
|
|
10083
9850
|
"aria-label": "Exclusive slot"
|
|
10084
9851
|
}
|
|
10085
9852
|
),
|
|
10086
|
-
capacity > 1 && /* @__PURE__ */
|
|
9853
|
+
capacity > 1 && /* @__PURE__ */ jsxs24(
|
|
10087
9854
|
"div",
|
|
10088
9855
|
{
|
|
10089
9856
|
className: "flex items-center gap-0.5 text-xs",
|
|
10090
9857
|
style: { color: theme.semantic.text.muted },
|
|
10091
9858
|
title: `Capacity: ${capacity}`,
|
|
10092
9859
|
children: [
|
|
10093
|
-
/* @__PURE__ */
|
|
10094
|
-
/* @__PURE__ */
|
|
9860
|
+
/* @__PURE__ */ jsx41(Users, { className: "w-3 h-3" }),
|
|
9861
|
+
/* @__PURE__ */ jsx41("span", { children: capacity })
|
|
10095
9862
|
]
|
|
10096
9863
|
}
|
|
10097
9864
|
)
|
|
10098
9865
|
] })
|
|
10099
9866
|
] }),
|
|
10100
|
-
(costLabel || rewardLabel) && /* @__PURE__ */
|
|
10101
|
-
costLabel && /* @__PURE__ */
|
|
9867
|
+
(costLabel || rewardLabel) && /* @__PURE__ */ jsxs24("div", { className: "mt-2 flex flex-wrap gap-2 text-xs", children: [
|
|
9868
|
+
costLabel && /* @__PURE__ */ jsxs24(
|
|
10102
9869
|
"div",
|
|
10103
9870
|
{
|
|
10104
9871
|
className: "flex items-center gap-1",
|
|
10105
9872
|
style: { color: theme.semantic.intent.danger.solid },
|
|
10106
9873
|
children: [
|
|
10107
|
-
/* @__PURE__ */
|
|
10108
|
-
/* @__PURE__ */
|
|
9874
|
+
/* @__PURE__ */ jsx41(Coins, { className: "w-3 h-3", "aria-hidden": "true" }),
|
|
9875
|
+
/* @__PURE__ */ jsx41("span", { children: costLabel })
|
|
10109
9876
|
]
|
|
10110
9877
|
}
|
|
10111
9878
|
),
|
|
10112
|
-
rewardLabel && /* @__PURE__ */
|
|
9879
|
+
rewardLabel && /* @__PURE__ */ jsxs24(
|
|
10113
9880
|
"div",
|
|
10114
9881
|
{
|
|
10115
9882
|
className: "flex items-center gap-1",
|
|
10116
9883
|
style: { color: theme.semantic.intent.success.solid },
|
|
10117
9884
|
children: [
|
|
10118
|
-
/* @__PURE__ */
|
|
10119
|
-
/* @__PURE__ */
|
|
9885
|
+
/* @__PURE__ */ jsx41(Gift, { className: "w-3 h-3", "aria-hidden": "true" }),
|
|
9886
|
+
/* @__PURE__ */ jsx41("span", { children: rewardLabel })
|
|
10120
9887
|
]
|
|
10121
9888
|
}
|
|
10122
9889
|
)
|
|
10123
9890
|
] }),
|
|
10124
|
-
renderOccupants && /* @__PURE__ */
|
|
10125
|
-
!isAvailable && !isFull && /* @__PURE__ */
|
|
9891
|
+
renderOccupants && /* @__PURE__ */ jsx41("div", { className: "mt-2", children: renderOccupants() }),
|
|
9892
|
+
!isAvailable && !isFull && /* @__PURE__ */ jsx41(
|
|
10126
9893
|
"div",
|
|
10127
9894
|
{
|
|
10128
9895
|
className: "mt-2 text-xs",
|
|
@@ -10142,7 +9909,7 @@ function DefaultSlotOccupant({
|
|
|
10142
9909
|
onClick,
|
|
10143
9910
|
className
|
|
10144
9911
|
}) {
|
|
10145
|
-
return /* @__PURE__ */
|
|
9912
|
+
return /* @__PURE__ */ jsx41(
|
|
10146
9913
|
"div",
|
|
10147
9914
|
{
|
|
10148
9915
|
onClick,
|
|
@@ -10170,7 +9937,7 @@ function DefaultEmptySlot({
|
|
|
10170
9937
|
className
|
|
10171
9938
|
}) {
|
|
10172
9939
|
const theme = useTheme();
|
|
10173
|
-
return /* @__PURE__ */
|
|
9940
|
+
return /* @__PURE__ */ jsx41(
|
|
10174
9941
|
"div",
|
|
10175
9942
|
{
|
|
10176
9943
|
className: clsx19("rounded-full border-2 border-dashed", className),
|
|
@@ -10225,18 +9992,18 @@ function SlotSystem({
|
|
|
10225
9992
|
}, [slots, layout]);
|
|
10226
9993
|
const renderSlotItem = (slot) => {
|
|
10227
9994
|
const slotOccupants = occupantsBySlot[slot.id] ?? [];
|
|
10228
|
-
return /* @__PURE__ */
|
|
9995
|
+
return /* @__PURE__ */ jsx41("div", { role: "listitem", "aria-label": slot.name, children: renderSlot(slot, slotOccupants) }, slot.id);
|
|
10229
9996
|
};
|
|
10230
9997
|
const responsiveGridStyle = {
|
|
10231
9998
|
display: "grid",
|
|
10232
9999
|
gridTemplateColumns: `repeat(auto-fit, minmax(${minSlotWidth}px, 1fr))`,
|
|
10233
10000
|
gap: "1rem"
|
|
10234
10001
|
};
|
|
10235
|
-
const wrapContent = (content) => /* @__PURE__ */
|
|
10002
|
+
const wrapContent = (content) => /* @__PURE__ */ jsx41("div", { style: { width, height }, className: clsx19("slot-system", className), children: content });
|
|
10236
10003
|
if (layout === "grouped" && slotGroups) {
|
|
10237
10004
|
return wrapContent(
|
|
10238
|
-
/* @__PURE__ */
|
|
10239
|
-
/* @__PURE__ */
|
|
10005
|
+
/* @__PURE__ */ jsx41("div", { className: "space-y-6", role: "list", children: Object.entries(slotGroups).map(([groupName, groupSlots]) => /* @__PURE__ */ jsxs24("div", { children: [
|
|
10006
|
+
/* @__PURE__ */ jsx41(
|
|
10240
10007
|
"h3",
|
|
10241
10008
|
{
|
|
10242
10009
|
className: "text-lg font-semibold mb-3",
|
|
@@ -10244,17 +10011,17 @@ function SlotSystem({
|
|
|
10244
10011
|
children: groupName
|
|
10245
10012
|
}
|
|
10246
10013
|
),
|
|
10247
|
-
/* @__PURE__ */
|
|
10014
|
+
/* @__PURE__ */ jsx41("div", { style: responsiveGridStyle, children: groupSlots.map(renderSlotItem) })
|
|
10248
10015
|
] }, groupName)) })
|
|
10249
10016
|
);
|
|
10250
10017
|
}
|
|
10251
10018
|
if (layout === "list") {
|
|
10252
10019
|
return wrapContent(
|
|
10253
|
-
/* @__PURE__ */
|
|
10020
|
+
/* @__PURE__ */ jsx41("div", { className: "flex flex-col gap-2", role: "list", children: slots.map(renderSlotItem) })
|
|
10254
10021
|
);
|
|
10255
10022
|
}
|
|
10256
10023
|
return wrapContent(
|
|
10257
|
-
/* @__PURE__ */
|
|
10024
|
+
/* @__PURE__ */ jsx41("div", { style: responsiveGridStyle, role: "list", children: slots.map(renderSlotItem) })
|
|
10258
10025
|
);
|
|
10259
10026
|
}
|
|
10260
10027
|
|
|
@@ -10376,7 +10143,7 @@ function isInteractiveTargetSelectable(layer, state) {
|
|
|
10376
10143
|
}
|
|
10377
10144
|
|
|
10378
10145
|
// src/ui/components/board/tiled-grid/interactive-layer.tsx
|
|
10379
|
-
import { jsx as
|
|
10146
|
+
import { jsx as jsx42 } from "react/jsx-runtime";
|
|
10380
10147
|
function InteractiveTargetLayerGroup({
|
|
10381
10148
|
layer,
|
|
10382
10149
|
targets,
|
|
@@ -10384,7 +10151,6 @@ function InteractiveTargetLayerGroup({
|
|
|
10384
10151
|
targetKind,
|
|
10385
10152
|
groupClassName,
|
|
10386
10153
|
groupAriaLabel,
|
|
10387
|
-
groupRole,
|
|
10388
10154
|
browserAttributeOrder,
|
|
10389
10155
|
selectMode,
|
|
10390
10156
|
hover,
|
|
@@ -10392,7 +10158,7 @@ function InteractiveTargetLayerGroup({
|
|
|
10392
10158
|
renderTargetContent
|
|
10393
10159
|
}) {
|
|
10394
10160
|
const { hoveredTargetId, setHoveredTargetId } = hover;
|
|
10395
|
-
return /* @__PURE__ */
|
|
10161
|
+
return /* @__PURE__ */ jsx42("g", { className: groupClassName, role: "group", "aria-label": groupAriaLabel, children: targets.map((target) => {
|
|
10396
10162
|
const targetId = getTargetId(target);
|
|
10397
10163
|
const state = interactiveTargetRenderState(
|
|
10398
10164
|
layer,
|
|
@@ -10409,7 +10175,7 @@ function InteractiveTargetLayerGroup({
|
|
|
10409
10175
|
// HexGrid markup variant: browserAttributes spread first, then
|
|
10410
10176
|
// transform, role, className (preserves HexGrid's rendered
|
|
10411
10177
|
// attribute order).
|
|
10412
|
-
/* @__PURE__ */
|
|
10178
|
+
/* @__PURE__ */ jsx42(
|
|
10413
10179
|
"g",
|
|
10414
10180
|
{
|
|
10415
10181
|
...state.browserAttributes,
|
|
@@ -10435,7 +10201,7 @@ function InteractiveTargetLayerGroup({
|
|
|
10435
10201
|
// SquareGrid markup variant: transform first, then browser
|
|
10436
10202
|
// attributes, className, role (preserves SquareGrid's rendered
|
|
10437
10203
|
// attribute order while exposing semantic replay metadata).
|
|
10438
|
-
/* @__PURE__ */
|
|
10204
|
+
/* @__PURE__ */ jsx42(
|
|
10439
10205
|
"g",
|
|
10440
10206
|
{
|
|
10441
10207
|
...getTargetTransform ? { transform: getTargetTransform(target) } : {},
|
|
@@ -10467,7 +10233,7 @@ function resolveBoardProp(props, buildInlineBoard) {
|
|
|
10467
10233
|
}
|
|
10468
10234
|
|
|
10469
10235
|
// src/ui/components/board/SquareGrid.tsx
|
|
10470
|
-
import { Fragment as Fragment6, jsx as
|
|
10236
|
+
import { Fragment as Fragment6, jsx as jsx43, jsxs as jsxs25 } from "react/jsx-runtime";
|
|
10471
10237
|
function DefaultGridCell({
|
|
10472
10238
|
size,
|
|
10473
10239
|
isLight = true,
|
|
@@ -10485,7 +10251,7 @@ function DefaultGridCell({
|
|
|
10485
10251
|
className
|
|
10486
10252
|
}) {
|
|
10487
10253
|
const baseColor = isLight ? lightColor : darkColor;
|
|
10488
|
-
return /* @__PURE__ */
|
|
10254
|
+
return /* @__PURE__ */ jsxs25(
|
|
10489
10255
|
"g",
|
|
10490
10256
|
{
|
|
10491
10257
|
onClick,
|
|
@@ -10501,8 +10267,8 @@ function DefaultGridCell({
|
|
|
10501
10267
|
tabIndex: onClick ? 0 : void 0,
|
|
10502
10268
|
"aria-label": onClick ? "Grid cell" : void 0,
|
|
10503
10269
|
children: [
|
|
10504
|
-
/* @__PURE__ */
|
|
10505
|
-
isSelected && /* @__PURE__ */
|
|
10270
|
+
/* @__PURE__ */ jsx43("rect", { width: size, height: size, fill: baseColor }),
|
|
10271
|
+
isSelected && /* @__PURE__ */ jsx43(
|
|
10506
10272
|
"rect",
|
|
10507
10273
|
{
|
|
10508
10274
|
width: size,
|
|
@@ -10511,7 +10277,7 @@ function DefaultGridCell({
|
|
|
10511
10277
|
pointerEvents: "none"
|
|
10512
10278
|
}
|
|
10513
10279
|
),
|
|
10514
|
-
isHighlighted && !isSelected && /* @__PURE__ */
|
|
10280
|
+
isHighlighted && !isSelected && /* @__PURE__ */ jsx43(
|
|
10515
10281
|
"rect",
|
|
10516
10282
|
{
|
|
10517
10283
|
width: size,
|
|
@@ -10520,7 +10286,7 @@ function DefaultGridCell({
|
|
|
10520
10286
|
pointerEvents: "none"
|
|
10521
10287
|
}
|
|
10522
10288
|
),
|
|
10523
|
-
isValidMove && !isCapture && /* @__PURE__ */
|
|
10289
|
+
isValidMove && !isCapture && /* @__PURE__ */ jsx43(
|
|
10524
10290
|
"circle",
|
|
10525
10291
|
{
|
|
10526
10292
|
cx: size / 2,
|
|
@@ -10530,7 +10296,7 @@ function DefaultGridCell({
|
|
|
10530
10296
|
pointerEvents: "none"
|
|
10531
10297
|
}
|
|
10532
10298
|
),
|
|
10533
|
-
isCapture && /* @__PURE__ */
|
|
10299
|
+
isCapture && /* @__PURE__ */ jsx43(
|
|
10534
10300
|
"circle",
|
|
10535
10301
|
{
|
|
10536
10302
|
cx: size / 2,
|
|
@@ -10558,7 +10324,7 @@ function DefaultGridPiece({
|
|
|
10558
10324
|
}) {
|
|
10559
10325
|
const radius = size * 0.38;
|
|
10560
10326
|
const effectiveStroke = strokeColor ?? (color === "#f8fafc" || color === "#ffffff" ? "#1e293b" : "#f8fafc");
|
|
10561
|
-
return /* @__PURE__ */
|
|
10327
|
+
return /* @__PURE__ */ jsxs25(
|
|
10562
10328
|
"g",
|
|
10563
10329
|
{
|
|
10564
10330
|
onClick,
|
|
@@ -10574,7 +10340,7 @@ function DefaultGridPiece({
|
|
|
10574
10340
|
tabIndex: onClick ? 0 : void 0,
|
|
10575
10341
|
"aria-label": onClick ? label ?? "Grid piece" : void 0,
|
|
10576
10342
|
children: [
|
|
10577
|
-
/* @__PURE__ */
|
|
10343
|
+
/* @__PURE__ */ jsx43(
|
|
10578
10344
|
"circle",
|
|
10579
10345
|
{
|
|
10580
10346
|
r: isDragging ? radius * 1.1 : radius,
|
|
@@ -10584,7 +10350,7 @@ function DefaultGridPiece({
|
|
|
10584
10350
|
style: { filter: "drop-shadow(1px 2px 2px rgba(0,0,0,0.4))" }
|
|
10585
10351
|
}
|
|
10586
10352
|
),
|
|
10587
|
-
label && /* @__PURE__ */
|
|
10353
|
+
label && /* @__PURE__ */ jsx43(
|
|
10588
10354
|
"text",
|
|
10589
10355
|
{
|
|
10590
10356
|
y: 4,
|
|
@@ -10629,7 +10395,7 @@ function DefaultChessPiece({
|
|
|
10629
10395
|
const symbol = CHESS_SYMBOLS[owner]?.[type] ?? "?";
|
|
10630
10396
|
const textColor = owner === "white" ? "#f8fafc" : "#1e293b";
|
|
10631
10397
|
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))";
|
|
10632
|
-
return /* @__PURE__ */
|
|
10398
|
+
return /* @__PURE__ */ jsx43(
|
|
10633
10399
|
"g",
|
|
10634
10400
|
{
|
|
10635
10401
|
onClick,
|
|
@@ -10642,7 +10408,7 @@ function DefaultChessPiece({
|
|
|
10642
10408
|
role: onClick ? "button" : void 0,
|
|
10643
10409
|
tabIndex: onClick ? 0 : void 0,
|
|
10644
10410
|
"aria-label": onClick ? `${owner} ${type}` : void 0,
|
|
10645
|
-
children: /* @__PURE__ */
|
|
10411
|
+
children: /* @__PURE__ */ jsx43(
|
|
10646
10412
|
"text",
|
|
10647
10413
|
{
|
|
10648
10414
|
textAnchor: "middle",
|
|
@@ -10899,7 +10665,7 @@ function SquareGridImpl(props) {
|
|
|
10899
10665
|
bounds: { minX: 0, minY: 0, width: totalWidth, height: totalHeight },
|
|
10900
10666
|
viewBoxMode: "static-when-disabled"
|
|
10901
10667
|
});
|
|
10902
|
-
return /* @__PURE__ */
|
|
10668
|
+
return /* @__PURE__ */ jsxs25(
|
|
10903
10669
|
"svg",
|
|
10904
10670
|
{
|
|
10905
10671
|
width: svgWidth,
|
|
@@ -10913,14 +10679,14 @@ function SquareGridImpl(props) {
|
|
|
10913
10679
|
className
|
|
10914
10680
|
),
|
|
10915
10681
|
...bind(),
|
|
10916
|
-
role: "
|
|
10682
|
+
role: "group",
|
|
10917
10683
|
"aria-label": `${rows}x${cols} game grid`,
|
|
10918
10684
|
children: [
|
|
10919
|
-
/* @__PURE__ */
|
|
10920
|
-
/* @__PURE__ */
|
|
10685
|
+
/* @__PURE__ */ jsx43("defs", { children: /* @__PURE__ */ jsx43("filter", { id: "pieceShadow", x: "-20%", y: "-20%", width: "140%", height: "140%", children: /* @__PURE__ */ jsx43("feDropShadow", { dx: "1", dy: "2", stdDeviation: "2", floodOpacity: "0.4" }) }) }),
|
|
10686
|
+
/* @__PURE__ */ jsx43("g", { className: "cells", role: "list", "aria-label": "Grid cells", children: renderableCells.map(({ row, col }) => {
|
|
10921
10687
|
const x = labelMargin + col * cellSize;
|
|
10922
10688
|
const y = row * cellSize;
|
|
10923
|
-
return /* @__PURE__ */
|
|
10689
|
+
return /* @__PURE__ */ jsx43(
|
|
10924
10690
|
"g",
|
|
10925
10691
|
{
|
|
10926
10692
|
transform: `translate(${x}, ${y})`,
|
|
@@ -10931,7 +10697,7 @@ function SquareGridImpl(props) {
|
|
|
10931
10697
|
`${row}-${col}`
|
|
10932
10698
|
);
|
|
10933
10699
|
}) }),
|
|
10934
|
-
interactiveSpaces && /* @__PURE__ */
|
|
10700
|
+
interactiveSpaces && /* @__PURE__ */ jsx43(
|
|
10935
10701
|
InteractiveTargetLayerGroup,
|
|
10936
10702
|
{
|
|
10937
10703
|
layer: interactiveSpaces,
|
|
@@ -10944,8 +10710,8 @@ function SquareGridImpl(props) {
|
|
|
10944
10710
|
selectMode: "layer-direct",
|
|
10945
10711
|
hover: spaceHover,
|
|
10946
10712
|
getTargetTransform: (space) => `translate(${labelMargin + space.col * cellSize}, ${space.row * cellSize})`,
|
|
10947
|
-
renderTargetContent: (space, state, isSelectable) => /* @__PURE__ */
|
|
10948
|
-
isSelectable && /* @__PURE__ */
|
|
10713
|
+
renderTargetContent: (space, state, isSelectable) => /* @__PURE__ */ jsxs25(Fragment6, { children: [
|
|
10714
|
+
isSelectable && /* @__PURE__ */ jsx43(
|
|
10949
10715
|
"rect",
|
|
10950
10716
|
{
|
|
10951
10717
|
x: 0,
|
|
@@ -10960,8 +10726,8 @@ function SquareGridImpl(props) {
|
|
|
10960
10726
|
] })
|
|
10961
10727
|
}
|
|
10962
10728
|
),
|
|
10963
|
-
renderEdge && resolvedEdgePositions.length > 0 && /* @__PURE__ */
|
|
10964
|
-
interactiveEdges && /* @__PURE__ */
|
|
10729
|
+
renderEdge && resolvedEdgePositions.length > 0 && /* @__PURE__ */ jsx43("g", { className: "edges", "aria-label": "Board edges", children: resolvedEdgePositions.map(({ edge, interactiveEdge }) => /* @__PURE__ */ jsx43("g", { children: renderEdge(edge, interactiveEdge.position) }, edge.id)) }),
|
|
10730
|
+
interactiveEdges && /* @__PURE__ */ jsx43(
|
|
10965
10731
|
InteractiveTargetLayerGroup,
|
|
10966
10732
|
{
|
|
10967
10733
|
layer: interactiveEdges,
|
|
@@ -10973,7 +10739,7 @@ function SquareGridImpl(props) {
|
|
|
10973
10739
|
browserAttributeOrder: "after-transform",
|
|
10974
10740
|
selectMode: "layer-direct",
|
|
10975
10741
|
hover: edgeHover,
|
|
10976
|
-
renderTargetContent: ({ interactiveEdge: edge }, state) => renderInteractiveEdge ? renderInteractiveEdge(edge, edge.position, state) : state.isEnabled && state.isEligible ? /* @__PURE__ */
|
|
10742
|
+
renderTargetContent: ({ interactiveEdge: edge }, state) => renderInteractiveEdge ? renderInteractiveEdge(edge, edge.position, state) : state.isEnabled && state.isEligible ? /* @__PURE__ */ jsx43(
|
|
10977
10743
|
"line",
|
|
10978
10744
|
{
|
|
10979
10745
|
x1: edge.position.x1,
|
|
@@ -10987,8 +10753,8 @@ function SquareGridImpl(props) {
|
|
|
10987
10753
|
) : null
|
|
10988
10754
|
}
|
|
10989
10755
|
),
|
|
10990
|
-
renderVertex && resolvedVertexPositions.length > 0 && /* @__PURE__ */
|
|
10991
|
-
interactiveVertices && /* @__PURE__ */
|
|
10756
|
+
renderVertex && resolvedVertexPositions.length > 0 && /* @__PURE__ */ jsx43("g", { className: "vertices", "aria-label": "Board vertices", children: resolvedVertexPositions.map(({ vertex, interactiveVertex }) => /* @__PURE__ */ jsx43("g", { children: renderVertex(vertex, interactiveVertex.position) }, vertex.id)) }),
|
|
10757
|
+
interactiveVertices && /* @__PURE__ */ jsx43(
|
|
10992
10758
|
InteractiveTargetLayerGroup,
|
|
10993
10759
|
{
|
|
10994
10760
|
layer: interactiveVertices,
|
|
@@ -11000,7 +10766,7 @@ function SquareGridImpl(props) {
|
|
|
11000
10766
|
browserAttributeOrder: "after-transform",
|
|
11001
10767
|
selectMode: "layer-direct",
|
|
11002
10768
|
hover: vertexHover,
|
|
11003
|
-
renderTargetContent: ({ interactiveVertex: vertex }, state) => renderInteractiveVertex ? renderInteractiveVertex(vertex, vertex.position, state) : state.isEnabled && state.isEligible ? /* @__PURE__ */
|
|
10769
|
+
renderTargetContent: ({ interactiveVertex: vertex }, state) => renderInteractiveVertex ? renderInteractiveVertex(vertex, vertex.position, state) : state.isEnabled && state.isEligible ? /* @__PURE__ */ jsx43(
|
|
11004
10770
|
"circle",
|
|
11005
10771
|
{
|
|
11006
10772
|
cx: vertex.position.x,
|
|
@@ -11012,10 +10778,10 @@ function SquareGridImpl(props) {
|
|
|
11012
10778
|
) : null
|
|
11013
10779
|
}
|
|
11014
10780
|
),
|
|
11015
|
-
showCoordinates && coordinateStyle !== "none" && /* @__PURE__ */
|
|
10781
|
+
showCoordinates && coordinateStyle !== "none" && /* @__PURE__ */ jsxs25("g", { className: "coordinates", "aria-hidden": "true", children: [
|
|
11016
10782
|
Array.from({ length: cols }).map((_, col) => {
|
|
11017
10783
|
const label = coordinateStyle === "algebraic" ? String.fromCharCode(97 + col) : String(col + 1);
|
|
11018
|
-
return /* @__PURE__ */
|
|
10784
|
+
return /* @__PURE__ */ jsx43(
|
|
11019
10785
|
"text",
|
|
11020
10786
|
{
|
|
11021
10787
|
x: labelMargin + col * cellSize + cellSize / 2,
|
|
@@ -11031,7 +10797,7 @@ function SquareGridImpl(props) {
|
|
|
11031
10797
|
}),
|
|
11032
10798
|
Array.from({ length: rows }).map((_, row) => {
|
|
11033
10799
|
const label = coordinateStyle === "algebraic" ? String(rows - row) : String(row + 1);
|
|
11034
|
-
return /* @__PURE__ */
|
|
10800
|
+
return /* @__PURE__ */ jsx43(
|
|
11035
10801
|
"text",
|
|
11036
10802
|
{
|
|
11037
10803
|
x: 10,
|
|
@@ -11046,10 +10812,10 @@ function SquareGridImpl(props) {
|
|
|
11046
10812
|
);
|
|
11047
10813
|
})
|
|
11048
10814
|
] }),
|
|
11049
|
-
/* @__PURE__ */
|
|
10815
|
+
/* @__PURE__ */ jsx43("g", { className: "pieces", role: "list", "aria-label": "Game pieces", children: resolvedPieces.map((piece) => {
|
|
11050
10816
|
const x = labelMargin + piece.col * cellSize + cellSize / 2;
|
|
11051
10817
|
const y = piece.row * cellSize + cellSize / 2;
|
|
11052
|
-
return /* @__PURE__ */
|
|
10818
|
+
return /* @__PURE__ */ jsx43(
|
|
11053
10819
|
"g",
|
|
11054
10820
|
{
|
|
11055
10821
|
transform: `translate(${x}, ${y})`,
|
|
@@ -11060,7 +10826,7 @@ function SquareGridImpl(props) {
|
|
|
11060
10826
|
piece.id
|
|
11061
10827
|
);
|
|
11062
10828
|
}) }),
|
|
11063
|
-
enablePanZoom && transform.zoom !== 1 && /* @__PURE__ */
|
|
10829
|
+
enablePanZoom && transform.zoom !== 1 && /* @__PURE__ */ jsx43(
|
|
11064
10830
|
GridZoomIndicator,
|
|
11065
10831
|
{
|
|
11066
10832
|
viewBoxX,
|
|
@@ -11078,7 +10844,7 @@ var SquareGrid = SquareGridImpl;
|
|
|
11078
10844
|
// src/ui/components/board/HexGrid.tsx
|
|
11079
10845
|
import { useMemo as useMemo16 } from "react";
|
|
11080
10846
|
import { clsx as clsx22 } from "clsx";
|
|
11081
|
-
import { Fragment as Fragment7, jsx as
|
|
10847
|
+
import { Fragment as Fragment7, jsx as jsx44, jsxs as jsxs26 } from "react/jsx-runtime";
|
|
11082
10848
|
function DefaultHexTile({
|
|
11083
10849
|
size,
|
|
11084
10850
|
fill,
|
|
@@ -11099,7 +10865,7 @@ function DefaultHexTile({
|
|
|
11099
10865
|
const effectiveStroke = isSelected ? "#3b82f6" : isHighlighted ? "#22c55e" : stroke;
|
|
11100
10866
|
const effectiveStrokeWidth = isSelected || isHighlighted ? 3 : strokeWidth;
|
|
11101
10867
|
const points = hexUtils.getHexPoints(0, 0, size * 0.95, orientation);
|
|
11102
|
-
return /* @__PURE__ */
|
|
10868
|
+
return /* @__PURE__ */ jsxs26(
|
|
11103
10869
|
"g",
|
|
11104
10870
|
{
|
|
11105
10871
|
onClick,
|
|
@@ -11115,7 +10881,7 @@ function DefaultHexTile({
|
|
|
11115
10881
|
tabIndex: onClick ? 0 : void 0,
|
|
11116
10882
|
"aria-label": onClick ? label ?? "Hex tile" : void 0,
|
|
11117
10883
|
children: [
|
|
11118
|
-
/* @__PURE__ */
|
|
10884
|
+
/* @__PURE__ */ jsx44(
|
|
11119
10885
|
"polygon",
|
|
11120
10886
|
{
|
|
11121
10887
|
points,
|
|
@@ -11125,7 +10891,7 @@ function DefaultHexTile({
|
|
|
11125
10891
|
filter: "url(#hexShadow)"
|
|
11126
10892
|
}
|
|
11127
10893
|
),
|
|
11128
|
-
label && /* @__PURE__ */
|
|
10894
|
+
label && /* @__PURE__ */ jsx44(
|
|
11129
10895
|
"text",
|
|
11130
10896
|
{
|
|
11131
10897
|
x: 0,
|
|
@@ -11140,7 +10906,7 @@ function DefaultHexTile({
|
|
|
11140
10906
|
children: label
|
|
11141
10907
|
}
|
|
11142
10908
|
),
|
|
11143
|
-
showCoordinates && coordinates && /* @__PURE__ */
|
|
10909
|
+
showCoordinates && coordinates && /* @__PURE__ */ jsxs26(
|
|
11144
10910
|
"text",
|
|
11145
10911
|
{
|
|
11146
10912
|
x: 0,
|
|
@@ -11174,7 +10940,7 @@ function DefaultHexEdge({
|
|
|
11174
10940
|
position.x2 - position.x1,
|
|
11175
10941
|
position.y2 - position.y1
|
|
11176
10942
|
);
|
|
11177
|
-
return /* @__PURE__ */
|
|
10943
|
+
return /* @__PURE__ */ jsxs26(
|
|
11178
10944
|
"g",
|
|
11179
10945
|
{
|
|
11180
10946
|
onClick,
|
|
@@ -11188,7 +10954,7 @@ function DefaultHexEdge({
|
|
|
11188
10954
|
tabIndex: onClick ? 0 : void 0,
|
|
11189
10955
|
"aria-label": onClick ? "Hex edge" : void 0,
|
|
11190
10956
|
children: [
|
|
11191
|
-
/* @__PURE__ */
|
|
10957
|
+
/* @__PURE__ */ jsx44(
|
|
11192
10958
|
"rect",
|
|
11193
10959
|
{
|
|
11194
10960
|
x: position.midX - touchTargetLength / 2,
|
|
@@ -11201,7 +10967,7 @@ function DefaultHexEdge({
|
|
|
11201
10967
|
pointerEvents: "all"
|
|
11202
10968
|
}
|
|
11203
10969
|
),
|
|
11204
|
-
/* @__PURE__ */
|
|
10970
|
+
/* @__PURE__ */ jsx44(
|
|
11205
10971
|
"line",
|
|
11206
10972
|
{
|
|
11207
10973
|
x1: position.x1,
|
|
@@ -11237,7 +11003,7 @@ function DefaultHexVertex({
|
|
|
11237
11003
|
const effectiveColor = isSelected ? "rgba(59, 130, 246, 0.8)" : isHighlighted ? "rgba(34, 197, 94, 0.8)" : color;
|
|
11238
11004
|
const effectiveStroke = isSelected ? "#3b82f6" : isHighlighted ? "#22c55e" : stroke;
|
|
11239
11005
|
const effectiveStrokeWidth = isSelected || isHighlighted ? 3 : strokeWidth;
|
|
11240
|
-
return /* @__PURE__ */
|
|
11006
|
+
return /* @__PURE__ */ jsxs26(
|
|
11241
11007
|
"g",
|
|
11242
11008
|
{
|
|
11243
11009
|
onClick,
|
|
@@ -11254,7 +11020,7 @@ function DefaultHexVertex({
|
|
|
11254
11020
|
tabIndex: onClick ? 0 : void 0,
|
|
11255
11021
|
"aria-label": onClick ? "Hex vertex" : void 0,
|
|
11256
11022
|
children: [
|
|
11257
|
-
/* @__PURE__ */
|
|
11023
|
+
/* @__PURE__ */ jsx44(
|
|
11258
11024
|
"circle",
|
|
11259
11025
|
{
|
|
11260
11026
|
cx: position.x,
|
|
@@ -11264,7 +11030,7 @@ function DefaultHexVertex({
|
|
|
11264
11030
|
pointerEvents: "all"
|
|
11265
11031
|
}
|
|
11266
11032
|
),
|
|
11267
|
-
shape === "square" ? /* @__PURE__ */
|
|
11033
|
+
shape === "square" ? /* @__PURE__ */ jsx44(
|
|
11268
11034
|
"rect",
|
|
11269
11035
|
{
|
|
11270
11036
|
x: position.x - size,
|
|
@@ -11276,7 +11042,7 @@ function DefaultHexVertex({
|
|
|
11276
11042
|
strokeWidth: effectiveStrokeWidth,
|
|
11277
11043
|
className: hasOwner ? "" : "opacity-30"
|
|
11278
11044
|
}
|
|
11279
|
-
) : /* @__PURE__ */
|
|
11045
|
+
) : /* @__PURE__ */ jsx44(
|
|
11280
11046
|
"circle",
|
|
11281
11047
|
{
|
|
11282
11048
|
cx: position.x,
|
|
@@ -11300,7 +11066,7 @@ function DefaultInteractiveVertex({
|
|
|
11300
11066
|
hoverColor = "rgba(34, 197, 94, 0.8)",
|
|
11301
11067
|
className
|
|
11302
11068
|
}) {
|
|
11303
|
-
return /* @__PURE__ */
|
|
11069
|
+
return /* @__PURE__ */ jsx44(
|
|
11304
11070
|
"circle",
|
|
11305
11071
|
{
|
|
11306
11072
|
cx: position.x,
|
|
@@ -11321,7 +11087,7 @@ function DefaultInteractiveEdge({
|
|
|
11321
11087
|
hoverColor = "rgba(251, 146, 60, 0.8)",
|
|
11322
11088
|
className
|
|
11323
11089
|
}) {
|
|
11324
|
-
return /* @__PURE__ */
|
|
11090
|
+
return /* @__PURE__ */ jsx44(
|
|
11325
11091
|
"line",
|
|
11326
11092
|
{
|
|
11327
11093
|
x1: position.x1,
|
|
@@ -11601,7 +11367,7 @@ function HexGridImpl(props) {
|
|
|
11601
11367
|
bounds,
|
|
11602
11368
|
viewBoxMode: "transformed"
|
|
11603
11369
|
});
|
|
11604
|
-
return /* @__PURE__ */
|
|
11370
|
+
return /* @__PURE__ */ jsxs26(
|
|
11605
11371
|
"svg",
|
|
11606
11372
|
{
|
|
11607
11373
|
width,
|
|
@@ -11615,21 +11381,21 @@ function HexGridImpl(props) {
|
|
|
11615
11381
|
className
|
|
11616
11382
|
),
|
|
11617
11383
|
...bind(),
|
|
11618
|
-
role: "
|
|
11384
|
+
role: "group",
|
|
11619
11385
|
"aria-label": "Hex grid game board",
|
|
11620
11386
|
children: [
|
|
11621
|
-
/* @__PURE__ */
|
|
11622
|
-
/* @__PURE__ */
|
|
11623
|
-
/* @__PURE__ */
|
|
11624
|
-
/* @__PURE__ */
|
|
11387
|
+
/* @__PURE__ */ jsxs26("defs", { children: [
|
|
11388
|
+
/* @__PURE__ */ jsxs26("linearGradient", { id: "oceanGradient", x1: "0%", y1: "0%", x2: "100%", y2: "100%", children: [
|
|
11389
|
+
/* @__PURE__ */ jsx44("stop", { offset: "0%", stopColor: "#0ea5e9" }),
|
|
11390
|
+
/* @__PURE__ */ jsx44("stop", { offset: "100%", stopColor: "#0284c7" })
|
|
11625
11391
|
] }),
|
|
11626
|
-
/* @__PURE__ */
|
|
11392
|
+
/* @__PURE__ */ jsx44("filter", { id: "hexShadow", x: "-20%", y: "-20%", width: "140%", height: "140%", children: /* @__PURE__ */ jsx44("feDropShadow", { dx: "1", dy: "1", stdDeviation: "2", floodOpacity: "0.3" }) })
|
|
11627
11393
|
] }),
|
|
11628
|
-
/* @__PURE__ */
|
|
11394
|
+
/* @__PURE__ */ jsx44("g", { className: "tiles", role: "list", "aria-label": "Hex tiles", children: resolvedTiles.map((tile) => {
|
|
11629
11395
|
const pos = tilePositions.get(tile.id);
|
|
11630
11396
|
if (!pos) return null;
|
|
11631
11397
|
const geometry = buildTileGeometry(pos);
|
|
11632
|
-
return /* @__PURE__ */
|
|
11398
|
+
return /* @__PURE__ */ jsx44(
|
|
11633
11399
|
"g",
|
|
11634
11400
|
{
|
|
11635
11401
|
transform: `translate(${pos.x}, ${pos.y})`,
|
|
@@ -11640,7 +11406,7 @@ function HexGridImpl(props) {
|
|
|
11640
11406
|
tile.id
|
|
11641
11407
|
);
|
|
11642
11408
|
}) }),
|
|
11643
|
-
interactiveSpaces && resolvedTiles.length > 0 && /* @__PURE__ */
|
|
11409
|
+
interactiveSpaces && resolvedTiles.length > 0 && /* @__PURE__ */ jsx44(
|
|
11644
11410
|
InteractiveTargetLayerGroup,
|
|
11645
11411
|
{
|
|
11646
11412
|
layer: interactiveSpaces,
|
|
@@ -11649,13 +11415,12 @@ function HexGridImpl(props) {
|
|
|
11649
11415
|
targetKind: "space",
|
|
11650
11416
|
groupClassName: "interactive-spaces",
|
|
11651
11417
|
groupAriaLabel: "Interactive spaces",
|
|
11652
|
-
groupRole: "list",
|
|
11653
11418
|
browserAttributeOrder: "before-transform",
|
|
11654
11419
|
selectMode: "render-state",
|
|
11655
11420
|
hover: spaceHover,
|
|
11656
11421
|
getTargetTransform: ({ pos }) => `translate(${pos.x}, ${pos.y})`,
|
|
11657
|
-
renderTargetContent: ({ space, pos }, state, isSelectable) => /* @__PURE__ */
|
|
11658
|
-
isSelectable && /* @__PURE__ */
|
|
11422
|
+
renderTargetContent: ({ space, pos }, state, isSelectable) => /* @__PURE__ */ jsxs26(Fragment7, { children: [
|
|
11423
|
+
isSelectable && /* @__PURE__ */ jsx44(
|
|
11659
11424
|
"polygon",
|
|
11660
11425
|
{
|
|
11661
11426
|
points: buildTileGeometry(pos).points({
|
|
@@ -11669,13 +11434,13 @@ function HexGridImpl(props) {
|
|
|
11669
11434
|
] })
|
|
11670
11435
|
}
|
|
11671
11436
|
),
|
|
11672
|
-
resolvedEdges.length > 0 && /* @__PURE__ */
|
|
11673
|
-
return /* @__PURE__ */
|
|
11437
|
+
resolvedEdges.length > 0 && /* @__PURE__ */ jsx44("g", { className: "edges", role: "list", "aria-label": "Hex edges", children: resolvedEdgePositions.map(({ edge, interactiveEdge }) => {
|
|
11438
|
+
return /* @__PURE__ */ jsx44("g", { role: "listitem", children: renderEdge(edge, interactiveEdge.position) }, edge.id);
|
|
11674
11439
|
}) }),
|
|
11675
|
-
resolvedVertices.length > 0 && /* @__PURE__ */
|
|
11676
|
-
return /* @__PURE__ */
|
|
11440
|
+
resolvedVertices.length > 0 && /* @__PURE__ */ jsx44("g", { className: "vertices", role: "list", "aria-label": "Hex vertices", children: resolvedVertexPositions.map(({ vertex, interactiveVertex }) => {
|
|
11441
|
+
return /* @__PURE__ */ jsx44("g", { role: "listitem", children: renderVertex(vertex, interactiveVertex.position) }, vertex.id);
|
|
11677
11442
|
}) }),
|
|
11678
|
-
interactiveEdges && resolvedEdgePositions.length > 0 && /* @__PURE__ */
|
|
11443
|
+
interactiveEdges && resolvedEdgePositions.length > 0 && /* @__PURE__ */ jsx44(
|
|
11679
11444
|
InteractiveTargetLayerGroup,
|
|
11680
11445
|
{
|
|
11681
11446
|
layer: interactiveEdges,
|
|
@@ -11684,7 +11449,6 @@ function HexGridImpl(props) {
|
|
|
11684
11449
|
targetKind: "edge",
|
|
11685
11450
|
groupClassName: "interactive-edges",
|
|
11686
11451
|
groupAriaLabel: "Interactive edges for placement",
|
|
11687
|
-
groupRole: "list",
|
|
11688
11452
|
browserAttributeOrder: "before-transform",
|
|
11689
11453
|
selectMode: "render-state",
|
|
11690
11454
|
hover: edgeHover,
|
|
@@ -11693,8 +11457,8 @@ function HexGridImpl(props) {
|
|
|
11693
11457
|
edge.position.x2 - edge.position.x1,
|
|
11694
11458
|
edge.position.y2 - edge.position.y1
|
|
11695
11459
|
);
|
|
11696
|
-
return /* @__PURE__ */
|
|
11697
|
-
isSelectable && /* @__PURE__ */
|
|
11460
|
+
return /* @__PURE__ */ jsxs26(Fragment7, { children: [
|
|
11461
|
+
isSelectable && /* @__PURE__ */ jsx44(
|
|
11698
11462
|
"rect",
|
|
11699
11463
|
{
|
|
11700
11464
|
x: edge.position.midX - touchTargetLength / 2,
|
|
@@ -11707,7 +11471,7 @@ function HexGridImpl(props) {
|
|
|
11707
11471
|
pointerEvents: "all"
|
|
11708
11472
|
}
|
|
11709
11473
|
),
|
|
11710
|
-
renderInteractiveEdge ? renderInteractiveEdge(edge, edge.position, state) : state.isEnabled && state.isEligible ? /* @__PURE__ */
|
|
11474
|
+
renderInteractiveEdge ? renderInteractiveEdge(edge, edge.position, state) : state.isEnabled && state.isEligible ? /* @__PURE__ */ jsx44(
|
|
11711
11475
|
DefaultInteractiveEdge,
|
|
11712
11476
|
{
|
|
11713
11477
|
position: edge.position,
|
|
@@ -11719,7 +11483,7 @@ function HexGridImpl(props) {
|
|
|
11719
11483
|
}
|
|
11720
11484
|
}
|
|
11721
11485
|
),
|
|
11722
|
-
interactiveVertices && resolvedVertexPositions.length > 0 && /* @__PURE__ */
|
|
11486
|
+
interactiveVertices && resolvedVertexPositions.length > 0 && /* @__PURE__ */ jsx44(
|
|
11723
11487
|
InteractiveTargetLayerGroup,
|
|
11724
11488
|
{
|
|
11725
11489
|
layer: interactiveVertices,
|
|
@@ -11728,12 +11492,11 @@ function HexGridImpl(props) {
|
|
|
11728
11492
|
targetKind: "vertex",
|
|
11729
11493
|
groupClassName: "interactive-vertices",
|
|
11730
11494
|
groupAriaLabel: "Interactive vertices for placement",
|
|
11731
|
-
groupRole: "list",
|
|
11732
11495
|
browserAttributeOrder: "before-transform",
|
|
11733
11496
|
selectMode: "render-state",
|
|
11734
11497
|
hover: vertexHover,
|
|
11735
|
-
renderTargetContent: ({ interactiveVertex: vertex }, state, isSelectable) => /* @__PURE__ */
|
|
11736
|
-
isSelectable && /* @__PURE__ */
|
|
11498
|
+
renderTargetContent: ({ interactiveVertex: vertex }, state, isSelectable) => /* @__PURE__ */ jsxs26(Fragment7, { children: [
|
|
11499
|
+
isSelectable && /* @__PURE__ */ jsx44(
|
|
11737
11500
|
"circle",
|
|
11738
11501
|
{
|
|
11739
11502
|
cx: vertex.position.x,
|
|
@@ -11743,7 +11506,7 @@ function HexGridImpl(props) {
|
|
|
11743
11506
|
pointerEvents: "all"
|
|
11744
11507
|
}
|
|
11745
11508
|
),
|
|
11746
|
-
renderInteractiveVertex ? renderInteractiveVertex(vertex, vertex.position, state) : state.isEnabled && state.isEligible ? /* @__PURE__ */
|
|
11509
|
+
renderInteractiveVertex ? renderInteractiveVertex(vertex, vertex.position, state) : state.isEnabled && state.isEligible ? /* @__PURE__ */ jsx44(
|
|
11747
11510
|
DefaultInteractiveVertex,
|
|
11748
11511
|
{
|
|
11749
11512
|
position: vertex.position,
|
|
@@ -11754,7 +11517,7 @@ function HexGridImpl(props) {
|
|
|
11754
11517
|
] })
|
|
11755
11518
|
}
|
|
11756
11519
|
),
|
|
11757
|
-
effectivePanZoom && transform.zoom !== 1 && /* @__PURE__ */
|
|
11520
|
+
effectivePanZoom && transform.zoom !== 1 && /* @__PURE__ */ jsx44(
|
|
11758
11521
|
GridZoomIndicator,
|
|
11759
11522
|
{
|
|
11760
11523
|
viewBoxX,
|
|
@@ -11909,8 +11672,6 @@ export {
|
|
|
11909
11672
|
ActionHelp,
|
|
11910
11673
|
StandingsTable,
|
|
11911
11674
|
OutcomeDialog,
|
|
11912
|
-
SystemActionSummary,
|
|
11913
|
-
GameEventLog,
|
|
11914
11675
|
DefaultNetworkNode,
|
|
11915
11676
|
DefaultNetworkEdge,
|
|
11916
11677
|
DefaultNetworkPiece,
|
|
@@ -11941,4 +11702,4 @@ export {
|
|
|
11941
11702
|
HexGrid,
|
|
11942
11703
|
createHexBoardView
|
|
11943
11704
|
};
|
|
11944
|
-
//# sourceMappingURL=chunk-
|
|
11705
|
+
//# sourceMappingURL=chunk-32PFKDV7.js.map
|