@nethru/ui 2.1.41 → 2.1.43

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.
@@ -5,6 +5,7 @@ import { jsx as _jsx } from "react/jsx-runtime";
5
5
  const HelpTooltipIcon = /*#__PURE__*/forwardRef(({
6
6
  tooltip,
7
7
  onClick,
8
+ iconButtonProps,
8
9
  ...props
9
10
  }, ref) => {
10
11
  return /*#__PURE__*/_jsx(Tooltip, {
@@ -14,6 +15,7 @@ const HelpTooltipIcon = /*#__PURE__*/forwardRef(({
14
15
  children: /*#__PURE__*/_jsx(IconButton, {
15
16
  size: "small",
16
17
  onClick: onClick,
18
+ ...iconButtonProps,
17
19
  children: /*#__PURE__*/_jsx(InfoOutlinedIcon, {
18
20
  fontSize: "inherit"
19
21
  })
@@ -46,7 +46,7 @@ export default function Editor({
46
46
  const highlight = useMemo(() => makeHighlight(), []);
47
47
  // eslint-disable-next-line
48
48
  const styles = useMemo(() => makeStyle(restrictWidth, ref.current), [restrictWidth, ref.current]);
49
- const eslintLinter = useMemo(() => makeEslinter(format, eslintRules, onEslintUpdate, customVariables), [format, eslintRules, onEslintUpdate, customVariables]);
49
+ const eslintLinter = useMemo(() => makeEslinter(format, eslintRules, onEslintUpdate, customVariables, readOnly), [format, eslintRules, onEslintUpdate, customVariables, readOnly]);
50
50
  const languageExtension = useMemo(() => getLanguageExtension(format), [format]);
51
51
  const keymapExtension = useMemo(() => getKeymapExtension(keymap), [keymap]);
52
52
  const extensionList = useMemo(() => makeExtensions(languageExtension, eslintLinter, highlight.extension, keymapExtension, extensions, onScroll), [languageExtension, eslintLinter, highlight.extension, keymapExtension, extensions, onScroll]);
@@ -209,7 +209,8 @@ function makeHighlight() {
209
209
  extension: extension
210
210
  };
211
211
  }
212
- function makeEslinter(format, eslintRules, onEslintUpdate, customVariables) {
212
+ function makeEslinter(format, eslintRules, onEslintUpdate, customVariables, readOnly) {
213
+ if (readOnly) return;
213
214
  const regex = /\{\{([^}]+)\}\}/g;
214
215
  if (format === 'javascript') {
215
216
  return linter(view => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nethru/ui",
3
- "version": "2.1.41",
3
+ "version": "2.1.43",
4
4
  "main": "base/index.js",
5
5
  "files": [
6
6
  "/base"