@pooder/kit 0.0.2 → 2.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,26 @@
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
+ ## 2.0.0
4
+
5
+ ### Major Changes
6
+
7
+ - update
8
+
9
+ ### Patch Changes
10
+
11
+ - Updated dependencies
12
+ - @pooder/core@0.1.0
13
+
14
+ ## 1.0.0
15
+
16
+ ### Major Changes
17
+
18
+ - fix
19
+
20
+ ## 0.0.2
21
+
22
+ ### Patch Changes
23
+
24
+ - changeset release
25
+ - Updated dependencies
26
+ - @pooder/core@0.0.2
package/dist/index.d.mts CHANGED
@@ -17,7 +17,7 @@ declare class BackgroundTool implements Extension<BackgroundToolOptions> {
17
17
  }
18
18
 
19
19
  interface DielineToolOptions {
20
- shape: 'rect' | 'circle' | 'ellipse';
20
+ shape: "rect" | "circle" | "ellipse";
21
21
  width: number;
22
22
  height: number;
23
23
  radius: number;
@@ -27,13 +27,14 @@ interface DielineToolOptions {
27
27
  };
28
28
  borderLength?: number;
29
29
  offset: number;
30
- style: 'solid' | 'dashed';
30
+ style: "solid" | "dashed";
31
31
  insideColor: string;
32
32
  outsideColor: string;
33
+ showBleedLines?: boolean;
33
34
  }
34
35
  type DielineConfig = DielineToolOptions;
35
36
  interface DielineGeometry {
36
- shape: 'rect' | 'circle' | 'ellipse';
37
+ shape: "rect" | "circle" | "ellipse";
37
38
  x: number;
38
39
  y: number;
39
40
  width: number;
@@ -76,11 +77,12 @@ declare class FilmTool implements Extension<FilmToolOptions> {
76
77
  interface HoleToolOptions {
77
78
  innerRadius: number;
78
79
  outerRadius: number;
79
- style: 'solid' | 'dashed';
80
+ style: "solid" | "dashed";
80
81
  holes?: Array<{
81
82
  x: number;
82
83
  y: number;
83
84
  }>;
85
+ constraintTarget?: "original" | "bleed";
84
86
  }
85
87
  declare class HoleTool implements Extension<HoleToolOptions> {
86
88
  name: string;
@@ -92,6 +94,7 @@ declare class HoleTool implements Extension<HoleToolOptions> {
92
94
  onUnmount(editor: Editor): void;
93
95
  onDestroy(editor: Editor): void;
94
96
  private getDielineGeometry;
97
+ enforceConstraints(editor: Editor): void;
95
98
  private setup;
96
99
  private teardown;
97
100
  onUpdate(editor: Editor, state: EditorState): void;
@@ -104,9 +107,15 @@ declare class HoleTool implements Extension<HoleToolOptions> {
104
107
  interface ImageToolOptions {
105
108
  url: string;
106
109
  opacity: number;
110
+ width?: number;
111
+ height?: number;
112
+ angle?: number;
113
+ left?: number;
114
+ top?: number;
107
115
  }
108
116
  declare class ImageTool implements Extension<ImageToolOptions> {
109
117
  name: string;
118
+ private _loadingUrl;
110
119
  options: ImageToolOptions;
111
120
  schema: Record<keyof ImageToolOptions, OptionSchema>;
112
121
  onMount(editor: Editor): void;
@@ -142,7 +151,7 @@ declare class WhiteInkTool implements Extension<WhiteInkToolOptions> {
142
151
  }
143
152
 
144
153
  interface RulerToolOptions {
145
- unit: 'px' | 'mm' | 'cm' | 'in';
154
+ unit: "px" | "mm" | "cm" | "in";
146
155
  thickness: number;
147
156
  backgroundColor: string;
148
157
  textColor: string;
@@ -164,4 +173,18 @@ declare class RulerTool implements Extension<RulerToolOptions> {
164
173
  commands: Record<string, Command>;
165
174
  }
166
175
 
167
- export { BackgroundTool, type DielineConfig, type DielineGeometry, DielineTool, type DielineToolOptions, FilmTool, HoleTool, type HoleToolOptions, ImageTool, RulerTool, type RulerToolOptions, WhiteInkTool };
176
+ interface MirrorToolOptions {
177
+ enabled: boolean;
178
+ }
179
+ declare class MirrorTool implements Extension<MirrorToolOptions> {
180
+ name: string;
181
+ options: MirrorToolOptions;
182
+ schema: Record<keyof MirrorToolOptions, OptionSchema>;
183
+ onMount(editor: Editor): void;
184
+ onUpdate(editor: Editor): void;
185
+ onUnmount(editor: Editor): void;
186
+ private applyMirror;
187
+ commands: Record<string, Command>;
188
+ }
189
+
190
+ export { BackgroundTool, type DielineConfig, type DielineGeometry, DielineTool, type DielineToolOptions, FilmTool, HoleTool, type HoleToolOptions, ImageTool, MirrorTool, type MirrorToolOptions, RulerTool, type RulerToolOptions, WhiteInkTool };
package/dist/index.d.ts CHANGED
@@ -17,7 +17,7 @@ declare class BackgroundTool implements Extension<BackgroundToolOptions> {
17
17
  }
18
18
 
19
19
  interface DielineToolOptions {
20
- shape: 'rect' | 'circle' | 'ellipse';
20
+ shape: "rect" | "circle" | "ellipse";
21
21
  width: number;
22
22
  height: number;
23
23
  radius: number;
@@ -27,13 +27,14 @@ interface DielineToolOptions {
27
27
  };
28
28
  borderLength?: number;
29
29
  offset: number;
30
- style: 'solid' | 'dashed';
30
+ style: "solid" | "dashed";
31
31
  insideColor: string;
32
32
  outsideColor: string;
33
+ showBleedLines?: boolean;
33
34
  }
34
35
  type DielineConfig = DielineToolOptions;
35
36
  interface DielineGeometry {
36
- shape: 'rect' | 'circle' | 'ellipse';
37
+ shape: "rect" | "circle" | "ellipse";
37
38
  x: number;
38
39
  y: number;
39
40
  width: number;
@@ -76,11 +77,12 @@ declare class FilmTool implements Extension<FilmToolOptions> {
76
77
  interface HoleToolOptions {
77
78
  innerRadius: number;
78
79
  outerRadius: number;
79
- style: 'solid' | 'dashed';
80
+ style: "solid" | "dashed";
80
81
  holes?: Array<{
81
82
  x: number;
82
83
  y: number;
83
84
  }>;
85
+ constraintTarget?: "original" | "bleed";
84
86
  }
85
87
  declare class HoleTool implements Extension<HoleToolOptions> {
86
88
  name: string;
@@ -92,6 +94,7 @@ declare class HoleTool implements Extension<HoleToolOptions> {
92
94
  onUnmount(editor: Editor): void;
93
95
  onDestroy(editor: Editor): void;
94
96
  private getDielineGeometry;
97
+ enforceConstraints(editor: Editor): void;
95
98
  private setup;
96
99
  private teardown;
97
100
  onUpdate(editor: Editor, state: EditorState): void;
@@ -104,9 +107,15 @@ declare class HoleTool implements Extension<HoleToolOptions> {
104
107
  interface ImageToolOptions {
105
108
  url: string;
106
109
  opacity: number;
110
+ width?: number;
111
+ height?: number;
112
+ angle?: number;
113
+ left?: number;
114
+ top?: number;
107
115
  }
108
116
  declare class ImageTool implements Extension<ImageToolOptions> {
109
117
  name: string;
118
+ private _loadingUrl;
110
119
  options: ImageToolOptions;
111
120
  schema: Record<keyof ImageToolOptions, OptionSchema>;
112
121
  onMount(editor: Editor): void;
@@ -142,7 +151,7 @@ declare class WhiteInkTool implements Extension<WhiteInkToolOptions> {
142
151
  }
143
152
 
144
153
  interface RulerToolOptions {
145
- unit: 'px' | 'mm' | 'cm' | 'in';
154
+ unit: "px" | "mm" | "cm" | "in";
146
155
  thickness: number;
147
156
  backgroundColor: string;
148
157
  textColor: string;
@@ -164,4 +173,18 @@ declare class RulerTool implements Extension<RulerToolOptions> {
164
173
  commands: Record<string, Command>;
165
174
  }
166
175
 
167
- export { BackgroundTool, type DielineConfig, type DielineGeometry, DielineTool, type DielineToolOptions, FilmTool, HoleTool, type HoleToolOptions, ImageTool, RulerTool, type RulerToolOptions, WhiteInkTool };
176
+ interface MirrorToolOptions {
177
+ enabled: boolean;
178
+ }
179
+ declare class MirrorTool implements Extension<MirrorToolOptions> {
180
+ name: string;
181
+ options: MirrorToolOptions;
182
+ schema: Record<keyof MirrorToolOptions, OptionSchema>;
183
+ onMount(editor: Editor): void;
184
+ onUpdate(editor: Editor): void;
185
+ onUnmount(editor: Editor): void;
186
+ private applyMirror;
187
+ commands: Record<string, Command>;
188
+ }
189
+
190
+ export { BackgroundTool, type DielineConfig, type DielineGeometry, DielineTool, type DielineToolOptions, FilmTool, HoleTool, type HoleToolOptions, ImageTool, MirrorTool, type MirrorToolOptions, RulerTool, type RulerToolOptions, WhiteInkTool };