File size: 550 Bytes
60f878e
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
import type { RenderComponentRef } from '@plait/common';
import {
  PlaitElement,
  PlaitOperation,
  Viewport,
  Selection,
  type PlaitTheme
} from '@plait/core';

export interface ReactBoard {
  renderComponent: <T extends object>(

    children: React.ReactNode,

    container: Element | DocumentFragment,

    props: T

  ) => RenderComponentRef<T>;
}

export interface BoardChangeData {
  children: PlaitElement[];
  operations: PlaitOperation[];
  viewport: Viewport;
  selection: Selection | null;
  theme: PlaitTheme;
}