@instructure/ui-source-code-editor 10.6.2-snapshot-1 → 10.6.2-snapshot-3
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 +5 -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,9 +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
|
-
## [10.6.2-snapshot-
|
|
6
|
+
## [10.6.2-snapshot-3](https://github.com/instructure/instructure-ui/compare/v10.6.1...v10.6.2-snapshot-3) (2024-11-29)
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* **ui-source-code-editor:** prevent Vite from erroring out during the build in React 16/17 ([c871244](https://github.com/instructure/instructure-ui/commit/c8712447a296fc0e3e436536e983196be27ad388))
|
|
9
12
|
|
|
10
13
|
|
|
11
14
|
|
|
@@ -103,8 +103,10 @@ export default function customSearch(searchConfig) {
|
|
|
103
103
|
dom.style.padding = '8px';
|
|
104
104
|
const reactVersionMajor = Number(React.version.split('.')[0]);
|
|
105
105
|
if (reactVersionMajor >= 18) {
|
|
106
|
+
const module = 'react-dom/client';
|
|
106
107
|
// webpack tries to evaluate imports compile time which would lead to an error on older react versions
|
|
107
|
-
|
|
108
|
+
// Vite errors out during build in React v16/17
|
|
109
|
+
import(/* webpackIgnore: true */ /* @vite-ignore */module).then(r => {
|
|
108
110
|
const root = r.createRoot(dom);
|
|
109
111
|
root.render(_SearchPanel || (_SearchPanel = /*#__PURE__*/React.createElement(SearchPanel, {
|
|
110
112
|
view: view,
|
|
@@ -113,8 +113,10 @@ function customSearch(searchConfig) {
|
|
|
113
113
|
dom.style.padding = '8px';
|
|
114
114
|
const reactVersionMajor = Number(_react.default.version.split('.')[0]);
|
|
115
115
|
if (reactVersionMajor >= 18) {
|
|
116
|
+
const module = 'react-dom/client';
|
|
116
117
|
// webpack tries to evaluate imports compile time which would lead to an error on older react versions
|
|
117
|
-
|
|
118
|
+
// Vite errors out during build in React v16/17
|
|
119
|
+
(specifier => new Promise(r => r(`${specifier}`)).then(s => (0, _interopRequireWildcard2.default)(require(s))))(/* webpackIgnore: true */ /* @vite-ignore */module).then(r => {
|
|
118
120
|
const root = r.createRoot(dom);
|
|
119
121
|
root.render(_SearchPanel || (_SearchPanel = /*#__PURE__*/_react.default.createElement(SearchPanel, {
|
|
120
122
|
view: view,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@instructure/ui-source-code-editor",
|
|
3
|
-
"version": "10.6.2-snapshot-
|
|
3
|
+
"version": "10.6.2-snapshot-3",
|
|
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.6.2-snapshot-
|
|
27
|
-
"@instructure/ui-test-queries": "10.6.2-snapshot-
|
|
28
|
-
"@instructure/ui-test-utils": "10.6.2-snapshot-
|
|
26
|
+
"@instructure/ui-babel-preset": "10.6.2-snapshot-3",
|
|
27
|
+
"@instructure/ui-test-queries": "10.6.2-snapshot-3",
|
|
28
|
+
"@instructure/ui-test-utils": "10.6.2-snapshot-3",
|
|
29
29
|
"@testing-library/jest-dom": "^6.4.6",
|
|
30
30
|
"@testing-library/react": "^16.0.1",
|
|
31
31
|
"vitest": "^2.1.1"
|
|
@@ -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.6.2-snapshot-
|
|
49
|
-
"@instructure/shared-types": "10.6.2-snapshot-
|
|
50
|
-
"@instructure/ui-a11y-content": "10.6.2-snapshot-
|
|
51
|
-
"@instructure/ui-buttons": "10.6.2-snapshot-
|
|
52
|
-
"@instructure/ui-dom-utils": "10.6.2-snapshot-
|
|
53
|
-
"@instructure/ui-i18n": "10.6.2-snapshot-
|
|
54
|
-
"@instructure/ui-icons": "10.6.2-snapshot-
|
|
55
|
-
"@instructure/ui-prop-types": "10.6.2-snapshot-
|
|
56
|
-
"@instructure/ui-react-utils": "10.6.2-snapshot-
|
|
57
|
-
"@instructure/ui-test-locator": "10.6.2-snapshot-
|
|
58
|
-
"@instructure/ui-testable": "10.6.2-snapshot-
|
|
59
|
-
"@instructure/ui-text-input": "10.6.2-snapshot-
|
|
60
|
-
"@instructure/ui-themes": "10.6.2-snapshot-
|
|
61
|
-
"@instructure/ui-utils": "10.6.2-snapshot-
|
|
48
|
+
"@instructure/emotion": "10.6.2-snapshot-3",
|
|
49
|
+
"@instructure/shared-types": "10.6.2-snapshot-3",
|
|
50
|
+
"@instructure/ui-a11y-content": "10.6.2-snapshot-3",
|
|
51
|
+
"@instructure/ui-buttons": "10.6.2-snapshot-3",
|
|
52
|
+
"@instructure/ui-dom-utils": "10.6.2-snapshot-3",
|
|
53
|
+
"@instructure/ui-i18n": "10.6.2-snapshot-3",
|
|
54
|
+
"@instructure/ui-icons": "10.6.2-snapshot-3",
|
|
55
|
+
"@instructure/ui-prop-types": "10.6.2-snapshot-3",
|
|
56
|
+
"@instructure/ui-react-utils": "10.6.2-snapshot-3",
|
|
57
|
+
"@instructure/ui-test-locator": "10.6.2-snapshot-3",
|
|
58
|
+
"@instructure/ui-testable": "10.6.2-snapshot-3",
|
|
59
|
+
"@instructure/ui-text-input": "10.6.2-snapshot-3",
|
|
60
|
+
"@instructure/ui-themes": "10.6.2-snapshot-3",
|
|
61
|
+
"@instructure/ui-utils": "10.6.2-snapshot-3",
|
|
62
62
|
"@lezer/highlight": "1.2.1",
|
|
63
63
|
"prop-types": "^15.8.1"
|
|
64
64
|
},
|
|
@@ -144,8 +144,10 @@ export default function customSearch(searchConfig: SearchConfig | undefined) {
|
|
|
144
144
|
dom.style.padding = '8px'
|
|
145
145
|
const reactVersionMajor = Number(React.version.split('.')[0])
|
|
146
146
|
if (reactVersionMajor >= 18) {
|
|
147
|
+
const module = 'react-dom/client'
|
|
147
148
|
// webpack tries to evaluate imports compile time which would lead to an error on older react versions
|
|
148
|
-
|
|
149
|
+
// Vite errors out during build in React v16/17
|
|
150
|
+
import(/* webpackIgnore: true */ /* @vite-ignore */ module)
|
|
149
151
|
.then((r) => {
|
|
150
152
|
const root = r.createRoot(dom)
|
|
151
153
|
root.render(
|