@floegence/floe-webapp-core 0.38.0 → 0.39.1
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/dist/components/editor/CodeEditor.js +61 -59
- package/dist/components/editor/index.d.ts +2 -1
- package/dist/components/editor/monacoTheme.d.ts +17 -0
- package/dist/components/editor/monacoTheme.js +23 -0
- package/dist/context/FloeConfigContext.d.ts +6 -0
- package/dist/context/ThemeContext.d.ts +6 -1
- package/dist/context/ThemeContext.js +81 -50
- package/dist/editor.js +13 -10
- package/dist/floe.css +1 -0
- package/dist/full.js +804 -792
- package/dist/index.js +148 -136
- package/dist/styles/themes/classicSemanticTokens.d.ts +2 -0
- package/dist/styles/themes/classicSemanticTokens.js +142 -0
- package/dist/styles/themes/index.d.ts +36 -0
- package/dist/styles/themes/index.js +36 -25
- package/dist/styles/themes/presets.d.ts +86 -0
- package/dist/styles/themes/presets.js +863 -0
- package/dist/styles.css +1 -1
- package/dist/themes/shell-presets.generated.css +1281 -0
- package/dist/themes.d.ts +2 -0
- package/dist/themes.js +11 -0
- package/package.json +7 -2
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import type { FloeThemePreset, FloeThemePresetMode } from './index';
|
|
2
|
+
export type FloeShellThemeMode = 'light' | 'dark';
|
|
3
|
+
export interface FloeShellThemeSelection {
|
|
4
|
+
version: 1;
|
|
5
|
+
light?: string;
|
|
6
|
+
dark?: string;
|
|
7
|
+
}
|
|
8
|
+
export type FloeShellThemeDefaults = Partial<Record<FloeShellThemeMode, string>>;
|
|
9
|
+
type ShellThemeTokenName = '--background' | '--foreground' | '--primary' | '--primary-foreground' | '--secondary' | '--secondary-foreground' | '--muted' | '--muted-foreground' | '--accent' | '--accent-foreground' | '--border' | '--input' | '--ring' | '--chrome-border' | '--top-bar-border' | '--activity-bar-border' | '--bottom-bar-border' | '--terminal-panel-border' | '--card' | '--card-foreground' | '--popover' | '--popover-foreground' | '--success' | '--success-foreground' | '--warning' | '--warning-foreground' | '--error' | '--error-foreground' | '--info' | '--info-foreground' | '--highlight-block-info-accent' | '--highlight-block-warning-accent' | '--highlight-block-success-accent' | '--highlight-block-error-accent' | '--highlight-block-note-accent' | '--highlight-block-tip-accent' | '--sidebar' | '--sidebar-foreground' | '--sidebar-primary' | '--sidebar-primary-foreground' | '--sidebar-accent' | '--sidebar-accent-foreground' | '--sidebar-border' | '--sidebar-ring' | '--activity-bar' | '--activity-bar-foreground' | '--activity-bar-foreground-active' | '--activity-bar-badge' | '--activity-bar-badge-foreground' | '--terminal-background' | '--terminal-foreground' | '--chart-1' | '--chart-2' | '--chart-3' | '--chart-4' | '--chart-5' | '--selection-bg' | '--selection-fg' | '--selection-on-primary-bg' | '--selection-on-primary-fg' | '--selection-code-bg' | '--selection-code-fg';
|
|
10
|
+
export declare const REQUIRED_SHELL_THEME_TOKENS: readonly ShellThemeTokenName[];
|
|
11
|
+
interface ShellThemePaletteDefinition {
|
|
12
|
+
name: string;
|
|
13
|
+
displayName: string;
|
|
14
|
+
description: string;
|
|
15
|
+
mode: FloeShellThemeMode;
|
|
16
|
+
background: string;
|
|
17
|
+
foreground: string;
|
|
18
|
+
card: string;
|
|
19
|
+
muted: string;
|
|
20
|
+
mutedForeground: string;
|
|
21
|
+
primary: string;
|
|
22
|
+
primaryForeground: string;
|
|
23
|
+
border: string;
|
|
24
|
+
input: string;
|
|
25
|
+
sidebar: string;
|
|
26
|
+
terminalBackground: string;
|
|
27
|
+
terminalForeground: string;
|
|
28
|
+
selectionBackground: string;
|
|
29
|
+
selectionForeground: string;
|
|
30
|
+
chart: readonly [string, string, string, string, string];
|
|
31
|
+
syntax?: {
|
|
32
|
+
comment: string;
|
|
33
|
+
keyword: string;
|
|
34
|
+
string: string;
|
|
35
|
+
number: string;
|
|
36
|
+
type: string;
|
|
37
|
+
function: string;
|
|
38
|
+
constant: string;
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
export declare function createShellThemePreset(definition: ShellThemePaletteDefinition): FloeThemePreset;
|
|
42
|
+
export declare const builtInShellThemePresets: readonly [{
|
|
43
|
+
inheritsBaseTokens: true;
|
|
44
|
+
semanticTokens: Readonly<Partial<Record<`--${string}`, string>>>;
|
|
45
|
+
tokens: undefined;
|
|
46
|
+
name: string;
|
|
47
|
+
displayName: string;
|
|
48
|
+
description?: string;
|
|
49
|
+
mode?: FloeThemePresetMode;
|
|
50
|
+
preview?: {
|
|
51
|
+
background: string;
|
|
52
|
+
surface: string;
|
|
53
|
+
primary: string;
|
|
54
|
+
sidebar?: string;
|
|
55
|
+
border?: string;
|
|
56
|
+
colors: readonly [string, string, string, string, string];
|
|
57
|
+
};
|
|
58
|
+
monaco?: Partial<Record<"light" | "dark", import("./index").FloeMonacoThemeDefinition>>;
|
|
59
|
+
}, FloeThemePreset, FloeThemePreset, FloeThemePreset, FloeThemePreset, FloeThemePreset, FloeThemePreset, FloeThemePreset, FloeThemePreset, FloeThemePreset, FloeThemePreset, {
|
|
60
|
+
inheritsBaseTokens: true;
|
|
61
|
+
semanticTokens: Readonly<Partial<Record<`--${string}`, string>>>;
|
|
62
|
+
tokens: undefined;
|
|
63
|
+
name: string;
|
|
64
|
+
displayName: string;
|
|
65
|
+
description?: string;
|
|
66
|
+
mode?: FloeThemePresetMode;
|
|
67
|
+
preview?: {
|
|
68
|
+
background: string;
|
|
69
|
+
surface: string;
|
|
70
|
+
primary: string;
|
|
71
|
+
sidebar?: string;
|
|
72
|
+
border?: string;
|
|
73
|
+
colors: readonly [string, string, string, string, string];
|
|
74
|
+
};
|
|
75
|
+
monaco?: Partial<Record<"light" | "dark", import("./index").FloeMonacoThemeDefinition>>;
|
|
76
|
+
}, FloeThemePreset, FloeThemePreset, FloeThemePreset, FloeThemePreset, FloeThemePreset, FloeThemePreset, FloeThemePreset, FloeThemePreset, FloeThemePreset, FloeThemePreset];
|
|
77
|
+
export declare const BUILT_IN_SHELL_THEME_DEFAULTS: {
|
|
78
|
+
readonly light: "classic-light";
|
|
79
|
+
readonly dark: "classic-dark";
|
|
80
|
+
};
|
|
81
|
+
export declare function presetSupportsMode(preset: FloeThemePreset, mode: FloeShellThemeMode): boolean;
|
|
82
|
+
export declare function getShellThemePresetsForMode(presets: readonly FloeThemePreset[], mode: FloeShellThemeMode): readonly FloeThemePreset[];
|
|
83
|
+
export declare function assertUniqueThemePresetNames(presets: readonly FloeThemePreset[]): void;
|
|
84
|
+
export declare function resolveShellThemePresetName(presets: readonly FloeThemePreset[], mode: FloeShellThemeMode, preferredName?: string, defaultName?: string): string | undefined;
|
|
85
|
+
export declare function normalizeShellThemeSelection(value: unknown, presets: readonly FloeThemePreset[], defaults?: FloeShellThemeDefaults): FloeShellThemeSelection;
|
|
86
|
+
export {};
|