@dreamboard-games/sdk 0.4.0-alpha.7 → 0.4.0-alpha.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (112) hide show
  1. package/REFERENCE.md +1292 -287
  2. package/dist/authoring/index.d.ts +4 -9
  3. package/dist/authoring/index.js +11 -547
  4. package/dist/authoring/index.js.map +1 -1
  5. package/dist/authoring-compiler.d.ts +27 -0
  6. package/dist/authoring-compiler.js +12 -0
  7. package/dist/authoring-compiler.js.map +1 -0
  8. package/dist/authoring-materialize-cli.d.ts +1 -0
  9. package/dist/authoring-materialize-cli.js +46 -0
  10. package/dist/authoring-materialize-cli.js.map +1 -0
  11. package/dist/browser-interaction.d.ts +1 -1
  12. package/dist/{chunk-TGMXBRKY.js → chunk-3PFDHTR7.js} +19 -7
  13. package/dist/chunk-3PFDHTR7.js.map +1 -0
  14. package/dist/chunk-45P5CEGH.js +176 -0
  15. package/dist/chunk-45P5CEGH.js.map +1 -0
  16. package/dist/chunk-5XTAQ4EQ.js +32 -0
  17. package/dist/chunk-5XTAQ4EQ.js.map +1 -0
  18. package/dist/chunk-7ADPYKFT.js +532 -0
  19. package/dist/chunk-7ADPYKFT.js.map +1 -0
  20. package/dist/{chunk-RKGJ64UN.js → chunk-BUOODBVO.js} +2 -2
  21. package/dist/{chunk-VLG4YST5.js → chunk-GMOBG7Y7.js} +4 -4
  22. package/dist/{chunk-Q322XCY2.js → chunk-JRGP6W4V.js} +3 -3
  23. package/dist/chunk-L3W2FPRQ.js +1793 -0
  24. package/dist/chunk-L3W2FPRQ.js.map +1 -0
  25. package/dist/{chunk-3QIZKXJ2.js → chunk-NGYFBNBP.js} +3 -3
  26. package/dist/chunk-P6IJ5YVY.js +154 -0
  27. package/dist/chunk-P6IJ5YVY.js.map +1 -0
  28. package/dist/{chunk-5IHU5CUK.js → chunk-QQNL4WTX.js} +25 -22
  29. package/dist/chunk-QQNL4WTX.js.map +1 -0
  30. package/dist/{chunk-52DH7VQF.js → chunk-SACZWUA6.js} +143 -47
  31. package/dist/chunk-SACZWUA6.js.map +1 -0
  32. package/dist/{chunk-KYEWGZ2Y.js → chunk-SFOAY5H4.js} +2 -2
  33. package/dist/{chunk-KYEWGZ2Y.js.map → chunk-SFOAY5H4.js.map} +1 -1
  34. package/dist/chunk-UNVCT5Z7.js +73 -0
  35. package/dist/chunk-UNVCT5Z7.js.map +1 -0
  36. package/dist/{chunk-NO537WSS.js → chunk-WDR7SKBM.js} +2 -2
  37. package/dist/chunk-XDGRC6OR.js +7039 -0
  38. package/dist/chunk-XDGRC6OR.js.map +1 -0
  39. package/dist/chunk-XLHLFTLI.js +399 -0
  40. package/dist/chunk-XLHLFTLI.js.map +1 -0
  41. package/dist/{chunk-B2YBS3SG.js → chunk-YNW3KBDE.js} +41 -13
  42. package/dist/chunk-YNW3KBDE.js.map +1 -0
  43. package/dist/codegen.js +1 -1
  44. package/dist/{components-BTwSIjXj.d.ts → components-BPzsSRs8.d.ts} +1 -1
  45. package/dist/definitions-0kjPV9wh.d.ts +294 -0
  46. package/dist/{diagnostics-1BWjRo6-.d.ts → diagnostics-DIi3ina7.d.ts} +2 -1
  47. package/dist/{index-CFTjJIXd.d.ts → index-CWzWpQzM.d.ts} +1 -1
  48. package/dist/{index.d-DMASeF6M.d.ts → index.d-C7Ztirg6.d.ts} +234 -5
  49. package/dist/index.js +2 -2
  50. package/dist/package-set.d.ts +2 -2
  51. package/dist/package-set.js +2 -2
  52. package/dist/{protocol-835hEGne.d.ts → protocol-B2LWcqB4.d.ts} +14 -0
  53. package/dist/reducer/advanced.d.ts +4 -4
  54. package/dist/reducer/advanced.js +7 -26
  55. package/dist/reducer/advanced.js.map +1 -1
  56. package/dist/reducer-contract.d.ts +1 -1
  57. package/dist/reducer-contract.js +2 -2
  58. package/dist/reducer.d.ts +37 -28
  59. package/dist/reducer.js +43 -6018
  60. package/dist/reducer.js.map +1 -1
  61. package/dist/reference-game-compiler.d.ts +45 -0
  62. package/dist/reference-game-compiler.js +25 -0
  63. package/dist/reference-game-compiler.js.map +1 -0
  64. package/dist/reference-game-source-manifest-cli.d.ts +1 -0
  65. package/dist/reference-game-source-manifest-cli.js +84 -0
  66. package/dist/reference-game-source-manifest-cli.js.map +1 -0
  67. package/dist/reference-games/index.d.ts +7 -217
  68. package/dist/reference-games/index.js +28 -208
  69. package/dist/reference-games/index.js.map +1 -1
  70. package/dist/runtime/primitives.d.ts +3 -3
  71. package/dist/runtime/primitives.js +3 -3
  72. package/dist/runtime/runtime-api.d.ts +1 -1
  73. package/dist/runtime/workspace-contract.d.ts +4 -4
  74. package/dist/runtime/workspace-contract.js +4 -4
  75. package/dist/{runtime-Dkfm1x2r.d.ts → runtime-B_w9AO2n.d.ts} +60 -5
  76. package/dist/{runtime-api-C6aWo9c0.d.ts → runtime-api-xCWLMQRT.d.ts} +2 -0
  77. package/dist/runtime.d.ts +7 -7
  78. package/dist/runtime.js +13 -13
  79. package/dist/schema-9jZzlEWZ.d.ts +220 -0
  80. package/dist/{stale-contract-artifact-error-C5AaZPJ8.d.ts → stale-contract-artifact-error-XLaweZtF.d.ts} +1 -1
  81. package/dist/testing-compiler.d.ts +36 -0
  82. package/dist/testing-compiler.js +236 -0
  83. package/dist/testing-compiler.js.map +1 -0
  84. package/dist/testing-runtime.d.ts +97 -21
  85. package/dist/testing-runtime.js +154 -95
  86. package/dist/testing-runtime.js.map +1 -1
  87. package/dist/testing.d.ts +178 -60
  88. package/dist/testing.js +641 -26
  89. package/dist/testing.js.map +1 -1
  90. package/dist/types-Bvptkukh.d.ts +122 -0
  91. package/dist/{types-aI4V9CWe.d.ts → types-_zfC_7CD.d.ts} +1 -1
  92. package/dist/types.d.ts +4 -0
  93. package/dist/ui/components.d.ts +2 -2
  94. package/dist/ui/plugin-styles.css +1 -1
  95. package/dist/{ui-contract-Ue6SywvO.d.ts → ui-contract-CUC7Lyoc.d.ts} +1 -1
  96. package/dist/ui.d.ts +3 -3
  97. package/dist/{views-32rSsfeU.d.ts → views-DE2eZxPz.d.ts} +42 -13
  98. package/package.json +22 -3
  99. package/dist/chunk-3OZMHZK3.js +0 -40
  100. package/dist/chunk-3OZMHZK3.js.map +0 -1
  101. package/dist/chunk-52DH7VQF.js.map +0 -1
  102. package/dist/chunk-5IHU5CUK.js.map +0 -1
  103. package/dist/chunk-B2YBS3SG.js.map +0 -1
  104. package/dist/chunk-IU6KGPY7.js +0 -659
  105. package/dist/chunk-IU6KGPY7.js.map +0 -1
  106. package/dist/chunk-TGMXBRKY.js.map +0 -1
  107. package/dist/types-DcADVHe9.d.ts +0 -192
  108. /package/dist/{chunk-RKGJ64UN.js.map → chunk-BUOODBVO.js.map} +0 -0
  109. /package/dist/{chunk-VLG4YST5.js.map → chunk-GMOBG7Y7.js.map} +0 -0
  110. /package/dist/{chunk-Q322XCY2.js.map → chunk-JRGP6W4V.js.map} +0 -0
  111. /package/dist/{chunk-3QIZKXJ2.js.map → chunk-NGYFBNBP.js.map} +0 -0
  112. /package/dist/{chunk-NO537WSS.js.map → chunk-WDR7SKBM.js.map} +0 -0
@@ -1,7 +1,7 @@
1
- import { bQ as RuntimeTableRecord, bD as RuntimeRngState, c6 as SetupBootstrapStep, V as GeneratedManifestContractLike, bZ as SetupBootstrapContainerRef, c1 as SetupBootstrapPerPlayerContainerTemplateRef, aD as PlayerIdOfManifest, b_ as SetupBootstrapDestinationRef, n as CardIdOfManifest, aB as PieceIdOfManifest, I as DieIdOfManifest } from '../runtime-Dkfm1x2r.js';
2
- export { A as AnyContinuationToken, a as AnySchema, B as BoardBaseIdOfManifest, b as BoardContainerIdOfManifest, c as BoardContainerIdOfTable, d as BoardIdOfManifest, e as BoardIdOfTable, f as BoardLayoutOfManifest, g as BoardMapOfTable, i as BoardStateOfTable, j as BoardTypeIdOfManifest, k as BoardTypeIdOfTable, l as Brand, C as CardIdOfDeck, m as CardIdOfHand, o as CardIdOfState, p as CardIdOfTable, q as CardTypeOfState, r as CardTypeOfTable, s as ChoiceOption, t as CompatibleCardIdForHandAndDeck, u as CompatibleCardIdForTwoPlayerZones, v as CompatibleHandIdForDeck, w as ComponentDataOfTable, x as ComponentIdOfTable, y as ComponentLocationByTypeOfTable, z as ComponentLocationOfTable, D as ContinuationResponseOf, E as ContinuationToken, F as DeckCardsOfTable, G as DeckIdOfState, H as DeckIdOfTable, J as EdgeTypeIdOfManifest, K as EffectInvokeOptions, L as EffectSpecLike, M as EffectTypeTag, N as ErrorCodeOfContract, O as ExactManifestContractOf, P as FlowState, Q as FrameworkErrorCode, R as FrameworkErrorCodes, S as GameEvent, T as GameEventDetail, U as GameOutcome, W as HandCardsOfTable, X as HandIdOfState, Y as HandIdOfTable, Z as HexBoardIdOfTable, _ as HexBoardStateOfTable, $ as HexEdgeIdOfTable, a0 as HexEdgeStateOfTable, a1 as HexEdgeTypeIdOfTable, a2 as HexSpaceIdOfTable, a3 as HexSpaceTypeIdOfTable, a4 as HexVertexIdOfTable, a5 as HexVertexStateOfTable, a6 as HexVertexTypeIdOfTable, a7 as HiddenSchemaOfContract, a8 as HiddenStateOfState, a9 as InitContext, aa as InitSetupSelectionInput, ab as ManifestContract, ac as ManifestContractOf, ad as ManifestDefaults, ae as ManifestIdSchema, af as ManifestIds, ag as ManifestLiterals, ah as ManifestOf, ai as NonEmptyReadonlyArray, aj as OutcomeResult, ak as OutcomeScoreComponent, al as OutcomeStanding, am as OutcomeTieBreak, aq as PhaseAccessor, ar as PhaseMapOfState, as as PhaseNameOf, at as PhaseNameOfContract, au as PhaseNameOfManifest, av as PhaseNameOfState, aw as PhasePayload, ax as PhaseSchemasOfContract, ay as PhaseStateMapOfContract, az as PhaseStateOfState, aA as PhaseStepOfState, aE as PlayerIdOfState, aF as PlayerIdOfTable, aG as PlayerZoneIdOfManifest, aH as PlayerZoneIdOfState, aI as PlayerZoneIdOfTable, aJ as PrivateSchemaOfContract, aK as PrivateStateOfState, aL as PublicSchemaOfContract, aM as PublicStateOfState, aN as ReducerAccept, aO as ReducerAcceptOptions, aP as ReducerFx, aQ as ReducerGameState, aR as ReducerManifestContract, aS as ReducerReject, aT as ReducerResult, aU as ReducerRuntimeStateForState, aV as ReducerSessionState, aW as ReducerValidationResult, aX as RelationTypeIdOfManifest, aY as RelationTypeIdOfTable, aZ as ResolvedContainerLocation, a_ as ResolvedDeckLocation, a$ as ResolvedEdgeLocation, b0 as ResolvedHandLocation, b1 as ResolvedSlotLocation, b2 as ResolvedSpaceLocation, b3 as ResolvedVertexLocation, b4 as ResolvedZoneLocation, b5 as ResourceAmountsOfTable, b6 as ResourceBalancesOfState, b7 as ResourceBalancesOfTable, b8 as ResourceIdOfManifest, b9 as ResourceIdOfState, ba as ResourceIdOfTable, bb as RuntimeBoardBaseState, bc as RuntimeBoardCollections, bd as RuntimeBoardCompatibilityState, be as RuntimeBoardContainerState, bf as RuntimeBoardRelationState, bg as RuntimeBoardSpaceState, bh as RuntimeBoardState, bi as RuntimeCardData, bj as RuntimeCardVisibility, bk as RuntimeComponentLocation, bl as RuntimeComponentLocationMap, bm as RuntimeDeckMap, bn as RuntimeDieData, bo as RuntimeGenericBoardState, bp as RuntimeHandMap, bq as RuntimeHandVisibilityMode, br as RuntimeHexBoardState, bs as RuntimeHexEdgeState, bt as RuntimeHexOrientation, bu as RuntimeHexSpaceState, bv as RuntimeHexVertexState, bw as RuntimeOwnerMap, bx as RuntimeParams, by as RuntimePayload, bz as RuntimePhaseState, bA as RuntimePieceData, bB as RuntimeRecord, bC as RuntimeResourceMap, bE as RuntimeScalar, bF as RuntimeSetupSelection, bG as RuntimeSetupSelectionInput, bH as RuntimeSetupSelectionOverride, bI as RuntimeSimultaneousState, bJ as RuntimeSimultaneousSubmission, bK as RuntimeSlotHostRef, bL as RuntimeSquareBoardState, bM as RuntimeSquareEdgeState, bN as RuntimeSquareSpaceState, bO as RuntimeSquareVertexState, bP as RuntimeState, bR as RuntimeTiledBoardBaseState, bS as RuntimeTiledBoardState, bT as RuntimeTiledEdgeState, bU as RuntimeTiledSpaceState, bV as RuntimeTiledVertexState, bW as RuntimeVisibilityMap, bX as RuntimeZoneMap, bY as SchemaLike, b$ as SetupBootstrapPerPlayerBoardContainerRef, c0 as SetupBootstrapPerPlayerBoardSpaceRef, c2 as SetupBootstrapPerPlayerZoneRef, c3 as SetupBootstrapSharedBoardContainerRef, c4 as SetupBootstrapSharedBoardSpaceRef, c5 as SetupBootstrapSharedZoneRef, c7 as SetupOptionChoiceMetadata, c8 as SetupOptionIdOfManifest, c9 as SetupOptionMetadata, ca as SetupProfileDefinition, cb as SetupProfileIdOfManifest, cc as SetupProfileMetadata, cd as SetupSelectionInputOfManifest, ce as SetupSelectionOfManifest, cg as SharedZoneIdOfManifest, ch as SharedZoneIdOfState, ci as SharedZoneIdOfTable, cj as SpaceIdOfManifest, ck as SpaceIdOfTable, cl as SpaceTypeIdOfManifest, cm as SpaceTypeIdOfTable, cn as SquareBoardIdOfTable, co as SquareBoardStateOfTable, cp as SquareEdgeIdOfTable, cq as SquareEdgeStateOfTable, cr as SquareEdgeTypeIdOfTable, cs as SquareSpaceIdOfTable, ct as SquareSpaceTypeIdOfTable, cu as SquareVertexIdOfTable, cv as SquareVertexStateOfTable, cw as SquareVertexTypeIdOfTable, cx as StateDefinition, cy as StateDefinitionOfContract, cz as StaticBoards, cA as StaticBoardsJsonEnvelope, cB as StringKeyOf, cC as SystemActionEvent, cD as TableOfManifest, cE as TableOfState, cF as TableQueries, cG as TableQueriesOfState, cH as TiledBoardIdOfTable, cI as TiledBoardStateOfTable, cJ as TiledEdgeIdOfTable, cK as TiledEdgeMap, cL as TiledEdgeStateOfTable, cM as TiledEdgeTypeIdOfTable, cN as TiledSpaceIdOfTable, cO as TiledSpaceMap, cP as TiledVertexIdOfTable, cQ as TiledVertexMap, cR as TiledVertexStateOfTable, cS as TiledVertexTypeIdOfTable, cT as VertexTypeIdOfManifest, cV as assumeManifestSchema, cZ as cloneManifestDefault, c_ as createManifestGameStateSchema, c$ as createManifestRuntimeSchema, d0 as createManifestStringLiteralSchema, d1 as isManifestScopedSchema, d6 as markManifestScopedSchema, dk as resolveManifestPlayerIds } from '../runtime-Dkfm1x2r.js';
3
- import { aF as ReducerGameContractLike, at as PhaseMapOf, ba as ViewMapOf, aG as ReducerGameDefinition } from '../views-32rSsfeU.js';
4
- export { A as ActionContext, a as ActorSelection, b as ActorSelector, c as ActorSelectorArgs, d as AnyCardActionSpec, e as AnyContinuationCallable, f as AnyInteractionSpec, g as AnyPhaseDefinitionForContract, h as AnyReducerGameDefinition, i as AutoPhaseDefinition, B as BaseGameSessionOfContract, j as BaseGameStateOfContract, k as BoardInputCollectorKind, l as BoardInputCollectorMeta, m as BoardInteractionKeyOfDefinition, n as BoardTargetDomainDescriptor, o as BoundedNumberDomainDescriptor, C as CardActionMap, p as CardActionSpec, q as CardInputCollectorMeta, r as CardInputZoneIdsOfDefinition, s as CardInteractionKeyOfDefinition, t as CardTargetDomainDescriptor, u as ChoiceDomainDescriptor, v as ChoiceListDomainDescriptor, w as ClientParamsOf, x as ClientParamsOfInteractionOfDefinition, y as CollectorState, z as ContinuationCallable, D as ContinuationInput, E as ContinuationInputForSource, F as ContinuationKind, G as ContinuationReduceArgs, H as ContinuationSourceKind, I as DefaultedClientParamKeysOfInteractionOfDefinition, L as EagerInputDomainDependencies, M as EffectContinuationCallable, N as EffectContinuationInput, O as EffectContinuationResponse, P as EffectDefinition, Q as EffectIdsOfDefinition, R as EffectMap, S as EffectRegistryOfPhase, T as EffectRollDieDefinition, U as EffectShuffleDefinition, V as EffectShufflePlayerZoneDefinition, W as GameStateOf, X as InitialStateCallbacks, Y as InputCollector, Z as InputCollectorKind, _ as InputCollectorMetaForKind, $ as InputDomainDependencyCase, a0 as InputDomainDescriptor, a1 as InputDomainResolverDescriptor, a2 as InputKeysWithCollectorKindOfDefinition, a3 as InputSelectionDescriptor, a4 as InteractionAvailabilityArgs, a5 as InteractionCommitPolicy, a6 as InteractionIdOfDefinition, a7 as InteractionIdOfDefinitionPhase, a8 as InteractionKind, a9 as InteractionMap, aa as InteractionReduceArgs, ab as InteractionReduceInput, ac as InteractionRule, ad as InteractionRuleValidationResult, ae as InteractionSpec, af as InteractionSpecByNameOfDefinitionPhase, ag as InteractionToArgs, ah as InteractionValidateArgs, ai as LazyBoardTargetDomainDescriptor, aj as LazyCardTargetDomainDescriptor, ak as LazyInputDomainDependencies, al as MutationRuntimeHelpers, an as ParamsOf, ao as ParamsOfInteractionOfDefinition, ap as PhaseDefinition, aq as PhaseDefinitionByName, ar as PhaseEnterArgs, as as PhaseEnterContext, au as PhaseNamesOfDefinition, av as PhaseStateMapOfDefinitions, aw as PhaseStateOfDefinitions, ax as PhaseZoneList, ay as PlayableInteractionsOfZoneOfDefinition, az as PlayerPhaseDefinition, aA as PromptInputCollectorMeta, aB as PromptInteractionKeyOfDefinition, aC as RandomHelpers, aE as ReducerGameContract, aI as ReducerSessionForConfig, aK as ReducerStateForConfig, aM as ResolvedBoardTargetDomainDescriptor, aN as ResolvedCardTargetDomainDescriptor, aO as ResolvedGameSessionOf, aP as ResolvedGameStateOf, aQ as ResourceMapDomainDescriptor, aR as ResumableEffectKind, aS as RngInputCollectorMeta, aT as RollDieContinuationResponse, aV as RuntimeHelpers, aW as ScopedPhaseState, aX as ShufflePlayerZoneContinuationResponse, aY as ShuffleSharedZoneContinuationResponse, aZ as SimultaneousPlayerPhaseDefinition, a_ as SimultaneousResolveArgs, a$ as SimultaneousSubmission, b0 as SimultaneousSubmitSpec, b1 as StageMap, b2 as StageNamesOfDefinitionPhase, b3 as StageSpec, b4 as StaticViewDefinition, b5 as StaticViewQueries, b6 as TargetKind, b7 as ValidationIssue, b8 as ViewDefinition, b9 as ViewDefinitionByName, bb as ViewNamesOfDefinition, bc as ViewOfDefinition, bd as ViewsOfDefinition, be as ZoneIdsOfDefinition } from '../views-32rSsfeU.js';
1
+ import { bV as RuntimeTableRecord, bI as RuntimeRngState, cb as SetupBootstrapStep, V as GeneratedManifestContractLike, c2 as SetupBootstrapContainerRef, c6 as SetupBootstrapPerPlayerContainerTemplateRef, aF as PlayerIdOfManifest, c3 as SetupBootstrapDestinationRef, n as CardIdOfManifest, aD as PieceIdOfManifest, I as DieIdOfManifest } from '../runtime-B_w9AO2n.js';
2
+ export { A as AnyContinuationToken, a as AnySchema, B as BoardBaseIdOfManifest, b as BoardContainerIdOfManifest, c as BoardContainerIdOfTable, d as BoardIdOfManifest, e as BoardIdOfTable, f as BoardLayoutOfManifest, g as BoardMapOfTable, i as BoardStateOfTable, j as BoardTypeIdOfManifest, k as BoardTypeIdOfTable, l as Brand, C as CardIdOfDeck, m as CardIdOfHand, o as CardIdOfState, p as CardIdOfTable, q as CardTypeOfState, r as CardTypeOfTable, s as ChoiceOption, t as CompatibleCardIdForHandAndDeck, u as CompatibleCardIdForTwoPlayerZones, v as CompatibleHandIdForDeck, w as ComponentDataOfTable, x as ComponentIdOfTable, y as ComponentLocationByTypeOfTable, z as ComponentLocationOfTable, D as ContinuationResponseOf, E as ContinuationToken, F as DeckCardsOfTable, G as DeckIdOfState, H as DeckIdOfTable, J as EdgeTypeIdOfManifest, K as EffectInvokeOptions, L as EffectSpecLike, M as EffectTypeTag, N as ErrorCodeOfContract, O as ExactManifestContractOf, P as FlowState, Q as FrameworkErrorCode, R as FrameworkErrorCodes, S as GameEvent, T as GameEventDetail, U as GameOutcome, W as HandCardsOfTable, X as HandIdOfState, Y as HandIdOfTable, Z as HexBoardIdOfTable, _ as HexBoardStateOfTable, $ as HexEdgeIdOfTable, a0 as HexEdgeStateOfTable, a1 as HexEdgeTypeIdOfTable, a2 as HexSpaceIdOfTable, a3 as HexSpaceTypeIdOfTable, a4 as HexVertexIdOfTable, a5 as HexVertexStateOfTable, a6 as HexVertexTypeIdOfTable, a7 as HiddenSchemaOfContract, a8 as HiddenStateOfState, a9 as InitContext, aa as InitSetupSelectionInput, ab as ManifestContract, ac as ManifestContractOf, ad as ManifestDefaults, ae as ManifestIdFamily, af as ManifestIdSchema, ag as ManifestIds, ah as ManifestLiterals, ai as ManifestNormalSetup, aj as ManifestOf, ak as NonEmptyReadonlyArray, al as OutcomeResult, am as OutcomeScoreComponent, an as OutcomeStanding, ao as OutcomeTieBreak, as as PhaseAccessor, at as PhaseMapOfState, au as PhaseNameOf, av as PhaseNameOfContract, aw as PhaseNameOfManifest, ax as PhaseNameOfState, ay as PhasePayload, az as PhaseSchemasOfContract, aA as PhaseStateMapOfContract, aB as PhaseStateOfState, aC as PhaseStepOfState, aG as PlayerIdOfState, aH as PlayerIdOfTable, aI as PlayerZoneIdOfManifest, aJ as PlayerZoneIdOfState, aK as PlayerZoneIdOfTable, aL as PrivateSchemaOfContract, aM as PrivateStateOfState, aN as PublicSchemaOfContract, aO as PublicStateOfState, aP as ReducerAccept, aQ as ReducerAcceptOptions, aR as ReducerFx, aS as ReducerGameState, aT as ReducerManifestContract, aU as ReducerReject, aV as ReducerResult, aW as ReducerRuntimeStateForState, aX as ReducerSessionState, aY as ReducerValidationResult, aZ as RelationTypeIdOfManifest, a_ as RelationTypeIdOfTable, a$ as ResolvedContainerLocation, b0 as ResolvedDeckLocation, b1 as ResolvedEdgeLocation, b2 as ResolvedHandLocation, b3 as ResolvedSlotLocation, b4 as ResolvedSpaceLocation, b5 as ResolvedVertexLocation, b6 as ResolvedZoneLocation, b7 as ResourceAmountsOfTable, b8 as ResourceBalancesOfState, b9 as ResourceBalancesOfTable, ba as ResourceIdOfManifest, bb as ResourceIdOfState, bc as ResourceIdOfTable, bd as RuntimeBoardBaseState, be as RuntimeBoardCollections, bf as RuntimeBoardCompatibilityState, bg as RuntimeBoardContainerState, bh as RuntimeBoardRelationState, bi as RuntimeBoardSpaceState, bj as RuntimeBoardState, bk as RuntimeCardData, bl as RuntimeCardVisibility, bm as RuntimeComponentLocation, bn as RuntimeComponentLocationMap, bo as RuntimeDeckMap, bp as RuntimeDieData, bq as RuntimeGenericBoardState, br as RuntimeHandMap, bs as RuntimeHandVisibilityMode, bt as RuntimeHexBoardState, bu as RuntimeHexEdgeState, bv as RuntimeHexOrientation, bw as RuntimeHexSpaceState, bx as RuntimeHexVertexState, by as RuntimeOwnerMap, bz as RuntimeParams, bA as RuntimePayload, bB as RuntimePhaseState, bC as RuntimePieceData, bD as RuntimeRecord, bE as RuntimeResourceMap, bF as RuntimeRngDraw, bG as RuntimeRngOperation, bH as RuntimeRngOperationParameter, bJ as RuntimeScalar, bK as RuntimeSetupSelection, bL as RuntimeSetupSelectionInput, bM as RuntimeSetupSelectionOverride, bN as RuntimeSimultaneousState, bO as RuntimeSimultaneousSubmission, bP as RuntimeSlotHostRef, bQ as RuntimeSquareBoardState, bR as RuntimeSquareEdgeState, bS as RuntimeSquareSpaceState, bT as RuntimeSquareVertexState, bU as RuntimeState, bW as RuntimeTiledBoardBaseState, bX as RuntimeTiledBoardState, bY as RuntimeTiledEdgeState, bZ as RuntimeTiledSpaceState, b_ as RuntimeTiledVertexState, b$ as RuntimeVisibilityMap, c0 as RuntimeZoneMap, c1 as SchemaLike, c4 as SetupBootstrapPerPlayerBoardContainerRef, c5 as SetupBootstrapPerPlayerBoardSpaceRef, c7 as SetupBootstrapPerPlayerZoneRef, c8 as SetupBootstrapSharedBoardContainerRef, c9 as SetupBootstrapSharedBoardSpaceRef, ca as SetupBootstrapSharedZoneRef, cc as SetupOptionChoiceMetadata, cd as SetupOptionIdOfManifest, ce as SetupOptionMetadata, cf as SetupProfileDefinition, cg as SetupProfileIdOfManifest, ch as SetupProfileMetadata, ci as SetupSelectionInputOfManifest, cj as SetupSelectionOfManifest, cl as SharedZoneIdOfManifest, cm as SharedZoneIdOfState, cn as SharedZoneIdOfTable, co as SpaceIdOfManifest, cp as SpaceIdOfTable, cq as SpaceTypeIdOfManifest, cr as SpaceTypeIdOfTable, cs as SquareBoardIdOfTable, ct as SquareBoardStateOfTable, cu as SquareEdgeIdOfTable, cv as SquareEdgeStateOfTable, cw as SquareEdgeTypeIdOfTable, cx as SquareSpaceIdOfTable, cy as SquareSpaceTypeIdOfTable, cz as SquareVertexIdOfTable, cA as SquareVertexStateOfTable, cB as SquareVertexTypeIdOfTable, cC as StateDefinition, cD as StateDefinitionOfContract, cE as StaticBoards, cF as StaticBoardsJsonEnvelope, cG as StringKeyOf, cH as SystemActionEvent, cI as TableOfManifest, cJ as TableOfState, cK as TableQueries, cL as TableQueriesOfState, cM as TiledBoardIdOfTable, cN as TiledBoardStateOfTable, cO as TiledEdgeIdOfTable, cP as TiledEdgeMap, cQ as TiledEdgeStateOfTable, cR as TiledEdgeTypeIdOfTable, cS as TiledSpaceIdOfTable, cT as TiledSpaceMap, cU as TiledVertexIdOfTable, cV as TiledVertexMap, cW as TiledVertexStateOfTable, cX as TiledVertexTypeIdOfTable, cY as VertexTypeIdOfManifest, c_ as assumeManifestSchema, d2 as cloneManifestDefault, d3 as createManifestGameStateSchema, d4 as createManifestRuntimeSchema, d5 as createManifestStringLiteralSchema, d6 as isManifestScopedSchema, db as manifestSchemaFamily, dc as markManifestScopedSchema, dr as resolveManifestPlayerIds } from '../runtime-B_w9AO2n.js';
3
+ import { aH as ReducerGameContractLike, au as PhaseMapOf, bc as ViewMapOf, aI as ReducerGameDefinition } from '../views-DE2eZxPz.js';
4
+ export { A as ActionContext, a as ActorSelection, b as ActorSelector, c as ActorSelectorArgs, d as AnyCardActionSpec, e as AnyContinuationCallable, f as AnyInteractionSpec, g as AnyPhaseDefinitionForContract, h as AnyReducerGameDefinition, i as AutoPhaseDefinition, B as BaseGameSessionOfContract, j as BaseGameStateOfContract, k as BoardInputCollectorKind, l as BoardInputCollectorMeta, m as BoardInteractionKeyOfDefinition, n as BoardTargetDomainDescriptor, o as BoundedNumberDomainDescriptor, C as CardActionMap, p as CardActionSpec, q as CardInputCollectorMeta, r as CardInputZoneIdsOfDefinition, s as CardInteractionKeyOfDefinition, t as CardTargetDomainDescriptor, u as ChoiceDomainDescriptor, v as ChoiceListDomainDescriptor, w as ClientParamsOf, x as ClientParamsOfInteractionOfDefinition, y as CollectorState, z as ContinuationCallable, D as ContinuationInput, E as ContinuationInputForSource, F as ContinuationKind, G as ContinuationReduceArgs, H as ContinuationSourceKind, I as DefaultedClientParamKeysOfInteractionOfDefinition, L as EagerInputDomainDependencies, M as EffectContinuationCallable, N as EffectContinuationInput, O as EffectContinuationResponse, P as EffectDefinition, Q as EffectIdsOfDefinition, R as EffectMap, S as EffectRegistryOfPhase, T as EffectRollDieDefinition, U as EffectShuffleDefinition, V as EffectShufflePlayerZoneDefinition, W as EmptyViewDefinition, X as GameStateOf, Y as InitialStateCallbacks, Z as InputCollector, _ as InputCollectorKind, $ as InputCollectorMetaForKind, a0 as InputDomainDependencyCase, a1 as InputDomainDescriptor, a2 as InputDomainResolverDescriptor, a3 as InputKeysWithCollectorKindOfDefinition, a4 as InputSelectionDescriptor, a5 as InteractionAvailabilityArgs, a6 as InteractionCommitPolicy, a7 as InteractionIdOfDefinition, a8 as InteractionIdOfDefinitionPhase, a9 as InteractionKind, aa as InteractionMap, ab as InteractionReduceArgs, ac as InteractionReduceInput, ad as InteractionRule, ae as InteractionRuleValidationResult, af as InteractionSpec, ag as InteractionSpecByNameOfDefinitionPhase, ah as InteractionToArgs, ai as InteractionValidateArgs, aj as LazyBoardTargetDomainDescriptor, ak as LazyCardTargetDomainDescriptor, al as LazyInputDomainDependencies, am as MutationRuntimeHelpers, ao as ParamsOf, ap as ParamsOfInteractionOfDefinition, aq as PhaseDefinition, ar as PhaseDefinitionByName, as as PhaseEnterArgs, at as PhaseEnterContext, av as PhaseNamesOfDefinition, aw as PhaseStateMapOfDefinitions, ax as PhaseStateOfDefinitions, ay as PhaseZoneList, az as PlayableInteractionsOfZoneOfDefinition, aA as PlayerPhaseDefinition, aB as PlayerViewDefinition, aC as PromptInputCollectorMeta, aD as PromptInteractionKeyOfDefinition, aE as RandomHelpers, aG as ReducerGameContract, aK as ReducerSessionForConfig, aM as ReducerStateForConfig, aO as ResolvedBoardTargetDomainDescriptor, aP as ResolvedCardTargetDomainDescriptor, aQ as ResolvedGameSessionOf, aR as ResolvedGameStateOf, aS as ResourceMapDomainDescriptor, aT as ResumableEffectKind, aU as RngInputCollectorMeta, aV as RollDieContinuationResponse, aX as RuntimeHelpers, aY as ScopedPhaseState, aZ as SharedViewDefinition, a_ as ShufflePlayerZoneContinuationResponse, a$ as ShuffleSharedZoneContinuationResponse, b0 as SimultaneousPlayerPhaseDefinition, b1 as SimultaneousResolveArgs, b2 as SimultaneousSubmission, b3 as SimultaneousSubmitSpec, b4 as StageMap, b5 as StageNamesOfDefinitionPhase, b6 as StageSpec, b7 as StaticViewDefinition, b8 as StaticViewQueries, b9 as TargetKind, ba as ValidationIssue, bb as ViewDefinitionByName, bd as ViewNamesOfDefinition, be as ViewOfDefinition, bf as ViewsOfDefinition, bg as ZoneIdsOfDefinition } from '../views-DE2eZxPz.js';
5
5
  import 'zod';
6
6
  import '../types.js';
7
7
 
@@ -1,42 +1,22 @@
1
+ import {
2
+ createClientParamSchemasByPhase
3
+ } from "../chunk-5XTAQ4EQ.js";
1
4
  import {
2
5
  FrameworkErrorCodes,
3
6
  applySetupBootstrap,
4
7
  assumeManifestSchema,
5
8
  cloneManifestDefault,
6
- collectReducerDefinitionIndex,
7
9
  createManifestGameStateSchema,
8
10
  createManifestRuntimeSchema,
9
11
  createManifestStringLiteralSchema,
10
12
  isManifestScopedSchema,
13
+ manifestSchemaFamily,
11
14
  markManifestScopedSchema,
12
15
  resolveManifestPlayerIds
13
- } from "../chunk-B2YBS3SG.js";
16
+ } from "../chunk-YNW3KBDE.js";
17
+ import "../chunk-3PFDHTR7.js";
14
18
  import "../chunk-PZ5AY32C.js";
15
19
 
16
- // src/reducer/client-param-schemas.ts
17
- import { z } from "zod";
18
- function schemaForCollectors(collectors) {
19
- const shape = {};
20
- for (const [key, collector] of Object.entries(collectors)) {
21
- if (collector.kind === "rng") continue;
22
- const schema = collector.schema;
23
- shape[key] = "defaultValue" in collector ? schema.default(collector.defaultValue) : schema;
24
- }
25
- return z.object(shape);
26
- }
27
- function createClientParamSchemasByPhase(definition) {
28
- const index = collectReducerDefinitionIndex(definition);
29
- const out = {};
30
- for (const phaseIndex of index.phasesByName.values()) {
31
- const phaseSchemas = {};
32
- for (const [id, interaction] of phaseIndex.interactions) {
33
- phaseSchemas[id] = interaction.paramsSchema ?? schemaForCollectors(interaction.inputs);
34
- }
35
- out[String(phaseIndex.phaseName)] = phaseSchemas;
36
- }
37
- return out;
38
- }
39
-
40
20
  // src/reducer/setup-bootstrap-helpers.ts
41
21
  function shuffle(container) {
42
22
  return {
@@ -130,6 +110,7 @@ export {
130
110
  dealToPlayerBoardContainer,
131
111
  dealToPlayerZone,
132
112
  isManifestScopedSchema,
113
+ manifestSchemaFamily,
133
114
  markManifestScopedSchema,
134
115
  resolveManifestPlayerIds,
135
116
  seedSharedBoardContainer,
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/reducer/client-param-schemas.ts","../../src/reducer/setup-bootstrap-helpers.ts"],"sourcesContent":["import { z } from \"zod\";\nimport { collectReducerDefinitionIndex } from \"./definition-index\";\nimport type {\n InputCollector,\n PhaseMapOf,\n ReducerGameContractLike,\n ReducerGameDefinition,\n ViewMapOf,\n} from \"./model\";\n\nexport type ClientParamSchema = {\n safeParse: (value: unknown) =>\n | { success: true; data: Record<string, unknown> }\n | {\n success: false;\n error: { issues: Array<{ path: PropertyKey[]; message: string }> };\n };\n};\n\nexport type ClientParamSchemasByPhase = Readonly<\n Record<string, Readonly<Record<string, ClientParamSchema>>>\n>;\n\nfunction schemaForCollectors(\n collectors: Record<string, InputCollector>,\n): ClientParamSchema {\n const shape: Record<string, z.ZodTypeAny> = {};\n for (const [key, collector] of Object.entries(collectors)) {\n if (collector.kind === \"rng\") continue;\n const schema = collector.schema as z.ZodTypeAny;\n shape[key] =\n \"defaultValue\" in collector\n ? schema.default(collector.defaultValue)\n : schema;\n }\n return z.object(shape) as unknown as ClientParamSchema;\n}\n\nexport function createClientParamSchemasByPhase<\n Contract extends ReducerGameContractLike,\n Definitions extends PhaseMapOf<Contract>,\n Views extends ViewMapOf<Contract>,\n>(\n definition: ReducerGameDefinition<Contract, Definitions, Views>,\n): ClientParamSchemasByPhase {\n const index = collectReducerDefinitionIndex(definition);\n const out: Record<string, Record<string, ClientParamSchema>> = {};\n for (const phaseIndex of index.phasesByName.values()) {\n const phaseSchemas: Record<string, ClientParamSchema> = {};\n for (const [id, interaction] of phaseIndex.interactions) {\n phaseSchemas[id] =\n interaction.paramsSchema ?? schemaForCollectors(interaction.inputs);\n }\n out[String(phaseIndex.phaseName)] = phaseSchemas;\n }\n return out;\n}\n","import type {\n CardIdOfManifest,\n DieIdOfManifest,\n GeneratedManifestContractLike,\n PieceIdOfManifest,\n PlayerIdOfManifest,\n SetupBootstrapContainerRef,\n SetupBootstrapPerPlayerContainerTemplateRef,\n SetupBootstrapStep,\n SetupBootstrapDestinationRef,\n} from \"./model\";\n\nexport function shuffle<\n Manifest extends GeneratedManifestContractLike =\n GeneratedManifestContractLike,\n>(\n container: SetupBootstrapContainerRef<Manifest>,\n): SetupBootstrapStep<Manifest> {\n return {\n type: \"shuffle\",\n container,\n };\n}\n\nexport function dealToPlayerZone<\n Manifest extends GeneratedManifestContractLike =\n GeneratedManifestContractLike,\n>({\n from,\n zoneId,\n count,\n playerIds,\n}: {\n from: Extract<\n SetupBootstrapContainerRef<Manifest>,\n { type: \"sharedZone\" | \"sharedBoardContainer\" }\n >;\n zoneId: Extract<\n SetupBootstrapPerPlayerContainerTemplateRef<Manifest>,\n { type: \"playerZone\" }\n >[\"zoneId\"];\n count: number;\n playerIds?: readonly PlayerIdOfManifest<Manifest>[];\n}): SetupBootstrapStep<Manifest> {\n return {\n type: \"deal\",\n from,\n to: {\n type: \"playerZone\",\n zoneId,\n } as SetupBootstrapPerPlayerContainerTemplateRef<Manifest>,\n count,\n playerIds,\n };\n}\n\nexport function dealToPlayerBoardContainer<\n Manifest extends GeneratedManifestContractLike =\n GeneratedManifestContractLike,\n>({\n from,\n boardId,\n containerId,\n count,\n playerIds,\n}: {\n from: Extract<\n SetupBootstrapContainerRef<Manifest>,\n { type: \"sharedZone\" | \"sharedBoardContainer\" }\n >;\n boardId: Extract<\n SetupBootstrapPerPlayerContainerTemplateRef<Manifest>,\n { type: \"playerBoardContainer\" }\n >[\"boardId\"];\n containerId: Extract<\n SetupBootstrapPerPlayerContainerTemplateRef<Manifest>,\n { type: \"playerBoardContainer\" }\n >[\"containerId\"];\n count: number;\n playerIds?: readonly PlayerIdOfManifest<Manifest>[];\n}): SetupBootstrapStep<Manifest> {\n return {\n type: \"deal\",\n from,\n to: {\n type: \"playerBoardContainer\",\n boardId,\n containerId,\n } as SetupBootstrapPerPlayerContainerTemplateRef<Manifest>,\n count,\n playerIds,\n };\n}\n\nexport function seedSharedBoardContainer<\n Manifest extends GeneratedManifestContractLike =\n GeneratedManifestContractLike,\n>({\n from,\n boardId,\n containerId,\n count,\n componentIds,\n}: {\n from: SetupBootstrapContainerRef<Manifest>;\n boardId: Extract<\n SetupBootstrapDestinationRef<Manifest>,\n { type: \"sharedBoardContainer\" }\n >[\"boardId\"];\n containerId: Extract<\n SetupBootstrapDestinationRef<Manifest>,\n { type: \"sharedBoardContainer\" }\n >[\"containerId\"];\n count?: number;\n componentIds?: readonly (\n | CardIdOfManifest<Manifest>\n | PieceIdOfManifest<Manifest>\n | DieIdOfManifest<Manifest>\n )[];\n}): SetupBootstrapStep<Manifest> {\n return {\n type: \"move\",\n from,\n to: {\n type: \"sharedBoardContainer\",\n boardId,\n containerId,\n } as SetupBootstrapDestinationRef<Manifest>,\n count,\n componentIds,\n };\n}\n\nexport function seedSharedBoardSpace<\n Manifest extends GeneratedManifestContractLike =\n GeneratedManifestContractLike,\n>({\n from,\n boardId,\n spaceId,\n count,\n componentIds,\n}: {\n from: SetupBootstrapContainerRef<Manifest>;\n boardId: Extract<\n SetupBootstrapDestinationRef<Manifest>,\n { type: \"sharedBoardSpace\" }\n >[\"boardId\"];\n spaceId: Extract<\n SetupBootstrapDestinationRef<Manifest>,\n { type: \"sharedBoardSpace\" }\n >[\"spaceId\"];\n count?: number;\n componentIds?: readonly (\n | CardIdOfManifest<Manifest>\n | PieceIdOfManifest<Manifest>\n | DieIdOfManifest<Manifest>\n )[];\n}): SetupBootstrapStep<Manifest> {\n return {\n type: \"move\",\n from,\n to: {\n type: \"sharedBoardSpace\",\n boardId,\n spaceId,\n } as SetupBootstrapDestinationRef<Manifest>,\n count,\n componentIds,\n };\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAAA,SAAS,SAAS;AAuBlB,SAAS,oBACP,YACmB;AACnB,QAAM,QAAsC,CAAC;AAC7C,aAAW,CAAC,KAAK,SAAS,KAAK,OAAO,QAAQ,UAAU,GAAG;AACzD,QAAI,UAAU,SAAS,MAAO;AAC9B,UAAM,SAAS,UAAU;AACzB,UAAM,GAAG,IACP,kBAAkB,YACd,OAAO,QAAQ,UAAU,YAAY,IACrC;AAAA,EACR;AACA,SAAO,EAAE,OAAO,KAAK;AACvB;AAEO,SAAS,gCAKd,YAC2B;AAC3B,QAAM,QAAQ,8BAA8B,UAAU;AACtD,QAAM,MAAyD,CAAC;AAChE,aAAW,cAAc,MAAM,aAAa,OAAO,GAAG;AACpD,UAAM,eAAkD,CAAC;AACzD,eAAW,CAAC,IAAI,WAAW,KAAK,WAAW,cAAc;AACvD,mBAAa,EAAE,IACb,YAAY,gBAAgB,oBAAoB,YAAY,MAAM;AAAA,IACtE;AACA,QAAI,OAAO,WAAW,SAAS,CAAC,IAAI;AAAA,EACtC;AACA,SAAO;AACT;;;AC5CO,SAAS,QAId,WAC8B;AAC9B,SAAO;AAAA,IACL,MAAM;AAAA,IACN;AAAA,EACF;AACF;AAEO,SAAS,iBAGd;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,GAWiC;AAC/B,SAAO;AAAA,IACL,MAAM;AAAA,IACN;AAAA,IACA,IAAI;AAAA,MACF,MAAM;AAAA,MACN;AAAA,IACF;AAAA,IACA;AAAA,IACA;AAAA,EACF;AACF;AAEO,SAAS,2BAGd;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,GAeiC;AAC/B,SAAO;AAAA,IACL,MAAM;AAAA,IACN;AAAA,IACA,IAAI;AAAA,MACF,MAAM;AAAA,MACN;AAAA,MACA;AAAA,IACF;AAAA,IACA;AAAA,IACA;AAAA,EACF;AACF;AAEO,SAAS,yBAGd;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,GAgBiC;AAC/B,SAAO;AAAA,IACL,MAAM;AAAA,IACN;AAAA,IACA,IAAI;AAAA,MACF,MAAM;AAAA,MACN;AAAA,MACA;AAAA,IACF;AAAA,IACA;AAAA,IACA;AAAA,EACF;AACF;AAEO,SAAS,qBAGd;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,GAgBiC;AAC/B,SAAO;AAAA,IACL,MAAM;AAAA,IACN;AAAA,IACA,IAAI;AAAA,MACF,MAAM;AAAA,MACN;AAAA,MACA;AAAA,IACF;AAAA,IACA;AAAA,IACA;AAAA,EACF;AACF;","names":[]}
1
+ {"version":3,"sources":["../../src/reducer/setup-bootstrap-helpers.ts"],"sourcesContent":["import type {\n CardIdOfManifest,\n DieIdOfManifest,\n GeneratedManifestContractLike,\n PieceIdOfManifest,\n PlayerIdOfManifest,\n SetupBootstrapContainerRef,\n SetupBootstrapPerPlayerContainerTemplateRef,\n SetupBootstrapStep,\n SetupBootstrapDestinationRef,\n} from \"./model\";\n\nexport function shuffle<\n Manifest extends GeneratedManifestContractLike =\n GeneratedManifestContractLike,\n>(\n container: SetupBootstrapContainerRef<Manifest>,\n): SetupBootstrapStep<Manifest> {\n return {\n type: \"shuffle\",\n container,\n };\n}\n\nexport function dealToPlayerZone<\n Manifest extends GeneratedManifestContractLike =\n GeneratedManifestContractLike,\n>({\n from,\n zoneId,\n count,\n playerIds,\n}: {\n from: Extract<\n SetupBootstrapContainerRef<Manifest>,\n { type: \"sharedZone\" | \"sharedBoardContainer\" }\n >;\n zoneId: Extract<\n SetupBootstrapPerPlayerContainerTemplateRef<Manifest>,\n { type: \"playerZone\" }\n >[\"zoneId\"];\n count: number;\n playerIds?: readonly PlayerIdOfManifest<Manifest>[];\n}): SetupBootstrapStep<Manifest> {\n return {\n type: \"deal\",\n from,\n to: {\n type: \"playerZone\",\n zoneId,\n } as SetupBootstrapPerPlayerContainerTemplateRef<Manifest>,\n count,\n playerIds,\n };\n}\n\nexport function dealToPlayerBoardContainer<\n Manifest extends GeneratedManifestContractLike =\n GeneratedManifestContractLike,\n>({\n from,\n boardId,\n containerId,\n count,\n playerIds,\n}: {\n from: Extract<\n SetupBootstrapContainerRef<Manifest>,\n { type: \"sharedZone\" | \"sharedBoardContainer\" }\n >;\n boardId: Extract<\n SetupBootstrapPerPlayerContainerTemplateRef<Manifest>,\n { type: \"playerBoardContainer\" }\n >[\"boardId\"];\n containerId: Extract<\n SetupBootstrapPerPlayerContainerTemplateRef<Manifest>,\n { type: \"playerBoardContainer\" }\n >[\"containerId\"];\n count: number;\n playerIds?: readonly PlayerIdOfManifest<Manifest>[];\n}): SetupBootstrapStep<Manifest> {\n return {\n type: \"deal\",\n from,\n to: {\n type: \"playerBoardContainer\",\n boardId,\n containerId,\n } as SetupBootstrapPerPlayerContainerTemplateRef<Manifest>,\n count,\n playerIds,\n };\n}\n\nexport function seedSharedBoardContainer<\n Manifest extends GeneratedManifestContractLike =\n GeneratedManifestContractLike,\n>({\n from,\n boardId,\n containerId,\n count,\n componentIds,\n}: {\n from: SetupBootstrapContainerRef<Manifest>;\n boardId: Extract<\n SetupBootstrapDestinationRef<Manifest>,\n { type: \"sharedBoardContainer\" }\n >[\"boardId\"];\n containerId: Extract<\n SetupBootstrapDestinationRef<Manifest>,\n { type: \"sharedBoardContainer\" }\n >[\"containerId\"];\n count?: number;\n componentIds?: readonly (\n | CardIdOfManifest<Manifest>\n | PieceIdOfManifest<Manifest>\n | DieIdOfManifest<Manifest>\n )[];\n}): SetupBootstrapStep<Manifest> {\n return {\n type: \"move\",\n from,\n to: {\n type: \"sharedBoardContainer\",\n boardId,\n containerId,\n } as SetupBootstrapDestinationRef<Manifest>,\n count,\n componentIds,\n };\n}\n\nexport function seedSharedBoardSpace<\n Manifest extends GeneratedManifestContractLike =\n GeneratedManifestContractLike,\n>({\n from,\n boardId,\n spaceId,\n count,\n componentIds,\n}: {\n from: SetupBootstrapContainerRef<Manifest>;\n boardId: Extract<\n SetupBootstrapDestinationRef<Manifest>,\n { type: \"sharedBoardSpace\" }\n >[\"boardId\"];\n spaceId: Extract<\n SetupBootstrapDestinationRef<Manifest>,\n { type: \"sharedBoardSpace\" }\n >[\"spaceId\"];\n count?: number;\n componentIds?: readonly (\n | CardIdOfManifest<Manifest>\n | PieceIdOfManifest<Manifest>\n | DieIdOfManifest<Manifest>\n )[];\n}): SetupBootstrapStep<Manifest> {\n return {\n type: \"move\",\n from,\n to: {\n type: \"sharedBoardSpace\",\n boardId,\n spaceId,\n } as SetupBootstrapDestinationRef<Manifest>,\n count,\n componentIds,\n };\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAYO,SAAS,QAId,WAC8B;AAC9B,SAAO;AAAA,IACL,MAAM;AAAA,IACN;AAAA,EACF;AACF;AAEO,SAAS,iBAGd;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,GAWiC;AAC/B,SAAO;AAAA,IACL,MAAM;AAAA,IACN;AAAA,IACA,IAAI;AAAA,MACF,MAAM;AAAA,MACN;AAAA,IACF;AAAA,IACA;AAAA,IACA;AAAA,EACF;AACF;AAEO,SAAS,2BAGd;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,GAeiC;AAC/B,SAAO;AAAA,IACL,MAAM;AAAA,IACN;AAAA,IACA,IAAI;AAAA,MACF,MAAM;AAAA,MACN;AAAA,MACA;AAAA,IACF;AAAA,IACA;AAAA,IACA;AAAA,EACF;AACF;AAEO,SAAS,yBAGd;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,GAgBiC;AAC/B,SAAO;AAAA,IACL,MAAM;AAAA,IACN;AAAA,IACA,IAAI;AAAA,MACF,MAAM;AAAA,MACN;AAAA,MACA;AAAA,IACF;AAAA,IACA;AAAA,IACA;AAAA,EACF;AACF;AAEO,SAAS,qBAGd;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,GAgBiC;AAC/B,SAAO;AAAA,IACL,MAAM;AAAA,IACN;AAAA,IACA,IAAI;AAAA,MACF,MAAM;AAAA,MACN;AAAA,MACA;AAAA,IACF;AAAA,IACA;AAAA,IACA;AAAA,EACF;AACF;","names":[]}
@@ -1,3 +1,3 @@
1
- export { M as MaybePromise, R as REDUCER_CONTRACT_VERSION, a as ReducerBundleContract, w as ReducerWire, z as ReducerWireZod } from './index.d-DMASeF6M.js';
1
+ export { M as MaybePromise, R as REDUCER_CONTRACT_VERSION, a as ReducerBundleContract, w as ReducerWire, z as ReducerWireZod } from './index.d-C7Ztirg6.js';
2
2
  export { materializeManifestTable } from './codegen.js';
3
3
  import 'zod';
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  materializeManifestTable
3
- } from "./chunk-52DH7VQF.js";
3
+ } from "./chunk-SACZWUA6.js";
4
4
  import {
5
5
  REDUCER_CONTRACT_VERSION,
6
6
  zod_exports
7
- } from "./chunk-TGMXBRKY.js";
7
+ } from "./chunk-3PFDHTR7.js";
8
8
  import "./chunk-PZ5AY32C.js";
9
9
  export {
10
10
  REDUCER_CONTRACT_VERSION,
package/dist/reducer.d.ts CHANGED
@@ -1,12 +1,12 @@
1
1
  import { z } from 'zod';
2
- import { V as GeneratedManifestContractLike, bQ as RuntimeTableRecord, cx as StateDefinition, bY as SchemaLike, ac as ManifestContractOf, N as ErrorCodeOfContract, ae as ManifestIdSchema, aR as ReducerManifestContract, aE as PlayerIdOfState, cG as TableQueriesOfState, o as CardIdOfState, ab as ManifestContract, cE as TableOfState, ce as SetupSelectionOfManifest, cP as TiledVertexIdOfTable, cD as TableOfManifest, cH as TiledBoardIdOfTable, cJ as TiledEdgeIdOfTable, cN as TiledSpaceIdOfTable, n as CardIdOfManifest, O as ExactManifestContractOf, at as PhaseNameOfContract, aG as PlayerZoneIdOfManifest, ax as PhaseSchemasOfContract, a as AnySchema, cC as SystemActionEvent, cF as TableQueries, e as BoardIdOfTable, c as BoardContainerIdOfTable } from './runtime-Dkfm1x2r.js';
3
- export { h as BoardRef, R as FrameworkErrorCodes, S as GameEvent, T as GameEventDetail, U as GameOutcome, aj as OutcomeResult, ak as OutcomeScoreComponent, al as OutcomeStanding, am as OutcomeTieBreak, an as PerPlayer, ao as PerPlayerBoardRef, ap as PerPlayerSchemaOptions, aC as PlayerId, aN as ReducerAccept, aO as ReducerAcceptOptions, aS as ReducerReject, aT as ReducerResult, aW as ReducerValidationResult, cf as SharedBoardRef, cU as asPlayerId, cW as boardRef, cX as boardRefKey, cY as boardRefSchema, d2 as isPerPlayer, d3 as isPerPlayerBoardRef, d4 as isPlayerId, d5 as isSharedBoardRef, d7 as parseBoardRefKey, d8 as perPlayer, d9 as perPlayerBoardRef, da as perPlayerEntries, db as perPlayerGet, dc as perPlayerHas, dd as perPlayerKeys, de as perPlayerMap, df as perPlayerRequire, dg as perPlayerSchema, dh as perPlayerSet, di as perPlayerSize, dj as perPlayerValues, dl as sharedBoardRef } from './runtime-Dkfm1x2r.js';
4
- import { j as BaseGameStateOfContract, ap as PhaseDefinition, b8 as ViewDefinition, aE as ReducerGameContract, Y as InputCollector, y as CollectorState, K as DerivedResolver, b7 as ValidationIssue, b6 as TargetKind, a3 as InputSelectionDescriptor, a0 as InputDomainDescriptor, n as BoardTargetDomainDescriptor, l as BoardInputCollectorMeta, f as AnyInteractionSpec, d as AnyCardActionSpec, R as EffectMap, aW as ScopedPhaseState, b1 as StageMap, ax as PhaseZoneList, C as CardActionMap, at as PhaseMapOf, ba as ViewMapOf, aG as ReducerGameDefinition, b4 as StaticViewDefinition, ae as InteractionSpec, p as CardActionSpec, ac as InteractionRule, a9 as InteractionMap, z as ContinuationCallable, T as EffectRollDieDefinition, U as EffectShuffleDefinition, V as EffectShufflePlayerZoneDefinition, b3 as StageSpec, aF as ReducerGameContractLike } from './views-32rSsfeU.js';
5
- export { J as DerivedDefinition, W as GameStateOf, X as InitialStateCallbacks, am as Op, aD as ReducerEdit, aH as ReducerOps, aJ as ReducerStateBase, aL as ReducerTransaction, aU as RotatePlayerZoneArgs, bf as createDerivedResolver, bg as createReducerEdit, bh as createReducerOps, bi as createReducerTransaction, bj as defineDerived, bk as pipe } from './views-32rSsfeU.js';
6
- import { a as ReducerBundleContract } from './index.d-DMASeF6M.js';
7
- import { a as ReducerDiagnosticsSink } from './diagnostics-1BWjRo6-.js';
8
- export { D as DispatchTraceSummaryEntry, R as ReducerDiagnosticEvent, n as noopDiagnosticsSink } from './diagnostics-1BWjRo6-.js';
9
- export { S as StaleContractArtifactError, a as StaleContractArtifactErrorOptions, b as StaleContractArtifactKind, i as isStaleContractArtifactError } from './stale-contract-artifact-error-C5AaZPJ8.js';
2
+ import { V as GeneratedManifestContractLike, bV as RuntimeTableRecord, cC as StateDefinition, c1 as SchemaLike, ac as ManifestContractOf, N as ErrorCodeOfContract, af as ManifestIdSchema, aT as ReducerManifestContract, aG as PlayerIdOfState, cL as TableQueriesOfState, o as CardIdOfState, ab as ManifestContract, cJ as TableOfState, cj as SetupSelectionOfManifest, cU as TiledVertexIdOfTable, cI as TableOfManifest, cM as TiledBoardIdOfTable, cO as TiledEdgeIdOfTable, cS as TiledSpaceIdOfTable, n as CardIdOfManifest, O as ExactManifestContractOf, av as PhaseNameOfContract, aI as PlayerZoneIdOfManifest, az as PhaseSchemasOfContract, a as AnySchema, cH as SystemActionEvent, cK as TableQueries, e as BoardIdOfTable, c as BoardContainerIdOfTable } from './runtime-B_w9AO2n.js';
3
+ export { h as BoardRef, R as FrameworkErrorCodes, S as GameEvent, T as GameEventDetail, U as GameOutcome, al as OutcomeResult, am as OutcomeScoreComponent, an as OutcomeStanding, ao as OutcomeTieBreak, ap as PerPlayer, aq as PerPlayerBoardRef, ar as PerPlayerSchemaOptions, aE as PlayerId, aP as ReducerAccept, aQ as ReducerAcceptOptions, aU as ReducerReject, aV as ReducerResult, aY as ReducerValidationResult, ck as SharedBoardRef, cZ as asPlayerId, c$ as boardRef, d0 as boardRefKey, d1 as boardRefSchema, d7 as isPerPlayer, d8 as isPerPlayerBoardRef, d9 as isPlayerId, da as isSharedBoardRef, dd as parseBoardRefKey, de as perPlayer, df as perPlayerBoardRef, dg as perPlayerEntries, dh as perPlayerGet, di as perPlayerHas, dj as perPlayerKeys, dk as perPlayerMap, dl as perPlayerRequire, dm as perPlayerSchema, dn as perPlayerSet, dp as perPlayerSize, dq as perPlayerValues, ds as sharedBoardRef } from './runtime-B_w9AO2n.js';
4
+ import { j as BaseGameStateOfContract, aq as PhaseDefinition, aB as PlayerViewDefinition, aZ as SharedViewDefinition, aG as ReducerGameContract, Z as InputCollector, y as CollectorState, K as DerivedResolver, ba as ValidationIssue, b9 as TargetKind, a4 as InputSelectionDescriptor, a1 as InputDomainDescriptor, n as BoardTargetDomainDescriptor, l as BoardInputCollectorMeta, f as AnyInteractionSpec, d as AnyCardActionSpec, R as EffectMap, aY as ScopedPhaseState, b4 as StageMap, ay as PhaseZoneList, C as CardActionMap, au as PhaseMapOf, bc as ViewMapOf, aI as ReducerGameDefinition, W as EmptyViewDefinition, b7 as StaticViewDefinition, af as InteractionSpec, p as CardActionSpec, ad as InteractionRule, aa as InteractionMap, z as ContinuationCallable, T as EffectRollDieDefinition, U as EffectShuffleDefinition, V as EffectShufflePlayerZoneDefinition, b6 as StageSpec, aH as ReducerGameContractLike } from './views-DE2eZxPz.js';
5
+ export { J as DerivedDefinition, X as GameStateOf, Y as InitialStateCallbacks, an as Op, aF as ReducerEdit, aJ as ReducerOps, aL as ReducerStateBase, aN as ReducerTransaction, aW as RotatePlayerZoneArgs, bh as createDerivedResolver, bi as createReducerEdit, bj as createReducerOps, bk as createReducerTransaction, bl as defineDerived, bm as pipe } from './views-DE2eZxPz.js';
6
+ import { a as ReducerBundleContract, w as wire } from './index.d-C7Ztirg6.js';
7
+ import { a as ReducerDiagnosticsSink } from './diagnostics-DIi3ina7.js';
8
+ export { D as DispatchTraceSummaryEntry, R as ReducerDiagnosticEvent, n as noopDiagnosticsSink } from './diagnostics-DIi3ina7.js';
9
+ export { S as StaleContractArtifactError, a as StaleContractArtifactErrorOptions, b as StaleContractArtifactKind, i as isStaleContractArtifactError } from './stale-contract-artifact-error-XLaweZtF.js';
10
10
  import './types.js';
11
11
 
12
12
  type AnyReducerGameContract = {
@@ -19,7 +19,8 @@ type ContractState<Contract extends AnyReducerGameContract> = BaseGameStateOfCon
19
19
  type ContractManifest<Contract extends AnyReducerGameContract> = ManifestContractOf<Contract>;
20
20
  type ContractErrorCode<Contract extends AnyReducerGameContract> = ErrorCodeOfContract<Contract>;
21
21
  type ReducerPhaseDefinition<Contract extends AnyReducerGameContract, PhaseStateSchema extends SchemaLike<object>> = PhaseDefinition<PhaseStateSchema, ContractState<Contract>, ContractManifest<Contract>>;
22
- type ReducerViewDefinition<Contract extends AnyReducerGameContract, Projection = unknown> = ViewDefinition<ContractState<Contract>, ContractManifest<Contract>, Projection>;
22
+ type ReducerSharedViewDefinition<Contract extends AnyReducerGameContract, Projection = unknown> = SharedViewDefinition<ContractState<Contract>, ContractManifest<Contract>, Projection>;
23
+ type ReducerPlayerViewDefinition<Contract extends AnyReducerGameContract, SharedProjection = unknown, Projection = unknown> = PlayerViewDefinition<ContractState<Contract>, ContractManifest<Contract>, SharedProjection, Projection>;
23
24
 
24
25
  type ManifestIdSchemasOf<Ids extends Record<string, SchemaLike<unknown>>> = {
25
26
  readonly [Key in keyof Ids]: Ids[Key] extends SchemaLike<infer Output> ? Ids[Key] & ManifestIdSchema<Output> : Ids[Key];
@@ -341,10 +342,15 @@ declare const boardTarget: {
341
342
  playerSpace<State extends CollectorState, BoardId extends string, SpaceId extends string>(boardId: BoardId): BoardTargetBuilder<State, PlayerBoardSpaceTarget<BoardId, SpaceId, PlayerIdOfState<State>>>;
342
343
  };
343
344
 
345
+ type PlayerSpaceInputSchema<BoardId extends string, SpaceId extends string, PlayerId extends string> = z.ZodObject<{
346
+ boardId: z.ZodLiteral<BoardId>;
347
+ playerId: ManifestIdSchema<PlayerId, "playerId">;
348
+ spaceId: z.ZodType<SpaceId>;
349
+ }>;
344
350
  declare function playerSpaceInput<State extends CollectorState = CollectorState, BoardId extends string = string, SpaceId extends string = string, PlayerId extends string = string>(options: {
345
351
  target: BoardTargetRule<State, PlayerBoardSpaceTarget<BoardId, SpaceId, PlayerId>>;
346
352
  dependsOn?: readonly InputFieldRef<string, unknown>[];
347
- }): InputCollector<z.ZodType<PlayerBoardSpaceTarget<BoardId, SpaceId, PlayerId>>, State, "board-space">;
353
+ }): InputCollector<PlayerSpaceInputSchema<BoardId, SpaceId, PlayerId>, State, "board-space">;
348
354
  declare const boardInput: {
349
355
  vertex: <State extends CollectorState = CollectorState, Id extends string = string>(options: {
350
356
  target: BoardTargetRule<State, Id>;
@@ -531,7 +537,7 @@ type CollectorKindOf<Collector extends NonRngCollector> = [Collector] extends [
531
537
  readonly kind: infer Kind extends Exclude<InputCollector["kind"], "rng">;
532
538
  }
533
539
  ] ? Kind : never;
534
- type ManyInputCollector<Schema extends SchemaLike<unknown> = SchemaLike<unknown>, State extends CollectorState = CollectorState, Kind extends Exclude<InputCollector["kind"], "rng"> = Exclude<InputCollector["kind"], "rng">> = InputCollector<z.ZodType<ReadonlyArray<z.infer<Schema>>>, State, Kind> & {
540
+ type ManyInputCollector<Schema extends SchemaLike<unknown> = SchemaLike<unknown>, State extends CollectorState = CollectorState, Kind extends Exclude<InputCollector["kind"], "rng"> = Exclude<InputCollector["kind"], "rng">> = InputCollector<z.ZodArray<Schema>, State, Kind> & {
535
541
  readonly selection: Extract<InputSelectionDescriptor, {
536
542
  mode: "many";
537
543
  }>;
@@ -619,7 +625,7 @@ type BoundBoardInputs<Contract extends ContractWithPhases> = {
619
625
  playerSpace<BoardId extends string = string, SpaceId extends string = string, PlayerId extends string = PlayerIdOfState<BoundState<Contract>>>(options: {
620
626
  target: BoardTargetRule<BoundState<Contract>, PlayerBoardSpaceTarget<BoardId, SpaceId, PlayerId>>;
621
627
  dependsOn?: readonly InputFieldRef<string, unknown>[];
622
- }): InputCollector<z.ZodType<PlayerBoardSpaceTarget<BoardId, SpaceId, PlayerId>>, BoundState<Contract>, "board-space">;
628
+ }): InputCollector<PlayerSpaceInputSchema<BoardId, SpaceId, PlayerId>, BoundState<Contract>, "board-space">;
623
629
  };
624
630
  type BoundCardInput<Contract extends ContractWithPhases> = <Id extends string = CardIdOfManifest<BoundManifest<Contract>>, const ZoneIds extends readonly string[] = readonly string[]>(options: {
625
631
  target: CardTargetRule<BoundState<Contract>, Id, ZoneIds>;
@@ -684,8 +690,10 @@ type PhaseAuthoring<Contract extends ContractWithPhases, PhaseStateSchema extend
684
690
  };
685
691
  type ContractAuthoring<Contract extends ContractWithPhases> = {
686
692
  readonly contract: Contract;
687
- game<Definitions extends PhaseMapOf<Contract>, Views extends ViewMapOf<Contract> = Record<string, never>>(definition: Omit<ReducerGameDefinition<Contract, Definitions, Views>, "contract">): ReducerGameDefinition<Contract, Definitions, Views>;
688
- view<Projection>(definition: ViewDefinition<BoundState<Contract>, BoundManifest<Contract>, Projection>): ViewDefinition<BoundState<Contract>, BoundManifest<Contract>, Projection>;
693
+ game<Definitions extends PhaseMapOf<Contract>, Views extends ViewMapOf<Contract>>(definition: Omit<ReducerGameDefinition<Contract, Definitions, Views>, "contract">): ReducerGameDefinition<Contract, Definitions, Views>;
694
+ sharedView<Projection>(definition: SharedViewDefinition<BoundState<Contract>, BoundManifest<Contract>, Projection>): SharedViewDefinition<BoundState<Contract>, BoundManifest<Contract>, Projection>;
695
+ playerView<SharedProjection = unknown, Projection = unknown>(definition: PlayerViewDefinition<BoundState<Contract>, BoundManifest<Contract>, SharedProjection, Projection>): PlayerViewDefinition<BoundState<Contract>, BoundManifest<Contract>, SharedProjection, Projection>;
696
+ emptyView(): EmptyViewDefinition<BoundState<Contract>, BoundManifest<Contract>>;
689
697
  staticView<Projection>(definition: StaticViewDefinition<ExactManifestContractOf<Contract>, Projection>): StaticViewDefinition<ExactManifestContractOf<Contract>, Projection>;
690
698
  phase<Name extends PhaseNameOfContract<Contract>>(name: Name): PhaseAuthoring<Contract, PhaseSchemasOfContract<Contract>[Name]>;
691
699
  };
@@ -715,7 +723,7 @@ declare function defineEffect<Contract extends AnyReducerGameContract>(): {
715
723
  <Id extends string, ContextSchema extends AnySchema = z.ZodObject<Record<string, never>, z.core.$strip>>(definition: EffectShufflePlayerZoneInput<Contract, Id, ContextSchema>): EffectShufflePlayerZoneDefinition<Id, ContextSchema, ContractState<Contract>, ContractManifest<Contract>>;
716
724
  };
717
725
 
718
- declare function defineGame<const Contract extends AnyReducerGameContract, Definitions extends PhaseMapOf<Contract>, Views extends ViewMapOf<Contract> = Record<string, never>>(definition: {
726
+ declare function defineGame<const Contract extends AnyReducerGameContract, Definitions extends PhaseMapOf<Contract>, Views extends ViewMapOf<Contract>>(definition: {
719
727
  contract: Contract;
720
728
  } & Omit<ReducerGameDefinition<NoInfer<Contract>, Definitions, Views>, "contract">): ReducerGameDefinition<Contract, Definitions, Views>;
721
729
 
@@ -723,10 +731,12 @@ declare function defineInteraction<Contract extends AnyReducerGameContract, Phas
723
731
  declare function defineInteractionRule<Contract extends AnyReducerGameContract, PhaseState extends PhaseStateInput = SchemaLike<object>>(): <Collectors extends Record<string, InputCollector> = Record<string, InputCollector>>(definition: InteractionRule<Collectors, ScopedPhaseState<ContractState<Contract>, InferPhaseState<PhaseState>>, ContractManifest<Contract>, ContractErrorCode<Contract>>) => InteractionRule<Collectors, ScopedPhaseState<ContractState<Contract>, InferPhaseState<PhaseState>>, ContractManifest<Contract>, ContractErrorCode<Contract>>;
724
732
  declare function defineCardAction<Contract extends AnyReducerGameContract, PhaseState extends PhaseStateInput>(): <Collectors extends Record<string, InputCollector> = Record<string, never>, const PlayFrom extends PlayerZoneIdOfManifest<ContractManifest<Contract>> = PlayerZoneIdOfManifest<ContractManifest<Contract>>>(definition: CardActionSpec<Collectors, ScopedPhaseState<ContractState<Contract>, InferPhaseState<PhaseState>>, ContractManifest<Contract>, PlayFrom, ContractErrorCode<Contract>>) => CardActionSpec<Collectors, ScopedPhaseState<ContractState<Contract>, InferPhaseState<PhaseState>>, ContractManifest<Contract>, PlayFrom, ContractErrorCode<Contract>>;
725
733
 
726
- declare function defineView<Contract extends AnyReducerGameContract>(): <Projection>(definition: ViewDefinition<ContractState<Contract>, ContractManifest<Contract>, Projection>) => ViewDefinition<ContractState<Contract>, ContractManifest<Contract>, Projection>;
734
+ declare function defineSharedView<Contract extends AnyReducerGameContract>(): <Projection>(definition: SharedViewDefinition<ContractState<Contract>, ContractManifest<Contract>, Projection>) => SharedViewDefinition<ContractState<Contract>, ContractManifest<Contract>, Projection>;
735
+ declare function definePlayerView<Contract extends AnyReducerGameContract>(): <SharedProjection = unknown, Projection = unknown>(definition: PlayerViewDefinition<ContractState<Contract>, ContractManifest<Contract>, SharedProjection, Projection>) => PlayerViewDefinition<ContractState<Contract>, ContractManifest<Contract>, SharedProjection, Projection>;
736
+ declare function defineEmptyView<Contract extends AnyReducerGameContract>(): EmptyViewDefinition<ContractState<Contract>, ContractManifest<Contract>>;
727
737
  /**
728
738
  * Factory for the session-scoped static view (see {@link StaticViewDefinition}).
729
- * Kept separate from {@link defineView} because the argument shape is
739
+ * Kept separate from dynamic view helpers because the argument shape is
730
740
  * structurally different: it exposes only the manifest and generated static
731
741
  * queries, with no `state`, `playerId`, `runtime`, `fx`, `ops`, or
732
742
  * `accept/reject`. That shape is what prevents authors from accidentally
@@ -785,6 +795,12 @@ type ReducerBundleOptions = {
785
795
  diagnostics?: ReducerDiagnosticsSink | InteractionDiagnosticsMode;
786
796
  descriptorDiagnostics?: InteractionDiagnosticsMode;
787
797
  };
798
+ type ProjectionTimingMetadata = {
799
+ resolveAvailableInteractionsMs: number;
800
+ resolveViewMs: number;
801
+ resolveZoneHandlesMs: number;
802
+ descriptorHashMs: number;
803
+ };
788
804
  type ReducerBundle = ReducerBundleContract & {
789
805
  createInProcessRuntime(): {
790
806
  initialize(input: {
@@ -809,13 +825,8 @@ type ReducerBundle = ReducerBundleContract & {
809
825
  errorCode: string;
810
826
  message?: string;
811
827
  }>;
812
- projectSeatViewDynamic(input: {
813
- playerId: unknown;
814
- viewId?: string;
815
- }): unknown;
816
828
  projectSeatsDynamic(input: {
817
829
  playerIds: unknown[];
818
- viewId?: string;
819
830
  projectionMode?: "full" | "actionsOnly";
820
831
  }): {
821
832
  currentStage: string | null;
@@ -827,12 +838,15 @@ type ReducerBundle = ReducerBundleContract & {
827
838
  sealedPlayerIds: string[];
828
839
  pendingPlayerIds: string[];
829
840
  } | null;
841
+ schedulerFlow: wire.SchedulerFlowAuthorityProjection;
842
+ sharedView?: unknown;
830
843
  seats: Record<string, {
831
844
  view?: unknown;
832
845
  availableInteractionRefs: unknown;
833
846
  zones?: unknown;
834
847
  }>;
835
848
  interactionsByRef: Record<string, unknown>;
849
+ timing: ProjectionTimingMetadata;
836
850
  };
837
851
  explainInteraction(input: {
838
852
  playerId: unknown;
@@ -841,11 +855,6 @@ type ReducerBundle = ReducerBundleContract & {
841
855
  snapshot(): unknown;
842
856
  unsafeState(): unknown;
843
857
  };
844
- projectSeatViewDynamic(input: {
845
- state: unknown;
846
- playerId: unknown;
847
- viewId?: string;
848
- }): unknown;
849
858
  explainInteraction(input: {
850
859
  state: unknown;
851
860
  playerId: unknown;
@@ -896,4 +905,4 @@ declare function setActivePlayers<State extends {
896
905
  };
897
906
  }>(state: State, activePlayers: PlayerIdOfState<State>[]): State;
898
907
 
899
- export { type BoardTargetBuilder, type BoardTargetPredicate, type BoardTargetRule, type BoundInputBuilders, type BoundTargetRule, type CardTargetBuilder, type CardTargetPredicate, type CardTargetRule, type ChoiceOptionsFactory, type ChoiceTargetBuilder, type ChoiceTargetOption, type ChoiceTargetPredicate, type ChoiceTargetRule, type ContractAuthoring, type ContractFingerprint, type ContractWithPhases, type DefinedInputs, type DependencyValues, DerivedResolver, ErrorCodeOfContract, type InputFieldRef, InteractionRule, type ManyOptions, type PhaseAuthoring, PhaseMapOf, type PlayerBoardSpaceTarget, type ReducerBundle, type ReducerBundleOptions, ReducerDiagnosticsSink, ReducerGameContract, ReducerGameDefinition, type ReducerPhaseDefinition, type ReducerViewDefinition, type SparseCounts, type SparseMap, SystemActionEvent, TableQueries, TableQueriesOfState, type TargetContext, type TargetPredicate, type TargetPredicateArgs, type TargetRule, type TargetRuleBuilder, ValidationIssue, assertCardAllowedInContainer, boardInput, boardTarget, cardInput, cardTarget, choiceTarget, contractFingerprint, createContractAuthoring, createReducerBundle, createStateQueries, createTableQueries, defineCardAction, defineEffect, defineGame, defineGameContract, defineInputs, defineInteraction, defineInteractionRule, definePhase, definePhaseStage, defineStage, defineStaticView, defineStepPhase, defineView, formInput, gameEvent, many, normalizeCommandParams, promptInput, rngInput, setActivePlayers, sparseCounts, sparseMap };
908
+ export { type BoardTargetBuilder, type BoardTargetPredicate, type BoardTargetRule, type BoundInputBuilders, type BoundTargetRule, type CardTargetBuilder, type CardTargetPredicate, type CardTargetRule, type ChoiceOptionsFactory, type ChoiceTargetBuilder, type ChoiceTargetOption, type ChoiceTargetPredicate, type ChoiceTargetRule, type ContractAuthoring, type ContractFingerprint, type ContractWithPhases, type DefinedInputs, type DependencyValues, DerivedResolver, ErrorCodeOfContract, type InputFieldRef, InteractionRule, type ManyOptions, type PhaseAuthoring, PhaseMapOf, type PlayerBoardSpaceTarget, type ReducerBundle, type ReducerBundleOptions, ReducerDiagnosticsSink, ReducerGameContract, ReducerGameDefinition, type ReducerPhaseDefinition, type ReducerPlayerViewDefinition, type ReducerSharedViewDefinition, type SparseCounts, type SparseMap, SystemActionEvent, TableQueries, TableQueriesOfState, type TargetContext, type TargetPredicate, type TargetPredicateArgs, type TargetRule, type TargetRuleBuilder, ValidationIssue, assertCardAllowedInContainer, boardInput, boardTarget, cardInput, cardTarget, choiceTarget, contractFingerprint, createContractAuthoring, createReducerBundle, createStateQueries, createTableQueries, defineCardAction, defineEffect, defineEmptyView, defineGame, defineGameContract, defineInputs, defineInteraction, defineInteractionRule, definePhase, definePhaseStage, definePlayerView, defineSharedView, defineStage, defineStaticView, defineStepPhase, formInput, gameEvent, many, normalizeCommandParams, promptInput, rngInput, setActivePlayers, sparseCounts, sparseMap };