@dreamboard-games/sdk 0.5.0-alpha.2 → 0.5.0-alpha.3
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 +136 -45
- package/dist/chunk-DMFVAZI2.js +16 -0
- package/dist/chunk-DMFVAZI2.js.map +1 -0
- package/dist/chunk-FMM5LVJW.js +833 -0
- package/dist/chunk-FMM5LVJW.js.map +1 -0
- package/dist/{chunk-S2JEDVWH.js → chunk-LRILEVKC.js} +6113 -6489
- package/dist/chunk-LRILEVKC.js.map +1 -0
- package/dist/chunk-SP234IY4.js +1363 -0
- package/dist/chunk-SP234IY4.js.map +1 -0
- package/dist/chunk-VUWNJXLJ.js +52 -0
- package/dist/chunk-VUWNJXLJ.js.map +1 -0
- package/dist/chunk-ZPRKWPEP.js +511 -0
- package/dist/chunk-ZPRKWPEP.js.map +1 -0
- package/dist/definition-BaHNPZol.d.ts +4639 -0
- package/dist/diagnostics-B0lgnuZ6.d.ts +65 -0
- package/dist/index.d.ts +3553 -1
- package/dist/index.js +1045 -6
- package/dist/index.js.map +1 -1
- package/dist/model-BHro6yXu.d.ts +288 -0
- package/dist/react.d.ts +32 -0
- package/dist/react.js +80 -0
- package/dist/react.js.map +1 -0
- package/dist/reducer.d.ts +1194 -79
- package/dist/reducer.js +4326 -121
- package/dist/reducer.js.map +1 -1
- package/dist/testing.d.ts +518 -564
- package/dist/testing.js +2448 -915
- package/dist/testing.js.map +1 -1
- package/dist/types-DimqnJBq.d.ts +86 -0
- package/package.json +26 -131
- package/dist/HandView-Bi2lxzQP.d.ts +0 -79
- package/dist/ResourceCounter-BFxJknqp.d.ts +0 -98
- package/dist/ThemeProvider-CElaL2ik.d.ts +0 -99
- package/dist/attributes-DbvyMbXw.d.ts +0 -68
- package/dist/browser-interaction.d.ts +0 -910
- package/dist/browser-interaction.js +0 -119
- package/dist/browser-interaction.js.map +0 -1
- package/dist/chunk-32PFKDV7.js +0 -11705
- package/dist/chunk-32PFKDV7.js.map +0 -1
- package/dist/chunk-3BAD4VC2.js +0 -263
- package/dist/chunk-3BAD4VC2.js.map +0 -1
- package/dist/chunk-3SKDNDPG.js +0 -104
- package/dist/chunk-3SKDNDPG.js.map +0 -1
- package/dist/chunk-5YV2WHJ4.js +0 -25
- package/dist/chunk-5YV2WHJ4.js.map +0 -1
- package/dist/chunk-ANRB4XKA.js +0 -90
- package/dist/chunk-ANRB4XKA.js.map +0 -1
- package/dist/chunk-BI4G3PM2.js +0 -1864
- package/dist/chunk-BI4G3PM2.js.map +0 -1
- package/dist/chunk-EVCLTY4Q.js +0 -935
- package/dist/chunk-EVCLTY4Q.js.map +0 -1
- package/dist/chunk-GDPKTBUR.js +0 -564
- package/dist/chunk-GDPKTBUR.js.map +0 -1
- package/dist/chunk-H6VDGFL5.js +0 -2903
- package/dist/chunk-H6VDGFL5.js.map +0 -1
- package/dist/chunk-LR3ZTWQF.js +0 -5960
- package/dist/chunk-LR3ZTWQF.js.map +0 -1
- package/dist/chunk-PF7L4BMG.js +0 -117
- package/dist/chunk-PF7L4BMG.js.map +0 -1
- package/dist/chunk-PN5O6GG2.js +0 -32
- package/dist/chunk-PN5O6GG2.js.map +0 -1
- package/dist/chunk-PZ5AY32C.js +0 -10
- package/dist/chunk-PZ5AY32C.js.map +0 -1
- package/dist/chunk-S2JEDVWH.js.map +0 -1
- package/dist/chunk-T3ZKNUZ7.js +0 -1
- package/dist/chunk-T3ZKNUZ7.js.map +0 -1
- package/dist/chunk-UGH54WZ2.js +0 -223
- package/dist/chunk-UGH54WZ2.js.map +0 -1
- package/dist/chunk-VCDWP5VL.js +0 -746
- package/dist/chunk-VCDWP5VL.js.map +0 -1
- package/dist/chunk-VDXOF4FW.js +0 -69
- package/dist/chunk-VDXOF4FW.js.map +0 -1
- package/dist/chunk-WHR5UW3F.js +0 -1988
- package/dist/chunk-WHR5UW3F.js.map +0 -1
- package/dist/chunk-Y75CFE77.js +0 -17
- package/dist/chunk-Y75CFE77.js.map +0 -1
- package/dist/chunk-Z7QCREWI.js +0 -3435
- package/dist/chunk-Z7QCREWI.js.map +0 -1
- package/dist/chunk-ZZGN2ATS.js +0 -1941
- package/dist/chunk-ZZGN2ATS.js.map +0 -1
- package/dist/components-gAbIz7hK.d.ts +0 -1284
- package/dist/definitions-BgmV_GhC.d.ts +0 -300
- package/dist/diagnostics-DIi3ina7.d.ts +0 -50
- package/dist/digest.d.ts +0 -8
- package/dist/game-CsZScpcn.d.ts +0 -763
- package/dist/hex-board-view-aKkblDp6.d.ts +0 -1228
- package/dist/index-CcT9Q7N7.d.ts +0 -193
- package/dist/index.d-DjzoK7zn.d.ts +0 -2101
- package/dist/package-set.d.ts +0 -13
- package/dist/package-set.js +0 -12
- package/dist/package-set.js.map +0 -1
- package/dist/player-state-Cqpyeql0.d.ts +0 -371
- package/dist/plugin-runtime-contract.d.ts +0 -17
- package/dist/plugin-runtime-contract.js +0 -92
- package/dist/plugin-runtime-contract.js.map +0 -1
- package/dist/primitive-props-BNHDkgd7.d.ts +0 -16
- package/dist/protocol-dYgafTYY.d.ts +0 -314
- package/dist/reducer/advanced.d.ts +0 -82
- package/dist/reducer/advanced.js +0 -51
- package/dist/reducer/advanced.js.map +0 -1
- package/dist/reducer-contract.d.ts +0 -11
- package/dist/reducer-contract.js +0 -16
- package/dist/reducer-contract.js.map +0 -1
- package/dist/reference-games/index.d.ts +0 -31
- package/dist/reference-games/index.js +0 -48
- package/dist/reference-games/index.js.map +0 -1
- package/dist/runtime/primitives.d.ts +0 -250
- package/dist/runtime/primitives.js +0 -189
- package/dist/runtime/primitives.js.map +0 -1
- package/dist/runtime/runtime-api.d.ts +0 -2
- package/dist/runtime/runtime-api.js +0 -1
- package/dist/runtime/runtime-api.js.map +0 -1
- package/dist/runtime/workspace-contract.d.ts +0 -392
- package/dist/runtime/workspace-contract.js +0 -28
- package/dist/runtime/workspace-contract.js.map +0 -1
- package/dist/runtime-RJ5orDJU.d.ts +0 -1699
- package/dist/runtime-api-Bz5pwNU_.d.ts +0 -296
- package/dist/runtime-json-CQ9QbLZ5.d.ts +0 -5
- package/dist/runtime.d.ts +0 -83
- package/dist/runtime.js +0 -242
- package/dist/runtime.js.map +0 -1
- package/dist/schema.d.ts +0 -379
- package/dist/stale-contract-artifact-error-XLaweZtF.d.ts +0 -18
- package/dist/testing-compiler.d.ts +0 -37
- package/dist/testing-compiler.js +0 -272
- package/dist/testing-compiler.js.map +0 -1
- package/dist/testing-runtime.d.ts +0 -119
- package/dist/testing-runtime.js +0 -212
- package/dist/testing-runtime.js.map +0 -1
- package/dist/types-DJj5MJkl.d.ts +0 -256
- package/dist/types-DR7DoB1x.d.ts +0 -28
- package/dist/types-JWCYHmu7.d.ts +0 -122
- package/dist/types.d.ts +0 -1958
- package/dist/types.js +0 -14
- package/dist/types.js.map +0 -1
- package/dist/ui/components.d.ts +0 -17
- package/dist/ui/components.js +0 -216
- package/dist/ui/components.js.map +0 -1
- package/dist/ui/defaults.d.ts +0 -19
- package/dist/ui/defaults.js +0 -104
- package/dist/ui/defaults.js.map +0 -1
- package/dist/ui/player-state.d.ts +0 -2
- package/dist/ui/player-state.js +0 -1
- package/dist/ui/player-state.js.map +0 -1
- package/dist/ui/plugin-styles.css +0 -2
- package/dist/ui-contract-GTUPkf8z.d.ts +0 -1168
- package/dist/ui.d.ts +0 -317
- package/dist/ui.js +0 -277
- package/dist/ui.js.map +0 -1
- package/dist/views-BpuWcOyN.d.ts +0 -1641
|
@@ -1,1168 +0,0 @@
|
|
|
1
|
-
import * as react from 'react';
|
|
2
|
-
import { ReactNode, ButtonHTMLAttributes, CSSProperties, HTMLAttributes, InputHTMLAttributes, ReactElement } from 'react';
|
|
3
|
-
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
4
|
-
import { W as InteractiveTargetState$1, A as AnyHexBoardInput, d as BoardSpaceIdOf, K as HexGridBoardProps, z as HexBoardView, a as AnySquareBoardInput, ac as SquareGridBoardProps, ag as Theme, ai as ThemeOverride } from './hex-board-view-aKkblDp6.js';
|
|
5
|
-
import { a as ThemePresetId } from './ThemeProvider-CElaL2ik.js';
|
|
6
|
-
import { b as InteractionDescriptor, Z as ZoneHandlesSnapshot, d as PluginSessionState, P as PlayerId, I as InputDomain, c as InteractionInputDescriptor } from './runtime-api-Bz5pwNU_.js';
|
|
7
|
-
import { ViewCard } from './types.js';
|
|
8
|
-
import { P as PrimitiveCommonProps } from './primitive-props-BNHDkgd7.js';
|
|
9
|
-
import { a as BrowserInteractionAttributeMap } from './attributes-DbvyMbXw.js';
|
|
10
|
-
import { t as Player, j as HexColor } from './player-state-Cqpyeql0.js';
|
|
11
|
-
|
|
12
|
-
type BoardTargetKind = "edge" | "vertex" | "space" | "tile";
|
|
13
|
-
|
|
14
|
-
/**
|
|
15
|
-
* Runtime extension of the ui target-layer types. The base shapes and the
|
|
16
|
-
* render-state computation live in `src/ui/components/board/target-layer.ts`;
|
|
17
|
-
* this module only widens the per-target state with the interaction metadata
|
|
18
|
-
* the runtime layer attaches (interaction keys, conflict tracking, gameplay
|
|
19
|
-
* browser attributes).
|
|
20
|
-
*/
|
|
21
|
-
|
|
22
|
-
interface InteractiveTargetState extends InteractiveTargetState$1 {
|
|
23
|
-
kind?: BoardTargetKind;
|
|
24
|
-
interactionKey?: string;
|
|
25
|
-
interactionId?: string;
|
|
26
|
-
inputKey?: string;
|
|
27
|
-
conflictInteractionKeys?: readonly string[];
|
|
28
|
-
browserAttributes?: BrowserInteractionAttributeMap;
|
|
29
|
-
}
|
|
30
|
-
interface InteractiveTargetLayer {
|
|
31
|
-
enabled?: boolean;
|
|
32
|
-
eligible?: ReadonlySet<string>;
|
|
33
|
-
selectTargetId?: (targetId: string) => unknown | Promise<unknown>;
|
|
34
|
-
targetState?: (targetId: string) => Partial<InteractiveTargetState>;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
type BoardEligibleTargets = Readonly<Record<BoardTargetKind, ReadonlySet<string>>>;
|
|
38
|
-
interface BoardTargetLayerOptions {
|
|
39
|
-
enabled?: boolean;
|
|
40
|
-
interactionKeys?: readonly string[];
|
|
41
|
-
extraInputs?: Record<string, unknown> | ((targetId: string) => Record<string, unknown>);
|
|
42
|
-
onBeforeSelect?: () => void;
|
|
43
|
-
onError?: (error: unknown) => void;
|
|
44
|
-
}
|
|
45
|
-
type BoardTargetLayerFactory = (options?: BoardTargetLayerOptions) => InteractiveTargetLayer;
|
|
46
|
-
type BoardSelectionResult<I extends string = string> = {
|
|
47
|
-
status: "none";
|
|
48
|
-
} | {
|
|
49
|
-
status: "pending";
|
|
50
|
-
interactionKey: I;
|
|
51
|
-
descriptor: InteractionDescriptor<I>;
|
|
52
|
-
missingInputs: readonly string[];
|
|
53
|
-
} | {
|
|
54
|
-
status: "submitted";
|
|
55
|
-
interactionKey: I;
|
|
56
|
-
descriptor: InteractionDescriptor<I>;
|
|
57
|
-
};
|
|
58
|
-
interface BoardPendingInteraction<I extends string = string> {
|
|
59
|
-
interactionKey: I;
|
|
60
|
-
descriptor: InteractionDescriptor<I>;
|
|
61
|
-
missingInputs: readonly string[];
|
|
62
|
-
clear(): void;
|
|
63
|
-
}
|
|
64
|
-
/**
|
|
65
|
-
* Opinionated board-level dispatch context. Collapses the repeated
|
|
66
|
-
* "collect every board handle, merge target domains across them,
|
|
67
|
-
* route each click into the right interaction" pattern that advanced
|
|
68
|
-
* board games (Catan-class) otherwise have to re-implement by hand.
|
|
69
|
-
*/
|
|
70
|
-
interface BoardInteractionsContext<I extends string = string> {
|
|
71
|
-
/**
|
|
72
|
-
* All board-surface interactions projected onto the controlling seat
|
|
73
|
-
* — both available and unavailable. Rendered greyed-out states can
|
|
74
|
-
* key off this even when the interaction isn't dispatchable yet.
|
|
75
|
-
*/
|
|
76
|
-
interactions: ReadonlyArray<InteractionDescriptor<I>>;
|
|
77
|
-
/**
|
|
78
|
-
* Per-target-kind eligibility sets merged across every currently-
|
|
79
|
-
* available board interaction. `eligible.vertex` answers "which
|
|
80
|
-
* vertex ids can be clicked right now?" without the caller manually
|
|
81
|
-
* unioning descriptor eligibility across handles or knowing the
|
|
82
|
-
* authored input key.
|
|
83
|
-
*/
|
|
84
|
-
eligible: BoardEligibleTargets;
|
|
85
|
-
/**
|
|
86
|
-
* True when `targetId` is eligible for at least one available
|
|
87
|
-
* interaction. Pass `kind` to scope the check to a specific
|
|
88
|
-
* board target kind.
|
|
89
|
-
*/
|
|
90
|
-
isEligible(targetId: string, kind?: BoardTargetKind): boolean;
|
|
91
|
-
/**
|
|
92
|
-
* Target-kind dispatch. Routes by board geometry (`edge`, `vertex`,
|
|
93
|
-
* `space`, `tile`) rather than authored input-key strings.
|
|
94
|
-
*/
|
|
95
|
-
pendingInteraction: BoardPendingInteraction<I> | null;
|
|
96
|
-
select: {
|
|
97
|
-
edge(targetId: string, extraInputs?: Record<string, unknown>): Promise<BoardSelectionResult<I>>;
|
|
98
|
-
vertex(targetId: string, extraInputs?: Record<string, unknown>): Promise<BoardSelectionResult<I>>;
|
|
99
|
-
space(targetId: string, extraInputs?: Record<string, unknown>): Promise<BoardSelectionResult<I>>;
|
|
100
|
-
tile(targetId: string, extraInputs?: Record<string, unknown>): Promise<BoardSelectionResult<I>>;
|
|
101
|
-
};
|
|
102
|
-
/**
|
|
103
|
-
* Reducer-aware target layers for board primitives. Pass these directly
|
|
104
|
-
* to grids so eligibility, dispatch, and submit error handling stay in
|
|
105
|
-
* one place instead of being re-wired per component.
|
|
106
|
-
*/
|
|
107
|
-
targetLayers: {
|
|
108
|
-
edge: BoardTargetLayerFactory;
|
|
109
|
-
vertex: BoardTargetLayerFactory;
|
|
110
|
-
space: BoardTargetLayerFactory;
|
|
111
|
-
tile: BoardTargetLayerFactory;
|
|
112
|
-
};
|
|
113
|
-
targetState(targetKind: BoardTargetKind, targetId: string, options?: Pick<BoardTargetLayerOptions, "enabled" | "interactionKeys">): InteractiveTargetState;
|
|
114
|
-
selectTarget(descriptor: InteractionDescriptor<I>, targetKind: BoardTargetKind, targetId: string, inputKey: string, extraInputs?: Record<string, unknown>): Promise<BoardSelectionResult<I>>;
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
type BoardContextValue = BoardInteractionsContext;
|
|
118
|
-
declare function useBoardPrimitiveContext(): BoardContextValue;
|
|
119
|
-
interface BoardRootProps extends PrimitiveCommonProps {
|
|
120
|
-
children: ReactNode;
|
|
121
|
-
targetKinds?: readonly BoardTargetKind[];
|
|
122
|
-
}
|
|
123
|
-
declare function BoardRoot({ children, targetKinds, ...props }: BoardRootProps): react_jsx_runtime.JSX.Element;
|
|
124
|
-
interface BoardStateProps {
|
|
125
|
-
children: (board: BoardInteractionsContext) => ReactNode;
|
|
126
|
-
}
|
|
127
|
-
declare function BoardState({ children }: BoardStateProps): react_jsx_runtime.JSX.Element;
|
|
128
|
-
interface BoardHexViewProps<TBoard extends AnyHexBoardInput, TSpaceView extends {
|
|
129
|
-
id: BoardSpaceIdOf<TBoard>;
|
|
130
|
-
}> {
|
|
131
|
-
board: TBoard;
|
|
132
|
-
spaces: readonly TSpaceView[];
|
|
133
|
-
children: (view: HexBoardView<TBoard, TSpaceView>) => ReactNode;
|
|
134
|
-
}
|
|
135
|
-
declare function BoardHexView<const TBoard extends AnyHexBoardInput, const TSpaceView extends {
|
|
136
|
-
id: BoardSpaceIdOf<TBoard>;
|
|
137
|
-
}>({ board, spaces, children }: BoardHexViewProps<TBoard, TSpaceView>): react_jsx_runtime.JSX.Element;
|
|
138
|
-
interface BoardHexGridInteractions {
|
|
139
|
-
edge?: BoardTargetLayerOptions;
|
|
140
|
-
vertex?: BoardTargetLayerOptions;
|
|
141
|
-
space?: BoardTargetLayerOptions;
|
|
142
|
-
}
|
|
143
|
-
type BoardGridInteractionFilter<Key extends string = string> = "auto" | false | {
|
|
144
|
-
edge?: readonly Key[];
|
|
145
|
-
vertex?: readonly Key[];
|
|
146
|
-
space?: readonly Key[];
|
|
147
|
-
};
|
|
148
|
-
type BoardHexGridInteractionFilter = BoardGridInteractionFilter<string>;
|
|
149
|
-
type BoardSquareGridInteractionFilter = BoardGridInteractionFilter<string>;
|
|
150
|
-
type BoardHexGridView<TBoard extends AnyHexBoardInput, TSpaceView extends {
|
|
151
|
-
id: BoardSpaceIdOf<TBoard>;
|
|
152
|
-
}> = HexBoardView<TBoard, TSpaceView> & AnyHexBoardInput;
|
|
153
|
-
type BoardHexGridProps<TBoard extends AnyHexBoardInput, TSpaceView extends {
|
|
154
|
-
id: BoardSpaceIdOf<TBoard>;
|
|
155
|
-
}> = Omit<HexGridBoardProps<BoardHexGridView<TBoard, TSpaceView>>, "board" | "interactiveEdges" | "interactiveVertices" | "interactiveSpaces"> & Omit<BoardHexViewProps<TBoard, TSpaceView>, "children"> & {
|
|
156
|
-
interactions?: BoardHexGridInteractionFilter;
|
|
157
|
-
};
|
|
158
|
-
declare function BoardHexGrid<const TBoard extends AnyHexBoardInput, const TSpaceView extends {
|
|
159
|
-
id: BoardSpaceIdOf<TBoard>;
|
|
160
|
-
}>({ board, spaces, interactions, ...props }: BoardHexGridProps<TBoard, TSpaceView>): react_jsx_runtime.JSX.Element;
|
|
161
|
-
type BoardSquareGridProps<TBoard extends AnySquareBoardInput> = Omit<SquareGridBoardProps<TBoard>, "interactiveEdges" | "interactiveVertices" | "interactiveSpaces"> & {
|
|
162
|
-
interactions?: BoardSquareGridInteractionFilter;
|
|
163
|
-
};
|
|
164
|
-
declare function BoardSquareGrid<const TBoard extends AnySquareBoardInput>({ board, interactions, ...props }: BoardSquareGridProps<TBoard>): react_jsx_runtime.JSX.Element;
|
|
165
|
-
type BoardTargetExtraInputs = Record<string, unknown> | ((targetId: string) => Record<string, unknown>);
|
|
166
|
-
type BoardTargetProps<Target extends string = BoardTargetKey> = PrimitiveCommonProps & ButtonHTMLAttributes<HTMLButtonElement> & {
|
|
167
|
-
kind: BoardTargetKind;
|
|
168
|
-
value: Target;
|
|
169
|
-
interaction?: string;
|
|
170
|
-
input?: string;
|
|
171
|
-
extraInputs?: BoardTargetExtraInputs;
|
|
172
|
-
onSelect?: (result: BoardSelectionResult) => void;
|
|
173
|
-
onSelectError?: (error: unknown) => void;
|
|
174
|
-
};
|
|
175
|
-
declare function BoardTarget<Target extends string = BoardTargetKey>({ interaction, input, ...props }: BoardTargetProps<Target>): react_jsx_runtime.JSX.Element;
|
|
176
|
-
type BoardSpaceTargetProps<Target extends string = BoardTargetKey> = Omit<BoardTargetProps<Target>, "kind">;
|
|
177
|
-
declare function BoardSpaceTarget<Target extends string = BoardTargetKey>(props: BoardSpaceTargetProps<Target>): react_jsx_runtime.JSX.Element;
|
|
178
|
-
type BoardEdgeTargetProps<Target extends string = BoardTargetKey> = Omit<BoardTargetProps<Target>, "kind">;
|
|
179
|
-
declare function BoardEdgeTarget<Target extends string = BoardTargetKey>(props: BoardEdgeTargetProps<Target>): react_jsx_runtime.JSX.Element;
|
|
180
|
-
type BoardVertexTargetProps<Target extends string = BoardTargetKey> = Omit<BoardTargetProps<Target>, "kind">;
|
|
181
|
-
declare function BoardVertexTarget<Target extends string = BoardTargetKey>(props: BoardVertexTargetProps<Target>): react_jsx_runtime.JSX.Element;
|
|
182
|
-
declare const Board: {
|
|
183
|
-
Root: typeof BoardRoot;
|
|
184
|
-
State: typeof BoardState;
|
|
185
|
-
HexGrid: typeof BoardHexGrid;
|
|
186
|
-
HexView: typeof BoardHexView;
|
|
187
|
-
SquareGrid: typeof BoardSquareGrid;
|
|
188
|
-
Target: typeof BoardTarget;
|
|
189
|
-
SpaceTarget: typeof BoardSpaceTarget;
|
|
190
|
-
EdgeTarget: typeof BoardEdgeTarget;
|
|
191
|
-
VertexTarget: typeof BoardVertexTarget;
|
|
192
|
-
};
|
|
193
|
-
|
|
194
|
-
interface UIRootProps {
|
|
195
|
-
/**
|
|
196
|
-
* Preset id, a full Theme, or omitted to defer to the host-mounted theme.
|
|
197
|
-
* When omitted, no provider is mounted and existing parent themes apply.
|
|
198
|
-
*/
|
|
199
|
-
theme?: ThemePresetId | Theme;
|
|
200
|
-
/** Deep-partial overrides forwarded to the SDK ThemeProvider. */
|
|
201
|
-
themeOverride?: ThemeOverride;
|
|
202
|
-
/** Forwarded to the SDK ThemeProvider. */
|
|
203
|
-
reducedMotion?: "auto" | "force" | "ignore";
|
|
204
|
-
/** Forwarded to the SDK ThemeProvider wrapper. */
|
|
205
|
-
className?: string;
|
|
206
|
-
/** Forwarded to the SDK ThemeProvider wrapper style. */
|
|
207
|
-
style?: CSSProperties;
|
|
208
|
-
children: ReactNode;
|
|
209
|
-
}
|
|
210
|
-
/**
|
|
211
|
-
* Root provider for generated UI contracts.
|
|
212
|
-
*
|
|
213
|
-
* Composes the SDK `ThemeProvider` so authors can write
|
|
214
|
-
* `<UI.Root theme="tabletop">` and have presentation tokens applied without
|
|
215
|
-
* importing `@dreamboard-games/sdk/ui` themselves. The runtime workspace contract
|
|
216
|
-
* stacks plugin-state, toast and mobile-hand providers around this.
|
|
217
|
-
*/
|
|
218
|
-
declare function UIRoot({ theme, themeOverride, reducedMotion, className, style, children, }: UIRootProps): react_jsx_runtime.JSX.Element;
|
|
219
|
-
declare const UI: {
|
|
220
|
-
Root: typeof UIRoot;
|
|
221
|
-
};
|
|
222
|
-
|
|
223
|
-
interface ZoneContextValue {
|
|
224
|
-
zone: string;
|
|
225
|
-
snapshot: ZoneHandlesSnapshot | null;
|
|
226
|
-
}
|
|
227
|
-
interface ZoneCardContextValue {
|
|
228
|
-
zone: string;
|
|
229
|
-
cardId: string;
|
|
230
|
-
}
|
|
231
|
-
/**
|
|
232
|
-
* An item rendered by a zone primitive. Discriminated by `hidden`:
|
|
233
|
-
*
|
|
234
|
-
* - `hidden: false` — fully hydrated from the zone projection. Carries the
|
|
235
|
-
* authored card type, properties, and reducer-projected interaction state.
|
|
236
|
-
* - `hidden: true` — the zone snapshot exposes the card id but withholds its
|
|
237
|
-
* contents (e.g. opponent zones, or a zone that is projected count-only).
|
|
238
|
-
* The render contract is honest about not knowing the type; authors must
|
|
239
|
-
* narrow on `hidden` before reading `cardType` / `properties`.
|
|
240
|
-
*
|
|
241
|
-
* Replaces the previous silent fallback that widened `cardType` to the
|
|
242
|
-
* untyped string `"unknown"` — see SDK Design Principles §2 (strong contracts
|
|
243
|
-
* over comments).
|
|
244
|
-
*/
|
|
245
|
-
type ZoneCardRenderItem<CardIdValue extends string = string, CardTypeValue extends string = string, Properties extends Record<string, unknown> = Record<string, unknown>> = HydratedZoneCardRenderItem<CardIdValue, CardTypeValue, Properties> | HiddenZoneCardRenderItem<CardIdValue>;
|
|
246
|
-
interface HydratedZoneCardRenderItem<CardIdValue extends string = string, CardTypeValue extends string = string, Properties extends Record<string, unknown> = Record<string, unknown>> extends ViewCard<CardIdValue, CardTypeValue, Properties> {
|
|
247
|
-
zone: string;
|
|
248
|
-
index: number;
|
|
249
|
-
hidden: false;
|
|
250
|
-
playable: boolean;
|
|
251
|
-
interactions: readonly InteractionDescriptor[];
|
|
252
|
-
}
|
|
253
|
-
interface HiddenZoneCardRenderItem<CardIdValue extends string = string> {
|
|
254
|
-
id: CardIdValue;
|
|
255
|
-
zone: string;
|
|
256
|
-
index: number;
|
|
257
|
-
hidden: true;
|
|
258
|
-
}
|
|
259
|
-
interface ZonePileContextValue {
|
|
260
|
-
zone: string;
|
|
261
|
-
label: string;
|
|
262
|
-
count: number;
|
|
263
|
-
cards: readonly string[];
|
|
264
|
-
items: readonly ZoneCardRenderItem[];
|
|
265
|
-
hasVisibleCards: boolean;
|
|
266
|
-
isHidden: boolean;
|
|
267
|
-
description: string | null;
|
|
268
|
-
}
|
|
269
|
-
declare function useZonePrimitiveContext(): ZoneContextValue;
|
|
270
|
-
declare function useOptionalZonePrimitiveContext(): ZoneContextValue | null;
|
|
271
|
-
declare function useZoneCardContext(): ZoneCardContextValue | null;
|
|
272
|
-
declare function useZonePileContext(): ZonePileContextValue;
|
|
273
|
-
interface ZoneRootProps<Zone extends string = ZoneKey> extends PrimitiveCommonProps, HTMLAttributes<HTMLElement> {
|
|
274
|
-
zone: Zone;
|
|
275
|
-
}
|
|
276
|
-
declare function ZoneRoot<Zone extends string = ZoneKey>({ zone, children, ...props }: ZoneRootProps<Zone>): react_jsx_runtime.JSX.Element;
|
|
277
|
-
interface ZoneListProps extends Omit<PrimitiveCommonProps, "children">, Omit<HTMLAttributes<HTMLElement>, "children"> {
|
|
278
|
-
children?: ReactNode | ((card: ZoneCardRenderItem) => ReactNode);
|
|
279
|
-
empty?: ReactNode;
|
|
280
|
-
sort?: (a: ZoneCardRenderItem, b: ZoneCardRenderItem) => number;
|
|
281
|
-
}
|
|
282
|
-
declare function ZoneList({ children, empty, sort, ...props }: ZoneListProps): react.ReactElement<unknown, string | react.JSXElementConstructor<any>>;
|
|
283
|
-
interface UseZoneCardsOptions {
|
|
284
|
-
sort?: (a: ZoneCardRenderItem, b: ZoneCardRenderItem) => number;
|
|
285
|
-
}
|
|
286
|
-
interface UseZoneCardsResult {
|
|
287
|
-
zone: string;
|
|
288
|
-
items: readonly ZoneCardRenderItem[];
|
|
289
|
-
count: number;
|
|
290
|
-
isEmpty: boolean;
|
|
291
|
-
}
|
|
292
|
-
declare function useZoneCards({ sort, }?: UseZoneCardsOptions): UseZoneCardsResult;
|
|
293
|
-
interface ZoneItemProps extends PrimitiveCommonProps, HTMLAttributes<HTMLElement> {
|
|
294
|
-
card: string | ZoneCardRenderItem;
|
|
295
|
-
}
|
|
296
|
-
declare function ZoneItem({ card, children, ...props }: ZoneItemProps): react_jsx_runtime.JSX.Element;
|
|
297
|
-
interface ZoneCardAtProps<Zone extends string = ZoneKey> extends Omit<ZoneItemProps, "card" | "children"> {
|
|
298
|
-
zone?: Zone;
|
|
299
|
-
index: number;
|
|
300
|
-
children?: ReactNode | ((card: ZoneCardRenderItem) => ReactNode);
|
|
301
|
-
empty?: ReactNode;
|
|
302
|
-
}
|
|
303
|
-
declare function ZoneCardAt<Zone extends string = ZoneKey>({ zone, ...props }: ZoneCardAtProps<Zone>): react_jsx_runtime.JSX.Element;
|
|
304
|
-
type ZoneTopCardProps<Zone extends string = ZoneKey> = Omit<ZoneCardAtProps<Zone>, "index">;
|
|
305
|
-
declare function ZoneTopCard<Zone extends string = ZoneKey>(props: ZoneTopCardProps<Zone>): react_jsx_runtime.JSX.Element;
|
|
306
|
-
type ZoneCardActionExtraInputs = Record<string, unknown> | ((cardId: string) => Record<string, unknown>);
|
|
307
|
-
interface ZoneCardActionProps<Card extends string = string> extends PrimitiveCommonProps, Omit<ButtonHTMLAttributes<HTMLButtonElement>, "onSelect"> {
|
|
308
|
-
card?: Card;
|
|
309
|
-
interaction?: string;
|
|
310
|
-
input?: string;
|
|
311
|
-
extraInputs?: ZoneCardActionExtraInputs;
|
|
312
|
-
onSelect?: (result: ZoneCardActionResult) => void;
|
|
313
|
-
onSelectError?: (error: unknown) => void;
|
|
314
|
-
}
|
|
315
|
-
type ZoneCardActionResult = {
|
|
316
|
-
status: "none";
|
|
317
|
-
} | {
|
|
318
|
-
status: "pending";
|
|
319
|
-
interactionKey: string;
|
|
320
|
-
descriptor: InteractionDescriptor;
|
|
321
|
-
missingInputs: readonly string[];
|
|
322
|
-
} | {
|
|
323
|
-
status: "submitted";
|
|
324
|
-
interactionKey: string;
|
|
325
|
-
descriptor: InteractionDescriptor;
|
|
326
|
-
};
|
|
327
|
-
declare function ZoneCardAction<Card extends string = string>({ card, interaction, input, extraInputs, onSelect, onSelectError, disabled, onClick, children, ...props }: ZoneCardActionProps<Card>): react.ReactElement<unknown, string | react.JSXElementConstructor<any>>;
|
|
328
|
-
interface ZonePileRootProps<Zone extends string = ZoneKey> extends Omit<ZoneRootProps<Zone>, "children"> {
|
|
329
|
-
label: string;
|
|
330
|
-
children?: ReactNode;
|
|
331
|
-
hiddenDescription?: string | null;
|
|
332
|
-
emptyDescription?: string | null;
|
|
333
|
-
visibleDescription?: ((count: number) => string) | null;
|
|
334
|
-
}
|
|
335
|
-
declare function ZonePileRoot<Zone extends string = ZoneKey>({ zone, label, hiddenDescription, emptyDescription, visibleDescription, children, ...props }: ZonePileRootProps<Zone>): react_jsx_runtime.JSX.Element;
|
|
336
|
-
interface ZonePileTriggerProps extends PrimitiveCommonProps, ButtonHTMLAttributes<HTMLButtonElement> {
|
|
337
|
-
}
|
|
338
|
-
declare function ZonePileTrigger({ children, ...props }: ZonePileTriggerProps): react.ReactElement<unknown, string | react.JSXElementConstructor<any>>;
|
|
339
|
-
type ZonePileLabelProps = PrimitiveCommonProps & HTMLAttributes<HTMLElement>;
|
|
340
|
-
declare function ZonePileLabel({ children, ...props }: ZonePileLabelProps): react.ReactElement<unknown, string | react.JSXElementConstructor<any>>;
|
|
341
|
-
type ZonePileCountProps = PrimitiveCommonProps & HTMLAttributes<HTMLElement>;
|
|
342
|
-
declare function ZonePileCount({ children, ...props }: ZonePileCountProps): react.ReactElement<unknown, string | react.JSXElementConstructor<any>>;
|
|
343
|
-
type ZonePileDescriptionProps = PrimitiveCommonProps & HTMLAttributes<HTMLElement>;
|
|
344
|
-
declare function ZonePileDescription({ children, ...props }: ZonePileDescriptionProps): react.ReactElement<unknown, string | react.JSXElementConstructor<any>> | null;
|
|
345
|
-
interface ZonePileCardsProps extends Omit<ZoneListProps, "children"> {
|
|
346
|
-
renderCard: (card: ZoneCardRenderItem) => ReactNode;
|
|
347
|
-
}
|
|
348
|
-
declare function ZonePileCards({ renderCard, ...props }: ZonePileCardsProps): react_jsx_runtime.JSX.Element | null;
|
|
349
|
-
declare function createZoneCardRenderItem(zone: string, snapshot: ZoneHandlesSnapshot | null, cardId: string, index: number): ZoneCardRenderItem;
|
|
350
|
-
declare const Zone: {
|
|
351
|
-
Root: typeof ZoneRoot;
|
|
352
|
-
List: typeof ZoneList;
|
|
353
|
-
Item: typeof ZoneItem;
|
|
354
|
-
CardAt: typeof ZoneCardAt;
|
|
355
|
-
TopCard: typeof ZoneTopCard;
|
|
356
|
-
CardAction: typeof ZoneCardAction;
|
|
357
|
-
PileRoot: typeof ZonePileRoot;
|
|
358
|
-
PileTrigger: typeof ZonePileTrigger;
|
|
359
|
-
PileLabel: typeof ZonePileLabel;
|
|
360
|
-
PileCount: typeof ZonePileCount;
|
|
361
|
-
PileDescription: typeof ZonePileDescription;
|
|
362
|
-
PileCards: typeof ZonePileCards;
|
|
363
|
-
useZoneCards: typeof useZoneCards;
|
|
364
|
-
};
|
|
365
|
-
|
|
366
|
-
/**
|
|
367
|
-
* Hook to access plugin session metadata.
|
|
368
|
-
* Returns session initialization status and IDs.
|
|
369
|
-
*
|
|
370
|
-
* @returns Plugin session state with status, sessionId, and controllingPlayerId
|
|
371
|
-
*
|
|
372
|
-
* @example
|
|
373
|
-
* ```tsx
|
|
374
|
-
* function MyPluginComponent() {
|
|
375
|
-
* const { status, sessionId, controllingPlayerId } = usePluginSession();
|
|
376
|
-
*
|
|
377
|
-
* if (status === "loading") {
|
|
378
|
-
* return <div>Initializing...</div>;
|
|
379
|
-
* }
|
|
380
|
-
*
|
|
381
|
-
* return (
|
|
382
|
-
* <div>
|
|
383
|
-
* <p>Session: {sessionId}</p>
|
|
384
|
-
* <p>Current perspective: {controllingPlayerId}</p>
|
|
385
|
-
* </div>
|
|
386
|
-
* );
|
|
387
|
-
* }
|
|
388
|
-
* ```
|
|
389
|
-
*/
|
|
390
|
-
declare function usePluginSession(): PluginSessionState;
|
|
391
|
-
|
|
392
|
-
type GamePlayer<PlayerIdValue extends string = PlayerId> = Omit<Player, "playerId"> & {
|
|
393
|
-
playerId: PlayerIdValue;
|
|
394
|
-
};
|
|
395
|
-
type GamePlayerEntry<PlayerIdValue extends string = PlayerId> = GamePlayer<PlayerIdValue> & {
|
|
396
|
-
index: number;
|
|
397
|
-
isActive: boolean;
|
|
398
|
-
isCurrentPlayer: boolean;
|
|
399
|
-
};
|
|
400
|
-
interface GamePlayersState<PlayerIdValue extends string = PlayerId> {
|
|
401
|
-
byId: ReadonlyMap<PlayerIdValue, GamePlayer<PlayerIdValue>>;
|
|
402
|
-
order: readonly PlayerIdValue[];
|
|
403
|
-
entries: ReadonlyArray<GamePlayerEntry<PlayerIdValue>>;
|
|
404
|
-
active: readonly PlayerIdValue[];
|
|
405
|
-
current: GamePlayer<PlayerIdValue> | null;
|
|
406
|
-
}
|
|
407
|
-
interface GameMeState<PlayerIdValue extends string = PlayerId> {
|
|
408
|
-
playerId: PlayerIdValue | null;
|
|
409
|
-
player: GamePlayer<PlayerIdValue> | null;
|
|
410
|
-
canAct: boolean;
|
|
411
|
-
}
|
|
412
|
-
interface GameTurnState<PlayerIdValue extends string = PlayerId, PhaseValue extends string = string> {
|
|
413
|
-
phase: PhaseValue | null;
|
|
414
|
-
stage: string | null;
|
|
415
|
-
activePlayerIds: readonly PlayerIdValue[];
|
|
416
|
-
currentPlayerId: PlayerIdValue | null;
|
|
417
|
-
order: readonly PlayerIdValue[];
|
|
418
|
-
isMine: boolean;
|
|
419
|
-
}
|
|
420
|
-
interface GameRenderState<ViewValue = unknown, PlayerIdValue extends string = PlayerId, PhaseValue extends string = string> {
|
|
421
|
-
view: ViewValue;
|
|
422
|
-
phase: PhaseValue | null;
|
|
423
|
-
stage: string | null;
|
|
424
|
-
session: ReturnType<typeof usePluginSession>;
|
|
425
|
-
me: GameMeState<PlayerIdValue>;
|
|
426
|
-
turn: GameTurnState<PlayerIdValue, PhaseValue>;
|
|
427
|
-
players: GamePlayersState<PlayerIdValue>;
|
|
428
|
-
}
|
|
429
|
-
interface GamePendingInputState {
|
|
430
|
-
key: string;
|
|
431
|
-
kind: string;
|
|
432
|
-
domain: InputDomain;
|
|
433
|
-
title: string;
|
|
434
|
-
}
|
|
435
|
-
interface GameActiveActionState<Interaction extends string = string, Params extends Record<string, unknown> = Record<string, unknown>> {
|
|
436
|
-
interaction: Interaction;
|
|
437
|
-
interactionId: string;
|
|
438
|
-
descriptor: InteractionDescriptor<Interaction>;
|
|
439
|
-
title: string;
|
|
440
|
-
draft: Readonly<Partial<Params>>;
|
|
441
|
-
values: Partial<Params>;
|
|
442
|
-
missingInputs: readonly string[];
|
|
443
|
-
readyFrontier: readonly string[];
|
|
444
|
-
pendingInput: GamePendingInputState | null;
|
|
445
|
-
}
|
|
446
|
-
interface GameChromeState<ViewValue = unknown, PlayerIdValue extends string = PlayerId, PhaseValue extends string = string, Interaction extends string = string> extends GameRenderState<ViewValue, PlayerIdValue, PhaseValue> {
|
|
447
|
-
activePlayers: readonly PlayerIdValue[];
|
|
448
|
-
activeAction: GameActiveActionState<Interaction> | null;
|
|
449
|
-
cancel: (() => void) | null;
|
|
450
|
-
}
|
|
451
|
-
interface GameRootProps<ViewValue = unknown, PlayerIdValue extends string = PlayerId, PhaseValue extends string = string> {
|
|
452
|
-
onActionError?: (error: unknown) => void;
|
|
453
|
-
children: (state: GameRenderState<ViewValue, PlayerIdValue, PhaseValue>) => ReactNode;
|
|
454
|
-
}
|
|
455
|
-
interface GameChromeProps<ViewValue = unknown, PlayerIdValue extends string = PlayerId, PhaseValue extends string = string, Interaction extends string = string> {
|
|
456
|
-
children: (state: GameChromeState<ViewValue, PlayerIdValue, PhaseValue, Interaction>) => ReactNode;
|
|
457
|
-
}
|
|
458
|
-
interface GameViewportProps extends HTMLAttributes<HTMLDivElement> {
|
|
459
|
-
children?: ReactNode;
|
|
460
|
-
}
|
|
461
|
-
type GameActionErrorHandler = (error: unknown) => void;
|
|
462
|
-
declare function useGameActionError(): GameActionErrorHandler | null;
|
|
463
|
-
declare function GameRoot<ViewValue = unknown, PlayerIdValue extends string = PlayerId, PhaseValue extends string = string>({ children, onActionError, }: GameRootProps<ViewValue, PlayerIdValue, PhaseValue>): react_jsx_runtime.JSX.Element;
|
|
464
|
-
declare function GameChrome<ViewValue = unknown, PlayerIdValue extends string = PlayerId, PhaseValue extends string = string, Interaction extends string = string>({ children, }: GameChromeProps<ViewValue, PlayerIdValue, PhaseValue, Interaction>): react_jsx_runtime.JSX.Element;
|
|
465
|
-
declare function GameViewport({ children, style, ...props }: GameViewportProps): react_jsx_runtime.JSX.Element;
|
|
466
|
-
declare const Game: {
|
|
467
|
-
Root: typeof GameRoot;
|
|
468
|
-
Chrome: typeof GameChrome;
|
|
469
|
-
Viewport: typeof GameViewport;
|
|
470
|
-
};
|
|
471
|
-
|
|
472
|
-
/**
|
|
473
|
-
* Anything that can be used as a submit params object. Subset of TS
|
|
474
|
-
* objects so generic defaults and `keyof Params & string` hold.
|
|
475
|
-
*/
|
|
476
|
-
type InteractionParamsShape = Record<string, unknown>;
|
|
477
|
-
type InteractionHandleStatus = "open" | "submitting" | "submitted";
|
|
478
|
-
type DraftValidation<Params extends InteractionParamsShape = InteractionParamsShape> = {
|
|
479
|
-
ok: true;
|
|
480
|
-
params: Params;
|
|
481
|
-
fieldErrors: Partial<Record<keyof Params & string, readonly string[]>>;
|
|
482
|
-
formErrors: readonly string[];
|
|
483
|
-
missing: ReadonlyArray<keyof Params & string>;
|
|
484
|
-
} | {
|
|
485
|
-
ok: false;
|
|
486
|
-
fieldErrors: Partial<Record<keyof Params & string, readonly string[]>>;
|
|
487
|
-
formErrors: readonly string[];
|
|
488
|
-
missing: ReadonlyArray<keyof Params & string>;
|
|
489
|
-
};
|
|
490
|
-
/**
|
|
491
|
-
* Bound handle around an {@link InteractionDescriptor}. Surfaces call into
|
|
492
|
-
* this hook to submit an interaction, track draft input state for
|
|
493
|
-
* multi-step prompts, and arm/disarm themselves on a surface.
|
|
494
|
-
*
|
|
495
|
-
* Availability flags are mirrored from the authoritative descriptor; UI
|
|
496
|
-
* MUST NOT recompute eligibility locally.
|
|
497
|
-
*
|
|
498
|
-
* When the surrounding workspace knows the concrete params shape (e.g.
|
|
499
|
-
* obtained from the generated `InteractionParamsOf<Id>` alias), parameterise
|
|
500
|
-
* this handle on `Params` so `submit`, `draft`, and `setInput` are all
|
|
501
|
-
* statically typed. The default `Record<string, unknown>` preserves the
|
|
502
|
-
* loosely-typed fallback for generic infrastructure.
|
|
503
|
-
*/
|
|
504
|
-
interface InteractionHandle<Params extends InteractionParamsShape = InteractionParamsShape, DefaultedKeys extends keyof Params & string = never> {
|
|
505
|
-
descriptor: InteractionDescriptor;
|
|
506
|
-
/** Draft commit policy projected by the reducer. */
|
|
507
|
-
commit: InteractionDescriptor["commit"];
|
|
508
|
-
/**
|
|
509
|
-
* Submit the interaction. When `params` is omitted the current draft (as
|
|
510
|
-
* mutated by {@link InteractionHandle.setInput}) is used instead, which is
|
|
511
|
-
* the common case for multi-input prompts.
|
|
512
|
-
*/
|
|
513
|
-
submit: (params?: Params) => Promise<void>;
|
|
514
|
-
/** Run local generated client-schema validation against the current draft. */
|
|
515
|
-
validateDraft: () => DraftValidation<Params>;
|
|
516
|
-
/**
|
|
517
|
-
* Validate the current draft locally, submit parsed params, then clear the
|
|
518
|
-
* draft only when submission succeeds.
|
|
519
|
-
*/
|
|
520
|
-
submitDraft: () => Promise<void>;
|
|
521
|
-
/** Derived from `descriptor.availability`. */
|
|
522
|
-
available: boolean;
|
|
523
|
-
/** Derived from `descriptor.availability`. */
|
|
524
|
-
unavailableReason?: string;
|
|
525
|
-
/** Local/authoritative progress for this interaction. */
|
|
526
|
-
status: InteractionHandleStatus;
|
|
527
|
-
/** Live draft values for this interaction. Empty object when unset. */
|
|
528
|
-
draft: Readonly<Partial<Params>>;
|
|
529
|
-
/**
|
|
530
|
-
* Draft values with authored input defaults applied. Fields with declared
|
|
531
|
-
* defaults are typed as present; other draft fields remain partial.
|
|
532
|
-
*/
|
|
533
|
-
values: Readonly<Partial<Params> & Pick<Params, DefaultedKeys>>;
|
|
534
|
-
/** Set a single input on the draft. */
|
|
535
|
-
setInput: <K extends keyof Params & string>(key: K, value: Params[K]) => void;
|
|
536
|
-
/** Clear a single input (or the whole draft when `key` is omitted). */
|
|
537
|
-
clearInput: (key?: keyof Params & string) => void;
|
|
538
|
-
/**
|
|
539
|
-
* True when every key declared on `descriptor.inputs` has a value in
|
|
540
|
-
* the draft. Falls back to `true` when the descriptor declares no inputs.
|
|
541
|
-
*/
|
|
542
|
-
isReady: boolean;
|
|
543
|
-
/**
|
|
544
|
-
* True when this interaction is the currently armed one on its surface.
|
|
545
|
-
* Armed interactions are the ones that board primitives use
|
|
546
|
-
* to highlight eligible targets and route clicks.
|
|
547
|
-
*/
|
|
548
|
-
isArmed: boolean;
|
|
549
|
-
/** Arm this interaction on its surface (disarms any previously armed). */
|
|
550
|
-
arm: () => void;
|
|
551
|
-
/** Disarm this interaction (if it was armed). */
|
|
552
|
-
disarm: () => void;
|
|
553
|
-
}
|
|
554
|
-
/**
|
|
555
|
-
* Bind an {@link InteractionDescriptor} to submit/validate helpers plus
|
|
556
|
-
* draft + arming state. Use this from any surface; draft state is shared
|
|
557
|
-
* across components through {@link InteractionUiProvider}, which
|
|
558
|
-
* `PluginRuntime` auto-mounts.
|
|
559
|
-
*
|
|
560
|
-
* Example:
|
|
561
|
-
* ```tsx
|
|
562
|
-
* const handle = useInteractionHandle(placeThing);
|
|
563
|
-
* handle.setInput("cardId", card.id);
|
|
564
|
-
* handle.setInput("ringId", ring.id);
|
|
565
|
-
* if (handle.isReady) await handle.submit();
|
|
566
|
-
* ```
|
|
567
|
-
*/
|
|
568
|
-
declare function useInteractionHandle<Params extends InteractionParamsShape = InteractionParamsShape, DefaultedKeys extends keyof Params & string = never>(descriptor: InteractionDescriptor): InteractionHandle<Params, DefaultedKeys>;
|
|
569
|
-
|
|
570
|
-
interface InteractionContextValue {
|
|
571
|
-
interaction: string;
|
|
572
|
-
descriptor: InteractionDescriptor | null;
|
|
573
|
-
handle: ReturnType<typeof useInteractionHandle> | null;
|
|
574
|
-
}
|
|
575
|
-
declare function useInteractionPrimitiveContext(): InteractionContextValue;
|
|
576
|
-
/**
|
|
577
|
-
* Live draft value for the active interaction's card-target input, resolved
|
|
578
|
-
* from the surrounding `<Interaction.Root>`. Returns the selected card-id array
|
|
579
|
-
* for `selection: "many"` inputs and the single id for `selection: "one"`.
|
|
580
|
-
* Returns `undefined` when there is no interaction context or no card-target
|
|
581
|
-
* input (so it is safe to render outside a root). Reactive: `handle.values`
|
|
582
|
-
* updates as the draft changes. Backs the card surface `slot.card.Value`.
|
|
583
|
-
*/
|
|
584
|
-
declare function useResolvedCardTargetValue(): unknown;
|
|
585
|
-
interface InteractionRootProps<Interaction extends string = InteractionKey> {
|
|
586
|
-
interaction: Interaction;
|
|
587
|
-
children: ReactNode;
|
|
588
|
-
unavailable?: "render" | "hide";
|
|
589
|
-
}
|
|
590
|
-
declare function InteractionRoot<Interaction extends string = InteractionKey>({ interaction, children, unavailable, }: InteractionRootProps<Interaction>): react_jsx_runtime.JSX.Element | null;
|
|
591
|
-
|
|
592
|
-
interface InteractionStateSnapshot<Params extends InteractionParamsShape = InteractionParamsShape, DefaultedKeys extends keyof Params & string = never> {
|
|
593
|
-
interaction: string;
|
|
594
|
-
descriptor: InteractionDescriptor;
|
|
595
|
-
handle: InteractionHandle<Params, DefaultedKeys>;
|
|
596
|
-
draft: InteractionHandle<Params, DefaultedKeys>["draft"];
|
|
597
|
-
values: InteractionHandle<Params, DefaultedKeys>["values"];
|
|
598
|
-
status: InteractionHandle<Params, DefaultedKeys>["status"];
|
|
599
|
-
available: boolean;
|
|
600
|
-
isReady: boolean;
|
|
601
|
-
isArmed: boolean;
|
|
602
|
-
inputKeys: readonly string[];
|
|
603
|
-
missingInputs: readonly string[];
|
|
604
|
-
readyFrontier: readonly string[];
|
|
605
|
-
blockedInputs: readonly string[];
|
|
606
|
-
hasInputs: boolean;
|
|
607
|
-
}
|
|
608
|
-
interface InteractionStateProps<Params extends InteractionParamsShape = InteractionParamsShape, DefaultedKeys extends keyof Params & string = never> {
|
|
609
|
-
unavailable: ReactNode;
|
|
610
|
-
children: (state: InteractionStateSnapshot<Params, DefaultedKeys>) => ReactNode;
|
|
611
|
-
}
|
|
612
|
-
declare function InteractionState<Params extends InteractionParamsShape = InteractionParamsShape, DefaultedKeys extends keyof Params & string = never>({ children, unavailable }: InteractionStateProps<Params, DefaultedKeys>): react_jsx_runtime.JSX.Element;
|
|
613
|
-
|
|
614
|
-
interface InteractionSwitchRenderState<Interaction extends string = InteractionKey> {
|
|
615
|
-
interaction: Interaction;
|
|
616
|
-
descriptor: InteractionDescriptor<Interaction>;
|
|
617
|
-
}
|
|
618
|
-
type InteractionSwitchRouteMap<Interaction extends string = InteractionKey> = {
|
|
619
|
-
[Key in Interaction]?: (state: InteractionSwitchRenderState<Key>) => ReactNode;
|
|
620
|
-
};
|
|
621
|
-
interface InteractionRoute {
|
|
622
|
-
readonly collect: Record<string, unknown>;
|
|
623
|
-
}
|
|
624
|
-
type InteractionRoutesMap<Interaction extends string = InteractionKey> = {
|
|
625
|
-
[Key in Interaction]: InteractionRoute;
|
|
626
|
-
};
|
|
627
|
-
interface InteractionSwitchProps<Interaction extends string = InteractionKey> {
|
|
628
|
-
interaction?: Interaction;
|
|
629
|
-
routes: InteractionSwitchRouteMap<Interaction>;
|
|
630
|
-
fallback?: ReactNode;
|
|
631
|
-
}
|
|
632
|
-
declare function InteractionSwitch<Interaction extends string = InteractionKey>({ interaction, routes, fallback, }: InteractionSwitchProps<Interaction>): react_jsx_runtime.JSX.Element;
|
|
633
|
-
interface InteractionRoutesProps<Interaction extends string = InteractionKey> {
|
|
634
|
-
routes: InteractionRoutesMap<Interaction>;
|
|
635
|
-
fallback?: ReactNode;
|
|
636
|
-
includeUnavailable?: boolean | null;
|
|
637
|
-
}
|
|
638
|
-
declare function InteractionRoutes<Interaction extends string = InteractionKey>({ routes, fallback, includeUnavailable, }: InteractionRoutesProps<Interaction>): react_jsx_runtime.JSX.Element | null;
|
|
639
|
-
|
|
640
|
-
type DialogLifecycleState = "open" | "minimized" | "dismissed";
|
|
641
|
-
|
|
642
|
-
type InteractionDialogState = DialogLifecycleState;
|
|
643
|
-
interface InteractionDialogRenderState<Interaction extends string = InteractionKey> {
|
|
644
|
-
interaction: Interaction;
|
|
645
|
-
state: InteractionDialogState;
|
|
646
|
-
open: boolean;
|
|
647
|
-
minimized: boolean;
|
|
648
|
-
dismissed: boolean;
|
|
649
|
-
setOpen: (open: boolean) => void;
|
|
650
|
-
restore: () => void;
|
|
651
|
-
minimize: () => void;
|
|
652
|
-
dismiss: () => void;
|
|
653
|
-
}
|
|
654
|
-
interface InteractionDialogProps<Interaction extends string = InteractionKey> {
|
|
655
|
-
defaultOpen?: boolean;
|
|
656
|
-
onStateChange?: (state: InteractionDialogState) => void;
|
|
657
|
-
children: (state: InteractionDialogRenderState<Interaction>) => ReactNode;
|
|
658
|
-
}
|
|
659
|
-
declare function InteractionDialog<Interaction extends string = InteractionKey>({ defaultOpen, onStateChange, children, }: InteractionDialogProps<Interaction>): react_jsx_runtime.JSX.Element;
|
|
660
|
-
|
|
661
|
-
interface InteractionSubmitCallbacks {
|
|
662
|
-
onSubmitSuccess?: () => void;
|
|
663
|
-
onSubmitError?: (error: unknown) => void;
|
|
664
|
-
}
|
|
665
|
-
|
|
666
|
-
type InteractionTriggerProps = PrimitiveCommonProps & ButtonHTMLAttributes<HTMLButtonElement>;
|
|
667
|
-
declare function InteractionTrigger({ disabled, onClick, ...props }: InteractionTriggerProps): react.ReactElement<unknown, string | react.JSXElementConstructor<any>>;
|
|
668
|
-
type InteractionSubmitProps = PrimitiveCommonProps & ButtonHTMLAttributes<HTMLButtonElement> & {
|
|
669
|
-
params?: InteractionParamsShape | (() => InteractionParamsShape | null | undefined);
|
|
670
|
-
onSubmitSuccess?: InteractionSubmitCallbacks["onSubmitSuccess"];
|
|
671
|
-
onSubmitError?: InteractionSubmitCallbacks["onSubmitError"];
|
|
672
|
-
};
|
|
673
|
-
declare function InteractionSubmit({ disabled, onClick, params, onSubmitSuccess, onSubmitError, style, ...props }: InteractionSubmitProps): react.ReactElement<unknown, string | react.JSXElementConstructor<any>>;
|
|
674
|
-
type InteractionInputProps = PrimitiveCommonProps & Omit<InputHTMLAttributes<HTMLInputElement>, "name"> & {
|
|
675
|
-
name: string;
|
|
676
|
-
parse?: (value: string) => unknown;
|
|
677
|
-
};
|
|
678
|
-
declare function InteractionInput({ name, parse, onChange, disabled, ...props }: InteractionInputProps): react.ReactElement<unknown, string | react.JSXElementConstructor<any>>;
|
|
679
|
-
|
|
680
|
-
type InteractionPartProps = PrimitiveCommonProps & HTMLAttributes<HTMLElement>;
|
|
681
|
-
declare function InteractionLabel({ children, ...props }: InteractionPartProps): react.ReactElement<unknown, string | react.JSXElementConstructor<any>>;
|
|
682
|
-
declare function InteractionDescription({ children, ...props }: InteractionPartProps): react.ReactElement<unknown, string | react.JSXElementConstructor<any>> | null;
|
|
683
|
-
declare function InteractionUnavailableMessage({ children, ...props }: InteractionPartProps): react.ReactElement<unknown, string | react.JSXElementConstructor<any>> | null;
|
|
684
|
-
declare function InteractionValidationMessage({ children, ...props }: InteractionPartProps): react.ReactElement<unknown, string | react.JSXElementConstructor<any>> | null;
|
|
685
|
-
|
|
686
|
-
interface InteractionFieldRenderProps<Params extends InteractionParamsShape = InteractionParamsShape, Key extends keyof Params & string = keyof Params & string> {
|
|
687
|
-
descriptor: InteractionDescriptor;
|
|
688
|
-
input: InteractionInputDescriptor & {
|
|
689
|
-
key: Key;
|
|
690
|
-
};
|
|
691
|
-
handle: InteractionHandle<Params>;
|
|
692
|
-
value: Params[Key] | undefined;
|
|
693
|
-
setValue: (value: Params[Key]) => void;
|
|
694
|
-
clearValue: () => void;
|
|
695
|
-
errors: readonly string[];
|
|
696
|
-
missing: boolean;
|
|
697
|
-
disabled: boolean;
|
|
698
|
-
}
|
|
699
|
-
type InteractionFieldRenderMap<Params extends InteractionParamsShape = InteractionParamsShape> = Partial<{
|
|
700
|
-
[K in keyof Params & string]: (props: InteractionFieldRenderProps<Params, K>) => ReactNode;
|
|
701
|
-
}>;
|
|
702
|
-
interface InteractionFieldProps<Params extends InteractionParamsShape = InteractionParamsShape, Key extends keyof Params & string = keyof Params & string> {
|
|
703
|
-
descriptor: InteractionDescriptor;
|
|
704
|
-
inputKey: Key;
|
|
705
|
-
handle: InteractionHandle<Params>;
|
|
706
|
-
errors?: readonly string[];
|
|
707
|
-
missing?: boolean;
|
|
708
|
-
disabled?: boolean;
|
|
709
|
-
render?: InteractionFieldRenderMap<Params>[Key];
|
|
710
|
-
}
|
|
711
|
-
|
|
712
|
-
/**
|
|
713
|
-
* Headless input-slot factory for the interaction form: the slot prop types
|
|
714
|
-
* and `createInteractionInputSlot`, which builds the
|
|
715
|
-
* `Field`/`Default`/`Target`/`Card`/`Cards`/`Options`/`Value`/`Label`/`Message`
|
|
716
|
-
* render surface (plus its shared `targetButton` helper) for a single input.
|
|
717
|
-
*
|
|
718
|
-
* Moved verbatim from `../InteractionForm.tsx`.
|
|
719
|
-
*/
|
|
720
|
-
|
|
721
|
-
interface InteractionSlotComponentProps {
|
|
722
|
-
children?: ReactNode;
|
|
723
|
-
}
|
|
724
|
-
type InteractionButtonSlotProps = InteractionSlotComponentProps & Omit<ButtonHTMLAttributes<HTMLButtonElement>, "children" | "disabled" | "type" | "value">;
|
|
725
|
-
interface InteractionTargetSlotProps extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, "children" | "disabled" | "aria-disabled" | "aria-pressed" | "onClick" | "type" | "value"> {
|
|
726
|
-
value: string;
|
|
727
|
-
children?: ReactNode;
|
|
728
|
-
}
|
|
729
|
-
interface InteractionOptionsSlotProps {
|
|
730
|
-
children: (option: {
|
|
731
|
-
value: string | null;
|
|
732
|
-
label: string;
|
|
733
|
-
}) => ReactNode;
|
|
734
|
-
}
|
|
735
|
-
interface InteractionCardsSlotProps {
|
|
736
|
-
children: (card: {
|
|
737
|
-
id: string;
|
|
738
|
-
}) => ReactNode;
|
|
739
|
-
}
|
|
740
|
-
interface InteractionValueSlotProps {
|
|
741
|
-
children: (value: unknown) => ReactNode;
|
|
742
|
-
}
|
|
743
|
-
interface InteractionInputSlot {
|
|
744
|
-
Field: (props: InteractionSlotComponentProps) => ReactNode;
|
|
745
|
-
Default: (props: InteractionSlotComponentProps) => ReactNode;
|
|
746
|
-
Target: (props: InteractionTargetSlotProps) => ReactNode;
|
|
747
|
-
Card: (props: InteractionTargetSlotProps) => ReactNode;
|
|
748
|
-
Cards: (props: InteractionCardsSlotProps) => ReactNode;
|
|
749
|
-
Options: (props: InteractionOptionsSlotProps) => ReactNode;
|
|
750
|
-
Value: (props: InteractionValueSlotProps) => ReactNode;
|
|
751
|
-
Label: (props: InteractionSlotComponentProps) => ReactNode;
|
|
752
|
-
Message: (props: InteractionSlotComponentProps) => ReactNode;
|
|
753
|
-
}
|
|
754
|
-
type InteractionInputRenderMap = Record<string, (slot: InteractionInputSlot) => ReactNode>;
|
|
755
|
-
interface InteractionSubmitSlot {
|
|
756
|
-
Button: (props: InteractionButtonSlotProps) => ReactNode;
|
|
757
|
-
}
|
|
758
|
-
|
|
759
|
-
interface InteractionFormProps<Params extends InteractionParamsShape = InteractionParamsShape, DefaultedKeys extends keyof Params & string = never> {
|
|
760
|
-
descriptor: InteractionDescriptor;
|
|
761
|
-
handle: InteractionHandle<Params, DefaultedKeys>;
|
|
762
|
-
fields?: ReadonlyArray<keyof Params & string>;
|
|
763
|
-
hiddenFields?: ReadonlyArray<keyof Params & string>;
|
|
764
|
-
renderFields?: InteractionFieldRenderMap<Params>;
|
|
765
|
-
inputs?: InteractionInputRenderMap;
|
|
766
|
-
submit?: (slot: InteractionSubmitSlot, descriptor: InteractionDescriptor) => ReactNode;
|
|
767
|
-
title?: ReactNode;
|
|
768
|
-
description?: ReactNode;
|
|
769
|
-
submitLabel?: ReactNode;
|
|
770
|
-
cancelLabel?: ReactNode;
|
|
771
|
-
onCancel?: () => void;
|
|
772
|
-
onSubmitSuccess?: () => void;
|
|
773
|
-
disabled?: boolean;
|
|
774
|
-
accordion?: boolean;
|
|
775
|
-
defaultOpen?: boolean;
|
|
776
|
-
style?: CSSProperties;
|
|
777
|
-
}
|
|
778
|
-
|
|
779
|
-
type BoundInteractionFormProps<Params extends InteractionParamsShape = InteractionParamsShape, DefaultedKeys extends keyof Params & string = never> = Omit<InteractionFormProps<Params, DefaultedKeys>, "descriptor" | "handle">;
|
|
780
|
-
type InteractionFormPrimitiveProps<Params extends InteractionParamsShape = InteractionParamsShape, DefaultedKeys extends keyof Params & string = never> = BoundInteractionFormProps<Params, DefaultedKeys>;
|
|
781
|
-
declare function InteractionFormPrimitive<Params extends InteractionParamsShape = InteractionParamsShape, DefaultedKeys extends keyof Params & string = never>(props: InteractionFormPrimitiveProps<Params, DefaultedKeys>): react_jsx_runtime.JSX.Element | null;
|
|
782
|
-
type InteractionFieldPrimitiveProps<Params extends InteractionParamsShape = InteractionParamsShape, Input extends keyof Params & string = keyof Params & string> = Omit<InteractionFieldProps<Params, Input>, "descriptor" | "handle" | "inputKey"> & {
|
|
783
|
-
input: Input;
|
|
784
|
-
};
|
|
785
|
-
declare function InteractionFieldPrimitive<Params extends InteractionParamsShape = InteractionParamsShape, Input extends keyof Params & string = keyof Params & string>({ input, ...props }: InteractionFieldPrimitiveProps<Params, Input>): react_jsx_runtime.JSX.Element | null;
|
|
786
|
-
|
|
787
|
-
type InteractionCardInputProps<Input extends string = InteractionInputKey> = PrimitiveCommonProps & Omit<ButtonHTMLAttributes<HTMLButtonElement>, "children"> & {
|
|
788
|
-
input: Input;
|
|
789
|
-
unsafeCardId?: string;
|
|
790
|
-
selected?: boolean;
|
|
791
|
-
onSelectedChange?: (selected: boolean) => void;
|
|
792
|
-
children?: ReactNode | ((state: InteractionCardInputRenderState) => ReactNode);
|
|
793
|
-
};
|
|
794
|
-
interface InteractionCardInputRenderState {
|
|
795
|
-
cardId: string | undefined;
|
|
796
|
-
zone: string | undefined;
|
|
797
|
-
selected: boolean;
|
|
798
|
-
disabled: boolean;
|
|
799
|
-
eligible: boolean;
|
|
800
|
-
targetValid: boolean;
|
|
801
|
-
selectable: boolean;
|
|
802
|
-
cardAvailable: boolean;
|
|
803
|
-
invalid: boolean;
|
|
804
|
-
}
|
|
805
|
-
declare function InteractionCardInput<Input extends string = InteractionInputKey>({ input, unsafeCardId, selected, onSelectedChange, onClick, disabled, children, ...props }: InteractionCardInputProps<Input>): react.ReactElement<unknown, string | react.JSXElementConstructor<any>>;
|
|
806
|
-
|
|
807
|
-
declare const Interaction: {
|
|
808
|
-
Root: typeof InteractionRoot;
|
|
809
|
-
State: typeof InteractionState;
|
|
810
|
-
Switch: typeof InteractionSwitch;
|
|
811
|
-
Routes: typeof InteractionRoutes;
|
|
812
|
-
Dialog: typeof InteractionDialog;
|
|
813
|
-
Trigger: typeof InteractionTrigger;
|
|
814
|
-
Label: typeof InteractionLabel;
|
|
815
|
-
Description: typeof InteractionDescription;
|
|
816
|
-
UnavailableMessage: typeof InteractionUnavailableMessage;
|
|
817
|
-
ValidationMessage: typeof InteractionValidationMessage;
|
|
818
|
-
Input: typeof InteractionInput;
|
|
819
|
-
Field: typeof InteractionFieldPrimitive;
|
|
820
|
-
CardInput: typeof InteractionCardInput;
|
|
821
|
-
Form: typeof InteractionFormPrimitive;
|
|
822
|
-
Submit: typeof InteractionSubmit;
|
|
823
|
-
};
|
|
824
|
-
|
|
825
|
-
type PhaseRouteMap<Phase extends string = PhaseKey> = {
|
|
826
|
-
readonly [Key in Phase]: () => ReactNode;
|
|
827
|
-
};
|
|
828
|
-
type PhaseFallback = ReactNode | ((phase: string | null) => ReactNode);
|
|
829
|
-
interface PhaseSwitchProps<Phase extends string = PhaseKey> {
|
|
830
|
-
routes: PhaseRouteMap<Phase>;
|
|
831
|
-
fallback?: PhaseFallback;
|
|
832
|
-
}
|
|
833
|
-
declare function PhaseSwitch<Phase extends string = PhaseKey>({ routes, fallback, }: PhaseSwitchProps<Phase>): ReactElement | null;
|
|
834
|
-
declare const Phase: {
|
|
835
|
-
Switch: typeof PhaseSwitch;
|
|
836
|
-
};
|
|
837
|
-
|
|
838
|
-
interface PlayerRosterBadge {
|
|
839
|
-
key: string;
|
|
840
|
-
label?: ReactNode;
|
|
841
|
-
icon?: ReactNode;
|
|
842
|
-
tooltip?: string;
|
|
843
|
-
}
|
|
844
|
-
interface PlayerRosterEntry {
|
|
845
|
-
playerId: PlayerId;
|
|
846
|
-
name: string;
|
|
847
|
-
color?: HexColor;
|
|
848
|
-
index: number;
|
|
849
|
-
isActive: boolean;
|
|
850
|
-
isCurrentPlayer: boolean;
|
|
851
|
-
score?: number;
|
|
852
|
-
scoreLabel?: string;
|
|
853
|
-
badges: readonly PlayerRosterBadge[];
|
|
854
|
-
metadata?: Record<string, unknown>;
|
|
855
|
-
}
|
|
856
|
-
interface PlayerRosterRootProps {
|
|
857
|
-
children: ReactNode;
|
|
858
|
-
order?: "turn" | "self-first";
|
|
859
|
-
include?: "all" | "self" | "opponents";
|
|
860
|
-
score?: (playerId: PlayerId) => number | undefined;
|
|
861
|
-
scoreLabel?: string | ((playerId: PlayerId) => string | undefined);
|
|
862
|
-
badges?: (playerId: PlayerId) => ReadonlyArray<PlayerRosterBadge | null | false | undefined>;
|
|
863
|
-
metadata?: (playerId: PlayerId) => Record<string, unknown> | undefined;
|
|
864
|
-
}
|
|
865
|
-
declare function PlayerRosterRoot({ children, order, include, score, scoreLabel, badges, metadata, }: PlayerRosterRootProps): react_jsx_runtime.JSX.Element;
|
|
866
|
-
type PlayerRosterListProps = Omit<PrimitiveCommonProps, "children"> & Omit<HTMLAttributes<HTMLElement>, "children"> & {
|
|
867
|
-
children?: (player: PlayerRosterEntry) => ReactNode;
|
|
868
|
-
};
|
|
869
|
-
declare function PlayerRosterList({ children, ...props }: PlayerRosterListProps): ReactElement<unknown, string | react.JSXElementConstructor<any>>;
|
|
870
|
-
declare function PlayerRosterEmpty({ children }: {
|
|
871
|
-
children?: ReactNode;
|
|
872
|
-
}): react_jsx_runtime.JSX.Element | null;
|
|
873
|
-
type PlayerRosterPartProps = PrimitiveCommonProps & HTMLAttributes<HTMLElement> & {
|
|
874
|
-
player: PlayerRosterEntry;
|
|
875
|
-
};
|
|
876
|
-
interface PlayerRosterComponents {
|
|
877
|
-
Root(props: PlayerRosterRootProps): ReactElement | null;
|
|
878
|
-
List(props: PlayerRosterListProps): ReactElement;
|
|
879
|
-
Empty(props: {
|
|
880
|
-
children?: ReactNode;
|
|
881
|
-
}): ReactElement | null;
|
|
882
|
-
Name(props: PlayerRosterPartProps): ReactElement;
|
|
883
|
-
Score(props: PlayerRosterPartProps): ReactElement | null;
|
|
884
|
-
Badges(props: PlayerRosterPartProps): ReactElement | null;
|
|
885
|
-
}
|
|
886
|
-
declare function PlayerRosterName({ player, children, ...props }: PlayerRosterPartProps): ReactElement<unknown, string | react.JSXElementConstructor<any>>;
|
|
887
|
-
declare function PlayerRosterScore({ player, children, ...props }: PlayerRosterPartProps): ReactElement<unknown, string | react.JSXElementConstructor<any>> | null;
|
|
888
|
-
declare function PlayerRosterBadges({ player, children, ...props }: PlayerRosterPartProps): ReactElement<unknown, string | react.JSXElementConstructor<any>> | null;
|
|
889
|
-
declare const PlayerRoster: PlayerRosterComponents;
|
|
890
|
-
|
|
891
|
-
type PromptRootProps<Prompt extends string = PromptKey> = InteractionRootProps<Prompt>;
|
|
892
|
-
declare function PromptRoot<Prompt extends string = PromptKey>(props: PromptRootProps<Prompt>): react_jsx_runtime.JSX.Element;
|
|
893
|
-
declare function PromptTitle(props: InteractionPartProps): react_jsx_runtime.JSX.Element;
|
|
894
|
-
declare function PromptMessage(props: InteractionPartProps): react_jsx_runtime.JSX.Element | null;
|
|
895
|
-
type PromptOptionProps<Option extends string = PromptOptionKey> = PrimitiveCommonProps & ButtonHTMLAttributes<HTMLButtonElement> & {
|
|
896
|
-
value: Option;
|
|
897
|
-
disableWhenUnavailable?: boolean;
|
|
898
|
-
onSubmitError?: InteractionSubmitCallbacks["onSubmitError"];
|
|
899
|
-
onSubmitSuccess?: InteractionSubmitCallbacks["onSubmitSuccess"];
|
|
900
|
-
};
|
|
901
|
-
declare function PromptOption<Option extends string = PromptOptionKey>({ value, disabled, disableWhenUnavailable, onClick, onSubmitError, onSubmitSuccess, children, ...props }: PromptOptionProps<Option>): react.ReactElement<unknown, string | react.JSXElementConstructor<any>>;
|
|
902
|
-
interface PromptOptionRenderItem {
|
|
903
|
-
id: string;
|
|
904
|
-
label?: string;
|
|
905
|
-
}
|
|
906
|
-
interface PromptOptionsProps {
|
|
907
|
-
children: (option: PromptOptionRenderItem) => ReactNode;
|
|
908
|
-
}
|
|
909
|
-
declare function PromptOptions({ children }: PromptOptionsProps): react_jsx_runtime.JSX.Element;
|
|
910
|
-
type PromptDialogState = DialogLifecycleState;
|
|
911
|
-
interface PromptDialogRenderState<Prompt extends string = PromptKey> {
|
|
912
|
-
prompt: Prompt;
|
|
913
|
-
state: PromptDialogState;
|
|
914
|
-
open: boolean;
|
|
915
|
-
minimized: boolean;
|
|
916
|
-
dismissed: boolean;
|
|
917
|
-
setOpen: (open: boolean) => void;
|
|
918
|
-
restore: () => void;
|
|
919
|
-
minimize: () => void;
|
|
920
|
-
dismiss: () => void;
|
|
921
|
-
}
|
|
922
|
-
interface PromptDialogProps<Prompt extends string = PromptKey> {
|
|
923
|
-
prompt: Prompt;
|
|
924
|
-
defaultOpen?: boolean;
|
|
925
|
-
onStateChange?: (state: PromptDialogState) => void;
|
|
926
|
-
children: (state: PromptDialogRenderState<Prompt>) => ReactNode;
|
|
927
|
-
}
|
|
928
|
-
declare function PromptDialog<Prompt extends string = PromptKey>({ prompt, defaultOpen, onStateChange, children, }: PromptDialogProps<Prompt>): react_jsx_runtime.JSX.Element;
|
|
929
|
-
declare function PromptInboxRoot({ children }: {
|
|
930
|
-
children: ReactNode;
|
|
931
|
-
}): react_jsx_runtime.JSX.Element;
|
|
932
|
-
declare function PromptInboxEmpty({ children }: {
|
|
933
|
-
children?: ReactNode;
|
|
934
|
-
}): react_jsx_runtime.JSX.Element | null;
|
|
935
|
-
interface PromptInboxItemsProps {
|
|
936
|
-
children: (prompt: InteractionDescriptor) => ReactNode;
|
|
937
|
-
}
|
|
938
|
-
declare function PromptInboxItems({ children }: PromptInboxItemsProps): react_jsx_runtime.JSX.Element;
|
|
939
|
-
declare const Prompt: {
|
|
940
|
-
Root: typeof PromptRoot;
|
|
941
|
-
Title: typeof PromptTitle;
|
|
942
|
-
Message: typeof PromptMessage;
|
|
943
|
-
Option: typeof PromptOption;
|
|
944
|
-
Options: typeof PromptOptions;
|
|
945
|
-
Dialog: typeof PromptDialog;
|
|
946
|
-
};
|
|
947
|
-
declare const PromptInbox: {
|
|
948
|
-
Root: typeof PromptInboxRoot;
|
|
949
|
-
Empty: typeof PromptInboxEmpty;
|
|
950
|
-
Items: typeof PromptInboxItems;
|
|
951
|
-
};
|
|
952
|
-
|
|
953
|
-
type DiceValue = number | null | undefined;
|
|
954
|
-
interface DiceState {
|
|
955
|
-
values: ReadonlyArray<number | undefined> | undefined;
|
|
956
|
-
/** Undefined if any die has not been rolled yet. */
|
|
957
|
-
sum: number | undefined;
|
|
958
|
-
diceCount: number;
|
|
959
|
-
allRolled: boolean;
|
|
960
|
-
}
|
|
961
|
-
interface DiceRootProps {
|
|
962
|
-
values?: readonly DiceValue[] | null;
|
|
963
|
-
/** Used when values are not provided. */
|
|
964
|
-
count?: number;
|
|
965
|
-
children: ReactNode;
|
|
966
|
-
}
|
|
967
|
-
interface DiceValuesProps {
|
|
968
|
-
children: (state: DiceState) => ReactNode;
|
|
969
|
-
}
|
|
970
|
-
interface DiceComponents {
|
|
971
|
-
Root(props: DiceRootProps): ReactNode;
|
|
972
|
-
Values(props: DiceValuesProps): ReactNode;
|
|
973
|
-
}
|
|
974
|
-
declare function normalizeDiceState({ values, count, }: {
|
|
975
|
-
values?: readonly DiceValue[] | null;
|
|
976
|
-
count?: number;
|
|
977
|
-
}): DiceState;
|
|
978
|
-
declare function DiceRoot({ values, count, children }: DiceRootProps): react_jsx_runtime.JSX.Element;
|
|
979
|
-
declare function useDicePrimitiveContext(): DiceState;
|
|
980
|
-
declare function DiceValues({ children }: DiceValuesProps): ReactNode;
|
|
981
|
-
declare const Dice: DiceComponents;
|
|
982
|
-
|
|
983
|
-
/**
|
|
984
|
-
* Workspace-aware UI typing extension point.
|
|
985
|
-
*
|
|
986
|
-
* Generated workspaces will augment this interface with their concrete UI
|
|
987
|
-
* contract. The unregistered SDK keeps all public keys string-compatible so
|
|
988
|
-
* package-local tests and generic consumers can still import ui-sdk directly.
|
|
989
|
-
*/
|
|
990
|
-
interface DreamboardUIRegister {
|
|
991
|
-
readonly __dreamboardUIRegister?: never;
|
|
992
|
-
}
|
|
993
|
-
type UIContractBucket = Record<string, unknown>;
|
|
994
|
-
interface UIContract {
|
|
995
|
-
interactions?: UIContractBucket;
|
|
996
|
-
inputs?: UIContractBucket;
|
|
997
|
-
prompts?: UIContractBucket;
|
|
998
|
-
promptOptions?: UIContractBucket;
|
|
999
|
-
players?: UIContractBucket;
|
|
1000
|
-
zones?: UIContractBucket;
|
|
1001
|
-
cards?: UIContractBucket;
|
|
1002
|
-
phases?: UIContractBucket;
|
|
1003
|
-
boardTargets?: UIContractBucket;
|
|
1004
|
-
}
|
|
1005
|
-
type RegisteredUIContract = DreamboardUIRegister extends {
|
|
1006
|
-
ui: infer Registered extends UIContract;
|
|
1007
|
-
} ? Registered : UIContract;
|
|
1008
|
-
type BucketOf<Contract extends UIContract, Key extends keyof UIContract> = NonNullable<Contract[Key]> extends UIContractBucket ? NonNullable<Contract[Key]> : UIContractBucket;
|
|
1009
|
-
type StringKeyOf<Bucket extends UIContractBucket> = Extract<keyof Bucket, string>;
|
|
1010
|
-
type StringKeysOrFallback<Bucket extends UIContractBucket> = [
|
|
1011
|
-
StringKeyOf<Bucket>
|
|
1012
|
-
] extends [never] ? string : string extends StringKeyOf<Bucket> ? string : StringKeyOf<Bucket>;
|
|
1013
|
-
type RegisteredUI = RegisteredUIContract;
|
|
1014
|
-
type InteractionKey<Contract extends UIContract = RegisteredUI> = StringKeysOrFallback<BucketOf<Contract, "interactions">>;
|
|
1015
|
-
type InteractionInputKey<Contract extends UIContract = RegisteredUI> = StringKeysOrFallback<BucketOf<Contract, "inputs">>;
|
|
1016
|
-
type PromptKey<Contract extends UIContract = RegisteredUI> = StringKeysOrFallback<BucketOf<Contract, "prompts">>;
|
|
1017
|
-
type PromptOptionKey<Contract extends UIContract = RegisteredUI> = StringKeysOrFallback<BucketOf<Contract, "promptOptions">>;
|
|
1018
|
-
type PlayerKey<Contract extends UIContract = RegisteredUI> = StringKeysOrFallback<BucketOf<Contract, "players">>;
|
|
1019
|
-
type ZoneKey<Contract extends UIContract = RegisteredUI> = StringKeysOrFallback<BucketOf<Contract, "zones">>;
|
|
1020
|
-
type CardKey<Contract extends UIContract = RegisteredUI> = StringKeysOrFallback<BucketOf<Contract, "cards">>;
|
|
1021
|
-
type PhaseKey<Contract extends UIContract = RegisteredUI> = StringKeysOrFallback<BucketOf<Contract, "phases">>;
|
|
1022
|
-
type BoardTargetKey<Contract extends UIContract = RegisteredUI> = StringKeysOrFallback<BucketOf<Contract, "boardTargets">>;
|
|
1023
|
-
type TypedZoneCardRenderItem<Contract extends UIContract> = ZoneCardRenderItem<CardKey<Contract> & string> extends infer Item ? Item extends {
|
|
1024
|
-
id: string;
|
|
1025
|
-
zone: string;
|
|
1026
|
-
} ? Omit<Item, "id" | "zone"> & {
|
|
1027
|
-
id: CardKey<Contract>;
|
|
1028
|
-
zone: ZoneKey<Contract>;
|
|
1029
|
-
} : never : never;
|
|
1030
|
-
type TypedInteraction<Contract extends UIContract> = Omit<typeof Interaction, "Root" | "CardInput" | "Dialog" | "Field" | "Form" | "Switch"> & {
|
|
1031
|
-
Root<Interaction extends InteractionKey<Contract>>(props: InteractionRootProps<Interaction>): ReactElement | null;
|
|
1032
|
-
Switch(props: Omit<InteractionSwitchProps<InteractionKey<Contract>>, "routes"> & {
|
|
1033
|
-
routes: InteractionSwitchRouteMap<InteractionKey<Contract>>;
|
|
1034
|
-
}): ReactElement;
|
|
1035
|
-
Routes(props: Omit<InteractionRoutesProps<InteractionKey<Contract>>, "routes"> & {
|
|
1036
|
-
routes: InteractionRoutesMap<InteractionKey<Contract>>;
|
|
1037
|
-
}): ReactElement;
|
|
1038
|
-
CardInput<Input extends InteractionInputKey<Contract>>(props: Omit<InteractionCardInputProps, "input" | "unsafeCardId"> & {
|
|
1039
|
-
input: Input;
|
|
1040
|
-
unsafeCardId?: CardKey<Contract>;
|
|
1041
|
-
}): ReactElement;
|
|
1042
|
-
Dialog<Interaction extends InteractionKey<Contract>>(props: InteractionDialogProps<Interaction>): ReactElement;
|
|
1043
|
-
Field<Input extends InteractionInputKey<Contract>>(props: Omit<InteractionFieldPrimitiveProps, "input"> & {
|
|
1044
|
-
input: Input;
|
|
1045
|
-
}): ReactElement | null;
|
|
1046
|
-
Form(props: InteractionFormPrimitiveProps): ReactElement | null;
|
|
1047
|
-
};
|
|
1048
|
-
type TypedPrompt<Contract extends UIContract> = Omit<typeof Prompt, "Root" | "Option" | "Options" | "Dialog"> & {
|
|
1049
|
-
Root<Prompt extends PromptKey<Contract>>(props: PromptRootProps<Prompt>): ReactElement | null;
|
|
1050
|
-
Option<Option extends PromptOptionKey<Contract>>(props: Omit<PromptOptionProps, "value"> & {
|
|
1051
|
-
value: Option;
|
|
1052
|
-
}): ReactElement;
|
|
1053
|
-
Options(props: Omit<PromptOptionsProps, "children"> & {
|
|
1054
|
-
children: (option: Omit<PromptOptionRenderItem, "id"> & {
|
|
1055
|
-
id: PromptOptionKey<Contract>;
|
|
1056
|
-
}) => ReactNode;
|
|
1057
|
-
}): ReactElement;
|
|
1058
|
-
Dialog<Prompt extends PromptKey<Contract>>(props: PromptDialogProps<Prompt>): ReactElement;
|
|
1059
|
-
};
|
|
1060
|
-
type TypedPromptInbox<Contract extends UIContract> = Omit<typeof PromptInbox, "Items"> & {
|
|
1061
|
-
Items(props: Omit<PromptInboxItemsProps, "children"> & {
|
|
1062
|
-
children: (prompt: Omit<InteractionDescriptor, "interactionKey"> & {
|
|
1063
|
-
interactionKey: PromptKey<Contract>;
|
|
1064
|
-
}) => ReactNode;
|
|
1065
|
-
}): ReactElement;
|
|
1066
|
-
};
|
|
1067
|
-
type TypedPlayerRosterEntry<Player extends string> = Omit<PlayerRosterEntry, "playerId"> & {
|
|
1068
|
-
playerId: Player;
|
|
1069
|
-
};
|
|
1070
|
-
type TypedPlayerRosterRootProps<Player extends string> = Omit<PlayerRosterRootProps, "score" | "scoreLabel" | "badges" | "metadata"> & {
|
|
1071
|
-
score?: (playerId: Player) => number | undefined;
|
|
1072
|
-
scoreLabel?: string | ((playerId: Player) => string | undefined);
|
|
1073
|
-
badges?: (playerId: Player) => ReadonlyArray<PlayerRosterBadge | null | false | undefined>;
|
|
1074
|
-
metadata?: (playerId: Player) => Record<string, unknown> | undefined;
|
|
1075
|
-
};
|
|
1076
|
-
type TypedPlayerRosterListProps<Player extends string> = Omit<PlayerRosterListProps, "children"> & {
|
|
1077
|
-
children?: (player: TypedPlayerRosterEntry<Player>) => ReactNode;
|
|
1078
|
-
};
|
|
1079
|
-
type TypedPlayerRosterPartProps<Player extends string> = Omit<PlayerRosterPartProps, "player"> & {
|
|
1080
|
-
player: TypedPlayerRosterEntry<Player>;
|
|
1081
|
-
};
|
|
1082
|
-
type TypedPlayerRoster<Contract extends UIContract> = Omit<PlayerRosterComponents, "Root" | "List" | "Name" | "Score" | "Badges"> & {
|
|
1083
|
-
Root(props: TypedPlayerRosterRootProps<PlayerKey<Contract>>): ReactElement | null;
|
|
1084
|
-
List(props: TypedPlayerRosterListProps<PlayerKey<Contract>>): ReactElement;
|
|
1085
|
-
Name(props: TypedPlayerRosterPartProps<PlayerKey<Contract>>): ReactElement;
|
|
1086
|
-
Score(props: TypedPlayerRosterPartProps<PlayerKey<Contract>>): ReactElement | null;
|
|
1087
|
-
Badges(props: TypedPlayerRosterPartProps<PlayerKey<Contract>>): ReactElement | null;
|
|
1088
|
-
};
|
|
1089
|
-
type TypedPhase<Contract extends UIContract> = Omit<typeof Phase, "Switch"> & {
|
|
1090
|
-
Switch(props: PhaseSwitchProps<PhaseKey<Contract>>): ReactElement | null;
|
|
1091
|
-
};
|
|
1092
|
-
type TypedZone<Contract extends UIContract> = Omit<typeof Zone, "Root" | "Item" | "CardAt" | "TopCard" | "CardAction" | "List" | "PileRoot" | "PileCards"> & {
|
|
1093
|
-
Root<Zone extends ZoneKey<Contract>>(props: Omit<ZoneRootProps, "zone"> & {
|
|
1094
|
-
zone: Zone;
|
|
1095
|
-
}): ReactElement;
|
|
1096
|
-
Item<Card extends CardKey<Contract>>(props: Omit<ZoneItemProps, "card"> & {
|
|
1097
|
-
card: Card;
|
|
1098
|
-
}): ReactElement;
|
|
1099
|
-
CardAction<Card extends CardKey<Contract>>(props: Omit<ZoneCardActionProps, "card"> & {
|
|
1100
|
-
card?: Card;
|
|
1101
|
-
}): ReactElement;
|
|
1102
|
-
CardAt<Zone extends ZoneKey<Contract>>(props: Omit<ZoneCardAtProps<Zone>, "zone" | "children"> & {
|
|
1103
|
-
zone?: Zone;
|
|
1104
|
-
children?: ReactNode | ((card: TypedZoneCardRenderItem<Contract>) => ReactNode);
|
|
1105
|
-
}): ReactElement | null;
|
|
1106
|
-
TopCard<Zone extends ZoneKey<Contract>>(props: Omit<ZoneCardAtProps<Zone>, "zone" | "index" | "children"> & {
|
|
1107
|
-
zone?: Zone;
|
|
1108
|
-
children?: ReactNode | ((card: TypedZoneCardRenderItem<Contract>) => ReactNode);
|
|
1109
|
-
}): ReactElement | null;
|
|
1110
|
-
List(props: Omit<ZoneListProps, "children"> & {
|
|
1111
|
-
children?: ReactNode | ((card: TypedZoneCardRenderItem<Contract>) => ReactNode);
|
|
1112
|
-
}): ReactElement;
|
|
1113
|
-
PileRoot<Zone extends ZoneKey<Contract>>(props: Omit<ZonePileRootProps<Zone>, "zone"> & {
|
|
1114
|
-
zone: Zone;
|
|
1115
|
-
}): ReactElement;
|
|
1116
|
-
PileCards(props: Omit<ZonePileCardsProps, "renderCard"> & {
|
|
1117
|
-
renderCard: (card: TypedZoneCardRenderItem<Contract>) => ReactNode;
|
|
1118
|
-
}): ReactElement | null;
|
|
1119
|
-
};
|
|
1120
|
-
type TypedBoard<Contract extends UIContract> = Omit<typeof Board, "Target" | "SpaceTarget" | "EdgeTarget" | "VertexTarget" | "HexGrid" | "SquareGrid"> & {
|
|
1121
|
-
Target<Target extends BoardTargetKey<Contract>>(props: Omit<BoardTargetProps, "value"> & {
|
|
1122
|
-
value: Target;
|
|
1123
|
-
}): ReactElement;
|
|
1124
|
-
SpaceTarget<Target extends BoardTargetKey<Contract>>(props: Omit<BoardSpaceTargetProps, "value"> & {
|
|
1125
|
-
value: Target;
|
|
1126
|
-
}): ReactElement;
|
|
1127
|
-
EdgeTarget<Target extends BoardTargetKey<Contract>>(props: Omit<BoardEdgeTargetProps, "value"> & {
|
|
1128
|
-
value: Target;
|
|
1129
|
-
}): ReactElement;
|
|
1130
|
-
VertexTarget<Target extends BoardTargetKey<Contract>>(props: Omit<BoardVertexTargetProps, "value"> & {
|
|
1131
|
-
value: Target;
|
|
1132
|
-
}): ReactElement;
|
|
1133
|
-
HexGrid<TBoard extends AnyHexBoardInput, TSpaceView extends {
|
|
1134
|
-
id: BoardSpaceIdOf<TBoard>;
|
|
1135
|
-
}>(props: Omit<BoardHexGridProps<TBoard, TSpaceView>, "interactions"> & {
|
|
1136
|
-
interactions?: Exclude<BoardHexGridInteractionFilter, object> | {
|
|
1137
|
-
edge?: ReadonlyArray<InteractionKey<Contract>>;
|
|
1138
|
-
vertex?: ReadonlyArray<InteractionKey<Contract>>;
|
|
1139
|
-
space?: ReadonlyArray<InteractionKey<Contract>>;
|
|
1140
|
-
};
|
|
1141
|
-
}): ReactElement;
|
|
1142
|
-
SquareGrid<TBoard extends AnySquareBoardInput>(props: Omit<BoardSquareGridProps<TBoard>, "interactions"> & {
|
|
1143
|
-
interactions?: Exclude<BoardSquareGridInteractionFilter, object> | {
|
|
1144
|
-
edge?: ReadonlyArray<InteractionKey<Contract>>;
|
|
1145
|
-
vertex?: ReadonlyArray<InteractionKey<Contract>>;
|
|
1146
|
-
space?: ReadonlyArray<InteractionKey<Contract>>;
|
|
1147
|
-
};
|
|
1148
|
-
}): ReactElement;
|
|
1149
|
-
};
|
|
1150
|
-
type TypedGame<_Contract extends UIContract, View = unknown, Player extends string = PlayerKey<_Contract>, Phase extends string = PhaseKey<_Contract>> = Omit<typeof Game, "Root"> & {
|
|
1151
|
-
Root(props: GameRootProps<View, Player, Phase>): ReactElement;
|
|
1152
|
-
Chrome(props: GameChromeProps<View, Player, Phase, InteractionKey<_Contract>>): ReactElement;
|
|
1153
|
-
};
|
|
1154
|
-
interface DreamboardUI<Contract extends UIContract = RegisteredUI> {
|
|
1155
|
-
readonly contract: Contract;
|
|
1156
|
-
Root(props: UIRootProps): ReactElement;
|
|
1157
|
-
readonly Game: TypedGame<Contract>;
|
|
1158
|
-
readonly Interaction: TypedInteraction<Contract>;
|
|
1159
|
-
readonly Prompt: TypedPrompt<Contract>;
|
|
1160
|
-
readonly PromptInbox: TypedPromptInbox<Contract>;
|
|
1161
|
-
readonly PlayerRoster: TypedPlayerRoster<Contract>;
|
|
1162
|
-
readonly Dice: DiceComponents;
|
|
1163
|
-
readonly Phase: TypedPhase<Contract>;
|
|
1164
|
-
readonly Zone: TypedZone<Contract>;
|
|
1165
|
-
readonly Board: TypedBoard<Contract>;
|
|
1166
|
-
}
|
|
1167
|
-
|
|
1168
|
-
export { InteractionDescription as $, type DiceState as A, Board as B, type DiceValue as C, Dice as D, DiceValues as E, type DiceValuesProps as F, type DreamboardUI as G, Game as H, type GameActiveActionState as I, GameChrome as J, type GameChromeProps as K, type GameChromeState as L, type GameMeState as M, type GamePendingInputState as N, type GamePlayer as O, type GamePlayerEntry as P, type GamePlayersState as Q, type GameRenderState as R, GameRoot as S, type GameRootProps as T, type GameTurnState as U, GameViewport as V, type GameViewportProps as W, Interaction as X, InteractionCardInput as Y, type InteractionCardInputProps as Z, type InteractionCardInputRenderState as _, BoardEdgeTarget as a, type PromptOptionsProps as a$, InteractionDialog as a0, type InteractionDialogProps as a1, type InteractionDialogRenderState as a2, type InteractionDialogState as a3, type InteractionFieldPrimitiveProps as a4, InteractionFormPrimitive as a5, type InteractionFormPrimitiveProps as a6, InteractionInput as a7, type InteractionInputProps as a8, InteractionLabel as a9, type PlayerRosterBadge as aA, PlayerRosterBadges as aB, type PlayerRosterComponents as aC, PlayerRosterEmpty as aD, type PlayerRosterEntry as aE, PlayerRosterList as aF, type PlayerRosterListProps as aG, PlayerRosterName as aH, type PlayerRosterPartProps as aI, PlayerRosterRoot as aJ, type PlayerRosterRootProps as aK, PlayerRosterScore as aL, Prompt as aM, PromptDialog as aN, type PromptDialogProps as aO, type PromptDialogRenderState as aP, type PromptDialogState as aQ, PromptInbox as aR, PromptInboxEmpty as aS, PromptInboxItems as aT, type PromptInboxItemsProps as aU, PromptInboxRoot as aV, PromptMessage as aW, PromptOption as aX, type PromptOptionProps as aY, type PromptOptionRenderItem as aZ, PromptOptions as a_, type InteractionPartProps as aa, InteractionRoot as ab, type InteractionRootProps as ac, type InteractionRoute as ad, InteractionRoutes as ae, type InteractionRoutesMap as af, type InteractionRoutesProps as ag, InteractionState as ah, type InteractionStateProps as ai, type InteractionStateSnapshot as aj, InteractionSubmit as ak, type InteractionSubmitProps as al, InteractionSwitch as am, type InteractionSwitchProps as an, type InteractionSwitchRenderState as ao, type InteractionSwitchRouteMap as ap, InteractionTrigger as aq, type InteractionTriggerProps as ar, InteractionUnavailableMessage as as, InteractionValidationMessage as at, Phase as au, type PhaseFallback as av, type PhaseRouteMap as aw, PhaseSwitch as ax, type PhaseSwitchProps as ay, PlayerRoster as az, type BoardEdgeTargetProps as b, PromptRoot as b0, type PromptRootProps as b1, PromptTitle as b2, type TypedGame as b3, UI as b4, type UIContract as b5, UIRoot as b6, type UIRootProps as b7, type UseZoneCardsOptions as b8, type UseZoneCardsResult as b9, type ZoneRootProps as bA, ZoneTopCard as bB, type ZoneTopCardProps as bC, createZoneCardRenderItem as bD, normalizeDiceState as bE, useBoardPrimitiveContext as bF, useDicePrimitiveContext as bG, useGameActionError as bH, useInteractionPrimitiveContext as bI, useOptionalZonePrimitiveContext as bJ, useResolvedCardTargetValue as bK, useZoneCardContext as bL, useZoneCards as bM, useZonePileContext as bN, useZonePrimitiveContext as bO, Zone as ba, ZoneCardAction as bb, type ZoneCardActionExtraInputs as bc, type ZoneCardActionProps as bd, type ZoneCardActionResult as be, ZoneCardAt as bf, type ZoneCardAtProps as bg, type ZoneCardRenderItem as bh, ZoneItem as bi, type ZoneItemProps as bj, ZoneList as bk, type ZoneListProps as bl, ZonePileCards as bm, type ZonePileCardsProps as bn, type ZonePileContextValue as bo, ZonePileCount as bp, type ZonePileCountProps as bq, ZonePileDescription as br, type ZonePileDescriptionProps as bs, ZonePileLabel as bt, type ZonePileLabelProps as bu, ZonePileRoot as bv, type ZonePileRootProps as bw, ZonePileTrigger as bx, type ZonePileTriggerProps as by, ZoneRoot as bz, type BoardGridInteractionFilter as c, BoardHexGrid as d, type BoardHexGridInteractionFilter as e, type BoardHexGridInteractions as f, type BoardHexGridProps as g, BoardHexView as h, type BoardHexViewProps as i, BoardRoot as j, type BoardRootProps as k, BoardSpaceTarget as l, type BoardSpaceTargetProps as m, BoardSquareGrid as n, type BoardSquareGridInteractionFilter as o, type BoardSquareGridProps as p, BoardState as q, type BoardStateProps as r, BoardTarget as s, type BoardTargetExtraInputs as t, type BoardTargetProps as u, BoardVertexTarget as v, type BoardVertexTargetProps as w, type DiceComponents as x, DiceRoot as y, type DiceRootProps as z };
|