CLose story 1.2
This commit is contained in:
@@ -0,0 +1,3 @@
|
||||
// All selectors MUST be scoped under .scrying-pool.
|
||||
// Use --sp-* tokens only — no Foundry --color-* / --font-* / --border-* tokens allowed.
|
||||
// Implemented in story 1.5+.
|
||||
@@ -0,0 +1,3 @@
|
||||
// All selectors MUST be scoped under .scrying-pool.
|
||||
// Use --sp-* tokens only — no Foundry --color-* / --font-* / --border-* tokens allowed.
|
||||
// Implemented in story 1.5+.
|
||||
@@ -0,0 +1,3 @@
|
||||
// All selectors MUST be scoped under .scrying-pool.
|
||||
// Use --sp-* tokens only — no Foundry --color-* / --font-* / --border-* tokens allowed.
|
||||
// Implemented in story 1.5+.
|
||||
@@ -0,0 +1,3 @@
|
||||
// All selectors MUST be scoped under .scrying-pool.
|
||||
// Use --sp-* tokens only — no Foundry --color-* / --font-* / --border-* tokens allowed.
|
||||
// Implemented in story 1.5+.
|
||||
@@ -0,0 +1,3 @@
|
||||
// All selectors MUST be scoped under .scrying-pool.
|
||||
// Use --sp-* tokens only — no Foundry --color-* / --font-* / --border-* tokens allowed.
|
||||
// Implemented in story 1.5+.
|
||||
@@ -0,0 +1,3 @@
|
||||
// All selectors MUST be scoped under .scrying-pool.
|
||||
// Use --sp-* tokens only — no Foundry --color-* / --font-* / --border-* tokens allowed.
|
||||
// Implemented in story 1.5+.
|
||||
@@ -0,0 +1,3 @@
|
||||
// All selectors MUST be scoped under .scrying-pool.
|
||||
// Use --sp-* tokens only — no Foundry --color-* / --font-* / --border-* tokens allowed.
|
||||
// Implemented in story 1.5+.
|
||||
@@ -0,0 +1,55 @@
|
||||
/**
|
||||
* styles/scrying-pool.less — Entry point (@imports only)
|
||||
*
|
||||
* Build: npm run build → dist/styles/scrying-pool.css
|
||||
* Watch: npm run watch (chokidar detects changes in @import-ed partials)
|
||||
*
|
||||
* Import order: tokens (base → states → motion → focus) → components
|
||||
*/
|
||||
|
||||
// ── Token layers ─────────────────────────────────────────────────────────────
|
||||
@import "tokens/_base.less";
|
||||
@import "tokens/_states.less";
|
||||
@import "tokens/_motion.less";
|
||||
@import "tokens/_focus.less";
|
||||
|
||||
// ── Component styles ──────────────────────────────────────────────────────────
|
||||
@import "components/_participant-card.less";
|
||||
@import "components/_roster-strip.less";
|
||||
@import "components/_directors-board.less";
|
||||
@import "components/_scene-preset-panel.less";
|
||||
@import "components/_notification.less";
|
||||
@import "components/_player-badge.less";
|
||||
@import "components/_player-panel.less";
|
||||
|
||||
/*
|
||||
* VisibilityBadge :root exception
|
||||
* ─────────────────────────────────────────────────────────────────────────────
|
||||
* PlayerStatusBadge (FR-22) is mounted directly onto Foundry's AV tile DOM,
|
||||
* OUTSIDE the .scrying-pool root element. Its state tokens must therefore be
|
||||
* declared on :root rather than scoped under .scrying-pool.
|
||||
*
|
||||
* This is an intentional architectural exception — all other module CSS MUST
|
||||
* remain scoped under .scrying-pool. Do not add additional :root declarations
|
||||
* without documenting the architectural reason here.
|
||||
*
|
||||
* The badge tokens are a subset of the Layer 2 state tokens declared in
|
||||
* _states.less, re-exported on :root for badge accessibility outside the root.
|
||||
*/
|
||||
:root {
|
||||
--sp-badge-state-active-bg: var(--sp-state-active-bg);
|
||||
--sp-badge-state-active-text: var(--sp-state-active-text);
|
||||
--sp-badge-state-hidden-bg: var(--sp-state-hidden-bg);
|
||||
--sp-badge-state-hidden-text: var(--sp-state-hidden-text);
|
||||
--sp-badge-state-self-muted-bg: var(--sp-state-self-muted-bg);
|
||||
--sp-badge-state-self-muted-text: var(--sp-state-self-muted-text);
|
||||
--sp-badge-state-offline-bg: var(--sp-state-offline-bg);
|
||||
--sp-badge-state-offline-text: var(--sp-state-offline-text);
|
||||
--sp-badge-state-cam-lost-bg: var(--sp-state-cam-lost-bg);
|
||||
--sp-badge-state-cam-lost-text: var(--sp-state-cam-lost-text);
|
||||
--sp-badge-state-reconnecting-bg: var(--sp-state-reconnecting-bg);
|
||||
--sp-badge-state-reconnecting-text: var(--sp-state-reconnecting-text);
|
||||
/* Badge surface & text (badge mounts outside .scrying-pool root) */
|
||||
--sp-badge-surface: var(--sp-badge-bg, rgba(0, 0, 0, 0.72));
|
||||
--sp-badge-color: var(--sp-badge-text, #dde2e8);
|
||||
}
|
||||
@@ -0,0 +1,59 @@
|
||||
/**
|
||||
* styles/tokens/_base.less
|
||||
*
|
||||
* Layer 1 — SP Semantic Alias Tokens
|
||||
*
|
||||
* Thin alias layer mapping to Foundry CSS tokens in one place.
|
||||
* If Foundry renames or shifts token semantics between versions,
|
||||
* only this layer needs updating.
|
||||
*
|
||||
* RULE: All Foundry --color-* / --font-* / --border-* tokens are FORBIDDEN
|
||||
* inside .scrying-pool CSS. Always use --sp-* aliases. This is the sole
|
||||
* enforcement point for the semantic layer.
|
||||
*
|
||||
* Every token includes a hardcoded fallback for environments where the
|
||||
* upstream Foundry token is absent.
|
||||
*/
|
||||
|
||||
:root {
|
||||
/* Surface & structure */
|
||||
--sp-surface: var(--sp-theme-surface, var(--color-bg-option, #141618));
|
||||
--sp-surface-raised: var(--sp-theme-surface-raised, #1c1f22);
|
||||
--sp-border: var(--sp-theme-border, var(--color-border, #282c30));
|
||||
|
||||
/* Typography */
|
||||
--sp-text-primary: var(--sp-theme-text-primary, var(--color-text-primary, #dde2e8));
|
||||
--sp-text-secondary: var(--sp-theme-text-secondary,var(--color-text-secondary, #7a8390));
|
||||
--sp-text-muted: var(--sp-theme-text-muted, #555d66);
|
||||
|
||||
/* Accent & interaction */
|
||||
--sp-accent: var(--sp-theme-accent, var(--color-warm-2, #4a9e6b));
|
||||
--sp-surface-interactive: var(--sp-theme-interactive, #242830);
|
||||
--sp-control-bg: var(--sp-theme-control, #1a1d20);
|
||||
|
||||
/* Focus ring — module-wide keyboard navigation anchor */
|
||||
--sp-focus: var(--sp-theme-focus, var(--color-focus-outline, #63c287));
|
||||
--sp-focus-ring: 0 0 0 2px var(--sp-focus);
|
||||
|
||||
/* Badge */
|
||||
--sp-badge-bg: rgba(0, 0, 0, 0.72);
|
||||
--sp-badge-text: var(--sp-text-primary);
|
||||
|
||||
/* Background operations = no toast ever (silent by design) */
|
||||
}
|
||||
|
||||
/* Theme overrides — dark theme defaults */
|
||||
.scrying-pool,
|
||||
:root[data-color-scheme="dark"] {
|
||||
--sp-theme-surface: #141618;
|
||||
--sp-theme-surface-raised: #1c1f22;
|
||||
--sp-theme-border: #282c30;
|
||||
--sp-theme-text-primary: #dde2e8;
|
||||
--sp-theme-text-secondary: #7a8390;
|
||||
--sp-theme-text-muted: #555d66;
|
||||
--sp-theme-accent: #4a9e6b;
|
||||
--sp-theme-interactive: #242830;
|
||||
--sp-theme-control: #1a1d20;
|
||||
--sp-theme-focus: #63c287;
|
||||
--sp-theme-urgency: #c8982a;
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
/**
|
||||
* styles/tokens/_focus.less
|
||||
*
|
||||
* Module-wide focus ring pattern.
|
||||
*
|
||||
* High-contrast outer ring + inner offset that must survive all 9 state
|
||||
* background combinations and both Foundry dark/light themes.
|
||||
* Never rely on browser default focus outline alone.
|
||||
*
|
||||
* Applied via: .scrying-pool *:focus-visible
|
||||
*/
|
||||
|
||||
.scrying-pool {
|
||||
*:focus-visible {
|
||||
outline: none; /* suppress browser default - visible fallback via box-shadow */
|
||||
box-shadow: var(--sp-focus-ring), 0 0 0 4px var(--sp-surface);
|
||||
/* Inner offset (--sp-surface) creates separation so the ring is visible
|
||||
against any state background. The outer ring uses --sp-focus (#63c287).
|
||||
NOTE: Parent containers must NOT have overflow:hidden to avoid clipping. */
|
||||
}
|
||||
|
||||
/* Elevated contrast for interactive elements with state backgrounds */
|
||||
[role="button"]:focus-visible,
|
||||
button:focus-visible {
|
||||
outline: none;
|
||||
box-shadow:
|
||||
0 0 0 2px var(--sp-surface), /* inner offset */
|
||||
0 0 0 4px var(--sp-focus); /* outer ring */
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,80 @@
|
||||
/**
|
||||
* styles/tokens/_motion.less
|
||||
*
|
||||
* Layer 3/4 — SP Urgency Tier & Motion Tokens
|
||||
*
|
||||
* ALL animated token usages MUST be inside:
|
||||
* @media (prefers-reduced-motion: no-preference) { ... }
|
||||
*
|
||||
* Fallback (reduced motion): instant state change with icon/state signal only.
|
||||
* No layout/size animations — only opacity, background-color, border-color.
|
||||
*
|
||||
* Motion tokens:
|
||||
* --sp-fade-hide : Player client opacity fade on hide (300–500ms ease-out)
|
||||
* --sp-pulse-reconnecting : StateRing pulse for reconnecting state (lighthouse rhythm)
|
||||
* --sp-shimmer-degraded : cam-lost shimmer (single blink, not looping)
|
||||
* --sp-toast-delay : Director-cue toast delay after hide action
|
||||
*/
|
||||
|
||||
/* ─── Motion token values ─────────────────────────────────────────────────── */
|
||||
|
||||
:root {
|
||||
--sp-fade-hide: 300ms ease-out; /* Player only — GM sees instant state change */
|
||||
--sp-pulse-reconnecting: 1.5s ease-in-out infinite;
|
||||
--sp-shimmer-degraded: 800ms ease-in-out 1; /* single blink, not looping */
|
||||
--sp-toast-delay: 1s; /* Director-cue toast delay */
|
||||
--sp-transition-state: 200ms ease-out; /* Generic state token transition */
|
||||
|
||||
/* Urgency tokens (Layer 3 per AC7) — NEVER inherit Foundry error/warn colours */
|
||||
/* Director cues = deliberate stage direction, not a failure. */
|
||||
--sp-urgency-director: var(--sp-theme-urgency, #c8982a);
|
||||
--sp-urgency-awareness: var(--sp-text-secondary);
|
||||
}
|
||||
|
||||
/* ─── Keyframe animations ─────────────────────────────────────────────────── */
|
||||
|
||||
@media (prefers-reduced-motion: no-preference) {
|
||||
@keyframes sp-pulse {
|
||||
0%, 100% { opacity: 1; }
|
||||
50% { opacity: 0.45; }
|
||||
}
|
||||
|
||||
@keyframes sp-shimmer {
|
||||
0% { opacity: 1; }
|
||||
50% { opacity: 0.3; }
|
||||
100% { opacity: 1; }
|
||||
}
|
||||
|
||||
@keyframes sp-fade-out {
|
||||
from { opacity: 1; }
|
||||
to { opacity: 0; }
|
||||
}
|
||||
|
||||
/* Reconnecting ring pulse — applied via .sp-state-ring--pulse */
|
||||
.sp-state-ring--pulse {
|
||||
animation: sp-pulse var(--sp-pulse-reconnecting);
|
||||
}
|
||||
|
||||
/* cam-lost shimmer — applied via .sp-state-cam-lost */
|
||||
.sp-state-cam-lost .sp-state-ring--dashed {
|
||||
animation: sp-shimmer var(--sp-shimmer-degraded);
|
||||
}
|
||||
}
|
||||
|
||||
/* ─── Reduced motion overrides (global) ──────────────────────────────────── */
|
||||
|
||||
@media (prefers-reduced-motion: reduce) {
|
||||
/* Target specific animated elements instead of universal selector */
|
||||
.sp-state-ring--pulse,
|
||||
.sp-state-cam-lost .sp-state-ring--dashed {
|
||||
animation: none;
|
||||
transition: none;
|
||||
}
|
||||
}
|
||||
|
||||
/* ─── Allowed transitions (opacity, background-color, border-color only) ─── */
|
||||
/*
|
||||
Transitions on layout properties (width, height, max-height, transform) are
|
||||
forbidden except for the ScryingPoolStrip collapsed ↔ expanded toggle which
|
||||
uses max-width exclusively (never width animation).
|
||||
*/
|
||||
@@ -0,0 +1,101 @@
|
||||
/**
|
||||
* styles/tokens/_states.less
|
||||
*
|
||||
* Layer 2 — SP Participant State Tokens
|
||||
*
|
||||
* All 8 participant states + 1 pending state (9 total).
|
||||
* Each state provides three CSS custom properties:
|
||||
* --sp-state-{name}-text — foreground / icon colour
|
||||
* --sp-state-{name}-border — ring / border colour
|
||||
* --sp-state-{name}-bg — background tint colour
|
||||
*
|
||||
* SECOND-SIGNAL RULE (WCAG):
|
||||
* Every state conveys meaning via THREE independent channels:
|
||||
* colour + icon (Font Awesome codepoint) + shape (ring variant).
|
||||
* States marked ⚠️ below have low contrast ratios and MUST NOT
|
||||
* appear as text or small-pill foreground — icon + shape carry the signal.
|
||||
*
|
||||
* State precedence (VisibilityManager/RoleRenderer resolves; CSS never handles multi-state):
|
||||
* pending > cam-lost > reconnecting > offline > never-connected > self-muted > hidden > ghost > active
|
||||
*
|
||||
* LESS state map — single source of truth for loop-generated component CSS.
|
||||
*/
|
||||
|
||||
/* ─── State colour variables ─────────────────────────────────────────────── */
|
||||
|
||||
:root {
|
||||
/* active — Intentional / positive */
|
||||
/* ✅ WCAG AA safe */
|
||||
--sp-state-active-text: #4a9e6b;
|
||||
--sp-state-active-border: #4a9e6b;
|
||||
--sp-state-active-bg: rgba(74, 158, 107, 0.12);
|
||||
|
||||
/* hidden — Intentional / deliberate (GM action) */
|
||||
/* ⚠️ Low contrast (~3.75:1) — icon + dashed ring carry the signal */
|
||||
--sp-state-hidden-text: #6b7280;
|
||||
--sp-state-hidden-border: #6b7280;
|
||||
--sp-state-hidden-bg: rgba(107, 114, 128, 0.10);
|
||||
|
||||
/* self-muted — Self / player's own choice */
|
||||
/* ✅ WCAG AA safe */
|
||||
--sp-state-self-muted-text: #8b92a5;
|
||||
--sp-state-self-muted-border: #8b92a5;
|
||||
--sp-state-self-muted-bg: rgba(139, 146, 165, 0.10);
|
||||
|
||||
/* offline — Technical / disconnected */
|
||||
/* ⚠️ Low contrast (~2.4:1) — icon + no-ring shape carry the signal */
|
||||
--sp-state-offline-text: #4b5563;
|
||||
--sp-state-offline-border: #4b5563;
|
||||
--sp-state-offline-bg: rgba(75, 85, 99, 0.08);
|
||||
|
||||
/* cam-lost — Technical / camera failure */
|
||||
/* ✅ WCAG AA safe */
|
||||
--sp-state-cam-lost-text: #9ca3af;
|
||||
--sp-state-cam-lost-border: #9ca3af;
|
||||
--sp-state-cam-lost-bg: rgba(156, 163, 175, 0.10);
|
||||
|
||||
/* reconnecting — Technical / in-progress */
|
||||
/* ✅ WCAG AA safe */
|
||||
--sp-state-reconnecting-text: #c8982a;
|
||||
--sp-state-reconnecting-border: #c8982a;
|
||||
--sp-state-reconnecting-bg: rgba(200, 152, 42, 0.12);
|
||||
|
||||
/* never-connected — Passive / never joined */
|
||||
/* ⚠️ Low contrast (~1.76:1) — empty circle + no icon carries the signal */
|
||||
--sp-state-never-connected-text: #374151;
|
||||
--sp-state-never-connected-border: #374151;
|
||||
--sp-state-never-connected-bg: rgba(55, 65, 81, 0.06);
|
||||
|
||||
/* ghost — Passive / placeholder slot */
|
||||
/* ⚠️ Very low contrast (~1.24:1) — ghost icon + dotted ring, lowest opacity */
|
||||
--sp-state-ghost-text: #1f2937;
|
||||
--sp-state-ghost-border: #1f2937;
|
||||
--sp-state-ghost-bg: rgba(31, 41, 55, 0.04);
|
||||
|
||||
/* pending — Optimistic UI in-flight (transient; never persisted) */
|
||||
--sp-state-pending-text: #7a8390;
|
||||
--sp-state-pending-border: #7a8390;
|
||||
--sp-state-pending-bg: rgba(122, 131, 144, 0.10);
|
||||
}
|
||||
|
||||
/* ─── Font Awesome icon codepoints (used in component CSS via content: "\f...") ── */
|
||||
/*
|
||||
active: '\f06e' (eye)
|
||||
hidden: '\f070' (eye-slash)
|
||||
self-muted: '\f131' (microphone-slash)
|
||||
offline: '\f00d' (times / user-slash)
|
||||
cam-lost: '\f03d' (video-slash / film)
|
||||
reconnecting: '\f021' (sync/spinner)
|
||||
never-connected: '\f068' (minus / em-dash)
|
||||
ghost: '\f2be' (ghost / user-secret)
|
||||
pending: '\f110' (spinner)
|
||||
*/
|
||||
|
||||
/* ─── State ring shape variants (applied via sp-state-ring--* modifier) ──── */
|
||||
/*
|
||||
solid → active, self-muted
|
||||
dashed → hidden, cam-lost
|
||||
pulse → reconnecting, pending (animation in _motion.less)
|
||||
dotted → ghost
|
||||
none → offline, never-connected
|
||||
*/
|
||||
Reference in New Issue
Block a user