ez-dsh-memo 0.1.7 → 0.1.8

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.js +9 -1
  2. package/package.json +1 -1
package/client.js CHANGED
@@ -3964,6 +3964,11 @@ window.__ModuleLoader__.load({
3964
3964
  }
3965
3965
  return;
3966
3966
  }
3967
+ // 只在“看”的状态下用左右键切换便签;编辑中/输入框聚焦时一律放行
3968
+ if (draft !== null) return;
3969
+ const node = event.target;
3970
+ const tag = node && node.tagName ? String(node.tagName).toUpperCase() : '';
3971
+ if (tag === 'INPUT' || tag === 'TEXTAREA' || (node && node.isContentEditable)) return;
3967
3972
  if (event.key === 'ArrowLeft' && props.onPrev) {
3968
3973
  event.preventDefault();
3969
3974
  props.onPrev();
@@ -5560,12 +5565,15 @@ window.__ModuleLoader__.load({
5560
5565
 
5561
5566
  /** 打开一张便签的浮窗(叠一层,不关掉原来的窗口)。 */
5562
5567
  const openView = useCallback((id) => {
5568
+ // 只接受真实存在的便签 id:DSH 自身的键盘处理会传会话/消息 id 进来,
5569
+ // 之前会因此莫名弹出空白查看窗(输入全角【】即可复现)。
5570
+ if (!notes.some((item) => item.id === id)) return;
5563
5571
  setViewers((current) => {
5564
5572
  const others = current.filter((item) => item.id !== id);
5565
5573
  const step = others.length * 26;
5566
5574
  return others.concat([{ id, x: 48 + step, y: 40 + step }]);
5567
5575
  });
5568
- }, []);
5576
+ }, [notes]);
5569
5577
  const closeView = useCallback(() => {
5570
5578
  setViewers((current) => current.slice(0, -1));
5571
5579
  }, []);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ez-dsh-memo",
3
- "version": "0.1.7",
3
+ "version": "0.1.8",
4
4
  "type": "module",
5
5
  "description": "A sticky-note wall for DeepSeek Harness: markdown notes, categories, reminders, wiki links, images, and fast-note-sync mirroring.",
6
6
  "icon": "./icon.svg",