@instructure/ui-source-code-editor 10.16.1-snapshot-0 → 10.16.1

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,7 +3,7 @@
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
- ## [10.16.1-snapshot-0](https://github.com/instructure/instructure-ui/compare/v10.16.0...v10.16.1-snapshot-0) (2025-04-15)
6
+ ## [10.16.1](https://github.com/instructure/instructure-ui/compare/v10.16.0...v10.16.1) (2025-04-22)
7
7
 
8
8
  **Note:** Version bump only for package @instructure/ui-source-code-editor
9
9
 
@@ -24,12 +24,13 @@ var _IconSearchLine, _IconArrowOpenDownLin, _IconArrowOpenUpLine;
24
24
  * SOFTWARE.
25
25
  */
26
26
 
27
- import React, { useState } from 'react';
27
+ import { version, useState } from 'react';
28
28
  import { setSearchQuery, search, findNext, findPrevious, SearchQuery, closeSearchPanel } from '@codemirror/search';
29
29
  import { TextInput } from '@instructure/ui-text-input';
30
30
  import { IconButton } from '@instructure/ui-buttons';
31
31
  import { IconArrowOpenDownLine, IconArrowOpenUpLine, IconSearchLine } from '@instructure/ui-icons';
32
32
  import ReactDOM from 'react-dom';
33
+ import { jsx as _jsx, jsxs as _jsxs } from "@emotion/react/jsx-runtime";
33
34
  function SearchPanel({
34
35
  view,
35
36
  searchConfig
@@ -65,7 +66,7 @@ function SearchPanel({
65
66
  handleHighlightSearch(searchQueryStr);
66
67
  findPrevious(view);
67
68
  };
68
- return /*#__PURE__*/React.createElement(TextInput, {
69
+ return _jsx(TextInput, {
69
70
  renderLabel: "",
70
71
  inputRef: r => {
71
72
  setTimeout(() => r === null || r === void 0 ? void 0 : r.focus(), 0);
@@ -77,22 +78,26 @@ function SearchPanel({
77
78
  onChange: handleChange,
78
79
  onKeyDown: handleKeyDown,
79
80
  onKeyUp: handleKeyUp,
80
- renderBeforeInput: _IconSearchLine || (_IconSearchLine = /*#__PURE__*/React.createElement(IconSearchLine, {
81
+ renderBeforeInput: _IconSearchLine || (_IconSearchLine = _jsx(IconSearchLine, {
81
82
  size: "x-small"
82
83
  })),
83
- renderAfterInput: /*#__PURE__*/React.createElement("span", null, /*#__PURE__*/React.createElement(IconButton, {
84
- size: "small",
85
- withBorder: false,
86
- withBackground: false,
87
- onClick: handleFindNext,
88
- screenReaderLabel: searchConfig.nextResultLabel
89
- }, _IconArrowOpenDownLin || (_IconArrowOpenDownLin = /*#__PURE__*/React.createElement(IconArrowOpenDownLine, null))), /*#__PURE__*/React.createElement(IconButton, {
90
- size: "small",
91
- withBorder: false,
92
- withBackground: false,
93
- onClick: handleFindPrev,
94
- screenReaderLabel: searchConfig.prevResultLabel
95
- }, _IconArrowOpenUpLine || (_IconArrowOpenUpLine = /*#__PURE__*/React.createElement(IconArrowOpenUpLine, null))))
84
+ renderAfterInput: _jsxs("span", {
85
+ children: [_jsx(IconButton, {
86
+ size: "small",
87
+ withBorder: false,
88
+ withBackground: false,
89
+ onClick: handleFindNext,
90
+ screenReaderLabel: searchConfig.nextResultLabel,
91
+ children: _IconArrowOpenDownLin || (_IconArrowOpenDownLin = _jsx(IconArrowOpenDownLine, {}))
92
+ }), _jsx(IconButton, {
93
+ size: "small",
94
+ withBorder: false,
95
+ withBackground: false,
96
+ onClick: handleFindPrev,
97
+ screenReaderLabel: searchConfig.prevResultLabel,
98
+ children: _IconArrowOpenUpLine || (_IconArrowOpenUpLine = _jsx(IconArrowOpenUpLine, {}))
99
+ })]
100
+ })
96
101
  });
97
102
  }
98
103
  export default function customSearch(searchConfig) {
@@ -101,20 +106,20 @@ export default function customSearch(searchConfig) {
101
106
  var _SearchPanel;
102
107
  const dom = document.createElement('div');
103
108
  dom.style.padding = '8px';
104
- const reactVersionMajor = Number(React.version.split('.')[0]);
109
+ const reactVersionMajor = Number(version.split('.')[0]);
105
110
  if (reactVersionMajor >= 18) {
106
111
  const module = 'react-dom/client';
107
112
  // webpack tries to evaluate imports compile time which would lead to an error on older react versions
108
113
  // Vite errors out during build in React v16/17
109
114
  import(/* webpackIgnore: true */ /* @vite-ignore */module).then(r => {
110
115
  const root = r.createRoot(dom);
111
- root.render(_SearchPanel || (_SearchPanel = /*#__PURE__*/React.createElement(SearchPanel, {
116
+ root.render(_SearchPanel || (_SearchPanel = _jsx(SearchPanel, {
112
117
  view: view,
113
118
  searchConfig: searchConfig
114
119
  })));
115
120
  }).catch(e => {});
116
121
  } else {
117
- ReactDOM.render(/*#__PURE__*/React.createElement(SearchPanel, {
122
+ ReactDOM.render(_jsx(SearchPanel, {
118
123
  view: view,
119
124
  searchConfig: searchConfig
120
125
  }), dom);
@@ -22,14 +22,15 @@ var _SourceCodeEditor, _SourceCodeEditor2;
22
22
  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23
23
  * SOFTWARE.
24
24
  */
25
- import React from 'react';
25
+
26
26
  import { render } from '@testing-library/react';
27
27
  import SourceCodeEditor from '../index';
28
28
  import '@testing-library/jest-dom';
29
+ import { jsx as _jsx } from "@emotion/react/jsx-runtime";
29
30
  describe('<SourceCodeEditor />', () => {
30
31
  describe('syntax highlight', () => {
31
32
  it('should highlight jsx code', async () => {
32
- const _render = render(_SourceCodeEditor || (_SourceCodeEditor = /*#__PURE__*/React.createElement(SourceCodeEditor, {
33
+ const _render = render(_SourceCodeEditor || (_SourceCodeEditor = _jsx(SourceCodeEditor, {
33
34
  label: "test",
34
35
  language: "jsx",
35
36
  defaultValue: "const a = 2;"
@@ -49,7 +50,7 @@ describe('<SourceCodeEditor />', () => {
49
50
  });
50
51
  it('should link editor element to label using aria-labelledby attribute', async () => {
51
52
  var _container$querySelec;
52
- const _render2 = render(_SourceCodeEditor2 || (_SourceCodeEditor2 = /*#__PURE__*/React.createElement(SourceCodeEditor, {
53
+ const _render2 = render(_SourceCodeEditor2 || (_SourceCodeEditor2 = _jsx(SourceCodeEditor, {
53
54
  label: "test",
54
55
  language: "jsx",
55
56
  defaultValue: "const a = 2;"
@@ -25,7 +25,6 @@ var _dec, _dec2, _dec3, _dec4, _class, _SourceCodeEditor;
25
25
  * SOFTWARE.
26
26
  */
27
27
 
28
- /** @jsx jsx */
29
28
  import { Component } from 'react';
30
29
  import { deepEqual as isEqual } from '@instructure/ui-utils';
31
30
  import { EditorState, StateEffect } from '@codemirror/state';
@@ -49,12 +48,13 @@ import { omitProps, passthroughProps, withDeterministicId } from '@instructure/u
49
48
  import { requestAnimationFrame } from '@instructure/ui-dom-utils';
50
49
  import { ScreenReaderContent } from '@instructure/ui-a11y-content';
51
50
  import { textDirectionContextConsumer } from '@instructure/ui-i18n';
52
- import { withStyle, jsx } from '@instructure/emotion';
51
+ import { withStyle } from '@instructure/emotion';
53
52
  import customSearch from './SearchPanel';
54
53
  import generateStyle from './styles';
55
54
  import generateComponentTheme from './theme';
56
55
  import { rtlHorizontalArrowKeymap } from './customKeybinding';
57
56
  import { propTypes, allowedProps } from './props';
57
+ import { jsx as _jsx, jsxs as _jsxs } from "@emotion/react/jsx-runtime";
58
58
  /**
59
59
  ---
60
60
  category: components
@@ -499,16 +499,21 @@ let SourceCodeEditor = (_dec = withDeterministicId(), _dec2 = withStyle(generate
499
499
  label = _this$props6.label,
500
500
  styles = _this$props6.styles,
501
501
  restProps = _objectWithoutProperties(_this$props6, _excluded);
502
- return jsx("div", Object.assign({
502
+ return _jsx("div", {
503
503
  ref: this.handleRef,
504
- css: styles === null || styles === void 0 ? void 0 : styles.codeEditor
505
- }, passthroughProps(omitProps(restProps, SourceCodeEditor.allowedProps))), jsx("label", {
506
- css: styles === null || styles === void 0 ? void 0 : styles.label,
507
- id: this._id
508
- }, jsx(ScreenReaderContent, null, label), jsx("div", {
509
- ref: this.handleContainerRef,
510
- css: styles === null || styles === void 0 ? void 0 : styles.codeEditorContainer
511
- })));
504
+ css: styles === null || styles === void 0 ? void 0 : styles.codeEditor,
505
+ ...passthroughProps(omitProps(restProps, SourceCodeEditor.allowedProps)),
506
+ children: _jsxs("label", {
507
+ css: styles === null || styles === void 0 ? void 0 : styles.label,
508
+ id: this._id,
509
+ children: [_jsx(ScreenReaderContent, {
510
+ children: label
511
+ }), _jsx("div", {
512
+ ref: this.handleContainerRef,
513
+ css: styles === null || styles === void 0 ? void 0 : styles.codeEditorContainer
514
+ })]
515
+ })
516
+ });
512
517
  }
513
518
  }, _SourceCodeEditor.displayName = "SourceCodeEditor", _SourceCodeEditor.componentId = 'SourceCodeEditor', _SourceCodeEditor.propTypes = propTypes, _SourceCodeEditor.allowedProps = allowedProps, _SourceCodeEditor.defaultProps = {
514
519
  language: 'jsx',
@@ -1,14 +1,13 @@
1
1
  "use strict";
2
2
 
3
3
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
4
- var _interopRequireWildcard3 = require("@babel/runtime/helpers/interopRequireWildcard").default;
5
4
  Object.defineProperty(exports, "__esModule", {
6
5
  value: true
7
6
  });
8
7
  exports.default = customSearch;
9
8
  var _interopRequireWildcard2 = _interopRequireDefault(require("@babel/runtime/helpers/interopRequireWildcard"));
10
9
  var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
11
- var _react = _interopRequireWildcard3(require("react"));
10
+ var _react = require("react");
12
11
  var _search = require("@codemirror/search");
13
12
  var _TextInput = require("@instructure/ui-text-input/lib/TextInput");
14
13
  var _IconButton = require("@instructure/ui-buttons/lib/IconButton");
@@ -16,6 +15,7 @@ var _IconArrowOpenDownLine = require("@instructure/ui-icons/lib/IconArrowOpenDow
16
15
  var _IconArrowOpenUpLine2 = require("@instructure/ui-icons/lib/IconArrowOpenUpLine.js");
17
16
  var _IconSearchLine2 = require("@instructure/ui-icons/lib/IconSearchLine.js");
18
17
  var _reactDom = _interopRequireDefault(require("react-dom"));
18
+ var _jsxRuntime = require("@emotion/react/jsx-runtime");
19
19
  var _IconSearchLine, _IconArrowOpenDownLin, _IconArrowOpenUpLine;
20
20
  /*
21
21
  * The MIT License (MIT)
@@ -75,7 +75,7 @@ function SearchPanel({
75
75
  handleHighlightSearch(searchQueryStr);
76
76
  (0, _search.findPrevious)(view);
77
77
  };
78
- return /*#__PURE__*/_react.default.createElement(_TextInput.TextInput, {
78
+ return (0, _jsxRuntime.jsx)(_TextInput.TextInput, {
79
79
  renderLabel: "",
80
80
  inputRef: r => {
81
81
  setTimeout(() => r === null || r === void 0 ? void 0 : r.focus(), 0);
@@ -87,22 +87,26 @@ function SearchPanel({
87
87
  onChange: handleChange,
88
88
  onKeyDown: handleKeyDown,
89
89
  onKeyUp: handleKeyUp,
90
- renderBeforeInput: _IconSearchLine || (_IconSearchLine = /*#__PURE__*/_react.default.createElement(_IconSearchLine2.IconSearchLine, {
90
+ renderBeforeInput: _IconSearchLine || (_IconSearchLine = (0, _jsxRuntime.jsx)(_IconSearchLine2.IconSearchLine, {
91
91
  size: "x-small"
92
92
  })),
93
- renderAfterInput: /*#__PURE__*/_react.default.createElement("span", null, /*#__PURE__*/_react.default.createElement(_IconButton.IconButton, {
94
- size: "small",
95
- withBorder: false,
96
- withBackground: false,
97
- onClick: handleFindNext,
98
- screenReaderLabel: searchConfig.nextResultLabel
99
- }, _IconArrowOpenDownLin || (_IconArrowOpenDownLin = /*#__PURE__*/_react.default.createElement(_IconArrowOpenDownLine.IconArrowOpenDownLine, null))), /*#__PURE__*/_react.default.createElement(_IconButton.IconButton, {
100
- size: "small",
101
- withBorder: false,
102
- withBackground: false,
103
- onClick: handleFindPrev,
104
- screenReaderLabel: searchConfig.prevResultLabel
105
- }, _IconArrowOpenUpLine || (_IconArrowOpenUpLine = /*#__PURE__*/_react.default.createElement(_IconArrowOpenUpLine2.IconArrowOpenUpLine, null))))
93
+ renderAfterInput: (0, _jsxRuntime.jsxs)("span", {
94
+ children: [(0, _jsxRuntime.jsx)(_IconButton.IconButton, {
95
+ size: "small",
96
+ withBorder: false,
97
+ withBackground: false,
98
+ onClick: handleFindNext,
99
+ screenReaderLabel: searchConfig.nextResultLabel,
100
+ children: _IconArrowOpenDownLin || (_IconArrowOpenDownLin = (0, _jsxRuntime.jsx)(_IconArrowOpenDownLine.IconArrowOpenDownLine, {}))
101
+ }), (0, _jsxRuntime.jsx)(_IconButton.IconButton, {
102
+ size: "small",
103
+ withBorder: false,
104
+ withBackground: false,
105
+ onClick: handleFindPrev,
106
+ screenReaderLabel: searchConfig.prevResultLabel,
107
+ children: _IconArrowOpenUpLine || (_IconArrowOpenUpLine = (0, _jsxRuntime.jsx)(_IconArrowOpenUpLine2.IconArrowOpenUpLine, {}))
108
+ })]
109
+ })
106
110
  });
107
111
  }
108
112
  function customSearch(searchConfig) {
@@ -111,20 +115,20 @@ function customSearch(searchConfig) {
111
115
  var _SearchPanel;
112
116
  const dom = document.createElement('div');
113
117
  dom.style.padding = '8px';
114
- const reactVersionMajor = Number(_react.default.version.split('.')[0]);
118
+ const reactVersionMajor = Number(_react.version.split('.')[0]);
115
119
  if (reactVersionMajor >= 18) {
116
120
  const module = 'react-dom/client';
117
121
  // webpack tries to evaluate imports compile time which would lead to an error on older react versions
118
122
  // Vite errors out during build in React v16/17
119
123
  (specifier => new Promise(r => r(`${specifier}`)).then(s => (0, _interopRequireWildcard2.default)(require(s))))(/* webpackIgnore: true */ /* @vite-ignore */module).then(r => {
120
124
  const root = r.createRoot(dom);
121
- root.render(_SearchPanel || (_SearchPanel = /*#__PURE__*/_react.default.createElement(SearchPanel, {
125
+ root.render(_SearchPanel || (_SearchPanel = (0, _jsxRuntime.jsx)(SearchPanel, {
122
126
  view: view,
123
127
  searchConfig: searchConfig
124
128
  })));
125
129
  }).catch(e => {});
126
130
  } else {
127
- _reactDom.default.render(/*#__PURE__*/_react.default.createElement(SearchPanel, {
131
+ _reactDom.default.render((0, _jsxRuntime.jsx)(SearchPanel, {
128
132
  view: view,
129
133
  searchConfig: searchConfig
130
134
  }), dom);
@@ -1,10 +1,10 @@
1
1
  "use strict";
2
2
 
3
3
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
4
- var _react = _interopRequireDefault(require("react"));
5
- var _react2 = require("@testing-library/react");
4
+ var _react = require("@testing-library/react");
6
5
  var _index = _interopRequireDefault(require("../index"));
7
6
  require("@testing-library/jest-dom");
7
+ var _jsxRuntime = require("@emotion/react/jsx-runtime");
8
8
  var _SourceCodeEditor, _SourceCodeEditor2;
9
9
  /*
10
10
  * The MIT License (MIT)
@@ -32,7 +32,7 @@ var _SourceCodeEditor, _SourceCodeEditor2;
32
32
  describe('<SourceCodeEditor />', () => {
33
33
  describe('syntax highlight', () => {
34
34
  it('should highlight jsx code', async () => {
35
- const _render = (0, _react2.render)(_SourceCodeEditor || (_SourceCodeEditor = /*#__PURE__*/_react.default.createElement(_index.default, {
35
+ const _render = (0, _react.render)(_SourceCodeEditor || (_SourceCodeEditor = (0, _jsxRuntime.jsx)(_index.default, {
36
36
  label: "test",
37
37
  language: "jsx",
38
38
  defaultValue: "const a = 2;"
@@ -52,7 +52,7 @@ describe('<SourceCodeEditor />', () => {
52
52
  });
53
53
  it('should link editor element to label using aria-labelledby attribute', async () => {
54
54
  var _container$querySelec;
55
- const _render2 = (0, _react2.render)(_SourceCodeEditor2 || (_SourceCodeEditor2 = /*#__PURE__*/_react.default.createElement(_index.default, {
55
+ const _render2 = (0, _react.render)(_SourceCodeEditor2 || (_SourceCodeEditor2 = (0, _jsxRuntime.jsx)(_index.default, {
56
56
  label: "test",
57
57
  language: "jsx",
58
58
  defaultValue: "const a = 2;"
@@ -35,6 +35,7 @@ var _styles = _interopRequireDefault(require("./styles"));
35
35
  var _theme = _interopRequireDefault(require("./theme"));
36
36
  var _customKeybinding = require("./customKeybinding");
37
37
  var _props = require("./props");
38
+ var _jsxRuntime = require("@emotion/react/jsx-runtime");
38
39
  const _excluded = ["label", "styles"];
39
40
  var _dec, _dec2, _dec3, _dec4, _class, _SourceCodeEditor;
40
41
  /*
@@ -60,7 +61,6 @@ var _dec, _dec2, _dec3, _dec4, _class, _SourceCodeEditor;
60
61
  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
61
62
  * SOFTWARE.
62
63
  */
63
- /** @jsx jsx */
64
64
  // import { oneDarkTheme, oneDarkHighlightStyle } from '@codemirror/theme-one-dark'
65
65
  /**
66
66
  ---
@@ -506,16 +506,21 @@ let SourceCodeEditor = exports.SourceCodeEditor = (_dec = (0, _withDeterministic
506
506
  label = _this$props6.label,
507
507
  styles = _this$props6.styles,
508
508
  restProps = (0, _objectWithoutProperties2.default)(_this$props6, _excluded);
509
- return (0, _emotion.jsx)("div", Object.assign({
509
+ return (0, _jsxRuntime.jsx)("div", {
510
510
  ref: this.handleRef,
511
- css: styles === null || styles === void 0 ? void 0 : styles.codeEditor
512
- }, (0, _passthroughProps.passthroughProps)((0, _omitProps.omitProps)(restProps, SourceCodeEditor.allowedProps))), (0, _emotion.jsx)("label", {
513
- css: styles === null || styles === void 0 ? void 0 : styles.label,
514
- id: this._id
515
- }, (0, _emotion.jsx)(_ScreenReaderContent.ScreenReaderContent, null, label), (0, _emotion.jsx)("div", {
516
- ref: this.handleContainerRef,
517
- css: styles === null || styles === void 0 ? void 0 : styles.codeEditorContainer
518
- })));
511
+ css: styles === null || styles === void 0 ? void 0 : styles.codeEditor,
512
+ ...(0, _passthroughProps.passthroughProps)((0, _omitProps.omitProps)(restProps, SourceCodeEditor.allowedProps)),
513
+ children: (0, _jsxRuntime.jsxs)("label", {
514
+ css: styles === null || styles === void 0 ? void 0 : styles.label,
515
+ id: this._id,
516
+ children: [(0, _jsxRuntime.jsx)(_ScreenReaderContent.ScreenReaderContent, {
517
+ children: label
518
+ }), (0, _jsxRuntime.jsx)("div", {
519
+ ref: this.handleContainerRef,
520
+ css: styles === null || styles === void 0 ? void 0 : styles.codeEditorContainer
521
+ })]
522
+ })
523
+ });
519
524
  }
520
525
  }, _SourceCodeEditor.displayName = "SourceCodeEditor", _SourceCodeEditor.componentId = 'SourceCodeEditor', _SourceCodeEditor.propTypes = _props.propTypes, _SourceCodeEditor.allowedProps = _props.allowedProps, _SourceCodeEditor.defaultProps = {
521
526
  language: 'jsx',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@instructure/ui-source-code-editor",
3
- "version": "10.16.1-snapshot-0",
3
+ "version": "10.16.1",
4
4
  "description": "A UI component library made by Instructure Inc.",
5
5
  "author": "Instructure, Inc. Engineering and Product Design",
6
6
  "module": "./es/index.js",
@@ -23,9 +23,9 @@
23
23
  },
24
24
  "license": "MIT",
25
25
  "devDependencies": {
26
- "@instructure/ui-babel-preset": "10.16.1-snapshot-0",
27
- "@instructure/ui-test-queries": "10.16.1-snapshot-0",
28
- "@instructure/ui-test-utils": "10.16.1-snapshot-0",
26
+ "@instructure/ui-babel-preset": "10.16.1",
27
+ "@instructure/ui-test-queries": "10.16.1",
28
+ "@instructure/ui-test-utils": "10.16.1",
29
29
  "@testing-library/jest-dom": "^6.6.3",
30
30
  "@testing-library/react": "^16.0.1",
31
31
  "vitest": "^2.1.8"
@@ -45,20 +45,20 @@
45
45
  "@codemirror/search": "^6.5.6",
46
46
  "@codemirror/state": "^6.4.1",
47
47
  "@codemirror/view": "^6.34.1",
48
- "@instructure/emotion": "10.16.1-snapshot-0",
49
- "@instructure/shared-types": "10.16.1-snapshot-0",
50
- "@instructure/ui-a11y-content": "10.16.1-snapshot-0",
51
- "@instructure/ui-buttons": "10.16.1-snapshot-0",
52
- "@instructure/ui-dom-utils": "10.16.1-snapshot-0",
53
- "@instructure/ui-i18n": "10.16.1-snapshot-0",
54
- "@instructure/ui-icons": "10.16.1-snapshot-0",
55
- "@instructure/ui-prop-types": "10.16.1-snapshot-0",
56
- "@instructure/ui-react-utils": "10.16.1-snapshot-0",
57
- "@instructure/ui-test-locator": "10.16.1-snapshot-0",
58
- "@instructure/ui-testable": "10.16.1-snapshot-0",
59
- "@instructure/ui-text-input": "10.16.1-snapshot-0",
60
- "@instructure/ui-themes": "10.16.1-snapshot-0",
61
- "@instructure/ui-utils": "10.16.1-snapshot-0",
48
+ "@instructure/emotion": "10.16.1",
49
+ "@instructure/shared-types": "10.16.1",
50
+ "@instructure/ui-a11y-content": "10.16.1",
51
+ "@instructure/ui-buttons": "10.16.1",
52
+ "@instructure/ui-dom-utils": "10.16.1",
53
+ "@instructure/ui-i18n": "10.16.1",
54
+ "@instructure/ui-icons": "10.16.1",
55
+ "@instructure/ui-prop-types": "10.16.1",
56
+ "@instructure/ui-react-utils": "10.16.1",
57
+ "@instructure/ui-test-locator": "10.16.1",
58
+ "@instructure/ui-testable": "10.16.1",
59
+ "@instructure/ui-text-input": "10.16.1",
60
+ "@instructure/ui-themes": "10.16.1",
61
+ "@instructure/ui-utils": "10.16.1",
62
62
  "@lezer/highlight": "1.2.1",
63
63
  "prop-types": "^15.8.1"
64
64
  },
@@ -22,7 +22,7 @@
22
22
  * SOFTWARE.
23
23
  */
24
24
 
25
- import React, { useState } from 'react'
25
+ import { version, useState } from 'react'
26
26
  import {
27
27
  setSearchQuery,
28
28
  search,
@@ -142,7 +142,7 @@ export default function customSearch(searchConfig: SearchConfig | undefined) {
142
142
  createPanel: (view) => {
143
143
  const dom = document.createElement('div')
144
144
  dom.style.padding = '8px'
145
- const reactVersionMajor = Number(React.version.split('.')[0])
145
+ const reactVersionMajor = Number(version.split('.')[0])
146
146
  if (reactVersionMajor >= 18) {
147
147
  const module = 'react-dom/client'
148
148
  // webpack tries to evaluate imports compile time which would lead to an error on older react versions
@@ -21,7 +21,7 @@
21
21
  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22
22
  * SOFTWARE.
23
23
  */
24
- import React from 'react'
24
+
25
25
  import { render } from '@testing-library/react'
26
26
  import SourceCodeEditor from '../index'
27
27
  import '@testing-library/jest-dom'
@@ -22,7 +22,6 @@
22
22
  * SOFTWARE.
23
23
  */
24
24
 
25
- /** @jsx jsx */
26
25
  import { Component } from 'react'
27
26
  import { deepEqual as isEqual } from '@instructure/ui-utils'
28
27
 
@@ -89,7 +88,7 @@ import type { RequestAnimationFrameType } from '@instructure/ui-dom-utils'
89
88
  import { ScreenReaderContent } from '@instructure/ui-a11y-content'
90
89
  import { textDirectionContextConsumer } from '@instructure/ui-i18n'
91
90
 
92
- import { withStyle, jsx } from '@instructure/emotion'
91
+ import { withStyle } from '@instructure/emotion'
93
92
 
94
93
  import customSearch from './SearchPanel'
95
94