@dreamboard-games/sdk 0.4.0-alpha.4 → 0.4.0-alpha.6
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 +1089 -123
- package/dist/{HandView-x8MhbhFl.d.ts → HandView-Bi2lxzQP.d.ts} +3 -3
- package/dist/{ThemeProvider-DRalAWzY.d.ts → ThemeProvider-CElaL2ik.d.ts} +1 -1
- package/dist/authoring/index.js +2 -2
- package/dist/browser-interaction.js +1 -1
- package/dist/{chunk-E3X552YM.js → chunk-2TRZSZGD.js} +1061 -425
- package/dist/chunk-2TRZSZGD.js.map +1 -0
- package/dist/{chunk-CP35NPPY.js → chunk-52DH7VQF.js} +61 -7
- package/dist/chunk-52DH7VQF.js.map +1 -0
- package/dist/{chunk-N6ZDIMRB.js → chunk-B2YBS3SG.js} +1 -1
- package/dist/chunk-B2YBS3SG.js.map +1 -0
- package/dist/{chunk-LKJLAGND.js → chunk-DDST4U2P.js} +2 -2
- package/dist/{chunk-SUMZ5OEH.js → chunk-HK3WN4U7.js} +2 -2
- package/dist/{chunk-SUMZ5OEH.js.map → chunk-HK3WN4U7.js.map} +1 -1
- package/dist/{chunk-QOFFRHZR.js → chunk-OV6JC2BM.js} +64 -28
- package/dist/chunk-OV6JC2BM.js.map +1 -0
- package/dist/{chunk-K5ZRJTZZ.js → chunk-PAPIAMYX.js} +6 -3
- package/dist/chunk-PAPIAMYX.js.map +1 -0
- package/dist/{chunk-TTISZQNI.js → chunk-SOBNI363.js} +39 -28
- package/dist/chunk-SOBNI363.js.map +1 -0
- package/dist/{chunk-Y6Y2YABD.js → chunk-TGMXBRKY.js} +22 -6
- package/dist/chunk-TGMXBRKY.js.map +1 -0
- package/dist/{chunk-XZ667T4K.js → chunk-UC2UXAC6.js} +2 -2
- package/dist/{chunk-O6M6PN4E.js → chunk-UUQNOGZV.js} +94 -53
- package/dist/chunk-UUQNOGZV.js.map +1 -0
- package/dist/{chunk-WUIVY2KE.js → chunk-WHR5UW3F.js} +1 -1
- package/dist/chunk-WHR5UW3F.js.map +1 -0
- package/dist/codegen.d.ts +13 -0
- package/dist/codegen.js +1 -1
- package/dist/{components-B7hFaEn_.d.ts → components-BTwSIjXj.d.ts} +77 -206
- package/dist/{hex-board-view-BFlWDb9k.d.ts → hex-board-view-aKkblDp6.d.ts} +180 -1
- package/dist/{index-gjxQichK.d.ts → index-CFTjJIXd.d.ts} +5 -4
- package/dist/{index.d-BL3bT5lt.d.ts → index.d-DMASeF6M.d.ts} +294 -27
- package/dist/index.js +2 -2
- package/dist/package-set.d.ts +2 -2
- package/dist/package-set.js +2 -2
- package/dist/{runtime-api-BJharVaj.d.ts → plugin-state-BRH3UiUp.d.ts} +19 -3
- package/dist/{protocol-BP193lva.d.ts → protocol-835hEGne.d.ts} +42 -1
- package/dist/reducer/advanced.d.ts +4 -2
- package/dist/reducer/advanced.js +1 -1
- package/dist/reducer-contract.d.ts +1 -1
- package/dist/reducer-contract.js +2 -2
- package/dist/reducer.d.ts +10 -4
- package/dist/reducer.js +317 -15
- package/dist/reducer.js.map +1 -1
- package/dist/runtime/primitives.d.ts +32 -7
- package/dist/runtime/primitives.js +9 -5
- package/dist/runtime/runtime-api.d.ts +1 -1
- package/dist/runtime/workspace-contract.d.ts +7 -7
- package/dist/runtime/workspace-contract.js +6 -6
- package/dist/runtime-Dkfm1x2r.d.ts +1670 -0
- package/dist/runtime.d.ts +10 -9
- package/dist/runtime.js +240 -16
- package/dist/runtime.js.map +1 -1
- package/dist/testing.d.ts +78 -15
- package/dist/testing.js +69 -8
- package/dist/testing.js.map +1 -1
- package/dist/{types-CYeN0wLK.d.ts → types-aI4V9CWe.d.ts} +5 -5
- package/dist/types.d.ts +13 -0
- package/dist/ui/components.d.ts +6 -3
- package/dist/ui/components.js +15 -3
- package/dist/ui/plugin-styles.css +2 -2
- package/dist/{ui-contract-B4NjRlvC.d.ts → ui-contract-Ue6SywvO.d.ts} +24 -10
- package/dist/ui.d.ts +9 -6
- package/dist/ui.js +16 -4
- package/dist/views-32rSsfeU.d.ts +1559 -0
- package/package.json +21 -20
- package/dist/chunk-CP35NPPY.js.map +0 -1
- package/dist/chunk-E3X552YM.js.map +0 -1
- package/dist/chunk-K5ZRJTZZ.js.map +0 -1
- package/dist/chunk-N6ZDIMRB.js.map +0 -1
- package/dist/chunk-O6M6PN4E.js.map +0 -1
- package/dist/chunk-QOFFRHZR.js.map +0 -1
- package/dist/chunk-TTISZQNI.js.map +0 -1
- package/dist/chunk-WUIVY2KE.js.map +0 -1
- package/dist/chunk-Y6Y2YABD.js.map +0 -1
- package/dist/views-fn2RuXOx.d.ts +0 -3168
- /package/dist/{chunk-LKJLAGND.js.map → chunk-DDST4U2P.js.map} +0 -0
- /package/dist/{chunk-XZ667T4K.js.map → chunk-UC2UXAC6.js.map} +0 -0
|
@@ -1,16 +1,18 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
import { ViewCard, ViewSlotOccupant } from './types.js';
|
|
3
|
-
import {
|
|
3
|
+
import { ag as Theme, O as IntentColor, a5 as PlayerColor, P as InteractionVisualState, f as CardIntent, C as CardDropTargetVisualState } from './hex-board-view-aKkblDp6.js';
|
|
4
4
|
import * as react from 'react';
|
|
5
5
|
import { ReactNode, CSSProperties, RefObject, Component, ErrorInfo, ComponentType, ButtonHTMLAttributes, ElementType, ComponentProps, HTMLAttributes } from 'react';
|
|
6
|
-
import './HandView-
|
|
6
|
+
import './HandView-Bi2lxzQP.js';
|
|
7
7
|
import { Transition } from 'framer-motion';
|
|
8
8
|
import './ResourceCounter-BFxJknqp.js';
|
|
9
9
|
import { Drawer as Drawer$1 } from 'vaul';
|
|
10
10
|
import * as DialogPrimitive from '@radix-ui/react-dialog';
|
|
11
11
|
import * as LabelPrimitive from '@radix-ui/react-label';
|
|
12
12
|
import * as SelectPrimitive from '@radix-ui/react-select';
|
|
13
|
-
import {
|
|
13
|
+
import { U as GameOutcome, al as OutcomeStanding } from './runtime-Dkfm1x2r.js';
|
|
14
|
+
import { P as ProjectedGameEvent, S as SystemActionEvent } from './plugin-state-BRH3UiUp.js';
|
|
15
|
+
import './player-state-Cqpyeql0.js';
|
|
14
16
|
|
|
15
17
|
interface TrackSpace<SpaceIdValue extends string = string, Data = unknown> {
|
|
16
18
|
id: SpaceIdValue;
|
|
@@ -975,32 +977,80 @@ interface PhaseIndicatorProps {
|
|
|
975
977
|
}
|
|
976
978
|
declare function PhaseIndicator({ currentPhase, phaseLabels, isMyTurn, activePlayerNames, variant, className, }: PhaseIndicatorProps): react_jsx_runtime.JSX.Element;
|
|
977
979
|
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
980
|
+
interface GuidancePhase {
|
|
981
|
+
id: string;
|
|
982
|
+
label: string;
|
|
983
|
+
summary?: ReactNode;
|
|
984
|
+
objective?: ReactNode;
|
|
985
|
+
}
|
|
986
|
+
interface GuidanceSetupStep {
|
|
987
|
+
id: string;
|
|
988
|
+
label: ReactNode;
|
|
989
|
+
description?: ReactNode;
|
|
990
|
+
}
|
|
991
|
+
interface SetupGuidance {
|
|
992
|
+
profileId: string;
|
|
993
|
+
name: ReactNode;
|
|
994
|
+
summary?: ReactNode;
|
|
995
|
+
steps: readonly GuidanceSetupStep[];
|
|
996
|
+
}
|
|
997
|
+
interface GuidanceAction {
|
|
998
|
+
label: ReactNode;
|
|
999
|
+
help?: ReactNode;
|
|
1000
|
+
unavailableReason?: ReactNode;
|
|
1001
|
+
}
|
|
1002
|
+
interface GuidancePanelProps {
|
|
1003
|
+
phase: GuidancePhase;
|
|
1004
|
+
actions?: readonly GuidanceAction[];
|
|
1005
|
+
className?: string;
|
|
1006
|
+
style?: CSSProperties;
|
|
1007
|
+
}
|
|
1008
|
+
interface SetupChecklistProps {
|
|
1009
|
+
guidance?: SetupGuidance | null;
|
|
1010
|
+
completedStepIds?: readonly string[];
|
|
1011
|
+
className?: string;
|
|
1012
|
+
style?: CSSProperties;
|
|
1013
|
+
}
|
|
1014
|
+
interface ActionHelpProps {
|
|
1015
|
+
label: ReactNode;
|
|
1016
|
+
help?: ReactNode;
|
|
1017
|
+
unavailableReason?: ReactNode;
|
|
1018
|
+
className?: string;
|
|
1019
|
+
style?: CSSProperties;
|
|
1020
|
+
}
|
|
1021
|
+
declare function GuidancePanel({ phase, actions, className, style, }: GuidancePanelProps): react_jsx_runtime.JSX.Element;
|
|
1022
|
+
declare function SetupChecklist({ guidance, completedStepIds, className, style, }: SetupChecklistProps): react_jsx_runtime.JSX.Element | null;
|
|
1023
|
+
declare function ActionHelp({ label, help, unavailableReason, className, style, }: ActionHelpProps): react_jsx_runtime.JSX.Element;
|
|
1024
|
+
|
|
1025
|
+
interface StandingsTableProps<PlayerId extends string = string> {
|
|
1026
|
+
rows: readonly OutcomeStanding<PlayerId>[];
|
|
1027
|
+
playerName: (playerId: PlayerId) => ReactNode;
|
|
1028
|
+
provisional?: boolean;
|
|
1029
|
+
className?: string;
|
|
1030
|
+
}
|
|
1031
|
+
interface OutcomeDialogProps<PlayerId extends string = string> {
|
|
1032
|
+
outcome?: GameOutcome<PlayerId> | null;
|
|
1033
|
+
playerName: (playerId: PlayerId) => ReactNode;
|
|
1000
1034
|
onReturnToLobby?: () => void;
|
|
1001
1035
|
className?: string;
|
|
1002
1036
|
}
|
|
1003
|
-
declare function
|
|
1037
|
+
declare function StandingsTable<PlayerId extends string = string>({ rows, playerName, provisional, className, }: StandingsTableProps<PlayerId>): react_jsx_runtime.JSX.Element;
|
|
1038
|
+
declare function OutcomeDialog<PlayerId extends string = string>({ outcome, playerName, onReturnToLobby, className, }: OutcomeDialogProps<PlayerId>): react_jsx_runtime.JSX.Element | null;
|
|
1039
|
+
|
|
1040
|
+
interface SystemActionSummaryProps {
|
|
1041
|
+
event: SystemActionEvent;
|
|
1042
|
+
className?: string;
|
|
1043
|
+
style?: CSSProperties;
|
|
1044
|
+
}
|
|
1045
|
+
interface GameEventLogProps {
|
|
1046
|
+
events: readonly ProjectedGameEvent[];
|
|
1047
|
+
empty?: ReactNode;
|
|
1048
|
+
maxVisible?: number;
|
|
1049
|
+
className?: string;
|
|
1050
|
+
style?: CSSProperties;
|
|
1051
|
+
}
|
|
1052
|
+
declare function SystemActionSummary({ event, className, style, }: SystemActionSummaryProps): react_jsx_runtime.JSX.Element;
|
|
1053
|
+
declare function GameEventLog({ events, empty, maxVisible, className, style, }: GameEventLogProps): react_jsx_runtime.JSX.Element;
|
|
1004
1054
|
|
|
1005
1055
|
interface NetworkNode {
|
|
1006
1056
|
id: string;
|
|
@@ -1247,183 +1297,4 @@ interface DefaultEmptySlotProps {
|
|
|
1247
1297
|
declare function DefaultEmptySlot({ size, className, }: DefaultEmptySlotProps): react_jsx_runtime.JSX.Element;
|
|
1248
1298
|
declare function SlotSystem({ slots, occupants, renderSlot, layout, width, height, minSlotWidth, className, }: SlotSystemProps): react_jsx_runtime.JSX.Element;
|
|
1249
1299
|
|
|
1250
|
-
|
|
1251
|
-
x1: number;
|
|
1252
|
-
y1: number;
|
|
1253
|
-
x2: number;
|
|
1254
|
-
y2: number;
|
|
1255
|
-
midX: number;
|
|
1256
|
-
midY: number;
|
|
1257
|
-
angle: number;
|
|
1258
|
-
}
|
|
1259
|
-
interface SquareVertexPosition {
|
|
1260
|
-
x: number;
|
|
1261
|
-
y: number;
|
|
1262
|
-
}
|
|
1263
|
-
interface InteractiveSquareEdge<TBoard extends AnySquareBoardInput = AnySquareBoardInput> extends NormalizedSquareEdgeOf<TBoard> {
|
|
1264
|
-
position: SquareEdgePosition;
|
|
1265
|
-
}
|
|
1266
|
-
interface InteractiveSquareVertex<TBoard extends AnySquareBoardInput = AnySquareBoardInput> extends NormalizedSquareVertexOf<TBoard> {
|
|
1267
|
-
position: SquareVertexPosition;
|
|
1268
|
-
}
|
|
1269
|
-
type InteractiveSquareSpace<TBoard extends AnySquareBoardInput = AnySquareBoardInput> = NormalizedSquareCellOf<TBoard>;
|
|
1270
|
-
interface SquareGeneratedGridInputProps {
|
|
1271
|
-
id?: string;
|
|
1272
|
-
layout?: "square";
|
|
1273
|
-
spaces: Extract<AnySquareBoardInput, {
|
|
1274
|
-
spaces: unknown;
|
|
1275
|
-
}>["spaces"];
|
|
1276
|
-
pieces?: AnySquareBoardInput["pieces"];
|
|
1277
|
-
edges?: AnySquareBoardInput["edges"];
|
|
1278
|
-
vertices?: AnySquareBoardInput["vertices"];
|
|
1279
|
-
}
|
|
1280
|
-
interface SquareAuthoredGridInputProps {
|
|
1281
|
-
id?: string;
|
|
1282
|
-
layout?: "square";
|
|
1283
|
-
rows?: number;
|
|
1284
|
-
cols?: number;
|
|
1285
|
-
cells: Extract<AnySquareBoardInput, {
|
|
1286
|
-
cells: unknown;
|
|
1287
|
-
}>["cells"];
|
|
1288
|
-
pieces?: readonly SquarePieceState[];
|
|
1289
|
-
edges?: AnySquareBoardInput["edges"];
|
|
1290
|
-
vertices?: AnySquareBoardInput["vertices"];
|
|
1291
|
-
}
|
|
1292
|
-
type SquareGridInputProps = SquareGeneratedGridInputProps | SquareAuthoredGridInputProps;
|
|
1293
|
-
type ResolvedSquareArrayProp<Value> = Exclude<Value, undefined> extends readonly unknown[] ? Exclude<Value, undefined> : readonly [];
|
|
1294
|
-
type SquareBoardLikeOfProps<TProps extends SquareGridInputProps> = TProps extends {
|
|
1295
|
-
id?: infer Id;
|
|
1296
|
-
layout?: infer Layout;
|
|
1297
|
-
spaces: infer Spaces;
|
|
1298
|
-
pieces?: infer Pieces;
|
|
1299
|
-
edges?: infer Edges;
|
|
1300
|
-
vertices?: infer Vertices;
|
|
1301
|
-
} ? {
|
|
1302
|
-
id: Extract<Id, string> extends never ? string : Extract<Id, string>;
|
|
1303
|
-
layout?: Extract<Layout, "square">;
|
|
1304
|
-
spaces: Spaces;
|
|
1305
|
-
pieces: ResolvedSquareArrayProp<Pieces>;
|
|
1306
|
-
edges: ResolvedSquareArrayProp<Edges>;
|
|
1307
|
-
vertices: ResolvedSquareArrayProp<Vertices>;
|
|
1308
|
-
} & GeneratedSquareBoardInput : TProps extends {
|
|
1309
|
-
id?: infer Id;
|
|
1310
|
-
layout?: infer Layout;
|
|
1311
|
-
rows?: infer Rows;
|
|
1312
|
-
cols?: infer Cols;
|
|
1313
|
-
cells: infer Cells;
|
|
1314
|
-
pieces?: infer Pieces;
|
|
1315
|
-
edges?: infer Edges;
|
|
1316
|
-
vertices?: infer Vertices;
|
|
1317
|
-
} ? {
|
|
1318
|
-
id: Extract<Id, string> extends never ? string : Extract<Id, string>;
|
|
1319
|
-
layout?: Extract<Layout, "square">;
|
|
1320
|
-
rows: Extract<Rows, number> extends never ? number : Extract<Rows, number>;
|
|
1321
|
-
cols: Extract<Cols, number> extends never ? number : Extract<Cols, number>;
|
|
1322
|
-
cells: Cells;
|
|
1323
|
-
pieces: ResolvedSquareArrayProp<Pieces>;
|
|
1324
|
-
edges: ResolvedSquareArrayProp<Edges>;
|
|
1325
|
-
vertices: ResolvedSquareArrayProp<Vertices>;
|
|
1326
|
-
} & AuthoredSquareBoardInput : never;
|
|
1327
|
-
type SquareGridProps<TProps extends SquareGridInputProps = SquareGridInputProps> = TProps & {
|
|
1328
|
-
cellSize?: number;
|
|
1329
|
-
/** Receives row/col with transform centered at cell position */
|
|
1330
|
-
renderCell: (row: number, col: number) => ReactNode;
|
|
1331
|
-
/** Receives piece with transform centered at cell center */
|
|
1332
|
-
renderPiece: (piece: NormalizedSquarePieceOf<NoInfer<SquareBoardLikeOfProps<TProps>>>) => ReactNode;
|
|
1333
|
-
renderEdge?: (edge: NormalizedSquareEdgeOf<NoInfer<SquareBoardLikeOfProps<TProps>>>, position: SquareEdgePosition) => ReactNode;
|
|
1334
|
-
renderVertex?: (vertex: NormalizedSquareVertexOf<NoInfer<SquareBoardLikeOfProps<TProps>>>, position: SquareVertexPosition) => ReactNode;
|
|
1335
|
-
showCoordinates?: boolean;
|
|
1336
|
-
coordinateStyle?: "algebraic" | "numeric" | "none";
|
|
1337
|
-
width?: number | string;
|
|
1338
|
-
height?: number | string;
|
|
1339
|
-
enablePanZoom?: boolean;
|
|
1340
|
-
initialZoom?: number;
|
|
1341
|
-
minZoom?: number;
|
|
1342
|
-
maxZoom?: number;
|
|
1343
|
-
className?: string;
|
|
1344
|
-
interactiveSpaces?: InteractiveTargetLayer;
|
|
1345
|
-
interactiveEdges?: InteractiveTargetLayer;
|
|
1346
|
-
interactiveVertices?: InteractiveTargetLayer;
|
|
1347
|
-
renderInteractiveSpace?: (space: InteractiveSquareSpace<NoInfer<SquareBoardLikeOfProps<TProps>>>, state: InteractiveTargetRenderState) => ReactNode;
|
|
1348
|
-
renderInteractiveEdge?: (edge: InteractiveSquareEdge<NoInfer<SquareBoardLikeOfProps<TProps>>>, position: SquareEdgePosition, state: InteractiveTargetRenderState) => ReactNode;
|
|
1349
|
-
renderInteractiveVertex?: (vertex: InteractiveSquareVertex<NoInfer<SquareBoardLikeOfProps<TProps>>>, position: SquareVertexPosition, state: InteractiveTargetRenderState) => ReactNode;
|
|
1350
|
-
};
|
|
1351
|
-
interface SquareGridBoardProps<TBoard extends AnySquareBoardInput = AnySquareBoardInput> {
|
|
1352
|
-
board: TBoard;
|
|
1353
|
-
cellSize?: number;
|
|
1354
|
-
renderCell: (row: number, col: number) => ReactNode;
|
|
1355
|
-
renderPiece: (piece: NormalizedSquarePieceOf<NoInfer<TBoard>>) => ReactNode;
|
|
1356
|
-
renderEdge?: (edge: NormalizedSquareEdgeOf<NoInfer<TBoard>>, position: SquareEdgePosition) => ReactNode;
|
|
1357
|
-
renderVertex?: (vertex: NormalizedSquareVertexOf<NoInfer<TBoard>>, position: SquareVertexPosition) => ReactNode;
|
|
1358
|
-
showCoordinates?: boolean;
|
|
1359
|
-
coordinateStyle?: "algebraic" | "numeric" | "none";
|
|
1360
|
-
width?: number | string;
|
|
1361
|
-
height?: number | string;
|
|
1362
|
-
enablePanZoom?: boolean;
|
|
1363
|
-
initialZoom?: number;
|
|
1364
|
-
minZoom?: number;
|
|
1365
|
-
maxZoom?: number;
|
|
1366
|
-
className?: string;
|
|
1367
|
-
interactiveSpaces?: InteractiveTargetLayer;
|
|
1368
|
-
interactiveEdges?: InteractiveTargetLayer;
|
|
1369
|
-
interactiveVertices?: InteractiveTargetLayer;
|
|
1370
|
-
renderInteractiveSpace?: (space: InteractiveSquareSpace<NoInfer<TBoard>>, state: InteractiveTargetRenderState) => ReactNode;
|
|
1371
|
-
renderInteractiveEdge?: (edge: InteractiveSquareEdge<NoInfer<TBoard>>, position: SquareEdgePosition, state: InteractiveTargetRenderState) => ReactNode;
|
|
1372
|
-
renderInteractiveVertex?: (vertex: InteractiveSquareVertex<NoInfer<TBoard>>, position: SquareVertexPosition, state: InteractiveTargetRenderState) => ReactNode;
|
|
1373
|
-
}
|
|
1374
|
-
interface DefaultGridCellProps {
|
|
1375
|
-
size: number;
|
|
1376
|
-
isLight?: boolean;
|
|
1377
|
-
lightColor?: string;
|
|
1378
|
-
darkColor?: string;
|
|
1379
|
-
isHighlighted?: boolean;
|
|
1380
|
-
highlightColor?: string;
|
|
1381
|
-
isSelected?: boolean;
|
|
1382
|
-
selectedColor?: string;
|
|
1383
|
-
isValidMove?: boolean;
|
|
1384
|
-
isCapture?: boolean;
|
|
1385
|
-
onClick?: () => void;
|
|
1386
|
-
onPointerEnter?: () => void;
|
|
1387
|
-
onPointerLeave?: () => void;
|
|
1388
|
-
className?: string;
|
|
1389
|
-
}
|
|
1390
|
-
/** Pre-built grid cell component for use in `renderCell`. */
|
|
1391
|
-
declare function DefaultGridCell({ size, isLight, lightColor, darkColor, isHighlighted, highlightColor, isSelected, selectedColor, isValidMove, isCapture, onClick, onPointerEnter, onPointerLeave, className, }: DefaultGridCellProps): react_jsx_runtime.JSX.Element;
|
|
1392
|
-
interface DefaultGridPieceProps {
|
|
1393
|
-
size: number;
|
|
1394
|
-
color?: string;
|
|
1395
|
-
strokeColor?: string;
|
|
1396
|
-
label?: string;
|
|
1397
|
-
isDragging?: boolean;
|
|
1398
|
-
onClick?: () => void;
|
|
1399
|
-
onPointerDown?: (e: React.PointerEvent) => void;
|
|
1400
|
-
className?: string;
|
|
1401
|
-
}
|
|
1402
|
-
/** Pre-built grid piece component for use in `renderPiece`. */
|
|
1403
|
-
declare function DefaultGridPiece({ size, color, strokeColor, label, isDragging, onClick, onPointerDown, className, }: DefaultGridPieceProps): react_jsx_runtime.JSX.Element;
|
|
1404
|
-
interface DefaultChessPieceProps {
|
|
1405
|
-
size: number;
|
|
1406
|
-
type: string;
|
|
1407
|
-
owner: "white" | "black";
|
|
1408
|
-
onClick?: () => void;
|
|
1409
|
-
onPointerDown?: (e: React.PointerEvent) => void;
|
|
1410
|
-
className?: string;
|
|
1411
|
-
}
|
|
1412
|
-
/** Pre-built chess piece component using Unicode symbols. */
|
|
1413
|
-
declare function DefaultChessPiece({ size, type, owner, onClick, onPointerDown, className, }: DefaultChessPieceProps): react_jsx_runtime.JSX.Element;
|
|
1414
|
-
/**
|
|
1415
|
-
* Convert row/col to algebraic notation (a1, b2, etc.)
|
|
1416
|
-
*/
|
|
1417
|
-
declare function toAlgebraic(row: number, col: number, totalRows: number): string;
|
|
1418
|
-
/**
|
|
1419
|
-
* Convert row/col to numeric notation (1,1, 2,3, etc.)
|
|
1420
|
-
*/
|
|
1421
|
-
declare function toNumeric(row: number, col: number): string;
|
|
1422
|
-
interface SquareGridComponent {
|
|
1423
|
-
<const TBoard extends AnySquareBoardInput>(props: SquareGridBoardProps<TBoard>): ReactNode;
|
|
1424
|
-
<const TProps extends SquareGeneratedGridInputProps>(props: SquareGridProps<TProps>): ReactNode;
|
|
1425
|
-
<const TProps extends SquareAuthoredGridInputProps>(props: SquareGridProps<TProps>): ReactNode;
|
|
1426
|
-
}
|
|
1427
|
-
declare const SquareGrid: SquareGridComponent;
|
|
1428
|
-
|
|
1429
|
-
export { Dialog as $, ActionButton as A, type ButtonSize$1 as B, CardDragSurface as C, DefaultChessPiece as D, type DefaultNetworkEdgeProps as E, DefaultNetworkNode as F, type DefaultNetworkNodeProps as G, DefaultNetworkPiece as H, type DefaultNetworkPieceProps as I, DefaultSlotItem as J, type DefaultSlotItemProps as K, DefaultSlotOccupant as L, type DefaultSlotOccupantProps as M, DefaultTrackConnection as N, type DefaultTrackConnectionProps as O, DefaultTrackJump as P, type DefaultTrackJumpProps as Q, DefaultTrackPiece as R, type DefaultTrackPieceProps as S, DefaultTrackSpace as T, type DefaultTrackSpaceProps as U, DefaultZone as V, DefaultZonePiece as W, type DefaultZonePieceProps as X, DefaultZonePieces as Y, type DefaultZonePiecesProps as Z, type DefaultZoneProps as _, type ActionButtonProps as a, type PlayAreaProps as a$, DialogClose as a0, DialogContent as a1, DialogDescription as a2, DialogFooter as a3, DialogHeader as a4, DialogOverlay as a5, DialogPortal as a6, DialogTitle as a7, DialogTrigger as a8, DiceRoller as a9, type HandProps as aA, Input as aB, type InteractiveSquareEdge as aC, type InteractiveSquareVertex as aD, Label as aE, MoreActions as aF, type MoreActionsProps as aG, type NetworkEdge as aH, NetworkGraph as aI, type NetworkGraphProps as aJ, type NetworkNode as aK, type NetworkPiece as aL, Panel as aM, PanelActions as aN, PanelBody as aO, PanelDescription as aP, type PanelDescriptionProps as aQ, PanelHeader as aR, type PanelPartProps as aS, PanelRoot as aT, type PanelRootProps as aU, PanelTitle as aV, type PanelTitleProps as aW, type PanelTone as aX, PhaseIndicator as aY, type PhaseIndicatorProps as aZ, PlayArea as a_, type DiceRollerProps as aa, type DragPhase as ab, Drawer as ac, DrawerClose as ad, DrawerContent as ae, DrawerDescription as af, DrawerFooter as ag, DrawerHeader as ah, DrawerOverlay as ai, DrawerPortal as aj, DrawerTitle as ak, DrawerTrigger as al, ErrorBoundary as am, type ErrorBoundaryProps as an, GameEndDisplay as ao, type GameEndDisplayProps as ap, GameSkeleton as aq, type GameSkeletonProps as ar, Hand as as, HandDock as at, type HandDockMode as au, type HandDockPlacement as av, type HandDockPresentation as aw, type HandDockProps as ax, type HandDockToggleContext as ay, type HandLayout as az, ActionGroup as b, type PlayerScore as b0, type PrimaryActionAttention as b1, PrimaryActionButton as b2, type PrimaryActionButtonProps as b3, PrimaryButton as b4, type PrimaryButtonProps as b5, type ResourceDefinition as b6, Select as b7, SelectContent as b8, SelectItem as b9, type UseHandLayoutReturn as bA, type ZoneDefinition as bB, type ZoneHighlightType as bC, ZoneMap as bD, type ZoneMapProps as bE, type ZonePiece as bF, type ZoneShape as bG, buttonStyle as bH, chipStyle as bI, intentForVariant as bJ, motionDuration as bK, playerColor as bL, surfaceStyle as bM, toAlgebraic as bN, toNumeric as bO, useCardDragSurface as bP, useChromeSuppression as bQ, SelectTrigger as ba, type SlotDefinition as bb, type SlotOccupant as bc, SlotSystem as bd, type SlotSystemProps as be, type SquareEdgePosition as bf, SquareGrid as bg, type SquareGridBoardProps as bh, type SquareGridProps as bi, type SquareVertexPosition as bj, StagingZone as bk, type StagingZoneProps as bl, ThemedButton as bm, type ThemedButtonProps as bn, Toast as bo, ToastActions as bp, type ToastActionsProps as bq, type ToastActionsValue as br, type ToastNotification as bs, ToastProvider as bt, type ToastType as bu, TrackBoard as bv, type TrackBoardProps as bw, type TrackPiece as bx, type TrackSpace as by, type UseHandLayoutOptions as bz, type ActionGroupProps as c, ActionPanel as d, type ActionPanelProps as e, type ButtonVariant$1 as f, type CardDragSurfaceContextValue as g, type CardDragSurfaceController as h, type CardDragSurfaceProps as i, CardDropTargetView as j, type CardDropTargetViewProps as k, CardFace as l, type CardFaceProps as m, type CardPositionProps as n, type CardSize as o, ChromeSuppressionProvider as p, CostDisplay as q, type CostDisplayProps as r, type DefaultChessPieceProps as s, DefaultEmptySlot as t, type DefaultEmptySlotProps as u, DefaultGridCell as v, type DefaultGridCellProps as w, DefaultGridPiece as x, type DefaultGridPieceProps as y, DefaultNetworkEdge as z };
|
|
1300
|
+
export { DialogFooter as $, ActionButton as A, type ButtonSize$1 as B, CardDragSurface as C, DefaultEmptySlot as D, type DefaultNetworkPieceProps as E, DefaultSlotItem as F, type DefaultSlotItemProps as G, DefaultSlotOccupant as H, type DefaultSlotOccupantProps as I, DefaultTrackConnection as J, type DefaultTrackConnectionProps as K, DefaultTrackJump as L, type DefaultTrackJumpProps as M, DefaultTrackPiece as N, type DefaultTrackPieceProps as O, DefaultTrackSpace as P, type DefaultTrackSpaceProps as Q, DefaultZone as R, DefaultZonePiece as S, type DefaultZonePieceProps as T, DefaultZonePieces as U, type DefaultZonePiecesProps as V, type DefaultZoneProps as W, Dialog as X, DialogClose as Y, DialogContent as Z, DialogDescription as _, type ActionButtonProps as a, PlayArea as a$, DialogHeader as a0, DialogOverlay as a1, DialogPortal as a2, DialogTitle as a3, DialogTrigger as a4, DiceRoller as a5, type DiceRollerProps as a6, type DragPhase as a7, Drawer as a8, DrawerClose as a9, type HandLayout as aA, type HandProps as aB, Input as aC, Label as aD, MoreActions as aE, type MoreActionsProps as aF, type NetworkEdge as aG, NetworkGraph as aH, type NetworkGraphProps as aI, type NetworkNode as aJ, type NetworkPiece as aK, OutcomeDialog as aL, type OutcomeDialogProps as aM, Panel as aN, PanelActions as aO, PanelBody as aP, PanelDescription as aQ, type PanelDescriptionProps as aR, PanelHeader as aS, type PanelPartProps as aT, PanelRoot as aU, type PanelRootProps as aV, PanelTitle as aW, type PanelTitleProps as aX, type PanelTone as aY, PhaseIndicator as aZ, type PhaseIndicatorProps as a_, DrawerContent as aa, DrawerDescription as ab, DrawerFooter as ac, DrawerHeader as ad, DrawerOverlay as ae, DrawerPortal as af, DrawerTitle as ag, DrawerTrigger as ah, ErrorBoundary as ai, type ErrorBoundaryProps as aj, GameEventLog as ak, type GameEventLogProps as al, GameSkeleton as am, type GameSkeletonProps as an, type GuidanceAction as ao, GuidancePanel as ap, type GuidancePanelProps as aq, type GuidancePhase as ar, type GuidanceSetupStep as as, Hand as at, HandDock as au, type HandDockMode as av, type HandDockPlacement as aw, type HandDockPresentation as ax, type HandDockProps as ay, type HandDockToggleContext as az, ActionGroup as b, type PlayAreaProps as b0, type PrimaryActionAttention as b1, PrimaryActionButton as b2, type PrimaryActionButtonProps as b3, PrimaryButton as b4, type PrimaryButtonProps as b5, type ResourceDefinition as b6, Select as b7, SelectContent as b8, SelectItem as b9, type TrackSpace as bA, type UseHandLayoutOptions as bB, type UseHandLayoutReturn as bC, type ZoneDefinition as bD, type ZoneHighlightType as bE, ZoneMap as bF, type ZoneMapProps as bG, type ZonePiece as bH, type ZoneShape as bI, buttonStyle as bJ, chipStyle as bK, intentForVariant as bL, motionDuration as bM, playerColor as bN, surfaceStyle as bO, useCardDragSurface as bP, useChromeSuppression as bQ, SelectTrigger as ba, SetupChecklist as bb, type SetupChecklistProps as bc, type SetupGuidance as bd, type SlotDefinition as be, type SlotOccupant as bf, SlotSystem as bg, type SlotSystemProps as bh, StagingZone as bi, type StagingZoneProps as bj, StandingsTable as bk, type StandingsTableProps as bl, SystemActionSummary as bm, type SystemActionSummaryProps as bn, ThemedButton as bo, type ThemedButtonProps as bp, Toast as bq, ToastActions as br, type ToastActionsProps as bs, type ToastActionsValue as bt, type ToastNotification as bu, ToastProvider as bv, type ToastType as bw, TrackBoard as bx, type TrackBoardProps as by, type TrackPiece as bz, type ActionGroupProps as c, ActionHelp as d, type ActionHelpProps as e, ActionPanel as f, type ActionPanelProps as g, type ButtonVariant$1 as h, type CardDragSurfaceContextValue as i, type CardDragSurfaceController as j, type CardDragSurfaceProps as k, CardDropTargetView as l, type CardDropTargetViewProps as m, CardFace as n, type CardFaceProps as o, type CardPositionProps as p, type CardSize as q, ChromeSuppressionProvider as r, CostDisplay as s, type CostDisplayProps as t, type DefaultEmptySlotProps as u, DefaultNetworkEdge as v, type DefaultNetworkEdgeProps as w, DefaultNetworkNode as x, type DefaultNetworkNodeProps as y, DefaultNetworkPiece as z };
|
|
@@ -664,6 +664,185 @@ interface InteractiveTargetRenderState extends InteractiveTargetState {
|
|
|
664
664
|
isHovered: boolean;
|
|
665
665
|
}
|
|
666
666
|
|
|
667
|
+
interface SquareEdgePosition {
|
|
668
|
+
x1: number;
|
|
669
|
+
y1: number;
|
|
670
|
+
x2: number;
|
|
671
|
+
y2: number;
|
|
672
|
+
midX: number;
|
|
673
|
+
midY: number;
|
|
674
|
+
angle: number;
|
|
675
|
+
}
|
|
676
|
+
interface SquareVertexPosition {
|
|
677
|
+
x: number;
|
|
678
|
+
y: number;
|
|
679
|
+
}
|
|
680
|
+
interface InteractiveSquareEdge<TBoard extends AnySquareBoardInput = AnySquareBoardInput> extends NormalizedSquareEdgeOf<TBoard> {
|
|
681
|
+
position: SquareEdgePosition;
|
|
682
|
+
}
|
|
683
|
+
interface InteractiveSquareVertex<TBoard extends AnySquareBoardInput = AnySquareBoardInput> extends NormalizedSquareVertexOf<TBoard> {
|
|
684
|
+
position: SquareVertexPosition;
|
|
685
|
+
}
|
|
686
|
+
type InteractiveSquareSpace<TBoard extends AnySquareBoardInput = AnySquareBoardInput> = NormalizedSquareCellOf<TBoard>;
|
|
687
|
+
interface SquareGeneratedGridInputProps {
|
|
688
|
+
id?: string;
|
|
689
|
+
layout?: "square";
|
|
690
|
+
spaces: Extract<AnySquareBoardInput, {
|
|
691
|
+
spaces: unknown;
|
|
692
|
+
}>["spaces"];
|
|
693
|
+
pieces?: AnySquareBoardInput["pieces"];
|
|
694
|
+
edges?: AnySquareBoardInput["edges"];
|
|
695
|
+
vertices?: AnySquareBoardInput["vertices"];
|
|
696
|
+
}
|
|
697
|
+
interface SquareAuthoredGridInputProps {
|
|
698
|
+
id?: string;
|
|
699
|
+
layout?: "square";
|
|
700
|
+
rows?: number;
|
|
701
|
+
cols?: number;
|
|
702
|
+
cells: Extract<AnySquareBoardInput, {
|
|
703
|
+
cells: unknown;
|
|
704
|
+
}>["cells"];
|
|
705
|
+
pieces?: readonly SquarePieceState[];
|
|
706
|
+
edges?: AnySquareBoardInput["edges"];
|
|
707
|
+
vertices?: AnySquareBoardInput["vertices"];
|
|
708
|
+
}
|
|
709
|
+
type SquareGridInputProps = SquareGeneratedGridInputProps | SquareAuthoredGridInputProps;
|
|
710
|
+
type ResolvedSquareArrayProp<Value> = Exclude<Value, undefined> extends readonly unknown[] ? Exclude<Value, undefined> : readonly [];
|
|
711
|
+
type SquareBoardLikeOfProps<TProps extends SquareGridInputProps> = TProps extends {
|
|
712
|
+
id?: infer Id;
|
|
713
|
+
layout?: infer Layout;
|
|
714
|
+
spaces: infer Spaces;
|
|
715
|
+
pieces?: infer Pieces;
|
|
716
|
+
edges?: infer Edges;
|
|
717
|
+
vertices?: infer Vertices;
|
|
718
|
+
} ? {
|
|
719
|
+
id: Extract<Id, string> extends never ? string : Extract<Id, string>;
|
|
720
|
+
layout?: Extract<Layout, "square">;
|
|
721
|
+
spaces: Spaces;
|
|
722
|
+
pieces: ResolvedSquareArrayProp<Pieces>;
|
|
723
|
+
edges: ResolvedSquareArrayProp<Edges>;
|
|
724
|
+
vertices: ResolvedSquareArrayProp<Vertices>;
|
|
725
|
+
} & GeneratedSquareBoardInput : TProps extends {
|
|
726
|
+
id?: infer Id;
|
|
727
|
+
layout?: infer Layout;
|
|
728
|
+
rows?: infer Rows;
|
|
729
|
+
cols?: infer Cols;
|
|
730
|
+
cells: infer Cells;
|
|
731
|
+
pieces?: infer Pieces;
|
|
732
|
+
edges?: infer Edges;
|
|
733
|
+
vertices?: infer Vertices;
|
|
734
|
+
} ? {
|
|
735
|
+
id: Extract<Id, string> extends never ? string : Extract<Id, string>;
|
|
736
|
+
layout?: Extract<Layout, "square">;
|
|
737
|
+
rows: Extract<Rows, number> extends never ? number : Extract<Rows, number>;
|
|
738
|
+
cols: Extract<Cols, number> extends never ? number : Extract<Cols, number>;
|
|
739
|
+
cells: Cells;
|
|
740
|
+
pieces: ResolvedSquareArrayProp<Pieces>;
|
|
741
|
+
edges: ResolvedSquareArrayProp<Edges>;
|
|
742
|
+
vertices: ResolvedSquareArrayProp<Vertices>;
|
|
743
|
+
} & AuthoredSquareBoardInput : never;
|
|
744
|
+
type SquareGridProps<TProps extends SquareGridInputProps = SquareGridInputProps> = TProps & {
|
|
745
|
+
cellSize?: number;
|
|
746
|
+
/** Receives row/col with transform centered at cell position */
|
|
747
|
+
renderCell: (row: number, col: number) => ReactNode;
|
|
748
|
+
/** Receives piece with transform centered at cell center */
|
|
749
|
+
renderPiece: (piece: NormalizedSquarePieceOf<NoInfer<SquareBoardLikeOfProps<TProps>>>) => ReactNode;
|
|
750
|
+
renderEdge?: (edge: NormalizedSquareEdgeOf<NoInfer<SquareBoardLikeOfProps<TProps>>>, position: SquareEdgePosition) => ReactNode;
|
|
751
|
+
renderVertex?: (vertex: NormalizedSquareVertexOf<NoInfer<SquareBoardLikeOfProps<TProps>>>, position: SquareVertexPosition) => ReactNode;
|
|
752
|
+
showCoordinates?: boolean;
|
|
753
|
+
coordinateStyle?: "algebraic" | "numeric" | "none";
|
|
754
|
+
width?: number | string;
|
|
755
|
+
height?: number | string;
|
|
756
|
+
enablePanZoom?: boolean;
|
|
757
|
+
initialZoom?: number;
|
|
758
|
+
minZoom?: number;
|
|
759
|
+
maxZoom?: number;
|
|
760
|
+
className?: string;
|
|
761
|
+
interactiveSpaces?: InteractiveTargetLayer;
|
|
762
|
+
interactiveEdges?: InteractiveTargetLayer;
|
|
763
|
+
interactiveVertices?: InteractiveTargetLayer;
|
|
764
|
+
renderInteractiveSpace?: (space: InteractiveSquareSpace<NoInfer<SquareBoardLikeOfProps<TProps>>>, state: InteractiveTargetRenderState) => ReactNode;
|
|
765
|
+
renderInteractiveEdge?: (edge: InteractiveSquareEdge<NoInfer<SquareBoardLikeOfProps<TProps>>>, position: SquareEdgePosition, state: InteractiveTargetRenderState) => ReactNode;
|
|
766
|
+
renderInteractiveVertex?: (vertex: InteractiveSquareVertex<NoInfer<SquareBoardLikeOfProps<TProps>>>, position: SquareVertexPosition, state: InteractiveTargetRenderState) => ReactNode;
|
|
767
|
+
};
|
|
768
|
+
interface SquareGridBoardProps<TBoard extends AnySquareBoardInput = AnySquareBoardInput> {
|
|
769
|
+
board: TBoard;
|
|
770
|
+
cellSize?: number;
|
|
771
|
+
renderCell: (row: number, col: number) => ReactNode;
|
|
772
|
+
renderPiece: (piece: NormalizedSquarePieceOf<NoInfer<TBoard>>) => ReactNode;
|
|
773
|
+
renderEdge?: (edge: NormalizedSquareEdgeOf<NoInfer<TBoard>>, position: SquareEdgePosition) => ReactNode;
|
|
774
|
+
renderVertex?: (vertex: NormalizedSquareVertexOf<NoInfer<TBoard>>, position: SquareVertexPosition) => ReactNode;
|
|
775
|
+
showCoordinates?: boolean;
|
|
776
|
+
coordinateStyle?: "algebraic" | "numeric" | "none";
|
|
777
|
+
width?: number | string;
|
|
778
|
+
height?: number | string;
|
|
779
|
+
enablePanZoom?: boolean;
|
|
780
|
+
initialZoom?: number;
|
|
781
|
+
minZoom?: number;
|
|
782
|
+
maxZoom?: number;
|
|
783
|
+
className?: string;
|
|
784
|
+
interactiveSpaces?: InteractiveTargetLayer;
|
|
785
|
+
interactiveEdges?: InteractiveTargetLayer;
|
|
786
|
+
interactiveVertices?: InteractiveTargetLayer;
|
|
787
|
+
renderInteractiveSpace?: (space: InteractiveSquareSpace<NoInfer<TBoard>>, state: InteractiveTargetRenderState) => ReactNode;
|
|
788
|
+
renderInteractiveEdge?: (edge: InteractiveSquareEdge<NoInfer<TBoard>>, position: SquareEdgePosition, state: InteractiveTargetRenderState) => ReactNode;
|
|
789
|
+
renderInteractiveVertex?: (vertex: InteractiveSquareVertex<NoInfer<TBoard>>, position: SquareVertexPosition, state: InteractiveTargetRenderState) => ReactNode;
|
|
790
|
+
}
|
|
791
|
+
interface DefaultGridCellProps {
|
|
792
|
+
size: number;
|
|
793
|
+
isLight?: boolean;
|
|
794
|
+
lightColor?: string;
|
|
795
|
+
darkColor?: string;
|
|
796
|
+
isHighlighted?: boolean;
|
|
797
|
+
highlightColor?: string;
|
|
798
|
+
isSelected?: boolean;
|
|
799
|
+
selectedColor?: string;
|
|
800
|
+
isValidMove?: boolean;
|
|
801
|
+
isCapture?: boolean;
|
|
802
|
+
onClick?: () => void;
|
|
803
|
+
onPointerEnter?: () => void;
|
|
804
|
+
onPointerLeave?: () => void;
|
|
805
|
+
className?: string;
|
|
806
|
+
}
|
|
807
|
+
/** Pre-built grid cell component for use in `renderCell`. */
|
|
808
|
+
declare function DefaultGridCell({ size, isLight, lightColor, darkColor, isHighlighted, highlightColor, isSelected, selectedColor, isValidMove, isCapture, onClick, onPointerEnter, onPointerLeave, className, }: DefaultGridCellProps): react_jsx_runtime.JSX.Element;
|
|
809
|
+
interface DefaultGridPieceProps {
|
|
810
|
+
size: number;
|
|
811
|
+
color?: string;
|
|
812
|
+
strokeColor?: string;
|
|
813
|
+
label?: string;
|
|
814
|
+
isDragging?: boolean;
|
|
815
|
+
onClick?: () => void;
|
|
816
|
+
onPointerDown?: (e: React.PointerEvent) => void;
|
|
817
|
+
className?: string;
|
|
818
|
+
}
|
|
819
|
+
/** Pre-built grid piece component for use in `renderPiece`. */
|
|
820
|
+
declare function DefaultGridPiece({ size, color, strokeColor, label, isDragging, onClick, onPointerDown, className, }: DefaultGridPieceProps): react_jsx_runtime.JSX.Element;
|
|
821
|
+
interface DefaultChessPieceProps {
|
|
822
|
+
size: number;
|
|
823
|
+
type: string;
|
|
824
|
+
owner: "white" | "black";
|
|
825
|
+
onClick?: () => void;
|
|
826
|
+
onPointerDown?: (e: React.PointerEvent) => void;
|
|
827
|
+
className?: string;
|
|
828
|
+
}
|
|
829
|
+
/** Pre-built chess piece component using Unicode symbols. */
|
|
830
|
+
declare function DefaultChessPiece({ size, type, owner, onClick, onPointerDown, className, }: DefaultChessPieceProps): react_jsx_runtime.JSX.Element;
|
|
831
|
+
/**
|
|
832
|
+
* Convert row/col to algebraic notation (a1, b2, etc.)
|
|
833
|
+
*/
|
|
834
|
+
declare function toAlgebraic(row: number, col: number, totalRows: number): string;
|
|
835
|
+
/**
|
|
836
|
+
* Convert row/col to numeric notation (1,1, 2,3, etc.)
|
|
837
|
+
*/
|
|
838
|
+
declare function toNumeric(row: number, col: number): string;
|
|
839
|
+
interface SquareGridComponent {
|
|
840
|
+
<const TBoard extends AnySquareBoardInput>(props: SquareGridBoardProps<TBoard>): ReactNode;
|
|
841
|
+
<const TProps extends SquareGeneratedGridInputProps>(props: SquareGridProps<TProps>): ReactNode;
|
|
842
|
+
<const TProps extends SquareAuthoredGridInputProps>(props: SquareGridProps<TProps>): ReactNode;
|
|
843
|
+
}
|
|
844
|
+
declare const SquareGrid: SquareGridComponent;
|
|
845
|
+
|
|
667
846
|
type HexOrientation = "pointy-top" | "flat-top";
|
|
668
847
|
/**
|
|
669
848
|
* Geometry context passed to `renderTile`.
|
|
@@ -1046,4 +1225,4 @@ declare function createHexBoardView<const TBoard extends AnyHexBoardInput, const
|
|
|
1046
1225
|
id: BoardSpaceIdOf<TBoard>;
|
|
1047
1226
|
}>(board: TBoard, options: CreateHexBoardViewOptions<TSpaceView>): HexBoardView<TBoard, TSpaceView>;
|
|
1048
1227
|
|
|
1049
|
-
export { type
|
|
1228
|
+
export { type NormalizedHexVertexOf as $, type AnyHexBoardInput as A, type BoardEdgeIdOf as B, type CardDropTargetVisualState as C, DefaultChessPiece as D, type EdgePosition as E, type FoundationColor as F, type GeneratedHexBoardInput as G, type HexBoardInput as H, type HexBoardViewTile as I, HexGrid as J, type HexGridBoardProps as K, type HexGridProps as L, type HexOrientation as M, type HexTileGeometry as N, type IntentColor as O, type InteractionVisualState as P, type InteractiveHexEdge as Q, type InteractiveHexVertex as R, type InteractiveSquareEdge as S, type InteractiveSquareVertex as T, type InteractiveTargetLayer as U, type InteractiveTargetRenderState as V, type InteractiveTargetState as W, type Motion as X, type NormalizedHexBoard as Y, type NormalizedHexEdgeOf as Z, type NormalizedHexTileOf as _, type AnySquareBoardInput as a, type NormalizedSquareBoard as a0, type NormalizedSquareCellOf as a1, type NormalizedSquareEdgeOf as a2, type NormalizedSquarePieceOf as a3, type NormalizedSquareVertexOf as a4, type PlayerColor as a5, type Radius as a6, type SemanticColor as a7, type Space as a8, type SquareBoardInput as a9, type SquareEdgePosition as aa, SquareGrid as ab, type SquareGridBoardProps as ac, type SquareGridProps as ad, type SquareVertexPosition as ae, type TargetIntent as af, type Theme as ag, type ThemeMeta as ah, type ThemeOverride as ai, type Typography as aj, createHexBoardView as ak, dropTargetVisualStateDataAttributes as al, hexUtils as am, mergeTheme as an, normalizeHexBoardInput as ao, normalizeSquareBoardInput as ap, toAlgebraic as aq, toNumeric as ar, visualStateDataAttributes as as, type AuthoredHexBoardInput as b, type AuthoredSquareBoardInput as c, type BoardSpaceIdOf as d, type BoardVertexIdOf as e, type CardIntent as f, type ColorRamp as g, type ComponentTokens as h, type DefaultChessPieceProps as i, DefaultGridCell as j, type DefaultGridCellProps as k, DefaultGridPiece as l, type DefaultGridPieceProps as m, DefaultHexEdge as n, type DefaultHexEdgeProps as o, DefaultHexTile as p, type DefaultHexTileProps as q, DefaultHexVertex as r, type DefaultHexVertexProps as s, type Elevation as t, type GeneratedHexSpaceStateLike as u, type GeneratedSquareBoardInput as v, type GeneratedSquareSpaceStateLike as w, type GeneratedTiledEdgeStateLike as x, type GeneratedTiledVertexStateLike as y, type HexBoardView as z };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ReactNode, ReactElement, ButtonHTMLAttributes } from 'react';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import { m as BoardSpaceTargetProps, bl as ZoneListProps, b5 as UIContract } from './ui-contract-Ue6SywvO.js';
|
|
3
|
+
import { P as InteractionVisualState } from './hex-board-view-aKkblDp6.js';
|
|
4
4
|
import { H as HandRole } from './ResourceCounter-BFxJknqp.js';
|
|
5
5
|
|
|
6
6
|
interface ClientParamSchema {
|
|
@@ -154,7 +154,7 @@ type WorkspaceSurfaceDescriptor = WorkspaceBoardSurfaceDescriptor | WorkspaceHan
|
|
|
154
154
|
interface WorkspaceSurfaceSpec {
|
|
155
155
|
readonly [key: string]: WorkspaceSurfaceDescriptor | WorkspaceSurfaceSpec;
|
|
156
156
|
}
|
|
157
|
-
interface WorkspaceContractOptions<Contract extends UIContract, Resource extends string, Card, HexBoards extends Record<string, unknown>> {
|
|
157
|
+
interface WorkspaceContractOptions<Contract extends UIContract, Resource extends string, Card, HexBoards extends Record<string, unknown>, SquareBoards extends Record<string, unknown> = Record<string, unknown>> {
|
|
158
158
|
readonly uiContract: Contract;
|
|
159
159
|
readonly clientParamSchemasByPhase?: ClientParamSchemaMap;
|
|
160
160
|
readonly formInputKeysForInteraction: (interaction: string) => ReadonlySet<string>;
|
|
@@ -164,6 +164,7 @@ interface WorkspaceContractOptions<Contract extends UIContract, Resource extends
|
|
|
164
164
|
icon?: string;
|
|
165
165
|
}>>;
|
|
166
166
|
readonly hexStaticBoards: HexBoards;
|
|
167
|
+
readonly squareStaticBoards?: SquareBoards;
|
|
167
168
|
readonly cardIdFromZoneCard: (card: Card) => string;
|
|
168
169
|
readonly zoneIdFromZoneCard: (card: Card) => string;
|
|
169
170
|
}
|
|
@@ -187,6 +188,6 @@ interface DefineGameUIConfig<GameState, Surfaces> {
|
|
|
187
188
|
fallback?: ReactNode | ((phase: string | null) => ReactNode);
|
|
188
189
|
includeUnavailableInteractions?: boolean | null;
|
|
189
190
|
}
|
|
190
|
-
declare function createWorkspaceUIContract<WorkspaceUI, Contract extends UIContract, Resource extends string, Card, HexBoards extends Record<string, unknown>>(options: WorkspaceContractOptions<Contract, Resource, Card, HexBoards>): WorkspaceUI;
|
|
191
|
+
declare function createWorkspaceUIContract<WorkspaceUI, Contract extends UIContract, Resource extends string, Card, HexBoards extends Record<string, unknown>, SquareBoards extends Record<string, unknown> = Record<string, unknown>>(options: WorkspaceContractOptions<Contract, Resource, Card, HexBoards, SquareBoards>): WorkspaceUI;
|
|
191
192
|
|
|
192
193
|
export { type ClientParamSchemaMap as C, type DefineGameUIConfig as D, type WorkspaceBoardSurface as W, type WorkspaceBoardSurfaceDescriptor as a, type WorkspaceBoardTargetInputSlot as b, type WorkspaceCardCollectionSurface as c, type WorkspaceCardCollectionSurfaceDescriptor as d, type WorkspaceCardInputSlot as e, type WorkspaceFormInputSlot as f, type WorkspaceHandSurface as g, type WorkspaceHandSurfaceDescriptor as h, type WorkspaceInteractionFormDescriptor as i, type WorkspaceInteractionFormsDescriptor as j, type WorkspaceInteractionSlotComponent as k, type WorkspacePileSurface as l, type WorkspacePileSurfaceDescriptor as m, type WorkspacePilesSurfaceDescriptor as n, type WorkspaceSurfaceSpec as o, createWorkspaceUIContract as p };
|