@harnessio/yaml-editor 0.14.0 → 0.15.0-beta-1

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.
package/README.md CHANGED
@@ -1 +1,29 @@
1
1
  # Yaml Editor
2
+
3
+ ## Development
4
+
5
+ Run `pnpm dev` and `pnpm playground`
6
+
7
+ ## Playground
8
+
9
+ `pnpm playground`
10
+
11
+ ## Production
12
+
13
+ `pnpm build`
14
+
15
+ ## Setup
16
+
17
+ ```tsx
18
+ import { ILanguageFeaturesService } from 'monaco-editor/esm/vs/editor/common/services/languageFeatures.js'
19
+ import { OutlineModel } from 'monaco-editor/esm/vs/editor/contrib/documentSymbols/browser/outlineModel.js'
20
+ import { StandaloneServices } from 'monaco-editor/esm/vs/editor/standalone/browser/standaloneServices.js'
21
+
22
+ import { MonacoGlobals } from '@harnessio/yaml-editor'
23
+
24
+ MonacoGlobals.set({
25
+ ILanguageFeaturesService,
26
+ OutlineModel,
27
+ StandaloneServices
28
+ })
29
+ ```
@@ -2,6 +2,7 @@ import { EditorProps } from '@monaco-editor/react';
2
2
  import { BlameItem } from '../types/blame';
3
3
  import { ThemeDefinition } from '../types/themes';
4
4
 
5
+ import * as monaco from 'monaco-editor';
5
6
  export interface BlameEditorProps {
6
7
  code: string;
7
8
  language: string;
@@ -15,5 +16,6 @@ export interface BlameEditorProps {
15
16
  blameData: BlameItem[];
16
17
  showSeparators?: boolean;
17
18
  height?: EditorProps['height'];
19
+ options?: monaco.editor.IStandaloneEditorConstructionOptions;
18
20
  }
19
- export declare function BlameEditor({ code, language, themeConfig, lineNumbersPosition, blameData, showSeparators, theme: themeFromProps, height }: BlameEditorProps): JSX.Element;
21
+ export declare function BlameEditor({ code, language, themeConfig, lineNumbersPosition, blameData, showSeparators, theme: themeFromProps, height, options }: BlameEditorProps): JSX.Element;
@@ -16,9 +16,7 @@ export interface CodeEditorProps<_> {
16
16
  themes?: ThemeDefinition[];
17
17
  };
18
18
  theme?: string;
19
- options?: {
20
- readOnly?: boolean;
21
- };
19
+ options?: monaco.editor.IStandaloneEditorConstructionOptions;
22
20
  height?: EditorProps['height'];
23
21
  }
24
22
  export declare function CodeEditor<T>({ codeRevision, onCodeRevisionChange, language, themeConfig, options, theme: themeFromProps, height }: CodeEditorProps<T>): JSX.Element;
@@ -1,6 +1,7 @@
1
1
  import { EditorProps } from '@monaco-editor/react';
2
2
  import { ThemeDefinition } from '../types/themes';
3
3
 
4
+ import * as monaco from 'monaco-editor';
4
5
  export interface CodeRevision {
5
6
  code: string;
6
7
  revisionId?: number;
@@ -15,9 +16,7 @@ export interface DiffEditorProps<_> {
15
16
  themes?: ThemeDefinition[];
16
17
  };
17
18
  theme?: string;
18
- options?: {
19
- readOnly?: boolean;
20
- };
19
+ options?: monaco.editor.IStandaloneEditorConstructionOptions;
21
20
  height?: EditorProps['height'];
22
21
  }
23
22
  export declare function CodeDiffEditor<T>({ original, modified, language, themeConfig, options, theme: themeFromProps, height }: DiffEditorProps<T>): JSX.Element;
@@ -29,8 +29,6 @@ export interface YamlEditorProps<T> {
29
29
  className: string;
30
30
  revealInCenter?: boolean;
31
31
  };
32
- minimap?: boolean;
33
- folding?: boolean;
34
32
  animateOnUpdate?: boolean;
35
33
  onAnimateEnd?: () => void;
36
34
  }