@dreamboard-games/sdk 0.5.0-alpha.2 → 0.5.0-alpha.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +136 -45
- package/dist/chunk-DMFVAZI2.js +16 -0
- package/dist/chunk-DMFVAZI2.js.map +1 -0
- package/dist/chunk-FMM5LVJW.js +833 -0
- package/dist/chunk-FMM5LVJW.js.map +1 -0
- package/dist/{chunk-S2JEDVWH.js → chunk-LRILEVKC.js} +6113 -6489
- package/dist/chunk-LRILEVKC.js.map +1 -0
- package/dist/chunk-SP234IY4.js +1363 -0
- package/dist/chunk-SP234IY4.js.map +1 -0
- package/dist/chunk-VUWNJXLJ.js +52 -0
- package/dist/chunk-VUWNJXLJ.js.map +1 -0
- package/dist/chunk-ZPRKWPEP.js +511 -0
- package/dist/chunk-ZPRKWPEP.js.map +1 -0
- package/dist/definition-BaHNPZol.d.ts +4639 -0
- package/dist/diagnostics-B0lgnuZ6.d.ts +65 -0
- package/dist/index.d.ts +3553 -1
- package/dist/index.js +1045 -6
- package/dist/index.js.map +1 -1
- package/dist/model-BHro6yXu.d.ts +288 -0
- package/dist/react.d.ts +32 -0
- package/dist/react.js +80 -0
- package/dist/react.js.map +1 -0
- package/dist/reducer.d.ts +1194 -79
- package/dist/reducer.js +4326 -121
- package/dist/reducer.js.map +1 -1
- package/dist/testing.d.ts +518 -564
- package/dist/testing.js +2448 -915
- package/dist/testing.js.map +1 -1
- package/dist/types-DimqnJBq.d.ts +86 -0
- package/package.json +26 -131
- package/dist/HandView-Bi2lxzQP.d.ts +0 -79
- package/dist/ResourceCounter-BFxJknqp.d.ts +0 -98
- package/dist/ThemeProvider-CElaL2ik.d.ts +0 -99
- package/dist/attributes-DbvyMbXw.d.ts +0 -68
- package/dist/browser-interaction.d.ts +0 -910
- package/dist/browser-interaction.js +0 -119
- package/dist/browser-interaction.js.map +0 -1
- package/dist/chunk-32PFKDV7.js +0 -11705
- package/dist/chunk-32PFKDV7.js.map +0 -1
- package/dist/chunk-3BAD4VC2.js +0 -263
- package/dist/chunk-3BAD4VC2.js.map +0 -1
- package/dist/chunk-3SKDNDPG.js +0 -104
- package/dist/chunk-3SKDNDPG.js.map +0 -1
- package/dist/chunk-5YV2WHJ4.js +0 -25
- package/dist/chunk-5YV2WHJ4.js.map +0 -1
- package/dist/chunk-ANRB4XKA.js +0 -90
- package/dist/chunk-ANRB4XKA.js.map +0 -1
- package/dist/chunk-BI4G3PM2.js +0 -1864
- package/dist/chunk-BI4G3PM2.js.map +0 -1
- package/dist/chunk-EVCLTY4Q.js +0 -935
- package/dist/chunk-EVCLTY4Q.js.map +0 -1
- package/dist/chunk-GDPKTBUR.js +0 -564
- package/dist/chunk-GDPKTBUR.js.map +0 -1
- package/dist/chunk-H6VDGFL5.js +0 -2903
- package/dist/chunk-H6VDGFL5.js.map +0 -1
- package/dist/chunk-LR3ZTWQF.js +0 -5960
- package/dist/chunk-LR3ZTWQF.js.map +0 -1
- package/dist/chunk-PF7L4BMG.js +0 -117
- package/dist/chunk-PF7L4BMG.js.map +0 -1
- package/dist/chunk-PN5O6GG2.js +0 -32
- package/dist/chunk-PN5O6GG2.js.map +0 -1
- package/dist/chunk-PZ5AY32C.js +0 -10
- package/dist/chunk-PZ5AY32C.js.map +0 -1
- package/dist/chunk-S2JEDVWH.js.map +0 -1
- package/dist/chunk-T3ZKNUZ7.js +0 -1
- package/dist/chunk-T3ZKNUZ7.js.map +0 -1
- package/dist/chunk-UGH54WZ2.js +0 -223
- package/dist/chunk-UGH54WZ2.js.map +0 -1
- package/dist/chunk-VCDWP5VL.js +0 -746
- package/dist/chunk-VCDWP5VL.js.map +0 -1
- package/dist/chunk-VDXOF4FW.js +0 -69
- package/dist/chunk-VDXOF4FW.js.map +0 -1
- package/dist/chunk-WHR5UW3F.js +0 -1988
- package/dist/chunk-WHR5UW3F.js.map +0 -1
- package/dist/chunk-Y75CFE77.js +0 -17
- package/dist/chunk-Y75CFE77.js.map +0 -1
- package/dist/chunk-Z7QCREWI.js +0 -3435
- package/dist/chunk-Z7QCREWI.js.map +0 -1
- package/dist/chunk-ZZGN2ATS.js +0 -1941
- package/dist/chunk-ZZGN2ATS.js.map +0 -1
- package/dist/components-gAbIz7hK.d.ts +0 -1284
- package/dist/definitions-BgmV_GhC.d.ts +0 -300
- package/dist/diagnostics-DIi3ina7.d.ts +0 -50
- package/dist/digest.d.ts +0 -8
- package/dist/game-CsZScpcn.d.ts +0 -763
- package/dist/hex-board-view-aKkblDp6.d.ts +0 -1228
- package/dist/index-CcT9Q7N7.d.ts +0 -193
- package/dist/index.d-DjzoK7zn.d.ts +0 -2101
- package/dist/package-set.d.ts +0 -13
- package/dist/package-set.js +0 -12
- package/dist/package-set.js.map +0 -1
- package/dist/player-state-Cqpyeql0.d.ts +0 -371
- package/dist/plugin-runtime-contract.d.ts +0 -17
- package/dist/plugin-runtime-contract.js +0 -92
- package/dist/plugin-runtime-contract.js.map +0 -1
- package/dist/primitive-props-BNHDkgd7.d.ts +0 -16
- package/dist/protocol-dYgafTYY.d.ts +0 -314
- package/dist/reducer/advanced.d.ts +0 -82
- package/dist/reducer/advanced.js +0 -51
- package/dist/reducer/advanced.js.map +0 -1
- package/dist/reducer-contract.d.ts +0 -11
- package/dist/reducer-contract.js +0 -16
- package/dist/reducer-contract.js.map +0 -1
- package/dist/reference-games/index.d.ts +0 -31
- package/dist/reference-games/index.js +0 -48
- package/dist/reference-games/index.js.map +0 -1
- package/dist/runtime/primitives.d.ts +0 -250
- package/dist/runtime/primitives.js +0 -189
- package/dist/runtime/primitives.js.map +0 -1
- package/dist/runtime/runtime-api.d.ts +0 -2
- package/dist/runtime/runtime-api.js +0 -1
- package/dist/runtime/runtime-api.js.map +0 -1
- package/dist/runtime/workspace-contract.d.ts +0 -392
- package/dist/runtime/workspace-contract.js +0 -28
- package/dist/runtime/workspace-contract.js.map +0 -1
- package/dist/runtime-RJ5orDJU.d.ts +0 -1699
- package/dist/runtime-api-Bz5pwNU_.d.ts +0 -296
- package/dist/runtime-json-CQ9QbLZ5.d.ts +0 -5
- package/dist/runtime.d.ts +0 -83
- package/dist/runtime.js +0 -242
- package/dist/runtime.js.map +0 -1
- package/dist/schema.d.ts +0 -379
- package/dist/stale-contract-artifact-error-XLaweZtF.d.ts +0 -18
- package/dist/testing-compiler.d.ts +0 -37
- package/dist/testing-compiler.js +0 -272
- package/dist/testing-compiler.js.map +0 -1
- package/dist/testing-runtime.d.ts +0 -119
- package/dist/testing-runtime.js +0 -212
- package/dist/testing-runtime.js.map +0 -1
- package/dist/types-DJj5MJkl.d.ts +0 -256
- package/dist/types-DR7DoB1x.d.ts +0 -28
- package/dist/types-JWCYHmu7.d.ts +0 -122
- package/dist/types.d.ts +0 -1958
- package/dist/types.js +0 -14
- package/dist/types.js.map +0 -1
- package/dist/ui/components.d.ts +0 -17
- package/dist/ui/components.js +0 -216
- package/dist/ui/components.js.map +0 -1
- package/dist/ui/defaults.d.ts +0 -19
- package/dist/ui/defaults.js +0 -104
- package/dist/ui/defaults.js.map +0 -1
- package/dist/ui/player-state.d.ts +0 -2
- package/dist/ui/player-state.js +0 -1
- package/dist/ui/player-state.js.map +0 -1
- package/dist/ui/plugin-styles.css +0 -2
- package/dist/ui-contract-GTUPkf8z.d.ts +0 -1168
- package/dist/ui.d.ts +0 -317
- package/dist/ui.js +0 -277
- package/dist/ui.js.map +0 -1
- package/dist/views-BpuWcOyN.d.ts +0 -1641
|
@@ -1,314 +0,0 @@
|
|
|
1
|
-
type RuntimeJson = null | boolean | number | string | RuntimeJson[] | {
|
|
2
|
-
[key: string]: RuntimeJson;
|
|
3
|
-
};
|
|
4
|
-
type CanonicalJson = null | boolean | number | string | CanonicalJson[] | {
|
|
5
|
-
[key: string]: CanonicalJson;
|
|
6
|
-
};
|
|
7
|
-
declare function canonicalizePluginRuntimeJson(value: unknown): CanonicalJson;
|
|
8
|
-
declare function encodeCanonicalPluginRuntimeJson(value: unknown): string;
|
|
9
|
-
declare function digestPluginRuntimeJson(value: unknown): string;
|
|
10
|
-
|
|
11
|
-
type PlayerId = string;
|
|
12
|
-
interface GameplayBasis {
|
|
13
|
-
readonly version: number;
|
|
14
|
-
readonly actionSetVersion: string;
|
|
15
|
-
readonly perspectivePlayerId: PlayerId;
|
|
16
|
-
}
|
|
17
|
-
interface PluginPlayerSummary {
|
|
18
|
-
readonly playerId: PlayerId;
|
|
19
|
-
readonly displayName: string;
|
|
20
|
-
readonly color?: string;
|
|
21
|
-
}
|
|
22
|
-
interface PluginSessionDescriptor {
|
|
23
|
-
readonly sessionId: string;
|
|
24
|
-
/** Turn order is the order of this array. */
|
|
25
|
-
readonly players: readonly PluginPlayerSummary[];
|
|
26
|
-
}
|
|
27
|
-
interface InteractionCommitPolicy {
|
|
28
|
-
readonly mode: "manual" | "autoWhenReady";
|
|
29
|
-
}
|
|
30
|
-
type InputSelection = {
|
|
31
|
-
readonly mode: "single";
|
|
32
|
-
} | {
|
|
33
|
-
readonly mode: "many";
|
|
34
|
-
readonly min: number;
|
|
35
|
-
readonly max?: number;
|
|
36
|
-
readonly distinct?: boolean;
|
|
37
|
-
};
|
|
38
|
-
interface InputDomainDependencyCase {
|
|
39
|
-
readonly when: Readonly<Record<string, string>>;
|
|
40
|
-
readonly domain: InputDomain;
|
|
41
|
-
}
|
|
42
|
-
type InputDomainDependencies = {
|
|
43
|
-
readonly mode: "eager";
|
|
44
|
-
readonly dependentCases: readonly InputDomainDependencyCase[];
|
|
45
|
-
} | {
|
|
46
|
-
readonly mode: "lazy";
|
|
47
|
-
readonly dependsOn: readonly string[];
|
|
48
|
-
readonly resolver: {
|
|
49
|
-
readonly interactionKey?: string;
|
|
50
|
-
readonly inputKey: string;
|
|
51
|
-
};
|
|
52
|
-
};
|
|
53
|
-
interface InputDomain {
|
|
54
|
-
readonly type: string;
|
|
55
|
-
readonly selection?: InputSelection;
|
|
56
|
-
readonly dependencies?: InputDomainDependencies;
|
|
57
|
-
readonly [key: string]: RuntimeJson | InputSelection | InputDomainDependencies | undefined;
|
|
58
|
-
}
|
|
59
|
-
interface InteractionChoiceOption {
|
|
60
|
-
readonly value: string | null;
|
|
61
|
-
readonly label: string;
|
|
62
|
-
readonly icon?: string;
|
|
63
|
-
readonly badge?: string;
|
|
64
|
-
readonly description?: string;
|
|
65
|
-
readonly disabled?: boolean;
|
|
66
|
-
readonly disabledReason?: string;
|
|
67
|
-
}
|
|
68
|
-
interface InteractionInputDescriptor {
|
|
69
|
-
readonly key: string;
|
|
70
|
-
readonly kind: string;
|
|
71
|
-
readonly domain: InputDomain;
|
|
72
|
-
readonly defaultValue?: RuntimeJson;
|
|
73
|
-
}
|
|
74
|
-
type InteractionAvailability = {
|
|
75
|
-
readonly status: "available";
|
|
76
|
-
} | {
|
|
77
|
-
readonly status: "notYourTurn";
|
|
78
|
-
readonly reason: string;
|
|
79
|
-
} | {
|
|
80
|
-
readonly status: "insufficientResources";
|
|
81
|
-
readonly reason: string;
|
|
82
|
-
readonly missingResources: Readonly<Record<string, number>>;
|
|
83
|
-
} | {
|
|
84
|
-
readonly status: "blocked";
|
|
85
|
-
readonly reason: string;
|
|
86
|
-
readonly code?: string;
|
|
87
|
-
};
|
|
88
|
-
interface InteractionDiagnosticReason {
|
|
89
|
-
readonly ruleId: string;
|
|
90
|
-
readonly errorCode: string;
|
|
91
|
-
}
|
|
92
|
-
interface SetupGuidanceStep {
|
|
93
|
-
readonly id: string;
|
|
94
|
-
readonly label: string;
|
|
95
|
-
readonly description?: string;
|
|
96
|
-
}
|
|
97
|
-
interface GameGuidanceProjection {
|
|
98
|
-
readonly phase: {
|
|
99
|
-
readonly id: string;
|
|
100
|
-
readonly label: string;
|
|
101
|
-
readonly summary?: string;
|
|
102
|
-
readonly objective?: string;
|
|
103
|
-
};
|
|
104
|
-
readonly setup?: {
|
|
105
|
-
readonly profileId: string;
|
|
106
|
-
readonly name: string;
|
|
107
|
-
readonly summary?: string;
|
|
108
|
-
readonly steps: readonly SetupGuidanceStep[];
|
|
109
|
-
};
|
|
110
|
-
}
|
|
111
|
-
interface InteractionDescriptorBase<Interaction extends string = string> {
|
|
112
|
-
readonly phaseName: string;
|
|
113
|
-
readonly interactionKey: Interaction;
|
|
114
|
-
readonly interactionId: string;
|
|
115
|
-
readonly label: string;
|
|
116
|
-
readonly help?: string;
|
|
117
|
-
readonly zoneId?: string;
|
|
118
|
-
readonly zoneIds?: readonly string[];
|
|
119
|
-
readonly commit: InteractionCommitPolicy;
|
|
120
|
-
readonly descriptorDigest?: string;
|
|
121
|
-
readonly actorSeat?: number;
|
|
122
|
-
readonly draftDigest?: string;
|
|
123
|
-
readonly inputs: readonly InteractionInputDescriptor[];
|
|
124
|
-
readonly cost?: Readonly<Record<string, RuntimeJson>>;
|
|
125
|
-
readonly currentResources?: Readonly<Record<string, RuntimeJson>>;
|
|
126
|
-
readonly availability: InteractionAvailability;
|
|
127
|
-
readonly reasons?: readonly InteractionDiagnosticReason[];
|
|
128
|
-
}
|
|
129
|
-
type ActionInteractionDescriptor<Interaction extends string = string> = InteractionDescriptorBase<Interaction> & {
|
|
130
|
-
readonly kind: "action";
|
|
131
|
-
};
|
|
132
|
-
interface InteractionContextOption {
|
|
133
|
-
readonly id: string;
|
|
134
|
-
readonly label?: string;
|
|
135
|
-
}
|
|
136
|
-
interface InteractionContext {
|
|
137
|
-
readonly to: string;
|
|
138
|
-
readonly title?: string;
|
|
139
|
-
readonly payload?: Readonly<Record<string, RuntimeJson>>;
|
|
140
|
-
readonly options?: readonly InteractionContextOption[];
|
|
141
|
-
}
|
|
142
|
-
type PromptInteractionDescriptor<Interaction extends string = string> = InteractionDescriptorBase<Interaction> & {
|
|
143
|
-
readonly kind: "prompt";
|
|
144
|
-
readonly context: InteractionContext;
|
|
145
|
-
};
|
|
146
|
-
type InteractionDescriptor<Interaction extends string = string> = ActionInteractionDescriptor<Interaction> | PromptInteractionDescriptor<Interaction>;
|
|
147
|
-
interface ZoneHandlesSnapshot<Interaction extends string = string> {
|
|
148
|
-
readonly cardIds: readonly string[];
|
|
149
|
-
readonly cardViewsById: Readonly<Record<string, string>>;
|
|
150
|
-
readonly playableByCardId: Readonly<Record<string, readonly InteractionDescriptor<Interaction>[]>>;
|
|
151
|
-
}
|
|
152
|
-
interface SimultaneousPhaseSnapshot {
|
|
153
|
-
readonly phaseName: string;
|
|
154
|
-
readonly interactionId: string;
|
|
155
|
-
readonly actorIds: readonly PlayerId[];
|
|
156
|
-
readonly sealedPlayerIds: readonly PlayerId[];
|
|
157
|
-
readonly pendingPlayerIds: readonly PlayerId[];
|
|
158
|
-
}
|
|
159
|
-
interface GameEventDetail {
|
|
160
|
-
readonly label: string;
|
|
161
|
-
readonly value: string | number | boolean;
|
|
162
|
-
}
|
|
163
|
-
interface SystemActionEvent {
|
|
164
|
-
readonly kind: "systemAction";
|
|
165
|
-
readonly procedureId: string;
|
|
166
|
-
readonly title: string;
|
|
167
|
-
readonly summary?: string;
|
|
168
|
-
readonly details?: readonly GameEventDetail[];
|
|
169
|
-
}
|
|
170
|
-
type GameEvent = SystemActionEvent;
|
|
171
|
-
type OutcomeResult = "win" | "draw" | "loss" | "eliminated";
|
|
172
|
-
interface OutcomeScoreComponent {
|
|
173
|
-
readonly id: string;
|
|
174
|
-
readonly label: string;
|
|
175
|
-
readonly value: number;
|
|
176
|
-
}
|
|
177
|
-
interface OutcomeTieBreak {
|
|
178
|
-
readonly id: string;
|
|
179
|
-
readonly label: string;
|
|
180
|
-
readonly value: number | string;
|
|
181
|
-
}
|
|
182
|
-
interface OutcomeStanding<Player extends string = string> {
|
|
183
|
-
readonly playerId: Player;
|
|
184
|
-
readonly rank: number;
|
|
185
|
-
readonly result: OutcomeResult;
|
|
186
|
-
readonly score?: number;
|
|
187
|
-
readonly scoreBreakdown?: readonly OutcomeScoreComponent[];
|
|
188
|
-
readonly tieBreaks?: readonly OutcomeTieBreak[];
|
|
189
|
-
}
|
|
190
|
-
interface GameOutcome<Player extends string = string> {
|
|
191
|
-
readonly reason: {
|
|
192
|
-
readonly code: string;
|
|
193
|
-
readonly message?: string;
|
|
194
|
-
};
|
|
195
|
-
readonly standings: readonly OutcomeStanding<Player>[];
|
|
196
|
-
}
|
|
197
|
-
interface PluginGameplayFrame<View = unknown, Phase extends string = string, Stage extends string = string, Interaction extends string = string> {
|
|
198
|
-
readonly basis: GameplayBasis;
|
|
199
|
-
readonly view: View | null;
|
|
200
|
-
readonly flow: {
|
|
201
|
-
readonly currentPhase: Phase | null;
|
|
202
|
-
readonly currentStage: Stage | null;
|
|
203
|
-
readonly activePlayers: readonly PlayerId[];
|
|
204
|
-
readonly simultaneousPhase: SimultaneousPhaseSnapshot | null;
|
|
205
|
-
};
|
|
206
|
-
readonly availableInteractions: ReadonlyArray<InteractionDescriptor<Interaction>>;
|
|
207
|
-
readonly guidance?: GameGuidanceProjection | null;
|
|
208
|
-
readonly zones: Readonly<Record<string, ZoneHandlesSnapshot<Interaction>>>;
|
|
209
|
-
}
|
|
210
|
-
interface ReducerSeatProjectionBundle {
|
|
211
|
-
readonly currentStage?: string | null;
|
|
212
|
-
readonly stageSeats?: readonly string[];
|
|
213
|
-
readonly simultaneousPhase?: SimultaneousPhaseSnapshot | null;
|
|
214
|
-
readonly schedulerFlow?: {
|
|
215
|
-
readonly version: 1;
|
|
216
|
-
readonly activePlayerIds: readonly string[];
|
|
217
|
-
readonly pendingPlayerIds: readonly string[];
|
|
218
|
-
readonly continuationDependencies: readonly {
|
|
219
|
-
readonly waiterPlayerId: string;
|
|
220
|
-
readonly blockerPlayerIds: readonly string[];
|
|
221
|
-
}[];
|
|
222
|
-
};
|
|
223
|
-
readonly guidance?: GameGuidanceProjection | null;
|
|
224
|
-
readonly sharedView?: unknown;
|
|
225
|
-
readonly interactionsByRef?: unknown;
|
|
226
|
-
readonly seats: Readonly<Record<string, {
|
|
227
|
-
readonly view?: unknown;
|
|
228
|
-
readonly availableInteractionRefs?: unknown;
|
|
229
|
-
readonly zones?: unknown;
|
|
230
|
-
}>>;
|
|
231
|
-
}
|
|
232
|
-
interface ReducerBoardStaticProjection {
|
|
233
|
-
readonly view: RuntimeJson;
|
|
234
|
-
readonly hash?: string;
|
|
235
|
-
readonly manifestVersion?: string;
|
|
236
|
-
}
|
|
237
|
-
|
|
238
|
-
declare const DREAMBOARD_PLUGIN_PROTOCOL: "dreamboard-plugin";
|
|
239
|
-
declare const DREAMBOARD_PLUGIN_PROTOCOL_VERSION: 4;
|
|
240
|
-
type InteractionResult = {
|
|
241
|
-
readonly type: "interaction.result";
|
|
242
|
-
readonly clientActionId: string;
|
|
243
|
-
readonly accepted: true;
|
|
244
|
-
} | {
|
|
245
|
-
readonly type: "interaction.result";
|
|
246
|
-
readonly clientActionId: string;
|
|
247
|
-
readonly accepted: false;
|
|
248
|
-
readonly errorCode: string;
|
|
249
|
-
readonly message?: string;
|
|
250
|
-
};
|
|
251
|
-
interface SubmitInteractionCommand {
|
|
252
|
-
readonly type: "interaction.submit";
|
|
253
|
-
readonly clientActionId: string;
|
|
254
|
-
readonly basis: GameplayBasis;
|
|
255
|
-
readonly interactionId: string;
|
|
256
|
-
readonly params: RuntimeJson;
|
|
257
|
-
}
|
|
258
|
-
type HostToPluginPayload = {
|
|
259
|
-
readonly type: "runtime.init";
|
|
260
|
-
readonly session: PluginSessionDescriptor;
|
|
261
|
-
} | {
|
|
262
|
-
readonly type: "gameplay.frame";
|
|
263
|
-
readonly frame: PluginGameplayFrame;
|
|
264
|
-
} | InteractionResult;
|
|
265
|
-
type PluginToHostPayload = {
|
|
266
|
-
readonly type: "runtime.ready";
|
|
267
|
-
} | {
|
|
268
|
-
readonly type: "runtime.ack";
|
|
269
|
-
/** Echoes the host envelope sequence. It is delivery order only. */
|
|
270
|
-
readonly sequence: number;
|
|
271
|
-
readonly clientReceivedAtMs?: number;
|
|
272
|
-
readonly clientRenderedAtMs?: number;
|
|
273
|
-
} | SubmitInteractionCommand | {
|
|
274
|
-
readonly type: "runtime.error";
|
|
275
|
-
readonly message: string;
|
|
276
|
-
readonly code?: string;
|
|
277
|
-
};
|
|
278
|
-
interface PluginProtocolEnvelope<Payload> {
|
|
279
|
-
readonly protocol: typeof DREAMBOARD_PLUGIN_PROTOCOL;
|
|
280
|
-
readonly version: typeof DREAMBOARD_PLUGIN_PROTOCOL_VERSION;
|
|
281
|
-
readonly channelId: string;
|
|
282
|
-
/** Delivery order only. It is not a game revision. */
|
|
283
|
-
readonly sequence: number;
|
|
284
|
-
readonly payload: Payload;
|
|
285
|
-
}
|
|
286
|
-
type HostToPluginEnvelope = PluginProtocolEnvelope<HostToPluginPayload>;
|
|
287
|
-
type PluginToHostEnvelope = PluginProtocolEnvelope<PluginToHostPayload>;
|
|
288
|
-
interface PluginProtocolFrame {
|
|
289
|
-
readonly id: string;
|
|
290
|
-
readonly frame: PluginGameplayFrame;
|
|
291
|
-
readonly projectionDigest: string;
|
|
292
|
-
}
|
|
293
|
-
interface PluginProtocolTape {
|
|
294
|
-
readonly session: PluginSessionDescriptor;
|
|
295
|
-
readonly frames: readonly PluginProtocolFrame[];
|
|
296
|
-
readonly steps: readonly PluginProtocolStep[];
|
|
297
|
-
}
|
|
298
|
-
type PluginProtocolStep = {
|
|
299
|
-
readonly id: string;
|
|
300
|
-
readonly kind: "host.frame";
|
|
301
|
-
readonly frameId: string;
|
|
302
|
-
} | {
|
|
303
|
-
readonly id: string;
|
|
304
|
-
readonly kind: "client.submit";
|
|
305
|
-
readonly fromFrameId: string;
|
|
306
|
-
readonly requestDigest: string;
|
|
307
|
-
readonly response: InteractionResult;
|
|
308
|
-
};
|
|
309
|
-
type ActionSetVersionInput = {
|
|
310
|
-
readonly version: number;
|
|
311
|
-
readonly availableInteractions: readonly InteractionDescriptor[];
|
|
312
|
-
};
|
|
313
|
-
|
|
314
|
-
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 PromptInteractionDescriptor as K, type ReducerSeatProjectionBundle as L, type RuntimeJson as M, type SubmitInteractionCommand as N, type OutcomeResult as O, type PlayerId as P, type SystemActionEvent as Q, type ReducerBoardStaticProjection as R, type SimultaneousPhaseSnapshot as S, canonicalizePluginRuntimeJson as T, digestPluginRuntimeJson as U, encodeCanonicalPluginRuntimeJson as V, 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,82 +0,0 @@
|
|
|
1
|
-
import { bW as RuntimeTableRecord, bJ as RuntimeRngState, cc as SetupBootstrapStep, aT as ReducerManifestContractLike, c3 as SetupBootstrapContainerRef, c7 as SetupBootstrapPerPlayerContainerTemplateRef, aE as PlayerIdOfManifest, c4 as SetupBootstrapDestinationRef, n as CardIdOfManifest, aC as PieceIdOfManifest, I as DieIdOfManifest } from '../runtime-RJ5orDJU.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, V as HandCardsOfTable, W as HandIdOfState, X as HandIdOfTable, Y as HexBoardIdOfTable, Z as HexBoardStateOfTable, _ as HexEdgeIdOfTable, $ as HexEdgeStateOfTable, a0 as HexEdgeTypeIdOfTable, a1 as HexSpaceIdOfTable, a2 as HexSpaceTypeIdOfTable, a3 as HexVertexIdOfTable, a4 as HexVertexStateOfTable, a5 as HexVertexTypeIdOfTable, a6 as HiddenSchemaOfContract, a7 as HiddenStateOfState, a8 as InitContext, a9 as InitSetupSelectionInput, aa as ManifestContract, ab as ManifestContractOf, ac as ManifestDefaults, ad as ManifestIdFamily, ae as ManifestIdSchema, af as ManifestIds, ag as ManifestLiterals, ah as ManifestNormalSetup, ai as ManifestOf, aj as NonEmptyReadonlyArray, ak as OutcomeResult, al as OutcomeScoreComponent, am as OutcomeStanding, an as OutcomeTieBreak, ar as PhaseAccessor, as as PhaseMapOfState, at as PhaseNameOf, au as PhaseNameOfContract, av as PhaseNameOfManifest, aw as PhaseNameOfState, ax as PhasePayload, ay as PhaseSchemasOfContract, az as PhaseStateMapOfContract, aA as PhaseStateOfState, aB as PhaseStepOfState, aF as PlayerIdOfState, aG as PlayerIdOfTable, aH as PlayerZoneIdOfManifest, aI as PlayerZoneIdOfState, aJ as PlayerZoneIdOfTable, aK as PrivateSchemaOfContract, aL as PrivateStateOfState, aM as PublicSchemaOfContract, aN as PublicStateOfState, aO as ReducerAccept, aP as ReducerAcceptOptions, aQ as ReducerFx, aR as ReducerGameState, aS 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, bz as RuntimeOwnerMap, bA as RuntimeParams, bB as RuntimePayload, bC as RuntimePhaseState, bD as RuntimePieceData, bE as RuntimeRecord, bF as RuntimeResourceMap, bG as RuntimeRngDraw, bH as RuntimeRngOperation, bI as RuntimeRngOperationParameter, bK as RuntimeScalar, bL as RuntimeSetupSelection, bM as RuntimeSetupSelectionInput, bN as RuntimeSetupSelectionOverride, bO as RuntimeSimultaneousState, bP as RuntimeSimultaneousSubmission, bQ as RuntimeSlotHostRef, bR as RuntimeSquareBoardState, bS as RuntimeSquareEdgeState, bT as RuntimeSquareSpaceState, bU as RuntimeSquareVertexState, bV as RuntimeState, bX as RuntimeTiledBoardBaseState, bY as RuntimeTiledBoardState, bZ as RuntimeTiledEdgeState, b_ as RuntimeTiledSpaceState, b$ as RuntimeTiledVertexState, c0 as RuntimeVisibilityMap, c1 as RuntimeZoneMap, c2 as SchemaLike, c5 as SetupBootstrapPerPlayerBoardContainerRef, c6 as SetupBootstrapPerPlayerBoardSpaceRef, c8 as SetupBootstrapPerPlayerZoneRef, c9 as SetupBootstrapSharedBoardContainerRef, ca as SetupBootstrapSharedBoardSpaceRef, cb as SetupBootstrapSharedZoneRef, cd as SetupOptionChoiceMetadata, ce as SetupOptionIdOfManifest, cf as SetupOptionMetadata, cg as SetupProfileDefinition, ch as SetupProfileIdOfManifest, ci as SetupProfileMetadata, cj as SetupSelectionInputOfManifest, ck as SetupSelectionOfManifest, cm as SharedZoneIdOfManifest, cn as SharedZoneIdOfState, co as SharedZoneIdOfTable, cp as SpaceIdOfManifest, cq as SpaceIdOfTable, cr as SpaceTypeIdOfManifest, cs as SpaceTypeIdOfTable, ct as SquareBoardIdOfTable, cu as SquareBoardStateOfTable, cv as SquareEdgeIdOfTable, cw as SquareEdgeStateOfTable, cx as SquareEdgeTypeIdOfTable, cy as SquareSpaceIdOfTable, cz as SquareSpaceTypeIdOfTable, cA as SquareVertexIdOfTable, cB as SquareVertexStateOfTable, cC as SquareVertexTypeIdOfTable, cD as StateDefinition, cE as StateDefinitionOfContract, cF as StaticBoards, 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-RJ5orDJU.js';
|
|
3
|
-
import { aH as ReducerGameContractLike, au as PhaseMapOf, bc as ViewMapOf, aI as ReducerGameDefinition } from '../views-BpuWcOyN.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 MutationHelpers, 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, aF as ReadHelpers, aG as ReducerGameContract, aK as ReducerSessionForConfig, aM as ReducerStateForConfig, aP as ResolvedBoardTargetDomainDescriptor, aQ as ResolvedCardTargetDomainDescriptor, aR as ResolvedGameSessionOf, aS as ResolvedGameStateOf, aT as ResourceMapDomainDescriptor, aU as ResumableEffectKind, aV as RngInputCollectorMeta, aW as RollDieContinuationResponse, 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-BpuWcOyN.js';
|
|
5
|
-
export { r as defineGameDefinition } from '../game-CsZScpcn.js';
|
|
6
|
-
import 'zod';
|
|
7
|
-
import '../types.js';
|
|
8
|
-
import './protocol-dYgafTYY.js';
|
|
9
|
-
|
|
10
|
-
type ClientParamSchema = {
|
|
11
|
-
safeParse: (value: unknown) => {
|
|
12
|
-
success: true;
|
|
13
|
-
data: Record<string, unknown>;
|
|
14
|
-
} | {
|
|
15
|
-
success: false;
|
|
16
|
-
error: {
|
|
17
|
-
issues: Array<{
|
|
18
|
-
path: PropertyKey[];
|
|
19
|
-
message: string;
|
|
20
|
-
}>;
|
|
21
|
-
};
|
|
22
|
-
};
|
|
23
|
-
};
|
|
24
|
-
type ClientParamSchemasByPhase = Readonly<Record<string, Readonly<Record<string, ClientParamSchema>>>>;
|
|
25
|
-
declare function createClientParamSchemasByPhase<Contract extends ReducerGameContractLike, Definitions extends PhaseMapOf<Contract>, Views extends ViewMapOf<Contract>>(definition: ReducerGameDefinition<Contract, Definitions, Views>): ClientParamSchemasByPhase;
|
|
26
|
-
|
|
27
|
-
type StatefulBootstrapContext = {
|
|
28
|
-
table: RuntimeTableRecord;
|
|
29
|
-
runtime: {
|
|
30
|
-
rng: RuntimeRngState;
|
|
31
|
-
};
|
|
32
|
-
};
|
|
33
|
-
declare function applySetupBootstrap<State extends StatefulBootstrapContext>(state: State, steps: readonly SetupBootstrapStep[]): State;
|
|
34
|
-
|
|
35
|
-
declare function shuffle<Manifest extends ReducerManifestContractLike = ReducerManifestContractLike>(container: SetupBootstrapContainerRef<Manifest>): SetupBootstrapStep<Manifest>;
|
|
36
|
-
declare function dealToPlayerZone<Manifest extends ReducerManifestContractLike = ReducerManifestContractLike>({ from, zoneId, count, playerIds, }: {
|
|
37
|
-
from: Extract<SetupBootstrapContainerRef<Manifest>, {
|
|
38
|
-
type: "sharedZone" | "sharedBoardContainer";
|
|
39
|
-
}>;
|
|
40
|
-
zoneId: Extract<SetupBootstrapPerPlayerContainerTemplateRef<Manifest>, {
|
|
41
|
-
type: "playerZone";
|
|
42
|
-
}>["zoneId"];
|
|
43
|
-
count: number;
|
|
44
|
-
playerIds?: readonly PlayerIdOfManifest<Manifest>[];
|
|
45
|
-
}): SetupBootstrapStep<Manifest>;
|
|
46
|
-
declare function dealToPlayerBoardContainer<Manifest extends ReducerManifestContractLike = ReducerManifestContractLike>({ from, boardId, containerId, count, playerIds, }: {
|
|
47
|
-
from: Extract<SetupBootstrapContainerRef<Manifest>, {
|
|
48
|
-
type: "sharedZone" | "sharedBoardContainer";
|
|
49
|
-
}>;
|
|
50
|
-
boardId: Extract<SetupBootstrapPerPlayerContainerTemplateRef<Manifest>, {
|
|
51
|
-
type: "playerBoardContainer";
|
|
52
|
-
}>["boardId"];
|
|
53
|
-
containerId: Extract<SetupBootstrapPerPlayerContainerTemplateRef<Manifest>, {
|
|
54
|
-
type: "playerBoardContainer";
|
|
55
|
-
}>["containerId"];
|
|
56
|
-
count: number;
|
|
57
|
-
playerIds?: readonly PlayerIdOfManifest<Manifest>[];
|
|
58
|
-
}): SetupBootstrapStep<Manifest>;
|
|
59
|
-
declare function seedSharedBoardContainer<Manifest extends ReducerManifestContractLike = ReducerManifestContractLike>({ from, boardId, containerId, count, componentIds, }: {
|
|
60
|
-
from: SetupBootstrapContainerRef<Manifest>;
|
|
61
|
-
boardId: Extract<SetupBootstrapDestinationRef<Manifest>, {
|
|
62
|
-
type: "sharedBoardContainer";
|
|
63
|
-
}>["boardId"];
|
|
64
|
-
containerId: Extract<SetupBootstrapDestinationRef<Manifest>, {
|
|
65
|
-
type: "sharedBoardContainer";
|
|
66
|
-
}>["containerId"];
|
|
67
|
-
count?: number;
|
|
68
|
-
componentIds?: readonly (CardIdOfManifest<Manifest> | PieceIdOfManifest<Manifest> | DieIdOfManifest<Manifest>)[];
|
|
69
|
-
}): SetupBootstrapStep<Manifest>;
|
|
70
|
-
declare function seedSharedBoardSpace<Manifest extends ReducerManifestContractLike = ReducerManifestContractLike>({ from, boardId, spaceId, count, componentIds, }: {
|
|
71
|
-
from: SetupBootstrapContainerRef<Manifest>;
|
|
72
|
-
boardId: Extract<SetupBootstrapDestinationRef<Manifest>, {
|
|
73
|
-
type: "sharedBoardSpace";
|
|
74
|
-
}>["boardId"];
|
|
75
|
-
spaceId: Extract<SetupBootstrapDestinationRef<Manifest>, {
|
|
76
|
-
type: "sharedBoardSpace";
|
|
77
|
-
}>["spaceId"];
|
|
78
|
-
count?: number;
|
|
79
|
-
componentIds?: readonly (CardIdOfManifest<Manifest> | PieceIdOfManifest<Manifest> | DieIdOfManifest<Manifest>)[];
|
|
80
|
-
}): SetupBootstrapStep<Manifest>;
|
|
81
|
-
|
|
82
|
-
export { CardIdOfManifest, type ClientParamSchema, type ClientParamSchemasByPhase, DieIdOfManifest, PhaseMapOf, PieceIdOfManifest, PlayerIdOfManifest, ReducerGameContractLike, ReducerGameDefinition, ReducerManifestContractLike, RuntimeRngState, RuntimeTableRecord, SetupBootstrapContainerRef, SetupBootstrapDestinationRef, SetupBootstrapPerPlayerContainerTemplateRef, SetupBootstrapStep, ViewMapOf, applySetupBootstrap, createClientParamSchemasByPhase, dealToPlayerBoardContainer, dealToPlayerZone, seedSharedBoardContainer, seedSharedBoardSpace, shuffle };
|
package/dist/reducer/advanced.js
DELETED
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
dealToPlayerBoardContainer,
|
|
3
|
-
dealToPlayerZone,
|
|
4
|
-
seedSharedBoardContainer,
|
|
5
|
-
seedSharedBoardSpace,
|
|
6
|
-
shuffle
|
|
7
|
-
} from "../chunk-ANRB4XKA.js";
|
|
8
|
-
import {
|
|
9
|
-
createClientParamSchemasByPhase
|
|
10
|
-
} from "../chunk-PN5O6GG2.js";
|
|
11
|
-
import {
|
|
12
|
-
defineGameDefinition
|
|
13
|
-
} from "../chunk-ZZGN2ATS.js";
|
|
14
|
-
import {
|
|
15
|
-
FrameworkErrorCodes,
|
|
16
|
-
applySetupBootstrap,
|
|
17
|
-
assumeManifestSchema,
|
|
18
|
-
cloneManifestDefault,
|
|
19
|
-
createManifestGameStateSchema,
|
|
20
|
-
createManifestRuntimeSchema,
|
|
21
|
-
createManifestStringLiteralSchema,
|
|
22
|
-
isManifestScopedSchema,
|
|
23
|
-
manifestSchemaFamily,
|
|
24
|
-
markManifestScopedSchema,
|
|
25
|
-
resolveManifestPlayerIds
|
|
26
|
-
} from "../chunk-H6VDGFL5.js";
|
|
27
|
-
import "../chunk-5YV2WHJ4.js";
|
|
28
|
-
import "../chunk-Z7QCREWI.js";
|
|
29
|
-
import "../chunk-UGH54WZ2.js";
|
|
30
|
-
import "../chunk-PZ5AY32C.js";
|
|
31
|
-
export {
|
|
32
|
-
FrameworkErrorCodes,
|
|
33
|
-
applySetupBootstrap,
|
|
34
|
-
assumeManifestSchema,
|
|
35
|
-
cloneManifestDefault,
|
|
36
|
-
createClientParamSchemasByPhase,
|
|
37
|
-
createManifestGameStateSchema,
|
|
38
|
-
createManifestRuntimeSchema,
|
|
39
|
-
createManifestStringLiteralSchema,
|
|
40
|
-
dealToPlayerBoardContainer,
|
|
41
|
-
dealToPlayerZone,
|
|
42
|
-
defineGameDefinition,
|
|
43
|
-
isManifestScopedSchema,
|
|
44
|
-
manifestSchemaFamily,
|
|
45
|
-
markManifestScopedSchema,
|
|
46
|
-
resolveManifestPlayerIds,
|
|
47
|
-
seedSharedBoardContainer,
|
|
48
|
-
seedSharedBoardSpace,
|
|
49
|
-
shuffle
|
|
50
|
-
};
|
|
51
|
-
//# sourceMappingURL=advanced.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -1,11 +0,0 @@
|
|
|
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-DjzoK7zn.js';
|
|
2
|
-
import { GameTopologyManifest } from './types.js';
|
|
3
|
-
import 'zod';
|
|
4
|
-
|
|
5
|
-
declare function materializeManifestTable(options: {
|
|
6
|
-
manifest: GameTopologyManifest;
|
|
7
|
-
playerIds: readonly string[];
|
|
8
|
-
shuffleItems: <Value>(values: readonly Value[]) => Value[];
|
|
9
|
-
}): Record<string, unknown>;
|
|
10
|
-
|
|
11
|
-
export { materializeManifestTable };
|
package/dist/reducer-contract.js
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
materializeManifestTable
|
|
3
|
-
} from "./chunk-Z7QCREWI.js";
|
|
4
|
-
import {
|
|
5
|
-
REDUCER_CONTRACT_VERSION,
|
|
6
|
-
assertReducerBundleContract,
|
|
7
|
-
zod_exports
|
|
8
|
-
} from "./chunk-UGH54WZ2.js";
|
|
9
|
-
import "./chunk-PZ5AY32C.js";
|
|
10
|
-
export {
|
|
11
|
-
REDUCER_CONTRACT_VERSION,
|
|
12
|
-
zod_exports as ReducerWireZod,
|
|
13
|
-
assertReducerBundleContract,
|
|
14
|
-
materializeManifestTable
|
|
15
|
-
};
|
|
16
|
-
//# sourceMappingURL=reducer-contract.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
|
|
3
|
-
declare const REFERENCE_GAME_MANIFEST_SCHEMA_VERSION = 5;
|
|
4
|
-
declare const referenceGameManifestSchema: z.ZodObject<{
|
|
5
|
-
schemaVersion: z.ZodLiteral<5>;
|
|
6
|
-
id: z.ZodString;
|
|
7
|
-
displayName: z.ZodString;
|
|
8
|
-
workspace: z.ZodObject<{
|
|
9
|
-
manifest: z.ZodString;
|
|
10
|
-
reducer: z.ZodString;
|
|
11
|
-
ui: z.ZodString;
|
|
12
|
-
}, z.core.$strict>;
|
|
13
|
-
teaching: z.ZodObject<{
|
|
14
|
-
whatThisTeaches: z.ZodArray<z.ZodString>;
|
|
15
|
-
whenToCopyThisPattern: z.ZodArray<z.ZodString>;
|
|
16
|
-
readFirst: z.ZodArray<z.ZodString>;
|
|
17
|
-
}, z.core.$strict>;
|
|
18
|
-
mechanics: z.ZodArray<z.ZodString>;
|
|
19
|
-
uiPatterns: z.ZodArray<z.ZodString>;
|
|
20
|
-
rights: z.ZodObject<{
|
|
21
|
-
mechanicsProvenance: z.ZodString;
|
|
22
|
-
sourceCode: z.ZodString;
|
|
23
|
-
codeLicense: z.ZodString;
|
|
24
|
-
ruleText: z.ZodString;
|
|
25
|
-
thirdPartyMarks: z.ZodArray<z.ZodString>;
|
|
26
|
-
}, z.core.$strict>;
|
|
27
|
-
}, z.core.$strict>;
|
|
28
|
-
type ReferenceGameManifest = z.infer<typeof referenceGameManifestSchema>;
|
|
29
|
-
declare function parseReferenceGameManifest(value: unknown): ReferenceGameManifest;
|
|
30
|
-
|
|
31
|
-
export { REFERENCE_GAME_MANIFEST_SCHEMA_VERSION, type ReferenceGameManifest, parseReferenceGameManifest, referenceGameManifestSchema };
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
import "../chunk-PZ5AY32C.js";
|
|
2
|
-
|
|
3
|
-
// src/reference-games/schema.ts
|
|
4
|
-
import { z } from "zod";
|
|
5
|
-
var REFERENCE_GAME_MANIFEST_SCHEMA_VERSION = 5;
|
|
6
|
-
var referenceGameIdSchema = z.string().regex(/^[a-z0-9][a-z0-9-]*$/);
|
|
7
|
-
var referenceGamePathSchema = z.string().min(1).refine(
|
|
8
|
-
(value) => !value.startsWith("/") && !value.includes("\\") && value.split("/").every(
|
|
9
|
-
(segment) => segment.length > 0 && segment !== "." && segment !== ".." && /^[A-Za-z0-9._-]+$/.test(segment)
|
|
10
|
-
),
|
|
11
|
-
{ message: "path must stay inside the reference game workspace" }
|
|
12
|
-
);
|
|
13
|
-
var referenceGameWorkspaceSchema = z.object({
|
|
14
|
-
manifest: referenceGamePathSchema,
|
|
15
|
-
reducer: referenceGamePathSchema,
|
|
16
|
-
ui: referenceGamePathSchema
|
|
17
|
-
}).strict();
|
|
18
|
-
var referenceGameTeachingSchema = z.object({
|
|
19
|
-
whatThisTeaches: z.array(z.string().min(1)).min(1),
|
|
20
|
-
whenToCopyThisPattern: z.array(z.string().min(1)).min(1),
|
|
21
|
-
readFirst: z.array(referenceGamePathSchema).min(1)
|
|
22
|
-
}).strict();
|
|
23
|
-
var referenceGameRightsSchema = z.object({
|
|
24
|
-
mechanicsProvenance: z.string().min(1),
|
|
25
|
-
sourceCode: z.string().min(1),
|
|
26
|
-
codeLicense: z.string().min(1),
|
|
27
|
-
ruleText: z.string().min(1),
|
|
28
|
-
thirdPartyMarks: z.array(z.string())
|
|
29
|
-
}).strict();
|
|
30
|
-
var referenceGameManifestSchema = z.object({
|
|
31
|
-
schemaVersion: z.literal(REFERENCE_GAME_MANIFEST_SCHEMA_VERSION),
|
|
32
|
-
id: referenceGameIdSchema,
|
|
33
|
-
displayName: z.string().min(1),
|
|
34
|
-
workspace: referenceGameWorkspaceSchema,
|
|
35
|
-
teaching: referenceGameTeachingSchema,
|
|
36
|
-
mechanics: z.array(z.string().min(1)).min(1),
|
|
37
|
-
uiPatterns: z.array(z.string().min(1)).min(1),
|
|
38
|
-
rights: referenceGameRightsSchema
|
|
39
|
-
}).strict();
|
|
40
|
-
function parseReferenceGameManifest(value) {
|
|
41
|
-
return referenceGameManifestSchema.parse(value);
|
|
42
|
-
}
|
|
43
|
-
export {
|
|
44
|
-
REFERENCE_GAME_MANIFEST_SCHEMA_VERSION,
|
|
45
|
-
parseReferenceGameManifest,
|
|
46
|
-
referenceGameManifestSchema
|
|
47
|
-
};
|
|
48
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/reference-games/schema.ts"],"sourcesContent":["import { z } from \"zod\";\n\nexport const REFERENCE_GAME_MANIFEST_SCHEMA_VERSION = 5;\n\nconst referenceGameIdSchema = z.string().regex(/^[a-z0-9][a-z0-9-]*$/);\n\nconst referenceGamePathSchema = z\n .string()\n .min(1)\n .refine(\n (value) =>\n !value.startsWith(\"/\") &&\n !value.includes(\"\\\\\") &&\n value\n .split(\"/\")\n .every(\n (segment) =>\n segment.length > 0 &&\n segment !== \".\" &&\n segment !== \"..\" &&\n /^[A-Za-z0-9._-]+$/.test(segment),\n ),\n { message: \"path must stay inside the reference game workspace\" },\n );\n\nconst referenceGameWorkspaceSchema = z\n .object({\n manifest: referenceGamePathSchema,\n reducer: referenceGamePathSchema,\n ui: referenceGamePathSchema,\n })\n .strict();\n\nconst referenceGameTeachingSchema = z\n .object({\n whatThisTeaches: z.array(z.string().min(1)).min(1),\n whenToCopyThisPattern: z.array(z.string().min(1)).min(1),\n readFirst: z.array(referenceGamePathSchema).min(1),\n })\n .strict();\n\nconst referenceGameRightsSchema = z\n .object({\n mechanicsProvenance: z.string().min(1),\n sourceCode: z.string().min(1),\n codeLicense: z.string().min(1),\n ruleText: z.string().min(1),\n thirdPartyMarks: z.array(z.string()),\n })\n .strict();\n\nexport const referenceGameManifestSchema = z\n .object({\n schemaVersion: z.literal(REFERENCE_GAME_MANIFEST_SCHEMA_VERSION),\n id: referenceGameIdSchema,\n displayName: z.string().min(1),\n workspace: referenceGameWorkspaceSchema,\n teaching: referenceGameTeachingSchema,\n mechanics: z.array(z.string().min(1)).min(1),\n uiPatterns: z.array(z.string().min(1)).min(1),\n rights: referenceGameRightsSchema,\n })\n .strict();\n\nexport type ReferenceGameManifest = z.infer<typeof referenceGameManifestSchema>;\n\nexport function parseReferenceGameManifest(\n value: unknown,\n): ReferenceGameManifest {\n return referenceGameManifestSchema.parse(value);\n}\n"],"mappings":";;;AAAA,SAAS,SAAS;AAEX,IAAM,yCAAyC;AAEtD,IAAM,wBAAwB,EAAE,OAAO,EAAE,MAAM,sBAAsB;AAErE,IAAM,0BAA0B,EAC7B,OAAO,EACP,IAAI,CAAC,EACL;AAAA,EACC,CAAC,UACC,CAAC,MAAM,WAAW,GAAG,KACrB,CAAC,MAAM,SAAS,IAAI,KACpB,MACG,MAAM,GAAG,EACT;AAAA,IACC,CAAC,YACC,QAAQ,SAAS,KACjB,YAAY,OACZ,YAAY,QACZ,oBAAoB,KAAK,OAAO;AAAA,EACpC;AAAA,EACJ,EAAE,SAAS,qDAAqD;AAClE;AAEF,IAAM,+BAA+B,EAClC,OAAO;AAAA,EACN,UAAU;AAAA,EACV,SAAS;AAAA,EACT,IAAI;AACN,CAAC,EACA,OAAO;AAEV,IAAM,8BAA8B,EACjC,OAAO;AAAA,EACN,iBAAiB,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,CAAC,CAAC,EAAE,IAAI,CAAC;AAAA,EACjD,uBAAuB,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,CAAC,CAAC,EAAE,IAAI,CAAC;AAAA,EACvD,WAAW,EAAE,MAAM,uBAAuB,EAAE,IAAI,CAAC;AACnD,CAAC,EACA,OAAO;AAEV,IAAM,4BAA4B,EAC/B,OAAO;AAAA,EACN,qBAAqB,EAAE,OAAO,EAAE,IAAI,CAAC;AAAA,EACrC,YAAY,EAAE,OAAO,EAAE,IAAI,CAAC;AAAA,EAC5B,aAAa,EAAE,OAAO,EAAE,IAAI,CAAC;AAAA,EAC7B,UAAU,EAAE,OAAO,EAAE,IAAI,CAAC;AAAA,EAC1B,iBAAiB,EAAE,MAAM,EAAE,OAAO,CAAC;AACrC,CAAC,EACA,OAAO;AAEH,IAAM,8BAA8B,EACxC,OAAO;AAAA,EACN,eAAe,EAAE,QAAQ,sCAAsC;AAAA,EAC/D,IAAI;AAAA,EACJ,aAAa,EAAE,OAAO,EAAE,IAAI,CAAC;AAAA,EAC7B,WAAW;AAAA,EACX,UAAU;AAAA,EACV,WAAW,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,CAAC,CAAC,EAAE,IAAI,CAAC;AAAA,EAC3C,YAAY,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,CAAC,CAAC,EAAE,IAAI,CAAC;AAAA,EAC5C,QAAQ;AACV,CAAC,EACA,OAAO;AAIH,SAAS,2BACd,OACuB;AACvB,SAAO,4BAA4B,MAAM,KAAK;AAChD;","names":[]}
|