stitch2 0.22.10 → 0.22.11
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/canvas.html +14 -0
- package/package.json +1 -1
- package/skills/stitch2/SKILL.md +3 -0
package/dist/canvas.html
CHANGED
|
@@ -385,6 +385,15 @@ const rows = () => {
|
|
|
385
385
|
|
|
386
386
|
// Screens flow left to right and wrap, like a design canvas; each screen's versions stay together.
|
|
387
387
|
function layout() {
|
|
388
|
+
// Late page/thumbnail heights move later rows. Keep the frame being reviewed
|
|
389
|
+
// at its current screen position, not at a fresh zoomTo position. A frame the
|
|
390
|
+
// user has panned away from, or an active drag, must not pull the camera back.
|
|
391
|
+
const anchor = (() => {
|
|
392
|
+
if (!selected || selected.el.style.display === 'none' || viewport.classList.contains('panning')) return null
|
|
393
|
+
const a = selected.el.getBoundingClientRect(), b = viewport.getBoundingClientRect()
|
|
394
|
+
if (a.right <= b.left || a.left >= b.right || a.bottom <= b.top || a.top >= b.bottom) return null
|
|
395
|
+
return { frame: selected, x: parseFloat(selected.el.style.left), y: parseFloat(selected.el.style.top) }
|
|
396
|
+
})()
|
|
388
397
|
for (const n of world.querySelectorAll('.row-label')) n.remove()
|
|
389
398
|
let x = 0, y = 0, lineH = 0, page = ''
|
|
390
399
|
const all = rows()
|
|
@@ -435,6 +444,11 @@ function layout() {
|
|
|
435
444
|
}
|
|
436
445
|
tree()
|
|
437
446
|
sendFilter()
|
|
447
|
+
if (anchor && selected === anchor.frame && selected.el.style.display !== 'none') {
|
|
448
|
+
const dx = (anchor.x - parseFloat(selected.el.style.left)) * view.z
|
|
449
|
+
const dy = (anchor.y - parseFloat(selected.el.style.top)) * view.z
|
|
450
|
+
if (dx || dy) { view.x += dx; view.y += dy; apply(); return }
|
|
451
|
+
}
|
|
438
452
|
scheduleSync()
|
|
439
453
|
}
|
|
440
454
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "stitch2",
|
|
3
|
-
"version": "0.22.
|
|
3
|
+
"version": "0.22.11",
|
|
4
4
|
"description": "A design canvas, layout and type checks, component consistency and screen versioning for agent-built UI, on Google's DESIGN.md format.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "ifokeev",
|
package/skills/stitch2/SKILL.md
CHANGED
|
@@ -90,6 +90,9 @@ References, read before the first screen:
|
|
|
90
90
|
States sheet (components.md, States).
|
|
91
91
|
6. **Look and critique.** View the render in `<design>/renders/` (crop the first screenful). Score it with the
|
|
92
92
|
rubric in principles.md, fix what fails, repeat 5–6 at most three times.
|
|
93
|
+
On the canvas, select a later row and zoom out and back while earlier pages/thumbnails load. The selected
|
|
94
|
+
visible frame keeps its screen position when row heights settle; this does not recenter a frame you pan
|
|
95
|
+
away from or interrupt a drag. Check the live canvas as well as the saved render before hand-over.
|
|
93
96
|
7. **Hand over.** Set the version's status to `review`, point the user to it on the canvas, and report what
|
|
94
97
|
changed, how you answered their notes, and any rubric item you could not satisfy. The page's empty and loading
|
|
95
98
|
screens go to review with it; for a page without them (a form, a static page), say why. The user approves; only then
|