@ankhorage/zora-game 0.1.0 → 0.3.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 +14 -0
- package/README.md +3 -1
- package/dist/ZORA_GAME_COMPONENT_META.d.ts +228 -0
- package/dist/ZORA_GAME_COMPONENT_META.d.ts.map +1 -1
- package/dist/ZORA_GAME_COMPONENT_META.js +4 -0
- package/dist/ZORA_GAME_COMPONENT_META.js.map +1 -1
- package/dist/ZORA_GAME_PLUGIN.d.ts +241 -3
- package/dist/ZORA_GAME_PLUGIN.d.ts.map +1 -1
- package/dist/ZORA_GAME_PLUGIN.js +4 -0
- package/dist/ZORA_GAME_PLUGIN.js.map +1 -1
- package/dist/ZORA_PLUGIN_METADATA.d.ts +237 -3
- package/dist/ZORA_PLUGIN_METADATA.d.ts.map +1 -1
- package/dist/ZORA_PLUGIN_METADATA.js +11 -3
- package/dist/ZORA_PLUGIN_METADATA.js.map +1 -1
- package/dist/features/game-presentation/adapters/inbound/Game.d.ts +5 -0
- package/dist/features/game-presentation/adapters/inbound/Game.d.ts.map +1 -0
- package/dist/features/game-presentation/adapters/inbound/Game.js +16 -0
- package/dist/features/game-presentation/adapters/inbound/Game.js.map +1 -0
- package/dist/features/game-presentation/adapters/inbound/GameEntity.d.ts.map +1 -1
- package/dist/features/game-presentation/adapters/inbound/GameEntity.js +4 -11
- package/dist/features/game-presentation/adapters/inbound/GameEntity.js.map +1 -1
- package/dist/features/game-presentation/adapters/inbound/GameInputZone.d.ts +4 -0
- package/dist/features/game-presentation/adapters/inbound/GameInputZone.d.ts.map +1 -0
- package/dist/features/game-presentation/adapters/inbound/GameInputZone.js +35 -0
- package/dist/features/game-presentation/adapters/inbound/GameInputZone.js.map +1 -0
- package/dist/features/game-presentation/adapters/inbound/createGamePointerEvent.d.ts +17 -0
- package/dist/features/game-presentation/adapters/inbound/createGamePointerEvent.d.ts.map +1 -0
- package/dist/features/game-presentation/adapters/inbound/createGamePointerEvent.js +20 -0
- package/dist/features/game-presentation/adapters/inbound/createGamePointerEvent.js.map +1 -0
- package/dist/features/game-presentation/adapters/inbound/useGameInputZoneResponder.d.ts +9 -0
- package/dist/features/game-presentation/adapters/inbound/useGameInputZoneResponder.d.ts.map +1 -0
- package/dist/features/game-presentation/adapters/inbound/useGameInputZoneResponder.js +37 -0
- package/dist/features/game-presentation/adapters/inbound/useGameInputZoneResponder.js.map +1 -0
- package/dist/features/game-presentation/composition/GameRuntimeContext.d.ts +5 -0
- package/dist/features/game-presentation/composition/GameRuntimeContext.d.ts.map +1 -0
- package/dist/features/game-presentation/composition/GameRuntimeContext.js +4 -0
- package/dist/features/game-presentation/composition/GameRuntimeContext.js.map +1 -0
- package/dist/features/game-presentation/composition/useGameRuntime.d.ts +5 -0
- package/dist/features/game-presentation/composition/useGameRuntime.d.ts.map +1 -0
- package/dist/features/game-presentation/composition/useGameRuntime.js +103 -0
- package/dist/features/game-presentation/composition/useGameRuntime.js.map +1 -0
- package/dist/features/game-presentation/composition/useGameScheduledEffects.d.ts +17 -0
- package/dist/features/game-presentation/composition/useGameScheduledEffects.d.ts.map +1 -0
- package/dist/features/game-presentation/composition/useGameScheduledEffects.js +40 -0
- package/dist/features/game-presentation/composition/useGameScheduledEffects.js.map +1 -0
- package/dist/features/game-presentation/meta/gameInputZoneMeta.d.ts +112 -0
- package/dist/features/game-presentation/meta/gameInputZoneMeta.d.ts.map +1 -0
- package/dist/features/game-presentation/meta/gameInputZoneMeta.js +92 -0
- package/dist/features/game-presentation/meta/gameInputZoneMeta.js.map +1 -0
- package/dist/features/game-presentation/meta/gameMeta.d.ts +120 -0
- package/dist/features/game-presentation/meta/gameMeta.d.ts.map +1 -0
- package/dist/features/game-presentation/meta/gameMeta.js +97 -0
- package/dist/features/game-presentation/meta/gameMeta.js.map +1 -0
- package/dist/features/game-presentation/public.d.ts +3 -1
- package/dist/features/game-presentation/public.d.ts.map +1 -1
- package/dist/features/game-presentation/public.js +2 -0
- package/dist/features/game-presentation/public.js.map +1 -1
- package/dist/features/game-presentation/utils/clampGamePercentage.d.ts +3 -0
- package/dist/features/game-presentation/utils/clampGamePercentage.d.ts.map +1 -0
- package/dist/features/game-presentation/utils/clampGamePercentage.js +5 -0
- package/dist/features/game-presentation/utils/clampGamePercentage.js.map +1 -0
- package/dist/features/game-presentation/utils/toGamePercentage.d.ts +3 -0
- package/dist/features/game-presentation/utils/toGamePercentage.d.ts.map +1 -0
- package/dist/features/game-presentation/utils/toGamePercentage.js +6 -0
- package/dist/features/game-presentation/utils/toGamePercentage.js.map +1 -0
- 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 +22 -0
- package/dist/types/gamePresentation.d.ts.map +1 -1
- package/dist/types/gamePresentation.js.map +1 -1
- package/dist/types/gameRuntime.d.ts +12 -0
- package/dist/types/gameRuntime.d.ts.map +1 -0
- package/dist/types/gameRuntime.js +2 -0
- package/dist/types/gameRuntime.js.map +1 -0
- package/package.json +5 -2
- package/src/ZORA_GAME_COMPONENT_META.ts +4 -0
- package/src/ZORA_GAME_PLUGIN.ts +4 -0
- package/src/ZORA_PLUGIN_METADATA.test.ts +39 -5
- package/src/ZORA_PLUGIN_METADATA.ts +11 -3
- package/src/features/game-presentation/adapters/inbound/Game.tsx +27 -0
- package/src/features/game-presentation/adapters/inbound/GameEntity.tsx +4 -13
- package/src/features/game-presentation/adapters/inbound/GameInputZone.tsx +70 -0
- package/src/features/game-presentation/adapters/inbound/createGamePointerEvent.test.ts +56 -0
- package/src/features/game-presentation/adapters/inbound/createGamePointerEvent.ts +39 -0
- package/src/features/game-presentation/adapters/inbound/useGameInputZoneResponder.ts +49 -0
- package/src/features/game-presentation/composition/GameRuntimeContext.ts +6 -0
- package/src/features/game-presentation/composition/useGameRuntime.ts +181 -0
- package/src/features/game-presentation/composition/useGameScheduledEffects.ts +85 -0
- package/src/features/game-presentation/meta/gameInputZoneMeta.ts +94 -0
- package/src/features/game-presentation/meta/gameMeta.ts +99 -0
- package/src/features/game-presentation/public.ts +4 -0
- package/src/features/game-presentation/utils/clampGamePercentage.ts +4 -0
- package/src/features/game-presentation/utils/toGamePercentage.ts +6 -0
- package/src/index.ts +9 -1
- package/src/types/gamePresentation.ts +24 -0
- package/src/types/gameRuntime.ts +13 -0
|
@@ -3,6 +3,124 @@ export declare const ZORA_PLUGIN_METADATA: {
|
|
|
3
3
|
readonly packageName: "@ankhorage/zora-game";
|
|
4
4
|
readonly displayName: "ZORA Game";
|
|
5
5
|
readonly componentMeta: {
|
|
6
|
+
readonly Game: {
|
|
7
|
+
readonly name: "Game";
|
|
8
|
+
readonly category: "pattern";
|
|
9
|
+
readonly description: "Embeds one config-driven game session inside ordinary ZORA layout and emits domain-neutral game outputs.";
|
|
10
|
+
readonly directManifestNode: true;
|
|
11
|
+
readonly allowedChildren: readonly ["GameEntity", "GameInputZone", "GameOverlay", "Gradient", "Image", "View"];
|
|
12
|
+
readonly blueprint: {
|
|
13
|
+
readonly label: "Game";
|
|
14
|
+
readonly defaultProps: {
|
|
15
|
+
readonly definition: {
|
|
16
|
+
readonly id: "game";
|
|
17
|
+
readonly initialPhase: "playing";
|
|
18
|
+
readonly stages: readonly [{
|
|
19
|
+
readonly id: "main";
|
|
20
|
+
}];
|
|
21
|
+
readonly rules: readonly [];
|
|
22
|
+
};
|
|
23
|
+
readonly seed: 0;
|
|
24
|
+
readonly resetKey: "";
|
|
25
|
+
readonly autoAdvanceTime: true;
|
|
26
|
+
readonly minHeight: 320;
|
|
27
|
+
readonly clip: true;
|
|
28
|
+
};
|
|
29
|
+
};
|
|
30
|
+
readonly bindings: {
|
|
31
|
+
readonly props: {
|
|
32
|
+
readonly definition: {
|
|
33
|
+
readonly value: {
|
|
34
|
+
readonly type: "object";
|
|
35
|
+
};
|
|
36
|
+
readonly acceptsFallback: true;
|
|
37
|
+
};
|
|
38
|
+
readonly input: {
|
|
39
|
+
readonly value: {
|
|
40
|
+
readonly type: "record";
|
|
41
|
+
};
|
|
42
|
+
readonly acceptsFallback: true;
|
|
43
|
+
};
|
|
44
|
+
};
|
|
45
|
+
};
|
|
46
|
+
readonly events: {
|
|
47
|
+
readonly output: {
|
|
48
|
+
readonly label: "Game output";
|
|
49
|
+
readonly eventType: "game.output";
|
|
50
|
+
readonly description: "Emitted when the platform-neutral game runtime produces an app/domain output.";
|
|
51
|
+
readonly payloadFields: readonly [{
|
|
52
|
+
readonly path: "type";
|
|
53
|
+
readonly type: "string";
|
|
54
|
+
}, {
|
|
55
|
+
readonly path: "payload";
|
|
56
|
+
readonly type: "record";
|
|
57
|
+
}];
|
|
58
|
+
};
|
|
59
|
+
};
|
|
60
|
+
readonly props: {
|
|
61
|
+
readonly seed: {
|
|
62
|
+
readonly type: "number";
|
|
63
|
+
readonly category: "Runtime";
|
|
64
|
+
readonly label: "Initial seed";
|
|
65
|
+
readonly default: 0;
|
|
66
|
+
readonly authoring: {
|
|
67
|
+
readonly authority: "instance";
|
|
68
|
+
};
|
|
69
|
+
};
|
|
70
|
+
readonly resetKey: {
|
|
71
|
+
readonly type: "string";
|
|
72
|
+
readonly category: "Runtime";
|
|
73
|
+
readonly label: "Reset key";
|
|
74
|
+
readonly default: "";
|
|
75
|
+
readonly authoring: {
|
|
76
|
+
readonly authority: "instance";
|
|
77
|
+
};
|
|
78
|
+
};
|
|
79
|
+
readonly autoAdvanceTime: {
|
|
80
|
+
readonly type: "boolean";
|
|
81
|
+
readonly category: "Runtime";
|
|
82
|
+
readonly label: "Advance scheduled effects";
|
|
83
|
+
readonly default: true;
|
|
84
|
+
readonly authoring: {
|
|
85
|
+
readonly authority: "instance";
|
|
86
|
+
};
|
|
87
|
+
};
|
|
88
|
+
readonly aspectRatio: {
|
|
89
|
+
readonly type: "number";
|
|
90
|
+
readonly category: "Layout";
|
|
91
|
+
readonly label: "Aspect ratio";
|
|
92
|
+
readonly authoring: {
|
|
93
|
+
readonly authority: "instance";
|
|
94
|
+
};
|
|
95
|
+
};
|
|
96
|
+
readonly minHeight: {
|
|
97
|
+
readonly type: "number";
|
|
98
|
+
readonly category: "Layout";
|
|
99
|
+
readonly label: "Minimum height";
|
|
100
|
+
readonly default: 320;
|
|
101
|
+
readonly authoring: {
|
|
102
|
+
readonly authority: "instance";
|
|
103
|
+
};
|
|
104
|
+
};
|
|
105
|
+
readonly clip: {
|
|
106
|
+
readonly type: "boolean";
|
|
107
|
+
readonly category: "Layout";
|
|
108
|
+
readonly label: "Clip overflow";
|
|
109
|
+
readonly default: true;
|
|
110
|
+
readonly authoring: {
|
|
111
|
+
readonly authority: "instance";
|
|
112
|
+
};
|
|
113
|
+
};
|
|
114
|
+
readonly accessibilityLabel: {
|
|
115
|
+
readonly type: "string";
|
|
116
|
+
readonly category: "Accessibility";
|
|
117
|
+
readonly label: "Accessibility label";
|
|
118
|
+
readonly authoring: {
|
|
119
|
+
readonly authority: "instance";
|
|
120
|
+
};
|
|
121
|
+
};
|
|
122
|
+
};
|
|
123
|
+
};
|
|
6
124
|
readonly GameEntity: {
|
|
7
125
|
readonly name: "GameEntity";
|
|
8
126
|
readonly category: "component";
|
|
@@ -170,6 +288,116 @@ export declare const ZORA_PLUGIN_METADATA: {
|
|
|
170
288
|
};
|
|
171
289
|
};
|
|
172
290
|
};
|
|
291
|
+
readonly GameInputZone: {
|
|
292
|
+
readonly name: "GameInputZone";
|
|
293
|
+
readonly category: "component";
|
|
294
|
+
readonly description: "Normalizes pointer and touch positions into field-relative percentages and dispatches a generic game event.";
|
|
295
|
+
readonly directManifestNode: true;
|
|
296
|
+
readonly allowedChildren: readonly [];
|
|
297
|
+
readonly blueprint: {
|
|
298
|
+
readonly label: "Game input zone";
|
|
299
|
+
readonly defaultProps: {
|
|
300
|
+
readonly eventType: "game.pointer";
|
|
301
|
+
readonly x: 0;
|
|
302
|
+
readonly y: 0;
|
|
303
|
+
readonly width: 100;
|
|
304
|
+
readonly height: 100;
|
|
305
|
+
readonly zIndex: 1;
|
|
306
|
+
readonly enabled: true;
|
|
307
|
+
readonly continuous: true;
|
|
308
|
+
};
|
|
309
|
+
};
|
|
310
|
+
readonly props: {
|
|
311
|
+
readonly eventType: {
|
|
312
|
+
readonly type: "string";
|
|
313
|
+
readonly category: "Input";
|
|
314
|
+
readonly label: "Game event type";
|
|
315
|
+
readonly default: "game.pointer";
|
|
316
|
+
readonly authoring: {
|
|
317
|
+
readonly authority: "instance";
|
|
318
|
+
};
|
|
319
|
+
};
|
|
320
|
+
readonly entityId: {
|
|
321
|
+
readonly type: "string";
|
|
322
|
+
readonly category: "Input";
|
|
323
|
+
readonly label: "Entity id";
|
|
324
|
+
readonly authoring: {
|
|
325
|
+
readonly authority: "instance";
|
|
326
|
+
};
|
|
327
|
+
};
|
|
328
|
+
readonly x: {
|
|
329
|
+
readonly type: "number";
|
|
330
|
+
readonly category: "Position";
|
|
331
|
+
readonly label: "X (%)";
|
|
332
|
+
readonly default: 0;
|
|
333
|
+
readonly authoring: {
|
|
334
|
+
readonly authority: "instance";
|
|
335
|
+
};
|
|
336
|
+
};
|
|
337
|
+
readonly y: {
|
|
338
|
+
readonly type: "number";
|
|
339
|
+
readonly category: "Position";
|
|
340
|
+
readonly label: "Y (%)";
|
|
341
|
+
readonly default: 0;
|
|
342
|
+
readonly authoring: {
|
|
343
|
+
readonly authority: "instance";
|
|
344
|
+
};
|
|
345
|
+
};
|
|
346
|
+
readonly width: {
|
|
347
|
+
readonly type: "number";
|
|
348
|
+
readonly category: "Size";
|
|
349
|
+
readonly label: "Width (%)";
|
|
350
|
+
readonly default: 100;
|
|
351
|
+
readonly authoring: {
|
|
352
|
+
readonly authority: "instance";
|
|
353
|
+
};
|
|
354
|
+
};
|
|
355
|
+
readonly height: {
|
|
356
|
+
readonly type: "number";
|
|
357
|
+
readonly category: "Size";
|
|
358
|
+
readonly label: "Height (%)";
|
|
359
|
+
readonly default: 100;
|
|
360
|
+
readonly authoring: {
|
|
361
|
+
readonly authority: "instance";
|
|
362
|
+
};
|
|
363
|
+
};
|
|
364
|
+
readonly zIndex: {
|
|
365
|
+
readonly type: "number";
|
|
366
|
+
readonly category: "Position";
|
|
367
|
+
readonly label: "Z index";
|
|
368
|
+
readonly default: 1;
|
|
369
|
+
readonly authoring: {
|
|
370
|
+
readonly authority: "instance";
|
|
371
|
+
};
|
|
372
|
+
};
|
|
373
|
+
readonly enabled: {
|
|
374
|
+
readonly type: "boolean";
|
|
375
|
+
readonly category: "State";
|
|
376
|
+
readonly label: "Enabled";
|
|
377
|
+
readonly default: true;
|
|
378
|
+
readonly authoring: {
|
|
379
|
+
readonly authority: "instance";
|
|
380
|
+
};
|
|
381
|
+
};
|
|
382
|
+
readonly continuous: {
|
|
383
|
+
readonly type: "boolean";
|
|
384
|
+
readonly category: "Input";
|
|
385
|
+
readonly label: "Dispatch while moving";
|
|
386
|
+
readonly default: true;
|
|
387
|
+
readonly authoring: {
|
|
388
|
+
readonly authority: "instance";
|
|
389
|
+
};
|
|
390
|
+
};
|
|
391
|
+
readonly accessibilityLabel: {
|
|
392
|
+
readonly type: "string";
|
|
393
|
+
readonly category: "Accessibility";
|
|
394
|
+
readonly label: "Accessibility label";
|
|
395
|
+
readonly authoring: {
|
|
396
|
+
readonly authority: "instance";
|
|
397
|
+
};
|
|
398
|
+
};
|
|
399
|
+
};
|
|
400
|
+
};
|
|
173
401
|
readonly GameOverlay: {
|
|
174
402
|
readonly name: "GameOverlay";
|
|
175
403
|
readonly category: "layout";
|
|
@@ -224,16 +452,22 @@ export declare const ZORA_PLUGIN_METADATA: {
|
|
|
224
452
|
};
|
|
225
453
|
};
|
|
226
454
|
};
|
|
227
|
-
readonly extensionHosts: readonly ["
|
|
455
|
+
readonly extensionHosts: readonly ["Game", "GameEntity", "GameField", "GameInputZone", "GameOverlay"];
|
|
228
456
|
readonly placements: readonly [{
|
|
457
|
+
readonly child: "Game";
|
|
458
|
+
readonly parents: readonly ["Card", "Grid", "Screen", "ScreenSection", "View"];
|
|
459
|
+
}, {
|
|
229
460
|
readonly child: "GameField";
|
|
230
461
|
readonly parents: readonly ["Card", "Grid", "Screen", "ScreenSection", "View"];
|
|
231
462
|
}, {
|
|
232
463
|
readonly child: "GameEntity";
|
|
233
|
-
readonly parents: readonly ["GameField", "GameOverlay"];
|
|
464
|
+
readonly parents: readonly ["Game", "GameField", "GameOverlay"];
|
|
465
|
+
}, {
|
|
466
|
+
readonly child: "GameInputZone";
|
|
467
|
+
readonly parents: readonly ["Game"];
|
|
234
468
|
}, {
|
|
235
469
|
readonly child: "GameOverlay";
|
|
236
|
-
readonly parents: readonly ["GameField"];
|
|
470
|
+
readonly parents: readonly ["Game", "GameField"];
|
|
237
471
|
}];
|
|
238
472
|
};
|
|
239
473
|
//# sourceMappingURL=ZORA_PLUGIN_METADATA.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ZORA_PLUGIN_METADATA.d.ts","sourceRoot":"","sources":["../src/ZORA_PLUGIN_METADATA.ts"],"names":[],"mappings":"AAIA,sFAAsF;AACtF,eAAO,MAAM,oBAAoB
|
|
1
|
+
{"version":3,"file":"ZORA_PLUGIN_METADATA.d.ts","sourceRoot":"","sources":["../src/ZORA_PLUGIN_METADATA.ts"],"names":[],"mappings":"AAIA,sFAAsF;AACtF,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA2BM,CAAC"}
|
|
@@ -4,19 +4,27 @@ export const ZORA_PLUGIN_METADATA = {
|
|
|
4
4
|
packageName: '@ankhorage/zora-game',
|
|
5
5
|
displayName: 'ZORA Game',
|
|
6
6
|
componentMeta: ZORA_GAME_COMPONENT_META,
|
|
7
|
-
extensionHosts: ['
|
|
7
|
+
extensionHosts: ['Game', 'GameEntity', 'GameField', 'GameInputZone', 'GameOverlay'],
|
|
8
8
|
placements: [
|
|
9
|
+
{
|
|
10
|
+
child: 'Game',
|
|
11
|
+
parents: ['Card', 'Grid', 'Screen', 'ScreenSection', 'View'],
|
|
12
|
+
},
|
|
9
13
|
{
|
|
10
14
|
child: 'GameField',
|
|
11
15
|
parents: ['Card', 'Grid', 'Screen', 'ScreenSection', 'View'],
|
|
12
16
|
},
|
|
13
17
|
{
|
|
14
18
|
child: 'GameEntity',
|
|
15
|
-
parents: ['GameField', 'GameOverlay'],
|
|
19
|
+
parents: ['Game', 'GameField', 'GameOverlay'],
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
child: 'GameInputZone',
|
|
23
|
+
parents: ['Game'],
|
|
16
24
|
},
|
|
17
25
|
{
|
|
18
26
|
child: 'GameOverlay',
|
|
19
|
-
parents: ['GameField'],
|
|
27
|
+
parents: ['Game', 'GameField'],
|
|
20
28
|
},
|
|
21
29
|
],
|
|
22
30
|
};
|
|
@@ -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,
|
|
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"]}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { GameProps } from '../../../../types/gamePresentation';
|
|
3
|
+
/*** Bind one serializable game definition to a local transient session and presentation field. */
|
|
4
|
+
export declare function Game(props: GameProps): React.JSX.Element;
|
|
5
|
+
//# sourceMappingURL=Game.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Game.d.ts","sourceRoot":"","sources":["../../../../../src/features/game-presentation/adapters/inbound/Game.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,oCAAoC,CAAC;AAKpE,kGAAkG;AAClG,wBAAgB,IAAI,CAAC,KAAK,EAAE,SAAS,qBAkBpC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { GameRuntimeContext } from '../../composition/GameRuntimeContext';
|
|
3
|
+
import { useGameRuntime } from '../../composition/useGameRuntime';
|
|
4
|
+
import { GameField } from './GameField';
|
|
5
|
+
/*** Bind one serializable game definition to a local transient session and presentation field. */
|
|
6
|
+
export function Game(props) {
|
|
7
|
+
const runtime = useGameRuntime(props);
|
|
8
|
+
return (<GameRuntimeContext.Provider value={runtime}>
|
|
9
|
+
<GameField {...(props.aspectRatio === undefined ? {} : { aspectRatio: props.aspectRatio })} {...(props.minHeight === undefined ? {} : { minHeight: props.minHeight })} {...(props.clip === undefined ? {} : { clip: props.clip })} {...(props.accessibilityLabel === undefined
|
|
10
|
+
? {}
|
|
11
|
+
: { accessibilityLabel: props.accessibilityLabel })} {...(props.testID === undefined ? {} : { testID: props.testID })}>
|
|
12
|
+
{props.children}
|
|
13
|
+
</GameField>
|
|
14
|
+
</GameRuntimeContext.Provider>);
|
|
15
|
+
}
|
|
16
|
+
//# sourceMappingURL=Game.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Game.js","sourceRoot":"","sources":["../../../../../src/features/game-presentation/adapters/inbound/Game.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,EAAE,kBAAkB,EAAE,MAAM,sCAAsC,CAAC;AAC1E,OAAO,EAAE,cAAc,EAAE,MAAM,kCAAkC,CAAC;AAClE,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAExC,kGAAkG;AAClG,MAAM,UAAU,IAAI,CAAC,KAAgB;IACnC,MAAM,OAAO,GAAG,cAAc,CAAC,KAAK,CAAC,CAAC;IAEtC,OAAO,CACL,CAAC,kBAAkB,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC,CAC1C;MAAA,CAAC,SAAS,CACR,IAAI,CAAC,KAAK,CAAC,WAAW,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,WAAW,EAAE,KAAK,CAAC,WAAW,EAAE,CAAC,CAAC,CAChF,IAAI,CAAC,KAAK,CAAC,SAAS,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,SAAS,EAAE,KAAK,CAAC,SAAS,EAAE,CAAC,CAAC,CAC1E,IAAI,CAAC,KAAK,CAAC,IAAI,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,KAAK,CAAC,IAAI,EAAE,CAAC,CAAC,CAC3D,IAAI,CAAC,KAAK,CAAC,kBAAkB,KAAK,SAAS;QACzC,CAAC,CAAC,EAAE;QACJ,CAAC,CAAC,EAAE,kBAAkB,EAAE,KAAK,CAAC,kBAAkB,EAAE,CAAC,CAAC,CACtD,IAAI,CAAC,KAAK,CAAC,MAAM,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,KAAK,CAAC,MAAM,EAAE,CAAC,CAAC,CAEjE;QAAA,CAAC,KAAK,CAAC,QAAQ,CACjB;MAAA,EAAE,SAAS,CACb;IAAA,EAAE,kBAAkB,CAAC,QAAQ,CAAC,CAC/B,CAAC;AACJ,CAAC","sourcesContent":["import React from 'react';\n\nimport type { GameProps } from '../../../../types/gamePresentation';\nimport { GameRuntimeContext } from '../../composition/GameRuntimeContext';\nimport { useGameRuntime } from '../../composition/useGameRuntime';\nimport { GameField } from './GameField';\n\n/*** Bind one serializable game definition to a local transient session and presentation field. */\nexport function Game(props: GameProps) {\n const runtime = useGameRuntime(props);\n\n return (\n <GameRuntimeContext.Provider value={runtime}>\n <GameField\n {...(props.aspectRatio === undefined ? {} : { aspectRatio: props.aspectRatio })}\n {...(props.minHeight === undefined ? {} : { minHeight: props.minHeight })}\n {...(props.clip === undefined ? {} : { clip: props.clip })}\n {...(props.accessibilityLabel === undefined\n ? {}\n : { accessibilityLabel: props.accessibilityLabel })}\n {...(props.testID === undefined ? {} : { testID: props.testID })}\n >\n {props.children}\n </GameField>\n </GameRuntimeContext.Provider>\n );\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GameEntity.d.ts","sourceRoot":"","sources":["../../../../../src/features/game-presentation/adapters/inbound/GameEntity.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,oCAAoC,CAAC;
|
|
1
|
+
{"version":3,"file":"GameEntity.d.ts","sourceRoot":"","sources":["../../../../../src/features/game-presentation/adapters/inbound/GameEntity.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,oCAAoC,CAAC;AAG1E,oFAAoF;AACpF,wBAAgB,UAAU,CAAC,EACzB,QAAQ,EACR,CAAK,EACL,CAAK,EACL,KAAK,EACL,MAAM,EACN,OAAW,EACX,KAAS,EACT,QAAY,EACZ,MAAU,EACV,MAAc,EACd,aAAsB,EACtB,kBAAkB,EAClB,MAAM,GACP,EAAE,eAAe,+BAcjB"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { View } from '@ankhorage/zora';
|
|
2
2
|
import { StyleSheet } from 'react-native';
|
|
3
|
+
import { toGamePercentage } from '../../utils/toGamePercentage';
|
|
3
4
|
/*** Render one generic positioned game entity without owning gameplay semantics. */
|
|
4
5
|
export function GameEntity({ children, x = 0, y = 0, width, height, opacity = 1, scale = 1, rotation = 0, zIndex = 0, hidden = false, pointerEvents = 'auto', accessibilityLabel, testID, }) {
|
|
5
6
|
return (<View {...(accessibilityLabel === undefined ? {} : { accessibilityLabel })} {...(testID === undefined ? {} : { testID })} pointerEvents={pointerEvents} style={[
|
|
@@ -13,24 +14,16 @@ export function GameEntity({ children, x = 0, y = 0, width, height, opacity = 1,
|
|
|
13
14
|
function createEntityStyle({ x, y, width, height, opacity, scale, rotation, zIndex, hidden, }) {
|
|
14
15
|
return {
|
|
15
16
|
display: hidden ? 'none' : 'flex',
|
|
16
|
-
left:
|
|
17
|
-
opacity:
|
|
17
|
+
left: toGamePercentage(x),
|
|
18
|
+
opacity: Math.min(1, Math.max(0, opacity)),
|
|
18
19
|
position: 'absolute',
|
|
19
|
-
top:
|
|
20
|
+
top: toGamePercentage(y),
|
|
20
21
|
transform: [{ scale }, { rotate: `${rotation}deg` }],
|
|
21
22
|
zIndex,
|
|
22
23
|
...(height === undefined ? {} : { height }),
|
|
23
24
|
...(width === undefined ? {} : { width }),
|
|
24
25
|
};
|
|
25
26
|
}
|
|
26
|
-
/*** Convert a bounded percentage number to React Native percentage syntax. */
|
|
27
|
-
function toPercent(value) {
|
|
28
|
-
return `${clamp(value, 0, 100)}%`;
|
|
29
|
-
}
|
|
30
|
-
/*** Clamp one numeric presentation value to an inclusive range. */
|
|
31
|
-
function clamp(value, minimum, maximum) {
|
|
32
|
-
return Math.min(maximum, Math.max(minimum, value));
|
|
33
|
-
}
|
|
34
27
|
const styles = StyleSheet.create({
|
|
35
28
|
root: {
|
|
36
29
|
position: 'absolute',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GameEntity.js","sourceRoot":"","sources":["../../../../../src/features/game-presentation/adapters/inbound/GameEntity.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AACvC,OAAO,EAAE,UAAU,EAAkB,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"GameEntity.js","sourceRoot":"","sources":["../../../../../src/features/game-presentation/adapters/inbound/GameEntity.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AACvC,OAAO,EAAE,UAAU,EAAkB,MAAM,cAAc,CAAC;AAG1D,OAAO,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAEhE,oFAAoF;AACpF,MAAM,UAAU,UAAU,CAAC,EACzB,QAAQ,EACR,CAAC,GAAG,CAAC,EACL,CAAC,GAAG,CAAC,EACL,KAAK,EACL,MAAM,EACN,OAAO,GAAG,CAAC,EACX,KAAK,GAAG,CAAC,EACT,QAAQ,GAAG,CAAC,EACZ,MAAM,GAAG,CAAC,EACV,MAAM,GAAG,KAAK,EACd,aAAa,GAAG,MAAM,EACtB,kBAAkB,EAClB,MAAM,GACU;IAChB,OAAO,CACL,CAAC,IAAI,CACH,IAAI,CAAC,kBAAkB,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,kBAAkB,EAAE,CAAC,CAAC,CACrE,IAAI,CAAC,MAAM,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,CAAC,CAC7C,aAAa,CAAC,CAAC,aAAa,CAAC,CAC7B,KAAK,CAAC,CAAC;YACL,MAAM,CAAC,IAAI;YACX,iBAAiB,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC;SACrF,CAAC,CAEF;MAAA,CAAC,QAAQ,CACX;IAAA,EAAE,IAAI,CAAC,CACR,CAAC;AACJ,CAAC;AAcD,sFAAsF;AACtF,SAAS,iBAAiB,CAAC,EACzB,CAAC,EACD,CAAC,EACD,KAAK,EACL,MAAM,EACN,OAAO,EACP,KAAK,EACL,QAAQ,EACR,MAAM,EACN,MAAM,GACe;IACrB,OAAO;QACL,OAAO,EAAE,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM;QACjC,IAAI,EAAE,gBAAgB,CAAC,CAAC,CAAC;QACzB,OAAO,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,OAAO,CAAC,CAAC;QAC1C,QAAQ,EAAE,UAAU;QACpB,GAAG,EAAE,gBAAgB,CAAC,CAAC,CAAC;QACxB,SAAS,EAAE,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,MAAM,EAAE,GAAG,QAAQ,KAAK,EAAE,CAAC;QACpD,MAAM;QACN,GAAG,CAAC,MAAM,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC;QAC3C,GAAG,CAAC,KAAK,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC;KAC1C,CAAC;AACJ,CAAC;AAED,MAAM,MAAM,GAAG,UAAU,CAAC,MAAM,CAAC;IAC/B,IAAI,EAAE;QACJ,QAAQ,EAAE,UAAU;KACrB;CACF,CAAC,CAAC","sourcesContent":["import { View } from '@ankhorage/zora';\nimport { StyleSheet, type ViewStyle } from 'react-native';\n\nimport type { GameEntityProps } from '../../../../types/gamePresentation';\nimport { toGamePercentage } from '../../utils/toGamePercentage';\n\n/*** Render one generic positioned game entity without owning gameplay semantics. */\nexport function GameEntity({\n children,\n x = 0,\n y = 0,\n width,\n height,\n opacity = 1,\n scale = 1,\n rotation = 0,\n zIndex = 0,\n hidden = false,\n pointerEvents = 'auto',\n accessibilityLabel,\n testID,\n}: GameEntityProps) {\n return (\n <View\n {...(accessibilityLabel === undefined ? {} : { accessibilityLabel })}\n {...(testID === undefined ? {} : { testID })}\n pointerEvents={pointerEvents}\n style={[\n styles.root,\n createEntityStyle({ x, y, width, height, opacity, scale, rotation, zIndex, hidden }),\n ]}\n >\n {children}\n </View>\n );\n}\n\ninterface GameEntityStyleInput {\n readonly x: number;\n readonly y: number;\n readonly width: number | undefined;\n readonly height: number | undefined;\n readonly opacity: number;\n readonly scale: number;\n readonly rotation: number;\n readonly zIndex: number;\n readonly hidden: boolean;\n}\n\n/*** Convert serializable entity presentation props into a React Native view style. */\nfunction createEntityStyle({\n x,\n y,\n width,\n height,\n opacity,\n scale,\n rotation,\n zIndex,\n hidden,\n}: GameEntityStyleInput): ViewStyle {\n return {\n display: hidden ? 'none' : 'flex',\n left: toGamePercentage(x),\n opacity: Math.min(1, Math.max(0, opacity)),\n position: 'absolute',\n top: toGamePercentage(y),\n transform: [{ scale }, { rotate: `${rotation}deg` }],\n zIndex,\n ...(height === undefined ? {} : { height }),\n ...(width === undefined ? {} : { width }),\n };\n}\n\nconst styles = StyleSheet.create({\n root: {\n position: 'absolute',\n },\n});\n"]}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { GameInputZoneProps } from '../../../../types/gamePresentation';
|
|
2
|
+
/*** Capture pointer/touch geometry and dispatch only normalized generic Game events. */
|
|
3
|
+
export declare function GameInputZone({ x, y, width, height, zIndex, enabled, continuous, accessibilityLabel, testID, ...inputProps }: GameInputZoneProps): import("react").JSX.Element;
|
|
4
|
+
//# sourceMappingURL=GameInputZone.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GameInputZone.d.ts","sourceRoot":"","sources":["../../../../../src/features/game-presentation/adapters/inbound/GameInputZone.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,oCAAoC,CAAC;AAI7E,wFAAwF;AACxF,wBAAgB,aAAa,CAAC,EAC5B,CAAK,EACL,CAAK,EACL,KAAW,EACX,MAAY,EACZ,MAAU,EACV,OAAc,EACd,UAAiB,EACjB,kBAAkB,EAClB,MAAM,EACN,GAAG,UAAU,EACd,EAAE,kBAAkB,+BAyBpB"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { StyleSheet, View } from 'react-native';
|
|
2
|
+
import { toGamePercentage } from '../../utils/toGamePercentage';
|
|
3
|
+
import { useGameInputZoneResponder } from './useGameInputZoneResponder';
|
|
4
|
+
/*** Capture pointer/touch geometry and dispatch only normalized generic Game events. */
|
|
5
|
+
export function GameInputZone({ x = 0, y = 0, width = 100, height = 100, zIndex = 0, enabled = true, continuous = true, accessibilityLabel, testID, ...inputProps }) {
|
|
6
|
+
const { dispatchPointer, handleLayout, shouldSetResponder } = useGameInputZoneResponder({
|
|
7
|
+
...inputProps,
|
|
8
|
+
x,
|
|
9
|
+
y,
|
|
10
|
+
width,
|
|
11
|
+
height,
|
|
12
|
+
enabled,
|
|
13
|
+
continuous,
|
|
14
|
+
});
|
|
15
|
+
return (<View {...(accessibilityLabel === undefined ? {} : { accessibilityLabel })} {...(testID === undefined ? {} : { testID })} {...(continuous
|
|
16
|
+
? { onResponderGrant: dispatchPointer, onResponderMove: dispatchPointer }
|
|
17
|
+
: { onResponderRelease: dispatchPointer })} collapsable={false} onLayout={handleLayout} onStartShouldSetResponder={shouldSetResponder} pointerEvents={enabled ? 'auto' : 'none'} style={createInputZoneStyle({ x, y, width, height, zIndex })}/>);
|
|
18
|
+
}
|
|
19
|
+
/*** Convert field-relative input-zone props into one absolute React Native style. */
|
|
20
|
+
function createInputZoneStyle({ x, y, width, height, zIndex }) {
|
|
21
|
+
return {
|
|
22
|
+
left: toGamePercentage(x),
|
|
23
|
+
top: toGamePercentage(y),
|
|
24
|
+
width: toGamePercentage(width),
|
|
25
|
+
height: toGamePercentage(height),
|
|
26
|
+
zIndex,
|
|
27
|
+
...styles.root,
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
const styles = StyleSheet.create({
|
|
31
|
+
root: {
|
|
32
|
+
position: 'absolute',
|
|
33
|
+
},
|
|
34
|
+
});
|
|
35
|
+
//# sourceMappingURL=GameInputZone.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GameInputZone.js","sourceRoot":"","sources":["../../../../../src/features/game-presentation/adapters/inbound/GameInputZone.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,IAAI,EAAkB,MAAM,cAAc,CAAC;AAGhE,OAAO,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAChE,OAAO,EAAE,yBAAyB,EAAE,MAAM,6BAA6B,CAAC;AAExE,wFAAwF;AACxF,MAAM,UAAU,aAAa,CAAC,EAC5B,CAAC,GAAG,CAAC,EACL,CAAC,GAAG,CAAC,EACL,KAAK,GAAG,GAAG,EACX,MAAM,GAAG,GAAG,EACZ,MAAM,GAAG,CAAC,EACV,OAAO,GAAG,IAAI,EACd,UAAU,GAAG,IAAI,EACjB,kBAAkB,EAClB,MAAM,EACN,GAAG,UAAU,EACM;IACnB,MAAM,EAAE,eAAe,EAAE,YAAY,EAAE,kBAAkB,EAAE,GAAG,yBAAyB,CAAC;QACtF,GAAG,UAAU;QACb,CAAC;QACD,CAAC;QACD,KAAK;QACL,MAAM;QACN,OAAO;QACP,UAAU;KACX,CAAC,CAAC;IAEH,OAAO,CACL,CAAC,IAAI,CACH,IAAI,CAAC,kBAAkB,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,kBAAkB,EAAE,CAAC,CAAC,CACrE,IAAI,CAAC,MAAM,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,CAAC,CAC7C,IAAI,CAAC,UAAU;QACb,CAAC,CAAC,EAAE,gBAAgB,EAAE,eAAe,EAAE,eAAe,EAAE,eAAe,EAAE;QACzE,CAAC,CAAC,EAAE,kBAAkB,EAAE,eAAe,EAAE,CAAC,CAAC,CAC7C,WAAW,CAAC,CAAC,KAAK,CAAC,CACnB,QAAQ,CAAC,CAAC,YAAY,CAAC,CACvB,yBAAyB,CAAC,CAAC,kBAAkB,CAAC,CAC9C,aAAa,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,CACzC,KAAK,CAAC,CAAC,oBAAoB,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC,EAC7D,CACH,CAAC;AACJ,CAAC;AAUD,qFAAqF;AACrF,SAAS,oBAAoB,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAuB;IAChF,OAAO;QACL,IAAI,EAAE,gBAAgB,CAAC,CAAC,CAAC;QACzB,GAAG,EAAE,gBAAgB,CAAC,CAAC,CAAC;QACxB,KAAK,EAAE,gBAAgB,CAAC,KAAK,CAAC;QAC9B,MAAM,EAAE,gBAAgB,CAAC,MAAM,CAAC;QAChC,MAAM;QACN,GAAG,MAAM,CAAC,IAAI;KACf,CAAC;AACJ,CAAC;AAED,MAAM,MAAM,GAAG,UAAU,CAAC,MAAM,CAAC;IAC/B,IAAI,EAAE;QACJ,QAAQ,EAAE,UAAU;KACrB;CACF,CAAC,CAAC","sourcesContent":["import { StyleSheet, View, type ViewStyle } from 'react-native';\n\nimport type { GameInputZoneProps } from '../../../../types/gamePresentation';\nimport { toGamePercentage } from '../../utils/toGamePercentage';\nimport { useGameInputZoneResponder } from './useGameInputZoneResponder';\n\n/*** Capture pointer/touch geometry and dispatch only normalized generic Game events. */\nexport function GameInputZone({\n x = 0,\n y = 0,\n width = 100,\n height = 100,\n zIndex = 0,\n enabled = true,\n continuous = true,\n accessibilityLabel,\n testID,\n ...inputProps\n}: GameInputZoneProps) {\n const { dispatchPointer, handleLayout, shouldSetResponder } = useGameInputZoneResponder({\n ...inputProps,\n x,\n y,\n width,\n height,\n enabled,\n continuous,\n });\n\n return (\n <View\n {...(accessibilityLabel === undefined ? {} : { accessibilityLabel })}\n {...(testID === undefined ? {} : { testID })}\n {...(continuous\n ? { onResponderGrant: dispatchPointer, onResponderMove: dispatchPointer }\n : { onResponderRelease: dispatchPointer })}\n collapsable={false}\n onLayout={handleLayout}\n onStartShouldSetResponder={shouldSetResponder}\n pointerEvents={enabled ? 'auto' : 'none'}\n style={createInputZoneStyle({ x, y, width, height, zIndex })}\n />\n );\n}\n\ninterface InputZoneStyleInput {\n readonly x: number;\n readonly y: number;\n readonly width: number;\n readonly height: number;\n readonly zIndex: number;\n}\n\n/*** Convert field-relative input-zone props into one absolute React Native style. */\nfunction createInputZoneStyle({ x, y, width, height, zIndex }: InputZoneStyleInput): ViewStyle {\n return {\n left: toGamePercentage(x),\n top: toGamePercentage(y),\n width: toGamePercentage(width),\n height: toGamePercentage(height),\n zIndex,\n ...styles.root,\n };\n}\n\nconst styles = StyleSheet.create({\n root: {\n position: 'absolute',\n },\n});\n"]}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { GameEvent } from '@ankhorage/game';
|
|
2
|
+
interface GamePointerEventInput {
|
|
3
|
+
readonly eventType: string;
|
|
4
|
+
readonly entityId?: string;
|
|
5
|
+
readonly localX: number;
|
|
6
|
+
readonly localY: number;
|
|
7
|
+
readonly measuredWidth: number;
|
|
8
|
+
readonly measuredHeight: number;
|
|
9
|
+
readonly zoneX: number;
|
|
10
|
+
readonly zoneY: number;
|
|
11
|
+
readonly zoneWidth: number;
|
|
12
|
+
readonly zoneHeight: number;
|
|
13
|
+
}
|
|
14
|
+
/*** Normalize one measured pointer/touch position into a field-relative generic Game event. */
|
|
15
|
+
export declare function createGamePointerEvent(input: GamePointerEventInput): GameEvent | undefined;
|
|
16
|
+
export {};
|
|
17
|
+
//# sourceMappingURL=createGamePointerEvent.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createGamePointerEvent.d.ts","sourceRoot":"","sources":["../../../../../src/features/game-presentation/adapters/inbound/createGamePointerEvent.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAIjD,UAAU,qBAAqB;IAC7B,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAC;IAC/B,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAC;IAChC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;CAC7B;AAED,+FAA+F;AAC/F,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,qBAAqB,GAAG,SAAS,GAAG,SAAS,CAoB1F"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { clampGamePercentage } from '../../utils/clampGamePercentage';
|
|
2
|
+
/*** Normalize one measured pointer/touch position into a field-relative generic Game event. */
|
|
3
|
+
export function createGamePointerEvent(input) {
|
|
4
|
+
if (!Number.isFinite(input.measuredWidth) ||
|
|
5
|
+
!Number.isFinite(input.measuredHeight) ||
|
|
6
|
+
input.measuredWidth <= 0 ||
|
|
7
|
+
input.measuredHeight <= 0) {
|
|
8
|
+
return undefined;
|
|
9
|
+
}
|
|
10
|
+
const localX = clampGamePercentage((input.localX / input.measuredWidth) * 100);
|
|
11
|
+
const localY = clampGamePercentage((input.localY / input.measuredHeight) * 100);
|
|
12
|
+
const x = clampGamePercentage(input.zoneX + (localX * input.zoneWidth) / 100);
|
|
13
|
+
const y = clampGamePercentage(input.zoneY + (localY * input.zoneHeight) / 100);
|
|
14
|
+
return {
|
|
15
|
+
type: input.eventType,
|
|
16
|
+
...(input.entityId === undefined ? {} : { entityId: input.entityId }),
|
|
17
|
+
payload: { x, y },
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
//# sourceMappingURL=createGamePointerEvent.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createGamePointerEvent.js","sourceRoot":"","sources":["../../../../../src/features/game-presentation/adapters/inbound/createGamePointerEvent.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,mBAAmB,EAAE,MAAM,iCAAiC,CAAC;AAetE,+FAA+F;AAC/F,MAAM,UAAU,sBAAsB,CAAC,KAA4B;IACjE,IACE,CAAC,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC,aAAa,CAAC;QACrC,CAAC,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC,cAAc,CAAC;QACtC,KAAK,CAAC,aAAa,IAAI,CAAC;QACxB,KAAK,CAAC,cAAc,IAAI,CAAC,EACzB,CAAC;QACD,OAAO,SAAS,CAAC;IACnB,CAAC;IAED,MAAM,MAAM,GAAG,mBAAmB,CAAC,CAAC,KAAK,CAAC,MAAM,GAAG,KAAK,CAAC,aAAa,CAAC,GAAG,GAAG,CAAC,CAAC;IAC/E,MAAM,MAAM,GAAG,mBAAmB,CAAC,CAAC,KAAK,CAAC,MAAM,GAAG,KAAK,CAAC,cAAc,CAAC,GAAG,GAAG,CAAC,CAAC;IAChF,MAAM,CAAC,GAAG,mBAAmB,CAAC,KAAK,CAAC,KAAK,GAAG,CAAC,MAAM,GAAG,KAAK,CAAC,SAAS,CAAC,GAAG,GAAG,CAAC,CAAC;IAC9E,MAAM,CAAC,GAAG,mBAAmB,CAAC,KAAK,CAAC,KAAK,GAAG,CAAC,MAAM,GAAG,KAAK,CAAC,UAAU,CAAC,GAAG,GAAG,CAAC,CAAC;IAE/E,OAAO;QACL,IAAI,EAAE,KAAK,CAAC,SAAS;QACrB,GAAG,CAAC,KAAK,CAAC,QAAQ,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,QAAQ,EAAE,KAAK,CAAC,QAAQ,EAAE,CAAC;QACrE,OAAO,EAAE,EAAE,CAAC,EAAE,CAAC,EAAE;KAClB,CAAC;AACJ,CAAC","sourcesContent":["import type { GameEvent } from '@ankhorage/game';\n\nimport { clampGamePercentage } from '../../utils/clampGamePercentage';\n\ninterface GamePointerEventInput {\n readonly eventType: string;\n readonly entityId?: string;\n readonly localX: number;\n readonly localY: number;\n readonly measuredWidth: number;\n readonly measuredHeight: number;\n readonly zoneX: number;\n readonly zoneY: number;\n readonly zoneWidth: number;\n readonly zoneHeight: number;\n}\n\n/*** Normalize one measured pointer/touch position into a field-relative generic Game event. */\nexport function createGamePointerEvent(input: GamePointerEventInput): GameEvent | undefined {\n if (\n !Number.isFinite(input.measuredWidth) ||\n !Number.isFinite(input.measuredHeight) ||\n input.measuredWidth <= 0 ||\n input.measuredHeight <= 0\n ) {\n return undefined;\n }\n\n const localX = clampGamePercentage((input.localX / input.measuredWidth) * 100);\n const localY = clampGamePercentage((input.localY / input.measuredHeight) * 100);\n const x = clampGamePercentage(input.zoneX + (localX * input.zoneWidth) / 100);\n const y = clampGamePercentage(input.zoneY + (localY * input.zoneHeight) / 100);\n\n return {\n type: input.eventType,\n ...(input.entityId === undefined ? {} : { entityId: input.entityId }),\n payload: { x, y },\n };\n}\n"]}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { GestureResponderEvent, LayoutChangeEvent } from 'react-native';
|
|
2
|
+
import type { GameInputZoneProps } from '../../../../types/gamePresentation';
|
|
3
|
+
/*** Own React Native responder measurement and event dispatch for one Game input zone. */
|
|
4
|
+
export declare function useGameInputZoneResponder(props: GameInputZoneProps): {
|
|
5
|
+
dispatchPointer: (event: GestureResponderEvent) => void;
|
|
6
|
+
handleLayout: (event: LayoutChangeEvent) => void;
|
|
7
|
+
shouldSetResponder: () => boolean;
|
|
8
|
+
};
|
|
9
|
+
//# sourceMappingURL=useGameInputZoneResponder.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useGameInputZoneResponder.d.ts","sourceRoot":"","sources":["../../../../../src/features/game-presentation/adapters/inbound/useGameInputZoneResponder.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,qBAAqB,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAE7E,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,oCAAoC,CAAC;AAS7E,0FAA0F;AAC1F,wBAAgB,yBAAyB,CAAC,KAAK,EAAE,kBAAkB;6BAWvD,qBAAqB;0BANgB,iBAAiB;;EA8BjE"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { GameRuntimeContext } from '../../composition/GameRuntimeContext';
|
|
3
|
+
import { createGamePointerEvent } from './createGamePointerEvent';
|
|
4
|
+
/*** Own React Native responder measurement and event dispatch for one Game input zone. */
|
|
5
|
+
export function useGameInputZoneResponder(props) {
|
|
6
|
+
const runtime = React.useContext(GameRuntimeContext);
|
|
7
|
+
if (runtime === null)
|
|
8
|
+
throw new Error('GameInputZone must be rendered inside Game.');
|
|
9
|
+
const measuredSizeRef = React.useRef({ width: 0, height: 0 });
|
|
10
|
+
const handleLayout = React.useCallback((event) => {
|
|
11
|
+
const { width, height } = event.nativeEvent.layout;
|
|
12
|
+
measuredSizeRef.current = { width, height };
|
|
13
|
+
}, []);
|
|
14
|
+
const dispatchPointer = React.useCallback((event) => {
|
|
15
|
+
const measured = measuredSizeRef.current;
|
|
16
|
+
const gameEvent = createGamePointerEvent({
|
|
17
|
+
eventType: props.eventType,
|
|
18
|
+
...(props.entityId === undefined ? {} : { entityId: props.entityId }),
|
|
19
|
+
localX: event.nativeEvent.locationX,
|
|
20
|
+
localY: event.nativeEvent.locationY,
|
|
21
|
+
measuredWidth: measured.width,
|
|
22
|
+
measuredHeight: measured.height,
|
|
23
|
+
zoneX: props.x ?? 0,
|
|
24
|
+
zoneY: props.y ?? 0,
|
|
25
|
+
zoneWidth: props.width ?? 100,
|
|
26
|
+
zoneHeight: props.height ?? 100,
|
|
27
|
+
});
|
|
28
|
+
if (gameEvent !== undefined)
|
|
29
|
+
runtime.dispatch(gameEvent);
|
|
30
|
+
}, [props.entityId, props.eventType, props.height, props.width, props.x, props.y, runtime]);
|
|
31
|
+
return {
|
|
32
|
+
dispatchPointer,
|
|
33
|
+
handleLayout,
|
|
34
|
+
shouldSetResponder: () => props.enabled ?? true,
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
//# sourceMappingURL=useGameInputZoneResponder.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useGameInputZoneResponder.js","sourceRoot":"","sources":["../../../../../src/features/game-presentation/adapters/inbound/useGameInputZoneResponder.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,OAAO,EAAE,kBAAkB,EAAE,MAAM,sCAAsC,CAAC;AAC1E,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAOlE,0FAA0F;AAC1F,MAAM,UAAU,yBAAyB,CAAC,KAAyB;IACjE,MAAM,OAAO,GAAG,KAAK,CAAC,UAAU,CAAC,kBAAkB,CAAC,CAAC;IACrD,IAAI,OAAO,KAAK,IAAI;QAAE,MAAM,IAAI,KAAK,CAAC,6CAA6C,CAAC,CAAC;IAErF,MAAM,eAAe,GAAG,KAAK,CAAC,MAAM,CAAe,EAAE,KAAK,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,CAAC,CAAC;IAC5E,MAAM,YAAY,GAAG,KAAK,CAAC,WAAW,CAAC,CAAC,KAAwB,EAAE,EAAE;QAClE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,KAAK,CAAC,WAAW,CAAC,MAAM,CAAC;QACnD,eAAe,CAAC,OAAO,GAAG,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC;IAC9C,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,MAAM,eAAe,GAAG,KAAK,CAAC,WAAW,CACvC,CAAC,KAA4B,EAAE,EAAE;QAC/B,MAAM,QAAQ,GAAG,eAAe,CAAC,OAAO,CAAC;QACzC,MAAM,SAAS,GAAG,sBAAsB,CAAC;YACvC,SAAS,EAAE,KAAK,CAAC,SAAS;YAC1B,GAAG,CAAC,KAAK,CAAC,QAAQ,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,QAAQ,EAAE,KAAK,CAAC,QAAQ,EAAE,CAAC;YACrE,MAAM,EAAE,KAAK,CAAC,WAAW,CAAC,SAAS;YACnC,MAAM,EAAE,KAAK,CAAC,WAAW,CAAC,SAAS;YACnC,aAAa,EAAE,QAAQ,CAAC,KAAK;YAC7B,cAAc,EAAE,QAAQ,CAAC,MAAM;YAC/B,KAAK,EAAE,KAAK,CAAC,CAAC,IAAI,CAAC;YACnB,KAAK,EAAE,KAAK,CAAC,CAAC,IAAI,CAAC;YACnB,SAAS,EAAE,KAAK,CAAC,KAAK,IAAI,GAAG;YAC7B,UAAU,EAAE,KAAK,CAAC,MAAM,IAAI,GAAG;SAChC,CAAC,CAAC;QACH,IAAI,SAAS,KAAK,SAAS;YAAE,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC;IAC3D,CAAC,EACD,CAAC,KAAK,CAAC,QAAQ,EAAE,KAAK,CAAC,SAAS,EAAE,KAAK,CAAC,MAAM,EAAE,KAAK,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC,EAAE,OAAO,CAAC,CACxF,CAAC;IAEF,OAAO;QACL,eAAe;QACf,YAAY;QACZ,kBAAkB,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC,OAAO,IAAI,IAAI;KAChD,CAAC;AACJ,CAAC","sourcesContent":["import React from 'react';\nimport type { GestureResponderEvent, LayoutChangeEvent } from 'react-native';\n\nimport type { GameInputZoneProps } from '../../../../types/gamePresentation';\nimport { GameRuntimeContext } from '../../composition/GameRuntimeContext';\nimport { createGamePointerEvent } from './createGamePointerEvent';\n\ninterface MeasuredSize {\n readonly width: number;\n readonly height: number;\n}\n\n/*** Own React Native responder measurement and event dispatch for one Game input zone. */\nexport function useGameInputZoneResponder(props: GameInputZoneProps) {\n const runtime = React.useContext(GameRuntimeContext);\n if (runtime === null) throw new Error('GameInputZone must be rendered inside Game.');\n\n const measuredSizeRef = React.useRef<MeasuredSize>({ width: 0, height: 0 });\n const handleLayout = React.useCallback((event: LayoutChangeEvent) => {\n const { width, height } = event.nativeEvent.layout;\n measuredSizeRef.current = { width, height };\n }, []);\n\n const dispatchPointer = React.useCallback(\n (event: GestureResponderEvent) => {\n const measured = measuredSizeRef.current;\n const gameEvent = createGamePointerEvent({\n eventType: props.eventType,\n ...(props.entityId === undefined ? {} : { entityId: props.entityId }),\n localX: event.nativeEvent.locationX,\n localY: event.nativeEvent.locationY,\n measuredWidth: measured.width,\n measuredHeight: measured.height,\n zoneX: props.x ?? 0,\n zoneY: props.y ?? 0,\n zoneWidth: props.width ?? 100,\n zoneHeight: props.height ?? 100,\n });\n if (gameEvent !== undefined) runtime.dispatch(gameEvent);\n },\n [props.entityId, props.eventType, props.height, props.width, props.x, props.y, runtime],\n );\n\n return {\n dispatchPointer,\n handleLayout,\n shouldSetResponder: () => props.enabled ?? true,\n };\n}\n"]}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { GameRuntimeContextValue } from '../../../types/gameRuntime';
|
|
3
|
+
/*** Provide the local transient game session and event dispatcher to presentation adapters. */
|
|
4
|
+
export declare const GameRuntimeContext: React.Context<GameRuntimeContextValue | null>;
|
|
5
|
+
//# sourceMappingURL=GameRuntimeContext.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GameRuntimeContext.d.ts","sourceRoot":"","sources":["../../../../src/features/game-presentation/composition/GameRuntimeContext.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,4BAA4B,CAAC;AAE1E,+FAA+F;AAC/F,eAAO,MAAM,kBAAkB,+CAA4D,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GameRuntimeContext.js","sourceRoot":"","sources":["../../../../src/features/game-presentation/composition/GameRuntimeContext.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,+FAA+F;AAC/F,MAAM,CAAC,MAAM,kBAAkB,GAAG,KAAK,CAAC,aAAa,CAAiC,IAAI,CAAC,CAAC","sourcesContent":["import React from 'react';\n\nimport type { GameRuntimeContextValue } from '../../../types/gameRuntime';\n\n/*** Provide the local transient game session and event dispatcher to presentation adapters. */\nexport const GameRuntimeContext = React.createContext<GameRuntimeContextValue | null>(null);\n"]}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { GameProps } from '../../../types/gamePresentation';
|
|
2
|
+
import type { GameRuntimeContextValue } from '../../../types/gameRuntime';
|
|
3
|
+
/*** Own one local transient Game session while delegating all domain transitions to @ankhorage/game. */
|
|
4
|
+
export declare function useGameRuntime(props: GameProps): GameRuntimeContextValue;
|
|
5
|
+
//# sourceMappingURL=useGameRuntime.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useGameRuntime.d.ts","sourceRoot":"","sources":["../../../../src/features/game-presentation/composition/useGameRuntime.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAC;AACjE,OAAO,KAAK,EAAE,uBAAuB,EAAoB,MAAM,4BAA4B,CAAC;AAK5F,wGAAwG;AACxG,wBAAgB,cAAc,CAAC,KAAK,EAAE,SAAS,GAAG,uBAAuB,CAqDxE"}
|