@dreamboard-games/sdk 0.4.0-alpha.0 → 0.4.0-alpha.2
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 +8 -1
- package/REFERENCE.md +1849 -379
- package/dist/{ResourceCounter-BTXklCEZ.d.ts → ResourceCounter-BuiNstXs.d.ts} +5 -1
- package/dist/{ThemeProvider-DvMl17Ny.d.ts → ThemeProvider-B1sIoBlX.d.ts} +1 -1
- package/dist/attributes-DbvyMbXw.d.ts +68 -0
- package/dist/authoring/index.d.ts +66 -0
- package/dist/authoring/index.js +560 -0
- package/dist/authoring/index.js.map +1 -0
- package/dist/browser-interaction.d.ts +246 -44
- package/dist/browser-interaction.js +14 -1
- package/dist/{chunk-Q5O7GPVY.js → chunk-45FI6XII.js} +630 -375
- package/dist/chunk-45FI6XII.js.map +1 -0
- package/dist/{chunk-4G7552LO.js → chunk-6JQFGSLD.js} +216 -47
- package/dist/chunk-6JQFGSLD.js.map +1 -0
- package/dist/{chunk-NBAEEHAU.js → chunk-CP35NPPY.js} +5926 -5266
- package/dist/chunk-CP35NPPY.js.map +1 -0
- package/dist/{chunk-2LDZ5C3T.js → chunk-FWVV2X74.js} +2 -2
- package/dist/{chunk-MNKDSGIA.js → chunk-HWJS3VOJ.js} +6 -2
- package/dist/chunk-HWJS3VOJ.js.map +1 -0
- package/dist/chunk-K5ZRJTZZ.js +328 -0
- package/dist/chunk-K5ZRJTZZ.js.map +1 -0
- package/dist/{chunk-U5KBV2BA.js → chunk-N6ZDIMRB.js} +444 -223
- package/dist/chunk-N6ZDIMRB.js.map +1 -0
- package/dist/chunk-O6M6PN4E.js +1225 -0
- package/dist/chunk-O6M6PN4E.js.map +1 -0
- package/dist/chunk-PF7L4BMG.js +117 -0
- package/dist/chunk-PF7L4BMG.js.map +1 -0
- package/dist/{chunk-P7F4L2FF.js → chunk-WOWFONLZ.js} +609 -1287
- package/dist/chunk-WOWFONLZ.js.map +1 -0
- package/dist/{chunk-QLG6VEMW.js → chunk-WUIVY2KE.js} +318 -21
- package/dist/chunk-WUIVY2KE.js.map +1 -0
- package/dist/chunk-ZAS2SENW.js +12 -0
- package/dist/chunk-ZAS2SENW.js.map +1 -0
- package/dist/codegen.d.ts +11 -1
- package/dist/codegen.js +1 -1
- package/dist/{components-DaIqi9QM.d.ts → components-BbWPnZCF.d.ts} +37 -70
- package/dist/{hex-board-view-UCUjMALd.d.ts → hex-board-view-Kz9Q_zsv.d.ts} +1 -1
- package/dist/index.js +2 -1
- package/dist/package-set.d.ts +2 -2
- package/dist/package-set.js +2 -1
- package/dist/player-state-Cqpyeql0.d.ts +371 -0
- package/dist/protocol-BP193lva.d.ts +267 -0
- package/dist/reducer/advanced.d.ts +2 -2
- package/dist/reducer/advanced.js +1 -1
- package/dist/reducer-contract.js +1 -1
- package/dist/reducer.d.ts +7 -7
- package/dist/reducer.js +190 -183
- package/dist/reducer.js.map +1 -1
- package/dist/runtime/primitives.d.ts +10 -9
- package/dist/runtime/primitives.js +9 -6
- package/dist/runtime/runtime-api.d.ts +2 -2
- package/dist/runtime/workspace-contract.d.ts +28 -76
- package/dist/runtime/workspace-contract.js +7 -5
- package/dist/runtime-api-BJharVaj.d.ts +198 -0
- package/dist/runtime-api-C6aWo9c0.d.ts +95 -0
- package/dist/runtime-json-CQ9QbLZ5.d.ts +5 -0
- package/dist/runtime.d.ts +80 -11
- package/dist/runtime.js +89 -445
- package/dist/runtime.js.map +1 -1
- package/dist/testing.d.ts +643 -22
- package/dist/testing.js +1371 -76
- package/dist/testing.js.map +1 -1
- package/dist/types-CYeN0wLK.d.ts +29 -0
- package/dist/{attributes-BeRyboMS.d.ts → types-DJj5MJkl.d.ts} +32 -55
- package/dist/types.d.ts +14 -7
- package/dist/ui/components.d.ts +4 -5
- package/dist/ui/components.js +19 -1
- package/dist/ui/player-state.d.ts +2 -365
- package/dist/ui/plugin-styles.css +1 -1
- package/dist/{ui-contract-BUC6iS3s.d.ts → ui-contract-CY7cxsCC.d.ts} +17 -26
- package/dist/ui.d.ts +8 -13
- package/dist/ui.js +20 -2
- package/dist/{views-B0hlW6IT.d.ts → views-fn2RuXOx.d.ts} +59 -44
- package/package.json +28 -4
- package/dist/chunk-4G7552LO.js.map +0 -1
- package/dist/chunk-MNKDSGIA.js.map +0 -1
- package/dist/chunk-NBAEEHAU.js.map +0 -1
- package/dist/chunk-P7F4L2FF.js.map +0 -1
- package/dist/chunk-Q5O7GPVY.js.map +0 -1
- package/dist/chunk-QLG6VEMW.js.map +0 -1
- package/dist/chunk-U5KBV2BA.js.map +0 -1
- package/dist/hex-color-MhOyuY-o.d.ts +0 -8
- package/dist/runtime-api-BXd70c2e.d.ts +0 -490
- /package/dist/{chunk-2LDZ5C3T.js.map → chunk-FWVV2X74.js.map} +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { cb as ReducerGameContractLike, bD as PhaseMapOf, eN as ViewMapOf, cc as ReducerGameDefinition, dt as RuntimeTableRecord, df as RuntimeRngState, dM as SetupBootstrapStep, aD as GeneratedManifestContractLike, dD as SetupBootstrapContainerRef, dH as SetupBootstrapPerPlayerContainerTemplateRef, bV as PlayerIdOfManifest, dE as SetupBootstrapDestinationRef, J as CardIdOfManifest, bS as PieceIdOfManifest, ah as DieIdOfManifest } from '../views-
|
|
2
|
-
export { A as ActionContext, a as ActorSelection, b as ActorSelector, c as ActorSelectorArgs, d as AnyCardActionSpec, e as AnyContinuationCallable, f as AnyContinuationToken, g as AnyInteractionSpec, h as AnyPhaseDefinitionForContract, i as AnyReducerGameDefinition, j as AnySchema, k as AutoPhaseDefinition, B as BaseGameSessionOfContract, l as BaseGameStateOfContract, m as BoardBaseIdOfManifest, n as BoardContainerIdOfManifest, o as BoardContainerIdOfTable, p as BoardIdOfManifest, q as BoardIdOfTable, r as BoardInputCollectorKind, s as BoardInputCollectorMeta, t as BoardInteractionKeyOfDefinition, u as BoardLayoutOfManifest, v as BoardMapOfTable, x as BoardStateOfTable, y as BoardTargetDomainDescriptor, z as BoardTypeIdOfManifest, C as BoardTypeIdOfTable, D as BoundedNumberDomainDescriptor, E as Brand, F as CardActionMap, G as CardActionSpec, H as CardIdOfDeck, I as CardIdOfHand, K as CardIdOfState, L as CardIdOfTable, M as CardInputCollectorMeta, N as CardInputZoneIdsOfDefinition, O as CardInteractionKeyOfDefinition, P as CardTargetDomainDescriptor, Q as CardTypeOfState, R as CardTypeOfTable, S as ChoiceDomainDescriptor, T as ChoiceListDomainDescriptor, U as ChoiceOption, V as ClientParamsOf, W as ClientParamsOfInteractionOfDefinition, X as CollectorState, Y as CompatibleCardIdForHandAndDeck, Z as CompatibleCardIdForTwoPlayerZones, _ as CompatibleHandIdForDeck, $ as ComponentDataOfTable, a0 as ComponentIdOfTable, a1 as ComponentLocationByTypeOfTable, a2 as ComponentLocationOfTable, a3 as ContinuationCallable, a4 as ContinuationInput, a5 as ContinuationInputForSource, a6 as ContinuationKind, a7 as ContinuationReduceArgs, a8 as ContinuationResponseOf, a9 as ContinuationSourceKind, aa as ContinuationToken, ab as DeckCardsOfTable, ac as DeckIdOfState, ad as DeckIdOfTable, ae as DefaultedClientParamKeysOfInteractionOfDefinition, ai as EagerInputDomainDependencies, aj as EdgeTypeIdOfManifest, ak as EffectContinuationCallable, al as EffectContinuationInput, am as EffectContinuationResponse, an as EffectDefinition, ao as EffectIdsOfDefinition, ap as EffectInvokeOptions, aq as EffectMap, ar as EffectRegistryOfPhase, as as EffectRollDieDefinition, at as EffectShuffleDefinition, au as EffectShufflePlayerZoneDefinition, av as EffectSpecLike, aw as EffectTypeTag, ax as ErrorCodeOfContract, ay as ExactManifestContractOf, az as FlowState, aA as FrameworkErrorCode, aB as FrameworkErrorCodes, aC as GameStateOf, aE as HandCardsOfTable, aF as HandIdOfState, aG as HandIdOfTable, aH as HexBoardIdOfTable, aI as HexBoardStateOfTable, aJ as HexEdgeIdOfTable, aK as HexEdgeStateOfTable, aL as HexEdgeTypeIdOfTable, aM as HexSpaceIdOfTable, aN as HexSpaceTypeIdOfTable, aO as HexVertexIdOfTable, aP as HexVertexStateOfTable, aQ as HexVertexTypeIdOfTable, aR as HiddenSchemaOfContract, aS as HiddenStateOfState, aT as InitContext, aU as InitSetupSelectionInput, aV as InitialStateCallbacks, aW as InputCollector, aX as InputCollectorKind, aY as InputCollectorMetaForKind, aZ as InputDomainDependencyCase, a_ as InputDomainDescriptor, a$ as InputDomainResolverDescriptor, b0 as InputKeysWithCollectorKindOfDefinition, b1 as InputSelectionDescriptor, b2 as InteractionAvailabilityArgs, b3 as InteractionCommitPolicy, b4 as InteractionIdOfDefinition, b5 as InteractionIdOfDefinitionPhase, b6 as InteractionKind, b7 as InteractionMap, b8 as InteractionReduceArgs, b9 as InteractionReduceInput, ba as InteractionRule, bb as InteractionRuleValidationResult, bc as InteractionSpec, bd as InteractionSpecByNameOfDefinitionPhase, be as InteractionToArgs, bf as InteractionValidateArgs, bg as LazyBoardTargetDomainDescriptor, bh as LazyCardTargetDomainDescriptor, bi as LazyInputDomainDependencies, bj as ManifestContract, bk as ManifestContractOf, bl as ManifestDefaults, bm as ManifestIdSchema, bn as ManifestIds, bo as ManifestLiterals, bp as ManifestOf, bq as MutationRuntimeHelpers, br as NonEmptyReadonlyArray, bt as ParamsOf, bu as ParamsOfInteractionOfDefinition, by as PhaseAccessor, bz as PhaseDefinition, bA as PhaseDefinitionByName, bB as PhaseEnterArgs, bC as PhaseEnterContext, bE as PhaseMapOfState, bF as PhaseNameOf, bG as PhaseNameOfContract, bH as PhaseNameOfManifest, bI as PhaseNameOfState, bJ as PhaseNamesOfDefinition, bK as PhasePayload, bL as PhaseSchemasOfContract, bM as PhaseStateMapOfContract, bN as PhaseStateMapOfDefinitions, bO as PhaseStateOfDefinitions, bP as PhaseStateOfState, bQ as PhaseStepOfState, bR as PhaseZoneList, bT as PlayableInteractionsOfZoneOfDefinition, bW as PlayerIdOfState, bX as PlayerIdOfTable, bY as PlayerPhaseDefinition, bZ as PlayerZoneIdOfManifest, b_ as PlayerZoneIdOfState, b$ as PlayerZoneIdOfTable, c0 as PrivateSchemaOfContract, c1 as PrivateStateOfState, c2 as PromptInputCollectorMeta, c3 as PromptInteractionKeyOfDefinition, c4 as PublicSchemaOfContract, c5 as PublicStateOfState, c6 as RandomHelpers, c7 as ReducerAccept, c9 as ReducerFx, ca as ReducerGameContract, cd as ReducerGameState, ce as ReducerManifestContract, cg as ReducerReject, ch as ReducerResult, ci as ReducerRuntimeStateForState, cj as ReducerSessionForConfig, ck as ReducerSessionState, cm as ReducerStateForConfig, co as ReducerValidationResult, cp as RelationTypeIdOfManifest, cq as RelationTypeIdOfTable, cr as ResolvedBoardTargetDomainDescriptor, cs as ResolvedCardTargetDomainDescriptor, ct as ResolvedContainerLocation, cu as ResolvedDeckLocation, cv as ResolvedEdgeLocation, cw as ResolvedGameSessionOf, cx as ResolvedGameStateOf, cy as ResolvedHandLocation, cz as ResolvedSlotLocation, cA as ResolvedSpaceLocation, cB as ResolvedVertexLocation, cC as ResolvedZoneLocation, cD as ResourceAmountsOfTable, cE as ResourceBalancesOfState, cF as ResourceBalancesOfTable, cG as ResourceIdOfManifest, cH as ResourceIdOfState, cI as ResourceIdOfTable, cJ as ResourceMapDomainDescriptor, cK as ResumableEffectKind, cL as RngInputCollectorMeta, cM as RollDieContinuationResponse, cO as RuntimeBoardBaseState, cP as RuntimeBoardCollections, cQ as RuntimeBoardCompatibilityState, cR as RuntimeBoardContainerState, cS as RuntimeBoardRelationState, cT as RuntimeBoardSpaceState, cU as RuntimeBoardState, cV as RuntimeCardData, cW as RuntimeCardVisibility, cX as RuntimeComponentLocation, cY as RuntimeComponentLocationMap, cZ as RuntimeDeckMap, c_ as RuntimeDieData, c$ as RuntimeGenericBoardState, d0 as RuntimeHandMap, d1 as RuntimeHandVisibilityMode, d2 as RuntimeHelpers, d3 as RuntimeHexBoardState, d4 as RuntimeHexEdgeState, d5 as RuntimeHexOrientation, d6 as RuntimeHexSpaceState, d7 as RuntimeHexVertexState, d8 as RuntimeOwnerMap, d9 as RuntimeParams, da as RuntimePayload, db as RuntimePhaseState, dc as RuntimePieceData, dd as RuntimeRecord, de as RuntimeResourceMap, dg as RuntimeScalar, dh as RuntimeSetupSelection, di as RuntimeSetupSelectionInput, dj as RuntimeSetupSelectionOverride, dk as RuntimeSimultaneousState, dl as RuntimeSimultaneousSubmission, dm as RuntimeSlotHostRef, dn as RuntimeSquareBoardState, dp as RuntimeSquareEdgeState, dq as RuntimeSquareSpaceState, dr as RuntimeSquareVertexState, ds as RuntimeState, du as RuntimeTiledBoardBaseState, dv as RuntimeTiledBoardState, dw as RuntimeTiledEdgeState, dx as RuntimeTiledSpaceState, dy as RuntimeTiledVertexState, dz as RuntimeVisibilityMap, dA as RuntimeZoneMap, dB as SchemaLike, dC as ScopedPhaseState, dF as SetupBootstrapPerPlayerBoardContainerRef, dG as SetupBootstrapPerPlayerBoardSpaceRef, dI as SetupBootstrapPerPlayerZoneRef, dJ as SetupBootstrapSharedBoardContainerRef, dK as SetupBootstrapSharedBoardSpaceRef, dL as SetupBootstrapSharedZoneRef, dN as SetupOptionChoiceMetadata, dO as SetupOptionIdOfManifest, dP as SetupOptionMetadata, dQ as SetupProfileDefinition, dR as SetupProfileIdOfManifest, dS as SetupProfileMetadata, dT as SetupSelectionInputOfManifest, dU as SetupSelectionOfManifest, dW as SharedZoneIdOfManifest, dX as SharedZoneIdOfState, dY as SharedZoneIdOfTable, dZ as ShufflePlayerZoneContinuationResponse, d_ as ShuffleSharedZoneContinuationResponse, d$ as SimultaneousPlayerPhaseDefinition, e0 as SimultaneousResolveArgs, e1 as SimultaneousSubmission, e2 as SimultaneousSubmitSpec, e3 as SpaceIdOfManifest, e4 as SpaceIdOfTable, e5 as SpaceTypeIdOfManifest, e6 as SpaceTypeIdOfTable, e7 as SquareBoardIdOfTable, e8 as SquareBoardStateOfTable, e9 as SquareEdgeIdOfTable, ea as SquareEdgeStateOfTable, eb as SquareEdgeTypeIdOfTable, ec as SquareSpaceIdOfTable, ed as SquareSpaceTypeIdOfTable, ee as SquareVertexIdOfTable, ef as SquareVertexStateOfTable, eg as SquareVertexTypeIdOfTable, eh as StageMap, ei as StageNamesOfDefinitionPhase, ej as StageSpec, ek as StateDefinition, el as StateDefinitionOfContract, em as StaticBoards, en as StaticBoardsJsonEnvelope, eo as StaticViewDefinition, ep as StaticViewQueries, eq as StringKeyOf, er as TableOfManifest, es as TableOfState, et as TableQueries, eu as TableQueriesOfState, ev as TargetKind, ew as TerminalOutcome, ex as TiledBoardIdOfTable, ey as TiledBoardStateOfTable, ez as TiledEdgeIdOfTable, eA as TiledEdgeMap, eB as TiledEdgeStateOfTable, eC as TiledEdgeTypeIdOfTable, eD as TiledSpaceIdOfTable, eE as TiledSpaceMap, eF as TiledVertexIdOfTable, eG as TiledVertexMap, eH as TiledVertexStateOfTable, eI as TiledVertexTypeIdOfTable, eJ as ValidationIssue, eK as VertexTypeIdOfManifest, eL as ViewDefinition, eM as ViewDefinitionByName, eO as ViewNamesOfDefinition, eP as ViewOfDefinition, eQ as ViewsOfDefinition, eR as ZoneIdsOfDefinition, eT as assumeManifestSchema, eX as cloneManifestDefault, eZ as createManifestGameStateSchema, e_ as createManifestRuntimeSchema, e$ as createManifestStringLiteralSchema, f4 as isManifestScopedSchema, f9 as markManifestScopedSchema, fo as resolveManifestPlayerIds } from '../views-
|
|
1
|
+
import { cb as ReducerGameContractLike, bD as PhaseMapOf, eN as ViewMapOf, cc as ReducerGameDefinition, dt as RuntimeTableRecord, df as RuntimeRngState, dM as SetupBootstrapStep, aD as GeneratedManifestContractLike, dD as SetupBootstrapContainerRef, dH as SetupBootstrapPerPlayerContainerTemplateRef, bV as PlayerIdOfManifest, dE as SetupBootstrapDestinationRef, J as CardIdOfManifest, bS as PieceIdOfManifest, ah as DieIdOfManifest } from '../views-fn2RuXOx.js';
|
|
2
|
+
export { A as ActionContext, a as ActorSelection, b as ActorSelector, c as ActorSelectorArgs, d as AnyCardActionSpec, e as AnyContinuationCallable, f as AnyContinuationToken, g as AnyInteractionSpec, h as AnyPhaseDefinitionForContract, i as AnyReducerGameDefinition, j as AnySchema, k as AutoPhaseDefinition, B as BaseGameSessionOfContract, l as BaseGameStateOfContract, m as BoardBaseIdOfManifest, n as BoardContainerIdOfManifest, o as BoardContainerIdOfTable, p as BoardIdOfManifest, q as BoardIdOfTable, r as BoardInputCollectorKind, s as BoardInputCollectorMeta, t as BoardInteractionKeyOfDefinition, u as BoardLayoutOfManifest, v as BoardMapOfTable, x as BoardStateOfTable, y as BoardTargetDomainDescriptor, z as BoardTypeIdOfManifest, C as BoardTypeIdOfTable, D as BoundedNumberDomainDescriptor, E as Brand, F as CardActionMap, G as CardActionSpec, H as CardIdOfDeck, I as CardIdOfHand, K as CardIdOfState, L as CardIdOfTable, M as CardInputCollectorMeta, N as CardInputZoneIdsOfDefinition, O as CardInteractionKeyOfDefinition, P as CardTargetDomainDescriptor, Q as CardTypeOfState, R as CardTypeOfTable, S as ChoiceDomainDescriptor, T as ChoiceListDomainDescriptor, U as ChoiceOption, V as ClientParamsOf, W as ClientParamsOfInteractionOfDefinition, X as CollectorState, Y as CompatibleCardIdForHandAndDeck, Z as CompatibleCardIdForTwoPlayerZones, _ as CompatibleHandIdForDeck, $ as ComponentDataOfTable, a0 as ComponentIdOfTable, a1 as ComponentLocationByTypeOfTable, a2 as ComponentLocationOfTable, a3 as ContinuationCallable, a4 as ContinuationInput, a5 as ContinuationInputForSource, a6 as ContinuationKind, a7 as ContinuationReduceArgs, a8 as ContinuationResponseOf, a9 as ContinuationSourceKind, aa as ContinuationToken, ab as DeckCardsOfTable, ac as DeckIdOfState, ad as DeckIdOfTable, ae as DefaultedClientParamKeysOfInteractionOfDefinition, ai as EagerInputDomainDependencies, aj as EdgeTypeIdOfManifest, ak as EffectContinuationCallable, al as EffectContinuationInput, am as EffectContinuationResponse, an as EffectDefinition, ao as EffectIdsOfDefinition, ap as EffectInvokeOptions, aq as EffectMap, ar as EffectRegistryOfPhase, as as EffectRollDieDefinition, at as EffectShuffleDefinition, au as EffectShufflePlayerZoneDefinition, av as EffectSpecLike, aw as EffectTypeTag, ax as ErrorCodeOfContract, ay as ExactManifestContractOf, az as FlowState, aA as FrameworkErrorCode, aB as FrameworkErrorCodes, aC as GameStateOf, aE as HandCardsOfTable, aF as HandIdOfState, aG as HandIdOfTable, aH as HexBoardIdOfTable, aI as HexBoardStateOfTable, aJ as HexEdgeIdOfTable, aK as HexEdgeStateOfTable, aL as HexEdgeTypeIdOfTable, aM as HexSpaceIdOfTable, aN as HexSpaceTypeIdOfTable, aO as HexVertexIdOfTable, aP as HexVertexStateOfTable, aQ as HexVertexTypeIdOfTable, aR as HiddenSchemaOfContract, aS as HiddenStateOfState, aT as InitContext, aU as InitSetupSelectionInput, aV as InitialStateCallbacks, aW as InputCollector, aX as InputCollectorKind, aY as InputCollectorMetaForKind, aZ as InputDomainDependencyCase, a_ as InputDomainDescriptor, a$ as InputDomainResolverDescriptor, b0 as InputKeysWithCollectorKindOfDefinition, b1 as InputSelectionDescriptor, b2 as InteractionAvailabilityArgs, b3 as InteractionCommitPolicy, b4 as InteractionIdOfDefinition, b5 as InteractionIdOfDefinitionPhase, b6 as InteractionKind, b7 as InteractionMap, b8 as InteractionReduceArgs, b9 as InteractionReduceInput, ba as InteractionRule, bb as InteractionRuleValidationResult, bc as InteractionSpec, bd as InteractionSpecByNameOfDefinitionPhase, be as InteractionToArgs, bf as InteractionValidateArgs, bg as LazyBoardTargetDomainDescriptor, bh as LazyCardTargetDomainDescriptor, bi as LazyInputDomainDependencies, bj as ManifestContract, bk as ManifestContractOf, bl as ManifestDefaults, bm as ManifestIdSchema, bn as ManifestIds, bo as ManifestLiterals, bp as ManifestOf, bq as MutationRuntimeHelpers, br as NonEmptyReadonlyArray, bt as ParamsOf, bu as ParamsOfInteractionOfDefinition, by as PhaseAccessor, bz as PhaseDefinition, bA as PhaseDefinitionByName, bB as PhaseEnterArgs, bC as PhaseEnterContext, bE as PhaseMapOfState, bF as PhaseNameOf, bG as PhaseNameOfContract, bH as PhaseNameOfManifest, bI as PhaseNameOfState, bJ as PhaseNamesOfDefinition, bK as PhasePayload, bL as PhaseSchemasOfContract, bM as PhaseStateMapOfContract, bN as PhaseStateMapOfDefinitions, bO as PhaseStateOfDefinitions, bP as PhaseStateOfState, bQ as PhaseStepOfState, bR as PhaseZoneList, bT as PlayableInteractionsOfZoneOfDefinition, bW as PlayerIdOfState, bX as PlayerIdOfTable, bY as PlayerPhaseDefinition, bZ as PlayerZoneIdOfManifest, b_ as PlayerZoneIdOfState, b$ as PlayerZoneIdOfTable, c0 as PrivateSchemaOfContract, c1 as PrivateStateOfState, c2 as PromptInputCollectorMeta, c3 as PromptInteractionKeyOfDefinition, c4 as PublicSchemaOfContract, c5 as PublicStateOfState, c6 as RandomHelpers, c7 as ReducerAccept, c9 as ReducerFx, ca as ReducerGameContract, cd as ReducerGameState, ce as ReducerManifestContract, cg as ReducerReject, ch as ReducerResult, ci as ReducerRuntimeStateForState, cj as ReducerSessionForConfig, ck as ReducerSessionState, cm as ReducerStateForConfig, co as ReducerValidationResult, cp as RelationTypeIdOfManifest, cq as RelationTypeIdOfTable, cr as ResolvedBoardTargetDomainDescriptor, cs as ResolvedCardTargetDomainDescriptor, ct as ResolvedContainerLocation, cu as ResolvedDeckLocation, cv as ResolvedEdgeLocation, cw as ResolvedGameSessionOf, cx as ResolvedGameStateOf, cy as ResolvedHandLocation, cz as ResolvedSlotLocation, cA as ResolvedSpaceLocation, cB as ResolvedVertexLocation, cC as ResolvedZoneLocation, cD as ResourceAmountsOfTable, cE as ResourceBalancesOfState, cF as ResourceBalancesOfTable, cG as ResourceIdOfManifest, cH as ResourceIdOfState, cI as ResourceIdOfTable, cJ as ResourceMapDomainDescriptor, cK as ResumableEffectKind, cL as RngInputCollectorMeta, cM as RollDieContinuationResponse, cO as RuntimeBoardBaseState, cP as RuntimeBoardCollections, cQ as RuntimeBoardCompatibilityState, cR as RuntimeBoardContainerState, cS as RuntimeBoardRelationState, cT as RuntimeBoardSpaceState, cU as RuntimeBoardState, cV as RuntimeCardData, cW as RuntimeCardVisibility, cX as RuntimeComponentLocation, cY as RuntimeComponentLocationMap, cZ as RuntimeDeckMap, c_ as RuntimeDieData, c$ as RuntimeGenericBoardState, d0 as RuntimeHandMap, d1 as RuntimeHandVisibilityMode, d2 as RuntimeHelpers, d3 as RuntimeHexBoardState, d4 as RuntimeHexEdgeState, d5 as RuntimeHexOrientation, d6 as RuntimeHexSpaceState, d7 as RuntimeHexVertexState, d8 as RuntimeOwnerMap, d9 as RuntimeParams, da as RuntimePayload, db as RuntimePhaseState, dc as RuntimePieceData, dd as RuntimeRecord, de as RuntimeResourceMap, dg as RuntimeScalar, dh as RuntimeSetupSelection, di as RuntimeSetupSelectionInput, dj as RuntimeSetupSelectionOverride, dk as RuntimeSimultaneousState, dl as RuntimeSimultaneousSubmission, dm as RuntimeSlotHostRef, dn as RuntimeSquareBoardState, dp as RuntimeSquareEdgeState, dq as RuntimeSquareSpaceState, dr as RuntimeSquareVertexState, ds as RuntimeState, du as RuntimeTiledBoardBaseState, dv as RuntimeTiledBoardState, dw as RuntimeTiledEdgeState, dx as RuntimeTiledSpaceState, dy as RuntimeTiledVertexState, dz as RuntimeVisibilityMap, dA as RuntimeZoneMap, dB as SchemaLike, dC as ScopedPhaseState, dF as SetupBootstrapPerPlayerBoardContainerRef, dG as SetupBootstrapPerPlayerBoardSpaceRef, dI as SetupBootstrapPerPlayerZoneRef, dJ as SetupBootstrapSharedBoardContainerRef, dK as SetupBootstrapSharedBoardSpaceRef, dL as SetupBootstrapSharedZoneRef, dN as SetupOptionChoiceMetadata, dO as SetupOptionIdOfManifest, dP as SetupOptionMetadata, dQ as SetupProfileDefinition, dR as SetupProfileIdOfManifest, dS as SetupProfileMetadata, dT as SetupSelectionInputOfManifest, dU as SetupSelectionOfManifest, dW as SharedZoneIdOfManifest, dX as SharedZoneIdOfState, dY as SharedZoneIdOfTable, dZ as ShufflePlayerZoneContinuationResponse, d_ as ShuffleSharedZoneContinuationResponse, d$ as SimultaneousPlayerPhaseDefinition, e0 as SimultaneousResolveArgs, e1 as SimultaneousSubmission, e2 as SimultaneousSubmitSpec, e3 as SpaceIdOfManifest, e4 as SpaceIdOfTable, e5 as SpaceTypeIdOfManifest, e6 as SpaceTypeIdOfTable, e7 as SquareBoardIdOfTable, e8 as SquareBoardStateOfTable, e9 as SquareEdgeIdOfTable, ea as SquareEdgeStateOfTable, eb as SquareEdgeTypeIdOfTable, ec as SquareSpaceIdOfTable, ed as SquareSpaceTypeIdOfTable, ee as SquareVertexIdOfTable, ef as SquareVertexStateOfTable, eg as SquareVertexTypeIdOfTable, eh as StageMap, ei as StageNamesOfDefinitionPhase, ej as StageSpec, ek as StateDefinition, el as StateDefinitionOfContract, em as StaticBoards, en as StaticBoardsJsonEnvelope, eo as StaticViewDefinition, ep as StaticViewQueries, eq as StringKeyOf, er as TableOfManifest, es as TableOfState, et as TableQueries, eu as TableQueriesOfState, ev as TargetKind, ew as TerminalOutcome, ex as TiledBoardIdOfTable, ey as TiledBoardStateOfTable, ez as TiledEdgeIdOfTable, eA as TiledEdgeMap, eB as TiledEdgeStateOfTable, eC as TiledEdgeTypeIdOfTable, eD as TiledSpaceIdOfTable, eE as TiledSpaceMap, eF as TiledVertexIdOfTable, eG as TiledVertexMap, eH as TiledVertexStateOfTable, eI as TiledVertexTypeIdOfTable, eJ as ValidationIssue, eK as VertexTypeIdOfManifest, eL as ViewDefinition, eM as ViewDefinitionByName, eO as ViewNamesOfDefinition, eP as ViewOfDefinition, eQ as ViewsOfDefinition, eR as ZoneIdsOfDefinition, eT as assumeManifestSchema, eX as cloneManifestDefault, eZ as createManifestGameStateSchema, e_ as createManifestRuntimeSchema, e$ as createManifestStringLiteralSchema, f4 as isManifestScopedSchema, f9 as markManifestScopedSchema, fo as resolveManifestPlayerIds } from '../views-fn2RuXOx.js';
|
|
3
3
|
import 'zod';
|
|
4
4
|
import '../types.js';
|
|
5
5
|
|
package/dist/reducer/advanced.js
CHANGED
package/dist/reducer-contract.js
CHANGED
package/dist/reducer.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { aD as GeneratedManifestContractLike, dt as RuntimeTableRecord, ek as StateDefinition, dB as SchemaLike, bk as ManifestContractOf, l as BaseGameStateOfContract, ax as ErrorCodeOfContract, bz as PhaseDefinition, eL as ViewDefinition, bm as ManifestIdSchema, ce as ReducerManifestContract, ca as ReducerGameContract, aW as InputCollector, X as CollectorState, bW as PlayerIdOfState, eu as TableQueriesOfState, ag as DerivedResolver, eJ as ValidationIssue, ev as TargetKind, b1 as InputSelectionDescriptor, a_ as InputDomainDescriptor, y as BoardTargetDomainDescriptor, s as BoardInputCollectorMeta, K as CardIdOfState, bj as ManifestContract, es as TableOfState, g as AnyInteractionSpec, d as AnyCardActionSpec, aq as EffectMap, dC as ScopedPhaseState, eh as StageMap, bR as PhaseZoneList, F as CardActionMap, dU as SetupSelectionOfManifest, eF as TiledVertexIdOfTable, er as TableOfManifest, ex as TiledBoardIdOfTable, ez as TiledEdgeIdOfTable, eD as TiledSpaceIdOfTable, J as CardIdOfManifest, bD as PhaseMapOf, eN as ViewMapOf, cc as ReducerGameDefinition, eo as StaticViewDefinition, ay as ExactManifestContractOf, bG as PhaseNameOfContract, bc as InteractionSpec, bZ as PlayerZoneIdOfManifest, G as CardActionSpec, ba as InteractionRule, b7 as InteractionMap, bL as PhaseSchemasOfContract, j as AnySchema, a3 as ContinuationCallable, as as EffectRollDieDefinition, at as EffectShuffleDefinition, au as EffectShufflePlayerZoneDefinition, ej as StageSpec, et as TableQueries, cb as ReducerGameContractLike, q as BoardIdOfTable, o as BoardContainerIdOfTable } from './views-
|
|
3
|
-
export { w as BoardRef, af as DerivedDefinition, aB as FrameworkErrorCodes, aC as GameStateOf, aV as InitialStateCallbacks, bs as Op, bv as PerPlayer, bw as PerPlayerBoardRef, bx as PerPlayerSchemaOptions, bU as PlayerId, c7 as ReducerAccept, c8 as ReducerEdit, cf as ReducerOps, cg as ReducerReject, ch as ReducerResult, cl as ReducerStateBase, cn as ReducerTransaction, co as ReducerValidationResult, cN as RotatePlayerZoneArgs, dV as SharedBoardRef, ew as TerminalOutcome, eS as asPlayerId, eU as boardRef, eV as boardRefKey, eW as boardRefSchema, eY as createDerivedResolver, f0 as createReducerEdit, f1 as createReducerOps, f2 as createReducerTransaction, f3 as defineDerived, f5 as isPerPlayer, f6 as isPerPlayerBoardRef, f7 as isPlayerId, f8 as isSharedBoardRef, fa as parseBoardRefKey, fb as perPlayer, fc as perPlayerBoardRef, fd as perPlayerEntries, fe as perPlayerGet, ff as perPlayerHas, fg as perPlayerKeys, fh as perPlayerMap, fi as perPlayerRequire, fj as perPlayerSchema, fk as perPlayerSet, fl as perPlayerSize, fm as perPlayerValues, fn as pipe, fp as sharedBoardRef } from './views-
|
|
2
|
+
import { aD as GeneratedManifestContractLike, dt as RuntimeTableRecord, ek as StateDefinition, dB as SchemaLike, bk as ManifestContractOf, l as BaseGameStateOfContract, ax as ErrorCodeOfContract, bz as PhaseDefinition, eL as ViewDefinition, bm as ManifestIdSchema, ce as ReducerManifestContract, ca as ReducerGameContract, aW as InputCollector, X as CollectorState, bW as PlayerIdOfState, eu as TableQueriesOfState, ag as DerivedResolver, eJ as ValidationIssue, ev as TargetKind, b1 as InputSelectionDescriptor, a_ as InputDomainDescriptor, y as BoardTargetDomainDescriptor, s as BoardInputCollectorMeta, K as CardIdOfState, bj as ManifestContract, es as TableOfState, g as AnyInteractionSpec, d as AnyCardActionSpec, aq as EffectMap, dC as ScopedPhaseState, eh as StageMap, bR as PhaseZoneList, F as CardActionMap, dU as SetupSelectionOfManifest, eF as TiledVertexIdOfTable, er as TableOfManifest, ex as TiledBoardIdOfTable, ez as TiledEdgeIdOfTable, eD as TiledSpaceIdOfTable, J as CardIdOfManifest, bD as PhaseMapOf, eN as ViewMapOf, cc as ReducerGameDefinition, eo as StaticViewDefinition, ay as ExactManifestContractOf, bG as PhaseNameOfContract, bc as InteractionSpec, bZ as PlayerZoneIdOfManifest, G as CardActionSpec, ba as InteractionRule, b7 as InteractionMap, bL as PhaseSchemasOfContract, j as AnySchema, a3 as ContinuationCallable, as as EffectRollDieDefinition, at as EffectShuffleDefinition, au as EffectShufflePlayerZoneDefinition, ej as StageSpec, et as TableQueries, cb as ReducerGameContractLike, q as BoardIdOfTable, o as BoardContainerIdOfTable } from './views-fn2RuXOx.js';
|
|
3
|
+
export { w as BoardRef, af as DerivedDefinition, aB as FrameworkErrorCodes, aC as GameStateOf, aV as InitialStateCallbacks, bs as Op, bv as PerPlayer, bw as PerPlayerBoardRef, bx as PerPlayerSchemaOptions, bU as PlayerId, c7 as ReducerAccept, c8 as ReducerEdit, cf as ReducerOps, cg as ReducerReject, ch as ReducerResult, cl as ReducerStateBase, cn as ReducerTransaction, co as ReducerValidationResult, cN as RotatePlayerZoneArgs, dV as SharedBoardRef, ew as TerminalOutcome, eS as asPlayerId, eU as boardRef, eV as boardRefKey, eW as boardRefSchema, eY as createDerivedResolver, f0 as createReducerEdit, f1 as createReducerOps, f2 as createReducerTransaction, f3 as defineDerived, f5 as isPerPlayer, f6 as isPerPlayerBoardRef, f7 as isPlayerId, f8 as isSharedBoardRef, fa as parseBoardRefKey, fb as perPlayer, fc as perPlayerBoardRef, fd as perPlayerEntries, fe as perPlayerGet, ff as perPlayerHas, fg as perPlayerKeys, fh as perPlayerMap, fi as perPlayerRequire, fj as perPlayerSchema, fk as perPlayerSet, fl as perPlayerSize, fm as perPlayerValues, fn as pipe, fp as sharedBoardRef } from './views-fn2RuXOx.js';
|
|
4
4
|
import { a as ReducerBundleContract } from './index.d-BL3bT5lt.js';
|
|
5
5
|
import { a as ReducerDiagnosticsSink } from './stale-contract-artifact-error-BelRiIDR.js';
|
|
6
6
|
export { D as DispatchTraceSummaryEntry, R as ReducerDiagnosticEvent, S as StaleContractArtifactError, b as StaleContractArtifactErrorOptions, c as StaleContractArtifactKind, i as isStaleContractArtifactError, n as noopDiagnosticsSink } from './stale-contract-artifact-error-BelRiIDR.js';
|
|
@@ -109,7 +109,7 @@ type ResourceMapInputOptions<State extends CollectorState> = {
|
|
|
109
109
|
}>;
|
|
110
110
|
};
|
|
111
111
|
type ChoiceValue = string | null;
|
|
112
|
-
type DomainChoice<Value extends ChoiceValue
|
|
112
|
+
type DomainChoice<Value extends ChoiceValue> = {
|
|
113
113
|
value: Value;
|
|
114
114
|
label: string;
|
|
115
115
|
icon?: string;
|
|
@@ -133,13 +133,13 @@ type ResourceMapChoiceSource<State extends CollectorState> = "resourceMap" | {
|
|
|
133
133
|
source: "resourceMap";
|
|
134
134
|
decorate?: ResourceMapChoiceDecorator<State>;
|
|
135
135
|
};
|
|
136
|
-
type DomainChoices<Value extends ChoiceValue, State extends CollectorState> = ReadonlyArray<DomainChoice<Value
|
|
137
|
-
type DependentDomainChoices<Value extends ChoiceValue, State extends CollectorState, Dependencies extends readonly InputFieldRef<string, unknown>[]> = ReadonlyArray<DomainChoice<Value
|
|
136
|
+
type DomainChoices<Value extends ChoiceValue, State extends CollectorState> = ReadonlyArray<DomainChoice<Value>> | ResourceMapChoiceSource<State> | ((context: DomainContext<State>) => ReadonlyArray<DomainChoice<Value>>);
|
|
137
|
+
type DependentDomainChoices<Value extends ChoiceValue, State extends CollectorState, Dependencies extends readonly InputFieldRef<string, unknown>[]> = ReadonlyArray<DomainChoice<Value>> | ((context: DomainContext<State, DependencyValues<Dependencies>>) => ReadonlyArray<DomainChoice<Value>>);
|
|
138
138
|
type ChoiceListDefaultValue<Value extends string, State extends CollectorState> = Value[] | "all" | ((context: DomainContext<State> & {
|
|
139
|
-
choices: ReadonlyArray<DomainChoice<Value
|
|
139
|
+
choices: ReadonlyArray<DomainChoice<Value>>;
|
|
140
140
|
}) => Value[]);
|
|
141
141
|
type ChoiceDefaultResolver<Value extends ChoiceValue, State extends CollectorState, Values extends Readonly<Record<string, unknown>> = Record<string, never>> = (context: DomainContext<State, Values> & {
|
|
142
|
-
choices: ReadonlyArray<DomainChoice<Value
|
|
142
|
+
choices: ReadonlyArray<DomainChoice<Value>>;
|
|
143
143
|
}) => Value | undefined;
|
|
144
144
|
declare function baseFormInput<Schema extends ManifestFormInputSchema & SchemaLike<unknown>, State extends CollectorState = CollectorState>(schema: Schema): InputCollector<Schema, State, "form">;
|
|
145
145
|
declare function baseFormInput<Schema extends ManifestFormInputSchema & SchemaLike<unknown>, State extends CollectorState = CollectorState>(schema: Schema, options: {
|
package/dist/reducer.js
CHANGED
|
@@ -128,7 +128,7 @@ import {
|
|
|
128
128
|
spendPlayerResourcesInPlace,
|
|
129
129
|
transferPlayerResources,
|
|
130
130
|
transferPlayerResourcesInPlace
|
|
131
|
-
} from "./chunk-
|
|
131
|
+
} from "./chunk-N6ZDIMRB.js";
|
|
132
132
|
import {
|
|
133
133
|
REDUCER_CONTRACT_VERSION,
|
|
134
134
|
builders_exports,
|
|
@@ -138,6 +138,10 @@ import {
|
|
|
138
138
|
StaleContractArtifactError,
|
|
139
139
|
isStaleContractArtifactError
|
|
140
140
|
} from "./chunk-3OZMHZK3.js";
|
|
141
|
+
import {
|
|
142
|
+
RuntimeJsonSchema,
|
|
143
|
+
assertJsonWithinLimits
|
|
144
|
+
} from "./chunk-PF7L4BMG.js";
|
|
141
145
|
import "./chunk-PZ5AY32C.js";
|
|
142
146
|
|
|
143
147
|
// src/reducer/schema-helpers.ts
|
|
@@ -1209,12 +1213,10 @@ function many(collector, options) {
|
|
|
1209
1213
|
throw new Error("many(...) cannot wrap rngInput collectors.");
|
|
1210
1214
|
}
|
|
1211
1215
|
const selection = normalizeManyOptions(options);
|
|
1212
|
-
const {
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
...rest
|
|
1217
|
-
} = collector;
|
|
1216
|
+
const rest = { ...collector };
|
|
1217
|
+
delete rest.schema;
|
|
1218
|
+
delete rest.selection;
|
|
1219
|
+
delete rest.defaultValue;
|
|
1218
1220
|
return {
|
|
1219
1221
|
...rest,
|
|
1220
1222
|
schema: z5.array(collector.schema),
|
|
@@ -2834,7 +2836,14 @@ function collectTrustedRuntimeRegistry(definition) {
|
|
|
2834
2836
|
const continuationsById = /* @__PURE__ */ new Map();
|
|
2835
2837
|
const effectsById = /* @__PURE__ */ new Map();
|
|
2836
2838
|
for (const phaseIndex of index.phasesByName.values()) {
|
|
2837
|
-
const
|
|
2839
|
+
const trustedPhase = {
|
|
2840
|
+
phaseName: phaseIndex.phaseName,
|
|
2841
|
+
phase: phaseIndex.phase,
|
|
2842
|
+
interactions: phaseIndex.interactions,
|
|
2843
|
+
stages: phaseIndex.stages,
|
|
2844
|
+
zones: phaseIndex.zones,
|
|
2845
|
+
cardActions: phaseIndex.cardActions
|
|
2846
|
+
};
|
|
2838
2847
|
phasesByName.set(phaseIndex.phaseName, trustedPhase);
|
|
2839
2848
|
for (const [, effect] of phaseIndex.effects) {
|
|
2840
2849
|
effectsById.set(effect.id, { id: effect.id, type: effect.type });
|
|
@@ -2932,7 +2941,7 @@ function invokeEffect(effect, options) {
|
|
|
2932
2941
|
`fx.effect: unsupported effect type '${effect.type}'.`
|
|
2933
2942
|
);
|
|
2934
2943
|
}
|
|
2935
|
-
function createReducerFx(
|
|
2944
|
+
function createReducerFx() {
|
|
2936
2945
|
const fx = {
|
|
2937
2946
|
transition(to) {
|
|
2938
2947
|
return { kind: "flow.transition", to };
|
|
@@ -2948,8 +2957,8 @@ function createReducerFx(_state) {
|
|
|
2948
2957
|
}
|
|
2949
2958
|
|
|
2950
2959
|
// src/reducer/bundle/trusted/trusted-runtime-args.ts
|
|
2951
|
-
function fxForState(
|
|
2952
|
-
return createReducerFx(
|
|
2960
|
+
function fxForState() {
|
|
2961
|
+
return createReducerFx();
|
|
2953
2962
|
}
|
|
2954
2963
|
function buildContext(state, manifest) {
|
|
2955
2964
|
return {
|
|
@@ -2967,7 +2976,8 @@ function buildContext(state, manifest) {
|
|
|
2967
2976
|
};
|
|
2968
2977
|
}
|
|
2969
2978
|
function publicRuntime(runtime) {
|
|
2970
|
-
const
|
|
2979
|
+
const rest = { ...runtime };
|
|
2980
|
+
delete rest.rng;
|
|
2971
2981
|
return rest;
|
|
2972
2982
|
}
|
|
2973
2983
|
var DISABLED_RANDOM_HELPERS = {
|
|
@@ -2983,7 +2993,7 @@ function buildRuntimeArgs(state, manifest, helpers, toDomainState2, extra, optio
|
|
|
2983
2993
|
return {
|
|
2984
2994
|
...buildContext(state, manifest),
|
|
2985
2995
|
...helpers,
|
|
2986
|
-
fx: options.fx ?? fxForState(
|
|
2996
|
+
fx: options.fx ?? fxForState(),
|
|
2987
2997
|
q,
|
|
2988
2998
|
derived: options.derived ?? createDerivedResolver(domainState, { q }),
|
|
2989
2999
|
runtime: publicRuntime(state.runtime),
|
|
@@ -3029,7 +3039,8 @@ var runtimeResultHelpers = {
|
|
|
3029
3039
|
|
|
3030
3040
|
// src/reducer/bundle/trusted/trusted-state-codec.ts
|
|
3031
3041
|
function toDomainState(state) {
|
|
3032
|
-
const
|
|
3042
|
+
const domain = { ...state };
|
|
3043
|
+
delete domain.runtime;
|
|
3033
3044
|
attachPhaseAccessor(domain);
|
|
3034
3045
|
return domain;
|
|
3035
3046
|
}
|
|
@@ -3144,8 +3155,8 @@ function createTrustedRuntimeScope(definition, options = {}) {
|
|
|
3144
3155
|
ops: createReducerOps(),
|
|
3145
3156
|
edit: createReducerEdit()
|
|
3146
3157
|
};
|
|
3147
|
-
function fxForState2(
|
|
3148
|
-
return fxForState(
|
|
3158
|
+
function fxForState2() {
|
|
3159
|
+
return fxForState();
|
|
3149
3160
|
}
|
|
3150
3161
|
function buildContext2(state) {
|
|
3151
3162
|
return buildContext(state, definition.contract.manifest);
|
|
@@ -5324,7 +5335,7 @@ function createProjectionContext(options) {
|
|
|
5324
5335
|
domainState: options.domainState,
|
|
5325
5336
|
q,
|
|
5326
5337
|
derived: createDerivedResolver(options.domainState, { q }),
|
|
5327
|
-
fx: createReducerFx(
|
|
5338
|
+
fx: createReducerFx(),
|
|
5328
5339
|
eligibleTargets: /* @__PURE__ */ new Map(),
|
|
5329
5340
|
stageAllowlists: /* @__PURE__ */ new Map()
|
|
5330
5341
|
};
|
|
@@ -6082,10 +6093,27 @@ function createTrustedReducerBundle(definition, options = {}) {
|
|
|
6082
6093
|
}
|
|
6083
6094
|
|
|
6084
6095
|
// src/reducer/ingress/session-codec.ts
|
|
6085
|
-
import { z as
|
|
6096
|
+
import { z as z11 } from "zod";
|
|
6086
6097
|
|
|
6087
|
-
// src/reducer/
|
|
6098
|
+
// src/reducer/ingress/runtime-payload.ts
|
|
6088
6099
|
import { z as z8 } from "zod";
|
|
6100
|
+
var runtimePayloadSchema = z8.preprocess((value) => {
|
|
6101
|
+
if (value === void 0) return value;
|
|
6102
|
+
assertJsonWithinLimits(
|
|
6103
|
+
value,
|
|
6104
|
+
{
|
|
6105
|
+
maxDepth: 64,
|
|
6106
|
+
maxNodes: 1e5,
|
|
6107
|
+
maxStringBytes: 1048576,
|
|
6108
|
+
maxCollectionEntries: 5e4
|
|
6109
|
+
},
|
|
6110
|
+
"Runtime payload"
|
|
6111
|
+
);
|
|
6112
|
+
return value;
|
|
6113
|
+
}, RuntimeJsonSchema);
|
|
6114
|
+
|
|
6115
|
+
// src/reducer/contract-fingerprint.ts
|
|
6116
|
+
import { z as z9 } from "zod";
|
|
6089
6117
|
function contractFingerprint(source) {
|
|
6090
6118
|
const contract = "contract" in source ? source.contract : source;
|
|
6091
6119
|
const phases = source.phases;
|
|
@@ -6119,7 +6147,7 @@ function phaseSchema(phase) {
|
|
|
6119
6147
|
function hashSchema(schema) {
|
|
6120
6148
|
return hashJson2(
|
|
6121
6149
|
normalizeJsonSchema(
|
|
6122
|
-
|
|
6150
|
+
z9.toJSONSchema(schema, { unrepresentable: "any" })
|
|
6123
6151
|
)
|
|
6124
6152
|
);
|
|
6125
6153
|
}
|
|
@@ -6322,42 +6350,31 @@ function utf8Bytes2(input) {
|
|
|
6322
6350
|
return Array.from(new TextEncoder().encode(input));
|
|
6323
6351
|
}
|
|
6324
6352
|
|
|
6325
|
-
// src/reducer/ingress/input-codec.ts
|
|
6326
|
-
import { z as z10 } from "zod";
|
|
6327
|
-
|
|
6328
|
-
// src/reducer/ingress/runtime-payload.ts
|
|
6329
|
-
import { z as z9 } from "zod";
|
|
6330
|
-
var runtimePayloadSchema = z9.lazy(
|
|
6331
|
-
() => z9.union([
|
|
6332
|
-
z9.boolean(),
|
|
6333
|
-
z9.number(),
|
|
6334
|
-
z9.string(),
|
|
6335
|
-
z9.null(),
|
|
6336
|
-
z9.array(runtimePayloadSchema),
|
|
6337
|
-
z9.record(z9.string(), z9.union([runtimePayloadSchema, z9.undefined()]))
|
|
6338
|
-
])
|
|
6339
|
-
);
|
|
6340
|
-
|
|
6341
6353
|
// src/reducer/ingress/input-codec.ts
|
|
6342
6354
|
function createRuntimeInputParser(playerIdSchema) {
|
|
6343
|
-
|
|
6344
|
-
|
|
6345
|
-
|
|
6346
|
-
|
|
6347
|
-
|
|
6348
|
-
|
|
6349
|
-
|
|
6350
|
-
|
|
6351
|
-
|
|
6352
|
-
|
|
6353
|
-
|
|
6355
|
+
return (rawInput) => {
|
|
6356
|
+
const input = safeParseOrThrow(
|
|
6357
|
+
zod_exports.GameInputSchema,
|
|
6358
|
+
rawInput,
|
|
6359
|
+
"input"
|
|
6360
|
+
);
|
|
6361
|
+
const playerId = safeParseOrThrow(
|
|
6362
|
+
playerIdSchema,
|
|
6363
|
+
input.playerId,
|
|
6364
|
+
"input.playerId"
|
|
6365
|
+
);
|
|
6366
|
+
return {
|
|
6367
|
+
...input,
|
|
6368
|
+
playerId
|
|
6369
|
+
};
|
|
6370
|
+
};
|
|
6354
6371
|
}
|
|
6355
6372
|
|
|
6356
6373
|
// src/reducer/ingress/phase-schemas.ts
|
|
6357
|
-
import { z as
|
|
6374
|
+
import { z as z10 } from "zod";
|
|
6358
6375
|
function createPhaseNameSchema(phaseNames) {
|
|
6359
6376
|
const allowed = new Set(phaseNames);
|
|
6360
|
-
return
|
|
6377
|
+
return z10.custom(
|
|
6361
6378
|
(value) => typeof value === "string" && allowed.has(value),
|
|
6362
6379
|
{ message: "Invalid phase name" }
|
|
6363
6380
|
);
|
|
@@ -6373,142 +6390,132 @@ function collectIngressPhaseSchemas(definition) {
|
|
|
6373
6390
|
}
|
|
6374
6391
|
|
|
6375
6392
|
// src/reducer/ingress/session-codec.ts
|
|
6376
|
-
var
|
|
6377
|
-
|
|
6378
|
-
|
|
6379
|
-
|
|
6380
|
-
z12.boolean(),
|
|
6381
|
-
z12.null(),
|
|
6382
|
-
z12.array(runtimePayloadSchema2),
|
|
6383
|
-
z12.record(z12.string(), runtimePayloadSchema2)
|
|
6384
|
-
])
|
|
6385
|
-
);
|
|
6386
|
-
var runtimeRecordSchema = z12.record(z12.string(), runtimePayloadSchema2);
|
|
6387
|
-
var perPlayerSchema2 = (valueSchema) => z12.object({
|
|
6388
|
-
__perPlayer: z12.literal(true),
|
|
6389
|
-
entries: z12.array(z12.tuple([z12.string(), valueSchema]))
|
|
6393
|
+
var runtimeRecordSchema = z11.record(z11.string(), runtimePayloadSchema);
|
|
6394
|
+
var perPlayerSchema2 = (valueSchema) => z11.object({
|
|
6395
|
+
__perPlayer: z11.literal(true),
|
|
6396
|
+
entries: z11.array(z11.tuple([z11.string(), valueSchema]))
|
|
6390
6397
|
}).strict();
|
|
6391
|
-
var runtimeComponentLocationSchema =
|
|
6392
|
-
|
|
6393
|
-
|
|
6394
|
-
type:
|
|
6395
|
-
deckId:
|
|
6396
|
-
playedBy:
|
|
6397
|
-
position:
|
|
6398
|
+
var runtimeComponentLocationSchema = z11.discriminatedUnion("type", [
|
|
6399
|
+
z11.object({ type: z11.literal("Detached") }).strict(),
|
|
6400
|
+
z11.object({
|
|
6401
|
+
type: z11.literal("InDeck"),
|
|
6402
|
+
deckId: z11.string(),
|
|
6403
|
+
playedBy: z11.string().nullable(),
|
|
6404
|
+
position: z11.number().int().nullable().optional()
|
|
6398
6405
|
}).strict(),
|
|
6399
|
-
|
|
6400
|
-
type:
|
|
6401
|
-
handId:
|
|
6402
|
-
playerId:
|
|
6403
|
-
position:
|
|
6406
|
+
z11.object({
|
|
6407
|
+
type: z11.literal("InHand"),
|
|
6408
|
+
handId: z11.string(),
|
|
6409
|
+
playerId: z11.string(),
|
|
6410
|
+
position: z11.number().int().nullable().optional()
|
|
6404
6411
|
}).strict(),
|
|
6405
|
-
|
|
6406
|
-
type:
|
|
6407
|
-
zoneId:
|
|
6408
|
-
playedBy:
|
|
6409
|
-
position:
|
|
6412
|
+
z11.object({
|
|
6413
|
+
type: z11.literal("InZone"),
|
|
6414
|
+
zoneId: z11.string(),
|
|
6415
|
+
playedBy: z11.string().nullable().optional(),
|
|
6416
|
+
position: z11.number().int().nullable().optional()
|
|
6410
6417
|
}).strict(),
|
|
6411
|
-
|
|
6412
|
-
type:
|
|
6413
|
-
boardId:
|
|
6414
|
-
spaceId:
|
|
6415
|
-
position:
|
|
6418
|
+
z11.object({
|
|
6419
|
+
type: z11.literal("OnSpace"),
|
|
6420
|
+
boardId: z11.string(),
|
|
6421
|
+
spaceId: z11.string(),
|
|
6422
|
+
position: z11.number().int().nullable().optional()
|
|
6416
6423
|
}).strict(),
|
|
6417
|
-
|
|
6418
|
-
type:
|
|
6419
|
-
boardId:
|
|
6420
|
-
containerId:
|
|
6421
|
-
position:
|
|
6424
|
+
z11.object({
|
|
6425
|
+
type: z11.literal("InContainer"),
|
|
6426
|
+
boardId: z11.string(),
|
|
6427
|
+
containerId: z11.string(),
|
|
6428
|
+
position: z11.number().int().nullable().optional()
|
|
6422
6429
|
}).strict(),
|
|
6423
|
-
|
|
6424
|
-
type:
|
|
6425
|
-
boardId:
|
|
6426
|
-
edgeId:
|
|
6427
|
-
position:
|
|
6430
|
+
z11.object({
|
|
6431
|
+
type: z11.literal("OnEdge"),
|
|
6432
|
+
boardId: z11.string(),
|
|
6433
|
+
edgeId: z11.string(),
|
|
6434
|
+
position: z11.number().int().nullable().optional()
|
|
6428
6435
|
}).strict(),
|
|
6429
|
-
|
|
6430
|
-
type:
|
|
6431
|
-
boardId:
|
|
6432
|
-
vertexId:
|
|
6433
|
-
position:
|
|
6436
|
+
z11.object({
|
|
6437
|
+
type: z11.literal("OnVertex"),
|
|
6438
|
+
boardId: z11.string(),
|
|
6439
|
+
vertexId: z11.string(),
|
|
6440
|
+
position: z11.number().int().nullable().optional()
|
|
6434
6441
|
}).strict(),
|
|
6435
|
-
|
|
6436
|
-
type:
|
|
6437
|
-
host:
|
|
6438
|
-
|
|
6439
|
-
|
|
6442
|
+
z11.object({
|
|
6443
|
+
type: z11.literal("InSlot"),
|
|
6444
|
+
host: z11.union([
|
|
6445
|
+
z11.object({ kind: z11.literal("piece"), id: z11.string() }).strict(),
|
|
6446
|
+
z11.object({ kind: z11.literal("die"), id: z11.string() }).strict()
|
|
6440
6447
|
]),
|
|
6441
|
-
slotId:
|
|
6442
|
-
position:
|
|
6448
|
+
slotId: z11.string(),
|
|
6449
|
+
position: z11.number().int().nullable().optional()
|
|
6443
6450
|
}).strict()
|
|
6444
6451
|
]);
|
|
6445
|
-
var currentRuntimeTableSchema =
|
|
6446
|
-
playerOrder:
|
|
6447
|
-
zones:
|
|
6448
|
-
shared:
|
|
6449
|
-
perPlayer:
|
|
6450
|
-
visibility:
|
|
6451
|
-
|
|
6452
|
-
|
|
6452
|
+
var currentRuntimeTableSchema = z11.object({
|
|
6453
|
+
playerOrder: z11.array(z11.string()),
|
|
6454
|
+
zones: z11.object({
|
|
6455
|
+
shared: z11.record(z11.string(), z11.array(z11.string())),
|
|
6456
|
+
perPlayer: z11.record(z11.string(), perPlayerSchema2(z11.array(z11.string()))),
|
|
6457
|
+
visibility: z11.record(
|
|
6458
|
+
z11.string(),
|
|
6459
|
+
z11.enum(["all", "ownerOnly", "public", "hidden"])
|
|
6453
6460
|
),
|
|
6454
|
-
cardSetIdsByZoneId:
|
|
6461
|
+
cardSetIdsByZoneId: z11.record(z11.string(), z11.array(z11.string())).optional()
|
|
6455
6462
|
}).strict(),
|
|
6456
|
-
decks:
|
|
6457
|
-
hands:
|
|
6458
|
-
handVisibility:
|
|
6459
|
-
|
|
6460
|
-
|
|
6463
|
+
decks: z11.record(z11.string(), z11.array(z11.string())),
|
|
6464
|
+
hands: z11.record(z11.string(), perPlayerSchema2(z11.array(z11.string()))),
|
|
6465
|
+
handVisibility: z11.record(
|
|
6466
|
+
z11.string(),
|
|
6467
|
+
z11.enum(["all", "ownerOnly", "public", "hidden"])
|
|
6461
6468
|
),
|
|
6462
|
-
cards:
|
|
6463
|
-
|
|
6464
|
-
|
|
6465
|
-
componentType:
|
|
6466
|
-
id:
|
|
6467
|
-
cardSetId:
|
|
6468
|
-
cardType:
|
|
6469
|
-
name:
|
|
6470
|
-
text:
|
|
6469
|
+
cards: z11.record(
|
|
6470
|
+
z11.string(),
|
|
6471
|
+
z11.object({
|
|
6472
|
+
componentType: z11.string().optional(),
|
|
6473
|
+
id: z11.string(),
|
|
6474
|
+
cardSetId: z11.string(),
|
|
6475
|
+
cardType: z11.string(),
|
|
6476
|
+
name: z11.string().optional(),
|
|
6477
|
+
text: z11.string().optional(),
|
|
6471
6478
|
properties: runtimeRecordSchema
|
|
6472
6479
|
}).strict()
|
|
6473
6480
|
),
|
|
6474
|
-
pieces:
|
|
6475
|
-
|
|
6476
|
-
|
|
6477
|
-
componentType:
|
|
6478
|
-
id:
|
|
6479
|
-
pieceTypeId:
|
|
6480
|
-
pieceName:
|
|
6481
|
-
ownerId:
|
|
6481
|
+
pieces: z11.record(
|
|
6482
|
+
z11.string(),
|
|
6483
|
+
z11.object({
|
|
6484
|
+
componentType: z11.string().optional(),
|
|
6485
|
+
id: z11.string(),
|
|
6486
|
+
pieceTypeId: z11.string(),
|
|
6487
|
+
pieceName: z11.string().nullable().optional(),
|
|
6488
|
+
ownerId: z11.string().nullable().optional(),
|
|
6482
6489
|
properties: runtimeRecordSchema
|
|
6483
6490
|
}).strict()
|
|
6484
6491
|
),
|
|
6485
|
-
componentLocations:
|
|
6486
|
-
ownerOfCard:
|
|
6487
|
-
visibility:
|
|
6488
|
-
|
|
6489
|
-
|
|
6490
|
-
faceUp:
|
|
6491
|
-
visibleTo:
|
|
6492
|
+
componentLocations: z11.record(z11.string(), runtimeComponentLocationSchema),
|
|
6493
|
+
ownerOfCard: z11.record(z11.string(), z11.string().nullable()),
|
|
6494
|
+
visibility: z11.record(
|
|
6495
|
+
z11.string(),
|
|
6496
|
+
z11.object({
|
|
6497
|
+
faceUp: z11.boolean(),
|
|
6498
|
+
visibleTo: z11.array(z11.string()).nullable().optional()
|
|
6492
6499
|
}).strict()
|
|
6493
6500
|
),
|
|
6494
6501
|
resources: perPlayerSchema2(runtimeRecordSchema),
|
|
6495
|
-
boards:
|
|
6496
|
-
byId:
|
|
6497
|
-
hex:
|
|
6498
|
-
square:
|
|
6499
|
-
network:
|
|
6500
|
-
track:
|
|
6502
|
+
boards: z11.object({
|
|
6503
|
+
byId: z11.record(z11.string(), runtimeRecordSchema),
|
|
6504
|
+
hex: z11.record(z11.string(), runtimeRecordSchema),
|
|
6505
|
+
square: z11.record(z11.string(), runtimeRecordSchema),
|
|
6506
|
+
network: z11.record(z11.string(), runtimeRecordSchema).optional(),
|
|
6507
|
+
track: z11.record(z11.string(), runtimeRecordSchema).optional()
|
|
6501
6508
|
}).strict(),
|
|
6502
|
-
dice:
|
|
6503
|
-
|
|
6504
|
-
|
|
6505
|
-
componentType:
|
|
6506
|
-
id:
|
|
6507
|
-
dieTypeId:
|
|
6508
|
-
dieName:
|
|
6509
|
-
ownerId:
|
|
6510
|
-
sides:
|
|
6511
|
-
value:
|
|
6509
|
+
dice: z11.record(
|
|
6510
|
+
z11.string(),
|
|
6511
|
+
z11.object({
|
|
6512
|
+
componentType: z11.string().optional(),
|
|
6513
|
+
id: z11.string(),
|
|
6514
|
+
dieTypeId: z11.string(),
|
|
6515
|
+
dieName: z11.string().nullable().optional(),
|
|
6516
|
+
ownerId: z11.string().nullable().optional(),
|
|
6517
|
+
sides: z11.number().int(),
|
|
6518
|
+
value: z11.number().int().nullable().optional(),
|
|
6512
6519
|
properties: runtimeRecordSchema
|
|
6513
6520
|
}).strict()
|
|
6514
6521
|
)
|
|
@@ -6517,36 +6524,36 @@ function createIngressRuntimeCodec(definition) {
|
|
|
6517
6524
|
const { phaseNameSchema } = collectIngressPhaseSchemas(definition);
|
|
6518
6525
|
const playerIdSchema = definition.contract.manifest.ids.playerId;
|
|
6519
6526
|
const liveContractFingerprint = contractFingerprint(definition).value;
|
|
6520
|
-
const flowSchema =
|
|
6527
|
+
const flowSchema = z11.object({
|
|
6521
6528
|
currentPhase: phaseNameSchema,
|
|
6522
|
-
turn:
|
|
6523
|
-
round:
|
|
6524
|
-
activePlayers:
|
|
6529
|
+
turn: z11.number().int(),
|
|
6530
|
+
round: z11.number().int(),
|
|
6531
|
+
activePlayers: z11.array(playerIdSchema)
|
|
6525
6532
|
});
|
|
6526
|
-
const runtimeStateSchema =
|
|
6527
|
-
rng:
|
|
6528
|
-
seed:
|
|
6529
|
-
cursor:
|
|
6530
|
-
trace:
|
|
6533
|
+
const runtimeStateSchema = z11.object({
|
|
6534
|
+
rng: z11.object({
|
|
6535
|
+
seed: z11.number().int().nullable(),
|
|
6536
|
+
cursor: z11.number().int(),
|
|
6537
|
+
trace: z11.array(z11.string())
|
|
6531
6538
|
}),
|
|
6532
|
-
setup:
|
|
6533
|
-
profileId:
|
|
6534
|
-
optionValues:
|
|
6539
|
+
setup: z11.object({
|
|
6540
|
+
profileId: z11.string(),
|
|
6541
|
+
optionValues: z11.record(z11.string(), z11.string().nullable())
|
|
6535
6542
|
}).nullable(),
|
|
6536
|
-
simultaneous:
|
|
6537
|
-
current:
|
|
6543
|
+
simultaneous: z11.object({
|
|
6544
|
+
current: z11.object({
|
|
6538
6545
|
phaseName: phaseNameSchema,
|
|
6539
|
-
actors:
|
|
6540
|
-
submissions:
|
|
6541
|
-
|
|
6542
|
-
|
|
6543
|
-
interactionId:
|
|
6544
|
-
params:
|
|
6546
|
+
actors: z11.array(playerIdSchema),
|
|
6547
|
+
submissions: z11.record(
|
|
6548
|
+
z11.string(),
|
|
6549
|
+
z11.object({
|
|
6550
|
+
interactionId: z11.string(),
|
|
6551
|
+
params: runtimePayloadSchema
|
|
6545
6552
|
})
|
|
6546
6553
|
)
|
|
6547
6554
|
}).nullable()
|
|
6548
6555
|
}),
|
|
6549
|
-
lastTransition:
|
|
6556
|
+
lastTransition: z11.object({
|
|
6550
6557
|
from: phaseNameSchema,
|
|
6551
6558
|
to: phaseNameSchema
|
|
6552
6559
|
}).nullable()
|
|
@@ -6575,7 +6582,7 @@ function createIngressRuntimeCodec(definition) {
|
|
|
6575
6582
|
return {
|
|
6576
6583
|
table,
|
|
6577
6584
|
playerIds: safeParseOrThrow(
|
|
6578
|
-
|
|
6585
|
+
z11.array(playerIdSchema),
|
|
6579
6586
|
playerIds && playerIds.length > 0 ? playerIds : table.playerOrder,
|
|
6580
6587
|
"table.playerOrder"
|
|
6581
6588
|
)
|