@ht-rnd/json-schema-editor 1.0.6 → 1.0.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +78 -1
- package/dist/json-schema-editor.css +1 -1
- package/dist/lib/main.es.js +15734 -16844
- package/dist/lib/main.umd.js +44 -119
- package/dist/types/index.d.ts +13 -58
- package/package.json +86 -82
package/dist/types/index.d.ts
CHANGED
|
@@ -1,8 +1,15 @@
|
|
|
1
|
-
import { JSX
|
|
1
|
+
import { JSX } from 'react/jsx-runtime';
|
|
2
2
|
import { z } from 'zod';
|
|
3
3
|
|
|
4
4
|
declare const baseSchema: z.ZodObject<{
|
|
5
|
-
type: z.ZodOptional<z.ZodEnum<
|
|
5
|
+
type: z.ZodOptional<z.ZodEnum<{
|
|
6
|
+
string: "string";
|
|
7
|
+
number: "number";
|
|
8
|
+
boolean: "boolean";
|
|
9
|
+
object: "object";
|
|
10
|
+
integer: "integer";
|
|
11
|
+
array: "array";
|
|
12
|
+
}>>;
|
|
6
13
|
title: z.ZodOptional<z.ZodString>;
|
|
7
14
|
description: z.ZodOptional<z.ZodString>;
|
|
8
15
|
default: z.ZodOptional<z.ZodAny>;
|
|
@@ -18,68 +25,16 @@ declare const baseSchema: z.ZodObject<{
|
|
|
18
25
|
minProperties: z.ZodOptional<z.ZodNumber>;
|
|
19
26
|
maxProperties: z.ZodOptional<z.ZodNumber>;
|
|
20
27
|
isModifiable: z.ZodOptional<z.ZodBoolean>;
|
|
21
|
-
"x-modifiable": z.ZodOptional<z.ZodArray<z.ZodString
|
|
28
|
+
"x-modifiable": z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
22
29
|
pattern: z.ZodOptional<z.ZodString>;
|
|
23
30
|
format: z.ZodOptional<z.ZodString>;
|
|
24
31
|
minItems: z.ZodOptional<z.ZodNumber>;
|
|
25
32
|
maxItems: z.ZodOptional<z.ZodNumber>;
|
|
26
33
|
uniqueItems: z.ZodOptional<z.ZodBoolean>;
|
|
27
|
-
enum: z.ZodOptional<z.ZodArray<z.ZodAny
|
|
34
|
+
enum: z.ZodOptional<z.ZodArray<z.ZodAny>>;
|
|
28
35
|
$id: z.ZodOptional<z.ZodString>;
|
|
29
36
|
$schema: z.ZodOptional<z.ZodString>;
|
|
30
|
-
},
|
|
31
|
-
type?: "string" | "number" | "boolean" | "object" | "integer" | "array" | undefined;
|
|
32
|
-
title?: string | undefined;
|
|
33
|
-
description?: string | undefined;
|
|
34
|
-
default?: any;
|
|
35
|
-
minimum?: number | undefined;
|
|
36
|
-
maximum?: number | undefined;
|
|
37
|
-
exclusiveMin?: number | undefined;
|
|
38
|
-
exclusiveMax?: number | undefined;
|
|
39
|
-
multipleOf?: number | undefined;
|
|
40
|
-
minLength?: number | undefined;
|
|
41
|
-
maxLength?: number | undefined;
|
|
42
|
-
minContains?: number | undefined;
|
|
43
|
-
maxContains?: number | undefined;
|
|
44
|
-
minProperties?: number | undefined;
|
|
45
|
-
maxProperties?: number | undefined;
|
|
46
|
-
isModifiable?: boolean | undefined;
|
|
47
|
-
"x-modifiable"?: string[] | undefined;
|
|
48
|
-
pattern?: string | undefined;
|
|
49
|
-
format?: string | undefined;
|
|
50
|
-
minItems?: number | undefined;
|
|
51
|
-
maxItems?: number | undefined;
|
|
52
|
-
uniqueItems?: boolean | undefined;
|
|
53
|
-
enum?: any[] | undefined;
|
|
54
|
-
$id?: string | undefined;
|
|
55
|
-
$schema?: string | undefined;
|
|
56
|
-
}, {
|
|
57
|
-
type?: "string" | "number" | "boolean" | "object" | "integer" | "array" | undefined;
|
|
58
|
-
title?: string | undefined;
|
|
59
|
-
description?: string | undefined;
|
|
60
|
-
default?: any;
|
|
61
|
-
minimum?: number | undefined;
|
|
62
|
-
maximum?: number | undefined;
|
|
63
|
-
exclusiveMin?: number | undefined;
|
|
64
|
-
exclusiveMax?: number | undefined;
|
|
65
|
-
multipleOf?: number | undefined;
|
|
66
|
-
minLength?: number | undefined;
|
|
67
|
-
maxLength?: number | undefined;
|
|
68
|
-
minContains?: number | undefined;
|
|
69
|
-
maxContains?: number | undefined;
|
|
70
|
-
minProperties?: number | undefined;
|
|
71
|
-
maxProperties?: number | undefined;
|
|
72
|
-
isModifiable?: boolean | undefined;
|
|
73
|
-
"x-modifiable"?: string[] | undefined;
|
|
74
|
-
pattern?: string | undefined;
|
|
75
|
-
format?: string | undefined;
|
|
76
|
-
minItems?: number | undefined;
|
|
77
|
-
maxItems?: number | undefined;
|
|
78
|
-
uniqueItems?: boolean | undefined;
|
|
79
|
-
enum?: any[] | undefined;
|
|
80
|
-
$id?: string | undefined;
|
|
81
|
-
$schema?: string | undefined;
|
|
82
|
-
}>;
|
|
37
|
+
}, z.core.$strip>;
|
|
83
38
|
|
|
84
39
|
declare type JSONSchema = z.infer<typeof baseSchema> & {
|
|
85
40
|
properties?: {
|
|
@@ -90,7 +45,7 @@ declare type JSONSchema = z.infer<typeof baseSchema> & {
|
|
|
90
45
|
additionalProperties?: boolean | JSONSchema;
|
|
91
46
|
};
|
|
92
47
|
|
|
93
|
-
export declare const JsonSchemaEditor: ({ rootType, readOnly, theme, styles, onChange, defaultValue, }: JsonSchemaEditorProps) =>
|
|
48
|
+
export declare const JsonSchemaEditor: ({ rootType, readOnly, theme, styles, onChange, defaultValue, }: JsonSchemaEditorProps) => JSX.Element;
|
|
94
49
|
|
|
95
50
|
declare interface JsonSchemaEditorProps {
|
|
96
51
|
rootType: "object" | "array";
|
package/package.json
CHANGED
|
@@ -1,84 +1,88 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
2
|
+
"name": "@ht-rnd/json-schema-editor",
|
|
3
|
+
"version": "1.0.8",
|
|
4
|
+
"license": "Apache-2.0",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"json-schema",
|
|
7
|
+
"json-schema-editor"
|
|
8
|
+
],
|
|
9
|
+
"type": "module",
|
|
10
|
+
"main": "./dist/lib/main.umd.js",
|
|
11
|
+
"module": "./dist/lib/main.es.js",
|
|
12
|
+
"types": "./dist/types/lib/index.d.ts",
|
|
13
|
+
"files": [
|
|
14
|
+
"dist"
|
|
15
|
+
],
|
|
16
|
+
"exports": {
|
|
17
|
+
".": {
|
|
18
|
+
"types": "./dist/types/lib/index.d.ts",
|
|
19
|
+
"import": "./dist/lib/main.es.js",
|
|
20
|
+
"require": "./dist/lib/main.umd.js"
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
"repository": {
|
|
24
|
+
"type": "git",
|
|
25
|
+
"url": "https://github.com/ht-rnd/json-schema-editor"
|
|
26
|
+
},
|
|
27
|
+
"scripts": {
|
|
28
|
+
"dev": "vite",
|
|
29
|
+
"build": "tsc && vite build",
|
|
30
|
+
"lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
|
|
31
|
+
"preview": "vite preview",
|
|
32
|
+
"test": "vitest --outputFile=./support/junit.xml run --coverage"
|
|
33
|
+
},
|
|
34
|
+
"dependencies": {
|
|
35
|
+
"@hookform/resolvers": "^5.2.2",
|
|
36
|
+
"@radix-ui/react-alert-dialog": "^1.1.15",
|
|
37
|
+
"@radix-ui/react-checkbox": "^1.3.3",
|
|
38
|
+
"@radix-ui/react-dialog": "^1.1.15",
|
|
39
|
+
"@radix-ui/react-label": "^2.1.8",
|
|
40
|
+
"@radix-ui/react-popover": "^1.1.15",
|
|
41
|
+
"@radix-ui/react-radio-group": "^1.3.8",
|
|
42
|
+
"@radix-ui/react-select": "^2.2.6",
|
|
43
|
+
"@radix-ui/react-separator": "^1.1.8",
|
|
44
|
+
"@radix-ui/react-slot": "^1.2.4",
|
|
45
|
+
"@radix-ui/react-tooltip": "^1.2.8",
|
|
46
|
+
"ajv": "^8.17.1",
|
|
47
|
+
"ajv-formats": "^3.0.1",
|
|
48
|
+
"class-variance-authority": "^0.7.1",
|
|
49
|
+
"clsx": "^2.1.1",
|
|
50
|
+
"lucide-react": "^0.554.0",
|
|
51
|
+
"nanoid": "^5.1.6",
|
|
52
|
+
"react-hook-form": "^7.66.1",
|
|
53
|
+
"react-router-dom": "^7.9.6",
|
|
54
|
+
"tailwind-merge": "^3.4.0",
|
|
55
|
+
"vite-plugin-dts": "^4.5.4",
|
|
56
|
+
"zod": "^4.1.12"
|
|
57
|
+
},
|
|
58
|
+
"peerDependencies": {
|
|
59
|
+
"react": "^18.0.0 || ^19.0.0",
|
|
60
|
+
"react-dom": "^18.0.0 || ^19.0.0"
|
|
61
|
+
},
|
|
62
|
+
"devDependencies": {
|
|
63
|
+
"@eslint/js": "^9.21.0",
|
|
64
|
+
"@testing-library/dom": "^10.4.1",
|
|
65
|
+
"@testing-library/jest-dom": "^6.9.1",
|
|
66
|
+
"@testing-library/react": "^16.3.0",
|
|
67
|
+
"@types/node": "^24.10.1",
|
|
68
|
+
"@types/react": "19.2.6",
|
|
69
|
+
"@types/react-dom": "19.2.3",
|
|
70
|
+
"@vitejs/plugin-react": "^5.1.1",
|
|
71
|
+
"@vitest/coverage-istanbul": "^4.0.10",
|
|
72
|
+
"autoprefixer": "^10.4.22",
|
|
73
|
+
"eslint": "^9.21.0",
|
|
74
|
+
"eslint-plugin-react-hooks": "^7.0.1",
|
|
75
|
+
"eslint-plugin-react-refresh": "^0.4.24",
|
|
76
|
+
"globals": "^16.5.0",
|
|
77
|
+
"jsdom": "^27.2.0",
|
|
78
|
+
"postcss": "^8.4.0",
|
|
79
|
+
"react": "19.2.0",
|
|
80
|
+
"react-dom": "19.2.0",
|
|
81
|
+
"tailwindcss": "^3.4.18",
|
|
82
|
+
"tailwindcss-animate": "^1.0.7",
|
|
83
|
+
"typescript": "^5.9.3",
|
|
84
|
+
"typescript-eslint": "^8.47.0",
|
|
85
|
+
"vite": "^7.2.2",
|
|
86
|
+
"vitest": "^4.0.10"
|
|
87
|
+
}
|
|
84
88
|
}
|