New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

vanilla-jsoneditor

Package Overview
Dependencies
Maintainers
1
Versions
126
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vanilla-jsoneditor - npm Package Compare versions

Comparing version 2.1.0 to 2.2.0

47

index.d.ts

@@ -303,2 +303,4 @@ import { SvelteComponent, SvelteComponentTyped, mount } from 'svelte';

type OnSelect = (selection: JSONEditorSelection | undefined) => void;
type OnUndo = (item: HistoryItem | undefined) => void;
type OnRedo = (item: HistoryItem | undefined) => void;
type OnPatch = (operations: JSONPatchDocument, afterPatch?: AfterPatchCallback) => JSONPatchResult;

@@ -393,3 +395,4 @@ type OnChangeText = (updatedText: string, afterPatch?: AfterPatchCallback) => void;

}
interface HistoryItem {
interface TreeHistoryItem {
type: 'tree';
undo: {

@@ -414,2 +417,38 @@ patch: JSONPatchDocument | undefined;

}
type TextChanges = Array<number | [number, ...string[]]>;
interface TextHistoryItem {
type: 'text';
undo: {
changes: TextChanges;
selection: TextSelection;
};
redo: {
changes: TextChanges;
selection: TextSelection;
};
}
interface ModeHistoryItem {
type: 'mode';
undo: {
mode: Mode;
selection: undefined;
};
redo: {
mode: Mode;
selection: undefined;
};
}
type HistoryItem = TreeHistoryItem | TextHistoryItem | ModeHistoryItem;
interface HistoryInstance<T> {
get: () => History<T>;
}
interface History<T> {
canUndo: boolean;
canRedo: boolean;
items: () => T[];
add: (item: T) => void;
clear: () => void;
undo: () => T | undefined;
redo: () => T | undefined;
}
type ConvertType = 'value' | 'object' | 'array';

@@ -442,2 +481,3 @@ type InsertType = ConvertType | 'structure';

content?: Content;
selection?: JSONEditorSelection;
readOnly?: boolean;

@@ -1083,2 +1123,5 @@ indentation?: number | string;

declare function hasSearchResults(state: SearchResults | undefined): state is WithSearchResults;
declare function isTreeHistoryItem(historyItem: HistoryItem | undefined): historyItem is TreeHistoryItem;
declare function isTextHistoryItem(historyItem: HistoryItem | undefined): historyItem is TextHistoryItem;
declare function isModeHistoryItem(historyItem: HistoryItem | undefined): historyItem is ModeHistoryItem;

@@ -1096,2 +1139,2 @@ interface CreateJSONEditorProps {

export { type AbsolutePopupContext, type AbsolutePopupOptions, type AfterPatchCallback, type AfterSelection, type AjvValidatorOptions, type ArrayDocumentState, type ArrayRecursiveState, type ArraySearchResults, type ArrayValidationErrors, BooleanToggle, type CaretPosition, CaretType, type ClipboardValues, ColorPicker, type Content, type ContentErrors, type ContentParseError, type ContentValidationErrors, type ContextMenuColumn, type ContextMenuItem, type ContextMenuRow, type ConvertType, type CreateJSONEditorProps, type DocumentState, type DragInsideAction, type DragInsideProps, type DraggingState, type EditKeySelection, type EditValueSelection, EditableValue, EnumValue, type EscapeValue, type ExtendedSearchResultItem, type FindNextInside, type HistoryItem, type InsertType, type InsideSelection, type JSONContent, JSONEditor, type JSONEditorContext, type JSONEditorModalCallback, type JSONEditorModalProps, type JSONEditorPropsOptional, type JSONEditorSelection, type JSONParser, type JSONPatchResult, type JSONPathParser, type JSONRepairModalProps, type JSONSchema, type JSONSchemaDefinitions, type JSONSchemaEnum, type JSONSelection, JsonEditor, type KeySelection, type MenuButton, type MenuDropDownButton, type MenuItem, type MenuLabel, type MenuSeparator, type MenuSpace, type MessageAction, Mode, type MultiSelection, type NestedValidationError, type NumberOption, type ObjectDocumentState, type ObjectRecursiveState, type ObjectSearchResults, type ObjectValidationErrors, type OnBlur, type OnChange, type OnChangeMode, type OnChangeQueryLanguage, type OnChangeStatus, type OnChangeText, type OnClassName, type OnContextMenu, type OnError, type OnExpand, type OnFind, type OnFocus, type OnJSONEditorModal, type OnJSONSelect, type OnPaste, type OnPasteJson, type OnPatch, type OnRenderContextMenu, type OnRenderContextMenuInternal, type OnRenderMenu, type OnRenderMenuInternal, type OnRenderValue, type OnSelect, type OnSort, type OnSortModal, type OnTransformModal, type ParseError, type PastedJson, type PathOption, type PopupEntry, type QueryLanguage, type QueryLanguageOptions, ReadonlyValue, type RecursiveState, type RecursiveStateFactory, type RenderContextMenuContext, type RenderMenuContext, type RenderValueComponentDescription, type RenderValueProps, type RenderValuePropsOptional, type RenderedItem, type RichValidationError, SearchField, type SearchOptions, type SearchResultDetails, type SearchResultItem, type SearchResults, type Section, SelectionType, SortDirection, type SortModalCallback, type SortedColumn, type SvelteActionRenderer, type SvelteComponentRenderer, type TableCellIndex, type TextContent, type TextLocation, type TextSelection, TimestampTag, type TransformModalCallback, type TransformModalOptions, type TransformModalProps, type TreeModeContext, type UnescapeValue, UpdateSelectionAfterChange, type ValidationError, type ValidationErrors, ValidationSeverity, type Validator, type ValueDocumentState, type ValueNormalization, type ValueRecursiveState, type ValueSearchResults, type ValueSelection, type ValueValidationErrors, type VisibleSection, type WithSearchResults, createAfterSelection, createAjvValidator, 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, isMultiSelection, isNestedValidationError, isObject, isObjectOrArray, isObjectRecursiveState, isSvelteActionRenderer, isSvelteComponentRenderer, isTextContent, isTimestamp, isUrl, isValidationError, isValueRecursiveState, isValueSelection, javascriptQueryLanguage, jmespathQueryLanguage, jsonQueryLanguage, jsonpathQueryLanguage, keyComboFromEvent, lodashQueryLanguage, onEscape, parseJSONPath, renderJSONSchemaEnum, renderValue, resizeObserver, stringConvert, stringifyJSONPath, toJSONContent, toTextContent, valueType };
export { type AbsolutePopupContext, type AbsolutePopupOptions, type AfterPatchCallback, type AfterSelection, type AjvValidatorOptions, type ArrayDocumentState, type ArrayRecursiveState, type ArraySearchResults, type ArrayValidationErrors, BooleanToggle, type CaretPosition, CaretType, type ClipboardValues, ColorPicker, type Content, type ContentErrors, type ContentParseError, type ContentValidationErrors, type ContextMenuColumn, type ContextMenuItem, type ContextMenuRow, type ConvertType, type CreateJSONEditorProps, type DocumentState, type DragInsideAction, type DragInsideProps, type DraggingState, type EditKeySelection, type EditValueSelection, EditableValue, EnumValue, type EscapeValue, type ExtendedSearchResultItem, type FindNextInside, type History, type HistoryInstance, type HistoryItem, type InsertType, type InsideSelection, type JSONContent, JSONEditor, type JSONEditorContext, type JSONEditorModalCallback, type JSONEditorModalProps, type JSONEditorPropsOptional, type JSONEditorSelection, type JSONParser, type JSONPatchResult, type JSONPathParser, type JSONRepairModalProps, type JSONSchema, type JSONSchemaDefinitions, type JSONSchemaEnum, type JSONSelection, JsonEditor, type KeySelection, type MenuButton, type MenuDropDownButton, type MenuItem, type MenuLabel, type MenuSeparator, type MenuSpace, type MessageAction, Mode, type ModeHistoryItem, type MultiSelection, type NestedValidationError, type NumberOption, type ObjectDocumentState, type ObjectRecursiveState, type ObjectSearchResults, type ObjectValidationErrors, type OnBlur, type OnChange, type OnChangeMode, type OnChangeQueryLanguage, type OnChangeStatus, type OnChangeText, type OnClassName, type OnContextMenu, type OnError, type OnExpand, type OnFind, type OnFocus, type OnJSONEditorModal, type OnJSONSelect, type OnPaste, type OnPasteJson, type OnPatch, type OnRedo, type OnRenderContextMenu, type OnRenderContextMenuInternal, type OnRenderMenu, type OnRenderMenuInternal, type OnRenderValue, type OnSelect, type OnSort, type OnSortModal, type OnTransformModal, type OnUndo, type ParseError, type PastedJson, type PathOption, type PopupEntry, type QueryLanguage, type QueryLanguageOptions, ReadonlyValue, type RecursiveState, type RecursiveStateFactory, type RenderContextMenuContext, type RenderMenuContext, type RenderValueComponentDescription, type RenderValueProps, type RenderValuePropsOptional, type RenderedItem, type RichValidationError, SearchField, type SearchOptions, type SearchResultDetails, type SearchResultItem, type SearchResults, type Section, SelectionType, SortDirection, type SortModalCallback, type SortedColumn, type SvelteActionRenderer, type SvelteComponentRenderer, type TableCellIndex, type TextChanges, type TextContent, type TextHistoryItem, type TextLocation, type TextSelection, TimestampTag, type TransformModalCallback, type TransformModalOptions, type TransformModalProps, type TreeHistoryItem, type TreeModeContext, type UnescapeValue, UpdateSelectionAfterChange, type ValidationError, type ValidationErrors, ValidationSeverity, type Validator, type ValueDocumentState, type ValueNormalization, type ValueRecursiveState, type ValueSearchResults, type ValueSelection, type ValueValidationErrors, type VisibleSection, type WithSearchResults, createAfterSelection, createAjvValidator, 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 };

2

package.json
{
"name": "vanilla-jsoneditor",
"description": "A web-based tool to view, edit, format, transform, and validate JSON",
"version": "2.1.0",
"version": "2.2.0",
"homepage": "https://github.com/josdejong/svelte-jsoneditor",

@@ -6,0 +6,0 @@ "repository": {

@@ -303,2 +303,4 @@ import { SvelteComponent, SvelteComponentTyped, mount } from 'svelte';

type OnSelect = (selection: JSONEditorSelection | undefined) => void;
type OnUndo = (item: HistoryItem | undefined) => void;
type OnRedo = (item: HistoryItem | undefined) => void;
type OnPatch = (operations: JSONPatchDocument, afterPatch?: AfterPatchCallback) => JSONPatchResult;

@@ -393,3 +395,4 @@ type OnChangeText = (updatedText: string, afterPatch?: AfterPatchCallback) => void;

}
interface HistoryItem {
interface TreeHistoryItem {
type: 'tree';
undo: {

@@ -414,2 +417,38 @@ patch: JSONPatchDocument | undefined;

}
type TextChanges = Array<number | [number, ...string[]]>;
interface TextHistoryItem {
type: 'text';
undo: {
changes: TextChanges;
selection: TextSelection;
};
redo: {
changes: TextChanges;
selection: TextSelection;
};
}
interface ModeHistoryItem {
type: 'mode';
undo: {
mode: Mode;
selection: undefined;
};
redo: {
mode: Mode;
selection: undefined;
};
}
type HistoryItem = TreeHistoryItem | TextHistoryItem | ModeHistoryItem;
interface HistoryInstance<T> {
get: () => History<T>;
}
interface History<T> {
canUndo: boolean;
canRedo: boolean;
items: () => T[];
add: (item: T) => void;
clear: () => void;
undo: () => T | undefined;
redo: () => T | undefined;
}
type ConvertType = 'value' | 'object' | 'array';

@@ -442,2 +481,3 @@ type InsertType = ConvertType | 'structure';

content?: Content;
selection?: JSONEditorSelection;
readOnly?: boolean;

@@ -1083,2 +1123,5 @@ indentation?: number | string;

declare function hasSearchResults(state: SearchResults | undefined): state is WithSearchResults;
declare function isTreeHistoryItem(historyItem: HistoryItem | undefined): historyItem is TreeHistoryItem;
declare function isTextHistoryItem(historyItem: HistoryItem | undefined): historyItem is TextHistoryItem;
declare function isModeHistoryItem(historyItem: HistoryItem | undefined): historyItem is ModeHistoryItem;

@@ -1096,2 +1139,2 @@ interface CreateJSONEditorProps {

export { type AbsolutePopupContext, type AbsolutePopupOptions, type AfterPatchCallback, type AfterSelection, type AjvValidatorOptions, type ArrayDocumentState, type ArrayRecursiveState, type ArraySearchResults, type ArrayValidationErrors, BooleanToggle, type CaretPosition, CaretType, type ClipboardValues, ColorPicker, type Content, type ContentErrors, type ContentParseError, type ContentValidationErrors, type ContextMenuColumn, type ContextMenuItem, type ContextMenuRow, type ConvertType, type CreateJSONEditorProps, type DocumentState, type DragInsideAction, type DragInsideProps, type DraggingState, type EditKeySelection, type EditValueSelection, EditableValue, EnumValue, type EscapeValue, type ExtendedSearchResultItem, type FindNextInside, type HistoryItem, type InsertType, type InsideSelection, type JSONContent, JSONEditor, type JSONEditorContext, type JSONEditorModalCallback, type JSONEditorModalProps, type JSONEditorPropsOptional, type JSONEditorSelection, type JSONParser, type JSONPatchResult, type JSONPathParser, type JSONRepairModalProps, type JSONSchema, type JSONSchemaDefinitions, type JSONSchemaEnum, type JSONSelection, JsonEditor, type KeySelection, type MenuButton, type MenuDropDownButton, type MenuItem, type MenuLabel, type MenuSeparator, type MenuSpace, type MessageAction, Mode, type MultiSelection, type NestedValidationError, type NumberOption, type ObjectDocumentState, type ObjectRecursiveState, type ObjectSearchResults, type ObjectValidationErrors, type OnBlur, type OnChange, type OnChangeMode, type OnChangeQueryLanguage, type OnChangeStatus, type OnChangeText, type OnClassName, type OnContextMenu, type OnError, type OnExpand, type OnFind, type OnFocus, type OnJSONEditorModal, type OnJSONSelect, type OnPaste, type OnPasteJson, type OnPatch, type OnRenderContextMenu, type OnRenderContextMenuInternal, type OnRenderMenu, type OnRenderMenuInternal, type OnRenderValue, type OnSelect, type OnSort, type OnSortModal, type OnTransformModal, type ParseError, type PastedJson, type PathOption, type PopupEntry, type QueryLanguage, type QueryLanguageOptions, ReadonlyValue, type RecursiveState, type RecursiveStateFactory, type RenderContextMenuContext, type RenderMenuContext, type RenderValueComponentDescription, type RenderValueProps, type RenderValuePropsOptional, type RenderedItem, type RichValidationError, SearchField, type SearchOptions, type SearchResultDetails, type SearchResultItem, type SearchResults, type Section, SelectionType, SortDirection, type SortModalCallback, type SortedColumn, type SvelteActionRenderer, type SvelteComponentRenderer, type TableCellIndex, type TextContent, type TextLocation, type TextSelection, TimestampTag, type TransformModalCallback, type TransformModalOptions, type TransformModalProps, type TreeModeContext, type UnescapeValue, UpdateSelectionAfterChange, type ValidationError, type ValidationErrors, ValidationSeverity, type Validator, type ValueDocumentState, type ValueNormalization, type ValueRecursiveState, type ValueSearchResults, type ValueSelection, type ValueValidationErrors, type VisibleSection, type WithSearchResults, createAfterSelection, createAjvValidator, 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, isMultiSelection, isNestedValidationError, isObject, isObjectOrArray, isObjectRecursiveState, isSvelteActionRenderer, isSvelteComponentRenderer, isTextContent, isTimestamp, isUrl, isValidationError, isValueRecursiveState, isValueSelection, javascriptQueryLanguage, jmespathQueryLanguage, jsonQueryLanguage, jsonpathQueryLanguage, keyComboFromEvent, lodashQueryLanguage, onEscape, parseJSONPath, renderJSONSchemaEnum, renderValue, resizeObserver, stringConvert, stringifyJSONPath, toJSONContent, toTextContent, valueType };
export { type AbsolutePopupContext, type AbsolutePopupOptions, type AfterPatchCallback, type AfterSelection, type AjvValidatorOptions, type ArrayDocumentState, type ArrayRecursiveState, type ArraySearchResults, type ArrayValidationErrors, BooleanToggle, type CaretPosition, CaretType, type ClipboardValues, ColorPicker, type Content, type ContentErrors, type ContentParseError, type ContentValidationErrors, type ContextMenuColumn, type ContextMenuItem, type ContextMenuRow, type ConvertType, type CreateJSONEditorProps, type DocumentState, type DragInsideAction, type DragInsideProps, type DraggingState, type EditKeySelection, type EditValueSelection, EditableValue, EnumValue, type EscapeValue, type ExtendedSearchResultItem, type FindNextInside, type History, type HistoryInstance, type HistoryItem, type InsertType, type InsideSelection, type JSONContent, JSONEditor, type JSONEditorContext, type JSONEditorModalCallback, type JSONEditorModalProps, type JSONEditorPropsOptional, type JSONEditorSelection, type JSONParser, type JSONPatchResult, type JSONPathParser, type JSONRepairModalProps, type JSONSchema, type JSONSchemaDefinitions, type JSONSchemaEnum, type JSONSelection, JsonEditor, type KeySelection, type MenuButton, type MenuDropDownButton, type MenuItem, type MenuLabel, type MenuSeparator, type MenuSpace, type MessageAction, Mode, type ModeHistoryItem, type MultiSelection, type NestedValidationError, type NumberOption, type ObjectDocumentState, type ObjectRecursiveState, type ObjectSearchResults, type ObjectValidationErrors, type OnBlur, type OnChange, type OnChangeMode, type OnChangeQueryLanguage, type OnChangeStatus, type OnChangeText, type OnClassName, type OnContextMenu, type OnError, type OnExpand, type OnFind, type OnFocus, type OnJSONEditorModal, type OnJSONSelect, type OnPaste, type OnPasteJson, type OnPatch, type OnRedo, type OnRenderContextMenu, type OnRenderContextMenuInternal, type OnRenderMenu, type OnRenderMenuInternal, type OnRenderValue, type OnSelect, type OnSort, type OnSortModal, type OnTransformModal, type OnUndo, type ParseError, type PastedJson, type PathOption, type PopupEntry, type QueryLanguage, type QueryLanguageOptions, ReadonlyValue, type RecursiveState, type RecursiveStateFactory, type RenderContextMenuContext, type RenderMenuContext, type RenderValueComponentDescription, type RenderValueProps, type RenderValuePropsOptional, type RenderedItem, type RichValidationError, SearchField, type SearchOptions, type SearchResultDetails, type SearchResultItem, type SearchResults, type Section, SelectionType, SortDirection, type SortModalCallback, type SortedColumn, type SvelteActionRenderer, type SvelteComponentRenderer, type TableCellIndex, type TextChanges, type TextContent, type TextHistoryItem, type TextLocation, type TextSelection, TimestampTag, type TransformModalCallback, type TransformModalOptions, type TransformModalProps, type TreeHistoryItem, type TreeModeContext, type UnescapeValue, UpdateSelectionAfterChange, type ValidationError, type ValidationErrors, ValidationSeverity, type Validator, type ValueDocumentState, type ValueNormalization, type ValueRecursiveState, type ValueSearchResults, type ValueSelection, type ValueValidationErrors, type VisibleSection, type WithSearchResults, createAfterSelection, createAjvValidator, 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 };

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc