diff --git a/continue.md b/continue.md index 900c2bac0..929c376e2 100644 --- a/continue.md +++ b/continue.md @@ -101,6 +101,12 @@ Actualizacion 2026-05-16: como texto sin enlace. - Guardia nueva: los links relativos entre README de componentes Soma deben apuntar a documentos existentes. + - Cerrado: los imports internos de produccion de Soma ya no usan el alias + publico `$soma`; Drawer, Toast, Toggle, Switch, Dismissal, Floating y + `types` pasan a imports relativos. + - Guardia nueva: `src/uix/contracts.test.ts` rechaza imports internos de + Soma hacia su propio alias publico, dejando `$soma/*` para consumidores + externos y tests de superficie. - Smoke Playwright de rutas `/uix` actuales cerrado: `/uix`, Accordion, Checkbox, Collapsible, Dialog, Drawer, Popover, RadioGroup, Switch, Tabs, Toast, Toggle y Tooltip cargan con HTTP 200, diff --git a/src/uix/contracts.test.ts b/src/uix/contracts.test.ts index 524f8d8ba..727b8133f 100644 --- a/src/uix/contracts.test.ts +++ b/src/uix/contracts.test.ts @@ -390,6 +390,17 @@ describe('UIX layer contracts', () => { expect(violations).toEqual([]); }); + it('guards Soma internals from importing their own public alias', () => { + const violations = listSourceFiles(join(HERE, 'soma')) + .filter((file) => { + const source = stripComments(readFileSync(file, 'utf8')); + return /from ['"]\$soma(?:['"]|\/)/.test(source); + }) + .map((file) => file.replace(REPO_ROOT, '')); + + expect(violations).toEqual([]); + }); + it('guards Soma from direct mutable DOM writes', () => { const violations = grepSources( join(HERE, 'soma'), diff --git a/src/uix/soma/components/drawer/drawer-provider.svelte.ts b/src/uix/soma/components/drawer/drawer-provider.svelte.ts index 561cc3f48..20e976dc0 100644 --- a/src/uix/soma/components/drawer/drawer-provider.svelte.ts +++ b/src/uix/soma/components/drawer/drawer-provider.svelte.ts @@ -32,7 +32,7 @@ import type { DragDirection } from '../../layers/gesture'; import { DRAWER_LANGS } from './langs'; import { drawerMorfo } from '../../../morfo/components/drawer'; -import { type SomaRuntime, type SomaRuntimePart } from '$soma'; +import type { SomaRuntime, SomaRuntimePart } from '../../runtime.svelte'; import type { SemaSignatureOverride } from '$uix/sema'; import type { TimerHandle } from '$timer'; diff --git a/src/uix/soma/components/switch/components/switch.svelte b/src/uix/soma/components/switch/components/switch.svelte index 1b6c2fffb..e33a94656 100644 --- a/src/uix/soma/components/switch/components/switch.svelte +++ b/src/uix/soma/components/switch/components/switch.svelte @@ -1,5 +1,5 @@