@ankhorage/zora-game 0.5.0 → 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.
- package/CHANGELOG.md +7 -0
- package/README.md +1 -1
- package/dist/ZORA_GAME_COMPONENT_META.d.ts +125 -1
- package/dist/ZORA_GAME_COMPONENT_META.d.ts.map +1 -1
- package/dist/ZORA_GAME_COMPONENT_META.js +2 -0
- package/dist/ZORA_GAME_COMPONENT_META.js.map +1 -1
- package/dist/ZORA_GAME_PLUGIN.d.ts +130 -1
- package/dist/ZORA_GAME_PLUGIN.d.ts.map +1 -1
- package/dist/ZORA_GAME_PLUGIN.js +2 -0
- package/dist/ZORA_GAME_PLUGIN.js.map +1 -1
- package/dist/ZORA_PLUGIN_METADATA.d.ts +128 -1
- package/dist/ZORA_PLUGIN_METADATA.d.ts.map +1 -1
- package/dist/ZORA_PLUGIN_METADATA.js +4 -0
- package/dist/ZORA_PLUGIN_METADATA.js.map +1 -1
- package/dist/features/game-presentation/adapters/inbound/Game.d.ts.map +1 -1
- package/dist/features/game-presentation/adapters/inbound/Game.js +4 -1
- package/dist/features/game-presentation/adapters/inbound/Game.js.map +1 -1
- package/dist/features/game-presentation/adapters/inbound/GameEntity.d.ts +2 -1
- package/dist/features/game-presentation/adapters/inbound/GameEntity.d.ts.map +1 -1
- package/dist/features/game-presentation/adapters/inbound/GameEntity.js +14 -4
- package/dist/features/game-presentation/adapters/inbound/GameEntity.js.map +1 -1
- package/dist/features/game-presentation/adapters/inbound/GameMeasurementProbe.d.ts +4 -0
- package/dist/features/game-presentation/adapters/inbound/GameMeasurementProbe.d.ts.map +1 -0
- package/dist/features/game-presentation/adapters/inbound/GameMeasurementProbe.js +52 -0
- package/dist/features/game-presentation/adapters/inbound/GameMeasurementProbe.js.map +1 -0
- package/dist/features/game-presentation/adapters/inbound/createGameMeasurementEvent.d.ts +14 -0
- package/dist/features/game-presentation/adapters/inbound/createGameMeasurementEvent.d.ts.map +1 -0
- package/dist/features/game-presentation/adapters/inbound/createGameMeasurementEvent.js +25 -0
- package/dist/features/game-presentation/adapters/inbound/createGameMeasurementEvent.js.map +1 -0
- package/dist/features/game-presentation/adapters/inbound/measureGameEntity.d.ts +5 -0
- package/dist/features/game-presentation/adapters/inbound/measureGameEntity.d.ts.map +1 -0
- package/dist/features/game-presentation/adapters/inbound/measureGameEntity.js +22 -0
- package/dist/features/game-presentation/adapters/inbound/measureGameEntity.js.map +1 -0
- package/dist/features/game-presentation/composition/createGameMeasurementRegistry.d.ts +4 -0
- package/dist/features/game-presentation/composition/createGameMeasurementRegistry.d.ts.map +1 -0
- package/dist/features/game-presentation/composition/createGameMeasurementRegistry.js +15 -0
- package/dist/features/game-presentation/composition/createGameMeasurementRegistry.js.map +1 -0
- package/dist/features/game-presentation/composition/useGameRuntime.d.ts +2 -2
- package/dist/features/game-presentation/composition/useGameRuntime.d.ts.map +1 -1
- package/dist/features/game-presentation/composition/useGameRuntime.js.map +1 -1
- package/dist/features/game-presentation/meta/gameEntityMeta.d.ts +14 -0
- package/dist/features/game-presentation/meta/gameEntityMeta.d.ts.map +1 -1
- package/dist/features/game-presentation/meta/gameEntityMeta.js +7 -0
- package/dist/features/game-presentation/meta/gameEntityMeta.js.map +1 -1
- package/dist/features/game-presentation/meta/gameMeasurementProbeMeta.d.ts +112 -0
- package/dist/features/game-presentation/meta/gameMeasurementProbeMeta.d.ts.map +1 -0
- package/dist/features/game-presentation/meta/gameMeasurementProbeMeta.js +70 -0
- package/dist/features/game-presentation/meta/gameMeasurementProbeMeta.js.map +1 -0
- package/dist/features/game-presentation/meta/gameMeta.d.ts +1 -1
- package/dist/features/game-presentation/meta/gameMeta.d.ts.map +1 -1
- package/dist/features/game-presentation/meta/gameMeta.js +9 -1
- package/dist/features/game-presentation/meta/gameMeta.js.map +1 -1
- package/dist/features/game-presentation/public.d.ts +2 -1
- package/dist/features/game-presentation/public.d.ts.map +1 -1
- package/dist/features/game-presentation/public.js +1 -0
- package/dist/features/game-presentation/public.js.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/types/gamePresentation.d.ts +9 -0
- package/dist/types/gamePresentation.d.ts.map +1 -1
- package/dist/types/gamePresentation.js.map +1 -1
- package/dist/types/gameRuntime.d.ts +16 -1
- package/dist/types/gameRuntime.d.ts.map +1 -1
- package/dist/types/gameRuntime.js.map +1 -1
- package/package.json +1 -1
- package/src/ZORA_GAME_COMPONENT_META.ts +2 -0
- package/src/ZORA_GAME_PLUGIN.ts +2 -0
- package/src/ZORA_PLUGIN_METADATA.test.ts +18 -0
- package/src/ZORA_PLUGIN_METADATA.ts +4 -0
- package/src/features/game-presentation/adapters/inbound/Game.tsx +7 -1
- package/src/features/game-presentation/adapters/inbound/GameEntity.tsx +15 -2
- package/src/features/game-presentation/adapters/inbound/GameMeasurementProbe.tsx +79 -0
- package/src/features/game-presentation/adapters/inbound/createGameMeasurementEvent.test.ts +56 -0
- package/src/features/game-presentation/adapters/inbound/createGameMeasurementEvent.ts +38 -0
- package/src/features/game-presentation/adapters/inbound/measureGameEntity.ts +28 -0
- package/src/features/game-presentation/composition/createGameMeasurementRegistry.test.ts +35 -0
- package/src/features/game-presentation/composition/createGameMeasurementRegistry.ts +16 -0
- package/src/features/game-presentation/composition/useGameRuntime.ts +3 -3
- package/src/features/game-presentation/meta/gameEntityMeta.ts +7 -0
- package/src/features/game-presentation/meta/gameMeasurementProbeMeta.ts +72 -0
- package/src/features/game-presentation/meta/gameMeta.ts +9 -1
- package/src/features/game-presentation/public.ts +2 -0
- package/src/index.ts +2 -0
- package/src/types/gamePresentation.ts +10 -0
- package/src/types/gameRuntime.ts +19 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
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
|
+
|
|
3
10
|
## 0.5.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
|
-
         
|
|
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";
|
|
@@ -504,6 +518,116 @@ export declare const ZORA_GAME_COMPONENT_META: {
|
|
|
504
518
|
};
|
|
505
519
|
};
|
|
506
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
|
+
};
|
|
507
631
|
readonly GameOverlay: {
|
|
508
632
|
readonly name: "GameOverlay";
|
|
509
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":"
|
|
1
|
+
{"version":3,"file":"ZORA_GAME_COMPONENT_META.d.ts","sourceRoot":"","sources":["../src/ZORA_GAME_COMPONENT_META.ts"],"names":[],"mappings":"AAOA,8EAA8E;AAC9E,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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";
|
|
@@ -519,6 +535,116 @@ export declare const ZORA_GAME_PLUGIN: {
|
|
|
519
535
|
};
|
|
520
536
|
};
|
|
521
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
|
+
};
|
|
522
648
|
readonly GameOverlay: {
|
|
523
649
|
readonly name: "GameOverlay";
|
|
524
650
|
readonly category: "layout";
|
|
@@ -586,6 +712,9 @@ export declare const ZORA_GAME_PLUGIN: {
|
|
|
586
712
|
}, {
|
|
587
713
|
readonly child: "GameInputZone";
|
|
588
714
|
readonly parents: readonly ["Game"];
|
|
715
|
+
}, {
|
|
716
|
+
readonly child: "GameMeasurementProbe";
|
|
717
|
+
readonly parents: readonly ["Game"];
|
|
589
718
|
}, {
|
|
590
719
|
readonly child: "GameOverlay";
|
|
591
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
|
|
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,oBAAoB,EAAE,MAAM,oEAAoE,CAAC;AAC1G,OAAO,EAAE,WAAW,EAAE,MAAM,2DAA2D,CAAC;AAGxF,+FAA+F;AAC/F,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAUnB,CAAC"}
|
package/dist/ZORA_GAME_PLUGIN.js
CHANGED
|
@@ -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"]}
|
|
@@ -8,7 +8,7 @@ export declare const ZORA_PLUGIN_METADATA: {
|
|
|
8
8
|
readonly category: "pattern";
|
|
9
9
|
readonly description: "Embeds one config-driven game session inside ordinary ZORA layout and emits domain-neutral game outputs.";
|
|
10
10
|
readonly directManifestNode: true;
|
|
11
|
-
readonly allowedChildren: readonly ["GameEntity", "GameInputZone", "GameOverlay", "Gradient", "Image", "View"];
|
|
11
|
+
readonly allowedChildren: readonly ["GameEntity", "GameInputZone", "GameMeasurementProbe", "GameOverlay", "Gradient", "Image", "View"];
|
|
12
12
|
readonly blueprint: {
|
|
13
13
|
readonly label: "Game";
|
|
14
14
|
readonly defaultProps: {
|
|
@@ -194,6 +194,12 @@ export declare const ZORA_PLUGIN_METADATA: {
|
|
|
194
194
|
};
|
|
195
195
|
readonly acceptsFallback: true;
|
|
196
196
|
};
|
|
197
|
+
readonly measurementId: {
|
|
198
|
+
readonly value: {
|
|
199
|
+
readonly type: "string";
|
|
200
|
+
};
|
|
201
|
+
readonly acceptsFallback: true;
|
|
202
|
+
};
|
|
197
203
|
};
|
|
198
204
|
};
|
|
199
205
|
readonly props: {
|
|
@@ -286,6 +292,14 @@ export declare const ZORA_PLUGIN_METADATA: {
|
|
|
286
292
|
readonly authority: "instance";
|
|
287
293
|
};
|
|
288
294
|
};
|
|
295
|
+
readonly measurementId: {
|
|
296
|
+
readonly type: "string";
|
|
297
|
+
readonly category: "Measurement";
|
|
298
|
+
readonly label: "Measurement id";
|
|
299
|
+
readonly authoring: {
|
|
300
|
+
readonly authority: "instance";
|
|
301
|
+
};
|
|
302
|
+
};
|
|
289
303
|
readonly accessibilityLabel: {
|
|
290
304
|
readonly type: "string";
|
|
291
305
|
readonly category: "Accessibility";
|
|
@@ -507,6 +521,116 @@ export declare const ZORA_PLUGIN_METADATA: {
|
|
|
507
521
|
};
|
|
508
522
|
};
|
|
509
523
|
};
|
|
524
|
+
readonly GameMeasurementProbe: {
|
|
525
|
+
readonly name: "GameMeasurementProbe";
|
|
526
|
+
readonly category: "component";
|
|
527
|
+
readonly description: "Measures two registered game entities and reports their raw rendered bounds through a generic Game event.";
|
|
528
|
+
readonly directManifestNode: true;
|
|
529
|
+
readonly allowedChildren: readonly [];
|
|
530
|
+
readonly blueprint: {
|
|
531
|
+
readonly label: "Game measurement probe";
|
|
532
|
+
readonly defaultProps: {
|
|
533
|
+
readonly sourceId: "source";
|
|
534
|
+
readonly targetId: "target";
|
|
535
|
+
readonly eventType: "game.measurement";
|
|
536
|
+
readonly delayMs: 0;
|
|
537
|
+
readonly enabled: true;
|
|
538
|
+
};
|
|
539
|
+
};
|
|
540
|
+
readonly bindings: {
|
|
541
|
+
readonly props: {
|
|
542
|
+
readonly sourceId: {
|
|
543
|
+
readonly value: {
|
|
544
|
+
readonly type: "string";
|
|
545
|
+
};
|
|
546
|
+
readonly acceptsFallback: true;
|
|
547
|
+
};
|
|
548
|
+
readonly targetId: {
|
|
549
|
+
readonly value: {
|
|
550
|
+
readonly type: "string";
|
|
551
|
+
};
|
|
552
|
+
readonly acceptsFallback: true;
|
|
553
|
+
};
|
|
554
|
+
readonly eventType: {
|
|
555
|
+
readonly value: {
|
|
556
|
+
readonly type: "string";
|
|
557
|
+
};
|
|
558
|
+
readonly acceptsFallback: true;
|
|
559
|
+
};
|
|
560
|
+
readonly entityId: {
|
|
561
|
+
readonly value: {
|
|
562
|
+
readonly type: "string";
|
|
563
|
+
};
|
|
564
|
+
readonly acceptsFallback: true;
|
|
565
|
+
};
|
|
566
|
+
readonly delayMs: {
|
|
567
|
+
readonly value: {
|
|
568
|
+
readonly type: "number";
|
|
569
|
+
};
|
|
570
|
+
readonly acceptsFallback: true;
|
|
571
|
+
};
|
|
572
|
+
readonly enabled: {
|
|
573
|
+
readonly value: {
|
|
574
|
+
readonly type: "boolean";
|
|
575
|
+
};
|
|
576
|
+
readonly acceptsFallback: true;
|
|
577
|
+
};
|
|
578
|
+
};
|
|
579
|
+
};
|
|
580
|
+
readonly props: {
|
|
581
|
+
readonly sourceId: {
|
|
582
|
+
readonly type: "string";
|
|
583
|
+
readonly category: "Measurement";
|
|
584
|
+
readonly label: "Source id";
|
|
585
|
+
readonly authoring: {
|
|
586
|
+
readonly authority: "instance";
|
|
587
|
+
};
|
|
588
|
+
};
|
|
589
|
+
readonly targetId: {
|
|
590
|
+
readonly type: "string";
|
|
591
|
+
readonly category: "Measurement";
|
|
592
|
+
readonly label: "Target id";
|
|
593
|
+
readonly authoring: {
|
|
594
|
+
readonly authority: "instance";
|
|
595
|
+
};
|
|
596
|
+
};
|
|
597
|
+
readonly eventType: {
|
|
598
|
+
readonly type: "string";
|
|
599
|
+
readonly category: "Measurement";
|
|
600
|
+
readonly label: "Event type";
|
|
601
|
+
readonly default: "game.measurement";
|
|
602
|
+
readonly authoring: {
|
|
603
|
+
readonly authority: "instance";
|
|
604
|
+
};
|
|
605
|
+
};
|
|
606
|
+
readonly entityId: {
|
|
607
|
+
readonly type: "string";
|
|
608
|
+
readonly category: "Measurement";
|
|
609
|
+
readonly label: "Game entity id";
|
|
610
|
+
readonly authoring: {
|
|
611
|
+
readonly authority: "instance";
|
|
612
|
+
};
|
|
613
|
+
};
|
|
614
|
+
readonly delayMs: {
|
|
615
|
+
readonly type: "number";
|
|
616
|
+
readonly category: "Measurement";
|
|
617
|
+
readonly label: "Delay (ms)";
|
|
618
|
+
readonly default: 0;
|
|
619
|
+
readonly authoring: {
|
|
620
|
+
readonly authority: "instance";
|
|
621
|
+
};
|
|
622
|
+
};
|
|
623
|
+
readonly enabled: {
|
|
624
|
+
readonly type: "boolean";
|
|
625
|
+
readonly category: "State";
|
|
626
|
+
readonly label: "Enabled";
|
|
627
|
+
readonly default: true;
|
|
628
|
+
readonly authoring: {
|
|
629
|
+
readonly authority: "instance";
|
|
630
|
+
};
|
|
631
|
+
};
|
|
632
|
+
};
|
|
633
|
+
};
|
|
510
634
|
readonly GameOverlay: {
|
|
511
635
|
readonly name: "GameOverlay";
|
|
512
636
|
readonly category: "layout";
|
|
@@ -574,6 +698,9 @@ export declare const ZORA_PLUGIN_METADATA: {
|
|
|
574
698
|
}, {
|
|
575
699
|
readonly child: "GameInputZone";
|
|
576
700
|
readonly parents: readonly ["Game"];
|
|
701
|
+
}, {
|
|
702
|
+
readonly child: "GameMeasurementProbe";
|
|
703
|
+
readonly parents: readonly ["Game"];
|
|
577
704
|
}, {
|
|
578
705
|
readonly child: "GameOverlay";
|
|
579
706
|
readonly parents: readonly ["Game", "GameField"];
|
|
@@ -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
|
|
1
|
+
{"version":3,"file":"ZORA_PLUGIN_METADATA.d.ts","sourceRoot":"","sources":["../src/ZORA_PLUGIN_METADATA.ts"],"names":[],"mappings":"AAIA,sFAAsF;AACtF,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+BM,CAAC"}
|
|
@@ -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,MAAM,EAAE,YAAY,EAAE,WAAW,EAAE,eAAe,EAAE,aAAa,CAAC;IACnF,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,eAAe;YACtB,OAAO,EAAE,CAAC,MAAM,CAAC;SAClB;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', 'GameEntity', 'GameField', 'GameInputZone', '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: 'GameInputZone',\n parents: ['Game'],\n },\n {\n child: 'GameOverlay',\n parents: ['Game', '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,YAAY,EAAE,WAAW,EAAE,eAAe,EAAE,aAAa,CAAC;IACnF,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,eAAe;YACtB,OAAO,EAAE,CAAC,MAAM,CAAC;SAClB;QACD;YACE,KAAK,EAAE,sBAAsB;YAC7B,OAAO,EAAE,CAAC,MAAM,CAAC;SAClB;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', 'GameEntity', 'GameField', 'GameInputZone', '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: 'GameInputZone',\n parents: ['Game'],\n },\n {\n child: 'GameMeasurementProbe',\n parents: ['Game'],\n },\n {\n child: 'GameOverlay',\n parents: ['Game', 'GameField'],\n },\n ],\n} as const satisfies ZoraPluginMetadata;\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Game.d.ts","sourceRoot":"","sources":["../../../../../src/features/game-presentation/adapters/inbound/Game.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,oCAAoC,CAAC;
|
|
1
|
+
{"version":3,"file":"Game.d.ts","sourceRoot":"","sources":["../../../../../src/features/game-presentation/adapters/inbound/Game.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,oCAAoC,CAAC;AAOpE,kGAAkG;AAClG,wBAAgB,IAAI,CAAC,KAAK,EAAE,SAAS,qBA6BpC"}
|
|
@@ -1,14 +1,17 @@
|
|
|
1
1
|
import { RuntimeRendererConfigProvider } from '@ankhorage/runtime';
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { createGameBindingContext } from '../../composition/createGameBindingContext';
|
|
4
|
+
import { createGameMeasurementRegistry } from '../../composition/createGameMeasurementRegistry';
|
|
4
5
|
import { GameRuntimeContext } from '../../composition/GameRuntimeContext';
|
|
5
6
|
import { useGameRuntime } from '../../composition/useGameRuntime';
|
|
6
7
|
import { GameField } from './GameField';
|
|
7
8
|
/*** Bind one serializable game definition to a local transient session and presentation field. */
|
|
8
9
|
export function Game(props) {
|
|
9
10
|
const runtime = useGameRuntime(props);
|
|
11
|
+
const [measurementRegistry] = React.useState(createGameMeasurementRegistry);
|
|
12
|
+
const runtimeContext = React.useMemo(() => ({ ...runtime, ...measurementRegistry }), [measurementRegistry, runtime]);
|
|
10
13
|
const runtimeBindingConfig = React.useMemo(() => ({ bindingContext: createGameBindingContext(runtime.session) }), [runtime.session]);
|
|
11
|
-
return (<GameRuntimeContext.Provider value={
|
|
14
|
+
return (<GameRuntimeContext.Provider value={runtimeContext}>
|
|
12
15
|
<RuntimeRendererConfigProvider value={runtimeBindingConfig}>
|
|
13
16
|
<GameField {...(props.aspectRatio === undefined ? {} : { aspectRatio: props.aspectRatio })} {...(props.minHeight === undefined ? {} : { minHeight: props.minHeight })} {...(props.clip === undefined ? {} : { clip: props.clip })} {...(props.accessibilityLabel === undefined
|
|
14
17
|
? {}
|