tmux-weblink 2.0.13 → 2.0.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/agent.js +1 -1
- package/dist/index.js +3 -3
- package/dist/lib/build-app.js +6 -6
- package/dist/lib/cli.js +6 -6
- package/dist/lib/pages/files-index.js +20 -22
- package/dist/lib/pages/history-index.js +22 -24
- package/dist/lib/pages/notes-index.js +17 -19
- package/dist/lib/pages/notes-page.js +10 -13
- package/dist/lib/pages/quick-commands.js +25 -27
- package/dist/lib/pages/schedule-index.js +23 -25
- package/dist/lib/pages/settings.js +18 -24
- package/dist/lib/pages/shell.js +15 -27
- package/dist/lib/setup-features.js +1 -1
- package/dist/lib/shared-layout.js +38 -39
- package/package.json +1 -1
- package/dist/lib/commandbar.js +0 -555
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{escapeHtml as c}from"./html.js";import{icon as i,iconPath as n}from"./icons.js";const d=[{id:"vscode",name:"VS Code",dot:"#007acc"},{id:"ghostty",name:"Ghostty",dot:"#ff5f00"},{id:"warm-clay",name:"Warm Clay",dot:"#b86b52"},{id:"dark-cove",name:"Dark Cove",dot:"#7aa2f7"}];function o(e="var(--panel-accent)"){return`box-shadow: 0 0 0 2px ${e}; outline: none;`}function w(e=""){return`
|
|
2
2
|
@media (prefers-reduced-motion: reduce) {
|
|
3
3
|
*, *::before, *::after {
|
|
4
4
|
animation-duration: 0.01ms !important;
|
|
@@ -6,21 +6,21 @@ import{commandbarButtonHTML as w}from"./commandbar.js";import{escapeHtml as c}fr
|
|
|
6
6
|
transition-duration: 0.01ms !important;
|
|
7
7
|
scroll-behavior: auto !important;
|
|
8
8
|
}
|
|
9
|
-
${
|
|
10
|
-
}`}function
|
|
11
|
-
<span class="theme-dot" style="background:${
|
|
12
|
-
${c(
|
|
13
|
-
${s?
|
|
9
|
+
${e}
|
|
10
|
+
}`}function y(e="vscode"){const r=d.find(t=>t.id===e)??d[0],a=d.map(t=>{const s=t.id===e;return`<button type="button" class="theme-option${s?" active":""}" data-theme="${t.id}" role="menuitem">
|
|
11
|
+
<span class="theme-dot" style="background:${t.dot}"></span>
|
|
12
|
+
${c(t.name)}
|
|
13
|
+
${s?i("check",'class="theme-check" aria-hidden="true"'):""}
|
|
14
14
|
</button>`}).join(`
|
|
15
15
|
`);return`<div class="theme-switcher" id="theme-switcher">
|
|
16
16
|
<button type="button" class="theme-switcher-btn" aria-label="Theme" aria-haspopup="true" aria-expanded="false">
|
|
17
|
-
<span class="theme-dot" style="background:${
|
|
18
|
-
<span>${c(
|
|
17
|
+
<span class="theme-dot" style="background:${r.dot}"></span>
|
|
18
|
+
<span>${c(r.name)}</span>
|
|
19
19
|
</button>
|
|
20
20
|
<div class="theme-switcher-popover" role="menu">
|
|
21
|
-
${
|
|
21
|
+
${a}
|
|
22
22
|
</div>
|
|
23
|
-
</div>`}function
|
|
23
|
+
</div>`}function k(){return`(function() {
|
|
24
24
|
const switcher = document.getElementById('theme-switcher');
|
|
25
25
|
if (!switcher) return;
|
|
26
26
|
const btn = switcher.querySelector('.theme-switcher-btn');
|
|
@@ -47,7 +47,7 @@ import{commandbarButtonHTML as w}from"./commandbar.js";import{escapeHtml as c}fr
|
|
|
47
47
|
document.addEventListener('click', (e) => {
|
|
48
48
|
if (switcher.classList.contains('open') && !switcher.contains(e.target)) close();
|
|
49
49
|
});
|
|
50
|
-
})();`}function
|
|
50
|
+
})();`}function S(e=""){return`
|
|
51
51
|
*, *::before, *::after { box-sizing: border-box; }
|
|
52
52
|
html, body { background: var(--page-bg); color: var(--page-fg); min-height: 100%; font-family: var(--font-sans); margin: 0; padding: 0; }
|
|
53
53
|
|
|
@@ -75,7 +75,7 @@ import{commandbarButtonHTML as w}from"./commandbar.js";import{escapeHtml as c}fr
|
|
|
75
75
|
font-size: var(--text-sm); text-decoration: none;
|
|
76
76
|
}
|
|
77
77
|
.header-btn:hover, .icon-btn:hover { color: var(--panel-accent); background: color-mix(in srgb, var(--panel-accent) 8%, transparent); }
|
|
78
|
-
.header-btn:focus-visible, .icon-btn:focus-visible { ${
|
|
78
|
+
.header-btn:focus-visible, .icon-btn:focus-visible { ${o()} }
|
|
79
79
|
.header-btn svg, .icon-btn svg { width: 18px; height: 18px; fill: currentColor; flex-shrink: 0; }
|
|
80
80
|
|
|
81
81
|
/* \u2500\u2500 Theme switcher popover \u2500\u2500 */
|
|
@@ -88,7 +88,7 @@ import{commandbarButtonHTML as w}from"./commandbar.js";import{escapeHtml as c}fr
|
|
|
88
88
|
font-size: var(--text-sm); text-decoration: none; font-family: inherit;
|
|
89
89
|
}
|
|
90
90
|
.theme-switcher-btn:hover { color: var(--panel-accent); background: color-mix(in srgb, var(--panel-accent) 8%, transparent); }
|
|
91
|
-
.theme-switcher-btn:focus-visible { ${
|
|
91
|
+
.theme-switcher-btn:focus-visible { ${o()} }
|
|
92
92
|
.theme-switcher-btn svg { width: 18px; height: 18px; fill: currentColor; flex-shrink: 0; }
|
|
93
93
|
.theme-switcher-popover {
|
|
94
94
|
position: absolute; top: calc(100% + 6px); right: 0;
|
|
@@ -104,7 +104,7 @@ import{commandbarButtonHTML as w}from"./commandbar.js";import{escapeHtml as c}fr
|
|
|
104
104
|
color: var(--page-fg); font-size: var(--text-sm); cursor: pointer; text-align: left; font-family: inherit;
|
|
105
105
|
}
|
|
106
106
|
.theme-option:hover { background: color-mix(in srgb, var(--panel-accent) 8%, transparent); color: var(--panel-accent); }
|
|
107
|
-
.theme-option:focus-visible { ${
|
|
107
|
+
.theme-option:focus-visible { ${o()} }
|
|
108
108
|
.theme-option.active { color: var(--panel-accent); font-weight: 500; }
|
|
109
109
|
.theme-dot { width: 12px; height: 12px; border-radius: 50%; flex-shrink: 0; }
|
|
110
110
|
.theme-check { width: 16px; height: 16px; margin-left: auto; color: var(--panel-accent); }
|
|
@@ -138,7 +138,7 @@ import{commandbarButtonHTML as w}from"./commandbar.js";import{escapeHtml as c}fr
|
|
|
138
138
|
text-align: left;
|
|
139
139
|
}
|
|
140
140
|
.sidebar-btn:hover { background: color-mix(in srgb, var(--panel-accent) 8%, transparent); color: var(--panel-accent); }
|
|
141
|
-
.sidebar-btn:focus-visible { ${
|
|
141
|
+
.sidebar-btn:focus-visible { ${o()} }
|
|
142
142
|
.sidebar-btn.primary {
|
|
143
143
|
background: var(--panel-accent); border-color: var(--panel-accent); color: var(--panel-accent-on);
|
|
144
144
|
font-weight: 500; margin-bottom: 16px; justify-content: center;
|
|
@@ -197,7 +197,7 @@ import{commandbarButtonHTML as w}from"./commandbar.js";import{escapeHtml as c}fr
|
|
|
197
197
|
color: var(--page-fg); transition: opacity 0.15s;
|
|
198
198
|
}
|
|
199
199
|
.modal-btn:hover { opacity: 0.85; }
|
|
200
|
-
.modal-btn:focus-visible { ${
|
|
200
|
+
.modal-btn:focus-visible { ${o()} }
|
|
201
201
|
.modal-btn.confirm {
|
|
202
202
|
background: var(--panel-accent); border-color: var(--panel-accent);
|
|
203
203
|
color: var(--panel-accent-on); font-weight: 500;
|
|
@@ -216,8 +216,8 @@ import{commandbarButtonHTML as w}from"./commandbar.js";import{escapeHtml as c}fr
|
|
|
216
216
|
.header-btn, .theme-switcher-btn { padding: 8px; }
|
|
217
217
|
}
|
|
218
218
|
|
|
219
|
-
${
|
|
220
|
-
${
|
|
219
|
+
${w()}
|
|
220
|
+
${e}`}function z(e){const{title:r="TMUX Sessions",themeTemplate:a="vscode"}=e;return`<script>
|
|
221
221
|
(function() {
|
|
222
222
|
const token = localStorage.getItem('tmux-web-token');
|
|
223
223
|
if (token) {
|
|
@@ -236,40 +236,39 @@ import{commandbarButtonHTML as w}from"./commandbar.js";import{escapeHtml as c}fr
|
|
|
236
236
|
<header class="fixed-header">
|
|
237
237
|
<div class="brand"><a href="/" aria-label="Go to home">tmux<span>-weblink</span></a></div>
|
|
238
238
|
<div class="header-actions">
|
|
239
|
-
${o?w("Search"):""}
|
|
240
239
|
<button class="header-btn" id="notes-toggle" title="Global notes" aria-label="Global notes">
|
|
241
|
-
${
|
|
240
|
+
${i("notes")}
|
|
242
241
|
<span>Notes</span>
|
|
243
242
|
</button>
|
|
244
|
-
${
|
|
243
|
+
${y(a)}
|
|
245
244
|
<a class="header-btn" href="/settings" title="Settings">
|
|
246
|
-
${
|
|
245
|
+
${i("settings")}
|
|
247
246
|
<span>Settings</span>
|
|
248
247
|
</a>
|
|
249
248
|
</div>
|
|
250
249
|
</header>
|
|
251
|
-
<script>${
|
|
250
|
+
<script>${k()}</script>`}function B(e){const{activePage:r,refreshHref:a}=e;function t(l,x,f,g,v=""){return`<a href="${x}" class="${l!==null&&l===r?"sidebar-btn current":"sidebar-btn"}"${v}>
|
|
252
251
|
<svg viewBox="0 0 24 24" fill="currentColor">${f}</svg>
|
|
253
252
|
${g}
|
|
254
|
-
</a>`}const s=n("sessions"),p=n("notes"),m=n("schedule"),b=n("history"),u=n("quick-commands"),h=n("file"),
|
|
253
|
+
</a>`}const s=n("sessions"),p=n("notes"),m=n("schedule"),b=n("history"),u=n("quick-commands"),h=n("file"),I=n("refresh");return`<aside class="action-sidebar">
|
|
255
254
|
<p class="sidebar-label">Actions</p>
|
|
256
255
|
<button class="sidebar-btn primary" id="new-session-btn">
|
|
257
|
-
${
|
|
256
|
+
${i("add")}
|
|
258
257
|
New Session
|
|
259
258
|
</button>
|
|
260
259
|
<hr class="sidebar-divider">
|
|
261
|
-
${
|
|
262
|
-
${
|
|
263
|
-
${
|
|
264
|
-
${
|
|
265
|
-
${
|
|
266
|
-
${
|
|
260
|
+
${t("home","/",s,"Sessions")}
|
|
261
|
+
${t("notes","/notes",p,"All Notes")}
|
|
262
|
+
${t("schedule","/schedule",m,"Scheduled")}
|
|
263
|
+
${t("files","/files",h,"Files")}
|
|
264
|
+
${t("history","/history",b,"History")}
|
|
265
|
+
${t("quickCommands","/quick-commands",u,"Quick Commands")}
|
|
267
266
|
<hr class="sidebar-divider">
|
|
268
|
-
<a href="${
|
|
269
|
-
${
|
|
267
|
+
<a href="${a}" class="sidebar-btn">
|
|
268
|
+
${i("refresh")}
|
|
270
269
|
Refresh
|
|
271
270
|
</a>
|
|
272
|
-
</aside>`}function
|
|
271
|
+
</aside>`}function A(){return` /* \u2500\u2500 New session modal \u2500\u2500 */
|
|
273
272
|
.modal-backdrop {
|
|
274
273
|
display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.3);
|
|
275
274
|
z-index: 500; align-items: center; justify-content: center;
|
|
@@ -314,13 +313,13 @@ import{commandbarButtonHTML as w}from"./commandbar.js";import{escapeHtml as c}fr
|
|
|
314
313
|
color: var(--page-fg); transition: opacity 0.15s;
|
|
315
314
|
}
|
|
316
315
|
.modal-btn:hover { opacity: 0.85; }
|
|
317
|
-
.modal-btn:focus-visible { ${
|
|
316
|
+
.modal-btn:focus-visible { ${o()} }
|
|
318
317
|
.modal-btn.confirm {
|
|
319
318
|
background: var(--panel-accent); border-color: var(--panel-accent);
|
|
320
319
|
color: var(--panel-accent-on); font-weight: 500;
|
|
321
320
|
}
|
|
322
321
|
.modal-btn.confirm:hover { opacity: 0.9; }
|
|
323
|
-
`}function
|
|
322
|
+
`}function T(){return`<div class="modal-backdrop" id="new-session-modal" role="dialog" aria-modal="true" aria-label="Create new tmux session">
|
|
324
323
|
<div class="modal-panel">
|
|
325
324
|
<h2>New Session</h2>
|
|
326
325
|
<div class="modal-field">
|
|
@@ -338,7 +337,7 @@ import{commandbarButtonHTML as w}from"./commandbar.js";import{escapeHtml as c}fr
|
|
|
338
337
|
<button class="modal-btn confirm" id="ns-submit">Create</button>
|
|
339
338
|
</div>
|
|
340
339
|
</div>
|
|
341
|
-
</div>`}function
|
|
340
|
+
</div>`}function M(e){return`(function() {
|
|
342
341
|
const modal = document.getElementById('new-session-modal');
|
|
343
342
|
const openBtn = document.getElementById('new-session-btn');
|
|
344
343
|
const cancelBtn = document.getElementById('ns-cancel');
|
|
@@ -347,7 +346,7 @@ import{commandbarButtonHTML as w}from"./commandbar.js";import{escapeHtml as c}fr
|
|
|
347
346
|
const dirInput = document.getElementById('ns-dir');
|
|
348
347
|
const dirList = document.getElementById('ns-dir-list');
|
|
349
348
|
const errorEl = document.getElementById('ns-error');
|
|
350
|
-
const onCreated = '${
|
|
349
|
+
const onCreated = '${e??""}';
|
|
351
350
|
|
|
352
351
|
// The new session is created on the machine of the currently selected
|
|
353
352
|
// session (window.__tmuxWebScopeAgent is set by the shell client; agent
|
|
@@ -479,4 +478,4 @@ import{commandbarButtonHTML as w}from"./commandbar.js";import{escapeHtml as c}fr
|
|
|
479
478
|
}
|
|
480
479
|
if (e.key === 'Enter') submit();
|
|
481
480
|
});
|
|
482
|
-
})();`}export{
|
|
481
|
+
})();`}export{A as newSessionModalCSS,T as newSessionModalHTML,M as newSessionModalScript,w as reducedMotion,z as sharedHeader,S as sharedLayoutCSS,B as sharedSidebar,y as themeSwitcherButtonHTML,k as themeSwitcherScript};
|