@dreamboard-games/sdk 0.3.0-alpha.1 → 0.4.0-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/REFERENCE.md +19935 -0
- package/dist/{chunk-3RQEICD3.js → chunk-2LDZ5C3T.js} +2 -2
- package/dist/chunk-3OZMHZK3.js +40 -0
- package/dist/chunk-3OZMHZK3.js.map +1 -0
- package/dist/{chunk-TXXLS3OI.js → chunk-4G7552LO.js} +3 -3
- package/dist/{chunk-P7VMTJ5D.js → chunk-MNKDSGIA.js} +2 -2
- package/dist/{chunk-P7VMTJ5D.js.map → chunk-MNKDSGIA.js.map} +1 -1
- package/dist/{chunk-W6SGFWXH.js → chunk-NBAEEHAU.js} +101 -60
- package/dist/chunk-NBAEEHAU.js.map +1 -0
- package/dist/{chunk-ADYH6PVT.js → chunk-P7F4L2FF.js} +49 -25
- package/dist/chunk-P7F4L2FF.js.map +1 -0
- package/dist/{chunk-QZ6X4B5P.js → chunk-Q5O7GPVY.js} +1 -1
- package/dist/{chunk-QZ6X4B5P.js.map → chunk-Q5O7GPVY.js.map} +1 -1
- package/dist/chunk-U5KBV2BA.js +2654 -0
- package/dist/chunk-U5KBV2BA.js.map +1 -0
- package/dist/{chunk-Y2AFYBMB.js → chunk-Y6Y2YABD.js} +9 -5
- package/dist/chunk-Y6Y2YABD.js.map +1 -0
- package/dist/codegen.d.ts +44 -51
- package/dist/codegen.js +1 -1
- package/dist/{index.d-BGqVifr_.d.ts → index.d-BL3bT5lt.d.ts} +82 -3
- package/dist/index.js +1 -1
- package/dist/package-set.d.ts +2 -2
- package/dist/package-set.js +1 -1
- package/dist/reducer/advanced.d.ts +78 -0
- package/dist/reducer/advanced.js +139 -0
- package/dist/reducer/advanced.js.map +1 -0
- package/dist/reducer-contract.d.ts +1 -1
- package/dist/reducer-contract.js +2 -2
- package/dist/reducer.d.ts +363 -3263
- package/dist/reducer.js +2778 -4081
- package/dist/reducer.js.map +1 -1
- package/dist/runtime/primitives.d.ts +3 -3
- package/dist/runtime/primitives.js +3 -3
- package/dist/runtime/runtime-api.d.ts +1 -1
- package/dist/runtime/workspace-contract.d.ts +18 -4
- package/dist/runtime/workspace-contract.js +4 -4
- package/dist/{runtime-api-tGL3ArsB.d.ts → runtime-api-BXd70c2e.d.ts} +6 -0
- package/dist/runtime.d.ts +2 -2
- package/dist/runtime.js +85 -20
- package/dist/runtime.js.map +1 -1
- package/dist/stale-contract-artifact-error-BelRiIDR.d.ts +66 -0
- package/dist/testing.d.ts +59 -5
- package/dist/testing.js +170 -6
- package/dist/testing.js.map +1 -1
- package/dist/types.d.ts +112 -119
- package/dist/ui/components.js +1 -1
- package/dist/ui/plugin-styles.css +2 -250
- package/dist/{ui-contract-SctM4ibF.d.ts → ui-contract-BUC6iS3s.d.ts} +1 -1
- package/dist/ui.js +2 -2
- package/dist/views-B0hlW6IT.d.ts +3153 -0
- package/package.json +18 -10
- package/dist/chunk-ADYH6PVT.js.map +0 -1
- package/dist/chunk-W6SGFWXH.js.map +0 -1
- package/dist/chunk-Y2AFYBMB.js.map +0 -1
- /package/dist/{chunk-3RQEICD3.js.map → chunk-2LDZ5C3T.js.map} +0 -0
- /package/dist/{chunk-TXXLS3OI.js.map → chunk-4G7552LO.js.map} +0 -0
package/dist/types.d.ts
CHANGED
|
@@ -22,7 +22,7 @@ type PresetCardSetDefinition = {
|
|
|
22
22
|
/**
|
|
23
23
|
* Type of card set source
|
|
24
24
|
*/
|
|
25
|
-
type:
|
|
25
|
+
type: "preset";
|
|
26
26
|
};
|
|
27
27
|
/**
|
|
28
28
|
* Arbitrary authored JSON value.
|
|
@@ -34,7 +34,7 @@ type PropertySchema = {
|
|
|
34
34
|
/**
|
|
35
35
|
* The data type of the property.
|
|
36
36
|
*/
|
|
37
|
-
type:
|
|
37
|
+
type: "string" | "integer" | "number" | "boolean" | "zoneId" | "cardId" | "playerId" | "boardId" | "edgeId" | "vertexId" | "spaceId" | "pieceId" | "dieId" | "resourceId" | "array" | "object" | "record" | "enum";
|
|
38
38
|
/**
|
|
39
39
|
* Optional description of the property's purpose and usage.
|
|
40
40
|
*/
|
|
@@ -97,19 +97,19 @@ type CardPropertySchemaVariants = {
|
|
|
97
97
|
};
|
|
98
98
|
type CardPropertySchema = ObjectSchema | CardPropertySchemaVariants;
|
|
99
99
|
type DetachedHomeSpec = {
|
|
100
|
-
type:
|
|
100
|
+
type: "detached";
|
|
101
101
|
};
|
|
102
102
|
type ZoneHomeSpec = {
|
|
103
|
-
type:
|
|
103
|
+
type: "zone";
|
|
104
104
|
zoneId: string;
|
|
105
105
|
};
|
|
106
106
|
type SpaceHomeSpec = {
|
|
107
|
-
type:
|
|
107
|
+
type: "space";
|
|
108
108
|
boardId: string;
|
|
109
109
|
spaceId: string;
|
|
110
110
|
};
|
|
111
111
|
type ContainerHomeSpec = {
|
|
112
|
-
type:
|
|
112
|
+
type: "container";
|
|
113
113
|
boardId: string;
|
|
114
114
|
containerId: string;
|
|
115
115
|
};
|
|
@@ -120,7 +120,7 @@ type BoardEdgeRef = {
|
|
|
120
120
|
spaces: Array<string>;
|
|
121
121
|
};
|
|
122
122
|
type EdgeHomeSpec = {
|
|
123
|
-
type:
|
|
123
|
+
type: "edge";
|
|
124
124
|
boardId: string;
|
|
125
125
|
ref: BoardEdgeRef;
|
|
126
126
|
};
|
|
@@ -131,42 +131,42 @@ type BoardVertexRef = {
|
|
|
131
131
|
spaces: Array<string>;
|
|
132
132
|
};
|
|
133
133
|
type VertexHomeSpec = {
|
|
134
|
-
type:
|
|
134
|
+
type: "vertex";
|
|
135
135
|
boardId: string;
|
|
136
136
|
ref: BoardVertexRef;
|
|
137
137
|
};
|
|
138
138
|
type PieceSlotHostRef = {
|
|
139
|
-
kind:
|
|
139
|
+
kind: "piece";
|
|
140
140
|
id: string;
|
|
141
141
|
};
|
|
142
142
|
type DieSlotHostRef = {
|
|
143
|
-
kind:
|
|
143
|
+
kind: "die";
|
|
144
144
|
id: string;
|
|
145
145
|
};
|
|
146
146
|
type SlotHostRef = ({
|
|
147
|
-
kind:
|
|
147
|
+
kind: "piece";
|
|
148
148
|
} & PieceSlotHostRef) | ({
|
|
149
|
-
kind:
|
|
149
|
+
kind: "die";
|
|
150
150
|
} & DieSlotHostRef);
|
|
151
151
|
type SlotHomeSpec = {
|
|
152
|
-
type:
|
|
152
|
+
type: "slot";
|
|
153
153
|
host: SlotHostRef;
|
|
154
154
|
slotId: string;
|
|
155
155
|
};
|
|
156
156
|
type ComponentHomeSpec = ({
|
|
157
|
-
type:
|
|
157
|
+
type: "detached";
|
|
158
158
|
} & DetachedHomeSpec) | ({
|
|
159
|
-
type:
|
|
159
|
+
type: "zone";
|
|
160
160
|
} & ZoneHomeSpec) | ({
|
|
161
|
-
type:
|
|
161
|
+
type: "space";
|
|
162
162
|
} & SpaceHomeSpec) | ({
|
|
163
|
-
type:
|
|
163
|
+
type: "container";
|
|
164
164
|
} & ContainerHomeSpec) | ({
|
|
165
|
-
type:
|
|
165
|
+
type: "edge";
|
|
166
166
|
} & EdgeHomeSpec) | ({
|
|
167
|
-
type:
|
|
167
|
+
type: "vertex";
|
|
168
168
|
} & VertexHomeSpec) | ({
|
|
169
|
-
type:
|
|
169
|
+
type: "slot";
|
|
170
170
|
} & SlotHomeSpec);
|
|
171
171
|
/**
|
|
172
172
|
* Default authored visibility for a component instance
|
|
@@ -230,7 +230,7 @@ type ManualCardSetDefinition = {
|
|
|
230
230
|
/**
|
|
231
231
|
* Type of card set source
|
|
232
232
|
*/
|
|
233
|
-
type:
|
|
233
|
+
type: "manual";
|
|
234
234
|
/**
|
|
235
235
|
* Schema definition for authored card properties in this card set
|
|
236
236
|
*/
|
|
@@ -241,18 +241,18 @@ type ManualCardSetDefinition = {
|
|
|
241
241
|
cards: Array<BoardCard>;
|
|
242
242
|
};
|
|
243
243
|
type CardSetDefinition = ({
|
|
244
|
-
type:
|
|
244
|
+
type: "preset";
|
|
245
245
|
} & PresetCardSetDefinition) | ({
|
|
246
|
-
type:
|
|
246
|
+
type: "manual";
|
|
247
247
|
} & ManualCardSetDefinition);
|
|
248
248
|
/**
|
|
249
249
|
* Whether authored topology exists once for the table or once per player
|
|
250
250
|
*/
|
|
251
|
-
type TopologyScope =
|
|
251
|
+
type TopologyScope = "shared" | "perPlayer";
|
|
252
252
|
/**
|
|
253
253
|
* Default topology visibility for a zone or slot
|
|
254
254
|
*/
|
|
255
|
-
type ZoneVisibility =
|
|
255
|
+
type ZoneVisibility = "ownerOnly" | "public" | "hidden";
|
|
256
256
|
/**
|
|
257
257
|
* Generic authored container that can hold cards, pieces, or dice
|
|
258
258
|
*/
|
|
@@ -318,16 +318,16 @@ type BoardRelationSpec = {
|
|
|
318
318
|
};
|
|
319
319
|
};
|
|
320
320
|
type BoardHostSpec = {
|
|
321
|
-
type:
|
|
321
|
+
type: "board";
|
|
322
322
|
};
|
|
323
323
|
type SpaceHostSpec = {
|
|
324
|
-
type:
|
|
324
|
+
type: "space";
|
|
325
325
|
spaceId: string;
|
|
326
326
|
};
|
|
327
327
|
type BoardContainerHostSpec = ({
|
|
328
|
-
type:
|
|
328
|
+
type: "board";
|
|
329
329
|
} & BoardHostSpec) | ({
|
|
330
|
-
type:
|
|
330
|
+
type: "space";
|
|
331
331
|
} & SpaceHostSpec);
|
|
332
332
|
/**
|
|
333
333
|
* Authored board-attached or space-attached container/slot
|
|
@@ -359,7 +359,7 @@ type GenericBoardTemplateSpec = {
|
|
|
359
359
|
*/
|
|
360
360
|
id: string;
|
|
361
361
|
name: string;
|
|
362
|
-
layout:
|
|
362
|
+
layout: "generic";
|
|
363
363
|
/**
|
|
364
364
|
* Optional authored board type identifier such as track, map, tableau, or grid
|
|
365
365
|
*/
|
|
@@ -375,7 +375,7 @@ type GenericBoardTemplateSpec = {
|
|
|
375
375
|
/**
|
|
376
376
|
* Visual orientation for authored hex coordinates
|
|
377
377
|
*/
|
|
378
|
-
type HexOrientation =
|
|
378
|
+
type HexOrientation = "pointy-top" | "flat-top";
|
|
379
379
|
/**
|
|
380
380
|
* One authored hex space in axial coordinates
|
|
381
381
|
*/
|
|
@@ -411,10 +411,7 @@ type HexSpaceSpec = {
|
|
|
411
411
|
* Hex edge identified by two adjacent hex spaces
|
|
412
412
|
*/
|
|
413
413
|
type HexEdgeRef = {
|
|
414
|
-
spaces: [
|
|
415
|
-
string,
|
|
416
|
-
string
|
|
417
|
-
];
|
|
414
|
+
spaces: [string, string];
|
|
418
415
|
};
|
|
419
416
|
/**
|
|
420
417
|
* Authored metadata attached to one derived hex edge
|
|
@@ -441,11 +438,7 @@ type HexEdgeSpec = {
|
|
|
441
438
|
* Hex vertex identified by three touching hex spaces
|
|
442
439
|
*/
|
|
443
440
|
type HexVertexRef = {
|
|
444
|
-
spaces: [
|
|
445
|
-
string,
|
|
446
|
-
string,
|
|
447
|
-
string
|
|
448
|
-
];
|
|
441
|
+
spaces: [string, string, string];
|
|
449
442
|
};
|
|
450
443
|
/**
|
|
451
444
|
* Authored metadata attached to one derived hex vertex
|
|
@@ -477,7 +470,7 @@ type HexBoardTemplateSpec = {
|
|
|
477
470
|
*/
|
|
478
471
|
id: string;
|
|
479
472
|
name: string;
|
|
480
|
-
layout:
|
|
473
|
+
layout: "hex";
|
|
481
474
|
/**
|
|
482
475
|
* Optional authored board type identifier
|
|
483
476
|
*/
|
|
@@ -573,7 +566,7 @@ type SquareBoardTemplateSpec = {
|
|
|
573
566
|
*/
|
|
574
567
|
id: string;
|
|
575
568
|
name: string;
|
|
576
|
-
layout:
|
|
569
|
+
layout: "square";
|
|
577
570
|
/**
|
|
578
571
|
* Optional authored board type identifier
|
|
579
572
|
*/
|
|
@@ -591,11 +584,11 @@ type SquareBoardTemplateSpec = {
|
|
|
591
584
|
vertices?: Array<SquareVertexSpec>;
|
|
592
585
|
};
|
|
593
586
|
type BoardTemplateSpec = ({
|
|
594
|
-
layout:
|
|
587
|
+
layout: "generic";
|
|
595
588
|
} & GenericBoardTemplateSpec) | ({
|
|
596
|
-
layout:
|
|
589
|
+
layout: "hex";
|
|
597
590
|
} & HexBoardTemplateSpec) | ({
|
|
598
|
-
layout:
|
|
591
|
+
layout: "square";
|
|
599
592
|
} & SquareBoardTemplateSpec);
|
|
600
593
|
/**
|
|
601
594
|
* Shared or per-player authored board instance shell
|
|
@@ -606,7 +599,7 @@ type GenericBoardSpec = {
|
|
|
606
599
|
*/
|
|
607
600
|
id: string;
|
|
608
601
|
name: string;
|
|
609
|
-
layout:
|
|
602
|
+
layout: "generic";
|
|
610
603
|
/**
|
|
611
604
|
* Optional authored board type identifier such as track, map, tableau, or grid
|
|
612
605
|
*/
|
|
@@ -639,7 +632,7 @@ type HexBoardSpec = {
|
|
|
639
632
|
*/
|
|
640
633
|
id: string;
|
|
641
634
|
name: string;
|
|
642
|
-
layout:
|
|
635
|
+
layout: "hex";
|
|
643
636
|
/**
|
|
644
637
|
* Optional authored board type identifier
|
|
645
638
|
*/
|
|
@@ -673,7 +666,7 @@ type SquareBoardSpec = {
|
|
|
673
666
|
*/
|
|
674
667
|
id: string;
|
|
675
668
|
name: string;
|
|
676
|
-
layout:
|
|
669
|
+
layout: "square";
|
|
677
670
|
/**
|
|
678
671
|
* Optional authored board type identifier
|
|
679
672
|
*/
|
|
@@ -702,11 +695,11 @@ type SquareBoardSpec = {
|
|
|
702
695
|
vertices?: Array<SquareVertexSpec>;
|
|
703
696
|
};
|
|
704
697
|
type BoardSpec = ({
|
|
705
|
-
layout:
|
|
698
|
+
layout: "generic";
|
|
706
699
|
} & GenericBoardSpec) | ({
|
|
707
|
-
layout:
|
|
700
|
+
layout: "hex";
|
|
708
701
|
} & HexBoardSpec) | ({
|
|
709
|
-
layout:
|
|
702
|
+
layout: "square";
|
|
710
703
|
} & SquareBoardSpec);
|
|
711
704
|
/**
|
|
712
705
|
* Named authored slot exposed by a piece or die type
|
|
@@ -863,7 +856,7 @@ type GameTopologyManifest$2 = {
|
|
|
863
856
|
* Authenticated user acting in a session.
|
|
864
857
|
*/
|
|
865
858
|
type SessionActorAuthUser = {
|
|
866
|
-
kind:
|
|
859
|
+
kind: "AUTH_USER";
|
|
867
860
|
/**
|
|
868
861
|
* Internal user id
|
|
869
862
|
*/
|
|
@@ -873,35 +866,35 @@ type SessionActorAuthUser = {
|
|
|
873
866
|
* Anonymous demo principal for one demo_sessions row (shared across tabs).
|
|
874
867
|
*/
|
|
875
868
|
type SessionActorDemoGuest = {
|
|
876
|
-
kind:
|
|
869
|
+
kind: "DEMO_GUEST";
|
|
877
870
|
/**
|
|
878
871
|
* demo_sessions.id
|
|
879
872
|
*/
|
|
880
873
|
demoActorSessionId: string;
|
|
881
874
|
};
|
|
882
875
|
type SessionActor = ({
|
|
883
|
-
kind:
|
|
876
|
+
kind: "AUTH_USER";
|
|
884
877
|
} & SessionActorAuthUser) | ({
|
|
885
|
-
kind:
|
|
878
|
+
kind: "DEMO_GUEST";
|
|
886
879
|
} & SessionActorDemoGuest);
|
|
887
880
|
type SessionGameSourceUserCompiled = {
|
|
888
|
-
kind:
|
|
881
|
+
kind: "USER_COMPILED";
|
|
889
882
|
ownerUserId: string;
|
|
890
883
|
gameId: string;
|
|
891
884
|
compiledResultId: string;
|
|
892
885
|
};
|
|
893
886
|
type SessionGameSourceDemoRevision = {
|
|
894
|
-
kind:
|
|
887
|
+
kind: "DEMO_REVISION";
|
|
895
888
|
slug: string;
|
|
896
889
|
revisionId: string;
|
|
897
890
|
};
|
|
898
891
|
type SessionGameSource = ({
|
|
899
|
-
kind:
|
|
892
|
+
kind: "USER_COMPILED";
|
|
900
893
|
} & SessionGameSourceUserCompiled) | ({
|
|
901
|
-
kind:
|
|
894
|
+
kind: "DEMO_REVISION";
|
|
902
895
|
} & SessionGameSourceDemoRevision);
|
|
903
|
-
type SessionSnapshotPhase =
|
|
904
|
-
type HostSessionStatus =
|
|
896
|
+
type SessionSnapshotPhase = "lobby" | "gameplay" | "ended";
|
|
897
|
+
type HostSessionStatus = "active" | "ended";
|
|
905
898
|
/**
|
|
906
899
|
* Summary of a game state history entry.
|
|
907
900
|
*/
|
|
@@ -985,7 +978,7 @@ type HostLobbyView = {
|
|
|
985
978
|
setupProfileId?: string;
|
|
986
979
|
};
|
|
987
980
|
type HostLobbySessionSnapshot = {
|
|
988
|
-
type:
|
|
981
|
+
type: "lobby";
|
|
989
982
|
context: HostSessionContext;
|
|
990
983
|
lobby: HostLobbyView;
|
|
991
984
|
};
|
|
@@ -1030,40 +1023,40 @@ type HostGameplaySharedView = {
|
|
|
1030
1023
|
* Draft commit policy consumed by default UI surfaces.
|
|
1031
1024
|
*/
|
|
1032
1025
|
type InteractionCommitPolicy = {
|
|
1033
|
-
mode:
|
|
1026
|
+
mode: "manual" | "autoWhenReady";
|
|
1034
1027
|
};
|
|
1035
1028
|
/**
|
|
1036
1029
|
* Single-value input selection.
|
|
1037
1030
|
*/
|
|
1038
1031
|
type SingleInputSelection = {
|
|
1039
|
-
mode:
|
|
1032
|
+
mode: "single";
|
|
1040
1033
|
};
|
|
1041
1034
|
/**
|
|
1042
1035
|
* Multi-value input selection.
|
|
1043
1036
|
*/
|
|
1044
1037
|
type ManyInputSelection = {
|
|
1045
|
-
mode:
|
|
1038
|
+
mode: "many";
|
|
1046
1039
|
min: number;
|
|
1047
1040
|
max?: number;
|
|
1048
1041
|
distinct?: boolean;
|
|
1049
1042
|
};
|
|
1050
1043
|
type InputSelection = ({
|
|
1051
|
-
mode:
|
|
1044
|
+
mode: "single";
|
|
1052
1045
|
} & SingleInputSelection) | ({
|
|
1053
|
-
mode:
|
|
1046
|
+
mode: "many";
|
|
1054
1047
|
} & ManyInputSelection);
|
|
1055
1048
|
type InputDomain = ({
|
|
1056
|
-
type:
|
|
1049
|
+
type: "cardTarget";
|
|
1057
1050
|
} & CardTargetDomain) | ({
|
|
1058
|
-
type:
|
|
1051
|
+
type: "boardTarget";
|
|
1059
1052
|
} & BoardTargetDomain) | ({
|
|
1060
|
-
type:
|
|
1053
|
+
type: "resourceMap";
|
|
1061
1054
|
} & ResourceMapDomain) | ({
|
|
1062
|
-
type:
|
|
1055
|
+
type: "boundedNumber";
|
|
1063
1056
|
} & BoundedNumberDomain) | ({
|
|
1064
|
-
type:
|
|
1057
|
+
type: "choice";
|
|
1065
1058
|
} & ChoiceDomain) | ({
|
|
1066
|
-
type:
|
|
1059
|
+
type: "choiceList";
|
|
1067
1060
|
} & ChoiceListDomain);
|
|
1068
1061
|
type InputDomainDependencyCase = {
|
|
1069
1062
|
when: {
|
|
@@ -1072,13 +1065,13 @@ type InputDomainDependencyCase = {
|
|
|
1072
1065
|
domain: InputDomain;
|
|
1073
1066
|
};
|
|
1074
1067
|
type EagerInputDomainDependencies = {
|
|
1075
|
-
mode:
|
|
1068
|
+
mode: "eager";
|
|
1076
1069
|
dependentCases: Array<InputDomainDependencyCase>;
|
|
1077
1070
|
};
|
|
1078
1071
|
type ResolvedCardTargetDomain = {
|
|
1079
|
-
type:
|
|
1080
|
-
projection:
|
|
1081
|
-
targetKind:
|
|
1072
|
+
type: "cardTarget";
|
|
1073
|
+
projection: "resolved";
|
|
1074
|
+
targetKind: "card";
|
|
1082
1075
|
zoneIds: Array<string>;
|
|
1083
1076
|
eligibleTargets: Array<string>;
|
|
1084
1077
|
selection?: InputSelection;
|
|
@@ -1089,46 +1082,46 @@ type InputDomainResolver = {
|
|
|
1089
1082
|
inputKey: string;
|
|
1090
1083
|
};
|
|
1091
1084
|
type LazyInputDomainDependencies = {
|
|
1092
|
-
mode:
|
|
1085
|
+
mode: "lazy";
|
|
1093
1086
|
dependsOn: Array<string>;
|
|
1094
1087
|
resolver: InputDomainResolver;
|
|
1095
1088
|
};
|
|
1096
1089
|
type LazyCardTargetDomain = {
|
|
1097
|
-
type:
|
|
1098
|
-
projection:
|
|
1099
|
-
targetKind:
|
|
1090
|
+
type: "cardTarget";
|
|
1091
|
+
projection: "lazy";
|
|
1092
|
+
targetKind: "card";
|
|
1100
1093
|
zoneIds: Array<string>;
|
|
1101
1094
|
selection?: InputSelection;
|
|
1102
1095
|
dependencies: LazyInputDomainDependencies;
|
|
1103
1096
|
};
|
|
1104
1097
|
type CardTargetDomain = ({
|
|
1105
|
-
projection:
|
|
1098
|
+
projection: "resolved";
|
|
1106
1099
|
} & ResolvedCardTargetDomain) | ({
|
|
1107
|
-
projection:
|
|
1100
|
+
projection: "lazy";
|
|
1108
1101
|
} & LazyCardTargetDomain);
|
|
1109
1102
|
type ResolvedBoardTargetDomain = {
|
|
1110
|
-
type:
|
|
1111
|
-
projection:
|
|
1112
|
-
targetKind:
|
|
1103
|
+
type: "boardTarget";
|
|
1104
|
+
projection: "resolved";
|
|
1105
|
+
targetKind: "edge" | "vertex" | "space" | "tile";
|
|
1113
1106
|
boardId: string;
|
|
1114
|
-
valueKind?:
|
|
1107
|
+
valueKind?: "board-id" | "player-board-space";
|
|
1115
1108
|
eligibleTargets: Array<string>;
|
|
1116
1109
|
selection?: InputSelection;
|
|
1117
1110
|
dependencies?: EagerInputDomainDependencies;
|
|
1118
1111
|
};
|
|
1119
1112
|
type LazyBoardTargetDomain = {
|
|
1120
|
-
type:
|
|
1121
|
-
projection:
|
|
1122
|
-
targetKind:
|
|
1113
|
+
type: "boardTarget";
|
|
1114
|
+
projection: "lazy";
|
|
1115
|
+
targetKind: "edge" | "vertex" | "space" | "tile";
|
|
1123
1116
|
boardId: string;
|
|
1124
|
-
valueKind?:
|
|
1117
|
+
valueKind?: "board-id" | "player-board-space";
|
|
1125
1118
|
selection?: InputSelection;
|
|
1126
1119
|
dependencies: LazyInputDomainDependencies;
|
|
1127
1120
|
};
|
|
1128
1121
|
type BoardTargetDomain = ({
|
|
1129
|
-
projection:
|
|
1122
|
+
projection: "resolved";
|
|
1130
1123
|
} & ResolvedBoardTargetDomain) | ({
|
|
1131
|
-
projection:
|
|
1124
|
+
projection: "lazy";
|
|
1132
1125
|
} & LazyBoardTargetDomain);
|
|
1133
1126
|
type ResourceMapDomainEntry = {
|
|
1134
1127
|
resourceId: string;
|
|
@@ -1138,12 +1131,12 @@ type ResourceMapDomainEntry = {
|
|
|
1138
1131
|
max: number;
|
|
1139
1132
|
};
|
|
1140
1133
|
type ResourceMapDomain = {
|
|
1141
|
-
type:
|
|
1134
|
+
type: "resourceMap";
|
|
1142
1135
|
resources: Array<ResourceMapDomainEntry>;
|
|
1143
1136
|
selection?: InputSelection;
|
|
1144
1137
|
};
|
|
1145
1138
|
type BoundedNumberDomain = {
|
|
1146
|
-
type:
|
|
1139
|
+
type: "boundedNumber";
|
|
1147
1140
|
min: number;
|
|
1148
1141
|
max: number;
|
|
1149
1142
|
step?: number;
|
|
@@ -1159,13 +1152,13 @@ type ChoiceDomainOption = {
|
|
|
1159
1152
|
disabledReason?: string;
|
|
1160
1153
|
};
|
|
1161
1154
|
type ChoiceDomain = {
|
|
1162
|
-
type:
|
|
1155
|
+
type: "choice";
|
|
1163
1156
|
choices: Array<ChoiceDomainOption>;
|
|
1164
1157
|
selection?: InputSelection;
|
|
1165
1158
|
dependencies?: EagerInputDomainDependencies;
|
|
1166
1159
|
};
|
|
1167
1160
|
type ChoiceListDomain = {
|
|
1168
|
-
type:
|
|
1161
|
+
type: "choiceList";
|
|
1169
1162
|
choices: Array<ChoiceDomainOption>;
|
|
1170
1163
|
min?: number;
|
|
1171
1164
|
max?: number;
|
|
@@ -1189,14 +1182,14 @@ type InteractionInputDescriptor = {
|
|
|
1189
1182
|
defaultValue?: JsonValue;
|
|
1190
1183
|
};
|
|
1191
1184
|
type AvailableInteractionAvailability = {
|
|
1192
|
-
status:
|
|
1185
|
+
status: "available";
|
|
1193
1186
|
};
|
|
1194
1187
|
type NotYourTurnInteractionAvailability = {
|
|
1195
|
-
status:
|
|
1188
|
+
status: "notYourTurn";
|
|
1196
1189
|
reason: string;
|
|
1197
1190
|
};
|
|
1198
1191
|
type InsufficientResourcesInteractionAvailability = {
|
|
1199
|
-
status:
|
|
1192
|
+
status: "insufficientResources";
|
|
1200
1193
|
reason: string;
|
|
1201
1194
|
/**
|
|
1202
1195
|
* Resource shortfall by resource id when a costed interaction is not currently affordable.
|
|
@@ -1206,18 +1199,18 @@ type InsufficientResourcesInteractionAvailability = {
|
|
|
1206
1199
|
};
|
|
1207
1200
|
};
|
|
1208
1201
|
type BlockedInteractionAvailability = {
|
|
1209
|
-
status:
|
|
1202
|
+
status: "blocked";
|
|
1210
1203
|
reason: string;
|
|
1211
1204
|
code?: string;
|
|
1212
1205
|
};
|
|
1213
1206
|
type InteractionAvailability = ({
|
|
1214
|
-
status:
|
|
1207
|
+
status: "available";
|
|
1215
1208
|
} & AvailableInteractionAvailability) | ({
|
|
1216
|
-
status:
|
|
1209
|
+
status: "notYourTurn";
|
|
1217
1210
|
} & NotYourTurnInteractionAvailability) | ({
|
|
1218
|
-
status:
|
|
1211
|
+
status: "insufficientResources";
|
|
1219
1212
|
} & InsufficientResourcesInteractionAvailability) | ({
|
|
1220
|
-
status:
|
|
1213
|
+
status: "blocked";
|
|
1221
1214
|
} & BlockedInteractionAvailability);
|
|
1222
1215
|
/**
|
|
1223
1216
|
* Authoritative interaction descriptor resolved by the trusted bundle.
|
|
@@ -1244,7 +1237,7 @@ type InteractionDescriptorBase = {
|
|
|
1244
1237
|
availability: InteractionAvailability;
|
|
1245
1238
|
};
|
|
1246
1239
|
type ActionInteractionDescriptor = InteractionDescriptorBase & {
|
|
1247
|
-
kind:
|
|
1240
|
+
kind: "action";
|
|
1248
1241
|
};
|
|
1249
1242
|
type InteractionContextOption = {
|
|
1250
1243
|
id: string;
|
|
@@ -1259,13 +1252,13 @@ type InteractionContext = {
|
|
|
1259
1252
|
options?: Array<InteractionContextOption>;
|
|
1260
1253
|
};
|
|
1261
1254
|
type PromptInteractionDescriptor = InteractionDescriptorBase & {
|
|
1262
|
-
kind:
|
|
1255
|
+
kind: "prompt";
|
|
1263
1256
|
context: InteractionContext;
|
|
1264
1257
|
};
|
|
1265
1258
|
type InteractionDescriptor = ({
|
|
1266
|
-
kind:
|
|
1259
|
+
kind: "action";
|
|
1267
1260
|
} & ActionInteractionDescriptor) | ({
|
|
1268
|
-
kind:
|
|
1261
|
+
kind: "prompt";
|
|
1269
1262
|
} & PromptInteractionDescriptor);
|
|
1270
1263
|
type ZoneHandles = {
|
|
1271
1264
|
cardIds: Array<string>;
|
|
@@ -1328,28 +1321,28 @@ type HostPlayerGameplayView = {
|
|
|
1328
1321
|
};
|
|
1329
1322
|
};
|
|
1330
1323
|
type HostGameplaySessionSnapshot = {
|
|
1331
|
-
type:
|
|
1324
|
+
type: "gameplay";
|
|
1332
1325
|
context: HostSessionContext;
|
|
1333
1326
|
lobby: HostLobbyView;
|
|
1334
1327
|
gameplay: HostPlayerGameplayView;
|
|
1335
1328
|
};
|
|
1336
1329
|
type HostEndedSessionSnapshot = {
|
|
1337
|
-
type:
|
|
1330
|
+
type: "ended";
|
|
1338
1331
|
context: HostSessionContext;
|
|
1339
1332
|
lobby: HostLobbyView;
|
|
1340
1333
|
};
|
|
1341
1334
|
type HostSessionSnapshot = ({
|
|
1342
|
-
type:
|
|
1335
|
+
type: "lobby";
|
|
1343
1336
|
} & HostLobbySessionSnapshot) | ({
|
|
1344
|
-
type:
|
|
1337
|
+
type: "gameplay";
|
|
1345
1338
|
} & HostGameplaySessionSnapshot) | ({
|
|
1346
|
-
type:
|
|
1339
|
+
type: "ended";
|
|
1347
1340
|
} & HostEndedSessionSnapshot);
|
|
1348
1341
|
type HostSessionEventCausation = {
|
|
1349
1342
|
clientActionId?: string;
|
|
1350
1343
|
};
|
|
1351
1344
|
type HostSessionGameplayUpdatedEvent = {
|
|
1352
|
-
type:
|
|
1345
|
+
type: "session.gameplayUpdated";
|
|
1353
1346
|
context: HostSessionContext;
|
|
1354
1347
|
gameplay: HostPlayerGameplayView;
|
|
1355
1348
|
causation?: HostSessionEventCausation;
|
|
@@ -1359,7 +1352,7 @@ type HostActionSubmitResponse = {
|
|
|
1359
1352
|
version: number;
|
|
1360
1353
|
actionSetVersion: string;
|
|
1361
1354
|
accepted?: boolean;
|
|
1362
|
-
durabilityStatus?:
|
|
1355
|
+
durabilityStatus?: "COMMITTED";
|
|
1363
1356
|
errorCode?: string;
|
|
1364
1357
|
message?: string;
|
|
1365
1358
|
clientActionId?: string;
|
|
@@ -1368,7 +1361,7 @@ type HostActionSubmitResponse = {
|
|
|
1368
1361
|
/**
|
|
1369
1362
|
* Type of parameter accepted by a runtime action
|
|
1370
1363
|
*/
|
|
1371
|
-
type ParameterType =
|
|
1364
|
+
type ParameterType = "cardId" | "cardType" | "playerId" | "string" | "number" | "boolean" | "zoneId" | "pieceId" | "dieId" | "boardId" | "edgeId" | "vertexId" | "spaceId" | "resourceId";
|
|
1372
1365
|
/**
|
|
1373
1366
|
* Defines a parameter for an action
|
|
1374
1367
|
*/
|
|
@@ -1413,11 +1406,11 @@ type ActionDefinition = {
|
|
|
1413
1406
|
/**
|
|
1414
1407
|
* Type of source for the card set
|
|
1415
1408
|
*/
|
|
1416
|
-
type CardSetSourceType =
|
|
1409
|
+
type CardSetSourceType = "preset" | "csv" | "manual";
|
|
1417
1410
|
/**
|
|
1418
1411
|
* Engine-level structural board layout discriminator
|
|
1419
1412
|
*/
|
|
1420
|
-
type BoardLayout =
|
|
1413
|
+
type BoardLayout = "generic" | "hex" | "square";
|
|
1421
1414
|
/**
|
|
1422
1415
|
* Unique identifier for the player (e.g., 'player-1')
|
|
1423
1416
|
*/
|
package/dist/ui/components.js
CHANGED