@leapfrog/interactive-canvas 2.0.9 → 2.0.10

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 +3910 -3905
  14. package/dist/interactive-canvas.interface.d.ts +297 -297
  15. package/dist/interactive-canvas.js +3907 -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 +24 -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 +2 -2
@@ -1,38 +1,38 @@
1
- import { AbstractCanvasObject, CanvasObjectData, IDimensionRestrictions, IInteractiveCanvas, IMutableImage } from "../..";
2
- import { ICanvasObject } from "../canvas-object.interface";
3
- import { fabric } from "fabric";
4
- import { Observable } from "rxjs";
5
- export interface IBackgroundImage extends ICanvasObject, IMutableImage {
6
- updatePosition(): void;
7
- }
8
- export declare class BackgroundImage extends AbstractCanvasObject<fabric.Image> implements IBackgroundImage {
9
- private readonly imageUrl$;
10
- constructor(canvas: IInteractiveCanvas, fabricObject: fabric.Image, persistedField?: CanvasObjectData);
11
- updatePosition(): void;
12
- /**
13
- * @override
14
- * @inheritDoc
15
- */
16
- protected updateFabricObjectBehavior(): void;
17
- /**
18
- * @override
19
- * @inheritDoc
20
- */
21
- getImageUrl(): string;
22
- /**
23
- * @override
24
- * @inheritDoc
25
- */
26
- getImageUrl$(): Observable<string>;
27
- /**
28
- * @override
29
- * @inheritDoc
30
- */
31
- setImageUrl(url: string): Promise<void>;
32
- /**
33
- * @override
34
- * @inheritDoc
35
- */
36
- setImageWidth(px: number, sizeRestrictions: IDimensionRestrictions): number;
37
- private setCanvasImage;
38
- }
1
+ import { AbstractCanvasObject, CanvasObjectData, IDimensionRestrictions, IInteractiveCanvas, IMutableImage } from "../..";
2
+ import { ICanvasObject } from "../canvas-object.interface";
3
+ import { fabric } from "fabric";
4
+ import { Observable } from "rxjs";
5
+ export interface IBackgroundImage extends ICanvasObject, IMutableImage {
6
+ updatePosition(): void;
7
+ }
8
+ export declare class BackgroundImage extends AbstractCanvasObject<fabric.Image> implements IBackgroundImage {
9
+ private readonly imageUrl$;
10
+ constructor(canvas: IInteractiveCanvas, fabricObject: fabric.Image, persistedField?: CanvasObjectData);
11
+ updatePosition(): void;
12
+ /**
13
+ * @override
14
+ * @inheritDoc
15
+ */
16
+ protected updateFabricObjectBehavior(): void;
17
+ /**
18
+ * @override
19
+ * @inheritDoc
20
+ */
21
+ getImageUrl(): string;
22
+ /**
23
+ * @override
24
+ * @inheritDoc
25
+ */
26
+ getImageUrl$(): Observable<string>;
27
+ /**
28
+ * @override
29
+ * @inheritDoc
30
+ */
31
+ setImageUrl(url: string): Promise<void>;
32
+ /**
33
+ * @override
34
+ * @inheritDoc
35
+ */
36
+ setImageWidth(px: number, sizeRestrictions: IDimensionRestrictions): number;
37
+ private setCanvasImage;
38
+ }
@@ -1,70 +1,70 @@
1
- import { Observable } from "rxjs";
2
- import { ICanvasObject } from "../canvas-object.interface";
3
- import { IInteractiveCanvas, IMutableColor, IRect } from "../..";
4
- import { AbstractCanvasObject } from "../abstract-canvas-object";
5
- import { CanvasObjectData } from "../canvas-object-data";
6
- import { fabric } from "fabric";
7
- /**
8
- * Border field. A rectangle with a stroke width that automatically follows the canvas border.
9
- */
10
- export interface IBorder extends ICanvasObject, IMutableColor {
11
- /**
12
- * Get the width of the border stroke.
13
- */
14
- getStrokeWidth(): number;
15
- /**
16
- * Get an observable of the width of the cutoff stroke.
17
- */
18
- getStrokeWidth$(): Observable<number>;
19
- /**
20
- * Set the border stroke width.
21
- * @param width New width.
22
- */
23
- setStrokeWidth(width: number): void;
24
- /**
25
- * Get the padding within the border.
26
- */
27
- getPadding(): IRect;
28
- /**
29
- * Set the padding within the border.
30
- * @param padding New padding.
31
- */
32
- setPadding(padding: any): void;
33
- }
34
- export declare class Border extends AbstractCanvasObject<fabric.Rect> implements IBorder {
35
- private readonly strokeWidth$;
36
- constructor(canvas: IInteractiveCanvas, fabricObject: fabric.Rect, persistedField?: CanvasObjectData);
37
- /**
38
- * @override
39
- * @inheritDoc
40
- */
41
- getColor(): string;
42
- /**
43
- * @override
44
- * @inheritDoc
45
- */
46
- setColor(color: string): void;
47
- /**
48
- * @override
49
- * @inheritDoc
50
- */
51
- getStrokeWidth(): number;
52
- /**
53
- * @override
54
- * @inheritDoc
55
- */
56
- getStrokeWidth$(): Observable<number>;
57
- /**
58
- * @override
59
- * @inheritDoc
60
- */
61
- setStrokeWidth(width: number): void;
62
- getPadding(): IRect;
63
- setPadding(padding: any): void;
64
- updatePosition(): void;
65
- /**
66
- * @override
67
- * @inheritDoc
68
- */
69
- protected updateFabricObjectBehavior(): void;
70
- }
1
+ import { Observable } from "rxjs";
2
+ import { ICanvasObject } from "../canvas-object.interface";
3
+ import { IInteractiveCanvas, IMutableColor, IRect } from "../..";
4
+ import { AbstractCanvasObject } from "../abstract-canvas-object";
5
+ import { CanvasObjectData } from "../canvas-object-data";
6
+ import { fabric } from "fabric";
7
+ /**
8
+ * Border field. A rectangle with a stroke width that automatically follows the canvas border.
9
+ */
10
+ export interface IBorder extends ICanvasObject, IMutableColor {
11
+ /**
12
+ * Get the width of the border stroke.
13
+ */
14
+ getStrokeWidth(): number;
15
+ /**
16
+ * Get an observable of the width of the cutoff stroke.
17
+ */
18
+ getStrokeWidth$(): Observable<number>;
19
+ /**
20
+ * Set the border stroke width.
21
+ * @param width New width.
22
+ */
23
+ setStrokeWidth(width: number): void;
24
+ /**
25
+ * Get the padding within the border.
26
+ */
27
+ getPadding(): IRect;
28
+ /**
29
+ * Set the padding within the border.
30
+ * @param padding New padding.
31
+ */
32
+ setPadding(padding: any): void;
33
+ }
34
+ export declare class Border extends AbstractCanvasObject<fabric.Rect> implements IBorder {
35
+ private readonly strokeWidth$;
36
+ constructor(canvas: IInteractiveCanvas, fabricObject: fabric.Rect, persistedField?: CanvasObjectData);
37
+ /**
38
+ * @override
39
+ * @inheritDoc
40
+ */
41
+ getColor(): string;
42
+ /**
43
+ * @override
44
+ * @inheritDoc
45
+ */
46
+ setColor(color: string): void;
47
+ /**
48
+ * @override
49
+ * @inheritDoc
50
+ */
51
+ getStrokeWidth(): number;
52
+ /**
53
+ * @override
54
+ * @inheritDoc
55
+ */
56
+ getStrokeWidth$(): Observable<number>;
57
+ /**
58
+ * @override
59
+ * @inheritDoc
60
+ */
61
+ setStrokeWidth(width: number): void;
62
+ getPadding(): IRect;
63
+ setPadding(padding: any): void;
64
+ updatePosition(): void;
65
+ /**
66
+ * @override
67
+ * @inheritDoc
68
+ */
69
+ protected updateFabricObjectBehavior(): void;
70
+ }
@@ -1,59 +1,59 @@
1
- import { Observable } from "rxjs";
2
- import { ICanvasObject } from "../canvas-object.interface";
3
- import { IInteractiveCanvas, IMutableColor } from "../..";
4
- import { AbstractCanvasObject } from "../abstract-canvas-object";
5
- import { CanvasObjectData } from "../canvas-object-data";
6
- import { fabric } from "fabric";
7
- /**
8
- * Cutoff field. A cutoff rule that sits on the bottom of the canvas.
9
- */
10
- export interface ICutoff extends ICanvasObject, IMutableColor {
11
- /**
12
- * Get the width of the cutoff stroke.
13
- */
14
- getStrokeWidth(): number;
15
- /**
16
- * Get an observable of the width of the cutoff stroke.
17
- */
18
- getStrokeWidth$(): Observable<number>;
19
- /**
20
- * Set the cutoff stroke width.
21
- * @param width New width.
22
- */
23
- setStrokeWidth(width: number): void;
24
- }
25
- export declare class Cutoff extends AbstractCanvasObject<fabric.Rect> implements ICutoff {
26
- private readonly strokeWidth$;
27
- constructor(canvas: IInteractiveCanvas, fabricObject: fabric.Rect, persistedField?: CanvasObjectData);
28
- /**
29
- * @override
30
- * @inheritDoc
31
- */
32
- getColor(): string;
33
- /**
34
- * @override
35
- * @inheritDoc
36
- */
37
- setColor(color: string): void;
38
- /**
39
- * @override
40
- * @inheritDoc
41
- */
42
- getStrokeWidth(): number;
43
- /**
44
- * @override
45
- * @inheritDoc
46
- */
47
- getStrokeWidth$(): Observable<number>;
48
- /**
49
- * @override
50
- * @inheritDoc
51
- */
52
- setStrokeWidth(width: number): void;
53
- updatePosition(): void;
54
- /**
55
- * @override
56
- * @inheritDoc
57
- */
58
- protected updateFabricObjectBehavior(): void;
59
- }
1
+ import { Observable } from "rxjs";
2
+ import { ICanvasObject } from "../canvas-object.interface";
3
+ import { IInteractiveCanvas, IMutableColor } from "../..";
4
+ import { AbstractCanvasObject } from "../abstract-canvas-object";
5
+ import { CanvasObjectData } from "../canvas-object-data";
6
+ import { fabric } from "fabric";
7
+ /**
8
+ * Cutoff field. A cutoff rule that sits on the bottom of the canvas.
9
+ */
10
+ export interface ICutoff extends ICanvasObject, IMutableColor {
11
+ /**
12
+ * Get the width of the cutoff stroke.
13
+ */
14
+ getStrokeWidth(): number;
15
+ /**
16
+ * Get an observable of the width of the cutoff stroke.
17
+ */
18
+ getStrokeWidth$(): Observable<number>;
19
+ /**
20
+ * Set the cutoff stroke width.
21
+ * @param width New width.
22
+ */
23
+ setStrokeWidth(width: number): void;
24
+ }
25
+ export declare class Cutoff extends AbstractCanvasObject<fabric.Rect> implements ICutoff {
26
+ private readonly strokeWidth$;
27
+ constructor(canvas: IInteractiveCanvas, fabricObject: fabric.Rect, persistedField?: CanvasObjectData);
28
+ /**
29
+ * @override
30
+ * @inheritDoc
31
+ */
32
+ getColor(): string;
33
+ /**
34
+ * @override
35
+ * @inheritDoc
36
+ */
37
+ setColor(color: string): void;
38
+ /**
39
+ * @override
40
+ * @inheritDoc
41
+ */
42
+ getStrokeWidth(): number;
43
+ /**
44
+ * @override
45
+ * @inheritDoc
46
+ */
47
+ getStrokeWidth$(): Observable<number>;
48
+ /**
49
+ * @override
50
+ * @inheritDoc
51
+ */
52
+ setStrokeWidth(width: number): void;
53
+ updatePosition(): void;
54
+ /**
55
+ * @override
56
+ * @inheritDoc
57
+ */
58
+ protected updateFabricObjectBehavior(): void;
59
+ }
@@ -1,7 +1,7 @@
1
- import { fabric } from "fabric";
2
- export interface ExtendedFabricObject extends fabric.Object {
3
- /**
4
- * If true, this object is a slave object controlled by another object and not directly by the user, such as the line markers in an ordered list.
5
- */
6
- _isSlaveObject?: boolean;
7
- }
1
+ import { fabric } from "fabric";
2
+ export interface ExtendedFabricObject extends fabric.Object {
3
+ /**
4
+ * If true, this object is a slave object controlled by another object and not directly by the user, such as the line markers in an ordered list.
5
+ */
6
+ _isSlaveObject?: boolean;
7
+ }
@@ -1,7 +1,7 @@
1
- import { fabric } from "fabric";
2
- import { ExtendedFabricObject } from "./extended-fabric-object.interface";
3
- export interface ExtendedFabricTextbox extends fabric.Textbox, ExtendedFabricObject {
4
- _isOrderedList?: boolean;
5
- _orderedListStart?: number;
6
- _orderedListMarkerEntities?: fabric.Textbox[];
7
- }
1
+ import { fabric } from "fabric";
2
+ import { ExtendedFabricObject } from "./extended-fabric-object.interface";
3
+ export interface ExtendedFabricTextbox extends fabric.Textbox, ExtendedFabricObject {
4
+ _isOrderedList?: boolean;
5
+ _orderedListStart?: number;
6
+ _orderedListMarkerEntities?: fabric.Textbox[];
7
+ }
@@ -1,83 +1,83 @@
1
- import { Observable } from "rxjs";
2
- import { ICanvasObject } from "../canvas-object.interface";
3
- import { IInteractiveCanvas, IMutableColor, IMutablePosition } from "../..";
4
- import { AbstractCanvasObject } from "../abstract-canvas-object";
5
- import { CanvasObjectData } from "../canvas-object-data";
6
- import { fabric } from "fabric";
7
- /**
8
- * Horizontal rule. A basic block of color in a thin line across the canvas.
9
- */
10
- export interface IHorizontalRule extends ICanvasObject, IMutableColor, IMutablePosition {
11
- /**
12
- * Get the width of the rule.
13
- */
14
- getStrokeWidth(): number;
15
- /**
16
- * Get an observable of the width of the rule.
17
- */
18
- getStrokeWidth$(): Observable<number>;
19
- /**
20
- * Set the rule width.
21
- * @param width New width.
22
- */
23
- setStrokeWidth(width: number): void;
24
- }
25
- export declare class HorizontalRule extends AbstractCanvasObject<fabric.Rect> implements IHorizontalRule {
26
- private readonly strokeWidth$;
27
- constructor(canvas: IInteractiveCanvas, fabricObject: fabric.Rect, persistedField?: CanvasObjectData);
28
- /**
29
- * @override
30
- * @inheritDoc
31
- */
32
- getStrokeWidth(): number;
33
- /**
34
- * @override
35
- * @inheritDoc
36
- */
37
- getStrokeWidth$(): Observable<number>;
38
- /**
39
- * @override
40
- * @inheritDoc
41
- */
42
- setStrokeWidth(value: number): void;
43
- /**
44
- * @override
45
- * @inheritDoc
46
- */
47
- getColor(): string;
48
- /**
49
- * @override
50
- * @inheritDoc
51
- */
52
- setColor(color: string): void;
53
- /**
54
- * @override
55
- * @inheritDoc
56
- */
57
- centerHorizontally(): void;
58
- /**
59
- * @override
60
- * @inheritDoc
61
- */
62
- centerVertically(): void;
63
- /**
64
- * @override
65
- * @inheritDoc
66
- */
67
- nudgeUp(): void;
68
- /**
69
- * @override
70
- * @inheritDoc
71
- */
72
- nudgeDown(): void;
73
- /**
74
- * @override
75
- * @inheritDoc
76
- */
77
- nudgeLeft(): void;
78
- /**
79
- * @override
80
- * @inheritDoc
81
- */
82
- nudgeRight(): void;
83
- }
1
+ import { Observable } from "rxjs";
2
+ import { ICanvasObject } from "../canvas-object.interface";
3
+ import { IInteractiveCanvas, IMutableColor, IMutablePosition } from "../..";
4
+ import { AbstractCanvasObject } from "../abstract-canvas-object";
5
+ import { CanvasObjectData } from "../canvas-object-data";
6
+ import { fabric } from "fabric";
7
+ /**
8
+ * Horizontal rule. A basic block of color in a thin line across the canvas.
9
+ */
10
+ export interface IHorizontalRule extends ICanvasObject, IMutableColor, IMutablePosition {
11
+ /**
12
+ * Get the width of the rule.
13
+ */
14
+ getStrokeWidth(): number;
15
+ /**
16
+ * Get an observable of the width of the rule.
17
+ */
18
+ getStrokeWidth$(): Observable<number>;
19
+ /**
20
+ * Set the rule width.
21
+ * @param width New width.
22
+ */
23
+ setStrokeWidth(width: number): void;
24
+ }
25
+ export declare class HorizontalRule extends AbstractCanvasObject<fabric.Rect> implements IHorizontalRule {
26
+ private readonly strokeWidth$;
27
+ constructor(canvas: IInteractiveCanvas, fabricObject: fabric.Rect, persistedField?: CanvasObjectData);
28
+ /**
29
+ * @override
30
+ * @inheritDoc
31
+ */
32
+ getStrokeWidth(): number;
33
+ /**
34
+ * @override
35
+ * @inheritDoc
36
+ */
37
+ getStrokeWidth$(): Observable<number>;
38
+ /**
39
+ * @override
40
+ * @inheritDoc
41
+ */
42
+ setStrokeWidth(value: number): void;
43
+ /**
44
+ * @override
45
+ * @inheritDoc
46
+ */
47
+ getColor(): string;
48
+ /**
49
+ * @override
50
+ * @inheritDoc
51
+ */
52
+ setColor(color: string): void;
53
+ /**
54
+ * @override
55
+ * @inheritDoc
56
+ */
57
+ centerHorizontally(): void;
58
+ /**
59
+ * @override
60
+ * @inheritDoc
61
+ */
62
+ centerVertically(): void;
63
+ /**
64
+ * @override
65
+ * @inheritDoc
66
+ */
67
+ nudgeUp(): void;
68
+ /**
69
+ * @override
70
+ * @inheritDoc
71
+ */
72
+ nudgeDown(): void;
73
+ /**
74
+ * @override
75
+ * @inheritDoc
76
+ */
77
+ nudgeLeft(): void;
78
+ /**
79
+ * @override
80
+ * @inheritDoc
81
+ */
82
+ nudgeRight(): void;
83
+ }