point-click-components 0.2.1 → 0.2.2

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.
@@ -1,9 +1,11 @@
1
1
  import { ActorData } from 'point-click-lib';
2
+ import { AspectRatio } from 'point-click-lib';
2
3
  import { BoardFont } from 'point-click-lib';
3
4
  import { CellMatrix } from 'point-click-lib';
4
5
  import { Command } from 'point-click-lib';
5
6
  import { CommandTarget } from 'point-click-lib';
6
7
  import { Context } from 'react';
8
+ import { ConversationBranch } from 'point-click-lib';
7
9
  import { ConversationChoice } from 'point-click-lib';
8
10
  import { Direction } from 'point-click-lib';
9
11
  import { Dispatch } from 'react';
@@ -13,6 +15,7 @@ import { GameDesign } from 'point-click-lib';
13
15
  import { GameRuntimeOptions } from 'point-click-lib';
14
16
  import { HotspotZone } from 'point-click-lib';
15
17
  import { InGameEventReporter } from 'point-click-lib';
18
+ import { ItemData } from 'point-click-lib';
16
19
  import { LogToDebug } from 'point-click-lib';
17
20
  import { Order } from 'point-click-lib';
18
21
  import { Provider } from 'react';
@@ -22,6 +25,7 @@ import { Reducer } from 'react';
22
25
  import { RoomData } from 'point-click-lib';
23
26
  import { SoundValue } from 'point-click-lib';
24
27
  import { SpriteData } from 'point-click-lib';
28
+ import { StaticFrameParamsS } from 'point-click-lib';
25
29
  import { StoryBoard } from 'point-click-lib';
26
30
  import { StoryBoardPage } from 'point-click-lib';
27
31
  import { Zone } from 'point-click-lib';
@@ -57,7 +61,18 @@ export declare const CameraPointProvider: Provider< {
57
61
  cameraPoint?: XY;
58
62
  }>;
59
63
 
60
- export declare const ContextualGameRoom: () => JSX.Element;
64
+ export declare const CharacterSwitchButtons: () => JSX.Element | null;
65
+
66
+ export declare function CommandLine(): JSX.Element;
67
+
68
+ export declare const ContextualGameRoom: ({ handleTargetContextClick, handleRoomContextClick, }: {
69
+ handleTargetContextClick?: HandleClickFunction<CommandTarget>;
70
+ handleRoomContextClick?: {
71
+ (x: number, y: number): void;
72
+ };
73
+ }) => JSX.Element;
74
+
75
+ export declare const ConversationChoices: () => JSX.Element | null;
61
76
 
62
77
  export declare const DefaultLayout: () => JSX.Element;
63
78
 
@@ -114,6 +129,8 @@ SoundHandler?: SoundPlayerComponent;
114
129
  allowLocalSaves?: boolean;
115
130
  }>;
116
131
 
132
+ export declare const GameMetaControls: () => JSX.Element;
133
+
117
134
  export declare const GameRoom: FunctionComponent<Props_2>;
118
135
 
119
136
  export declare const GameRunner: ({ gameDesign, Layout, getImageAsset, getSoundAsset, SoundHandler, initialRoomSize, options }: Props_3) => JSX.Element;
@@ -169,6 +186,23 @@ declare type ImageAsset = FileAsset & {
169
186
 
170
187
  declare type ImageAssetCategory = 'background' | 'item' | 'spriteSheet' | 'any';
171
188
 
189
+ /**
190
+ * Renders a figure with the aspect ratio scaled to be contained by its parent, with the sprite
191
+ * frame as its image background.
192
+ *
193
+ * If the frame has no row and col specified, the image background will display at the image's
194
+ * natural aspect ratio, not be stretch to fill the figure.
195
+ */
196
+ export declare const ImageBlock: React.FunctionComponent<{
197
+ frame: StaticFrameParamsS;
198
+ aspectRatio?: AspectRatio;
199
+ filter?: string;
200
+ fitHeight?: boolean;
201
+ getImageAsset: GetImageAsset;
202
+ }>;
203
+
204
+ export declare const ItemMenu: () => JSX.Element;
205
+
172
206
  export declare function locateClickInWorld(clickXPosition: number, clickYposition: number, viewAngleX: number, viewAngleY: number, roomData: RoomData): {
173
207
  x: number;
174
208
  y: number;
@@ -208,6 +242,9 @@ declare type Props_2 = {
208
242
  gameState: GameData;
209
243
  handleTargetClick: HandleClickFunction<CommandTarget>;
210
244
  handleTargetContextClick?: HandleClickFunction<CommandTarget>;
245
+ handleRoomContextClick?: {
246
+ (x: number, y: number): void;
247
+ };
211
248
  placeholder?: ReactElement;
212
249
  } & Omit<RoomProps, 'data' | 'viewAngleX' | 'viewAngleY' | 'orderedActors'>;
213
250
 
@@ -383,6 +420,8 @@ export declare const useCameraPoint: () => {
383
420
  cameraPoint?: XY;
384
421
  };
385
422
 
423
+ export declare const useConversationBranch: () => ConversationBranch | undefined;
424
+
386
425
  export declare const useLocalSavedGame: () => {
387
426
  saveGame: (fileName?: string) => void;
388
427
  loadGame: (fileName?: string) => void;
@@ -391,6 +430,8 @@ export declare const useLocalSavedGame: () => {
391
430
  restart: () => void;
392
431
  };
393
432
 
433
+ export declare const usePlayerInventory: () => ItemData[];
434
+
394
435
  export declare const useRoomRender: () => {
395
436
  roomData: {
396
437
  id: string;
@@ -471,6 +512,8 @@ export declare const useRoomRender: () => {
471
512
  orderSpeed: number;
472
513
  };
473
514
 
515
+ export declare const VerbRadioButton: () => JSX.Element;
516
+
474
517
  export declare const WalkableOrObstacle: ({ zone, markVertices, zoneType, zoneOptions }: Props_7) => JSX.Element;
475
518
 
476
519
  declare type XY = {