Files
nibiru-framework.com/docs/src/components/Swatch.astro
stephan 48c839d927 Initial public push: docs cosmos v4 + AI module + framework groundwork
This is the snapshot the production landing site (nibiru-framework.com) is
deployed from. Brings together the recent splash + docs migration to the v4
"Cosmos" design system, the new in-framework AI module, and the framework
groundwork that backs the framework-reference extraction.

What lands:
- docs/: Astro + Starlight site with the v4 dark cosmic palette, GalaxyHero
  canvas constellation, Mission Control chat (wired to /api/oracle →
  api.neuronetz.ai via providers.mjs Ollama), 5-panel MMVC stage
  (Model · AI · Module · Controller · View), translated EN/DE/JA/ES/FR
  content, PWA + sitemap + llms.txt + Umami analytics.
- docs/design-system/: canonical mockup bundle (source/index-v2.html for
  splash, source/docs-system.html + preview/ for docs, SPEC.md, tokens).
- docs/scripts/extraction/framework-reference-v2.md: deep framework
  reference (~1.6k lines, file:line citations, every public factory and
  idiom — basis for the LoRA training corpus.
- application/module/ai/: AI module with chat / embed / RAG / agent
  plugins, plus pdoQuery / httpGet / fileRead tools and Modelfile +
  smoke-test in training/.
- application/module/users/: user / ACL / form-factory traits used as the
  reference plugin pattern for the framework docs.
- application/settings/config/database/: schema + seed migrations
  including the AI module tables (200–203).
- Form factory + autogenerator changes the framework-reference-v2 covers.

Production secrets stay out: docs/.env, settings.production.ini and
ai.production.ini are all gitignored (.example files are in tree).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-08 15:22:18 +02:00

90 lines
2.2 KiB
Plaintext

---
interface Props {
token: string;
hex: string;
name: string;
usage?: string;
}
const { token, hex, name, usage } = Astro.props as Props;
---
<div class="swatch">
<div class="swatch__chip" style={`background:${hex}`} aria-hidden="true"></div>
<div class="swatch__meta">
<strong class="swatch__name">{name}</strong>
<code class="swatch__token">{token}</code>
<code class="swatch__hex">{hex}</code>
{usage && <p class="swatch__usage">{usage}</p>}
</div>
</div>
<style>
.swatch {
display: grid;
grid-template-columns: 96px 1fr;
gap: 1.2rem;
align-items: center;
padding: 0.75rem 0;
margin: 0;
border-bottom: 1px solid rgba(31, 27, 46, 0.08);
}
.swatch:last-child { border-bottom: 0; }
.swatch__chip {
width: 96px;
height: 64px;
border-radius: 3px;
box-shadow:
inset 0 0 0 1px rgba(0, 0, 0, 0.04),
0 2px 8px -3px rgba(31, 27, 46, 0.20);
}
.swatch__meta {
display: flex;
flex-direction: column;
gap: 0.1rem;
}
.swatch__name {
font-family: 'Bricolage Grotesque', system-ui, sans-serif;
font-variation-settings: 'opsz' 24, 'wght' 600;
letter-spacing: -0.018em;
color: var(--ink, #1f1b2e);
font-size: 1.05rem;
margin-bottom: 0.05rem;
}
.swatch__token {
font-family: 'JetBrains Mono', ui-monospace, monospace;
font-size: 0.74rem;
color: var(--iris-deep, #5e548c);
background: transparent;
padding: 0;
border: 0;
}
.swatch__hex {
font-family: 'JetBrains Mono', ui-monospace, monospace;
font-size: 0.74rem;
color: var(--ink-faint, #847b94);
background: transparent;
padding: 0;
border: 0;
}
.swatch__usage {
margin: 0.4rem 0 0;
font-size: 0.85rem;
color: var(--ink-soft, #4a4258);
line-height: 1.55;
max-width: 38rem;
font-variation-settings: 'opsz' 14, 'wght' 400;
}
:root[data-theme='dark'] .swatch { border-bottom-color: rgba(236, 230, 243, 0.10); }
:root[data-theme='dark'] .swatch__name { color: #ece6f3; }
:root[data-theme='dark'] .swatch__token { color: #c2dcec; }
:root[data-theme='dark'] .swatch__hex { color: #9c92ad; }
:root[data-theme='dark'] .swatch__usage { color: #c5bfd1; }
</style>