Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade to Svelte 5 #476

Closed
wants to merge 104 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
104 commits
Select commit Hold shift + click to select a range
b322bcf
chore: upgrade to svelte 5 (WIP)
josdejong May 6, 2024
19e2a58
chore: refactor the data structures holding state into recursive stru…
josdejong Jun 14, 2024
ed66b0b
chore: update devDependencies
josdejong Jun 14, 2024
3a9d51b
feat: refactor the API to use `undefined` instead of `null` (#453)
josdejong Jun 17, 2024
18c4743
fix: short cut key `Ctrl+F` and `Ctrl+H` not working in table mode wh…
josdejong Jun 17, 2024
47683d4
chore: cleanup deprecation messages
josdejong Jun 17, 2024
a3aeedd
chore: update devDependencies
josdejong Jun 17, 2024
c098332
chore: upgrade to the latest version of svelte@5
josdejong Jun 19, 2024
3bda70e
chore: run `npm audit fix`
josdejong Jun 19, 2024
8c436ed
fix: the do you want to format message popped up after clicking the "…
josdejong Jun 19, 2024
f257b24
Merge branch 'refs/heads/main' into v1
josdejong Jun 26, 2024
1e1e85c
feat: implemented a powerful API for expand and collapse (#458)
josdejong Jul 5, 2024
4b2daf5
feat: upgrade to the latest version of `codemirror` and update devDep…
josdejong Jul 5, 2024
416cba2
fix: in table mode, exit editing a key or value when clicking outside…
josdejong Jul 8, 2024
1f1d548
Merge branch 'refs/heads/v1' into feat/svelte5
josdejong Jul 8, 2024
1ee2a21
chore: upgrade to `svelte@5.0.0-next.175`
josdejong Jul 8, 2024
bddcbe2
chore: remove the deprecated `immutable` option
josdejong Jul 8, 2024
5493333
chore: define svelte@4 or svelte@5 as peer dependency
josdejong Jul 8, 2024
cdbe395
chore: replace self-closing HTML tags with regular HTML tags
josdejong Jul 8, 2024
affd63e
chore: fix a linting issue
josdejong Jul 8, 2024
4120f29
chore: add a TODO to fully migrate to Svelte 5 runes
josdejong Jul 8, 2024
9234a59
chore: reorder some CSS to fix some styling issues in Svelte 5 (WIP)
josdejong Jul 8, 2024
1936750
fix: define `svelte@4` as a peer dependency
josdejong Jul 8, 2024
5d5124a
fix: update test snapshots
josdejong Jul 8, 2024
f2c3afb
feat: use `dialog` for `SortModal` and `CopyPasteModal` (WIP)
josdejong Jul 8, 2024
f3e6b09
chore: refactor the Modal to have an `onClose` callback instead of `o…
josdejong Jul 8, 2024
22588bb
chore: refactor the TransformModal to use dialog (WIP)
josdejong Jul 8, 2024
3586283
chore: change `husky install` into `husky`
josdejong Jul 9, 2024
55aca06
chore: update package-lock.json
josdejong Jul 9, 2024
58072b4
chore: refactor `JSONRepairModal` to use dialog
josdejong Jul 9, 2024
df6b02c
chore: refactor `JSONEditorModal` to use dialog, remove dependency `s…
josdejong Jul 9, 2024
cb7bcf6
chore: refactor the sizing of the modals
josdejong Jul 9, 2024
f7ad04b
fix: get `use:onEscape` working with the `dialog` setup
josdejong Jul 9, 2024
983c9a2
fix: onClose callback of modals not propagated
josdejong Jul 9, 2024
8aaa1a4
fix: #451 add aria-label to the editable div
josdejong Jul 10, 2024
e41bb75
fix: context menu and color picker not visible in JSONEditorModal (WIP)
josdejong Jul 11, 2024
dfcd39f
fix: linting issues
josdejong Jul 11, 2024
1d5f983
fix: update test snapshots
josdejong Jul 11, 2024
2df86b5
feat: export more utility functions (fixes #454)
josdejong Jul 11, 2024
2f3c250
chore: refactor paste as JSON logic (#460)
josdejong Jul 11, 2024
5c26337
fix: let `getInRecursiveState` return undefined instead of throwing a…
josdejong Jul 11, 2024
8d93a44
Merge branch 'refs/heads/v1' into feat/dialog
josdejong Jul 11, 2024
425c7a7
fix: context menu and color picker not overflowing the edge of the di…
josdejong Jul 11, 2024
dfe4af8
fix: escape in nested JSONEditorModals closing all modals instead of …
josdejong Jul 11, 2024
551c8af
fix: some reorganization of the styles
josdejong Jul 11, 2024
0c5ebc0
fix: selection not applied after editing a key or value
josdejong Jul 11, 2024
38357fa
fix: extracting a part of the document broken
josdejong Jul 11, 2024
80807f6
docs: describe browser requirements (March 2022 or newer)
josdejong Jul 12, 2024
86ce27f
chore: refactor `documentStatePatch` so it can correctly handle multi…
josdejong Jul 12, 2024
aa00620
chore: replace `svelte-simple-modal` with native HTML `<dialog />` (#…
josdejong Jul 12, 2024
e1785bd
Merge branch 'refs/heads/v1' into chore/refactor-documentStatePatch
josdejong Jul 12, 2024
a342c08
chore: solve merge conflict
josdejong Jul 12, 2024
b08b1f6
chore: cleanup a resolved FIXME
josdejong Jul 12, 2024
cd438f2
Merge branch 'refs/heads/v1' into feat/svelte5
josdejong Jul 15, 2024
2c9a611
chore: update devDependencies
josdejong Jul 15, 2024
8604049
feat: upgrade to the latest version of `ajv` and `sass`
josdejong Jul 15, 2024
e90390d
chore: fix JSONEditorModal closing when clicking ESC when editing a v…
josdejong Jul 15, 2024
c807600
chore: refactor `KeySelection` and `ValueSelection` (#463)
josdejong Jul 15, 2024
c2d79c9
chore: replace `updateSelection(...)` with `selection = ...`
josdejong Jul 15, 2024
b6945ea
chore: upgrade eslint configuration
josdejong Jul 15, 2024
c4b823a
chore: fix using a deprecated import of `svelte-preprocess`
josdejong Jul 15, 2024
483a9c3
chore: configure `.browserslistrc`
josdejong Jul 15, 2024
b1fd963
chore: fix babel build warnings
josdejong Jul 15, 2024
222af37
chore: fix Apply button in JSONEditorModal not working
josdejong Jul 15, 2024
a4b8df5
Merge branch 'refs/heads/v1' into feat/svelte5
josdejong Jul 15, 2024
618b3f8
chore: upgrae to `svelte@5.0.0-next.184`
josdejong Jul 15, 2024
0b934e3
chore: refactor selection styling (#468)
josdejong Jul 23, 2024
6526761
chore: move the ValidationErrorIcon outside the table value cell
josdejong Jul 23, 2024
1a010db
chore: fix a build-warning and update test snapshots
josdejong Jul 23, 2024
51466f0
docs: update example `EnumValue`
josdejong Jul 23, 2024
b3fceb5
chore: fix a linting issue
josdejong Jul 23, 2024
3281e44
Merge branch 'refs/heads/v1' into feat/svelte5
josdejong Jul 24, 2024
6417b79
chore: upgrade to `svelte@5.0.0-next.197`
josdejong Jul 24, 2024
4edf7dd
feat: change the default query language to `jsonquery` (#469)
josdejong Jul 25, 2024
ee6defb
feat: implement support for the query language `JSONPath` (#470)
josdejong Jul 25, 2024
0de0caa
Merge branch 'main' into v1
josdejong Jul 26, 2024
abce71c
fix: #464 `readOnly` doesn't work on chrome in `text` mode
josdejong Jul 26, 2024
4faad82
chore: dependencies and devDependencies
josdejong Jul 26, 2024
cbdd745
chore: add a rule to the `arraySchema`
josdejong Jul 26, 2024
a496b73
chore: fix linting issue
josdejong Jul 26, 2024
7d6427e
chore: fix SortModal not restoring the previous state
josdejong Jul 26, 2024
814a09d
chore: fix closing ContextMenu using Escape also closing JSONEditorModal
josdejong Jul 26, 2024
4e5fce5
chore: some fixes related to losing focus in the modals
josdejong Jul 26, 2024
a83b54a
chore: give the background area behind the SearchBox a light gray col…
josdejong Jul 26, 2024
bc52545
chore: rename `updatedJson` to `json`
josdejong Jul 26, 2024
2ee127b
chore: fix not always remembering the initial `enforceString` state
josdejong Jul 26, 2024
590a161
Merge branch 'refs/heads/v1' into feat/svelte5
josdejong Jul 26, 2024
2777d72
chore: update package-lock.json
josdejong Jul 26, 2024
db3ec03
chore: fix merge problem in TransformWizard.svelte
josdejong Jul 26, 2024
75824f5
chore: fix some styling issues on hovering over nested contents in tr…
josdejong Jul 30, 2024
951003a
chore: fix a styling issue in table mode when the editing a value is …
josdejong Jul 30, 2024
f192344
chore: fix left padding of the color picker button
josdejong Jul 30, 2024
39fb408
chore: fix a styling issue in table mode when the editing a value is …
josdejong Jul 30, 2024
5a4c425
chore: fix focus issues in TableMode
josdejong Jul 30, 2024
e2d46de
chore: fix shortly losing focus when clicking on a validation error i…
josdejong Jul 30, 2024
32c3e45
chore: give the area behind the search box a light gray color in tree…
josdejong Jul 30, 2024
fb60a9c
chore: fix linting issues
josdejong Jul 30, 2024
ff859f1
chore: update test snapshots
josdejong Jul 30, 2024
6f30e50
Merge branch 'refs/heads/v1' into feat/svelte5
josdejong Aug 1, 2024
dec80f9
chore: update devDependencies
josdejong Aug 1, 2024
5edb7c5
chore: remove passing `parser` to function `getEnforceString`
josdejong Aug 1, 2024
815de5d
Merge branch 'refs/heads/v1' into feat/svelte5
josdejong Aug 1, 2024
33c860a
chore: update package-lock.json
josdejong Aug 1, 2024
6c2a2eb
chore: get the Rollup bundle working (WIP)
josdejong Aug 2, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .browserslistrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Test out at: https://browsersl.ist/

fully supports es6
not dead
31 changes: 0 additions & 31 deletions .eslintrc.json

This file was deleted.

6 changes: 3 additions & 3 deletions README-VANILLA.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

A web-based tool to view, edit, format, transform, and validate JSON.

Try it out: https://jsoneditoronline.org
Try it out: <https://jsoneditoronline.org>

This is the vanilla variant of `svelte-jsoneditor`, which can be used in vanilla JavaScript or frameworks like SolidJS, React, Vue, Angular.

Expand Down Expand Up @@ -50,7 +50,7 @@ import { JSONEditor } from 'vanilla-jsoneditor/standalone.js'

The standalone bundle contains all dependencies of `vanilla-jsoneditor`, for example `lodash-es` and `Ajv`. If you use some of these dependencies in your project too, it means that they will be bundled twice in your web application, leading to a needlessly large application size. In general, it is preferable to use the default `import { JSONEditor } from 'vanilla-jsoneditor'` so dependencies can be reused.

## Use (Browser example loading the ES module):
## Use (Browser example loading the ES module)

```html
<!doctype html>
Expand Down Expand Up @@ -100,7 +100,7 @@ The standalone bundle contains all dependencies of `vanilla-jsoneditor`, for exa

Depending on whether you are using JavaScript of TypeScript, create either a JSX or TSX file:

### TypeScript:
### TypeScript

```tsx
//
Expand Down
118 changes: 90 additions & 28 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

A web-based tool to view, edit, format, transform, and validate JSON.

Try it out: https://jsoneditoronline.org
Try it out: <https://jsoneditoronline.org>

The library is written with Svelte, but can be used in plain JavaScript too and in any framework (SolidJS, React, Vue, Angular, etc).
The library is written with Svelte, but can be used in plain JavaScript too and in any framework (SolidJS, React, Vue, Angular, etc.). It requires a browser from March 2022 or newer.

![JSONEditor tree mode screenshot](https://raw.githubusercontent.com/josdejong/svelte-jsoneditor/main/misc/jsoneditor_tree_mode_screenshot.png)
![JSONEditor text mode screenshot](https://raw.githubusercontent.com/josdejong/svelte-jsoneditor/main/misc/jsoneditor_text_mode_screenshot.png)
Expand Down Expand Up @@ -41,13 +41,13 @@ npm install vanilla-jsoneditor
### Examples

- Svelte:
- Playground: https://www.sveltelab.dev/q1l38ztdys4at87
- Playground: <https://www.sveltelab.dev/q1l38ztdys4at87>
- Examples: [/src/routes/examples](/src/routes/examples)
- Plain JavaScript examples:
- Try it out: https://jsbin.com/gatibux/edit?html,output
- Try it out: <https://jsbin.com/gatibux/edit?html,output>
- Examples: [/examples/browser](/examples/browser)
- React example: https://codesandbox.io/s/svelte-jsoneditor-react-59wxz
- Vue example: https://codesandbox.io/s/svelte-jsoneditor-vue-toln3w
- React example: <https://codesandbox.io/s/svelte-jsoneditor-react-59wxz>
- Vue example: <https://codesandbox.io/s/svelte-jsoneditor-vue-toln3w>

### Svelte usage

Expand Down Expand Up @@ -229,10 +229,10 @@ Pass the JSON contents to be rendered in the JSONEditor. `Content` is an object
#### selection

```ts
selection: JSONEditorSelection | null
selection: JSONEditorSelection | undefined
```

The current selected contents. You can use two-way binding using `bind:selection`. The `tree` mode supports `MultiSelection`, `KeySelection`, `ValueSelection`, `InsideSelection`, or `AfterSelection`. The `table` mode supports `ValueSelection`, and `text` mode supports `TextSelection.`.
The current selected contents. You can use two-way binding using `bind:selection`. The `tree` mode supports `MultiSelection`, `KeySelection`, `EditKeySelection`, `ValueSelection`, `EditValueSelection`, `InsideSelection`, or `AfterSelection`. The `table` mode supports `ValueSelection`, and `text` mode supports `TextSelection.`.

#### mode

Expand Down Expand Up @@ -386,7 +386,7 @@ Callback fired when an error occurs. Default implementation is to log an error i
#### onChange

```ts
onChange(content: Content, previousContent: Content, changeStatus: { contentErrors: ContentErrors | null, patchResult: JSONPatchResult | null })
onChange(content: Content, previousContent: Content, changeStatus: { contentErrors: ContentErrors | undefined, patchResult: JSONPatchResult | undefined })
```

The callback which is invoked on every change of the contents made by the user from within the editor. It will not trigger on changes that are applied programmatically via methods like `.set()`, `.update()`, or `.patch()`.
Expand All @@ -404,7 +404,7 @@ Invoked when the mode is changed.
#### onClassName

```ts
onClassName(path: Path, value: any): string | undefined
onClassName(path: JSONPath, value: any): string | undefined
```

Add a custom class name to specific nodes, based on their path and/or value. Note that in the custom class, you can override CSS variables like `--jse-contents-background-color` to change the styling of a node, like the background color. Relevant variables are:
Expand Down Expand Up @@ -519,7 +519,7 @@ A menu item `MenuItem` can be one of the following types:
#### onRenderContextMenu

```ts
onRenderContextMenu(items: ContextMenuItem[], context: { mode: 'tree' | 'text' | 'table', modal: boolean, readOnly: boolean, selection: JSONEditorSelection | null }) : ContextMenuItem[] | false | undefined
onRenderContextMenu(items: ContextMenuItem[], context: { mode: 'tree' | 'text' | 'table', modal: boolean, readOnly: boolean, selection: JSONEditorSelection | undefined }) : ContextMenuItem[] | false | undefined
```

Callback which can be used to make changes to the context menu items. New items can be added, or existing items can be removed or reorganized. When the function returns `undefined`, the original `items` will be applied and the context menu will be displayed when `readOnly` is `false`. When the function returns `false`, the context menu will never be displayed. The callback is triggered too when the editor is `readOnly`, and in most cases you want to return `false` then.
Expand Down Expand Up @@ -583,30 +583,48 @@ A menu item `ContextMenuItem` can be one of the following types:
#### onSelect

```ts
onSelect: (selection: JSONEditorSelection | null) => void
onSelect: (selection: JSONEditorSelection | undefined) => void
```

Callback invoked when the selection is changed. When the selection is removed, the callback is invoked with `undefined` as argument. In `text` mode, a `TextSelection` will be fired. In `tree` and `table` mode, a `JSONSelection` will be fired (which can be `MultiSelection`, `KeySelection`, `ValueSelection`, `InsideSelection`, or `AfterSelection`). Use typeguards like `isTextSelection` and `isValueSelection` to check what type the selection has.
Callback invoked when the selection is changed. When the selection is removed, the callback is invoked with `undefined` as argument. In `text` mode, a `TextSelection` will be fired. In `tree` and `table` mode, a `JSONSelection` will be fired (which can be `MultiSelection`, `KeySelection`, `EditKeySelection`, `ValueSelection`, `EditValueSelection`, `InsideSelection`, or `AfterSelection`). Use typeguards like `isTextSelection` and `isValueSelection` to check what type the selection has.

#### queryLanguages

```ts
queryLanguages: QueryLanguage[]
```

Configure one or multiple query language that can be used in the Transform modal. The library comes with three languages:
Configure one or multiple query language that can be used in the Transform modal. The library comes with the following languages included:

- [JSONQuery](https://github.com/josdejong/jsonquery)
- [JMESPath](https://jmespath.org/)
- [JSONPath](https://github.com/JSONPath-Plus/JSONPath)
- JavaScript + [Lodash](https://lodash.com/)
- JavaScript

The languages can be loaded as follows:

```ts
import {
jsonQueryLanguage,
jmespathQueryLanguage,
jsonpathQueryLanguage,
lodashQueryLanguage,
javascriptQueryLanguage
} from 'svelte-jsoneditor'

const allQueryLanguages = [jmespathQueryLanguage, lodashQueryLanguage, javascriptQueryLanguage]
const allQueryLanguages = [
jsonQueryLanguage,
jmespathQueryLanguage,
jsonpathQueryLanguage,
lodashQueryLanguage,
javascriptQueryLanguage
]
```

By default, only `javascriptQueryLanguage` is loaded.
By default, only `jsonQueryLanguage` is loaded in the editor.

Note that both `lodashQueryLanguage` and `javascriptQueryLanguage` can execute arbitrary JavaScript code and use `new Function(...)` to execute the code. Therefore, they are not suitable in general to store or share queries because of the security risks. In some environments, trying to use them will result in CSP (Content Security Policy) errors depending on the security policy.

#### queryLanguageId

Expand Down Expand Up @@ -712,14 +730,33 @@ editor.updateProps({
#### expand

```ts
JSONEditor.prototype.expand([callback: (path: Path) => boolean]): Promise<void>
JSONEditor.prototype.expand(path: JSONPath, callback?: (relativePath: JSONPath) => boolean = expandSelf): Promise<void>
```

Expand or collapse paths in the editor. The `callback` determines which paths will be expanded. If no `callback` is provided, all paths will be expanded. It is only possible to expand a path when all of its parent paths are expanded too. Examples:
Expand or collapse paths in the editor. All nodes along the provided `path` will be expanded and become visible (rendered). So for example collapsed sections of an array will be expanded. Using the optional `callback`, the node itself and some or all of its nested child nodes can be expanded too. The `callback` function only iterates over the visible sections of an array and not over any of the collapsed sections. By default, the first 100 items of an array are visible and rendered.

Examples:

- `editor.expand([], () => true)` expand all
- `editor.expand([], relativePath => relativePath.length < 2)` expand all paths up to 2 levels deep
- `editor.expand(['array', '204'])` expand the root object, the array in this object, and the 204th item in the array.
- `editor.expand(['array', '204'], () => false)` expand the root object, the array in this object, but not the 204th item itself.
- `editor.expand(['array', '204'], relativePath => relativePath.length < 2)` expand the root object, the array in this object, and expand the 204th array item and all of its child's up to a depth of max 2 levels.

- `editor.expand(path => true)` expand all
- `editor.expand(path => false)` collapse all
- `editor.expand(path => path.length < 2)` expand all paths up to 2 levels deep
The library exports a couple of utility functions for commonly used `callback` functions:

- `expandAll`: recursively expand all nested objects and arrays.
- `expandNone`: expand nothing, also not the root object or array.
- `expandSelf`: expand the root array or object. This is the default for the `callback` parameter.
- `expandMinimal`: expand the root array or object, and in case of an array, expand the first array item.

### collapse

```ts
JSONEditor.prototype.collapse(path: JSONPath, recursive?: boolean = false): Promise<void>
```

Collapse a path in the editor. When `recursive` is `true`, all nested objects and arrays will be collapsed too. The default value of `recursive` is `false`.

#### transform

Expand All @@ -732,15 +769,15 @@ Programmatically trigger clicking of the transform button in the main menu, open
#### scrollTo

```ts
JSONEditor.prototype.scrollTo(path: Path): Promise<void>
JSONEditor.prototype.scrollTo(path: JSONPath): Promise<void>
```

Scroll the editor vertically such that the specified path comes into view. Only applicable to modes `tree` and `table`. The path will be expanded when needed. The returned Promise is resolved after scrolling is finished.

#### findElement

```ts
JSONEditor.prototype.findElement(path: Path)
JSONEditor.prototype.findElement(path: JSONPath)
```

Find the DOM element of a given path. Returns `null` when not found.
Expand All @@ -764,15 +801,15 @@ Refresh rendering of the contents, for example after changing the font size. Thi
#### validate

```ts
JSONEditor.prototype.validate() : ContentErrors | null
JSONEditor.prototype.validate() : ContentErrors | undefined
```

Get all current parse errors and validation errors.

#### select

```ts
JSONEditor.prototype.select(newSelection: JSONEditorSelection | null)
JSONEditor.prototype.select(newSelection: JSONEditorSelection | undefined)
```

Change the current selection. See also option `selection`.
Expand Down Expand Up @@ -807,12 +844,16 @@ The library exports a set of utility functions. The exact definitions of those f
- `EnumValue`
- `ReadonlyValue`
- `TimestampTag`
- HTML:
- `getValueClass`
- `keyComboFromEvent`
- Validation:
- `createAjvValidator`
- Query languages:
- `jsonQueryLanguage`
- `jmespathQueryLanguage`
- `lodashQueryLanguage`
- `javascriptQueryLanguage`
- `jmespathQueryLanguage`
- Content:
- `isContent`
- `isTextContent`
Expand All @@ -821,6 +862,11 @@ The library exports a set of utility functions. The exact definitions of those f
- `toTextContent`
- `toJSONContent`
- `estimateSerializedSize`
- Expand:
- `expandAll`
- `expandMinimal`
- `expandNone`
- `expandSelf`
- Selection:
- `isValueSelection`
- `isKeySelection`
Expand All @@ -829,10 +875,17 @@ The library exports a set of utility functions. The exact definitions of those f
- `isMultiSelection`,
- `isEditingSelection`
- `createValueSelection`
- `createEditValueSelection`
- `createKeySelection`
- `createEditKeySelection`
- `createInsideSelection`,
- `createAfterSelection`
- `createMultiSelection`
- `getFocusPath`
- `getAnchorPath`
- `getStartPath`
- `getEndPath`
- `getSelectionPaths`
- Parser:
- `isEqualParser`
- Path:
Expand All @@ -841,6 +894,15 @@ The library exports a set of utility functions. The exact definitions of those f
- Actions:
- `resizeObserver`
- `onEscape`
- Type checking:
- `valueType`
- `stringConvert`
- `isObject`
- `isObjectOrArray`
- `isBoolean`
- `isTimestamp`
- `isColor`
- `isUrl`
- Typeguards:
- `isContentParseError`
- `isContentValidationErrors`
Expand All @@ -863,13 +925,13 @@ The library exports a set of utility functions. The exact definitions of those f

The TypeScript types (like `Content`, `JSONSelection`, and `JSONPatchOperation`) are defined in the following source file:

https://github.com/josdejong/svelte-jsoneditor/blob/main/src/lib/types.ts
<https://github.com/josdejong/svelte-jsoneditor/blob/main/src/lib/types.ts>

## Styling

The editor can be styled using the available CSS variables. A full list with all variables can be found here:

https://github.com/josdejong/svelte-jsoneditor/blob/main/src/lib/themes/defaults.scss
<https://github.com/josdejong/svelte-jsoneditor/blob/main/src/lib/themes/defaults.scss>

### Custom theme color

Expand Down
Loading
Loading