@dreamboard-games/sdk 0.4.0-alpha.8 → 0.5.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/README.md +49 -11
- package/dist/authoring/index.d.ts +6 -14
- package/dist/authoring/index.js +11 -547
- package/dist/authoring/index.js.map +1 -1
- package/dist/authoring-compiler.d.ts +27 -0
- package/dist/authoring-compiler.js +11 -0
- package/dist/authoring-compiler.js.map +1 -0
- package/dist/authoring-materialize-cli.d.ts +1 -0
- package/dist/authoring-materialize-cli.js +45 -0
- package/dist/authoring-materialize-cli.js.map +1 -0
- package/dist/browser-interaction.d.ts +22 -22
- package/dist/{chunk-3BLN5POZ.js → chunk-2GQIALJL.js} +51 -15
- package/dist/chunk-2GQIALJL.js.map +1 -0
- package/dist/chunk-533O7C4L.js +7095 -0
- package/dist/chunk-533O7C4L.js.map +1 -0
- package/dist/{chunk-44N3T2A5.js → chunk-6LMESVGT.js} +9 -28
- package/dist/chunk-6LMESVGT.js.map +1 -0
- package/dist/{chunk-ZYONCTZ2.js → chunk-DQS2EG5E.js} +3 -3
- package/dist/{chunk-ZYONCTZ2.js.map → chunk-DQS2EG5E.js.map} +1 -1
- package/dist/chunk-EOEA3I64.js +1864 -0
- package/dist/chunk-EOEA3I64.js.map +1 -0
- package/dist/{chunk-B2YBS3SG.js → chunk-FL67RDID.js} +41 -13
- package/dist/chunk-FL67RDID.js.map +1 -0
- package/dist/{chunk-2TAKLJJD.js → chunk-HIH6Y4FA.js} +222 -1267
- package/dist/chunk-HIH6Y4FA.js.map +1 -0
- package/dist/chunk-HUK4234C.js +166 -0
- package/dist/chunk-HUK4234C.js.map +1 -0
- package/dist/chunk-KGV2EUNN.js +532 -0
- package/dist/chunk-KGV2EUNN.js.map +1 -0
- package/dist/{chunk-VTK4TIXC.js → chunk-KRJPRYEA.js} +49 -4
- package/dist/chunk-KRJPRYEA.js.map +1 -0
- package/dist/chunk-KWHOFBDM.js +9 -0
- package/dist/chunk-KWHOFBDM.js.map +1 -0
- package/dist/{chunk-UC2UXAC6.js → chunk-LMHCGCA6.js} +2 -2
- package/dist/{chunk-XV27IQHA.js → chunk-N33CGX2F.js} +15 -85
- package/dist/chunk-N33CGX2F.js.map +1 -0
- package/dist/chunk-TXELBVTG.js +32 -0
- package/dist/chunk-TXELBVTG.js.map +1 -0
- package/dist/{chunk-2TRZSZGD.js → chunk-VRRR6QZT.js} +9 -12
- package/dist/chunk-VRRR6QZT.js.map +1 -0
- package/dist/chunk-VWTKGIYF.js +90 -0
- package/dist/chunk-VWTKGIYF.js.map +1 -0
- package/dist/{chunk-IYX5OO2K.js → chunk-XFMSLL3P.js} +133 -61
- package/dist/chunk-XFMSLL3P.js.map +1 -0
- package/dist/{chunk-YGQTL63W.js → chunk-ZSTCUJKZ.js} +4 -4
- package/dist/chunk-ZSTCUJKZ.js.map +1 -0
- package/dist/codegen.js +1 -1
- package/dist/{components-BTwSIjXj.d.ts → components-CNAt5J1p.d.ts} +1 -1
- package/dist/definitions-bZSBaPjj.d.ts +300 -0
- package/dist/{diagnostics-1BWjRo6-.d.ts → diagnostics-DIi3ina7.d.ts} +2 -1
- package/dist/digest.d.ts +8 -0
- package/dist/{index-CFTjJIXd.d.ts → index-CR69MyWr.d.ts} +2 -2
- package/dist/{index.d-C0PKOVbh.d.ts → index.d-Bw8AOcgp.d.ts} +532 -225
- package/dist/index.js +2 -2
- package/dist/package-set.d.ts +2 -2
- package/dist/package-set.js +2 -2
- package/dist/plugin-runtime-contract.d.ts +17 -0
- package/dist/plugin-runtime-contract.js +94 -0
- package/dist/plugin-runtime-contract.js.map +1 -0
- package/dist/{protocol-nS2ojsGr.d.ts → protocol-CVaSqPgX.d.ts} +54 -47
- package/dist/reducer/advanced.d.ts +5 -4
- package/dist/reducer/advanced.js +14 -108
- package/dist/reducer/advanced.js.map +1 -1
- package/dist/reducer-contract.d.ts +1 -1
- package/dist/reducer-contract.js +6 -4
- package/dist/reducer.d.ts +20 -98
- package/dist/reducer.js +28 -6050
- package/dist/reducer.js.map +1 -1
- package/dist/reference-games/index.d.ts +6 -198
- package/dist/reference-games/index.js +18 -200
- package/dist/reference-games/index.js.map +1 -1
- package/dist/runtime/primitives.d.ts +3 -3
- package/dist/runtime/primitives.js +5 -5
- package/dist/runtime/runtime-api.d.ts +1 -1
- package/dist/runtime/workspace-contract.d.ts +343 -11
- package/dist/runtime/workspace-contract.js +12 -6
- package/dist/{runtime-Dkfm1x2r.d.ts → runtime-C7Z2acNU.d.ts} +67 -31
- package/dist/{runtime-api-C6aWo9c0.d.ts → runtime-api-CgPuEVeF.d.ts} +4 -13
- package/dist/runtime.d.ts +7 -7
- package/dist/runtime.js +15 -11
- package/dist/runtime.js.map +1 -1
- package/dist/schema.d.ts +405 -0
- package/dist/{stale-contract-artifact-error-C5AaZPJ8.d.ts → stale-contract-artifact-error-XLaweZtF.d.ts} +1 -1
- package/dist/testing-compiler.d.ts +37 -0
- package/dist/testing-compiler.js +272 -0
- package/dist/testing-compiler.js.map +1 -0
- package/dist/testing-runtime.d.ts +98 -21
- package/dist/testing-runtime.js +154 -95
- package/dist/testing-runtime.js.map +1 -1
- package/dist/testing.d.ts +197 -156
- package/dist/testing.js +660 -372
- package/dist/testing.js.map +1 -1
- package/dist/types-DN4O7kH_.d.ts +122 -0
- package/dist/{types-CTeN_QAk.d.ts → types-q1Guidm5.d.ts} +4 -5
- package/dist/types.d.ts +0 -1
- package/dist/ui/components.d.ts +3 -2
- package/dist/ui/components.js +1 -1
- package/dist/ui/plugin-styles.css +1 -1
- package/dist/{ui-contract-Ue6SywvO.d.ts → ui-contract-BC4JpysE.d.ts} +2 -6
- package/dist/ui.d.ts +4 -3
- package/dist/ui.js +2 -2
- package/dist/{views-Qx-EHBP8.d.ts → views-D2Cfzr3h.d.ts} +17 -5
- package/package.json +41 -22
- package/REFERENCE.md +0 -22884
- package/dist/chunk-2TAKLJJD.js.map +0 -1
- package/dist/chunk-2TRZSZGD.js.map +0 -1
- package/dist/chunk-3BLN5POZ.js.map +0 -1
- package/dist/chunk-3OZMHZK3.js +0 -40
- package/dist/chunk-3OZMHZK3.js.map +0 -1
- package/dist/chunk-44N3T2A5.js.map +0 -1
- package/dist/chunk-5CQIJHGF.js +0 -663
- package/dist/chunk-5CQIJHGF.js.map +0 -1
- package/dist/chunk-B2YBS3SG.js.map +0 -1
- package/dist/chunk-IYX5OO2K.js.map +0 -1
- package/dist/chunk-VTK4TIXC.js.map +0 -1
- package/dist/chunk-VTNEWMWJ.js +0 -12
- package/dist/chunk-VTNEWMWJ.js.map +0 -1
- package/dist/chunk-XV27IQHA.js.map +0 -1
- package/dist/chunk-YGQTL63W.js.map +0 -1
- package/dist/types-B_3pObUV.d.ts +0 -192
- /package/dist/{chunk-UC2UXAC6.js.map → chunk-LMHCGCA6.js.map} +0 -0
package/dist/index.js
CHANGED
|
@@ -2,8 +2,8 @@ import {
|
|
|
2
2
|
DREAMBOARD_SDK_PACKAGES,
|
|
3
3
|
DREAMBOARD_SDK_PACKAGE_SET,
|
|
4
4
|
DREAMBOARD_SDK_VERSION
|
|
5
|
-
} from "./chunk-
|
|
6
|
-
import "./chunk-
|
|
5
|
+
} from "./chunk-ZSTCUJKZ.js";
|
|
6
|
+
import "./chunk-KWHOFBDM.js";
|
|
7
7
|
import "./chunk-PZ5AY32C.js";
|
|
8
8
|
export {
|
|
9
9
|
DREAMBOARD_SDK_PACKAGES,
|
package/dist/package-set.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
declare const DREAMBOARD_SDK_VERSION:
|
|
1
|
+
declare const DREAMBOARD_SDK_VERSION: string;
|
|
2
2
|
declare const DREAMBOARD_SDK_PACKAGES: {
|
|
3
|
-
readonly "@dreamboard-games/sdk":
|
|
3
|
+
readonly "@dreamboard-games/sdk": string;
|
|
4
4
|
};
|
|
5
5
|
type DreamboardSdkPackageName = keyof typeof DREAMBOARD_SDK_PACKAGES;
|
|
6
6
|
type DreamboardSdkPackageSet = {
|
package/dist/package-set.js
CHANGED
|
@@ -2,8 +2,8 @@ import {
|
|
|
2
2
|
DREAMBOARD_SDK_PACKAGES,
|
|
3
3
|
DREAMBOARD_SDK_PACKAGE_SET,
|
|
4
4
|
DREAMBOARD_SDK_VERSION
|
|
5
|
-
} from "./chunk-
|
|
6
|
-
import "./chunk-
|
|
5
|
+
} from "./chunk-ZSTCUJKZ.js";
|
|
6
|
+
import "./chunk-KWHOFBDM.js";
|
|
7
7
|
import "./chunk-PZ5AY32C.js";
|
|
8
8
|
export {
|
|
9
9
|
DREAMBOARD_SDK_PACKAGES,
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { P, M, R, v } from './protocol-CVaSqPgX.js';
|
|
2
|
+
export { A as ActionInteractionDescriptor, a as ActionSetVersionInput, C as CanonicalJson, D as DREAMBOARD_PLUGIN_PROTOCOL, b as DREAMBOARD_PLUGIN_PROTOCOL_VERSION, G as GameEvent, c as GameEventDetail, d as GameOutcome, e as GameplayBasis, H as HostToPluginEnvelope, f as HostToPluginPayload, I as InputDomain, g as InputDomainDependencies, h as InputDomainDependencyCase, i as InputSelection, j as InteractionAvailability, k as InteractionChoiceOption, l as InteractionCommitPolicy, m as InteractionContext, n as InteractionContextOption, o as InteractionDescriptor, p as InteractionDiagnosticReason, q as InteractionInputDescriptor, r as InteractionResult, O as OutcomeResult, s as OutcomeScoreComponent, t as OutcomeStanding, u as OutcomeTieBreak, P as PlayerId, v as PluginGameplayFrame, w as PluginPlayerSummary, x as PluginProtocolEnvelope, y as PluginProtocolFrame, z as PluginProtocolStep, B as PluginProtocolTape, E as PluginSessionDescriptor, F as PluginToHostEnvelope, J as PluginToHostPayload, K as ProjectedGameEvent, L as PromptInteractionDescriptor, R as ReducerBoardStaticProjection, M as ReducerSeatProjectionBundle, N as RuntimeJson, S as SimultaneousPhaseSnapshot, Q as SubmitInteractionCommand, T as SystemActionEvent, Z as ZoneHandlesSnapshot, U as canonicalizePluginRuntimeJson, V as digestPluginRuntimeJson, W as encodeCanonicalPluginRuntimeJson } from './protocol-CVaSqPgX.js';
|
|
3
|
+
export { BoardStaticProjectionSchema, GameEventDetailSchema, GameEventSchema, GameOutcomeSchema, GameplayBasisSchema, HostToPluginEnvelopeSchema, HostToPluginPayloadSchema, InputDomainDependenciesSchema, InputDomainSchema, InteractionAvailabilitySchema, InteractionCommitPolicySchema, InteractionContextSchema, InteractionDescriptorSchema, InteractionInputDescriptorSchema, InteractionResultSchema, PluginGameplayFrameSchema, PluginPlayerSummarySchema, PluginProtocolFrameSchema, PluginProtocolStepSchema, PluginProtocolTapeSchema, PluginSessionDescriptorSchema, PluginToHostEnvelopeSchema, PluginToHostPayloadSchema, ProjectedGameEventSchema, RuntimeJsonSchema, SeatProjectionBundleSchema, SimultaneousPhaseSnapshotSchema, SubmitInteractionCommandSchema, SystemActionEventSchema, ZoneHandlesSnapshotSchema, createPluginProtocolEnvelopeSchema, parseHostToPluginEnvelope, parsePluginGameplayFrame, parsePluginSessionDescriptor, parsePluginToHostEnvelope } from './schema.js';
|
|
4
|
+
export { computePluginActionSetVersion, digestPluginCommandRequest, digestPluginGameplayFrame } from './digest.js';
|
|
5
|
+
|
|
6
|
+
interface MaterializePluginGameplayFrameInput {
|
|
7
|
+
readonly currentPhase: string | null;
|
|
8
|
+
readonly activePlayers: readonly P[];
|
|
9
|
+
readonly dynamicProjection: M;
|
|
10
|
+
readonly staticProjection?: R | null;
|
|
11
|
+
readonly perspectivePlayerId: P;
|
|
12
|
+
readonly version: number;
|
|
13
|
+
readonly actionSetVersion: string;
|
|
14
|
+
}
|
|
15
|
+
declare function materializePluginGameplayFrame(input: MaterializePluginGameplayFrameInput): v;
|
|
16
|
+
|
|
17
|
+
export { type MaterializePluginGameplayFrameInput, materializePluginGameplayFrame };
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import {
|
|
2
|
+
BoardStaticProjectionSchema,
|
|
3
|
+
DREAMBOARD_PLUGIN_PROTOCOL,
|
|
4
|
+
DREAMBOARD_PLUGIN_PROTOCOL_VERSION,
|
|
5
|
+
GameEventDetailSchema,
|
|
6
|
+
GameEventSchema,
|
|
7
|
+
GameOutcomeSchema,
|
|
8
|
+
GameplayBasisSchema,
|
|
9
|
+
HostToPluginEnvelopeSchema,
|
|
10
|
+
HostToPluginPayloadSchema,
|
|
11
|
+
InputDomainDependenciesSchema,
|
|
12
|
+
InputDomainSchema,
|
|
13
|
+
InteractionAvailabilitySchema,
|
|
14
|
+
InteractionCommitPolicySchema,
|
|
15
|
+
InteractionContextSchema,
|
|
16
|
+
InteractionDescriptorSchema,
|
|
17
|
+
InteractionInputDescriptorSchema,
|
|
18
|
+
InteractionResultSchema,
|
|
19
|
+
PluginGameplayFrameSchema,
|
|
20
|
+
PluginPlayerSummarySchema,
|
|
21
|
+
PluginProtocolFrameSchema,
|
|
22
|
+
PluginProtocolStepSchema,
|
|
23
|
+
PluginProtocolTapeSchema,
|
|
24
|
+
PluginSessionDescriptorSchema,
|
|
25
|
+
PluginToHostEnvelopeSchema,
|
|
26
|
+
PluginToHostPayloadSchema,
|
|
27
|
+
ProjectedGameEventSchema,
|
|
28
|
+
RuntimeJsonSchema,
|
|
29
|
+
SeatProjectionBundleSchema,
|
|
30
|
+
SimultaneousPhaseSnapshotSchema,
|
|
31
|
+
SubmitInteractionCommandSchema,
|
|
32
|
+
SystemActionEventSchema,
|
|
33
|
+
ZoneHandlesSnapshotSchema,
|
|
34
|
+
canonicalizePluginRuntimeJson,
|
|
35
|
+
computePluginActionSetVersion,
|
|
36
|
+
createPluginProtocolEnvelopeSchema,
|
|
37
|
+
digestPluginCommandRequest,
|
|
38
|
+
digestPluginGameplayFrame,
|
|
39
|
+
digestPluginRuntimeJson,
|
|
40
|
+
encodeCanonicalPluginRuntimeJson,
|
|
41
|
+
materializePluginGameplayFrame,
|
|
42
|
+
parseHostToPluginEnvelope,
|
|
43
|
+
parsePluginGameplayFrame,
|
|
44
|
+
parsePluginSessionDescriptor,
|
|
45
|
+
parsePluginToHostEnvelope
|
|
46
|
+
} from "./chunk-XFMSLL3P.js";
|
|
47
|
+
import "./chunk-PZ5AY32C.js";
|
|
48
|
+
export {
|
|
49
|
+
BoardStaticProjectionSchema,
|
|
50
|
+
DREAMBOARD_PLUGIN_PROTOCOL,
|
|
51
|
+
DREAMBOARD_PLUGIN_PROTOCOL_VERSION,
|
|
52
|
+
GameEventDetailSchema,
|
|
53
|
+
GameEventSchema,
|
|
54
|
+
GameOutcomeSchema,
|
|
55
|
+
GameplayBasisSchema,
|
|
56
|
+
HostToPluginEnvelopeSchema,
|
|
57
|
+
HostToPluginPayloadSchema,
|
|
58
|
+
InputDomainDependenciesSchema,
|
|
59
|
+
InputDomainSchema,
|
|
60
|
+
InteractionAvailabilitySchema,
|
|
61
|
+
InteractionCommitPolicySchema,
|
|
62
|
+
InteractionContextSchema,
|
|
63
|
+
InteractionDescriptorSchema,
|
|
64
|
+
InteractionInputDescriptorSchema,
|
|
65
|
+
InteractionResultSchema,
|
|
66
|
+
PluginGameplayFrameSchema,
|
|
67
|
+
PluginPlayerSummarySchema,
|
|
68
|
+
PluginProtocolFrameSchema,
|
|
69
|
+
PluginProtocolStepSchema,
|
|
70
|
+
PluginProtocolTapeSchema,
|
|
71
|
+
PluginSessionDescriptorSchema,
|
|
72
|
+
PluginToHostEnvelopeSchema,
|
|
73
|
+
PluginToHostPayloadSchema,
|
|
74
|
+
ProjectedGameEventSchema,
|
|
75
|
+
RuntimeJsonSchema,
|
|
76
|
+
SeatProjectionBundleSchema,
|
|
77
|
+
SimultaneousPhaseSnapshotSchema,
|
|
78
|
+
SubmitInteractionCommandSchema,
|
|
79
|
+
SystemActionEventSchema,
|
|
80
|
+
ZoneHandlesSnapshotSchema,
|
|
81
|
+
canonicalizePluginRuntimeJson,
|
|
82
|
+
computePluginActionSetVersion,
|
|
83
|
+
createPluginProtocolEnvelopeSchema,
|
|
84
|
+
digestPluginCommandRequest,
|
|
85
|
+
digestPluginGameplayFrame,
|
|
86
|
+
digestPluginRuntimeJson,
|
|
87
|
+
encodeCanonicalPluginRuntimeJson,
|
|
88
|
+
materializePluginGameplayFrame,
|
|
89
|
+
parseHostToPluginEnvelope,
|
|
90
|
+
parsePluginGameplayFrame,
|
|
91
|
+
parsePluginSessionDescriptor,
|
|
92
|
+
parsePluginToHostEnvelope
|
|
93
|
+
};
|
|
94
|
+
//# sourceMappingURL=plugin-runtime-contract.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -9,6 +9,11 @@ declare function encodeCanonicalPluginRuntimeJson(value: unknown): string;
|
|
|
9
9
|
declare function digestPluginRuntimeJson(value: unknown): string;
|
|
10
10
|
|
|
11
11
|
type PlayerId = string;
|
|
12
|
+
interface GameplayBasis {
|
|
13
|
+
readonly version: number;
|
|
14
|
+
readonly actionSetVersion: string;
|
|
15
|
+
readonly perspectivePlayerId: PlayerId;
|
|
16
|
+
}
|
|
12
17
|
interface PluginPlayerSummary {
|
|
13
18
|
readonly playerId: PlayerId;
|
|
14
19
|
readonly displayName: string;
|
|
@@ -167,14 +172,34 @@ type ProjectedGameEvent = GameEvent & {
|
|
|
167
172
|
readonly version: number;
|
|
168
173
|
readonly index: number;
|
|
169
174
|
};
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
readonly
|
|
173
|
-
readonly
|
|
174
|
-
readonly
|
|
175
|
-
|
|
176
|
-
|
|
175
|
+
type OutcomeResult = "win" | "draw" | "loss" | "eliminated";
|
|
176
|
+
interface OutcomeScoreComponent {
|
|
177
|
+
readonly id: string;
|
|
178
|
+
readonly label: string;
|
|
179
|
+
readonly value: number;
|
|
180
|
+
}
|
|
181
|
+
interface OutcomeTieBreak {
|
|
182
|
+
readonly id: string;
|
|
183
|
+
readonly label: string;
|
|
184
|
+
readonly value: number | string;
|
|
185
|
+
}
|
|
186
|
+
interface OutcomeStanding<Player extends string = string> {
|
|
187
|
+
readonly playerId: Player;
|
|
188
|
+
readonly rank: number;
|
|
189
|
+
readonly result: OutcomeResult;
|
|
190
|
+
readonly score?: number;
|
|
191
|
+
readonly scoreBreakdown?: readonly OutcomeScoreComponent[];
|
|
192
|
+
readonly tieBreaks?: readonly OutcomeTieBreak[];
|
|
193
|
+
}
|
|
194
|
+
interface GameOutcome<Player extends string = string> {
|
|
195
|
+
readonly reason: {
|
|
196
|
+
readonly code: string;
|
|
197
|
+
readonly message?: string;
|
|
177
198
|
};
|
|
199
|
+
readonly standings: readonly OutcomeStanding<Player>[];
|
|
200
|
+
}
|
|
201
|
+
interface PluginGameplayFrame<View = unknown, Phase extends string = string, Stage extends string = string, Interaction extends string = string> {
|
|
202
|
+
readonly basis: GameplayBasis;
|
|
178
203
|
readonly view: View | null;
|
|
179
204
|
readonly flow: {
|
|
180
205
|
readonly currentPhase: Phase | null;
|
|
@@ -191,6 +216,15 @@ interface ReducerSeatProjectionBundle {
|
|
|
191
216
|
readonly currentStage?: string | null;
|
|
192
217
|
readonly stageSeats?: readonly string[];
|
|
193
218
|
readonly simultaneousPhase?: SimultaneousPhaseSnapshot | null;
|
|
219
|
+
readonly schedulerFlow?: {
|
|
220
|
+
readonly version: 1;
|
|
221
|
+
readonly activePlayerIds: readonly string[];
|
|
222
|
+
readonly pendingPlayerIds: readonly string[];
|
|
223
|
+
readonly continuationDependencies: readonly {
|
|
224
|
+
readonly waiterPlayerId: string;
|
|
225
|
+
readonly blockerPlayerIds: readonly string[];
|
|
226
|
+
}[];
|
|
227
|
+
};
|
|
194
228
|
readonly guidance?: GameGuidanceProjection | null;
|
|
195
229
|
readonly recentEvents?: readonly ProjectedGameEvent[];
|
|
196
230
|
readonly sharedView?: unknown;
|
|
@@ -208,35 +242,22 @@ interface ReducerBoardStaticProjection {
|
|
|
208
242
|
}
|
|
209
243
|
|
|
210
244
|
declare const DREAMBOARD_PLUGIN_PROTOCOL: "dreamboard-plugin";
|
|
211
|
-
declare const DREAMBOARD_PLUGIN_PROTOCOL_VERSION:
|
|
212
|
-
|
|
213
|
-
readonly
|
|
214
|
-
readonly
|
|
215
|
-
readonly message?: string;
|
|
216
|
-
}
|
|
217
|
-
type SubmissionResult = {
|
|
245
|
+
declare const DREAMBOARD_PLUGIN_PROTOCOL_VERSION: 4;
|
|
246
|
+
type InteractionResult = {
|
|
247
|
+
readonly type: "interaction.result";
|
|
248
|
+
readonly clientActionId: string;
|
|
218
249
|
readonly accepted: true;
|
|
219
250
|
} | {
|
|
251
|
+
readonly type: "interaction.result";
|
|
252
|
+
readonly clientActionId: string;
|
|
220
253
|
readonly accepted: false;
|
|
221
254
|
readonly errorCode: string;
|
|
222
255
|
readonly message?: string;
|
|
223
256
|
};
|
|
224
|
-
interface PluginInteractionBasis {
|
|
225
|
-
readonly gameVersion: number;
|
|
226
|
-
readonly actionSetVersion: string;
|
|
227
|
-
readonly perspectivePlayerId: PlayerId | null;
|
|
228
|
-
}
|
|
229
|
-
interface ValidateInteractionCommand {
|
|
230
|
-
readonly type: "interaction.validate";
|
|
231
|
-
readonly requestId: string;
|
|
232
|
-
readonly basis: PluginInteractionBasis;
|
|
233
|
-
readonly interactionId: string;
|
|
234
|
-
readonly params: RuntimeJson;
|
|
235
|
-
}
|
|
236
257
|
interface SubmitInteractionCommand {
|
|
237
258
|
readonly type: "interaction.submit";
|
|
238
|
-
readonly
|
|
239
|
-
readonly basis:
|
|
259
|
+
readonly clientActionId: string;
|
|
260
|
+
readonly basis: GameplayBasis;
|
|
240
261
|
readonly interactionId: string;
|
|
241
262
|
readonly params: RuntimeJson;
|
|
242
263
|
}
|
|
@@ -246,15 +267,7 @@ type HostToPluginPayload = {
|
|
|
246
267
|
} | {
|
|
247
268
|
readonly type: "gameplay.frame";
|
|
248
269
|
readonly frame: PluginGameplayFrame;
|
|
249
|
-
} |
|
|
250
|
-
readonly type: "interaction.validation-result";
|
|
251
|
-
readonly requestId: string;
|
|
252
|
-
readonly result: ValidationResult;
|
|
253
|
-
} | {
|
|
254
|
-
readonly type: "interaction.submit-result";
|
|
255
|
-
readonly requestId: string;
|
|
256
|
-
readonly result: SubmissionResult;
|
|
257
|
-
};
|
|
270
|
+
} | InteractionResult;
|
|
258
271
|
type PluginToHostPayload = {
|
|
259
272
|
readonly type: "runtime.ready";
|
|
260
273
|
} | {
|
|
@@ -263,7 +276,7 @@ type PluginToHostPayload = {
|
|
|
263
276
|
readonly sequence: number;
|
|
264
277
|
readonly clientReceivedAtMs?: number;
|
|
265
278
|
readonly clientRenderedAtMs?: number;
|
|
266
|
-
} |
|
|
279
|
+
} | SubmitInteractionCommand | {
|
|
267
280
|
readonly type: "runtime.error";
|
|
268
281
|
readonly message: string;
|
|
269
282
|
readonly code?: string;
|
|
@@ -292,22 +305,16 @@ type PluginProtocolStep = {
|
|
|
292
305
|
readonly id: string;
|
|
293
306
|
readonly kind: "host.frame";
|
|
294
307
|
readonly frameId: string;
|
|
295
|
-
} | {
|
|
296
|
-
readonly id: string;
|
|
297
|
-
readonly kind: "client.validate";
|
|
298
|
-
readonly fromFrameId: string;
|
|
299
|
-
readonly requestDigest: string;
|
|
300
|
-
readonly response: ValidationResult;
|
|
301
308
|
} | {
|
|
302
309
|
readonly id: string;
|
|
303
310
|
readonly kind: "client.submit";
|
|
304
311
|
readonly fromFrameId: string;
|
|
305
312
|
readonly requestDigest: string;
|
|
306
|
-
readonly response:
|
|
313
|
+
readonly response: InteractionResult;
|
|
307
314
|
};
|
|
308
315
|
type ActionSetVersionInput = {
|
|
309
|
-
readonly
|
|
316
|
+
readonly version: number;
|
|
310
317
|
readonly availableInteractions: readonly InteractionDescriptor[];
|
|
311
318
|
};
|
|
312
319
|
|
|
313
|
-
export { type ActionInteractionDescriptor as A, type
|
|
320
|
+
export { type ActionInteractionDescriptor as A, type PluginProtocolTape as B, type CanonicalJson as C, DREAMBOARD_PLUGIN_PROTOCOL as D, type PluginSessionDescriptor as E, type PluginToHostEnvelope as F, type GameEvent as G, type HostToPluginEnvelope as H, type InputDomain as I, type PluginToHostPayload as J, type ProjectedGameEvent as K, type PromptInteractionDescriptor as L, type ReducerSeatProjectionBundle as M, type RuntimeJson as N, type OutcomeResult as O, type PlayerId as P, type SubmitInteractionCommand as Q, type ReducerBoardStaticProjection as R, type SimultaneousPhaseSnapshot as S, type SystemActionEvent as T, canonicalizePluginRuntimeJson as U, digestPluginRuntimeJson as V, encodeCanonicalPluginRuntimeJson as W, type ZoneHandlesSnapshot as Z, type ActionSetVersionInput as a, DREAMBOARD_PLUGIN_PROTOCOL_VERSION as b, type GameEventDetail as c, type GameOutcome as d, type GameplayBasis as e, type HostToPluginPayload as f, type InputDomainDependencies as g, type InputDomainDependencyCase as h, type InputSelection as i, type InteractionAvailability as j, type InteractionChoiceOption as k, type InteractionCommitPolicy as l, type InteractionContext as m, type InteractionContextOption as n, type InteractionDescriptor as o, type InteractionDiagnosticReason as p, type InteractionInputDescriptor as q, type InteractionResult as r, type OutcomeScoreComponent as s, type OutcomeStanding as t, type OutcomeTieBreak as u, type PluginGameplayFrame as v, type PluginPlayerSummary as w, type PluginProtocolEnvelope as x, type PluginProtocolFrame as y, type PluginProtocolStep as z };
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export { A as AnyContinuationToken, a as AnySchema, B as BoardBaseIdOfManifest, b as BoardContainerIdOfManifest, c as BoardContainerIdOfTable, d as BoardIdOfManifest, e as BoardIdOfTable, f as BoardLayoutOfManifest, g as BoardMapOfTable, i as BoardStateOfTable, j as BoardTypeIdOfManifest, k as BoardTypeIdOfTable, l as Brand, C as CardIdOfDeck, m as CardIdOfHand, o as CardIdOfState, p as CardIdOfTable, q as CardTypeOfState, r as CardTypeOfTable, s as ChoiceOption, t as CompatibleCardIdForHandAndDeck, u as CompatibleCardIdForTwoPlayerZones, v as CompatibleHandIdForDeck, w as ComponentDataOfTable, x as ComponentIdOfTable, y as ComponentLocationByTypeOfTable, z as ComponentLocationOfTable, D as ContinuationResponseOf, E as ContinuationToken, F as DeckCardsOfTable, G as DeckIdOfState, H as DeckIdOfTable, J as EdgeTypeIdOfManifest, K as EffectInvokeOptions, L as EffectSpecLike, M as EffectTypeTag, N as ErrorCodeOfContract, O as ExactManifestContractOf, P as FlowState, Q as FrameworkErrorCode, R as FrameworkErrorCodes, S as GameEvent, T as GameEventDetail, U as GameOutcome, W as HandCardsOfTable, X as HandIdOfState, Y as HandIdOfTable, Z as HexBoardIdOfTable, _ as HexBoardStateOfTable, $ as HexEdgeIdOfTable, a0 as HexEdgeStateOfTable, a1 as HexEdgeTypeIdOfTable, a2 as HexSpaceIdOfTable, a3 as HexSpaceTypeIdOfTable, a4 as HexVertexIdOfTable, a5 as HexVertexStateOfTable, a6 as HexVertexTypeIdOfTable, a7 as HiddenSchemaOfContract, a8 as HiddenStateOfState, a9 as InitContext, aa as InitSetupSelectionInput, ab as ManifestContract, ac as ManifestContractOf, ad as ManifestDefaults, ae as
|
|
3
|
-
import { aH as ReducerGameContractLike, au as PhaseMapOf, bc as ViewMapOf, aI as ReducerGameDefinition } from '../views-
|
|
4
|
-
export { A as ActionContext, a as ActorSelection, b as ActorSelector, c as ActorSelectorArgs, d as AnyCardActionSpec, e as AnyContinuationCallable, f as AnyInteractionSpec, g as AnyPhaseDefinitionForContract, h as AnyReducerGameDefinition, i as AutoPhaseDefinition, B as BaseGameSessionOfContract, j as BaseGameStateOfContract, k as BoardInputCollectorKind, l as BoardInputCollectorMeta, m as BoardInteractionKeyOfDefinition, n as BoardTargetDomainDescriptor, o as BoundedNumberDomainDescriptor, C as CardActionMap, p as CardActionSpec, q as CardInputCollectorMeta, r as CardInputZoneIdsOfDefinition, s as CardInteractionKeyOfDefinition, t as CardTargetDomainDescriptor, u as ChoiceDomainDescriptor, v as ChoiceListDomainDescriptor, w as ClientParamsOf, x as ClientParamsOfInteractionOfDefinition, y as CollectorState, z as ContinuationCallable, D as ContinuationInput, E as ContinuationInputForSource, F as ContinuationKind, G as ContinuationReduceArgs, H as ContinuationSourceKind, I as DefaultedClientParamKeysOfInteractionOfDefinition, L as EagerInputDomainDependencies, M as EffectContinuationCallable, N as EffectContinuationInput, O as EffectContinuationResponse, P as EffectDefinition, Q as EffectIdsOfDefinition, R as EffectMap, S as EffectRegistryOfPhase, T as EffectRollDieDefinition, U as EffectShuffleDefinition, V as EffectShufflePlayerZoneDefinition, W as EmptyViewDefinition, X as GameStateOf, Y as InitialStateCallbacks, Z as InputCollector, _ as InputCollectorKind, $ as InputCollectorMetaForKind, a0 as InputDomainDependencyCase, a1 as InputDomainDescriptor, a2 as InputDomainResolverDescriptor, a3 as InputKeysWithCollectorKindOfDefinition, a4 as InputSelectionDescriptor, a5 as InteractionAvailabilityArgs, a6 as InteractionCommitPolicy, a7 as InteractionIdOfDefinition, a8 as InteractionIdOfDefinitionPhase, a9 as InteractionKind, aa as InteractionMap, ab as InteractionReduceArgs, ac as InteractionReduceInput, ad as InteractionRule, ae as InteractionRuleValidationResult, af as InteractionSpec, ag as InteractionSpecByNameOfDefinitionPhase, ah as InteractionToArgs, ai as InteractionValidateArgs, aj as LazyBoardTargetDomainDescriptor, ak as LazyCardTargetDomainDescriptor, al as LazyInputDomainDependencies, am as MutationRuntimeHelpers, ao as ParamsOf, ap as ParamsOfInteractionOfDefinition, aq as PhaseDefinition, ar as PhaseDefinitionByName, as as PhaseEnterArgs, at as PhaseEnterContext, av as PhaseNamesOfDefinition, aw as PhaseStateMapOfDefinitions, ax as PhaseStateOfDefinitions, ay as PhaseZoneList, az as PlayableInteractionsOfZoneOfDefinition, aA as PlayerPhaseDefinition, aB as PlayerViewDefinition, aC as PromptInputCollectorMeta, aD as PromptInteractionKeyOfDefinition, aE as RandomHelpers, aG as ReducerGameContract, aK as ReducerSessionForConfig, aM as ReducerStateForConfig, aO as ResolvedBoardTargetDomainDescriptor, aP as ResolvedCardTargetDomainDescriptor, aQ as ResolvedGameSessionOf, aR as ResolvedGameStateOf, aS as ResourceMapDomainDescriptor, aT as ResumableEffectKind, aU as RngInputCollectorMeta, aV as RollDieContinuationResponse, aX as RuntimeHelpers, aY as ScopedPhaseState, aZ as SharedViewDefinition, a_ as ShufflePlayerZoneContinuationResponse, a$ as ShuffleSharedZoneContinuationResponse, b0 as SimultaneousPlayerPhaseDefinition, b1 as SimultaneousResolveArgs, b2 as SimultaneousSubmission, b3 as SimultaneousSubmitSpec, b4 as StageMap, b5 as StageNamesOfDefinitionPhase, b6 as StageSpec, b7 as StaticViewDefinition, b8 as StaticViewQueries, b9 as TargetKind, ba as ValidationIssue, bb as ViewDefinitionByName, bd as ViewNamesOfDefinition, be as ViewOfDefinition, bf as ViewsOfDefinition, bg as ZoneIdsOfDefinition } from '../views-
|
|
1
|
+
import { bV as RuntimeTableRecord, bI as RuntimeRngState, cb as SetupBootstrapStep, V as GeneratedManifestContractLike, c2 as SetupBootstrapContainerRef, c6 as SetupBootstrapPerPlayerContainerTemplateRef, aF as PlayerIdOfManifest, c3 as SetupBootstrapDestinationRef, n as CardIdOfManifest, aD as PieceIdOfManifest, I as DieIdOfManifest } from '../runtime-C7Z2acNU.js';
|
|
2
|
+
export { A as AnyContinuationToken, a as AnySchema, B as BoardBaseIdOfManifest, b as BoardContainerIdOfManifest, c as BoardContainerIdOfTable, d as BoardIdOfManifest, e as BoardIdOfTable, f as BoardLayoutOfManifest, g as BoardMapOfTable, i as BoardStateOfTable, j as BoardTypeIdOfManifest, k as BoardTypeIdOfTable, l as Brand, C as CardIdOfDeck, m as CardIdOfHand, o as CardIdOfState, p as CardIdOfTable, q as CardTypeOfState, r as CardTypeOfTable, s as ChoiceOption, t as CompatibleCardIdForHandAndDeck, u as CompatibleCardIdForTwoPlayerZones, v as CompatibleHandIdForDeck, w as ComponentDataOfTable, x as ComponentIdOfTable, y as ComponentLocationByTypeOfTable, z as ComponentLocationOfTable, D as ContinuationResponseOf, E as ContinuationToken, F as DeckCardsOfTable, G as DeckIdOfState, H as DeckIdOfTable, J as EdgeTypeIdOfManifest, K as EffectInvokeOptions, L as EffectSpecLike, M as EffectTypeTag, N as ErrorCodeOfContract, O as ExactManifestContractOf, P as FlowState, Q as FrameworkErrorCode, R as FrameworkErrorCodes, S as GameEvent, T as GameEventDetail, U as GameOutcome, W as HandCardsOfTable, X as HandIdOfState, Y as HandIdOfTable, Z as HexBoardIdOfTable, _ as HexBoardStateOfTable, $ as HexEdgeIdOfTable, a0 as HexEdgeStateOfTable, a1 as HexEdgeTypeIdOfTable, a2 as HexSpaceIdOfTable, a3 as HexSpaceTypeIdOfTable, a4 as HexVertexIdOfTable, a5 as HexVertexStateOfTable, a6 as HexVertexTypeIdOfTable, a7 as HiddenSchemaOfContract, a8 as HiddenStateOfState, a9 as InitContext, aa as InitSetupSelectionInput, ab as ManifestContract, ac as ManifestContractOf, ad as ManifestDefaults, ae as ManifestIdFamily, af as ManifestIdSchema, ag as ManifestIds, ah as ManifestLiterals, ai as ManifestNormalSetup, aj as ManifestOf, ak as NonEmptyReadonlyArray, al as OutcomeResult, am as OutcomeScoreComponent, an as OutcomeStanding, ao as OutcomeTieBreak, as as PhaseAccessor, at as PhaseMapOfState, au as PhaseNameOf, av as PhaseNameOfContract, aw as PhaseNameOfManifest, ax as PhaseNameOfState, ay as PhasePayload, az as PhaseSchemasOfContract, aA as PhaseStateMapOfContract, aB as PhaseStateOfState, aC as PhaseStepOfState, aG as PlayerIdOfState, aH as PlayerIdOfTable, aI as PlayerZoneIdOfManifest, aJ as PlayerZoneIdOfState, aK as PlayerZoneIdOfTable, aL as PrivateSchemaOfContract, aM as PrivateStateOfState, aN as PublicSchemaOfContract, aO as PublicStateOfState, aP as ReducerAccept, aQ as ReducerAcceptOptions, aR as ReducerFx, aS as ReducerGameState, aT as ReducerManifestContract, aU as ReducerReject, aV as ReducerResult, aW as ReducerRuntimeStateForState, aX as ReducerSessionState, aY as ReducerValidationResult, aZ as RelationTypeIdOfManifest, a_ as RelationTypeIdOfTable, a$ as ResolvedContainerLocation, b0 as ResolvedDeckLocation, b1 as ResolvedEdgeLocation, b2 as ResolvedHandLocation, b3 as ResolvedSlotLocation, b4 as ResolvedSpaceLocation, b5 as ResolvedVertexLocation, b6 as ResolvedZoneLocation, b7 as ResourceAmountsOfTable, b8 as ResourceBalancesOfState, b9 as ResourceBalancesOfTable, ba as ResourceIdOfManifest, bb as ResourceIdOfState, bc as ResourceIdOfTable, bd as RuntimeBoardBaseState, be as RuntimeBoardCollections, bf as RuntimeBoardCompatibilityState, bg as RuntimeBoardContainerState, bh as RuntimeBoardRelationState, bi as RuntimeBoardSpaceState, bj as RuntimeBoardState, bk as RuntimeCardData, bl as RuntimeCardVisibility, bm as RuntimeComponentLocation, bn as RuntimeComponentLocationMap, bo as RuntimeDeckMap, bp as RuntimeDieData, bq as RuntimeGenericBoardState, br as RuntimeHandMap, bs as RuntimeHandVisibilityMode, bt as RuntimeHexBoardState, bu as RuntimeHexEdgeState, bv as RuntimeHexOrientation, bw as RuntimeHexSpaceState, bx as RuntimeHexVertexState, by as RuntimeOwnerMap, bz as RuntimeParams, bA as RuntimePayload, bB as RuntimePhaseState, bC as RuntimePieceData, bD as RuntimeRecord, bE as RuntimeResourceMap, bF as RuntimeRngDraw, bG as RuntimeRngOperation, bH as RuntimeRngOperationParameter, bJ as RuntimeScalar, bK as RuntimeSetupSelection, bL as RuntimeSetupSelectionInput, bM as RuntimeSetupSelectionOverride, bN as RuntimeSimultaneousState, bO as RuntimeSimultaneousSubmission, bP as RuntimeSlotHostRef, bQ as RuntimeSquareBoardState, bR as RuntimeSquareEdgeState, bS as RuntimeSquareSpaceState, bT as RuntimeSquareVertexState, bU as RuntimeState, bW as RuntimeTiledBoardBaseState, bX as RuntimeTiledBoardState, bY as RuntimeTiledEdgeState, bZ as RuntimeTiledSpaceState, b_ as RuntimeTiledVertexState, b$ as RuntimeVisibilityMap, c0 as RuntimeZoneMap, c1 as SchemaLike, c4 as SetupBootstrapPerPlayerBoardContainerRef, c5 as SetupBootstrapPerPlayerBoardSpaceRef, c7 as SetupBootstrapPerPlayerZoneRef, c8 as SetupBootstrapSharedBoardContainerRef, c9 as SetupBootstrapSharedBoardSpaceRef, ca as SetupBootstrapSharedZoneRef, cc as SetupOptionChoiceMetadata, cd as SetupOptionIdOfManifest, ce as SetupOptionMetadata, cf as SetupProfileDefinition, cg as SetupProfileIdOfManifest, ch as SetupProfileMetadata, ci as SetupSelectionInputOfManifest, cj as SetupSelectionOfManifest, cl as SharedZoneIdOfManifest, cm as SharedZoneIdOfState, cn as SharedZoneIdOfTable, co as SpaceIdOfManifest, cp as SpaceIdOfTable, cq as SpaceTypeIdOfManifest, cr as SpaceTypeIdOfTable, cs as SquareBoardIdOfTable, ct as SquareBoardStateOfTable, cu as SquareEdgeIdOfTable, cv as SquareEdgeStateOfTable, cw as SquareEdgeTypeIdOfTable, cx as SquareSpaceIdOfTable, cy as SquareSpaceTypeIdOfTable, cz as SquareVertexIdOfTable, cA as SquareVertexStateOfTable, cB as SquareVertexTypeIdOfTable, cC as StateDefinition, cD as StateDefinitionOfContract, cE as StaticBoards, cF as StaticBoardsJsonEnvelope, cG as StringKeyOf, cH as SystemActionEvent, cI as TableOfManifest, cJ as TableOfState, cK as TableQueries, cL as TableQueriesOfState, cM as TiledBoardIdOfTable, cN as TiledBoardStateOfTable, cO as TiledEdgeIdOfTable, cP as TiledEdgeMap, cQ as TiledEdgeStateOfTable, cR as TiledEdgeTypeIdOfTable, cS as TiledSpaceIdOfTable, cT as TiledSpaceMap, cU as TiledVertexIdOfTable, cV as TiledVertexMap, cW as TiledVertexStateOfTable, cX as TiledVertexTypeIdOfTable, cY as VertexTypeIdOfManifest, c_ as assumeManifestSchema, d2 as cloneManifestDefault, d3 as createManifestGameStateSchema, d4 as createManifestRuntimeSchema, d5 as createManifestStringLiteralSchema, d6 as isManifestScopedSchema, db as manifestSchemaFamily, dc as markManifestScopedSchema, dr as resolveManifestPlayerIds } from '../runtime-C7Z2acNU.js';
|
|
3
|
+
import { aH as ReducerGameContractLike, au as PhaseMapOf, bc as ViewMapOf, aI as ReducerGameDefinition } from '../views-D2Cfzr3h.js';
|
|
4
|
+
export { A as ActionContext, a as ActorSelection, b as ActorSelector, c as ActorSelectorArgs, d as AnyCardActionSpec, e as AnyContinuationCallable, f as AnyInteractionSpec, g as AnyPhaseDefinitionForContract, h as AnyReducerGameDefinition, i as AutoPhaseDefinition, B as BaseGameSessionOfContract, j as BaseGameStateOfContract, k as BoardInputCollectorKind, l as BoardInputCollectorMeta, m as BoardInteractionKeyOfDefinition, n as BoardTargetDomainDescriptor, o as BoundedNumberDomainDescriptor, C as CardActionMap, p as CardActionSpec, q as CardInputCollectorMeta, r as CardInputZoneIdsOfDefinition, s as CardInteractionKeyOfDefinition, t as CardTargetDomainDescriptor, u as ChoiceDomainDescriptor, v as ChoiceListDomainDescriptor, w as ClientParamsOf, x as ClientParamsOfInteractionOfDefinition, y as CollectorState, z as ContinuationCallable, D as ContinuationInput, E as ContinuationInputForSource, F as ContinuationKind, G as ContinuationReduceArgs, H as ContinuationSourceKind, I as DefaultedClientParamKeysOfInteractionOfDefinition, L as EagerInputDomainDependencies, M as EffectContinuationCallable, N as EffectContinuationInput, O as EffectContinuationResponse, P as EffectDefinition, Q as EffectIdsOfDefinition, R as EffectMap, S as EffectRegistryOfPhase, T as EffectRollDieDefinition, U as EffectShuffleDefinition, V as EffectShufflePlayerZoneDefinition, W as EmptyViewDefinition, X as GameStateOf, Y as InitialStateCallbacks, Z as InputCollector, _ as InputCollectorKind, $ as InputCollectorMetaForKind, a0 as InputDomainDependencyCase, a1 as InputDomainDescriptor, a2 as InputDomainResolverDescriptor, a3 as InputKeysWithCollectorKindOfDefinition, a4 as InputSelectionDescriptor, a5 as InteractionAvailabilityArgs, a6 as InteractionCommitPolicy, a7 as InteractionIdOfDefinition, a8 as InteractionIdOfDefinitionPhase, a9 as InteractionKind, aa as InteractionMap, ab as InteractionReduceArgs, ac as InteractionReduceInput, ad as InteractionRule, ae as InteractionRuleValidationResult, af as InteractionSpec, ag as InteractionSpecByNameOfDefinitionPhase, ah as InteractionToArgs, ai as InteractionValidateArgs, aj as LazyBoardTargetDomainDescriptor, ak as LazyCardTargetDomainDescriptor, al as LazyInputDomainDependencies, am as MutationRuntimeHelpers, ao as ParamsOf, ap as ParamsOfInteractionOfDefinition, aq as PhaseDefinition, ar as PhaseDefinitionByName, as as PhaseEnterArgs, at as PhaseEnterContext, av as PhaseNamesOfDefinition, aw as PhaseStateMapOfDefinitions, ax as PhaseStateOfDefinitions, ay as PhaseZoneList, az as PlayableInteractionsOfZoneOfDefinition, aA as PlayerPhaseDefinition, aB as PlayerViewDefinition, aC as PromptInputCollectorMeta, aD as PromptInteractionKeyOfDefinition, aE as RandomHelpers, aG as ReducerGameContract, aK as ReducerSessionForConfig, aM as ReducerStateForConfig, aO as ResolvedBoardTargetDomainDescriptor, aP as ResolvedCardTargetDomainDescriptor, aQ as ResolvedGameSessionOf, aR as ResolvedGameStateOf, aS as ResourceMapDomainDescriptor, aT as ResumableEffectKind, aU as RngInputCollectorMeta, aV as RollDieContinuationResponse, aX as RuntimeHelpers, aY as ScopedPhaseState, aZ as SharedViewDefinition, a_ as ShufflePlayerZoneContinuationResponse, a$ as ShuffleSharedZoneContinuationResponse, b0 as SimultaneousPlayerPhaseDefinition, b1 as SimultaneousResolveArgs, b2 as SimultaneousSubmission, b3 as SimultaneousSubmitSpec, b4 as StageMap, b5 as StageNamesOfDefinitionPhase, b6 as StageSpec, b7 as StaticViewDefinition, b8 as StaticViewQueries, b9 as TargetKind, ba as ValidationIssue, bb as ViewDefinitionByName, bd as ViewNamesOfDefinition, be as ViewOfDefinition, bf as ViewsOfDefinition, bg as ZoneIdsOfDefinition } from '../views-D2Cfzr3h.js';
|
|
5
5
|
import 'zod';
|
|
6
6
|
import '../types.js';
|
|
7
|
+
import './protocol-CVaSqPgX.js';
|
|
7
8
|
|
|
8
9
|
type ClientParamSchema = {
|
|
9
10
|
safeParse: (value: unknown) => {
|
package/dist/reducer/advanced.js
CHANGED
|
@@ -1,123 +1,28 @@
|
|
|
1
|
+
import {
|
|
2
|
+
dealToPlayerBoardContainer,
|
|
3
|
+
dealToPlayerZone,
|
|
4
|
+
seedSharedBoardContainer,
|
|
5
|
+
seedSharedBoardSpace,
|
|
6
|
+
shuffle
|
|
7
|
+
} from "../chunk-VWTKGIYF.js";
|
|
8
|
+
import {
|
|
9
|
+
createClientParamSchemasByPhase
|
|
10
|
+
} from "../chunk-TXELBVTG.js";
|
|
1
11
|
import {
|
|
2
12
|
FrameworkErrorCodes,
|
|
3
13
|
applySetupBootstrap,
|
|
4
14
|
assumeManifestSchema,
|
|
5
15
|
cloneManifestDefault,
|
|
6
|
-
collectReducerDefinitionIndex,
|
|
7
16
|
createManifestGameStateSchema,
|
|
8
17
|
createManifestRuntimeSchema,
|
|
9
18
|
createManifestStringLiteralSchema,
|
|
10
19
|
isManifestScopedSchema,
|
|
20
|
+
manifestSchemaFamily,
|
|
11
21
|
markManifestScopedSchema,
|
|
12
22
|
resolveManifestPlayerIds
|
|
13
|
-
} from "../chunk-
|
|
23
|
+
} from "../chunk-FL67RDID.js";
|
|
24
|
+
import "../chunk-2GQIALJL.js";
|
|
14
25
|
import "../chunk-PZ5AY32C.js";
|
|
15
|
-
|
|
16
|
-
// src/reducer/client-param-schemas.ts
|
|
17
|
-
import { z } from "zod";
|
|
18
|
-
function schemaForCollectors(collectors) {
|
|
19
|
-
const shape = {};
|
|
20
|
-
for (const [key, collector] of Object.entries(collectors)) {
|
|
21
|
-
if (collector.kind === "rng") continue;
|
|
22
|
-
const schema = collector.schema;
|
|
23
|
-
shape[key] = "defaultValue" in collector ? schema.default(collector.defaultValue) : schema;
|
|
24
|
-
}
|
|
25
|
-
return z.object(shape);
|
|
26
|
-
}
|
|
27
|
-
function createClientParamSchemasByPhase(definition) {
|
|
28
|
-
const index = collectReducerDefinitionIndex(definition);
|
|
29
|
-
const out = {};
|
|
30
|
-
for (const phaseIndex of index.phasesByName.values()) {
|
|
31
|
-
const phaseSchemas = {};
|
|
32
|
-
for (const [id, interaction] of phaseIndex.interactions) {
|
|
33
|
-
phaseSchemas[id] = interaction.paramsSchema ?? schemaForCollectors(interaction.inputs);
|
|
34
|
-
}
|
|
35
|
-
out[String(phaseIndex.phaseName)] = phaseSchemas;
|
|
36
|
-
}
|
|
37
|
-
return out;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
// src/reducer/setup-bootstrap-helpers.ts
|
|
41
|
-
function shuffle(container) {
|
|
42
|
-
return {
|
|
43
|
-
type: "shuffle",
|
|
44
|
-
container
|
|
45
|
-
};
|
|
46
|
-
}
|
|
47
|
-
function dealToPlayerZone({
|
|
48
|
-
from,
|
|
49
|
-
zoneId,
|
|
50
|
-
count,
|
|
51
|
-
playerIds
|
|
52
|
-
}) {
|
|
53
|
-
return {
|
|
54
|
-
type: "deal",
|
|
55
|
-
from,
|
|
56
|
-
to: {
|
|
57
|
-
type: "playerZone",
|
|
58
|
-
zoneId
|
|
59
|
-
},
|
|
60
|
-
count,
|
|
61
|
-
playerIds
|
|
62
|
-
};
|
|
63
|
-
}
|
|
64
|
-
function dealToPlayerBoardContainer({
|
|
65
|
-
from,
|
|
66
|
-
boardId,
|
|
67
|
-
containerId,
|
|
68
|
-
count,
|
|
69
|
-
playerIds
|
|
70
|
-
}) {
|
|
71
|
-
return {
|
|
72
|
-
type: "deal",
|
|
73
|
-
from,
|
|
74
|
-
to: {
|
|
75
|
-
type: "playerBoardContainer",
|
|
76
|
-
boardId,
|
|
77
|
-
containerId
|
|
78
|
-
},
|
|
79
|
-
count,
|
|
80
|
-
playerIds
|
|
81
|
-
};
|
|
82
|
-
}
|
|
83
|
-
function seedSharedBoardContainer({
|
|
84
|
-
from,
|
|
85
|
-
boardId,
|
|
86
|
-
containerId,
|
|
87
|
-
count,
|
|
88
|
-
componentIds
|
|
89
|
-
}) {
|
|
90
|
-
return {
|
|
91
|
-
type: "move",
|
|
92
|
-
from,
|
|
93
|
-
to: {
|
|
94
|
-
type: "sharedBoardContainer",
|
|
95
|
-
boardId,
|
|
96
|
-
containerId
|
|
97
|
-
},
|
|
98
|
-
count,
|
|
99
|
-
componentIds
|
|
100
|
-
};
|
|
101
|
-
}
|
|
102
|
-
function seedSharedBoardSpace({
|
|
103
|
-
from,
|
|
104
|
-
boardId,
|
|
105
|
-
spaceId,
|
|
106
|
-
count,
|
|
107
|
-
componentIds
|
|
108
|
-
}) {
|
|
109
|
-
return {
|
|
110
|
-
type: "move",
|
|
111
|
-
from,
|
|
112
|
-
to: {
|
|
113
|
-
type: "sharedBoardSpace",
|
|
114
|
-
boardId,
|
|
115
|
-
spaceId
|
|
116
|
-
},
|
|
117
|
-
count,
|
|
118
|
-
componentIds
|
|
119
|
-
};
|
|
120
|
-
}
|
|
121
26
|
export {
|
|
122
27
|
FrameworkErrorCodes,
|
|
123
28
|
applySetupBootstrap,
|
|
@@ -130,6 +35,7 @@ export {
|
|
|
130
35
|
dealToPlayerBoardContainer,
|
|
131
36
|
dealToPlayerZone,
|
|
132
37
|
isManifestScopedSchema,
|
|
38
|
+
manifestSchemaFamily,
|
|
133
39
|
markManifestScopedSchema,
|
|
134
40
|
resolveManifestPlayerIds,
|
|
135
41
|
seedSharedBoardContainer,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":[
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { M as MaybePromise, R as REDUCER_CONTRACT_VERSION, a as ReducerBundleContract, w as ReducerWire, z as ReducerWireZod } from './index.d-
|
|
1
|
+
export { M as MaybePromise, R as REDUCER_CONTRACT_VERSION, a as ReducerBundleContract, w as ReducerWire, z as ReducerWireZod, b as assertReducerBundleContract } from './index.d-Bw8AOcgp.js';
|
|
2
2
|
export { materializeManifestTable } from './codegen.js';
|
|
3
3
|
import 'zod';
|
package/dist/reducer-contract.js
CHANGED
|
@@ -1,14 +1,16 @@
|
|
|
1
|
-
import {
|
|
2
|
-
materializeManifestTable
|
|
3
|
-
} from "./chunk-2TAKLJJD.js";
|
|
4
1
|
import {
|
|
5
2
|
REDUCER_CONTRACT_VERSION,
|
|
3
|
+
assertReducerBundleContract,
|
|
6
4
|
zod_exports
|
|
7
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-2GQIALJL.js";
|
|
6
|
+
import {
|
|
7
|
+
materializeManifestTable
|
|
8
|
+
} from "./chunk-HIH6Y4FA.js";
|
|
8
9
|
import "./chunk-PZ5AY32C.js";
|
|
9
10
|
export {
|
|
10
11
|
REDUCER_CONTRACT_VERSION,
|
|
11
12
|
zod_exports as ReducerWireZod,
|
|
13
|
+
assertReducerBundleContract,
|
|
12
14
|
materializeManifestTable
|
|
13
15
|
};
|
|
14
16
|
//# sourceMappingURL=reducer-contract.js.map
|