@nethru/ui 2.1.8 → 2.1.9

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.
@@ -3,11 +3,9 @@ import { Box, FormHelperText } from "@mui/material";
3
3
  import CodeMirror from '@uiw/react-codemirror';
4
4
  import { javascript } from '@codemirror/lang-javascript';
5
5
  import { json } from '@codemirror/lang-json';
6
- import { nScript } from './nScript';
7
- import { Decoration, EditorView } from "@codemirror/view";
6
+ import { Decoration, EditorView, keymap as keyMapper } from "@codemirror/view";
8
7
  import { RegExpCursor, SearchCursor } from '@codemirror/search';
9
8
  import { StateEffect, StateField } from "@codemirror/state";
10
- import { keymap as keyMapper } from '@codemirror/view';
11
9
  import { defaultKeymap } from '@codemirror/commands';
12
10
  import borderRadius from "../styles/borderRadius";
13
11
  import { blue, grey, red, yellow } from "../colors";
@@ -135,7 +133,7 @@ export default function Editor({
135
133
  case 'json':
136
134
  return json();
137
135
  case 'nscript':
138
- return nScript;
136
+ return undefined;
139
137
  default:
140
138
  return javascript({
141
139
  jsx: true
@@ -146,7 +144,8 @@ export default function Editor({
146
144
  return [keyMapper.of(keymap), keyMapper.of(defaultKeymap)];
147
145
  }, [keymap]);
148
146
  const extensionList = useMemo(() => {
149
- const result = [languageExtension, EditorView.lineWrapping, highlight.extension, ...keymapExtension];
147
+ const result = [EditorView.lineWrapping, highlight.extension, ...keymapExtension];
148
+ if (languageExtension) result.push(languageExtension);
150
149
  if (onScroll) {
151
150
  result.push(EditorView.domEventHandlers({
152
151
  scroll(event, view) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nethru/ui",
3
- "version": "2.1.8",
3
+ "version": "2.1.9",
4
4
  "main": "base/index.js",
5
5
  "files": [
6
6
  "/base"