Establish Mission Core as the shared theme foundation
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
:root {
|
||||
--nodedc-field-hover-bg: color-mix(in srgb, var(--nodedc-field-bg) 94%, var(--nodedc-text-primary));
|
||||
--nodedc-neutral-action-bg: rgba(247, 248, 244, 0.96);
|
||||
--nodedc-neutral-action-hover: #fff;
|
||||
--nodedc-neutral-action-color: rgba(8, 8, 10, 0.96);
|
||||
@@ -9,14 +10,16 @@
|
||||
:root,
|
||||
[data-nodedc-theme="dark"] {
|
||||
color-scheme: dark;
|
||||
--nodedc-accent-rgb: 255 47 146;
|
||||
--nodedc-on-accent-rgb: 11 17 23;
|
||||
--nodedc-accent-rgb: 247 248 244;
|
||||
--nodedc-on-accent-rgb: 8 8 10;
|
||||
--nodedc-danger-rgb: 255 116 116;
|
||||
--nodedc-warning-rgb: 255 209 102;
|
||||
--nodedc-success-rgb: 181 255 90;
|
||||
|
||||
--nodedc-canvas: #050506;
|
||||
--nodedc-canvas-soft: #0b0b0d;
|
||||
--nodedc-canvas-soft: #0d0d0f;
|
||||
--nodedc-stage: #08090b;
|
||||
--nodedc-surface-group: rgba(110, 110, 110, 0.07);
|
||||
--nodedc-text-primary: rgba(247, 248, 244, 0.96);
|
||||
--nodedc-text-secondary: rgba(247, 248, 244, 0.72);
|
||||
--nodedc-text-muted: rgba(247, 248, 244, 0.48);
|
||||
@@ -82,14 +85,16 @@
|
||||
|
||||
[data-nodedc-theme="light"] {
|
||||
color-scheme: light;
|
||||
--nodedc-accent-rgb: 255 47 146;
|
||||
--nodedc-on-accent-rgb: 11 17 23;
|
||||
--nodedc-accent-rgb: 24 25 28;
|
||||
--nodedc-on-accent-rgb: 247 248 244;
|
||||
--nodedc-danger-rgb: 205 47 67;
|
||||
--nodedc-warning-rgb: 173 111 0;
|
||||
--nodedc-success-rgb: 46 125 76;
|
||||
|
||||
--nodedc-canvas: #ececec;
|
||||
--nodedc-canvas-soft: #f4f4f4;
|
||||
--nodedc-stage: #ececec;
|
||||
--nodedc-surface-group: #f4f4f4;
|
||||
--nodedc-text-primary: rgba(18, 20, 22, 0.96);
|
||||
--nodedc-text-secondary: rgba(18, 20, 22, 0.7);
|
||||
--nodedc-text-muted: rgba(18, 20, 22, 0.48);
|
||||
@@ -152,3 +157,24 @@
|
||||
--nodedc-modal-shadow: 0 24px 72px rgb(0 0 0 / var(--nodedc-modal-glass-shadow-light-opacity)), inset 0 1px 0 rgba(255, 255, 255, 0.8);
|
||||
--nodedc-floating-surface: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(255, 255, 255, 0.72)), rgba(255, 255, 255, 0.94);
|
||||
}
|
||||
|
||||
|
||||
[data-nodedc-appearance="mission"][data-nodedc-theme="dark"] {
|
||||
--nodedc-modal-surface: rgb(15 15 17 / .97);
|
||||
--nodedc-floating-surface: rgb(15 15 17 / .98);
|
||||
--nodedc-primary-action-bg: rgb(247 248 244 / .96);
|
||||
--nodedc-primary-action-hover: rgb(255 255 255);
|
||||
--nodedc-primary-action-color: rgb(8 8 10 / .96);
|
||||
--nodedc-primary-action-shadow: none;
|
||||
--nodedc-focus-surface: rgb(255 255 255 / .09);
|
||||
}
|
||||
|
||||
|
||||
[data-nodedc-appearance="mission"][data-nodedc-theme="light"] {
|
||||
--nodedc-modal-surface: rgb(247 248 250 / .97);
|
||||
--nodedc-floating-surface: rgb(247 248 250 / .98);
|
||||
--nodedc-primary-action-bg: rgb(24 25 28 / .96);
|
||||
--nodedc-primary-action-hover: rgb(8 8 10);
|
||||
--nodedc-primary-action-color: rgb(247 248 244);
|
||||
--nodedc-primary-action-shadow: none;
|
||||
}
|
||||
|
||||
@@ -15,7 +15,7 @@ export interface NodedcMaterial {
|
||||
|
||||
export interface ApplyThemeOptions {
|
||||
theme?: NodedcTheme;
|
||||
/** Operator UI qualified against Mission Core; opt-in across portals. */
|
||||
/** Mission Core is the canonical foundation. `default` is legacy compatibility. */
|
||||
appearance?: "default" | "mission";
|
||||
/** Flat surfaces remove decorative edges; keyboard focus uses a contrasting fill. */
|
||||
edges?: "default" | "flat";
|
||||
@@ -23,6 +23,15 @@ export interface ApplyThemeOptions {
|
||||
material?: NodedcMaterial;
|
||||
}
|
||||
|
||||
/** Complete shared foundation; colors live exclusively in @nodedc/tokens/themes.css. */
|
||||
export const missionDarkTheme = Object.freeze({
|
||||
theme: "dark", appearance: "mission", edges: "flat",
|
||||
} as const satisfies ApplyThemeOptions);
|
||||
|
||||
export const missionLightTheme = Object.freeze({
|
||||
theme: "light", appearance: "mission", edges: "flat",
|
||||
} as const satisfies ApplyThemeOptions);
|
||||
|
||||
function formatRgb([red, green, blue]: RgbTuple): string {
|
||||
return `${red} ${green} ${blue}`;
|
||||
}
|
||||
@@ -33,7 +42,7 @@ function clampOpacity(value: number): number {
|
||||
|
||||
export function applyNodedcTheme(
|
||||
target: HTMLElement,
|
||||
{ theme = "dark", accent, material, appearance = "default", edges = "default" }: ApplyThemeOptions = {},
|
||||
{ theme = "dark", accent, material, appearance = "mission", edges = "flat" }: ApplyThemeOptions = {},
|
||||
): void {
|
||||
target.dataset.nodedcTheme = theme;
|
||||
target.dataset.nodedcAppearance = appearance;
|
||||
|
||||
@@ -422,7 +422,7 @@
|
||||
}
|
||||
|
||||
.nodedc-field__control:hover:not(:disabled) {
|
||||
background: var(--nodedc-glass-control-hover);
|
||||
background: var(--nodedc-field-hover-bg);
|
||||
}
|
||||
|
||||
.nodedc-field__control:focus-visible {
|
||||
@@ -647,7 +647,7 @@ textarea.nodedc-field__control {
|
||||
min-width: 0;
|
||||
gap: 1rem;
|
||||
border-radius: var(--nodedc-radius-card);
|
||||
background: var(--nodedc-glass-control-bg);
|
||||
background: var(--nodedc-surface-group);
|
||||
padding: 1rem;
|
||||
}
|
||||
|
||||
@@ -4380,26 +4380,11 @@ textarea.nodedc-field__control {
|
||||
.nodedc-key-button:disabled { opacity:.4; cursor:not-allowed; }
|
||||
.nodedc-key-button:focus-visible { outline:2px solid rgb(var(--nodedc-accent-rgb)); outline-offset:3px; }
|
||||
|
||||
/* Shared operator appearance, qualified against Mission Core 2026-09-30.
|
||||
/* Canonical operator appearance, audited against Mission Core 2026-11-05.
|
||||
Set on documentElement so modal and dropdown portals share the same profile. */
|
||||
[data-nodedc-appearance="mission"][data-nodedc-theme="dark"] {
|
||||
--nodedc-modal-surface: rgb(15 15 17 / .97);
|
||||
--nodedc-floating-surface: rgb(15 15 17 / .98);
|
||||
--nodedc-primary-action-bg: rgb(247 248 244 / .96);
|
||||
--nodedc-primary-action-hover: rgb(255 255 255);
|
||||
--nodedc-primary-action-color: rgb(8 8 10 / .96);
|
||||
--nodedc-primary-action-shadow: none;
|
||||
--nodedc-focus-surface: rgb(255 255 255 / .09);
|
||||
}
|
||||
|
||||
[data-nodedc-appearance="mission"] .nodedc-glass-material::before { display: none; }
|
||||
[data-nodedc-appearance="mission"][data-nodedc-theme="light"] {
|
||||
--nodedc-modal-surface: rgb(247 248 250 / .97);
|
||||
--nodedc-floating-surface: rgb(247 248 250 / .98);
|
||||
--nodedc-primary-action-bg: rgb(24 25 28 / .96);
|
||||
--nodedc-primary-action-hover: rgb(8 8 10);
|
||||
--nodedc-primary-action-color: rgb(247 248 244);
|
||||
--nodedc-primary-action-shadow: none;
|
||||
}
|
||||
|
||||
[data-nodedc-appearance="mission"] .nodedc-header__avatar { background: rgb(226 226 226); }
|
||||
[data-nodedc-appearance="mission"][data-nodedc-theme="dark"] .nodedc-feature-settings__section[data-active="true"] { background: rgb(247 248 244 / .14); }
|
||||
[data-nodedc-appearance="mission"][data-nodedc-theme="light"] .nodedc-feature-settings__section[data-active="true"] { background: rgb(8 8 10 / .09); }
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
export { applyNodedcTheme, clearNodedcAccent, createAccentVariables, readableTextRgb } from "@nodedc/ui-core";
|
||||
export { applyNodedcTheme, missionDarkTheme, missionLightTheme, clearNodedcAccent, createAccentVariables, readableTextRgb } from "@nodedc/ui-core";
|
||||
export * from "./applicationWorkspace.js";
|
||||
export * from "./floating.js";
|
||||
export * from "./mediaSource.js";
|
||||
|
||||
Reference in New Issue
Block a user