@instructure/ui-source-code-editor 11.7.3 → 11.7.4-pr-snapshot-1781695314229

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