svelte-jsoneditor
Advanced tools
Comparing version 0.6.3 to 0.6.4
@@ -5,2 +5,9 @@ # Changelog | ||
### [0.6.4](https://github.com/josdejong/svelte-jsoneditor/compare/v0.6.3...v0.6.4) (2022-08-19) | ||
### Bug Fixes | ||
* [#124](https://github.com/josdejong/svelte-jsoneditor/issues/124) view jumping up when editor gets focus ([b94f531](https://github.com/josdejong/svelte-jsoneditor/commit/b94f5317cfba8f7dbe6debf915b9852949f6196f)) | ||
### [0.6.3](https://github.com/josdejong/svelte-jsoneditor/compare/v0.6.2...v0.6.3) (2022-08-16) | ||
@@ -39,3 +46,2 @@ | ||
* implement validate method and pass contentErrors via onChange, fixes [#56](https://github.com/josdejong/svelte-jsoneditor/issues/56) ([#119](https://github.com/josdejong/svelte-jsoneditor/issues/119)) ([9847382](https://github.com/josdejong/svelte-jsoneditor/commit/9847382396fe5f853f8ecfde4d5227175c498bf4)) | ||
* implement validate method and pass contentErrors via onChange, fixes [#56](https://github.com/josdejong/svelte-jsoneditor/issues/56) ([#119](https://github.com/josdejong/svelte-jsoneditor/issues/119)) ([705f5f2](https://github.com/josdejong/svelte-jsoneditor/commit/705f5f2ed76a24e671f35f9721ff93d165a4f7bc)) | ||
@@ -42,0 +48,0 @@ |
{ | ||
"name": "svelte-jsoneditor", | ||
"description": "A web-based tool to view, edit, format, transform, and validate JSON", | ||
"version": "0.6.3", | ||
"version": "0.6.4", | ||
"type": "module", | ||
@@ -16,7 +16,7 @@ "svelte": "index.js", | ||
"dependencies": { | ||
"@codemirror/commands": "^6.0.1", | ||
"@codemirror/commands": "^6.1.0", | ||
"@codemirror/lang-json": "^6.0.0", | ||
"@codemirror/language": "^6.2.1", | ||
"@codemirror/lint": "^6.0.0", | ||
"@codemirror/search": "^6.0.1", | ||
"@codemirror/search": "^6.1.0", | ||
"@codemirror/state": "^6.1.1", | ||
@@ -59,4 +59,4 @@ "@codemirror/view": "^6.2.0", | ||
"@types/mocha": "9.1.1", | ||
"@typescript-eslint/eslint-plugin": "5.33.0", | ||
"@typescript-eslint/parser": "5.33.0", | ||
"@typescript-eslint/eslint-plugin": "5.33.1", | ||
"@typescript-eslint/parser": "5.33.1", | ||
"cpy-cli": "4.1.0", | ||
@@ -77,9 +77,9 @@ "del-cli": "5.0.0", | ||
"standard-version": "9.5.0", | ||
"svelte-check": "2.8.0", | ||
"svelte-check": "2.8.1", | ||
"svelte-preprocess": "4.10.7", | ||
"svelte2tsx": "0.5.13", | ||
"svelte2tsx": "0.5.14", | ||
"ts-node": "10.9.1", | ||
"tslib": "2.4.0", | ||
"typescript": "4.7.4", | ||
"vite": "3.0.7" | ||
"vite": "3.0.8" | ||
}, | ||
@@ -86,0 +86,0 @@ "exports": { |
@@ -198,3 +198,3 @@ # svelte-jsoneditor | ||
Callback fired when an error occurs. Default implementation is to log an error in the console and show a simple alert message to the user. | ||
- `onChange(content: Content, previousContent: Content, changeStatus: { contentErrors: ContentErrors, patchResult: JSONPatchResult | null })`. The callback which is invoked on every change made in the JSON document. The parameter `patchResult` is only available in `tree` mode, and not in `text` mode, since a change in arbitrary text cannot be expressed as a JSON Patch document. | ||
- `onChange(content: Content, previousContent: Content, changeStatus: { contentErrors: ContentErrors, patchResult: JSONPatchResult | null })`. The callback which is invoked on every change made by a user in the JSON document. The callback is _not_ triggered after programmatic changes made via methods like `.set()`, `.update()`, or `.patch()`. The parameter `patchResult` is only available in `tree` mode, and not in `text` mode, since a change in arbitrary text cannot be expressed as a JSON Patch document. | ||
- `onChangeMode(mode: 'tree' | 'text')`. Invoked when the mode is changed. | ||
@@ -298,3 +298,3 @@ - `onClassName(path: Path, value: any): string | undefined`. | ||
- `editor.expand(path => path.length < 2)` expand all paths up to 2 levels deep | ||
- `transform({ id?: string, selectedPath?: [], onTransform?: ({ operations: JSONPatchDocument, json: JSONData, transformedJson: JSONData }) => void, onClose?: () => void })` programmatically trigger clicking of the transform button in the main menu, opening the transform model. If a callback `onTransform` is provided, it will replace the build-in logic to apply a transform, allowing you to process the transform operations in an alternative way. If provided, `onClose` callback will trigger when the transform modal closes, both after the user clicked apply or cancel. If an `id` is provided, the transform modal will load the previous status of this `id` instead of the status of the editors transform modal. | ||
- `transform({ id?: string, selectedPath?: [], onTransform: ({ operations: JSONPatchDocument, json: JSONData, transformedJson: JSONData }) => void, onClose: () => void })` programmatically trigger clicking of the transform button in the main menu, opening the transform model. If a callback `onTransform` is provided, it will replace the build-in logic to apply a transform, allowing you to process the transform operations in an alternative way. If provided, `onClose` callback will trigger when the transform modal closes, both after the user clicked apply or cancel. If an `id` is provided, the transform modal will load the previous status of this `id` instead of the status of the editors transform modal. | ||
- `scrollTo(path: Path)` Scroll the editor vertically such that the specified path comes into view. The path will be expanded when needed. | ||
@@ -304,2 +304,3 @@ - `findElement(path: Path)` Find the DOM element of a given path. Returns `null` when not found. | ||
- `refresh()`. Refresh rendering of the contents, for example after changing the font size. This is only available in `text` mode. | ||
- `validate() : ContentErrors`. Get all current parse errors and validation errors. | ||
- `focus()`. Give the editor focus. | ||
@@ -306,0 +307,0 @@ - `destroy()`. Destroy the editor, remove it from the DOM. |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
976697
564
Updated@codemirror/commands@^6.1.0
Updated@codemirror/search@^6.1.0