@instructure/ui-source-code-editor 11.7.11-snapshot-24 → 11.7.11-snapshot-26
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 +1 -1
- package/es/SourceCodeEditor/v1/index.js +4 -4
- package/es/SourceCodeEditor/v2/index.js +4 -4
- package/lib/SourceCodeEditor/v1/index.js +8 -5
- package/lib/SourceCodeEditor/v2/index.js +9 -6
- package/package.json +13 -13
- package/src/SourceCodeEditor/v1/index.tsx +10 -5
- package/src/SourceCodeEditor/v2/index.tsx +9 -5
- package/tsconfig.build.tsbuildinfo +1 -1
- package/types/SourceCodeEditor/v1/index.d.ts +3 -1
- package/types/SourceCodeEditor/v1/index.d.ts.map +1 -1
- package/types/SourceCodeEditor/v2/index.d.ts +3 -1
- package/types/SourceCodeEditor/v2/index.d.ts.map +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
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.11-snapshot-
|
|
6
|
+
## [11.7.11-snapshot-26](https://github.com/instructure/instructure-ui/compare/v11.7.10...v11.7.11-snapshot-26) (2026-11-23)
|
|
7
7
|
|
|
8
8
|
### Bug Fixes
|
|
9
9
|
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
var _dec, _dec2, _dec3, _class;
|
|
2
1
|
/*
|
|
3
2
|
* The MIT License (MIT)
|
|
4
3
|
*
|
|
@@ -57,7 +56,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "@emotion/react/jsx-runtime";
|
|
|
57
56
|
category: components
|
|
58
57
|
---
|
|
59
58
|
**/
|
|
60
|
-
|
|
59
|
+
export class SourceCodeEditorBase extends Component {
|
|
61
60
|
static displayName = 'SourceCodeEditor';
|
|
62
61
|
static componentId = 'SourceCodeEditor';
|
|
63
62
|
static allowedProps = allowedProps;
|
|
@@ -273,7 +272,7 @@ let SourceCodeEditor = (_dec = withDeterministicId(), _dec2 = withStyle(generate
|
|
|
273
272
|
}
|
|
274
273
|
get direction() {
|
|
275
274
|
// comes from the `direction` prop and
|
|
276
|
-
// falls back to the `dir` prop coming from the
|
|
275
|
+
// falls back to the `dir` prop coming from the `textDirectionContextConsumer` HOC
|
|
277
276
|
return this.props.direction || this.props.dir;
|
|
278
277
|
}
|
|
279
278
|
get extensions() {
|
|
@@ -541,6 +540,7 @@ let SourceCodeEditor = (_dec = withDeterministicId(), _dec2 = withStyle(generate
|
|
|
541
540
|
})
|
|
542
541
|
});
|
|
543
542
|
}
|
|
544
|
-
}
|
|
543
|
+
}
|
|
544
|
+
const SourceCodeEditor = withDeterministicId()(withStyle(generateStyle, generateComponentTheme)(textDirectionContextConsumer()(SourceCodeEditorBase)));
|
|
545
545
|
export default SourceCodeEditor;
|
|
546
546
|
export { SourceCodeEditor };
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
var _dec, _dec2, _dec3, _class;
|
|
2
1
|
/*
|
|
3
2
|
* The MIT License (MIT)
|
|
4
3
|
*
|
|
@@ -57,7 +56,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "@emotion/react/jsx-runtime";
|
|
|
57
56
|
category: components
|
|
58
57
|
---
|
|
59
58
|
**/
|
|
60
|
-
|
|
59
|
+
export class SourceCodeEditorBase extends Component {
|
|
61
60
|
static displayName = 'SourceCodeEditor';
|
|
62
61
|
static componentId = 'SourceCodeEditor';
|
|
63
62
|
static allowedProps = allowedProps;
|
|
@@ -290,7 +289,7 @@ let SourceCodeEditor = (_dec = withDeterministicId(), _dec2 = withStyleNew(gener
|
|
|
290
289
|
}
|
|
291
290
|
get direction() {
|
|
292
291
|
// comes from the `direction` prop and
|
|
293
|
-
// falls back to the `dir` prop coming from the
|
|
292
|
+
// falls back to the `dir` prop coming from the `textDirectionContextConsumer` HOC
|
|
294
293
|
return this.props.direction || this.props.dir;
|
|
295
294
|
}
|
|
296
295
|
get extensions() {
|
|
@@ -604,6 +603,7 @@ let SourceCodeEditor = (_dec = withDeterministicId(), _dec2 = withStyleNew(gener
|
|
|
604
603
|
}), dom, String(id)))]
|
|
605
604
|
});
|
|
606
605
|
}
|
|
607
|
-
}
|
|
606
|
+
}
|
|
607
|
+
const SourceCodeEditor = withDeterministicId()(withStyleNew(generateStyle)(textDirectionContextConsumer()(SourceCodeEditorBase)));
|
|
608
608
|
export default SourceCodeEditor;
|
|
609
609
|
export { SourceCodeEditor };
|
|
@@ -4,7 +4,7 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
4
4
|
Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
|
-
exports.default = exports.SourceCodeEditor = void 0;
|
|
7
|
+
exports.default = exports.SourceCodeEditorBase = exports.SourceCodeEditor = void 0;
|
|
8
8
|
var _react = require("react");
|
|
9
9
|
var _uiUtils = require("@instructure/ui-utils");
|
|
10
10
|
var _state = require("@codemirror/state");
|
|
@@ -32,7 +32,6 @@ var _theme = _interopRequireDefault(require("./theme.js"));
|
|
|
32
32
|
var _customKeybinding = require("./customKeybinding.js");
|
|
33
33
|
var _props = require("./props.js");
|
|
34
34
|
var _jsxRuntime = require("@emotion/react/jsx-runtime");
|
|
35
|
-
var _dec, _dec2, _dec3, _class;
|
|
36
35
|
/*
|
|
37
36
|
* The MIT License (MIT)
|
|
38
37
|
*
|
|
@@ -56,13 +55,15 @@ var _dec, _dec2, _dec3, _class;
|
|
|
56
55
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
57
56
|
* SOFTWARE.
|
|
58
57
|
*/
|
|
58
|
+
|
|
59
59
|
// import { oneDarkTheme, oneDarkHighlightStyle } from '@codemirror/theme-one-dark'
|
|
60
|
+
|
|
60
61
|
/**
|
|
61
62
|
---
|
|
62
63
|
category: components
|
|
63
64
|
---
|
|
64
65
|
**/
|
|
65
|
-
|
|
66
|
+
class SourceCodeEditorBase extends _react.Component {
|
|
66
67
|
static displayName = 'SourceCodeEditor';
|
|
67
68
|
static componentId = 'SourceCodeEditor';
|
|
68
69
|
static allowedProps = _props.allowedProps;
|
|
@@ -278,7 +279,7 @@ let SourceCodeEditor = exports.SourceCodeEditor = (_dec = (0, _uiReactUtils.with
|
|
|
278
279
|
}
|
|
279
280
|
get direction() {
|
|
280
281
|
// comes from the `direction` prop and
|
|
281
|
-
// falls back to the `dir` prop coming from the
|
|
282
|
+
// falls back to the `dir` prop coming from the `textDirectionContextConsumer` HOC
|
|
282
283
|
return this.props.direction || this.props.dir;
|
|
283
284
|
}
|
|
284
285
|
get extensions() {
|
|
@@ -546,5 +547,7 @@ let SourceCodeEditor = exports.SourceCodeEditor = (_dec = (0, _uiReactUtils.with
|
|
|
546
547
|
})
|
|
547
548
|
});
|
|
548
549
|
}
|
|
549
|
-
}
|
|
550
|
+
}
|
|
551
|
+
exports.SourceCodeEditorBase = SourceCodeEditorBase;
|
|
552
|
+
const SourceCodeEditor = exports.SourceCodeEditor = (0, _uiReactUtils.withDeterministicId)()((0, _emotion.withStyle)(_styles.default, _theme.default)((0, _uiI18n.textDirectionContextConsumer)()(SourceCodeEditorBase)));
|
|
550
553
|
var _default = exports.default = SourceCodeEditor;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
|
|
4
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
+
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
|
-
exports.default = exports.SourceCodeEditor = void 0;
|
|
8
|
+
exports.default = exports.SourceCodeEditorBase = exports.SourceCodeEditor = void 0;
|
|
9
9
|
var _react = require("react");
|
|
10
10
|
var _reactDom = require("react-dom");
|
|
11
11
|
var _uiUtils = require("@instructure/ui-utils");
|
|
@@ -33,7 +33,6 @@ var _styles = _interopRequireDefault(require("./styles.js"));
|
|
|
33
33
|
var _customKeybinding = require("./customKeybinding.js");
|
|
34
34
|
var _props = require("./props.js");
|
|
35
35
|
var _jsxRuntime = require("@emotion/react/jsx-runtime");
|
|
36
|
-
var _dec, _dec2, _dec3, _class;
|
|
37
36
|
/*
|
|
38
37
|
* The MIT License (MIT)
|
|
39
38
|
*
|
|
@@ -57,13 +56,15 @@ var _dec, _dec2, _dec3, _class;
|
|
|
57
56
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
58
57
|
* SOFTWARE.
|
|
59
58
|
*/
|
|
59
|
+
|
|
60
60
|
// import { oneDarkTheme, oneDarkHighlightStyle } from '@codemirror/theme-one-dark'
|
|
61
|
+
|
|
61
62
|
/**
|
|
62
63
|
---
|
|
63
64
|
category: components
|
|
64
65
|
---
|
|
65
66
|
**/
|
|
66
|
-
|
|
67
|
+
class SourceCodeEditorBase extends _react.Component {
|
|
67
68
|
static displayName = 'SourceCodeEditor';
|
|
68
69
|
static componentId = 'SourceCodeEditor';
|
|
69
70
|
static allowedProps = _props.allowedProps;
|
|
@@ -296,7 +297,7 @@ let SourceCodeEditor = exports.SourceCodeEditor = (_dec = (0, _uiReactUtils.with
|
|
|
296
297
|
}
|
|
297
298
|
get direction() {
|
|
298
299
|
// comes from the `direction` prop and
|
|
299
|
-
// falls back to the `dir` prop coming from the
|
|
300
|
+
// falls back to the `dir` prop coming from the `textDirectionContextConsumer` HOC
|
|
300
301
|
return this.props.direction || this.props.dir;
|
|
301
302
|
}
|
|
302
303
|
get extensions() {
|
|
@@ -610,5 +611,7 @@ let SourceCodeEditor = exports.SourceCodeEditor = (_dec = (0, _uiReactUtils.with
|
|
|
610
611
|
}), dom, String(id)))]
|
|
611
612
|
});
|
|
612
613
|
}
|
|
613
|
-
}
|
|
614
|
+
}
|
|
615
|
+
exports.SourceCodeEditorBase = SourceCodeEditorBase;
|
|
616
|
+
const SourceCodeEditor = exports.SourceCodeEditor = (0, _uiReactUtils.withDeterministicId)()((0, _emotion.withStyleNew)(_styles.default)((0, _uiI18n.textDirectionContextConsumer)()(SourceCodeEditorBase)));
|
|
614
617
|
var _default = exports.default = SourceCodeEditor;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@instructure/ui-source-code-editor",
|
|
3
|
-
"version": "11.7.11-snapshot-
|
|
3
|
+
"version": "11.7.11-snapshot-26",
|
|
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",
|
|
@@ -28,21 +28,21 @@
|
|
|
28
28
|
"@codemirror/search": "^6.5.6",
|
|
29
29
|
"@codemirror/state": "^6.4.1",
|
|
30
30
|
"@codemirror/view": "^6.34.1",
|
|
31
|
-
"@instructure/emotion": "11.7.11-snapshot-
|
|
32
|
-
"@instructure/shared-types": "11.7.11-snapshot-
|
|
33
|
-
"@instructure/ui-a11y-content": "11.7.11-snapshot-
|
|
34
|
-
"@instructure/ui-buttons": "11.7.11-snapshot-
|
|
35
|
-
"@instructure/ui-dom-utils": "11.7.11-snapshot-
|
|
36
|
-
"@instructure/ui-i18n": "11.7.11-snapshot-
|
|
37
|
-
"@instructure/ui-icons": "11.7.11-snapshot-
|
|
38
|
-
"@instructure/ui-react-utils": "11.7.11-snapshot-
|
|
39
|
-
"@instructure/ui-text-input": "11.7.11-snapshot-
|
|
40
|
-
"@instructure/ui-themes": "11.7.11-snapshot-
|
|
41
|
-
"@instructure/ui-utils": "11.7.11-snapshot-
|
|
31
|
+
"@instructure/emotion": "11.7.11-snapshot-26",
|
|
32
|
+
"@instructure/shared-types": "11.7.11-snapshot-26",
|
|
33
|
+
"@instructure/ui-a11y-content": "11.7.11-snapshot-26",
|
|
34
|
+
"@instructure/ui-buttons": "11.7.11-snapshot-26",
|
|
35
|
+
"@instructure/ui-dom-utils": "11.7.11-snapshot-26",
|
|
36
|
+
"@instructure/ui-i18n": "11.7.11-snapshot-26",
|
|
37
|
+
"@instructure/ui-icons": "11.7.11-snapshot-26",
|
|
38
|
+
"@instructure/ui-react-utils": "11.7.11-snapshot-26",
|
|
39
|
+
"@instructure/ui-text-input": "11.7.11-snapshot-26",
|
|
40
|
+
"@instructure/ui-themes": "11.7.11-snapshot-26",
|
|
41
|
+
"@instructure/ui-utils": "11.7.11-snapshot-26",
|
|
42
42
|
"@lezer/highlight": "1.2.3"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
45
|
-
"@instructure/ui-babel-preset": "11.7.11-snapshot-
|
|
45
|
+
"@instructure/ui-babel-preset": "11.7.11-snapshot-26",
|
|
46
46
|
"vitest": "^5.0.0"
|
|
47
47
|
},
|
|
48
48
|
"peerDependencies": {
|
|
@@ -104,10 +104,7 @@ import type { SourceCodeEditorProps } from './props'
|
|
|
104
104
|
category: components
|
|
105
105
|
---
|
|
106
106
|
**/
|
|
107
|
-
|
|
108
|
-
@withStyle(generateStyle, generateComponentTheme)
|
|
109
|
-
@textDirectionContextConsumer()
|
|
110
|
-
class SourceCodeEditor extends Component<SourceCodeEditorProps> {
|
|
107
|
+
export class SourceCodeEditorBase extends Component<SourceCodeEditorProps> {
|
|
111
108
|
static displayName = 'SourceCodeEditor'
|
|
112
109
|
static readonly componentId = 'SourceCodeEditor'
|
|
113
110
|
|
|
@@ -364,7 +361,7 @@ class SourceCodeEditor extends Component<SourceCodeEditorProps> {
|
|
|
364
361
|
|
|
365
362
|
get direction() {
|
|
366
363
|
// comes from the `direction` prop and
|
|
367
|
-
// falls back to the `dir` prop coming from the
|
|
364
|
+
// falls back to the `dir` prop coming from the `textDirectionContextConsumer` HOC
|
|
368
365
|
return this.props.direction || this.props.dir
|
|
369
366
|
}
|
|
370
367
|
|
|
@@ -683,5 +680,13 @@ class SourceCodeEditor extends Component<SourceCodeEditorProps> {
|
|
|
683
680
|
}
|
|
684
681
|
}
|
|
685
682
|
|
|
683
|
+
const SourceCodeEditor = withDeterministicId()(
|
|
684
|
+
withStyle(
|
|
685
|
+
generateStyle,
|
|
686
|
+
generateComponentTheme
|
|
687
|
+
)(textDirectionContextConsumer()(SourceCodeEditorBase))
|
|
688
|
+
)
|
|
689
|
+
type SourceCodeEditor = SourceCodeEditorBase
|
|
690
|
+
|
|
686
691
|
export default SourceCodeEditor
|
|
687
692
|
export { SourceCodeEditor }
|
|
@@ -114,10 +114,7 @@ type SourceCodeEditorState = {
|
|
|
114
114
|
category: components
|
|
115
115
|
---
|
|
116
116
|
**/
|
|
117
|
-
|
|
118
|
-
@withStyleNew(generateStyle)
|
|
119
|
-
@textDirectionContextConsumer()
|
|
120
|
-
class SourceCodeEditor extends Component<
|
|
117
|
+
export class SourceCodeEditorBase extends Component<
|
|
121
118
|
SourceCodeEditorProps,
|
|
122
119
|
SourceCodeEditorState
|
|
123
120
|
> {
|
|
@@ -398,7 +395,7 @@ class SourceCodeEditor extends Component<
|
|
|
398
395
|
|
|
399
396
|
get direction() {
|
|
400
397
|
// comes from the `direction` prop and
|
|
401
|
-
// falls back to the `dir` prop coming from the
|
|
398
|
+
// falls back to the `dir` prop coming from the `textDirectionContextConsumer` HOC
|
|
402
399
|
return this.props.direction || this.props.dir
|
|
403
400
|
}
|
|
404
401
|
|
|
@@ -772,5 +769,12 @@ class SourceCodeEditor extends Component<
|
|
|
772
769
|
}
|
|
773
770
|
}
|
|
774
771
|
|
|
772
|
+
const SourceCodeEditor = withDeterministicId()(
|
|
773
|
+
withStyleNew(generateStyle)(
|
|
774
|
+
textDirectionContextConsumer()(SourceCodeEditorBase)
|
|
775
|
+
)
|
|
776
|
+
)
|
|
777
|
+
type SourceCodeEditor = SourceCodeEditorBase
|
|
778
|
+
|
|
775
779
|
export default SourceCodeEditor
|
|
776
780
|
export { SourceCodeEditor }
|