@wasao/kagemusha 0.1.0 → 0.1.1
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 +1 -1
- package/dist/commands/capture.d.ts +1 -0
- package/dist/commands/capture.d.ts.map +1 -1
- package/dist/commands/capture.js +14 -3
- package/dist/commands/capture.js.map +1 -1
- package/dist/commands/edit.d.ts +6 -0
- package/dist/commands/edit.d.ts.map +1 -0
- package/dist/commands/edit.js +100 -0
- package/dist/commands/edit.js.map +1 -0
- package/dist/commands/init.d.ts.map +1 -1
- package/dist/commands/init.js +14 -16
- package/dist/commands/init.js.map +1 -1
- package/dist/editor/editor/editor.html +313 -0
- package/dist/editor/editor/inject.ts +385 -0
- package/dist/editor/editor.html +338 -0
- package/dist/editor/inject-script.cjs +398 -0
- package/dist/editor/inject-script.cjs.map +1 -0
- package/dist/editor/inject-script.d.cts +2 -0
- package/dist/editor/inject-script.d.cts.map +1 -0
- package/dist/editor/inject-script.d.ts +2 -0
- package/dist/editor/inject-script.d.ts.map +1 -0
- package/dist/editor/inject-script.js +394 -0
- package/dist/editor/inject-script.js.map +1 -0
- package/dist/editor/inject.d.ts +2 -0
- package/dist/editor/inject.d.ts.map +1 -0
- package/dist/editor/inject.js +385 -0
- package/dist/editor/inject.js.map +1 -0
- package/dist/index.js +6 -5
- package/dist/index.js.map +1 -1
- package/dist/lib/annotate.js +1 -1
- package/dist/lib/annotate.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,385 @@
|
|
|
1
|
+
// This script is injected into the target page to provide annotation editing.
|
|
2
|
+
// It adds a toolbar and SVG overlay layer on top of the actual page.
|
|
3
|
+
export const EDITOR_SCRIPT = `
|
|
4
|
+
(function() {
|
|
5
|
+
const TOOLBAR_HEIGHT = 48;
|
|
6
|
+
const svgNS = 'http://www.w3.org/2000/svg';
|
|
7
|
+
|
|
8
|
+
let tool = 'rect';
|
|
9
|
+
let annotations = [];
|
|
10
|
+
let selectedId = null;
|
|
11
|
+
let dragState = null;
|
|
12
|
+
let nextId = 1;
|
|
13
|
+
|
|
14
|
+
// --- GLOBAL STATE (single object to avoid namespace pollution) ---
|
|
15
|
+
window.__kagemusha = window.__kagemusha || { dpr: 1, saved: null };
|
|
16
|
+
|
|
17
|
+
// --- TOOLBAR ---
|
|
18
|
+
const toolbar = document.createElement('div');
|
|
19
|
+
toolbar.id = 'kagemusha-toolbar';
|
|
20
|
+
toolbar.innerHTML = \`
|
|
21
|
+
<style>
|
|
22
|
+
#kagemusha-toolbar {
|
|
23
|
+
position: fixed; top: 0; left: 0; right: 0; z-index: 999999;
|
|
24
|
+
background: #16213e; padding: 8px 16px; display: flex; align-items: center; gap: 12px;
|
|
25
|
+
box-shadow: 0 2px 8px rgba(0,0,0,0.3); font-family: -apple-system, sans-serif;
|
|
26
|
+
}
|
|
27
|
+
#kagemusha-toolbar button {
|
|
28
|
+
padding: 6px 14px; border: 1px solid #444; border-radius: 6px;
|
|
29
|
+
background: #1a1a2e; color: #fff; font-size: 13px; cursor: pointer;
|
|
30
|
+
}
|
|
31
|
+
#kagemusha-toolbar button:hover { background: #2a2a4e; }
|
|
32
|
+
#kagemusha-toolbar button.active { background: #6366f1; border-color: #6366f1; }
|
|
33
|
+
#kagemusha-toolbar .sep { width: 1px; height: 24px; background: #444; }
|
|
34
|
+
#kagemusha-toolbar .title { color: #888; font-size: 13px; }
|
|
35
|
+
#kagemusha-toolbar .save-btn { background: #22c55e; border-color: #22c55e; font-weight: 600; margin-left: auto; }
|
|
36
|
+
#kagemusha-toolbar .save-btn:hover { background: #16a34a; }
|
|
37
|
+
#kagemusha-svg-layer {
|
|
38
|
+
position: absolute; top: 0; left: 0; width: 100%;
|
|
39
|
+
z-index: 999998; pointer-events: none;
|
|
40
|
+
}
|
|
41
|
+
#kagemusha-svg-layer.drawing { pointer-events: auto; cursor: crosshair; }
|
|
42
|
+
#kagemusha-svg-layer .annotation { pointer-events: auto; cursor: move; }
|
|
43
|
+
#kagemusha-svg-layer .annotation.selected { filter: drop-shadow(0 0 3px #6366f1); }
|
|
44
|
+
.kagemusha-hint {
|
|
45
|
+
position: fixed; bottom: 16px; left: 50%; transform: translateX(-50%);
|
|
46
|
+
color: #fff; background: rgba(0,0,0,0.7); padding: 6px 16px; border-radius: 8px;
|
|
47
|
+
font-size: 12px; z-index: 999999; font-family: -apple-system, sans-serif;
|
|
48
|
+
}
|
|
49
|
+
</style>
|
|
50
|
+
<span class="title">🥷 Annotation Editor</span>
|
|
51
|
+
<button id="kg-tool-rect" class="active">▭ Rectangle</button>
|
|
52
|
+
<button id="kg-tool-arrow">→ Arrow</button>
|
|
53
|
+
<button id="kg-tool-label">T Label</button>
|
|
54
|
+
<div class="sep"></div>
|
|
55
|
+
<button id="kg-delete">🗑 Delete</button>
|
|
56
|
+
<button class="save-btn" id="kg-save">💾 Save</button>
|
|
57
|
+
\`;
|
|
58
|
+
document.body.appendChild(toolbar);
|
|
59
|
+
document.body.style.paddingTop = TOOLBAR_HEIGHT + 'px';
|
|
60
|
+
|
|
61
|
+
// Hint
|
|
62
|
+
const hint = document.createElement('div');
|
|
63
|
+
hint.className = 'kagemusha-hint';
|
|
64
|
+
hint.textContent = 'Click and drag to add annotations. Click to select. Press Delete to remove.';
|
|
65
|
+
document.body.appendChild(hint);
|
|
66
|
+
|
|
67
|
+
// --- SVG LAYER ---
|
|
68
|
+
const svg = document.createElementNS(svgNS, 'svg');
|
|
69
|
+
svg.id = 'kagemusha-svg-layer';
|
|
70
|
+
svg.classList.add('drawing');
|
|
71
|
+
document.body.appendChild(svg);
|
|
72
|
+
|
|
73
|
+
function updateSvgSize() {
|
|
74
|
+
svg.setAttribute('width', String(window.innerWidth));
|
|
75
|
+
svg.setAttribute('height', String(document.documentElement.scrollHeight));
|
|
76
|
+
}
|
|
77
|
+
updateSvgSize();
|
|
78
|
+
window.addEventListener('resize', updateSvgSize);
|
|
79
|
+
|
|
80
|
+
const defs = document.createElementNS(svgNS, 'defs');
|
|
81
|
+
defs.innerHTML = '<marker id="kg-arrowhead" markerWidth="10" markerHeight="7" refX="10" refY="3.5" orient="auto" fill="#FF0000"><polygon points="0 0, 10 3.5, 0 7"/></marker>';
|
|
82
|
+
svg.appendChild(defs);
|
|
83
|
+
|
|
84
|
+
// --- TOOLS ---
|
|
85
|
+
function setTool(t) {
|
|
86
|
+
tool = t;
|
|
87
|
+
document.querySelectorAll('#kagemusha-toolbar button').forEach(b => b.classList.remove('active'));
|
|
88
|
+
const btn = document.getElementById('kg-tool-' + t);
|
|
89
|
+
if (btn) btn.classList.add('active');
|
|
90
|
+
svg.classList.toggle('drawing', true);
|
|
91
|
+
deselectAll();
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
document.getElementById('kg-tool-rect').addEventListener('click', () => setTool('rect'));
|
|
95
|
+
document.getElementById('kg-tool-arrow').addEventListener('click', () => setTool('arrow'));
|
|
96
|
+
document.getElementById('kg-tool-label').addEventListener('click', () => setTool('label'));
|
|
97
|
+
document.getElementById('kg-delete').addEventListener('click', deleteSelected);
|
|
98
|
+
document.getElementById('kg-save').addEventListener('click', save);
|
|
99
|
+
|
|
100
|
+
function deselectAll() {
|
|
101
|
+
selectedId = null;
|
|
102
|
+
svg.querySelectorAll('.annotation').forEach(el => el.classList.remove('selected'));
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
function selectEl(el) {
|
|
106
|
+
deselectAll();
|
|
107
|
+
selectedId = el.dataset.id;
|
|
108
|
+
el.classList.add('selected');
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
function deleteSelected() {
|
|
112
|
+
if (!selectedId) return;
|
|
113
|
+
const el = svg.querySelector('[data-id="' + selectedId + '"]');
|
|
114
|
+
if (el) el.remove();
|
|
115
|
+
annotations = annotations.filter(a => a.id !== selectedId);
|
|
116
|
+
selectedId = null;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
document.addEventListener('keydown', e => {
|
|
120
|
+
if (e.key === 'Delete' || e.key === 'Backspace') {
|
|
121
|
+
if (document.activeElement.tagName === 'INPUT') return;
|
|
122
|
+
deleteSelected();
|
|
123
|
+
}
|
|
124
|
+
});
|
|
125
|
+
|
|
126
|
+
// --- MOUSE HANDLING ---
|
|
127
|
+
function getPos(e) {
|
|
128
|
+
return { x: e.pageX, y: e.pageY };
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
function startMove(e, id) {
|
|
132
|
+
e.stopPropagation();
|
|
133
|
+
const el = svg.querySelector('[data-id="' + id + '"]');
|
|
134
|
+
selectEl(el);
|
|
135
|
+
const p = getPos(e);
|
|
136
|
+
dragState = { type: 'move', id, el, lastX: p.x, lastY: p.y };
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
// --- LABEL: measure text width using SVG getBBox ---
|
|
140
|
+
function measureTextWidth(text, fontSize) {
|
|
141
|
+
const tmp = document.createElementNS(svgNS, 'text');
|
|
142
|
+
tmp.setAttribute('font-size', String(fontSize));
|
|
143
|
+
tmp.setAttribute('font-family', '-apple-system, sans-serif');
|
|
144
|
+
tmp.textContent = text;
|
|
145
|
+
svg.appendChild(tmp);
|
|
146
|
+
const width = tmp.getBBox().width;
|
|
147
|
+
tmp.remove();
|
|
148
|
+
return width;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
function createLabelGroup(id, x, y, text, fontSize) {
|
|
152
|
+
fontSize = fontSize || 14;
|
|
153
|
+
const g = document.createElementNS(svgNS, 'g');
|
|
154
|
+
g.classList.add('annotation');
|
|
155
|
+
g.dataset.id = id;
|
|
156
|
+
const bg = document.createElementNS(svgNS, 'rect');
|
|
157
|
+
const txt = document.createElementNS(svgNS, 'text');
|
|
158
|
+
txt.textContent = text;
|
|
159
|
+
txt.setAttribute('x', String(x + 6));
|
|
160
|
+
txt.setAttribute('y', String(y + 16));
|
|
161
|
+
txt.setAttribute('fill', '#FF0000');
|
|
162
|
+
txt.setAttribute('font-size', String(fontSize));
|
|
163
|
+
txt.setAttribute('font-family', '-apple-system, sans-serif');
|
|
164
|
+
const tw = measureTextWidth(text, fontSize) + 12;
|
|
165
|
+
bg.setAttribute('x', String(x));
|
|
166
|
+
bg.setAttribute('y', String(y));
|
|
167
|
+
bg.setAttribute('width', String(tw));
|
|
168
|
+
bg.setAttribute('height', '24');
|
|
169
|
+
bg.setAttribute('fill', '#FFFFFF');
|
|
170
|
+
bg.setAttribute('rx', '4');
|
|
171
|
+
g.appendChild(bg);
|
|
172
|
+
g.appendChild(txt);
|
|
173
|
+
return g;
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
svg.addEventListener('mousedown', e => {
|
|
177
|
+
if (e.target.closest('.annotation')) return;
|
|
178
|
+
const p = getPos(e);
|
|
179
|
+
deselectAll();
|
|
180
|
+
|
|
181
|
+
if (tool === 'rect') {
|
|
182
|
+
const id = 'a' + nextId++;
|
|
183
|
+
const rect = document.createElementNS(svgNS, 'rect');
|
|
184
|
+
rect.setAttribute('x', p.x);
|
|
185
|
+
rect.setAttribute('y', p.y);
|
|
186
|
+
rect.setAttribute('width', '0');
|
|
187
|
+
rect.setAttribute('height', '0');
|
|
188
|
+
rect.setAttribute('fill', 'none');
|
|
189
|
+
rect.setAttribute('stroke', '#FF0000');
|
|
190
|
+
rect.setAttribute('stroke-width', '3');
|
|
191
|
+
rect.setAttribute('rx', '4');
|
|
192
|
+
rect.classList.add('annotation');
|
|
193
|
+
rect.dataset.id = id;
|
|
194
|
+
svg.appendChild(rect);
|
|
195
|
+
dragState = { type: 'create-rect', id, el: rect, sx: p.x, sy: p.y };
|
|
196
|
+
} else if (tool === 'arrow') {
|
|
197
|
+
const id = 'a' + nextId++;
|
|
198
|
+
const line = document.createElementNS(svgNS, 'line');
|
|
199
|
+
line.setAttribute('x1', p.x);
|
|
200
|
+
line.setAttribute('y1', p.y);
|
|
201
|
+
line.setAttribute('x2', p.x);
|
|
202
|
+
line.setAttribute('y2', p.y);
|
|
203
|
+
line.setAttribute('stroke', '#FF0000');
|
|
204
|
+
line.setAttribute('stroke-width', '3');
|
|
205
|
+
line.setAttribute('marker-end', 'url(#kg-arrowhead)');
|
|
206
|
+
line.classList.add('annotation');
|
|
207
|
+
line.dataset.id = id;
|
|
208
|
+
svg.appendChild(line);
|
|
209
|
+
dragState = { type: 'create-arrow', id, el: line, sx: p.x, sy: p.y };
|
|
210
|
+
} else if (tool === 'label') {
|
|
211
|
+
const id = 'a' + nextId++;
|
|
212
|
+
const input = document.createElement('input');
|
|
213
|
+
input.type = 'text';
|
|
214
|
+
input.value = '';
|
|
215
|
+
input.placeholder = 'Type label...';
|
|
216
|
+
input.style.cssText = 'position:fixed;z-index:9999999;padding:4px 8px;background:#fff;border:none;border-radius:4px;color:#FF0000;font-size:14px;font-family:-apple-system,sans-serif;outline:2px solid #6366f1;min-width:80px;box-shadow:0 2px 8px rgba(0,0,0,0.2);';
|
|
217
|
+
input.style.left = (e.clientX) + 'px';
|
|
218
|
+
input.style.top = (e.clientY) + 'px';
|
|
219
|
+
document.body.appendChild(input);
|
|
220
|
+
svg.classList.remove('drawing');
|
|
221
|
+
setTimeout(() => input.focus(), 50);
|
|
222
|
+
|
|
223
|
+
let labelFinished = false;
|
|
224
|
+
function finishLabel() {
|
|
225
|
+
if (labelFinished) return;
|
|
226
|
+
labelFinished = true;
|
|
227
|
+
const text = input.value.trim();
|
|
228
|
+
input.remove();
|
|
229
|
+
svg.classList.add('drawing');
|
|
230
|
+
if (!text) return;
|
|
231
|
+
|
|
232
|
+
const g = createLabelGroup(id, p.x, p.y, text);
|
|
233
|
+
svg.appendChild(g);
|
|
234
|
+
annotations.push({ id, type: 'label', x: p.x, y: p.y, text });
|
|
235
|
+
selectEl(g);
|
|
236
|
+
g.addEventListener('mousedown', e => startMove(e, id));
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
input.addEventListener('keydown', e => {
|
|
240
|
+
if (e.key === 'Enter') finishLabel();
|
|
241
|
+
if (e.key === 'Escape') { labelFinished = true; input.remove(); svg.classList.add('drawing'); }
|
|
242
|
+
});
|
|
243
|
+
input.addEventListener('blur', finishLabel);
|
|
244
|
+
}
|
|
245
|
+
});
|
|
246
|
+
|
|
247
|
+
document.addEventListener('mousemove', e => {
|
|
248
|
+
if (!dragState) return;
|
|
249
|
+
const p = getPos(e);
|
|
250
|
+
|
|
251
|
+
if (dragState.type === 'create-rect') {
|
|
252
|
+
const el = dragState.el;
|
|
253
|
+
el.setAttribute('x', Math.min(dragState.sx, p.x));
|
|
254
|
+
el.setAttribute('y', Math.min(dragState.sy, p.y));
|
|
255
|
+
el.setAttribute('width', Math.abs(p.x - dragState.sx));
|
|
256
|
+
el.setAttribute('height', Math.abs(p.y - dragState.sy));
|
|
257
|
+
} else if (dragState.type === 'create-arrow') {
|
|
258
|
+
dragState.el.setAttribute('x2', p.x);
|
|
259
|
+
dragState.el.setAttribute('y2', p.y);
|
|
260
|
+
} else if (dragState.type === 'move') {
|
|
261
|
+
const a = annotations.find(a => a.id === dragState.id);
|
|
262
|
+
if (!a) return;
|
|
263
|
+
const dx = p.x - dragState.lastX;
|
|
264
|
+
const dy = p.y - dragState.lastY;
|
|
265
|
+
dragState.lastX = p.x;
|
|
266
|
+
dragState.lastY = p.y;
|
|
267
|
+
|
|
268
|
+
if (a.type === 'rect') {
|
|
269
|
+
a.x += dx; a.y += dy;
|
|
270
|
+
dragState.el.setAttribute('x', a.x);
|
|
271
|
+
dragState.el.setAttribute('y', a.y);
|
|
272
|
+
} else if (a.type === 'arrow') {
|
|
273
|
+
a.fromX += dx; a.fromY += dy; a.toX += dx; a.toY += dy;
|
|
274
|
+
dragState.el.setAttribute('x1', a.fromX);
|
|
275
|
+
dragState.el.setAttribute('y1', a.fromY);
|
|
276
|
+
dragState.el.setAttribute('x2', a.toX);
|
|
277
|
+
dragState.el.setAttribute('y2', a.toY);
|
|
278
|
+
} else if (a.type === 'label') {
|
|
279
|
+
a.x += dx; a.y += dy;
|
|
280
|
+
const bg = dragState.el.querySelector('rect');
|
|
281
|
+
const txt = dragState.el.querySelector('text');
|
|
282
|
+
bg.setAttribute('x', a.x);
|
|
283
|
+
bg.setAttribute('y', a.y);
|
|
284
|
+
txt.setAttribute('x', a.x + 6);
|
|
285
|
+
txt.setAttribute('y', a.y + 16);
|
|
286
|
+
}
|
|
287
|
+
}
|
|
288
|
+
});
|
|
289
|
+
|
|
290
|
+
document.addEventListener('mouseup', e => {
|
|
291
|
+
if (!dragState) return;
|
|
292
|
+
const p = getPos(e);
|
|
293
|
+
|
|
294
|
+
if (dragState.type === 'create-rect') {
|
|
295
|
+
const w = Math.abs(p.x - dragState.sx);
|
|
296
|
+
const h = Math.abs(p.y - dragState.sy);
|
|
297
|
+
if (w < 5 && h < 5) { dragState.el.remove(); }
|
|
298
|
+
else {
|
|
299
|
+
const a = { id: dragState.id, type: 'rect', x: Math.min(dragState.sx, p.x), y: Math.min(dragState.sy, p.y), width: w, height: h };
|
|
300
|
+
annotations.push(a);
|
|
301
|
+
selectEl(dragState.el);
|
|
302
|
+
dragState.el.addEventListener('mousedown', e => startMove(e, dragState.id));
|
|
303
|
+
}
|
|
304
|
+
} else if (dragState.type === 'create-arrow') {
|
|
305
|
+
const dist = Math.hypot(p.x - dragState.sx, p.y - dragState.sy);
|
|
306
|
+
if (dist < 5) { dragState.el.remove(); }
|
|
307
|
+
else {
|
|
308
|
+
const a = { id: dragState.id, type: 'arrow', fromX: dragState.sx, fromY: dragState.sy, toX: p.x, toY: p.y };
|
|
309
|
+
annotations.push(a);
|
|
310
|
+
selectEl(dragState.el);
|
|
311
|
+
dragState.el.addEventListener('mousedown', e => startMove(e, dragState.id));
|
|
312
|
+
}
|
|
313
|
+
}
|
|
314
|
+
dragState = null;
|
|
315
|
+
});
|
|
316
|
+
|
|
317
|
+
// --- LOAD EXISTING ---
|
|
318
|
+
window.__kagemusha.loadAnnotations = function(decorations) {
|
|
319
|
+
const dpr = window.__kagemusha.dpr || 1;
|
|
320
|
+
decorations.forEach(d => {
|
|
321
|
+
const id = 'a' + nextId++;
|
|
322
|
+
if (d.type === 'rect' && d.target && 'x' in d.target) {
|
|
323
|
+
const rx = d.target.x / dpr, ry = d.target.y / dpr + TOOLBAR_HEIGHT;
|
|
324
|
+
const rw = d.target.width / dpr, rh = d.target.height / dpr;
|
|
325
|
+
const rect = document.createElementNS(svgNS, 'rect');
|
|
326
|
+
rect.setAttribute('x', rx);
|
|
327
|
+
rect.setAttribute('y', ry);
|
|
328
|
+
rect.setAttribute('width', rw);
|
|
329
|
+
rect.setAttribute('height', rh);
|
|
330
|
+
rect.setAttribute('fill', 'none');
|
|
331
|
+
rect.setAttribute('stroke', d.style?.color || '#FF0000');
|
|
332
|
+
rect.setAttribute('stroke-width', '3');
|
|
333
|
+
rect.setAttribute('rx', '4');
|
|
334
|
+
rect.classList.add('annotation');
|
|
335
|
+
rect.dataset.id = id;
|
|
336
|
+
svg.appendChild(rect);
|
|
337
|
+
annotations.push({ id, type: 'rect', x: rx, y: ry, width: rw, height: rh });
|
|
338
|
+
rect.addEventListener('mousedown', e => startMove(e, id));
|
|
339
|
+
} else if (d.type === 'arrow' && d.from && 'x' in d.from) {
|
|
340
|
+
const ax1 = d.from.x / dpr, ay1 = d.from.y / dpr + TOOLBAR_HEIGHT;
|
|
341
|
+
const ax2 = d.to.x / dpr, ay2 = d.to.y / dpr + TOOLBAR_HEIGHT;
|
|
342
|
+
const line = document.createElementNS(svgNS, 'line');
|
|
343
|
+
line.setAttribute('x1', ax1);
|
|
344
|
+
line.setAttribute('y1', ay1);
|
|
345
|
+
line.setAttribute('x2', ax2);
|
|
346
|
+
line.setAttribute('y2', ay2);
|
|
347
|
+
line.setAttribute('stroke', d.style?.color || '#FF0000');
|
|
348
|
+
line.setAttribute('stroke-width', '3');
|
|
349
|
+
line.setAttribute('marker-end', 'url(#kg-arrowhead)');
|
|
350
|
+
line.classList.add('annotation');
|
|
351
|
+
line.dataset.id = id;
|
|
352
|
+
svg.appendChild(line);
|
|
353
|
+
annotations.push({ id, type: 'arrow', fromX: ax1, fromY: ay1, toX: ax2, toY: ay2 });
|
|
354
|
+
line.addEventListener('mousedown', e => startMove(e, id));
|
|
355
|
+
} else if (d.type === 'label' && d.position && 'x' in d.position) {
|
|
356
|
+
const lx = d.position.x / dpr, ly = d.position.y / dpr + TOOLBAR_HEIGHT;
|
|
357
|
+
const fontSize = (d.style?.fontSize || 14) / dpr;
|
|
358
|
+
const g = createLabelGroup(id, lx, ly, d.text, fontSize);
|
|
359
|
+
svg.appendChild(g);
|
|
360
|
+
annotations.push({ id, type: 'label', x: lx, y: ly, text: d.text });
|
|
361
|
+
g.addEventListener('mousedown', e => startMove(e, id));
|
|
362
|
+
}
|
|
363
|
+
});
|
|
364
|
+
};
|
|
365
|
+
|
|
366
|
+
// --- SAVE ---
|
|
367
|
+
function save() {
|
|
368
|
+
const dpr = window.__kagemusha.dpr || 1;
|
|
369
|
+
const s = Math.round;
|
|
370
|
+
const decorations = annotations.map(a => {
|
|
371
|
+
if (a.type === 'rect') {
|
|
372
|
+
return { type: 'rect', target: { x: s(a.x * dpr), y: s((a.y - TOOLBAR_HEIGHT) * dpr), width: s(a.width * dpr), height: s(a.height * dpr) }, style: { color: '#FF0000', strokeWidth: s(3 * dpr) } };
|
|
373
|
+
} else if (a.type === 'arrow') {
|
|
374
|
+
return { type: 'arrow', from: { x: s(a.fromX * dpr), y: s((a.fromY - TOOLBAR_HEIGHT) * dpr) }, to: { x: s(a.toX * dpr), y: s((a.toY - TOOLBAR_HEIGHT) * dpr) }, style: { color: '#FF0000', strokeWidth: s(3 * dpr) } };
|
|
375
|
+
} else if (a.type === 'label') {
|
|
376
|
+
return { type: 'label', text: a.text, position: { x: s(a.x * dpr), y: s((a.y - TOOLBAR_HEIGHT) * dpr) }, style: { fontSize: s(14 * dpr), color: '#FF0000', background: '#FFFFFF' } };
|
|
377
|
+
}
|
|
378
|
+
}).filter(Boolean);
|
|
379
|
+
|
|
380
|
+
window.__kagemusha.saved = decorations;
|
|
381
|
+
document.title = 'KAGEMUSHA_SAVED';
|
|
382
|
+
}
|
|
383
|
+
})();
|
|
384
|
+
`;
|
|
385
|
+
//# sourceMappingURL=inject.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"inject.js","sourceRoot":"","sources":["../../src/editor/inject.ts"],"names":[],"mappings":"AAAA,8EAA8E;AAC9E,qEAAqE;AAErE,MAAM,CAAC,MAAM,aAAa,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6X5B,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
import chalk from "chalk";
|
|
3
3
|
import { Command } from "commander";
|
|
4
4
|
import { captureCommand } from "./commands/capture.js";
|
|
5
|
+
import { editCommand } from "./commands/edit.js";
|
|
5
6
|
import { initCommand } from "./commands/init.js";
|
|
6
|
-
import { previewCommand } from "./commands/preview.js";
|
|
7
7
|
import { runCommand } from "./commands/run.js";
|
|
8
8
|
import { validateCommand } from "./commands/validate.js";
|
|
9
9
|
const BANNER = `
|
|
@@ -35,12 +35,13 @@ program
|
|
|
35
35
|
.description("Capture screenshots only")
|
|
36
36
|
.option("--ids <ids>", "Comma-separated screenshot definition IDs")
|
|
37
37
|
.option("--all", "Capture all definitions")
|
|
38
|
+
.option("--open", "Open screenshots in browser after capture")
|
|
38
39
|
.action(captureCommand);
|
|
39
40
|
program
|
|
40
|
-
.command("
|
|
41
|
-
.description("
|
|
42
|
-
.option("--id <id>", "
|
|
43
|
-
.action(
|
|
41
|
+
.command("edit")
|
|
42
|
+
.description("Open visual annotation editor for a screenshot")
|
|
43
|
+
.option("--id <id>", "Screenshot definition ID to edit")
|
|
44
|
+
.action(editCommand);
|
|
44
45
|
program
|
|
45
46
|
.command("validate")
|
|
46
47
|
.description("Validate config and definition files")
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AACvD,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AACvD,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAEzD,MAAM,MAAM,GAAG;IACX,KAAK,CAAC,IAAI,CAAC,WAAW,CAAC,IAAI,KAAK,CAAC,IAAI,CAAC,QAAQ,CAAC;IAC/C,KAAK,CAAC,GAAG,CAAC,4CAA4C,CAAC;;IAEvD,KAAK,CAAC,KAAK,CAAC,qCAAqC,CAAC;IAClD,KAAK,CAAC,KAAK,CAAC,yBAAyB,CAAC;CACzC,CAAC;A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C;AACnE,CAAC,CAAC,CAAC;AAEJ,OAAO;KACL,OAAO,CAAC,SAAS,CAAC;KAClB,WAAW,CACX,sDAAsD;IACrD,KAAK,CAAC,MAAM,CAAC,eAAe,CAAC,CAC9B;KACA,MAAM,CAAC,GAAG,EAAE;IACZ,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,MAAM,CAAC,sCAAsC,CAAC,CAAC,CAAC;AACnE,CAAC,CAAC,CAAC;AAEJ,OAAO,CAAC,KAAK,EAAE,CAAC"}
|
package/dist/lib/annotate.js
CHANGED
|
@@ -86,7 +86,7 @@ function renderLabel(dec) {
|
|
|
86
86
|
return `
|
|
87
87
|
<rect x="${pos.x - paddingX}" y="${pos.y - textHeight - paddingY}"
|
|
88
88
|
width="${textWidth + paddingX * 2}" height="${textHeight + paddingY * 2}"
|
|
89
|
-
rx="4" ry="4" fill="${bg}"
|
|
89
|
+
rx="4" ry="4" fill="${bg}" />
|
|
90
90
|
<text x="${pos.x}" y="${pos.y}" font-size="${fontSize}"
|
|
91
91
|
fill="${color}" font-family="sans-serif">${escapeXml(dec.text)}</text>
|
|
92
92
|
`;
|
package/dist/lib/annotate.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"annotate.js","sourceRoot":"","sources":["../../src/lib/annotate.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,KAAK,MAAM,OAAO,CAAC;AAO1B,MAAM,CAAC,KAAK,UAAU,mBAAmB,CACxC,WAAmC,EACnC,OAAwB,EACxB,YAAoB;IAEpB,MAAM,gBAAgB,GAAoB,EAAE,CAAC;IAE7C,KAAK,MAAM,MAAM,IAAI,OAAO,EAAE,CAAC;QAC9B,MAAM,GAAG,GAAG,WAAW,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,KAAK,MAAM,CAAC,EAAE,CAAC,CAAC;QAExD,IAAI,CAAC,GAAG,EAAE,WA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