tmux-weblink 2.0.13 → 2.0.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -5
- package/dist/agent.js +1 -1
- package/dist/frontend.js +1 -1
- package/dist/index.js +3 -3
- package/dist/lib/build-app.js +6 -6
- package/dist/lib/cli.js +7 -11
- package/dist/lib/db.js +1 -1
- package/dist/lib/pages/federation.js +1 -1
- 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/settings.js +17 -58
- package/dist/lib/pages/shell.js +17 -29
- package/dist/lib/setup-features.js +1 -1
- package/dist/lib/shared-layout.js +39 -41
- package/dist/lib/state-paths.js +1 -1
- package/package.json +1 -1
- package/dist/lib/commandbar.js +0 -555
- package/dist/lib/ext-loader.js +0 -1
- package/dist/lib/pages/schedule-index.js +0 -392
- package/dist/lib/plugins.js +0 -3
- package/dist/lib/schedule-delay.js +0 -9
- package/dist/lib/scheduler-drawer.js +0 -379
- package/dist/lib/scheduler.js +0 -1
|
@@ -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 v(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 w(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 y(){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 $(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
|
+
${v()}
|
|
220
|
+
${e}`}function S(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,38 @@ 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
|
+
${w(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>${
|
|
252
|
-
<svg viewBox="0 0 24 24" fill="currentColor">${
|
|
253
|
-
${
|
|
254
|
-
</a>`}const s=n("sessions"),p=n("notes"),m=n("
|
|
250
|
+
<script>${y()}</script>`}function z(e){const{activePage:r,refreshHref:a}=e;function t(l,h,x,f,g=""){return`<a href="${h}" class="${l!==null&&l===r?"sidebar-btn current":"sidebar-btn"}"${g}>
|
|
251
|
+
<svg viewBox="0 0 24 24" fill="currentColor">${x}</svg>
|
|
252
|
+
${f}
|
|
253
|
+
</a>`}const s=n("sessions"),p=n("notes"),m=n("history"),b=n("quick-commands"),u=n("file"),k=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
|
-
${e("quickCommands","/quick-commands",u,"Quick Commands")}
|
|
260
|
+
${t("home","/",s,"Sessions")}
|
|
261
|
+
${t("notes","/notes",p,"All Notes")}
|
|
262
|
+
${t("files","/files",u,"Files")}
|
|
263
|
+
${t("history","/history",m,"History")}
|
|
264
|
+
${t("quickCommands","/quick-commands",b,"Quick Commands")}
|
|
267
265
|
<hr class="sidebar-divider">
|
|
268
|
-
<a href="${
|
|
269
|
-
${
|
|
266
|
+
<a href="${a}" class="sidebar-btn">
|
|
267
|
+
${i("refresh")}
|
|
270
268
|
Refresh
|
|
271
269
|
</a>
|
|
272
|
-
</aside>`}function
|
|
270
|
+
</aside>`}function B(){return` /* \u2500\u2500 New session modal \u2500\u2500 */
|
|
273
271
|
.modal-backdrop {
|
|
274
272
|
display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.3);
|
|
275
273
|
z-index: 500; align-items: center; justify-content: center;
|
|
@@ -314,13 +312,13 @@ import{commandbarButtonHTML as w}from"./commandbar.js";import{escapeHtml as c}fr
|
|
|
314
312
|
color: var(--page-fg); transition: opacity 0.15s;
|
|
315
313
|
}
|
|
316
314
|
.modal-btn:hover { opacity: 0.85; }
|
|
317
|
-
.modal-btn:focus-visible { ${
|
|
315
|
+
.modal-btn:focus-visible { ${o()} }
|
|
318
316
|
.modal-btn.confirm {
|
|
319
317
|
background: var(--panel-accent); border-color: var(--panel-accent);
|
|
320
318
|
color: var(--panel-accent-on); font-weight: 500;
|
|
321
319
|
}
|
|
322
320
|
.modal-btn.confirm:hover { opacity: 0.9; }
|
|
323
|
-
`}function
|
|
321
|
+
`}function A(){return`<div class="modal-backdrop" id="new-session-modal" role="dialog" aria-modal="true" aria-label="Create new tmux session">
|
|
324
322
|
<div class="modal-panel">
|
|
325
323
|
<h2>New Session</h2>
|
|
326
324
|
<div class="modal-field">
|
|
@@ -338,7 +336,7 @@ import{commandbarButtonHTML as w}from"./commandbar.js";import{escapeHtml as c}fr
|
|
|
338
336
|
<button class="modal-btn confirm" id="ns-submit">Create</button>
|
|
339
337
|
</div>
|
|
340
338
|
</div>
|
|
341
|
-
</div>`}function
|
|
339
|
+
</div>`}function T(e){return`(function() {
|
|
342
340
|
const modal = document.getElementById('new-session-modal');
|
|
343
341
|
const openBtn = document.getElementById('new-session-btn');
|
|
344
342
|
const cancelBtn = document.getElementById('ns-cancel');
|
|
@@ -347,7 +345,7 @@ import{commandbarButtonHTML as w}from"./commandbar.js";import{escapeHtml as c}fr
|
|
|
347
345
|
const dirInput = document.getElementById('ns-dir');
|
|
348
346
|
const dirList = document.getElementById('ns-dir-list');
|
|
349
347
|
const errorEl = document.getElementById('ns-error');
|
|
350
|
-
const onCreated = '${
|
|
348
|
+
const onCreated = '${e??""}';
|
|
351
349
|
|
|
352
350
|
// The new session is created on the machine of the currently selected
|
|
353
351
|
// session (window.__tmuxWebScopeAgent is set by the shell client; agent
|
|
@@ -479,4 +477,4 @@ import{commandbarButtonHTML as w}from"./commandbar.js";import{escapeHtml as c}fr
|
|
|
479
477
|
}
|
|
480
478
|
if (e.key === 'Enter') submit();
|
|
481
479
|
});
|
|
482
|
-
})();`}export{
|
|
480
|
+
})();`}export{B as newSessionModalCSS,A as newSessionModalHTML,T as newSessionModalScript,v as reducedMotion,S as sharedHeader,$ as sharedLayoutCSS,z as sharedSidebar,w as themeSwitcherButtonHTML,y as themeSwitcherScript};
|
package/dist/lib/state-paths.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"node:path";import{homedir as n}from"node:os";function
|
|
1
|
+
import e from"node:path";import{homedir as n}from"node:os";function u(t){if(!t)return!1;const o=t.trim().toLowerCase();return o==="1"||o==="true"||o==="yes"}function i(){const t=process.env.TMUX_WEB_MODE?.trim().toLowerCase();return t==="development"||t==="dev"||u(process.env.TMUX_WEB_DEV)?!0:process.env.NODE_ENV==="development"||process.env.npm_lifecycle_event==="dev"}function s(){return i()?e.join(n(),".dev",".tmux-web"):e.join(n(),".tmux-web")}function r(){return i()?e.join(n(),".dev",".config"):e.join(n(),".config")}function f(){return e.join(r(),"tmux-web","settings.json")}function m(){return e.join(r(),"tmux-web","theme.json")}function a(){return e.join(r(),"tmux-web","federation.json")}function d(){return e.join(s(),"uploads")}export{r as getConfigRoot,s as getDataRoot,a as getFederationPath,f as getSettingsPath,m as getThemePath,d as getUploadsRoot};
|