dsh-talk-map 0.1.39 → 0.1.42
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/client/client.js +22 -3
- package/package.json +1 -1
package/client/client.js
CHANGED
|
@@ -13103,6 +13103,10 @@ function StackDrawer(props) {
|
|
|
13103
13103
|
cardsInDrawer.map((card) => ({ id: card.id, x: card.x, y: card.y })),
|
|
13104
13104
|
{ cardWidth: fromRect.w, cardHeight: fromRect.h }
|
|
13105
13105
|
);
|
|
13106
|
+
const contentWidth = scroller.scrollWidth;
|
|
13107
|
+
const contentHeight = scroller.scrollHeight;
|
|
13108
|
+
const boundsWidth = scroller.scrollWidth;
|
|
13109
|
+
const boundsHeight = scroller.scrollHeight;
|
|
13106
13110
|
const dirty = (candidate) => {
|
|
13107
13111
|
let hits2 = 0;
|
|
13108
13112
|
for (let index2 = 1; index2 < candidate.length; index2 += 1) {
|
|
@@ -13115,6 +13119,7 @@ function StackDrawer(props) {
|
|
|
13115
13119
|
for (const box of obstacles) {
|
|
13116
13120
|
if (point.x > box.x + 1 && point.x < box.x + box.w - 1 && point.y > box.y + 1 && point.y < box.y + box.h - 1) hits2 += 1;
|
|
13117
13121
|
}
|
|
13122
|
+
if (point.x < 2 || point.y < 2 || point.x > boundsWidth - 2 || point.y > boundsHeight - 2) hits2 += 1;
|
|
13118
13123
|
}
|
|
13119
13124
|
}
|
|
13120
13125
|
return hits2;
|
|
@@ -13165,12 +13170,26 @@ function StackDrawer(props) {
|
|
|
13165
13170
|
measure();
|
|
13166
13171
|
});
|
|
13167
13172
|
observer.observe(scroller);
|
|
13168
|
-
|
|
13173
|
+
let signature = "";
|
|
13174
|
+
let stableFrames = 0;
|
|
13175
|
+
let frame2 = 0;
|
|
13176
|
+
const tick = () => {
|
|
13169
13177
|
measure();
|
|
13170
|
-
|
|
13178
|
+
const next = [...scroller.querySelectorAll("[data-card-id]")].map((element) => {
|
|
13179
|
+
const r = element.getBoundingClientRect();
|
|
13180
|
+
return `${Math.round(r.left)},${Math.round(r.top)},${Math.round(r.width)},${Math.round(r.height)}`;
|
|
13181
|
+
}).join("|");
|
|
13182
|
+
stableFrames = next === signature ? stableFrames + 1 : 0;
|
|
13183
|
+
signature = next;
|
|
13184
|
+
frame2 += 1;
|
|
13185
|
+
if (stableFrames < 3 || frame2 < 12) {
|
|
13186
|
+
raf = window.requestAnimationFrame(tick);
|
|
13187
|
+
}
|
|
13188
|
+
};
|
|
13189
|
+
let raf = window.requestAnimationFrame(tick);
|
|
13171
13190
|
return () => {
|
|
13172
13191
|
observer.disconnect();
|
|
13173
|
-
|
|
13192
|
+
window.cancelAnimationFrame(raf);
|
|
13174
13193
|
};
|
|
13175
13194
|
}, [props.links, props.items, query, visibleItems.length]);
|
|
13176
13195
|
(0, import_react10.useEffect)(() => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-talk-map",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.42",
|
|
4
4
|
"description": "Visual conversation map for DeepSeek Harness: an infinite whiteboard where every session is a card — drag to arrange, double-click to start a chat in place, draw an edge to fork a new session with injected context. Built for ADHD-friendly spatial memory. · DSH 可视化对话地图:会话即卡片,双击即聊,连线分叉带上下文的新对话。",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "lib/index.js",
|