@instructure/ui-source-code-editor 11.7.10 → 11.7.11-pr-snapshot-1794841957152

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