@ht-rnd/json-schema-editor 2.0.2 → 2.0.4

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.
@@ -1,4 +1,3 @@
1
- import { ErrorObject } from 'ajv/dist/2020';
2
1
  import { useForm } from 'react-hook-form';
3
2
  import { z } from 'zod';
4
3
 
@@ -129,6 +128,11 @@ export declare const SCHEMA_TYPES: readonly ["string", "integer", "number", "boo
129
128
 
130
129
  export declare const SCHEMA_TYPES_WITH_REF: readonly ["string", "integer", "number", "boolean", "object", "array", "ref"];
131
130
 
131
+ export declare interface SchemaError {
132
+ instancePath: string;
133
+ message?: string;
134
+ }
135
+
132
136
  export declare const schemaToForm: (schema: JSONSchema) => FormSchema;
133
137
 
134
138
  export declare type SchemaType = "string" | "number" | "integer" | "boolean" | "object" | "array" | "ref";
@@ -166,7 +170,7 @@ export declare function useJsonSchemaEditor(options?: JsonSchemaEditorOptions):
166
170
 
167
171
  export declare interface UseJsonSchemaEditorReturn {
168
172
  schema: JSONSchema;
169
- errors: ErrorObject[] | null;
173
+ errors: SchemaError[] | null;
170
174
  fields: FieldItem[];
171
175
  definitions: DefinitionItem[];
172
176
  form: ReturnType<typeof useForm<FormSchema>>;
@@ -183,6 +187,6 @@ export declare interface UseJsonSchemaEditorReturn {
183
187
  reset: () => void;
184
188
  }
185
189
 
186
- export declare function validateSchema(schema: JSONSchema): ErrorObject[] | null;
190
+ export declare function validateSchema(schema: JSONSchema): SchemaError[] | null;
187
191
 
188
192
  export { }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ht-rnd/json-schema-editor",
3
- "version": "2.0.2",
3
+ "version": "2.0.4",
4
4
  "license": "Apache-2.0",
5
5
  "description": "Headless JSON Schema Editor - provides hooks and utilities for building JSON Schema editors",
6
6
  "keywords": [