@celljs/ta-web 4.18.0 → 4.19.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 (63) hide show
  1. package/esm/browser/account/account-side.d.ts +13 -0
  2. package/esm/browser/account/account-side.js +74 -0
  3. package/esm/browser/account/device-account.d.ts +69 -0
  4. package/esm/browser/account/device-account.js +215 -0
  5. package/esm/browser/components/account-menu.d.ts +1 -1
  6. package/esm/browser/components/account-menu.js +5 -2
  7. package/esm/browser/components/account-view.d.ts +17 -0
  8. package/esm/browser/components/account-view.js +216 -0
  9. package/esm/browser/components/app-view.js +2 -2
  10. package/esm/browser/components/cloud-sign-in-view.d.ts +5 -1
  11. package/esm/browser/components/cloud-sign-in-view.js +1 -1
  12. package/esm/browser/components/host-view.d.ts +3 -1
  13. package/esm/browser/components/host-view.js +7 -0
  14. package/esm/browser/components/workbench-view.js +5 -1
  15. package/esm/browser/hosts.d.ts +5 -0
  16. package/esm/browser/hosts.js +11 -0
  17. package/esm/browser/i18n/locales.d.ts +28 -3
  18. package/esm/browser/i18n/messages-ja.js +25 -0
  19. package/esm/browser/i18n/messages-zh-tw.js +25 -0
  20. package/esm/browser/i18n/messages.d.ts +25 -0
  21. package/esm/browser/i18n/messages.js +50 -0
  22. package/esm/browser/style/dialogs.d.ts +1 -1
  23. package/esm/browser/style/dialogs.js +31 -0
  24. package/esm/browser/style/phone.d.ts +1 -1
  25. package/esm/browser/style/phone.js +2 -1
  26. package/esm/browser/workbench-hosts.d.ts +7 -0
  27. package/esm/browser/workbench-hosts.js +20 -0
  28. package/esm/browser/workbench-protocol.d.ts +8 -1
  29. package/esm/browser/workbench-services.d.ts +2 -1
  30. package/esm/browser/workbench-services.js +3 -0
  31. package/esm/browser/workbench-util.d.ts +1 -1
  32. package/lib/browser/account/account-side.d.ts +14 -0
  33. package/lib/browser/account/account-side.js +111 -0
  34. package/lib/browser/account/device-account.d.ts +70 -0
  35. package/lib/browser/account/device-account.js +219 -0
  36. package/lib/browser/components/account-menu.d.ts +1 -1
  37. package/lib/browser/components/account-menu.js +4 -1
  38. package/lib/browser/components/account-view.d.ts +18 -0
  39. package/lib/browser/components/account-view.js +255 -0
  40. package/lib/browser/components/app-view.js +1 -1
  41. package/lib/browser/components/cloud-sign-in-view.d.ts +5 -1
  42. package/lib/browser/components/cloud-sign-in-view.js +1 -0
  43. package/lib/browser/components/host-view.d.ts +3 -1
  44. package/lib/browser/components/host-view.js +8 -0
  45. package/lib/browser/components/workbench-view.js +5 -1
  46. package/lib/browser/hosts.d.ts +5 -0
  47. package/lib/browser/hosts.js +11 -0
  48. package/lib/browser/i18n/locales.d.ts +28 -3
  49. package/lib/browser/i18n/messages-ja.js +25 -0
  50. package/lib/browser/i18n/messages-zh-tw.js +25 -0
  51. package/lib/browser/i18n/messages.d.ts +25 -0
  52. package/lib/browser/i18n/messages.js +50 -0
  53. package/lib/browser/style/dialogs.d.ts +1 -1
  54. package/lib/browser/style/dialogs.js +31 -0
  55. package/lib/browser/style/phone.d.ts +1 -1
  56. package/lib/browser/style/phone.js +2 -1
  57. package/lib/browser/workbench-hosts.d.ts +7 -0
  58. package/lib/browser/workbench-hosts.js +20 -0
  59. package/lib/browser/workbench-protocol.d.ts +8 -1
  60. package/lib/browser/workbench-services.d.ts +2 -1
  61. package/lib/browser/workbench-services.js +3 -0
  62. package/lib/browser/workbench-util.d.ts +1 -1
  63. package/package.json +7 -7
@@ -1335,6 +1335,31 @@ export const JA_MESSAGES = {
1335
1335
  'ta.auth.hintRemote': '認証情報は Ta を実行しているマシンにのみ保存されます。',
1336
1336
  'ta.auth.later': '後で',
1337
1337
  'ta.hosts.title': 'コンピュータ',
1338
+ 'ta.myDevices.title': 'アカウントとデバイス',
1339
+ 'ta.myDevices.hint': 'パソコンとスマホで同じアカウントにログインすると、互いに自動で表示されます。コードの読み取りは不要です。',
1340
+ 'ta.myDevices.signInWith': '{name} でログイン',
1341
+ 'ta.myDevices.enterCode': '{name} でこのコードを入力',
1342
+ 'ta.myDevices.openProvider': '{name} を開く',
1343
+ 'ta.myDevices.waitingTitle': 'ほかのデバイスの許可を待っています',
1344
+ 'ta.myDevices.waitingHint': 'このアカウントでログイン済みのパソコンかスマホで「許可」をタップしてください。コードが同じか確認してください。',
1345
+ 'ta.myDevices.askTitle': '{name} があなたのデバイスに参加しようとしています',
1346
+ 'ta.myDevices.askHint': '自分のデバイスで、同じコードが表示されている場合のみ許可してください。',
1347
+ 'ta.myDevices.code': '確認コード {code}',
1348
+ 'ta.myDevices.allow': '許可',
1349
+ 'ta.myDevices.notMe': '自分ではない',
1350
+ 'ta.myDevices.later': 'あとで',
1351
+ 'ta.myDevices.thisDevice': 'このデバイス',
1352
+ 'ta.myDevices.online': 'オンライン',
1353
+ 'ta.myDevices.seen': '{time}にオンライン',
1354
+ 'ta.myDevices.waiting': '許可待ち',
1355
+ 'ta.myDevices.remove': '削除',
1356
+ 'ta.myDevices.removeConfirm': '{name} をアカウントから削除しますか? あなたのパソコンに接続できなくなります。',
1357
+ 'ta.myDevices.signOut': 'ログアウト',
1358
+ 'ta.myDevices.signOutConfirm': 'アカウントからログアウトしますか? アカウントで追加されたパソコンはこのデバイスから外れ、コードで接続したものは残ります。',
1359
+ 'ta.myDevices.signOutConfirmComputer': 'アカウントからログアウトしますか? アカウントで追加したデバイスはこのパソコンに接続できなくなります。',
1360
+ 'ta.myDevices.none': 'まだこのデバイスだけです。ほかのパソコンやスマホで同じアカウントにログインしてください。',
1361
+ 'ta.myDevices.open': '開く',
1362
+ 'ta.myDevices.signInAccount': 'アカウントでログイン',
1338
1363
  'ta.hosts.scan': 'スキャンして接続',
1339
1364
  'ta.hosts.scanShort': 'スキャン',
1340
1365
  'ta.hosts.paste': 'リンクを貼り付け',
@@ -1336,6 +1336,31 @@ export const ZH_TW_MESSAGES = {
1336
1336
  'ta.auth.hintRemote': '憑據只儲存在執行 Ta 的機器上。',
1337
1337
  'ta.auth.later': '稍後再說',
1338
1338
  'ta.hosts.title': '電腦',
1339
+ 'ta.myDevices.title': '帳號與裝置',
1340
+ 'ta.myDevices.hint': '電腦和手機登入同一個帳號,彼此自動出現,不用掃碼。',
1341
+ 'ta.myDevices.signInWith': '使用 {name} 登入',
1342
+ 'ta.myDevices.enterCode': '在 {name} 輸入這串碼',
1343
+ 'ta.myDevices.openProvider': '開啟 {name}',
1344
+ 'ta.myDevices.waitingTitle': '等待你的其他裝置允許',
1345
+ 'ta.myDevices.waitingHint': '在已登入這個帳號的電腦或手機上點「允許」,核對碼要一致。',
1346
+ 'ta.myDevices.askTitle': '{name} 想加入你的裝置',
1347
+ 'ta.myDevices.askHint': '確認是你自己的裝置、核對碼一致再允許。',
1348
+ 'ta.myDevices.code': '核對碼 {code}',
1349
+ 'ta.myDevices.allow': '允許',
1350
+ 'ta.myDevices.notMe': '不是我',
1351
+ 'ta.myDevices.later': '稍後',
1352
+ 'ta.myDevices.thisDevice': '這台裝置',
1353
+ 'ta.myDevices.online': '在線',
1354
+ 'ta.myDevices.seen': '{time}在線',
1355
+ 'ta.myDevices.waiting': '等待允許',
1356
+ 'ta.myDevices.remove': '移除',
1357
+ 'ta.myDevices.removeConfirm': '從帳號移除 {name}?它將無法再連線你的電腦。',
1358
+ 'ta.myDevices.signOut': '登出帳號',
1359
+ 'ta.myDevices.signOutConfirm': '登出帳號?帳號帶來的電腦會從這台裝置移除,掃碼連線的保留。',
1360
+ 'ta.myDevices.signOutConfirmComputer': '登出帳號?帳號帶來的裝置將無法再連線這台電腦。',
1361
+ 'ta.myDevices.none': '目前只有這台裝置。在其他電腦和手機上登入同一個帳號即可。',
1362
+ 'ta.myDevices.open': '開啟',
1363
+ 'ta.myDevices.signInAccount': '用帳號登入',
1339
1364
  'ta.hosts.scan': '掃碼連線',
1340
1365
  'ta.hosts.scanShort': '掃一掃',
1341
1366
  'ta.hosts.paste': '貼上連結',
@@ -1339,6 +1339,31 @@ export declare const EN_MESSAGES: {
1339
1339
  'ta.auth.hintRemote': string;
1340
1340
  'ta.auth.later': string;
1341
1341
  'ta.hosts.title': string;
1342
+ 'ta.myDevices.title': string;
1343
+ 'ta.myDevices.hint': string;
1344
+ 'ta.myDevices.signInWith': string;
1345
+ 'ta.myDevices.enterCode': string;
1346
+ 'ta.myDevices.openProvider': string;
1347
+ 'ta.myDevices.waitingTitle': string;
1348
+ 'ta.myDevices.waitingHint': string;
1349
+ 'ta.myDevices.askTitle': string;
1350
+ 'ta.myDevices.askHint': string;
1351
+ 'ta.myDevices.code': string;
1352
+ 'ta.myDevices.allow': string;
1353
+ 'ta.myDevices.notMe': string;
1354
+ 'ta.myDevices.later': string;
1355
+ 'ta.myDevices.thisDevice': string;
1356
+ 'ta.myDevices.online': string;
1357
+ 'ta.myDevices.seen': string;
1358
+ 'ta.myDevices.waiting': string;
1359
+ 'ta.myDevices.remove': string;
1360
+ 'ta.myDevices.removeConfirm': string;
1361
+ 'ta.myDevices.signOut': string;
1362
+ 'ta.myDevices.signOutConfirm': string;
1363
+ 'ta.myDevices.signOutConfirmComputer': string;
1364
+ 'ta.myDevices.none': string;
1365
+ 'ta.myDevices.open': string;
1366
+ 'ta.myDevices.signInAccount': string;
1342
1367
  'ta.hosts.scan': string;
1343
1368
  'ta.hosts.scanShort': string;
1344
1369
  'ta.hosts.paste': string;
@@ -1347,6 +1347,31 @@ export const EN_MESSAGES = {
1347
1347
  'ta.auth.hintRemote': 'Credentials stay on the machine that runs Ta.',
1348
1348
  'ta.auth.later': 'Later',
1349
1349
  'ta.hosts.title': 'Computers',
1350
+ 'ta.myDevices.title': 'Account & devices',
1351
+ 'ta.myDevices.hint': 'Sign in to one account on your computers and phone: they show up on each other, no code to scan.',
1352
+ 'ta.myDevices.signInWith': 'Sign in with {name}',
1353
+ 'ta.myDevices.enterCode': 'Enter this code on {name}',
1354
+ 'ta.myDevices.openProvider': 'Open {name}',
1355
+ 'ta.myDevices.waitingTitle': 'Waiting for your other device',
1356
+ 'ta.myDevices.waitingHint': 'On a computer or phone signed in to this account, tap Allow. Check the code is the same.',
1357
+ 'ta.myDevices.askTitle': '{name} wants to join your devices',
1358
+ 'ta.myDevices.askHint': 'Allow only if it is yours and shows the same code.',
1359
+ 'ta.myDevices.code': 'Code {code}',
1360
+ 'ta.myDevices.allow': 'Allow',
1361
+ 'ta.myDevices.notMe': 'Not mine',
1362
+ 'ta.myDevices.later': 'Later',
1363
+ 'ta.myDevices.thisDevice': 'This device',
1364
+ 'ta.myDevices.online': 'Online',
1365
+ 'ta.myDevices.seen': 'Online {time}',
1366
+ 'ta.myDevices.waiting': 'Waiting to be allowed',
1367
+ 'ta.myDevices.remove': 'Remove',
1368
+ 'ta.myDevices.removeConfirm': 'Remove {name} from your account? It can no longer reach your computers.',
1369
+ 'ta.myDevices.signOut': 'Sign out',
1370
+ 'ta.myDevices.signOutConfirm': 'Sign out of the account? The computers it added leave this device; those you scanned stay.',
1371
+ 'ta.myDevices.signOutConfirmComputer': 'Sign out of the account? The devices it added can no longer reach this computer.',
1372
+ 'ta.myDevices.none': 'Only this device so far. Sign in to the same account on your other computers and phone.',
1373
+ 'ta.myDevices.open': 'Open',
1374
+ 'ta.myDevices.signInAccount': 'Sign in with an account',
1350
1375
  'ta.hosts.scan': 'Scan to connect',
1351
1376
  'ta.hosts.scanShort': 'Scan',
1352
1377
  'ta.hosts.paste': 'Paste a link',
@@ -2797,6 +2822,31 @@ export const ZH_MESSAGES = {
2797
2822
  'ta.auth.hintRemote': '凭据只保存在运行 Ta 的机器上。',
2798
2823
  'ta.auth.later': '稍后再说',
2799
2824
  'ta.hosts.title': '电脑',
2825
+ 'ta.myDevices.title': '账号与设备',
2826
+ 'ta.myDevices.hint': '电脑和手机登录同一个账号,彼此自动出现,不用扫码。',
2827
+ 'ta.myDevices.signInWith': '使用 {name} 登录',
2828
+ 'ta.myDevices.enterCode': '在 {name} 输入这串码',
2829
+ 'ta.myDevices.openProvider': '打开 {name}',
2830
+ 'ta.myDevices.waitingTitle': '等待你的其他设备允许',
2831
+ 'ta.myDevices.waitingHint': '在已登录这个账号的电脑或手机上点「允许」,核对码要一致。',
2832
+ 'ta.myDevices.askTitle': '{name} 想加入你的设备',
2833
+ 'ta.myDevices.askHint': '确认是你自己的设备、核对码一致再允许。',
2834
+ 'ta.myDevices.code': '核对码 {code}',
2835
+ 'ta.myDevices.allow': '允许',
2836
+ 'ta.myDevices.notMe': '不是我',
2837
+ 'ta.myDevices.later': '稍后',
2838
+ 'ta.myDevices.thisDevice': '这台设备',
2839
+ 'ta.myDevices.online': '在线',
2840
+ 'ta.myDevices.seen': '{time}在线',
2841
+ 'ta.myDevices.waiting': '等待允许',
2842
+ 'ta.myDevices.remove': '移除',
2843
+ 'ta.myDevices.removeConfirm': '从账号移除 {name}?它将无法再连接你的电脑。',
2844
+ 'ta.myDevices.signOut': '退出账号',
2845
+ 'ta.myDevices.signOutConfirm': '退出账号?账号带来的电脑会从这台设备移除,扫码连接的保留。',
2846
+ 'ta.myDevices.signOutConfirmComputer': '退出账号?账号带来的设备将无法再连接这台电脑。',
2847
+ 'ta.myDevices.none': '目前只有这台设备。在其他电脑和手机上登录同一个账号即可。',
2848
+ 'ta.myDevices.open': '打开',
2849
+ 'ta.myDevices.signInAccount': '用账号登录',
2800
2850
  'ta.hosts.scan': '扫码连接',
2801
2851
  'ta.hosts.scanShort': '扫一扫',
2802
2852
  'ta.hosts.paste': '粘贴链接',
@@ -1,2 +1,2 @@
1
1
  /** Dialogs and sheets, the picker of machines, rows far up a conversation, the sign-in to model accounts, Ta on a phone. */
2
- export declare const DIALOGS_STYLE = "\n/* A dialog in the middle of the page; a sheet from the bottom on a phone */\n.ta-modal-scrim { position: fixed; inset: 0; z-index: 60; display: flex; align-items: flex-start; justify-content: center; padding: 12vh 12px 12px; background: rgba(0, 0, 0, 0.32); animation: ta-fade 140ms ease-out; }\n.ta-modal { position: relative; z-index: 1; width: min(520px, 100%); max-height: 76vh; display: flex; flex-direction: column; gap: 10px; padding: 12px 14px 14px; border-radius: 14px; border: 1px solid var(--ta-border); background: var(--ta-card); box-shadow: var(--ta-shadow-pop); }\n.ta-modal-head { display: flex; align-items: center; justify-content: space-between; padding-left: 2px; }\n.ta-modal-title { font-size: calc(14px * var(--ta-font-scale)); font-weight: 600; }\n.ta-web-dialog { width: min(480px, 100%); gap: 14px; padding: 16px 18px 18px; }\n.ta-web-dialog > :not(.ta-modal-head) { min-height: 0; overflow-y: auto; }\n.ta-web-dialog .ta-modal-title { font-size: calc(16px * var(--ta-font-scale)); }\n.ta-folder-bar { display: flex; align-items: center; gap: 6px; }\n.ta-folder-bar .ta-field input { font-family: var(--ta-mono); font-size: calc(12.5px * var(--ta-font-scale)); }\n/* The path on a touch screen: its folders as buttons, scrolled to the last; it fills the bar as the field does. */\n.ta-folder-crumbs { flex: 1; min-width: 0; display: flex; align-items: center; gap: 2px; height: 34px; padding: 0 6px; overflow-x: auto; scrollbar-width: none; border-radius: 8px; background: var(--ta-input); border: 1px solid var(--ta-border-field); white-space: nowrap; }\n.ta-folder-crumbs::-webkit-scrollbar { display: none; }\n.ta-folder-crumbs[data-clipped] { -webkit-mask-image: linear-gradient(to right, transparent 0, #000 28px); mask-image: linear-gradient(to right, transparent 0, #000 28px); }\n.ta-folder-crumb { flex: none; height: 26px; padding: 0 6px; border: 0; border-radius: 6px; background: transparent; color: var(--ta-secondary); font-size: calc(13px * var(--ta-font-scale)); }\n.ta-folder-crumb:active { background: var(--ta-hover); }\n.ta-folder-crumb.ta-current { color: var(--ta-text); font-weight: 600; }\n.ta-folder-crumb-sep { flex: none; color: var(--ta-muted); }\n.ta-folder-machines .ta-chip-filter { flex: none; max-width: 70%; }\n.ta-folder-list { list-style: none; flex: none; height: min(340px, 44vh); overflow-y: auto; margin: 0; padding: 4px; border: 1px solid var(--ta-border-muted); border-radius: 10px; }\n.ta-folder-item { display: flex; align-items: center; gap: 10px; width: 100%; height: 34px; padding: 0 10px; border: 0; border-radius: 8px; background: transparent; color: var(--ta-body); font-size: calc(13px * var(--ta-font-scale)); text-align: left; }\n.ta-folder-item:hover { background: var(--ta-hover); color: var(--ta-text); }\n.ta-folder-item > .ta-icon:first-child, .ta-folder-chevron { color: var(--ta-muted); }\n.ta-folder-chevron { opacity: 0; }\n.ta-folder-item:hover .ta-folder-chevron { opacity: 1; }\n.ta-folder-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }\n.ta-folder-note { display: flex; justify-content: center; padding: 28px 8px; color: var(--ta-muted); font-size: calc(12.5px * var(--ta-font-scale)); }\n.ta-folder-failed { color: var(--ta-red); font-size: calc(12.5px * var(--ta-font-scale)); overflow-wrap: anywhere; }\n.ta-folder-note { gap: 8px; align-items: center; }\n.ta-folder-step { color: var(--ta-secondary); }\n.ta-folder-unreachable { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 36px 16px; text-align: center; font-size: calc(13px * var(--ta-font-scale)); color: var(--ta-text); }\n.ta-folder-unreachable span { max-width: 100%; color: var(--ta-muted); font-family: var(--ta-mono); font-size: calc(12px * var(--ta-font-scale)); overflow-wrap: anywhere; }\n/* The machines of the picker: this one, the hosts of ssh, + another */\n.ta-modal.ta-folder { width: min(640px, 100%); }\n.ta-folder-machines { flex-wrap: nowrap; overflow-x: auto; margin: 0; padding: 0 0 2px; gap: 6px; scrollbar-width: none; }\n.ta-folder-machines::-webkit-scrollbar { display: none; }\n.ta-folder-machines .ta-icon-button { flex: none; width: 28px; height: 28px; border-radius: 14px; }\n/* A host to add: a row of its own under the machines, as wide as the path, what it may be said under it. */\n.ta-folder-add { display: flex; flex-direction: column; gap: 6px; }\n.ta-folder-add-row { display: flex; align-items: center; gap: 8px; }\n.ta-folder-add-row .ta-field input { font-family: var(--ta-mono); font-size: calc(12.5px * var(--ta-font-scale)); }\n.ta-folder-add-row .ta-field:has(input[aria-invalid='true']) { border-color: var(--ta-red); }\n.ta-folder-add-row .ta-button { flex: none; height: 34px; }\n.ta-folder-add-hint { padding: 0 2px; color: var(--ta-muted); font-size: calc(12px * var(--ta-font-scale)); overflow-wrap: anywhere; }\n.ta-remote-state { display: inline-flex; align-items: center; gap: 6px; }\n.ta-remote-light { width: 7px; height: 7px; border-radius: 50%; background: var(--ta-border-field); flex: none; }\n.ta-remote-light.ta-on { background: var(--ta-green); }\n.ta-remote-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--ta-green); flex: none; }\n/* The host of a directory of another machine, before its name */\n.ta-host-tag { display: inline-flex; align-items: center; gap: 3px; flex: none; box-sizing: border-box; max-width: 120px; height: 17px; padding: 0 5px 0 4px; margin-right: 5px; border-radius: 5px; background: color-mix(in srgb, var(--ta-blue) 11%, transparent); color: color-mix(in srgb, var(--ta-blue) 82%, var(--ta-text)); font-size: calc(11px * var(--ta-font-scale)); font-weight: 500; line-height: calc(17px * var(--ta-font-scale)); white-space: nowrap; vertical-align: middle; }\n.ta-host-tag > svg { flex: none; }\n.ta-host-tag > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; }\n/* In a narrow chip the host gives way before the name of the folder, and both stay inside it. */\n.ta-cwd-chip .ta-host-tag { flex: 0 10 auto; min-width: 0; margin: 0 0 0 2px; }\n.ta-cwd-chip .ta-ellipsis { flex: none; max-width: 60%; }\n/* What ssh asks, and the line while a host connects */\n.ta-remote-prompt { width: min(440px, 100%); gap: 12px; }\n.ta-remote-prompt .ta-confirm-title { display: flex; align-items: center; gap: 8px; }\n.ta-remote-message { margin: 0; padding: 8px 10px; border-radius: 8px; background: var(--ta-hover); color: var(--ta-body); font-family: var(--ta-mono); font-size: calc(12px * var(--ta-font-scale)); line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; max-height: 160px; overflow-y: auto; }\n.ta-remote-status { position: fixed; left: 50%; top: calc(12px + env(safe-area-inset-top) + var(--ta-titlebar, 0px)); z-index: 65; transform: translateX(-50%); display: inline-flex; align-items: center; gap: 8px; max-width: calc(100vw - 32px); height: 32px; padding: 0 14px; border-radius: 16px; border: 1px solid var(--ta-border); background: var(--ta-side); box-shadow: var(--ta-shadow-pop); color: var(--ta-secondary); font-size: calc(12.5px * var(--ta-font-scale)); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; animation: ta-fade 160ms ease-out; }\n/* The picker says it itself */\nbody:has(.ta-folder) .ta-remote-status { display: none; }\n@media (max-width: 860px), (max-height: 500px) and (pointer: coarse) {\n .ta-modal-scrim { align-items: flex-end; padding: 0; }\n .ta-modal { max-height: 88dvh; border-radius: 16px 16px 0 0; padding-bottom: calc(14px + env(safe-area-inset-bottom)); animation: ta-up 260ms var(--ta-ease); }\n .ta-chat-row:hover .ta-compact .ta-chat-time, .ta-chat-row:hover .ta-chat-state { visibility: visible; }\n .ta-chat-row:not(.ta-selected) .ta-chat-delete { display: none; }\n .ta-chat-row.ta-selected .ta-chat-delete { opacity: 1; }\n .ta-chat-row.ta-selected .ta-compact .ta-chat-time, .ta-chat-row.ta-selected .ta-chat-state { visibility: hidden; }\n .ta-chat-row.ta-selected .ta-chat-item:not(.ta-compact) .ta-chat-sub { padding-right: 28px; }\n .ta-folder-chevron { opacity: 1; }\n}\n/* A tap leaves no hover behind on a folder; a press shows. */\n@media (pointer: coarse) {\n .ta-folder-item:hover { background: transparent; color: var(--ta-body); }\n .ta-folder-item:active { background: var(--ta-hover); color: var(--ta-text); }\n}\n\n/* Performance (t6): rows far up the conversation skip layout and paint until they come into view */\n.ta-thread-item { display: flex; flex-direction: column; min-width: 0; contain-intrinsic-size: auto 160px; }\n/* A message nothing is drawn of (pi's note of a changed prompt) takes no gap: the first message does not move down when it comes. */\n.ta-thread-item:empty { display: none; }\n.ta-thread-item.ta-settled { content-visibility: auto; }\n/* Above the messages while the earlier ones of a long conversation load, as it is scrolled up. */\n.ta-earlier { display: flex; justify-content: center; padding: 12px 0; }\n.ta-earlier-idle .ta-spinner { visibility: hidden; animation: none; }\n\n/* Model accounts: the sign-in page, the dialog and a sign-in under way */\n.ta-login-card { width: min(460px, 100%); display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; }\n.ta-login-card h1 { margin: 6px 0 0; font-size: calc(20px * var(--ta-font-scale)); font-weight: 600; color: var(--ta-text); }\n.ta-login-card > p { margin: 0 0 6px; color: var(--ta-secondary); font-size: calc(13.5px * var(--ta-font-scale)); line-height: 1.6; }\n.ta-login-card .ta-auth-panel { width: 100%; text-align: left; }\n.ta-login-card .ta-auth-list { max-height: min(46vh, 420px); }\n.ta-login-later { margin-top: 2px; border: 0; background: none; color: var(--ta-muted); font: inherit; font-size: calc(13px * var(--ta-font-scale)); cursor: pointer; }\n.ta-login-later:hover { color: var(--ta-text); }\n.ta-login-card .ta-pic-cards { margin-top: 4px; }\n.ta-auth-dialog { width: min(520px, 100%); gap: 12px; padding: 16px 18px 18px; }\n.ta-auth-dialog .ta-modal-title { font-size: calc(16px * var(--ta-font-scale)); }\n.ta-auth-panel { display: flex; flex-direction: column; gap: 10px; min-height: 0; }\n.ta-auth-list { display: flex; flex-direction: column; gap: 12px; overflow-y: auto; max-height: 56vh; }\n.ta-auth-group h3 { margin: 0 0 4px; padding: 0 10px; font-size: calc(12px * var(--ta-font-scale)); font-weight: 500; color: var(--ta-muted); }\n.ta-auth-row { display: flex; align-items: center; gap: 4px; }\n.ta-auth-item { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0; height: 38px; padding: 0 10px; border: 0; border-radius: 8px; background: transparent; color: var(--ta-body); font: inherit; font-size: calc(13.5px * var(--ta-font-scale)); text-align: left; cursor: pointer; }\n.ta-auth-item:hover { background: var(--ta-hover); color: var(--ta-text); }\n.ta-auth-item > .ta-icon:last-child { color: var(--ta-muted); }\n.ta-auth-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ta-text); }\n.ta-auth-kind { flex: none; padding: 1px 7px; border-radius: 999px; background: var(--ta-raised); color: var(--ta-muted); font-size: calc(11.5px * var(--ta-font-scale)); }\n.ta-auth-note { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ta-muted); font-size: calc(12px * var(--ta-font-scale)); }\n.ta-auth-on { display: inline-flex; align-items: center; gap: 3px; margin-left: auto; color: var(--ta-green); font-size: calc(12px * var(--ta-font-scale)); max-width: 45%; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }\n.ta-auth-item .ta-auth-on + .ta-icon { margin-left: 0; }\n.ta-auth-item > .ta-auth-kind + .ta-icon { margin-left: auto; }\n.ta-auth-flow { display: flex; flex-direction: column; gap: 14px; text-align: left; }\n.ta-auth-flow-head { display: flex; align-items: center; gap: 8px; }\n.ta-auth-flow-title { font-size: calc(15px * var(--ta-font-scale)); font-weight: 600; color: var(--ta-text); }\n.ta-auth-step { display: flex; flex-direction: column; gap: 10px; }\n.ta-auth-step p { margin: 0; color: var(--ta-body); font-size: calc(13.5px * var(--ta-font-scale)); line-height: 1.6; }\n.ta-auth-actions { display: flex; flex-wrap: wrap; gap: 8px; }\n.ta-auth-code { align-self: flex-start; padding: 8px 14px; border-radius: 10px; background: var(--ta-raised); color: var(--ta-text); font-family: var(--ta-mono); font-size: calc(20px * var(--ta-font-scale)); letter-spacing: 0.12em; user-select: all; }\n.ta-auth-options { display: flex; flex-direction: column; gap: 2px; }\n.ta-auth-link { display: block; margin-top: 4px; color: var(--ta-link, var(--ta-brand)); word-break: break-all; }\n/* The sign-in comes in step by step; its pictures answer the pointer */\n@keyframes ta-rise { from { transform: translateY(10px); opacity: 0; } }\n@keyframes ta-key-dot { 0%, 100% { opacity: .35; } 50% { opacity: 1; transform: translateY(-1.5px); } }\n@keyframes ta-tick { from { stroke-dashoffset: 12; } }\n@keyframes ta-code-in { from { letter-spacing: 0.4em; opacity: 0; } }\n.ta-login-card > * { animation: ta-rise 420ms var(--ta-ease) both; }\n.ta-login-card > :nth-child(2) { animation-delay: 60ms; }\n.ta-login-card > :nth-child(3) { animation-delay: 100ms; }\n.ta-login-card > :nth-child(4) { animation-delay: 150ms; }\n.ta-login-card > :nth-child(5) { animation-delay: 220ms; }\n.ta-login-card .ta-pic-card:hover .ta-pic-tick { stroke-dasharray: 12; animation: ta-tick 420ms var(--ta-ease) both; }\n.ta-login-card .ta-pic-card:hover .ta-pic-dot { animation: ta-key-dot 900ms ease-in-out infinite; }\n.ta-login-card .ta-pic-card:hover .ta-pic-dot:nth-child(n+8) { animation-delay: 90ms; }\n.ta-login-card .ta-pic-card:hover .ta-pic-dot:nth-child(n+10) { animation-delay: 180ms; }\n.ta-login-card .ta-pic-card:hover .ta-pic-dot:nth-child(n+12) { animation-delay: 270ms; }\n.ta-auth-flow > *, .ta-auth-panel > *, .ta-auth-group { animation: ta-in 260ms var(--ta-ease) both; }\n.ta-auth-code { animation: ta-code-in 420ms var(--ta-ease) both; }\n.ta-auth-item { transition: background 120ms, color 120ms, transform 120ms var(--ta-ease); }\n.ta-auth-item:hover > .ta-icon:last-child { transform: translateX(2px); transition: transform 160ms var(--ta-ease); }\n/* Ta on a phone: a picture of the way through the relay, the code to scan, the devices */\n@keyframes ta-qr-in { from { transform: scale(.94); opacity: 0; } }\n.ta-relay-dialog { width: min(440px, 100%); gap: 14px; padding: 16px 18px 18px; }\n.ta-relay-dialog .ta-modal-title { font-size: calc(16px * var(--ta-font-scale)); }\n.ta-relay-start, .ta-relay-pairing { display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; animation: ta-in 260ms var(--ta-ease) both; }\n.ta-relay-start p, .ta-relay-pairing p { margin: 0; color: var(--ta-secondary); font-size: calc(13px * var(--ta-font-scale)); line-height: 1.6; }\n.ta-relay-pic { width: 100%; max-width: 320px; border-radius: 0; }\n.ta-relay-form { display: flex; gap: 8px; width: 100%; }\n.ta-relay-form .ta-field { flex: 1; }\n.ta-qr { width: 220px; height: 220px; border-radius: 12px; animation: ta-qr-in 320ms var(--ta-ease) both; }\n.ta-relay-state { margin-left: 8px; font-weight: 400; color: var(--ta-muted); }\n.ta-relay-state::before { content: ''; display: inline-block; width: 6px; height: 6px; margin-right: 5px; border-radius: 50%; background: var(--ta-muted); vertical-align: middle; }\n.ta-relay-state.ta-on::before { background: var(--ta-green); }\n.ta-relay-device { gap: 10px; height: 38px; padding: 0 4px 0 10px; color: var(--ta-muted); }\n.ta-relay-device .ta-auth-note { flex: none; margin-left: auto; }\n.ta-relay-awake { display: flex; align-items: center; gap: 12px; padding: 0 4px 0 10px; }\n.ta-relay-awake-text { display: flex; flex: 1; min-width: 0; flex-direction: column; gap: 2px; }\n.ta-relay-awake-text .ta-auth-note { white-space: normal; line-height: 1.5; }\n";
2
+ export declare const DIALOGS_STYLE = "\n/* A dialog in the middle of the page; a sheet from the bottom on a phone */\n.ta-modal-scrim { position: fixed; inset: 0; z-index: 60; display: flex; align-items: flex-start; justify-content: center; padding: 12vh 12px 12px; background: rgba(0, 0, 0, 0.32); animation: ta-fade 140ms ease-out; }\n.ta-modal { position: relative; z-index: 1; width: min(520px, 100%); max-height: 76vh; display: flex; flex-direction: column; gap: 10px; padding: 12px 14px 14px; border-radius: 14px; border: 1px solid var(--ta-border); background: var(--ta-card); box-shadow: var(--ta-shadow-pop); }\n.ta-modal-head { display: flex; align-items: center; justify-content: space-between; padding-left: 2px; }\n.ta-modal-title { font-size: calc(14px * var(--ta-font-scale)); font-weight: 600; }\n.ta-web-dialog { width: min(480px, 100%); gap: 14px; padding: 16px 18px 18px; }\n.ta-web-dialog > :not(.ta-modal-head) { min-height: 0; overflow-y: auto; }\n.ta-web-dialog .ta-modal-title { font-size: calc(16px * var(--ta-font-scale)); }\n.ta-folder-bar { display: flex; align-items: center; gap: 6px; }\n.ta-folder-bar .ta-field input { font-family: var(--ta-mono); font-size: calc(12.5px * var(--ta-font-scale)); }\n/* The path on a touch screen: its folders as buttons, scrolled to the last; it fills the bar as the field does. */\n.ta-folder-crumbs { flex: 1; min-width: 0; display: flex; align-items: center; gap: 2px; height: 34px; padding: 0 6px; overflow-x: auto; scrollbar-width: none; border-radius: 8px; background: var(--ta-input); border: 1px solid var(--ta-border-field); white-space: nowrap; }\n.ta-folder-crumbs::-webkit-scrollbar { display: none; }\n.ta-folder-crumbs[data-clipped] { -webkit-mask-image: linear-gradient(to right, transparent 0, #000 28px); mask-image: linear-gradient(to right, transparent 0, #000 28px); }\n.ta-folder-crumb { flex: none; height: 26px; padding: 0 6px; border: 0; border-radius: 6px; background: transparent; color: var(--ta-secondary); font-size: calc(13px * var(--ta-font-scale)); }\n.ta-folder-crumb:active { background: var(--ta-hover); }\n.ta-folder-crumb.ta-current { color: var(--ta-text); font-weight: 600; }\n.ta-folder-crumb-sep { flex: none; color: var(--ta-muted); }\n.ta-folder-machines .ta-chip-filter { flex: none; max-width: 70%; }\n.ta-folder-list { list-style: none; flex: none; height: min(340px, 44vh); overflow-y: auto; margin: 0; padding: 4px; border: 1px solid var(--ta-border-muted); border-radius: 10px; }\n.ta-folder-item { display: flex; align-items: center; gap: 10px; width: 100%; height: 34px; padding: 0 10px; border: 0; border-radius: 8px; background: transparent; color: var(--ta-body); font-size: calc(13px * var(--ta-font-scale)); text-align: left; }\n.ta-folder-item:hover { background: var(--ta-hover); color: var(--ta-text); }\n.ta-folder-item > .ta-icon:first-child, .ta-folder-chevron { color: var(--ta-muted); }\n.ta-folder-chevron { opacity: 0; }\n.ta-folder-item:hover .ta-folder-chevron { opacity: 1; }\n.ta-folder-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }\n.ta-folder-note { display: flex; justify-content: center; padding: 28px 8px; color: var(--ta-muted); font-size: calc(12.5px * var(--ta-font-scale)); }\n.ta-folder-failed { color: var(--ta-red); font-size: calc(12.5px * var(--ta-font-scale)); overflow-wrap: anywhere; }\n.ta-folder-note { gap: 8px; align-items: center; }\n.ta-folder-step { color: var(--ta-secondary); }\n.ta-folder-unreachable { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 36px 16px; text-align: center; font-size: calc(13px * var(--ta-font-scale)); color: var(--ta-text); }\n.ta-folder-unreachable span { max-width: 100%; color: var(--ta-muted); font-family: var(--ta-mono); font-size: calc(12px * var(--ta-font-scale)); overflow-wrap: anywhere; }\n/* The machines of the picker: this one, the hosts of ssh, + another */\n.ta-modal.ta-folder { width: min(640px, 100%); }\n.ta-folder-machines { flex-wrap: nowrap; overflow-x: auto; margin: 0; padding: 0 0 2px; gap: 6px; scrollbar-width: none; }\n.ta-folder-machines::-webkit-scrollbar { display: none; }\n.ta-folder-machines .ta-icon-button { flex: none; width: 28px; height: 28px; border-radius: 14px; }\n/* A host to add: a row of its own under the machines, as wide as the path, what it may be said under it. */\n.ta-folder-add { display: flex; flex-direction: column; gap: 6px; }\n.ta-folder-add-row { display: flex; align-items: center; gap: 8px; }\n.ta-folder-add-row .ta-field input { font-family: var(--ta-mono); font-size: calc(12.5px * var(--ta-font-scale)); }\n.ta-folder-add-row .ta-field:has(input[aria-invalid='true']) { border-color: var(--ta-red); }\n.ta-folder-add-row .ta-button { flex: none; height: 34px; }\n.ta-folder-add-hint { padding: 0 2px; color: var(--ta-muted); font-size: calc(12px * var(--ta-font-scale)); overflow-wrap: anywhere; }\n.ta-remote-state { display: inline-flex; align-items: center; gap: 6px; }\n.ta-remote-light { width: 7px; height: 7px; border-radius: 50%; background: var(--ta-border-field); flex: none; }\n.ta-remote-light.ta-on { background: var(--ta-green); }\n.ta-remote-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--ta-green); flex: none; }\n/* The host of a directory of another machine, before its name */\n.ta-host-tag { display: inline-flex; align-items: center; gap: 3px; flex: none; box-sizing: border-box; max-width: 120px; height: 17px; padding: 0 5px 0 4px; margin-right: 5px; border-radius: 5px; background: color-mix(in srgb, var(--ta-blue) 11%, transparent); color: color-mix(in srgb, var(--ta-blue) 82%, var(--ta-text)); font-size: calc(11px * var(--ta-font-scale)); font-weight: 500; line-height: calc(17px * var(--ta-font-scale)); white-space: nowrap; vertical-align: middle; }\n.ta-host-tag > svg { flex: none; }\n.ta-host-tag > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; }\n/* In a narrow chip the host gives way before the name of the folder, and both stay inside it. */\n.ta-cwd-chip .ta-host-tag { flex: 0 10 auto; min-width: 0; margin: 0 0 0 2px; }\n.ta-cwd-chip .ta-ellipsis { flex: none; max-width: 60%; }\n/* What ssh asks, and the line while a host connects */\n.ta-remote-prompt { width: min(440px, 100%); gap: 12px; }\n.ta-remote-prompt .ta-confirm-title { display: flex; align-items: center; gap: 8px; }\n.ta-remote-message { margin: 0; padding: 8px 10px; border-radius: 8px; background: var(--ta-hover); color: var(--ta-body); font-family: var(--ta-mono); font-size: calc(12px * var(--ta-font-scale)); line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; max-height: 160px; overflow-y: auto; }\n.ta-remote-status { position: fixed; left: 50%; top: calc(12px + env(safe-area-inset-top) + var(--ta-titlebar, 0px)); z-index: 65; transform: translateX(-50%); display: inline-flex; align-items: center; gap: 8px; max-width: calc(100vw - 32px); height: 32px; padding: 0 14px; border-radius: 16px; border: 1px solid var(--ta-border); background: var(--ta-side); box-shadow: var(--ta-shadow-pop); color: var(--ta-secondary); font-size: calc(12.5px * var(--ta-font-scale)); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; animation: ta-fade 160ms ease-out; }\n/* The picker says it itself */\nbody:has(.ta-folder) .ta-remote-status { display: none; }\n@media (max-width: 860px), (max-height: 500px) and (pointer: coarse) {\n .ta-modal-scrim { align-items: flex-end; padding: 0; }\n .ta-modal { max-height: 88dvh; border-radius: 16px 16px 0 0; padding-bottom: calc(14px + env(safe-area-inset-bottom)); animation: ta-up 260ms var(--ta-ease); }\n .ta-chat-row:hover .ta-compact .ta-chat-time, .ta-chat-row:hover .ta-chat-state { visibility: visible; }\n .ta-chat-row:not(.ta-selected) .ta-chat-delete { display: none; }\n .ta-chat-row.ta-selected .ta-chat-delete { opacity: 1; }\n .ta-chat-row.ta-selected .ta-compact .ta-chat-time, .ta-chat-row.ta-selected .ta-chat-state { visibility: hidden; }\n .ta-chat-row.ta-selected .ta-chat-item:not(.ta-compact) .ta-chat-sub { padding-right: 28px; }\n .ta-folder-chevron { opacity: 1; }\n}\n/* A tap leaves no hover behind on a folder; a press shows. */\n@media (pointer: coarse) {\n .ta-folder-item:hover { background: transparent; color: var(--ta-body); }\n .ta-folder-item:active { background: var(--ta-hover); color: var(--ta-text); }\n}\n\n/* Performance (t6): rows far up the conversation skip layout and paint until they come into view */\n.ta-thread-item { display: flex; flex-direction: column; min-width: 0; contain-intrinsic-size: auto 160px; }\n/* A message nothing is drawn of (pi's note of a changed prompt) takes no gap: the first message does not move down when it comes. */\n.ta-thread-item:empty { display: none; }\n.ta-thread-item.ta-settled { content-visibility: auto; }\n/* Above the messages while the earlier ones of a long conversation load, as it is scrolled up. */\n.ta-earlier { display: flex; justify-content: center; padding: 12px 0; }\n.ta-earlier-idle .ta-spinner { visibility: hidden; animation: none; }\n\n/* Model accounts: the sign-in page, the dialog and a sign-in under way */\n.ta-login-card { width: min(460px, 100%); display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; }\n.ta-login-card h1 { margin: 6px 0 0; font-size: calc(20px * var(--ta-font-scale)); font-weight: 600; color: var(--ta-text); }\n.ta-login-card > p { margin: 0 0 6px; color: var(--ta-secondary); font-size: calc(13.5px * var(--ta-font-scale)); line-height: 1.6; }\n.ta-login-card .ta-auth-panel { width: 100%; text-align: left; }\n.ta-login-card .ta-auth-list { max-height: min(46vh, 420px); }\n.ta-login-later { margin-top: 2px; border: 0; background: none; color: var(--ta-muted); font: inherit; font-size: calc(13px * var(--ta-font-scale)); cursor: pointer; }\n.ta-login-later:hover { color: var(--ta-text); }\n.ta-login-card .ta-pic-cards { margin-top: 4px; }\n.ta-auth-dialog { width: min(520px, 100%); gap: 12px; padding: 16px 18px 18px; }\n.ta-auth-dialog .ta-modal-title { font-size: calc(16px * var(--ta-font-scale)); }\n.ta-auth-panel { display: flex; flex-direction: column; gap: 10px; min-height: 0; }\n.ta-auth-list { display: flex; flex-direction: column; gap: 12px; overflow-y: auto; max-height: 56vh; }\n.ta-auth-group h3 { margin: 0 0 4px; padding: 0 10px; font-size: calc(12px * var(--ta-font-scale)); font-weight: 500; color: var(--ta-muted); }\n.ta-auth-row { display: flex; align-items: center; gap: 4px; }\n.ta-auth-item { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0; height: 38px; padding: 0 10px; border: 0; border-radius: 8px; background: transparent; color: var(--ta-body); font: inherit; font-size: calc(13.5px * var(--ta-font-scale)); text-align: left; cursor: pointer; }\n.ta-auth-item:hover { background: var(--ta-hover); color: var(--ta-text); }\n.ta-auth-item > .ta-icon:last-child { color: var(--ta-muted); }\n.ta-auth-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ta-text); }\n.ta-auth-kind { flex: none; padding: 1px 7px; border-radius: 999px; background: var(--ta-raised); color: var(--ta-muted); font-size: calc(11.5px * var(--ta-font-scale)); }\n.ta-auth-note { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ta-muted); font-size: calc(12px * var(--ta-font-scale)); }\n.ta-auth-on { display: inline-flex; align-items: center; gap: 3px; margin-left: auto; color: var(--ta-green); font-size: calc(12px * var(--ta-font-scale)); max-width: 45%; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }\n.ta-auth-item .ta-auth-on + .ta-icon { margin-left: 0; }\n.ta-auth-item > .ta-auth-kind + .ta-icon { margin-left: auto; }\n.ta-auth-flow { display: flex; flex-direction: column; gap: 14px; text-align: left; }\n.ta-auth-flow-head { display: flex; align-items: center; gap: 8px; }\n.ta-auth-flow-title { font-size: calc(15px * var(--ta-font-scale)); font-weight: 600; color: var(--ta-text); }\n.ta-auth-step { display: flex; flex-direction: column; gap: 10px; }\n.ta-auth-step p { margin: 0; color: var(--ta-body); font-size: calc(13.5px * var(--ta-font-scale)); line-height: 1.6; }\n.ta-auth-actions { display: flex; flex-wrap: wrap; gap: 8px; }\n.ta-auth-code { align-self: flex-start; padding: 8px 14px; border-radius: 10px; background: var(--ta-raised); color: var(--ta-text); font-family: var(--ta-mono); font-size: calc(20px * var(--ta-font-scale)); letter-spacing: 0.12em; user-select: all; }\n.ta-auth-options { display: flex; flex-direction: column; gap: 2px; }\n.ta-auth-link { display: block; margin-top: 4px; color: var(--ta-link, var(--ta-brand)); word-break: break-all; }\n/* The sign-in comes in step by step; its pictures answer the pointer */\n@keyframes ta-rise { from { transform: translateY(10px); opacity: 0; } }\n@keyframes ta-key-dot { 0%, 100% { opacity: .35; } 50% { opacity: 1; transform: translateY(-1.5px); } }\n@keyframes ta-tick { from { stroke-dashoffset: 12; } }\n@keyframes ta-code-in { from { letter-spacing: 0.4em; opacity: 0; } }\n.ta-login-card > * { animation: ta-rise 420ms var(--ta-ease) both; }\n.ta-login-card > :nth-child(2) { animation-delay: 60ms; }\n.ta-login-card > :nth-child(3) { animation-delay: 100ms; }\n.ta-login-card > :nth-child(4) { animation-delay: 150ms; }\n.ta-login-card > :nth-child(5) { animation-delay: 220ms; }\n.ta-login-card .ta-pic-card:hover .ta-pic-tick { stroke-dasharray: 12; animation: ta-tick 420ms var(--ta-ease) both; }\n.ta-login-card .ta-pic-card:hover .ta-pic-dot { animation: ta-key-dot 900ms ease-in-out infinite; }\n.ta-login-card .ta-pic-card:hover .ta-pic-dot:nth-child(n+8) { animation-delay: 90ms; }\n.ta-login-card .ta-pic-card:hover .ta-pic-dot:nth-child(n+10) { animation-delay: 180ms; }\n.ta-login-card .ta-pic-card:hover .ta-pic-dot:nth-child(n+12) { animation-delay: 270ms; }\n.ta-auth-flow > *, .ta-auth-panel > *, .ta-auth-group { animation: ta-in 260ms var(--ta-ease) both; }\n.ta-auth-code { animation: ta-code-in 420ms var(--ta-ease) both; }\n.ta-auth-item { transition: background 120ms, color 120ms, transform 120ms var(--ta-ease); }\n.ta-auth-item:hover > .ta-icon:last-child { transform: translateX(2px); transition: transform 160ms var(--ta-ease); }\n/* Ta on a phone: a picture of the way through the relay, the code to scan, the devices */\n@keyframes ta-qr-in { from { transform: scale(.94); opacity: 0; } }\n.ta-relay-dialog { width: min(440px, 100%); gap: 14px; padding: 16px 18px 18px; }\n.ta-relay-dialog .ta-modal-title { font-size: calc(16px * var(--ta-font-scale)); }\n.ta-relay-start, .ta-relay-pairing { display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; animation: ta-in 260ms var(--ta-ease) both; }\n.ta-relay-start p, .ta-relay-pairing p { margin: 0; color: var(--ta-secondary); font-size: calc(13px * var(--ta-font-scale)); line-height: 1.6; }\n.ta-relay-pic { width: 100%; max-width: 320px; border-radius: 0; }\n.ta-relay-form { display: flex; gap: 8px; width: 100%; }\n.ta-relay-form .ta-field { flex: 1; }\n.ta-qr { width: 220px; height: 220px; border-radius: 12px; animation: ta-qr-in 320ms var(--ta-ease) both; }\n.ta-relay-state { margin-left: 8px; font-weight: 400; color: var(--ta-muted); }\n.ta-relay-state::before { content: ''; display: inline-block; width: 6px; height: 6px; margin-right: 5px; border-radius: 50%; background: var(--ta-muted); vertical-align: middle; }\n.ta-relay-state.ta-on::before { background: var(--ta-green); }\n.ta-relay-device { gap: 10px; height: 38px; padding: 0 4px 0 10px; color: var(--ta-muted); }\n.ta-relay-device .ta-auth-note { flex: none; margin-left: auto; }\n.ta-relay-awake { display: flex; align-items: center; gap: 12px; padding: 0 4px 0 10px; }\n.ta-relay-awake-text { display: flex; flex: 1; min-width: 0; flex-direction: column; gap: 2px; }\n.ta-relay-awake-text .ta-auth-note { white-space: normal; line-height: 1.5; }\n/* The account and its devices (account-view.tsx) */\n.ta-account-dialog { width: min(440px, 100%); gap: 14px; padding: 16px 18px 18px; overflow-y: auto; }\n.ta-account-dialog .ta-modal-title { font-size: calc(16px * var(--ta-font-scale)); }\n.ta-account-hint { margin: 0; color: var(--ta-muted); font-size: calc(13px * var(--ta-font-scale)); line-height: 1.55; }\n.ta-account-ways, .ta-account-signing { display: flex; flex-direction: column; align-items: stretch; gap: 10px; }\n.ta-account-signing p { margin: 0; text-align: center; color: var(--ta-secondary); font-size: calc(13px * var(--ta-font-scale)); }\n.ta-account-waiting { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 6px 0 2px; text-align: center; }\n.ta-account-waiting strong { font-size: calc(15px * var(--ta-font-scale)); font-weight: 600; }\n.ta-account-waiting p { margin: 0; color: var(--ta-muted); font-size: calc(13px * var(--ta-font-scale)); line-height: 1.55; }\n.ta-account-code { padding: 12px 22px; border-radius: 14px; background: var(--ta-hover); font-family: var(--ta-mono); font-size: calc(30px * var(--ta-font-scale)); font-weight: 600; letter-spacing: 0.12em; font-variant-numeric: tabular-nums; color: var(--ta-text); white-space: nowrap; }\n.ta-account-devices { display: flex; flex-direction: column; gap: 2px; margin: 0; padding: 0; list-style: none; }\n.ta-account-device { display: flex; align-items: center; gap: 12px; min-height: 54px; padding: 6px 6px 6px 8px; border-radius: 12px; }\n.ta-account-device.ta-waiting { background: var(--ta-hover); }\n.ta-account-device-icon { position: relative; flex: none; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--ta-hover); color: var(--ta-secondary); }\n.ta-account-device.ta-waiting .ta-account-device-icon { background: var(--ta-card); }\n.ta-account-dot { position: absolute; right: 0; bottom: 0; width: 9px; height: 9px; border-radius: 50%; background: var(--ta-muted); box-shadow: 0 0 0 2px var(--ta-card); }\n.ta-account-dot.ta-on { background: var(--ta-green); }\n.ta-account-device-text { display: flex; flex: 1; min-width: 0; flex-direction: column; gap: 2px; font-size: calc(14px * var(--ta-font-scale)); }\n.ta-account-device-detail { color: var(--ta-muted); font-size: calc(12.5px * var(--ta-font-scale)); }\n.ta-account-device-actions { flex: none; display: flex; align-items: center; gap: 6px; }\n.ta-account-device-actions .ta-button { height: 30px; padding: 0 12px; }\n.ta-account-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-top: 12px; border-top: 1px solid var(--ta-border-muted); }\n.ta-account-who { display: flex; align-items: center; gap: 6px; min-width: 0; color: var(--ta-secondary); font-size: calc(13px * var(--ta-font-scale)); }\n.ta-account-foot .ta-button { height: 30px; padding: 0 12px; }\n.ta-account-sign-in { display: flex; width: 100%; flex-direction: column; gap: 12px; text-align: left; }\n.ta-account-ask { position: fixed; left: 50%; bottom: calc(20px + env(safe-area-inset-bottom)); z-index: 58; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px 12px; width: min(420px, calc(100vw - 24px)); padding: 14px 16px; border-radius: 16px; border: 1px solid var(--ta-border); background: var(--ta-card); box-shadow: var(--ta-shadow-pop); transform: translateX(-50%); animation: ta-fade 160ms ease-out; }\n.ta-account-ask-text { display: flex; min-width: 0; flex-direction: column; align-items: flex-start; gap: 6px; }\n.ta-account-ask-text strong { max-width: 100%; font-size: calc(14px * var(--ta-font-scale)); font-weight: 600; }\n.ta-account-ask .ta-account-code { padding: 4px 10px; border-radius: 8px; font-size: calc(20px * var(--ta-font-scale)); }\n.ta-account-ask-actions { grid-column: 1 / -1; display: flex; align-items: center; justify-content: flex-end; gap: 8px; }\n.ta-account-ask-actions .ta-link-button { margin-right: auto; }\n";
@@ -158,5 +158,36 @@ body:has(.ta-folder) .ta-remote-status { display: none; }
158
158
  .ta-relay-awake { display: flex; align-items: center; gap: 12px; padding: 0 4px 0 10px; }
159
159
  .ta-relay-awake-text { display: flex; flex: 1; min-width: 0; flex-direction: column; gap: 2px; }
160
160
  .ta-relay-awake-text .ta-auth-note { white-space: normal; line-height: 1.5; }
161
+ /* The account and its devices (account-view.tsx) */
162
+ .ta-account-dialog { width: min(440px, 100%); gap: 14px; padding: 16px 18px 18px; overflow-y: auto; }
163
+ .ta-account-dialog .ta-modal-title { font-size: calc(16px * var(--ta-font-scale)); }
164
+ .ta-account-hint { margin: 0; color: var(--ta-muted); font-size: calc(13px * var(--ta-font-scale)); line-height: 1.55; }
165
+ .ta-account-ways, .ta-account-signing { display: flex; flex-direction: column; align-items: stretch; gap: 10px; }
166
+ .ta-account-signing p { margin: 0; text-align: center; color: var(--ta-secondary); font-size: calc(13px * var(--ta-font-scale)); }
167
+ .ta-account-waiting { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 6px 0 2px; text-align: center; }
168
+ .ta-account-waiting strong { font-size: calc(15px * var(--ta-font-scale)); font-weight: 600; }
169
+ .ta-account-waiting p { margin: 0; color: var(--ta-muted); font-size: calc(13px * var(--ta-font-scale)); line-height: 1.55; }
170
+ .ta-account-code { padding: 12px 22px; border-radius: 14px; background: var(--ta-hover); font-family: var(--ta-mono); font-size: calc(30px * var(--ta-font-scale)); font-weight: 600; letter-spacing: 0.12em; font-variant-numeric: tabular-nums; color: var(--ta-text); white-space: nowrap; }
171
+ .ta-account-devices { display: flex; flex-direction: column; gap: 2px; margin: 0; padding: 0; list-style: none; }
172
+ .ta-account-device { display: flex; align-items: center; gap: 12px; min-height: 54px; padding: 6px 6px 6px 8px; border-radius: 12px; }
173
+ .ta-account-device.ta-waiting { background: var(--ta-hover); }
174
+ .ta-account-device-icon { position: relative; flex: none; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--ta-hover); color: var(--ta-secondary); }
175
+ .ta-account-device.ta-waiting .ta-account-device-icon { background: var(--ta-card); }
176
+ .ta-account-dot { position: absolute; right: 0; bottom: 0; width: 9px; height: 9px; border-radius: 50%; background: var(--ta-muted); box-shadow: 0 0 0 2px var(--ta-card); }
177
+ .ta-account-dot.ta-on { background: var(--ta-green); }
178
+ .ta-account-device-text { display: flex; flex: 1; min-width: 0; flex-direction: column; gap: 2px; font-size: calc(14px * var(--ta-font-scale)); }
179
+ .ta-account-device-detail { color: var(--ta-muted); font-size: calc(12.5px * var(--ta-font-scale)); }
180
+ .ta-account-device-actions { flex: none; display: flex; align-items: center; gap: 6px; }
181
+ .ta-account-device-actions .ta-button { height: 30px; padding: 0 12px; }
182
+ .ta-account-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-top: 12px; border-top: 1px solid var(--ta-border-muted); }
183
+ .ta-account-who { display: flex; align-items: center; gap: 6px; min-width: 0; color: var(--ta-secondary); font-size: calc(13px * var(--ta-font-scale)); }
184
+ .ta-account-foot .ta-button { height: 30px; padding: 0 12px; }
185
+ .ta-account-sign-in { display: flex; width: 100%; flex-direction: column; gap: 12px; text-align: left; }
186
+ .ta-account-ask { position: fixed; left: 50%; bottom: calc(20px + env(safe-area-inset-bottom)); z-index: 58; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px 12px; width: min(420px, calc(100vw - 24px)); padding: 14px 16px; border-radius: 16px; border: 1px solid var(--ta-border); background: var(--ta-card); box-shadow: var(--ta-shadow-pop); transform: translateX(-50%); animation: ta-fade 160ms ease-out; }
187
+ .ta-account-ask-text { display: flex; min-width: 0; flex-direction: column; align-items: flex-start; gap: 6px; }
188
+ .ta-account-ask-text strong { max-width: 100%; font-size: calc(14px * var(--ta-font-scale)); font-weight: 600; }
189
+ .ta-account-ask .ta-account-code { padding: 4px 10px; border-radius: 8px; font-size: calc(20px * var(--ta-font-scale)); }
190
+ .ta-account-ask-actions { grid-column: 1 / -1; display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
191
+ .ta-account-ask-actions .ta-link-button { margin-right: auto; }
161
192
  `;
162
193
  //# sourceMappingURL=dialogs.js.map
@@ -3,4 +3,4 @@
3
3
  * workbench over it. Where each rests; the finger moves them in between (device/sheet-swipe.ts), and what
4
4
  * a sheet covers moves 30% of the way and darkens a little, as on iOS.
5
5
  */
6
- export declare const PHONE_STYLE = "\n/* Its screens slide in by transforms, never by scrolling: clipped, so that a focus or a menu that opens near an edge never scrolls it sideways. */\n.ta-phone { position: relative; display: block; overflow: clip; background: var(--ta-side); --ta-sheet: transform 360ms cubic-bezier(0.32, 0.72, 0, 1); }\n.ta-phone-home, .ta-phone-screen, .ta-phone > .ta-editors-pane { position: absolute; inset: 0; will-change: transform; transition: var(--ta-sheet); }\n.ta-phone-home { display: flex; flex-direction: column; background: var(--ta-side); }\n.ta-phone-page { flex: 1; min-height: 0; display: flex; flex-direction: column; }\n.ta-phone-page > .ta-sidebar, .ta-phone-page > .ta-main, .ta-phone-page > .ta-phone-stack > * > .ta-sidebar, .ta-phone-page > .ta-phone-stack > * > .ta-main { flex: 1; width: auto; min-height: 0; }\n.ta-phone-page > .ta-phone-stack > .ta-phone-stack-top { background: var(--ta-side); }\n.ta-phone-page .ta-chats, .ta-phone-page .ta-side-view { border-right: 0; padding-bottom: 0; padding-left: calc(8px + env(safe-area-inset-left)); padding-right: calc(8px + env(safe-area-inset-right)); }\n.ta-phone-page .ta-settings-head, .ta-phone-screen .ta-settings-head { padding-left: calc(14px + env(safe-area-inset-left)); padding-right: calc(14px + env(safe-area-inset-right)); }\n.ta-phone-screen { z-index: 2; display: flex; background: var(--ta-main); transform: translate3d(100%, 0, 0); box-shadow: -12px 0 32px rgba(0, 0, 0, 0.12); }\n.ta-phone-screen > .ta-main { flex: 1; min-width: 0; }\n.ta-phone[data-screen] .ta-phone-home { transform: translate3d(-30%, 0, 0); }\n.ta-phone[data-screen] .ta-phone-screen { transform: none; }\n.ta-phone > .ta-editors-pane { z-index: 4; width: auto; min-width: 0; max-width: none; animation: none; transform: translate3d(100%, 0, 0); box-shadow: -12px 0 32px rgba(0, 0, 0, 0.12); }\n.ta-phone[data-workbench] > .ta-editors-pane { transform: none; }\n.ta-phone[data-workbench][data-screen] .ta-phone-screen, .ta-phone[data-workbench]:not([data-screen]) .ta-phone-home { transform: translate3d(-30%, 0, 0); }\n/* What a sheet covers darkens a little, as on iOS (sheet-swipe.ts follows the finger with its opacity). */\n.ta-phone-dim { position: absolute; inset: 0; z-index: 1; background: rgba(0, 0, 0, 0.1); opacity: 0; pointer-events: none; transition: opacity 360ms cubic-bezier(0.32, 0.72, 0, 1); }\n.ta-phone-dim[data-for='workbench'] { z-index: 3; }\n.ta-phone[data-screen] > .ta-phone-dim[data-for='screen'], .ta-phone[data-workbench] > .ta-phone-dim[data-for='workbench'] { opacity: 1; }\n/*\n * A layer at rest out of sight is not drawn: its shadow would show at the edge of the screen, and the page\n * would paint what nobody sees. It goes once it has slid away, and is there at once to come in, or for a finger.\n */\n.ta-phone-screen, .ta-phone > .ta-editors-pane { visibility: hidden; transition: var(--ta-sheet), visibility 0s 360ms; }\n.ta-phone[data-screen] .ta-phone-screen, .ta-phone[data-workbench] > .ta-editors-pane { visibility: visible; transition: var(--ta-sheet); }\n.ta-phone[data-screen] .ta-phone-home, .ta-phone[data-workbench] .ta-phone-home { visibility: hidden; transition: var(--ta-sheet), visibility 0s 360ms; }\n.ta-phone[data-workbench][data-screen] .ta-phone-screen { visibility: hidden; transition: var(--ta-sheet), visibility 0s 360ms; }\n/*\n * While a finger moves a sheet, or the browser went back by itself (its own swipe was the animation), nothing slides on its own,\n * and what it uncovers is there: as specific as the rules of the layers at rest (style.spec.ts checks), so that the conversation\n * under the workbench shows while the workbench is put away.\n */\n:root[data-sheet-drag] .ta-phone > .ta-phone-home, :root[data-sheet-drag] .ta-phone > .ta-phone-screen, :root[data-sheet-drag] .ta-phone > .ta-editors-pane { visibility: visible; transition: none; }\n:root[data-sheet-drag] .ta-phone-dim { transition: none; }\n/*\n * A frame the page may not read (an HTML file, a PDF, the browser) keeps the touches on it: the left edge of the\n * workbench over it stays the page's, so that a swipe from there puts the workbench away, as iOS keeps its back\n * at the edge over web content. Frames it may read (Markdown) are listened to anywhere (sheet-swipe.ts).\n */\n.ta-phone > .ta-editors-pane .ta-editor-body:has(iframe) { position: relative; }\n.ta-phone > .ta-editors-pane .ta-editor-body:has(iframe)::before { content: ''; position: absolute; z-index: 1; top: 0; bottom: 0; left: 0; width: 24px; }\n/* A screen pushed over the screen (PhoneStack): a section of the settings over their list, as the screen over the tabs. */\n.ta-phone-stack { position: relative; flex: 1; min-height: 0; overflow: hidden; }\n.ta-phone-stack-base, .ta-phone-stack-top { position: absolute; inset: 0; display: flex; flex-direction: column; will-change: transform; transition: var(--ta-sheet); }\n.ta-phone-stack-top { z-index: 2; background: var(--ta-main); transform: translate3d(100%, 0, 0); box-shadow: -12px 0 32px rgba(0, 0, 0, 0.12); visibility: hidden; transition: var(--ta-sheet), visibility 0s 360ms; }\n.ta-phone-stack[data-open] > .ta-phone-stack-top { transform: none; visibility: visible; transition: var(--ta-sheet); }\n.ta-phone-stack[data-open] > .ta-phone-stack-base { transform: translate3d(-30%, 0, 0); visibility: hidden; transition: var(--ta-sheet), visibility 0s 360ms; }\n.ta-phone-stack[data-open] > .ta-phone-dim { opacity: 1; }\n:root[data-sheet-drag] .ta-phone-stack-base, :root[data-sheet-drag] .ta-phone-stack-top { visibility: visible; transition: none; }\n/* The tabs: a finger's height above the home indicator; away while the keyboard is up. */\n.ta-tabbar { display: flex; flex: none; padding: 0 env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left); border-top: 1px solid var(--ta-border-muted); background: var(--ta-side); }\n:root[data-keyboard] .ta-tabbar { display: none; }\n.ta-tabbar-item { flex: 1; min-width: 0; height: 54px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; padding: 0; border: 0; background: none; color: var(--ta-muted); font-size: calc(10.5px * var(--ta-font-scale)); -webkit-tap-highlight-color: transparent; }\n.ta-tabbar-item > span { max-width: 100%; padding: 0 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }\n.ta-tabbar-item.ta-active { color: var(--ta-text); font-weight: 600; }\n.ta-tabbar-item > .ta-tabbar-icon { position: relative; display: inline-grid; place-items: center; max-width: none; padding: 0; overflow: visible; }\n.ta-tabbar-dot { position: absolute; top: -1px; right: -3px; width: 8px; height: 8px; border-radius: 50%; background: var(--ta-yellow); box-shadow: 0 0 0 2px var(--ta-side); }\n/* A finger drags it off as a drop (UnseenDrop): a wider grip than it looks, and the drop drawn over the page meanwhile. */\n.ta-tabbar-dot.ta-draggable { touch-action: none; }\n.ta-tabbar-dot.ta-draggable::before { content: ''; position: absolute; inset: -9px; border-radius: 50%; }\n/* The same on the entry of the double on the rail of a computer, and on the avatar of a row. */\n.ta-rail-dot { top: 6px; right: 6px; }\n.ta-chat-dot.ta-draggable { touch-action: none; cursor: grab; }\n.ta-chat-dot.ta-draggable::before { content: ''; position: absolute; inset: -10px; border-radius: 50%; }\n.ta-chat-line > .ta-chat-dot.ta-draggable { position: relative; }\n.ta-tabbar-dot[data-dragging], .ta-asks-badge[data-dragging], .ta-chat-dot[data-dragging] { visibility: hidden; }\n.ta-asks-badge.ta-draggable { pointer-events: auto; touch-action: none; cursor: grab; }\n.ta-asks-badge.ta-draggable::before { content: ''; position: absolute; inset: -8px; border-radius: 16px; }\n.ta-unseen-drag { position: fixed; inset: 0; z-index: 2147483000; width: 100%; height: 100%; overflow: visible; pointer-events: none; fill: var(--ta-yellow); }\n.ta-unseen-ring { fill: none; stroke: var(--ta-yellow); stroke-width: 2; transform-box: fill-box; transform-origin: center; animation: ta-unseen-ring 380ms ease-out forwards; }\n.ta-unseen-spark { transform-box: fill-box; transform-origin: center; animation: ta-unseen-spark 400ms cubic-bezier(0.2, 0.7, 0.3, 1) forwards; }\n.ta-unseen-drag.ta-asks { fill: var(--ta-blue); }\n.ta-unseen-drag.ta-asks .ta-unseen-ring { stroke: var(--ta-blue); }\n@keyframes ta-unseen-ring { from { transform: scale(1); opacity: 0.9; } to { transform: scale(2.6); opacity: 0; } }\n@keyframes ta-unseen-spark { to { transform: translate(var(--dx), var(--dy)) scale(0.2); opacity: 0; } }\n/* A row with a dot that the tab scrolled to (PhoneUtil.locate): lit up a moment. */\n[data-unseen][data-flash] { position: relative; }\n[data-unseen][data-flash]::after { content: ''; position: absolute; inset: 0; z-index: 2; border-radius: 12px; background: color-mix(in srgb, var(--ta-yellow) 18%, transparent); pointer-events: none; animation: ta-unseen-flash 1s ease-out forwards; }\n@keyframes ta-unseen-flash { 0%, 35% { opacity: 1; } to { opacity: 0; } }\n[data-asks][data-flash] { position: relative; }\n[data-asks][data-flash]::after { content: ''; position: absolute; inset: 0; z-index: 2; border-radius: 12px; background: color-mix(in srgb, var(--ta-blue) 16%, transparent); pointer-events: none; animation: ta-unseen-flash 1s ease-out forwards; }\n/* Sideways the height is short: the label beside the icon, as iOS lays its tabs out then. */\n@media (max-height: 500px) and (pointer: coarse) {\n .ta-tabbar-item { height: 40px; flex-direction: row; gap: 6px; font-size: calc(12px * var(--ta-font-scale)); }\n}\n\n/*\n * Over the first tab (ta-launcher.md): the launcher lies under the home, which a pull down moves to a strip at\n * the bottom (device/pull-down.ts); the board comes over it from the right, as a screen does.\n */\n.ta-phone { --ta-peek: calc(72px + env(safe-area-inset-bottom)); }\n.ta-phone-home { z-index: 1; }\n.ta-phone-launcher { position: absolute; inset: 0; z-index: 0; overflow: hidden; background: var(--ta-main); visibility: hidden; transition: visibility 0s 360ms; }\n/* The body moves (and so holds what is fixed in it, as menus); what scrolls is inside it. */\n.ta-phone-launcher-body { position: absolute; inset: 0; display: flex; flex-direction: column; opacity: 0; transform: translate3d(0, -36px, 0) scale(0.94); transform-origin: 50% 0; will-change: transform, opacity; transition: transform 360ms cubic-bezier(0.32, 0.72, 0, 1), opacity 360ms cubic-bezier(0.32, 0.72, 0, 1); }\n.ta-phone-launcher .ta-launcher-scroll { padding: calc(14px + env(safe-area-inset-top)) calc(16px + env(safe-area-inset-right)) calc(var(--ta-peek) + 20px) calc(16px + env(safe-area-inset-left)); }\n.ta-phone-launcher .ta-launcher-search-head { padding: calc(10px + env(safe-area-inset-top)) calc(12px + env(safe-area-inset-right)) 8px calc(12px + env(safe-area-inset-left)); }\n.ta-phone-launcher .ta-launcher-search-body { padding-bottom: calc(16px + env(safe-area-inset-bottom)); }\n:root[data-keyboard] .ta-phone-launcher .ta-launcher-search-body { padding-bottom: calc(16px + var(--ta-keyboard, 0px)); }\n/* Searching, the home goes all the way down: the page of the search has the whole screen. */\n.ta-phone[data-surface='launcher'][data-surface-stack] .ta-phone-home { transform: translate3d(0, 100%, 0); box-shadow: none; }\n.ta-phone[data-surface='launcher'][data-surface-stack] .ta-phone-peek { visibility: hidden; pointer-events: none; }\n.ta-phone[data-surface='launcher'] .ta-phone-launcher { visibility: visible; transition: none; }\n.ta-phone[data-surface='launcher'] .ta-phone-launcher-body { opacity: 1; transform: none; }\n.ta-phone[data-surface='launcher'] .ta-phone-home { transform: translate3d(0, calc(100% - var(--ta-peek)), 0); }\n.ta-phone[data-surface='launcher'] .ta-phone-home, :root[data-pull] .ta-phone-home { overflow: hidden; border-radius: 18px 18px 0 0; box-shadow: 0 -8px 28px rgba(0, 0, 0, 0.12); }\n:root[data-pull] .ta-phone-launcher { visibility: visible; transition: none; }\n:root[data-pull] .ta-phone-launcher-body, :root[data-pull] .ta-phone-home, :root[data-sheet-drag] .ta-phone-board { transition: none; }\n.ta-phone-peek { position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; height: var(--ta-peek); padding: 0; border: 0; background: transparent; visibility: hidden; pointer-events: none; -webkit-tap-highlight-color: transparent; }\n.ta-phone-peek::before { content: ''; position: absolute; top: 7px; left: 50%; width: 36px; height: 4px; border-radius: 2px; background: var(--ta-border-field); transform: translateX(-50%); }\n.ta-phone[data-surface='launcher'] .ta-phone-peek { visibility: visible; pointer-events: auto; }\n/* Over the screen, which a drag of it shows at the right edge with its shadow. */\n.ta-phone-board { position: absolute; inset: 0; z-index: 3; display: flex; flex-direction: column; background: var(--ta-side); transform: translate3d(-100%, 0, 0); box-shadow: 12px 0 32px rgba(0, 0, 0, 0.12); will-change: transform; visibility: hidden; transition: var(--ta-sheet), visibility 0s 360ms; }\n.ta-phone-board .ta-board-head { padding: calc(10px + env(safe-area-inset-top)) calc(14px + env(safe-area-inset-right)) 8px calc(8px + env(safe-area-inset-left)); }\n.ta-phone-board .ta-board-body { padding-left: calc(14px + env(safe-area-inset-left)); padding-right: calc(14px + env(safe-area-inset-right)); }\n.ta-phone[data-surface='board'] .ta-phone-board { transform: none; visibility: visible; transition: var(--ta-sheet); }\n.ta-phone[data-surface='board'] .ta-phone-home { transform: translate3d(30%, 0, 0); visibility: hidden; transition: var(--ta-sheet), visibility 0s 360ms; }\n.ta-phone-dim[data-for='board'] { z-index: 1; }\n/* The board moved by a finger: the screen and the workbench off to the right stay hidden, their shadows too. */\n:root[data-sheet-drag='board'] .ta-phone > .ta-phone-screen, :root[data-sheet-drag='board'] .ta-phone > .ta-editors-pane { visibility: hidden; }\n/* The search of the launcher put away is never seen, whatever sheet a finger moves. */\n.ta-phone-launcher[inert] .ta-phone-stack-top { visibility: hidden !important; }\n.ta-phone[data-surface='board'] > .ta-phone-dim[data-for='board'] { opacity: 1; }\n\n/* A chat on a phone: its row is a SwipeRow (style/device.ts). */\n.ta-phone .ta-chat-item:active { background: var(--ta-hover); }\n";
6
+ export declare const PHONE_STYLE = "\n/* Its screens slide in by transforms, never by scrolling: clipped, so that a focus or a menu that opens near an edge never scrolls it sideways. */\n.ta-phone { position: relative; display: block; overflow: clip; background: var(--ta-side); --ta-sheet: transform 360ms cubic-bezier(0.32, 0.72, 0, 1); }\n.ta-phone-home, .ta-phone-screen, .ta-phone > .ta-editors-pane { position: absolute; inset: 0; will-change: transform; transition: var(--ta-sheet); }\n.ta-phone-home { display: flex; flex-direction: column; background: var(--ta-side); }\n.ta-phone-page { flex: 1; min-height: 0; display: flex; flex-direction: column; }\n.ta-phone-page > .ta-sidebar, .ta-phone-page > .ta-main, .ta-phone-page > .ta-phone-stack > * > .ta-sidebar, .ta-phone-page > .ta-phone-stack > * > .ta-main { flex: 1; width: auto; min-height: 0; }\n.ta-phone-page > .ta-phone-stack > .ta-phone-stack-top { background: var(--ta-side); }\n.ta-phone-page .ta-chats, .ta-phone-page .ta-side-view { border-right: 0; padding-bottom: 0; padding-left: calc(8px + env(safe-area-inset-left)); padding-right: calc(8px + env(safe-area-inset-right)); }\n.ta-phone-page .ta-settings-head, .ta-phone-screen .ta-settings-head { padding-left: calc(14px + env(safe-area-inset-left)); padding-right: calc(14px + env(safe-area-inset-right)); }\n.ta-phone-screen { z-index: 2; display: flex; background: var(--ta-main); transform: translate3d(100%, 0, 0); box-shadow: -12px 0 32px rgba(0, 0, 0, 0.12); }\n.ta-phone-screen > .ta-main { flex: 1; min-width: 0; }\n.ta-phone[data-screen] .ta-phone-home { transform: translate3d(-30%, 0, 0); }\n.ta-phone[data-screen] .ta-phone-screen { transform: none; }\n.ta-phone > .ta-editors-pane { z-index: 4; width: auto; min-width: 0; max-width: none; animation: none; transform: translate3d(100%, 0, 0); box-shadow: -12px 0 32px rgba(0, 0, 0, 0.12); }\n.ta-phone[data-workbench] > .ta-editors-pane { transform: none; }\n.ta-phone[data-workbench][data-screen] .ta-phone-screen, .ta-phone[data-workbench]:not([data-screen]) .ta-phone-home { transform: translate3d(-30%, 0, 0); }\n/* What a sheet covers darkens a little, as on iOS (sheet-swipe.ts follows the finger with its opacity). */\n.ta-phone-dim { position: absolute; inset: 0; z-index: 1; background: rgba(0, 0, 0, 0.1); opacity: 0; pointer-events: none; transition: opacity 360ms cubic-bezier(0.32, 0.72, 0, 1); }\n.ta-phone-dim[data-for='workbench'] { z-index: 3; }\n.ta-phone[data-screen] > .ta-phone-dim[data-for='screen'], .ta-phone[data-workbench] > .ta-phone-dim[data-for='workbench'] { opacity: 1; }\n/*\n * A layer at rest out of sight is not drawn: its shadow would show at the edge of the screen, and the page\n * would paint what nobody sees. It goes once it has slid away, and is there at once to come in, or for a finger.\n */\n.ta-phone-screen, .ta-phone > .ta-editors-pane { visibility: hidden; transition: var(--ta-sheet), visibility 0s 360ms; }\n.ta-phone[data-screen] .ta-phone-screen, .ta-phone[data-workbench] > .ta-editors-pane { visibility: visible; transition: var(--ta-sheet); }\n.ta-phone[data-screen] .ta-phone-home, .ta-phone[data-workbench] .ta-phone-home { visibility: hidden; transition: var(--ta-sheet), visibility 0s 360ms; }\n.ta-phone[data-workbench][data-screen] .ta-phone-screen { visibility: hidden; transition: var(--ta-sheet), visibility 0s 360ms; }\n/*\n * While a finger moves a sheet, or the browser went back by itself (its own swipe was the animation), nothing slides on its own,\n * and what it uncovers is there: as specific as the rules of the layers at rest (style.spec.ts checks), so that the conversation\n * under the workbench shows while the workbench is put away.\n */\n:root[data-sheet-drag] .ta-phone > .ta-phone-home, :root[data-sheet-drag] .ta-phone > .ta-phone-screen, :root[data-sheet-drag] .ta-phone > .ta-editors-pane { visibility: visible; transition: none; }\n:root[data-sheet-drag] .ta-phone-dim { transition: none; }\n/*\n * A frame the page may not read (an HTML file, a PDF, the browser) keeps the touches on it: the left edge of the\n * workbench over it stays the page's, so that a swipe from there puts the workbench away, as iOS keeps its back\n * at the edge over web content. Frames it may read (Markdown) are listened to anywhere (sheet-swipe.ts).\n */\n.ta-phone > .ta-editors-pane .ta-editor-body:has(iframe) { position: relative; }\n.ta-phone > .ta-editors-pane .ta-editor-body:has(iframe)::before { content: ''; position: absolute; z-index: 1; top: 0; bottom: 0; left: 0; width: 24px; }\n/* A screen pushed over the screen (PhoneStack): a section of the settings over their list, as the screen over the tabs. */\n/* clip, not hidden: a focus or scrollIntoView inside must not scroll the level off-screen into view sideways */\n.ta-phone-stack { position: relative; flex: 1; min-height: 0; overflow: hidden; overflow: clip; }\n.ta-phone-stack-base, .ta-phone-stack-top { position: absolute; inset: 0; display: flex; flex-direction: column; will-change: transform; transition: var(--ta-sheet); }\n.ta-phone-stack-top { z-index: 2; background: var(--ta-main); transform: translate3d(100%, 0, 0); box-shadow: -12px 0 32px rgba(0, 0, 0, 0.12); visibility: hidden; transition: var(--ta-sheet), visibility 0s 360ms; }\n.ta-phone-stack[data-open] > .ta-phone-stack-top { transform: none; visibility: visible; transition: var(--ta-sheet); }\n.ta-phone-stack[data-open] > .ta-phone-stack-base { transform: translate3d(-30%, 0, 0); visibility: hidden; transition: var(--ta-sheet), visibility 0s 360ms; }\n.ta-phone-stack[data-open] > .ta-phone-dim { opacity: 1; }\n:root[data-sheet-drag] .ta-phone-stack-base, :root[data-sheet-drag] .ta-phone-stack-top { visibility: visible; transition: none; }\n/* The tabs: a finger's height above the home indicator; away while the keyboard is up. */\n.ta-tabbar { display: flex; flex: none; padding: 0 env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left); border-top: 1px solid var(--ta-border-muted); background: var(--ta-side); }\n:root[data-keyboard] .ta-tabbar { display: none; }\n.ta-tabbar-item { flex: 1; min-width: 0; height: 54px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; padding: 0; border: 0; background: none; color: var(--ta-muted); font-size: calc(10.5px * var(--ta-font-scale)); -webkit-tap-highlight-color: transparent; }\n.ta-tabbar-item > span { max-width: 100%; padding: 0 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }\n.ta-tabbar-item.ta-active { color: var(--ta-text); font-weight: 600; }\n.ta-tabbar-item > .ta-tabbar-icon { position: relative; display: inline-grid; place-items: center; max-width: none; padding: 0; overflow: visible; }\n.ta-tabbar-dot { position: absolute; top: -1px; right: -3px; width: 8px; height: 8px; border-radius: 50%; background: var(--ta-yellow); box-shadow: 0 0 0 2px var(--ta-side); }\n/* A finger drags it off as a drop (UnseenDrop): a wider grip than it looks, and the drop drawn over the page meanwhile. */\n.ta-tabbar-dot.ta-draggable { touch-action: none; }\n.ta-tabbar-dot.ta-draggable::before { content: ''; position: absolute; inset: -9px; border-radius: 50%; }\n/* The same on the entry of the double on the rail of a computer, and on the avatar of a row. */\n.ta-rail-dot { top: 6px; right: 6px; }\n.ta-chat-dot.ta-draggable { touch-action: none; cursor: grab; }\n.ta-chat-dot.ta-draggable::before { content: ''; position: absolute; inset: -10px; border-radius: 50%; }\n.ta-chat-line > .ta-chat-dot.ta-draggable { position: relative; }\n.ta-tabbar-dot[data-dragging], .ta-asks-badge[data-dragging], .ta-chat-dot[data-dragging] { visibility: hidden; }\n.ta-asks-badge.ta-draggable { pointer-events: auto; touch-action: none; cursor: grab; }\n.ta-asks-badge.ta-draggable::before { content: ''; position: absolute; inset: -8px; border-radius: 16px; }\n.ta-unseen-drag { position: fixed; inset: 0; z-index: 2147483000; width: 100%; height: 100%; overflow: visible; pointer-events: none; fill: var(--ta-yellow); }\n.ta-unseen-ring { fill: none; stroke: var(--ta-yellow); stroke-width: 2; transform-box: fill-box; transform-origin: center; animation: ta-unseen-ring 380ms ease-out forwards; }\n.ta-unseen-spark { transform-box: fill-box; transform-origin: center; animation: ta-unseen-spark 400ms cubic-bezier(0.2, 0.7, 0.3, 1) forwards; }\n.ta-unseen-drag.ta-asks { fill: var(--ta-blue); }\n.ta-unseen-drag.ta-asks .ta-unseen-ring { stroke: var(--ta-blue); }\n@keyframes ta-unseen-ring { from { transform: scale(1); opacity: 0.9; } to { transform: scale(2.6); opacity: 0; } }\n@keyframes ta-unseen-spark { to { transform: translate(var(--dx), var(--dy)) scale(0.2); opacity: 0; } }\n/* A row with a dot that the tab scrolled to (PhoneUtil.locate): lit up a moment. */\n[data-unseen][data-flash] { position: relative; }\n[data-unseen][data-flash]::after { content: ''; position: absolute; inset: 0; z-index: 2; border-radius: 12px; background: color-mix(in srgb, var(--ta-yellow) 18%, transparent); pointer-events: none; animation: ta-unseen-flash 1s ease-out forwards; }\n@keyframes ta-unseen-flash { 0%, 35% { opacity: 1; } to { opacity: 0; } }\n[data-asks][data-flash] { position: relative; }\n[data-asks][data-flash]::after { content: ''; position: absolute; inset: 0; z-index: 2; border-radius: 12px; background: color-mix(in srgb, var(--ta-blue) 16%, transparent); pointer-events: none; animation: ta-unseen-flash 1s ease-out forwards; }\n/* Sideways the height is short: the label beside the icon, as iOS lays its tabs out then. */\n@media (max-height: 500px) and (pointer: coarse) {\n .ta-tabbar-item { height: 40px; flex-direction: row; gap: 6px; font-size: calc(12px * var(--ta-font-scale)); }\n}\n\n/*\n * Over the first tab (ta-launcher.md): the launcher lies under the home, which a pull down moves to a strip at\n * the bottom (device/pull-down.ts); the board comes over it from the right, as a screen does.\n */\n.ta-phone { --ta-peek: calc(72px + env(safe-area-inset-bottom)); }\n.ta-phone-home { z-index: 1; }\n.ta-phone-launcher { position: absolute; inset: 0; z-index: 0; overflow: hidden; background: var(--ta-main); visibility: hidden; transition: visibility 0s 360ms; }\n/* The body moves (and so holds what is fixed in it, as menus); what scrolls is inside it. */\n.ta-phone-launcher-body { position: absolute; inset: 0; display: flex; flex-direction: column; opacity: 0; transform: translate3d(0, -36px, 0) scale(0.94); transform-origin: 50% 0; will-change: transform, opacity; transition: transform 360ms cubic-bezier(0.32, 0.72, 0, 1), opacity 360ms cubic-bezier(0.32, 0.72, 0, 1); }\n.ta-phone-launcher .ta-launcher-scroll { padding: calc(14px + env(safe-area-inset-top)) calc(16px + env(safe-area-inset-right)) calc(var(--ta-peek) + 20px) calc(16px + env(safe-area-inset-left)); }\n.ta-phone-launcher .ta-launcher-search-head { padding: calc(10px + env(safe-area-inset-top)) calc(12px + env(safe-area-inset-right)) 8px calc(12px + env(safe-area-inset-left)); }\n.ta-phone-launcher .ta-launcher-search-body { padding-bottom: calc(16px + env(safe-area-inset-bottom)); }\n:root[data-keyboard] .ta-phone-launcher .ta-launcher-search-body { padding-bottom: calc(16px + var(--ta-keyboard, 0px)); }\n/* Searching, the home goes all the way down: the page of the search has the whole screen. */\n.ta-phone[data-surface='launcher'][data-surface-stack] .ta-phone-home { transform: translate3d(0, 100%, 0); box-shadow: none; }\n.ta-phone[data-surface='launcher'][data-surface-stack] .ta-phone-peek { visibility: hidden; pointer-events: none; }\n.ta-phone[data-surface='launcher'] .ta-phone-launcher { visibility: visible; transition: none; }\n.ta-phone[data-surface='launcher'] .ta-phone-launcher-body { opacity: 1; transform: none; }\n.ta-phone[data-surface='launcher'] .ta-phone-home { transform: translate3d(0, calc(100% - var(--ta-peek)), 0); }\n.ta-phone[data-surface='launcher'] .ta-phone-home, :root[data-pull] .ta-phone-home { overflow: hidden; border-radius: 18px 18px 0 0; box-shadow: 0 -8px 28px rgba(0, 0, 0, 0.12); }\n:root[data-pull] .ta-phone-launcher { visibility: visible; transition: none; }\n:root[data-pull] .ta-phone-launcher-body, :root[data-pull] .ta-phone-home, :root[data-sheet-drag] .ta-phone-board { transition: none; }\n.ta-phone-peek { position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; height: var(--ta-peek); padding: 0; border: 0; background: transparent; visibility: hidden; pointer-events: none; -webkit-tap-highlight-color: transparent; }\n.ta-phone-peek::before { content: ''; position: absolute; top: 7px; left: 50%; width: 36px; height: 4px; border-radius: 2px; background: var(--ta-border-field); transform: translateX(-50%); }\n.ta-phone[data-surface='launcher'] .ta-phone-peek { visibility: visible; pointer-events: auto; }\n/* Over the screen, which a drag of it shows at the right edge with its shadow. */\n.ta-phone-board { position: absolute; inset: 0; z-index: 3; display: flex; flex-direction: column; background: var(--ta-side); transform: translate3d(-100%, 0, 0); box-shadow: 12px 0 32px rgba(0, 0, 0, 0.12); will-change: transform; visibility: hidden; transition: var(--ta-sheet), visibility 0s 360ms; }\n.ta-phone-board .ta-board-head { padding: calc(10px + env(safe-area-inset-top)) calc(14px + env(safe-area-inset-right)) 8px calc(8px + env(safe-area-inset-left)); }\n.ta-phone-board .ta-board-body { padding-left: calc(14px + env(safe-area-inset-left)); padding-right: calc(14px + env(safe-area-inset-right)); }\n.ta-phone[data-surface='board'] .ta-phone-board { transform: none; visibility: visible; transition: var(--ta-sheet); }\n.ta-phone[data-surface='board'] .ta-phone-home { transform: translate3d(30%, 0, 0); visibility: hidden; transition: var(--ta-sheet), visibility 0s 360ms; }\n.ta-phone-dim[data-for='board'] { z-index: 1; }\n/* The board moved by a finger: the screen and the workbench off to the right stay hidden, their shadows too. */\n:root[data-sheet-drag='board'] .ta-phone > .ta-phone-screen, :root[data-sheet-drag='board'] .ta-phone > .ta-editors-pane { visibility: hidden; }\n/* The search of the launcher put away is never seen, whatever sheet a finger moves. */\n.ta-phone-launcher[inert] .ta-phone-stack-top { visibility: hidden !important; }\n.ta-phone[data-surface='board'] > .ta-phone-dim[data-for='board'] { opacity: 1; }\n\n/* A chat on a phone: its row is a SwipeRow (style/device.ts). */\n.ta-phone .ta-chat-item:active { background: var(--ta-hover); }\n";
@@ -49,7 +49,8 @@ export const PHONE_STYLE = `
49
49
  .ta-phone > .ta-editors-pane .ta-editor-body:has(iframe) { position: relative; }
50
50
  .ta-phone > .ta-editors-pane .ta-editor-body:has(iframe)::before { content: ''; position: absolute; z-index: 1; top: 0; bottom: 0; left: 0; width: ${SwipeUtil.EDGE_PX}px; }
51
51
  /* A screen pushed over the screen (PhoneStack): a section of the settings over their list, as the screen over the tabs. */
52
- .ta-phone-stack { position: relative; flex: 1; min-height: 0; overflow: hidden; }
52
+ /* clip, not hidden: a focus or scrollIntoView inside must not scroll the level off-screen into view sideways */
53
+ .ta-phone-stack { position: relative; flex: 1; min-height: 0; overflow: hidden; overflow: clip; }
53
54
  .ta-phone-stack-base, .ta-phone-stack-top { position: absolute; inset: 0; display: flex; flex-direction: column; will-change: transform; transition: var(--ta-sheet); }
54
55
  .ta-phone-stack-top { z-index: 2; background: var(--ta-main); transform: translate3d(100%, 0, 0); box-shadow: -12px 0 32px rgba(0, 0, 0, 0.12); visibility: hidden; transition: var(--ta-sheet), visibility 0s 360ms; }
55
56
  .ta-phone-stack[data-open] > .ta-phone-stack-top { transform: none; visibility: visible; transition: var(--ta-sheet); }
@@ -11,6 +11,13 @@ export declare abstract class WorkbenchHosts extends WorkbenchLists {
11
11
  /** What was kept of the computers dropped, being taken off the device. */
12
12
  protected forgetting: Promise<unknown>;
13
13
  signIn(given: string | Credential): Promise<void>;
14
+ /**
15
+ * A way into a computer of the user's account came (docs/design/ta-account.md): kept in the list of computers;
16
+ * used at once when none is.
17
+ */
18
+ addAccountHost(link: string, account: string): Promise<void>;
19
+ /** The computers the account brought: those of `account`, or all of them when the device left the account. */
20
+ forgetAccountHosts(account?: string): void;
14
21
  switchTo(hostId: string): void;
15
22
  forget(hostId: string): void;
16
23
  rename(hostId: string, name: string): void;
@@ -25,6 +25,26 @@ export class WorkbenchHosts extends WorkbenchLists {
25
25
  this.keepHosts(HostUtil.use(this.list, id, credential, Date.now(), { user: server.user, host: server.host }));
26
26
  this.load(id);
27
27
  }
28
+ /**
29
+ * A way into a computer of the user's account came (docs/design/ta-account.md): kept in the list of computers;
30
+ * used at once when none is.
31
+ */
32
+ async addAccountHost(link, account) {
33
+ const credential = WorkbenchUtil.credential(link);
34
+ const id = WorkbenchUtil.serverOf(credential, pageHost());
35
+ if (this.current.status === 'signed-out' && !this.list.current) {
36
+ this.keepHosts(HostUtil.keep(this.list, id, credential, account, Date.now()));
37
+ await this.signIn(credential);
38
+ return;
39
+ }
40
+ this.keepHosts(HostUtil.keep(this.list, id, credential, account, Date.now()));
41
+ }
42
+ /** The computers the account brought: those of `account`, or all of them when the device left the account. */
43
+ forgetAccountHosts(account) {
44
+ for (const host of this.list.hosts.filter(one => one.account && (account === undefined || one.account === account))) {
45
+ this.forget(host.id);
46
+ }
47
+ }
28
48
  switchTo(hostId) {
29
49
  const host = this.list.hosts.find(one => one.id === hostId);
30
50
  if (!host || (hostId === this.current.host && this.current.status !== 'signed-out')) {
@@ -1,5 +1,5 @@
1
1
  import type { SessionStore, SessionStoreOptions } from '@celljs/ta-client';
2
- import type { TaAccessServer, TaAuthEvent, TaAuthServer, TaDesktopEvent, TaGatewayServer, TaPackageServer, TaRelayServer, TaRemoteEvent, TaRemoteServer, TaRoomEvent, TaRoomServer, TaSavedSessionInfo, TaScreenShareServer, TaServer, TaServerInfo, TaSessionInfo, TaSettingsServer, TaTerminalServer, TaVoiceEvent, TaVoiceServer, TaWorkspaceServer } from '@celljs/ta-protocol';
2
+ import type { TaAccessServer, TaAccountServer, TaAuthEvent, TaAuthServer, TaDesktopEvent, TaGatewayServer, TaPackageServer, TaRelayServer, TaRemoteEvent, TaRemoteServer, TaRoomEvent, TaRoomServer, TaSavedSessionInfo, TaScreenShareServer, TaServer, TaServerInfo, TaSessionInfo, TaSettingsServer, TaTerminalServer, TaVoiceEvent, TaVoiceServer, TaWorkspaceServer } from '@celljs/ta-protocol';
3
3
  import type { RelayPairing } from '@celljs/ta-relay';
4
4
  export declare const TaWorkbench: unique symbol;
5
5
  /**
@@ -26,6 +26,8 @@ export interface SavedHost {
26
26
  name?: string;
27
27
  /** Who and which machine answered the last time. */
28
28
  server?: Pick<TaServerInfo, 'user' | 'host'>;
29
+ /** A computer of the user's account (docs/design/ta-account.md), by its id there: added and removed with it. */
30
+ account?: string;
29
31
  addedAt: number;
30
32
  usedAt: number;
31
33
  }
@@ -100,6 +102,7 @@ export interface TaWorkbench {
100
102
  /** Behind `ta gateway` only. */
101
103
  readonly gateway: TaGatewayServer;
102
104
  readonly relay: TaRelayServer;
105
+ readonly account: TaAccountServer;
103
106
  readonly remote: TaRemoteServer;
104
107
  /** Desktops of other computers (docs/design/ta-desktop-remote.md). */
105
108
  readonly screenShare: TaScreenShareServer;
@@ -127,6 +130,10 @@ export interface TaWorkbench {
127
130
  forget(hostId: string): void;
128
131
  /** Names a host on this device; an empty name gives it back its own. */
129
132
  rename(hostId: string, name: string): void;
133
+ /** A way into a computer of the user's account (docs/design/ta-account.md): kept, used at once when none is. */
134
+ addAccountHost(link: string, account: string): Promise<void>;
135
+ /** The computers the account brought: those of `account`, or all when the device left the account. */
136
+ forgetAccountHosts(account?: string): void;
130
137
  /** Forgets the computer in use and loads the page again, at the sign-in, with the other computers kept. */
131
138
  signOut(): void;
132
139
  /**
@@ -1,5 +1,5 @@
1
1
  import type { TaConnection } from '@celljs/ta-client';
2
- import { type TaAccessServer, type TaAuthEvent, type TaAuthServer, type TaDesktopEvent, type TaGatewayServer, type TaPackageServer, type TaRelayServer, type TaRemoteEvent, type TaRemoteServer, type TaRoomEvent, type TaRoomServer, type TaRoomWatch, type TaScreenShareServer, type TaServer, type TaSettingsServer, type TaTerminalServer, type TaVoiceEvent, type TaVoiceServer, type TaWorkspaceServer } from '@celljs/ta-protocol';
2
+ import { type TaAccessServer, type TaAccountServer, type TaAuthEvent, type TaAuthServer, type TaDesktopEvent, type TaGatewayServer, type TaPackageServer, type TaRelayServer, type TaRemoteEvent, type TaRemoteServer, type TaRoomEvent, type TaRoomServer, type TaRoomWatch, type TaScreenShareServer, type TaServer, type TaSettingsServer, type TaTerminalServer, type TaVoiceEvent, type TaVoiceServer, type TaWorkspaceServer } from '@celljs/ta-protocol';
3
3
  import type { WorkbenchCalls } from './workbench-calls.js';
4
4
  import type { ServiceName } from './workbench-util.js';
5
5
  /** The services of the workbench, and the listeners of what its connection tells. */
@@ -26,6 +26,7 @@ export declare abstract class WorkbenchServices {
26
26
  get auth(): TaAuthServer;
27
27
  get access(): TaAccessServer;
28
28
  get gateway(): TaGatewayServer;
29
+ get account(): TaAccountServer;
29
30
  get relay(): TaRelayServer;
30
31
  get remote(): TaRemoteServer;
31
32
  get screenShare(): TaScreenShareServer;
@@ -37,6 +37,9 @@ export class WorkbenchServices {
37
37
  get gateway() {
38
38
  return this.service('gateway');
39
39
  }
40
+ get account() {
41
+ return this.service('account');
42
+ }
40
43
  get relay() {
41
44
  return this.service('relay');
42
45
  }
@@ -26,7 +26,7 @@ export interface KeptLists {
26
26
  sessions: TaSessionInfo[];
27
27
  saved: TaSavedSessionInfo[];
28
28
  }
29
- export type ServiceName = 'server' | 'workspace' | 'terminals' | 'settings' | 'packages' | 'auth' | 'access' | 'gateway' | 'relay' | 'remote' | 'screenShare' | 'rooms' | 'voice';
29
+ export type ServiceName = 'server' | 'account' | 'workspace' | 'terminals' | 'settings' | 'packages' | 'auth' | 'access' | 'gateway' | 'relay' | 'remote' | 'screenShare' | 'rooms' | 'voice';
30
30
  /**
31
31
  * A conversation opens with about this much of its latest messages (a screen or two: the images of the user's
32
32
  * come apart, TaShownImage), its earlier ones loaded as much at a time when scrolled to.
@@ -0,0 +1,14 @@
1
+ import type { TaAccountInfo } from '@celljs/ta-protocol';
2
+ import { type AccountSide } from './device-account';
3
+ /**
4
+ * The account a page shows (docs/design/ta-account.md): in the app, the phone's own; elsewhere, that of the computer
5
+ * whose page it is, once connected to it.
6
+ */
7
+ export declare function useAccountSide(): AccountSide | undefined;
8
+ /** The account as it is now, read again every few seconds while shown; `act` runs a change and shows what it made. */
9
+ export declare function useAccountInfo(side: AccountSide | undefined, every?: number): {
10
+ info: TaAccountInfo | undefined;
11
+ failed: unknown;
12
+ act: (run: (side: AccountSide) => Promise<TaAccountInfo>) => Promise<void>;
13
+ };
14
+ //# sourceMappingURL=account-side.d.ts.map
@@ -0,0 +1,111 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
35
+ Object.defineProperty(exports, "__esModule", { value: true });
36
+ exports.useAccountSide = useAccountSide;
37
+ exports.useAccountInfo = useAccountInfo;
38
+ const ta_relay_1 = require("@celljs/ta-relay");
39
+ const React = __importStar(require("react"));
40
+ const cloud_sign_in_1 = require("../cloud/cloud-sign-in");
41
+ const hooks_1 = require("../hooks");
42
+ const workbench_util_1 = require("../workbench-util");
43
+ const device_account_1 = require("./device-account");
44
+ /** The account of the computer of the page, through its ta serve (TaAccountServer). */
45
+ function serveSide(account) {
46
+ return {
47
+ read: () => account.getAccount(),
48
+ signIn: (provider, service) => account.signIn(provider, service),
49
+ cancelSignIn: () => account.cancelSignIn(),
50
+ approve: id => account.approve(id),
51
+ remove: id => account.remove(id),
52
+ signOut: () => account.signOut(),
53
+ };
54
+ }
55
+ /**
56
+ * The relay the app's account is on: that of the computers it is paired with, as theirs is; else the relay of the
57
+ * deployment this build is for, else the default one.
58
+ */
59
+ async function appService(hosts, current) {
60
+ var _a;
61
+ var _b, _c, _d;
62
+ const paired = (one) => (one && 'pairing' in one.credential ? one.credential.pairing.relay : undefined);
63
+ return ((_d = (_c = (_b = paired(hosts.find(one => one.id === current))) !== null && _b !== void 0 ? _b : hosts.map(paired).find(Boolean)) !== null && _c !== void 0 ? _c : (_a = (await cloud_sign_in_1.CloudSignInUtil.distribution())) === null || _a === void 0 ? void 0 : _a.relay) !== null && _d !== void 0 ? _d : (0, ta_relay_1.relayDefaultUrl)());
64
+ }
65
+ /**
66
+ * The account a page shows (docs/design/ta-account.md): in the app, the phone's own; elsewhere, that of the computer
67
+ * whose page it is, once connected to it.
68
+ */
69
+ function useAccountSide() {
70
+ const [{ status, hosts, host }, bench] = (0, hooks_1.useWorkbench)();
71
+ const app = workbench_util_1.WorkbenchUtil.isApp();
72
+ const where = React.useRef({ hosts, host });
73
+ where.current = { hosts, host };
74
+ const online = status === 'online';
75
+ return React.useMemo(() => {
76
+ if (app) {
77
+ return device_account_1.DeviceAccount.of(bench, () => appService(where.current.hosts, where.current.host), async () => {
78
+ var _a;
79
+ const chosen = cloud_sign_in_1.CloudSignInUtil.chosen();
80
+ const built = (_a = (await cloud_sign_in_1.CloudSignInUtil.distribution())) === null || _a === void 0 ? void 0 : _a.gateway;
81
+ return [chosen, built].filter((one) => !!one);
82
+ });
83
+ }
84
+ return online ? serveSide(bench.account) : undefined;
85
+ }, [app, online, bench]);
86
+ }
87
+ /** The account as it is now, read again every few seconds while shown; `act` runs a change and shows what it made. */
88
+ function useAccountInfo(side, every = 3000) {
89
+ const [info, setInfo] = React.useState();
90
+ const [failed, setFailed] = React.useState();
91
+ React.useEffect(() => {
92
+ if (!side) {
93
+ return;
94
+ }
95
+ let live = true;
96
+ const read = () => side.read().then(next => live && setInfo(next), (error) => live && setFailed(error));
97
+ void read();
98
+ const timer = setInterval(() => document.visibilityState !== 'hidden' && void read(), every);
99
+ return () => {
100
+ live = false;
101
+ clearInterval(timer);
102
+ };
103
+ }, [side, every]);
104
+ const act = React.useCallback(async (run) => {
105
+ if (side) {
106
+ setInfo(await run(side));
107
+ }
108
+ }, [side]);
109
+ return { info, failed, act };
110
+ }
111
+ //# sourceMappingURL=account-side.js.map