dsh-talk-map 0.1.42 → 0.1.44
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 +1 -35
- package/package.json +1 -1
package/client/client.js
CHANGED
|
@@ -10783,27 +10783,6 @@ function lineageSyncState(input) {
|
|
|
10783
10783
|
|
|
10784
10784
|
// src/client/edge-routing.ts
|
|
10785
10785
|
var DEFAULT_MIN_SPAN = 96;
|
|
10786
|
-
function overlapsSpan(a, b, tolerance) {
|
|
10787
|
-
return Math.abs(a - b) < tolerance;
|
|
10788
|
-
}
|
|
10789
|
-
function blockedToward(card, side, obstacles, size) {
|
|
10790
|
-
const vertical = side === "b" || side === "t";
|
|
10791
|
-
for (const other of obstacles) {
|
|
10792
|
-
if (other.id === card.id) continue;
|
|
10793
|
-
const dx = other.x - card.x;
|
|
10794
|
-
const dy = other.y - card.y;
|
|
10795
|
-
if (vertical) {
|
|
10796
|
-
if (!overlapsSpan(dx, 0, size.width * 0.9)) continue;
|
|
10797
|
-
if (side === "b" && dy > 0 && dy < size.height * 1.15) return true;
|
|
10798
|
-
if (side === "t" && dy < 0 && -dy < size.height * 1.15) return true;
|
|
10799
|
-
} else {
|
|
10800
|
-
if (!overlapsSpan(dy, 0, size.height * 0.9)) continue;
|
|
10801
|
-
if (side === "r" && dx > 0 && dx < size.width * 1.15) return true;
|
|
10802
|
-
if (side === "l" && dx < 0 && -dx < size.width * 1.15) return true;
|
|
10803
|
-
}
|
|
10804
|
-
}
|
|
10805
|
-
return false;
|
|
10806
|
-
}
|
|
10807
10786
|
function pickFaces(from, to, obstacles, options) {
|
|
10808
10787
|
const minSpan = options.minSpan ?? DEFAULT_MIN_SPAN;
|
|
10809
10788
|
const size = { width: options.cardWidth, height: options.cardHeight };
|
|
@@ -10812,20 +10791,7 @@ function pickFaces(from, to, obstacles, options) {
|
|
|
10812
10791
|
const gapX = Math.abs(dx) - options.cardWidth;
|
|
10813
10792
|
const gapY = Math.abs(dy) - options.cardHeight;
|
|
10814
10793
|
const horizontalDominant = Math.abs(dx) >= Math.abs(dy);
|
|
10815
|
-
|
|
10816
|
-
if (gapX >= minSpan) {
|
|
10817
|
-
return dx >= 0 ? { fromHandle: "r", toHandle: "l" } : { fromHandle: "l", toHandle: "r" };
|
|
10818
|
-
}
|
|
10819
|
-
const fromSide2 = blockedToward(from, "b", obstacles, size) && !blockedToward(from, "t", obstacles, size) ? "t" : "b";
|
|
10820
|
-
const toSide2 = blockedToward(to, "b", obstacles, size) && !blockedToward(to, "t", obstacles, size) ? "t" : "b";
|
|
10821
|
-
return { fromHandle: fromSide2, toHandle: toSide2 };
|
|
10822
|
-
}
|
|
10823
|
-
if (gapY >= minSpan) {
|
|
10824
|
-
return dy >= 0 ? { fromHandle: "b", toHandle: "t" } : { fromHandle: "t", toHandle: "b" };
|
|
10825
|
-
}
|
|
10826
|
-
const fromSide = blockedToward(from, "r", obstacles, size) && !blockedToward(from, "l", obstacles, size) ? "l" : "r";
|
|
10827
|
-
const toSide = blockedToward(to, "r", obstacles, size) && !blockedToward(to, "l", obstacles, size) ? "l" : "r";
|
|
10828
|
-
return { fromHandle: fromSide, toHandle: toSide };
|
|
10794
|
+
return horizontalDominant ? dx >= 0 ? { fromHandle: "r", toHandle: "l" } : { fromHandle: "l", toHandle: "r" } : dy >= 0 ? { fromHandle: "b", toHandle: "t" } : { fromHandle: "t", toHandle: "b" };
|
|
10829
10795
|
}
|
|
10830
10796
|
|
|
10831
10797
|
// src/client/push-log.ts
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-talk-map",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.44",
|
|
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",
|