@ht-rnd/json-schema-editor 1.0.6 → 1.0.7
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 +9594 -10712
- package/dist/lib/main.umd.js +42 -117
- package/dist/types/index.d.ts +13 -58
- package/package.json +31 -27
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,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ht-rnd/json-schema-editor",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.7",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"json-schema",
|
|
@@ -36,49 +36,53 @@
|
|
|
36
36
|
"@radix-ui/react-alert-dialog": "^1.1.15",
|
|
37
37
|
"@radix-ui/react-checkbox": "^1.3.3",
|
|
38
38
|
"@radix-ui/react-dialog": "^1.1.15",
|
|
39
|
-
"@radix-ui/react-label": "^2.1.
|
|
39
|
+
"@radix-ui/react-label": "^2.1.8",
|
|
40
40
|
"@radix-ui/react-popover": "^1.1.15",
|
|
41
41
|
"@radix-ui/react-radio-group": "^1.3.8",
|
|
42
42
|
"@radix-ui/react-select": "^2.2.6",
|
|
43
|
-
"@radix-ui/react-separator": "^1.1.
|
|
44
|
-
"@radix-ui/react-slot": "^1.2.
|
|
43
|
+
"@radix-ui/react-separator": "^1.1.8",
|
|
44
|
+
"@radix-ui/react-slot": "^1.2.4",
|
|
45
45
|
"@radix-ui/react-tooltip": "^1.2.8",
|
|
46
|
-
"@tailwindcss/vite": "^4.1.13",
|
|
47
46
|
"ajv": "^8.17.1",
|
|
48
47
|
"ajv-formats": "^3.0.1",
|
|
49
48
|
"class-variance-authority": "^0.7.1",
|
|
50
49
|
"clsx": "^2.1.1",
|
|
51
|
-
"lucide-react": "^0.
|
|
50
|
+
"lucide-react": "^0.554.0",
|
|
52
51
|
"nanoid": "^5.1.6",
|
|
53
|
-
"react": "^
|
|
54
|
-
"react-dom": "^
|
|
55
|
-
"
|
|
56
|
-
"react-router-dom": "^7.7.0",
|
|
57
|
-
"tailwind-merge": "^3.3.1",
|
|
52
|
+
"react-hook-form": "^7.66.1",
|
|
53
|
+
"react-router-dom": "^7.9.6",
|
|
54
|
+
"tailwind-merge": "^3.4.0",
|
|
58
55
|
"vite-plugin-dts": "^4.5.4",
|
|
59
|
-
"zod": "^
|
|
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"
|
|
60
61
|
},
|
|
61
62
|
"devDependencies": {
|
|
62
63
|
"@eslint/js": "^9.21.0",
|
|
64
|
+
"@testing-library/dom": "^10.4.1",
|
|
63
65
|
"@testing-library/jest-dom": "^6.9.1",
|
|
64
66
|
"@testing-library/react": "^16.3.0",
|
|
65
|
-
"@types/node": "^
|
|
66
|
-
"@types/react": "
|
|
67
|
-
"@types/react-dom": "
|
|
68
|
-
"@vitejs/plugin-react": "^
|
|
69
|
-
"@vitest/coverage-istanbul": "^4.0.
|
|
70
|
-
"autoprefixer": "^10.4.
|
|
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",
|
|
71
73
|
"eslint": "^9.21.0",
|
|
72
|
-
"eslint-plugin-react-hooks": "^
|
|
73
|
-
"eslint-plugin-react-refresh": "^0.4.
|
|
74
|
-
"globals": "^
|
|
75
|
-
"jsdom": "^
|
|
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",
|
|
76
78
|
"postcss": "^8.4.0",
|
|
79
|
+
"react": "19.2.0",
|
|
80
|
+
"react-dom": "19.2.0",
|
|
77
81
|
"tailwindcss": "^3.4.18",
|
|
78
82
|
"tailwindcss-animate": "^1.0.7",
|
|
79
|
-
"typescript": "
|
|
80
|
-
"typescript-eslint": "^8.
|
|
81
|
-
"vite": "^
|
|
82
|
-
"vitest": "^4.0.
|
|
83
|
+
"typescript": "^5.9.3",
|
|
84
|
+
"typescript-eslint": "^8.47.0",
|
|
85
|
+
"vite": "^7.2.2",
|
|
86
|
+
"vitest": "^4.0.10"
|
|
83
87
|
}
|
|
84
|
-
}
|
|
88
|
+
}
|