@instructure/ui-source-code-editor 11.7.8 → 11.7.9-snapshot-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,6 +3,14 @@
|
|
|
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
|
+
## [11.7.9-snapshot-1](https://github.com/instructure/instructure-ui/compare/v11.7.8...v11.7.9-snapshot-1) (2026-10-06)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @instructure/ui-source-code-editor
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
6
14
|
## [11.7.8](https://github.com/instructure/instructure-ui/compare/v11.7.7...v11.7.8) (2026-10-02)
|
|
7
15
|
|
|
8
16
|
**Note:** Version bump only for package @instructure/ui-source-code-editor
|
|
@@ -8,9 +8,7 @@ var _react = require("react");
|
|
|
8
8
|
var _search = require("@codemirror/search");
|
|
9
9
|
var _v11_ = require("@instructure/ui-text-input/v11_6");
|
|
10
10
|
var _v11_2 = require("@instructure/ui-buttons/v11_6");
|
|
11
|
-
var
|
|
12
|
-
var _IconArrowOpenUpLine = require("@instructure/ui-icons/lib/generated/IconArrowOpenUpLine.js");
|
|
13
|
-
var _IconSearchLine = require("@instructure/ui-icons/lib/generated/IconSearchLine.js");
|
|
11
|
+
var _uiIcons = require("@instructure/ui-icons");
|
|
14
12
|
var _client = require("react-dom/client");
|
|
15
13
|
var _jsxRuntime = require("@emotion/react/jsx-runtime");
|
|
16
14
|
/*
|
|
@@ -81,7 +79,7 @@ function SearchPanel({
|
|
|
81
79
|
onChange: handleChange,
|
|
82
80
|
onKeyDown: handleKeyDown,
|
|
83
81
|
onKeyUp: handleKeyUp,
|
|
84
|
-
renderBeforeInput: (0, _jsxRuntime.jsx)(
|
|
82
|
+
renderBeforeInput: (0, _jsxRuntime.jsx)(_uiIcons.IconSearchLine, {
|
|
85
83
|
size: "x-small"
|
|
86
84
|
}),
|
|
87
85
|
renderAfterInput: (0, _jsxRuntime.jsxs)("span", {
|
|
@@ -91,14 +89,14 @@ function SearchPanel({
|
|
|
91
89
|
withBackground: false,
|
|
92
90
|
onClick: handleFindNext,
|
|
93
91
|
screenReaderLabel: searchConfig.nextResultLabel,
|
|
94
|
-
children: (0, _jsxRuntime.jsx)(
|
|
92
|
+
children: (0, _jsxRuntime.jsx)(_uiIcons.IconArrowOpenDownLine, {})
|
|
95
93
|
}), (0, _jsxRuntime.jsx)(_v11_2.IconButton, {
|
|
96
94
|
size: "small",
|
|
97
95
|
withBorder: false,
|
|
98
96
|
withBackground: false,
|
|
99
97
|
onClick: handleFindPrev,
|
|
100
98
|
screenReaderLabel: searchConfig.prevResultLabel,
|
|
101
|
-
children: (0, _jsxRuntime.jsx)(
|
|
99
|
+
children: (0, _jsxRuntime.jsx)(_uiIcons.IconArrowOpenUpLine, {})
|
|
102
100
|
})]
|
|
103
101
|
})
|
|
104
102
|
});
|
|
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
});
|
|
7
7
|
exports.default = exports.SourceCodeEditor = void 0;
|
|
8
8
|
var _react = require("react");
|
|
9
|
-
var
|
|
9
|
+
var _uiUtils = require("@instructure/ui-utils");
|
|
10
10
|
var _state = require("@codemirror/state");
|
|
11
11
|
var _view = require("@codemirror/view");
|
|
12
12
|
var _autocomplete = require("@codemirror/autocomplete");
|
|
@@ -21,12 +21,10 @@ var _langMarkdown = require("@codemirror/lang-markdown");
|
|
|
21
21
|
var _langJson = require("@codemirror/lang-json");
|
|
22
22
|
var _shell = require("@codemirror/legacy-modes/mode/shell");
|
|
23
23
|
var _yaml = require("@codemirror/legacy-modes/mode/yaml");
|
|
24
|
-
var
|
|
25
|
-
var
|
|
26
|
-
var
|
|
27
|
-
var
|
|
28
|
-
var _ScreenReaderContent = require("@instructure/ui-a11y-content/lib/ScreenReaderContent");
|
|
29
|
-
var _textDirectionContextConsumer = require("@instructure/ui-i18n/lib/textDirectionContextConsumer.js");
|
|
24
|
+
var _uiReactUtils = require("@instructure/ui-react-utils");
|
|
25
|
+
var _uiDomUtils = require("@instructure/ui-dom-utils");
|
|
26
|
+
var _uiA11yContent = require("@instructure/ui-a11y-content");
|
|
27
|
+
var _uiI18n = require("@instructure/ui-i18n");
|
|
30
28
|
var _emotion = require("@instructure/emotion");
|
|
31
29
|
var _SearchPanel = _interopRequireDefault(require("./SearchPanel.js"));
|
|
32
30
|
var _styles = _interopRequireDefault(require("./styles.js"));
|
|
@@ -64,7 +62,7 @@ var _dec, _dec2, _dec3, _class;
|
|
|
64
62
|
category: components
|
|
65
63
|
---
|
|
66
64
|
**/
|
|
67
|
-
let SourceCodeEditor = exports.SourceCodeEditor = (_dec = (0,
|
|
65
|
+
let SourceCodeEditor = exports.SourceCodeEditor = (_dec = (0, _uiReactUtils.withDeterministicId)(), _dec2 = (0, _emotion.withStyle)(_styles.default, _theme.default), _dec3 = (0, _uiI18n.textDirectionContextConsumer)(), _dec(_class = _dec2(_class = _dec3(_class = class SourceCodeEditor extends _react.Component {
|
|
68
66
|
static displayName = 'SourceCodeEditor';
|
|
69
67
|
static componentId = 'SourceCodeEditor';
|
|
70
68
|
static allowedProps = _props.allowedProps;
|
|
@@ -111,7 +109,7 @@ let SourceCodeEditor = exports.SourceCodeEditor = (_dec = (0, _withDeterministic
|
|
|
111
109
|
};
|
|
112
110
|
addAnimationFrame(callback) {
|
|
113
111
|
if (typeof callback === 'function') {
|
|
114
|
-
this._raf.push((0,
|
|
112
|
+
this._raf.push((0, _uiDomUtils.requestAnimationFrame)(callback));
|
|
115
113
|
}
|
|
116
114
|
}
|
|
117
115
|
cancelAnimationFrames() {
|
|
@@ -272,7 +270,7 @@ let SourceCodeEditor = exports.SourceCodeEditor = (_dec = (0, _withDeterministic
|
|
|
272
270
|
// needed for theme update
|
|
273
271
|
'themeOverride', 'language', 'readOnly', 'editable', 'lineNumbers', 'highlightActiveLineGutter', 'foldGutter', 'lineWrapping', 'autofocus', 'spellcheck', 'direction', 'dir', 'rtlMoveVisually', 'indentOnLoad', 'indentWithTab', 'indentUnit', 'highlightActiveLine', 'attachment'];
|
|
274
272
|
for (const prop of propsToObserve) {
|
|
275
|
-
if (!(0,
|
|
273
|
+
if (!(0, _uiUtils.deepEqual)(this.props[prop], prevProps[prop])) {
|
|
276
274
|
return true;
|
|
277
275
|
}
|
|
278
276
|
}
|
|
@@ -535,11 +533,11 @@ let SourceCodeEditor = exports.SourceCodeEditor = (_dec = (0, _withDeterministic
|
|
|
535
533
|
"data-cid": "SourceCodeEditor",
|
|
536
534
|
ref: this.handleRef,
|
|
537
535
|
css: styles?.codeEditor,
|
|
538
|
-
...(0,
|
|
536
|
+
...(0, _uiReactUtils.passthroughProps)((0, _uiReactUtils.omitProps)(restProps, SourceCodeEditor.allowedProps)),
|
|
539
537
|
children: (0, _jsxRuntime.jsxs)("label", {
|
|
540
538
|
css: styles?.label,
|
|
541
539
|
id: this._id,
|
|
542
|
-
children: [(0, _jsxRuntime.jsx)(
|
|
540
|
+
children: [(0, _jsxRuntime.jsx)(_uiA11yContent.ScreenReaderContent, {
|
|
543
541
|
children: label
|
|
544
542
|
}), (0, _jsxRuntime.jsx)("div", {
|
|
545
543
|
ref: this.handleContainerRef,
|
|
@@ -9,9 +9,7 @@ var _react = require("react");
|
|
|
9
9
|
var _search = require("@codemirror/search");
|
|
10
10
|
var _latest = require("@instructure/ui-text-input/latest");
|
|
11
11
|
var _latest2 = require("@instructure/ui-buttons/latest");
|
|
12
|
-
var
|
|
13
|
-
var _IconArrowOpenUpLine = require("@instructure/ui-icons/lib/generated/IconArrowOpenUpLine.js");
|
|
14
|
-
var _IconSearchLine = require("@instructure/ui-icons/lib/generated/IconSearchLine.js");
|
|
12
|
+
var _uiIcons = require("@instructure/ui-icons");
|
|
15
13
|
var _jsxRuntime = require("@emotion/react/jsx-runtime");
|
|
16
14
|
/*
|
|
17
15
|
* The MIT License (MIT)
|
|
@@ -86,7 +84,7 @@ function SearchPanel({
|
|
|
86
84
|
onChange: handleChange,
|
|
87
85
|
onKeyDown: handleKeyDown,
|
|
88
86
|
onKeyUp: handleKeyUp,
|
|
89
|
-
renderBeforeInput: (0, _jsxRuntime.jsx)(
|
|
87
|
+
renderBeforeInput: (0, _jsxRuntime.jsx)(_uiIcons.IconSearchLine, {
|
|
90
88
|
size: "x-small"
|
|
91
89
|
}),
|
|
92
90
|
renderAfterInput: (0, _jsxRuntime.jsxs)("span", {
|
|
@@ -96,14 +94,14 @@ function SearchPanel({
|
|
|
96
94
|
withBackground: false,
|
|
97
95
|
onClick: handleFindNext,
|
|
98
96
|
screenReaderLabel: searchConfig.nextResultLabel,
|
|
99
|
-
children: (0, _jsxRuntime.jsx)(
|
|
97
|
+
children: (0, _jsxRuntime.jsx)(_uiIcons.IconArrowOpenDownLine, {})
|
|
100
98
|
}), (0, _jsxRuntime.jsx)(_latest2.IconButton, {
|
|
101
99
|
size: "small",
|
|
102
100
|
withBorder: false,
|
|
103
101
|
withBackground: false,
|
|
104
102
|
onClick: handleFindPrev,
|
|
105
103
|
screenReaderLabel: searchConfig.prevResultLabel,
|
|
106
|
-
children: (0, _jsxRuntime.jsx)(
|
|
104
|
+
children: (0, _jsxRuntime.jsx)(_uiIcons.IconArrowOpenUpLine, {})
|
|
107
105
|
})]
|
|
108
106
|
})
|
|
109
107
|
});
|
|
@@ -8,7 +8,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
8
8
|
exports.default = exports.SourceCodeEditor = void 0;
|
|
9
9
|
var _react = require("react");
|
|
10
10
|
var _reactDom = require("react-dom");
|
|
11
|
-
var
|
|
11
|
+
var _uiUtils = require("@instructure/ui-utils");
|
|
12
12
|
var _state = require("@codemirror/state");
|
|
13
13
|
var _view = require("@codemirror/view");
|
|
14
14
|
var _autocomplete = require("@codemirror/autocomplete");
|
|
@@ -23,12 +23,10 @@ var _langMarkdown = require("@codemirror/lang-markdown");
|
|
|
23
23
|
var _langJson = require("@codemirror/lang-json");
|
|
24
24
|
var _shell = require("@codemirror/legacy-modes/mode/shell");
|
|
25
25
|
var _yaml = require("@codemirror/legacy-modes/mode/yaml");
|
|
26
|
-
var
|
|
27
|
-
var
|
|
28
|
-
var
|
|
29
|
-
var
|
|
30
|
-
var _ScreenReaderContent = require("@instructure/ui-a11y-content/lib/ScreenReaderContent");
|
|
31
|
-
var _textDirectionContextConsumer = require("@instructure/ui-i18n/lib/textDirectionContextConsumer.js");
|
|
26
|
+
var _uiReactUtils = require("@instructure/ui-react-utils");
|
|
27
|
+
var _uiDomUtils = require("@instructure/ui-dom-utils");
|
|
28
|
+
var _uiA11yContent = require("@instructure/ui-a11y-content");
|
|
29
|
+
var _uiI18n = require("@instructure/ui-i18n");
|
|
32
30
|
var _emotion = require("@instructure/emotion");
|
|
33
31
|
var _SearchPanel = _interopRequireWildcard(require("./SearchPanel.js"));
|
|
34
32
|
var _styles = _interopRequireDefault(require("./styles.js"));
|
|
@@ -65,7 +63,7 @@ var _dec, _dec2, _dec3, _class;
|
|
|
65
63
|
category: components
|
|
66
64
|
---
|
|
67
65
|
**/
|
|
68
|
-
let SourceCodeEditor = exports.SourceCodeEditor = (_dec = (0,
|
|
66
|
+
let SourceCodeEditor = exports.SourceCodeEditor = (_dec = (0, _uiReactUtils.withDeterministicId)(), _dec2 = (0, _emotion.withStyleNew)(_styles.default), _dec3 = (0, _uiI18n.textDirectionContextConsumer)(), _dec(_class = _dec2(_class = _dec3(_class = class SourceCodeEditor extends _react.Component {
|
|
69
67
|
static displayName = 'SourceCodeEditor';
|
|
70
68
|
static componentId = 'SourceCodeEditor';
|
|
71
69
|
static allowedProps = _props.allowedProps;
|
|
@@ -132,7 +130,7 @@ let SourceCodeEditor = exports.SourceCodeEditor = (_dec = (0, _withDeterministic
|
|
|
132
130
|
};
|
|
133
131
|
addAnimationFrame(callback) {
|
|
134
132
|
if (typeof callback === 'function') {
|
|
135
|
-
this._raf.push((0,
|
|
133
|
+
this._raf.push((0, _uiDomUtils.requestAnimationFrame)(callback));
|
|
136
134
|
}
|
|
137
135
|
}
|
|
138
136
|
cancelAnimationFrames() {
|
|
@@ -294,7 +292,7 @@ let SourceCodeEditor = exports.SourceCodeEditor = (_dec = (0, _withDeterministic
|
|
|
294
292
|
// needed for theme update
|
|
295
293
|
'themeOverride', 'language', 'readOnly', 'editable', 'lineNumbers', 'highlightActiveLineGutter', 'foldGutter', 'lineWrapping', 'autofocus', 'spellcheck', 'direction', 'dir', 'rtlMoveVisually', 'indentOnLoad', 'indentWithTab', 'indentUnit', 'highlightActiveLine', 'attachment', 'searchConfig'];
|
|
296
294
|
for (const prop of propsToObserve) {
|
|
297
|
-
if (!(0,
|
|
295
|
+
if (!(0, _uiUtils.deepEqual)(this.props[prop], prevProps[prop])) {
|
|
298
296
|
return true;
|
|
299
297
|
}
|
|
300
298
|
}
|
|
@@ -569,11 +567,11 @@ let SourceCodeEditor = exports.SourceCodeEditor = (_dec = (0, _withDeterministic
|
|
|
569
567
|
"data-cid": "SourceCodeEditor",
|
|
570
568
|
ref: this.handleRef,
|
|
571
569
|
css: styles?.codeEditor,
|
|
572
|
-
...(0,
|
|
570
|
+
...(0, _uiReactUtils.passthroughProps)((0, _uiReactUtils.omitProps)(restProps, SourceCodeEditor.allowedProps)),
|
|
573
571
|
children: [(0, _jsxRuntime.jsxs)("label", {
|
|
574
572
|
css: styles?.label,
|
|
575
573
|
id: this._id,
|
|
576
|
-
children: [(0, _jsxRuntime.jsx)(
|
|
574
|
+
children: [(0, _jsxRuntime.jsx)(_uiA11yContent.ScreenReaderContent, {
|
|
577
575
|
children: label
|
|
578
576
|
}), (0, _jsxRuntime.jsx)("div", {
|
|
579
577
|
ref: this.handleContainerRef,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@instructure/ui-source-code-editor",
|
|
3
|
-
"version": "11.7.
|
|
3
|
+
"version": "11.7.9-snapshot-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",
|
|
@@ -29,21 +29,21 @@
|
|
|
29
29
|
"@codemirror/state": "^6.4.1",
|
|
30
30
|
"@codemirror/view": "^6.34.1",
|
|
31
31
|
"@lezer/highlight": "1.2.3",
|
|
32
|
-
"@instructure/
|
|
33
|
-
"@instructure/ui-a11y-content": "11.7.
|
|
34
|
-
"@instructure/
|
|
35
|
-
"@instructure/
|
|
36
|
-
"@instructure/ui-dom-utils": "11.7.
|
|
37
|
-
"@instructure/ui-
|
|
38
|
-
"@instructure/ui-
|
|
39
|
-
"@instructure/ui-
|
|
40
|
-
"@instructure/ui-
|
|
41
|
-
"@instructure/ui-
|
|
42
|
-
"@instructure/ui-
|
|
32
|
+
"@instructure/emotion": "11.7.9-snapshot-1",
|
|
33
|
+
"@instructure/ui-a11y-content": "11.7.9-snapshot-1",
|
|
34
|
+
"@instructure/shared-types": "11.7.9-snapshot-1",
|
|
35
|
+
"@instructure/ui-buttons": "11.7.9-snapshot-1",
|
|
36
|
+
"@instructure/ui-dom-utils": "11.7.9-snapshot-1",
|
|
37
|
+
"@instructure/ui-i18n": "11.7.9-snapshot-1",
|
|
38
|
+
"@instructure/ui-icons": "11.7.9-snapshot-1",
|
|
39
|
+
"@instructure/ui-react-utils": "11.7.9-snapshot-1",
|
|
40
|
+
"@instructure/ui-text-input": "11.7.9-snapshot-1",
|
|
41
|
+
"@instructure/ui-themes": "11.7.9-snapshot-1",
|
|
42
|
+
"@instructure/ui-utils": "11.7.9-snapshot-1"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
45
45
|
"vitest": "^5.0.0",
|
|
46
|
-
"@instructure/ui-babel-preset": "11.7.
|
|
46
|
+
"@instructure/ui-babel-preset": "11.7.9-snapshot-1"
|
|
47
47
|
},
|
|
48
48
|
"peerDependencies": {
|
|
49
49
|
"react": ">=18 <=19",
|