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.svelte

20 lines
759 B

<script lang="ts">
// Root layout — minimal passthrough.
//
// The previous version owned the docs chrome (topbar / rail / canvas)
// AND its own `createActiveUix(...)`. Both responsibilities now live in
// `web/routes/uix/+layout@.svelte`, which is the only layout that
// renders documentation pages. Keeping the bootstrap here too caused
// every `/uix/*` page to mount two UIX contexts (the inner one shadowed
// the outer one but both ran the side-effects) and double-wrapped the
// canvas with two topbars.
//
// Anything global to the whole app (favicon, html `lang`, etc.) belongs
// here. Component CSS, fonts, and the active-uix lifecycle stay in the
// `/uix` layout.
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
let { children } = $props();
</script>
{@render children?.()}

Powered by TurnKey Linux.