@react-fabric/monaco 1.0.0-beta.4 → 1.0.0-beta.41

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.
@@ -23,70 +23,74 @@
23
23
 
24
24
  /* stylelint-disable custom-property-pattern */
25
25
 
26
- @layer util {
27
- .codeEditor {
26
+ @layer utilities {
27
+ .fabric-codeEditor {
28
28
  direction: ltr;
29
29
  overflow: hidden;
30
30
  border: 1px solid transparent;
31
31
  border-bottom-width: 2px;
32
32
 
33
- &:has(:global(.monaco-editor.focused)) {
34
- border-color: theme(borderColor.primary.500);
33
+ &:has(.monaco-editor.focused) {
34
+ border-color: var(--border-primary-500);
35
35
  }
36
36
 
37
- .editor {
38
- & > :global(.monaco-editor) {
39
- --vscode-menu-background: theme(colors.tint.50) !important;
40
- --vscode-menu-border: theme(borderColor.base) !important;
37
+ .fabric-editor {
38
+ & > .monaco-editor {
39
+ --vscode-menu-background: var(--color-tint.50) !important;
40
+ --vscode-menu-border: var(--border-color-base) !important;
41
41
  --vscode-focusBorder: transparent !important;
42
42
  --vscode-menu-selectionBackground: color(
43
- from var(--primary) srgb r g b / 80%
43
+ from var(--color-primary) srgb r g b / 80%
44
44
  ) !important;
45
45
  --vscode-editor-background: var(--fabric-bg) !important;
46
46
  --vscode-editor-foreground: var(--fabric-text) !important;
47
47
  --vscode-breadcrumb-background: var(--fabric-bg) !important;
48
48
  --vscode-editorGutter-background: color(
49
- from theme(colors.tint.50) srgb r g g / 50%
49
+ from var(--color-tint.50) srgb r g g / 50%
50
50
  ) !important;
51
51
  --vscode-minimapSlider-background: color(
52
- from var(--tint) srgb r g b / 20%
52
+ from var(--color-tint) srgb r g b / 20%
53
53
  ) !important;
54
54
  --vscode-minimapSlider-hoverBackground: color(
55
- from var(--tint) srgb r g b / 25%
55
+ from var(--color-tint) srgb r g b / 25%
56
56
  ) !important;
57
57
  --vscode-minimapSlider-activeBackground: color(
58
- from var(--tint) srgb r g b / 30%
58
+ from var(--color-tint) srgb r g b / 30%
59
59
  ) !important;
60
- --vscode-input-border: var(--primary) !important;
60
+ --vscode-input-border: var(--color-primary) !important;
61
61
  --vscode-editorStickyScroll-background: var(--fabric-bg) !important;
62
62
  --vscode-editorMarkerNavigation-background: var(--fabric-bg) !important;
63
63
  --vscode-editor-wordHighlightTextBackground: color(
64
- from theme(colors.accent.700) srgb r g b / 20%
64
+ from var(--color-accent.700) srgb r g b / 20%
65
65
  ) !important;
66
66
  }
67
67
 
68
- & :global(.minimap-decorations-layer) {
68
+ & .minimap-decorations-layer {
69
69
  background-color: color(
70
- from theme(colors.tint.50) srgb r g g / 50%
70
+ from var(--color-tint.50) srgb r g g / 50%
71
71
  ) !important;
72
72
  }
73
73
 
74
- & :global(.folded-background) {
74
+ & .folded-background {
75
75
  opacity: 0.5;
76
76
  }
77
77
 
78
- & :global(.monaco-findInput) textarea {
78
+ & .monaco-findInput textarea {
79
79
  resize: initial;
80
80
  min-height: unset;
81
81
  }
82
82
 
83
+ & .editor-widget.suggest-widget .message {
84
+ font-size: 0.75rem;
85
+ }
86
+
83
87
  & span {
84
88
  padding: 0;
85
89
  }
86
90
  }
87
91
  }
88
92
 
89
- .editorTools {
90
- @apply bg-base;
93
+ .fabric-editorTools {
94
+ background-color: var(--bg-color-base);
91
95
  }
92
96
  }
package/css/styles.css ADDED
@@ -0,0 +1,24 @@
1
+ /*
2
+ * React Fabric
3
+ * @version: 1.0.0
4
+ *
5
+ *
6
+ * The MIT License (MIT)
7
+ * Copyright (c) 2025 Adarsh Pastakia
8
+ *
9
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software
10
+ * and associated documentation files (the "Software"), to deal in the Software without restriction,
11
+ * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
12
+ * and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
13
+ * subject to the following conditions:
14
+ *
15
+ * The above copyright notice and this permission notice shall be included in all copies or substantial
16
+ * portions of the Software.
17
+ *
18
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
19
+ * TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
20
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
21
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22
+ */
23
+
24
+ @import "./_codeEditor.css";
@@ -9,7 +9,6 @@ var utilities = require('@react-fabric/utilities');
9
9
  var classNames = require('classnames');
10
10
  var react = require('react');
11
11
  var MonacoEditor = require('react-monaco-editor');
12
- var CodeEditor_module = require('./CodeEditor.module.css');
13
12
  var jsxRuntime = require('react/jsx-runtime');
14
13
 
15
14
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
@@ -18,6 +17,7 @@ var CodeEditor = function CodeEditor(_ref) {
18
17
  var ref = _ref.ref,
19
18
  value = _ref.value,
20
19
  schema = _ref.schema,
20
+ handlebarSuggestions = _ref.handlebarSuggestions,
21
21
  required = _ref.required,
22
22
  readOnly = _ref.readOnly,
23
23
  minimal = _ref.minimal,
@@ -90,13 +90,15 @@ var CodeEditor = function CodeEditor(_ref) {
90
90
  }
91
91
  };
92
92
  }, [required, language]);
93
+ var disposeRef = react.useRef();
93
94
  var schemaUri = react.useCallback(function (monaco) {
94
- if (schema) {
95
+ if (language === "json" && schema) {
96
+ var _monaco$languages;
95
97
  var _schema = _toArray(schema),
96
98
  main = _schema[0],
97
99
  rest = _schema.slice(1);
98
100
  // configure the JSON language support with schemas and schema associations
99
- monaco.languages.json.jsonDefaults.setDiagnosticsOptions({
101
+ (_monaco$languages = monaco.languages) === null || _monaco$languages === void 0 || (_monaco$languages = _monaco$languages.json) === null || _monaco$languages === void 0 || _monaco$languages.jsonDefaults.setDiagnosticsOptions({
100
102
  validate: true,
101
103
  allowComments: false,
102
104
  schemas: [_objectSpread({
@@ -104,7 +106,47 @@ var CodeEditor = function CodeEditor(_ref) {
104
106
  }, main)].concat(_toConsumableArray(rest))
105
107
  });
106
108
  }
107
- }, [schema]);
109
+ if (language === "html" && handlebarSuggestions) {
110
+ var _disposeRef$current, _disposeRef$current$d;
111
+ (_disposeRef$current = disposeRef.current) === null || _disposeRef$current === void 0 || (_disposeRef$current$d = _disposeRef$current.dispose) === null || _disposeRef$current$d === void 0 || _disposeRef$current$d.call(_disposeRef$current);
112
+ disposeRef.current = monaco.languages.registerCompletionItemProvider("html", {
113
+ triggerCharacters: ["{{"],
114
+ provideCompletionItems: function provideCompletionItems(model, position) {
115
+ // find out if we are completing a property in the 'dependencies' object.
116
+ var textUntilPosition = model.getValueInRange({
117
+ startLineNumber: 1,
118
+ startColumn: 1,
119
+ endLineNumber: position.lineNumber,
120
+ endColumn: position.column
121
+ });
122
+ var match = textUntilPosition.match(/\{\{(.*)([^}])?$/);
123
+ if (!match) {
124
+ return {
125
+ suggestions: []
126
+ };
127
+ }
128
+ var word = model.getWordUntilPosition(position);
129
+ var range = {
130
+ startLineNumber: position.lineNumber,
131
+ endLineNumber: position.lineNumber,
132
+ startColumn: word.startColumn,
133
+ endColumn: word.endColumn
134
+ };
135
+ return {
136
+ suggestions: handlebarSuggestions.map(function (hs) {
137
+ return {
138
+ label: hs.text,
139
+ kind: monaco.languages.CompletionItemKind.Text,
140
+ documentation: hs.description,
141
+ insertText: hs.text,
142
+ range: range
143
+ };
144
+ })
145
+ };
146
+ }
147
+ });
148
+ }
149
+ }, [schema, language]);
108
150
  var resetSchema = react.useCallback(function (_, monaco) {
109
151
  monaco.languages.json.jsonDefaults.setDiagnosticsOptions({
110
152
  validate: true,
@@ -113,9 +155,11 @@ var CodeEditor = function CodeEditor(_ref) {
113
155
  });
114
156
  }, []);
115
157
  return /*#__PURE__*/jsxRuntime.jsx(core.Section, {
158
+ className: "relative",
116
159
  children: /*#__PURE__*/jsxRuntime.jsx("div", {
117
160
  ref: containerRef,
118
- className: classNames(CodeEditor_module.codeEditor, "area-content"),
161
+ "data-ref": "codeEditor",
162
+ className: classNames("fabric-codeEditor", "absolute inset-0"),
119
163
  children: /*#__PURE__*/jsxRuntime.jsx(MonacoEditor, {
120
164
  editorDidMount: function editorDidMount(e, m) {
121
165
  return [!!e && setEditorRef(e), !!m && setMonacoRef(m)];
@@ -126,7 +170,7 @@ var CodeEditor = function CodeEditor(_ref) {
126
170
  language: language,
127
171
  onChange: handleChange,
128
172
  theme: theme,
129
- className: CodeEditor_module.editor,
173
+ className: "fabric-editor",
130
174
  options: {
131
175
  readOnly: readOnly,
132
176
  minimap: {
@@ -7,9 +7,8 @@ import _slicedToArray from '@babel/runtime/helpers/slicedToArray';
7
7
  import { useIsDark, useResizeObserver, useDebounce, Section } from '@react-fabric/core';
8
8
  import { isString, isEmpty } from '@react-fabric/utilities';
9
9
  import classNames from 'classnames';
10
- import { useState, useLayoutEffect, useCallback, useDeferredValue, useMemo, useImperativeHandle } from 'react';
10
+ import { useState, useLayoutEffect, useCallback, useDeferredValue, useMemo, useImperativeHandle, useRef } from 'react';
11
11
  import MonacoEditor from 'react-monaco-editor';
12
- import classes from './CodeEditor.module.css';
13
12
  import { jsx } from 'react/jsx-runtime';
14
13
 
15
14
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
@@ -18,6 +17,7 @@ var CodeEditor = function CodeEditor(_ref) {
18
17
  var ref = _ref.ref,
19
18
  value = _ref.value,
20
19
  schema = _ref.schema,
20
+ handlebarSuggestions = _ref.handlebarSuggestions,
21
21
  required = _ref.required,
22
22
  readOnly = _ref.readOnly,
23
23
  minimal = _ref.minimal,
@@ -90,13 +90,15 @@ var CodeEditor = function CodeEditor(_ref) {
90
90
  }
91
91
  };
92
92
  }, [required, language]);
93
+ var disposeRef = useRef();
93
94
  var schemaUri = useCallback(function (monaco) {
94
- if (schema) {
95
+ if (language === "json" && schema) {
96
+ var _monaco$languages;
95
97
  var _schema = _toArray(schema),
96
98
  main = _schema[0],
97
99
  rest = _schema.slice(1);
98
100
  // configure the JSON language support with schemas and schema associations
99
- monaco.languages.json.jsonDefaults.setDiagnosticsOptions({
101
+ (_monaco$languages = monaco.languages) === null || _monaco$languages === void 0 || (_monaco$languages = _monaco$languages.json) === null || _monaco$languages === void 0 || _monaco$languages.jsonDefaults.setDiagnosticsOptions({
100
102
  validate: true,
101
103
  allowComments: false,
102
104
  schemas: [_objectSpread({
@@ -104,7 +106,47 @@ var CodeEditor = function CodeEditor(_ref) {
104
106
  }, main)].concat(_toConsumableArray(rest))
105
107
  });
106
108
  }
107
- }, [schema]);
109
+ if (language === "html" && handlebarSuggestions) {
110
+ var _disposeRef$current, _disposeRef$current$d;
111
+ (_disposeRef$current = disposeRef.current) === null || _disposeRef$current === void 0 || (_disposeRef$current$d = _disposeRef$current.dispose) === null || _disposeRef$current$d === void 0 || _disposeRef$current$d.call(_disposeRef$current);
112
+ disposeRef.current = monaco.languages.registerCompletionItemProvider("html", {
113
+ triggerCharacters: ["{{"],
114
+ provideCompletionItems: function provideCompletionItems(model, position) {
115
+ // find out if we are completing a property in the 'dependencies' object.
116
+ var textUntilPosition = model.getValueInRange({
117
+ startLineNumber: 1,
118
+ startColumn: 1,
119
+ endLineNumber: position.lineNumber,
120
+ endColumn: position.column
121
+ });
122
+ var match = textUntilPosition.match(/\{\{(.*)([^}])?$/);
123
+ if (!match) {
124
+ return {
125
+ suggestions: []
126
+ };
127
+ }
128
+ var word = model.getWordUntilPosition(position);
129
+ var range = {
130
+ startLineNumber: position.lineNumber,
131
+ endLineNumber: position.lineNumber,
132
+ startColumn: word.startColumn,
133
+ endColumn: word.endColumn
134
+ };
135
+ return {
136
+ suggestions: handlebarSuggestions.map(function (hs) {
137
+ return {
138
+ label: hs.text,
139
+ kind: monaco.languages.CompletionItemKind.Text,
140
+ documentation: hs.description,
141
+ insertText: hs.text,
142
+ range: range
143
+ };
144
+ })
145
+ };
146
+ }
147
+ });
148
+ }
149
+ }, [schema, language]);
108
150
  var resetSchema = useCallback(function (_, monaco) {
109
151
  monaco.languages.json.jsonDefaults.setDiagnosticsOptions({
110
152
  validate: true,
@@ -113,9 +155,11 @@ var CodeEditor = function CodeEditor(_ref) {
113
155
  });
114
156
  }, []);
115
157
  return /*#__PURE__*/jsx(Section, {
158
+ className: "relative",
116
159
  children: /*#__PURE__*/jsx("div", {
117
160
  ref: containerRef,
118
- className: classNames(classes.codeEditor, "area-content"),
161
+ "data-ref": "codeEditor",
162
+ className: classNames("fabric-codeEditor", "absolute inset-0"),
119
163
  children: /*#__PURE__*/jsx(MonacoEditor, {
120
164
  editorDidMount: function editorDidMount(e, m) {
121
165
  return [!!e && setEditorRef(e), !!m && setMonacoRef(m)];
@@ -126,7 +170,7 @@ var CodeEditor = function CodeEditor(_ref) {
126
170
  language: language,
127
171
  onChange: handleChange,
128
172
  theme: theme,
129
- className: classes.editor,
173
+ className: "fabric-editor",
130
174
  options: {
131
175
  readOnly: readOnly,
132
176
  minimap: {
@@ -3,16 +3,28 @@ export interface MonacoEditorRef {
3
3
  validate: () => boolean;
4
4
  getValue: () => string | undefined;
5
5
  }
6
- export interface EditorProps {
6
+ export interface BaseEditorProps {
7
7
  value?: string | AnyObject;
8
8
  required?: boolean;
9
9
  readOnly?: boolean;
10
10
  minimal?: boolean;
11
+ language?: "json" | "css" | "html" | "text" | "markdown";
12
+ onChange?: (value: string) => void;
13
+ }
14
+ type EditorProps = BaseEditorProps & ({
15
+ language: "json";
11
16
  schema?: Array<{
12
17
  uri: string;
13
18
  schema: KeyValue;
14
19
  }>;
15
- language?: "json" | "css" | "html" | "text" | "markdown";
16
- onChange?: (value: string) => void;
17
- }
18
- export declare const CodeEditor: ({ ref, value, schema, required, readOnly, minimal, onChange, language, }: EditorProps & RefProp<MonacoEditorRef>) => import("react/jsx-runtime").JSX.Element;
20
+ handlebarSuggestions?: never;
21
+ } | {
22
+ language: "html";
23
+ schema?: never;
24
+ handlebarSuggestions?: Array<{
25
+ text: string;
26
+ description?: string;
27
+ }>;
28
+ });
29
+ export declare const CodeEditor: ({ ref, value, schema, handlebarSuggestions, required, readOnly, minimal, onChange, language, }: EditorProps & RefProp<MonacoEditorRef>) => import("react/jsx-runtime").JSX.Element;
30
+ export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@react-fabric/monaco",
3
- "version": "1.0.0-beta.4",
3
+ "version": "1.0.0-beta.41",
4
4
  "description": "RUF: Monaco editor",
5
5
  "author": "Adarsh Pastakia <adarshpastakia@outlook.com>",
6
6
  "license": "MIT",
@@ -11,9 +11,11 @@
11
11
  "types": "dist/types/index.d.ts",
12
12
  "directories": {
13
13
  "src": "src",
14
+ "styles": "css",
14
15
  "test": "tests"
15
16
  },
16
17
  "files": [
18
+ "css",
17
19
  "src",
18
20
  "dist"
19
21
  ],
@@ -33,23 +35,21 @@
33
35
  "watch": "npm-run-all -p watch:rollup watch:dts"
34
36
  },
35
37
  "dependencies": {
36
- "@react-fabric/core": "^1.0.0-beta.4",
37
- "@react-fabric/utilities": "^1.0.0-beta.4",
38
+ "@react-fabric/core": "^1.0.0-beta.41",
39
+ "@react-fabric/utilities": "^1.0.0-beta.41",
38
40
  "classnames": "^2.5.1",
41
+ "monaco-editor": "^0.52.0",
39
42
  "react-monaco-editor": "^0.56.2"
40
43
  },
41
44
  "peerDependencies": {
42
45
  "i18next": "^23.15.1",
43
- "react": ">=18.0.0 <20.0.0",
44
- "react-dom": ">=18.0.0 <20.0.0",
46
+ "react": "^19.0.0",
47
+ "react-dom": "^19.0.0",
45
48
  "react-i18next": "^15.0.2"
46
49
  },
47
- "devDependencies": {
48
- "monaco-editor": "^0.52.0"
49
- },
50
50
  "engines": {
51
51
  "node": ">=18.12.0",
52
52
  "npm": ">=8.19.0"
53
53
  },
54
- "gitHead": "47b0aede19252a3a3ef8df75c08a21caabde8100"
54
+ "gitHead": "bc737416d3c6a217a6b8c47291c3975a22722d80"
55
55
  }
@@ -37,17 +37,17 @@ import {
37
37
  useImperativeHandle,
38
38
  useLayoutEffect,
39
39
  useMemo,
40
+ useRef,
40
41
  useState,
41
42
  } from "react";
42
43
  import MonacoEditor from "react-monaco-editor";
43
- import classes from "./CodeEditor.module.css";
44
44
 
45
45
  export interface MonacoEditorRef {
46
46
  validate: () => boolean;
47
47
  getValue: () => string | undefined;
48
48
  }
49
49
 
50
- export interface EditorProps {
50
+ export interface BaseEditorProps {
51
51
  value?: string | AnyObject;
52
52
 
53
53
  required?: boolean;
@@ -55,17 +55,30 @@ export interface EditorProps {
55
55
 
56
56
  minimal?: boolean;
57
57
 
58
- schema?: Array<{ uri: string; schema: KeyValue }>;
59
-
60
58
  language?: "json" | "css" | "html" | "text" | "markdown";
61
59
 
62
60
  onChange?: (value: string) => void;
63
61
  }
64
62
 
63
+ type EditorProps = BaseEditorProps &
64
+ (
65
+ | {
66
+ language: "json";
67
+ schema?: Array<{ uri: string; schema: KeyValue }>;
68
+ handlebarSuggestions?: never;
69
+ }
70
+ | {
71
+ language: "html";
72
+ schema?: never;
73
+ handlebarSuggestions?: Array<{ text: string; description?: string }>;
74
+ }
75
+ );
76
+
65
77
  export const CodeEditor = ({
66
78
  ref,
67
79
  value,
68
80
  schema,
81
+ handlebarSuggestions,
69
82
  required,
70
83
  readOnly,
71
84
  minimal,
@@ -140,12 +153,13 @@ export const CodeEditor = ({
140
153
  [required, language],
141
154
  );
142
155
 
156
+ const disposeRef = useRef<AnyObject>();
143
157
  const schemaUri = useCallback(
144
158
  (monaco: typeof monacoEditor) => {
145
- if (schema) {
159
+ if (language === "json" && schema) {
146
160
  const [main, ...rest] = schema;
147
161
  // configure the JSON language support with schemas and schema associations
148
- monaco.languages.json.jsonDefaults.setDiagnosticsOptions({
162
+ monaco.languages?.json?.jsonDefaults.setDiagnosticsOptions({
149
163
  validate: true,
150
164
  allowComments: false,
151
165
  schemas: [
@@ -157,8 +171,46 @@ export const CodeEditor = ({
157
171
  ],
158
172
  });
159
173
  }
174
+ if (language === "html" && handlebarSuggestions) {
175
+ disposeRef.current?.dispose?.();
176
+ disposeRef.current = monaco.languages.registerCompletionItemProvider(
177
+ "html",
178
+ {
179
+ triggerCharacters: ["{{"],
180
+ provideCompletionItems: function (model, position) {
181
+ // find out if we are completing a property in the 'dependencies' object.
182
+ const textUntilPosition = model.getValueInRange({
183
+ startLineNumber: 1,
184
+ startColumn: 1,
185
+ endLineNumber: position.lineNumber,
186
+ endColumn: position.column,
187
+ });
188
+ const match = textUntilPosition.match(/\{\{(.*)([^}])?$/);
189
+ if (!match) {
190
+ return { suggestions: [] };
191
+ }
192
+ const word = model.getWordUntilPosition(position);
193
+ const range = {
194
+ startLineNumber: position.lineNumber,
195
+ endLineNumber: position.lineNumber,
196
+ startColumn: word.startColumn,
197
+ endColumn: word.endColumn,
198
+ };
199
+ return {
200
+ suggestions: handlebarSuggestions.map((hs) => ({
201
+ label: hs.text,
202
+ kind: monaco.languages.CompletionItemKind.Text,
203
+ documentation: hs.description,
204
+ insertText: hs.text,
205
+ range,
206
+ })),
207
+ };
208
+ },
209
+ },
210
+ );
211
+ }
160
212
  },
161
- [schema],
213
+ [schema, language],
162
214
  );
163
215
 
164
216
  const resetSchema = useCallback((_: unknown, monaco: typeof monacoEditor) => {
@@ -170,10 +222,11 @@ export const CodeEditor = ({
170
222
  }, []);
171
223
 
172
224
  return (
173
- <Section>
225
+ <Section className="relative">
174
226
  <div
175
227
  ref={containerRef}
176
- className={classNames(classes.codeEditor, "area-content")}
228
+ data-ref="codeEditor"
229
+ className={classNames("fabric-codeEditor", "absolute inset-0")}
177
230
  >
178
231
  <MonacoEditor
179
232
  editorDidMount={(e, m) => [
@@ -186,7 +239,7 @@ export const CodeEditor = ({
186
239
  language={language}
187
240
  onChange={handleChange}
188
241
  theme={theme}
189
- className={classes.editor}
242
+ className={"fabric-editor"}
190
243
  options={{
191
244
  readOnly,
192
245
  minimap: {
@@ -1 +0,0 @@
1
- @layer util{.codeEditor{border:solid transparent;border-width:1px 1px 2px;direction:ltr;overflow:hidden;&:has(:global(.monaco-editor.focused)){border-color:theme(borderColor.primary.500)}.editor{&>:global(.monaco-editor){--vscode-menu-background:theme(colors.tint.50)!important;--vscode-menu-border:theme(borderColor.base)!important;--vscode-focusBorder:transparent!important;--vscode-menu-selectionBackground:color(from var(--primary) srgb r g b/80%)!important;--vscode-editor-background:var(--fabric-bg)!important;--vscode-editor-foreground:var(--fabric-text)!important;--vscode-breadcrumb-background:var(--fabric-bg)!important;--vscode-editorGutter-background:color(from theme(colors.tint.50) srgb r g g/50%)!important;--vscode-minimapSlider-background:color(from var(--tint) srgb r g b/20%)!important;--vscode-minimapSlider-hoverBackground:color(from var(--tint) srgb r g b/25%)!important;--vscode-minimapSlider-activeBackground:color(from var(--tint) srgb r g b/30%)!important;--vscode-input-border:var(--primary)!important;--vscode-editorStickyScroll-background:var(--fabric-bg)!important;--vscode-editorMarkerNavigation-background:var(--fabric-bg)!important;--vscode-editor-wordHighlightTextBackground:color(from theme(colors.accent.700) srgb r g b/20%)!important}& :global(.minimap-decorations-layer){background-color:color(from theme(colors.tint.50) srgb r g g/50%)!important}& :global(.folded-background){opacity:.5}& :global(.monaco-findInput) textarea{min-height:unset;resize:none}& span{padding:0}}}.editorTools{@apply bg-base}}
@@ -1 +0,0 @@
1
- @layer util{.codeEditor{border:solid transparent;border-width:1px 1px 2px;direction:ltr;overflow:hidden;&:has(:global(.monaco-editor.focused)){border-color:theme(borderColor.primary.500)}.editor{&>:global(.monaco-editor){--vscode-menu-background:theme(colors.tint.50)!important;--vscode-menu-border:theme(borderColor.base)!important;--vscode-focusBorder:transparent!important;--vscode-menu-selectionBackground:color(from var(--primary) srgb r g b/80%)!important;--vscode-editor-background:var(--fabric-bg)!important;--vscode-editor-foreground:var(--fabric-text)!important;--vscode-breadcrumb-background:var(--fabric-bg)!important;--vscode-editorGutter-background:color(from theme(colors.tint.50) srgb r g g/50%)!important;--vscode-minimapSlider-background:color(from var(--tint) srgb r g b/20%)!important;--vscode-minimapSlider-hoverBackground:color(from var(--tint) srgb r g b/25%)!important;--vscode-minimapSlider-activeBackground:color(from var(--tint) srgb r g b/30%)!important;--vscode-input-border:var(--primary)!important;--vscode-editorStickyScroll-background:var(--fabric-bg)!important;--vscode-editorMarkerNavigation-background:var(--fabric-bg)!important;--vscode-editor-wordHighlightTextBackground:color(from theme(colors.accent.700) srgb r g b/20%)!important}& :global(.minimap-decorations-layer){background-color:color(from theme(colors.tint.50) srgb r g g/50%)!important}& :global(.folded-background){opacity:.5}& :global(.monaco-findInput) textarea{min-height:unset;resize:none}& span{padding:0}}}.editorTools{@apply bg-base}}