@ankhorage/zora-game 0.2.0 → 0.4.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 (87) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/README.md +2 -1
  3. package/dist/ZORA_GAME_COMPONENT_META.d.ts +169 -1
  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 +175 -2
  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 +173 -2
  12. package/dist/ZORA_PLUGIN_METADATA.d.ts.map +1 -1
  13. package/dist/ZORA_PLUGIN_METADATA.js +5 -1
  14. package/dist/ZORA_PLUGIN_METADATA.js.map +1 -1
  15. package/dist/features/game-presentation/adapters/inbound/Game.d.ts.map +1 -1
  16. package/dist/features/game-presentation/adapters/inbound/Game.js +8 -3
  17. package/dist/features/game-presentation/adapters/inbound/Game.js.map +1 -1
  18. package/dist/features/game-presentation/adapters/inbound/GameEntity.d.ts.map +1 -1
  19. package/dist/features/game-presentation/adapters/inbound/GameEntity.js +4 -11
  20. package/dist/features/game-presentation/adapters/inbound/GameEntity.js.map +1 -1
  21. package/dist/features/game-presentation/adapters/inbound/GameInputZone.d.ts +4 -0
  22. package/dist/features/game-presentation/adapters/inbound/GameInputZone.d.ts.map +1 -0
  23. package/dist/features/game-presentation/adapters/inbound/GameInputZone.js +35 -0
  24. package/dist/features/game-presentation/adapters/inbound/GameInputZone.js.map +1 -0
  25. package/dist/features/game-presentation/adapters/inbound/createGamePointerEvent.d.ts +17 -0
  26. package/dist/features/game-presentation/adapters/inbound/createGamePointerEvent.d.ts.map +1 -0
  27. package/dist/features/game-presentation/adapters/inbound/createGamePointerEvent.js +20 -0
  28. package/dist/features/game-presentation/adapters/inbound/createGamePointerEvent.js.map +1 -0
  29. package/dist/features/game-presentation/adapters/inbound/useGameInputZoneResponder.d.ts +9 -0
  30. package/dist/features/game-presentation/adapters/inbound/useGameInputZoneResponder.d.ts.map +1 -0
  31. package/dist/features/game-presentation/adapters/inbound/useGameInputZoneResponder.js +37 -0
  32. package/dist/features/game-presentation/adapters/inbound/useGameInputZoneResponder.js.map +1 -0
  33. package/dist/features/game-presentation/composition/createGameBindingContext.d.ts +4 -0
  34. package/dist/features/game-presentation/composition/createGameBindingContext.d.ts.map +1 -0
  35. package/dist/features/game-presentation/composition/createGameBindingContext.js +9 -0
  36. package/dist/features/game-presentation/composition/createGameBindingContext.js.map +1 -0
  37. package/dist/features/game-presentation/meta/gameEntityMeta.d.ts +58 -0
  38. package/dist/features/game-presentation/meta/gameEntityMeta.d.ts.map +1 -1
  39. package/dist/features/game-presentation/meta/gameEntityMeta.js +13 -0
  40. package/dist/features/game-presentation/meta/gameEntityMeta.js.map +1 -1
  41. package/dist/features/game-presentation/meta/gameInputZoneMeta.d.ts +112 -0
  42. package/dist/features/game-presentation/meta/gameInputZoneMeta.d.ts.map +1 -0
  43. package/dist/features/game-presentation/meta/gameInputZoneMeta.js +92 -0
  44. package/dist/features/game-presentation/meta/gameInputZoneMeta.js.map +1 -0
  45. package/dist/features/game-presentation/meta/gameMeta.d.ts +1 -1
  46. package/dist/features/game-presentation/meta/gameMeta.js +1 -1
  47. package/dist/features/game-presentation/meta/gameMeta.js.map +1 -1
  48. package/dist/features/game-presentation/public.d.ts +2 -1
  49. package/dist/features/game-presentation/public.d.ts.map +1 -1
  50. package/dist/features/game-presentation/public.js +1 -0
  51. package/dist/features/game-presentation/public.js.map +1 -1
  52. package/dist/features/game-presentation/utils/clampGamePercentage.d.ts +3 -0
  53. package/dist/features/game-presentation/utils/clampGamePercentage.d.ts.map +1 -0
  54. package/dist/features/game-presentation/utils/clampGamePercentage.js +5 -0
  55. package/dist/features/game-presentation/utils/clampGamePercentage.js.map +1 -0
  56. package/dist/features/game-presentation/utils/toGamePercentage.d.ts +3 -0
  57. package/dist/features/game-presentation/utils/toGamePercentage.d.ts.map +1 -0
  58. package/dist/features/game-presentation/utils/toGamePercentage.js +6 -0
  59. package/dist/features/game-presentation/utils/toGamePercentage.js.map +1 -0
  60. package/dist/index.d.ts +2 -2
  61. package/dist/index.d.ts.map +1 -1
  62. package/dist/index.js +1 -1
  63. package/dist/index.js.map +1 -1
  64. package/dist/types/gamePresentation.d.ts +13 -0
  65. package/dist/types/gamePresentation.d.ts.map +1 -1
  66. package/dist/types/gamePresentation.js.map +1 -1
  67. package/package.json +3 -2
  68. package/src/ZORA_GAME_COMPONENT_META.ts +2 -0
  69. package/src/ZORA_GAME_PLUGIN.ts +2 -0
  70. package/src/ZORA_PLUGIN_METADATA.test.ts +20 -0
  71. package/src/ZORA_PLUGIN_METADATA.ts +5 -1
  72. package/src/features/game-presentation/adapters/inbound/Game.tsx +19 -11
  73. package/src/features/game-presentation/adapters/inbound/GameEntity.tsx +4 -13
  74. package/src/features/game-presentation/adapters/inbound/GameInputZone.tsx +70 -0
  75. package/src/features/game-presentation/adapters/inbound/createGamePointerEvent.test.ts +56 -0
  76. package/src/features/game-presentation/adapters/inbound/createGamePointerEvent.ts +39 -0
  77. package/src/features/game-presentation/adapters/inbound/useGameInputZoneResponder.ts +49 -0
  78. package/src/features/game-presentation/composition/createGameBindingContext.test.ts +47 -0
  79. package/src/features/game-presentation/composition/createGameBindingContext.ts +10 -0
  80. package/src/features/game-presentation/meta/gameEntityMeta.ts +13 -0
  81. package/src/features/game-presentation/meta/gameInputZoneMeta.ts +94 -0
  82. package/src/features/game-presentation/meta/gameMeta.ts +1 -1
  83. package/src/features/game-presentation/public.ts +2 -0
  84. package/src/features/game-presentation/utils/clampGamePercentage.ts +4 -0
  85. package/src/features/game-presentation/utils/toGamePercentage.ts +6 -0
  86. package/src/index.ts +8 -1
  87. package/src/types/gamePresentation.ts +14 -0
package/CHANGELOG.md CHANGED
@@ -1,5 +1,19 @@
1
1
  # @ankhorage/zora-game
2
2
 
3
+ ## 0.4.0
4
+
5
+ ### Minor Changes
6
+
7
+ - fd5e7c9: Expose each local Game session through the canonical Runtime binding context so ordinary ZORA props,
8
+ including positioned entity, text, progress, and health presentation, can bind to game session data.
9
+
10
+ ## 0.3.0
11
+
12
+ ### Minor Changes
13
+
14
+ - ee7760c: Add a generic field-relative pointer and touch input-zone adapter that dispatches normalized events
15
+ into the embeddable Game runtime without owning gameplay rules.
16
+
3
17
  ## 0.2.0
4
18
 
5
19
  ### 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.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)
6
+ ![license: MIT](././paradox/badges/license.svg) ![npm: v0.4.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
 
@@ -17,4 +17,5 @@ Generic game presentation primitives for React Native and React Native Web apps
17
17
  - [Export graph](././paradox/diagrams/export-graph.mmd)
18
18
  - [Game sequence](././paradox/diagrams/sequences/game.mmd)
19
19
  - [GameEntity sequence](././paradox/diagrams/sequences/game-entity.mmd)
20
+ - [GameInputZone sequence](././paradox/diagrams/sequences/game-input-zone.mmd)
20
21
  - [GameOverlay sequence](././paradox/diagrams/sequences/game-overlay.mmd)
@@ -5,7 +5,7 @@ export declare const ZORA_GAME_COMPONENT_META: {
5
5
  readonly category: "pattern";
6
6
  readonly description: "Embeds one config-driven game session inside ordinary ZORA layout and emits domain-neutral game outputs.";
7
7
  readonly directManifestNode: true;
8
- readonly allowedChildren: readonly ["GameEntity", "GameOverlay", "Gradient", "Image", "View"];
8
+ readonly allowedChildren: readonly ["GameEntity", "GameInputZone", "GameOverlay", "Gradient", "Image", "View"];
9
9
  readonly blueprint: {
10
10
  readonly label: "Game";
11
11
  readonly defaultProps: {
@@ -135,6 +135,64 @@ export declare const ZORA_GAME_COMPONENT_META: {
135
135
  readonly zIndex: 0;
136
136
  };
137
137
  };
138
+ readonly bindings: {
139
+ readonly props: {
140
+ readonly x: {
141
+ readonly value: {
142
+ readonly type: "number";
143
+ };
144
+ readonly acceptsFallback: true;
145
+ };
146
+ readonly y: {
147
+ readonly value: {
148
+ readonly type: "number";
149
+ };
150
+ readonly acceptsFallback: true;
151
+ };
152
+ readonly width: {
153
+ readonly value: {
154
+ readonly type: "number";
155
+ };
156
+ readonly acceptsFallback: true;
157
+ };
158
+ readonly height: {
159
+ readonly value: {
160
+ readonly type: "number";
161
+ };
162
+ readonly acceptsFallback: true;
163
+ };
164
+ readonly opacity: {
165
+ readonly value: {
166
+ readonly type: "number";
167
+ };
168
+ readonly acceptsFallback: true;
169
+ };
170
+ readonly scale: {
171
+ readonly value: {
172
+ readonly type: "number";
173
+ };
174
+ readonly acceptsFallback: true;
175
+ };
176
+ readonly rotation: {
177
+ readonly value: {
178
+ readonly type: "number";
179
+ };
180
+ readonly acceptsFallback: true;
181
+ };
182
+ readonly zIndex: {
183
+ readonly value: {
184
+ readonly type: "number";
185
+ };
186
+ readonly acceptsFallback: true;
187
+ };
188
+ readonly hidden: {
189
+ readonly value: {
190
+ readonly type: "boolean";
191
+ };
192
+ readonly acceptsFallback: true;
193
+ };
194
+ };
195
+ };
138
196
  readonly props: {
139
197
  readonly x: {
140
198
  readonly type: "number";
@@ -285,6 +343,116 @@ export declare const ZORA_GAME_COMPONENT_META: {
285
343
  };
286
344
  };
287
345
  };
346
+ readonly GameInputZone: {
347
+ readonly name: "GameInputZone";
348
+ readonly category: "component";
349
+ readonly description: "Normalizes pointer and touch positions into field-relative percentages and dispatches a generic game event.";
350
+ readonly directManifestNode: true;
351
+ readonly allowedChildren: readonly [];
352
+ readonly blueprint: {
353
+ readonly label: "Game input zone";
354
+ readonly defaultProps: {
355
+ readonly eventType: "game.pointer";
356
+ readonly x: 0;
357
+ readonly y: 0;
358
+ readonly width: 100;
359
+ readonly height: 100;
360
+ readonly zIndex: 1;
361
+ readonly enabled: true;
362
+ readonly continuous: true;
363
+ };
364
+ };
365
+ readonly props: {
366
+ readonly eventType: {
367
+ readonly type: "string";
368
+ readonly category: "Input";
369
+ readonly label: "Game event type";
370
+ readonly default: "game.pointer";
371
+ readonly authoring: {
372
+ readonly authority: "instance";
373
+ };
374
+ };
375
+ readonly entityId: {
376
+ readonly type: "string";
377
+ readonly category: "Input";
378
+ readonly label: "Entity id";
379
+ readonly authoring: {
380
+ readonly authority: "instance";
381
+ };
382
+ };
383
+ readonly x: {
384
+ readonly type: "number";
385
+ readonly category: "Position";
386
+ readonly label: "X (%)";
387
+ readonly default: 0;
388
+ readonly authoring: {
389
+ readonly authority: "instance";
390
+ };
391
+ };
392
+ readonly y: {
393
+ readonly type: "number";
394
+ readonly category: "Position";
395
+ readonly label: "Y (%)";
396
+ readonly default: 0;
397
+ readonly authoring: {
398
+ readonly authority: "instance";
399
+ };
400
+ };
401
+ readonly width: {
402
+ readonly type: "number";
403
+ readonly category: "Size";
404
+ readonly label: "Width (%)";
405
+ readonly default: 100;
406
+ readonly authoring: {
407
+ readonly authority: "instance";
408
+ };
409
+ };
410
+ readonly height: {
411
+ readonly type: "number";
412
+ readonly category: "Size";
413
+ readonly label: "Height (%)";
414
+ readonly default: 100;
415
+ readonly authoring: {
416
+ readonly authority: "instance";
417
+ };
418
+ };
419
+ readonly zIndex: {
420
+ readonly type: "number";
421
+ readonly category: "Position";
422
+ readonly label: "Z index";
423
+ readonly default: 1;
424
+ readonly authoring: {
425
+ readonly authority: "instance";
426
+ };
427
+ };
428
+ readonly enabled: {
429
+ readonly type: "boolean";
430
+ readonly category: "State";
431
+ readonly label: "Enabled";
432
+ readonly default: true;
433
+ readonly authoring: {
434
+ readonly authority: "instance";
435
+ };
436
+ };
437
+ readonly continuous: {
438
+ readonly type: "boolean";
439
+ readonly category: "Input";
440
+ readonly label: "Dispatch while moving";
441
+ readonly default: true;
442
+ readonly authoring: {
443
+ readonly authority: "instance";
444
+ };
445
+ };
446
+ readonly accessibilityLabel: {
447
+ readonly type: "string";
448
+ readonly category: "Accessibility";
449
+ readonly label: "Accessibility label";
450
+ readonly authoring: {
451
+ readonly authority: "instance";
452
+ };
453
+ };
454
+ };
455
+ };
288
456
  readonly GameOverlay: {
289
457
  readonly name: "GameOverlay";
290
458
  readonly category: "layout";
@@ -1 +1 @@
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
+ {"version":3,"file":"ZORA_GAME_COMPONENT_META.d.ts","sourceRoot":"","sources":["../src/ZORA_GAME_COMPONENT_META.ts"],"names":[],"mappings":"AAMA,8EAA8E;AAC9E,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAM3B,CAAC"}
@@ -1,5 +1,6 @@
1
1
  import { gameEntityMeta } from './features/game-presentation/meta/gameEntityMeta';
2
2
  import { gameFieldMeta } from './features/game-presentation/meta/gameFieldMeta';
3
+ import { gameInputZoneMeta } from './features/game-presentation/meta/gameInputZoneMeta';
3
4
  import { gameMeta } from './features/game-presentation/meta/gameMeta';
4
5
  import { gameOverlayMeta } from './features/game-presentation/meta/gameOverlayMeta';
5
6
  /*** Register the generic game presentation metadata owned by this package. */
@@ -7,6 +8,7 @@ export const ZORA_GAME_COMPONENT_META = {
7
8
  Game: gameMeta,
8
9
  GameEntity: gameEntityMeta,
9
10
  GameField: gameFieldMeta,
11
+ GameInputZone: gameInputZoneMeta,
10
12
  GameOverlay: gameOverlayMeta,
11
13
  };
12
14
  //# sourceMappingURL=ZORA_GAME_COMPONENT_META.js.map
@@ -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,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
+ {"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,iBAAiB,EAAE,MAAM,qDAAqD,CAAC;AACxF,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,aAAa,EAAE,iBAAiB;IAChC,WAAW,EAAE,eAAe;CACpB,CAAC","sourcesContent":["import { gameEntityMeta } from './features/game-presentation/meta/gameEntityMeta';\nimport { gameFieldMeta } from './features/game-presentation/meta/gameFieldMeta';\nimport { gameInputZoneMeta } from './features/game-presentation/meta/gameInputZoneMeta';\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 GameInputZone: gameInputZoneMeta,\n GameOverlay: gameOverlayMeta,\n} as const;\n"]}
@@ -1,6 +1,7 @@
1
1
  import { Game } from './features/game-presentation/adapters/inbound/Game';
2
2
  import { GameEntity } from './features/game-presentation/adapters/inbound/GameEntity';
3
3
  import { GameField } from './features/game-presentation/adapters/inbound/GameField';
4
+ import { GameInputZone } from './features/game-presentation/adapters/inbound/GameInputZone';
4
5
  import { GameOverlay } from './features/game-presentation/adapters/inbound/GameOverlay';
5
6
  /*** Expose the runtime component registry together with metadata for ZORA plugin consumers. */
6
7
  export declare const ZORA_GAME_PLUGIN: {
@@ -8,6 +9,7 @@ export declare const ZORA_GAME_PLUGIN: {
8
9
  readonly Game: typeof Game;
9
10
  readonly GameEntity: typeof GameEntity;
10
11
  readonly GameField: typeof GameField;
12
+ readonly GameInputZone: typeof GameInputZone;
11
13
  readonly GameOverlay: typeof GameOverlay;
12
14
  };
13
15
  readonly packageName: "@ankhorage/zora-game";
@@ -18,7 +20,7 @@ export declare const ZORA_GAME_PLUGIN: {
18
20
  readonly category: "pattern";
19
21
  readonly description: "Embeds one config-driven game session inside ordinary ZORA layout and emits domain-neutral game outputs.";
20
22
  readonly directManifestNode: true;
21
- readonly allowedChildren: readonly ["GameEntity", "GameOverlay", "Gradient", "Image", "View"];
23
+ readonly allowedChildren: readonly ["GameEntity", "GameInputZone", "GameOverlay", "Gradient", "Image", "View"];
22
24
  readonly blueprint: {
23
25
  readonly label: "Game";
24
26
  readonly defaultProps: {
@@ -148,6 +150,64 @@ export declare const ZORA_GAME_PLUGIN: {
148
150
  readonly zIndex: 0;
149
151
  };
150
152
  };
153
+ readonly bindings: {
154
+ readonly props: {
155
+ readonly x: {
156
+ readonly value: {
157
+ readonly type: "number";
158
+ };
159
+ readonly acceptsFallback: true;
160
+ };
161
+ readonly y: {
162
+ readonly value: {
163
+ readonly type: "number";
164
+ };
165
+ readonly acceptsFallback: true;
166
+ };
167
+ readonly width: {
168
+ readonly value: {
169
+ readonly type: "number";
170
+ };
171
+ readonly acceptsFallback: true;
172
+ };
173
+ readonly height: {
174
+ readonly value: {
175
+ readonly type: "number";
176
+ };
177
+ readonly acceptsFallback: true;
178
+ };
179
+ readonly opacity: {
180
+ readonly value: {
181
+ readonly type: "number";
182
+ };
183
+ readonly acceptsFallback: true;
184
+ };
185
+ readonly scale: {
186
+ readonly value: {
187
+ readonly type: "number";
188
+ };
189
+ readonly acceptsFallback: true;
190
+ };
191
+ readonly rotation: {
192
+ readonly value: {
193
+ readonly type: "number";
194
+ };
195
+ readonly acceptsFallback: true;
196
+ };
197
+ readonly zIndex: {
198
+ readonly value: {
199
+ readonly type: "number";
200
+ };
201
+ readonly acceptsFallback: true;
202
+ };
203
+ readonly hidden: {
204
+ readonly value: {
205
+ readonly type: "boolean";
206
+ };
207
+ readonly acceptsFallback: true;
208
+ };
209
+ };
210
+ };
151
211
  readonly props: {
152
212
  readonly x: {
153
213
  readonly type: "number";
@@ -298,6 +358,116 @@ export declare const ZORA_GAME_PLUGIN: {
298
358
  };
299
359
  };
300
360
  };
361
+ readonly GameInputZone: {
362
+ readonly name: "GameInputZone";
363
+ readonly category: "component";
364
+ readonly description: "Normalizes pointer and touch positions into field-relative percentages and dispatches a generic game event.";
365
+ readonly directManifestNode: true;
366
+ readonly allowedChildren: readonly [];
367
+ readonly blueprint: {
368
+ readonly label: "Game input zone";
369
+ readonly defaultProps: {
370
+ readonly eventType: "game.pointer";
371
+ readonly x: 0;
372
+ readonly y: 0;
373
+ readonly width: 100;
374
+ readonly height: 100;
375
+ readonly zIndex: 1;
376
+ readonly enabled: true;
377
+ readonly continuous: true;
378
+ };
379
+ };
380
+ readonly props: {
381
+ readonly eventType: {
382
+ readonly type: "string";
383
+ readonly category: "Input";
384
+ readonly label: "Game event type";
385
+ readonly default: "game.pointer";
386
+ readonly authoring: {
387
+ readonly authority: "instance";
388
+ };
389
+ };
390
+ readonly entityId: {
391
+ readonly type: "string";
392
+ readonly category: "Input";
393
+ readonly label: "Entity id";
394
+ readonly authoring: {
395
+ readonly authority: "instance";
396
+ };
397
+ };
398
+ readonly x: {
399
+ readonly type: "number";
400
+ readonly category: "Position";
401
+ readonly label: "X (%)";
402
+ readonly default: 0;
403
+ readonly authoring: {
404
+ readonly authority: "instance";
405
+ };
406
+ };
407
+ readonly y: {
408
+ readonly type: "number";
409
+ readonly category: "Position";
410
+ readonly label: "Y (%)";
411
+ readonly default: 0;
412
+ readonly authoring: {
413
+ readonly authority: "instance";
414
+ };
415
+ };
416
+ readonly width: {
417
+ readonly type: "number";
418
+ readonly category: "Size";
419
+ readonly label: "Width (%)";
420
+ readonly default: 100;
421
+ readonly authoring: {
422
+ readonly authority: "instance";
423
+ };
424
+ };
425
+ readonly height: {
426
+ readonly type: "number";
427
+ readonly category: "Size";
428
+ readonly label: "Height (%)";
429
+ readonly default: 100;
430
+ readonly authoring: {
431
+ readonly authority: "instance";
432
+ };
433
+ };
434
+ readonly zIndex: {
435
+ readonly type: "number";
436
+ readonly category: "Position";
437
+ readonly label: "Z index";
438
+ readonly default: 1;
439
+ readonly authoring: {
440
+ readonly authority: "instance";
441
+ };
442
+ };
443
+ readonly enabled: {
444
+ readonly type: "boolean";
445
+ readonly category: "State";
446
+ readonly label: "Enabled";
447
+ readonly default: true;
448
+ readonly authoring: {
449
+ readonly authority: "instance";
450
+ };
451
+ };
452
+ readonly continuous: {
453
+ readonly type: "boolean";
454
+ readonly category: "Input";
455
+ readonly label: "Dispatch while moving";
456
+ readonly default: true;
457
+ readonly authoring: {
458
+ readonly authority: "instance";
459
+ };
460
+ };
461
+ readonly accessibilityLabel: {
462
+ readonly type: "string";
463
+ readonly category: "Accessibility";
464
+ readonly label: "Accessibility label";
465
+ readonly authoring: {
466
+ readonly authority: "instance";
467
+ };
468
+ };
469
+ };
470
+ };
301
471
  readonly GameOverlay: {
302
472
  readonly name: "GameOverlay";
303
473
  readonly category: "layout";
@@ -352,7 +522,7 @@ export declare const ZORA_GAME_PLUGIN: {
352
522
  };
353
523
  };
354
524
  };
355
- readonly extensionHosts: readonly ["Game", "GameField", "GameEntity", "GameOverlay"];
525
+ readonly extensionHosts: readonly ["Game", "GameEntity", "GameField", "GameInputZone", "GameOverlay"];
356
526
  readonly placements: readonly [{
357
527
  readonly child: "Game";
358
528
  readonly parents: readonly ["Card", "Grid", "Screen", "ScreenSection", "View"];
@@ -362,6 +532,9 @@ export declare const ZORA_GAME_PLUGIN: {
362
532
  }, {
363
533
  readonly child: "GameEntity";
364
534
  readonly parents: readonly ["Game", "GameField", "GameOverlay"];
535
+ }, {
536
+ readonly child: "GameInputZone";
537
+ readonly parents: readonly ["Game"];
365
538
  }, {
366
539
  readonly child: "GameOverlay";
367
540
  readonly parents: readonly ["Game", "GameField"];
@@ -1 +1 @@
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
+ {"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,aAAa,EAAE,MAAM,6DAA6D,CAAC;AAC5F,OAAO,EAAE,WAAW,EAAE,MAAM,2DAA2D,CAAC;AAGxF,+FAA+F;AAC/F,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CASnB,CAAC"}
@@ -1,6 +1,7 @@
1
1
  import { Game } from './features/game-presentation/adapters/inbound/Game';
2
2
  import { GameEntity } from './features/game-presentation/adapters/inbound/GameEntity';
3
3
  import { GameField } from './features/game-presentation/adapters/inbound/GameField';
4
+ import { GameInputZone } from './features/game-presentation/adapters/inbound/GameInputZone';
4
5
  import { GameOverlay } from './features/game-presentation/adapters/inbound/GameOverlay';
5
6
  import { ZORA_PLUGIN_METADATA } from './ZORA_PLUGIN_METADATA';
6
7
  /*** Expose the runtime component registry together with metadata for ZORA plugin consumers. */
@@ -10,6 +11,7 @@ export const ZORA_GAME_PLUGIN = {
10
11
  Game,
11
12
  GameEntity,
12
13
  GameField,
14
+ GameInputZone,
13
15
  GameOverlay,
14
16
  },
15
17
  };
@@ -1 +1 @@
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"]}
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,aAAa,EAAE,MAAM,6DAA6D,CAAC;AAC5F,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,aAAa;QACb,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 { GameInputZone } from './features/game-presentation/adapters/inbound/GameInputZone';\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 GameInputZone,\n GameOverlay,\n },\n} as const;\n"]}