@instructure/ui-source-code-editor 8.53.3-pr-snapshot-8 → 8.53.3-pr-snapshot-1709124298948

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,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
- ## [8.53.3-pr-snapshot-8](https://github.com/instructure/instructure-ui/compare/v8.53.2...v8.53.3-pr-snapshot-8) (2024-02-23)
6
+ ## [8.53.3-pr-snapshot-1709124298948](https://github.com/instructure/instructure-ui/compare/v8.53.2...v8.53.3-pr-snapshot-1709124298948) (2024-02-28)
7
7
 
8
- **Note:** Version bump only for package @instructure/ui-source-code-editor
8
+
9
+ ### Bug Fixes
10
+
11
+ * **many:** remove emotion's jsx pragma ([7435d5c](https://github.com/instructure/instructure-ui/commit/7435d5c31ca6556a1f95c4dfde156d5a76aad7de))
9
12
 
10
13
 
11
14
 
package/README.md CHANGED
@@ -25,7 +25,6 @@ npm install @instructure/ui-source-code-editor
25
25
  ### Usage
26
26
 
27
27
  ```js
28
- import React from 'react'
29
28
  import { SourceCodeEditor } from '@instructure/ui-source-code-editor'
30
29
 
31
30
  const MyCodeEditor = () => {
@@ -29,6 +29,7 @@ import { setSearchQuery, search, findNext, findPrevious, SearchQuery, closeSearc
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
+ import { jsx as ___EmotionJSX } from "@emotion/react";
32
33
  let reactdom;
33
34
  try {
34
35
  reactdom = require('react-dom/client');
@@ -70,7 +71,7 @@ function SearchPanel({
70
71
  handleHighlightSearch(searchQueryStr);
71
72
  findPrevious(view);
72
73
  };
73
- return /*#__PURE__*/React.createElement(TextInput, {
74
+ return ___EmotionJSX(TextInput, {
74
75
  inputRef: r => r === null || r === void 0 ? void 0 : r.focus(),
75
76
  size: "small",
76
77
  display: "inline-block",
@@ -79,22 +80,22 @@ function SearchPanel({
79
80
  onChange: handleChange,
80
81
  onKeyDown: handleKeyDown,
81
82
  onKeyUp: handleKeyUp,
82
- renderBeforeInput: _IconSearchLine || (_IconSearchLine = /*#__PURE__*/React.createElement(IconSearchLine, {
83
+ renderBeforeInput: _IconSearchLine || (_IconSearchLine = ___EmotionJSX(IconSearchLine, {
83
84
  size: "x-small"
84
85
  })),
85
- renderAfterInput: /*#__PURE__*/React.createElement("span", null, /*#__PURE__*/React.createElement(IconButton, {
86
+ renderAfterInput: ___EmotionJSX("span", null, ___EmotionJSX(IconButton, {
86
87
  size: "small",
87
88
  withBorder: false,
88
89
  withBackground: false,
89
90
  onClick: handleFindNext,
90
91
  screenReaderLabel: searchConfig.nextResultLabel
91
- }, _IconArrowOpenDownLin || (_IconArrowOpenDownLin = /*#__PURE__*/React.createElement(IconArrowOpenDownLine, null))), /*#__PURE__*/React.createElement(IconButton, {
92
+ }, _IconArrowOpenDownLin || (_IconArrowOpenDownLin = ___EmotionJSX(IconArrowOpenDownLine, null))), ___EmotionJSX(IconButton, {
92
93
  size: "small",
93
94
  withBorder: false,
94
95
  withBackground: false,
95
96
  onClick: handleFindPrev,
96
97
  screenReaderLabel: searchConfig.prevResultLabel
97
- }, _IconArrowOpenUpLine || (_IconArrowOpenUpLine = /*#__PURE__*/React.createElement(IconArrowOpenUpLine, null))))
98
+ }, _IconArrowOpenUpLine || (_IconArrowOpenUpLine = ___EmotionJSX(IconArrowOpenUpLine, null))))
98
99
  });
99
100
  }
100
101
  export default function customSearch(searchConfig) {
@@ -104,12 +105,12 @@ export default function customSearch(searchConfig) {
104
105
  dom.style.padding = '8px';
105
106
  if ('createRoot' in reactdom) {
106
107
  const root = reactdom.createRoot(dom);
107
- root.render( /*#__PURE__*/React.createElement(SearchPanel, {
108
+ root.render(___EmotionJSX(SearchPanel, {
108
109
  view: view,
109
110
  searchConfig: searchConfig
110
111
  }));
111
112
  } else {
112
- reactdom.render( /*#__PURE__*/React.createElement(SearchPanel, {
113
+ reactdom.render(___EmotionJSX(SearchPanel, {
113
114
  view: view,
114
115
  searchConfig: searchConfig
115
116
  }), dom);
@@ -22,14 +22,15 @@ var _SourceCodeEditor;
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 ___EmotionJSX } from "@emotion/react";
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 = ___EmotionJSX(SourceCodeEditor, {
33
34
  label: "test",
34
35
  language: "jsx",
35
36
  defaultValue: "const a = 2;"
@@ -1,3 +1,4 @@
1
+ import _extends from "@babel/runtime/helpers/esm/extends";
1
2
  import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
2
3
  const _excluded = ["label", "styles"];
3
4
  var _dec, _dec2, _dec3, _dec4, _class, _class2;
@@ -25,7 +26,6 @@ var _dec, _dec2, _dec3, _dec4, _class, _class2;
25
26
  * SOFTWARE.
26
27
  */
27
28
 
28
- /** @jsx jsx */
29
29
  import { Component } from 'react';
30
30
  import { deepEqual as isEqual } from '@instructure/ui-utils';
31
31
  import { EditorState, StateEffect } from '@codemirror/state';
@@ -49,12 +49,13 @@ import { omitProps, passthroughProps, withDeterministicId } from '@instructure/u
49
49
  import { requestAnimationFrame } from '@instructure/ui-dom-utils';
50
50
  import { ScreenReaderContent } from '@instructure/ui-a11y-content';
51
51
  import { textDirectionContextConsumer } from '@instructure/ui-i18n';
52
- import { withStyle, jsx } from '@instructure/emotion';
52
+ import { withStyle } from '@instructure/emotion';
53
53
  import customSearch from './SearchPanel';
54
54
  import generateStyle from './styles';
55
55
  import generateComponentTheme from './theme';
56
56
  import { rtlHorizontalArrowKeymap } from './customKeybinding';
57
57
  import { propTypes, allowedProps } from './props';
58
+ import { jsx as ___EmotionJSX } from "@emotion/react";
58
59
  /**
59
60
  ---
60
61
  category: components
@@ -482,13 +483,13 @@ let SourceCodeEditor = (_dec = withDeterministicId(), _dec2 = withStyle(generate
482
483
  label = _this$props6.label,
483
484
  styles = _this$props6.styles,
484
485
  restProps = _objectWithoutProperties(_this$props6, _excluded);
485
- return jsx("div", Object.assign({
486
+ return ___EmotionJSX("div", _extends({
486
487
  ref: this.handleRef,
487
488
  css: styles === null || styles === void 0 ? void 0 : styles.codeEditor
488
- }, passthroughProps(omitProps(restProps, SourceCodeEditor.allowedProps))), jsx("label", {
489
+ }, passthroughProps(omitProps(restProps, SourceCodeEditor.allowedProps))), ___EmotionJSX("label", {
489
490
  css: styles === null || styles === void 0 ? void 0 : styles.label,
490
491
  htmlFor: this._id
491
- }, jsx(ScreenReaderContent, null, label), jsx("div", {
492
+ }, ___EmotionJSX(ScreenReaderContent, null, label), ___EmotionJSX("div", {
492
493
  ref: this.handleContainerRef,
493
494
  css: styles === null || styles === void 0 ? void 0 : styles.codeEditorContainer
494
495
  })));
@@ -14,6 +14,7 @@ var _IconButton = require("@instructure/ui-buttons/lib/IconButton");
14
14
  var _IconArrowOpenDownLine = require("@instructure/ui-icons/lib/IconArrowOpenDownLine.js");
15
15
  var _IconArrowOpenUpLine2 = require("@instructure/ui-icons/lib/IconArrowOpenUpLine.js");
16
16
  var _IconSearchLine2 = require("@instructure/ui-icons/lib/IconSearchLine.js");
17
+ var _react2 = require("@emotion/react");
17
18
  var _IconSearchLine, _IconArrowOpenDownLin, _IconArrowOpenUpLine;
18
19
  /*
19
20
  * The MIT License (MIT)
@@ -79,7 +80,7 @@ function SearchPanel({
79
80
  handleHighlightSearch(searchQueryStr);
80
81
  (0, _search.findPrevious)(view);
81
82
  };
82
- return /*#__PURE__*/_react.default.createElement(_TextInput.TextInput, {
83
+ return (0, _react2.jsx)(_TextInput.TextInput, {
83
84
  inputRef: r => r === null || r === void 0 ? void 0 : r.focus(),
84
85
  size: "small",
85
86
  display: "inline-block",
@@ -88,22 +89,22 @@ function SearchPanel({
88
89
  onChange: handleChange,
89
90
  onKeyDown: handleKeyDown,
90
91
  onKeyUp: handleKeyUp,
91
- renderBeforeInput: _IconSearchLine || (_IconSearchLine = /*#__PURE__*/_react.default.createElement(_IconSearchLine2.IconSearchLine, {
92
+ renderBeforeInput: _IconSearchLine || (_IconSearchLine = (0, _react2.jsx)(_IconSearchLine2.IconSearchLine, {
92
93
  size: "x-small"
93
94
  })),
94
- renderAfterInput: /*#__PURE__*/_react.default.createElement("span", null, /*#__PURE__*/_react.default.createElement(_IconButton.IconButton, {
95
+ renderAfterInput: (0, _react2.jsx)("span", null, (0, _react2.jsx)(_IconButton.IconButton, {
95
96
  size: "small",
96
97
  withBorder: false,
97
98
  withBackground: false,
98
99
  onClick: handleFindNext,
99
100
  screenReaderLabel: searchConfig.nextResultLabel
100
- }, _IconArrowOpenDownLin || (_IconArrowOpenDownLin = /*#__PURE__*/_react.default.createElement(_IconArrowOpenDownLine.IconArrowOpenDownLine, null))), /*#__PURE__*/_react.default.createElement(_IconButton.IconButton, {
101
+ }, _IconArrowOpenDownLin || (_IconArrowOpenDownLin = (0, _react2.jsx)(_IconArrowOpenDownLine.IconArrowOpenDownLine, null))), (0, _react2.jsx)(_IconButton.IconButton, {
101
102
  size: "small",
102
103
  withBorder: false,
103
104
  withBackground: false,
104
105
  onClick: handleFindPrev,
105
106
  screenReaderLabel: searchConfig.prevResultLabel
106
- }, _IconArrowOpenUpLine || (_IconArrowOpenUpLine = /*#__PURE__*/_react.default.createElement(_IconArrowOpenUpLine2.IconArrowOpenUpLine, null))))
107
+ }, _IconArrowOpenUpLine || (_IconArrowOpenUpLine = (0, _react2.jsx)(_IconArrowOpenUpLine2.IconArrowOpenUpLine, null))))
107
108
  });
108
109
  }
109
110
  function customSearch(searchConfig) {
@@ -113,12 +114,12 @@ function customSearch(searchConfig) {
113
114
  dom.style.padding = '8px';
114
115
  if ('createRoot' in reactdom) {
115
116
  const root = reactdom.createRoot(dom);
116
- root.render( /*#__PURE__*/_react.default.createElement(SearchPanel, {
117
+ root.render((0, _react2.jsx)(SearchPanel, {
117
118
  view: view,
118
119
  searchConfig: searchConfig
119
120
  }));
120
121
  } else {
121
- reactdom.render( /*#__PURE__*/_react.default.createElement(SearchPanel, {
122
+ reactdom.render((0, _react2.jsx)(SearchPanel, {
122
123
  view: view,
123
124
  searchConfig: searchConfig
124
125
  }), 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 _react2 = require("@emotion/react");
8
8
  var _SourceCodeEditor;
9
9
  /*
10
10
  * The MIT License (MIT)
@@ -32,7 +32,7 @@ var _SourceCodeEditor;
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, _react2.jsx)(_index.default, {
36
36
  label: "test",
37
37
  language: "jsx",
38
38
  defaultValue: "const a = 2;"
@@ -5,6 +5,7 @@ Object.defineProperty(exports, "__esModule", {
5
5
  value: true
6
6
  });
7
7
  exports.default = exports.SourceCodeEditor = void 0;
8
+ var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
8
9
  var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
9
10
  var _react = require("react");
10
11
  var _deepEqual = require("@instructure/ui-utils/lib/deepEqual.js");
@@ -35,6 +36,7 @@ var _styles = _interopRequireDefault(require("./styles"));
35
36
  var _theme = _interopRequireDefault(require("./theme"));
36
37
  var _customKeybinding = require("./customKeybinding");
37
38
  var _props = require("./props");
39
+ var _react2 = require("@emotion/react");
38
40
  const _excluded = ["label", "styles"];
39
41
  var _dec, _dec2, _dec3, _dec4, _class, _class2;
40
42
  /*
@@ -60,7 +62,6 @@ var _dec, _dec2, _dec3, _dec4, _class, _class2;
60
62
  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
61
63
  * SOFTWARE.
62
64
  */
63
- /** @jsx jsx */
64
65
  // import { oneDarkTheme, oneDarkHighlightStyle } from '@codemirror/theme-one-dark'
65
66
  /**
66
67
  ---
@@ -489,13 +490,13 @@ let SourceCodeEditor = exports.SourceCodeEditor = (_dec = (0, _withDeterministic
489
490
  label = _this$props6.label,
490
491
  styles = _this$props6.styles,
491
492
  restProps = (0, _objectWithoutProperties2.default)(_this$props6, _excluded);
492
- return (0, _emotion.jsx)("div", Object.assign({
493
+ return (0, _react2.jsx)("div", (0, _extends2.default)({
493
494
  ref: this.handleRef,
494
495
  css: styles === null || styles === void 0 ? void 0 : styles.codeEditor
495
- }, (0, _passthroughProps.passthroughProps)((0, _omitProps.omitProps)(restProps, SourceCodeEditor.allowedProps))), (0, _emotion.jsx)("label", {
496
+ }, (0, _passthroughProps.passthroughProps)((0, _omitProps.omitProps)(restProps, SourceCodeEditor.allowedProps))), (0, _react2.jsx)("label", {
496
497
  css: styles === null || styles === void 0 ? void 0 : styles.label,
497
498
  htmlFor: this._id
498
- }, (0, _emotion.jsx)(_ScreenReaderContent.ScreenReaderContent, null, label), (0, _emotion.jsx)("div", {
499
+ }, (0, _react2.jsx)(_ScreenReaderContent.ScreenReaderContent, null, label), (0, _react2.jsx)("div", {
499
500
  ref: this.handleContainerRef,
500
501
  css: styles === null || styles === void 0 ? void 0 : styles.codeEditorContainer
501
502
  })));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@instructure/ui-source-code-editor",
3
- "version": "8.53.3-pr-snapshot-8",
3
+ "version": "8.53.3-pr-snapshot-1709124298948",
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-pr-snapshot-8",
27
- "@instructure/ui-test-queries": "8.53.3-pr-snapshot-8",
28
- "@instructure/ui-test-utils": "8.53.3-pr-snapshot-8",
26
+ "@instructure/ui-babel-preset": "8.53.3-pr-snapshot-1709124298948",
27
+ "@instructure/ui-test-queries": "8.53.3-pr-snapshot-1709124298948",
28
+ "@instructure/ui-test-utils": "8.53.3-pr-snapshot-1709124298948",
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-pr-snapshot-8",
48
- "@instructure/shared-types": "8.53.3-pr-snapshot-8",
49
- "@instructure/ui-a11y-content": "8.53.3-pr-snapshot-8",
50
- "@instructure/ui-buttons": "8.53.3-pr-snapshot-8",
51
- "@instructure/ui-dom-utils": "8.53.3-pr-snapshot-8",
52
- "@instructure/ui-i18n": "8.53.3-pr-snapshot-8",
53
- "@instructure/ui-icons": "8.53.3-pr-snapshot-8",
54
- "@instructure/ui-prop-types": "8.53.3-pr-snapshot-8",
55
- "@instructure/ui-react-utils": "8.53.3-pr-snapshot-8",
56
- "@instructure/ui-test-locator": "8.53.3-pr-snapshot-8",
57
- "@instructure/ui-testable": "8.53.3-pr-snapshot-8",
58
- "@instructure/ui-text-input": "8.53.3-pr-snapshot-8",
59
- "@instructure/ui-themes": "8.53.3-pr-snapshot-8",
60
- "@instructure/ui-utils": "8.53.3-pr-snapshot-8",
47
+ "@instructure/emotion": "8.53.3-pr-snapshot-1709124298948",
48
+ "@instructure/shared-types": "8.53.3-pr-snapshot-1709124298948",
49
+ "@instructure/ui-a11y-content": "8.53.3-pr-snapshot-1709124298948",
50
+ "@instructure/ui-buttons": "8.53.3-pr-snapshot-1709124298948",
51
+ "@instructure/ui-dom-utils": "8.53.3-pr-snapshot-1709124298948",
52
+ "@instructure/ui-i18n": "8.53.3-pr-snapshot-1709124298948",
53
+ "@instructure/ui-icons": "8.53.3-pr-snapshot-1709124298948",
54
+ "@instructure/ui-prop-types": "8.53.3-pr-snapshot-1709124298948",
55
+ "@instructure/ui-react-utils": "8.53.3-pr-snapshot-1709124298948",
56
+ "@instructure/ui-test-locator": "8.53.3-pr-snapshot-1709124298948",
57
+ "@instructure/ui-testable": "8.53.3-pr-snapshot-1709124298948",
58
+ "@instructure/ui-text-input": "8.53.3-pr-snapshot-1709124298948",
59
+ "@instructure/ui-themes": "8.53.3-pr-snapshot-1709124298948",
60
+ "@instructure/ui-utils": "8.53.3-pr-snapshot-1709124298948",
61
61
  "@lezer/highlight": "1.1.6",
62
62
  "prop-types": "^15.8.1"
63
63
  },
@@ -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