@plait/common 0.45.0 → 0.48.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.
@@ -2,6 +2,7 @@ import { PlaitBoard, PlaitElement } from '@plait/core';
2
2
  export interface GeneratorExtraData {
3
3
  }
4
4
  export interface GeneratorOptions {
5
+ prepend?: boolean;
5
6
  }
6
7
  export declare abstract class Generator<T extends PlaitElement = PlaitElement, K extends GeneratorExtraData = GeneratorExtraData, V extends GeneratorOptions = GeneratorOptions> {
7
8
  protected board: PlaitBoard;
@@ -1,5 +1,5 @@
1
1
  import { PlaitBoard, PlaitElement, RectangleClient } from '@plait/core';
2
- import { Generator } from './generator';
2
+ import { Generator, GeneratorOptions } from './generator';
3
3
  import { ComponentRef, ViewContainerRef } from '@angular/core';
4
4
  import { ImageBaseComponent } from '../core/image-base.component';
5
5
  import { CommonImageItem } from '../utils';
@@ -10,7 +10,7 @@ export interface ImageGeneratorOptions<T> {
10
10
  getRectangle: (element: T) => RectangleClient;
11
11
  getImageItem: (element: T) => CommonImageItem;
12
12
  }
13
- export declare class ImageGenerator<T extends PlaitElement = PlaitElement> extends Generator<T, ViewContainerRef, ImageGeneratorOptions<T>> {
13
+ export declare class ImageGenerator<T extends PlaitElement = PlaitElement> extends Generator<T, ViewContainerRef, ImageGeneratorOptions<T> & GeneratorOptions> {
14
14
  board: PlaitBoard;
15
15
  options: ImageGeneratorOptions<T>;
16
16
  foreignObject: SVGForeignObjectElement;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@plait/common",
3
- "version": "0.45.0",
3
+ "version": "0.48.0",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "^15.2.0",
6
6
  "@angular/core": "^15.2.0",
@@ -0,0 +1,16 @@
1
+ import { PlaitBoard } from '@plait/core';
2
+ export declare const alignTop: (board: PlaitBoard) => void;
3
+ export declare const alignHorizontalCenter: (board: PlaitBoard) => void;
4
+ export declare const alignBottom: (board: PlaitBoard) => void;
5
+ export declare const alignLeft: (board: PlaitBoard) => void;
6
+ export declare const alignVerticalCenter: (board: PlaitBoard) => void;
7
+ export declare const alignRight: (board: PlaitBoard) => void;
8
+ export interface AlignTransform {
9
+ alignTop: (board: PlaitBoard) => void;
10
+ alignHorizontalCenter: (board: PlaitBoard) => void;
11
+ alignBottom: (board: PlaitBoard) => void;
12
+ alignLeft: (board: PlaitBoard) => void;
13
+ alignVerticalCenter: (board: PlaitBoard) => void;
14
+ alignRight: (board: PlaitBoard) => void;
15
+ }
16
+ export declare const AlignTransform: AlignTransform;
@@ -1 +1,2 @@
1
1
  export * from './property';
2
+ export * from './align';