dsh-talk-map 0.1.29 → 0.1.30

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.
Files changed (2) hide show
  1. package/client/client.js +4 -58
  2. package/package.json +1 -1
package/client/client.js CHANGED
@@ -448,7 +448,7 @@ var zh = {
448
448
  "digest.empty": "这条对话还没有摘要,先刷新摘要再来看。",
449
449
  "digest.copy": "复制",
450
450
  "digest.close": "关闭",
451
- "global.searchPlaceholder": "搜地图上的卡片(标题/正文)· v0.1.29",
451
+ "global.searchPlaceholder": "搜地图上的卡片(标题/正文)· v0.1.30",
452
452
  "global.searchRun": "搜索",
453
453
  "global.searchTitle": "搜索地图",
454
454
  "font.group": "文字大小",
@@ -599,7 +599,7 @@ var en = {
599
599
  "menu.noGroup": "Remove from group (free card)",
600
600
  "menu.open": "Open conversation",
601
601
  "menu.markUnread": "Mark as unread",
602
- "global.searchPlaceholder": "Search cards on the map · v0.1.29",
602
+ "global.searchPlaceholder": "Search cards on the map · v0.1.30",
603
603
  "global.searchRun": "Search",
604
604
  "global.searchTitle": "Search the map",
605
605
  "font.group": "Text size",
@@ -12188,50 +12188,6 @@ function roundedPath(points, radius = 10) {
12188
12188
  function round(value) {
12189
12189
  return Math.round(value * 100) / 100;
12190
12190
  }
12191
- function clipToRects(points, rects) {
12192
- if (points.length < 2) return [points];
12193
- const insideAny = (point) => rects.some((rect) => point.x > rect.x + 0.5 && point.x < rect.x + rect.w - 0.5 && point.y > rect.y + 0.5 && point.y < rect.y + rect.h - 0.5);
12194
- const subpaths = [];
12195
- let current = [];
12196
- const flush = () => {
12197
- if (current.length >= 2) subpaths.push(current);
12198
- current = [];
12199
- };
12200
- for (let index2 = 1; index2 < points.length; index2 += 1) {
12201
- const a = points[index2 - 1];
12202
- const b = points[index2];
12203
- const steps = Math.max(2, Math.ceil((Math.abs(b.x - a.x) + Math.abs(b.y - a.y)) / 2));
12204
- for (let step2 = 0; step2 <= steps; step2 += 1) {
12205
- const t2 = step2 / steps;
12206
- const point = { x: a.x + (b.x - a.x) * t2, y: a.y + (b.y - a.y) * t2 };
12207
- if (insideAny(point)) {
12208
- flush();
12209
- } else {
12210
- const last = current[current.length - 1];
12211
- if (last === void 0 || Math.abs(last.x - point.x) > 0.4 || Math.abs(last.y - point.y) > 0.4) {
12212
- current.push(point);
12213
- }
12214
- }
12215
- }
12216
- }
12217
- flush();
12218
- if (subpaths.length === 0) return [points];
12219
- return subpaths.map((subpath) => {
12220
- const rounded = subpath.map((point) => ({ x: Math.round(point.x * 2) / 2, y: Math.round(point.y * 2) / 2 }));
12221
- const out = [];
12222
- for (const point of rounded) {
12223
- const last = out[out.length - 1];
12224
- if (last !== void 0 && last.x === point.x && last.y === point.y) continue;
12225
- const before = out[out.length - 2];
12226
- if (before !== void 0 && last !== void 0 && (before.x === last.x && last.x === point.x || before.y === last.y && last.y === point.y)) {
12227
- out[out.length - 1] = point;
12228
- continue;
12229
- }
12230
- out.push(point);
12231
- }
12232
- return out;
12233
- }).filter((subpath) => subpath.length >= 2);
12234
- }
12235
12191
 
12236
12192
  // src/client/TalkMapEdge.tsx
12237
12193
  var import_jsx_runtime8 = require("react/jsx-runtime");
@@ -12335,18 +12291,8 @@ function TalkMapEdge(props) {
12335
12291
  targetY: props.targetY,
12336
12292
  targetPosition: props.targetPosition
12337
12293
  });
12338
- const safeRoute = routed && !blockedRoute ? route : void 0;
12339
- const stubPath = (() => {
12340
- const normal = (face) => face === "r" ? { x: 1, y: 0 } : face === "l" ? { x: -1, y: 0 } : face === "t" ? { x: 0, y: -1 } : { x: 0, y: 1 };
12341
- const length = 16;
12342
- const a = normal(faceOf(props.sourcePosition));
12343
- const b = normal(faceOf(props.targetPosition));
12344
- const p1 = { x: props.sourceX + a.x * length, y: props.sourceY + a.y * length };
12345
- const p2 = { x: props.targetX + b.x * length, y: props.targetY + b.y * length };
12346
- return `M ${props.sourceX} ${props.sourceY} L ${p1.x} ${p1.y} M ${props.targetX} ${props.targetY} L ${p2.x} ${p2.y}`;
12347
- })();
12348
- const endpointBoxes = [data.fromRect, data.toRect].filter((box) => box !== void 0);
12349
- const path = safeRoute !== void 0 ? endpointBoxes.length === 0 ? roundedPath(safeRoute, 10) : clipToRects(safeRoute, endpointBoxes).map((subpath) => roundedPath(subpath, 10)).join(" ") : blockedRoute ? stubPath : smoothPath;
12294
+ const safeRoute = routed ? route : void 0;
12295
+ const path = safeRoute !== void 0 ? roundedPath(safeRoute, 10) : smoothPath;
12350
12296
  const arrowAngle = (() => {
12351
12297
  if (routed) {
12352
12298
  const end = route[route.length - 1];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-talk-map",
3
- "version": "0.1.29",
3
+ "version": "0.1.30",
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",