vanilla-jsoneditor
Advanced tools
Comparing version 0.18.1 to 0.18.2
166
index.d.ts
import { SvelteComponent } from 'svelte'; | ||
import { JSONValue as JSONValue$1, JSONPath as JSONPath$1, JSONPatchDocument, JSONPointer } from 'immutable-json-patch'; | ||
import { JSONValue, JSONPath, JSONPatchDocument, JSONPointer } from 'immutable-json-patch'; | ||
import { IconDefinition } from '@fortawesome/free-solid-svg-icons'; | ||
@@ -13,5 +13,5 @@ import Ajv, { Options } from 'ajv'; | ||
type JSONContent = { | ||
json: JSONValue$1; | ||
json: JSONValue; | ||
} | { | ||
json: JSONValue$1; | ||
json: JSONValue; | ||
text: undefined; | ||
@@ -22,4 +22,4 @@ }; | ||
interface JSONPathParser { | ||
parse: (pathStr: string) => JSONPath$1; | ||
stringify: (path: JSONPath$1) => string; | ||
parse: (pathStr: string) => JSONPath; | ||
stringify: (path: JSONPath) => string; | ||
} | ||
@@ -50,3 +50,3 @@ interface VisibleSection { | ||
interface CaretPosition { | ||
path: JSONPath$1; | ||
path: JSONPath; | ||
type: CaretType; | ||
@@ -62,9 +62,9 @@ } | ||
interface JSONPatchResult { | ||
json: JSONValue$1; | ||
previousJson: JSONValue$1; | ||
json: JSONValue; | ||
previousJson: JSONValue; | ||
undo: JSONPatchDocument; | ||
redo: JSONPatchDocument; | ||
} | ||
type AfterPatchCallback = (patchedJson: JSONValue$1, patchedState: DocumentState) => { | ||
json?: JSONValue$1; | ||
type AfterPatchCallback = (patchedJson: JSONValue, patchedState: DocumentState) => { | ||
json?: JSONValue; | ||
state?: DocumentState; | ||
@@ -74,16 +74,16 @@ } | undefined; | ||
type: SelectionType.multi; | ||
anchorPath: JSONPath$1; | ||
focusPath: JSONPath$1; | ||
anchorPath: JSONPath; | ||
focusPath: JSONPath; | ||
} | ||
interface AfterSelection { | ||
type: SelectionType.after; | ||
path: JSONPath$1; | ||
path: JSONPath; | ||
} | ||
interface InsideSelection { | ||
type: SelectionType.inside; | ||
path: JSONPath$1; | ||
path: JSONPath; | ||
} | ||
interface KeySelection { | ||
type: SelectionType.key; | ||
path: JSONPath$1; | ||
path: JSONPath; | ||
edit?: boolean; | ||
@@ -93,3 +93,3 @@ } | ||
type: SelectionType.value; | ||
path: JSONPath$1; | ||
path: JSONPath; | ||
edit?: boolean; | ||
@@ -110,3 +110,3 @@ } | ||
key: string; | ||
value: JSONValue$1; | ||
value: JSONValue; | ||
}>; | ||
@@ -162,3 +162,3 @@ interface MenuButton { | ||
interface ValidationError { | ||
path: JSONPath$1; | ||
path: JSONPath; | ||
message: string; | ||
@@ -170,3 +170,3 @@ severity: ValidationSeverity; | ||
} | ||
type Validator = (json: JSONValue$1) => ValidationError[]; | ||
type Validator = (json: JSONValue) => ValidationError[]; | ||
interface ParseError { | ||
@@ -197,3 +197,3 @@ position: number | null; | ||
interface TextLocation { | ||
path: JSONPath$1; | ||
path: JSONPath; | ||
line: number; | ||
@@ -212,4 +212,4 @@ column: number; | ||
description: string; | ||
createQuery: (json: JSONValue$1, queryOptions: QueryLanguageOptions) => string; | ||
executeQuery: (json: JSONValue$1, query: string, parser: JSONParser) => JSONValue$1; | ||
createQuery: (json: JSONValue, queryOptions: QueryLanguageOptions) => string; | ||
executeQuery: (json: JSONValue, query: string, parser: JSONParser) => JSONValue; | ||
} | ||
@@ -242,4 +242,4 @@ interface QueryLanguageOptions { | ||
operations: JSONPatchDocument; | ||
rootPath: JSONPath$1; | ||
itemPath: JSONPath$1; | ||
rootPath: JSONPath; | ||
itemPath: JSONPath; | ||
direction: 1 | -1; | ||
@@ -250,8 +250,8 @@ }) => void; | ||
type OnPasteJson = (pastedJson: { | ||
path: JSONPath$1; | ||
contents: JSONValue$1; | ||
path: JSONPath; | ||
contents: JSONValue; | ||
}) => void; | ||
type OnExpand = (path: JSONPath$1) => boolean; | ||
type OnExpand = (path: JSONPath) => boolean; | ||
type OnRenderValue = (props: RenderValueProps) => RenderValueComponentDescription[]; | ||
type OnClassName = (path: JSONPath$1, value: JSONValue$1) => string | undefined; | ||
type OnClassName = (path: JSONPath, value: JSONValue) => string | undefined; | ||
type OnChangeMode = (mode: Mode) => void; | ||
@@ -271,3 +271,3 @@ type OnContextMenu = (contextMenuProps: AbsolutePopupOptions) => void; | ||
type OnJSONEditorModal = (props: JSONEditorModalCallback) => void; | ||
type FindNextInside = (path: JSONPath$1) => JSONSelection | null; | ||
type FindNextInside = (path: JSONPath) => JSONSelection | null; | ||
interface SearchResult { | ||
@@ -284,3 +284,3 @@ items: ExtendedSearchResultItem[]; | ||
interface SearchResultItem { | ||
path: JSONPath$1; | ||
path: JSONPath; | ||
field: SearchField; | ||
@@ -294,18 +294,18 @@ fieldIndex: number; | ||
} | ||
type EscapeValue = (value: unknown) => string; | ||
type UnescapeValue = (escapedValue: string) => string; | ||
interface ValueNormalization { | ||
escapeValue: (unescapedValue: unknown) => string; | ||
unescapeValue: (escapedValue: string) => string; | ||
escapeValue: EscapeValue; | ||
unescapeValue: UnescapeValue; | ||
} | ||
type PastedJson = { | ||
contents: JSONValue$1; | ||
path: JSONPath$1; | ||
contents: JSONValue; | ||
path: JSONPath; | ||
} | undefined; | ||
type EscapeValue = (value: JSONValue$1) => string; | ||
type UnescapeValue = (escapedValue: string) => string; | ||
interface DragInsideProps { | ||
json: JSONValue$1; | ||
json: JSONValue; | ||
selection: JSONSelection; | ||
deltaY: number; | ||
items: Array<{ | ||
path: JSONPath$1; | ||
path: JSONPath; | ||
height: number; | ||
@@ -315,3 +315,3 @@ }>; | ||
type DragInsideAction = { | ||
beforePath: JSONPath$1; | ||
beforePath: JSONPath; | ||
offset: number; | ||
@@ -323,3 +323,3 @@ } | { | ||
interface RenderedItem { | ||
path: JSONPath$1; | ||
path: JSONPath; | ||
height: number; | ||
@@ -330,3 +330,3 @@ } | ||
patch: JSONPatchDocument | undefined; | ||
json: JSONValue$1 | undefined; | ||
json: JSONValue | undefined; | ||
text: string | undefined; | ||
@@ -338,3 +338,3 @@ state: DocumentState; | ||
patch: JSONPatchDocument | undefined; | ||
json: JSONValue$1 | undefined; | ||
json: JSONValue | undefined; | ||
text: string | undefined; | ||
@@ -398,5 +398,5 @@ state: DocumentState; | ||
normalization: ValueNormalization; | ||
getJson: () => JSONValue$1 | undefined; | ||
getJson: () => JSONValue | undefined; | ||
getDocumentState: () => DocumentState; | ||
findElement: (path: JSONPath$1) => Element | null; | ||
findElement: (path: JSONPath) => Element | null; | ||
findNextInside: FindNextInside; | ||
@@ -411,8 +411,8 @@ focus: () => void; | ||
interface TreeModeContext extends JSONEditorContext { | ||
getJson: () => JSONValue$1 | undefined; | ||
getJson: () => JSONValue | undefined; | ||
getDocumentState: () => DocumentState; | ||
findElement: (path: JSONPath$1) => Element | null; | ||
findElement: (path: JSONPath) => Element | null; | ||
onInsert: (type: InsertType) => void; | ||
onExpand: (path: JSONPath$1, expanded: boolean, recursive?: boolean) => void; | ||
onExpandSection: (path: JSONPath$1, section: Section) => void; | ||
onExpand: (path: JSONPath, expanded: boolean, recursive?: boolean) => void; | ||
onExpandSection: (path: JSONPath, section: Section) => void; | ||
onContextMenu: OnContextMenu; | ||
@@ -424,4 +424,4 @@ onClassName: OnClassName; | ||
interface RenderValuePropsOptional { | ||
path?: JSONPath$1; | ||
value?: JSONValue$1; | ||
path?: JSONPath; | ||
value?: JSONValue; | ||
readOnly?: boolean; | ||
@@ -442,4 +442,4 @@ enforceString?: boolean; | ||
interface RenderValueProps extends RenderValuePropsOptional { | ||
path: JSONPath$1; | ||
value: JSONValue$1; | ||
path: JSONPath; | ||
value: JSONValue; | ||
readOnly: boolean; | ||
@@ -461,4 +461,4 @@ enforceString: boolean; | ||
key: string; | ||
value: JSONValue$1; | ||
path: JSONPath$1; | ||
value: JSONValue; | ||
path: JSONPath; | ||
expandedMap: JSONPointerMap<boolean> | undefined; | ||
@@ -474,4 +474,4 @@ enforceStringMap: JSONPointerMap<boolean> | undefined; | ||
index: number; | ||
value: JSONValue$1; | ||
path: JSONPath$1; | ||
value: JSONValue; | ||
path: JSONPath; | ||
expandedMap: JSONPointerMap<boolean> | undefined; | ||
@@ -500,7 +500,7 @@ enforceStringMap: JSONPointerMap<boolean> | undefined; | ||
id?: string; | ||
rootPath?: JSONPath$1; | ||
rootPath?: JSONPath; | ||
onTransform?: (state: { | ||
operations: JSONPatchDocument; | ||
json: JSONValue$1; | ||
transformedJson: JSONValue$1; | ||
json: JSONValue; | ||
transformedJson: JSONValue; | ||
}) => void; | ||
@@ -511,4 +511,4 @@ onClose?: () => void; | ||
id: string; | ||
rootPath: JSONPath$1; | ||
json: JSONValue$1; | ||
rootPath: JSONPath; | ||
json: JSONValue; | ||
onTransform: (operations: JSONPatchDocument) => void; | ||
@@ -519,4 +519,4 @@ onClose: () => void; | ||
id: string; | ||
json: JSONValue$1; | ||
rootPath: JSONPath$1; | ||
json: JSONValue; | ||
rootPath: JSONPath; | ||
onSort: OnSort; | ||
@@ -527,3 +527,3 @@ onClose: () => void; | ||
content: Content; | ||
path: JSONPath$1; | ||
path: JSONPath; | ||
onPatch: OnPatch; | ||
@@ -541,3 +541,3 @@ onClose: () => void; | ||
interface SortedColumn { | ||
path: JSONPath$1; | ||
path: JSONPath; | ||
sortDirection: SortDirection; | ||
@@ -589,4 +589,4 @@ } | ||
acceptAutoRepair?: (() => Promise<Content>) | undefined; | ||
scrollTo?: ((path: JSONPath$1) => Promise<void>) | undefined; | ||
findElement?: ((path: JSONPath$1) => Element | null) | undefined; | ||
scrollTo?: ((path: JSONPath) => Promise<void>) | undefined; | ||
findElement?: ((path: JSONPath) => Element | null) | undefined; | ||
focus?: (() => Promise<void>) | undefined; | ||
@@ -615,4 +615,4 @@ refresh?: (() => Promise<void>) | undefined; | ||
get acceptAutoRepair(): () => Promise<Content>; | ||
get scrollTo(): (path: JSONPath$1) => Promise<void>; | ||
get findElement(): (path: JSONPath$1) => Element | null; | ||
get scrollTo(): (path: JSONPath) => Promise<void>; | ||
get findElement(): (path: JSONPath) => Element | null; | ||
get focus(): () => Promise<void>; | ||
@@ -626,4 +626,4 @@ get refresh(): () => Promise<void>; | ||
props: { | ||
path: JSONPath$1; | ||
value: JSONValue$1; | ||
path: JSONPath; | ||
value: JSONValue; | ||
readOnly: boolean; | ||
@@ -646,3 +646,3 @@ onPatch: OnPatch; | ||
props: { | ||
path: JSONPath$1; | ||
path: JSONPath; | ||
value: string; | ||
@@ -666,4 +666,4 @@ readOnly: boolean; | ||
props: { | ||
path: JSONPath$1; | ||
value: JSONValue$1; | ||
path: JSONPath; | ||
value: JSONValue; | ||
parser: JSONParser; | ||
@@ -692,4 +692,4 @@ normalization: ValueNormalization; | ||
props: { | ||
path: JSONPath$1; | ||
value: JSONValue$1; | ||
path: JSONPath; | ||
value: JSONValue; | ||
parser: JSONParser; | ||
@@ -838,7 +838,7 @@ readOnly: boolean; | ||
declare function isMultiSelection(selection: JSONEditorSelection | null): selection is MultiSelection; | ||
declare function createKeySelection(path: JSONPath$1, edit: boolean): KeySelection; | ||
declare function createValueSelection(path: JSONPath$1, edit: boolean): ValueSelection; | ||
declare function createInsideSelection(path: JSONPath$1): InsideSelection; | ||
declare function createAfterSelection(path: JSONPath$1): AfterSelection; | ||
declare function createMultiSelection(anchorPath: JSONPath$1, focusPath: JSONPath$1): MultiSelection; | ||
declare function createKeySelection(path: JSONPath, edit: boolean): KeySelection; | ||
declare function createValueSelection(path: JSONPath, edit: boolean): ValueSelection; | ||
declare function createInsideSelection(path: JSONPath): InsideSelection; | ||
declare function createAfterSelection(path: JSONPath): AfterSelection; | ||
declare function createMultiSelection(anchorPath: JSONPath, focusPath: JSONPath): MultiSelection; | ||
declare function isEditingSelection(selection: JSONSelection | null): boolean; | ||
@@ -852,7 +852,7 @@ | ||
*/ | ||
declare function stringifyJSONPath(path: JSONPath$1): string; | ||
declare function stringifyJSONPath(path: JSONPath): string; | ||
/** | ||
* Parse a JSON path like 'items[3].name' into a path like ['items', '3', 'name'] | ||
*/ | ||
declare function parseJSONPath(pathStr: string): JSONPath$1; | ||
declare function parseJSONPath(pathStr: string): JSONPath; | ||
@@ -859,0 +859,0 @@ /** |
{ | ||
"name": "vanilla-jsoneditor", | ||
"description": "A web-based tool to view, edit, format, transform, and validate JSON", | ||
"version": "0.18.1", | ||
"version": "0.18.2", | ||
"homepage": "https://github.com/josdejong/svelte-jsoneditor", | ||
@@ -6,0 +6,0 @@ "repository": { |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
7189107