@dreamboard-games/sdk 0.5.0-alpha.3 → 0.5.0-alpha.4

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 (36) hide show
  1. package/README.md +52 -2
  2. package/dist/board-target-B0QG6OYx.d.ts +8 -0
  3. package/dist/chunk-3JXUL4VN.js +139 -0
  4. package/dist/chunk-3JXUL4VN.js.map +1 -0
  5. package/dist/{chunk-LRILEVKC.js → chunk-C77SYIVT.js} +82 -109
  6. package/dist/chunk-C77SYIVT.js.map +1 -0
  7. package/dist/{chunk-SP234IY4.js → chunk-OOFMBCFF.js} +178 -203
  8. package/dist/chunk-OOFMBCFF.js.map +1 -0
  9. package/dist/{chunk-ZPRKWPEP.js → chunk-UG2Q4NLG.js} +108 -29
  10. package/dist/chunk-UG2Q4NLG.js.map +1 -0
  11. package/dist/{chunk-FMM5LVJW.js → chunk-XU6WJW6K.js} +26 -12
  12. package/dist/chunk-XU6WJW6K.js.map +1 -0
  13. package/dist/{diagnostics-B0lgnuZ6.d.ts → diagnostics-B8d5aLad.d.ts} +2 -2
  14. package/dist/{definition-BaHNPZol.d.ts → extract-gVKcB8Og.d.ts} +484 -387
  15. package/dist/index.d.ts +404 -175
  16. package/dist/index.js +266 -215
  17. package/dist/index.js.map +1 -1
  18. package/dist/model-vdpLHrxh.d.ts +432 -0
  19. package/dist/react.d.ts +35 -7
  20. package/dist/react.js +136 -8
  21. package/dist/react.js.map +1 -1
  22. package/dist/reducer.d.ts +169 -118
  23. package/dist/reducer.js +206 -328
  24. package/dist/reducer.js.map +1 -1
  25. package/dist/testing.d.ts +5 -3
  26. package/dist/testing.js +9 -6
  27. package/dist/testing.js.map +1 -1
  28. package/dist/{types-DimqnJBq.d.ts → types-Bj5ZLTUV.d.ts} +38 -10
  29. package/package.json +19 -16
  30. package/dist/chunk-FMM5LVJW.js.map +0 -1
  31. package/dist/chunk-LRILEVKC.js.map +0 -1
  32. package/dist/chunk-SP234IY4.js.map +0 -1
  33. package/dist/chunk-VUWNJXLJ.js +0 -52
  34. package/dist/chunk-VUWNJXLJ.js.map +0 -1
  35. package/dist/chunk-ZPRKWPEP.js.map +0 -1
  36. package/dist/model-BHro6yXu.d.ts +0 -288
package/dist/index.d.ts CHANGED
@@ -1,10 +1,11 @@
1
- import { g as Features, m as InstanceOptions, e as CoreInstance, f as FeatureContext, G as GameInstance, C as Card, Z as Zone, I as IdOf, b as BoardCollection, a as BoardBase, p as InteractionKey, l as InputKey, c as CardBase } from './model-BHro6yXu.js';
2
- export { A as ActionProps, B as Board, d as CardDataOf, D as Drafts, F as Feature, h as FieldEvent, i as GameSnapshot, H as Hook, j as Input, k as InputBase, n as Interaction, o as InteractionBase, q as InteractionParams, L as LocalState, N as NativeEvent, P as Phase, r as PhaseName, s as Player, R as ReadModel, t as ReadonlyData, T as Turn, V as ViewOf, u as ZoneBase } from './model-BHro6yXu.js';
3
- import { I as InteractionDescriptor, b as GameplayBasis, e as PluginSessionDescriptor, c as PluginGameplayFrame, G as GameSource, g as SourceSnapshot, C as CommandSource, P as PlayerId, f as ReducerSeatProjectionBundle, R as ReducerBoardStaticProjection } from './types-DimqnJBq.js';
4
- export { A as ActionInteractionDescriptor, a as ApplySource, d as PluginPlayerSummary, S as SimultaneousPhaseSnapshot, h as SourceState, i as SubmitResult, Z as ZoneHandlesSnapshot } from './types-DimqnJBq.js';
1
+ import { p as Features, x as InstanceOptions, m as CoreInstance, o as FeatureContext, G as GameInstance, C as Card, Z as Zone, I as IdOf, d as BoardCollection, g as BoardSpaceCollection, c as BoardBase, i as BoardSpaceId, h as BoardSpaceData, B as Board, U as TargetOptions, A as ActionProps, n as DropTarget } from './model-vdpLHrxh.js';
2
+ export { a as AnyInput, b as AnyInteraction, e as BoardDataOf, f as BoardSpace, j as BoardTarget, k as CardBase, l as CardDataOf, D as Drafts, F as Feature, q as FieldEvent, r as GameSnapshot, H as Hook, s as Input, t as InputBase, u as InputKey, v as InputKind, w as InputTarget, y as Interaction, z as InteractionBase, E as InteractionKey, J as InteractionParams, L as LocalState, N as NativeEvent, P as Phase, K as PhaseName, M as Player, R as ReadModel, O as ReadonlyData, Q as RuntimeBoardTarget, S as SelectionTarget, T as TableOfGame, V as Turn, W as ViewOf, X as ZoneBase } from './model-vdpLHrxh.js';
3
+ import { I as InteractionDescriptor, b as GameplayBasis, e as PluginSessionDescriptor, c as PluginGameplayFrame, G as GameSource, h as SourceSnapshot, C as CommandSource, P as PlayerId, f as ReducerSeatProjectionBundle, R as ReducerBoardStaticProjection } from './types-Bj5ZLTUV.js';
4
+ export { A as ActionInteractionDescriptor, a as ApplySource, d as PluginPlayerSummary, S as SimultaneousPhaseSnapshot, g as SourceRequest, i as SourceState, j as SubmitResult, Z as ZoneHandlesSnapshot } from './types-Bj5ZLTUV.js';
5
5
  import { z } from 'zod';
6
- import { av as RuntimeJson, au as RuntimeHexSpaceState, aB as RuntimeSquareSpaceState, aD as RuntimeTiledEdgeState, aE as RuntimeTiledVertexState } from './definition-BaHNPZol.js';
7
- export { G as GameEvent, k as GameEventDetail, m as GameOutcome, u as InputDomain, v as InputDomainSchema, w as InputSelection, y as InteractionAvailability, z as InteractionAvailabilitySchema, A as InteractionChoiceOption, J as InteractionCommitPolicy, K as InteractionCommitPolicySchema, M as InteractionDescriptorSchema, N as InteractionDiagnosticReason, P as InteractionInputDescriptor, Q as InteractionInputDescriptorSchema, $ as OutcomeResult, a0 as OutcomeScoreComponent, a1 as OutcomeStanding, a2 as OutcomeTieBreak, aw as RuntimeJsonSchema, aL as SystemActionEvent, aU as ViewCard } from './definition-BaHNPZol.js';
6
+ import { aC as RuntimeJson, aJ as RuntimeTiledEdgeState, aK as RuntimeTiledVertexState } from './extract-gVKcB8Og.js';
7
+ export { G as GameEvent, n as GameEventDetail, p as GameOutcome, z as InputDomain, A as InputDomainSchema, J as InputSelection, L as InteractionAvailability, M as InteractionAvailabilitySchema, N as InteractionChoiceOption, O as InteractionCommitPolicy, P as InteractionCommitPolicySchema, R as InteractionDescriptorSchema, S as InteractionDiagnosticReason, U as InteractionInputDescriptor, V as InteractionInputDescriptorSchema, a4 as OutcomeResult, a5 as OutcomeScoreComponent, a6 as OutcomeStanding, a7 as OutcomeTieBreak, aD as RuntimeJsonSchema, aS as SystemActionEvent, a$ as ViewCard } from './extract-gVKcB8Og.js';
8
+ import './board-target-B0QG6OYx.js';
8
9
  import '@tanstack/store';
9
10
  import 'honeycomb-grid';
10
11
 
@@ -21,7 +22,7 @@ type DreamboardSdkPackageSet = {
21
22
  declare const DREAMBOARD_SDK_PACKAGE_SET: DreamboardSdkPackageSet;
22
23
 
23
24
  declare const DREAMBOARD_PLUGIN_PROTOCOL: "dreamboard-plugin";
24
- declare const DREAMBOARD_PLUGIN_PROTOCOL_VERSION: 5;
25
+ declare const DREAMBOARD_PLUGIN_PROTOCOL_VERSION: 6;
25
26
  type InteractionResult = {
26
27
  readonly type: "interaction.result";
27
28
  readonly clientActionId: string;
@@ -237,7 +238,7 @@ declare const SessionSnapshotFrameSchema: z.ZodObject<{
237
238
  targetKind: z.ZodLiteral<"card">;
238
239
  zoneIds: z.ZodArray<z.ZodString>;
239
240
  eligibleTargets: z.ZodArray<z.ZodString>;
240
- }, z.core.$strict>, z.ZodObject<{
241
+ }, z.core.$strict>, z.ZodDiscriminatedUnion<[z.ZodObject<{
241
242
  selection: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
242
243
  mode: z.ZodLiteral<"single">;
243
244
  }, z.core.$strict>, z.ZodObject<{
@@ -249,18 +250,34 @@ declare const SessionSnapshotFrameSchema: z.ZodObject<{
249
250
  type: z.ZodLiteral<"boardTarget">;
250
251
  projection: z.ZodLiteral<"resolved">;
251
252
  targetKind: z.ZodEnum<{
253
+ space: "space";
252
254
  edge: "edge";
253
255
  vertex: "vertex";
254
- space: "space";
255
256
  tile: "tile";
256
257
  }>;
257
258
  boardId: z.ZodString;
258
- valueKind: z.ZodOptional<z.ZodEnum<{
259
- "board-id": "board-id";
260
- "player-board-space": "player-board-space";
261
- }>>;
259
+ valueKind: z.ZodLiteral<"board-id">;
262
260
  eligibleTargets: z.ZodArray<z.ZodString>;
263
261
  }, z.core.$strict>, z.ZodObject<{
262
+ selection: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
263
+ mode: z.ZodLiteral<"single">;
264
+ }, z.core.$strict>, z.ZodObject<{
265
+ mode: z.ZodLiteral<"many">;
266
+ min: z.ZodNumber;
267
+ max: z.ZodOptional<z.ZodNumber>;
268
+ distinct: z.ZodOptional<z.ZodBoolean>;
269
+ }, z.core.$strict>], "mode">>;
270
+ type: z.ZodLiteral<"boardTarget">;
271
+ projection: z.ZodLiteral<"resolved">;
272
+ targetKind: z.ZodLiteral<"space">;
273
+ boardId: z.ZodString;
274
+ valueKind: z.ZodLiteral<"player-board-space">;
275
+ eligibleTargets: z.ZodArray<z.ZodObject<{
276
+ boardId: z.ZodString;
277
+ playerId: z.ZodString;
278
+ spaceId: z.ZodString;
279
+ }, z.core.$strict>>;
280
+ }, z.core.$strict>], "valueKind">, z.ZodObject<{
264
281
  selection: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
265
282
  mode: z.ZodLiteral<"single">;
266
283
  }, z.core.$strict>, z.ZodObject<{
@@ -399,7 +416,7 @@ declare const SessionSnapshotFrameSchema: z.ZodObject<{
399
416
  targetKind: z.ZodLiteral<"card">;
400
417
  zoneIds: z.ZodArray<z.ZodString>;
401
418
  eligibleTargets: z.ZodArray<z.ZodString>;
402
- }, z.core.$strict>, z.ZodObject<{
419
+ }, z.core.$strict>, z.ZodDiscriminatedUnion<[z.ZodObject<{
403
420
  selection: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
404
421
  mode: z.ZodLiteral<"single">;
405
422
  }, z.core.$strict>, z.ZodObject<{
@@ -411,18 +428,34 @@ declare const SessionSnapshotFrameSchema: z.ZodObject<{
411
428
  type: z.ZodLiteral<"boardTarget">;
412
429
  projection: z.ZodLiteral<"resolved">;
413
430
  targetKind: z.ZodEnum<{
431
+ space: "space";
414
432
  edge: "edge";
415
433
  vertex: "vertex";
416
- space: "space";
417
434
  tile: "tile";
418
435
  }>;
419
436
  boardId: z.ZodString;
420
- valueKind: z.ZodOptional<z.ZodEnum<{
421
- "board-id": "board-id";
422
- "player-board-space": "player-board-space";
423
- }>>;
437
+ valueKind: z.ZodLiteral<"board-id">;
424
438
  eligibleTargets: z.ZodArray<z.ZodString>;
425
439
  }, z.core.$strict>, z.ZodObject<{
440
+ selection: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
441
+ mode: z.ZodLiteral<"single">;
442
+ }, z.core.$strict>, z.ZodObject<{
443
+ mode: z.ZodLiteral<"many">;
444
+ min: z.ZodNumber;
445
+ max: z.ZodOptional<z.ZodNumber>;
446
+ distinct: z.ZodOptional<z.ZodBoolean>;
447
+ }, z.core.$strict>], "mode">>;
448
+ type: z.ZodLiteral<"boardTarget">;
449
+ projection: z.ZodLiteral<"resolved">;
450
+ targetKind: z.ZodLiteral<"space">;
451
+ boardId: z.ZodString;
452
+ valueKind: z.ZodLiteral<"player-board-space">;
453
+ eligibleTargets: z.ZodArray<z.ZodObject<{
454
+ boardId: z.ZodString;
455
+ playerId: z.ZodString;
456
+ spaceId: z.ZodString;
457
+ }, z.core.$strict>>;
458
+ }, z.core.$strict>], "valueKind">, z.ZodObject<{
426
459
  selection: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
427
460
  mode: z.ZodLiteral<"single">;
428
461
  }, z.core.$strict>, z.ZodObject<{
@@ -652,7 +685,7 @@ declare const ServerGameplayFrameSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
652
685
  targetKind: z.ZodLiteral<"card">;
653
686
  zoneIds: z.ZodArray<z.ZodString>;
654
687
  eligibleTargets: z.ZodArray<z.ZodString>;
655
- }, z.core.$strict>, z.ZodObject<{
688
+ }, z.core.$strict>, z.ZodDiscriminatedUnion<[z.ZodObject<{
656
689
  selection: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
657
690
  mode: z.ZodLiteral<"single">;
658
691
  }, z.core.$strict>, z.ZodObject<{
@@ -664,18 +697,34 @@ declare const ServerGameplayFrameSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
664
697
  type: z.ZodLiteral<"boardTarget">;
665
698
  projection: z.ZodLiteral<"resolved">;
666
699
  targetKind: z.ZodEnum<{
700
+ space: "space";
667
701
  edge: "edge";
668
702
  vertex: "vertex";
669
- space: "space";
670
703
  tile: "tile";
671
704
  }>;
672
705
  boardId: z.ZodString;
673
- valueKind: z.ZodOptional<z.ZodEnum<{
674
- "board-id": "board-id";
675
- "player-board-space": "player-board-space";
676
- }>>;
706
+ valueKind: z.ZodLiteral<"board-id">;
677
707
  eligibleTargets: z.ZodArray<z.ZodString>;
678
708
  }, z.core.$strict>, z.ZodObject<{
709
+ selection: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
710
+ mode: z.ZodLiteral<"single">;
711
+ }, z.core.$strict>, z.ZodObject<{
712
+ mode: z.ZodLiteral<"many">;
713
+ min: z.ZodNumber;
714
+ max: z.ZodOptional<z.ZodNumber>;
715
+ distinct: z.ZodOptional<z.ZodBoolean>;
716
+ }, z.core.$strict>], "mode">>;
717
+ type: z.ZodLiteral<"boardTarget">;
718
+ projection: z.ZodLiteral<"resolved">;
719
+ targetKind: z.ZodLiteral<"space">;
720
+ boardId: z.ZodString;
721
+ valueKind: z.ZodLiteral<"player-board-space">;
722
+ eligibleTargets: z.ZodArray<z.ZodObject<{
723
+ boardId: z.ZodString;
724
+ playerId: z.ZodString;
725
+ spaceId: z.ZodString;
726
+ }, z.core.$strict>>;
727
+ }, z.core.$strict>], "valueKind">, z.ZodObject<{
679
728
  selection: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
680
729
  mode: z.ZodLiteral<"single">;
681
730
  }, z.core.$strict>, z.ZodObject<{
@@ -814,7 +863,7 @@ declare const ServerGameplayFrameSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
814
863
  targetKind: z.ZodLiteral<"card">;
815
864
  zoneIds: z.ZodArray<z.ZodString>;
816
865
  eligibleTargets: z.ZodArray<z.ZodString>;
817
- }, z.core.$strict>, z.ZodObject<{
866
+ }, z.core.$strict>, z.ZodDiscriminatedUnion<[z.ZodObject<{
818
867
  selection: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
819
868
  mode: z.ZodLiteral<"single">;
820
869
  }, z.core.$strict>, z.ZodObject<{
@@ -826,18 +875,34 @@ declare const ServerGameplayFrameSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
826
875
  type: z.ZodLiteral<"boardTarget">;
827
876
  projection: z.ZodLiteral<"resolved">;
828
877
  targetKind: z.ZodEnum<{
878
+ space: "space";
829
879
  edge: "edge";
830
880
  vertex: "vertex";
831
- space: "space";
832
881
  tile: "tile";
833
882
  }>;
834
883
  boardId: z.ZodString;
835
- valueKind: z.ZodOptional<z.ZodEnum<{
836
- "board-id": "board-id";
837
- "player-board-space": "player-board-space";
838
- }>>;
884
+ valueKind: z.ZodLiteral<"board-id">;
839
885
  eligibleTargets: z.ZodArray<z.ZodString>;
840
886
  }, z.core.$strict>, z.ZodObject<{
887
+ selection: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
888
+ mode: z.ZodLiteral<"single">;
889
+ }, z.core.$strict>, z.ZodObject<{
890
+ mode: z.ZodLiteral<"many">;
891
+ min: z.ZodNumber;
892
+ max: z.ZodOptional<z.ZodNumber>;
893
+ distinct: z.ZodOptional<z.ZodBoolean>;
894
+ }, z.core.$strict>], "mode">>;
895
+ type: z.ZodLiteral<"boardTarget">;
896
+ projection: z.ZodLiteral<"resolved">;
897
+ targetKind: z.ZodLiteral<"space">;
898
+ boardId: z.ZodString;
899
+ valueKind: z.ZodLiteral<"player-board-space">;
900
+ eligibleTargets: z.ZodArray<z.ZodObject<{
901
+ boardId: z.ZodString;
902
+ playerId: z.ZodString;
903
+ spaceId: z.ZodString;
904
+ }, z.core.$strict>>;
905
+ }, z.core.$strict>], "valueKind">, z.ZodObject<{
841
906
  selection: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
842
907
  mode: z.ZodLiteral<"single">;
843
908
  }, z.core.$strict>, z.ZodObject<{
@@ -1049,12 +1114,13 @@ interface BoardLayoutOptions {
1049
1114
  readonly origin?: Point;
1050
1115
  readonly viewport?: ViewportTransform;
1051
1116
  }
1052
- /** Static topology plus captured seat selection. Generic boards remain data-only. */
1117
+ /** Semantic board spaces and captured selection, with optional spatial geometry. */
1053
1118
  declare function boardFeature<G>(game: CoreInstance<G>, context: FeatureContext<G>): {
1054
1119
  root: {
1055
1120
  readonly boards: BoardCollection<G, Record<never, never>>;
1056
1121
  };
1057
1122
  board: {
1123
+ readonly spaces: BoardSpaceCollection<G>;
1058
1124
  getLayout(this: BoardBase<G>, options: BoardLayoutOptions): Readonly<{
1059
1125
  viewBox: Readonly<{
1060
1126
  x: number;
@@ -1063,32 +1129,17 @@ declare function boardFeature<G>(game: CoreInstance<G>, context: FeatureContext<
1063
1129
  height: number;
1064
1130
  }>;
1065
1131
  getSpaces: () => readonly Readonly<{
1066
- data: RuntimeHexSpaceState | RuntimeSquareSpaceState;
1067
1132
  center: Point;
1068
1133
  points: () => readonly Point[];
1069
1134
  transform: `translate(${number} ${number})`;
1070
- id: string;
1071
- getIsEligible: () => boolean;
1072
- getIsSelectable: () => boolean;
1073
- getIsSelected: () => boolean;
1074
- getSelectHandler: (options?: {
1075
- interaction?: InteractionKey<G>;
1076
- }) => () => void;
1077
- getTargetProps(options?: {
1078
- interaction?: InteractionKey<G>;
1079
- }): {
1080
- type: "button";
1081
- disabled: boolean;
1082
- "data-action": string;
1083
- "data-value": string;
1084
- "data-board": string;
1085
- "data-interaction": InteractionKey<G> | undefined;
1086
- "data-input": InputKey<G, InteractionKey<G>> | undefined;
1087
- "data-eligible": boolean;
1088
- "data-selected": boolean;
1089
- "data-disabled": boolean;
1090
- onClick: () => void;
1091
- };
1135
+ id: BoardSpaceId<G, IdOf<G, "boardId">>;
1136
+ data: BoardSpaceData<G, IdOf<G, "boardId">, BoardSpaceId<G, IdOf<G, "boardId">>>;
1137
+ board: Board<G, Record<never, never>, IdOf<G, "boardId">>;
1138
+ getIsEligible(): boolean;
1139
+ getIsSelectable(): boolean;
1140
+ getIsSelected(): boolean;
1141
+ getSelectHandler(options?: TargetOptions<G> | undefined): () => void;
1142
+ getTargetProps(options?: TargetOptions<G> | undefined): ActionProps;
1092
1143
  }>[];
1093
1144
  getEdges: () => readonly Readonly<{
1094
1145
  data: RuntimeTiledEdgeState | undefined;
@@ -1098,19 +1149,15 @@ declare function boardFeature<G>(game: CoreInstance<G>, context: FeatureContext<
1098
1149
  getIsEligible: () => boolean;
1099
1150
  getIsSelectable: () => boolean;
1100
1151
  getIsSelected: () => boolean;
1101
- getSelectHandler: (options?: {
1102
- interaction?: InteractionKey<G>;
1103
- }) => () => void;
1104
- getTargetProps(options?: {
1105
- interaction?: InteractionKey<G>;
1106
- }): {
1152
+ getSelectHandler: (options?: TargetOptions<G>) => () => void;
1153
+ getTargetProps(options?: TargetOptions<G>): {
1107
1154
  type: "button";
1108
1155
  disabled: boolean;
1109
1156
  "data-action": string;
1110
1157
  "data-value": string;
1111
1158
  "data-board": string;
1112
- "data-interaction": InteractionKey<G> | undefined;
1113
- "data-input": InputKey<G, InteractionKey<G>> | undefined;
1159
+ "data-interaction": string | undefined;
1160
+ "data-input": string | undefined;
1114
1161
  "data-eligible": boolean;
1115
1162
  "data-selected": boolean;
1116
1163
  "data-disabled": boolean;
@@ -1124,19 +1171,15 @@ declare function boardFeature<G>(game: CoreInstance<G>, context: FeatureContext<
1124
1171
  getIsEligible: () => boolean;
1125
1172
  getIsSelectable: () => boolean;
1126
1173
  getIsSelected: () => boolean;
1127
- getSelectHandler: (options?: {
1128
- interaction?: InteractionKey<G>;
1129
- }) => () => void;
1130
- getTargetProps(options?: {
1131
- interaction?: InteractionKey<G>;
1132
- }): {
1174
+ getSelectHandler: (options?: TargetOptions<G>) => () => void;
1175
+ getTargetProps(options?: TargetOptions<G>): {
1133
1176
  type: "button";
1134
1177
  disabled: boolean;
1135
1178
  "data-action": string;
1136
1179
  "data-value": string;
1137
1180
  "data-board": string;
1138
- "data-interaction": InteractionKey<G> | undefined;
1139
- "data-input": InputKey<G, InteractionKey<G>> | undefined;
1181
+ "data-interaction": string | undefined;
1182
+ "data-input": string | undefined;
1140
1183
  "data-eligible": boolean;
1141
1184
  "data-selected": boolean;
1142
1185
  "data-disabled": boolean;
@@ -1148,46 +1191,23 @@ declare function boardFeature<G>(game: CoreInstance<G>, context: FeatureContext<
1148
1191
  };
1149
1192
  };
1150
1193
 
1151
- interface DropTarget<G> {
1152
- readonly kind: "space" | "edge" | "vertex" | "tile";
1153
- readonly id: string;
1154
- readonly boardId: IdOf<G, "boardId">;
1155
- readonly interaction: InteractionKey<G>;
1156
- }
1157
1194
  interface DragState<G> {
1158
1195
  readonly cardId: IdOf<G, "cardId">;
1159
- readonly offset: Point;
1160
1196
  readonly target: DropTarget<G> | null;
1161
1197
  }
1162
- /** Card drag state and native props. The core router owns atomic card/drop writes. */
1198
+ interface DragController<G> {
1199
+ readonly active: DragState<G> | null;
1200
+ getCanDrag(cardId: IdOf<G, "cardId">, options?: TargetOptions<G>): boolean;
1201
+ begin(cardId: IdOf<G, "cardId">, options?: TargetOptions<G>): boolean;
1202
+ getDropTargets(): readonly DropTarget<G>[];
1203
+ setDropTarget(target: DropTarget<G> | null): void;
1204
+ drop(): void;
1205
+ cancel(): void;
1206
+ }
1207
+ /** Semantic card/drop routing. Browser sensors and feedback belong to /react. */
1163
1208
  declare function dragFeature<G>(game: CoreInstance<G>, context: FeatureContext<G>): {
1164
1209
  root: {
1165
- readonly drag: Readonly<{
1166
- active: DragState<G> | null;
1167
- getDropTargets: () => readonly DropTarget<G>[];
1168
- setDropTarget(target: DropTarget<G> | null): void;
1169
- cancel: () => void;
1170
- }>;
1171
- };
1172
- card: {
1173
- getDragProps(this: CardBase<G>, options?: {
1174
- interaction?: InteractionKey<G>;
1175
- }): {
1176
- style: {
1177
- touchAction: "none";
1178
- transform: string | undefined;
1179
- };
1180
- "data-drag-card": IdOf<G, "cardId">;
1181
- onPointerDown: (event: PointerInput) => void;
1182
- onClick: (event: {
1183
- detail: number;
1184
- preventDefault(): void;
1185
- }) => void;
1186
- onPointerMove: (event: PointerInput) => void;
1187
- onPointerUp: (event: PointerInput) => void;
1188
- onPointerCancel: (event?: Pick<PointerInput, "pointerId">) => void;
1189
- onLostPointerCapture: (event?: Pick<PointerInput, "pointerId">) => void;
1190
- };
1210
+ readonly drag: DragController<G>;
1191
1211
  };
1192
1212
  dispose(): void;
1193
1213
  };
@@ -1308,7 +1328,7 @@ declare const SeatProjectionBundleSchema: z.ZodObject<{
1308
1328
  targetKind: z.ZodLiteral<"card">;
1309
1329
  zoneIds: z.ZodArray<z.ZodString>;
1310
1330
  eligibleTargets: z.ZodArray<z.ZodString>;
1311
- }, z.core.$strict>, z.ZodObject<{
1331
+ }, z.core.$strict>, z.ZodDiscriminatedUnion<[z.ZodObject<{
1312
1332
  selection: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
1313
1333
  mode: z.ZodLiteral<"single">;
1314
1334
  }, z.core.$strict>, z.ZodObject<{
@@ -1320,18 +1340,34 @@ declare const SeatProjectionBundleSchema: z.ZodObject<{
1320
1340
  type: z.ZodLiteral<"boardTarget">;
1321
1341
  projection: z.ZodLiteral<"resolved">;
1322
1342
  targetKind: z.ZodEnum<{
1343
+ space: "space";
1323
1344
  edge: "edge";
1324
1345
  vertex: "vertex";
1325
- space: "space";
1326
1346
  tile: "tile";
1327
1347
  }>;
1328
1348
  boardId: z.ZodString;
1329
- valueKind: z.ZodOptional<z.ZodEnum<{
1330
- "board-id": "board-id";
1331
- "player-board-space": "player-board-space";
1332
- }>>;
1349
+ valueKind: z.ZodLiteral<"board-id">;
1333
1350
  eligibleTargets: z.ZodArray<z.ZodString>;
1334
1351
  }, z.core.$strict>, z.ZodObject<{
1352
+ selection: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
1353
+ mode: z.ZodLiteral<"single">;
1354
+ }, z.core.$strict>, z.ZodObject<{
1355
+ mode: z.ZodLiteral<"many">;
1356
+ min: z.ZodNumber;
1357
+ max: z.ZodOptional<z.ZodNumber>;
1358
+ distinct: z.ZodOptional<z.ZodBoolean>;
1359
+ }, z.core.$strict>], "mode">>;
1360
+ type: z.ZodLiteral<"boardTarget">;
1361
+ projection: z.ZodLiteral<"resolved">;
1362
+ targetKind: z.ZodLiteral<"space">;
1363
+ boardId: z.ZodString;
1364
+ valueKind: z.ZodLiteral<"player-board-space">;
1365
+ eligibleTargets: z.ZodArray<z.ZodObject<{
1366
+ boardId: z.ZodString;
1367
+ playerId: z.ZodString;
1368
+ spaceId: z.ZodString;
1369
+ }, z.core.$strict>>;
1370
+ }, z.core.$strict>], "valueKind">, z.ZodObject<{
1335
1371
  selection: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
1336
1372
  mode: z.ZodLiteral<"single">;
1337
1373
  }, z.core.$strict>, z.ZodObject<{
@@ -1436,6 +1472,7 @@ declare const SeatProjectionBundleSchema: z.ZodObject<{
1436
1472
  cardViewsById: z.ZodRecord<z.ZodString, z.ZodString>;
1437
1473
  playableByCardId: z.ZodRecord<z.ZodString, z.ZodArray<z.ZodString>>;
1438
1474
  }, z.core.$strict>>>;
1475
+ resources: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodNumber>>>;
1439
1476
  }, z.core.$strict>>;
1440
1477
  timing: z.ZodOptional<z.ZodObject<{
1441
1478
  resolveAvailableInteractionsMs: z.ZodNumber;
@@ -1456,6 +1493,7 @@ declare const PluginSessionDescriptorSchema: z.ZodObject<{
1456
1493
  displayName: z.ZodString;
1457
1494
  color: z.ZodOptional<z.ZodString>;
1458
1495
  }, z.core.$strict>>;
1496
+ assets: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodInstanceOf<Blob>>>;
1459
1497
  }, z.core.$strict>;
1460
1498
 
1461
1499
  declare const ZoneHandlesSnapshotSchema: z.ZodObject<{
@@ -1502,7 +1540,7 @@ declare const ZoneHandlesSnapshotSchema: z.ZodObject<{
1502
1540
  targetKind: z.ZodLiteral<"card">;
1503
1541
  zoneIds: z.ZodArray<z.ZodString>;
1504
1542
  eligibleTargets: z.ZodArray<z.ZodString>;
1505
- }, z.core.$strict>, z.ZodObject<{
1543
+ }, z.core.$strict>, z.ZodDiscriminatedUnion<[z.ZodObject<{
1506
1544
  selection: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
1507
1545
  mode: z.ZodLiteral<"single">;
1508
1546
  }, z.core.$strict>, z.ZodObject<{
@@ -1514,18 +1552,34 @@ declare const ZoneHandlesSnapshotSchema: z.ZodObject<{
1514
1552
  type: z.ZodLiteral<"boardTarget">;
1515
1553
  projection: z.ZodLiteral<"resolved">;
1516
1554
  targetKind: z.ZodEnum<{
1555
+ space: "space";
1517
1556
  edge: "edge";
1518
1557
  vertex: "vertex";
1519
- space: "space";
1520
1558
  tile: "tile";
1521
1559
  }>;
1522
1560
  boardId: z.ZodString;
1523
- valueKind: z.ZodOptional<z.ZodEnum<{
1524
- "board-id": "board-id";
1525
- "player-board-space": "player-board-space";
1526
- }>>;
1561
+ valueKind: z.ZodLiteral<"board-id">;
1527
1562
  eligibleTargets: z.ZodArray<z.ZodString>;
1528
1563
  }, z.core.$strict>, z.ZodObject<{
1564
+ selection: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
1565
+ mode: z.ZodLiteral<"single">;
1566
+ }, z.core.$strict>, z.ZodObject<{
1567
+ mode: z.ZodLiteral<"many">;
1568
+ min: z.ZodNumber;
1569
+ max: z.ZodOptional<z.ZodNumber>;
1570
+ distinct: z.ZodOptional<z.ZodBoolean>;
1571
+ }, z.core.$strict>], "mode">>;
1572
+ type: z.ZodLiteral<"boardTarget">;
1573
+ projection: z.ZodLiteral<"resolved">;
1574
+ targetKind: z.ZodLiteral<"space">;
1575
+ boardId: z.ZodString;
1576
+ valueKind: z.ZodLiteral<"player-board-space">;
1577
+ eligibleTargets: z.ZodArray<z.ZodObject<{
1578
+ boardId: z.ZodString;
1579
+ playerId: z.ZodString;
1580
+ spaceId: z.ZodString;
1581
+ }, z.core.$strict>>;
1582
+ }, z.core.$strict>], "valueKind">, z.ZodObject<{
1529
1583
  selection: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
1530
1584
  mode: z.ZodLiteral<"single">;
1531
1585
  }, z.core.$strict>, z.ZodObject<{
@@ -1724,7 +1778,7 @@ declare const SeatFrameSchema: z.ZodObject<{
1724
1778
  targetKind: z.ZodLiteral<"card">;
1725
1779
  zoneIds: z.ZodArray<z.ZodString>;
1726
1780
  eligibleTargets: z.ZodArray<z.ZodString>;
1727
- }, z.core.$strict>, z.ZodObject<{
1781
+ }, z.core.$strict>, z.ZodDiscriminatedUnion<[z.ZodObject<{
1728
1782
  selection: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
1729
1783
  mode: z.ZodLiteral<"single">;
1730
1784
  }, z.core.$strict>, z.ZodObject<{
@@ -1736,18 +1790,34 @@ declare const SeatFrameSchema: z.ZodObject<{
1736
1790
  type: z.ZodLiteral<"boardTarget">;
1737
1791
  projection: z.ZodLiteral<"resolved">;
1738
1792
  targetKind: z.ZodEnum<{
1793
+ space: "space";
1739
1794
  edge: "edge";
1740
1795
  vertex: "vertex";
1741
- space: "space";
1742
1796
  tile: "tile";
1743
1797
  }>;
1744
1798
  boardId: z.ZodString;
1745
- valueKind: z.ZodOptional<z.ZodEnum<{
1746
- "board-id": "board-id";
1747
- "player-board-space": "player-board-space";
1748
- }>>;
1799
+ valueKind: z.ZodLiteral<"board-id">;
1749
1800
  eligibleTargets: z.ZodArray<z.ZodString>;
1750
1801
  }, z.core.$strict>, z.ZodObject<{
1802
+ selection: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
1803
+ mode: z.ZodLiteral<"single">;
1804
+ }, z.core.$strict>, z.ZodObject<{
1805
+ mode: z.ZodLiteral<"many">;
1806
+ min: z.ZodNumber;
1807
+ max: z.ZodOptional<z.ZodNumber>;
1808
+ distinct: z.ZodOptional<z.ZodBoolean>;
1809
+ }, z.core.$strict>], "mode">>;
1810
+ type: z.ZodLiteral<"boardTarget">;
1811
+ projection: z.ZodLiteral<"resolved">;
1812
+ targetKind: z.ZodLiteral<"space">;
1813
+ boardId: z.ZodString;
1814
+ valueKind: z.ZodLiteral<"player-board-space">;
1815
+ eligibleTargets: z.ZodArray<z.ZodObject<{
1816
+ boardId: z.ZodString;
1817
+ playerId: z.ZodString;
1818
+ spaceId: z.ZodString;
1819
+ }, z.core.$strict>>;
1820
+ }, z.core.$strict>], "valueKind">, z.ZodObject<{
1751
1821
  selection: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
1752
1822
  mode: z.ZodLiteral<"single">;
1753
1823
  }, z.core.$strict>, z.ZodObject<{
@@ -1886,7 +1956,7 @@ declare const SeatFrameSchema: z.ZodObject<{
1886
1956
  targetKind: z.ZodLiteral<"card">;
1887
1957
  zoneIds: z.ZodArray<z.ZodString>;
1888
1958
  eligibleTargets: z.ZodArray<z.ZodString>;
1889
- }, z.core.$strict>, z.ZodObject<{
1959
+ }, z.core.$strict>, z.ZodDiscriminatedUnion<[z.ZodObject<{
1890
1960
  selection: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
1891
1961
  mode: z.ZodLiteral<"single">;
1892
1962
  }, z.core.$strict>, z.ZodObject<{
@@ -1898,18 +1968,34 @@ declare const SeatFrameSchema: z.ZodObject<{
1898
1968
  type: z.ZodLiteral<"boardTarget">;
1899
1969
  projection: z.ZodLiteral<"resolved">;
1900
1970
  targetKind: z.ZodEnum<{
1971
+ space: "space";
1901
1972
  edge: "edge";
1902
1973
  vertex: "vertex";
1903
- space: "space";
1904
1974
  tile: "tile";
1905
1975
  }>;
1906
1976
  boardId: z.ZodString;
1907
- valueKind: z.ZodOptional<z.ZodEnum<{
1908
- "board-id": "board-id";
1909
- "player-board-space": "player-board-space";
1910
- }>>;
1977
+ valueKind: z.ZodLiteral<"board-id">;
1911
1978
  eligibleTargets: z.ZodArray<z.ZodString>;
1912
1979
  }, z.core.$strict>, z.ZodObject<{
1980
+ selection: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
1981
+ mode: z.ZodLiteral<"single">;
1982
+ }, z.core.$strict>, z.ZodObject<{
1983
+ mode: z.ZodLiteral<"many">;
1984
+ min: z.ZodNumber;
1985
+ max: z.ZodOptional<z.ZodNumber>;
1986
+ distinct: z.ZodOptional<z.ZodBoolean>;
1987
+ }, z.core.$strict>], "mode">>;
1988
+ type: z.ZodLiteral<"boardTarget">;
1989
+ projection: z.ZodLiteral<"resolved">;
1990
+ targetKind: z.ZodLiteral<"space">;
1991
+ boardId: z.ZodString;
1992
+ valueKind: z.ZodLiteral<"player-board-space">;
1993
+ eligibleTargets: z.ZodArray<z.ZodObject<{
1994
+ boardId: z.ZodString;
1995
+ playerId: z.ZodString;
1996
+ spaceId: z.ZodString;
1997
+ }, z.core.$strict>>;
1998
+ }, z.core.$strict>], "valueKind">, z.ZodObject<{
1913
1999
  selection: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
1914
2000
  mode: z.ZodLiteral<"single">;
1915
2001
  }, z.core.$strict>, z.ZodObject<{
@@ -2070,7 +2156,7 @@ declare const PluginGameplayFrameSchema: z.ZodObject<{
2070
2156
  targetKind: z.ZodLiteral<"card">;
2071
2157
  zoneIds: z.ZodArray<z.ZodString>;
2072
2158
  eligibleTargets: z.ZodArray<z.ZodString>;
2073
- }, z.core.$strict>, z.ZodObject<{
2159
+ }, z.core.$strict>, z.ZodDiscriminatedUnion<[z.ZodObject<{
2074
2160
  selection: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
2075
2161
  mode: z.ZodLiteral<"single">;
2076
2162
  }, z.core.$strict>, z.ZodObject<{
@@ -2082,18 +2168,34 @@ declare const PluginGameplayFrameSchema: z.ZodObject<{
2082
2168
  type: z.ZodLiteral<"boardTarget">;
2083
2169
  projection: z.ZodLiteral<"resolved">;
2084
2170
  targetKind: z.ZodEnum<{
2171
+ space: "space";
2085
2172
  edge: "edge";
2086
2173
  vertex: "vertex";
2087
- space: "space";
2088
2174
  tile: "tile";
2089
2175
  }>;
2090
2176
  boardId: z.ZodString;
2091
- valueKind: z.ZodOptional<z.ZodEnum<{
2092
- "board-id": "board-id";
2093
- "player-board-space": "player-board-space";
2094
- }>>;
2177
+ valueKind: z.ZodLiteral<"board-id">;
2095
2178
  eligibleTargets: z.ZodArray<z.ZodString>;
2096
2179
  }, z.core.$strict>, z.ZodObject<{
2180
+ selection: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
2181
+ mode: z.ZodLiteral<"single">;
2182
+ }, z.core.$strict>, z.ZodObject<{
2183
+ mode: z.ZodLiteral<"many">;
2184
+ min: z.ZodNumber;
2185
+ max: z.ZodOptional<z.ZodNumber>;
2186
+ distinct: z.ZodOptional<z.ZodBoolean>;
2187
+ }, z.core.$strict>], "mode">>;
2188
+ type: z.ZodLiteral<"boardTarget">;
2189
+ projection: z.ZodLiteral<"resolved">;
2190
+ targetKind: z.ZodLiteral<"space">;
2191
+ boardId: z.ZodString;
2192
+ valueKind: z.ZodLiteral<"player-board-space">;
2193
+ eligibleTargets: z.ZodArray<z.ZodObject<{
2194
+ boardId: z.ZodString;
2195
+ playerId: z.ZodString;
2196
+ spaceId: z.ZodString;
2197
+ }, z.core.$strict>>;
2198
+ }, z.core.$strict>], "valueKind">, z.ZodObject<{
2097
2199
  selection: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
2098
2200
  mode: z.ZodLiteral<"single">;
2099
2201
  }, z.core.$strict>, z.ZodObject<{
@@ -2232,7 +2334,7 @@ declare const PluginGameplayFrameSchema: z.ZodObject<{
2232
2334
  targetKind: z.ZodLiteral<"card">;
2233
2335
  zoneIds: z.ZodArray<z.ZodString>;
2234
2336
  eligibleTargets: z.ZodArray<z.ZodString>;
2235
- }, z.core.$strict>, z.ZodObject<{
2337
+ }, z.core.$strict>, z.ZodDiscriminatedUnion<[z.ZodObject<{
2236
2338
  selection: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
2237
2339
  mode: z.ZodLiteral<"single">;
2238
2340
  }, z.core.$strict>, z.ZodObject<{
@@ -2244,18 +2346,34 @@ declare const PluginGameplayFrameSchema: z.ZodObject<{
2244
2346
  type: z.ZodLiteral<"boardTarget">;
2245
2347
  projection: z.ZodLiteral<"resolved">;
2246
2348
  targetKind: z.ZodEnum<{
2349
+ space: "space";
2247
2350
  edge: "edge";
2248
2351
  vertex: "vertex";
2249
- space: "space";
2250
2352
  tile: "tile";
2251
2353
  }>;
2252
2354
  boardId: z.ZodString;
2253
- valueKind: z.ZodOptional<z.ZodEnum<{
2254
- "board-id": "board-id";
2255
- "player-board-space": "player-board-space";
2256
- }>>;
2355
+ valueKind: z.ZodLiteral<"board-id">;
2257
2356
  eligibleTargets: z.ZodArray<z.ZodString>;
2258
2357
  }, z.core.$strict>, z.ZodObject<{
2358
+ selection: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
2359
+ mode: z.ZodLiteral<"single">;
2360
+ }, z.core.$strict>, z.ZodObject<{
2361
+ mode: z.ZodLiteral<"many">;
2362
+ min: z.ZodNumber;
2363
+ max: z.ZodOptional<z.ZodNumber>;
2364
+ distinct: z.ZodOptional<z.ZodBoolean>;
2365
+ }, z.core.$strict>], "mode">>;
2366
+ type: z.ZodLiteral<"boardTarget">;
2367
+ projection: z.ZodLiteral<"resolved">;
2368
+ targetKind: z.ZodLiteral<"space">;
2369
+ boardId: z.ZodString;
2370
+ valueKind: z.ZodLiteral<"player-board-space">;
2371
+ eligibleTargets: z.ZodArray<z.ZodObject<{
2372
+ boardId: z.ZodString;
2373
+ playerId: z.ZodString;
2374
+ spaceId: z.ZodString;
2375
+ }, z.core.$strict>>;
2376
+ }, z.core.$strict>], "valueKind">, z.ZodObject<{
2259
2377
  selection: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
2260
2378
  mode: z.ZodLiteral<"single">;
2261
2379
  }, z.core.$strict>, z.ZodObject<{
@@ -2398,6 +2516,7 @@ declare const HostToPluginPayloadSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
2398
2516
  displayName: z.ZodString;
2399
2517
  color: z.ZodOptional<z.ZodString>;
2400
2518
  }, z.core.$strict>>;
2519
+ assets: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodInstanceOf<Blob>>>;
2401
2520
  }, z.core.$strict>;
2402
2521
  }, z.core.$strict>, z.ZodObject<{
2403
2522
  type: z.ZodLiteral<"gameplay.frame">;
@@ -2465,7 +2584,7 @@ declare const HostToPluginPayloadSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
2465
2584
  targetKind: z.ZodLiteral<"card">;
2466
2585
  zoneIds: z.ZodArray<z.ZodString>;
2467
2586
  eligibleTargets: z.ZodArray<z.ZodString>;
2468
- }, z.core.$strict>, z.ZodObject<{
2587
+ }, z.core.$strict>, z.ZodDiscriminatedUnion<[z.ZodObject<{
2469
2588
  selection: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
2470
2589
  mode: z.ZodLiteral<"single">;
2471
2590
  }, z.core.$strict>, z.ZodObject<{
@@ -2477,18 +2596,34 @@ declare const HostToPluginPayloadSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
2477
2596
  type: z.ZodLiteral<"boardTarget">;
2478
2597
  projection: z.ZodLiteral<"resolved">;
2479
2598
  targetKind: z.ZodEnum<{
2599
+ space: "space";
2480
2600
  edge: "edge";
2481
2601
  vertex: "vertex";
2482
- space: "space";
2483
2602
  tile: "tile";
2484
2603
  }>;
2485
2604
  boardId: z.ZodString;
2486
- valueKind: z.ZodOptional<z.ZodEnum<{
2487
- "board-id": "board-id";
2488
- "player-board-space": "player-board-space";
2489
- }>>;
2605
+ valueKind: z.ZodLiteral<"board-id">;
2490
2606
  eligibleTargets: z.ZodArray<z.ZodString>;
2491
2607
  }, z.core.$strict>, z.ZodObject<{
2608
+ selection: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
2609
+ mode: z.ZodLiteral<"single">;
2610
+ }, z.core.$strict>, z.ZodObject<{
2611
+ mode: z.ZodLiteral<"many">;
2612
+ min: z.ZodNumber;
2613
+ max: z.ZodOptional<z.ZodNumber>;
2614
+ distinct: z.ZodOptional<z.ZodBoolean>;
2615
+ }, z.core.$strict>], "mode">>;
2616
+ type: z.ZodLiteral<"boardTarget">;
2617
+ projection: z.ZodLiteral<"resolved">;
2618
+ targetKind: z.ZodLiteral<"space">;
2619
+ boardId: z.ZodString;
2620
+ valueKind: z.ZodLiteral<"player-board-space">;
2621
+ eligibleTargets: z.ZodArray<z.ZodObject<{
2622
+ boardId: z.ZodString;
2623
+ playerId: z.ZodString;
2624
+ spaceId: z.ZodString;
2625
+ }, z.core.$strict>>;
2626
+ }, z.core.$strict>], "valueKind">, z.ZodObject<{
2492
2627
  selection: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
2493
2628
  mode: z.ZodLiteral<"single">;
2494
2629
  }, z.core.$strict>, z.ZodObject<{
@@ -2627,7 +2762,7 @@ declare const HostToPluginPayloadSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
2627
2762
  targetKind: z.ZodLiteral<"card">;
2628
2763
  zoneIds: z.ZodArray<z.ZodString>;
2629
2764
  eligibleTargets: z.ZodArray<z.ZodString>;
2630
- }, z.core.$strict>, z.ZodObject<{
2765
+ }, z.core.$strict>, z.ZodDiscriminatedUnion<[z.ZodObject<{
2631
2766
  selection: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
2632
2767
  mode: z.ZodLiteral<"single">;
2633
2768
  }, z.core.$strict>, z.ZodObject<{
@@ -2639,18 +2774,34 @@ declare const HostToPluginPayloadSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
2639
2774
  type: z.ZodLiteral<"boardTarget">;
2640
2775
  projection: z.ZodLiteral<"resolved">;
2641
2776
  targetKind: z.ZodEnum<{
2777
+ space: "space";
2642
2778
  edge: "edge";
2643
2779
  vertex: "vertex";
2644
- space: "space";
2645
2780
  tile: "tile";
2646
2781
  }>;
2647
2782
  boardId: z.ZodString;
2648
- valueKind: z.ZodOptional<z.ZodEnum<{
2649
- "board-id": "board-id";
2650
- "player-board-space": "player-board-space";
2651
- }>>;
2783
+ valueKind: z.ZodLiteral<"board-id">;
2652
2784
  eligibleTargets: z.ZodArray<z.ZodString>;
2653
2785
  }, z.core.$strict>, z.ZodObject<{
2786
+ selection: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
2787
+ mode: z.ZodLiteral<"single">;
2788
+ }, z.core.$strict>, z.ZodObject<{
2789
+ mode: z.ZodLiteral<"many">;
2790
+ min: z.ZodNumber;
2791
+ max: z.ZodOptional<z.ZodNumber>;
2792
+ distinct: z.ZodOptional<z.ZodBoolean>;
2793
+ }, z.core.$strict>], "mode">>;
2794
+ type: z.ZodLiteral<"boardTarget">;
2795
+ projection: z.ZodLiteral<"resolved">;
2796
+ targetKind: z.ZodLiteral<"space">;
2797
+ boardId: z.ZodString;
2798
+ valueKind: z.ZodLiteral<"player-board-space">;
2799
+ eligibleTargets: z.ZodArray<z.ZodObject<{
2800
+ boardId: z.ZodString;
2801
+ playerId: z.ZodString;
2802
+ spaceId: z.ZodString;
2803
+ }, z.core.$strict>>;
2804
+ }, z.core.$strict>], "valueKind">, z.ZodObject<{
2654
2805
  selection: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
2655
2806
  mode: z.ZodLiteral<"single">;
2656
2807
  }, z.core.$strict>, z.ZodObject<{
@@ -2816,6 +2967,7 @@ declare const HostToPluginEnvelopeSchema: z.ZodType<PluginProtocolEnvelope<{
2816
2967
  displayName: string;
2817
2968
  color?: string | undefined;
2818
2969
  }[];
2970
+ assets?: Record<string, Blob> | undefined;
2819
2971
  };
2820
2972
  } | {
2821
2973
  type: "gameplay.frame";
@@ -2872,8 +3024,9 @@ declare const HostToPluginEnvelopeSchema: z.ZodType<PluginProtocolEnvelope<{
2872
3024
  } | {
2873
3025
  type: "boardTarget";
2874
3026
  projection: "resolved";
2875
- targetKind: "edge" | "vertex" | "space" | "tile";
3027
+ targetKind: "space" | "edge" | "vertex" | "tile";
2876
3028
  boardId: string;
3029
+ valueKind: "board-id";
2877
3030
  eligibleTargets: string[];
2878
3031
  selection?: {
2879
3032
  mode: "single";
@@ -2883,7 +3036,25 @@ declare const HostToPluginEnvelopeSchema: z.ZodType<PluginProtocolEnvelope<{
2883
3036
  max?: number | undefined;
2884
3037
  distinct?: boolean | undefined;
2885
3038
  } | undefined;
2886
- valueKind?: "board-id" | "player-board-space" | undefined;
3039
+ } | {
3040
+ type: "boardTarget";
3041
+ projection: "resolved";
3042
+ targetKind: "space";
3043
+ boardId: string;
3044
+ valueKind: "player-board-space";
3045
+ eligibleTargets: {
3046
+ boardId: string;
3047
+ playerId: string;
3048
+ spaceId: string;
3049
+ }[];
3050
+ selection?: {
3051
+ mode: "single";
3052
+ } | {
3053
+ mode: "many";
3054
+ min: number;
3055
+ max?: number | undefined;
3056
+ distinct?: boolean | undefined;
3057
+ } | undefined;
2887
3058
  } | {
2888
3059
  type: "resourceMap";
2889
3060
  resources: {
@@ -3018,8 +3189,9 @@ declare const HostToPluginEnvelopeSchema: z.ZodType<PluginProtocolEnvelope<{
3018
3189
  } | {
3019
3190
  type: "boardTarget";
3020
3191
  projection: "resolved";
3021
- targetKind: "edge" | "vertex" | "space" | "tile";
3192
+ targetKind: "space" | "edge" | "vertex" | "tile";
3022
3193
  boardId: string;
3194
+ valueKind: "board-id";
3023
3195
  eligibleTargets: string[];
3024
3196
  selection?: {
3025
3197
  mode: "single";
@@ -3029,7 +3201,25 @@ declare const HostToPluginEnvelopeSchema: z.ZodType<PluginProtocolEnvelope<{
3029
3201
  max?: number | undefined;
3030
3202
  distinct?: boolean | undefined;
3031
3203
  } | undefined;
3032
- valueKind?: "board-id" | "player-board-space" | undefined;
3204
+ } | {
3205
+ type: "boardTarget";
3206
+ projection: "resolved";
3207
+ targetKind: "space";
3208
+ boardId: string;
3209
+ valueKind: "player-board-space";
3210
+ eligibleTargets: {
3211
+ boardId: string;
3212
+ playerId: string;
3213
+ spaceId: string;
3214
+ }[];
3215
+ selection?: {
3216
+ mode: "single";
3217
+ } | {
3218
+ mode: "many";
3219
+ min: number;
3220
+ max?: number | undefined;
3221
+ distinct?: boolean | undefined;
3222
+ } | undefined;
3033
3223
  } | {
3034
3224
  type: "resourceMap";
3035
3225
  resources: {
@@ -3157,6 +3347,7 @@ declare const HostToPluginEnvelopeSchema: z.ZodType<PluginProtocolEnvelope<{
3157
3347
  displayName: string;
3158
3348
  color?: string | undefined;
3159
3349
  }[];
3350
+ assets?: Record<string, Blob> | undefined;
3160
3351
  };
3161
3352
  } | {
3162
3353
  type: "gameplay.frame";
@@ -3213,8 +3404,9 @@ declare const HostToPluginEnvelopeSchema: z.ZodType<PluginProtocolEnvelope<{
3213
3404
  } | {
3214
3405
  type: "boardTarget";
3215
3406
  projection: "resolved";
3216
- targetKind: "edge" | "vertex" | "space" | "tile";
3407
+ targetKind: "space" | "edge" | "vertex" | "tile";
3217
3408
  boardId: string;
3409
+ valueKind: "board-id";
3218
3410
  eligibleTargets: string[];
3219
3411
  selection?: {
3220
3412
  mode: "single";
@@ -3224,7 +3416,25 @@ declare const HostToPluginEnvelopeSchema: z.ZodType<PluginProtocolEnvelope<{
3224
3416
  max?: number | undefined;
3225
3417
  distinct?: boolean | undefined;
3226
3418
  } | undefined;
3227
- valueKind?: "board-id" | "player-board-space" | undefined;
3419
+ } | {
3420
+ type: "boardTarget";
3421
+ projection: "resolved";
3422
+ targetKind: "space";
3423
+ boardId: string;
3424
+ valueKind: "player-board-space";
3425
+ eligibleTargets: {
3426
+ boardId: string;
3427
+ playerId: string;
3428
+ spaceId: string;
3429
+ }[];
3430
+ selection?: {
3431
+ mode: "single";
3432
+ } | {
3433
+ mode: "many";
3434
+ min: number;
3435
+ max?: number | undefined;
3436
+ distinct?: boolean | undefined;
3437
+ } | undefined;
3228
3438
  } | {
3229
3439
  type: "resourceMap";
3230
3440
  resources: {
@@ -3359,8 +3569,9 @@ declare const HostToPluginEnvelopeSchema: z.ZodType<PluginProtocolEnvelope<{
3359
3569
  } | {
3360
3570
  type: "boardTarget";
3361
3571
  projection: "resolved";
3362
- targetKind: "edge" | "vertex" | "space" | "tile";
3572
+ targetKind: "space" | "edge" | "vertex" | "tile";
3363
3573
  boardId: string;
3574
+ valueKind: "board-id";
3364
3575
  eligibleTargets: string[];
3365
3576
  selection?: {
3366
3577
  mode: "single";
@@ -3370,7 +3581,25 @@ declare const HostToPluginEnvelopeSchema: z.ZodType<PluginProtocolEnvelope<{
3370
3581
  max?: number | undefined;
3371
3582
  distinct?: boolean | undefined;
3372
3583
  } | undefined;
3373
- valueKind?: "board-id" | "player-board-space" | undefined;
3584
+ } | {
3585
+ type: "boardTarget";
3586
+ projection: "resolved";
3587
+ targetKind: "space";
3588
+ boardId: string;
3589
+ valueKind: "player-board-space";
3590
+ eligibleTargets: {
3591
+ boardId: string;
3592
+ playerId: string;
3593
+ spaceId: string;
3594
+ }[];
3595
+ selection?: {
3596
+ mode: "single";
3597
+ } | {
3598
+ mode: "many";
3599
+ min: number;
3600
+ max?: number | undefined;
3601
+ distinct?: boolean | undefined;
3602
+ } | undefined;
3374
3603
  } | {
3375
3604
  type: "resourceMap";
3376
3605
  resources: {
@@ -3481,15 +3710,6 @@ declare const HostToPluginEnvelopeSchema: z.ZodType<PluginProtocolEnvelope<{
3481
3710
  };
3482
3711
  }>, unknown>>;
3483
3712
  declare const PluginToHostEnvelopeSchema: z.ZodType<PluginProtocolEnvelope<{
3484
- type: "runtime.ready";
3485
- } | {
3486
- type: "runtime.resume";
3487
- } | {
3488
- type: "runtime.ack";
3489
- sequence: number;
3490
- clientReceivedAtMs?: number | undefined;
3491
- clientRenderedAtMs?: number | undefined;
3492
- } | {
3493
3713
  type: "interaction.submit";
3494
3714
  clientActionId: string;
3495
3715
  basis: {
@@ -3509,10 +3729,6 @@ declare const PluginToHostEnvelopeSchema: z.ZodType<PluginProtocolEnvelope<{
3509
3729
  clientActionId: string;
3510
3730
  type: "interaction.cancel";
3511
3731
  } | {
3512
- type: "runtime.error";
3513
- message: string;
3514
- code?: string | undefined;
3515
- }>, unknown, z.core.$ZodTypeInternals<PluginProtocolEnvelope<{
3516
3732
  type: "runtime.ready";
3517
3733
  } | {
3518
3734
  type: "runtime.resume";
@@ -3522,6 +3738,10 @@ declare const PluginToHostEnvelopeSchema: z.ZodType<PluginProtocolEnvelope<{
3522
3738
  clientReceivedAtMs?: number | undefined;
3523
3739
  clientRenderedAtMs?: number | undefined;
3524
3740
  } | {
3741
+ type: "runtime.error";
3742
+ message: string;
3743
+ code?: string | undefined;
3744
+ }>, unknown, z.core.$ZodTypeInternals<PluginProtocolEnvelope<{
3525
3745
  type: "interaction.submit";
3526
3746
  clientActionId: string;
3527
3747
  basis: {
@@ -3540,6 +3760,15 @@ declare const PluginToHostEnvelopeSchema: z.ZodType<PluginProtocolEnvelope<{
3540
3760
  };
3541
3761
  clientActionId: string;
3542
3762
  type: "interaction.cancel";
3763
+ } | {
3764
+ type: "runtime.ready";
3765
+ } | {
3766
+ type: "runtime.resume";
3767
+ } | {
3768
+ type: "runtime.ack";
3769
+ sequence: number;
3770
+ clientReceivedAtMs?: number | undefined;
3771
+ clientRenderedAtMs?: number | undefined;
3543
3772
  } | {
3544
3773
  type: "runtime.error";
3545
3774
  message: string;
@@ -3550,4 +3779,4 @@ declare function parsePluginGameplayFrame(value: unknown): PluginGameplayFrame;
3550
3779
  declare function parseHostToPluginEnvelope(value: unknown): PluginProtocolEnvelope<HostToPluginPayload>;
3551
3780
  declare function parsePluginToHostEnvelope(value: unknown): PluginProtocolEnvelope<PluginToHostPayload>;
3552
3781
 
3553
- export { type ActionSetVersionInput, AmbiguousTargetError, AuthAcceptedFrameSchema, AuthConnectFrameSchema, AuthRefreshFrameSchema, BoardBase, BoardCollection, type BoardLayoutOptions, BoardStaticProjectionSchema, type CancelInteractionCommand, CancelInteractionCommandSchema, Card, CardBase, type ClientGameplayFrame, ClientGameplayFrameSchema, CommandSource, CoreInstance, DREAMBOARD_PLUGIN_PROTOCOL, DREAMBOARD_PLUGIN_PROTOCOL_VERSION, DREAMBOARD_SDK_PACKAGES, DREAMBOARD_SDK_PACKAGE_SET, DREAMBOARD_SDK_VERSION, type DragState, type DreamboardSdkPackageName, type DreamboardSdkPackageSet, type DropTarget, FeatureContext, Features, GameEventDetailSchema, GameEventSchema, GameInstance, GameOutcomeSchema, GameSource, GameplayBackpressureFrameSchema, GameplayBackpressureOperationSchema, GameplayBackpressureReasonSchema, GameplayBasis, GameplayBasisSchema, GameplayCloseCode, type GameplayCredential, GameplayCredentialSchema, type HandOptions, type HostToPluginEnvelope, HostToPluginEnvelopeSchema, type HostToPluginPayload, HostToPluginPayloadSchema, IdOf, InputKey, InstanceOptions, InteractionDescriptor, InteractionKey, type InteractionResult, InteractionResultSchema, type MaterializePluginGameplayFrameInput, type PanZoomOptions, PlayerId, PluginGameplayFrame, PluginGameplayFrameSchema, PluginPlayerSummarySchema, type PluginProtocolEnvelope, PluginSessionDescriptor, PluginSessionDescriptorSchema, type PluginToHostEnvelope, PluginToHostEnvelopeSchema, type PluginToHostPayload, PluginToHostPayloadSchema, ReducerBoardStaticProjection, ReducerSeatProjectionBundle, RuntimeJson, SeatFrameSchema, SeatProjectionBundleSchema, type ServerGameplayFrame, ServerGameplayFrameSchema, SessionResumeFrameSchema, SessionSnapshotFrameSchema, SimultaneousPhaseSnapshotSchema, SourceSnapshot, type SubmitInteractionCommand, SubmitInteractionCommandSchema, SystemActionEventSchema, type ViewportSurface, type ViewportTransform, type WheelInput, Zone, ZoneHandlesSnapshotSchema, boardFeature, canonicalizePluginRuntimeJson, computePluginActionSetVersion, createGameInstance, createPluginProtocolEnvelopeSchema, digestPluginCommandRequest, digestPluginGameplayFrame, digestPluginRuntimeJson, dragFeature, encodeCanonicalPluginRuntimeJson, handFeature, hostSource, iframeSource, materializePluginGameplayFrame, panZoomFeature, parseHostToPluginEnvelope, parsePluginGameplayFrame, parsePluginSessionDescriptor, parsePluginToHostEnvelope, staticSource };
3782
+ export { ActionProps, type ActionSetVersionInput, AmbiguousTargetError, AuthAcceptedFrameSchema, AuthConnectFrameSchema, AuthRefreshFrameSchema, Board, BoardBase, BoardCollection, type BoardLayoutOptions, BoardSpaceCollection, BoardSpaceData, BoardSpaceId, BoardStaticProjectionSchema, type CancelInteractionCommand, CancelInteractionCommandSchema, Card, type ClientGameplayFrame, ClientGameplayFrameSchema, CommandSource, CoreInstance, DREAMBOARD_PLUGIN_PROTOCOL, DREAMBOARD_PLUGIN_PROTOCOL_VERSION, DREAMBOARD_SDK_PACKAGES, DREAMBOARD_SDK_PACKAGE_SET, DREAMBOARD_SDK_VERSION, type DragController, type DragState, type DreamboardSdkPackageName, type DreamboardSdkPackageSet, DropTarget, FeatureContext, Features, GameEventDetailSchema, GameEventSchema, GameInstance, GameOutcomeSchema, GameSource, GameplayBackpressureFrameSchema, GameplayBackpressureOperationSchema, GameplayBackpressureReasonSchema, GameplayBasis, GameplayBasisSchema, GameplayCloseCode, type GameplayCredential, GameplayCredentialSchema, type HandOptions, type HostToPluginEnvelope, HostToPluginEnvelopeSchema, type HostToPluginPayload, HostToPluginPayloadSchema, IdOf, InstanceOptions, InteractionDescriptor, type InteractionResult, InteractionResultSchema, type MaterializePluginGameplayFrameInput, type PanZoomOptions, PlayerId, PluginGameplayFrame, PluginGameplayFrameSchema, PluginPlayerSummarySchema, type PluginProtocolEnvelope, PluginSessionDescriptor, PluginSessionDescriptorSchema, type PluginToHostEnvelope, PluginToHostEnvelopeSchema, type PluginToHostPayload, PluginToHostPayloadSchema, ReducerBoardStaticProjection, ReducerSeatProjectionBundle, RuntimeJson, SeatFrameSchema, SeatProjectionBundleSchema, type ServerGameplayFrame, ServerGameplayFrameSchema, SessionResumeFrameSchema, SessionSnapshotFrameSchema, SimultaneousPhaseSnapshotSchema, SourceSnapshot, type SubmitInteractionCommand, SubmitInteractionCommandSchema, SystemActionEventSchema, TargetOptions, type ViewportSurface, type ViewportTransform, type WheelInput, Zone, ZoneHandlesSnapshotSchema, boardFeature, canonicalizePluginRuntimeJson, computePluginActionSetVersion, createGameInstance, createPluginProtocolEnvelopeSchema, digestPluginCommandRequest, digestPluginGameplayFrame, digestPluginRuntimeJson, dragFeature, encodeCanonicalPluginRuntimeJson, handFeature, hostSource, iframeSource, materializePluginGameplayFrame, panZoomFeature, parseHostToPluginEnvelope, parsePluginGameplayFrame, parsePluginSessionDescriptor, parsePluginToHostEnvelope, staticSource };