@dreamboard-games/sdk 0.4.0-alpha.7 → 0.4.0-alpha.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/REFERENCE.md +1292 -287
- package/dist/authoring/index.d.ts +4 -9
- package/dist/authoring/index.js +11 -547
- package/dist/authoring/index.js.map +1 -1
- package/dist/authoring-compiler.d.ts +27 -0
- package/dist/authoring-compiler.js +12 -0
- package/dist/authoring-compiler.js.map +1 -0
- package/dist/authoring-materialize-cli.d.ts +1 -0
- package/dist/authoring-materialize-cli.js +46 -0
- package/dist/authoring-materialize-cli.js.map +1 -0
- package/dist/browser-interaction.d.ts +1 -1
- package/dist/{chunk-TGMXBRKY.js → chunk-3PFDHTR7.js} +19 -7
- package/dist/chunk-3PFDHTR7.js.map +1 -0
- package/dist/chunk-45P5CEGH.js +176 -0
- package/dist/chunk-45P5CEGH.js.map +1 -0
- package/dist/chunk-5XTAQ4EQ.js +32 -0
- package/dist/chunk-5XTAQ4EQ.js.map +1 -0
- package/dist/chunk-7ADPYKFT.js +532 -0
- package/dist/chunk-7ADPYKFT.js.map +1 -0
- package/dist/{chunk-RKGJ64UN.js → chunk-BUOODBVO.js} +2 -2
- package/dist/{chunk-VLG4YST5.js → chunk-GMOBG7Y7.js} +4 -4
- package/dist/{chunk-Q322XCY2.js → chunk-JRGP6W4V.js} +3 -3
- package/dist/chunk-L3W2FPRQ.js +1793 -0
- package/dist/chunk-L3W2FPRQ.js.map +1 -0
- package/dist/{chunk-3QIZKXJ2.js → chunk-NGYFBNBP.js} +3 -3
- package/dist/chunk-P6IJ5YVY.js +154 -0
- package/dist/chunk-P6IJ5YVY.js.map +1 -0
- package/dist/{chunk-5IHU5CUK.js → chunk-QQNL4WTX.js} +25 -22
- package/dist/chunk-QQNL4WTX.js.map +1 -0
- package/dist/{chunk-52DH7VQF.js → chunk-SACZWUA6.js} +143 -47
- package/dist/chunk-SACZWUA6.js.map +1 -0
- package/dist/{chunk-KYEWGZ2Y.js → chunk-SFOAY5H4.js} +2 -2
- package/dist/{chunk-KYEWGZ2Y.js.map → chunk-SFOAY5H4.js.map} +1 -1
- package/dist/chunk-UNVCT5Z7.js +73 -0
- package/dist/chunk-UNVCT5Z7.js.map +1 -0
- package/dist/{chunk-NO537WSS.js → chunk-WDR7SKBM.js} +2 -2
- package/dist/chunk-XDGRC6OR.js +7039 -0
- package/dist/chunk-XDGRC6OR.js.map +1 -0
- package/dist/chunk-XLHLFTLI.js +399 -0
- package/dist/chunk-XLHLFTLI.js.map +1 -0
- package/dist/{chunk-B2YBS3SG.js → chunk-YNW3KBDE.js} +41 -13
- package/dist/chunk-YNW3KBDE.js.map +1 -0
- package/dist/codegen.js +1 -1
- package/dist/{components-BTwSIjXj.d.ts → components-BPzsSRs8.d.ts} +1 -1
- package/dist/definitions-0kjPV9wh.d.ts +294 -0
- package/dist/{diagnostics-1BWjRo6-.d.ts → diagnostics-DIi3ina7.d.ts} +2 -1
- package/dist/{index-CFTjJIXd.d.ts → index-CWzWpQzM.d.ts} +1 -1
- package/dist/{index.d-DMASeF6M.d.ts → index.d-C7Ztirg6.d.ts} +234 -5
- package/dist/index.js +2 -2
- package/dist/package-set.d.ts +2 -2
- package/dist/package-set.js +2 -2
- package/dist/{protocol-835hEGne.d.ts → protocol-B2LWcqB4.d.ts} +14 -0
- package/dist/reducer/advanced.d.ts +4 -4
- package/dist/reducer/advanced.js +7 -26
- package/dist/reducer/advanced.js.map +1 -1
- package/dist/reducer-contract.d.ts +1 -1
- package/dist/reducer-contract.js +2 -2
- package/dist/reducer.d.ts +37 -28
- package/dist/reducer.js +43 -6018
- package/dist/reducer.js.map +1 -1
- package/dist/reference-game-compiler.d.ts +45 -0
- package/dist/reference-game-compiler.js +25 -0
- package/dist/reference-game-compiler.js.map +1 -0
- package/dist/reference-game-source-manifest-cli.d.ts +1 -0
- package/dist/reference-game-source-manifest-cli.js +84 -0
- package/dist/reference-game-source-manifest-cli.js.map +1 -0
- package/dist/reference-games/index.d.ts +7 -217
- package/dist/reference-games/index.js +28 -208
- package/dist/reference-games/index.js.map +1 -1
- package/dist/runtime/primitives.d.ts +3 -3
- package/dist/runtime/primitives.js +3 -3
- package/dist/runtime/runtime-api.d.ts +1 -1
- package/dist/runtime/workspace-contract.d.ts +4 -4
- package/dist/runtime/workspace-contract.js +4 -4
- package/dist/{runtime-Dkfm1x2r.d.ts → runtime-B_w9AO2n.d.ts} +60 -5
- package/dist/{runtime-api-C6aWo9c0.d.ts → runtime-api-xCWLMQRT.d.ts} +2 -0
- package/dist/runtime.d.ts +7 -7
- package/dist/runtime.js +13 -13
- package/dist/schema-9jZzlEWZ.d.ts +220 -0
- package/dist/{stale-contract-artifact-error-C5AaZPJ8.d.ts → stale-contract-artifact-error-XLaweZtF.d.ts} +1 -1
- package/dist/testing-compiler.d.ts +36 -0
- package/dist/testing-compiler.js +236 -0
- package/dist/testing-compiler.js.map +1 -0
- package/dist/testing-runtime.d.ts +97 -21
- package/dist/testing-runtime.js +154 -95
- package/dist/testing-runtime.js.map +1 -1
- package/dist/testing.d.ts +178 -60
- package/dist/testing.js +641 -26
- package/dist/testing.js.map +1 -1
- package/dist/types-Bvptkukh.d.ts +122 -0
- package/dist/{types-aI4V9CWe.d.ts → types-_zfC_7CD.d.ts} +1 -1
- package/dist/types.d.ts +4 -0
- package/dist/ui/components.d.ts +2 -2
- package/dist/ui/plugin-styles.css +1 -1
- package/dist/{ui-contract-Ue6SywvO.d.ts → ui-contract-CUC7Lyoc.d.ts} +1 -1
- package/dist/ui.d.ts +3 -3
- package/dist/{views-32rSsfeU.d.ts → views-DE2eZxPz.d.ts} +42 -13
- package/package.json +22 -3
- package/dist/chunk-3OZMHZK3.js +0 -40
- package/dist/chunk-3OZMHZK3.js.map +0 -1
- package/dist/chunk-52DH7VQF.js.map +0 -1
- package/dist/chunk-5IHU5CUK.js.map +0 -1
- package/dist/chunk-B2YBS3SG.js.map +0 -1
- package/dist/chunk-IU6KGPY7.js +0 -659
- package/dist/chunk-IU6KGPY7.js.map +0 -1
- package/dist/chunk-TGMXBRKY.js.map +0 -1
- package/dist/types-DcADVHe9.d.ts +0 -192
- /package/dist/{chunk-RKGJ64UN.js.map → chunk-BUOODBVO.js.map} +0 -0
- /package/dist/{chunk-VLG4YST5.js.map → chunk-GMOBG7Y7.js.map} +0 -0
- /package/dist/{chunk-Q322XCY2.js.map → chunk-JRGP6W4V.js.map} +0 -0
- /package/dist/{chunk-3QIZKXJ2.js.map → chunk-NGYFBNBP.js.map} +0 -0
- /package/dist/{chunk-NO537WSS.js.map → chunk-WDR7SKBM.js.map} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/reference-games/canonical.ts","../../src/reference-games/schema.ts"],"sourcesContent":["import { sha256 } from \"@noble/hashes/sha2.js\";\nimport { bytesToHex, utf8ToBytes } from \"@noble/hashes/utils.js\";\n\nimport type { ReferenceGameSourceManifestPayload } from \"./schema.js\";\n\ntype CanonicalReferenceGameJson =\n | null\n | boolean\n | number\n | string\n | CanonicalReferenceGameJson[]\n | { [key: string]: CanonicalReferenceGameJson };\n\nexport function computeReferenceGameSourceDigest(\n payload: ReferenceGameSourceManifestPayload,\n): `sha256:${string}` {\n const canonical = canonicalizeReferenceGameSourcePayload(payload);\n const encoded = JSON.stringify(canonical);\n return `sha256:${bytesToHex(sha256(utf8ToBytes(encoded)))}`;\n}\n\nexport function canonicalizeReferenceGameSourcePayload(\n payload: ReferenceGameSourceManifestPayload,\n): CanonicalReferenceGameJson {\n return canonicalizeJson({\n ...payload,\n games: [...payload.games].sort((left, right) =>\n left.id.localeCompare(right.id),\n ),\n objects: [...payload.objects].sort((left, right) =>\n left.path.localeCompare(right.path),\n ),\n });\n}\n\nfunction canonicalizeJson(value: unknown): CanonicalReferenceGameJson {\n if (value === null || typeof value === \"boolean\") {\n return value;\n }\n if (typeof value === \"string\") {\n return value.normalize(\"NFC\");\n }\n if (typeof value === \"number\") {\n if (!Number.isFinite(value)) {\n throw new Error(\n \"reference game source JSON contains a non-finite number\",\n );\n }\n return value;\n }\n if (Array.isArray(value)) {\n return value.map((item) => canonicalizeJson(item));\n }\n if (typeof value === \"object\") {\n const entries = Object.entries(value as Record<string, unknown>);\n for (const [, item] of entries) {\n if (item === undefined) {\n throw new Error(\"reference game source JSON contains undefined\");\n }\n }\n return Object.fromEntries(\n entries\n .map(([key, item]) => [key.normalize(\"NFC\"), item] as const)\n .sort(([left], [right]) => left.localeCompare(right))\n .map(([key, item]) => [key, canonicalizeJson(item)]),\n );\n }\n throw new Error(\n `reference game source JSON contains unsupported ${typeof value} value`,\n );\n}\n","import { z } from \"zod\";\n\nimport { computeReferenceGameSourceDigest } from \"./canonical.js\";\n\nexport const REFERENCE_GAME_SOURCE_MANIFEST_SCHEMA_VERSION = 2;\nexport const REFERENCE_GAME_MANIFEST_SCHEMA_VERSION = 3;\n\nexport const referenceGameSha256DigestSchema = z\n .string()\n .regex(/^sha256:[a-f0-9]{64}$/);\n\nexport const referenceGameSourceObjectSchema = z\n .object({\n path: z.string().min(1),\n sha256: referenceGameSha256DigestSchema,\n byteLength: z.number().int().nonnegative(),\n })\n .strict();\n\nexport const referenceGameSourceEntrySchema = z\n .object({\n id: z.string().regex(/^[a-z0-9][a-z0-9-]*$/),\n root: z.string().regex(/^examples\\/reference-games\\/[a-z0-9-]+$/),\n sourceSha256: referenceGameSha256DigestSchema,\n packageJsonSha256: referenceGameSha256DigestSchema,\n lockfileSha256: referenceGameSha256DigestSchema,\n sdkSpecifier: z.string().min(1),\n manifest: z.string().min(1),\n reducer: z.string().min(1),\n ui: z.string().min(1),\n behaviorScenarios: z.array(z.string().min(1)).min(1),\n uiScenarios: z.array(z.string().min(1)).min(1),\n mechanics: z.array(z.string().min(1)).min(1),\n readFirst: z.array(z.string().min(1)).min(1),\n })\n .strict();\n\nexport const referenceGameSourceManifestPayloadSchema = z\n .object({\n games: z.array(referenceGameSourceEntrySchema).min(1),\n objects: z.array(referenceGameSourceObjectSchema).min(1),\n })\n .strict();\n\nexport const referenceGameSourceProvenanceSchema = z.discriminatedUnion(\n \"kind\",\n [\n z.object({ kind: z.literal(\"worktree\") }).strict(),\n z\n .object({\n kind: z.literal(\"git\"),\n repository: z.literal(\"dreamboard-games/dreamboard-sdk\"),\n revision: z.string().regex(/^[a-f0-9]{40}$/),\n })\n .strict(),\n ],\n);\n\nexport const referenceGameSourceManifestSchema = z\n .object({\n schemaVersion: z.literal(REFERENCE_GAME_SOURCE_MANIFEST_SCHEMA_VERSION),\n manifestType: z.literal(\"dreamboard.reference-game-source\"),\n bundleDigest: referenceGameSha256DigestSchema,\n payload: referenceGameSourceManifestPayloadSchema,\n provenance: referenceGameSourceProvenanceSchema,\n })\n .strict()\n .superRefine((value, context) => {\n const digest = computeReferenceGameSourceDigest(value.payload);\n if (value.bundleDigest !== digest) {\n context.addIssue({\n code: \"custom\",\n path: [\"bundleDigest\"],\n message: \"bundleDigest must match the canonical payload digest\",\n });\n }\n });\n\nconst referenceGameIdSchema = z.string().regex(/^[a-z0-9][a-z0-9-]*$/);\nconst referenceGameWorkspacePathSchema = z.string().min(1);\n\nexport const referenceGameWorkspaceSchema = z\n .object({\n manifest: referenceGameWorkspacePathSchema,\n reducer: referenceGameWorkspacePathSchema,\n ui: referenceGameWorkspacePathSchema,\n behaviorScenarios: z.array(referenceGameWorkspacePathSchema).min(1),\n uiScenarios: z.array(referenceGameWorkspacePathSchema).min(1),\n })\n .strict();\n\nexport const referenceGameTeachingSchema = z\n .object({\n whatThisTeaches: z.array(z.string().min(1)).min(1),\n whenToCopyThisPattern: z.array(z.string().min(1)).min(1),\n readFirst: z.array(referenceGameWorkspacePathSchema).min(1),\n })\n .strict();\n\nconst referenceGameDemoScreenshotPresetSchema = z\n .object({\n viewport: z.tuple([\n z.number().int().positive(),\n z.number().int().positive(),\n ]),\n theme: z.string().min(1),\n stagePadding: z.number().int().nonnegative(),\n frame: z.string().min(1),\n })\n .strict();\n\nexport const referenceGameDemoReleaseSchema = z\n .object({\n slug: referenceGameIdSchema,\n name: z.string().min(1),\n description: z.string().min(1),\n overview: z.string().min(1),\n creator: z.string().min(1),\n minPlayers: z.number().int().positive(),\n maxPlayers: z.number().int().positive(),\n playTimeMinMinutes: z.number().int().positive(),\n playTimeMaxMinutes: z.number().int().positive(),\n difficulty: z.number().int().min(1).max(5),\n mechanics: z.array(z.string().min(1)).min(1),\n categories: z.array(z.string().min(1)).min(1),\n heroImageUrl: z.string().min(1),\n estimatedMinutes: z.number().int().positive(),\n demoPlayerCount: z.number().int().positive(),\n screenshot: z\n .object({\n presets: z\n .record(z.string().min(1), referenceGameDemoScreenshotPresetSchema)\n .refine((value) => Object.keys(value).length > 0, {\n message: \"screenshot.presets must include at least one preset\",\n }),\n })\n .strict(),\n })\n .strict()\n .superRefine((value, context) => {\n if (value.maxPlayers < value.minPlayers) {\n context.addIssue({\n code: \"custom\",\n path: [\"maxPlayers\"],\n message: \"maxPlayers must be greater than or equal to minPlayers\",\n });\n }\n if (value.playTimeMaxMinutes < value.playTimeMinMinutes) {\n context.addIssue({\n code: \"custom\",\n path: [\"playTimeMaxMinutes\"],\n message:\n \"playTimeMaxMinutes must be greater than or equal to playTimeMinMinutes\",\n });\n }\n });\n\nexport const referenceGameRightsSchema = z\n .object({\n mechanicsProvenance: z.string().min(1),\n sourceCode: z.string().min(1),\n codeLicense: z.string().min(1),\n ruleText: z.string().min(1),\n artwork: z.string().min(1),\n assetLicenseManifest: z.string().min(1),\n thirdPartyMarks: z.array(z.string()),\n reviewStatus: z.literal(\"approved\"),\n reviewedBy: z.string().min(1),\n reviewedAt: z.string().min(1),\n })\n .strict();\n\nexport const referenceGameSdkPolicySchema = z\n .object({\n dependency: z.literal(\"@dreamboard-games/sdk\"),\n versionPolicy: z.literal(\"exact\"),\n })\n .strict();\n\nexport const referenceGameManifestV3Schema = z\n .object({\n schemaVersion: z.literal(REFERENCE_GAME_MANIFEST_SCHEMA_VERSION),\n id: referenceGameIdSchema,\n displayName: z.string().min(1),\n workspace: referenceGameWorkspaceSchema,\n teaching: referenceGameTeachingSchema,\n demoRelease: referenceGameDemoReleaseSchema.optional(),\n mechanics: z.array(z.string().min(1)).min(1),\n uiPatterns: z.array(z.string().min(1)).min(1),\n rights: referenceGameRightsSchema,\n sdk: referenceGameSdkPolicySchema,\n })\n .strict();\n\nexport type ReferenceGameSourceObject = z.infer<\n typeof referenceGameSourceObjectSchema\n>;\nexport type ReferenceGameSourceEntry = z.infer<\n typeof referenceGameSourceEntrySchema\n>;\nexport type ReferenceGameSourceManifestPayload = z.infer<\n typeof referenceGameSourceManifestPayloadSchema\n>;\nexport type ReferenceGameSourceProvenance = z.infer<\n typeof referenceGameSourceProvenanceSchema\n>;\nexport type ReferenceGameSourceManifest = z.infer<\n typeof referenceGameSourceManifestSchema\n>;\nexport type ReferenceGameWorkspace = z.infer<\n typeof referenceGameWorkspaceSchema\n>;\nexport type ReferenceGameTeaching = z.infer<typeof referenceGameTeachingSchema>;\nexport type ReferenceGameDemoRelease = z.infer<\n typeof referenceGameDemoReleaseSchema\n>;\nexport type ReferenceGameRights = z.infer<typeof referenceGameRightsSchema>;\nexport type ReferenceGameSdkPolicy = z.infer<\n typeof referenceGameSdkPolicySchema\n>;\nexport type ReferenceGameManifestV3 = z.infer<\n typeof referenceGameManifestV3Schema\n>;\n\nexport function parseReferenceGameSourceManifest(\n value: unknown,\n): ReferenceGameSourceManifest {\n return referenceGameSourceManifestSchema.parse(value);\n}\n\nexport function parseReferenceGameManifestV3(\n value: unknown,\n): ReferenceGameManifestV3 {\n return referenceGameManifestV3Schema.parse(value);\n}\n\nexport function isPackageableReferenceGame(\n game: ReferenceGameManifestV3,\n): boolean {\n return game.demoRelease !== undefined;\n}\n"],"mappings":";;;AAAA,SAAS,cAAc;AACvB,SAAS,YAAY,mBAAmB;AAYjC,SAAS,iCACd,SACoB;AACpB,QAAM,YAAY,uCAAuC,OAAO;AAChE,QAAM,UAAU,KAAK,UAAU,SAAS;AACxC,SAAO,UAAU,W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AY,EAAE,OAAO,EAAE,IAAI,CAAC;AAAA,EAC5B,YAAY,EAAE,OAAO,EAAE,IAAI,CAAC;AAC9B,CAAC,EACA,OAAO;AAEH,IAAM,+BAA+B,EACzC,OAAO;AAAA,EACN,YAAY,EAAE,QAAQ,uBAAuB;AAAA,EAC7C,eAAe,EAAE,QAAQ,OAAO;AAClC,CAAC,EACA,OAAO;AAEH,IAAM,gCAAgC,EAC1C,OAAO;AAAA,EACN,eAAe,EAAE,QAAQ,sCAAsC;AAAA,EAC/D,IAAI;AAAA,EACJ,aAAa,EAAE,OAAO,EAAE,IAAI,CAAC;AAAA,EAC7B,WAAW;AAAA,EACX,UAAU;AAAA,EACV,aAAa,+BAA+B,SAAS;AAAA,EACrD,WAAW,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,CAAC,CAAC,EAAE,IAAI,CAAC;AAAA,EAC3C,YAAY,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,CAAC,CAAC,EAAE,IAAI,CAAC;AAAA,EAC5C,QAAQ;AAAA,EACR,KAAK;AACP,CAAC,EACA,OAAO;AAgCH,SAAS,iCACd,OAC6B;AAC7B,SAAO,kCAAkC,MAAM,KAAK;AACtD;AAEO,SAAS,6BACd,OACyB;AACzB,SAAO,8BAA8B,MAAM,KAAK;AAClD;AAEO,SAAS,2BACd,MACS;AACT,SAAO,KAAK,gBAAgB;AAC9B;","names":[]}
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { bh as ZoneCardRenderItem } from '../ui-contract-
|
|
2
|
-
export { B as Board, a as BoardEdgeTarget, b as BoardEdgeTargetProps, c as BoardGridInteractionFilter, d as BoardHexGrid, e as BoardHexGridInteractionFilter, f as BoardHexGridInteractions, g as BoardHexGridProps, h as BoardHexView, i as BoardHexViewProps, j as BoardRoot, k as BoardRootProps, l as BoardSpaceTarget, m as BoardSpaceTargetProps, n as BoardSquareGrid, o as BoardSquareGridInteractionFilter, p as BoardSquareGridProps, q as BoardState, r as BoardStateProps, s as BoardTarget, t as BoardTargetExtraInputs, u as BoardTargetProps, v as BoardVertexTarget, w as BoardVertexTargetProps, D as Dice, x as DiceComponents, y as DiceRoot, z as DiceRootProps, A as DiceState, C as DiceValue, E as DiceValues, F as DiceValuesProps, H as Game, I as GameActiveActionState, J as GameChrome, K as GameChromeProps, L as GameChromeState, M as GameMeState, N as GamePendingInputState, O as GamePlayer, P as GamePlayerEntry, Q as GamePlayersState, R as GameRenderState, S as GameRoot, T as GameRootProps, U as GameTurnState, V as GameViewport, W as GameViewportProps, X as Interaction, Y as InteractionCardInput, Z as InteractionCardInputProps, _ as InteractionCardInputRenderState, $ as InteractionDescription, a0 as InteractionDialog, a1 as InteractionDialogProps, a2 as InteractionDialogRenderState, a3 as InteractionDialogState, a4 as InteractionFieldPrimitiveProps, a5 as InteractionFormPrimitive, a6 as InteractionFormPrimitiveProps, a7 as InteractionInput, a8 as InteractionInputProps, a9 as InteractionLabel, aa as InteractionPartProps, ab as InteractionRoot, ac as InteractionRootProps, ad as InteractionRoute, ae as InteractionRoutes, af as InteractionRoutesMap, ag as InteractionRoutesProps, ah as InteractionState, ai as InteractionStateProps, aj as InteractionStateSnapshot, ak as InteractionSubmit, al as InteractionSubmitProps, am as InteractionSwitch, an as InteractionSwitchProps, ao as InteractionSwitchRenderState, ap as InteractionSwitchRouteMap, aq as InteractionTrigger, ar as InteractionTriggerProps, as as InteractionUnavailableMessage, at as InteractionValidationMessage, au as Phase, av as PhaseFallback, aw as PhaseRouteMap, ax as PhaseSwitch, ay as PhaseSwitchProps, az as PlayerRoster, aA as PlayerRosterBadge, aB as PlayerRosterBadges, aC as PlayerRosterComponents, aD as PlayerRosterEmpty, aE as PlayerRosterEntry, aF as PlayerRosterList, aG as PlayerRosterListProps, aH as PlayerRosterName, aI as PlayerRosterPartProps, aJ as PlayerRosterRoot, aK as PlayerRosterRootProps, aL as PlayerRosterScore, aM as Prompt, aN as PromptDialog, aO as PromptDialogProps, aP as PromptDialogRenderState, aQ as PromptDialogState, aR as PromptInbox, aS as PromptInboxEmpty, aT as PromptInboxItems, aU as PromptInboxItemsProps, aV as PromptInboxRoot, aW as PromptMessage, aX as PromptOption, aY as PromptOptionProps, aZ as PromptOptionRenderItem, a_ as PromptOptions, a$ as PromptOptionsProps, b0 as PromptRoot, b1 as PromptRootProps, b2 as PromptTitle, b4 as UI, b6 as UIRoot, b7 as UIRootProps, b8 as UseZoneCardsOptions, b9 as UseZoneCardsResult, ba as Zone, bb as ZoneCardAction, bc as ZoneCardActionExtraInputs, bd as ZoneCardActionProps, be as ZoneCardActionResult, bf as ZoneCardAt, bg as ZoneCardAtProps, bi as ZoneItem, bj as ZoneItemProps, bk as ZoneList, bl as ZoneListProps, bm as ZonePileCards, bn as ZonePileCardsProps, bo as ZonePileContextValue, bp as ZonePileCount, bq as ZonePileCountProps, br as ZonePileDescription, bs as ZonePileDescriptionProps, bt as ZonePileLabel, bu as ZonePileLabelProps, bv as ZonePileRoot, bw as ZonePileRootProps, bx as ZonePileTrigger, by as ZonePileTriggerProps, bz as ZoneRoot, bA as ZoneRootProps, bB as ZoneTopCard, bC as ZoneTopCardProps, bD as createZoneCardRenderItem, bE as normalizeDiceState, bF as useBoardPrimitiveContext, bG as useDicePrimitiveContext, bH as useGameActionError, bI as useInteractionPrimitiveContext, bJ as useOptionalZonePrimitiveContext, bK as useResolvedCardTargetValue, bL as useZoneCardContext, bM as useZoneCards, bN as useZonePileContext, bO as useZonePrimitiveContext } from '../ui-contract-
|
|
1
|
+
import { bh as ZoneCardRenderItem } from '../ui-contract-CUC7Lyoc.js';
|
|
2
|
+
export { B as Board, a as BoardEdgeTarget, b as BoardEdgeTargetProps, c as BoardGridInteractionFilter, d as BoardHexGrid, e as BoardHexGridInteractionFilter, f as BoardHexGridInteractions, g as BoardHexGridProps, h as BoardHexView, i as BoardHexViewProps, j as BoardRoot, k as BoardRootProps, l as BoardSpaceTarget, m as BoardSpaceTargetProps, n as BoardSquareGrid, o as BoardSquareGridInteractionFilter, p as BoardSquareGridProps, q as BoardState, r as BoardStateProps, s as BoardTarget, t as BoardTargetExtraInputs, u as BoardTargetProps, v as BoardVertexTarget, w as BoardVertexTargetProps, D as Dice, x as DiceComponents, y as DiceRoot, z as DiceRootProps, A as DiceState, C as DiceValue, E as DiceValues, F as DiceValuesProps, H as Game, I as GameActiveActionState, J as GameChrome, K as GameChromeProps, L as GameChromeState, M as GameMeState, N as GamePendingInputState, O as GamePlayer, P as GamePlayerEntry, Q as GamePlayersState, R as GameRenderState, S as GameRoot, T as GameRootProps, U as GameTurnState, V as GameViewport, W as GameViewportProps, X as Interaction, Y as InteractionCardInput, Z as InteractionCardInputProps, _ as InteractionCardInputRenderState, $ as InteractionDescription, a0 as InteractionDialog, a1 as InteractionDialogProps, a2 as InteractionDialogRenderState, a3 as InteractionDialogState, a4 as InteractionFieldPrimitiveProps, a5 as InteractionFormPrimitive, a6 as InteractionFormPrimitiveProps, a7 as InteractionInput, a8 as InteractionInputProps, a9 as InteractionLabel, aa as InteractionPartProps, ab as InteractionRoot, ac as InteractionRootProps, ad as InteractionRoute, ae as InteractionRoutes, af as InteractionRoutesMap, ag as InteractionRoutesProps, ah as InteractionState, ai as InteractionStateProps, aj as InteractionStateSnapshot, ak as InteractionSubmit, al as InteractionSubmitProps, am as InteractionSwitch, an as InteractionSwitchProps, ao as InteractionSwitchRenderState, ap as InteractionSwitchRouteMap, aq as InteractionTrigger, ar as InteractionTriggerProps, as as InteractionUnavailableMessage, at as InteractionValidationMessage, au as Phase, av as PhaseFallback, aw as PhaseRouteMap, ax as PhaseSwitch, ay as PhaseSwitchProps, az as PlayerRoster, aA as PlayerRosterBadge, aB as PlayerRosterBadges, aC as PlayerRosterComponents, aD as PlayerRosterEmpty, aE as PlayerRosterEntry, aF as PlayerRosterList, aG as PlayerRosterListProps, aH as PlayerRosterName, aI as PlayerRosterPartProps, aJ as PlayerRosterRoot, aK as PlayerRosterRootProps, aL as PlayerRosterScore, aM as Prompt, aN as PromptDialog, aO as PromptDialogProps, aP as PromptDialogRenderState, aQ as PromptDialogState, aR as PromptInbox, aS as PromptInboxEmpty, aT as PromptInboxItems, aU as PromptInboxItemsProps, aV as PromptInboxRoot, aW as PromptMessage, aX as PromptOption, aY as PromptOptionProps, aZ as PromptOptionRenderItem, a_ as PromptOptions, a$ as PromptOptionsProps, b0 as PromptRoot, b1 as PromptRootProps, b2 as PromptTitle, b4 as UI, b6 as UIRoot, b7 as UIRootProps, b8 as UseZoneCardsOptions, b9 as UseZoneCardsResult, ba as Zone, bb as ZoneCardAction, bc as ZoneCardActionExtraInputs, bd as ZoneCardActionProps, be as ZoneCardActionResult, bf as ZoneCardAt, bg as ZoneCardAtProps, bi as ZoneItem, bj as ZoneItemProps, bk as ZoneList, bl as ZoneListProps, bm as ZonePileCards, bn as ZonePileCardsProps, bo as ZonePileContextValue, bp as ZonePileCount, bq as ZonePileCountProps, br as ZonePileDescription, bs as ZonePileDescriptionProps, bt as ZonePileLabel, bu as ZonePileLabelProps, bv as ZonePileRoot, bw as ZonePileRootProps, bx as ZonePileTrigger, by as ZonePileTriggerProps, bz as ZoneRoot, bA as ZoneRootProps, bB as ZoneTopCard, bC as ZoneTopCardProps, bD as createZoneCardRenderItem, bE as normalizeDiceState, bF as useBoardPrimitiveContext, bG as useDicePrimitiveContext, bH as useGameActionError, bI as useInteractionPrimitiveContext, bJ as useOptionalZonePrimitiveContext, bK as useResolvedCardTargetValue, bL as useZoneCardContext, bM as useZoneCards, bN as useZonePileContext, bO as useZonePrimitiveContext } from '../ui-contract-CUC7Lyoc.js';
|
|
3
3
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
4
4
|
import { ReactNode } from 'react';
|
|
5
5
|
import { f as CardIntent, P as InteractionVisualState, C as CardDropTargetVisualState } from '../hex-board-view-aKkblDp6.js';
|
|
@@ -10,7 +10,7 @@ import '../ThemeProvider-CElaL2ik.js';
|
|
|
10
10
|
import '../types.js';
|
|
11
11
|
import '../attributes-DbvyMbXw.js';
|
|
12
12
|
import '../types-DJj5MJkl.js';
|
|
13
|
-
import '../runtime-api-
|
|
13
|
+
import '../runtime-api-xCWLMQRT.js';
|
|
14
14
|
import '../player-state-Cqpyeql0.js';
|
|
15
15
|
|
|
16
16
|
interface InteractionDraftReadiness {
|
|
@@ -84,9 +84,10 @@ import {
|
|
|
84
84
|
useZoneCards,
|
|
85
85
|
useZonePileContext,
|
|
86
86
|
useZonePrimitiveContext
|
|
87
|
-
} from "../chunk-
|
|
87
|
+
} from "../chunk-BUOODBVO.js";
|
|
88
88
|
import "../chunk-T3ZKNUZ7.js";
|
|
89
|
-
import "../chunk-
|
|
89
|
+
import "../chunk-GMOBG7Y7.js";
|
|
90
|
+
import "../chunk-QQNL4WTX.js";
|
|
90
91
|
import "../chunk-UC2UXAC6.js";
|
|
91
92
|
import "../chunk-2TRZSZGD.js";
|
|
92
93
|
import {
|
|
@@ -95,7 +96,6 @@ import {
|
|
|
95
96
|
} from "../chunk-VDXOF4FW.js";
|
|
96
97
|
import "../chunk-WHR5UW3F.js";
|
|
97
98
|
import "../chunk-PF7L4BMG.js";
|
|
98
|
-
import "../chunk-5IHU5CUK.js";
|
|
99
99
|
import "../chunk-PZ5AY32C.js";
|
|
100
100
|
export {
|
|
101
101
|
Board,
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { a as PluginSessionState, R as RuntimeAPI, b as RuntimeDiagnosticEvent, c as RuntimeDiagnosticHandler, S as SubmissionError, V as ValidationResult } from '../runtime-api-
|
|
1
|
+
export { a as PluginSessionState, R as RuntimeAPI, b as RuntimeDiagnosticEvent, c as RuntimeDiagnosticHandler, S as SubmissionError, V as ValidationResult } from '../runtime-api-xCWLMQRT.js';
|
|
2
2
|
export { Z as ZoneHandlesSnapshot } from '../plugin-state-BRH3UiUp.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export { C as ClientParamSchemaMap, D as DefineGameUIConfig, W as WorkspaceBoardSurface, a as WorkspaceBoardSurfaceDescriptor, b as WorkspaceBoardTargetInputSlot, c as WorkspaceCardCollectionSurface, d as WorkspaceCardCollectionSurfaceDescriptor, e as WorkspaceCardInputSlot, f as WorkspaceFormInputSlot, g as WorkspaceHandSurface, h as WorkspaceHandSurfaceDescriptor, i as WorkspaceInteractionFormDescriptor, j as WorkspaceInteractionFormsDescriptor, k as WorkspaceInteractionSlotComponent, l as WorkspacePileSurface, m as WorkspacePileSurfaceDescriptor, n as WorkspacePilesSurfaceDescriptor, o as WorkspaceSurfaceSpec, p as createWorkspaceUIContract } from '../index-
|
|
2
|
-
import { a1 as InteractionDialogProps } from '../ui-contract-
|
|
3
|
-
export { c as BoardGridInteractionFilter, g as BoardHexGridProps, i as BoardHexViewProps, m as BoardSpaceTargetProps, o as BoardSquareGridInteractionFilter, p as BoardSquareGridProps, G as DreamboardUI, M as GameMeState, Q as GamePlayersState, R as GameRenderState, U as GameTurnState, b3 as TypedGame, b5 as UIContract, b7 as UIRootProps, bh as ZoneCardRenderItem, bl as ZoneListProps } from '../ui-contract-
|
|
1
|
+
export { C as ClientParamSchemaMap, D as DefineGameUIConfig, W as WorkspaceBoardSurface, a as WorkspaceBoardSurfaceDescriptor, b as WorkspaceBoardTargetInputSlot, c as WorkspaceCardCollectionSurface, d as WorkspaceCardCollectionSurfaceDescriptor, e as WorkspaceCardInputSlot, f as WorkspaceFormInputSlot, g as WorkspaceHandSurface, h as WorkspaceHandSurfaceDescriptor, i as WorkspaceInteractionFormDescriptor, j as WorkspaceInteractionFormsDescriptor, k as WorkspaceInteractionSlotComponent, l as WorkspacePileSurface, m as WorkspacePileSurfaceDescriptor, n as WorkspacePilesSurfaceDescriptor, o as WorkspaceSurfaceSpec, p as createWorkspaceUIContract } from '../index-CWzWpQzM.js';
|
|
2
|
+
import { a1 as InteractionDialogProps } from '../ui-contract-CUC7Lyoc.js';
|
|
3
|
+
export { c as BoardGridInteractionFilter, g as BoardHexGridProps, i as BoardHexViewProps, m as BoardSpaceTargetProps, o as BoardSquareGridInteractionFilter, p as BoardSquareGridProps, G as DreamboardUI, M as GameMeState, Q as GamePlayersState, R as GameRenderState, U as GameTurnState, b3 as TypedGame, b5 as UIContract, b7 as UIRootProps, bh as ZoneCardRenderItem, bl as ZoneListProps } from '../ui-contract-CUC7Lyoc.js';
|
|
4
4
|
export { b as ResourceCounterComponents } from '../ResourceCounter-BFxJknqp.js';
|
|
5
5
|
import { ReactNode } from 'react';
|
|
6
6
|
import '../hex-board-view-aKkblDp6.js';
|
|
@@ -12,7 +12,7 @@ import '../plugin-state-BRH3UiUp.js';
|
|
|
12
12
|
import '../primitive-props-BNHDkgd7.js';
|
|
13
13
|
import '../attributes-DbvyMbXw.js';
|
|
14
14
|
import '../types-DJj5MJkl.js';
|
|
15
|
-
import '../runtime-api-
|
|
15
|
+
import '../runtime-api-xCWLMQRT.js';
|
|
16
16
|
|
|
17
17
|
interface WorkspaceInteractionFormDialogProps extends Omit<InteractionDialogProps, "children"> {
|
|
18
18
|
title: ReactNode;
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createWorkspaceUIContract
|
|
3
|
-
} from "../chunk-
|
|
4
|
-
import "../chunk-
|
|
3
|
+
} from "../chunk-JRGP6W4V.js";
|
|
4
|
+
import "../chunk-BUOODBVO.js";
|
|
5
5
|
import "../chunk-T3ZKNUZ7.js";
|
|
6
|
-
import "../chunk-
|
|
6
|
+
import "../chunk-GMOBG7Y7.js";
|
|
7
|
+
import "../chunk-QQNL4WTX.js";
|
|
7
8
|
import "../chunk-UC2UXAC6.js";
|
|
8
9
|
import "../chunk-2TRZSZGD.js";
|
|
9
10
|
import "../chunk-VDXOF4FW.js";
|
|
10
11
|
import "../chunk-WHR5UW3F.js";
|
|
11
12
|
import "../chunk-PF7L4BMG.js";
|
|
12
|
-
import "../chunk-5IHU5CUK.js";
|
|
13
13
|
import "../chunk-PZ5AY32C.js";
|
|
14
14
|
export {
|
|
15
15
|
createWorkspaceUIContract
|
|
@@ -408,6 +408,7 @@ declare const FrameworkErrorCodes: {
|
|
|
408
408
|
readonly NOT_YOUR_TURN: "NOT_YOUR_TURN";
|
|
409
409
|
readonly WRONG_PHASE: "WRONG_PHASE";
|
|
410
410
|
readonly WRONG_STEP: "WRONG_STEP";
|
|
411
|
+
readonly NO_LEGAL_INPUT: "NO_LEGAL_INPUT";
|
|
411
412
|
readonly INVALID_PARAMS: "INVALID_PARAMS";
|
|
412
413
|
readonly UNKNOWN_INTERACTION: "UNKNOWN_INTERACTION";
|
|
413
414
|
readonly INTERNAL_ERROR: "INTERNAL_ERROR";
|
|
@@ -1107,8 +1108,9 @@ type TableQueriesOfState<State extends {
|
|
|
1107
1108
|
}> = TableQueries<TableOfState<State>>;
|
|
1108
1109
|
|
|
1109
1110
|
declare const manifestIdSchemaBrand: unique symbol;
|
|
1110
|
-
type
|
|
1111
|
-
|
|
1111
|
+
type ManifestIdFamily = keyof ManifestIds<string, string, string, string, string>;
|
|
1112
|
+
type ManifestIdSchema<Output = unknown, Family extends ManifestIdFamily | undefined = ManifestIdFamily | undefined> = z.ZodType<Output> & {
|
|
1113
|
+
readonly [manifestIdSchemaBrand]: Family;
|
|
1112
1114
|
};
|
|
1113
1115
|
type ManifestLiterals<PlayerId extends string, DeckId extends string, HandId extends string, CardId extends string, PhaseName extends string = string> = {
|
|
1114
1116
|
playerIds: readonly PlayerId[];
|
|
@@ -1193,6 +1195,13 @@ type ManifestDefaults<Table extends RuntimeTableRecord> = {
|
|
|
1193
1195
|
visibility: (playerIds?: readonly string[]) => Table["visibility"];
|
|
1194
1196
|
resources: (playerIds?: readonly string[]) => Table["resources"];
|
|
1195
1197
|
};
|
|
1198
|
+
type ManifestNormalSetup<Table extends RuntimeTableRecord> = {
|
|
1199
|
+
readonly minPlayers: number;
|
|
1200
|
+
readonly maxPlayers: number;
|
|
1201
|
+
readonly createInitialTable: (options: {
|
|
1202
|
+
readonly playerIds: readonly string[];
|
|
1203
|
+
}) => Table;
|
|
1204
|
+
};
|
|
1196
1205
|
type StaticBoards<Table extends RuntimeTableRecord> = Pick<Table["boards"], "byId" | "hex" | "square">;
|
|
1197
1206
|
type StaticBoardsJsonEnvelope<Table extends RuntimeTableRecord = RuntimeTableRecord> = {
|
|
1198
1207
|
formatVersion: 1;
|
|
@@ -1229,6 +1238,14 @@ type ReducerManifestContract<Table extends RuntimeTableRecord, PhaseName extends
|
|
|
1229
1238
|
literals: ManifestLiterals<PlayerId, DeckId, HandId, CardId, PhaseName>;
|
|
1230
1239
|
ids: ManifestIds<PlayerId, DeckId, HandId, CardId, PhaseName>;
|
|
1231
1240
|
defaults: ManifestDefaults<Table>;
|
|
1241
|
+
/**
|
|
1242
|
+
* Generic normal-session setup capability emitted by workspace codegen.
|
|
1243
|
+
*
|
|
1244
|
+
* This remains optional on the structural contract so small handwritten
|
|
1245
|
+
* manifests can model focused reducer tests without recreating generated
|
|
1246
|
+
* topology metadata. Generated workspace manifests always provide it.
|
|
1247
|
+
*/
|
|
1248
|
+
normalSetup?: ManifestNormalSetup<Table>;
|
|
1232
1249
|
staticBoards?: StaticBoards<Table>;
|
|
1233
1250
|
setupOptionsById: Record<string, SetupOptionMetadata>;
|
|
1234
1251
|
setupChoiceIdsByOptionId: Record<string, readonly string[]>;
|
|
@@ -1245,9 +1262,11 @@ type ReducerManifestContract<Table extends RuntimeTableRecord, PhaseName extends
|
|
|
1245
1262
|
};
|
|
1246
1263
|
type GeneratedManifestContractLike<Table extends RuntimeTableRecord = RuntimeTableRecord, PhaseName extends string = string, PlayerId extends string = string, DeckId extends string = string, HandId extends string = string, CardId extends string = string> = ReducerManifestContract<Table, PhaseName, PlayerId, DeckId, HandId, CardId>;
|
|
1247
1264
|
type ManifestContract<Table extends RuntimeTableRecord> = ReducerManifestContract<Table, string, PlayerIdOfTable<Table>, DeckIdOfTable<Table>, HandIdOfTable<Table>, CardIdOfTable<Table>>;
|
|
1248
|
-
declare function markManifestScopedSchema<Schema extends z.ZodTypeAny>(schema: Schema): Schema & ManifestIdSchema<z.infer<Schema
|
|
1265
|
+
declare function markManifestScopedSchema<Schema extends z.ZodTypeAny, const Family extends ManifestIdFamily | undefined = undefined>(schema: Schema, family?: Family): Schema & ManifestIdSchema<z.infer<Schema>, Family>;
|
|
1249
1266
|
declare function isManifestScopedSchema(schema: unknown): boolean;
|
|
1250
|
-
declare function
|
|
1267
|
+
declare function manifestSchemaFamily(schema: unknown): ManifestIdFamily | undefined;
|
|
1268
|
+
declare function createManifestStringLiteralSchema<Values extends readonly string[], const Family extends ManifestIdFamily | undefined = undefined>(values: Values, family?: Family): ManifestIdSchema<Values[number] extends never ? string : Values[number], Family>;
|
|
1269
|
+
declare function assumeManifestSchema<Output, Family extends ManifestIdFamily | undefined>(schema: ManifestIdSchema<unknown, Family>): ManifestIdSchema<Output, Family>;
|
|
1251
1270
|
declare function assumeManifestSchema<Output>(schema: z.ZodTypeAny): z.ZodType<Output>;
|
|
1252
1271
|
declare function cloneManifestDefault<Value>(value: Value): Value;
|
|
1253
1272
|
declare function resolveManifestPlayerIds<PlayerId extends string>(manifestPlayerIds: readonly PlayerId[], playerIds: readonly string[] | undefined): readonly PlayerId[];
|
|
@@ -1275,6 +1294,15 @@ declare function createManifestRuntimeSchema<PhaseNameSchema extends z.ZodTypeAn
|
|
|
1275
1294
|
seed: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
1276
1295
|
cursor: z.ZodDefault<z.ZodNumber>;
|
|
1277
1296
|
trace: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
1297
|
+
draws: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
1298
|
+
index: z.ZodNumber;
|
|
1299
|
+
cursorBefore: z.ZodNumber;
|
|
1300
|
+
cursorAfter: z.ZodNumber;
|
|
1301
|
+
operation: z.ZodObject<{
|
|
1302
|
+
kind: z.ZodString;
|
|
1303
|
+
parameters: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
|
|
1304
|
+
}, z.core.$strict>;
|
|
1305
|
+
}, z.core.$strict>>>;
|
|
1278
1306
|
}, z.core.$strip>>;
|
|
1279
1307
|
setup: z.ZodDefault<z.ZodNullable<z.ZodObject<{
|
|
1280
1308
|
profileId: z.ZodType<SetupProfileId, unknown, z.core.$ZodTypeInternals<SetupProfileId, unknown>>;
|
|
@@ -1337,6 +1365,15 @@ declare function createManifestGameStateSchema<Table extends RuntimeTableRecord,
|
|
|
1337
1365
|
seed: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
1338
1366
|
cursor: z.ZodDefault<z.ZodNumber>;
|
|
1339
1367
|
trace: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
1368
|
+
draws: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
1369
|
+
index: z.ZodNumber;
|
|
1370
|
+
cursorBefore: z.ZodNumber;
|
|
1371
|
+
cursorAfter: z.ZodNumber;
|
|
1372
|
+
operation: z.ZodObject<{
|
|
1373
|
+
kind: z.ZodString;
|
|
1374
|
+
parameters: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
|
|
1375
|
+
}, z.core.$strict>;
|
|
1376
|
+
}, z.core.$strict>>>;
|
|
1340
1377
|
}, z.core.$strip>>;
|
|
1341
1378
|
setup: z.ZodDefault<z.ZodNullable<z.ZodObject<{
|
|
1342
1379
|
profileId: z.ZodType<SetupProfileId, unknown, z.core.$ZodTypeInternals<SetupProfileId, unknown>>;
|
|
@@ -1492,6 +1529,24 @@ type RuntimeRngState = {
|
|
|
1492
1529
|
seed?: number | null;
|
|
1493
1530
|
cursor: number;
|
|
1494
1531
|
trace: string[];
|
|
1532
|
+
draws: RuntimeRngDraw[];
|
|
1533
|
+
};
|
|
1534
|
+
type RuntimeRngOperationParameter = string | number | boolean;
|
|
1535
|
+
type RuntimeRngOperation = {
|
|
1536
|
+
kind: string;
|
|
1537
|
+
parameters: Record<string, RuntimeRngOperationParameter>;
|
|
1538
|
+
};
|
|
1539
|
+
/**
|
|
1540
|
+
* Public, persisted identity for one deterministic RNG cursor advance.
|
|
1541
|
+
*
|
|
1542
|
+
* Sampled values deliberately remain absent. Their consequences are exposed
|
|
1543
|
+
* only through the normal public/player projections.
|
|
1544
|
+
*/
|
|
1545
|
+
type RuntimeRngDraw = {
|
|
1546
|
+
index: number;
|
|
1547
|
+
cursorBefore: number;
|
|
1548
|
+
cursorAfter: number;
|
|
1549
|
+
operation: RuntimeRngOperation;
|
|
1495
1550
|
};
|
|
1496
1551
|
type RuntimeSimultaneousSubmission = {
|
|
1497
1552
|
interactionId: string;
|
|
@@ -1667,4 +1722,4 @@ type ReducerAccept<State> = {
|
|
|
1667
1722
|
};
|
|
1668
1723
|
type ReducerResult<State> = ReducerAccept<State> | ReducerReject;
|
|
1669
1724
|
|
|
1670
|
-
export { type HexEdgeIdOfTable as $, type AnyContinuationToken as A, type BoardBaseIdOfManifest as B, type CardIdOfDeck as C, type ContinuationResponseOf as D, type ContinuationToken as E, type DeckCardsOfTable as F, type DeckIdOfState as G, type DeckIdOfTable as H, type DieIdOfManifest as I, type EdgeTypeIdOfManifest as J, type EffectInvokeOptions as K, type EffectSpecLike as L, type EffectTypeTag as M, type ErrorCodeOfContract as N, type ExactManifestContractOf as O, type FlowState as P, type FrameworkErrorCode as Q, FrameworkErrorCodes as R, type GameEvent as S, type GameEventDetail as T, type GameOutcome as U, type GeneratedManifestContractLike as V, type HandCardsOfTable as W, type HandIdOfState as X, type HandIdOfTable as Y, type HexBoardIdOfTable as Z, type HexBoardStateOfTable as _, type AnySchema as a, type
|
|
1725
|
+
export { type HexEdgeIdOfTable as $, type AnyContinuationToken as A, type BoardBaseIdOfManifest as B, type CardIdOfDeck as C, type ContinuationResponseOf as D, type ContinuationToken as E, type DeckCardsOfTable as F, type DeckIdOfState as G, type DeckIdOfTable as H, type DieIdOfManifest as I, type EdgeTypeIdOfManifest as J, type EffectInvokeOptions as K, type EffectSpecLike as L, type EffectTypeTag as M, type ErrorCodeOfContract as N, type ExactManifestContractOf as O, type FlowState as P, type FrameworkErrorCode as Q, FrameworkErrorCodes as R, type GameEvent as S, type GameEventDetail as T, type GameOutcome as U, type GeneratedManifestContractLike as V, type HandCardsOfTable as W, type HandIdOfState as X, type HandIdOfTable as Y, type HexBoardIdOfTable as Z, type HexBoardStateOfTable as _, type AnySchema as a, type ResolvedContainerLocation as a$, type HexEdgeStateOfTable as a0, type HexEdgeTypeIdOfTable as a1, type HexSpaceIdOfTable as a2, type HexSpaceTypeIdOfTable as a3, type HexVertexIdOfTable as a4, type HexVertexStateOfTable as a5, type HexVertexTypeIdOfTable as a6, type HiddenSchemaOfContract as a7, type HiddenStateOfState as a8, type InitContext as a9, type PhaseStateMapOfContract as aA, type PhaseStateOfState as aB, type PhaseStepOfState as aC, type PieceIdOfManifest as aD, type PlayerId as aE, type PlayerIdOfManifest as aF, type PlayerIdOfState as aG, type PlayerIdOfTable as aH, type PlayerZoneIdOfManifest as aI, type PlayerZoneIdOfState as aJ, type PlayerZoneIdOfTable as aK, type PrivateSchemaOfContract as aL, type PrivateStateOfState as aM, type PublicSchemaOfContract as aN, type PublicStateOfState as aO, type ReducerAccept as aP, type ReducerAcceptOptions as aQ, type ReducerFx as aR, type ReducerGameState as aS, type ReducerManifestContract as aT, type ReducerReject as aU, type ReducerResult as aV, type ReducerRuntimeStateForState as aW, type ReducerSessionState as aX, type ReducerValidationResult as aY, type RelationTypeIdOfManifest as aZ, type RelationTypeIdOfTable as a_, type InitSetupSelectionInput as aa, type ManifestContract as ab, type ManifestContractOf as ac, type ManifestDefaults as ad, type ManifestIdFamily as ae, type ManifestIdSchema as af, type ManifestIds as ag, type ManifestLiterals as ah, type ManifestNormalSetup as ai, type ManifestOf as aj, type NonEmptyReadonlyArray as ak, type OutcomeResult as al, type OutcomeScoreComponent as am, type OutcomeStanding as an, type OutcomeTieBreak as ao, type PerPlayer as ap, type PerPlayerBoardRef as aq, type PerPlayerSchemaOptions as ar, type PhaseAccessor as as, type PhaseMapOfState as at, type PhaseNameOf as au, type PhaseNameOfContract as av, type PhaseNameOfManifest as aw, type PhaseNameOfState as ax, type PhasePayload as ay, type PhaseSchemasOfContract as az, type BoardContainerIdOfManifest as b, type RuntimeVisibilityMap as b$, type ResolvedDeckLocation as b0, type ResolvedEdgeLocation as b1, type ResolvedHandLocation as b2, type ResolvedSlotLocation as b3, type ResolvedSpaceLocation as b4, type ResolvedVertexLocation as b5, type ResolvedZoneLocation as b6, type ResourceAmountsOfTable as b7, type ResourceBalancesOfState as b8, type ResourceBalancesOfTable as b9, type RuntimePayload as bA, type RuntimePhaseState as bB, type RuntimePieceData as bC, type RuntimeRecord as bD, type RuntimeResourceMap as bE, type RuntimeRngDraw as bF, type RuntimeRngOperation as bG, type RuntimeRngOperationParameter as bH, type RuntimeRngState as bI, type RuntimeScalar as bJ, type RuntimeSetupSelection as bK, type RuntimeSetupSelectionInput as bL, type RuntimeSetupSelectionOverride as bM, type RuntimeSimultaneousState as bN, type RuntimeSimultaneousSubmission as bO, type RuntimeSlotHostRef as bP, type RuntimeSquareBoardState as bQ, type RuntimeSquareEdgeState as bR, type RuntimeSquareSpaceState as bS, type RuntimeSquareVertexState as bT, type RuntimeState as bU, type RuntimeTableRecord as bV, type RuntimeTiledBoardBaseState as bW, type RuntimeTiledBoardState as bX, type RuntimeTiledEdgeState as bY, type RuntimeTiledSpaceState as bZ, type RuntimeTiledVertexState as b_, type ResourceIdOfManifest as ba, type ResourceIdOfState as bb, type ResourceIdOfTable as bc, type RuntimeBoardBaseState as bd, type RuntimeBoardCollections as be, type RuntimeBoardCompatibilityState as bf, type RuntimeBoardContainerState as bg, type RuntimeBoardRelationState as bh, type RuntimeBoardSpaceState as bi, type RuntimeBoardState as bj, type RuntimeCardData as bk, type RuntimeCardVisibility as bl, type RuntimeComponentLocation as bm, type RuntimeComponentLocationMap as bn, type RuntimeDeckMap as bo, type RuntimeDieData as bp, type RuntimeGenericBoardState as bq, type RuntimeHandMap as br, type RuntimeHandVisibilityMode as bs, type RuntimeHexBoardState as bt, type RuntimeHexEdgeState as bu, type RuntimeHexOrientation as bv, type RuntimeHexSpaceState as bw, type RuntimeHexVertexState as bx, type RuntimeOwnerMap as by, type RuntimeParams as bz, type BoardContainerIdOfTable as c, boardRef as c$, type RuntimeZoneMap as c0, type SchemaLike as c1, type SetupBootstrapContainerRef as c2, type SetupBootstrapDestinationRef as c3, type SetupBootstrapPerPlayerBoardContainerRef as c4, type SetupBootstrapPerPlayerBoardSpaceRef as c5, type SetupBootstrapPerPlayerContainerTemplateRef as c6, type SetupBootstrapPerPlayerZoneRef as c7, type SetupBootstrapSharedBoardContainerRef as c8, type SetupBootstrapSharedBoardSpaceRef as c9, type SquareVertexStateOfTable as cA, type SquareVertexTypeIdOfTable as cB, type StateDefinition as cC, type StateDefinitionOfContract as cD, type StaticBoards as cE, type StaticBoardsJsonEnvelope as cF, type StringKeyOf as cG, type SystemActionEvent as cH, type TableOfManifest as cI, type TableOfState as cJ, type TableQueries as cK, type TableQueriesOfState as cL, type TiledBoardIdOfTable as cM, type TiledBoardStateOfTable as cN, type TiledEdgeIdOfTable as cO, type TiledEdgeMap as cP, type TiledEdgeStateOfTable as cQ, type TiledEdgeTypeIdOfTable as cR, type TiledSpaceIdOfTable as cS, type TiledSpaceMap as cT, type TiledVertexIdOfTable as cU, type TiledVertexMap as cV, type TiledVertexStateOfTable as cW, type TiledVertexTypeIdOfTable as cX, type VertexTypeIdOfManifest as cY, asPlayerId as cZ, assumeManifestSchema as c_, type SetupBootstrapSharedZoneRef as ca, type SetupBootstrapStep as cb, type SetupOptionChoiceMetadata as cc, type SetupOptionIdOfManifest as cd, type SetupOptionMetadata as ce, type SetupProfileDefinition as cf, type SetupProfileIdOfManifest as cg, type SetupProfileMetadata as ch, type SetupSelectionInputOfManifest as ci, type SetupSelectionOfManifest as cj, type SharedBoardRef as ck, type SharedZoneIdOfManifest as cl, type SharedZoneIdOfState as cm, type SharedZoneIdOfTable as cn, type SpaceIdOfManifest as co, type SpaceIdOfTable as cp, type SpaceTypeIdOfManifest as cq, type SpaceTypeIdOfTable as cr, type SquareBoardIdOfTable as cs, type SquareBoardStateOfTable as ct, type SquareEdgeIdOfTable as cu, type SquareEdgeStateOfTable as cv, type SquareEdgeTypeIdOfTable as cw, type SquareSpaceIdOfTable as cx, type SquareSpaceTypeIdOfTable as cy, type SquareVertexIdOfTable as cz, type BoardIdOfManifest as d, boardRefKey as d0, boardRefSchema as d1, cloneManifestDefault as d2, createManifestGameStateSchema as d3, createManifestRuntimeSchema as d4, createManifestStringLiteralSchema as d5, isManifestScopedSchema as d6, isPerPlayer as d7, isPerPlayerBoardRef as d8, isPlayerId as d9, isSharedBoardRef as da, manifestSchemaFamily as db, markManifestScopedSchema as dc, parseBoardRefKey as dd, perPlayer as de, perPlayerBoardRef as df, perPlayerEntries as dg, perPlayerGet as dh, perPlayerHas as di, perPlayerKeys as dj, perPlayerMap as dk, perPlayerRequire as dl, perPlayerSchema as dm, perPlayerSet as dn, perPlayerSize as dp, perPlayerValues as dq, resolveManifestPlayerIds as dr, sharedBoardRef as ds, type BoardIdOfTable as e, type BoardLayoutOfManifest as f, type BoardMapOfTable as g, type BoardRef as h, type BoardStateOfTable as i, type BoardTypeIdOfManifest as j, type BoardTypeIdOfTable as k, type Brand as l, type CardIdOfHand as m, type CardIdOfManifest as n, type CardIdOfState as o, type CardIdOfTable as p, type CardTypeOfState as q, type CardTypeOfTable as r, type ChoiceOption as s, type CompatibleCardIdForHandAndDeck as t, type CompatibleCardIdForTwoPlayerZones as u, type CompatibleHandIdForDeck as v, type ComponentDataOfTable as w, type ComponentIdOfTable as x, type ComponentLocationByTypeOfTable as y, type ComponentLocationOfTable as z };
|
package/dist/runtime.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { b5 as UIContract$1, G as DreamboardUI$1, b3 as TypedGame$1 } from './ui-contract-
|
|
2
|
-
export { c as BoardGridInteractionFilter, g as BoardHexGridProps, i as BoardHexViewProps, m as BoardSpaceTargetProps, o as BoardSquareGridInteractionFilter, p as BoardSquareGridProps, M as GameMeState, Q as GamePlayersState, R as GameRenderState, U as GameTurnState, b7 as UIRootProps, bh as ZoneCardRenderItem, bl as ZoneListProps } from './ui-contract-
|
|
3
|
-
export { C as ClientParamSchemaMap, W as WorkspaceBoardSurface, a as WorkspaceBoardSurfaceDescriptor, b as WorkspaceBoardTargetInputSlot, c as WorkspaceCardCollectionSurface, d as WorkspaceCardCollectionSurfaceDescriptor, e as WorkspaceCardInputSlot, f as WorkspaceFormInputSlot, g as WorkspaceHandSurface, h as WorkspaceHandSurfaceDescriptor, i as WorkspaceInteractionFormDescriptor, j as WorkspaceInteractionFormsDescriptor, k as WorkspaceInteractionSlotComponent, l as WorkspacePileSurface, m as WorkspacePileSurfaceDescriptor, n as WorkspacePilesSurfaceDescriptor, o as WorkspaceSurfaceSpec, p as createWorkspaceUIContract } from './index-
|
|
1
|
+
import { b5 as UIContract$1, G as DreamboardUI$1, b3 as TypedGame$1 } from './ui-contract-CUC7Lyoc.js';
|
|
2
|
+
export { c as BoardGridInteractionFilter, g as BoardHexGridProps, i as BoardHexViewProps, m as BoardSpaceTargetProps, o as BoardSquareGridInteractionFilter, p as BoardSquareGridProps, M as GameMeState, Q as GamePlayersState, R as GameRenderState, U as GameTurnState, b7 as UIRootProps, bh as ZoneCardRenderItem, bl as ZoneListProps } from './ui-contract-CUC7Lyoc.js';
|
|
3
|
+
export { C as ClientParamSchemaMap, W as WorkspaceBoardSurface, a as WorkspaceBoardSurfaceDescriptor, b as WorkspaceBoardTargetInputSlot, c as WorkspaceCardCollectionSurface, d as WorkspaceCardCollectionSurfaceDescriptor, e as WorkspaceCardInputSlot, f as WorkspaceFormInputSlot, g as WorkspaceHandSurface, h as WorkspaceHandSurfaceDescriptor, i as WorkspaceInteractionFormDescriptor, j as WorkspaceInteractionFormsDescriptor, k as WorkspaceInteractionSlotComponent, l as WorkspacePileSurface, m as WorkspacePileSurfaceDescriptor, n as WorkspacePilesSurfaceDescriptor, o as WorkspaceSurfaceSpec, p as createWorkspaceUIContract } from './index-CWzWpQzM.js';
|
|
4
4
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
5
5
|
import react__default from 'react';
|
|
6
|
-
import { c as RuntimeDiagnosticHandler } from './runtime-api-
|
|
7
|
-
import { P as PluginRuntimeClient, a as PluginRuntimeClientOptions, b as PluginTransport } from './types-
|
|
8
|
-
export { R as RuntimeClock, c as RuntimeIdFactory } from './types-
|
|
6
|
+
import { c as RuntimeDiagnosticHandler } from './runtime-api-xCWLMQRT.js';
|
|
7
|
+
import { P as PluginRuntimeClient, a as PluginRuntimeClientOptions, b as PluginTransport } from './types-_zfC_7CD.js';
|
|
8
|
+
export { R as RuntimeClock, c as RuntimeIdFactory } from './types-_zfC_7CD.js';
|
|
9
9
|
export { G as GameEvent, a as GameEventDetail, b as InteractionDescriptor, P as ProjectedGameEvent, S as SystemActionEvent } from './plugin-state-BRH3UiUp.js';
|
|
10
10
|
export { b as ResourceCounterComponents } from './ResourceCounter-BFxJknqp.js';
|
|
11
11
|
import './hex-board-view-aKkblDp6.js';
|
|
@@ -15,7 +15,7 @@ import './ThemeProvider-CElaL2ik.js';
|
|
|
15
15
|
import './primitive-props-BNHDkgd7.js';
|
|
16
16
|
import './attributes-DbvyMbXw.js';
|
|
17
17
|
import './types-DJj5MJkl.js';
|
|
18
|
-
import './protocol-
|
|
18
|
+
import './protocol-B2LWcqB4.js';
|
|
19
19
|
|
|
20
20
|
interface PluginRuntimeProps {
|
|
21
21
|
/** Child components to render after gameplay frame has started */
|
package/dist/runtime.js
CHANGED
|
@@ -1,13 +1,18 @@
|
|
|
1
|
+
import {
|
|
2
|
+
createWorkspaceUIContract
|
|
3
|
+
} from "./chunk-JRGP6W4V.js";
|
|
4
|
+
import "./chunk-BUOODBVO.js";
|
|
5
|
+
import "./chunk-T3ZKNUZ7.js";
|
|
1
6
|
import {
|
|
2
7
|
PluginRuntimeBoundary,
|
|
3
8
|
createPluginRuntimeClient
|
|
4
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-NGYFBNBP.js";
|
|
10
|
+
import "./chunk-GMOBG7Y7.js";
|
|
5
11
|
import {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
import "./chunk-VLG4YST5.js";
|
|
12
|
+
DREAMBOARD_PLUGIN_PROTOCOL,
|
|
13
|
+
DREAMBOARD_PLUGIN_PROTOCOL_VERSION,
|
|
14
|
+
HostToPluginEnvelopeSchema
|
|
15
|
+
} from "./chunk-QQNL4WTX.js";
|
|
11
16
|
import "./chunk-UC2UXAC6.js";
|
|
12
17
|
import {
|
|
13
18
|
GameSkeleton
|
|
@@ -16,14 +21,9 @@ import "./chunk-VDXOF4FW.js";
|
|
|
16
21
|
import "./chunk-WHR5UW3F.js";
|
|
17
22
|
import {
|
|
18
23
|
DREAMBOARD_SDK_VERSION
|
|
19
|
-
} from "./chunk-
|
|
20
|
-
import "./chunk-
|
|
24
|
+
} from "./chunk-WDR7SKBM.js";
|
|
25
|
+
import "./chunk-SFOAY5H4.js";
|
|
21
26
|
import "./chunk-PF7L4BMG.js";
|
|
22
|
-
import {
|
|
23
|
-
DREAMBOARD_PLUGIN_PROTOCOL,
|
|
24
|
-
DREAMBOARD_PLUGIN_PROTOCOL_VERSION,
|
|
25
|
-
HostToPluginEnvelopeSchema
|
|
26
|
-
} from "./chunk-5IHU5CUK.js";
|
|
27
27
|
import "./chunk-PZ5AY32C.js";
|
|
28
28
|
|
|
29
29
|
// src/runtime/hooks/usePluginRuntime.ts
|
|
@@ -0,0 +1,220 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
|
|
3
|
+
declare const REFERENCE_GAME_SOURCE_MANIFEST_SCHEMA_VERSION = 3;
|
|
4
|
+
declare const REFERENCE_GAME_MANIFEST_SCHEMA_VERSION = 3;
|
|
5
|
+
declare const referenceGameSha256DigestSchema: z.ZodString;
|
|
6
|
+
declare const referenceGameSourceObjectSchema: z.ZodObject<{
|
|
7
|
+
path: z.ZodString;
|
|
8
|
+
sha256: z.ZodString;
|
|
9
|
+
byteLength: z.ZodNumber;
|
|
10
|
+
}, z.core.$strict>;
|
|
11
|
+
declare const referenceGameSourceEntrySchema: z.ZodObject<{
|
|
12
|
+
id: z.ZodString;
|
|
13
|
+
root: z.ZodString;
|
|
14
|
+
sourceSha256: z.ZodString;
|
|
15
|
+
packageJsonSha256: z.ZodString;
|
|
16
|
+
lockfileSha256: z.ZodString;
|
|
17
|
+
sdkSpecifier: z.ZodString;
|
|
18
|
+
manifest: z.ZodString;
|
|
19
|
+
reducer: z.ZodString;
|
|
20
|
+
ui: z.ZodString;
|
|
21
|
+
behaviorScenarios: z.ZodArray<z.ZodString>;
|
|
22
|
+
uiScenarios: z.ZodArray<z.ZodString>;
|
|
23
|
+
mechanics: z.ZodArray<z.ZodString>;
|
|
24
|
+
readFirst: z.ZodArray<z.ZodString>;
|
|
25
|
+
}, z.core.$strict>;
|
|
26
|
+
declare const referenceGameSourceInventoryPolicySchema: z.ZodObject<{
|
|
27
|
+
schemaVersion: z.ZodLiteral<1>;
|
|
28
|
+
workspaceOwnershipVersion: z.ZodNumber;
|
|
29
|
+
excludedGameRelativePaths: z.ZodArray<z.ZodString>;
|
|
30
|
+
excludedGameRelativePrefixes: z.ZodArray<z.ZodString>;
|
|
31
|
+
}, z.core.$strict>;
|
|
32
|
+
declare const referenceGameSourceManifestPayloadSchema: z.ZodObject<{
|
|
33
|
+
inventoryPolicy: z.ZodObject<{
|
|
34
|
+
schemaVersion: z.ZodLiteral<1>;
|
|
35
|
+
workspaceOwnershipVersion: z.ZodNumber;
|
|
36
|
+
excludedGameRelativePaths: z.ZodArray<z.ZodString>;
|
|
37
|
+
excludedGameRelativePrefixes: z.ZodArray<z.ZodString>;
|
|
38
|
+
}, z.core.$strict>;
|
|
39
|
+
games: z.ZodArray<z.ZodObject<{
|
|
40
|
+
id: z.ZodString;
|
|
41
|
+
root: z.ZodString;
|
|
42
|
+
sourceSha256: z.ZodString;
|
|
43
|
+
packageJsonSha256: z.ZodString;
|
|
44
|
+
lockfileSha256: z.ZodString;
|
|
45
|
+
sdkSpecifier: z.ZodString;
|
|
46
|
+
manifest: z.ZodString;
|
|
47
|
+
reducer: z.ZodString;
|
|
48
|
+
ui: z.ZodString;
|
|
49
|
+
behaviorScenarios: z.ZodArray<z.ZodString>;
|
|
50
|
+
uiScenarios: z.ZodArray<z.ZodString>;
|
|
51
|
+
mechanics: z.ZodArray<z.ZodString>;
|
|
52
|
+
readFirst: z.ZodArray<z.ZodString>;
|
|
53
|
+
}, z.core.$strict>>;
|
|
54
|
+
objects: z.ZodArray<z.ZodObject<{
|
|
55
|
+
path: z.ZodString;
|
|
56
|
+
sha256: z.ZodString;
|
|
57
|
+
byteLength: z.ZodNumber;
|
|
58
|
+
}, z.core.$strict>>;
|
|
59
|
+
}, z.core.$strict>;
|
|
60
|
+
declare const referenceGameSourceProvenanceSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
61
|
+
kind: z.ZodLiteral<"worktree">;
|
|
62
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
63
|
+
kind: z.ZodLiteral<"git">;
|
|
64
|
+
repository: z.ZodLiteral<"dreamboard-games/dreamboard-sdk">;
|
|
65
|
+
revision: z.ZodString;
|
|
66
|
+
}, z.core.$strict>], "kind">;
|
|
67
|
+
declare const referenceGameSourceManifestSchema: z.ZodObject<{
|
|
68
|
+
schemaVersion: z.ZodLiteral<3>;
|
|
69
|
+
manifestType: z.ZodLiteral<"dreamboard.reference-game-source">;
|
|
70
|
+
sourceFingerprint: z.ZodString;
|
|
71
|
+
payload: z.ZodObject<{
|
|
72
|
+
inventoryPolicy: z.ZodObject<{
|
|
73
|
+
schemaVersion: z.ZodLiteral<1>;
|
|
74
|
+
workspaceOwnershipVersion: z.ZodNumber;
|
|
75
|
+
excludedGameRelativePaths: z.ZodArray<z.ZodString>;
|
|
76
|
+
excludedGameRelativePrefixes: z.ZodArray<z.ZodString>;
|
|
77
|
+
}, z.core.$strict>;
|
|
78
|
+
games: z.ZodArray<z.ZodObject<{
|
|
79
|
+
id: z.ZodString;
|
|
80
|
+
root: z.ZodString;
|
|
81
|
+
sourceSha256: z.ZodString;
|
|
82
|
+
packageJsonSha256: z.ZodString;
|
|
83
|
+
lockfileSha256: z.ZodString;
|
|
84
|
+
sdkSpecifier: z.ZodString;
|
|
85
|
+
manifest: z.ZodString;
|
|
86
|
+
reducer: z.ZodString;
|
|
87
|
+
ui: z.ZodString;
|
|
88
|
+
behaviorScenarios: z.ZodArray<z.ZodString>;
|
|
89
|
+
uiScenarios: z.ZodArray<z.ZodString>;
|
|
90
|
+
mechanics: z.ZodArray<z.ZodString>;
|
|
91
|
+
readFirst: z.ZodArray<z.ZodString>;
|
|
92
|
+
}, z.core.$strict>>;
|
|
93
|
+
objects: z.ZodArray<z.ZodObject<{
|
|
94
|
+
path: z.ZodString;
|
|
95
|
+
sha256: z.ZodString;
|
|
96
|
+
byteLength: z.ZodNumber;
|
|
97
|
+
}, z.core.$strict>>;
|
|
98
|
+
}, z.core.$strict>;
|
|
99
|
+
provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
100
|
+
kind: z.ZodLiteral<"worktree">;
|
|
101
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
102
|
+
kind: z.ZodLiteral<"git">;
|
|
103
|
+
repository: z.ZodLiteral<"dreamboard-games/dreamboard-sdk">;
|
|
104
|
+
revision: z.ZodString;
|
|
105
|
+
}, z.core.$strict>], "kind">;
|
|
106
|
+
}, z.core.$strict>;
|
|
107
|
+
declare const referenceGameWorkspaceSchema: z.ZodObject<{
|
|
108
|
+
manifest: z.ZodString;
|
|
109
|
+
reducer: z.ZodString;
|
|
110
|
+
ui: z.ZodString;
|
|
111
|
+
behaviorScenarios: z.ZodArray<z.ZodString>;
|
|
112
|
+
uiScenarios: z.ZodArray<z.ZodString>;
|
|
113
|
+
}, z.core.$strict>;
|
|
114
|
+
declare const referenceGameTeachingSchema: z.ZodObject<{
|
|
115
|
+
whatThisTeaches: z.ZodArray<z.ZodString>;
|
|
116
|
+
whenToCopyThisPattern: z.ZodArray<z.ZodString>;
|
|
117
|
+
readFirst: z.ZodArray<z.ZodString>;
|
|
118
|
+
}, z.core.$strict>;
|
|
119
|
+
declare const referenceGameDemoReleaseSchema: z.ZodObject<{
|
|
120
|
+
slug: z.ZodString;
|
|
121
|
+
name: z.ZodString;
|
|
122
|
+
description: z.ZodString;
|
|
123
|
+
overview: z.ZodString;
|
|
124
|
+
creator: z.ZodString;
|
|
125
|
+
minPlayers: z.ZodNumber;
|
|
126
|
+
maxPlayers: z.ZodNumber;
|
|
127
|
+
playTimeMinMinutes: z.ZodNumber;
|
|
128
|
+
playTimeMaxMinutes: z.ZodNumber;
|
|
129
|
+
difficulty: z.ZodNumber;
|
|
130
|
+
mechanics: z.ZodArray<z.ZodString>;
|
|
131
|
+
categories: z.ZodArray<z.ZodString>;
|
|
132
|
+
thumbnailPath: z.ZodString;
|
|
133
|
+
estimatedMinutes: z.ZodNumber;
|
|
134
|
+
demoPlayerCount: z.ZodNumber;
|
|
135
|
+
}, z.core.$strict>;
|
|
136
|
+
declare const referenceGameRightsSchema: z.ZodObject<{
|
|
137
|
+
mechanicsProvenance: z.ZodString;
|
|
138
|
+
sourceCode: z.ZodString;
|
|
139
|
+
codeLicense: z.ZodString;
|
|
140
|
+
ruleText: z.ZodString;
|
|
141
|
+
artwork: z.ZodString;
|
|
142
|
+
assetLicenseManifest: z.ZodString;
|
|
143
|
+
thirdPartyMarks: z.ZodArray<z.ZodString>;
|
|
144
|
+
reviewStatus: z.ZodLiteral<"approved">;
|
|
145
|
+
reviewedBy: z.ZodString;
|
|
146
|
+
reviewedAt: z.ZodString;
|
|
147
|
+
}, z.core.$strict>;
|
|
148
|
+
declare const referenceGameSdkPolicySchema: z.ZodObject<{
|
|
149
|
+
dependency: z.ZodLiteral<"@dreamboard-games/sdk">;
|
|
150
|
+
versionPolicy: z.ZodLiteral<"exact">;
|
|
151
|
+
}, z.core.$strict>;
|
|
152
|
+
declare const referenceGameManifestV3Schema: z.ZodObject<{
|
|
153
|
+
schemaVersion: z.ZodLiteral<3>;
|
|
154
|
+
id: z.ZodString;
|
|
155
|
+
displayName: z.ZodString;
|
|
156
|
+
workspace: z.ZodObject<{
|
|
157
|
+
manifest: z.ZodString;
|
|
158
|
+
reducer: z.ZodString;
|
|
159
|
+
ui: z.ZodString;
|
|
160
|
+
behaviorScenarios: z.ZodArray<z.ZodString>;
|
|
161
|
+
uiScenarios: z.ZodArray<z.ZodString>;
|
|
162
|
+
}, z.core.$strict>;
|
|
163
|
+
teaching: z.ZodObject<{
|
|
164
|
+
whatThisTeaches: z.ZodArray<z.ZodString>;
|
|
165
|
+
whenToCopyThisPattern: z.ZodArray<z.ZodString>;
|
|
166
|
+
readFirst: z.ZodArray<z.ZodString>;
|
|
167
|
+
}, z.core.$strict>;
|
|
168
|
+
demoRelease: z.ZodOptional<z.ZodObject<{
|
|
169
|
+
slug: z.ZodString;
|
|
170
|
+
name: z.ZodString;
|
|
171
|
+
description: z.ZodString;
|
|
172
|
+
overview: z.ZodString;
|
|
173
|
+
creator: z.ZodString;
|
|
174
|
+
minPlayers: z.ZodNumber;
|
|
175
|
+
maxPlayers: z.ZodNumber;
|
|
176
|
+
playTimeMinMinutes: z.ZodNumber;
|
|
177
|
+
playTimeMaxMinutes: z.ZodNumber;
|
|
178
|
+
difficulty: z.ZodNumber;
|
|
179
|
+
mechanics: z.ZodArray<z.ZodString>;
|
|
180
|
+
categories: z.ZodArray<z.ZodString>;
|
|
181
|
+
thumbnailPath: z.ZodString;
|
|
182
|
+
estimatedMinutes: z.ZodNumber;
|
|
183
|
+
demoPlayerCount: z.ZodNumber;
|
|
184
|
+
}, z.core.$strict>>;
|
|
185
|
+
mechanics: z.ZodArray<z.ZodString>;
|
|
186
|
+
uiPatterns: z.ZodArray<z.ZodString>;
|
|
187
|
+
rights: z.ZodObject<{
|
|
188
|
+
mechanicsProvenance: z.ZodString;
|
|
189
|
+
sourceCode: z.ZodString;
|
|
190
|
+
codeLicense: z.ZodString;
|
|
191
|
+
ruleText: z.ZodString;
|
|
192
|
+
artwork: z.ZodString;
|
|
193
|
+
assetLicenseManifest: z.ZodString;
|
|
194
|
+
thirdPartyMarks: z.ZodArray<z.ZodString>;
|
|
195
|
+
reviewStatus: z.ZodLiteral<"approved">;
|
|
196
|
+
reviewedBy: z.ZodString;
|
|
197
|
+
reviewedAt: z.ZodString;
|
|
198
|
+
}, z.core.$strict>;
|
|
199
|
+
sdk: z.ZodObject<{
|
|
200
|
+
dependency: z.ZodLiteral<"@dreamboard-games/sdk">;
|
|
201
|
+
versionPolicy: z.ZodLiteral<"exact">;
|
|
202
|
+
}, z.core.$strict>;
|
|
203
|
+
}, z.core.$strict>;
|
|
204
|
+
type ReferenceGameSourceObject = z.infer<typeof referenceGameSourceObjectSchema>;
|
|
205
|
+
type ReferenceGameSourceEntry = z.infer<typeof referenceGameSourceEntrySchema>;
|
|
206
|
+
type ReferenceGameSourceManifestPayload = z.infer<typeof referenceGameSourceManifestPayloadSchema>;
|
|
207
|
+
type ReferenceGameSourceInventoryPolicy = z.infer<typeof referenceGameSourceInventoryPolicySchema>;
|
|
208
|
+
type ReferenceGameSourceProvenance = z.infer<typeof referenceGameSourceProvenanceSchema>;
|
|
209
|
+
type ReferenceGameSourceManifest = z.infer<typeof referenceGameSourceManifestSchema>;
|
|
210
|
+
type ReferenceGameWorkspace = z.infer<typeof referenceGameWorkspaceSchema>;
|
|
211
|
+
type ReferenceGameTeaching = z.infer<typeof referenceGameTeachingSchema>;
|
|
212
|
+
type ReferenceGameDemoRelease = z.infer<typeof referenceGameDemoReleaseSchema>;
|
|
213
|
+
type ReferenceGameRights = z.infer<typeof referenceGameRightsSchema>;
|
|
214
|
+
type ReferenceGameSdkPolicy = z.infer<typeof referenceGameSdkPolicySchema>;
|
|
215
|
+
type ReferenceGameManifestV3 = z.infer<typeof referenceGameManifestV3Schema>;
|
|
216
|
+
declare function parseReferenceGameSourceManifest(value: unknown): ReferenceGameSourceManifest;
|
|
217
|
+
declare function parseReferenceGameManifestV3(value: unknown): ReferenceGameManifestV3;
|
|
218
|
+
declare function isPackageableReferenceGame(game: ReferenceGameManifestV3): boolean;
|
|
219
|
+
|
|
220
|
+
export { referenceGameSourceProvenanceSchema as A, referenceGameTeachingSchema as B, referenceGameWorkspaceSchema as C, REFERENCE_GAME_MANIFEST_SCHEMA_VERSION as R, REFERENCE_GAME_SOURCE_MANIFEST_SCHEMA_VERSION as a, type ReferenceGameDemoRelease as b, type ReferenceGameManifestV3 as c, type ReferenceGameRights as d, type ReferenceGameSdkPolicy as e, type ReferenceGameSourceEntry as f, type ReferenceGameSourceInventoryPolicy as g, type ReferenceGameSourceManifest as h, type ReferenceGameSourceManifestPayload as i, type ReferenceGameSourceObject as j, type ReferenceGameSourceProvenance as k, type ReferenceGameTeaching as l, type ReferenceGameWorkspace as m, isPackageableReferenceGame as n, parseReferenceGameSourceManifest as o, parseReferenceGameManifestV3 as p, referenceGameManifestV3Schema as q, referenceGameDemoReleaseSchema as r, referenceGameRightsSchema as s, referenceGameSdkPolicySchema as t, referenceGameSha256DigestSchema as u, referenceGameSourceEntrySchema as v, referenceGameSourceInventoryPolicySchema as w, referenceGameSourceManifestPayloadSchema as x, referenceGameSourceManifestSchema as y, referenceGameSourceObjectSchema as z };
|