@edv4h/usketch-plugin-shape-island 2.0.0 → 3.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/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/plugin.d.ts +1 -1
- package/dist/plugin.d.ts.map +1 -1
- package/dist/plugin.js +171 -169
- package/dist/plugin.js.map +1 -1
- package/package.json +3 -3
package/dist/index.d.ts
CHANGED
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AACjD,YAAY,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { createIslandPlugin } from "./plugin.js";
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC"}
|
package/dist/plugin.d.ts
CHANGED
package/dist/plugin.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../src/plugin.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAKX,aAAa,EACb,MAAM,uBAAuB,CAAC;AAwB/B,
|
|
1
|
+
{"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../src/plugin.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAKX,aAAa,EACb,MAAM,uBAAuB,CAAC;AAwB/B,wBAAgB,kBAAkB,IAAI,aAAa,CAmMlD"}
|
package/dist/plugin.js
CHANGED
|
@@ -7,185 +7,187 @@ import { createDefaultIsland, getBoundsIsland, hitTestIsland, renderIsland, resi
|
|
|
7
7
|
function IslandIcon() {
|
|
8
8
|
return (_jsxs("svg", { width: "20", height: "20", viewBox: "0 0 20 20", fill: "none", children: [_jsx("ellipse", { cx: "10", cy: "14", rx: "8", ry: "4", fill: "#a8d5ba", stroke: "#8bc4a0", strokeWidth: "1.5" }), _jsx("circle", { cx: "8", cy: "10", r: "2", fill: "#6b9" }), _jsx("circle", { cx: "12", cy: "8", r: "3", fill: "#5a8" }), _jsx("line", { x1: "12", y1: "5", x2: "12", y2: "8", stroke: "#764", strokeWidth: "1.5" })] }));
|
|
9
9
|
}
|
|
10
|
-
export
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
function onPointerMove(toolCtx, event) {
|
|
42
|
-
if (!drawState)
|
|
43
|
-
return;
|
|
44
|
-
const x = Math.min(drawState.startX, event.worldPoint.x);
|
|
45
|
-
const y = Math.min(drawState.startY, event.worldPoint.y);
|
|
46
|
-
const width = Math.abs(event.worldPoint.x - drawState.startX);
|
|
47
|
-
const height = Math.abs(event.worldPoint.y - drawState.startY);
|
|
48
|
-
toolCtx.store.updateShape(drawState.shapeId, { x, y, width, height });
|
|
49
|
-
}
|
|
50
|
-
function onPointerUp(toolCtx) {
|
|
51
|
-
if (!drawState)
|
|
52
|
-
return;
|
|
53
|
-
const shape = toolCtx.store.getShape(drawState.shapeId);
|
|
54
|
-
if (shape && shape.width > 10 && shape.height > 10) {
|
|
55
|
-
toolCtx.store.deleteShape(drawState.shapeId);
|
|
56
|
-
toolCtx.commands.execute(createAddShapeCommand(toolCtx.store, shape));
|
|
10
|
+
export function createIslandPlugin() {
|
|
11
|
+
return {
|
|
12
|
+
id: "usketch-plugin-shape-island",
|
|
13
|
+
name: "Island",
|
|
14
|
+
setup(ctx) {
|
|
15
|
+
// ── Shape registration ──
|
|
16
|
+
ctx.shapes.register("island", {
|
|
17
|
+
render: renderIsland,
|
|
18
|
+
getBounds: getBoundsIsland,
|
|
19
|
+
hitTest: hitTestIsland,
|
|
20
|
+
resize: resizeIsland,
|
|
21
|
+
createDefault: createDefaultIsland,
|
|
22
|
+
renderTarget: "html",
|
|
23
|
+
minSize: { width: 100, height: 100 },
|
|
24
|
+
});
|
|
25
|
+
// ── Metaball background layer (renders below shapes) ──
|
|
26
|
+
ctx.layers.register({
|
|
27
|
+
id: "island-metaball",
|
|
28
|
+
order: -1,
|
|
29
|
+
fixed: true,
|
|
30
|
+
render: () => _jsx(IslandMetaballLayer, { store: ctx.store }),
|
|
31
|
+
});
|
|
32
|
+
// ── Drawing tool ──
|
|
33
|
+
let drawState = null;
|
|
34
|
+
function onPointerDown(toolCtx, event) {
|
|
35
|
+
const id = generateId();
|
|
36
|
+
drawState = { startX: event.worldPoint.x, startY: event.worldPoint.y, shapeId: id };
|
|
37
|
+
const shape = createDefaultIsland({ id, x: event.worldPoint.x, y: event.worldPoint.y });
|
|
38
|
+
shape.width = 0;
|
|
39
|
+
shape.height = 0;
|
|
40
|
+
toolCtx.store.addShape(shape);
|
|
57
41
|
}
|
|
58
|
-
|
|
59
|
-
|
|
42
|
+
function onPointerMove(toolCtx, event) {
|
|
43
|
+
if (!drawState)
|
|
44
|
+
return;
|
|
45
|
+
const x = Math.min(drawState.startX, event.worldPoint.x);
|
|
46
|
+
const y = Math.min(drawState.startY, event.worldPoint.y);
|
|
47
|
+
const width = Math.abs(event.worldPoint.x - drawState.startX);
|
|
48
|
+
const height = Math.abs(event.worldPoint.y - drawState.startY);
|
|
49
|
+
toolCtx.store.updateShape(drawState.shapeId, { x, y, width, height });
|
|
60
50
|
}
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
order: 6,
|
|
69
|
-
onPointerDown,
|
|
70
|
-
onPointerMove,
|
|
71
|
-
onPointerUp,
|
|
72
|
-
onDeactivate() {
|
|
73
|
-
if (drawState) {
|
|
74
|
-
ctx.store.deleteShape(drawState.shapeId);
|
|
75
|
-
drawState = null;
|
|
51
|
+
function onPointerUp(toolCtx) {
|
|
52
|
+
if (!drawState)
|
|
53
|
+
return;
|
|
54
|
+
const shape = toolCtx.store.getShape(drawState.shapeId);
|
|
55
|
+
if (shape && shape.width > 10 && shape.height > 10) {
|
|
56
|
+
toolCtx.store.deleteShape(drawState.shapeId);
|
|
57
|
+
toolCtx.commands.execute(createAddShapeCommand(toolCtx.store, shape));
|
|
76
58
|
}
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
// ── Auto-parenting (same pattern as frame plugin) ──
|
|
80
|
-
const CONTAINER_TYPES = new Set(["frame", "island"]);
|
|
81
|
-
function autoReparent(shapeId) {
|
|
82
|
-
const shape = ctx.store.getShape(shapeId);
|
|
83
|
-
if (!shape || CONTAINER_TYPES.has(shape.type) || shape.type === "connector")
|
|
84
|
-
return;
|
|
85
|
-
const shapeBounds = { x: shape.x, y: shape.y, width: shape.width, height: shape.height };
|
|
86
|
-
let bestContainer = null;
|
|
87
|
-
for (const [id, candidate] of ctx.store.getShapes()) {
|
|
88
|
-
if (id === shapeId || !CONTAINER_TYPES.has(candidate.type))
|
|
89
|
-
continue;
|
|
90
|
-
const containerBounds = {
|
|
91
|
-
x: candidate.x,
|
|
92
|
-
y: candidate.y,
|
|
93
|
-
width: candidate.width,
|
|
94
|
-
height: candidate.height,
|
|
95
|
-
};
|
|
96
|
-
if (containsAABB(containerBounds, shapeBounds)) {
|
|
97
|
-
if (!bestContainer ||
|
|
98
|
-
candidate.width * candidate.height < bestContainer.width * bestContainer.height) {
|
|
99
|
-
bestContainer = candidate;
|
|
100
|
-
}
|
|
59
|
+
else {
|
|
60
|
+
toolCtx.store.deleteShape(drawState.shapeId);
|
|
101
61
|
}
|
|
62
|
+
drawState = null;
|
|
63
|
+
toolCtx.store.setActiveToolId("select");
|
|
102
64
|
}
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
const shape = ctx.store.getShape(shapeId);
|
|
116
|
-
if (shape?.type === "island") {
|
|
117
|
-
// Island moved — adopt shapes now inside it
|
|
118
|
-
adoptContainedShapes(shapeId);
|
|
65
|
+
ctx.tools.register("island-draw", {
|
|
66
|
+
icon: IslandIcon,
|
|
67
|
+
cursor: "crosshair",
|
|
68
|
+
shortcut: "i",
|
|
69
|
+
order: 6,
|
|
70
|
+
onPointerDown,
|
|
71
|
+
onPointerMove,
|
|
72
|
+
onPointerUp,
|
|
73
|
+
onDeactivate() {
|
|
74
|
+
if (drawState) {
|
|
75
|
+
ctx.store.deleteShape(drawState.shapeId);
|
|
76
|
+
drawState = null;
|
|
119
77
|
}
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
78
|
+
},
|
|
79
|
+
});
|
|
80
|
+
// ── Auto-parenting (same pattern as frame plugin) ──
|
|
81
|
+
const CONTAINER_TYPES = new Set(["frame", "island"]);
|
|
82
|
+
function autoReparent(shapeId) {
|
|
83
|
+
const shape = ctx.store.getShape(shapeId);
|
|
84
|
+
if (!shape || CONTAINER_TYPES.has(shape.type) || shape.type === "connector")
|
|
85
|
+
return;
|
|
86
|
+
const shapeBounds = { x: shape.x, y: shape.y, width: shape.width, height: shape.height };
|
|
87
|
+
let bestContainer = null;
|
|
88
|
+
for (const [id, candidate] of ctx.store.getShapes()) {
|
|
89
|
+
if (id === shapeId || !CONTAINER_TYPES.has(candidate.type))
|
|
90
|
+
continue;
|
|
91
|
+
const containerBounds = {
|
|
92
|
+
x: candidate.x,
|
|
93
|
+
y: candidate.y,
|
|
94
|
+
width: candidate.width,
|
|
95
|
+
height: candidate.height,
|
|
96
|
+
};
|
|
97
|
+
if (containsAABB(containerBounds, shapeBounds)) {
|
|
98
|
+
if (!bestContainer ||
|
|
99
|
+
candidate.width * candidate.height < bestContainer.width * bestContainer.height) {
|
|
100
|
+
bestContainer = candidate;
|
|
101
|
+
}
|
|
123
102
|
}
|
|
124
103
|
}
|
|
125
|
-
const
|
|
126
|
-
|
|
127
|
-
if (
|
|
128
|
-
ctx.
|
|
104
|
+
const currentParentId = shape.parentId;
|
|
105
|
+
const newParentId = bestContainer?.id;
|
|
106
|
+
if (currentParentId !== newParentId) {
|
|
107
|
+
ctx.commands.execute(createReparentCommand(ctx.store, [shapeId], newParentId ?? undefined));
|
|
129
108
|
}
|
|
130
|
-
}, 0);
|
|
131
|
-
});
|
|
132
|
-
// Adopt all non-container shapes fully inside an island
|
|
133
|
-
function adoptContainedShapes(islandId) {
|
|
134
|
-
const island = ctx.store.getShape(islandId);
|
|
135
|
-
if (!island || island.type !== "island")
|
|
136
|
-
return;
|
|
137
|
-
const islandBounds = {
|
|
138
|
-
x: island.x,
|
|
139
|
-
y: island.y,
|
|
140
|
-
width: island.width,
|
|
141
|
-
height: island.height,
|
|
142
|
-
};
|
|
143
|
-
for (const [childId, child] of ctx.store.getShapes()) {
|
|
144
|
-
if (childId === islandId || CONTAINER_TYPES.has(child.type) || child.type === "connector")
|
|
145
|
-
continue;
|
|
146
|
-
if (child.parentId === islandId)
|
|
147
|
-
continue;
|
|
148
|
-
const childBounds = { x: child.x, y: child.y, width: child.width, height: child.height };
|
|
149
|
-
if (containsAABB(islandBounds, childBounds)) {
|
|
150
|
-
ctx.commands.execute(createReparentCommand(ctx.store, [childId], islandId));
|
|
151
|
-
}
|
|
152
|
-
}
|
|
153
|
-
}
|
|
154
|
-
const unsubAdded = ctx.store.onMutation((event) => {
|
|
155
|
-
if (event.type !== "shape:added")
|
|
156
|
-
return;
|
|
157
|
-
const payload = event.payload;
|
|
158
|
-
if (!payload?.id)
|
|
159
|
-
return;
|
|
160
|
-
const shape = ctx.store.getShape(payload.id);
|
|
161
|
-
if (!shape)
|
|
162
|
-
return;
|
|
163
|
-
if (shape.type === "island") {
|
|
164
|
-
// Island was just created — adopt shapes already inside it
|
|
165
|
-
adoptContainedShapes(payload.id);
|
|
166
|
-
return;
|
|
167
109
|
}
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
110
|
+
// ── Auto-grouping: islands that touch form a group ──
|
|
111
|
+
const unsubMoveEnd = ctx.events.on("shapes:move-end", (data) => {
|
|
112
|
+
if (!data?.shapeIds)
|
|
113
|
+
return;
|
|
114
|
+
setTimeout(() => {
|
|
115
|
+
for (const shapeId of data.shapeIds) {
|
|
116
|
+
const shape = ctx.store.getShape(shapeId);
|
|
117
|
+
if (shape?.type === "island") {
|
|
118
|
+
// Island moved — adopt shapes now inside it
|
|
119
|
+
adoptContainedShapes(shapeId);
|
|
120
|
+
}
|
|
121
|
+
else {
|
|
122
|
+
// Non-island moved — reparent into nearest container
|
|
123
|
+
autoReparent(shapeId);
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
const prevSelection = [...ctx.store.getSelection()];
|
|
127
|
+
reconcileIslandGroups(ctx.store, ctx.commands);
|
|
128
|
+
if (prevSelection.length > 0) {
|
|
129
|
+
ctx.store.setSelection(prevSelection.filter((id) => ctx.store.getShape(id)));
|
|
130
|
+
}
|
|
131
|
+
}, 0);
|
|
132
|
+
});
|
|
133
|
+
// Adopt all non-container shapes fully inside an island
|
|
134
|
+
function adoptContainedShapes(islandId) {
|
|
135
|
+
const island = ctx.store.getShape(islandId);
|
|
136
|
+
if (!island || island.type !== "island")
|
|
137
|
+
return;
|
|
138
|
+
const islandBounds = {
|
|
139
|
+
x: island.x,
|
|
140
|
+
y: island.y,
|
|
141
|
+
width: island.width,
|
|
142
|
+
height: island.height,
|
|
143
|
+
};
|
|
144
|
+
for (const [childId, child] of ctx.store.getShapes()) {
|
|
145
|
+
if (childId === islandId || CONTAINER_TYPES.has(child.type) || child.type === "connector")
|
|
146
|
+
continue;
|
|
147
|
+
if (child.parentId === islandId)
|
|
148
|
+
continue;
|
|
149
|
+
const childBounds = { x: child.x, y: child.y, width: child.width, height: child.height };
|
|
150
|
+
if (containsAABB(islandBounds, childBounds)) {
|
|
151
|
+
ctx.commands.execute(createReparentCommand(ctx.store, [childId], islandId));
|
|
152
|
+
}
|
|
179
153
|
}
|
|
180
154
|
}
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
155
|
+
const unsubAdded = ctx.store.onMutation((event) => {
|
|
156
|
+
if (event.type !== "shape:added")
|
|
157
|
+
return;
|
|
158
|
+
const payload = event.payload;
|
|
159
|
+
if (!payload?.id)
|
|
160
|
+
return;
|
|
161
|
+
const shape = ctx.store.getShape(payload.id);
|
|
162
|
+
if (!shape)
|
|
163
|
+
return;
|
|
164
|
+
if (shape.type === "island") {
|
|
165
|
+
// Island was just created — adopt shapes already inside it
|
|
166
|
+
adoptContainedShapes(payload.id);
|
|
167
|
+
return;
|
|
168
|
+
}
|
|
169
|
+
if (CONTAINER_TYPES.has(shape.type) || shape.type === "connector")
|
|
170
|
+
return;
|
|
171
|
+
autoReparent(payload.id);
|
|
172
|
+
});
|
|
173
|
+
// ── Detach: Shift+D to detach selected island from its group ──
|
|
174
|
+
const unsubDetach = ctx.shortcuts.register("Shift+D", () => {
|
|
175
|
+
const selection = ctx.store.getSelection();
|
|
176
|
+
for (const id of selection) {
|
|
177
|
+
const shape = ctx.store.getShape(id);
|
|
178
|
+
if (shape?.type === "island") {
|
|
179
|
+
detachIsland(ctx.store, ctx.commands, id);
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
});
|
|
183
|
+
return () => {
|
|
184
|
+
unsubMoveEnd();
|
|
185
|
+
unsubAdded();
|
|
186
|
+
unsubDetach();
|
|
187
|
+
cleanupIslandGroupTimers();
|
|
188
|
+
ctx.layers.unregister("island-metaball");
|
|
189
|
+
};
|
|
190
|
+
},
|
|
191
|
+
};
|
|
192
|
+
}
|
|
191
193
|
//# sourceMappingURL=plugin.js.map
|
package/dist/plugin.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.js","sourceRoot":"","sources":["../src/plugin.tsx"],"names":[],"mappings":";AAOA,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACnD,OAAO,EAAE,YAAY,EAAE,qBAAqB,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAC;AAClG,OAAO,EAAE,wBAAwB,EAAE,YAAY,EAAE,qBAAqB,EAAE,MAAM,iBAAiB,CAAC;AAChG,OAAO,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AACjE,OAAO,EACN,mBAAmB,EACnB,eAAe,EACf,aAAa,EACb,YAAY,EACZ,YAAY,GACZ,MAAM,oBAAoB,CAAC;AAE5B,SAAS,UAAU;IAClB,OAAO,CACN,eAAK,KAAK,EAAC,IAAI,EAAC,MAAM,EAAC,IAAI,EAAC,OAAO,EAAC,WAAW,EAAC,IAAI,E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,CAAC;YAC1C,CAAC,CAAC;QACH,CAAC;KACD,CAAC;AACH,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@edv4h/usketch-plugin-shape-island",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.0.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -12,8 +12,8 @@
|
|
|
12
12
|
}
|
|
13
13
|
},
|
|
14
14
|
"dependencies": {
|
|
15
|
-
"@edv4h/usketch-shared": "
|
|
16
|
-
"@edv4h/usketch-store": "2.0.
|
|
15
|
+
"@edv4h/usketch-shared": "3.0.0",
|
|
16
|
+
"@edv4h/usketch-store": "2.0.1"
|
|
17
17
|
},
|
|
18
18
|
"peerDependencies": {
|
|
19
19
|
"react": ">=19"
|