@instructure/ui-source-code-editor 8.53.3-snapshot-6 → 8.53.3-snapshot-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/CHANGELOG.md +2 -2
- package/es/SourceCodeEditor/SearchPanel.js +3 -1
- package/lib/SourceCodeEditor/SearchPanel.js +3 -1
- package/package.json +18 -18
- package/src/SourceCodeEditor/SearchPanel.tsx +3 -1
- package/tsconfig.build.tsbuildinfo +1 -1
- package/types/SourceCodeEditor/SearchPanel.d.ts.map +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,12 +3,12 @@
|
|
|
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
|
-
## [8.53.3-snapshot-
|
|
6
|
+
## [8.53.3-snapshot-5](https://github.com/instructure/instructure-ui/compare/v8.53.2...v8.53.3-snapshot-5) (2024-02-21)
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
### Bug Fixes
|
|
10
10
|
|
|
11
|
-
* **ui-source-code-editor:**
|
|
11
|
+
* **ui-source-code-editor:** make search panel work with older react versions ([a9b1f1a](https://github.com/instructure/instructure-ui/commit/a9b1f1ab5dd620cc93a59909d395387537e16895))
|
|
12
12
|
|
|
13
13
|
|
|
14
14
|
|
|
@@ -98,7 +98,9 @@ export default function customSearch(searchConfig) {
|
|
|
98
98
|
var _SearchPanel;
|
|
99
99
|
const dom = document.createElement('div');
|
|
100
100
|
dom.style.padding = '8px';
|
|
101
|
-
|
|
101
|
+
const reactVersionMajor = Number(React.version.split('.')[0]);
|
|
102
|
+
if (reactVersionMajor >= 18) {
|
|
103
|
+
// webpack tries to evaluate imports compile time which would lead to an error on older react versions
|
|
102
104
|
import( /* webpackIgnore: true */'react-dom/client').then(r => {
|
|
103
105
|
const root = r.createRoot(dom);
|
|
104
106
|
root.render(_SearchPanel || (_SearchPanel = /*#__PURE__*/React.createElement(SearchPanel, {
|
|
@@ -108,7 +108,9 @@ function customSearch(searchConfig) {
|
|
|
108
108
|
var _SearchPanel;
|
|
109
109
|
const dom = document.createElement('div');
|
|
110
110
|
dom.style.padding = '8px';
|
|
111
|
-
|
|
111
|
+
const reactVersionMajor = Number(_react.default.version.split('.')[0]);
|
|
112
|
+
if (reactVersionMajor >= 18) {
|
|
113
|
+
// webpack tries to evaluate imports compile time which would lead to an error on older react versions
|
|
112
114
|
Promise.resolve().then(() => (0, _interopRequireWildcard2.default)(require( /* webpackIgnore: true */'react-dom/client'))).then(r => {
|
|
113
115
|
const root = r.createRoot(dom);
|
|
114
116
|
root.render(_SearchPanel || (_SearchPanel = /*#__PURE__*/_react.default.createElement(SearchPanel, {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@instructure/ui-source-code-editor",
|
|
3
|
-
"version": "8.53.3-snapshot-
|
|
3
|
+
"version": "8.53.3-snapshot-5",
|
|
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": "8.53.3-snapshot-
|
|
27
|
-
"@instructure/ui-test-queries": "8.53.3-snapshot-
|
|
28
|
-
"@instructure/ui-test-utils": "8.53.3-snapshot-
|
|
26
|
+
"@instructure/ui-babel-preset": "8.53.3-snapshot-5",
|
|
27
|
+
"@instructure/ui-test-queries": "8.53.3-snapshot-5",
|
|
28
|
+
"@instructure/ui-test-utils": "8.53.3-snapshot-5",
|
|
29
29
|
"@testing-library/jest-dom": "^6.1.4",
|
|
30
30
|
"@testing-library/react": "^14.0.0"
|
|
31
31
|
},
|
|
@@ -44,20 +44,20 @@
|
|
|
44
44
|
"@codemirror/search": "^6.5.4",
|
|
45
45
|
"@codemirror/state": "^6.3.0",
|
|
46
46
|
"@codemirror/view": "^6.21.3",
|
|
47
|
-
"@instructure/emotion": "8.53.3-snapshot-
|
|
48
|
-
"@instructure/shared-types": "8.53.3-snapshot-
|
|
49
|
-
"@instructure/ui-a11y-content": "8.53.3-snapshot-
|
|
50
|
-
"@instructure/ui-buttons": "8.53.3-snapshot-
|
|
51
|
-
"@instructure/ui-dom-utils": "8.53.3-snapshot-
|
|
52
|
-
"@instructure/ui-i18n": "8.53.3-snapshot-
|
|
53
|
-
"@instructure/ui-icons": "8.53.3-snapshot-
|
|
54
|
-
"@instructure/ui-prop-types": "8.53.3-snapshot-
|
|
55
|
-
"@instructure/ui-react-utils": "8.53.3-snapshot-
|
|
56
|
-
"@instructure/ui-test-locator": "8.53.3-snapshot-
|
|
57
|
-
"@instructure/ui-testable": "8.53.3-snapshot-
|
|
58
|
-
"@instructure/ui-text-input": "8.53.3-snapshot-
|
|
59
|
-
"@instructure/ui-themes": "8.53.3-snapshot-
|
|
60
|
-
"@instructure/ui-utils": "8.53.3-snapshot-
|
|
47
|
+
"@instructure/emotion": "8.53.3-snapshot-5",
|
|
48
|
+
"@instructure/shared-types": "8.53.3-snapshot-5",
|
|
49
|
+
"@instructure/ui-a11y-content": "8.53.3-snapshot-5",
|
|
50
|
+
"@instructure/ui-buttons": "8.53.3-snapshot-5",
|
|
51
|
+
"@instructure/ui-dom-utils": "8.53.3-snapshot-5",
|
|
52
|
+
"@instructure/ui-i18n": "8.53.3-snapshot-5",
|
|
53
|
+
"@instructure/ui-icons": "8.53.3-snapshot-5",
|
|
54
|
+
"@instructure/ui-prop-types": "8.53.3-snapshot-5",
|
|
55
|
+
"@instructure/ui-react-utils": "8.53.3-snapshot-5",
|
|
56
|
+
"@instructure/ui-test-locator": "8.53.3-snapshot-5",
|
|
57
|
+
"@instructure/ui-testable": "8.53.3-snapshot-5",
|
|
58
|
+
"@instructure/ui-text-input": "8.53.3-snapshot-5",
|
|
59
|
+
"@instructure/ui-themes": "8.53.3-snapshot-5",
|
|
60
|
+
"@instructure/ui-utils": "8.53.3-snapshot-5",
|
|
61
61
|
"@lezer/highlight": "1.1.6",
|
|
62
62
|
"prop-types": "^15.8.1"
|
|
63
63
|
},
|
|
@@ -139,7 +139,9 @@ export default function customSearch(searchConfig: SearchConfig | undefined) {
|
|
|
139
139
|
createPanel: (view) => {
|
|
140
140
|
const dom = document.createElement('div')
|
|
141
141
|
dom.style.padding = '8px'
|
|
142
|
-
|
|
142
|
+
const reactVersionMajor = Number(React.version.split('.')[0])
|
|
143
|
+
if (reactVersionMajor >= 18) {
|
|
144
|
+
// webpack tries to evaluate imports compile time which would lead to an error on older react versions
|
|
143
145
|
import(/* webpackIgnore: true */ 'react-dom/client')
|
|
144
146
|
.then((r) => {
|
|
145
147
|
const root = r.createRoot(dom)
|