@plait/common 0.75.0-next.9 → 0.76.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.
@@ -3,13 +3,14 @@ import { Generator, GeneratorOptions } from './generator';
3
3
  export interface ActiveGeneratorExtraData {
4
4
  selected: boolean;
5
5
  }
6
- export interface ActiveGeneratorOptions<T> {
6
+ export interface ActiveGeneratorOptions<T> extends GeneratorOptions {
7
7
  getRectangle: (element: T) => RectangleClient;
8
8
  getStrokeWidth: () => number;
9
9
  getStrokeOpacity: () => number;
10
10
  hasResizeHandle: () => boolean;
11
11
  }
12
- export declare class ActiveGenerator<T extends PlaitElement = PlaitElement> extends Generator<T, ActiveGeneratorExtraData, ActiveGeneratorOptions<T> & GeneratorOptions> {
12
+ export declare const createActiveGenerator: <T extends PlaitElement = PlaitElement>(board: PlaitBoard, options: ActiveGeneratorOptions<T>) => ActiveGenerator<T>;
13
+ export declare class ActiveGenerator<T extends PlaitElement = PlaitElement> extends Generator<T, ActiveGeneratorExtraData, ActiveGeneratorOptions<T>> {
13
14
  board: PlaitBoard;
14
15
  options: ActiveGeneratorOptions<T>;
15
16
  static key: string;
@@ -3,6 +3,7 @@ export interface GeneratorExtraData {
3
3
  }
4
4
  export interface GeneratorOptions {
5
5
  prepend?: boolean;
6
+ active?: boolean;
6
7
  }
7
8
  export declare abstract class Generator<T extends PlaitElement = PlaitElement, K extends GeneratorExtraData = GeneratorExtraData, V extends GeneratorOptions = GeneratorOptions, P extends PlaitBoard = PlaitBoard> {
8
9
  protected board: P;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@plait/common",
3
- "version": "0.75.0-next.9",
3
+ "version": "0.76.0",
4
4
  "peerDependencies": {},
5
5
  "dependencies": {
6
6
  "tslib": "^2.3.0"