@codingame/monaco-vscode-workbench-service-override 37.3.4 → 37.3.5

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@codingame/monaco-vscode-workbench-service-override",
3
- "version": "37.3.4",
3
+ "version": "37.3.5",
4
4
  "private": false,
5
5
  "description": "VSCode public API plugged on the monaco editor - workbench service-override",
6
6
  "keywords": [],
@@ -15,15 +15,15 @@
15
15
  },
16
16
  "type": "module",
17
17
  "dependencies": {
18
- "@codingame/monaco-vscode-api": "37.3.4",
19
- "@codingame/monaco-vscode-environment-service-override": "37.3.4",
20
- "@codingame/monaco-vscode-katex-common": "37.3.4",
21
- "@codingame/monaco-vscode-keybindings-service-override": "37.3.4",
22
- "@codingame/monaco-vscode-quickaccess-service-override": "37.3.4",
23
- "@codingame/monaco-vscode-view-banner-service-override": "37.3.4",
24
- "@codingame/monaco-vscode-view-common-service-override": "37.3.4",
25
- "@codingame/monaco-vscode-view-status-bar-service-override": "37.3.4",
26
- "@codingame/monaco-vscode-view-title-bar-service-override": "37.3.4"
18
+ "@codingame/monaco-vscode-api": "37.3.5",
19
+ "@codingame/monaco-vscode-environment-service-override": "37.3.5",
20
+ "@codingame/monaco-vscode-katex-common": "37.3.5",
21
+ "@codingame/monaco-vscode-keybindings-service-override": "37.3.5",
22
+ "@codingame/monaco-vscode-quickaccess-service-override": "37.3.5",
23
+ "@codingame/monaco-vscode-view-banner-service-override": "37.3.5",
24
+ "@codingame/monaco-vscode-view-common-service-override": "37.3.5",
25
+ "@codingame/monaco-vscode-view-status-bar-service-override": "37.3.5",
26
+ "@codingame/monaco-vscode-view-title-bar-service-override": "37.3.5"
27
27
  },
28
28
  "main": "index.js",
29
29
  "module": "index.js",
@@ -414,7 +414,7 @@ function createActiveAquarium(mainContainer, layoutService, accessibilityService
414
414
  positionY: randomBetween(0, Math.max(1, bounds.height - size)),
415
415
  velocityX: Math.cos(angle) * speed,
416
416
  velocityY: Math.sin(angle) * speed
417
- }, targetWindow.document));
417
+ }, mainContainer));
418
418
  fish.push(f);
419
419
  }
420
420
  const SYNC_BATCH = Math.ceil(FISH_COUNT / 2);
@@ -51,7 +51,7 @@ export declare class Fish {
51
51
  * a snap-flip.
52
52
  */
53
53
  private facing;
54
- constructor(opts: IFishOptions, targetDocument: Document);
54
+ constructor(opts: IFishOptions, mainContainer: HTMLElement);
55
55
  /**
56
56
  * Write the current position/facing to the DOM.
57
57
  *
@@ -31,7 +31,7 @@ function disposeSharedFishDefs(targetDocument) {
31
31
  }
32
32
  }
33
33
  class Fish {
34
- constructor(opts, targetDocument) {
34
+ constructor(opts, mainContainer) {
35
35
  this.panicUntil = 0;
36
36
  this.facing = 1;
37
37
  this.positionX = opts.positionX;
@@ -45,7 +45,7 @@ class Fish {
45
45
  this.element.style.height = `${opts.size}px`;
46
46
  this.element.style.color = SPECIES_COLOR[opts.species];
47
47
  this.innerElement = $(".agents-aquarium-fish-inner");
48
- this.innerElement.appendChild(buildFishSvg(targetDocument));
48
+ this.innerElement.appendChild(buildFishSvg(mainContainer));
49
49
  this.element.appendChild(this.innerElement);
50
50
  this.applyTransform();
51
51
  }
@@ -81,8 +81,8 @@ const BODY_X_START = 5;
81
81
  const BODY_X_END = 90;
82
82
  const sharedDefsByDocument = ( new WeakMap());
83
83
  const SHARED_LOGO_SYMBOL_ID = "agents-aquarium-fish-logo";
84
- function ensureSharedDefs(targetDocument) {
85
- if (( sharedDefsByDocument.has(targetDocument))) {
84
+ function ensureSharedDefs(mainContainer) {
85
+ if (( sharedDefsByDocument.has(mainContainer.ownerDocument))) {
86
86
  return;
87
87
  }
88
88
  const stripWidth = (BODY_X_END - BODY_X_START) / NUM_BODY_STRIPS;
@@ -111,8 +111,8 @@ function ensureSharedDefs(targetDocument) {
111
111
  defs.appendChild(clip);
112
112
  }
113
113
  container.appendChild(defs);
114
- targetDocument.body.appendChild(container);
115
- sharedDefsByDocument.set(targetDocument, container);
114
+ mainContainer.appendChild(container);
115
+ sharedDefsByDocument.set(mainContainer.ownerDocument, container);
116
116
  }
117
117
  function createVSCodeLogoSymbol() {
118
118
  const symbol = $.SVG("symbol");
@@ -126,8 +126,8 @@ function createVSCodeLogoSymbol() {
126
126
  symbol.appendChild(logoPath);
127
127
  return symbol;
128
128
  }
129
- function buildFishSvg(targetDocument) {
130
- ensureSharedDefs(targetDocument);
129
+ function buildFishSvg(mainContainer) {
130
+ ensureSharedDefs(mainContainer);
131
131
  const svg = $.SVG("svg");
132
132
  svg.setAttribute("xmlns", "http://www.w3.org/2000/svg");
133
133
  svg.setAttribute("focusable", "false");