@ankhorage/zora-game 0.7.2 → 0.8.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (33) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/README.md +75 -1
  3. package/dist/ZORA_GAME_COMPONENT_META.d.ts +19 -0
  4. package/dist/ZORA_GAME_COMPONENT_META.d.ts.map +1 -1
  5. package/dist/ZORA_GAME_PLUGIN.d.ts +19 -0
  6. package/dist/ZORA_GAME_PLUGIN.d.ts.map +1 -1
  7. package/dist/ZORA_PLUGIN_METADATA.d.ts +19 -0
  8. package/dist/ZORA_PLUGIN_METADATA.d.ts.map +1 -1
  9. package/dist/features/game-presentation/adapters/inbound/Game.d.ts.map +1 -1
  10. package/dist/features/game-presentation/adapters/inbound/Game.js +1 -1
  11. package/dist/features/game-presentation/adapters/inbound/Game.js.map +1 -1
  12. package/dist/features/game-presentation/adapters/inbound/GameField.d.ts +1 -1
  13. package/dist/features/game-presentation/adapters/inbound/GameField.d.ts.map +1 -1
  14. package/dist/features/game-presentation/adapters/inbound/GameField.js +5 -1
  15. package/dist/features/game-presentation/adapters/inbound/GameField.js.map +1 -1
  16. package/dist/features/game-presentation/meta/gameFieldMeta.d.ts +9 -0
  17. package/dist/features/game-presentation/meta/gameFieldMeta.d.ts.map +1 -1
  18. package/dist/features/game-presentation/meta/gameFieldMeta.js +7 -0
  19. package/dist/features/game-presentation/meta/gameFieldMeta.js.map +1 -1
  20. package/dist/features/game-presentation/meta/gameMeta.d.ts +10 -0
  21. package/dist/features/game-presentation/meta/gameMeta.d.ts.map +1 -1
  22. package/dist/features/game-presentation/meta/gameMeta.js +8 -0
  23. package/dist/features/game-presentation/meta/gameMeta.js.map +1 -1
  24. package/dist/types/gamePresentation.d.ts +1 -0
  25. package/dist/types/gamePresentation.d.ts.map +1 -1
  26. package/dist/types/gamePresentation.js.map +1 -1
  27. package/package.json +1 -1
  28. package/src/ZORA_PLUGIN_METADATA.test.ts +2 -0
  29. package/src/features/game-presentation/adapters/inbound/Game.tsx +1 -0
  30. package/src/features/game-presentation/adapters/inbound/GameField.tsx +5 -0
  31. package/src/features/game-presentation/meta/gameFieldMeta.ts +7 -0
  32. package/src/features/game-presentation/meta/gameMeta.ts +8 -0
  33. package/src/types/gamePresentation.ts +1 -0
package/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # @ankhorage/zora-game
2
2
 
3
+ ## 0.8.1
4
+
5
+ ### Patch Changes
6
+
7
+ - 4fd46db: Publish the basic embeddable game presentation example in generated Paradox README usage documentation.
8
+
9
+ ## 0.8.0
10
+
11
+ ### Minor Changes
12
+
13
+ - 7e35c6d: Add an optional fill layout mode to Game and GameField so full-screen games can use ordinary parent flex sizing without introducing a dedicated GameScreen runtime concept.
14
+
3
15
  ## 0.7.2
4
16
 
5
17
  ### Patch Changes
package/README.md CHANGED
@@ -3,10 +3,84 @@
3
3
 
4
4
  # @ankhorage/zora-game
5
5
 
6
- ![license: MIT](././paradox/badges/license.svg) ![npm: v0.7.2](././paradox/badges/npm.svg) ![runtime: bun](././paradox/badges/runtime.svg) ![typescript: strict](././paradox/badges/typescript.svg) ![eslint: checked](././paradox/badges/eslint.svg) ![prettier: checked](././paradox/badges/prettier.svg) ![build: checked](././paradox/badges/build.svg) ![tests: checked](././paradox/badges/tests.svg) ![docs: paradox](././paradox/badges/docs.svg)
6
+ ![license: MIT](././paradox/badges/license.svg) ![npm: v0.8.1](././paradox/badges/npm.svg) ![runtime: bun](././paradox/badges/runtime.svg) ![typescript: strict](././paradox/badges/typescript.svg) ![eslint: checked](././paradox/badges/eslint.svg) ![prettier: checked](././paradox/badges/prettier.svg) ![build: checked](././paradox/badges/build.svg) ![tests: checked](././paradox/badges/tests.svg) ![docs: paradox](././paradox/badges/docs.svg)
7
7
 
8
8
  Generic game presentation primitives for React Native and React Native Web apps built on ZORA.
9
9
 
10
+ ## Usage
11
+
12
+ Use @ankhorage/game for serializable gameplay semantics and @ankhorage/zora-game for the React Native / React Native Web presentation edge. Embed Game in ordinary ZORA layout, render session state with GameEntity and overlays, and add input/measurement adapters only where the platform needs them.
13
+
14
+ ### Embed a config-driven Game inside ordinary ZORA content.
15
+
16
+ Game owns the local platform-neutral session, GameEntity renders positioned presentation, and
17
+ GameOverlay composes HUD/feedback content. Set `fill` when the surrounding layout should give
18
+ the game all available space; no dedicated GameScreen runtime type is required.
19
+
20
+ Source: `examples/basic-game-presentation/App.tsx`
21
+
22
+ ```tsx
23
+ import {
24
+ AppBar,
25
+ AppShell,
26
+ Screen,
27
+ ScreenSection,
28
+ Text,
29
+ ZoraProvider,
30
+ type ZoraTheme,
31
+ } from '@ankhorage/zora';
32
+ import { Game, GameEntity, GameOverlay } from '@ankhorage/zora-game';
33
+
34
+ const gameTheme: ZoraTheme = {
35
+ id: 'basic-game-presentation',
36
+ name: 'Basic game presentation',
37
+ appCategory: 'games',
38
+ primaryColor: '#2563eb',
39
+ harmony: 'analogous',
40
+ };
41
+
42
+ const definition = {
43
+ id: 'orb-field',
44
+ initialPhase: 'playing',
45
+ initialState: { score: 0 },
46
+ stages: [{ id: 'round' }],
47
+ rules: [],
48
+ } as const;
49
+
50
+ export default function BasicGamePresentationApp() {
51
+ return (
52
+ <ZoraProvider initialMode="light" theme={gameTheme}>
53
+ <AppShell header={<AppBar title="Orb field" subtitle="Generic embeddable game UI" />}>
54
+ <Screen>
55
+ <ScreenSection
56
+ title="Mini-game region"
57
+ description="The game lives beside ordinary screen content."
58
+ >
59
+ <Text emphasis="muted">
60
+ Game rules stay in @ankhorage/game; this package owns presentation and input adapters.
61
+ </Text>
62
+ <Game definition={definition} aspectRatio={1.4} minHeight={320}>
63
+ <GameEntity x={18} y={28} accessibilityLabel="Blue orb">
64
+ <Text>●</Text>
65
+ </GameEntity>
66
+ <GameEntity x={68} y={52} scale={1.4} accessibilityLabel="Large orb">
67
+ <Text>◆</Text>
68
+ </GameEntity>
69
+ <GameEntity x={46} y={78} accessibilityLabel="Player marker">
70
+ <Text>▲</Text>
71
+ </GameEntity>
72
+ <GameOverlay placement="top" padding={12}>
73
+ <Text>Score 0 / 5</Text>
74
+ </GameOverlay>
75
+ </Game>
76
+ </ScreenSection>
77
+ </Screen>
78
+ </AppShell>
79
+ </ZoraProvider>
80
+ );
81
+ }
82
+ ```
83
+
10
84
  ## Generated documentation
11
85
 
12
86
  - [Interactive documentation app](././paradox/index.html)
@@ -21,6 +21,7 @@ export declare const ZORA_GAME_COMPONENT_META: {
21
21
  readonly resetKey: "";
22
22
  readonly autoAdvanceTime: true;
23
23
  readonly minHeight: 320;
24
+ readonly fill: false;
24
25
  readonly clip: true;
25
26
  };
26
27
  };
@@ -99,6 +100,15 @@ export declare const ZORA_GAME_COMPONENT_META: {
99
100
  readonly authority: "instance";
100
101
  };
101
102
  };
103
+ readonly fill: {
104
+ readonly type: "boolean";
105
+ readonly category: "Layout";
106
+ readonly label: "Fill available space";
107
+ readonly default: false;
108
+ readonly authoring: {
109
+ readonly authority: "instance";
110
+ };
111
+ };
102
112
  readonly clip: {
103
113
  readonly type: "boolean";
104
114
  readonly category: "Layout";
@@ -550,6 +560,15 @@ export declare const ZORA_GAME_COMPONENT_META: {
550
560
  readonly authority: "instance";
551
561
  };
552
562
  };
563
+ readonly fill: {
564
+ readonly type: "boolean";
565
+ readonly category: "Layout";
566
+ readonly label: "Fill available space";
567
+ readonly default: false;
568
+ readonly authoring: {
569
+ readonly authority: "instance";
570
+ };
571
+ };
553
572
  readonly clip: {
554
573
  readonly type: "boolean";
555
574
  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":"AAOA,8EAA8E;AAC9E,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAO3B,CAAC"}
@@ -38,6 +38,7 @@ export declare const ZORA_GAME_PLUGIN: {
38
38
  readonly resetKey: "";
39
39
  readonly autoAdvanceTime: true;
40
40
  readonly minHeight: 320;
41
+ readonly fill: false;
41
42
  readonly clip: true;
42
43
  };
43
44
  };
@@ -116,6 +117,15 @@ export declare const ZORA_GAME_PLUGIN: {
116
117
  readonly authority: "instance";
117
118
  };
118
119
  };
120
+ readonly fill: {
121
+ readonly type: "boolean";
122
+ readonly category: "Layout";
123
+ readonly label: "Fill available space";
124
+ readonly default: false;
125
+ readonly authoring: {
126
+ readonly authority: "instance";
127
+ };
128
+ };
119
129
  readonly clip: {
120
130
  readonly type: "boolean";
121
131
  readonly category: "Layout";
@@ -567,6 +577,15 @@ export declare const ZORA_GAME_PLUGIN: {
567
577
  readonly authority: "instance";
568
578
  };
569
579
  };
580
+ readonly fill: {
581
+ readonly type: "boolean";
582
+ readonly category: "Layout";
583
+ readonly label: "Fill available space";
584
+ readonly default: false;
585
+ readonly authoring: {
586
+ readonly authority: "instance";
587
+ };
588
+ };
570
589
  readonly clip: {
571
590
  readonly type: "boolean";
572
591
  readonly category: "Layout";
@@ -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,oBAAoB,EAAE,MAAM,oEAAoE,CAAC;AAC1G,OAAO,EAAE,WAAW,EAAE,MAAM,2DAA2D,CAAC;AAGxF,+FAA+F;AAC/F,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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_PLUGIN_METADATA: {
24
24
  readonly resetKey: "";
25
25
  readonly autoAdvanceTime: true;
26
26
  readonly minHeight: 320;
27
+ readonly fill: false;
27
28
  readonly clip: true;
28
29
  };
29
30
  };
@@ -102,6 +103,15 @@ export declare const ZORA_PLUGIN_METADATA: {
102
103
  readonly authority: "instance";
103
104
  };
104
105
  };
106
+ readonly fill: {
107
+ readonly type: "boolean";
108
+ readonly category: "Layout";
109
+ readonly label: "Fill available space";
110
+ readonly default: false;
111
+ readonly authoring: {
112
+ readonly authority: "instance";
113
+ };
114
+ };
105
115
  readonly clip: {
106
116
  readonly type: "boolean";
107
117
  readonly category: "Layout";
@@ -553,6 +563,15 @@ export declare const ZORA_PLUGIN_METADATA: {
553
563
  readonly authority: "instance";
554
564
  };
555
565
  };
566
+ readonly fill: {
567
+ readonly type: "boolean";
568
+ readonly category: "Layout";
569
+ readonly label: "Fill available space";
570
+ readonly default: false;
571
+ readonly authoring: {
572
+ readonly authority: "instance";
573
+ };
574
+ };
556
575
  readonly clip: {
557
576
  readonly type: "boolean";
558
577
  readonly category: "Layout";
@@ -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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+BM,CAAC"}
@@ -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;AAOpE,kGAAkG;AAClG,wBAAgB,IAAI,CAAC,KAAK,EAAE,SAAS,qBA6BpC"}
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,qBA8BpC"}
@@ -13,7 +13,7 @@ export function Game(props) {
13
13
  const runtimeBindingConfig = React.useMemo(() => ({ bindingContext: createGameBindingContext(runtime.session) }), [runtime.session]);
14
14
  return (<GameRuntimeContext.Provider value={runtimeContext}>
15
15
  <RuntimeRendererConfigProvider value={runtimeBindingConfig}>
16
- <GameField {...(props.aspectRatio === undefined ? {} : { aspectRatio: props.aspectRatio })} {...(props.minHeight === undefined ? {} : { minHeight: props.minHeight })} {...(props.clip === undefined ? {} : { clip: props.clip })} {...(props.accessibilityLabel === undefined
16
+ <GameField {...(props.aspectRatio === undefined ? {} : { aspectRatio: props.aspectRatio })} {...(props.minHeight === undefined ? {} : { minHeight: props.minHeight })} {...(props.fill === undefined ? {} : { fill: props.fill })} {...(props.clip === undefined ? {} : { clip: props.clip })} {...(props.accessibilityLabel === undefined
17
17
  ? {}
18
18
  : { accessibilityLabel: props.accessibilityLabel })} {...(props.testID === undefined ? {} : { testID: props.testID })}>
19
19
  {props.children}
@@ -1 +1 @@
1
- {"version":3,"file":"Game.js","sourceRoot":"","sources":["../../../../../src/features/game-presentation/adapters/inbound/Game.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,6BAA6B,EAAE,MAAM,oBAAoB,CAAC;AACnE,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,EAAE,wBAAwB,EAAE,MAAM,4CAA4C,CAAC;AACtF,OAAO,EAAE,6BAA6B,EAAE,MAAM,iDAAiD,CAAC;AAChG,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;IACtC,MAAM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KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,KAAK,CAAC,MAAM,EAAE,CAAC,CAAC,CAEjE;UAAA,CAAC,KAAK,CAAC,QAAQ,CACjB;QAAA,EAAE,SAAS,CACb;MAAA,EAAE,6BAA6B,CACjC;IAAA,EAAE,kBAAkB,CAAC,QAAQ,CAAC,CAC/B,CAAC;AACJ,CAAC","sourcesContent":["import { RuntimeRendererConfigProvider } from '@ankhorage/runtime';\nimport React from 'react';\n\nimport type { GameProps } from '../../../../types/gamePresentation';\nimport { createGameBindingContext } from '../../composition/createGameBindingContext';\nimport { createGameMeasurementRegistry } from '../../composition/createGameMeasurementRegistry';\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 const [measurementRegistry] = React.useState(createGameMeasurementRegistry);\n const runtimeContext = React.useMemo(\n () => ({ ...runtime, ...measurementRegistry }),\n [measurementRegistry, runtime],\n );\n const runtimeBindingConfig = React.useMemo(\n () => ({ bindingContext: createGameBindingContext(runtime.session) }),\n [runtime.session],\n );\n\n return (\n <GameRuntimeContext.Provider value={runtimeContext}>\n <RuntimeRendererConfigProvider value={runtimeBindingConfig}>\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 </RuntimeRendererConfigProvider>\n </GameRuntimeContext.Provider>\n );\n}\n"]}
1
+ {"version":3,"file":"Game.js","sourceRoot":"","sources":["../../../../../src/features/game-presentation/adapters/inbound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AAC,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,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;UAAA,CAAC,KAAK,CAAC,QAAQ,CACjB;QAAA,EAAE,SAAS,CACb;MAAA,EAAE,6BAA6B,CACjC;IAAA,EAAE,kBAAkB,CAAC,QAAQ,CAAC,CAC/B,CAAC;AACJ,CAAC","sourcesContent":["import { RuntimeRendererConfigProvider } from '@ankhorage/runtime';\nimport React from 'react';\n\nimport type { GameProps } from '../../../../types/gamePresentation';\nimport { createGameBindingContext } from '../../composition/createGameBindingContext';\nimport { createGameMeasurementRegistry } from '../../composition/createGameMeasurementRegistry';\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 const [measurementRegistry] = React.useState(createGameMeasurementRegistry);\n const runtimeContext = React.useMemo(\n () => ({ ...runtime, ...measurementRegistry }),\n [measurementRegistry, runtime],\n );\n const runtimeBindingConfig = React.useMemo(\n () => ({ bindingContext: createGameBindingContext(runtime.session) }),\n [runtime.session],\n );\n\n return (\n <GameRuntimeContext.Provider value={runtimeContext}>\n <RuntimeRendererConfigProvider value={runtimeBindingConfig}>\n <GameField\n {...(props.aspectRatio === undefined ? {} : { aspectRatio: props.aspectRatio })}\n {...(props.minHeight === undefined ? {} : { minHeight: props.minHeight })}\n {...(props.fill === undefined ? {} : { fill: props.fill })}\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 </RuntimeRendererConfigProvider>\n </GameRuntimeContext.Provider>\n );\n}\n"]}
@@ -1,4 +1,4 @@
1
1
  import type { GameFieldProps } from '../../../../types/gamePresentation';
2
2
  /*** Render a bounded relative-positioning surface for game presentation content. */
3
- export declare function GameField({ children, aspectRatio, minHeight, clip, accessibilityLabel, testID, }: GameFieldProps): import("react").JSX.Element;
3
+ export declare function GameField({ children, aspectRatio, minHeight, fill, clip, accessibilityLabel, testID, }: GameFieldProps): import("react").JSX.Element;
4
4
  //# sourceMappingURL=GameField.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"GameField.d.ts","sourceRoot":"","sources":["../../../../../src/features/game-presentation/adapters/inbound/GameField.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oCAAoC,CAAC;AAEzE,oFAAoF;AACpF,wBAAgB,SAAS,CAAC,EACxB,QAAQ,EACR,WAAW,EACX,SAAe,EACf,IAAW,EACX,kBAAkB,EAClB,MAAM,GACP,EAAE,cAAc,+BAiBhB"}
1
+ {"version":3,"file":"GameField.d.ts","sourceRoot":"","sources":["../../../../../src/features/game-presentation/adapters/inbound/GameField.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oCAAoC,CAAC;AAEzE,oFAAoF;AACpF,wBAAgB,SAAS,CAAC,EACxB,QAAQ,EACR,WAAW,EACX,SAAe,EACf,IAAY,EACZ,IAAW,EACX,kBAAkB,EAClB,MAAM,GACP,EAAE,cAAc,+BAkBhB"}
@@ -1,10 +1,11 @@
1
1
  import { View } from '@ankhorage/zora';
2
2
  import { StyleSheet } from 'react-native';
3
3
  /*** Render a bounded relative-positioning surface for game presentation content. */
4
- export function GameField({ children, aspectRatio, minHeight = 240, clip = true, accessibilityLabel, testID, }) {
4
+ export function GameField({ children, aspectRatio, minHeight = 240, fill = false, clip = true, accessibilityLabel, testID, }) {
5
5
  return (<View {...(accessibilityLabel === undefined ? {} : { accessibilityLabel })} {...(testID === undefined ? {} : { testID })} style={[
6
6
  styles.root,
7
7
  clip ? styles.clipped : styles.overflowVisible,
8
+ fill ? styles.fill : undefined,
8
9
  {
9
10
  ...(aspectRatio === undefined ? {} : { aspectRatio }),
10
11
  minHeight,
@@ -17,6 +18,9 @@ const styles = StyleSheet.create({
17
18
  clipped: {
18
19
  overflow: 'hidden',
19
20
  },
21
+ fill: {
22
+ flex: 1,
23
+ },
20
24
  overflowVisible: {
21
25
  overflow: 'visible',
22
26
  },
@@ -1 +1 @@
1
- {"version":3,"file":"GameField.js","sourceRoot":"","sources":["../../../../../src/features/game-presentation/adapters/inbound/GameField.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AACvC,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAI1C,oFAAoF;AACpF,MAAM,UAAU,SAAS,CAAC,EACxB,QAAQ,EACR,WAAW,EACX,SAAS,GAAG,GAAG,EACf,IAAI,GAAG,IAAI,EACX,kBAAkB,EAClB,MAAM,GACS;IACf,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,KAAK,CAAC,CAAC;YACL,MAAM,CAAC,IAAI;YACX,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,eAAe;YAC9C;gBACE,GAAG,CAAC,WAAW,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,WAAW,EAAE,CAAC;gBACrD,SAAS;aACV;SACF,CAAC,CAEF;MAAA,CAAC,QAAQ,CACX;IAAA,EAAE,IAAI,CAAC,CACR,CAAC;AACJ,CAAC;AAED,MAAM,MAAM,GAAG,UAAU,CAAC,MAAM,CAAC;IAC/B,OAAO,EAAE;QACP,QAAQ,EAAE,QAAQ;KACnB;IACD,eAAe,EAAE;QACf,QAAQ,EAAE,SAAS;KACpB;IACD,IAAI,EAAE;QACJ,QAAQ,EAAE,UAAU;QACpB,KAAK,EAAE,MAAM;KACd;CACF,CAAC,CAAC","sourcesContent":["import { View } from '@ankhorage/zora';\nimport { StyleSheet } from 'react-native';\n\nimport type { GameFieldProps } from '../../../../types/gamePresentation';\n\n/*** Render a bounded relative-positioning surface for game presentation content. */\nexport function GameField({\n children,\n aspectRatio,\n minHeight = 240,\n clip = true,\n accessibilityLabel,\n testID,\n}: GameFieldProps) {\n return (\n <View\n {...(accessibilityLabel === undefined ? {} : { accessibilityLabel })}\n {...(testID === undefined ? {} : { testID })}\n style={[\n styles.root,\n clip ? styles.clipped : styles.overflowVisible,\n {\n ...(aspectRatio === undefined ? {} : { aspectRatio }),\n minHeight,\n },\n ]}\n >\n {children}\n </View>\n );\n}\n\nconst styles = StyleSheet.create({\n clipped: {\n overflow: 'hidden',\n },\n overflowVisible: {\n overflow: 'visible',\n },\n root: {\n position: 'relative',\n width: '100%',\n },\n});\n"]}
1
+ {"version":3,"file":"GameField.js","sourceRoot":"","sources":["../../../../../src/features/game-presentation/adapters/inbound/GameField.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AACvC,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAI1C,oFAAoF;AACpF,MAAM,UAAU,SAAS,CAAC,EACxB,QAAQ,EACR,WAAW,EACX,SAAS,GAAG,GAAG,EACf,IAAI,GAAG,KAAK,EACZ,IAAI,GAAG,IAAI,EACX,kBAAkB,EAClB,MAAM,GACS;IACf,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,KAAK,CAAC,CAAC;YACL,MAAM,CAAC,IAAI;YACX,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,eAAe;YAC9C,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS;YAC9B;gBACE,GAAG,CAAC,WAAW,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,WAAW,EAAE,CAAC;gBACrD,SAAS;aACV;SACF,CAAC,CAEF;MAAA,CAAC,QAAQ,CACX;IAAA,EAAE,IAAI,CAAC,CACR,CAAC;AACJ,CAAC;AAED,MAAM,MAAM,GAAG,UAAU,CAAC,MAAM,CAAC;IAC/B,OAAO,EAAE;QACP,QAAQ,EAAE,QAAQ;KACnB;IACD,IAAI,EAAE;QACJ,IAAI,EAAE,CAAC;KACR;IACD,eAAe,EAAE;QACf,QAAQ,EAAE,SAAS;KACpB;IACD,IAAI,EAAE;QACJ,QAAQ,EAAE,UAAU;QACpB,KAAK,EAAE,MAAM;KACd;CACF,CAAC,CAAC","sourcesContent":["import { View } from '@ankhorage/zora';\nimport { StyleSheet } from 'react-native';\n\nimport type { GameFieldProps } from '../../../../types/gamePresentation';\n\n/*** Render a bounded relative-positioning surface for game presentation content. */\nexport function GameField({\n children,\n aspectRatio,\n minHeight = 240,\n fill = false,\n clip = true,\n accessibilityLabel,\n testID,\n}: GameFieldProps) {\n return (\n <View\n {...(accessibilityLabel === undefined ? {} : { accessibilityLabel })}\n {...(testID === undefined ? {} : { testID })}\n style={[\n styles.root,\n clip ? styles.clipped : styles.overflowVisible,\n fill ? styles.fill : undefined,\n {\n ...(aspectRatio === undefined ? {} : { aspectRatio }),\n minHeight,\n },\n ]}\n >\n {children}\n </View>\n );\n}\n\nconst styles = StyleSheet.create({\n clipped: {\n overflow: 'hidden',\n },\n fill: {\n flex: 1,\n },\n overflowVisible: {\n overflow: 'visible',\n },\n root: {\n position: 'relative',\n width: '100%',\n },\n});\n"]}
@@ -30,6 +30,15 @@ export declare const gameFieldMeta: {
30
30
  readonly authority: "instance";
31
31
  };
32
32
  };
33
+ readonly fill: {
34
+ readonly type: "boolean";
35
+ readonly category: "Layout";
36
+ readonly label: "Fill available space";
37
+ readonly default: false;
38
+ readonly authoring: {
39
+ readonly authority: "instance";
40
+ };
41
+ };
33
42
  readonly clip: {
34
43
  readonly type: "boolean";
35
44
  readonly category: "Layout";
@@ -1 +1 @@
1
- {"version":3,"file":"gameFieldMeta.d.ts","sourceRoot":"","sources":["../../../../src/features/game-presentation/meta/gameFieldMeta.ts"],"names":[],"mappings":"AAEA,oEAAoE;AACpE,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAsCY,CAAC"}
1
+ {"version":3,"file":"gameFieldMeta.d.ts","sourceRoot":"","sources":["../../../../src/features/game-presentation/meta/gameFieldMeta.ts"],"names":[],"mappings":"AAEA,oEAAoE;AACpE,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6CY,CAAC"}
@@ -23,6 +23,13 @@ export const gameFieldMeta = {
23
23
  default: 320,
24
24
  authoring: { authority: 'instance' },
25
25
  },
26
+ fill: {
27
+ type: 'boolean',
28
+ category: 'Layout',
29
+ label: 'Fill available space',
30
+ default: false,
31
+ authoring: { authority: 'instance' },
32
+ },
26
33
  clip: {
27
34
  type: 'boolean',
28
35
  category: 'Layout',
@@ -1 +1 @@
1
- {"version":3,"file":"gameFieldMeta.js","sourceRoot":"","sources":["../../../../src/features/game-presentation/meta/gameFieldMeta.ts"],"names":[],"mappings":"AAEA,oEAAoE;AACpE,MAAM,CAAC,MAAM,aAAa,GAAG;IAC3B,IAAI,EAAE,WAAW;IACjB,QAAQ,EAAE,QAAQ;IAClB,WAAW,EAAE,wEAAwE;IACrF,kBAAkB,EAAE,IAAI;IACxB,eAAe,EAAE,CAAC,YAAY,EAAE,aAAa,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,CAAC;IAC3E,SAAS,EAAE;QACT,KAAK,EAAE,YAAY;QACnB,YAAY,EAAE,EAAE,SAAS,EAAE,GAAG,EAAE,IAAI,EAAE,IAAI,EAAE;KAC7C;IACD,KAAK,EAAE;QACL,WAAW,EAAE;YACX,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,QAAQ;YAClB,KAAK,EAAE,cAAc;YACrB,SAAS,EAAE,EAAE,SAAS,EAAE,UAAU,EAAE;SACrC;QACD,SAAS,EAAE;YACT,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,QAAQ;YAClB,KAAK,EAAE,gBAAgB;YACvB,OAAO,EAAE,GAAG;YACZ,SAAS,EAAE,EAAE,SAAS,EAAE,UAAU,EAAE;SACrC;QACD,IAAI,EAAE;YACJ,IAAI,EAAE,SAAS;YACf,QAAQ,EAAE,QAAQ;YAClB,KAAK,EAAE,eAAe;YACtB,OAAO,EAAE,IAAI;YACb,SAAS,EAAE,EAAE,SAAS,EAAE,UAAU,EAAE;SACrC;QACD,kBAAkB,EAAE;YAClB,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,eAAe;YACzB,KAAK,EAAE,qBAAqB;YAC5B,SAAS,EAAE,EAAE,SAAS,EAAE,UAAU,EAAE;SACrC;KACF;CACmC,CAAC","sourcesContent":["import type { ZoraComponentMeta } from '@ankhorage/zora/metadata';\n\n/*** Describe the embeddable game field for ZORA authoring tools. */\nexport const gameFieldMeta = {\n name: 'GameField',\n category: 'layout',\n description: 'Relative positioning surface for embeddable game presentation content.',\n directManifestNode: true,\n allowedChildren: ['GameEntity', 'GameOverlay', 'Gradient', 'Image', 'View'],\n blueprint: {\n label: 'Game field',\n defaultProps: { minHeight: 320, clip: true },\n },\n props: {\n aspectRatio: {\n type: 'number',\n category: 'Layout',\n label: 'Aspect ratio',\n authoring: { authority: 'instance' },\n },\n minHeight: {\n type: 'number',\n category: 'Layout',\n label: 'Minimum height',\n default: 320,\n authoring: { authority: 'instance' },\n },\n clip: {\n type: 'boolean',\n category: 'Layout',\n label: 'Clip overflow',\n default: true,\n authoring: { authority: 'instance' },\n },\n accessibilityLabel: {\n type: 'string',\n category: 'Accessibility',\n label: 'Accessibility label',\n authoring: { authority: 'instance' },\n },\n },\n} as const satisfies ZoraComponentMeta;\n"]}
1
+ {"version":3,"file":"gameFieldMeta.js","sourceRoot":"","sources":["../../../../src/features/game-presentation/meta/gameFieldMeta.ts"],"names":[],"mappings":"AAEA,oEAAoE;AACpE,MAAM,CAAC,MAAM,aAAa,GAAG;IAC3B,IAAI,EAAE,WAAW;IACjB,QAAQ,EAAE,QAAQ;IAClB,WAAW,EAAE,wEAAwE;IACrF,kBAAkB,EAAE,IAAI;IACxB,eAAe,EAAE,CAAC,YAAY,EAAE,aAAa,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,CAAC;IAC3E,SAAS,EAAE;QACT,KAAK,EAAE,YAAY;QACnB,YAAY,EAAE,EAAE,SAAS,EAAE,GAAG,EAAE,IAAI,EAAE,IAAI,EAAE;KAC7C;IACD,KAAK,EAAE;QACL,WAAW,EAAE;YACX,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,QAAQ;YAClB,KAAK,EAAE,cAAc;YACrB,SAAS,EAAE,EAAE,SAAS,EAAE,UAAU,EAAE;SACrC;QACD,SAAS,EAAE;YACT,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,QAAQ;YAClB,KAAK,EAAE,gBAAgB;YACvB,OAAO,EAAE,GAAG;YACZ,SAAS,EAAE,EAAE,SAAS,EAAE,UAAU,EAAE;SACrC;QACD,IAAI,EAAE;YACJ,IAAI,EAAE,SAAS;YACf,QAAQ,EAAE,QAAQ;YAClB,KAAK,EAAE,sBAAsB;YAC7B,OAAO,EAAE,KAAK;YACd,SAAS,EAAE,EAAE,SAAS,EAAE,UAAU,EAAE;SACrC;QACD,IAAI,EAAE;YACJ,IAAI,EAAE,SAAS;YACf,QAAQ,EAAE,QAAQ;YAClB,KAAK,EAAE,eAAe;YACtB,OAAO,EAAE,IAAI;YACb,SAAS,EAAE,EAAE,SAAS,EAAE,UAAU,EAAE;SACrC;QACD,kBAAkB,EAAE;YAClB,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,eAAe;YACzB,KAAK,EAAE,qBAAqB;YAC5B,SAAS,EAAE,EAAE,SAAS,EAAE,UAAU,EAAE;SACrC;KACF;CACmC,CAAC","sourcesContent":["import type { ZoraComponentMeta } from '@ankhorage/zora/metadata';\n\n/*** Describe the embeddable game field for ZORA authoring tools. */\nexport const gameFieldMeta = {\n name: 'GameField',\n category: 'layout',\n description: 'Relative positioning surface for embeddable game presentation content.',\n directManifestNode: true,\n allowedChildren: ['GameEntity', 'GameOverlay', 'Gradient', 'Image', 'View'],\n blueprint: {\n label: 'Game field',\n defaultProps: { minHeight: 320, clip: true },\n },\n props: {\n aspectRatio: {\n type: 'number',\n category: 'Layout',\n label: 'Aspect ratio',\n authoring: { authority: 'instance' },\n },\n minHeight: {\n type: 'number',\n category: 'Layout',\n label: 'Minimum height',\n default: 320,\n authoring: { authority: 'instance' },\n },\n fill: {\n type: 'boolean',\n category: 'Layout',\n label: 'Fill available space',\n default: false,\n authoring: { authority: 'instance' },\n },\n clip: {\n type: 'boolean',\n category: 'Layout',\n label: 'Clip overflow',\n default: true,\n authoring: { authority: 'instance' },\n },\n accessibilityLabel: {\n type: 'string',\n category: 'Accessibility',\n label: 'Accessibility label',\n authoring: { authority: 'instance' },\n },\n },\n} as const satisfies ZoraComponentMeta;\n"]}
@@ -20,6 +20,7 @@ export declare const gameMeta: {
20
20
  readonly resetKey: "";
21
21
  readonly autoAdvanceTime: true;
22
22
  readonly minHeight: 320;
23
+ readonly fill: false;
23
24
  readonly clip: true;
24
25
  };
25
26
  };
@@ -98,6 +99,15 @@ export declare const gameMeta: {
98
99
  readonly authority: "instance";
99
100
  };
100
101
  };
102
+ readonly fill: {
103
+ readonly type: "boolean";
104
+ readonly category: "Layout";
105
+ readonly label: "Fill available space";
106
+ readonly default: false;
107
+ readonly authoring: {
108
+ readonly authority: "instance";
109
+ };
110
+ };
101
111
  readonly clip: {
102
112
  readonly type: "boolean";
103
113
  readonly category: "Layout";
@@ -1 +1 @@
1
- {"version":3,"file":"gameMeta.d.ts","sourceRoot":"","sources":["../../../../src/features/game-presentation/meta/gameMeta.ts"],"names":[],"mappings":"AAEA,oGAAoG;AACpG,eAAO,MAAM,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAuGiB,CAAC"}
1
+ {"version":3,"file":"gameMeta.d.ts","sourceRoot":"","sources":["../../../../src/features/game-presentation/meta/gameMeta.ts"],"names":[],"mappings":"AAEA,oGAAoG;AACpG,eAAO,MAAM,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+GiB,CAAC"}
@@ -26,6 +26,7 @@ export const gameMeta = {
26
26
  resetKey: '',
27
27
  autoAdvanceTime: true,
28
28
  minHeight: 320,
29
+ fill: false,
29
30
  clip: true,
30
31
  },
31
32
  },
@@ -87,6 +88,13 @@ export const gameMeta = {
87
88
  default: 320,
88
89
  authoring: { authority: 'instance' },
89
90
  },
91
+ fill: {
92
+ type: 'boolean',
93
+ category: 'Layout',
94
+ label: 'Fill available space',
95
+ default: false,
96
+ authoring: { authority: 'instance' },
97
+ },
90
98
  clip: {
91
99
  type: 'boolean',
92
100
  category: 'Layout',
@@ -1 +1 @@
1
- {"version":3,"file":"gameMeta.js","sourceRoot":"","sources":["../../../../src/features/game-presentation/meta/gameMeta.ts"],"names":[],"mappings":"AAEA,oGAAoG;AACpG,MAAM,CAAC,MAAM,QAAQ,GAAG;IACtB,IAAI,EAAE,MAAM;IACZ,QAAQ,EAAE,SAAS;IACnB,WAAW,EACT,0GAA0G;IAC5G,kBAAkB,EAAE,IAAI;IACxB,eAAe,EAAE;QACf,YAAY;QACZ,eAAe;QACf,sBAAsB;QACtB,aAAa;QACb,UAAU;QACV,OAAO;QACP,MAAM;KACP;IACD,SAAS,EAAE;QACT,KAAK,EAAE,MAAM;QACb,YAAY,EAAE;YACZ,UAAU,EAAE;gBACV,EAAE,EAAE,MAAM;gBACV,YAAY,EAAE,SAAS;gBACvB,MAAM,EAAE,CAAC,EAAE,EAAE,EAAE,MAAM,EAAE,CAAC;gBACxB,KAAK,EAAE,EAAE;aACV;YACD,IAAI,EAAE,CAAC;YACP,QAAQ,EAAE,EAAE;YACZ,eAAe,EAAE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QACD,SAAS,EAAE;YACT,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,QAAQ;YAClB,KAAK,EAAE,gBAAgB;YACvB,OAAO,EAAE,GAAG;YACZ,SAAS,EAAE,EAAE,SAAS,EAAE,UAAU,EAAE;SACrC;QACD,IAAI,EAAE;YACJ,IAAI,EAAE,SAAS;YACf,QAAQ,EAAE,QAAQ;YAClB,KAAK,EAAE,eAAe;YACtB,OAAO,EAAE,IAAI;YACb,SAAS,EAAE,EAAE,SAAS,EAAE,UAAU,EAAE;SACrC;QACD,kBAAkB,EAAE;YAClB,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,eAAe;YACzB,KAAK,EAAE,qBAAqB;YAC5B,SAAS,EAAE,EAAE,SAAS,EAAE,UAAU,EAAE;SACrC;KACF;CACmC,CAAC","sourcesContent":["import type { ZoraComponentMeta } from '@ankhorage/zora/metadata';\n\n/*** Describe the embeddable config-driven Game runtime/presentation boundary for ZORA authoring. */\nexport const gameMeta = {\n name: 'Game',\n category: 'pattern',\n description:\n 'Embeds one config-driven game session inside ordinary ZORA layout and emits domain-neutral game outputs.',\n directManifestNode: true,\n allowedChildren: [\n 'GameEntity',\n 'GameInputZone',\n 'GameMeasurementProbe',\n 'GameOverlay',\n 'Gradient',\n 'Image',\n 'View',\n ],\n blueprint: {\n label: 'Game',\n defaultProps: {\n definition: {\n id: 'game',\n initialPhase: 'playing',\n stages: [{ id: 'main' }],\n rules: [],\n },\n seed: 0,\n resetKey: '',\n autoAdvanceTime: true,\n minHeight: 320,\n clip: true,\n },\n },\n bindings: {\n props: {\n definition: {\n value: { type: 'object' },\n acceptsFallback: true,\n },\n input: {\n value: { type: 'record' },\n acceptsFallback: true,\n },\n },\n },\n events: {\n output: {\n label: 'Game output',\n eventType: 'game.output',\n description: 'Emitted when the platform-neutral game runtime produces an app/domain output.',\n payloadFields: [\n { path: 'type', type: 'string' },\n { path: 'payload', type: 'record' },\n ],\n },\n },\n props: {\n seed: {\n type: 'number',\n category: 'Runtime',\n label: 'Initial seed',\n default: 0,\n authoring: { authority: 'instance' },\n },\n resetKey: {\n type: 'string',\n category: 'Runtime',\n label: 'Reset key',\n default: '',\n authoring: { authority: 'instance' },\n },\n autoAdvanceTime: {\n type: 'boolean',\n category: 'Runtime',\n label: 'Advance scheduled effects',\n default: true,\n authoring: { authority: 'instance' },\n },\n aspectRatio: {\n type: 'number',\n category: 'Layout',\n label: 'Aspect ratio',\n authoring: { authority: 'instance' },\n },\n minHeight: {\n type: 'number',\n category: 'Layout',\n label: 'Minimum height',\n default: 320,\n authoring: { authority: 'instance' },\n },\n clip: {\n type: 'boolean',\n category: 'Layout',\n label: 'Clip overflow',\n default: true,\n authoring: { authority: 'instance' },\n },\n accessibilityLabel: {\n type: 'string',\n category: 'Accessibility',\n label: 'Accessibility label',\n authoring: { authority: 'instance' },\n },\n },\n} as const satisfies ZoraComponentMeta;\n"]}
1
+ {"version":3,"file":"gameMeta.js","sourceRoot":"","sources":["../../../../src/features/game-presentation/meta/gameMeta.ts"],"names":[],"mappings":"AAEA,oGAAoG;AACpG,MAAM,CAAC,MAAM,QAAQ,GAAG;IACtB,IAAI,EAAE,MAAM;IACZ,QAAQ,EAAE,SAAS;IACnB,WAAW,EACT,0GAA0G;IAC5G,kBAAkB,EAAE,IAAI;IACxB,eAAe,EAAE;QACf,YAAY;QACZ,eAAe;QACf,sBAAsB;QACtB,aAAa;QACb,UAAU;QACV,OAAO;QACP,MAAM;KACP;IACD,SAAS,EAAE;QACT,KAAK,EAAE,MAAM;QACb,YAAY,EAAE;YACZ,UAAU,EAAE;gBACV,EAAE,EAAE,MAAM;gBACV,YAAY,EAAE,SAAS;gBACvB,MAAM,EAAE,CAAC,EAAE,EAAE,EAAE,MAAM,EAAE,CAAC;gBACxB,KAAK,EAAE,EAAE;aACV;YACD,IAAI,EAAE,CAAC;YACP,QAAQ,EAAE,EAAE;YACZ,eAAe,EAAE,IAAI;YACrB,SAAS,EAAE,GAAG;YACd,IAAI,EAAE,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I,EAAE,QAAQ;YACd,QAAQ,EAAE,QAAQ;YAClB,KAAK,EAAE,gBAAgB;YACvB,OAAO,EAAE,GAAG;YACZ,SAAS,EAAE,EAAE,SAAS,EAAE,UAAU,EAAE;SACrC;QACD,IAAI,EAAE;YACJ,IAAI,EAAE,SAAS;YACf,QAAQ,EAAE,QAAQ;YAClB,KAAK,EAAE,sBAAsB;YAC7B,OAAO,EAAE,KAAK;YACd,SAAS,EAAE,EAAE,SAAS,EAAE,UAAU,EAAE;SACrC;QACD,IAAI,EAAE;YACJ,IAAI,EAAE,SAAS;YACf,QAAQ,EAAE,QAAQ;YAClB,KAAK,EAAE,eAAe;YACtB,OAAO,EAAE,IAAI;YACb,SAAS,EAAE,EAAE,SAAS,EAAE,UAAU,EAAE;SACrC;QACD,kBAAkB,EAAE;YAClB,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,eAAe;YACzB,KAAK,EAAE,qBAAqB;YAC5B,SAAS,EAAE,EAAE,SAAS,EAAE,UAAU,EAAE;SACrC;KACF;CACmC,CAAC","sourcesContent":["import type { ZoraComponentMeta } from '@ankhorage/zora/metadata';\n\n/*** Describe the embeddable config-driven Game runtime/presentation boundary for ZORA authoring. */\nexport const gameMeta = {\n name: 'Game',\n category: 'pattern',\n description:\n 'Embeds one config-driven game session inside ordinary ZORA layout and emits domain-neutral game outputs.',\n directManifestNode: true,\n allowedChildren: [\n 'GameEntity',\n 'GameInputZone',\n 'GameMeasurementProbe',\n 'GameOverlay',\n 'Gradient',\n 'Image',\n 'View',\n ],\n blueprint: {\n label: 'Game',\n defaultProps: {\n definition: {\n id: 'game',\n initialPhase: 'playing',\n stages: [{ id: 'main' }],\n rules: [],\n },\n seed: 0,\n resetKey: '',\n autoAdvanceTime: true,\n minHeight: 320,\n fill: false,\n clip: true,\n },\n },\n bindings: {\n props: {\n definition: {\n value: { type: 'object' },\n acceptsFallback: true,\n },\n input: {\n value: { type: 'record' },\n acceptsFallback: true,\n },\n },\n },\n events: {\n output: {\n label: 'Game output',\n eventType: 'game.output',\n description: 'Emitted when the platform-neutral game runtime produces an app/domain output.',\n payloadFields: [\n { path: 'type', type: 'string' },\n { path: 'payload', type: 'record' },\n ],\n },\n },\n props: {\n seed: {\n type: 'number',\n category: 'Runtime',\n label: 'Initial seed',\n default: 0,\n authoring: { authority: 'instance' },\n },\n resetKey: {\n type: 'string',\n category: 'Runtime',\n label: 'Reset key',\n default: '',\n authoring: { authority: 'instance' },\n },\n autoAdvanceTime: {\n type: 'boolean',\n category: 'Runtime',\n label: 'Advance scheduled effects',\n default: true,\n authoring: { authority: 'instance' },\n },\n aspectRatio: {\n type: 'number',\n category: 'Layout',\n label: 'Aspect ratio',\n authoring: { authority: 'instance' },\n },\n minHeight: {\n type: 'number',\n category: 'Layout',\n label: 'Minimum height',\n default: 320,\n authoring: { authority: 'instance' },\n },\n fill: {\n type: 'boolean',\n category: 'Layout',\n label: 'Fill available space',\n default: false,\n authoring: { authority: 'instance' },\n },\n clip: {\n type: 'boolean',\n category: 'Layout',\n label: 'Clip overflow',\n default: true,\n authoring: { authority: 'instance' },\n },\n accessibilityLabel: {\n type: 'string',\n category: 'Accessibility',\n label: 'Accessibility label',\n authoring: { authority: 'instance' },\n },\n },\n} as const satisfies ZoraComponentMeta;\n"]}
@@ -24,6 +24,7 @@ export interface GameFieldProps {
24
24
  readonly children?: React.ReactNode;
25
25
  readonly aspectRatio?: number;
26
26
  readonly minHeight?: number;
27
+ readonly fill?: boolean;
27
28
  readonly clip?: boolean;
28
29
  readonly accessibilityLabel?: string;
29
30
  readonly testID?: string;
@@ -1 +1 @@
1
- {"version":3,"file":"gamePresentation.d.ts","sourceRoot":"","sources":["../../src/types/gamePresentation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7E,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,KAAK,0BAA0B,GAAG,UAAU,GAAG,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AAED,MAAM,WAAW,yBAAyB;IACxC,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,OAAO,CAAC,EAAE,OAAO,CAAC;CAC5B;AAED,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,CAAC,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACpC,QAAQ,CAAC,SAAS,CAAC,EAAE,oBAAoB,CAAC;IAC1C,QAAQ,CAAC,QAAQ,CAAC,EAAE,OAAO,CAAC;IAC5B,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,kBAAkB,CAAC,EAAE,MAAM,CAAC;IACrC,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED,MAAM,WAAW,SAAU,SAAQ,cAAc;IAC/C,QAAQ,CAAC,UAAU,EAAE,cAAc,CAAC;IACpC,QAAQ,CAAC,KAAK,CAAC,EAAE,SAAS,CAAC;IAC3B,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,eAAe,CAAC,EAAE,OAAO,CAAC;IACnC,QAAQ,CAAC,QAAQ,CAAC,EAAE,CAAC,MAAM,EAAE,UAAU,KAAK,IAAI,CAAC;CAClD"}
@@ -1 +1 @@
1
- {"version":3,"file":"gamePresentation.js","sourceRoot":"","sources":["../../src/types/gamePresentation.ts"],"names":[],"mappings":"","sourcesContent":["import type { GameDefinition, GameInput, GameOutput } from '@ankhorage/game';\nimport type React from 'react';\n\ntype GameOverlayCornerPlacement = 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right';\n\nexport type GamePointerEvents = 'auto' | 'box-none' | 'box-only' | 'none';\nexport type GameEntityEasing = 'linear' | 'ease-in' | 'ease-out' | 'ease-in-out';\n\nexport interface GameEntityMotionProps {\n readonly transitionDurationMs?: number;\n readonly transitionEasing?: GameEntityEasing;\n readonly motionOffsetX?: number;\n readonly motionOffsetY?: number;\n readonly motionOpacityDelta?: number;\n readonly motionScaleDelta?: number;\n readonly motionRotationDelta?: number;\n readonly motionDurationMs?: number;\n readonly motionDelayMs?: number;\n readonly motionEasing?: GameEntityEasing;\n readonly motionRepeat?: boolean;\n readonly motionAlternate?: boolean;\n readonly motionPaused?: boolean;\n readonly motionEssential?: boolean;\n}\nexport type GameOverlayPlacement =\n 'fill' | 'center' | 'top' | 'bottom' | GameOverlayCornerPlacement;\n\nexport interface GameFieldProps {\n readonly children?: React.ReactNode;\n readonly aspectRatio?: number;\n readonly minHeight?: number;\n readonly clip?: boolean;\n readonly accessibilityLabel?: string;\n readonly testID?: string;\n}\n\nexport interface GameEntityProps extends GameEntityMotionProps {\n readonly children?: React.ReactNode;\n readonly x?: number;\n readonly y?: number;\n readonly width?: number;\n readonly height?: number;\n readonly opacity?: number;\n readonly scale?: number;\n readonly rotation?: number;\n readonly zIndex?: number;\n readonly hidden?: boolean;\n readonly pointerEvents?: GamePointerEvents;\n readonly measurementId?: string;\n readonly accessibilityLabel?: string;\n readonly testID?: string;\n}\n\nexport interface GameKeyboardBinding {\n readonly key: string;\n readonly eventType?: string;\n readonly entityId?: string;\n readonly preventDefault?: boolean;\n}\n\nexport interface GameInputZoneProps {\n readonly eventType: string;\n readonly entityId?: string;\n readonly x?: number;\n readonly y?: number;\n readonly width?: number;\n readonly height?: number;\n readonly zIndex?: number;\n readonly enabled?: boolean;\n readonly continuous?: boolean;\n readonly keyboardBindings?: readonly GameKeyboardBinding[];\n readonly accessibilityLabel?: string;\n readonly testID?: string;\n}\n\nexport interface GameMeasurementProbeProps {\n readonly sourceId: string;\n readonly targetId: string;\n readonly eventType?: string;\n readonly entityId?: string;\n readonly delayMs?: number;\n readonly enabled?: boolean;\n}\n\nexport interface GameOverlayProps {\n readonly children?: React.ReactNode;\n readonly placement?: GameOverlayPlacement;\n readonly blocking?: boolean;\n readonly padding?: number;\n readonly accessibilityLabel?: string;\n readonly testID?: string;\n}\n\nexport interface GameProps extends GameFieldProps {\n readonly definition: GameDefinition;\n readonly input?: GameInput;\n readonly seed?: number;\n readonly resetKey?: string;\n readonly autoAdvanceTime?: boolean;\n readonly onOutput?: (output: GameOutput) => void;\n}\n"]}
1
+ {"version":3,"file":"gamePresentation.js","sourceRoot":"","sources":["../../src/types/gamePresentation.ts"],"names":[],"mappings":"","sourcesContent":["import type { GameDefinition, GameInput, GameOutput } from '@ankhorage/game';\nimport type React from 'react';\n\ntype GameOverlayCornerPlacement = 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right';\n\nexport type GamePointerEvents = 'auto' | 'box-none' | 'box-only' | 'none';\nexport type GameEntityEasing = 'linear' | 'ease-in' | 'ease-out' | 'ease-in-out';\n\nexport interface GameEntityMotionProps {\n readonly transitionDurationMs?: number;\n readonly transitionEasing?: GameEntityEasing;\n readonly motionOffsetX?: number;\n readonly motionOffsetY?: number;\n readonly motionOpacityDelta?: number;\n readonly motionScaleDelta?: number;\n readonly motionRotationDelta?: number;\n readonly motionDurationMs?: number;\n readonly motionDelayMs?: number;\n readonly motionEasing?: GameEntityEasing;\n readonly motionRepeat?: boolean;\n readonly motionAlternate?: boolean;\n readonly motionPaused?: boolean;\n readonly motionEssential?: boolean;\n}\nexport type GameOverlayPlacement =\n 'fill' | 'center' | 'top' | 'bottom' | GameOverlayCornerPlacement;\n\nexport interface GameFieldProps {\n readonly children?: React.ReactNode;\n readonly aspectRatio?: number;\n readonly minHeight?: number;\n readonly fill?: boolean;\n readonly clip?: boolean;\n readonly accessibilityLabel?: string;\n readonly testID?: string;\n}\n\nexport interface GameEntityProps extends GameEntityMotionProps {\n readonly children?: React.ReactNode;\n readonly x?: number;\n readonly y?: number;\n readonly width?: number;\n readonly height?: number;\n readonly opacity?: number;\n readonly scale?: number;\n readonly rotation?: number;\n readonly zIndex?: number;\n readonly hidden?: boolean;\n readonly pointerEvents?: GamePointerEvents;\n readonly measurementId?: string;\n readonly accessibilityLabel?: string;\n readonly testID?: string;\n}\n\nexport interface GameKeyboardBinding {\n readonly key: string;\n readonly eventType?: string;\n readonly entityId?: string;\n readonly preventDefault?: boolean;\n}\n\nexport interface GameInputZoneProps {\n readonly eventType: string;\n readonly entityId?: string;\n readonly x?: number;\n readonly y?: number;\n readonly width?: number;\n readonly height?: number;\n readonly zIndex?: number;\n readonly enabled?: boolean;\n readonly continuous?: boolean;\n readonly keyboardBindings?: readonly GameKeyboardBinding[];\n readonly accessibilityLabel?: string;\n readonly testID?: string;\n}\n\nexport interface GameMeasurementProbeProps {\n readonly sourceId: string;\n readonly targetId: string;\n readonly eventType?: string;\n readonly entityId?: string;\n readonly delayMs?: number;\n readonly enabled?: boolean;\n}\n\nexport interface GameOverlayProps {\n readonly children?: React.ReactNode;\n readonly placement?: GameOverlayPlacement;\n readonly blocking?: boolean;\n readonly padding?: number;\n readonly accessibilityLabel?: string;\n readonly testID?: string;\n}\n\nexport interface GameProps extends GameFieldProps {\n readonly definition: GameDefinition;\n readonly input?: GameInput;\n readonly seed?: number;\n readonly resetKey?: string;\n readonly autoAdvanceTime?: boolean;\n readonly onOutput?: (output: GameOutput) => void;\n}\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ankhorage/zora-game",
3
- "version": "0.7.2",
3
+ "version": "0.8.1",
4
4
  "type": "module",
5
5
  "description": "Generic game presentation primitives for React Native and React Native Web apps built on ZORA.",
6
6
  "homepage": "https://github.com/ankhorage/zora-game#readme",
@@ -21,6 +21,8 @@ describe('ZORA game plugin metadata', () => {
21
21
  expect(game.allowedChildren).toContain('GameInputZone');
22
22
  expect(game.allowedChildren).toContain('GameMeasurementProbe');
23
23
  expect(game.allowedChildren).toContain('GameOverlay');
24
+ expect(game.props.fill?.type).toBe('boolean');
25
+ expect(gameField.props.fill?.type).toBe('boolean');
24
26
  });
25
27
 
26
28
  test('describes bindable Game inputs and domain-neutral outputs', () => {
@@ -27,6 +27,7 @@ export function Game(props: GameProps) {
27
27
  <GameField
28
28
  {...(props.aspectRatio === undefined ? {} : { aspectRatio: props.aspectRatio })}
29
29
  {...(props.minHeight === undefined ? {} : { minHeight: props.minHeight })}
30
+ {...(props.fill === undefined ? {} : { fill: props.fill })}
30
31
  {...(props.clip === undefined ? {} : { clip: props.clip })}
31
32
  {...(props.accessibilityLabel === undefined
32
33
  ? {}
@@ -8,6 +8,7 @@ export function GameField({
8
8
  children,
9
9
  aspectRatio,
10
10
  minHeight = 240,
11
+ fill = false,
11
12
  clip = true,
12
13
  accessibilityLabel,
13
14
  testID,
@@ -19,6 +20,7 @@ export function GameField({
19
20
  style={[
20
21
  styles.root,
21
22
  clip ? styles.clipped : styles.overflowVisible,
23
+ fill ? styles.fill : undefined,
22
24
  {
23
25
  ...(aspectRatio === undefined ? {} : { aspectRatio }),
24
26
  minHeight,
@@ -34,6 +36,9 @@ const styles = StyleSheet.create({
34
36
  clipped: {
35
37
  overflow: 'hidden',
36
38
  },
39
+ fill: {
40
+ flex: 1,
41
+ },
37
42
  overflowVisible: {
38
43
  overflow: 'visible',
39
44
  },
@@ -25,6 +25,13 @@ export const gameFieldMeta = {
25
25
  default: 320,
26
26
  authoring: { authority: 'instance' },
27
27
  },
28
+ fill: {
29
+ type: 'boolean',
30
+ category: 'Layout',
31
+ label: 'Fill available space',
32
+ default: false,
33
+ authoring: { authority: 'instance' },
34
+ },
28
35
  clip: {
29
36
  type: 'boolean',
30
37
  category: 'Layout',
@@ -29,6 +29,7 @@ export const gameMeta = {
29
29
  resetKey: '',
30
30
  autoAdvanceTime: true,
31
31
  minHeight: 320,
32
+ fill: false,
32
33
  clip: true,
33
34
  },
34
35
  },
@@ -90,6 +91,13 @@ export const gameMeta = {
90
91
  default: 320,
91
92
  authoring: { authority: 'instance' },
92
93
  },
94
+ fill: {
95
+ type: 'boolean',
96
+ category: 'Layout',
97
+ label: 'Fill available space',
98
+ default: false,
99
+ authoring: { authority: 'instance' },
100
+ },
93
101
  clip: {
94
102
  type: 'boolean',
95
103
  category: 'Layout',
@@ -29,6 +29,7 @@ export interface GameFieldProps {
29
29
  readonly children?: React.ReactNode;
30
30
  readonly aspectRatio?: number;
31
31
  readonly minHeight?: number;
32
+ readonly fill?: boolean;
32
33
  readonly clip?: boolean;
33
34
  readonly accessibilityLabel?: string;
34
35
  readonly testID?: string;