@plait/core 0.24.0-next.12 → 0.24.0-next.13
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/board/board.component.d.ts +1 -1
- package/core/children/children.component.d.ts +3 -3
- package/core/element/element.component.d.ts +1 -1
- package/esm2022/board/board.component.mjs +7 -5
- package/esm2022/constants/resize.mjs +1 -1
- package/esm2022/core/children/children.component.mjs +11 -9
- package/esm2022/core/element/context.mjs +1 -1
- package/esm2022/core/element/element.component.mjs +4 -3
- package/esm2022/interfaces/board.mjs +1 -1
- package/esm2022/interfaces/plugin-key.mjs +1 -1
- package/esm2022/interfaces/point.mjs +1 -1
- package/esm2022/interfaces/viewport.mjs +2 -2
- package/esm2022/plugins/create-board.mjs +10 -9
- package/esm2022/plugins/with-hotkey.mjs +4 -2
- package/esm2022/plugins/with-moving.mjs +3 -3
- package/esm2022/plugins/with-options.mjs +1 -1
- package/esm2022/public-api.mjs +1 -2
- package/esm2022/testing/core/fake-weak-map.mjs +2 -2
- package/esm2022/testing/core/index.mjs +1 -1
- package/esm2022/testing/fake-events/event-objects.mjs +1 -1
- package/esm2022/testing/fake-events/index.mjs +1 -1
- package/esm2022/testing/index.mjs +1 -1
- package/esm2022/testing/test-element.mjs +1 -1
- package/esm2022/transforms/element.mjs +4 -4
- package/esm2022/utils/board.mjs +1 -1
- package/esm2022/utils/draw/rectangle.mjs +1 -1
- package/esm2022/utils/element.mjs +3 -3
- package/esm2022/utils/reaction-manager.mjs +3 -3
- package/esm2022/utils/to-image.mjs +106 -34
- package/esm2022/utils/tree.mjs +2 -2
- package/fesm2022/plait-core.mjs +142 -78
- package/fesm2022/plait-core.mjs.map +1 -1
- package/interfaces/board.d.ts +1 -0
- package/package.json +1 -1
- package/public-api.d.ts +0 -1
- package/testing/core/fake-weak-map.d.ts +2 -2
- package/transforms/element.d.ts +2 -2
- package/utils/reaction-manager.d.ts +1 -1
- package/utils/to-image.d.ts +11 -0
- package/utils/tree.d.ts +2 -2
- package/esm2022/plait.module.mjs +0 -21
- package/plait.module.d.ts +0 -10
package/interfaces/board.d.ts
CHANGED
|
@@ -52,6 +52,7 @@ export interface PlaitBoard {
|
|
|
52
52
|
pathRef: (path: Path, options?: PathRefOptions) => PathRef;
|
|
53
53
|
pathRefs: () => Set<PathRef>;
|
|
54
54
|
applyTheme: (element: PlaitElement) => void;
|
|
55
|
+
isAlign: (element: PlaitElement) => boolean;
|
|
55
56
|
pointerDown: (pointer: PointerEvent) => void;
|
|
56
57
|
pointerMove: (pointer: PointerEvent) => void;
|
|
57
58
|
pointerUp: (pointer: PointerEvent) => void;
|
package/package.json
CHANGED
package/public-api.d.ts
CHANGED
|
@@ -6,7 +6,6 @@ export * from './core/children/children.component';
|
|
|
6
6
|
export * from './core/element/context-change';
|
|
7
7
|
export * from './core/island/island-base.component';
|
|
8
8
|
export * from './interfaces';
|
|
9
|
-
export * from './plait.module';
|
|
10
9
|
export * from './transforms';
|
|
11
10
|
export * from './utils';
|
|
12
11
|
export * from './plugins/with-selection';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { PlaitBoard } from
|
|
2
|
-
import { PlaitNode } from
|
|
1
|
+
import { PlaitBoard } from '../../interfaces/board';
|
|
2
|
+
import { PlaitNode } from '../../interfaces/node';
|
|
3
3
|
export declare const fakeNodeWeakMap: (object: PlaitNode | PlaitBoard) => void;
|
|
4
4
|
export declare const clearNodeWeakMap: (object: PlaitNode | PlaitBoard) => void;
|
package/transforms/element.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { PlaitBoard } from
|
|
2
|
-
import { PlaitElement } from
|
|
1
|
+
import { PlaitBoard } from '../interfaces/board';
|
|
2
|
+
import { PlaitElement } from '../interfaces/element';
|
|
3
3
|
export declare const removeElements: (board: PlaitBoard, elements: PlaitElement[]) => void;
|
|
4
4
|
export declare const CoreTransforms: {
|
|
5
5
|
removeElements: (board: PlaitBoard, elements: PlaitElement[]) => void;
|
package/utils/to-image.d.ts
CHANGED
|
@@ -6,5 +6,16 @@ export interface ToImageOptions {
|
|
|
6
6
|
fillStyle?: string;
|
|
7
7
|
inlineStyleClassNames?: string;
|
|
8
8
|
}
|
|
9
|
+
/**
|
|
10
|
+
* current board transfer pictures
|
|
11
|
+
* @param board board
|
|
12
|
+
* @param options parameter configuration
|
|
13
|
+
* @returns images in the specified format base64
|
|
14
|
+
*/
|
|
9
15
|
export declare function toImage(board: PlaitBoard, options: ToImageOptions): Promise<string | undefined>;
|
|
16
|
+
/**
|
|
17
|
+
* download the file with the specified name
|
|
18
|
+
* @param url download url
|
|
19
|
+
* @param name file name
|
|
20
|
+
*/
|
|
10
21
|
export declare function downloadImage(url: string, name: string): void;
|
package/utils/tree.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { PlaitBoard } from
|
|
2
|
-
import { PlaitElement } from
|
|
1
|
+
import { PlaitBoard } from '../interfaces/board';
|
|
2
|
+
import { PlaitElement } from '../interfaces/element';
|
|
3
3
|
export declare function depthFirstRecursion<T extends TreeNode = TreeNode>(node: T, callback: (node: T) => void, recursion?: (node: T) => boolean, isReverse?: boolean): void;
|
|
4
4
|
export declare const getIsRecursionFunc: (board: PlaitBoard) => (element: PlaitElement | PlaitBoard) => boolean;
|
|
5
5
|
export interface TreeNode {
|
package/esm2022/plait.module.mjs
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { NgModule } from '@angular/core';
|
|
2
|
-
import { CommonModule } from '@angular/common';
|
|
3
|
-
import { PlaitBoardComponent } from './board/board.component';
|
|
4
|
-
import { PlaitElementComponent } from './core/element/element.component';
|
|
5
|
-
import { PlaitChildrenElement } from './core/children/children.component';
|
|
6
|
-
import * as i0 from "@angular/core";
|
|
7
|
-
const COMPONENTS = [PlaitBoardComponent, PlaitChildrenElement, PlaitElementComponent];
|
|
8
|
-
export class PlaitModule {
|
|
9
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.3", ngImport: i0, type: PlaitModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
10
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.3", ngImport: i0, type: PlaitModule, declarations: [PlaitBoardComponent, PlaitChildrenElement, PlaitElementComponent], imports: [CommonModule], exports: [PlaitBoardComponent, PlaitChildrenElement, PlaitElementComponent] }); }
|
|
11
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.3", ngImport: i0, type: PlaitModule, imports: [CommonModule] }); }
|
|
12
|
-
}
|
|
13
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.3", ngImport: i0, type: PlaitModule, decorators: [{
|
|
14
|
-
type: NgModule,
|
|
15
|
-
args: [{
|
|
16
|
-
declarations: [...COMPONENTS],
|
|
17
|
-
imports: [CommonModule],
|
|
18
|
-
exports: [...COMPONENTS]
|
|
19
|
-
}]
|
|
20
|
-
}] });
|
|
21
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicGxhaXQubW9kdWxlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vcGFja2FnZXMvY29yZS9zcmMvcGxhaXQubW9kdWxlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxRQUFRLEVBQUUsTUFBTSxlQUFlLENBQUM7QUFDekMsT0FBTyxFQUFFLFlBQVksRUFBRSxNQUFNLGlCQUFpQixDQUFDO0FBQy9DLE9BQU8sRUFBRSxtQkFBbUIsRUFBRSxNQUFNLHlCQUF5QixDQUFDO0FBQzlELE9BQU8sRUFBRSxxQkFBcUIsRUFBRSxNQUFNLGtDQUFrQyxDQUFDO0FBQ3pFLE9BQU8sRUFBRSxvQkFBb0IsRUFBRSxNQUFNLG9DQUFvQyxDQUFDOztBQUUxRSx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czogWy4uLkNPTVBPTkVOVFNdLFxuICAgIGltcG9ydHM6IFtDb21tb25Nb2R1bGVdLFxuICAgIGV4cG9ydHM6IFsuLi5DT01QT05FTlRTXVxufSlcbmV4cG9ydCBjbGFzcyBQbGFpdE1vZHVsZSB7fVxuIl19
|
package/plait.module.d.ts
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import * as i0 from "@angular/core";
|
|
2
|
-
import * as i1 from "./board/board.component";
|
|
3
|
-
import * as i2 from "./core/children/children.component";
|
|
4
|
-
import * as i3 from "./core/element/element.component";
|
|
5
|
-
import * as i4 from "@angular/common";
|
|
6
|
-
export declare class PlaitModule {
|
|
7
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<PlaitModule, never>;
|
|
8
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<PlaitModule, [typeof i1.PlaitBoardComponent, typeof i2.PlaitChildrenElement, typeof i3.PlaitElementComponent], [typeof i4.CommonModule], [typeof i1.PlaitBoardComponent, typeof i2.PlaitChildrenElement, typeof i3.PlaitElementComponent]>;
|
|
9
|
-
static ɵinj: i0.ɵɵInjectorDeclaration<PlaitModule>;
|
|
10
|
-
}
|