@harnessio/yaml-editor 0.16.0-react18.alpha.4 → 0.17.0
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 +28 -0
- package/dist/components/CodeEditor.d.ts +2 -1
- package/dist/index.js +404 -365
- package/dist/index.js.map +1 -1
- package/dist/monacoeditorwork/yaml.worker.bundle.js +235 -237
- package/package.json +10 -10
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
|
+
```
|
|
@@ -18,5 +18,6 @@ export interface CodeEditorProps<_> {
|
|
|
18
18
|
theme?: string;
|
|
19
19
|
options?: monaco.editor.IStandaloneEditorConstructionOptions;
|
|
20
20
|
height?: EditorProps['height'];
|
|
21
|
+
className?: string;
|
|
21
22
|
}
|
|
22
|
-
export declare function CodeEditor<T>({ codeRevision, onCodeRevisionChange, language, themeConfig, options, theme: themeFromProps, height }: CodeEditorProps<T>): JSX.Element;
|
|
23
|
+
export declare function CodeEditor<T>({ codeRevision, onCodeRevisionChange, language, themeConfig, options, theme: themeFromProps, height, className }: CodeEditorProps<T>): JSX.Element;
|