vanilla-jsoneditor
Advanced tools
Comparing version 0.19.0 to 0.20.0
@@ -860,3 +860,3 @@ import { SvelteComponent } from 'svelte'; | ||
*/ | ||
declare function onEscape(element: Element, callback: Callback): { | ||
declare function onEscape(element: Element | null, callback: Callback): { | ||
destroy: () => void; | ||
@@ -863,0 +863,0 @@ }; |
{ | ||
"name": "vanilla-jsoneditor", | ||
"description": "A web-based tool to view, edit, format, transform, and validate JSON", | ||
"version": "0.19.0", | ||
"version": "0.20.0", | ||
"homepage": "https://github.com/josdejong/svelte-jsoneditor", | ||
@@ -26,3 +26,5 @@ "repository": { | ||
"./SECURITY.md": "./SECURITY.md", | ||
"./index.js.map": "./index.js.map" | ||
"./index.js.map": "./index.js.map", | ||
"./standalone.js": "./standalone.js", | ||
"./standalone.js.map": "./standalone.js.map" | ||
}, | ||
@@ -34,8 +36,29 @@ "files": [ | ||
"dependencies": { | ||
"@fortawesome/free-solid-svg-icons": "^6.4.2", | ||
"@codemirror/autocomplete": "^6.11.1", | ||
"@codemirror/commands": "^6.3.2", | ||
"@codemirror/lang-json": "^6.0.1", | ||
"@codemirror/language": "^6.9.3", | ||
"@codemirror/lint": "^6.4.2", | ||
"@codemirror/search": "^6.5.5", | ||
"@codemirror/state": "^6.3.3", | ||
"@codemirror/view": "^6.22.1", | ||
"@fortawesome/free-regular-svg-icons": "^6.5.1", | ||
"@fortawesome/free-solid-svg-icons": "^6.5.1", | ||
"@replit/codemirror-indentation-markers": "^6.5.0", | ||
"ajv": "^8.12.0", | ||
"codemirror-wrapped-line-indent": "^1.0.0", | ||
"diff-sequences": "^29.6.3", | ||
"immutable-json-patch": "^5.1.3", | ||
"svelte": "^4.2.7" | ||
"jmespath": "^0.16.0", | ||
"json-source-map": "^0.6.1", | ||
"jsonrepair": "^3.4.1", | ||
"lodash-es": "^4.17.21", | ||
"memoize-one": "^6.0.0", | ||
"natural-compare-lite": "^1.4.0", | ||
"sass": "^1.69.5", | ||
"vanilla-picker": "^2.12.2", | ||
"svelte": "^4.2.8" | ||
}, | ||
"devDependencies": {} | ||
"devDependencies": {}, | ||
"browser": "./standalone.js" | ||
} |
@@ -33,4 +33,22 @@ # vanilla-jsoneditor | ||
Remark: for usage in a Svelte project, install `svelte-jsoneditor` instead. | ||
Remark: for usage in a Svelte project, install and use `svelte-jsoneditor` instead of `vanilla-jsoneditor`. | ||
## Use | ||
If you have a setup for your project with a bundler (like Vite, Rollup, or Webpack), it is best to use the default ES import: | ||
```ts | ||
// for use in a React, Vue, or Angular project | ||
import { JSONEditor } from 'vanilla-jsoneditor' | ||
``` | ||
If you want to use the library straight in the browser, use the provided standalone ES bundle: | ||
```ts | ||
// for use directly in the browser | ||
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): | ||
@@ -48,3 +66,3 @@ | ||
<script type="module"> | ||
import { JSONEditor } from 'vanilla-jsoneditor' | ||
import { JSONEditor } from 'vanilla-jsoneditor/standalone.js' | ||
@@ -89,3 +107,3 @@ // Or use it through a CDN (not recommended for use in production): | ||
```typescript | ||
```tsx | ||
// | ||
@@ -132,3 +150,3 @@ // JSONEditorReact.tsx | ||
```javascript | ||
```jsx | ||
// | ||
@@ -179,3 +197,3 @@ // JSONEditorReact.jsx | ||
```typescript | ||
```tsx | ||
// | ||
@@ -236,3 +254,3 @@ // demo.tsx for use with NextJS | ||
```typescript | ||
```tsx | ||
// | ||
@@ -239,0 +257,0 @@ // TextContent.tsx |
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 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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Uses eval
Supply chain riskPackage uses dynamic code execution (e.g., eval()), which is a dangerous practice. This can prevent the code from running in certain environments and increases the risk that the code may contain exploits or malicious behavior.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
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
9373691
12
8418
272
24
29
3
+ Added@codemirror/commands@^6.3.2
+ Added@codemirror/lang-json@^6.0.1
+ Added@codemirror/language@^6.9.3
+ Added@codemirror/lint@^6.4.2
+ Added@codemirror/search@^6.5.5
+ Added@codemirror/state@^6.3.3
+ Added@codemirror/view@^6.22.1
+ Addeddiff-sequences@^29.6.3
+ Addedjmespath@^0.16.0
+ Addedjson-source-map@^0.6.1
+ Addedjsonrepair@^3.4.1
+ Addedlodash-es@^4.17.21
+ Addedmemoize-one@^6.0.0
+ Addednatural-compare-lite@^1.4.0
+ Addedsass@^1.69.5
+ Addedvanilla-picker@^2.12.2
+ Added@codemirror/autocomplete@6.18.3(transitive)
+ Added@codemirror/commands@6.7.1(transitive)
+ Added@codemirror/lang-json@6.0.1(transitive)
+ Added@codemirror/language@6.10.6(transitive)
+ Added@codemirror/lint@6.8.4(transitive)
+ Added@codemirror/search@6.5.8(transitive)
+ Added@codemirror/state@6.5.0(transitive)
+ Added@codemirror/view@6.35.3(transitive)
+ Added@fortawesome/free-regular-svg-icons@6.7.1(transitive)
+ Added@jridgewell/gen-mapping@0.3.7(transitive)
+ Added@jridgewell/sourcemap-codec@1.4.16-beta.0(transitive)
+ Added@lezer/common@1.2.3(transitive)
+ Added@lezer/highlight@1.2.1(transitive)
+ Added@lezer/json@1.0.2(transitive)
+ Added@lezer/lr@1.4.2(transitive)
+ Added@marijn/find-cluster-break@1.0.2(transitive)
+ Added@parcel/watcher@2.5.0(transitive)
+ Added@parcel/watcher-android-arm64@2.5.0(transitive)
+ Added@parcel/watcher-darwin-arm64@2.5.0(transitive)
+ Added@parcel/watcher-darwin-x64@2.5.0(transitive)
+ Added@parcel/watcher-freebsd-x64@2.5.0(transitive)
+ Added@parcel/watcher-linux-arm-glibc@2.5.0(transitive)
+ Added@parcel/watcher-linux-arm-musl@2.5.0(transitive)
+ Added@parcel/watcher-linux-arm64-glibc@2.5.0(transitive)
+ Added@parcel/watcher-linux-arm64-musl@2.5.0(transitive)
+ Added@parcel/watcher-linux-x64-glibc@2.5.0(transitive)
+ Added@parcel/watcher-linux-x64-musl@2.5.0(transitive)
+ Added@parcel/watcher-win32-arm64@2.5.0(transitive)
+ Added@parcel/watcher-win32-ia32@2.5.0(transitive)
+ Added@parcel/watcher-win32-x64@2.5.0(transitive)
+ Added@replit/codemirror-indentation-markers@6.5.3(transitive)
+ Added@sphinxxxx/color-conversion@2.2.2(transitive)
+ Addedbraces@3.0.3(transitive)
+ Addedchokidar@4.0.1(transitive)
+ Addedcodemirror-wrapped-line-indent@1.0.8(transitive)
+ Addedcrelt@1.0.6(transitive)
+ Addeddetect-libc@1.0.3(transitive)
+ Addeddiff-sequences@29.6.3(transitive)
+ Addedfill-range@7.1.1(transitive)
+ Addedimmutable@5.0.3(transitive)
+ Addedis-extglob@2.1.1(transitive)
+ Addedis-glob@4.0.3(transitive)
+ Addedis-number@7.0.0(transitive)
+ Addedjmespath@0.16.0(transitive)
+ Addedjson-source-map@0.6.1(transitive)
+ Addedjsonrepair@3.11.1(transitive)
+ Addedlodash-es@4.17.21(transitive)
+ Addedmemoize-one@6.0.0(transitive)
+ Addedmicromatch@4.0.8(transitive)
+ Addednatural-compare-lite@1.4.0(transitive)
+ Addednode-addon-api@7.1.1(transitive)
+ Addedpicomatch@2.3.1(transitive)
+ Addedreaddirp@4.0.2(transitive)
+ Addedsass@1.82.0(transitive)
+ Addedstyle-mod@4.1.2(transitive)
+ Addedto-regex-range@5.0.1(transitive)
+ Addedvanilla-picker@2.12.3(transitive)
+ Addedw3c-keyname@2.2.8(transitive)
- Removed@jridgewell/gen-mapping@0.3.8(transitive)
- Removed@jridgewell/set-array@1.2.1(transitive)
Updatedsvelte@^4.2.8