@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.
- package/CHANGELOG.md +21 -0
- package/CHANGELOG.zh.md +21 -0
- package/README.md +7 -5
- package/README.zh.md +7 -5
- package/dist/build.json +1 -1
- package/dist/client.js +647 -52
- package/docs/contributing/development.md +3 -3
- package/docs/specs/mouse-settings.md +1 -1
- package/docs/specs/multilingual.md +1 -1
- package/docs/specs/smart-mouse-plugin.md +6 -3
- package/native/screenshot/README.md +9 -4
- package/native/screenshot/SOURCE.json +48 -17
- package/native/screenshot/darwin-arm64/screentool-macos-1.2.2.zip +0 -0
- package/native/screenshot/helper-i18n/de.json +85 -0
- package/native/screenshot/helper-i18n/es.json +85 -0
- package/native/screenshot/helper-i18n/fr.json +85 -0
- package/native/screenshot/patches/{hide-cloud-actions.patch → macos/hide-cloud-actions.patch} +84 -76
- package/native/screenshot/patches/macos/mac-clang-compat.patch +14 -0
- package/native/screenshot/patches/macos/mac-color-panel.patch +40 -0
- package/native/screenshot/patches/macos/mac-permissions.patch +549 -0
- package/native/screenshot/patches/macos/mac-ui-focus.patch +658 -0
- package/native/screenshot/patches/macos/upstream-files.json +77 -0
- package/native/screenshot/patches/upstream-files.json +12 -8
- package/native/screenshot/win32-x64/i18n/de.json +85 -0
- package/native/screenshot/win32-x64/i18n/es.json +85 -0
- package/native/screenshot/win32-x64/i18n/fr.json +85 -0
- package/native/screenshot/win32-x64/screenhelper.exe +0 -0
- package/package.json +1 -1
- package/src/desktop/presentation.mjs +1 -1
- package/src/desktop/screenshot-shortcut-worker.mjs +188 -0
- package/src/desktop/screenshot-shortcut.mjs +266 -0
- package/src/desktop/screenshot-worker.mjs +16 -0
- package/src/desktop/screenshot.mjs +21 -2
- package/src/devices/manager.mjs +36 -3
- package/src/host/index.mjs +7 -2
- package/src/host/locale.mjs +5 -3
- package/src/shared/locales/de.json +28 -2
- package/src/shared/locales/en.json +28 -2
- package/src/shared/locales/es.json +28 -2
- package/src/shared/locales/fr.json +28 -2
- package/src/shared/locales/ja.json +28 -2
- package/src/shared/locales/pt.json +28 -2
- package/src/shared/locales/ru.json +28 -2
- package/src/shared/locales/zh.json +28 -2
- package/src/shared/remote.mjs +5 -0
- package/src/shared/screenshot-shortcut.mjs +50 -0
package/dist/client.js
CHANGED
|
@@ -101,7 +101,7 @@ var zh_default = {
|
|
|
101
101
|
"permission.checkTyping": "\u91CD\u65B0\u68C0\u67E5\u6253\u5B57\u6743\u9650",
|
|
102
102
|
"permission.checkScreenshot": "\u91CD\u65B0\u68C0\u67E5\u622A\u56FE\u6743\u9650",
|
|
103
103
|
"permission.checking": "\u6B63\u5728\u68C0\u67E5\u2026",
|
|
104
|
-
"permission.recheck": "\
|
|
104
|
+
"permission.recheck": "\u91CD\u65B0\u68C0\u67E5",
|
|
105
105
|
"permission.location": "\u627E\u4E0D\u5230 {helper} \u65F6\u67E5\u770B\u7EC4\u4EF6\u4F4D\u7F6E",
|
|
106
106
|
"permission.pathHelp": "\u5728\u7CFB\u7EDF\u6743\u9650\u5217\u8868\u4E2D\u9700\u8981\u624B\u52A8\u6DFB\u52A0\u65F6\uFF0C\u4F7F\u7528\u4E0B\u65B9\u4F4D\u7F6E\uFF1A",
|
|
107
107
|
"permission.ready": "\u622A\u56FE\u7EC4\u4EF6 {helper} \u6743\u9650\u5DF2\u5C31\u7EEA\u3002",
|
|
@@ -189,7 +189,33 @@ var zh_default = {
|
|
|
189
189
|
"error.workspace": "\u6CA1\u6709\u53EF\u7528\u7684\u5DE5\u4F5C\u533A",
|
|
190
190
|
"error.cancelled": "\u8BED\u97F3\u4F1A\u8BDD\u5DF2\u53D6\u6D88",
|
|
191
191
|
"error.deviceLimit": "License \u8BBE\u5907\u6570\u91CF\u5DF2\u8FBE\u4E0A\u9650",
|
|
192
|
-
"error.screenshotExport": "\u6682\u4E0D\u652F\u6301\u622A\u56FE\u6587\u5B57\u8BC6\u522B\u548C Word \u5BFC\u51FA\uFF0C\u8BF7\u4F7F\u7528\u590D\u5236\u3001\u4FDD\u5B58\u6216\u8D34\u56FE"
|
|
192
|
+
"error.screenshotExport": "\u6682\u4E0D\u652F\u6301\u622A\u56FE\u6587\u5B57\u8BC6\u522B\u548C Word \u5BFC\u51FA\uFF0C\u8BF7\u4F7F\u7528\u590D\u5236\u3001\u4FDD\u5B58\u6216\u8D34\u56FE",
|
|
193
|
+
"shortcut.configure": "\u8BBE\u7F6E\u5FEB\u6377\u952E",
|
|
194
|
+
"shortcut.title": "\u8BBE\u7F6E\u622A\u56FE\u5FEB\u6377\u952E",
|
|
195
|
+
"shortcut.help": "\u6309\u9F20\u6807\u622A\u56FE\u952E\u6216\u5FEB\u6377\u952E\uFF0C\u6846\u9009\u540E\u53EF\u6807\u6CE8\u3001\u590D\u5236\u3001\u4FDD\u5B58\u6216\u8D34\u56FE",
|
|
196
|
+
"shortcut.unset": "\u672A\u8BBE\u7F6E",
|
|
197
|
+
"shortcut.record": "\u6309\u4E0B\u7EC4\u5408\u952E",
|
|
198
|
+
"shortcut.recordHelp": "\u8BF7\u4F7F\u7528\u81F3\u5C11\u4E00\u4E2A Command\u3001Ctrl \u6216 Alt \u7B49\u4FEE\u9970\u952E",
|
|
199
|
+
"shortcut.suggested": "\u4F7F\u7528\u63A8\u8350\u7EC4\u5408 {shortcut}",
|
|
200
|
+
"shortcut.clear": "\u6E05\u9664",
|
|
201
|
+
"shortcut.save": "\u4FDD\u5B58",
|
|
202
|
+
"shortcut.saving": "\u6B63\u5728\u4FDD\u5B58\u2026",
|
|
203
|
+
"shortcut.invalid": "\u65E0\u6548\u6216\u7CFB\u7EDF\u4FDD\u7559\u7684\u5FEB\u6377\u952E",
|
|
204
|
+
"shortcut.unavailable": "\u5F53\u524D\u73AF\u5883\u65E0\u6CD5\u6CE8\u518C\u622A\u56FE\u5FEB\u6377\u952E",
|
|
205
|
+
"shortcut.saveFailed": "\u5FEB\u6377\u952E\u4FDD\u5B58\u5931\u8D25\uFF0C\u4ECD\u4FDD\u7559\u539F\u8BBE\u7F6E",
|
|
206
|
+
"shortcut.conflict": "\u5FEB\u6377\u952E\u5DF2\u88AB\u5360\u7528\uFF0C\u8BF7\u66F4\u6362\u7EC4\u5408",
|
|
207
|
+
"permission.system": "\u7CFB\u7EDF\u6388\u6743",
|
|
208
|
+
"permission.intro": "\u9996\u6B21\u4F7F\u7528\u65F6\uFF0C\u8BF7\u5B8C\u6210\u4EE5\u4E0B\u7CFB\u7EDF\u6388\u6743\u3002",
|
|
209
|
+
"permission.allGranted": "\u6240\u9700\u6743\u9650\u5DF2\u5C31\u7EEA\uFF0C\u53EF\u6B63\u5E38\u4F7F\u7528\u622A\u56FE\u548C\u6253\u5B57\u4E0A\u5C4F\u3002",
|
|
210
|
+
"permission.grant": "\u53BB\u6388\u6743",
|
|
211
|
+
"permission.typingTitle": "\u6253\u5B57\u4E0A\u5C4F",
|
|
212
|
+
"permission.screenTitle": "\u5C4F\u5E55\u622A\u56FE",
|
|
213
|
+
"permission.scrollTitle": "\u81EA\u52A8\u6EDA\u52A8\u622A\u56FE",
|
|
214
|
+
"permission.optional": "\u53EF\u9009",
|
|
215
|
+
"permission.screenHelp": "\u622A\u56FE\u5FC5\u9700\u3002\u6388\u6743\u5B8C\u6210\u524D\u4E0D\u4F1A\u62C9\u8D77\u622A\u56FE\u8499\u5C42\u3002",
|
|
216
|
+
"permission.scrollHelp": "\u672A\u6388\u6743\u4E0D\u5F71\u54CD\u666E\u901A\u622A\u56FE\u548C\u624B\u52A8\u6EDA\u52A8\u3002",
|
|
217
|
+
"permission.locations": "\u627E\u4E0D\u5230\u6388\u6743\u7EC4\u4EF6\uFF1F\u67E5\u770B\u4F4D\u7F6E",
|
|
218
|
+
"shortcut.autoSave": "\u8BBE\u7F6E\u81EA\u52A8\u4FDD\u5B58"
|
|
193
219
|
};
|
|
194
220
|
|
|
195
221
|
// src/shared/locales/en.json
|
|
@@ -258,7 +284,7 @@ var en_default = {
|
|
|
258
284
|
"permission.checkTyping": "Recheck typing permissions",
|
|
259
285
|
"permission.checkScreenshot": "Recheck screenshot permissions",
|
|
260
286
|
"permission.checking": "Checking\u2026",
|
|
261
|
-
"permission.recheck": "
|
|
287
|
+
"permission.recheck": "Check again",
|
|
262
288
|
"permission.location": "View component location if {helper} is missing",
|
|
263
289
|
"permission.pathHelp": "Use this location to add the component to the system permission list:",
|
|
264
290
|
"permission.ready": "Screenshot permissions for {helper} are ready.",
|
|
@@ -346,7 +372,33 @@ var en_default = {
|
|
|
346
372
|
"error.workspace": "No workspace is available.",
|
|
347
373
|
"error.cancelled": "The voice session was cancelled.",
|
|
348
374
|
"error.deviceLimit": "The license device limit has been reached.",
|
|
349
|
-
"error.screenshotExport": "Screenshot OCR and Word export are not supported. Use copy, save or pin instead."
|
|
375
|
+
"error.screenshotExport": "Screenshot OCR and Word export are not supported. Use copy, save or pin instead.",
|
|
376
|
+
"shortcut.configure": "Set shortcut",
|
|
377
|
+
"shortcut.title": "Set screenshot shortcut",
|
|
378
|
+
"shortcut.help": "Press the mouse capture button or shortcut, then select a region to annotate, copy, save or pin.",
|
|
379
|
+
"shortcut.unset": "Not set",
|
|
380
|
+
"shortcut.record": "Press a key combination",
|
|
381
|
+
"shortcut.recordHelp": "Include at least one modifier such as Command, Ctrl or Alt.",
|
|
382
|
+
"shortcut.suggested": "Use suggested shortcut {shortcut}",
|
|
383
|
+
"shortcut.clear": "Clear",
|
|
384
|
+
"shortcut.save": "Save",
|
|
385
|
+
"shortcut.saving": "Saving\u2026",
|
|
386
|
+
"shortcut.invalid": "Invalid or system-reserved shortcut",
|
|
387
|
+
"shortcut.unavailable": "Screenshot shortcuts cannot be registered in this environment.",
|
|
388
|
+
"shortcut.saveFailed": "Could not save the shortcut. The previous setting is preserved.",
|
|
389
|
+
"shortcut.conflict": "This shortcut is already in use. Choose another combination.",
|
|
390
|
+
"permission.system": "System permissions",
|
|
391
|
+
"permission.intro": "Complete the following system permissions before first use.",
|
|
392
|
+
"permission.allGranted": "Permissions are ready for screenshots and text insertion.",
|
|
393
|
+
"permission.grant": "Grant access",
|
|
394
|
+
"permission.typingTitle": "Text insertion",
|
|
395
|
+
"permission.screenTitle": "Screenshots",
|
|
396
|
+
"permission.scrollTitle": "Automatic scrolling capture",
|
|
397
|
+
"permission.optional": "Optional",
|
|
398
|
+
"permission.screenHelp": "Required for screenshots. The capture overlay stays closed until permission is granted.",
|
|
399
|
+
"permission.scrollHelp": "Regular screenshots and manual scrolling remain available without this permission.",
|
|
400
|
+
"permission.locations": "Cannot find a permission component? View its location",
|
|
401
|
+
"shortcut.autoSave": "Settings save automatically"
|
|
350
402
|
};
|
|
351
403
|
|
|
352
404
|
// src/shared/locales/ja.json
|
|
@@ -415,7 +467,7 @@ var ja_default = {
|
|
|
415
467
|
"permission.checkTyping": "\u5165\u529B\u6A29\u9650\u3092\u518D\u78BA\u8A8D",
|
|
416
468
|
"permission.checkScreenshot": "\u30B9\u30AF\u30EA\u30FC\u30F3\u30B7\u30E7\u30C3\u30C8\u6A29\u9650\u3092\u518D\u78BA\u8A8D",
|
|
417
469
|
"permission.checking": "\u78BA\u8A8D\u4E2D\u2026",
|
|
418
|
-
"permission.recheck": "\
|
|
470
|
+
"permission.recheck": "\u518D\u78BA\u8A8D",
|
|
419
471
|
"permission.location": "{helper} \u304C\u898B\u3064\u304B\u3089\u306A\u3044\u5834\u5408\u306F\u4FDD\u5B58\u5834\u6240\u3092\u78BA\u8A8D",
|
|
420
472
|
"permission.pathHelp": "\u30B7\u30B9\u30C6\u30E0\u306E\u6A29\u9650\u4E00\u89A7\u306B\u624B\u52D5\u3067\u8FFD\u52A0\u3059\u308B\u5834\u5408\u306F\u3001\u4EE5\u4E0B\u306E\u5834\u6240\u3092\u4F7F\u7528\u3057\u3066\u304F\u3060\u3055\u3044\uFF1A",
|
|
421
473
|
"permission.ready": "{helper} \u306E\u30B9\u30AF\u30EA\u30FC\u30F3\u30B7\u30E7\u30C3\u30C8\u6A29\u9650\u306F\u8A2D\u5B9A\u6E08\u307F\u3067\u3059\u3002",
|
|
@@ -503,7 +555,33 @@ var ja_default = {
|
|
|
503
555
|
"error.workspace": "\u5229\u7528\u53EF\u80FD\u306A\u30EF\u30FC\u30AF\u30B9\u30DA\u30FC\u30B9\u304C\u3042\u308A\u307E\u305B\u3093\u3002",
|
|
504
556
|
"error.cancelled": "\u97F3\u58F0\u30BB\u30C3\u30B7\u30E7\u30F3\u306F\u30AD\u30E3\u30F3\u30BB\u30EB\u3055\u308C\u307E\u3057\u305F\u3002",
|
|
505
557
|
"error.deviceLimit": "\u30E9\u30A4\u30BB\u30F3\u30B9\u306E\u30C7\u30D0\u30A4\u30B9\u6570\u304C\u4E0A\u9650\u306B\u9054\u3057\u307E\u3057\u305F\u3002",
|
|
506
|
-
"error.screenshotExport": "\u30B9\u30AF\u30EA\u30FC\u30F3\u30B7\u30E7\u30C3\u30C8\u306E\u6587\u5B57\u8A8D\u8B58\u3068 Word \u51FA\u529B\u306F\u672A\u5BFE\u5FDC\u3067\u3059\u3002\u30B3\u30D4\u30FC\u3001\u4FDD\u5B58\u3001\u30D4\u30F3\u7559\u3081\u3092\u3054\u5229\u7528\u304F\u3060\u3055\u3044\u3002"
|
|
558
|
+
"error.screenshotExport": "\u30B9\u30AF\u30EA\u30FC\u30F3\u30B7\u30E7\u30C3\u30C8\u306E\u6587\u5B57\u8A8D\u8B58\u3068 Word \u51FA\u529B\u306F\u672A\u5BFE\u5FDC\u3067\u3059\u3002\u30B3\u30D4\u30FC\u3001\u4FDD\u5B58\u3001\u30D4\u30F3\u7559\u3081\u3092\u3054\u5229\u7528\u304F\u3060\u3055\u3044\u3002",
|
|
559
|
+
"shortcut.configure": "\u30B7\u30E7\u30FC\u30C8\u30AB\u30C3\u30C8\u3092\u8A2D\u5B9A",
|
|
560
|
+
"shortcut.title": "\u30B9\u30AF\u30EA\u30FC\u30F3\u30B7\u30E7\u30C3\u30C8\u306E\u30B7\u30E7\u30FC\u30C8\u30AB\u30C3\u30C8\u3092\u8A2D\u5B9A",
|
|
561
|
+
"shortcut.help": "\u30DE\u30A6\u30B9\u306E\u30AD\u30E3\u30D7\u30C1\u30E3\u30DC\u30BF\u30F3\u307E\u305F\u306F\u30B7\u30E7\u30FC\u30C8\u30AB\u30C3\u30C8\u3092\u62BC\u3057\u3001\u7BC4\u56F2\u3092\u9078\u629E\u3057\u3066\u6CE8\u91C8\u3001\u30B3\u30D4\u30FC\u3001\u4FDD\u5B58\u3001\u30D4\u30F3\u7559\u3081\u3092\u884C\u3044\u307E\u3059\u3002",
|
|
562
|
+
"shortcut.unset": "\u672A\u8A2D\u5B9A",
|
|
563
|
+
"shortcut.record": "\u30AD\u30FC\u306E\u7D44\u307F\u5408\u308F\u305B\u3092\u62BC\u3059",
|
|
564
|
+
"shortcut.recordHelp": "Command\u3001Ctrl\u3001Alt \u306A\u3069\u306E\u4FEE\u98FE\u30AD\u30FC\u30921\u3064\u4EE5\u4E0A\u542B\u3081\u3066\u304F\u3060\u3055\u3044\u3002",
|
|
565
|
+
"shortcut.suggested": "\u63A8\u5968\u3059\u308B\u7D44\u307F\u5408\u308F\u305B {shortcut} \u3092\u4F7F\u7528",
|
|
566
|
+
"shortcut.clear": "\u89E3\u9664",
|
|
567
|
+
"shortcut.save": "\u4FDD\u5B58",
|
|
568
|
+
"shortcut.saving": "\u4FDD\u5B58\u4E2D\u2026",
|
|
569
|
+
"shortcut.invalid": "\u7121\u52B9\u3001\u307E\u305F\u306F\u30B7\u30B9\u30C6\u30E0\u3067\u4E88\u7D04\u6E08\u307F\u306E\u30B7\u30E7\u30FC\u30C8\u30AB\u30C3\u30C8\u3067\u3059",
|
|
570
|
+
"shortcut.unavailable": "\u3053\u306E\u74B0\u5883\u3067\u306F\u30B9\u30AF\u30EA\u30FC\u30F3\u30B7\u30E7\u30C3\u30C8\u306E\u30B7\u30E7\u30FC\u30C8\u30AB\u30C3\u30C8\u3092\u767B\u9332\u3067\u304D\u307E\u305B\u3093\u3002",
|
|
571
|
+
"shortcut.saveFailed": "\u30B7\u30E7\u30FC\u30C8\u30AB\u30C3\u30C8\u3092\u4FDD\u5B58\u3067\u304D\u307E\u305B\u3093\u3067\u3057\u305F\u3002\u4EE5\u524D\u306E\u8A2D\u5B9A\u306F\u4FDD\u6301\u3055\u308C\u307E\u3059\u3002",
|
|
572
|
+
"shortcut.conflict": "\u3053\u306E\u30B7\u30E7\u30FC\u30C8\u30AB\u30C3\u30C8\u306F\u4F7F\u7528\u4E2D\u3067\u3059\u3002\u5225\u306E\u7D44\u307F\u5408\u308F\u305B\u3092\u9078\u3093\u3067\u304F\u3060\u3055\u3044\u3002",
|
|
573
|
+
"permission.system": "\u30B7\u30B9\u30C6\u30E0\u6A29\u9650",
|
|
574
|
+
"permission.intro": "\u521D\u56DE\u4F7F\u7528\u524D\u306B\u3001\u4EE5\u4E0B\u306E\u30B7\u30B9\u30C6\u30E0\u6A29\u9650\u3092\u8A31\u53EF\u3057\u3066\u304F\u3060\u3055\u3044\u3002",
|
|
575
|
+
"permission.allGranted": "\u30B9\u30AF\u30EA\u30FC\u30F3\u30B7\u30E7\u30C3\u30C8\u3068\u30C6\u30AD\u30B9\u30C8\u5165\u529B\u306B\u5FC5\u8981\u306A\u6A29\u9650\u304C\u8A31\u53EF\u3055\u308C\u3066\u3044\u307E\u3059\u3002",
|
|
576
|
+
"permission.grant": "\u8A31\u53EF\u3059\u308B",
|
|
577
|
+
"permission.typingTitle": "\u30C6\u30AD\u30B9\u30C8\u5165\u529B",
|
|
578
|
+
"permission.screenTitle": "\u30B9\u30AF\u30EA\u30FC\u30F3\u30B7\u30E7\u30C3\u30C8",
|
|
579
|
+
"permission.scrollTitle": "\u81EA\u52D5\u30B9\u30AF\u30ED\u30FC\u30EB\u64AE\u5F71",
|
|
580
|
+
"permission.optional": "\u4EFB\u610F",
|
|
581
|
+
"permission.screenHelp": "\u30B9\u30AF\u30EA\u30FC\u30F3\u30B7\u30E7\u30C3\u30C8\u306B\u5FC5\u8981\u3067\u3059\u3002\u8A31\u53EF\u3055\u308C\u308B\u307E\u3067\u30AD\u30E3\u30D7\u30C1\u30E3\u306E\u30AA\u30FC\u30D0\u30FC\u30EC\u30A4\u306F\u8868\u793A\u3055\u308C\u307E\u305B\u3093\u3002",
|
|
582
|
+
"permission.scrollHelp": "\u672A\u8A31\u53EF\u3067\u3082\u901A\u5E38\u306E\u30B9\u30AF\u30EA\u30FC\u30F3\u30B7\u30E7\u30C3\u30C8\u3068\u624B\u52D5\u30B9\u30AF\u30ED\u30FC\u30EB\u306F\u5229\u7528\u3067\u304D\u307E\u3059\u3002",
|
|
583
|
+
"permission.locations": "\u6A29\u9650\u4E00\u89A7\u306B\u30B3\u30F3\u30DD\u30FC\u30CD\u30F3\u30C8\u304C\u3042\u308A\u307E\u305B\u3093\u304B\uFF1F\u5834\u6240\u3092\u8868\u793A",
|
|
584
|
+
"shortcut.autoSave": "\u8A2D\u5B9A\u306F\u81EA\u52D5\u4FDD\u5B58\u3055\u308C\u307E\u3059"
|
|
507
585
|
};
|
|
508
586
|
|
|
509
587
|
// src/shared/locales/es.json
|
|
@@ -572,7 +650,7 @@ var es_default = {
|
|
|
572
650
|
"permission.checkTyping": "Revisar permisos de escritura",
|
|
573
651
|
"permission.checkScreenshot": "Revisar permisos de captura",
|
|
574
652
|
"permission.checking": "Comprobando\u2026",
|
|
575
|
-
"permission.recheck": "
|
|
653
|
+
"permission.recheck": "Volver a comprobar",
|
|
576
654
|
"permission.location": "Ver ubicaci\xF3n si no encuentras {helper}",
|
|
577
655
|
"permission.pathHelp": "Usa esta ubicaci\xF3n para a\xF1adir el componente a los permisos del sistema:",
|
|
578
656
|
"permission.ready": "Los permisos de captura de {helper} est\xE1n listos.",
|
|
@@ -660,7 +738,33 @@ var es_default = {
|
|
|
660
738
|
"error.workspace": "No hay ning\xFAn espacio de trabajo disponible.",
|
|
661
739
|
"error.cancelled": "Se cancel\xF3 la sesi\xF3n de voz.",
|
|
662
740
|
"error.deviceLimit": "Se alcanz\xF3 el l\xEDmite de dispositivos de la licencia.",
|
|
663
|
-
"error.screenshotExport": "El OCR de capturas y la exportaci\xF3n a Word no est\xE1n disponibles. Usa copiar, guardar o fijar."
|
|
741
|
+
"error.screenshotExport": "El OCR de capturas y la exportaci\xF3n a Word no est\xE1n disponibles. Usa copiar, guardar o fijar.",
|
|
742
|
+
"shortcut.configure": "Configurar atajo",
|
|
743
|
+
"shortcut.title": "Configurar atajo de captura",
|
|
744
|
+
"shortcut.help": "Pulsa el bot\xF3n de captura del rat\xF3n o el atajo y selecciona una regi\xF3n para anotar, copiar, guardar o fijar.",
|
|
745
|
+
"shortcut.unset": "Sin configurar",
|
|
746
|
+
"shortcut.record": "Pulsa una combinaci\xF3n de teclas",
|
|
747
|
+
"shortcut.recordHelp": "Incluye al menos un modificador, como Command, Ctrl o Alt.",
|
|
748
|
+
"shortcut.suggested": "Usar combinaci\xF3n sugerida {shortcut}",
|
|
749
|
+
"shortcut.clear": "Borrar",
|
|
750
|
+
"shortcut.save": "Guardar",
|
|
751
|
+
"shortcut.saving": "Guardando\u2026",
|
|
752
|
+
"shortcut.invalid": "Atajo no v\xE1lido o reservado por el sistema",
|
|
753
|
+
"shortcut.unavailable": "No se pueden registrar atajos de captura en este entorno.",
|
|
754
|
+
"shortcut.saveFailed": "No se pudo guardar el atajo. Se conserva la configuraci\xF3n anterior.",
|
|
755
|
+
"shortcut.conflict": "Este atajo ya est\xE1 en uso. Elige otra combinaci\xF3n.",
|
|
756
|
+
"permission.system": "Permisos del sistema",
|
|
757
|
+
"permission.intro": "Completa los siguientes permisos del sistema antes del primer uso.",
|
|
758
|
+
"permission.allGranted": "Los permisos para capturas e inserci\xF3n de texto est\xE1n listos.",
|
|
759
|
+
"permission.grant": "Conceder acceso",
|
|
760
|
+
"permission.typingTitle": "Inserci\xF3n de texto",
|
|
761
|
+
"permission.screenTitle": "Capturas de pantalla",
|
|
762
|
+
"permission.scrollTitle": "Captura con desplazamiento autom\xE1tico",
|
|
763
|
+
"permission.optional": "Opcional",
|
|
764
|
+
"permission.screenHelp": "Necesario para las capturas. La superposici\xF3n de captura no aparece hasta que se conceda el permiso.",
|
|
765
|
+
"permission.scrollHelp": "Las capturas normales y el desplazamiento manual siguen disponibles sin este permiso.",
|
|
766
|
+
"permission.locations": "\xBFNo encuentras un componente en los permisos? Ver ubicaci\xF3n",
|
|
767
|
+
"shortcut.autoSave": "La configuraci\xF3n se guarda autom\xE1ticamente"
|
|
664
768
|
};
|
|
665
769
|
|
|
666
770
|
// src/shared/locales/fr.json
|
|
@@ -729,7 +833,7 @@ var fr_default = {
|
|
|
729
833
|
"permission.checkTyping": "Rev\xE9rifier les autorisations de saisie",
|
|
730
834
|
"permission.checkScreenshot": "Rev\xE9rifier les autorisations de capture",
|
|
731
835
|
"permission.checking": "V\xE9rification\u2026",
|
|
732
|
-
"permission.recheck": "
|
|
836
|
+
"permission.recheck": "V\xE9rifier \xE0 nouveau",
|
|
733
837
|
"permission.location": "Voir l\u2019emplacement si {helper} est introuvable",
|
|
734
838
|
"permission.pathHelp": "Utilisez cet emplacement pour ajouter le composant aux autorisations syst\xE8me :",
|
|
735
839
|
"permission.ready": "Les autorisations de capture de {helper} sont pr\xEAtes.",
|
|
@@ -817,7 +921,33 @@ var fr_default = {
|
|
|
817
921
|
"error.workspace": "Aucun espace de travail disponible.",
|
|
818
922
|
"error.cancelled": "La session vocale a \xE9t\xE9 annul\xE9e.",
|
|
819
923
|
"error.deviceLimit": "La limite d\u2019appareils de la licence est atteinte.",
|
|
820
|
-
"error.screenshotExport": "La reconnaissance de texte et l\u2019export Word ne sont pas disponibles. Copiez, enregistrez ou \xE9pinglez la capture."
|
|
924
|
+
"error.screenshotExport": "La reconnaissance de texte et l\u2019export Word ne sont pas disponibles. Copiez, enregistrez ou \xE9pinglez la capture.",
|
|
925
|
+
"shortcut.configure": "D\xE9finir le raccourci",
|
|
926
|
+
"shortcut.title": "D\xE9finir le raccourci de capture",
|
|
927
|
+
"shortcut.help": "Appuyez sur le bouton de capture de la souris ou sur le raccourci, puis s\xE9lectionnez une zone \xE0 annoter, copier, enregistrer ou \xE9pingler.",
|
|
928
|
+
"shortcut.unset": "Non d\xE9fini",
|
|
929
|
+
"shortcut.record": "Appuyez sur une combinaison de touches",
|
|
930
|
+
"shortcut.recordHelp": "Incluez au moins une touche de modification, comme Command, Ctrl ou Alt.",
|
|
931
|
+
"shortcut.suggested": "Utiliser la combinaison sugg\xE9r\xE9e {shortcut}",
|
|
932
|
+
"shortcut.clear": "Effacer",
|
|
933
|
+
"shortcut.save": "Enregistrer",
|
|
934
|
+
"shortcut.saving": "Enregistrement\u2026",
|
|
935
|
+
"shortcut.invalid": "Raccourci invalide ou r\xE9serv\xE9 par le syst\xE8me",
|
|
936
|
+
"shortcut.unavailable": "Impossible d\u2019enregistrer des raccourcis de capture dans cet environnement.",
|
|
937
|
+
"shortcut.saveFailed": "Impossible d\u2019enregistrer le raccourci. Le r\xE9glage pr\xE9c\xE9dent est conserv\xE9.",
|
|
938
|
+
"shortcut.conflict": "Ce raccourci est d\xE9j\xE0 utilis\xE9. Choisissez une autre combinaison.",
|
|
939
|
+
"permission.system": "Autorisations syst\xE8me",
|
|
940
|
+
"permission.intro": "Accordez les autorisations syst\xE8me suivantes avant la premi\xE8re utilisation.",
|
|
941
|
+
"permission.allGranted": "Les autorisations de capture et d\u2019insertion de texte sont pr\xEAtes.",
|
|
942
|
+
"permission.grant": "Autoriser",
|
|
943
|
+
"permission.typingTitle": "Insertion de texte",
|
|
944
|
+
"permission.screenTitle": "Captures d\u2019\xE9cran",
|
|
945
|
+
"permission.scrollTitle": "Capture avec d\xE9filement automatique",
|
|
946
|
+
"permission.optional": "Facultatif",
|
|
947
|
+
"permission.screenHelp": "Requis pour les captures. La superposition de capture reste ferm\xE9e tant que l\u2019autorisation n\u2019est pas accord\xE9e.",
|
|
948
|
+
"permission.scrollHelp": "Les captures normales et le d\xE9filement manuel restent disponibles sans cette autorisation.",
|
|
949
|
+
"permission.locations": "Composant introuvable dans les autorisations ? Voir son emplacement",
|
|
950
|
+
"shortcut.autoSave": "Les r\xE9glages sont enregistr\xE9s automatiquement"
|
|
821
951
|
};
|
|
822
952
|
|
|
823
953
|
// src/shared/locales/de.json
|
|
@@ -886,7 +1016,7 @@ var de_default = {
|
|
|
886
1016
|
"permission.checkTyping": "Eingabeberechtigungen erneut pr\xFCfen",
|
|
887
1017
|
"permission.checkScreenshot": "Screenshot-Berechtigungen erneut pr\xFCfen",
|
|
888
1018
|
"permission.checking": "Wird gepr\xFCft\u2026",
|
|
889
|
-
"permission.recheck": "
|
|
1019
|
+
"permission.recheck": "Erneut pr\xFCfen",
|
|
890
1020
|
"permission.location": "Speicherort anzeigen, falls {helper} fehlt",
|
|
891
1021
|
"permission.pathHelp": "Diesen Pfad zum manuellen Hinzuf\xFCgen in den Systemeinstellungen verwenden:",
|
|
892
1022
|
"permission.ready": "Screenshot-Berechtigungen f\xFCr {helper} sind bereit.",
|
|
@@ -974,7 +1104,33 @@ var de_default = {
|
|
|
974
1104
|
"error.workspace": "Kein Arbeitsbereich verf\xFCgbar.",
|
|
975
1105
|
"error.cancelled": "Die Sprachsitzung wurde abgebrochen.",
|
|
976
1106
|
"error.deviceLimit": "Die maximale Ger\xE4tezahl der Lizenz ist erreicht.",
|
|
977
|
-
"error.screenshotExport": "Texterkennung und Word-Export sind nicht verf\xFCgbar. Nutzen Sie Kopieren, Speichern oder Anheften."
|
|
1107
|
+
"error.screenshotExport": "Texterkennung und Word-Export sind nicht verf\xFCgbar. Nutzen Sie Kopieren, Speichern oder Anheften.",
|
|
1108
|
+
"shortcut.configure": "Tastenk\xFCrzel festlegen",
|
|
1109
|
+
"shortcut.title": "Tastenk\xFCrzel f\xFCr Bildschirmfotos festlegen",
|
|
1110
|
+
"shortcut.help": "Dr\xFCcke die Aufnahmetaste der Maus oder das Tastenk\xFCrzel und w\xE4hle einen Bereich zum Kommentieren, Kopieren, Speichern oder Anheften aus.",
|
|
1111
|
+
"shortcut.unset": "Nicht festgelegt",
|
|
1112
|
+
"shortcut.record": "Tastenkombination dr\xFCcken",
|
|
1113
|
+
"shortcut.recordHelp": "Verwende mindestens eine Zusatztaste wie Command, Strg oder Alt.",
|
|
1114
|
+
"shortcut.suggested": "Vorgeschlagene Kombination {shortcut} verwenden",
|
|
1115
|
+
"shortcut.clear": "Entfernen",
|
|
1116
|
+
"shortcut.save": "Speichern",
|
|
1117
|
+
"shortcut.saving": "Wird gespeichert\u2026",
|
|
1118
|
+
"shortcut.invalid": "Ung\xFCltiges oder vom System reserviertes Tastenk\xFCrzel",
|
|
1119
|
+
"shortcut.unavailable": "In dieser Umgebung k\xF6nnen keine globalen Tastenk\xFCrzel f\xFCr Bildschirmfotos registriert werden.",
|
|
1120
|
+
"shortcut.saveFailed": "Das Tastenk\xFCrzel konnte nicht gespeichert werden. Die bisherige Einstellung bleibt erhalten.",
|
|
1121
|
+
"shortcut.conflict": "Dieses Tastenk\xFCrzel wird bereits verwendet. W\xE4hle eine andere Kombination.",
|
|
1122
|
+
"permission.system": "Systemberechtigungen",
|
|
1123
|
+
"permission.intro": "Erteile vor der ersten Verwendung die folgenden Systemberechtigungen.",
|
|
1124
|
+
"permission.allGranted": "Die Berechtigungen f\xFCr Bildschirmfotos und Texteingabe sind bereit.",
|
|
1125
|
+
"permission.grant": "Berechtigung erteilen",
|
|
1126
|
+
"permission.typingTitle": "Texteingabe",
|
|
1127
|
+
"permission.screenTitle": "Bildschirmfotos",
|
|
1128
|
+
"permission.scrollTitle": "Automatische Scroll-Aufnahme",
|
|
1129
|
+
"permission.optional": "Optional",
|
|
1130
|
+
"permission.screenHelp": "F\xFCr Bildschirmfotos erforderlich. Die Aufnahmeansicht wird erst nach Erteilung der Berechtigung ge\xF6ffnet.",
|
|
1131
|
+
"permission.scrollHelp": "Normale Bildschirmfotos und manuelles Scrollen bleiben ohne diese Berechtigung verf\xFCgbar.",
|
|
1132
|
+
"permission.locations": "Komponente in den Berechtigungen nicht gefunden? Speicherort anzeigen",
|
|
1133
|
+
"shortcut.autoSave": "Einstellungen werden automatisch gespeichert"
|
|
978
1134
|
};
|
|
979
1135
|
|
|
980
1136
|
// src/shared/locales/ru.json
|
|
@@ -1043,7 +1199,7 @@ var ru_default = {
|
|
|
1043
1199
|
"permission.checkTyping": "\u041F\u0440\u043E\u0432\u0435\u0440\u0438\u0442\u044C \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043D\u0438\u044F \u0432\u0432\u043E\u0434\u0430",
|
|
1044
1200
|
"permission.checkScreenshot": "\u041F\u0440\u043E\u0432\u0435\u0440\u0438\u0442\u044C \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043D\u0438\u044F \u0441\u043D\u0438\u043C\u043A\u043E\u0432 \u044D\u043A\u0440\u0430\u043D\u0430",
|
|
1045
1201
|
"permission.checking": "\u041F\u0440\u043E\u0432\u0435\u0440\u043A\u0430\u2026",
|
|
1046
|
-
"permission.recheck": "\
|
|
1202
|
+
"permission.recheck": "\u041F\u0440\u043E\u0432\u0435\u0440\u0438\u0442\u044C \u0441\u043D\u043E\u0432\u0430",
|
|
1047
1203
|
"permission.location": "\u0420\u0430\u0441\u043F\u043E\u043B\u043E\u0436\u0435\u043D\u0438\u0435 \u043A\u043E\u043C\u043F\u043E\u043D\u0435\u043D\u0442\u0430, \u0435\u0441\u043B\u0438 {helper} \u043D\u0435 \u043D\u0430\u0439\u0434\u0435\u043D",
|
|
1048
1204
|
"permission.pathHelp": "\u0418\u0441\u043F\u043E\u043B\u044C\u0437\u0443\u0439\u0442\u0435 \u044D\u0442\u043E\u0442 \u043F\u0443\u0442\u044C \u0434\u043B\u044F \u0434\u043E\u0431\u0430\u0432\u043B\u0435\u043D\u0438\u044F \u043A\u043E\u043C\u043F\u043E\u043D\u0435\u043D\u0442\u0430 \u0432 \u0441\u043F\u0438\u0441\u043E\u043A \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043D\u0438\u0439 \u0441\u0438\u0441\u0442\u0435\u043C\u044B:",
|
|
1049
1205
|
"permission.ready": "\u0420\u0430\u0437\u0440\u0435\u0448\u0435\u043D\u0438\u044F \u0441\u043D\u0438\u043C\u043A\u043E\u0432 \u044D\u043A\u0440\u0430\u043D\u0430 \u0434\u043B\u044F {helper} \u0433\u043E\u0442\u043E\u0432\u044B.",
|
|
@@ -1131,7 +1287,33 @@ var ru_default = {
|
|
|
1131
1287
|
"error.workspace": "\u041D\u0435\u0442 \u0434\u043E\u0441\u0442\u0443\u043F\u043D\u043E\u0433\u043E \u0440\u0430\u0431\u043E\u0447\u0435\u0433\u043E \u043F\u0440\u043E\u0441\u0442\u0440\u0430\u043D\u0441\u0442\u0432\u0430.",
|
|
1132
1288
|
"error.cancelled": "\u0413\u043E\u043B\u043E\u0441\u043E\u0432\u043E\u0439 \u0441\u0435\u0430\u043D\u0441 \u043E\u0442\u043C\u0435\u043D\u0451\u043D.",
|
|
1133
1289
|
"error.deviceLimit": "\u0414\u043E\u0441\u0442\u0438\u0433\u043D\u0443\u0442 \u043B\u0438\u043C\u0438\u0442 \u0443\u0441\u0442\u0440\u043E\u0439\u0441\u0442\u0432 \u043B\u0438\u0446\u0435\u043D\u0437\u0438\u0438.",
|
|
1134
|
-
"error.screenshotExport": "\u0420\u0430\u0441\u043F\u043E\u0437\u043D\u0430\u0432\u0430\u043D\u0438\u0435 \u0442\u0435\u043A\u0441\u0442\u0430 \u043D\u0430 \u0441\u043D\u0438\u043C\u043A\u0435 \u0438 \u044D\u043A\u0441\u043F\u043E\u0440\u0442 \u0432 Word \u043D\u0435\u0434\u043E\u0441\u0442\u0443\u043F\u043D\u044B. \u0421\u043A\u043E\u043F\u0438\u0440\u0443\u0439\u0442\u0435, \u0441\u043E\u0445\u0440\u0430\u043D\u0438\u0442\u0435 \u0438\u043B\u0438 \u0437\u0430\u043A\u0440\u0435\u043F\u0438\u0442\u0435 \u0441\u043D\u0438\u043C\u043E\u043A."
|
|
1290
|
+
"error.screenshotExport": "\u0420\u0430\u0441\u043F\u043E\u0437\u043D\u0430\u0432\u0430\u043D\u0438\u0435 \u0442\u0435\u043A\u0441\u0442\u0430 \u043D\u0430 \u0441\u043D\u0438\u043C\u043A\u0435 \u0438 \u044D\u043A\u0441\u043F\u043E\u0440\u0442 \u0432 Word \u043D\u0435\u0434\u043E\u0441\u0442\u0443\u043F\u043D\u044B. \u0421\u043A\u043E\u043F\u0438\u0440\u0443\u0439\u0442\u0435, \u0441\u043E\u0445\u0440\u0430\u043D\u0438\u0442\u0435 \u0438\u043B\u0438 \u0437\u0430\u043A\u0440\u0435\u043F\u0438\u0442\u0435 \u0441\u043D\u0438\u043C\u043E\u043A.",
|
|
1291
|
+
"shortcut.configure": "\u0417\u0430\u0434\u0430\u0442\u044C \u0441\u043E\u0447\u0435\u0442\u0430\u043D\u0438\u0435 \u043A\u043B\u0430\u0432\u0438\u0448",
|
|
1292
|
+
"shortcut.title": "\u0417\u0430\u0434\u0430\u0442\u044C \u0441\u043E\u0447\u0435\u0442\u0430\u043D\u0438\u0435 \u043A\u043B\u0430\u0432\u0438\u0448 \u0434\u043B\u044F \u0441\u043D\u0438\u043C\u043A\u0430",
|
|
1293
|
+
"shortcut.help": "\u041D\u0430\u0436\u043C\u0438\u0442\u0435 \u043A\u043D\u043E\u043F\u043A\u0443 \u0441\u043D\u0438\u043C\u043A\u0430 \u043D\u0430 \u043C\u044B\u0448\u0438 \u0438\u043B\u0438 \u0441\u043E\u0447\u0435\u0442\u0430\u043D\u0438\u0435 \u043A\u043B\u0430\u0432\u0438\u0448, \u0437\u0430\u0442\u0435\u043C \u0432\u044B\u0434\u0435\u043B\u0438\u0442\u0435 \u043E\u0431\u043B\u0430\u0441\u0442\u044C \u0434\u043B\u044F \u0430\u043D\u043D\u043E\u0442\u0430\u0446\u0438\u0439, \u043A\u043E\u043F\u0438\u0440\u043E\u0432\u0430\u043D\u0438\u044F, \u0441\u043E\u0445\u0440\u0430\u043D\u0435\u043D\u0438\u044F \u0438\u043B\u0438 \u0437\u0430\u043A\u0440\u0435\u043F\u043B\u0435\u043D\u0438\u044F.",
|
|
1294
|
+
"shortcut.unset": "\u041D\u0435 \u0437\u0430\u0434\u0430\u043D\u043E",
|
|
1295
|
+
"shortcut.record": "\u041D\u0430\u0436\u043C\u0438\u0442\u0435 \u0441\u043E\u0447\u0435\u0442\u0430\u043D\u0438\u0435 \u043A\u043B\u0430\u0432\u0438\u0448",
|
|
1296
|
+
"shortcut.recordHelp": "\u0414\u043E\u0431\u0430\u0432\u044C\u0442\u0435 \u0445\u043E\u0442\u044F \u0431\u044B \u043E\u0434\u043D\u0443 \u043A\u043B\u0430\u0432\u0438\u0448\u0443-\u043C\u043E\u0434\u0438\u0444\u0438\u043A\u0430\u0442\u043E\u0440, \u043D\u0430\u043F\u0440\u0438\u043C\u0435\u0440 Command, Ctrl \u0438\u043B\u0438 Alt.",
|
|
1297
|
+
"shortcut.suggested": "\u0418\u0441\u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u044C \u0441\u043E\u0447\u0435\u0442\u0430\u043D\u0438\u0435 {shortcut}",
|
|
1298
|
+
"shortcut.clear": "\u041E\u0447\u0438\u0441\u0442\u0438\u0442\u044C",
|
|
1299
|
+
"shortcut.save": "\u0421\u043E\u0445\u0440\u0430\u043D\u0438\u0442\u044C",
|
|
1300
|
+
"shortcut.saving": "\u0421\u043E\u0445\u0440\u0430\u043D\u0435\u043D\u0438\u0435\u2026",
|
|
1301
|
+
"shortcut.invalid": "\u041D\u0435\u0434\u043E\u043F\u0443\u0441\u0442\u0438\u043C\u043E\u0435 \u0438\u043B\u0438 \u0437\u0430\u0440\u0435\u0437\u0435\u0440\u0432\u0438\u0440\u043E\u0432\u0430\u043D\u043D\u043E\u0435 \u0441\u0438\u0441\u0442\u0435\u043C\u043E\u0439 \u0441\u043E\u0447\u0435\u0442\u0430\u043D\u0438\u0435 \u043A\u043B\u0430\u0432\u0438\u0448",
|
|
1302
|
+
"shortcut.unavailable": "\u0412 \u044D\u0442\u043E\u0439 \u0441\u0440\u0435\u0434\u0435 \u043D\u0435\u043B\u044C\u0437\u044F \u0437\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043E\u0432\u0430\u0442\u044C \u0441\u043E\u0447\u0435\u0442\u0430\u043D\u0438\u0435 \u043A\u043B\u0430\u0432\u0438\u0448 \u0434\u043B\u044F \u0441\u043D\u0438\u043C\u043A\u043E\u0432.",
|
|
1303
|
+
"shortcut.saveFailed": "\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u0441\u043E\u0445\u0440\u0430\u043D\u0438\u0442\u044C \u0441\u043E\u0447\u0435\u0442\u0430\u043D\u0438\u0435 \u043A\u043B\u0430\u0432\u0438\u0448. \u041F\u0440\u0435\u0434\u044B\u0434\u0443\u0449\u0430\u044F \u043D\u0430\u0441\u0442\u0440\u043E\u0439\u043A\u0430 \u0441\u043E\u0445\u0440\u0430\u043D\u0435\u043D\u0430.",
|
|
1304
|
+
"shortcut.conflict": "\u042D\u0442\u043E \u0441\u043E\u0447\u0435\u0442\u0430\u043D\u0438\u0435 \u043A\u043B\u0430\u0432\u0438\u0448 \u0443\u0436\u0435 \u0438\u0441\u043F\u043E\u043B\u044C\u0437\u0443\u0435\u0442\u0441\u044F. \u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u0434\u0440\u0443\u0433\u043E\u0435.",
|
|
1305
|
+
"permission.system": "\u0421\u0438\u0441\u0442\u0435\u043C\u043D\u044B\u0435 \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043D\u0438\u044F",
|
|
1306
|
+
"permission.intro": "\u041F\u0435\u0440\u0435\u0434 \u043F\u0435\u0440\u0432\u044B\u043C \u0438\u0441\u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u043D\u0438\u0435\u043C \u043F\u0440\u0435\u0434\u043E\u0441\u0442\u0430\u0432\u044C\u0442\u0435 \u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0438\u0435 \u0441\u0438\u0441\u0442\u0435\u043C\u043D\u044B\u0435 \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043D\u0438\u044F.",
|
|
1307
|
+
"permission.allGranted": "\u0420\u0430\u0437\u0440\u0435\u0448\u0435\u043D\u0438\u044F \u0434\u043B\u044F \u0441\u043D\u0438\u043C\u043A\u043E\u0432 \u0438 \u0432\u0432\u043E\u0434\u0430 \u0442\u0435\u043A\u0441\u0442\u0430 \u043F\u0440\u0435\u0434\u043E\u0441\u0442\u0430\u0432\u043B\u0435\u043D\u044B.",
|
|
1308
|
+
"permission.grant": "\u041F\u0440\u0435\u0434\u043E\u0441\u0442\u0430\u0432\u0438\u0442\u044C \u0434\u043E\u0441\u0442\u0443\u043F",
|
|
1309
|
+
"permission.typingTitle": "\u0412\u0432\u043E\u0434 \u0442\u0435\u043A\u0441\u0442\u0430",
|
|
1310
|
+
"permission.screenTitle": "\u0421\u043D\u0438\u043C\u043A\u0438 \u044D\u043A\u0440\u0430\u043D\u0430",
|
|
1311
|
+
"permission.scrollTitle": "\u0421\u043D\u0438\u043C\u043A\u0438 \u0441 \u0430\u0432\u0442\u043E\u043C\u0430\u0442\u0438\u0447\u0435\u0441\u043A\u043E\u0439 \u043F\u0440\u043E\u043A\u0440\u0443\u0442\u043A\u043E\u0439",
|
|
1312
|
+
"permission.optional": "\u041D\u0435\u043E\u0431\u044F\u0437\u0430\u0442\u0435\u043B\u044C\u043D\u043E",
|
|
1313
|
+
"permission.screenHelp": "\u041D\u0435\u043E\u0431\u0445\u043E\u0434\u0438\u043C\u043E \u0434\u043B\u044F \u0441\u043D\u0438\u043C\u043A\u043E\u0432. \u041E\u043A\u043D\u043E \u0437\u0430\u0445\u0432\u0430\u0442\u0430 \u043D\u0435 \u043E\u0442\u043A\u0440\u043E\u0435\u0442\u0441\u044F, \u043F\u043E\u043A\u0430 \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043D\u0438\u0435 \u043D\u0435 \u043F\u0440\u0435\u0434\u043E\u0441\u0442\u0430\u0432\u043B\u0435\u043D\u043E.",
|
|
1314
|
+
"permission.scrollHelp": "\u041E\u0431\u044B\u0447\u043D\u044B\u0435 \u0441\u043D\u0438\u043C\u043A\u0438 \u0438 \u0440\u0443\u0447\u043D\u0430\u044F \u043F\u0440\u043E\u043A\u0440\u0443\u0442\u043A\u0430 \u0434\u043E\u0441\u0442\u0443\u043F\u043D\u044B \u0438 \u0431\u0435\u0437 \u044D\u0442\u043E\u0433\u043E \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043D\u0438\u044F.",
|
|
1315
|
+
"permission.locations": "\u041D\u0435 \u043C\u043E\u0436\u0435\u0442\u0435 \u043D\u0430\u0439\u0442\u0438 \u043A\u043E\u043C\u043F\u043E\u043D\u0435\u043D\u0442 \u0432 \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043D\u0438\u044F\u0445? \u041F\u043E\u043A\u0430\u0437\u0430\u0442\u044C \u0440\u0430\u0441\u043F\u043E\u043B\u043E\u0436\u0435\u043D\u0438\u0435",
|
|
1316
|
+
"shortcut.autoSave": "\u041D\u0430\u0441\u0442\u0440\u043E\u0439\u043A\u0438 \u0441\u043E\u0445\u0440\u0430\u043D\u044F\u044E\u0442\u0441\u044F \u0430\u0432\u0442\u043E\u043C\u0430\u0442\u0438\u0447\u0435\u0441\u043A\u0438"
|
|
1135
1317
|
};
|
|
1136
1318
|
|
|
1137
1319
|
// src/shared/locales/pt.json
|
|
@@ -1200,7 +1382,7 @@ var pt_default = {
|
|
|
1200
1382
|
"permission.checkTyping": "Verificar permiss\xF5es de digita\xE7\xE3o",
|
|
1201
1383
|
"permission.checkScreenshot": "Verificar permiss\xF5es de captura",
|
|
1202
1384
|
"permission.checking": "Verificando\u2026",
|
|
1203
|
-
"permission.recheck": "
|
|
1385
|
+
"permission.recheck": "Verificar novamente",
|
|
1204
1386
|
"permission.location": "Ver localiza\xE7\xE3o se {helper} n\xE3o for encontrado",
|
|
1205
1387
|
"permission.pathHelp": "Use este local para adicionar o componente \xE0 lista de permiss\xF5es do sistema:",
|
|
1206
1388
|
"permission.ready": "As permiss\xF5es de captura de {helper} est\xE3o prontas.",
|
|
@@ -1288,7 +1470,33 @@ var pt_default = {
|
|
|
1288
1470
|
"error.workspace": "Nenhum espa\xE7o de trabalho dispon\xEDvel.",
|
|
1289
1471
|
"error.cancelled": "A sess\xE3o de voz foi cancelada.",
|
|
1290
1472
|
"error.deviceLimit": "O limite de dispositivos da licen\xE7a foi atingido.",
|
|
1291
|
-
"error.screenshotExport": "OCR de capturas e exporta\xE7\xE3o para Word n\xE3o est\xE3o dispon\xEDveis. Copie, salve ou fixe a captura."
|
|
1473
|
+
"error.screenshotExport": "OCR de capturas e exporta\xE7\xE3o para Word n\xE3o est\xE3o dispon\xEDveis. Copie, salve ou fixe a captura.",
|
|
1474
|
+
"shortcut.configure": "Definir atalho",
|
|
1475
|
+
"shortcut.title": "Definir atalho de captura",
|
|
1476
|
+
"shortcut.help": "Pressione o bot\xE3o de captura do mouse ou o atalho e selecione uma \xE1rea para anotar, copiar, salvar ou fixar.",
|
|
1477
|
+
"shortcut.unset": "N\xE3o definido",
|
|
1478
|
+
"shortcut.record": "Pressione uma combina\xE7\xE3o de teclas",
|
|
1479
|
+
"shortcut.recordHelp": "Inclua pelo menos um modificador, como Command, Ctrl ou Alt.",
|
|
1480
|
+
"shortcut.suggested": "Usar combina\xE7\xE3o sugerida {shortcut}",
|
|
1481
|
+
"shortcut.clear": "Limpar",
|
|
1482
|
+
"shortcut.save": "Salvar",
|
|
1483
|
+
"shortcut.saving": "Salvando\u2026",
|
|
1484
|
+
"shortcut.invalid": "Atalho inv\xE1lido ou reservado pelo sistema",
|
|
1485
|
+
"shortcut.unavailable": "N\xE3o \xE9 poss\xEDvel registrar atalhos de captura neste ambiente.",
|
|
1486
|
+
"shortcut.saveFailed": "N\xE3o foi poss\xEDvel salvar o atalho. A configura\xE7\xE3o anterior foi mantida.",
|
|
1487
|
+
"shortcut.conflict": "Este atalho j\xE1 est\xE1 em uso. Escolha outra combina\xE7\xE3o.",
|
|
1488
|
+
"permission.system": "Permiss\xF5es do sistema",
|
|
1489
|
+
"permission.intro": "Conceda as seguintes permiss\xF5es do sistema antes do primeiro uso.",
|
|
1490
|
+
"permission.allGranted": "As permiss\xF5es para capturas e inser\xE7\xE3o de texto est\xE3o prontas.",
|
|
1491
|
+
"permission.grant": "Conceder acesso",
|
|
1492
|
+
"permission.typingTitle": "Inser\xE7\xE3o de texto",
|
|
1493
|
+
"permission.screenTitle": "Capturas de tela",
|
|
1494
|
+
"permission.scrollTitle": "Captura com rolagem autom\xE1tica",
|
|
1495
|
+
"permission.optional": "Opcional",
|
|
1496
|
+
"permission.screenHelp": "Necess\xE1ria para capturas. A sobreposi\xE7\xE3o de captura n\xE3o aparece at\xE9 que a permiss\xE3o seja concedida.",
|
|
1497
|
+
"permission.scrollHelp": "Capturas normais e rolagem manual continuam dispon\xEDveis sem esta permiss\xE3o.",
|
|
1498
|
+
"permission.locations": "N\xE3o encontrou um componente nas permiss\xF5es? Ver localiza\xE7\xE3o",
|
|
1499
|
+
"shortcut.autoSave": "As configura\xE7\xF5es s\xE3o salvas automaticamente"
|
|
1292
1500
|
};
|
|
1293
1501
|
|
|
1294
1502
|
// src/shared/i18n.mjs
|
|
@@ -1378,8 +1586,8 @@ function registerLocale(ctx) {
|
|
|
1378
1586
|
}
|
|
1379
1587
|
|
|
1380
1588
|
// src/client/index.jsx
|
|
1381
|
-
var
|
|
1382
|
-
var
|
|
1589
|
+
var import_react7 = __toESM(require("react"), 1);
|
|
1590
|
+
var import_dsh_client_ui_primitives4 = require("@deepseek-ai/dsh-client-ui-primitives");
|
|
1383
1591
|
|
|
1384
1592
|
// node_modules/zod/v4/classic/external.js
|
|
1385
1593
|
var external_exports = {};
|
|
@@ -21305,6 +21513,79 @@ function sourceRecognitionLanguage(from) {
|
|
|
21305
21513
|
return REC_LANG_LIST.find((item) => item.language === locale && item.accent === "mandarin" && item.rlang === "");
|
|
21306
21514
|
}
|
|
21307
21515
|
|
|
21516
|
+
// src/shared/screenshot-shortcut.mjs
|
|
21517
|
+
var modifierOrder = ["Control", "Alt", "Shift", "Meta"];
|
|
21518
|
+
var namedKeys = [
|
|
21519
|
+
"ArrowLeft",
|
|
21520
|
+
"ArrowRight",
|
|
21521
|
+
"ArrowUp",
|
|
21522
|
+
"ArrowDown",
|
|
21523
|
+
"Home",
|
|
21524
|
+
"End",
|
|
21525
|
+
"PageUp",
|
|
21526
|
+
"PageDown",
|
|
21527
|
+
"Insert",
|
|
21528
|
+
"Delete",
|
|
21529
|
+
"Backspace",
|
|
21530
|
+
"Space",
|
|
21531
|
+
"Tab",
|
|
21532
|
+
"Enter",
|
|
21533
|
+
"Escape"
|
|
21534
|
+
];
|
|
21535
|
+
var shortcutBindingSchema = external_exports.object({
|
|
21536
|
+
code: external_exports.string().refine((code) => /^(?:Key[A-Z]|Digit[0-9]|F(?:[1-9]|10|11))$/.test(code) || namedKeys.includes(code)),
|
|
21537
|
+
modifiers: external_exports.array(external_exports.enum(modifierOrder)).min(1).max(4).refine((value) => new Set(value).size === value.length)
|
|
21538
|
+
}).strict();
|
|
21539
|
+
var shortcutStateSchema = external_exports.object({
|
|
21540
|
+
supported: external_exports.boolean(),
|
|
21541
|
+
platform: external_exports.enum(["win32", "darwin", "other"]),
|
|
21542
|
+
binding: shortcutBindingSchema.nullable(),
|
|
21543
|
+
registered: external_exports.boolean(),
|
|
21544
|
+
error: external_exports.string().max(4096)
|
|
21545
|
+
}).strict();
|
|
21546
|
+
function normalizeShortcut(input2, platform) {
|
|
21547
|
+
if (input2 === null) return null;
|
|
21548
|
+
const result = shortcutBindingSchema.safeParse(input2);
|
|
21549
|
+
if (!result.success || !["win32", "darwin"].includes(platform)) throw new Error(message("shortcut.invalid"));
|
|
21550
|
+
const { code } = result.data;
|
|
21551
|
+
const modifiers = modifierOrder.filter((modifier) => result.data.modifiers.includes(modifier));
|
|
21552
|
+
const has = (modifier) => modifiers.includes(modifier);
|
|
21553
|
+
if (!has("Control") && !has("Alt") && !has("Meta")) throw new Error(message("shortcut.invalid"));
|
|
21554
|
+
if (platform === "win32" && (has("Meta") || has("Alt") && ["Tab", "Escape", "F4"].includes(code) || has("Control") && code === "Escape" || has("Control") && has("Alt") && code === "Delete"))
|
|
21555
|
+
throw new Error(message("shortcut.invalid"));
|
|
21556
|
+
if (platform === "darwin" && has("Meta") && (["Tab", "Space"].includes(code) || has("Alt") && code === "Escape" || !has("Alt") && ["KeyQ", "KeyH"].includes(code)))
|
|
21557
|
+
throw new Error(message("shortcut.invalid"));
|
|
21558
|
+
return { code, modifiers };
|
|
21559
|
+
}
|
|
21560
|
+
function bindingFromEvent(event2, platform) {
|
|
21561
|
+
if (!event2 || event2.isComposing || event2.repeat || event2.getModifierState?.("AltGraph"))
|
|
21562
|
+
throw new Error(message("shortcut.invalid"));
|
|
21563
|
+
return normalizeShortcut({ code: event2.code, modifiers: modifierOrder.filter((modifier) => ({
|
|
21564
|
+
Control: event2.ctrlKey,
|
|
21565
|
+
Alt: event2.altKey,
|
|
21566
|
+
Shift: event2.shiftKey,
|
|
21567
|
+
Meta: event2.metaKey
|
|
21568
|
+
})[modifier]) }, platform);
|
|
21569
|
+
}
|
|
21570
|
+
function formatShortcut(binding, platform) {
|
|
21571
|
+
if (!binding) return "";
|
|
21572
|
+
const value = normalizeShortcut(binding, platform);
|
|
21573
|
+
const labels = platform === "darwin" ? { Control: "\u2303", Alt: "\u2325", Shift: "\u21E7", Meta: "\u2318" } : { Control: "Ctrl", Alt: "Alt", Shift: "Shift", Meta: "Win" };
|
|
21574
|
+
const keys = {
|
|
21575
|
+
ArrowLeft: "\u2190",
|
|
21576
|
+
ArrowRight: "\u2192",
|
|
21577
|
+
ArrowUp: "\u2191",
|
|
21578
|
+
ArrowDown: "\u2193",
|
|
21579
|
+
Escape: "Esc",
|
|
21580
|
+
Backspace: "Backspace",
|
|
21581
|
+
Space: "Space",
|
|
21582
|
+
PageUp: "PageUp",
|
|
21583
|
+
PageDown: "PageDown"
|
|
21584
|
+
};
|
|
21585
|
+
const key = /^(?:Key|Digit)/.test(value.code) ? value.code.replace(/^(?:Key|Digit)/, "") : keys[value.code] ?? value.code;
|
|
21586
|
+
return [...value.modifiers.map((modifier) => labels[modifier]), key].join(platform === "darwin" ? " " : " + ");
|
|
21587
|
+
}
|
|
21588
|
+
|
|
21308
21589
|
// src/shared/remote.mjs
|
|
21309
21590
|
var PACKAGE = "@sonicloud/dsh-sonicloud-device";
|
|
21310
21591
|
var text = external_exports.string().max(4096);
|
|
@@ -21335,6 +21616,7 @@ var device = external_exports.object({
|
|
|
21335
21616
|
var devices = external_exports.object({ status: text, devices: external_exports.array(device), recognitionLanguages: external_exports.array(external_exports.string()), translationReady: external_exports.boolean() });
|
|
21336
21617
|
var session = { sessionId: external_exports.string() };
|
|
21337
21618
|
var event = external_exports.discriminatedUnion("type", [
|
|
21619
|
+
external_exports.object({ type: external_exports.literal("screenshotShortcut"), value: shortcutStateSchema }),
|
|
21338
21620
|
devices.extend({ type: external_exports.literal("devices") }),
|
|
21339
21621
|
external_exports.object({ type: external_exports.literal("notice"), message: text }),
|
|
21340
21622
|
external_exports.object({ type: external_exports.literal("request"), ...session, sn: external_exports.string(), action: external_exports.enum(["voice_input", "translate", "speechSearch"]) }),
|
|
@@ -21363,6 +21645,9 @@ var REMOTE = {
|
|
|
21363
21645
|
define("catalog", [], catalog),
|
|
21364
21646
|
define("devices", [], devices),
|
|
21365
21647
|
define("captureScreenshot", [], external_exports.boolean()),
|
|
21648
|
+
define("screenshotShortcut", [], shortcutStateSchema),
|
|
21649
|
+
define("setScreenshotShortcut", [["binding", shortcutBindingSchema.nullable()]], shortcutStateSchema),
|
|
21650
|
+
define("pauseScreenshotShortcut", [["clientId", id], ["paused", external_exports.boolean()]], shortcutStateSchema),
|
|
21366
21651
|
define(
|
|
21367
21652
|
"screenshotPermissions",
|
|
21368
21653
|
[["action", external_exports.enum(["check", "screen", "accessibility", "refresh"])]],
|
|
@@ -21563,6 +21848,156 @@ var DeviceController = class {
|
|
|
21563
21848
|
dismissToast(id2) {
|
|
21564
21849
|
if (this.state.toast?.id === id2) this.publish({ toast: void 0 });
|
|
21565
21850
|
}
|
|
21851
|
+
async refreshScreenshotShortcut() {
|
|
21852
|
+
if (this.lifetime.signal.aborted || typeof this.api.screenshotShortcut !== "function" || this.shortcutLease || this.shortcutSaving) return void 0;
|
|
21853
|
+
const epoch = this.permissionEpoch ?? 0, revision = this.shortcutRevision ?? 0;
|
|
21854
|
+
if (this.shortcutRead?.epoch === epoch && this.shortcutRead.revision === revision) return this.shortcutRead.promise;
|
|
21855
|
+
const request = { epoch, revision };
|
|
21856
|
+
this.shortcutRead = request;
|
|
21857
|
+
request.promise = Promise.resolve().then(async () => {
|
|
21858
|
+
try {
|
|
21859
|
+
const result = await this.api.screenshotShortcut();
|
|
21860
|
+
if (this.lifetime.signal.aborted || epoch !== (this.permissionEpoch ?? 0) || revision !== (this.shortcutRevision ?? 0)) return void 0;
|
|
21861
|
+
const value = this.shortcutResult(result);
|
|
21862
|
+
this.publish({ screenshotShortcut: value, screenshotShortcutError: value.error });
|
|
21863
|
+
return value;
|
|
21864
|
+
} catch (error62) {
|
|
21865
|
+
if (!this.lifetime.signal.aborted && epoch === (this.permissionEpoch ?? 0) && revision === (this.shortcutRevision ?? 0))
|
|
21866
|
+
this.publish({ screenshotShortcutError: error62.message || message("shortcut.unavailable") });
|
|
21867
|
+
return void 0;
|
|
21868
|
+
} finally {
|
|
21869
|
+
if (this.shortcutRead === request) this.shortcutRead = void 0;
|
|
21870
|
+
}
|
|
21871
|
+
});
|
|
21872
|
+
return request.promise;
|
|
21873
|
+
}
|
|
21874
|
+
shortcutResult(result) {
|
|
21875
|
+
if (!result?.ok) throw new Error(result?.error?.message || message("shortcut.unavailable"));
|
|
21876
|
+
const parsed = shortcutStateSchema.safeParse(result.value);
|
|
21877
|
+
if (!parsed.success) throw new Error(message("shortcut.unavailable"));
|
|
21878
|
+
return parsed.data;
|
|
21879
|
+
}
|
|
21880
|
+
async setScreenshotShortcut(binding) {
|
|
21881
|
+
if (this.lifetime.signal.aborted || this.shortcutSaving || typeof this.api.setScreenshotShortcut !== "function") return false;
|
|
21882
|
+
this.shortcutSaving = true;
|
|
21883
|
+
this.shortcutRevision = (this.shortcutRevision ?? 0) + 1;
|
|
21884
|
+
const epoch = this.permissionEpoch ?? 0;
|
|
21885
|
+
this.publish({ screenshotShortcutBusy: true, screenshotShortcutError: "" });
|
|
21886
|
+
try {
|
|
21887
|
+
const value = this.shortcutResult(await this.api.setScreenshotShortcut(binding));
|
|
21888
|
+
if (this.lifetime.signal.aborted || epoch !== (this.permissionEpoch ?? 0)) return false;
|
|
21889
|
+
if (value.error) throw new Error(value.error);
|
|
21890
|
+
this.publish({ screenshotShortcut: value, screenshotShortcutError: "" });
|
|
21891
|
+
return true;
|
|
21892
|
+
} catch (error62) {
|
|
21893
|
+
if (!this.lifetime.signal.aborted && epoch === (this.permissionEpoch ?? 0)) this.publish({ screenshotShortcutError: error62.message || message("shortcut.saveFailed") });
|
|
21894
|
+
return false;
|
|
21895
|
+
} finally {
|
|
21896
|
+
this.shortcutSaving = false;
|
|
21897
|
+
if (!this.lifetime.signal.aborted) this.publish({ screenshotShortcutBusy: false });
|
|
21898
|
+
}
|
|
21899
|
+
}
|
|
21900
|
+
async beginShortcutRecording() {
|
|
21901
|
+
if (this.lifetime.signal.aborted || this.shortcutLease || this.shortcutOpening || this.shortcutSaving) return false;
|
|
21902
|
+
if (this.shortcutEnding) await this.shortcutEnding;
|
|
21903
|
+
if (this.lifetime.signal.aborted || this.shortcutLease || this.shortcutOpening || this.shortcutSaving) return false;
|
|
21904
|
+
this.shortcutOpening = true;
|
|
21905
|
+
const lease = { id: crypto.randomUUID(), epoch: this.permissionEpoch ?? 0, renewing: false };
|
|
21906
|
+
this.shortcutRevision = (this.shortcutRevision ?? 0) + 1;
|
|
21907
|
+
this.shortcutLease = lease;
|
|
21908
|
+
this.publish({ screenshotShortcutOpening: true, screenshotShortcutError: "" });
|
|
21909
|
+
try {
|
|
21910
|
+
if (typeof this.api.pauseScreenshotShortcut !== "function") throw new Error(message("shortcut.unavailable"));
|
|
21911
|
+
const value = this.shortcutResult(await this.api.pauseScreenshotShortcut(lease.id, true));
|
|
21912
|
+
if (!value.supported || value.error) throw new Error(value.error || message("shortcut.unavailable"));
|
|
21913
|
+
if (this.lifetime.signal.aborted || this.shortcutLease !== lease || lease.epoch !== (this.permissionEpoch ?? 0)) {
|
|
21914
|
+
void this.api.pauseScreenshotShortcut(lease.id, false).catch(() => {
|
|
21915
|
+
});
|
|
21916
|
+
return false;
|
|
21917
|
+
}
|
|
21918
|
+
lease.guard = this.shortcutInputGuard;
|
|
21919
|
+
if (lease.guard) {
|
|
21920
|
+
lease.guardReady = Promise.resolve().then(() => lease.guard(true));
|
|
21921
|
+
await lease.guardReady;
|
|
21922
|
+
}
|
|
21923
|
+
if (this.lifetime.signal.aborted || this.shortcutLease !== lease || lease.epoch !== (this.permissionEpoch ?? 0)) {
|
|
21924
|
+
void this.releaseShortcutInput(lease);
|
|
21925
|
+
void this.api.pauseScreenshotShortcut(lease.id, false).catch(() => {
|
|
21926
|
+
});
|
|
21927
|
+
return false;
|
|
21928
|
+
}
|
|
21929
|
+
this.publish({ screenshotShortcutRecording: true });
|
|
21930
|
+
lease.timer = setInterval(() => {
|
|
21931
|
+
void this.renewShortcutRecording(lease);
|
|
21932
|
+
}, 1e4);
|
|
21933
|
+
return true;
|
|
21934
|
+
} catch (error62) {
|
|
21935
|
+
void this.releaseShortcutInput(lease);
|
|
21936
|
+
void Promise.resolve().then(() => this.api.pauseScreenshotShortcut?.(lease.id, false)).catch(() => {
|
|
21937
|
+
});
|
|
21938
|
+
if (this.shortcutLease === lease) this.shortcutLease = void 0;
|
|
21939
|
+
if (!this.lifetime.signal.aborted) this.publish({ screenshotShortcutError: error62.message || message("shortcut.unavailable"), screenshotShortcutRecording: false });
|
|
21940
|
+
return false;
|
|
21941
|
+
} finally {
|
|
21942
|
+
this.shortcutOpening = false;
|
|
21943
|
+
if (!this.lifetime.signal.aborted) this.publish({ screenshotShortcutOpening: false });
|
|
21944
|
+
}
|
|
21945
|
+
}
|
|
21946
|
+
async releaseShortcutInput(lease) {
|
|
21947
|
+
if (!lease.guard) return;
|
|
21948
|
+
await lease.guardReady?.catch(() => {
|
|
21949
|
+
});
|
|
21950
|
+
try {
|
|
21951
|
+
await lease.guard(false);
|
|
21952
|
+
} catch {
|
|
21953
|
+
}
|
|
21954
|
+
}
|
|
21955
|
+
async renewShortcutRecording(lease) {
|
|
21956
|
+
if (this.shortcutLease !== lease || lease.renewing || this.lifetime.signal.aborted) return;
|
|
21957
|
+
lease.renewing = true;
|
|
21958
|
+
try {
|
|
21959
|
+
const value = this.shortcutResult(await this.api.pauseScreenshotShortcut(lease.id, true));
|
|
21960
|
+
if (!value.supported || value.error) throw new Error(value.error || message("shortcut.unavailable"));
|
|
21961
|
+
} catch (error62) {
|
|
21962
|
+
if (this.shortcutLease === lease && !this.lifetime.signal.aborted) {
|
|
21963
|
+
this.publish({ screenshotShortcutError: error62.message || message("shortcut.unavailable") });
|
|
21964
|
+
await this.endShortcutRecording();
|
|
21965
|
+
}
|
|
21966
|
+
} finally {
|
|
21967
|
+
lease.renewing = false;
|
|
21968
|
+
}
|
|
21969
|
+
}
|
|
21970
|
+
endShortcutRecording() {
|
|
21971
|
+
if (this.shortcutEnding) return this.shortcutEnding;
|
|
21972
|
+
const lease = this.shortcutLease;
|
|
21973
|
+
if (!lease) return Promise.resolve();
|
|
21974
|
+
this.shortcutLease = void 0;
|
|
21975
|
+
clearInterval(lease.timer);
|
|
21976
|
+
if (!this.lifetime.signal.aborted) this.publish({ screenshotShortcutRecording: false });
|
|
21977
|
+
const ending = Promise.all([this.releaseShortcutInput(lease), Promise.resolve().then(() => this.api.pauseScreenshotShortcut?.(lease.id, false))]).then(([, result]) => {
|
|
21978
|
+
if (!this.lifetime.signal.aborted && !this.shortcutLease && lease.epoch === (this.permissionEpoch ?? 0) && result) {
|
|
21979
|
+
const value = this.shortcutResult(result);
|
|
21980
|
+
this.publish({ screenshotShortcut: value });
|
|
21981
|
+
}
|
|
21982
|
+
}).catch((error62) => {
|
|
21983
|
+
if (!this.lifetime.signal.aborted) this.publish({ screenshotShortcutError: error62.message || message("shortcut.unavailable") });
|
|
21984
|
+
}).finally(() => {
|
|
21985
|
+
if (this.shortcutEnding === ending) this.shortcutEnding = void 0;
|
|
21986
|
+
});
|
|
21987
|
+
this.shortcutEnding = ending;
|
|
21988
|
+
return ending;
|
|
21989
|
+
}
|
|
21990
|
+
async resetDeviceAndShortcut(device2) {
|
|
21991
|
+
if (this.resetting || this.state.screenshotShortcutBusy || this.shortcutLease) return false;
|
|
21992
|
+
this.resetting = true;
|
|
21993
|
+
try {
|
|
21994
|
+
if (typeof this.api.setScreenshotShortcut === "function" && !await this.setScreenshotShortcut(null)) return false;
|
|
21995
|
+
if (device2?.type === "smart-mouse" && device2.identityConfirmed && device2.preferences) await this.preferences(device2).reset();
|
|
21996
|
+
return true;
|
|
21997
|
+
} finally {
|
|
21998
|
+
this.resetting = false;
|
|
21999
|
+
}
|
|
22000
|
+
}
|
|
21566
22001
|
refreshScreenshotPermissions(action = "check", options) {
|
|
21567
22002
|
return this.refreshPermissionStatus("screenshot", action, options);
|
|
21568
22003
|
}
|
|
@@ -21639,6 +22074,7 @@ var DeviceController = class {
|
|
|
21639
22074
|
this.permissionPrompted = false;
|
|
21640
22075
|
void this.refreshScreenshotPermissions("check", { automatic: true });
|
|
21641
22076
|
void this.refreshTypingPermissions("check", { automatic: true });
|
|
22077
|
+
void this.refreshScreenshotShortcut();
|
|
21642
22078
|
try {
|
|
21643
22079
|
this.stream = this.api.watch(this.clientId, signal);
|
|
21644
22080
|
for await (const event2 of this.stream) {
|
|
@@ -21652,6 +22088,7 @@ var DeviceController = class {
|
|
|
21652
22088
|
}
|
|
21653
22089
|
if (signal.aborted) return;
|
|
21654
22090
|
this.permissionEpoch++;
|
|
22091
|
+
void this.endShortcutRecording();
|
|
21655
22092
|
this.publish({
|
|
21656
22093
|
status: message("status.reconnecting"),
|
|
21657
22094
|
devices: [],
|
|
@@ -21673,14 +22110,24 @@ var DeviceController = class {
|
|
|
21673
22110
|
if (event2.type === "devices") {
|
|
21674
22111
|
void this.locale?.sync(this.api).catch(() => {
|
|
21675
22112
|
});
|
|
22113
|
+
void this.refreshScreenshotShortcut();
|
|
21676
22114
|
const { type, ...state } = event2;
|
|
21677
22115
|
for (const device2 of event2.devices) this.editors.get(device2.sn)?.sync(device2);
|
|
21678
22116
|
this.publish(state);
|
|
21679
22117
|
return;
|
|
21680
22118
|
}
|
|
22119
|
+
if (event2.type === "screenshotShortcut") {
|
|
22120
|
+
const parsed = shortcutStateSchema.safeParse(event2.value);
|
|
22121
|
+
if (parsed.success && !this.lifetime.signal.aborted) {
|
|
22122
|
+
this.shortcutRevision = (this.shortcutRevision ?? 0) + 1;
|
|
22123
|
+
this.publish({ screenshotShortcut: parsed.data, screenshotShortcutError: parsed.data.error });
|
|
22124
|
+
}
|
|
22125
|
+
return;
|
|
22126
|
+
}
|
|
21681
22127
|
if (event2.type === "notice") this.notice(event2.message);
|
|
21682
22128
|
}
|
|
21683
22129
|
dispose() {
|
|
22130
|
+
void this.endShortcutRecording();
|
|
21684
22131
|
for (const dispose of this.localeCleanups) dispose();
|
|
21685
22132
|
this.lifetime.abort();
|
|
21686
22133
|
this.stream?.dispose?.();
|
|
@@ -21915,18 +22362,125 @@ function languageLabel(item, locale) {
|
|
|
21915
22362
|
return item.label;
|
|
21916
22363
|
}
|
|
21917
22364
|
|
|
21918
|
-
// src/client/
|
|
22365
|
+
// src/client/ScreenshotShortcut.jsx
|
|
21919
22366
|
var import_react3 = __toESM(require("react"), 1);
|
|
21920
22367
|
var import_dsh_client_ui_primitives = require("@deepseek-ai/dsh-client-ui-primitives");
|
|
22368
|
+
function ScreenshotShortcut({ controller, state }) {
|
|
22369
|
+
const { t, text: text2 } = useLocale();
|
|
22370
|
+
const [open2, setOpen] = (0, import_react3.useState)(false), [draft, setDraft] = (0, import_react3.useState)(null), [error62, setError] = (0, import_react3.useState)("");
|
|
22371
|
+
const mounted = (0, import_react3.useRef)(true), opened = (0, import_react3.useRef)(false);
|
|
22372
|
+
const shortcut = state.screenshotShortcut;
|
|
22373
|
+
const platform = shortcut?.platform ?? "other";
|
|
22374
|
+
const busy = state.screenshotShortcutBusy;
|
|
22375
|
+
const suggested = { code: "KeyS", modifiers: platform === "darwin" ? ["Shift", "Meta"] : ["Control", "Shift"] };
|
|
22376
|
+
(0, import_react3.useEffect)(() => {
|
|
22377
|
+
mounted.current = true;
|
|
22378
|
+
return () => {
|
|
22379
|
+
mounted.current = false;
|
|
22380
|
+
if (opened.current) void controller.endShortcutRecording();
|
|
22381
|
+
};
|
|
22382
|
+
}, [controller]);
|
|
22383
|
+
(0, import_react3.useEffect)(() => {
|
|
22384
|
+
if (open2 && !state.screenshotShortcutRecording) {
|
|
22385
|
+
opened.current = false;
|
|
22386
|
+
setOpen(false);
|
|
22387
|
+
}
|
|
22388
|
+
}, [open2, state.screenshotShortcutRecording]);
|
|
22389
|
+
const close = async () => {
|
|
22390
|
+
if (busy) return;
|
|
22391
|
+
opened.current = false;
|
|
22392
|
+
setOpen(false);
|
|
22393
|
+
await controller.endShortcutRecording();
|
|
22394
|
+
};
|
|
22395
|
+
const begin = async () => {
|
|
22396
|
+
const current = controller.state.screenshotShortcut ?? await controller.refreshScreenshotShortcut();
|
|
22397
|
+
if (!current?.supported || !mounted.current) return;
|
|
22398
|
+
setDraft(current.binding);
|
|
22399
|
+
setError("");
|
|
22400
|
+
if (!await controller.beginShortcutRecording()) return;
|
|
22401
|
+
if (!mounted.current) {
|
|
22402
|
+
void controller.endShortcutRecording();
|
|
22403
|
+
return;
|
|
22404
|
+
}
|
|
22405
|
+
opened.current = true;
|
|
22406
|
+
setOpen(true);
|
|
22407
|
+
};
|
|
22408
|
+
const save = async (value) => {
|
|
22409
|
+
if (!open2 || !state.screenshotShortcutRecording) return;
|
|
22410
|
+
setError("");
|
|
22411
|
+
if (await controller.setScreenshotShortcut(value)) {
|
|
22412
|
+
opened.current = false;
|
|
22413
|
+
setOpen(false);
|
|
22414
|
+
await controller.endShortcutRecording();
|
|
22415
|
+
}
|
|
22416
|
+
};
|
|
22417
|
+
const record2 = (event2) => {
|
|
22418
|
+
if (!open2 || !state.screenshotShortcutRecording || busy || event2.repeat || event2.isComposing || event2.nativeEvent?.isComposing || event2.keyCode === 229) return;
|
|
22419
|
+
if (event2.key === "Tab" || event2.key === "Escape") return;
|
|
22420
|
+
event2.preventDefault();
|
|
22421
|
+
event2.stopPropagation();
|
|
22422
|
+
if (["Control", "Shift", "Alt", "Meta"].includes(event2.key)) return;
|
|
22423
|
+
try {
|
|
22424
|
+
setDraft(bindingFromEvent(event2, platform));
|
|
22425
|
+
setError("");
|
|
22426
|
+
} catch {
|
|
22427
|
+
setError(message("shortcut.invalid"));
|
|
22428
|
+
}
|
|
22429
|
+
};
|
|
22430
|
+
return /* @__PURE__ */ import_react3.default.createElement(import_react3.default.Fragment, null, /* @__PURE__ */ import_react3.default.createElement("div", { className: "dsh-mouse-row dsh-mouse-screenshot" }, /* @__PURE__ */ import_react3.default.createElement("div", { className: "dsh-mouse-label" }, /* @__PURE__ */ import_react3.default.createElement("span", null, t("screenshot.title")), /* @__PURE__ */ import_react3.default.createElement("p", null, t("shortcut.help"))), /* @__PURE__ */ import_react3.default.createElement("div", { className: "dsh-mouse-controls" }, /* @__PURE__ */ import_react3.default.createElement("span", { className: `dsh-mouse-shortcut-value${shortcut?.binding ? " is-set" : ""}` }, formatShortcut(shortcut?.binding ?? null, platform) || t("shortcut.unset")), /* @__PURE__ */ import_react3.default.createElement(import_dsh_client_ui_primitives.Button, { "aria-label": t("shortcut.configure"), disabled: busy || state.screenshotShortcutOpening || state.screenshotShortcutRecording || shortcut?.supported === false, onClick: () => {
|
|
22431
|
+
void begin();
|
|
22432
|
+
} }, state.screenshotShortcutOpening ? t("permission.checking") : t("shortcut.configure")))), !open2 && state.screenshotShortcutError && /* @__PURE__ */ import_react3.default.createElement("p", { className: "dsh-asr-error dsh-mouse-inline-message", role: "alert" }, text2(state.screenshotShortcutError)), /* @__PURE__ */ import_react3.default.createElement(
|
|
22433
|
+
import_dsh_client_ui_primitives.Modal,
|
|
22434
|
+
{
|
|
22435
|
+
open: open2,
|
|
22436
|
+
onClose: () => {
|
|
22437
|
+
void close();
|
|
22438
|
+
},
|
|
22439
|
+
title: t("shortcut.title"),
|
|
22440
|
+
closeLabel: t("panel.close"),
|
|
22441
|
+
description: t("shortcut.recordHelp"),
|
|
22442
|
+
className: "dsh-mouse-shortcut-dialog",
|
|
22443
|
+
footer: /* @__PURE__ */ import_react3.default.createElement(import_react3.default.Fragment, null, /* @__PURE__ */ import_react3.default.createElement(import_dsh_client_ui_primitives.Button, { disabled: busy, onClick: () => {
|
|
22444
|
+
void save(null);
|
|
22445
|
+
} }, t("shortcut.clear")), /* @__PURE__ */ import_react3.default.createElement(import_dsh_client_ui_primitives.Button, { disabled: busy, onClick: () => {
|
|
22446
|
+
void close();
|
|
22447
|
+
} }, t("panel.cancel")), /* @__PURE__ */ import_react3.default.createElement(import_dsh_client_ui_primitives.Button, { disabled: busy || !draft || !state.screenshotShortcutRecording, onClick: () => {
|
|
22448
|
+
void save(draft);
|
|
22449
|
+
} }, busy ? t("shortcut.saving") : t("shortcut.save")))
|
|
22450
|
+
},
|
|
22451
|
+
/* @__PURE__ */ import_react3.default.createElement(
|
|
22452
|
+
import_dsh_client_ui_primitives.Input,
|
|
22453
|
+
{
|
|
22454
|
+
"aria-label": t("shortcut.record"),
|
|
22455
|
+
"data-modal-autofocus": true,
|
|
22456
|
+
readOnly: true,
|
|
22457
|
+
disabled: busy || !state.screenshotShortcutRecording,
|
|
22458
|
+
value: formatShortcut(draft, platform),
|
|
22459
|
+
placeholder: t("shortcut.record"),
|
|
22460
|
+
onKeyDown: record2,
|
|
22461
|
+
className: "dsh-mouse-shortcut-input"
|
|
22462
|
+
}
|
|
22463
|
+
),
|
|
22464
|
+
/* @__PURE__ */ import_react3.default.createElement(import_dsh_client_ui_primitives.Button, { className: "dsh-mouse-shortcut-suggested", disabled: busy || !state.screenshotShortcutRecording, onClick: () => {
|
|
22465
|
+
setDraft(suggested);
|
|
22466
|
+
setError("");
|
|
22467
|
+
} }, t("shortcut.suggested", { shortcut: formatShortcut(suggested, platform) })),
|
|
22468
|
+
(error62 || state.screenshotShortcutError) && /* @__PURE__ */ import_react3.default.createElement("p", { role: "alert", className: "dsh-asr-error dsh-mouse-inline-message" }, text2(error62 || state.screenshotShortcutError))
|
|
22469
|
+
));
|
|
22470
|
+
}
|
|
22471
|
+
|
|
22472
|
+
// src/client/Devices.jsx
|
|
22473
|
+
var import_react4 = __toESM(require("react"), 1);
|
|
22474
|
+
var import_dsh_client_ui_primitives2 = require("@deepseek-ai/dsh-client-ui-primitives");
|
|
21921
22475
|
function Row({ label, description, children }) {
|
|
21922
|
-
return /* @__PURE__ */
|
|
22476
|
+
return /* @__PURE__ */ import_react4.default.createElement("div", { className: "dsh-mouse-row" }, /* @__PURE__ */ import_react4.default.createElement("div", { className: "dsh-mouse-label" }, /* @__PURE__ */ import_react4.default.createElement("span", null, label), description && /* @__PURE__ */ import_react4.default.createElement("p", null, description)), children && /* @__PURE__ */ import_react4.default.createElement("div", { className: "dsh-mouse-controls" }, children));
|
|
21923
22477
|
}
|
|
21924
22478
|
function Select({ label, value, onChange, options }) {
|
|
21925
22479
|
const { t } = useLocale();
|
|
21926
|
-
const [open2, setOpen] = (0,
|
|
21927
|
-
const trigger = (0,
|
|
21928
|
-
return /* @__PURE__ */
|
|
21929
|
-
|
|
22480
|
+
const [open2, setOpen] = (0, import_react4.useState)(false);
|
|
22481
|
+
const trigger = (0, import_react4.useRef)(null);
|
|
22482
|
+
return /* @__PURE__ */ import_react4.default.createElement(
|
|
22483
|
+
import_dsh_client_ui_primitives2.Menu,
|
|
21930
22484
|
{
|
|
21931
22485
|
open: open2,
|
|
21932
22486
|
portal: true,
|
|
@@ -21941,8 +22495,8 @@ function Select({ label, value, onChange, options }) {
|
|
|
21941
22495
|
setOpen(false);
|
|
21942
22496
|
onChange(value2);
|
|
21943
22497
|
},
|
|
21944
|
-
anchor: /* @__PURE__ */
|
|
21945
|
-
|
|
22498
|
+
anchor: /* @__PURE__ */ import_react4.default.createElement(
|
|
22499
|
+
import_dsh_client_ui_primitives2.Button,
|
|
21946
22500
|
{
|
|
21947
22501
|
ref: trigger,
|
|
21948
22502
|
className: "dsh-mouse-select",
|
|
@@ -21957,8 +22511,8 @@ function Select({ label, value, onChange, options }) {
|
|
|
21957
22511
|
}
|
|
21958
22512
|
}
|
|
21959
22513
|
},
|
|
21960
|
-
/* @__PURE__ */
|
|
21961
|
-
/* @__PURE__ */
|
|
22514
|
+
/* @__PURE__ */ import_react4.default.createElement("span", null, options.find((item) => item.value === value)?.label ?? t("common.choose")),
|
|
22515
|
+
/* @__PURE__ */ import_react4.default.createElement(import_dsh_client_ui_primitives2.IconChevronDownOutlineRegular, { size: 12 })
|
|
21962
22516
|
)
|
|
21963
22517
|
}
|
|
21964
22518
|
);
|
|
@@ -21967,9 +22521,9 @@ function DeviceForm({ device: device2, controller, state }) {
|
|
|
21967
22521
|
const locale = useLocale();
|
|
21968
22522
|
const { t, text: text2 } = locale;
|
|
21969
22523
|
const editor = controller.preferences(device2);
|
|
21970
|
-
const { form, busy, error: error62, invalid } = (0,
|
|
22524
|
+
const { form, busy, error: error62, invalid } = (0, import_react4.useSyncExternalStore)(editor.subscribe, editor.snapshot);
|
|
21971
22525
|
const change = (key, value) => editor.change(key, value);
|
|
21972
|
-
if (!device2.identityConfirmed || !form) return /* @__PURE__ */
|
|
22526
|
+
if (!device2.identityConfirmed || !form) return /* @__PURE__ */ import_react4.default.createElement("p", { role: "status" }, t("device.identityHelp"));
|
|
21973
22527
|
const languages = REC_LANG_LIST.map((item) => ({ value: languageKey(item), label: state.recognitionLanguages.includes(languageKey(item)) ? languageLabel(item, locale) : t("voice.pending", { name: languageLabel(item, locale) }), disabled: !state.recognitionLanguages.includes(languageKey(item)) }));
|
|
21974
22528
|
const sourceOptions = TRANS_FROM_LANG_LIST.map((item) => {
|
|
21975
22529
|
const recognition = sourceRecognitionLanguage(item.value);
|
|
@@ -21977,62 +22531,94 @@ function DeviceForm({ device: device2, controller, state }) {
|
|
|
21977
22531
|
return { ...item, label: supported ? languageLabel(item, locale) : t("voice.recognitionPending", { name: languageLabel(item, locale) }), disabled: !supported };
|
|
21978
22532
|
});
|
|
21979
22533
|
const removedLanguage = !languages.some((item) => item.value === languageKey(form.recognition)) || !sourceOptions.some((item) => item.value === form.from) || !TRANS_TO_LANG_LIST.some((item) => item.value === form.to);
|
|
21980
|
-
return /* @__PURE__ */
|
|
22534
|
+
return /* @__PURE__ */ import_react4.default.createElement("div", { className: "dsh-mouse-form", "aria-busy": busy }, removedLanguage && /* @__PURE__ */ import_react4.default.createElement("p", { role: "alert", className: "dsh-asr-error" }, t("voice.unsupported")), /* @__PURE__ */ import_react4.default.createElement("div", null, /* @__PURE__ */ import_react4.default.createElement(Row, { label: t("voice.input") }, /* @__PURE__ */ import_react4.default.createElement("span", { className: "dsh-mouse-switch" }, /* @__PURE__ */ import_react4.default.createElement("span", null, t("voice.punctuation")), /* @__PURE__ */ import_react4.default.createElement(import_dsh_client_ui_primitives2.Switch, { label: t("voice.punctuation"), checked: form.punctuation, onChange: (value) => change("punctuation", value) })), /* @__PURE__ */ import_react4.default.createElement(Select, { label: t("voice.recognition"), value: languageKey(form.recognition), options: languages, onChange: (value) => {
|
|
21981
22535
|
const item = REC_LANG_LIST.find((item2) => languageKey(item2) === value);
|
|
21982
22536
|
change("recognition", { language: item.language, accent: item.accent, rlang: item.rlang });
|
|
21983
|
-
} })), /* @__PURE__ */
|
|
22537
|
+
} })), /* @__PURE__ */ import_react4.default.createElement(Row, { label: t("voice.translate"), description: !state.translationReady ? t("voice.unavailable") : void 0 }, /* @__PURE__ */ import_react4.default.createElement(Select, { label: t("voice.from"), value: form.from, options: sourceOptions, onChange: (value) => change("from", value) }), /* @__PURE__ */ import_react4.default.createElement("span", { "aria-hidden": "true" }, "\u203A"), /* @__PURE__ */ import_react4.default.createElement(Select, { label: t("voice.to"), value: form.to, options: TRANS_TO_LANG_LIST.map((item) => ({ ...item, label: languageLabel(item, locale) })), onChange: (value) => change("to", value) })), /* @__PURE__ */ import_react4.default.createElement(Row, { label: t("keys.dpi"), description: /* @__PURE__ */ import_react4.default.createElement(import_react4.default.Fragment, null, t("keys.dpiHelp"), device2.dpiState === "failed" && /* @__PURE__ */ import_react4.default.createElement(import_react4.default.Fragment, null, /* @__PURE__ */ import_react4.default.createElement("br", null), /* @__PURE__ */ import_react4.default.createElement("span", { className: "dsh-asr-error" }, t("keys.dpiFailed")))) }, /* @__PURE__ */ import_react4.default.createElement(Select, { label: "DPI", value: form.dpi, options: DPI_LIST, onChange: (value) => change("dpi", value) })), /* @__PURE__ */ import_react4.default.createElement("div", { className: "dsh-mouse-key-group" }, /* @__PURE__ */ import_react4.default.createElement(Row, { label: t("keys.m"), description: t("keys.mHelp") }, /* @__PURE__ */ import_react4.default.createElement(Select, { label: t("keys.mAction"), value: form.mAction, options: actionOptions(M_KEY_FUNC_LIST, t), onChange: (value) => change("mAction", value) })), form.mAction === "speechSearch" && /* @__PURE__ */ import_react4.default.createElement("div", { className: "dsh-mouse-subrow" }, /* @__PURE__ */ import_react4.default.createElement("div", { className: "dsh-mouse-controls" }, /* @__PURE__ */ import_react4.default.createElement(Select, { label: t("keys.searchEngine"), value: form.searchUrl, options: M_KEY_SEARCH_URL_LIST.map((item) => ({ ...item, label: item.value === "https://www.baidu.com/baidu?wd=" && locale.language !== "zh" ? "Baidu" : item.label })), onChange: (value) => change("searchUrl", value) }))), form.mAction === "openWebUrl" && /* @__PURE__ */ import_react4.default.createElement("div", { className: "dsh-mouse-subrow" }, /* @__PURE__ */ import_react4.default.createElement("div", { className: "dsh-mouse-controls dsh-mouse-link-controls" }, /* @__PURE__ */ import_react4.default.createElement(import_dsh_client_ui_primitives2.Input, { "aria-label": t("keys.linkUrl"), type: "url", placeholder: "https://example.com", value: form.linkUrl, "aria-invalid": invalid || void 0, onChange: (event2) => change("linkUrl", event2.target.value) }), /* @__PURE__ */ import_react4.default.createElement(import_dsh_client_ui_primitives2.Button, { disabled: busy, onClick: () => editor.commitLink() }, t("common.confirm"))))), /* @__PURE__ */ import_react4.default.createElement(Row, { label: t("keys.speech"), description: t("keys.speechHelp") }, /* @__PURE__ */ import_react4.default.createElement(Select, { label: t("keys.speechAction"), value: form.speechAction, options: [{ value: "voice_input", label: t("voice.input") }, { value: "translate", label: t("voice.translate") }], onChange: (value) => change("speechAction", value) })), /* @__PURE__ */ import_react4.default.createElement(Row, { label: t("keys.ai"), description: t("keys.aiHelp") }, /* @__PURE__ */ import_react4.default.createElement("span", { className: "dsh-mouse-switch" }, /* @__PURE__ */ import_react4.default.createElement("span", null, t("keys.autoSend")), /* @__PURE__ */ import_react4.default.createElement(import_dsh_client_ui_primitives2.Switch, { label: t("keys.autoSend"), checked: form.aiAutoSend, onChange: (value) => change("aiAutoSend", value) })))), error62 && form.mAction !== "openWebUrl" && /* @__PURE__ */ import_react4.default.createElement("p", { role: "alert", className: "dsh-asr-error" }, text2(error62)));
|
|
21984
22538
|
}
|
|
21985
22539
|
var NO_SIDEBAR = { sidebarVisible: true };
|
|
21986
22540
|
var subscribeNone = () => () => {
|
|
21987
22541
|
};
|
|
22542
|
+
var NO_EDITOR = { busy: false };
|
|
22543
|
+
function ResetControls({ controller, device: device2, state }) {
|
|
22544
|
+
const { t } = useLocale();
|
|
22545
|
+
const editor = device2?.type === "smart-mouse" && device2.identityConfirmed && device2.preferences ? controller.preferences(device2) : void 0;
|
|
22546
|
+
const editorState = (0, import_react4.useSyncExternalStore)(editor?.subscribe ?? subscribeNone, editor?.snapshot ?? (() => NO_EDITOR));
|
|
22547
|
+
const [resetting, setResetting] = (0, import_react4.useState)(false);
|
|
22548
|
+
const busy = resetting || editorState.busy || state.screenshotShortcutBusy;
|
|
22549
|
+
return /* @__PURE__ */ import_react4.default.createElement("div", { className: "dsh-mouse-footer" }, /* @__PURE__ */ import_react4.default.createElement("span", { role: "status", className: "dsh-asr-muted" }, busy ? t("common.applying") : t("shortcut.autoSave")), /* @__PURE__ */ import_react4.default.createElement(import_dsh_client_ui_primitives2.Button, { size: "sm", className: "dsh-mouse-reset", disabled: busy || state.screenshotShortcutRecording || state.screenshotShortcutOpening, onClick: async () => {
|
|
22550
|
+
setResetting(true);
|
|
22551
|
+
try {
|
|
22552
|
+
await controller.resetDeviceAndShortcut(device2);
|
|
22553
|
+
} finally {
|
|
22554
|
+
setResetting(false);
|
|
22555
|
+
}
|
|
22556
|
+
} }, t("common.reset")));
|
|
22557
|
+
}
|
|
22558
|
+
function PermissionStatus({ granted }) {
|
|
22559
|
+
const { t } = useLocale();
|
|
22560
|
+
return /* @__PURE__ */ import_react4.default.createElement("span", { className: `dsh-mouse-permission-status${granted ? " is-granted" : ""}` }, /* @__PURE__ */ import_react4.default.createElement("span", { "aria-hidden": "true" }, granted ? "\u2713" : "\u25CB"), t(granted ? "permission.granted" : "permission.missing"));
|
|
22561
|
+
}
|
|
22562
|
+
function PermissionRow({ label, metadata, help, granted, busy, actionLabel, onGrant, optional: optional2 }) {
|
|
22563
|
+
const { t } = useLocale();
|
|
22564
|
+
return /* @__PURE__ */ import_react4.default.createElement("div", { className: "dsh-mouse-permission-row" }, /* @__PURE__ */ import_react4.default.createElement("div", { className: "dsh-mouse-permission-copy" }, /* @__PURE__ */ import_react4.default.createElement("p", { className: "dsh-mouse-permission-name" }, label, optional2 && /* @__PURE__ */ import_react4.default.createElement("span", { className: "dsh-mouse-permission-optional" }, t("permission.optional"))), /* @__PURE__ */ import_react4.default.createElement("p", { className: "dsh-mouse-permission-meta" }, metadata), !granted && /* @__PURE__ */ import_react4.default.createElement("p", { className: "dsh-mouse-permission-help" }, help)), /* @__PURE__ */ import_react4.default.createElement("div", { className: "dsh-mouse-permission-actions" }, /* @__PURE__ */ import_react4.default.createElement(PermissionStatus, { granted }), !granted && /* @__PURE__ */ import_react4.default.createElement(import_dsh_client_ui_primitives2.Button, { "aria-label": actionLabel, disabled: busy, onClick: onGrant }, t("permission.grant"))));
|
|
22565
|
+
}
|
|
22566
|
+
function SystemPermissions({ controller, state }) {
|
|
22567
|
+
const { t, text: text2 } = useLocale();
|
|
22568
|
+
const typing = state.typingPermissions, screenshot = state.screenshotPermissions;
|
|
22569
|
+
const errors = [state.typingPermissionError, state.screenshotPermissionError].filter(Boolean);
|
|
22570
|
+
const supported = typing?.supported || screenshot?.supported;
|
|
22571
|
+
if (!supported && (!errors.length || state.screenshotShortcut?.platform === "win32")) return null;
|
|
22572
|
+
const busy = state.typingPermissionBusy || state.screenshotPermissionBusy;
|
|
22573
|
+
const granted = typing?.supported && typing.accessibility && screenshot?.supported && screenshot.screenRecording && screenshot.accessibility;
|
|
22574
|
+
return /* @__PURE__ */ import_react4.default.createElement("section", { className: "dsh-mouse-permissions", "aria-label": t("permission.system"), "aria-busy": busy }, /* @__PURE__ */ import_react4.default.createElement("header", { className: "dsh-mouse-permission-header" }, /* @__PURE__ */ import_react4.default.createElement("h3", null, t("permission.system")), /* @__PURE__ */ import_react4.default.createElement(import_dsh_client_ui_primitives2.Button, { className: "dsh-mouse-permission-recheck", "aria-label": t("permission.recheck"), disabled: busy, onClick: () => {
|
|
22575
|
+
void Promise.all([controller.refreshTypingPermissions("refresh"), controller.refreshScreenshotPermissions("refresh")]);
|
|
22576
|
+
} }, busy ? t("permission.checking") : t("permission.recheck"))), /* @__PURE__ */ import_react4.default.createElement("p", { className: "dsh-mouse-permission-intro" }, t(granted ? "permission.allGranted" : "permission.intro")), typing?.supported && /* @__PURE__ */ import_react4.default.createElement("div", { "aria-label": t("permission.typing") }, /* @__PURE__ */ import_react4.default.createElement(PermissionRow, { label: t("permission.typingTitle"), metadata: `${t("permission.accessibility")} \xB7 Sonicloud Voice`, help: t("permission.typingHelp"), granted: typing.accessibility, busy: state.typingPermissionBusy, actionLabel: t("permission.grantTyping"), onGrant: () => controller.refreshTypingPermissions("accessibility") }), !typing.accessibility && state.typingPermissionMessage && /* @__PURE__ */ import_react4.default.createElement("p", { role: "status", className: "dsh-mouse-inline-message" }, text2(state.typingPermissionMessage))), screenshot?.supported && /* @__PURE__ */ import_react4.default.createElement("div", { "aria-label": t("permission.screenshot") }, /* @__PURE__ */ import_react4.default.createElement(PermissionRow, { label: t("permission.screenTitle"), metadata: `${t("permission.screen")} \xB7 screenhelper`, help: t("permission.screenHelp"), granted: screenshot.screenRecording, busy: state.screenshotPermissionBusy, actionLabel: t("permission.grantScreen"), onGrant: () => controller.refreshScreenshotPermissions("screen") }), /* @__PURE__ */ import_react4.default.createElement(PermissionRow, { label: t("permission.scrollTitle"), metadata: `${t("permission.accessibility")} \xB7 screenhelper`, help: t("permission.scrollHelp"), granted: screenshot.accessibility, busy: state.screenshotPermissionBusy, actionLabel: t("permission.grantAccess"), onGrant: () => controller.refreshScreenshotPermissions("accessibility"), optional: true }), (!screenshot.screenRecording || !screenshot.accessibility) && state.screenshotPermissionMessage && /* @__PURE__ */ import_react4.default.createElement("p", { role: "status", className: "dsh-mouse-inline-message" }, text2(state.screenshotPermissionMessage))), errors.map((error62, index) => /* @__PURE__ */ import_react4.default.createElement("p", { key: index, role: "alert", className: "dsh-asr-error dsh-mouse-inline-message" }, text2(error62))), (typing?.supported && !typing.accessibility && typing.helperApp || screenshot?.supported && (!screenshot.screenRecording || !screenshot.accessibility) && screenshot.helperApp) && /* @__PURE__ */ import_react4.default.createElement("details", { className: "dsh-mouse-permission-location" }, /* @__PURE__ */ import_react4.default.createElement("summary", null, t("permission.locations")), /* @__PURE__ */ import_react4.default.createElement("p", null, t("permission.pathHelp")), typing?.supported && !typing.accessibility && typing.helperApp && /* @__PURE__ */ import_react4.default.createElement("p", null, "Sonicloud Voice", /* @__PURE__ */ import_react4.default.createElement("code", null, typing.helperApp)), screenshot?.supported && (!screenshot.screenRecording || !screenshot.accessibility) && screenshot.helperApp && /* @__PURE__ */ import_react4.default.createElement("p", null, "screenhelper", /* @__PURE__ */ import_react4.default.createElement("code", null, screenshot.helperApp))));
|
|
22577
|
+
}
|
|
21988
22578
|
function Devices(props) {
|
|
21989
|
-
return /* @__PURE__ */
|
|
22579
|
+
return /* @__PURE__ */ import_react4.default.createElement(LocaleContext.Provider, { value: props.controller.locale ?? fallbackLocale }, /* @__PURE__ */ import_react4.default.createElement(DevicesContent, { ...props }));
|
|
21990
22580
|
}
|
|
21991
22581
|
function DevicesContent({ controller, sidebar }) {
|
|
21992
22582
|
const locale = useLocale();
|
|
21993
22583
|
const { t, text: text2 } = locale;
|
|
21994
|
-
const state = (0,
|
|
21995
|
-
const { sidebarVisible } = (0,
|
|
21996
|
-
const [selected, setSelected] = (0,
|
|
22584
|
+
const state = (0, import_react4.useSyncExternalStore)(controller.subscribe, controller.snapshot);
|
|
22585
|
+
const { sidebarVisible } = (0, import_react4.useSyncExternalStore)(sidebar?.subscribe ?? subscribeNone, sidebar?.snapshot ?? (() => NO_SIDEBAR));
|
|
22586
|
+
const [selected, setSelected] = (0, import_react4.useState)(null);
|
|
21997
22587
|
const devices2 = state.devices, device2 = devices2.find((item) => item.id === selected) ?? devices2[0];
|
|
21998
22588
|
const index = device2 ? devices2.indexOf(device2) : 0;
|
|
21999
22589
|
const count = new Set(devices2.filter((item) => item.identityConfirmed).map((item) => item.sn)).size;
|
|
22000
|
-
|
|
22001
|
-
const screenMissing = permissions?.supported && !permissions.screenRecording;
|
|
22002
|
-
const permissionBusy = state.screenshotPermissionBusy;
|
|
22003
|
-
const typingPermissions = state.typingPermissions;
|
|
22004
|
-
return /* @__PURE__ */ import_react3.default.createElement("section", { className: "dsh-mouse-settings", "aria-label": t("app.title") }, /* @__PURE__ */ import_react3.default.createElement("header", { className: "dsh-mouse-head" }, /* @__PURE__ */ import_react3.default.createElement("h2", null, t("app.title")), sidebar && /* @__PURE__ */ import_react3.default.createElement("span", { className: "dsh-mouse-switch" }, /* @__PURE__ */ import_react3.default.createElement("span", null, t("app.sidebar")), /* @__PURE__ */ import_react3.default.createElement(import_dsh_client_ui_primitives.Switch, { label: t("app.sidebar"), checked: sidebarVisible, onChange: (value) => sidebar.setVisible(value) }))), /* @__PURE__ */ import_react3.default.createElement("p", { className: "dsh-asr-intro" }, locale.count(count)), !device2 ? /* @__PURE__ */ import_react3.default.createElement("div", { className: "dsh-mouse-empty" }, /* @__PURE__ */ import_react3.default.createElement("span", { "aria-hidden": "true" }, "\u2301"), /* @__PURE__ */ import_react3.default.createElement("h3", null, t("device.empty")), /* @__PURE__ */ import_react3.default.createElement("p", null, t("device.connect")), /* @__PURE__ */ import_react3.default.createElement("p", { className: "dsh-asr-muted" }, text2(state.status))) : /* @__PURE__ */ import_react3.default.createElement(import_react3.default.Fragment, null, /* @__PURE__ */ import_react3.default.createElement("div", { className: "dsh-mouse-carousel" }, devices2.length > 1 && /* @__PURE__ */ import_react3.default.createElement("button", { type: "button", "aria-label": t("device.previous"), onClick: () => setSelected(devices2[(index + devices2.length - 1) % devices2.length].id) }, "\u2039"), /* @__PURE__ */ import_react3.default.createElement("div", { className: "dsh-mouse-product" }, /* @__PURE__ */ import_react3.default.createElement("div", { className: "dsh-mouse-illustration", role: "img", "aria-label": t("device.image") }, /* @__PURE__ */ import_react3.default.createElement("span", { className: "dsh-mouse-wheel" }), /* @__PURE__ */ import_react3.default.createElement("span", { className: "dsh-mouse-ai" }, "AI")), /* @__PURE__ */ import_react3.default.createElement("h3", null, device2.defaultName ? t(device2.type === "smart-mouse" ? "device.mouse" : "device.generic") : device2.name)), devices2.length > 1 && /* @__PURE__ */ import_react3.default.createElement("button", { type: "button", "aria-label": t("device.next"), onClick: () => setSelected(devices2[(index + 1) % devices2.length].id) }, "\u203A")), devices2.length > 1 && /* @__PURE__ */ import_react3.default.createElement("div", { className: "dsh-mouse-dots" }, devices2.map((item, i) => /* @__PURE__ */ import_react3.default.createElement("button", { type: "button", key: item.id, "aria-label": t("device.switch", { index: i + 1 }), "aria-current": item.id === device2.id ? "true" : void 0, onClick: () => setSelected(item.id) }))), /* @__PURE__ */ import_react3.default.createElement(Row, { label: "SN" }, /* @__PURE__ */ import_react3.default.createElement("span", { className: "dsh-mouse-value" }, device2.sn || t("device.identity"))), /* @__PURE__ */ import_react3.default.createElement(Row, { label: t("device.connection") }, /* @__PURE__ */ import_react3.default.createElement("span", { className: "dsh-mouse-value" }, device2.connection === "usb" ? t("device.usb") : t("device.bluetooth"))), /* @__PURE__ */ import_react3.default.createElement(Row, { label: t("device.battery") }, /* @__PURE__ */ import_react3.default.createElement("span", { className: "dsh-mouse-value" }, device2.battery === null ? t("common.unknown") : `${device2.battery}%`)), device2.type === "smart-mouse" ? /* @__PURE__ */ import_react3.default.createElement(DeviceForm, { key: device2.id, device: device2, controller, state }) : /* @__PURE__ */ import_react3.default.createElement("p", null, t("device.unsupported"))), typingPermissions?.supported && /* @__PURE__ */ import_react3.default.createElement("div", { "aria-label": t("permission.typing"), "aria-busy": state.typingPermissionBusy }, /* @__PURE__ */ import_react3.default.createElement("p", null, /* @__PURE__ */ import_react3.default.createElement("strong", null, "Sonicloud Voice"), " ", t("permission.accessibility"), "\uFF1A", typingPermissions.accessibility ? t("permission.granted") : t("permission.missing")), !typingPermissions.accessibility && /* @__PURE__ */ import_react3.default.createElement("p", null, t("permission.typingHelp")), /* @__PURE__ */ import_react3.default.createElement("div", { className: "dsh-mouse-controls" }, !typingPermissions.accessibility && /* @__PURE__ */ import_react3.default.createElement(import_dsh_client_ui_primitives.Button, { "aria-label": t("permission.grantTyping"), disabled: state.typingPermissionBusy, onClick: () => controller.refreshTypingPermissions("accessibility") }, t("permission.grantTyping")), /* @__PURE__ */ import_react3.default.createElement(import_dsh_client_ui_primitives.Button, { "aria-label": t("permission.checkTyping"), disabled: state.typingPermissionBusy, onClick: () => controller.refreshTypingPermissions("refresh") }, state.typingPermissionBusy ? t("permission.checking") : t("permission.recheck"))), state.typingPermissionMessage && /* @__PURE__ */ import_react3.default.createElement("p", { role: "status" }, text2(state.typingPermissionMessage)), !typingPermissions.accessibility && typingPermissions.helperApp && /* @__PURE__ */ import_react3.default.createElement("details", null, /* @__PURE__ */ import_react3.default.createElement("summary", null, t("permission.location", { helper: "Sonicloud Voice" })), /* @__PURE__ */ import_react3.default.createElement("p", null, t("permission.pathHelp")), /* @__PURE__ */ import_react3.default.createElement("code", { style: { overflowWrap: "anywhere" } }, typingPermissions.helperApp))), state.typingPermissionError && /* @__PURE__ */ import_react3.default.createElement("div", { role: "alert" }, /* @__PURE__ */ import_react3.default.createElement("p", null, text2(state.typingPermissionError)), /* @__PURE__ */ import_react3.default.createElement(import_dsh_client_ui_primitives.Button, { "aria-label": t("permission.checkTyping"), disabled: state.typingPermissionBusy, onClick: () => controller.refreshTypingPermissions("refresh") }, state.typingPermissionBusy ? t("permission.checking") : t("permission.checkTyping"))), /* @__PURE__ */ import_react3.default.createElement(Row, { label: t("screenshot.title"), description: screenMissing ? t("screenshot.permissionHelp") : t("screenshot.help") }, /* @__PURE__ */ import_react3.default.createElement(import_dsh_client_ui_primitives.Button, { "aria-label": t("screenshot.start"), disabled: state.screenshotBusy || screenMissing || Boolean(state.screenshotPermissionError) || permissionBusy && !permissions, onClick: () => controller.captureScreenshot() }, state.screenshotBusy ? t("screenshot.starting") : t("screenshot.start"))), permissions?.supported && /* @__PURE__ */ import_react3.default.createElement("div", { "aria-label": t("permission.screenshot"), "aria-busy": permissionBusy }, /* @__PURE__ */ import_react3.default.createElement("p", null, permissions.screenRecording && permissions.accessibility ? t("permission.ready", { helper: "screenhelper" }) : t("permission.grantHelp", { helper: "screenhelper" })), /* @__PURE__ */ import_react3.default.createElement("p", { role: "status" }, t("permission.screenState", { state: t(permissions.screenRecording ? "permission.granted" : "permission.missing") }), /* @__PURE__ */ import_react3.default.createElement("br", null), t("permission.accessState", { state: t(permissions.accessibility ? "permission.granted" : "permission.missing") })), /* @__PURE__ */ import_react3.default.createElement("div", { className: "dsh-mouse-controls" }, !permissions.screenRecording && /* @__PURE__ */ import_react3.default.createElement(import_dsh_client_ui_primitives.Button, { "aria-label": t("permission.grantScreen"), disabled: permissionBusy, onClick: () => controller.refreshScreenshotPermissions("screen") }, t("permission.grantScreen")), !permissions.accessibility && /* @__PURE__ */ import_react3.default.createElement(import_dsh_client_ui_primitives.Button, { "aria-label": t("permission.grantAccess"), disabled: permissionBusy, onClick: () => controller.refreshScreenshotPermissions("accessibility") }, t("permission.grantAccess")), /* @__PURE__ */ import_react3.default.createElement(import_dsh_client_ui_primitives.Button, { "aria-label": t("permission.checkScreenshot"), disabled: permissionBusy, onClick: () => controller.refreshScreenshotPermissions("refresh") }, permissionBusy ? t("permission.checking") : t("permission.recheck"))), state.screenshotPermissionMessage && /* @__PURE__ */ import_react3.default.createElement("p", { role: "status" }, text2(state.screenshotPermissionMessage)), (!permissions.screenRecording || !permissions.accessibility) && permissions.helperApp && /* @__PURE__ */ import_react3.default.createElement("details", null, /* @__PURE__ */ import_react3.default.createElement("summary", null, t("permission.location", { helper: "screenhelper" })), /* @__PURE__ */ import_react3.default.createElement("p", null, t("permission.pathHelp")), /* @__PURE__ */ import_react3.default.createElement("code", { style: { overflowWrap: "anywhere" } }, permissions.helperApp))), state.screenshotPermissionError && /* @__PURE__ */ import_react3.default.createElement("div", { role: "alert" }, /* @__PURE__ */ import_react3.default.createElement("p", null, text2(state.screenshotPermissionError)), /* @__PURE__ */ import_react3.default.createElement(import_dsh_client_ui_primitives.Button, { "aria-label": t("permission.checkScreenshot"), disabled: permissionBusy, onClick: () => controller.refreshScreenshotPermissions("refresh") }, permissionBusy ? t("permission.checking") : t("permission.checkScreenshot"))));
|
|
22590
|
+
return /* @__PURE__ */ import_react4.default.createElement("section", { className: "dsh-mouse-settings", "aria-label": t("app.title") }, /* @__PURE__ */ import_react4.default.createElement("header", { className: "dsh-mouse-head" }, /* @__PURE__ */ import_react4.default.createElement("h2", null, t("app.title")), sidebar && /* @__PURE__ */ import_react4.default.createElement("span", { className: "dsh-mouse-switch" }, /* @__PURE__ */ import_react4.default.createElement("span", null, t("app.sidebar")), /* @__PURE__ */ import_react4.default.createElement(import_dsh_client_ui_primitives2.Switch, { label: t("app.sidebar"), checked: sidebarVisible, onChange: (value) => sidebar.setVisible(value) }))), /* @__PURE__ */ import_react4.default.createElement("p", { className: "dsh-asr-intro" }, locale.count(count)), !device2 ? /* @__PURE__ */ import_react4.default.createElement("div", { className: "dsh-mouse-empty" }, /* @__PURE__ */ import_react4.default.createElement("span", { "aria-hidden": "true" }, "\u2301"), /* @__PURE__ */ import_react4.default.createElement("h3", null, t("device.empty")), /* @__PURE__ */ import_react4.default.createElement("p", null, t("device.connect")), /* @__PURE__ */ import_react4.default.createElement("p", { className: "dsh-asr-muted" }, text2(state.status))) : /* @__PURE__ */ import_react4.default.createElement(import_react4.default.Fragment, null, /* @__PURE__ */ import_react4.default.createElement("div", { className: "dsh-mouse-carousel" }, devices2.length > 1 && /* @__PURE__ */ import_react4.default.createElement("button", { type: "button", "aria-label": t("device.previous"), onClick: () => setSelected(devices2[(index + devices2.length - 1) % devices2.length].id) }, "\u2039"), /* @__PURE__ */ import_react4.default.createElement("div", { className: "dsh-mouse-product" }, /* @__PURE__ */ import_react4.default.createElement("div", { className: "dsh-mouse-illustration", role: "img", "aria-label": t("device.image") }, /* @__PURE__ */ import_react4.default.createElement("span", { className: "dsh-mouse-wheel" }), /* @__PURE__ */ import_react4.default.createElement("span", { className: "dsh-mouse-ai" }, "AI")), /* @__PURE__ */ import_react4.default.createElement("h3", null, device2.defaultName ? t(device2.type === "smart-mouse" ? "device.mouse" : "device.generic") : device2.name)), devices2.length > 1 && /* @__PURE__ */ import_react4.default.createElement("button", { type: "button", "aria-label": t("device.next"), onClick: () => setSelected(devices2[(index + 1) % devices2.length].id) }, "\u203A")), devices2.length > 1 && /* @__PURE__ */ import_react4.default.createElement("div", { className: "dsh-mouse-dots" }, devices2.map((item, i) => /* @__PURE__ */ import_react4.default.createElement("button", { type: "button", key: item.id, "aria-label": t("device.switch", { index: i + 1 }), "aria-current": item.id === device2.id ? "true" : void 0, onClick: () => setSelected(item.id) }))), /* @__PURE__ */ import_react4.default.createElement(Row, { label: "SN" }, /* @__PURE__ */ import_react4.default.createElement("span", { className: "dsh-mouse-value" }, device2.sn || t("device.identity"))), /* @__PURE__ */ import_react4.default.createElement(Row, { label: t("device.connection") }, /* @__PURE__ */ import_react4.default.createElement("span", { className: "dsh-mouse-value" }, device2.connection === "usb" ? t("device.usb") : t("device.bluetooth"))), /* @__PURE__ */ import_react4.default.createElement(Row, { label: t("device.battery") }, /* @__PURE__ */ import_react4.default.createElement("span", { className: "dsh-mouse-value" }, device2.battery === null ? t("common.unknown") : `${device2.battery}%`)), device2.type === "smart-mouse" ? /* @__PURE__ */ import_react4.default.createElement(DeviceForm, { key: device2.id, device: device2, controller, state }) : /* @__PURE__ */ import_react4.default.createElement("p", null, t("device.unsupported"))), /* @__PURE__ */ import_react4.default.createElement(ScreenshotShortcut, { controller, state }), /* @__PURE__ */ import_react4.default.createElement(ResetControls, { controller, device: device2, state }), /* @__PURE__ */ import_react4.default.createElement(SystemPermissions, { controller, state }));
|
|
22005
22591
|
}
|
|
22006
22592
|
function DevicesPanel(props) {
|
|
22007
|
-
return /* @__PURE__ */
|
|
22593
|
+
return /* @__PURE__ */ import_react4.default.createElement("div", { className: "dsh-mouse-panel" }, /* @__PURE__ */ import_react4.default.createElement(Devices, { ...props }));
|
|
22008
22594
|
}
|
|
22009
22595
|
|
|
22010
22596
|
// src/client/Notice.jsx
|
|
22011
|
-
var
|
|
22012
|
-
var
|
|
22597
|
+
var import_react5 = __toESM(require("react"), 1);
|
|
22598
|
+
var import_dsh_client_ui_primitives3 = require("@deepseek-ai/dsh-client-ui-primitives");
|
|
22013
22599
|
function Notice({ controller }) {
|
|
22014
22600
|
const locale = useLocale(controller.locale);
|
|
22015
|
-
const { toast } = (0,
|
|
22016
|
-
return toast ? /* @__PURE__ */
|
|
22017
|
-
|
|
22601
|
+
const { toast } = (0, import_react5.useSyncExternalStore)(controller.subscribe, controller.snapshot);
|
|
22602
|
+
return toast ? /* @__PURE__ */ import_react5.default.createElement(
|
|
22603
|
+
import_dsh_client_ui_primitives3.Toast,
|
|
22018
22604
|
{
|
|
22019
22605
|
key: toast.id,
|
|
22020
22606
|
text: locale.text(toast.message),
|
|
22021
|
-
icon: toast.kind === "success" ? void 0 : /* @__PURE__ */
|
|
22607
|
+
icon: toast.kind === "success" ? void 0 : /* @__PURE__ */ import_react5.default.createElement(import_dsh_client_ui_primitives3.IconWarningOutlineRegular, null),
|
|
22022
22608
|
onDone: () => controller.dismissToast(toast.id)
|
|
22023
22609
|
}
|
|
22024
22610
|
) : null;
|
|
22025
22611
|
}
|
|
22026
22612
|
|
|
22027
22613
|
// src/client/SonicloudIcon.jsx
|
|
22028
|
-
var
|
|
22614
|
+
var import_react6 = __toESM(require("react"), 1);
|
|
22029
22615
|
|
|
22030
22616
|
// src/client/assets/sonicloud.svg
|
|
22031
22617
|
var sonicloud_default = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 256" width="100%" height="100%" fill="currentColor" aria-hidden="true">\n <path d="M138.00,31.82 127.00,33.69 115.00,37.64 103.00,43.84 91.00,52.87 81.51,63.00 74.66,73.00 69.70,83.00 65.59,97.00 52.00,101.74 45.00,105.83 41.00,108.90 33.77,116.00 28.70,123.00 25.86,128.00 21.63,139.00 19.74,149.00 19.74,161.00 21.73,171.00 25.80,181.00 31.76,190.00 41.00,199.21 49.00,204.41 59.00,208.39 70.00,210.06 111.00,210.19 111.82,209.00 111.80,150.00 111.00,147.03 109.00,144.71 106.00,143.63 96.00,143.86 92.00,145.61 89.75,148.00 88.70,150.00 87.83,155.00 87.80,189.00 87.00,189.92 75.00,189.90 69.00,189.34 60.00,186.18 54.00,182.18 48.92,177.00 44.55,170.00 41.85,162.00 41.19,154.00 41.81,147.00 44.85,138.00 48.55,132.00 54.24,126.00 60.00,121.79 67.00,118.70 76.00,116.78 85.00,116.58 85.74,116.00 86.71,104.00 87.69,99.00 89.82,92.00 93.54,84.00 96.63,79.00 102.00,72.36 108.00,66.79 115.00,61.93 121.00,58.81 129.00,55.89 141.00,53.71 152.00,53.84 162.00,55.71 168.00,57.74 176.00,61.63 182.00,65.70 191.31,75.00 198.21,86.00 201.33,94.00 203.25,102.00 204.00,102.66 224.00,102.68 225.34,102.00 224.37,95.00 222.32,87.00 217.28,75.00 209.50,63.00 204.38,57.00 198.00,50.93 186.00,42.53 179.00,38.99 171.00,35.80 164.00,33.79 153.00,31.91Z M136.00,114.87 132.13,116.00 129.00,118.38 126.93,122.00 126.43,125.00 126.33,215.00 126.82,217.00 128.33,219.00 132.00,220.41 137.00,219.44 145.00,215.13 148.14,212.00 149.36,210.00 150.47,206.00 150.28,120.00 149.41,118.00 147.00,115.66 144.00,114.77Z M172.00,95.69 169.26,97.00 167.00,99.18 165.71,102.00 165.48,104.00 165.40,235.00 166.00,235.90 183.00,222.24 189.36,216.00 189.20,105.00 188.31,102.00 187.09,100.00 183.00,96.55 179.00,95.46Z M211.00,131.66 208.39,133.00 206.00,135.23 204.58,138.00 203.98,141.00 203.84,198.00 203.90,200.00 205.00,200.62 213.00,195.24 222.00,187.78 226.27,183.00 227.34,181.00 227.90,178.00 227.92,139.00 227.28,135.00 225.00,132.36 223.00,131.45Z"/>\n</svg>\n';
|
|
22032
22618
|
|
|
22033
22619
|
// src/client/SonicloudIcon.jsx
|
|
22034
22620
|
function SonicloudIcon({ size = 16 }) {
|
|
22035
|
-
return /* @__PURE__ */
|
|
22621
|
+
return /* @__PURE__ */ import_react6.default.createElement(
|
|
22036
22622
|
"span",
|
|
22037
22623
|
{
|
|
22038
22624
|
"aria-hidden": "true",
|
|
@@ -22112,7 +22698,7 @@ function attachSidebarPanel(ctx, { icon, panel, props, preferences, label }) {
|
|
|
22112
22698
|
}
|
|
22113
22699
|
|
|
22114
22700
|
// src/client/styles.css
|
|
22115
|
-
var styles_default = ".dsh-asr-settings { display:flex; flex-direction:column; gap:12px; max-width:720px; color:var(--dsw-alias-label-primary,#202124); }\n.dsh-asr-settings h2 { margin:0; font-size:16px; line-height:24px; font-weight:500; }\n.dsh-asr-intro { margin:0; font-size:14px; line-height:22px; color:var(--dsw-alias-label-tertiary,#858890); }\n.dsh-asr-muted { margin:0; font-size:12px; line-height:18px; color:var(--dsw-alias-label-tertiary,#858890); }\n.dsh-asr-services { list-style:none; margin:12px 0 0; padding:0; display:flex; flex-direction:column; gap:8px; }\n.dsh-asr-service { border:.5px solid var(--dsw-alias-settings-card-stroke,#d8d8dc); background:var(--dsw-alias-settings-card-fill,#fff); border-radius:var(--dsw-radius-xl,20px); padding:14px; display:flex; flex-direction:column; gap:8px; }\n.dsh-asr-service-head { display:flex; flex-wrap:wrap; align-items:center; gap:8px; font-size:14px; }\n.dsh-asr-service-head strong { font-weight:500; }\n.dsh-asr-actions { display:flex; justify-content:flex-end; align-items:center; gap:6px; margin-left:auto; }\n.dsh-asr-tag { border:.5px solid var(--dsw-alias-border-l3,#ddd); border-radius:4px; padding:1px 6px; font-size:11px; color:var(--dsw-alias-label-secondary,#666); }\n.dsh-asr-selected { display:inline-flex; align-items:center; gap:5px; font-size:12px; color:var(--dsw-alias-label-secondary,#666); }\n.dsh-asr-dot { width:8px; height:8px; border-radius:50%; background:var(--dsw-alias-state-business-primary,#4d6bfe); }\n.dsh-asr-address { overflow-wrap:anywhere; font-size:12px; color:var(--dsw-alias-label-secondary,#666); }\n.dsh-asr-key { display:flex; flex-wrap:wrap; align-items:center; gap:8px; font-size:12px; }\n.dsh-asr-key code { overflow-wrap:anywhere; }\n.dsh-asr-delete,.dsh-asr-error { color:var(--dsw-alias-state-error-primary,#e33c3c)!important; }\n.dsh-asr-add { border:1px dashed var(--dsw-alias-settings-card-stroke,#d8d8dc)!important; border-radius:var(--dsw-radius-lg,14px)!important; min-height:48px; width:100%; margin-top:4px; }\n.dsh-asr-form { display:flex; flex-direction:column; gap:14px; min-width:min(420px,70vw); max-width:600px; }\n.dsh-asr-field { display:flex; flex-direction:column; gap:6px; font-size:13px; color:var(--dsw-alias-label-primary,#202124); }\n.dsh-asr-field-row { display:flex; gap:6px; align-items:center; }\n.dsh-asr-field input { box-sizing:border-box; width:100%; min-width:0; height:36px; padding:6px 10px; border:1px solid var(--dsw-alias-settings-card-stroke,#d8d8dc); border-radius:var(--dsw-radius-md,10px); color:inherit; background:var(--dsw-alias-settings-card-fill,#fff); font:inherit; }\n.dsh-asr-field input:focus-visible { outline:2px solid var(--dsw-alias-state-business-primary,#4d6bfe); outline-offset:2px; }\n.dsh-mouse-settings { width:100%; color:var(--dsw-alias-label-primary,#14161a); }\n.dsh-mouse-head { display:flex; align-items:center; justify-content:space-between; gap:16px; margin-bottom:12px; }\n.dsh-mouse-head h2 { margin:0; }\n/* main \u5168\u5C40\u9762\u677F\uFF1A\u5BF9\u9F50\u5BBF\u4E3B\u63D2\u4EF6\u9875\u7ED3\u6784\u2014\u2014\u9875\u9762\u6839\u5360\u636E\u5168\u9AD8\u5E76\u81EA\u5E26\u7EB5\u5411\u6EDA\u52A8\uFF0C\u5185\u5BB9\u9650\u5BBD\u5C45\u4E2D\uFF1B\u9876\u90E8\u5B89\u5168\u8DDD\u79BB\u4EC5 darwin \u9700\u8981\uFF08Windows \u4E3A\u539F\u751F\u6807\u9898\u680F\uFF09\u3002 */\n.dsh-mouse-panel { box-sizing:border-box; height:100%; padding:0 clamp(24px,4vw,48px); display:flex; flex-direction:column; align-items:center; overflow:hidden auto; }\n.dsh-mouse-panel > .dsh-mouse-settings { flex:none; max-width:720px; padding:28px 0 48px; }\n[data-platform='darwin'] .dsh-mouse-panel > .dsh-mouse-settings { padding-top:calc(28px + var(--dsh-frame-top-clearance,0px)); }\n.dsh-mouse-settings h2 { margin:0 0 12px; font-size:16px; line-height:24px; font-weight:500; }\n.dsh-mouse-settings h3 { font-size:16px; font-weight:600; }\n.dsh-mouse-carousel { display:flex; align-items:center; justify-content:center; gap:80px; padding:40px 20px 0; }\n.dsh-mouse-carousel > button { border:0; background:none; font-size:36px; color:var(--dsw-alias-label-tertiary,#858890); cursor:pointer; }\n.dsh-mouse-product { text-align:center; }\n.dsh-mouse-illustration { position:relative; width:105px; height:150px; margin:0 auto; border:1px solid #aeb5c0; border-radius:48% 48% 45% 45%; background:linear-gradient(125deg,#fbfcfd,#d0d4da); }\n.dsh-mouse-illustration:before { content:''; position:absolute; width:1px; height:65px; left:50%; top:0; background:#b1b7c0; }\n.dsh-mouse-wheel { position:absolute; width:10px; height:29px; left:calc(50% - 5px); top:18px; border-radius:8px; background:repeating-linear-gradient(#9ba3b0 0 3px,#cbd0d7 4px 6px); border:1px solid #939aa7; }\n.dsh-mouse-ai { position:absolute; bottom:22px; left:0; width:100%; font-size:9px; letter-spacing:2px; color:#8d949f; }\n.dsh-mouse-dots { display:flex; justify-content:center; gap:12px; margin:0 0 38px; }\n.dsh-mouse-dots button { padding:0; width:7px; height:7px; border:0; border-radius:8px; background:#e5e5e5; cursor:pointer; }\n.dsh-mouse-dots button[aria-current=true] { width:20px; background:var(--dsw-alias-label-primary,#14161a); }\n.dsh-mouse-row { display:flex; justify-content:space-between; align-items:center; gap:8px; padding:16px 0; border-bottom:.5px solid var(--dsw-alias-border-l2,#e8e8ea); }\n.dsh-mouse-label { flex:1; min-width:0; padding-right:48px; font-size:14px; line-height:22px; }\n.dsh-mouse-label p { margin:4px 0 0; color:var(--dsw-alias-label-tertiary,#858890); font-size:12px; line-height:18px; }\n.dsh-mouse-key-group { border-bottom:.5px solid var(--dsw-alias-border-l2,#e8e8ea); }\n.dsh-mouse-key-group > .dsh-mouse-row { border-bottom:0; }\n.dsh-mouse-subrow { display:flex; justify-content:flex-end; padding-bottom:16px; }\n.dsh-mouse-subrow .dsh-mouse-controls { justify-content:flex-end; gap:8px; }\n.dsh-mouse-controls { display:flex; flex-wrap:wrap; justify-content:flex-end; align-items:center; gap:12px; min-width:0; font-size:14px; line-height:22px; }\n.dsh-mouse-controls .dsh-mouse-select { justify-content:space-between; gap:12px; min-height:36px; height:auto; padding:6px 14px; border-radius:var(--dsw-radius-md,10px); background:var(--dsw-alias-bg-module-platform,#f5f6f7); font-size:14px; font-weight:400; }\n.dsh-mouse-controls .dsh-mouse-select:hover { background:var(--dsw-alias-interactive-bg-hover,#eceef1); }\n.dsh-mouse-select > span { white-space:normal; overflow-wrap:anywhere; text-align:start; }\n.dsh-mouse-controls input[type=url] { width:240px; max-width:100%; }\n.dsh-mouse-link-controls { flex-wrap:nowrap; }\n.dsh-mouse-link-controls input[type=url] { min-width:0; }\n.dsh-mouse-link-controls button { flex-shrink:0; }\n.dsh-mouse-value { color:var(--dsw-alias-label-tertiary,#858890); overflow-wrap:anywhere; }\n.dsh-mouse-footer { display:flex; align-items:center; justify-content:space-between; gap:16px; padding-top:16px; }\n.dsh-mouse-footer .dsh-mouse-reset { flex:none; color:var(--dsw-alias-state-warn-label,#b86b00); background:var(--dsw-alias-state-warn-tertiary,#fff4df); }\n.dsh-mouse-footer .dsh-mouse-reset:hover { background:color-mix(in srgb,var(--dsw-alias-state-warn-primary,#b86b00) 18%,transparent); }\n.dsh-mouse-switch { display:flex; align-items:center; gap:8px; color:var(--dsw-alias-label-secondary,#626976); font-size:12px; }\n.dsh-mouse-empty { padding:54px 24px; text-align:center; color:var(--dsw-alias-label-secondary,#626976); }\n.dsh-mouse-empty > span { font-size:54px; }\n@media(max-width:600px) { .dsh-mouse-carousel { gap:32px; }.dsh-mouse-row { align-items:flex-start; flex-direction:column; gap:12px; }.dsh-mouse-label { padding-right:0; }.dsh-mouse-controls { width:100%; justify-content:space-between; }.dsh-mouse-controls .dsh-mouse-select { max-width:230px; } }\n\n.dsh-mouse-settings button { white-space:normal; overflow-wrap:anywhere; }\n.dsh-mouse-head,.dsh-mouse-footer { flex-wrap:wrap; }\n";
|
|
22701
|
+
var styles_default = ".dsh-asr-settings { display:flex; flex-direction:column; gap:12px; max-width:720px; color:var(--dsw-alias-label-primary,#202124); }\n.dsh-asr-settings h2 { margin:0; font-size:16px; line-height:24px; font-weight:500; }\n.dsh-asr-intro { margin:0; font-size:14px; line-height:22px; color:var(--dsw-alias-label-tertiary,#858890); }\n.dsh-asr-muted { margin:0; font-size:12px; line-height:18px; color:var(--dsw-alias-label-tertiary,#858890); }\n.dsh-asr-services { list-style:none; margin:12px 0 0; padding:0; display:flex; flex-direction:column; gap:8px; }\n.dsh-asr-service { border:.5px solid var(--dsw-alias-settings-card-stroke,#d8d8dc); background:var(--dsw-alias-settings-card-fill,#fff); border-radius:var(--dsw-radius-xl,20px); padding:14px; display:flex; flex-direction:column; gap:8px; }\n.dsh-asr-service-head { display:flex; flex-wrap:wrap; align-items:center; gap:8px; font-size:14px; }\n.dsh-asr-service-head strong { font-weight:500; }\n.dsh-asr-actions { display:flex; justify-content:flex-end; align-items:center; gap:6px; margin-left:auto; }\n.dsh-asr-tag { border:.5px solid var(--dsw-alias-border-l3,#ddd); border-radius:4px; padding:1px 6px; font-size:11px; color:var(--dsw-alias-label-secondary,#666); }\n.dsh-asr-selected { display:inline-flex; align-items:center; gap:5px; font-size:12px; color:var(--dsw-alias-label-secondary,#666); }\n.dsh-asr-dot { width:8px; height:8px; border-radius:50%; background:var(--dsw-alias-state-business-primary,#4d6bfe); }\n.dsh-asr-address { overflow-wrap:anywhere; font-size:12px; color:var(--dsw-alias-label-secondary,#666); }\n.dsh-asr-key { display:flex; flex-wrap:wrap; align-items:center; gap:8px; font-size:12px; }\n.dsh-asr-key code { overflow-wrap:anywhere; }\n.dsh-asr-delete,.dsh-asr-error { color:var(--dsw-alias-state-error-primary,#e33c3c)!important; }\n.dsh-asr-add { border:1px dashed var(--dsw-alias-settings-card-stroke,#d8d8dc)!important; border-radius:var(--dsw-radius-lg,14px)!important; min-height:48px; width:100%; margin-top:4px; }\n.dsh-asr-form { display:flex; flex-direction:column; gap:14px; min-width:min(420px,70vw); max-width:600px; }\n.dsh-asr-field { display:flex; flex-direction:column; gap:6px; font-size:13px; color:var(--dsw-alias-label-primary,#202124); }\n.dsh-asr-field-row { display:flex; gap:6px; align-items:center; }\n.dsh-asr-field input { box-sizing:border-box; width:100%; min-width:0; height:36px; padding:6px 10px; border:1px solid var(--dsw-alias-settings-card-stroke,#d8d8dc); border-radius:var(--dsw-radius-md,10px); color:inherit; background:var(--dsw-alias-settings-card-fill,#fff); font:inherit; }\n.dsh-asr-field input:focus-visible { outline:2px solid var(--dsw-alias-state-business-primary,#4d6bfe); outline-offset:2px; }\n.dsh-mouse-settings { width:100%; color:var(--dsw-alias-label-primary,#14161a); }\n.dsh-mouse-head { display:flex; align-items:center; justify-content:space-between; gap:16px; margin-bottom:12px; }\n.dsh-mouse-head h2 { margin:0; }\n/* main \u5168\u5C40\u9762\u677F\uFF1A\u5BF9\u9F50\u5BBF\u4E3B\u63D2\u4EF6\u9875\u7ED3\u6784\u2014\u2014\u9875\u9762\u6839\u5360\u636E\u5168\u9AD8\u5E76\u81EA\u5E26\u7EB5\u5411\u6EDA\u52A8\uFF0C\u5185\u5BB9\u9650\u5BBD\u5C45\u4E2D\uFF1B\u9876\u90E8\u5B89\u5168\u8DDD\u79BB\u4EC5 darwin \u9700\u8981\uFF08Windows \u4E3A\u539F\u751F\u6807\u9898\u680F\uFF09\u3002 */\n.dsh-mouse-panel { box-sizing:border-box; height:100%; padding:0 clamp(24px,4vw,48px); display:flex; flex-direction:column; align-items:center; overflow:hidden auto; }\n.dsh-mouse-panel > .dsh-mouse-settings { flex:none; max-width:720px; padding:28px 0 48px; }\n[data-platform='darwin'] .dsh-mouse-panel > .dsh-mouse-settings { padding-top:calc(28px + var(--dsh-frame-top-clearance,0px)); }\n.dsh-mouse-settings h2 { margin:0 0 12px; font-size:16px; line-height:24px; font-weight:500; }\n.dsh-mouse-settings h3 { font-size:16px; font-weight:600; }\n.dsh-mouse-carousel { display:flex; align-items:center; justify-content:center; gap:80px; padding:40px 20px 0; }\n.dsh-mouse-carousel > button { border:0; background:none; font-size:36px; color:var(--dsw-alias-label-tertiary,#858890); cursor:pointer; }\n.dsh-mouse-product { text-align:center; }\n.dsh-mouse-illustration { position:relative; width:105px; height:150px; margin:0 auto; border:1px solid #aeb5c0; border-radius:48% 48% 45% 45%; background:linear-gradient(125deg,#fbfcfd,#d0d4da); }\n.dsh-mouse-illustration:before { content:''; position:absolute; width:1px; height:65px; left:50%; top:0; background:#b1b7c0; }\n.dsh-mouse-wheel { position:absolute; width:10px; height:29px; left:calc(50% - 5px); top:18px; border-radius:8px; background:repeating-linear-gradient(#9ba3b0 0 3px,#cbd0d7 4px 6px); border:1px solid #939aa7; }\n.dsh-mouse-ai { position:absolute; bottom:22px; left:0; width:100%; font-size:9px; letter-spacing:2px; color:#8d949f; }\n.dsh-mouse-dots { display:flex; justify-content:center; gap:12px; margin:0 0 38px; }\n.dsh-mouse-dots button { padding:0; width:7px; height:7px; border:0; border-radius:8px; background:#e5e5e5; cursor:pointer; }\n.dsh-mouse-dots button[aria-current=true] { width:20px; background:var(--dsw-alias-label-primary,#14161a); }\n.dsh-mouse-row { display:flex; justify-content:space-between; align-items:center; gap:8px; padding:16px 0; border-bottom:.5px solid var(--dsw-alias-border-l2,#e8e8ea); }\n.dsh-mouse-label { flex:1; min-width:0; padding-right:48px; font-size:14px; line-height:22px; }\n.dsh-mouse-label p { margin:4px 0 0; color:var(--dsw-alias-label-tertiary,#858890); font-size:12px; line-height:18px; }\n.dsh-mouse-key-group { border-bottom:.5px solid var(--dsw-alias-border-l2,#e8e8ea); }\n.dsh-mouse-key-group > .dsh-mouse-row { border-bottom:0; }\n.dsh-mouse-subrow { display:flex; justify-content:flex-end; padding-bottom:16px; }\n.dsh-mouse-subrow .dsh-mouse-controls { justify-content:flex-end; gap:8px; }\n.dsh-mouse-controls { display:flex; flex-wrap:wrap; justify-content:flex-end; align-items:center; gap:12px; min-width:0; font-size:14px; line-height:22px; }\n.dsh-mouse-controls .dsh-mouse-select { justify-content:space-between; gap:12px; min-height:36px; height:auto; padding:6px 14px; border-radius:var(--dsw-radius-md,10px); background:var(--dsw-alias-bg-module-platform,#f5f6f7); font-size:14px; font-weight:400; }\n.dsh-mouse-controls .dsh-mouse-select:hover { background:var(--dsw-alias-interactive-bg-hover,#eceef1); }\n.dsh-mouse-select > span { white-space:normal; overflow-wrap:anywhere; text-align:start; }\n.dsh-mouse-controls input[type=url] { width:240px; max-width:100%; }\n.dsh-mouse-link-controls { flex-wrap:nowrap; }\n.dsh-mouse-link-controls input[type=url] { min-width:0; }\n.dsh-mouse-link-controls button { flex-shrink:0; }\n.dsh-mouse-value { color:var(--dsw-alias-label-tertiary,#858890); overflow-wrap:anywhere; }\n.dsh-mouse-footer { display:flex; align-items:center; justify-content:space-between; gap:16px; padding-top:16px; }\n.dsh-mouse-footer .dsh-mouse-reset { flex:none; color:var(--dsw-alias-state-warn-label,#b86b00); background:var(--dsw-alias-state-warn-tertiary,#fff4df); }\n.dsh-mouse-footer .dsh-mouse-reset:hover { background:color-mix(in srgb,var(--dsw-alias-state-warn-primary,#b86b00) 18%,transparent); }\n.dsh-mouse-switch { display:flex; align-items:center; gap:8px; color:var(--dsw-alias-label-secondary,#626976); font-size:12px; }\n.dsh-mouse-empty { padding:54px 24px; text-align:center; color:var(--dsw-alias-label-secondary,#626976); }\n.dsh-mouse-empty > span { font-size:54px; }\n@media(max-width:600px) { .dsh-mouse-carousel { gap:32px; }.dsh-mouse-row { align-items:flex-start; flex-direction:column; gap:12px; }.dsh-mouse-label { padding-right:0; }.dsh-mouse-controls { width:100%; justify-content:space-between; }.dsh-mouse-controls .dsh-mouse-select { max-width:230px; } }\n\n.dsh-mouse-settings button { white-space:normal; overflow-wrap:anywhere; }\n.dsh-mouse-head,.dsh-mouse-footer { flex-wrap:wrap; }\n\n.dsh-mouse-shortcut-value { color:var(--dsw-alias-label-tertiary,#858890); font-size:12px; white-space:nowrap; }\n.dsh-mouse-shortcut-value.is-set { color:var(--dsw-alias-label-secondary,#626976); border:.5px solid var(--dsw-alias-border-l2,#e8e8ea); border-radius:6px; padding:3px 8px; }\n.dsh-mouse-shortcut-dialog .dsh-mouse-shortcut-input { box-sizing:border-box; width:100%; min-height:64px; text-align:center; letter-spacing:1px; font-size:18px; }\n.dsh-mouse-shortcut-suggested { margin-top:10px; font-size:12px; }\n.dsh-mouse-inline-message { margin:8px 0; font-size:12px; line-height:19px; overflow-wrap:anywhere; }\n.dsh-mouse-permissions { border-top:.5px solid var(--dsw-alias-border-l2,#e8e8ea); margin-top:20px; padding-top:24px; }\n.dsh-mouse-permission-header { display:flex; align-items:center; justify-content:space-between; gap:16px; }\n.dsh-mouse-permission-header h3 { margin:0; font-size:14px; line-height:22px; font-weight:500; }\n.dsh-mouse-permission-recheck { font-size:12px; color:var(--dsw-alias-label-tertiary,#858890); }\n.dsh-mouse-permission-intro { margin:4px 0 6px; color:var(--dsw-alias-label-tertiary,#858890); font-size:12px; line-height:19px; }\n.dsh-mouse-permission-row { display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:center; gap:16px; padding:16px 0; border-bottom:.5px solid var(--dsw-alias-border-l2,#e8e8ea); }\n.dsh-mouse-permission-copy { min-width:0; }\n.dsh-mouse-permission-name { display:flex; align-items:center; flex-wrap:wrap; gap:8px; margin:0; font-size:14px; line-height:22px; font-weight:400; }\n.dsh-mouse-permission-meta,.dsh-mouse-permission-help { margin:3px 0 0; color:var(--dsw-alias-label-tertiary,#858890); font-size:12px; line-height:19px; overflow-wrap:anywhere; }\n.dsh-mouse-permission-actions { display:flex; align-items:center; justify-content:flex-end; flex-wrap:wrap; gap:12px; }\n.dsh-mouse-permission-actions button { font-size:12px; }\n.dsh-mouse-permission-status { display:inline-flex; align-items:center; gap:5px; white-space:nowrap; color:var(--dsw-alias-state-warn-label,#b86b00); background:var(--dsw-alias-state-warn-tertiary,#fff4df); border-radius:6px; padding:3px 8px; font-size:12px; line-height:18px; }\n.dsh-mouse-permission-status.is-granted { color:var(--dsw-alias-state-success-label,#278159); background:var(--dsw-alias-state-success-tertiary,#eef7f1); }\n.dsh-mouse-permission-optional { color:var(--dsw-alias-label-tertiary,#858890); font-size:11px; line-height:17px; border:.5px solid var(--dsw-alias-border-l2,#e8e8ea); border-radius:4px; padding:0 5px; }\n.dsh-mouse-permission-location { margin-top:12px; color:var(--dsw-alias-label-tertiary,#858890); font-size:12px; line-height:19px; }\n.dsh-mouse-permission-location summary { cursor:pointer; width:fit-content; }\n.dsh-mouse-permission-location p { margin:8px 0 0; }\n.dsh-mouse-permission-location code { display:block; margin-top:2px; font-size:11px; overflow-wrap:anywhere; }\n@media(max-width:600px) { .dsh-mouse-permission-row { grid-template-columns:1fr; gap:10px; }.dsh-mouse-permission-actions { justify-content:space-between; }.dsh-mouse-shortcut-value { max-width:100%; white-space:normal; overflow-wrap:anywhere; } }\n";
|
|
22116
22702
|
|
|
22117
22703
|
// src/client/index.jsx
|
|
22118
22704
|
var inject = ["remote", "slots", "locale", "configForms"];
|
|
@@ -22120,12 +22706,21 @@ async function apply(ctx) {
|
|
|
22120
22706
|
const locale = registerLocale(ctx);
|
|
22121
22707
|
const preferences = new SidebarPanelPreference(typeof localStorage === "undefined" ? void 0 : localStorage);
|
|
22122
22708
|
const unmountRemote = await ctx.remote.$mount(REMOTE);
|
|
22123
|
-
const view = new AiConversationView({ document, closeTopModal:
|
|
22709
|
+
const view = new AiConversationView({ document, closeTopModal: import_dsh_client_ui_primitives4.closeTopModal });
|
|
22124
22710
|
let ui, aiUi;
|
|
22125
22711
|
try {
|
|
22126
22712
|
ui = ctx.inject(["remote.asr", "slots"], (scope) => {
|
|
22127
22713
|
const api = scope.remote.asr;
|
|
22128
22714
|
const controller = new DeviceController(api, { locale });
|
|
22715
|
+
scope.inject(["shortcuts"], (shortcutScope) => {
|
|
22716
|
+
if (typeof shortcutScope.shortcuts?.recording !== "function") return;
|
|
22717
|
+
const guard = (active) => shortcutScope.shortcuts.recording(active);
|
|
22718
|
+
controller.shortcutInputGuard = guard;
|
|
22719
|
+
shortcutScope.effect(() => () => {
|
|
22720
|
+
if (controller.shortcutInputGuard === guard) controller.shortcutInputGuard = void 0;
|
|
22721
|
+
void controller.endShortcutRecording();
|
|
22722
|
+
});
|
|
22723
|
+
});
|
|
22129
22724
|
scope.effect(() => {
|
|
22130
22725
|
const style = document.createElement("style");
|
|
22131
22726
|
style.textContent = styles_default;
|