@celljs/ta-web 4.42.0 → 4.44.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/apps/app-window.js +2 -2
- package/esm/browser/apps/web-apps.d.ts +4 -0
- package/esm/browser/apps/web-apps.js +14 -3
- package/esm/browser/assistant/assistant-chat-list.js +2 -1
- package/esm/browser/assistant/assistant-extension.js +16 -2
- package/esm/browser/assistant/assistant-protocol.d.ts +6 -0
- package/esm/browser/assistant/assistant-task-source.js +3 -0
- package/esm/browser/assistant/assistant-task-util.d.ts +2 -0
- package/esm/browser/assistant/assistant-task-util.js +5 -0
- package/esm/browser/assistant/assistant.d.ts +3 -0
- package/esm/browser/assistant/assistant.js +26 -2
- package/esm/browser/assistant/ta-hearing.d.ts +85 -0
- package/esm/browser/assistant/ta-hearing.js +272 -0
- package/esm/browser/components/app-shell-hooks.d.ts +2 -1
- package/esm/browser/components/app-shell-hooks.js +4 -3
- package/esm/browser/components/app-shell-state.js +2 -2
- package/esm/browser/components/auth-view.js +1 -1
- package/esm/browser/components/board.js +9 -1
- package/esm/browser/components/chat-list-row.js +4 -4
- package/esm/browser/components/chat-list-util.d.ts +2 -2
- package/esm/browser/components/clipboard-link-host.d.ts +2 -0
- package/esm/browser/components/clipboard-link-host.js +27 -0
- package/esm/browser/components/cloud-network.js +1 -1
- package/esm/browser/components/cloud-sign-in-view.d.ts +1 -1
- package/esm/browser/components/custom-host.d.ts +4 -1
- package/esm/browser/components/custom-host.js +8 -2
- package/esm/browser/components/custom-provider-advanced.js +8 -8
- package/esm/browser/components/custom-provider-view.js +12 -12
- package/esm/browser/components/earlier-messages.d.ts +4 -1
- package/esm/browser/components/earlier-messages.js +5 -2
- package/esm/browser/components/empty-state.d.ts +2 -1
- package/esm/browser/components/empty-state.js +6 -2
- package/esm/browser/components/folder-picker.js +2 -2
- package/esm/browser/components/gallery.js +8 -9
- package/esm/browser/components/hearing-host.d.ts +5 -0
- package/esm/browser/components/hearing-host.js +58 -0
- package/esm/browser/components/host-view.d.ts +1 -1
- package/esm/browser/components/link-dialog.js +4 -0
- package/esm/browser/components/loading.d.ts +3 -2
- package/esm/browser/components/loading.js +7 -3
- package/esm/browser/components/markdown.d.ts +3 -1
- package/esm/browser/components/markdown.js +10 -5
- package/esm/browser/components/media.d.ts +10 -4
- package/esm/browser/components/media.js +60 -14
- package/esm/browser/components/message-list.js +2 -1
- package/esm/browser/components/message-steps.js +8 -5
- package/esm/browser/components/people-picker.d.ts +17 -0
- package/esm/browser/components/people-picker.js +129 -0
- package/esm/browser/components/relay-view.js +1 -1
- package/esm/browser/components/settings-choices.d.ts +2 -1
- package/esm/browser/components/settings-choices.js +2 -1
- package/esm/browser/components/settings-parts.js +25 -3
- package/esm/browser/components/share-dialog.d.ts +2 -2
- package/esm/browser/components/share-dialog.js +7 -4
- package/esm/browser/components/share-friends.d.ts +18 -2
- package/esm/browser/components/share-friends.js +64 -13
- package/esm/browser/components/share-item-sheet.d.ts +12 -0
- package/esm/browser/components/share-item-sheet.js +39 -0
- package/esm/browser/components/share-sheet.d.ts +12 -4
- package/esm/browser/components/share-sheet.js +15 -6
- package/esm/browser/components/sign-in-setup.js +4 -4
- package/esm/browser/components/trusted-domains.js +1 -1
- package/esm/browser/components/view-room.d.ts +25 -0
- package/esm/browser/components/view-room.js +136 -0
- package/esm/browser/components/voice-services.js +6 -6
- package/esm/browser/device/device-protocol.d.ts +9 -6
- package/esm/browser/device/device-protocol.js +7 -4
- package/esm/browser/device/launch-screen.d.ts +11 -1
- package/esm/browser/device/launch-screen.js +22 -4
- package/esm/browser/extension/share-sheet-compat.d.ts +2 -0
- package/esm/browser/extension/share-sheet-compat.js +12 -2
- package/esm/browser/extension/web-api-chats.d.ts +23 -0
- package/esm/browser/extension/web-api-code.d.ts +11 -0
- package/esm/browser/extension/web-api-components.d.ts +8 -1
- package/esm/browser/extension/web-api-contributions.d.ts +30 -1
- package/esm/browser/extension/web-api-desktop.d.ts +2 -1
- package/esm/browser/extension/web-api-file-views.d.ts +38 -0
- package/esm/browser/extension/web-api-file-views.js +2 -0
- package/esm/browser/extension/web-api-host.d.ts +47 -0
- package/esm/browser/extension/web-api-host.js +3 -0
- package/esm/browser/extension/web-api-menus.d.ts +46 -0
- package/esm/browser/extension/web-api-partners.d.ts +58 -1
- package/esm/browser/extension/web-api-skins.d.ts +95 -0
- package/esm/browser/extension/web-api-skins.js +2 -0
- package/esm/browser/extension/web-api-spec.js +9 -0
- package/esm/browser/extension/web-extension-api.d.ts +13 -34
- package/esm/browser/extension/web-extension-context.d.ts +2 -8
- package/esm/browser/extension/web-extension-context.js +15 -39
- package/esm/browser/extension/web-extension-marks.d.ts +10 -0
- package/esm/browser/extension/web-extension-marks.js +29 -0
- package/esm/browser/extension/web-extension-protocol.d.ts +13 -1
- package/esm/browser/extension/web-extension-protocol.js +4 -0
- package/esm/browser/extension/web-extension-run.d.ts +16 -2
- package/esm/browser/extension/web-extension-run.js +80 -0
- package/esm/browser/extension/web-extensions-running.d.ts +5 -1
- package/esm/browser/extension/web-extensions-running.js +16 -0
- package/esm/browser/extension/web-extensions.d.ts +2 -1
- package/esm/browser/extension/web-extensions.js +3 -0
- package/esm/browser/extension/web-home.js +3 -1
- package/esm/browser/extension/web-host-values.d.ts +66 -0
- package/esm/browser/extension/web-host-values.js +191 -0
- package/esm/browser/extension/web-hosts.d.ts +7 -2
- package/esm/browser/extension/web-hosts.js +16 -4
- package/esm/browser/extension/web-share-ui.d.ts +7 -0
- package/esm/browser/extension/web-share-ui.js +20 -0
- package/esm/browser/extension/web-share.d.ts +18 -0
- package/esm/browser/extension/web-share.js +42 -0
- package/esm/browser/i18n/en/assistant.d.ts +4 -0
- package/esm/browser/i18n/en/assistant.js +4 -0
- package/esm/browser/i18n/en/chat.d.ts +10 -0
- package/esm/browser/i18n/en/chat.js +10 -0
- package/esm/browser/i18n/en/common.d.ts +15 -0
- package/esm/browser/i18n/en/common.js +15 -0
- package/esm/browser/i18n/en/discover.d.ts +11 -1
- package/esm/browser/i18n/en/discover.js +11 -1
- package/esm/browser/i18n/en/settings.d.ts +10 -0
- package/esm/browser/i18n/en/settings.js +10 -0
- package/esm/browser/i18n/ja/assistant.js +4 -0
- package/esm/browser/i18n/ja/chat.js +10 -0
- package/esm/browser/i18n/ja/common.js +15 -0
- package/esm/browser/i18n/ja/discover.js +11 -1
- package/esm/browser/i18n/ja/settings.js +10 -0
- package/esm/browser/i18n/locales.d.ts +51 -2
- package/esm/browser/i18n/messages.d.ts +50 -1
- package/esm/browser/i18n/zh/assistant.js +4 -0
- package/esm/browser/i18n/zh/chat.js +10 -0
- package/esm/browser/i18n/zh/common.js +15 -0
- package/esm/browser/i18n/zh/discover.js +11 -1
- package/esm/browser/i18n/zh/settings.js +10 -0
- package/esm/browser/i18n/zh-tw/assistant.js +4 -0
- package/esm/browser/i18n/zh-tw/chat.js +10 -0
- package/esm/browser/i18n/zh-tw/common.js +15 -0
- package/esm/browser/i18n/zh-tw/discover.js +11 -1
- package/esm/browser/i18n/zh-tw/settings.js +10 -0
- package/esm/browser/launch-art/art-palette.d.ts +41 -0
- package/esm/browser/launch-art/art-palette.js +72 -0
- package/esm/browser/launch-art/cyclic-automaton.d.ts +45 -0
- package/esm/browser/launch-art/cyclic-automaton.js +176 -0
- package/esm/browser/launch-art/fractal-tree.d.ts +43 -0
- package/esm/browser/launch-art/fractal-tree.js +48 -0
- package/esm/browser/launch-art/launch-art.d.ts +98 -0
- package/esm/browser/launch-art/launch-art.js +420 -0
- package/esm/browser/launch-art/launch-sky.d.ts +66 -0
- package/esm/browser/launch-art/launch-sky.js +153 -0
- package/esm/browser/links/clipboard-links.d.ts +85 -0
- package/esm/browser/links/clipboard-links.js +261 -0
- package/esm/browser/links/link-text.d.ts +29 -0
- package/esm/browser/links/link-text.js +97 -0
- package/esm/browser/links/links-protocol.d.ts +12 -1
- package/esm/browser/links/links.d.ts +8 -2
- package/esm/browser/links/links.js +33 -3
- package/esm/browser/markdown/code-renderers.d.ts +4 -0
- package/esm/browser/markdown/code-renderers.js +4 -0
- package/esm/browser/partners/group-picker.js +23 -29
- package/esm/browser/sandbox/sandbox-runtime-code.js +1 -1
- package/esm/browser/sandbox/work/work-senses.js +1 -1
- package/esm/browser/settings/settings-protocol.d.ts +26 -0
- package/esm/browser/settings/settings-protocol.js +11 -0
- package/esm/browser/settings/settings.d.ts +4 -1
- package/esm/browser/settings/settings.js +16 -3
- package/esm/browser/skin/skin-layer.d.ts +8 -0
- package/esm/browser/skin/skin-layer.js +118 -0
- package/esm/browser/skin/skin-util.d.ts +40 -0
- package/esm/browser/skin/skin-util.js +120 -0
- package/esm/browser/style/base.d.ts +1 -1
- package/esm/browser/style/base.js +10 -6
- package/esm/browser/style/chat-list.d.ts +1 -1
- package/esm/browser/style/chat-list.js +28 -15
- package/esm/browser/style/conversation-column.d.ts +1 -1
- package/esm/browser/style/conversation.d.ts +1 -1
- package/esm/browser/style/conversation.js +5 -4
- package/esm/browser/style/dialogs.d.ts +1 -1
- package/esm/browser/style/dialogs.js +2 -5
- package/esm/browser/style/forms.d.ts +5 -0
- package/esm/browser/style/forms.js +65 -0
- package/esm/browser/style/layout.d.ts +1 -1
- package/esm/browser/style/pages.d.ts +1 -1
- package/esm/browser/style/pages.js +14 -24
- package/esm/browser/style/phone.d.ts +1 -1
- package/esm/browser/style/shared.d.ts +1 -1
- package/esm/browser/style/shell.d.ts +1 -1
- package/esm/browser/style/shell.js +1 -6
- package/esm/browser/style/skins.d.ts +9 -0
- package/esm/browser/style/skins.js +107 -0
- package/esm/browser/style/surfaces.d.ts +1 -1
- package/esm/browser/style/surfaces.js +8 -6
- package/esm/browser/style/tasks.d.ts +1 -1
- package/esm/browser/style.js +4 -0
- package/esm/browser/util/fresh-rows.d.ts +21 -0
- package/esm/browser/util/fresh-rows.js +36 -0
- package/esm/browser/util/process.d.ts +12 -22
- package/esm/browser/util/process.js +49 -39
- package/esm/browser/util/voice.d.ts +18 -0
- package/esm/browser/util/voice.js +111 -3
- package/esm/browser/workbench-protocol.d.ts +2 -0
- package/esm/browser/workbench-services.d.ts +2 -0
- package/esm/browser/workbench-services.js +5 -0
- package/esm/browser/workbench.js +5 -0
- package/lib/browser/apps/app-window.js +2 -2
- package/lib/browser/apps/web-apps.d.ts +4 -0
- package/lib/browser/apps/web-apps.js +14 -3
- package/lib/browser/assistant/assistant-chat-list.js +2 -1
- package/lib/browser/assistant/assistant-extension.js +15 -1
- package/lib/browser/assistant/assistant-protocol.d.ts +6 -0
- package/lib/browser/assistant/assistant-task-source.js +3 -0
- package/lib/browser/assistant/assistant-task-util.d.ts +2 -0
- package/lib/browser/assistant/assistant-task-util.js +5 -0
- package/lib/browser/assistant/assistant.d.ts +3 -0
- package/lib/browser/assistant/assistant.js +26 -2
- package/lib/browser/assistant/ta-hearing.d.ts +86 -0
- package/lib/browser/assistant/ta-hearing.js +277 -0
- package/lib/browser/components/app-shell-hooks.d.ts +2 -1
- package/lib/browser/components/app-shell-hooks.js +4 -3
- package/lib/browser/components/app-shell-state.js +2 -2
- package/lib/browser/components/auth-view.js +1 -1
- package/lib/browser/components/board.js +9 -1
- package/lib/browser/components/chat-list-row.js +4 -4
- package/lib/browser/components/chat-list-util.d.ts +2 -2
- package/lib/browser/components/clipboard-link-host.d.ts +3 -0
- package/lib/browser/components/clipboard-link-host.js +63 -0
- package/lib/browser/components/cloud-network.js +1 -1
- package/lib/browser/components/cloud-sign-in-view.d.ts +1 -1
- package/lib/browser/components/custom-host.d.ts +4 -1
- package/lib/browser/components/custom-host.js +8 -2
- package/lib/browser/components/custom-provider-advanced.js +8 -8
- package/lib/browser/components/custom-provider-view.js +12 -12
- package/lib/browser/components/earlier-messages.d.ts +4 -1
- package/lib/browser/components/earlier-messages.js +5 -2
- package/lib/browser/components/empty-state.d.ts +2 -1
- package/lib/browser/components/empty-state.js +6 -2
- package/lib/browser/components/folder-picker.js +2 -2
- package/lib/browser/components/gallery.js +7 -8
- package/lib/browser/components/hearing-host.d.ts +6 -0
- package/lib/browser/components/hearing-host.js +94 -0
- package/lib/browser/components/host-view.d.ts +1 -1
- package/lib/browser/components/link-dialog.js +4 -0
- package/lib/browser/components/loading.d.ts +3 -2
- package/lib/browser/components/loading.js +7 -3
- package/lib/browser/components/markdown.d.ts +3 -1
- package/lib/browser/components/markdown.js +9 -4
- package/lib/browser/components/media.d.ts +10 -4
- package/lib/browser/components/media.js +61 -14
- package/lib/browser/components/message-list.js +2 -1
- package/lib/browser/components/message-steps.js +8 -5
- package/lib/browser/components/people-picker.d.ts +18 -0
- package/lib/browser/components/people-picker.js +166 -0
- package/lib/browser/components/relay-view.js +1 -1
- package/lib/browser/components/settings-choices.d.ts +2 -1
- package/lib/browser/components/settings-choices.js +2 -1
- package/lib/browser/components/settings-parts.js +23 -1
- package/lib/browser/components/share-dialog.d.ts +2 -2
- package/lib/browser/components/share-dialog.js +7 -4
- package/lib/browser/components/share-friends.d.ts +18 -2
- package/lib/browser/components/share-friends.js +67 -13
- package/lib/browser/components/share-item-sheet.d.ts +13 -0
- package/lib/browser/components/share-item-sheet.js +75 -0
- package/lib/browser/components/share-sheet.d.ts +12 -4
- package/lib/browser/components/share-sheet.js +14 -4
- package/lib/browser/components/sign-in-setup.js +4 -4
- package/lib/browser/components/trusted-domains.js +1 -1
- package/lib/browser/components/view-room.d.ts +26 -0
- package/lib/browser/components/view-room.js +173 -0
- package/lib/browser/components/voice-services.js +6 -6
- package/lib/browser/device/device-protocol.d.ts +9 -6
- package/lib/browser/device/device-protocol.js +7 -4
- package/lib/browser/device/launch-screen.d.ts +11 -1
- package/lib/browser/device/launch-screen.js +22 -4
- package/lib/browser/extension/share-sheet-compat.d.ts +2 -0
- package/lib/browser/extension/share-sheet-compat.js +13 -2
- package/lib/browser/extension/web-api-chats.d.ts +23 -0
- package/lib/browser/extension/web-api-code.d.ts +11 -0
- package/lib/browser/extension/web-api-components.d.ts +8 -1
- package/lib/browser/extension/web-api-contributions.d.ts +30 -1
- package/lib/browser/extension/web-api-desktop.d.ts +2 -1
- package/lib/browser/extension/web-api-file-views.d.ts +39 -0
- package/lib/browser/extension/web-api-file-views.js +3 -0
- package/lib/browser/extension/web-api-host.d.ts +48 -0
- package/lib/browser/extension/web-api-host.js +4 -0
- package/lib/browser/extension/web-api-menus.d.ts +46 -0
- package/lib/browser/extension/web-api-partners.d.ts +58 -1
- package/lib/browser/extension/web-api-skins.d.ts +96 -0
- package/lib/browser/extension/web-api-skins.js +3 -0
- package/lib/browser/extension/web-api-spec.js +9 -0
- package/lib/browser/extension/web-extension-api.d.ts +13 -34
- package/lib/browser/extension/web-extension-context.d.ts +2 -8
- package/lib/browser/extension/web-extension-context.js +15 -39
- package/lib/browser/extension/web-extension-marks.d.ts +11 -0
- package/lib/browser/extension/web-extension-marks.js +65 -0
- package/lib/browser/extension/web-extension-protocol.d.ts +13 -1
- package/lib/browser/extension/web-extension-protocol.js +4 -0
- package/lib/browser/extension/web-extension-run.d.ts +16 -2
- package/lib/browser/extension/web-extension-run.js +80 -0
- package/lib/browser/extension/web-extensions-running.d.ts +5 -1
- package/lib/browser/extension/web-extensions-running.js +16 -0
- package/lib/browser/extension/web-extensions.d.ts +2 -1
- package/lib/browser/extension/web-extensions.js +3 -0
- package/lib/browser/extension/web-home.js +3 -1
- package/lib/browser/extension/web-host-values.d.ts +67 -0
- package/lib/browser/extension/web-host-values.js +229 -0
- package/lib/browser/extension/web-hosts.d.ts +7 -2
- package/lib/browser/extension/web-hosts.js +16 -4
- package/lib/browser/extension/web-share-ui.d.ts +8 -0
- package/lib/browser/extension/web-share-ui.js +56 -0
- package/lib/browser/extension/web-share.d.ts +19 -0
- package/lib/browser/extension/web-share.js +45 -0
- package/lib/browser/i18n/en/assistant.d.ts +4 -0
- package/lib/browser/i18n/en/assistant.js +4 -0
- package/lib/browser/i18n/en/chat.d.ts +10 -0
- package/lib/browser/i18n/en/chat.js +10 -0
- package/lib/browser/i18n/en/common.d.ts +15 -0
- package/lib/browser/i18n/en/common.js +15 -0
- package/lib/browser/i18n/en/discover.d.ts +11 -1
- package/lib/browser/i18n/en/discover.js +11 -1
- package/lib/browser/i18n/en/settings.d.ts +10 -0
- package/lib/browser/i18n/en/settings.js +10 -0
- package/lib/browser/i18n/ja/assistant.js +4 -0
- package/lib/browser/i18n/ja/chat.js +10 -0
- package/lib/browser/i18n/ja/common.js +15 -0
- package/lib/browser/i18n/ja/discover.js +11 -1
- package/lib/browser/i18n/ja/settings.js +10 -0
- package/lib/browser/i18n/locales.d.ts +51 -2
- package/lib/browser/i18n/messages.d.ts +50 -1
- package/lib/browser/i18n/zh/assistant.js +4 -0
- package/lib/browser/i18n/zh/chat.js +10 -0
- package/lib/browser/i18n/zh/common.js +15 -0
- package/lib/browser/i18n/zh/discover.js +11 -1
- package/lib/browser/i18n/zh/settings.js +10 -0
- package/lib/browser/i18n/zh-tw/assistant.js +4 -0
- package/lib/browser/i18n/zh-tw/chat.js +10 -0
- package/lib/browser/i18n/zh-tw/common.js +15 -0
- package/lib/browser/i18n/zh-tw/discover.js +11 -1
- package/lib/browser/i18n/zh-tw/settings.js +10 -0
- package/lib/browser/launch-art/art-palette.d.ts +42 -0
- package/lib/browser/launch-art/art-palette.js +76 -0
- package/lib/browser/launch-art/cyclic-automaton.d.ts +46 -0
- package/lib/browser/launch-art/cyclic-automaton.js +180 -0
- package/lib/browser/launch-art/fractal-tree.d.ts +44 -0
- package/lib/browser/launch-art/fractal-tree.js +52 -0
- package/lib/browser/launch-art/launch-art.d.ts +99 -0
- package/lib/browser/launch-art/launch-art.js +424 -0
- package/lib/browser/launch-art/launch-sky.d.ts +67 -0
- package/lib/browser/launch-art/launch-sky.js +157 -0
- package/lib/browser/links/clipboard-links.d.ts +86 -0
- package/lib/browser/links/clipboard-links.js +266 -0
- package/lib/browser/links/link-text.d.ts +30 -0
- package/lib/browser/links/link-text.js +100 -0
- package/lib/browser/links/links-protocol.d.ts +12 -1
- package/lib/browser/links/links.d.ts +8 -2
- package/lib/browser/links/links.js +33 -3
- package/lib/browser/markdown/code-renderers.d.ts +4 -0
- package/lib/browser/markdown/code-renderers.js +5 -1
- package/lib/browser/partners/group-picker.js +23 -29
- package/lib/browser/sandbox/sandbox-runtime-code.js +1 -1
- package/lib/browser/sandbox/work/work-senses.js +1 -1
- package/lib/browser/settings/settings-protocol.d.ts +26 -0
- package/lib/browser/settings/settings-protocol.js +12 -1
- package/lib/browser/settings/settings.d.ts +4 -1
- package/lib/browser/settings/settings.js +16 -3
- package/lib/browser/skin/skin-layer.d.ts +9 -0
- package/lib/browser/skin/skin-layer.js +154 -0
- package/lib/browser/skin/skin-util.d.ts +41 -0
- package/lib/browser/skin/skin-util.js +123 -0
- package/lib/browser/style/base.d.ts +1 -1
- package/lib/browser/style/base.js +10 -6
- package/lib/browser/style/chat-list.d.ts +1 -1
- package/lib/browser/style/chat-list.js +28 -15
- package/lib/browser/style/conversation-column.d.ts +1 -1
- package/lib/browser/style/conversation.d.ts +1 -1
- package/lib/browser/style/conversation.js +5 -4
- package/lib/browser/style/dialogs.d.ts +1 -1
- package/lib/browser/style/dialogs.js +2 -5
- package/lib/browser/style/forms.d.ts +6 -0
- package/lib/browser/style/forms.js +68 -0
- package/lib/browser/style/layout.d.ts +1 -1
- package/lib/browser/style/pages.d.ts +1 -1
- package/lib/browser/style/pages.js +14 -24
- package/lib/browser/style/phone.d.ts +1 -1
- package/lib/browser/style/shared.d.ts +1 -1
- package/lib/browser/style/shell.d.ts +1 -1
- package/lib/browser/style/shell.js +1 -6
- package/lib/browser/style/skins.d.ts +10 -0
- package/lib/browser/style/skins.js +110 -0
- package/lib/browser/style/surfaces.d.ts +1 -1
- package/lib/browser/style/surfaces.js +8 -6
- package/lib/browser/style/tasks.d.ts +1 -1
- package/lib/browser/style.js +4 -0
- package/lib/browser/util/fresh-rows.d.ts +22 -0
- package/lib/browser/util/fresh-rows.js +40 -0
- package/lib/browser/util/process.d.ts +12 -22
- package/lib/browser/util/process.js +49 -40
- package/lib/browser/util/voice.d.ts +18 -0
- package/lib/browser/util/voice.js +111 -3
- package/lib/browser/workbench-protocol.d.ts +2 -0
- package/lib/browser/workbench-services.d.ts +2 -0
- package/lib/browser/workbench-services.js +5 -0
- package/lib/browser/workbench.js +5 -0
- package/package.json +8 -8
- package/public/launch.svg +3 -3
|
@@ -62,6 +62,14 @@ exports.SETTINGS_ZH = {
|
|
|
62
62
|
'ta.settings.diagramStyle.sketch': '草图',
|
|
63
63
|
'ta.settings.diagramStyle.colour': '彩色',
|
|
64
64
|
'ta.settings.diagramStyle.motion': '动效',
|
|
65
|
+
'ta.settings.skin': '皮肤',
|
|
66
|
+
'ta.settings.skinHint': 'Ta 背后的画面,各栏像玻璃一样透出它。',
|
|
67
|
+
'ta.settings.skin.none': '无',
|
|
68
|
+
'ta.settings.glass': '玻璃',
|
|
69
|
+
'ta.settings.glassHint': '透出多少皮肤的画面。',
|
|
70
|
+
'ta.settings.glass.clear': '清透',
|
|
71
|
+
'ta.settings.glass.soft': '柔和',
|
|
72
|
+
'ta.settings.glass.focus': '专注',
|
|
65
73
|
'ta.settings.fontSize': '字体大小',
|
|
66
74
|
'ta.settings.fontSizeHint': '整个页面的文字。',
|
|
67
75
|
'ta.settings.chatFontSize': '对话字体大小',
|
|
@@ -147,6 +155,8 @@ exports.SETTINGS_ZH = {
|
|
|
147
155
|
'ta.settings.chatArchiveHint': '超过这个时间没有新消息的对话移出列表,不再随列表刷新;在列表末尾的“已归档”或搜索中找回',
|
|
148
156
|
'ta.settings.recentShots': '提示最近的截图',
|
|
149
157
|
'ta.settings.recentShotsHint': '刚截屏后打开对话,输入框上方会提示一次这张截图,点一下即可带上。仅 Ta 桌面版和手机 App',
|
|
158
|
+
'ta.settings.clipboardLinks': '识别复制的 Ta 链接',
|
|
159
|
+
'ta.settings.clipboardLinksHint': '复制了带 Ta 邀请或分享链接的内容,回到 Ta 时会提示它是什么,点“打开”就能打开;在 Ta 里任何地方粘贴也一样。只在回到 Ta 的那一刻读一次剪贴板,不保存内容。iPhone 上点了“打开”才读',
|
|
150
160
|
'ta.settings.navigation': '导航栏',
|
|
151
161
|
'ta.settings.navigation.show': '显示在导航栏',
|
|
152
162
|
'ta.settings.navigation.inNav': '在导航栏',
|
|
@@ -26,6 +26,9 @@ exports.ASSISTANT_ZH_TW = {
|
|
|
26
26
|
'ta.assistant.speakStopShort': '停止',
|
|
27
27
|
'ta.assistant.poke': '戳一下 Ta',
|
|
28
28
|
'ta.assistant.stop': '停止',
|
|
29
|
+
'ta.assistant.pauseTasks': '暫停全部任務',
|
|
30
|
+
'ta.assistant.resumeTasks': '繼續已暫停的任務({count})',
|
|
31
|
+
'ta.assistant.pausedTasks': '已暫停 {count} 個任務',
|
|
29
32
|
'ta.assistant.restart': '重新開始',
|
|
30
33
|
'ta.assistant.restartTitle': '和分身開始新的對話?',
|
|
31
34
|
'ta.assistant.restartHint': '目前對話仍儲存在會話檔案裡,任務繼續進行。',
|
|
@@ -80,6 +83,7 @@ exports.ASSISTANT_ZH_TW = {
|
|
|
80
83
|
'ta.task.verdictFail': '檢查未通過',
|
|
81
84
|
'ta.task.branch': '分支 {branch}',
|
|
82
85
|
'ta.task.stopped': '已停止',
|
|
86
|
+
'ta.task.paused': '已暫停',
|
|
83
87
|
'ta.task.waiting': '等你處理',
|
|
84
88
|
'ta.task.waitingPermission': '等你授權',
|
|
85
89
|
'ta.task.waitingQuestion': '等你回答',
|
|
@@ -167,6 +167,16 @@ exports.CHAT_ZH_TW = {
|
|
|
167
167
|
'ta.composer.voiceDenied': 'Ta 沒有使用麥克風或語音識別的權限。已經允許了仍不行,可能是這個瀏覽器不提供語音識別,可以換用 Safari、Chrome 或 Ta App。',
|
|
168
168
|
'ta.composer.voiceUnavailable': '這個瀏覽器的語音識別用不了(iPhone 上要開啟「Siri 與聽寫」)。可以換用 Safari、Chrome 或 Ta App。',
|
|
169
169
|
'ta.composer.voiceFailed': '語音識別不可用:{error}',
|
|
170
|
+
'ta.hear.offer': '這台裝置不能辨識語音,可以改由電腦來聽寫',
|
|
171
|
+
'ta.hear.offerHint': '給電腦下載約 {size} 的辨識模型;只用麥克風權限,不連網。',
|
|
172
|
+
'ta.hear.turnOn': '下載並開啟',
|
|
173
|
+
'ta.hear.turnedOn': '電腦正在下載語音辨識模型,好了再說一次',
|
|
174
|
+
'ta.hear.getting': '電腦正在下載語音辨識模型({percent}%),好了再說一次',
|
|
175
|
+
'ta.hear.failed': '電腦上的語音辨識還沒準備好',
|
|
176
|
+
'ta.hear.retry': '重試',
|
|
177
|
+
'ta.hear.unsupported': '這台裝置不能辨識語音,電腦也跑不了 Ta 的語音辨識',
|
|
178
|
+
'ta.hear.unavailable': '這台裝置不能辨識語音,Ta 的語音辨識也沒開',
|
|
179
|
+
'ta.hear.unavailableHint': '在 設定 → 擴充 裡開啟「即時語音」和「本機模型」。',
|
|
170
180
|
'ta.talk.listening': '正在聽…',
|
|
171
181
|
'ta.talk.edit': '編輯',
|
|
172
182
|
'ta.talk.releaseSend': '鬆開 傳送',
|
|
@@ -38,6 +38,7 @@ exports.COMMON_ZH_TW = {
|
|
|
38
38
|
'ta.zoom.next': '下一張(→)',
|
|
39
39
|
'ta.zoom.failed': '無法顯示這張圖片',
|
|
40
40
|
'ta.markdown.missing': '無法顯示 {name}',
|
|
41
|
+
'ta.markdown.retry': '點一下重試',
|
|
41
42
|
'ta.link.openFile': '點選開啟',
|
|
42
43
|
'ta.link.openFolder': '點選在資源管理器中顯示',
|
|
43
44
|
'ta.link.external': 'Ctrl + 點選在系統瀏覽器中開啟',
|
|
@@ -48,6 +49,16 @@ exports.COMMON_ZH_TW = {
|
|
|
48
49
|
'ta.link.trust': '信任 {host}',
|
|
49
50
|
'ta.link.trustHint': '以後這個域名的網頁不再詢問,直接開啟;可在設定中管理。',
|
|
50
51
|
'ta.link.copied': '連結已複製',
|
|
52
|
+
'ta.link.kindPairing': '連接電腦的連結',
|
|
53
|
+
'ta.link.kindExtension': 'Ta 擴充功能',
|
|
54
|
+
'ta.clip.clipboardOne': '剪貼簿裡有一個{kind}',
|
|
55
|
+
'ta.clip.pasteOne': '貼上的是一個{kind}',
|
|
56
|
+
'ta.clip.clipboardFrom': '來自剪貼簿 · {kind}',
|
|
57
|
+
'ta.clip.pasteFrom': '貼上的內容 · {kind}',
|
|
58
|
+
'ta.clip.clipboardMany': '剪貼簿裡有 {count} 個 Ta 連結',
|
|
59
|
+
'ta.clip.pasteMany': '貼上的內容裡有 {count} 個 Ta 連結',
|
|
60
|
+
'ta.clip.pick': '點一個開啟',
|
|
61
|
+
'ta.clip.open': '開啟',
|
|
51
62
|
'ta.link.notFound': '{path} 不存在。',
|
|
52
63
|
'ta.terminal.openLink': 'Ctrl + 點選開啟',
|
|
53
64
|
'ta.terminal.openLinkMac': 'Cmd + 點選開啟',
|
|
@@ -94,6 +105,10 @@ exports.COMMON_ZH_TW = {
|
|
|
94
105
|
'ta.select.all': '全選',
|
|
95
106
|
'ta.select.count': '已選 {count} 項',
|
|
96
107
|
'ta.select.done': '完成',
|
|
108
|
+
'ta.people.search': '搜尋',
|
|
109
|
+
'ta.people.none': '還沒有可選的人',
|
|
110
|
+
'ta.people.noMatch': '沒有找到',
|
|
111
|
+
'ta.people.leaveOut': '移除 {name}',
|
|
97
112
|
'ta.more': '更多',
|
|
98
113
|
'ta.host.title': '在遠端主機 {host} 上',
|
|
99
114
|
'ta.on': '開',
|
|
@@ -48,12 +48,22 @@ exports.DISCOVER_ZH_TW = {
|
|
|
48
48
|
'ta.share.friends': 'Ta 好友',
|
|
49
49
|
'ta.share.pickFriends': '選擇好友',
|
|
50
50
|
'ta.share.sendN': '傳送給 {n} 位',
|
|
51
|
-
'ta.share.
|
|
51
|
+
'ta.share.sentTitle': '傳給了這些好友',
|
|
52
|
+
'ta.share.sent': '已傳出',
|
|
53
|
+
'ta.share.got': '已收到',
|
|
54
|
+
'ta.share.opened': '已開啟',
|
|
52
55
|
'ta.share.renew': '換新連結',
|
|
53
56
|
'ta.share.passwordApart': '密碼請另行告訴對方:',
|
|
54
57
|
'ta.share.copyPassword': '複製密碼',
|
|
55
58
|
'ta.share.cannotMake': '沒能產生連結',
|
|
56
59
|
'ta.share.extensionGets': '對方在 Ta 裡開啟,不用安裝',
|
|
60
|
+
'ta.share.extensionInvite': '送你一個 Ta 擴充功能「{name}」,用 Ta 開啟連結就能試用,不用安裝:',
|
|
61
|
+
'ta.share.share': '分享',
|
|
62
|
+
'ta.share.titled': '分享「{name}」',
|
|
63
|
+
'ta.share.thing': '這個',
|
|
64
|
+
'ta.share.itemWork': '選擇分享到哪裡',
|
|
65
|
+
'ta.share.itemFile': '送出去的是檔案現在的副本',
|
|
66
|
+
'ta.share.noWay': '這裡還沒有能分享到的地方',
|
|
57
67
|
'ta.open.title': '開啟「{name}」?',
|
|
58
68
|
'ta.open.published': '擴充功能在 Ta 裡執行,能做 Ta 能做的事:讀寫這台電腦上的檔案、執行命令。只打開你信任的來源。',
|
|
59
69
|
'ta.open.relayed': '擴充功能來自分享者的電腦,在 Ta 裡執行,能做 Ta 能做的事:讀寫這台電腦上的檔案、執行命令。只打開你信任的人分享的擴充功能。',
|
|
@@ -62,6 +62,14 @@ exports.SETTINGS_ZH_TW = {
|
|
|
62
62
|
'ta.settings.diagramStyle.sketch': '草圖',
|
|
63
63
|
'ta.settings.diagramStyle.colour': '彩色',
|
|
64
64
|
'ta.settings.diagramStyle.motion': '動效',
|
|
65
|
+
'ta.settings.skin': '皮膚',
|
|
66
|
+
'ta.settings.skinHint': 'Ta 背後的畫面,各欄像玻璃一樣透出它。',
|
|
67
|
+
'ta.settings.skin.none': '無',
|
|
68
|
+
'ta.settings.glass': '玻璃',
|
|
69
|
+
'ta.settings.glassHint': '透出多少皮膚的畫面。',
|
|
70
|
+
'ta.settings.glass.clear': '清透',
|
|
71
|
+
'ta.settings.glass.soft': '柔和',
|
|
72
|
+
'ta.settings.glass.focus': '專注',
|
|
65
73
|
'ta.settings.fontSize': '字型大小',
|
|
66
74
|
'ta.settings.fontSizeHint': '整個頁面的文字。',
|
|
67
75
|
'ta.settings.chatFontSize': '對話字型大小',
|
|
@@ -147,6 +155,8 @@ exports.SETTINGS_ZH_TW = {
|
|
|
147
155
|
'ta.settings.chatArchiveHint': '超過這個時間沒有新訊息的對話移出列表,不再隨列表重新整理;在列表末尾的「已歸檔」或搜尋中找回',
|
|
148
156
|
'ta.settings.recentShots': '提示最近的截圖',
|
|
149
157
|
'ta.settings.recentShotsHint': '剛截圖後開啟對話,輸入框上方會提示一次這張截圖,點一下即可帶上。僅 Ta 桌面版和手機 App',
|
|
158
|
+
'ta.settings.clipboardLinks': '識別複製的 Ta 連結',
|
|
159
|
+
'ta.settings.clipboardLinksHint': '複製了帶 Ta 邀請或分享連結的內容,回到 Ta 時會提示它是什麼,點「開啟」就能開啟;在 Ta 裡任何地方貼上也一樣。只在回到 Ta 的那一刻讀一次剪貼簿,不保存內容。iPhone 上點了「開啟」才讀',
|
|
150
160
|
'ta.settings.navigation': '導航欄',
|
|
151
161
|
'ta.settings.navigation.show': '顯示在導航欄',
|
|
152
162
|
'ta.settings.navigation.inNav': '在導航欄',
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
export type Rgb = readonly [number, number, number];
|
|
2
|
+
/** How an era lays its paint: the width of a stroke, how fast it runs, how thick, and how many strokes are tiles instead. */
|
|
3
|
+
export interface ArtBrush {
|
|
4
|
+
width: number;
|
|
5
|
+
speed: number;
|
|
6
|
+
alpha: number;
|
|
7
|
+
/** 0 to 1: of the strokes, those laid as square tiles of colour (Klimt's mosaic). */
|
|
8
|
+
tiles: number;
|
|
9
|
+
}
|
|
10
|
+
/** A school of painting: the colours of the phases of the sky, round a ring from the first to the last and back, and its brush. */
|
|
11
|
+
export interface ArtEra {
|
|
12
|
+
name: string;
|
|
13
|
+
stops: readonly Rgb[];
|
|
14
|
+
brush: ArtBrush;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* The eras the sky of the launch picture goes through, one after another, each into the next: the short thick strokes
|
|
18
|
+
* of Van Gogh's swirling night, the fine long lines of Hokusai's wave in indigo and foam, Klimt's gold laid in tiles, the
|
|
19
|
+
* green dawn of Ta, and the broad brush of ink wash, its gaps the paper left bare.
|
|
20
|
+
*/
|
|
21
|
+
export declare const ART_ERAS: readonly ArtEra[];
|
|
22
|
+
/** The colours and brush of the sky at a time: an era for `seconds`, the next one coming in over its last third. */
|
|
23
|
+
export declare class ArtPalette {
|
|
24
|
+
readonly eras: readonly ArtEra[];
|
|
25
|
+
readonly seconds: number;
|
|
26
|
+
constructor(eras?: readonly ArtEra[], seconds?: number);
|
|
27
|
+
/** The era of `time`, the next, and how far (0 to 1, eased) the next has come in. */
|
|
28
|
+
moment(time: number): {
|
|
29
|
+
from: ArtEra;
|
|
30
|
+
to: ArtEra;
|
|
31
|
+
mix: number;
|
|
32
|
+
};
|
|
33
|
+
/** The colour of each of `states` phases at `time` seconds. */
|
|
34
|
+
colors(time: number, states: number): Rgb[];
|
|
35
|
+
brush(time: number): ArtBrush;
|
|
36
|
+
/** The colour at `at` (0 to 1) round the ring of `stops`. */
|
|
37
|
+
static ring(stops: readonly Rgb[], at: number): Rgb;
|
|
38
|
+
static blend(a: Rgb, b: Rgb, amount: number): Rgb;
|
|
39
|
+
/** The lightest of `colors`. */
|
|
40
|
+
static lightest(colors: readonly Rgb[]): Rgb;
|
|
41
|
+
}
|
|
42
|
+
//# sourceMappingURL=art-palette.d.ts.map
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ArtPalette = exports.ART_ERAS = void 0;
|
|
4
|
+
const hex = (value) => [Number.parseInt(value.slice(1, 3), 16), Number.parseInt(value.slice(3, 5), 16), Number.parseInt(value.slice(5, 7), 16)];
|
|
5
|
+
/**
|
|
6
|
+
* The eras the sky of the launch picture goes through, one after another, each into the next: the short thick strokes
|
|
7
|
+
* of Van Gogh's swirling night, the fine long lines of Hokusai's wave in indigo and foam, Klimt's gold laid in tiles, the
|
|
8
|
+
* green dawn of Ta, and the broad brush of ink wash, its gaps the paper left bare.
|
|
9
|
+
*/
|
|
10
|
+
exports.ART_ERAS = [
|
|
11
|
+
{
|
|
12
|
+
name: 'starry-night',
|
|
13
|
+
stops: ['#0b1d3a', '#1b3f7a', '#3a6fb5', '#8fb8de', '#f4d35e', '#e9a23b'].map(hex),
|
|
14
|
+
brush: { width: 2.6, speed: 1, alpha: 0.6, tiles: 0 },
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
name: 'great-wave',
|
|
18
|
+
stops: ['#0a1a2f', '#123c69', '#2b6b9e', '#e8e4d8', '#b9d3e3', '#1d4e7a'].map(hex),
|
|
19
|
+
brush: { width: 1.3, speed: 1.5, alpha: 0.7, tiles: 0 },
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
name: 'gold-leaf',
|
|
23
|
+
stops: ['#1d160a', '#6b4e16', '#c99a2e', '#f2d27a', '#8a9a3b', '#3b2a10'].map(hex),
|
|
24
|
+
brush: { width: 2, speed: 0.6, alpha: 0.65, tiles: 0.5 },
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
name: 'green-dawn',
|
|
28
|
+
stops: ['#06231d', '#0f5c48', '#10b981', '#a7f3d0', '#ecfdf5', '#34d399'].map(hex),
|
|
29
|
+
brush: { width: 1.8, speed: 0.9, alpha: 0.5, tiles: 0 },
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
name: 'ink-wash',
|
|
33
|
+
stops: ['#0b0d10', '#0b0d10', '#4a4842', '#d9d3c4', '#8c8678', '#0b0d10'].map(hex),
|
|
34
|
+
brush: { width: 4.2, speed: 0.7, alpha: 0.3, tiles: 0 },
|
|
35
|
+
},
|
|
36
|
+
];
|
|
37
|
+
/** The colours and brush of the sky at a time: an era for `seconds`, the next one coming in over its last third. */
|
|
38
|
+
class ArtPalette {
|
|
39
|
+
constructor(eras = exports.ART_ERAS, seconds = 40) {
|
|
40
|
+
this.eras = eras;
|
|
41
|
+
this.seconds = seconds;
|
|
42
|
+
}
|
|
43
|
+
/** The era of `time`, the next, and how far (0 to 1, eased) the next has come in. */
|
|
44
|
+
moment(time) {
|
|
45
|
+
const at = Math.max(0, time) / this.seconds;
|
|
46
|
+
const index = Math.floor(at);
|
|
47
|
+
const fade = Math.min(1, Math.max(0, (at - index - 2 / 3) * 3));
|
|
48
|
+
return { from: this.eras[index % this.eras.length], to: this.eras[(index + 1) % this.eras.length], mix: fade * fade * (3 - 2 * fade) };
|
|
49
|
+
}
|
|
50
|
+
/** The colour of each of `states` phases at `time` seconds. */
|
|
51
|
+
colors(time, states) {
|
|
52
|
+
const { from, to, mix } = this.moment(time);
|
|
53
|
+
return Array.from({ length: states }, (_, phase) => ArtPalette.blend(ArtPalette.ring(from.stops, phase / states), ArtPalette.ring(to.stops, phase / states), mix));
|
|
54
|
+
}
|
|
55
|
+
brush(time) {
|
|
56
|
+
const { from, to, mix } = this.moment(time);
|
|
57
|
+
const between = (key) => from.brush[key] + (to.brush[key] - from.brush[key]) * mix;
|
|
58
|
+
return { width: between('width'), speed: between('speed'), alpha: between('alpha'), tiles: between('tiles') };
|
|
59
|
+
}
|
|
60
|
+
/** The colour at `at` (0 to 1) round the ring of `stops`. */
|
|
61
|
+
static ring(stops, at) {
|
|
62
|
+
const position = (((at % 1) + 1) % 1) * stops.length;
|
|
63
|
+
const index = Math.floor(position);
|
|
64
|
+
return ArtPalette.blend(stops[index], stops[(index + 1) % stops.length], position - index);
|
|
65
|
+
}
|
|
66
|
+
static blend(a, b, amount) {
|
|
67
|
+
return [Math.round(a[0] + (b[0] - a[0]) * amount), Math.round(a[1] + (b[1] - a[1]) * amount), Math.round(a[2] + (b[2] - a[2]) * amount)];
|
|
68
|
+
}
|
|
69
|
+
/** The lightest of `colors`. */
|
|
70
|
+
static lightest(colors) {
|
|
71
|
+
const light = (color) => 0.2126 * color[0] + 0.7152 * color[1] + 0.0722 * color[2];
|
|
72
|
+
return colors.reduce((best, color) => (light(color) > light(best) ? color : best));
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
exports.ArtPalette = ArtPalette;
|
|
76
|
+
//# sourceMappingURL=art-palette.js.map
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A cyclic cellular automaton (Griffeath's): each cell holds one of `states` phases and takes the next one as soon as
|
|
3
|
+
* `threshold` of its neighbours (those within `range`, a round neighbourhood) hold it. Seeded with spirals it never comes
|
|
4
|
+
* to rest: its waves wind out of the points where all the phases meet (the cores) and run on until they meet the waves of
|
|
5
|
+
* another core. The sky of the launch picture (LaunchArt) is painted along them.
|
|
6
|
+
*/
|
|
7
|
+
export declare class CyclicAutomaton {
|
|
8
|
+
readonly cols: number;
|
|
9
|
+
readonly rows: number;
|
|
10
|
+
readonly states: number;
|
|
11
|
+
readonly cells: Uint8Array;
|
|
12
|
+
readonly range: number;
|
|
13
|
+
readonly threshold: number;
|
|
14
|
+
/** Per cell, the direction its wave fronts run along (a unit vector); 0, 0 where its phases are flat. */
|
|
15
|
+
readonly flowX: Float32Array;
|
|
16
|
+
readonly flowY: Float32Array;
|
|
17
|
+
protected readonly next: Uint8Array;
|
|
18
|
+
protected readonly reach: readonly (readonly [number, number])[];
|
|
19
|
+
constructor(cols: number, rows: number, states?: number, cells?: Uint8Array, range?: number, threshold?: number);
|
|
20
|
+
/**
|
|
21
|
+
* A field already turning round `count` cores: the phase winds once round each (of either hand) and grows by one every
|
|
22
|
+
* `range` cells away from the nearest, so its first frame is spirals already, with no steps to run first.
|
|
23
|
+
*/
|
|
24
|
+
static spirals(cols: number, rows: number, count: number, random: () => number, states?: number): CyclicAutomaton;
|
|
25
|
+
/** The automaton `encode` kept, if it is one of this size. */
|
|
26
|
+
static decode(cols: number, rows: number, text: string, states?: number): CyclicAutomaton | undefined;
|
|
27
|
+
static wrap(value: number, states: number): number;
|
|
28
|
+
/** How far phase `a` is ahead of `b`, the short way round: within (-states / 2, states / 2]. */
|
|
29
|
+
static ahead(a: number, b: number, states: number): number;
|
|
30
|
+
/** One step of every cell at once; how many cells changed. */
|
|
31
|
+
step(): number;
|
|
32
|
+
/** A new core of hand `hand` (1 or -1) at `x`, `y`, its spiral over the cells within `radius` of it. */
|
|
33
|
+
plant(x: number, y: number, radius: number, hand: number): void;
|
|
34
|
+
phase(x: number, y: number): number;
|
|
35
|
+
/** The direction of the fronts at `x`, `y` (in cells), between the cells round it. */
|
|
36
|
+
flow(x: number, y: number): [number, number];
|
|
37
|
+
/** Its cells, four bits each, in base 64: what the next launch goes on from. */
|
|
38
|
+
encode(): string;
|
|
39
|
+
/**
|
|
40
|
+
* The wave fronts: a phase goes on into the cells behind it, so a wave runs from the higher phases to the lower, and
|
|
41
|
+
* its front lies across that. Round a core the fronts turn, and the strokes along them whirl. Measured one and two
|
|
42
|
+
* cells away, so that inside a wave as wide as a cell or two the fronts still have a direction.
|
|
43
|
+
*/
|
|
44
|
+
protected measure(): void;
|
|
45
|
+
}
|
|
46
|
+
//# sourceMappingURL=cyclic-automaton.d.ts.map
|
|
@@ -0,0 +1,180 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CyclicAutomaton = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* A cyclic cellular automaton (Griffeath's): each cell holds one of `states` phases and takes the next one as soon as
|
|
6
|
+
* `threshold` of its neighbours (those within `range`, a round neighbourhood) hold it. Seeded with spirals it never comes
|
|
7
|
+
* to rest: its waves wind out of the points where all the phases meet (the cores) and run on until they meet the waves of
|
|
8
|
+
* another core. The sky of the launch picture (LaunchArt) is painted along them.
|
|
9
|
+
*/
|
|
10
|
+
class CyclicAutomaton {
|
|
11
|
+
constructor(cols, rows, states = 8, cells = new Uint8Array(cols * rows), range = 2, threshold = 3) {
|
|
12
|
+
this.cols = cols;
|
|
13
|
+
this.rows = rows;
|
|
14
|
+
this.states = states;
|
|
15
|
+
this.cells = cells;
|
|
16
|
+
this.range = range;
|
|
17
|
+
this.threshold = threshold;
|
|
18
|
+
this.next = new Uint8Array(cols * rows);
|
|
19
|
+
this.flowX = new Float32Array(cols * rows);
|
|
20
|
+
this.flowY = new Float32Array(cols * rows);
|
|
21
|
+
const reach = [];
|
|
22
|
+
for (let dy = -range; dy <= range; dy++) {
|
|
23
|
+
for (let dx = -range; dx <= range; dx++) {
|
|
24
|
+
if ((dx || dy) && dx * dx + dy * dy <= range * range + range) {
|
|
25
|
+
reach.push([dx, dy]);
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
this.reach = reach;
|
|
30
|
+
this.measure();
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* A field already turning round `count` cores: the phase winds once round each (of either hand) and grows by one every
|
|
34
|
+
* `range` cells away from the nearest, so its first frame is spirals already, with no steps to run first.
|
|
35
|
+
*/
|
|
36
|
+
static spirals(cols, rows, count, random, states = 8) {
|
|
37
|
+
const automaton = new CyclicAutomaton(cols, rows, states);
|
|
38
|
+
const cores = Array.from({ length: count }, () => ({ x: random() * cols, y: random() * rows, hand: random() < 0.5 ? -1 : 1 }));
|
|
39
|
+
for (let y = 0; y < rows; y++) {
|
|
40
|
+
for (let x = 0; x < cols; x++) {
|
|
41
|
+
let winding = 0;
|
|
42
|
+
let nearest = Number.POSITIVE_INFINITY;
|
|
43
|
+
for (const core of cores) {
|
|
44
|
+
winding += core.hand * Math.atan2(y - core.y, x - core.x);
|
|
45
|
+
nearest = Math.min(nearest, Math.hypot(x - core.x, y - core.y));
|
|
46
|
+
}
|
|
47
|
+
const phase = (winding / (2 * Math.PI)) * states + nearest / automaton.range;
|
|
48
|
+
automaton.cells[y * cols + x] = CyclicAutomaton.wrap(Math.floor(phase), states);
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
automaton.measure();
|
|
52
|
+
return automaton;
|
|
53
|
+
}
|
|
54
|
+
/** The automaton `encode` kept, if it is one of this size. */
|
|
55
|
+
static decode(cols, rows, text, states = 8) {
|
|
56
|
+
let bytes;
|
|
57
|
+
try {
|
|
58
|
+
bytes = atob(text);
|
|
59
|
+
}
|
|
60
|
+
catch (_a) {
|
|
61
|
+
return undefined;
|
|
62
|
+
}
|
|
63
|
+
if (bytes.length !== Math.ceil((cols * rows) / 2)) {
|
|
64
|
+
return undefined;
|
|
65
|
+
}
|
|
66
|
+
const cells = new Uint8Array(cols * rows);
|
|
67
|
+
for (let index = 0; index < cells.length; index++) {
|
|
68
|
+
const byte = bytes.charCodeAt(index >> 1);
|
|
69
|
+
cells[index] = index % 2 === 0 ? byte >> 4 : byte & 15;
|
|
70
|
+
if (cells[index] >= states) {
|
|
71
|
+
return undefined;
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
return new CyclicAutomaton(cols, rows, states, cells);
|
|
75
|
+
}
|
|
76
|
+
static wrap(value, states) {
|
|
77
|
+
return ((value % states) + states) % states;
|
|
78
|
+
}
|
|
79
|
+
/** How far phase `a` is ahead of `b`, the short way round: within (-states / 2, states / 2]. */
|
|
80
|
+
static ahead(a, b, states) {
|
|
81
|
+
const difference = CyclicAutomaton.wrap(a - b, states);
|
|
82
|
+
return difference > states / 2 ? difference - states : difference;
|
|
83
|
+
}
|
|
84
|
+
/** One step of every cell at once; how many cells changed. */
|
|
85
|
+
step() {
|
|
86
|
+
const { cols, rows, states, cells, next, reach, threshold } = this;
|
|
87
|
+
let changed = 0;
|
|
88
|
+
for (let y = 0; y < rows; y++) {
|
|
89
|
+
for (let x = 0; x < cols; x++) {
|
|
90
|
+
const index = y * cols + x;
|
|
91
|
+
const phase = cells[index];
|
|
92
|
+
const following = phase + 1 === states ? 0 : phase + 1;
|
|
93
|
+
let count = 0;
|
|
94
|
+
for (const [dx, dy] of reach) {
|
|
95
|
+
const col = x + dx;
|
|
96
|
+
const row = y + dy;
|
|
97
|
+
if (col >= 0 && row >= 0 && col < cols && row < rows && cells[row * cols + col] === following && ++count >= threshold) {
|
|
98
|
+
break;
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
next[index] = count >= threshold ? following : phase;
|
|
102
|
+
if (next[index] !== phase) {
|
|
103
|
+
changed++;
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
cells.set(next);
|
|
108
|
+
this.measure();
|
|
109
|
+
return changed;
|
|
110
|
+
}
|
|
111
|
+
/** A new core of hand `hand` (1 or -1) at `x`, `y`, its spiral over the cells within `radius` of it. */
|
|
112
|
+
plant(x, y, radius, hand) {
|
|
113
|
+
const { cols, rows, states, cells } = this;
|
|
114
|
+
for (let row = Math.max(0, Math.floor(y - radius)); row <= Math.min(rows - 1, Math.ceil(y + radius)); row++) {
|
|
115
|
+
for (let col = Math.max(0, Math.floor(x - radius)); col <= Math.min(cols - 1, Math.ceil(x + radius)); col++) {
|
|
116
|
+
const distance = Math.hypot(col - x, row - y);
|
|
117
|
+
if (distance <= radius) {
|
|
118
|
+
const turn = (hand * Math.atan2(row - y, col - x)) / (2 * Math.PI);
|
|
119
|
+
cells[row * cols + col] = CyclicAutomaton.wrap(Math.floor(turn * states + distance / this.range), states);
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
this.measure();
|
|
124
|
+
}
|
|
125
|
+
phase(x, y) {
|
|
126
|
+
const col = Math.min(this.cols - 1, Math.max(0, Math.floor(x)));
|
|
127
|
+
const row = Math.min(this.rows - 1, Math.max(0, Math.floor(y)));
|
|
128
|
+
return this.cells[row * this.cols + col];
|
|
129
|
+
}
|
|
130
|
+
/** The direction of the fronts at `x`, `y` (in cells), between the cells round it. */
|
|
131
|
+
flow(x, y) {
|
|
132
|
+
const { cols, rows, flowX, flowY } = this;
|
|
133
|
+
const fx = Math.min(cols - 1.001, Math.max(0, x - 0.5));
|
|
134
|
+
const fy = Math.min(rows - 1.001, Math.max(0, y - 0.5));
|
|
135
|
+
const col = Math.floor(fx);
|
|
136
|
+
const row = Math.floor(fy);
|
|
137
|
+
const u = fx - col;
|
|
138
|
+
const v = fy - row;
|
|
139
|
+
const a = row * cols + col;
|
|
140
|
+
const b = a + (col + 1 < cols ? 1 : 0);
|
|
141
|
+
const c = a + (row + 1 < rows ? cols : 0);
|
|
142
|
+
const d = c + (col + 1 < cols ? 1 : 0);
|
|
143
|
+
const along = (field) => (field[a] * (1 - u) + field[b] * u) * (1 - v) + (field[c] * (1 - u) + field[d] * u) * v;
|
|
144
|
+
return [along(flowX), along(flowY)];
|
|
145
|
+
}
|
|
146
|
+
/** Its cells, four bits each, in base 64: what the next launch goes on from. */
|
|
147
|
+
encode() {
|
|
148
|
+
var _a;
|
|
149
|
+
let text = '';
|
|
150
|
+
for (let index = 0; index < this.cells.length; index += 2) {
|
|
151
|
+
text += String.fromCharCode((this.cells[index] << 4) | ((_a = this.cells[index + 1]) !== null && _a !== void 0 ? _a : 0));
|
|
152
|
+
}
|
|
153
|
+
return btoa(text);
|
|
154
|
+
}
|
|
155
|
+
/**
|
|
156
|
+
* The wave fronts: a phase goes on into the cells behind it, so a wave runs from the higher phases to the lower, and
|
|
157
|
+
* its front lies across that. Round a core the fronts turn, and the strokes along them whirl. Measured one and two
|
|
158
|
+
* cells away, so that inside a wave as wide as a cell or two the fronts still have a direction.
|
|
159
|
+
*/
|
|
160
|
+
measure() {
|
|
161
|
+
const { cols, rows, states, cells, flowX, flowY } = this;
|
|
162
|
+
const clamp = (value, size) => (value < 0 ? 0 : value >= size ? size - 1 : value);
|
|
163
|
+
for (let y = 0; y < rows; y++) {
|
|
164
|
+
for (let x = 0; x < cols; x++) {
|
|
165
|
+
let gx = 0;
|
|
166
|
+
let gy = 0;
|
|
167
|
+
for (let reach = 1; reach <= 2; reach++) {
|
|
168
|
+
gx += CyclicAutomaton.ahead(cells[y * cols + clamp(x + reach, cols)], cells[y * cols + clamp(x - reach, cols)], states) / reach;
|
|
169
|
+
gy += CyclicAutomaton.ahead(cells[clamp(y + reach, rows) * cols + x], cells[clamp(y - reach, rows) * cols + x], states) / reach;
|
|
170
|
+
}
|
|
171
|
+
const length = Math.hypot(gx, gy);
|
|
172
|
+
const index = y * cols + x;
|
|
173
|
+
flowX[index] = length ? -gy / length : 0;
|
|
174
|
+
flowY[index] = length ? gx / length : 0;
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
exports.CyclicAutomaton = CyclicAutomaton;
|
|
180
|
+
//# sourceMappingURL=cyclic-automaton.js.map
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
interface TreeNode {
|
|
2
|
+
/** Of its parent's length (1 for the trunk). */
|
|
3
|
+
length: number;
|
|
4
|
+
/** Its angle from its parent's, in radians. */
|
|
5
|
+
turn: number;
|
|
6
|
+
children: TreeNode[];
|
|
7
|
+
}
|
|
8
|
+
/** Where the tree stands and how it moves this frame. */
|
|
9
|
+
export interface TreePose {
|
|
10
|
+
x: number;
|
|
11
|
+
y: number;
|
|
12
|
+
/** The length of the trunk. */
|
|
13
|
+
size: number;
|
|
14
|
+
/** The wind, about -1 to 1: the higher a branch, the more it bends. */
|
|
15
|
+
sway: number;
|
|
16
|
+
/** Toward a finger, about -1 to 1. */
|
|
17
|
+
lean: number;
|
|
18
|
+
/** 0 to 1: the tree grows from its trunk to its tips. */
|
|
19
|
+
growth: number;
|
|
20
|
+
}
|
|
21
|
+
export interface TreeSegment {
|
|
22
|
+
x0: number;
|
|
23
|
+
y0: number;
|
|
24
|
+
x1: number;
|
|
25
|
+
y1: number;
|
|
26
|
+
depth: number;
|
|
27
|
+
/** A branch of the last level, whole: it ends in a curl of gold. */
|
|
28
|
+
tip: boolean;
|
|
29
|
+
angle: number;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* A fractal tree, Klimt's tree of life: each branch forks into two or three shorter ones down to `depth`, and its
|
|
33
|
+
* last ones end in curls of gold. Its shape is drawn from `random` once; each frame only bends it.
|
|
34
|
+
*/
|
|
35
|
+
export declare class FractalTree {
|
|
36
|
+
readonly depth: number;
|
|
37
|
+
readonly root: TreeNode;
|
|
38
|
+
constructor(depth: number, random: () => number);
|
|
39
|
+
segments(pose: TreePose): TreeSegment[];
|
|
40
|
+
protected grow(depth: number, random: () => number): TreeNode;
|
|
41
|
+
protected lay(node: TreeNode, depth: number, x: number, y: number, angle: number, length: number, pose: TreePose, out: TreeSegment[]): void;
|
|
42
|
+
}
|
|
43
|
+
export {};
|
|
44
|
+
//# sourceMappingURL=fractal-tree.d.ts.map
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.FractalTree = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* A fractal tree, Klimt's tree of life: each branch forks into two or three shorter ones down to `depth`, and its
|
|
6
|
+
* last ones end in curls of gold. Its shape is drawn from `random` once; each frame only bends it.
|
|
7
|
+
*/
|
|
8
|
+
class FractalTree {
|
|
9
|
+
constructor(depth, random) {
|
|
10
|
+
this.depth = depth;
|
|
11
|
+
this.root = this.grow(0, random);
|
|
12
|
+
}
|
|
13
|
+
segments(pose) {
|
|
14
|
+
const segments = [];
|
|
15
|
+
this.lay(this.root, 0, pose.x, pose.y, -Math.PI / 2, pose.size, pose, segments);
|
|
16
|
+
return segments;
|
|
17
|
+
}
|
|
18
|
+
grow(depth, random) {
|
|
19
|
+
const node = { length: depth === 0 ? 1 : 0.66 + random() * 0.14, turn: 0, children: [] };
|
|
20
|
+
if (depth < this.depth) {
|
|
21
|
+
const three = depth > 1 && random() < 0.22;
|
|
22
|
+
const turns = [-(0.3 + random() * 0.22), 0.26 + random() * 0.22];
|
|
23
|
+
if (three) {
|
|
24
|
+
turns.push((random() - 0.5) * 0.2);
|
|
25
|
+
}
|
|
26
|
+
for (const turn of turns) {
|
|
27
|
+
const child = this.grow(depth + 1, random);
|
|
28
|
+
child.turn = turn;
|
|
29
|
+
node.children.push(child);
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
return node;
|
|
33
|
+
}
|
|
34
|
+
lay(node, depth, x, y, angle, length, pose, out) {
|
|
35
|
+
const shown = Math.min(1, Math.max(0, pose.growth * (this.depth + 1) - depth));
|
|
36
|
+
if (shown === 0) {
|
|
37
|
+
return;
|
|
38
|
+
}
|
|
39
|
+
const heading = angle + node.turn + pose.sway * 0.035 * (depth + 1) + pose.lean * 0.05 * depth;
|
|
40
|
+
const reach = length * node.length;
|
|
41
|
+
const x1 = x + Math.cos(heading) * reach * shown;
|
|
42
|
+
const y1 = y + Math.sin(heading) * reach * shown;
|
|
43
|
+
out.push({ x0: x, y0: y, x1, y1, depth, tip: depth === this.depth && shown === 1, angle: heading });
|
|
44
|
+
if (shown === 1) {
|
|
45
|
+
for (const child of node.children) {
|
|
46
|
+
this.lay(child, depth + 1, x1, y1, heading, reach, pose, out);
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
exports.FractalTree = FractalTree;
|
|
52
|
+
//# sourceMappingURL=fractal-tree.js.map
|