diff --git a/index.d.ts b/index.d.ts index d9f966a..36aa155 100644 --- a/index.d.ts +++ b/index.d.ts @@ -1 +1,19 @@ declare module "vue-matomo"; + +/** @see https://github.com/cloudflare/json-schema-tools/blob/master/workspaces/json-schema-walker/README.md */ +declare module "@cloudflare/json-schema-walker" { + export type Visitor = ( + schema: import("json-schema").JSONSchema6 | boolean, + path: string[], + parent?: import("json-schema").JSONSchema6, + parentPath?: string[], + ) => void; + + /** Modifies in place */ + export function schemaWalk( + schema: import("json-schema").JSONSchema6, + preFunc?: Visitor, + postFunc?: Visitor, + vocabulary?: any, + ): void; +} diff --git a/package.json b/package.json index e89daca..7cdc524 100644 --- a/package.json +++ b/package.json @@ -17,6 +17,7 @@ }, "type": "module", "dependencies": { + "@cloudflare/json-schema-walker": "^0.1.1", "@formkit/vue": "^1.0.0-beta.14", "@fortawesome/fontawesome-svg-core": "^6.1.1", "@fortawesome/free-regular-svg-icons": "^6.1.1", @@ -27,6 +28,7 @@ "@rjsf/core": "^5.18.4", "@rjsf/utils": "^5.18.4", "@rjsf/validator-ajv8": "^5.18.4", + "@types/json-schema": "^7.0.15", "@vitejs/plugin-vue": "^5", "@vue/tsconfig": "^0.5.1", "@vueuse/core": "^10.7.2", diff --git a/src/corpus/config/SchemaConfig.vue b/src/corpus/config/SchemaConfig.vue index 2d8a763..0478e93 100644 --- a/src/corpus/config/SchemaConfig.vue +++ b/src/corpus/config/SchemaConfig.vue @@ -1,6 +1,8 @@