@leapfrog/interactive-canvas 2.0.13 → 2.0.14

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.
Files changed (67) hide show
  1. package/dist/abstract-interactive-canvas.d.ts +375 -372
  2. package/dist/dimensions/millimeter-dimensions.d.ts +15 -15
  3. package/dist/dimensions/pixel-canvas-dimensions.d.ts +13 -13
  4. package/dist/dimensions/print-6-col-canvas-dimensions.d.ts +18 -18
  5. package/dist/dimensions/print-8-col-canvas-dimensions.d.ts +18 -18
  6. package/dist/font/font-library.d.ts +27 -27
  7. package/dist/font/font-library.interface.d.ts +24 -24
  8. package/dist/font/font.interface.d.ts +20 -20
  9. package/dist/font/unknown-font.d.ts +6 -6
  10. package/dist/headless-interactive-canvas.d.ts +10 -10
  11. package/dist/index.d.ts +54 -54
  12. package/dist/interactive-canvas.d.ts +25 -25
  13. package/dist/interactive-canvas.es.js +3911 -3905
  14. package/dist/interactive-canvas.interface.d.ts +297 -297
  15. package/dist/interactive-canvas.js +3908 -3902
  16. package/dist/layout/abstract-layout-manager.d.ts +17 -17
  17. package/dist/layout/advanced-layout-manager.d.ts +16 -16
  18. package/dist/layout/function/pin-to-bottom.layout-function.d.ts +4 -4
  19. package/dist/layout/function/redraw-all.layout-function.d.ts +4 -4
  20. package/dist/layout/function/reposition-backgrounds.layout-function.d.ts +4 -4
  21. package/dist/layout/function/reposition-borders.layout-function.d.ts +4 -4
  22. package/dist/layout/function/reposition-cutoffs.layout-function.d.ts +4 -4
  23. package/dist/layout/function/resize-canvas.layout-function.d.ts +4 -4
  24. package/dist/layout/function/stack-objects.layout-function.d.ts +11 -11
  25. package/dist/layout/function/update-object-dimensions.layout-function.d.ts +4 -4
  26. package/dist/layout/layout-manager.enum.d.ts +5 -5
  27. package/dist/layout/layout-manager.interface.d.ts +13 -13
  28. package/dist/layout/standard-layout-manager.d.ts +40 -40
  29. package/dist/mutator/mutable-background-color.interface.d.ts +15 -15
  30. package/dist/mutator/mutable-color.interface.d.ts +6 -6
  31. package/dist/mutator/mutable-image.interface.d.ts +28 -28
  32. package/dist/mutator/mutable-position.interface.d.ts +63 -63
  33. package/dist/mutator/mutable-stroke.interface.d.ts +8 -8
  34. package/dist/mutator/mutable-text-style.interface.d.ts +163 -163
  35. package/dist/mutator/mutable-text.interface.d.ts +80 -80
  36. package/dist/object/abstract-canvas-object.d.ts +207 -207
  37. package/dist/object/canvas-object-data.d.ts +24 -24
  38. package/dist/object/canvas-object.interface.d.ts +109 -109
  39. package/dist/object/impl/background-image.d.ts +38 -38
  40. package/dist/object/impl/border.d.ts +70 -70
  41. package/dist/object/impl/cutoff.d.ts +59 -59
  42. package/dist/object/impl/extended-fabric-object.interface.d.ts +7 -7
  43. package/dist/object/impl/extended-fabric-textbox.interface.d.ts +7 -7
  44. package/dist/object/impl/horizontal-rule.d.ts +83 -83
  45. package/dist/object/impl/image.d.ts +76 -76
  46. package/dist/object/impl/rectangle.d.ts +78 -78
  47. package/dist/object/impl/rich-text.d.ts +39 -39
  48. package/dist/object/impl/text.d.ts +314 -314
  49. package/dist/object/impl/vertical-rule.d.ts +83 -83
  50. package/dist/profile/canvas-profile.interface.d.ts +22 -22
  51. package/dist/profile/default-canvas-profile.d.ts +23 -23
  52. package/dist/types/canvas-dimension-restrictions.interface.d.ts +15 -15
  53. package/dist/types/canvas-dimensions.interface.d.ts +21 -21
  54. package/dist/types/canvas-state.interface.d.ts +11 -11
  55. package/dist/types/dimension-restrictions.interface.d.ts +6 -6
  56. package/dist/types/image-type.enum.d.ts +6 -6
  57. package/dist/types/margin.interface.d.ts +6 -6
  58. package/dist/types/object-dimensions.interface.d.ts +23 -23
  59. package/dist/types/object-type.enum.d.ts +12 -12
  60. package/dist/types/overflow.interface.d.ts +4 -4
  61. package/dist/types/position.interface.d.ts +9 -9
  62. package/dist/types/rect.interface.d.ts +6 -6
  63. package/dist/types/selection-data.interface.d.ts +28 -19
  64. package/dist/types/text-alignment.interface.d.ts +1 -1
  65. package/dist/undo-stack.d.ts +27 -27
  66. package/dist/undo-stack.interface.d.ts +6 -6
  67. package/package.json +1 -1
@@ -1,297 +1,297 @@
1
- import { Observable } from "rxjs";
2
- import { IImage } from "./object/impl/image";
3
- import { IText } from "./object/impl/text";
4
- import { IRectangle } from "./object/impl/rectangle";
5
- import { ICutoff } from "./object/impl/cutoff";
6
- import { ILayoutManager } from "./layout/layout-manager.interface";
7
- import { IBorder } from "./object/impl/border";
8
- import { LayoutManager } from "./layout/layout-manager.enum";
9
- import { IVerticalRule } from "./object/impl/vertical-rule";
10
- import { IHorizontalRule } from "./object/impl/horizontal-rule";
11
- import { IFontLibrary } from "./font/font-library.interface";
12
- import { ICanvasProfile } from "./profile/canvas-profile.interface";
13
- import { ICanvasDimensionRestrictions } from "./types/canvas-dimension-restrictions.interface";
14
- import { IRect } from "./types/rect.interface";
15
- import { ICanvasObject } from "./object/canvas-object.interface";
16
- import { ICanvasDimensions } from "./types/canvas-dimensions.interface";
17
- import { ISelectionData } from "./types/selection-data.interface";
18
- import { ICanvasState } from "./types/canvas-state.interface";
19
- import { AbstractCanvasObject } from "./object/abstract-canvas-object";
20
- import { ObjectType } from "./types/object-type.enum";
21
- import { fabric } from "fabric";
22
- import { IRichText } from "./object/impl/rich-text";
23
- import { IBackgroundImage } from "./object/impl/background-image";
24
- /**
25
- * New leapfrog canvas implementation c. 2019.
26
- */
27
- export interface IInteractiveCanvas {
28
- /**
29
- * True if the canvas is operating in a headless mode.
30
- */
31
- readonly headless: boolean;
32
- /**
33
- * Get the canvas font library.
34
- */
35
- getFontLibrary(): IFontLibrary;
36
- /**
37
- * Get the current canvas profile.
38
- * The profile determines what operations are permitted, such as moving or scaling components.
39
- */
40
- getProfile(): ICanvasProfile;
41
- /**
42
- * Get an observable of the current canvas profile.
43
- */
44
- getProfile$(): Observable<ICanvasProfile>;
45
- /**
46
- * Set the canvas profile.
47
- * @param profile New profile.
48
- */
49
- setProfile(profile: ICanvasProfile): void;
50
- /**
51
- * Get the current layout manager.
52
- * The layout manager controls how elements on the canvas are laid out.
53
- */
54
- getLayoutManager(): ILayoutManager;
55
- /**
56
- * Get an observable of the current layout manager.
57
- */
58
- getLayoutManager$(): Observable<ILayoutManager>;
59
- /**
60
- * Set the layout manager.
61
- * @param layoutManager New layout manager.
62
- */
63
- setLayoutManager(layoutManager: LayoutManager): void;
64
- /**
65
- * Get the current canvas background color.
66
- */
67
- getBackgroundColor(): string;
68
- /**
69
- * Get an observable of the current background color.
70
- */
71
- getBackgroundColor$(): Observable<string>;
72
- /**
73
- * Set the canvas background color.
74
- * @param color New color.
75
- */
76
- setBackgroundColor(color: string): void;
77
- /**
78
- * Get the current canvas dimensions.
79
- */
80
- getDimensions(): ICanvasDimensions;
81
- /**
82
- * Get the current canvas base dimensions.
83
- */
84
- getBaseDimensions(): ICanvasDimensions;
85
- /**
86
- * Get an observable of the current canvas dimensions.
87
- */
88
- getDimensions$(): Observable<ICanvasDimensions>;
89
- /**
90
- * Set new canvas dimensions.
91
- * @param dimensions New dimensions.
92
- */
93
- setDimensions(dimensions: ICanvasDimensions): void;
94
- /**
95
- * Set new canvas base dimensions. Automatic resize will occur relative to these base dimensions.
96
- * @param dimensions New dimensions.
97
- */
98
- setBaseDimensions(dimensions: ICanvasDimensions): void;
99
- /**
100
- * Get an observable of any rejected dimension changes.
101
- */
102
- getDimensionChangeRejections$(): Observable<ICanvasDimensions>;
103
- /**
104
- * Set restrictions on canvas dimensions.
105
- * @param restrictions Optional restrictions.
106
- */
107
- setDimensionRestrictions(restrictions: ICanvasDimensionRestrictions): void;
108
- /**
109
- * Get an observable of the canvas dimension restrictions.
110
- */
111
- getDimensionsRestrictions$(): Observable<ICanvasDimensionRestrictions>;
112
- /**
113
- * Get canvas dimension restrictions.
114
- */
115
- getDimensionsRestrictions(): ICanvasDimensionRestrictions;
116
- /**
117
- * Get the size of the canvas margin (the area occupied by borders/cutoff rules).
118
- */
119
- getMargin(): IRect;
120
- /**
121
- * Get the current canvas zoom factor.
122
- */
123
- getZoom(): number;
124
- /**
125
- * Get an observable of the current canvas zoom factor.
126
- */
127
- getZoom$(): Observable<number>;
128
- /**
129
- * Set a new canvas zoom factor.
130
- * @param zoom Zoom factor.
131
- */
132
- setZoom(zoom: number): void;
133
- /**
134
- * Get the current canvas object list.
135
- */
136
- getObjects(): ICanvasObject[];
137
- /**
138
- * Get an observable of the current canvas object list.
139
- */
140
- getObjects$(): Observable<ICanvasObject[]>;
141
- /**
142
- * Remove an object from the canvas.
143
- * @param object The object to remove.
144
- */
145
- removeObject(object: ICanvasObject): void;
146
- /**
147
- * Add an image object to the canvas.
148
- * @param imageUrl Url for image content.
149
- */
150
- addImageObject(imageUrl: string): Promise<IImage>;
151
- /**
152
- * Add a text object to the canvas.
153
- */
154
- addTextObject(): Promise<IText>;
155
- /**
156
- * Add a rich text element to the canvas.
157
- * @param imageUrl Url for text-rendered-as-image content.
158
- * @param htmlContent Rich-text content as HTML.
159
- */
160
- addRichTextObject(imageUrl: string, htmlContent: string): Promise<IRichText>;
161
- /**
162
- * Add a rectangle object to the canvas.
163
- */
164
- addRectangleObject(): Promise<IRectangle>;
165
- /**
166
- * Add a rectangle object to the canvas.
167
- */
168
- addCutoffObject(): Promise<ICutoff>;
169
- /**
170
- * Add a border object to the canvas.
171
- */
172
- addBorderObject(): Promise<IBorder>;
173
- /**
174
- * Add a vertical rule object to the canvas.
175
- */
176
- addVerticalRuleObject(): Promise<IVerticalRule>;
177
- /**
178
- * Add a horizontal rule object to the canvas.
179
- */
180
- addHorizontalRuleObject(): Promise<IHorizontalRule>;
181
- /**
182
- * Add a background image object to the canvas.
183
- * @param imageUrl Url for image content.
184
- */
185
- addBackgroundImageObject(imageUrl: string): Promise<IBackgroundImage>;
186
- /**
187
- * Set the data used to prefill text into the canvas.
188
- * @param data Prefill data.
189
- */
190
- setPrefillData(data: {
191
- [id: string]: string;
192
- }): void;
193
- /**
194
- * Distribute text and image objects equally along the vertical axis.s
195
- */
196
- distributeObjectsVertically(): void;
197
- /**
198
- * Get data on the current selection.
199
- */
200
- getSelection(): ISelectionData;
201
- /**
202
- * Get an observable of the current selection data.
203
- */
204
- getSelection$(): Observable<ISelectionData>;
205
- /**
206
- * Select a field.
207
- * @param field The field to select.
208
- */
209
- select(field: ICanvasObject): void;
210
- /**
211
- * Deselects any selected fields.
212
- */
213
- clearSelection(): void;
214
- /**
215
- * Enable/disable multi select.
216
- * @param value value.
217
- */
218
- setMultiSelect(value: boolean): void;
219
- /**
220
- * Clear the canvas.
221
- */
222
- clear(): void;
223
- /**
224
- * Serialize the canvas for saving.
225
- * Returns an observable that will complete after the load process is finished.
226
- */
227
- save(): ICanvasState;
228
- /**
229
- * Load the canvas state from a previously {@link IInteractiveCanvas#save saved} state.
230
- * @param canvasState Persisted canvas state.
231
- */
232
- load(canvasState: ICanvasState): Promise<void>;
233
- /**
234
- * Export the canvas to an SVG.
235
- */
236
- toSvg(): string;
237
- /**
238
- * Export the canvas to a DataUrl image.
239
- * @param multiplier Multiply the image pixel density by this amount.
240
- */
241
- toImage(multiplier?: number): string;
242
- /**
243
- * Notify the canvas that the object list has changed.
244
- */
245
- notifyObjectListChanged(): void;
246
- /**
247
- * Notify the canvas that the text has changed.
248
- */
249
- notifyTextChanged(): void;
250
- /**
251
- * Notify the canvas that the margin has changed.
252
- */
253
- notifyMarginChanged(): void;
254
- /**
255
- * Sync the canvas object list with the underlying fabric object list.
256
- */
257
- syncObjectList(): void;
258
- /**
259
- * Redraw the canvas.
260
- */
261
- redraw(): void;
262
- /**
263
- * Get the internal objects list.
264
- */
265
- getObjectsInternal(): Array<AbstractCanvasObject<any>>;
266
- /**
267
- * Get objects by type.
268
- * @param type Object type.
269
- */
270
- getObjectsByTypeInternal<T extends AbstractCanvasObject<any>>(type: ObjectType): T[];
271
- /**
272
- * Get all objects of given types.
273
- * @param types The types.
274
- */
275
- getObjectsByTypesInternal(...types: ObjectType[]): Array<AbstractCanvasObject<any>>;
276
- /**
277
- * Remove an underlying fabric object.
278
- * @param obj The object.
279
- */
280
- removeFabricObject(obj: fabric.Object): void;
281
- /**
282
- * Create a PNG stream of the canvas. Only works on headless canvas.
283
- */
284
- createPNGStream(): any;
285
- /**
286
- * Save the current state as an undo point.
287
- */
288
- registerUndoState(): void;
289
- /**
290
- * Revert the canvas state one entry.
291
- */
292
- undo(): Promise<void>;
293
- /**
294
- * Revert the canvas state one entry.
295
- */
296
- redo(): Promise<void>;
297
- }
1
+ import { Observable } from "rxjs";
2
+ import { IImage } from "./object/impl/image";
3
+ import { IText } from "./object/impl/text";
4
+ import { IRectangle } from "./object/impl/rectangle";
5
+ import { ICutoff } from "./object/impl/cutoff";
6
+ import { ILayoutManager } from "./layout/layout-manager.interface";
7
+ import { IBorder } from "./object/impl/border";
8
+ import { LayoutManager } from "./layout/layout-manager.enum";
9
+ import { IVerticalRule } from "./object/impl/vertical-rule";
10
+ import { IHorizontalRule } from "./object/impl/horizontal-rule";
11
+ import { IFontLibrary } from "./font/font-library.interface";
12
+ import { ICanvasProfile } from "./profile/canvas-profile.interface";
13
+ import { ICanvasDimensionRestrictions } from "./types/canvas-dimension-restrictions.interface";
14
+ import { IRect } from "./types/rect.interface";
15
+ import { ICanvasObject } from "./object/canvas-object.interface";
16
+ import { ICanvasDimensions } from "./types/canvas-dimensions.interface";
17
+ import { ISelectionData } from "./types/selection-data.interface";
18
+ import { ICanvasState } from "./types/canvas-state.interface";
19
+ import { AbstractCanvasObject } from "./object/abstract-canvas-object";
20
+ import { ObjectType } from "./types/object-type.enum";
21
+ import { fabric } from "fabric";
22
+ import { IRichText } from "./object/impl/rich-text";
23
+ import { IBackgroundImage } from "./object/impl/background-image";
24
+ /**
25
+ * New leapfrog canvas implementation c. 2019.
26
+ */
27
+ export interface IInteractiveCanvas {
28
+ /**
29
+ * True if the canvas is operating in a headless mode.
30
+ */
31
+ readonly headless: boolean;
32
+ /**
33
+ * Get the canvas font library.
34
+ */
35
+ getFontLibrary(): IFontLibrary;
36
+ /**
37
+ * Get the current canvas profile.
38
+ * The profile determines what operations are permitted, such as moving or scaling components.
39
+ */
40
+ getProfile(): ICanvasProfile;
41
+ /**
42
+ * Get an observable of the current canvas profile.
43
+ */
44
+ getProfile$(): Observable<ICanvasProfile>;
45
+ /**
46
+ * Set the canvas profile.
47
+ * @param profile New profile.
48
+ */
49
+ setProfile(profile: ICanvasProfile): void;
50
+ /**
51
+ * Get the current layout manager.
52
+ * The layout manager controls how elements on the canvas are laid out.
53
+ */
54
+ getLayoutManager(): ILayoutManager;
55
+ /**
56
+ * Get an observable of the current layout manager.
57
+ */
58
+ getLayoutManager$(): Observable<ILayoutManager>;
59
+ /**
60
+ * Set the layout manager.
61
+ * @param layoutManager New layout manager.
62
+ */
63
+ setLayoutManager(layoutManager: LayoutManager): void;
64
+ /**
65
+ * Get the current canvas background color.
66
+ */
67
+ getBackgroundColor(): string;
68
+ /**
69
+ * Get an observable of the current background color.
70
+ */
71
+ getBackgroundColor$(): Observable<string>;
72
+ /**
73
+ * Set the canvas background color.
74
+ * @param color New color.
75
+ */
76
+ setBackgroundColor(color: string): void;
77
+ /**
78
+ * Get the current canvas dimensions.
79
+ */
80
+ getDimensions(): ICanvasDimensions;
81
+ /**
82
+ * Get the current canvas base dimensions.
83
+ */
84
+ getBaseDimensions(): ICanvasDimensions;
85
+ /**
86
+ * Get an observable of the current canvas dimensions.
87
+ */
88
+ getDimensions$(): Observable<ICanvasDimensions>;
89
+ /**
90
+ * Set new canvas dimensions.
91
+ * @param dimensions New dimensions.
92
+ */
93
+ setDimensions(dimensions: ICanvasDimensions): void;
94
+ /**
95
+ * Set new canvas base dimensions. Automatic resize will occur relative to these base dimensions.
96
+ * @param dimensions New dimensions.
97
+ */
98
+ setBaseDimensions(dimensions: ICanvasDimensions): void;
99
+ /**
100
+ * Get an observable of any rejected dimension changes.
101
+ */
102
+ getDimensionChangeRejections$(): Observable<ICanvasDimensions>;
103
+ /**
104
+ * Set restrictions on canvas dimensions.
105
+ * @param restrictions Optional restrictions.
106
+ */
107
+ setDimensionRestrictions(restrictions: ICanvasDimensionRestrictions): void;
108
+ /**
109
+ * Get an observable of the canvas dimension restrictions.
110
+ */
111
+ getDimensionsRestrictions$(): Observable<ICanvasDimensionRestrictions>;
112
+ /**
113
+ * Get canvas dimension restrictions.
114
+ */
115
+ getDimensionsRestrictions(): ICanvasDimensionRestrictions;
116
+ /**
117
+ * Get the size of the canvas margin (the area occupied by borders/cutoff rules).
118
+ */
119
+ getMargin(): IRect;
120
+ /**
121
+ * Get the current canvas zoom factor.
122
+ */
123
+ getZoom(): number;
124
+ /**
125
+ * Get an observable of the current canvas zoom factor.
126
+ */
127
+ getZoom$(): Observable<number>;
128
+ /**
129
+ * Set a new canvas zoom factor.
130
+ * @param zoom Zoom factor.
131
+ */
132
+ setZoom(zoom: number): void;
133
+ /**
134
+ * Get the current canvas object list.
135
+ */
136
+ getObjects(): ICanvasObject[];
137
+ /**
138
+ * Get an observable of the current canvas object list.
139
+ */
140
+ getObjects$(): Observable<ICanvasObject[]>;
141
+ /**
142
+ * Remove an object from the canvas.
143
+ * @param object The object to remove.
144
+ */
145
+ removeObject(object: ICanvasObject): void;
146
+ /**
147
+ * Add an image object to the canvas.
148
+ * @param imageUrl Url for image content.
149
+ */
150
+ addImageObject(imageUrl: string): Promise<IImage>;
151
+ /**
152
+ * Add a text object to the canvas.
153
+ */
154
+ addTextObject(): Promise<IText>;
155
+ /**
156
+ * Add a rich text element to the canvas.
157
+ * @param imageUrl Url for text-rendered-as-image content.
158
+ * @param htmlContent Rich-text content as HTML.
159
+ */
160
+ addRichTextObject(imageUrl: string, htmlContent: string): Promise<IRichText>;
161
+ /**
162
+ * Add a rectangle object to the canvas.
163
+ */
164
+ addRectangleObject(): Promise<IRectangle>;
165
+ /**
166
+ * Add a rectangle object to the canvas.
167
+ */
168
+ addCutoffObject(): Promise<ICutoff>;
169
+ /**
170
+ * Add a border object to the canvas.
171
+ */
172
+ addBorderObject(): Promise<IBorder>;
173
+ /**
174
+ * Add a vertical rule object to the canvas.
175
+ */
176
+ addVerticalRuleObject(): Promise<IVerticalRule>;
177
+ /**
178
+ * Add a horizontal rule object to the canvas.
179
+ */
180
+ addHorizontalRuleObject(): Promise<IHorizontalRule>;
181
+ /**
182
+ * Add a background image object to the canvas.
183
+ * @param imageUrl Url for image content.
184
+ */
185
+ addBackgroundImageObject(imageUrl: string): Promise<IBackgroundImage>;
186
+ /**
187
+ * Set the data used to prefill text into the canvas.
188
+ * @param data Prefill data.
189
+ */
190
+ setPrefillData(data: {
191
+ [id: string]: string;
192
+ }): void;
193
+ /**
194
+ * Distribute text and image objects equally along the vertical axis.s
195
+ */
196
+ distributeObjectsVertically(): void;
197
+ /**
198
+ * Get data on the current selection.
199
+ */
200
+ getSelection(): ISelectionData;
201
+ /**
202
+ * Get an observable of the current selection data.
203
+ */
204
+ getSelection$(): Observable<ISelectionData>;
205
+ /**
206
+ * Select a field.
207
+ * @param field The field to select.
208
+ */
209
+ select(field: ICanvasObject): void;
210
+ /**
211
+ * Deselects any selected fields.
212
+ */
213
+ clearSelection(): void;
214
+ /**
215
+ * Enable/disable multi select.
216
+ * @param value value.
217
+ */
218
+ setMultiSelect(value: boolean): void;
219
+ /**
220
+ * Clear the canvas.
221
+ */
222
+ clear(): void;
223
+ /**
224
+ * Serialize the canvas for saving.
225
+ * Returns an observable that will complete after the load process is finished.
226
+ */
227
+ save(): ICanvasState;
228
+ /**
229
+ * Load the canvas state from a previously {@link IInteractiveCanvas#save saved} state.
230
+ * @param canvasState Persisted canvas state.
231
+ */
232
+ load(canvasState: ICanvasState): Promise<void>;
233
+ /**
234
+ * Export the canvas to an SVG.
235
+ */
236
+ toSvg(): string;
237
+ /**
238
+ * Export the canvas to a DataUrl image.
239
+ * @param multiplier Multiply the image pixel density by this amount.
240
+ */
241
+ toImage(multiplier?: number): string;
242
+ /**
243
+ * Notify the canvas that the object list has changed.
244
+ */
245
+ notifyObjectListChanged(): void;
246
+ /**
247
+ * Notify the canvas that the text has changed.
248
+ */
249
+ notifyTextChanged(): void;
250
+ /**
251
+ * Notify the canvas that the margin has changed.
252
+ */
253
+ notifyMarginChanged(): void;
254
+ /**
255
+ * Sync the canvas object list with the underlying fabric object list.
256
+ */
257
+ syncObjectList(): void;
258
+ /**
259
+ * Redraw the canvas.
260
+ */
261
+ redraw(): void;
262
+ /**
263
+ * Get the internal objects list.
264
+ */
265
+ getObjectsInternal(): Array<AbstractCanvasObject<any>>;
266
+ /**
267
+ * Get objects by type.
268
+ * @param type Object type.
269
+ */
270
+ getObjectsByTypeInternal<T extends AbstractCanvasObject<any>>(type: ObjectType): T[];
271
+ /**
272
+ * Get all objects of given types.
273
+ * @param types The types.
274
+ */
275
+ getObjectsByTypesInternal(...types: ObjectType[]): Array<AbstractCanvasObject<any>>;
276
+ /**
277
+ * Remove an underlying fabric object.
278
+ * @param obj The object.
279
+ */
280
+ removeFabricObject(obj: fabric.Object): void;
281
+ /**
282
+ * Create a PNG stream of the canvas. Only works on headless canvas.
283
+ */
284
+ createPNGStream(): any;
285
+ /**
286
+ * Save the current state as an undo point.
287
+ */
288
+ registerUndoState(): void;
289
+ /**
290
+ * Revert the canvas state one entry.
291
+ */
292
+ undo(): Promise<void>;
293
+ /**
294
+ * Revert the canvas state one entry.
295
+ */
296
+ redo(): Promise<void>;
297
+ }