@celljs/ta-web 4.9.0 → 4.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.en.md +4 -3
- package/README.md +4 -3
- package/esm/browser/assistant/assistant-chat-list.js +8 -2
- package/esm/browser/assistant/assistant-extension.d.ts +8 -1
- package/esm/browser/assistant/assistant-extension.js +33 -5
- package/esm/browser/assistant/assistant-protocol.d.ts +3 -1
- package/esm/browser/assistant/assistant-task-source.d.ts +2 -0
- package/esm/browser/assistant/assistant-task-source.js +2 -0
- package/esm/browser/assistant/assistant-task-util.d.ts +8 -0
- package/esm/browser/assistant/assistant-task-util.js +13 -3
- package/esm/browser/assistant/assistant-tasks.js +3 -2
- package/esm/browser/assistant/assistant-view.js +81 -56
- package/esm/browser/assistant/assistant.d.ts +30 -1
- package/esm/browser/assistant/assistant.js +89 -6
- package/esm/browser/assistant/task-views.d.ts +40 -6
- package/esm/browser/assistant/task-views.js +73 -21
- package/esm/browser/avatar/dino-avatar.d.ts +3 -4
- package/esm/browser/avatar/dino-avatar.js +4 -178
- package/esm/browser/avatar/dino-face.d.ts +19 -0
- package/esm/browser/avatar/dino-face.js +142 -0
- package/esm/browser/avatar/dino-geometry.d.ts +11 -0
- package/esm/browser/avatar/dino-geometry.js +38 -0
- package/esm/browser/avatar/dino-kinds.d.ts +15 -0
- package/esm/browser/avatar/dino-kinds.js +544 -0
- package/esm/browser/avatar/dino-motion.js +1 -1
- package/esm/browser/avatar/dino-shape.d.ts +80 -0
- package/esm/browser/avatar/dino-shape.js +113 -0
- package/esm/browser/avatar/dino-species.d.ts +1 -61
- package/esm/browser/avatar/dino-species.js +2 -653
- package/esm/browser/chat/chat-packages.d.ts +39 -0
- package/esm/browser/chat/chat-packages.js +70 -0
- package/esm/browser/chat/chat-protocol.d.ts +23 -1
- package/esm/browser/chat/chat-stores.d.ts +59 -0
- package/esm/browser/chat/chat-stores.js +121 -0
- package/esm/browser/chat/chat-util.d.ts +17 -0
- package/esm/browser/chat/chat-util.js +61 -0
- package/esm/browser/chat/chat-view.js +33 -12
- package/esm/browser/chat/chat.d.ts +31 -39
- package/esm/browser/chat/chat.js +226 -175
- package/esm/browser/components/access-view.js +1 -1
- package/esm/browser/components/account-menu.js +1 -1
- package/esm/browser/components/app-nav.d.ts +6 -3
- package/esm/browser/components/app-nav.js +19 -10
- package/esm/browser/components/app-shell-hooks.d.ts +47 -0
- package/esm/browser/components/app-shell-hooks.js +169 -0
- package/esm/browser/components/app-view.js +81 -172
- package/esm/browser/components/auth-view.js +1 -1
- package/esm/browser/components/chat-list.d.ts +20 -2
- package/esm/browser/components/chat-list.js +138 -22
- package/esm/browser/components/composer-box.d.ts +5 -5
- package/esm/browser/components/composer-box.js +111 -4
- package/esm/browser/components/composer.d.ts +7 -0
- package/esm/browser/components/composer.js +22 -14
- package/esm/browser/components/connection-bar.js +50 -17
- package/esm/browser/components/context-menu.d.ts +30 -4
- package/esm/browser/components/context-menu.js +199 -37
- package/esm/browser/components/conversation-scroll.d.ts +129 -6
- package/esm/browser/components/conversation-scroll.js +429 -109
- package/esm/browser/components/dino.js +1 -1
- package/esm/browser/components/earlier-messages.d.ts +2 -1
- package/esm/browser/components/earlier-messages.js +2 -17
- package/esm/browser/components/editor-area.d.ts +3 -1
- package/esm/browser/components/editor-area.js +6 -5
- package/esm/browser/components/empty-pictures.d.ts +0 -2
- package/esm/browser/components/empty-pictures.js +0 -16
- package/esm/browser/components/folder-picker.d.ts +5 -2
- package/esm/browser/components/folder-picker.js +30 -9
- package/esm/browser/components/held-talk.d.ts +28 -0
- package/esm/browser/components/held-talk.js +76 -0
- package/esm/browser/components/host-view.d.ts +1 -1
- package/esm/browser/components/host-view.js +1 -1
- package/esm/browser/components/icon.d.ts +2 -2
- package/esm/browser/components/icon.js +5 -6
- package/esm/browser/components/image-viewer.d.ts +124 -0
- package/esm/browser/components/image-viewer.js +397 -0
- package/esm/browser/components/lightbox.d.ts +11 -0
- package/esm/browser/components/lightbox.js +24 -0
- package/esm/browser/components/markdown.d.ts +6 -2
- package/esm/browser/components/markdown.js +24 -10
- package/esm/browser/components/media.js +1 -10
- package/esm/browser/components/message-footer.d.ts +16 -2
- package/esm/browser/components/message-footer.js +29 -12
- package/esm/browser/components/message-list.d.ts +24 -3
- package/esm/browser/components/message-list.js +149 -20
- package/esm/browser/components/message-menu.d.ts +3 -1
- package/esm/browser/components/message-menu.js +18 -3
- package/esm/browser/components/nav-places.d.ts +16 -1
- package/esm/browser/components/nav-places.js +12 -3
- package/esm/browser/components/phone-shell.d.ts +4 -1
- package/esm/browser/components/phone-shell.js +3 -1
- package/esm/browser/components/run-status.js +3 -3
- package/esm/browser/components/select-bar.d.ts +9 -0
- package/esm/browser/components/select-bar.js +24 -0
- package/esm/browser/components/session-settings.d.ts +6 -0
- package/esm/browser/components/session-settings.js +14 -1
- package/esm/browser/components/session-view.js +8 -4
- package/esm/browser/components/settings-choices.d.ts +35 -0
- package/esm/browser/components/settings-choices.js +117 -0
- package/esm/browser/components/settings-parts.d.ts +21 -0
- package/esm/browser/components/settings-parts.js +323 -0
- package/esm/browser/components/settings-view.d.ts +0 -6
- package/esm/browser/components/settings-view.js +4 -406
- package/esm/browser/components/swipe-row.d.ts +2 -2
- package/esm/browser/components/swipe-row.js +7 -3
- package/esm/browser/components/tool-view.js +14 -12
- package/esm/browser/components/voice-button.d.ts +1 -1
- package/esm/browser/components/voice-button.js +1 -1
- package/esm/browser/components/voice-talk.d.ts +43 -0
- package/esm/browser/components/voice-talk.js +222 -0
- package/esm/browser/components/workbench-view.js +1 -1
- package/esm/browser/device/device.d.ts +3 -0
- package/esm/browser/device/device.js +11 -1
- package/esm/browser/device/hold.d.ts +42 -0
- package/esm/browser/device/hold.js +136 -0
- package/esm/browser/device/launch-screen.d.ts +1 -1
- package/esm/browser/device/launch-screen.js +1 -1
- package/esm/browser/device/long-press.d.ts +2 -0
- package/esm/browser/device/long-press.js +16 -1
- package/esm/browser/device/pull-down.d.ts +4 -2
- package/esm/browser/device/pull-down.js +64 -76
- package/esm/browser/device/row-swipe.d.ts +35 -10
- package/esm/browser/device/row-swipe.js +149 -71
- package/esm/browser/device/shake-undo.d.ts +16 -0
- package/esm/browser/device/shake-undo.js +59 -0
- package/esm/browser/device/sheet-swipe.d.ts +118 -18
- package/esm/browser/device/sheet-swipe.js +406 -107
- package/esm/browser/extension/icons.js +2 -1
- package/esm/browser/extension/web-extension-api.d.ts +135 -2
- package/esm/browser/extension/web-extension-code.d.ts +6 -0
- package/esm/browser/extension/web-extension-code.js +24 -0
- package/esm/browser/extension/web-extension-protocol.d.ts +23 -1
- package/esm/browser/extension/web-extension-protocol.js +8 -0
- package/esm/browser/extension/web-extensions.d.ts +14 -1
- package/esm/browser/extension/web-extensions.js +128 -24
- package/esm/browser/extension/web-tasks.d.ts +9 -1
- package/esm/browser/extension/web-tasks.js +24 -0
- package/esm/browser/files/files-protocol.d.ts +25 -0
- package/esm/browser/files/files-protocol.js +2 -0
- package/esm/browser/files/files.d.ts +35 -0
- package/esm/browser/files/files.js +119 -0
- package/esm/browser/hooks.d.ts +3 -1
- package/esm/browser/hooks.js +8 -0
- package/esm/browser/i18n/locales.d.ts +29 -2
- package/esm/browser/i18n/messages.d.ts +28 -1
- package/esm/browser/i18n/messages.js +58 -4
- package/esm/browser/index.d.ts +6 -0
- package/esm/browser/index.js +6 -0
- package/esm/browser/notices/notices-protocol.d.ts +9 -1
- package/esm/browser/notices/notices.d.ts +2 -0
- package/esm/browser/notices/notices.js +20 -10
- package/esm/browser/offline/device-values.d.ts +55 -0
- package/esm/browser/offline/device-values.js +142 -0
- package/esm/browser/offline/kept-chats-protocol.d.ts +17 -0
- package/esm/browser/offline/kept-chats-protocol.js +2 -0
- package/esm/browser/offline/kept-chats.d.ts +47 -0
- package/esm/browser/offline/kept-chats.js +146 -0
- package/esm/browser/offline/offline-reads.d.ts +44 -0
- package/esm/browser/offline/offline-reads.js +107 -0
- package/esm/browser/settings/settings-protocol.d.ts +2 -0
- package/esm/browser/settings/settings-protocol.js +2 -0
- package/esm/browser/style/conversation.d.ts +1 -1
- package/esm/browser/style/conversation.js +57 -17
- package/esm/browser/style/device.js +43 -4
- package/esm/browser/style/layout.d.ts +1 -1
- package/esm/browser/style/layout.js +67 -15
- package/esm/browser/style/pages.d.ts +1 -1
- package/esm/browser/style/pages.js +2 -1
- package/esm/browser/style/shell.d.ts +1 -1
- package/esm/browser/style/shell.js +47 -3
- package/esm/browser/style/tasks.d.ts +1 -1
- package/esm/browser/style/tasks.js +2 -0
- package/esm/browser/util/frame.d.ts +5 -4
- package/esm/browser/util/frame.js +5 -4
- package/esm/browser/util/markdown.d.ts +18 -1
- package/esm/browser/util/markdown.js +119 -5
- package/esm/browser/util/process.d.ts +21 -0
- package/esm/browser/util/process.js +45 -1
- package/esm/browser/util/voice.d.ts +5 -2
- package/esm/browser/util/voice.js +6 -3
- package/esm/browser/util/zoom.d.ts +46 -0
- package/esm/browser/util/zoom.js +96 -0
- package/esm/browser/workbench-calls.d.ts +59 -0
- package/esm/browser/workbench-calls.js +141 -0
- package/esm/browser/workbench-protocol.d.ts +5 -1
- package/esm/browser/workbench-util.d.ts +68 -0
- package/esm/browser/workbench-util.js +145 -0
- package/esm/browser/workbench.d.ts +15 -42
- package/esm/browser/workbench.js +53 -167
- package/lib/browser/assistant/assistant-chat-list.js +8 -2
- package/lib/browser/assistant/assistant-extension.d.ts +8 -1
- package/lib/browser/assistant/assistant-extension.js +33 -5
- package/lib/browser/assistant/assistant-protocol.d.ts +3 -1
- package/lib/browser/assistant/assistant-task-source.d.ts +2 -0
- package/lib/browser/assistant/assistant-task-source.js +2 -0
- package/lib/browser/assistant/assistant-task-util.d.ts +8 -0
- package/lib/browser/assistant/assistant-task-util.js +13 -3
- package/lib/browser/assistant/assistant-tasks.js +2 -1
- package/lib/browser/assistant/assistant-view.js +78 -53
- package/lib/browser/assistant/assistant.d.ts +30 -1
- package/lib/browser/assistant/assistant.js +89 -6
- package/lib/browser/assistant/task-views.d.ts +40 -6
- package/lib/browser/assistant/task-views.js +74 -21
- package/lib/browser/avatar/dino-avatar.d.ts +3 -4
- package/lib/browser/avatar/dino-avatar.js +27 -202
- package/lib/browser/avatar/dino-face.d.ts +20 -0
- package/lib/browser/avatar/dino-face.js +148 -0
- package/lib/browser/avatar/dino-geometry.d.ts +12 -0
- package/lib/browser/avatar/dino-geometry.js +47 -0
- package/lib/browser/avatar/dino-kinds.d.ts +16 -0
- package/lib/browser/avatar/dino-kinds.js +547 -0
- package/lib/browser/avatar/dino-motion.js +2 -2
- package/lib/browser/avatar/dino-shape.d.ts +81 -0
- package/lib/browser/avatar/dino-shape.js +126 -0
- package/lib/browser/avatar/dino-species.d.ts +1 -61
- package/lib/browser/avatar/dino-species.js +34 -687
- package/lib/browser/chat/chat-packages.d.ts +40 -0
- package/lib/browser/chat/chat-packages.js +74 -0
- package/lib/browser/chat/chat-protocol.d.ts +23 -1
- package/lib/browser/chat/chat-stores.d.ts +60 -0
- package/lib/browser/chat/chat-stores.js +125 -0
- package/lib/browser/chat/chat-util.d.ts +18 -0
- package/lib/browser/chat/chat-util.js +64 -0
- package/lib/browser/chat/chat-view.js +33 -12
- package/lib/browser/chat/chat.d.ts +31 -39
- package/lib/browser/chat/chat.js +227 -176
- package/lib/browser/components/access-view.js +2 -2
- package/lib/browser/components/account-menu.js +2 -2
- package/lib/browser/components/app-nav.d.ts +6 -3
- package/lib/browser/components/app-nav.js +17 -8
- package/lib/browser/components/app-shell-hooks.d.ts +48 -0
- package/lib/browser/components/app-shell-hooks.js +211 -0
- package/lib/browser/components/app-view.js +89 -180
- package/lib/browser/components/auth-view.js +3 -3
- package/lib/browser/components/chat-list.d.ts +20 -2
- package/lib/browser/components/chat-list.js +137 -21
- package/lib/browser/components/composer-box.d.ts +5 -5
- package/lib/browser/components/composer-box.js +111 -4
- package/lib/browser/components/composer.d.ts +7 -0
- package/lib/browser/components/composer.js +22 -14
- package/lib/browser/components/connection-bar.js +48 -15
- package/lib/browser/components/context-menu.d.ts +30 -4
- package/lib/browser/components/context-menu.js +198 -36
- package/lib/browser/components/conversation-scroll.d.ts +129 -6
- package/lib/browser/components/conversation-scroll.js +431 -110
- package/lib/browser/components/dino.js +3 -3
- package/lib/browser/components/earlier-messages.d.ts +2 -1
- package/lib/browser/components/earlier-messages.js +2 -17
- package/lib/browser/components/editor-area.d.ts +3 -1
- package/lib/browser/components/editor-area.js +5 -4
- package/lib/browser/components/empty-pictures.d.ts +0 -2
- package/lib/browser/components/empty-pictures.js +0 -17
- package/lib/browser/components/folder-picker.d.ts +5 -2
- package/lib/browser/components/folder-picker.js +30 -9
- package/lib/browser/components/held-talk.d.ts +29 -0
- package/lib/browser/components/held-talk.js +79 -0
- package/lib/browser/components/host-view.d.ts +1 -1
- package/lib/browser/components/host-view.js +5 -5
- package/lib/browser/components/icon.d.ts +2 -2
- package/lib/browser/components/icon.js +7 -6
- package/lib/browser/components/image-viewer.d.ts +125 -0
- package/lib/browser/components/image-viewer.js +435 -0
- package/lib/browser/components/lightbox.d.ts +12 -0
- package/lib/browser/components/lightbox.js +60 -0
- package/lib/browser/components/markdown.d.ts +6 -2
- package/lib/browser/components/markdown.js +24 -10
- package/lib/browser/components/media.js +2 -11
- package/lib/browser/components/message-footer.d.ts +16 -2
- package/lib/browser/components/message-footer.js +31 -12
- package/lib/browser/components/message-list.d.ts +24 -3
- package/lib/browser/components/message-list.js +146 -16
- package/lib/browser/components/message-menu.d.ts +3 -1
- package/lib/browser/components/message-menu.js +17 -2
- package/lib/browser/components/nav-places.d.ts +16 -1
- package/lib/browser/components/nav-places.js +13 -3
- package/lib/browser/components/phone-shell.d.ts +4 -1
- package/lib/browser/components/phone-shell.js +3 -1
- package/lib/browser/components/run-status.js +3 -3
- package/lib/browser/components/select-bar.d.ts +10 -0
- package/lib/browser/components/select-bar.js +61 -0
- package/lib/browser/components/session-settings.d.ts +6 -0
- package/lib/browser/components/session-settings.js +14 -1
- package/lib/browser/components/session-view.js +7 -3
- package/lib/browser/components/settings-choices.d.ts +36 -0
- package/lib/browser/components/settings-choices.js +156 -0
- package/lib/browser/components/settings-parts.d.ts +22 -0
- package/lib/browser/components/settings-parts.js +359 -0
- package/lib/browser/components/settings-view.d.ts +0 -6
- package/lib/browser/components/settings-view.js +2 -405
- package/lib/browser/components/swipe-row.d.ts +2 -2
- package/lib/browser/components/swipe-row.js +7 -3
- package/lib/browser/components/tool-view.js +14 -12
- package/lib/browser/components/voice-button.d.ts +1 -1
- package/lib/browser/components/voice-button.js +1 -1
- package/lib/browser/components/voice-talk.d.ts +44 -0
- package/lib/browser/components/voice-talk.js +260 -0
- package/lib/browser/components/workbench-view.js +3 -3
- package/lib/browser/device/device.d.ts +3 -0
- package/lib/browser/device/device.js +11 -1
- package/lib/browser/device/hold.d.ts +43 -0
- package/lib/browser/device/hold.js +173 -0
- package/lib/browser/device/launch-screen.d.ts +1 -1
- package/lib/browser/device/launch-screen.js +1 -1
- package/lib/browser/device/long-press.d.ts +2 -0
- package/lib/browser/device/long-press.js +16 -1
- package/lib/browser/device/pull-down.d.ts +4 -2
- package/lib/browser/device/pull-down.js +63 -75
- package/lib/browser/device/row-swipe.d.ts +35 -10
- package/lib/browser/device/row-swipe.js +148 -70
- package/lib/browser/device/shake-undo.d.ts +17 -0
- package/lib/browser/device/shake-undo.js +63 -0
- package/lib/browser/device/sheet-swipe.d.ts +118 -18
- package/lib/browser/device/sheet-swipe.js +410 -108
- package/lib/browser/extension/icons.js +1 -0
- package/lib/browser/extension/web-extension-api.d.ts +135 -2
- package/lib/browser/extension/web-extension-code.d.ts +6 -0
- package/lib/browser/extension/web-extension-code.js +24 -0
- package/lib/browser/extension/web-extension-protocol.d.ts +23 -1
- package/lib/browser/extension/web-extension-protocol.js +9 -1
- package/lib/browser/extension/web-extensions.d.ts +14 -1
- package/lib/browser/extension/web-extensions.js +125 -21
- package/lib/browser/extension/web-tasks.d.ts +9 -1
- package/lib/browser/extension/web-tasks.js +24 -0
- package/lib/browser/files/files-protocol.d.ts +26 -0
- package/lib/browser/files/files-protocol.js +5 -0
- package/lib/browser/files/files.d.ts +36 -0
- package/lib/browser/files/files.js +122 -0
- package/lib/browser/hooks.d.ts +3 -1
- package/lib/browser/hooks.js +9 -0
- package/lib/browser/i18n/locales.d.ts +29 -2
- package/lib/browser/i18n/messages.d.ts +28 -1
- package/lib/browser/i18n/messages.js +58 -4
- package/lib/browser/index.d.ts +6 -0
- package/lib/browser/index.js +6 -0
- package/lib/browser/notices/notices-protocol.d.ts +9 -1
- package/lib/browser/notices/notices.d.ts +2 -0
- package/lib/browser/notices/notices.js +20 -10
- package/lib/browser/offline/device-values.d.ts +56 -0
- package/lib/browser/offline/device-values.js +148 -0
- package/lib/browser/offline/kept-chats-protocol.d.ts +18 -0
- package/lib/browser/offline/kept-chats-protocol.js +5 -0
- package/lib/browser/offline/kept-chats.d.ts +48 -0
- package/lib/browser/offline/kept-chats.js +149 -0
- package/lib/browser/offline/offline-reads.d.ts +45 -0
- package/lib/browser/offline/offline-reads.js +111 -0
- package/lib/browser/settings/settings-protocol.d.ts +2 -0
- package/lib/browser/settings/settings-protocol.js +2 -0
- package/lib/browser/style/conversation.d.ts +1 -1
- package/lib/browser/style/conversation.js +57 -17
- package/lib/browser/style/device.js +43 -4
- package/lib/browser/style/layout.d.ts +1 -1
- package/lib/browser/style/layout.js +67 -15
- package/lib/browser/style/pages.d.ts +1 -1
- package/lib/browser/style/pages.js +2 -1
- package/lib/browser/style/shell.d.ts +1 -1
- package/lib/browser/style/shell.js +47 -3
- package/lib/browser/style/tasks.d.ts +1 -1
- package/lib/browser/style/tasks.js +2 -0
- package/lib/browser/util/frame.d.ts +5 -4
- package/lib/browser/util/frame.js +5 -4
- package/lib/browser/util/markdown.d.ts +18 -1
- package/lib/browser/util/markdown.js +119 -5
- package/lib/browser/util/process.d.ts +21 -0
- package/lib/browser/util/process.js +46 -2
- package/lib/browser/util/voice.d.ts +5 -2
- package/lib/browser/util/voice.js +6 -3
- package/lib/browser/util/zoom.d.ts +47 -0
- package/lib/browser/util/zoom.js +99 -0
- package/lib/browser/workbench-calls.d.ts +60 -0
- package/lib/browser/workbench-calls.js +145 -0
- package/lib/browser/workbench-protocol.d.ts +5 -1
- package/lib/browser/workbench-util.d.ts +69 -0
- package/lib/browser/workbench-util.js +151 -0
- package/lib/browser/workbench.d.ts +15 -42
- package/lib/browser/workbench.js +74 -189
- package/package.json +10 -10
- package/public/launch.svg +46 -42
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.below = exports.right = exports.left = exports.LOGO_EYE = exports.LOGO_ARM = exports.LOGO_FRONT = exports.LOGO_BODY = exports.LOGO_PATH = exports.Outline = exports.n = exports.LEG = void 0;
|
|
4
|
+
exports.smooth = smooth;
|
|
5
|
+
exports.cut = cut;
|
|
6
|
+
exports.bones = bones;
|
|
7
|
+
exports.tones = tones;
|
|
8
|
+
exports.leg = leg;
|
|
9
|
+
exports.tube = tube;
|
|
10
|
+
/** The length of a leg of the logo, from the hip to the ground; rig() makes the legs of other kinds swing as far as it does. */
|
|
11
|
+
exports.LEG = 56;
|
|
12
|
+
function smooth(edge0, edge1, x) {
|
|
13
|
+
const t = Math.min(1, Math.max(0, (x - edge0) / (edge1 - edge0)));
|
|
14
|
+
return t * t * (3 - 2 * t);
|
|
15
|
+
}
|
|
16
|
+
const n = (value) => Math.round(value * 100) / 100;
|
|
17
|
+
exports.n = n;
|
|
18
|
+
var Outline;
|
|
19
|
+
(function (Outline) {
|
|
20
|
+
/**
|
|
21
|
+
* A closed outline through `keys`, as cubic Béziers that pass through each (Catmull-Rom); at a
|
|
22
|
+
* corner the curves on either side of it meet at an angle.
|
|
23
|
+
*/
|
|
24
|
+
function loop(keys) {
|
|
25
|
+
const at = (i) => keys[(i + keys.length) % keys.length];
|
|
26
|
+
let d = `M${(0, exports.n)(keys[0][0])} ${(0, exports.n)(keys[0][1])}`;
|
|
27
|
+
for (let i = 0; i < keys.length; i++) {
|
|
28
|
+
const [p0, p1, p2, p3] = [at(i - 1), at(i), at(i + 1), at(i + 2)];
|
|
29
|
+
const out = p1[2] ? [0, 0] : [(p2[0] - p0[0]) / 6, (p2[1] - p0[1]) / 6];
|
|
30
|
+
const into = p2[2] ? [0, 0] : [(p3[0] - p1[0]) / 6, (p3[1] - p1[1]) / 6];
|
|
31
|
+
d += `C${(0, exports.n)(p1[0] + out[0])} ${(0, exports.n)(p1[1] + out[1])} ${(0, exports.n)(p2[0] - into[0])} ${(0, exports.n)(p2[1] - into[1])} ${(0, exports.n)(p2[0])} ${(0, exports.n)(p2[1])}`;
|
|
32
|
+
}
|
|
33
|
+
return `${d}Z`;
|
|
34
|
+
}
|
|
35
|
+
Outline.loop = loop;
|
|
36
|
+
/** A circle as four curves, the hole of an eye. */
|
|
37
|
+
function circle(x, y, r) {
|
|
38
|
+
const k = r * 0.5523;
|
|
39
|
+
return (`M${(0, exports.n)(x + r)} ${(0, exports.n)(y)}C${(0, exports.n)(x + r)} ${(0, exports.n)(y + k)} ${(0, exports.n)(x + k)} ${(0, exports.n)(y + r)} ${(0, exports.n)(x)} ${(0, exports.n)(y + r)}` +
|
|
40
|
+
`C${(0, exports.n)(x - k)} ${(0, exports.n)(y + r)} ${(0, exports.n)(x - r)} ${(0, exports.n)(y + k)} ${(0, exports.n)(x - r)} ${(0, exports.n)(y)}` +
|
|
41
|
+
`C${(0, exports.n)(x - r)} ${(0, exports.n)(y - k)} ${(0, exports.n)(x - k)} ${(0, exports.n)(y - r)} ${(0, exports.n)(x)} ${(0, exports.n)(y - r)}` +
|
|
42
|
+
`C${(0, exports.n)(x + k)} ${(0, exports.n)(y - r)} ${(0, exports.n)(x + r)} ${(0, exports.n)(y - k)} ${(0, exports.n)(x + r)} ${(0, exports.n)(y)}Z`);
|
|
43
|
+
}
|
|
44
|
+
Outline.circle = circle;
|
|
45
|
+
})(Outline || (exports.Outline = Outline = {}));
|
|
46
|
+
/**
|
|
47
|
+
* Which side of a line a point is on, softly: 0 well before the line through `at`, 1 well past it
|
|
48
|
+
* in the direction `toward`, eased across `band` units on either side of it.
|
|
49
|
+
*/
|
|
50
|
+
function cut(at, toward, band) {
|
|
51
|
+
const length = Math.hypot(toward.x, toward.y);
|
|
52
|
+
const tx = toward.x / length;
|
|
53
|
+
const ty = toward.y / length;
|
|
54
|
+
return (x, y) => smooth(-band, band, (x - at.x) * tx + (y - at.y) * ty);
|
|
55
|
+
}
|
|
56
|
+
/** The bones of a kind as the sides of lines it is cut along: each bone where all its lines agree, the jaw within the head, the tip within the tail. */
|
|
57
|
+
function bones(cuts) {
|
|
58
|
+
const all = (sides, x, y) => sides.reduce((product, side) => product * side(x, y), 1);
|
|
59
|
+
return (x, y) => {
|
|
60
|
+
const head = all(cuts.head, x, y);
|
|
61
|
+
const jaw = head * all(cuts.jaw, x, y);
|
|
62
|
+
const tail = all(cuts.tail, x, y) * (1 - head);
|
|
63
|
+
const tip = tail * all(cuts.tip, x, y);
|
|
64
|
+
const back = all(cuts.back, x, y) * (1 - head - tail);
|
|
65
|
+
return { head: head - jaw, jaw, tail: tail - tip, tip, back, body: Math.max(0, 1 - head - tail - back) };
|
|
66
|
+
};
|
|
67
|
+
}
|
|
68
|
+
/** The outline of assets/logo.svg; dino-avatar.spec.ts keeps the two the same. */
|
|
69
|
+
exports.LOGO_PATH = 'M87.56 246.56C78.45 245.88 69.68 241.69 63.62 235.12C55.27 226.06 53.05 217.63 57.25 210.87C58.80 208.36 60.00 207.04 65.18 202.17C69.26 198.32 70.20 196.55 70.21 192.69C70.21 189.81 70.10 189.60 68.07 188.59C58.99 184.06 48.53 175.16 41.10 165.64C20.03 138.61 16.32 99.87 32.24 73.21C35.05 68.50 38.42 64.26 40.25 63.11C42.91 61.44 46.64 61.89 48.71 64.14C51.04 66.67 51.48 69.39 50.27 73.65C48.09 81.27 47.41 86.83 47.99 92.32C49.53 106.98 58.42 118.20 70.83 121.15C73.08 121.68 78.88 121.72 81.15 121.22C88.97 119.48 94.86 113.39 96.69 105.18C97.35 102.17 97.35 102.36 97.36 79.55C97.37 56.55 97.35 57.24 98.04 53.23C102.05 29.98 119.81 12.19 141.49 9.73C143.46 9.51 150.65 9.43 152.36 9.61C160.37 10.46 167.56 12.82 174.51 16.89C177.43 18.59 176.54 18.47 186.86 18.57C196.67 18.66 196.99 18.68 200.87 19.58C210.24 21.74 219.17 27.62 224.57 35.17C229.72 42.38 232.50 49.80 233.36 58.67C233.68 61.91 233.71 76.53 233.41 78.22C232.01 86.00 227.35 91.05 220.23 92.50C218.50 92.85 180.16 92.91 177.10 92.57C165.61 91.28 155.17 86.13 150.52 79.47C148.44 76.48 145.54 75.90 143.40 78.04C141.49 79.95 141.76 81.92 144.74 87.63C150.17 98.03 159.04 105.16 169.50 107.52C172.11 108.11 172.69 107.96 173.25 106.55C173.81 105.12 174.70 103.52 175.57 102.37C178.23 98.86 180.68 100.09 183.51 106.36C184.55 108.67 183.79 108.47 191.23 108.44C198.27 108.42 197.86 108.50 198.43 107.20C200.89 101.63 202.81 99.79 204.99 100.89C206.11 101.47 207.63 103.65 208.74 106.31C209.67 108.51 209.55 108.45 213.05 108.41C216.35 108.36 217.08 108.45 218.31 109.05C225.39 112.51 217.61 125.59 205.66 130.33C199.65 132.71 198.20 132.85 180.39 132.87C164.51 132.89 165.38 132.84 164.14 133.78C162.82 134.78 162.30 136.08 162.30 138.40C162.30 139.80 161.98 143.39 161.42 148.29C159.70 163.39 153.05 175.87 141.81 185.08C138.73 187.60 134.92 189.85 129.84 192.14C125.19 194.25 115.57 196.33 110.54 196.34C109.17 196.34 108.60 196.57 108.23 197.27C108.10 197.53 107.64 198.49 107.20 199.42C103.90 206.45 98.19 211.37 88.72 215.35C85.89 216.54 85.91 216.52 85.98 219.64C86.04 222.32 86.33 222.69 90.00 224.75C92.29 226.04 94.81 227.75 95.82 228.71C100.98 233.57 100.86 241.48 95.60 244.93C93.34 246.41 91.24 246.84 87.56 246.56ZM134.07 240.25C128.56 238.82 125.22 235.56 123.96 230.38C123.70 229.30 123.68 228.71 123.59 220.23C123.53 214.63 123.44 210.89 123.34 210.35C123.00 208.36 122.74 207.31 122.25 205.86C121.48 203.62 121.59 203.31 123.26 202.93C129.90 201.41 136.34 198.97 140.57 196.35C147.00 192.39 151.46 188.55 155.60 183.42C157.24 181.39 157.77 181.54 158.23 184.19C159.89 193.79 157.66 202.21 151.13 210.89C149.39 213.20 149.36 213.30 149.36 215.69C149.35 218.41 149.61 218.72 151.96 218.75C157.60 218.82 162.31 219.95 165.26 221.92C173.20 227.23 172.45 238.39 164.03 240.43C162.18 240.88 135.88 240.72 134.07 240.25ZM185.67 173.17C183.79 172.66 182.15 171.55 180.81 169.86C178.08 166.41 174.71 164.68 169.71 164.16C166.89 163.87 166.86 163.80 167.90 160.34C168.86 157.13 169.71 152.32 170.10 147.82C170.40 144.42 170.40 144.42 170.65 144.15C172.11 142.53 184.08 147.33 189.10 151.54C193.73 155.43 196.56 162.25 195.41 166.75C194.22 171.40 189.83 174.29 185.67 173.17ZM144.28 53.97C148.98 52.79 151.98 47.68 150.77 42.91C148.71 34.78 137.83 33.29 134.20 40.65C130.66 47.83 136.74 55.88 144.28 53.97Z';
|
|
70
|
+
[exports.LOGO_BODY, exports.LOGO_FRONT, exports.LOGO_ARM, exports.LOGO_EYE] = exports.LOGO_PATH.split(/(?<=Z)(?=M)/);
|
|
71
|
+
/** The colors of a kind from its own: lighter for what is lit, a little darker for the far side, darker still for the brow. */
|
|
72
|
+
function tones(skin) {
|
|
73
|
+
const rgb = [1, 3, 5].map(i => Number.parseInt(skin.slice(i, i + 2), 16));
|
|
74
|
+
const mix = (to, k) => `#${rgb
|
|
75
|
+
.map(c => Math.round(c + (to - c) * k)
|
|
76
|
+
.toString(16)
|
|
77
|
+
.padStart(2, '0'))
|
|
78
|
+
.join('')}`;
|
|
79
|
+
return { skin, lit: mix(255, 0.3), shade: mix(0, 0.12), ridge: mix(0, 0.38) };
|
|
80
|
+
}
|
|
81
|
+
/** A leg on its own, upright from `top` to the ground: its width, and how much its foot reaches forward. */
|
|
82
|
+
function leg(x, top, width, foot = 6, ground = 244) {
|
|
83
|
+
const mid = (top + ground) / 2;
|
|
84
|
+
return Outline.loop([
|
|
85
|
+
[x + width / 2, top - 4],
|
|
86
|
+
[x + width + 1, top + 4],
|
|
87
|
+
[x + width - 1, mid],
|
|
88
|
+
[x + width + foot, ground - 6],
|
|
89
|
+
[x + width + foot - 5, ground],
|
|
90
|
+
[x + 3, ground],
|
|
91
|
+
[x - 1, ground - 6],
|
|
92
|
+
[x + 1, mid],
|
|
93
|
+
[x - 1, top + 4],
|
|
94
|
+
]);
|
|
95
|
+
}
|
|
96
|
+
const left = (x, band) => cut({ x, y: 0 }, { x: -1, y: 0 }, band);
|
|
97
|
+
exports.left = left;
|
|
98
|
+
const right = (x, band) => cut({ x, y: 0 }, { x: 1, y: 0 }, band);
|
|
99
|
+
exports.right = right;
|
|
100
|
+
const below = (y, band) => cut({ x: 0, y }, { x: 0, y: 1 }, band);
|
|
101
|
+
exports.below = below;
|
|
102
|
+
/**
|
|
103
|
+
* The two sides of a body as long as a snake's, along its `spine` ([x, y, half its thickness] from the head
|
|
104
|
+
* on): the side to the right of the way the spine runs, and the other, both from the head on. `spikes` puts
|
|
105
|
+
* a spike on the other side (the back) between every two points of the spine from the second on.
|
|
106
|
+
*/
|
|
107
|
+
function tube(spine, spikes = 0) {
|
|
108
|
+
const front = [];
|
|
109
|
+
const back = [];
|
|
110
|
+
spine.forEach(([x, y, r], i) => {
|
|
111
|
+
const [px, py] = spine[Math.max(0, i - 1)];
|
|
112
|
+
const [nx, ny] = spine[Math.min(spine.length - 1, i + 1)];
|
|
113
|
+
const length = Math.hypot(nx - px, ny - py);
|
|
114
|
+
const ux = (ny - py) / length;
|
|
115
|
+
const uy = -(nx - px) / length;
|
|
116
|
+
front.push([x + r * ux, y + r * uy]);
|
|
117
|
+
back.push([x - r * ux, y - r * uy]);
|
|
118
|
+
if (spikes && i > 0 && i + 1 < spine.length) {
|
|
119
|
+
// A spike halfway to the next point, standing off the back.
|
|
120
|
+
const [mx, my, mr] = [(x + nx) / 2, (y + ny) / 2, (r + spine[i + 1][2]) / 2];
|
|
121
|
+
back.push([mx - (mr + spikes) * ux, my - (mr + spikes) * uy, 1]);
|
|
122
|
+
}
|
|
123
|
+
});
|
|
124
|
+
return { front, back };
|
|
125
|
+
}
|
|
126
|
+
//# sourceMappingURL=dino-shape.js.map
|
|
@@ -1,36 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
x: number;
|
|
3
|
-
y: number;
|
|
4
|
-
}
|
|
5
|
-
/** A point of an outline as drawn: [x, y], and a third 1 where the outline turns sharply there (a corner, the tip of a horn). */
|
|
6
|
-
export type Key = [number, number] | [number, number, 1];
|
|
7
|
-
/** The bones that bend the outline; the legs and arms drawn on their own are parts. */
|
|
8
|
-
export type Bone = 'body' | 'head' | 'jaw' | 'tail' | 'tip' | 'back';
|
|
9
|
-
/** A leg, an arm or a wing drawn on its own, which turns at its joint by an angle of the pose. */
|
|
10
|
-
export interface DinoPart {
|
|
11
|
-
d: string;
|
|
12
|
-
joint: Point;
|
|
13
|
-
swing: 'back' | 'front' | 'arm' | 'wing';
|
|
14
|
-
/** How high it is lifted, as a foot. */
|
|
15
|
-
lift?: 'backLift' | 'frontLift';
|
|
16
|
-
/** On the far side, drawn behind the body and darker; else on the near side, in front of it. */
|
|
17
|
-
far: boolean;
|
|
18
|
-
/** Its own color, not the skin's (or the shade's on the far side). */
|
|
19
|
-
fill?: string;
|
|
20
|
-
/** In front of the body, a gap of the page between the two, as the logo has by its arm. */
|
|
21
|
-
gap?: boolean;
|
|
22
|
-
}
|
|
23
|
-
export interface DinoColors {
|
|
24
|
-
skin: string;
|
|
25
|
-
/** The front of the head or the chest as it turns toward you. */
|
|
26
|
-
lit: string;
|
|
27
|
-
/** The parts on the far side. */
|
|
28
|
-
shade: string;
|
|
29
|
-
/** The ridge of the brow. */
|
|
30
|
-
ridge: string;
|
|
31
|
-
/** The skin from its top to its bottom, of a kind that shines; flat `skin` otherwise. */
|
|
32
|
-
sheen?: [string, string];
|
|
33
|
-
}
|
|
1
|
+
import { type Bone, type DinoColors, type DinoPart, type Point } from './dino-shape';
|
|
34
2
|
/**
|
|
35
3
|
* A kind of dinosaur. All of them stand on the line `feet` is on and face right, as the logo does, so
|
|
36
4
|
* that one pose (dino-motion.ts) moves any of them.
|
|
@@ -85,33 +53,6 @@ export interface DinoSpecies {
|
|
|
85
53
|
/** A kind for those who want the finest. */
|
|
86
54
|
premium?: boolean;
|
|
87
55
|
}
|
|
88
|
-
/** The length of a leg of the logo, from the hip to the ground; rig() makes the legs of other kinds swing as far as it does. */
|
|
89
|
-
export declare const LEG = 56;
|
|
90
|
-
export declare namespace Outline {
|
|
91
|
-
/**
|
|
92
|
-
* A closed outline through `keys`, as cubic Béziers that pass through each (Catmull-Rom); at a
|
|
93
|
-
* corner the curves on either side of it meet at an angle.
|
|
94
|
-
*/
|
|
95
|
-
function loop(keys: Key[]): string;
|
|
96
|
-
/** A circle as four curves, the hole of an eye. */
|
|
97
|
-
function circle(x: number, y: number, r: number): string;
|
|
98
|
-
}
|
|
99
|
-
/**
|
|
100
|
-
* Which side of a line a point is on, softly: 0 well before the line through `at`, 1 well past it
|
|
101
|
-
* in the direction `toward`, eased across `band` units on either side of it.
|
|
102
|
-
*/
|
|
103
|
-
export declare function cut(at: Point, toward: Point, band: number): (x: number, y: number) => number;
|
|
104
|
-
type Side = (x: number, y: number) => number;
|
|
105
|
-
/** The bones of a kind as the sides of lines it is cut along: each bone where all its lines agree, the jaw within the head, the tip within the tail. */
|
|
106
|
-
export declare function bones(cuts: {
|
|
107
|
-
head: Side[];
|
|
108
|
-
jaw: Side[];
|
|
109
|
-
tail: Side[];
|
|
110
|
-
tip: Side[];
|
|
111
|
-
back: Side[];
|
|
112
|
-
}): DinoSpecies['weights'];
|
|
113
|
-
/** The outline of assets/logo.svg; dino-avatar.spec.ts keeps the two the same. */
|
|
114
|
-
export declare const LOGO_PATH = "M87.56 246.56C78.45 245.88 69.68 241.69 63.62 235.12C55.27 226.06 53.05 217.63 57.25 210.87C58.80 208.36 60.00 207.04 65.18 202.17C69.26 198.32 70.20 196.55 70.21 192.69C70.21 189.81 70.10 189.60 68.07 188.59C58.99 184.06 48.53 175.16 41.10 165.64C20.03 138.61 16.32 99.87 32.24 73.21C35.05 68.50 38.42 64.26 40.25 63.11C42.91 61.44 46.64 61.89 48.71 64.14C51.04 66.67 51.48 69.39 50.27 73.65C48.09 81.27 47.41 86.83 47.99 92.32C49.53 106.98 58.42 118.20 70.83 121.15C73.08 121.68 78.88 121.72 81.15 121.22C88.97 119.48 94.86 113.39 96.69 105.18C97.35 102.17 97.35 102.36 97.36 79.55C97.37 56.55 97.35 57.24 98.04 53.23C102.05 29.98 119.81 12.19 141.49 9.73C143.46 9.51 150.65 9.43 152.36 9.61C160.37 10.46 167.56 12.82 174.51 16.89C177.43 18.59 176.54 18.47 186.86 18.57C196.67 18.66 196.99 18.68 200.87 19.58C210.24 21.74 219.17 27.62 224.57 35.17C229.72 42.38 232.50 49.80 233.36 58.67C233.68 61.91 233.71 76.53 233.41 78.22C232.01 86.00 227.35 91.05 220.23 92.50C218.50 92.85 180.16 92.91 177.10 92.57C165.61 91.28 155.17 86.13 150.52 79.47C148.44 76.48 145.54 75.90 143.40 78.04C141.49 79.95 141.76 81.92 144.74 87.63C150.17 98.03 159.04 105.16 169.50 107.52C172.11 108.11 172.69 107.96 173.25 106.55C173.81 105.12 174.70 103.52 175.57 102.37C178.23 98.86 180.68 100.09 183.51 106.36C184.55 108.67 183.79 108.47 191.23 108.44C198.27 108.42 197.86 108.50 198.43 107.20C200.89 101.63 202.81 99.79 204.99 100.89C206.11 101.47 207.63 103.65 208.74 106.31C209.67 108.51 209.55 108.45 213.05 108.41C216.35 108.36 217.08 108.45 218.31 109.05C225.39 112.51 217.61 125.59 205.66 130.33C199.65 132.71 198.20 132.85 180.39 132.87C164.51 132.89 165.38 132.84 164.14 133.78C162.82 134.78 162.30 136.08 162.30 138.40C162.30 139.80 161.98 143.39 161.42 148.29C159.70 163.39 153.05 175.87 141.81 185.08C138.73 187.60 134.92 189.85 129.84 192.14C125.19 194.25 115.57 196.33 110.54 196.34C109.17 196.34 108.60 196.57 108.23 197.27C108.10 197.53 107.64 198.49 107.20 199.42C103.90 206.45 98.19 211.37 88.72 215.35C85.89 216.54 85.91 216.52 85.98 219.64C86.04 222.32 86.33 222.69 90.00 224.75C92.29 226.04 94.81 227.75 95.82 228.71C100.98 233.57 100.86 241.48 95.60 244.93C93.34 246.41 91.24 246.84 87.56 246.56ZM134.07 240.25C128.56 238.82 125.22 235.56 123.96 230.38C123.70 229.30 123.68 228.71 123.59 220.23C123.53 214.63 123.44 210.89 123.34 210.35C123.00 208.36 122.74 207.31 122.25 205.86C121.48 203.62 121.59 203.31 123.26 202.93C129.90 201.41 136.34 198.97 140.57 196.35C147.00 192.39 151.46 188.55 155.60 183.42C157.24 181.39 157.77 181.54 158.23 184.19C159.89 193.79 157.66 202.21 151.13 210.89C149.39 213.20 149.36 213.30 149.36 215.69C149.35 218.41 149.61 218.72 151.96 218.75C157.60 218.82 162.31 219.95 165.26 221.92C173.20 227.23 172.45 238.39 164.03 240.43C162.18 240.88 135.88 240.72 134.07 240.25ZM185.67 173.17C183.79 172.66 182.15 171.55 180.81 169.86C178.08 166.41 174.71 164.68 169.71 164.16C166.89 163.87 166.86 163.80 167.90 160.34C168.86 157.13 169.71 152.32 170.10 147.82C170.40 144.42 170.40 144.42 170.65 144.15C172.11 142.53 184.08 147.33 189.10 151.54C193.73 155.43 196.56 162.25 195.41 166.75C194.22 171.40 189.83 174.29 185.67 173.17ZM144.28 53.97C148.98 52.79 151.98 47.68 150.77 42.91C148.71 34.78 137.83 33.29 134.20 40.65C130.66 47.83 136.74 55.88 144.28 53.97Z";
|
|
115
56
|
/** The kinds, in the order they are offered; the first is the logo, and the one ta is until the user picks another. */
|
|
116
57
|
export declare const SPECIES: readonly [DinoSpecies, DinoSpecies, DinoSpecies, DinoSpecies, DinoSpecies, DinoSpecies, DinoSpecies, DinoSpecies, DinoSpecies];
|
|
117
58
|
export type SpeciesId = 'trex' | 'triceratops' | 'stegosaurus' | 'brachiosaurus' | 'velociraptor' | 'ankylosaurus' | 'pteranodon' | 'parasaurolophus' | 'dragon';
|
|
@@ -120,5 +61,4 @@ export declare namespace DinoSpecies {
|
|
|
120
61
|
const IDS: SpeciesId[];
|
|
121
62
|
function of(id: string | undefined): DinoSpecies;
|
|
122
63
|
}
|
|
123
|
-
export {};
|
|
124
64
|
//# sourceMappingURL=dino-species.d.ts.map
|