Initial nyx project — fork of hermes-frontend

Forked from hermes-frontend, stripped openclaw/bun specifics:
- Auth tokens: openclaw_session -> nyx_session
- Vite proxy: localhost:3003 -> localhost:8000 (assay)
- Prod WS: wss://assay.loop42.de/ws
- Workspace paths: removed openclaw-specific paths
- Added missing deps: @heroicons/vue, overlayscrollbars-vue
- Branding: title -> nyx

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Nico 2026-03-31 20:23:27 +02:00
commit e2667f8e12
7715 changed files with 1290632 additions and 0 deletions

1
.env.production Normal file
View File

@ -0,0 +1 @@
VITE_WS_URL=wss://assay.loop42.de/ws

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
node_modules\ndist\n.env.local

147
README.md Normal file
View File

@ -0,0 +1,147 @@
# Hermes Frontend
**Status:** Active development | **Version:** 0.6.42
**Production:** `https://jqxp.org` (Cloudflare static)
---
## What Is This
Vue 3 + TypeScript + Vite chat UI for OpenClaw agents.
Part of the **Hermes project** — the plugin-based successor to the original webchat.
Connects to `hermes/backend` (Bun) via WebSocket. Supports streaming, markdown rendering,
session history, handover, token cost tracking, file tree view, multi-modal input (images, PDFs, audio),
TTS playback, and real-time MCP-driven UI (counter, action picker, confetti).
---
## Stack
- Vue 3, TypeScript, Vite, Pinia, Vue Router
- marked (markdown rendering)
- WebSocket composable (`composables/ws.ts`)
- Session history from JSONL via backend (`composables/sessionHistory.ts`)
- Agent socket protocol (`composables/useAgentSocket.ts`)
---
## Key Files
```
src/
views/
AgentsView.vue main chat view
DevView.vue dev tools, counter game, action picker
ViewerView.vue file browser
HomeView.vue landing page
store/chat.ts Pinia store — sm state, messages, queue
composables/
ws.ts WS connect/reconnect/send
useAgentSocket.ts maps WS events → store actions
sessionHistory.ts history load + prev session fetch
useMessages.ts message rendering (markdown, ANSI, code)
useAttachments.ts file/image/audio/PDF attach + upload
useAudioRecorder.ts mic recording with level visualization
useTtsPlayer.ts ElevenLabs TTS playback
useTheme.ts theme switching (titan/eras/loop42)
agents.ts agent list, selection, display names
auth.ts login / token handling
components/
AppSidebar.vue permanent rail sidebar, responsive
TtsPlayerBar.vue fixed TTS player bar
AssistantMessage.vue assistant bubble + speak button
UserMessage.vue user bubble + audio/image/PDF display
HudControls.vue NEW / HANDOVER / STOP buttons
WebGLBackground.vue particle background (theme-aware)
utils/apiBase.ts API base URL (dev proxy / prod absolute)
```
---
## Current Port Situation (2026-03-13)
```
Port What Status
───────────────────────────────────────────────────────
8443 webchat/frontend Vite RUNNING (tmux webchat-vite) — wrong FE for hermes-dev
8444 hermes/frontend Vite RUNNING (separate tmux) — correct FE for hermes-dev
3001 webchat/backend PROD (systemd)
3002 webchat/backend dev RUNNING (tmux webchat-be)
3003 hermes/backend dev NOT RUNNING
```
⚠️ hermes/fe currently serves on :8444. `dev.jqxp.org` nginx points to :8443 (wrong).
To use hermes-dev properly: reach it via `hermes.dev.jqxp.org` (→ :8444) until ports are aligned.
## Dev Setup
```bash
# Terminal 1 — Frontend (hermes/fe)
cd projects/hermes/frontend
npm run dev # Vite on :8444 (configured in vite.config.ts)
# Terminal 2 — Backend (hermes/be)
cd projects/hermes/backend
PORT=3003 node --watch server.ts
```
Vite proxies `/ws``ws://localhost:3003`.
RouterVM: `hermes.dev.jqxp.org` → :8444 (FE only, BE not exposed externally yet).
---
## Deploy to Production
Build here, rsync to webspace:
```bash
cd projects/hermes/frontend
npm run build
sshpass -p "$JQXP_SFTP_PASS" rsync -avz --delete \
-e "ssh -o StrictHostKeyChecking=no -p 22" \
dist/ $JQXP_SFTP_USER@$JQXP_SFTP_HOST:$JQXP_REMOTE_PATH
# source D:/ClaudeCode/Titan/.secrets/jqxp-webspace.env first
```
---
## Hermes vs Webchat (Legacy)
| Feature | webchat/frontend (legacy) | hermes/frontend (this) |
|---|---|---|
| Source of truth | ❌ archived | ✅ yes |
| Backend | Node.js server.js | Bun index.ts |
| Plugin channel | ❌ | ✅ openclaw hermes channel |
| File tree / workspace | ❌ | ✅ via Hermes backend APIs |
| Room mode (multi-user) | ❌ planned | 🔜 next milestone |
---
## Planned: Room Mode
```
DIRECT MODE (current) ROOM MODE (next)
────────────────────────────── ──────────────────────────────────
[Titan ▼] [New] [Handover] [🏠 support-123] Titan
[● nico] [● tina] participant bar
messages: no sender label messages: sender label per bubble
agent dropdown: visible agent dropdown: hidden (room-scoped)
```
---
## Session Key Pattern
```
CURRENT: agent:{agent}:web:{user} e.g. agent:titan:web:nico
TARGET: agent:{agent}:web:direct:{user} private
agent:{agent}:web:room:{roomId} shared room (with Hermes plugin)
```
---
## Version
Defined in `package.json` → displayed in nav bar via `composables/ui.ts`.
Current: **0.3.19**

232
css/base.css Normal file
View File

@ -0,0 +1,232 @@
@import url('https://fonts.googleapis.com/css2?family=Raleway:wght@400;500;600;700&display=swap');
@font-face {
font-family: 'Ubuntu Sans';
src: url('/fonts/ubuntu-sans/UbuntuSans[wght].woff2') format('woff2');
font-weight: 100 900;
font-style: normal;
font-display: swap;
}
@font-face {
font-family: 'Ubuntu Sans';
src: url('/fonts/ubuntu-sans/UbuntuSans-Italic[wght].woff2') format('woff2');
font-weight: 100 900;
font-style: italic;
font-display: swap;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
[v-cloak] { display: none; }
html, body { background: transparent; }
:root {
/* ── Typography ── */
--font-sans: 'Ubuntu Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
--font-mono: 'Ubuntu Sans Mono', 'Consolas', 'Monaco', monospace;
--text-base: 0.875rem; /* 14px — single base size for all UI text */
/* Surface colors - slate blue */
--bg: #0f172a;
--surface: #1e293b;
--border: #334155;
--chat-bg: #0f172a;
--agent: #1e293b;
--agent-border:#475569;
--muted: #334155;
--muted-text: #94a3b8;
/* Text */
--text: #eee;
--text-dim: #888;
/* Semantic colors */
--accent: #818cf8; /* indigo — primary action / UI chrome */
--user-bubble: #2d5a3d; /* muted green — user messages */
--primary: #3b82f6; /* blue — info, links */
--secondary: #6366f1; /* indigo — secondary badges */
--success: #22c55e; /* green — yes, wrap up, positive */
--success-dim: #4ade80; /* light green — connected lamp */
--warn: #fbbf24; /* yellow — connecting, caution */
--error: #f87171; /* red-light — errors, destructive */
--focus: #4ade80; /* green — input focus rings */
/* Dim surface — used by system groups, subtle containers */
--bg-dim: #1a2133;
/* Disabled */
--disabled-opacity: 0.4;
/* Layout tokens */
--space-page: 32px; /* horizontal page gutter */
--space-gap: 8px; /* gap between stacked sections */
--space-inset: 12px; /* padding inside components */
--radius: 8px; /* cards, inputs, large buttons */
--radius-sm: 6px; /* toolbar buttons, badges */
--radius-panel: 12px; /* floating panels (sidebar, toolbar groups) */
--height-nav: 40px; /* top nav bar */
--height-btn: 32px; /* toolbar buttons */
--text-sm: var(--text-base); /* legacy alias — same as base now */
--text-xs: var(--text-base); /* legacy alias — same as base now */
/* Panel system — elevated floating containers */
--panel-bg: #1a2540;
--panel-shadow: 0 2px 12px rgba(0,0,0,0.3), 0 0 1px rgba(255,255,255,0.05);
--panel-gap: 6px; /* gap between panels and edges */
}
/* Mobile overrides: applied per-element in view CSS files, not via global var changes.
CSS vars stay constant across all breakpoints to prevent resize flicker. */
/* ── ERAS theme (bright) ────────────────────────────────────── */
[data-theme="eras"] {
--bg: #ffffff;
--surface: #f5f5f5;
--border: #e2e2e2;
--chat-bg: #fafafa;
--agent: #f0f0f0;
--agent-border:#d0d0d0;
--muted: #e8e8e8;
--muted-text: #8f8f8f;
--text: #212121;
--text-dim: #646464;
--accent: #005e83; /* eras teal-blue — nav, active, UI chrome */
--user-bubble: #fef3e5; /* warm orange tint for user messages */
--primary: #e25303; /* eras orange — links, actions */
--secondary: #3567fd;
--success: #009490; /* eras teal */
--success-dim: #00b8b3;
--warn: #ff8044;
--error: #df3131;
--focus: #e25303;
--bg-dim: #f0ece8;
--disabled-opacity: 0.4;
/* Markdown code blocks */
--code-bg: #f0f0f0;
--text-bright: #212121;
/* Nav links */
--nav-link: #005e83;
--nav-link-active: #005e83;
/* Send button */
--send-btn-bg: #e25303;
--send-btn-color: #ffffff;
/* Panel system */
--panel-bg: #ffffff;
--panel-shadow: 0 2px 12px rgba(0,0,0,0.08), 0 0 1px rgba(0,0,0,0.12);
}
html, body {
height: 100%;
margin: 0;
overflow: hidden;
/* iOS safe areas (notch, home indicator) */
padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}
/* Prevent iOS auto-zoom on input focus set base to 16px globally
(iOS zooms when font-size < 16px). No breakpoint needed. */
input, select, textarea { font-size: 1rem; }
body {
font-family: var(--font-sans);
font-size: var(--text-base);
background: var(--bg);
color: var(--text);
display: flex;
flex-direction: column;
}
[data-theme="eras"] {
--font-sans: 'Raleway', 'Segoe UI', sans-serif;
}
/* ── Workhorse theme (neutral dark + 6 happy kids colors) ─── */
/* Palette: #73B96E #46915C #F25E44 #489FB2 #FFD96C #C895C0 */
/* Backgrounds: neutral grays, not from palette */
[data-theme="loop42"] {
--bg: #1A212C;
--surface: #222a36;
--border: #1D7872;
--chat-bg: #1e2630;
--agent: #222a36;
--agent-border:#1D7872;
--muted: #2a3340;
--muted-text: #71B095;
--text: #e8e6e0;
--text-dim: #71B095;
--accent: #1D7872; /* deep teal — grounded */
--user-bubble: #2a3340;
--primary: #71B095; /* sage green — links */
--btn-bg: #1D7872;
--btn-text: #e8e6e0;
--btn-hover: #71B095;
--input-bg: #222a36;
--input-border:#1D7872;
--input-text: #e8e6e0;
/* Panel system */
--panel-bg: #1e2630;
--panel-shadow: 0 2px 12px rgba(0,0,0,0.35), 0 0 1px rgba(29,120,114,0.15);
}
/* Scrollbars OverlayScrollbars handles main containers.
Fallback for any native scrollbar we missed. */
* {
scrollbar-width: thin;
scrollbar-color: var(--border) transparent;
}
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }
/* Hide native scrollbar inside OverlayScrollbars viewports */
[data-overlayscrollbars-viewport] { scrollbar-width: none; }
[data-overlayscrollbars-viewport]::-webkit-scrollbar { display: none; }
/* Animations */
@keyframes pulse {
0%, 100% { opacity: 1; }
50% { opacity: var(--disabled-opacity); }
}
@keyframes blink {
0%, 100% { opacity: 1; }
50% { opacity: 0; }
}
/* Emoji: use system font so sizing is consistent across platforms */
.emoji, [role="img"] {
font-family: 'Apple Color Emoji', 'Segoe UI Emoji', 'Noto Color Emoji', sans-serif;
font-style: normal;
}
/* Touch: prevent tap highlight on mobile */
* { -webkit-tap-highlight-color: transparent; }
/* Links */
a {
color: var(--primary);
text-decoration: none;
}
a:hover {
text-decoration: underline;
}
/* ── Mobile: tighter spacing ── */
@media (max-width: 480px) {
:root {
--space-page: 12px;
--space-inset: 8px;
}
}

327
css/components.css Normal file
View File

@ -0,0 +1,327 @@
/* Select */
select {
background: var(--bg);
color: var(--text);
border: 1px solid var(--border);
padding: 8px 12px;
border-radius: var(--radius-sm);
font-size: inherit;
cursor: pointer;
}
/* Status lamp */
.status-lamp {
width: 10px;
height: 10px;
border-radius: 50%;
background: #666;
transition: background 0.3s;
}
.status-lamp.connected { background: var(--success-dim); box-shadow: 0 0 8px var(--success-dim); }
.status-lamp.connecting { background: var(--warn); animation: pulse 1s infinite; }
.status-lamp.error { background: var(--error); box-shadow: 0 0 8px var(--error); }
/* Nav controls */
.nav-status {
display: flex;
align-items: center;
gap: 6px;
margin-right: 12px;
}
.nav-status-text { color: var(--text-dim); }
.nav-user {
color: var(--text-dim);
background: var(--surface);
border: 1px solid var(--border);
border-radius: 12px;
padding: 2px 10px;
margin-right: 6px;
}
.nav-logout-btn {
background: none;
border: none;
color: var(--text-dim);
padding: 3px 10px;
border-radius: 4px;
cursor: pointer;
margin-right: 0;
padding-right: 0;
transition: color 0.15s;
text-decoration: underline;
text-underline-offset: 2px;
text-decoration-color: transparent;
}
.nav-logout-btn:hover { color: var(--error); text-decoration-color: var(--error); }
.nav-login-btn {
color: white !important;
text-decoration: none !important;
padding: 3px 12px !important;
border: none !important;
background: var(--secondary);
border-radius: 12px;
margin-right: 12px;
transition: opacity 0.15s;
line-height: 1;
display: inline-flex;
align-items: center;
}
.nav-login-btn:hover { opacity: 0.85; }
.nav-login-btn.active, .nav-login-btn.router-link-active {
position: relative;
}
.nav-login-btn.active::after, .nav-login-btn.router-link-active::after {
content: '';
position: absolute;
bottom: -8px;
left: 50%;
transform: translateX(-50%);
width: 4px;
height: 4px;
border-radius: 50%;
background: var(--accent);
}
/* Badges */
.usage-badge {
color: var(--text-dim);
opacity: 0.7;
white-space: nowrap;
}
.user-badge {
padding: 4px 8px;
background: var(--primary);
border-radius: var(--radius-sm);
color: white;
font-weight: 500;
}
.session-badge {
padding: 4px 8px;
background: var(--secondary);
border-radius: var(--radius-sm);
color: white;
font-weight: 500;
}
/* Nav SM state pill */
.nav-sm-state {
position: absolute;
left: 50%;
transform: translateX(-50%);
padding: 3px 10px;
border-radius: 99px;
background: var(--muted);
color: var(--muted-text);
white-space: nowrap;
font-weight: 500;
transition: background 0.3s, color 0.3s;
pointer-events: none;
}
.nav-sm-state.IDLE { background: var(--muted); color: var(--muted-text); }
.nav-sm-state.AGENT_RUNNING { background: #1a3a5c; color: var(--warn); animation: pulse 1.5s infinite; }
.nav-sm-state.HANDOVER_PENDING { background: #2a2a1a; color: var(--warn); }
.nav-sm-state.HANDOVER_DONE { background: #1a3a1a; color: var(--success); }
.nav-sm-state.SWITCHING { background: #1e3a5f; color: #60a5fa; }
.nav-sm-state.CONNECTING { background: var(--muted); color: var(--warn); animation: pulse 1.5s infinite; }
.toolbar-sm-state {
padding: 2px 8px;
border-radius: 99px;
background: var(--muted);
color: var(--muted-text);
white-space: nowrap;
font-weight: 500;
transition: background 0.3s, color 0.3s;
pointer-events: none;
}
.toolbar-sm-state.IDLE { background: var(--muted); color: var(--muted-text); }
.toolbar-sm-state.AGENT_RUNNING { background: #1a3a5c; color: var(--warn); animation: pulse 1.5s infinite; }
.toolbar-sm-state.HANDOVER_PENDING { background: #2a2a1a; color: var(--warn); }
.toolbar-sm-state.HANDOVER_DONE { background: #1a3a1a; color: var(--success); }
.toolbar-sm-state.SWITCHING { background: #1e3a5f; color: #60a5fa; }
.toolbar-sm-state.CONNECTING { background: var(--muted); color: var(--warn); animation: pulse 1.5s infinite; }
.toolbar-sm-state.STOP_PENDING { background: #3a1a1a; color: var(--error); }
.version-badge {
cursor: pointer;
user-select: none;
padding: 4px 8px;
background: var(--muted);
border-radius: var(--radius-sm);
color: var(--muted-text);
font-weight: 500;
white-space: nowrap;
display: inline-flex;
align-items: center;
gap: 5px;
transition: color 0.15s;
}
.version-badge:hover { color: var(--text); }
.version-copy-icon { opacity: 0.6; }
.version-badge:hover .version-copy-icon { opacity: 1; }
.ws-status {
color: var(--text-dim);
padding: 4px 8px;
border-radius: var(--radius-sm);
background: var(--bg);
min-width: 0;
text-align: center;
}
/* Agent selector */
.agents-header {
display: flex;
align-items: center;
gap: var(--space-gap);
padding: 0;
flex-shrink: 0;
}
.agent-selection-group {
display: flex;
align-items: center;
gap: var(--space-gap);
}
.or-separator { color: var(--text-dim); }
.default-agent-btn {
background: var(--surface);
border: 1px solid var(--border);
color: var(--text);
padding: 6px 12px;
border-radius: var(--radius-sm);
cursor: pointer;
transition: background 0.2s, border-color 0.2s;
white-space: nowrap;
}
.default-agent-btn:hover { background: var(--accent); border-color: var(--accent); }
.default-agent-btn:disabled {
opacity: var(--disabled-opacity);
cursor: default;
background: var(--surface);
border-color: var(--border);
color: var(--text-dim);
}
.footer-buttons {
display: flex;
justify-content: center;
gap: 8px;
margin-top: 8px;
}
.handover-btn {
background: var(--user-bubble);
color: #a8d5b5;
border: none;
padding: 7px 16px;
border-radius: var(--radius-sm);
font-weight: 500;
cursor: pointer;
transition: opacity 0.15s;
}
.handover-btn:hover { opacity: 0.85; }
.handover-btn:disabled { opacity: var(--disabled-opacity); cursor: default; }
/* HUD confirm buttons — enabled only when handover is pending */
.confirm-new-btn {
background: var(--accent);
color: #fff;
border: none;
padding: 7px 16px;
border-radius: var(--radius-sm);
font-weight: 500;
cursor: pointer;
transition: opacity 0.15s;
}
.confirm-new-btn:hover:not(:disabled) { opacity: 0.85; }
.confirm-new-btn:disabled { opacity: var(--disabled-opacity); cursor: default; }
.stay-btn {
background: var(--bg-dim);
color: var(--text-dim);
border: 1px solid var(--border);
padding: 7px 16px;
border-radius: var(--radius-sm);
font-weight: 500;
cursor: pointer;
transition: opacity 0.15s;
}
.stay-btn:hover:not(:disabled) { opacity: 0.85; }
.stay-btn:disabled { opacity: var(--disabled-opacity); cursor: default; }
.handover-preview {
margin: 8px 0;
padding: 10px 12px;
background: var(--bg);
border-radius: var(--radius-sm);
color: var(--text);
white-space: pre-wrap;
max-height: 320px;
overflow-y: auto;
text-align: left;
}
.handover-context-header {
cursor: pointer;
user-select: none;
display: flex;
align-items: center;
gap: 6px;
}
.handover-context-header:hover { opacity: 0.8; }
.handover-toggle {
opacity: 0.6;
font-weight: normal;
}
.confirm-new-btn {
display: inline-block;
margin-top: 6px;
background: var(--user-bubble);
color: #a8d5b5;
border: none;
padding: 4px 12px;
border-radius: var(--radius-sm);
cursor: pointer;
transition: opacity 0.15s;
}
.confirm-new-btn:hover { opacity: 0.85; }
/* Logout / misc */
.logout-btn {
padding: 4px 10px;
background: transparent;
border: 1px solid var(--border);
color: var(--text-dim);
border-radius: 4px;
cursor: pointer;
}
.logout-btn:hover { border-color: var(--accent); color: var(--accent); }
/* Not logged in */
.not-logged-in {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
min-height: 100%;
gap: var(--space-page);
color: var(--text-dim);
}
.not-logged-in a { color: var(--accent); text-decoration: none; font-weight: 600; }
.not-logged-in a:hover { text-decoration: underline; }
/* ── Mobile — visibility + touch targets only, no spacing changes ── */
@media (max-width: 639px) {
.nav-user { display: none; }
}

184
css/layout.css Normal file
View File

@ -0,0 +1,184 @@
.app-container {
display: flex;
flex-direction: column;
height: 100vh;
}
/* legacy alias kept for any views that still reference it */
.page {
padding-left: var(--space-page);
padding-right: var(--space-page);
}
.content {
padding-left: var(--space-inset);
padding-right: var(--space-inset);
}
/* Agents: scroll container extends to viewport edge for scrollbar alignment */
.agents-view .content {
padding-right: 0;
margin-right: calc(-1 * var(--space-page));
}
.view-header {
display: flex;
align-items: center;
gap: var(--space-gap);
padding-top: var(--space-gap);
padding-bottom: var(--space-gap);
flex-shrink: 0;
}
.content-area {
position: relative;
flex: 1;
min-height: 0;
overflow: hidden;
display: flex;
flex-direction: column;
position: relative;
}
.main-footer {
display: flex;
align-items: center;
justify-content: center;
gap: 0.5rem;
position: relative;
height: 44px;
background: transparent;
border-top: none;
color: var(--text-dim);
flex-shrink: 0;
}
.main-footer .version-label {
color: var(--text-dim);
font-family: var(--font-mono);
cursor: default;
opacity: 0.4;
}
.main-nav {
display: flex;
align-items: center;
gap: 0;
padding: 0 var(--space-page);
background: var(--panel-bg);
border-radius: var(--radius-panel);
box-shadow: var(--panel-shadow);
height: var(--height-nav);
position: relative;
margin: var(--panel-gap);
}
.main-nav a {
color: var(--nav-link, var(--text-dim));
padding: 8px var(--space-page);
text-decoration: none;
position: relative;
transition: color 0.15s;
}
.main-nav a:first-of-type {
padding-left: 0;
}
.main-nav a.active {
color: var(--nav-link-active, var(--text));
}
.main-nav a::after { display: none; }
/* Sliding dot — single element on the nav itself */
.main-nav {
--dot-left: 50%;
}
.main-nav::after {
content: '';
position: absolute;
bottom: 0;
left: var(--dot-left);
width: 4px;
height: 4px;
border-radius: 50%;
background: var(--accent);
transition: left 0.25s cubic-bezier(0.4, 0, 0.2, 1);
pointer-events: none;
}
.main-nav a:hover:not(.active) { color: var(--nav-link-active, var(--text)); }
.main-nav .spacer { margin-left: auto; }
.nav-home-logo {
display: flex;
align-items: center;
justify-content: center;
padding: 8px 12px 8px 0 !important;
}
.nav-theme-icon {
width: 22px;
height: 22px;
stroke-width: 1.5;
}
.nav-home-logo .nav-agent-logo {
width: 28px;
height: 22px;
object-fit: contain;
}
.app-layout {
flex: 1;
min-height: 0;
overflow-y: auto;
display: flex;
}
/* Agents view — full-height flex column */
.agents-view {
flex: 1;
align-self: stretch;
display: flex;
flex-direction: column;
overflow: hidden;
background: transparent;
}
.agent-column {
width: auto;
background: var(--panel-bg);
border-radius: var(--radius-panel);
box-shadow: var(--panel-shadow);
padding: var(--space-page);
flex-shrink: 0;
overflow-y: auto;
min-height: 0;
}
.chat-column {
flex-grow: 1;
position: relative;
overflow: hidden;
}
.chat-frame {
flex: 1 1 auto;
min-height: 0;
display: flex;
flex-direction: column;
gap: var(--space-gap);
margin: 0;
}
/* ── Mobile — visibility only, no spacing changes ── */
@media (max-width: 639px) {
.nav-agent-logo {
width: 22px;
margin-right: 2px;
}
}

53
css/markdown.css Normal file
View File

@ -0,0 +1,53 @@
/* Markdown body global (not scoped) because v-html bypasses scoped styles.
box-shadow trick: never serialized into clipboard HTML, so dark code blocks
render correctly in the viewer but paste clean into Google Docs / Word. */
.md-body {
color: var(--text);
font-family: var(--font-sans);
line-height: 1.7;
max-width: 100%;
width: 100%;
overflow-wrap: break-word;
word-break: break-word;
}
.md-body p, .md-body li, .md-body td, .md-body th { color: inherit; }
.md-body h1, .md-body h2, .md-body h3, .md-body h4 {
color: var(--text-bright, #fff);
margin: 1.4em 0 0.4em;
font-weight: 600;
}
.md-body h1 { font-size: 1.4em; border-bottom: 1px solid var(--border); padding-bottom: 4px; }
.md-body h2 { font-size: 1.15em; }
.md-body h3 { font-size: 1em; }
.md-body p { margin: 0.5em 0; }
.md-body a { color: var(--accent); }
.md-body code {
background: transparent;
box-shadow: inset 0 0 0 999px var(--code-bg, #1e2227);
padding: 1px 5px;
border-radius: 3px;
font-family: var(--font-mono);
}
.md-body pre {
background: transparent;
box-shadow: inset 0 0 0 999px var(--code-bg, #1e2227);
padding: 12px 16px;
border-radius: 6px;
overflow-x: auto;
max-width: 100%;
margin: 0.8em 0;
}
.md-body pre code { background: none; padding: 0; }
.md-body blockquote {
border-left: 3px solid var(--accent);
margin: 0.5em 0;
padding: 2px 12px;
color: var(--text-dim);
}
.md-body ul, .md-body ol { padding-left: 1.5em; margin: 0.4em 0; }
.md-body li { margin: 0.2em 0; }
.md-body table { border-collapse: collapse; width: 100%; margin: 0.8em 0; display: block; overflow-x: auto; }
.md-body th, .md-body td { border: 1px solid var(--border); padding: 4px 10px; }
.md-body th { background: var(--code-bg, #1e2227); color: var(--text-bright, #fff); }
.md-body hr { border: none; border-top: 1px solid var(--border); margin: 1.2em 0; }

29
css/scrollbar.css Normal file
View File

@ -0,0 +1,29 @@
/* OverlayScrollbars — 3 states: not visible, visible (dim), visible+hovered (bright) */
.os-scrollbar .os-scrollbar-track {
background: transparent;
}
.os-scrollbar .os-scrollbar-handle {
background: var(--text-muted, rgba(255, 255, 255, 0.15));
border-radius: 3px;
opacity: 0.4;
transition: opacity 0.2s, background 0.2s;
}
/* Hover anywhere inside the scrollable host → brighter */
[data-overlayscrollbars-initialize]:hover .os-scrollbar-handle {
opacity: 0.7;
background: var(--text-dim);
}
/* Hover directly on scrollbar → full brightness */
.os-scrollbar:hover .os-scrollbar-handle {
opacity: 1;
background: var(--text-dim);
}
/* Actively dragging the handle */
.os-scrollbar .os-scrollbar-handle.active,
.os-scrollbar .os-scrollbar-handle:active {
opacity: 1;
background: var(--text);
}

785
css/sidebar.css Normal file
View File

@ -0,0 +1,785 @@
/* ── Sidebar layout ───────────────────────────────────────────── */
:root {
--sidebar-width: 240px;
--sidebar-collapsed-width: 48px;
--sidebar-header-height: 40px; /* aligns with content-top in views */
}
/* ── App body: sidebar + content column ── */
.app-body {
flex: 1;
min-height: 0;
display: flex;
flex-direction: row;
overflow: hidden;
}
.main-column {
flex: 1;
min-width: 0;
display: flex;
flex-direction: column;
overflow: hidden;
}
/* ── Sidebar ── */
.app-sidebar {
position: fixed;
top: var(--panel-gap);
left: var(--panel-gap);
height: calc(100% - var(--panel-gap) * 2);
width: var(--sidebar-width);
flex-shrink: 0;
display: flex;
flex-direction: column;
background: var(--panel-bg);
border-radius: var(--radius-panel);
box-shadow: var(--panel-shadow);
padding: 0 6px;
transition: width 0.2s cubic-bezier(0.4, 0, 0.2, 1);
overflow: visible;
z-index: 100;
}
/* Fade text/indicators on expand/collapse */
.sidebar-logo-label,
.sidebar-room-name,
.sidebar-segment-label,
.sidebar-channel-indicators,
.sidebar-room-mode-btn,
.sidebar-chevron-btn,
.sidebar-capture-btn,
.sidebar-link span,
.sidebar-user-name {
opacity: 1;
transition: opacity 0.15s ease 0.1s; /* 0.1s delay so width expands first */
}
.app-sidebar.is-collapsed .sidebar-logo-label,
.app-sidebar.is-collapsed .sidebar-room-name,
.app-sidebar.is-collapsed .sidebar-segment-label,
.app-sidebar.is-collapsed .sidebar-channel-indicators,
.app-sidebar.is-collapsed .sidebar-room-mode-btn,
.app-sidebar.is-collapsed .sidebar-chevron-btn,
.app-sidebar.is-collapsed .sidebar-capture-btn,
.app-sidebar.is-collapsed .sidebar-link span,
.app-sidebar.is-collapsed .sidebar-user-name {
opacity: 0;
transition: opacity 0.05s ease; /* fade out fast */
pointer-events: none;
position: relative;
z-index: 20;
}
.app-sidebar.is-collapsed {
width: var(--sidebar-collapsed-width);
}
/* When expanded: enable click target */
.app-sidebar:not(.is-collapsed) .sidebar-close-target {
pointer-events: auto;
}
/* Legacy gradient shadow — replaced by panel box-shadow */
.sidebar-shadow {
display: none;
}
/* Invisible click target to close sidebar — behind sidebar content */
.sidebar-close-target {
position: fixed;
inset: 0;
z-index: -1;
opacity: 0;
pointer-events: none;
}
/* ── Sidebar header (logo + collapse) ── */
.sidebar-header {
height: var(--sidebar-header-height);
display: flex;
align-items: center;
flex-shrink: 0;
gap: 0;
}
.sidebar-header { overflow: hidden; }
.app-sidebar.is-collapsed .sidebar-header { cursor: pointer; }
/* Brand: logo + name centered (flex:1 fills remaining space) */
.sidebar-brand {
flex: 1;
display: flex;
align-items: center;
justify-content: center;
gap: 6px;
height: 100%;
color: var(--text);
text-decoration: none;
cursor: pointer;
transition: opacity 0.15s;
overflow: hidden;
white-space: nowrap;
/* Offset for chevron width so brand is visually centered in sidebar */
padding-right: var(--sidebar-collapsed-width);
}
.sidebar-brand:hover { opacity: 0.8; text-decoration: none; }
/* Chevron rotation animation */
.sidebar-chevron-anim {
transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}
.sidebar-brand-logo,
.sidebar-brand-icon {
width: 18px;
height: 18px;
flex-shrink: 0;
}
.sidebar-brand-name {
font-weight: 600;
font-size: var(--text-base);
color: var(--text);
white-space: nowrap;
}
/* Toggle button: right side when expanded, centered when collapsed */
.sidebar-toggle-btn {
width: var(--sidebar-collapsed-width);
height: 100%;
flex-shrink: 0;
display: flex;
align-items: center;
justify-content: center;
background: none;
border: none;
cursor: pointer;
color: var(--text-dim);
transition: color 0.15s, background 0.15s;
}
.sidebar-toggle-btn:hover { color: var(--text); background: color-mix(in srgb, var(--accent) 8%, transparent); }
/* Icon slot: fixed 48px centered area — never moves on collapse */
.sidebar-logo-img,
.sidebar-theme-icon {
flex-shrink: 0;
width: var(--sidebar-collapsed-width);
display: flex;
align-items: center;
justify-content: center;
}
.sidebar-logo-img {
height: 18px;
object-fit: contain;
padding: 0 14px;
box-sizing: border-box;
}
.sidebar-theme-icon {
height: 20px;
stroke-width: 1.5;
color: var(--accent);
padding: 0 14px;
box-sizing: border-box;
}
.sidebar-logo-label {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
color: var(--text);
letter-spacing: 0.02em;
}
.sidebar-chevron-icon {
margin-left: auto;
opacity: 0.5;
flex-shrink: 0;
}
.sidebar-chevron-btn {
width: var(--sidebar-collapsed-width);
height: 100%;
display: flex;
align-items: center;
justify-content: center;
flex-shrink: 0;
background: none;
border: none;
cursor: pointer;
color: var(--text-dim);
transition: color 0.15s, background 0.15s;
}
.sidebar-chevron-btn:hover { color: var(--text); background: color-mix(in srgb, var(--accent) 8%, transparent); }
/* ── Rooms (agents) ── */
.sidebar-rooms {
flex: 1 1 0;
min-height: 0;
padding: 4px 0;
display: flex;
flex-direction: column;
gap: 1px;
overflow-x: hidden;
overflow-y: auto;
}
/* Segment label */
.sidebar-segment-label {
padding: 8px 14px 2px;
height: 27px;
flex-shrink: 0;
font-size: var(--text-base);
font-weight: 600;
letter-spacing: 0.08em;
text-transform: capitalize;
color: var(--text-dim);
opacity: 0.5;
user-select: none;
}
/* Agent row: icon slot is always 48px wide, centered */
.sidebar-room {
display: flex;
align-items: center;
gap: 0;
padding: 0 10px 0 0;
height: 30px;
min-height: 30px;
flex-shrink: 0;
color: var(--text-dim);
text-decoration: none;
font-size: var(--text-base);
white-space: nowrap;
overflow: hidden;
transition: background 0.12s, color 0.12s;
border-radius: var(--radius-sm);
cursor: pointer;
}
.sidebar-room:hover { background: color-mix(in srgb, var(--accent) 8%, transparent); color: var(--text); }
.sidebar-room.active { color: var(--text); background: color-mix(in srgb, var(--accent) 12%, transparent); }
/* ── Role dots ── */
.sidebar-room-dot {
width: 8px;
height: 8px;
border-radius: 50%;
flex-shrink: 0;
position: relative;
/* Center dot in 48px icon slot (minus 6px panel padding when expanded) */
margin-left: 14px;
margin-right: 12px;
}
/* owner: solid filled dot */
.dot-owner {
background: var(--accent);
box-shadow: 0 0 0 0px transparent;
}
/* member: outlined ring (dot + same-color ring) */
.dot-member {
background: transparent;
box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 60%, transparent);
}
/* common: small dot + outer ring gap */
.dot-common {
background: #34d399;
box-shadow: 0 0 0 2px color-mix(in srgb, #34d399 40%, transparent);
}
/* guest: dashed ring (simulate with border) */
.dot-guest {
background: transparent;
box-shadow: 0 0 0 2px color-mix(in srgb, var(--text-dim) 40%, transparent);
}
/* utility: dim solid */
.dot-utility {
background: color-mix(in srgb, var(--text-dim) 35%, transparent);
}
.sidebar-room-placeholder { pointer-events: none; opacity: 0; }
.sidebar-room-name {
overflow: hidden;
text-overflow: ellipsis;
}
.sidebar-room-mode-btn {
margin-left: auto;
color: var(--text-dim);
opacity: 0.55;
white-space: nowrap;
flex-shrink: 0;
text-decoration: none;
padding: 1px 6px;
border-radius: 4px;
cursor: pointer;
}
.sidebar-room-mode-btn:hover { opacity: 1; color: var(--text); background: color-mix(in srgb, var(--accent) 12%, transparent); }
.sidebar-room-mode-btn.active { opacity: 1; color: var(--accent); }
/* Collapsed: keep segment labels same height for Y alignment, just hide text */
.sidebar-segment-label.is-collapsed {
visibility: hidden;
}
/* ── Spacer ── */
.sidebar-spacer {
flex: 1;
}
/* ── Home section (above agents) ── */
.sidebar-home-section {
}
/* ── Nav links (viewer, dev) ── */
.sidebar-nav-links {
display: flex;
flex-direction: column;
gap: 2px;
padding: 4px 0;
overflow: hidden;
}
/* Shared row style: icon in fixed 48px slot, text after */
.sidebar-link {
display: flex;
align-items: center;
gap: 0;
padding: 0;
height: 32px;
color: var(--text-dim);
text-decoration: none;
font-size: var(--text-base);
white-space: nowrap;
overflow: hidden;
transition: background 0.12s, color 0.12s;
cursor: pointer;
background: none;
border: none;
width: 100%;
text-align: left;
}
.sidebar-link:hover { background: color-mix(in srgb, var(--accent) 8%, transparent); color: var(--text); }
.sidebar-link.active { color: var(--accent); }
.sidebar-link svg {
flex-shrink: 0;
/* Center 16px icon in 48px slot (minus 6px panel padding) */
width: 16px;
height: 16px;
margin-left: 10px;
margin-right: 10px;
}
/* ── Channel state indicators (dual: private + public) ── */
.sidebar-room { position: relative; }
.sidebar-channel-indicators {
position: absolute;
right: 44px;
top: 0;
display: flex;
gap: 3px;
align-items: center;
height: 30px;
pointer-events: none;
font-size: var(--text-base);
}
.sidebar-ch-dot { opacity: 0.7; }
.sidebar-ch-dot.ch-running { animation: pulse 2s infinite; }
.sidebar-ch-dot.ch-ready { opacity: 0.3; }
.sidebar-ch-dot.ch-fresh { opacity: 0.6; }
.sidebar-ch-dot.ch-nosession { opacity: 0.15; }
.sidebar-ch-dot.ch-none { opacity: 0.15; }
/* ── Connection status ── */
.sidebar-connection {
padding: 0;
}
.sidebar-connection .sidebar-link { color: var(--text-dim); opacity: 0.4; }
.sidebar-connection.active .sidebar-link { color: var(--success, #22c55e); opacity: 0.7; }
/* ── Connection status panel ── */
.sidebar-conn-wrap {
position: relative;
}
/* ── Takeover status ── */
.sidebar-takeover-wrap {
padding: 0;
position: relative;
}
.sidebar-takeover-row {
display: flex;
align-items: center;
}
.sidebar-takeover-row .sidebar-link { flex: 1; }
.sidebar-takeover-wrap .sidebar-link { color: var(--text-dim); opacity: 0.4; }
.sidebar-takeover-wrap.active .sidebar-link { color: var(--success, #22c55e); opacity: 0.7; }
.sidebar-takeover-wrap.active .sidebar-link svg { animation: pulse 2s infinite; }
.sidebar-capture-btn {
width: 28px;
height: 28px;
display: flex;
align-items: center;
justify-content: center;
margin-right: 10px;
border-radius: var(--radius-sm);
background: none;
border: none;
cursor: pointer;
color: var(--text-dim);
opacity: 0.5;
transition: opacity 0.15s, color 0.15s, background 0.15s;
}
.sidebar-capture-btn:hover { opacity: 1; background: color-mix(in srgb, var(--accent) 8%, transparent); }
.sidebar-capture-btn.active { color: var(--success, #22c55e); opacity: 1; }
.sidebar-capture-btn.active svg { animation: pulse 2s infinite; }
/* ── Bottom (user) ── */
.sidebar-bottom {
padding: 4px 0;
position: relative;
}
.sidebar-user-wrap {
position: relative;
}
.sidebar-user-btn {
display: flex;
align-items: center;
gap: 0;
padding: 0;
height: 32px;
width: 100%;
background: none;
border: none;
cursor: pointer;
color: var(--text-dim);
font-size: var(--text-base);
white-space: nowrap;
overflow: hidden;
transition: background 0.12s, color 0.12s;
text-align: left;
}
.sidebar-user-btn:hover { background: color-mix(in srgb, var(--accent) 8%, transparent); color: var(--text); }
.sidebar-user-btn svg {
flex-shrink: 0;
width: 16px;
height: 16px;
margin-left: 10px;
margin-right: 10px;
}
.sidebar-user-name { overflow: hidden; text-overflow: ellipsis; }
/* ── Panel backdrop: closes any open panel on click ── */
.sidebar-panel-backdrop {
position: fixed;
inset: 0;
z-index: 150;
}
/* ── Shared popup panel style ── */
.sidebar-panel,
.sidebar-user-menu {
position: absolute;
bottom: 0;
left: 100%;
margin-left: 4px;
width: 220px;
background: var(--panel-bg);
border-radius: var(--radius-panel);
box-shadow: var(--panel-shadow);
z-index: 200; /* above .sidebar-panel-backdrop (150) */
overflow: hidden;
}
.sidebar-panel-header {
padding: 8px 12px 4px;
font-size: var(--text-base);
font-weight: 600;
letter-spacing: 0.06em;
text-transform: capitalize;
color: var(--text-dim);
}
.sidebar-panel-token {
padding: 8px 12px;
cursor: pointer;
transition: background 0.12s;
position: relative;
}
.sidebar-panel-token:hover { background: color-mix(in srgb, var(--accent) 8%, transparent); }
.sidebar-panel-token code {
font-size: var(--text-base);
color: var(--accent);
word-break: break-all;
}
.sidebar-panel-copied {
position: absolute;
right: 12px;
top: 50%;
transform: translateY(-50%);
font-size: var(--text-base);
color: var(--success, #22c55e);
}
.sidebar-panel-row {
display: flex;
justify-content: space-between;
padding: 6px 12px;
font-size: var(--text-base);
color: var(--text-dim);
}
.sidebar-panel-item {
display: block;
width: 100%;
padding: 7px 12px;
background: none;
border: none;
cursor: pointer;
color: var(--text);
font-size: var(--text-base);
text-align: left;
transition: background 0.12s;
}
.sidebar-panel-item:hover { background: color-mix(in srgb, var(--error) 12%, transparent); color: var(--error); }
.sidebar-user-menu-header {
padding: 8px 12px 4px;
font-size: var(--text-base);
color: var(--text-dim);
}
.sidebar-user-menu-item {
display: block;
width: 100%;
padding: 7px 12px;
background: none;
border: none;
cursor: pointer;
color: var(--text);
font-size: var(--text-base);
text-align: left;
transition: background 0.12s;
}
.sidebar-user-menu-item:hover { background: color-mix(in srgb, var(--error) 12%, transparent); color: var(--error); }
/* Collapsed: smaller menu width */
.app-sidebar.is-collapsed .sidebar-user-menu {
width: 160px;
}
/* ── Sidebar spacer (reserves rail width on all screens) ── */
.sidebar-spacer {
display: block;
width: var(--sidebar-collapsed-width);
min-width: var(--sidebar-collapsed-width);
max-width: var(--sidebar-collapsed-width);
flex: 0 0 var(--sidebar-collapsed-width);
}
/* ── Version ── */
.sidebar-version-wrap {
position: relative;
flex-shrink: 0;
}
.sidebar-version-wrap.is-hidden {
visibility: hidden;
pointer-events: none;
}
.sidebar-version {
display: block;
width: 100%;
padding: 4px 12px;
text-align: left;
font-size: var(--text-base);
color: var(--text-dim);
opacity: 0.4;
cursor: pointer;
user-select: none;
background: none;
border: none;
transition: opacity 0.15s;
}
.sidebar-version:hover { opacity: 0.8; }
.sidebar-version-panel {
bottom: 100%;
margin-bottom: 4px;
}
/* ── Large screens: sidebar in flow, pushes content ── */
@media (min-width: 1024px) {
.app-sidebar {
position: relative;
top: auto;
left: auto;
height: auto;
z-index: auto;
margin: var(--panel-gap);
margin-right: 0;
}
.app-sidebar:not(.is-collapsed) .sidebar-close-target {
pointer-events: none;
}
/* Spacer matches sidebar width (not fixed 48px) */
.sidebar-spacer {
display: none;
}
}
/* ── Mobile tweaks ── */
@media (max-width: 480px) {
/* Panels: constrain to viewport */
.sidebar-panel,
.sidebar-user-menu {
width: min(220px, calc(100vw - var(--sidebar-collapsed-width) - 16px)) !important;
}
/* Hide takeover panel on mobile — use /dev on desktop */
.sidebar-takeover-wrap .sidebar-panel { display: none !important; }
}
/* Top section: default agent + files — shrink-to-fit, shrink when needed */
.sidebar-top-section {
flex-shrink: 0;
display: flex;
flex-direction: column;
min-height: 0;
}
.sidebar-top-section.has-tree {
flex-shrink: 1;
overflow: hidden;
}
.sidebar-top-section .sidebar-home {
flex-shrink: 0;
padding: 4px 0;
}
.sidebar-file-scroll {
min-height: 0;
font-size: var(--text-base);
overflow: hidden;
}
/* File sections: toggle row + collapsible tree */
.sidebar-file-section {
display: flex;
flex-direction: column;
min-height: 0;
flex-shrink: 0;
}
.sidebar-file-section.is-open {
flex-shrink: 1;
min-height: 0;
overflow: hidden;
}
.sidebar-file-toggle {
flex-shrink: 0;
}
.sidebar-file-chev {
margin-left: auto;
color: var(--text-dim);
opacity: 0.3;
flex-shrink: 0;
margin-right: 10px;
}
.sidebar-file-toggle:hover .sidebar-file-chev { opacity: 1; }
/* Agents nav link */
.sidebar-nav-agents {
flex-shrink: 0;
padding: 4px 0;
}
/* File tree in sidebar — inherit sidebar font */
.sidebar-panel-section .file-tree {
font-size: var(--text-base);
font-family: inherit;
}
/* Segment divider inside agents panel */
.sidebar-segment-divider {
font-size: var(--text-base);
text-transform: capitalize;
letter-spacing: 0.05em;
color: var(--text-dim);
opacity: 0.5;
padding: 6px 14px 2px;
}
/* ── Collapsed top ── */
.sidebar-collapsed-top {
display: flex;
flex-direction: column;
gap: 2px;
padding: 4px 0;
}
/* ── Flex spacer (both states) ── */
.sidebar-flex-spacer {
flex: 1;
}
/* ── Unified bottom section ── */
.sidebar-bottom-section {
display: flex;
flex-direction: column;
gap: 2px;
padding: 4px 0;
position: relative;
z-index: 160; /* above backdrop (150) so buttons remain clickable */
}
.sidebar-bottom {
position: relative;
z-index: 160;
}
.sidebar-bottom-section .sidebar-conn-link.active { color: var(--success, #22c55e); }
.sidebar-bottom-section .sidebar-takeover-wrap.active .sidebar-link { color: var(--success, #22c55e); }
.sidebar-bottom-section .sidebar-takeover-wrap.active .sidebar-link svg { animation: pulse 2s infinite; }
.sidebar-version-link {
color: var(--text-dim) !important;
opacity: 0.5;
}
.sidebar-version-link:hover { opacity: 0.8 !important; }
.sidebar-version-text {
font-size: 0.65rem;
white-space: nowrap;
width: var(--sidebar-collapsed-width);
text-align: center;
/* Don't fade on collapse — it's the only content */
opacity: 1 !important;
pointer-events: auto;
}
/* SidebarPanel and system section above backdrop */
.sidebar-panel-section { position: relative; z-index: 160; }
.sidebar-system-section { position: relative; z-index: 160; overflow: visible; }
.sidebar-system-content { overflow: visible; }
.sidebar-system-toggle { opacity: 0.5; }
.sidebar-system-toggle:hover { opacity: 0.8; }
/* Clean up inside SidebarPanel */
.sidebar-panel-section .sidebar-nav-links { padding: 0; }
/* Compact bottom items: same size expanded and collapsed */
.sidebar-bottom-section .sidebar-link,
.sidebar-panel-content .sidebar-conn-link,
.sidebar-panel-content .sidebar-takeover-wrap .sidebar-link,
.sidebar-panel-content .sidebar-version-link {
height: 30px;
}
.sidebar-panel-content .sidebar-conn-link svg,
.sidebar-panel-content .sidebar-takeover-wrap .sidebar-link svg {
width: 14px;
height: 14px;
margin-left: 11px;
margin-right: 10px;
}
.sidebar-bottom-section .sidebar-link svg {
width: 14px;
height: 14px;
margin-left: 11px;
margin-right: 10px;
}

10
css/styles.css Normal file
View File

@ -0,0 +1,10 @@
@import './base.css';
@import './scrollbar.css';
@import './layout.css';
@import './sidebar.css';
@import './components.css';
@import './markdown.css';
@import './views/agents.css';
@import './views/home.css';
@import './views/login.css';
@import './views/dev.css';

92
css/tailwind.css Normal file
View File

@ -0,0 +1,92 @@
@import "tailwindcss";
/* Map existing CSS vars into Tailwind theme
This lets you write bg-surface, text-accent, border-border etc.
Values reference your :root vars, so theme switching (Titan/ERAS) works automatically. */
@theme {
/* Colors — mapped from :root CSS vars */
--color-bg: var(--bg);
--color-bg-dim: var(--bg-dim);
--color-surface: var(--surface);
--color-border: var(--border);
--color-chat-bg: var(--chat-bg);
--color-agent: var(--agent);
--color-agent-border:var(--agent-border);
--color-muted: var(--muted);
--color-muted-text: var(--muted-text);
--color-text: var(--text);
--color-text-dim: var(--text-dim);
--color-accent: var(--accent);
--color-user-bubble: var(--user-bubble);
--color-primary: var(--primary);
--color-secondary: var(--secondary);
--color-success: var(--success);
--color-success-dim: var(--success-dim);
--color-warn: var(--warn);
--color-error: var(--error);
--color-focus: var(--focus);
/* Typography */
--font-sans: var(--font-sans);
--font-mono: var(--font-mono);
/* Spacing tokens */
--spacing-page: var(--space-page);
--spacing-gap: var(--space-gap);
--spacing-inset: var(--space-inset);
/* Border radius */
--radius-lg: var(--radius);
--radius-sm: var(--radius-sm);
}
/* Component classes
Reusable semantic classes built from Tailwind utilities.
Use these in templates for common patterns. */
@utility card {
background-color: var(--surface);
border: 1px solid var(--border);
border-radius: var(--radius);
padding: var(--space-inset);
}
@utility badge {
display: inline-flex;
align-items: center;
padding: 0.125rem 0.5rem;
border-radius: var(--radius-sm);
font-weight: 500;
white-space: nowrap;
}
@utility btn {
display: inline-flex;
align-items: center;
padding: 0.375rem 1rem;
border-radius: var(--radius-sm);
font-weight: 500;
cursor: pointer;
transition: opacity 0.15s, background-color 0.15s, color 0.15s;
}
@utility btn-primary {
background-color: var(--accent);
color: white;
border: none;
}
@utility btn-outline {
background: none;
border: 1px solid var(--border);
color: var(--text-dim);
}
@utility btn-danger {
background: none;
border: 1px solid var(--error);
color: var(--error);
}

433
css/views/agents.css Normal file
View File

@ -0,0 +1,433 @@
/* Messages list — padding from .page wrapper, viewport is flex column */
.messages {
flex: 1 1 auto;
min-height: 0;
background: transparent;
}
.messages [data-overlayscrollbars-viewport] {
display: flex !important;
flex-direction: column;
gap: var(--space-gap);
padding: var(--space-inset) 0;
}
.messages [data-overlayscrollbars-viewport] > * {
margin-right: calc(var(--space-page) + var(--space-inset));
}
/* Load more */
.load-more-btn {
align-self: center;
background: none;
border: 1px solid var(--border);
color: var(--text-dim);
padding: 4px 14px;
border-radius: var(--radius-sm);
cursor: pointer;
margin-bottom: var(--space-gap);
transition: color 0.15s, border-color 0.15s;
}
.load-more-btn:hover { color: var(--text); border-color: var(--text-dim); }
/* Message bubbles */
.message {
max-width: 80%;
padding: 12px 18px;
border-radius: var(--radius);
line-height: 1.5;
white-space: normal;
text-indent: 0;
position: relative;
overflow-wrap: break-word;
word-break: break-word;
min-width: 0;
}
.message.user {
align-self: flex-end;
background: var(--user-bubble);
white-space: pre-wrap;
margin-top: var(--space-page);
}
.message.assistant {
align-self: flex-start;
background: var(--surface);
}
.message.thinking {
align-self: flex-start;
background: rgba(139, 92, 246, 0.08);
border: 1px solid rgba(139, 92, 246, 0.25);
color: #a78bfa;
padding: 6px 12px;
border-radius: var(--radius);
max-width: 80%;
}
.message.thinking summary {
cursor: pointer;
font-style: italic;
opacity: 0.8;
user-select: none;
list-style: none;
}
.message.thinking summary::-webkit-details-marker { display: none; }
.message.thinking .thinking-content {
margin-top: 8px;
white-space: pre-wrap;
word-break: break-word;
font-family: var(--font-mono);
color: #c4b5fd;
opacity: 0.85;
max-height: 300px;
overflow-y: auto;
}
.message.system {
align-self: flex-start;
background: transparent;
border: none;
color: var(--text-dim);
padding: 1px 8px;
margin: -2px 0;
max-width: 100%;
opacity: 0.7;
}
.message .bubble-footer:not(:empty) {
color: var(--text-dim);
margin-top: 6px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
max-width: none;
}
.message hr { border: none; border-top: 1px solid var(--border); margin: 1.2rem 0.5rem; opacity: 0.4; }
.message table { border-collapse: collapse; margin: 6px 0; display: block; overflow-x: auto; }
.message th, .message td { padding: 0 10px; }
.message th { font-weight: 600; }
.message ul, .message ol { padding-left: 20px; margin: 4px 0; white-space: normal; }
.message li { margin: 2px 0; white-space: normal; }
.message li > p { margin: 0; }
.message p { margin: 0 0 6px 0; white-space: normal; }
.message p:last-child { margin-bottom: 0; }
.message pre {
overflow-x: auto;
white-space: pre;
background: var(--bg);
border: 1px solid var(--border);
border-radius: var(--radius-sm);
padding: 10px 12px;
margin: 6px 0;
max-width: 100%;
}
.message code { font-family: var(--font-mono); }
.message pre code { background: none; padding: 0; border: none; }
/* Copy button on messages */
.copy-btn {
position: absolute;
top: 6px;
right: 8px;
background: none;
border: none;
color: #fff;
cursor: pointer;
padding: 0;
line-height: 1;
opacity: 0;
transition: opacity 0.15s;
}
.message:hover .copy-btn { opacity: 0.6; }
.copy-btn:hover { opacity: 1 !important; }
/* Copy button on code blocks */
.pre-copy-btn {
position: absolute;
top: 6px;
right: 6px;
background: var(--surface);
border: 1px solid var(--border);
border-radius: 4px;
color: var(--text-dim);
padding: 2px 7px;
cursor: pointer;
opacity: 0;
transition: opacity 0.15s;
}
.message pre:hover .pre-copy-btn { opacity: 1; }
/* Status indicators */
.inline-hud {
display: flex;
flex-direction: column;
align-items: center;
padding: 0.5rem 0 0.25rem;
}
.messages-sm-state {
display: flex;
justify-content: center;
font-weight: 500;
color: var(--text-dim);
padding: 4px 0 0;
margin: 0;
line-height: 1.2;
opacity: 0.6;
pointer-events: none;
}
.messages-sm-state.AGENT_RUNNING { color: var(--warn); opacity: 1; animation: pulse 1.5s infinite; }
.messages-sm-state.STOP_PENDING { color: var(--error); opacity: 1; }
.messages-sm-state.CONNECTING { color: var(--warn); opacity: 0.7; }
.messages-sm-state.SWITCHING { color: #60a5fa; opacity: 1; }
.agent-status-indicator {
padding: 2px var(--space-page);
color: var(--text-dim);
opacity: 0.7;
flex-shrink: 0;
}
.agent-status-indicator:not(.done) span { animation: pulse 1s infinite; }
.agent-status-indicator.done { opacity: var(--disabled-opacity); }
.typing-dots { animation: blink 1s infinite; }
/* Agent action bar — always visible above input */
.agent-action-bar {
display: flex;
align-items: center;
gap: 6px;
padding: 4px var(--space-page);
flex-shrink: 0;
}
.action-bar-btn {
background: none;
border: 1px solid var(--border);
color: var(--text-dim);
padding: 3px 12px;
height: 26px;
border-radius: var(--radius-sm);
cursor: pointer;
transition: color 0.15s, border-color 0.15s;
}
.action-bar-btn:hover:not(:disabled) { color: var(--text); border-color: var(--text-dim); }
.action-bar-btn:disabled { opacity: var(--disabled-opacity); cursor: default; }
/* Input area */
.input-area {
display: flex;
flex-direction: column;
padding: var(--panel-gap) var(--panel-gap) var(--panel-gap);
background: transparent;
flex-shrink: 0;
}
.input-box {
display: flex;
flex-direction: row;
flex-wrap: wrap;
align-items: center;
gap: 0.3rem 0.5rem;
overflow: hidden;
background: var(--panel-bg);
border: none;
border-radius: var(--radius-panel);
box-shadow: var(--panel-shadow);
padding: 0.5rem 0.5rem 0.5rem 0.85rem;
transition: box-shadow 0.15s;
width: 100%;
box-sizing: border-box;
}
.input-box:focus-within {
box-shadow: var(--panel-shadow), 0 0 0 2px rgba(74, 222, 128, 0.15);
}
.input-area .chat-input {
flex: 1 1 100%;
order: -1;
min-width: 0 !important;
max-width: 100% !important;
background: transparent;
color: var(--text);
border: none;
padding: 0;
font-size: 1rem;
font-family: inherit;
resize: none;
line-height: 1.5;
min-height: 36px;
max-height: 160px;
overflow-y: auto;
box-sizing: border-box;
outline: none;
}
.input-area .chat-input:focus { outline: none; }
.input-area .chat-input.shake {
animation: shake 0.4s cubic-bezier(.36,.07,.19,.97) both;
border: 1px solid var(--error) !important;
}
@keyframes shake {
10%, 90% { transform: translate3d(-1px, 0, 0); }
20%, 80% { transform: translate3d(2px, 0, 0); }
30%, 50%, 70% { transform: translate3d(-4px, 0, 0); }
40%, 60% { transform: translate3d(4px, 0, 0); }
}
/* Input toolbar */
.input-toolbar {
display: flex;
align-items: center;
justify-content: space-between;
padding: 0 var(--space-page);
}
.input-toolbar-left,
.input-toolbar-center {
display: flex;
align-items: center;
gap: 6px;
}
.input-toolbar-right {
display: flex;
flex-direction: column;
align-items: flex-end;
gap: 4px;
}
.input-toolbar-center {
flex: 1;
justify-content: center;
}
.v-stack {
flex-direction: column;
gap: 4px;
align-items: center;
}
.toolbar-btn {
background: none;
border: 1px solid var(--primary);
color: var(--primary);
border-radius: var(--radius-sm);
padding: 0 10px;
height: var(--height-btn);
line-height: 1;
cursor: pointer;
transition: color .15s, border-color .15s;
display: inline-flex;
align-items: center;
}
.toolbar-btn:hover:not(:disabled) { color: var(--text); border-color: var(--text-dim); }
.toolbar-btn:disabled { opacity: var(--disabled-opacity); cursor: default; }
.yes-btn {
background: none;
border: 1px solid var(--success);
color: var(--success);
padding: 0 16px;
height: var(--height-btn);
border-radius: var(--radius-sm);
font-weight: 500;
cursor: pointer;
transition: background .15s, color .15s;
display: inline-flex;
align-items: center;
}
.yes-btn:hover:not(:disabled) { background: var(--success); color: #fff; }
.yes-btn:disabled { opacity: var(--disabled-opacity); cursor: default; }
.send-btn {
width: 32px;
height: 32px;
min-width: 32px;
min-height: 32px;
flex-shrink: 0;
margin-left: auto;
border-radius: 50%;
border: none;
background: var(--send-btn-bg, var(--accent));
color: var(--send-btn-color, white);
cursor: pointer;
display: flex;
align-items: center;
justify-content: center;
transition: filter 0.15s, opacity 0.15s;
padding: 0;
margin-bottom: 1px;
}
.send-btn:hover:not(:disabled) { filter: brightness(1.1); }
.send-btn:disabled { opacity: 0.25; cursor: not-allowed; background: var(--muted); }
.stop-btn {
background: none;
border: 1px solid var(--error);
color: var(--error);
padding: 0 12px;
height: var(--height-btn);
border-radius: var(--radius-sm);
cursor: pointer;
transition: background 0.15s, opacity 0.15s;
}
.stop-btn:hover:not(:disabled) { background: var(--error); color: #fff; }
.stop-btn:disabled { cursor: default; }
.stop-btn.stop-muted { opacity: 0.25; }
.footer-stop-btn { margin-left: 4px; }
.kill-btn {
background: none;
border: 1px solid var(--error);
color: var(--error);
padding: 0 12px;
height: var(--height-btn);
border-radius: var(--radius-sm);
cursor: pointer;
transition: background 0.15s, opacity 0.15s;
}
.kill-btn:hover:not(:disabled) { background: var(--error); color: #fff; }
.finance-badge {
color: var(--text-dim);
border: 1px solid var(--border);
padding: 2px 8px;
height: 20px;
border-radius: 12px;
background: var(--bg);
cursor: pointer;
display: inline-flex;
align-items: center;
white-space: nowrap;
}
.finance-badge:hover { border-color: var(--accent); color: var(--text); }
/* ── File download buttons ── */
.file-download-link {
display: inline-block;
padding: 0.3rem 0.7rem;
margin: 0.2rem 0;
background: var(--surface);
border: 1px solid var(--border);
border-radius: 6px;
color: var(--accent);
font-size: 0.85rem;
font-family: inherit;
cursor: pointer;
transition: border-color 0.15s, background 0.15s;
}
.file-download-link:hover {
border-color: var(--accent);
background: rgba(74, 222, 128, 0.08);
}
/* ── Mobile — touch targets ── */
@media (max-width: 639px) {
.send-btn { width: 44px; height: 44px; min-width: 44px; min-height: 44px; }
}

275
css/views/dev.css Normal file
View File

@ -0,0 +1,275 @@
.dev-view {
padding: var(--space-inset) 0;
}
.dev-header {
display: flex;
align-items: center;
justify-content: space-between;
margin-bottom: var(--space-page);
}
.dev-header h2 { margin-bottom: 0; }
.dev-view h2 {
font-size: 1.25rem;
font-weight: 700;
margin-bottom: var(--space-page);
color: var(--text);
}
.dev-section { margin-bottom: var(--space-page); }
.dev-section h3 {
color: var(--text-dim);
margin-bottom: var(--space-gap);
}
.dev-actions { display: flex; gap: var(--space-gap); flex-wrap: wrap; }
/* Credits widget */
.credits-widget {
background: var(--surface);
border: 1px solid var(--border);
border-radius: var(--radius, 6px);
padding: 16px 20px;
}
.credits-bar-track {
height: 6px;
background: var(--border);
border-radius: 3px;
overflow: hidden;
margin-bottom: 14px;
}
.credits-bar-fill {
height: 100%;
background: var(--accent);
border-radius: 3px;
transition: width 0.4s ease;
}
.credits-row {
display: flex;
gap: 32px;
}
.credits-stat {
display: flex;
flex-direction: column;
gap: 2px;
}
.credits-label {
font-size: 0.75rem;
text-transform: uppercase;
letter-spacing: 0.05em;
color: var(--text-muted, var(--text-dim));
}
.credits-amount {
font-size: 1.1rem;
font-weight: 600;
color: var(--text);
font-variant-numeric: tabular-nums;
}
.credits-used { color: var(--error); }
.credits-remaining { color: var(--success-dim, var(--accent)); }
/* Table */
.dev-table {
width: 100%;
border-collapse: collapse;
}
.dev-table th {
text-align: left;
padding: 8px 12px;
color: var(--text-dim);
font-weight: 500;
border-bottom: 1px solid var(--border);
}
.dev-table td { padding: 8px 12px; border-bottom: 1px solid var(--border); color: var(--text); }
.dev-table tr:last-child td { border-bottom: none; }
.dev-table .agent-id { font-weight: 600; }
.dev-table code {
background: var(--border);
padding: 2px 6px;
border-radius: 3px;
font-family: var(--font-mono);
}
/* Dev flags */
.dev-flags { display: flex; gap: 16px; flex-wrap: wrap; }
.dev-flag {
display: flex;
align-items: center;
gap: 6px;
color: var(--text);
cursor: pointer;
user-select: none;
}
.dev-flag input[type="checkbox"] {
accent-color: var(--accent);
width: 16px;
height: 16px;
cursor: pointer;
}
.dev-flag span { font-family: var(--font-mono); }
.takeover-token {
font-family: var(--font-mono);
background: var(--surface);
border: 1px solid var(--border);
padding: 4px 10px;
border-radius: var(--radius-sm);
color: var(--accent);
user-select: all;
}
.dev-loading { color: var(--text-dim); }
.dev-error { color: var(--error); }
.dev-refresh-btn {
background: none;
border: 1px solid var(--border);
color: var(--text-dim);
padding: 6px 14px;
border-radius: 4px;
cursor: pointer;
transition: color 0.15s, border-color 0.15s;
}
.dev-refresh-btn:hover { color: var(--text); border-color: var(--text-dim); }
.dev-refresh-btn:disabled { opacity: var(--disabled-opacity); cursor: not-allowed; }
.dev-disco-btn {
background: none;
border: 1px solid var(--error);
color: var(--error);
padding: 6px 14px;
border-radius: 4px;
cursor: pointer;
transition: color 0.15s, border-color 0.15s, background 0.15s;
}
.dev-disco-btn:hover { background: var(--error)22; }
.dev-disco-btn:disabled { opacity: var(--disabled-opacity); cursor: not-allowed; }
/* Theme buttons */
.dev-theme-btn {
background: var(--surface);
border: 1px solid var(--border);
color: var(--text-dim);
padding: 6px 18px;
border-radius: 4px;
cursor: pointer;
transition: color 0.15s, border-color 0.15s, background 0.15s;
}
.dev-theme-btn:hover { color: var(--text); border-color: var(--text-dim); }
.dev-theme-btn.active {
border-color: var(--accent);
color: var(--bg);
background: var(--accent);
}
/* Table horizontal scroll wrapper */
.dev-table-wrap {
overflow-x: auto;
-webkit-overflow-scrolling: touch;
}
/* Breakout confirmation modal */
.breakout-modal-overlay {
position: fixed;
inset: 0;
background: rgba(0, 0, 0, 0.6);
display: flex;
align-items: center;
justify-content: center;
z-index: 9999;
}
.breakout-modal {
background: var(--surface);
border: 1px solid var(--border);
border-radius: var(--radius);
padding: 24px 32px;
min-width: 300px;
text-align: center;
}
.breakout-modal h3 { color: var(--text); margin-bottom: 12px; }
.breakout-modal p { color: var(--text-dim); margin: 4px 0; }
.breakout-nonce {
font-family: var(--font-mono);
font-size: 2rem;
font-weight: 700;
color: var(--accent);
letter-spacing: 0.15em;
margin: 16px 0;
}
.breakout-modal-actions {
display: flex;
gap: 12px;
justify-content: center;
margin-top: 16px;
}
/* ── MCP Counter ── */
.counter-widget { transition: opacity 0.3s; }
.counter-widget.muted { opacity: 0.35; }
.counter-controls { display: flex; align-items: center; gap: 16px; }
.counter-btn {
width: 48px; height: 48px; border-radius: 50%;
border: 1px solid var(--text-dim); background: transparent;
color: var(--text); font-size: 1.5rem; cursor: pointer;
transition: all 0.2s;
}
.counter-btn:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); }
.counter-btn:disabled { cursor: not-allowed; opacity: 0.3; }
.counter-value {
font-size: 2.5rem; font-variant-numeric: tabular-nums;
min-width: 3ch; text-align: center; color: var(--text);
}
.counter-challenge {
margin-top: 12px; display: flex; align-items: center; gap: 12px;
animation: counter-pulse 1s ease-in-out infinite alternate;
}
.counter-message { color: var(--accent); font-weight: 600; font-size: 0.9rem; }
.counter-timer {
font-variant-numeric: tabular-nums; color: var(--text-dim);
font-size: 0.85rem; min-width: 3ch;
}
.counter-hint { margin-top: 8px; font-size: 0.8rem; opacity: 0.4; }
@keyframes counter-pulse {
from { opacity: 0.7; }
to { opacity: 1; }
}
.counter-widget.flash {
animation: counter-flash 0.5s ease-out 3;
}
@keyframes counter-flash {
0% { box-shadow: 0 0 0 0 var(--accent); }
50% { box-shadow: 0 0 20px 4px var(--accent); }
100% { box-shadow: 0 0 0 0 var(--accent); }
}
/* ── Confetti ── */
.confetti-container {
position: fixed; inset: 0; pointer-events: none; z-index: 9999; overflow: hidden;
}
.confetti-piece {
position: absolute; width: 10px; height: 10px; top: -20px;
animation: confetti-fall 3s ease-in forwards;
}
@keyframes confetti-fall {
0% { transform: translateY(0) rotate(0deg); opacity: 1; }
100% { transform: translateY(100vh) rotate(720deg); opacity: 0; }
}
/* ── Action Picker ── */
.action-picker { display: flex; flex-wrap: wrap; gap: 8px; }
.action-pick-btn {
padding: 8px 16px; border-radius: 6px;
border: 1px solid var(--accent); background: transparent;
color: var(--accent); font-size: 0.85rem; cursor: pointer;
transition: all 0.2s;
}
.action-pick-btn:hover:not(:disabled) { background: var(--accent); color: var(--bg); }
.action-pick-btn:disabled { opacity: 0.3; cursor: not-allowed; }
/* ── Mobile ── */
@media (max-width: 639px) {
.dev-theme-btn, .dev-disco-btn { min-height: 44px; }
.dev-flag { min-height: 44px; }
}

45
css/views/home.css Normal file
View File

@ -0,0 +1,45 @@
.home-view {
display: flex;
align-items: center;
justify-content: center;
flex: 1;
min-height: 100%;
background: transparent;
}
.home-card {
text-align: center;
padding: 48px 40px;
}
.home-logo {
font-size: 3rem;
margin-bottom: var(--space-page);
display: flex;
justify-content: center;
}
.home-card h1 {
font-size: 1.75rem;
font-weight: 700;
margin-bottom: var(--space-gap);
color: var(--text);
}
.home-sub {
color: var(--text-dim);
margin-bottom: 32px;
}
.home-btn {
display: inline-block;
background: var(--accent);
color: #fff;
padding: 12px 28px;
border-radius: var(--radius);
font-weight: 600;
text-decoration: none;
transition: opacity 0.15s;
}
.home-btn:hover { opacity: 0.85; }

87
css/views/login.css Normal file
View File

@ -0,0 +1,87 @@
.login-view {
display: flex;
align-items: center;
justify-content: center;
min-height: 100%;
padding: 16px;
background: transparent;
}
.login-card {
background: rgba(30, 30, 38, 0.85);
border: 1px solid var(--border);
border-radius: var(--radius);
padding: 32px;
width: 100%;
max-width: 360px;
text-align: center;
}
.login-card h2 {
font-size: 1.25rem;
margin-bottom: 24px;
color: var(--text);
}
.login-card input {
width: 100%;
padding: 12px var(--space-page);
font-size: inherit;
background: var(--bg);
border: 1px solid var(--border);
border-radius: var(--radius);
color: var(--text);
margin-bottom: var(--space-page);
color-scheme: dark;
}
.login-card input:focus { outline: none; border-color: var(--focus); }
.login-card input::placeholder { color: var(--text-dim); }
.login-card button {
width: 100%;
padding: 12px;
font-size: inherit;
font-weight: 600;
background: var(--accent);
border: none;
border-radius: var(--radius);
color: white;
cursor: pointer;
transition: opacity 0.2s;
}
.login-card button:hover { opacity: 0.9; }
.login-card button:disabled { opacity: var(--disabled-opacity); cursor: not-allowed; }
.login-error {
color: var(--error);
margin-top: 12px;
}
.login-info {
color: var(--text-dim);
margin-bottom: 20px;
}
.login-card button + button {
margin-top: 10px;
}
.logout-btn {
background: transparent !important;
border: 1px solid var(--border) !important;
color: var(--text-dim) !important;
}
.logout-btn:hover { border-color: var(--error) !important; color: var(--error) !important; opacity: 1 !important; }
.version-login {
color: var(--text-dim);
margin-bottom: var(--space-page);
}
.login-label {
display: block;
font-weight: 600;
color: var(--text-dim);
margin-bottom: 4px;
}

1
dist/assets/AgentsView-CLYIODGP.css vendored Normal file

File diff suppressed because one or more lines are too long

5
dist/assets/AgentsView-DlISXhse.js vendored Normal file

File diff suppressed because one or more lines are too long

1
dist/assets/DevView-HyNc2L8o.css vendored Normal file
View File

@ -0,0 +1 @@
.dev-view[data-v-6fcff79f]{height:100%}.dev-system-request[data-v-6fcff79f]{background:color-mix(in srgb,var(--color-accent) 8%,var(--color-surface));border:1px solid color-mix(in srgb,var(--color-accent) 30%,transparent);border-radius:6px;padding:12px 16px;margin-bottom:8px}.dev-system-code[data-v-6fcff79f]{font-family:monospace;font-size:1.4em;font-weight:700;letter-spacing:.1em;color:var(--color-accent);margin-bottom:4px}.dev-system-desc[data-v-6fcff79f]{font-size:.9em;color:var(--color-text);margin-bottom:2px}.dev-system-expiry[data-v-6fcff79f]{font-size:.8em;color:var(--color-text-dim);margin-bottom:4px}.dev-system-granted[data-v-6fcff79f]{font-size:.9em;color:var(--color-success-dim, #4ade80);padding:6px 0}

1
dist/assets/DevView-lskM9Phs.js vendored Normal file

File diff suppressed because one or more lines are too long

1
dist/assets/HomeView-C4cnj5m-.js vendored Normal file
View File

@ -0,0 +1 @@
import{h as m,c as d,l as u,a as o,A as a,B as _,p as s,Z as p,x as h,a3 as g,q as k,s as c,a1 as f,O as v,o as t,a4 as x,v as l}from"./index-BcBhCcW4.js";const B={class:"home-view"},E={class:"home-card"},C={class:"home-logo"},w=m({__name:"HomeView",setup(N){const{isLoggedIn:r}=k,{theme:n}=f();return(S,e)=>{const i=v("RouterLink");return t(),d("div",B,[u(x),o("div",E,[o("div",C,[(t(),a(_(s(p)[s(n)]),{class:"w-12 h-12 text-accent"}))]),o("h1",null,h(s(g)[s(n)]),1),e[2]||(e[2]=o("p",{class:"home-sub"},"Don't Panic.",-1)),s(r)?(t(),a(i,{key:1,to:"/agents",class:"home-btn"},{default:c(()=>[...e[1]||(e[1]=[l("Sign in →",-1)])]),_:1})):(t(),a(i,{key:0,to:"/login",class:"home-btn"},{default:c(()=>[...e[0]||(e[0]=[l("Sign in →",-1)])]),_:1}))])])}}});export{w as default};

View File

@ -0,0 +1 @@
import{o as e,c as r,a}from"./index-BcBhCcW4.js";function n(t,l){return e(),r("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon"},[a("path",{d:"M11.983 1.907a.75.75 0 0 0-1.292-.657l-8.5 9.5A.75.75 0 0 0 2.75 12h6.572l-1.305 6.093a.75.75 0 0 0 1.292.657l8.5-9.5A.75.75 0 0 0 17.25 8h-6.572l1.305-6.093Z"})])}function c(t,l){return e(),r("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon"},[a("path",{d:"M12.232 4.232a2.5 2.5 0 0 1 3.536 3.536l-1.225 1.224a.75.75 0 0 0 1.061 1.06l1.224-1.224a4 4 0 0 0-5.656-5.656l-3 3a4 4 0 0 0 .225 5.865.75.75 0 0 0 .977-1.138 2.5 2.5 0 0 1-.142-3.667l3-3Z"}),a("path",{d:"M11.603 7.963a.75.75 0 0 0-.977 1.138 2.5 2.5 0 0 1 .142 3.667l-3 3a2.5 2.5 0 0 1-3.536-3.536l1.225-1.224a.75.75 0 0 0-1.061-1.06l-1.224 1.224a4 4 0 1 0 5.656 5.656l3-3a4 4 0 0 0-.225-5.865Z"})])}function d(t,l){return e(),r("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon"},[a("path",{"fill-rule":"evenodd",d:"M10 1a4.5 4.5 0 0 0-4.5 4.5V9H5a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2v-6a2 2 0 0 0-2-2h-.5V5.5A4.5 4.5 0 0 0 10 1Zm3 8V5.5a3 3 0 1 0-6 0V9h6Z","clip-rule":"evenodd"})])}export{c as a,d as b,n as r};

5
dist/assets/ViewerView-CJchbA_-.js vendored Normal file
View File

@ -0,0 +1,5 @@
import{c as a,a as r,o as s,w as K,S as Y,r as h,G as ee,b as te,f as ne,Q as ae,T as se,e as g,U as oe,g as J,h as le,p as t,F,y as M,i as P,j as B,l as E,s as re,J as ie,P as ue,x as R,V as ce,W as de,X as ve,v as G,_ as fe}from"./index-BcBhCcW4.js";import{g as pe}from"./marked.esm-D9eDbhZJ.js";function we(L,T){return s(),a("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon"},[r("path",{d:"M10.75 2.75a.75.75 0 0 0-1.5 0v8.614L6.295 8.235a.75.75 0 1 0-1.09 1.03l4.25 4.5a.75.75 0 0 0 1.09 0l4.25-4.5a.75.75 0 0 0-1.09-1.03l-2.955 3.129V2.75Z"}),r("path",{d:"M3.5 12.75a.75.75 0 0 0-1.5 0v2.5A2.75 2.75 0 0 0 4.75 18h10.5A2.75 2.75 0 0 0 18 15.25v-2.5a.75.75 0 0 0-1.5 0v2.5c0 .69-.56 1.25-1.25 1.25H4.75c-.69 0-1.25-.56-1.25-1.25v-2.5Z"})])}function me(){const L=ae(),T=oe(),{onMessage:v}=K,k=Y(),f=g(()=>k.fstoken),S=g(()=>k.roots),b=f;function _(e){if(!e)return e;const o=k.roots;if(!o.length)return e;const[y,...x]=e.split("/");if(o.includes(y))return e;const m=o.find(i=>i===`workspace-${y}`||i.endsWith(`-${y}`));return m?[m,...x].join("/"):e}const u=h(_(L.query.path||localStorage.getItem("viewer_last_path")||"")),H=h(window.innerWidth<768),c=h(""),w=h(""),V=h([]),U=h([]),D=h(!1),I=h(!1);let C=null;const p=h(""),$=h(Date.now()),l=h(!1),n=g(()=>c.value?c.value.split(`
`).length:0),d=g(()=>w.value!=="md"||!c.value?"":pe.parse(c.value)),W=g(()=>w.value!=="pdf"||!u.value||!b.value?"":`${q()}/api/viewer/file?path=${encodeURIComponent(u.value)}&token=${encodeURIComponent(b.value)}&t=${$.value}`);function q(){return J()}function z(e){const o=e.match(/\.([^./]+)$/);return o?o[1].toLowerCase():""}function O(e){e||(D.value=!0,I.value=!1,C&&clearTimeout(C),C=setTimeout(()=>{I.value=!0},3e3))}function Z(){D.value=!1,I.value=!1,C&&(clearTimeout(C),C=null)}async function N(e,o=!1,y=!1){O(o);try{const m=`${q()}/api/viewer/file?path=${encodeURIComponent(e)}&token=${encodeURIComponent(b.value)}`,i=await fetch(m);if(i.status===401&&!y)return k.invalidate(),await k.acquire(!0),N(e,o,!0);if(!i.ok){p.value=`${i.status}: ${await i.text()}`;return}p.value="",c.value=await i.text()}catch(x){p.value=x.message||"Fetch failed"}finally{Z()}}async function A(e){e=_(e),u.value=e,localStorage.setItem("viewer_last_path",e),se.value=e,L.query.path!==e&&T.push({name:"viewer",query:{path:e}});const o=z(e);if(!e){w.value="dir",c.value="",p.value="",U.value=S.value.length?S.value:["shared","workspace-titan"],V.value=[];return}if(!o){w.value="dir",c.value="",p.value="",O(!1);try{const x=`${q()}/api/viewer/tree?root=${encodeURIComponent(e)}&token=${encodeURIComponent(b.value)}`,m=await fetch(x);if(!m.ok)throw new Error(`${m.status} ${m.statusText}`);const i=await m.json();U.value=i.dirs||[],V.value=i.files||[]}catch(y){U.value=[],V.value=[],p.value=y.message||"Failed to load directory"}finally{Z()}return}if(o==="pdf"){w.value="pdf",c.value="",p.value="",$.value=Date.now(),fetch(`${q()}/api/viewer/file?path=${encodeURIComponent(e)}&token=${encodeURIComponent(b.value)}`,{method:"HEAD"}).catch(()=>{});return}w.value=o==="md"?"md":"text",p.value="",await N(e,!1)}function Q(e){const o=window.getSelection();if(!o||o.isCollapsed)return;const x=(()=>{const i=document.createElement("div");return i.appendChild(o.getRangeAt(0).cloneContents()),i.innerHTML})().replace(/background(-color)?:[^;"]*(;|(?="))/gi,""),m=o.toString();e.clipboardData.setData("text/html",x),e.clipboardData.setData("text/plain",m),e.preventDefault()}async function X(e){if(z(e)==="pdf"){$.value=Date.now();return}await N(e,!0)}let j=null;return ee(()=>{j=v(e=>{e.type==="viewer_file_changed"&&e.path===u.value&&X(u.value),e.type==="viewer_tree_changed"&&e.path===u.value&&w.value==="dir"&&A(u.value)}),k.acquire(),u.value&&A(u.value)}),te(()=>L.query.path,e=>{e&&e!==u.value&&A(e)}),ne(()=>{j&&j()}),{fstoken:f,viewerRoots:S,currentPath:u,sidebarCollapsed:H,content:c,fileType:w,loading:D,fetchError:p,mdRaw:l,mdLineCount:n,renderedMd:d,pdfSrc:W,openFile:A,onCopy:Q,dirFiles:V,dirDirs:U,showLoading:I}}const he={class:"viewer-layout h-full overflow-hidden"},_e={class:"viewer-pane min-w-0 flex flex-col h-full overflow-hidden"},ye={key:0,class:"viewer-toolbar"},ge={class:"viewer-panel breadcrumb-panel"},ke={key:0,class:"breadcrumb-sep"},be=["onClick"],Ce={key:0,class:"viewer-panel toggle-panel"},$e=["href","download"],xe={key:0,class:"viewer-empty"},Re={key:1,class:"viewer-loading"},Ve={key:2,class:"viewer-error"},Ue={key:3,class:"viewer-dir"},De=["onClick"],Ie=["onClick"],Le={key:0,class:"viewer-empty"},Te=["src"],Se=["innerHTML"],Fe={key:6,class:"viewer-raw-md"},Me={class:"viewer-raw-code"},Be={class:"line-num"},Ee={key:7,class:"viewer-raw-code"},qe={class:"line-num"},Ae=le({name:"ViewerView",__name:"ViewerView",setup(L){const{fstoken:T,currentPath:v,content:k,fileType:f,showLoading:S,fetchError:b,mdRaw:_,renderedMd:u,pdfSrc:H,openFile:c,onCopy:w,dirFiles:V,dirDirs:U}=me(),D=g(()=>k.value.split(`
`)),I=g(()=>v.value&&v.value.split("/").pop()||""),C=g(()=>!v.value||!T.value?"":`${J()}/api/viewer/file?path=${encodeURIComponent(v.value)}&token=${encodeURIComponent(T.value)}&dl=1`),p=g(()=>{const $=[{label:"files",path:""}];if(!v.value)return $;const l=v.value.split("/");for(let n=0;n<l.length;n++)$.push({label:l[n],path:l.slice(0,n+1).join("/")});return $});return($,l)=>(s(),a("div",he,[r("main",_e,[t(v)||t(f)==="dir"?(s(),a("div",ye,[r("div",ge,[(s(!0),a(F,null,M(p.value,(n,d)=>(s(),a("span",{key:d},[d>0?(s(),a("span",ke,"/")):B("",!0),r("span",{class:P(["breadcrumb-item",{active:d===p.value.length-1}]),onClick:W=>t(c)(n.path)},R(n.label),11,be)]))),128))]),l[3]||(l[3]=r("div",{class:"viewer-toolbar-spacer"},null,-1)),t(f)==="md"?(s(),a("div",Ce,[r("button",{class:P(["md-toggle-btn",{active:!t(_)}]),onClick:l[0]||(l[0]=n=>_.value=!1)},"Rendered",2),r("button",{class:P(["md-toggle-btn",{active:t(_)}]),onClick:l[1]||(l[1]=n=>_.value=!0)},"Raw",2)])):B("",!0),t(f)&&t(f)!=="dir"?(s(),a("a",{key:1,class:"viewer-panel download-panel",href:C.value,download:I.value,title:"Download"},[E(t(we),{class:"w-4 h-4"})],8,$e)):B("",!0)])):B("",!0),E(t(ue),{class:"content flex-1 min-h-0",options:t(ie),element:"div"},{default:re(()=>[!t(v)&&t(f)!=="dir"?(s(),a("div",xe,[E(t(ce),{class:"w-8 h-8 text-text-dim"}),l[4]||(l[4]=r("p",null,"Select a file from the tree",-1))])):t(S)?(s(),a("div",Re,"loading…")):t(b)?(s(),a("div",Ve,R(t(b)),1)):t(f)==="dir"?(s(),a("div",Ue,[(s(!0),a(F,null,M(t(U),n=>(s(),a("div",{key:n,class:"dir-entry dir-entry--dir",onClick:d=>t(c)(t(v)?t(v)+"/"+n:n)},[E(t(de),{class:"w-4 h-4"}),r("span",null,R(n)+"/",1)],8,De))),128)),(s(!0),a(F,null,M(t(V),n=>(s(),a("div",{key:n.path,class:"dir-entry dir-entry--file",onClick:d=>t(c)(n.path)},[E(t(ve),{class:"w-4 h-4"}),r("span",null,R(n.name),1)],8,Ie))),128)),!t(U).length&&!t(V).length?(s(),a("div",Le,[...l[5]||(l[5]=[r("p",null,"Empty directory",-1)])])):B("",!0)])):t(f)==="pdf"?(s(),a("iframe",{key:4,class:"viewer-pdf",src:t(H),frameborder:"0"},null,8,Te)):t(f)==="md"&&!t(_)?(s(),a("div",{key:5,class:"viewer-md md-body",innerHTML:t(u),onCopy:l[2]||(l[2]=(...n)=>t(w)&&t(w)(...n))},null,40,Se)):t(f)==="md"&&t(_)?(s(),a("div",Fe,[r("pre",Me,[r("code",null,[(s(!0),a(F,null,M(D.value,(n,d)=>(s(),a("span",{key:d,class:"code-line"},[r("span",Be,R(d+1),1),G(R(n)+`
`,1)]))),128))])])])):(s(),a("pre",Ee,[r("code",null,[(s(!0),a(F,null,M(D.value,(n,d)=>(s(),a("span",{key:d,class:"code-line"},[r("span",qe,R(d+1),1),G(R(n)+`
`,1)]))),128))])]))]),_:1},8,["options"])])]))}}),je=fe(Ae,[["__scopeId","data-v-6b5cb038"]]);export{je as default};

1
dist/assets/ViewerView-ExCKplPl.css vendored Normal file
View File

@ -0,0 +1 @@
.viewer-empty[data-v-6b5cb038]{display:flex;flex-direction:column;align-items:center;justify-content:center;height:100%;gap:8px;color:var(--text-dim)}.viewer-empty .empty-icon[data-v-6b5cb038]{font-size:2rem}.viewer-empty p[data-v-6b5cb038]{margin:0}.viewer-toolbar[data-v-6b5cb038]{display:flex;align-items:center;gap:var(--panel-gap, 6px);padding:var(--panel-gap, 6px);padding-bottom:0;flex-shrink:0}.viewer-toolbar-spacer[data-v-6b5cb038]{flex:1}.viewer-panel[data-v-6b5cb038]{display:flex;align-items:center;background:var(--panel-bg);border-radius:var(--radius-panel, 12px);box-shadow:var(--panel-shadow);padding:0 12px;height:34px;font-size:.85rem}.breadcrumb-panel[data-v-6b5cb038]{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;min-width:0}.breadcrumb-sep[data-v-6b5cb038]{color:var(--text-dim, #666);margin:0 2px}.breadcrumb-item[data-v-6b5cb038]{cursor:pointer;color:var(--text-dim, #71B095)}.breadcrumb-item[data-v-6b5cb038]:hover{color:var(--text, #ccc)}.breadcrumb-item.active[data-v-6b5cb038]{color:var(--text, #ccc);cursor:default}.toggle-panel[data-v-6b5cb038]{gap:2px;padding:0 4px}.download-panel[data-v-6b5cb038]{width:34px;padding:0;justify-content:center;color:var(--text-dim, #888);text-decoration:none;transition:color .15s}.download-panel[data-v-6b5cb038]:hover{color:var(--text, #ccc)}.viewer-loading[data-v-6b5cb038],.viewer-error[data-v-6b5cb038]{padding:20px;color:var(--text-dim)}.viewer-error[data-v-6b5cb038]{color:var(--error)}.viewer-dir[data-v-6b5cb038]{padding:12px 16px}.dir-entry[data-v-6b5cb038]{display:flex;align-items:center;gap:8px;padding:6px 12px;cursor:pointer;border-radius:4px;color:var(--text, #ccc)}.dir-entry[data-v-6b5cb038]:hover{background:var(--hover-bg, rgba(255,255,255,.05))}.dir-entry--dir[data-v-6b5cb038]{color:var(--text-dim, #71B095)}.dir-entry--file[data-v-6b5cb038]{color:var(--text, #ccc)}.viewer-pdf[data-v-6b5cb038]{width:100%;height:100%;border:none;display:block}.viewer-text[data-v-6b5cb038]{margin:0;padding:12px 16px;line-height:1.6;color:var(--text);white-space:pre-wrap;word-break:break-word}.viewer-md-toolbar{display:flex;gap:4px;padding:6px 12px;background:var(--bg-dim, #1a1d23);flex-shrink:0}.md-toggle-btn{padding:2px 10px;border-radius:var(--radius-sm, 6px);border:none;background:transparent;color:var(--text-dim, #888);cursor:pointer;transition:background .12s,color .12s}.md-toggle-btn:hover{background:color-mix(in srgb,var(--accent) 10%,transparent);color:var(--text)}.md-toggle-btn.active{background:color-mix(in srgb,var(--accent) 18%,transparent);color:var(--accent)}.viewer-raw-md{display:flex;flex:1;overflow:auto;font-family:var(--font-mono);line-height:1.6}.viewer-raw-gutter{display:flex;flex-direction:column;align-items:flex-end;padding:12px 8px 12px 12px;min-width:3rem;color:var(--text-dim, #555);background:var(--bg-dim, #1a1d23);border-right:1px solid var(--border, #2a2d35);-webkit-user-select:none;user-select:none;flex-shrink:0}.viewer-raw-gutter span{display:block;line-height:1.6}.viewer-raw-code{flex:1;margin:0;padding:12px 16px;overflow:visible;white-space:pre-wrap;word-break:break-word;background:transparent;color:var(--text, #abb2bf);line-height:1.6}.code-line{display:block}.line-num{display:inline-block;width:3em;text-align:right;padding-right:1em;color:var(--text-dim);opacity:.4;-webkit-user-select:none;user-select:none;font-family:var(--font-mono)}.viewer-raw-code code{background:none;padding:0;font-size:inherit}@media(max-width:639px){.viewer-raw-gutter{display:none}.viewer-raw-code{padding:8px 12px}.viewer-md-toolbar{padding:6px 8px}.md-toggle-btn{min-height:36px;display:inline-flex;align-items:center}}

27
dist/assets/index-BcBhCcW4.js vendored Normal file

File diff suppressed because one or more lines are too long

1
dist/assets/index-QU_mt5pQ.css vendored Normal file

File diff suppressed because one or more lines are too long

59
dist/assets/marked.esm-D9eDbhZJ.js vendored Normal file

File diff suppressed because one or more lines are too long

11
dist/favicon-eras.svg vendored Normal file
View File

@ -0,0 +1,11 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32">
<!-- Sun circle -->
<circle cx="16" cy="16" r="10" fill="none" stroke="#005e83" stroke-width="2"/>
<!-- Sun rays -->
<line x1="16" y1="2" x2="16" y2="6" stroke="#e25303" stroke-width="2" stroke-linecap="round"/>
<line x1="16" y1="26" x2="16" y2="30" stroke="#e25303" stroke-width="2" stroke-linecap="round"/>
<line x1="2" y1="16" x2="6" y2="16" stroke="#e25303" stroke-width="2" stroke-linecap="round"/>
<line x1="26" y1="16" x2="30" y2="16" stroke="#e25303" stroke-width="2" stroke-linecap="round"/>
<!-- Inner dot -->
<circle cx="16" cy="16" r="4" fill="#005e83"/>
</svg>

After

Width:  |  Height:  |  Size: 653 B

9
dist/favicon-loop42.svg vendored Normal file
View File

@ -0,0 +1,9 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32">
<!-- Rounded square background -->
<rect x="2" y="2" width="28" height="28" rx="6" fill="#1A212C" stroke="#1D7872" stroke-width="1.5"/>
<!-- Loop symbol: two interlinked arcs -->
<path d="M10,16 a5,5 0 1,1 6,0 a5,5 0 1,1 -6,0" fill="none" stroke="#71B095" stroke-width="2"/>
<path d="M16,16 a5,5 0 1,1 6,0 a5,5 0 1,1 -6,0" fill="none" stroke="#1D7872" stroke-width="2"/>
<!-- 42 text -->
<text x="16" y="27" font-family="monospace" font-size="6" font-weight="bold" fill="#71B095" text-anchor="middle">42</text>
</svg>

After

Width:  |  Height:  |  Size: 593 B

12
dist/favicon-titan.svg vendored Normal file
View File

@ -0,0 +1,12 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32">
<!-- Monitor body -->
<rect x="2" y="4" width="28" height="18" rx="2.5" ry="2.5" fill="#1a1a2e" stroke="#7c6ff7" stroke-width="1.5"/>
<!-- Screen inner -->
<rect x="4.5" y="6.5" width="23" height="13" rx="1" fill="#0d0d1a"/>
<!-- Stand neck -->
<rect x="14" y="22" width="4" height="4" fill="#7c6ff7"/>
<!-- Stand base -->
<rect x="10" y="26" width="12" height="2.5" rx="1.2" fill="#7c6ff7"/>
<!-- Lightning bolt on screen -->
<polygon points="18,9 14,16 16.5,16 14,23 20,15 17,15" fill="#f0c040"/>
</svg>

After

Width:  |  Height:  |  Size: 587 B

12
dist/favicon.svg vendored Normal file
View File

@ -0,0 +1,12 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32">
<!-- Monitor body -->
<rect x="2" y="4" width="28" height="18" rx="2.5" ry="2.5" fill="#1a1a2e" stroke="#7c6ff7" stroke-width="1.5"/>
<!-- Screen inner -->
<rect x="4.5" y="6.5" width="23" height="13" rx="1" fill="#0d0d1a"/>
<!-- Stand neck -->
<rect x="14" y="22" width="4" height="4" fill="#7c6ff7"/>
<!-- Stand base -->
<rect x="10" y="26" width="12" height="2.5" rx="1.2" fill="#7c6ff7"/>
<!-- Lightning bolt on screen -->
<polygon points="18,9 14,16 16.5,16 14,23 20,15 17,15" fill="#f0c040"/>
</svg>

After

Width:  |  Height:  |  Size: 587 B

Binary file not shown.

Binary file not shown.

32
dist/index.html vendored Normal file
View File

@ -0,0 +1,32 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no, viewport-fit=cover">
<title>nyx</title>
<link rel="icon" type="image/svg+xml" href="/favicon.svg">
<style>
html, body { background: #1A212C; }
canvas:not(.ready) { opacity: 0; }
[v-cloak] { display: none; }
</style>
<script type="module" crossorigin src="/assets/index-BcBhCcW4.js"></script>
<link rel="stylesheet" crossorigin href="/assets/index-QU_mt5pQ.css">
</head>
<body>
<div id="app" v-cloak></div>
<script>
window.addEventListener('pagehide',function(){
document.querySelectorAll('canvas').forEach(function(c){
c.style.display='none';
var gl=c.getContext('webgl');
if(gl){gl.clearColor(0,0,0,0);gl.clear(gl.COLOR_BUFFER_BIT);}
});
});
window.addEventListener('beforeunload',function(){
document.querySelectorAll('canvas').forEach(function(c){c.style.display='none'});
});
</script>
</body>
</html>

31
index.html Normal file
View File

@ -0,0 +1,31 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no, viewport-fit=cover">
<title>nyx</title>
<link rel="icon" type="image/svg+xml" href="/favicon.svg">
<style>
html, body { background: #1A212C; }
canvas:not(.ready) { opacity: 0; }
[v-cloak] { display: none; }
</style>
</head>
<body>
<div id="app" v-cloak></div>
<script>
window.addEventListener('pagehide',function(){
document.querySelectorAll('canvas').forEach(function(c){
c.style.display='none';
var gl=c.getContext('webgl');
if(gl){gl.clearColor(0,0,0,0);gl.clear(gl.COLOR_BUFFER_BIT);}
});
});
window.addEventListener('beforeunload',function(){
document.querySelectorAll('canvas').forEach(function(c){c.style.display='none'});
});
</script>
<script type="module" src="/src/main.ts"></script>
</body>
</html>

16
node_modules/.bin/acorn generated vendored Normal file
View File

@ -0,0 +1,16 @@
#!/bin/sh
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
case `uname` in
*CYGWIN*|*MINGW*|*MSYS*)
if command -v cygpath > /dev/null 2>&1; then
basedir=`cygpath -w "$basedir"`
fi
;;
esac
if [ -x "$basedir/node" ]; then
exec "$basedir/node" "$basedir/../acorn/bin/acorn" "$@"
else
exec node "$basedir/../acorn/bin/acorn" "$@"
fi

17
node_modules/.bin/acorn.cmd generated vendored Normal file
View File

@ -0,0 +1,17 @@
@ECHO off
GOTO start
:find_dp0
SET dp0=%~dp0
EXIT /b
:start
SETLOCAL
CALL :find_dp0
IF EXIST "%dp0%\node.exe" (
SET "_prog=%dp0%\node.exe"
) ELSE (
SET "_prog=node"
SET PATHEXT=%PATHEXT:;.JS;=;%
)
endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\acorn\bin\acorn" %*

28
node_modules/.bin/acorn.ps1 generated vendored Normal file
View File

@ -0,0 +1,28 @@
#!/usr/bin/env pwsh
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
$exe=""
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
# Fix case when both the Windows and Linux builds of Node
# are installed in the same directory
$exe=".exe"
}
$ret=0
if (Test-Path "$basedir/node$exe") {
# Support pipeline input
if ($MyInvocation.ExpectingInput) {
$input | & "$basedir/node$exe" "$basedir/../acorn/bin/acorn" $args
} else {
& "$basedir/node$exe" "$basedir/../acorn/bin/acorn" $args
}
$ret=$LASTEXITCODE
} else {
# Support pipeline input
if ($MyInvocation.ExpectingInput) {
$input | & "node$exe" "$basedir/../acorn/bin/acorn" $args
} else {
& "node$exe" "$basedir/../acorn/bin/acorn" $args
}
$ret=$LASTEXITCODE
}
exit $ret

16
node_modules/.bin/esbuild generated vendored Normal file
View File

@ -0,0 +1,16 @@
#!/bin/sh
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
case `uname` in
*CYGWIN*|*MINGW*|*MSYS*)
if command -v cygpath > /dev/null 2>&1; then
basedir=`cygpath -w "$basedir"`
fi
;;
esac
if [ -x "$basedir/node" ]; then
exec "$basedir/node" "$basedir/../esbuild/bin/esbuild" "$@"
else
exec node "$basedir/../esbuild/bin/esbuild" "$@"
fi

17
node_modules/.bin/esbuild.cmd generated vendored Normal file
View File

@ -0,0 +1,17 @@
@ECHO off
GOTO start
:find_dp0
SET dp0=%~dp0
EXIT /b
:start
SETLOCAL
CALL :find_dp0
IF EXIST "%dp0%\node.exe" (
SET "_prog=%dp0%\node.exe"
) ELSE (
SET "_prog=node"
SET PATHEXT=%PATHEXT:;.JS;=;%
)
endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\esbuild\bin\esbuild" %*

28
node_modules/.bin/esbuild.ps1 generated vendored Normal file
View File

@ -0,0 +1,28 @@
#!/usr/bin/env pwsh
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
$exe=""
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
# Fix case when both the Windows and Linux builds of Node
# are installed in the same directory
$exe=".exe"
}
$ret=0
if (Test-Path "$basedir/node$exe") {
# Support pipeline input
if ($MyInvocation.ExpectingInput) {
$input | & "$basedir/node$exe" "$basedir/../esbuild/bin/esbuild" $args
} else {
& "$basedir/node$exe" "$basedir/../esbuild/bin/esbuild" $args
}
$ret=$LASTEXITCODE
} else {
# Support pipeline input
if ($MyInvocation.ExpectingInput) {
$input | & "node$exe" "$basedir/../esbuild/bin/esbuild" $args
} else {
& "node$exe" "$basedir/../esbuild/bin/esbuild" $args
}
$ret=$LASTEXITCODE
}
exit $ret

16
node_modules/.bin/jiti generated vendored Normal file
View File

@ -0,0 +1,16 @@
#!/bin/sh
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
case `uname` in
*CYGWIN*|*MINGW*|*MSYS*)
if command -v cygpath > /dev/null 2>&1; then
basedir=`cygpath -w "$basedir"`
fi
;;
esac
if [ -x "$basedir/node" ]; then
exec "$basedir/node" "$basedir/../jiti/lib/jiti-cli.mjs" "$@"
else
exec node "$basedir/../jiti/lib/jiti-cli.mjs" "$@"
fi

17
node_modules/.bin/jiti.cmd generated vendored Normal file
View File

@ -0,0 +1,17 @@
@ECHO off
GOTO start
:find_dp0
SET dp0=%~dp0
EXIT /b
:start
SETLOCAL
CALL :find_dp0
IF EXIST "%dp0%\node.exe" (
SET "_prog=%dp0%\node.exe"
) ELSE (
SET "_prog=node"
SET PATHEXT=%PATHEXT:;.JS;=;%
)
endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\jiti\lib\jiti-cli.mjs" %*

28
node_modules/.bin/jiti.ps1 generated vendored Normal file
View File

@ -0,0 +1,28 @@
#!/usr/bin/env pwsh
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
$exe=""
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
# Fix case when both the Windows and Linux builds of Node
# are installed in the same directory
$exe=".exe"
}
$ret=0
if (Test-Path "$basedir/node$exe") {
# Support pipeline input
if ($MyInvocation.ExpectingInput) {
$input | & "$basedir/node$exe" "$basedir/../jiti/lib/jiti-cli.mjs" $args
} else {
& "$basedir/node$exe" "$basedir/../jiti/lib/jiti-cli.mjs" $args
}
$ret=$LASTEXITCODE
} else {
# Support pipeline input
if ($MyInvocation.ExpectingInput) {
$input | & "node$exe" "$basedir/../jiti/lib/jiti-cli.mjs" $args
} else {
& "node$exe" "$basedir/../jiti/lib/jiti-cli.mjs" $args
}
$ret=$LASTEXITCODE
}
exit $ret

16
node_modules/.bin/jsesc generated vendored Normal file
View File

@ -0,0 +1,16 @@
#!/bin/sh
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
case `uname` in
*CYGWIN*|*MINGW*|*MSYS*)
if command -v cygpath > /dev/null 2>&1; then
basedir=`cygpath -w "$basedir"`
fi
;;
esac
if [ -x "$basedir/node" ]; then
exec "$basedir/node" "$basedir/../jsesc/bin/jsesc" "$@"
else
exec node "$basedir/../jsesc/bin/jsesc" "$@"
fi

17
node_modules/.bin/jsesc.cmd generated vendored Normal file
View File

@ -0,0 +1,17 @@
@ECHO off
GOTO start
:find_dp0
SET dp0=%~dp0
EXIT /b
:start
SETLOCAL
CALL :find_dp0
IF EXIST "%dp0%\node.exe" (
SET "_prog=%dp0%\node.exe"
) ELSE (
SET "_prog=node"
SET PATHEXT=%PATHEXT:;.JS;=;%
)
endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\jsesc\bin\jsesc" %*

28
node_modules/.bin/jsesc.ps1 generated vendored Normal file
View File

@ -0,0 +1,28 @@
#!/usr/bin/env pwsh
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
$exe=""
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
# Fix case when both the Windows and Linux builds of Node
# are installed in the same directory
$exe=".exe"
}
$ret=0
if (Test-Path "$basedir/node$exe") {
# Support pipeline input
if ($MyInvocation.ExpectingInput) {
$input | & "$basedir/node$exe" "$basedir/../jsesc/bin/jsesc" $args
} else {
& "$basedir/node$exe" "$basedir/../jsesc/bin/jsesc" $args
}
$ret=$LASTEXITCODE
} else {
# Support pipeline input
if ($MyInvocation.ExpectingInput) {
$input | & "node$exe" "$basedir/../jsesc/bin/jsesc" $args
} else {
& "node$exe" "$basedir/../jsesc/bin/jsesc" $args
}
$ret=$LASTEXITCODE
}
exit $ret

16
node_modules/.bin/json5 generated vendored Normal file
View File

@ -0,0 +1,16 @@
#!/bin/sh
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
case `uname` in
*CYGWIN*|*MINGW*|*MSYS*)
if command -v cygpath > /dev/null 2>&1; then
basedir=`cygpath -w "$basedir"`
fi
;;
esac
if [ -x "$basedir/node" ]; then
exec "$basedir/node" "$basedir/../json5/lib/cli.js" "$@"
else
exec node "$basedir/../json5/lib/cli.js" "$@"
fi

17
node_modules/.bin/json5.cmd generated vendored Normal file
View File

@ -0,0 +1,17 @@
@ECHO off
GOTO start
:find_dp0
SET dp0=%~dp0
EXIT /b
:start
SETLOCAL
CALL :find_dp0
IF EXIST "%dp0%\node.exe" (
SET "_prog=%dp0%\node.exe"
) ELSE (
SET "_prog=node"
SET PATHEXT=%PATHEXT:;.JS;=;%
)
endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\json5\lib\cli.js" %*

28
node_modules/.bin/json5.ps1 generated vendored Normal file
View File

@ -0,0 +1,28 @@
#!/usr/bin/env pwsh
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
$exe=""
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
# Fix case when both the Windows and Linux builds of Node
# are installed in the same directory
$exe=".exe"
}
$ret=0
if (Test-Path "$basedir/node$exe") {
# Support pipeline input
if ($MyInvocation.ExpectingInput) {
$input | & "$basedir/node$exe" "$basedir/../json5/lib/cli.js" $args
} else {
& "$basedir/node$exe" "$basedir/../json5/lib/cli.js" $args
}
$ret=$LASTEXITCODE
} else {
# Support pipeline input
if ($MyInvocation.ExpectingInput) {
$input | & "node$exe" "$basedir/../json5/lib/cli.js" $args
} else {
& "node$exe" "$basedir/../json5/lib/cli.js" $args
}
$ret=$LASTEXITCODE
}
exit $ret

16
node_modules/.bin/marked generated vendored Normal file
View File

@ -0,0 +1,16 @@
#!/bin/sh
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
case `uname` in
*CYGWIN*|*MINGW*|*MSYS*)
if command -v cygpath > /dev/null 2>&1; then
basedir=`cygpath -w "$basedir"`
fi
;;
esac
if [ -x "$basedir/node" ]; then
exec "$basedir/node" "$basedir/../marked/bin/marked.js" "$@"
else
exec node "$basedir/../marked/bin/marked.js" "$@"
fi

17
node_modules/.bin/marked.cmd generated vendored Normal file
View File

@ -0,0 +1,17 @@
@ECHO off
GOTO start
:find_dp0
SET dp0=%~dp0
EXIT /b
:start
SETLOCAL
CALL :find_dp0
IF EXIST "%dp0%\node.exe" (
SET "_prog=%dp0%\node.exe"
) ELSE (
SET "_prog=node"
SET PATHEXT=%PATHEXT:;.JS;=;%
)
endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\marked\bin\marked.js" %*

28
node_modules/.bin/marked.ps1 generated vendored Normal file
View File

@ -0,0 +1,28 @@
#!/usr/bin/env pwsh
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
$exe=""
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
# Fix case when both the Windows and Linux builds of Node
# are installed in the same directory
$exe=".exe"
}
$ret=0
if (Test-Path "$basedir/node$exe") {
# Support pipeline input
if ($MyInvocation.ExpectingInput) {
$input | & "$basedir/node$exe" "$basedir/../marked/bin/marked.js" $args
} else {
& "$basedir/node$exe" "$basedir/../marked/bin/marked.js" $args
}
$ret=$LASTEXITCODE
} else {
# Support pipeline input
if ($MyInvocation.ExpectingInput) {
$input | & "node$exe" "$basedir/../marked/bin/marked.js" $args
} else {
& "node$exe" "$basedir/../marked/bin/marked.js" $args
}
$ret=$LASTEXITCODE
}
exit $ret

16
node_modules/.bin/nanoid generated vendored Normal file
View File

@ -0,0 +1,16 @@
#!/bin/sh
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
case `uname` in
*CYGWIN*|*MINGW*|*MSYS*)
if command -v cygpath > /dev/null 2>&1; then
basedir=`cygpath -w "$basedir"`
fi
;;
esac
if [ -x "$basedir/node" ]; then
exec "$basedir/node" "$basedir/../nanoid/bin/nanoid.cjs" "$@"
else
exec node "$basedir/../nanoid/bin/nanoid.cjs" "$@"
fi

17
node_modules/.bin/nanoid.cmd generated vendored Normal file
View File

@ -0,0 +1,17 @@
@ECHO off
GOTO start
:find_dp0
SET dp0=%~dp0
EXIT /b
:start
SETLOCAL
CALL :find_dp0
IF EXIST "%dp0%\node.exe" (
SET "_prog=%dp0%\node.exe"
) ELSE (
SET "_prog=node"
SET PATHEXT=%PATHEXT:;.JS;=;%
)
endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\nanoid\bin\nanoid.cjs" %*

28
node_modules/.bin/nanoid.ps1 generated vendored Normal file
View File

@ -0,0 +1,28 @@
#!/usr/bin/env pwsh
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
$exe=""
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
# Fix case when both the Windows and Linux builds of Node
# are installed in the same directory
$exe=".exe"
}
$ret=0
if (Test-Path "$basedir/node$exe") {
# Support pipeline input
if ($MyInvocation.ExpectingInput) {
$input | & "$basedir/node$exe" "$basedir/../nanoid/bin/nanoid.cjs" $args
} else {
& "$basedir/node$exe" "$basedir/../nanoid/bin/nanoid.cjs" $args
}
$ret=$LASTEXITCODE
} else {
# Support pipeline input
if ($MyInvocation.ExpectingInput) {
$input | & "node$exe" "$basedir/../nanoid/bin/nanoid.cjs" $args
} else {
& "node$exe" "$basedir/../nanoid/bin/nanoid.cjs" $args
}
$ret=$LASTEXITCODE
}
exit $ret

16
node_modules/.bin/parser generated vendored Normal file
View File

@ -0,0 +1,16 @@
#!/bin/sh
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
case `uname` in
*CYGWIN*|*MINGW*|*MSYS*)
if command -v cygpath > /dev/null 2>&1; then
basedir=`cygpath -w "$basedir"`
fi
;;
esac
if [ -x "$basedir/node" ]; then
exec "$basedir/node" "$basedir/../@babel/parser/bin/babel-parser.js" "$@"
else
exec node "$basedir/../@babel/parser/bin/babel-parser.js" "$@"
fi

17
node_modules/.bin/parser.cmd generated vendored Normal file
View File

@ -0,0 +1,17 @@
@ECHO off
GOTO start
:find_dp0
SET dp0=%~dp0
EXIT /b
:start
SETLOCAL
CALL :find_dp0
IF EXIST "%dp0%\node.exe" (
SET "_prog=%dp0%\node.exe"
) ELSE (
SET "_prog=node"
SET PATHEXT=%PATHEXT:;.JS;=;%
)
endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\@babel\parser\bin\babel-parser.js" %*

28
node_modules/.bin/parser.ps1 generated vendored Normal file
View File

@ -0,0 +1,28 @@
#!/usr/bin/env pwsh
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
$exe=""
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
# Fix case when both the Windows and Linux builds of Node
# are installed in the same directory
$exe=".exe"
}
$ret=0
if (Test-Path "$basedir/node$exe") {
# Support pipeline input
if ($MyInvocation.ExpectingInput) {
$input | & "$basedir/node$exe" "$basedir/../@babel/parser/bin/babel-parser.js" $args
} else {
& "$basedir/node$exe" "$basedir/../@babel/parser/bin/babel-parser.js" $args
}
$ret=$LASTEXITCODE
} else {
# Support pipeline input
if ($MyInvocation.ExpectingInput) {
$input | & "node$exe" "$basedir/../@babel/parser/bin/babel-parser.js" $args
} else {
& "node$exe" "$basedir/../@babel/parser/bin/babel-parser.js" $args
}
$ret=$LASTEXITCODE
}
exit $ret

16
node_modules/.bin/rollup generated vendored Normal file
View File

@ -0,0 +1,16 @@
#!/bin/sh
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
case `uname` in
*CYGWIN*|*MINGW*|*MSYS*)
if command -v cygpath > /dev/null 2>&1; then
basedir=`cygpath -w "$basedir"`
fi
;;
esac
if [ -x "$basedir/node" ]; then
exec "$basedir/node" "$basedir/../rollup/dist/bin/rollup" "$@"
else
exec node "$basedir/../rollup/dist/bin/rollup" "$@"
fi

17
node_modules/.bin/rollup.cmd generated vendored Normal file
View File

@ -0,0 +1,17 @@
@ECHO off
GOTO start
:find_dp0
SET dp0=%~dp0
EXIT /b
:start
SETLOCAL
CALL :find_dp0
IF EXIST "%dp0%\node.exe" (
SET "_prog=%dp0%\node.exe"
) ELSE (
SET "_prog=node"
SET PATHEXT=%PATHEXT:;.JS;=;%
)
endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\rollup\dist\bin\rollup" %*

28
node_modules/.bin/rollup.ps1 generated vendored Normal file
View File

@ -0,0 +1,28 @@
#!/usr/bin/env pwsh
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
$exe=""
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
# Fix case when both the Windows and Linux builds of Node
# are installed in the same directory
$exe=".exe"
}
$ret=0
if (Test-Path "$basedir/node$exe") {
# Support pipeline input
if ($MyInvocation.ExpectingInput) {
$input | & "$basedir/node$exe" "$basedir/../rollup/dist/bin/rollup" $args
} else {
& "$basedir/node$exe" "$basedir/../rollup/dist/bin/rollup" $args
}
$ret=$LASTEXITCODE
} else {
# Support pipeline input
if ($MyInvocation.ExpectingInput) {
$input | & "node$exe" "$basedir/../rollup/dist/bin/rollup" $args
} else {
& "node$exe" "$basedir/../rollup/dist/bin/rollup" $args
}
$ret=$LASTEXITCODE
}
exit $ret

16
node_modules/.bin/tsc generated vendored Normal file
View File

@ -0,0 +1,16 @@
#!/bin/sh
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
case `uname` in
*CYGWIN*|*MINGW*|*MSYS*)
if command -v cygpath > /dev/null 2>&1; then
basedir=`cygpath -w "$basedir"`
fi
;;
esac
if [ -x "$basedir/node" ]; then
exec "$basedir/node" "$basedir/../typescript/bin/tsc" "$@"
else
exec node "$basedir/../typescript/bin/tsc" "$@"
fi

17
node_modules/.bin/tsc.cmd generated vendored Normal file
View File

@ -0,0 +1,17 @@
@ECHO off
GOTO start
:find_dp0
SET dp0=%~dp0
EXIT /b
:start
SETLOCAL
CALL :find_dp0
IF EXIST "%dp0%\node.exe" (
SET "_prog=%dp0%\node.exe"
) ELSE (
SET "_prog=node"
SET PATHEXT=%PATHEXT:;.JS;=;%
)
endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\typescript\bin\tsc" %*

28
node_modules/.bin/tsc.ps1 generated vendored Normal file
View File

@ -0,0 +1,28 @@
#!/usr/bin/env pwsh
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
$exe=""
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
# Fix case when both the Windows and Linux builds of Node
# are installed in the same directory
$exe=".exe"
}
$ret=0
if (Test-Path "$basedir/node$exe") {
# Support pipeline input
if ($MyInvocation.ExpectingInput) {
$input | & "$basedir/node$exe" "$basedir/../typescript/bin/tsc" $args
} else {
& "$basedir/node$exe" "$basedir/../typescript/bin/tsc" $args
}
$ret=$LASTEXITCODE
} else {
# Support pipeline input
if ($MyInvocation.ExpectingInput) {
$input | & "node$exe" "$basedir/../typescript/bin/tsc" $args
} else {
& "node$exe" "$basedir/../typescript/bin/tsc" $args
}
$ret=$LASTEXITCODE
}
exit $ret

16
node_modules/.bin/tsserver generated vendored Normal file
View File

@ -0,0 +1,16 @@
#!/bin/sh
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
case `uname` in
*CYGWIN*|*MINGW*|*MSYS*)
if command -v cygpath > /dev/null 2>&1; then
basedir=`cygpath -w "$basedir"`
fi
;;
esac
if [ -x "$basedir/node" ]; then
exec "$basedir/node" "$basedir/../typescript/bin/tsserver" "$@"
else
exec node "$basedir/../typescript/bin/tsserver" "$@"
fi

17
node_modules/.bin/tsserver.cmd generated vendored Normal file
View File

@ -0,0 +1,17 @@
@ECHO off
GOTO start
:find_dp0
SET dp0=%~dp0
EXIT /b
:start
SETLOCAL
CALL :find_dp0
IF EXIST "%dp0%\node.exe" (
SET "_prog=%dp0%\node.exe"
) ELSE (
SET "_prog=node"
SET PATHEXT=%PATHEXT:;.JS;=;%
)
endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\typescript\bin\tsserver" %*

28
node_modules/.bin/tsserver.ps1 generated vendored Normal file
View File

@ -0,0 +1,28 @@
#!/usr/bin/env pwsh
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
$exe=""
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
# Fix case when both the Windows and Linux builds of Node
# are installed in the same directory
$exe=".exe"
}
$ret=0
if (Test-Path "$basedir/node$exe") {
# Support pipeline input
if ($MyInvocation.ExpectingInput) {
$input | & "$basedir/node$exe" "$basedir/../typescript/bin/tsserver" $args
} else {
& "$basedir/node$exe" "$basedir/../typescript/bin/tsserver" $args
}
$ret=$LASTEXITCODE
} else {
# Support pipeline input
if ($MyInvocation.ExpectingInput) {
$input | & "node$exe" "$basedir/../typescript/bin/tsserver" $args
} else {
& "node$exe" "$basedir/../typescript/bin/tsserver" $args
}
$ret=$LASTEXITCODE
}
exit $ret

16
node_modules/.bin/vite generated vendored Normal file
View File

@ -0,0 +1,16 @@
#!/bin/sh
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
case `uname` in
*CYGWIN*|*MINGW*|*MSYS*)
if command -v cygpath > /dev/null 2>&1; then
basedir=`cygpath -w "$basedir"`
fi
;;
esac
if [ -x "$basedir/node" ]; then
exec "$basedir/node" "$basedir/../vite/bin/vite.js" "$@"
else
exec node "$basedir/../vite/bin/vite.js" "$@"
fi

17
node_modules/.bin/vite.cmd generated vendored Normal file
View File

@ -0,0 +1,17 @@
@ECHO off
GOTO start
:find_dp0
SET dp0=%~dp0
EXIT /b
:start
SETLOCAL
CALL :find_dp0
IF EXIST "%dp0%\node.exe" (
SET "_prog=%dp0%\node.exe"
) ELSE (
SET "_prog=node"
SET PATHEXT=%PATHEXT:;.JS;=;%
)
endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\vite\bin\vite.js" %*

28
node_modules/.bin/vite.ps1 generated vendored Normal file
View File

@ -0,0 +1,28 @@
#!/usr/bin/env pwsh
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
$exe=""
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
# Fix case when both the Windows and Linux builds of Node
# are installed in the same directory
$exe=".exe"
}
$ret=0
if (Test-Path "$basedir/node$exe") {
# Support pipeline input
if ($MyInvocation.ExpectingInput) {
$input | & "$basedir/node$exe" "$basedir/../vite/bin/vite.js" $args
} else {
& "$basedir/node$exe" "$basedir/../vite/bin/vite.js" $args
}
$ret=$LASTEXITCODE
} else {
# Support pipeline input
if ($MyInvocation.ExpectingInput) {
$input | & "node$exe" "$basedir/../vite/bin/vite.js" $args
} else {
& "node$exe" "$basedir/../vite/bin/vite.js" $args
}
$ret=$LASTEXITCODE
}
exit $ret

16
node_modules/.bin/vue-tsc generated vendored Normal file
View File

@ -0,0 +1,16 @@
#!/bin/sh
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
case `uname` in
*CYGWIN*|*MINGW*|*MSYS*)
if command -v cygpath > /dev/null 2>&1; then
basedir=`cygpath -w "$basedir"`
fi
;;
esac
if [ -x "$basedir/node" ]; then
exec "$basedir/node" "$basedir/../vue-tsc/bin/vue-tsc.js" "$@"
else
exec node "$basedir/../vue-tsc/bin/vue-tsc.js" "$@"
fi

17
node_modules/.bin/vue-tsc.cmd generated vendored Normal file
View File

@ -0,0 +1,17 @@
@ECHO off
GOTO start
:find_dp0
SET dp0=%~dp0
EXIT /b
:start
SETLOCAL
CALL :find_dp0
IF EXIST "%dp0%\node.exe" (
SET "_prog=%dp0%\node.exe"
) ELSE (
SET "_prog=node"
SET PATHEXT=%PATHEXT:;.JS;=;%
)
endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\vue-tsc\bin\vue-tsc.js" %*

28
node_modules/.bin/vue-tsc.ps1 generated vendored Normal file
View File

@ -0,0 +1,28 @@
#!/usr/bin/env pwsh
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
$exe=""
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
# Fix case when both the Windows and Linux builds of Node
# are installed in the same directory
$exe=".exe"
}
$ret=0
if (Test-Path "$basedir/node$exe") {
# Support pipeline input
if ($MyInvocation.ExpectingInput) {
$input | & "$basedir/node$exe" "$basedir/../vue-tsc/bin/vue-tsc.js" $args
} else {
& "$basedir/node$exe" "$basedir/../vue-tsc/bin/vue-tsc.js" $args
}
$ret=$LASTEXITCODE
} else {
# Support pipeline input
if ($MyInvocation.ExpectingInput) {
$input | & "node$exe" "$basedir/../vue-tsc/bin/vue-tsc.js" $args
} else {
& "node$exe" "$basedir/../vue-tsc/bin/vue-tsc.js" $args
}
$ret=$LASTEXITCODE
}
exit $ret

16
node_modules/.bin/yaml generated vendored Normal file
View File

@ -0,0 +1,16 @@
#!/bin/sh
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
case `uname` in
*CYGWIN*|*MINGW*|*MSYS*)
if command -v cygpath > /dev/null 2>&1; then
basedir=`cygpath -w "$basedir"`
fi
;;
esac
if [ -x "$basedir/node" ]; then
exec "$basedir/node" "$basedir/../yaml/bin.mjs" "$@"
else
exec node "$basedir/../yaml/bin.mjs" "$@"
fi

17
node_modules/.bin/yaml.cmd generated vendored Normal file
View File

@ -0,0 +1,17 @@
@ECHO off
GOTO start
:find_dp0
SET dp0=%~dp0
EXIT /b
:start
SETLOCAL
CALL :find_dp0
IF EXIST "%dp0%\node.exe" (
SET "_prog=%dp0%\node.exe"
) ELSE (
SET "_prog=node"
SET PATHEXT=%PATHEXT:;.JS;=;%
)
endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\yaml\bin.mjs" %*

28
node_modules/.bin/yaml.ps1 generated vendored Normal file
View File

@ -0,0 +1,28 @@
#!/usr/bin/env pwsh
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
$exe=""
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
# Fix case when both the Windows and Linux builds of Node
# are installed in the same directory
$exe=".exe"
}
$ret=0
if (Test-Path "$basedir/node$exe") {
# Support pipeline input
if ($MyInvocation.ExpectingInput) {
$input | & "$basedir/node$exe" "$basedir/../yaml/bin.mjs" $args
} else {
& "$basedir/node$exe" "$basedir/../yaml/bin.mjs" $args
}
$ret=$LASTEXITCODE
} else {
# Support pipeline input
if ($MyInvocation.ExpectingInput) {
$input | & "node$exe" "$basedir/../yaml/bin.mjs" $args
} else {
& "node$exe" "$basedir/../yaml/bin.mjs" $args
}
$ret=$LASTEXITCODE
}
exit $ret

1443
node_modules/.package-lock.json generated vendored Normal file

File diff suppressed because it is too large Load Diff

22
node_modules/@babel/generator/LICENSE generated vendored Normal file
View File

@ -0,0 +1,22 @@
MIT License
Copyright (c) 2014-present Sebastian McKenzie and other contributors
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.

19
node_modules/@babel/generator/README.md generated vendored Normal file
View File

@ -0,0 +1,19 @@
# @babel/generator
> Turns an AST into code.
See our website [@babel/generator](https://babeljs.io/docs/babel-generator) for more information or the [issues](https://github.com/babel/babel/issues?utf8=%E2%9C%93&q=is%3Aissue+label%3A%22pkg%3A%20generator%22+is%3Aopen) associated with this package.
## Install
Using npm:
```sh
npm install --save-dev @babel/generator
```
or using yarn:
```sh
yarn add @babel/generator --dev
```

244
node_modules/@babel/generator/lib/buffer.js generated vendored Normal file
View File

@ -0,0 +1,244 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
const spaceIndents = [];
for (let i = 0; i < 32; i++) {
spaceIndents.push(" ".repeat(i * 2));
}
class Buffer {
constructor(map, indentChar) {
this._map = null;
this._buf = "";
this._str = "";
this._appendCount = 0;
this._last = 0;
this._canMarkIdName = true;
this._indentChar = "";
this._queuedChar = 0;
this._position = {
line: 1,
column: 0
};
this._sourcePosition = {
identifierName: undefined,
identifierNamePos: undefined,
line: undefined,
column: undefined,
filename: undefined
};
this._map = map;
this._indentChar = indentChar;
}
get() {
const {
_map,
_last
} = this;
if (this._queuedChar !== 32) {
this._flush();
}
const code = _last === 10 ? (this._buf + this._str).trimRight() : this._buf + this._str;
if (_map === null) {
return {
code: code,
decodedMap: undefined,
map: null,
rawMappings: undefined
};
}
const result = {
code: code,
decodedMap: _map.getDecoded(),
get __mergedMap() {
return this.map;
},
get map() {
const resultMap = _map.get();
result.map = resultMap;
return resultMap;
},
set map(value) {
Object.defineProperty(result, "map", {
value,
writable: true
});
},
get rawMappings() {
const mappings = _map.getRawMappings();
result.rawMappings = mappings;
return mappings;
},
set rawMappings(value) {
Object.defineProperty(result, "rawMappings", {
value,
writable: true
});
}
};
return result;
}
append(str, maybeNewline) {
this._flush();
this._append(str, maybeNewline);
}
appendChar(char) {
this._flush();
this._appendChar(char, 1, true);
}
queue(char) {
this._flush();
this._queuedChar = char;
}
_flush() {
const queuedChar = this._queuedChar;
if (queuedChar !== 0) {
this._appendChar(queuedChar, 1, true);
this._queuedChar = 0;
}
}
_appendChar(char, repeat, useSourcePos) {
this._last = char;
if (char === -1) {
const indent = repeat >= 64 ? this._indentChar.repeat(repeat) : spaceIndents[repeat / 2];
this._str += indent;
} else {
this._str += repeat > 1 ? String.fromCharCode(char).repeat(repeat) : String.fromCharCode(char);
}
const isSpace = char === 32;
const position = this._position;
if (char !== 10) {
if (this._map) {
const sourcePos = this._sourcePosition;
if (useSourcePos && sourcePos) {
this._map.mark(position, sourcePos.line, sourcePos.column, isSpace ? undefined : sourcePos.identifierName, isSpace ? undefined : sourcePos.identifierNamePos, sourcePos.filename);
if (!isSpace && this._canMarkIdName) {
sourcePos.identifierName = undefined;
sourcePos.identifierNamePos = undefined;
}
} else {
this._map.mark(position);
}
}
position.column += repeat;
} else {
position.line++;
position.column = 0;
}
}
_append(str, maybeNewline) {
const len = str.length;
const position = this._position;
const sourcePos = this._sourcePosition;
this._last = -1;
if (++this._appendCount > 4096) {
+this._str;
this._buf += this._str;
this._str = str;
this._appendCount = 0;
} else {
this._str += str;
}
const hasMap = this._map !== null;
if (!maybeNewline && !hasMap) {
position.column += len;
return;
}
const {
column,
identifierName,
identifierNamePos,
filename
} = sourcePos;
let line = sourcePos.line;
if ((identifierName != null || identifierNamePos != null) && this._canMarkIdName) {
sourcePos.identifierName = undefined;
sourcePos.identifierNamePos = undefined;
}
let i = str.indexOf("\n");
let last = 0;
if (hasMap && i !== 0) {
this._map.mark(position, line, column, identifierName, identifierNamePos, filename);
}
while (i !== -1) {
position.line++;
position.column = 0;
last = i + 1;
if (last < len && line !== undefined) {
line++;
if (hasMap) {
this._map.mark(position, line, 0, undefined, undefined, filename);
}
}
i = str.indexOf("\n", last);
}
position.column += len - last;
}
removeLastSemicolon() {
if (this._queuedChar === 59) {
this._queuedChar = 0;
}
}
getLastChar(checkQueue) {
if (!checkQueue) {
return this._last;
}
const queuedChar = this._queuedChar;
return queuedChar !== 0 ? queuedChar : this._last;
}
getNewlineCount() {
return this._queuedChar === 0 && this._last === 10 ? 1 : 0;
}
hasContent() {
return this._last !== 0;
}
exactSource(loc, cb) {
if (!this._map) {
cb();
return;
}
this.source("start", loc);
const identifierName = loc.identifierName;
const sourcePos = this._sourcePosition;
if (identifierName != null) {
this._canMarkIdName = false;
sourcePos.identifierName = identifierName;
}
cb();
if (identifierName != null) {
this._canMarkIdName = true;
sourcePos.identifierName = undefined;
sourcePos.identifierNamePos = undefined;
}
this.source("end", loc);
}
source(prop, loc) {
if (!this._map) return;
this._normalizePosition(prop, loc, 0);
}
sourceWithOffset(prop, loc, columnOffset) {
if (!this._map) return;
this._normalizePosition(prop, loc, columnOffset);
}
_normalizePosition(prop, loc, columnOffset) {
this._flush();
const pos = loc[prop];
const target = this._sourcePosition;
if (pos) {
target.line = pos.line;
target.column = Math.max(pos.column + columnOffset, 0);
target.filename = loc.filename;
}
}
getCurrentColumn() {
return this._position.column + (this._queuedChar ? 1 : 0);
}
getCurrentLine() {
return this._position.line;
}
}
exports.default = Buffer;
//# sourceMappingURL=buffer.js.map

1
node_modules/@babel/generator/lib/buffer.js.map generated vendored Normal file

File diff suppressed because one or more lines are too long

86
node_modules/@babel/generator/lib/generators/base.js generated vendored Normal file
View File

@ -0,0 +1,86 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.BlockStatement = BlockStatement;
exports.Directive = Directive;
exports.DirectiveLiteral = DirectiveLiteral;
exports.File = File;
exports.InterpreterDirective = InterpreterDirective;
exports.Placeholder = Placeholder;
exports.Program = Program;
function File(node) {
if (node.program) {
this.print(node.program.interpreter);
}
this.print(node.program);
}
function Program(node) {
var _node$directives;
this.printInnerComments(false);
const directivesLen = (_node$directives = node.directives) == null ? void 0 : _node$directives.length;
if (directivesLen) {
var _node$directives$trai;
const newline = node.body.length ? 2 : 1;
this.printSequence(node.directives, undefined, undefined, newline);
if (!((_node$directives$trai = node.directives[directivesLen - 1].trailingComments) != null && _node$directives$trai.length)) {
this.newline(newline);
}
}
this.printSequence(node.body);
}
function BlockStatement(node) {
var _node$directives2;
this.tokenChar(123);
const oldNoLineTerminatorAfterNode = this.enterDelimited();
const directivesLen = (_node$directives2 = node.directives) == null ? void 0 : _node$directives2.length;
if (directivesLen) {
var _node$directives$trai2;
const newline = node.body.length ? 2 : 1;
this.printSequence(node.directives, true, true, newline);
if (!((_node$directives$trai2 = node.directives[directivesLen - 1].trailingComments) != null && _node$directives$trai2.length)) {
this.newline(newline);
}
}
this.printSequence(node.body, true, true);
this._noLineTerminatorAfterNode = oldNoLineTerminatorAfterNode;
this.rightBrace(node);
}
function Directive(node) {
this.print(node.value);
this.semicolon();
}
const unescapedSingleQuoteRE = /(?:^|[^\\])(?:\\\\)*'/;
const unescapedDoubleQuoteRE = /(?:^|[^\\])(?:\\\\)*"/;
function DirectiveLiteral(node) {
const raw = this.getPossibleRaw(node);
if (!this.format.minified && raw !== undefined) {
this.token(raw);
return;
}
const {
value
} = node;
if (!unescapedDoubleQuoteRE.test(value)) {
this.token(`"${value}"`);
} else if (!unescapedSingleQuoteRE.test(value)) {
this.token(`'${value}'`);
} else {
throw new Error("Malformed AST: it is not possible to print a directive containing" + " both unescaped single and double quotes.");
}
}
function InterpreterDirective(node) {
this.token(`#!${node.value}`);
this._newline();
}
function Placeholder(node) {
this.token("%%");
this.print(node.name);
this.token("%%");
if (node.expectedNode === "Statement") {
this.semicolon();
}
}
//# sourceMappingURL=base.js.map

File diff suppressed because one or more lines are too long

215
node_modules/@babel/generator/lib/generators/classes.js generated vendored Normal file
View File

@ -0,0 +1,215 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.ClassAccessorProperty = ClassAccessorProperty;
exports.ClassBody = ClassBody;
exports.ClassExpression = exports.ClassDeclaration = ClassDeclaration;
exports.ClassMethod = ClassMethod;
exports.ClassPrivateMethod = ClassPrivateMethod;
exports.ClassPrivateProperty = ClassPrivateProperty;
exports.ClassProperty = ClassProperty;
exports.StaticBlock = StaticBlock;
exports._classMethodHead = _classMethodHead;
var _t = require("@babel/types");
var _expressions = require("./expressions.js");
var _typescript = require("./typescript.js");
var _flow = require("./flow.js");
var _methods = require("./methods.js");
const {
isExportDefaultDeclaration,
isExportNamedDeclaration
} = _t;
function ClassDeclaration(node, parent) {
const inExport = isExportDefaultDeclaration(parent) || isExportNamedDeclaration(parent);
if (!inExport || !_expressions._shouldPrintDecoratorsBeforeExport.call(this, parent)) {
this.printJoin(node.decorators);
}
if (node.declare) {
this.word("declare");
this.space();
}
if (node.abstract) {
this.word("abstract");
this.space();
}
this.word("class");
if (node.id) {
this.space();
this.print(node.id);
}
this.print(node.typeParameters);
if (node.superClass) {
this.space();
this.word("extends");
this.space();
this.print(node.superClass);
this.print(node.superTypeParameters);
}
if (node.implements) {
this.space();
this.word("implements");
this.space();
this.printList(node.implements);
}
this.space();
this.print(node.body);
}
function ClassBody(node) {
this.tokenChar(123);
if (node.body.length === 0) {
this.tokenChar(125);
} else {
const separator = classBodyEmptySemicolonsPrinter(this, node);
separator == null || separator(-1);
const oldNoLineTerminatorAfterNode = this.enterDelimited();
this.printJoin(node.body, true, true, separator, true, true);
this._noLineTerminatorAfterNode = oldNoLineTerminatorAfterNode;
if (!this.endsWith(10)) this.newline();
this.rightBrace(node);
}
}
function classBodyEmptySemicolonsPrinter(printer, node) {
if (!printer.tokenMap || node.start == null || node.end == null) {
return null;
}
const indexes = printer.tokenMap.getIndexes(node);
if (!indexes) return null;
let k = 1;
let occurrenceCount = 0;
let nextLocIndex = 0;
const advanceNextLocIndex = () => {
while (nextLocIndex < node.body.length && node.body[nextLocIndex].start == null) {
nextLocIndex++;
}
};
advanceNextLocIndex();
return i => {
if (nextLocIndex <= i) {
nextLocIndex = i + 1;
advanceNextLocIndex();
}
const end = nextLocIndex === node.body.length ? node.end : node.body[nextLocIndex].start;
let tok;
while (k < indexes.length && printer.tokenMap.matchesOriginal(tok = printer._tokens[indexes[k]], ";") && tok.start < end) {
printer.tokenChar(59, occurrenceCount++);
k++;
}
};
}
function ClassProperty(node) {
this.printJoin(node.decorators);
if (!node.static && !this.format.preserveFormat) {
var _node$key$loc;
const endLine = (_node$key$loc = node.key.loc) == null || (_node$key$loc = _node$key$loc.end) == null ? void 0 : _node$key$loc.line;
if (endLine) this.catchUp(endLine);
}
_typescript._tsPrintClassMemberModifiers.call(this, node);
if (node.computed) {
this.tokenChar(91);
this.print(node.key);
this.tokenChar(93);
} else {
_flow._variance.call(this, node);
this.print(node.key);
}
if (node.optional) {
this.tokenChar(63);
}
if (node.definite) {
this.tokenChar(33);
}
this.print(node.typeAnnotation);
if (node.value) {
this.space();
this.tokenChar(61);
this.space();
this.print(node.value);
}
this.semicolon();
}
function ClassAccessorProperty(node) {
var _node$key$loc2;
this.printJoin(node.decorators);
const endLine = (_node$key$loc2 = node.key.loc) == null || (_node$key$loc2 = _node$key$loc2.end) == null ? void 0 : _node$key$loc2.line;
if (endLine) this.catchUp(endLine);
_typescript._tsPrintClassMemberModifiers.call(this, node);
this.word("accessor", true);
this.space();
if (node.computed) {
this.tokenChar(91);
this.print(node.key);
this.tokenChar(93);
} else {
_flow._variance.call(this, node);
this.print(node.key);
}
if (node.optional) {
this.tokenChar(63);
}
if (node.definite) {
this.tokenChar(33);
}
this.print(node.typeAnnotation);
if (node.value) {
this.space();
this.tokenChar(61);
this.space();
this.print(node.value);
}
this.semicolon();
}
function ClassPrivateProperty(node) {
this.printJoin(node.decorators);
_typescript._tsPrintClassMemberModifiers.call(this, node);
this.print(node.key);
if (node.optional) {
this.tokenChar(63);
}
if (node.definite) {
this.tokenChar(33);
}
this.print(node.typeAnnotation);
if (node.value) {
this.space();
this.tokenChar(61);
this.space();
this.print(node.value);
}
this.semicolon();
}
function ClassMethod(node) {
_classMethodHead.call(this, node);
this.space();
this.print(node.body);
}
function ClassPrivateMethod(node) {
_classMethodHead.call(this, node);
this.space();
this.print(node.body);
}
function _classMethodHead(node) {
this.printJoin(node.decorators);
if (!this.format.preserveFormat) {
var _node$key$loc3;
const endLine = (_node$key$loc3 = node.key.loc) == null || (_node$key$loc3 = _node$key$loc3.end) == null ? void 0 : _node$key$loc3.line;
if (endLine) this.catchUp(endLine);
}
_typescript._tsPrintClassMemberModifiers.call(this, node);
_methods._methodHead.call(this, node);
}
function StaticBlock(node) {
this.word("static");
this.space();
this.tokenChar(123);
if (node.body.length === 0) {
this.tokenChar(125);
} else {
this.newline();
this.printSequence(node.body, true);
this.rightBrace(node);
}
}
//# sourceMappingURL=classes.js.map

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,73 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.DecimalLiteral = DecimalLiteral;
exports.Noop = Noop;
exports.RecordExpression = RecordExpression;
exports.TSExpressionWithTypeArguments = TSExpressionWithTypeArguments;
exports.TupleExpression = TupleExpression;
function Noop() {}
function TSExpressionWithTypeArguments(node) {
this.print(node.expression);
this.print(node.typeParameters);
}
function DecimalLiteral(node) {
const raw = this.getPossibleRaw(node);
if (!this.format.minified && raw !== undefined) {
this.word(raw);
return;
}
this.word(node.value + "m");
}
function RecordExpression(node) {
const props = node.properties;
let startToken;
let endToken;
if (this.format.recordAndTupleSyntaxType === "bar") {
startToken = "{|";
endToken = "|}";
} else if (this.format.recordAndTupleSyntaxType !== "hash" && this.format.recordAndTupleSyntaxType != null) {
throw new Error(`The "recordAndTupleSyntaxType" generator option must be "bar" or "hash" (${JSON.stringify(this.format.recordAndTupleSyntaxType)} received).`);
} else {
startToken = "#{";
endToken = "}";
}
this.token(startToken);
if (props.length) {
this.space();
this.printList(props, this.shouldPrintTrailingComma(endToken), true, true);
this.space();
}
this.token(endToken);
}
function TupleExpression(node) {
const elems = node.elements;
const len = elems.length;
let startToken;
let endToken;
if (this.format.recordAndTupleSyntaxType === "bar") {
startToken = "[|";
endToken = "|]";
} else if (this.format.recordAndTupleSyntaxType === "hash") {
startToken = "#[";
endToken = "]";
} else {
throw new Error(`${this.format.recordAndTupleSyntaxType} is not a valid recordAndTuple syntax type`);
}
this.token(startToken);
for (let i = 0; i < elems.length; i++) {
const elem = elems[i];
if (elem) {
if (i > 0) this.space();
this.print(elem);
if (i < len - 1 || this.shouldPrintTrailingComma(endToken)) {
this.token(",", false, i);
}
}
}
this.token(endToken);
}
//# sourceMappingURL=deprecated.js.map

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,309 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.LogicalExpression = exports.AssignmentExpression = AssignmentExpression;
exports.AssignmentPattern = AssignmentPattern;
exports.AwaitExpression = AwaitExpression;
exports.BinaryExpression = BinaryExpression;
exports.BindExpression = BindExpression;
exports.CallExpression = CallExpression;
exports.ConditionalExpression = ConditionalExpression;
exports.Decorator = Decorator;
exports.DoExpression = DoExpression;
exports.EmptyStatement = EmptyStatement;
exports.ExpressionStatement = ExpressionStatement;
exports.Import = Import;
exports.MemberExpression = MemberExpression;
exports.MetaProperty = MetaProperty;
exports.ModuleExpression = ModuleExpression;
exports.NewExpression = NewExpression;
exports.OptionalCallExpression = OptionalCallExpression;
exports.OptionalMemberExpression = OptionalMemberExpression;
exports.ParenthesizedExpression = ParenthesizedExpression;
exports.PrivateName = PrivateName;
exports.SequenceExpression = SequenceExpression;
exports.Super = Super;
exports.ThisExpression = ThisExpression;
exports.UnaryExpression = UnaryExpression;
exports.UpdateExpression = UpdateExpression;
exports.V8IntrinsicIdentifier = V8IntrinsicIdentifier;
exports.YieldExpression = YieldExpression;
exports._shouldPrintDecoratorsBeforeExport = _shouldPrintDecoratorsBeforeExport;
var _t = require("@babel/types");
var _index = require("../node/index.js");
const {
isCallExpression,
isLiteral,
isMemberExpression,
isNewExpression,
isPattern
} = _t;
function UnaryExpression(node) {
const {
operator
} = node;
const firstChar = operator.charCodeAt(0);
if (firstChar >= 97 && firstChar <= 122) {
this.word(operator);
this.space();
} else {
this.tokenChar(firstChar);
}
this.print(node.argument);
}
function DoExpression(node) {
if (node.async) {
this.word("async", true);
this.space();
}
this.word("do");
this.space();
this.print(node.body);
}
function ParenthesizedExpression(node) {
this.tokenChar(40);
const oldNoLineTerminatorAfterNode = this.enterDelimited();
this.print(node.expression, undefined, true);
this._noLineTerminatorAfterNode = oldNoLineTerminatorAfterNode;
this.rightParens(node);
}
function UpdateExpression(node) {
if (node.prefix) {
this.token(node.operator, false, 0, true);
this.print(node.argument);
} else {
this.print(node.argument, true);
this.token(node.operator, false, 0, true);
}
}
function ConditionalExpression(node) {
this.print(node.test);
this.space();
this.tokenChar(63);
this.space();
this.print(node.consequent);
this.space();
this.tokenChar(58);
this.space();
this.print(node.alternate);
}
function NewExpression(node, parent) {
this.word("new");
this.space();
this.print(node.callee);
if (this.format.minified && node.arguments.length === 0 && !node.optional && !isCallExpression(parent, {
callee: node
}) && !isMemberExpression(parent) && !isNewExpression(parent)) {
return;
}
this.print(node.typeArguments);
this.print(node.typeParameters);
if (node.optional) {
this.token("?.");
}
if (node.arguments.length === 0 && this.tokenMap && !this.tokenMap.endMatches(node, ")")) {
return;
}
this.tokenChar(40);
const oldNoLineTerminatorAfterNode = this.enterDelimited();
this.printList(node.arguments, this.shouldPrintTrailingComma(")"), undefined, undefined, undefined, true);
this._noLineTerminatorAfterNode = oldNoLineTerminatorAfterNode;
this.rightParens(node);
}
function SequenceExpression(node) {
this.printList(node.expressions);
}
function ThisExpression() {
this.word("this");
}
function Super() {
this.word("super");
}
function _shouldPrintDecoratorsBeforeExport(node) {
if (typeof this.format.decoratorsBeforeExport === "boolean") {
return this.format.decoratorsBeforeExport;
}
return typeof node.start === "number" && node.start === node.declaration.start;
}
function Decorator(node) {
this.tokenChar(64);
const {
expression
} = node;
this.print(expression);
this.newline();
}
function OptionalMemberExpression(node) {
let {
computed
} = node;
const {
optional,
property
} = node;
this.print(node.object);
if (!computed && isMemberExpression(property)) {
throw new TypeError("Got a MemberExpression for MemberExpression property");
}
if (isLiteral(property) && typeof property.value === "number") {
computed = true;
}
if (optional) {
this.token("?.");
}
if (computed) {
this.tokenChar(91);
this.print(property);
this.tokenChar(93);
} else {
if (!optional) {
this.tokenChar(46);
}
this.print(property);
}
}
function OptionalCallExpression(node) {
this.print(node.callee);
this.print(node.typeParameters);
if (node.optional) {
this.token("?.");
}
this.print(node.typeArguments);
this.tokenChar(40);
const oldNoLineTerminatorAfterNode = this.enterDelimited();
this.printList(node.arguments, undefined, undefined, undefined, undefined, true);
this._noLineTerminatorAfterNode = oldNoLineTerminatorAfterNode;
this.rightParens(node);
}
function CallExpression(node) {
this.print(node.callee);
this.print(node.typeArguments);
this.print(node.typeParameters);
this.tokenChar(40);
const oldNoLineTerminatorAfterNode = this.enterDelimited();
this.printList(node.arguments, this.shouldPrintTrailingComma(")"), undefined, undefined, undefined, true);
this._noLineTerminatorAfterNode = oldNoLineTerminatorAfterNode;
this.rightParens(node);
}
function Import() {
this.word("import");
}
function AwaitExpression(node) {
this.word("await");
this.space();
this.print(node.argument);
}
function YieldExpression(node) {
if (node.delegate) {
this.word("yield", true);
this.tokenChar(42);
if (node.argument) {
this.space();
this.print(node.argument);
}
} else if (node.argument) {
this.word("yield", true);
this.space();
this.print(node.argument);
} else {
this.word("yield");
}
}
function EmptyStatement() {
this.semicolon(true);
}
function ExpressionStatement(node) {
this.tokenContext |= _index.TokenContext.expressionStatement;
this.print(node.expression);
this.semicolon();
}
function AssignmentPattern(node) {
this.print(node.left);
if (node.left.type === "Identifier" || isPattern(node.left)) {
if (node.left.optional) this.tokenChar(63);
this.print(node.left.typeAnnotation);
}
this.space();
this.tokenChar(61);
this.space();
this.print(node.right);
}
function AssignmentExpression(node) {
this.print(node.left);
this.space();
this.token(node.operator, false, 0, true);
this.space();
this.print(node.right);
}
function BinaryExpression(node) {
this.print(node.left);
this.space();
const {
operator
} = node;
if (operator.charCodeAt(0) === 105) {
this.word(operator);
} else {
this.token(operator, false, 0, true);
this.setLastChar(operator.charCodeAt(operator.length - 1));
}
this.space();
this.print(node.right);
}
function BindExpression(node) {
this.print(node.object);
this.token("::");
this.print(node.callee);
}
function MemberExpression(node) {
this.print(node.object);
if (!node.computed && isMemberExpression(node.property)) {
throw new TypeError("Got a MemberExpression for MemberExpression property");
}
let computed = node.computed;
if (isLiteral(node.property) && typeof node.property.value === "number") {
computed = true;
}
if (computed) {
const oldNoLineTerminatorAfterNode = this.enterDelimited();
this.tokenChar(91);
this.print(node.property, undefined, true);
this.tokenChar(93);
this._noLineTerminatorAfterNode = oldNoLineTerminatorAfterNode;
} else {
this.tokenChar(46);
this.print(node.property);
}
}
function MetaProperty(node) {
this.print(node.meta);
this.tokenChar(46);
this.print(node.property);
}
function PrivateName(node) {
this.tokenChar(35);
this.print(node.id);
}
function V8IntrinsicIdentifier(node) {
this.tokenChar(37);
this.word(node.name);
}
function ModuleExpression(node) {
this.word("module", true);
this.space();
this.tokenChar(123);
this.indent();
const {
body
} = node;
if (body.body.length || body.directives.length) {
this.newline();
}
this.print(body);
this.dedent();
this.rightBrace(node);
}
//# sourceMappingURL=expressions.js.map

File diff suppressed because one or more lines are too long

658
node_modules/@babel/generator/lib/generators/flow.js generated vendored Normal file
View File

@ -0,0 +1,658 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.AnyTypeAnnotation = AnyTypeAnnotation;
exports.ArrayTypeAnnotation = ArrayTypeAnnotation;
exports.BooleanLiteralTypeAnnotation = BooleanLiteralTypeAnnotation;
exports.BooleanTypeAnnotation = BooleanTypeAnnotation;
exports.DeclareClass = DeclareClass;
exports.DeclareExportAllDeclaration = DeclareExportAllDeclaration;
exports.DeclareExportDeclaration = DeclareExportDeclaration;
exports.DeclareFunction = DeclareFunction;
exports.DeclareInterface = DeclareInterface;
exports.DeclareModule = DeclareModule;
exports.DeclareModuleExports = DeclareModuleExports;
exports.DeclareOpaqueType = DeclareOpaqueType;
exports.DeclareTypeAlias = DeclareTypeAlias;
exports.DeclareVariable = DeclareVariable;
exports.DeclaredPredicate = DeclaredPredicate;
exports.EmptyTypeAnnotation = EmptyTypeAnnotation;
exports.EnumBooleanBody = EnumBooleanBody;
exports.EnumBooleanMember = EnumBooleanMember;
exports.EnumDeclaration = EnumDeclaration;
exports.EnumDefaultedMember = EnumDefaultedMember;
exports.EnumNumberBody = EnumNumberBody;
exports.EnumNumberMember = EnumNumberMember;
exports.EnumStringBody = EnumStringBody;
exports.EnumStringMember = EnumStringMember;
exports.EnumSymbolBody = EnumSymbolBody;
exports.ExistsTypeAnnotation = ExistsTypeAnnotation;
exports.FunctionTypeAnnotation = FunctionTypeAnnotation;
exports.FunctionTypeParam = FunctionTypeParam;
exports.IndexedAccessType = IndexedAccessType;
exports.InferredPredicate = InferredPredicate;
exports.InterfaceDeclaration = InterfaceDeclaration;
exports.GenericTypeAnnotation = exports.ClassImplements = exports.InterfaceExtends = InterfaceExtends;
exports.InterfaceTypeAnnotation = InterfaceTypeAnnotation;
exports.IntersectionTypeAnnotation = IntersectionTypeAnnotation;
exports.MixedTypeAnnotation = MixedTypeAnnotation;
exports.NullLiteralTypeAnnotation = NullLiteralTypeAnnotation;
exports.NullableTypeAnnotation = NullableTypeAnnotation;
Object.defineProperty(exports, "NumberLiteralTypeAnnotation", {
enumerable: true,
get: function () {
return _types2.NumericLiteral;
}
});
exports.NumberTypeAnnotation = NumberTypeAnnotation;
exports.ObjectTypeAnnotation = ObjectTypeAnnotation;
exports.ObjectTypeCallProperty = ObjectTypeCallProperty;
exports.ObjectTypeIndexer = ObjectTypeIndexer;
exports.ObjectTypeInternalSlot = ObjectTypeInternalSlot;
exports.ObjectTypeProperty = ObjectTypeProperty;
exports.ObjectTypeSpreadProperty = ObjectTypeSpreadProperty;
exports.OpaqueType = OpaqueType;
exports.OptionalIndexedAccessType = OptionalIndexedAccessType;
exports.QualifiedTypeIdentifier = QualifiedTypeIdentifier;
Object.defineProperty(exports, "StringLiteralTypeAnnotation", {
enumerable: true,
get: function () {
return _types2.StringLiteral;
}
});
exports.StringTypeAnnotation = StringTypeAnnotation;
exports.SymbolTypeAnnotation = SymbolTypeAnnotation;
exports.ThisTypeAnnotation = ThisTypeAnnotation;
exports.TupleTypeAnnotation = TupleTypeAnnotation;
exports.TypeAlias = TypeAlias;
exports.TypeAnnotation = TypeAnnotation;
exports.TypeCastExpression = TypeCastExpression;
exports.TypeParameter = TypeParameter;
exports.TypeParameterDeclaration = exports.TypeParameterInstantiation = TypeParameterInstantiation;
exports.TypeofTypeAnnotation = TypeofTypeAnnotation;
exports.UnionTypeAnnotation = UnionTypeAnnotation;
exports.Variance = Variance;
exports.VoidTypeAnnotation = VoidTypeAnnotation;
exports._interfaceish = _interfaceish;
exports._variance = _variance;
var _t = require("@babel/types");
var _modules = require("./modules.js");
var _index = require("../node/index.js");
var _types2 = require("./types.js");
const {
isDeclareExportDeclaration,
isStatement
} = _t;
function AnyTypeAnnotation() {
this.word("any");
}
function ArrayTypeAnnotation(node) {
this.print(node.elementType, true);
this.tokenChar(91);
this.tokenChar(93);
}
function BooleanTypeAnnotation() {
this.word("boolean");
}
function BooleanLiteralTypeAnnotation(node) {
this.word(node.value ? "true" : "false");
}
function NullLiteralTypeAnnotation() {
this.word("null");
}
function DeclareClass(node, parent) {
if (!isDeclareExportDeclaration(parent)) {
this.word("declare");
this.space();
}
this.word("class");
this.space();
_interfaceish.call(this, node);
}
function DeclareFunction(node, parent) {
if (!isDeclareExportDeclaration(parent)) {
this.word("declare");
this.space();
}
this.word("function");
this.space();
this.print(node.id);
this.print(node.id.typeAnnotation.typeAnnotation);
if (node.predicate) {
this.space();
this.print(node.predicate);
}
this.semicolon();
}
function InferredPredicate() {
this.tokenChar(37);
this.word("checks");
}
function DeclaredPredicate(node) {
this.tokenChar(37);
this.word("checks");
this.tokenChar(40);
this.print(node.value);
this.tokenChar(41);
}
function DeclareInterface(node) {
this.word("declare");
this.space();
InterfaceDeclaration.call(this, node);
}
function DeclareModule(node) {
this.word("declare");
this.space();
this.word("module");
this.space();
this.print(node.id);
this.space();
this.print(node.body);
}
function DeclareModuleExports(node) {
this.word("declare");
this.space();
this.word("module");
this.tokenChar(46);
this.word("exports");
this.print(node.typeAnnotation);
}
function DeclareTypeAlias(node) {
this.word("declare");
this.space();
TypeAlias.call(this, node);
}
function DeclareOpaqueType(node, parent) {
if (!isDeclareExportDeclaration(parent)) {
this.word("declare");
this.space();
}
OpaqueType.call(this, node);
}
function DeclareVariable(node, parent) {
if (!isDeclareExportDeclaration(parent)) {
this.word("declare");
this.space();
}
this.word("var");
this.space();
this.print(node.id);
this.print(node.id.typeAnnotation);
this.semicolon();
}
function DeclareExportDeclaration(node) {
this.word("declare");
this.space();
this.word("export");
this.space();
if (node.default) {
this.word("default");
this.space();
}
FlowExportDeclaration.call(this, node);
}
function DeclareExportAllDeclaration(node) {
this.word("declare");
this.space();
_modules.ExportAllDeclaration.call(this, node);
}
function EnumDeclaration(node) {
const {
id,
body
} = node;
this.word("enum");
this.space();
this.print(id);
this.print(body);
}
function enumExplicitType(context, name, hasExplicitType) {
if (hasExplicitType) {
context.space();
context.word("of");
context.space();
context.word(name);
}
context.space();
}
function enumBody(context, node) {
const {
members
} = node;
context.token("{");
context.indent();
context.newline();
for (const member of members) {
context.print(member);
context.newline();
}
if (node.hasUnknownMembers) {
context.token("...");
context.newline();
}
context.dedent();
context.token("}");
}
function EnumBooleanBody(node) {
const {
explicitType
} = node;
enumExplicitType(this, "boolean", explicitType);
enumBody(this, node);
}
function EnumNumberBody(node) {
const {
explicitType
} = node;
enumExplicitType(this, "number", explicitType);
enumBody(this, node);
}
function EnumStringBody(node) {
const {
explicitType
} = node;
enumExplicitType(this, "string", explicitType);
enumBody(this, node);
}
function EnumSymbolBody(node) {
enumExplicitType(this, "symbol", true);
enumBody(this, node);
}
function EnumDefaultedMember(node) {
const {
id
} = node;
this.print(id);
this.tokenChar(44);
}
function enumInitializedMember(context, node) {
context.print(node.id);
context.space();
context.token("=");
context.space();
context.print(node.init);
context.token(",");
}
function EnumBooleanMember(node) {
enumInitializedMember(this, node);
}
function EnumNumberMember(node) {
enumInitializedMember(this, node);
}
function EnumStringMember(node) {
enumInitializedMember(this, node);
}
function FlowExportDeclaration(node) {
if (node.declaration) {
const declar = node.declaration;
this.print(declar);
if (!isStatement(declar)) this.semicolon();
} else {
this.tokenChar(123);
if (node.specifiers.length) {
this.space();
this.printList(node.specifiers);
this.space();
}
this.tokenChar(125);
if (node.source) {
this.space();
this.word("from");
this.space();
this.print(node.source);
}
this.semicolon();
}
}
function ExistsTypeAnnotation() {
this.tokenChar(42);
}
function FunctionTypeAnnotation(node, parent) {
this.print(node.typeParameters);
this.tokenChar(40);
if (node.this) {
this.word("this");
this.tokenChar(58);
this.space();
this.print(node.this.typeAnnotation);
if (node.params.length || node.rest) {
this.tokenChar(44);
this.space();
}
}
this.printList(node.params);
if (node.rest) {
if (node.params.length) {
this.tokenChar(44);
this.space();
}
this.token("...");
this.print(node.rest);
}
this.tokenChar(41);
const type = parent == null ? void 0 : parent.type;
if (type != null && (type === "ObjectTypeCallProperty" || type === "ObjectTypeInternalSlot" || type === "DeclareFunction" || type === "ObjectTypeProperty" && parent.method)) {
this.tokenChar(58);
} else {
this.space();
this.token("=>");
}
this.space();
this.print(node.returnType);
}
function FunctionTypeParam(node) {
this.print(node.name);
if (node.optional) this.tokenChar(63);
if (node.name) {
this.tokenChar(58);
this.space();
}
this.print(node.typeAnnotation);
}
function InterfaceExtends(node) {
this.print(node.id);
this.print(node.typeParameters, true);
}
function _interfaceish(node) {
var _node$extends;
this.print(node.id);
this.print(node.typeParameters);
if ((_node$extends = node.extends) != null && _node$extends.length) {
this.space();
this.word("extends");
this.space();
this.printList(node.extends);
}
if (node.type === "DeclareClass") {
var _node$mixins, _node$implements;
if ((_node$mixins = node.mixins) != null && _node$mixins.length) {
this.space();
this.word("mixins");
this.space();
this.printList(node.mixins);
}
if ((_node$implements = node.implements) != null && _node$implements.length) {
this.space();
this.word("implements");
this.space();
this.printList(node.implements);
}
}
this.space();
this.print(node.body);
}
function _variance(node) {
var _node$variance;
const kind = (_node$variance = node.variance) == null ? void 0 : _node$variance.kind;
if (kind != null) {
if (kind === "plus") {
this.tokenChar(43);
} else if (kind === "minus") {
this.tokenChar(45);
}
}
}
function InterfaceDeclaration(node) {
this.word("interface");
this.space();
_interfaceish.call(this, node);
}
function andSeparator(occurrenceCount) {
this.space();
this.token("&", false, occurrenceCount);
this.space();
}
function InterfaceTypeAnnotation(node) {
var _node$extends2;
this.word("interface");
if ((_node$extends2 = node.extends) != null && _node$extends2.length) {
this.space();
this.word("extends");
this.space();
this.printList(node.extends);
}
this.space();
this.print(node.body);
}
function IntersectionTypeAnnotation(node) {
this.printJoin(node.types, undefined, undefined, andSeparator);
}
function MixedTypeAnnotation() {
this.word("mixed");
}
function EmptyTypeAnnotation() {
this.word("empty");
}
function NullableTypeAnnotation(node) {
this.tokenChar(63);
this.print(node.typeAnnotation);
}
function NumberTypeAnnotation() {
this.word("number");
}
function StringTypeAnnotation() {
this.word("string");
}
function ThisTypeAnnotation() {
this.word("this");
}
function TupleTypeAnnotation(node) {
this.tokenChar(91);
this.printList(node.types);
this.tokenChar(93);
}
function TypeofTypeAnnotation(node) {
this.word("typeof");
this.space();
this.print(node.argument);
}
function TypeAlias(node) {
this.word("type");
this.space();
this.print(node.id);
this.print(node.typeParameters);
this.space();
this.tokenChar(61);
this.space();
this.print(node.right);
this.semicolon();
}
function TypeAnnotation(node, parent) {
this.tokenChar(58);
this.space();
if (parent.type === "ArrowFunctionExpression") {
this.tokenContext |= _index.TokenContext.arrowFlowReturnType;
} else if (node.optional) {
this.tokenChar(63);
}
this.print(node.typeAnnotation);
}
function TypeParameterInstantiation(node) {
this.tokenChar(60);
this.printList(node.params);
this.tokenChar(62);
}
function TypeParameter(node) {
_variance.call(this, node);
this.word(node.name);
if (node.bound) {
this.print(node.bound);
}
if (node.default) {
this.space();
this.tokenChar(61);
this.space();
this.print(node.default);
}
}
function OpaqueType(node) {
this.word("opaque");
this.space();
this.word("type");
this.space();
this.print(node.id);
this.print(node.typeParameters);
if (node.supertype) {
this.tokenChar(58);
this.space();
this.print(node.supertype);
}
if (node.impltype) {
this.space();
this.tokenChar(61);
this.space();
this.print(node.impltype);
}
this.semicolon();
}
function ObjectTypeAnnotation(node) {
if (node.exact) {
this.token("{|");
} else {
this.tokenChar(123);
}
const props = [...node.properties, ...(node.callProperties || []), ...(node.indexers || []), ...(node.internalSlots || [])];
if (props.length) {
this.newline();
this.space();
this.printJoin(props, true, true, () => {
if (props.length !== 1 || node.inexact) {
this.tokenChar(44);
this.space();
}
}, true);
this.space();
}
if (node.inexact) {
this.indent();
this.token("...");
if (props.length) {
this.newline();
}
this.dedent();
}
if (node.exact) {
this.token("|}");
} else {
this.tokenChar(125);
}
}
function ObjectTypeInternalSlot(node) {
if (node.static) {
this.word("static");
this.space();
}
this.tokenChar(91);
this.tokenChar(91);
this.print(node.id);
this.tokenChar(93);
this.tokenChar(93);
if (node.optional) this.tokenChar(63);
if (!node.method) {
this.tokenChar(58);
this.space();
}
this.print(node.value);
}
function ObjectTypeCallProperty(node) {
if (node.static) {
this.word("static");
this.space();
}
this.print(node.value);
}
function ObjectTypeIndexer(node) {
if (node.static) {
this.word("static");
this.space();
}
_variance.call(this, node);
this.tokenChar(91);
if (node.id) {
this.print(node.id);
this.tokenChar(58);
this.space();
}
this.print(node.key);
this.tokenChar(93);
this.tokenChar(58);
this.space();
this.print(node.value);
}
function ObjectTypeProperty(node) {
if (node.proto) {
this.word("proto");
this.space();
}
if (node.static) {
this.word("static");
this.space();
}
if (node.kind === "get" || node.kind === "set") {
this.word(node.kind);
this.space();
}
_variance.call(this, node);
this.print(node.key);
if (node.optional) this.tokenChar(63);
if (!node.method) {
this.tokenChar(58);
this.space();
}
this.print(node.value);
}
function ObjectTypeSpreadProperty(node) {
this.token("...");
this.print(node.argument);
}
function QualifiedTypeIdentifier(node) {
this.print(node.qualification);
this.tokenChar(46);
this.print(node.id);
}
function SymbolTypeAnnotation() {
this.word("symbol");
}
function orSeparator(occurrenceCount) {
this.space();
this.token("|", false, occurrenceCount);
this.space();
}
function UnionTypeAnnotation(node) {
this.printJoin(node.types, undefined, undefined, orSeparator);
}
function TypeCastExpression(node) {
this.tokenChar(40);
this.print(node.expression);
this.print(node.typeAnnotation);
this.tokenChar(41);
}
function Variance(node) {
if (node.kind === "plus") {
this.tokenChar(43);
} else {
this.tokenChar(45);
}
}
function VoidTypeAnnotation() {
this.word("void");
}
function IndexedAccessType(node) {
this.print(node.objectType, true);
this.tokenChar(91);
this.print(node.indexType);
this.tokenChar(93);
}
function OptionalIndexedAccessType(node) {
this.print(node.objectType);
if (node.optional) {
this.token("?.");
}
this.tokenChar(91);
this.print(node.indexType);
this.tokenChar(93);
}
//# sourceMappingURL=flow.js.map

File diff suppressed because one or more lines are too long

128
node_modules/@babel/generator/lib/generators/index.js generated vendored Normal file
View File

@ -0,0 +1,128 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var _templateLiterals = require("./template-literals.js");
Object.keys(_templateLiterals).forEach(function (key) {
if (key === "default" || key === "__esModule") return;
if (key in exports && exports[key] === _templateLiterals[key]) return;
Object.defineProperty(exports, key, {
enumerable: true,
get: function () {
return _templateLiterals[key];
}
});
});
var _expressions = require("./expressions.js");
Object.keys(_expressions).forEach(function (key) {
if (key === "default" || key === "__esModule") return;
if (key in exports && exports[key] === _expressions[key]) return;
Object.defineProperty(exports, key, {
enumerable: true,
get: function () {
return _expressions[key];
}
});
});
var _statements = require("./statements.js");
Object.keys(_statements).forEach(function (key) {
if (key === "default" || key === "__esModule") return;
if (key in exports && exports[key] === _statements[key]) return;
Object.defineProperty(exports, key, {
enumerable: true,
get: function () {
return _statements[key];
}
});
});
var _classes = require("./classes.js");
Object.keys(_classes).forEach(function (key) {
if (key === "default" || key === "__esModule") return;
if (key in exports && exports[key] === _classes[key]) return;
Object.defineProperty(exports, key, {
enumerable: true,
get: function () {
return _classes[key];
}
});
});
var _methods = require("./methods.js");
Object.keys(_methods).forEach(function (key) {
if (key === "default" || key === "__esModule") return;
if (key in exports && exports[key] === _methods[key]) return;
Object.defineProperty(exports, key, {
enumerable: true,
get: function () {
return _methods[key];
}
});
});
var _modules = require("./modules.js");
Object.keys(_modules).forEach(function (key) {
if (key === "default" || key === "__esModule") return;
if (key in exports && exports[key] === _modules[key]) return;
Object.defineProperty(exports, key, {
enumerable: true,
get: function () {
return _modules[key];
}
});
});
var _types = require("./types.js");
Object.keys(_types).forEach(function (key) {
if (key === "default" || key === "__esModule") return;
if (key in exports && exports[key] === _types[key]) return;
Object.defineProperty(exports, key, {
enumerable: true,
get: function () {
return _types[key];
}
});
});
var _flow = require("./flow.js");
Object.keys(_flow).forEach(function (key) {
if (key === "default" || key === "__esModule") return;
if (key in exports && exports[key] === _flow[key]) return;
Object.defineProperty(exports, key, {
enumerable: true,
get: function () {
return _flow[key];
}
});
});
var _base = require("./base.js");
Object.keys(_base).forEach(function (key) {
if (key === "default" || key === "__esModule") return;
if (key in exports && exports[key] === _base[key]) return;
Object.defineProperty(exports, key, {
enumerable: true,
get: function () {
return _base[key];
}
});
});
var _jsx = require("./jsx.js");
Object.keys(_jsx).forEach(function (key) {
if (key === "default" || key === "__esModule") return;
if (key in exports && exports[key] === _jsx[key]) return;
Object.defineProperty(exports, key, {
enumerable: true,
get: function () {
return _jsx[key];
}
});
});
var _typescript = require("./typescript.js");
Object.keys(_typescript).forEach(function (key) {
if (key === "default" || key === "__esModule") return;
if (key in exports && exports[key] === _typescript[key]) return;
Object.defineProperty(exports, key, {
enumerable: true,
get: function () {
return _typescript[key];
}
});
});
//# sourceMappingURL=index.js.map

View File

@ -0,0 +1 @@
{"version":3,"names":["_templateLiterals","require","Object","keys","forEach","key","exports","defineProperty","enumerable","get","_expressions","_statements","_classes","_methods","_modules","_types","_flow","_base","_jsx","_typescript"],"sources":["../../src/generators/index.ts"],"sourcesContent":["export * from \"./template-literals.ts\";\nexport * from \"./expressions.ts\";\nexport * from \"./statements.ts\";\nexport * from \"./classes.ts\";\nexport * from \"./methods.ts\";\nexport * from \"./modules.ts\";\nexport * from \"./types.ts\";\nexport * from \"./flow.ts\";\nexport * from \"./base.ts\";\nexport * from \"./jsx.ts\";\nexport * from \"./typescript.ts\";\n"],"mappings":";;;;;AAAA,IAAAA,iBAAA,GAAAC,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAH,iBAAA,EAAAI,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAL,iBAAA,CAAAK,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAT,iBAAA,CAAAK,GAAA;IAAA;EAAA;AAAA;AACA,IAAAK,YAAA,GAAAT,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAO,YAAA,EAAAN,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAK,YAAA,CAAAL,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAC,YAAA,CAAAL,GAAA;IAAA;EAAA;AAAA;AACA,IAAAM,WAAA,GAAAV,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAQ,WAAA,EAAAP,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAM,WAAA,CAAAN,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAE,WAAA,CAAAN,GAAA;IAAA;EAAA;AAAA;AACA,IAAAO,QAAA,GAAAX,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAS,QAAA,EAAAR,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAO,QAAA,CAAAP,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAG,QAAA,CAAAP,GAAA;IAAA;EAAA;AAAA;AACA,IAAAQ,QAAA,GAAAZ,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAU,QAAA,EAAAT,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAQ,QAAA,CAAAR,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAI,QAAA,CAAAR,GAAA;IAAA;EAAA;AAAA;AACA,IAAAS,QAAA,GAAAb,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAW,QAAA,EAAAV,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAS,QAAA,CAAAT,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAK,QAAA,CAAAT,GAAA;IAAA;EAAA;AAAA;AACA,IAAAU,MAAA,GAAAd,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAY,MAAA,EAAAX,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAU,MAAA,CAAAV,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAM,MAAA,CAAAV,GAAA;IAAA;EAAA;AAAA;AACA,IAAAW,KAAA,GAAAf,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAa,KAAA,EAAAZ,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAW,KAAA,CAAAX,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAO,KAAA,CAAAX,GAAA;IAAA;EAAA;AAAA;AACA,IAAAY,KAAA,GAAAhB,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAc,KAAA,EAAAb,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAY,KAAA,CAAAZ,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAQ,KAAA,CAAAZ,GAAA;IAAA;EAAA;AAAA;AACA,IAAAa,IAAA,GAAAjB,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAe,IAAA,EAAAd,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAa,IAAA,CAAAb,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAS,IAAA,CAAAb,GAAA;IAAA;EAAA;AAAA;AACA,IAAAc,WAAA,GAAAlB,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAgB,WAAA,EAAAf,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAc,WAAA,CAAAd,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAU,WAAA,CAAAd,GAAA;IAAA;EAAA;AAAA","ignoreList":[]}

124
node_modules/@babel/generator/lib/generators/jsx.js generated vendored Normal file
View File

@ -0,0 +1,124 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.JSXAttribute = JSXAttribute;
exports.JSXClosingElement = JSXClosingElement;
exports.JSXClosingFragment = JSXClosingFragment;
exports.JSXElement = JSXElement;
exports.JSXEmptyExpression = JSXEmptyExpression;
exports.JSXExpressionContainer = JSXExpressionContainer;
exports.JSXFragment = JSXFragment;
exports.JSXIdentifier = JSXIdentifier;
exports.JSXMemberExpression = JSXMemberExpression;
exports.JSXNamespacedName = JSXNamespacedName;
exports.JSXOpeningElement = JSXOpeningElement;
exports.JSXOpeningFragment = JSXOpeningFragment;
exports.JSXSpreadAttribute = JSXSpreadAttribute;
exports.JSXSpreadChild = JSXSpreadChild;
exports.JSXText = JSXText;
function JSXAttribute(node) {
this.print(node.name);
if (node.value) {
this.tokenChar(61);
this.print(node.value);
}
}
function JSXIdentifier(node) {
this.word(node.name);
}
function JSXNamespacedName(node) {
this.print(node.namespace);
this.tokenChar(58);
this.print(node.name);
}
function JSXMemberExpression(node) {
this.print(node.object);
this.tokenChar(46);
this.print(node.property);
}
function JSXSpreadAttribute(node) {
this.tokenChar(123);
this.token("...");
this.print(node.argument);
this.rightBrace(node);
}
function JSXExpressionContainer(node) {
this.tokenChar(123);
this.print(node.expression);
this.rightBrace(node);
}
function JSXSpreadChild(node) {
this.tokenChar(123);
this.token("...");
this.print(node.expression);
this.rightBrace(node);
}
function JSXText(node) {
const raw = this.getPossibleRaw(node);
if (raw !== undefined) {
this.token(raw, true);
} else {
this.token(node.value, true);
}
}
function JSXElement(node) {
const open = node.openingElement;
this.print(open);
if (open.selfClosing) return;
this.indent();
for (const child of node.children) {
this.print(child);
}
this.dedent();
this.print(node.closingElement);
}
function spaceSeparator() {
this.space();
}
function JSXOpeningElement(node) {
this.tokenChar(60);
this.print(node.name);
if (node.typeArguments) {
this.print(node.typeArguments);
}
this.print(node.typeParameters);
if (node.attributes.length > 0) {
this.space();
this.printJoin(node.attributes, undefined, undefined, spaceSeparator);
}
if (node.selfClosing) {
this.space();
this.tokenChar(47);
}
this.tokenChar(62);
}
function JSXClosingElement(node) {
this.tokenChar(60);
this.tokenChar(47);
this.print(node.name);
this.tokenChar(62);
}
function JSXEmptyExpression() {
this.printInnerComments();
}
function JSXFragment(node) {
this.print(node.openingFragment);
this.indent();
for (const child of node.children) {
this.print(child);
}
this.dedent();
this.print(node.closingFragment);
}
function JSXOpeningFragment() {
this.tokenChar(60);
this.tokenChar(62);
}
function JSXClosingFragment() {
this.token("</");
this.tokenChar(62);
}
//# sourceMappingURL=jsx.js.map

File diff suppressed because one or more lines are too long

207
node_modules/@babel/generator/lib/generators/methods.js generated vendored Normal file
View File

@ -0,0 +1,207 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.ArrowFunctionExpression = ArrowFunctionExpression;
exports.FunctionDeclaration = exports.FunctionExpression = FunctionExpression;
exports._functionHead = _functionHead;
exports._methodHead = _methodHead;
exports._param = _param;
exports._parameters = _parameters;
exports._params = _params;
exports._predicate = _predicate;
exports._shouldPrintArrowParamsParens = _shouldPrintArrowParamsParens;
var _t = require("@babel/types");
var _index = require("../node/index.js");
const {
isIdentifier
} = _t;
function _params(node, noLineTerminator, idNode, parentNode) {
this.print(node.typeParameters);
if (idNode !== undefined || parentNode !== undefined) {
const nameInfo = _getFuncIdName.call(this, idNode, parentNode);
if (nameInfo) {
this.sourceIdentifierName(nameInfo.name, nameInfo.pos);
}
}
this.tokenChar(40);
_parameters.call(this, node.params, 41);
this.print(node.returnType, noLineTerminator);
this._noLineTerminator = noLineTerminator;
}
function _parameters(parameters, endToken) {
const oldNoLineTerminatorAfterNode = this.enterDelimited();
const trailingComma = this.shouldPrintTrailingComma(endToken);
const paramLength = parameters.length;
for (let i = 0; i < paramLength; i++) {
_param.call(this, parameters[i]);
if (trailingComma || i < paramLength - 1) {
this.tokenChar(44, i);
this.space();
}
}
this.tokenChar(endToken);
this._noLineTerminatorAfterNode = oldNoLineTerminatorAfterNode;
}
function _param(parameter) {
this.printJoin(parameter.decorators, undefined, undefined, undefined, undefined, true);
this.print(parameter, undefined, true);
if (parameter.optional) {
this.tokenChar(63);
}
this.print(parameter.typeAnnotation, undefined, true);
}
function _methodHead(node) {
const kind = node.kind;
const key = node.key;
if (kind === "get" || kind === "set") {
this.word(kind);
this.space();
}
if (node.async) {
this.word("async", true);
this.space();
}
if (kind === "method" || kind === "init") {
if (node.generator) {
this.tokenChar(42);
}
}
if (node.computed) {
this.tokenChar(91);
this.print(key);
this.tokenChar(93);
} else {
this.print(key);
}
if (node.optional) {
this.tokenChar(63);
}
if (this._buf._map) {
_params.call(this, node, false, node.computed && node.key.type !== "StringLiteral" ? undefined : node.key);
} else {
_params.call(this, node, false);
}
}
function _predicate(node, noLineTerminatorAfter) {
if (node.predicate) {
if (!node.returnType) {
this.tokenChar(58);
}
this.space();
this.print(node.predicate, noLineTerminatorAfter);
}
}
function _functionHead(node, parent, hasPredicate) {
if (node.async) {
this.word("async");
if (!this.format.preserveFormat) {
this._innerCommentsState = 0;
}
this.space();
}
this.word("function");
if (node.generator) {
if (!this.format.preserveFormat) {
this._innerCommentsState = 0;
}
this.tokenChar(42);
}
this.space();
if (node.id) {
this.print(node.id);
}
if (this._buf._map) {
_params.call(this, node, false, node.id, parent);
} else {
_params.call(this, node, false);
}
if (hasPredicate) {
_predicate.call(this, node);
}
}
function FunctionExpression(node, parent) {
_functionHead.call(this, node, parent, true);
this.space();
this.print(node.body);
}
function ArrowFunctionExpression(node, parent) {
if (node.async) {
this.word("async", true);
this.space();
}
if (_shouldPrintArrowParamsParens.call(this, node)) {
_params.call(this, node, true, undefined, this._buf._map ? parent : undefined);
} else {
this.print(node.params[0], true);
}
_predicate.call(this, node, true);
this.space();
this.printInnerComments();
this.token("=>");
this.space();
this.tokenContext |= _index.TokenContext.arrowBody;
this.print(node.body);
}
function _shouldPrintArrowParamsParens(node) {
var _firstParam$leadingCo, _firstParam$trailingC;
if (node.params.length !== 1) return true;
if (node.typeParameters || node.returnType || node.predicate) {
return true;
}
const firstParam = node.params[0];
if (!isIdentifier(firstParam) || firstParam.typeAnnotation || firstParam.optional || (_firstParam$leadingCo = firstParam.leadingComments) != null && _firstParam$leadingCo.length || (_firstParam$trailingC = firstParam.trailingComments) != null && _firstParam$trailingC.length) {
return true;
}
if (this.tokenMap) {
if (node.loc == null) return true;
if (this.tokenMap.findMatching(node, "(") !== null) return true;
const arrowToken = this.tokenMap.findMatching(node, "=>");
if ((arrowToken == null ? void 0 : arrowToken.loc) == null) return true;
return arrowToken.loc.start.line !== node.loc.start.line;
}
if (this.format.retainLines) return true;
return false;
}
function _getFuncIdName(idNode, parent) {
let id = idNode;
if (!id && parent) {
const parentType = parent.type;
if (parentType === "VariableDeclarator") {
id = parent.id;
} else if (parentType === "AssignmentExpression" || parentType === "AssignmentPattern") {
id = parent.left;
} else if (parentType === "ObjectProperty" || parentType === "ClassProperty") {
if (!parent.computed || parent.key.type === "StringLiteral") {
id = parent.key;
}
} else if (parentType === "ClassPrivateProperty" || parentType === "ClassAccessorProperty") {
id = parent.key;
}
}
if (!id) return;
let nameInfo;
if (id.type === "Identifier") {
var _id$loc, _id$loc2;
nameInfo = {
pos: (_id$loc = id.loc) == null ? void 0 : _id$loc.start,
name: ((_id$loc2 = id.loc) == null ? void 0 : _id$loc2.identifierName) || id.name
};
} else if (id.type === "PrivateName") {
var _id$loc3;
nameInfo = {
pos: (_id$loc3 = id.loc) == null ? void 0 : _id$loc3.start,
name: "#" + id.id.name
};
} else if (id.type === "StringLiteral") {
var _id$loc4;
nameInfo = {
pos: (_id$loc4 = id.loc) == null ? void 0 : _id$loc4.start,
name: id.value
};
}
return nameInfo;
}
//# sourceMappingURL=methods.js.map

File diff suppressed because one or more lines are too long

290
node_modules/@babel/generator/lib/generators/modules.js generated vendored Normal file
View File

@ -0,0 +1,290 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.ExportAllDeclaration = ExportAllDeclaration;
exports.ExportDefaultDeclaration = ExportDefaultDeclaration;
exports.ExportDefaultSpecifier = ExportDefaultSpecifier;
exports.ExportNamedDeclaration = ExportNamedDeclaration;
exports.ExportNamespaceSpecifier = ExportNamespaceSpecifier;
exports.ExportSpecifier = ExportSpecifier;
exports.ImportAttribute = ImportAttribute;
exports.ImportDeclaration = ImportDeclaration;
exports.ImportDefaultSpecifier = ImportDefaultSpecifier;
exports.ImportExpression = ImportExpression;
exports.ImportNamespaceSpecifier = ImportNamespaceSpecifier;
exports.ImportSpecifier = ImportSpecifier;
exports._printAttributes = _printAttributes;
var _t = require("@babel/types");
var _index = require("../node/index.js");
var _expressions = require("./expressions.js");
const {
isClassDeclaration,
isExportDefaultSpecifier,
isExportNamespaceSpecifier,
isImportDefaultSpecifier,
isImportNamespaceSpecifier,
isStatement
} = _t;
function ImportSpecifier(node) {
if (node.importKind === "type" || node.importKind === "typeof") {
this.word(node.importKind);
this.space();
}
this.print(node.imported);
if (node.local && node.local.name !== node.imported.name) {
this.space();
this.word("as");
this.space();
this.print(node.local);
}
}
function ImportDefaultSpecifier(node) {
this.print(node.local);
}
function ExportDefaultSpecifier(node) {
this.print(node.exported);
}
function ExportSpecifier(node) {
if (node.exportKind === "type") {
this.word("type");
this.space();
}
this.print(node.local);
if (node.exported && node.local.name !== node.exported.name) {
this.space();
this.word("as");
this.space();
this.print(node.exported);
}
}
function ExportNamespaceSpecifier(node) {
this.tokenChar(42);
this.space();
this.word("as");
this.space();
this.print(node.exported);
}
let warningShown = false;
function _printAttributes(node, hasPreviousBrace) {
var _node$extra;
const {
attributes
} = node;
var {
assertions
} = node;
const {
importAttributesKeyword
} = this.format;
if (attributes && !importAttributesKeyword && node.extra && (node.extra.deprecatedAssertSyntax || node.extra.deprecatedWithLegacySyntax) && !warningShown) {
warningShown = true;
console.warn(`\
You are using import attributes, without specifying the desired output syntax.
Please specify the "importAttributesKeyword" generator option, whose value can be one of:
- "with" : \`import { a } from "b" with { type: "json" };\`
- "assert" : \`import { a } from "b" assert { type: "json" };\`
- "with-legacy" : \`import { a } from "b" with type: "json";\`
`);
}
const useAssertKeyword = importAttributesKeyword === "assert" || !importAttributesKeyword && assertions;
this.word(useAssertKeyword ? "assert" : "with");
this.space();
if (!useAssertKeyword && (importAttributesKeyword === "with-legacy" || !importAttributesKeyword && (_node$extra = node.extra) != null && _node$extra.deprecatedWithLegacySyntax)) {
this.printList(attributes || assertions);
return;
}
const occurrenceCount = hasPreviousBrace ? 1 : 0;
this.token("{", undefined, occurrenceCount);
this.space();
this.printList(attributes || assertions, this.shouldPrintTrailingComma("}"));
this.space();
this.token("}", undefined, occurrenceCount);
}
function ExportAllDeclaration(node) {
var _node$attributes, _node$assertions;
this.word("export");
this.space();
if (node.exportKind === "type") {
this.word("type");
this.space();
}
this.tokenChar(42);
this.space();
this.word("from");
this.space();
if ((_node$attributes = node.attributes) != null && _node$attributes.length || (_node$assertions = node.assertions) != null && _node$assertions.length) {
this.print(node.source, true);
this.space();
_printAttributes.call(this, node, false);
} else {
this.print(node.source);
}
this.semicolon();
}
function maybePrintDecoratorsBeforeExport(printer, node) {
if (isClassDeclaration(node.declaration) && _expressions._shouldPrintDecoratorsBeforeExport.call(printer, node)) {
printer.printJoin(node.declaration.decorators);
}
}
function ExportNamedDeclaration(node) {
maybePrintDecoratorsBeforeExport(this, node);
this.word("export");
this.space();
if (node.declaration) {
const declar = node.declaration;
this.print(declar);
if (!isStatement(declar)) this.semicolon();
} else {
if (node.exportKind === "type") {
this.word("type");
this.space();
}
const specifiers = node.specifiers.slice(0);
let hasSpecial = false;
for (;;) {
const first = specifiers[0];
if (isExportDefaultSpecifier(first) || isExportNamespaceSpecifier(first)) {
hasSpecial = true;
this.print(specifiers.shift());
if (specifiers.length) {
this.tokenChar(44);
this.space();
}
} else {
break;
}
}
let hasBrace = false;
if (specifiers.length || !specifiers.length && !hasSpecial) {
hasBrace = true;
this.tokenChar(123);
if (specifiers.length) {
this.space();
this.printList(specifiers, this.shouldPrintTrailingComma("}"));
this.space();
}
this.tokenChar(125);
}
if (node.source) {
var _node$attributes2, _node$assertions2;
this.space();
this.word("from");
this.space();
if ((_node$attributes2 = node.attributes) != null && _node$attributes2.length || (_node$assertions2 = node.assertions) != null && _node$assertions2.length) {
this.print(node.source, true);
this.space();
_printAttributes.call(this, node, hasBrace);
} else {
this.print(node.source);
}
}
this.semicolon();
}
}
function ExportDefaultDeclaration(node) {
maybePrintDecoratorsBeforeExport(this, node);
this.word("export");
this.noIndentInnerCommentsHere();
this.space();
this.word("default");
this.space();
this.tokenContext |= _index.TokenContext.exportDefault;
const declar = node.declaration;
this.print(declar);
if (!isStatement(declar)) this.semicolon();
}
function ImportDeclaration(node) {
var _node$attributes3, _node$assertions3;
this.word("import");
this.space();
const isTypeKind = node.importKind === "type" || node.importKind === "typeof";
if (isTypeKind) {
this.noIndentInnerCommentsHere();
this.word(node.importKind);
this.space();
} else if (node.module) {
this.noIndentInnerCommentsHere();
this.word("module");
this.space();
} else if (node.phase) {
this.noIndentInnerCommentsHere();
this.word(node.phase);
this.space();
}
const specifiers = node.specifiers.slice(0);
const hasSpecifiers = !!specifiers.length;
while (hasSpecifiers) {
const first = specifiers[0];
if (isImportDefaultSpecifier(first) || isImportNamespaceSpecifier(first)) {
this.print(specifiers.shift());
if (specifiers.length) {
this.tokenChar(44);
this.space();
}
} else {
break;
}
}
let hasBrace = false;
if (specifiers.length) {
hasBrace = true;
this.tokenChar(123);
this.space();
this.printList(specifiers, this.shouldPrintTrailingComma("}"));
this.space();
this.tokenChar(125);
} else if (isTypeKind && !hasSpecifiers) {
hasBrace = true;
this.tokenChar(123);
this.tokenChar(125);
}
if (hasSpecifiers || isTypeKind) {
this.space();
this.word("from");
this.space();
}
if ((_node$attributes3 = node.attributes) != null && _node$attributes3.length || (_node$assertions3 = node.assertions) != null && _node$assertions3.length) {
this.print(node.source, true);
this.space();
_printAttributes.call(this, node, hasBrace);
} else {
this.print(node.source);
}
this.semicolon();
}
function ImportAttribute(node) {
this.print(node.key);
this.tokenChar(58);
this.space();
this.print(node.value);
}
function ImportNamespaceSpecifier(node) {
this.tokenChar(42);
this.space();
this.word("as");
this.space();
this.print(node.local);
}
function ImportExpression(node) {
this.word("import");
if (node.phase) {
this.tokenChar(46);
this.word(node.phase);
}
this.tokenChar(40);
const shouldPrintTrailingComma = this.shouldPrintTrailingComma(")");
this.print(node.source);
if (node.options != null) {
this.tokenChar(44);
this.space();
this.print(node.options);
}
if (shouldPrintTrailingComma) {
this.tokenChar(44);
}
this.rightParens(node);
}
//# sourceMappingURL=modules.js.map

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,297 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.BreakStatement = BreakStatement;
exports.CatchClause = CatchClause;
exports.ContinueStatement = ContinueStatement;
exports.DebuggerStatement = DebuggerStatement;
exports.DoWhileStatement = DoWhileStatement;
exports.ForInStatement = ForInStatement;
exports.ForOfStatement = ForOfStatement;
exports.ForStatement = ForStatement;
exports.IfStatement = IfStatement;
exports.LabeledStatement = LabeledStatement;
exports.ReturnStatement = ReturnStatement;
exports.SwitchCase = SwitchCase;
exports.SwitchStatement = SwitchStatement;
exports.ThrowStatement = ThrowStatement;
exports.TryStatement = TryStatement;
exports.VariableDeclaration = VariableDeclaration;
exports.VariableDeclarator = VariableDeclarator;
exports.WhileStatement = WhileStatement;
exports.WithStatement = WithStatement;
var _t = require("@babel/types");
var _index = require("../node/index.js");
const {
isFor,
isIfStatement,
isStatement
} = _t;
function WithStatement(node) {
this.word("with");
this.space();
this.tokenChar(40);
this.print(node.object);
this.tokenChar(41);
this.printBlock(node.body);
}
function IfStatement(node) {
this.word("if");
this.space();
this.tokenChar(40);
this.print(node.test);
this.tokenChar(41);
this.space();
const needsBlock = node.alternate && isIfStatement(getLastStatement(node.consequent));
if (needsBlock) {
this.tokenChar(123);
this.newline();
this.indent();
}
this.printAndIndentOnComments(node.consequent);
if (needsBlock) {
this.dedent();
this.newline();
this.tokenChar(125);
}
if (node.alternate) {
if (this.endsWith(125)) this.space();
this.word("else");
this.space();
this.printAndIndentOnComments(node.alternate);
}
}
function getLastStatement(statement) {
const {
body
} = statement;
if (isStatement(body) === false) {
return statement;
}
return getLastStatement(body);
}
function ForStatement(node) {
this.word("for");
this.space();
this.tokenChar(40);
this.tokenContext |= _index.TokenContext.forInitHead | _index.TokenContext.forInOrInitHeadAccumulate;
this.print(node.init);
this.tokenContext = _index.TokenContext.normal;
this.tokenChar(59);
if (node.test) {
this.space();
this.print(node.test);
}
this.tokenChar(59, 1);
if (node.update) {
this.space();
this.print(node.update);
}
this.tokenChar(41);
this.printBlock(node.body);
}
function WhileStatement(node) {
this.word("while");
this.space();
this.tokenChar(40);
this.print(node.test);
this.tokenChar(41);
this.printBlock(node.body);
}
function ForInStatement(node) {
this.word("for");
this.space();
this.noIndentInnerCommentsHere();
this.tokenChar(40);
this.tokenContext |= _index.TokenContext.forInHead | _index.TokenContext.forInOrInitHeadAccumulate;
this.print(node.left);
this.tokenContext = _index.TokenContext.normal;
this.space();
this.word("in");
this.space();
this.print(node.right);
this.tokenChar(41);
this.printBlock(node.body);
}
function ForOfStatement(node) {
this.word("for");
this.space();
if (node.await) {
this.word("await");
this.space();
}
this.noIndentInnerCommentsHere();
this.tokenChar(40);
this.tokenContext |= _index.TokenContext.forOfHead;
this.print(node.left);
this.space();
this.word("of");
this.space();
this.print(node.right);
this.tokenChar(41);
this.printBlock(node.body);
}
function DoWhileStatement(node) {
this.word("do");
this.space();
this.print(node.body);
this.space();
this.word("while");
this.space();
this.tokenChar(40);
this.print(node.test);
this.tokenChar(41);
this.semicolon();
}
function printStatementAfterKeyword(printer, node) {
if (node) {
printer.space();
printer.printTerminatorless(node);
}
printer.semicolon();
}
function BreakStatement(node) {
this.word("break");
printStatementAfterKeyword(this, node.label);
}
function ContinueStatement(node) {
this.word("continue");
printStatementAfterKeyword(this, node.label);
}
function ReturnStatement(node) {
this.word("return");
printStatementAfterKeyword(this, node.argument);
}
function ThrowStatement(node) {
this.word("throw");
printStatementAfterKeyword(this, node.argument);
}
function LabeledStatement(node) {
this.print(node.label);
this.tokenChar(58);
this.space();
this.print(node.body);
}
function TryStatement(node) {
this.word("try");
this.space();
this.print(node.block);
this.space();
if (node.handlers) {
this.print(node.handlers[0]);
} else {
this.print(node.handler);
}
if (node.finalizer) {
this.space();
this.word("finally");
this.space();
this.print(node.finalizer);
}
}
function CatchClause(node) {
this.word("catch");
this.space();
if (node.param) {
this.tokenChar(40);
this.print(node.param);
this.print(node.param.typeAnnotation);
this.tokenChar(41);
this.space();
}
this.print(node.body);
}
function SwitchStatement(node) {
this.word("switch");
this.space();
this.tokenChar(40);
this.print(node.discriminant);
this.tokenChar(41);
this.space();
this.tokenChar(123);
this.printSequence(node.cases, true);
this.rightBrace(node);
}
function SwitchCase(node) {
if (node.test) {
this.word("case");
this.space();
this.print(node.test);
this.tokenChar(58);
} else {
this.word("default");
this.tokenChar(58);
}
if (node.consequent.length) {
this.newline();
this.printSequence(node.consequent, true);
}
}
function DebuggerStatement() {
this.word("debugger");
this.semicolon();
}
function commaSeparatorWithNewline(occurrenceCount) {
this.tokenChar(44, occurrenceCount);
this.newline();
}
function VariableDeclaration(node, parent) {
if (node.declare) {
this.word("declare");
this.space();
}
const {
kind
} = node;
switch (kind) {
case "await using":
this.word("await");
this.space();
case "using":
this.word("using", true);
break;
default:
this.word(kind);
}
this.space();
let hasInits = false;
if (!isFor(parent)) {
for (const declar of node.declarations) {
if (declar.init) {
hasInits = true;
break;
}
}
}
this.printList(node.declarations, undefined, undefined, node.declarations.length > 1, hasInits ? commaSeparatorWithNewline : undefined);
if (parent != null) {
switch (parent.type) {
case "ForStatement":
if (parent.init === node) {
return;
}
break;
case "ForInStatement":
case "ForOfStatement":
if (parent.left === node) {
return;
}
}
}
this.semicolon();
}
function VariableDeclarator(node) {
this.print(node.id);
if (node.definite) this.tokenChar(33);
this.print(node.id.typeAnnotation);
if (node.init) {
this.space();
this.tokenChar(61);
this.space();
this.print(node.init);
}
}
//# sourceMappingURL=statements.js.map

Some files were not shown because too many files have changed in this diff Show More