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/src/uix/eidos/index.css

71 lines
3.2 KiB

eidos: V1 minimum viable — tokens + archetype rules + event reactions First eidos code. Closes the cross-layer cycle that's been documented but unproven: an actual CSS layer that consumes the morfo + sema contracts and applies styles transversally without enumerating components. src/uix/eidos/ - tokens.css — motion durations (quick/fast/base) + easings (standard / emphasized / decelerate) + opacity scale (hover/disabled/faded) + intent tints (neutral/affirm/fulfill/risk/threat) + focus ring tokens. ~30 lines. No theming dimension yet — when it arrives, these are the base theme. - archetypes.css — transversal selectors keyed by `data-archetype`. Covers trigger, overlay, content, indicator, thumb, track, close, action, item, option. Plus a universal `:focus-visible` ring rule that applies to every archetype-classified element. Single attribute selector specificity — components can override freely. - events.css — reactions to perceptual signals during their ~13ms life. `[data-event^="dismiss"]` fades out, `[data-event^="announce"]` pulses with intent-tinted box-shadow, `[data-last-action]` tints exit animation by causa. - index.css — entrypoint that imports the above in cascade order. Consumer: `import '$uix/eidos/index.css'`. src/routes/test/eidos/+page.svelte (demo) - Sets up Soma + App context inline (independent of /test/soma layout). - Imports `$uix/eidos/index.css` and demonstrates the cross-layer story: - Toggle + Switch buttons share trigger styles via `[data-archetype="trigger"]` without per-component CSS. - Collapsible expands/collapses with state-driven attrs. - Toast intent buttons fire `data-event="announce" data-intent="risk|threat|affirm"`, which eidos's events.css briefly tints via box-shadow during the signal window. - Component-specific layout (positioning, switch thumb transform) lives in the page's `<style>` block — eidos provides only the cross-component baseline, NOT per-component recipes. What this proves - The runtime emits `data-archetype` correctly in browser (not just in unit tests). - A single CSS rule can target ALL triggers across all components without enumeration. Add a new component with `archetype: 'trigger'` and it inherits the styling automatically. - Sema's `data-event*` signals live in the DOM long enough for CSS to react (the ~13ms window measured by `scripts/probe-toast-dismiss.ts` is observable as a brief box-shadow flash on toasts). - The cross-layer cycle Morfo declara → Soma transcribe → Sema emite → Dom aplica → Eidos lee runs end-to-end. What V1 deliberately excludes - Theming dimension (no `[data-theme]` overrides yet). - Per-component recipes (each component will get its own CSS later). - Keyframes / @starting-style / animation primitives. - Sound / vibra (those are separate engines that subscribe to sema). Verification - /test/eidos returns 200; manual browser check shows triggers share hover dim + focus ring across components, toasts flash intent tint on appear. - 68/68 smoke routes (smoke only scans /test/soma — eidos route is outside that scope, manually verified). - svelte-check unchanged at 155 (pure CSS additions).
6 months ago
/**
eidos: phase 1 — translate air's foundation (contracts, tokens, themes/base) Translates the foundation of air's visual system into eidos: - eidos/contracts/ public token interfaces (4 root + 64 components) - eidos/tokens/ per-component token values (62 components + motion) - eidos/themes/base/ light + dark + _static + motion (4 files) Mechanical translation: `--air-*` → `--eidos-*` everywhere, relative imports preserved. The CSS is currently NOT wired into the legacy air/ folder, which stays for reference until phase 4 cleanup. The `--eidos-*` prefix is documented in eidos/index.css with the two reasons it earns its keep: 1. Authorship clarity at debug time (DevTools can identify the layer) 2. Override discipline (consumers know they're targeting public API) Phase 1 only adds the foundation without touching component recipes. The hand-rolled recipes (toast, dialog, toggle, switch, collapsible) and the legacy hand-rolled tokens.css continue to load alongside the new tree. Phase 2 will replace recipes with air-translated equivalents and reconcile the duplicate motion/tint tokens. Architectural note: air targeted terra and gated its CSS with `.air-{component}` class on a wrapper. Eidos targets soma+morfo and applies universally to the data-attrs the morfo declares — no class gates, no Svelte wrappers. The morfo layer is the one that decides which `data-*` attrs exist, which is the substantive shift between the two systems. Verification: smoke 68/68, morfo-check 66/66, focus rings + dialog entrance/exit still working per Playwright check (curve unchanged). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
5 months ago
* Eidos — visual layer entrypoint.
*
* Eidos is CSS that reads `data-*` attrs emitted by the morfo-runtime
* (via soma) and the visual channel (via sema) and applies styling.
* It does not act, it does not own state, it does not decide events.
*
* Layout (translated from the legacy `air/` layer with the architectural
* adjustments below — air targeted terra and was class-gated; eidos
* targets soma+morfo and applies universally to the data-attrs the
* morfo declares):
*
* contracts/ public token interfaces (empty declarations — themes fill)
* tokens/ per-component internal values that reference contracts
* themes/ implementations: light / dark / brand
* components/ recipes per component (compose tokens + selectors)
* archetypes transversal selectors keyed by `data-archetype`
* events reactions to `data-event-*` signals (sema visual channel)
*
eidos: pilot wrapper pattern + doctrinal API conventions Toggle as the eidos pilot: subdirectory layout (recipe + Svelte wrapper + types + index + README) replacing the flat CSS-only form. Pattern is documented in eidos/components/README.md and the toggle README. Shared types live in eidos/lib/types.ts. First export is `Size` (8 values xxs..xxl + full); components narrow with `Extract<Size, ...>` per the per-component-subset doctrine. No `Eidos` prefix on types — module path already conveys the layer. API doctrine: - soma stays compound (Toggle.Provider) for symmetry with multi-part - eidos exports both default + Provider so single-part components accept both `<Toggle>` (ergonomic) and `<Toggle.Provider>` (compound-style consumers) SoundChannel eager-init fixes the autoplay race: AudioContext is created + resumed synchronously on the first user gesture (capture-phase listener registered in the constructor), avoiding the previous race where the first emit() scheduled the resume in a microtask outside the gesture window. Demo page (web/routes/toggle/+page.svelte) restructured so the live preview renders ALWAYS above the tablist — Sema-tab Play buttons can fire on the real toggle. Motion preview amplifies scale ×8 visually only; doctrinal values stay in the <dl>. Conventions 7-13 added to src/docs/sema-implementation-guide.md covering: directory structure, wrapper composition, no Eidos prefix, soma compound vs eidos flat, iconOnly sr-only body, sound eager-init, docs-preview amplification. CLAUDE.md gets a session hand-off block listing where things stand and next concrete steps (migrate switch/collapsible/dialog/drawer/popover/ toast/avatar; wire topbar sound mute to masterGain; rename theme tokens to drop the success/warning/danger fallback aliases). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
5 months ago
* --- The `--*` token prefix ---
eidos: phase 1 — translate air's foundation (contracts, tokens, themes/base) Translates the foundation of air's visual system into eidos: - eidos/contracts/ public token interfaces (4 root + 64 components) - eidos/tokens/ per-component token values (62 components + motion) - eidos/themes/base/ light + dark + _static + motion (4 files) Mechanical translation: `--air-*` → `--eidos-*` everywhere, relative imports preserved. The CSS is currently NOT wired into the legacy air/ folder, which stays for reference until phase 4 cleanup. The `--eidos-*` prefix is documented in eidos/index.css with the two reasons it earns its keep: 1. Authorship clarity at debug time (DevTools can identify the layer) 2. Override discipline (consumers know they're targeting public API) Phase 1 only adds the foundation without touching component recipes. The hand-rolled recipes (toast, dialog, toggle, switch, collapsible) and the legacy hand-rolled tokens.css continue to load alongside the new tree. Phase 2 will replace recipes with air-translated equivalents and reconcile the duplicate motion/tint tokens. Architectural note: air targeted terra and gated its CSS with `.air-{component}` class on a wrapper. Eidos targets soma+morfo and applies universally to the data-attrs the morfo declares — no class gates, no Svelte wrappers. The morfo layer is the one that decides which `data-*` attrs exist, which is the substantive shift between the two systems. Verification: smoke 68/68, morfo-check 66/66, focus rings + dialog entrance/exit still working per Playwright check (curve unchanged). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
5 months ago
*
* In an app with a single owned design system there's no strict need for a
eidos: pilot wrapper pattern + doctrinal API conventions Toggle as the eidos pilot: subdirectory layout (recipe + Svelte wrapper + types + index + README) replacing the flat CSS-only form. Pattern is documented in eidos/components/README.md and the toggle README. Shared types live in eidos/lib/types.ts. First export is `Size` (8 values xxs..xxl + full); components narrow with `Extract<Size, ...>` per the per-component-subset doctrine. No `Eidos` prefix on types — module path already conveys the layer. API doctrine: - soma stays compound (Toggle.Provider) for symmetry with multi-part - eidos exports both default + Provider so single-part components accept both `<Toggle>` (ergonomic) and `<Toggle.Provider>` (compound-style consumers) SoundChannel eager-init fixes the autoplay race: AudioContext is created + resumed synchronously on the first user gesture (capture-phase listener registered in the constructor), avoiding the previous race where the first emit() scheduled the resume in a microtask outside the gesture window. Demo page (web/routes/toggle/+page.svelte) restructured so the live preview renders ALWAYS above the tablist — Sema-tab Play buttons can fire on the real toggle. Motion preview amplifies scale ×8 visually only; doctrinal values stay in the <dl>. Conventions 7-13 added to src/docs/sema-implementation-guide.md covering: directory structure, wrapper composition, no Eidos prefix, soma compound vs eidos flat, iconOnly sr-only body, sound eager-init, docs-preview amplification. CLAUDE.md gets a session hand-off block listing where things stand and next concrete steps (migrate switch/collapsible/dialog/drawer/popover/ toast/avatar; wire topbar sound mute to masterGain; rename theme tokens to drop the success/warning/danger fallback aliases). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
5 months ago
* prefix on custom properties: nothing else collides. We keep `--*`
eidos: phase 1 — translate air's foundation (contracts, tokens, themes/base) Translates the foundation of air's visual system into eidos: - eidos/contracts/ public token interfaces (4 root + 64 components) - eidos/tokens/ per-component token values (62 components + motion) - eidos/themes/base/ light + dark + _static + motion (4 files) Mechanical translation: `--air-*` → `--eidos-*` everywhere, relative imports preserved. The CSS is currently NOT wired into the legacy air/ folder, which stays for reference until phase 4 cleanup. The `--eidos-*` prefix is documented in eidos/index.css with the two reasons it earns its keep: 1. Authorship clarity at debug time (DevTools can identify the layer) 2. Override discipline (consumers know they're targeting public API) Phase 1 only adds the foundation without touching component recipes. The hand-rolled recipes (toast, dialog, toggle, switch, collapsible) and the legacy hand-rolled tokens.css continue to load alongside the new tree. Phase 2 will replace recipes with air-translated equivalents and reconcile the duplicate motion/tint tokens. Architectural note: air targeted terra and gated its CSS with `.air-{component}` class on a wrapper. Eidos targets soma+morfo and applies universally to the data-attrs the morfo declares — no class gates, no Svelte wrappers. The morfo layer is the one that decides which `data-*` attrs exist, which is the substantive shift between the two systems. Verification: smoke 68/68, morfo-check 66/66, focus rings + dialog entrance/exit still working per Playwright check (curve unchanged). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
5 months ago
* deliberately, for two reasons:
*
* 1. **Authorship clarity at debug time.** Inspecting an element in
eidos: pilot wrapper pattern + doctrinal API conventions Toggle as the eidos pilot: subdirectory layout (recipe + Svelte wrapper + types + index + README) replacing the flat CSS-only form. Pattern is documented in eidos/components/README.md and the toggle README. Shared types live in eidos/lib/types.ts. First export is `Size` (8 values xxs..xxl + full); components narrow with `Extract<Size, ...>` per the per-component-subset doctrine. No `Eidos` prefix on types — module path already conveys the layer. API doctrine: - soma stays compound (Toggle.Provider) for symmetry with multi-part - eidos exports both default + Provider so single-part components accept both `<Toggle>` (ergonomic) and `<Toggle.Provider>` (compound-style consumers) SoundChannel eager-init fixes the autoplay race: AudioContext is created + resumed synchronously on the first user gesture (capture-phase listener registered in the constructor), avoiding the previous race where the first emit() scheduled the resume in a microtask outside the gesture window. Demo page (web/routes/toggle/+page.svelte) restructured so the live preview renders ALWAYS above the tablist — Sema-tab Play buttons can fire on the real toggle. Motion preview amplifies scale ×8 visually only; doctrinal values stay in the <dl>. Conventions 7-13 added to src/docs/sema-implementation-guide.md covering: directory structure, wrapper composition, no Eidos prefix, soma compound vs eidos flat, iconOnly sr-only body, sound eager-init, docs-preview amplification. CLAUDE.md gets a session hand-off block listing where things stand and next concrete steps (migrate switch/collapsible/dialog/drawer/popover/ toast/avatar; wire topbar sound mute to masterGain; rename theme tokens to drop the success/warning/danger fallback aliases). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
5 months ago
* DevTools and seeing `--toggle-bg` immediately answers "this
eidos: phase 1 — translate air's foundation (contracts, tokens, themes/base) Translates the foundation of air's visual system into eidos: - eidos/contracts/ public token interfaces (4 root + 64 components) - eidos/tokens/ per-component token values (62 components + motion) - eidos/themes/base/ light + dark + _static + motion (4 files) Mechanical translation: `--air-*` → `--eidos-*` everywhere, relative imports preserved. The CSS is currently NOT wired into the legacy air/ folder, which stays for reference until phase 4 cleanup. The `--eidos-*` prefix is documented in eidos/index.css with the two reasons it earns its keep: 1. Authorship clarity at debug time (DevTools can identify the layer) 2. Override discipline (consumers know they're targeting public API) Phase 1 only adds the foundation without touching component recipes. The hand-rolled recipes (toast, dialog, toggle, switch, collapsible) and the legacy hand-rolled tokens.css continue to load alongside the new tree. Phase 2 will replace recipes with air-translated equivalents and reconcile the duplicate motion/tint tokens. Architectural note: air targeted terra and gated its CSS with `.air-{component}` class on a wrapper. Eidos targets soma+morfo and applies universally to the data-attrs the morfo declares — no class gates, no Svelte wrappers. The morfo layer is the one that decides which `data-*` attrs exist, which is the substantive shift between the two systems. Verification: smoke 68/68, morfo-check 66/66, focus rings + dialog entrance/exit still working per Playwright check (curve unchanged). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
5 months ago
* came from the visual layer of UIX". A bare `--toggle-bg` could
* come from anywhere — a third-party widget, a route-scoped style,
* an experiment.
*
eidos: pilot wrapper pattern + doctrinal API conventions Toggle as the eidos pilot: subdirectory layout (recipe + Svelte wrapper + types + index + README) replacing the flat CSS-only form. Pattern is documented in eidos/components/README.md and the toggle README. Shared types live in eidos/lib/types.ts. First export is `Size` (8 values xxs..xxl + full); components narrow with `Extract<Size, ...>` per the per-component-subset doctrine. No `Eidos` prefix on types — module path already conveys the layer. API doctrine: - soma stays compound (Toggle.Provider) for symmetry with multi-part - eidos exports both default + Provider so single-part components accept both `<Toggle>` (ergonomic) and `<Toggle.Provider>` (compound-style consumers) SoundChannel eager-init fixes the autoplay race: AudioContext is created + resumed synchronously on the first user gesture (capture-phase listener registered in the constructor), avoiding the previous race where the first emit() scheduled the resume in a microtask outside the gesture window. Demo page (web/routes/toggle/+page.svelte) restructured so the live preview renders ALWAYS above the tablist — Sema-tab Play buttons can fire on the real toggle. Motion preview amplifies scale ×8 visually only; doctrinal values stay in the <dl>. Conventions 7-13 added to src/docs/sema-implementation-guide.md covering: directory structure, wrapper composition, no Eidos prefix, soma compound vs eidos flat, iconOnly sr-only body, sound eager-init, docs-preview amplification. CLAUDE.md gets a session hand-off block listing where things stand and next concrete steps (migrate switch/collapsible/dialog/drawer/popover/ toast/avatar; wire topbar sound mute to masterGain; rename theme tokens to drop the success/warning/danger fallback aliases). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
5 months ago
* 2. **Override discipline.** A consumer overriding `--color-
eidos: phase 1 — translate air's foundation (contracts, tokens, themes/base) Translates the foundation of air's visual system into eidos: - eidos/contracts/ public token interfaces (4 root + 64 components) - eidos/tokens/ per-component token values (62 components + motion) - eidos/themes/base/ light + dark + _static + motion (4 files) Mechanical translation: `--air-*` → `--eidos-*` everywhere, relative imports preserved. The CSS is currently NOT wired into the legacy air/ folder, which stays for reference until phase 4 cleanup. The `--eidos-*` prefix is documented in eidos/index.css with the two reasons it earns its keep: 1. Authorship clarity at debug time (DevTools can identify the layer) 2. Override discipline (consumers know they're targeting public API) Phase 1 only adds the foundation without touching component recipes. The hand-rolled recipes (toast, dialog, toggle, switch, collapsible) and the legacy hand-rolled tokens.css continue to load alongside the new tree. Phase 2 will replace recipes with air-translated equivalents and reconcile the duplicate motion/tint tokens. Architectural note: air targeted terra and gated its CSS with `.air-{component}` class on a wrapper. Eidos targets soma+morfo and applies universally to the data-attrs the morfo declares — no class gates, no Svelte wrappers. The morfo layer is the one that decides which `data-*` attrs exist, which is the substantive shift between the two systems. Verification: smoke 68/68, morfo-check 66/66, focus rings + dialog entrance/exit still working per Playwright check (curve unchanged). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
5 months ago
* primary-element` knows they are overriding the visual layer
* contract, not just naming-colliding with some local variable.
* The prefix makes the public API surface explicit.
*
* Tokens are owned by eidos; recipes inside eidos consume them via
eidos: pilot wrapper pattern + doctrinal API conventions Toggle as the eidos pilot: subdirectory layout (recipe + Svelte wrapper + types + index + README) replacing the flat CSS-only form. Pattern is documented in eidos/components/README.md and the toggle README. Shared types live in eidos/lib/types.ts. First export is `Size` (8 values xxs..xxl + full); components narrow with `Extract<Size, ...>` per the per-component-subset doctrine. No `Eidos` prefix on types — module path already conveys the layer. API doctrine: - soma stays compound (Toggle.Provider) for symmetry with multi-part - eidos exports both default + Provider so single-part components accept both `<Toggle>` (ergonomic) and `<Toggle.Provider>` (compound-style consumers) SoundChannel eager-init fixes the autoplay race: AudioContext is created + resumed synchronously on the first user gesture (capture-phase listener registered in the constructor), avoiding the previous race where the first emit() scheduled the resume in a microtask outside the gesture window. Demo page (web/routes/toggle/+page.svelte) restructured so the live preview renders ALWAYS above the tablist — Sema-tab Play buttons can fire on the real toggle. Motion preview amplifies scale ×8 visually only; doctrinal values stay in the <dl>. Conventions 7-13 added to src/docs/sema-implementation-guide.md covering: directory structure, wrapper composition, no Eidos prefix, soma compound vs eidos flat, iconOnly sr-only body, sound eager-init, docs-preview amplification. CLAUDE.md gets a session hand-off block listing where things stand and next concrete steps (migrate switch/collapsible/dialog/drawer/popover/ toast/avatar; wire topbar sound mute to masterGain; rename theme tokens to drop the success/warning/danger fallback aliases). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
5 months ago
* `var(--*)`. Higher layers (sema, soma, morfo) do NOT consume
eidos: phase 1 — translate air's foundation (contracts, tokens, themes/base) Translates the foundation of air's visual system into eidos: - eidos/contracts/ public token interfaces (4 root + 64 components) - eidos/tokens/ per-component token values (62 components + motion) - eidos/themes/base/ light + dark + _static + motion (4 files) Mechanical translation: `--air-*` → `--eidos-*` everywhere, relative imports preserved. The CSS is currently NOT wired into the legacy air/ folder, which stays for reference until phase 4 cleanup. The `--eidos-*` prefix is documented in eidos/index.css with the two reasons it earns its keep: 1. Authorship clarity at debug time (DevTools can identify the layer) 2. Override discipline (consumers know they're targeting public API) Phase 1 only adds the foundation without touching component recipes. The hand-rolled recipes (toast, dialog, toggle, switch, collapsible) and the legacy hand-rolled tokens.css continue to load alongside the new tree. Phase 2 will replace recipes with air-translated equivalents and reconcile the duplicate motion/tint tokens. Architectural note: air targeted terra and gated its CSS with `.air-{component}` class on a wrapper. Eidos targets soma+morfo and applies universally to the data-attrs the morfo declares — no class gates, no Svelte wrappers. The morfo layer is the one that decides which `data-*` attrs exist, which is the substantive shift between the two systems. Verification: smoke 68/68, morfo-check 66/66, focus rings + dialog entrance/exit still working per Playwright check (curve unchanged). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
5 months ago
* these tokens and do NOT use the prefix — those layers carry their own
* concerns (perceptual durations, behavior, contract DNA) that are
* independent of visual rendering.
eidos: V1 minimum viable — tokens + archetype rules + event reactions First eidos code. Closes the cross-layer cycle that's been documented but unproven: an actual CSS layer that consumes the morfo + sema contracts and applies styles transversally without enumerating components. src/uix/eidos/ - tokens.css — motion durations (quick/fast/base) + easings (standard / emphasized / decelerate) + opacity scale (hover/disabled/faded) + intent tints (neutral/affirm/fulfill/risk/threat) + focus ring tokens. ~30 lines. No theming dimension yet — when it arrives, these are the base theme. - archetypes.css — transversal selectors keyed by `data-archetype`. Covers trigger, overlay, content, indicator, thumb, track, close, action, item, option. Plus a universal `:focus-visible` ring rule that applies to every archetype-classified element. Single attribute selector specificity — components can override freely. - events.css — reactions to perceptual signals during their ~13ms life. `[data-event^="dismiss"]` fades out, `[data-event^="announce"]` pulses with intent-tinted box-shadow, `[data-last-action]` tints exit animation by causa. - index.css — entrypoint that imports the above in cascade order. Consumer: `import '$uix/eidos/index.css'`. src/routes/test/eidos/+page.svelte (demo) - Sets up Soma + App context inline (independent of /test/soma layout). - Imports `$uix/eidos/index.css` and demonstrates the cross-layer story: - Toggle + Switch buttons share trigger styles via `[data-archetype="trigger"]` without per-component CSS. - Collapsible expands/collapses with state-driven attrs. - Toast intent buttons fire `data-event="announce" data-intent="risk|threat|affirm"`, which eidos's events.css briefly tints via box-shadow during the signal window. - Component-specific layout (positioning, switch thumb transform) lives in the page's `<style>` block — eidos provides only the cross-component baseline, NOT per-component recipes. What this proves - The runtime emits `data-archetype` correctly in browser (not just in unit tests). - A single CSS rule can target ALL triggers across all components without enumeration. Add a new component with `archetype: 'trigger'` and it inherits the styling automatically. - Sema's `data-event*` signals live in the DOM long enough for CSS to react (the ~13ms window measured by `scripts/probe-toast-dismiss.ts` is observable as a brief box-shadow flash on toasts). - The cross-layer cycle Morfo declara → Soma transcribe → Sema emite → Dom aplica → Eidos lee runs end-to-end. What V1 deliberately excludes - Theming dimension (no `[data-theme]` overrides yet). - Per-component recipes (each component will get its own CSS later). - Keyframes / @starting-style / animation primitives. - Sound / vibra (those are separate engines that subscribe to sema). Verification - /test/eidos returns 200; manual browser check shows triggers share hover dim + focus ring across components, toasts flash intent tint on appear. - 68/68 smoke routes (smoke only scans /test/soma — eidos route is outside that scope, manually verified). - svelte-check unchanged at 155 (pure CSS additions).
6 months ago
*/
eidos: phase 1 — translate air's foundation (contracts, tokens, themes/base) Translates the foundation of air's visual system into eidos: - eidos/contracts/ public token interfaces (4 root + 64 components) - eidos/tokens/ per-component token values (62 components + motion) - eidos/themes/base/ light + dark + _static + motion (4 files) Mechanical translation: `--air-*` → `--eidos-*` everywhere, relative imports preserved. The CSS is currently NOT wired into the legacy air/ folder, which stays for reference until phase 4 cleanup. The `--eidos-*` prefix is documented in eidos/index.css with the two reasons it earns its keep: 1. Authorship clarity at debug time (DevTools can identify the layer) 2. Override discipline (consumers know they're targeting public API) Phase 1 only adds the foundation without touching component recipes. The hand-rolled recipes (toast, dialog, toggle, switch, collapsible) and the legacy hand-rolled tokens.css continue to load alongside the new tree. Phase 2 will replace recipes with air-translated equivalents and reconcile the duplicate motion/tint tokens. Architectural note: air targeted terra and gated its CSS with `.air-{component}` class on a wrapper. Eidos targets soma+morfo and applies universally to the data-attrs the morfo declares — no class gates, no Svelte wrappers. The morfo layer is the one that decides which `data-*` attrs exist, which is the substantive shift between the two systems. Verification: smoke 68/68, morfo-check 66/66, focus rings + dialog entrance/exit still working per Playwright check (curve unchanged). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
5 months ago
/* ── Foundation: contracts (declarative API surfaces) ───────────────────── */
@import './contracts/contract-all.css';
@import './contracts/components/index.css';
/* ── Foundation: per-component token values referencing contracts ───────── */
@import './tokens/motion.css';
@import './tokens/components/index.css';
/* ── Theme: actual values filling the contract slots (default = base) ───── */
@import './themes/base/index.css';
/* ── Eidos-specific layers (no equivalent in air) ───────────────────────── */
eidos: V1 minimum viable — tokens + archetype rules + event reactions First eidos code. Closes the cross-layer cycle that's been documented but unproven: an actual CSS layer that consumes the morfo + sema contracts and applies styles transversally without enumerating components. src/uix/eidos/ - tokens.css — motion durations (quick/fast/base) + easings (standard / emphasized / decelerate) + opacity scale (hover/disabled/faded) + intent tints (neutral/affirm/fulfill/risk/threat) + focus ring tokens. ~30 lines. No theming dimension yet — when it arrives, these are the base theme. - archetypes.css — transversal selectors keyed by `data-archetype`. Covers trigger, overlay, content, indicator, thumb, track, close, action, item, option. Plus a universal `:focus-visible` ring rule that applies to every archetype-classified element. Single attribute selector specificity — components can override freely. - events.css — reactions to perceptual signals during their ~13ms life. `[data-event^="dismiss"]` fades out, `[data-event^="announce"]` pulses with intent-tinted box-shadow, `[data-last-action]` tints exit animation by causa. - index.css — entrypoint that imports the above in cascade order. Consumer: `import '$uix/eidos/index.css'`. src/routes/test/eidos/+page.svelte (demo) - Sets up Soma + App context inline (independent of /test/soma layout). - Imports `$uix/eidos/index.css` and demonstrates the cross-layer story: - Toggle + Switch buttons share trigger styles via `[data-archetype="trigger"]` without per-component CSS. - Collapsible expands/collapses with state-driven attrs. - Toast intent buttons fire `data-event="announce" data-intent="risk|threat|affirm"`, which eidos's events.css briefly tints via box-shadow during the signal window. - Component-specific layout (positioning, switch thumb transform) lives in the page's `<style>` block — eidos provides only the cross-component baseline, NOT per-component recipes. What this proves - The runtime emits `data-archetype` correctly in browser (not just in unit tests). - A single CSS rule can target ALL triggers across all components without enumeration. Add a new component with `archetype: 'trigger'` and it inherits the styling automatically. - Sema's `data-event*` signals live in the DOM long enough for CSS to react (the ~13ms window measured by `scripts/probe-toast-dismiss.ts` is observable as a brief box-shadow flash on toasts). - The cross-layer cycle Morfo declara → Soma transcribe → Sema emite → Dom aplica → Eidos lee runs end-to-end. What V1 deliberately excludes - Theming dimension (no `[data-theme]` overrides yet). - Per-component recipes (each component will get its own CSS later). - Keyframes / @starting-style / animation primitives. - Sound / vibra (those are separate engines that subscribe to sema). Verification - /test/eidos returns 200; manual browser check shows triggers share hover dim + focus ring across components, toasts flash intent tint on appear. - 68/68 smoke routes (smoke only scans /test/soma — eidos route is outside that scope, manually verified). - svelte-check unchanged at 155 (pure CSS additions).
6 months ago
@import './archetypes.css';
@import './events.css';
eidos: phase 1 — translate air's foundation (contracts, tokens, themes/base) Translates the foundation of air's visual system into eidos: - eidos/contracts/ public token interfaces (4 root + 64 components) - eidos/tokens/ per-component token values (62 components + motion) - eidos/themes/base/ light + dark + _static + motion (4 files) Mechanical translation: `--air-*` → `--eidos-*` everywhere, relative imports preserved. The CSS is currently NOT wired into the legacy air/ folder, which stays for reference until phase 4 cleanup. The `--eidos-*` prefix is documented in eidos/index.css with the two reasons it earns its keep: 1. Authorship clarity at debug time (DevTools can identify the layer) 2. Override discipline (consumers know they're targeting public API) Phase 1 only adds the foundation without touching component recipes. The hand-rolled recipes (toast, dialog, toggle, switch, collapsible) and the legacy hand-rolled tokens.css continue to load alongside the new tree. Phase 2 will replace recipes with air-translated equivalents and reconcile the duplicate motion/tint tokens. Architectural note: air targeted terra and gated its CSS with `.air-{component}` class on a wrapper. Eidos targets soma+morfo and applies universally to the data-attrs the morfo declares — no class gates, no Svelte wrappers. The morfo layer is the one that decides which `data-*` attrs exist, which is the substantive shift between the two systems. Verification: smoke 68/68, morfo-check 66/66, focus rings + dialog entrance/exit still working per Playwright check (curve unchanged). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
5 months ago
/* ── Component recipes (V1.5 hand-rolled; phase 2 replaces with air-translated) ── */
@import './components/toast.css';
@import './components/dialog.css';
eidos/drawer: recipe + slide-in/out per side + demo (modal & non-modal) Translates `air/components/drawer/drawer.css` to `eidos/components/ drawer.css` (mechanical: --air-* → --eidos-*, drop .air-* gates) and adds the entrance/exit animations air's recipe was missing — air drove drawer transitions through `air.semantic.contextIn/Out` Svelte transitions, which don't exist in the morfo-driven path. Without them the drawer snapped in/out instantly. Per-side keyframes: right → translateX(100%) left → translateX(-100%) top → translateY(-100%) bottom → translateY(100%) Plus overlay fade keyed off data-state. All ~240ms entrance / 180ms exit (moderate / normal). The Presence layer waits for getAnimations().finished so the content stays mounted during exit. Demo (test/eidos/drawer): - Modal section: 4 side buttons, render Drawer.Overlay (backdrop + focus trap, page non-interactive while open). - Non-modal section: 4 side buttons, omit Drawer.Overlay + pass modal={false}. No backdrop. Page behind stays interactive. Soma's Dismissal layer auto-adjusts (interactOutsideBehavior default flips from 'ignore' to 'close'). The Drawer morfo doesn't declare `events` yet, so no runtime.trigger() cadence + no exit-tinting like Dialog. Recipe + animations only. Verification (playwright probe): top t=140ms translateY(-372) → t=406ms 0 right t=99ms translateX(452) → t=389ms 0 bottom t=94ms translateY(372) → t=390ms 0 left t=111ms translateX(-349) → t=428ms 0 Smoke 68/68, morfo-check 66/66. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
5 months ago
@import './components/drawer.css';
@import './components/popover.css';
@import './components/tooltip.css';
eidos: pilot wrapper pattern + doctrinal API conventions Toggle as the eidos pilot: subdirectory layout (recipe + Svelte wrapper + types + index + README) replacing the flat CSS-only form. Pattern is documented in eidos/components/README.md and the toggle README. Shared types live in eidos/lib/types.ts. First export is `Size` (8 values xxs..xxl + full); components narrow with `Extract<Size, ...>` per the per-component-subset doctrine. No `Eidos` prefix on types — module path already conveys the layer. API doctrine: - soma stays compound (Toggle.Provider) for symmetry with multi-part - eidos exports both default + Provider so single-part components accept both `<Toggle>` (ergonomic) and `<Toggle.Provider>` (compound-style consumers) SoundChannel eager-init fixes the autoplay race: AudioContext is created + resumed synchronously on the first user gesture (capture-phase listener registered in the constructor), avoiding the previous race where the first emit() scheduled the resume in a microtask outside the gesture window. Demo page (web/routes/toggle/+page.svelte) restructured so the live preview renders ALWAYS above the tablist — Sema-tab Play buttons can fire on the real toggle. Motion preview amplifies scale ×8 visually only; doctrinal values stay in the <dl>. Conventions 7-13 added to src/docs/sema-implementation-guide.md covering: directory structure, wrapper composition, no Eidos prefix, soma compound vs eidos flat, iconOnly sr-only body, sound eager-init, docs-preview amplification. CLAUDE.md gets a session hand-off block listing where things stand and next concrete steps (migrate switch/collapsible/dialog/drawer/popover/ toast/avatar; wire topbar sound mute to masterGain; rename theme tokens to drop the success/warning/danger fallback aliases). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
5 months ago
@import './components/toggle/toggle.css';
docs + switch: align active docs to canon, migrate switch to eidos wrapper Phase 4 (docs alignment with the canonical guide): - active_architecture.md — Dialog example refactored to the new event shape (target inside semantic, explicit verb + sequence). Verbs table grouped by family with the post-canon vocabulary (select/ toggle moved to commit, edit removed from handle, new verbs added). Section 10 (Estado actual) updated to 2026-05-08 with current progress: doctrina cerrada, eidos en producción, SoundChannel eager-init, switch migrated, etc. "Para profundizar" §14 points at the canonical guide. - morfo/README.md — Step 5.5 added covering the doctrinal event shape with all fields (semantic.family, .verb, .target, .sequence, .intent) and the two naming shapes ({verb}-{variant} and {family}-{verb}). - sema/README.md — verbs section restructured to Record-by-family matching the runtime; documents the verbs that moved between families per the canon. Naming shapes section updated with both forms and validateEventName signature. - CLAUDE.md — "Session hand-off" rewritten with the post-canon state. Pointer at GUIA_IMPLEMENTACION_SEMAUIX.md as the canonical source. Pending list refreshed: switch is the immediate next component, persistence/a11ySemantic/polymorphism deferred until real consumers appear. Switch migration to the eidos wrapper pattern: - morfo/components/switch.ts — adds events: [{ commit-toggle }] with the doctrinal shape (verb=toggle, sequence=post, intent fromProp binding to the 4 supported intents). New data-* (data-color with the 6-token Toggle/Switch subset, data-readonly, data-invalid, data-required) and corresponding aria-*. scope expanded to ['soma', 'sema']. - soma/components/switch/types.ts — adds intent, color, readonly, invalid, aria-labelledby props with full JSDoc. Subset constrained per guide §3.1 (Toggle/Switch row). - soma/components/switch/switch-provider.svelte.ts — runtime-direct, Field integration via FieldProvider.get(), isDisabled/isReadonly/ isRequired/isInvalid OR-merge derivations, intent ↔ color resolution (intent wins when evaluative), runtime.trigger( 'commit-toggle') in onclick. - soma/components/switch/components/switch.svelte — wires the new props through bindProps. - eidos/components/switch/{switch.css, switch.svelte, types.ts, index.ts, README.md} — full subdirectory pattern, mirroring toggle. Recipe drops legacy success/warning/danger/info selectors; declares the 6 doctrinal data-color values directly. Wrapper auto-renders Switch.Thumb inside the track and exposes an optional `thumb` snippet for in-thumb glyphs. - eidos/components/switch.css (legacy flat) deleted; eidos/index.css updated to import the subdirectory recipe. - web/routes/switch/+page.svelte — interactive testbed with all soma props as live controls + tabs (Live, Soma, Morfo, Sema, Eidos, Notes). Mirrors toggle's structure. npm run check holds at the 39-error baseline. Tests 217/217 green. Pending: - Migrate collapsible / dialog / drawer / popover / toast / avatar to the eidos wrapper pattern. - Persistence + holds-by-intent — defer until first signal.warn / signal.alert consumer. - a11ySemantic + polymorphic events — defer until concrete need. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
5 months ago
@import './components/switch/switch.css';
collapsible: migrate to eidos wrapper pattern (third pilot) Third component migrated to the eidos wrapper subdirectory pattern, following the new "check air baseline first" discipline. Air baseline recovered from commit 0a391408^: - air/components/collapsible: 3 wrappers (Provider/Trigger/Content) with `class` passthrough, `bind:open`, `onOpenChange`, manual `air.interaction.play('expansion', enter|exit)` perceptual emit. - No size, intent, color, or chevron slot. Migration decisions (presented BEFORE coding per scope-approval rule): - Two doctrinal events (`expand` + `collapse`, both emerge family, sequence='pre', no intent — emerge is transitional). Replaces air's manual `air.interaction.play` with `runtime.trigger('expand'| 'collapse')` which atravieses visual + sound + vibra channels. - No intent/color/size — air didn't have them and disclosure is non-evaluative per guide §3.1. - Multi-part API: Provider + Trigger + Content (no flat default per doctrine §10). Files: - src/uix/morfo/components/collapsible.ts: scope expanded to ['soma', 'sema'], events array added with two emerge events. - src/uix/soma/components/collapsible/collapsible-provider.svelte.ts: runtime.events handlers `expand`/`collapse` mutate state; toggle() fires runtime.trigger(next ? 'expand' : 'collapse'). - src/uix/eidos/components/collapsible/{collapsible.css, collapsible-provider.svelte, collapsible-trigger.svelte, collapsible-content.svelte, types.ts, index.ts, README.md}. - src/uix/eidos/components/collapsible.css (legacy flat) deleted. - src/uix/eidos/index.css: import path updated to subdirectory. - web/routes/collapsible/+page.svelte: full interactive testbed with tabs (Live, Soma, Morfo, Sema, Eidos, Notes) mirroring switch's structure. Sema tab shows per-channel signature cards for both expand and collapse events. Disciplina formalizada en CLAUDE.md hand-off + memory entry: "Check air baseline first" before any future eidos migration. Switch shipped without this check and lost ResponsiveProp<Size> (regression). Don't repeat with collapsible/dialog/drawer/popover/toast/avatar. npm run check holds at the 39-error baseline. Tests 218/218 green. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
5 months ago
@import './components/collapsible/collapsible.css';
@import './components/accordion.css';
@import './components/tabs.css';
@import './components/checkbox.css';

Powered by TurnKey Linux.