@celljs/ta-web 4.13.1 → 4.15.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.
Files changed (149) hide show
  1. package/README.en.md +3 -3
  2. package/README.md +3 -3
  3. package/esm/browser/assistant/assistant-extension.js +3 -2
  4. package/esm/browser/assistant/assistant-initiative.js +1 -1
  5. package/esm/browser/assistant/assistant-state.js +2 -2
  6. package/esm/browser/components/access-view.js +3 -2
  7. package/esm/browser/components/account-menu.js +2 -2
  8. package/esm/browser/components/app-view.js +4 -0
  9. package/esm/browser/components/auth-view.d.ts +1 -1
  10. package/esm/browser/components/auth-view.js +38 -10
  11. package/esm/browser/components/chat-asks.d.ts +8 -0
  12. package/esm/browser/components/chat-asks.js +10 -0
  13. package/esm/browser/components/chat-list.js +11 -1
  14. package/esm/browser/components/composer-box.d.ts +2 -0
  15. package/esm/browser/components/composer-box.js +2 -1
  16. package/esm/browser/components/composer.d.ts +3 -1
  17. package/esm/browser/components/composer.js +16 -4
  18. package/esm/browser/components/custom-provider-advanced.d.ts +14 -0
  19. package/esm/browser/components/custom-provider-advanced.js +50 -0
  20. package/esm/browser/components/custom-provider-util.d.ts +38 -0
  21. package/esm/browser/components/custom-provider-util.js +103 -0
  22. package/esm/browser/components/custom-provider-view.d.ts +11 -0
  23. package/esm/browser/components/custom-provider-view.js +181 -0
  24. package/esm/browser/components/face.d.ts +13 -1
  25. package/esm/browser/components/face.js +16 -1
  26. package/esm/browser/components/host-view.d.ts +1 -1
  27. package/esm/browser/components/message-list.js +20 -1
  28. package/esm/browser/components/people.d.ts +32 -0
  29. package/esm/browser/components/people.js +71 -0
  30. package/esm/browser/components/session-view.d.ts +1 -1
  31. package/esm/browser/components/session-view.js +56 -36
  32. package/esm/browser/components/settings-choices.js +2 -3
  33. package/esm/browser/components/settings-controls.d.ts +7 -1
  34. package/esm/browser/components/settings-controls.js +8 -0
  35. package/esm/browser/components/settings-parts.js +25 -8
  36. package/esm/browser/components/sign-in-setup.d.ts +16 -0
  37. package/esm/browser/components/sign-in-setup.js +118 -0
  38. package/esm/browser/components/use-seen-chats.d.ts +2 -0
  39. package/esm/browser/components/use-seen-chats.js +2 -2
  40. package/esm/browser/editor/monaco-loader.js +7 -1
  41. package/esm/browser/extension/web-api-components.d.ts +12 -0
  42. package/esm/browser/extension/web-api-contributions.d.ts +3 -0
  43. package/esm/browser/extension/web-extension-api.d.ts +9 -2
  44. package/esm/browser/extension/web-extension-context.d.ts +2 -0
  45. package/esm/browser/extension/web-extension-context.js +19 -0
  46. package/esm/browser/game/game-loader.js +22 -2
  47. package/esm/browser/game/game3d-protocol.d.ts +13 -4
  48. package/esm/browser/i18n/locales.d.ts +90 -1
  49. package/esm/browser/i18n/locales.js +25 -1
  50. package/esm/browser/i18n/messages-ja.d.ts +2 -0
  51. package/esm/browser/i18n/messages-ja.js +972 -0
  52. package/esm/browser/i18n/messages-zh-tw.d.ts +3 -0
  53. package/esm/browser/i18n/messages-zh-tw.js +973 -0
  54. package/esm/browser/i18n/messages.d.ts +85 -0
  55. package/esm/browser/i18n/messages.js +171 -1
  56. package/esm/browser/i18n/use-t.js +3 -2
  57. package/esm/browser/presence/presence-reporter.d.ts +32 -0
  58. package/esm/browser/presence/presence-reporter.js +71 -0
  59. package/esm/browser/settings/settings-protocol.d.ts +3 -2
  60. package/esm/browser/settings/settings-protocol.js +4 -3
  61. package/esm/browser/style/conversation.d.ts +1 -1
  62. package/esm/browser/style/conversation.js +24 -0
  63. package/esm/browser/style/layout.d.ts +1 -1
  64. package/esm/browser/style/layout.js +8 -0
  65. package/esm/browser/style/pages.d.ts +1 -1
  66. package/esm/browser/style/pages.js +53 -1
  67. package/esm/browser/util/desktop.d.ts +12 -1
  68. package/esm/browser/util/desktop.js +14 -0
  69. package/esm/browser/util/voice.d.ts +20 -1
  70. package/esm/browser/util/voice.js +27 -11
  71. package/esm/browser/workbench-protocol.d.ts +9 -0
  72. package/esm/browser/workbench-util.d.ts +4 -0
  73. package/esm/browser/workbench-util.js +24 -1
  74. package/esm/browser/workbench.d.ts +3 -0
  75. package/esm/browser/workbench.js +14 -4
  76. package/lib/browser/assistant/assistant-extension.js +3 -2
  77. package/lib/browser/assistant/assistant-initiative.js +1 -1
  78. package/lib/browser/assistant/assistant-state.js +1 -1
  79. package/lib/browser/components/access-view.js +3 -2
  80. package/lib/browser/components/account-menu.js +2 -2
  81. package/lib/browser/components/app-view.js +4 -0
  82. package/lib/browser/components/auth-view.d.ts +1 -1
  83. package/lib/browser/components/auth-view.js +37 -9
  84. package/lib/browser/components/chat-asks.d.ts +8 -0
  85. package/lib/browser/components/chat-asks.js +10 -0
  86. package/lib/browser/components/chat-list.js +11 -1
  87. package/lib/browser/components/composer-box.d.ts +2 -0
  88. package/lib/browser/components/composer-box.js +2 -1
  89. package/lib/browser/components/composer.d.ts +3 -1
  90. package/lib/browser/components/composer.js +16 -4
  91. package/lib/browser/components/custom-provider-advanced.d.ts +15 -0
  92. package/lib/browser/components/custom-provider-advanced.js +86 -0
  93. package/lib/browser/components/custom-provider-util.d.ts +39 -0
  94. package/lib/browser/components/custom-provider-util.js +106 -0
  95. package/lib/browser/components/custom-provider-view.d.ts +12 -0
  96. package/lib/browser/components/custom-provider-view.js +217 -0
  97. package/lib/browser/components/face.d.ts +13 -1
  98. package/lib/browser/components/face.js +16 -1
  99. package/lib/browser/components/host-view.d.ts +1 -1
  100. package/lib/browser/components/message-list.js +19 -0
  101. package/lib/browser/components/people.d.ts +33 -0
  102. package/lib/browser/components/people.js +109 -0
  103. package/lib/browser/components/session-view.d.ts +1 -1
  104. package/lib/browser/components/session-view.js +56 -36
  105. package/lib/browser/components/settings-choices.js +1 -2
  106. package/lib/browser/components/settings-controls.d.ts +7 -1
  107. package/lib/browser/components/settings-controls.js +9 -0
  108. package/lib/browser/components/settings-parts.js +24 -7
  109. package/lib/browser/components/sign-in-setup.d.ts +17 -0
  110. package/lib/browser/components/sign-in-setup.js +155 -0
  111. package/lib/browser/components/use-seen-chats.d.ts +2 -0
  112. package/lib/browser/components/use-seen-chats.js +3 -2
  113. package/lib/browser/editor/monaco-loader.js +7 -1
  114. package/lib/browser/extension/web-api-components.d.ts +12 -0
  115. package/lib/browser/extension/web-api-contributions.d.ts +3 -0
  116. package/lib/browser/extension/web-extension-api.d.ts +9 -2
  117. package/lib/browser/extension/web-extension-context.d.ts +2 -0
  118. package/lib/browser/extension/web-extension-context.js +19 -0
  119. package/lib/browser/game/game-loader.js +22 -2
  120. package/lib/browser/game/game3d-protocol.d.ts +13 -4
  121. package/lib/browser/i18n/locales.d.ts +90 -1
  122. package/lib/browser/i18n/locales.js +25 -1
  123. package/lib/browser/i18n/messages-ja.d.ts +3 -0
  124. package/lib/browser/i18n/messages-ja.js +975 -0
  125. package/lib/browser/i18n/messages-zh-tw.d.ts +4 -0
  126. package/lib/browser/i18n/messages-zh-tw.js +976 -0
  127. package/lib/browser/i18n/messages.d.ts +85 -0
  128. package/lib/browser/i18n/messages.js +174 -2
  129. package/lib/browser/i18n/use-t.js +2 -1
  130. package/lib/browser/presence/presence-reporter.d.ts +33 -0
  131. package/lib/browser/presence/presence-reporter.js +75 -0
  132. package/lib/browser/settings/settings-protocol.d.ts +3 -2
  133. package/lib/browser/settings/settings-protocol.js +4 -3
  134. package/lib/browser/style/conversation.d.ts +1 -1
  135. package/lib/browser/style/conversation.js +24 -0
  136. package/lib/browser/style/layout.d.ts +1 -1
  137. package/lib/browser/style/layout.js +8 -0
  138. package/lib/browser/style/pages.d.ts +1 -1
  139. package/lib/browser/style/pages.js +53 -1
  140. package/lib/browser/util/desktop.d.ts +12 -1
  141. package/lib/browser/util/desktop.js +14 -0
  142. package/lib/browser/util/voice.d.ts +20 -1
  143. package/lib/browser/util/voice.js +27 -11
  144. package/lib/browser/workbench-protocol.d.ts +9 -0
  145. package/lib/browser/workbench-util.d.ts +4 -0
  146. package/lib/browser/workbench-util.js +24 -1
  147. package/lib/browser/workbench.d.ts +3 -0
  148. package/lib/browser/workbench.js +14 -4
  149. package/package.json +10 -10
@@ -470,6 +470,12 @@ exports.LAYOUT_STYLE = `
470
470
  .ta-chat-dir { display: inline-flex; align-items: center; gap: 4px; max-width: 100%; vertical-align: top; }
471
471
  .ta-chat-dir > svg { flex: none; }
472
472
  .ta-chat-flag { margin-right: 3px; }
473
+ .ta-chat-flag.ta-replying { color: var(--ta-secondary); }
474
+ .ta-chat-line > .ta-people { margin-left: 4px; }
475
+ /* Out of the way of the button that takes a row out, as its words are. */
476
+ .ta-chat-row:hover .ta-chat-item:not(.ta-compact) .ta-chat-line > .ta-people:last-child { margin-right: 28px; }
477
+ .ta-chat-line .ta-people-face { box-shadow: none; background: none; }
478
+ .ta-chat-line .ta-people-face + .ta-people-face { margin-left: -3px; }
473
479
  .ta-chat-flag.ta-failed { color: color-mix(in srgb, var(--ta-red) 85%, var(--ta-muted)); }
474
480
  .ta-chat-flag.ta-waiting, .ta-chat-state.ta-waiting { color: color-mix(in srgb, var(--ta-blue) 85%, var(--ta-muted)); }
475
481
  /* Its directory, in place of its time while the pointer is on it. */
@@ -537,6 +543,7 @@ exports.LAYOUT_STYLE = `
537
543
  .ta-modal-head { display: flex; align-items: center; justify-content: space-between; padding-left: 2px; }
538
544
  .ta-modal-title { font-size: calc(14px * var(--ta-font-scale)); font-weight: 600; }
539
545
  .ta-web-dialog { width: min(480px, 100%); gap: 14px; padding: 16px 18px 18px; }
546
+ .ta-web-dialog > :not(.ta-modal-head) { min-height: 0; overflow-y: auto; }
540
547
  .ta-web-dialog .ta-modal-title { font-size: calc(16px * var(--ta-font-scale)); }
541
548
  .ta-folder-bar { display: flex; align-items: center; gap: 6px; }
542
549
  .ta-folder-bar .ta-field input { font-family: var(--ta-mono); font-size: calc(12.5px * var(--ta-font-scale)); }
@@ -598,6 +605,7 @@ body:has(.ta-folder) .ta-remote-status { display: none; }
598
605
  .ta-thread-item.ta-settled { content-visibility: auto; }
599
606
  /* Above the messages while the earlier ones of a long conversation load, as it is scrolled up. */
600
607
  .ta-earlier { display: flex; justify-content: center; padding: 12px 0; }
608
+ .ta-earlier-idle .ta-spinner { visibility: hidden; animation: none; }
601
609
 
602
610
  /* Model accounts: the sign-in page, the dialog and a sign-in under way */
603
611
  .ta-login-card { width: min(460px, 100%); display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; }
@@ -1,3 +1,3 @@
1
1
  /** The settings page, the menus of the account, the lists of Discover and Me, and the fade of what streams in. */
2
- export declare const PAGES_STYLE = "\n/* The settings: a page of the main area, a table of contents in two levels beside the sections */\n.ta-settings-page { flex: 1; min-height: 0; display: flex; flex-direction: column; }\n.ta-settings-head { justify-content: flex-start; gap: 10px; border-bottom: 1px solid var(--ta-border-muted); }\n.ta-settings-title { flex: none; font-size: calc(14px * var(--ta-font-scale)); font-weight: 600; padding-left: 8px; }\n.ta-settings-search { flex: 1; max-width: 420px; height: 32px; margin: 0 auto; display: flex; align-items: center; gap: 6px; color: var(--ta-muted); }\n.ta-settings-search input { color: var(--ta-text); }\n.ta-settings-search .ta-icon-button { width: 22px; height: 22px; }\n.ta-settings-body { flex: 1; min-height: 0; display: flex; }\n.ta-settings-toc { flex: none; width: 200px; overflow-y: auto; padding: 14px 10px; display: flex; flex-direction: column; gap: 14px; border-right: 1px solid var(--ta-border-muted); }\n.ta-settings-toc-part { display: flex; flex-direction: column; gap: 1px; }\n.ta-settings-toc-group { border: 0; background: none; text-align: left; padding: 2px 10px 4px; font-size: calc(12px * var(--ta-font-scale)); font-weight: 600; color: var(--ta-muted); }\n.ta-settings-toc-group:hover { color: var(--ta-text); }\n.ta-settings-toc-item { display: flex; align-items: center; gap: 8px; height: 30px; padding: 0 10px; border: 0; border-radius: 7px; background: none; text-align: left; font-size: calc(13px * var(--ta-font-scale)); color: var(--ta-secondary); transition: background 120ms, color 120ms; }\n.ta-settings-toc-item .ta-icon { flex: none; color: var(--ta-muted); }\n.ta-settings-toc-item:hover { background: var(--ta-hover); color: var(--ta-text); }\n.ta-settings-toc-item.ta-active { background: var(--ta-selected); color: var(--ta-text); font-weight: 500; }\n.ta-settings-scroll { flex: 1; min-width: 0; overflow-y: auto; scroll-padding-top: 16px; }\n.ta-settings-content { max-width: 720px; margin: 0 auto; padding: 18px 24px calc(48px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 28px; }\n.ta-settings-content:has(> .ta-empty) { min-height: 100%; box-sizing: border-box; }\n.ta-settings-part { display: flex; flex-direction: column; gap: 18px; }\n.ta-settings-part-title { margin: 0; display: flex; align-items: baseline; gap: 10px; font-size: calc(18px * var(--ta-font-scale)); font-weight: 650; letter-spacing: -0.01em; }\n.ta-settings-part-hint { font-size: calc(12px * var(--ta-font-scale)); font-weight: 400; color: var(--ta-muted); }\n.ta-settings-scope { display: flex; flex-direction: column; gap: 6px; }\n.ta-settings-tabs { display: flex; gap: 2px; padding: 3px; border-radius: 10px; background: var(--ta-raised); align-self: flex-start; max-width: 100%; }\n.ta-settings-tab { height: 28px; padding: 0 12px; border: 0; border-radius: 7px; background: none; color: var(--ta-secondary); font-size: calc(12.5px * var(--ta-font-scale)); font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 260px; }\n.ta-settings-tab:hover { color: var(--ta-text); }\n.ta-settings-tab.ta-active { background: var(--ta-segment); color: var(--ta-text); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2), 0 0 0 1px var(--ta-border); }\n.ta-settings-file { padding: 0 4px; font-size: calc(12px * var(--ta-font-scale)); color: var(--ta-muted); overflow-wrap: anywhere; }\n.ta-settings-note { padding: 10px 14px; border-radius: 10px; border: 1px dashed var(--ta-border); font-size: calc(12.5px * var(--ta-font-scale)); color: var(--ta-secondary); }\n.ta-setting-row { position: relative; }\n.ta-setting-row.ta-modified::before { content: ''; position: absolute; left: 0; top: 10px; bottom: 10px; width: 2px; border-radius: 0 2px 2px 0; background: var(--ta-blue); }\n.ta-setting-control { gap: 6px; }\n.ta-setting-reset { width: 26px; height: 26px; }\n.ta-setting-row:not(:hover):not(:focus-within) .ta-setting-reset { opacity: 0; }\n.ta-setting-row:not(.ta-stacked) > .ta-setting-text { flex: 1 1 240px; }\n.ta-setting-row:not(.ta-stacked):has(> .ta-setting-icon) > .ta-setting-text { flex-basis: 160px; }\n.ta-setting-row:not(.ta-stacked) { flex-wrap: wrap; row-gap: 8px; }\n.ta-select, .ta-setting-input, .ta-setting-control .ta-model-field { width: 200px; height: 30px; font-size: calc(12.5px * var(--ta-font-scale)); padding: 0 8px; }\n.ta-select { appearance: auto; cursor: pointer; }\n.ta-setting-input::placeholder { color: var(--ta-muted); }\n/* The settings of a phone (PhoneSettings): the sections listed as Me's rows, each a page of grouped rows. */\n.ta-head-balance { flex: none; width: 32px; }\n.ta-settings-phone > .ta-list-head { padding-left: calc(6px + env(safe-area-inset-left)); padding-right: calc(6px + env(safe-area-inset-right)); }\n.ta-settings-phone .ta-list-content { gap: 20px; padding-left: calc(12px + env(safe-area-inset-left)); padding-right: calc(12px + env(safe-area-inset-right)); }\n.ta-settings-phone .ta-settings-search { flex: none; max-width: none; height: 38px; margin: 0; padding: 0 10px; border-radius: 10px; border-color: var(--ta-border-muted); background: var(--ta-list-cell); font-size: calc(15px * var(--ta-font-scale)); }\n.ta-settings-phone-group { display: flex; flex-direction: column; gap: 6px; }\n.ta-settings-phone-caption { margin: 0 4px; font-size: calc(13px * var(--ta-font-scale)); font-weight: 500; color: var(--ta-muted); }\n.ta-settings-phone .ta-setting-card { border-radius: 12px; border-color: var(--ta-border-muted); background: var(--ta-list-cell); }\n.ta-settings-phone .ta-setting-row { min-height: 52px; padding: 12px 16px; gap: 12px; }\n.ta-settings-phone .ta-setting-row:not(.ta-stacked) > .ta-setting-text { flex: 1 1 0; }\n.ta-settings-phone .ta-setting-label { font-size: calc(15px * var(--ta-font-scale)); font-weight: 400; }\n.ta-settings-phone .ta-setting-description { margin-top: 2px; font-size: calc(13px * var(--ta-font-scale)); line-height: 1.4; }\n.ta-settings-phone .ta-setting-row.ta-stacked { gap: 10px; }\n.ta-settings-phone .ta-segmented button { height: 32px; }\n.ta-settings-phone .ta-settings-note { border-radius: 12px; }\n.ta-keys { display: inline-flex; gap: 3px; flex: none; }\n.ta-kbd { min-width: 20px; height: 20px; padding: 0 5px; display: inline-grid; place-items: center; border-radius: 5px; border: 1px solid var(--ta-border); border-bottom-width: 2px; background: var(--ta-raised); font: 500 calc(11px * var(--ta-font-scale)) var(--ta-sans); color: var(--ta-secondary); }\n\n/* The menus of the account at the foot of the rail */\n.ta-account-menu .ta-account-item { width: 100%; }\n.ta-account-menu .ta-account-item.ta-on { background: var(--ta-hover); }\n.ta-account-menu .ta-account-item:focus-visible { outline: 1px solid var(--ta-border-focus); outline-offset: -1px; }\n.ta-menu-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }\n.ta-menu-chevron { color: var(--ta-muted) !important; }\n.ta-menu-check { width: 15px; flex: none; display: grid; place-items: center; color: var(--ta-text); }\n.ta-account-menu .ta-kbd { height: 18px; min-width: 18px; font-size: calc(10.5px * var(--ta-font-scale)); }\n.ta-submenu-anchor { position: relative; }\n.ta-submenu { left: calc(100% + 8px); bottom: auto; top: -6px; width: 180px; }\n@media (max-width: 860px), (max-height: 500px) and (pointer: coarse) {\n .ta-settings-toc { display: none; }\n .ta-settings-content { padding: 14px 14px calc(32px + env(safe-area-inset-bottom)); }\n /* No table of contents: the last section, jumped to from the menu of the account, still scrolls to the top. */\n .ta-settings-scroll { container-type: size; }\n .ta-settings-part:last-child > .ta-setting-section:last-child { min-height: calc(100cqh - 48px - env(safe-area-inset-bottom)); }\n .ta-settings-title { padding-left: 0; }\n .ta-settings-search { margin: 0; }\n .ta-setting-row:has(.ta-select, .ta-setting-input, .ta-model-field) .ta-setting-control { width: 100%; }\n .ta-setting-row .ta-select, .ta-setting-row .ta-setting-input, .ta-setting-row .ta-model-field { flex: 1; width: auto; min-width: 0; }\n .ta-setting-reset { opacity: 1 !important; }\n .ta-submenu { left: 12px; right: auto; top: auto; bottom: calc(100% + 4px); width: 200px; }\n}\n/* Discover and Me: rows in rounded groups, as the settings of a phone (list-rows.tsx) */\n.ta-list-page { flex: 1; min-height: 0; display: flex; flex-direction: column; --ta-list-bg: var(--ta-main); --ta-list-cell: var(--ta-side); background: var(--ta-list-bg); }\n:root[data-theme='light'] .ta-list-page { --ta-list-bg: var(--ta-side); --ta-list-cell: var(--ta-card); }\n.ta-list-head { border-bottom: 1px solid var(--ta-border-muted); }\n.ta-list-scroll { flex: 1; min-height: 0; overflow-y: auto; }\n.ta-list-content { max-width: 640px; margin: 0 auto; padding: 20px 20px calc(32px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 16px; }\n.ta-list-group { display: flex; flex-direction: column; border-radius: 12px; border: 1px solid var(--ta-border-muted); background: var(--ta-list-cell); overflow: hidden; }\n.ta-list-row { position: relative; display: flex; align-items: center; min-height: 48px; }\n.ta-list-row + .ta-list-row::before { content: ''; position: absolute; top: 0; right: 0; left: 46px; height: 1px; background: var(--ta-border-muted); }\n.ta-list-main { flex: 1; min-width: 0; align-self: stretch; display: flex; align-items: center; gap: 12px; padding: 0 14px; border: 0; background: none; text-align: left; font-size: calc(14.5px * var(--ta-font-scale)); color: var(--ta-text); transition: background 120ms; }\n.ta-list-main:hover { background: var(--ta-hover); }\n.ta-list-main:focus-visible { outline: 1px solid var(--ta-border-focus); outline-offset: -1px; }\n.ta-list-icon { flex: none; color: var(--ta-secondary); }\n.ta-list-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }\n.ta-list-detail { flex: none; max-width: 45%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: calc(13.5px * var(--ta-font-scale)); color: var(--ta-muted); }\n.ta-list-chevron { flex: none; color: var(--ta-muted); }\n/* In place of the chevron while the page opens: as wide. */\n.ta-list-busy { margin: 0 1.5px; }\n.ta-list-trailing { flex: none; margin-right: 8px; color: var(--ta-muted); }\n/* WebView.mark of a page under Discover: before its pin, as WeChat shows who posted last by Moments. */\n.ta-list-mark { flex: none; display: inline-flex; align-items: center; margin-right: 2px; pointer-events: none; }\n.ta-list-row.ta-action .ta-list-main { justify-content: center; }\n.ta-list-row.ta-action .ta-list-label { flex: none; }\n.ta-list-row.ta-danger .ta-list-main { color: var(--ta-red); }\n.ta-list-row.ta-danger + .ta-list-row::before, .ta-list-row + .ta-list-row.ta-danger::before { left: 0; }\n.ta-list-hint { margin: -6px 4px 0; font-size: calc(12.5px * var(--ta-font-scale)); color: var(--ta-muted); }\n.ta-me-card { display: flex; align-items: center; gap: 14px; width: 100%; padding: 18px 16px; border-radius: 12px; border: 1px solid var(--ta-border-muted); background: var(--ta-list-cell); font: inherit; text-align: left; color: inherit; transition: background 120ms; }\n.ta-me-card:hover, .ta-me-card:active { background: var(--ta-hover); }\n.ta-me-card:focus-visible { outline: 1px solid var(--ta-border-focus); outline-offset: -1px; }\n.ta-account-figure.ta-me-figure { border-radius: 16px; }\n.ta-me-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; line-height: 1.35; }\n.ta-me-name { font-size: calc(18px * var(--ta-font-scale)); font-weight: 650; color: var(--ta-text); }\n.ta-me-host { font-size: calc(13px * var(--ta-font-scale)); color: var(--ta-secondary); }\n.ta-me-state { display: flex; align-items: center; gap: 6px; font-size: calc(12.5px * var(--ta-font-scale)); color: var(--ta-muted); font-variant-numeric: tabular-nums; }\n/* The computers of this device (host-view.tsx): rows as the conversations, a sheet from the bottom on a phone */\n.ta-hosts-dialog { width: min(420px, 100%); gap: 12px; }\n.ta-hosts-dialog .ta-modal-title { font-size: calc(16px * var(--ta-font-scale)); }\n.ta-host-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }\n.ta-host-row { border-radius: 12px; --ta-swipe-bg: var(--ta-card); }\n.ta-host-item { width: 100%; display: flex; align-items: center; gap: 12px; padding: 9px 10px; border: 0; border-radius: 12px; background: var(--ta-card); font: inherit; text-align: left; color: var(--ta-text); transition: background 120ms; }\n.ta-host-item:hover, .ta-host-item:active { background: var(--ta-hover); }\n.ta-host-row.ta-selected .ta-host-item { background: var(--ta-selected); }\n.ta-host-item:focus-visible { outline: 1px solid var(--ta-border-focus); outline-offset: -1px; }\n.ta-host-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; line-height: 1.35; }\n.ta-host-name { font-size: calc(14.5px * var(--ta-font-scale)); font-weight: 600; }\n.ta-host-detail { font-size: calc(12.5px * var(--ta-font-scale)); color: var(--ta-muted); }\n.ta-host-check { flex: none; color: var(--ta-green); }\n.ta-host-actions { display: flex; gap: 8px; }\n.ta-host-actions .ta-button { flex: 1; height: 40px; justify-content: center; gap: 6px; }\n.ta-host-form { display: flex; gap: 8px; width: 100%; animation: ta-in 200ms var(--ta-ease) both; }\n.ta-host-form .ta-field { flex: 1; height: 40px; }\n.ta-host-form .ta-button { height: 40px; min-width: 72px; justify-content: center; }\n.ta-scan-button { height: 46px; gap: 8px; font-size: calc(15px * var(--ta-font-scale)); justify-content: center; }\n.ta-link-button { padding: 4px 8px; border: 0; background: none; font: inherit; font-size: calc(13.5px * var(--ta-font-scale)); color: var(--ta-secondary); }\n.ta-link-button:hover { color: var(--ta-text); }\n.ta-host-saved { width: 100%; margin-top: 12px; display: flex; flex-direction: column; gap: 6px; text-align: left; animation: ta-in 260ms var(--ta-ease) both; }\n.ta-host-saved h2 { margin: 0 4px; font-size: calc(12.5px * var(--ta-font-scale)); font-weight: 500; color: var(--ta-muted); }\n.ta-signin .ta-host-item { background: var(--ta-main); }\n.ta-signin .ta-host-item:hover, .ta-signin .ta-host-item:active { background: var(--ta-hover); }\n.ta-sign-in-accounts { display: flex; flex-direction: column; gap: 8px; width: 100%; animation: ta-in 200ms var(--ta-ease) both; }\n.ta-sign-in-account { height: 42px; gap: 8px; text-decoration: none; font-size: calc(14.5px * var(--ta-font-scale)); }\n.ta-sign-in-account:hover { background: var(--ta-hover); }\n.ta-sign-in-account[aria-busy='true'] { pointer-events: none; opacity: 0.7; }\n.ta-sign-in-mark { flex: none; }\n.ta-sign-in-or { display: flex; align-items: center; gap: 10px; margin: 4px 0; color: var(--ta-muted); font-size: calc(12.5px * var(--ta-font-scale)); }\n.ta-sign-in-or::before, .ta-sign-in-or::after { content: ''; flex: 1; height: 1px; background: var(--ta-border); }\n.ta-access-account { display: inline-flex; align-items: center; gap: 8px; min-width: 0; max-width: 100%; }\n.ta-access-avatar { width: 22px; height: 22px; flex: none; border-radius: 50%; object-fit: cover; }\n.ta-access-avatar.ta-chat-avatar { font-size: calc(11px * var(--ta-font-scale)); }\n.ta-access-bind { display: flex; flex-wrap: wrap; gap: 8px; }\n.ta-environment-chooser { display: flex; flex-direction: column; gap: 10px; width: 100%; text-align: left; }\n.ta-environment-own { display: flex; flex-direction: column; gap: 8px; animation: ta-in 200ms var(--ta-ease) both; }\n.ta-environment-own .ta-button { align-self: flex-end; }\n.ta-environment-hint { margin: 0; color: var(--ta-muted); font-size: calc(12.5px * var(--ta-font-scale)); line-height: 1.5; }\n.ta-environment-card { gap: 14px; }\n/* While the page loads again for another computer: which one, at once, over all. */\n.ta-switching { position: fixed; inset: 0; z-index: 90; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; background: var(--ta-main); color: var(--ta-secondary); font-size: calc(14px * var(--ta-font-scale)); animation: ta-fade 140ms ease-out both; }\n/* Me has no head: the card under the status bar. */\n.ta-me .ta-list-content { padding-top: calc(20px + env(safe-area-inset-top)); }\n@media (max-width: 860px), (max-height: 500px) and (pointer: coarse) {\n .ta-list-content { padding: 14px 12px calc(24px + env(safe-area-inset-bottom)); }\n .ta-me .ta-list-content { padding-top: calc(14px + env(safe-area-inset-top)); }\n}\n\n/* Streaming: what comes in fades in where it will stay; nothing already shown moves or draws again. */\n.ta-thread-new { animation: ta-in 220ms var(--ta-ease); }\n/* Words ta said on the way move from the reply into the steps when a tool follows them: they were on the screen, so they do not fade in again. */\n.ta-turn-live > .ta-markdown > *, .ta-process-active .ta-process-steps > :not(.ta-more, .ta-step-text), .ta-turn-live .ta-turn-head > .ta-process-head, .ta-turn-live .ta-turn-head > .ta-run-status { animation: ta-fade 240ms ease-out; }\n.ta-run-line { animation: ta-fade 200ms ease-out; }\n.ta-scroll { overflow-anchor: none; }\n/* The scroll bar held while a reply comes in: the thread keeps its height (ConversationScroller), what grows past it waits. */\n.ta-scroll-held { overflow-y: clip; }\n.ta-scroll-held > * { flex-shrink: 0; }\n/* The look of the double: it walks above, the kinds of dinosaur below, then the ways it walks */\n.ta-look { display: flex; flex-direction: column; gap: 10px; min-height: 0; overflow-y: auto; }\n.ta-look-stage { height: 120px; flex: none; display: grid; grid-template-columns: 88px minmax(0, 1fr); gap: 8px; }\n.ta-look-figure, .ta-look-walk { border-radius: 12px; background: var(--ta-raised); display: grid; place-items: center; }\n/* Wide enough for the walk to and fro (half the width of the dinosaur to either side of the middle, and itself). */\n.ta-look-walk { min-width: 220px; overflow: hidden; }\n.ta-look-label { font-size: calc(12px * var(--ta-font-scale)); font-weight: 600; color: var(--ta-secondary); }\n.ta-look-kinds { margin: 0; padding: 0; border: 0; min-width: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 6px; }\n.ta-look-kind { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 4px 7px; border: 1px solid var(--ta-border-muted); border-radius: 12px; background: transparent; color: var(--ta-text); font-size: calc(12px * var(--ta-font-scale)); transition: background 120ms, border-color 120ms; }\n.ta-look-kind:hover { background: var(--ta-hover); }\n.ta-look-kind.ta-on { border-color: var(--ta-green); background: color-mix(in srgb, var(--ta-green) 8%, transparent); }\n.ta-look-name { max-width: 100%; }\n/* The voice replies are read with: its list, and a button to listen to it. */\n.ta-voice-picker { display: flex; align-items: center; gap: 8px; width: 100%; }\n.ta-voice-picker .ta-select { flex: 1; min-width: 0; }\n.ta-voice-picker .ta-button { flex: none; }\n.ta-look-premium { position: absolute; top: 4px; left: 4px; display: inline-flex; align-items: center; gap: 2px; padding: 1px 5px; border-radius: 8px; background: linear-gradient(135deg, #FCD866, #D98E14); color: #4a2c00; font-size: calc(10px * var(--ta-font-scale)); font-weight: 600; line-height: calc(14px * var(--ta-font-scale)); }\n/* Scan, as WeChat's: the camera over everything, a green glow sweeping down, round buttons on it; a photo for Ta asks on a sheet. */\n.ta-scan { position: fixed; inset: 0; z-index: 55; overflow: hidden; background: #000; color: #fff; animation: ta-fade 160ms ease-out; -webkit-user-select: none; user-select: none; }\n.ta-scan-video, .ta-scan-photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }\n.ta-scan-mirrored { transform: scaleX(-1); }\n.ta-scan-line { position: absolute; left: 0; right: 0; top: 16%; height: 22%; pointer-events: none; background: linear-gradient(to bottom, transparent, color-mix(in srgb, var(--ta-green) 40%, transparent) 88%, color-mix(in srgb, var(--ta-green) 90%, transparent) 100%); -webkit-mask-image: radial-gradient(ellipse 60% 100% at 50% 100%, #000 30%, transparent 100%); mask-image: radial-gradient(ellipse 60% 100% at 50% 100%, #000 30%, transparent 100%); animation: ta-scan-sweep 2.6s cubic-bezier(0.45, 0, 0.55, 1) infinite; }\n@keyframes ta-scan-sweep { 0% { transform: translateY(0); opacity: 0; } 12% { opacity: 1; } 80% { opacity: 1; } 100% { transform: translateY(220%); opacity: 0; } }\n.ta-scan-dot { position: absolute; width: 30px; height: 30px; margin: -15px 0 0 -15px; border-radius: 50%; border: 3px solid #fff; background: var(--ta-green); box-shadow: 0 2px 12px rgba(0, 0, 0, 0.35); animation: ta-scan-pop 260ms var(--ta-ease) both; }\n@keyframes ta-scan-pop { from { transform: scale(0.3); opacity: 0; } }\n.ta-scan-problem { position: absolute; top: 42%; left: 32px; right: 32px; margin: 0; text-align: center; color: rgba(255, 255, 255, 0.85); font-size: calc(15px * var(--ta-font-scale)); line-height: calc(22px * var(--ta-font-scale)); }\n.ta-scan-top { position: absolute; top: calc(env(safe-area-inset-top) + 14px); left: 18px; right: 18px; display: flex; align-items: center; justify-content: space-between; pointer-events: none; }\n.ta-scan-round { pointer-events: auto; width: 40px; height: 40px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 50%; background: rgba(0, 0, 0, 0.32); color: #fff; -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }\n.ta-scan-bottom { position: absolute; left: 18px; right: 18px; bottom: calc(env(safe-area-inset-bottom) + 28px); display: flex; align-items: center; gap: 12px; }\n.ta-scan-side, .ta-scan-ask { border: 0; color: #fff; background: rgba(48, 48, 48, 0.58); -webkit-backdrop-filter: blur(18px) saturate(1.4); backdrop-filter: blur(18px) saturate(1.4); transition: transform 120ms, background 120ms; }\n.ta-scan-side { flex: none; width: 62px; height: 62px; display: grid; place-items: center; padding: 0; border-radius: 50%; }\n.ta-scan-ask { flex: 1; min-width: 0; height: 62px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; padding: 0 14px; border-radius: 31px; }\n.ta-scan-side:active, .ta-scan-ask:active { transform: scale(0.96); background: rgba(70, 70, 70, 0.66); }\n.ta-scan-side:disabled, .ta-scan-ask:disabled { opacity: 0.45; }\n.ta-scan-ask-title { display: flex; align-items: center; gap: 6px; font-size: calc(17px * var(--ta-font-scale)); font-weight: 600; line-height: calc(24px * var(--ta-font-scale)); }\n.ta-scan-ask-hint { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: rgba(255, 255, 255, 0.62); font-size: calc(12px * var(--ta-font-scale)); line-height: calc(16px * var(--ta-font-scale)); }\n.ta-scan-sheet { position: absolute; left: 0; right: 0; bottom: 0; display: flex; flex-direction: column; gap: 12px; padding: 18px 16px calc(16px + env(safe-area-inset-bottom)); border-radius: 18px 18px 0 0; background: var(--ta-card); color: var(--ta-text); box-shadow: var(--ta-shadow-pop); animation: ta-in 220ms var(--ta-ease); }\n:root[data-keyboard] .ta-scan-sheet { bottom: var(--ta-keyboard, 0px); padding-bottom: 12px; }\n.ta-scan-sheet-title { font-size: calc(15px * var(--ta-font-scale)); font-weight: 600; }\n.ta-scan-chips { display: flex; flex-wrap: wrap; gap: 8px; }\n.ta-scan-chip { padding: 8px 14px; border: 1px solid var(--ta-border); border-radius: 999px; background: var(--ta-main); color: var(--ta-text); font-size: calc(14px * var(--ta-font-scale)); }\n.ta-scan-chip:active { background: var(--ta-hover); }\n.ta-scan-field { display: flex; align-items: center; gap: 8px; padding: 4px 4px 4px 14px; border: 1px solid var(--ta-border); border-radius: 22px; background: var(--ta-main); }\n.ta-scan-field input { flex: 1; min-width: 0; height: 36px; border: 0; outline: none; background: transparent; color: var(--ta-text); font-size: max(16px, calc(15px * var(--ta-font-scale))); }\n.ta-scan-send { flex: none; width: 34px; height: 34px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 50%; background: var(--ta-text); color: var(--ta-main); }\n.ta-scan-send:disabled { opacity: 0.5; }\n";
2
+ export declare const PAGES_STYLE = "\n/* The settings: a page of the main area, a table of contents in two levels beside the sections */\n.ta-settings-page { flex: 1; min-height: 0; display: flex; flex-direction: column; }\n.ta-settings-head { justify-content: flex-start; gap: 10px; border-bottom: 1px solid var(--ta-border-muted); }\n.ta-settings-title { flex: none; font-size: calc(14px * var(--ta-font-scale)); font-weight: 600; padding-left: 8px; }\n.ta-settings-search { flex: 1; max-width: 420px; height: 32px; margin: 0 auto; display: flex; align-items: center; gap: 6px; color: var(--ta-muted); }\n.ta-settings-search input { color: var(--ta-text); }\n.ta-settings-search .ta-icon-button { width: 22px; height: 22px; }\n.ta-settings-body { flex: 1; min-height: 0; display: flex; }\n.ta-settings-toc { flex: none; width: 200px; overflow-y: auto; padding: 14px 10px; display: flex; flex-direction: column; gap: 14px; border-right: 1px solid var(--ta-border-muted); }\n.ta-settings-toc-part { display: flex; flex-direction: column; gap: 1px; }\n.ta-settings-toc-group { border: 0; background: none; text-align: left; padding: 2px 10px 4px; font-size: calc(12px * var(--ta-font-scale)); font-weight: 600; color: var(--ta-muted); }\n.ta-settings-toc-group:hover { color: var(--ta-text); }\n.ta-settings-toc-item { display: flex; align-items: center; gap: 8px; height: 30px; padding: 0 10px; border: 0; border-radius: 7px; background: none; text-align: left; font-size: calc(13px * var(--ta-font-scale)); color: var(--ta-secondary); transition: background 120ms, color 120ms; }\n.ta-settings-toc-item .ta-icon { flex: none; color: var(--ta-muted); }\n.ta-settings-toc-item:hover { background: var(--ta-hover); color: var(--ta-text); }\n.ta-settings-toc-item.ta-active { background: var(--ta-selected); color: var(--ta-text); font-weight: 500; }\n.ta-settings-scroll { flex: 1; min-width: 0; overflow-y: auto; scroll-padding-top: 16px; }\n.ta-settings-content { max-width: 720px; margin: 0 auto; padding: 18px 24px calc(48px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 28px; }\n.ta-settings-content:has(> .ta-empty) { min-height: 100%; box-sizing: border-box; }\n.ta-settings-part { display: flex; flex-direction: column; gap: 18px; }\n.ta-settings-part-title { margin: 0; display: flex; align-items: baseline; gap: 10px; font-size: calc(18px * var(--ta-font-scale)); font-weight: 650; letter-spacing: -0.01em; }\n.ta-settings-part-hint { font-size: calc(12px * var(--ta-font-scale)); font-weight: 400; color: var(--ta-muted); }\n.ta-settings-scope { display: flex; flex-direction: column; gap: 6px; }\n.ta-settings-tabs { display: flex; gap: 2px; padding: 3px; border-radius: 10px; background: var(--ta-raised); align-self: flex-start; max-width: 100%; }\n.ta-settings-tab { height: 28px; padding: 0 12px; border: 0; border-radius: 7px; background: none; color: var(--ta-secondary); font-size: calc(12.5px * var(--ta-font-scale)); font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 260px; }\n.ta-settings-tab:hover { color: var(--ta-text); }\n.ta-settings-tab.ta-active { background: var(--ta-segment); color: var(--ta-text); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2), 0 0 0 1px var(--ta-border); }\n.ta-settings-file { padding: 0 4px; font-size: calc(12px * var(--ta-font-scale)); color: var(--ta-muted); overflow-wrap: anywhere; }\n.ta-settings-note { padding: 10px 14px; border-radius: 10px; border: 1px dashed var(--ta-border); font-size: calc(12.5px * var(--ta-font-scale)); color: var(--ta-secondary); }\n.ta-setting-row { position: relative; }\n.ta-setting-row.ta-modified::before { content: ''; position: absolute; left: 0; top: 10px; bottom: 10px; width: 2px; border-radius: 0 2px 2px 0; background: var(--ta-blue); }\n.ta-setting-control { gap: 6px; }\n.ta-setting-reset { width: 26px; height: 26px; }\n.ta-setting-row:not(:hover):not(:focus-within) .ta-setting-reset { opacity: 0; }\n.ta-setting-row:not(.ta-stacked) > .ta-setting-text { flex: 1 1 240px; }\n.ta-setting-row:not(.ta-stacked):has(> .ta-setting-icon) > .ta-setting-text { flex-basis: 160px; }\n.ta-setting-row:not(.ta-stacked) { flex-wrap: wrap; row-gap: 8px; }\n.ta-select, .ta-setting-input, .ta-setting-control .ta-model-field { width: 200px; height: 30px; font-size: calc(12.5px * var(--ta-font-scale)); padding: 0 8px; }\n.ta-select { appearance: auto; cursor: pointer; }\n.ta-setting-input::placeholder { color: var(--ta-muted); }\n/* The settings of a phone (PhoneSettings): the sections listed as Me's rows, each a page of grouped rows. */\n.ta-head-balance { flex: none; width: 32px; }\n.ta-settings-phone > .ta-list-head { padding-left: calc(6px + env(safe-area-inset-left)); padding-right: calc(6px + env(safe-area-inset-right)); }\n.ta-settings-phone .ta-list-content { gap: 20px; padding-left: calc(12px + env(safe-area-inset-left)); padding-right: calc(12px + env(safe-area-inset-right)); }\n.ta-settings-phone .ta-settings-search { flex: none; max-width: none; height: 38px; margin: 0; padding: 0 10px; border-radius: 10px; border-color: var(--ta-border-muted); background: var(--ta-list-cell); font-size: calc(15px * var(--ta-font-scale)); }\n.ta-settings-phone-group { display: flex; flex-direction: column; gap: 6px; }\n.ta-settings-phone-caption { margin: 0 4px; font-size: calc(13px * var(--ta-font-scale)); font-weight: 500; color: var(--ta-muted); }\n.ta-settings-phone .ta-setting-card { border-radius: 12px; border-color: var(--ta-border-muted); background: var(--ta-list-cell); }\n.ta-settings-phone .ta-setting-row { min-height: 52px; padding: 12px 16px; gap: 12px; }\n.ta-settings-phone .ta-setting-row:not(.ta-stacked) > .ta-setting-text { flex: 1 1 0; }\n.ta-settings-phone .ta-setting-label { font-size: calc(15px * var(--ta-font-scale)); font-weight: 400; }\n.ta-settings-phone .ta-setting-description { margin-top: 2px; font-size: calc(13px * var(--ta-font-scale)); line-height: 1.4; }\n.ta-settings-phone .ta-setting-row.ta-stacked { gap: 10px; }\n.ta-settings-phone .ta-segmented button { height: 32px; }\n.ta-setting-choice { width: 100%; border: 0; background: transparent; color: inherit; font: inherit; text-align: left; cursor: pointer; }\n.ta-setting-choice:active { background: var(--ta-hover); }\n.ta-setting-check { flex: none; color: var(--ta-text); }\n.ta-settings-phone .ta-settings-note { border-radius: 12px; }\n.ta-keys { display: inline-flex; gap: 3px; flex: none; }\n.ta-kbd { min-width: 20px; height: 20px; padding: 0 5px; display: inline-grid; place-items: center; border-radius: 5px; border: 1px solid var(--ta-border); border-bottom-width: 2px; background: var(--ta-raised); font: 500 calc(11px * var(--ta-font-scale)) var(--ta-sans); color: var(--ta-secondary); }\n\n/* The menus of the account at the foot of the rail */\n.ta-account-menu .ta-account-item { width: 100%; }\n.ta-account-menu .ta-account-item.ta-on { background: var(--ta-hover); }\n.ta-account-menu .ta-account-item:focus-visible { outline: 1px solid var(--ta-border-focus); outline-offset: -1px; }\n.ta-menu-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }\n.ta-menu-chevron { color: var(--ta-muted) !important; }\n.ta-menu-check { width: 15px; flex: none; display: grid; place-items: center; color: var(--ta-text); }\n.ta-account-menu .ta-kbd { height: 18px; min-width: 18px; font-size: calc(10.5px * var(--ta-font-scale)); }\n.ta-submenu-anchor { position: relative; }\n/* The account menu sits at the foot of the window: a second menu grows up from its entry, or the last choices would fall below it. */\n.ta-submenu { left: calc(100% + 8px); top: auto; bottom: -6px; width: 180px; }\n@media (max-width: 860px), (max-height: 500px) and (pointer: coarse) {\n .ta-settings-toc { display: none; }\n .ta-settings-content { padding: 14px 14px calc(32px + env(safe-area-inset-bottom)); }\n /* No table of contents: the last section, jumped to from the menu of the account, still scrolls to the top. */\n .ta-settings-scroll { container-type: size; }\n .ta-settings-part:last-child > .ta-setting-section:last-child { min-height: calc(100cqh - 48px - env(safe-area-inset-bottom)); }\n .ta-settings-title { padding-left: 0; }\n .ta-settings-search { margin: 0; }\n .ta-setting-row:has(.ta-select, .ta-setting-input, .ta-model-field) .ta-setting-control { width: 100%; }\n .ta-setting-row .ta-select, .ta-setting-row .ta-setting-input, .ta-setting-row .ta-model-field { flex: 1; width: auto; min-width: 0; }\n .ta-setting-reset { opacity: 1 !important; }\n .ta-submenu { left: 12px; right: auto; top: auto; bottom: calc(100% + 4px); width: 200px; }\n}\n/* Discover and Me: rows in rounded groups, as the settings of a phone (list-rows.tsx) */\n.ta-list-page { flex: 1; min-height: 0; display: flex; flex-direction: column; --ta-list-bg: var(--ta-main); --ta-list-cell: var(--ta-side); background: var(--ta-list-bg); }\n:root[data-theme='light'] .ta-list-page { --ta-list-bg: var(--ta-side); --ta-list-cell: var(--ta-card); }\n.ta-list-head { border-bottom: 1px solid var(--ta-border-muted); }\n.ta-list-scroll { flex: 1; min-height: 0; overflow-y: auto; }\n.ta-list-content { max-width: 640px; margin: 0 auto; padding: 20px 20px calc(32px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 16px; }\n.ta-list-group { display: flex; flex-direction: column; border-radius: 12px; border: 1px solid var(--ta-border-muted); background: var(--ta-list-cell); overflow: hidden; }\n.ta-list-row { position: relative; display: flex; align-items: center; min-height: 48px; }\n.ta-list-row + .ta-list-row::before { content: ''; position: absolute; top: 0; right: 0; left: 46px; height: 1px; background: var(--ta-border-muted); }\n.ta-list-main { flex: 1; min-width: 0; align-self: stretch; display: flex; align-items: center; gap: 12px; padding: 0 14px; border: 0; background: none; text-align: left; font-size: calc(14.5px * var(--ta-font-scale)); color: var(--ta-text); transition: background 120ms; }\n.ta-list-main:hover { background: var(--ta-hover); }\n.ta-list-main:focus-visible { outline: 1px solid var(--ta-border-focus); outline-offset: -1px; }\n.ta-list-icon { flex: none; color: var(--ta-secondary); }\n.ta-list-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }\n.ta-list-detail { flex: none; max-width: 45%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: calc(13.5px * var(--ta-font-scale)); color: var(--ta-muted); }\n.ta-list-chevron { flex: none; color: var(--ta-muted); }\n/* In place of the chevron while the page opens: as wide. */\n.ta-list-busy { margin: 0 1.5px; }\n.ta-list-trailing { flex: none; margin-right: 8px; color: var(--ta-muted); }\n/* WebView.mark of a page under Discover: before its pin, as WeChat shows who posted last by Moments. */\n.ta-list-mark { flex: none; display: inline-flex; align-items: center; margin-right: 2px; pointer-events: none; }\n.ta-list-row.ta-action .ta-list-main { justify-content: center; }\n.ta-list-row.ta-action .ta-list-label { flex: none; }\n.ta-list-row.ta-danger .ta-list-main { color: var(--ta-red); }\n.ta-list-row.ta-danger + .ta-list-row::before, .ta-list-row + .ta-list-row.ta-danger::before { left: 0; }\n.ta-list-hint { margin: -6px 4px 0; font-size: calc(12.5px * var(--ta-font-scale)); color: var(--ta-muted); }\n.ta-me-card { display: flex; align-items: center; gap: 14px; width: 100%; padding: 18px 16px; border-radius: 12px; border: 1px solid var(--ta-border-muted); background: var(--ta-list-cell); font: inherit; text-align: left; color: inherit; transition: background 120ms; }\n.ta-me-card:hover, .ta-me-card:active { background: var(--ta-hover); }\n.ta-me-card:focus-visible { outline: 1px solid var(--ta-border-focus); outline-offset: -1px; }\n.ta-account-figure.ta-me-figure { border-radius: 16px; }\n.ta-me-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; line-height: 1.35; }\n.ta-me-name { font-size: calc(18px * var(--ta-font-scale)); font-weight: 650; color: var(--ta-text); }\n.ta-me-host { font-size: calc(13px * var(--ta-font-scale)); color: var(--ta-secondary); }\n.ta-me-state { display: flex; align-items: center; gap: 6px; font-size: calc(12.5px * var(--ta-font-scale)); color: var(--ta-muted); font-variant-numeric: tabular-nums; }\n/* The computers of this device (host-view.tsx): rows as the conversations, a sheet from the bottom on a phone */\n.ta-hosts-dialog { width: min(420px, 100%); gap: 12px; }\n.ta-hosts-dialog .ta-modal-title { font-size: calc(16px * var(--ta-font-scale)); }\n.ta-host-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }\n.ta-host-row { border-radius: 12px; --ta-swipe-bg: var(--ta-card); }\n.ta-host-item { width: 100%; display: flex; align-items: center; gap: 12px; padding: 9px 10px; border: 0; border-radius: 12px; background: var(--ta-card); font: inherit; text-align: left; color: var(--ta-text); transition: background 120ms; }\n.ta-host-item:hover, .ta-host-item:active { background: var(--ta-hover); }\n.ta-host-row.ta-selected .ta-host-item { background: var(--ta-selected); }\n.ta-host-item:focus-visible { outline: 1px solid var(--ta-border-focus); outline-offset: -1px; }\n.ta-host-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; line-height: 1.35; }\n.ta-host-name { font-size: calc(14.5px * var(--ta-font-scale)); font-weight: 600; }\n.ta-host-detail { font-size: calc(12.5px * var(--ta-font-scale)); color: var(--ta-muted); }\n.ta-host-check { flex: none; color: var(--ta-green); }\n.ta-host-actions { display: flex; gap: 8px; }\n.ta-host-actions .ta-button { flex: 1; height: 40px; justify-content: center; gap: 6px; }\n.ta-host-form { display: flex; gap: 8px; width: 100%; animation: ta-in 200ms var(--ta-ease) both; }\n.ta-host-form .ta-field { flex: 1; height: 40px; }\n.ta-host-form .ta-button { height: 40px; min-width: 72px; justify-content: center; }\n.ta-scan-button { height: 46px; gap: 8px; font-size: calc(15px * var(--ta-font-scale)); justify-content: center; }\n.ta-link-button { padding: 4px 8px; border: 0; background: none; font: inherit; font-size: calc(13.5px * var(--ta-font-scale)); color: var(--ta-secondary); }\n.ta-link-button:hover { color: var(--ta-text); }\n.ta-host-saved { width: 100%; margin-top: 12px; display: flex; flex-direction: column; gap: 6px; text-align: left; animation: ta-in 260ms var(--ta-ease) both; }\n.ta-host-saved h2 { margin: 0 4px; font-size: calc(12.5px * var(--ta-font-scale)); font-weight: 500; color: var(--ta-muted); }\n.ta-signin .ta-host-item { background: var(--ta-main); }\n.ta-signin .ta-host-item:hover, .ta-signin .ta-host-item:active { background: var(--ta-hover); }\n.ta-sign-in-accounts { display: flex; flex-direction: column; gap: 8px; width: 100%; animation: ta-in 200ms var(--ta-ease) both; }\n.ta-sign-in-account { height: 42px; gap: 8px; text-decoration: none; font-size: calc(14.5px * var(--ta-font-scale)); }\n.ta-sign-in-account:hover { background: var(--ta-hover); }\n.ta-sign-in-account[aria-busy='true'] { pointer-events: none; opacity: 0.7; }\n.ta-sign-in-mark { flex: none; }\n.ta-sign-in-or { display: flex; align-items: center; gap: 10px; margin: 4px 0; color: var(--ta-muted); font-size: calc(12.5px * var(--ta-font-scale)); }\n.ta-sign-in-or::before, .ta-sign-in-or::after { content: ''; flex: 1; height: 1px; background: var(--ta-border); }\n.ta-access-account { display: inline-flex; align-items: center; gap: 8px; min-width: 0; max-width: 100%; }\n.ta-access-avatar { width: 22px; height: 22px; flex: none; border-radius: 50%; object-fit: cover; }\n.ta-access-avatar.ta-chat-avatar { font-size: calc(11px * var(--ta-font-scale)); }\n.ta-access-bind { display: flex; flex-wrap: wrap; gap: 8px; }\n.ta-sign-in-name { display: inline-flex; align-items: center; gap: 6px; }\n.ta-sign-in-callbacks { display: flex; flex-direction: column; gap: 6px; width: 100%; min-width: 0; }\n.ta-sign-in-callback { display: flex; align-items: center; gap: 6px; min-width: 0; padding: 4px 4px 4px 10px; border-radius: 8px; background: var(--ta-hover); }\n.ta-sign-in-callback code { flex: 1; min-width: 0; font-size: calc(12.5px * var(--ta-font-scale)); }\n.ta-sign-in-form { display: flex; flex-direction: column; gap: 10px; width: 100%; }\n.ta-sign-in-field { display: flex; flex-direction: column; gap: 4px; font-size: calc(12.5px * var(--ta-font-scale)); color: var(--ta-muted); }\n.ta-sign-in-field .ta-input { height: 32px; }\n.ta-sign-in-actions { display: flex; justify-content: flex-end; gap: 8px; }\n.ta-environment-chooser { display: flex; flex-direction: column; gap: 10px; width: 100%; text-align: left; }\n.ta-environment-own { display: flex; flex-direction: column; gap: 8px; animation: ta-in 200ms var(--ta-ease) both; }\n.ta-environment-own .ta-button { align-self: flex-end; }\n.ta-environment-hint { margin: 0; color: var(--ta-muted); font-size: calc(12.5px * var(--ta-font-scale)); line-height: 1.5; }\n.ta-environment-card { gap: 14px; }\n/* While the page loads again for another computer: which one, at once, over all. */\n.ta-switching { position: fixed; inset: 0; z-index: 90; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; background: var(--ta-main); color: var(--ta-secondary); font-size: calc(14px * var(--ta-font-scale)); animation: ta-fade 140ms ease-out both; }\n/* Me has no head: the card under the status bar. */\n.ta-me .ta-list-content { padding-top: calc(20px + env(safe-area-inset-top)); }\n@media (max-width: 860px), (max-height: 500px) and (pointer: coarse) {\n .ta-list-content { padding: 14px 12px calc(24px + env(safe-area-inset-bottom)); }\n .ta-me .ta-list-content { padding-top: calc(14px + env(safe-area-inset-top)); }\n}\n\n/* Streaming: what comes in fades in where it will stay; nothing already shown moves or draws again. */\n.ta-thread-new { animation: ta-in 220ms var(--ta-ease); }\n/* Words ta said on the way move from the reply into the steps when a tool follows them: they were on the screen, so they do not fade in again. */\n.ta-turn-live > .ta-markdown > *, .ta-process-active .ta-process-steps > :not(.ta-more, .ta-step-text), .ta-turn-live .ta-turn-head > .ta-process-head, .ta-turn-live .ta-turn-head > .ta-run-status { animation: ta-fade 240ms ease-out; }\n.ta-run-line { animation: ta-fade 200ms ease-out; }\n.ta-scroll { overflow-anchor: none; }\n/* The scroll bar held while a reply comes in: the thread keeps its height (ConversationScroller), what grows past it waits. */\n.ta-scroll-held { overflow-y: clip; }\n.ta-scroll-held > * { flex-shrink: 0; }\n/* The look of the double: it walks above, the kinds of dinosaur below, then the ways it walks */\n.ta-look { display: flex; flex-direction: column; gap: 10px; min-height: 0; overflow-y: auto; }\n.ta-look-stage { height: 120px; flex: none; display: grid; grid-template-columns: 88px minmax(0, 1fr); gap: 8px; }\n.ta-look-figure, .ta-look-walk { border-radius: 12px; background: var(--ta-raised); display: grid; place-items: center; }\n/* Wide enough for the walk to and fro (half the width of the dinosaur to either side of the middle, and itself). */\n.ta-look-walk { min-width: 220px; overflow: hidden; }\n.ta-look-label { font-size: calc(12px * var(--ta-font-scale)); font-weight: 600; color: var(--ta-secondary); }\n.ta-look-kinds { margin: 0; padding: 0; border: 0; min-width: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 6px; }\n.ta-look-kind { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 4px 7px; border: 1px solid var(--ta-border-muted); border-radius: 12px; background: transparent; color: var(--ta-text); font-size: calc(12px * var(--ta-font-scale)); transition: background 120ms, border-color 120ms; }\n.ta-look-kind:hover { background: var(--ta-hover); }\n.ta-look-kind.ta-on { border-color: var(--ta-green); background: color-mix(in srgb, var(--ta-green) 8%, transparent); }\n.ta-look-name { max-width: 100%; }\n/* The voice replies are read with: its list, and a button to listen to it. */\n.ta-voice-picker { display: flex; align-items: center; gap: 8px; width: 100%; }\n.ta-voice-picker .ta-select { flex: 1; min-width: 0; }\n.ta-voice-picker .ta-button { flex: none; }\n.ta-look-premium { position: absolute; top: 4px; left: 4px; display: inline-flex; align-items: center; gap: 2px; padding: 1px 5px; border-radius: 8px; background: linear-gradient(135deg, #FCD866, #D98E14); color: #4a2c00; font-size: calc(10px * var(--ta-font-scale)); font-weight: 600; line-height: calc(14px * var(--ta-font-scale)); }\n/* Scan, as WeChat's: the camera over everything, a green glow sweeping down, round buttons on it; a photo for Ta asks on a sheet. */\n.ta-scan { position: fixed; inset: 0; z-index: 55; overflow: hidden; background: #000; color: #fff; animation: ta-fade 160ms ease-out; -webkit-user-select: none; user-select: none; }\n.ta-scan-video, .ta-scan-photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }\n.ta-scan-mirrored { transform: scaleX(-1); }\n.ta-scan-line { position: absolute; left: 0; right: 0; top: 16%; height: 22%; pointer-events: none; background: linear-gradient(to bottom, transparent, color-mix(in srgb, var(--ta-green) 40%, transparent) 88%, color-mix(in srgb, var(--ta-green) 90%, transparent) 100%); -webkit-mask-image: radial-gradient(ellipse 60% 100% at 50% 100%, #000 30%, transparent 100%); mask-image: radial-gradient(ellipse 60% 100% at 50% 100%, #000 30%, transparent 100%); animation: ta-scan-sweep 2.6s cubic-bezier(0.45, 0, 0.55, 1) infinite; }\n@keyframes ta-scan-sweep { 0% { transform: translateY(0); opacity: 0; } 12% { opacity: 1; } 80% { opacity: 1; } 100% { transform: translateY(220%); opacity: 0; } }\n.ta-scan-dot { position: absolute; width: 30px; height: 30px; margin: -15px 0 0 -15px; border-radius: 50%; border: 3px solid #fff; background: var(--ta-green); box-shadow: 0 2px 12px rgba(0, 0, 0, 0.35); animation: ta-scan-pop 260ms var(--ta-ease) both; }\n@keyframes ta-scan-pop { from { transform: scale(0.3); opacity: 0; } }\n.ta-scan-problem { position: absolute; top: 42%; left: 32px; right: 32px; margin: 0; text-align: center; color: rgba(255, 255, 255, 0.85); font-size: calc(15px * var(--ta-font-scale)); line-height: calc(22px * var(--ta-font-scale)); }\n.ta-scan-top { position: absolute; top: calc(env(safe-area-inset-top) + 14px); left: 18px; right: 18px; display: flex; align-items: center; justify-content: space-between; pointer-events: none; }\n.ta-scan-round { pointer-events: auto; width: 40px; height: 40px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 50%; background: rgba(0, 0, 0, 0.32); color: #fff; -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }\n.ta-scan-bottom { position: absolute; left: 18px; right: 18px; bottom: calc(env(safe-area-inset-bottom) + 28px); display: flex; align-items: center; gap: 12px; }\n.ta-scan-side, .ta-scan-ask { border: 0; color: #fff; background: rgba(48, 48, 48, 0.58); -webkit-backdrop-filter: blur(18px) saturate(1.4); backdrop-filter: blur(18px) saturate(1.4); transition: transform 120ms, background 120ms; }\n.ta-scan-side { flex: none; width: 62px; height: 62px; display: grid; place-items: center; padding: 0; border-radius: 50%; }\n.ta-scan-ask { flex: 1; min-width: 0; height: 62px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; padding: 0 14px; border-radius: 31px; }\n.ta-scan-side:active, .ta-scan-ask:active { transform: scale(0.96); background: rgba(70, 70, 70, 0.66); }\n.ta-scan-side:disabled, .ta-scan-ask:disabled { opacity: 0.45; }\n.ta-scan-ask-title { display: flex; align-items: center; gap: 6px; font-size: calc(17px * var(--ta-font-scale)); font-weight: 600; line-height: calc(24px * var(--ta-font-scale)); }\n.ta-scan-ask-hint { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: rgba(255, 255, 255, 0.62); font-size: calc(12px * var(--ta-font-scale)); line-height: calc(16px * var(--ta-font-scale)); }\n.ta-scan-sheet { position: absolute; left: 0; right: 0; bottom: 0; display: flex; flex-direction: column; gap: 12px; padding: 18px 16px calc(16px + env(safe-area-inset-bottom)); border-radius: 18px 18px 0 0; background: var(--ta-card); color: var(--ta-text); box-shadow: var(--ta-shadow-pop); animation: ta-in 220ms var(--ta-ease); }\n:root[data-keyboard] .ta-scan-sheet { bottom: var(--ta-keyboard, 0px); padding-bottom: 12px; }\n.ta-scan-sheet-title { font-size: calc(15px * var(--ta-font-scale)); font-weight: 600; }\n.ta-scan-chips { display: flex; flex-wrap: wrap; gap: 8px; }\n.ta-scan-chip { padding: 8px 14px; border: 1px solid var(--ta-border); border-radius: 999px; background: var(--ta-main); color: var(--ta-text); font-size: calc(14px * var(--ta-font-scale)); }\n.ta-scan-chip:active { background: var(--ta-hover); }\n.ta-scan-field { display: flex; align-items: center; gap: 8px; padding: 4px 4px 4px 14px; border: 1px solid var(--ta-border); border-radius: 22px; background: var(--ta-main); }\n.ta-scan-field input { flex: 1; min-width: 0; height: 36px; border: 0; outline: none; background: transparent; color: var(--ta-text); font-size: max(16px, calc(15px * var(--ta-font-scale))); }\n.ta-scan-send { flex: none; width: 34px; height: 34px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 50%; background: var(--ta-text); color: var(--ta-main); }\n.ta-scan-send:disabled { opacity: 0.5; }\n/* A model service added by its address and key (custom-provider-view) */\n.ta-custom-flow { flex: 1 1 auto; min-height: 0; }\n.ta-custom-form { display: flex; flex-direction: column; gap: 12px; min-height: 0; margin: 0 -4px; padding: 0 4px; overflow-y: auto; }\n.ta-custom-form .ta-select { width: 100%; height: 32px; }\n.ta-custom-models { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; min-height: 36px; box-sizing: border-box; padding: 4px 6px; border: 1px solid var(--ta-border-field); border-radius: 8px; background: var(--ta-input); transition: border-color 120ms; }\n.ta-custom-models:focus-within { border-color: var(--ta-border-focus); }\n.ta-custom-chip { display: inline-flex; align-items: center; gap: 2px; max-width: 100%; height: 24px; padding: 0 2px 0 8px; border-radius: 6px; background: var(--ta-raised); color: var(--ta-text); font-family: var(--ta-mono); font-size: calc(12px * var(--ta-font-scale)); animation: ta-in 160ms var(--ta-ease) both; }\n.ta-custom-chip-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }\n.ta-custom-chip button { display: grid; place-items: center; width: 20px; height: 20px; padding: 0; border: 0; border-radius: 4px; background: transparent; color: var(--ta-muted); cursor: pointer; }\n.ta-custom-chip button:hover { background: var(--ta-hover); color: var(--ta-text); }\n.ta-custom-model-input { flex: 1; min-width: 140px; height: 26px; border: 0; outline: none; background: transparent; color: var(--ta-text); font: inherit; font-size: calc(13px * var(--ta-font-scale)); }\n.ta-custom-fetch { align-self: flex-start; margin-top: 2px; }\n.ta-custom-fetched { display: flex; flex-direction: column; gap: 6px; margin-top: 2px; }\n.ta-custom-fetched .ta-auth-note { white-space: normal; }\n.ta-custom-fetched .ta-input { height: 32px; }\n.ta-custom-fetched-list { display: flex; flex-direction: column; max-height: 220px; overflow-y: auto; padding: 2px; border: 1px solid var(--ta-border-muted); border-radius: 8px; }\n.ta-custom-fetched-list .ta-auth-item { height: 32px; flex: none; font-family: var(--ta-mono); font-size: calc(12.5px * var(--ta-font-scale)); }\n.ta-custom-fetched-list .ta-auth-item > .ta-custom-picked { margin-left: auto; color: var(--ta-accent); }\n.ta-custom-actions { position: sticky; bottom: 0; z-index: 1; display: flex; justify-content: flex-end; gap: 8px; padding-top: 8px; background: var(--ta-card); }\n.ta-custom-actions .ta-danger { margin-right: auto; }\n.ta-custom-add > .ta-icon:first-child { color: var(--ta-accent); }\n.ta-custom-add { width: 100%; }\n.ta-custom-advanced { border: 1px solid var(--ta-border-muted); border-radius: 10px; }\n.ta-custom-advanced-toggle { display: flex; align-items: center; gap: 8px; width: 100%; height: 38px; padding: 0 10px; border: 0; border-radius: 10px; background: transparent; color: var(--ta-text); font: inherit; font-size: calc(13px * var(--ta-font-scale)); font-weight: 500; text-align: left; cursor: pointer; }\n.ta-custom-advanced-toggle:hover { background: var(--ta-hover); }\n.ta-custom-advanced-toggle .ta-auth-note { font-weight: 400; }\n.ta-custom-advanced-toggle > .ta-icon { margin-left: auto; color: var(--ta-muted); transition: transform 160ms var(--ta-ease); }\n.ta-custom-advanced.ta-open .ta-custom-advanced-toggle > .ta-icon { transform: rotate(180deg); }\n.ta-custom-advanced-body { display: flex; flex-direction: column; gap: 10px; padding: 2px 10px 12px; animation: ta-in 200ms var(--ta-ease) both; }\n.ta-custom-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }\n.ta-custom-check { display: flex; align-items: center; gap: 8px; min-height: 28px; color: var(--ta-body); font-size: calc(13px * var(--ta-font-scale)); cursor: pointer; }\n.ta-custom-check input { width: 16px; height: 16px; margin: 0; accent-color: var(--ta-accent); }\n.ta-custom-header { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr) 28px; gap: 6px; align-items: center; }\n.ta-custom-header .ta-input { height: 32px; font-family: var(--ta-mono); font-size: calc(12.5px * var(--ta-font-scale)); }\n.ta-custom-header-remove { display: grid; place-items: center; width: 28px; height: 28px; padding: 0; border: 0; border-radius: 6px; background: transparent; color: var(--ta-muted); cursor: pointer; }\n.ta-custom-header-remove:hover { background: var(--ta-hover); color: var(--ta-text); }\n@media (max-width: 860px), (max-height: 500px) and (pointer: coarse) {\n .ta-custom-form .ta-input, .ta-custom-model-input { font-size: max(16px, calc(14px * var(--ta-font-scale))); }\n .ta-custom-actions .ta-button { flex: 1; }\n}\n";
3
3
  //# sourceMappingURL=pages.d.ts.map
@@ -58,6 +58,9 @@ exports.PAGES_STYLE = `
58
58
  .ta-settings-phone .ta-setting-description { margin-top: 2px; font-size: calc(13px * var(--ta-font-scale)); line-height: 1.4; }
59
59
  .ta-settings-phone .ta-setting-row.ta-stacked { gap: 10px; }
60
60
  .ta-settings-phone .ta-segmented button { height: 32px; }
61
+ .ta-setting-choice { width: 100%; border: 0; background: transparent; color: inherit; font: inherit; text-align: left; cursor: pointer; }
62
+ .ta-setting-choice:active { background: var(--ta-hover); }
63
+ .ta-setting-check { flex: none; color: var(--ta-text); }
61
64
  .ta-settings-phone .ta-settings-note { border-radius: 12px; }
62
65
  .ta-keys { display: inline-flex; gap: 3px; flex: none; }
63
66
  .ta-kbd { min-width: 20px; height: 20px; padding: 0 5px; display: inline-grid; place-items: center; border-radius: 5px; border: 1px solid var(--ta-border); border-bottom-width: 2px; background: var(--ta-raised); font: 500 calc(11px * var(--ta-font-scale)) var(--ta-sans); color: var(--ta-secondary); }
@@ -71,7 +74,8 @@ exports.PAGES_STYLE = `
71
74
  .ta-menu-check { width: 15px; flex: none; display: grid; place-items: center; color: var(--ta-text); }
72
75
  .ta-account-menu .ta-kbd { height: 18px; min-width: 18px; font-size: calc(10.5px * var(--ta-font-scale)); }
73
76
  .ta-submenu-anchor { position: relative; }
74
- .ta-submenu { left: calc(100% + 8px); bottom: auto; top: -6px; width: 180px; }
77
+ /* The account menu sits at the foot of the window: a second menu grows up from its entry, or the last choices would fall below it. */
78
+ .ta-submenu { left: calc(100% + 8px); top: auto; bottom: -6px; width: 180px; }
75
79
  @media ${device_protocol_1.DeviceMedia.COMPACT} {
76
80
  .ta-settings-toc { display: none; }
77
81
  .ta-settings-content { padding: 14px 14px calc(32px + env(safe-area-inset-bottom)); }
@@ -155,6 +159,14 @@ exports.PAGES_STYLE = `
155
159
  .ta-access-avatar { width: 22px; height: 22px; flex: none; border-radius: 50%; object-fit: cover; }
156
160
  .ta-access-avatar.ta-chat-avatar { font-size: calc(11px * var(--ta-font-scale)); }
157
161
  .ta-access-bind { display: flex; flex-wrap: wrap; gap: 8px; }
162
+ .ta-sign-in-name { display: inline-flex; align-items: center; gap: 6px; }
163
+ .ta-sign-in-callbacks { display: flex; flex-direction: column; gap: 6px; width: 100%; min-width: 0; }
164
+ .ta-sign-in-callback { display: flex; align-items: center; gap: 6px; min-width: 0; padding: 4px 4px 4px 10px; border-radius: 8px; background: var(--ta-hover); }
165
+ .ta-sign-in-callback code { flex: 1; min-width: 0; font-size: calc(12.5px * var(--ta-font-scale)); }
166
+ .ta-sign-in-form { display: flex; flex-direction: column; gap: 10px; width: 100%; }
167
+ .ta-sign-in-field { display: flex; flex-direction: column; gap: 4px; font-size: calc(12.5px * var(--ta-font-scale)); color: var(--ta-muted); }
168
+ .ta-sign-in-field .ta-input { height: 32px; }
169
+ .ta-sign-in-actions { display: flex; justify-content: flex-end; gap: 8px; }
158
170
  .ta-environment-chooser { display: flex; flex-direction: column; gap: 10px; width: 100%; text-align: left; }
159
171
  .ta-environment-own { display: flex; flex-direction: column; gap: 8px; animation: ta-in 200ms var(--ta-ease) both; }
160
172
  .ta-environment-own .ta-button { align-self: flex-end; }
@@ -224,5 +236,45 @@ exports.PAGES_STYLE = `
224
236
  .ta-scan-field input { flex: 1; min-width: 0; height: 36px; border: 0; outline: none; background: transparent; color: var(--ta-text); font-size: max(16px, calc(15px * var(--ta-font-scale))); }
225
237
  .ta-scan-send { flex: none; width: 34px; height: 34px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 50%; background: var(--ta-text); color: var(--ta-main); }
226
238
  .ta-scan-send:disabled { opacity: 0.5; }
239
+ /* A model service added by its address and key (custom-provider-view) */
240
+ .ta-custom-flow { flex: 1 1 auto; min-height: 0; }
241
+ .ta-custom-form { display: flex; flex-direction: column; gap: 12px; min-height: 0; margin: 0 -4px; padding: 0 4px; overflow-y: auto; }
242
+ .ta-custom-form .ta-select { width: 100%; height: 32px; }
243
+ .ta-custom-models { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; min-height: 36px; box-sizing: border-box; padding: 4px 6px; border: 1px solid var(--ta-border-field); border-radius: 8px; background: var(--ta-input); transition: border-color 120ms; }
244
+ .ta-custom-models:focus-within { border-color: var(--ta-border-focus); }
245
+ .ta-custom-chip { display: inline-flex; align-items: center; gap: 2px; max-width: 100%; height: 24px; padding: 0 2px 0 8px; border-radius: 6px; background: var(--ta-raised); color: var(--ta-text); font-family: var(--ta-mono); font-size: calc(12px * var(--ta-font-scale)); animation: ta-in 160ms var(--ta-ease) both; }
246
+ .ta-custom-chip-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
247
+ .ta-custom-chip button { display: grid; place-items: center; width: 20px; height: 20px; padding: 0; border: 0; border-radius: 4px; background: transparent; color: var(--ta-muted); cursor: pointer; }
248
+ .ta-custom-chip button:hover { background: var(--ta-hover); color: var(--ta-text); }
249
+ .ta-custom-model-input { flex: 1; min-width: 140px; height: 26px; border: 0; outline: none; background: transparent; color: var(--ta-text); font: inherit; font-size: calc(13px * var(--ta-font-scale)); }
250
+ .ta-custom-fetch { align-self: flex-start; margin-top: 2px; }
251
+ .ta-custom-fetched { display: flex; flex-direction: column; gap: 6px; margin-top: 2px; }
252
+ .ta-custom-fetched .ta-auth-note { white-space: normal; }
253
+ .ta-custom-fetched .ta-input { height: 32px; }
254
+ .ta-custom-fetched-list { display: flex; flex-direction: column; max-height: 220px; overflow-y: auto; padding: 2px; border: 1px solid var(--ta-border-muted); border-radius: 8px; }
255
+ .ta-custom-fetched-list .ta-auth-item { height: 32px; flex: none; font-family: var(--ta-mono); font-size: calc(12.5px * var(--ta-font-scale)); }
256
+ .ta-custom-fetched-list .ta-auth-item > .ta-custom-picked { margin-left: auto; color: var(--ta-accent); }
257
+ .ta-custom-actions { position: sticky; bottom: 0; z-index: 1; display: flex; justify-content: flex-end; gap: 8px; padding-top: 8px; background: var(--ta-card); }
258
+ .ta-custom-actions .ta-danger { margin-right: auto; }
259
+ .ta-custom-add > .ta-icon:first-child { color: var(--ta-accent); }
260
+ .ta-custom-add { width: 100%; }
261
+ .ta-custom-advanced { border: 1px solid var(--ta-border-muted); border-radius: 10px; }
262
+ .ta-custom-advanced-toggle { display: flex; align-items: center; gap: 8px; width: 100%; height: 38px; padding: 0 10px; border: 0; border-radius: 10px; background: transparent; color: var(--ta-text); font: inherit; font-size: calc(13px * var(--ta-font-scale)); font-weight: 500; text-align: left; cursor: pointer; }
263
+ .ta-custom-advanced-toggle:hover { background: var(--ta-hover); }
264
+ .ta-custom-advanced-toggle .ta-auth-note { font-weight: 400; }
265
+ .ta-custom-advanced-toggle > .ta-icon { margin-left: auto; color: var(--ta-muted); transition: transform 160ms var(--ta-ease); }
266
+ .ta-custom-advanced.ta-open .ta-custom-advanced-toggle > .ta-icon { transform: rotate(180deg); }
267
+ .ta-custom-advanced-body { display: flex; flex-direction: column; gap: 10px; padding: 2px 10px 12px; animation: ta-in 200ms var(--ta-ease) both; }
268
+ .ta-custom-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
269
+ .ta-custom-check { display: flex; align-items: center; gap: 8px; min-height: 28px; color: var(--ta-body); font-size: calc(13px * var(--ta-font-scale)); cursor: pointer; }
270
+ .ta-custom-check input { width: 16px; height: 16px; margin: 0; accent-color: var(--ta-accent); }
271
+ .ta-custom-header { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr) 28px; gap: 6px; align-items: center; }
272
+ .ta-custom-header .ta-input { height: 32px; font-family: var(--ta-mono); font-size: calc(12.5px * var(--ta-font-scale)); }
273
+ .ta-custom-header-remove { display: grid; place-items: center; width: 28px; height: 28px; padding: 0; border: 0; border-radius: 6px; background: transparent; color: var(--ta-muted); cursor: pointer; }
274
+ .ta-custom-header-remove:hover { background: var(--ta-hover); color: var(--ta-text); }
275
+ @media ${device_protocol_1.DeviceMedia.COMPACT} {
276
+ .ta-custom-form .ta-input, .ta-custom-model-input { font-size: max(16px, calc(14px * var(--ta-font-scale))); }
277
+ .ta-custom-actions .ta-button { flex: 1; }
278
+ }
227
279
  `;
228
280
  //# sourceMappingURL=pages.js.map
@@ -1,5 +1,5 @@
1
1
  /** What Ta Desktop can do for the page beyond a tab of a browser. */
2
- export type DesktopFeature = 'webview' | 'debugWebview' | 'showItemInFolder' | 'browserData' | 'recentShots' | 'notices';
2
+ export type DesktopFeature = 'webview' | 'debugWebview' | 'showItemInFolder' | 'browserData' | 'recentShots' | 'notices' | 'speech';
3
3
  /** The file manager of the system, from Ta Desktop: {@link WebDesktop} of the extension API. */
4
4
  export interface DesktopFileManager {
5
5
  /** Node's `process.platform` of the machine: what the file manager is called there. */
@@ -52,6 +52,15 @@ export interface DesktopNoticeTarget {
52
52
  cwd?: string;
53
53
  view?: string;
54
54
  }
55
+ /**
56
+ * Apple's recognizer on macOS (native/ta-speech of apps/ta-desktop): the messages of a listening (`Voice` of voice.ts), and
57
+ * what it answers them, as the Ta app on iOS has it.
58
+ */
59
+ export interface DesktopSpeech<Message = object, Answer = object> {
60
+ post(message: Message): void;
61
+ /** Returns what stops hearing them. */
62
+ onAnswer(listener: (answer: Answer) => void): () => void;
63
+ }
55
64
  /** A command of the DevTools protocol to the page of a `<webview>` of this page, by its getWebContentsId(). */
56
65
  export type DebugWebview = (webContentsId: number, method: string, params?: Record<string, unknown>) => Promise<unknown>;
57
66
  /**
@@ -73,6 +82,8 @@ export declare namespace DesktopUtil {
73
82
  function notices(scope?: object): {
74
83
  onOpen(listener: (target: DesktopNoticeTarget) => void): () => void;
75
84
  } | undefined;
85
+ /** Apple's recognizer, where Ta Desktop has it (macOS). */
86
+ function speech<Message = object, Answer = object>(scope?: object): DesktopSpeech<Message, Answer> | undefined;
76
87
  /** The screenshots of this computer, where Ta Desktop finds them. */
77
88
  function recentShots(scope?: object): DesktopShots | undefined;
78
89
  }
@@ -67,6 +67,20 @@ var DesktopUtil;
67
67
  return Object.freeze({ onOpen: (listener) => onOpen(listener) });
68
68
  }
69
69
  DesktopUtil.notices = notices;
70
+ /** Apple's recognizer, where Ta Desktop has it (macOS). */
71
+ function speech(scope = globalThis) {
72
+ var _a;
73
+ var _b;
74
+ const { post, onAnswer } = (_b = (_a = scope.taDesktop) === null || _a === void 0 ? void 0 : _a.speech) !== null && _b !== void 0 ? _b : {};
75
+ if (!has('speech', scope) || typeof post !== 'function' || typeof onAnswer !== 'function') {
76
+ return undefined;
77
+ }
78
+ return Object.freeze({
79
+ post: (message) => void post(message),
80
+ onAnswer: (listener) => onAnswer(listener),
81
+ });
82
+ }
83
+ DesktopUtil.speech = speech;
70
84
  /** The screenshots of this computer, where Ta Desktop finds them. */
71
85
  function recentShots(scope = globalThis) {
72
86
  var _a;
@@ -1,3 +1,22 @@
1
+ /** What the page tells Apple's recognizer: of the Ta app on iOS (TaSpeech.swift of apps/ta-mobile) or of Ta Desktop on macOS. */
2
+ export type NativeSpeechMessage = {
3
+ id: string;
4
+ action: 'start';
5
+ language: string;
6
+ continuous: boolean;
7
+ hints: string[];
8
+ } | {
9
+ id: string;
10
+ action: 'stop';
11
+ };
12
+ /** What it answers: the words so far of a listening, or its end. */
13
+ export interface NativeSpeechEvent {
14
+ id: string;
15
+ text?: string;
16
+ final?: boolean;
17
+ end?: boolean;
18
+ error?: string;
19
+ }
1
20
  /** Talking to ta and hearing it, with what the browser or the app has: no service, no dependency. */
2
21
  export declare namespace Voice {
3
22
  /** The window event the Ta app on iOS answers a listening with. */
@@ -40,7 +59,7 @@ export declare namespace Voice {
40
59
  function spoken(markdown: string): string;
41
60
  /** What a text is read in: its sentences and lines, a long one in pieces at its commas. */
42
61
  function sentences(text: string): string[];
43
- /** The language a text is read in: Chinese for Chinese, whatever the page's. */
62
+ /** The language a text is read in: Japanese for kana, Chinese for other Han (the page's, if Chinese or Japanese), whatever the page's. */
44
63
  function languageOf(text: string, language: string): string;
45
64
  /**
46
65
  * How natural a voice sounds, from what its name and address say: the neural voices of Edge and the premium
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.Voice = void 0;
4
+ const desktop_1 = require("./desktop");
4
5
  /** Talking to ta and hearing it, with what the browser or the app has: no service, no dependency. */
5
6
  var Voice;
6
7
  (function (Voice) {
@@ -66,10 +67,24 @@ var Voice;
66
67
  const scope = globalThis;
67
68
  return (_a = scope.SpeechRecognition) !== null && _a !== void 0 ? _a : scope.webkitSpeechRecognition;
68
69
  }
69
- /** The recognizer of the Ta app on iOS, Apple's own: WebKit's repeats what it heard and leaves out punctuation. */
70
+ /**
71
+ * Apple's recognizer: of the Ta app on iOS, where WebKit's repeats what it heard and leaves out punctuation, and of
72
+ * Ta Desktop on macOS, where Chrome's, which Electron has, always fails with `network` (only Chrome may use its service).
73
+ */
70
74
  function nativeSpeech() {
71
75
  var _a, _b;
72
- return (_b = (_a = globalThis.webkit) === null || _a === void 0 ? void 0 : _a.messageHandlers) === null || _b === void 0 ? void 0 : _b.taSpeech;
76
+ const ios = (_b = (_a = globalThis.webkit) === null || _a === void 0 ? void 0 : _a.messageHandlers) === null || _b === void 0 ? void 0 : _b.taSpeech;
77
+ if (ios) {
78
+ return {
79
+ post: message => ios.postMessage(message),
80
+ onAnswer: listener => {
81
+ const heard = (event) => listener(event.detail);
82
+ globalThis.addEventListener(Voice.NATIVE_EVENT, heard);
83
+ return () => globalThis.removeEventListener(Voice.NATIVE_EVENT, heard);
84
+ },
85
+ };
86
+ }
87
+ return desktop_1.DesktopUtil.speech();
73
88
  }
74
89
  function canListen() {
75
90
  return nativeSpeech() !== undefined || recognitionClass() !== undefined;
@@ -157,23 +172,21 @@ var Voice;
157
172
  function listenNatively(native, language, onText, onEnd, options) {
158
173
  const id = crypto.randomUUID();
159
174
  let ended = false;
160
- const onEvent = (event) => {
161
- const answer = event.detail;
175
+ const stopHearing = native.onAnswer(answer => {
162
176
  if (ended || (answer === null || answer === void 0 ? void 0 : answer.id) !== id) {
163
177
  return;
164
178
  }
165
179
  if (answer.end) {
166
180
  ended = true;
167
- globalThis.removeEventListener(Voice.NATIVE_EVENT, onEvent);
181
+ stopHearing();
168
182
  onEnd(answer.error === 'no-speech' ? undefined : answer.error);
169
183
  }
170
184
  else if (typeof answer.text === 'string') {
171
185
  onText(answer.text, answer.final === true);
172
186
  }
173
- };
174
- globalThis.addEventListener(Voice.NATIVE_EVENT, onEvent);
175
- native.postMessage({ id, action: 'start', language, continuous: options.continuous === true, hints: hints(options.hints) });
176
- return { stop: () => !ended && native.postMessage({ id, action: 'stop' }) };
187
+ });
188
+ native.post({ id, action: 'start', language, continuous: options.continuous === true, hints: hints(options.hints) });
189
+ return { stop: () => !ended && native.post({ id, action: 'stop' }) };
177
190
  }
178
191
  function canSpeak() {
179
192
  return typeof speechSynthesis !== 'undefined';
@@ -228,9 +241,12 @@ var Voice;
228
241
  return pieces;
229
242
  }
230
243
  Voice.sentences = sentences;
231
- /** The language a text is read in: Chinese for Chinese, whatever the page's. */
244
+ /** The language a text is read in: Japanese for kana, Chinese for other Han (the page's, if Chinese or Japanese), whatever the page's. */
232
245
  function languageOf(text, language) {
233
- return /[\u4e00-\u9fff]/.test(text) ? 'zh-CN' : language;
246
+ if (/[\u3040-\u30ff]/.test(text)) {
247
+ return 'ja-JP';
248
+ }
249
+ return /[\u4e00-\u9fff]/.test(text) && !/^(zh|ja)\b/i.test(language) ? 'zh-CN' : language;
234
250
  }
235
251
  Voice.languageOf = languageOf;
236
252
  /** Toys and the voices of a screen reader of old (Eloquence), which sound as machines. */
@@ -65,6 +65,13 @@ export interface WorkbenchState {
65
65
  archived?: TaSavedSessionInfo[];
66
66
  }
67
67
  /** The web client's side of `ta serve`: one connection and the open sessions. */
68
+ /** What this page is at, for the others in the same Ta (PresenceReporter). */
69
+ export interface WorkbenchPresence {
70
+ /** The conversation in front of the user, the page seen; none otherwise. */
71
+ look(sessionId: string | undefined): void;
72
+ /** What the box of a conversation holds now: typing while it holds something and keys come. */
73
+ type(sessionId: string, typing: boolean): void;
74
+ }
68
75
  export interface TaWorkbench {
69
76
  readonly state: WorkbenchState;
70
77
  readonly server: TaServer;
@@ -79,6 +86,8 @@ export interface TaWorkbench {
79
86
  readonly relay: TaRelayServer;
80
87
  readonly remote: TaRemoteServer;
81
88
  readonly rooms: TaRoomServer;
89
+ /** What this page tells the others in the same Ta it is at (TaPresenceServer). */
90
+ readonly presence: WorkbenchPresence;
82
91
  subscribe(listener: (state: WorkbenchState) => void): () => void;
83
92
  /** Signs in with the token of the URL fragment (`ta serve --web`) or the one this page used before. */
84
93
  start(): Promise<void>;
@@ -40,11 +40,15 @@ export declare class WorkbenchError extends Error {
40
40
  export declare namespace WorkbenchUtil {
41
41
  /** A pairing link (`ta pair`) or else a token. */
42
42
  function credential(text: string): Credential;
43
+ /** What a page was opened to sign in with, in its fragment: `token`, or `pair` (a pairing link); undefined for neither or one not whole. */
44
+ function fromFragment(fragment: URLSearchParams): Credential | undefined;
43
45
  /**
44
46
  * Whether the ta serve in use runs on another machine than this browser: reached through a relay, from
45
47
  * the app, or at an address that is not this machine's. A sign-in there cannot come back to it by itself.
46
48
  */
47
49
  function elsewhere(hostId: string | undefined, hostname?: string): boolean;
50
+ /** An address of this machine alone (`localhost`, `127.0.0.1`, `::1`), which no provider of accounts sends a browser back to. */
51
+ function loopback(hostname?: string): boolean;
48
52
  /** In the Ta app on a phone, where no ta serve serves the page: it reaches one through a relay. */
49
53
  function isApp(): boolean;
50
54
  function readPairing(text: string | null): RelayPairing | undefined;
@@ -58,14 +58,37 @@ var WorkbenchUtil;
58
58
  }
59
59
  }
60
60
  WorkbenchUtil.credential = credential;
61
+ /** What a page was opened to sign in with, in its fragment: `token`, or `pair` (a pairing link); undefined for neither or one not whole. */
62
+ function fromFragment(fragment) {
63
+ const token = fragment.get('token');
64
+ if (token) {
65
+ return { token };
66
+ }
67
+ const pair = fragment.get('pair');
68
+ if (!pair) {
69
+ return undefined;
70
+ }
71
+ try {
72
+ return { pairing: ta_relay_1.RelayPairingUtil.parse(pair) };
73
+ }
74
+ catch (_a) {
75
+ return undefined;
76
+ }
77
+ }
78
+ WorkbenchUtil.fromFragment = fromFragment;
61
79
  /**
62
80
  * Whether the ta serve in use runs on another machine than this browser: reached through a relay, from
63
81
  * the app, or at an address that is not this machine's. A sign-in there cannot come back to it by itself.
64
82
  */
65
83
  function elsewhere(hostId, hostname = typeof location === 'undefined' ? '' : location.hostname) {
66
- return isApp() || Boolean(hostId === null || hostId === void 0 ? void 0 : hostId.startsWith('relay ')) || !['localhost', '127.0.0.1', '[::1]', '::1'].includes(hostname);
84
+ return isApp() || Boolean(hostId === null || hostId === void 0 ? void 0 : hostId.startsWith('relay ')) || !loopback(hostname);
67
85
  }
68
86
  WorkbenchUtil.elsewhere = elsewhere;
87
+ /** An address of this machine alone (`localhost`, `127.0.0.1`, `::1`), which no provider of accounts sends a browser back to. */
88
+ function loopback(hostname = typeof location === 'undefined' ? '' : location.hostname) {
89
+ return ['localhost', '127.0.0.1', '[::1]', '::1'].includes(hostname);
90
+ }
91
+ WorkbenchUtil.loopback = loopback;
69
92
  /** In the Ta app on a phone, where no ta serve serves the page: it reaches one through a relay. */
70
93
  function isApp() {
71
94
  var _a, _b;
@@ -1,6 +1,7 @@
1
1
  import { SessionStore, type SessionStoreOptions, TaConnection } from '@celljs/ta-client';
2
2
  import { type TaAccessServer, type TaAuthEvent, type TaAuthServer, type TaGatewayServer, type TaPackageServer, type TaRelayServer, type TaRemoteEvent, type TaRemoteServer, type TaRoomEvent, type TaRoomServer, type TaRoomWatch, type TaServer, type TaServerInfo, type TaSessionInfo, type TaSettingsServer, type TaTerminalServer, type TaWorkspaceServer } from '@celljs/ta-protocol';
3
3
  import { type HostList } from './hosts';
4
+ import { PresenceReporter } from './presence/presence-reporter';
4
5
  import { WorkbenchCalls } from './workbench-calls';
5
6
  import { type Credential, TaWorkbench, type WorkbenchState } from './workbench-protocol';
6
7
  import { type ServiceName } from './workbench-util';
@@ -8,6 +9,8 @@ export declare class TaWorkbenchImpl implements TaWorkbench {
8
9
  protected list: HostList;
9
10
  protected current: WorkbenchState;
10
11
  protected connection?: TaConnection;
12
+ /** On the connection of the time, only while it is open: what it was at goes again once it opens (resend). */
13
+ readonly presence: PresenceReporter;
11
14
  protected retryTimer?: ReturnType<typeof setTimeout>;
12
15
  /** While ta serve is not running: the next attempt, which `reconnect` makes at once. */
13
16
  protected retry?: () => void;
@@ -13,6 +13,7 @@ const ta_protocol_1 = require("@celljs/ta-protocol");
13
13
  const ta_relay_1 = require("@celljs/ta-relay");
14
14
  const hosts_1 = require("./hosts");
15
15
  const device_values_1 = require("./offline/device-values");
16
+ const presence_reporter_1 = require("./presence/presence-reporter");
16
17
  const settings_protocol_1 = require("./settings/settings-protocol");
17
18
  const state_protocol_1 = require("./state/state-protocol");
18
19
  const workbench_calls_1 = require("./workbench-calls");
@@ -22,6 +23,12 @@ let TaWorkbenchImpl = class TaWorkbenchImpl {
22
23
  constructor() {
23
24
  this.list = workbench_util_1.WorkbenchUtil.readHosts((0, workbench_util_1.storage)());
24
25
  this.current = { status: 'connecting', hosts: this.list.hosts, host: this.list.current, sessions: [], saved: [] };
26
+ /** On the connection of the time, only while it is open: what it was at goes again once it opens (resend). */
27
+ this.presence = new presence_reporter_1.PresenceReporter(state => {
28
+ if (this.connection && this.current.status === 'online') {
29
+ this.connection.presence.report(state).catch(() => undefined);
30
+ }
31
+ });
25
32
  this.attempts = 0;
26
33
  this.graceMs = workbench_util_1.GRACE_MS;
27
34
  /** What was kept of the computers dropped, being taken off the device. */
@@ -141,13 +148,13 @@ let TaWorkbenchImpl = class TaWorkbenchImpl {
141
148
  }
142
149
  async start() {
143
150
  this.watchWake();
144
- const fromUrl = new URLSearchParams(location.hash.slice(1)).get('token');
151
+ const fragment = new URLSearchParams(location.hash.slice(1));
152
+ // A token of `ta serve --web`, or a pairing link: the page of a relay opened for one let in from a browser (docs/design/ta-team.md 8.3).
153
+ const fromUrl = workbench_util_1.WorkbenchUtil.fromFragment(fragment);
145
154
  if (fromUrl) {
146
155
  // Out of the address bar, the history and bookmarks.
147
156
  history.replaceState(null, '', location.pathname + location.search);
148
- }
149
- if (fromUrl) {
150
- this.keepHosts(hosts_1.HostUtil.use(this.list, workbench_util_1.WorkbenchUtil.serverOf({ token: fromUrl }, (0, workbench_util_1.pageHost)()), { token: fromUrl }, Date.now()));
157
+ this.keepHosts(hosts_1.HostUtil.use(this.list, workbench_util_1.WorkbenchUtil.serverOf(fromUrl, (0, workbench_util_1.pageHost)()), fromUrl, Date.now()));
151
158
  }
152
159
  const host = this.list.hosts.find(one => one.id === this.list.current);
153
160
  if (host) {
@@ -351,6 +358,7 @@ let TaWorkbenchImpl = class TaWorkbenchImpl {
351
358
  return;
352
359
  }
353
360
  this.update({ status: 'online', retryAt: undefined });
361
+ this.presence.resend();
354
362
  void this.refresh();
355
363
  void this.watchRemote(connection);
356
364
  this.roomsWatched = undefined;
@@ -365,6 +373,7 @@ let TaWorkbenchImpl = class TaWorkbenchImpl {
365
373
  // Through a relay the computer has let the page in once the socket is open, and no gateway is behind
366
374
  // it: the calls of the page go now, with the one that reads who it is, not a round trip after it.
367
375
  this.update({ status: 'online', error: undefined, retryAt: undefined });
376
+ this.presence.resend();
368
377
  }
369
378
  let server;
370
379
  try {
@@ -383,6 +392,7 @@ let TaWorkbenchImpl = class TaWorkbenchImpl {
383
392
  }
384
393
  this.keepHosts(hosts_1.HostUtil.use(this.list, workbench_util_1.WorkbenchUtil.serverOf(credential, (0, workbench_util_1.pageHost)()), credential, Date.now(), { user: server.user, host: server.host }));
385
394
  this.update({ status: 'online', error: undefined, retryAt: undefined, server });
395
+ this.presence.resend();
386
396
  await this.refresh();
387
397
  }
388
398
  /** A connection to the computer of `credential`, not opened yet, and whether that computer refused it once it failed. */
package/package.json CHANGED
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "@celljs/ta-web",
3
- "version": "4.13.1",
3
+ "version": "4.15.0",
4
4
  "description": "The web client of ta serve: sessions, streaming messages, tool runs with diffs, and dialogs",
5
5
  "keywords": [
6
6
  "cell-component"
7
7
  ],
8
- "homepage": "https://github.com/cellbang/cell",
8
+ "homepage": "https://github.com/cellbang/ta",
9
9
  "bugs": {
10
- "url": "https://github.com/cellbang/cell/issues"
10
+ "url": "https://github.com/cellbang/ta/issues"
11
11
  },
12
12
  "repository": {
13
13
  "type": "git",
@@ -33,19 +33,19 @@
33
33
  "watch": "tsc -b -w --preserveWatchOutput"
34
34
  },
35
35
  "dependencies": {
36
- "@celljs/core": "4.13.1",
37
- "@celljs/react": "4.13.1",
38
- "@celljs/ta-client": "4.13.1",
39
- "@celljs/ta-protocol": "4.13.1",
40
- "@celljs/ta-relay": "4.13.1",
41
- "@celljs/widget": "4.13.1",
36
+ "@celljs/core": "4.15.0",
37
+ "@celljs/react": "4.15.0",
38
+ "@celljs/ta-client": "4.15.0",
39
+ "@celljs/ta-protocol": "4.15.0",
40
+ "@celljs/ta-relay": "4.15.0",
41
+ "@celljs/widget": "4.15.0",
42
42
  "@types/three": "^0.187.0",
43
43
  "@xterm/addon-fit": "^0.11.0",
44
44
  "@xterm/addon-unicode11": "^0.9.0",
45
45
  "@xterm/addon-webgl": "^0.19.0",
46
46
  "@xterm/xterm": "^6.0.0",
47
47
  "katex": "^0.18.11",
48
- "lucide-react": "^1.72.0",
48
+ "lucide-react": "^1.73.0",
49
49
  "mermaid": "^12.3.0",
50
50
  "monaco-editor": "^0.57.0",
51
51
  "phaser": "^4.2.1",