@pixerate/editor-svelte 0.191.1 → 0.192.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.
|
@@ -34,6 +34,15 @@ export declare function createCanvasDraw<TNode extends CanvasNode = CanvasNode>(
|
|
|
34
34
|
} | undefined;
|
|
35
35
|
/** The dry paint presets `style.brush` accepts (loads the paint engine). */
|
|
36
36
|
listBrushes: () => Promise<import("@pixerate/editor/canvas").CanvasBrushPreset[]>;
|
|
37
|
+
/**
|
|
38
|
+
* Picks a brush (`null`: plain pen) with its size, and its default colour unless `keepColour`.
|
|
39
|
+
* Resolves to the preset; rejects for a brush the canvas can't paint.
|
|
40
|
+
*/
|
|
41
|
+
selectBrush: (id: string | null, choice?: {
|
|
42
|
+
keepColour?: boolean;
|
|
43
|
+
}) => Promise<import("@pixerate/editor/canvas").CanvasBrushPreset | null>;
|
|
44
|
+
/** Sets the colour scheme that picks the side of a brush's light / dark default colour. */
|
|
45
|
+
setColorScheme: (scheme: "light" | "dark") => void;
|
|
37
46
|
};
|
|
38
47
|
export type CanvasDraw<TNode extends CanvasNode = CanvasNode> = ReturnType<typeof createCanvasDraw<TNode>>;
|
|
39
48
|
export {};
|
|
@@ -47,6 +47,13 @@ export function createCanvasDraw(options) {
|
|
|
47
47
|
/** A node's box in canvas coordinates (lets gesture commands such as `canvas.circle` take `{ nodeId }`). */
|
|
48
48
|
nodeBounds: controller.nodeBounds,
|
|
49
49
|
/** The dry paint presets `style.brush` accepts (loads the paint engine). */
|
|
50
|
-
listBrushes: controller.listBrushes
|
|
50
|
+
listBrushes: controller.listBrushes,
|
|
51
|
+
/**
|
|
52
|
+
* Picks a brush (`null`: plain pen) with its size, and its default colour unless `keepColour`.
|
|
53
|
+
* Resolves to the preset; rejects for a brush the canvas can't paint.
|
|
54
|
+
*/
|
|
55
|
+
selectBrush: controller.selectBrush,
|
|
56
|
+
/** Sets the colour scheme that picks the side of a brush's light / dark default colour. */
|
|
57
|
+
setColorScheme: controller.setColorScheme
|
|
51
58
|
};
|
|
52
59
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pixerate/editor-svelte",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.192.0",
|
|
4
4
|
"description": "Svelte bindings and prompt/rich-text components for @pixerate/editor",
|
|
5
5
|
"author": "Pixerate",
|
|
6
6
|
"license": "MIT",
|
|
@@ -175,7 +175,7 @@
|
|
|
175
175
|
"**/*.css"
|
|
176
176
|
],
|
|
177
177
|
"dependencies": {
|
|
178
|
-
"@pixerate/editor": "0.
|
|
178
|
+
"@pixerate/editor": "0.260.0"
|
|
179
179
|
},
|
|
180
180
|
"peerDependencies": {
|
|
181
181
|
"@dagrejs/dagre": "^1.1.4",
|