@sonicloud/dsh-sonicloud-device 0.1.4 → 0.1.5

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 (46) hide show
  1. package/CHANGELOG.md +21 -0
  2. package/CHANGELOG.zh.md +21 -0
  3. package/README.md +7 -5
  4. package/README.zh.md +7 -5
  5. package/dist/build.json +1 -1
  6. package/dist/client.js +647 -52
  7. package/docs/contributing/development.md +3 -3
  8. package/docs/specs/mouse-settings.md +1 -1
  9. package/docs/specs/multilingual.md +1 -1
  10. package/docs/specs/smart-mouse-plugin.md +6 -3
  11. package/native/screenshot/README.md +9 -4
  12. package/native/screenshot/SOURCE.json +48 -17
  13. package/native/screenshot/darwin-arm64/screentool-macos-1.2.2.zip +0 -0
  14. package/native/screenshot/helper-i18n/de.json +85 -0
  15. package/native/screenshot/helper-i18n/es.json +85 -0
  16. package/native/screenshot/helper-i18n/fr.json +85 -0
  17. package/native/screenshot/patches/{hide-cloud-actions.patch → macos/hide-cloud-actions.patch} +84 -76
  18. package/native/screenshot/patches/macos/mac-clang-compat.patch +14 -0
  19. package/native/screenshot/patches/macos/mac-color-panel.patch +40 -0
  20. package/native/screenshot/patches/macos/mac-permissions.patch +549 -0
  21. package/native/screenshot/patches/macos/mac-ui-focus.patch +658 -0
  22. package/native/screenshot/patches/macos/upstream-files.json +77 -0
  23. package/native/screenshot/patches/upstream-files.json +12 -8
  24. package/native/screenshot/win32-x64/i18n/de.json +85 -0
  25. package/native/screenshot/win32-x64/i18n/es.json +85 -0
  26. package/native/screenshot/win32-x64/i18n/fr.json +85 -0
  27. package/native/screenshot/win32-x64/screenhelper.exe +0 -0
  28. package/package.json +1 -1
  29. package/src/desktop/presentation.mjs +1 -1
  30. package/src/desktop/screenshot-shortcut-worker.mjs +188 -0
  31. package/src/desktop/screenshot-shortcut.mjs +266 -0
  32. package/src/desktop/screenshot-worker.mjs +16 -0
  33. package/src/desktop/screenshot.mjs +21 -2
  34. package/src/devices/manager.mjs +36 -3
  35. package/src/host/index.mjs +7 -2
  36. package/src/host/locale.mjs +5 -3
  37. package/src/shared/locales/de.json +28 -2
  38. package/src/shared/locales/en.json +28 -2
  39. package/src/shared/locales/es.json +28 -2
  40. package/src/shared/locales/fr.json +28 -2
  41. package/src/shared/locales/ja.json +28 -2
  42. package/src/shared/locales/pt.json +28 -2
  43. package/src/shared/locales/ru.json +28 -2
  44. package/src/shared/locales/zh.json +28 -2
  45. package/src/shared/remote.mjs +5 -0
  46. package/src/shared/screenshot-shortcut.mjs +50 -0
package/CHANGELOG.md CHANGED
@@ -1,5 +1,26 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.1.5 - 2026-12-01
4
+
5
+ ### Added
6
+
7
+ - Support configuring, saving and clearing a global screenshot shortcut on Windows and macOS. No shortcut is bound by default; conflicts or save failures preserve the previous setting, and disabling the plugin or quitting Harness releases the registration.
8
+
9
+ ### Changed
10
+
11
+ - Move screenshot settings above Restore Defaults and replace Start Screenshot with Set Shortcut. Restoring defaults also clears this computer's screenshot shortcut without revoking system permissions.
12
+ - Group macOS permission guidance below Restore Defaults with consistent typography, spacing and status indicators. Hide request buttons for granted permissions, retain the existing system authorization flow for missing permissions, and use Check Again consistently.
13
+ - Migrate the macOS screenshot component to the vendor 1.3.0 baseline (helper 1.3.0 with a multilingual capture UI) and replace the shipped macOS archive with a Developer ID rebuild; the Windows screenshot helper moves to the same 1.3.0 source baseline, sharing the macOS cloud-action patch and the Spanish/French/German translation catalog, with all other Windows build inputs and artifacts unchanged.
14
+ - The screenshot UI now follows the host language (previously fixed to Chinese): delivered when the worker starts and hot-switched on change, with the effective language reported back through language events; Spanish, French and German are covered by a bundled external translation catalog for languages the helper does not ship built-in.
15
+
16
+ ### Fixed
17
+
18
+ - Fix text not appearing in macOS screenshot annotations: the toolbar popups (font size, pen width, zoom) and the pin-edit toolbar no longer steal keyboard focus.
19
+ - Fix the Dock showing through the macOS capture overlay and Chinese input-method candidates not appearing: the overlay now uses native full screen so the system hides the Dock and candidates and system panels stay visible.
20
+ - Fix macOS scrolling screenshots producing a black stitched result with a region that could not scroll: scrolling capture now leaves native full screen, waits for the Space switch to finish, and then starts the original scrolling session.
21
+ - Fix macOS pinned screenshots hiding when clicking another app or the desktop with no way to bring them back: pin windows no longer hide when the app loses focus, and the always-on-top toggle switches natively in place.
22
+ - Fix the macOS screenshot shortcut worker being registered as an activatable app: it no longer disturbs the host window (the renderer was being killed) and no longer creates a second Dock icon.
23
+
3
24
  ## 0.1.4 - 2026-11-26
4
25
 
5
26
  ### Added
package/CHANGELOG.zh.md CHANGED
@@ -1,5 +1,26 @@
1
1
  # 更新日志
2
2
 
3
+ ## 0.1.5 - 2026-12-01
4
+
5
+ ### 新增
6
+
7
+ - Windows、macOS 支持设置、保存和清除全局截图快捷键;默认不绑定,组合键冲突或保存失败时保留原设置,禁用插件或退出 Harness 时释放注册。
8
+
9
+ ### 变更
10
+
11
+ - 将截图设置移至“恢复默认”上方,以“设置快捷键”替代“开始截图”;恢复默认同时清除本机截图快捷键,不撤销系统授权。
12
+ - 将 macOS 授权引导集中到“恢复默认”下方,统一字体、间距和授权状态;已授权时隐藏对应申请按钮,待授权时保留现有系统授权流程,并统一使用“重新检查”。
13
+ - macOS 截图组件迁移到厂商 1.3.0 基线(helper 1.3.0,截图界面支持多语言),交付归档替换为 Developer ID 签名的重建版本;Windows 截图 helper 同步迁移到 1.3.0 源码基线,与 macOS 共用云动作隐藏补丁及西/法/德翻译目录,其余 Windows 构建输入与交付件不变。
14
+ - 截图界面改为跟随宿主语言(此前固定中文;随 worker 启动下发与切换热更新,实际生效由语言事件回报),并以随包外部翻译目录补齐 helper 无内置翻译的西班牙语、法语和德语。
15
+
16
+ ### 修复
17
+
18
+ - 修复 macOS 截图标注时文字不上屏:工具条弹窗(字号/笔宽/缩放)与贴图编辑工具条不再抢占键盘焦点。
19
+ - 修复 macOS 截图期间程序坞露出、中文输入法候选词不显示:截图蒙层改用系统原生全屏,由系统隐藏程序坞,蒙层不再遮挡候选词与系统面板。
20
+ - 修复 macOS 滚动截图拼接结果全黑、选区无法滚动:滚动截图先退出原生全屏并等待空间切换完成,再按原有流程启动滚动会话。
21
+ - 修复 macOS 贴图在点击其他应用或桌面时被隐藏且无法找回:贴图窗口不再随应用失焦自动隐藏,置顶与非置顶改为原生原地切换。
22
+ - 修复 macOS 截图快捷键后台进程被系统登记为可激活应用:不再干扰宿主窗口(渲染进程被结束),并消除程序坞双图标。
23
+
3
24
  ## 0.1.4 - 2026-11-26
4
25
 
5
26
  ### 新增
package/README.md CHANGED
@@ -35,11 +35,11 @@ On macOS, initial activation and reconnection check typing and screenshot permis
35
35
  | Voice translation | Choose source and target languages and assign Voice Translation to the voice or M button. Hold to speak, then release to insert the translation |
36
36
  | Voice search | Assign Voice Search to the M button and choose Baidu, Bing, or Google. Speak your query and release to search |
37
37
  | AI conversations | Hold the AI button to speak, then release to fill a Harness conversation. Auto-send is enabled by default and can be turned off in settings |
38
- | Screenshots | Press the mouse capture button or click Start Screenshot in Sonicloud Devices, then select a region to annotate, copy, save, pin, or capture scrolling content |
38
+ | Screenshots | Press the mouse capture button, or set and use a screenshot shortcut in Sonicloud Devices, then select a region to annotate, copy, save, pin, or capture scrolling content |
39
39
  | Buttons and sensitivity | Assign Enter, Backspace, Open Link, or other actions to the M button, and adjust mouse DPI |
40
40
  | Multiple mice | View each mouse's connection, battery level, and serial number, and save its language, button, and sensitivity settings separately |
41
41
 
42
- Manage these options in **Settings → Sonicloud Devices**. Changes save automatically. **Restore Defaults** resets only the current mouse, and reconnecting restores its saved settings. The left navigation bar also shows a **Sonicloud Devices** panel with the same device management UI by default; use the Sidebar switch on the Sonicloud Devices title row to hide or restore it. Hiding the panel does not affect the settings page.
42
+ Manage these options in **Settings → Sonicloud Devices**. Changes save automatically. **Restore Defaults** resets the current mouse and clears this computer's screenshot shortcut without revoking system permissions. Reconnecting restores the saved settings. The left navigation bar also shows a **Sonicloud Devices** panel with the same device management UI by default; use the Sidebar switch on the Sonicloud Devices title row to hide or restore it. Hiding the panel does not affect the settings page.
43
43
 
44
44
  ![Sonicloud Devices settings showing mouse information, voice typing, translation, and DPI options](docs/images/sonicloud-device.png)
45
45
 
@@ -47,7 +47,7 @@ Manage these options in **Settings → Sonicloud Devices**. Changes save automat
47
47
 
48
48
  ### First-time permissions on macOS
49
49
 
50
- After enabling the plugin, open **Sonicloud Devices** and grant the permissions you need:
50
+ After enabling the plugin, open **Sonicloud Devices** and check **System Permissions** below **Restore Defaults**. This section appears only on macOS. Granted permissions show **Granted**; missing permissions offer **Grant Access**.
51
51
 
52
52
  | Component | Permission and purpose |
53
53
  | --- | --- |
@@ -55,7 +55,7 @@ After enabling the plugin, open **Sonicloud Devices** and grant the permissions
55
55
  | screenhelper | Screen Recording: required for screenshots; the capture overlay stays closed until permission is granted |
56
56
  | screenhelper | Accessibility: optional for automatic scrolling; regular screenshots and manual scrolling remain available |
57
57
 
58
- Click the corresponding **Authorize** button to let that component request permission. Confirm manually in the system prompt or **System Settings → Privacy & Security**, then click **Authorized, Check Again**. If a component is missing from the list, expand its location in the page and add it by that path. The plugin checks and guides setup; it never confirms system permissions for you.
58
+ Click the corresponding **Grant Access** button to let that component request permission. Confirm manually in the system prompt or **System Settings → Privacy & Security**, then click **Check Again**. If a component is missing from the list, expand its location in the page and add it by that path. The plugin checks and guides setup; it never confirms system permissions for you. Clicking a button or accepting a request does not mean permission has been granted.
59
59
 
60
60
  Sonicloud Voice now uses a Developer ID signature. If an older version is already checked but the plugin still reports missing permission, follow the system prompts to authorize it again and restart Harness, then recheck.
61
61
 
@@ -86,7 +86,9 @@ Voice search uses the current mouse's recognition language and selected search e
86
86
 
87
87
  ### Screenshots
88
88
 
89
- Press the mouse capture button or click **Start Screenshot** at the bottom of **Sonicloud Devices**, then select a region in the separate capture UI. The capture process is bundled. The UI button also works without a connected mouse. Repeated triggers while capturing report that a capture is already in progress. Press `Esc` to leave region selection. Disabling the plugin or quitting Harness closes the capture process and pinned image windows.
89
+ Screenshot settings appear above **Restore Defaults** in **Sonicloud Devices**. Click **Set Shortcut**, record a combination and save it. Suggested combinations are `Ctrl + Shift + S` on Windows and `⌘ ⇧ S` on macOS. No shortcut is bound by default. The setting is stored on this computer and does not change when you switch mice. Choose another combination if the system or another app already uses it; registration or save failures preserve the previous setting.
90
+
91
+ Recording temporarily pauses the existing shortcut; cancelling restores it. Use **Clear** to remove the binding. While Harness is running and the plugin is enabled, press the mouse capture button or the configured global shortcut, then select a region in the separate capture UI. The shortcut works without a connected mouse and while Harness is in the background. Repeated triggers while capturing report that a capture is already in progress. Press `Esc` to leave region selection. Disabling the plugin or quitting Harness releases the shortcut registration and closes the capture process and pinned image windows.
90
92
 
91
93
  On macOS, complete [first-time permissions](#first-time-permissions-on-macos) before taking a screenshot. Cloud service integration for OCR, image translation, and Word export is outside this integration.
92
94
 
package/README.zh.md CHANGED
@@ -35,11 +35,11 @@ macOS 首次启用或重新连接插件时会检查打字和截图权限,并
35
35
  | 语音翻译 | 选择源语言和目标语言,将语音键或 M 键设为“语音翻译”,按住说话,松开后填入译文 |
36
36
  | 语音搜索 | 将 M 键设为“语音搜索”,选择百度、Bing 或 Google,说出关键词后松开即可搜索 |
37
37
  | AI 对话 | 按住 AI 键说话,松开后填入 Harness 对话;“自动发送”默认开启,可在设置中关闭 |
38
- | 截图 | 按鼠标截图键,或在“声云设备”中点击“开始截图”,框选后标注、复制、保存、贴图或滚动截图 |
38
+ | 截图 | 按鼠标截图键,或在“声云设备”中设置并使用截图快捷键,框选后标注、复制、保存、贴图或滚动截图 |
39
39
  | 自定义按键与灵敏度 | 为 M 键选择回车、后退或一键链接等动作,并调整鼠标 DPI |
40
40
  | 多设备管理 | 查看每台鼠标的连接方式、电量和序列号,分别保存语言、按键和灵敏度设置 |
41
41
 
42
- 在**设置 → 声云设备**中集中管理这些选项。修改后自动保存;“恢复默认”只重置当前鼠标,重新连接后会恢复已保存的设置。左侧导航栏默认显示**声云设备**面板,提供同样的设备管理界面;可通过「声云设备」标题行的“侧边栏”开关手动隐藏或恢复,隐藏面板不影响设置页功能。
42
+ 在**设置 → 声云设备**中集中管理这些选项。修改后自动保存;“恢复默认”重置当前鼠标并清除本机的截图快捷键,不撤销系统授权。重新连接后会恢复已保存的设置。左侧导航栏默认显示**声云设备**面板,提供同样的设备管理界面;可通过「声云设备」标题行的“侧边栏”开关手动隐藏或恢复,隐藏面板不影响设置页功能。
43
43
 
44
44
  ![声云设备设置页:查看鼠标信息并设置语音打字、翻译和 DPI](docs/images/sonicloud-device.png)
45
45
 
@@ -47,7 +47,7 @@ macOS 首次启用或重新连接插件时会检查打字和截图权限,并
47
47
 
48
48
  ### macOS 首次授权
49
49
 
50
- 安装后启用插件,打开**声云设备**,按需要为以下组件授权:
50
+ 安装后启用插件,打开**声云设备**,在“恢复默认”下方的**系统授权**中查看以下权限。该区域仅在 macOS 显示;已授权时显示**已授权**,待授权时显示**去授权**。
51
51
 
52
52
  | 组件 | 权限与用途 |
53
53
  | --- | --- |
@@ -55,7 +55,7 @@ macOS 首次启用或重新连接插件时会检查打字和截图权限,并
55
55
  | screenhelper | 屏幕录制:截图必需;未授权时不会显示截图蒙层 |
56
56
  | screenhelper | 辅助功能:自动滚动可选,普通截图和手动滚动不受影响 |
57
57
 
58
- 点击对应的**授权**按钮后,由该组件向系统申请权限;在系统弹窗或**系统设置 → 隐私与安全性**中手动确认,再点击**已授权,重新检查**。找不到组件时,可展开页面中的组件位置,按路径手动添加。插件只检查和引导,不会自动确认系统授权。
58
+ 点击对应的**去授权**按钮后,由该组件向系统申请权限;在系统弹窗或**系统设置 → 隐私与安全性**中手动确认,再点击**重新检查**。找不到组件时,可展开页面中的组件位置,按路径手动添加。插件只检查和引导,不会自动确认系统授权;点击按钮或请求受理不代表已经授权。
59
59
 
60
60
  Sonicloud Voice 已改用 Developer ID 签名。若旧版本已勾选,但插件仍显示待授权,请按系统提示重新授权并重启 Harness,再重新检查。
61
61
 
@@ -86,7 +86,9 @@ Windows 通过 typer 标准注入库逐字打字:说话期间文字实时填
86
86
 
87
87
  ### 截图
88
88
 
89
- 按鼠标截图键,或点击**声云设备**页面底部的**开始截图**,在独立截图界面中选择区域后操作。截图进程随插件提供,界面按钮无需连接鼠标。截图期间重复触发会提示正在进行,按 `Esc` 可退出选区。插件禁用或 Harness 退出时,截图进程和贴图窗口一并关闭。
89
+ 在**声云设备**中,截图设置位于**恢复默认**上方。点击**设置快捷键**,录入组合键并保存;Windows 可使用推荐的 `Ctrl + Shift + S`,macOS 可使用 `⌘ ⇧ S`。默认不绑定快捷键,设置保存在本机,切换鼠标不会改变它。快捷键被系统或其他应用占用时,请更换组合;注册或保存失败会保留原设置。
90
+
91
+ 录入期间暂停原快捷键,取消后恢复;**清除**可移除快捷键。Harness 运行且插件启用时,按鼠标截图键或已设置的全局快捷键,在独立截图界面中选择区域后操作;快捷键无需鼠标在线,也不要求 Harness 在前台。截图期间重复触发会提示正在进行,按 `Esc` 可退出选区。禁用插件或退出 Harness 时,快捷键注册、截图进程和贴图窗口一并释放。
90
92
 
91
93
  macOS 请先完成[首次授权](#macos-首次授权),再开始截图。OCR、图片翻译和 Word 导出所需的云服务接入不包含在本次集成中。
92
94
 
package/dist/build.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "plugin": "dsh-sonicloud-device",
3
- "version": "0.1.4",
3
+ "version": "0.1.5",
4
4
  "harness": "0.2.1-rc.5"
5
5
  }