vanilla-jsoneditor-cn 3.12.2
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/CHANGELOG.md +2163 -0
- package/LICENSE.md +7 -0
- package/README.md +271 -0
- package/SECURITY.md +5 -0
- package/index.d.ts +1261 -0
- package/index.js +2 -0
- package/index.js.map +1 -0
- package/package.json +66 -0
- package/standalone.d.ts +1261 -0
- package/standalone.js +45 -0
- package/standalone.js.map +1 -0
- package/themes/defaults.scss +202 -0
- package/themes/jse-theme-dark.css +115 -0
package/standalone.d.ts
ADDED
|
@@ -0,0 +1,1261 @@
|
|
|
1
|
+
import * as svelte from 'svelte';
|
|
2
|
+
import { SvelteComponent, Component, mount } from 'svelte';
|
|
3
|
+
import * as immutable_json_patch from 'immutable-json-patch';
|
|
4
|
+
import { JSONPath, JSONPatchDocument } from 'immutable-json-patch';
|
|
5
|
+
import { IconDefinition } from '@fortawesome/free-solid-svg-icons';
|
|
6
|
+
import { Action } from 'svelte/action';
|
|
7
|
+
import Ajv, { Options } from 'ajv';
|
|
8
|
+
|
|
9
|
+
type TextContent = {
|
|
10
|
+
text: string;
|
|
11
|
+
};
|
|
12
|
+
type JSONContent = {
|
|
13
|
+
json: unknown;
|
|
14
|
+
};
|
|
15
|
+
type Content = JSONContent | TextContent;
|
|
16
|
+
interface JSONParser {
|
|
17
|
+
parse(text: string, reviver?: ((this: unknown, key: string, value: unknown) => unknown) | null): unknown;
|
|
18
|
+
stringify(value: unknown, replacer?: ((this: unknown, key: string, value: unknown) => unknown) | Array<number | string> | null, space?: string | number): string | undefined;
|
|
19
|
+
}
|
|
20
|
+
interface JSONPathParser {
|
|
21
|
+
parse: (pathStr: string) => JSONPath;
|
|
22
|
+
stringify: (path: JSONPath) => string;
|
|
23
|
+
}
|
|
24
|
+
interface VisibleSection {
|
|
25
|
+
start: number;
|
|
26
|
+
end: number;
|
|
27
|
+
}
|
|
28
|
+
declare enum Mode {
|
|
29
|
+
text = "text",
|
|
30
|
+
tree = "tree",
|
|
31
|
+
table = "table"
|
|
32
|
+
}
|
|
33
|
+
declare enum SelectionType {
|
|
34
|
+
after = "after",
|
|
35
|
+
inside = "inside",
|
|
36
|
+
key = "key",
|
|
37
|
+
value = "value",
|
|
38
|
+
multi = "multi",
|
|
39
|
+
text = "text"
|
|
40
|
+
}
|
|
41
|
+
declare enum CaretType {
|
|
42
|
+
after = "after",
|
|
43
|
+
key = "key",
|
|
44
|
+
value = "value",
|
|
45
|
+
inside = "inside"
|
|
46
|
+
}
|
|
47
|
+
interface PathOption {
|
|
48
|
+
value: JSONPath;
|
|
49
|
+
label: string;
|
|
50
|
+
}
|
|
51
|
+
interface NumberOption {
|
|
52
|
+
value: 1 | -1;
|
|
53
|
+
label: string;
|
|
54
|
+
}
|
|
55
|
+
interface CaretPosition {
|
|
56
|
+
path: JSONPath;
|
|
57
|
+
type: CaretType;
|
|
58
|
+
}
|
|
59
|
+
interface ObjectRecursiveState {
|
|
60
|
+
type: 'object';
|
|
61
|
+
properties: Record<string, RecursiveState | undefined>;
|
|
62
|
+
}
|
|
63
|
+
interface ArrayRecursiveState {
|
|
64
|
+
type: 'array';
|
|
65
|
+
items: Array<RecursiveState | undefined>;
|
|
66
|
+
}
|
|
67
|
+
interface ValueRecursiveState {
|
|
68
|
+
type: 'value';
|
|
69
|
+
}
|
|
70
|
+
type RecursiveState = ObjectRecursiveState | ArrayRecursiveState | ValueRecursiveState;
|
|
71
|
+
interface RecursiveStateFactory {
|
|
72
|
+
createObjectDocumentState: () => ObjectRecursiveState;
|
|
73
|
+
createArrayDocumentState: () => ArrayRecursiveState;
|
|
74
|
+
createValueDocumentState: () => ValueRecursiveState;
|
|
75
|
+
}
|
|
76
|
+
interface ObjectDocumentState extends ObjectRecursiveState {
|
|
77
|
+
type: 'object';
|
|
78
|
+
properties: Record<string, DocumentState | undefined>;
|
|
79
|
+
expanded: boolean;
|
|
80
|
+
}
|
|
81
|
+
interface ArrayDocumentState extends ArrayRecursiveState {
|
|
82
|
+
type: 'array';
|
|
83
|
+
items: Array<DocumentState | undefined>;
|
|
84
|
+
expanded: boolean;
|
|
85
|
+
visibleSections: VisibleSection[];
|
|
86
|
+
}
|
|
87
|
+
interface ValueDocumentState extends ValueRecursiveState {
|
|
88
|
+
type: 'value';
|
|
89
|
+
enforceString?: boolean;
|
|
90
|
+
}
|
|
91
|
+
type DocumentState = ObjectDocumentState | ArrayDocumentState | ValueDocumentState;
|
|
92
|
+
interface ObjectSearchResults extends ObjectRecursiveState {
|
|
93
|
+
type: 'object';
|
|
94
|
+
properties: Record<string, SearchResults | undefined>;
|
|
95
|
+
searchResults?: ExtendedSearchResultItem[];
|
|
96
|
+
}
|
|
97
|
+
interface ArraySearchResults extends ArrayRecursiveState {
|
|
98
|
+
type: 'array';
|
|
99
|
+
items: Array<SearchResults | undefined>;
|
|
100
|
+
searchResults?: ExtendedSearchResultItem[];
|
|
101
|
+
}
|
|
102
|
+
interface ValueSearchResults extends ValueRecursiveState {
|
|
103
|
+
type: 'value';
|
|
104
|
+
searchResults?: ExtendedSearchResultItem[];
|
|
105
|
+
}
|
|
106
|
+
type SearchResults = ObjectSearchResults | ArraySearchResults | ValueSearchResults;
|
|
107
|
+
type WithSearchResults = SearchResults & {
|
|
108
|
+
searchResults: ExtendedSearchResultItem[];
|
|
109
|
+
};
|
|
110
|
+
interface ObjectValidationErrors extends ObjectRecursiveState {
|
|
111
|
+
type: 'object';
|
|
112
|
+
properties: Record<string, ValidationErrors | undefined>;
|
|
113
|
+
validationError?: NestedValidationError;
|
|
114
|
+
}
|
|
115
|
+
interface ArrayValidationErrors extends ArrayRecursiveState {
|
|
116
|
+
type: 'array';
|
|
117
|
+
items: Array<ValidationErrors | undefined>;
|
|
118
|
+
validationError?: NestedValidationError;
|
|
119
|
+
}
|
|
120
|
+
interface ValueValidationErrors extends ValueRecursiveState {
|
|
121
|
+
type: 'value';
|
|
122
|
+
validationError?: NestedValidationError;
|
|
123
|
+
}
|
|
124
|
+
type ValidationErrors = ObjectValidationErrors | ArrayValidationErrors | ValueValidationErrors;
|
|
125
|
+
interface JSONPatchResult {
|
|
126
|
+
json: unknown;
|
|
127
|
+
previousJson: unknown;
|
|
128
|
+
undo: JSONPatchDocument;
|
|
129
|
+
redo: JSONPatchDocument;
|
|
130
|
+
}
|
|
131
|
+
type AfterPatchCallback = (patchedJson: unknown, patchedState: DocumentState | undefined, patchedSelection: JSONSelection | undefined) => {
|
|
132
|
+
json?: unknown;
|
|
133
|
+
state?: DocumentState | undefined;
|
|
134
|
+
selection?: JSONSelection | undefined;
|
|
135
|
+
sortedColumn?: SortedColumn | undefined;
|
|
136
|
+
} | undefined;
|
|
137
|
+
interface MultiSelection {
|
|
138
|
+
type: SelectionType.multi;
|
|
139
|
+
anchorPath: JSONPath;
|
|
140
|
+
focusPath: JSONPath;
|
|
141
|
+
}
|
|
142
|
+
interface AfterSelection {
|
|
143
|
+
type: SelectionType.after;
|
|
144
|
+
path: JSONPath;
|
|
145
|
+
}
|
|
146
|
+
interface InsideSelection {
|
|
147
|
+
type: SelectionType.inside;
|
|
148
|
+
path: JSONPath;
|
|
149
|
+
}
|
|
150
|
+
interface KeySelection {
|
|
151
|
+
type: SelectionType.key;
|
|
152
|
+
path: JSONPath;
|
|
153
|
+
}
|
|
154
|
+
interface EditKeySelection extends KeySelection {
|
|
155
|
+
type: SelectionType.key;
|
|
156
|
+
path: JSONPath;
|
|
157
|
+
edit: true;
|
|
158
|
+
initialValue?: string;
|
|
159
|
+
}
|
|
160
|
+
type ValueSelection = {
|
|
161
|
+
type: SelectionType.value;
|
|
162
|
+
path: JSONPath;
|
|
163
|
+
};
|
|
164
|
+
interface EditValueSelection extends ValueSelection {
|
|
165
|
+
type: SelectionType.value;
|
|
166
|
+
path: JSONPath;
|
|
167
|
+
edit: true;
|
|
168
|
+
initialValue?: string;
|
|
169
|
+
}
|
|
170
|
+
type JSONSelection = MultiSelection | AfterSelection | InsideSelection | KeySelection | EditKeySelection | ValueSelection | EditValueSelection;
|
|
171
|
+
interface TextSelection {
|
|
172
|
+
type: SelectionType.text;
|
|
173
|
+
ranges: {
|
|
174
|
+
anchor: number;
|
|
175
|
+
head: number;
|
|
176
|
+
}[];
|
|
177
|
+
main: number;
|
|
178
|
+
}
|
|
179
|
+
type JSONEditorSelection = JSONSelection | TextSelection;
|
|
180
|
+
interface ScrollToOptions {
|
|
181
|
+
scrollToWhenVisible?: boolean;
|
|
182
|
+
element?: Element;
|
|
183
|
+
}
|
|
184
|
+
type ClipboardValues = Array<{
|
|
185
|
+
key: string;
|
|
186
|
+
value: unknown;
|
|
187
|
+
}>;
|
|
188
|
+
interface MenuButton {
|
|
189
|
+
type: 'button';
|
|
190
|
+
onClick: (event: MouseEvent) => void;
|
|
191
|
+
icon?: IconDefinition;
|
|
192
|
+
text?: string;
|
|
193
|
+
title?: string;
|
|
194
|
+
className?: string;
|
|
195
|
+
disabled?: boolean;
|
|
196
|
+
}
|
|
197
|
+
interface MenuDropDownButton {
|
|
198
|
+
type: 'dropdown-button';
|
|
199
|
+
main: MenuButton;
|
|
200
|
+
width?: string;
|
|
201
|
+
items: MenuButton[];
|
|
202
|
+
}
|
|
203
|
+
interface MenuLabel {
|
|
204
|
+
type: 'label';
|
|
205
|
+
text: string;
|
|
206
|
+
}
|
|
207
|
+
interface MenuSeparator {
|
|
208
|
+
type: 'separator';
|
|
209
|
+
}
|
|
210
|
+
interface MenuSpace {
|
|
211
|
+
type: 'space';
|
|
212
|
+
}
|
|
213
|
+
type MenuItem = MenuButton | MenuSeparator | MenuSpace;
|
|
214
|
+
interface ContextMenuColumn {
|
|
215
|
+
type: 'column';
|
|
216
|
+
items: Array<MenuButton | MenuDropDownButton | MenuLabel | MenuSeparator>;
|
|
217
|
+
}
|
|
218
|
+
interface ContextMenuRow {
|
|
219
|
+
type: 'row';
|
|
220
|
+
items: Array<MenuButton | MenuDropDownButton | ContextMenuColumn>;
|
|
221
|
+
}
|
|
222
|
+
type ContextMenuItem = MenuButton | MenuDropDownButton | MenuSeparator | ContextMenuRow;
|
|
223
|
+
interface MessageAction {
|
|
224
|
+
text: string;
|
|
225
|
+
title: string;
|
|
226
|
+
icon?: IconDefinition;
|
|
227
|
+
onClick?: () => void;
|
|
228
|
+
onMouseDown?: () => void;
|
|
229
|
+
disabled?: boolean;
|
|
230
|
+
}
|
|
231
|
+
declare enum ValidationSeverity {
|
|
232
|
+
info = "info",
|
|
233
|
+
warning = "warning",
|
|
234
|
+
error = "error"
|
|
235
|
+
}
|
|
236
|
+
interface ValidationError {
|
|
237
|
+
path: JSONPath;
|
|
238
|
+
message: string;
|
|
239
|
+
severity: ValidationSeverity;
|
|
240
|
+
}
|
|
241
|
+
interface NestedValidationError extends ValidationError {
|
|
242
|
+
isChildError?: boolean;
|
|
243
|
+
}
|
|
244
|
+
type Validator = (json: unknown) => ValidationError[];
|
|
245
|
+
interface ParseError {
|
|
246
|
+
position: number | undefined;
|
|
247
|
+
line: number | undefined;
|
|
248
|
+
column: number | undefined;
|
|
249
|
+
message: string;
|
|
250
|
+
}
|
|
251
|
+
interface ContentParseError {
|
|
252
|
+
parseError: ParseError;
|
|
253
|
+
isRepairable: boolean;
|
|
254
|
+
}
|
|
255
|
+
interface ContentValidationErrors {
|
|
256
|
+
validationErrors: ValidationError[];
|
|
257
|
+
}
|
|
258
|
+
type ContentErrors = ContentParseError | ContentValidationErrors;
|
|
259
|
+
interface RichValidationError extends ValidationError {
|
|
260
|
+
line: number | undefined;
|
|
261
|
+
column: number | undefined;
|
|
262
|
+
from: number | undefined;
|
|
263
|
+
to: number | undefined;
|
|
264
|
+
actions: Array<{
|
|
265
|
+
name: string;
|
|
266
|
+
apply: () => void;
|
|
267
|
+
}> | undefined;
|
|
268
|
+
}
|
|
269
|
+
interface TextLocation {
|
|
270
|
+
path: JSONPath;
|
|
271
|
+
line: number;
|
|
272
|
+
column: number;
|
|
273
|
+
from: number;
|
|
274
|
+
to: number;
|
|
275
|
+
}
|
|
276
|
+
interface Section {
|
|
277
|
+
start: number;
|
|
278
|
+
end: number;
|
|
279
|
+
}
|
|
280
|
+
interface QueryLanguage {
|
|
281
|
+
id: string;
|
|
282
|
+
name: string;
|
|
283
|
+
description: string;
|
|
284
|
+
createQuery: (json: unknown, queryOptions: QueryLanguageOptions) => string;
|
|
285
|
+
executeQuery: (json: unknown, query: string, parser: JSONParser) => unknown;
|
|
286
|
+
}
|
|
287
|
+
interface QueryLanguageOptions {
|
|
288
|
+
filter?: {
|
|
289
|
+
path?: JSONPath;
|
|
290
|
+
relation?: '==' | '!=' | '<' | '<=' | '>' | '>=';
|
|
291
|
+
value?: string;
|
|
292
|
+
};
|
|
293
|
+
sort?: {
|
|
294
|
+
path?: JSONPath;
|
|
295
|
+
direction?: 'asc' | 'desc';
|
|
296
|
+
};
|
|
297
|
+
projection?: {
|
|
298
|
+
paths?: JSONPath[];
|
|
299
|
+
};
|
|
300
|
+
}
|
|
301
|
+
type OnChangeQueryLanguage = (queryLanguageId: string) => void;
|
|
302
|
+
interface OnChangeStatus {
|
|
303
|
+
contentErrors: ContentErrors | undefined;
|
|
304
|
+
patchResult: JSONPatchResult | undefined;
|
|
305
|
+
}
|
|
306
|
+
type OnChange = ((content: Content, previousContent: Content, status: OnChangeStatus) => void) | undefined;
|
|
307
|
+
type OnJSONSelect = (selection: JSONSelection) => void;
|
|
308
|
+
type OnSelect = (selection: JSONEditorSelection | undefined) => void;
|
|
309
|
+
type OnUndo = (item: HistoryItem | undefined) => void;
|
|
310
|
+
type OnRedo = (item: HistoryItem | undefined) => void;
|
|
311
|
+
type OnPatch = (operations: JSONPatchDocument, afterPatch?: AfterPatchCallback) => JSONPatchResult;
|
|
312
|
+
type OnChangeText = (updatedText: string, afterPatch?: AfterPatchCallback) => void;
|
|
313
|
+
type OnSort = (params: {
|
|
314
|
+
operations: JSONPatchDocument;
|
|
315
|
+
rootPath: JSONPath;
|
|
316
|
+
itemPath: JSONPath;
|
|
317
|
+
direction: 1 | -1;
|
|
318
|
+
}) => void;
|
|
319
|
+
type OnFind = (findAndReplace: boolean) => void;
|
|
320
|
+
type OnPaste = (pastedText: string) => void;
|
|
321
|
+
type OnPasteJson = (pastedJson: PastedJson) => void;
|
|
322
|
+
type OnExpand = (relativePath: JSONPath) => boolean;
|
|
323
|
+
type OnRenderValue = (props: RenderValueProps) => RenderValueComponentDescription[];
|
|
324
|
+
type OnClassName = (path: JSONPath, value: unknown) => string | undefined;
|
|
325
|
+
type OnChangeMode = (mode: Mode) => void;
|
|
326
|
+
type OnContextMenu = (contextMenuProps: AbsolutePopupOptions) => void;
|
|
327
|
+
type RenderMenuContext = {
|
|
328
|
+
mode: Mode;
|
|
329
|
+
modal: boolean;
|
|
330
|
+
readOnly: boolean;
|
|
331
|
+
};
|
|
332
|
+
type OnRenderMenu = (items: MenuItem[], context: RenderMenuContext) => MenuItem[] | undefined;
|
|
333
|
+
type OnRenderMenuInternal = (items: MenuItem[]) => MenuItem[] | undefined;
|
|
334
|
+
type RenderContextMenuContext = RenderMenuContext & {
|
|
335
|
+
selection: JSONEditorSelection | undefined;
|
|
336
|
+
};
|
|
337
|
+
type OnRenderContextMenu = (items: ContextMenuItem[], context: RenderContextMenuContext) => ContextMenuItem[] | false | undefined;
|
|
338
|
+
type OnRenderContextMenuInternal = (items: ContextMenuItem[]) => ContextMenuItem[] | false | undefined;
|
|
339
|
+
type OnError = (error: Error) => void;
|
|
340
|
+
type OnFocus = () => void;
|
|
341
|
+
type OnBlur = () => void;
|
|
342
|
+
type OnSortModal = (props: SortModalCallback) => void;
|
|
343
|
+
type OnTransformModal = (props: TransformModalCallback) => void;
|
|
344
|
+
type OnJSONEditorModal = (props: JSONEditorModalCallback) => void;
|
|
345
|
+
type FindNextInside = (path: JSONPath) => JSONSelection | undefined;
|
|
346
|
+
interface SearchResultDetails {
|
|
347
|
+
items: ExtendedSearchResultItem[];
|
|
348
|
+
activeItem: ExtendedSearchResultItem | undefined;
|
|
349
|
+
activeIndex: number | -1;
|
|
350
|
+
}
|
|
351
|
+
declare enum SearchField {
|
|
352
|
+
key = "key",
|
|
353
|
+
value = "value"
|
|
354
|
+
}
|
|
355
|
+
interface SearchOptions {
|
|
356
|
+
maxResults?: number;
|
|
357
|
+
columns?: JSONPath[];
|
|
358
|
+
}
|
|
359
|
+
interface SearchResultItem {
|
|
360
|
+
path: JSONPath;
|
|
361
|
+
field: SearchField;
|
|
362
|
+
fieldIndex: number;
|
|
363
|
+
start: number;
|
|
364
|
+
end: number;
|
|
365
|
+
}
|
|
366
|
+
interface ExtendedSearchResultItem extends SearchResultItem {
|
|
367
|
+
resultIndex: number;
|
|
368
|
+
active: boolean;
|
|
369
|
+
}
|
|
370
|
+
type EscapeValue = (value: unknown) => string;
|
|
371
|
+
type UnescapeValue = (escapedValue: string) => string;
|
|
372
|
+
interface ValueNormalization {
|
|
373
|
+
escapeValue: EscapeValue;
|
|
374
|
+
unescapeValue: UnescapeValue;
|
|
375
|
+
}
|
|
376
|
+
type PastedJson = {
|
|
377
|
+
path: JSONPath;
|
|
378
|
+
contents: unknown;
|
|
379
|
+
onPasteAsJson: () => void;
|
|
380
|
+
};
|
|
381
|
+
interface DragInsideProps {
|
|
382
|
+
json: unknown;
|
|
383
|
+
selection: JSONSelection;
|
|
384
|
+
deltaY: number;
|
|
385
|
+
items: Array<{
|
|
386
|
+
path: JSONPath;
|
|
387
|
+
height: number;
|
|
388
|
+
}>;
|
|
389
|
+
}
|
|
390
|
+
type DragInsideAction = {
|
|
391
|
+
beforePath: JSONPath;
|
|
392
|
+
offset: number;
|
|
393
|
+
} | {
|
|
394
|
+
append: true;
|
|
395
|
+
offset: number;
|
|
396
|
+
};
|
|
397
|
+
interface RenderedItem {
|
|
398
|
+
path: JSONPath;
|
|
399
|
+
height: number;
|
|
400
|
+
}
|
|
401
|
+
interface TreeHistoryItem {
|
|
402
|
+
type: 'tree';
|
|
403
|
+
undo: {
|
|
404
|
+
patch: JSONPatchDocument | undefined;
|
|
405
|
+
json: unknown | undefined;
|
|
406
|
+
text: string | undefined;
|
|
407
|
+
documentState: DocumentState | undefined;
|
|
408
|
+
selection: JSONSelection | undefined;
|
|
409
|
+
sortedColumn: SortedColumn | undefined;
|
|
410
|
+
textIsRepaired: boolean;
|
|
411
|
+
};
|
|
412
|
+
redo: {
|
|
413
|
+
patch: JSONPatchDocument | undefined;
|
|
414
|
+
json: unknown | undefined;
|
|
415
|
+
text: string | undefined;
|
|
416
|
+
documentState: DocumentState | undefined;
|
|
417
|
+
selection: JSONSelection | undefined;
|
|
418
|
+
sortedColumn: SortedColumn | undefined;
|
|
419
|
+
textIsRepaired: boolean;
|
|
420
|
+
};
|
|
421
|
+
}
|
|
422
|
+
type TextChanges = Array<number | [number, ...string[]]>;
|
|
423
|
+
interface TextHistoryItem {
|
|
424
|
+
type: 'text';
|
|
425
|
+
undo: {
|
|
426
|
+
changes: TextChanges;
|
|
427
|
+
selection: TextSelection;
|
|
428
|
+
};
|
|
429
|
+
redo: {
|
|
430
|
+
changes: TextChanges;
|
|
431
|
+
selection: TextSelection;
|
|
432
|
+
};
|
|
433
|
+
}
|
|
434
|
+
interface ModeHistoryItem {
|
|
435
|
+
type: 'mode';
|
|
436
|
+
undo: {
|
|
437
|
+
mode: Mode;
|
|
438
|
+
selection: undefined;
|
|
439
|
+
};
|
|
440
|
+
redo: {
|
|
441
|
+
mode: Mode;
|
|
442
|
+
selection: undefined;
|
|
443
|
+
};
|
|
444
|
+
}
|
|
445
|
+
type HistoryItem = TreeHistoryItem | TextHistoryItem | ModeHistoryItem;
|
|
446
|
+
interface HistoryInstance<T> {
|
|
447
|
+
get: () => History<T>;
|
|
448
|
+
}
|
|
449
|
+
interface History<T> {
|
|
450
|
+
canUndo: boolean;
|
|
451
|
+
canRedo: boolean;
|
|
452
|
+
items: () => T[];
|
|
453
|
+
add: (item: T) => void;
|
|
454
|
+
clear: () => void;
|
|
455
|
+
undo: () => T | undefined;
|
|
456
|
+
redo: () => T | undefined;
|
|
457
|
+
}
|
|
458
|
+
type ConvertType = 'value' | 'object' | 'array';
|
|
459
|
+
type InsertType = ConvertType | 'structure';
|
|
460
|
+
interface PopupEntry {
|
|
461
|
+
id: number;
|
|
462
|
+
component: typeof SvelteComponent<Record<string, unknown>>;
|
|
463
|
+
props: Record<string, unknown>;
|
|
464
|
+
options: AbsolutePopupOptions;
|
|
465
|
+
}
|
|
466
|
+
interface AbsolutePopupOptions {
|
|
467
|
+
anchor?: Element;
|
|
468
|
+
position?: 'top' | 'left';
|
|
469
|
+
left?: number;
|
|
470
|
+
top?: number;
|
|
471
|
+
width?: number;
|
|
472
|
+
height?: number;
|
|
473
|
+
offsetTop?: number;
|
|
474
|
+
offsetLeft?: number;
|
|
475
|
+
showTip?: boolean;
|
|
476
|
+
closeOnOuterClick?: boolean;
|
|
477
|
+
onClose?: () => void;
|
|
478
|
+
}
|
|
479
|
+
interface AbsolutePopupContext {
|
|
480
|
+
openAbsolutePopup: (component: typeof SvelteComponent<Record<string, unknown>>, props: Record<string, unknown>, options: AbsolutePopupOptions) => number;
|
|
481
|
+
closeAbsolutePopup: (popupId: number | undefined) => void;
|
|
482
|
+
}
|
|
483
|
+
interface JSONEditorPropsOptional {
|
|
484
|
+
content?: Content;
|
|
485
|
+
selection?: JSONEditorSelection;
|
|
486
|
+
readOnly?: boolean;
|
|
487
|
+
indentation?: number | string;
|
|
488
|
+
tabSize?: number;
|
|
489
|
+
truncateTextSize?: number;
|
|
490
|
+
mode?: Mode;
|
|
491
|
+
mainMenuBar?: boolean;
|
|
492
|
+
navigationBar?: boolean;
|
|
493
|
+
statusBar?: boolean;
|
|
494
|
+
askToFormat?: boolean;
|
|
495
|
+
escapeControlCharacters?: boolean;
|
|
496
|
+
escapeUnicodeCharacters?: boolean;
|
|
497
|
+
flattenColumns?: boolean;
|
|
498
|
+
parser?: JSONParser;
|
|
499
|
+
validator?: Validator | undefined;
|
|
500
|
+
validationParser?: JSONParser;
|
|
501
|
+
pathParser?: JSONPathParser;
|
|
502
|
+
maxDocumentSizeTextMode?: number;
|
|
503
|
+
queryLanguages?: QueryLanguage[];
|
|
504
|
+
queryLanguageId?: string;
|
|
505
|
+
onChangeQueryLanguage?: OnChangeQueryLanguage;
|
|
506
|
+
onChange?: OnChange;
|
|
507
|
+
onRenderValue?: OnRenderValue;
|
|
508
|
+
onClassName?: OnClassName;
|
|
509
|
+
onRenderMenu?: OnRenderMenu;
|
|
510
|
+
onRenderContextMenu?: OnRenderContextMenu;
|
|
511
|
+
onChangeMode?: OnChangeMode;
|
|
512
|
+
onSelect?: OnSelect;
|
|
513
|
+
onError?: OnError;
|
|
514
|
+
onFocus?: OnFocus;
|
|
515
|
+
onBlur?: OnBlur;
|
|
516
|
+
}
|
|
517
|
+
interface JSONEditorModalProps {
|
|
518
|
+
content: Content;
|
|
519
|
+
path: JSONPath;
|
|
520
|
+
onPatch: OnPatch;
|
|
521
|
+
readOnly: boolean;
|
|
522
|
+
indentation: number | string;
|
|
523
|
+
tabSize: number;
|
|
524
|
+
truncateTextSize: number;
|
|
525
|
+
mainMenuBar: boolean;
|
|
526
|
+
navigationBar: boolean;
|
|
527
|
+
statusBar: boolean;
|
|
528
|
+
askToFormat: boolean;
|
|
529
|
+
escapeControlCharacters: boolean;
|
|
530
|
+
escapeUnicodeCharacters: boolean;
|
|
531
|
+
maxDocumentSizeTextMode: number;
|
|
532
|
+
flattenColumns: boolean;
|
|
533
|
+
parser: JSONParser;
|
|
534
|
+
validator: Validator | undefined;
|
|
535
|
+
validationParser: JSONParser;
|
|
536
|
+
pathParser: JSONPathParser;
|
|
537
|
+
onRenderValue: OnRenderValue;
|
|
538
|
+
onClassName: OnClassName;
|
|
539
|
+
onRenderMenu: OnRenderMenu;
|
|
540
|
+
onRenderContextMenu: OnRenderContextMenu;
|
|
541
|
+
onSortModal: (props: SortModalCallback) => void;
|
|
542
|
+
onTransformModal: (props: TransformModalCallback) => void;
|
|
543
|
+
onClose: () => void;
|
|
544
|
+
}
|
|
545
|
+
interface JSONEditorContext {
|
|
546
|
+
mode: Mode;
|
|
547
|
+
readOnly: boolean;
|
|
548
|
+
truncateTextSize: number;
|
|
549
|
+
parser: JSONParser;
|
|
550
|
+
normalization: ValueNormalization;
|
|
551
|
+
getJson: () => unknown | undefined;
|
|
552
|
+
getDocumentState: () => DocumentState | undefined;
|
|
553
|
+
findElement: (path: JSONPath) => Element | undefined;
|
|
554
|
+
findNextInside: FindNextInside;
|
|
555
|
+
focus: () => void;
|
|
556
|
+
onPatch: OnPatch;
|
|
557
|
+
onSelect: OnJSONSelect;
|
|
558
|
+
onFind: OnFind;
|
|
559
|
+
onPasteJson: (newPastedJson: PastedJson) => void;
|
|
560
|
+
onRenderValue: OnRenderValue;
|
|
561
|
+
}
|
|
562
|
+
interface TreeModeContext extends JSONEditorContext {
|
|
563
|
+
getJson: () => unknown | undefined;
|
|
564
|
+
getDocumentState: () => DocumentState | undefined;
|
|
565
|
+
getSelection: () => JSONSelection | undefined;
|
|
566
|
+
findElement: (path: JSONPath) => Element | undefined;
|
|
567
|
+
onInsert: (type: InsertType) => void;
|
|
568
|
+
onExpand: (path: JSONPath, expanded: boolean, recursive?: boolean) => void;
|
|
569
|
+
onExpandSection: (path: JSONPath, section: Section) => void;
|
|
570
|
+
onContextMenu: OnContextMenu;
|
|
571
|
+
onClassName: OnClassName;
|
|
572
|
+
onDrag: (event: MouseEvent) => void;
|
|
573
|
+
onDragEnd: () => void;
|
|
574
|
+
}
|
|
575
|
+
interface RenderValueProps extends Record<string, unknown> {
|
|
576
|
+
path: JSONPath;
|
|
577
|
+
value: unknown;
|
|
578
|
+
mode: Mode;
|
|
579
|
+
truncateTextSize: number;
|
|
580
|
+
readOnly: boolean;
|
|
581
|
+
enforceString: boolean;
|
|
582
|
+
selection: JSONSelection | undefined;
|
|
583
|
+
searchResultItems: ExtendedSearchResultItem[] | undefined;
|
|
584
|
+
isEditing: boolean;
|
|
585
|
+
parser: JSONParser;
|
|
586
|
+
normalization: ValueNormalization;
|
|
587
|
+
onPatch: OnPatch;
|
|
588
|
+
onPasteJson: OnPasteJson;
|
|
589
|
+
onSelect: OnJSONSelect;
|
|
590
|
+
onFind: OnFind;
|
|
591
|
+
findNextInside: FindNextInside;
|
|
592
|
+
focus: () => void;
|
|
593
|
+
}
|
|
594
|
+
type RenderValuePropsOptional = Partial<RenderValueProps>;
|
|
595
|
+
interface DraggingState {
|
|
596
|
+
initialTarget: Element;
|
|
597
|
+
initialClientY: number;
|
|
598
|
+
initialContentTop: number;
|
|
599
|
+
selectionStartIndex: number;
|
|
600
|
+
selectionItemsCount: number;
|
|
601
|
+
items: RenderedItem[];
|
|
602
|
+
offset: number;
|
|
603
|
+
didMoveItems: boolean;
|
|
604
|
+
}
|
|
605
|
+
type RenderValueComponentDescription = SvelteComponentRenderer | SvelteActionRenderer;
|
|
606
|
+
interface SvelteComponentRenderer {
|
|
607
|
+
component: typeof SvelteComponent<RenderValuePropsOptional> | Component<RenderValueProps>;
|
|
608
|
+
props: RenderValueProps;
|
|
609
|
+
}
|
|
610
|
+
interface SvelteActionRenderer {
|
|
611
|
+
action: Action<HTMLElement, Record<string, unknown>>;
|
|
612
|
+
props: Record<string, unknown>;
|
|
613
|
+
}
|
|
614
|
+
interface TransformModalOptions {
|
|
615
|
+
id?: string;
|
|
616
|
+
rootPath?: JSONPath;
|
|
617
|
+
onTransform?: (state: {
|
|
618
|
+
operations: JSONPatchDocument;
|
|
619
|
+
json: unknown;
|
|
620
|
+
transformedJson: unknown;
|
|
621
|
+
}) => void;
|
|
622
|
+
onClose?: () => void;
|
|
623
|
+
}
|
|
624
|
+
interface TransformModalCallback {
|
|
625
|
+
id: string;
|
|
626
|
+
json: unknown;
|
|
627
|
+
rootPath: JSONPath;
|
|
628
|
+
onTransform: (operations: JSONPatchDocument) => void;
|
|
629
|
+
onClose: () => void;
|
|
630
|
+
}
|
|
631
|
+
interface TransformModalProps extends TransformModalCallback {
|
|
632
|
+
id: string;
|
|
633
|
+
json: unknown;
|
|
634
|
+
rootPath: JSONPath;
|
|
635
|
+
indentation: number | string;
|
|
636
|
+
truncateTextSize: number;
|
|
637
|
+
escapeControlCharacters: boolean;
|
|
638
|
+
escapeUnicodeCharacters: boolean;
|
|
639
|
+
parser: JSONParser;
|
|
640
|
+
parseMemoizeOne: JSONParser['parse'];
|
|
641
|
+
validationParser: JSONParser;
|
|
642
|
+
pathParser: JSONPathParser;
|
|
643
|
+
queryLanguages: QueryLanguage[];
|
|
644
|
+
queryLanguageId: string;
|
|
645
|
+
onChangeQueryLanguage: OnChangeQueryLanguage;
|
|
646
|
+
onRenderValue: OnRenderValue;
|
|
647
|
+
onRenderMenu: OnRenderMenuInternal;
|
|
648
|
+
onRenderContextMenu: OnRenderContextMenuInternal;
|
|
649
|
+
onClassName: OnClassName;
|
|
650
|
+
onTransform: (operations: JSONPatchDocument) => void;
|
|
651
|
+
onClose: () => void;
|
|
652
|
+
}
|
|
653
|
+
interface SortModalCallback {
|
|
654
|
+
id: string;
|
|
655
|
+
json: unknown;
|
|
656
|
+
rootPath: JSONPath;
|
|
657
|
+
onSort: OnSort;
|
|
658
|
+
onClose: () => void;
|
|
659
|
+
}
|
|
660
|
+
interface JSONRepairModalProps {
|
|
661
|
+
text: string;
|
|
662
|
+
onParse: (text: string) => void;
|
|
663
|
+
onRepair: (text: string) => string;
|
|
664
|
+
onApply: (repairedText: string) => void;
|
|
665
|
+
onClose: () => void;
|
|
666
|
+
}
|
|
667
|
+
interface JSONEditorModalCallback {
|
|
668
|
+
content: Content;
|
|
669
|
+
path: JSONPath;
|
|
670
|
+
onPatch: OnPatch;
|
|
671
|
+
onClose: () => void;
|
|
672
|
+
}
|
|
673
|
+
declare enum SortDirection {
|
|
674
|
+
asc = "asc",
|
|
675
|
+
desc = "desc"
|
|
676
|
+
}
|
|
677
|
+
declare enum UpdateSelectionAfterChange {
|
|
678
|
+
no = "no",
|
|
679
|
+
self = "self",
|
|
680
|
+
nextInside = "nextInside"
|
|
681
|
+
}
|
|
682
|
+
interface TableCellIndex {
|
|
683
|
+
rowIndex: number;
|
|
684
|
+
columnIndex: number;
|
|
685
|
+
}
|
|
686
|
+
interface SortedColumn {
|
|
687
|
+
path: JSONPath;
|
|
688
|
+
sortDirection: SortDirection;
|
|
689
|
+
}
|
|
690
|
+
type JSONSchema = Record<string, unknown>;
|
|
691
|
+
type JSONSchemaDefinitions = Record<string, JSONSchema>;
|
|
692
|
+
type JSONSchemaEnum = Array<unknown>;
|
|
693
|
+
|
|
694
|
+
interface $$__sveltets_2_IsomorphicComponent$5<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> {
|
|
695
|
+
new (options: svelte.ComponentConstructorOptions<Props>): svelte.SvelteComponent<Props, Events, Slots> & {
|
|
696
|
+
$$bindings?: Bindings;
|
|
697
|
+
} & Exports;
|
|
698
|
+
(internal: unknown, props: Props & {
|
|
699
|
+
$$events?: Events;
|
|
700
|
+
$$slots?: Slots;
|
|
701
|
+
}): Exports & {
|
|
702
|
+
$set?: any;
|
|
703
|
+
$on?: any;
|
|
704
|
+
};
|
|
705
|
+
z_$$bindings?: Bindings;
|
|
706
|
+
}
|
|
707
|
+
declare const JSONEditor$1: $$__sveltets_2_IsomorphicComponent$5<{
|
|
708
|
+
content?: Content;
|
|
709
|
+
selection?: JSONEditorSelection | undefined;
|
|
710
|
+
readOnly?: boolean;
|
|
711
|
+
indentation?: number | string;
|
|
712
|
+
tabSize?: number;
|
|
713
|
+
truncateTextSize?: number;
|
|
714
|
+
mode?: Mode;
|
|
715
|
+
mainMenuBar?: boolean;
|
|
716
|
+
navigationBar?: boolean;
|
|
717
|
+
statusBar?: boolean;
|
|
718
|
+
askToFormat?: boolean;
|
|
719
|
+
escapeControlCharacters?: boolean;
|
|
720
|
+
escapeUnicodeCharacters?: boolean;
|
|
721
|
+
maxDocumentSizeTextMode?: number;
|
|
722
|
+
flattenColumns?: boolean;
|
|
723
|
+
parser?: JSONParser;
|
|
724
|
+
validator?: Validator | undefined;
|
|
725
|
+
validationParser?: JSONParser;
|
|
726
|
+
pathParser?: JSONPathParser;
|
|
727
|
+
queryLanguages?: QueryLanguage[];
|
|
728
|
+
queryLanguageId?: string;
|
|
729
|
+
onChangeQueryLanguage?: OnChangeQueryLanguage;
|
|
730
|
+
onChange?: OnChange | undefined;
|
|
731
|
+
onSelect?: OnSelect | undefined;
|
|
732
|
+
onRenderValue?: OnRenderValue;
|
|
733
|
+
onClassName?: OnClassName;
|
|
734
|
+
onRenderMenu?: OnRenderMenu;
|
|
735
|
+
onRenderContextMenu?: OnRenderContextMenu;
|
|
736
|
+
onChangeMode?: OnChangeMode;
|
|
737
|
+
onError?: OnError;
|
|
738
|
+
onFocus?: OnFocus;
|
|
739
|
+
onBlur?: OnBlur;
|
|
740
|
+
get?: () => Content;
|
|
741
|
+
set?: (newContent: Content) => void;
|
|
742
|
+
update?: (updatedContent: Content) => void;
|
|
743
|
+
patch?: (operations: JSONPatchDocument) => JSONPatchResult;
|
|
744
|
+
select?: (newSelection: JSONEditorSelection | undefined) => void;
|
|
745
|
+
expand?: (path: JSONPath, callback?: OnExpand) => void;
|
|
746
|
+
collapse?: (path: JSONPath, recursive?: boolean) => void;
|
|
747
|
+
transform?: (options?: TransformModalOptions) => void;
|
|
748
|
+
validate?: () => ContentErrors | undefined;
|
|
749
|
+
acceptAutoRepair?: () => Content;
|
|
750
|
+
scrollTo?: (path: JSONPath) => Promise<void>;
|
|
751
|
+
findElement?: (path: JSONPath) => Element | undefined;
|
|
752
|
+
focus?: () => void;
|
|
753
|
+
refresh?: () => Promise<void>;
|
|
754
|
+
updateProps?: (props: JSONEditorPropsOptional) => void;
|
|
755
|
+
destroy?: () => Promise<void>;
|
|
756
|
+
}, {
|
|
757
|
+
[evt: string]: CustomEvent<any>;
|
|
758
|
+
}, {}, {
|
|
759
|
+
get: () => Content;
|
|
760
|
+
set: (newContent: Content) => void;
|
|
761
|
+
update: (updatedContent: Content) => void;
|
|
762
|
+
patch: (operations: JSONPatchDocument) => JSONPatchResult;
|
|
763
|
+
select: (newSelection: JSONEditorSelection | undefined) => void;
|
|
764
|
+
expand: (path: JSONPath, callback?: OnExpand) => void;
|
|
765
|
+
collapse: (path: JSONPath, recursive?: boolean) => void;
|
|
766
|
+
transform: (options?: TransformModalOptions) => void;
|
|
767
|
+
validate: () => ContentErrors | undefined;
|
|
768
|
+
acceptAutoRepair: () => Content;
|
|
769
|
+
scrollTo: (path: JSONPath) => Promise<void>;
|
|
770
|
+
findElement: (path: JSONPath) => Element | undefined;
|
|
771
|
+
focus: () => void;
|
|
772
|
+
refresh: () => Promise<void>;
|
|
773
|
+
updateProps: (props: JSONEditorPropsOptional) => void;
|
|
774
|
+
destroy: () => Promise<void>;
|
|
775
|
+
}, string>;
|
|
776
|
+
type JSONEditor$1 = InstanceType<typeof JSONEditor$1>;
|
|
777
|
+
|
|
778
|
+
interface $$__sveltets_2_IsomorphicComponent$4<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> {
|
|
779
|
+
new (options: svelte.ComponentConstructorOptions<Props>): svelte.SvelteComponent<Props, Events, Slots> & {
|
|
780
|
+
$$bindings?: Bindings;
|
|
781
|
+
} & Exports;
|
|
782
|
+
(internal: unknown, props: Props & {
|
|
783
|
+
$$events?: Events;
|
|
784
|
+
$$slots?: Slots;
|
|
785
|
+
}): Exports & {
|
|
786
|
+
$set?: any;
|
|
787
|
+
$on?: any;
|
|
788
|
+
};
|
|
789
|
+
z_$$bindings?: Bindings;
|
|
790
|
+
}
|
|
791
|
+
declare const BooleanToggle: $$__sveltets_2_IsomorphicComponent$4<{
|
|
792
|
+
path: JSONPath;
|
|
793
|
+
value: unknown;
|
|
794
|
+
readOnly: boolean;
|
|
795
|
+
onPatch: OnPatch;
|
|
796
|
+
focus: () => void;
|
|
797
|
+
}, {
|
|
798
|
+
[evt: string]: CustomEvent<any>;
|
|
799
|
+
}, {}, {}, string>;
|
|
800
|
+
type BooleanToggle = InstanceType<typeof BooleanToggle>;
|
|
801
|
+
|
|
802
|
+
interface $$__sveltets_2_IsomorphicComponent$3<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> {
|
|
803
|
+
new (options: svelte.ComponentConstructorOptions<Props>): svelte.SvelteComponent<Props, Events, Slots> & {
|
|
804
|
+
$$bindings?: Bindings;
|
|
805
|
+
} & Exports;
|
|
806
|
+
(internal: unknown, props: Props & {
|
|
807
|
+
$$events?: Events;
|
|
808
|
+
$$slots?: Slots;
|
|
809
|
+
}): Exports & {
|
|
810
|
+
$set?: any;
|
|
811
|
+
$on?: any;
|
|
812
|
+
};
|
|
813
|
+
z_$$bindings?: Bindings;
|
|
814
|
+
}
|
|
815
|
+
declare const ColorPicker: $$__sveltets_2_IsomorphicComponent$3<{
|
|
816
|
+
path: JSONPath;
|
|
817
|
+
value: string;
|
|
818
|
+
readOnly: boolean;
|
|
819
|
+
onPatch: OnPatch;
|
|
820
|
+
focus: () => void;
|
|
821
|
+
}, {
|
|
822
|
+
[evt: string]: CustomEvent<any>;
|
|
823
|
+
}, {}, {}, string>;
|
|
824
|
+
type ColorPicker = InstanceType<typeof ColorPicker>;
|
|
825
|
+
|
|
826
|
+
interface $$__sveltets_2_IsomorphicComponent$2<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> {
|
|
827
|
+
new (options: svelte.ComponentConstructorOptions<Props>): svelte.SvelteComponent<Props, Events, Slots> & {
|
|
828
|
+
$$bindings?: Bindings;
|
|
829
|
+
} & Exports;
|
|
830
|
+
(internal: unknown, props: Props & {
|
|
831
|
+
$$events?: Events;
|
|
832
|
+
$$slots?: Slots;
|
|
833
|
+
}): Exports & {
|
|
834
|
+
$set?: any;
|
|
835
|
+
$on?: any;
|
|
836
|
+
};
|
|
837
|
+
z_$$bindings?: Bindings;
|
|
838
|
+
}
|
|
839
|
+
declare const EditableValue: $$__sveltets_2_IsomorphicComponent$2<{
|
|
840
|
+
path: JSONPath;
|
|
841
|
+
value: unknown;
|
|
842
|
+
selection: JSONSelection | undefined;
|
|
843
|
+
mode: Mode;
|
|
844
|
+
parser: JSONParser;
|
|
845
|
+
normalization: ValueNormalization;
|
|
846
|
+
enforceString: boolean;
|
|
847
|
+
onPatch: OnPatch;
|
|
848
|
+
onPasteJson: OnPasteJson;
|
|
849
|
+
onSelect: OnJSONSelect;
|
|
850
|
+
onFind: OnFind;
|
|
851
|
+
focus: () => void;
|
|
852
|
+
findNextInside: FindNextInside;
|
|
853
|
+
}, {
|
|
854
|
+
[evt: string]: CustomEvent<any>;
|
|
855
|
+
}, {}, {}, string>;
|
|
856
|
+
type EditableValue = InstanceType<typeof EditableValue>;
|
|
857
|
+
|
|
858
|
+
interface $$__sveltets_2_IsomorphicComponent$1<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> {
|
|
859
|
+
new (options: svelte.ComponentConstructorOptions<Props>): svelte.SvelteComponent<Props, Events, Slots> & {
|
|
860
|
+
$$bindings?: Bindings;
|
|
861
|
+
} & Exports;
|
|
862
|
+
(internal: unknown, props: Props & {
|
|
863
|
+
$$events?: Events;
|
|
864
|
+
$$slots?: Slots;
|
|
865
|
+
}): Exports & {
|
|
866
|
+
$set?: any;
|
|
867
|
+
$on?: any;
|
|
868
|
+
};
|
|
869
|
+
z_$$bindings?: Bindings;
|
|
870
|
+
}
|
|
871
|
+
declare const EnumValue: $$__sveltets_2_IsomorphicComponent$1<{
|
|
872
|
+
path: JSONPath;
|
|
873
|
+
value: unknown;
|
|
874
|
+
mode: Mode;
|
|
875
|
+
parser: JSONParser;
|
|
876
|
+
readOnly: boolean;
|
|
877
|
+
selection: JSONSelection | undefined;
|
|
878
|
+
onPatch: OnPatch;
|
|
879
|
+
options: Array<{
|
|
880
|
+
value: unknown;
|
|
881
|
+
text: string;
|
|
882
|
+
}>;
|
|
883
|
+
}, {
|
|
884
|
+
[evt: string]: CustomEvent<any>;
|
|
885
|
+
}, {}, {}, string>;
|
|
886
|
+
type EnumValue = InstanceType<typeof EnumValue>;
|
|
887
|
+
|
|
888
|
+
declare const ReadonlyValue: svelte.Component<RenderValueProps, {}, "">;
|
|
889
|
+
type ReadonlyValue = ReturnType<typeof ReadonlyValue>;
|
|
890
|
+
|
|
891
|
+
interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> {
|
|
892
|
+
new (options: svelte.ComponentConstructorOptions<Props>): svelte.SvelteComponent<Props, Events, Slots> & {
|
|
893
|
+
$$bindings?: Bindings;
|
|
894
|
+
} & Exports;
|
|
895
|
+
(internal: unknown, props: Props & {
|
|
896
|
+
$$events?: Events;
|
|
897
|
+
$$slots?: Slots;
|
|
898
|
+
}): Exports & {
|
|
899
|
+
$set?: any;
|
|
900
|
+
$on?: any;
|
|
901
|
+
};
|
|
902
|
+
z_$$bindings?: Bindings;
|
|
903
|
+
}
|
|
904
|
+
declare const TimestampTag: $$__sveltets_2_IsomorphicComponent<{
|
|
905
|
+
value: number;
|
|
906
|
+
}, {
|
|
907
|
+
[evt: string]: CustomEvent<any>;
|
|
908
|
+
}, {}, {}, string>;
|
|
909
|
+
type TimestampTag = InstanceType<typeof TimestampTag>;
|
|
910
|
+
|
|
911
|
+
declare function renderValue(props: RenderValueProps): RenderValueComponentDescription[];
|
|
912
|
+
|
|
913
|
+
/**
|
|
914
|
+
* Search the JSON schema for enums defined at given props.path. If found,
|
|
915
|
+
* return an EnumValue renderer. If not found, return null. In that case you
|
|
916
|
+
* have to fallback on the default valueRender function
|
|
917
|
+
*/
|
|
918
|
+
declare function renderJSONSchemaEnum(props: RenderValueProps, schema: JSONSchema, schemaDefinitions?: JSONSchemaDefinitions): RenderValueComponentDescription[] | undefined;
|
|
919
|
+
|
|
920
|
+
declare function getValueClass(value: unknown, mode: Mode, parser: JSONParser): string;
|
|
921
|
+
|
|
922
|
+
declare global {
|
|
923
|
+
interface Navigator {
|
|
924
|
+
userAgentData?: {
|
|
925
|
+
platform: string;
|
|
926
|
+
};
|
|
927
|
+
}
|
|
928
|
+
}
|
|
929
|
+
declare function isMacDevice(): boolean;
|
|
930
|
+
|
|
931
|
+
interface KeyComboEvent {
|
|
932
|
+
ctrlKey: boolean;
|
|
933
|
+
metaKey: boolean;
|
|
934
|
+
altKey: boolean;
|
|
935
|
+
shiftKey: boolean;
|
|
936
|
+
key: string;
|
|
937
|
+
}
|
|
938
|
+
/**
|
|
939
|
+
* Get the active key combination from a keyboard event.
|
|
940
|
+
* For example returns "Ctrl+Shift+ArrowUp" or "Ctrl+A"
|
|
941
|
+
*
|
|
942
|
+
* Returns the same output on both Windows and Mac:
|
|
943
|
+
* meta keys "Ctrl" ("Command" on Mac), and "Alt" ("Alt" or "Option" on Mac)
|
|
944
|
+
* So pressing "Command" and "A"on Mac will return "Ctrl+A"
|
|
945
|
+
*/
|
|
946
|
+
declare function keyComboFromEvent(event: KeyComboEvent, separator?: string, isMac?: typeof isMacDevice): string;
|
|
947
|
+
|
|
948
|
+
interface AjvValidatorOptions {
|
|
949
|
+
/**
|
|
950
|
+
* The JSON schema to validate (required).
|
|
951
|
+
*/
|
|
952
|
+
schema: JSONSchema;
|
|
953
|
+
/**
|
|
954
|
+
* An object containing JSON Schema definitions which can be referenced using $ref.
|
|
955
|
+
*/
|
|
956
|
+
schemaDefinitions?: JSONSchemaDefinitions;
|
|
957
|
+
/**
|
|
958
|
+
* Optional extra options for Ajv.
|
|
959
|
+
*/
|
|
960
|
+
ajvOptions?: Options;
|
|
961
|
+
/**
|
|
962
|
+
* An optional callback function allowing to apply additional configuration on the provided Ajv instance, or return
|
|
963
|
+
* your own Ajv instance and ignore the provided one.
|
|
964
|
+
*/
|
|
965
|
+
onCreateAjv?: (ajv: Ajv) => Ajv | void;
|
|
966
|
+
/**
|
|
967
|
+
* The severity of the validation error.
|
|
968
|
+
*
|
|
969
|
+
* @default ValidationSeverity.warning
|
|
970
|
+
*/
|
|
971
|
+
errorSeverity?: ValidationSeverity;
|
|
972
|
+
}
|
|
973
|
+
/**
|
|
974
|
+
* Create a JSON Schema validator powered by Ajv.
|
|
975
|
+
*/
|
|
976
|
+
declare function createAjvValidator(options: AjvValidatorOptions): Validator;
|
|
977
|
+
/**
|
|
978
|
+
* Create a JSON Schema validator powered by Ajv.
|
|
979
|
+
*
|
|
980
|
+
* Same as `createAjvValidator`, but allows for remote schema resolution through `ajvOptions`'s `loadSchema(uri)`
|
|
981
|
+
* function.
|
|
982
|
+
*
|
|
983
|
+
* Note that `ajvOptions.loadSchema` *must* be set, or Ajv throws an error on initialization!
|
|
984
|
+
*
|
|
985
|
+
* ### Example
|
|
986
|
+
*
|
|
987
|
+
* const validate = await createAjvValidatorAsync({
|
|
988
|
+
* schema: {
|
|
989
|
+
* $ref: '/schema.json'
|
|
990
|
+
* },
|
|
991
|
+
* ajvOptions: {
|
|
992
|
+
* loadSchema(uri) {
|
|
993
|
+
* return fetch(uri).then((res) => res.json())
|
|
994
|
+
* }
|
|
995
|
+
* }
|
|
996
|
+
* })
|
|
997
|
+
*/
|
|
998
|
+
declare function createAjvValidatorAsync(options: AjvValidatorOptions): Promise<Validator>;
|
|
999
|
+
|
|
1000
|
+
declare const jsonQueryLanguage: QueryLanguage;
|
|
1001
|
+
|
|
1002
|
+
declare const jmespathQueryLanguage: QueryLanguage;
|
|
1003
|
+
|
|
1004
|
+
declare const jsonpathQueryLanguage: QueryLanguage;
|
|
1005
|
+
|
|
1006
|
+
declare const lodashQueryLanguage: QueryLanguage;
|
|
1007
|
+
|
|
1008
|
+
declare const javascriptQueryLanguage: QueryLanguage;
|
|
1009
|
+
|
|
1010
|
+
/**
|
|
1011
|
+
* Check whether a value is Content (TextContent or JSONContent)
|
|
1012
|
+
*/
|
|
1013
|
+
declare function isContent(content: unknown): content is Content;
|
|
1014
|
+
/**
|
|
1015
|
+
* Check whether content contains text (and not JSON)
|
|
1016
|
+
*/
|
|
1017
|
+
declare function isTextContent(content: unknown): content is TextContent;
|
|
1018
|
+
/**
|
|
1019
|
+
* Check whether content contains json
|
|
1020
|
+
*/
|
|
1021
|
+
declare function isJSONContent(content: unknown): content is JSONContent;
|
|
1022
|
+
/**
|
|
1023
|
+
* Convert Content into TextContent if it is JSONContent, else leave it as is
|
|
1024
|
+
*/
|
|
1025
|
+
declare function toTextContent(content: Content, indentation?: number | string | undefined, parser?: JSONParser): TextContent;
|
|
1026
|
+
/**
|
|
1027
|
+
* Convert Content into JSONContent if it is TextContent, else leave it as is
|
|
1028
|
+
* @throws {SyntaxError} Will throw a parse error when the text contents does not contain valid JSON
|
|
1029
|
+
*/
|
|
1030
|
+
declare function toJSONContent(content: Content, parser?: JSONParser): JSONContent;
|
|
1031
|
+
/**
|
|
1032
|
+
* Returns true when the (estimated) size of the contents exceeds the
|
|
1033
|
+
* provided maxSize.
|
|
1034
|
+
* @param content
|
|
1035
|
+
* @param maxSize Maximum content size in bytes
|
|
1036
|
+
*/
|
|
1037
|
+
declare function isLargeContent(content: Content, maxSize: number): boolean;
|
|
1038
|
+
/**
|
|
1039
|
+
* A rough, fast estimation on whether a document is larger than given size
|
|
1040
|
+
* when serialized.
|
|
1041
|
+
*
|
|
1042
|
+
* maxSize is an optional max size in bytes. When reached, size estimation will
|
|
1043
|
+
* be cancelled. This is useful when you're only interested in knowing whether
|
|
1044
|
+
* the size exceeds a certain maximum size.
|
|
1045
|
+
*/
|
|
1046
|
+
declare function estimateSerializedSize(content: Content, maxSize?: number): number;
|
|
1047
|
+
/**
|
|
1048
|
+
* Check whether the actual functions of parse and stringify are strictly equal.
|
|
1049
|
+
* The object holding the functions may be a differing instance.
|
|
1050
|
+
*/
|
|
1051
|
+
declare function isEqualParser(a: JSONParser, b: JSONParser): boolean;
|
|
1052
|
+
|
|
1053
|
+
/**
|
|
1054
|
+
* Expand the root array or object, and in case of an array, expand the first array item
|
|
1055
|
+
*/
|
|
1056
|
+
declare function expandMinimal(relativePath: JSONPath): boolean;
|
|
1057
|
+
/**
|
|
1058
|
+
* Expand the root array or object
|
|
1059
|
+
*/
|
|
1060
|
+
declare function expandSelf(relativePath: JSONPath): boolean;
|
|
1061
|
+
declare function expandAll(): boolean;
|
|
1062
|
+
declare function expandNone(): boolean;
|
|
1063
|
+
|
|
1064
|
+
declare function isAfterSelection(selection: JSONEditorSelection | undefined): selection is AfterSelection;
|
|
1065
|
+
declare function isInsideSelection(selection: JSONEditorSelection | undefined): selection is InsideSelection;
|
|
1066
|
+
declare function isKeySelection(selection: JSONEditorSelection | undefined): selection is KeySelection;
|
|
1067
|
+
declare function isValueSelection(selection: JSONEditorSelection | undefined): selection is ValueSelection;
|
|
1068
|
+
declare function isMultiSelection(selection: JSONEditorSelection | undefined): selection is MultiSelection;
|
|
1069
|
+
/**
|
|
1070
|
+
* Expand a selection start and end into an array containing all paths
|
|
1071
|
+
* between (and including) start and end
|
|
1072
|
+
*/
|
|
1073
|
+
declare function getSelectionPaths(json: unknown, selection: JSONSelection): JSONPath[];
|
|
1074
|
+
declare function getStartPath(json: unknown, selection: JSONSelection): JSONPath;
|
|
1075
|
+
declare function getEndPath(json: unknown, selection: JSONSelection): JSONPath;
|
|
1076
|
+
declare function createKeySelection(path: JSONPath): KeySelection;
|
|
1077
|
+
declare function createEditKeySelection(path: JSONPath, initialValue?: string): EditKeySelection;
|
|
1078
|
+
declare function createValueSelection(path: JSONPath): ValueSelection;
|
|
1079
|
+
declare function createEditValueSelection(path: JSONPath, initialValue?: string): EditValueSelection;
|
|
1080
|
+
declare function createInsideSelection(path: JSONPath): InsideSelection;
|
|
1081
|
+
declare function createAfterSelection(path: JSONPath): AfterSelection;
|
|
1082
|
+
declare function createMultiSelection(anchorPath: JSONPath, focusPath: JSONPath): MultiSelection;
|
|
1083
|
+
declare function isEditingSelection(selection: JSONSelection | undefined): selection is EditKeySelection | EditValueSelection;
|
|
1084
|
+
declare function getFocusPath(selection: JSONSelection): JSONPath;
|
|
1085
|
+
declare function getAnchorPath(selection: JSONSelection): JSONPath;
|
|
1086
|
+
|
|
1087
|
+
/**
|
|
1088
|
+
**
|
|
1089
|
+
* Stringify an array with a path like ['items', '3', 'name'] into string like 'items[3].name'
|
|
1090
|
+
* Note that we allow all characters in a property name, like "item with spaces[3].name",
|
|
1091
|
+
* so this path is not usable as-is in JavaScript.
|
|
1092
|
+
*/
|
|
1093
|
+
declare function stringifyJSONPath(path: JSONPath): string;
|
|
1094
|
+
/**
|
|
1095
|
+
* Parse a JSON path like 'items[3].name' into a path like ['items', '3', 'name']
|
|
1096
|
+
*/
|
|
1097
|
+
declare function parseJSONPath(pathStr: string): JSONPath;
|
|
1098
|
+
|
|
1099
|
+
/**
|
|
1100
|
+
* Example usage:
|
|
1101
|
+
*
|
|
1102
|
+
* <script lang="ts">
|
|
1103
|
+
* let clientWidth = 0
|
|
1104
|
+
* </script>
|
|
1105
|
+
*
|
|
1106
|
+
* <div use:resizeObserver={element => clientWidth = element.clientWidth}>
|
|
1107
|
+
* My width is: {clientWidth}
|
|
1108
|
+
* </div>
|
|
1109
|
+
*/
|
|
1110
|
+
declare function resizeObserver(element: Element, onResize: (element: Element) => void): {
|
|
1111
|
+
destroy: () => void;
|
|
1112
|
+
};
|
|
1113
|
+
|
|
1114
|
+
type Callback = () => void;
|
|
1115
|
+
/**
|
|
1116
|
+
* The provided callback is invoked when the user presses Escape, and then stops propagation of the event.
|
|
1117
|
+
*/
|
|
1118
|
+
declare function onEscape(element: HTMLElement | undefined, callback: Callback): {
|
|
1119
|
+
destroy(): void;
|
|
1120
|
+
} | undefined;
|
|
1121
|
+
|
|
1122
|
+
/**
|
|
1123
|
+
* Test whether a value is an Object (and not an Array or Class)
|
|
1124
|
+
*/
|
|
1125
|
+
declare function isObject(value: unknown): value is Record<string, unknown>;
|
|
1126
|
+
/**
|
|
1127
|
+
* Test whether a value is an Object or an Array (and not a Class)
|
|
1128
|
+
*/
|
|
1129
|
+
declare function isObjectOrArray(value: unknown): value is object | Array<unknown>;
|
|
1130
|
+
/**
|
|
1131
|
+
* Test whether a value is a boolean
|
|
1132
|
+
*
|
|
1133
|
+
* @param {*} value
|
|
1134
|
+
* @return {boolean}
|
|
1135
|
+
*/
|
|
1136
|
+
declare function isBoolean(value: unknown): value is boolean;
|
|
1137
|
+
/**
|
|
1138
|
+
* Test whether a value is a timestamp in milliseconds after the year 2000.
|
|
1139
|
+
*/
|
|
1140
|
+
declare function isTimestamp(value: unknown): boolean;
|
|
1141
|
+
/**
|
|
1142
|
+
* Test if a string contains a valid color name or code.
|
|
1143
|
+
* Returns true if a valid color, false otherwise
|
|
1144
|
+
*/
|
|
1145
|
+
declare function isColor(value: unknown): boolean;
|
|
1146
|
+
/**
|
|
1147
|
+
* Get the type of the value
|
|
1148
|
+
*/
|
|
1149
|
+
declare function valueType(value: unknown, parser: JSONParser): string;
|
|
1150
|
+
declare function isUrl(text: unknown): boolean;
|
|
1151
|
+
/**
|
|
1152
|
+
* Convert contents of a string to the correct JSON type. This can be a string,
|
|
1153
|
+
* a number, a boolean, etc
|
|
1154
|
+
*/
|
|
1155
|
+
declare function stringConvert(str: string, parser: JSONParser): unknown;
|
|
1156
|
+
|
|
1157
|
+
declare function isMenuSpace(item: unknown): item is MenuSpace;
|
|
1158
|
+
declare function isMenuSeparator(item: unknown): item is MenuSeparator;
|
|
1159
|
+
declare function isMenuLabel(item: unknown): item is MenuLabel;
|
|
1160
|
+
declare function isMenuButton(item: unknown): item is MenuButton;
|
|
1161
|
+
declare function isMenuDropDownButton(item: unknown): item is MenuDropDownButton;
|
|
1162
|
+
declare function isContextMenuRow(item: unknown): item is ContextMenuRow;
|
|
1163
|
+
declare function isContextMenuColumn(item: unknown): item is ContextMenuColumn;
|
|
1164
|
+
declare function isContentParseError(contentErrors: unknown): contentErrors is ContentParseError;
|
|
1165
|
+
declare function isContentValidationErrors(contentErrors: unknown): contentErrors is ContentValidationErrors;
|
|
1166
|
+
declare function isValidationError(value: unknown): value is ValidationError;
|
|
1167
|
+
declare function isNestedValidationError(value: unknown): value is NestedValidationError;
|
|
1168
|
+
declare function isSvelteComponentRenderer(value: unknown): value is SvelteComponentRenderer;
|
|
1169
|
+
declare function isSvelteActionRenderer(value: unknown): value is SvelteActionRenderer;
|
|
1170
|
+
declare function isObjectRecursiveState(state: RecursiveState | undefined): state is ObjectRecursiveState;
|
|
1171
|
+
declare function isArrayRecursiveState(state: RecursiveState | undefined): state is ArrayRecursiveState;
|
|
1172
|
+
declare function isValueRecursiveState(state: RecursiveState | undefined): state is ValueRecursiveState;
|
|
1173
|
+
declare function isExpandableState(state: RecursiveState | undefined): state is ObjectRecursiveState | ArrayRecursiveState;
|
|
1174
|
+
declare function hasSearchResults(state: SearchResults | undefined): state is WithSearchResults;
|
|
1175
|
+
declare function isTreeHistoryItem(historyItem: HistoryItem | undefined): historyItem is TreeHistoryItem;
|
|
1176
|
+
declare function isTextHistoryItem(historyItem: HistoryItem | undefined): historyItem is TextHistoryItem;
|
|
1177
|
+
declare function isModeHistoryItem(historyItem: HistoryItem | undefined): historyItem is ModeHistoryItem;
|
|
1178
|
+
|
|
1179
|
+
interface CreateJSONEditorProps {
|
|
1180
|
+
target: HTMLDivElement;
|
|
1181
|
+
props: JSONEditorPropsOptional;
|
|
1182
|
+
}
|
|
1183
|
+
|
|
1184
|
+
declare function createJSONEditor({ target, props }: Parameters<typeof mount>[1]): JSONEditor$1;
|
|
1185
|
+
/**
|
|
1186
|
+
* @deprecated The constructor "new JSONEditor(...)" is deprecated. Please use "createJSONEditor(...)" instead.
|
|
1187
|
+
*/
|
|
1188
|
+
declare function JSONEditor({ target, props }: CreateJSONEditorProps): svelte.SvelteComponent<{
|
|
1189
|
+
content?: Content;
|
|
1190
|
+
selection?: JSONEditorSelection | undefined;
|
|
1191
|
+
readOnly?: boolean;
|
|
1192
|
+
indentation?: number | string;
|
|
1193
|
+
tabSize?: number;
|
|
1194
|
+
truncateTextSize?: number;
|
|
1195
|
+
mode?: Mode;
|
|
1196
|
+
mainMenuBar?: boolean;
|
|
1197
|
+
navigationBar?: boolean;
|
|
1198
|
+
statusBar?: boolean;
|
|
1199
|
+
askToFormat?: boolean;
|
|
1200
|
+
escapeControlCharacters?: boolean;
|
|
1201
|
+
escapeUnicodeCharacters?: boolean;
|
|
1202
|
+
maxDocumentSizeTextMode?: number;
|
|
1203
|
+
flattenColumns?: boolean;
|
|
1204
|
+
parser?: JSONParser;
|
|
1205
|
+
validator?: Validator | undefined;
|
|
1206
|
+
validationParser?: JSONParser;
|
|
1207
|
+
pathParser?: JSONPathParser;
|
|
1208
|
+
queryLanguages?: QueryLanguage[];
|
|
1209
|
+
queryLanguageId?: string;
|
|
1210
|
+
onChangeQueryLanguage?: OnChangeQueryLanguage;
|
|
1211
|
+
onChange?: OnChange | undefined;
|
|
1212
|
+
onSelect?: OnSelect | undefined;
|
|
1213
|
+
onRenderValue?: OnRenderValue;
|
|
1214
|
+
onClassName?: OnClassName;
|
|
1215
|
+
onRenderMenu?: OnRenderMenu;
|
|
1216
|
+
onRenderContextMenu?: OnRenderContextMenu;
|
|
1217
|
+
onChangeMode?: OnChangeMode;
|
|
1218
|
+
onError?: OnError;
|
|
1219
|
+
onFocus?: OnFocus;
|
|
1220
|
+
onBlur?: OnBlur;
|
|
1221
|
+
get?: () => Content;
|
|
1222
|
+
set?: (newContent: Content) => void;
|
|
1223
|
+
update?: (updatedContent: Content) => void;
|
|
1224
|
+
patch?: (operations: immutable_json_patch.JSONPatchDocument) => JSONPatchResult;
|
|
1225
|
+
select?: (newSelection: JSONEditorSelection | undefined) => void;
|
|
1226
|
+
expand?: (path: immutable_json_patch.JSONPath, callback?: OnExpand) => void;
|
|
1227
|
+
collapse?: (path: immutable_json_patch.JSONPath, recursive?: boolean) => void;
|
|
1228
|
+
transform?: (options?: TransformModalOptions) => void;
|
|
1229
|
+
validate?: () => ContentErrors | undefined;
|
|
1230
|
+
acceptAutoRepair?: () => Content;
|
|
1231
|
+
scrollTo?: (path: immutable_json_patch.JSONPath) => Promise<void>;
|
|
1232
|
+
findElement?: (path: immutable_json_patch.JSONPath) => Element | undefined;
|
|
1233
|
+
focus?: () => void;
|
|
1234
|
+
refresh?: () => Promise<void>;
|
|
1235
|
+
updateProps?: (props: JSONEditorPropsOptional) => void;
|
|
1236
|
+
destroy?: () => Promise<void>;
|
|
1237
|
+
}, {
|
|
1238
|
+
[evt: string]: CustomEvent<any>;
|
|
1239
|
+
}, {}> & {
|
|
1240
|
+
$$bindings?: string | undefined;
|
|
1241
|
+
} & {
|
|
1242
|
+
get: () => Content;
|
|
1243
|
+
set: (newContent: Content) => void;
|
|
1244
|
+
update: (updatedContent: Content) => void;
|
|
1245
|
+
patch: (operations: immutable_json_patch.JSONPatchDocument) => JSONPatchResult;
|
|
1246
|
+
select: (newSelection: JSONEditorSelection | undefined) => void;
|
|
1247
|
+
expand: (path: immutable_json_patch.JSONPath, callback?: OnExpand) => void;
|
|
1248
|
+
collapse: (path: immutable_json_patch.JSONPath, recursive?: boolean) => void;
|
|
1249
|
+
transform: (options?: TransformModalOptions) => void;
|
|
1250
|
+
validate: () => ContentErrors | undefined;
|
|
1251
|
+
acceptAutoRepair: () => Content;
|
|
1252
|
+
scrollTo: (path: immutable_json_patch.JSONPath) => Promise<void>;
|
|
1253
|
+
findElement: (path: immutable_json_patch.JSONPath) => Element | undefined;
|
|
1254
|
+
focus: () => void;
|
|
1255
|
+
refresh: () => Promise<void>;
|
|
1256
|
+
updateProps: (props: JSONEditorPropsOptional) => void;
|
|
1257
|
+
destroy: () => Promise<void>;
|
|
1258
|
+
};
|
|
1259
|
+
|
|
1260
|
+
export { BooleanToggle, CaretType, ColorPicker, EditableValue, EnumValue, JSONEditor, JSONEditor$1 as JsonEditor, Mode, ReadonlyValue, SearchField, SelectionType, SortDirection, TimestampTag, UpdateSelectionAfterChange, ValidationSeverity, createAfterSelection, createAjvValidator, createAjvValidatorAsync, createEditKeySelection, createEditValueSelection, createInsideSelection, createJSONEditor, createKeySelection, createMultiSelection, createValueSelection, estimateSerializedSize, expandAll, expandMinimal, expandNone, expandSelf, getAnchorPath, getEndPath, getFocusPath, getSelectionPaths, getStartPath, getValueClass, hasSearchResults, isAfterSelection, isArrayRecursiveState, isBoolean, isColor, isContent, isContentParseError, isContentValidationErrors, isContextMenuColumn, isContextMenuRow, isEditingSelection, isEqualParser, isExpandableState, isInsideSelection, isJSONContent, isKeySelection, isLargeContent, isMenuButton, isMenuDropDownButton, isMenuLabel, isMenuSeparator, isMenuSpace, isModeHistoryItem, isMultiSelection, isNestedValidationError, isObject, isObjectOrArray, isObjectRecursiveState, isSvelteActionRenderer, isSvelteComponentRenderer, isTextContent, isTextHistoryItem, isTimestamp, isTreeHistoryItem, isUrl, isValidationError, isValueRecursiveState, isValueSelection, javascriptQueryLanguage, jmespathQueryLanguage, jsonQueryLanguage, jsonpathQueryLanguage, keyComboFromEvent, lodashQueryLanguage, onEscape, parseJSONPath, renderJSONSchemaEnum, renderValue, resizeObserver, stringConvert, stringifyJSONPath, toJSONContent, toTextContent, valueType };
|
|
1261
|
+
export type { AbsolutePopupContext, AbsolutePopupOptions, AfterPatchCallback, AfterSelection, AjvValidatorOptions, ArrayDocumentState, ArrayRecursiveState, ArraySearchResults, ArrayValidationErrors, CaretPosition, ClipboardValues, Content, ContentErrors, ContentParseError, ContentValidationErrors, ContextMenuColumn, ContextMenuItem, ContextMenuRow, ConvertType, CreateJSONEditorProps, DocumentState, DragInsideAction, DragInsideProps, DraggingState, EditKeySelection, EditValueSelection, EscapeValue, ExtendedSearchResultItem, FindNextInside, History, HistoryInstance, HistoryItem, InsertType, InsideSelection, JSONContent, JSONEditorContext, JSONEditorModalCallback, JSONEditorModalProps, JSONEditorPropsOptional, JSONEditorSelection, JSONParser, JSONPatchResult, JSONPathParser, JSONRepairModalProps, JSONSchema, JSONSchemaDefinitions, JSONSchemaEnum, JSONSelection, KeySelection, MenuButton, MenuDropDownButton, MenuItem, MenuLabel, MenuSeparator, MenuSpace, MessageAction, ModeHistoryItem, MultiSelection, NestedValidationError, NumberOption, ObjectDocumentState, ObjectRecursiveState, ObjectSearchResults, ObjectValidationErrors, OnBlur, OnChange, OnChangeMode, OnChangeQueryLanguage, OnChangeStatus, OnChangeText, OnClassName, OnContextMenu, OnError, OnExpand, OnFind, OnFocus, OnJSONEditorModal, OnJSONSelect, OnPaste, OnPasteJson, OnPatch, OnRedo, OnRenderContextMenu, OnRenderContextMenuInternal, OnRenderMenu, OnRenderMenuInternal, OnRenderValue, OnSelect, OnSort, OnSortModal, OnTransformModal, OnUndo, ParseError, PastedJson, PathOption, PopupEntry, QueryLanguage, QueryLanguageOptions, RecursiveState, RecursiveStateFactory, RenderContextMenuContext, RenderMenuContext, RenderValueComponentDescription, RenderValueProps, RenderValuePropsOptional, RenderedItem, RichValidationError, ScrollToOptions, SearchOptions, SearchResultDetails, SearchResultItem, SearchResults, Section, SortModalCallback, SortedColumn, SvelteActionRenderer, SvelteComponentRenderer, TableCellIndex, TextChanges, TextContent, TextHistoryItem, TextLocation, TextSelection, TransformModalCallback, TransformModalOptions, TransformModalProps, TreeHistoryItem, TreeModeContext, UnescapeValue, ValidationError, ValidationErrors, Validator, ValueDocumentState, ValueNormalization, ValueRecursiveState, ValueSearchResults, ValueSelection, ValueValidationErrors, VisibleSection, WithSearchResults };
|