@dreamboard-games/sdk 0.4.0-alpha.6 → 0.4.0-alpha.8
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 +561 -59
- package/dist/authoring/index.d.ts +5 -4
- package/dist/authoring/index.js +4 -4
- package/dist/authoring/index.js.map +1 -1
- package/dist/{chunk-52DH7VQF.js → chunk-2TAKLJJD.js} +5 -2
- package/dist/{chunk-52DH7VQF.js.map → chunk-2TAKLJJD.js.map} +1 -1
- package/dist/{chunk-TGMXBRKY.js → chunk-3BLN5POZ.js} +5 -3
- package/dist/chunk-3BLN5POZ.js.map +1 -0
- package/dist/{chunk-OV6JC2BM.js → chunk-44N3T2A5.js} +19 -15
- package/dist/chunk-44N3T2A5.js.map +1 -0
- package/dist/chunk-5CQIJHGF.js +663 -0
- package/dist/chunk-5CQIJHGF.js.map +1 -0
- package/dist/chunk-IYX5OO2K.js +565 -0
- package/dist/chunk-IYX5OO2K.js.map +1 -0
- package/dist/{chunk-SOBNI363.js → chunk-VTK4TIXC.js} +11 -6
- package/dist/{chunk-SOBNI363.js.map → chunk-VTK4TIXC.js.map} +1 -1
- package/dist/{chunk-HK3WN4U7.js → chunk-VTNEWMWJ.js} +2 -2
- package/dist/{chunk-HK3WN4U7.js.map → chunk-VTNEWMWJ.js.map} +1 -1
- package/dist/{chunk-PAPIAMYX.js → chunk-XV27IQHA.js} +6 -4
- package/dist/{chunk-PAPIAMYX.js.map → chunk-XV27IQHA.js.map} +1 -1
- package/dist/{chunk-DDST4U2P.js → chunk-YGQTL63W.js} +2 -2
- package/dist/chunk-ZYONCTZ2.js +564 -0
- package/dist/chunk-ZYONCTZ2.js.map +1 -0
- package/dist/codegen.js +1 -1
- package/dist/{stale-contract-artifact-error-BelRiIDR.d.ts → diagnostics-1BWjRo6-.d.ts} +1 -18
- package/dist/{index.d-DMASeF6M.d.ts → index.d-C0PKOVbh.d.ts} +25 -4
- package/dist/index.js +2 -2
- package/dist/package-set.d.ts +2 -2
- package/dist/package-set.js +2 -2
- package/dist/{protocol-835hEGne.d.ts → protocol-nS2ojsGr.d.ts} +5 -0
- package/dist/reducer/advanced.d.ts +2 -2
- package/dist/reducer-contract.d.ts +1 -1
- package/dist/reducer-contract.js +2 -2
- package/dist/reducer.d.ts +26 -22
- package/dist/reducer.js +136 -89
- package/dist/reducer.js.map +1 -1
- package/dist/reference-games/index.d.ts +223 -0
- package/dist/reference-games/index.js +230 -0
- package/dist/reference-games/index.js.map +1 -0
- package/dist/runtime/primitives.js +4 -3
- package/dist/runtime/workspace-contract.js +5 -4
- package/dist/runtime.d.ts +3 -3
- package/dist/runtime.js +15 -205
- package/dist/runtime.js.map +1 -1
- package/dist/stale-contract-artifact-error-C5AaZPJ8.d.ts +18 -0
- package/dist/testing-runtime.d.ts +42 -0
- package/dist/testing-runtime.js +153 -0
- package/dist/testing-runtime.js.map +1 -0
- package/dist/testing.d.ts +8 -194
- package/dist/testing.js +22 -640
- package/dist/testing.js.map +1 -1
- package/dist/types-B_3pObUV.d.ts +192 -0
- package/dist/{types-aI4V9CWe.d.ts → types-CTeN_QAk.d.ts} +1 -1
- package/dist/types.d.ts +4 -0
- package/dist/{views-32rSsfeU.d.ts → views-Qx-EHBP8.d.ts} +27 -10
- package/package.json +13 -3
- package/dist/chunk-OV6JC2BM.js.map +0 -1
- package/dist/chunk-TGMXBRKY.js.map +0 -1
- package/dist/chunk-UUQNOGZV.js +0 -1266
- package/dist/chunk-UUQNOGZV.js.map +0 -1
- /package/dist/{chunk-DDST4U2P.js.map → chunk-YGQTL63W.js.map} +0 -0
package/REFERENCE.md
CHANGED
|
@@ -47,7 +47,7 @@ _No JSDoc summary is available yet._
|
|
|
47
47
|
|
|
48
48
|
```ts
|
|
49
49
|
const DREAMBOARD_SDK_PACKAGES: {
|
|
50
|
-
readonly "@dreamboard-games/sdk": "0.4.0-alpha.
|
|
50
|
+
readonly "@dreamboard-games/sdk": "0.4.0-alpha.7";
|
|
51
51
|
};
|
|
52
52
|
```
|
|
53
53
|
|
|
@@ -56,7 +56,7 @@ _No JSDoc summary is available yet._
|
|
|
56
56
|
### DREAMBOARD_SDK_VERSION
|
|
57
57
|
|
|
58
58
|
```ts
|
|
59
|
-
const DREAMBOARD_SDK_VERSION: "0.4.0-alpha.
|
|
59
|
+
const DREAMBOARD_SDK_VERSION: "0.4.0-alpha.7";
|
|
60
60
|
```
|
|
61
61
|
|
|
62
62
|
_No JSDoc summary is available yet._
|
|
@@ -95,7 +95,7 @@ _No JSDoc summary is available yet._
|
|
|
95
95
|
|
|
96
96
|
```ts
|
|
97
97
|
const DREAMBOARD_SDK_PACKAGES: {
|
|
98
|
-
readonly "@dreamboard-games/sdk": "0.4.0-alpha.
|
|
98
|
+
readonly "@dreamboard-games/sdk": "0.4.0-alpha.7";
|
|
99
99
|
};
|
|
100
100
|
```
|
|
101
101
|
|
|
@@ -104,7 +104,7 @@ _No JSDoc summary is available yet._
|
|
|
104
104
|
### DREAMBOARD_SDK_VERSION
|
|
105
105
|
|
|
106
106
|
```ts
|
|
107
|
-
const DREAMBOARD_SDK_VERSION: "0.4.0-alpha.
|
|
107
|
+
const DREAMBOARD_SDK_VERSION: "0.4.0-alpha.7";
|
|
108
108
|
```
|
|
109
109
|
|
|
110
110
|
_No JSDoc summary is available yet._
|
|
@@ -129,6 +129,340 @@ type DreamboardSdkPackageSet = {
|
|
|
129
129
|
|
|
130
130
|
_No JSDoc summary is available yet._
|
|
131
131
|
|
|
132
|
+
## @dreamboard-games/sdk/reference-games
|
|
133
|
+
|
|
134
|
+
### canonicalizeReferenceGameSourcePayload
|
|
135
|
+
|
|
136
|
+
```ts
|
|
137
|
+
function canonicalizeReferenceGameSourcePayload(
|
|
138
|
+
payload: ReferenceGameSourceManifestPayload,
|
|
139
|
+
): CanonicalReferenceGameJson;
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
_No JSDoc summary is available yet._
|
|
143
|
+
|
|
144
|
+
### computeReferenceGameSourceDigest
|
|
145
|
+
|
|
146
|
+
```ts
|
|
147
|
+
function computeReferenceGameSourceDigest(
|
|
148
|
+
payload: ReferenceGameSourceManifestPayload,
|
|
149
|
+
): `sha256:${string}`;
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
_No JSDoc summary is available yet._
|
|
153
|
+
|
|
154
|
+
### isPackageableReferenceGame
|
|
155
|
+
|
|
156
|
+
```ts
|
|
157
|
+
function isPackageableReferenceGame(game: ReferenceGameManifestV3): boolean;
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
_No JSDoc summary is available yet._
|
|
161
|
+
|
|
162
|
+
### parseReferenceGameManifestV3
|
|
163
|
+
|
|
164
|
+
```ts
|
|
165
|
+
function parseReferenceGameManifestV3(value: unknown): ReferenceGameManifestV3;
|
|
166
|
+
```
|
|
167
|
+
|
|
168
|
+
_No JSDoc summary is available yet._
|
|
169
|
+
|
|
170
|
+
### parseReferenceGameSourceManifest
|
|
171
|
+
|
|
172
|
+
```ts
|
|
173
|
+
function parseReferenceGameSourceManifest(
|
|
174
|
+
value: unknown,
|
|
175
|
+
): ReferenceGameSourceManifest;
|
|
176
|
+
```
|
|
177
|
+
|
|
178
|
+
_No JSDoc summary is available yet._
|
|
179
|
+
|
|
180
|
+
### REFERENCE_GAME_MANIFEST_SCHEMA_VERSION
|
|
181
|
+
|
|
182
|
+
```ts
|
|
183
|
+
const REFERENCE_GAME_MANIFEST_SCHEMA_VERSION = 3;
|
|
184
|
+
```
|
|
185
|
+
|
|
186
|
+
_No JSDoc summary is available yet._
|
|
187
|
+
|
|
188
|
+
### REFERENCE_GAME_SOURCE_MANIFEST_SCHEMA_VERSION
|
|
189
|
+
|
|
190
|
+
```ts
|
|
191
|
+
const REFERENCE_GAME_SOURCE_MANIFEST_SCHEMA_VERSION = 2;
|
|
192
|
+
```
|
|
193
|
+
|
|
194
|
+
_No JSDoc summary is available yet._
|
|
195
|
+
|
|
196
|
+
### ReferenceGameDemoRelease
|
|
197
|
+
|
|
198
|
+
```ts
|
|
199
|
+
type ReferenceGameDemoRelease = z.infer<typeof referenceGameDemoReleaseSchema>;
|
|
200
|
+
```
|
|
201
|
+
|
|
202
|
+
_No JSDoc summary is available yet._
|
|
203
|
+
|
|
204
|
+
### referenceGameDemoReleaseSchema
|
|
205
|
+
|
|
206
|
+
```ts
|
|
207
|
+
declare const referenceGameDemoReleaseSchema: ...;
|
|
208
|
+
```
|
|
209
|
+
|
|
210
|
+
_No JSDoc summary is available yet._
|
|
211
|
+
|
|
212
|
+
### ReferenceGameManifestV3
|
|
213
|
+
|
|
214
|
+
```ts
|
|
215
|
+
type ReferenceGameManifestV3 = z.infer<typeof referenceGameManifestV3Schema>;
|
|
216
|
+
```
|
|
217
|
+
|
|
218
|
+
_No JSDoc summary is available yet._
|
|
219
|
+
|
|
220
|
+
### referenceGameManifestV3Schema
|
|
221
|
+
|
|
222
|
+
```ts
|
|
223
|
+
declare const referenceGameManifestV3Schema: ...;
|
|
224
|
+
```
|
|
225
|
+
|
|
226
|
+
_No JSDoc summary is available yet._
|
|
227
|
+
|
|
228
|
+
### ReferenceGameRights
|
|
229
|
+
|
|
230
|
+
```ts
|
|
231
|
+
type ReferenceGameRights = z.infer<typeof referenceGameRightsSchema>;
|
|
232
|
+
```
|
|
233
|
+
|
|
234
|
+
_No JSDoc summary is available yet._
|
|
235
|
+
|
|
236
|
+
### referenceGameRightsSchema
|
|
237
|
+
|
|
238
|
+
```ts
|
|
239
|
+
declare const referenceGameRightsSchema: z.ZodObject<
|
|
240
|
+
{
|
|
241
|
+
mechanicsProvenance: z.ZodString;
|
|
242
|
+
sourceCode: z.ZodString;
|
|
243
|
+
codeLicense: z.ZodString;
|
|
244
|
+
ruleText: z.ZodString;
|
|
245
|
+
artwork: z.ZodString;
|
|
246
|
+
assetLicenseManifest: z.ZodString;
|
|
247
|
+
thirdPartyMarks: z.ZodArray<z.ZodString>;
|
|
248
|
+
reviewStatus: z.ZodLiteral<"approved">;
|
|
249
|
+
reviewedBy: z.ZodString;
|
|
250
|
+
reviewedAt: z.ZodString;
|
|
251
|
+
},
|
|
252
|
+
z.core.$strict
|
|
253
|
+
>;
|
|
254
|
+
```
|
|
255
|
+
|
|
256
|
+
_No JSDoc summary is available yet._
|
|
257
|
+
|
|
258
|
+
### ReferenceGameSdkPolicy
|
|
259
|
+
|
|
260
|
+
```ts
|
|
261
|
+
type ReferenceGameSdkPolicy = z.infer<typeof referenceGameSdkPolicySchema>;
|
|
262
|
+
```
|
|
263
|
+
|
|
264
|
+
_No JSDoc summary is available yet._
|
|
265
|
+
|
|
266
|
+
### referenceGameSdkPolicySchema
|
|
267
|
+
|
|
268
|
+
```ts
|
|
269
|
+
const referenceGameSdkPolicySchema: z.ZodObject<
|
|
270
|
+
{
|
|
271
|
+
dependency: z.ZodLiteral<"@dreamboard-games/sdk">;
|
|
272
|
+
versionPolicy: z.ZodLiteral<"exact">;
|
|
273
|
+
},
|
|
274
|
+
z.core.$strict
|
|
275
|
+
>;
|
|
276
|
+
```
|
|
277
|
+
|
|
278
|
+
_No JSDoc summary is available yet._
|
|
279
|
+
|
|
280
|
+
### referenceGameSha256DigestSchema
|
|
281
|
+
|
|
282
|
+
```ts
|
|
283
|
+
const referenceGameSha256DigestSchema: z.ZodString;
|
|
284
|
+
```
|
|
285
|
+
|
|
286
|
+
_No JSDoc summary is available yet._
|
|
287
|
+
|
|
288
|
+
### ReferenceGameSourceEntry
|
|
289
|
+
|
|
290
|
+
```ts
|
|
291
|
+
type ReferenceGameSourceEntry = z.infer<typeof referenceGameSourceEntrySchema>;
|
|
292
|
+
```
|
|
293
|
+
|
|
294
|
+
_No JSDoc summary is available yet._
|
|
295
|
+
|
|
296
|
+
### referenceGameSourceEntrySchema
|
|
297
|
+
|
|
298
|
+
```ts
|
|
299
|
+
declare const referenceGameSourceEntrySchema: z.ZodObject<
|
|
300
|
+
{
|
|
301
|
+
id: z.ZodString;
|
|
302
|
+
root: z.ZodString;
|
|
303
|
+
sourceSha256: z.ZodString;
|
|
304
|
+
packageJsonSha256: z.ZodString;
|
|
305
|
+
lockfileSha256: z.ZodString;
|
|
306
|
+
sdkSpecifier: z.ZodString;
|
|
307
|
+
manifest: z.ZodString;
|
|
308
|
+
reducer: z.ZodString;
|
|
309
|
+
ui: z.ZodString;
|
|
310
|
+
behaviorScenarios: z.ZodArray<z.ZodString>;
|
|
311
|
+
uiScenarios: z.ZodArray<z.ZodString>;
|
|
312
|
+
mechanics: z.ZodArray<z.ZodString>;
|
|
313
|
+
readFirst: z.ZodArray<z.ZodString>;
|
|
314
|
+
},
|
|
315
|
+
z.core.$strict
|
|
316
|
+
>;
|
|
317
|
+
```
|
|
318
|
+
|
|
319
|
+
_No JSDoc summary is available yet._
|
|
320
|
+
|
|
321
|
+
### ReferenceGameSourceManifest
|
|
322
|
+
|
|
323
|
+
```ts
|
|
324
|
+
type ReferenceGameSourceManifest = z.infer<
|
|
325
|
+
typeof referenceGameSourceManifestSchema
|
|
326
|
+
>;
|
|
327
|
+
```
|
|
328
|
+
|
|
329
|
+
_No JSDoc summary is available yet._
|
|
330
|
+
|
|
331
|
+
### ReferenceGameSourceManifestPayload
|
|
332
|
+
|
|
333
|
+
```ts
|
|
334
|
+
type ReferenceGameSourceManifestPayload = z.infer<
|
|
335
|
+
typeof referenceGameSourceManifestPayloadSchema
|
|
336
|
+
>;
|
|
337
|
+
```
|
|
338
|
+
|
|
339
|
+
_No JSDoc summary is available yet._
|
|
340
|
+
|
|
341
|
+
### referenceGameSourceManifestPayloadSchema
|
|
342
|
+
|
|
343
|
+
```ts
|
|
344
|
+
declare const referenceGameSourceManifestPayloadSchema: ...;
|
|
345
|
+
```
|
|
346
|
+
|
|
347
|
+
_No JSDoc summary is available yet._
|
|
348
|
+
|
|
349
|
+
### referenceGameSourceManifestSchema
|
|
350
|
+
|
|
351
|
+
```ts
|
|
352
|
+
declare const referenceGameSourceManifestSchema: ...;
|
|
353
|
+
```
|
|
354
|
+
|
|
355
|
+
_No JSDoc summary is available yet._
|
|
356
|
+
|
|
357
|
+
### ReferenceGameSourceObject
|
|
358
|
+
|
|
359
|
+
```ts
|
|
360
|
+
type ReferenceGameSourceObject = z.infer<
|
|
361
|
+
typeof referenceGameSourceObjectSchema
|
|
362
|
+
>;
|
|
363
|
+
```
|
|
364
|
+
|
|
365
|
+
_No JSDoc summary is available yet._
|
|
366
|
+
|
|
367
|
+
### referenceGameSourceObjectSchema
|
|
368
|
+
|
|
369
|
+
```ts
|
|
370
|
+
const referenceGameSourceObjectSchema: z.ZodObject<
|
|
371
|
+
{
|
|
372
|
+
path: z.ZodString;
|
|
373
|
+
sha256: z.ZodString;
|
|
374
|
+
byteLength: z.ZodNumber;
|
|
375
|
+
},
|
|
376
|
+
z.core.$strict
|
|
377
|
+
>;
|
|
378
|
+
```
|
|
379
|
+
|
|
380
|
+
_No JSDoc summary is available yet._
|
|
381
|
+
|
|
382
|
+
### ReferenceGameSourceProvenance
|
|
383
|
+
|
|
384
|
+
```ts
|
|
385
|
+
type ReferenceGameSourceProvenance = z.infer<
|
|
386
|
+
typeof referenceGameSourceProvenanceSchema
|
|
387
|
+
>;
|
|
388
|
+
```
|
|
389
|
+
|
|
390
|
+
_No JSDoc summary is available yet._
|
|
391
|
+
|
|
392
|
+
### referenceGameSourceProvenanceSchema
|
|
393
|
+
|
|
394
|
+
```ts
|
|
395
|
+
const referenceGameSourceProvenanceSchema: z.ZodDiscriminatedUnion<
|
|
396
|
+
[
|
|
397
|
+
z.ZodObject<
|
|
398
|
+
{
|
|
399
|
+
kind: z.ZodLiteral<"worktree">;
|
|
400
|
+
},
|
|
401
|
+
z.core.$strict
|
|
402
|
+
>,
|
|
403
|
+
z.ZodObject<
|
|
404
|
+
{
|
|
405
|
+
kind: z.ZodLiteral<"git">;
|
|
406
|
+
repository: z.ZodLiteral<"dreamboard-games/dreamboard-sdk">;
|
|
407
|
+
revision: z.ZodString;
|
|
408
|
+
},
|
|
409
|
+
z.core.$strict
|
|
410
|
+
>,
|
|
411
|
+
],
|
|
412
|
+
"kind"
|
|
413
|
+
>;
|
|
414
|
+
```
|
|
415
|
+
|
|
416
|
+
_No JSDoc summary is available yet._
|
|
417
|
+
|
|
418
|
+
### ReferenceGameTeaching
|
|
419
|
+
|
|
420
|
+
```ts
|
|
421
|
+
type ReferenceGameTeaching = z.infer<typeof referenceGameTeachingSchema>;
|
|
422
|
+
```
|
|
423
|
+
|
|
424
|
+
_No JSDoc summary is available yet._
|
|
425
|
+
|
|
426
|
+
### referenceGameTeachingSchema
|
|
427
|
+
|
|
428
|
+
```ts
|
|
429
|
+
const referenceGameTeachingSchema: z.ZodObject<
|
|
430
|
+
{
|
|
431
|
+
whatThisTeaches: z.ZodArray<z.ZodString>;
|
|
432
|
+
whenToCopyThisPattern: z.ZodArray<z.ZodString>;
|
|
433
|
+
readFirst: z.ZodArray<z.ZodString>;
|
|
434
|
+
},
|
|
435
|
+
z.core.$strict
|
|
436
|
+
>;
|
|
437
|
+
```
|
|
438
|
+
|
|
439
|
+
_No JSDoc summary is available yet._
|
|
440
|
+
|
|
441
|
+
### ReferenceGameWorkspace
|
|
442
|
+
|
|
443
|
+
```ts
|
|
444
|
+
type ReferenceGameWorkspace = z.infer<typeof referenceGameWorkspaceSchema>;
|
|
445
|
+
```
|
|
446
|
+
|
|
447
|
+
_No JSDoc summary is available yet._
|
|
448
|
+
|
|
449
|
+
### referenceGameWorkspaceSchema
|
|
450
|
+
|
|
451
|
+
```ts
|
|
452
|
+
const referenceGameWorkspaceSchema: z.ZodObject<
|
|
453
|
+
{
|
|
454
|
+
manifest: z.ZodString;
|
|
455
|
+
reducer: z.ZodString;
|
|
456
|
+
ui: z.ZodString;
|
|
457
|
+
behaviorScenarios: z.ZodArray<z.ZodString>;
|
|
458
|
+
uiScenarios: z.ZodArray<z.ZodString>;
|
|
459
|
+
},
|
|
460
|
+
z.core.$strict
|
|
461
|
+
>;
|
|
462
|
+
```
|
|
463
|
+
|
|
464
|
+
_No JSDoc summary is available yet._
|
|
465
|
+
|
|
132
466
|
## @dreamboard-games/sdk/types
|
|
133
467
|
|
|
134
468
|
### ActionDefinition
|
|
@@ -2258,13 +2592,23 @@ function defineEffect(...args: never[]): unknown;
|
|
|
2258
2592
|
|
|
2259
2593
|
_No JSDoc summary is available yet._
|
|
2260
2594
|
|
|
2595
|
+
### defineEmptyView
|
|
2596
|
+
|
|
2597
|
+
```ts
|
|
2598
|
+
function defineEmptyView<
|
|
2599
|
+
Contract extends AnyReducerGameContract,
|
|
2600
|
+
>(): EmptyViewDefinition<ContractState<Contract>, ContractManifest<Contract>>;
|
|
2601
|
+
```
|
|
2602
|
+
|
|
2603
|
+
_No JSDoc summary is available yet._
|
|
2604
|
+
|
|
2261
2605
|
### defineGame
|
|
2262
2606
|
|
|
2263
2607
|
```ts
|
|
2264
2608
|
function defineGame<
|
|
2265
2609
|
const Contract extends AnyReducerGameContract,
|
|
2266
2610
|
Definitions extends PhaseMapOf<Contract>,
|
|
2267
|
-
Views extends ViewMapOf<Contract
|
|
2611
|
+
Views extends ViewMapOf<Contract>,
|
|
2268
2612
|
>(
|
|
2269
2613
|
definition: { contract: Contract } & Omit<
|
|
2270
2614
|
ReducerGameDefinition<NoInfer<Contract>, Definitions, Views>,
|
|
@@ -2336,6 +2680,49 @@ function definePhaseStage<
|
|
|
2336
2680
|
|
|
2337
2681
|
_No JSDoc summary is available yet._
|
|
2338
2682
|
|
|
2683
|
+
### definePlayerView
|
|
2684
|
+
|
|
2685
|
+
```ts
|
|
2686
|
+
function definePlayerView<Contract extends AnyReducerGameContract>(): <
|
|
2687
|
+
SharedProjection = unknown,
|
|
2688
|
+
Projection = unknown,
|
|
2689
|
+
>(
|
|
2690
|
+
definition: PlayerViewDefinition<
|
|
2691
|
+
ContractState<Contract>,
|
|
2692
|
+
ContractManifest<Contract>,
|
|
2693
|
+
SharedProjection,
|
|
2694
|
+
Projection
|
|
2695
|
+
>,
|
|
2696
|
+
) => PlayerViewDefinition<
|
|
2697
|
+
ContractState<Contract>,
|
|
2698
|
+
ContractManifest<Contract>,
|
|
2699
|
+
SharedProjection,
|
|
2700
|
+
Projection
|
|
2701
|
+
>;
|
|
2702
|
+
```
|
|
2703
|
+
|
|
2704
|
+
_No JSDoc summary is available yet._
|
|
2705
|
+
|
|
2706
|
+
### defineSharedView
|
|
2707
|
+
|
|
2708
|
+
```ts
|
|
2709
|
+
function defineSharedView<Contract extends AnyReducerGameContract>(): <
|
|
2710
|
+
Projection,
|
|
2711
|
+
>(
|
|
2712
|
+
definition: SharedViewDefinition<
|
|
2713
|
+
ContractState<Contract>,
|
|
2714
|
+
ContractManifest<Contract>,
|
|
2715
|
+
Projection
|
|
2716
|
+
>,
|
|
2717
|
+
) => SharedViewDefinition<
|
|
2718
|
+
ContractState<Contract>,
|
|
2719
|
+
ContractManifest<Contract>,
|
|
2720
|
+
Projection
|
|
2721
|
+
>;
|
|
2722
|
+
```
|
|
2723
|
+
|
|
2724
|
+
_No JSDoc summary is available yet._
|
|
2725
|
+
|
|
2339
2726
|
### defineStage
|
|
2340
2727
|
|
|
2341
2728
|
```ts
|
|
@@ -2359,7 +2746,7 @@ function defineStaticView<Contract extends AnyReducerGameContract>(): <
|
|
|
2359
2746
|
) => StaticViewDefinition<ExactManifestContractOf<Contract>, Projection>;
|
|
2360
2747
|
```
|
|
2361
2748
|
|
|
2362
|
-
Factory for the session-scoped static view (see {@link StaticViewDefinition}). Kept separate from
|
|
2749
|
+
Factory for the session-scoped static view (see {@link StaticViewDefinition}). Kept separate from dynamic view helpers because the argument shape is structurally different: it exposes only the manifest and generated static queries, with no `state`, `playerId`, `runtime`, `fx`, `ops`, or `accept/reject`. That shape is what prevents authors from accidentally projecting per-tick state into the once-per-session payload.
|
|
2363
2750
|
|
|
2364
2751
|
### defineStepPhase
|
|
2365
2752
|
|
|
@@ -2369,24 +2756,6 @@ function defineStepPhase(...args: never[]): unknown;
|
|
|
2369
2756
|
|
|
2370
2757
|
_No JSDoc summary is available yet._
|
|
2371
2758
|
|
|
2372
|
-
### defineView
|
|
2373
|
-
|
|
2374
|
-
```ts
|
|
2375
|
-
function defineView<Contract extends AnyReducerGameContract>(): <Projection>(
|
|
2376
|
-
definition: ViewDefinition<
|
|
2377
|
-
ContractState<Contract>,
|
|
2378
|
-
ContractManifest<Contract>,
|
|
2379
|
-
Projection
|
|
2380
|
-
>,
|
|
2381
|
-
) => ViewDefinition<
|
|
2382
|
-
ContractState<Contract>,
|
|
2383
|
-
ContractManifest<Contract>,
|
|
2384
|
-
Projection
|
|
2385
|
-
>;
|
|
2386
|
-
```
|
|
2387
|
-
|
|
2388
|
-
_No JSDoc summary is available yet._
|
|
2389
|
-
|
|
2390
2759
|
### DependencyValues
|
|
2391
2760
|
|
|
2392
2761
|
```ts
|
|
@@ -3075,6 +3444,23 @@ type ReducerPhaseDefinition<
|
|
|
3075
3444
|
|
|
3076
3445
|
_No JSDoc summary is available yet._
|
|
3077
3446
|
|
|
3447
|
+
### ReducerPlayerViewDefinition
|
|
3448
|
+
|
|
3449
|
+
```ts
|
|
3450
|
+
type ReducerPlayerViewDefinition<
|
|
3451
|
+
Contract extends AnyReducerGameContract,
|
|
3452
|
+
SharedProjection = unknown,
|
|
3453
|
+
Projection = unknown,
|
|
3454
|
+
> = PlayerViewDefinition<
|
|
3455
|
+
ContractState<Contract>,
|
|
3456
|
+
ContractManifest<Contract>,
|
|
3457
|
+
SharedProjection,
|
|
3458
|
+
Projection
|
|
3459
|
+
>;
|
|
3460
|
+
```
|
|
3461
|
+
|
|
3462
|
+
_No JSDoc summary is available yet._
|
|
3463
|
+
|
|
3078
3464
|
### ReducerReject
|
|
3079
3465
|
|
|
3080
3466
|
```ts
|
|
@@ -3095,6 +3481,21 @@ type ReducerResult<State> = ReducerAccept<State> | ReducerReject;
|
|
|
3095
3481
|
|
|
3096
3482
|
_No JSDoc summary is available yet._
|
|
3097
3483
|
|
|
3484
|
+
### ReducerSharedViewDefinition
|
|
3485
|
+
|
|
3486
|
+
```ts
|
|
3487
|
+
type ReducerSharedViewDefinition<
|
|
3488
|
+
Contract extends AnyReducerGameContract,
|
|
3489
|
+
Projection = unknown,
|
|
3490
|
+
> = SharedViewDefinition<
|
|
3491
|
+
ContractState<Contract>,
|
|
3492
|
+
ContractManifest<Contract>,
|
|
3493
|
+
Projection
|
|
3494
|
+
>;
|
|
3495
|
+
```
|
|
3496
|
+
|
|
3497
|
+
_No JSDoc summary is available yet._
|
|
3498
|
+
|
|
3098
3499
|
### ReducerStateBase
|
|
3099
3500
|
|
|
3100
3501
|
```ts
|
|
@@ -3129,21 +3530,6 @@ type ReducerValidationResult =
|
|
|
3129
3530
|
|
|
3130
3531
|
_No JSDoc summary is available yet._
|
|
3131
3532
|
|
|
3132
|
-
### ReducerViewDefinition
|
|
3133
|
-
|
|
3134
|
-
```ts
|
|
3135
|
-
type ReducerViewDefinition<
|
|
3136
|
-
Contract extends AnyReducerGameContract,
|
|
3137
|
-
Projection = unknown,
|
|
3138
|
-
> = ViewDefinition<
|
|
3139
|
-
ContractState<Contract>,
|
|
3140
|
-
ContractManifest<Contract>,
|
|
3141
|
-
Projection
|
|
3142
|
-
>;
|
|
3143
|
-
```
|
|
3144
|
-
|
|
3145
|
-
_No JSDoc summary is available yet._
|
|
3146
|
-
|
|
3147
3533
|
### rngInput
|
|
3148
3534
|
|
|
3149
3535
|
```ts
|
|
@@ -4545,6 +4931,23 @@ type EffectTypeTag = "rollDie" | "shuffleSharedZone" | "shufflePlayerZone";
|
|
|
4545
4931
|
|
|
4546
4932
|
Marker tag attached by `defineEffect` to every effect spec. `fx.effect` uses `type` to dispatch to the right wire-effect builder.
|
|
4547
4933
|
|
|
4934
|
+
### EmptyViewDefinition
|
|
4935
|
+
|
|
4936
|
+
```ts
|
|
4937
|
+
type EmptyViewDefinition<
|
|
4938
|
+
State extends {
|
|
4939
|
+
table: RuntimeTableRecord;
|
|
4940
|
+
flow: {
|
|
4941
|
+
currentPhase: string;
|
|
4942
|
+
};
|
|
4943
|
+
},
|
|
4944
|
+
Manifest extends ManifestContract<TableOfState<State>>,
|
|
4945
|
+
> = SharedViewDefinition<State, Manifest, Record<string, never>> &
|
|
4946
|
+
PlayerViewDefinition<State, Manifest, unknown, Record<string, never>>;
|
|
4947
|
+
```
|
|
4948
|
+
|
|
4949
|
+
_No JSDoc summary is available yet._
|
|
4950
|
+
|
|
4548
4951
|
### ErrorCodeOfContract
|
|
4549
4952
|
|
|
4550
4953
|
```ts
|
|
@@ -5792,6 +6195,14 @@ type PlayerPhaseDefinition = ...;
|
|
|
5792
6195
|
|
|
5793
6196
|
_No JSDoc summary is available yet._
|
|
5794
6197
|
|
|
6198
|
+
### PlayerViewDefinition
|
|
6199
|
+
|
|
6200
|
+
```ts
|
|
6201
|
+
type PlayerViewDefinition = ...;
|
|
6202
|
+
```
|
|
6203
|
+
|
|
6204
|
+
_No JSDoc summary is available yet._
|
|
6205
|
+
|
|
5795
6206
|
### PlayerZoneIdOfManifest
|
|
5796
6207
|
|
|
5797
6208
|
```ts
|
|
@@ -7292,6 +7703,30 @@ type SetupSelectionOfManifest<Manifest> = {
|
|
|
7292
7703
|
|
|
7293
7704
|
_No JSDoc summary is available yet._
|
|
7294
7705
|
|
|
7706
|
+
### SharedViewDefinition
|
|
7707
|
+
|
|
7708
|
+
```ts
|
|
7709
|
+
type SharedViewDefinition<
|
|
7710
|
+
State extends {
|
|
7711
|
+
table: RuntimeTableRecord;
|
|
7712
|
+
flow: {
|
|
7713
|
+
currentPhase: string;
|
|
7714
|
+
};
|
|
7715
|
+
},
|
|
7716
|
+
Manifest extends ManifestContract<TableOfState<State>>,
|
|
7717
|
+
Projection = unknown,
|
|
7718
|
+
> = {
|
|
7719
|
+
project: (
|
|
7720
|
+
args: ActionContext<State, Manifest> &
|
|
7721
|
+
RuntimeHelpers<State> & {
|
|
7722
|
+
state: State;
|
|
7723
|
+
},
|
|
7724
|
+
) => Projection;
|
|
7725
|
+
};
|
|
7726
|
+
```
|
|
7727
|
+
|
|
7728
|
+
_No JSDoc summary is available yet._
|
|
7729
|
+
|
|
7295
7730
|
### SharedZoneIdOfManifest
|
|
7296
7731
|
|
|
7297
7732
|
```ts
|
|
@@ -8078,14 +8513,6 @@ type VertexTypeIdOfManifest<Manifest> = Manifest extends {
|
|
|
8078
8513
|
|
|
8079
8514
|
_No JSDoc summary is available yet._
|
|
8080
8515
|
|
|
8081
|
-
### ViewDefinition
|
|
8082
|
-
|
|
8083
|
-
```ts
|
|
8084
|
-
type ViewDefinition = ...;
|
|
8085
|
-
```
|
|
8086
|
-
|
|
8087
|
-
_No JSDoc summary is available yet._
|
|
8088
|
-
|
|
8089
8516
|
### ViewDefinitionByName
|
|
8090
8517
|
|
|
8091
8518
|
```ts
|
|
@@ -8100,14 +8527,23 @@ _No JSDoc summary is available yet._
|
|
|
8100
8527
|
### ViewMapOf
|
|
8101
8528
|
|
|
8102
8529
|
```ts
|
|
8103
|
-
type ViewMapOf<
|
|
8104
|
-
|
|
8105
|
-
|
|
8530
|
+
type ViewMapOf<
|
|
8531
|
+
Contract,
|
|
8532
|
+
SharedProjection = unknown,
|
|
8533
|
+
PlayerProjection = unknown,
|
|
8534
|
+
> = {
|
|
8535
|
+
shared: SharedViewDefinition<
|
|
8106
8536
|
BaseGameStateOfContract<Contract>,
|
|
8107
8537
|
ManifestContractOf<Contract>,
|
|
8108
|
-
|
|
8109
|
-
|
|
8110
|
-
|
|
8538
|
+
SharedProjection
|
|
8539
|
+
>;
|
|
8540
|
+
player: PlayerViewDefinition<
|
|
8541
|
+
BaseGameStateOfContract<Contract>,
|
|
8542
|
+
ManifestContractOf<Contract>,
|
|
8543
|
+
SharedProjection,
|
|
8544
|
+
PlayerProjection
|
|
8545
|
+
>;
|
|
8546
|
+
};
|
|
8111
8547
|
```
|
|
8112
8548
|
|
|
8113
8549
|
_No JSDoc summary is available yet._
|
|
@@ -8143,9 +8579,9 @@ _No JSDoc summary is available yet._
|
|
|
8143
8579
|
|
|
8144
8580
|
```ts
|
|
8145
8581
|
type ViewsOfDefinition<Definition> = Definition extends {
|
|
8146
|
-
views
|
|
8582
|
+
views: infer Views;
|
|
8147
8583
|
}
|
|
8148
|
-
?
|
|
8584
|
+
? Views
|
|
8149
8585
|
: never;
|
|
8150
8586
|
```
|
|
8151
8587
|
|
|
@@ -19892,10 +20328,7 @@ _No JSDoc summary is available yet._
|
|
|
19892
20328
|
### GENERATED_WORKSPACE_PATH_PATTERNS
|
|
19893
20329
|
|
|
19894
20330
|
```ts
|
|
19895
|
-
const GENERATED_WORKSPACE_PATH_PATTERNS:
|
|
19896
|
-
prefix: string;
|
|
19897
|
-
suffix: string;
|
|
19898
|
-
}[];
|
|
20331
|
+
const GENERATED_WORKSPACE_PATH_PATTERNS: readonly GeneratedWorkspacePathPattern[];
|
|
19899
20332
|
```
|
|
19900
20333
|
|
|
19901
20334
|
_No JSDoc summary is available yet._
|
|
@@ -21213,6 +21646,75 @@ declare const uiStepExpectationSchema: z.ZodObject<
|
|
|
21213
21646
|
|
|
21214
21647
|
_No JSDoc summary is available yet._
|
|
21215
21648
|
|
|
21649
|
+
## @dreamboard-games/sdk/testing-runtime
|
|
21650
|
+
|
|
21651
|
+
### CandidateVerificationBase
|
|
21652
|
+
|
|
21653
|
+
```ts
|
|
21654
|
+
type CandidateVerificationBase =
|
|
21655
|
+
| BaseStateArtifact
|
|
21656
|
+
| (BaseDefinition & Partial<BaseStateArtifact>);
|
|
21657
|
+
```
|
|
21658
|
+
|
|
21659
|
+
_No JSDoc summary is available yet._
|
|
21660
|
+
|
|
21661
|
+
### CandidateVerificationInput
|
|
21662
|
+
|
|
21663
|
+
```ts
|
|
21664
|
+
type CandidateVerificationInput = ...;
|
|
21665
|
+
```
|
|
21666
|
+
|
|
21667
|
+
_No JSDoc summary is available yet._
|
|
21668
|
+
|
|
21669
|
+
### CandidateVerificationResult
|
|
21670
|
+
|
|
21671
|
+
```ts
|
|
21672
|
+
type CandidateVerificationResult = {
|
|
21673
|
+
readonly status: "passed" | "failed";
|
|
21674
|
+
readonly scenarioSummary: {
|
|
21675
|
+
readonly total: number;
|
|
21676
|
+
readonly passed: number;
|
|
21677
|
+
readonly failed: number;
|
|
21678
|
+
readonly scenarios: readonly CandidateVerificationScenarioResult[];
|
|
21679
|
+
};
|
|
21680
|
+
};
|
|
21681
|
+
```
|
|
21682
|
+
|
|
21683
|
+
_No JSDoc summary is available yet._
|
|
21684
|
+
|
|
21685
|
+
### CandidateVerificationScenario
|
|
21686
|
+
|
|
21687
|
+
```ts
|
|
21688
|
+
type CandidateVerificationScenario = ScenarioDefinition;
|
|
21689
|
+
```
|
|
21690
|
+
|
|
21691
|
+
_No JSDoc summary is available yet._
|
|
21692
|
+
|
|
21693
|
+
### CandidateVerificationScenarioResult
|
|
21694
|
+
|
|
21695
|
+
```ts
|
|
21696
|
+
type CandidateVerificationScenarioResult = {
|
|
21697
|
+
readonly id: string;
|
|
21698
|
+
readonly status: "passed" | "failed";
|
|
21699
|
+
readonly diagnostic?: {
|
|
21700
|
+
readonly kind: "assertion";
|
|
21701
|
+
readonly message: string;
|
|
21702
|
+
};
|
|
21703
|
+
};
|
|
21704
|
+
```
|
|
21705
|
+
|
|
21706
|
+
_No JSDoc summary is available yet._
|
|
21707
|
+
|
|
21708
|
+
### runCandidateVerification
|
|
21709
|
+
|
|
21710
|
+
```ts
|
|
21711
|
+
function runCandidateVerification(
|
|
21712
|
+
input: CandidateVerificationInput,
|
|
21713
|
+
): Promise<CandidateVerificationResult>;
|
|
21714
|
+
```
|
|
21715
|
+
|
|
21716
|
+
_No JSDoc summary is available yet._
|
|
21717
|
+
|
|
21216
21718
|
## @dreamboard-games/sdk/browser-interaction
|
|
21217
21719
|
|
|
21218
21720
|
### actuatorIdentityKey
|