@dreamboard-games/sdk 0.4.0-alpha.8 → 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 (111) hide show
  1. package/REFERENCE.md +1067 -164
  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-3BLN5POZ.js → chunk-3PFDHTR7.js} +16 -6
  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-44N3T2A5.js → chunk-BUOODBVO.js} +2 -2
  21. package/dist/{chunk-ZYONCTZ2.js → chunk-GMOBG7Y7.js} +4 -4
  22. package/dist/{chunk-VTK4TIXC.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-XV27IQHA.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-IYX5OO2K.js → chunk-QQNL4WTX.js} +15 -2
  29. package/dist/chunk-QQNL4WTX.js.map +1 -0
  30. package/dist/{chunk-2TAKLJJD.js → chunk-SACZWUA6.js} +139 -46
  31. package/dist/chunk-SACZWUA6.js.map +1 -0
  32. package/dist/{chunk-VTNEWMWJ.js → chunk-SFOAY5H4.js} +2 -2
  33. package/dist/{chunk-VTNEWMWJ.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-YGQTL63W.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-C0PKOVbh.d.ts → index.d-C7Ztirg6.d.ts} +211 -3
  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-nS2ojsGr.d.ts → protocol-B2LWcqB4.d.ts} +9 -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 +17 -11
  59. package/dist/reducer.js +28 -6050
  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 +12 -12
  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-CTeN_QAk.d.ts → types-_zfC_7CD.d.ts} +1 -1
  92. package/dist/ui/components.d.ts +2 -2
  93. package/dist/ui/plugin-styles.css +1 -1
  94. package/dist/{ui-contract-Ue6SywvO.d.ts → ui-contract-CUC7Lyoc.d.ts} +1 -1
  95. package/dist/ui.d.ts +3 -3
  96. package/dist/{views-Qx-EHBP8.d.ts → views-DE2eZxPz.d.ts} +15 -3
  97. package/package.json +22 -2
  98. package/dist/chunk-2TAKLJJD.js.map +0 -1
  99. package/dist/chunk-3BLN5POZ.js.map +0 -1
  100. package/dist/chunk-3OZMHZK3.js +0 -40
  101. package/dist/chunk-3OZMHZK3.js.map +0 -1
  102. package/dist/chunk-5CQIJHGF.js +0 -663
  103. package/dist/chunk-5CQIJHGF.js.map +0 -1
  104. package/dist/chunk-B2YBS3SG.js.map +0 -1
  105. package/dist/chunk-IYX5OO2K.js.map +0 -1
  106. package/dist/types-B_3pObUV.d.ts +0 -192
  107. /package/dist/{chunk-44N3T2A5.js.map → chunk-BUOODBVO.js.map} +0 -0
  108. /package/dist/{chunk-ZYONCTZ2.js.map → chunk-GMOBG7Y7.js.map} +0 -0
  109. /package/dist/{chunk-VTK4TIXC.js.map → chunk-JRGP6W4V.js.map} +0 -0
  110. /package/dist/{chunk-XV27IQHA.js.map → chunk-NGYFBNBP.js.map} +0 -0
  111. /package/dist/{chunk-YGQTL63W.js.map → chunk-WDR7SKBM.js.map} +0 -0
@@ -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-C0PKOVbh.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-2TAKLJJD.js";
3
+ } from "./chunk-SACZWUA6.js";
4
4
  import {
5
5
  REDUCER_CONTRACT_VERSION,
6
6
  zod_exports
7
- } from "./chunk-3BLN5POZ.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, 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-Qx-EHBP8.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-Qx-EHBP8.js';
6
- import { a as ReducerBundleContract } from './index.d-C0PKOVbh.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 = {
@@ -342,10 +342,15 @@ declare const boardTarget: {
342
342
  playerSpace<State extends CollectorState, BoardId extends string, SpaceId extends string>(boardId: BoardId): BoardTargetBuilder<State, PlayerBoardSpaceTarget<BoardId, SpaceId, PlayerIdOfState<State>>>;
343
343
  };
344
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
+ }>;
345
350
  declare function playerSpaceInput<State extends CollectorState = CollectorState, BoardId extends string = string, SpaceId extends string = string, PlayerId extends string = string>(options: {
346
351
  target: BoardTargetRule<State, PlayerBoardSpaceTarget<BoardId, SpaceId, PlayerId>>;
347
352
  dependsOn?: readonly InputFieldRef<string, unknown>[];
348
- }): InputCollector<z.ZodType<PlayerBoardSpaceTarget<BoardId, SpaceId, PlayerId>>, State, "board-space">;
353
+ }): InputCollector<PlayerSpaceInputSchema<BoardId, SpaceId, PlayerId>, State, "board-space">;
349
354
  declare const boardInput: {
350
355
  vertex: <State extends CollectorState = CollectorState, Id extends string = string>(options: {
351
356
  target: BoardTargetRule<State, Id>;
@@ -532,7 +537,7 @@ type CollectorKindOf<Collector extends NonRngCollector> = [Collector] extends [
532
537
  readonly kind: infer Kind extends Exclude<InputCollector["kind"], "rng">;
533
538
  }
534
539
  ] ? Kind : never;
535
- 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> & {
536
541
  readonly selection: Extract<InputSelectionDescriptor, {
537
542
  mode: "many";
538
543
  }>;
@@ -620,7 +625,7 @@ type BoundBoardInputs<Contract extends ContractWithPhases> = {
620
625
  playerSpace<BoardId extends string = string, SpaceId extends string = string, PlayerId extends string = PlayerIdOfState<BoundState<Contract>>>(options: {
621
626
  target: BoardTargetRule<BoundState<Contract>, PlayerBoardSpaceTarget<BoardId, SpaceId, PlayerId>>;
622
627
  dependsOn?: readonly InputFieldRef<string, unknown>[];
623
- }): InputCollector<z.ZodType<PlayerBoardSpaceTarget<BoardId, SpaceId, PlayerId>>, BoundState<Contract>, "board-space">;
628
+ }): InputCollector<PlayerSpaceInputSchema<BoardId, SpaceId, PlayerId>, BoundState<Contract>, "board-space">;
624
629
  };
625
630
  type BoundCardInput<Contract extends ContractWithPhases> = <Id extends string = CardIdOfManifest<BoundManifest<Contract>>, const ZoneIds extends readonly string[] = readonly string[]>(options: {
626
631
  target: CardTargetRule<BoundState<Contract>, Id, ZoneIds>;
@@ -833,6 +838,7 @@ type ReducerBundle = ReducerBundleContract & {
833
838
  sealedPlayerIds: string[];
834
839
  pendingPlayerIds: string[];
835
840
  } | null;
841
+ schedulerFlow: wire.SchedulerFlowAuthorityProjection;
836
842
  sharedView?: unknown;
837
843
  seats: Record<string, {
838
844
  view?: unknown;