vscode-bauhaus-theme 1.0.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.
@@ -0,0 +1,45 @@
1
+ /**
2
+ * @typedef {object} AccentStyle
3
+ * @property {string} name
4
+ * @property {function(Palette): Accent} accent
5
+ */
6
+ /** @type {Object<string, AccentStyle>} */
7
+ export const accents: {
8
+ [x: string]: AccentStyle;
9
+ };
10
+ export type Palette = import("./palettes.js").Palette;
11
+ export type Pair = {
12
+ background: string;
13
+ foreground: string;
14
+ };
15
+ export type ActiveItems = {
16
+ /**
17
+ * Active editor tab line.
18
+ */
19
+ tab: string;
20
+ /**
21
+ * Active activity bar item block.
22
+ */
23
+ activity: Pair;
24
+ /**
25
+ * Active panel tab block.
26
+ */
27
+ panel: Pair;
28
+ };
29
+ export type Accent = {
30
+ /**
31
+ * Focus border, cursor, progress, links.
32
+ */
33
+ focus: string;
34
+ active: ActiveItems;
35
+ statusBar: Pair;
36
+ debugging: Pair;
37
+ noFolder: Pair;
38
+ remote: Pair;
39
+ badge: Pair;
40
+ button: Pair;
41
+ };
42
+ export type AccentStyle = {
43
+ name: string;
44
+ accent: (arg0: Palette) => Accent;
45
+ };
@@ -0,0 +1,70 @@
1
+ /**
2
+ * WCAG 2.0 relative luminance.
3
+ *
4
+ * @param {string} hex
5
+ * @returns {number}
6
+ */
7
+ export function luminance(hex: string): number;
8
+ /**
9
+ * WCAG 2.0 contrast ratio between two opaque colors.
10
+ *
11
+ * @param {string} a
12
+ * @param {string} b
13
+ * @returns {number} From 1 to 21.
14
+ */
15
+ export function contrast(a: string, b: string): number;
16
+ /**
17
+ * Convert from OKLCH, reducing chroma until the color fits in sRGB.
18
+ *
19
+ * @param {[number, number, number]} lch Lightness, chroma, hue in turns.
20
+ * @returns {string}
21
+ */
22
+ export function fromOklch([L, C, H]: [number, number, number]): string;
23
+ /**
24
+ * Interpolate two colors in OKLab.
25
+ *
26
+ * @param {string} a
27
+ * @param {string} b
28
+ * @param {number} [t=0.5]
29
+ * @returns {string}
30
+ */
31
+ export function mix(a: string, b: string, t?: number): string;
32
+ /**
33
+ * Interpolate two colors in OKLCH along the shortest hue arc. Unlike OKLab
34
+ * mixing, distant hues keep their chroma (blue + green gives cyan, not grey).
35
+ *
36
+ * @param {string} a
37
+ * @param {string} b
38
+ * @param {number} [t=0.5]
39
+ * @returns {string}
40
+ */
41
+ export function mixHue(a: string, b: string, t?: number): string;
42
+ /**
43
+ * Shift OKLCH lightness (hue kept) until the color reaches a contrast target
44
+ * against every background.
45
+ *
46
+ * @param {string} hex
47
+ * @param {string | string[]} backgrounds All on the same side of the lightness
48
+ * scale.
49
+ * @param {number} target WCAG ratio: 3 (large text, UI), 4.5 (AA), 7 (AAA).
50
+ * @param {object} [options]
51
+ * @param {boolean} [options.exact=false] Closest passing color to the
52
+ * backgrounds, even if the source already passes. Otherwise the source is
53
+ * returned unchanged when passing.
54
+ * @param {number} [options.chroma=1] Chroma scale, clamped to the sRGB gamut.
55
+ * @returns {string}
56
+ */
57
+ export function fit(hex: string, backgrounds: string | string[], target: number, { exact, chroma }?: {
58
+ exact?: boolean | undefined;
59
+ chroma?: number | undefined;
60
+ }): string;
61
+ /**
62
+ * Set the alpha channel.
63
+ *
64
+ * @param {string} hex
65
+ * @param {number} opacity From 0 to 1.
66
+ * @returns {string} #RRGGBBAA, or #RRGGBB when opaque.
67
+ */
68
+ export function alpha(hex: string, opacity: number): string;
69
+ export function toOklch(hex: string): [number, number, number];
70
+ export function mostContrasted(bg: string, candidates: string[]): string;
@@ -0,0 +1,53 @@
1
+ export const palettes: Palette[];
2
+ export type Palette = {
3
+ id: string;
4
+ type: "dark" | "light";
5
+ bg: Backgrounds;
6
+ fg: Foregrounds;
7
+ /**
8
+ * Hues for text and marks on backgrounds.
9
+ */
10
+ ink: Hues;
11
+ /**
12
+ * Terminal bright variants.
13
+ */
14
+ bright: Hues;
15
+ /**
16
+ * Hues as solid surfaces.
17
+ */
18
+ fill: Fills;
19
+ /**
20
+ * Text on each fill.
21
+ */
22
+ onFill: Fills;
23
+ };
24
+ export type Backgrounds = {
25
+ editor: string;
26
+ /**
27
+ * Side bar, panels, title and activity bars.
28
+ */
29
+ chrome: string;
30
+ /**
31
+ * Borders, guides, selected rows.
32
+ */
33
+ line: string;
34
+ };
35
+ export type Foregrounds = {
36
+ default: string;
37
+ muted: string;
38
+ };
39
+ export type Hues = {
40
+ red: string;
41
+ orange: string;
42
+ yellow: string;
43
+ green: string;
44
+ cyan: string;
45
+ blue: string;
46
+ violet: string;
47
+ };
48
+ export type Fills = {
49
+ red: string;
50
+ blue: string;
51
+ green: string;
52
+ yellow: string;
53
+ };
@@ -0,0 +1,57 @@
1
+ /**
2
+ * TextMate rules. Later rules win on equal specificity.
3
+ *
4
+ * @param {Palette} p
5
+ */
6
+ export function tokenColors(p: Palette): any[];
7
+ /**
8
+ * Semantic tokens refine TextMate where language servers know more (e.g.
9
+ * references to parameters). Unlisted selectors fall back to the TextMate scope
10
+ * mapping.
11
+ *
12
+ * @param {Palette} p
13
+ */
14
+ export function semanticTokenColors(p: Palette): {
15
+ namespace: string;
16
+ type: string;
17
+ class: string;
18
+ interface: string;
19
+ enum: string;
20
+ struct: string;
21
+ typeParameter: {
22
+ foreground: string;
23
+ italic: boolean;
24
+ };
25
+ function: string;
26
+ method: string;
27
+ decorator: {
28
+ foreground: string;
29
+ italic: boolean;
30
+ };
31
+ macro: string;
32
+ parameter: string;
33
+ variable: string;
34
+ "variable.readonly": string;
35
+ "variable.readonly.declaration": string;
36
+ "variable.readonly.defaultLibrary": string;
37
+ property: string;
38
+ enumMember: string;
39
+ event: string;
40
+ label: string;
41
+ "*.deprecated": {
42
+ fontStyle: string;
43
+ };
44
+ };
45
+ export function roles(p: Palette): {
46
+ text: string;
47
+ comment: string;
48
+ keyword: string;
49
+ operator: string;
50
+ function: string;
51
+ type: string;
52
+ string: string;
53
+ constant: string;
54
+ variable: string;
55
+ invalid: string;
56
+ };
57
+ export type Palette = import("./palettes.js").Palette;
@@ -0,0 +1,13 @@
1
+ /** @typedef {import("./palettes.js").Palette} Palette */
2
+ /** @typedef {import("./accents.js").Accent} Accent */
3
+ /**
4
+ * Workbench colors, grouped as in the theme color reference. Unset keys keep VS
5
+ * Code defaults, derived from the ones set here.
6
+ *
7
+ * @param {Palette} p
8
+ * @param {Accent} a
9
+ * @returns {Record<string, string>}
10
+ */
11
+ export function workbench(p: Palette, a: Accent): Record<string, string>;
12
+ export type Palette = import("./palettes.js").Palette;
13
+ export type Accent = import("./accents.js").Accent;