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

68 lines
3.1 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)
*
* --- The `--eidos-*` token prefix ---
*
* In an app with a single owned design system there's no strict need for a
* prefix on custom properties: nothing else collides. We keep `--eidos-*`
* deliberately, for two reasons:
*
* 1. **Authorship clarity at debug time.** Inspecting an element in
* DevTools and seeing `--eidos-toggle-bg` immediately answers "this
* 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.
*
* 2. **Override discipline.** A consumer overriding `--eidos-color-
* 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
* `var(--eidos-*)`. Higher layers (sema, soma, morfo) do NOT consume
* 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';
@import './components/toggle.css';
@import './components/switch.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
@import './components/collapsible.css';

Powered by TurnKey Linux.