frame-cli 0.3.0

CLI for Frame — five intention-verbs over one application: frame new scaffolds it, frame run serves it, frame test proves it (real browser included), frame check verifies it statically, frame doctor walks the prerequisites
Documentation
/*
 * The page's whole visual shell. `src/main.ts` imports this file, so the
 * build bundles it into dist/ as a hashed asset — nothing here is fetched
 * from anywhere else: system fonts only, no CDNs, works offline.
 *
 * The markup these rules style is rendered by `src/main.ts`. Two kinds of
 * hook exist and they never mix: the ids (#status, #log, #send-form,
 * #send-input) carry behavior and are driven by `scripts/e2e.mjs`; the
 * `data-state` attribute on the status pill and the `data-kind` attribute
 * on each feed row are presentation-only and safe to restyle freely.
 */

:root {
  /* One dark ground, two raised surfaces, warm off-white ink. */
  --surface: #0b0f14;
  --surface-stage: #151b24;
  --surface-raised: #1c2430;
  --ink: #e2ddd5;
  --ink-muted: #8a857d;
  --ink-faint: #555049;

  /* One terracotta accent, spent sparingly, plus per-voice colors: teal
   * for stored facts, slate blue for your own echoed messages, amber for
   * the in-between states, red only for real failures. */
  --accent: #d4845a;
  --voice-fact: #3d8b8b;
  --voice-echo: #4a6fa5;
  --state-wait: #c4793d;
  --state-live: #3d8b8b;
  --state-failed: #aa3333;

  /* One whisper-subtle hairline; no heavy borders, no boxes-in-boxes. */
  --hairline: rgba(226, 221, 213, 0.08);

  --font-body: system-ui, sans-serif;
  --font-display: Georgia, serif;
  --font-data: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

* {
  box-sizing: border-box;
}

html {
  color-scheme: dark;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--surface);
  color: var(--ink);
  font-family: var(--font-body);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

#app {
  max-width: 46rem;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 3rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

/* ── Masthead: the app's name, what this page proves, and the live pill. ── */

.masthead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--hairline);
}

.masthead h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 2.25rem;
  font-weight: 400;
  letter-spacing: -0.02em;
}

.tagline {
  margin: 0.35rem 0 0;
  color: var(--ink-muted);
}

#status {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  max-width: 100%;
  padding: 0.35rem 0.9rem;
  border: 1px solid var(--hairline);
  border-radius: 9999px;
  background: var(--surface-stage);
  font-family: var(--font-data);
  font-size: 0.8125rem;
  overflow-wrap: anywhere;
  color: var(--ink-muted);
}

#status::before {
  content: "";
  flex: none;
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: currentcolor;
}

#status[data-state="connecting"] {
  color: var(--state-wait);
}

#status[data-state="connecting"]::before {
  animation: status-pulse 1.2s ease-in-out infinite;
}

#status[data-state="live"] {
  color: var(--state-live);
}

#status[data-state="failed"] {
  color: var(--state-failed);
}

@keyframes status-pulse {
  50% {
    opacity: 0.25;
  }
}

@media (prefers-reduced-motion: reduce) {
  #status[data-state="connecting"]::before {
    animation: none;
  }
}

/* ── Welcome: the ten-second explanation of what a stranger is looking at. ── */

.welcome {
  margin: 0;
  padding: 1rem 1.25rem;
  background: var(--surface-stage);
  border-left: 3px solid var(--accent);
  border-radius: 0.5rem;
  color: var(--ink-muted);
}

.welcome strong {
  color: var(--ink);
  font-weight: 600;
}

/* ── The event feed: real traffic, one voice per kind of row. ── */

.feed {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.feed h2 {
  margin: 0;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent);
}

#log {
  display: flex;
  flex-direction: column;
  max-height: 24rem;
  overflow-y: auto;
  padding: 0.4rem 0;
  background: var(--surface-stage);
  border: 1px solid var(--hairline);
  border-radius: 0.75rem;
  font-family: var(--font-data);
  font-size: 0.8125rem;
}

/* Honest empty state: the feed only looks like this before the boot-history
 * snapshot lands, which on a healthy host is a blink. */
#log:empty::after {
  content: "waiting for the boot history…";
  padding: 0.45rem 1rem;
  color: var(--ink-faint);
}

.row {
  padding: 0.45rem 1rem 0.45rem 0.85rem;
  border-left: 3px solid transparent;
  overflow-wrap: anywhere;
}

.row + .row {
  border-top: 1px solid var(--hairline);
}

/* Each row wears a small kind label drawn from its data-kind attribute —
 * pseudo-element content, so the row's text stays exactly the event text. */
.row::before {
  content: attr(data-kind);
  display: inline-block;
  min-width: 5em;
  margin-right: 0.6rem;
  font-size: 0.6875rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.row[data-kind="lifecycle"] {
  border-left-color: var(--accent);
}

.row[data-kind="lifecycle"]::before {
  color: var(--accent);
}

.row[data-kind="fact"] {
  border-left-color: var(--voice-fact);
}

.row[data-kind="fact"]::before {
  color: var(--voice-fact);
}

.row[data-kind="echo"] {
  border-left-color: var(--voice-echo);
}

.row[data-kind="echo"]::before {
  color: var(--voice-echo);
}

.row[data-kind="receipt"] {
  color: var(--ink-muted);
}

.row[data-kind="alert"] {
  border-left-color: var(--state-failed);
  color: var(--state-failed);
}

.row[data-kind="alert"]::before {
  color: var(--state-failed);
}

/* ── The composer: send something and watch it come back above. ── */

#send-form {
  display: flex;
  gap: 0.75rem;
}

#send-input {
  flex: 1;
  padding: 0.7rem 1rem;
  border: 1px solid var(--hairline);
  border-radius: 0.5rem;
  background: var(--surface-raised);
  color: var(--ink);
  font: inherit;
}

#send-input::placeholder {
  color: var(--ink-faint);
}

#send-input:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

#send-form button {
  padding: 0.7rem 1.6rem;
  border: 1px solid var(--accent);
  border-radius: 9999px;
  background: var(--accent);
  color: var(--surface);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

#send-form button:hover {
  background: transparent;
  color: var(--accent);
}

#send-form button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}