@surrealdb/ui 1.0.22 → 1.0.24
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/ui.d.ts +40 -0
- package/dist/ui.js +1959 -1938
- package/dist/ui.js.map +1 -1
- package/package.json +1 -1
package/dist/ui.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { AlertProps } from '@mantine/core';
|
|
2
2
|
import { BoxProps } from '@mantine/core';
|
|
3
3
|
import { ButtonProps } from '@mantine/core';
|
|
4
|
+
import { Command } from '@codemirror/view';
|
|
4
5
|
import { EditorSelection } from '@codemirror/state';
|
|
5
6
|
import { EditorView } from '@codemirror/view';
|
|
6
7
|
import { ElementProps } from '@mantine/core';
|
|
@@ -28,6 +29,16 @@ import { StateField } from '@codemirror/state';
|
|
|
28
29
|
*/
|
|
29
30
|
export declare const acceptWithTab: KeyBinding;
|
|
30
31
|
|
|
32
|
+
/**
|
|
33
|
+
* Add cursor above the current line
|
|
34
|
+
*/
|
|
35
|
+
export declare const addCursorAbove: Command;
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* Add cursor below the current line
|
|
39
|
+
*/
|
|
40
|
+
export declare const addCursorBelow: Command;
|
|
41
|
+
|
|
31
42
|
/**
|
|
32
43
|
* A keymap used to add a cursor below and above the current position
|
|
33
44
|
*/
|
|
@@ -246,6 +257,14 @@ export declare function createHighlighter(colorScheme: ColorScheme): Highlighter
|
|
|
246
257
|
*/
|
|
247
258
|
export declare function createMarkdownComponents(): Record<string, React_2.ComponentType<Record<string, unknown>>>;
|
|
248
259
|
|
|
260
|
+
/**
|
|
261
|
+
* Create a new serialized editor state from a document string.
|
|
262
|
+
*
|
|
263
|
+
* @param doc The document string to create a serialized state from
|
|
264
|
+
* @returns The serialized state
|
|
265
|
+
*/
|
|
266
|
+
export declare function createSerializedState(doc: string): EditorStateSnapshot;
|
|
267
|
+
|
|
249
268
|
/**
|
|
250
269
|
* Create a style highlighter for the given color scheme and syntax theme
|
|
251
270
|
*/
|
|
@@ -1197,6 +1216,22 @@ export declare interface RenderMarkdownProps extends StackProps {
|
|
|
1197
1216
|
components?: Partial<Record<string, React_2.ComponentType<Record<string, unknown>> | string>>;
|
|
1198
1217
|
}
|
|
1199
1218
|
|
|
1219
|
+
/**
|
|
1220
|
+
* Resolve image URLs using an external resolver function
|
|
1221
|
+
* @param ast - The mdast root node
|
|
1222
|
+
* @param resolver - Function that takes a URL and returns a resolved URL or undefined
|
|
1223
|
+
* If undefined is returned, the original URL is kept (fallback)
|
|
1224
|
+
*/
|
|
1225
|
+
export declare function resolveImageSources(ast: Root, resolver: (url: string) => string | undefined): void;
|
|
1226
|
+
|
|
1227
|
+
/**
|
|
1228
|
+
* Set the contents of the editor
|
|
1229
|
+
*
|
|
1230
|
+
* @param editor The editor to set the text of
|
|
1231
|
+
* @param text The text to set the editor to
|
|
1232
|
+
*/
|
|
1233
|
+
export declare function setEditorText(editor: EditorView, text: string): void;
|
|
1234
|
+
|
|
1200
1235
|
export declare type SortDirection = "asc" | "desc" | undefined;
|
|
1201
1236
|
|
|
1202
1237
|
export declare interface SortHandle<T = DefaultSort> {
|
|
@@ -1216,6 +1251,11 @@ export declare type StateFields = {
|
|
|
1216
1251
|
[prop: string]: StateField<any>;
|
|
1217
1252
|
};
|
|
1218
1253
|
|
|
1254
|
+
/**
|
|
1255
|
+
* Suggest completions at the start of each line
|
|
1256
|
+
*/
|
|
1257
|
+
export declare const suggestCompletions: Command;
|
|
1258
|
+
|
|
1219
1259
|
export declare interface SummaryProps extends Omit<BoxProps, "component" | "children"> {
|
|
1220
1260
|
children: ReactNode;
|
|
1221
1261
|
}
|