@widgetic/canvas 0.5.46 → 0.5.47
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/README.md +2 -1
- package/dist/canvas/DomCanvas.svelte +1 -2
- package/dist/canvas/host/CanvasHost.d.ts +0 -3
- package/dist/canvas/host/CanvasHost.js +102 -67
- package/dist/canvas/host/pauseCollector.d.ts +18 -0
- package/dist/canvas/host/pauseCollector.js +45 -0
- package/dist/canvas/ui/CanvasContextMenu.svelte +40 -3
- package/dist/canvas/ui/CanvasHint.svelte +10 -9
- package/dist/canvas/ui/SelectionPanel.svelte +14 -12
- package/dist/canvas/ui/SelectionPanel.svelte.d.ts +0 -2
- package/dist/canvas/ui/ShapesMenu.svelte +6 -4
- package/dist/canvas/ui/ToolButton.svelte +7 -6
- package/dist/canvas/ui/floatingCard.d.ts +28 -8
- package/dist/canvas/ui/floatingCard.js +28 -8
- package/dist/canvas/ui/selectionTraits.d.ts +8 -4
- package/dist/canvas/ui/selectionTraits.js +10 -18
- package/dist/canvas/view/SelectionOverlay.svelte +2 -2
- package/dist/canvas/view/geometry.d.ts +1 -1
- package/dist/canvas/view/geometry.js +1 -1
- package/dist/components/input-controls/ColorIC.svelte +1 -1
- package/dist/components/input-controls/FontSelectorIC.svelte +1 -1
- package/dist/engine/EngineCore.d.ts +33 -8
- package/dist/engine/EngineCore.js +66 -30
- package/dist/engine/core/brush.d.ts +24 -0
- package/dist/engine/core/brush.js +145 -13
- package/dist/engine/core/shapeTools.d.ts +23 -18
- package/dist/engine/core/shapeTools.js +45 -17
- package/dist/engine/core/style.d.ts +18 -2
- package/dist/engine/core/style.js +57 -25
- package/dist/engine/core/styleMemory.d.ts +88 -0
- package/dist/engine/core/styleMemory.js +189 -0
- package/dist/engine/input/gestures.d.ts +8 -3
- package/dist/engine/input/gestures.js +123 -48
- package/dist/engine/input/keyboard.js +7 -2
- package/dist/poster/boardPlacement.d.ts +4 -1
- package/dist/poster/boardPlacement.js +6 -3
- package/dist/settings/rememberedStyles.d.ts +22 -0
- package/dist/settings/rememberedStyles.js +47 -0
- package/dist/settings/workspaceToolSettings.d.ts +17 -0
- package/dist/settings/workspaceToolSettings.js +4 -1
- package/dist/tools/hostAdapter.js +0 -1
- package/package.json +4 -4
|
@@ -45,7 +45,7 @@ export function parseWorkspaceToolSettings(raw) {
|
|
|
45
45
|
export function loadWorkspaceToolSettings(scope, adapter = adapterFromPreferenceStorage()) {
|
|
46
46
|
return parseWorkspaceToolSettings(adapter.load(storageKey(scope)));
|
|
47
47
|
}
|
|
48
|
-
/** The settings with a patch laid over them: each part (text, paint, arrow, pen, tool) keeps what the patch does not say. */
|
|
48
|
+
/** The settings with a patch laid over them: each part (text, paint, icon, arrow, pen, tool) keeps what the patch does not say. */
|
|
49
49
|
function mergeSettings(current, patch) {
|
|
50
50
|
const merged = {
|
|
51
51
|
v: WORKSPACE_TOOL_SETTINGS_SCHEMA_VERSION,
|
|
@@ -53,6 +53,9 @@ function mergeSettings(current, patch) {
|
|
|
53
53
|
paint: { ...current.paint, ...patch.paint },
|
|
54
54
|
arrow: { ...current.arrow, ...patch.arrow }
|
|
55
55
|
};
|
|
56
|
+
// The line-only icons are written only when the person styled one: settings of a person who never did hold none.
|
|
57
|
+
if (current.icon || patch.icon)
|
|
58
|
+
merged.icon = { ...current.icon, ...patch.icon };
|
|
56
59
|
// The pen is written only when there is one: settings of a person who never touched it hold none.
|
|
57
60
|
if (current.pen || patch.pen)
|
|
58
61
|
merged.pen = { ...current.pen, ...patch.pen };
|
|
@@ -26,7 +26,6 @@ export function createCanvasToolHostFromEngine(options) {
|
|
|
26
26
|
/** Run several tool calls as a single undo step on the engine. */
|
|
27
27
|
export function runCanvasToolBatch(host, run, engine) {
|
|
28
28
|
// When backed by engine, defer commit until batch ends.
|
|
29
|
-
const engineHost = host;
|
|
30
29
|
if (engine) {
|
|
31
30
|
const snapshot = engine.state.scene;
|
|
32
31
|
run();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@widgetic/canvas",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.47",
|
|
4
4
|
"license": "SEE LICENSE IN LICENSE",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"svelte": "./dist/index.js",
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
"dev": "concurrently -n app,pkg -c blue,green \"npm run dev-sv -- --port 5181\" \"npm run package:watch\"",
|
|
57
57
|
"dev-sv": "NODE_ENV=development vite dev",
|
|
58
58
|
"build": "vite build && npm run package",
|
|
59
|
-
"package": "NODE_ENV=production svelte-package",
|
|
59
|
+
"package": "svelte-kit sync && NODE_ENV=production svelte-package",
|
|
60
60
|
"publish-to-npm": "node ../dev-tools/bin/publish-package.mjs",
|
|
61
61
|
"package:watch": "NODE_ENV=development svelte-package --watch",
|
|
62
62
|
"test": "node --test \"scripts/*.test.ts\" \"tests/*.test.mjs\" \"tests/engine/*.test.mjs\" \"tests/host/*.test.mjs\" \"tests/settings/*.test.mjs\" \"tests/view/*.test.mjs\" \"tests/ui/*.test.mjs\" \"tests/tools/*.test.mjs\"",
|
|
@@ -99,7 +99,7 @@
|
|
|
99
99
|
"@tiptap/extension-underline": "^2.9.1",
|
|
100
100
|
"@tiptap/pm": "^2.9.1",
|
|
101
101
|
"@tiptap/starter-kit": "^2.9.1",
|
|
102
|
-
"@widgetic/design-system": "^0.5.
|
|
102
|
+
"@widgetic/design-system": "^0.5.42",
|
|
103
103
|
"@widgetic/dev-tools": "^0.3.0",
|
|
104
104
|
"eslint": "^9.18.0",
|
|
105
105
|
"eslint-config-prettier": "^10.0.1",
|
|
@@ -143,7 +143,7 @@
|
|
|
143
143
|
"url": "https://gitlab.com/widgeticai/Frontend/canvas.git"
|
|
144
144
|
},
|
|
145
145
|
"peerDependencies": {
|
|
146
|
-
"@widgetic/design-system": ">=0.5.
|
|
146
|
+
"@widgetic/design-system": ">=0.5.41",
|
|
147
147
|
"svelte": "^5.0.0"
|
|
148
148
|
}
|
|
149
149
|
}
|