Files
infinite/dist/assets/index-B8MxvBkv.css
Haapy 366aaa6ef4 Icons — toolbar buttons are now 32×32 line-icon buttons (paper/document for note, terminal-prompt for terminal, globe
for website). Tooltips on hover show label + shortcut. SVGs are inline in src/canvas/icons.tsx, using currentColor so
  they inherit the text color.

  Embed website — new WebCard kind:
  - Click the globe → prompt() for URL (auto-prepends https:// if missing).
  - Card layout: header (title or hostname) → URL bar (monospace, Enter to navigate, Esc to cancel) → iframe sandboxed
  with allow-scripts allow-same-origin allow-forms allow-popups allow-popups-to-escape-sandbox.
  - Right-click the header to rename. Sites with X-Frame-Options: DENY won't render — that's the iframe-route caveat I
  mentioned; we can upgrade to a real Tauri Webview later if too many sites are blocked.

  Shortcuts — all gated on !isInEditable(activeElement) so they don't fire while typing in CodeMirror, an input, or
  xterm:
  - Ctrl/Cmd+D — duplicate the top-z card (terminals get a fresh shell, same position+28px, same title)
  - Ctrl/Cmd+N — new note
  - Ctrl/Cmd+T — new terminal
  - Delete / Backspace — close the top-z card

  "Top-z card" = the one most recently clicked or just created, which matches the "click to focus" model we already
  have. To duplicate a terminal: click its header to focus, then Ctrl+D — xterm itself doesn't get the keystroke because
   the header isn't an editable target.
2026-05-15 12:07:48 +00:00

33 lines
12 KiB
CSS

/**
* Copyright (c) 2014 The xterm.js authors. All rights reserved.
* Copyright (c) 2012-2013, Christopher Jeffrey (MIT License)
* https://github.com/chjj/term.js
* @license MIT
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*
* Originally forked from (with the author's permission):
* Fabrice Bellard's javascript vt100 for jslinux:
* http://bellard.org/jslinux/
* Copyright (c) 2011 Fabrice Bellard
* The original design remains. The terminal itself
* has been extended to include xterm CSI codes, among
* other features.
*/.xterm{cursor:text;position:relative;user-select:none;-ms-user-select:none;-webkit-user-select:none}.xterm.focus,.xterm:focus{outline:none}.xterm .xterm-helpers{position:absolute;top:0;z-index:5}.xterm .xterm-helper-textarea{padding:0;border:0;margin:0;position:absolute;opacity:0;left:-9999em;top:0;width:0;height:0;z-index:-5;white-space:nowrap;overflow:hidden;resize:none}.xterm .composition-view{background:#000;color:#fff;display:none;position:absolute;white-space:nowrap;z-index:1}.xterm .composition-view.active{display:block}.xterm .xterm-viewport{background-color:#000;overflow-y:scroll;cursor:default;position:absolute;right:0;left:0;top:0;bottom:0}.xterm .xterm-screen{position:relative}.xterm .xterm-screen canvas{position:absolute;left:0;top:0}.xterm-char-measure-element{display:inline-block;visibility:hidden;position:absolute;top:0;left:-9999em;line-height:normal}.xterm.enable-mouse-events{cursor:default}.xterm.xterm-cursor-pointer,.xterm .xterm-cursor-pointer{cursor:pointer}.xterm.column-select.focus{cursor:crosshair}.xterm .xterm-accessibility:not(.debug),.xterm .xterm-message{position:absolute;left:0;top:0;bottom:0;right:0;z-index:10;color:transparent;pointer-events:none}.xterm .xterm-accessibility-tree:not(.debug) *::selection{color:transparent}.xterm .xterm-accessibility-tree{font-family:monospace;-webkit-user-select:text;user-select:text;white-space:pre}.xterm .xterm-accessibility-tree>div{transform-origin:left;width:fit-content}.xterm .live-region{position:absolute;left:-9999px;width:1px;height:1px;overflow:hidden}.xterm-dim{opacity:1!important}.xterm-underline-1{text-decoration:underline}.xterm-underline-2{text-decoration:double underline}.xterm-underline-3{text-decoration:wavy underline}.xterm-underline-4{text-decoration:dotted underline}.xterm-underline-5{text-decoration:dashed underline}.xterm-overline{text-decoration:overline}.xterm-overline.xterm-underline-1{text-decoration:overline underline}.xterm-overline.xterm-underline-2{text-decoration:overline double underline}.xterm-overline.xterm-underline-3{text-decoration:overline wavy underline}.xterm-overline.xterm-underline-4{text-decoration:overline dotted underline}.xterm-overline.xterm-underline-5{text-decoration:overline dashed underline}.xterm-strikethrough{text-decoration:line-through}.xterm-screen .xterm-decoration-container .xterm-decoration{z-index:6;position:absolute}.xterm-screen .xterm-decoration-container .xterm-decoration.xterm-decoration-top-layer{z-index:7}.xterm-decoration-overview-ruler{z-index:8;position:absolute;top:0;right:0;pointer-events:none}.xterm-decoration-top{z-index:2;position:relative}.xterm .xterm-scrollable-element>.scrollbar{cursor:default}.xterm .xterm-scrollable-element>.scrollbar>.scra{cursor:pointer;font-size:11px!important}.xterm .xterm-scrollable-element>.visible{opacity:1;background:#0000;transition:opacity .1s linear;z-index:11}.xterm .xterm-scrollable-element>.invisible{opacity:0;pointer-events:none}.xterm .xterm-scrollable-element>.invisible.fade{transition:opacity .8s linear}.xterm .xterm-scrollable-element>.shadow{position:absolute;display:none}.xterm .xterm-scrollable-element>.shadow.top{display:block;top:0;left:3px;height:3px;width:100%;box-shadow:var(--vscode-scrollbar-shadow, #000) 0 6px 6px -6px inset}.xterm .xterm-scrollable-element>.shadow.left{display:block;top:3px;left:0;height:100%;width:3px;box-shadow:var(--vscode-scrollbar-shadow, #000) 6px 0 6px -6px inset}.xterm .xterm-scrollable-element>.shadow.top-left-corner{display:block;top:0;left:0;height:3px;width:3px}.xterm .xterm-scrollable-element>.shadow.top.left{box-shadow:var(--vscode-scrollbar-shadow, #000) 6px 0 6px -6px inset}.canvas-container{position:fixed;top:0;right:0;bottom:0;left:0;overflow:hidden;cursor:default;background:var(--bg);touch-action:none;overscroll-behavior:contain}.canvas-container.pan-mode{cursor:grab}.canvas-container.panning{cursor:grabbing}.canvas-grid{position:absolute;top:0;right:0;bottom:0;left:0;pointer-events:none;background-image:radial-gradient(circle,var(--bg-grid) 1px,transparent 1px);background-repeat:repeat}.canvas-hud{position:fixed;bottom:12px;left:12px;display:flex;gap:12px;padding:6px 10px;background:#00000080;border-radius:6px;font-size:11px;font-family:ui-monospace,Menlo,monospace;color:var(--text);pointer-events:none;z-index:1000}.card{position:absolute;background:var(--card-bg);border:calc(1px * var(--scale, 1)) solid var(--card-border);border-radius:calc(8px * var(--scale, 1));box-shadow:0 calc(4px * var(--scale, 1)) calc(16px * var(--scale, 1)) #0000004d;display:flex;flex-direction:column}.card-header{padding:.31em .46em .31em .77em;background:#0003;border-bottom:calc(1px * var(--scale, 1)) solid var(--card-border);font-size:.85em;cursor:move;flex-shrink:0;overflow:hidden;border-top-left-radius:inherit;border-top-right-radius:inherit;display:flex;align-items:center;gap:.46em}.card-title{flex:1;min-width:0;background:transparent;border:none;outline:none;color:var(--text);font-family:inherit;font-size:inherit;padding:.15em 0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.card-title--empty{opacity:.35}.card-title--editing{cursor:text}.card-title--editing::placeholder{color:var(--text);opacity:.35}.card-close{flex-shrink:0;width:1.6em;height:1.6em;display:flex;align-items:center;justify-content:center;background:transparent;border:none;border-radius:4px;color:var(--text);opacity:.5;font-size:1.2em;line-height:1;cursor:pointer;padding:0;font-family:inherit}.card-close:hover{background:#ff505040;opacity:1}.card-body{flex:1;overflow:hidden;border-bottom-left-radius:inherit;border-bottom-right-radius:inherit}.note-body .cm-editor{height:100%}.note-body .cm-editor.cm-focused{outline:none}.terminal-body{background:#1d1d23;padding:calc(4px * var(--scale, 1));height:100%}.terminal-body .xterm,.terminal-body .xterm-viewport,.terminal-body .xterm-screen{height:100%!important;width:100%!important}.resize-handle{position:absolute;z-index:5;background:transparent}.resize-n,.resize-s{left:0;right:0;height:8px;cursor:ns-resize}.resize-n{top:-4px}.resize-s{bottom:-4px}.resize-e,.resize-w{top:0;bottom:0;width:8px;cursor:ew-resize}.resize-e{right:-4px}.resize-w{left:-4px}.resize-ne,.resize-nw,.resize-se,.resize-sw{width:14px;height:14px;z-index:6}.resize-ne{top:-4px;right:-4px;cursor:nesw-resize}.resize-nw{top:-4px;left:-4px;cursor:nwse-resize}.resize-se{bottom:-4px;right:-4px;cursor:nwse-resize}.resize-sw{bottom:-4px;left:-4px;cursor:nesw-resize}.toolbar{position:fixed;top:12px;left:220px;display:flex;gap:6px;padding:6px;background:#00000080;border-radius:8px;z-index:1000}.board-switcher{position:fixed;top:12px;left:12px;z-index:1001}.board-switcher-trigger{display:flex;align-items:center;gap:8px;background:#0009;color:var(--text);border:1px solid var(--card-border);border-radius:8px;padding:7px 12px;font-size:12px;font-family:inherit;cursor:pointer;min-width:180px;max-width:260px}.board-switcher-trigger:hover{border-color:var(--accent)}.board-switcher-name{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-align:left}.board-switcher-caret{opacity:.6;font-size:10px}.board-switcher-menu{position:absolute;top:calc(100% + 4px);left:0;min-width:220px;background:var(--card-bg, #2a2a32);border:1px solid var(--card-border);border-radius:8px;padding:4px;box-shadow:0 8px 24px #00000080;display:flex;flex-direction:column;gap:1px}.board-switcher-row{display:flex;align-items:center;border-radius:5px;padding:0 2px 0 0}.board-switcher-row:hover{background:#ffffff0f}.board-switcher-row.is-current{background:#ffffff0a}.board-switcher-name-btn{flex:1;display:flex;align-items:center;justify-content:space-between;gap:8px;background:transparent;border:none;color:var(--text);font-family:inherit;font-size:12px;text-align:left;padding:7px 10px;cursor:pointer;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.board-switcher-dot{font-size:8px;opacity:.6}.board-switcher-delete{flex-shrink:0;width:22px;height:22px;background:transparent;border:none;border-radius:4px;color:var(--text);opacity:0;font-size:14px;line-height:1;cursor:pointer;padding:0}.board-switcher-row:hover .board-switcher-delete{opacity:.5}.board-switcher-delete:hover{background:#ff505040;opacity:1!important}.board-switcher-input{flex:1;background:transparent;border:1px solid var(--accent, #4f87ff);border-radius:5px;color:var(--text);font-family:inherit;font-size:12px;padding:6px 10px;outline:none}.board-switcher-divider{height:1px;background:var(--card-border);margin:4px 2px}.board-switcher-new{background:transparent;border:none;color:var(--text);font-family:inherit;font-size:12px;text-align:left;padding:7px 10px;border-radius:5px;cursor:pointer;opacity:.75}.board-switcher-new:hover{background:#ffffff0f;opacity:1}.toolbar button{background:var(--card-bg);color:var(--text);border:1px solid var(--card-border);border-radius:5px;padding:6px 10px;font-size:12px;cursor:pointer;font-family:inherit}.toolbar button:hover{border-color:var(--accent)}.toolbar-btn{display:inline-flex;align-items:center;justify-content:center;width:32px;height:32px;padding:0!important;opacity:.85}.toolbar-btn:hover{opacity:1}.toolbar-btn svg{display:block}.web-card{display:flex;flex-direction:column}.web-url-bar{flex-shrink:0;padding:.31em .46em;background:#00000026;border-bottom:calc(1px * var(--scale, 1)) solid var(--card-border)}.web-url-input{width:100%;background:#00000040;border:1px solid var(--card-border);border-radius:4px;color:var(--text);font-family:ui-monospace,Menlo,monospace;font-size:.85em;padding:.31em .46em;outline:none}.web-url-input:focus{border-color:var(--accent)}.web-body{background:#fff;position:relative}.web-frame{border:0;width:100%;height:100%;display:block;background:#fff}.web-empty{width:100%;height:100%;display:flex;align-items:center;justify-content:center;color:var(--text);opacity:.4;font-size:.9em;background:#1d1d23}:root{--bg: #1a1a1f;--bg-grid: #25252c;--card-bg: #2a2a32;--card-border: #3a3a45;--text: #e8e8ec;--accent: #6a8cff;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,sans-serif;color-scheme:dark}*{box-sizing:border-box;margin:0;padding:0}html,body,#root{width:100%;height:100%;overflow:hidden;background:var(--bg);color:var(--text);-webkit-user-select:none;user-select:none}