@celljs/ta-web 4.48.0 → 4.50.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 +1 -1
- package/README.md +1 -1
- package/esm/browser/account/account-side.js +4 -0
- package/esm/browser/account/device-account.d.ts +6 -0
- package/esm/browser/account/device-account.js +20 -5
- package/esm/browser/assistant/assistant-view.js +2 -0
- package/esm/browser/assistant/call-announcing.d.ts +25 -0
- package/esm/browser/assistant/call-announcing.js +32 -0
- package/esm/browser/assistant/call-answering.d.ts +43 -0
- package/esm/browser/assistant/call-answering.js +63 -0
- package/esm/browser/assistant/call-hearing.d.ts +53 -0
- package/esm/browser/assistant/call-hearing.js +98 -0
- package/esm/browser/assistant/call-pausing.d.ts +40 -0
- package/esm/browser/assistant/call-pausing.js +82 -0
- package/esm/browser/assistant/call-reading.d.ts +32 -0
- package/esm/browser/assistant/call-reading.js +35 -0
- package/esm/browser/assistant/call-revoicing.d.ts +33 -0
- package/esm/browser/assistant/call-revoicing.js +68 -0
- package/esm/browser/assistant/call-turns.d.ts +29 -0
- package/esm/browser/assistant/call-turns.js +33 -0
- package/esm/browser/assistant/spoken-answer.d.ts +21 -0
- package/esm/browser/assistant/spoken-answer.js +69 -0
- package/esm/browser/assistant/spoken-call.d.ts +7 -0
- package/esm/browser/assistant/spoken-call.js +16 -0
- package/esm/browser/assistant/voice-call-protocol.d.ts +5 -0
- package/esm/browser/assistant/voice-call.d.ts +47 -43
- package/esm/browser/assistant/voice-call.js +193 -219
- package/esm/browser/chat/chat-view.js +2 -1
- package/esm/browser/components/account-recovery-view.d.ts +11 -0
- package/esm/browser/components/account-recovery-view.js +81 -0
- package/esm/browser/components/account-view.d.ts +1 -2
- package/esm/browser/components/account-view.js +10 -1
- package/esm/browser/components/app-nav.js +19 -8
- package/esm/browser/components/app-shell-hooks.d.ts +5 -0
- package/esm/browser/components/app-shell-hooks.js +45 -0
- package/esm/browser/components/app-shell-state.js +2 -1
- package/esm/browser/components/app-view.js +9 -5
- package/esm/browser/components/chat-emoji.d.ts +35 -0
- package/esm/browser/components/chat-emoji.js +129 -0
- package/esm/browser/components/cloud-sign-in-view.d.ts +1 -1
- package/esm/browser/components/composer-attachments.d.ts +6 -0
- package/esm/browser/components/composer-attachments.js +12 -1
- package/esm/browser/components/composer-box-protocol.d.ts +15 -0
- package/esm/browser/components/composer-box.js +110 -87
- package/esm/browser/components/composer-drop-hooks.d.ts +26 -0
- package/esm/browser/components/composer-drop-hooks.js +36 -0
- package/esm/browser/components/composer-emoji.js +1 -1
- package/esm/browser/components/composer-faces.d.ts +16 -0
- package/esm/browser/components/composer-faces.js +37 -0
- package/esm/browser/components/composer-media.d.ts +10 -0
- package/esm/browser/components/composer-media.js +12 -1
- package/esm/browser/components/composer-target.d.ts +4 -0
- package/esm/browser/components/composer-target.js +18 -7
- package/esm/browser/components/composer-type-focus.d.ts +24 -0
- package/esm/browser/components/composer-type-focus.js +17 -0
- package/esm/browser/components/composer-voice.d.ts +24 -0
- package/esm/browser/components/composer-voice.js +37 -0
- package/esm/browser/components/composer.d.ts +2 -2
- package/esm/browser/components/composer.js +39 -8
- package/esm/browser/components/context-menu.js +2 -1
- package/esm/browser/components/emoji-panel.d.ts +11 -7
- package/esm/browser/components/emoji-panel.js +40 -22
- package/esm/browser/components/extension-settings.js +2 -2
- package/esm/browser/components/folder-new.d.ts +18 -0
- package/esm/browser/components/folder-new.js +53 -0
- package/esm/browser/components/folder-picker.d.ts +5 -2
- package/esm/browser/components/folder-picker.js +18 -6
- package/esm/browser/components/host-view.d.ts +1 -1
- package/esm/browser/components/image-menu.d.ts +8 -3
- package/esm/browser/components/image-menu.js +34 -9
- package/esm/browser/components/markdown.js +9 -2
- package/esm/browser/components/media.js +3 -2
- package/esm/browser/components/message-list.js +2 -2
- package/esm/browser/components/message-steps.js +20 -11
- package/esm/browser/components/message-user.js +2 -2
- package/esm/browser/components/moved-notice.js +2 -1
- package/esm/browser/components/nav-places.d.ts +2 -0
- package/esm/browser/components/nav-places.js +4 -2
- package/esm/browser/components/phone-shell.d.ts +2 -0
- package/esm/browser/components/phone-shell.js +5 -1
- package/esm/browser/components/secret-text.d.ts +1 -1
- package/esm/browser/components/secret-text.js +4 -3
- package/esm/browser/components/session-view.js +3 -0
- package/esm/browser/components/settings-choices.d.ts +2 -1
- package/esm/browser/components/settings-choices.js +13 -5
- package/esm/browser/components/settings-more.js +3 -3
- package/esm/browser/components/settings-parts.js +13 -2
- package/esm/browser/components/share-item-sheet.js +7 -1
- package/esm/browser/components/tab-title.d.ts +27 -0
- package/esm/browser/components/tab-title.js +35 -0
- package/esm/browser/components/use-composer-attachments.d.ts +28 -0
- package/esm/browser/components/use-composer-attachments.js +65 -0
- package/esm/browser/components/use-composer-files.d.ts +25 -0
- package/esm/browser/components/use-composer-files.js +52 -0
- package/esm/browser/components/web-composer.d.ts +3 -1
- package/esm/browser/components/web-composer.js +3 -2
- package/esm/browser/components/workbench-view.js +1 -0
- package/esm/browser/components/working-directory.js +2 -1
- package/esm/browser/device/drag-move.d.ts +21 -0
- package/esm/browser/device/drag-move.js +86 -0
- package/esm/browser/extension/icons.js +7 -1
- package/esm/browser/extension/web-api-desktop.d.ts +19 -0
- package/esm/browser/extension/web-api-menus.d.ts +19 -0
- package/esm/browser/extension/web-api-spec.js +2 -0
- package/esm/browser/extension/web-extension-api.d.ts +24 -23
- package/esm/browser/extension/web-extension-context.d.ts +1 -0
- package/esm/browser/extension/web-extension-context.js +12 -5
- package/esm/browser/extension/web-extension-run.js +1 -0
- package/esm/browser/extension/web-share-ui.d.ts +1 -1
- package/esm/browser/extension/web-share-ui.js +2 -0
- package/esm/browser/extension/web-share.d.ts +13 -0
- package/esm/browser/extension/web-share.js +37 -2
- package/esm/browser/i18n/en/account.d.ts +18 -0
- package/esm/browser/i18n/en/account.js +18 -0
- package/esm/browser/i18n/en/call.js +1 -1
- package/esm/browser/i18n/en/chat.d.ts +15 -0
- package/esm/browser/i18n/en/chat.js +16 -1
- package/esm/browser/i18n/en/common.d.ts +2 -0
- package/esm/browser/i18n/en/common.js +2 -0
- package/esm/browser/i18n/en/discover.d.ts +2 -0
- package/esm/browser/i18n/en/discover.js +2 -0
- package/esm/browser/i18n/en/settings.d.ts +17 -0
- package/esm/browser/i18n/en/settings.js +17 -0
- package/esm/browser/i18n/ja/account.js +18 -0
- package/esm/browser/i18n/ja/call.js +1 -1
- package/esm/browser/i18n/ja/chat.js +16 -1
- package/esm/browser/i18n/ja/common.js +2 -0
- package/esm/browser/i18n/ja/discover.js +3 -1
- package/esm/browser/i18n/ja/settings.js +17 -0
- package/esm/browser/i18n/locales.d.ts +55 -1
- package/esm/browser/i18n/messages.d.ts +54 -0
- package/esm/browser/i18n/zh/account.js +18 -0
- package/esm/browser/i18n/zh/call.js +1 -1
- package/esm/browser/i18n/zh/chat.js +16 -1
- package/esm/browser/i18n/zh/common.js +2 -0
- package/esm/browser/i18n/zh/discover.js +3 -1
- package/esm/browser/i18n/zh/settings.js +17 -0
- package/esm/browser/i18n/zh-tw/account.js +18 -0
- package/esm/browser/i18n/zh-tw/call.js +1 -1
- package/esm/browser/i18n/zh-tw/chat.js +16 -1
- package/esm/browser/i18n/zh-tw/common.js +2 -0
- package/esm/browser/i18n/zh-tw/discover.js +3 -1
- package/esm/browser/i18n/zh-tw/settings.js +17 -0
- package/esm/browser/offline/kept-chats.d.ts +3 -1
- package/esm/browser/offline/kept-chats.js +1 -1
- package/esm/browser/partners/group-picker.d.ts +3 -2
- package/esm/browser/partners/group-picker.js +8 -3
- package/esm/browser/sandbox/sandbox-runtime-code.js +1 -1
- package/esm/browser/sandbox/work/work-docs.js +5 -2
- package/esm/browser/sandbox/work/work-frame.d.ts +3 -0
- package/esm/browser/sandbox/work/work-frame.js +9 -3
- package/esm/browser/sandbox/work/work-gates.d.ts +77 -0
- package/esm/browser/sandbox/work/work-gates.js +182 -0
- package/esm/browser/settings/agent-settings.js +1 -1
- package/esm/browser/settings/navigation.d.ts +38 -10
- package/esm/browser/settings/navigation.js +73 -17
- package/esm/browser/settings/settings-protocol.d.ts +16 -1
- package/esm/browser/settings/settings-protocol.js +20 -2
- package/esm/browser/settings/settings.js +4 -1
- package/esm/browser/style/base.d.ts +1 -1
- package/esm/browser/style/base.js +15 -2
- package/esm/browser/style/chat-list.d.ts +1 -1
- package/esm/browser/style/chat-list.js +6 -3
- package/esm/browser/style/conversation-column.d.ts +1 -1
- package/esm/browser/style/conversation-column.js +28 -8
- package/esm/browser/style/conversation.d.ts +1 -1
- package/esm/browser/style/conversation.js +5 -0
- package/esm/browser/style/device.js +5 -0
- package/esm/browser/style/pages.d.ts +1 -1
- package/esm/browser/style/pages.js +3 -3
- package/esm/browser/style/shell.d.ts +1 -1
- package/esm/browser/style/shell.js +13 -6
- package/esm/browser/style/tasks.d.ts +1 -1
- package/esm/browser/style/tasks.js +4 -2
- package/esm/browser/util/chat-emoji.d.ts +44 -0
- package/esm/browser/util/chat-emoji.js +269 -0
- package/esm/browser/util/composer-drop.d.ts +26 -0
- package/esm/browser/util/composer-drop.js +40 -0
- package/esm/browser/util/composer-files.d.ts +48 -0
- package/esm/browser/util/composer-files.js +99 -0
- package/esm/browser/util/composer.d.ts +13 -1
- package/esm/browser/util/composer.js +24 -6
- package/esm/browser/util/markdown.d.ts +5 -0
- package/esm/browser/util/markdown.js +18 -0
- package/esm/browser/util/message.d.ts +6 -1
- package/esm/browser/util/message.js +13 -2
- package/esm/browser/util/process.d.ts +10 -13
- package/esm/browser/util/process.js +31 -83
- package/esm/browser/util/turn-join.d.ts +38 -0
- package/esm/browser/util/turn-join.js +119 -0
- package/esm/browser/workbench-services.js +1 -1
- package/lib/browser/account/account-side.js +4 -0
- package/lib/browser/account/device-account.d.ts +6 -0
- package/lib/browser/account/device-account.js +20 -5
- package/lib/browser/assistant/assistant-view.js +2 -0
- package/lib/browser/assistant/call-announcing.d.ts +26 -0
- package/lib/browser/assistant/call-announcing.js +36 -0
- package/lib/browser/assistant/call-answering.d.ts +44 -0
- package/lib/browser/assistant/call-answering.js +67 -0
- package/lib/browser/assistant/call-hearing.d.ts +54 -0
- package/lib/browser/assistant/call-hearing.js +102 -0
- package/lib/browser/assistant/call-pausing.d.ts +41 -0
- package/lib/browser/assistant/call-pausing.js +86 -0
- package/lib/browser/assistant/call-reading.d.ts +33 -0
- package/lib/browser/assistant/call-reading.js +39 -0
- package/lib/browser/assistant/call-revoicing.d.ts +34 -0
- package/lib/browser/assistant/call-revoicing.js +72 -0
- package/lib/browser/assistant/call-turns.d.ts +30 -0
- package/lib/browser/assistant/call-turns.js +37 -0
- package/lib/browser/assistant/spoken-answer.d.ts +22 -0
- package/lib/browser/assistant/spoken-answer.js +73 -0
- package/lib/browser/assistant/spoken-call.d.ts +8 -0
- package/lib/browser/assistant/spoken-call.js +19 -0
- package/lib/browser/assistant/voice-call-protocol.d.ts +5 -0
- package/lib/browser/assistant/voice-call.d.ts +47 -43
- package/lib/browser/assistant/voice-call.js +192 -218
- package/lib/browser/chat/chat-view.js +2 -1
- package/lib/browser/components/account-recovery-view.d.ts +12 -0
- package/lib/browser/components/account-recovery-view.js +117 -0
- package/lib/browser/components/account-view.d.ts +1 -2
- package/lib/browser/components/account-view.js +10 -1
- package/lib/browser/components/app-nav.js +19 -8
- package/lib/browser/components/app-shell-hooks.d.ts +5 -0
- package/lib/browser/components/app-shell-hooks.js +46 -0
- package/lib/browser/components/app-shell-state.js +1 -0
- package/lib/browser/components/app-view.js +8 -4
- package/lib/browser/components/chat-emoji.d.ts +36 -0
- package/lib/browser/components/chat-emoji.js +167 -0
- package/lib/browser/components/cloud-sign-in-view.d.ts +1 -1
- package/lib/browser/components/composer-attachments.d.ts +6 -0
- package/lib/browser/components/composer-attachments.js +12 -0
- package/lib/browser/components/composer-box-protocol.d.ts +15 -0
- package/lib/browser/components/composer-box.js +107 -84
- package/lib/browser/components/composer-drop-hooks.d.ts +27 -0
- package/lib/browser/components/composer-drop-hooks.js +72 -0
- package/lib/browser/components/composer-emoji.js +1 -1
- package/lib/browser/components/composer-faces.d.ts +17 -0
- package/lib/browser/components/composer-faces.js +73 -0
- package/lib/browser/components/composer-media.d.ts +10 -0
- package/lib/browser/components/composer-media.js +13 -0
- package/lib/browser/components/composer-target.d.ts +4 -0
- package/lib/browser/components/composer-target.js +18 -7
- package/lib/browser/components/composer-type-focus.d.ts +25 -0
- package/lib/browser/components/composer-type-focus.js +20 -0
- package/lib/browser/components/composer-voice.d.ts +25 -0
- package/lib/browser/components/composer-voice.js +73 -0
- package/lib/browser/components/composer.d.ts +2 -2
- package/lib/browser/components/composer.js +38 -7
- package/lib/browser/components/context-menu.js +2 -1
- package/lib/browser/components/emoji-panel.d.ts +11 -7
- package/lib/browser/components/emoji-panel.js +40 -22
- package/lib/browser/components/extension-settings.js +1 -1
- package/lib/browser/components/folder-new.d.ts +19 -0
- package/lib/browser/components/folder-new.js +90 -0
- package/lib/browser/components/folder-picker.d.ts +5 -2
- package/lib/browser/components/folder-picker.js +17 -5
- package/lib/browser/components/host-view.d.ts +1 -1
- package/lib/browser/components/image-menu.d.ts +8 -3
- package/lib/browser/components/image-menu.js +34 -9
- package/lib/browser/components/markdown.js +9 -2
- package/lib/browser/components/media.js +3 -2
- package/lib/browser/components/message-list.js +2 -2
- package/lib/browser/components/message-steps.js +20 -11
- package/lib/browser/components/message-user.js +1 -1
- package/lib/browser/components/moved-notice.js +2 -1
- package/lib/browser/components/nav-places.d.ts +2 -0
- package/lib/browser/components/nav-places.js +4 -2
- package/lib/browser/components/phone-shell.d.ts +2 -0
- package/lib/browser/components/phone-shell.js +5 -1
- package/lib/browser/components/secret-text.d.ts +1 -1
- package/lib/browser/components/secret-text.js +4 -3
- package/lib/browser/components/session-view.js +3 -0
- package/lib/browser/components/settings-choices.d.ts +2 -1
- package/lib/browser/components/settings-choices.js +12 -4
- package/lib/browser/components/settings-more.js +2 -2
- package/lib/browser/components/settings-parts.js +11 -0
- package/lib/browser/components/share-item-sheet.js +7 -1
- package/lib/browser/components/tab-title.d.ts +28 -0
- package/lib/browser/components/tab-title.js +38 -0
- package/lib/browser/components/use-composer-attachments.d.ts +29 -0
- package/lib/browser/components/use-composer-attachments.js +101 -0
- package/lib/browser/components/use-composer-files.d.ts +26 -0
- package/lib/browser/components/use-composer-files.js +88 -0
- package/lib/browser/components/web-composer.d.ts +3 -1
- package/lib/browser/components/web-composer.js +3 -2
- package/lib/browser/components/workbench-view.js +1 -0
- package/lib/browser/components/working-directory.js +2 -1
- package/lib/browser/device/drag-move.d.ts +22 -0
- package/lib/browser/device/drag-move.js +122 -0
- package/lib/browser/extension/icons.js +6 -0
- package/lib/browser/extension/web-api-desktop.d.ts +19 -0
- package/lib/browser/extension/web-api-menus.d.ts +19 -0
- package/lib/browser/extension/web-api-spec.js +2 -0
- package/lib/browser/extension/web-extension-api.d.ts +24 -23
- package/lib/browser/extension/web-extension-context.d.ts +1 -0
- package/lib/browser/extension/web-extension-context.js +12 -5
- package/lib/browser/extension/web-extension-run.js +1 -0
- package/lib/browser/extension/web-share-ui.d.ts +1 -1
- package/lib/browser/extension/web-share-ui.js +2 -0
- package/lib/browser/extension/web-share.d.ts +13 -0
- package/lib/browser/extension/web-share.js +37 -2
- package/lib/browser/i18n/en/account.d.ts +18 -0
- package/lib/browser/i18n/en/account.js +18 -0
- package/lib/browser/i18n/en/call.js +1 -1
- package/lib/browser/i18n/en/chat.d.ts +15 -0
- package/lib/browser/i18n/en/chat.js +16 -1
- package/lib/browser/i18n/en/common.d.ts +2 -0
- package/lib/browser/i18n/en/common.js +2 -0
- package/lib/browser/i18n/en/discover.d.ts +2 -0
- package/lib/browser/i18n/en/discover.js +2 -0
- package/lib/browser/i18n/en/settings.d.ts +17 -0
- package/lib/browser/i18n/en/settings.js +17 -0
- package/lib/browser/i18n/ja/account.js +18 -0
- package/lib/browser/i18n/ja/call.js +1 -1
- package/lib/browser/i18n/ja/chat.js +16 -1
- package/lib/browser/i18n/ja/common.js +2 -0
- package/lib/browser/i18n/ja/discover.js +3 -1
- package/lib/browser/i18n/ja/settings.js +17 -0
- package/lib/browser/i18n/locales.d.ts +55 -1
- package/lib/browser/i18n/messages.d.ts +54 -0
- package/lib/browser/i18n/zh/account.js +18 -0
- package/lib/browser/i18n/zh/call.js +1 -1
- package/lib/browser/i18n/zh/chat.js +16 -1
- package/lib/browser/i18n/zh/common.js +2 -0
- package/lib/browser/i18n/zh/discover.js +3 -1
- package/lib/browser/i18n/zh/settings.js +17 -0
- package/lib/browser/i18n/zh-tw/account.js +18 -0
- package/lib/browser/i18n/zh-tw/call.js +1 -1
- package/lib/browser/i18n/zh-tw/chat.js +16 -1
- package/lib/browser/i18n/zh-tw/common.js +2 -0
- package/lib/browser/i18n/zh-tw/discover.js +3 -1
- package/lib/browser/i18n/zh-tw/settings.js +17 -0
- package/lib/browser/offline/kept-chats.d.ts +3 -1
- package/lib/browser/offline/kept-chats.js +1 -1
- package/lib/browser/partners/group-picker.d.ts +3 -2
- package/lib/browser/partners/group-picker.js +8 -3
- package/lib/browser/sandbox/sandbox-runtime-code.js +1 -1
- package/lib/browser/sandbox/work/work-docs.js +5 -2
- package/lib/browser/sandbox/work/work-frame.d.ts +3 -0
- package/lib/browser/sandbox/work/work-frame.js +9 -3
- package/lib/browser/sandbox/work/work-gates.d.ts +78 -0
- package/lib/browser/sandbox/work/work-gates.js +185 -0
- package/lib/browser/settings/agent-settings.js +1 -1
- package/lib/browser/settings/navigation.d.ts +38 -10
- package/lib/browser/settings/navigation.js +74 -18
- package/lib/browser/settings/settings-protocol.d.ts +16 -1
- package/lib/browser/settings/settings-protocol.js +21 -3
- package/lib/browser/settings/settings.js +3 -0
- package/lib/browser/style/base.d.ts +1 -1
- package/lib/browser/style/base.js +15 -2
- package/lib/browser/style/chat-list.d.ts +1 -1
- package/lib/browser/style/chat-list.js +6 -3
- package/lib/browser/style/conversation-column.d.ts +1 -1
- package/lib/browser/style/conversation-column.js +28 -8
- package/lib/browser/style/conversation.d.ts +1 -1
- package/lib/browser/style/conversation.js +5 -0
- package/lib/browser/style/device.js +5 -0
- package/lib/browser/style/pages.d.ts +1 -1
- package/lib/browser/style/pages.js +3 -3
- package/lib/browser/style/shell.d.ts +1 -1
- package/lib/browser/style/shell.js +13 -6
- package/lib/browser/style/tasks.d.ts +1 -1
- package/lib/browser/style/tasks.js +4 -2
- package/lib/browser/util/chat-emoji.d.ts +45 -0
- package/lib/browser/util/chat-emoji.js +272 -0
- package/lib/browser/util/composer-drop.d.ts +27 -0
- package/lib/browser/util/composer-drop.js +43 -0
- package/lib/browser/util/composer-files.d.ts +49 -0
- package/lib/browser/util/composer-files.js +102 -0
- package/lib/browser/util/composer.d.ts +13 -1
- package/lib/browser/util/composer.js +24 -6
- package/lib/browser/util/markdown.d.ts +5 -0
- package/lib/browser/util/markdown.js +18 -0
- package/lib/browser/util/message.d.ts +6 -1
- package/lib/browser/util/message.js +13 -2
- package/lib/browser/util/process.d.ts +10 -13
- package/lib/browser/util/process.js +32 -84
- package/lib/browser/util/turn-join.d.ts +39 -0
- package/lib/browser/util/turn-join.js +122 -0
- package/lib/browser/workbench-services.js +1 -1
- package/package.json +7 -7
- package/public/emoji/wechat-v1.webp +0 -0
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
/** How far a press moves before it drags: less is a click. */
|
|
3
|
+
const MOVE_PX = 6;
|
|
4
|
+
/** Where the entries are: the rail of the desktop, the tabs at the bottom of a phone. */
|
|
5
|
+
const CONTAINER = '.ta-rail-items, .ta-tabbar';
|
|
6
|
+
/** Where a drop lands: the place of the entry whose middle is nearest the pointer, along the row or the column. */
|
|
7
|
+
function landing(target, x, y) {
|
|
8
|
+
var _a;
|
|
9
|
+
var _b;
|
|
10
|
+
const container = (_a = target === null || target === void 0 ? void 0 : target.closest) === null || _a === void 0 ? void 0 : _a.call(target, CONTAINER);
|
|
11
|
+
const entries = container ? [...container.querySelectorAll('[data-nav-page]')] : [];
|
|
12
|
+
const row = !!(container === null || container === void 0 ? void 0 : container.classList.contains('ta-tabbar'));
|
|
13
|
+
let nearest;
|
|
14
|
+
for (const entry of entries) {
|
|
15
|
+
const rect = entry.getBoundingClientRect();
|
|
16
|
+
const distance = row ? Math.abs(x - (rect.left + rect.width / 2)) : Math.abs(y - (rect.top + rect.height / 2));
|
|
17
|
+
if (!nearest || distance < nearest.distance) {
|
|
18
|
+
nearest = { id: (_b = entry.getAttribute('data-nav-page')) !== null && _b !== void 0 ? _b : '', distance };
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
return nearest ? { target: nearest.id } : {};
|
|
22
|
+
}
|
|
23
|
+
export function useDragMove(move) {
|
|
24
|
+
const [dragging, setDragging] = React.useState(undefined);
|
|
25
|
+
const current = React.useRef(move);
|
|
26
|
+
current.current = move;
|
|
27
|
+
const stop = React.useRef(() => undefined);
|
|
28
|
+
React.useEffect(() => stop.current, []);
|
|
29
|
+
const onPointerDown = React.useCallback((event) => {
|
|
30
|
+
var _a, _b;
|
|
31
|
+
var _c;
|
|
32
|
+
const entry = (_b = (_a = event.target).closest) === null || _b === void 0 ? void 0 : _b.call(_a, `[${current.current.attr}]`);
|
|
33
|
+
if (!entry || !event.isPrimary || event.button !== 0 || event.pointerType === 'touch') {
|
|
34
|
+
return;
|
|
35
|
+
}
|
|
36
|
+
const page = (_c = entry.getAttribute(current.current.attr)) !== null && _c !== void 0 ? _c : '';
|
|
37
|
+
const from = { x: event.clientX, y: event.clientY };
|
|
38
|
+
let on = false;
|
|
39
|
+
let at = {};
|
|
40
|
+
const begin = (x, y) => {
|
|
41
|
+
on = true;
|
|
42
|
+
entry.setAttribute('data-dragging', '');
|
|
43
|
+
document.documentElement.setAttribute('data-dragging', '');
|
|
44
|
+
at = landing(document.elementFromPoint(x, y), x, y);
|
|
45
|
+
setDragging({ page, ...at });
|
|
46
|
+
};
|
|
47
|
+
const finish = (commit) => {
|
|
48
|
+
if (on) {
|
|
49
|
+
entry.removeAttribute('data-dragging');
|
|
50
|
+
document.documentElement.removeAttribute('data-dragging');
|
|
51
|
+
setDragging(undefined);
|
|
52
|
+
if (commit) {
|
|
53
|
+
current.current.onMove(page, at.target);
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
off();
|
|
57
|
+
};
|
|
58
|
+
const onMove = (moved) => {
|
|
59
|
+
var _a;
|
|
60
|
+
if (!on) {
|
|
61
|
+
if (Math.hypot(moved.clientX - from.x, moved.clientY - from.y) <= MOVE_PX) {
|
|
62
|
+
return;
|
|
63
|
+
}
|
|
64
|
+
// Past a few pixels it is a drag: no selection of the icon under it, no click of the press.
|
|
65
|
+
(_a = window.getSelection()) === null || _a === void 0 ? void 0 : _a.removeAllRanges();
|
|
66
|
+
begin(moved.clientX, moved.clientY);
|
|
67
|
+
return;
|
|
68
|
+
}
|
|
69
|
+
at = landing(document.elementFromPoint(moved.clientX, moved.clientY), moved.clientX, moved.clientY);
|
|
70
|
+
setDragging({ page, ...at });
|
|
71
|
+
};
|
|
72
|
+
const onUp = () => finish(true);
|
|
73
|
+
const onCancel = () => finish(false);
|
|
74
|
+
const off = () => {
|
|
75
|
+
document.removeEventListener('pointermove', onMove);
|
|
76
|
+
document.removeEventListener('pointerup', onUp);
|
|
77
|
+
document.removeEventListener('pointercancel', onCancel);
|
|
78
|
+
};
|
|
79
|
+
document.addEventListener('pointermove', onMove);
|
|
80
|
+
document.addEventListener('pointerup', onUp);
|
|
81
|
+
document.addEventListener('pointercancel', onCancel);
|
|
82
|
+
stop.current = off;
|
|
83
|
+
}, []);
|
|
84
|
+
return { onPointerDown, dragging };
|
|
85
|
+
}
|
|
86
|
+
//# sourceMappingURL=drag-move.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AlarmClock, AlignCenter, AlignLeft, AlignRight, Aperture, AppWindow, Archive, ArrowDown, ArrowDownToLine, ArrowDownWideNarrow, ArrowLeft, ArrowRight, ArrowUp, ArrowUpDown, ArrowUpNarrowWide, Bell, BellOff, BetweenHorizontalStart, BetweenVerticalStart, Bold, BookOpen, Bot, Box, Bug, Building2, Calendar, Camera, CaseSensitive, ChartColumn, ChartSpline, Check, ChevronDown, ChevronLeft, ChevronRight, ChevronsDownUp, ChevronsUpDown, ChevronUp, Circle, CircleAlert, CircleArrowRight, CircleHelp, Clipboard, ClipboardPaste, Clock, Cloud, CloudUpload, Code, Coins, Columns2, Contact, Copy, CopyMinus, CornerDownRight, CornerUpLeft, Cpu, Crown, Database, Download, Ellipsis, Eraser, ExternalLink, Eye, EyeOff, File, FileArchive, FileDiff, FilePlus, Files, FileText, Film, FlaskConical, Folder, FolderInput, FolderLock, FolderOpen, FolderPlus, FolderSearch, FolderTree, Forward, Gamepad2, Gauge, GitBranch, GitCommitHorizontal, Globe, Grip, Hand, HardDrive, Hash, Headphones, Heart, House, Image, ImagePlus, Info, Keyboard, KeyRound, Laptop, LayoutDashboard, Lightbulb, Link, List, ListChecks, ListTodo, ListTree, ListX, LoaderCircle, LocateFixed, Lock, MapIcon, Maximize, Maximize2, Megaphone, MemoryStick, MessageCircle, MessageSquareDot, MessageSquareText, MessagesSquare, Mic, Minimize2, Minus, Monitor, MonitorSmartphone, MousePointer2, MousePointerClick, Navigation, Package, PackageOpen, PaintBucket, Paperclip, Pencil, Phone, Pin, PinOff, Play, Plus, Pointer, Power, Presentation, Puzzle, QrCode, Quote, Radar, RefreshCw, Regex, Replace, ReplaceAll, Rocket, RotateCcw, Rows2, Save, Scan, ScanLine, ScrollText, Search, Send, Server, Share2, Sheet, Shield, ShieldAlert, ShieldCheck, Shuffle, Sigma, SlidersHorizontal, Smartphone, Snowflake, Sparkles, Square, SquareMinus, SquarePlus, SquareTerminal, Star, StarOff, Store, TableCellsMerge, Target, Text, ThumbsDown, ThumbsUp, Timer, Trash2, TrendingDown, TrendingUp, Trophy, Undo2, Unplug, Upload, User, UserPlus, Users, Volume2, WholeWord, Wrench, X, Zap, } from 'lucide-react';
|
|
1
|
+
import { AlarmClock, AlignCenter, AlignLeft, AlignRight, Aperture, AppWindow, Archive, ArrowDown, ArrowDownToLine, ArrowDownWideNarrow, ArrowLeft, ArrowRight, ArrowUp, ArrowUpDown, ArrowUpNarrowWide, Bell, BellOff, BetweenHorizontalStart, BetweenVerticalStart, Blocks, Bold, BookOpen, Bot, Box, Bug, Building2, Calendar, Camera, CaseSensitive, ChartColumn, ChartSpline, Check, ChevronDown, ChevronLeft, ChevronRight, ChevronsDownUp, ChevronsUpDown, ChevronUp, Circle, CircleAlert, CircleArrowRight, CircleHelp, Clipboard, ClipboardPaste, Clock, Cloud, CloudUpload, Code, Coins, Columns2, Contact, Copy, CopyMinus, CornerDownRight, CornerUpLeft, Cpu, Crown, Database, Download, Ellipsis, Eraser, ExternalLink, Eye, EyeOff, File, FileArchive, FileDiff, FilePlus, Files, FileText, Film, FlaskConical, Folder, FolderInput, FolderLock, FolderOpen, FolderPlus, FolderSearch, FolderTree, Forward, Gamepad2, Gauge, GitBranch, GitCommitHorizontal, Globe, Grip, Hand, HardDrive, Hash, Headphones, Heart, House, Image, ImagePlus, Info, Keyboard, KeyRound, Laptop, LayoutDashboard, Lightbulb, Link, List, ListChecks, ListTodo, ListTree, ListX, LoaderCircle, LocateFixed, Lock, MapIcon, Maximize, Maximize2, Megaphone, MemoryStick, MessageCircle, MessageSquareDot, MessageSquareText, MessagesSquare, Mic, Minimize2, Minus, Monitor, MonitorSmartphone, MousePointer2, MousePointerClick, Navigation, Package, PackageOpen, PaintBucket, Palette, Paperclip, Pause, Pencil, Phone, Pin, PinOff, Play, Plus, Pointer, Power, Presentation, Puzzle, QrCode, Quote, Radar, RefreshCw, Regex, Replace, ReplaceAll, Rocket, RotateCcw, Rows2, Save, Scan, ScanLine, ScrollText, Search, Send, Server, Share2, Sheet, Shield, ShieldAlert, ShieldCheck, Shuffle, Sigma, SkipBack, SkipForward, SlidersHorizontal, Smartphone, Snowflake, Sparkles, Square, SquareMinus, SquarePlus, SquareTerminal, Star, StarOff, Store, TableCellsMerge, Target, Text, ThumbsDown, ThumbsUp, Timer, Trash2, TrendingDown, TrendingUp, Trophy, Undo2, Unplug, Upload, User, UserPlus, Users, Volume2, VolumeX, WholeWord, Wrench, X, Zap, } from 'lucide-react';
|
|
2
2
|
/** The icons a web extension gets as `pi.ui.icons`; names are lucide's. Only add: removing one breaks extensions. */
|
|
3
3
|
export const WEB_ICONS = Object.freeze({
|
|
4
4
|
AlignCenter,
|
|
@@ -13,8 +13,11 @@ export const WEB_ICONS = Object.freeze({
|
|
|
13
13
|
Eraser,
|
|
14
14
|
PaintBucket,
|
|
15
15
|
Sigma,
|
|
16
|
+
SkipBack,
|
|
17
|
+
SkipForward,
|
|
16
18
|
Snowflake,
|
|
17
19
|
TableCellsMerge,
|
|
20
|
+
Blocks,
|
|
18
21
|
AlarmClock,
|
|
19
22
|
Aperture,
|
|
20
23
|
AppWindow,
|
|
@@ -132,7 +135,9 @@ export const WEB_ICONS = Object.freeze({
|
|
|
132
135
|
Navigation,
|
|
133
136
|
Package,
|
|
134
137
|
PackageOpen,
|
|
138
|
+
Palette,
|
|
135
139
|
Paperclip,
|
|
140
|
+
Pause,
|
|
136
141
|
Pencil,
|
|
137
142
|
Phone,
|
|
138
143
|
Pin,
|
|
@@ -192,6 +197,7 @@ export const WEB_ICONS = Object.freeze({
|
|
|
192
197
|
UserPlus,
|
|
193
198
|
Users,
|
|
194
199
|
Volume2,
|
|
200
|
+
VolumeX,
|
|
195
201
|
WholeWord,
|
|
196
202
|
Wrench,
|
|
197
203
|
X,
|
|
@@ -24,6 +24,25 @@ export interface WebDeviceUI {
|
|
|
24
24
|
* finger lands on something, `medium` for what the user should feel, a pat say. Newer than some Ta apps.
|
|
25
25
|
*/
|
|
26
26
|
haptic?(strength?: 'light' | 'medium'): void;
|
|
27
|
+
/**
|
|
28
|
+
* Ta Desktop's way to the file manager of the system (Finder, File Explorer, that of Linux), for paths of
|
|
29
|
+
* this machine; undefined in a browser and the mobile app. A directory of `ssh://` is not of this machine.
|
|
30
|
+
*/
|
|
31
|
+
readonly desktop?: WebDesktop;
|
|
32
|
+
/**
|
|
33
|
+
* Ta Desktop: sends a command of the Chrome DevTools Protocol to the page of a `<webview>` of this page
|
|
34
|
+
* (its `getWebContentsId()`), as that page's debugger, and resolves with its result; `undefined`
|
|
35
|
+
* elsewhere. Only commands on the page itself: Accessibility, CSS, DOM, DOMSnapshot, Emulation, Input,
|
|
36
|
+
* Log, Overlay, Page and Runtime, without those that touch files, downloads or navigate (use the
|
|
37
|
+
* element's `loadURL`); the app refuses the rest.
|
|
38
|
+
*/
|
|
39
|
+
readonly debugWebview?: (webContentsId: number, method: string, params?: Record<string, unknown>) => Promise<unknown>;
|
|
40
|
+
/**
|
|
41
|
+
* Ta Desktop: hears the tabs the pages of this page's `<webview>`s open or close (WebviewTabEvent); returns how to
|
|
42
|
+
* stop. Hearing tells the app the view has tabs: until then, and in an older app, a page opens its new tabs in place
|
|
43
|
+
* and Cmd+W goes to the app. `undefined` elsewhere.
|
|
44
|
+
*/
|
|
45
|
+
readonly onWebviewTab?: (listener: (event: WebviewTabEvent) => void) => () => void;
|
|
27
46
|
}
|
|
28
47
|
/**
|
|
29
48
|
* A tab the browser view should open or close, as Ta Desktop tells it (`ui.onWebviewTab`): a page of a webview opened a
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
/** Part of the web extension API (web-extension-api.ts, which exports it all): the entries extensions add to menus of the page. */
|
|
2
2
|
import type { TaWorkPoint } from '@celljs/ta-protocol';
|
|
3
|
+
import type { WebComposerImage, WebComposerImageLimits } from './web-api-components.js';
|
|
3
4
|
import type { WebMenuItem } from './web-api-contributions.js';
|
|
4
5
|
import type { WebIcon } from './web-extension-api.js';
|
|
5
6
|
/** A conversation as a list shows it: an open one has its session, one kept on the disk its file only. */
|
|
@@ -72,6 +73,17 @@ export type WebShareItem = {
|
|
|
72
73
|
gets?: string;
|
|
73
74
|
/** An icon of the page (WEB_ICONS) for what it is. */
|
|
74
75
|
icon?: string;
|
|
76
|
+
} | {
|
|
77
|
+
/**
|
|
78
|
+
* A picture or a video of a conversation or a chat, long pressed (its menu: Forward, Share). `url` is one the
|
|
79
|
+
* page can fetch (data:, blob: or http:), of the picture itself, not the smaller one shown; `accepts` reads
|
|
80
|
+
* `media`, not the bytes.
|
|
81
|
+
*/
|
|
82
|
+
kind: 'media';
|
|
83
|
+
media: 'image' | 'video';
|
|
84
|
+
url: string;
|
|
85
|
+
/** As it is called, with its extension: `photo.jpg`. */
|
|
86
|
+
name: string;
|
|
75
87
|
};
|
|
76
88
|
/**
|
|
77
89
|
* A way to share (registerShareWay): a tile of the share sheet, for what it takes. Send to friends and group chats,
|
|
@@ -84,6 +96,8 @@ export interface WebShareWay {
|
|
|
84
96
|
icon: WebIcon;
|
|
85
97
|
/** Its place among the tiles, the lowest first; default 100. */
|
|
86
98
|
order?: number;
|
|
99
|
+
/** Sends it into chats the user picks: Forward in the menu of a picture or a video goes straight to it. */
|
|
100
|
+
forward?: boolean;
|
|
87
101
|
/** Whether it takes the item; read as the sheet opens. */
|
|
88
102
|
accepts(item: WebShareItem): boolean;
|
|
89
103
|
/** The user picked it: the sheet has closed, the way shows what it needs (who to send to, the words of a post). */
|
|
@@ -96,6 +110,11 @@ export interface WebShareUI {
|
|
|
96
110
|
* Share under a block and in the menu of a file opens it. Newer than some Ta apps: `pi.ui.share?.(…)`.
|
|
97
111
|
*/
|
|
98
112
|
share(item: WebShareItem): void;
|
|
113
|
+
/**
|
|
114
|
+
* A picture made smaller as the message box makes it (WebComposerProps.images with `limits`), the picture as it
|
|
115
|
+
* was kept as `original` when it was: for one forwarded into a chat. Newer than some Ta apps: `pi.ui.shrinkImage?.(…)`.
|
|
116
|
+
*/
|
|
117
|
+
shrinkImage?(image: WebComposerImage, limits: WebComposerImageLimits): Promise<WebComposerImage>;
|
|
99
118
|
}
|
|
100
119
|
/** What a web extension adds to the menus of the page (WebExtensionAPI extends it). */
|
|
101
120
|
export interface WebMenus {
|
|
@@ -75,6 +75,7 @@ export const WEB_UI_SPEC = {
|
|
|
75
75
|
FullScreen: component(B),
|
|
76
76
|
Stack: component(B),
|
|
77
77
|
Markdown: component(B),
|
|
78
|
+
EmojiText: component(B),
|
|
78
79
|
Empty: component(B),
|
|
79
80
|
Loading: component(B),
|
|
80
81
|
Skeleton: component(B),
|
|
@@ -107,6 +108,7 @@ export const WEB_UI_SPEC = {
|
|
|
107
108
|
saveFile: call(A),
|
|
108
109
|
shareExtension: fire(A),
|
|
109
110
|
share: fire(B),
|
|
111
|
+
shrinkImage: call(B),
|
|
110
112
|
stopExtension: fire(A),
|
|
111
113
|
forgetPage: fire(A),
|
|
112
114
|
useView: hook(A),
|
|
@@ -7,7 +7,7 @@ import type { Language, Theme } from '../settings/settings-protocol.js';
|
|
|
7
7
|
import type { WebCodeRendererOptions, WebCodeRendererProps, WebMarkdownProps } from './web-api-code.js';
|
|
8
8
|
import type { CodeEditorProps, DiffEditorProps, WebAvatarProps, WebComposerProps, WebConversationViewProps, WebDialogProps, WebEmptyProps, WebFaceProps, WebFolderPickerProps, WebFullScreenProps, WebGroupFaceProps, WebHoldToTalkProps, WebImageViewerProps, WebLoadingProps, WebModelPickerProps, WebPictureCardsProps, WebPictureProps, WebSelectBarProps, WebSelectCheckProps, WebShareSheetProps, WebStackProps, WebSwipeRowProps, WebSwitchProps, WebTaskIconProps, WebVoice } from './web-api-components.js';
|
|
9
9
|
import type { WebAsk, WebCallsAPI, WebChatIconSource, WebChatTagsAPI, WebComposerAddon, WebCustomMessage, WebHomeSource, WebInitiative, WebMenuItem, WebNotifyOptions, WebOpener, WebOpenerOptions, WebRoomAddon, WebRoomAddonEntry, WebSearchSource, WebSessionNotice, WebSessionOpening, WebSettingsSection, WebShareTarget, WebTaskEntry, WebTaskRemoval, WebTaskSource, WebTool, WebToolRendererResolver, WebView, WebViewInfo, WidgetOptions } from './web-api-contributions.js';
|
|
10
|
-
import type {
|
|
10
|
+
import type { WebDeviceUI, WebFileDrag } from './web-api-desktop.js';
|
|
11
11
|
import type { WebEditorsUI } from './web-api-editors.js';
|
|
12
12
|
import type { WebFileViews, WebFileViewsUI } from './web-api-file-views.js';
|
|
13
13
|
import type { WebHomeUI, WebPartnersAPI, WebPartnersUI } from './web-api-home.js';
|
|
@@ -245,31 +245,12 @@ export interface WebExtensionUI extends WebMessagesUI, WebHomeUI, WebPartnersUI,
|
|
|
245
245
|
readonly supportsWebview: boolean;
|
|
246
246
|
/** The message box (`Composer`) takes `videos`, picked with the pictures. Newer than some Ta apps. */
|
|
247
247
|
readonly composerVideos?: boolean;
|
|
248
|
-
/**
|
|
249
|
-
* Ta Desktop's way to the file manager of the system (Finder, File Explorer, that of Linux), for paths of
|
|
250
|
-
* this machine; undefined in a browser and the mobile app. A directory of `ssh://` is not of this machine.
|
|
251
|
-
*/
|
|
252
|
-
readonly desktop?: WebDesktop;
|
|
253
248
|
/**
|
|
254
249
|
* Files dragged between views, as the explorer drags them: `set` them in `dragstart`. Dropped on the
|
|
255
250
|
* message box of a conversation they become `@` references (relative to its directory when they are in
|
|
256
251
|
* it); a terminal takes their `paths`; anywhere else they are their paths as text.
|
|
257
252
|
*/
|
|
258
253
|
readonly fileDrag: WebFileDrag;
|
|
259
|
-
/**
|
|
260
|
-
* Ta Desktop: sends a command of the Chrome DevTools Protocol to the page of a `<webview>` of this page
|
|
261
|
-
* (its `getWebContentsId()`), as that page's debugger, and resolves with its result; `undefined`
|
|
262
|
-
* elsewhere. Only commands on the page itself: Accessibility, CSS, DOM, DOMSnapshot, Emulation, Input,
|
|
263
|
-
* Log, Overlay, Page and Runtime, without those that touch files, downloads or navigate (use the
|
|
264
|
-
* element's `loadURL`); the app refuses the rest.
|
|
265
|
-
*/
|
|
266
|
-
readonly debugWebview?: (webContentsId: number, method: string, params?: Record<string, unknown>) => Promise<unknown>;
|
|
267
|
-
/**
|
|
268
|
-
* Ta Desktop: hears the tabs the pages of this page's `<webview>`s open or close (WebviewTabEvent); returns how to
|
|
269
|
-
* stop. Hearing tells the app the view has tabs: until then, and in an older app, a page opens its new tabs in place
|
|
270
|
-
* and Cmd+W goes to the app. `undefined` elsewhere.
|
|
271
|
-
*/
|
|
272
|
-
readonly onWebviewTab?: (listener: (event: WebviewTabEvent) => void) => () => void;
|
|
273
254
|
/**
|
|
274
255
|
* Into the message box in front (a conversation's, or `ui.Composer` of a page): `quote` before what it holds, `images`
|
|
275
256
|
* (base64) as if pasted, `text` typed at its end (newer than some Ta apps); false when none shows.
|
|
@@ -338,9 +319,21 @@ export interface WebExtensionUI extends WebMessagesUI, WebHomeUI, WebPartnersUI,
|
|
|
338
319
|
usePages(): readonly WebPageInfo[];
|
|
339
320
|
/**
|
|
340
321
|
* A React hook: the context menu of the page, as its lists open it (a right click, a long press on a touch
|
|
341
|
-
* screen): the menu to render,
|
|
342
|
-
|
|
343
|
-
|
|
322
|
+
* screen): the menu to render, `open` for `onContextMenu`, with sections set apart by a line, and `openAt` to
|
|
323
|
+
* open it where the user pressed (the point and the row around it), as an entry of a menu opening another.
|
|
324
|
+
*/
|
|
325
|
+
useContextMenu(): [
|
|
326
|
+
React.ReactNode,
|
|
327
|
+
(event: React.MouseEvent, sections: WebMenuItem[][]) => void,
|
|
328
|
+
(at: {
|
|
329
|
+
x: number;
|
|
330
|
+
y: number;
|
|
331
|
+
around?: {
|
|
332
|
+
top: number;
|
|
333
|
+
bottom: number;
|
|
334
|
+
};
|
|
335
|
+
}, sections: WebMenuItem[][], caption?: string) => void
|
|
336
|
+
];
|
|
344
337
|
/**
|
|
345
338
|
* For a menu of your own (`position: fixed`, its entries `role="menuitem"`), from a layout effect: places it
|
|
346
339
|
* where it was `opened` as the menus of the page go (at the pointer; under a finger, out from under it and the
|
|
@@ -481,6 +474,14 @@ export interface WebExtensionUI extends WebMessagesUI, WebHomeUI, WebPartnersUI,
|
|
|
481
474
|
readonly keepAwake?: () => () => void;
|
|
482
475
|
/** As the conversations show it (WebMarkdownProps). */
|
|
483
476
|
readonly Markdown: React.ComponentType<WebMarkdownProps>;
|
|
477
|
+
/**
|
|
478
|
+
* Words with the faces of a chat said in them (`[微笑]`, as WeChat says them) drawn as their pictures, as the
|
|
479
|
+
* conversations draw them; the words alone as they are. Newer than some Ta apps: `pi.ui.EmojiText ?? …`.
|
|
480
|
+
*/
|
|
481
|
+
readonly EmojiText?: React.ComponentType<{
|
|
482
|
+
text: string;
|
|
483
|
+
className?: string;
|
|
484
|
+
}>;
|
|
484
485
|
/**
|
|
485
486
|
* A conversation to read, drawn as those of the page are, with what extensions draw in them (cards, plots,
|
|
486
487
|
* 3D); nothing in it acts. Newer than some Ta apps: `pi.ui.Conversation ?? …`.
|
|
@@ -58,6 +58,7 @@ export declare class WebExtensionContext {
|
|
|
58
58
|
settings: TaSettings;
|
|
59
59
|
}>;
|
|
60
60
|
protected readonly listDirectory: (directory: string) => Promise<import("@celljs/ta-protocol").TaDirEntry[]>;
|
|
61
|
+
protected readonly createDirectory: (directory: string, name: string) => Promise<void>;
|
|
61
62
|
/** The message box, whose button of the directory lists those of the server. */
|
|
62
63
|
protected readonly composer: (props: WebComposerProps) => React.FunctionComponentElement<import("../components/web-composer.js").WebComposerHostProps>;
|
|
63
64
|
/** The message box of an extension: its drafts under its name, apart from those of the others. */
|
|
@@ -5,6 +5,7 @@ import { TaskIcon } from '../assistant/task-views.js';
|
|
|
5
5
|
import { webVoice } from '../assistant/web-voice.js';
|
|
6
6
|
import { useBusy } from '../components/busy.js';
|
|
7
7
|
import { ChatAskUtil, LET_GO_ASKS } from '../components/chat-asks.js';
|
|
8
|
+
import { EmojiText } from '../components/chat-emoji.js';
|
|
8
9
|
import { PINNED } from '../components/chat-list-util.js';
|
|
9
10
|
import { CodeEditor } from '../components/code-editor.js';
|
|
10
11
|
import { ComposerTarget } from '../components/composer-target.js';
|
|
@@ -73,12 +74,14 @@ export class WebExtensionContext {
|
|
|
73
74
|
this.codeEditor = (props) => React.createElement(CodeEditor, { ...props, settings: this.host.settings });
|
|
74
75
|
this.diffEditor = (props) => React.createElement(DiffEditor, { ...props, settings: this.host.settings });
|
|
75
76
|
this.listDirectory = (directory) => this.host.workbench.workspace.listDirectory('.', directory);
|
|
77
|
+
this.createDirectory = (directory, name) => this.host.workbench.workspace.createDirectory(name, directory);
|
|
76
78
|
/** The message box, whose button of the directory lists those of the server. */
|
|
77
79
|
this.composer = (props) => { var _a; return React.createElement(WebComposer, {
|
|
78
80
|
...props,
|
|
79
81
|
notices: this.host.notices,
|
|
80
82
|
server: this.host.workbench.server,
|
|
81
83
|
listDirectory: this.listDirectory,
|
|
84
|
+
createDirectory: this.createDirectory,
|
|
82
85
|
serverCwd: (_a = this.host.workbench.state.server) === null || _a === void 0 ? void 0 : _a.cwd,
|
|
83
86
|
remote: this.host.workbench,
|
|
84
87
|
}); };
|
|
@@ -87,6 +90,7 @@ export class WebExtensionContext {
|
|
|
87
90
|
this.modelPicker = (props) => React.createElement(SettingsModelPicker, { ...props, settings: this.host.workbench.settings });
|
|
88
91
|
this.folderPicker = ({ initial, onPick, onClose }) => { var _a; return React.createElement(FolderPicker, {
|
|
89
92
|
list: this.listDirectory,
|
|
93
|
+
create: this.createDirectory,
|
|
90
94
|
initial: initial || ((_a = this.host.workbench.state.server) === null || _a === void 0 ? void 0 : _a.cwd) || '.',
|
|
91
95
|
remote: this.host.workbench,
|
|
92
96
|
onPick: async (path) => onPick(path),
|
|
@@ -340,11 +344,13 @@ export class WebExtensionContext {
|
|
|
340
344
|
return React.useSyncExternalStore(host.subscribePages, () => host.extensions.pages());
|
|
341
345
|
},
|
|
342
346
|
useContextMenu: () => {
|
|
343
|
-
const [menu, open] = useContextMenu();
|
|
344
|
-
const
|
|
347
|
+
const [menu, open, openAt] = useContextMenu();
|
|
348
|
+
const items = React.useCallback((sections) => sections
|
|
345
349
|
.filter(section => section.length > 0)
|
|
346
|
-
.flatMap((section, index) => [...(index > 0 ? ['-'] : []), ...section])
|
|
347
|
-
|
|
350
|
+
.flatMap((section, index) => [...(index > 0 ? ['-'] : []), ...section]), []);
|
|
351
|
+
const openSections = React.useCallback((event, sections) => open(event, items(sections)), [open, items]);
|
|
352
|
+
const openSectionsAt = React.useCallback((at, sections, caption) => openAt(at, items(sections), caption), [openAt, items]);
|
|
353
|
+
return [menu, openSections, openSectionsAt];
|
|
348
354
|
},
|
|
349
355
|
attachMenu: ContextMenuUtil.attach,
|
|
350
356
|
scanCode: CodeScan.readable()
|
|
@@ -413,8 +419,9 @@ export class WebExtensionContext {
|
|
|
413
419
|
voice: WebExtensionRunUtil.voice(run, this.voice),
|
|
414
420
|
// Let go as the extension stops, whether or not it did; nothing held once stopped.
|
|
415
421
|
keepAwake: () => WebExtensionRunUtil.track(run, () => KeepAwake.shared.hold()),
|
|
416
|
-
apps: TaWebApps.of({ pages: () => host.extensions.pages(), settings, notices, fallbackIcon: WEB_ICONS.
|
|
422
|
+
apps: TaWebApps.of({ pages: () => host.extensions.pages(), settings, notices, fallbackIcon: WEB_ICONS.Blocks, stopped: () => run.stopped }),
|
|
417
423
|
Markdown,
|
|
424
|
+
EmojiText,
|
|
418
425
|
Conversation: ConversationView,
|
|
419
426
|
useChatScroll: (sent, key) => useConversationScroll(sent, { sentTo: 'bottom', key }),
|
|
420
427
|
Empty: EmptyState,
|
|
@@ -4,4 +4,4 @@ import type { WebExtensionContextHost } from './web-extension-context.js';
|
|
|
4
4
|
* What `ui` gives an extension to share with (docs/design/ta-links.md 4): the share sheet of a link, that of something
|
|
5
5
|
* (`share`, its tiles the ways to share), and handing an extension on. None of it does anything once it stopped.
|
|
6
6
|
*/
|
|
7
|
-
export declare function shareUI(host: Pick<WebExtensionContextHost, 'extensions' | 'notices' | 'workbench'>, stopped: () => boolean): Pick<WebExtensionUI, 'shareExtension' | 'share' | 'ShareSheet'>;
|
|
7
|
+
export declare function shareUI(host: Pick<WebExtensionContextHost, 'extensions' | 'notices' | 'workbench'>, stopped: () => boolean): Pick<WebExtensionUI, 'shareExtension' | 'share' | 'shrinkImage' | 'ShareSheet'>;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { ShareSheet } from '../components/share-sheet.js';
|
|
3
|
+
import { ImageShrink } from '../util/image-shrink.js';
|
|
3
4
|
/**
|
|
4
5
|
* What `ui` gives an extension to share with (docs/design/ta-links.md 4): the share sheet of a link, that of something
|
|
5
6
|
* (`share`, its tiles the ways to share), and handing an extension on. None of it does anything once it stopped.
|
|
@@ -15,6 +16,7 @@ export function shareUI(host, stopped) {
|
|
|
15
16
|
return {
|
|
16
17
|
shareExtension: target => !stopped() && host.extensions.share(target),
|
|
17
18
|
share: item => !stopped() && host.extensions.shareItem(item),
|
|
19
|
+
shrinkImage: (image, limits) => ImageShrink.shrink(image, limits),
|
|
18
20
|
ShareSheet: sheet,
|
|
19
21
|
};
|
|
20
22
|
}
|
|
@@ -8,6 +8,19 @@ export declare namespace WebShareUtil {
|
|
|
8
8
|
function ofBlock(block: WebCodeRef): WebShareItem | undefined;
|
|
9
9
|
/** A file; none for a folder. */
|
|
10
10
|
function ofFile(file: WebFileRef): WebShareItem | undefined;
|
|
11
|
+
/**
|
|
12
|
+
* A picture or a video at `url`, called `name` when given, else as the end of its path says (a file of the
|
|
13
|
+
* workspace, of the web), else by its kind and the type a data: URL says.
|
|
14
|
+
*/
|
|
15
|
+
function ofMedia(media: 'image' | 'video', url: string, name?: string): WebShareItem;
|
|
16
|
+
/**
|
|
17
|
+
* The ways that take a picture or a video (`accepts` reads `media`, not its URL, known only once picked): Forward
|
|
18
|
+
* goes straight to the one that sends into chats (WebShareWay.forward), Share to the sheet when any other takes it.
|
|
19
|
+
*/
|
|
20
|
+
function mediaWays(all: readonly WebShareWay[], media: 'image' | 'video'): {
|
|
21
|
+
forward?: WebShareWay;
|
|
22
|
+
others: WebShareWay[];
|
|
23
|
+
};
|
|
11
24
|
/** The ways that take it, in their order. */
|
|
12
25
|
function ways(all: readonly WebShareWay[], item: WebShareItem): WebShareWay[];
|
|
13
26
|
/** What it is called: the title a work gives itself, the name of a file; '' for a block that says nothing. */
|
|
@@ -17,6 +17,27 @@ export var WebShareUtil;
|
|
|
17
17
|
return file.kind === 'file' ? { kind: 'file', file } : undefined;
|
|
18
18
|
}
|
|
19
19
|
WebShareUtil.ofFile = ofFile;
|
|
20
|
+
/**
|
|
21
|
+
* A picture or a video at `url`, called `name` when given, else as the end of its path says (a file of the
|
|
22
|
+
* workspace, of the web), else by its kind and the type a data: URL says.
|
|
23
|
+
*/
|
|
24
|
+
function ofMedia(media, url, name) {
|
|
25
|
+
var _a;
|
|
26
|
+
const data = /^data:(image|video)\/([\w.+-]+)[;,]/i.exec(url);
|
|
27
|
+
const last = data || url.startsWith('blob:') ? '' : decodeURIComponent((_a = url.split(/[?#]/)[0].split('/').pop()) !== null && _a !== void 0 ? _a : '');
|
|
28
|
+
const extension = data ? `.${data[2].toLowerCase() === 'jpeg' ? 'jpg' : data[2].toLowerCase()}` : '';
|
|
29
|
+
return { kind: 'media', media, url, name: name || last || `${media}${extension}` };
|
|
30
|
+
}
|
|
31
|
+
WebShareUtil.ofMedia = ofMedia;
|
|
32
|
+
/**
|
|
33
|
+
* The ways that take a picture or a video (`accepts` reads `media`, not its URL, known only once picked): Forward
|
|
34
|
+
* goes straight to the one that sends into chats (WebShareWay.forward), Share to the sheet when any other takes it.
|
|
35
|
+
*/
|
|
36
|
+
function mediaWays(all, media) {
|
|
37
|
+
const taking = ways(all, { kind: 'media', media, url: '', name: '' });
|
|
38
|
+
return { forward: taking.find(way => way.forward), others: taking.filter(way => !way.forward) };
|
|
39
|
+
}
|
|
40
|
+
WebShareUtil.mediaWays = mediaWays;
|
|
20
41
|
/** The ways that take it, in their order. */
|
|
21
42
|
function ways(all, item) {
|
|
22
43
|
return all.filter(way => way.accepts(item));
|
|
@@ -25,13 +46,27 @@ export var WebShareUtil;
|
|
|
25
46
|
/** What it is called: the title a work gives itself, the name of a file; '' for a block that says nothing. */
|
|
26
47
|
function name(item) {
|
|
27
48
|
var _a;
|
|
28
|
-
return item.kind === 'file'
|
|
49
|
+
return item.kind === 'file'
|
|
50
|
+
? item.file.name
|
|
51
|
+
: item.kind === 'link'
|
|
52
|
+
? item.title
|
|
53
|
+
: item.kind === 'media'
|
|
54
|
+
? item.name
|
|
55
|
+
: ((_a = TaWorkTitle.of(item.language, item.code)) !== null && _a !== void 0 ? _a : '');
|
|
29
56
|
}
|
|
30
57
|
WebShareUtil.name = name;
|
|
31
58
|
/** The name of its icon (WEB_ICONS): that of the kind of work, a file's. */
|
|
32
59
|
function icon(item) {
|
|
33
60
|
var _a, _b;
|
|
34
|
-
return item.kind === 'file'
|
|
61
|
+
return item.kind === 'file'
|
|
62
|
+
? 'FileText'
|
|
63
|
+
: item.kind === 'link'
|
|
64
|
+
? ((_a = item.icon) !== null && _a !== void 0 ? _a : 'Link')
|
|
65
|
+
: item.kind === 'media'
|
|
66
|
+
? item.media === 'image'
|
|
67
|
+
? 'Image'
|
|
68
|
+
: 'Film'
|
|
69
|
+
: ((_b = TA_WORK_BLOCKS[item.language]) !== null && _b !== void 0 ? _b : 'Sparkles');
|
|
35
70
|
}
|
|
36
71
|
WebShareUtil.icon = icon;
|
|
37
72
|
function label(way) {
|
|
@@ -95,6 +95,24 @@ export declare const ACCOUNT_EN: {
|
|
|
95
95
|
'ta.auth.hintRemote': string;
|
|
96
96
|
'ta.auth.later': string;
|
|
97
97
|
'ta.myDevices.title': string;
|
|
98
|
+
'ta.recovery.title': string;
|
|
99
|
+
'ta.recovery.hint': string;
|
|
100
|
+
'ta.recovery.make': string;
|
|
101
|
+
'ta.recovery.makeHint': string;
|
|
102
|
+
'ta.recovery.show': string;
|
|
103
|
+
'ta.recovery.saved': string;
|
|
104
|
+
'ta.recovery.made': string;
|
|
105
|
+
'ta.recovery.none': string;
|
|
106
|
+
'ta.recovery.drop': string;
|
|
107
|
+
'ta.recovery.dropConfirm': string;
|
|
108
|
+
'ta.recovery.replaced': string;
|
|
109
|
+
'ta.recovery.restore': string;
|
|
110
|
+
'ta.recovery.code': string;
|
|
111
|
+
'ta.recovery.placeholder': string;
|
|
112
|
+
'ta.recovery.restoreNow': string;
|
|
113
|
+
'ta.recovery.restored': string;
|
|
114
|
+
'ta.recovery.failed': string;
|
|
115
|
+
'ta.recovery.kept': string;
|
|
98
116
|
'ta.myDevices.hint': string;
|
|
99
117
|
'ta.myDevices.signInWith': string;
|
|
100
118
|
'ta.myDevices.enterCode': string;
|
|
@@ -97,6 +97,24 @@ export const ACCOUNT_EN = {
|
|
|
97
97
|
'ta.auth.hintRemote': 'Credentials stay on the machine that runs Ta.',
|
|
98
98
|
'ta.auth.later': 'Later',
|
|
99
99
|
'ta.myDevices.title': 'My devices',
|
|
100
|
+
'ta.recovery.title': 'Recovery code',
|
|
101
|
+
'ta.recovery.hint': 'If this computer is lost, sign in to your account on a new one and enter this code: your friends and group chats come back as they were.',
|
|
102
|
+
'ta.recovery.make': 'Make a recovery code',
|
|
103
|
+
'ta.recovery.makeHint': 'Made now, it replaces the one before it.',
|
|
104
|
+
'ta.recovery.show': 'Write it down and keep it away from this computer: {code}',
|
|
105
|
+
'ta.recovery.saved': 'I saved it',
|
|
106
|
+
'ta.recovery.made': 'Made {time}. Kept in your account, sealed: Ta cannot read it.',
|
|
107
|
+
'ta.recovery.none': 'No recovery code yet: the friends and group chats of this computer would be lost with it.',
|
|
108
|
+
'ta.recovery.drop': 'Take it away',
|
|
109
|
+
'ta.recovery.dropConfirm': 'Take away the recovery code? Your friends and group chats stop being kept in your account.',
|
|
110
|
+
'ta.recovery.replaced': 'A recovery code was made on another computer, which this one no longer opens. Make a new one here.',
|
|
111
|
+
'ta.recovery.restore': 'Got a recovery code?',
|
|
112
|
+
'ta.recovery.code': 'Recovery code',
|
|
113
|
+
'ta.recovery.placeholder': 'XXXXX-XXXXX-XXXXX-XXXXX-XXXXX-XXXXX',
|
|
114
|
+
'ta.recovery.restoreNow': 'Bring back friends and group chats',
|
|
115
|
+
'ta.recovery.restored': '{friends} friends and {rooms} group chats are back.',
|
|
116
|
+
'ta.recovery.failed': 'That code does not open a backup of this account.',
|
|
117
|
+
'ta.recovery.kept': 'Kept {time}',
|
|
100
118
|
'ta.myDevices.hint': 'Sign in to one account on your computers and phone: they show up on each other, no code to scan.',
|
|
101
119
|
'ta.myDevices.signInWith': 'Sign in with {name}',
|
|
102
120
|
'ta.myDevices.enterCode': 'Enter this code on {name}',
|
|
@@ -23,7 +23,7 @@ export const CALL_EN = {
|
|
|
23
23
|
'ta.call.speaking': 'Ta is speaking',
|
|
24
24
|
'ta.call.me': 'Me',
|
|
25
25
|
'ta.call.onScreen': 'The rest is on the screen.',
|
|
26
|
-
'ta.call.waitsDialog': 'Ta waits for you: {title}',
|
|
26
|
+
'ta.call.waitsDialog': 'Ta waits for you: {title}. Say yes or no.',
|
|
27
27
|
'ta.call.waitsAsk': 'Waiting for you to decide: {title}',
|
|
28
28
|
'ta.call.taskDone': 'Task done: {title}',
|
|
29
29
|
'ta.call.taskFailed': 'Task did not finish: {title}',
|
|
@@ -16,6 +16,8 @@ export declare const CHAT_EN: {
|
|
|
16
16
|
'ta.chat.draft': string;
|
|
17
17
|
'ta.chat.asksCount': string;
|
|
18
18
|
'ta.chat.unseenCount': string;
|
|
19
|
+
'ta.tab.todo': string;
|
|
20
|
+
'ta.tab.urgent': string;
|
|
19
21
|
'ta.chat.letGo': string;
|
|
20
22
|
'ta.chat.toAsk': string;
|
|
21
23
|
'ta.chat.removed': string;
|
|
@@ -80,6 +82,8 @@ export declare const CHAT_EN: {
|
|
|
80
82
|
'ta.message.pictureSeen': string;
|
|
81
83
|
'ta.message.steered': string;
|
|
82
84
|
'ta.message.steeredTitle': string;
|
|
85
|
+
'ta.message.wentOn': string;
|
|
86
|
+
'ta.message.wentOnTitle': string;
|
|
83
87
|
'ta.message.queued': string;
|
|
84
88
|
'ta.message.queuedTitle': string;
|
|
85
89
|
'ta.message.branch': string;
|
|
@@ -123,6 +127,11 @@ export declare const CHAT_EN: {
|
|
|
123
127
|
'ta.folder.up': string;
|
|
124
128
|
'ta.folder.type': string;
|
|
125
129
|
'ta.folder.empty': string;
|
|
130
|
+
'ta.folder.new': string;
|
|
131
|
+
'ta.folder.newName': string;
|
|
132
|
+
'ta.folder.newConfirm': string;
|
|
133
|
+
'ta.folder.newInvalid': string;
|
|
134
|
+
'ta.folder.newExists': string;
|
|
126
135
|
'ta.folder.failed': string;
|
|
127
136
|
'ta.folder.open': string;
|
|
128
137
|
'ta.chat.search': string;
|
|
@@ -203,6 +212,8 @@ export declare const CHAT_EN: {
|
|
|
203
212
|
'ta.composer.camera': string;
|
|
204
213
|
'ta.composer.more': string;
|
|
205
214
|
'ta.composer.emoji': string;
|
|
215
|
+
'ta.composer.emojiRecent': string;
|
|
216
|
+
'ta.composer.emojiAll': string;
|
|
206
217
|
'ta.composer.deleteBack': string;
|
|
207
218
|
'ta.composer.page': string;
|
|
208
219
|
'ta.composer.mentionFile': string;
|
|
@@ -216,6 +227,10 @@ export declare const CHAT_EN: {
|
|
|
216
227
|
'ta.composer.image.type': string;
|
|
217
228
|
'ta.composer.image.size': string;
|
|
218
229
|
'ta.composer.image.count': string;
|
|
230
|
+
'ta.composer.addFile': string;
|
|
231
|
+
'ta.composer.removeFile': string;
|
|
232
|
+
'ta.composer.file.noDir': string;
|
|
233
|
+
'ta.composer.file.size': string;
|
|
219
234
|
'ta.composer.filesUnavailable': string;
|
|
220
235
|
'ta.composer.filter': string;
|
|
221
236
|
'ta.composer.noMatch': string;
|
|
@@ -16,6 +16,8 @@ export const CHAT_EN = {
|
|
|
16
16
|
'ta.chat.draft': 'Draft',
|
|
17
17
|
'ta.chat.asksCount': '{count} waiting for you to decide',
|
|
18
18
|
'ta.chat.unseenCount': '{count} new messages',
|
|
19
|
+
'ta.tab.todo': '{count, plural, one {# to do} other {# to do}}',
|
|
20
|
+
'ta.tab.urgent': '{count, plural, one {# urgent} other {# urgent}}',
|
|
19
21
|
'ta.chat.letGo': 'Skip this decision',
|
|
20
22
|
'ta.chat.toAsk': 'Waiting for you: {question}',
|
|
21
23
|
'ta.chat.removed': 'Removed ({count})',
|
|
@@ -80,6 +82,8 @@ export const CHAT_EN = {
|
|
|
80
82
|
'ta.message.pictureSeen': 'Picture {n} · {what}',
|
|
81
83
|
'ta.message.steered': 'Said on the way',
|
|
82
84
|
'ta.message.steeredTitle': 'Written while it worked: it read this after its tools and went on with it',
|
|
85
|
+
'ta.message.wentOn': 'Said after it stopped',
|
|
86
|
+
'ta.message.wentOnTitle': 'Written once it had stopped: the work goes on from here, in the same context',
|
|
83
87
|
'ta.message.queued': 'Waited for the reply',
|
|
84
88
|
'ta.message.queuedTitle': 'Written while it worked: sent once it had answered',
|
|
85
89
|
'ta.message.branch': 'Summary of the other branch',
|
|
@@ -122,7 +126,12 @@ export const CHAT_EN = {
|
|
|
122
126
|
'ta.folder.path': 'Path of a directory; Enter to go there',
|
|
123
127
|
'ta.folder.up': 'Up one level',
|
|
124
128
|
'ta.folder.type': 'Type a path',
|
|
125
|
-
'ta.folder.empty': '
|
|
129
|
+
'ta.folder.empty': 'An empty folder: use it as it is, or make a folder in it',
|
|
130
|
+
'ta.folder.new': 'New folder',
|
|
131
|
+
'ta.folder.newName': 'Name of the folder',
|
|
132
|
+
'ta.folder.newConfirm': 'Create',
|
|
133
|
+
'ta.folder.newInvalid': 'A name has no / or \\, and is not . or ..',
|
|
134
|
+
'ta.folder.newExists': '{name} is already here',
|
|
126
135
|
'ta.folder.failed': 'Cannot open {path}.',
|
|
127
136
|
'ta.folder.open': 'Use this directory',
|
|
128
137
|
'ta.chat.search': 'Search chats',
|
|
@@ -203,6 +212,8 @@ export const CHAT_EN = {
|
|
|
203
212
|
'ta.composer.camera': 'Camera',
|
|
204
213
|
'ta.composer.more': 'Add and settings',
|
|
205
214
|
'ta.composer.emoji': 'Emoji',
|
|
215
|
+
'ta.composer.emojiRecent': 'Recently used',
|
|
216
|
+
'ta.composer.emojiAll': 'All emoji',
|
|
206
217
|
'ta.composer.deleteBack': 'Delete',
|
|
207
218
|
'ta.composer.page': 'Page {page}',
|
|
208
219
|
'ta.composer.mentionFile': 'Mention a file',
|
|
@@ -216,6 +227,10 @@ export const CHAT_EN = {
|
|
|
216
227
|
'ta.composer.image.type': '{name} is not an image Ta can send: PNG, JPEG, GIF or WebP.',
|
|
217
228
|
'ta.composer.image.size': '{name} is larger than 5 MB.',
|
|
218
229
|
'ta.composer.image.count': 'At most 8 images per message.',
|
|
230
|
+
'ta.composer.addFile': 'Add files',
|
|
231
|
+
'ta.composer.removeFile': 'Remove the file',
|
|
232
|
+
'ta.composer.file.noDir': 'Files go to the directory of the conversation: pick one first.',
|
|
233
|
+
'ta.composer.file.size': '{name} is larger than {mb} MB.',
|
|
219
234
|
'ta.composer.filesUnavailable': 'File search is not available on this server yet',
|
|
220
235
|
'ta.composer.filter': 'Search',
|
|
221
236
|
'ta.composer.noMatch': 'Nothing matches',
|