@celljs/ta-web 4.49.0 → 4.50.1
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-menu.js +1 -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-update-view.js +4 -4
- 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/app-update.d.ts +6 -3
- package/esm/browser/device/app-update.js +11 -5
- 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/service.d.ts +4 -0
- package/esm/browser/i18n/en/service.js +4 -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/service.js +4 -0
- package/esm/browser/i18n/ja/settings.js +17 -0
- package/esm/browser/i18n/locales.d.ts +59 -1
- package/esm/browser/i18n/messages.d.ts +58 -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/service.js +4 -0
- 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/service.js +4 -0
- 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-menu.js +1 -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-update-view.js +4 -4
- 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/app-update.d.ts +6 -3
- package/lib/browser/device/app-update.js +11 -5
- 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/service.d.ts +4 -0
- package/lib/browser/i18n/en/service.js +4 -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/service.js +4 -0
- package/lib/browser/i18n/ja/settings.js +17 -0
- package/lib/browser/i18n/locales.d.ts +59 -1
- package/lib/browser/i18n/messages.d.ts +58 -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/service.js +4 -0
- 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/service.js +4 -0
- 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
|
@@ -3,5 +3,5 @@
|
|
|
3
3
|
* chip of the head, the card of a start to let go. Alike wherever they show; what waits for the user is
|
|
4
4
|
* the one thing that stands out, a failure only by its dot.
|
|
5
5
|
*/
|
|
6
|
-
export declare const TASKS_STYLE = "\n/* Its face (TaskIcon): the corners are set by its side. The tile of what no one does: grey once ended, in the green of the faces while it goes on (--ta-tint-3, style/tints.ts). */\n.ta-task-icon { flex: none; display: inline-grid; place-items: center; overflow: hidden; }\n.ta-task-tile { background: var(--ta-chip); color: var(--ta-secondary); transition: background-color 0.3s ease, color 0.3s ease; }\n.ta-task-tile.ta-on { background: var(--ta-tint-3); color: var(--ta-tint-ink-3); }\n.ta-task-time { flex: none; font-size: calc(12px * var(--ta-font-scale)); line-height: calc(18px * var(--ta-font-scale)); color: var(--ta-muted); font-variant-numeric: tabular-nums; }\n.ta-task-more { position: absolute; top: 50%; right: 6px; transform: translateY(-50%); opacity: 0; transition: opacity 120ms; }\n.ta-task-card:hover .ta-task-more, .ta-task-row:hover .ta-task-more, .ta-task-more:focus-visible { opacity: 1; }\n\n/* A card in the turn that started it */\n.ta-task-cards { display: flex; flex-direction: column; gap: 6px; width: 100%; max-width: 560px; margin: 4px 0 10px; }\n.ta-task-card { position: relative; display: flex; align-items: center; min-width: 0; border: 1px solid var(--ta-border); border-radius: 12px; background: var(--ta-card); transition: border-color 140ms, background 140ms; animation: ta-in 220ms var(--ta-ease); }\n.ta-task-card:hover { border-color: var(--ta-border-field); }\n.ta-task-card-main { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; padding: 9px 14px 9px 10px; border: 0; border-radius: inherit; background: transparent; color: inherit; font: inherit; text-align: left; cursor: pointer; }\n.ta-task-card-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }\n.ta-task-card-top { display: flex; align-items: baseline; gap: 10px; min-width: 0; }\n.ta-task-card-title { flex: 1; min-width: 0; font-size: calc(13.5px * var(--ta-font-scale)); line-height: calc(20px * var(--ta-font-scale)); font-weight: 500; color: var(--ta-text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }\n.ta-task-card-bottom { display: flex; align-items: center; gap: 4px; min-width: 0; margin-left: -3px; font-size: calc(12.5px * var(--ta-font-scale)); line-height: calc(18px * var(--ta-font-scale)); color: var(--ta-muted); }\n.ta-task-card-detail { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }\n.ta-task-chevron { flex: none; margin-right: -4px; color: var(--ta-muted); transition: opacity 120ms; }\n.ta-task-card:has(.ta-task-more) .ta-task-card-main { padding-right: 40px; }\n.ta-task-card:has(.ta-task-more) .ta-task-chevron { position: absolute; right: 13px; }\n.ta-task-card:hover:has(.ta-task-more) .ta-task-chevron { opacity: 0; }\n.ta-task-card.ta-task-waiting { border-color: color-mix(in srgb, var(--ta-yellow) 40%, var(--ta-border)); background: color-mix(in srgb, var(--ta-yellow) 5%, var(--ta-card)); }\n.ta-task-waiting .ta-task-card-detail, .ta-task-waiting .ta-task-row-detail { color: color-mix(in srgb, var(--ta-yellow) 80%, var(--ta-text)); }\n\n/* Where a task said how it ended: a quiet line, the double tells the rest */\n.ta-task-update { display: inline-flex; align-self: flex-start; align-items: center; gap: 4px; max-width: 100%; margin: 2px 0 2px -4px; padding: 3px 8px 3px 2px; border: 0; border-radius: 8px; background: transparent; color: var(--ta-muted); font: inherit; font-size: calc(12.5px * var(--ta-font-scale)); line-height: calc(18px * var(--ta-font-scale)); cursor: pointer; transition: background 120ms, color 120ms; animation: ta-in 220ms var(--ta-ease); }\n.ta-task-update:hover { background: var(--ta-hover); color: var(--ta-secondary); }\n.ta-task-update-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }\n.ta-task-update-chevron { flex: none; opacity: 0.6; }\n.ta-notice { max-width: 100%; margin: 2px 0; animation: ta-in 220ms var(--ta-ease); }\n.ta-notice-head { display: inline-flex; align-items: center; gap: 5px; max-width: 100%; margin-left: -4px; padding: 3px 8px 3px 4px; border: 0; border-radius: 8px; background: transparent; color: var(--ta-muted); font: inherit; font-size: calc(12.5px * var(--ta-font-scale)); line-height: calc(18px * var(--ta-font-scale)); text-align: left; cursor: pointer; transition: background 120ms, color 120ms; }\n.ta-notice-head:hover { background: var(--ta-hover); color: var(--ta-secondary); }\n.ta-notice-icon { flex: none; opacity: 0.75; }\n.ta-notice-from { flex: none; color: var(--ta-secondary); }\n.ta-notice-from::after { content: '\u00B7'; margin-left: 5px; color: var(--ta-muted); }\n.ta-notice-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }\n.ta-notice-chevron { flex: none; opacity: 0.6; transition: transform 160ms var(--ta-ease); }\n.ta-notice-head[aria-expanded=\"true\"] .ta-notice-chevron { transform: rotate(90deg); }\n.ta-notice-head[aria-expanded=\"true\"] .ta-notice-text { display: none; }\n.ta-notice-head[aria-expanded=\"true\"] .ta-notice-from::after { content: none; }\n.ta-notice-body { margin: 2px 0 6px 4px; padding-left: 12px; border-left: 2px solid var(--ta-border); color: var(--ta-secondary); font-size: calc(13px * var(--ta-font-scale)); }\n\n/* A row of the lists */\n.ta-task-group { display: flex; flex-direction: column; gap: 2px; }\n.ta-task-group-title { display: flex; align-items: center; gap: 6px; height: 26px; padding: 0 8px; font-size: calc(12px * var(--ta-font-scale)); font-weight: 500; color: var(--ta-muted); }\n.ta-task-group-count { min-width: 16px; height: 16px; padding: 0 5px; box-sizing: border-box; border-radius: 8px; background: var(--ta-chip); font-size: calc(11px * var(--ta-font-scale)); line-height: calc(16px * var(--ta-font-scale)); text-align: center; font-variant-numeric: tabular-nums; }\n.ta-task-rows { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 1px; }\n.ta-task-row { position: relative; border-radius: 9px; transition: background 120ms; }\n.ta-task-row:hover { background: var(--ta-hover); }\n.ta-task-row.ta-selecting:has(.ta-task-row-main[aria-pressed=\"true\"]) { background: var(--ta-selected); }\n.ta-task-row-main:disabled { cursor: default; }\n.ta-task-row-main { width: 100%; display: flex; align-items: center; gap: 10px; padding: 7px 10px 7px 8px; border: 0; border-radius: inherit; background: transparent; color: inherit; font: inherit; text-align: left; cursor: pointer; }\n.ta-task-row-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }\n.ta-task-row-title { font-size: calc(13px * var(--ta-font-scale)); line-height: calc(19px * var(--ta-font-scale)); font-weight: 500; color: var(--ta-text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }\n.ta-task-row-detail { display: flex; align-items: center; gap: 3px; min-width: 0; margin-left: -3px; font-size: calc(12px * var(--ta-font-scale)); line-height: calc(17px * var(--ta-font-scale)); color: var(--ta-muted); }\n.ta-task-row-detail > span:last-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }\n.ta-task-row:hover:has(.ta-task-more) .ta-task-time { visibility: hidden; }\n.ta-task-more-rows { align-self: flex-start; height: 26px; margin: 2px 4px 0; padding: 0 6px; border: 0; border-radius: 6px; background: transparent; color: var(--ta-muted); font: inherit; font-size: calc(12px * var(--ta-font-scale)); cursor: pointer; }\n.ta-task-more-rows:hover { background: var(--ta-hover); color: var(--ta-secondary); }\n\n/* In the head of the double: how many run, how many need the user */\n.ta-tasks-chip { display: inline-flex; align-items: center; gap: 10px; height: 28px; padding: 0 10px 0 8px; border: 1px solid var(--ta-border); border-radius: 14px; background: var(--ta-card); color: var(--ta-secondary); font: inherit; font-size: calc(12.5px * var(--ta-font-scale)); font-variant-numeric: tabular-nums; white-space: nowrap; cursor: pointer; transition: background 120ms, border-color 120ms; animation: ta-fade 180ms var(--ta-ease); }\n.ta-tasks-chip:hover { background: var(--ta-hover); }\n.ta-tasks-chip-part { display: inline-flex; align-items: center; gap: 2px; }\n.ta-tasks-chip-waiting { color: color-mix(in srgb, var(--ta-yellow) 85%, var(--ta-text)); }\n\n/* A start waiting for the user's go */\n.ta-ask-card { gap: 0; padding: 12px 14px; }\n.ta-ask-card-label { display: flex; align-items: center; gap: 5px; color: var(--ta-blue); font-size: calc(12px * var(--ta-font-scale)); font-weight: 500; line-height: 1.4; }\n.ta-ask-card-title { margin-top: 4px; font-size: calc(15px * var(--ta-font-scale)); font-weight: 600; line-height: 1.4; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; overflow-wrap: anywhere; }\n.ta-ask-card-plan { display: block; width: 100%; margin-top: 4px; padding: 0; border: 0; background: none; color: var(--ta-muted); font: inherit; font-size: calc(13px * var(--ta-font-scale)); line-height: 1.55; text-align: left; cursor: pointer; }\n.ta-ask-card-plan-text { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; white-space: pre-line; overflow-wrap: anywhere; }\n.ta-ask-card-plan.ta-open { max-height: 40vh; overflow-y: auto; cursor: auto; color: var(--ta-secondary); }\n.ta-ask-card-plan.ta-open .ta-ask-card-plan-text { display: block; white-space: pre-wrap; }\n.ta-ask-card-foot { display: flex; align-items: center; gap: 8px; margin-top: 12px; }\n.ta-ask-card-where { flex: 1; min-width: 0; display: inline-flex; align-items: center; gap: 5px; color: var(--ta-muted); font-size: calc(12px * var(--ta-font-scale)); }\n.ta-ask-card-where > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }\n.ta-ask-card-where > svg { flex: none; }\n.ta-ask-card-foot .ta-button { flex: none; min-width: 64px; border-radius: 16px; }\n.ta-ask-card-foot .ta-button.ta-primary { gap: 4px; }\n\n/* A conversation the double follows, in the list of chats */\n.ta-double-tag { display: inline-flex; align-items: center; flex: none; height: 17px; padding: 0 5px; margin-right: 5px; border-radius: 5px; background: color-mix(in srgb, var(--ta-accent) 13%, transparent); color: var(--ta-accent); font-size: calc(11px * var(--ta-font-scale)); font-weight: 500; line-height: calc(17px * var(--ta-font-scale)); vertical-align: 1px; }\n\n/* A finger has no hover: the \u2026 is a long press, the chevron stays. */\n@media (pointer: coarse), (hover: none) {\n .ta-task-more { display: none; }\n .ta-task-card:has(.ta-task-more) .ta-task-card-main { padding-right: 14px; }\n .ta-task-card:has(.ta-task-more) .ta-task-chevron { position: static; opacity: 1; }\n .ta-task-row:hover:has(.ta-task-more) .ta-task-time { visibility: visible; }\n}\n";
|
|
6
|
+
export declare const TASKS_STYLE = "\n/* Its face (TaskIcon): the corners are set by its side. The tile of what no one does: grey once ended, in the green of the faces while it goes on (--ta-tint-3, style/tints.ts). */\n.ta-task-icon { flex: none; display: inline-grid; place-items: center; overflow: hidden; }\n.ta-task-tile { background: var(--ta-chip); color: var(--ta-secondary); transition: background-color 0.3s ease, color 0.3s ease; }\n.ta-task-tile.ta-on { background: var(--ta-tint-3); color: var(--ta-tint-ink-3); }\n.ta-task-time { flex: none; font-size: calc(12px * var(--ta-font-scale)); line-height: calc(18px * var(--ta-font-scale)); color: var(--ta-muted); font-variant-numeric: tabular-nums; }\n.ta-task-more { position: absolute; top: 50%; right: 6px; transform: translateY(-50%); opacity: 0; transition: opacity 120ms; }\n.ta-task-card:hover .ta-task-more, .ta-task-row:hover .ta-task-more, .ta-task-more:focus-visible { opacity: 1; }\n\n/* A card in the turn that started it */\n.ta-task-cards { display: flex; flex-direction: column; gap: 6px; width: 100%; max-width: 560px; margin: 4px 0 10px; }\n.ta-task-card { position: relative; display: flex; align-items: center; min-width: 0; border: 1px solid var(--ta-border); border-radius: 12px; background: var(--ta-card); transition: border-color 140ms, background 140ms; animation: ta-in 220ms var(--ta-ease); }\n.ta-task-card:hover { border-color: var(--ta-border-field); }\n.ta-task-card-main { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; padding: 9px 14px 9px 10px; border: 0; border-radius: inherit; background: transparent; color: inherit; font: inherit; text-align: left; cursor: pointer; }\n.ta-task-card-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }\n.ta-task-card-top { display: flex; align-items: baseline; gap: 10px; min-width: 0; }\n.ta-task-card-title { flex: 1; min-width: 0; font-size: calc(13.5px * var(--ta-font-scale)); line-height: calc(20px * var(--ta-font-scale)); font-weight: 500; color: var(--ta-text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }\n.ta-task-card-bottom { display: flex; align-items: center; gap: 4px; min-width: 0; margin-left: -3px; font-size: calc(12.5px * var(--ta-font-scale)); line-height: calc(18px * var(--ta-font-scale)); color: var(--ta-muted); }\n.ta-task-card-detail { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }\n.ta-task-chevron { flex: none; margin-right: -4px; color: var(--ta-muted); transition: opacity 120ms; }\n.ta-task-card:has(.ta-task-more) .ta-task-card-main { padding-right: 40px; }\n.ta-task-card:has(.ta-task-more) .ta-task-chevron { position: absolute; right: 13px; }\n.ta-task-card:hover:has(.ta-task-more) .ta-task-chevron { opacity: 0; }\n.ta-task-card.ta-task-waiting { border-color: color-mix(in srgb, var(--ta-yellow) 40%, var(--ta-border)); background: color-mix(in srgb, var(--ta-yellow) 5%, var(--ta-card)); }\n.ta-task-waiting .ta-task-card-detail, .ta-task-waiting .ta-task-row-detail { color: color-mix(in srgb, var(--ta-yellow) 80%, var(--ta-text)); }\n\n/* Where a task said how it ended: a quiet line, the double tells the rest */\n.ta-task-update { display: inline-flex; align-self: flex-start; align-items: center; gap: 4px; max-width: 100%; margin: 2px 0 2px -4px; padding: 3px 8px 3px 2px; border: 0; border-radius: 8px; background: transparent; color: var(--ta-muted); font: inherit; font-size: calc(12.5px * var(--ta-font-scale)); line-height: calc(18px * var(--ta-font-scale)); cursor: pointer; transition: background 120ms, color 120ms; animation: ta-in 220ms var(--ta-ease); }\n.ta-task-update:hover { background: var(--ta-hover); color: var(--ta-secondary); }\n.ta-task-update-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }\n.ta-task-update-chevron { flex: none; opacity: 0.6; }\n.ta-notice { max-width: 100%; margin: 2px 0; animation: ta-in 220ms var(--ta-ease); }\n.ta-notice-head { display: inline-flex; align-items: center; gap: 5px; max-width: 100%; margin-left: -4px; padding: 3px 8px 3px 4px; border: 0; border-radius: 8px; background: transparent; color: var(--ta-muted); font: inherit; font-size: calc(12.5px * var(--ta-font-scale)); line-height: calc(18px * var(--ta-font-scale)); text-align: left; cursor: pointer; transition: background 120ms, color 120ms; }\n.ta-notice-head:hover { background: var(--ta-hover); color: var(--ta-secondary); }\n.ta-notice-icon { flex: none; opacity: 0.75; }\n.ta-notice-from { flex: none; color: var(--ta-secondary); }\n.ta-notice-from::after { content: '\u00B7'; margin-left: 5px; color: var(--ta-muted); }\n.ta-notice-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }\n.ta-notice-chevron { flex: none; opacity: 0.6; transition: transform 160ms var(--ta-ease); }\n.ta-notice-head[aria-expanded=\"true\"] .ta-notice-chevron { transform: rotate(90deg); }\n.ta-notice-head[aria-expanded=\"true\"] .ta-notice-text { display: none; }\n.ta-notice-head[aria-expanded=\"true\"] .ta-notice-from::after { content: none; }\n.ta-notice-body { margin: 2px 0 6px 4px; padding-left: 12px; border-left: 2px solid var(--ta-border); color: var(--ta-secondary); font-size: calc(13px * var(--ta-font-scale)); }\n\n/* A row of the lists */\n.ta-task-group { display: flex; flex-direction: column; gap: 2px; }\n.ta-task-group-title { display: flex; align-items: center; gap: 6px; height: 26px; padding: 0 8px; font-size: calc(12px * var(--ta-font-scale)); font-weight: 500; color: var(--ta-muted); }\n.ta-task-group-count { min-width: 16px; height: 16px; padding: 0 5px; box-sizing: border-box; border-radius: 8px; background: var(--ta-chip); font-size: calc(11px * var(--ta-font-scale)); line-height: calc(16px * var(--ta-font-scale)); text-align: center; font-variant-numeric: tabular-nums; }\n.ta-task-rows { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 1px; }\n.ta-task-row { position: relative; border-radius: 9px; transition: background 120ms; }\n.ta-task-row:hover { background: var(--ta-hover); }\n.ta-task-row.ta-selecting:has(.ta-task-row-main[aria-pressed=\"true\"]) { background: var(--ta-selected); }\n.ta-task-row-main:disabled { cursor: default; }\n.ta-task-row-main { width: 100%; display: flex; align-items: center; gap: 10px; padding: 7px 10px 7px 8px; border: 0; border-radius: inherit; background: transparent; color: inherit; font: inherit; text-align: left; cursor: pointer; }\n.ta-task-row-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }\n.ta-task-row-title { font-size: calc(13px * var(--ta-font-scale)); line-height: calc(19px * var(--ta-font-scale)); font-weight: 500; color: var(--ta-text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }\n.ta-task-row-detail { display: flex; align-items: center; gap: 3px; min-width: 0; margin-left: -3px; font-size: calc(12px * var(--ta-font-scale)); line-height: calc(17px * var(--ta-font-scale)); color: var(--ta-muted); }\n.ta-task-row-detail > span:last-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }\n.ta-task-row:hover:has(.ta-task-more) .ta-task-time { visibility: hidden; }\n.ta-task-more-rows { align-self: flex-start; height: 26px; margin: 2px 4px 0; padding: 0 6px; border: 0; border-radius: 6px; background: transparent; color: var(--ta-muted); font: inherit; font-size: calc(12px * var(--ta-font-scale)); cursor: pointer; }\n.ta-task-more-rows:hover { background: var(--ta-hover); color: var(--ta-secondary); }\n\n/* In the head of the double: how many run, how many need the user */\n/* Its height and its round ends are in its own em, as its text is: the text of a larger size does not run out of it.\n Never wider than the room it has: a chip that does not fit there cuts its words, it does not run into the title. */\n.ta-tasks-chip { flex: none; max-width: 100%; min-width: 0; display: inline-flex; align-items: center; gap: 0.8em; height: 2.24em; padding: 0 0.8em 0 0.64em; overflow: hidden; border: 1px solid var(--ta-border); border-radius: 1.12em; background: var(--ta-card); color: var(--ta-secondary); font: inherit; font-size: calc(12.5px * var(--ta-font-scale)); font-variant-numeric: tabular-nums; white-space: nowrap; cursor: pointer; transition: background 120ms, border-color 120ms; animation: ta-fade 180ms var(--ta-ease); }\n.ta-tasks-chip:hover { background: var(--ta-hover); }\n.ta-tasks-chip-part { min-width: 0; display: inline-flex; align-items: center; gap: 0.16em; }\n.ta-tasks-chip-waiting { color: color-mix(in srgb, var(--ta-yellow) 85%, var(--ta-text)); }\n\n/* A start waiting for the user's go */\n.ta-ask-card { gap: 0; padding: 12px 14px; }\n.ta-ask-card-label { display: flex; align-items: center; gap: 5px; color: var(--ta-blue); font-size: calc(12px * var(--ta-font-scale)); font-weight: 500; line-height: 1.4; }\n.ta-ask-card-title { margin-top: 4px; font-size: calc(15px * var(--ta-font-scale)); font-weight: 600; line-height: 1.4; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; overflow-wrap: anywhere; }\n.ta-ask-card-plan { display: block; width: 100%; margin-top: 4px; padding: 0; border: 0; background: none; color: var(--ta-muted); font: inherit; font-size: calc(13px * var(--ta-font-scale)); line-height: 1.55; text-align: left; cursor: pointer; }\n.ta-ask-card-plan-text { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; white-space: pre-line; overflow-wrap: anywhere; }\n.ta-ask-card-plan.ta-open { max-height: 40vh; overflow-y: auto; cursor: auto; color: var(--ta-secondary); }\n.ta-ask-card-plan.ta-open .ta-ask-card-plan-text { display: block; white-space: pre-wrap; }\n.ta-ask-card-foot { display: flex; align-items: center; gap: 8px; margin-top: 12px; }\n.ta-ask-card-where { flex: 1; min-width: 0; display: inline-flex; align-items: center; gap: 5px; color: var(--ta-muted); font-size: calc(12px * var(--ta-font-scale)); }\n.ta-ask-card-where > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }\n.ta-ask-card-where > svg { flex: none; }\n.ta-ask-card-foot .ta-button { flex: none; min-width: 64px; border-radius: 16px; }\n.ta-ask-card-foot .ta-button.ta-primary { gap: 4px; }\n\n/* A conversation the double follows, in the list of chats */\n.ta-double-tag { display: inline-flex; align-items: center; flex: none; height: 17px; padding: 0 5px; margin-right: 5px; border-radius: 5px; background: color-mix(in srgb, var(--ta-accent) 13%, transparent); color: var(--ta-accent); font-size: calc(11px * var(--ta-font-scale)); font-weight: 500; line-height: calc(17px * var(--ta-font-scale)); vertical-align: 1px; }\n\n/* A finger has no hover: the \u2026 is a long press, the chevron stays. */\n@media (pointer: coarse), (hover: none) {\n .ta-task-more { display: none; }\n .ta-task-card:has(.ta-task-more) .ta-task-card-main { padding-right: 14px; }\n .ta-task-card:has(.ta-task-more) .ta-task-chevron { position: static; opacity: 1; }\n .ta-task-row:hover:has(.ta-task-more) .ta-task-time { visibility: visible; }\n}\n";
|
|
7
7
|
//# sourceMappingURL=tasks.d.ts.map
|
|
@@ -70,9 +70,11 @@ exports.TASKS_STYLE = `
|
|
|
70
70
|
.ta-task-more-rows:hover { background: var(--ta-hover); color: var(--ta-secondary); }
|
|
71
71
|
|
|
72
72
|
/* In the head of the double: how many run, how many need the user */
|
|
73
|
-
|
|
73
|
+
/* Its height and its round ends are in its own em, as its text is: the text of a larger size does not run out of it.
|
|
74
|
+
Never wider than the room it has: a chip that does not fit there cuts its words, it does not run into the title. */
|
|
75
|
+
.ta-tasks-chip { flex: none; max-width: 100%; min-width: 0; display: inline-flex; align-items: center; gap: 0.8em; height: 2.24em; padding: 0 0.8em 0 0.64em; overflow: hidden; border: 1px solid var(--ta-border); border-radius: 1.12em; background: var(--ta-card); color: var(--ta-secondary); font: inherit; font-size: calc(12.5px * var(--ta-font-scale)); font-variant-numeric: tabular-nums; white-space: nowrap; cursor: pointer; transition: background 120ms, border-color 120ms; animation: ta-fade 180ms var(--ta-ease); }
|
|
74
76
|
.ta-tasks-chip:hover { background: var(--ta-hover); }
|
|
75
|
-
.ta-tasks-chip-part { display: inline-flex; align-items: center; gap:
|
|
77
|
+
.ta-tasks-chip-part { min-width: 0; display: inline-flex; align-items: center; gap: 0.16em; }
|
|
76
78
|
.ta-tasks-chip-waiting { color: color-mix(in srgb, var(--ta-yellow) 85%, var(--ta-text)); }
|
|
77
79
|
|
|
78
80
|
/* A start waiting for the user's go */
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The faces of a chat, as WeChat's: each said in the text as its name in brackets (`[微笑]`), as WeChat sends them, so
|
|
3
|
+
* that what is said stays text (the model reads it, a Ta of before shows the name, a copy pastes into WeChat) and the
|
|
4
|
+
* page draws the face in its place. Their pictures are one sheet (`public/emoji/wechat-v1.webp`, 10 a row, in this
|
|
5
|
+
* order), loaded once.
|
|
6
|
+
*/
|
|
7
|
+
export declare namespace ChatEmojiUtil {
|
|
8
|
+
/** The faces, in the order of the panel and of the sheet: the name said in the text, and in English. */
|
|
9
|
+
const FACES: readonly (readonly [string, string])[];
|
|
10
|
+
/** The sheet of the pictures, from the page: its faces in rows of {@link COLUMNS}. */
|
|
11
|
+
const SHEET = "emoji/wechat-v1.webp";
|
|
12
|
+
const COLUMNS = 10;
|
|
13
|
+
/** The text a face is said as. */
|
|
14
|
+
function code(index: number): string;
|
|
15
|
+
/** The face a text is, alone (`[强]`), if it is one. */
|
|
16
|
+
function faceOf(text: string): number | undefined;
|
|
17
|
+
/** A face said at `at` of `text` (`[微笑]`): where it is and how long, none where the bracket is not a face. */
|
|
18
|
+
function at(text: string, from: number): {
|
|
19
|
+
index: number;
|
|
20
|
+
length: number;
|
|
21
|
+
} | undefined;
|
|
22
|
+
/** Whether a text says a face at all. */
|
|
23
|
+
function has(text: string): boolean;
|
|
24
|
+
/** A text cut into its words and its faces, in order. */
|
|
25
|
+
function split(text: string): (string | number)[];
|
|
26
|
+
/** The length of the face said just before `caret`, which Delete takes away whole, as WeChat's; 0 when there is none. */
|
|
27
|
+
function before(text: string, caret: number): number;
|
|
28
|
+
/** The face a character of a field is, if it is one. */
|
|
29
|
+
function glyphFace(character: string): number | undefined;
|
|
30
|
+
/** The text as a field shows it: each face said in it (`[微笑]`) one character. */
|
|
31
|
+
function glyphs(text: string): string;
|
|
32
|
+
/** The text of a field as it is said: each face its name in brackets again. */
|
|
33
|
+
function codes(shown: string): string;
|
|
34
|
+
/** Where `caret` of the text is in the field that shows it, and back. */
|
|
35
|
+
function shownCaret(text: string, caret: number): number;
|
|
36
|
+
function saidCaret(shown: string, caret: number): number;
|
|
37
|
+
/** Where the face is on the sheet, as a background position. */
|
|
38
|
+
function position(index: number): string;
|
|
39
|
+
/** The size of the sheet as a background, for a face to fill its box. */
|
|
40
|
+
const SIZE: string;
|
|
41
|
+
const RECENT = 8;
|
|
42
|
+
function recent(storage?: Pick<Storage, 'getItem'> | undefined): number[];
|
|
43
|
+
function used(index: number, storage?: Pick<Storage, 'getItem' | 'setItem'> | undefined): void;
|
|
44
|
+
}
|
|
45
|
+
//# sourceMappingURL=chat-emoji.d.ts.map
|
|
@@ -0,0 +1,272 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ChatEmojiUtil = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* The faces of a chat, as WeChat's: each said in the text as its name in brackets (`[微笑]`), as WeChat sends them, so
|
|
6
|
+
* that what is said stays text (the model reads it, a Ta of before shows the name, a copy pastes into WeChat) and the
|
|
7
|
+
* page draws the face in its place. Their pictures are one sheet (`public/emoji/wechat-v1.webp`, 10 a row, in this
|
|
8
|
+
* order), loaded once.
|
|
9
|
+
*/
|
|
10
|
+
var ChatEmojiUtil;
|
|
11
|
+
(function (ChatEmojiUtil) {
|
|
12
|
+
/** The faces, in the order of the panel and of the sheet: the name said in the text, and in English. */
|
|
13
|
+
ChatEmojiUtil.FACES = [
|
|
14
|
+
['微笑', 'Smile'],
|
|
15
|
+
['撇嘴', 'Grimace'],
|
|
16
|
+
['色', 'Drool'],
|
|
17
|
+
['发呆', 'Scowl'],
|
|
18
|
+
['得意', 'Cool'],
|
|
19
|
+
['流泪', 'Sob'],
|
|
20
|
+
['害羞', 'Shy'],
|
|
21
|
+
['闭嘴', 'Silent'],
|
|
22
|
+
['睡', 'Sleep'],
|
|
23
|
+
['大哭', 'Cry'],
|
|
24
|
+
['尴尬', 'Awkward'],
|
|
25
|
+
['发怒', 'Angry'],
|
|
26
|
+
['调皮', 'Tongue'],
|
|
27
|
+
['呲牙', 'Grin'],
|
|
28
|
+
['惊讶', 'Surprise'],
|
|
29
|
+
['难过', 'Frown'],
|
|
30
|
+
['囧', 'Blush'],
|
|
31
|
+
['抓狂', 'Scream'],
|
|
32
|
+
['吐', 'Puke'],
|
|
33
|
+
['偷笑', 'Chuckle'],
|
|
34
|
+
['愉快', 'Joyful'],
|
|
35
|
+
['白眼', 'Slight'],
|
|
36
|
+
['傲慢', 'Smug'],
|
|
37
|
+
['困', 'Drowsy'],
|
|
38
|
+
['惊恐', 'Panic'],
|
|
39
|
+
['憨笑', 'Laugh'],
|
|
40
|
+
['悠闲', 'Relaxed'],
|
|
41
|
+
['咒骂', 'Scold'],
|
|
42
|
+
['疑问', 'Shocked'],
|
|
43
|
+
['嘘', 'Shhh'],
|
|
44
|
+
['晕', 'Dizzy'],
|
|
45
|
+
['衰', 'Toasted'],
|
|
46
|
+
['骷髅', 'Skull'],
|
|
47
|
+
['敲打', 'Hammer'],
|
|
48
|
+
['再见', 'Wave'],
|
|
49
|
+
['擦汗', 'Speechless'],
|
|
50
|
+
['抠鼻', 'Nose pick'],
|
|
51
|
+
['鼓掌', 'Clap'],
|
|
52
|
+
['坏笑', 'Trick'],
|
|
53
|
+
['右哼哼', 'Bah'],
|
|
54
|
+
['鄙视', 'Pooh-pooh'],
|
|
55
|
+
['委屈', 'Shrunken'],
|
|
56
|
+
['快哭了', 'Tearing up'],
|
|
57
|
+
['阴险', 'Sly'],
|
|
58
|
+
['亲亲', 'Kiss'],
|
|
59
|
+
['可怜', 'Whimper'],
|
|
60
|
+
['笑脸', 'Happy'],
|
|
61
|
+
['生病', 'Sick'],
|
|
62
|
+
['脸红', 'Flushed'],
|
|
63
|
+
['破涕为笑', 'Lol'],
|
|
64
|
+
['恐惧', 'Terror'],
|
|
65
|
+
['失望', 'Let down'],
|
|
66
|
+
['无语', 'Duh'],
|
|
67
|
+
['嘿哈', 'Hey'],
|
|
68
|
+
['捂脸', 'Facepalm'],
|
|
69
|
+
['奸笑', 'Smirk'],
|
|
70
|
+
['机智', 'Smart'],
|
|
71
|
+
['皱眉', 'Concerned'],
|
|
72
|
+
['耶', 'Yeah'],
|
|
73
|
+
['吃瓜', 'Onlooker'],
|
|
74
|
+
['加油', 'Go for it'],
|
|
75
|
+
['汗', 'Sweats'],
|
|
76
|
+
['天啊', 'OMG'],
|
|
77
|
+
['Emm', 'Emm'],
|
|
78
|
+
['社会社会', 'Respect'],
|
|
79
|
+
['旺柴', 'Doge'],
|
|
80
|
+
['好的', 'No prob'],
|
|
81
|
+
['打脸', 'My bad'],
|
|
82
|
+
['哇', 'Wow'],
|
|
83
|
+
['翻白眼', 'Boring'],
|
|
84
|
+
['666', 'Awesome'],
|
|
85
|
+
['让我看看', 'Let me see'],
|
|
86
|
+
['叹气', 'Sigh'],
|
|
87
|
+
['苦涩', 'Hurt'],
|
|
88
|
+
['裂开', 'Broken'],
|
|
89
|
+
['嘴唇', 'Lips'],
|
|
90
|
+
['爱心', 'Heart'],
|
|
91
|
+
['心碎', 'Broken heart'],
|
|
92
|
+
['拥抱', 'Hug'],
|
|
93
|
+
['强', 'Thumbs up'],
|
|
94
|
+
['弱', 'Thumbs down'],
|
|
95
|
+
['握手', 'Shake'],
|
|
96
|
+
['胜利', 'Peace'],
|
|
97
|
+
['抱拳', 'Salute'],
|
|
98
|
+
['勾引', 'Beckon'],
|
|
99
|
+
['拳头', 'Fist'],
|
|
100
|
+
['OK', 'OK'],
|
|
101
|
+
['合十', 'Worship'],
|
|
102
|
+
['啤酒', 'Beer'],
|
|
103
|
+
['咖啡', 'Coffee'],
|
|
104
|
+
['蛋糕', 'Cake'],
|
|
105
|
+
['玫瑰', 'Rose'],
|
|
106
|
+
['凋谢', 'Wilt'],
|
|
107
|
+
['菜刀', 'Cleaver'],
|
|
108
|
+
['炸弹', 'Bomb'],
|
|
109
|
+
['便便', 'Poop'],
|
|
110
|
+
['月亮', 'Moon'],
|
|
111
|
+
['太阳', 'Sun'],
|
|
112
|
+
['庆祝', 'Party'],
|
|
113
|
+
['礼物', 'Gift'],
|
|
114
|
+
['红包', 'Red packet'],
|
|
115
|
+
['發', 'Rich'],
|
|
116
|
+
['福', 'Blessing'],
|
|
117
|
+
['烟花', 'Fireworks'],
|
|
118
|
+
['爆竹', 'Firecracker'],
|
|
119
|
+
['猪头', 'Pig'],
|
|
120
|
+
['跳跳', 'Waddle'],
|
|
121
|
+
['发抖', 'Tremble'],
|
|
122
|
+
['转圈', 'Twirl'],
|
|
123
|
+
];
|
|
124
|
+
/** The sheet of the pictures, from the page: its faces in rows of {@link COLUMNS}. */
|
|
125
|
+
ChatEmojiUtil.SHEET = 'emoji/wechat-v1.webp';
|
|
126
|
+
ChatEmojiUtil.COLUMNS = 10;
|
|
127
|
+
const ROWS = Math.ceil(ChatEmojiUtil.FACES.length / ChatEmojiUtil.COLUMNS);
|
|
128
|
+
const INDEX = new Map(ChatEmojiUtil.FACES.map(([name], index) => [name, index]));
|
|
129
|
+
/** A name in brackets of a face: the longest name is a few characters. */
|
|
130
|
+
const CODE = /\[([^[\]\s]{1,5})\]/g;
|
|
131
|
+
/** A bracket at the start of a text that may be a face. */
|
|
132
|
+
const BRACKET = /^\[([^[\]\s]{1,5})\]/;
|
|
133
|
+
/** The text a face is said as. */
|
|
134
|
+
function code(index) {
|
|
135
|
+
return `[${ChatEmojiUtil.FACES[index][0]}]`;
|
|
136
|
+
}
|
|
137
|
+
ChatEmojiUtil.code = code;
|
|
138
|
+
/** The face a text is, alone (`[强]`), if it is one. */
|
|
139
|
+
function faceOf(text) {
|
|
140
|
+
var _a;
|
|
141
|
+
const name = (_a = BRACKET.exec(text)) === null || _a === void 0 ? void 0 : _a[1];
|
|
142
|
+
return name === undefined ? undefined : INDEX.get(name);
|
|
143
|
+
}
|
|
144
|
+
ChatEmojiUtil.faceOf = faceOf;
|
|
145
|
+
/** A face said at `at` of `text` (`[微笑]`): where it is and how long, none where the bracket is not a face. */
|
|
146
|
+
function at(text, from) {
|
|
147
|
+
if (text[from] !== '[') {
|
|
148
|
+
return undefined;
|
|
149
|
+
}
|
|
150
|
+
const found = BRACKET.exec(text.slice(from, from + 8));
|
|
151
|
+
const index = found ? INDEX.get(found[1]) : undefined;
|
|
152
|
+
return index === undefined || !found ? undefined : { index, length: found[0].length };
|
|
153
|
+
}
|
|
154
|
+
ChatEmojiUtil.at = at;
|
|
155
|
+
/** Whether a text says a face at all. */
|
|
156
|
+
function has(text) {
|
|
157
|
+
if (!text.includes('[')) {
|
|
158
|
+
return false;
|
|
159
|
+
}
|
|
160
|
+
CODE.lastIndex = 0;
|
|
161
|
+
for (let found = CODE.exec(text); found; found = CODE.exec(text)) {
|
|
162
|
+
if (INDEX.has(found[1])) {
|
|
163
|
+
return true;
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
return false;
|
|
167
|
+
}
|
|
168
|
+
ChatEmojiUtil.has = has;
|
|
169
|
+
/** A text cut into its words and its faces, in order. */
|
|
170
|
+
function split(text) {
|
|
171
|
+
const parts = [];
|
|
172
|
+
let from = 0;
|
|
173
|
+
CODE.lastIndex = 0;
|
|
174
|
+
for (let found = CODE.exec(text); found; found = CODE.exec(text)) {
|
|
175
|
+
const index = INDEX.get(found[1]);
|
|
176
|
+
if (index === undefined) {
|
|
177
|
+
continue;
|
|
178
|
+
}
|
|
179
|
+
if (found.index > from) {
|
|
180
|
+
parts.push(text.slice(from, found.index));
|
|
181
|
+
}
|
|
182
|
+
parts.push(index);
|
|
183
|
+
from = found.index + found[0].length;
|
|
184
|
+
}
|
|
185
|
+
if (from < text.length) {
|
|
186
|
+
parts.push(text.slice(from));
|
|
187
|
+
}
|
|
188
|
+
return parts;
|
|
189
|
+
}
|
|
190
|
+
ChatEmojiUtil.split = split;
|
|
191
|
+
/** The length of the face said just before `caret`, which Delete takes away whole, as WeChat's; 0 when there is none. */
|
|
192
|
+
function before(text, caret) {
|
|
193
|
+
const head = text.slice(Math.max(0, caret - 6), caret);
|
|
194
|
+
const found = /\[([^[\]\s]{1,5})\]$/.exec(head);
|
|
195
|
+
return found && INDEX.has(found[1]) ? found[0].length : 0;
|
|
196
|
+
}
|
|
197
|
+
ChatEmojiUtil.before = before;
|
|
198
|
+
/**
|
|
199
|
+
* The character a face is typed as in a field of the page (from U+E000, of the Private Use Area), as a field of
|
|
200
|
+
* WeChat shows the face rather than its name: one character a face, which the caret steps over and Delete takes
|
|
201
|
+
* whole. The field draws its picture over it (FaceField), and gives the text as it is said ({@link codes}).
|
|
202
|
+
*/
|
|
203
|
+
const GLYPH = 0xe000;
|
|
204
|
+
const GLYPHS = new RegExp(`[${String.fromCharCode(GLYPH)}-${String.fromCharCode(GLYPH + ChatEmojiUtil.FACES.length - 1)}]`, 'g');
|
|
205
|
+
/** The face a character of a field is, if it is one. */
|
|
206
|
+
function glyphFace(character) {
|
|
207
|
+
const index = character.length === 1 ? character.charCodeAt(0) - GLYPH : -1;
|
|
208
|
+
return index >= 0 && index < ChatEmojiUtil.FACES.length ? index : undefined;
|
|
209
|
+
}
|
|
210
|
+
ChatEmojiUtil.glyphFace = glyphFace;
|
|
211
|
+
/** The text as a field shows it: each face said in it (`[微笑]`) one character. */
|
|
212
|
+
function glyphs(text) {
|
|
213
|
+
return text.includes('[')
|
|
214
|
+
? text.replace(CODE, (said, name) => (INDEX.has(name) ? String.fromCharCode(GLYPH + INDEX.get(name)) : said))
|
|
215
|
+
: text;
|
|
216
|
+
}
|
|
217
|
+
ChatEmojiUtil.glyphs = glyphs;
|
|
218
|
+
/** The text of a field as it is said: each face its name in brackets again. */
|
|
219
|
+
function codes(shown) {
|
|
220
|
+
return shown.replace(GLYPHS, glyph => code(glyph.charCodeAt(0) - GLYPH));
|
|
221
|
+
}
|
|
222
|
+
ChatEmojiUtil.codes = codes;
|
|
223
|
+
/** Where `caret` of the text is in the field that shows it, and back. */
|
|
224
|
+
function shownCaret(text, caret) {
|
|
225
|
+
return glyphs(text.slice(0, caret)).length;
|
|
226
|
+
}
|
|
227
|
+
ChatEmojiUtil.shownCaret = shownCaret;
|
|
228
|
+
function saidCaret(shown, caret) {
|
|
229
|
+
return codes(shown.slice(0, caret)).length;
|
|
230
|
+
}
|
|
231
|
+
ChatEmojiUtil.saidCaret = saidCaret;
|
|
232
|
+
/** Where the face is on the sheet, as a background position. */
|
|
233
|
+
function position(index) {
|
|
234
|
+
// Rounded: a hundredth of a percent does not move a face of a few dozen pixels.
|
|
235
|
+
const x = Math.round(((index % ChatEmojiUtil.COLUMNS) * 10000) / (ChatEmojiUtil.COLUMNS - 1)) / 100;
|
|
236
|
+
const y = Math.round((Math.floor(index / ChatEmojiUtil.COLUMNS) * 10000) / (ROWS - 1)) / 100;
|
|
237
|
+
return `${x}% ${y}%`;
|
|
238
|
+
}
|
|
239
|
+
ChatEmojiUtil.position = position;
|
|
240
|
+
/** The size of the sheet as a background, for a face to fill its box. */
|
|
241
|
+
ChatEmojiUtil.SIZE = `${ChatEmojiUtil.COLUMNS * 100}% ${ROWS * 100}%`;
|
|
242
|
+
/** The faces used last, the last first, kept on this device as WeChat's 最近使用. */
|
|
243
|
+
const RECENT_KEY = 'ta.emoji.recent';
|
|
244
|
+
ChatEmojiUtil.RECENT = 8;
|
|
245
|
+
function recent(storage = globalThis.localStorage) {
|
|
246
|
+
var _a;
|
|
247
|
+
try {
|
|
248
|
+
const kept = JSON.parse((_a = storage === null || storage === void 0 ? void 0 : storage.getItem(RECENT_KEY)) !== null && _a !== void 0 ? _a : '[]');
|
|
249
|
+
return Array.isArray(kept)
|
|
250
|
+
? kept
|
|
251
|
+
.filter((name) => typeof name === 'string' && INDEX.has(name))
|
|
252
|
+
.slice(0, ChatEmojiUtil.RECENT)
|
|
253
|
+
.map(name => INDEX.get(name))
|
|
254
|
+
: [];
|
|
255
|
+
}
|
|
256
|
+
catch (_b) {
|
|
257
|
+
return [];
|
|
258
|
+
}
|
|
259
|
+
}
|
|
260
|
+
ChatEmojiUtil.recent = recent;
|
|
261
|
+
function used(index, storage = globalThis.localStorage) {
|
|
262
|
+
const names = [index, ...recent(storage).filter(each => each !== index)].slice(0, ChatEmojiUtil.RECENT).map(each => ChatEmojiUtil.FACES[each][0]);
|
|
263
|
+
try {
|
|
264
|
+
storage === null || storage === void 0 ? void 0 : storage.setItem(RECENT_KEY, JSON.stringify(names));
|
|
265
|
+
}
|
|
266
|
+
catch (_a) {
|
|
267
|
+
// A full or closed storage: nothing kept, the panel as before.
|
|
268
|
+
}
|
|
269
|
+
}
|
|
270
|
+
ChatEmojiUtil.used = used;
|
|
271
|
+
})(ChatEmojiUtil || (exports.ChatEmojiUtil = ChatEmojiUtil = {}));
|
|
272
|
+
//# sourceMappingURL=chat-emoji.js.map
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { TaWorkspaceServer } from '@celljs/ta-protocol';
|
|
2
|
+
/** Files dropped or pasted into the message box, parted by what the box does with them. */
|
|
3
|
+
export interface ComposerDropParts {
|
|
4
|
+
/** Pictures the model reads itself (IMAGE_TYPES), and the videos where the box takes them: into the box. */
|
|
5
|
+
pictures: File[];
|
|
6
|
+
/** Every other file: written under the directory of the conversation, and named where the caret is. */
|
|
7
|
+
others: File[];
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Files dropped or pasted into the message box (ComposerBoxProps.droppedFiles): a document, a sheet, an archive,
|
|
11
|
+
* a video the box does not take; each is written under `uploads/` of the directory of the conversation in parts,
|
|
12
|
+
* its name one the file system takes and never over another, and the message names it as an `@` reference pi reads
|
|
13
|
+
* when it needs it. A file of any kind is therefore Ta's to read, never one it refuses as no picture.
|
|
14
|
+
*/
|
|
15
|
+
export declare namespace ComposerDropUtil {
|
|
16
|
+
/** The pictures of a drop (and the videos a box takes with them) from the rest. */
|
|
17
|
+
function part(files: readonly File[], videos: boolean): ComposerDropParts;
|
|
18
|
+
/**
|
|
19
|
+
* Writes the files under `uploads/` of the directory of the conversation, a part at a time, and answers where each
|
|
20
|
+
* went, relative to it (ComposerFileUtil.upload, its name as the file system takes it; none over another, not even
|
|
21
|
+
* one of the same drop).
|
|
22
|
+
*/
|
|
23
|
+
function write(workspace: Pick<TaWorkspaceServer, 'uploadFile'>, cwd: string | undefined, files: readonly File[]): Promise<string[]>;
|
|
24
|
+
/** The references of the paths, one after another, each quoted when its path has spaces (ComposerUtil.reference). */
|
|
25
|
+
function references(paths: readonly string[]): string;
|
|
26
|
+
}
|
|
27
|
+
//# sourceMappingURL=composer-drop.d.ts.map
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ComposerDropUtil = void 0;
|
|
4
|
+
const composer_1 = require("./composer");
|
|
5
|
+
const composer_files_1 = require("./composer-files");
|
|
6
|
+
/**
|
|
7
|
+
* Files dropped or pasted into the message box (ComposerBoxProps.droppedFiles): a document, a sheet, an archive,
|
|
8
|
+
* a video the box does not take; each is written under `uploads/` of the directory of the conversation in parts,
|
|
9
|
+
* its name one the file system takes and never over another, and the message names it as an `@` reference pi reads
|
|
10
|
+
* when it needs it. A file of any kind is therefore Ta's to read, never one it refuses as no picture.
|
|
11
|
+
*/
|
|
12
|
+
var ComposerDropUtil;
|
|
13
|
+
(function (ComposerDropUtil) {
|
|
14
|
+
/** The pictures of a drop (and the videos a box takes with them) from the rest. */
|
|
15
|
+
function part(files, videos) {
|
|
16
|
+
const picture = (file) => composer_1.IMAGE_TYPES.includes(file.type) || (videos && file.type.startsWith('video/'));
|
|
17
|
+
return { pictures: files.filter(picture), others: files.filter(file => !picture(file)) };
|
|
18
|
+
}
|
|
19
|
+
ComposerDropUtil.part = part;
|
|
20
|
+
/**
|
|
21
|
+
* Writes the files under `uploads/` of the directory of the conversation, a part at a time, and answers where each
|
|
22
|
+
* went, relative to it (ComposerFileUtil.upload, its name as the file system takes it; none over another, not even
|
|
23
|
+
* one of the same drop).
|
|
24
|
+
*/
|
|
25
|
+
async function write(workspace, cwd, files) {
|
|
26
|
+
const taken = new Set();
|
|
27
|
+
const written = [];
|
|
28
|
+
for (const file of files) {
|
|
29
|
+
const path = composer_files_1.ComposerFileUtil.place(file.name, taken);
|
|
30
|
+
taken.add(path);
|
|
31
|
+
await composer_files_1.ComposerFileUtil.upload(workspace, cwd, path, file, () => undefined);
|
|
32
|
+
written.push(path);
|
|
33
|
+
}
|
|
34
|
+
return written;
|
|
35
|
+
}
|
|
36
|
+
ComposerDropUtil.write = write;
|
|
37
|
+
/** The references of the paths, one after another, each quoted when its path has spaces (ComposerUtil.reference). */
|
|
38
|
+
function references(paths) {
|
|
39
|
+
return paths.map(path => composer_1.ComposerUtil.reference(path)).join(' ');
|
|
40
|
+
}
|
|
41
|
+
ComposerDropUtil.references = references;
|
|
42
|
+
})(ComposerDropUtil || (exports.ComposerDropUtil = ComposerDropUtil = {}));
|
|
43
|
+
//# sourceMappingURL=composer-drop.js.map
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { type TaWorkspaceServer } from '@celljs/ta-protocol';
|
|
2
|
+
/** The folder of the files picked in the box, under the directory the conversation works in. */
|
|
3
|
+
export declare const UPLOAD_FOLDER = "uploads";
|
|
4
|
+
/** The most bytes of a file picked: a larger one is not sent. */
|
|
5
|
+
export declare const MAX_FILE_BYTES: number;
|
|
6
|
+
/** A file picked in the box, uploaded where the agent reads it, which the message names as an `@` reference. */
|
|
7
|
+
export interface ComposerFile {
|
|
8
|
+
id: string;
|
|
9
|
+
/** As the user's machine names it. */
|
|
10
|
+
name: string;
|
|
11
|
+
/** Under the directory of the conversation, with `/`: `uploads/a.pdf`. */
|
|
12
|
+
path: string;
|
|
13
|
+
size: number;
|
|
14
|
+
/** 0 to 1: what was uploaded of it; 1 once it is all there. The message waits for it. */
|
|
15
|
+
done: number;
|
|
16
|
+
}
|
|
17
|
+
/** Why a file picked is not taken. */
|
|
18
|
+
export type ComposerFileRefusal = 'size';
|
|
19
|
+
/**
|
|
20
|
+
* Files of the box other than the pictures a model sees itself (any kind, a picture it cannot see too): they are uploaded under `uploads/` of the directory
|
|
21
|
+
* of the conversation, and the message names them as the `@` references pi reads (the agent opens one with its tools).
|
|
22
|
+
*/
|
|
23
|
+
export declare namespace ComposerFileUtil {
|
|
24
|
+
/** The folder, as a path of a conversation. */
|
|
25
|
+
const FOLDER = "uploads/";
|
|
26
|
+
/** Why the file is not taken; none when it is. */
|
|
27
|
+
function refuse(file: {
|
|
28
|
+
size: number;
|
|
29
|
+
}): ComposerFileRefusal | undefined;
|
|
30
|
+
/** Its name as a path takes it: no folder, none of the characters a path of Windows turns down, not hidden. */
|
|
31
|
+
function name(name: string): string;
|
|
32
|
+
/**
|
|
33
|
+
* Its place under `uploads`: its name, then `a-2.pdf` and `a-3.pdf` for a name already in `taken` (what is there,
|
|
34
|
+
* and what was picked before it), so that a file never replaces another.
|
|
35
|
+
*/
|
|
36
|
+
function place(name: string, taken: ReadonlySet<string>): string;
|
|
37
|
+
/** 154 KB, 1.2 MB: the size of a file as the box shows it. */
|
|
38
|
+
function size(bytes: number): string;
|
|
39
|
+
/** The references of the files, one to a line, each quoted when its path has spaces, as pi's terminal writes them. */
|
|
40
|
+
function references(files: readonly ComposerFile[]): string;
|
|
41
|
+
/** What is already in `uploads`, as the paths of its files; none when the folder is not there yet. */
|
|
42
|
+
function taken(workspace: Pick<TaWorkspaceServer, 'listDirectory'>, cwd: string | undefined): Promise<Set<string>>;
|
|
43
|
+
/**
|
|
44
|
+
* Uploads the file at `path` of the conversation, a part at a time, `progress` told how much is there (0 to 1).
|
|
45
|
+
* The folders on the way are made by the server.
|
|
46
|
+
*/
|
|
47
|
+
function upload(workspace: Pick<TaWorkspaceServer, 'uploadFile'>, cwd: string | undefined, path: string, file: Blob, progress: (done: number) => void): Promise<void>;
|
|
48
|
+
}
|
|
49
|
+
//# sourceMappingURL=composer-files.d.ts.map
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ComposerFileUtil = exports.MAX_FILE_BYTES = exports.UPLOAD_FOLDER = void 0;
|
|
4
|
+
const ta_protocol_1 = require("@celljs/ta-protocol");
|
|
5
|
+
const composer_1 = require("./composer");
|
|
6
|
+
/** The folder of the files picked in the box, under the directory the conversation works in. */
|
|
7
|
+
exports.UPLOAD_FOLDER = 'uploads';
|
|
8
|
+
/** The most bytes of a file picked: a larger one is not sent. */
|
|
9
|
+
exports.MAX_FILE_BYTES = 50 * 1024 * 1024;
|
|
10
|
+
/**
|
|
11
|
+
* Files of the box other than the pictures a model sees itself (any kind, a picture it cannot see too): they are uploaded under `uploads/` of the directory
|
|
12
|
+
* of the conversation, and the message names them as the `@` references pi reads (the agent opens one with its tools).
|
|
13
|
+
*/
|
|
14
|
+
var ComposerFileUtil;
|
|
15
|
+
(function (ComposerFileUtil) {
|
|
16
|
+
/** The folder, as a path of a conversation. */
|
|
17
|
+
ComposerFileUtil.FOLDER = `${exports.UPLOAD_FOLDER}/`;
|
|
18
|
+
/** Why the file is not taken; none when it is. */
|
|
19
|
+
function refuse(file) {
|
|
20
|
+
return file.size > exports.MAX_FILE_BYTES ? 'size' : undefined;
|
|
21
|
+
}
|
|
22
|
+
ComposerFileUtil.refuse = refuse;
|
|
23
|
+
/** Its name as a path takes it: no folder, none of the characters a path of Windows turns down, not hidden. */
|
|
24
|
+
function name(name) {
|
|
25
|
+
var _a;
|
|
26
|
+
const last = (_a = name
|
|
27
|
+
.split(/[\\/]+/)
|
|
28
|
+
.filter(Boolean)
|
|
29
|
+
.pop()) !== null && _a !== void 0 ? _a : '';
|
|
30
|
+
const cleaned = [...last]
|
|
31
|
+
.map(character => (character < ' ' || '<>:"|?*'.includes(character) ? '_' : character))
|
|
32
|
+
.join('')
|
|
33
|
+
.replace(/^[.\s]+/, '')
|
|
34
|
+
.slice(-120);
|
|
35
|
+
return cleaned || 'file';
|
|
36
|
+
}
|
|
37
|
+
ComposerFileUtil.name = name;
|
|
38
|
+
/**
|
|
39
|
+
* Its place under `uploads`: its name, then `a-2.pdf` and `a-3.pdf` for a name already in `taken` (what is there,
|
|
40
|
+
* and what was picked before it), so that a file never replaces another.
|
|
41
|
+
*/
|
|
42
|
+
function place(name, taken) {
|
|
43
|
+
const safe = ComposerFileUtil.name(name);
|
|
44
|
+
const dot = safe.lastIndexOf('.');
|
|
45
|
+
const stem = dot > 0 ? safe.slice(0, dot) : safe;
|
|
46
|
+
const extension = dot > 0 ? safe.slice(dot) : '';
|
|
47
|
+
for (let n = 1;; n++) {
|
|
48
|
+
const candidate = `${ComposerFileUtil.FOLDER}${n === 1 ? stem : `${stem}-${n}`}${extension}`;
|
|
49
|
+
if (!taken.has(candidate)) {
|
|
50
|
+
return candidate;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
ComposerFileUtil.place = place;
|
|
55
|
+
/** 154 KB, 1.2 MB: the size of a file as the box shows it. */
|
|
56
|
+
function size(bytes) {
|
|
57
|
+
return bytes < 1024 * 1024 ? `${Math.max(1, Math.round(bytes / 1024))} KB` : `${(bytes / 1024 ** 2).toFixed(bytes < 10 * 1024 ** 2 ? 1 : 0)} MB`;
|
|
58
|
+
}
|
|
59
|
+
ComposerFileUtil.size = size;
|
|
60
|
+
/** The references of the files, one to a line, each quoted when its path has spaces, as pi's terminal writes them. */
|
|
61
|
+
function references(files) {
|
|
62
|
+
return files.map(file => composer_1.ComposerUtil.reference(file.path)).join('\n');
|
|
63
|
+
}
|
|
64
|
+
ComposerFileUtil.references = references;
|
|
65
|
+
/** What is already in `uploads`, as the paths of its files; none when the folder is not there yet. */
|
|
66
|
+
async function taken(workspace, cwd) {
|
|
67
|
+
try {
|
|
68
|
+
const entries = await workspace.listDirectory(exports.UPLOAD_FOLDER, cwd);
|
|
69
|
+
return new Set(entries.map(entry => `${ComposerFileUtil.FOLDER}${entry.name}`));
|
|
70
|
+
}
|
|
71
|
+
catch (_a) {
|
|
72
|
+
return new Set();
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
ComposerFileUtil.taken = taken;
|
|
76
|
+
/**
|
|
77
|
+
* Uploads the file at `path` of the conversation, a part at a time, `progress` told how much is there (0 to 1).
|
|
78
|
+
* The folders on the way are made by the server.
|
|
79
|
+
*/
|
|
80
|
+
async function upload(workspace, cwd, path, file, progress) {
|
|
81
|
+
const parts = Math.max(1, Math.ceil(file.size / ta_protocol_1.TA_UPLOAD_PART_BYTES));
|
|
82
|
+
for (let part = 0; part < parts; part++) {
|
|
83
|
+
const start = part * ta_protocol_1.TA_UPLOAD_PART_BYTES;
|
|
84
|
+
const end = Math.min(file.size, start + ta_protocol_1.TA_UPLOAD_PART_BYTES);
|
|
85
|
+
const bytes = new Uint8Array(await file.slice(start, end).arrayBuffer());
|
|
86
|
+
const options = { cwd, append: part > 0 };
|
|
87
|
+
await workspace.uploadFile(path, base64(bytes), options);
|
|
88
|
+
progress(parts === 1 ? 1 : end / Math.max(1, file.size));
|
|
89
|
+
}
|
|
90
|
+
progress(1);
|
|
91
|
+
}
|
|
92
|
+
ComposerFileUtil.upload = upload;
|
|
93
|
+
/** Bytes in base64, in pieces so that a large buffer does not overflow the arguments of a call. */
|
|
94
|
+
function base64(bytes) {
|
|
95
|
+
let binary = '';
|
|
96
|
+
for (let i = 0; i < bytes.length; i += 0x8000) {
|
|
97
|
+
binary += String.fromCharCode(...bytes.subarray(i, i + 0x8000));
|
|
98
|
+
}
|
|
99
|
+
return btoa(binary);
|
|
100
|
+
}
|
|
101
|
+
})(ComposerFileUtil || (exports.ComposerFileUtil = ComposerFileUtil = {}));
|
|
102
|
+
//# sourceMappingURL=composer-files.js.map
|