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/temas/animations/+layout.svelte

41 lines
1.5 KiB

<script lang="ts">
/**
* Runtime context for the motion demo's component section (P2+).
*
* Boots a minimal ActiveUix + Soma + ActiveEidos so the page can render
* real eidos components (Dialog / Popover / Drawer / Toast) with the
* `motion` prop. The foundation CSS (which carries the generated motion
* presets) is imported here; ActiveEidos runs with `applyDom: false`
* because the static import already provides the tokens — the runtime is
* here for the component context, not for CSS injection. Theme + reduced
* motion are projected to `document.documentElement` by the page so they
* also cover portaled content (Dialog / Popover / Drawer / Toast).
*/
import { onDestroy } from 'svelte'
import { createActiveUix, setActiveUix } from '$active-uix'
import { Soma } from '$soma/core/soma.svelte'
import { siumLangs } from '$sium/langs/langs'
import { secsLangs } from '$libs/secs'
import { ActiveEidos } from '$uix/eidos'
import '@/uix/eidos/index.css'
let { children } = $props()
const uix = createActiveUix({
langs: { schema: { sium: siumLangs, secs: secsLangs }, defaultLocale: 'es' as const },
// `sound: true` so the demo's component interactions are audible — each Button's
// contact press and the overlay components' firmas. haptic stays off.
events: { sound: true, haptic: false }
})
setActiveUix(uix)
Soma.create()
const eidos = ActiveEidos.create({ applyDom: false })
onDestroy(() => {
eidos.dispose()
uix.dispose()
})
</script>
{@render children?.()}

Powered by TurnKey Linux.