dsh-talk-map 0.1.35 → 0.1.36
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 +15 -11
- package/package.json +1 -1
package/client/client.js
CHANGED
|
@@ -13808,13 +13808,17 @@ function CanvasInner(props) {
|
|
|
13808
13808
|
(0, import_react12.useEffect)(() => {
|
|
13809
13809
|
if (canvasState.phase !== "ready") return;
|
|
13810
13810
|
if (draggingCardId !== null || liveFrame !== null) return;
|
|
13811
|
-
const
|
|
13812
|
-
|
|
13813
|
-
const
|
|
13814
|
-
|
|
13815
|
-
|
|
13816
|
-
|
|
13817
|
-
|
|
13811
|
+
const timer4 = window.setTimeout(() => {
|
|
13812
|
+
const stale = {};
|
|
13813
|
+
for (const [cardId, point] of Object.entries(cardLayout)) {
|
|
13814
|
+
const card = canvasState.cards[cardId];
|
|
13815
|
+
if (card === void 0) continue;
|
|
13816
|
+
if (!Number.isFinite(point.x) || !Number.isFinite(point.y)) continue;
|
|
13817
|
+
if (Math.abs(card.x - point.x) > 0.5 || Math.abs(card.y - point.y) > 0.5) stale[cardId] = point;
|
|
13818
|
+
}
|
|
13819
|
+
if (Object.keys(stale).length > 0) canvas.moveCards(stale);
|
|
13820
|
+
}, 140);
|
|
13821
|
+
return () => window.clearTimeout(timer4);
|
|
13818
13822
|
}, [cardLayout, canvasState.cards, canvasState.phase, draggingCardId, liveFrame]);
|
|
13819
13823
|
const foldedSet = (0, import_react12.useMemo)(() => new Set(Object.values(foldedCards).flat()), [foldedCards]);
|
|
13820
13824
|
(0, import_react12.useEffect)(() => {
|
|
@@ -14224,17 +14228,17 @@ function CanvasInner(props) {
|
|
|
14224
14228
|
const out = {};
|
|
14225
14229
|
for (const node of liveNodes) {
|
|
14226
14230
|
if (node.type !== "sessionCard" || node.hidden === true) continue;
|
|
14227
|
-
const sessionId = canvasState.cards[node.id]?.sessionId;
|
|
14228
|
-
const element = sessionId === void 0 ? null : document.querySelector(`[data-talkmap-session="${sessionId}"]`);
|
|
14229
14231
|
out[node.id] = {
|
|
14230
14232
|
x: node.position.x,
|
|
14231
14233
|
y: node.position.y,
|
|
14232
|
-
w:
|
|
14233
|
-
h:
|
|
14234
|
+
w: CARD_PAINTED_W,
|
|
14235
|
+
h: CARD_PAINTED_H
|
|
14234
14236
|
};
|
|
14235
14237
|
}
|
|
14236
14238
|
return out;
|
|
14237
14239
|
};
|
|
14240
|
+
const CARD_PAINTED_W = 250;
|
|
14241
|
+
const CARD_PAINTED_H = 129;
|
|
14238
14242
|
const [boardTick, setBoardTick] = (0, import_react12.useState)(0);
|
|
14239
14243
|
(0, import_react12.useEffect)(() => {
|
|
14240
14244
|
const timer4 = window.setTimeout(() => setBoardTick((value) => value + 1), 150);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-talk-map",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.36",
|
|
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",
|