@dreamboard-games/sdk 0.4.0-alpha.7 → 0.4.0-alpha.9
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 +1292 -287
- package/dist/authoring/index.d.ts +4 -9
- 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 +12 -0
- package/dist/authoring-compiler.js.map +1 -0
- package/dist/authoring-materialize-cli.d.ts +1 -0
- package/dist/authoring-materialize-cli.js +46 -0
- package/dist/authoring-materialize-cli.js.map +1 -0
- package/dist/browser-interaction.d.ts +1 -1
- package/dist/{chunk-TGMXBRKY.js → chunk-3PFDHTR7.js} +19 -7
- package/dist/chunk-3PFDHTR7.js.map +1 -0
- package/dist/chunk-45P5CEGH.js +176 -0
- package/dist/chunk-45P5CEGH.js.map +1 -0
- package/dist/chunk-5XTAQ4EQ.js +32 -0
- package/dist/chunk-5XTAQ4EQ.js.map +1 -0
- package/dist/chunk-7ADPYKFT.js +532 -0
- package/dist/chunk-7ADPYKFT.js.map +1 -0
- package/dist/{chunk-RKGJ64UN.js → chunk-BUOODBVO.js} +2 -2
- package/dist/{chunk-VLG4YST5.js → chunk-GMOBG7Y7.js} +4 -4
- package/dist/{chunk-Q322XCY2.js → chunk-JRGP6W4V.js} +3 -3
- package/dist/chunk-L3W2FPRQ.js +1793 -0
- package/dist/chunk-L3W2FPRQ.js.map +1 -0
- package/dist/{chunk-3QIZKXJ2.js → chunk-NGYFBNBP.js} +3 -3
- package/dist/chunk-P6IJ5YVY.js +154 -0
- package/dist/chunk-P6IJ5YVY.js.map +1 -0
- package/dist/{chunk-5IHU5CUK.js → chunk-QQNL4WTX.js} +25 -22
- package/dist/chunk-QQNL4WTX.js.map +1 -0
- package/dist/{chunk-52DH7VQF.js → chunk-SACZWUA6.js} +143 -47
- package/dist/chunk-SACZWUA6.js.map +1 -0
- package/dist/{chunk-KYEWGZ2Y.js → chunk-SFOAY5H4.js} +2 -2
- package/dist/{chunk-KYEWGZ2Y.js.map → chunk-SFOAY5H4.js.map} +1 -1
- package/dist/chunk-UNVCT5Z7.js +73 -0
- package/dist/chunk-UNVCT5Z7.js.map +1 -0
- package/dist/{chunk-NO537WSS.js → chunk-WDR7SKBM.js} +2 -2
- package/dist/chunk-XDGRC6OR.js +7039 -0
- package/dist/chunk-XDGRC6OR.js.map +1 -0
- package/dist/chunk-XLHLFTLI.js +399 -0
- package/dist/chunk-XLHLFTLI.js.map +1 -0
- package/dist/{chunk-B2YBS3SG.js → chunk-YNW3KBDE.js} +41 -13
- package/dist/chunk-YNW3KBDE.js.map +1 -0
- package/dist/codegen.js +1 -1
- package/dist/{components-BTwSIjXj.d.ts → components-BPzsSRs8.d.ts} +1 -1
- package/dist/definitions-0kjPV9wh.d.ts +294 -0
- package/dist/{diagnostics-1BWjRo6-.d.ts → diagnostics-DIi3ina7.d.ts} +2 -1
- package/dist/{index-CFTjJIXd.d.ts → index-CWzWpQzM.d.ts} +1 -1
- package/dist/{index.d-DMASeF6M.d.ts → index.d-C7Ztirg6.d.ts} +234 -5
- 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-B2LWcqB4.d.ts} +14 -0
- package/dist/reducer/advanced.d.ts +4 -4
- package/dist/reducer/advanced.js +7 -26
- package/dist/reducer/advanced.js.map +1 -1
- package/dist/reducer-contract.d.ts +1 -1
- package/dist/reducer-contract.js +2 -2
- package/dist/reducer.d.ts +37 -28
- package/dist/reducer.js +43 -6018
- package/dist/reducer.js.map +1 -1
- package/dist/reference-game-compiler.d.ts +45 -0
- package/dist/reference-game-compiler.js +25 -0
- package/dist/reference-game-compiler.js.map +1 -0
- package/dist/reference-game-source-manifest-cli.d.ts +1 -0
- package/dist/reference-game-source-manifest-cli.js +84 -0
- package/dist/reference-game-source-manifest-cli.js.map +1 -0
- package/dist/reference-games/index.d.ts +7 -217
- package/dist/reference-games/index.js +28 -208
- package/dist/reference-games/index.js.map +1 -1
- package/dist/runtime/primitives.d.ts +3 -3
- package/dist/runtime/primitives.js +3 -3
- package/dist/runtime/runtime-api.d.ts +1 -1
- package/dist/runtime/workspace-contract.d.ts +4 -4
- package/dist/runtime/workspace-contract.js +4 -4
- package/dist/{runtime-Dkfm1x2r.d.ts → runtime-B_w9AO2n.d.ts} +60 -5
- package/dist/{runtime-api-C6aWo9c0.d.ts → runtime-api-xCWLMQRT.d.ts} +2 -0
- package/dist/runtime.d.ts +7 -7
- package/dist/runtime.js +13 -13
- package/dist/schema-9jZzlEWZ.d.ts +220 -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 +36 -0
- package/dist/testing-compiler.js +236 -0
- package/dist/testing-compiler.js.map +1 -0
- package/dist/testing-runtime.d.ts +97 -21
- package/dist/testing-runtime.js +154 -95
- package/dist/testing-runtime.js.map +1 -1
- package/dist/testing.d.ts +178 -60
- package/dist/testing.js +641 -26
- package/dist/testing.js.map +1 -1
- package/dist/types-Bvptkukh.d.ts +122 -0
- package/dist/{types-aI4V9CWe.d.ts → types-_zfC_7CD.d.ts} +1 -1
- package/dist/types.d.ts +4 -0
- package/dist/ui/components.d.ts +2 -2
- package/dist/ui/plugin-styles.css +1 -1
- package/dist/{ui-contract-Ue6SywvO.d.ts → ui-contract-CUC7Lyoc.d.ts} +1 -1
- package/dist/ui.d.ts +3 -3
- package/dist/{views-32rSsfeU.d.ts → views-DE2eZxPz.d.ts} +42 -13
- package/package.json +22 -3
- package/dist/chunk-3OZMHZK3.js +0 -40
- package/dist/chunk-3OZMHZK3.js.map +0 -1
- package/dist/chunk-52DH7VQF.js.map +0 -1
- package/dist/chunk-5IHU5CUK.js.map +0 -1
- package/dist/chunk-B2YBS3SG.js.map +0 -1
- package/dist/chunk-IU6KGPY7.js +0 -659
- package/dist/chunk-IU6KGPY7.js.map +0 -1
- package/dist/chunk-TGMXBRKY.js.map +0 -1
- package/dist/types-DcADVHe9.d.ts +0 -192
- /package/dist/{chunk-RKGJ64UN.js.map → chunk-BUOODBVO.js.map} +0 -0
- /package/dist/{chunk-VLG4YST5.js.map → chunk-GMOBG7Y7.js.map} +0 -0
- /package/dist/{chunk-Q322XCY2.js.map → chunk-JRGP6W4V.js.map} +0 -0
- /package/dist/{chunk-3QIZKXJ2.js.map → chunk-NGYFBNBP.js.map} +0 -0
- /package/dist/{chunk-NO537WSS.js.map → chunk-WDR7SKBM.js.map} +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
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 {
|
|
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
|
|
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-B_w9AO2n.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-B_w9AO2n.js';
|
|
3
|
+
import { aH as ReducerGameContractLike, au as PhaseMapOf, bc as ViewMapOf, aI as ReducerGameDefinition } from '../views-DE2eZxPz.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-DE2eZxPz.js';
|
|
5
5
|
import 'zod';
|
|
6
6
|
import '../types.js';
|
|
7
7
|
|
package/dist/reducer/advanced.js
CHANGED
|
@@ -1,42 +1,22 @@
|
|
|
1
|
+
import {
|
|
2
|
+
createClientParamSchemasByPhase
|
|
3
|
+
} from "../chunk-5XTAQ4EQ.js";
|
|
1
4
|
import {
|
|
2
5
|
FrameworkErrorCodes,
|
|
3
6
|
applySetupBootstrap,
|
|
4
7
|
assumeManifestSchema,
|
|
5
8
|
cloneManifestDefault,
|
|
6
|
-
collectReducerDefinitionIndex,
|
|
7
9
|
createManifestGameStateSchema,
|
|
8
10
|
createManifestRuntimeSchema,
|
|
9
11
|
createManifestStringLiteralSchema,
|
|
10
12
|
isManifestScopedSchema,
|
|
13
|
+
manifestSchemaFamily,
|
|
11
14
|
markManifestScopedSchema,
|
|
12
15
|
resolveManifestPlayerIds
|
|
13
|
-
} from "../chunk-
|
|
16
|
+
} from "../chunk-YNW3KBDE.js";
|
|
17
|
+
import "../chunk-3PFDHTR7.js";
|
|
14
18
|
import "../chunk-PZ5AY32C.js";
|
|
15
19
|
|
|
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
20
|
// src/reducer/setup-bootstrap-helpers.ts
|
|
41
21
|
function shuffle(container) {
|
|
42
22
|
return {
|
|
@@ -130,6 +110,7 @@ export {
|
|
|
130
110
|
dealToPlayerBoardContainer,
|
|
131
111
|
dealToPlayerZone,
|
|
132
112
|
isManifestScopedSchema,
|
|
113
|
+
manifestSchemaFamily,
|
|
133
114
|
markManifestScopedSchema,
|
|
134
115
|
resolveManifestPlayerIds,
|
|
135
116
|
seedSharedBoardContainer,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/reducer/
|
|
1
|
+
{"version":3,"sources":["../../src/reducer/setup-bootstrap-helpers.ts"],"sourcesContent":["import type {\n CardIdOfManifest,\n DieIdOfManifest,\n GeneratedManifestContractLike,\n PieceIdOfManifest,\n PlayerIdOfManifest,\n SetupBootstrapContainerRef,\n SetupBootstrapPerPlayerContainerTemplateRef,\n SetupBootstrapStep,\n SetupBootstrapDestinationRef,\n} from \"./model\";\n\nexport function shuffle<\n Manifest extends GeneratedManifestContractLike =\n GeneratedManifestContractLike,\n>(\n container: SetupBootstrapContainerRef<Manifest>,\n): SetupBootstrapStep<Manifest> {\n return {\n type: \"shuffle\",\n container,\n };\n}\n\nexport function dealToPlayerZone<\n Manifest extends GeneratedManifestContractLike =\n GeneratedManifestContractLike,\n>({\n from,\n zoneId,\n count,\n playerIds,\n}: {\n from: Extract<\n SetupBootstrapContainerRef<Manifest>,\n { type: \"sharedZone\" | \"sharedBoardContainer\" }\n >;\n zoneId: Extract<\n SetupBootstrapPerPlayerContainerTemplateRef<Manifest>,\n { type: \"playerZone\" }\n >[\"zoneId\"];\n count: number;\n playerIds?: readonly PlayerIdOfManifest<Manifest>[];\n}): SetupBootstrapStep<Manifest> {\n return {\n type: \"deal\",\n from,\n to: {\n type: \"playerZone\",\n zoneId,\n } as SetupBootstrapPerPlayerContainerTemplateRef<Manifest>,\n count,\n playerIds,\n };\n}\n\nexport function dealToPlayerBoardContainer<\n Manifest extends GeneratedManifestContractLike =\n GeneratedManifestContractLike,\n>({\n from,\n boardId,\n containerId,\n count,\n playerIds,\n}: {\n from: Extract<\n SetupBootstrapContainerRef<Manifest>,\n { type: \"sharedZone\" | \"sharedBoardContainer\" }\n >;\n boardId: Extract<\n SetupBootstrapPerPlayerContainerTemplateRef<Manifest>,\n { type: \"playerBoardContainer\" }\n >[\"boardId\"];\n containerId: Extract<\n SetupBootstrapPerPlayerContainerTemplateRef<Manifest>,\n { type: \"playerBoardContainer\" }\n >[\"containerId\"];\n count: number;\n playerIds?: readonly PlayerIdOfManifest<Manifest>[];\n}): SetupBootstrapStep<Manifest> {\n return {\n type: \"deal\",\n from,\n to: {\n type: \"playerBoardContainer\",\n boardId,\n containerId,\n } as SetupBootstrapPerPlayerContainerTemplateRef<Manifest>,\n count,\n playerIds,\n };\n}\n\nexport function seedSharedBoardContainer<\n Manifest extends GeneratedManifestContractLike =\n GeneratedManifestContractLike,\n>({\n from,\n boardId,\n containerId,\n count,\n componentIds,\n}: {\n from: SetupBootstrapContainerRef<Manifest>;\n boardId: Extract<\n SetupBootstrapDestinationRef<Manifest>,\n { type: \"sharedBoardContainer\" }\n >[\"boardId\"];\n containerId: Extract<\n SetupBootstrapDestinationRef<Manifest>,\n { type: \"sharedBoardContainer\" }\n >[\"containerId\"];\n count?: number;\n componentIds?: readonly (\n | CardIdOfManifest<Manifest>\n | PieceIdOfManifest<Manifest>\n | DieIdOfManifest<Manifest>\n )[];\n}): SetupBootstrapStep<Manifest> {\n return {\n type: \"move\",\n from,\n to: {\n type: \"sharedBoardContainer\",\n boardId,\n containerId,\n } as SetupBootstrapDestinationRef<Manifest>,\n count,\n componentIds,\n };\n}\n\nexport function seedSharedBoardSpace<\n Manifest extends GeneratedManifestContractLike =\n GeneratedManifestContractLike,\n>({\n from,\n boardId,\n spaceId,\n count,\n componentIds,\n}: {\n from: SetupBootstrapContainerRef<Manifest>;\n boardId: Extract<\n SetupBootstrapDestinationRef<Manifest>,\n { type: \"sharedBoardSpace\" }\n >[\"boardId\"];\n spaceId: Extract<\n SetupBootstrapDestinationRef<Manifest>,\n { type: \"sharedBoardSpace\" }\n >[\"spaceId\"];\n count?: number;\n componentIds?: readonly (\n | CardIdOfManifest<Manifest>\n | PieceIdOfManifest<Manifest>\n | DieIdOfManifest<Manifest>\n )[];\n}): SetupBootstrapStep<Manifest> {\n return {\n type: \"move\",\n from,\n to: {\n type: \"sharedBoardSpace\",\n boardId,\n spaceId,\n } as SetupBootstrapDestinationRef<Manifest>,\n count,\n componentIds,\n };\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAYO,SAAS,QAId,WAC8B;AAC9B,SAAO;AAAA,IACL,MAAM;AAAA,IACN;AAAA,EACF;AACF;AAEO,SAAS,iBAGd;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,GAWiC;AAC/B,SAAO;AAAA,IACL,MAAM;AAAA,IACN;AAAA,IACA,IAAI;AAAA,MACF,MAAM;AAAA,MACN;AAAA,IACF;AAAA,IACA;AAAA,IACA;AAAA,EACF;AACF;AAEO,SAAS,2BAGd;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,GAeiC;AAC/B,SAAO;AAAA,IACL,MAAM;AAAA,IACN;AAAA,IACA,IAAI;AAAA,MACF,MAAM;AAAA,MACN;AAAA,MACA;AAAA,IACF;AAAA,IACA;AAAA,IACA;AAAA,EACF;AACF;AAEO,SAAS,yBAGd;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,GAgBiC;AAC/B,SAAO;AAAA,IACL,MAAM;AAAA,IACN;AAAA,IACA,IAAI;AAAA,MACF,MAAM;AAAA,MACN;AAAA,MACA;AAAA,IACF;AAAA,IACA;AAAA,IACA;AAAA,EACF;AACF;AAEO,SAAS,qBAGd;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,GAgBiC;AAC/B,SAAO;AAAA,IACL,MAAM;AAAA,IACN;AAAA,IACA,IAAI;AAAA,MACF,MAAM;AAAA,MACN;AAAA,MACA;AAAA,IACF;AAAA,IACA;AAAA,IACA;AAAA,EACF;AACF;","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 } from './index.d-C7Ztirg6.js';
|
|
2
2
|
export { materializeManifestTable } from './codegen.js';
|
|
3
3
|
import 'zod';
|
package/dist/reducer-contract.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
materializeManifestTable
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-SACZWUA6.js";
|
|
4
4
|
import {
|
|
5
5
|
REDUCER_CONTRACT_VERSION,
|
|
6
6
|
zod_exports
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-3PFDHTR7.js";
|
|
8
8
|
import "./chunk-PZ5AY32C.js";
|
|
9
9
|
export {
|
|
10
10
|
REDUCER_CONTRACT_VERSION,
|
package/dist/reducer.d.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { V as GeneratedManifestContractLike,
|
|
3
|
-
export { h as BoardRef, R as FrameworkErrorCodes, S as GameEvent, T as GameEventDetail, U as GameOutcome,
|
|
4
|
-
import { j as BaseGameStateOfContract,
|
|
5
|
-
export { J as DerivedDefinition,
|
|
6
|
-
import { a as ReducerBundleContract } from './index.d-
|
|
7
|
-
import { a as ReducerDiagnosticsSink } from './diagnostics-
|
|
8
|
-
export { D as DispatchTraceSummaryEntry, R as ReducerDiagnosticEvent, n as noopDiagnosticsSink } from './diagnostics-
|
|
9
|
-
export { S as StaleContractArtifactError, a as StaleContractArtifactErrorOptions, b as StaleContractArtifactKind, i as isStaleContractArtifactError } from './stale-contract-artifact-error-
|
|
2
|
+
import { V as GeneratedManifestContractLike, bV as RuntimeTableRecord, cC as StateDefinition, c1 as SchemaLike, ac as ManifestContractOf, N as ErrorCodeOfContract, af as ManifestIdSchema, aT as ReducerManifestContract, aG as PlayerIdOfState, cL as TableQueriesOfState, o as CardIdOfState, ab as ManifestContract, cJ as TableOfState, cj as SetupSelectionOfManifest, cU as TiledVertexIdOfTable, cI as TableOfManifest, cM as TiledBoardIdOfTable, cO as TiledEdgeIdOfTable, cS as TiledSpaceIdOfTable, n as CardIdOfManifest, O as ExactManifestContractOf, av as PhaseNameOfContract, aI as PlayerZoneIdOfManifest, az as PhaseSchemasOfContract, a as AnySchema, cH as SystemActionEvent, cK as TableQueries, e as BoardIdOfTable, c as BoardContainerIdOfTable } from './runtime-B_w9AO2n.js';
|
|
3
|
+
export { h as BoardRef, R as FrameworkErrorCodes, S as GameEvent, T as GameEventDetail, U as GameOutcome, al as OutcomeResult, am as OutcomeScoreComponent, an as OutcomeStanding, ao as OutcomeTieBreak, ap as PerPlayer, aq as PerPlayerBoardRef, ar as PerPlayerSchemaOptions, aE as PlayerId, aP as ReducerAccept, aQ as ReducerAcceptOptions, aU as ReducerReject, aV as ReducerResult, aY as ReducerValidationResult, ck as SharedBoardRef, cZ as asPlayerId, c$ as boardRef, d0 as boardRefKey, d1 as boardRefSchema, d7 as isPerPlayer, d8 as isPerPlayerBoardRef, d9 as isPlayerId, da as isSharedBoardRef, dd as parseBoardRefKey, de as perPlayer, df as perPlayerBoardRef, dg as perPlayerEntries, dh as perPlayerGet, di as perPlayerHas, dj as perPlayerKeys, dk as perPlayerMap, dl as perPlayerRequire, dm as perPlayerSchema, dn as perPlayerSet, dp as perPlayerSize, dq as perPlayerValues, ds as sharedBoardRef } from './runtime-B_w9AO2n.js';
|
|
4
|
+
import { j as BaseGameStateOfContract, aq as PhaseDefinition, aB as PlayerViewDefinition, aZ as SharedViewDefinition, aG as ReducerGameContract, Z as InputCollector, y as CollectorState, K as DerivedResolver, ba as ValidationIssue, b9 as TargetKind, a4 as InputSelectionDescriptor, a1 as InputDomainDescriptor, n as BoardTargetDomainDescriptor, l as BoardInputCollectorMeta, f as AnyInteractionSpec, d as AnyCardActionSpec, R as EffectMap, aY as ScopedPhaseState, b4 as StageMap, ay as PhaseZoneList, C as CardActionMap, au as PhaseMapOf, bc as ViewMapOf, aI as ReducerGameDefinition, W as EmptyViewDefinition, b7 as StaticViewDefinition, af as InteractionSpec, p as CardActionSpec, ad as InteractionRule, aa as InteractionMap, z as ContinuationCallable, T as EffectRollDieDefinition, U as EffectShuffleDefinition, V as EffectShufflePlayerZoneDefinition, b6 as StageSpec, aH as ReducerGameContractLike } from './views-DE2eZxPz.js';
|
|
5
|
+
export { J as DerivedDefinition, X as GameStateOf, Y as InitialStateCallbacks, an as Op, aF as ReducerEdit, aJ as ReducerOps, aL as ReducerStateBase, aN as ReducerTransaction, aW as RotatePlayerZoneArgs, bh as createDerivedResolver, bi as createReducerEdit, bj as createReducerOps, bk as createReducerTransaction, bl as defineDerived, bm as pipe } from './views-DE2eZxPz.js';
|
|
6
|
+
import { a as ReducerBundleContract, w as wire } from './index.d-C7Ztirg6.js';
|
|
7
|
+
import { a as ReducerDiagnosticsSink } from './diagnostics-DIi3ina7.js';
|
|
8
|
+
export { D as DispatchTraceSummaryEntry, R as ReducerDiagnosticEvent, n as noopDiagnosticsSink } from './diagnostics-DIi3ina7.js';
|
|
9
|
+
export { S as StaleContractArtifactError, a as StaleContractArtifactErrorOptions, b as StaleContractArtifactKind, i as isStaleContractArtifactError } from './stale-contract-artifact-error-XLaweZtF.js';
|
|
10
10
|
import './types.js';
|
|
11
11
|
|
|
12
12
|
type AnyReducerGameContract = {
|
|
@@ -19,7 +19,8 @@ type ContractState<Contract extends AnyReducerGameContract> = BaseGameStateOfCon
|
|
|
19
19
|
type ContractManifest<Contract extends AnyReducerGameContract> = ManifestContractOf<Contract>;
|
|
20
20
|
type ContractErrorCode<Contract extends AnyReducerGameContract> = ErrorCodeOfContract<Contract>;
|
|
21
21
|
type ReducerPhaseDefinition<Contract extends AnyReducerGameContract, PhaseStateSchema extends SchemaLike<object>> = PhaseDefinition<PhaseStateSchema, ContractState<Contract>, ContractManifest<Contract>>;
|
|
22
|
-
type
|
|
22
|
+
type ReducerSharedViewDefinition<Contract extends AnyReducerGameContract, Projection = unknown> = SharedViewDefinition<ContractState<Contract>, ContractManifest<Contract>, Projection>;
|
|
23
|
+
type ReducerPlayerViewDefinition<Contract extends AnyReducerGameContract, SharedProjection = unknown, Projection = unknown> = PlayerViewDefinition<ContractState<Contract>, ContractManifest<Contract>, SharedProjection, Projection>;
|
|
23
24
|
|
|
24
25
|
type ManifestIdSchemasOf<Ids extends Record<string, SchemaLike<unknown>>> = {
|
|
25
26
|
readonly [Key in keyof Ids]: Ids[Key] extends SchemaLike<infer Output> ? Ids[Key] & ManifestIdSchema<Output> : Ids[Key];
|
|
@@ -341,10 +342,15 @@ declare const boardTarget: {
|
|
|
341
342
|
playerSpace<State extends CollectorState, BoardId extends string, SpaceId extends string>(boardId: BoardId): BoardTargetBuilder<State, PlayerBoardSpaceTarget<BoardId, SpaceId, PlayerIdOfState<State>>>;
|
|
342
343
|
};
|
|
343
344
|
|
|
345
|
+
type PlayerSpaceInputSchema<BoardId extends string, SpaceId extends string, PlayerId extends string> = z.ZodObject<{
|
|
346
|
+
boardId: z.ZodLiteral<BoardId>;
|
|
347
|
+
playerId: ManifestIdSchema<PlayerId, "playerId">;
|
|
348
|
+
spaceId: z.ZodType<SpaceId>;
|
|
349
|
+
}>;
|
|
344
350
|
declare function playerSpaceInput<State extends CollectorState = CollectorState, BoardId extends string = string, SpaceId extends string = string, PlayerId extends string = string>(options: {
|
|
345
351
|
target: BoardTargetRule<State, PlayerBoardSpaceTarget<BoardId, SpaceId, PlayerId>>;
|
|
346
352
|
dependsOn?: readonly InputFieldRef<string, unknown>[];
|
|
347
|
-
}): InputCollector<
|
|
353
|
+
}): InputCollector<PlayerSpaceInputSchema<BoardId, SpaceId, PlayerId>, State, "board-space">;
|
|
348
354
|
declare const boardInput: {
|
|
349
355
|
vertex: <State extends CollectorState = CollectorState, Id extends string = string>(options: {
|
|
350
356
|
target: BoardTargetRule<State, Id>;
|
|
@@ -531,7 +537,7 @@ type CollectorKindOf<Collector extends NonRngCollector> = [Collector] extends [
|
|
|
531
537
|
readonly kind: infer Kind extends Exclude<InputCollector["kind"], "rng">;
|
|
532
538
|
}
|
|
533
539
|
] ? Kind : never;
|
|
534
|
-
type ManyInputCollector<Schema extends SchemaLike<unknown> = SchemaLike<unknown>, State extends CollectorState = CollectorState, Kind extends Exclude<InputCollector["kind"], "rng"> = Exclude<InputCollector["kind"], "rng">> = InputCollector<z.
|
|
540
|
+
type ManyInputCollector<Schema extends SchemaLike<unknown> = SchemaLike<unknown>, State extends CollectorState = CollectorState, Kind extends Exclude<InputCollector["kind"], "rng"> = Exclude<InputCollector["kind"], "rng">> = InputCollector<z.ZodArray<Schema>, State, Kind> & {
|
|
535
541
|
readonly selection: Extract<InputSelectionDescriptor, {
|
|
536
542
|
mode: "many";
|
|
537
543
|
}>;
|
|
@@ -619,7 +625,7 @@ type BoundBoardInputs<Contract extends ContractWithPhases> = {
|
|
|
619
625
|
playerSpace<BoardId extends string = string, SpaceId extends string = string, PlayerId extends string = PlayerIdOfState<BoundState<Contract>>>(options: {
|
|
620
626
|
target: BoardTargetRule<BoundState<Contract>, PlayerBoardSpaceTarget<BoardId, SpaceId, PlayerId>>;
|
|
621
627
|
dependsOn?: readonly InputFieldRef<string, unknown>[];
|
|
622
|
-
}): InputCollector<
|
|
628
|
+
}): InputCollector<PlayerSpaceInputSchema<BoardId, SpaceId, PlayerId>, BoundState<Contract>, "board-space">;
|
|
623
629
|
};
|
|
624
630
|
type BoundCardInput<Contract extends ContractWithPhases> = <Id extends string = CardIdOfManifest<BoundManifest<Contract>>, const ZoneIds extends readonly string[] = readonly string[]>(options: {
|
|
625
631
|
target: CardTargetRule<BoundState<Contract>, Id, ZoneIds>;
|
|
@@ -684,8 +690,10 @@ type PhaseAuthoring<Contract extends ContractWithPhases, PhaseStateSchema extend
|
|
|
684
690
|
};
|
|
685
691
|
type ContractAuthoring<Contract extends ContractWithPhases> = {
|
|
686
692
|
readonly contract: Contract;
|
|
687
|
-
game<Definitions extends PhaseMapOf<Contract>, Views extends ViewMapOf<Contract
|
|
688
|
-
|
|
693
|
+
game<Definitions extends PhaseMapOf<Contract>, Views extends ViewMapOf<Contract>>(definition: Omit<ReducerGameDefinition<Contract, Definitions, Views>, "contract">): ReducerGameDefinition<Contract, Definitions, Views>;
|
|
694
|
+
sharedView<Projection>(definition: SharedViewDefinition<BoundState<Contract>, BoundManifest<Contract>, Projection>): SharedViewDefinition<BoundState<Contract>, BoundManifest<Contract>, Projection>;
|
|
695
|
+
playerView<SharedProjection = unknown, Projection = unknown>(definition: PlayerViewDefinition<BoundState<Contract>, BoundManifest<Contract>, SharedProjection, Projection>): PlayerViewDefinition<BoundState<Contract>, BoundManifest<Contract>, SharedProjection, Projection>;
|
|
696
|
+
emptyView(): EmptyViewDefinition<BoundState<Contract>, BoundManifest<Contract>>;
|
|
689
697
|
staticView<Projection>(definition: StaticViewDefinition<ExactManifestContractOf<Contract>, Projection>): StaticViewDefinition<ExactManifestContractOf<Contract>, Projection>;
|
|
690
698
|
phase<Name extends PhaseNameOfContract<Contract>>(name: Name): PhaseAuthoring<Contract, PhaseSchemasOfContract<Contract>[Name]>;
|
|
691
699
|
};
|
|
@@ -715,7 +723,7 @@ declare function defineEffect<Contract extends AnyReducerGameContract>(): {
|
|
|
715
723
|
<Id extends string, ContextSchema extends AnySchema = z.ZodObject<Record<string, never>, z.core.$strip>>(definition: EffectShufflePlayerZoneInput<Contract, Id, ContextSchema>): EffectShufflePlayerZoneDefinition<Id, ContextSchema, ContractState<Contract>, ContractManifest<Contract>>;
|
|
716
724
|
};
|
|
717
725
|
|
|
718
|
-
declare function defineGame<const Contract extends AnyReducerGameContract, Definitions extends PhaseMapOf<Contract>, Views extends ViewMapOf<Contract
|
|
726
|
+
declare function defineGame<const Contract extends AnyReducerGameContract, Definitions extends PhaseMapOf<Contract>, Views extends ViewMapOf<Contract>>(definition: {
|
|
719
727
|
contract: Contract;
|
|
720
728
|
} & Omit<ReducerGameDefinition<NoInfer<Contract>, Definitions, Views>, "contract">): ReducerGameDefinition<Contract, Definitions, Views>;
|
|
721
729
|
|
|
@@ -723,10 +731,12 @@ declare function defineInteraction<Contract extends AnyReducerGameContract, Phas
|
|
|
723
731
|
declare function defineInteractionRule<Contract extends AnyReducerGameContract, PhaseState extends PhaseStateInput = SchemaLike<object>>(): <Collectors extends Record<string, InputCollector> = Record<string, InputCollector>>(definition: InteractionRule<Collectors, ScopedPhaseState<ContractState<Contract>, InferPhaseState<PhaseState>>, ContractManifest<Contract>, ContractErrorCode<Contract>>) => InteractionRule<Collectors, ScopedPhaseState<ContractState<Contract>, InferPhaseState<PhaseState>>, ContractManifest<Contract>, ContractErrorCode<Contract>>;
|
|
724
732
|
declare function defineCardAction<Contract extends AnyReducerGameContract, PhaseState extends PhaseStateInput>(): <Collectors extends Record<string, InputCollector> = Record<string, never>, const PlayFrom extends PlayerZoneIdOfManifest<ContractManifest<Contract>> = PlayerZoneIdOfManifest<ContractManifest<Contract>>>(definition: CardActionSpec<Collectors, ScopedPhaseState<ContractState<Contract>, InferPhaseState<PhaseState>>, ContractManifest<Contract>, PlayFrom, ContractErrorCode<Contract>>) => CardActionSpec<Collectors, ScopedPhaseState<ContractState<Contract>, InferPhaseState<PhaseState>>, ContractManifest<Contract>, PlayFrom, ContractErrorCode<Contract>>;
|
|
725
733
|
|
|
726
|
-
declare function
|
|
734
|
+
declare function defineSharedView<Contract extends AnyReducerGameContract>(): <Projection>(definition: SharedViewDefinition<ContractState<Contract>, ContractManifest<Contract>, Projection>) => SharedViewDefinition<ContractState<Contract>, ContractManifest<Contract>, Projection>;
|
|
735
|
+
declare function definePlayerView<Contract extends AnyReducerGameContract>(): <SharedProjection = unknown, Projection = unknown>(definition: PlayerViewDefinition<ContractState<Contract>, ContractManifest<Contract>, SharedProjection, Projection>) => PlayerViewDefinition<ContractState<Contract>, ContractManifest<Contract>, SharedProjection, Projection>;
|
|
736
|
+
declare function defineEmptyView<Contract extends AnyReducerGameContract>(): EmptyViewDefinition<ContractState<Contract>, ContractManifest<Contract>>;
|
|
727
737
|
/**
|
|
728
738
|
* Factory for the session-scoped static view (see {@link StaticViewDefinition}).
|
|
729
|
-
* Kept separate from
|
|
739
|
+
* Kept separate from dynamic view helpers because the argument shape is
|
|
730
740
|
* structurally different: it exposes only the manifest and generated static
|
|
731
741
|
* queries, with no `state`, `playerId`, `runtime`, `fx`, `ops`, or
|
|
732
742
|
* `accept/reject`. That shape is what prevents authors from accidentally
|
|
@@ -785,6 +795,12 @@ type ReducerBundleOptions = {
|
|
|
785
795
|
diagnostics?: ReducerDiagnosticsSink | InteractionDiagnosticsMode;
|
|
786
796
|
descriptorDiagnostics?: InteractionDiagnosticsMode;
|
|
787
797
|
};
|
|
798
|
+
type ProjectionTimingMetadata = {
|
|
799
|
+
resolveAvailableInteractionsMs: number;
|
|
800
|
+
resolveViewMs: number;
|
|
801
|
+
resolveZoneHandlesMs: number;
|
|
802
|
+
descriptorHashMs: number;
|
|
803
|
+
};
|
|
788
804
|
type ReducerBundle = ReducerBundleContract & {
|
|
789
805
|
createInProcessRuntime(): {
|
|
790
806
|
initialize(input: {
|
|
@@ -809,13 +825,8 @@ type ReducerBundle = ReducerBundleContract & {
|
|
|
809
825
|
errorCode: string;
|
|
810
826
|
message?: string;
|
|
811
827
|
}>;
|
|
812
|
-
projectSeatViewDynamic(input: {
|
|
813
|
-
playerId: unknown;
|
|
814
|
-
viewId?: string;
|
|
815
|
-
}): unknown;
|
|
816
828
|
projectSeatsDynamic(input: {
|
|
817
829
|
playerIds: unknown[];
|
|
818
|
-
viewId?: string;
|
|
819
830
|
projectionMode?: "full" | "actionsOnly";
|
|
820
831
|
}): {
|
|
821
832
|
currentStage: string | null;
|
|
@@ -827,12 +838,15 @@ type ReducerBundle = ReducerBundleContract & {
|
|
|
827
838
|
sealedPlayerIds: string[];
|
|
828
839
|
pendingPlayerIds: string[];
|
|
829
840
|
} | null;
|
|
841
|
+
schedulerFlow: wire.SchedulerFlowAuthorityProjection;
|
|
842
|
+
sharedView?: unknown;
|
|
830
843
|
seats: Record<string, {
|
|
831
844
|
view?: unknown;
|
|
832
845
|
availableInteractionRefs: unknown;
|
|
833
846
|
zones?: unknown;
|
|
834
847
|
}>;
|
|
835
848
|
interactionsByRef: Record<string, unknown>;
|
|
849
|
+
timing: ProjectionTimingMetadata;
|
|
836
850
|
};
|
|
837
851
|
explainInteraction(input: {
|
|
838
852
|
playerId: unknown;
|
|
@@ -841,11 +855,6 @@ type ReducerBundle = ReducerBundleContract & {
|
|
|
841
855
|
snapshot(): unknown;
|
|
842
856
|
unsafeState(): unknown;
|
|
843
857
|
};
|
|
844
|
-
projectSeatViewDynamic(input: {
|
|
845
|
-
state: unknown;
|
|
846
|
-
playerId: unknown;
|
|
847
|
-
viewId?: string;
|
|
848
|
-
}): unknown;
|
|
849
858
|
explainInteraction(input: {
|
|
850
859
|
state: unknown;
|
|
851
860
|
playerId: unknown;
|
|
@@ -896,4 +905,4 @@ declare function setActivePlayers<State extends {
|
|
|
896
905
|
};
|
|
897
906
|
}>(state: State, activePlayers: PlayerIdOfState<State>[]): State;
|
|
898
907
|
|
|
899
|
-
export { type BoardTargetBuilder, type BoardTargetPredicate, type BoardTargetRule, type BoundInputBuilders, type BoundTargetRule, type CardTargetBuilder, type CardTargetPredicate, type CardTargetRule, type ChoiceOptionsFactory, type ChoiceTargetBuilder, type ChoiceTargetOption, type ChoiceTargetPredicate, type ChoiceTargetRule, type ContractAuthoring, type ContractFingerprint, type ContractWithPhases, type DefinedInputs, type DependencyValues, DerivedResolver, ErrorCodeOfContract, type InputFieldRef, InteractionRule, type ManyOptions, type PhaseAuthoring, PhaseMapOf, type PlayerBoardSpaceTarget, type ReducerBundle, type ReducerBundleOptions, ReducerDiagnosticsSink, ReducerGameContract, ReducerGameDefinition, type ReducerPhaseDefinition, type
|
|
908
|
+
export { type BoardTargetBuilder, type BoardTargetPredicate, type BoardTargetRule, type BoundInputBuilders, type BoundTargetRule, type CardTargetBuilder, type CardTargetPredicate, type CardTargetRule, type ChoiceOptionsFactory, type ChoiceTargetBuilder, type ChoiceTargetOption, type ChoiceTargetPredicate, type ChoiceTargetRule, type ContractAuthoring, type ContractFingerprint, type ContractWithPhases, type DefinedInputs, type DependencyValues, DerivedResolver, ErrorCodeOfContract, type InputFieldRef, InteractionRule, type ManyOptions, type PhaseAuthoring, PhaseMapOf, type PlayerBoardSpaceTarget, type ReducerBundle, type ReducerBundleOptions, ReducerDiagnosticsSink, ReducerGameContract, ReducerGameDefinition, type ReducerPhaseDefinition, type ReducerPlayerViewDefinition, type ReducerSharedViewDefinition, type SparseCounts, type SparseMap, SystemActionEvent, TableQueries, TableQueriesOfState, type TargetContext, type TargetPredicate, type TargetPredicateArgs, type TargetRule, type TargetRuleBuilder, ValidationIssue, assertCardAllowedInContainer, boardInput, boardTarget, cardInput, cardTarget, choiceTarget, contractFingerprint, createContractAuthoring, createReducerBundle, createStateQueries, createTableQueries, defineCardAction, defineEffect, defineEmptyView, defineGame, defineGameContract, defineInputs, defineInteraction, defineInteractionRule, definePhase, definePhaseStage, definePlayerView, defineSharedView, defineStage, defineStaticView, defineStepPhase, formInput, gameEvent, many, normalizeCommandParams, promptInput, rngInput, setActivePlayers, sparseCounts, sparseMap };
|