@celljs/ta-web 4.9.0 → 4.10.0
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/README.en.md +4 -3
- package/README.md +4 -3
- package/esm/browser/assistant/assistant-chat-list.js +8 -2
- package/esm/browser/assistant/assistant-extension.d.ts +8 -1
- package/esm/browser/assistant/assistant-extension.js +33 -5
- package/esm/browser/assistant/assistant-protocol.d.ts +3 -1
- package/esm/browser/assistant/assistant-task-source.d.ts +2 -0
- package/esm/browser/assistant/assistant-task-source.js +2 -0
- package/esm/browser/assistant/assistant-task-util.d.ts +8 -0
- package/esm/browser/assistant/assistant-task-util.js +13 -3
- package/esm/browser/assistant/assistant-tasks.js +3 -2
- package/esm/browser/assistant/assistant-view.js +81 -56
- package/esm/browser/assistant/assistant.d.ts +30 -1
- package/esm/browser/assistant/assistant.js +89 -6
- package/esm/browser/assistant/task-views.d.ts +40 -6
- package/esm/browser/assistant/task-views.js +73 -21
- package/esm/browser/avatar/dino-avatar.d.ts +3 -4
- package/esm/browser/avatar/dino-avatar.js +4 -178
- package/esm/browser/avatar/dino-face.d.ts +19 -0
- package/esm/browser/avatar/dino-face.js +142 -0
- package/esm/browser/avatar/dino-geometry.d.ts +11 -0
- package/esm/browser/avatar/dino-geometry.js +38 -0
- package/esm/browser/avatar/dino-kinds.d.ts +15 -0
- package/esm/browser/avatar/dino-kinds.js +544 -0
- package/esm/browser/avatar/dino-motion.js +1 -1
- package/esm/browser/avatar/dino-shape.d.ts +80 -0
- package/esm/browser/avatar/dino-shape.js +113 -0
- package/esm/browser/avatar/dino-species.d.ts +1 -61
- package/esm/browser/avatar/dino-species.js +2 -653
- package/esm/browser/chat/chat-packages.d.ts +39 -0
- package/esm/browser/chat/chat-packages.js +70 -0
- package/esm/browser/chat/chat-protocol.d.ts +23 -1
- package/esm/browser/chat/chat-stores.d.ts +59 -0
- package/esm/browser/chat/chat-stores.js +121 -0
- package/esm/browser/chat/chat-util.d.ts +17 -0
- package/esm/browser/chat/chat-util.js +61 -0
- package/esm/browser/chat/chat-view.js +33 -12
- package/esm/browser/chat/chat.d.ts +31 -39
- package/esm/browser/chat/chat.js +226 -175
- package/esm/browser/components/access-view.js +1 -1
- package/esm/browser/components/account-menu.js +1 -1
- package/esm/browser/components/app-nav.d.ts +6 -3
- package/esm/browser/components/app-nav.js +19 -10
- package/esm/browser/components/app-shell-hooks.d.ts +47 -0
- package/esm/browser/components/app-shell-hooks.js +169 -0
- package/esm/browser/components/app-view.js +81 -172
- package/esm/browser/components/auth-view.js +1 -1
- package/esm/browser/components/chat-list.d.ts +20 -2
- package/esm/browser/components/chat-list.js +138 -22
- package/esm/browser/components/composer-box.d.ts +5 -5
- package/esm/browser/components/composer-box.js +111 -4
- package/esm/browser/components/composer.d.ts +7 -0
- package/esm/browser/components/composer.js +22 -14
- package/esm/browser/components/connection-bar.js +50 -17
- package/esm/browser/components/context-menu.d.ts +30 -4
- package/esm/browser/components/context-menu.js +199 -37
- package/esm/browser/components/conversation-scroll.d.ts +129 -6
- package/esm/browser/components/conversation-scroll.js +429 -109
- package/esm/browser/components/dino.js +1 -1
- package/esm/browser/components/earlier-messages.d.ts +2 -1
- package/esm/browser/components/earlier-messages.js +2 -17
- package/esm/browser/components/editor-area.d.ts +3 -1
- package/esm/browser/components/editor-area.js +6 -5
- package/esm/browser/components/empty-pictures.d.ts +0 -2
- package/esm/browser/components/empty-pictures.js +0 -16
- package/esm/browser/components/folder-picker.d.ts +5 -2
- package/esm/browser/components/folder-picker.js +30 -9
- package/esm/browser/components/held-talk.d.ts +28 -0
- package/esm/browser/components/held-talk.js +76 -0
- package/esm/browser/components/host-view.d.ts +1 -1
- package/esm/browser/components/host-view.js +1 -1
- package/esm/browser/components/icon.d.ts +2 -2
- package/esm/browser/components/icon.js +5 -6
- package/esm/browser/components/image-viewer.d.ts +124 -0
- package/esm/browser/components/image-viewer.js +397 -0
- package/esm/browser/components/lightbox.d.ts +11 -0
- package/esm/browser/components/lightbox.js +24 -0
- package/esm/browser/components/markdown.d.ts +6 -2
- package/esm/browser/components/markdown.js +24 -10
- package/esm/browser/components/media.js +1 -10
- package/esm/browser/components/message-footer.d.ts +16 -2
- package/esm/browser/components/message-footer.js +29 -12
- package/esm/browser/components/message-list.d.ts +24 -3
- package/esm/browser/components/message-list.js +149 -20
- package/esm/browser/components/message-menu.d.ts +3 -1
- package/esm/browser/components/message-menu.js +18 -3
- package/esm/browser/components/nav-places.d.ts +16 -1
- package/esm/browser/components/nav-places.js +12 -3
- package/esm/browser/components/phone-shell.d.ts +4 -1
- package/esm/browser/components/phone-shell.js +3 -1
- package/esm/browser/components/run-status.js +3 -3
- package/esm/browser/components/select-bar.d.ts +9 -0
- package/esm/browser/components/select-bar.js +24 -0
- package/esm/browser/components/session-settings.d.ts +6 -0
- package/esm/browser/components/session-settings.js +14 -1
- package/esm/browser/components/session-view.js +8 -4
- package/esm/browser/components/settings-choices.d.ts +35 -0
- package/esm/browser/components/settings-choices.js +117 -0
- package/esm/browser/components/settings-parts.d.ts +21 -0
- package/esm/browser/components/settings-parts.js +323 -0
- package/esm/browser/components/settings-view.d.ts +0 -6
- package/esm/browser/components/settings-view.js +4 -406
- package/esm/browser/components/swipe-row.d.ts +2 -2
- package/esm/browser/components/swipe-row.js +7 -3
- package/esm/browser/components/tool-view.js +14 -12
- package/esm/browser/components/voice-button.d.ts +1 -1
- package/esm/browser/components/voice-button.js +1 -1
- package/esm/browser/components/voice-talk.d.ts +43 -0
- package/esm/browser/components/voice-talk.js +222 -0
- package/esm/browser/components/workbench-view.js +1 -1
- package/esm/browser/device/device.d.ts +3 -0
- package/esm/browser/device/device.js +11 -1
- package/esm/browser/device/hold.d.ts +42 -0
- package/esm/browser/device/hold.js +136 -0
- package/esm/browser/device/launch-screen.d.ts +1 -1
- package/esm/browser/device/launch-screen.js +1 -1
- package/esm/browser/device/long-press.d.ts +2 -0
- package/esm/browser/device/long-press.js +16 -1
- package/esm/browser/device/pull-down.d.ts +4 -2
- package/esm/browser/device/pull-down.js +64 -76
- package/esm/browser/device/row-swipe.d.ts +35 -10
- package/esm/browser/device/row-swipe.js +149 -71
- package/esm/browser/device/shake-undo.d.ts +16 -0
- package/esm/browser/device/shake-undo.js +59 -0
- package/esm/browser/device/sheet-swipe.d.ts +118 -18
- package/esm/browser/device/sheet-swipe.js +406 -107
- package/esm/browser/extension/icons.js +2 -1
- package/esm/browser/extension/web-extension-api.d.ts +135 -2
- package/esm/browser/extension/web-extension-code.d.ts +6 -0
- package/esm/browser/extension/web-extension-code.js +24 -0
- package/esm/browser/extension/web-extension-protocol.d.ts +23 -1
- package/esm/browser/extension/web-extension-protocol.js +8 -0
- package/esm/browser/extension/web-extensions.d.ts +14 -1
- package/esm/browser/extension/web-extensions.js +128 -24
- package/esm/browser/extension/web-tasks.d.ts +9 -1
- package/esm/browser/extension/web-tasks.js +24 -0
- package/esm/browser/files/files-protocol.d.ts +25 -0
- package/esm/browser/files/files-protocol.js +2 -0
- package/esm/browser/files/files.d.ts +35 -0
- package/esm/browser/files/files.js +119 -0
- package/esm/browser/hooks.d.ts +3 -1
- package/esm/browser/hooks.js +8 -0
- package/esm/browser/i18n/locales.d.ts +29 -2
- package/esm/browser/i18n/messages.d.ts +28 -1
- package/esm/browser/i18n/messages.js +58 -4
- package/esm/browser/index.d.ts +6 -0
- package/esm/browser/index.js +6 -0
- package/esm/browser/notices/notices-protocol.d.ts +9 -1
- package/esm/browser/notices/notices.d.ts +2 -0
- package/esm/browser/notices/notices.js +20 -10
- package/esm/browser/offline/device-values.d.ts +55 -0
- package/esm/browser/offline/device-values.js +142 -0
- package/esm/browser/offline/kept-chats-protocol.d.ts +17 -0
- package/esm/browser/offline/kept-chats-protocol.js +2 -0
- package/esm/browser/offline/kept-chats.d.ts +47 -0
- package/esm/browser/offline/kept-chats.js +146 -0
- package/esm/browser/offline/offline-reads.d.ts +44 -0
- package/esm/browser/offline/offline-reads.js +107 -0
- package/esm/browser/settings/settings-protocol.d.ts +2 -0
- package/esm/browser/settings/settings-protocol.js +2 -0
- package/esm/browser/style/conversation.d.ts +1 -1
- package/esm/browser/style/conversation.js +57 -17
- package/esm/browser/style/device.js +43 -4
- package/esm/browser/style/layout.d.ts +1 -1
- package/esm/browser/style/layout.js +67 -15
- package/esm/browser/style/pages.d.ts +1 -1
- package/esm/browser/style/pages.js +2 -1
- package/esm/browser/style/shell.d.ts +1 -1
- package/esm/browser/style/shell.js +47 -3
- package/esm/browser/style/tasks.d.ts +1 -1
- package/esm/browser/style/tasks.js +2 -0
- package/esm/browser/util/frame.d.ts +5 -4
- package/esm/browser/util/frame.js +5 -4
- package/esm/browser/util/markdown.d.ts +18 -1
- package/esm/browser/util/markdown.js +119 -5
- package/esm/browser/util/process.d.ts +21 -0
- package/esm/browser/util/process.js +45 -1
- package/esm/browser/util/voice.d.ts +5 -2
- package/esm/browser/util/voice.js +6 -3
- package/esm/browser/util/zoom.d.ts +46 -0
- package/esm/browser/util/zoom.js +96 -0
- package/esm/browser/workbench-calls.d.ts +59 -0
- package/esm/browser/workbench-calls.js +141 -0
- package/esm/browser/workbench-protocol.d.ts +5 -1
- package/esm/browser/workbench-util.d.ts +68 -0
- package/esm/browser/workbench-util.js +145 -0
- package/esm/browser/workbench.d.ts +15 -42
- package/esm/browser/workbench.js +53 -167
- package/lib/browser/assistant/assistant-chat-list.js +8 -2
- package/lib/browser/assistant/assistant-extension.d.ts +8 -1
- package/lib/browser/assistant/assistant-extension.js +33 -5
- package/lib/browser/assistant/assistant-protocol.d.ts +3 -1
- package/lib/browser/assistant/assistant-task-source.d.ts +2 -0
- package/lib/browser/assistant/assistant-task-source.js +2 -0
- package/lib/browser/assistant/assistant-task-util.d.ts +8 -0
- package/lib/browser/assistant/assistant-task-util.js +13 -3
- package/lib/browser/assistant/assistant-tasks.js +2 -1
- package/lib/browser/assistant/assistant-view.js +78 -53
- package/lib/browser/assistant/assistant.d.ts +30 -1
- package/lib/browser/assistant/assistant.js +89 -6
- package/lib/browser/assistant/task-views.d.ts +40 -6
- package/lib/browser/assistant/task-views.js +74 -21
- package/lib/browser/avatar/dino-avatar.d.ts +3 -4
- package/lib/browser/avatar/dino-avatar.js +27 -202
- package/lib/browser/avatar/dino-face.d.ts +20 -0
- package/lib/browser/avatar/dino-face.js +148 -0
- package/lib/browser/avatar/dino-geometry.d.ts +12 -0
- package/lib/browser/avatar/dino-geometry.js +47 -0
- package/lib/browser/avatar/dino-kinds.d.ts +16 -0
- package/lib/browser/avatar/dino-kinds.js +547 -0
- package/lib/browser/avatar/dino-motion.js +2 -2
- package/lib/browser/avatar/dino-shape.d.ts +81 -0
- package/lib/browser/avatar/dino-shape.js +126 -0
- package/lib/browser/avatar/dino-species.d.ts +1 -61
- package/lib/browser/avatar/dino-species.js +34 -687
- package/lib/browser/chat/chat-packages.d.ts +40 -0
- package/lib/browser/chat/chat-packages.js +74 -0
- package/lib/browser/chat/chat-protocol.d.ts +23 -1
- package/lib/browser/chat/chat-stores.d.ts +60 -0
- package/lib/browser/chat/chat-stores.js +125 -0
- package/lib/browser/chat/chat-util.d.ts +18 -0
- package/lib/browser/chat/chat-util.js +64 -0
- package/lib/browser/chat/chat-view.js +33 -12
- package/lib/browser/chat/chat.d.ts +31 -39
- package/lib/browser/chat/chat.js +227 -176
- package/lib/browser/components/access-view.js +2 -2
- package/lib/browser/components/account-menu.js +2 -2
- package/lib/browser/components/app-nav.d.ts +6 -3
- package/lib/browser/components/app-nav.js +17 -8
- package/lib/browser/components/app-shell-hooks.d.ts +48 -0
- package/lib/browser/components/app-shell-hooks.js +211 -0
- package/lib/browser/components/app-view.js +89 -180
- package/lib/browser/components/auth-view.js +3 -3
- package/lib/browser/components/chat-list.d.ts +20 -2
- package/lib/browser/components/chat-list.js +137 -21
- package/lib/browser/components/composer-box.d.ts +5 -5
- package/lib/browser/components/composer-box.js +111 -4
- package/lib/browser/components/composer.d.ts +7 -0
- package/lib/browser/components/composer.js +22 -14
- package/lib/browser/components/connection-bar.js +48 -15
- package/lib/browser/components/context-menu.d.ts +30 -4
- package/lib/browser/components/context-menu.js +198 -36
- package/lib/browser/components/conversation-scroll.d.ts +129 -6
- package/lib/browser/components/conversation-scroll.js +431 -110
- package/lib/browser/components/dino.js +3 -3
- package/lib/browser/components/earlier-messages.d.ts +2 -1
- package/lib/browser/components/earlier-messages.js +2 -17
- package/lib/browser/components/editor-area.d.ts +3 -1
- package/lib/browser/components/editor-area.js +5 -4
- package/lib/browser/components/empty-pictures.d.ts +0 -2
- package/lib/browser/components/empty-pictures.js +0 -17
- package/lib/browser/components/folder-picker.d.ts +5 -2
- package/lib/browser/components/folder-picker.js +30 -9
- package/lib/browser/components/held-talk.d.ts +29 -0
- package/lib/browser/components/held-talk.js +79 -0
- package/lib/browser/components/host-view.d.ts +1 -1
- package/lib/browser/components/host-view.js +5 -5
- package/lib/browser/components/icon.d.ts +2 -2
- package/lib/browser/components/icon.js +7 -6
- package/lib/browser/components/image-viewer.d.ts +125 -0
- package/lib/browser/components/image-viewer.js +435 -0
- package/lib/browser/components/lightbox.d.ts +12 -0
- package/lib/browser/components/lightbox.js +60 -0
- package/lib/browser/components/markdown.d.ts +6 -2
- package/lib/browser/components/markdown.js +24 -10
- package/lib/browser/components/media.js +2 -11
- package/lib/browser/components/message-footer.d.ts +16 -2
- package/lib/browser/components/message-footer.js +31 -12
- package/lib/browser/components/message-list.d.ts +24 -3
- package/lib/browser/components/message-list.js +146 -16
- package/lib/browser/components/message-menu.d.ts +3 -1
- package/lib/browser/components/message-menu.js +17 -2
- package/lib/browser/components/nav-places.d.ts +16 -1
- package/lib/browser/components/nav-places.js +13 -3
- package/lib/browser/components/phone-shell.d.ts +4 -1
- package/lib/browser/components/phone-shell.js +3 -1
- package/lib/browser/components/run-status.js +3 -3
- package/lib/browser/components/select-bar.d.ts +10 -0
- package/lib/browser/components/select-bar.js +61 -0
- package/lib/browser/components/session-settings.d.ts +6 -0
- package/lib/browser/components/session-settings.js +14 -1
- package/lib/browser/components/session-view.js +7 -3
- package/lib/browser/components/settings-choices.d.ts +36 -0
- package/lib/browser/components/settings-choices.js +156 -0
- package/lib/browser/components/settings-parts.d.ts +22 -0
- package/lib/browser/components/settings-parts.js +359 -0
- package/lib/browser/components/settings-view.d.ts +0 -6
- package/lib/browser/components/settings-view.js +2 -405
- package/lib/browser/components/swipe-row.d.ts +2 -2
- package/lib/browser/components/swipe-row.js +7 -3
- package/lib/browser/components/tool-view.js +14 -12
- package/lib/browser/components/voice-button.d.ts +1 -1
- package/lib/browser/components/voice-button.js +1 -1
- package/lib/browser/components/voice-talk.d.ts +44 -0
- package/lib/browser/components/voice-talk.js +260 -0
- package/lib/browser/components/workbench-view.js +3 -3
- package/lib/browser/device/device.d.ts +3 -0
- package/lib/browser/device/device.js +11 -1
- package/lib/browser/device/hold.d.ts +43 -0
- package/lib/browser/device/hold.js +173 -0
- package/lib/browser/device/launch-screen.d.ts +1 -1
- package/lib/browser/device/launch-screen.js +1 -1
- package/lib/browser/device/long-press.d.ts +2 -0
- package/lib/browser/device/long-press.js +16 -1
- package/lib/browser/device/pull-down.d.ts +4 -2
- package/lib/browser/device/pull-down.js +63 -75
- package/lib/browser/device/row-swipe.d.ts +35 -10
- package/lib/browser/device/row-swipe.js +148 -70
- package/lib/browser/device/shake-undo.d.ts +17 -0
- package/lib/browser/device/shake-undo.js +63 -0
- package/lib/browser/device/sheet-swipe.d.ts +118 -18
- package/lib/browser/device/sheet-swipe.js +410 -108
- package/lib/browser/extension/icons.js +1 -0
- package/lib/browser/extension/web-extension-api.d.ts +135 -2
- package/lib/browser/extension/web-extension-code.d.ts +6 -0
- package/lib/browser/extension/web-extension-code.js +24 -0
- package/lib/browser/extension/web-extension-protocol.d.ts +23 -1
- package/lib/browser/extension/web-extension-protocol.js +9 -1
- package/lib/browser/extension/web-extensions.d.ts +14 -1
- package/lib/browser/extension/web-extensions.js +125 -21
- package/lib/browser/extension/web-tasks.d.ts +9 -1
- package/lib/browser/extension/web-tasks.js +24 -0
- package/lib/browser/files/files-protocol.d.ts +26 -0
- package/lib/browser/files/files-protocol.js +5 -0
- package/lib/browser/files/files.d.ts +36 -0
- package/lib/browser/files/files.js +122 -0
- package/lib/browser/hooks.d.ts +3 -1
- package/lib/browser/hooks.js +9 -0
- package/lib/browser/i18n/locales.d.ts +29 -2
- package/lib/browser/i18n/messages.d.ts +28 -1
- package/lib/browser/i18n/messages.js +58 -4
- package/lib/browser/index.d.ts +6 -0
- package/lib/browser/index.js +6 -0
- package/lib/browser/notices/notices-protocol.d.ts +9 -1
- package/lib/browser/notices/notices.d.ts +2 -0
- package/lib/browser/notices/notices.js +20 -10
- package/lib/browser/offline/device-values.d.ts +56 -0
- package/lib/browser/offline/device-values.js +148 -0
- package/lib/browser/offline/kept-chats-protocol.d.ts +18 -0
- package/lib/browser/offline/kept-chats-protocol.js +5 -0
- package/lib/browser/offline/kept-chats.d.ts +48 -0
- package/lib/browser/offline/kept-chats.js +149 -0
- package/lib/browser/offline/offline-reads.d.ts +45 -0
- package/lib/browser/offline/offline-reads.js +111 -0
- package/lib/browser/settings/settings-protocol.d.ts +2 -0
- package/lib/browser/settings/settings-protocol.js +2 -0
- package/lib/browser/style/conversation.d.ts +1 -1
- package/lib/browser/style/conversation.js +57 -17
- package/lib/browser/style/device.js +43 -4
- package/lib/browser/style/layout.d.ts +1 -1
- package/lib/browser/style/layout.js +67 -15
- package/lib/browser/style/pages.d.ts +1 -1
- package/lib/browser/style/pages.js +2 -1
- package/lib/browser/style/shell.d.ts +1 -1
- package/lib/browser/style/shell.js +47 -3
- package/lib/browser/style/tasks.d.ts +1 -1
- package/lib/browser/style/tasks.js +2 -0
- package/lib/browser/util/frame.d.ts +5 -4
- package/lib/browser/util/frame.js +5 -4
- package/lib/browser/util/markdown.d.ts +18 -1
- package/lib/browser/util/markdown.js +119 -5
- package/lib/browser/util/process.d.ts +21 -0
- package/lib/browser/util/process.js +46 -2
- package/lib/browser/util/voice.d.ts +5 -2
- package/lib/browser/util/voice.js +6 -3
- package/lib/browser/util/zoom.d.ts +47 -0
- package/lib/browser/util/zoom.js +99 -0
- package/lib/browser/workbench-calls.d.ts +60 -0
- package/lib/browser/workbench-calls.js +145 -0
- package/lib/browser/workbench-protocol.d.ts +5 -1
- package/lib/browser/workbench-util.d.ts +69 -0
- package/lib/browser/workbench-util.js +151 -0
- package/lib/browser/workbench.d.ts +15 -42
- package/lib/browser/workbench.js +74 -189
- package/package.json +10 -10
- package/public/launch.svg +46 -42
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import type { WebSelectBarProps, WebSelectCheckProps } from '../extension/web-extension-api';
|
|
3
|
+
/** The round mark at the start of a row while its list is selecting, as WeChat's: filled once chosen. */
|
|
4
|
+
export declare function SelectCheck({ checked, disabled }: WebSelectCheckProps): React.JSX.Element;
|
|
5
|
+
/**
|
|
6
|
+
* Under a list that is selecting: Select all (or none, once all are), how many are chosen, what can be done
|
|
7
|
+
* with them and Done. Every list of the page and of web extensions (`ui.SelectBar`) takes it.
|
|
8
|
+
*/
|
|
9
|
+
export declare function SelectBar({ count, total, onSelectAll, onDone, actions }: WebSelectBarProps): React.JSX.Element;
|
|
10
|
+
//# sourceMappingURL=select-bar.d.ts.map
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.SelectCheck = SelectCheck;
|
|
37
|
+
exports.SelectBar = SelectBar;
|
|
38
|
+
const lucide_react_1 = require("lucide-react");
|
|
39
|
+
const React = __importStar(require("react"));
|
|
40
|
+
const use_t_1 = require("../i18n/use-t");
|
|
41
|
+
const icon_1 = require("./icon");
|
|
42
|
+
/** The round mark at the start of a row while its list is selecting, as WeChat's: filled once chosen. */
|
|
43
|
+
function SelectCheck({ checked, disabled }) {
|
|
44
|
+
return (React.createElement("span", { className: "ta-select-check", "data-checked": checked ? '' : undefined, "data-disabled": disabled ? '' : undefined, "aria-hidden": "true" }, checked && React.createElement(icon_1.Icon, { icon: lucide_react_1.Check, size: 12 })));
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* Under a list that is selecting: Select all (or none, once all are), how many are chosen, what can be done
|
|
48
|
+
* with them and Done. Every list of the page and of web extensions (`ui.SelectBar`) takes it.
|
|
49
|
+
*/
|
|
50
|
+
function SelectBar({ count, total, onSelectAll, onDone, actions }) {
|
|
51
|
+
const t = (0, use_t_1.useT)();
|
|
52
|
+
const all = total > 0 && count >= total;
|
|
53
|
+
return (React.createElement("div", { className: "ta-select-bar", role: "toolbar", "aria-label": t('ta.select.count', { count }) },
|
|
54
|
+
React.createElement("button", { type: "button", className: "ta-select-bar-all", disabled: total === 0, onClick: () => onSelectAll(!all) },
|
|
55
|
+
React.createElement(SelectCheck, { checked: all }),
|
|
56
|
+
t('ta.select.all')),
|
|
57
|
+
React.createElement("span", { className: "ta-select-bar-count", "aria-live": "polite" }, t('ta.select.count', { count })),
|
|
58
|
+
actions.map(action => (React.createElement("button", { key: action.key, type: "button", className: `ta-button ta-select-bar-action${action.danger ? ' ta-danger' : ''}`, disabled: count === 0, onClick: action.run }, action.label))),
|
|
59
|
+
React.createElement("button", { type: "button", className: "ta-button ta-select-bar-done", onClick: onDone }, t('ta.select.done'))));
|
|
60
|
+
}
|
|
61
|
+
//# sourceMappingURL=select-bar.js.map
|
|
@@ -22,6 +22,12 @@ export interface SessionSettingsHandlers {
|
|
|
22
22
|
}
|
|
23
23
|
export declare namespace SessionSettingsUtil {
|
|
24
24
|
const EMPTY: SessionSettings;
|
|
25
|
+
/**
|
|
26
|
+
* Whether the settings are loaded again: at once, a run going or not, so that a conversation opened
|
|
27
|
+
* while it works (a new one, the first message just sent) lists its models from the start, and after
|
|
28
|
+
* each run, which an extension or another client may have changed them in.
|
|
29
|
+
*/
|
|
30
|
+
function reloads(wasWorking: boolean | undefined, working: boolean): boolean;
|
|
25
31
|
function modelRef(model?: {
|
|
26
32
|
provider: string;
|
|
27
33
|
id: string;
|
|
@@ -42,6 +42,15 @@ const model_picker_1 = require("./model-picker");
|
|
|
42
42
|
var SessionSettingsUtil;
|
|
43
43
|
(function (SessionSettingsUtil) {
|
|
44
44
|
SessionSettingsUtil.EMPTY = { models: [], levels: [], commands: [] };
|
|
45
|
+
/**
|
|
46
|
+
* Whether the settings are loaded again: at once, a run going or not, so that a conversation opened
|
|
47
|
+
* while it works (a new one, the first message just sent) lists its models from the start, and after
|
|
48
|
+
* each run, which an extension or another client may have changed them in.
|
|
49
|
+
*/
|
|
50
|
+
function reloads(wasWorking, working) {
|
|
51
|
+
return wasWorking === undefined || (wasWorking && !working);
|
|
52
|
+
}
|
|
53
|
+
SessionSettingsUtil.reloads = reloads;
|
|
45
54
|
function modelRef(model) {
|
|
46
55
|
return model ? `${model.provider}/${model.id}` : '';
|
|
47
56
|
}
|
|
@@ -110,10 +119,14 @@ function useSessionSettings(server, settingsServer, store, working, t, onError)
|
|
|
110
119
|
.then(([state, { models }, { levels }, { commands }]) => setSettings({ models, model: SessionSettingsUtil.modelRef(state.model), thinkingLevel: state.thinkingLevel, levels, commands }))
|
|
111
120
|
.catch(() => undefined);
|
|
112
121
|
}, [server, sessionId]);
|
|
122
|
+
// Whether the session worked when it was last looked at; none for a session not looked at yet.
|
|
123
|
+
const last = React.useRef(undefined);
|
|
113
124
|
React.useEffect(() => {
|
|
114
|
-
|
|
125
|
+
var _a;
|
|
126
|
+
if (SessionSettingsUtil.reloads(((_a = last.current) === null || _a === void 0 ? void 0 : _a.load) === load ? last.current.working : undefined, working)) {
|
|
115
127
|
load();
|
|
116
128
|
}
|
|
129
|
+
last.current = { load, working };
|
|
117
130
|
}, [load, working]);
|
|
118
131
|
React.useEffect(() => store.onEvent(event => {
|
|
119
132
|
if (event.type === 'session_reloaded') {
|
|
@@ -34,9 +34,11 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
34
34
|
})();
|
|
35
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
36
|
exports.SessionView = SessionView;
|
|
37
|
+
const react_1 = require("@celljs/react");
|
|
37
38
|
const lucide_react_1 = require("lucide-react");
|
|
38
39
|
const React = __importStar(require("react"));
|
|
39
40
|
const device_1 = require("../device/device");
|
|
41
|
+
const files_protocol_1 = require("../files/files-protocol");
|
|
40
42
|
const hooks_1 = require("../hooks");
|
|
41
43
|
const use_t_1 = require("../i18n/use-t");
|
|
42
44
|
const message_1 = require("../util/message");
|
|
@@ -130,7 +132,8 @@ function SessionView({ store, server, workspace, info, onClosed, onActivity, lea
|
|
|
130
132
|
(_a = composer.current) === null || _a === void 0 ? void 0 : _a.setText(draftText);
|
|
131
133
|
}
|
|
132
134
|
}, [draftText]);
|
|
133
|
-
const
|
|
135
|
+
const files = (0, react_1.useInject)(files_protocol_1.TaFiles);
|
|
136
|
+
const fileUrl = React.useCallback(async (path) => files.loadable(await workspace.fileUrl(path, cwd)), [workspace, cwd, files]);
|
|
134
137
|
const openLink = (0, hooks_1.useOpenLink)(cwd);
|
|
135
138
|
// biome-ignore lint/correctness/useExhaustiveDependencies: runs when a run starts or settles
|
|
136
139
|
React.useEffect(() => onActivity(), [state.working, onActivity]);
|
|
@@ -146,6 +149,7 @@ function SessionView({ store, server, workspace, info, onClosed, onActivity, lea
|
|
|
146
149
|
const title = (info === null || info === void 0 ? void 0 : info.sessionName) || (info ? message_1.MessageUtil.basename(info.cwd) : t('ta.session.title'));
|
|
147
150
|
const conversation = React.useMemo(() => ({ sessionId: store.sessionId, sessionFile: info === null || info === void 0 ? void 0 : info.sessionFile, cwd: info === null || info === void 0 ? void 0 : info.cwd, kind: 'chat', group: info === null || info === void 0 ? void 0 : info.group, title }), [store.sessionId, info === null || info === void 0 ? void 0 : info.sessionFile, info === null || info === void 0 ? void 0 : info.cwd, info === null || info === void 0 ? void 0 : info.group, title]);
|
|
148
151
|
const addons = (0, composer_addons_1.useComposerAddons)(conversation);
|
|
152
|
+
const outbox = React.useMemo(() => ({ resend: id => void store.resend(id), discard: id => store.discard(id) }), [store]);
|
|
149
153
|
return (React.createElement("section", { className: `ta-session ${compact ? 'ta-session-compact' : ''}` },
|
|
150
154
|
!compact && (React.createElement("header", { className: "ta-session-header" },
|
|
151
155
|
leading,
|
|
@@ -155,14 +159,14 @@ function SessionView({ store, server, workspace, info, onClosed, onActivity, lea
|
|
|
155
159
|
trailing)),
|
|
156
160
|
React.createElement("div", { className: "ta-scroll ta-conversation", ref: scroller },
|
|
157
161
|
React.createElement("div", { className: "ta-thread" },
|
|
158
|
-
state.start > 0 && (React.createElement("div", { className: "ta-earlier", role: "status", "aria-label": t('ta.session.earlier') },
|
|
162
|
+
state.start > 0 && (React.createElement("div", { className: "ta-earlier", role: "status", "aria-label": t('ta.session.earlier'), ...conversation_scroll_1.SCROLL_SKIP },
|
|
159
163
|
React.createElement("span", { className: "ta-spinner" }))),
|
|
160
164
|
state.messages.length === 0 && (empty !== null && empty !== void 0 ? empty : React.createElement("div", { className: "ta-empty" }, t('ta.session.empty', { cwd: (_a = info === null || info === void 0 ? void 0 : info.cwd) !== null && _a !== void 0 ? _a : '.' }))),
|
|
161
165
|
React.createElement(message_list_1.ConversationSession.Provider, { value: info },
|
|
162
166
|
React.createElement(message_footer_1.MessageActions.Provider, { value: messageActions },
|
|
163
167
|
React.createElement(media_1.FileUrls.Provider, { value: fileUrl },
|
|
164
168
|
React.createElement(link_1.OpenLink.Provider, { value: openLink },
|
|
165
|
-
React.createElement(message_list_1.MessageList, { state: state }))))))),
|
|
169
|
+
React.createElement(message_list_1.MessageList, { state: state, outbox: outbox }))))))),
|
|
166
170
|
React.createElement("div", { className: "ta-bottom" },
|
|
167
171
|
away && (React.createElement("button", { type: "button", className: "ta-to-bottom", "aria-label": t('ta.session.toBottom'), title: t('ta.session.toBottom'), onClick: toBottom },
|
|
168
172
|
React.createElement(lucide_react_1.ArrowDown, { size: 18 }))),
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { type TaPackageInfo } from '@celljs/ta-protocol';
|
|
2
|
+
import { type LucideIcon } from 'lucide-react';
|
|
3
|
+
import type { MessageId } from '../i18n/messages';
|
|
4
|
+
import type { useT } from '../i18n/use-t';
|
|
5
|
+
import type { FontSize, LanguageSetting, ThemeSetting } from '../settings/settings-protocol';
|
|
6
|
+
import type { Navigation } from './nav-places';
|
|
7
|
+
import { type Choice, type RowEntry } from './settings-controls';
|
|
8
|
+
export declare const THEMES: Choice<ThemeSetting>[];
|
|
9
|
+
export declare const FONT_SIZES: Choice<FontSize>[];
|
|
10
|
+
export declare const LANGUAGES: Choice<LanguageSetting>[];
|
|
11
|
+
export declare const GROUP_ICONS: Record<string, LucideIcon>;
|
|
12
|
+
/** The keys of the page and of the message box; `Mod` is ⌘ on a Mac, Ctrl elsewhere. */
|
|
13
|
+
export declare const SHORTCUTS: {
|
|
14
|
+
keys: string;
|
|
15
|
+
label: MessageId;
|
|
16
|
+
}[];
|
|
17
|
+
/**
|
|
18
|
+
* The packages pi loads, as the server lists them, those turned off too: the built-in ones turn off and
|
|
19
|
+
* stay; the others turn off and on, and go.
|
|
20
|
+
*/
|
|
21
|
+
export declare function usePackages(): {
|
|
22
|
+
packages: TaPackageInfo[];
|
|
23
|
+
toggle: (pkg: TaPackageInfo, on: boolean) => Promise<void>;
|
|
24
|
+
remove: (pkg: TaPackageInfo) => Promise<void>;
|
|
25
|
+
read: () => Promise<void>;
|
|
26
|
+
};
|
|
27
|
+
export declare const SLOTS: Choice<string>[];
|
|
28
|
+
/** The rows of the navigation: how many pages it shows, and where each page is. */
|
|
29
|
+
export declare function navigationRows(navigation: Navigation, t: ReturnType<typeof useT>): RowEntry[];
|
|
30
|
+
/** How a package shows in a row: what it calls itself for people, else its name and the description of its package.json. */
|
|
31
|
+
export declare function packageLabel(pkg: TaPackageInfo, language: string): {
|
|
32
|
+
title: string;
|
|
33
|
+
summary: string | undefined;
|
|
34
|
+
icon: import("..").WebIcon;
|
|
35
|
+
};
|
|
36
|
+
//# sourceMappingURL=settings-choices.d.ts.map
|
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.SLOTS = exports.SHORTCUTS = exports.GROUP_ICONS = exports.LANGUAGES = exports.FONT_SIZES = exports.THEMES = void 0;
|
|
37
|
+
exports.usePackages = usePackages;
|
|
38
|
+
exports.navigationRows = navigationRows;
|
|
39
|
+
exports.packageLabel = packageLabel;
|
|
40
|
+
const ta_protocol_1 = require("@celljs/ta-protocol");
|
|
41
|
+
const lucide_react_1 = require("lucide-react");
|
|
42
|
+
const React = __importStar(require("react"));
|
|
43
|
+
const icons_1 = require("../extension/icons");
|
|
44
|
+
const web_extension_protocol_1 = require("../extension/web-extension-protocol");
|
|
45
|
+
const hooks_1 = require("../hooks");
|
|
46
|
+
const navigation_1 = require("../settings/navigation");
|
|
47
|
+
const icon_1 = require("./icon");
|
|
48
|
+
const settings_controls_1 = require("./settings-controls");
|
|
49
|
+
exports.THEMES = [
|
|
50
|
+
{ value: 'system', icon: lucide_react_1.Monitor, label: 'ta.settings.theme.system' },
|
|
51
|
+
{ value: 'light', icon: lucide_react_1.Sun, label: 'ta.settings.theme.light' },
|
|
52
|
+
{ value: 'dark', icon: lucide_react_1.Moon, label: 'ta.settings.theme.dark' },
|
|
53
|
+
];
|
|
54
|
+
exports.FONT_SIZES = [
|
|
55
|
+
{ value: 'small', label: 'ta.settings.fontSize.small' },
|
|
56
|
+
{ value: 'standard', label: 'ta.settings.fontSize.standard' },
|
|
57
|
+
{ value: 'large', label: 'ta.settings.fontSize.large' },
|
|
58
|
+
{ value: 'xlarge', label: 'ta.settings.fontSize.xlarge' },
|
|
59
|
+
];
|
|
60
|
+
exports.LANGUAGES = [
|
|
61
|
+
{ value: 'system', icon: lucide_react_1.Globe, label: 'ta.settings.language.system' },
|
|
62
|
+
{ value: 'zh-CN', label: '简体中文' },
|
|
63
|
+
{ value: 'en-US', label: 'English' },
|
|
64
|
+
];
|
|
65
|
+
exports.GROUP_ICONS = { model: lucide_react_1.Sparkles, conversation: lucide_react_1.MessagesSquare, context: lucide_react_1.Layers, tools: lucide_react_1.Wrench };
|
|
66
|
+
/** The keys of the page and of the message box; `Mod` is ⌘ on a Mac, Ctrl elsewhere. */
|
|
67
|
+
exports.SHORTCUTS = [
|
|
68
|
+
{ keys: 'Mod+,', label: 'ta.shortcut.settings' },
|
|
69
|
+
{ keys: 'Mod+B', label: 'ta.shortcut.sidebar' },
|
|
70
|
+
{ keys: 'Enter', label: 'ta.shortcut.send' },
|
|
71
|
+
{ keys: 'Shift+Enter', label: 'ta.shortcut.newline' },
|
|
72
|
+
{ keys: 'Alt+Enter', label: 'ta.shortcut.followUp' },
|
|
73
|
+
{ keys: 'Esc', label: 'ta.shortcut.stop' },
|
|
74
|
+
{ keys: '/', label: 'ta.shortcut.commands' },
|
|
75
|
+
{ keys: '@', label: 'ta.shortcut.files' },
|
|
76
|
+
{ keys: 'Mod+S', label: 'ta.shortcut.save' },
|
|
77
|
+
];
|
|
78
|
+
/**
|
|
79
|
+
* The packages pi loads, as the server lists them, those turned off too: the built-in ones turn off and
|
|
80
|
+
* stay; the others turn off and on, and go.
|
|
81
|
+
*/
|
|
82
|
+
function usePackages() {
|
|
83
|
+
const [workbench, bench] = (0, hooks_1.useWorkbench)();
|
|
84
|
+
const [, host] = (0, hooks_1.useWebExtensions)();
|
|
85
|
+
const [packages, setPackages] = React.useState([]);
|
|
86
|
+
const read = React.useCallback(() => bench.packages.listPackages().then(setPackages), [bench]);
|
|
87
|
+
React.useEffect(() => {
|
|
88
|
+
if (workbench.status === 'online') {
|
|
89
|
+
read().catch(() => undefined);
|
|
90
|
+
}
|
|
91
|
+
}, [workbench.status, read]);
|
|
92
|
+
const changed = async () => {
|
|
93
|
+
await host.reloadPackages();
|
|
94
|
+
await read();
|
|
95
|
+
};
|
|
96
|
+
/** By the name of a built-in package, by the id of another. */
|
|
97
|
+
const toggle = async (pkg, on) => {
|
|
98
|
+
setPackages(current => current.map(other => (other.id === pkg.id ? { ...other, enabled: on } : other)));
|
|
99
|
+
await bench.packages.setPackageEnabled(pkg.origin === 'builtin' ? pkg.name : pkg.id, on);
|
|
100
|
+
await changed();
|
|
101
|
+
};
|
|
102
|
+
const remove = async (pkg) => {
|
|
103
|
+
await bench.packages.removePackage(pkg.id);
|
|
104
|
+
await changed();
|
|
105
|
+
};
|
|
106
|
+
return { packages, toggle, remove, read };
|
|
107
|
+
}
|
|
108
|
+
exports.SLOTS = Array.from({ length: navigation_1.NavigationUtil.MAX_SLOTS - navigation_1.NavigationUtil.MIN_SLOTS + 1 }, (_, index) => {
|
|
109
|
+
const value = String(navigation_1.NavigationUtil.MIN_SLOTS + index);
|
|
110
|
+
return { value, label: value };
|
|
111
|
+
});
|
|
112
|
+
/** The rows of the navigation: how many pages it shows, and where each page is. */
|
|
113
|
+
function navigationRows(navigation, t) {
|
|
114
|
+
const { setting } = navigation;
|
|
115
|
+
const where = (id, byDefault) => {
|
|
116
|
+
if (setting.pinned.includes(id) && navigation.nav.some(page => page.id === id)) {
|
|
117
|
+
return t('ta.settings.navigation.pinned');
|
|
118
|
+
}
|
|
119
|
+
if (navigation.nav.some(page => page.id === id)) {
|
|
120
|
+
return t('ta.settings.navigation.inNav');
|
|
121
|
+
}
|
|
122
|
+
return t(setting.discover.includes(id) || byDefault ? 'ta.settings.navigation.folded' : 'ta.settings.navigation.overflow');
|
|
123
|
+
};
|
|
124
|
+
return [
|
|
125
|
+
(0, settings_controls_1.row)('navigation-slots', [t('ta.settings.navigation.slots'), t('ta.settings.navigation.slotsHint'), t('ta.discover')], React.createElement(settings_controls_1.Row, { label: t('ta.settings.navigation.slots'), description: t('ta.settings.navigation.slotsHint'), stacked: true },
|
|
126
|
+
React.createElement(settings_controls_1.Segmented, { label: t('ta.settings.navigation.slots'), value: String(setting.slots), choices: exports.SLOTS, onChange: slots => navigation.update({ ...setting, slots: Number(slots) }) }))),
|
|
127
|
+
...navigation.pages.map(page => {
|
|
128
|
+
const title = web_extension_protocol_1.WebLabelUtil.text(page.title);
|
|
129
|
+
const shown = navigation.nav.includes(page);
|
|
130
|
+
return (0, settings_controls_1.row)(`navigation:${page.id}`, [title, t('ta.settings.navigation')], React.createElement(settings_controls_1.Row, { label: title, description: where(page.id, page.discover) },
|
|
131
|
+
React.createElement(settings_controls_1.Switch, { label: `${t('ta.settings.navigation.show')} · ${title}`, checked: shown, onChange: on => (on ? navigation.pin(page.id) : navigation.fold(page.id)) })));
|
|
132
|
+
}),
|
|
133
|
+
...(navigation.pages.length === 0
|
|
134
|
+
? [(0, settings_controls_1.row)('navigation:none', [t('ta.settings.navigation.none')], React.createElement(settings_controls_1.EmptyRow, { title: t('ta.settings.navigation.none') }))]
|
|
135
|
+
: []),
|
|
136
|
+
...(navigation_1.NavigationUtil.moved(setting)
|
|
137
|
+
? [
|
|
138
|
+
(0, settings_controls_1.row)('navigation-reset', [t('ta.settings.navigation.reset')], React.createElement(settings_controls_1.Row, { label: t('ta.settings.navigation.reset'), description: t('ta.settings.navigation.resetHint') },
|
|
139
|
+
React.createElement("button", { type: "button", className: "ta-button", onClick: () => navigation.update(navigation_1.NavigationUtil.reset(setting)) },
|
|
140
|
+
React.createElement(icon_1.Icon, { icon: lucide_react_1.RefreshCw, size: 14 }),
|
|
141
|
+
" ",
|
|
142
|
+
t('ta.settings.navigation.resetButton')))),
|
|
143
|
+
]
|
|
144
|
+
: []),
|
|
145
|
+
];
|
|
146
|
+
}
|
|
147
|
+
/** How a package shows in a row: what it calls itself for people, else its name and the description of its package.json. */
|
|
148
|
+
function packageLabel(pkg, language) {
|
|
149
|
+
var _a, _b;
|
|
150
|
+
return {
|
|
151
|
+
title: (_a = ta_protocol_1.TaPackageTextUtil.pick(pkg.title, language)) !== null && _a !== void 0 ? _a : pkg.name,
|
|
152
|
+
summary: (_b = ta_protocol_1.TaPackageTextUtil.pick(pkg.summary, language)) !== null && _b !== void 0 ? _b : pkg.description,
|
|
153
|
+
icon: (pkg.icon && icons_1.WEB_ICONS[pkg.icon]) || lucide_react_1.Puzzle,
|
|
154
|
+
};
|
|
155
|
+
}
|
|
156
|
+
//# sourceMappingURL=settings-choices.js.map
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { TaSettingsScope } from '@celljs/ta-protocol';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import { type Glyph } from './icon';
|
|
4
|
+
import { type RowEntry } from './settings-controls';
|
|
5
|
+
export interface SectionEntry {
|
|
6
|
+
id: string;
|
|
7
|
+
title: string;
|
|
8
|
+
icon: Glyph;
|
|
9
|
+
rows: RowEntry[];
|
|
10
|
+
}
|
|
11
|
+
export interface Part {
|
|
12
|
+
id: string;
|
|
13
|
+
title: string;
|
|
14
|
+
sections: SectionEntry[];
|
|
15
|
+
/** Drawn above its sections, whatever the search, and on a phone above each: the scope of the settings of ta. */
|
|
16
|
+
lead?: React.ReactNode;
|
|
17
|
+
}
|
|
18
|
+
/** What a row of the settings opens over them. */
|
|
19
|
+
export type SettingsDialog = 'accounts' | 'directory' | 'relay';
|
|
20
|
+
/** The sections of the page and of ta, by part, with their rows. */
|
|
21
|
+
export declare function useParts(scope: TaSettingsScope, onScope: (scope: TaSettingsScope) => void, onClose: () => void, onDialog: (dialog: SettingsDialog) => void): Part[];
|
|
22
|
+
//# sourceMappingURL=settings-parts.d.ts.map
|