@coldsmirk/inkstone-mongodb 0.30.0 → 0.31.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/dist/codemirror.d.ts +5 -6
- package/dist/monaco.d.ts +8 -9
- package/dist/react.d.ts +5 -6
- package/package.json +8 -9
package/dist/codemirror.d.ts
CHANGED
|
@@ -6,21 +6,20 @@ import { Extension } from "@codemirror/state";
|
|
|
6
6
|
/**
|
|
7
7
|
* Completion over a whole command document, off an assist built with the host's catalog.
|
|
8
8
|
*/
|
|
9
|
-
declare function mongodbCompletion(assist: MongodbAssist): CompletionSource;
|
|
9
|
+
export declare function mongodbCompletion(assist: MongodbAssist): CompletionSource;
|
|
10
10
|
/**
|
|
11
11
|
* Completion over a query document standing on its own — a one-line filter field, whose
|
|
12
12
|
* document is the filter and nothing else (`createMongodbFilterAssist`).
|
|
13
13
|
*/
|
|
14
|
-
declare function mongodbFilterCompletion(assist: MongodbFilterAssist): CompletionSource;
|
|
14
|
+
export declare function mongodbFilterCompletion(assist: MongodbFilterAssist): CompletionSource;
|
|
15
15
|
/**
|
|
16
16
|
* The command's card under the pointer, as `./monaco`'s hover provider gives it. The markdown
|
|
17
17
|
* is handed over as text: rendering it is the host's, since a tooltip's DOM is the host's
|
|
18
18
|
* design and this package ships none.
|
|
19
19
|
*/
|
|
20
|
-
declare function mongodbHover(assist: MongodbAssist, render: (markdown: string[]) => HTMLElement): Extension;
|
|
20
|
+
export declare function mongodbHover(assist: MongodbAssist, render: (markdown: string[]) => HTMLElement): Extension;
|
|
21
21
|
/**
|
|
22
22
|
* This package's markers as CodeMirror's diagnostics, the words beside each code the host's.
|
|
23
23
|
*/
|
|
24
|
-
declare function mongodbDiagnostics(markers: readonly MongodbMarker[], wording: (marker: MongodbMarker) => string): Diagnostic[];
|
|
25
|
-
//#endregion
|
|
26
|
-
export { mongodbCompletion, mongodbDiagnostics, mongodbFilterCompletion, mongodbHover };
|
|
24
|
+
export declare function mongodbDiagnostics(markers: readonly MongodbMarker[], wording: (marker: MongodbMarker) => string): Diagnostic[];
|
|
25
|
+
//#endregion
|
package/dist/monaco.d.ts
CHANGED
|
@@ -5,17 +5,17 @@ import { IDisposable, editor } from "monaco-editor";
|
|
|
5
5
|
/**
|
|
6
6
|
* The monaco module itself, as `onMount` hands it over.
|
|
7
7
|
*/
|
|
8
|
-
type MonacoModule = typeof monacoEditor;
|
|
8
|
+
export type MonacoModule = typeof monacoEditor;
|
|
9
9
|
/**
|
|
10
10
|
* The language id the editor registers a command document under.
|
|
11
11
|
*/
|
|
12
|
-
declare const MONGODB_LANGUAGE_ID = "mongodb";
|
|
12
|
+
export declare const MONGODB_LANGUAGE_ID = "mongodb";
|
|
13
13
|
/**
|
|
14
14
|
* Register the language — the id, its Monarch grammar and its bracket configuration — once per
|
|
15
15
|
* monaco module. Call it before the first model of the language is created (`beforeMount`).
|
|
16
16
|
*/
|
|
17
|
-
declare function defineMongodbLanguage(monaco: MonacoModule, languageId?: string): void;
|
|
18
|
-
interface MongodbLanguageHooks {
|
|
17
|
+
export declare function defineMongodbLanguage(monaco: MonacoModule, languageId?: string): void;
|
|
18
|
+
export interface MongodbLanguageHooks {
|
|
19
19
|
/**
|
|
20
20
|
* The assist as it stands right now — read per request rather than captured, so the host
|
|
21
21
|
* can swap it without touching Monaco's registry; null answers nothing.
|
|
@@ -26,15 +26,14 @@ interface MongodbLanguageHooks {
|
|
|
26
26
|
* Register completion and hover for one model. The disposables are the caller's to hold:
|
|
27
27
|
* Monaco's registry outlives any editor.
|
|
28
28
|
*/
|
|
29
|
-
declare function registerMongodbLanguage(monaco: MonacoModule, modelPath: string, hooks: MongodbLanguageHooks, languageId?: string): IDisposable[];
|
|
29
|
+
export declare function registerMongodbLanguage(monaco: MonacoModule, modelPath: string, hooks: MongodbLanguageHooks, languageId?: string): IDisposable[];
|
|
30
30
|
/**
|
|
31
31
|
* The owner Monaco files this package's markers under.
|
|
32
32
|
*/
|
|
33
|
-
declare const MONGODB_MARKER_OWNER = "inkstone-mongodb";
|
|
33
|
+
export declare const MONGODB_MARKER_OWNER = "inkstone-mongodb";
|
|
34
34
|
/**
|
|
35
35
|
* Put `markers` on the model as Monaco's own, replacing this package's last set; the words
|
|
36
36
|
* beside each code are the host's, handed in per code.
|
|
37
37
|
*/
|
|
38
|
-
declare function setMongodbMarkers(monaco: MonacoModule, model: editor.ITextModel, markers: readonly MongodbMarker[], wording: (marker: MongodbMarker) => string): void;
|
|
39
|
-
//#endregion
|
|
40
|
-
export { MONGODB_LANGUAGE_ID, MONGODB_MARKER_OWNER, MonacoModule, MongodbLanguageHooks, defineMongodbLanguage, registerMongodbLanguage, setMongodbMarkers };
|
|
38
|
+
export declare function setMongodbMarkers(monaco: MonacoModule, model: editor.ITextModel, markers: readonly MongodbMarker[], wording: (marker: MongodbMarker) => string): void;
|
|
39
|
+
//#endregion
|
package/dist/react.d.ts
CHANGED
|
@@ -7,7 +7,7 @@ import { editor } from "monaco-editor";
|
|
|
7
7
|
* What a host reaches into the editor for: inserting at the caret — a collection tree is an
|
|
8
8
|
* input device — and the focus.
|
|
9
9
|
*/
|
|
10
|
-
interface MongodbEditorHandle {
|
|
10
|
+
export interface MongodbEditorHandle {
|
|
11
11
|
insert: (text: string) => void;
|
|
12
12
|
focus: () => void;
|
|
13
13
|
}
|
|
@@ -16,12 +16,12 @@ interface MongodbEditorHandle {
|
|
|
16
16
|
* what a run sends. `from` and `to` are the selection's bounds and equal where nothing is
|
|
17
17
|
* selected; the text rides with them because the two must belong to the same instant.
|
|
18
18
|
*/
|
|
19
|
-
interface MongodbCaret {
|
|
19
|
+
export interface MongodbCaret {
|
|
20
20
|
text: string;
|
|
21
21
|
from: number;
|
|
22
22
|
to: number;
|
|
23
23
|
}
|
|
24
|
-
interface MongodbEditorProps {
|
|
24
|
+
export interface MongodbEditorProps {
|
|
25
25
|
value: string;
|
|
26
26
|
onChange: (value: string) => void;
|
|
27
27
|
/**
|
|
@@ -95,6 +95,5 @@ interface MongodbEditorProps {
|
|
|
95
95
|
* shell's spelling, the run key handing the caret over, completion and hover wired through
|
|
96
96
|
* `registerMongodbLanguage`, and the markers refreshed on every change.
|
|
97
97
|
*/
|
|
98
|
-
declare function MongodbEditor({ value, onChange, dark, height, fontSize, locale, placeholder, ariaLabel, languageId, loading, failure, onRun, runActionLabel, onCaret, onReady, onMount, assist, markerWording, options }: MongodbEditorProps): import("react").JSX.Element;
|
|
99
|
-
//#endregion
|
|
100
|
-
export { MongodbCaret, MongodbEditor, MongodbEditorHandle, MongodbEditorProps };
|
|
98
|
+
export declare function MongodbEditor({ value, onChange, dark, height, fontSize, locale, placeholder, ariaLabel, languageId, loading, failure, onRun, runActionLabel, onCaret, onReady, onMount, assist, markerWording, options }: MongodbEditorProps): import("react").JSX.Element;
|
|
99
|
+
//#endregion
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@coldsmirk/inkstone-mongodb",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.31.0",
|
|
4
4
|
"description": "MongoDB command editing intelligence for Monaco and CodeMirror: a command document in the shell's own spelling, the database commands and their fields, query, update and aggregation operators by context — a bare filter document included — collection completion, markers, and a drop-in React command editor.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"mongodb",
|
|
@@ -50,21 +50,20 @@
|
|
|
50
50
|
"devDependencies": {
|
|
51
51
|
"@codemirror/autocomplete": "^6.20.3",
|
|
52
52
|
"@codemirror/lint": "^6.9.7",
|
|
53
|
-
"@codemirror/state": "^6.6
|
|
54
|
-
"@codemirror/view": "^6.43.
|
|
55
|
-
"monaco-editor": "^0.
|
|
56
|
-
"react": "^19.
|
|
57
|
-
"react
|
|
58
|
-
"@coldsmirk/inkstone-react": "^0.30.0"
|
|
53
|
+
"@codemirror/state": "^6.7.6",
|
|
54
|
+
"@codemirror/view": "^6.43.14",
|
|
55
|
+
"monaco-editor": "^0.57.0",
|
|
56
|
+
"react": "^19.3.0",
|
|
57
|
+
"@coldsmirk/inkstone-react": "^0.31.0"
|
|
59
58
|
},
|
|
60
59
|
"peerDependencies": {
|
|
61
60
|
"@codemirror/autocomplete": "^6.20.3",
|
|
62
61
|
"@codemirror/lint": "^6.9.7",
|
|
63
62
|
"@codemirror/state": "^6.6.0",
|
|
64
63
|
"@codemirror/view": "^6.43.0",
|
|
65
|
-
"monaco-editor": "^0.
|
|
64
|
+
"monaco-editor": "^0.57.0",
|
|
66
65
|
"react": ">=19",
|
|
67
|
-
"@coldsmirk/inkstone-react": "^0.
|
|
66
|
+
"@coldsmirk/inkstone-react": "^0.31.0"
|
|
68
67
|
},
|
|
69
68
|
"peerDependenciesMeta": {
|
|
70
69
|
"@codemirror/autocomplete": {
|