@patternfly/react-code-editor 5.0.0-alpha.53 → 5.0.0-alpha.54

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/CHANGELOG.md CHANGED
@@ -3,6 +3,10 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ # [5.0.0-alpha.54](https://github.com/patternfly/patternfly-react/compare/@patternfly/react-code-editor@5.0.0-alpha.53...@patternfly/react-code-editor@5.0.0-alpha.54) (2023-04-05)
7
+
8
+ **Note:** Version bump only for package @patternfly/react-code-editor
9
+
6
10
  # [5.0.0-alpha.53](https://github.com/patternfly/patternfly-react/compare/@patternfly/react-code-editor@5.0.0-alpha.52...@patternfly/react-code-editor@5.0.0-alpha.53) (2023-04-04)
7
11
 
8
12
  **Note:** Version bump only for package @patternfly/react-code-editor
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@patternfly/react-code-editor",
3
- "version": "5.0.0-alpha.53",
3
+ "version": "5.0.0-alpha.54",
4
4
  "description": "This package provides a PatternFly wrapper for the Monaco code editor\n",
5
5
  "main": "dist/js/index.js",
6
6
  "module": "dist/esm/index.js",
@@ -30,7 +30,7 @@
30
30
  "clean": "rimraf dist"
31
31
  },
32
32
  "dependencies": {
33
- "@patternfly/react-core": "^5.0.0-alpha.52",
33
+ "@patternfly/react-core": "^5.0.0-alpha.53",
34
34
  "@patternfly/react-icons": "^5.0.0-alpha.8",
35
35
  "@patternfly/react-styles": "^5.0.0-alpha.6",
36
36
  "react-dropzone": "14.2.3",
@@ -45,5 +45,5 @@
45
45
  "rimraf": "^2.6.2",
46
46
  "typescript": "^4.7.4"
47
47
  },
48
- "gitHead": "5eea8522248a6f8caa1d7cb27f5f5b95ca823b7b"
48
+ "gitHead": "c4f0e8983765fbf06c61c96ff4ed29731087355f"
49
49
  }
@@ -2,6 +2,20 @@ import React from 'react';
2
2
  import { render } from '@testing-library/react';
3
3
  import { CodeEditor, Language } from '../CodeEditor';
4
4
 
5
+ Object.defineProperty(window, 'matchMedia', {
6
+ writable: true,
7
+ value: jest.fn().mockImplementation(query => ({
8
+ matches: false,
9
+ media: query,
10
+ onchange: null,
11
+ addListener: jest.fn(), // Deprecated
12
+ removeListener: jest.fn(), // Deprecated
13
+ addEventListener: jest.fn(),
14
+ removeEventListener: jest.fn(),
15
+ dispatchEvent: jest.fn(),
16
+ })),
17
+ });
18
+
5
19
  describe('CodeEditor', () => {
6
20
  beforeAll(() => {
7
21
  window.HTMLCanvasElement.prototype.getContext = () => ({} as any);
@@ -142,7 +142,7 @@ exports[`CodeEditor matches snapshot with all props 1`] = `
142
142
  >
143
143
  <div
144
144
  class="react-monaco-editor-container"
145
- data-keybinding-context="1"
145
+ data-keybinding-context="2"
146
146
  data-mode-id="plaintext"
147
147
  style="height: 400px;"
148
148
  >
@@ -199,6 +199,11 @@ exports[`CodeEditor matches snapshot with all props 1`] = `
199
199
  class="view-rulers"
200
200
  role="presentation"
201
201
  />
202
+ <div
203
+ aria-hidden="true"
204
+ class="blockDecorations-container"
205
+ role="presentation"
206
+ />
202
207
  <div
203
208
  aria-hidden="true"
204
209
  class="view-zones"
@@ -210,7 +215,7 @@ exports[`CodeEditor matches snapshot with all props 1`] = `
210
215
  class="view-lines monaco-mouse-cursor-text"
211
216
  data-mprt="7"
212
217
  role="presentation"
213
- style="position: absolute; font-family: Consolas, 'Courier New', monospace; font-weight: normal; font-size: 14px; font-feature-settings: \\"liga\\" off, \\"calt\\" off; line-height: 19px; letter-spacing: 0px; width: 45px; height: 5px;"
218
+ style="position: absolute; font-family: Consolas, 'Courier New', monospace; font-weight: normal; font-size: 14px; font-feature-settings: \\"liga\\" off, \\"calt\\" off; line-height: 19px; letter-spacing: 0px; width: 54px; height: 19px;"
214
219
  >
215
220
  <div
216
221
  class="view-line"
@@ -256,7 +261,7 @@ exports[`CodeEditor matches snapshot with all props 1`] = `
256
261
  aria-hidden="true"
257
262
  class="decorationsOverviewRuler"
258
263
  height="5"
259
- style="position: absolute; transform: translate3d(0px, 0px, 0px); contain: strict; top: 0px; right: 0px; width: 14px; height: 5px;"
264
+ style="position: absolute; transform: translate3d(0px, 0px, 0px); contain: strict; top: 0px; right: 0px; width: 14px; height: 5px; display: block;"
260
265
  width="14"
261
266
  />
262
267
  <div
@@ -267,7 +272,7 @@ exports[`CodeEditor matches snapshot with all props 1`] = `
267
272
  >
268
273
  <div
269
274
  class="slider"
270
- style="position: absolute; top: 0px; left: 0px; width: 14px; transform: translate3d(0px, 0px, 0px); contain: strict; height: 5px;"
275
+ style="position: absolute; top: 0px; left: 0px; width: 14px; transform: translate3d(0px, 0px, 0px); contain: strict; height: 20px;"
271
276
  />
272
277
  </div>
273
278
  </div>
@@ -286,7 +291,6 @@ exports[`CodeEditor matches snapshot with all props 1`] = `
286
291
  autocorrect="off"
287
292
  class="inputarea monaco-mouse-cursor-text"
288
293
  data-mprt="6"
289
- readonly="true"
290
294
  role="textbox"
291
295
  spellcheck="false"
292
296
  style="font-family: Consolas, 'Courier New', monospace; font-weight: normal; font-size: 14px; font-feature-settings: \\"liga\\" off, \\"calt\\" off; line-height: 19px; letter-spacing: 0px; top: 0px; left: 0px; width: 1px; height: 1px;"
@@ -343,11 +347,6 @@ exports[`CodeEditor matches snapshot with all props 1`] = `
343
347
  class="overflowingContentWidgets"
344
348
  data-mprt="2"
345
349
  />
346
- <div
347
- aria-hidden="true"
348
- class="context-view"
349
- style="display: none;"
350
- />
351
350
  </div>
352
351
  </div>
353
352
  </div>
@@ -437,6 +436,11 @@ exports[`CodeEditor matches snapshot without props 1`] = `
437
436
  class="view-rulers"
438
437
  role="presentation"
439
438
  />
439
+ <div
440
+ aria-hidden="true"
441
+ class="blockDecorations-container"
442
+ role="presentation"
443
+ />
440
444
  <div
441
445
  aria-hidden="true"
442
446
  class="view-zones"
@@ -448,7 +452,7 @@ exports[`CodeEditor matches snapshot without props 1`] = `
448
452
  class="view-lines monaco-mouse-cursor-text"
449
453
  data-mprt="7"
450
454
  role="presentation"
451
- style="position: absolute; font-family: Consolas, 'Courier New', monospace; font-weight: normal; font-size: 14px; font-feature-settings: \\"liga\\" off, \\"calt\\" off; line-height: 19px; letter-spacing: 0px; width: 26px; height: 5px;"
455
+ style="position: absolute; font-family: Consolas, 'Courier New', monospace; font-weight: normal; font-size: 14px; font-feature-settings: \\"liga\\" off, \\"calt\\" off; line-height: 19px; letter-spacing: 0px; width: 35px; height: 19px;"
452
456
  >
453
457
  <div
454
458
  class="view-line"
@@ -490,7 +494,7 @@ exports[`CodeEditor matches snapshot without props 1`] = `
490
494
  aria-hidden="true"
491
495
  class="decorationsOverviewRuler"
492
496
  height="5"
493
- style="position: absolute; transform: translate3d(0px, 0px, 0px); contain: strict; top: 0px; right: 0px; width: 14px; height: 5px;"
497
+ style="position: absolute; transform: translate3d(0px, 0px, 0px); contain: strict; top: 0px; right: 0px; width: 14px; height: 5px; display: block;"
494
498
  width="14"
495
499
  />
496
500
  <div
@@ -501,7 +505,7 @@ exports[`CodeEditor matches snapshot without props 1`] = `
501
505
  >
502
506
  <div
503
507
  class="slider"
504
- style="position: absolute; top: 0px; left: 0px; width: 14px; transform: translate3d(0px, 0px, 0px); contain: strict; height: 5px;"
508
+ style="position: absolute; top: 0px; left: 0px; width: 14px; transform: translate3d(0px, 0px, 0px); contain: strict; height: 20px;"
505
509
  />
506
510
  </div>
507
511
  </div>
@@ -576,11 +580,6 @@ exports[`CodeEditor matches snapshot without props 1`] = `
576
580
  class="overflowingContentWidgets"
577
581
  data-mprt="2"
578
582
  />
579
- <div
580
- aria-hidden="true"
581
- class="context-view"
582
- style="display: none;"
583
- />
584
583
  </div>
585
584
  </div>
586
585
  </div>