@instructure/ui-source-code-editor 8.56.4 → 8.56.5-pr-snapshot-1728655013879

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
+ ## [8.56.5-pr-snapshot-1728655013879](https://github.com/instructure/instructure-ui/compare/v8.56.4...v8.56.5-pr-snapshot-1728655013879) (2024-10-11)
7
+
8
+ **Note:** Version bump only for package @instructure/ui-source-code-editor
9
+
10
+
11
+
12
+
13
+
6
14
  ## [8.56.4](https://github.com/instructure/instructure-ui/compare/v8.56.3...v8.56.4) (2024-10-02)
7
15
 
8
16
  **Note:** Version bump only for package @instructure/ui-source-code-editor
@@ -10,11 +10,9 @@ var _interopRequireWildcard2 = _interopRequireDefault(require("@babel/runtime/he
10
10
  var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
11
11
  var _react = _interopRequireWildcard3(require("react"));
12
12
  var _search = require("@codemirror/search");
13
- var _TextInput = require("@instructure/ui-text-input/lib/TextInput");
14
- var _IconButton = require("@instructure/ui-buttons/lib/IconButton");
15
- var _IconArrowOpenDownLine = require("@instructure/ui-icons/lib/IconArrowOpenDownLine.js");
16
- var _IconArrowOpenUpLine2 = require("@instructure/ui-icons/lib/IconArrowOpenUpLine.js");
17
- var _IconSearchLine2 = require("@instructure/ui-icons/lib/IconSearchLine.js");
13
+ var _uiTextInput = require("@instructure/ui-text-input");
14
+ var _uiButtons = require("@instructure/ui-buttons");
15
+ var _uiIcons = require("@instructure/ui-icons");
18
16
  var _reactDom = _interopRequireDefault(require("react-dom"));
19
17
  var _IconSearchLine, _IconArrowOpenDownLin, _IconArrowOpenUpLine;
20
18
  /*
@@ -75,7 +73,7 @@ function SearchPanel({
75
73
  handleHighlightSearch(searchQueryStr);
76
74
  (0, _search.findPrevious)(view);
77
75
  };
78
- return /*#__PURE__*/_react.default.createElement(_TextInput.TextInput, {
76
+ return /*#__PURE__*/_react.default.createElement(_uiTextInput.TextInput, {
79
77
  renderLabel: "",
80
78
  inputRef: r => {
81
79
  setTimeout(() => r === null || r === void 0 ? void 0 : r.focus(), 0);
@@ -87,22 +85,22 @@ function SearchPanel({
87
85
  onChange: handleChange,
88
86
  onKeyDown: handleKeyDown,
89
87
  onKeyUp: handleKeyUp,
90
- renderBeforeInput: _IconSearchLine || (_IconSearchLine = /*#__PURE__*/_react.default.createElement(_IconSearchLine2.IconSearchLine, {
88
+ renderBeforeInput: _IconSearchLine || (_IconSearchLine = /*#__PURE__*/_react.default.createElement(_uiIcons.IconSearchLine, {
91
89
  size: "x-small"
92
90
  })),
93
- renderAfterInput: /*#__PURE__*/_react.default.createElement("span", null, /*#__PURE__*/_react.default.createElement(_IconButton.IconButton, {
91
+ renderAfterInput: /*#__PURE__*/_react.default.createElement("span", null, /*#__PURE__*/_react.default.createElement(_uiButtons.IconButton, {
94
92
  size: "small",
95
93
  withBorder: false,
96
94
  withBackground: false,
97
95
  onClick: handleFindNext,
98
96
  screenReaderLabel: searchConfig.nextResultLabel
99
- }, _IconArrowOpenDownLin || (_IconArrowOpenDownLin = /*#__PURE__*/_react.default.createElement(_IconArrowOpenDownLine.IconArrowOpenDownLine, null))), /*#__PURE__*/_react.default.createElement(_IconButton.IconButton, {
97
+ }, _IconArrowOpenDownLin || (_IconArrowOpenDownLin = /*#__PURE__*/_react.default.createElement(_uiIcons.IconArrowOpenDownLine, null))), /*#__PURE__*/_react.default.createElement(_uiButtons.IconButton, {
100
98
  size: "small",
101
99
  withBorder: false,
102
100
  withBackground: false,
103
101
  onClick: handleFindPrev,
104
102
  screenReaderLabel: searchConfig.prevResultLabel
105
- }, _IconArrowOpenUpLine || (_IconArrowOpenUpLine = /*#__PURE__*/_react.default.createElement(_IconArrowOpenUpLine2.IconArrowOpenUpLine, null))))
103
+ }, _IconArrowOpenUpLine || (_IconArrowOpenUpLine = /*#__PURE__*/_react.default.createElement(_uiIcons.IconArrowOpenUpLine, null))))
106
104
  });
107
105
  }
108
106
  function customSearch(searchConfig) {
@@ -4,7 +4,7 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.SourceCodeEditorLocator = void 0;
7
- var _locator = require("@instructure/ui-test-locator/lib/utils/locator.js");
7
+ var _uiTestLocator = require("@instructure/ui-test-locator");
8
8
  var _uiTestQueries = require("@instructure/ui-test-queries");
9
9
  var _index = require("./index");
10
10
  /*
@@ -32,7 +32,7 @@ var _index = require("./index");
32
32
  */
33
33
 
34
34
  // @ts-expect-error ts-migrate(2339) FIXME: Property 'selector' does not exist on type 'typeof... Remove this comment to see the full error message
35
- const SourceCodeEditorLocator = exports.SourceCodeEditorLocator = (0, _locator.locator)(_index.SourceCodeEditor.selector, {
35
+ const SourceCodeEditorLocator = exports.SourceCodeEditorLocator = (0, _uiTestLocator.locator)(_index.SourceCodeEditor.selector, {
36
36
  findContainer: async (...args) => {
37
37
  return await (0, _uiTestQueries.find)('[class$=-codeEditorContainer]', ...args);
38
38
  },
@@ -7,7 +7,7 @@ Object.defineProperty(exports, "__esModule", {
7
7
  exports.default = exports.SourceCodeEditor = void 0;
8
8
  var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
9
9
  var _react = require("react");
10
- var _deepEqual = require("@instructure/ui-utils/lib/deepEqual.js");
10
+ var _uiUtils = require("@instructure/ui-utils");
11
11
  var _state = require("@codemirror/state");
12
12
  var _view = require("@codemirror/view");
13
13
  var _autocomplete = require("@codemirror/autocomplete");
@@ -22,13 +22,11 @@ var _langMarkdown = require("@codemirror/lang-markdown");
22
22
  var _langJson = require("@codemirror/lang-json");
23
23
  var _shell = require("@codemirror/legacy-modes/mode/shell");
24
24
  var _yaml = require("@codemirror/legacy-modes/mode/yaml");
25
- var _testable = require("@instructure/ui-testable/lib/testable.js");
26
- var _omitProps = require("@instructure/ui-react-utils/lib/omitProps.js");
27
- var _passthroughProps = require("@instructure/ui-react-utils/lib/passthroughProps.js");
28
- var _withDeterministicId = require("@instructure/ui-react-utils/lib/DeterministicIdContext/withDeterministicId.js");
29
- var _requestAnimationFrame = require("@instructure/ui-dom-utils/lib/requestAnimationFrame.js");
30
- var _ScreenReaderContent = require("@instructure/ui-a11y-content/lib/ScreenReaderContent");
31
- var _textDirectionContextConsumer = require("@instructure/ui-i18n/lib/textDirectionContextConsumer.js");
25
+ var _uiTestable = require("@instructure/ui-testable");
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 = _interopRequireDefault(require("./SearchPanel"));
34
32
  var _styles = _interopRequireDefault(require("./styles"));
@@ -67,10 +65,10 @@ var _dec, _dec2, _dec3, _dec4, _class, _class2;
67
65
  category: components
68
66
  ---
69
67
  **/
70
- let SourceCodeEditor = exports.SourceCodeEditor = (_dec = (0, _withDeterministicId.withDeterministicId)(), _dec2 = (0, _emotion.withStyle)(_styles.default, _theme.default), _dec3 = (0, _textDirectionContextConsumer.textDirectionContextConsumer)(), _dec4 = (0, _testable.testable)(), _dec(_class = _dec2(_class = _dec3(_class = _dec4(_class = (_class2 = class SourceCodeEditor extends _react.Component {
68
+ let SourceCodeEditor = exports.SourceCodeEditor = (_dec = (0, _uiReactUtils.withDeterministicId)(), _dec2 = (0, _emotion.withStyle)(_styles.default, _theme.default), _dec3 = (0, _uiI18n.textDirectionContextConsumer)(), _dec4 = (0, _uiTestable.testable)(), _dec(_class = _dec2(_class = _dec3(_class = _dec4(_class = (_class2 = class SourceCodeEditor extends _react.Component {
71
69
  addAnimationFrame(callback) {
72
70
  if (typeof callback === 'function') {
73
- this._raf.push((0, _requestAnimationFrame.requestAnimationFrame)(callback));
71
+ this._raf.push((0, _uiDomUtils.requestAnimationFrame)(callback));
74
72
  }
75
73
  }
76
74
  cancelAnimationFrames() {
@@ -249,7 +247,7 @@ let SourceCodeEditor = exports.SourceCodeEditor = (_dec = (0, _withDeterministic
249
247
  // needed for theme update
250
248
  'themeOverride', 'language', 'readOnly', 'editable', 'lineNumbers', 'highlightActiveLineGutter', 'foldGutter', 'lineWrapping', 'autofocus', 'spellcheck', 'direction', 'dir', 'rtlMoveVisually', 'indentOnLoad', 'indentWithTab', 'indentUnit', 'highlightActiveLine', 'attachment'];
251
249
  for (const prop of propsToObserve) {
252
- if (!(0, _deepEqual.deepEqual)(this.props[prop], prevProps[prop])) {
250
+ if (!(0, _uiUtils.deepEqual)(this.props[prop], prevProps[prop])) {
253
251
  return true;
254
252
  }
255
253
  }
@@ -492,10 +490,10 @@ let SourceCodeEditor = exports.SourceCodeEditor = (_dec = (0, _withDeterministic
492
490
  return (0, _emotion.jsx)("div", Object.assign({
493
491
  ref: this.handleRef,
494
492
  css: styles === null || styles === void 0 ? void 0 : styles.codeEditor
495
- }, (0, _passthroughProps.passthroughProps)((0, _omitProps.omitProps)(restProps, SourceCodeEditor.allowedProps))), (0, _emotion.jsx)("label", {
493
+ }, (0, _uiReactUtils.passthroughProps)((0, _uiReactUtils.omitProps)(restProps, SourceCodeEditor.allowedProps))), (0, _emotion.jsx)("label", {
496
494
  css: styles === null || styles === void 0 ? void 0 : styles.label,
497
495
  htmlFor: this._id
498
- }, (0, _emotion.jsx)(_ScreenReaderContent.ScreenReaderContent, null, label), (0, _emotion.jsx)("div", {
496
+ }, (0, _emotion.jsx)(_uiA11yContent.ScreenReaderContent, null, label), (0, _emotion.jsx)("div", {
499
497
  ref: this.handleContainerRef,
500
498
  css: styles === null || styles === void 0 ? void 0 : styles.codeEditorContainer
501
499
  })));
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
6
6
  });
7
7
  exports.propTypes = exports.allowedProps = void 0;
8
8
  var _propTypes = _interopRequireDefault(require("prop-types"));
9
- var _controllable = require("@instructure/ui-prop-types/lib/controllable.js");
9
+ var _uiPropTypes = require("@instructure/ui-prop-types");
10
10
  /*
11
11
  * The MIT License (MIT)
12
12
  *
@@ -49,7 +49,7 @@ const propTypes = exports.propTypes = {
49
49
  indentWithTab: _propTypes.default.bool,
50
50
  indentUnit: _propTypes.default.string,
51
51
  defaultValue: _propTypes.default.string,
52
- value: (0, _controllable.controllable)(_propTypes.default.string, 'onChange', 'defaultValue'),
52
+ value: (0, _uiPropTypes.controllable)(_propTypes.default.string, 'onChange', 'defaultValue'),
53
53
  onChange: _propTypes.default.func,
54
54
  onFocus: _propTypes.default.func,
55
55
  onBlur: _propTypes.default.func,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@instructure/ui-source-code-editor",
3
- "version": "8.56.4",
3
+ "version": "8.56.5-pr-snapshot-1728655013879",
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.56.4",
27
- "@instructure/ui-test-queries": "8.56.4",
28
- "@instructure/ui-test-utils": "8.56.4",
26
+ "@instructure/ui-babel-preset": "8.56.5-pr-snapshot-1728655013879",
27
+ "@instructure/ui-test-queries": "8.56.5-pr-snapshot-1728655013879",
28
+ "@instructure/ui-test-utils": "8.56.5-pr-snapshot-1728655013879",
29
29
  "@testing-library/jest-dom": "^6.1.4",
30
30
  "@testing-library/react": "^14.1.2"
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.56.4",
48
- "@instructure/shared-types": "8.56.4",
49
- "@instructure/ui-a11y-content": "8.56.4",
50
- "@instructure/ui-buttons": "8.56.4",
51
- "@instructure/ui-dom-utils": "8.56.4",
52
- "@instructure/ui-i18n": "8.56.4",
53
- "@instructure/ui-icons": "8.56.4",
54
- "@instructure/ui-prop-types": "8.56.4",
55
- "@instructure/ui-react-utils": "8.56.4",
56
- "@instructure/ui-test-locator": "8.56.4",
57
- "@instructure/ui-testable": "8.56.4",
58
- "@instructure/ui-text-input": "8.56.4",
59
- "@instructure/ui-themes": "8.56.4",
60
- "@instructure/ui-utils": "8.56.4",
47
+ "@instructure/emotion": "8.56.5-pr-snapshot-1728655013879",
48
+ "@instructure/shared-types": "8.56.5-pr-snapshot-1728655013879",
49
+ "@instructure/ui-a11y-content": "8.56.5-pr-snapshot-1728655013879",
50
+ "@instructure/ui-buttons": "8.56.5-pr-snapshot-1728655013879",
51
+ "@instructure/ui-dom-utils": "8.56.5-pr-snapshot-1728655013879",
52
+ "@instructure/ui-i18n": "8.56.5-pr-snapshot-1728655013879",
53
+ "@instructure/ui-icons": "8.56.5-pr-snapshot-1728655013879",
54
+ "@instructure/ui-prop-types": "8.56.5-pr-snapshot-1728655013879",
55
+ "@instructure/ui-react-utils": "8.56.5-pr-snapshot-1728655013879",
56
+ "@instructure/ui-test-locator": "8.56.5-pr-snapshot-1728655013879",
57
+ "@instructure/ui-testable": "8.56.5-pr-snapshot-1728655013879",
58
+ "@instructure/ui-text-input": "8.56.5-pr-snapshot-1728655013879",
59
+ "@instructure/ui-themes": "8.56.5-pr-snapshot-1728655013879",
60
+ "@instructure/ui-utils": "8.56.5-pr-snapshot-1728655013879",
61
61
  "@lezer/highlight": "1.1.6",
62
62
  "prop-types": "^15.8.1"
63
63
  },