@dreamboard-games/sdk 0.4.0-alpha.1 → 0.4.0-alpha.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (78) hide show
  1. package/REFERENCE.md +1215 -125
  2. package/dist/{ResourceCounter-BTXklCEZ.d.ts → ResourceCounter-BuiNstXs.d.ts} +5 -1
  3. package/dist/{ThemeProvider-DvMl17Ny.d.ts → ThemeProvider-B1sIoBlX.d.ts} +1 -1
  4. package/dist/{attributes-BrZtP9az.d.ts → attributes-DbvyMbXw.d.ts} +17 -2
  5. package/dist/authoring/index.d.ts +66 -0
  6. package/dist/authoring/index.js +560 -0
  7. package/dist/authoring/index.js.map +1 -0
  8. package/dist/browser-interaction.d.ts +205 -5
  9. package/dist/browser-interaction.js +14 -2
  10. package/dist/{chunk-7W6TQO3X.js → chunk-45FI6XII.js} +613 -366
  11. package/dist/chunk-45FI6XII.js.map +1 -0
  12. package/dist/{chunk-3K362ZKR.js → chunk-6JQFGSLD.js} +202 -38
  13. package/dist/chunk-6JQFGSLD.js.map +1 -0
  14. package/dist/{chunk-XXBSIPJX.js → chunk-CP35NPPY.js} +131 -59
  15. package/dist/chunk-CP35NPPY.js.map +1 -0
  16. package/dist/{chunk-XJYUSD5F.js → chunk-FWVV2X74.js} +2 -2
  17. package/dist/{chunk-IUGKW2GS.js → chunk-HWJS3VOJ.js} +6 -2
  18. package/dist/chunk-HWJS3VOJ.js.map +1 -0
  19. package/dist/chunk-K5ZRJTZZ.js +328 -0
  20. package/dist/chunk-K5ZRJTZZ.js.map +1 -0
  21. package/dist/{chunk-7LZZEI25.js → chunk-N6ZDIMRB.js} +1 -1
  22. package/dist/chunk-N6ZDIMRB.js.map +1 -0
  23. package/dist/chunk-O6M6PN4E.js +1225 -0
  24. package/dist/chunk-O6M6PN4E.js.map +1 -0
  25. package/dist/{chunk-AEUXCFGM.js → chunk-PF7L4BMG.js} +1 -8
  26. package/dist/{chunk-AEUXCFGM.js.map → chunk-PF7L4BMG.js.map} +1 -1
  27. package/dist/{chunk-CZMFAS3E.js → chunk-WOWFONLZ.js} +517 -1274
  28. package/dist/chunk-WOWFONLZ.js.map +1 -0
  29. package/dist/{chunk-MALRKLRR.js → chunk-WUIVY2KE.js} +301 -12
  30. package/dist/chunk-WUIVY2KE.js.map +1 -0
  31. package/dist/chunk-ZAS2SENW.js +12 -0
  32. package/dist/chunk-ZAS2SENW.js.map +1 -0
  33. package/dist/codegen.d.ts +11 -3
  34. package/dist/codegen.js +1 -1
  35. package/dist/{components-Dqr_LuZJ.d.ts → components-BbWPnZCF.d.ts} +37 -6
  36. package/dist/{hex-board-view-UCUjMALd.d.ts → hex-board-view-Kz9Q_zsv.d.ts} +1 -1
  37. package/dist/index.js +2 -1
  38. package/dist/package-set.d.ts +2 -2
  39. package/dist/package-set.js +2 -1
  40. package/dist/player-state-Cqpyeql0.d.ts +371 -0
  41. package/dist/protocol-BP193lva.d.ts +267 -0
  42. package/dist/reducer/advanced.js +1 -1
  43. package/dist/reducer-contract.js +1 -1
  44. package/dist/reducer.js +2 -2
  45. package/dist/reducer.js.map +1 -1
  46. package/dist/runtime/primitives.d.ts +10 -10
  47. package/dist/runtime/primitives.js +9 -7
  48. package/dist/runtime/runtime-api.d.ts +2 -2
  49. package/dist/runtime/workspace-contract.d.ts +23 -12
  50. package/dist/runtime/workspace-contract.js +7 -6
  51. package/dist/runtime-api-BJharVaj.d.ts +198 -0
  52. package/dist/runtime-api-C6aWo9c0.d.ts +95 -0
  53. package/dist/runtime.d.ts +35 -31
  54. package/dist/runtime.js +87 -797
  55. package/dist/runtime.js.map +1 -1
  56. package/dist/testing.d.ts +254 -140
  57. package/dist/testing.js +964 -149
  58. package/dist/testing.js.map +1 -1
  59. package/dist/types-CYeN0wLK.d.ts +29 -0
  60. package/dist/{types-BqzHkNMA.d.ts → types-DJj5MJkl.d.ts} +32 -5
  61. package/dist/types.d.ts +13 -8
  62. package/dist/ui/components.d.ts +4 -5
  63. package/dist/ui/components.js +19 -1
  64. package/dist/ui/player-state.d.ts +2 -365
  65. package/dist/{ui-contract-W2-kxObe.d.ts → ui-contract-CY7cxsCC.d.ts} +16 -26
  66. package/dist/ui.d.ts +7 -8
  67. package/dist/ui.js +20 -2
  68. package/package.json +25 -19
  69. package/dist/chunk-3K362ZKR.js.map +0 -1
  70. package/dist/chunk-7LZZEI25.js.map +0 -1
  71. package/dist/chunk-7W6TQO3X.js.map +0 -1
  72. package/dist/chunk-CZMFAS3E.js.map +0 -1
  73. package/dist/chunk-IUGKW2GS.js.map +0 -1
  74. package/dist/chunk-MALRKLRR.js.map +0 -1
  75. package/dist/chunk-XXBSIPJX.js.map +0 -1
  76. package/dist/hex-color-MhOyuY-o.d.ts +0 -8
  77. package/dist/runtime-api-BXd70c2e.d.ts +0 -490
  78. /package/dist/{chunk-XJYUSD5F.js.map → chunk-FWVV2X74.js.map} +0 -0
@@ -1,5 +1,5 @@
1
1
  declare const DREAMBOARD_BROWSER_INTERACTION_PROTOCOL_NAME: "dreamboard-browser-interaction";
2
- declare const DREAMBOARD_BROWSER_INTERACTION_PROTOCOL_VERSION: "2.0.0";
2
+ declare const DREAMBOARD_BROWSER_INTERACTION_PROTOCOL_VERSION: "3.0.0";
3
3
  declare const BROWSER_INTERACTION_ATTRIBUTES: {
4
4
  readonly protocol: "data-dreamboard-browser-protocol";
5
5
  readonly surface: "data-dreamboard-browser-surface";
@@ -17,6 +17,8 @@ declare const BROWSER_INTERACTION_ATTRIBUTES: {
17
17
  readonly actuatorKind: "data-dreamboard-actuator-kind";
18
18
  readonly enabled: "data-dreamboard-actuator-enabled";
19
19
  readonly actuatorId: "data-dreamboard-actuator-id";
20
+ readonly pointerTargetId: "data-dreamboard-pointer-target-id";
21
+ readonly pointerTargetEnabled: "data-dreamboard-pointer-target-enabled";
20
22
  readonly semanticEffects: "data-dreamboard-semantic-effects";
21
23
  readonly acceptedEffectPatterns: "data-dreamboard-accepted-effect-patterns";
22
24
  readonly preparationPatterns: "data-dreamboard-preparation-patterns";
@@ -26,7 +28,7 @@ declare const BROWSER_INTERACTION_ATTRIBUTES: {
26
28
  readonly preparesActuatorKind: "data-dreamboard-prepares-actuator-kind";
27
29
  readonly diagnostic: "data-dreamboard-browser-diagnostic";
28
30
  };
29
- declare const BROWSER_INTERACTION_RECORD_ROLES: readonly ["interaction", "actuator"];
31
+ declare const BROWSER_INTERACTION_RECORD_ROLES: readonly ["interaction", "actuator", "pointer-target"];
30
32
  declare const GAMEPLAY_BROWSER_INTERACTION_SURFACE: "gameplay";
31
33
  declare const GAMEPLAY_BROWSER_INTERACTION_INTENTS: readonly ["arm", "reveal", "invoke", "select", "toggle", "increment", "decrement", "fill", "submit"];
32
34
  declare const GAMEPLAY_BROWSER_INTERACTION_EFFECT_KINDS: readonly ["setCandidate", "adjustResource", "setScalar", "commit", "invoke"];
@@ -51,7 +53,7 @@ type BrowserInteractionCandidateState = (typeof BROWSER_INTERACTION_CANDIDATE_ST
51
53
  type BrowserInteractionActuatorKind = (typeof BROWSER_INTERACTION_ACTUATOR_KINDS)[number];
52
54
  interface BrowserInteractionProtocolIdentity {
53
55
  readonly name: "dreamboard-browser-interaction";
54
- readonly version: "2.0.0";
56
+ readonly version: "3.0.0";
55
57
  }
56
58
  type BrowserInteractionSurfaceEffect = {
57
59
  readonly kind: string;
@@ -94,7 +96,7 @@ type GameplaySemanticEffect = {
94
96
  };
95
97
  type GameplaySemanticEffectPattern = BrowserInteractionEffectPattern<GameplaySemanticEffect>;
96
98
  interface BrowserInteractionDiagnostic {
97
- readonly code: "ambiguous-actuator" | "ambiguous-effect-match" | "ambiguous-preparation-pattern" | "disabled-effect-actuator" | "duplicate-accepted-effect-pattern-match" | "duplicate-enabled-actuator" | "duplicate-enabled-effect-actuator" | "effect-actuator-kind-incompatibility" | "effect-intent-incompatibility" | "invalid-candidate" | "invalid-effect-payload" | "invalid-effect-pattern" | "invalid-protocol" | "invalid-record" | "invalid-scalar-argument" | "missing-effect" | "orphan-actuator" | "preparation-cycle" | "surface-intent-collision" | "unknown-surface-effect" | "unknown-intent" | "unknown-surface" | "unavailable-actuator";
99
+ readonly code: "ambiguous-actuator" | "ambiguous-effect-match" | "ambiguous-pointer-target" | "ambiguous-preparation-pattern" | "disabled-effect-actuator" | "disabled-pointer-target" | "duplicate-accepted-effect-pattern-match" | "duplicate-enabled-actuator" | "duplicate-enabled-effect-actuator" | "duplicate-enabled-pointer-target" | "effect-actuator-kind-incompatibility" | "effect-intent-incompatibility" | "invalid-candidate" | "invalid-effect-payload" | "invalid-effect-pattern" | "invalid-protocol" | "invalid-record" | "invalid-scalar-argument" | "missing-effect" | "orphan-actuator" | "orphan-pointer-target" | "preparation-cycle" | "surface-intent-collision" | "unknown-surface-effect" | "unknown-intent" | "unknown-surface" | "unavailable-actuator";
98
100
  readonly severity: "error" | "warning";
99
101
  readonly message: string;
100
102
  readonly surface?: BrowserInteractionSurface;
@@ -102,6 +104,7 @@ interface BrowserInteractionDiagnostic {
102
104
  readonly interactionKey?: string;
103
105
  readonly intent?: BrowserInteractionIntent;
104
106
  readonly actuatorId?: string;
107
+ readonly targetId?: string;
105
108
  }
106
109
  interface BrowserInteractionRawRecord {
107
110
  readonly attributes: Readonly<Record<string, string | boolean | null | undefined>>;
@@ -130,6 +133,13 @@ interface BrowserInteractionActuator {
130
133
  readonly prepares?: BrowserInteractionPreparationTarget;
131
134
  readonly diagnostics: readonly BrowserInteractionDiagnostic[];
132
135
  }
136
+ interface BrowserInteractionPointerTarget {
137
+ readonly targetId: string;
138
+ readonly enabled: boolean;
139
+ readonly acceptedEffectPatterns: readonly BrowserInteractionEffectPattern[];
140
+ readonly descriptorDigest?: string;
141
+ readonly diagnostics: readonly BrowserInteractionDiagnostic[];
142
+ }
133
143
  interface BrowserInteractionEntity {
134
144
  readonly interactionKey: string;
135
145
  readonly interactionId: string;
@@ -137,6 +147,7 @@ interface BrowserInteractionEntity {
137
147
  readonly draftDigest?: string;
138
148
  readonly readiness: BrowserInteractionReadiness;
139
149
  readonly actuators: readonly BrowserInteractionActuator[];
150
+ readonly pointerTargets: readonly BrowserInteractionPointerTarget[];
140
151
  readonly diagnostics: readonly BrowserInteractionDiagnostic[];
141
152
  }
142
153
  type BrowserGameplayInteraction = BrowserInteractionEntity;
@@ -218,6 +229,22 @@ interface BrowserInteractionEffectResolutionSuccess {
218
229
  readonly effect: BrowserInteractionSurfaceEffect;
219
230
  readonly diagnostics: readonly BrowserInteractionDiagnostic[];
220
231
  }
232
+ interface BrowserInteractionPointerTargetResolutionSuccess {
233
+ readonly ok: true;
234
+ readonly pointerTarget: BrowserInteractionPointerTarget;
235
+ readonly surface: BrowserInteractionSurface;
236
+ readonly scopeId: string;
237
+ readonly interactionKey: string;
238
+ readonly match: "accepted-pattern";
239
+ readonly effect: BrowserInteractionSurfaceEffect;
240
+ readonly diagnostics: readonly BrowserInteractionDiagnostic[];
241
+ }
242
+ interface BrowserInteractionPointerTargetResolutionFailure {
243
+ readonly ok: false;
244
+ readonly code: "ambiguous" | "invalid-effect" | "invalid-snapshot" | "not-found" | "unavailable";
245
+ readonly diagnostics: readonly BrowserInteractionDiagnostic[];
246
+ }
247
+ type BrowserInteractionPointerTargetResolution = BrowserInteractionPointerTargetResolutionSuccess | BrowserInteractionPointerTargetResolutionFailure;
221
248
  interface BrowserInteractionEffectResolutionFailure {
222
249
  readonly ok: false;
223
250
  readonly code: "ambiguous" | "invalid-effect" | "invalid-snapshot" | "not-found" | "preparation-required" | "unavailable";
@@ -226,4 +253,4 @@ interface BrowserInteractionEffectResolutionFailure {
226
253
  }
227
254
  type BrowserInteractionEffectResolution = BrowserInteractionEffectResolutionSuccess | BrowserInteractionEffectResolutionFailure;
228
255
 
229
- export { type BrowserInteractionScalarPattern as A, BROWSER_INTERACTION_ACTUATOR_KINDS as B, type BrowserInteractionSemanticSurfaceSnapshot as C, type BrowserInteractionSnapshot as D, type BrowserInteractionSurface as E, type BrowserInteractionSurfaceDefinition as F, type BrowserInteractionSurfaceEffect as G, type BrowserInteractionSurfaceSnapshot as H, type BrowserInteractionUnknownSurfaceSnapshot as I, type CanonicalBrowserInteractionValue as J, DREAMBOARD_BROWSER_INTERACTION_PROTOCOL_NAME as K, DREAMBOARD_BROWSER_INTERACTION_PROTOCOL_VERSION as L, GAMEPLAY_BROWSER_INTERACTION_EFFECT_KINDS as M, GAMEPLAY_BROWSER_INTERACTION_INTENTS as N, GAMEPLAY_BROWSER_INTERACTION_SURFACE as O, type GameplayBrowserInteractionEffectKind as P, type GameplayBrowserInteractionEffectRequest as Q, type GameplayBrowserInteractionIntent as R, type GameplayBrowserInteractionSurface as S, type GameplaySemanticEffect as T, type GameplaySemanticEffectPattern as U, compareStableJson as V, decodeCanonicalCandidateValue as W, encodeCanonicalCandidateValue as X, BROWSER_INTERACTION_ATTRIBUTES as a, BROWSER_INTERACTION_CANDIDATE_STATES as b, BROWSER_INTERACTION_READINESS_VALUES as c, BROWSER_INTERACTION_RECORD_ROLES as d, type BrowserGameplayInteraction as e, type BrowserGameplaySurfaceSnapshot as f, type BrowserInteractionActuator as g, type BrowserInteractionActuatorKind as h, type BrowserInteractionCandidateState as i, type BrowserInteractionDiagnostic as j, type BrowserInteractionEffectPattern as k, type BrowserInteractionEffectRequest as l, type BrowserInteractionEffectResolution as m, type BrowserInteractionEffectResolutionFailure as n, type BrowserInteractionEffectResolutionSuccess as o, type BrowserInteractionEntity as p, type BrowserInteractionIntent as q, type BrowserInteractionIntentRequest as r, type BrowserInteractionPreparationTarget as s, type BrowserInteractionProtocolIdentity as t, type BrowserInteractionRawRecord as u, type BrowserInteractionReadiness as v, type BrowserInteractionRegistry as w, type BrowserInteractionResolution as x, type BrowserInteractionResolutionFailure as y, type BrowserInteractionResolutionSuccess as z };
256
+ export { encodeCanonicalCandidateValue as $, type BrowserInteractionRegistry as A, BROWSER_INTERACTION_ACTUATOR_KINDS as B, type BrowserInteractionResolution as C, type BrowserInteractionResolutionFailure as D, type BrowserInteractionResolutionSuccess as E, type BrowserInteractionScalarPattern as F, type BrowserInteractionSemanticSurfaceSnapshot as G, type BrowserInteractionSnapshot as H, type BrowserInteractionSurface as I, type BrowserInteractionSurfaceDefinition as J, type BrowserInteractionSurfaceEffect as K, type BrowserInteractionSurfaceSnapshot as L, type BrowserInteractionUnknownSurfaceSnapshot as M, type CanonicalBrowserInteractionValue as N, DREAMBOARD_BROWSER_INTERACTION_PROTOCOL_NAME as O, DREAMBOARD_BROWSER_INTERACTION_PROTOCOL_VERSION as P, GAMEPLAY_BROWSER_INTERACTION_EFFECT_KINDS as Q, GAMEPLAY_BROWSER_INTERACTION_INTENTS as R, GAMEPLAY_BROWSER_INTERACTION_SURFACE as S, type GameplayBrowserInteractionEffectKind as T, type GameplayBrowserInteractionEffectRequest as U, type GameplayBrowserInteractionIntent as V, type GameplayBrowserInteractionSurface as W, type GameplaySemanticEffect as X, type GameplaySemanticEffectPattern as Y, compareStableJson as Z, decodeCanonicalCandidateValue as _, BROWSER_INTERACTION_ATTRIBUTES as a, BROWSER_INTERACTION_CANDIDATE_STATES as b, BROWSER_INTERACTION_READINESS_VALUES as c, BROWSER_INTERACTION_RECORD_ROLES as d, type BrowserGameplayInteraction as e, type BrowserGameplaySurfaceSnapshot as f, type BrowserInteractionActuator as g, type BrowserInteractionActuatorKind as h, type BrowserInteractionCandidateState as i, type BrowserInteractionDiagnostic as j, type BrowserInteractionEffectPattern as k, type BrowserInteractionEffectRequest as l, type BrowserInteractionEffectResolution as m, type BrowserInteractionEffectResolutionFailure as n, type BrowserInteractionEffectResolutionSuccess as o, type BrowserInteractionEntity as p, type BrowserInteractionIntent as q, type BrowserInteractionIntentRequest as r, type BrowserInteractionPointerTarget as s, type BrowserInteractionPointerTargetResolution as t, type BrowserInteractionPointerTargetResolutionFailure as u, type BrowserInteractionPointerTargetResolutionSuccess as v, type BrowserInteractionPreparationTarget as w, type BrowserInteractionProtocolIdentity as x, type BrowserInteractionRawRecord as y, type BrowserInteractionReadiness as z };
package/dist/types.d.ts CHANGED
@@ -23,6 +23,10 @@ type PresetCardSetDefinition = {
23
23
  * Type of card set source
24
24
  */
25
25
  type: "preset";
26
+ /**
27
+ * Default initial home for cards materialized from the preset.
28
+ */
29
+ defaultHome: ComponentHomeSpec;
26
30
  };
27
31
  /**
28
32
  * Arbitrary authored JSON value.
@@ -204,9 +208,9 @@ type BoardCard = {
204
208
  */
205
209
  cardType?: string;
206
210
  /**
207
- * Optional initial home. Omitted cards start Detached.
208
- * Compatibility declarations such as allowedCardSetIds never imply placement.
209
- * Player-scoped distribution belongs in reducer setup.
211
+ * Optional per-card initial home. Omitted cards use their manual card set's
212
+ * defaultHome. Compatibility declarations such as allowedCardSetIds never
213
+ * imply placement. Player-scoped distribution belongs in reducer setup.
210
214
  */
211
215
  home?: ComponentHomeSpec;
212
216
  /**
@@ -237,6 +241,10 @@ type ManualCardSetDefinition = {
237
241
  * Schema definition for authored card properties in this card set
238
242
  */
239
243
  cardSchema: CardPropertySchema;
244
+ /**
245
+ * Default initial home for cards that do not declare a per-card home.
246
+ */
247
+ defaultHome: ComponentHomeSpec;
240
248
  /**
241
249
  * List of authored cards in this card set
242
250
  */
@@ -1304,10 +1312,6 @@ type HostPlayerGameplayView = {
1304
1312
  * Player ID currently selected for rendering and input.
1305
1313
  */
1306
1314
  perspectivePlayerId: string;
1307
- /**
1308
- * Player IDs included in this normalized projection envelope.
1309
- */
1310
- controllablePlayerIds: Array<string>;
1311
1315
  shared: HostGameplaySharedView;
1312
1316
  /**
1313
1317
  * Deduplicated interaction descriptor registry keyed by stable descriptor ref.
@@ -1876,7 +1880,8 @@ type TypedCardSet<CardSet, Manifest extends GameTopologyManifest$1> = CardSet ex
1876
1880
  type: "manual";
1877
1881
  cardSchema: infer CardSchema;
1878
1882
  cards: infer Cards extends readonly unknown[];
1879
- } ? Omit<CardSet, "cards"> & {
1883
+ } ? Omit<CardSet, "cards" | "defaultHome"> & {
1884
+ defaultHome: TypedComponentHomeSpec<Manifest>;
1880
1885
  cards: ReadonlyArray<TypedCard<ArrayItem<Cards>, Manifest, CardSchema>>;
1881
1886
  } : CardSet;
1882
1887
  type TypedAllowedCardSetIds<T, Manifest extends GameTopologyManifest$1> = T extends object ? Omit<T, "allowedCardSetIds"> & {
@@ -1,8 +1,8 @@
1
- export { A as ActionButton, a as ActionButtonProps, b as ActionGroup, c as ActionGroupProps, d as ActionPanel, e as ActionPanelProps, C as CardDragSurface, g as CardDragSurfaceContextValue, h as CardDragSurfaceController, i as CardDragSurfaceProps, j as CardDropTargetView, k as CardDropTargetViewProps, l as CardFace, m as CardFaceProps, p as ChromeSuppressionProvider, q as CostDisplay, r as CostDisplayProps, D as DefaultChessPiece, s as DefaultChessPieceProps, t as DefaultEmptySlot, u as DefaultEmptySlotProps, v as DefaultGridCell, w as DefaultGridCellProps, x as DefaultGridPiece, y as DefaultGridPieceProps, z as DefaultNetworkEdge, E as DefaultNetworkEdgeProps, F as DefaultNetworkNode, G as DefaultNetworkNodeProps, H as DefaultNetworkPiece, I as DefaultNetworkPieceProps, J as DefaultSlotItem, K as DefaultSlotItemProps, L as DefaultSlotOccupant, M as DefaultSlotOccupantProps, N as DefaultTrackConnection, O as DefaultTrackConnectionProps, P as DefaultTrackJump, Q as DefaultTrackJumpProps, R as DefaultTrackPiece, S as DefaultTrackPieceProps, T as DefaultTrackSpace, U as DefaultTrackSpaceProps, V as DefaultZone, W as DefaultZonePiece, X as DefaultZonePieceProps, Y as DefaultZonePieces, Z as DefaultZonePiecesProps, _ as DefaultZoneProps, $ as Dialog, a0 as DialogClose, a1 as DialogContent, a2 as DialogDescription, a3 as DialogFooter, a4 as DialogHeader, a5 as DialogOverlay, a6 as DialogPortal, a7 as DialogTitle, a8 as DialogTrigger, a9 as DiceRoller, aa as DiceRollerProps, ab as DragPhase, ac as Drawer, ad as DrawerClose, ae as DrawerContent, af as DrawerDescription, ag as DrawerFooter, ah as DrawerHeader, ai as DrawerOverlay, aj as DrawerPortal, ak as DrawerTitle, al as DrawerTrigger, am as ErrorBoundary, an as ErrorBoundaryProps, ao as GameEndDisplay, ap as GameEndDisplayProps, aq as GameSkeleton, ar as GameSkeletonProps, as as Hand, at as HandDock, au as HandDockMode, av as HandDockPlacement, aw as HandDockPresentation, ax as HandDockProps, ay as HandDockToggleContext, aA as HandProps, aB as Input, aC as InteractiveSquareEdge, aD as InteractiveSquareVertex, aE as Label, aF as MoreActions, aG as MoreActionsProps, aH as NetworkEdge, aI as NetworkGraph, aJ as NetworkGraphProps, aK as NetworkNode, aL as NetworkPiece, aM as PhaseIndicator, aN as PhaseIndicatorProps, aO as PlayArea, aP as PlayAreaProps, aQ as PlayerScore, aR as PrimaryActionAttention, aS as PrimaryActionButton, aT as PrimaryActionButtonProps, aU as PrimaryButton, aV as PrimaryButtonProps, aW as ResourceDefinition, aX as Select, aY as SelectContent, aZ as SelectItem, a_ as SelectTrigger, a$ as SlotDefinition, b0 as SlotOccupant, b1 as SlotSystem, b2 as SlotSystemProps, b3 as SquareEdgePosition, b4 as SquareGrid, b5 as SquareGridBoardProps, b6 as SquareGridProps, b7 as SquareVertexPosition, b8 as StagingZone, b9 as StagingZoneProps, ba as ThemedButton, bb as ThemedButtonProps, bc as Toast, bd as ToastActions, be as ToastActionsProps, bf as ToastActionsValue, bg as ToastNotification, bh as ToastProvider, bi as ToastType, bj as TrackBoard, bk as TrackBoardProps, bl as TrackPiece, bm as TrackSpace, bp as ZoneDefinition, bq as ZoneHighlightType, br as ZoneMap, bs as ZoneMapProps, bt as ZonePiece, bu as ZoneShape, bB as toAlgebraic, bC as toNumeric, bD as useCardDragSurface, bE as useChromeSuppression } from '../components-Dqr_LuZJ.js';
1
+ export { A as ActionButton, a as ActionButtonProps, b as ActionGroup, c as ActionGroupProps, d as ActionPanel, e as ActionPanelProps, C as CardDragSurface, g as CardDragSurfaceContextValue, h as CardDragSurfaceController, i as CardDragSurfaceProps, j as CardDropTargetView, k as CardDropTargetViewProps, l as CardFace, m as CardFaceProps, p as ChromeSuppressionProvider, q as CostDisplay, r as CostDisplayProps, D as DefaultChessPiece, s as DefaultChessPieceProps, t as DefaultEmptySlot, u as DefaultEmptySlotProps, v as DefaultGridCell, w as DefaultGridCellProps, x as DefaultGridPiece, y as DefaultGridPieceProps, z as DefaultNetworkEdge, E as DefaultNetworkEdgeProps, F as DefaultNetworkNode, G as DefaultNetworkNodeProps, H as DefaultNetworkPiece, I as DefaultNetworkPieceProps, J as DefaultSlotItem, K as DefaultSlotItemProps, L as DefaultSlotOccupant, M as DefaultSlotOccupantProps, N as DefaultTrackConnection, O as DefaultTrackConnectionProps, P as DefaultTrackJump, Q as DefaultTrackJumpProps, R as DefaultTrackPiece, S as DefaultTrackPieceProps, T as DefaultTrackSpace, U as DefaultTrackSpaceProps, V as DefaultZone, W as DefaultZonePiece, X as DefaultZonePieceProps, Y as DefaultZonePieces, Z as DefaultZonePiecesProps, _ as DefaultZoneProps, $ as Dialog, a0 as DialogClose, a1 as DialogContent, a2 as DialogDescription, a3 as DialogFooter, a4 as DialogHeader, a5 as DialogOverlay, a6 as DialogPortal, a7 as DialogTitle, a8 as DialogTrigger, a9 as DiceRoller, aa as DiceRollerProps, ab as DragPhase, ac as Drawer, ad as DrawerClose, ae as DrawerContent, af as DrawerDescription, ag as DrawerFooter, ah as DrawerHeader, ai as DrawerOverlay, aj as DrawerPortal, ak as DrawerTitle, al as DrawerTrigger, am as ErrorBoundary, an as ErrorBoundaryProps, ao as GameEndDisplay, ap as GameEndDisplayProps, aq as GameSkeleton, ar as GameSkeletonProps, as as Hand, at as HandDock, au as HandDockMode, av as HandDockPlacement, aw as HandDockPresentation, ax as HandDockProps, ay as HandDockToggleContext, aA as HandProps, aB as Input, aC as InteractiveSquareEdge, aD as InteractiveSquareVertex, aE as Label, aF as MoreActions, aG as MoreActionsProps, aH as NetworkEdge, aI as NetworkGraph, aJ as NetworkGraphProps, aK as NetworkNode, aL as NetworkPiece, aM as Panel, aN as PanelActions, aO as PanelBody, aP as PanelDescription, aQ as PanelDescriptionProps, aR as PanelHeader, aS as PanelPartProps, aT as PanelRoot, aU as PanelRootProps, aV as PanelTitle, aW as PanelTitleProps, aX as PanelTone, aY as PhaseIndicator, aZ as PhaseIndicatorProps, a_ as PlayArea, a$ as PlayAreaProps, b0 as PlayerScore, b1 as PrimaryActionAttention, b2 as PrimaryActionButton, b3 as PrimaryActionButtonProps, b4 as PrimaryButton, b5 as PrimaryButtonProps, b6 as ResourceDefinition, b7 as Select, b8 as SelectContent, b9 as SelectItem, ba as SelectTrigger, bb as SlotDefinition, bc as SlotOccupant, bd as SlotSystem, be as SlotSystemProps, bf as SquareEdgePosition, bg as SquareGrid, bh as SquareGridBoardProps, bi as SquareGridProps, bj as SquareVertexPosition, bk as StagingZone, bl as StagingZoneProps, bm as ThemedButton, bn as ThemedButtonProps, bo as Toast, bp as ToastActions, bq as ToastActionsProps, br as ToastActionsValue, bs as ToastNotification, bt as ToastProvider, bu as ToastType, bv as TrackBoard, bw as TrackBoardProps, bx as TrackPiece, by as TrackSpace, bB as ZoneDefinition, bC as ZoneHighlightType, bD as ZoneMap, bE as ZoneMapProps, bF as ZonePiece, bG as ZoneShape, bN as toAlgebraic, bO as toNumeric, bP as useCardDragSurface, bQ as useChromeSuppression } from '../components-BbWPnZCF.js';
2
2
  export { H as HandInteractionPolicy, b as HandLayoutKind, c as HandLayoutPolicy, d as HandView, e as HandViewProps } from '../HandView-PYDmehVD.js';
3
- export { B as BoundResourceCounterRootProps, H as HandRole, M as MobileHandRegistration, a as MobileHandTrayProvider, R as ResourceCounter, b as ResourceCounterComponents, c as ResourceCounterCount, d as ResourceCounterIcon, e as ResourceCounterItem, f as ResourceCounterItemState, g as ResourceCounterLabel, h as ResourceCounterPartProps, i as ResourceCounterProps, j as ResourceCounterRoot, k as ResourceCounterRootProps, l as ResourceDisplayConfig, m as ResourceIconProps, n as createResourceCounter, u as useMobileHandTrayActive, o as useRegisterMobileHand } from '../ResourceCounter-BTXklCEZ.js';
4
- export { D as DefaultHexEdge, g as DefaultHexEdgeProps, h as DefaultHexTile, i as DefaultHexTileProps, j as DefaultHexVertex, k as DefaultHexVertexProps, E as EdgePosition, r as HexBoardView, s as HexBoardViewTile, t as HexGrid, u as HexGridBoardProps, v as HexGridProps, w as HexOrientation, x as HexTileGeometry, y as InteractiveHexEdge, z as InteractiveHexVertex, J as InteractiveTargetLayer, K as InteractiveTargetRenderState, a3 as createHexBoardView, a4 as hexUtils } from '../hex-board-view-UCUjMALd.js';
5
- export { HexEdgeState, HexTileState, HexVertexState, SquareCellState, SquareEdgeState, SquarePieceState, SquareVertexState } from './player-state.js';
3
+ export { B as BoundResourceCounterRootProps, H as HandRole, M as MobileHandRegistration, a as MobileHandTrayProvider, R as ResourceCounter, b as ResourceCounterComponents, c as ResourceCounterCount, d as ResourceCounterIcon, e as ResourceCounterItem, f as ResourceCounterItemState, g as ResourceCounterLabel, h as ResourceCounterPartProps, i as ResourceCounterProps, j as ResourceCounterRoot, k as ResourceCounterRootProps, l as ResourceDisplayConfig, m as ResourceIconProps, n as createResourceCounter, u as useMobileHandTrayActive, o as useOverlayInsets, p as useRegisterBottomOverlayInset, q as useRegisterMobileHand } from '../ResourceCounter-BuiNstXs.js';
4
+ export { D as DefaultHexEdge, g as DefaultHexEdgeProps, h as DefaultHexTile, i as DefaultHexTileProps, j as DefaultHexVertex, k as DefaultHexVertexProps, E as EdgePosition, r as HexBoardView, s as HexBoardViewTile, t as HexGrid, u as HexGridBoardProps, v as HexGridProps, w as HexOrientation, x as HexTileGeometry, y as InteractiveHexEdge, z as InteractiveHexVertex, J as InteractiveTargetLayer, K as InteractiveTargetRenderState, a3 as createHexBoardView, a4 as hexUtils } from '../hex-board-view-Kz9Q_zsv.js';
5
+ export { k as HexEdgeState, l as HexTileState, m as HexVertexState, y as SquareCellState, z as SquareEdgeState, A as SquarePieceState, F as SquareVertexState } from '../player-state-Cqpyeql0.js';
6
6
  export { CardCollection, ViewCard, ViewSlotOccupant } from '../types.js';
7
7
  import 'react/jsx-runtime';
8
8
  import 'react';
@@ -12,4 +12,3 @@ import '@radix-ui/react-dialog';
12
12
  import '@radix-ui/react-label';
13
13
  import '@radix-ui/react-select';
14
14
  import '../primitive-props-BNHDkgd7.js';
15
- import '../hex-color-MhOyuY-o.js';
@@ -60,6 +60,13 @@ import {
60
60
  MobileHandTrayProvider,
61
61
  MoreActions,
62
62
  NetworkGraph,
63
+ Panel,
64
+ PanelActions,
65
+ PanelBody,
66
+ PanelDescription,
67
+ PanelHeader,
68
+ PanelRoot,
69
+ PanelTitle,
63
70
  PhaseIndicator,
64
71
  PlayArea,
65
72
  PrimaryActionButton,
@@ -91,8 +98,10 @@ import {
91
98
  useCardDragSurface,
92
99
  useChromeSuppression,
93
100
  useMobileHandTrayActive,
101
+ useOverlayInsets,
102
+ useRegisterBottomOverlayInset,
94
103
  useRegisterMobileHand
95
- } from "../chunk-7W6TQO3X.js";
104
+ } from "../chunk-45FI6XII.js";
96
105
  import "../chunk-VDXOF4FW.js";
97
106
  import "../chunk-PZ5AY32C.js";
98
107
  export {
@@ -156,6 +165,13 @@ export {
156
165
  MobileHandTrayProvider,
157
166
  MoreActions,
158
167
  NetworkGraph,
168
+ Panel,
169
+ PanelActions,
170
+ PanelBody,
171
+ PanelDescription,
172
+ PanelHeader,
173
+ PanelRoot,
174
+ PanelTitle,
159
175
  PhaseIndicator,
160
176
  PlayArea,
161
177
  PrimaryActionButton,
@@ -187,6 +203,8 @@ export {
187
203
  useCardDragSurface,
188
204
  useChromeSuppression,
189
205
  useMobileHandTrayActive,
206
+ useOverlayInsets,
207
+ useRegisterBottomOverlayInset,
190
208
  useRegisterMobileHand
191
209
  };
192
210
  //# sourceMappingURL=components.js.map
@@ -1,365 +1,2 @@
1
- import { ViewCard } from '../types.js';
2
- import { H as HexColor } from '../hex-color-MhOyuY-o.js';
3
-
4
- type PlayerId = string;
5
- type CardId = string;
6
- type DeckId = string;
7
- type BoardBaseId = string;
8
- type BoardId = string;
9
- type PieceId = string;
10
- type SpaceId = string;
11
- type DieId = string;
12
- type EdgeTypeId = string;
13
- type VertexTypeId = string;
14
- type PieceTypeId = string;
15
- type SpaceTypeId = string;
16
- type CardProperties = Record<string, unknown>;
17
- type CardIdsByDeckId = Record<DeckId, readonly CardId[]>;
18
- interface PerPlayer<Value> {
19
- readonly __perPlayer: true;
20
- readonly entries: ReadonlyArray<readonly [PlayerId, Value]>;
21
- }
22
- interface SharedBoardRef<BaseId extends string = BoardBaseId> {
23
- readonly baseId: BaseId;
24
- readonly seat?: undefined;
25
- }
26
- interface PerPlayerBoardRef<BaseId extends string = BoardBaseId, Id extends string = PlayerId> {
27
- readonly baseId: BaseId;
28
- readonly seat: Id;
29
- }
30
- type BoardRef<BaseId extends string = BoardBaseId, Id extends string = PlayerId> = SharedBoardRef<BaseId> | PerPlayerBoardRef<BaseId, Id>;
31
- /**
32
- * Hands are keyed by the authored hand id and split per seat. The per-seat
33
- * entries are populated from the runtime seat list, not the static manifest
34
- * upper bound, so views always match what the backend actually computed.
35
- */
36
- type CardIdsByHandId = Record<string, PerPlayer<CardId[]>>;
37
- type StateName = string;
38
- type TilePropertiesByBoardId = Record<BoardId, Record<string, unknown>>;
39
- type EdgePropertiesByBoardId = Record<BoardId, Record<string, unknown>>;
40
- type VertexPropertiesByBoardId = Record<BoardId, Record<string, unknown>>;
41
- interface Player {
42
- /** Player ID */
43
- playerId: PlayerId;
44
- /** Player display name */
45
- name: string;
46
- /** Whether this player is the host */
47
- isHost?: boolean;
48
- /** Player's assigned color */
49
- color?: HexColor;
50
- }
51
- interface HexTileState<B extends string = BoardId, SpaceIdValue extends string = SpaceId, Properties = B extends keyof TilePropertiesByBoardId ? TilePropertiesByBoardId[B] : undefined, View = unknown> {
52
- /** Unique tile identifier */
53
- id: SpaceIdValue;
54
- /** Axial coordinate Q */
55
- q: number;
56
- /** Axial coordinate R */
57
- r: number;
58
- /** Tile type identifier for rendering */
59
- typeId?: SpaceTypeId;
60
- /** Display label on the tile */
61
- label?: string;
62
- /** Player ID who owns this tile */
63
- owner?: PlayerId;
64
- /** JSON-serialized custom properties */
65
- properties?: Properties;
66
- /**
67
- * Optional view-projection overlay merged onto the static topology by
68
- * component-first board helpers such as `Board.HexView`. Authored boards can
69
- * also supply this directly when building tiles by hand.
70
- */
71
- view?: View;
72
- }
73
- /** State of an edge on a reducer-projected hex board. */
74
- interface HexEdgeState<B extends string = BoardId, SpaceIdValue extends string = SpaceId, EdgeIdValue extends string = string, Properties = B extends keyof EdgePropertiesByBoardId ? EdgePropertiesByBoardId[B] : undefined> {
75
- /** Unique edge identifier (serialized string, e.g., "tile1-tile2") */
76
- id: EdgeIdValue;
77
- /** First hex tile ID this edge borders */
78
- hex1: SpaceIdValue;
79
- /** Second hex tile ID this edge borders */
80
- hex2: SpaceIdValue;
81
- /** Edge type identifier for rendering */
82
- typeId?: EdgeTypeId;
83
- /** Display label for setup or rendering */
84
- label?: string;
85
- /** Player ID who owns this edge */
86
- owner?: PlayerId;
87
- /** JSON-serialized custom properties */
88
- properties?: Properties;
89
- }
90
- /** State of a vertex on a reducer-projected hex board. */
91
- interface HexVertexState<B extends string = BoardId, SpaceIdValue extends string = SpaceId, VertexIdValue extends string = string, Properties = B extends keyof VertexPropertiesByBoardId ? VertexPropertiesByBoardId[B] : undefined> {
92
- /** Unique vertex identifier (serialized string, e.g., "tile1-tile2-tile3") */
93
- id: VertexIdValue;
94
- /** The hex tile IDs this vertex touches */
95
- hexes: readonly SpaceIdValue[];
96
- /** Vertex type identifier for rendering */
97
- typeId?: VertexTypeId;
98
- /** Display label for setup or rendering */
99
- label?: string;
100
- /** Player ID who owns this vertex */
101
- owner?: PlayerId;
102
- /** JSON-serialized custom properties */
103
- properties?: Properties;
104
- }
105
- /** Complete state of a reducer-projected hex board. */
106
- 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> {
107
- /** Unique board identifier */
108
- id: B;
109
- /** All tiles on the board */
110
- tiles: ReadonlyArray<HexTileState<B, SpaceIdValue, TileProperties>>;
111
- /** All edges on the board */
112
- edges: ReadonlyArray<HexEdgeState<B, SpaceIdValue, EdgeIdValue, EdgeProperties>>;
113
- /** All vertices on the board */
114
- vertices: ReadonlyArray<HexVertexState<B, SpaceIdValue, VertexIdValue, VertexProperties>>;
115
- }
116
- /** State of a node in a reducer-projected network board. */
117
- interface NetworkNodeState {
118
- /** Unique node identifier */
119
- id: SpaceId;
120
- /** X coordinate position */
121
- x: number;
122
- /** Y coordinate position */
123
- y: number;
124
- /** Node type identifier for rendering */
125
- typeId?: SpaceTypeId;
126
- /** Display label on the node */
127
- label?: string;
128
- /** Player ID who owns this node */
129
- owner?: PlayerId;
130
- /** JSON-serialized custom properties */
131
- properties?: string;
132
- }
133
- /** State of an edge connecting two nodes in a reducer-projected network board. */
134
- interface NetworkEdgeState {
135
- /** Unique edge identifier */
136
- id: string;
137
- /** Source node ID */
138
- from: SpaceId;
139
- /** Target node ID */
140
- to: SpaceId;
141
- /** Edge type identifier for rendering */
142
- typeId?: string;
143
- /** Display label on the edge */
144
- label?: string;
145
- /** Player ID who owns this edge */
146
- owner?: PlayerId;
147
- /** JSON-serialized custom properties */
148
- properties?: string;
149
- }
150
- /** State of a piece placed on a reducer-projected network node. */
151
- interface NetworkPieceState {
152
- /** Unique piece identifier */
153
- id: PieceId;
154
- /** Node ID where this piece is placed */
155
- nodeId: SpaceId;
156
- /** Piece type identifier for rendering */
157
- typeId?: PieceTypeId;
158
- /** Player ID who owns this piece */
159
- owner?: PlayerId;
160
- /** JSON-serialized custom properties */
161
- properties?: string;
162
- }
163
- /** Complete state of a reducer-projected network board. */
164
- interface NetworkBoardState {
165
- /** Unique board identifier */
166
- id: BoardId;
167
- /** All nodes on the board */
168
- nodes: NetworkNodeState[];
169
- /** All edges on the board */
170
- edges: NetworkEdgeState[];
171
- /** All pieces on the board */
172
- pieces: NetworkPieceState[];
173
- }
174
- /** State of a cell on a reducer-projected square grid board. */
175
- interface SquareCellState<SpaceIdValue extends string = SpaceId, Properties = Record<string, unknown>> {
176
- /** Unique cell identifier */
177
- id: SpaceIdValue;
178
- /** Row index (0-based) */
179
- row: number;
180
- /** Column index (0-based) */
181
- col: number;
182
- /** Cell type identifier for rendering */
183
- typeId?: SpaceTypeId;
184
- /** Display label on the cell */
185
- label?: string;
186
- /** Player ID who owns this cell */
187
- owner?: PlayerId;
188
- /** JSON-serialized custom properties */
189
- properties?: Properties;
190
- }
191
- /** State of an edge on a reducer-projected square grid board. */
192
- interface SquareEdgeState<SpaceIdValue extends string = SpaceId, EdgeIdValue extends string = string, Properties = Record<string, unknown>> {
193
- /** Unique edge identifier */
194
- id: EdgeIdValue;
195
- /** The cell IDs this edge borders */
196
- spaceIds: readonly SpaceIdValue[];
197
- /** Edge type identifier for rendering */
198
- typeId?: EdgeTypeId;
199
- /** Display label for setup or rendering */
200
- label?: string;
201
- /** Player ID who owns this edge */
202
- owner?: PlayerId;
203
- /** JSON-serialized custom properties */
204
- properties?: Properties;
205
- }
206
- /** State of a vertex on a reducer-projected square grid board. */
207
- interface SquareVertexState<SpaceIdValue extends string = SpaceId, VertexIdValue extends string = string, Properties = Record<string, unknown>> {
208
- /** Unique vertex identifier */
209
- id: VertexIdValue;
210
- /** The cell IDs that touch this corner */
211
- spaceIds: readonly SpaceIdValue[];
212
- /** Vertex type identifier for rendering */
213
- typeId?: VertexTypeId;
214
- /** Display label for setup or rendering */
215
- label?: string;
216
- /** Player ID who owns this vertex */
217
- owner?: PlayerId;
218
- /** JSON-serialized custom properties */
219
- properties?: Properties;
220
- }
221
- /** State of a piece placed on a reducer-projected square grid cell. */
222
- interface SquarePieceState<PieceIdValue extends string = PieceId, Properties = Record<string, unknown>> {
223
- /** Unique piece identifier */
224
- id: PieceIdValue;
225
- /** Row index where piece is located */
226
- row: number;
227
- /** Column index where piece is located */
228
- col: number;
229
- /** Piece type identifier for rendering */
230
- typeId: PieceTypeId;
231
- /** Player ID who owns this piece */
232
- owner?: PlayerId;
233
- /** JSON-serialized custom properties */
234
- properties?: Properties;
235
- }
236
- /** Complete state of a reducer-projected square grid board. */
237
- 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>> {
238
- /** Unique board identifier */
239
- id: B;
240
- /** Number of rows in the grid */
241
- rows: number;
242
- /** Number of columns in the grid */
243
- cols: number;
244
- /** All authored cells on the board */
245
- cells: ReadonlyArray<SquareCellState<SpaceIdValue, CellProperties>>;
246
- /** All edges on the board */
247
- edges: ReadonlyArray<SquareEdgeState<SpaceIdValue, EdgeIdValue, EdgeProperties>>;
248
- /** All vertices on the board */
249
- vertices: ReadonlyArray<SquareVertexState<SpaceIdValue, VertexIdValue, VertexProperties>>;
250
- /** All pieces on the board */
251
- pieces: ReadonlyArray<SquarePieceState<PieceIdValue, PieceProperties>>;
252
- }
253
- /** State of a space on a reducer-projected track board. */
254
- interface TrackSpaceState {
255
- /** Unique space identifier */
256
- id: SpaceId;
257
- /** Position index in the track sequence */
258
- index: number;
259
- /** X coordinate for rendering */
260
- x: number;
261
- /** Y coordinate for rendering */
262
- y: number;
263
- /** Display name of the space */
264
- name?: string;
265
- /** Space type identifier for rendering */
266
- typeId?: SpaceTypeId;
267
- /** Player ID who owns this space */
268
- owner?: PlayerId;
269
- /** IDs of spaces that can be reached from here (for branching tracks) */
270
- nextSpaces?: SpaceId[];
271
- /** JSON-serialized custom properties */
272
- properties?: string;
273
- }
274
- /** State of a piece on a reducer-projected track board. */
275
- interface TrackPieceState {
276
- /** Unique piece identifier */
277
- id: PieceId;
278
- /** ID of the space this piece occupies */
279
- spaceId: SpaceId;
280
- /** Player ID who owns this piece */
281
- owner: PlayerId;
282
- /** Piece type identifier for rendering */
283
- typeId?: PieceTypeId;
284
- /** JSON-serialized custom properties */
285
- properties?: string;
286
- }
287
- /** Complete state of a reducer-projected track board. */
288
- interface TrackBoardState {
289
- /** Unique board identifier */
290
- id: BoardId;
291
- /** All spaces on the track */
292
- spaces: TrackSpaceState[];
293
- /** All pieces on the track */
294
- pieces: TrackPieceState[];
295
- }
296
- /** State of a reducer-projected die component. */
297
- interface DieState {
298
- /** Unique die identifier */
299
- id: DieId;
300
- /** Number of sides on the die (e.g., 6 for standard die) */
301
- sides: number;
302
- /** Current face value (1 to sides, undefined if not rolled) */
303
- currentValue?: number;
304
- /** Optional color for visual identification */
305
- color?: string;
306
- }
307
- /**
308
- * Collection of boards of a particular kind, split into shared boards
309
- * (indexed by base id, e.g. `"market-board"`) and per-player boards
310
- * (indexed by base id, then by the runtime seat list via `PerPlayer<T>`).
311
- *
312
- * Splitting by the `BoardRef` discriminator keeps the UI types honest about
313
- * what the runtime actually produced: per-player board state only exists
314
- * for the seats that are currently playing, never for a static `maxPlayers`
315
- * upper bound.
316
- */
317
- interface BoardKindStates<State> {
318
- /** Shared boards keyed by base id. */
319
- shared: Record<BoardBaseId, State>;
320
- /** Per-player boards keyed by base id, then by seat via `PerPlayer<T>`. */
321
- perPlayer: Record<BoardBaseId, PerPlayer<State>>;
322
- }
323
- /**
324
- * Container for all board states organized by kind.
325
- * This is the strongly-typed board payload authored UIs consume from reducer views.
326
- */
327
- interface BoardStates {
328
- /** Hex boards split into shared vs per-player collections. */
329
- hex: BoardKindStates<HexBoardState>;
330
- /** Network boards split into shared vs per-player collections. */
331
- network: BoardKindStates<NetworkBoardState>;
332
- /** Square grid boards split into shared vs per-player collections. */
333
- square: BoardKindStates<SquareBoardState>;
334
- /** Track boards split into shared vs per-player collections. */
335
- track: BoardKindStates<TrackBoardState>;
336
- }
337
- /**
338
- * Container for all dice states.
339
- * Maps die IDs to their die state.
340
- */
341
- type DiceStates = Record<DieId, DieState>;
342
- interface GameState {
343
- /** All currently active players (supports MULTIPLE_ACTIVE_PLAYER states) */
344
- currentPlayerIds: PlayerId[];
345
- decks: CardIdsByDeckId;
346
- /**
347
- * Player-scoped hands keyed by the authored hand id. The inner
348
- * `PerPlayer<CardId[]>` is keyed by the runtime seat list and only
349
- * contains entries for players who actually hold the hand.
350
- */
351
- hands: CardIdsByHandId;
352
- /** Map of card IDs to their card info including type and properties */
353
- cards: Record<CardId, ViewCard<CardId, string, CardProperties>>;
354
- /**
355
- * Per-player resource totals keyed by the runtime seat list. The inner
356
- * record maps resource id → amount for that seat.
357
- */
358
- playerResources: PerPlayer<Record<string, number>>;
359
- currentState: StateName;
360
- isMyTurn: boolean;
361
- boards: BoardStates;
362
- dice: DiceStates;
363
- }
364
-
365
- export type { BoardBaseId, BoardId, BoardKindStates, BoardRef, BoardStates, CardId, CardIdsByDeckId, CardProperties, DeckId, DiceStates, DieId, DieState, EdgeTypeId, GameState, HexBoardState, HexEdgeState, HexTileState, HexVertexState, NetworkBoardState, NetworkEdgeState, NetworkNodeState, NetworkPieceState, PerPlayer, PerPlayerBoardRef, PieceId, PieceTypeId, Player, PlayerId, SharedBoardRef, SpaceId, SpaceTypeId, SquareBoardState, SquareCellState, SquareEdgeState, SquarePieceState, SquareVertexState, TrackBoardState, TrackPieceState, TrackSpaceState, VertexTypeId };
1
+ export { B as BoardBaseId, a as BoardId, b as BoardKindStates, c as BoardRef, d as BoardStates, C as CardId, e as CardIdsByDeckId, f as CardProperties, D as DeckId, g as DiceStates, h as DieId, i as DieState, E as EdgeTypeId, G as GameState, H as HexBoardState, k as HexEdgeState, l as HexTileState, m as HexVertexState, N as NetworkBoardState, n as NetworkEdgeState, o as NetworkNodeState, p as NetworkPieceState, P as PerPlayer, q as PerPlayerBoardRef, r as PieceId, s as PieceTypeId, t as Player, u as PlayerId, S as SharedBoardRef, v as SpaceId, w as SpaceTypeId, x as SquareBoardState, y as SquareCellState, z as SquareEdgeState, A as SquarePieceState, F as SquareVertexState, T as TrackBoardState, I as TrackPieceState, J as TrackSpaceState, V as VertexTypeId } from '../player-state-Cqpyeql0.js';
2
+ import '../types.js';