@ankhorage/zora-game 0.1.0 → 0.2.0

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 (63) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/README.md +2 -1
  3. package/dist/ZORA_GAME_COMPONENT_META.d.ts +118 -0
  4. package/dist/ZORA_GAME_COMPONENT_META.d.ts.map +1 -1
  5. package/dist/ZORA_GAME_COMPONENT_META.js +2 -0
  6. package/dist/ZORA_GAME_COMPONENT_META.js.map +1 -1
  7. package/dist/ZORA_GAME_PLUGIN.d.ts +126 -3
  8. package/dist/ZORA_GAME_PLUGIN.d.ts.map +1 -1
  9. package/dist/ZORA_GAME_PLUGIN.js +2 -0
  10. package/dist/ZORA_GAME_PLUGIN.js.map +1 -1
  11. package/dist/ZORA_PLUGIN_METADATA.d.ts +124 -3
  12. package/dist/ZORA_PLUGIN_METADATA.d.ts.map +1 -1
  13. package/dist/ZORA_PLUGIN_METADATA.js +7 -3
  14. package/dist/ZORA_PLUGIN_METADATA.js.map +1 -1
  15. package/dist/features/game-presentation/adapters/inbound/Game.d.ts +5 -0
  16. package/dist/features/game-presentation/adapters/inbound/Game.d.ts.map +1 -0
  17. package/dist/features/game-presentation/adapters/inbound/Game.js +16 -0
  18. package/dist/features/game-presentation/adapters/inbound/Game.js.map +1 -0
  19. package/dist/features/game-presentation/composition/GameRuntimeContext.d.ts +5 -0
  20. package/dist/features/game-presentation/composition/GameRuntimeContext.d.ts.map +1 -0
  21. package/dist/features/game-presentation/composition/GameRuntimeContext.js +4 -0
  22. package/dist/features/game-presentation/composition/GameRuntimeContext.js.map +1 -0
  23. package/dist/features/game-presentation/composition/useGameRuntime.d.ts +5 -0
  24. package/dist/features/game-presentation/composition/useGameRuntime.d.ts.map +1 -0
  25. package/dist/features/game-presentation/composition/useGameRuntime.js +103 -0
  26. package/dist/features/game-presentation/composition/useGameRuntime.js.map +1 -0
  27. package/dist/features/game-presentation/composition/useGameScheduledEffects.d.ts +17 -0
  28. package/dist/features/game-presentation/composition/useGameScheduledEffects.d.ts.map +1 -0
  29. package/dist/features/game-presentation/composition/useGameScheduledEffects.js +40 -0
  30. package/dist/features/game-presentation/composition/useGameScheduledEffects.js.map +1 -0
  31. package/dist/features/game-presentation/meta/gameMeta.d.ts +120 -0
  32. package/dist/features/game-presentation/meta/gameMeta.d.ts.map +1 -0
  33. package/dist/features/game-presentation/meta/gameMeta.js +97 -0
  34. package/dist/features/game-presentation/meta/gameMeta.js.map +1 -0
  35. package/dist/features/game-presentation/public.d.ts +2 -1
  36. package/dist/features/game-presentation/public.d.ts.map +1 -1
  37. package/dist/features/game-presentation/public.js +1 -0
  38. package/dist/features/game-presentation/public.js.map +1 -1
  39. package/dist/index.d.ts +2 -2
  40. package/dist/index.d.ts.map +1 -1
  41. package/dist/index.js +1 -1
  42. package/dist/index.js.map +1 -1
  43. package/dist/types/gamePresentation.d.ts +9 -0
  44. package/dist/types/gamePresentation.d.ts.map +1 -1
  45. package/dist/types/gamePresentation.js.map +1 -1
  46. package/dist/types/gameRuntime.d.ts +12 -0
  47. package/dist/types/gameRuntime.d.ts.map +1 -0
  48. package/dist/types/gameRuntime.js +2 -0
  49. package/dist/types/gameRuntime.js.map +1 -0
  50. package/package.json +5 -2
  51. package/src/ZORA_GAME_COMPONENT_META.ts +2 -0
  52. package/src/ZORA_GAME_PLUGIN.ts +2 -0
  53. package/src/ZORA_PLUGIN_METADATA.test.ts +28 -5
  54. package/src/ZORA_PLUGIN_METADATA.ts +7 -3
  55. package/src/features/game-presentation/adapters/inbound/Game.tsx +27 -0
  56. package/src/features/game-presentation/composition/GameRuntimeContext.ts +6 -0
  57. package/src/features/game-presentation/composition/useGameRuntime.ts +181 -0
  58. package/src/features/game-presentation/composition/useGameScheduledEffects.ts +85 -0
  59. package/src/features/game-presentation/meta/gameMeta.ts +99 -0
  60. package/src/features/game-presentation/public.ts +2 -0
  61. package/src/index.ts +2 -1
  62. package/src/types/gamePresentation.ts +10 -0
  63. package/src/types/gameRuntime.ts +13 -0
package/CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
1
  # @ankhorage/zora-game
2
2
 
3
+ ## 0.2.0
4
+
5
+ ### Minor Changes
6
+
7
+ - f9e964f: Add the embeddable `Game` binder backed by the published `@ankhorage/game` runtime, local session
8
+ state, scheduled-effect timing, ordinary ZORA placement metadata, and app-bindable game outputs.
9
+
3
10
  ## 0.1.0
4
11
 
5
12
  ### Minor Changes
package/README.md CHANGED
@@ -3,7 +3,7 @@
3
3
 
4
4
  # @ankhorage/zora-game
5
5
 
6
- ![license: MIT](././paradox/badges/license.svg) ![npm: v0.1.0](././paradox/badges/npm.svg) ![runtime: bun](././paradox/badges/runtime.svg) ![typescript: strict](././paradox/badges/typescript.svg) ![eslint: checked](././paradox/badges/eslint.svg) ![prettier: checked](././paradox/badges/prettier.svg) ![build: checked](././paradox/badges/build.svg) ![tests: checked](././paradox/badges/tests.svg) ![docs: paradox](././paradox/badges/docs.svg)
6
+ ![license: MIT](././paradox/badges/license.svg) ![npm: v0.2.0](././paradox/badges/npm.svg) ![runtime: bun](././paradox/badges/runtime.svg) ![typescript: strict](././paradox/badges/typescript.svg) ![eslint: checked](././paradox/badges/eslint.svg) ![prettier: checked](././paradox/badges/prettier.svg) ![build: checked](././paradox/badges/build.svg) ![tests: checked](././paradox/badges/tests.svg) ![docs: paradox](././paradox/badges/docs.svg)
7
7
 
8
8
  Generic game presentation primitives for React Native and React Native Web apps built on ZORA.
9
9
 
@@ -15,5 +15,6 @@ Generic game presentation primitives for React Native and React Native Web apps
15
15
  - [Architecture overview](././paradox/diagrams/architecture-overview.mmd)
16
16
  - [Module relationships](././paradox/diagrams/module-relationships.mmd)
17
17
  - [Export graph](././paradox/diagrams/export-graph.mmd)
18
+ - [Game sequence](././paradox/diagrams/sequences/game.mmd)
18
19
  - [GameEntity sequence](././paradox/diagrams/sequences/game-entity.mmd)
19
20
  - [GameOverlay sequence](././paradox/diagrams/sequences/game-overlay.mmd)
@@ -1,5 +1,123 @@
1
1
  /*** Register the generic game presentation metadata owned by this package. */
2
2
  export declare const ZORA_GAME_COMPONENT_META: {
3
+ readonly Game: {
4
+ readonly name: "Game";
5
+ readonly category: "pattern";
6
+ readonly description: "Embeds one config-driven game session inside ordinary ZORA layout and emits domain-neutral game outputs.";
7
+ readonly directManifestNode: true;
8
+ readonly allowedChildren: readonly ["GameEntity", "GameOverlay", "Gradient", "Image", "View"];
9
+ readonly blueprint: {
10
+ readonly label: "Game";
11
+ readonly defaultProps: {
12
+ readonly definition: {
13
+ readonly id: "game";
14
+ readonly initialPhase: "playing";
15
+ readonly stages: readonly [{
16
+ readonly id: "main";
17
+ }];
18
+ readonly rules: readonly [];
19
+ };
20
+ readonly seed: 0;
21
+ readonly resetKey: "";
22
+ readonly autoAdvanceTime: true;
23
+ readonly minHeight: 320;
24
+ readonly clip: true;
25
+ };
26
+ };
27
+ readonly bindings: {
28
+ readonly props: {
29
+ readonly definition: {
30
+ readonly value: {
31
+ readonly type: "object";
32
+ };
33
+ readonly acceptsFallback: true;
34
+ };
35
+ readonly input: {
36
+ readonly value: {
37
+ readonly type: "record";
38
+ };
39
+ readonly acceptsFallback: true;
40
+ };
41
+ };
42
+ };
43
+ readonly events: {
44
+ readonly output: {
45
+ readonly label: "Game output";
46
+ readonly eventType: "game.output";
47
+ readonly description: "Emitted when the platform-neutral game runtime produces an app/domain output.";
48
+ readonly payloadFields: readonly [{
49
+ readonly path: "type";
50
+ readonly type: "string";
51
+ }, {
52
+ readonly path: "payload";
53
+ readonly type: "record";
54
+ }];
55
+ };
56
+ };
57
+ readonly props: {
58
+ readonly seed: {
59
+ readonly type: "number";
60
+ readonly category: "Runtime";
61
+ readonly label: "Initial seed";
62
+ readonly default: 0;
63
+ readonly authoring: {
64
+ readonly authority: "instance";
65
+ };
66
+ };
67
+ readonly resetKey: {
68
+ readonly type: "string";
69
+ readonly category: "Runtime";
70
+ readonly label: "Reset key";
71
+ readonly default: "";
72
+ readonly authoring: {
73
+ readonly authority: "instance";
74
+ };
75
+ };
76
+ readonly autoAdvanceTime: {
77
+ readonly type: "boolean";
78
+ readonly category: "Runtime";
79
+ readonly label: "Advance scheduled effects";
80
+ readonly default: true;
81
+ readonly authoring: {
82
+ readonly authority: "instance";
83
+ };
84
+ };
85
+ readonly aspectRatio: {
86
+ readonly type: "number";
87
+ readonly category: "Layout";
88
+ readonly label: "Aspect ratio";
89
+ readonly authoring: {
90
+ readonly authority: "instance";
91
+ };
92
+ };
93
+ readonly minHeight: {
94
+ readonly type: "number";
95
+ readonly category: "Layout";
96
+ readonly label: "Minimum height";
97
+ readonly default: 320;
98
+ readonly authoring: {
99
+ readonly authority: "instance";
100
+ };
101
+ };
102
+ readonly clip: {
103
+ readonly type: "boolean";
104
+ readonly category: "Layout";
105
+ readonly label: "Clip overflow";
106
+ readonly default: true;
107
+ readonly authoring: {
108
+ readonly authority: "instance";
109
+ };
110
+ };
111
+ readonly accessibilityLabel: {
112
+ readonly type: "string";
113
+ readonly category: "Accessibility";
114
+ readonly label: "Accessibility label";
115
+ readonly authoring: {
116
+ readonly authority: "instance";
117
+ };
118
+ };
119
+ };
120
+ };
3
121
  readonly GameEntity: {
4
122
  readonly name: "GameEntity";
5
123
  readonly category: "component";
@@ -1 +1 @@
1
- {"version":3,"file":"ZORA_GAME_COMPONENT_META.d.ts","sourceRoot":"","sources":["../src/ZORA_GAME_COMPONENT_META.ts"],"names":[],"mappings":"AAIA,8EAA8E;AAC9E,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAI3B,CAAC"}
1
+ {"version":3,"file":"ZORA_GAME_COMPONENT_META.d.ts","sourceRoot":"","sources":["../src/ZORA_GAME_COMPONENT_META.ts"],"names":[],"mappings":"AAKA,8EAA8E;AAC9E,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAK3B,CAAC"}
@@ -1,8 +1,10 @@
1
1
  import { gameEntityMeta } from './features/game-presentation/meta/gameEntityMeta';
2
2
  import { gameFieldMeta } from './features/game-presentation/meta/gameFieldMeta';
3
+ import { gameMeta } from './features/game-presentation/meta/gameMeta';
3
4
  import { gameOverlayMeta } from './features/game-presentation/meta/gameOverlayMeta';
4
5
  /*** Register the generic game presentation metadata owned by this package. */
5
6
  export const ZORA_GAME_COMPONENT_META = {
7
+ Game: gameMeta,
6
8
  GameEntity: gameEntityMeta,
7
9
  GameField: gameFieldMeta,
8
10
  GameOverlay: gameOverlayMeta,
@@ -1 +1 @@
1
- {"version":3,"file":"ZORA_GAME_COMPONENT_META.js","sourceRoot":"","sources":["../src/ZORA_GAME_COMPONENT_META.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,kDAAkD,CAAC;AAClF,OAAO,EAAE,aAAa,EAAE,MAAM,iDAAiD,CAAC;AAChF,OAAO,EAAE,eAAe,EAAE,MAAM,mDAAmD,CAAC;AAEpF,8EAA8E;AAC9E,MAAM,CAAC,MAAM,wBAAwB,GAAG;IACtC,UAAU,EAAE,cAAc;IAC1B,SAAS,EAAE,aAAa;IACxB,WAAW,EAAE,eAAe;CACpB,CAAC","sourcesContent":["import { gameEntityMeta } from './features/game-presentation/meta/gameEntityMeta';\nimport { gameFieldMeta } from './features/game-presentation/meta/gameFieldMeta';\nimport { gameOverlayMeta } from './features/game-presentation/meta/gameOverlayMeta';\n\n/*** Register the generic game presentation metadata owned by this package. */\nexport const ZORA_GAME_COMPONENT_META = {\n GameEntity: gameEntityMeta,\n GameField: gameFieldMeta,\n GameOverlay: gameOverlayMeta,\n} as const;\n"]}
1
+ {"version":3,"file":"ZORA_GAME_COMPONENT_META.js","sourceRoot":"","sources":["../src/ZORA_GAME_COMPONENT_META.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,kDAAkD,CAAC;AAClF,OAAO,EAAE,aAAa,EAAE,MAAM,iDAAiD,CAAC;AAChF,OAAO,EAAE,QAAQ,EAAE,MAAM,4CAA4C,CAAC;AACtE,OAAO,EAAE,eAAe,EAAE,MAAM,mDAAmD,CAAC;AAEpF,8EAA8E;AAC9E,MAAM,CAAC,MAAM,wBAAwB,GAAG;IACtC,IAAI,EAAE,QAAQ;IACd,UAAU,EAAE,cAAc;IAC1B,SAAS,EAAE,aAAa;IACxB,WAAW,EAAE,eAAe;CACpB,CAAC","sourcesContent":["import { gameEntityMeta } from './features/game-presentation/meta/gameEntityMeta';\nimport { gameFieldMeta } from './features/game-presentation/meta/gameFieldMeta';\nimport { gameMeta } from './features/game-presentation/meta/gameMeta';\nimport { gameOverlayMeta } from './features/game-presentation/meta/gameOverlayMeta';\n\n/*** Register the generic game presentation metadata owned by this package. */\nexport const ZORA_GAME_COMPONENT_META = {\n Game: gameMeta,\n GameEntity: gameEntityMeta,\n GameField: gameFieldMeta,\n GameOverlay: gameOverlayMeta,\n} as const;\n"]}
@@ -1,9 +1,11 @@
1
+ import { Game } from './features/game-presentation/adapters/inbound/Game';
1
2
  import { GameEntity } from './features/game-presentation/adapters/inbound/GameEntity';
2
3
  import { GameField } from './features/game-presentation/adapters/inbound/GameField';
3
4
  import { GameOverlay } from './features/game-presentation/adapters/inbound/GameOverlay';
4
5
  /*** Expose the runtime component registry together with metadata for ZORA plugin consumers. */
5
6
  export declare const ZORA_GAME_PLUGIN: {
6
7
  readonly componentRegistry: {
8
+ readonly Game: typeof Game;
7
9
  readonly GameEntity: typeof GameEntity;
8
10
  readonly GameField: typeof GameField;
9
11
  readonly GameOverlay: typeof GameOverlay;
@@ -11,6 +13,124 @@ export declare const ZORA_GAME_PLUGIN: {
11
13
  readonly packageName: "@ankhorage/zora-game";
12
14
  readonly displayName: "ZORA Game";
13
15
  readonly componentMeta: {
16
+ readonly Game: {
17
+ readonly name: "Game";
18
+ readonly category: "pattern";
19
+ readonly description: "Embeds one config-driven game session inside ordinary ZORA layout and emits domain-neutral game outputs.";
20
+ readonly directManifestNode: true;
21
+ readonly allowedChildren: readonly ["GameEntity", "GameOverlay", "Gradient", "Image", "View"];
22
+ readonly blueprint: {
23
+ readonly label: "Game";
24
+ readonly defaultProps: {
25
+ readonly definition: {
26
+ readonly id: "game";
27
+ readonly initialPhase: "playing";
28
+ readonly stages: readonly [{
29
+ readonly id: "main";
30
+ }];
31
+ readonly rules: readonly [];
32
+ };
33
+ readonly seed: 0;
34
+ readonly resetKey: "";
35
+ readonly autoAdvanceTime: true;
36
+ readonly minHeight: 320;
37
+ readonly clip: true;
38
+ };
39
+ };
40
+ readonly bindings: {
41
+ readonly props: {
42
+ readonly definition: {
43
+ readonly value: {
44
+ readonly type: "object";
45
+ };
46
+ readonly acceptsFallback: true;
47
+ };
48
+ readonly input: {
49
+ readonly value: {
50
+ readonly type: "record";
51
+ };
52
+ readonly acceptsFallback: true;
53
+ };
54
+ };
55
+ };
56
+ readonly events: {
57
+ readonly output: {
58
+ readonly label: "Game output";
59
+ readonly eventType: "game.output";
60
+ readonly description: "Emitted when the platform-neutral game runtime produces an app/domain output.";
61
+ readonly payloadFields: readonly [{
62
+ readonly path: "type";
63
+ readonly type: "string";
64
+ }, {
65
+ readonly path: "payload";
66
+ readonly type: "record";
67
+ }];
68
+ };
69
+ };
70
+ readonly props: {
71
+ readonly seed: {
72
+ readonly type: "number";
73
+ readonly category: "Runtime";
74
+ readonly label: "Initial seed";
75
+ readonly default: 0;
76
+ readonly authoring: {
77
+ readonly authority: "instance";
78
+ };
79
+ };
80
+ readonly resetKey: {
81
+ readonly type: "string";
82
+ readonly category: "Runtime";
83
+ readonly label: "Reset key";
84
+ readonly default: "";
85
+ readonly authoring: {
86
+ readonly authority: "instance";
87
+ };
88
+ };
89
+ readonly autoAdvanceTime: {
90
+ readonly type: "boolean";
91
+ readonly category: "Runtime";
92
+ readonly label: "Advance scheduled effects";
93
+ readonly default: true;
94
+ readonly authoring: {
95
+ readonly authority: "instance";
96
+ };
97
+ };
98
+ readonly aspectRatio: {
99
+ readonly type: "number";
100
+ readonly category: "Layout";
101
+ readonly label: "Aspect ratio";
102
+ readonly authoring: {
103
+ readonly authority: "instance";
104
+ };
105
+ };
106
+ readonly minHeight: {
107
+ readonly type: "number";
108
+ readonly category: "Layout";
109
+ readonly label: "Minimum height";
110
+ readonly default: 320;
111
+ readonly authoring: {
112
+ readonly authority: "instance";
113
+ };
114
+ };
115
+ readonly clip: {
116
+ readonly type: "boolean";
117
+ readonly category: "Layout";
118
+ readonly label: "Clip overflow";
119
+ readonly default: true;
120
+ readonly authoring: {
121
+ readonly authority: "instance";
122
+ };
123
+ };
124
+ readonly accessibilityLabel: {
125
+ readonly type: "string";
126
+ readonly category: "Accessibility";
127
+ readonly label: "Accessibility label";
128
+ readonly authoring: {
129
+ readonly authority: "instance";
130
+ };
131
+ };
132
+ };
133
+ };
14
134
  readonly GameEntity: {
15
135
  readonly name: "GameEntity";
16
136
  readonly category: "component";
@@ -232,16 +352,19 @@ export declare const ZORA_GAME_PLUGIN: {
232
352
  };
233
353
  };
234
354
  };
235
- readonly extensionHosts: readonly ["GameField", "GameEntity", "GameOverlay"];
355
+ readonly extensionHosts: readonly ["Game", "GameField", "GameEntity", "GameOverlay"];
236
356
  readonly placements: readonly [{
357
+ readonly child: "Game";
358
+ readonly parents: readonly ["Card", "Grid", "Screen", "ScreenSection", "View"];
359
+ }, {
237
360
  readonly child: "GameField";
238
361
  readonly parents: readonly ["Card", "Grid", "Screen", "ScreenSection", "View"];
239
362
  }, {
240
363
  readonly child: "GameEntity";
241
- readonly parents: readonly ["GameField", "GameOverlay"];
364
+ readonly parents: readonly ["Game", "GameField", "GameOverlay"];
242
365
  }, {
243
366
  readonly child: "GameOverlay";
244
- readonly parents: readonly ["GameField"];
367
+ readonly parents: readonly ["Game", "GameField"];
245
368
  }];
246
369
  };
247
370
  //# sourceMappingURL=ZORA_GAME_PLUGIN.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ZORA_GAME_PLUGIN.d.ts","sourceRoot":"","sources":["../src/ZORA_GAME_PLUGIN.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,0DAA0D,CAAC;AACtF,OAAO,EAAE,SAAS,EAAE,MAAM,yDAAyD,CAAC;AACpF,OAAO,EAAE,WAAW,EAAE,MAAM,2DAA2D,CAAC;AAGxF,+FAA+F;AAC/F,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAOnB,CAAC"}
1
+ {"version":3,"file":"ZORA_GAME_PLUGIN.d.ts","sourceRoot":"","sources":["../src/ZORA_GAME_PLUGIN.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,oDAAoD,CAAC;AAC1E,OAAO,EAAE,UAAU,EAAE,MAAM,0DAA0D,CAAC;AACtF,OAAO,EAAE,SAAS,EAAE,MAAM,yDAAyD,CAAC;AACpF,OAAO,EAAE,WAAW,EAAE,MAAM,2DAA2D,CAAC;AAGxF,+FAA+F;AAC/F,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAQnB,CAAC"}
@@ -1,3 +1,4 @@
1
+ import { Game } from './features/game-presentation/adapters/inbound/Game';
1
2
  import { GameEntity } from './features/game-presentation/adapters/inbound/GameEntity';
2
3
  import { GameField } from './features/game-presentation/adapters/inbound/GameField';
3
4
  import { GameOverlay } from './features/game-presentation/adapters/inbound/GameOverlay';
@@ -6,6 +7,7 @@ import { ZORA_PLUGIN_METADATA } from './ZORA_PLUGIN_METADATA';
6
7
  export const ZORA_GAME_PLUGIN = {
7
8
  ...ZORA_PLUGIN_METADATA,
8
9
  componentRegistry: {
10
+ Game,
9
11
  GameEntity,
10
12
  GameField,
11
13
  GameOverlay,
@@ -1 +1 @@
1
- {"version":3,"file":"ZORA_GAME_PLUGIN.js","sourceRoot":"","sources":["../src/ZORA_GAME_PLUGIN.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,0DAA0D,CAAC;AACtF,OAAO,EAAE,SAAS,EAAE,MAAM,yDAAyD,CAAC;AACpF,OAAO,EAAE,WAAW,EAAE,MAAM,2DAA2D,CAAC;AACxF,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAE9D,+FAA+F;AAC/F,MAAM,CAAC,MAAM,gBAAgB,GAAG;IAC9B,GAAG,oBAAoB;IACvB,iBAAiB,EAAE;QACjB,UAAU;QACV,SAAS;QACT,WAAW;KACZ;CACO,CAAC","sourcesContent":["import { GameEntity } from './features/game-presentation/adapters/inbound/GameEntity';\nimport { GameField } from './features/game-presentation/adapters/inbound/GameField';\nimport { GameOverlay } from './features/game-presentation/adapters/inbound/GameOverlay';\nimport { ZORA_PLUGIN_METADATA } from './ZORA_PLUGIN_METADATA';\n\n/*** Expose the runtime component registry together with metadata for ZORA plugin consumers. */\nexport const ZORA_GAME_PLUGIN = {\n ...ZORA_PLUGIN_METADATA,\n componentRegistry: {\n GameEntity,\n GameField,\n GameOverlay,\n },\n} as const;\n"]}
1
+ {"version":3,"file":"ZORA_GAME_PLUGIN.js","sourceRoot":"","sources":["../src/ZORA_GAME_PLUGIN.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,oDAAoD,CAAC;AAC1E,OAAO,EAAE,UAAU,EAAE,MAAM,0DAA0D,CAAC;AACtF,OAAO,EAAE,SAAS,EAAE,MAAM,yDAAyD,CAAC;AACpF,OAAO,EAAE,WAAW,EAAE,MAAM,2DAA2D,CAAC;AACxF,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAE9D,+FAA+F;AAC/F,MAAM,CAAC,MAAM,gBAAgB,GAAG;IAC9B,GAAG,oBAAoB;IACvB,iBAAiB,EAAE;QACjB,IAAI;QACJ,UAAU;QACV,SAAS;QACT,WAAW;KACZ;CACO,CAAC","sourcesContent":["import { Game } from './features/game-presentation/adapters/inbound/Game';\nimport { GameEntity } from './features/game-presentation/adapters/inbound/GameEntity';\nimport { GameField } from './features/game-presentation/adapters/inbound/GameField';\nimport { GameOverlay } from './features/game-presentation/adapters/inbound/GameOverlay';\nimport { ZORA_PLUGIN_METADATA } from './ZORA_PLUGIN_METADATA';\n\n/*** Expose the runtime component registry together with metadata for ZORA plugin consumers. */\nexport const ZORA_GAME_PLUGIN = {\n ...ZORA_PLUGIN_METADATA,\n componentRegistry: {\n Game,\n GameEntity,\n GameField,\n GameOverlay,\n },\n} as const;\n"]}
@@ -3,6 +3,124 @@ export declare const ZORA_PLUGIN_METADATA: {
3
3
  readonly packageName: "@ankhorage/zora-game";
4
4
  readonly displayName: "ZORA Game";
5
5
  readonly componentMeta: {
6
+ readonly Game: {
7
+ readonly name: "Game";
8
+ readonly category: "pattern";
9
+ readonly description: "Embeds one config-driven game session inside ordinary ZORA layout and emits domain-neutral game outputs.";
10
+ readonly directManifestNode: true;
11
+ readonly allowedChildren: readonly ["GameEntity", "GameOverlay", "Gradient", "Image", "View"];
12
+ readonly blueprint: {
13
+ readonly label: "Game";
14
+ readonly defaultProps: {
15
+ readonly definition: {
16
+ readonly id: "game";
17
+ readonly initialPhase: "playing";
18
+ readonly stages: readonly [{
19
+ readonly id: "main";
20
+ }];
21
+ readonly rules: readonly [];
22
+ };
23
+ readonly seed: 0;
24
+ readonly resetKey: "";
25
+ readonly autoAdvanceTime: true;
26
+ readonly minHeight: 320;
27
+ readonly clip: true;
28
+ };
29
+ };
30
+ readonly bindings: {
31
+ readonly props: {
32
+ readonly definition: {
33
+ readonly value: {
34
+ readonly type: "object";
35
+ };
36
+ readonly acceptsFallback: true;
37
+ };
38
+ readonly input: {
39
+ readonly value: {
40
+ readonly type: "record";
41
+ };
42
+ readonly acceptsFallback: true;
43
+ };
44
+ };
45
+ };
46
+ readonly events: {
47
+ readonly output: {
48
+ readonly label: "Game output";
49
+ readonly eventType: "game.output";
50
+ readonly description: "Emitted when the platform-neutral game runtime produces an app/domain output.";
51
+ readonly payloadFields: readonly [{
52
+ readonly path: "type";
53
+ readonly type: "string";
54
+ }, {
55
+ readonly path: "payload";
56
+ readonly type: "record";
57
+ }];
58
+ };
59
+ };
60
+ readonly props: {
61
+ readonly seed: {
62
+ readonly type: "number";
63
+ readonly category: "Runtime";
64
+ readonly label: "Initial seed";
65
+ readonly default: 0;
66
+ readonly authoring: {
67
+ readonly authority: "instance";
68
+ };
69
+ };
70
+ readonly resetKey: {
71
+ readonly type: "string";
72
+ readonly category: "Runtime";
73
+ readonly label: "Reset key";
74
+ readonly default: "";
75
+ readonly authoring: {
76
+ readonly authority: "instance";
77
+ };
78
+ };
79
+ readonly autoAdvanceTime: {
80
+ readonly type: "boolean";
81
+ readonly category: "Runtime";
82
+ readonly label: "Advance scheduled effects";
83
+ readonly default: true;
84
+ readonly authoring: {
85
+ readonly authority: "instance";
86
+ };
87
+ };
88
+ readonly aspectRatio: {
89
+ readonly type: "number";
90
+ readonly category: "Layout";
91
+ readonly label: "Aspect ratio";
92
+ readonly authoring: {
93
+ readonly authority: "instance";
94
+ };
95
+ };
96
+ readonly minHeight: {
97
+ readonly type: "number";
98
+ readonly category: "Layout";
99
+ readonly label: "Minimum height";
100
+ readonly default: 320;
101
+ readonly authoring: {
102
+ readonly authority: "instance";
103
+ };
104
+ };
105
+ readonly clip: {
106
+ readonly type: "boolean";
107
+ readonly category: "Layout";
108
+ readonly label: "Clip overflow";
109
+ readonly default: true;
110
+ readonly authoring: {
111
+ readonly authority: "instance";
112
+ };
113
+ };
114
+ readonly accessibilityLabel: {
115
+ readonly type: "string";
116
+ readonly category: "Accessibility";
117
+ readonly label: "Accessibility label";
118
+ readonly authoring: {
119
+ readonly authority: "instance";
120
+ };
121
+ };
122
+ };
123
+ };
6
124
  readonly GameEntity: {
7
125
  readonly name: "GameEntity";
8
126
  readonly category: "component";
@@ -224,16 +342,19 @@ export declare const ZORA_PLUGIN_METADATA: {
224
342
  };
225
343
  };
226
344
  };
227
- readonly extensionHosts: readonly ["GameField", "GameEntity", "GameOverlay"];
345
+ readonly extensionHosts: readonly ["Game", "GameField", "GameEntity", "GameOverlay"];
228
346
  readonly placements: readonly [{
347
+ readonly child: "Game";
348
+ readonly parents: readonly ["Card", "Grid", "Screen", "ScreenSection", "View"];
349
+ }, {
229
350
  readonly child: "GameField";
230
351
  readonly parents: readonly ["Card", "Grid", "Screen", "ScreenSection", "View"];
231
352
  }, {
232
353
  readonly child: "GameEntity";
233
- readonly parents: readonly ["GameField", "GameOverlay"];
354
+ readonly parents: readonly ["Game", "GameField", "GameOverlay"];
234
355
  }, {
235
356
  readonly child: "GameOverlay";
236
- readonly parents: readonly ["GameField"];
357
+ readonly parents: readonly ["Game", "GameField"];
237
358
  }];
238
359
  };
239
360
  //# sourceMappingURL=ZORA_PLUGIN_METADATA.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ZORA_PLUGIN_METADATA.d.ts","sourceRoot":"","sources":["../src/ZORA_PLUGIN_METADATA.ts"],"names":[],"mappings":"AAIA,sFAAsF;AACtF,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAmBM,CAAC"}
1
+ {"version":3,"file":"ZORA_PLUGIN_METADATA.d.ts","sourceRoot":"","sources":["../src/ZORA_PLUGIN_METADATA.ts"],"names":[],"mappings":"AAIA,sFAAsF;AACtF,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAuBM,CAAC"}
@@ -4,19 +4,23 @@ export const ZORA_PLUGIN_METADATA = {
4
4
  packageName: '@ankhorage/zora-game',
5
5
  displayName: 'ZORA Game',
6
6
  componentMeta: ZORA_GAME_COMPONENT_META,
7
- extensionHosts: ['GameField', 'GameEntity', 'GameOverlay'],
7
+ extensionHosts: ['Game', 'GameField', 'GameEntity', 'GameOverlay'],
8
8
  placements: [
9
+ {
10
+ child: 'Game',
11
+ parents: ['Card', 'Grid', 'Screen', 'ScreenSection', 'View'],
12
+ },
9
13
  {
10
14
  child: 'GameField',
11
15
  parents: ['Card', 'Grid', 'Screen', 'ScreenSection', 'View'],
12
16
  },
13
17
  {
14
18
  child: 'GameEntity',
15
- parents: ['GameField', 'GameOverlay'],
19
+ parents: ['Game', 'GameField', 'GameOverlay'],
16
20
  },
17
21
  {
18
22
  child: 'GameOverlay',
19
- parents: ['GameField'],
23
+ parents: ['Game', 'GameField'],
20
24
  },
21
25
  ],
22
26
  };
@@ -1 +1 @@
1
- {"version":3,"file":"ZORA_PLUGIN_METADATA.js","sourceRoot":"","sources":["../src/ZORA_PLUGIN_METADATA.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAC;AAEtE,sFAAsF;AACtF,MAAM,CAAC,MAAM,oBAAoB,GAAG;IAClC,WAAW,EAAE,sBAAsB;IACnC,WAAW,EAAE,WAAW;IACxB,aAAa,EAAE,wBAAwB;IACvC,cAAc,EAAE,CAAC,WAAW,EAAE,YAAY,EAAE,aAAa,CAAC;IAC1D,UAAU,EAAE;QACV;YACE,KAAK,EAAE,WAAW;YAClB,OAAO,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,eAAe,EAAE,MAAM,CAAC;SAC7D;QACD;YACE,KAAK,EAAE,YAAY;YACnB,OAAO,EAAE,CAAC,WAAW,EAAE,aAAa,CAAC;SACtC;QACD;YACE,KAAK,EAAE,aAAa;YACpB,OAAO,EAAE,CAAC,WAAW,CAAC;SACvB;KACF;CACoC,CAAC","sourcesContent":["import type { ZoraPluginMetadata } from '@ankhorage/zora/metadata';\n\nimport { ZORA_GAME_COMPONENT_META } from './ZORA_GAME_COMPONENT_META';\n\n/*** Describe generic game presentation nodes and their valid ZORA extension hosts. */\nexport const ZORA_PLUGIN_METADATA = {\n packageName: '@ankhorage/zora-game',\n displayName: 'ZORA Game',\n componentMeta: ZORA_GAME_COMPONENT_META,\n extensionHosts: ['GameField', 'GameEntity', 'GameOverlay'],\n placements: [\n {\n child: 'GameField',\n parents: ['Card', 'Grid', 'Screen', 'ScreenSection', 'View'],\n },\n {\n child: 'GameEntity',\n parents: ['GameField', 'GameOverlay'],\n },\n {\n child: 'GameOverlay',\n parents: ['GameField'],\n },\n ],\n} as const satisfies ZoraPluginMetadata;\n"]}
1
+ {"version":3,"file":"ZORA_PLUGIN_METADATA.js","sourceRoot":"","sources":["../src/ZORA_PLUGIN_METADATA.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAC;AAEtE,sFAAsF;AACtF,MAAM,CAAC,MAAM,oBAAoB,GAAG;IAClC,WAAW,EAAE,sBAAsB;IACnC,WAAW,EAAE,WAAW;IACxB,aAAa,EAAE,wBAAwB;IACvC,cAAc,EAAE,CAAC,MAAM,EAAE,WAAW,EAAE,YAAY,EAAE,aAAa,CAAC;IAClE,UAAU,EAAE;QACV;YACE,KAAK,EAAE,MAAM;YACb,OAAO,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,eAAe,EAAE,MAAM,CAAC;SAC7D;QACD;YACE,KAAK,EAAE,WAAW;YAClB,OAAO,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,eAAe,EAAE,MAAM,CAAC;SAC7D;QACD;YACE,KAAK,EAAE,YAAY;YACnB,OAAO,EAAE,CAAC,MAAM,EAAE,WAAW,EAAE,aAAa,CAAC;SAC9C;QACD;YACE,KAAK,EAAE,aAAa;YACpB,OAAO,EAAE,CAAC,MAAM,EAAE,WAAW,CAAC;SAC/B;KACF;CACoC,CAAC","sourcesContent":["import type { ZoraPluginMetadata } from '@ankhorage/zora/metadata';\n\nimport { ZORA_GAME_COMPONENT_META } from './ZORA_GAME_COMPONENT_META';\n\n/*** Describe generic game presentation nodes and their valid ZORA extension hosts. */\nexport const ZORA_PLUGIN_METADATA = {\n packageName: '@ankhorage/zora-game',\n displayName: 'ZORA Game',\n componentMeta: ZORA_GAME_COMPONENT_META,\n extensionHosts: ['Game', 'GameField', 'GameEntity', 'GameOverlay'],\n placements: [\n {\n child: 'Game',\n parents: ['Card', 'Grid', 'Screen', 'ScreenSection', 'View'],\n },\n {\n child: 'GameField',\n parents: ['Card', 'Grid', 'Screen', 'ScreenSection', 'View'],\n },\n {\n child: 'GameEntity',\n parents: ['Game', 'GameField', 'GameOverlay'],\n },\n {\n child: 'GameOverlay',\n parents: ['Game', 'GameField'],\n },\n ],\n} as const satisfies ZoraPluginMetadata;\n"]}
@@ -0,0 +1,5 @@
1
+ import React from 'react';
2
+ import type { GameProps } from '../../../../types/gamePresentation';
3
+ /*** Bind one serializable game definition to a local transient session and presentation field. */
4
+ export declare function Game(props: GameProps): React.JSX.Element;
5
+ //# sourceMappingURL=Game.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Game.d.ts","sourceRoot":"","sources":["../../../../../src/features/game-presentation/adapters/inbound/Game.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,oCAAoC,CAAC;AAKpE,kGAAkG;AAClG,wBAAgB,IAAI,CAAC,KAAK,EAAE,SAAS,qBAkBpC"}
@@ -0,0 +1,16 @@
1
+ import React from 'react';
2
+ import { GameRuntimeContext } from '../../composition/GameRuntimeContext';
3
+ import { useGameRuntime } from '../../composition/useGameRuntime';
4
+ import { GameField } from './GameField';
5
+ /*** Bind one serializable game definition to a local transient session and presentation field. */
6
+ export function Game(props) {
7
+ const runtime = useGameRuntime(props);
8
+ return (<GameRuntimeContext.Provider value={runtime}>
9
+ <GameField {...(props.aspectRatio === undefined ? {} : { aspectRatio: props.aspectRatio })} {...(props.minHeight === undefined ? {} : { minHeight: props.minHeight })} {...(props.clip === undefined ? {} : { clip: props.clip })} {...(props.accessibilityLabel === undefined
10
+ ? {}
11
+ : { accessibilityLabel: props.accessibilityLabel })} {...(props.testID === undefined ? {} : { testID: props.testID })}>
12
+ {props.children}
13
+ </GameField>
14
+ </GameRuntimeContext.Provider>);
15
+ }
16
+ //# sourceMappingURL=Game.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Game.js","sourceRoot":"","sources":["../../../../../src/features/game-presentation/adapters/inbound/Game.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,EAAE,kBAAkB,EAAE,MAAM,sCAAsC,CAAC;AAC1E,OAAO,EAAE,cAAc,EAAE,MAAM,kCAAkC,CAAC;AAClE,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAExC,kGAAkG;AAClG,MAAM,UAAU,IAAI,CAAC,KAAgB;IACnC,MAAM,OAAO,GAAG,cAAc,CAAC,KAAK,CAAC,CAAC;IAEtC,OAAO,CACL,CAAC,kBAAkB,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC,CAC1C;MAAA,CAAC,SAAS,CACR,IAAI,CAAC,KAAK,CAAC,WAAW,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,WAAW,EAAE,KAAK,CAAC,WAAW,EAAE,CAAC,CAAC,CAChF,IAAI,CAAC,KAAK,CAAC,SAAS,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,SAAS,EAAE,KAAK,CAAC,SAAS,EAAE,CAAC,CAAC,CAC1E,IAAI,CAAC,KAAK,CAAC,IAAI,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,KAAK,CAAC,IAAI,EAAE,CAAC,CAAC,CAC3D,IAAI,CAAC,KAAK,CAAC,kBAAkB,KAAK,SAAS;QACzC,CAAC,CAAC,EAAE;QACJ,CAAC,CAAC,EAAE,kBAAkB,EAAE,KAAK,CAAC,kBAAkB,EAAE,CAAC,CAAC,CACtD,IAAI,CAAC,KAAK,CAAC,MAAM,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,KAAK,CAAC,MAAM,EAAE,CAAC,CAAC,CAEjE;QAAA,CAAC,KAAK,CAAC,QAAQ,CACjB;MAAA,EAAE,SAAS,CACb;IAAA,EAAE,kBAAkB,CAAC,QAAQ,CAAC,CAC/B,CAAC;AACJ,CAAC","sourcesContent":["import React from 'react';\n\nimport type { GameProps } from '../../../../types/gamePresentation';\nimport { GameRuntimeContext } from '../../composition/GameRuntimeContext';\nimport { useGameRuntime } from '../../composition/useGameRuntime';\nimport { GameField } from './GameField';\n\n/*** Bind one serializable game definition to a local transient session and presentation field. */\nexport function Game(props: GameProps) {\n const runtime = useGameRuntime(props);\n\n return (\n <GameRuntimeContext.Provider value={runtime}>\n <GameField\n {...(props.aspectRatio === undefined ? {} : { aspectRatio: props.aspectRatio })}\n {...(props.minHeight === undefined ? {} : { minHeight: props.minHeight })}\n {...(props.clip === undefined ? {} : { clip: props.clip })}\n {...(props.accessibilityLabel === undefined\n ? {}\n : { accessibilityLabel: props.accessibilityLabel })}\n {...(props.testID === undefined ? {} : { testID: props.testID })}\n >\n {props.children}\n </GameField>\n </GameRuntimeContext.Provider>\n );\n}\n"]}
@@ -0,0 +1,5 @@
1
+ import React from 'react';
2
+ import type { GameRuntimeContextValue } from '../../../types/gameRuntime';
3
+ /*** Provide the local transient game session and event dispatcher to presentation adapters. */
4
+ export declare const GameRuntimeContext: React.Context<GameRuntimeContextValue | null>;
5
+ //# sourceMappingURL=GameRuntimeContext.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GameRuntimeContext.d.ts","sourceRoot":"","sources":["../../../../src/features/game-presentation/composition/GameRuntimeContext.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,4BAA4B,CAAC;AAE1E,+FAA+F;AAC/F,eAAO,MAAM,kBAAkB,+CAA4D,CAAC"}
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ /*** Provide the local transient game session and event dispatcher to presentation adapters. */
3
+ export const GameRuntimeContext = React.createContext(null);
4
+ //# sourceMappingURL=GameRuntimeContext.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GameRuntimeContext.js","sourceRoot":"","sources":["../../../../src/features/game-presentation/composition/GameRuntimeContext.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,+FAA+F;AAC/F,MAAM,CAAC,MAAM,kBAAkB,GAAG,KAAK,CAAC,aAAa,CAAiC,IAAI,CAAC,CAAC","sourcesContent":["import React from 'react';\n\nimport type { GameRuntimeContextValue } from '../../../types/gameRuntime';\n\n/*** Provide the local transient game session and event dispatcher to presentation adapters. */\nexport const GameRuntimeContext = React.createContext<GameRuntimeContextValue | null>(null);\n"]}
@@ -0,0 +1,5 @@
1
+ import type { GameProps } from '../../../types/gamePresentation';
2
+ import type { GameRuntimeContextValue } from '../../../types/gameRuntime';
3
+ /*** Own one local transient Game session while delegating all domain transitions to @ankhorage/game. */
4
+ export declare function useGameRuntime(props: GameProps): GameRuntimeContextValue;
5
+ //# sourceMappingURL=useGameRuntime.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useGameRuntime.d.ts","sourceRoot":"","sources":["../../../../src/features/game-presentation/composition/useGameRuntime.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAC;AACjE,OAAO,KAAK,EAAE,uBAAuB,EAAoB,MAAM,4BAA4B,CAAC;AAK5F,wGAAwG;AACxG,wBAAgB,cAAc,CAAC,KAAK,EAAE,SAAS,GAAG,uBAAuB,CAqDxE"}