modern-monaco 0.1.2 → 0.1.4
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 +1 -1
- package/dist/workspace.js +2 -2
- package/package.json +1 -1
- package/types/index.d.ts +2 -2
- package/types/lsp.d.ts +1 -1
- package/types/ssr.d.ts +2 -2
- package/types/workspace.d.ts +1 -5
package/README.md
CHANGED
package/dist/workspace.js
CHANGED
|
@@ -19,9 +19,9 @@ var Workspace = class {
|
|
|
19
19
|
_viewState;
|
|
20
20
|
_entryFile;
|
|
21
21
|
constructor(options = {}) {
|
|
22
|
-
const { name = "default", browserHistory, initialFiles, entryFile,
|
|
22
|
+
const { name = "default", browserHistory, initialFiles, entryFile, customFS } = options;
|
|
23
23
|
this._monaco = promiseWithResolvers();
|
|
24
|
-
this._fs =
|
|
24
|
+
this._fs = customFS ?? new FS("modern-monaco-workspace(" + name + ")");
|
|
25
25
|
this._viewState = new WorkspaceStateStorage("modern-monaco-state(" + name + ")");
|
|
26
26
|
this._entryFile = entryFile;
|
|
27
27
|
if (initialFiles) {
|
package/package.json
CHANGED
package/types/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type monacoNS from "./monaco.d.ts";
|
|
1
|
+
import type * as monacoNS from "./monaco.d.ts";
|
|
2
2
|
import type { LSPConfig } from "./lsp.d.ts";
|
|
3
3
|
import type { TextmateGrammarName, TextmateThemeName } from "./textmate.d.ts";
|
|
4
4
|
import type { ErrorNotFound, FileSystem, Workspace } from "./workspace.d.ts";
|
|
@@ -67,4 +67,4 @@ export const errors: {
|
|
|
67
67
|
NotFound: ErrorNotFound;
|
|
68
68
|
};
|
|
69
69
|
|
|
70
|
-
export {
|
|
70
|
+
export { FileSystem, Workspace };
|
package/types/lsp.d.ts
CHANGED
package/types/ssr.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import type monacoNS from "./monaco.d.ts";
|
|
1
|
+
import type * as monacoNS from "./monaco.d.ts";
|
|
2
2
|
import type { ShikiInitOptions } from "./index.d.ts";
|
|
3
3
|
|
|
4
4
|
export type RenderInput = string | { filename: string; code: string; version?: number };
|
|
5
5
|
|
|
6
|
-
export interface RenderOptions extends monacoNS.editor.IStandaloneEditorConstructionOptions {
|
|
6
|
+
export interface RenderOptions extends Omit<monacoNS.editor.IStandaloneEditorConstructionOptions, "model" | "value"> {
|
|
7
7
|
fontDigitWidth?: number;
|
|
8
8
|
userAgent?: string;
|
|
9
9
|
shiki?: ShikiInitOptions;
|
package/types/workspace.d.ts
CHANGED
|
@@ -10,12 +10,8 @@ export interface WorkspaceInit {
|
|
|
10
10
|
entryFile?: string;
|
|
11
11
|
/** whether to use browser history for navigation. */
|
|
12
12
|
browserHistory?: boolean | { basePath: string };
|
|
13
|
-
/** whether to use a server for the workspace. */
|
|
14
|
-
server?: {
|
|
15
|
-
url: string | URL;
|
|
16
|
-
};
|
|
17
13
|
/** custom filesystem implementation to override the default IndexedDB filesystem */
|
|
18
|
-
|
|
14
|
+
customFS?: FileSystem;
|
|
19
15
|
}
|
|
20
16
|
|
|
21
17
|
export class Workspace {
|