@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.
Files changed (84) hide show
  1. package/README.md +8 -1
  2. package/REFERENCE.md +1849 -379
  3. package/dist/{ResourceCounter-BTXklCEZ.d.ts → ResourceCounter-BuiNstXs.d.ts} +5 -1
  4. package/dist/{ThemeProvider-DvMl17Ny.d.ts → ThemeProvider-B1sIoBlX.d.ts} +1 -1
  5. package/dist/attributes-DbvyMbXw.d.ts +68 -0
  6. package/dist/authoring/index.d.ts +66 -0
  7. package/dist/authoring/index.js +560 -0
  8. package/dist/authoring/index.js.map +1 -0
  9. package/dist/browser-interaction.d.ts +246 -44
  10. package/dist/browser-interaction.js +14 -1
  11. package/dist/{chunk-Q5O7GPVY.js → chunk-45FI6XII.js} +630 -375
  12. package/dist/chunk-45FI6XII.js.map +1 -0
  13. package/dist/{chunk-4G7552LO.js → chunk-6JQFGSLD.js} +216 -47
  14. package/dist/chunk-6JQFGSLD.js.map +1 -0
  15. package/dist/{chunk-NBAEEHAU.js → chunk-CP35NPPY.js} +5926 -5266
  16. package/dist/chunk-CP35NPPY.js.map +1 -0
  17. package/dist/{chunk-2LDZ5C3T.js → chunk-FWVV2X74.js} +2 -2
  18. package/dist/{chunk-MNKDSGIA.js → chunk-HWJS3VOJ.js} +6 -2
  19. package/dist/chunk-HWJS3VOJ.js.map +1 -0
  20. package/dist/chunk-K5ZRJTZZ.js +328 -0
  21. package/dist/chunk-K5ZRJTZZ.js.map +1 -0
  22. package/dist/{chunk-U5KBV2BA.js → chunk-N6ZDIMRB.js} +444 -223
  23. package/dist/chunk-N6ZDIMRB.js.map +1 -0
  24. package/dist/chunk-O6M6PN4E.js +1225 -0
  25. package/dist/chunk-O6M6PN4E.js.map +1 -0
  26. package/dist/chunk-PF7L4BMG.js +117 -0
  27. package/dist/chunk-PF7L4BMG.js.map +1 -0
  28. package/dist/{chunk-P7F4L2FF.js → chunk-WOWFONLZ.js} +609 -1287
  29. package/dist/chunk-WOWFONLZ.js.map +1 -0
  30. package/dist/{chunk-QLG6VEMW.js → chunk-WUIVY2KE.js} +318 -21
  31. package/dist/chunk-WUIVY2KE.js.map +1 -0
  32. package/dist/chunk-ZAS2SENW.js +12 -0
  33. package/dist/chunk-ZAS2SENW.js.map +1 -0
  34. package/dist/codegen.d.ts +11 -1
  35. package/dist/codegen.js +1 -1
  36. package/dist/{components-DaIqi9QM.d.ts → components-BbWPnZCF.d.ts} +37 -70
  37. package/dist/{hex-board-view-UCUjMALd.d.ts → hex-board-view-Kz9Q_zsv.d.ts} +1 -1
  38. package/dist/index.js +2 -1
  39. package/dist/package-set.d.ts +2 -2
  40. package/dist/package-set.js +2 -1
  41. package/dist/player-state-Cqpyeql0.d.ts +371 -0
  42. package/dist/protocol-BP193lva.d.ts +267 -0
  43. package/dist/reducer/advanced.d.ts +2 -2
  44. package/dist/reducer/advanced.js +1 -1
  45. package/dist/reducer-contract.js +1 -1
  46. package/dist/reducer.d.ts +7 -7
  47. package/dist/reducer.js +190 -183
  48. package/dist/reducer.js.map +1 -1
  49. package/dist/runtime/primitives.d.ts +10 -9
  50. package/dist/runtime/primitives.js +9 -6
  51. package/dist/runtime/runtime-api.d.ts +2 -2
  52. package/dist/runtime/workspace-contract.d.ts +28 -76
  53. package/dist/runtime/workspace-contract.js +7 -5
  54. package/dist/runtime-api-BJharVaj.d.ts +198 -0
  55. package/dist/runtime-api-C6aWo9c0.d.ts +95 -0
  56. package/dist/runtime-json-CQ9QbLZ5.d.ts +5 -0
  57. package/dist/runtime.d.ts +80 -11
  58. package/dist/runtime.js +89 -445
  59. package/dist/runtime.js.map +1 -1
  60. package/dist/testing.d.ts +643 -22
  61. package/dist/testing.js +1371 -76
  62. package/dist/testing.js.map +1 -1
  63. package/dist/types-CYeN0wLK.d.ts +29 -0
  64. package/dist/{attributes-BeRyboMS.d.ts → types-DJj5MJkl.d.ts} +32 -55
  65. package/dist/types.d.ts +14 -7
  66. package/dist/ui/components.d.ts +4 -5
  67. package/dist/ui/components.js +19 -1
  68. package/dist/ui/player-state.d.ts +2 -365
  69. package/dist/ui/plugin-styles.css +1 -1
  70. package/dist/{ui-contract-BUC6iS3s.d.ts → ui-contract-CY7cxsCC.d.ts} +17 -26
  71. package/dist/ui.d.ts +8 -13
  72. package/dist/ui.js +20 -2
  73. package/dist/{views-B0hlW6IT.d.ts → views-fn2RuXOx.d.ts} +59 -44
  74. package/package.json +28 -4
  75. package/dist/chunk-4G7552LO.js.map +0 -1
  76. package/dist/chunk-MNKDSGIA.js.map +0 -1
  77. package/dist/chunk-NBAEEHAU.js.map +0 -1
  78. package/dist/chunk-P7F4L2FF.js.map +0 -1
  79. package/dist/chunk-Q5O7GPVY.js.map +0 -1
  80. package/dist/chunk-QLG6VEMW.js.map +0 -1
  81. package/dist/chunk-U5KBV2BA.js.map +0 -1
  82. package/dist/hex-color-MhOyuY-o.d.ts +0 -8
  83. package/dist/runtime-api-BXd70c2e.d.ts +0 -490
  84. /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-B0hlW6IT.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-B0hlW6IT.js';
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
 
@@ -10,7 +10,7 @@ import {
10
10
  isManifestScopedSchema,
11
11
  markManifestScopedSchema,
12
12
  resolveManifestPlayerIds
13
- } from "../chunk-U5KBV2BA.js";
13
+ } from "../chunk-N6ZDIMRB.js";
14
14
  import "../chunk-PZ5AY32C.js";
15
15
 
16
16
  // src/reducer/client-param-schemas.ts
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  materializeManifestTable
3
- } from "./chunk-NBAEEHAU.js";
3
+ } from "./chunk-CP35NPPY.js";
4
4
  import {
5
5
  REDUCER_CONTRACT_VERSION,
6
6
  zod_exports
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-B0hlW6IT.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-B0hlW6IT.js';
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, State extends CollectorState> = {
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, State>> | ResourceMapChoiceSource<State> | ((context: DomainContext<State>) => ReadonlyArray<DomainChoice<Value, State>>);
137
- type DependentDomainChoices<Value extends ChoiceValue, State extends CollectorState, Dependencies extends readonly InputFieldRef<string, unknown>[]> = ReadonlyArray<DomainChoice<Value, State>> | ((context: DomainContext<State, DependencyValues<Dependencies>>) => ReadonlyArray<DomainChoice<Value, State>>);
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, State>>;
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, State>>;
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-U5KBV2BA.js";
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
- schema: _schema,
1214
- selection: _selection,
1215
- defaultValue: _defaultValue,
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 { effects: _effects, ...trustedPhase } = phaseIndex;
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(_state) {
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(state) {
2952
- return createReducerFx(state);
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 { rng: _rng, ...rest } = runtime;
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(state),
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 { runtime: _runtime, ...domain } = state;
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(state) {
3148
- return fxForState(state);
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(options.combinedState),
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 z12 } from "zod";
6096
+ import { z as z11 } from "zod";
6086
6097
 
6087
- // src/reducer/contract-fingerprint.ts
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
- z8.toJSONSchema(schema, { unrepresentable: "any" })
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
- const rawRuntimeInputSchema = z10.object({
6344
- kind: z10.literal("interaction"),
6345
- playerId: playerIdSchema,
6346
- interactionId: z10.string(),
6347
- params: runtimePayloadSchema.default({})
6348
- });
6349
- return (rawInput) => safeParseOrThrow(
6350
- rawRuntimeInputSchema,
6351
- rawInput,
6352
- "input"
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 z11 } from "zod";
6374
+ import { z as z10 } from "zod";
6358
6375
  function createPhaseNameSchema(phaseNames) {
6359
6376
  const allowed = new Set(phaseNames);
6360
- return z11.custom(
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 runtimePayloadSchema2 = z12.lazy(
6377
- () => z12.union([
6378
- z12.string(),
6379
- z12.number(),
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 = z12.discriminatedUnion("type", [
6392
- z12.object({ type: z12.literal("Detached") }).strict(),
6393
- z12.object({
6394
- type: z12.literal("InDeck"),
6395
- deckId: z12.string(),
6396
- playedBy: z12.string().nullable(),
6397
- position: z12.number().int().nullable().optional()
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
- z12.object({
6400
- type: z12.literal("InHand"),
6401
- handId: z12.string(),
6402
- playerId: z12.string(),
6403
- position: z12.number().int().nullable().optional()
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
- z12.object({
6406
- type: z12.literal("InZone"),
6407
- zoneId: z12.string(),
6408
- playedBy: z12.string().nullable().optional(),
6409
- position: z12.number().int().nullable().optional()
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
- z12.object({
6412
- type: z12.literal("OnSpace"),
6413
- boardId: z12.string(),
6414
- spaceId: z12.string(),
6415
- position: z12.number().int().nullable().optional()
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
- z12.object({
6418
- type: z12.literal("InContainer"),
6419
- boardId: z12.string(),
6420
- containerId: z12.string(),
6421
- position: z12.number().int().nullable().optional()
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
- z12.object({
6424
- type: z12.literal("OnEdge"),
6425
- boardId: z12.string(),
6426
- edgeId: z12.string(),
6427
- position: z12.number().int().nullable().optional()
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
- z12.object({
6430
- type: z12.literal("OnVertex"),
6431
- boardId: z12.string(),
6432
- vertexId: z12.string(),
6433
- position: z12.number().int().nullable().optional()
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
- z12.object({
6436
- type: z12.literal("InSlot"),
6437
- host: z12.union([
6438
- z12.object({ kind: z12.literal("piece"), id: z12.string() }).strict(),
6439
- z12.object({ kind: z12.literal("die"), id: z12.string() }).strict()
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: z12.string(),
6442
- position: z12.number().int().nullable().optional()
6448
+ slotId: z11.string(),
6449
+ position: z11.number().int().nullable().optional()
6443
6450
  }).strict()
6444
6451
  ]);
6445
- var currentRuntimeTableSchema = z12.object({
6446
- playerOrder: z12.array(z12.string()),
6447
- zones: z12.object({
6448
- shared: z12.record(z12.string(), z12.array(z12.string())),
6449
- perPlayer: z12.record(z12.string(), perPlayerSchema2(z12.array(z12.string()))),
6450
- visibility: z12.record(
6451
- z12.string(),
6452
- z12.enum(["all", "ownerOnly", "public", "hidden"])
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: z12.record(z12.string(), z12.array(z12.string())).optional()
6461
+ cardSetIdsByZoneId: z11.record(z11.string(), z11.array(z11.string())).optional()
6455
6462
  }).strict(),
6456
- decks: z12.record(z12.string(), z12.array(z12.string())),
6457
- hands: z12.record(z12.string(), perPlayerSchema2(z12.array(z12.string()))),
6458
- handVisibility: z12.record(
6459
- z12.string(),
6460
- z12.enum(["all", "ownerOnly", "public", "hidden"])
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: z12.record(
6463
- z12.string(),
6464
- z12.object({
6465
- componentType: z12.string().optional(),
6466
- id: z12.string(),
6467
- cardSetId: z12.string(),
6468
- cardType: z12.string(),
6469
- name: z12.string().optional(),
6470
- text: z12.string().optional(),
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: z12.record(
6475
- z12.string(),
6476
- z12.object({
6477
- componentType: z12.string().optional(),
6478
- id: z12.string(),
6479
- pieceTypeId: z12.string(),
6480
- pieceName: z12.string().nullable().optional(),
6481
- ownerId: z12.string().nullable().optional(),
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: z12.record(z12.string(), runtimeComponentLocationSchema),
6486
- ownerOfCard: z12.record(z12.string(), z12.string().nullable()),
6487
- visibility: z12.record(
6488
- z12.string(),
6489
- z12.object({
6490
- faceUp: z12.boolean(),
6491
- visibleTo: z12.array(z12.string()).nullable().optional()
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: z12.object({
6496
- byId: z12.record(z12.string(), runtimeRecordSchema),
6497
- hex: z12.record(z12.string(), runtimeRecordSchema),
6498
- square: z12.record(z12.string(), runtimeRecordSchema),
6499
- network: z12.record(z12.string(), runtimeRecordSchema).optional(),
6500
- track: z12.record(z12.string(), runtimeRecordSchema).optional()
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: z12.record(
6503
- z12.string(),
6504
- z12.object({
6505
- componentType: z12.string().optional(),
6506
- id: z12.string(),
6507
- dieTypeId: z12.string(),
6508
- dieName: z12.string().nullable().optional(),
6509
- ownerId: z12.string().nullable().optional(),
6510
- sides: z12.number().int(),
6511
- value: z12.number().int().nullable().optional(),
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 = z12.object({
6527
+ const flowSchema = z11.object({
6521
6528
  currentPhase: phaseNameSchema,
6522
- turn: z12.number().int(),
6523
- round: z12.number().int(),
6524
- activePlayers: z12.array(playerIdSchema)
6529
+ turn: z11.number().int(),
6530
+ round: z11.number().int(),
6531
+ activePlayers: z11.array(playerIdSchema)
6525
6532
  });
6526
- const runtimeStateSchema = z12.object({
6527
- rng: z12.object({
6528
- seed: z12.number().int().nullable(),
6529
- cursor: z12.number().int(),
6530
- trace: z12.array(z12.string())
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: z12.object({
6533
- profileId: z12.string(),
6534
- optionValues: z12.record(z12.string(), z12.string().nullable())
6539
+ setup: z11.object({
6540
+ profileId: z11.string(),
6541
+ optionValues: z11.record(z11.string(), z11.string().nullable())
6535
6542
  }).nullable(),
6536
- simultaneous: z12.object({
6537
- current: z12.object({
6543
+ simultaneous: z11.object({
6544
+ current: z11.object({
6538
6545
  phaseName: phaseNameSchema,
6539
- actors: z12.array(playerIdSchema),
6540
- submissions: z12.record(
6541
- z12.string(),
6542
- z12.object({
6543
- interactionId: z12.string(),
6544
- params: runtimePayloadSchema2
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: z12.object({
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
- z12.array(playerIdSchema),
6585
+ z11.array(playerIdSchema),
6579
6586
  playerIds && playerIds.length > 0 ? playerIds : table.playerOrder,
6580
6587
  "table.playerOrder"
6581
6588
  )