@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.
Files changed (150) hide show
  1. package/README.md +136 -45
  2. package/dist/chunk-DMFVAZI2.js +16 -0
  3. package/dist/chunk-DMFVAZI2.js.map +1 -0
  4. package/dist/chunk-FMM5LVJW.js +833 -0
  5. package/dist/chunk-FMM5LVJW.js.map +1 -0
  6. package/dist/{chunk-S2JEDVWH.js → chunk-LRILEVKC.js} +6113 -6489
  7. package/dist/chunk-LRILEVKC.js.map +1 -0
  8. package/dist/chunk-SP234IY4.js +1363 -0
  9. package/dist/chunk-SP234IY4.js.map +1 -0
  10. package/dist/chunk-VUWNJXLJ.js +52 -0
  11. package/dist/chunk-VUWNJXLJ.js.map +1 -0
  12. package/dist/chunk-ZPRKWPEP.js +511 -0
  13. package/dist/chunk-ZPRKWPEP.js.map +1 -0
  14. package/dist/definition-BaHNPZol.d.ts +4639 -0
  15. package/dist/diagnostics-B0lgnuZ6.d.ts +65 -0
  16. package/dist/index.d.ts +3553 -1
  17. package/dist/index.js +1045 -6
  18. package/dist/index.js.map +1 -1
  19. package/dist/model-BHro6yXu.d.ts +288 -0
  20. package/dist/react.d.ts +32 -0
  21. package/dist/react.js +80 -0
  22. package/dist/react.js.map +1 -0
  23. package/dist/reducer.d.ts +1194 -79
  24. package/dist/reducer.js +4326 -121
  25. package/dist/reducer.js.map +1 -1
  26. package/dist/testing.d.ts +518 -564
  27. package/dist/testing.js +2448 -915
  28. package/dist/testing.js.map +1 -1
  29. package/dist/types-DimqnJBq.d.ts +86 -0
  30. package/package.json +26 -131
  31. package/dist/HandView-Bi2lxzQP.d.ts +0 -79
  32. package/dist/ResourceCounter-BFxJknqp.d.ts +0 -98
  33. package/dist/ThemeProvider-CElaL2ik.d.ts +0 -99
  34. package/dist/attributes-DbvyMbXw.d.ts +0 -68
  35. package/dist/browser-interaction.d.ts +0 -910
  36. package/dist/browser-interaction.js +0 -119
  37. package/dist/browser-interaction.js.map +0 -1
  38. package/dist/chunk-32PFKDV7.js +0 -11705
  39. package/dist/chunk-32PFKDV7.js.map +0 -1
  40. package/dist/chunk-3BAD4VC2.js +0 -263
  41. package/dist/chunk-3BAD4VC2.js.map +0 -1
  42. package/dist/chunk-3SKDNDPG.js +0 -104
  43. package/dist/chunk-3SKDNDPG.js.map +0 -1
  44. package/dist/chunk-5YV2WHJ4.js +0 -25
  45. package/dist/chunk-5YV2WHJ4.js.map +0 -1
  46. package/dist/chunk-ANRB4XKA.js +0 -90
  47. package/dist/chunk-ANRB4XKA.js.map +0 -1
  48. package/dist/chunk-BI4G3PM2.js +0 -1864
  49. package/dist/chunk-BI4G3PM2.js.map +0 -1
  50. package/dist/chunk-EVCLTY4Q.js +0 -935
  51. package/dist/chunk-EVCLTY4Q.js.map +0 -1
  52. package/dist/chunk-GDPKTBUR.js +0 -564
  53. package/dist/chunk-GDPKTBUR.js.map +0 -1
  54. package/dist/chunk-H6VDGFL5.js +0 -2903
  55. package/dist/chunk-H6VDGFL5.js.map +0 -1
  56. package/dist/chunk-LR3ZTWQF.js +0 -5960
  57. package/dist/chunk-LR3ZTWQF.js.map +0 -1
  58. package/dist/chunk-PF7L4BMG.js +0 -117
  59. package/dist/chunk-PF7L4BMG.js.map +0 -1
  60. package/dist/chunk-PN5O6GG2.js +0 -32
  61. package/dist/chunk-PN5O6GG2.js.map +0 -1
  62. package/dist/chunk-PZ5AY32C.js +0 -10
  63. package/dist/chunk-PZ5AY32C.js.map +0 -1
  64. package/dist/chunk-S2JEDVWH.js.map +0 -1
  65. package/dist/chunk-T3ZKNUZ7.js +0 -1
  66. package/dist/chunk-T3ZKNUZ7.js.map +0 -1
  67. package/dist/chunk-UGH54WZ2.js +0 -223
  68. package/dist/chunk-UGH54WZ2.js.map +0 -1
  69. package/dist/chunk-VCDWP5VL.js +0 -746
  70. package/dist/chunk-VCDWP5VL.js.map +0 -1
  71. package/dist/chunk-VDXOF4FW.js +0 -69
  72. package/dist/chunk-VDXOF4FW.js.map +0 -1
  73. package/dist/chunk-WHR5UW3F.js +0 -1988
  74. package/dist/chunk-WHR5UW3F.js.map +0 -1
  75. package/dist/chunk-Y75CFE77.js +0 -17
  76. package/dist/chunk-Y75CFE77.js.map +0 -1
  77. package/dist/chunk-Z7QCREWI.js +0 -3435
  78. package/dist/chunk-Z7QCREWI.js.map +0 -1
  79. package/dist/chunk-ZZGN2ATS.js +0 -1941
  80. package/dist/chunk-ZZGN2ATS.js.map +0 -1
  81. package/dist/components-gAbIz7hK.d.ts +0 -1284
  82. package/dist/definitions-BgmV_GhC.d.ts +0 -300
  83. package/dist/diagnostics-DIi3ina7.d.ts +0 -50
  84. package/dist/digest.d.ts +0 -8
  85. package/dist/game-CsZScpcn.d.ts +0 -763
  86. package/dist/hex-board-view-aKkblDp6.d.ts +0 -1228
  87. package/dist/index-CcT9Q7N7.d.ts +0 -193
  88. package/dist/index.d-DjzoK7zn.d.ts +0 -2101
  89. package/dist/package-set.d.ts +0 -13
  90. package/dist/package-set.js +0 -12
  91. package/dist/package-set.js.map +0 -1
  92. package/dist/player-state-Cqpyeql0.d.ts +0 -371
  93. package/dist/plugin-runtime-contract.d.ts +0 -17
  94. package/dist/plugin-runtime-contract.js +0 -92
  95. package/dist/plugin-runtime-contract.js.map +0 -1
  96. package/dist/primitive-props-BNHDkgd7.d.ts +0 -16
  97. package/dist/protocol-dYgafTYY.d.ts +0 -314
  98. package/dist/reducer/advanced.d.ts +0 -82
  99. package/dist/reducer/advanced.js +0 -51
  100. package/dist/reducer/advanced.js.map +0 -1
  101. package/dist/reducer-contract.d.ts +0 -11
  102. package/dist/reducer-contract.js +0 -16
  103. package/dist/reducer-contract.js.map +0 -1
  104. package/dist/reference-games/index.d.ts +0 -31
  105. package/dist/reference-games/index.js +0 -48
  106. package/dist/reference-games/index.js.map +0 -1
  107. package/dist/runtime/primitives.d.ts +0 -250
  108. package/dist/runtime/primitives.js +0 -189
  109. package/dist/runtime/primitives.js.map +0 -1
  110. package/dist/runtime/runtime-api.d.ts +0 -2
  111. package/dist/runtime/runtime-api.js +0 -1
  112. package/dist/runtime/runtime-api.js.map +0 -1
  113. package/dist/runtime/workspace-contract.d.ts +0 -392
  114. package/dist/runtime/workspace-contract.js +0 -28
  115. package/dist/runtime/workspace-contract.js.map +0 -1
  116. package/dist/runtime-RJ5orDJU.d.ts +0 -1699
  117. package/dist/runtime-api-Bz5pwNU_.d.ts +0 -296
  118. package/dist/runtime-json-CQ9QbLZ5.d.ts +0 -5
  119. package/dist/runtime.d.ts +0 -83
  120. package/dist/runtime.js +0 -242
  121. package/dist/runtime.js.map +0 -1
  122. package/dist/schema.d.ts +0 -379
  123. package/dist/stale-contract-artifact-error-XLaweZtF.d.ts +0 -18
  124. package/dist/testing-compiler.d.ts +0 -37
  125. package/dist/testing-compiler.js +0 -272
  126. package/dist/testing-compiler.js.map +0 -1
  127. package/dist/testing-runtime.d.ts +0 -119
  128. package/dist/testing-runtime.js +0 -212
  129. package/dist/testing-runtime.js.map +0 -1
  130. package/dist/types-DJj5MJkl.d.ts +0 -256
  131. package/dist/types-DR7DoB1x.d.ts +0 -28
  132. package/dist/types-JWCYHmu7.d.ts +0 -122
  133. package/dist/types.d.ts +0 -1958
  134. package/dist/types.js +0 -14
  135. package/dist/types.js.map +0 -1
  136. package/dist/ui/components.d.ts +0 -17
  137. package/dist/ui/components.js +0 -216
  138. package/dist/ui/components.js.map +0 -1
  139. package/dist/ui/defaults.d.ts +0 -19
  140. package/dist/ui/defaults.js +0 -104
  141. package/dist/ui/defaults.js.map +0 -1
  142. package/dist/ui/player-state.d.ts +0 -2
  143. package/dist/ui/player-state.js +0 -1
  144. package/dist/ui/player-state.js.map +0 -1
  145. package/dist/ui/plugin-styles.css +0 -2
  146. package/dist/ui-contract-GTUPkf8z.d.ts +0 -1168
  147. package/dist/ui.d.ts +0 -317
  148. package/dist/ui.js +0 -277
  149. package/dist/ui.js.map +0 -1
  150. package/dist/views-BpuWcOyN.d.ts +0 -1641
@@ -1,13 +0,0 @@
1
- declare const DREAMBOARD_SDK_VERSION: string;
2
- declare const DREAMBOARD_SDK_PACKAGES: {
3
- readonly "@dreamboard-games/sdk": string;
4
- };
5
- type DreamboardSdkPackageName = keyof typeof DREAMBOARD_SDK_PACKAGES;
6
- type DreamboardSdkPackageSet = {
7
- version: 1;
8
- sdkVersion: string;
9
- packages: Record<DreamboardSdkPackageName, string>;
10
- };
11
- declare const DREAMBOARD_SDK_PACKAGE_SET: DreamboardSdkPackageSet;
12
-
13
- export { DREAMBOARD_SDK_PACKAGES, DREAMBOARD_SDK_PACKAGE_SET, DREAMBOARD_SDK_VERSION, type DreamboardSdkPackageName, type DreamboardSdkPackageSet };
@@ -1,12 +0,0 @@
1
- import {
2
- DREAMBOARD_SDK_PACKAGES,
3
- DREAMBOARD_SDK_PACKAGE_SET,
4
- DREAMBOARD_SDK_VERSION
5
- } from "./chunk-Y75CFE77.js";
6
- import "./chunk-PZ5AY32C.js";
7
- export {
8
- DREAMBOARD_SDK_PACKAGES,
9
- DREAMBOARD_SDK_PACKAGE_SET,
10
- DREAMBOARD_SDK_VERSION
11
- };
12
- //# sourceMappingURL=package-set.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -1,371 +0,0 @@
1
- import { ViewCard } from './types.js';
2
-
3
- type HexColor = string & {
4
- readonly __brand: "HexColor";
5
- };
6
- declare function isHexColor(value: unknown): value is HexColor;
7
- declare function parseHexColor(value: unknown): HexColor | undefined;
8
- declare function hexColor(value: string): HexColor;
9
-
10
- type PlayerId = string;
11
- type CardId = string;
12
- type DeckId = string;
13
- type BoardBaseId = string;
14
- type BoardId = string;
15
- type PieceId = string;
16
- type SpaceId = string;
17
- type DieId = string;
18
- type EdgeTypeId = string;
19
- type VertexTypeId = string;
20
- type PieceTypeId = string;
21
- type SpaceTypeId = string;
22
- type CardProperties = Record<string, unknown>;
23
- type CardIdsByDeckId = Record<DeckId, readonly CardId[]>;
24
- interface PerPlayer<Value> {
25
- readonly __perPlayer: true;
26
- readonly entries: ReadonlyArray<readonly [PlayerId, Value]>;
27
- }
28
- interface SharedBoardRef<BaseId extends string = BoardBaseId> {
29
- readonly baseId: BaseId;
30
- readonly seat?: undefined;
31
- }
32
- interface PerPlayerBoardRef<BaseId extends string = BoardBaseId, Id extends string = PlayerId> {
33
- readonly baseId: BaseId;
34
- readonly seat: Id;
35
- }
36
- type BoardRef<BaseId extends string = BoardBaseId, Id extends string = PlayerId> = SharedBoardRef<BaseId> | PerPlayerBoardRef<BaseId, Id>;
37
- /**
38
- * Hands are keyed by the authored hand id and split per seat. The per-seat
39
- * entries are populated from the runtime seat list, not the static manifest
40
- * upper bound, so views always match what the backend actually computed.
41
- */
42
- type CardIdsByHandId = Record<string, PerPlayer<CardId[]>>;
43
- type StateName = string;
44
- type TilePropertiesByBoardId = Record<BoardId, Record<string, unknown>>;
45
- type EdgePropertiesByBoardId = Record<BoardId, Record<string, unknown>>;
46
- type VertexPropertiesByBoardId = Record<BoardId, Record<string, unknown>>;
47
- interface Player {
48
- /** Player ID */
49
- playerId: PlayerId;
50
- /** Player display name */
51
- name: string;
52
- /** Whether this player is the host */
53
- isHost?: boolean;
54
- /** Player's assigned color */
55
- color?: HexColor;
56
- }
57
- interface HexTileState<B extends string = BoardId, SpaceIdValue extends string = SpaceId, Properties = B extends keyof TilePropertiesByBoardId ? TilePropertiesByBoardId[B] : undefined, View = unknown> {
58
- /** Unique tile identifier */
59
- id: SpaceIdValue;
60
- /** Axial coordinate Q */
61
- q: number;
62
- /** Axial coordinate R */
63
- r: number;
64
- /** Tile type identifier for rendering */
65
- typeId?: SpaceTypeId;
66
- /** Display label on the tile */
67
- label?: string;
68
- /** Player ID who owns this tile */
69
- owner?: PlayerId;
70
- /** JSON-serialized custom properties */
71
- properties?: Properties;
72
- /**
73
- * Optional view-projection overlay merged onto the static topology by
74
- * component-first board helpers such as `Board.HexView`. Authored boards can
75
- * also supply this directly when building tiles by hand.
76
- */
77
- view?: View;
78
- }
79
- /** State of an edge on a reducer-projected hex board. */
80
- interface HexEdgeState<B extends string = BoardId, SpaceIdValue extends string = SpaceId, EdgeIdValue extends string = string, Properties = B extends keyof EdgePropertiesByBoardId ? EdgePropertiesByBoardId[B] : undefined> {
81
- /** Unique edge identifier (serialized string, e.g., "tile1-tile2") */
82
- id: EdgeIdValue;
83
- /** First hex tile ID this edge borders */
84
- hex1: SpaceIdValue;
85
- /** Second hex tile ID this edge borders */
86
- hex2: SpaceIdValue;
87
- /** Edge type identifier for rendering */
88
- typeId?: EdgeTypeId;
89
- /** Display label for setup or rendering */
90
- label?: string;
91
- /** Player ID who owns this edge */
92
- owner?: PlayerId;
93
- /** JSON-serialized custom properties */
94
- properties?: Properties;
95
- }
96
- /** State of a vertex on a reducer-projected hex board. */
97
- interface HexVertexState<B extends string = BoardId, SpaceIdValue extends string = SpaceId, VertexIdValue extends string = string, Properties = B extends keyof VertexPropertiesByBoardId ? VertexPropertiesByBoardId[B] : undefined> {
98
- /** Unique vertex identifier (serialized string, e.g., "tile1-tile2-tile3") */
99
- id: VertexIdValue;
100
- /** The hex tile IDs this vertex touches */
101
- hexes: readonly SpaceIdValue[];
102
- /** Vertex type identifier for rendering */
103
- typeId?: VertexTypeId;
104
- /** Display label for setup or rendering */
105
- label?: string;
106
- /** Player ID who owns this vertex */
107
- owner?: PlayerId;
108
- /** JSON-serialized custom properties */
109
- properties?: Properties;
110
- }
111
- /** Complete state of a reducer-projected hex board. */
112
- interface HexBoardState<B extends string = BoardId, SpaceIdValue extends string = SpaceId, EdgeIdValue extends string = string, VertexIdValue extends string = string, TileProperties = B extends keyof TilePropertiesByBoardId ? TilePropertiesByBoardId[B] : undefined, EdgeProperties = B extends keyof EdgePropertiesByBoardId ? EdgePropertiesByBoardId[B] : undefined, VertexProperties = B extends keyof VertexPropertiesByBoardId ? VertexPropertiesByBoardId[B] : undefined> {
113
- /** Unique board identifier */
114
- id: B;
115
- /** All tiles on the board */
116
- tiles: ReadonlyArray<HexTileState<B, SpaceIdValue, TileProperties>>;
117
- /** All edges on the board */
118
- edges: ReadonlyArray<HexEdgeState<B, SpaceIdValue, EdgeIdValue, EdgeProperties>>;
119
- /** All vertices on the board */
120
- vertices: ReadonlyArray<HexVertexState<B, SpaceIdValue, VertexIdValue, VertexProperties>>;
121
- }
122
- /** State of a node in a reducer-projected network board. */
123
- interface NetworkNodeState {
124
- /** Unique node identifier */
125
- id: SpaceId;
126
- /** X coordinate position */
127
- x: number;
128
- /** Y coordinate position */
129
- y: number;
130
- /** Node type identifier for rendering */
131
- typeId?: SpaceTypeId;
132
- /** Display label on the node */
133
- label?: string;
134
- /** Player ID who owns this node */
135
- owner?: PlayerId;
136
- /** JSON-serialized custom properties */
137
- properties?: string;
138
- }
139
- /** State of an edge connecting two nodes in a reducer-projected network board. */
140
- interface NetworkEdgeState {
141
- /** Unique edge identifier */
142
- id: string;
143
- /** Source node ID */
144
- from: SpaceId;
145
- /** Target node ID */
146
- to: SpaceId;
147
- /** Edge type identifier for rendering */
148
- typeId?: string;
149
- /** Display label on the edge */
150
- label?: string;
151
- /** Player ID who owns this edge */
152
- owner?: PlayerId;
153
- /** JSON-serialized custom properties */
154
- properties?: string;
155
- }
156
- /** State of a piece placed on a reducer-projected network node. */
157
- interface NetworkPieceState {
158
- /** Unique piece identifier */
159
- id: PieceId;
160
- /** Node ID where this piece is placed */
161
- nodeId: SpaceId;
162
- /** Piece type identifier for rendering */
163
- typeId?: PieceTypeId;
164
- /** Player ID who owns this piece */
165
- owner?: PlayerId;
166
- /** JSON-serialized custom properties */
167
- properties?: string;
168
- }
169
- /** Complete state of a reducer-projected network board. */
170
- interface NetworkBoardState {
171
- /** Unique board identifier */
172
- id: BoardId;
173
- /** All nodes on the board */
174
- nodes: NetworkNodeState[];
175
- /** All edges on the board */
176
- edges: NetworkEdgeState[];
177
- /** All pieces on the board */
178
- pieces: NetworkPieceState[];
179
- }
180
- /** State of a cell on a reducer-projected square grid board. */
181
- interface SquareCellState<SpaceIdValue extends string = SpaceId, Properties = Record<string, unknown>> {
182
- /** Unique cell identifier */
183
- id: SpaceIdValue;
184
- /** Row index (0-based) */
185
- row: number;
186
- /** Column index (0-based) */
187
- col: number;
188
- /** Cell type identifier for rendering */
189
- typeId?: SpaceTypeId;
190
- /** Display label on the cell */
191
- label?: string;
192
- /** Player ID who owns this cell */
193
- owner?: PlayerId;
194
- /** JSON-serialized custom properties */
195
- properties?: Properties;
196
- }
197
- /** State of an edge on a reducer-projected square grid board. */
198
- interface SquareEdgeState<SpaceIdValue extends string = SpaceId, EdgeIdValue extends string = string, Properties = Record<string, unknown>> {
199
- /** Unique edge identifier */
200
- id: EdgeIdValue;
201
- /** The cell IDs this edge borders */
202
- spaceIds: readonly SpaceIdValue[];
203
- /** Edge type identifier for rendering */
204
- typeId?: EdgeTypeId;
205
- /** Display label for setup or rendering */
206
- label?: string;
207
- /** Player ID who owns this edge */
208
- owner?: PlayerId;
209
- /** JSON-serialized custom properties */
210
- properties?: Properties;
211
- }
212
- /** State of a vertex on a reducer-projected square grid board. */
213
- interface SquareVertexState<SpaceIdValue extends string = SpaceId, VertexIdValue extends string = string, Properties = Record<string, unknown>> {
214
- /** Unique vertex identifier */
215
- id: VertexIdValue;
216
- /** The cell IDs that touch this corner */
217
- spaceIds: readonly SpaceIdValue[];
218
- /** Vertex type identifier for rendering */
219
- typeId?: VertexTypeId;
220
- /** Display label for setup or rendering */
221
- label?: string;
222
- /** Player ID who owns this vertex */
223
- owner?: PlayerId;
224
- /** JSON-serialized custom properties */
225
- properties?: Properties;
226
- }
227
- /** State of a piece placed on a reducer-projected square grid cell. */
228
- interface SquarePieceState<PieceIdValue extends string = PieceId, Properties = Record<string, unknown>> {
229
- /** Unique piece identifier */
230
- id: PieceIdValue;
231
- /** Row index where piece is located */
232
- row: number;
233
- /** Column index where piece is located */
234
- col: number;
235
- /** Piece type identifier for rendering */
236
- typeId: PieceTypeId;
237
- /** Player ID who owns this piece */
238
- owner?: PlayerId;
239
- /** JSON-serialized custom properties */
240
- properties?: Properties;
241
- }
242
- /** Complete state of a reducer-projected square grid board. */
243
- interface SquareBoardState<B extends string = BoardId, SpaceIdValue extends string = SpaceId, EdgeIdValue extends string = string, VertexIdValue extends string = string, PieceIdValue extends string = PieceId, CellProperties = Record<string, unknown>, EdgeProperties = Record<string, unknown>, VertexProperties = Record<string, unknown>, PieceProperties = Record<string, unknown>> {
244
- /** Unique board identifier */
245
- id: B;
246
- /** Number of rows in the grid */
247
- rows: number;
248
- /** Number of columns in the grid */
249
- cols: number;
250
- /** All authored cells on the board */
251
- cells: ReadonlyArray<SquareCellState<SpaceIdValue, CellProperties>>;
252
- /** All edges on the board */
253
- edges: ReadonlyArray<SquareEdgeState<SpaceIdValue, EdgeIdValue, EdgeProperties>>;
254
- /** All vertices on the board */
255
- vertices: ReadonlyArray<SquareVertexState<SpaceIdValue, VertexIdValue, VertexProperties>>;
256
- /** All pieces on the board */
257
- pieces: ReadonlyArray<SquarePieceState<PieceIdValue, PieceProperties>>;
258
- }
259
- /** State of a space on a reducer-projected track board. */
260
- interface TrackSpaceState {
261
- /** Unique space identifier */
262
- id: SpaceId;
263
- /** Position index in the track sequence */
264
- index: number;
265
- /** X coordinate for rendering */
266
- x: number;
267
- /** Y coordinate for rendering */
268
- y: number;
269
- /** Display name of the space */
270
- name?: string;
271
- /** Space type identifier for rendering */
272
- typeId?: SpaceTypeId;
273
- /** Player ID who owns this space */
274
- owner?: PlayerId;
275
- /** IDs of spaces that can be reached from here (for branching tracks) */
276
- nextSpaces?: SpaceId[];
277
- /** JSON-serialized custom properties */
278
- properties?: string;
279
- }
280
- /** State of a piece on a reducer-projected track board. */
281
- interface TrackPieceState {
282
- /** Unique piece identifier */
283
- id: PieceId;
284
- /** ID of the space this piece occupies */
285
- spaceId: SpaceId;
286
- /** Player ID who owns this piece */
287
- owner: PlayerId;
288
- /** Piece type identifier for rendering */
289
- typeId?: PieceTypeId;
290
- /** JSON-serialized custom properties */
291
- properties?: string;
292
- }
293
- /** Complete state of a reducer-projected track board. */
294
- interface TrackBoardState {
295
- /** Unique board identifier */
296
- id: BoardId;
297
- /** All spaces on the track */
298
- spaces: TrackSpaceState[];
299
- /** All pieces on the track */
300
- pieces: TrackPieceState[];
301
- }
302
- /** State of a reducer-projected die component. */
303
- interface DieState {
304
- /** Unique die identifier */
305
- id: DieId;
306
- /** Number of sides on the die (e.g., 6 for standard die) */
307
- sides: number;
308
- /** Current face value (1 to sides, undefined if not rolled) */
309
- currentValue?: number;
310
- /** Optional color for visual identification */
311
- color?: string;
312
- }
313
- /**
314
- * Collection of boards of a particular kind, split into shared boards
315
- * (indexed by base id, e.g. `"market-board"`) and per-player boards
316
- * (indexed by base id, then by the runtime seat list via `PerPlayer<T>`).
317
- *
318
- * Splitting by the `BoardRef` discriminator keeps the UI types honest about
319
- * what the runtime actually produced: per-player board state only exists
320
- * for the seats that are currently playing, never for a static `maxPlayers`
321
- * upper bound.
322
- */
323
- interface BoardKindStates<State> {
324
- /** Shared boards keyed by base id. */
325
- shared: Record<BoardBaseId, State>;
326
- /** Per-player boards keyed by base id, then by seat via `PerPlayer<T>`. */
327
- perPlayer: Record<BoardBaseId, PerPlayer<State>>;
328
- }
329
- /**
330
- * Container for all board states organized by kind.
331
- * This is the strongly-typed board payload authored UIs consume from reducer views.
332
- */
333
- interface BoardStates {
334
- /** Hex boards split into shared vs per-player collections. */
335
- hex: BoardKindStates<HexBoardState>;
336
- /** Network boards split into shared vs per-player collections. */
337
- network: BoardKindStates<NetworkBoardState>;
338
- /** Square grid boards split into shared vs per-player collections. */
339
- square: BoardKindStates<SquareBoardState>;
340
- /** Track boards split into shared vs per-player collections. */
341
- track: BoardKindStates<TrackBoardState>;
342
- }
343
- /**
344
- * Container for all dice states.
345
- * Maps die IDs to their die state.
346
- */
347
- type DiceStates = Record<DieId, DieState>;
348
- interface GameState {
349
- /** All currently active players (supports MULTIPLE_ACTIVE_PLAYER states) */
350
- currentPlayerIds: PlayerId[];
351
- decks: CardIdsByDeckId;
352
- /**
353
- * Player-scoped hands keyed by the authored hand id. The inner
354
- * `PerPlayer<CardId[]>` is keyed by the runtime seat list and only
355
- * contains entries for players who actually hold the hand.
356
- */
357
- hands: CardIdsByHandId;
358
- /** Map of card IDs to their card info including type and properties */
359
- cards: Record<CardId, ViewCard<CardId, string, CardProperties>>;
360
- /**
361
- * Per-player resource totals keyed by the runtime seat list. The inner
362
- * record maps resource id → amount for that seat.
363
- */
364
- playerResources: PerPlayer<Record<string, number>>;
365
- currentState: StateName;
366
- isMyTurn: boolean;
367
- boards: BoardStates;
368
- dice: DiceStates;
369
- }
370
-
371
- export { type SquarePieceState as A, type BoardBaseId as B, type CardId as C, type DeckId as D, type EdgeTypeId as E, type SquareVertexState as F, type GameState as G, type HexBoardState as H, type TrackPieceState as I, type TrackSpaceState as J, hexColor as K, isHexColor as L, parseHexColor as M, type NetworkBoardState as N, type PerPlayer as P, type SharedBoardRef as S, type TrackBoardState as T, type VertexTypeId as V, type BoardId as a, type BoardKindStates as b, type BoardRef as c, type BoardStates as d, type CardIdsByDeckId as e, type CardProperties as f, type DiceStates as g, type DieId as h, type DieState as i, type HexColor as j, type HexEdgeState as k, type HexTileState as l, type HexVertexState as m, type NetworkEdgeState as n, type NetworkNodeState as o, type NetworkPieceState as p, type PerPlayerBoardRef as q, type PieceId as r, type PieceTypeId as s, type Player as t, type PlayerId as u, type SpaceId as v, type SpaceTypeId as w, type SquareBoardState as x, type SquareCellState as y, type SquareEdgeState as z };
@@ -1,17 +0,0 @@
1
- import { P, L, R, v } from './protocol-dYgafTYY.js';
2
- export { A as ActionInteractionDescriptor, a as ActionSetVersionInput, C as CanonicalJson, D as DREAMBOARD_PLUGIN_PROTOCOL, b as DREAMBOARD_PLUGIN_PROTOCOL_VERSION, G as GameEvent, c as GameEventDetail, d as GameOutcome, e as GameplayBasis, H as HostToPluginEnvelope, f as HostToPluginPayload, I as InputDomain, g as InputDomainDependencies, h as InputDomainDependencyCase, i as InputSelection, j as InteractionAvailability, k as InteractionChoiceOption, l as InteractionCommitPolicy, m as InteractionContext, n as InteractionContextOption, o as InteractionDescriptor, p as InteractionDiagnosticReason, q as InteractionInputDescriptor, r as InteractionResult, O as OutcomeResult, s as OutcomeScoreComponent, t as OutcomeStanding, u as OutcomeTieBreak, P as PlayerId, v as PluginGameplayFrame, w as PluginPlayerSummary, x as PluginProtocolEnvelope, y as PluginProtocolFrame, z as PluginProtocolStep, B as PluginProtocolTape, E as PluginSessionDescriptor, F as PluginToHostEnvelope, J as PluginToHostPayload, K as PromptInteractionDescriptor, R as ReducerBoardStaticProjection, L as ReducerSeatProjectionBundle, M as RuntimeJson, S as SimultaneousPhaseSnapshot, N as SubmitInteractionCommand, Q as SystemActionEvent, Z as ZoneHandlesSnapshot, T as canonicalizePluginRuntimeJson, U as digestPluginRuntimeJson, V as encodeCanonicalPluginRuntimeJson } from './protocol-dYgafTYY.js';
3
- export { BoardStaticProjectionSchema, GameEventDetailSchema, GameEventSchema, GameOutcomeSchema, GameplayBasisSchema, HostToPluginEnvelopeSchema, HostToPluginPayloadSchema, InputDomainDependenciesSchema, InputDomainSchema, InteractionAvailabilitySchema, InteractionCommitPolicySchema, InteractionContextSchema, InteractionDescriptorSchema, InteractionInputDescriptorSchema, InteractionResultSchema, PluginGameplayFrameSchema, PluginPlayerSummarySchema, PluginProtocolFrameSchema, PluginProtocolStepSchema, PluginProtocolTapeSchema, PluginSessionDescriptorSchema, PluginToHostEnvelopeSchema, PluginToHostPayloadSchema, RuntimeJsonSchema, SeatProjectionBundleSchema, SimultaneousPhaseSnapshotSchema, SubmitInteractionCommandSchema, SystemActionEventSchema, ZoneHandlesSnapshotSchema, createPluginProtocolEnvelopeSchema, parseHostToPluginEnvelope, parsePluginGameplayFrame, parsePluginSessionDescriptor, parsePluginToHostEnvelope } from './schema.js';
4
- export { computePluginActionSetVersion, digestPluginCommandRequest, digestPluginGameplayFrame } from './digest.js';
5
-
6
- interface MaterializePluginGameplayFrameInput {
7
- readonly currentPhase: string | null;
8
- readonly activePlayers: readonly P[];
9
- readonly dynamicProjection: L;
10
- readonly staticProjection?: R | null;
11
- readonly perspectivePlayerId: P;
12
- readonly version: number;
13
- readonly actionSetVersion: string;
14
- }
15
- declare function materializePluginGameplayFrame(input: MaterializePluginGameplayFrameInput): v;
16
-
17
- export { type MaterializePluginGameplayFrameInput, materializePluginGameplayFrame };
@@ -1,92 +0,0 @@
1
- import {
2
- BoardStaticProjectionSchema2,
3
- DREAMBOARD_PLUGIN_PROTOCOL,
4
- DREAMBOARD_PLUGIN_PROTOCOL_VERSION,
5
- GameEventDetailSchema2,
6
- GameEventSchema2,
7
- GameOutcomeSchema2,
8
- GameplayBasisSchema,
9
- HostToPluginEnvelopeSchema,
10
- HostToPluginPayloadSchema,
11
- InputDomainDependenciesSchema,
12
- InputDomainSchema,
13
- InteractionAvailabilitySchema,
14
- InteractionCommitPolicySchema,
15
- InteractionContextSchema,
16
- InteractionDescriptorSchema,
17
- InteractionInputDescriptorSchema,
18
- InteractionResultSchema,
19
- PluginGameplayFrameSchema,
20
- PluginPlayerSummarySchema,
21
- PluginProtocolFrameSchema,
22
- PluginProtocolStepSchema,
23
- PluginProtocolTapeSchema,
24
- PluginSessionDescriptorSchema,
25
- PluginToHostEnvelopeSchema,
26
- PluginToHostPayloadSchema,
27
- RuntimeJsonSchema,
28
- SeatProjectionBundleSchema2,
29
- SimultaneousPhaseSnapshotSchema,
30
- SubmitInteractionCommandSchema,
31
- SystemActionEventSchema2,
32
- ZoneHandlesSnapshotSchema,
33
- canonicalizePluginRuntimeJson,
34
- computePluginActionSetVersion,
35
- createPluginProtocolEnvelopeSchema,
36
- digestPluginCommandRequest,
37
- digestPluginGameplayFrame,
38
- digestPluginRuntimeJson,
39
- encodeCanonicalPluginRuntimeJson,
40
- materializePluginGameplayFrame,
41
- parseHostToPluginEnvelope,
42
- parsePluginGameplayFrame,
43
- parsePluginSessionDescriptor,
44
- parsePluginToHostEnvelope
45
- } from "./chunk-VCDWP5VL.js";
46
- import "./chunk-PZ5AY32C.js";
47
- export {
48
- BoardStaticProjectionSchema2 as BoardStaticProjectionSchema,
49
- DREAMBOARD_PLUGIN_PROTOCOL,
50
- DREAMBOARD_PLUGIN_PROTOCOL_VERSION,
51
- GameEventDetailSchema2 as GameEventDetailSchema,
52
- GameEventSchema2 as GameEventSchema,
53
- GameOutcomeSchema2 as GameOutcomeSchema,
54
- GameplayBasisSchema,
55
- HostToPluginEnvelopeSchema,
56
- HostToPluginPayloadSchema,
57
- InputDomainDependenciesSchema,
58
- InputDomainSchema,
59
- InteractionAvailabilitySchema,
60
- InteractionCommitPolicySchema,
61
- InteractionContextSchema,
62
- InteractionDescriptorSchema,
63
- InteractionInputDescriptorSchema,
64
- InteractionResultSchema,
65
- PluginGameplayFrameSchema,
66
- PluginPlayerSummarySchema,
67
- PluginProtocolFrameSchema,
68
- PluginProtocolStepSchema,
69
- PluginProtocolTapeSchema,
70
- PluginSessionDescriptorSchema,
71
- PluginToHostEnvelopeSchema,
72
- PluginToHostPayloadSchema,
73
- RuntimeJsonSchema,
74
- SeatProjectionBundleSchema2 as SeatProjectionBundleSchema,
75
- SimultaneousPhaseSnapshotSchema,
76
- SubmitInteractionCommandSchema,
77
- SystemActionEventSchema2 as SystemActionEventSchema,
78
- ZoneHandlesSnapshotSchema,
79
- canonicalizePluginRuntimeJson,
80
- computePluginActionSetVersion,
81
- createPluginProtocolEnvelopeSchema,
82
- digestPluginCommandRequest,
83
- digestPluginGameplayFrame,
84
- digestPluginRuntimeJson,
85
- encodeCanonicalPluginRuntimeJson,
86
- materializePluginGameplayFrame,
87
- parseHostToPluginEnvelope,
88
- parsePluginGameplayFrame,
89
- parsePluginSessionDescriptor,
90
- parsePluginToHostEnvelope
91
- };
92
- //# sourceMappingURL=plugin-runtime-contract.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -1,16 +0,0 @@
1
- import { ReactNode, CSSProperties, AriaAttributes, HTMLAttributes, JSX, ReactElement } from 'react';
2
-
3
- type PrimitiveDataAttributes = Record<`data-${string}`, string | boolean | number | undefined>;
4
- type PrimitiveCommonProps = {
5
- asChild?: boolean;
6
- children?: ReactNode;
7
- className?: string;
8
- style?: CSSProperties;
9
- } & AriaAttributes & PrimitiveDataAttributes;
10
- type EventHandler<Event> = (event: Event) => void;
11
- declare function composeEventHandlers<Event extends {
12
- defaultPrevented: boolean;
13
- }>(authorHandler: EventHandler<Event> | undefined, primitiveHandler: EventHandler<Event> | undefined): EventHandler<Event> | undefined;
14
- declare function renderPrimitive<ElementProps extends HTMLAttributes<HTMLElement>>(tagName: keyof JSX.IntrinsicElements, props: ElementProps & PrimitiveCommonProps): ReactElement;
15
-
16
- export { type PrimitiveCommonProps as P, type PrimitiveDataAttributes as a, composeEventHandlers as c, renderPrimitive as r };