custom-electron-titlebar 4.2.0-alpha.2 → 4.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.
Files changed (63) hide show
  1. package/LICENSE +21 -21
  2. package/README.md +83 -65
  3. package/package.json +69 -58
  4. package/dist/enums/menu-state.d.ts +0 -6
  5. package/dist/index.d.ts +0 -3
  6. package/dist/index.js +0 -1
  7. package/dist/titlebar.d.ts +0 -143
  8. package/dist/types/menubar-options.d.ts +0 -41
  9. package/dist/types/scss.d.ts +0 -6
  10. package/dist/types/titlebar-options.d.ts +0 -66
  11. package/dist/utils/color.d.ts +0 -2
  12. package/dist/vs/base/browser/browser.d.ts +0 -40
  13. package/dist/vs/base/browser/canIUse.d.ts +0 -17
  14. package/dist/vs/base/browser/dom.d.ts +0 -325
  15. package/dist/vs/base/browser/event.d.ts +0 -27
  16. package/dist/vs/base/browser/fastDomNode.d.ts +0 -59
  17. package/dist/vs/base/browser/globalMouseMoveMonitor.d.ts +0 -29
  18. package/dist/vs/base/browser/iframe.d.ts +0 -33
  19. package/dist/vs/base/browser/keyboardEvent.d.ts +0 -42
  20. package/dist/vs/base/browser/mouseEvent.d.ts +0 -69
  21. package/dist/vs/base/browser/touch.d.ts +0 -39
  22. package/dist/vs/base/browser/ui/actionbar/actionViewItems.d.ts +0 -58
  23. package/dist/vs/base/browser/ui/actionbar/actionbar.d.ts +0 -95
  24. package/dist/vs/base/browser/ui/contextview/contextview.d.ts +0 -94
  25. package/dist/vs/base/browser/ui/menu/menu.d.ts +0 -58
  26. package/dist/vs/base/browser/ui/menu/menubar.d.ts +0 -78
  27. package/dist/vs/base/browser/ui/scrollbar/abstractScrollbar.d.ts +0 -67
  28. package/dist/vs/base/browser/ui/scrollbar/horizontalScrollbar.d.ts +0 -15
  29. package/dist/vs/base/browser/ui/scrollbar/scrollableElement.d.ts +0 -107
  30. package/dist/vs/base/browser/ui/scrollbar/scrollableElementOptions.d.ts +0 -157
  31. package/dist/vs/base/browser/ui/scrollbar/scrollbarArrow.d.ts +0 -25
  32. package/dist/vs/base/browser/ui/scrollbar/scrollbarState.d.ts +0 -75
  33. package/dist/vs/base/browser/ui/scrollbar/scrollbarVisibilityController.d.ts +0 -24
  34. package/dist/vs/base/browser/ui/scrollbar/verticalScrollbar.d.ts +0 -15
  35. package/dist/vs/base/browser/ui/widget.d.ts +0 -16
  36. package/dist/vs/base/common/actions.d.ts +0 -115
  37. package/dist/vs/base/common/arrays.d.ts +0 -168
  38. package/dist/vs/base/common/async.d.ts +0 -510
  39. package/dist/vs/base/common/cache.d.ts +0 -23
  40. package/dist/vs/base/common/cancellation.d.ts +0 -29
  41. package/dist/vs/base/common/charCode.d.ts +0 -405
  42. package/dist/vs/base/common/color.d.ts +0 -159
  43. package/dist/vs/base/common/decorators.d.ts +0 -7
  44. package/dist/vs/base/common/errors.d.ts +0 -77
  45. package/dist/vs/base/common/event.d.ts +0 -274
  46. package/dist/vs/base/common/functional.d.ts +0 -1
  47. package/dist/vs/base/common/iterator.d.ts +0 -31
  48. package/dist/vs/base/common/keyCodes.d.ts +0 -429
  49. package/dist/vs/base/common/keybindings.d.ts +0 -99
  50. package/dist/vs/base/common/lazy.d.ts +0 -19
  51. package/dist/vs/base/common/lifecycle.d.ts +0 -129
  52. package/dist/vs/base/common/linkedList.d.ts +0 -15
  53. package/dist/vs/base/common/platform.d.ts +0 -85
  54. package/dist/vs/base/common/range.d.ts +0 -18
  55. package/dist/vs/base/common/scrollable.d.ts +0 -141
  56. package/dist/vs/base/common/strings.d.ts +0 -215
  57. package/dist/vs/base/common/types.d.ts +0 -89
  58. package/dist/vs/base/common/uint.d.ts +0 -31
  59. package/dist/vs/nls.d.ts +0 -18
  60. package/main/attach-titlebar-to-window.d.ts +0 -3
  61. package/main/index.d.ts +0 -5
  62. package/main/main.js +0 -1
  63. package/main/setup-main.d.ts +0 -2
@@ -1,85 +0,0 @@
1
- export interface IProcessEnvironment {
2
- [key: string]: string | undefined;
3
- }
4
- /**
5
- * This interface is intentionally not identical to node.js
6
- * process because it also works in sandboxed environments
7
- * where the process object is implemented differently. We
8
- * define the properties here that we need for `platform`
9
- * to work and nothing else.
10
- */
11
- export interface INodeProcess {
12
- platform: string;
13
- arch: string;
14
- env: IProcessEnvironment;
15
- versions?: {
16
- electron?: string;
17
- };
18
- sandboxed?: boolean;
19
- type?: string;
20
- cwd: () => string;
21
- }
22
- export declare const globals: any;
23
- export declare const isElectronSandboxed: boolean | undefined;
24
- export declare const enum Platform {
25
- Web = 0,
26
- Mac = 1,
27
- Linux = 2,
28
- Windows = 3
29
- }
30
- export declare function PlatformToString(platform: Platform): "Web" | "Mac" | "Linux" | "Windows";
31
- export declare const isWindows: boolean;
32
- export declare const isMacintosh: boolean;
33
- export declare const isLinux: boolean;
34
- export declare const isLinuxSnap: boolean;
35
- export declare const isNative: boolean;
36
- export declare const isElectron: boolean;
37
- export declare const isWeb: boolean;
38
- export declare const isIOS: boolean;
39
- /**
40
- * Whether we run inside a CI environment, such as
41
- * GH actions or Azure Pipelines.
42
- */
43
- export declare const isCI: boolean;
44
- export declare const platform: Platform;
45
- export declare const userAgent: string | undefined;
46
- /**
47
- * The language used for the user interface. The format of
48
- * the string is all lower case (e.g. zh-tw for Traditional
49
- * Chinese)
50
- */
51
- export declare const language: string;
52
- export declare namespace Language {
53
- function value(): string;
54
- function isDefaultVariant(): boolean;
55
- function isDefault(): boolean;
56
- }
57
- /**
58
- * The OS locale or the locale specified by --locale. The format of
59
- * the string is all lower case (e.g. zh-tw for Traditional
60
- * Chinese). The UI is not necessarily shown in the provided locale.
61
- */
62
- export declare const locale: string | undefined;
63
- /**
64
- * The translations that are available through language packs.
65
- */
66
- export declare const translationsConfigFile: string | undefined;
67
- /**
68
- * See https://html.spec.whatwg.org/multipage/timers-and-user-prompts.html#:~:text=than%204%2C%20then-,set%20timeout%20to%204,-.
69
- *
70
- * Works similarly to `setTimeout(0)` but doesn't suffer from the 4ms artificial delay
71
- * that browsers set when the nesting level is > 5.
72
- */
73
- export declare const setTimeout0: (callback: () => void) => void;
74
- export declare const enum OperatingSystem {
75
- Windows = 1,
76
- Macintosh = 2,
77
- Linux = 3
78
- }
79
- export declare const OS: OperatingSystem;
80
- export declare function isLittleEndian(): boolean;
81
- export declare const isChrome: boolean;
82
- export declare const isFirefox: boolean;
83
- export declare const isSafari: boolean;
84
- export declare const isEdge: boolean;
85
- export declare const isAndroid: boolean;
@@ -1,18 +0,0 @@
1
- export interface IRange {
2
- start: number;
3
- end: number;
4
- }
5
- export interface IRangedGroup {
6
- range: IRange;
7
- size: number;
8
- }
9
- export declare namespace Range {
10
- /**
11
- * Returns the intersection between two ranges as a range itself.
12
- * Returns `{ start: 0, end: 0 }` if the intersection is empty.
13
- */
14
- function intersect(one: IRange, other: IRange): IRange;
15
- function isEmpty(range: IRange): boolean;
16
- function intersects(one: IRange, other: IRange): boolean;
17
- function relativeComplement(one: IRange, other: IRange): IRange[];
18
- }
@@ -1,141 +0,0 @@
1
- import { Event } from 'vs/base/common/event';
2
- import { Disposable, IDisposable } from 'vs/base/common/lifecycle';
3
- export declare const enum ScrollbarVisibility {
4
- Auto = 1,
5
- Hidden = 2,
6
- Visible = 3
7
- }
8
- export interface ScrollEvent {
9
- inSmoothScrolling: boolean;
10
- oldWidth: number;
11
- oldScrollWidth: number;
12
- oldScrollLeft: number;
13
- width: number;
14
- scrollWidth: number;
15
- scrollLeft: number;
16
- oldHeight: number;
17
- oldScrollHeight: number;
18
- oldScrollTop: number;
19
- height: number;
20
- scrollHeight: number;
21
- scrollTop: number;
22
- widthChanged: boolean;
23
- scrollWidthChanged: boolean;
24
- scrollLeftChanged: boolean;
25
- heightChanged: boolean;
26
- scrollHeightChanged: boolean;
27
- scrollTopChanged: boolean;
28
- }
29
- export declare class ScrollState implements IScrollDimensions, IScrollPosition {
30
- private readonly _forceIntegerValues;
31
- _scrollStateBrand: void;
32
- readonly rawScrollLeft: number;
33
- readonly rawScrollTop: number;
34
- readonly width: number;
35
- readonly scrollWidth: number;
36
- readonly scrollLeft: number;
37
- readonly height: number;
38
- readonly scrollHeight: number;
39
- readonly scrollTop: number;
40
- constructor(_forceIntegerValues: boolean, width: number, scrollWidth: number, scrollLeft: number, height: number, scrollHeight: number, scrollTop: number);
41
- equals(other: ScrollState): boolean;
42
- withScrollDimensions(update: INewScrollDimensions, useRawScrollPositions: boolean): ScrollState;
43
- withScrollPosition(update: INewScrollPosition): ScrollState;
44
- createScrollEvent(previous: ScrollState, inSmoothScrolling: boolean): ScrollEvent;
45
- }
46
- export interface IScrollDimensions {
47
- readonly width: number;
48
- readonly scrollWidth: number;
49
- readonly height: number;
50
- readonly scrollHeight: number;
51
- }
52
- export interface INewScrollDimensions {
53
- width?: number;
54
- scrollWidth?: number;
55
- height?: number;
56
- scrollHeight?: number;
57
- }
58
- export interface IScrollPosition {
59
- readonly scrollLeft: number;
60
- readonly scrollTop: number;
61
- }
62
- export interface ISmoothScrollPosition {
63
- readonly scrollLeft: number;
64
- readonly scrollTop: number;
65
- readonly width: number;
66
- readonly height: number;
67
- }
68
- export interface INewScrollPosition {
69
- scrollLeft?: number;
70
- scrollTop?: number;
71
- }
72
- export interface IScrollableOptions {
73
- /**
74
- * Define if the scroll values should always be integers.
75
- */
76
- forceIntegerValues: boolean;
77
- /**
78
- * Set the duration (ms) used for smooth scroll animations.
79
- */
80
- smoothScrollDuration: number;
81
- /**
82
- * A function to schedule an update at the next frame (used for smooth scroll animations).
83
- */
84
- scheduleAtNextAnimationFrame: (callback: () => void) => IDisposable;
85
- }
86
- export declare class Scrollable extends Disposable {
87
- _scrollableBrand: void;
88
- private _smoothScrollDuration;
89
- private readonly _scheduleAtNextAnimationFrame;
90
- private _state;
91
- private _smoothScrolling;
92
- private _onScroll;
93
- readonly onScroll: Event<ScrollEvent>;
94
- constructor(options: IScrollableOptions);
95
- dispose(): void;
96
- setSmoothScrollDuration(smoothScrollDuration: number): void;
97
- validateScrollPosition(scrollPosition: INewScrollPosition): IScrollPosition;
98
- getScrollDimensions(): IScrollDimensions;
99
- setScrollDimensions(dimensions: INewScrollDimensions, useRawScrollPositions: boolean): void;
100
- /**
101
- * Returns the final scroll position that the instance will have once the smooth scroll animation concludes.
102
- * If no scroll animation is occurring, it will return the current scroll position instead.
103
- */
104
- getFutureScrollPosition(): IScrollPosition;
105
- /**
106
- * Returns the current scroll position.
107
- * Note: This result might be an intermediate scroll position, as there might be an ongoing smooth scroll animation.
108
- */
109
- getCurrentScrollPosition(): IScrollPosition;
110
- setScrollPositionNow(update: INewScrollPosition): void;
111
- setScrollPositionSmooth(update: INewScrollPosition, reuseAnimation?: boolean): void;
112
- private _performSmoothScrolling;
113
- private _setState;
114
- }
115
- export declare class SmoothScrollingUpdate {
116
- readonly scrollLeft: number;
117
- readonly scrollTop: number;
118
- readonly isDone: boolean;
119
- constructor(scrollLeft: number, scrollTop: number, isDone: boolean);
120
- }
121
- export interface IAnimation {
122
- (completion: number): number;
123
- }
124
- export declare class SmoothScrollingOperation {
125
- readonly from: ISmoothScrollPosition;
126
- to: ISmoothScrollPosition;
127
- readonly duration: number;
128
- readonly startTime: number;
129
- animationFrameDisposable: IDisposable | null;
130
- private scrollLeft;
131
- private scrollTop;
132
- constructor(from: ISmoothScrollPosition, to: ISmoothScrollPosition, startTime: number, duration: number);
133
- private _initAnimations;
134
- private _initAnimation;
135
- dispose(): void;
136
- acceptScrollDimensions(state: ScrollState): void;
137
- tick(): SmoothScrollingUpdate;
138
- protected _tick(now: number): SmoothScrollingUpdate;
139
- combine(from: ISmoothScrollPosition, to: ISmoothScrollPosition, duration: number): SmoothScrollingOperation;
140
- static start(from: ISmoothScrollPosition, to: ISmoothScrollPosition, duration: number): SmoothScrollingOperation;
141
- }
@@ -1,215 +0,0 @@
1
- export declare function isFalsyOrWhitespace(str: string | undefined): boolean;
2
- /**
3
- * Helper to produce a string with a variable number of arguments. Insert variable segments
4
- * into the string using the {n} notation where N is the index of the argument following the string.
5
- * @param value string to which formatting is applied
6
- * @param args replacements for {n}-entries
7
- */
8
- export declare function format(value: string, ...args: any[]): string;
9
- /**
10
- * Helper to create a string from a template and a string record.
11
- * Similar to `format` but with objects instead of positional arguments.
12
- */
13
- export declare function format2(template: string, values: Record<string, unknown>): string;
14
- /**
15
- * Converts HTML characters inside the string to use entities instead. Makes the string safe from
16
- * being used e.g. in HTMLElement.innerHTML.
17
- */
18
- export declare function escape(html: string): string;
19
- /**
20
- * Escapes regular expression characters in a given string
21
- */
22
- export declare function escapeRegExpCharacters(value: string): string;
23
- /**
24
- * Counts how often `character` occurs inside `value`.
25
- */
26
- export declare function count(value: string, character: string): number;
27
- export declare function truncate(value: string, maxLength: number, suffix?: string): string;
28
- /**
29
- * Removes all occurrences of needle from the beginning and end of haystack.
30
- * @param haystack string to trim
31
- * @param needle the thing to trim (default is a blank)
32
- */
33
- export declare function trim(haystack: string, needle?: string): string;
34
- /**
35
- * Removes all occurrences of needle from the beginning of haystack.
36
- * @param haystack string to trim
37
- * @param needle the thing to trim
38
- */
39
- export declare function ltrim(haystack: string, needle: string): string;
40
- /**
41
- * Removes all occurrences of needle from the end of haystack.
42
- * @param haystack string to trim
43
- * @param needle the thing to trim
44
- */
45
- export declare function rtrim(haystack: string, needle: string): string;
46
- export declare function convertSimple2RegExpPattern(pattern: string): string;
47
- export declare function stripWildcards(pattern: string): string;
48
- export interface RegExpOptions {
49
- matchCase?: boolean;
50
- wholeWord?: boolean;
51
- multiline?: boolean;
52
- global?: boolean;
53
- unicode?: boolean;
54
- }
55
- export declare function createRegExp(searchString: string, isRegex: boolean, options?: RegExpOptions): RegExp;
56
- export declare function regExpLeadsToEndlessLoop(regexp: RegExp): boolean;
57
- export declare function regExpContainsBackreference(regexpValue: string): boolean;
58
- export declare function regExpFlags(regexp: RegExp): string;
59
- export declare function splitLines(str: string): string[];
60
- /**
61
- * Returns first index of the string that is not whitespace.
62
- * If string is empty or contains only whitespaces, returns -1
63
- */
64
- export declare function firstNonWhitespaceIndex(str: string): number;
65
- /**
66
- * Returns the leading whitespace of the string.
67
- * If the string contains only whitespaces, returns entire string
68
- */
69
- export declare function getLeadingWhitespace(str: string, start?: number, end?: number): string;
70
- /**
71
- * Returns last index of the string that is not whitespace.
72
- * If string is empty or contains only whitespaces, returns -1
73
- */
74
- export declare function lastNonWhitespaceIndex(str: string, startIndex?: number): number;
75
- export declare function compare(a: string, b: string): number;
76
- export declare function compareSubstring(a: string, b: string, aStart?: number, aEnd?: number, bStart?: number, bEnd?: number): number;
77
- export declare function compareIgnoreCase(a: string, b: string): number;
78
- export declare function compareSubstringIgnoreCase(a: string, b: string, aStart?: number, aEnd?: number, bStart?: number, bEnd?: number): number;
79
- export declare function isLowerAsciiLetter(code: number): boolean;
80
- export declare function isUpperAsciiLetter(code: number): boolean;
81
- export declare function equalsIgnoreCase(a: string, b: string): boolean;
82
- export declare function startsWithIgnoreCase(str: string, candidate: string): boolean;
83
- /**
84
- * @returns the length of the common prefix of the two strings.
85
- */
86
- export declare function commonPrefixLength(a: string, b: string): number;
87
- /**
88
- * @returns the length of the common suffix of the two strings.
89
- */
90
- export declare function commonSuffixLength(a: string, b: string): number;
91
- /**
92
- * See http://en.wikipedia.org/wiki/Surrogate_pair
93
- */
94
- export declare function isHighSurrogate(charCode: number): boolean;
95
- /**
96
- * See http://en.wikipedia.org/wiki/Surrogate_pair
97
- */
98
- export declare function isLowSurrogate(charCode: number): boolean;
99
- /**
100
- * See http://en.wikipedia.org/wiki/Surrogate_pair
101
- */
102
- export declare function computeCodePoint(highSurrogate: number, lowSurrogate: number): number;
103
- /**
104
- * get the code point that begins at offset `offset`
105
- */
106
- export declare function getNextCodePoint(str: string, len: number, offset: number): number;
107
- export declare class CodePointIterator {
108
- private readonly _str;
109
- private readonly _len;
110
- private _offset;
111
- get offset(): number;
112
- constructor(str: string, offset?: number);
113
- setOffset(offset: number): void;
114
- prevCodePoint(): number;
115
- nextCodePoint(): number;
116
- eol(): boolean;
117
- }
118
- export declare class GraphemeIterator {
119
- private readonly _iterator;
120
- get offset(): number;
121
- constructor(str: string, offset?: number);
122
- nextGraphemeLength(): number;
123
- prevGraphemeLength(): number;
124
- eol(): boolean;
125
- }
126
- export declare function nextCharLength(str: string, initialOffset: number): number;
127
- export declare function prevCharLength(str: string, initialOffset: number): number;
128
- export declare function getCharContainingOffset(str: string, offset: number): [number, number];
129
- /**
130
- * Returns true if `str` contains any Unicode character that is classified as "R" or "AL".
131
- */
132
- export declare function containsRTL(str: string): boolean;
133
- /**
134
- * Returns true if `str` contains only basic ASCII characters in the range 32 - 126 (including 32 and 126) or \n, \r, \t
135
- */
136
- export declare function isBasicASCII(str: string): boolean;
137
- export declare const UNUSUAL_LINE_TERMINATORS: RegExp;
138
- /**
139
- * Returns true if `str` contains unusual line terminators, like LS or PS
140
- */
141
- export declare function containsUnusualLineTerminators(str: string): boolean;
142
- export declare function isFullWidthCharacter(charCode: number): boolean;
143
- /**
144
- * A fast function (therefore imprecise) to check if code points are emojis.
145
- * Generated using https://github.com/alexdima/unicode-utils/blob/main/emoji-test.js
146
- */
147
- export declare function isEmojiImprecise(x: number): boolean;
148
- /**
149
- * Given a string and a max length returns a shorted version. Shorting
150
- * happens at favorable positions - such as whitespace or punctuation characters.
151
- */
152
- export declare function lcut(text: string, n: number): string;
153
- export declare function removeAnsiEscapeCodes(str: string): string;
154
- export declare const UTF8_BOM_CHARACTER: string;
155
- export declare function startsWithUTF8BOM(str: string): boolean;
156
- export declare function stripUTF8BOM(str: string): string;
157
- /**
158
- * Checks if the characters of the provided query string are included in the
159
- * target string. The characters do not have to be contiguous within the string.
160
- */
161
- export declare function fuzzyContains(target: string, query: string): boolean;
162
- export declare function containsUppercaseCharacter(target: string, ignoreEscapedChars?: boolean): boolean;
163
- export declare function uppercaseFirstLetter(str: string): string;
164
- export declare function getNLines(str: string, n?: number): string;
165
- /**
166
- * Produces 'a'-'z', followed by 'A'-'Z'... followed by 'a'-'z', etc.
167
- */
168
- export declare function singleLetterHash(n: number): string;
169
- export declare function getGraphemeBreakType(codePoint: number): GraphemeBreakType;
170
- export declare const enum GraphemeBreakType {
171
- Other = 0,
172
- Prepend = 1,
173
- CR = 2,
174
- LF = 3,
175
- Control = 4,
176
- Extend = 5,
177
- Regional_Indicator = 6,
178
- SpacingMark = 7,
179
- L = 8,
180
- V = 9,
181
- T = 10,
182
- LV = 11,
183
- LVT = 12,
184
- ZWJ = 13,
185
- Extended_Pictographic = 14
186
- }
187
- /**
188
- * Computes the offset after performing a left delete on the given string,
189
- * while considering unicode grapheme/emoji rules.
190
- */
191
- export declare function getLeftDeleteOffset(offset: number, str: string): number;
192
- export declare const noBreakWhitespace = "\u00A0";
193
- export declare class AmbiguousCharacters {
194
- private readonly confusableDictionary;
195
- private static readonly ambiguousCharacterData;
196
- private static readonly cache;
197
- static getInstance(locales: Set<string>): AmbiguousCharacters;
198
- private static _locales;
199
- static getLocales(): string[];
200
- private constructor();
201
- isAmbiguous(codePoint: number): boolean;
202
- /**
203
- * Returns the non basic ASCII code point that the given code point can be confused,
204
- * or undefined if such code point does note exist.
205
- */
206
- getPrimaryConfusable(codePoint: number): number | undefined;
207
- getConfusableCodePoints(): ReadonlySet<number>;
208
- }
209
- export declare class InvisibleCharacters {
210
- private static getRawData;
211
- private static _data;
212
- private static getData;
213
- static isInvisibleCharacter(codePoint: number): boolean;
214
- static get codePoints(): ReadonlySet<number>;
215
- }
@@ -1,89 +0,0 @@
1
- /**
2
- * @returns whether the provided parameter is a JavaScript Array or not.
3
- */
4
- export declare function isArray(array: any): array is any[];
5
- /**
6
- * @returns whether the provided parameter is a JavaScript String or not.
7
- */
8
- export declare function isString(str: unknown): str is string;
9
- /**
10
- * @returns whether the provided parameter is a JavaScript Array and each element in the array is a string.
11
- */
12
- export declare function isStringArray(value: unknown): value is string[];
13
- /**
14
- *
15
- * @returns whether the provided parameter is of type `object` but **not**
16
- * `null`, an `array`, a `regexp`, nor a `date`.
17
- */
18
- export declare function isObject(obj: unknown): obj is Object;
19
- /**
20
- * In **contrast** to just checking `typeof` this will return `false` for `NaN`.
21
- * @returns whether the provided parameter is a JavaScript Number or not.
22
- */
23
- export declare function isNumber(obj: unknown): obj is number;
24
- /**
25
- * @returns whether the provided parameter is an Iterable, casting to the given generic
26
- */
27
- export declare function isIterable<T>(obj: unknown): obj is Iterable<T>;
28
- /**
29
- * @returns whether the provided parameter is a JavaScript Boolean or not.
30
- */
31
- export declare function isBoolean(obj: unknown): obj is boolean;
32
- /**
33
- * @returns whether the provided parameter is undefined.
34
- */
35
- export declare function isUndefined(obj: unknown): obj is undefined;
36
- /**
37
- * @returns whether the provided parameter is defined.
38
- */
39
- export declare function isDefined<T>(arg: T | null | undefined): arg is T;
40
- /**
41
- * @returns whether the provided parameter is undefined or null.
42
- */
43
- export declare function isUndefinedOrNull(obj: unknown): obj is undefined | null;
44
- export declare function assertType(condition: unknown, type?: string): asserts condition;
45
- /**
46
- * Asserts that the argument passed in is neither undefined nor null.
47
- */
48
- export declare function assertIsDefined<T>(arg: T | null | undefined): T;
49
- /**
50
- * Asserts that each argument passed in is neither undefined nor null.
51
- */
52
- export declare function assertAllDefined<T1, T2>(t1: T1 | null | undefined, t2: T2 | null | undefined): [T1, T2];
53
- export declare function assertAllDefined<T1, T2, T3>(t1: T1 | null | undefined, t2: T2 | null | undefined, t3: T3 | null | undefined): [T1, T2, T3];
54
- export declare function assertAllDefined<T1, T2, T3, T4>(t1: T1 | null | undefined, t2: T2 | null | undefined, t3: T3 | null | undefined, t4: T4 | null | undefined): [T1, T2, T3, T4];
55
- /**
56
- * @returns whether the provided parameter is an empty JavaScript Object or not.
57
- */
58
- export declare function isEmptyObject(obj: unknown): obj is object;
59
- /**
60
- * @returns whether the provided parameter is a JavaScript Function or not.
61
- */
62
- export declare function isFunction(obj: unknown): obj is Function;
63
- /**
64
- * @returns whether the provided parameters is are JavaScript Function or not.
65
- */
66
- export declare function areFunctions(...objects: unknown[]): boolean;
67
- export declare type TypeConstraint = string | Function;
68
- export declare function validateConstraints(args: unknown[], constraints: Array<TypeConstraint | undefined>): void;
69
- export declare function validateConstraint(arg: unknown, constraint: TypeConstraint | undefined): void;
70
- export declare function getAllPropertyNames(obj: object): string[];
71
- export declare function getAllMethodNames(obj: object): string[];
72
- export declare function createProxyObject<T extends object>(methodNames: string[], invoke: (method: string, args: unknown[]) => unknown): T;
73
- /**
74
- * Converts null to undefined, passes all other values through.
75
- */
76
- export declare function withNullAsUndefined<T>(x: T | null): T | undefined;
77
- /**
78
- * Converts undefined to null, passes all other values through.
79
- */
80
- export declare function withUndefinedAsNull<T>(x: T | undefined): T | null;
81
- declare type AddFirstParameterToFunction<T, TargetFunctionsReturnType, FirstParameter> = T extends (...args: any[]) => TargetFunctionsReturnType ? (firstArg: FirstParameter, ...args: Parameters<T>) => ReturnType<T> : T;
82
- /**
83
- * Allows to add a first parameter to functions of a type.
84
- */
85
- export declare type AddFirstParameterToFunctions<Target, TargetFunctionsReturnType, FirstParameter> = {
86
- [K in keyof Target]: AddFirstParameterToFunction<Target[K], TargetFunctionsReturnType, FirstParameter>;
87
- };
88
- export declare function assertNever(value: never, message?: string): never;
89
- export {};
@@ -1,31 +0,0 @@
1
- export declare const enum Constants {
2
- /**
3
- * MAX SMI (SMall Integer) as defined in v8.
4
- * one bit is lost for boxing/unboxing flag.
5
- * one bit is lost for sign flag.
6
- * See https://thibaultlaurens.github.io/javascript/2013/04/29/how-the-v8-engine-works/#tagged-values
7
- */
8
- MAX_SAFE_SMALL_INTEGER = 1073741824,
9
- /**
10
- * MIN SMI (SMall Integer) as defined in v8.
11
- * one bit is lost for boxing/unboxing flag.
12
- * one bit is lost for sign flag.
13
- * See https://thibaultlaurens.github.io/javascript/2013/04/29/how-the-v8-engine-works/#tagged-values
14
- */
15
- MIN_SAFE_SMALL_INTEGER = -1073741824,
16
- /**
17
- * Max unsigned integer that fits on 8 bits.
18
- */
19
- MAX_UINT_8 = 255,
20
- /**
21
- * Max unsigned integer that fits on 16 bits.
22
- */
23
- MAX_UINT_16 = 65535,
24
- /**
25
- * Max unsigned integer that fits on 32 bits.
26
- */
27
- MAX_UINT_32 = 4294967295,
28
- UNICODE_SUPPLEMENTARY_PLANE_BEGIN = 65536
29
- }
30
- export declare function toUint8(v: number): number;
31
- export declare function toUint32(v: number): number;
package/dist/vs/nls.d.ts DELETED
@@ -1,18 +0,0 @@
1
- export interface ILocalizeInfo {
2
- key: string;
3
- comment: string[];
4
- }
5
- /**
6
- * Localize a message.
7
- *
8
- * `message` can contain `{n}` notation where it is replaced by the nth value in `...args`
9
- * For example, `localize({ key: 'sayHello', comment: ['Welcomes user'] }, 'hello {0}', name)`
10
- */
11
- export declare function localize(info: ILocalizeInfo, message: string, ...args: (string | number | boolean | undefined | null)[]): string;
12
- /**
13
- * Localize a message.
14
- *
15
- * `message` can contain `{n}` notation where it is replaced by the nth value in `...args`
16
- * For example, `localize('sayHello', 'hello {0}', name)`
17
- */
18
- export declare function localize(key: string, message: string, ...args: (string | number | boolean | undefined | null)[]): string;
@@ -1,3 +0,0 @@
1
- import { BrowserWindow } from "electron";
2
- declare const _default: (browserWindow: BrowserWindow) => void;
3
- export = _default;
package/main/index.d.ts DELETED
@@ -1,5 +0,0 @@
1
- declare const _default: {
2
- setupTitlebar: () => void;
3
- attachTitlebarToWindow: (browserWindow: Electron.CrossProcessExports.BrowserWindow) => void;
4
- };
5
- export = _default;
package/main/main.js DELETED
@@ -1 +0,0 @@
1
- !function(e,n){if("object"==typeof exports&&"object"==typeof module)module.exports=n();else if("function"==typeof define&&define.amd)define([],n);else{var i=n();for(var t in i)("object"==typeof exports?exports:e)[t]=i[t]}}(this,(()=>{return e={38:(e,n,i)=>{var t;void 0===(t=function(e,n){"use strict";return e=>{const n=e.getMinimumSize();let i=270;n&&n.length>=1&&n.forEach((e=>{n[1]&&(i=e)})),e.setMinimumSize(400,i),e.on("enter-full-screen",(()=>{e.webContents.send("window-fullscreen",!0)})),e.on("leave-full-screen",(()=>{e.webContents.send("window-fullscreen",!1)})),e.on("focus",(()=>{e.webContents.send("window-focus",!0)})),e.on("blur",(()=>{e.webContents.send("window-focus",!1)})),e.on("maximize",(()=>{e.webContents.send("window-maximize",!0)})),e.on("unmaximize",(()=>{e.webContents.send("window-maximize",!1)}))}}.apply(n,[i,n]))||(e.exports=t)},373:function(e,n,i){var t,o,s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};t=[i,n,i(651),i(38)],void 0===(o=function(e,n,i,t){"use strict";return i=s(i),t=s(t),{setupTitlebar:i.default,attachTitlebarToWindow:t.default}}.apply(n,t))||(e.exports=o)},651:(e,n,i)=>{var t,o;t=[i,n,i(298)],void 0===(o=function(e,n,i){"use strict";function t(e,n){for(const i of n.items)if(i.submenu){const n=t(e,i.submenu);if(n)return n}else if(i.commandId===e)return i}return()=>{"browser"===process.type&&(i.ipcMain.handle("request-application-menu",(async()=>JSON.parse(JSON.stringify(i.Menu.getApplicationMenu(),((e,n)=>"commandsMap"!==e&&"menu"!==e?n:void 0))))),i.ipcMain.on("window-event",((e,n)=>{const t=i.BrowserWindow.fromWebContents(e.sender);switch(n){case"window-minimize":t?.minimize();break;case"window-maximize":t?.isMaximized()?t.unmaximize():t?.maximize();break;case"window-close":t?.close();break;case"window-is-maximized":e.returnValue=t?.isMaximized()}})),i.ipcMain.on("menu-event",((e,n)=>{t(n,i.Menu.getApplicationMenu())?.click(void 0,i.BrowserWindow.fromWebContents(e.sender),e.sender)})))}}.apply(n,t))||(e.exports=o)},298:e=>{"use strict";e.exports=require("electron")}},n={},function i(t){var o=n[t];if(void 0!==o)return o.exports;var s=n[t]={exports:{}};return e[t].call(s.exports,s,s.exports,i),s.exports}(373);var e,n}));
@@ -1,2 +0,0 @@
1
- declare const _default: () => void;
2
- export = _default;