@codingame/monaco-vscode-api 1.78.4-next.2 → 1.78.4

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.
@@ -1,77 +0,0 @@
1
- import { equalsIgnoreCase } from 'monaco-editor/esm/vs/base/common/strings.js';
2
- const EXTENSION_CATEGORIES = [
3
- 'Azure',
4
- 'Data Science',
5
- 'Debuggers',
6
- 'Extension Packs',
7
- 'Education',
8
- 'Formatters',
9
- 'Keymaps',
10
- 'Language Packs',
11
- 'Linters',
12
- 'Machine Learning',
13
- 'Notebooks',
14
- 'Programming Languages',
15
- 'SCM Providers',
16
- 'Snippets',
17
- 'Testing',
18
- 'Themes',
19
- 'Visualization',
20
- 'Other',
21
- ];
22
- class ExtensionIdentifier {
23
- constructor(value) {
24
- this.value = value;
25
- this._lower = value.toLowerCase();
26
- }
27
- static equals(a, b) {
28
- if (typeof a === 'undefined' || a === null) {
29
- return (typeof b === 'undefined' || b === null);
30
- }
31
- if (typeof b === 'undefined' || b === null) {
32
- return false;
33
- }
34
- if (typeof a === 'string' || typeof b === 'string') {
35
- const aValue = (typeof a === 'string' ? a : a.value);
36
- const bValue = (typeof b === 'string' ? b : b.value);
37
- return equalsIgnoreCase(aValue, bValue);
38
- }
39
- return (a._lower === b._lower);
40
- }
41
- static toKey(id) {
42
- if (typeof id === 'string') {
43
- return id.toLowerCase();
44
- }
45
- return id._lower;
46
- }
47
- }
48
- class ExtensionIdentifierMap {
49
- constructor() {
50
- this._map = ( new Map());
51
- }
52
- clear() {
53
- this._map.clear();
54
- }
55
- delete(id) {
56
- this._map.delete(ExtensionIdentifier.toKey(id));
57
- }
58
- get(id) {
59
- return this._map.get(ExtensionIdentifier.toKey(id));
60
- }
61
- has(id) {
62
- return this._map.has(ExtensionIdentifier.toKey(id));
63
- }
64
- set(id, value) {
65
- this._map.set(ExtensionIdentifier.toKey(id), value);
66
- }
67
- values() {
68
- return ( this._map.values());
69
- }
70
- forEach(callbackfn) {
71
- this._map.forEach(callbackfn);
72
- }
73
- [Symbol.iterator]() {
74
- return this._map[Symbol.iterator]();
75
- }
76
- }
77
- export { EXTENSION_CATEGORIES, ExtensionIdentifierMap };
package/dist/layout.js DELETED
@@ -1,41 +0,0 @@
1
- import { Emitter } from './missing-services.js';
2
- import { IWorkbenchLayoutService } from './layoutService.js';
3
- import { ILayoutService } from 'monaco-editor/esm/vs/platform/layout/browser/layoutService.js';
4
- import { SyncDescriptor } from 'monaco-editor/esm/vs/platform/instantiation/common/descriptors.js';
5
- import { Event } from 'monaco-editor/esm/vs/base/common/event.js';
6
- import { getClientArea } from 'monaco-editor/esm/vs/base/browser/dom.js';
7
- import { StandaloneServices } from 'monaco-editor/esm/vs/editor/standalone/browser/standaloneServices.js';
8
- import { ICodeEditorService } from 'monaco-editor/esm/vs/editor/browser/services/codeEditorService.js';
9
- class LayoutService {
10
- constructor(container) {
11
- this.container = container;
12
- this.onDidChangePartVisibility = Event.None;
13
- this.offset = { top: 0, quickPickTop: 0 };
14
- this._onDidLayout = new Emitter();
15
- this.onDidLayout = this._onDidLayout.event;
16
- window.addEventListener('resize', () => this.layout());
17
- this.layout();
18
- }
19
- isVisible() {
20
- return false;
21
- }
22
- get dimension() { return this._dimension; }
23
- layout() {
24
- this._dimension = getClientArea(window.document.body);
25
- this._onDidLayout.fire(this._dimension);
26
- }
27
- get hasContainer() {
28
- return true;
29
- }
30
- focus() {
31
- StandaloneServices.get(ICodeEditorService).getFocusedCodeEditor()?.focus();
32
- }
33
- }
34
- function getServiceOverride(container = document.body) {
35
- container.classList.add('monaco-workbench');
36
- return {
37
- [( ILayoutService.toString())]: new SyncDescriptor(LayoutService, [container]),
38
- [( IWorkbenchLayoutService.toString())]: new SyncDescriptor(LayoutService, [container])
39
- };
40
- }
41
- export { getServiceOverride };
@@ -1,12 +0,0 @@
1
- import { refineServiceDecorator } from './missing-services.js';
2
- import { ILayoutService } from 'monaco-editor/esm/vs/platform/layout/browser/layoutService.js';
3
- const IWorkbenchLayoutService = refineServiceDecorator(ILayoutService);
4
- function positionToString(position) {
5
- switch (position) {
6
- case 0 : return 'left';
7
- case 1 : return 'right';
8
- case 2 : return 'bottom';
9
- default: return 'bottom';
10
- }
11
- }
12
- export { IWorkbenchLayoutService, positionToString };