tmux-weblink 2.2.49 → 3.0.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.
@@ -1,4 +1,4 @@
1
- import{cssVarsStyle as c}from"../theme.js";import{newSessionModalCSS as b,newSessionModalHTML as x,newSessionModalScript as g,reducedMotion as f}from"../shared-layout.js";import{icon as n}from"../icons.js";function m(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;")}function o(e="var(--panel-accent)"){return`box-shadow: 0 0 0 2px ${e}; outline: none;`}function w(e){const{theme:t,fsRoots:r,terminalCfg:i,scrollback:p,wsBase:s}=e,a=e.version?m(e.version):"",l=`
1
+ import{cssVarsStyle as c}from"../theme.js";import{newSessionModalCSS as b,newSessionModalHTML as x,newSessionModalScript as g,reducedMotion as f}from"../shared-layout.js";import{icon as o}from"../icons.js";function m(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;")}function a(e="var(--panel-accent)"){return`box-shadow: 0 0 0 2px ${e}; outline: none;`}function w(e){const{theme:t,fsRoots:r,terminalCfg:i,scrollback:p,wsBase:s}=e,n=e.version?m(e.version):"",l=`
2
2
  *, *::before, *::after { box-sizing: border-box; }
3
3
  html, body {
4
4
  background: var(--page-bg); color: var(--page-fg);
@@ -21,7 +21,16 @@ import{cssVarsStyle as c}from"../theme.js";import{newSessionModalCSS as b,newSes
21
21
  .fixed-header .brand {
22
22
  font-size: var(--text-base); font-weight: 600; color: var(--page-fg);
23
23
  flex-shrink: 0;
24
+ /* The logo is the session-list toggle on a phone, so it needs a real touch
25
+ target (44px) rather than the height of the text itself. */
26
+ display: inline-flex; align-items: center;
27
+ min-height: 44px; padding: 0 6px; margin-left: -6px;
28
+ border-radius: 8px; cursor: pointer;
29
+ touch-action: manipulation; -webkit-tap-highlight-color: transparent;
30
+ user-select: none;
24
31
  }
32
+ .fixed-header .brand:active { background: color-mix(in srgb, var(--panel-accent) 10%, transparent); }
33
+ .fixed-header .brand:focus-visible { ${a()} }
25
34
  .fixed-header .brand span { color: var(--panel-accent); font-weight: 500; }
26
35
  .fixed-header .brand a { color: inherit; text-decoration: none; }
27
36
  #header-git {
@@ -89,13 +98,14 @@ import{cssVarsStyle as c}from"../theme.js";import{newSessionModalCSS as b,newSes
89
98
  }
90
99
  .sidebar-footer .mode-btn:hover { color: var(--panel-accent); background: color-mix(in srgb, var(--panel-accent) 8%, transparent); }
91
100
  .sidebar-footer .mode-btn.active { color: var(--panel-accent); background: color-mix(in srgb, var(--panel-accent) 10%, transparent); }
92
- .sidebar-footer .mode-btn:focus-visible { ${o()} }
101
+ .sidebar-footer .mode-btn:focus-visible { ${a()} }
93
102
 
94
103
  /* \u2500\u2500 Sidebar session mode \u2500\u2500 */
95
104
  .session-item {
96
105
  display: flex; align-items: center; gap: 8px;
97
106
  padding: 10px 12px; border-radius: 10px;
98
107
  cursor: pointer; font-size: var(--text-sm); color: var(--page-fg);
108
+ touch-action: manipulation;
99
109
  text-decoration: none; margin-bottom: 2px;
100
110
  transition: background 0.1s;
101
111
  }
@@ -116,7 +126,7 @@ import{cssVarsStyle as c}from"../theme.js";import{newSessionModalCSS as b,newSes
116
126
  .session-edit-btn { display: flex; align-items: center; opacity: 0.7; }
117
127
  .session-item.active .session-edit-btn { opacity: 1; color: var(--panel-accent); }
118
128
  }
119
- .session-edit-btn:focus-visible { ${o()} }
129
+ .session-edit-btn:focus-visible { ${a()} }
120
130
 
121
131
  .sidebar-section-label {
122
132
  font-size: var(--text-xs); text-transform: uppercase; letter-spacing: 0.05em;
@@ -161,7 +171,7 @@ import{cssVarsStyle as c}from"../theme.js";import{newSessionModalCSS as b,newSes
161
171
  color: var(--panel-accent); border-color: var(--panel-accent);
162
172
  background: color-mix(in srgb, var(--panel-accent) 6%, transparent);
163
173
  }
164
- .new-session-sidebar-btn:focus-visible { ${o()} }
174
+ .new-session-sidebar-btn:focus-visible { ${a()} }
165
175
  .new-session-sidebar-btn svg { width: 16px; height: 16px; fill: currentColor; }
166
176
 
167
177
  /* \u2500\u2500 Sidebar files mode \u2500\u2500 */
@@ -180,8 +190,10 @@ import{cssVarsStyle as c}from"../theme.js";import{newSessionModalCSS as b,newSes
180
190
  .file-tree-info { font-size: var(--text-xs); color: var(--panel-muted); padding: 12px; line-height: 1.5; }
181
191
  .file-tree-info code { background: color-mix(in srgb, var(--panel-accent) 8%, transparent); padding: 2px 6px; border-radius: 4px; }
182
192
 
183
- .file-tree-item .file-tree-bot-btn {
193
+ .file-tree-item .file-tree-bot-btn,
194
+ .session-group-header .sg-add-bot {
184
195
  margin-left: auto; flex: 0 0 auto;
196
+ display: inline-flex; align-items: center; justify-content: center;
185
197
  width: 20px; height: 20px; line-height: 1;
186
198
  border: 1px solid var(--panel-border); border-radius: 6px;
187
199
  background: transparent; color: var(--panel-muted);
@@ -195,12 +207,16 @@ import{cssVarsStyle as c}from"../theme.js";import{newSessionModalCSS as b,newSes
195
207
  .bots-group-label:hover .bots-group-add { opacity: 1; }
196
208
 
197
209
  .file-tree-create-bot { color: var(--panel-accent); font-size: var(--text-xs); gap: 6px; }
198
- .file-tree-bot-plus { display: inline-flex; align-items: center; justify-content: center; width: 16px; height: 16px; border: 1px solid currentColor; border-radius: 5px; font-size: 12px; line-height: 1; }
210
+ .file-tree-bot-plus { display: inline-flex; align-items: center; justify-content: center; width: 16px; height: 16px; border: 1px solid currentColor; border-radius: 5px; }
211
+ .file-tree-bot-plus svg { width: 11px; height: 11px; }
199
212
 
200
213
  /* Bots merged into session groups */
201
214
  .session-item.bot-item .bot-icon { width: 15px; height: 15px; flex-shrink: 0; fill: var(--panel-accent); opacity: 0.85; }
202
215
  .session-item.bot-item { border-left: 2px solid color-mix(in srgb, var(--panel-accent) 45%, transparent); }
203
216
  .session-item.bot-item .bot-status-dot { margin-left: auto; width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; }
217
+ .settings-item { display: flex; align-items: center; gap: 8px; width: 100%; text-align: left; background: none; border: none; color: inherit; font: inherit; cursor: pointer; }
218
+ .settings-item-icon { display: inline-flex; color: var(--panel-muted); flex: 0 0 auto; }
219
+ .settings-item #bots-inbox-badge { margin-left: auto; }
204
220
  .session-group-header .sg-add-bot {
205
221
  margin-left: auto; width: 18px; height: 18px; line-height: 1;
206
222
  border: 1px solid var(--panel-border); border-radius: 5px;
@@ -211,6 +227,7 @@ import{cssVarsStyle as c}from"../theme.js";import{newSessionModalCSS as b,newSes
211
227
  @media (hover: none) { .session-group-header .sg-add-bot { opacity: 0.85; } }
212
228
  .bv-mode { position: relative; }
213
229
  .bv-mode-btn {
230
+ display: inline-flex; align-items: center; gap: 4px;
214
231
  background: var(--page-bg); color: var(--page-fg);
215
232
  border: 1px solid var(--panel-border); border-radius: 7px;
216
233
  font-size: 11px; padding: 4px 8px; cursor: pointer; white-space: nowrap;
@@ -490,11 +507,14 @@ import{cssVarsStyle as c}from"../theme.js";import{newSessionModalCSS as b,newSes
490
507
  display: inline-flex; align-items: center; justify-content: center;
491
508
  min-height: 36px; padding: 6px 14px; border-radius: 8px;
492
509
  font-size: var(--text-sm); font-family: inherit; cursor: pointer;
510
+ /* No double-tap zoom on iOS: a second tap should press the button again,
511
+ not zoom the page. */
512
+ touch-action: manipulation;
493
513
  border: 1px solid var(--panel-border); background: var(--panel-bg);
494
514
  color: var(--page-fg); transition: opacity 0.15s; text-decoration: none;
495
515
  }
496
516
  .btn:hover { opacity: 0.85; }
497
- .btn:focus-visible { ${o()} }
517
+ .btn:focus-visible { ${a()} }
498
518
  .btn.primary { background: var(--panel-accent); border-color: var(--panel-accent); color: var(--panel-accent-on); font-weight: 500; }
499
519
  .btn.primary:hover { opacity: 0.9; }
500
520
  .btn.danger { color: #b91c1c; border-color: color-mix(in srgb, #b91c1c 30%, transparent); }
@@ -737,15 +757,85 @@ import{cssVarsStyle as c}from"../theme.js";import{newSessionModalCSS as b,newSes
737
757
  .bv-actions { display: flex; gap: 6px; flex-shrink: 0; }
738
758
  .bv-actions .btn { padding: 4px 10px; font-size: 11px; }
739
759
 
740
- .bots-messages { flex: 1; overflow-y: auto; padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; }
760
+ .bots-messages {
761
+ flex: 1; overflow-y: auto; padding: 14px 16px;
762
+ display: flex; flex-direction: column; gap: 10px;
763
+ /* The transcript is its own scroll surface: momentum scrolling, and the
764
+ gesture never chains to the page (which would move the pinned view). */
765
+ -webkit-overflow-scrolling: touch;
766
+ overscroll-behavior: contain;
767
+ }
768
+ /* Shown only while the reader is away from the tail during streaming. */
769
+ .bv-jump {
770
+ position: absolute; right: 14px; bottom: calc(70px + env(safe-area-inset-bottom, 0px));
771
+ z-index: 7; min-width: 44px; height: 44px; padding: 0 12px;
772
+ border-radius: 22px; border: 1px solid var(--panel-border);
773
+ background: color-mix(in srgb, var(--panel-bg) 92%, transparent);
774
+ color: var(--page-fg); font-size: 12px; font-family: var(--font-mono);
775
+ display: inline-flex; align-items: center; justify-content: center; gap: 4px;
776
+ cursor: pointer; touch-action: manipulation;
777
+ box-shadow: 0 2px 10px rgba(0, 0, 0, 0.28);
778
+ }
779
+ .bv-jump[hidden] { display: none; }
780
+ .bv-jump:hover { border-color: var(--panel-accent); color: var(--panel-accent); }
741
781
  .bv-msg { max-width: min(860px, 100%); font-size: 13px; line-height: 1.55; }
742
- .bv-user { align-self: flex-end; background: color-mix(in srgb, var(--panel-accent) 16%, transparent); border: 1px solid color-mix(in srgb, var(--panel-accent) 30%, transparent); padding: 8px 12px; border-radius: 10px; white-space: pre-wrap; }
782
+ .bv-user { align-self: flex-end; background: color-mix(in srgb, var(--panel-accent) 16%, transparent); border: 1px solid color-mix(in srgb, var(--panel-accent) 30%, transparent); padding: 8px 12px; border-radius: 10px; }
743
783
  .bv-assistant { align-self: flex-start; }
744
- .bv-text { white-space: pre-wrap; word-break: break-word; }
784
+ .bv-text { word-break: break-word; overflow-wrap: anywhere; }
745
785
  .bv-thinking { margin-bottom: 6px; color: var(--panel-muted); font-size: 12px; }
746
786
  .bv-thinking summary { cursor: pointer; opacity: 0.8; }
747
787
  .bv-thinking div { white-space: pre-wrap; border-left: 2px solid var(--panel-border); padding-left: 8px; margin-top: 4px; }
748
788
 
789
+ /* \u2500\u2500 Rendered markdown in a message \u2500\u2500 */
790
+ .bv-text > :first-child, .bv-user > :first-child { margin-top: 0; }
791
+ .bv-text > :last-child, .bv-user > :last-child { margin-bottom: 0; }
792
+ .bv-text p, .bv-user p { margin: 0 0 8px; }
793
+ .bv-text h1, .bv-text h2, .bv-text h3, .bv-text h4, .bv-text h5, .bv-text h6 {
794
+ margin: 14px 0 6px; line-height: 1.3; font-weight: 600;
795
+ }
796
+ .bv-text h1 { font-size: 17px; }
797
+ .bv-text h2 { font-size: 15.5px; }
798
+ .bv-text h3 { font-size: 14px; }
799
+ .bv-text h4, .bv-text h5, .bv-text h6 { font-size: 13px; color: var(--panel-muted); }
800
+ .bv-text ul, .bv-text ol { margin: 0 0 8px; padding-left: 20px; }
801
+ .bv-text li { margin: 2px 0; }
802
+ .bv-text li > ul, .bv-text li > ol { margin: 2px 0; }
803
+ .bv-text li > input[type="checkbox"] { margin: 0 5px 0 -16px; vertical-align: middle; }
804
+ .bv-text a, .bv-user a { color: var(--panel-accent); text-decoration: underline; text-underline-offset: 2px; }
805
+ .bv-text code, .bv-user code {
806
+ font-family: var(--font-mono); font-size: 11.5px;
807
+ background: color-mix(in srgb, var(--page-bg), var(--panel-bg) 55%);
808
+ border: 1px solid var(--panel-border); border-radius: 4px; padding: 0 4px;
809
+ }
810
+ .bv-text blockquote {
811
+ margin: 0 0 8px; padding: 1px 10px;
812
+ border-left: 2px solid var(--panel-border); color: var(--panel-muted);
813
+ }
814
+ .bv-text hr { border: none; border-top: 1px solid var(--panel-border); margin: 12px 0; }
815
+ .bv-table { max-width: 100%; overflow-x: auto; margin: 0 0 8px; }
816
+ .bv-text table { border-collapse: collapse; font-size: 12px; }
817
+ .bv-text th, .bv-text td { border: 1px solid var(--panel-border); padding: 4px 8px; vertical-align: top; }
818
+ .bv-text th { background: color-mix(in srgb, var(--page-bg), var(--panel-bg) 55%); font-weight: 600; }
819
+ .bv-code {
820
+ margin: 0 0 8px; border: 1px solid var(--panel-border); border-radius: 8px;
821
+ background: color-mix(in srgb, var(--page-bg), var(--panel-bg) 45%); overflow: hidden;
822
+ }
823
+ .bv-code-head {
824
+ display: flex; align-items: center; justify-content: space-between; gap: 8px;
825
+ padding: 3px 8px; border-bottom: 1px solid var(--panel-border);
826
+ font-family: var(--font-mono); font-size: 10px; color: var(--panel-muted);
827
+ }
828
+ .bv-code-copy {
829
+ background: none; border: none; color: var(--panel-muted); cursor: pointer;
830
+ font-family: inherit; font-size: 10px; padding: 2px 4px; border-radius: 4px;
831
+ }
832
+ .bv-code-copy:hover { color: var(--panel-accent); background: color-mix(in srgb, var(--panel-accent) 10%, transparent); }
833
+ .bv-code pre { margin: 0; padding: 8px 10px; overflow-x: auto; }
834
+ .bv-code code {
835
+ font-family: var(--font-mono); font-size: 11.5px; line-height: 1.5;
836
+ background: none; border: none; padding: 0; white-space: pre;
837
+ }
838
+
749
839
  .bv-tool { border: 1px solid var(--panel-border); border-radius: 8px; background: color-mix(in srgb, var(--page-bg), var(--panel-bg) 45%); font-family: var(--font-mono); font-size: 11.5px; }
750
840
  .bv-tool > summary { padding: 6px 10px; cursor: pointer; display: flex; gap: 8px; align-items: center; }
751
841
  .bv-tool-name { color: var(--panel-accent); }
@@ -766,16 +856,28 @@ import{cssVarsStyle as c}from"../theme.js";import{newSessionModalCSS as b,newSes
766
856
  .bv-notice-error { color: var(--panel-danger, #e5534b); }
767
857
 
768
858
  /* Same look and metrics as the terminal's mobile input row (.mk-input). */
769
- .bots-composer { display: flex; gap: 4px; padding: 6px 8px; border-top: 1px solid var(--panel-border); background: var(--panel-bg); flex-shrink: 0; align-items: stretch; }
859
+ .bots-composer-wrap { flex-shrink: 0; border-top: 1px solid var(--panel-border); background: var(--panel-bg); }
860
+ .bv-composer-error {
861
+ padding: 6px 10px; font-size: 11.5px; line-height: 1.45; word-break: break-word;
862
+ color: var(--panel-danger, #e5534b);
863
+ }
864
+ .bv-composer-error[hidden] { display: none; }
865
+ .bots-composer { display: flex; gap: 4px; padding: 6px 8px; align-items: stretch; }
866
+ .bots-composer .btn.primary[aria-busy="true"] { opacity: 0.55; cursor: default; }
867
+ .bots-composer .btn.primary:disabled { filter: none; }
770
868
  .bots-composer textarea {
771
869
  flex: 1; resize: none; box-sizing: border-box;
772
870
  min-height: 38px; max-height: 80px;
871
+ /* Focus on the first tap: no double-tap zoom and no 300ms click delay. */
872
+ touch-action: manipulation;
773
873
  background: color-mix(in srgb, var(--page-bg), var(--panel-bg) 50%);
774
874
  color: var(--page-fg); border: 1px solid var(--panel-border);
775
875
  border-radius: 8px; padding: 6px 10px;
776
876
  font-family: var(--font-mono); font-size: var(--text-base); line-height: 1.4; outline: none;
777
877
  }
778
878
  .bots-composer textarea:focus { border-color: var(--panel-accent); box-shadow: 0 0 0 2px color-mix(in srgb, var(--panel-accent) 15%, transparent); }
879
+ /* Same muted placeholder as the terminal's mobile input row. */
880
+ .bots-composer textarea::placeholder { color: var(--panel-muted); opacity: 0.6; }
779
881
  .bots-composer .btn.primary {
780
882
  min-width: 44px; padding: 0 12px; border: none; color: white;
781
883
  background: var(--panel-success); border-radius: 8px; cursor: pointer;
@@ -827,10 +929,14 @@ import{cssVarsStyle as c}from"../theme.js";import{newSessionModalCSS as b,newSes
827
929
  .bv-mode-menu { position: fixed; left: 10px; right: 10px; top: auto; bottom: 10px; width: auto; max-height: 60vh; overflow-y: auto; }
828
930
  .bots-messages { padding: 10px; }
829
931
  .bv-msg { max-width: 100%; }
830
- .bots-composer { padding: 8px 10px; gap: 6px; }
932
+ /* Keep the field clear of the home-indicator gesture bar. */
933
+ .bots-composer { padding: 8px 10px calc(8px + env(safe-area-inset-bottom, 0px)) 10px; gap: 6px; }
831
934
  .bv-approval-actions { flex-wrap: wrap; }
832
935
  .bv-reason { flex: 1 1 100%; }
833
936
  .sidebar { flex: 0 0 auto; border-right: none; border-bottom: 1px solid var(--panel-border); transition: max-height 0.2s; }
937
+ /* An expanded list must leave room for the terminal/chat below it; without a
938
+ cap a long session list pushed the main area off-screen. */
939
+ .sidebar:not(.collapsed) { max-height: 62dvh; }
834
940
  .sidebar.collapsed .sidebar-content { display: none; }
835
941
  .sidebar.collapsed .sidebar-footer { display: none; }
836
942
  .sidebar.collapsed { max-height: 48px; overflow: hidden; }
@@ -850,6 +956,7 @@ import{cssVarsStyle as c}from"../theme.js";import{newSessionModalCSS as b,newSes
850
956
  breakpoint, applied unconditionally when the html has .force-narrow. */
851
957
  html.force-narrow .app-layout { flex-direction: column; }
852
958
  html.force-narrow .sidebar { flex: 0 0 auto; border-right: none; border-bottom: 1px solid var(--panel-border); transition: max-height 0.2s; }
959
+ html.force-narrow .sidebar:not(.collapsed) { max-height: 62dvh; }
853
960
  html.force-narrow .sidebar.collapsed .sidebar-content { display: none; }
854
961
  html.force-narrow .sidebar.collapsed .sidebar-footer { display: none; }
855
962
  html.force-narrow .sidebar.collapsed { max-height: 48px; overflow: hidden; }
@@ -864,7 +971,7 @@ import{cssVarsStyle as c}from"../theme.js";import{newSessionModalCSS as b,newSes
864
971
  <head>
865
972
  <meta charset="UTF-8" />
866
973
  <meta name="viewport" content="width=device-width, initial-scale=1.0, viewport-fit=cover" />
867
- <meta name="tw-build" content="${a}" />
974
+ <meta name="tw-build" content="${n}" />
868
975
  <meta name="apple-mobile-web-app-capable" content="yes" />
869
976
  <meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />
870
977
  <meta name="apple-mobile-web-app-title" content="tmux-web" />
@@ -897,7 +1004,7 @@ import{cssVarsStyle as c}from"../theme.js";import{newSessionModalCSS as b,newSes
897
1004
  </script>
898
1005
 
899
1006
  <header class="fixed-header">
900
- <div class="brand" id="brand-toggle">tmux<span>-weblink</span></div>
1007
+ <div class="brand" id="brand-toggle" role="button" tabindex="0" aria-label="Toggle session list" aria-expanded="true" title="Toggle session list">tmux<span>-weblink</span></div>
901
1008
  <div class="header-actions">
902
1009
  </div>
903
1010
  <div id="header-git" title="Click to browse repository"></div>
@@ -908,9 +1015,9 @@ import{cssVarsStyle as c}from"../theme.js";import{newSessionModalCSS as b,newSes
908
1015
  <aside class="sidebar">
909
1016
  <div class="sidebar-content" id="sidebar-content"></div>
910
1017
  <div class="sidebar-footer">
911
- <button class="mode-btn active" id="mode-sessions" title="Sessions">${n("sessions",'width="20" height="20"')}</button>
912
- <button class="mode-btn" id="mode-files" title="Files">${n("folder",'width="20" height="20"')}</button>
913
- <button class="mode-btn" id="mode-settings" title="Settings">${n("settings",'width="20" height="20"')}</button>
1018
+ <button class="mode-btn active" id="mode-sessions" title="Sessions">${o("sessions",'width="20" height="20"')}</button>
1019
+ <button class="mode-btn" id="mode-files" title="Files">${o("folder",'width="20" height="20"')}</button>
1020
+ <button class="mode-btn" id="mode-settings" title="Settings">${o("settings",'width="20" height="20"')}</button>
914
1021
  </div>
915
1022
  </aside>
916
1023
 
@@ -971,7 +1078,7 @@ import{cssVarsStyle as c}from"../theme.js";import{newSessionModalCSS as b,newSes
971
1078
  <!-- Settings popover -->
972
1079
  <div class="popover-backdrop" id="settings-backdrop"></div>
973
1080
  <div class="settings-popover" id="settings-popover">
974
- <div style="padding:1px 2px 6px;font-size:10px;color:var(--panel-muted);opacity:.8;font-family:var(--font-mono)">tmux-weblink v${a}</div>
1081
+ <div style="padding:1px 2px 6px;font-size:10px;color:var(--panel-muted);opacity:.8;font-family:var(--font-mono)">tmux-weblink v${n}</div>
975
1082
  <div style="padding:4px 0">
976
1083
  <button class="theme-option" data-theme="vscode" title="VS Code"><span class="theme-dot" style="background:#007acc"></span>VS Code${t.template==="vscode"?'<span class="theme-check">\u2713</span>':""}</button>
977
1084
  <button class="theme-option" data-theme="ghostty" title="Ghostty"><span class="theme-dot" style="background:#ff5f00"></span>Ghostty${t.template==="ghostty"?'<span class="theme-check">\u2713</span>':""}</button>
@@ -983,15 +1090,16 @@ import{cssVarsStyle as c}from"../theme.js";import{newSessionModalCSS as b,newSes
983
1090
  <input type="checkbox" id="force-narrow-toggle" />
984
1091
  </label>
985
1092
  <hr class="settings-divider" />
986
- <button class="settings-item" id="set-bot-templates" style="cursor:pointer;background:none;border:none;width:100%;text-align:left;color:inherit;font:inherit;display:flex;align-items:center;justify-content:space-between">
1093
+ <button class="settings-item" id="set-bot-templates">
1094
+ <span class="settings-item-icon">${o("layers",'width="13" height="13"')}</span>
987
1095
  <span>Bot templates</span>
988
- <span style="font-size:var(--text-xs);color:var(--panel-muted)">\u2699</span>
989
1096
  </button>
990
- <button class="settings-item" id="set-bot-new" style="cursor:pointer;background:none;border:none;width:100%;text-align:left;color:inherit;font:inherit;display:flex;align-items:center;justify-content:space-between">
1097
+ <button class="settings-item" id="set-bot-new">
1098
+ <span class="settings-item-icon">${o("add",'width="13" height="13"')}</span>
991
1099
  <span>New bot</span>
992
- <span style="font-size:var(--text-xs);color:var(--panel-muted)">\uFF0B</span>
993
1100
  </button>
994
- <button class="settings-item" id="set-bot-inbox" style="cursor:pointer;background:none;border:none;width:100%;text-align:left;color:inherit;font:inherit;display:flex;align-items:center;justify-content:space-between">
1101
+ <button class="settings-item" id="set-bot-inbox">
1102
+ <span class="settings-item-icon">${o("inbox",'width="13" height="13"')}</span>
995
1103
  <span>Needs you</span>
996
1104
  <span id="bots-inbox-badge" style="display:none;background:#e0a23c;color:#1b1b1b;border-radius:9px;padding:0 6px;font-size:10px;line-height:15px"></span>
997
1105
  </button>
@@ -1078,13 +1186,32 @@ ${g("__onSessionCreated")}
1078
1186
  </script>
1079
1187
  <script>
1080
1188
  (function(){
1081
- /* Logo toggle sidebar */
1189
+ /* Logo toggles the session list. It is the main way out of the bot chat on a
1190
+ phone, so it acts on pointerdown (a tap during heavy streaming output still
1191
+ lands) and a double tap in quick succession cannot undo itself. */
1082
1192
  var brand = document.getElementById('brand-toggle');
1083
1193
  var sbar = document.querySelector('.sidebar');
1084
1194
  if (brand && sbar) {
1085
- brand.addEventListener('click', function(e) {
1086
- sbar.classList.toggle('collapsed');
1195
+ var setExpanded = function(expanded) {
1196
+ sbar.classList.toggle('collapsed', !expanded);
1197
+ brand.setAttribute('aria-expanded', expanded ? 'true' : 'false');
1198
+ /* Unpin/repin the bot chat before the next paint, so the list is never
1199
+ drawn underneath the pinned chat view. */
1200
+ if (window.__syncBotsViewport) window.__syncBotsViewport();
1201
+ };
1202
+ var lastToggle = 0;
1203
+ var toggle = function(e) {
1204
+ if (e) e.preventDefault();
1205
+ var now = Date.now();
1206
+ if (now - lastToggle < 350) return;
1207
+ lastToggle = now;
1208
+ setExpanded(sbar.classList.contains('collapsed'));
1209
+ };
1210
+ brand.addEventListener('pointerdown', toggle);
1211
+ brand.addEventListener('keydown', function(e) {
1212
+ if (e.key === 'Enter' || e.key === ' ') toggle(e);
1087
1213
  });
1214
+ brand.setAttribute('aria-expanded', sbar.classList.contains('collapsed') ? 'false' : 'true');
1088
1215
  }
1089
1216
 
1090
1217
  /* Mobile keys: collapsible strip, expanded by tapping the space under the
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tmux-weblink",
3
- "version": "2.2.49",
3
+ "version": "3.0.0",
4
4
  "description": "Access your tmux sessions from the browser. A continuation of tmux-web and persalink.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -59,6 +59,8 @@
59
59
  "@types/ws": "^8.5.0",
60
60
  "@vitest/coverage-v8": "^2.1.9",
61
61
  "esbuild": "^0.25.0",
62
+ "linkedom": "^0.18.15",
63
+ "marked": "^18.4.0",
62
64
  "tsx": "^4.21.0",
63
65
  "typescript": "^5.7.0",
64
66
  "vitest": "^2.1.9"