chrome-devtools-frontend 1.0.961797 → 1.0.961907

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.
@@ -660,7 +660,7 @@ const emulatedDevices = [
660
660
  },
661
661
  'capabilities': ['touch', 'mobile'],
662
662
  'user-agent':
663
- 'Mozilla/5.0 (iPhone; CPU iPhone OS 10_3_1 like Mac OS X) AppleWebKit/603.1.30 (KHTML, like Gecko) Version/10.0 Mobile/14E304 Safari/602.1',
663
+ 'Mozilla/5.0 (iPhone; CPU iPhone OS 13_2_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.3 Mobile/15E148 Safari/604.1',
664
664
  'type': 'phone',
665
665
  },
666
666
  {
@@ -680,7 +680,7 @@ const emulatedDevices = [
680
680
  },
681
681
  'capabilities': ['touch', 'mobile'],
682
682
  'user-agent':
683
- 'Mozilla/5.0 (iPhone; CPU iPhone OS 10_3_1 like Mac OS X) AppleWebKit/603.1.30 (KHTML, like Gecko) Version/10.0 Mobile/14E304 Safari/602.1',
683
+ 'Mozilla/5.0 (iPhone; CPU iPhone OS 13_2_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.3 Mobile/15E148 Safari/604.1',
684
684
  'type': 'phone',
685
685
  },
686
686
  {
@@ -700,7 +700,7 @@ const emulatedDevices = [
700
700
  },
701
701
  'capabilities': ['touch', 'mobile'],
702
702
  'user-agent':
703
- 'Mozilla/5.0 (iPhone; CPU iPhone OS 10_3_1 like Mac OS X) AppleWebKit/603.1.30 (KHTML, like Gecko) Version/10.0 Mobile/14E304 Safari/602.1',
703
+ 'Mozilla/5.0 (iPhone; CPU iPhone OS 13_2_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.3 Mobile/15E148 Safari/604.1',
704
704
  'type': 'phone',
705
705
  },
706
706
  {
@@ -5,11 +5,12 @@
5
5
  import * as Common from '../../../core/common/common.js';
6
6
  import * as WindowBoundsService from '../../../services/window_bounds/window_bounds.js';
7
7
  import * as CodeMirror from '../../../third_party/codemirror.next/codemirror.next.js';
8
+ import * as ThemeSupport from '../../legacy/theme_support/theme_support.js';
8
9
  import * as LitHtml from '../../lit-html/lit-html.js';
9
10
  import * as CodeHighlighter from '../code_highlighter/code_highlighter.js';
10
11
  import * as ComponentHelpers from '../helpers/helpers.js';
11
12
 
12
- import {baseConfiguration, dynamicSetting, DynamicSetting} from './config.js';
13
+ import {baseConfiguration, dummyDarkTheme, dynamicSetting, DynamicSetting, themeSelection} from './config.js';
13
14
  import {toLineColumn, toOffset} from './position.js';
14
15
 
15
16
  declare global {
@@ -66,6 +67,12 @@ export class TextEditor extends HTMLElement {
66
67
  });
67
68
  this.#ensureSettingListeners();
68
69
  this.#startObservingResize();
70
+ ThemeSupport.ThemeSupport.instance().addEventListener(ThemeSupport.ThemeChangeEvent.eventName, () => {
71
+ const currentTheme = ThemeSupport.ThemeSupport.instance().themeName() === 'dark' ? dummyDarkTheme : [];
72
+ this.editor.dispatch({
73
+ effects: themeSelection.reconfigure(currentTheme),
74
+ });
75
+ });
69
76
  return this.#activeEditor;
70
77
  }
71
78
 
@@ -202,10 +202,11 @@ function themeIsDark(): boolean {
202
202
  return setting === 'systemPreferred' ? window.matchMedia('(prefers-color-scheme: dark)').matches : setting === 'dark';
203
203
  }
204
204
 
205
- const dummyDarkTheme = CM.EditorView.theme({}, {dark: true});
205
+ export const dummyDarkTheme = CM.EditorView.theme({}, {dark: true});
206
+ export const themeSelection = new CM.Compartment();
206
207
 
207
208
  export function theme(): CM.Extension {
208
- return [editorTheme, themeIsDark() ? dummyDarkTheme : []];
209
+ return [editorTheme, themeIsDark() ? themeSelection.of(dummyDarkTheme) : themeSelection.of([])];
209
210
  }
210
211
 
211
212
  let sideBarElement: HTMLElement|null = null;
@@ -1031,7 +1031,7 @@ export class LongClickController {
1031
1031
  if (!this.longClickData) {
1032
1032
  return;
1033
1033
  }
1034
- this.element.removeEventListener('poinerdown', this.longClickData.mouseDown, false);
1034
+ this.element.removeEventListener('pointerdown', this.longClickData.mouseDown, false);
1035
1035
  this.element.removeEventListener('pointerout', this.longClickData.reset, false);
1036
1036
  this.element.removeEventListener('pointerup', this.longClickData.mouseUp, false);
1037
1037
  this.element.addEventListener('click', this.longClickData.reset, true);
package/package.json CHANGED
@@ -53,5 +53,5 @@
53
53
  "unittest": "scripts/test/run_unittests.py --no-text-coverage",
54
54
  "watch": "third_party/node/node.py --output scripts/watch_build.js"
55
55
  },
56
- "version": "1.0.961797"
56
+ "version": "1.0.961907"
57
57
  }