@coldsmirk/inkstone-sql 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/index.d.ts CHANGED
@@ -51,13 +51,13 @@ interface SqlFunctions {
51
51
  */
52
52
  find: (name: string) => Promise<BenchFunction | null>;
53
53
  }
54
- declare function createSqlFunctions(kind: SqlKind, schema: SqlSchema): SqlFunctions;
54
+ export declare function createSqlFunctions(kind: SqlKind, schema: SqlSchema): SqlFunctions;
55
55
  //#endregion
56
56
  //#region src/completion.d.ts
57
57
  /**
58
58
  * Completion for one system's data source, over the schema the tree already reads.
59
59
  */
60
- declare function createSqlCompletion(kind: SqlKind, schema: SqlSchema, functions: SqlFunctions): SqlAssist["complete"];
60
+ export declare function createSqlCompletion(kind: SqlKind, schema: SqlSchema, functions: SqlFunctions): SqlAssist["complete"];
61
61
  //#endregion
62
62
  //#region src/dialect.d.ts
63
63
  /**
@@ -84,19 +84,19 @@ interface SqlDialect {
84
84
  keywords: string[];
85
85
  functions: SqlFunction[];
86
86
  }
87
- declare const SQL_DIALECTS: Record<SqlKind, SqlDialect>;
87
+ export declare const SQL_DIALECTS: Record<SqlKind, SqlDialect>;
88
88
  /**
89
89
  * A signature's parameters as `[start, end)` offsets into the signature itself — offsets rather
90
90
  * than substrings so a call that repeats a parameter name still marks the right one. Everything
91
91
  * between the first `(` and the last `)`, split on the commas at that depth.
92
92
  */
93
- declare function signatureParameters(signature: string): Array<[number, number]>;
93
+ export declare function signatureParameters(signature: string): Array<[number, number]>;
94
94
  //#endregion
95
95
  //#region src/format.d.ts
96
- declare function createSqlFormat(kind: SqlKind): SqlAssist["format"];
96
+ export declare function createSqlFormat(kind: SqlKind): SqlAssist["format"];
97
97
  //#endregion
98
98
  //#region src/hover.d.ts
99
- declare function createSqlHover(kind: SqlKind, schema: SqlSchema, functions: SqlFunctions): SqlAssist["hover"];
99
+ export declare function createSqlHover(kind: SqlKind, schema: SqlSchema, functions: SqlFunctions): SqlAssist["hover"];
100
100
  //#endregion
101
101
  //#region src/joins.d.ts
102
102
  /**
@@ -126,7 +126,7 @@ type JoinReason = "named-foreign-key" | "shared-key";
126
126
  * The equalities worth offering when `target` is joined onto tables the statement already reads.
127
127
  * The named foreign key leads, in both directions; the plainer shared-key reading follows.
128
128
  */
129
- declare function joinGuesses(kind: SqlKind, target: SqlSource, others: SqlSource[]): JoinGuess[];
129
+ export declare function joinGuesses(kind: SqlKind, target: SqlSource, others: SqlSource[]): JoinGuess[];
130
130
  //#endregion
131
131
  //#region src/markers.d.ts
132
132
  /**
@@ -188,7 +188,7 @@ interface StatementMarkers {
188
188
  */
189
189
  refusal: MarkerRefusal | null;
190
190
  }
191
- declare function statementMarkers(statement: string, kind: SqlKind): StatementMarkers;
191
+ export declare function statementMarkers(statement: string, kind: SqlKind): StatementMarkers;
192
192
  //#endregion
193
193
  //#region src/noise.d.ts
194
194
  /**
@@ -225,12 +225,12 @@ interface BlankedSql {
225
225
  * renderings the reader needs (see [BlankedSql]). One pass, mirroring the sidecar scanner's own
226
226
  * loop over its mutually exclusive lexical modes.
227
227
  */
228
- declare function blankNoise(text: string, kind: SqlKind): BlankedSql;
228
+ export declare function blankNoise(text: string, kind: SqlKind): BlankedSql;
229
229
  /**
230
230
  * Whether the caret sits inside a string or a comment, where the bench has nothing to say. A
231
231
  * quoted name is not one: it is a name the operator is writing, and the reader is about names.
232
232
  */
233
- declare function insideNoise(spans: NoiseSpan[], cursor: number): boolean;
233
+ export declare function insideNoise(spans: NoiseSpan[], cursor: number): boolean;
234
234
  //#endregion
235
235
  //#region src/origin.d.ts
236
236
  /**
@@ -247,7 +247,7 @@ interface StatementOrigin {
247
247
  schema: string;
248
248
  table: string;
249
249
  }
250
- declare function statementOrigin(statement: string): StatementOrigin | null;
250
+ export declare function statementOrigin(statement: string): StatementOrigin | null;
251
251
  //#endregion
252
252
  //#region src/params.d.ts
253
253
  /**
@@ -282,7 +282,7 @@ interface ParamValue {
282
282
  * it is also the *shared default* a missing row falls back to — one consumer writing through it
283
283
  * would rewrite every untouched row on the page.
284
284
  */
285
- declare const TEXT_PARAM: ParamValue;
285
+ export declare const TEXT_PARAM: ParamValue;
286
286
  /**
287
287
  * Whether a statement asks for values and the operator has entered none of them. This is the
288
288
  * host's cue to ask rather than to send: binding a row of empty strings is never what was meant,
@@ -290,7 +290,7 @@ declare const TEXT_PARAM: ParamValue;
290
290
  *
291
291
  * A statement that binds nothing is never untouched — there is nothing to touch.
292
292
  */
293
- declare function untouched(rows: Record<string, ParamValue>): boolean;
293
+ export declare function untouched(rows: Record<string, ParamValue>): boolean;
294
294
  /**
295
295
  * Why one row could not bind.
296
296
  *
@@ -312,7 +312,7 @@ type Bound = {
312
312
  ok: false;
313
313
  refusal: BindRefusal;
314
314
  };
315
- declare function boundValue(param: ParamValue): Bound;
315
+ export declare function boundValue(param: ParamValue): Bound;
316
316
  /**
317
317
  * Every row bound, in the shape the marker form chose: positional values keep slot order, named
318
318
  * values keep their keys. `undefined` is a statement that binds nothing.
@@ -330,7 +330,7 @@ type BoundParams = {
330
330
  key: string;
331
331
  refusal: BindRefusal;
332
332
  };
333
- declare function boundParams(markers: StatementMarkers, rows: Record<string, ParamValue>): BoundParams;
333
+ export declare function boundParams(markers: StatementMarkers, rows: Record<string, ParamValue>): BoundParams;
334
334
  //#endregion
335
335
  //#region src/signature.d.ts
336
336
  /**
@@ -339,26 +339,26 @@ declare function boundParams(markers: StatementMarkers, rows: Record<string, Par
339
339
  * own routines raise their parameters exactly as the vendor's do. The argument is counted at the
340
340
  * caret's own paren depth, so a call nested in another's arguments still marks its own.
341
341
  */
342
- declare function createSqlSignature(kind: SqlKind, functions: SqlFunctions): SqlAssist["signature"];
342
+ export declare function createSqlSignature(kind: SqlKind, functions: SqlFunctions): SqlAssist["signature"];
343
343
  //#endregion
344
344
  //#region src/spelling.d.ts
345
345
  /**
346
346
  * One catalog name as the statement must spell it.
347
347
  */
348
- declare function spellIdentifier(kind: SqlKind, name: string): string;
348
+ export declare function spellIdentifier(kind: SqlKind, name: string): string;
349
349
  /**
350
350
  * A routine name as a call must spell it. Reservation does not delimit here: a reserved word in
351
351
  * call position is legal in every kind — `json_table(...)`, `left(...)` are the vendors' own
352
352
  * builtins — and delimiting one would un-call it; only a lexically irregular name needs the
353
353
  * delimiter.
354
354
  */
355
- declare function spellCallable(kind: SqlKind, name: string): string;
355
+ export declare function spellCallable(kind: SqlKind, name: string): string;
356
356
  /**
357
357
  * The qualifier a generated expression writes before a source's columns: the alias exactly as
358
358
  * the operator wrote it — re-spelling the unquoted form would be lossy — or, where the ref has
359
359
  * no alias, the catalog's table name in the kind's own spelling.
360
360
  */
361
- declare function spellQualifier(kind: SqlKind, source: {
361
+ export declare function spellQualifier(kind: SqlKind, source: {
362
362
  aliasWritten: string;
363
363
  table: {
364
364
  name: string;
@@ -368,9 +368,9 @@ declare function spellQualifier(kind: SqlKind, source: {
368
368
  * A table's qualified name as the statement must spell it. Kinds whose catalog reports no schema
369
369
  * (or whose objects sit in the session's own) get the bare name.
370
370
  */
371
- declare function spellQualifiedName(kind: SqlKind, table: {
371
+ export declare function spellQualifiedName(kind: SqlKind, table: {
372
372
  schema: string;
373
373
  name: string;
374
374
  }): string;
375
375
  //#endregion
376
- export { type BenchFunction, type BindRefusal, type BlankedSql, type Bound, type BoundParams, type CallRead, type CatalogColumn, type CatalogFunction, type CatalogTable, type IdentifierRead, type JoinGuess, type JoinReason, type MarkerForm, type MarkerRefusal, type NoiseSpan, type ParamType, type ParamValue, type Runnable, SQL_DIALECTS, type SqlAssist, type SqlCatalog, type SqlCompletionCandidate, type SqlDialect, type SqlFunction, type SqlFunctions, type SqlHoverCard, type SqlKind, type SqlScalar, type SqlSchema, type SqlSignatureHelp, type SqlSource, type StatementContext, type StatementMarkers, type StatementOrigin, type StatementRead, TEXT_PARAM, type TableRef, blankNoise, boundParams, boundValue, createSqlAssist, createSqlCompletion, createSqlFormat, createSqlFunctions, createSqlHover, createSqlSchema, createSqlSignature, insideNoise, joinGuesses, qualifiedName, readCall, readIdentifier, readStatement, runnableStatement, signatureParameters, spellCallable, spellIdentifier, spellQualifiedName, spellQualifier, statementMarkers, statementOrigin, untouched };
376
+ export { type BenchFunction, type BindRefusal, type BlankedSql, type Bound, type BoundParams, type CallRead, type CatalogColumn, type CatalogFunction, type CatalogTable, type IdentifierRead, type JoinGuess, type JoinReason, type MarkerForm, type MarkerRefusal, type NoiseSpan, type ParamType, type ParamValue, type Runnable, type SqlAssist, type SqlCatalog, type SqlCompletionCandidate, type SqlDialect, type SqlFunction, type SqlFunctions, type SqlHoverCard, type SqlKind, type SqlScalar, type SqlSchema, type SqlSignatureHelp, type SqlSource, type StatementContext, type StatementMarkers, type StatementOrigin, type StatementRead, type TableRef, createSqlAssist, createSqlSchema, qualifiedName, readCall, readIdentifier, readStatement, runnableStatement };
package/dist/monaco.d.ts CHANGED
@@ -6,8 +6,8 @@ import { IDisposable } from "monaco-editor";
6
6
  * The monaco module itself, as `onMount` hands it over — typed structurally so this entry needs
7
7
  * no dependency beyond `monaco-editor`'s own types.
8
8
  */
9
- type MonacoModule = typeof monacoEditor;
10
- interface SqlLanguageHooks {
9
+ export type MonacoModule = typeof monacoEditor;
10
+ export interface SqlLanguageHooks {
11
11
  /**
12
12
  * The assist as it stands right now — read per request rather than captured, so switching
13
13
  * connections swaps the schema behind every feature without touching Monaco's registry.
@@ -25,6 +25,5 @@ interface SqlLanguageHooks {
25
25
  * answer for a model that no longer exists. `languageId` is the language the model is registered
26
26
  * under — the stock `"sql"` unless the host runs a dialect id of its own.
27
27
  */
28
- declare function registerSqlLanguage(monaco: MonacoModule, modelPath: string, hooks: SqlLanguageHooks, languageId?: string): IDisposable[];
29
- //#endregion
30
- export { MonacoModule, SqlLanguageHooks, registerSqlLanguage };
28
+ export declare function registerSqlLanguage(monaco: MonacoModule, modelPath: string, hooks: SqlLanguageHooks, languageId?: string): IDisposable[];
29
+ //#endregion
package/dist/monaco.js CHANGED
@@ -1,2 +1 @@
1
- import { t as registerSqlLanguage } from "./monaco-DEMsSuzD.js";
2
- export { registerSqlLanguage };
1
+ export { t as registerSqlLanguage } from "./monaco-DEMsSuzD.js";
package/dist/react.d.ts CHANGED
@@ -8,7 +8,7 @@ import { editor } from "monaco-editor";
8
8
  * input device, not a browser), and reformatting from a toolbar — which goes through Monaco's own
9
9
  * formatting action, so the button and `Shift+Alt+F` are one path and one undo.
10
10
  */
11
- interface SqlEditorHandle {
11
+ export interface SqlEditorHandle {
12
12
  insert: (text: string) => void;
13
13
  format: () => void;
14
14
  }
@@ -21,12 +21,12 @@ interface SqlEditorHandle {
21
21
  * The controlled `value` is one React render behind the keystroke that triggered a run, and a
22
22
  * console must run the statement the operator is looking at.
23
23
  */
24
- interface SqlCaret {
24
+ export interface SqlCaret {
25
25
  text: string;
26
26
  from: number;
27
27
  to: number;
28
28
  }
29
- interface SqlEditorProps {
29
+ export interface SqlEditorProps {
30
30
  value: string;
31
31
  onChange: (value: string) => void;
32
32
  /**
@@ -138,6 +138,5 @@ interface SqlEditorProps {
138
138
  * The editor draws no chrome of its own: it is a band of its host's surface, and the separation
139
139
  * is the host's hairline rules — a border here would dress a pane up as a form input.
140
140
  */
141
- declare function SqlEditor({ value, onChange, dark, height, fontSize, locale, placeholder, ariaLabel, languageId, loading, failure, onRun, runActionLabel, onCaret, highlight, highlightClassName, onFormatRefused, onReady, onMount, options, assist }: SqlEditorProps): import("react").JSX.Element;
142
- //#endregion
143
- export { SqlCaret, SqlEditor, SqlEditorHandle, SqlEditorProps };
141
+ export declare function SqlEditor({ value, onChange, dark, height, fontSize, locale, placeholder, ariaLabel, languageId, loading, failure, onRun, runActionLabel, onCaret, highlight, highlightClassName, onFormatRefused, onReady, onMount, options, assist }: SqlEditorProps): import("react").JSX.Element;
142
+ //#endregion
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@coldsmirk/inkstone-sql",
3
- "version": "0.30.0",
3
+ "version": "0.31.0",
4
4
  "description": "Schema-aware SQL editing intelligence for Monaco: lexical statement reading under per-dialect noise profiles, catalog-driven completion/hover/signature help, unified-placeholder awareness, formatting, and a drop-in React SQL editor.",
5
5
  "keywords": [
6
6
  "sql",
@@ -43,18 +43,17 @@
43
43
  "dist"
44
44
  ],
45
45
  "dependencies": {
46
- "sql-formatter": "^15.8.2"
46
+ "sql-formatter": "^15.9.0"
47
47
  },
48
48
  "devDependencies": {
49
- "monaco-editor": "^0.56.0",
50
- "react": "^19.2.8",
51
- "react-dom": "^19.2.8",
52
- "@coldsmirk/inkstone-react": "^0.30.0"
49
+ "monaco-editor": "^0.57.0",
50
+ "react": "^19.3.0",
51
+ "@coldsmirk/inkstone-react": "^0.31.0"
53
52
  },
54
53
  "peerDependencies": {
55
- "monaco-editor": "^0.56.0",
54
+ "monaco-editor": "^0.57.0",
56
55
  "react": ">=19",
57
- "@coldsmirk/inkstone-react": "^0.30.0"
56
+ "@coldsmirk/inkstone-react": "^0.31.0"
58
57
  },
59
58
  "peerDependenciesMeta": {
60
59
  "@coldsmirk/inkstone-react": {