@nordmanai/nif 0.1.0 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +18 -0
- package/bin/nif.mjs +196 -0
- package/dist/index.d.ts +30 -1
- package/dist/index.js +9661 -2499
- package/dist/styles.css +1 -1
- package/dist/tokens.css +4 -1
- package/dist/ui/components/nm-ai/nm-ai.d.ts +7 -7
- package/dist/ui/components/nm-brand-logo/nm-brand-logo.d.ts +10 -0
- package/dist/ui/components/nm-breadcrumb/nm-breadcrumb.d.ts +11 -0
- package/dist/ui/components/nm-button/nm-button.d.ts +2 -0
- package/dist/ui/components/nm-button-group/nm-button-group.d.ts +17 -0
- package/dist/ui/components/nm-calendar/nm-calendar.d.ts +3 -0
- package/dist/ui/components/nm-card/nm-card.d.ts +34 -0
- package/dist/ui/components/nm-chip/nm-chip.d.ts +38 -0
- package/dist/ui/components/nm-code-block/nm-code-block.d.ts +55 -0
- package/dist/ui/components/nm-color-picker/nm-color-picker.d.ts +15 -0
- package/dist/ui/components/nm-combobox/nm-combobox.d.ts +26 -0
- package/dist/ui/components/nm-command/nm-command.d.ts +37 -0
- package/dist/ui/components/nm-composer/nm-composer.d.ts +4 -0
- package/dist/ui/components/nm-context-menu/nm-context-menu.d.ts +9 -0
- package/dist/ui/components/nm-date-picker/nm-date-picker.d.ts +35 -0
- package/dist/ui/components/nm-dialog/nm-dialog.d.ts +13 -0
- package/dist/ui/components/nm-field/nm-field.d.ts +2 -0
- package/dist/ui/components/nm-form-field/nm-form-field.d.ts +18 -0
- package/dist/ui/components/nm-gallery/nm-gallery.d.ts +8 -0
- package/dist/ui/components/nm-input/nm-input.d.ts +5 -0
- package/dist/ui/components/nm-input-group/nm-input-group.d.ts +9 -0
- package/dist/ui/components/nm-label/nm-label.d.ts +2 -0
- package/dist/ui/components/nm-menubar/nm-menubar.d.ts +9 -0
- package/dist/ui/components/nm-native-select/nm-native-select.d.ts +5 -0
- package/dist/ui/components/nm-panel/nm-panel.d.ts +14 -0
- package/dist/ui/components/nm-prose/nm-prose.d.ts +6 -0
- package/dist/ui/components/nm-resize-handle/nm-resize-handle.d.ts +18 -0
- package/dist/ui/components/nm-select/nm-select.d.ts +22 -0
- package/dist/ui/components/nm-side-panel/nm-side-panel.d.ts +33 -0
- package/dist/ui/components/nm-slider/nm-slider.d.ts +5 -1
- package/dist/ui/components/nm-status-bar/nm-status-bar.d.ts +8 -0
- package/dist/ui/components/nm-table/nm-table.d.ts +38 -0
- package/dist/ui/components/nm-textarea/nm-textarea.d.ts +2 -0
- package/dist/ui/components/nm-toolbar/nm-toolbar.d.ts +21 -0
- package/dist/ui/config/nm-ai.d.ts +0 -3
- package/dist/ui/config/nm-appearance.d.ts +36 -1
- package/dist/ui/config/nm-button.d.ts +2 -1
- package/dist/ui/config/nm-composer.d.ts +1 -2
- package/dist/ui/config/nm-field.d.ts +2 -0
- package/dist/ui/config/nm-icons.d.ts +13 -1
- package/dist/ui/config/nm-radius.d.ts +4 -4
- package/dist/ui/config/nm-side-panel.d.ts +33 -0
- package/dist/ui/lib/appearance/appearanceState.d.ts +1 -0
- package/dist/ui/lib/appearance/deriveTokens.d.ts +2 -0
- package/package.json +12 -4
- package/registry/index.json +1634 -0
- package/registry/tokens.css +72 -0
- package/registry/ui/components/nm-ai/nm-ai.css +358 -0
- package/registry/ui/components/nm-ai/nm-ai.tsx +632 -0
- package/registry/ui/components/nm-app-panel/nm-app-panel.css +169 -0
- package/registry/ui/components/nm-ask/nm-ask.css +277 -0
- package/registry/ui/components/nm-avatar/nm-avatar.css +85 -0
- package/registry/ui/components/nm-avatar/nm-avatar.tsx +30 -0
- package/registry/ui/components/nm-bar-overflow/nm-bar-overflow.css +43 -0
- package/registry/ui/components/nm-bar-overflow/nm-bar-overflow.tsx +61 -0
- package/registry/ui/components/nm-bar-overflow/use-bar-overflow.ts +92 -0
- package/registry/ui/components/nm-brand-logo/nm-brand-logo.css +20 -0
- package/registry/ui/components/nm-brand-logo/nm-brand-logo.tsx +21 -0
- package/registry/ui/components/nm-breadcrumb/nm-breadcrumb.css +57 -0
- package/registry/ui/components/nm-breadcrumb/nm-breadcrumb.tsx +42 -0
- package/registry/ui/components/nm-button/nm-button.css +110 -0
- package/registry/ui/components/nm-button/nm-button.tsx +58 -0
- package/registry/ui/components/nm-button-group/nm-button-group.css +87 -0
- package/registry/ui/components/nm-button-group/nm-button-group.tsx +32 -0
- package/registry/ui/components/nm-calendar/nm-calendar.css +178 -0
- package/registry/ui/components/nm-calendar/nm-calendar.tsx +43 -0
- package/registry/ui/components/nm-card/nm-card.css +130 -0
- package/registry/ui/components/nm-card/nm-card.tsx +83 -0
- package/registry/ui/components/nm-chatbox/nm-chatbox-icon.tsx +39 -0
- package/registry/ui/components/nm-chatbox/nm-chatbox.css +682 -0
- package/registry/ui/components/nm-chatbox/nm-chatbox.tsx +101 -0
- package/registry/ui/components/nm-checkbox/nm-checkbox.css +61 -0
- package/registry/ui/components/nm-checkbox/nm-checkbox.tsx +14 -0
- package/registry/ui/components/nm-chip/nm-chip.css +112 -0
- package/registry/ui/components/nm-chip/nm-chip.tsx +86 -0
- package/registry/ui/components/nm-code-block/nm-code-block.css +240 -0
- package/registry/ui/components/nm-code-block/nm-code-block.tsx +196 -0
- package/registry/ui/components/nm-collection/nm-collection-bar.tsx +65 -0
- package/registry/ui/components/nm-collection/nm-collection-grid.tsx +69 -0
- package/registry/ui/components/nm-collection/nm-collection-query.tsx +99 -0
- package/registry/ui/components/nm-collection/nm-collection-row-menu.tsx +55 -0
- package/registry/ui/components/nm-collection/nm-collection-table.tsx +99 -0
- package/registry/ui/components/nm-collection/nm-collection-tile-actions.tsx +50 -0
- package/registry/ui/components/nm-collection/nm-collection-title.tsx +25 -0
- package/registry/ui/components/nm-collection/nm-collection.css +353 -0
- package/registry/ui/components/nm-collection/use-collection-scroll-reveal.ts +38 -0
- package/registry/ui/components/nm-color-picker/nm-color-picker.css +67 -0
- package/registry/ui/components/nm-color-picker/nm-color-picker.tsx +79 -0
- package/registry/ui/components/nm-combobox/nm-combobox.css +72 -0
- package/registry/ui/components/nm-combobox/nm-combobox.tsx +80 -0
- package/registry/ui/components/nm-command/nm-command.css +190 -0
- package/registry/ui/components/nm-command/nm-command.tsx +125 -0
- package/registry/ui/components/nm-composer/nm-composer.css +178 -0
- package/registry/ui/components/nm-composer/nm-composer.tsx +151 -0
- package/registry/ui/components/nm-context-menu/nm-context-menu.tsx +25 -0
- package/registry/ui/components/nm-date-picker/nm-date-picker.css +140 -0
- package/registry/ui/components/nm-date-picker/nm-date-picker.tsx +153 -0
- package/registry/ui/components/nm-dialog/nm-dialog.css +84 -0
- package/registry/ui/components/nm-dialog/nm-dialog.tsx +40 -0
- package/registry/ui/components/nm-dropdown/nm-dropdown-item.ts +68 -0
- package/registry/ui/components/nm-dropdown/nm-dropdown-options.tsx +242 -0
- package/registry/ui/components/nm-dropdown/nm-dropdown-panel.tsx +171 -0
- package/registry/ui/components/nm-dropdown/nm-dropdown-placement.ts +157 -0
- package/registry/ui/components/nm-dropdown/nm-dropdown.css +312 -0
- package/registry/ui/components/nm-dropdown/nm-dropdown.tsx +412 -0
- package/registry/ui/components/nm-dropdown-menu/nm-dropdown-menu.css +145 -0
- package/registry/ui/components/nm-dropdown-menu/nm-dropdown-menu.tsx +118 -0
- package/registry/ui/components/nm-field/nm-field.css +356 -0
- package/registry/ui/components/nm-field/nm-field.tsx +355 -0
- package/registry/ui/components/nm-form-field/nm-form-field.css +103 -0
- package/registry/ui/components/nm-form-field/nm-form-field.tsx +71 -0
- package/registry/ui/components/nm-gallery/nm-gallery.css +66 -0
- package/registry/ui/components/nm-gallery/nm-gallery.tsx +31 -0
- package/registry/ui/components/nm-hover-card/nm-hover-card.css +26 -0
- package/registry/ui/components/nm-hover-card/nm-hover-card.tsx +28 -0
- package/registry/ui/components/nm-icon/nm-icon.css +6 -0
- package/registry/ui/components/nm-icon/nm-icon.tsx +69 -0
- package/registry/ui/components/nm-icon/nm-lucide.tsx +180 -0
- package/registry/ui/components/nm-icon-border/nm-icon-border.tsx +56 -0
- package/registry/ui/components/nm-input/nm-input.css +75 -0
- package/registry/ui/components/nm-input/nm-input.tsx +7 -0
- package/registry/ui/components/nm-input-group/nm-input-group.css +66 -0
- package/registry/ui/components/nm-input-group/nm-input-group.tsx +20 -0
- package/registry/ui/components/nm-label/nm-label.css +11 -0
- package/registry/ui/components/nm-label/nm-label.tsx +6 -0
- package/registry/ui/components/nm-list-item/nm-list-item.css +177 -0
- package/registry/ui/components/nm-list-item/nm-list-item.tsx +112 -0
- package/registry/ui/components/nm-menubar/nm-menubar.css +32 -0
- package/registry/ui/components/nm-menubar/nm-menubar.tsx +19 -0
- package/registry/ui/components/nm-message/nm-message-actions.tsx +24 -0
- package/registry/ui/components/nm-message/nm-message-meta.tsx +49 -0
- package/registry/ui/components/nm-message/nm-message.css +686 -0
- package/registry/ui/components/nm-message/nm-text-shimmer.tsx +6 -0
- package/registry/ui/components/nm-message/nm-trace.tsx +219 -0
- package/registry/ui/components/nm-modal/nm-modal.css +763 -0
- package/registry/ui/components/nm-modal/nm-modal.tsx +497 -0
- package/registry/ui/components/nm-native-select/nm-native-select.css +47 -0
- package/registry/ui/components/nm-native-select/nm-native-select.tsx +23 -0
- package/registry/ui/components/nm-panel/nm-panel.css +73 -0
- package/registry/ui/components/nm-panel/nm-panel.tsx +35 -0
- package/registry/ui/components/nm-panel-bar/nm-panel-bar.css +20 -0
- package/registry/ui/components/nm-panel-bar/nm-panel-bar.tsx +48 -0
- package/registry/ui/components/nm-popover/nm-popover.css +43 -0
- package/registry/ui/components/nm-popover/nm-popover.tsx +40 -0
- package/registry/ui/components/nm-progress/nm-progress.css +21 -0
- package/registry/ui/components/nm-progress/nm-progress.tsx +14 -0
- package/registry/ui/components/nm-prose/nm-prose.css +81 -0
- package/registry/ui/components/nm-prose/nm-prose.tsx +10 -0
- package/registry/ui/components/nm-questionnaire/nm-questionnaire.css +182 -0
- package/registry/ui/components/nm-questionnaire/nm-questionnaire.tsx +221 -0
- package/registry/ui/components/nm-radio-group/nm-radio-group.css +48 -0
- package/registry/ui/components/nm-radio-group/nm-radio-group.tsx +15 -0
- package/registry/ui/components/nm-rail-icon/nm-rail-icon.css +6 -0
- package/registry/ui/components/nm-rail-icon/nm-rail-icon.tsx +28 -0
- package/registry/ui/components/nm-resize-handle/nm-resize-handle.css +45 -0
- package/registry/ui/components/nm-resize-handle/nm-resize-handle.tsx +102 -0
- package/registry/ui/components/nm-segmented/nm-segmented.css +104 -0
- package/registry/ui/components/nm-segmented/nm-segmented.tsx +77 -0
- package/registry/ui/components/nm-select/nm-select.css +78 -0
- package/registry/ui/components/nm-select/nm-select.tsx +64 -0
- package/registry/ui/components/nm-separator/nm-separator.css +14 -0
- package/registry/ui/components/nm-separator/nm-separator.tsx +6 -0
- package/registry/ui/components/nm-side-panel/nm-side-panel.css +93 -0
- package/registry/ui/components/nm-side-panel/nm-side-panel.tsx +86 -0
- package/registry/ui/components/nm-slider/nm-slider.css +53 -0
- package/registry/ui/components/nm-slider/nm-slider.tsx +40 -0
- package/registry/ui/components/nm-small-icon-button/nm-small-icon-button.tsx +66 -0
- package/registry/ui/components/nm-status-bar/nm-status-bar.css +50 -0
- package/registry/ui/components/nm-status-bar/nm-status-bar.tsx +28 -0
- package/registry/ui/components/nm-switch/nm-switch.css +45 -0
- package/registry/ui/components/nm-switch/nm-switch.tsx +10 -0
- package/registry/ui/components/nm-table/nm-table.css +155 -0
- package/registry/ui/components/nm-table/nm-table.tsx +95 -0
- package/registry/ui/components/nm-tabs/nm-tabs.css +28 -0
- package/registry/ui/components/nm-tabs/nm-tabs.tsx +32 -0
- package/registry/ui/components/nm-textarea/nm-textarea.css +41 -0
- package/registry/ui/components/nm-textarea/nm-textarea.tsx +6 -0
- package/registry/ui/components/nm-toggle/nm-toggle.css +55 -0
- package/registry/ui/components/nm-toggle/nm-toggle.tsx +16 -0
- package/registry/ui/components/nm-toolbar/nm-toolbar.css +42 -0
- package/registry/ui/components/nm-toolbar/nm-toolbar.tsx +54 -0
- package/registry/ui/components/nm-tooltip/nm-tooltip.css +37 -0
- package/registry/ui/components/nm-tooltip/nm-tooltip.tsx +35 -0
- package/registry/ui/components/nm-top-bar/nm-top-bar.css +29 -0
- package/registry/ui/components/nm-top-bar/nm-top-bar.tsx +34 -0
- package/registry/ui/components/nordman-icon-button/nordman-icon-button.css +119 -0
- package/registry/ui/components/nordman-icon-button/nordman-icon-button.tsx +185 -0
- package/registry/ui/components/nordman-login/nordman-login.css +195 -0
- package/registry/ui/components/nordman-login/nordman-login.tsx +136 -0
- package/registry/ui/components/nordman-login-field/nordman-login-field.tsx +55 -0
- package/registry/ui/components/nordman-login-forgot/nordman-login-forgot.tsx +56 -0
- package/registry/ui/components/nordman-login-google/nordman-login-google.tsx +28 -0
- package/registry/ui/components/nordman-login-hero/nordman-login-hero.tsx +38 -0
- package/registry/ui/components/nordman-login-register/nordman-login-register.tsx +70 -0
- package/registry/ui/components/nordman-login-reset/nordman-login-reset.tsx +71 -0
- package/registry/ui/components/nordman-login-reveal/nordman-login-reveal.tsx +41 -0
- package/registry/ui/components/nordman-login-sign-in/nordman-login-sign-in.tsx +69 -0
- package/registry/ui/components/nordman-toggle/nordman-toggle.css +28 -0
- package/registry/ui/components/nordman-toggle/nordman-toggle.tsx +35 -0
- package/registry/ui/config/nm-ai.ts +59 -0
- package/registry/ui/config/nm-appearance.ts +275 -0
- package/registry/ui/config/nm-bar-overflow.ts +10 -0
- package/registry/ui/config/nm-button.ts +38 -0
- package/registry/ui/config/nm-chatbox-icons.ts +67 -0
- package/registry/ui/config/nm-chatbox.ts +42 -0
- package/registry/ui/config/nm-collection.ts +101 -0
- package/registry/ui/config/nm-composer.ts +39 -0
- package/registry/ui/config/nm-dropdown.ts +62 -0
- package/registry/ui/config/nm-field.ts +43 -0
- package/registry/ui/config/nm-icon-button.ts +35 -0
- package/registry/ui/config/nm-icons.ts +417 -0
- package/registry/ui/config/nm-list-item.ts +14 -0
- package/registry/ui/config/nm-message.ts +106 -0
- package/registry/ui/config/nm-modal.ts +76 -0
- package/registry/ui/config/nm-panel-bar.ts +11 -0
- package/registry/ui/config/nm-questionnaire.ts +53 -0
- package/registry/ui/config/nm-radius.ts +56 -0
- package/registry/ui/config/nm-rail-icons.ts +27 -0
- package/registry/ui/config/nm-segmented.ts +19 -0
- package/registry/ui/config/nm-side-panel.ts +16 -0
- package/registry/ui/config/nm-site-palette.ts +30 -0
- package/registry/ui/config/nm-small-icon-button.ts +17 -0
- package/registry/ui/config/nm-tabs.ts +9 -0
- package/registry/ui/config/nm-top-bar.ts +4 -0
- package/registry/ui/config/nordman-chrome.ts +14 -0
- package/registry/ui/config/nordman-login.ts +28 -0
- package/registry/ui/content/nm-modal.ts +5 -0
- package/registry/ui/content/nordman-login.ts +85 -0
- package/registry/ui/kit-logger.ts +1 -0
- package/registry/ui/lib/appearance/appearanceState.ts +240 -0
- package/registry/ui/lib/appearance/applyAppearance.ts +36 -0
- package/registry/ui/lib/appearance/cloudOrbAppearance.ts +36 -0
- package/registry/ui/lib/appearance/color.ts +96 -0
- package/registry/ui/lib/appearance/deriveTokens.ts +218 -0
- package/registry/ui/lib/appearance/index.ts +6 -0
- package/registry/ui/lib/appearance/markTokens.ts +49 -0
- package/registry/ui/lib/appearance/readLayoutMetrics.ts +28 -0
- package/registry/ui/lib/bar-overflow.ts +41 -0
- package/registry/ui/lib/logger.ts +53 -0
- package/registry/ui/lib/menu-motion.ts +187 -0
- package/registry/ui/lib/nm-class.ts +4 -0
- package/registry/ui/lib/nordman-ui-locale.ts +43 -0
- package/registry/ui/styles/interface-theme.css +196 -0
- package/registry/ui/styles/light-appearance.css +72 -0
- package/registry/ui/styles/tokens.css +424 -0
- package/registry/ui/styles/utilities.css +12 -0
- package/dist/ui/components/nm-accordion/nm-accordion.d.ts +0 -6
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/** Read a px or rem custom property from a computed style (appearance tokens use px). */
|
|
2
|
+
export function readCssLengthPx(
|
|
3
|
+
element: HTMLElement,
|
|
4
|
+
property: string,
|
|
5
|
+
fallbackPx: number,
|
|
6
|
+
): number {
|
|
7
|
+
const raw = getComputedStyle(element).getPropertyValue(property).trim();
|
|
8
|
+
if (!raw) {
|
|
9
|
+
return fallbackPx;
|
|
10
|
+
}
|
|
11
|
+
if (raw.endsWith('px')) {
|
|
12
|
+
const px = Number.parseFloat(raw);
|
|
13
|
+
return Number.isFinite(px) ? px : fallbackPx;
|
|
14
|
+
}
|
|
15
|
+
if (raw.endsWith('rem')) {
|
|
16
|
+
const rootPx = Number.parseFloat(getComputedStyle(document.documentElement).fontSize) || 16;
|
|
17
|
+
const rem = Number.parseFloat(raw);
|
|
18
|
+
return Number.isFinite(rem) ? rem * rootPx : fallbackPx;
|
|
19
|
+
}
|
|
20
|
+
return fallbackPx;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
/** Virtualized convo row stride: rail row min-height + list gap. */
|
|
24
|
+
export function readNmRailRowStridePx(root: HTMLElement = document.documentElement): number {
|
|
25
|
+
const control = readCssLengthPx(root, '--nm-icon-control', 34);
|
|
26
|
+
const gap = readCssLengthPx(root, '--nm-space-2', 2);
|
|
27
|
+
return control + gap;
|
|
28
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
export const BAR_OVERFLOW_MODES = {
|
|
2
|
+
inline: 'inline',
|
|
3
|
+
menu: 'menu',
|
|
4
|
+
} as const;
|
|
5
|
+
|
|
6
|
+
export type BarOverflowMode = (typeof BAR_OVERFLOW_MODES)[keyof typeof BAR_OVERFLOW_MODES];
|
|
7
|
+
|
|
8
|
+
/** Subpixel layout can report a 1px overflow while the row still fits. */
|
|
9
|
+
export const BAR_OVERFLOW_SLACK_PX = 1;
|
|
10
|
+
|
|
11
|
+
export type BarOverflowFit = {
|
|
12
|
+
availableWidth: number;
|
|
13
|
+
neededWidth: number;
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
export function resolveBarOverflow(fit: BarOverflowFit): BarOverflowMode {
|
|
17
|
+
if (!Number.isFinite(fit.availableWidth) || !Number.isFinite(fit.neededWidth)) {
|
|
18
|
+
return BAR_OVERFLOW_MODES.inline;
|
|
19
|
+
}
|
|
20
|
+
if (fit.availableWidth <= 0 || fit.neededWidth <= 0) {
|
|
21
|
+
return BAR_OVERFLOW_MODES.inline;
|
|
22
|
+
}
|
|
23
|
+
if (fit.neededWidth > fit.availableWidth + BAR_OVERFLOW_SLACK_PX) {
|
|
24
|
+
return BAR_OVERFLOW_MODES.menu;
|
|
25
|
+
}
|
|
26
|
+
return BAR_OVERFLOW_MODES.inline;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export function eventTargetInBar(
|
|
30
|
+
root: HTMLElement | null,
|
|
31
|
+
target: EventTarget | null,
|
|
32
|
+
layerSelector: string,
|
|
33
|
+
): boolean {
|
|
34
|
+
if (root == null || !(target instanceof Node)) {
|
|
35
|
+
return false;
|
|
36
|
+
}
|
|
37
|
+
if (root.contains(target)) {
|
|
38
|
+
return true;
|
|
39
|
+
}
|
|
40
|
+
return target instanceof Element && target.closest(layerSelector) != null;
|
|
41
|
+
}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
export type LogLevel = 'debug' | 'info' | 'warn' | 'error';
|
|
2
|
+
|
|
3
|
+
export type LogContext = Record<string, unknown>;
|
|
4
|
+
|
|
5
|
+
function isDebugEnabled(): boolean {
|
|
6
|
+
return import.meta.env.VITE_DEBUG === 'true';
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
function write(
|
|
10
|
+
level: LogLevel,
|
|
11
|
+
moduleName: string,
|
|
12
|
+
operation: string,
|
|
13
|
+
message: string,
|
|
14
|
+
context?: LogContext,
|
|
15
|
+
): void {
|
|
16
|
+
try {
|
|
17
|
+
if (level === 'debug' && !isDebugEnabled()) {
|
|
18
|
+
return;
|
|
19
|
+
}
|
|
20
|
+
const line = `[${level}] [${moduleName}:${operation}] ${message}`;
|
|
21
|
+
const sinks = {
|
|
22
|
+
debug: console.debug,
|
|
23
|
+
info: console.info,
|
|
24
|
+
warn: console.warn,
|
|
25
|
+
error: console.error,
|
|
26
|
+
} as const;
|
|
27
|
+
const sink = sinks[level];
|
|
28
|
+
if (context) {
|
|
29
|
+
sink(line, context);
|
|
30
|
+
return;
|
|
31
|
+
}
|
|
32
|
+
sink(line);
|
|
33
|
+
} catch {
|
|
34
|
+
/* logging must never throw */
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export function createLogger(moduleName: string) {
|
|
39
|
+
return {
|
|
40
|
+
debug(operation: string, message: string, context?: LogContext) {
|
|
41
|
+
write('debug', moduleName, operation, message, context);
|
|
42
|
+
},
|
|
43
|
+
info(operation: string, message: string, context?: LogContext) {
|
|
44
|
+
write('info', moduleName, operation, message, context);
|
|
45
|
+
},
|
|
46
|
+
warn(operation: string, message: string, context?: LogContext) {
|
|
47
|
+
write('warn', moduleName, operation, message, context);
|
|
48
|
+
},
|
|
49
|
+
error(operation: string, message: string, context?: LogContext) {
|
|
50
|
+
write('error', moduleName, operation, message, context);
|
|
51
|
+
},
|
|
52
|
+
};
|
|
53
|
+
}
|
|
@@ -0,0 +1,187 @@
|
|
|
1
|
+
import { useReducedMotion } from 'framer-motion';
|
|
2
|
+
|
|
3
|
+
/** Dropdown motion. Duration, ease, and shift are the `--reveal`, `--ease`, and `--nm-space-8` tokens. */
|
|
4
|
+
|
|
5
|
+
export const MENU_MOTION_EASE_FALLBACK = [0.22, 1, 0.36, 1] as const;
|
|
6
|
+
export const MENU_MOTION_DURATION_FALLBACK_S = 0.25;
|
|
7
|
+
export const MENU_MOTION_SHIFT_FALLBACK_PX = 8;
|
|
8
|
+
export const MENU_MOTION_SCALE_FALLBACK = 0.98;
|
|
9
|
+
|
|
10
|
+
const ROOT_FONT_FALLBACK_PX = 16;
|
|
11
|
+
|
|
12
|
+
export type MenuEase = readonly [number, number, number, number];
|
|
13
|
+
|
|
14
|
+
export type MenuMotionFrame = {
|
|
15
|
+
duration: number;
|
|
16
|
+
ease: MenuEase;
|
|
17
|
+
shift: number;
|
|
18
|
+
scale: number;
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
export function parseCubicBezier(raw: string): MenuEase | null {
|
|
22
|
+
const match = raw.match(
|
|
23
|
+
/cubic-bezier\(\s*(-?\d*\.?\d+)\s*,\s*(-?\d*\.?\d+)\s*,\s*(-?\d*\.?\d+)\s*,\s*(-?\d*\.?\d+)\s*\)/,
|
|
24
|
+
);
|
|
25
|
+
if (match == null) {
|
|
26
|
+
return null;
|
|
27
|
+
}
|
|
28
|
+
return [Number(match[1]), Number(match[2]), Number(match[3]), Number(match[4])];
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export function parseDurationSeconds(raw: string): number | null {
|
|
32
|
+
const value = raw.trim();
|
|
33
|
+
if (value.endsWith('ms')) {
|
|
34
|
+
const ms = Number.parseFloat(value);
|
|
35
|
+
return Number.isFinite(ms) ? ms / 1000 : null;
|
|
36
|
+
}
|
|
37
|
+
if (value.endsWith('s')) {
|
|
38
|
+
const seconds = Number.parseFloat(value);
|
|
39
|
+
return Number.isFinite(seconds) ? seconds : null;
|
|
40
|
+
}
|
|
41
|
+
return null;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
export function parseLengthPx(raw: string, rootFontPx: number): number | null {
|
|
45
|
+
const value = raw.trim();
|
|
46
|
+
if (value.endsWith('rem')) {
|
|
47
|
+
const rem = Number.parseFloat(value);
|
|
48
|
+
return Number.isFinite(rem) ? rem * rootFontPx : null;
|
|
49
|
+
}
|
|
50
|
+
if (value.endsWith('px')) {
|
|
51
|
+
const px = Number.parseFloat(value);
|
|
52
|
+
return Number.isFinite(px) ? px : null;
|
|
53
|
+
}
|
|
54
|
+
return null;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
export function parseUnitScale(raw: string): number | null {
|
|
58
|
+
const scale = Number.parseFloat(raw.trim());
|
|
59
|
+
if (!Number.isFinite(scale) || scale <= 0 || scale >= 1) {
|
|
60
|
+
return null;
|
|
61
|
+
}
|
|
62
|
+
return scale;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
export function readMenuMotionFrame(): MenuMotionFrame {
|
|
66
|
+
if (typeof document === 'undefined') {
|
|
67
|
+
return {
|
|
68
|
+
duration: MENU_MOTION_DURATION_FALLBACK_S,
|
|
69
|
+
ease: MENU_MOTION_EASE_FALLBACK,
|
|
70
|
+
shift: MENU_MOTION_SHIFT_FALLBACK_PX,
|
|
71
|
+
scale: MENU_MOTION_SCALE_FALLBACK,
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
const style = getComputedStyle(document.documentElement);
|
|
75
|
+
const rootFont = Number.parseFloat(style.fontSize);
|
|
76
|
+
const fontPx = Number.isFinite(rootFont) ? rootFont : ROOT_FONT_FALLBACK_PX;
|
|
77
|
+
return {
|
|
78
|
+
duration:
|
|
79
|
+
parseDurationSeconds(style.getPropertyValue('--reveal')) ?? MENU_MOTION_DURATION_FALLBACK_S,
|
|
80
|
+
ease: parseCubicBezier(style.getPropertyValue('--ease')) ?? MENU_MOTION_EASE_FALLBACK,
|
|
81
|
+
shift:
|
|
82
|
+
parseLengthPx(style.getPropertyValue('--nm-space-8'), fontPx) ??
|
|
83
|
+
MENU_MOTION_SHIFT_FALLBACK_PX,
|
|
84
|
+
scale: parseUnitScale(style.getPropertyValue('--nm-menu-scale')) ?? MENU_MOTION_SCALE_FALLBACK,
|
|
85
|
+
};
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
export function menuMotionOrigin(placement: string | null | undefined): {
|
|
89
|
+
originX: number;
|
|
90
|
+
originY: number;
|
|
91
|
+
} {
|
|
92
|
+
const [side = 'bottom', align] = (placement ?? 'bottom').split('-');
|
|
93
|
+
let originY = 0.5;
|
|
94
|
+
if (side === 'top') {
|
|
95
|
+
originY = 1;
|
|
96
|
+
} else if (side === 'bottom') {
|
|
97
|
+
originY = 0;
|
|
98
|
+
}
|
|
99
|
+
let originX = 0.5;
|
|
100
|
+
if (side === 'left') {
|
|
101
|
+
originX = 1;
|
|
102
|
+
} else if (side === 'right') {
|
|
103
|
+
originX = 0;
|
|
104
|
+
} else if (align === 'start') {
|
|
105
|
+
originX = 0;
|
|
106
|
+
} else if (align === 'end') {
|
|
107
|
+
originX = 1;
|
|
108
|
+
}
|
|
109
|
+
return { originX, originY };
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
/** Offset toward the trigger so the panel eases out of its anchor. */
|
|
113
|
+
export function menuMotionOffset(
|
|
114
|
+
placement: string | null | undefined,
|
|
115
|
+
shift: number,
|
|
116
|
+
): { x: number; y: number } {
|
|
117
|
+
const side = (placement ?? 'bottom').split('-')[0];
|
|
118
|
+
if (side === 'top') {
|
|
119
|
+
return { x: 0, y: shift };
|
|
120
|
+
}
|
|
121
|
+
if (side === 'left') {
|
|
122
|
+
return { x: shift, y: 0 };
|
|
123
|
+
}
|
|
124
|
+
if (side === 'right') {
|
|
125
|
+
return { x: -shift, y: 0 };
|
|
126
|
+
}
|
|
127
|
+
return { x: 0, y: -shift };
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
export function menuMotionVariants(
|
|
131
|
+
input: MenuMotionFrame & {
|
|
132
|
+
reduceMotion: boolean;
|
|
133
|
+
placement?: string | null;
|
|
134
|
+
},
|
|
135
|
+
): {
|
|
136
|
+
closed: { opacity: number; x: number; y: number; scale: number };
|
|
137
|
+
open: { opacity: number; x: number; y: number; scale: number };
|
|
138
|
+
transition: { duration: number; ease: MenuEase };
|
|
139
|
+
} {
|
|
140
|
+
const offset = input.reduceMotion
|
|
141
|
+
? { x: 0, y: 0 }
|
|
142
|
+
: menuMotionOffset(input.placement, input.shift);
|
|
143
|
+
const transition = { duration: input.duration, ease: input.ease };
|
|
144
|
+
return {
|
|
145
|
+
closed: {
|
|
146
|
+
opacity: 0,
|
|
147
|
+
x: offset.x,
|
|
148
|
+
y: offset.y,
|
|
149
|
+
scale: input.reduceMotion ? 1 : input.scale,
|
|
150
|
+
},
|
|
151
|
+
open: { opacity: 1, x: 0, y: 0, scale: 1 },
|
|
152
|
+
transition,
|
|
153
|
+
};
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
type MenuMotionState = {
|
|
157
|
+
opacity: number;
|
|
158
|
+
x: number;
|
|
159
|
+
y: number;
|
|
160
|
+
scale: number;
|
|
161
|
+
transition: { duration: number; ease: MenuEase };
|
|
162
|
+
};
|
|
163
|
+
|
|
164
|
+
type MenuMotionBinding = {
|
|
165
|
+
initial: 'closed';
|
|
166
|
+
animate: 'open';
|
|
167
|
+
exit: 'closed';
|
|
168
|
+
variants: { closed: MenuMotionState; open: MenuMotionState };
|
|
169
|
+
style: { originX: number; originY: number };
|
|
170
|
+
};
|
|
171
|
+
|
|
172
|
+
export function useMenuMotion(placement?: string | null): MenuMotionBinding {
|
|
173
|
+
const reduceMotion = useReducedMotion() === true;
|
|
174
|
+
const frame = readMenuMotionFrame();
|
|
175
|
+
const motionFrame = menuMotionVariants({ ...frame, reduceMotion, placement });
|
|
176
|
+
const { transition } = motionFrame;
|
|
177
|
+
return {
|
|
178
|
+
initial: 'closed',
|
|
179
|
+
animate: 'open',
|
|
180
|
+
exit: 'closed',
|
|
181
|
+
variants: {
|
|
182
|
+
closed: { ...motionFrame.closed, transition },
|
|
183
|
+
open: { ...motionFrame.open, transition },
|
|
184
|
+
},
|
|
185
|
+
style: menuMotionOrigin(placement),
|
|
186
|
+
};
|
|
187
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { useSyncExternalStore } from 'react';
|
|
2
|
+
|
|
3
|
+
/** Active Nordman UI locale for static copy proxies (interface shell, settings modal). */
|
|
4
|
+
let activeUiLocale = 'sv-SE';
|
|
5
|
+
|
|
6
|
+
const listeners = new Set<() => void>();
|
|
7
|
+
|
|
8
|
+
export function setNordmanUiLocale(
|
|
9
|
+
locale: string | null | undefined,
|
|
10
|
+
options?: { notify?: boolean },
|
|
11
|
+
): void {
|
|
12
|
+
const next = locale ?? 'sv-SE';
|
|
13
|
+
if (next === activeUiLocale) {
|
|
14
|
+
return;
|
|
15
|
+
}
|
|
16
|
+
activeUiLocale = next;
|
|
17
|
+
if (options?.notify === false) {
|
|
18
|
+
return;
|
|
19
|
+
}
|
|
20
|
+
listeners.forEach((listener) => listener());
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export function getNordmanUiLocale(): string {
|
|
24
|
+
return activeUiLocale;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export function subscribeNordmanUiLocale(listener: () => void): () => void {
|
|
28
|
+
listeners.add(listener);
|
|
29
|
+
return () => {
|
|
30
|
+
listeners.delete(listener);
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
/** Re-renders this component when the Nordman UI language changes, without remounting the app. */
|
|
35
|
+
export function useNordmanUiLocale(): string {
|
|
36
|
+
return useSyncExternalStore(subscribeNordmanUiLocale, getNordmanUiLocale, getNordmanUiLocale);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
/** English copy for English locales; every other locale reads Swedish. */
|
|
40
|
+
export function isEnglishNordmanLocale(locale: string): boolean {
|
|
41
|
+
const resolved = locale === 'auto' && typeof navigator !== 'undefined' ? navigator.language : locale;
|
|
42
|
+
return /^en\b/i.test(resolved);
|
|
43
|
+
}
|
|
@@ -0,0 +1,196 @@
|
|
|
1
|
+
html[data-interface='nordman'] {
|
|
2
|
+
--radius: var(--nm-radius-md);
|
|
3
|
+
--presentation: var(--nm-canvas-rgb);
|
|
4
|
+
--text-primary: var(--nm-fg-rgb);
|
|
5
|
+
--text-secondary: var(--nm-fg-subtle-rgb);
|
|
6
|
+
--text-secondary-alt: var(--nm-fg-subtle-rgb);
|
|
7
|
+
--text-tertiary: var(--nm-stroke-rgb);
|
|
8
|
+
--text-destructive: var(--nm-destructive-rgb);
|
|
9
|
+
--header-primary: var(--nm-canvas-rgb);
|
|
10
|
+
--surface-primary: var(--nm-canvas-rgb);
|
|
11
|
+
--surface-primary-alt: var(--nm-raised-rgb);
|
|
12
|
+
--surface-secondary: var(--nm-panel-rgb);
|
|
13
|
+
--surface-secondary-alt: var(--nm-line-rgb);
|
|
14
|
+
--surface-tertiary: var(--nm-raised-rgb);
|
|
15
|
+
--surface-dialog: var(--nm-panel-rgb);
|
|
16
|
+
--surface-chat: var(--nm-canvas-rgb);
|
|
17
|
+
--surface-active: var(--nm-line-rgb);
|
|
18
|
+
--surface-active-alt: var(--nm-panel-rgb);
|
|
19
|
+
--surface-hover: var(--nm-panel-rgb);
|
|
20
|
+
--border-light: var(--nm-line-rgb);
|
|
21
|
+
--border-medium: var(--nm-stroke-rgb);
|
|
22
|
+
--link: var(--nm-accent-rgb);
|
|
23
|
+
--link-hover: var(--nm-accent-rgb);
|
|
24
|
+
--link-visited: var(--nm-accent-rgb);
|
|
25
|
+
--accent-primary: var(--nm-accent-rgb);
|
|
26
|
+
--ring-primary: var(--nm-accent-rgb);
|
|
27
|
+
--brand-purple: var(--nm-accent-rgb);
|
|
28
|
+
--font-sans: var(--nm-font);
|
|
29
|
+
background: var(--nm-canvas);
|
|
30
|
+
color: var(--nm-fg);
|
|
31
|
+
font-family: var(--nm-font);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
html[data-interface='nordman'] body {
|
|
35
|
+
background: var(--nm-canvas);
|
|
36
|
+
color: var(--nm-fg);
|
|
37
|
+
font-family: var(--nm-font);
|
|
38
|
+
font-weight: var(--nm-weight-regular);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
/* Every text follows the Font weight setting. Defaults of the browser never win: headings and strong text sit
|
|
42
|
+
one step above regular, and form controls take the weight of the text around them. */
|
|
43
|
+
:where(html[data-interface='nordman']) :where(h1, h2, h3, h4, h5, h6, th, strong, b) {
|
|
44
|
+
font-weight: var(--nm-weight-semibold);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
:where(html[data-interface='nordman']) :where(button, input, select, textarea, optgroup, legend, caption) {
|
|
48
|
+
font-weight: inherit;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
html[data-interface='nordman'] .popover-ui {
|
|
52
|
+
border: 0;
|
|
53
|
+
border-radius: var(--nm-menu-radius);
|
|
54
|
+
background: var(--nm-raised);
|
|
55
|
+
box-shadow: none;
|
|
56
|
+
padding: var(--nm-space-12);
|
|
57
|
+
max-height: var(--nm-dropdown-max);
|
|
58
|
+
font-family: var(--nm-font);
|
|
59
|
+
font-size: var(--nm-type-ui);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
html[data-interface='nordman'] .popover-ui .select-item {
|
|
63
|
+
font-size: inherit;
|
|
64
|
+
line-height: var(--nm-leading-tight);
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
html[data-interface='nordman'] .popover-ui input {
|
|
68
|
+
font-size: inherit;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
html[data-interface='nordman'] .popover-ui .h-4.w-4 {
|
|
72
|
+
width: var(--nm-icon-sm);
|
|
73
|
+
height: var(--nm-icon-sm);
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
html[data-interface='nordman'] button[role='combobox'] {
|
|
77
|
+
font-family: var(--nm-font);
|
|
78
|
+
font-size: var(--nm-type-ui);
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
html[data-interface='nordman'] .nm-dropdown__trigger,
|
|
82
|
+
html[data-interface='nordman'] .nm-dropdown__item,
|
|
83
|
+
html[data-interface='nordman'] .nm-dropdown__detail {
|
|
84
|
+
font-size: var(--nm-type-ui);
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
html[data-interface='nordman'] .nm-dropdown__label {
|
|
88
|
+
font-size: inherit;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
html[data-interface='nordman'] .nm-rail-nav {
|
|
92
|
+
font-family: var(--nm-font);
|
|
93
|
+
font-size: var(--nm-type-ui);
|
|
94
|
+
color: var(--nm-fg);
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
html[data-interface='nordman'] .nm-rail__label,
|
|
98
|
+
html[data-interface='nordman'] .nm-rail__row,
|
|
99
|
+
html[data-interface='nordman'] .nm-rail__title,
|
|
100
|
+
html[data-interface='nordman'] .nm-rail__title-text {
|
|
101
|
+
font-size: var(--nm-type-ui);
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
html[data-interface='nordman'] .icon-sm {
|
|
105
|
+
width: var(--nm-icon-sm);
|
|
106
|
+
height: var(--nm-icon-sm);
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
html[data-interface='nordman'] .icon-md,
|
|
110
|
+
html[data-interface='nordman'] .icon-md-heavy {
|
|
111
|
+
width: var(--nm-icon-button);
|
|
112
|
+
height: var(--nm-icon-button);
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
html[data-interface='nordman'] .icon-lg {
|
|
116
|
+
width: calc(var(--nm-icon-button) * 4 / 3);
|
|
117
|
+
height: calc(var(--nm-icon-button) * 4 / 3);
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
html[data-interface='nordman'] .icon-xl {
|
|
121
|
+
width: calc(var(--nm-icon-button) * 7 / 6);
|
|
122
|
+
height: calc(var(--nm-icon-button) * 7 / 6);
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
html[data-interface='nordman'] svg.nm-icon,
|
|
126
|
+
html[data-interface='nordman'] .nm-icon {
|
|
127
|
+
width: var(--nm-icon-button);
|
|
128
|
+
height: var(--nm-icon-button);
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
html[data-interface='nordman'] .tooltip {
|
|
132
|
+
background-color: var(--nm-raised);
|
|
133
|
+
box-shadow: none;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
html[data-interface='nordman'] .nm-hide-scrollbar,
|
|
137
|
+
html[data-interface='nordman'] .nm-rail-nav,
|
|
138
|
+
html[data-interface='nordman'] .nm-rail,
|
|
139
|
+
html[data-interface='nordman'] .nm-rail__body,
|
|
140
|
+
html[data-interface='nordman'] .nm-rail .ReactVirtualized__Grid,
|
|
141
|
+
html[data-interface='nordman'] .nm-rail .ReactVirtualized__List,
|
|
142
|
+
html[data-interface='nordman'] .nm-rail-nav .overflow-auto,
|
|
143
|
+
html[data-interface='nordman'] .nm-rail-nav .overflow-y-auto,
|
|
144
|
+
html[data-interface='nordman'] .nm-rail-nav .overflow-y-scroll,
|
|
145
|
+
html[data-interface='nordman'] .nm-rail-nav .scrollbar-gutter-stable,
|
|
146
|
+
html[data-interface='nordman'] aside .overflow-auto,
|
|
147
|
+
html[data-interface='nordman'] aside .overflow-y-auto,
|
|
148
|
+
html[data-interface='nordman'] aside .overflow-y-scroll,
|
|
149
|
+
html[data-interface='nordman'] aside .scrollbar-gutter-stable,
|
|
150
|
+
html[data-interface='nordman'] #chat-history-nav,
|
|
151
|
+
html[data-interface='nordman'] #chat-history-nav .overflow-auto,
|
|
152
|
+
html[data-interface='nordman'] #chat-history-nav .overflow-y-auto {
|
|
153
|
+
-ms-overflow-style: none;
|
|
154
|
+
scrollbar-width: none;
|
|
155
|
+
scrollbar-gutter: auto;
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
html[data-interface='nordman'] .nm-hide-scrollbar::-webkit-scrollbar,
|
|
159
|
+
html[data-interface='nordman'] .nm-rail-nav::-webkit-scrollbar,
|
|
160
|
+
html[data-interface='nordman'] .nm-rail::-webkit-scrollbar,
|
|
161
|
+
html[data-interface='nordman'] .nm-rail__body::-webkit-scrollbar,
|
|
162
|
+
html[data-interface='nordman'] .nm-rail .ReactVirtualized__Grid::-webkit-scrollbar,
|
|
163
|
+
html[data-interface='nordman'] .nm-rail .ReactVirtualized__List::-webkit-scrollbar,
|
|
164
|
+
html[data-interface='nordman'] .nm-rail-nav .overflow-auto::-webkit-scrollbar,
|
|
165
|
+
html[data-interface='nordman'] .nm-rail-nav .overflow-y-auto::-webkit-scrollbar,
|
|
166
|
+
html[data-interface='nordman'] .nm-rail-nav .overflow-y-scroll::-webkit-scrollbar,
|
|
167
|
+
html[data-interface='nordman'] .nm-rail-nav .scrollbar-gutter-stable::-webkit-scrollbar,
|
|
168
|
+
html[data-interface='nordman'] aside .overflow-auto::-webkit-scrollbar,
|
|
169
|
+
html[data-interface='nordman'] aside .overflow-y-auto::-webkit-scrollbar,
|
|
170
|
+
html[data-interface='nordman'] aside .overflow-y-scroll::-webkit-scrollbar,
|
|
171
|
+
html[data-interface='nordman'] aside .scrollbar-gutter-stable::-webkit-scrollbar,
|
|
172
|
+
html[data-interface='nordman'] #chat-history-nav::-webkit-scrollbar,
|
|
173
|
+
html[data-interface='nordman'] #chat-history-nav .overflow-auto::-webkit-scrollbar,
|
|
174
|
+
html[data-interface='nordman'] #chat-history-nav .overflow-y-auto::-webkit-scrollbar {
|
|
175
|
+
display: none;
|
|
176
|
+
width: 0;
|
|
177
|
+
height: 0;
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
/* The thread keeps its gutter so the composer stays aligned, but the thumb
|
|
181
|
+
stays invisible until the column is actually scrolling. */
|
|
182
|
+
html[data-interface='nordman'] .nm-message-scroll {
|
|
183
|
+
scrollbar-color: transparent transparent;
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
html[data-interface='nordman'] .nm-message-scroll::-webkit-scrollbar-thumb {
|
|
187
|
+
background-color: transparent;
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
html[data-interface='nordman'] .nm-message-scroll[data-scrolling='true'] {
|
|
191
|
+
scrollbar-color: var(--nm-stroke) transparent;
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
html[data-interface='nordman'] .nm-message-scroll[data-scrolling='true']::-webkit-scrollbar-thumb {
|
|
195
|
+
background-color: var(--nm-stroke);
|
|
196
|
+
}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
html.light .nm-panel-bar {
|
|
2
|
+
border-bottom-color: var(--nm-line);
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
html.light .nm-collection__stage-bar {
|
|
6
|
+
border-bottom-color: var(--nm-line);
|
|
7
|
+
border-left-color: var(--nm-line);
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
html.light .nm-list-item:not(.nm-list-item--face) {
|
|
11
|
+
color: var(--nm-fg);
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
html.light .nm-list-item__detail,
|
|
15
|
+
html.light .nm-list-item > span > .nm-icon {
|
|
16
|
+
color: var(--nm-fg-subtle);
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
html.light .kompis-face,
|
|
20
|
+
html.light .nm-icon-rail__face {
|
|
21
|
+
filter: var(--nm-kompis-filter);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
html.light .nm-icon-rail .nm-dropdown__trigger:hover,
|
|
25
|
+
html.light .nm-icon-rail .nm-dropdown__trigger:focus-visible,
|
|
26
|
+
html.light .nm-icon-rail .nm-dropdown__trigger[aria-expanded='true'] {
|
|
27
|
+
background: var(--nm-menu-highlight);
|
|
28
|
+
color: var(--nm-fg-subtle);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
html.light .nm-modal__item[data-active='true'],
|
|
32
|
+
html.light .nm-modal__item[data-state='active'],
|
|
33
|
+
html.light .nm-modal__item:hover,
|
|
34
|
+
html.light .nm-modal__item:focus-visible {
|
|
35
|
+
background: var(--nm-menu-highlight);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
html.light .nm-dropdown__panel,
|
|
39
|
+
html.light .nm-dropdown__subpanel,
|
|
40
|
+
html.light .command-central__panel,
|
|
41
|
+
html.light .command-central__search-row {
|
|
42
|
+
background: var(--nm-menu-surface);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
html.light .nm-dropdown__item:hover,
|
|
46
|
+
html.light .nm-dropdown__item:focus-visible,
|
|
47
|
+
html.light .nm-dropdown__item[aria-selected='true'] {
|
|
48
|
+
background: var(--nm-menu-option);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
html.light[data-interface='nordman'] .popover-ui {
|
|
52
|
+
background: var(--nm-menu-surface);
|
|
53
|
+
border: 0;
|
|
54
|
+
box-shadow: none;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
html.light[data-interface='nordman'] .select-item[data-active-item],
|
|
58
|
+
html.light[data-interface='nordman'] .select-item:hover {
|
|
59
|
+
background-color: rgb(var(--nm-menu-option-rgb));
|
|
60
|
+
color: rgb(var(--nm-fg-rgb));
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
html.light .nm-segmented--line .nm-segmented__item[data-active='true'] {
|
|
64
|
+
background: var(--nm-menu-option);
|
|
65
|
+
color: var(--nm-fg);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
html.light .nm-segmented:not(.nm-segmented--pills):not(.nm-segmented--fill) .nm-segmented__item:hover,
|
|
69
|
+
html.light .nm-segmented:not(.nm-segmented--pills):not(.nm-segmented--fill) .nm-segmented__item:focus-visible {
|
|
70
|
+
background: var(--nm-menu-option);
|
|
71
|
+
color: var(--nm-fg);
|
|
72
|
+
}
|