@instructure/ui-source-code-editor 11.7.8 → 11.7.9-pr-snapshot-1792147648392

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.
@@ -1,593 +0,0 @@
1
- "use strict";
2
-
3
- var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
4
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
5
- Object.defineProperty(exports, "__esModule", {
6
- value: true
7
- });
8
- exports.default = exports.SourceCodeEditor = void 0;
9
- var _react = require("react");
10
- var _reactDom = require("react-dom");
11
- var _deepEqual = require("@instructure/ui-utils/lib/deepEqual.js");
12
- var _state = require("@codemirror/state");
13
- var _view = require("@codemirror/view");
14
- var _autocomplete = require("@codemirror/autocomplete");
15
- var _search = require("@codemirror/search");
16
- var _commands = require("@codemirror/commands");
17
- var _lint = require("@codemirror/lint");
18
- var _language = require("@codemirror/language");
19
- var _langJavascript = require("@codemirror/lang-javascript");
20
- var _langHtml = require("@codemirror/lang-html");
21
- var _langCss = require("@codemirror/lang-css");
22
- var _langMarkdown = require("@codemirror/lang-markdown");
23
- var _langJson = require("@codemirror/lang-json");
24
- var _shell = require("@codemirror/legacy-modes/mode/shell");
25
- var _yaml = require("@codemirror/legacy-modes/mode/yaml");
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");
32
- var _emotion = require("@instructure/emotion");
33
- var _SearchPanel = _interopRequireWildcard(require("./SearchPanel.js"));
34
- var _styles = _interopRequireDefault(require("./styles.js"));
35
- var _customKeybinding = require("./customKeybinding.js");
36
- var _props = require("./props.js");
37
- var _jsxRuntime = require("@emotion/react/jsx-runtime");
38
- var _dec, _dec2, _dec3, _class;
39
- /*
40
- * The MIT License (MIT)
41
- *
42
- * Copyright (c) 2015 - present Instructure, Inc.
43
- *
44
- * Permission is hereby granted, free of charge, to any person obtaining a copy
45
- * of this software and associated documentation files (the "Software"), to deal
46
- * in the Software without restriction, including without limitation the rights
47
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
48
- * copies of the Software, and to permit persons to whom the Software is
49
- * furnished to do so, subject to the following conditions:
50
- *
51
- * The above copyright notice and this permission notice shall be included in all
52
- * copies or substantial portions of the Software.
53
- *
54
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
55
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
56
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
57
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
58
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
59
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
60
- * SOFTWARE.
61
- */
62
- // import { oneDarkTheme, oneDarkHighlightStyle } from '@codemirror/theme-one-dark'
63
- /**
64
- ---
65
- category: components
66
- ---
67
- **/
68
- let SourceCodeEditor = exports.SourceCodeEditor = (_dec = (0, _withDeterministicId.withDeterministicId)(), _dec2 = (0, _emotion.withStyleNew)(_styles.default), _dec3 = (0, _textDirectionContextConsumer.textDirectionContextConsumer)(), _dec(_class = _dec2(_class = _dec3(_class = class SourceCodeEditor extends _react.Component {
69
- static displayName = 'SourceCodeEditor';
70
- static componentId = 'SourceCodeEditor';
71
- static allowedProps = _props.allowedProps;
72
- static defaultProps = {
73
- language: 'jsx',
74
- readOnly: false,
75
- editable: true,
76
- lineNumbers: false,
77
- foldGutter: false,
78
- highlightActiveLine: false,
79
- highlightActiveLineGutter: false,
80
- lineWrapping: false,
81
- autofocus: false,
82
- spellcheck: false,
83
- rtlMoveVisually: true,
84
- indentOnLoad: false,
85
- indentWithTab: false,
86
- defaultValue: '',
87
- height: 'auto'
88
- };
89
- _id;
90
- ref = null;
91
- state = {
92
- searchPanels: []
93
- };
94
- _containerRef;
95
- _editorView;
96
- _raf = [];
97
- _searchPanelId = 0;
98
- _isUnmounting = false;
99
- _newSelectionAfterValueChange;
100
- handleSearchPanelMount = (dom, view) => {
101
- this.setState(state => ({
102
- searchPanels: [...state.searchPanels, {
103
- id: ++this._searchPanelId,
104
- dom,
105
- view
106
- }]
107
- }));
108
- };
109
- handleSearchPanelDestroy = dom => {
110
- if (this._isUnmounting) return;
111
- this.setState(state => ({
112
- searchPanels: state.searchPanels.filter(panel => panel.dom !== dom)
113
- }));
114
- };
115
- handleRef = el => {
116
- const {
117
- elementRef
118
- } = this.props;
119
- this.ref = el;
120
- if (typeof elementRef === 'function') {
121
- elementRef(el);
122
- }
123
- };
124
- handleContainerRef = el => {
125
- const {
126
- containerRef
127
- } = this.props;
128
- this._containerRef = el || undefined;
129
- if (typeof containerRef === 'function') {
130
- containerRef(el);
131
- }
132
- };
133
- addAnimationFrame(callback) {
134
- if (typeof callback === 'function') {
135
- this._raf.push((0, _requestAnimationFrame.requestAnimationFrame)(callback));
136
- }
137
- }
138
- cancelAnimationFrames() {
139
- this._raf.forEach(request => request.cancel());
140
- this._raf = [];
141
- }
142
- focus() {
143
- this.addAnimationFrame(() => {
144
- this._editorView?.focus();
145
- });
146
- }
147
- get hasFocus() {
148
- return this._editorView?.hasFocus;
149
- }
150
- selectAll() {
151
- if (this._editorView) {
152
- this.addAnimationFrame(() => {
153
- this.dispatchViewSelection({
154
- anchor: 0,
155
- head: this.currentDocValue?.length
156
- });
157
- });
158
- }
159
- }
160
- deselectAll() {
161
- if (this._editorView) {
162
- this.addAnimationFrame(() => {
163
- this.dispatchViewSelection({
164
- anchor: 0,
165
- head: 0
166
- });
167
- });
168
- }
169
- }
170
- indentCurrentSelection() {
171
- this.addAnimationFrame(() => {
172
- if (this._editorView) {
173
- (0, _commands.indentSelection)({
174
- state: this._editorView.state,
175
- dispatch: transaction => {
176
- this._editorView?.update([transaction]);
177
- }
178
- });
179
- }
180
- });
181
- }
182
- indentAll() {
183
- this.addAnimationFrame(() => {
184
- if (this._editorView && this.currentDocValue) {
185
- this.indentCodeRange(0, this.currentDocValue.length);
186
- }
187
- });
188
- }
189
- indentCodeRange(from, to) {
190
- this.addAnimationFrame(() => {
191
- if (this._editorView && this.currentDocValue) {
192
- this.dispatchViewChanges({
193
- changes: (0, _language.indentRange)(this._editorView.state, from, to)
194
- });
195
- }
196
- });
197
- }
198
-
199
- // Attach state effects
200
- dispatchViewEffects(effects) {
201
- if (!this._editorView || !effects) return;
202
- this._editorView.dispatch({
203
- effects
204
- });
205
- }
206
-
207
- // Dispatch changes to the document
208
- dispatchViewChanges({
209
- changes,
210
- selection,
211
- userEvent
212
- }) {
213
- if (!this._editorView || !changes) return;
214
- this._editorView.dispatch({
215
- changes,
216
- ...(selection ? {
217
- selection
218
- } : undefined),
219
- ...(userEvent ? {
220
- userEvent
221
- } : undefined)
222
- });
223
- }
224
-
225
- // Select a portion of the document
226
- dispatchViewSelection(selection) {
227
- if (!this._editorView || !selection) return;
228
- this._editorView.dispatch({
229
- selection
230
- });
231
- }
232
- get currentDocValue() {
233
- return this._editorView?.state.doc;
234
- }
235
-
236
- // when value is passed, the editor should be controlled
237
- get isControlled() {
238
- return typeof this.props.value === 'string';
239
- }
240
- constructor(props) {
241
- super(props);
242
- this._id = props.deterministicId();
243
- }
244
- componentDidMount() {
245
- const {
246
- value,
247
- defaultValue,
248
- autofocus,
249
- indentOnLoad
250
- } = this.props;
251
- this.props.makeStyles?.();
252
- const state = _state.EditorState.create({
253
- doc: value || defaultValue,
254
- extensions: this.extensions
255
- });
256
- this._editorView = new _view.EditorView({
257
- state,
258
- parent: this._containerRef
259
- });
260
-
261
- // from the a11y team:
262
- // axe devtools and other automated a11y tests both flagging this issue,
263
- // which can be observed while navigating with keyboard:
264
- // Ensure elements that have scrollable content are accessible by keyboard
265
- // To solve this problem, you need to fix at least (1) of the following:
266
- // Element should have focusable content, Element should be focusable
267
- this._editorView.scrollDOM.tabIndex = 0;
268
- if (autofocus) {
269
- this.focus();
270
- }
271
- if (indentOnLoad) {
272
- this.indentAll();
273
- }
274
- this.assignAriaLabel();
275
- }
276
- componentWillUnmount() {
277
- this._isUnmounting = true;
278
- this._editorView?.destroy();
279
- this.cancelAnimationFrames();
280
- }
281
- componentDidUpdate(prevProps) {
282
- this.props.makeStyles?.();
283
- if (this._editorView) {
284
- if (this.props.value !== prevProps.value) {
285
- this.refreshEditorValue();
286
- }
287
- if (this.shouldUpdateExtensions(prevProps)) {
288
- this.refreshExtensions();
289
- }
290
- }
291
- }
292
- shouldUpdateExtensions(prevProps) {
293
- const propsToObserve = ['styles',
294
- // needed for theme update
295
- 'themeOverride', 'language', 'readOnly', 'editable', 'lineNumbers', 'highlightActiveLineGutter', 'foldGutter', 'lineWrapping', 'autofocus', 'spellcheck', 'direction', 'dir', 'rtlMoveVisually', 'indentOnLoad', 'indentWithTab', 'indentUnit', 'highlightActiveLine', 'attachment', 'searchConfig'];
296
- for (const prop of propsToObserve) {
297
- if (!(0, _deepEqual.deepEqual)(this.props[prop], prevProps[prop])) {
298
- return true;
299
- }
300
- }
301
- return false;
302
- }
303
- get direction() {
304
- // comes from the `direction` prop and
305
- // falls back to the `dir` prop coming from the bidirectional decorator
306
- return this.props.direction || this.props.dir;
307
- }
308
- get extensions() {
309
- const extensions = [...this.baseExtensions,
310
- // our custom extensions
311
- this.languageExtension, this.onChangeExtension, this.focusListenerExtension, this.announceLineNumberExtension];
312
- if (this.themeExtension) {
313
- extensions.push(this.themeExtension);
314
- }
315
- if (this.props.lineNumbers) {
316
- extensions.push((0, _view.lineNumbers)());
317
- }
318
- if (this.props.highlightActiveLine) {
319
- extensions.push((0, _view.highlightActiveLine)());
320
- }
321
- if (this.props.highlightActiveLineGutter) {
322
- extensions.push((0, _view.highlightActiveLineGutter)());
323
- }
324
- if (this.props.foldGutter) {
325
- extensions.push((0, _language.foldGutter)());
326
- }
327
- if (this.props.lineWrapping) {
328
- extensions.push(_view.EditorView.lineWrapping);
329
- }
330
- if (this.props.editable === false) {
331
- extensions.push(_view.EditorView.editable.of(false));
332
- }
333
- if (this.props.readOnly) {
334
- extensions.push(_state.EditorState.readOnly.of(true));
335
- }
336
- if (this.props.spellcheck) {
337
- extensions.push(_view.EditorView.contentAttributes.of({
338
- spellcheck: 'true'
339
- }));
340
- }
341
- if (this.direction) {
342
- extensions.push(_view.EditorView.contentAttributes.of({
343
- dir: this.direction
344
- }));
345
- }
346
- if (this.props.indentUnit) {
347
- extensions.push(_language.indentUnit.of(this.props.indentUnit));
348
- }
349
- return extensions;
350
- }
351
- get baseExtensions() {
352
- return [
353
- // The extensions are based on codemirrors basic setup from 'codemirror'.
354
- // It is recommended by CodeMirror, that if we want to configure
355
- // our editor more precisely, we have to copy the source
356
- // and adjust it as desired.
357
- (0, _view.highlightSpecialChars)(), (0, _commands.history)(), (0, _view.drawSelection)(), (0, _view.dropCursor)(), _state.EditorState.allowMultipleSelections.of(true), (0, _language.syntaxHighlighting)(_language.defaultHighlightStyle, {
358
- fallback: true
359
- }), (0, _language.bracketMatching)(), (0, _autocomplete.closeBrackets)(), (0, _autocomplete.autocompletion)(), (0, _view.rectangularSelection)(), (0, _view.crosshairCursor)(), (0, _search.highlightSelectionMatches)(), (0, _language.indentOnInput)(), (0, _SearchPanel.default)(this.props.searchConfig, {
360
- onMount: this.handleSearchPanelMount,
361
- onDestroy: this.handleSearchPanelDestroy
362
- }), _view.keymap.of(this.keymaps)];
363
- }
364
- get keymaps() {
365
- // TODO: if more keymaps are added, list them in the docs as well (#Command keybinding)
366
- const keymaps = [..._autocomplete.closeBracketsKeymap, ...this.commandKeybinding, ..._commands.historyKeymap, ..._language.foldKeymap, ..._autocomplete.completionKeymap, ..._lint.lintKeymap, ...(this.props.searchConfig ? _search.searchKeymap : [])];
367
- if (this.props.indentWithTab) {
368
- keymaps.push(_commands.indentWithTab);
369
- }
370
- return keymaps;
371
- }
372
- get commandKeybinding() {
373
- const {
374
- rtlMoveVisually
375
- } = this.props;
376
- if (this.direction === 'rtl' && !rtlMoveVisually) {
377
- const overrideableKeys = _customKeybinding.rtlHorizontalArrowKeymap.map(binding => binding.key ? binding.key : binding.mac ? binding.mac : binding);
378
- // we have to remove the binding we want to override from the original,
379
- // otherwise all will be merged and the defaults will still apply
380
- const filteredOriginal = _commands.defaultKeymap.filter(binding => binding.key ? overrideableKeys.indexOf(binding.key) < 0 : binding.mac ? overrideableKeys.indexOf(binding.mac) < 0 : false);
381
- return [...filteredOriginal, ..._customKeybinding.rtlHorizontalArrowKeymap];
382
- }
383
- return _commands.defaultKeymap;
384
- }
385
- get themeExtension() {
386
- const {
387
- styles
388
- } = this.props;
389
- if (!styles?.theme || !styles.highlightStyle) {
390
- return undefined;
391
- }
392
- const theme = _view.EditorView.theme(styles?.theme);
393
- const highlightStyle = (0, _language.syntaxHighlighting)(_language.HighlightStyle.define(styles?.highlightStyle));
394
-
395
- // see notes in props.ts
396
- // if (darkTheme) {
397
- // theme = oneDarkTheme
398
- // highlightStyle = syntaxHighlighting(oneDarkHighlightStyle)
399
- // }
400
-
401
- return [theme, highlightStyle];
402
- }
403
- get languageExtension() {
404
- const {
405
- language
406
- } = this.props;
407
- switch (language) {
408
- case 'json':
409
- return (0, _langJson.json)();
410
- case 'js':
411
- case 'jsx':
412
- case 'javascript':
413
- return (0, _langJavascript.javascript)({
414
- jsx: true,
415
- typescript: true
416
- });
417
- case 'html':
418
- return (0, _langHtml.html)({
419
- matchClosingTags: true,
420
- autoCloseTags: true
421
- });
422
- case 'css':
423
- return (0, _langCss.css)();
424
- case 'markdown':
425
- return (0, _langMarkdown.markdown)();
426
- case 'sh':
427
- case 'shell':
428
- case 'bash':
429
- // ????
430
- return _language.StreamLanguage.define(_shell.shell);
431
- case 'yml':
432
- case 'yaml':
433
- return _language.StreamLanguage.define(_yaml.yaml);
434
- default:
435
- return (0, _langJavascript.javascript)({
436
- jsx: true,
437
- typescript: true
438
- });
439
- }
440
- }
441
- callOnChangeHandler(newValue) {
442
- const {
443
- onChange,
444
- value
445
- } = this.props;
446
- this.addAnimationFrame(() => {
447
- if (typeof onChange === 'function' && newValue !== value) {
448
- onChange(newValue);
449
- }
450
- });
451
- }
452
- get onChangeExtension() {
453
- return _state.EditorState.changeFilter.of(transaction => {
454
- if (!this._editorView) {
455
- return false;
456
- }
457
- if (transaction.docChanged) {
458
- const newDoc = transaction.newDoc.toString();
459
- if (this.isControlled) {
460
- // the value will be changed by the onChange handler,
461
- // refreshEditorValue has to run first
462
- if (newDoc !== this.props.value) {
463
- this._newSelectionAfterValueChange = transaction.selection;
464
- this.cancelAnimationFrames();
465
- this.callOnChangeHandler(newDoc);
466
- return false;
467
- } else {
468
- return true;
469
- }
470
- } else {
471
- this.callOnChangeHandler(newDoc);
472
- }
473
- }
474
- return true;
475
- });
476
- }
477
- get focusListenerExtension() {
478
- const {
479
- onFocus,
480
- onBlur
481
- } = this.props;
482
- return _view.EditorView.updateListener.of(update => {
483
- if (update.focusChanged && this._editorView) {
484
- if (this.hasFocus) {
485
- if (typeof onFocus === 'function') {
486
- onFocus();
487
- }
488
- } else {
489
- if (typeof onBlur === 'function') {
490
- onBlur();
491
- }
492
- }
493
- }
494
- });
495
- }
496
- get announceLineNumberExtension() {
497
- return _state.EditorState.transactionExtender.of(tr => {
498
- const selection = tr.selection;
499
- const oldSelection = tr.startState.selection.main;
500
- if (selection && selection.main.empty && oldSelection.empty) {
501
- const oldLine = tr.startState.doc.lineAt(oldSelection.head);
502
- const newLine = tr.newDoc.lineAt(selection.main.head);
503
- if (oldLine.number != newLine.number) return {
504
- effects: _view.EditorView.announce.of(tr.startState.phrase('line ') + newLine.number + '.')
505
- };
506
- }
507
- return null;
508
- });
509
- }
510
- refreshExtensions() {
511
- this.dispatchViewEffects(_state.StateEffect.reconfigure.of(this.extensions));
512
- }
513
- refreshEditorValue() {
514
- if (!this._editorView) return;
515
- const {
516
- value
517
- } = this.props;
518
- const currentValue = this._editorView.state.doc.toString();
519
- if (typeof value !== 'undefined' && currentValue !== value) {
520
- let userEvent;
521
- const lengthDiff = value.length - currentValue.length;
522
-
523
- // setting user events are needed for the autocomplete to work
524
- // (only these 2 events, autocomplete doesn't work on paste, etc.)
525
- if (lengthDiff === 1) {
526
- userEvent = 'input.type';
527
- } else if (lengthDiff === -1) {
528
- userEvent = 'delete.backward';
529
- }
530
- const scrollTop = this._editorView.scrollDOM.scrollTop;
531
- this.dispatchViewChanges({
532
- changes: {
533
- from: 0,
534
- to: currentValue.length,
535
- insert: value || ''
536
- },
537
- selection: this._newSelectionAfterValueChange,
538
- userEvent: userEvent
539
- });
540
-
541
- // Restore scroll position after CodeMirror updates the DOM
542
- this.addAnimationFrame(() => {
543
- if (this._editorView) {
544
- this._editorView.scrollDOM.scrollTop = scrollTop;
545
- }
546
- });
547
- this._newSelectionAfterValueChange = undefined;
548
- }
549
- if (this.props.indentOnLoad) {
550
- this.indentAll();
551
- }
552
- }
553
- assignAriaLabel = () => {
554
- if (this._containerRef) {
555
- const editorDiv = this._containerRef.querySelector('[role="textbox"]');
556
- if (editorDiv) {
557
- editorDiv.setAttribute('aria-labelledby', `${this._id}`);
558
- }
559
- }
560
- };
561
- render() {
562
- const {
563
- label,
564
- styles,
565
- searchConfig,
566
- ...restProps
567
- } = this.props;
568
- return (0, _jsxRuntime.jsxs)("div", {
569
- "data-cid": "SourceCodeEditor",
570
- ref: this.handleRef,
571
- css: styles?.codeEditor,
572
- ...(0, _passthroughProps.passthroughProps)((0, _omitProps.omitProps)(restProps, SourceCodeEditor.allowedProps)),
573
- children: [(0, _jsxRuntime.jsxs)("label", {
574
- css: styles?.label,
575
- id: this._id,
576
- children: [(0, _jsxRuntime.jsx)(_ScreenReaderContent.ScreenReaderContent, {
577
- children: label
578
- }), (0, _jsxRuntime.jsx)("div", {
579
- ref: this.handleContainerRef,
580
- css: styles?.codeEditorContainer
581
- })]
582
- }), searchConfig && this.state.searchPanels.map(({
583
- id,
584
- dom,
585
- view
586
- }) => /*#__PURE__*/(0, _reactDom.createPortal)((0, _jsxRuntime.jsx)(_SearchPanel.SearchPanel, {
587
- view: view,
588
- searchConfig: searchConfig
589
- }), dom, String(id)))]
590
- });
591
- }
592
- }) || _class) || _class) || _class);
593
- var _default = exports.default = SourceCodeEditor;
@@ -1,33 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.allowedProps = void 0;
7
- /*
8
- * The MIT License (MIT)
9
- *
10
- * Copyright (c) 2015 - present Instructure, Inc.
11
- *
12
- * Permission is hereby granted, free of charge, to any person obtaining a copy
13
- * of this software and associated documentation files (the "Software"), to deal
14
- * in the Software without restriction, including without limitation the rights
15
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
16
- * copies of the Software, and to permit persons to whom the Software is
17
- * furnished to do so, subject to the following conditions:
18
- *
19
- * The above copyright notice and this permission notice shall be included in all
20
- * copies or substantial portions of the Software.
21
- *
22
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
23
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
24
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
25
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
26
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
27
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
28
- * SOFTWARE.
29
- */
30
-
31
- const allowedProps = exports.allowedProps = ['label', 'language', 'readOnly', 'editable', 'lineNumbers', 'foldGutter', 'highlightActiveLineGutter', 'highlightActiveLine', 'lineWrapping', 'autofocus', 'spellcheck', 'direction', 'rtlMoveVisually', 'indentOnLoad', 'indentWithTab', 'indentUnit', 'defaultValue', 'value', 'onChange', 'onFocus', 'onBlur', 'attachment', 'height', 'width',
32
- // 'darkTheme',
33
- 'elementRef', 'containerRef', 'searchConfig'];