Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
3ef474a
feat: refactor of snapping plugins into a single source-of-truth
jesusmpc May 8, 2026
a3dbdc1
chore: update changelog
jesusmpc May 8, 2026
6ece052
Merge branch 'main' into feature/GH-1041-custom-guides-support-and-re
jesusmpc May 11, 2026
ccb7c7b
chore: update docs
jesusmpc May 11, 2026
e5d8608
Merge branch 'main' into feature/GH-1041-custom-guides-support-and-re
jesusmpc May 11, 2026
b3ee512
Merge branch 'main' into feature/GH-1041-custom-guides-support-and-re
jesusmpc May 12, 2026
e9df454
Merge branch 'main' into feature/GH-1041-custom-guides-support-and-re
jesusmpc May 12, 2026
33062d4
Merge branch 'main' into feature/GH-1041-custom-guides-support-and-re
jesusmpc May 12, 2026
d495551
chore: save metadata plain, not as string to serialize/deserialize
jesusmpc May 13, 2026
7117f10
Merge branch 'feature/GH-1041-custom-guides-support-and-re' of https:…
jesusmpc May 13, 2026
28d7454
chore: wip
jesusmpc May 13, 2026
adef0fb
Merge branch 'main' into feature/GH-1041-custom-guides-support-and-re
jesusmpc May 13, 2026
3fb57ba
chore: merge
jesusmpc May 13, 2026
1fb4da3
Merge branch 'feature/GH-1041-custom-guides-support-and-re' of https:…
jesusmpc May 13, 2026
51e32bd
chore: fix code duplications in sonar qube
jesusmpc May 13, 2026
9c493e7
Merge branch 'main' into feature/GH-1041-custom-guides-support-and-re
jesusmpc May 13, 2026
74f67f4
chore: fix code duplications in sonar qube
jesusmpc May 13, 2026
67b2e28
chore: fix code duplications in sonar qube
jesusmpc May 13, 2026
105b0ef
chore: fix code duplications in sonar qube
jesusmpc May 13, 2026
7e17e83
chore: fix code duplications in sonar qube
jesusmpc May 13, 2026
c081747
chore: fix code duplications in sonar qube
jesusmpc May 13, 2026
6095652
chore: fix code duplications in sonar qube
jesusmpc May 13, 2026
b01394b
chore: fix sonar qube issues
jesusmpc May 13, 2026
0d21dc1
chore: fix sonar qube issues
jesusmpc May 13, 2026
363da59
chore: fix sonar qube issues
jesusmpc May 13, 2026
5122332
chore: fix sonar qube issues
jesusmpc May 13, 2026
3e11225
chore: fix keyboard snapping to guides
jesusmpc May 13, 2026
64a359e
chore: update frame guides and structure
jesusmpc May 15, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
243 changes: 4 additions & 239 deletions code/CHANGELOG.md

Large diffs are not rendered by default.

26 changes: 26 additions & 0 deletions code/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion code/packages/react/src/components/store.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ interface WeaveStore extends WeaveRuntimeState, WeaveRuntimeActions {}

const defaultAppState: WeaveRuntimeState = {
instance: null,
appState: { weave: {} },
appState: { weave: {}, weaveMetadata: {} },
status: WEAVE_INSTANCE_STATUS.IDLE,
room: {
id: null,
Expand Down
4 changes: 3 additions & 1 deletion code/packages/renderer-konva-base/src/renderer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ export class WeaveKonvaBaseRenderer extends WeaveRenderer {
init(): void {
this.actualState = {
weave: {},
weaveMetadata: {},
};
}

Expand Down Expand Up @@ -236,7 +237,8 @@ export class WeaveKonvaBaseRenderer extends WeaveRenderer {
);

if (!nodeInstance) {
throw new Error(`No handler found for node type ${element.type}`);
console.warn(`No handler found for node type ${element.type}`);
return;
}

if (!parentInstance && nodeInstance) {
Expand Down
1 change: 1 addition & 0 deletions code/packages/sdk/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@
"fontfaceobserver": "2.3.0",
"globals": "15.14.0",
"hammerjs": "^2.0.8",
"hookable": "^5.5.3",
"lodash": "4.18.1",
"rollup-plugin-visualizer": "^7.0.1",
"tsdown": "^0.10.2",
Expand Down
30 changes: 17 additions & 13 deletions code/packages/sdk/src/actions/ellipse-tool/ellipse-tool.ts
Original file line number Diff line number Diff line change
Expand Up @@ -183,11 +183,10 @@ export class WeaveEllipseToolAction extends WeaveAction {
if (nodeHandler) {
const node = nodeHandler.create(this.ellipseId, {
...this.props,
strokeScaleEnabled: true,
x: this.clickPoint?.x ?? 0 + this.props.radiusX,
y: this.clickPoint?.y ?? 0 + this.props.radiusY,
radiusX: 0,
radiusY: 0,
radiusX: 1,
radiusY: 1,
});

this.instance.addNode(node, this.container?.getAttrs().id);
Expand Down Expand Up @@ -222,10 +221,10 @@ export class WeaveEllipseToolAction extends WeaveAction {

ellipse.setAttrs({
...this.props,
x: ellipsePos.x + ellipseRadiusX,
y: ellipsePos.y + ellipseRadiusY,
radiusX: ellipseRadiusX,
radiusY: ellipseRadiusY,
x: ellipsePos.x,
y: ellipsePos.y,
radiusX: ellipseRadiusX / 2,
radiusY: ellipseRadiusY / 2,
});

if (nodeHandler) {
Expand Down Expand Up @@ -266,12 +265,17 @@ export class WeaveEllipseToolAction extends WeaveAction {
ellipsePos.y = Math.min(this.clickPoint.y, mousePoint.y);
}

ellipse.setAttrs({
x: ellipsePos.x + deltaX,
y: ellipsePos.y + deltaY,
radiusX: deltaX,
radiusY: deltaY,
});
const nodeHandler =
this.instance.getNodeHandler<WeaveEllipseNode>('ellipse');

if (nodeHandler) {
nodeHandler.onUpdate(ellipse as WeaveElementInstance, {
...this.props,
id: this.ellipseId,
radiusX: deltaX / 2,
radiusY: deltaY / 2,
});
}
}
}

Expand Down
55 changes: 55 additions & 0 deletions code/packages/sdk/src/actions/guide-tool/constants.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
// SPDX-FileCopyrightText: 2025 2025 INDUSTRIA DE DISEÑO TEXTIL S.A. (INDITEX S.A.)
//
// SPDX-License-Identifier: Apache-2.0

import type { GuideToolActionConfig } from './types';

export const GUIDE_TOOL_ACTION_NAME = 'guideTool';

export const GUIDE_TOOL_STATE = {
['IDLE']: 'idle',
['ADDING']: 'adding',
['NOT_ADDED']: 'not-added',
['ADDED']: 'added',
} as const;

export const DEFAULT_GUIDE_TOOL_ACTION_CONFIG: GuideToolActionConfig = {
style: {
guide: {
stroke: '#FF3B30',
strokeWidth: 0.5,
dash: [],
opacity: 0.9,
},
targetDistance: {
target: {
stroke: '#FF3B30',
strokeWidth: 1,
dash: [],
opacity: 1,
},
distance: {
opacity: 1,
line: {
stroke: '#FF3B30',
strokeWidth: 1,
dash: [],
opacity: 1,
},
text: {
fill: '#ffffff',
fontSize: 10,
fontFamily: 'Roboto Mono, monospace',
opacity: 1,
},
background: {
fill: '#FF3B30',
cornerRadius: 4,
stroke: '#FF3B30',
strokeWidth: 0,
opacity: 1,
},
},
},
},
};
Loading
Loading