townmouse 0.0.0-stage → 0.2.1

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 (103) hide show
  1. package/CHANGELOG.md +126 -0
  2. package/DESIGN.md +169 -0
  3. package/LICENSE +661 -0
  4. package/README.md +368 -2
  5. package/SECURITY.md +57 -0
  6. package/TOWNMOUSE.md +91 -0
  7. package/assets/brand/mascot/README.md +23 -0
  8. package/assets/brand/mascot/townmouse-aristocrat.png +0 -0
  9. package/assets/brand/mascot/townmouse-icon.svg +1 -0
  10. package/assets/brand/mascot/townmouse-monocled.png +0 -0
  11. package/bin/townmouse +68 -0
  12. package/docs/PACKAGING.md +275 -0
  13. package/docs/browser-workspace.md +184 -0
  14. package/docs/panes.md +252 -0
  15. package/native/TownmouseApp.swift +108 -0
  16. package/package.json +89 -4
  17. package/public/apple-touch-icon.png +0 -0
  18. package/public/brand/floydslabs-credit.png +0 -0
  19. package/public/brand/floydslabs-credit.webp +0 -0
  20. package/public/brand/townmouse-aristocrat.webp +0 -0
  21. package/public/brand/townmouse-monocled.webp +0 -0
  22. package/public/clipboard-text.mjs +5 -0
  23. package/public/favicon-16x16.png +0 -0
  24. package/public/favicon-32x32.png +0 -0
  25. package/public/favicon.ico +0 -0
  26. package/public/favicon.svg +1 -0
  27. package/public/features/autosave.mjs +76 -0
  28. package/public/features/clipboard.mjs +69 -0
  29. package/public/features/command-palette.mjs +181 -0
  30. package/public/features/desktop-palette.mjs +19 -0
  31. package/public/features/export.mjs +37 -0
  32. package/public/features/file-drop.mjs +77 -0
  33. package/public/features/floating-palette.mjs +113 -0
  34. package/public/features/fontsize.mjs +72 -0
  35. package/public/features/haptic-keys.mjs +42 -0
  36. package/public/features/history-undo.mjs +102 -0
  37. package/public/features/keepalive.mjs +36 -0
  38. package/public/features/keybar-config.mjs +70 -0
  39. package/public/features/keyboard-shortcuts.mjs +74 -0
  40. package/public/features/links.mjs +139 -0
  41. package/public/features/multi-window-sync.mjs +74 -0
  42. package/public/features/osc-bridge.mjs +59 -0
  43. package/public/features/phone-landscape-focus.mjs +157 -0
  44. package/public/features/recent-commands.mjs +100 -0
  45. package/public/features/search.mjs +134 -0
  46. package/public/features/session-lock.mjs +96 -0
  47. package/public/features/session-manager.mjs +149 -0
  48. package/public/features/settings-sync.mjs +77 -0
  49. package/public/features/shortcut-help.mjs +85 -0
  50. package/public/features/smart-completions.mjs +101 -0
  51. package/public/features/smart-suggest.mjs +124 -0
  52. package/public/features/snippets.mjs +85 -0
  53. package/public/features/split-view.mjs +102 -0
  54. package/public/features/status-metrics.mjs +114 -0
  55. package/public/features/stylus-support.mjs +124 -0
  56. package/public/features/swipe-history.mjs +141 -0
  57. package/public/features/swipe-sessions.mjs +85 -0
  58. package/public/features/tab-reorder.mjs +62 -0
  59. package/public/features/theme-system.mjs +51 -0
  60. package/public/features/toast-status.mjs +118 -0
  61. package/public/features/two-finger-menu.mjs +87 -0
  62. package/public/features/voice-input.mjs +244 -0
  63. package/public/features/wake-fullscreen.mjs +67 -0
  64. package/public/features/window-title.mjs +40 -0
  65. package/public/features/zoom.mjs +80 -0
  66. package/public/icon-128.png +0 -0
  67. package/public/icon-180.png +0 -0
  68. package/public/icon-192.png +0 -0
  69. package/public/icon-48.png +0 -0
  70. package/public/icon-512-maskable.png +0 -0
  71. package/public/icon-512.png +0 -0
  72. package/public/icon.svg +1 -0
  73. package/public/index.html +1765 -0
  74. package/public/input-chunks.mjs +22 -0
  75. package/public/input-guard.mjs +210 -0
  76. package/public/manifest.json +56 -0
  77. package/public/panes.css +1257 -0
  78. package/public/panes.html +208 -0
  79. package/public/panes.mjs +2625 -0
  80. package/public/service-worker.js +67 -0
  81. package/public/workspace.css +1447 -0
  82. package/public/workspace.mjs +1475 -0
  83. package/scripts/install-service.sh +269 -0
  84. package/scripts/node-runtime.sh +138 -0
  85. package/scripts/panes +439 -0
  86. package/scripts/prepare-native.sh +35 -0
  87. package/scripts/run-hooks +69 -0
  88. package/scripts/t1.sh +113 -0
  89. package/scripts/uninstall-service.sh +49 -0
  90. package/src/agent-guide.js +260 -0
  91. package/src/attachments.js +128 -0
  92. package/src/browser-dom.js +545 -0
  93. package/src/browser-workspace.js +1246 -0
  94. package/src/chrome-resolve.js +80 -0
  95. package/src/pty-permissions.js +99 -0
  96. package/src/regex-worker.js +13 -0
  97. package/src/replay-text.js +189 -0
  98. package/src/request-boundary.js +58 -0
  99. package/src/safe-regex.js +87 -0
  100. package/src/server.js +1122 -0
  101. package/src/shell-resolve.js +42 -0
  102. package/src/static-deps.js +61 -0
  103. package/src/workspace-panes.js +1099 -0
@@ -0,0 +1,208 @@
1
+ <!doctype html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="utf-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover">
6
+ <meta name="color-scheme" content="dark">
7
+ <title>Panes — Townmouse</title>
8
+ <link rel="stylesheet" href="/node_modules/@xterm/xterm/css/xterm.css">
9
+ <link rel="stylesheet" href="/panes.css">
10
+ </head>
11
+ <body>
12
+ <div class="panes-app" id="panes-app">
13
+ <nav class="tabstrip" id="tabstrip" aria-label="Workspace tabs" hidden></nav>
14
+ <main class="workspace" id="workspace" aria-label="Workspace panes">
15
+ <div class="pane-grid" id="pane-grid" data-count="0" hidden></div>
16
+ <section class="empty-state" id="empty-state" aria-labelledby="empty-title">
17
+ <div class="empty-mark" aria-hidden="true">&gt;_</div>
18
+ <h1 id="empty-title">No panes open</h1>
19
+ <p id="empty-copy">Open a terminal or a browser to begin.</p>
20
+ <div class="empty-actions" id="empty-actions">
21
+ <button type="button" class="btn btn-primary" id="empty-add-terminal">Add terminal</button>
22
+ <button type="button" class="btn" id="empty-add-browser">Add browser</button>
23
+ <button type="button" class="btn btn-quiet" id="empty-new-tab">New tab</button>
24
+ </div>
25
+ </section>
26
+ </main>
27
+
28
+ <div class="bottom-stack">
29
+ <div class="notice" id="notice" role="status" aria-live="polite" hidden></div>
30
+ <div class="pane-keybar" id="pane-keybar" role="toolbar" aria-label="Terminal keys" hidden></div>
31
+ <footer class="pane-bar" id="pane-bar" aria-label="Workspace bar">
32
+ <button type="button" class="bar-button bar-back" id="back-button" aria-label="Back" disabled>
33
+ <svg viewBox="0 0 24 24" aria-hidden="true" fill="none" stroke="currentColor" stroke-width="1.9" stroke-linecap="round" stroke-linejoin="round"><path d="M15 18l-6-6 6-6"/></svg>
34
+ </button>
35
+ <div class="host-pill" id="host-pill">
36
+ <span class="host-mark" aria-hidden="true">&gt;_</span>
37
+ <span class="host-name" id="host-name">localhost</span>
38
+ </div>
39
+ <div class="bar-spacer" aria-hidden="true"></div>
40
+ <button type="button" class="bar-button bar-tabs" id="tabs-button" aria-label="Workspace tabs">
41
+ <svg viewBox="0 0 24 24" aria-hidden="true" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><path d="M4 7h7v13H4zM11 7h9v13h-9"/></svg>
42
+ <span class="bar-label">Tabs</span>
43
+ <span class="count-badge" id="tab-count" aria-hidden="true">0</span>
44
+ </button>
45
+ <button type="button" class="bar-button" id="keyboard-button" aria-label="Focus the active terminal or browser">
46
+ <svg viewBox="0 0 24 24" aria-hidden="true" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><path d="M3 6h18v12H3zM6 10h.01M9 10h.01M12 10h.01M15 10h.01M18 10h.01M7 14h10"/></svg>
47
+ <span class="bar-label">Keyboard</span>
48
+ </button>
49
+ <button type="button" class="bar-button" id="menu-button" aria-label="Menu">
50
+ <svg viewBox="0 0 24 24" aria-hidden="true" fill="none" stroke="currentColor" stroke-width="1.9" stroke-linecap="round" stroke-linejoin="round"><path d="M4 7h16M4 12h16M4 17h16"/></svg>
51
+ <span class="bar-label">Menu</span>
52
+ </button>
53
+ </footer>
54
+ </div>
55
+ </div>
56
+
57
+ <dialog class="sheet" id="tabs-dialog" aria-labelledby="tabs-dialog-title">
58
+ <div class="sheet-inner">
59
+ <header class="sheet-header">
60
+ <h2 id="tabs-dialog-title">Workspace tabs</h2>
61
+ <button type="button" class="icon-button" data-close aria-label="Close tabs dialog">
62
+ <svg viewBox="0 0 24 24" aria-hidden="true" fill="none" stroke="currentColor" stroke-width="1.9" stroke-linecap="round"><path d="M6 6l12 12M18 6L6 18"/></svg>
63
+ </button>
64
+ </header>
65
+ <div class="sheet-actions">
66
+ <button type="button" class="btn btn-primary" id="tabs-new-tab">New tab</button>
67
+ <button type="button" class="btn" id="tabs-add-terminal">Add terminal</button>
68
+ <button type="button" class="btn" id="tabs-add-browser">Add browser</button>
69
+ </div>
70
+ <ul class="tab-list" id="tabs-list" aria-label="Workspace tabs"></ul>
71
+ <p class="sheet-empty" id="tabs-empty" hidden>No workspace tabs.</p>
72
+ <p class="sheet-note" id="tabs-limits"></p>
73
+ </div>
74
+ </dialog>
75
+
76
+ <dialog class="sheet sheet-menu" id="menu-dialog" aria-labelledby="menu-dialog-title">
77
+ <div class="sheet-inner">
78
+ <header class="sheet-header">
79
+ <h2 id="menu-dialog-title">Menu</h2>
80
+ <button type="button" class="icon-button" data-close aria-label="Close menu">
81
+ <svg viewBox="0 0 24 24" aria-hidden="true" fill="none" stroke="currentColor" stroke-width="1.9" stroke-linecap="round"><path d="M6 6l12 12M18 6L6 18"/></svg>
82
+ </button>
83
+ </header>
84
+ <div class="menu-list">
85
+ <button type="button" class="menu-item" id="menu-add-terminal">
86
+ <svg viewBox="0 0 24 24" aria-hidden="true" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><path d="M4 5l6 7-6 7M13 19h7"/></svg>
87
+ <span><strong>Add terminal</strong><small>A live shell in this tab.</small></span>
88
+ </button>
89
+ <button type="button" class="menu-item" id="menu-add-browser">
90
+ <svg viewBox="0 0 24 24" aria-hidden="true" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><path d="M3 5h18v14H3zM3 9h18M6 7h.01"/></svg>
91
+ <span><strong>Add browser</strong><small>A server-rendered page in this tab.</small></span>
92
+ </button>
93
+ <button type="button" class="menu-item" id="menu-new-tab">
94
+ <svg viewBox="0 0 24 24" aria-hidden="true" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><path d="M12 5v14M5 12h14"/></svg>
95
+ <span><strong>New tab</strong><small>A fresh workspace tab.</small></span>
96
+ </button>
97
+ <button type="button" class="menu-item" id="menu-attach">
98
+ <svg viewBox="0 0 24 24" aria-hidden="true" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><path d="M21 11.5l-8.5 8.5a5 5 0 01-7-7l9-9a3.5 3.5 0 015 5l-9 9a2 2 0 01-3-3l8-8"/></svg>
99
+ <span><strong>Attach file</strong><small>Upload into the active terminal.</small></span>
100
+ </button>
101
+ <button type="button" class="menu-item" id="menu-reader">
102
+ <svg viewBox="0 0 24 24" aria-hidden="true" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><path d="M4 5h16v14H4zM8 9h8M8 13h8M8 17h5"/></svg>
103
+ <span><strong>Reader view</strong><small>Word-wrapped transcript of this terminal.</small></span>
104
+ </button>
105
+ <button type="button" class="menu-item" id="menu-font-down">
106
+ <svg viewBox="0 0 24 24" aria-hidden="true" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round"><path d="M5 17L10 7l5 10M7 14h6M16 17h5"/></svg>
107
+ <span><strong>Smaller text</strong><small>Reduce the terminal font size.</small></span>
108
+ </button>
109
+ <button type="button" class="menu-item" id="menu-font-up">
110
+ <svg viewBox="0 0 24 24" aria-hidden="true" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round"><path d="M5 17L10 7l5 10M7 14h6M16 11h5M18.5 8.5v5"/></svg>
111
+ <span><strong>Larger text</strong><small>Increase the terminal font size.</small></span>
112
+ </button>
113
+ <button type="button" class="menu-item" id="menu-shortcuts">
114
+ <svg viewBox="0 0 24 24" aria-hidden="true" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><path d="M3 6h18v12H3zM6 10h.01M9 10h.01M12 10h.01M6 14h8"/></svg>
115
+ <span><strong>Keyboard shortcuts</strong><small>Alt chords for tabs and panes.</small></span>
116
+ </button>
117
+ </div>
118
+ </div>
119
+ </dialog>
120
+
121
+ <dialog class="sheet" id="shortcuts-dialog" aria-labelledby="shortcuts-title">
122
+ <div class="sheet-inner">
123
+ <header class="sheet-header">
124
+ <h2 id="shortcuts-title">Keyboard shortcuts</h2>
125
+ <button type="button" class="icon-button" data-close aria-label="Close shortcuts">
126
+ <svg viewBox="0 0 24 24" aria-hidden="true" fill="none" stroke="currentColor" stroke-width="1.9" stroke-linecap="round"><path d="M6 6l12 12M18 6L6 18"/></svg>
127
+ </button>
128
+ </header>
129
+ <dl class="shortcut-list">
130
+ <dt>Alt + T</dt><dd>New workspace tab</dd>
131
+ <dt>Alt + 1…9</dt><dd>Switch to a tab</dd>
132
+ <dt>Alt + [ / ]</dt><dd>Previous / next tab</dd>
133
+ <dt>Alt + Arrow</dt><dd>Focus the previous / next pane</dd>
134
+ <dt>Alt + M</dt><dd>Maximize or restore the active pane</dd>
135
+ <dt>Alt + W</dt><dd>Close the active pane (with confirmation)</dd>
136
+ </dl>
137
+ </div>
138
+ </dialog>
139
+
140
+ <dialog class="sheet sheet-confirm" id="close-confirm" aria-labelledby="close-confirm-title">
141
+ <div class="sheet-inner">
142
+ <header class="sheet-header">
143
+ <h2 id="close-confirm-title">Close this pane?</h2>
144
+ </header>
145
+ <p class="confirm-copy" id="close-confirm-copy">Closing this pane ends its shell and any running job. This cannot be undone.</p>
146
+ <div class="confirm-actions">
147
+ <button type="button" class="btn btn-quiet" id="close-cancel">Cancel</button>
148
+ <button type="button" class="btn btn-danger" id="close-approve">Close</button>
149
+ </div>
150
+ </div>
151
+ </dialog>
152
+
153
+ <input type="file" id="attach-input" multiple accept="image/*,.pdf,.txt,.json,.md,.zip" hidden>
154
+
155
+ <div class="context-menu" id="browser-context-menu" role="menu" aria-label="Browser actions" hidden>
156
+ <button type="button" role="menuitem" data-browser-context="copy-url">Copy URL</button>
157
+ <button type="button" role="menuitem" data-browser-context="back">Back</button>
158
+ <button type="button" role="menuitem" data-browser-context="forward">Forward</button>
159
+ <button type="button" role="menuitem" data-browser-context="reload">Reload</button>
160
+ <button type="button" role="menuitem" data-browser-context="open">Open in host browser</button>
161
+ </div>
162
+
163
+ <div class="context-menu" id="pane-context-menu" role="menu" aria-label="Terminal actions" hidden>
164
+ <button type="button" role="menuitem" data-context="copy">Copy selection</button>
165
+ <button type="button" role="menuitem" data-context="paste">Paste</button>
166
+ <button type="button" role="menuitem" data-context="select-all">Select all</button>
167
+ <button type="button" role="menuitem" data-context="clear">Clear screen</button>
168
+ <button type="button" role="menuitem" data-context="reader">Reader view</button>
169
+ </div>
170
+
171
+ <section class="reader-view" id="reader-view" role="dialog" aria-modal="true" aria-labelledby="reader-title" hidden>
172
+ <header class="reader-header">
173
+ <div><small>Word-wrapped transcript</small><h2 id="reader-title">Reader</h2></div>
174
+ <div class="reader-actions">
175
+ <button type="button" class="btn btn-quiet" id="reader-refresh">Refresh</button>
176
+ <button type="button" class="btn" id="reader-close">Close</button>
177
+ </div>
178
+ </header>
179
+ <pre class="reader-text" id="reader-text" tabindex="0"></pre>
180
+ </section>
181
+
182
+ <aside class="page-dialog" id="browser-control" role="dialog" aria-labelledby="browser-control-label" hidden>
183
+ <p id="browser-control-label">Choose an option</p>
184
+ <select id="browser-control-select" hidden></select>
185
+ <input id="browser-control-value" type="text" hidden>
186
+ <div class="page-dialog-actions">
187
+ <button type="button" class="btn btn-quiet" id="browser-control-cancel">Cancel</button>
188
+ <button type="button" class="btn btn-primary" id="browser-control-apply">Apply</button>
189
+ </div>
190
+ </aside>
191
+
192
+ <aside class="page-dialog" id="page-dialog" role="alertdialog" aria-labelledby="page-dialog-message" hidden>
193
+ <p id="page-dialog-message"></p>
194
+ <label class="page-dialog-field" id="page-dialog-field" hidden>
195
+ <span>Response</span>
196
+ <input id="page-dialog-input" autocomplete="off">
197
+ </label>
198
+ <div class="page-dialog-actions">
199
+ <button type="button" class="btn btn-quiet" id="page-dialog-dismiss">Dismiss</button>
200
+ <button type="button" class="btn btn-primary" id="page-dialog-accept">Accept</button>
201
+ </div>
202
+ </aside>
203
+
204
+ <p class="sr-only" id="sr-status" role="status" aria-live="polite"></p>
205
+
206
+ <script type="module" src="/panes.mjs"></script>
207
+ </body>
208
+ </html>