react-two.js 0.8.22-r.2 → 0.8.22-r.3

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/dist/Context.d.ts CHANGED
@@ -2,14 +2,21 @@ import Two from 'two.js';
2
2
  import type { Group } from 'two.js/src/group';
3
3
  import type { Shape } from 'two.js/src/shape';
4
4
  import type { EventHandlers } from './Events';
5
- export interface TwoContext {
5
+ export interface TwoCoreContextValue {
6
6
  two: Two | null;
7
+ registerEventShape: (shape: Shape | Group, handlers: Partial<EventHandlers>, parent?: Group) => void;
8
+ unregisterEventShape: (shape: Shape | Group) => void;
9
+ }
10
+ export interface TwoParentContextValue {
7
11
  parent: Group | null;
12
+ }
13
+ export interface TwoSizeContextValue {
8
14
  width: number;
9
15
  height: number;
10
- registerEventShape: (shape: Shape | Group, handlers: Partial<EventHandlers>, parent?: Group) => void;
11
- unregisterEventShape: (shape: Shape | Group) => void;
12
16
  }
13
- export declare const Context: import("react").Context<TwoContext>;
14
- export declare const useTwo: () => TwoContext;
17
+ export declare const TwoCoreContext: import("react").Context<TwoCoreContextValue>;
18
+ export declare const TwoParentContext: import("react").Context<TwoParentContextValue>;
19
+ export declare const TwoSizeContext: import("react").Context<TwoSizeContextValue>;
20
+ export declare const Context: import("react").Context<TwoCoreContextValue>;
21
+ export declare const useTwo: () => TwoCoreContextValue & TwoParentContextValue & TwoSizeContextValue;
15
22
  export declare const useFrame: (callback: (elapsed: number, frameDelta: number) => void, deps?: unknown[]) => void;