@codingame/monaco-vscode-937ecbdf-94c7-5b16-aefa-ad78ae557a93-common 18.0.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/empty.js ADDED
@@ -0,0 +1 @@
1
+ export {}
package/package.json ADDED
@@ -0,0 +1,43 @@
1
+ {
2
+ "name": "@codingame/monaco-vscode-937ecbdf-94c7-5b16-aefa-ad78ae557a93-common",
3
+ "version": "18.0.0",
4
+ "private": false,
5
+ "description": "VSCode public API plugged on the monaco editor - common package (authentication, chat, comments, debug, edit-sessions, explorer, extension-gallery, layout, markers, mcp, multi-diff-editor, remote-agent, scm, testing, update, user-data-sync, view-common, view-status-bar, view-title-bar, views, workbench)",
6
+ "keywords": [],
7
+ "author": {
8
+ "name": "CodinGame",
9
+ "url": "http://www.codingame.com"
10
+ },
11
+ "license": "MIT",
12
+ "repository": {
13
+ "type": "git",
14
+ "url": "git+ssh://git@github.com/CodinGame/monaco-vscode-api.git"
15
+ },
16
+ "type": "module",
17
+ "dependencies": {
18
+ "@codingame/monaco-vscode-api": "18.0.0"
19
+ },
20
+ "exports": {
21
+ ".": {
22
+ "default": "./empty.js"
23
+ },
24
+ "./vscode/*.css": {
25
+ "default": "./vscode/src/*.css"
26
+ },
27
+ "./vscode/*": {
28
+ "types": "./vscode/src/*.d.ts",
29
+ "default": "./vscode/src/*.js"
30
+ },
31
+ "./*": {
32
+ "types": "./*.d.ts",
33
+ "default": "./*.js"
34
+ }
35
+ },
36
+ "typesVersions": {
37
+ "*": {
38
+ "vscode/*": [
39
+ "./vscode/src/*.d.ts"
40
+ ]
41
+ }
42
+ }
43
+ }
@@ -0,0 +1,41 @@
1
+ import { Color } from "@codingame/monaco-vscode-api/vscode/vs/base/common/color";
2
+ import { ThemeIcon } from "@codingame/monaco-vscode-api/vscode/vs/base/common/themables";
3
+ import { IColorTheme } from "@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/themeService";
4
+ export interface IActivity {
5
+ readonly badge: IBadge;
6
+ }
7
+ export interface IBadge {
8
+ getDescription(): string;
9
+ getColors(theme: IColorTheme): IBadgeStyles | undefined;
10
+ }
11
+ export interface IBadgeStyles {
12
+ readonly badgeBackground: Color | undefined;
13
+ readonly badgeForeground: Color | undefined;
14
+ readonly badgeBorder: Color | undefined;
15
+ }
16
+ declare class BaseBadge implements IBadge {
17
+ protected readonly descriptorFn: (arg: any) => string;
18
+ private readonly stylesFn;
19
+ constructor(descriptorFn: (arg: any) => string, stylesFn: ((theme: IColorTheme) => IBadgeStyles | undefined) | undefined);
20
+ getDescription(): string;
21
+ getColors(theme: IColorTheme): IBadgeStyles | undefined;
22
+ }
23
+ export declare class NumberBadge extends BaseBadge {
24
+ readonly number: number;
25
+ constructor(number: number, descriptorFn: (num: number) => string);
26
+ getDescription(): string;
27
+ }
28
+ export declare class IconBadge extends BaseBadge {
29
+ readonly icon: ThemeIcon;
30
+ constructor(icon: ThemeIcon, descriptorFn: () => string, stylesFn?: (theme: IColorTheme) => IBadgeStyles | undefined);
31
+ }
32
+ export declare class ProgressBadge extends BaseBadge {
33
+ constructor(descriptorFn: () => string);
34
+ }
35
+ export declare class WarningBadge extends IconBadge {
36
+ constructor(descriptorFn: () => string);
37
+ }
38
+ export declare class ErrorBadge extends IconBadge {
39
+ constructor(descriptorFn: () => string);
40
+ }
41
+ export {};
@@ -0,0 +1,48 @@
1
+
2
+ import { Codicon } from '@codingame/monaco-vscode-api/vscode/vs/base/common/codicons';
3
+ import { activityWarningBadgeForeground, activityWarningBadgeBackground } from '@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/colors/miscColors';
4
+
5
+ class BaseBadge {
6
+ constructor(descriptorFn, stylesFn) {
7
+ this.descriptorFn = descriptorFn;
8
+ this.stylesFn = stylesFn;
9
+ }
10
+ getDescription() {
11
+ return this.descriptorFn(null);
12
+ }
13
+ getColors(theme) {
14
+ return this.stylesFn?.(theme);
15
+ }
16
+ }
17
+ class NumberBadge extends BaseBadge {
18
+ constructor(number, descriptorFn) {
19
+ super(descriptorFn, undefined);
20
+ this.number = number;
21
+ this.number = number;
22
+ }
23
+ getDescription() {
24
+ return this.descriptorFn(this.number);
25
+ }
26
+ }
27
+ class IconBadge extends BaseBadge {
28
+ constructor(icon, descriptorFn, stylesFn) {
29
+ super(descriptorFn, stylesFn);
30
+ this.icon = icon;
31
+ }
32
+ }
33
+ class ProgressBadge extends BaseBadge {
34
+ constructor(descriptorFn) {
35
+ super(descriptorFn, undefined);
36
+ }
37
+ }
38
+ class WarningBadge extends IconBadge {
39
+ constructor(descriptorFn) {
40
+ super(Codicon.warning, descriptorFn, (theme) => ({
41
+ badgeBackground: theme.getColor(activityWarningBadgeBackground),
42
+ badgeForeground: theme.getColor(activityWarningBadgeForeground),
43
+ badgeBorder: undefined,
44
+ }));
45
+ }
46
+ }
47
+
48
+ export { IconBadge, NumberBadge, ProgressBadge, WarningBadge };