point-click-components 0.2.4 → 0.3.0-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.
@@ -17,12 +17,14 @@ import { HotspotZone } from 'point-click-lib';
17
17
  import { InGameEventReporter } from 'point-click-lib';
18
18
  import { ItemData } from 'point-click-lib';
19
19
  import { LogToDebug } from 'point-click-lib';
20
+ import { MouseEventHandler } from 'react';
20
21
  import { Order } from 'point-click-lib';
21
22
  import { Provider } from 'react';
22
23
  import { ReactElement } from 'react';
23
24
  import { ReactNode } from 'react';
24
25
  import { Reducer } from 'react';
25
26
  import { RoomData } from 'point-click-lib';
27
+ import { SerializedStyles } from '@emotion/react';
26
28
  import { SoundValue } from 'point-click-lib';
27
29
  import { SpriteData } from 'point-click-lib';
28
30
  import { StaticFrameParamsS } from 'point-click-lib';
@@ -30,7 +32,7 @@ import { StoryBoard } from 'point-click-lib';
30
32
  import { StoryBoardPage } from 'point-click-lib';
31
33
  import { Zone } from 'point-click-lib';
32
34
 
33
- export declare const ActorFigure: ({ data, isPaused, clickHandler, handleHover, contextClickHandler, orders, overrideSpriteData, noSound, getImageAsset, getSoundAsset, sprites, SoundHandler, }: Props) => JSX.Element;
35
+ export declare const ActorFigure: ({ data, isPaused, clickHandler, handleHover, contextClickHandler, orders, overrideSpriteData, noSound, getImageAsset, getSoundAsset, sprites, SoundHandler, highlight, customInteractableStyling, }: Props) => JSX.Element;
34
36
 
35
37
  export declare const ActorPreview: ({ data, overrideSpriteData, scale, noBaseLine, maxHeight, animation, direction, getImageAsset, sprites }: ActorPreviewProps) => JSX.Element;
36
38
 
@@ -74,6 +76,29 @@ export declare const ContextualGameRoom: ({ handleTargetContextClick, handleRoom
74
76
 
75
77
  export declare const ConversationChoices: () => JSX.Element | null;
76
78
 
79
+ export declare type CustomInteractableStyling = {
80
+ actor?: {
81
+ highlight?: {
82
+ className?: string;
83
+ css?: SerializedStyles;
84
+ };
85
+ standard?: {
86
+ className?: string;
87
+ css?: SerializedStyles;
88
+ };
89
+ };
90
+ hotspot?: {
91
+ highlight?: {
92
+ className?: string;
93
+ css?: SerializedStyles;
94
+ };
95
+ standard?: {
96
+ className?: string;
97
+ css?: SerializedStyles;
98
+ };
99
+ };
100
+ };
101
+
77
102
  export declare const DefaultLayout: () => JSX.Element;
78
103
 
79
104
  export declare type FileAsset = {
@@ -128,13 +153,14 @@ getSoundAsset: GetSoundAsset;
128
153
  SoundHandler?: SoundPlayerComponent;
129
154
  allowLocalSaves?: boolean;
130
155
  SpeechBubbleComponent?: FunctionComponent<SpeechBubbleProps>;
156
+ customInteractableStyling?: CustomInteractableStyling;
131
157
  }>;
132
158
 
133
159
  export declare const GameMetaControls: () => JSX.Element;
134
160
 
135
161
  export declare const GameRoom: FunctionComponent<Props_2>;
136
162
 
137
- export declare const GameRunner: ({ gameDesign, Layout, getImageAsset, getSoundAsset, SoundHandler, initialRoomSize, options, SpeechBubbleComponent, }: Props_3) => JSX.Element;
163
+ export declare const GameRunner: ({ gameDesign, Layout, getImageAsset, getSoundAsset, SoundHandler, initialRoomSize, options, SpeechBubbleComponent, customInteractableStyling, }: Props_3) => JSX.Element;
138
164
 
139
165
  export declare type GameRunnerOptions = Partial<GameRuntimeOptions> & {
140
166
  eventReporter?: InGameEventReporter;
@@ -239,8 +265,18 @@ declare interface Props {
239
265
  getSoundAsset: GetSoundAsset;
240
266
  sprites: SpriteData[];
241
267
  SoundHandler?: SoundPlayerComponent;
268
+ highlight?: boolean;
269
+ customInteractableStyling?: CustomInteractableStyling;
242
270
  }
243
271
 
272
+ declare type Props_10 = {
273
+ page: StoryBoardPage;
274
+ font?: BoardFont;
275
+ getImageAsset: {
276
+ (id: string): ImageAsset | undefined;
277
+ };
278
+ };
279
+
244
280
  declare type Props_2 = {
245
281
  gameState: GameData;
246
282
  handleTargetClick: HandleClickFunction<CommandTarget>;
@@ -255,6 +291,7 @@ declare interface Props_3 {
255
291
  gameDesign: GameDesign;
256
292
  Layout?: FunctionComponent;
257
293
  SpeechBubbleComponent?: FunctionComponent<SpeechBubbleProps>;
294
+ customInteractableStyling?: CustomInteractableStyling;
258
295
  getImageAsset: GetImageAsset;
259
296
  getSoundAsset: GetSoundAsset;
260
297
  SoundHandler?: SoundPlayerComponent;
@@ -278,8 +315,8 @@ declare interface Props_5 {
278
315
  handleHover?: HandleHoverFunction;
279
316
  highlight?: boolean;
280
317
  markVertices?: boolean;
281
- flash?: boolean;
282
318
  stopPropogation?: boolean;
319
+ customInteractableStyling?: CustomInteractableStyling;
283
320
  }
284
321
 
285
322
  declare interface Props_6 {
@@ -294,16 +331,16 @@ declare interface Props_7 {
294
331
  }
295
332
 
296
333
  declare interface Props_8 {
297
- storyBoard: StoryBoard;
334
+ zone: Zone;
335
+ markVertices?: boolean;
336
+ shapeSerialisedStyle?: SerializedStyles | SerializedStyles[];
337
+ processClick?: MouseEventHandler<SVGElement>;
338
+ processContextClick?: MouseEventHandler<SVGElement>;
298
339
  }
299
340
 
300
- declare type Props_9 = {
301
- page: StoryBoardPage;
302
- font?: BoardFont;
303
- getImageAsset: {
304
- (id: string): ImageAsset | undefined;
305
- };
306
- };
341
+ declare interface Props_9 {
342
+ storyBoard: StoryBoard;
343
+ }
307
344
 
308
345
  export declare const putActorsInDisplayOrder: (a: ActorData, b: ActorData) => number;
309
346
 
@@ -330,6 +367,7 @@ export declare interface RoomProps {
330
367
  handleHover?: HandleHoverFunction;
331
368
  renderAllZones?: boolean;
332
369
  highlightHotspots?: boolean;
370
+ highlightActors?: boolean;
333
371
  obstacleCells?: CellMatrix;
334
372
  hotspotIndexToMark?: number;
335
373
  obstacleIndexToMark?: number;
@@ -340,6 +378,7 @@ export declare interface RoomProps {
340
378
  noSound?: boolean;
341
379
  noMargin?: boolean;
342
380
  parallaxContent?: ReactNode;
381
+ parallaxBackgroundContent?: ReactNode;
343
382
  surfaceContent?: ReactNode;
344
383
  orderSpeed?: number;
345
384
  sprites: SpriteData[];
@@ -347,6 +386,7 @@ export declare interface RoomProps {
347
386
  getSoundAsset: GetSoundAsset;
348
387
  SoundHandler?: SoundPlayerComponent;
349
388
  SpeechBubbleComponent?: FunctionComponent<SpeechBubbleProps>;
389
+ customInteractableStyling?: CustomInteractableStyling;
350
390
  }
351
391
 
352
392
  export declare const RoomRenderContext: Context< {
@@ -379,9 +419,9 @@ export declare type SpeechBubbleProps = {
379
419
  atRightEdge: boolean;
380
420
  };
381
421
 
382
- export declare const StoryBoardPlayer: React.FunctionComponent<Props_8>;
422
+ export declare const StoryBoardPlayer: React.FunctionComponent<Props_9>;
383
423
 
384
- export declare const StoryPageDisplay: FunctionComponent<Props_9>;
424
+ export declare const StoryPageDisplay: FunctionComponent<Props_10>;
385
425
 
386
426
  export declare const SurfaceFrame: ({ children }: Props_6) => JSX.Element;
387
427
 
@@ -405,6 +445,9 @@ export declare type UiAction = {
405
445
  type: 'SET_SCREEN_SIZE';
406
446
  height?: number;
407
447
  width?: number;
448
+ } | {
449
+ type: 'SET_HIGHLIGHT';
450
+ on: boolean;
408
451
  };
409
452
 
410
453
  export declare type UiState = {
@@ -413,6 +456,7 @@ export declare type UiState = {
413
456
  hoverTarget?: CommandTarget;
414
457
  roomWidth?: number;
415
458
  roomHeight?: number;
459
+ highlightOn: boolean;
416
460
  };
417
461
 
418
462
  export declare const UiStateContext: Context< {
@@ -534,10 +578,12 @@ export declare type XY = {
534
578
  y: number;
535
579
  };
536
580
 
537
- declare interface ZoneOptions {
581
+ export declare interface ZoneOptions {
538
582
  disabled?: boolean;
539
583
  flash?: boolean;
540
584
  blink?: boolean;
541
585
  }
542
586
 
587
+ export declare const ZoneShape: ({ zone, markVertices, shapeSerialisedStyle, processClick, processContextClick, }: Props_8) => JSX.Element;
588
+
543
589
  export { }