@skillre/dsh-plugin-sticky-wall 0.9.2 → 0.9.3
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.en.md +2 -2
- package/README.md +2 -2
- package/compatibility.json +5 -4
- package/lib/client.js +8 -21
- package/package.json +1 -1
package/README.en.md
CHANGED
|
@@ -25,7 +25,7 @@ Non-goals: task management (no scheduling, assignment or reminders), collaborati
|
|
|
25
25
|
- **Three views** — canvas (default, free placement), grid (responsive masonry for reading long notes) and list (one line per note for finding one by title).
|
|
26
26
|
- **Full-window canvas** — the wall fills the entire window: no title row and no toolbar row. Every control lives in one **floating dock** at the bottom.
|
|
27
27
|
- **A compact dock** — only the frequent actions stay in the strip: search, filters, three **icon** view buttons, zoom (`− / percent / +`, where the percentage is itself the reset button), tidy and new. Sort, show-archived and clear-archive moved into a `⋯` overflow menu. The dock is a **single row**, centred, and sizes to the window, so no button spills past the strip it is drawn on.
|
|
28
|
-
- **Camera** — drag empty paper to pan, scroll to pan, `⌘/Ctrl + wheel` to zoom around the pointer (0.35×–2×). Opening the wall and pressing reset both frame the whole wall and centre it.
|
|
28
|
+
- **Camera** — drag empty paper to pan, scroll to pan, `⌘/Ctrl + wheel` to zoom around the pointer (0.35×–2×). Opening the wall and pressing reset both frame the whole wall and centre it. The greeting and the capture field are **page chrome**: they keep their natural size at every zoom level instead of shrinking with the canvas.
|
|
29
29
|
- **Markdown bodies** — headings, paragraphs, bold/italic/strikethrough, `code`, code blocks, ordered and unordered lists, `- [ ]` checkboxes, quotes, rules, tables and http(s)/mailto links. The composer has a "Preview" toggle.
|
|
30
30
|
- **Quick capture** — "New" opens a note sheet with an optional title, required body, tags, six pastel colors and a width preset. The sheet starts out large (880×680, still centred on its scrim) and carries a grip in its bottom-right corner: drag it to resize with the pointer, or focus it and use the arrow keys — left/right change the width, up/down the height, `Shift` plus an arrow takes a bigger step, `0` restores the default, and double-clicking the grip resets it too. A size is clamped to stay inside the window with a 24px margin and never goes below 460×380. The size you choose is remembered on this machine and restored next time, and it is **that size** that is remembered: open the wall in a small window and the sheet shrinks to fit, then returns to what you actually picked once the window grows back. The body editor and the preview both fill the sheet instead of each carrying its own height cap.
|
|
31
31
|
- **Pin and archive** — pinned notes carry a coloured left rail and a star; archived notes hide by default, the "Archive" filter fetches them on its own, and "Clear archive" is a permanent delete.
|
|
@@ -160,7 +160,7 @@ The install path was verified end to end: derive the spec from the live index, i
|
|
|
160
160
|
- Card width has only **three presets** (small/medium/large); there is no arbitrary resize. A drag keeps the card's existing tilt. This is about a **card on the canvas** — the only thing you can size freely is the note sheet.
|
|
161
161
|
- Tidy is O(n) spiral placement plus a spatial-grid collision check; the wall holds at most 400 notes, and a wall larger than the viewport needs panning or zooming out.
|
|
162
162
|
- The canvas is a flat plane: no grouping, layers, connectors or snap alignment, and no rotation gesture beyond the stored tilt.
|
|
163
|
-
- Auto-framing has a legibility floor (42%): a large wall is centred rather than crammed entirely into view, so panning is expected. The middle is reserved space — tidy never places a card under the greeting or the capture field, and a capture on a panned or zoomed wall avoids wherever the field currently sits.
|
|
163
|
+
- Auto-framing has a legibility floor (42%): a large wall is centred rather than crammed entirely into view, so panning is expected. The middle is reserved space — tidy never places a card under the greeting or the capture field, and a capture on a panned or zoomed wall avoids wherever the field currently sits. The greeting and the capture field are **page chrome**, so they keep a fixed size instead of scaling with the canvas; at a deep zoom-out a card can therefore pass beneath them, which is normal overlay behaviour rather than a layering bug.
|
|
164
164
|
- Placement is owned by the Host, but two windows open on the same wall each render their own snapshot and do not live-push the other's drags — they do refetch on focus and on the slow poll, so neither stays stale for long.
|
|
165
165
|
- Archived notes do not occupy a `maxNotes` slot, but restoring them does; a restore at the cap is rejected instead of silently overshooting.
|
|
166
166
|
- "Clear archive" is a permanent, irreversible delete.
|
package/README.md
CHANGED
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
- **三种视图**:画布(默认,自由摆位)、网格(响应式瀑布流,适合读长文)、列表(一行一条,适合按标题找)。
|
|
26
26
|
- **全幅画布**:便签墙占满整个窗口,没有顶部标题栏和工具栏;所有控件收进底部一条**浮动菜单栏**。
|
|
27
27
|
- **紧凑菜单栏**:底部只留高频动作 —— 搜索、筛选、三个**图标**视图切换、缩放(`− / 百分比 / +`,百分比本身可点即重置)、整理、新建。排序、显示归档、清空归档收进 `⋯` 溢出菜单。菜单栏是**单行**、居中、宽度自适应窗口,任何按钮都不会溢出背景条。
|
|
28
|
-
- **相机**:拖动空白纸面平移,滚轮平移,`⌘/Ctrl + 滚轮` 以指针为锚点缩放(0.35×–2
|
|
28
|
+
- **相机**:拖动空白纸面平移,滚轮平移,`⌘/Ctrl + 滚轮` 以指针为锚点缩放(0.35×–2×);打开与重置时自动把整面墙框进视野。中间的问候语与记录框是**页面控件**,任何缩放级别下都保持原始大小,不会跟着画布一起缩小。
|
|
29
29
|
- **Markdown 正文**:正文按 Markdown 渲染 —— 标题、段落、粗体/斜体/删除线、`代码`、代码块、有序/无序列表、`- [ ]` 复选、引用、分隔线、表格、http(s)/mailto 链接。编辑时右侧有「预览」切换。
|
|
30
30
|
- **随手记录**:`+ 新建` 打开便签纸,标题可选、正文必填,可打标签、选六种柔和底色、选卡片宽度。便签纸默认就很大(880×680,仍然在遮罩里居中),右下角有一个握把:拖它用指针改尺寸,聚焦后方向键也能改 —— 左右改宽、上下改高,`Shift + 方向键` 一次走更大的步长,`0` 恢复默认,双击握把同样恢复默认。尺寸被限制在「始终待在窗口内、四周留 24px」与 460×380 的下限之间。选好的尺寸记在本机、下次打开照旧,而且记的是**你选的那个尺寸本身**:小窗口里打开会先缩到装得下,窗口放大后回到你真正选过的尺寸。正文编辑器与预览都撑满整张便签纸,不再各自带一个高度上限。
|
|
31
31
|
- **置顶与归档**:置顶的便签带左侧色条与星标;归档的便签默认隐藏,「归档」筛选会单独拉取它们,「清空归档」是永久删除。
|
|
@@ -171,7 +171,7 @@ node scripts/preview.mjs check # 离线校验预览图与 locale 元数据(n
|
|
|
171
171
|
- 卡片宽度只有小/中/大**三档预设**,不支持任意拖拽调整宽度;拖动会保留卡片原有的轻微倾角。这一条说的是**画布上的卡片**,大小可调的只有随手记录的便签纸。
|
|
172
172
|
- 整理是 O(n) 的螺旋放置 + 网格碰撞检测;便签上限 400 张,超出视野的墙需要自己平移或缩小。
|
|
173
173
|
- 画布是二维平面:没有分组、图层、连线或吸附对齐;也不支持双指旋转或触屏捏合之外的手势。
|
|
174
|
-
- 自动取景有可读性下限(42
|
|
174
|
+
- 自动取景有可读性下限(42%):便签很多时整面墙不会全部挤进视野,而是居中显示、需要平移查看。整理不会把卡片放在问候语和记录框下面;平移到别处再新建时,落点也会避开记录框当前所在的位置。中间的问候语和记录框是**页面控件**,缩放时保持固定大小、不跟随画布放大缩小;因此缩得很小时,卡片可能从它下面经过 —— 这是浮层的正常行为,不是遮挡错误。
|
|
175
175
|
- 便签的位置由 Host 保存;同一面墙在两个窗口同时打开时,各自渲染自己的快照,不会实时推送另一个窗口的拖动结果 —— 但窗口重新获得焦点/重新可见时会重新拉取,所以不会长期停在旧状态。
|
|
176
176
|
- 归档便签不占 `maxNotes` 名额,但恢复它们会占名额;名额已满时恢复会被拒绝而不是悄悄超限。
|
|
177
177
|
- 「清空归档」是永久删除,不可撤销。
|
package/compatibility.json
CHANGED
|
@@ -73,6 +73,7 @@
|
|
|
73
73
|
"browser-canvas-centrepiece-is-at-the-middle",
|
|
74
74
|
"browser-canvas-tidy-keeps-the-centre-clear",
|
|
75
75
|
"browser-canvas-centrepiece-stays-put-while-panning",
|
|
76
|
+
"browser-canvas-centrepiece-keeps-its-size-while-zooming",
|
|
76
77
|
"browser-centre-capture-creates-a-note",
|
|
77
78
|
"browser-centre-capture-lands-visible-and-clear-of-the-field",
|
|
78
79
|
"browser-no-card-covers-the-centrepiece",
|
|
@@ -88,11 +89,11 @@
|
|
|
88
89
|
"browser-no-uncaught-errors"
|
|
89
90
|
],
|
|
90
91
|
"evidence": {
|
|
91
|
-
"isolatedMount": "docs/evidence/isolated-mount-0.9.
|
|
92
|
+
"isolatedMount": "docs/evidence/isolated-mount-0.9.3.json",
|
|
92
93
|
"uiVerification": "docs/evidence/ui-verification.json",
|
|
93
|
-
"tarballSha256": "
|
|
94
|
+
"tarballSha256": "0a686ef456ef624e67e8454c8013b14b44340eb54b1128817d0cca639e6d2d30"
|
|
94
95
|
},
|
|
95
|
-
"notes": "Verified for the 0.9.
|
|
96
|
+
"notes": "Verified for the 0.9.3 fixed-centrepiece release against DSH 0.2.2-rc.5. The mount run installs the packed tarball into an owned disposable profile, composes it, boots a bounded startup and exercises the Connection API; the UI run drives the real DSH Web app over CDP (56/56). Release-specific check: the centrepiece keeps its painted size at 35%, 75% and 125% camera zoom while the world transform actually changes, so page chrome no longer shrinks with the canvas."
|
|
96
97
|
},
|
|
97
98
|
{
|
|
98
99
|
"dsh": "0.2.2-rc.3",
|
|
@@ -535,4 +536,4 @@
|
|
|
535
536
|
"pendingDetail": "Verified in the standalone DSH Web application. The Desktop Client (Electron) was not exercised: its profile is managed by the application and cannot be driven by this CLI-based harness. A Desktop-targeted release must repeat the visual check there."
|
|
536
537
|
}
|
|
537
538
|
]
|
|
538
|
-
}
|
|
539
|
+
}
|
package/lib/client.js
CHANGED
|
@@ -3284,7 +3284,7 @@ window.__ModuleLoader__.load({
|
|
|
3284
3284
|
}
|
|
3285
3285
|
async function tidyWall() {
|
|
3286
3286
|
const ran = await mutate(async () => {
|
|
3287
|
-
await api.arrange(life.current.signal, { centreReserve:
|
|
3287
|
+
await api.arrange(life.current.signal, { centreReserve: CENTRE_RESERVE });
|
|
3288
3288
|
});
|
|
3289
3289
|
if (!ran) return;
|
|
3290
3290
|
await new Promise((resolve) => {
|
|
@@ -3392,10 +3392,7 @@ window.__ModuleLoader__.load({
|
|
|
3392
3392
|
const viewport = viewportRefCurrent.current;
|
|
3393
3393
|
if (world !== null) world.style.transform = `translate3d(${current.panX}px, ${current.panY}px, 0) scale(${current.zoom})`;
|
|
3394
3394
|
const centre = centreRef.current;
|
|
3395
|
-
if (centre !== null)
|
|
3396
|
-
const scale = Math.min(1, current.zoom);
|
|
3397
|
-
centre.style.transform = `translate(-50%, -50%) scale(${scale})`;
|
|
3398
|
-
}
|
|
3395
|
+
if (centre !== null) centre.style.transform = "translate(-50%, -50%)";
|
|
3399
3396
|
if (viewport !== null) {
|
|
3400
3397
|
viewport.style.backgroundSize = `${DOT_PITCH * current.zoom}px ${DOT_PITCH * current.zoom}px`;
|
|
3401
3398
|
viewport.style.backgroundPosition = `${current.panX}px ${current.panY}px`;
|
|
@@ -3560,33 +3557,24 @@ window.__ModuleLoader__.load({
|
|
|
3560
3557
|
const blockRect = centre === null ? null : centre.getBoundingClientRect();
|
|
3561
3558
|
const fieldX = blockRect === null ? width / 2 : blockRect.left + blockRect.width / 2 - view2.left;
|
|
3562
3559
|
const fieldY = blockRect === null ? height / 2 : blockRect.top + blockRect.height / 2 - view2.top;
|
|
3563
|
-
const
|
|
3564
|
-
const
|
|
3565
|
-
|
|
3566
|
-
// footprint stays fixed; taking the larger of the two keeps the card clear
|
|
3567
|
-
// of whichever is actually on screen.
|
|
3568
|
-
halfW: reserve.halfWidth * Math.max(1, zoom2),
|
|
3569
|
-
halfH: reserve.halfHeight * Math.max(1, zoom2)
|
|
3570
|
-
});
|
|
3560
|
+
const measured = blockRect !== null && blockRect.width > 0 && blockRect.height > 0;
|
|
3561
|
+
const halfW = measured ? blockRect.width / 2 : CENTRE_RESERVE.halfWidth * camera.current.zoom;
|
|
3562
|
+
const halfH = measured ? blockRect.height / 2 : CENTRE_RESERVE.halfHeight * camera.current.zoom;
|
|
3571
3563
|
const cardX = box.x + box.width / 2;
|
|
3572
3564
|
const cardY = box.y + box.height / 2;
|
|
3573
3565
|
const screenX = cardX * camera.current.zoom + camera.current.panX;
|
|
3574
3566
|
const screenY = cardY * camera.current.zoom + camera.current.panY;
|
|
3575
3567
|
const fitsAt = (x, y2, zoom2) => x - box.width * zoom2 / 2 >= margin && x + box.width * zoom2 / 2 <= width - margin && y2 - box.height * zoom2 / 2 >= margin && y2 + box.height * zoom2 / 2 <= usableBottom;
|
|
3576
|
-
const hiddenAt = (x, y2, zoom2) =>
|
|
3577
|
-
const { halfW, halfH: halfH2 } = blockHalf(zoom2);
|
|
3578
|
-
return x - box.width * zoom2 / 2 < fieldX + halfW && x + box.width * zoom2 / 2 > fieldX - halfW && y2 - box.height * zoom2 / 2 < fieldY + halfH2 && y2 + box.height * zoom2 / 2 > fieldY - halfH2;
|
|
3579
|
-
};
|
|
3568
|
+
const hiddenAt = (x, y2, zoom2) => x - box.width * zoom2 / 2 < fieldX + halfW && x + box.width * zoom2 / 2 > fieldX - halfW && y2 - box.height * zoom2 / 2 < fieldY + halfH && y2 + box.height * zoom2 / 2 > fieldY - halfH;
|
|
3580
3569
|
if (fitsAt(screenX, screenY, camera.current.zoom) && !hiddenAt(screenX, screenY, camera.current.zoom)) return;
|
|
3581
3570
|
const gap = 26;
|
|
3582
3571
|
for (let step = 0; step <= 8; step += 1) {
|
|
3583
3572
|
const zoom2 = step === 0 ? camera.current.zoom : Math.max(ZOOM_MIN, camera.current.zoom * 0.88 ** step);
|
|
3584
|
-
const { halfW, halfH: halfH2 } = blockHalf(zoom2);
|
|
3585
3573
|
const halfCardW = box.width * zoom2 / 2;
|
|
3586
3574
|
const halfCardH = box.height * zoom2 / 2;
|
|
3587
3575
|
const candidates = [
|
|
3588
|
-
{ x: fieldX, y: fieldY -
|
|
3589
|
-
{ x: fieldX, y: fieldY +
|
|
3576
|
+
{ x: fieldX, y: fieldY - halfH - gap - halfCardH },
|
|
3577
|
+
{ x: fieldX, y: fieldY + halfH + gap + halfCardH },
|
|
3590
3578
|
{ x: fieldX - halfW - gap - halfCardW, y: fieldY },
|
|
3591
3579
|
{ x: fieldX + halfW + gap + halfCardW, y: fieldY }
|
|
3592
3580
|
];
|
|
@@ -3608,7 +3596,6 @@ window.__ModuleLoader__.load({
|
|
|
3608
3596
|
(width - margin * 2) / Math.max(1, box.width),
|
|
3609
3597
|
(usableBottom - margin) / Math.max(1, box.height)
|
|
3610
3598
|
));
|
|
3611
|
-
const { halfH } = blockHalf(targetZoom);
|
|
3612
3599
|
const y = fieldY + halfH + gap + box.height * targetZoom / 2;
|
|
3613
3600
|
glideCameraTo(targetZoom, width / 2 - cardX * targetZoom, y - cardY * targetZoom);
|
|
3614
3601
|
}, [glideCameraTo]);
|