@pooder/kit 0.0.2 → 1.0.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.
package/CHANGELOG.md CHANGED
@@ -1,9 +1,15 @@
1
- # @pooder/kit
2
-
3
- ## 0.0.2
4
-
5
- ### Patch Changes
6
-
7
- - changeset release
8
- - Updated dependencies
9
- - @pooder/core@0.0.2
1
+ # @pooder/kit
2
+
3
+ ## 1.0.0
4
+
5
+ ### Major Changes
6
+
7
+ - fix
8
+
9
+ ## 0.0.2
10
+
11
+ ### Patch Changes
12
+
13
+ - changeset release
14
+ - Updated dependencies
15
+ - @pooder/core@0.0.2
package/dist/index.js CHANGED
@@ -124,10 +124,10 @@ var BackgroundTool = class {
124
124
  editor.canvas.add(backgroundLayer);
125
125
  editor.canvas.sendObjectToBack(backgroundLayer);
126
126
  }
127
- this.updateBackground(editor, this.options);
128
127
  }
129
128
  onMount(editor) {
130
129
  this.initLayer(editor);
130
+ this.updateBackground(editor, this.options);
131
131
  }
132
132
  onUnmount(editor) {
133
133
  const layer = editor.getLayer("background");
@@ -465,6 +465,7 @@ var DielineTool = class {
465
465
  }
466
466
  onMount(editor) {
467
467
  this.createLayer(editor);
468
+ this.updateDieline(editor);
468
469
  }
469
470
  onUnmount(editor) {
470
471
  this.destroyLayer(editor);
@@ -496,7 +497,6 @@ var DielineTool = class {
496
497
  editor.canvas.add(layer);
497
498
  }
498
499
  editor.canvas.bringObjectToFront(layer);
499
- this.updateDieline(editor);
500
500
  }
501
501
  destroyLayer(editor) {
502
502
  const layer = this.getLayer(editor, "dieline-overlay");
@@ -750,6 +750,7 @@ var FilmTool = class {
750
750
  }
751
751
  }
752
752
  onUpdate(editor, state) {
753
+ this.updateFilm(editor, this.options);
753
754
  }
754
755
  initLayer(editor) {
755
756
  let overlayLayer = editor.getLayer("overlay");
@@ -1166,6 +1167,7 @@ var ImageTool = class {
1166
1167
  }
1167
1168
  onMount(editor) {
1168
1169
  this.ensureLayer(editor);
1170
+ this.updateImage(editor, this.options);
1169
1171
  }
1170
1172
  onUnmount(editor) {
1171
1173
  const layer = editor.getLayer("user");
@@ -1295,6 +1297,7 @@ var WhiteInkTool = class {
1295
1297
  }
1296
1298
  onMount(editor) {
1297
1299
  this.setup(editor);
1300
+ this.updateWhiteInk(editor, this.options);
1298
1301
  }
1299
1302
  onUnmount(editor) {
1300
1303
  this.teardown(editor);
@@ -1335,7 +1338,6 @@ var WhiteInkTool = class {
1335
1338
  editor.canvas.on("object:rotating", this.syncHandler);
1336
1339
  editor.canvas.on("object:modified", this.syncHandler);
1337
1340
  }
1338
- this.updateWhiteInk(editor, this.options);
1339
1341
  }
1340
1342
  teardown(editor) {
1341
1343
  if (this.syncHandler) {
@@ -1545,11 +1547,13 @@ var RulerTool = class {
1545
1547
  }
1546
1548
  onMount(editor) {
1547
1549
  this.createLayer(editor);
1550
+ this.updateRuler(editor);
1548
1551
  }
1549
1552
  onUnmount(editor) {
1550
1553
  this.destroyLayer(editor);
1551
1554
  }
1552
1555
  onUpdate(editor, state) {
1556
+ this.updateRuler(editor);
1553
1557
  }
1554
1558
  onDestroy(editor) {
1555
1559
  this.destroyLayer(editor);
@@ -1575,7 +1579,6 @@ var RulerTool = class {
1575
1579
  editor.canvas.add(layer);
1576
1580
  }
1577
1581
  editor.canvas.bringObjectToFront(layer);
1578
- this.updateRuler(editor);
1579
1582
  }
1580
1583
  destroyLayer(editor) {
1581
1584
  const layer = this.getLayer(editor);
package/dist/index.mjs CHANGED
@@ -82,10 +82,10 @@ var BackgroundTool = class {
82
82
  editor.canvas.add(backgroundLayer);
83
83
  editor.canvas.sendObjectToBack(backgroundLayer);
84
84
  }
85
- this.updateBackground(editor, this.options);
86
85
  }
87
86
  onMount(editor) {
88
87
  this.initLayer(editor);
88
+ this.updateBackground(editor, this.options);
89
89
  }
90
90
  onUnmount(editor) {
91
91
  const layer = editor.getLayer("background");
@@ -423,6 +423,7 @@ var DielineTool = class {
423
423
  }
424
424
  onMount(editor) {
425
425
  this.createLayer(editor);
426
+ this.updateDieline(editor);
426
427
  }
427
428
  onUnmount(editor) {
428
429
  this.destroyLayer(editor);
@@ -454,7 +455,6 @@ var DielineTool = class {
454
455
  editor.canvas.add(layer);
455
456
  }
456
457
  editor.canvas.bringObjectToFront(layer);
457
- this.updateDieline(editor);
458
458
  }
459
459
  destroyLayer(editor) {
460
460
  const layer = this.getLayer(editor, "dieline-overlay");
@@ -708,6 +708,7 @@ var FilmTool = class {
708
708
  }
709
709
  }
710
710
  onUpdate(editor, state) {
711
+ this.updateFilm(editor, this.options);
711
712
  }
712
713
  initLayer(editor) {
713
714
  let overlayLayer = editor.getLayer("overlay");
@@ -1124,6 +1125,7 @@ var ImageTool = class {
1124
1125
  }
1125
1126
  onMount(editor) {
1126
1127
  this.ensureLayer(editor);
1128
+ this.updateImage(editor, this.options);
1127
1129
  }
1128
1130
  onUnmount(editor) {
1129
1131
  const layer = editor.getLayer("user");
@@ -1257,6 +1259,7 @@ var WhiteInkTool = class {
1257
1259
  }
1258
1260
  onMount(editor) {
1259
1261
  this.setup(editor);
1262
+ this.updateWhiteInk(editor, this.options);
1260
1263
  }
1261
1264
  onUnmount(editor) {
1262
1265
  this.teardown(editor);
@@ -1297,7 +1300,6 @@ var WhiteInkTool = class {
1297
1300
  editor.canvas.on("object:rotating", this.syncHandler);
1298
1301
  editor.canvas.on("object:modified", this.syncHandler);
1299
1302
  }
1300
- this.updateWhiteInk(editor, this.options);
1301
1303
  }
1302
1304
  teardown(editor) {
1303
1305
  if (this.syncHandler) {
@@ -1507,11 +1509,13 @@ var RulerTool = class {
1507
1509
  }
1508
1510
  onMount(editor) {
1509
1511
  this.createLayer(editor);
1512
+ this.updateRuler(editor);
1510
1513
  }
1511
1514
  onUnmount(editor) {
1512
1515
  this.destroyLayer(editor);
1513
1516
  }
1514
1517
  onUpdate(editor, state) {
1518
+ this.updateRuler(editor);
1515
1519
  }
1516
1520
  onDestroy(editor) {
1517
1521
  this.destroyLayer(editor);
@@ -1537,7 +1541,6 @@ var RulerTool = class {
1537
1541
  editor.canvas.add(layer);
1538
1542
  }
1539
1543
  editor.canvas.bringObjectToFront(layer);
1540
- this.updateRuler(editor);
1541
1544
  }
1542
1545
  destroyLayer(editor) {
1543
1546
  const layer = this.getLayer(editor);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pooder/kit",
3
- "version": "0.0.2",
3
+ "version": "1.0.0",
4
4
  "description": "Standard plugins for Pooder editor",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.mjs",
package/src/background.ts CHANGED
@@ -37,11 +37,10 @@ export class BackgroundTool implements Extension<BackgroundToolOptions> {
37
37
  editor.canvas.add(backgroundLayer)
38
38
  editor.canvas.sendObjectToBack(backgroundLayer)
39
39
  }
40
-
41
- this.updateBackground(editor, this.options);
42
40
  }
43
41
  onMount(editor: Editor) {
44
42
  this.initLayer(editor);
43
+ this.updateBackground(editor, this.options);
45
44
  }
46
45
 
47
46
  onUnmount(editor: Editor) {
package/src/dieline.ts CHANGED
@@ -62,6 +62,7 @@ export class DielineTool implements Extension<DielineToolOptions> {
62
62
 
63
63
  onMount(editor: Editor) {
64
64
  this.createLayer(editor);
65
+ this.updateDieline(editor);
65
66
  }
66
67
 
67
68
  onUnmount(editor: Editor) {
@@ -98,11 +99,7 @@ export class DielineTool implements Extension<DielineToolOptions> {
98
99
  editor.canvas.add(layer);
99
100
  }
100
101
 
101
- // Ensure it's on top
102
102
  editor.canvas.bringObjectToFront(layer);
103
-
104
- // Initial draw
105
- this.updateDieline(editor);
106
103
  }
107
104
 
108
105
  private destroyLayer(editor: Editor) {
package/src/film.ts CHANGED
@@ -43,6 +43,7 @@ export class FilmTool implements Extension<FilmToolOptions> {
43
43
  }
44
44
 
45
45
  onUpdate(editor: Editor, state: EditorState) {
46
+ this.updateFilm(editor, this.options);
46
47
  }
47
48
 
48
49
  private initLayer(editor: Editor) {
package/src/image.ts CHANGED
@@ -27,6 +27,7 @@ export class ImageTool implements Extension<ImageToolOptions> {
27
27
 
28
28
  onMount(editor: Editor) {
29
29
  this.ensureLayer(editor);
30
+ this.updateImage(editor, this.options);
30
31
  }
31
32
 
32
33
  onUnmount(editor: Editor) {
package/src/ruler.ts CHANGED
@@ -35,6 +35,7 @@ export class RulerTool implements Extension<RulerToolOptions> {
35
35
 
36
36
  onMount(editor: Editor) {
37
37
  this.createLayer(editor);
38
+ this.updateRuler(editor);
38
39
  }
39
40
 
40
41
  onUnmount(editor: Editor) {
@@ -42,6 +43,7 @@ export class RulerTool implements Extension<RulerToolOptions> {
42
43
  }
43
44
 
44
45
  onUpdate(editor: Editor, state: EditorState) {
46
+ this.updateRuler(editor);
45
47
  }
46
48
 
47
49
  onDestroy(editor: Editor) {
@@ -71,7 +73,6 @@ export class RulerTool implements Extension<RulerToolOptions> {
71
73
  }
72
74
 
73
75
  editor.canvas.bringObjectToFront(layer);
74
- this.updateRuler(editor);
75
76
  }
76
77
 
77
78
  private destroyLayer(editor: Editor) {
package/src/white-ink.ts CHANGED
@@ -34,6 +34,7 @@ export class WhiteInkTool implements Extension<WhiteInkToolOptions> {
34
34
 
35
35
  onMount(editor: Editor) {
36
36
  this.setup(editor);
37
+ this.updateWhiteInk(editor, this.options);
37
38
  }
38
39
 
39
40
  onUnmount(editor: Editor) {
@@ -78,8 +79,6 @@ export class WhiteInkTool implements Extension<WhiteInkToolOptions> {
78
79
  editor.canvas.on('object:rotating', this.syncHandler);
79
80
  editor.canvas.on('object:modified', this.syncHandler);
80
81
  }
81
-
82
- this.updateWhiteInk(editor, this.options);
83
82
  }
84
83
 
85
84
  private teardown(editor: Editor) {