@ankhorage/zora-game 0.4.1 → 0.6.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 (108) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/README.md +1 -1
  3. package/dist/ZORA_GAME_COMPONENT_META.d.ts +177 -2
  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 +182 -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 +180 -2
  12. package/dist/ZORA_PLUGIN_METADATA.d.ts.map +1 -1
  13. package/dist/ZORA_PLUGIN_METADATA.js +4 -0
  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 +4 -1
  17. package/dist/features/game-presentation/adapters/inbound/Game.js.map +1 -1
  18. package/dist/features/game-presentation/adapters/inbound/GameEntity.d.ts +2 -1
  19. package/dist/features/game-presentation/adapters/inbound/GameEntity.d.ts.map +1 -1
  20. package/dist/features/game-presentation/adapters/inbound/GameEntity.js +14 -4
  21. package/dist/features/game-presentation/adapters/inbound/GameEntity.js.map +1 -1
  22. package/dist/features/game-presentation/adapters/inbound/GameInputZone.d.ts +2 -2
  23. package/dist/features/game-presentation/adapters/inbound/GameInputZone.d.ts.map +1 -1
  24. package/dist/features/game-presentation/adapters/inbound/GameInputZone.js +19 -5
  25. package/dist/features/game-presentation/adapters/inbound/GameInputZone.js.map +1 -1
  26. package/dist/features/game-presentation/adapters/inbound/GameMeasurementProbe.d.ts +4 -0
  27. package/dist/features/game-presentation/adapters/inbound/GameMeasurementProbe.d.ts.map +1 -0
  28. package/dist/features/game-presentation/adapters/inbound/GameMeasurementProbe.js +52 -0
  29. package/dist/features/game-presentation/adapters/inbound/GameMeasurementProbe.js.map +1 -0
  30. package/dist/features/game-presentation/adapters/inbound/createGameKeyboardEvent.d.ts +16 -0
  31. package/dist/features/game-presentation/adapters/inbound/createGameKeyboardEvent.d.ts.map +1 -0
  32. package/dist/features/game-presentation/adapters/inbound/createGameKeyboardEvent.js +16 -0
  33. package/dist/features/game-presentation/adapters/inbound/createGameKeyboardEvent.js.map +1 -0
  34. package/dist/features/game-presentation/adapters/inbound/createGameMeasurementEvent.d.ts +14 -0
  35. package/dist/features/game-presentation/adapters/inbound/createGameMeasurementEvent.d.ts.map +1 -0
  36. package/dist/features/game-presentation/adapters/inbound/createGameMeasurementEvent.js +25 -0
  37. package/dist/features/game-presentation/adapters/inbound/createGameMeasurementEvent.js.map +1 -0
  38. package/dist/features/game-presentation/adapters/inbound/measureGameEntity.d.ts +5 -0
  39. package/dist/features/game-presentation/adapters/inbound/measureGameEntity.d.ts.map +1 -0
  40. package/dist/features/game-presentation/adapters/inbound/measureGameEntity.js +22 -0
  41. package/dist/features/game-presentation/adapters/inbound/measureGameEntity.js.map +1 -0
  42. package/dist/features/game-presentation/adapters/inbound/useGameInputZoneResponder.d.ts +6 -0
  43. package/dist/features/game-presentation/adapters/inbound/useGameInputZoneResponder.d.ts.map +1 -1
  44. package/dist/features/game-presentation/adapters/inbound/useGameInputZoneResponder.js +15 -0
  45. package/dist/features/game-presentation/adapters/inbound/useGameInputZoneResponder.js.map +1 -1
  46. package/dist/features/game-presentation/composition/createGameMeasurementRegistry.d.ts +4 -0
  47. package/dist/features/game-presentation/composition/createGameMeasurementRegistry.d.ts.map +1 -0
  48. package/dist/features/game-presentation/composition/createGameMeasurementRegistry.js +15 -0
  49. package/dist/features/game-presentation/composition/createGameMeasurementRegistry.js.map +1 -0
  50. package/dist/features/game-presentation/composition/useGameRuntime.d.ts +2 -2
  51. package/dist/features/game-presentation/composition/useGameRuntime.d.ts.map +1 -1
  52. package/dist/features/game-presentation/composition/useGameRuntime.js.map +1 -1
  53. package/dist/features/game-presentation/meta/gameEntityMeta.d.ts +14 -0
  54. package/dist/features/game-presentation/meta/gameEntityMeta.d.ts.map +1 -1
  55. package/dist/features/game-presentation/meta/gameEntityMeta.js +7 -0
  56. package/dist/features/game-presentation/meta/gameEntityMeta.js.map +1 -1
  57. package/dist/features/game-presentation/meta/gameInputZoneMeta.d.ts +52 -1
  58. package/dist/features/game-presentation/meta/gameInputZoneMeta.d.ts.map +1 -1
  59. package/dist/features/game-presentation/meta/gameInputZoneMeta.js +47 -1
  60. package/dist/features/game-presentation/meta/gameInputZoneMeta.js.map +1 -1
  61. package/dist/features/game-presentation/meta/gameMeasurementProbeMeta.d.ts +112 -0
  62. package/dist/features/game-presentation/meta/gameMeasurementProbeMeta.d.ts.map +1 -0
  63. package/dist/features/game-presentation/meta/gameMeasurementProbeMeta.js +70 -0
  64. package/dist/features/game-presentation/meta/gameMeasurementProbeMeta.js.map +1 -0
  65. package/dist/features/game-presentation/meta/gameMeta.d.ts +1 -1
  66. package/dist/features/game-presentation/meta/gameMeta.d.ts.map +1 -1
  67. package/dist/features/game-presentation/meta/gameMeta.js +9 -1
  68. package/dist/features/game-presentation/meta/gameMeta.js.map +1 -1
  69. package/dist/features/game-presentation/public.d.ts +2 -1
  70. package/dist/features/game-presentation/public.d.ts.map +1 -1
  71. package/dist/features/game-presentation/public.js +1 -0
  72. package/dist/features/game-presentation/public.js.map +1 -1
  73. package/dist/index.d.ts +2 -2
  74. package/dist/index.d.ts.map +1 -1
  75. package/dist/index.js +1 -1
  76. package/dist/index.js.map +1 -1
  77. package/dist/types/gamePresentation.d.ts +16 -0
  78. package/dist/types/gamePresentation.d.ts.map +1 -1
  79. package/dist/types/gamePresentation.js.map +1 -1
  80. package/dist/types/gameRuntime.d.ts +16 -1
  81. package/dist/types/gameRuntime.d.ts.map +1 -1
  82. package/dist/types/gameRuntime.js.map +1 -1
  83. package/package.json +1 -1
  84. package/src/ZORA_GAME_COMPONENT_META.ts +2 -0
  85. package/src/ZORA_GAME_PLUGIN.ts +2 -0
  86. package/src/ZORA_PLUGIN_METADATA.test.ts +37 -10
  87. package/src/ZORA_PLUGIN_METADATA.ts +4 -0
  88. package/src/features/game-presentation/adapters/inbound/Game.tsx +7 -1
  89. package/src/features/game-presentation/adapters/inbound/GameEntity.tsx +15 -2
  90. package/src/features/game-presentation/adapters/inbound/GameInputZone.tsx +36 -9
  91. package/src/features/game-presentation/adapters/inbound/GameMeasurementProbe.tsx +79 -0
  92. package/src/features/game-presentation/adapters/inbound/createGameKeyboardEvent.test.ts +51 -0
  93. package/src/features/game-presentation/adapters/inbound/createGameKeyboardEvent.ts +33 -0
  94. package/src/features/game-presentation/adapters/inbound/createGameMeasurementEvent.test.ts +56 -0
  95. package/src/features/game-presentation/adapters/inbound/createGameMeasurementEvent.ts +38 -0
  96. package/src/features/game-presentation/adapters/inbound/measureGameEntity.ts +28 -0
  97. package/src/features/game-presentation/adapters/inbound/useGameInputZoneResponder.ts +22 -0
  98. package/src/features/game-presentation/composition/createGameMeasurementRegistry.test.ts +35 -0
  99. package/src/features/game-presentation/composition/createGameMeasurementRegistry.ts +16 -0
  100. package/src/features/game-presentation/composition/useGameRuntime.ts +3 -3
  101. package/src/features/game-presentation/meta/gameEntityMeta.ts +7 -0
  102. package/src/features/game-presentation/meta/gameInputZoneMeta.ts +47 -1
  103. package/src/features/game-presentation/meta/gameMeasurementProbeMeta.ts +72 -0
  104. package/src/features/game-presentation/meta/gameMeta.ts +9 -1
  105. package/src/features/game-presentation/public.ts +3 -0
  106. package/src/index.ts +3 -0
  107. package/src/types/gamePresentation.ts +18 -0
  108. package/src/types/gameRuntime.ts +19 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,19 @@
1
1
  # @ankhorage/zora-game
2
2
 
3
+ ## 0.6.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 867360a: Add cross-platform measurable Game entities and a non-visual measurement probe that reports raw
8
+ source/target bounds through the normal Game event path without deciding collision semantics.
9
+
10
+ ## 0.5.0
11
+
12
+ ### Minor Changes
13
+
14
+ - 16cf5a7: Add declarative web keyboard bindings to GameInputZone while preserving its existing native/mobile
15
+ pointer and touch normalization path.
16
+
3
17
  ## 0.4.1
4
18
 
5
19
  ### Patch 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.4.1](././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.6.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
 
@@ -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", "GameInputZone", "GameOverlay", "Gradient", "Image", "View"];
8
+ readonly allowedChildren: readonly ["GameEntity", "GameInputZone", "GameMeasurementProbe", "GameOverlay", "Gradient", "Image", "View"];
9
9
  readonly blueprint: {
10
10
  readonly label: "Game";
11
11
  readonly defaultProps: {
@@ -191,6 +191,12 @@ export declare const ZORA_GAME_COMPONENT_META: {
191
191
  };
192
192
  readonly acceptsFallback: true;
193
193
  };
194
+ readonly measurementId: {
195
+ readonly value: {
196
+ readonly type: "string";
197
+ };
198
+ readonly acceptsFallback: true;
199
+ };
194
200
  };
195
201
  };
196
202
  readonly props: {
@@ -283,6 +289,14 @@ export declare const ZORA_GAME_COMPONENT_META: {
283
289
  readonly authority: "instance";
284
290
  };
285
291
  };
292
+ readonly measurementId: {
293
+ readonly type: "string";
294
+ readonly category: "Measurement";
295
+ readonly label: "Measurement id";
296
+ readonly authoring: {
297
+ readonly authority: "instance";
298
+ };
299
+ };
286
300
  readonly accessibilityLabel: {
287
301
  readonly type: "string";
288
302
  readonly category: "Accessibility";
@@ -346,7 +360,7 @@ export declare const ZORA_GAME_COMPONENT_META: {
346
360
  readonly GameInputZone: {
347
361
  readonly name: "GameInputZone";
348
362
  readonly category: "component";
349
- readonly description: "Normalizes pointer and touch positions into field-relative percentages and dispatches a generic game event.";
363
+ readonly description: "Normalizes pointer/touch positions and optional keyboard bindings into generic game events.";
350
364
  readonly directManifestNode: true;
351
365
  readonly allowedChildren: readonly [];
352
366
  readonly blueprint: {
@@ -443,6 +457,57 @@ export declare const ZORA_GAME_COMPONENT_META: {
443
457
  readonly authority: "instance";
444
458
  };
445
459
  };
460
+ readonly keyboardBindings: {
461
+ readonly type: "array";
462
+ readonly category: "Input";
463
+ readonly label: "Keyboard bindings";
464
+ readonly default: readonly [];
465
+ readonly itemSchema: readonly [{
466
+ readonly key: "key";
467
+ readonly schema: {
468
+ readonly type: "string";
469
+ readonly category: "Input";
470
+ readonly label: "Key";
471
+ readonly authoring: {
472
+ readonly authority: "instance";
473
+ };
474
+ };
475
+ }, {
476
+ readonly key: "eventType";
477
+ readonly schema: {
478
+ readonly type: "string";
479
+ readonly category: "Input";
480
+ readonly label: "Event type";
481
+ readonly authoring: {
482
+ readonly authority: "instance";
483
+ };
484
+ };
485
+ }, {
486
+ readonly key: "entityId";
487
+ readonly schema: {
488
+ readonly type: "string";
489
+ readonly category: "Input";
490
+ readonly label: "Entity id";
491
+ readonly authoring: {
492
+ readonly authority: "instance";
493
+ };
494
+ };
495
+ }, {
496
+ readonly key: "preventDefault";
497
+ readonly schema: {
498
+ readonly type: "boolean";
499
+ readonly category: "Input";
500
+ readonly label: "Prevent browser default";
501
+ readonly default: false;
502
+ readonly authoring: {
503
+ readonly authority: "instance";
504
+ };
505
+ };
506
+ }];
507
+ readonly authoring: {
508
+ readonly authority: "instance";
509
+ };
510
+ };
446
511
  readonly accessibilityLabel: {
447
512
  readonly type: "string";
448
513
  readonly category: "Accessibility";
@@ -453,6 +518,116 @@ export declare const ZORA_GAME_COMPONENT_META: {
453
518
  };
454
519
  };
455
520
  };
521
+ readonly GameMeasurementProbe: {
522
+ readonly name: "GameMeasurementProbe";
523
+ readonly category: "component";
524
+ readonly description: "Measures two registered game entities and reports their raw rendered bounds through a generic Game event.";
525
+ readonly directManifestNode: true;
526
+ readonly allowedChildren: readonly [];
527
+ readonly blueprint: {
528
+ readonly label: "Game measurement probe";
529
+ readonly defaultProps: {
530
+ readonly sourceId: "source";
531
+ readonly targetId: "target";
532
+ readonly eventType: "game.measurement";
533
+ readonly delayMs: 0;
534
+ readonly enabled: true;
535
+ };
536
+ };
537
+ readonly bindings: {
538
+ readonly props: {
539
+ readonly sourceId: {
540
+ readonly value: {
541
+ readonly type: "string";
542
+ };
543
+ readonly acceptsFallback: true;
544
+ };
545
+ readonly targetId: {
546
+ readonly value: {
547
+ readonly type: "string";
548
+ };
549
+ readonly acceptsFallback: true;
550
+ };
551
+ readonly eventType: {
552
+ readonly value: {
553
+ readonly type: "string";
554
+ };
555
+ readonly acceptsFallback: true;
556
+ };
557
+ readonly entityId: {
558
+ readonly value: {
559
+ readonly type: "string";
560
+ };
561
+ readonly acceptsFallback: true;
562
+ };
563
+ readonly delayMs: {
564
+ readonly value: {
565
+ readonly type: "number";
566
+ };
567
+ readonly acceptsFallback: true;
568
+ };
569
+ readonly enabled: {
570
+ readonly value: {
571
+ readonly type: "boolean";
572
+ };
573
+ readonly acceptsFallback: true;
574
+ };
575
+ };
576
+ };
577
+ readonly props: {
578
+ readonly sourceId: {
579
+ readonly type: "string";
580
+ readonly category: "Measurement";
581
+ readonly label: "Source id";
582
+ readonly authoring: {
583
+ readonly authority: "instance";
584
+ };
585
+ };
586
+ readonly targetId: {
587
+ readonly type: "string";
588
+ readonly category: "Measurement";
589
+ readonly label: "Target id";
590
+ readonly authoring: {
591
+ readonly authority: "instance";
592
+ };
593
+ };
594
+ readonly eventType: {
595
+ readonly type: "string";
596
+ readonly category: "Measurement";
597
+ readonly label: "Event type";
598
+ readonly default: "game.measurement";
599
+ readonly authoring: {
600
+ readonly authority: "instance";
601
+ };
602
+ };
603
+ readonly entityId: {
604
+ readonly type: "string";
605
+ readonly category: "Measurement";
606
+ readonly label: "Game entity id";
607
+ readonly authoring: {
608
+ readonly authority: "instance";
609
+ };
610
+ };
611
+ readonly delayMs: {
612
+ readonly type: "number";
613
+ readonly category: "Measurement";
614
+ readonly label: "Delay (ms)";
615
+ readonly default: 0;
616
+ readonly authoring: {
617
+ readonly authority: "instance";
618
+ };
619
+ };
620
+ readonly enabled: {
621
+ readonly type: "boolean";
622
+ readonly category: "State";
623
+ readonly label: "Enabled";
624
+ readonly default: true;
625
+ readonly authoring: {
626
+ readonly authority: "instance";
627
+ };
628
+ };
629
+ };
630
+ };
456
631
  readonly GameOverlay: {
457
632
  readonly name: "GameOverlay";
458
633
  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":"AAMA,8EAA8E;AAC9E,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAO3B,CAAC"}
@@ -1,6 +1,7 @@
1
1
  import { gameEntityMeta } from './features/game-presentation/meta/gameEntityMeta';
2
2
  import { gameFieldMeta } from './features/game-presentation/meta/gameFieldMeta';
3
3
  import { gameInputZoneMeta } from './features/game-presentation/meta/gameInputZoneMeta';
4
+ import { gameMeasurementProbeMeta } from './features/game-presentation/meta/gameMeasurementProbeMeta';
4
5
  import { gameMeta } from './features/game-presentation/meta/gameMeta';
5
6
  import { gameOverlayMeta } from './features/game-presentation/meta/gameOverlayMeta';
6
7
  /*** Register the generic game presentation metadata owned by this package. */
@@ -9,6 +10,7 @@ export const ZORA_GAME_COMPONENT_META = {
9
10
  GameEntity: gameEntityMeta,
10
11
  GameField: gameFieldMeta,
11
12
  GameInputZone: gameInputZoneMeta,
13
+ GameMeasurementProbe: gameMeasurementProbeMeta,
12
14
  GameOverlay: gameOverlayMeta,
13
15
  };
14
16
  //# 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,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
+ {"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,wBAAwB,EAAE,MAAM,4DAA4D,CAAC;AACtG,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,oBAAoB,EAAE,wBAAwB;IAC9C,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 { gameMeasurementProbeMeta } from './features/game-presentation/meta/gameMeasurementProbeMeta';\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 GameMeasurementProbe: gameMeasurementProbeMeta,\n GameOverlay: gameOverlayMeta,\n} as const;\n"]}
@@ -2,6 +2,7 @@ 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
4
  import { GameInputZone } from './features/game-presentation/adapters/inbound/GameInputZone';
5
+ import { GameMeasurementProbe } from './features/game-presentation/adapters/inbound/GameMeasurementProbe';
5
6
  import { GameOverlay } from './features/game-presentation/adapters/inbound/GameOverlay';
6
7
  /*** Expose the runtime component registry together with metadata for ZORA plugin consumers. */
7
8
  export declare const ZORA_GAME_PLUGIN: {
@@ -10,6 +11,7 @@ export declare const ZORA_GAME_PLUGIN: {
10
11
  readonly GameEntity: typeof GameEntity;
11
12
  readonly GameField: typeof GameField;
12
13
  readonly GameInputZone: typeof GameInputZone;
14
+ readonly GameMeasurementProbe: typeof GameMeasurementProbe;
13
15
  readonly GameOverlay: typeof GameOverlay;
14
16
  };
15
17
  readonly packageName: "@ankhorage/zora-game";
@@ -20,7 +22,7 @@ export declare const ZORA_GAME_PLUGIN: {
20
22
  readonly category: "pattern";
21
23
  readonly description: "Embeds one config-driven game session inside ordinary ZORA layout and emits domain-neutral game outputs.";
22
24
  readonly directManifestNode: true;
23
- readonly allowedChildren: readonly ["GameEntity", "GameInputZone", "GameOverlay", "Gradient", "Image", "View"];
25
+ readonly allowedChildren: readonly ["GameEntity", "GameInputZone", "GameMeasurementProbe", "GameOverlay", "Gradient", "Image", "View"];
24
26
  readonly blueprint: {
25
27
  readonly label: "Game";
26
28
  readonly defaultProps: {
@@ -206,6 +208,12 @@ export declare const ZORA_GAME_PLUGIN: {
206
208
  };
207
209
  readonly acceptsFallback: true;
208
210
  };
211
+ readonly measurementId: {
212
+ readonly value: {
213
+ readonly type: "string";
214
+ };
215
+ readonly acceptsFallback: true;
216
+ };
209
217
  };
210
218
  };
211
219
  readonly props: {
@@ -298,6 +306,14 @@ export declare const ZORA_GAME_PLUGIN: {
298
306
  readonly authority: "instance";
299
307
  };
300
308
  };
309
+ readonly measurementId: {
310
+ readonly type: "string";
311
+ readonly category: "Measurement";
312
+ readonly label: "Measurement id";
313
+ readonly authoring: {
314
+ readonly authority: "instance";
315
+ };
316
+ };
301
317
  readonly accessibilityLabel: {
302
318
  readonly type: "string";
303
319
  readonly category: "Accessibility";
@@ -361,7 +377,7 @@ export declare const ZORA_GAME_PLUGIN: {
361
377
  readonly GameInputZone: {
362
378
  readonly name: "GameInputZone";
363
379
  readonly category: "component";
364
- readonly description: "Normalizes pointer and touch positions into field-relative percentages and dispatches a generic game event.";
380
+ readonly description: "Normalizes pointer/touch positions and optional keyboard bindings into generic game events.";
365
381
  readonly directManifestNode: true;
366
382
  readonly allowedChildren: readonly [];
367
383
  readonly blueprint: {
@@ -458,6 +474,57 @@ export declare const ZORA_GAME_PLUGIN: {
458
474
  readonly authority: "instance";
459
475
  };
460
476
  };
477
+ readonly keyboardBindings: {
478
+ readonly type: "array";
479
+ readonly category: "Input";
480
+ readonly label: "Keyboard bindings";
481
+ readonly default: readonly [];
482
+ readonly itemSchema: readonly [{
483
+ readonly key: "key";
484
+ readonly schema: {
485
+ readonly type: "string";
486
+ readonly category: "Input";
487
+ readonly label: "Key";
488
+ readonly authoring: {
489
+ readonly authority: "instance";
490
+ };
491
+ };
492
+ }, {
493
+ readonly key: "eventType";
494
+ readonly schema: {
495
+ readonly type: "string";
496
+ readonly category: "Input";
497
+ readonly label: "Event type";
498
+ readonly authoring: {
499
+ readonly authority: "instance";
500
+ };
501
+ };
502
+ }, {
503
+ readonly key: "entityId";
504
+ readonly schema: {
505
+ readonly type: "string";
506
+ readonly category: "Input";
507
+ readonly label: "Entity id";
508
+ readonly authoring: {
509
+ readonly authority: "instance";
510
+ };
511
+ };
512
+ }, {
513
+ readonly key: "preventDefault";
514
+ readonly schema: {
515
+ readonly type: "boolean";
516
+ readonly category: "Input";
517
+ readonly label: "Prevent browser default";
518
+ readonly default: false;
519
+ readonly authoring: {
520
+ readonly authority: "instance";
521
+ };
522
+ };
523
+ }];
524
+ readonly authoring: {
525
+ readonly authority: "instance";
526
+ };
527
+ };
461
528
  readonly accessibilityLabel: {
462
529
  readonly type: "string";
463
530
  readonly category: "Accessibility";
@@ -468,6 +535,116 @@ export declare const ZORA_GAME_PLUGIN: {
468
535
  };
469
536
  };
470
537
  };
538
+ readonly GameMeasurementProbe: {
539
+ readonly name: "GameMeasurementProbe";
540
+ readonly category: "component";
541
+ readonly description: "Measures two registered game entities and reports their raw rendered bounds through a generic Game event.";
542
+ readonly directManifestNode: true;
543
+ readonly allowedChildren: readonly [];
544
+ readonly blueprint: {
545
+ readonly label: "Game measurement probe";
546
+ readonly defaultProps: {
547
+ readonly sourceId: "source";
548
+ readonly targetId: "target";
549
+ readonly eventType: "game.measurement";
550
+ readonly delayMs: 0;
551
+ readonly enabled: true;
552
+ };
553
+ };
554
+ readonly bindings: {
555
+ readonly props: {
556
+ readonly sourceId: {
557
+ readonly value: {
558
+ readonly type: "string";
559
+ };
560
+ readonly acceptsFallback: true;
561
+ };
562
+ readonly targetId: {
563
+ readonly value: {
564
+ readonly type: "string";
565
+ };
566
+ readonly acceptsFallback: true;
567
+ };
568
+ readonly eventType: {
569
+ readonly value: {
570
+ readonly type: "string";
571
+ };
572
+ readonly acceptsFallback: true;
573
+ };
574
+ readonly entityId: {
575
+ readonly value: {
576
+ readonly type: "string";
577
+ };
578
+ readonly acceptsFallback: true;
579
+ };
580
+ readonly delayMs: {
581
+ readonly value: {
582
+ readonly type: "number";
583
+ };
584
+ readonly acceptsFallback: true;
585
+ };
586
+ readonly enabled: {
587
+ readonly value: {
588
+ readonly type: "boolean";
589
+ };
590
+ readonly acceptsFallback: true;
591
+ };
592
+ };
593
+ };
594
+ readonly props: {
595
+ readonly sourceId: {
596
+ readonly type: "string";
597
+ readonly category: "Measurement";
598
+ readonly label: "Source id";
599
+ readonly authoring: {
600
+ readonly authority: "instance";
601
+ };
602
+ };
603
+ readonly targetId: {
604
+ readonly type: "string";
605
+ readonly category: "Measurement";
606
+ readonly label: "Target id";
607
+ readonly authoring: {
608
+ readonly authority: "instance";
609
+ };
610
+ };
611
+ readonly eventType: {
612
+ readonly type: "string";
613
+ readonly category: "Measurement";
614
+ readonly label: "Event type";
615
+ readonly default: "game.measurement";
616
+ readonly authoring: {
617
+ readonly authority: "instance";
618
+ };
619
+ };
620
+ readonly entityId: {
621
+ readonly type: "string";
622
+ readonly category: "Measurement";
623
+ readonly label: "Game entity id";
624
+ readonly authoring: {
625
+ readonly authority: "instance";
626
+ };
627
+ };
628
+ readonly delayMs: {
629
+ readonly type: "number";
630
+ readonly category: "Measurement";
631
+ readonly label: "Delay (ms)";
632
+ readonly default: 0;
633
+ readonly authoring: {
634
+ readonly authority: "instance";
635
+ };
636
+ };
637
+ readonly enabled: {
638
+ readonly type: "boolean";
639
+ readonly category: "State";
640
+ readonly label: "Enabled";
641
+ readonly default: true;
642
+ readonly authoring: {
643
+ readonly authority: "instance";
644
+ };
645
+ };
646
+ };
647
+ };
471
648
  readonly GameOverlay: {
472
649
  readonly name: "GameOverlay";
473
650
  readonly category: "layout";
@@ -535,6 +712,9 @@ export declare const ZORA_GAME_PLUGIN: {
535
712
  }, {
536
713
  readonly child: "GameInputZone";
537
714
  readonly parents: readonly ["Game"];
715
+ }, {
716
+ readonly child: "GameMeasurementProbe";
717
+ readonly parents: readonly ["Game"];
538
718
  }, {
539
719
  readonly child: "GameOverlay";
540
720
  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,aAAa,EAAE,MAAM,6DAA6D,CAAC;AAC5F,OAAO,EAAE,WAAW,EAAE,MAAM,2DAA2D,CAAC;AAGxF,+FAA+F;AAC/F,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CASnB,CAAC"}
1
+ {"version":3,"file":"Z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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAUnB,CAAC"}
@@ -2,6 +2,7 @@ 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
4
  import { GameInputZone } from './features/game-presentation/adapters/inbound/GameInputZone';
5
+ import { GameMeasurementProbe } from './features/game-presentation/adapters/inbound/GameMeasurementProbe';
5
6
  import { GameOverlay } from './features/game-presentation/adapters/inbound/GameOverlay';
6
7
  import { ZORA_PLUGIN_METADATA } from './ZORA_PLUGIN_METADATA';
7
8
  /*** Expose the runtime component registry together with metadata for ZORA plugin consumers. */
@@ -12,6 +13,7 @@ export const ZORA_GAME_PLUGIN = {
12
13
  GameEntity,
13
14
  GameField,
14
15
  GameInputZone,
16
+ GameMeasurementProbe,
15
17
  GameOverlay,
16
18
  },
17
19
  };
@@ -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,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"]}
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,oBAAoB,EAAE,MAAM,oEAAoE,CAAC;AAC1G,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,oBAAoB;QACpB,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 { GameMeasurementProbe } from './features/game-presentation/adapters/inbound/GameMeasurementProbe';\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 GameMeasurementProbe,\n GameOverlay,\n },\n} as const;\n"]}