You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
svelte-kit-vice/web/routes/layout.css

92 lines
1.3 KiB

demos: web/routes/* for the 8 migrated soma components First demos under the new web/routes location (configured by phase C of the cleanup as `kit.files.routes`). One demo per component: toggle, switch, collapsible, avatar, dialog, drawer, popover, toast. Layout (web/routes/+layout.svelte): - Bootstraps the UIX via createActiveUix({ lang: { schema: {}, defaultLocale: 'es' } }) — minimal config, full UIX surface. - Wraps in <Uix> which sets the active-uix context and creates the Soma scope so providers can require it. - Imports the eidos index.css so the visual layer is applied. - Tiny demo-only stylesheet (web/routes/layout.css) for the page chrome (topbar, demo grid, sections) — explicitly NOT part of eidos. Each demo page exercises the public API: - toggle: bound, initially-pressed, disabled - switch: bound, disabled - collapsible: bound show/hide, disabled trigger - avatar: loaded, error fallback, delayed - dialog: basic with overlay + focus trap + escape dismissal - drawer: right / left / bottom (with handle) - popover: click + hover trigger - toast: 4 intents (fulfill, risk, threat, neutral) via createToaster Verified end-to-end with scripts/demo-probe.ts (Playwright): - All 9 routes (landing + 8 demos) serve 200. - Zero console errors except avatar's pravatar.cc network failure (sandbox limitation, not a real bug). - Interactive checks: dialog open shows modal + overlay backdrop + focused Cancel button; popover open positions floating content next to trigger; toast Fulfill shows the green-tinted shadow driven by data-event-intent='fulfill' from sema's visual channel reacting to the morfo's announce event semantics — confirms the full morfo → sema → eidos pipeline works end-to-end on a migrated soma component. scripts/demo-probe.ts: small Playwright runner that loads each route, captures console errors, takes a screenshot of the static state, then clicks the trigger on dialog/collapsible/popover/toast for a second "open" screenshot. Output goes to g:/tmp/demos/. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
5 months ago
/* Demo-only layout. Not part of eidos. */
:root {
color-scheme: light;
font-family: system-ui, -apple-system, 'Segoe UI', sans-serif;
background: #fafafa;
color: #1a1a1a;
}
body {
margin: 0;
min-height: 100vh;
}
.topbar {
display: flex;
align-items: center;
gap: 1rem;
padding: 0.75rem 1.25rem;
border-bottom: 1px solid #e6e6e6;
background: #fff;
font-weight: 600;
position: sticky;
top: 0;
z-index: 10;
}
.topbar a {
color: inherit;
text-decoration: none;
}
main {
max-width: 64rem;
margin: 0 auto;
padding: 2rem 1.25rem 4rem;
}
h1 {
font-size: 1.6rem;
margin: 0 0 1rem;
}
h2 {
font-size: 1.15rem;
margin: 2rem 0 0.75rem;
}
p {
line-height: 1.5;
color: #444;
}
.demo-grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
gap: 0.75rem;
margin-top: 1.5rem;
}
.demo-grid a {
display: block;
padding: 1rem;
border: 1px solid #e0e0e0;
border-radius: 8px;
background: #fff;
color: inherit;
text-decoration: none;
transition: border-color 150ms;
}
.demo-grid a:hover {
border-color: #888;
}
.demo-grid strong {
display: block;
margin-bottom: 0.25rem;
}
.demo-grid small {
color: #666;
}
.demo-section {
margin: 1.5rem 0;
padding: 1.25rem;
border: 1px solid #e6e6e6;
border-radius: 8px;
background: #fff;
}
.demo-row {
display: flex;
flex-wrap: wrap;
gap: 0.75rem;
align-items: center;
}

Powered by TurnKey Linux.