@coldsmirk/inkstone-elasticsearch 0.29.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.
@@ -10,23 +10,22 @@ import { Extension } from "@codemirror/state";
10
10
  * places `./monaco` names as trigger characters, and the engine half answers nothing where
11
11
  * the caret is nowhere in particular.
12
12
  */
13
- declare function elasticsearchCompletion(assist: ElasticsearchAssist): CompletionSource;
13
+ export declare function elasticsearchCompletion(assist: ElasticsearchAssist): CompletionSource;
14
14
  /**
15
15
  * Completion over a body standing on its own — a one-line filter field, whose document is a
16
16
  * `query` object and nothing else (`createElasticsearchBodyAssist`).
17
17
  */
18
- declare function elasticsearchBodyCompletion(assist: ElasticsearchBodyAssist): CompletionSource;
18
+ export declare function elasticsearchBodyCompletion(assist: ElasticsearchBodyAssist): CompletionSource;
19
19
  /**
20
20
  * The endpoint's card under the pointer, as `./monaco`'s hover provider gives it.
21
21
  *
22
22
  * The markdown is handed over as text: rendering it is the host's, since a tooltip's DOM is
23
23
  * the host's design and this package ships none.
24
24
  */
25
- declare function elasticsearchHover(assist: ElasticsearchAssist, render: (markdown: string[]) => HTMLElement): Extension;
25
+ export declare function elasticsearchHover(assist: ElasticsearchAssist, render: (markdown: string[]) => HTMLElement): Extension;
26
26
  /**
27
27
  * This package's markers as CodeMirror's diagnostics, the words beside each code the host's,
28
28
  * as `setElasticsearchMarkers` takes them.
29
29
  */
30
- declare function elasticsearchDiagnostics(markers: readonly ElasticsearchMarker[], wording: (marker: ElasticsearchMarker) => string): Diagnostic[];
31
- //#endregion
32
- export { elasticsearchBodyCompletion, elasticsearchCompletion, elasticsearchDiagnostics, elasticsearchHover };
30
+ export declare function elasticsearchDiagnostics(markers: readonly ElasticsearchMarker[], wording: (marker: ElasticsearchMarker) => string): Diagnostic[];
31
+ //#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 request under.
11
11
  */
12
- declare const ELASTICSEARCH_LANGUAGE_ID = "elasticsearch";
12
+ export declare const ELASTICSEARCH_LANGUAGE_ID = "elasticsearch";
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 defineElasticsearchLanguage(monaco: MonacoModule, languageId?: string): void;
18
- interface ElasticsearchLanguageHooks {
17
+ export declare function defineElasticsearchLanguage(monaco: MonacoModule, languageId?: string): void;
18
+ export interface ElasticsearchLanguageHooks {
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 ElasticsearchLanguageHooks {
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 registerElasticsearchLanguage(monaco: MonacoModule, modelPath: string, hooks: ElasticsearchLanguageHooks, languageId?: string): IDisposable[];
29
+ export declare function registerElasticsearchLanguage(monaco: MonacoModule, modelPath: string, hooks: ElasticsearchLanguageHooks, languageId?: string): IDisposable[];
30
30
  /**
31
31
  * The owner Monaco files this package's markers under.
32
32
  */
33
- declare const ELASTICSEARCH_MARKER_OWNER = "inkstone-elasticsearch";
33
+ export declare const ELASTICSEARCH_MARKER_OWNER = "inkstone-elasticsearch";
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 setElasticsearchMarkers(monaco: MonacoModule, model: editor.ITextModel, markers: readonly ElasticsearchMarker[], wording: (marker: ElasticsearchMarker) => string): void;
39
- //#endregion
40
- export { ELASTICSEARCH_LANGUAGE_ID, ELASTICSEARCH_MARKER_OWNER, ElasticsearchLanguageHooks, MonacoModule, defineElasticsearchLanguage, registerElasticsearchLanguage, setElasticsearchMarkers };
38
+ export declare function setElasticsearchMarkers(monaco: MonacoModule, model: editor.ITextModel, markers: readonly ElasticsearchMarker[], wording: (marker: ElasticsearchMarker) => 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 — an index tree is an input
8
8
  * device — and the focus.
9
9
  */
10
- interface ElasticsearchEditorHandle {
10
+ export interface ElasticsearchEditorHandle {
11
11
  insert: (text: string) => void;
12
12
  focus: () => void;
13
13
  }
@@ -16,12 +16,12 @@ interface ElasticsearchEditorHandle {
16
16
  * the request a run sends. `from` and `to` are the selection's bounds and equal where nothing
17
17
  * is selected; the text rides with them because the two must belong to the same instant.
18
18
  */
19
- interface ElasticsearchCaret {
19
+ export interface ElasticsearchCaret {
20
20
  text: string;
21
21
  from: number;
22
22
  to: number;
23
23
  }
24
- interface ElasticsearchEditorProps {
24
+ export interface ElasticsearchEditorProps {
25
25
  value: string;
26
26
  onChange: (value: string) => void;
27
27
  /**
@@ -95,6 +95,5 @@ interface ElasticsearchEditorProps {
95
95
  * in the console's spelling, the run key handing the caret over, completion and hover wired
96
96
  * through `registerElasticsearchLanguage`, and the markers refreshed on every change.
97
97
  */
98
- declare function ElasticsearchEditor({ value, onChange, dark, height, fontSize, locale, placeholder, ariaLabel, languageId, loading, failure, onRun, runActionLabel, onCaret, onReady, onMount, assist, markerWording, options }: ElasticsearchEditorProps): import("react").JSX.Element;
99
- //#endregion
100
- export { ElasticsearchCaret, ElasticsearchEditor, ElasticsearchEditorHandle, ElasticsearchEditorProps };
98
+ export declare function ElasticsearchEditor({ value, onChange, dark, height, fontSize, locale, placeholder, ariaLabel, languageId, loading, failure, onRun, runActionLabel, onCaret, onReady, onMount, assist, markerWording, options }: ElasticsearchEditorProps): import("react").JSX.Element;
99
+ //#endregion
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@coldsmirk/inkstone-elasticsearch",
3
- "version": "0.29.0",
3
+ "version": "0.31.0",
4
4
  "description": "Elasticsearch request editing intelligence for Monaco and CodeMirror: the console spelling (a method and a path, the body after), endpoint and index completion, body keys by context — a bare `_search` body included — request markers, and a drop-in React request editor.",
5
5
  "keywords": [
6
6
  "elasticsearch",
@@ -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.0",
54
- "@codemirror/view": "^6.43.0",
55
- "monaco-editor": "^0.56.0",
56
- "react": "^19.2.8",
57
- "react-dom": "^19.2.8",
58
- "@coldsmirk/inkstone-react": "^0.29.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.56.0",
64
+ "monaco-editor": "^0.57.0",
66
65
  "react": ">=19",
67
- "@coldsmirk/inkstone-react": "^0.29.0"
66
+ "@coldsmirk/inkstone-react": "^0.31.0"
68
67
  },
69
68
  "peerDependenciesMeta": {
70
69
  "@codemirror/autocomplete": {