{"_id":"@archeion/ngx-schema-builder","_rev":"5-25149d13ad75123cad167bdc909c1c73","name":"@archeion/ngx-schema-builder","dist-tags":{"latest":"1.0.4"},"versions":{"1.0.0":{"name":"@archeion/ngx-schema-builder","version":"1.0.0","keywords":["angular","json-schema","schema-editor","schema-builder","json","jsonjoy","codemirror"],"author":{"url":"https://github.com/archeionproject","name":"Archeion"},"license":"MIT","_id":"@archeion/ngx-schema-builder@1.0.0","maintainers":[{"name":"simonetassi","email":"simonetassi.bo@gmail.com"},{"name":"madmanu01","email":"manuelarto01@gmail.com"},{"name":"cristiano.aguzzi","email":"relu.cri@gmail.com"},{"name":"archeion-admin","email":"admin@archeion.tech"},{"name":"hyperloris","email":"lorenzo.dramis@gmail.com"}],"contributors":[{"url":"https://github.com/lovasoa/jsonjoy-builder","name":"Ophir LOJKINE"}],"homepage":"https://github.com/archeionproject/ngx-schema-builder#readme","bugs":{"url":"https://github.com/archeionproject/ngx-schema-builder/issues"},"dist":{"shasum":"94bc5afce1d66952db9c29f32033fd0cc826b4a6","tarball":"https://registry.npmjs.org/@archeion/ngx-schema-builder/-/ngx-schema-builder-1.0.0.tgz","fileCount":7,"integrity":"sha512-xFGa/hMYwhVHBqVqEErVSJaonygfdMKnMlW1Jy3mm9cEoPID271WxiHiHcBkoasQYIkWYs9/amU9wLGuiV1jZA==","signatures":[{"sig":"MEYCIQDUogwkvG56NGT67QXaUPbMNXBmsvpW62L1yU1AKmkMTQIhAN+ZYtKa9nO/ksm7L2shiYEPh5p1OIFx1xFcJlmyzH4m","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":958973},"type":"module","module":"fesm2022/archeion-ngx-schema-builder.mjs","exports":{".":{"types":"./types/archeion-ngx-schema-builder.d.ts","default":"./fesm2022/archeion-ngx-schema-builder.mjs"},"./package.json":{"default":"./package.json"},"./assets/styles/*":{"style":"./assets/styles/*","default":"./assets/styles/*"}},"gitHead":"ff46c93051d08a98bf6b40633331a243f945a567","typings":"types/archeion-ngx-schema-builder.d.ts","_npmUser":{"name":"madmanu01","email":"manuelarto01@gmail.com"},"repository":{"url":"git+https://github.com/archeionproject/ngx-schema-builder.git","type":"git","directory":"projects/ngx-schema-builder"},"_npmVersion":"11.14.1","description":"Visual JSON Schema editor for Angular — port of jsonjoy-builder by Ophir LOJKINE.","directories":{},"sideEffects":false,"_nodeVersion":"22.22.2","dependencies":{"ajv":"^8.17.1","zod":"^4.0.17","clsx":"^2.1.1","tslib":"^2.3.0","codemirror":"^6.0.0","ajv-formats":"^3.0.1","tailwind-merge":"^2.5.5","@codemirror/lint":"^6.0.0","@codemirror/view":"^6.0.0","@lezer/highlight":"^1.0.0","@codemirror/state":"^6.0.0","@codemirror/commands":"^6.0.0","@codemirror/language":"^6.0.0","@codemirror/lang-json":"^6.0.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"peerDependencies":{"@angular/core":"^21.2.0","@angular/common":"^21.2.0"},"_npmOperationalInternal":{"tmp":"tmp/ngx-schema-builder_1.0.0_1782129177925_0.8583576769899386","host":"s3://npm-registry-packages-npm-production"}},"1.0.1":{"name":"@archeion/ngx-schema-builder","version":"1.0.1","keywords":["angular","json-schema","schema-editor","schema-builder","json","jsonjoy","codemirror"],"author":{"url":"https://github.com/archeionproject","name":"Archeion"},"license":"MIT","_id":"@archeion/ngx-schema-builder@1.0.1","maintainers":[{"name":"simonetassi","email":"simonetassi.bo@gmail.com"},{"name":"madmanu01","email":"manuelarto01@gmail.com"},{"name":"cristiano.aguzzi","email":"relu.cri@gmail.com"},{"name":"archeion-admin","email":"admin@archeion.tech"},{"name":"hyperloris","email":"lorenzo.dramis@gmail.com"}],"contributors":[{"url":"https://github.com/lovasoa/jsonjoy-builder","name":"Ophir LOJKINE"}],"homepage":"https://github.com/archeionproject/ngx-schema-builder#readme","bugs":{"url":"https://github.com/archeionproject/ngx-schema-builder/issues"},"dist":{"shasum":"94a687452be3815969c9faca171f15bc90ffe757","tarball":"https://registry.npmjs.org/@archeion/ngx-schema-builder/-/ngx-schema-builder-1.0.1.tgz","fileCount":7,"integrity":"sha512-LbiGX3AtddTRfPlncLiBlsyV4kVBT+77OetRvJkum43UTZZSOmPSUKe2xusfjjdv2xhPTE7H25PRdet4MsnCzg==","signatures":[{"sig":"MEUCIHCWioB7ClV864KTV6aYgaNoWzAizEza5RyOBSzzcmwDAiEAuOIVQCM4gIhWTPX1w3bpqLS7KTDx2ELZHnOTCG6Hq30=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":958900},"type":"module","module":"fesm2022/archeion-ngx-schema-builder.mjs","exports":{".":{"types":"./types/archeion-ngx-schema-builder.d.ts","default":"./fesm2022/archeion-ngx-schema-builder.mjs"},"./package.json":{"default":"./package.json"},"./assets/styles/*":{"style":"./assets/styles/*","default":"./assets/styles/*"}},"gitHead":"e9afe867e3d7e24431c0aeffbfafe7130335f90a","typings":"types/archeion-ngx-schema-builder.d.ts","_npmUser":{"name":"madmanu01","email":"manuelarto01@gmail.com"},"repository":{"url":"git+https://github.com/archeionproject/ngx-schema-builder.git","type":"git","directory":"projects/ngx-schema-builder"},"_npmVersion":"11.14.1","description":"Visual JSON Schema editor for Angular — port of jsonjoy-builder by Ophir LOJKINE.","directories":{},"sideEffects":false,"_nodeVersion":"22.22.2","dependencies":{"ajv":"^8.17.1","zod":"^4.0.17","clsx":"^2.1.1","tslib":"^2.3.0","codemirror":"^6.0.0","ajv-formats":"^3.0.1","tailwind-merge":"^2.5.5","@codemirror/lint":"^6.0.0","@codemirror/view":"^6.0.0","@lezer/highlight":"^1.0.0","@codemirror/state":"^6.0.0","@codemirror/commands":"^6.0.0","@codemirror/language":"^6.0.0","@codemirror/lang-json":"^6.0.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"peerDependencies":{"@angular/core":"^21.2.0","@angular/common":"^21.2.0"},"_npmOperationalInternal":{"tmp":"tmp/ngx-schema-builder_1.0.1_1782296520176_0.6392620735758763","host":"s3://npm-registry-packages-npm-production"}},"1.0.2":{"name":"@archeion/ngx-schema-builder","version":"1.0.2","keywords":["angular","json-schema","schema-editor","schema-builder","json","jsonjoy","codemirror"],"author":{"url":"https://github.com/archeionproject","name":"Archeion"},"license":"MIT","_id":"@archeion/ngx-schema-builder@1.0.2","maintainers":[{"name":"simonetassi","email":"simonetassi.bo@gmail.com"},{"name":"madmanu01","email":"manuelarto01@gmail.com"},{"name":"cristiano.aguzzi","email":"relu.cri@gmail.com"},{"name":"archeion-admin","email":"admin@archeion.tech"},{"name":"hyperloris","email":"lorenzo.dramis@gmail.com"}],"contributors":[{"url":"https://github.com/lovasoa/jsonjoy-builder","name":"Ophir LOJKINE"}],"homepage":"https://github.com/archeionproject/ngx-schema-builder#readme","bugs":{"url":"https://github.com/archeionproject/ngx-schema-builder/issues"},"dist":{"shasum":"9c2a1c3ec13e655572c79b806490fb95d603a608","tarball":"https://registry.npmjs.org/@archeion/ngx-schema-builder/-/ngx-schema-builder-1.0.2.tgz","fileCount":7,"integrity":"sha512-oDhLU30JQDcdd2JqH9RZ8EurVRnpbslkjN1zAoPZ7CJtn3XjehY8AWZItBCQBk4XZMWrATPDegDND0+eWZZ2hw==","signatures":[{"sig":"MEUCIE5ZV8YtFTB7OnGf2Ah5HicE08BonWwx9E7EYuu4X0SSAiEA3xRkUphzIBzr4m2srFTY9GBPUHFygQog8T2uAM97OzU=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":959156},"type":"module","module":"fesm2022/archeion-ngx-schema-builder.mjs","exports":{".":{"types":"./types/archeion-ngx-schema-builder.d.ts","default":"./fesm2022/archeion-ngx-schema-builder.mjs"},"./package.json":{"default":"./package.json"},"./assets/styles/*":{"style":"./assets/styles/*","default":"./assets/styles/*"}},"gitHead":"c32b73a0c578720feb574497dd8e1882165eabc2","typings":"types/archeion-ngx-schema-builder.d.ts","_npmUser":{"name":"madmanu01","email":"manuelarto01@gmail.com"},"repository":{"url":"git+https://github.com/archeionproject/ngx-schema-builder.git","type":"git","directory":"projects/ngx-schema-builder"},"_npmVersion":"11.14.1","description":"Visual JSON Schema editor for Angular — port of jsonjoy-builder by Ophir LOJKINE.","directories":{},"sideEffects":false,"_nodeVersion":"22.22.2","dependencies":{"ajv":"^8.17.1","zod":"^4.0.17","clsx":"^2.1.1","tslib":"^2.3.0","codemirror":"^6.0.0","ajv-formats":"^3.0.1","tailwind-merge":"^2.5.5","@codemirror/lint":"^6.0.0","@codemirror/view":"^6.0.0","@lezer/highlight":"^1.0.0","@codemirror/state":"^6.0.0","@codemirror/commands":"^6.0.0","@codemirror/language":"^6.0.0","@codemirror/lang-json":"^6.0.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"peerDependencies":{"@angular/core":"^21.2.0","@angular/common":"^21.2.0"},"_npmOperationalInternal":{"tmp":"tmp/ngx-schema-builder_1.0.2_1782311713251_0.33623452848410595","host":"s3://npm-registry-packages-npm-production"}},"1.0.3":{"name":"@archeion/ngx-schema-builder","version":"1.0.3","keywords":["angular","json-schema","schema-editor","schema-builder","json","jsonjoy","codemirror"],"author":{"url":"https://github.com/archeionproject","name":"Archeion"},"license":"MIT","_id":"@archeion/ngx-schema-builder@1.0.3","maintainers":[{"name":"simonetassi","email":"simonetassi.bo@gmail.com"},{"name":"madmanu01","email":"manuelarto01@gmail.com"},{"name":"cristiano.aguzzi","email":"relu.cri@gmail.com"},{"name":"archeion-admin","email":"admin@archeion.tech"},{"name":"hyperloris","email":"lorenzo.dramis@gmail.com"}],"contributors":[{"url":"https://github.com/lovasoa/jsonjoy-builder","name":"Ophir LOJKINE"}],"homepage":"https://github.com/archeionproject/ngx-schema-builder#readme","bugs":{"url":"https://github.com/archeionproject/ngx-schema-builder/issues"},"dist":{"shasum":"d9fdd5caa04b3e8fb0a47135dd8fcae7b5acf57f","tarball":"https://registry.npmjs.org/@archeion/ngx-schema-builder/-/ngx-schema-builder-1.0.3.tgz","fileCount":7,"integrity":"sha512-wvt0ubG8ulmdpo9BND7y/GZToCDNLU73Q/NCDDMN+e3UtEuqxKVHdyxkeg0eAsU5Wc4/qR27NkiXkhB1+vsq/w==","signatures":[{"sig":"MEUCIAwdqGntvuqSiRPqL48DaBoaLI+XPXq/D6/Ha5dNYX0TAiEA/648fdayVYgJM4ptf8TF3K6yfKnauoJNwogihK8fDKI=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":959216},"type":"module","module":"fesm2022/archeion-ngx-schema-builder.mjs","exports":{".":{"types":"./types/archeion-ngx-schema-builder.d.ts","default":"./fesm2022/archeion-ngx-schema-builder.mjs"},"./package.json":{"default":"./package.json"},"./assets/styles/*":{"style":"./assets/styles/*","default":"./assets/styles/*"}},"gitHead":"893a2f9b19077d849fbe1120655bc0a8420f9c98","typings":"types/archeion-ngx-schema-builder.d.ts","_npmUser":{"name":"madmanu01","email":"manuelarto01@gmail.com"},"repository":{"url":"git+https://github.com/archeionproject/ngx-schema-builder.git","type":"git","directory":"projects/ngx-schema-builder"},"_npmVersion":"11.14.1","description":"Visual JSON Schema editor for Angular — port of jsonjoy-builder by Ophir LOJKINE.","directories":{},"sideEffects":false,"_nodeVersion":"22.22.2","dependencies":{"ajv":"^8.17.1","zod":"^4.0.17","clsx":"^2.1.1","tslib":"^2.3.0","codemirror":"^6.0.0","ajv-formats":"^3.0.1","tailwind-merge":"^2.5.5","@codemirror/lint":"^6.0.0","@codemirror/view":"^6.0.0","@lezer/highlight":"^1.0.0","@codemirror/state":"^6.0.0","@codemirror/commands":"^6.0.0","@codemirror/language":"^6.0.0","@codemirror/lang-json":"^6.0.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"peerDependencies":{"@angular/core":"^21.2.0","@angular/common":"^21.2.0"},"_npmOperationalInternal":{"tmp":"tmp/ngx-schema-builder_1.0.3_1782314782161_0.25757488623362557","host":"s3://npm-registry-packages-npm-production"}},"1.0.4":{"name":"@archeion/ngx-schema-builder","version":"1.0.4","description":"Visual JSON Schema editor for Angular — port of jsonjoy-builder by Ophir LOJKINE.","keywords":["angular","json-schema","schema-editor","schema-builder","json","jsonjoy","codemirror"],"author":{"name":"Archeion","url":"https://github.com/archeionproject"},"contributors":[{"name":"Ophir LOJKINE","url":"https://github.com/lovasoa/jsonjoy-builder"}],"repository":{"type":"git","url":"git+https://github.com/archeionproject/ngx-schema-builder.git","directory":"projects/ngx-schema-builder"},"bugs":{"url":"https://github.com/archeionproject/ngx-schema-builder/issues"},"homepage":"https://github.com/archeionproject/ngx-schema-builder#readme","license":"MIT","sideEffects":false,"publishConfig":{"access":"public"},"peerDependencies":{"@angular/common":"^21.2.0","@angular/core":"^21.2.0"},"dependencies":{"@codemirror/commands":"^6.0.0","@codemirror/lang-json":"^6.0.0","@codemirror/language":"^6.0.0","@codemirror/lint":"^6.0.0","@codemirror/state":"^6.0.0","@codemirror/view":"^6.0.0","@lezer/highlight":"^1.0.0","ajv":"^8.17.1","ajv-formats":"^3.0.1","clsx":"^2.1.1","codemirror":"^6.0.0","tailwind-merge":"^2.5.5","tslib":"^2.3.0","zod":"^4.0.17"},"exports":{"./assets/styles/*":{"style":"./assets/styles/*","default":"./assets/styles/*"},"./package.json":{"default":"./package.json"},".":{"types":"./types/archeion-ngx-schema-builder.d.ts","default":"./fesm2022/archeion-ngx-schema-builder.mjs"}},"module":"fesm2022/archeion-ngx-schema-builder.mjs","typings":"types/archeion-ngx-schema-builder.d.ts","type":"module","gitHead":"f9f2c2fd6490ccd457b2aed4515ce48982c1fd61","_id":"@archeion/ngx-schema-builder@1.0.4","_nodeVersion":"22.22.2","_npmVersion":"11.14.1","dist":{"integrity":"sha512-pIJ8txHUnIibpTZvDnio4qX5t2yQBZq+5DUMahWTaLBVAFs6ITLEVywZhMiiW8OBDq1GR810sbRoKnTV+eMJAA==","shasum":"5cec0acc8febf006a04060468ef374e1fff50781","tarball":"https://registry.npmjs.org/@archeion/ngx-schema-builder/-/ngx-schema-builder-1.0.4.tgz","fileCount":7,"unpackedSize":959310,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIAdSwDc4RIPeKu7lfgf0Iw9Ziwkje7EixcjprJdWGgKlAiBM9y1DkvnHBlweTq/BJ+Yp5jmW5N6HTuVqzedECq8bww=="}]},"_npmUser":{"name":"madmanu01","email":"manuelarto01@gmail.com"},"directories":{},"maintainers":[{"name":"simonetassi","email":"simonetassi.bo@gmail.com"},{"name":"madmanu01","email":"manuelarto01@gmail.com"},{"name":"cristiano.aguzzi","email":"relu.cri@gmail.com"},{"name":"archeion-admin","email":"admin@archeion.tech"},{"name":"hyperloris","email":"lorenzo.dramis@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/ngx-schema-builder_1.0.4_1782380455057_0.499235115817541"},"_hasShrinkwrap":false}},"time":{"created":"2026-06-22T11:52:57.743Z","modified":"2026-06-25T09:40:55.614Z","1.0.0":"2026-06-22T11:52:58.081Z","1.0.1":"2026-06-24T10:22:00.322Z","1.0.2":"2026-06-24T14:35:13.455Z","1.0.3":"2026-06-24T15:26:22.375Z","1.0.4":"2026-06-25T09:40:55.380Z"},"bugs":{"url":"https://github.com/archeionproject/ngx-schema-builder/issues"},"author":{"name":"Archeion","url":"https://github.com/archeionproject"},"license":"MIT","homepage":"https://github.com/archeionproject/ngx-schema-builder#readme","keywords":["angular","json-schema","schema-editor","schema-builder","json","jsonjoy","codemirror"],"repository":{"type":"git","url":"git+https://github.com/archeionproject/ngx-schema-builder.git","directory":"projects/ngx-schema-builder"},"description":"Visual JSON Schema editor for Angular — port of jsonjoy-builder by Ophir LOJKINE.","contributors":[{"name":"Ophir LOJKINE","url":"https://github.com/lovasoa/jsonjoy-builder"}],"maintainers":[{"name":"simonetassi","email":"simonetassi.bo@gmail.com"},{"name":"madmanu01","email":"manuelarto01@gmail.com"},{"name":"cristiano.aguzzi","email":"relu.cri@gmail.com"},{"name":"archeion-admin","email":"admin@archeion.tech"},{"name":"hyperloris","email":"lorenzo.dramis@gmail.com"}],"readme":"# @archeion/ngx-schema-builder\n\n[![npm](https://img.shields.io/npm/v/@archeion/ngx-schema-builder.svg)](https://www.npmjs.com/package/@archeion/ngx-schema-builder)\n[![license](https://img.shields.io/npm/l/@archeion/ngx-schema-builder.svg)](./LICENSE)\n[![live demo](https://img.shields.io/badge/demo-live-2ea44f)](https://archeionproject.github.io/ngx-schema-builder/)\n\n> Build **JSON Schema** (draft-07) visually in Angular — through a live tree editor, a JSON source\n> view, or both side by side.\n\n`<lib-jsonjoy-schema-builder>` turns schema authoring into a point-and-click experience, so your\nusers never have to hand-write nested JSON Schema. It handles primitives, objects, arrays,\ncombinators (`anyOf` / `oneOf` / `allOf`) and `$ref` references out of the box, and adds optional\ndialogs to **infer** a schema from a sample document or **validate** JSON against the current schema.\n\n## Contents\n\n- [Features](#features)\n- [Install](#install)\n- [Quick start](#quick-start)\n- [Styles and theming](#styles-and-theming)\n- [API reference](#api-reference)\n- [Inferring and validating](#inferring-and-validating)\n- [$ref suggestions](#ref-suggestions)\n- [Localization](#localization)\n- [Acknowledgements](#acknowledgements)\n- [License](#license)\n\n## Features\n\n- 🌳 **Three synced views** — visual tree, raw JSON, or both at once (`mode` ∈ `visual | json | both`).\n- 🧩 **Every JSON Schema type** — strings, numbers, integers, booleans, objects and arrays, with\n  full constraint support (`min`/`max`, `pattern`, `format`, `enum`, `uniqueItems`, …).\n- 🔀 **Combinators & references** — compose with `anyOf` / `oneOf` / `allOf` and reuse shared\n  definitions through `$ref`.\n- 🪄 **Infer from JSON** — paste a sample document and generate a draft-07 schema to refine.\n- ✅ **Runtime validation** — validate JSON against the current schema with AJV and inline,\n  line-mapped error reporting.\n- 🌗 **Light & dark themes** — token-based, retheme with a handful of CSS variables.\n- 🌍 **Localizable** — `en` and `it` shipped; bring your own messages.\n- 🅰️ **Built for Angular 21** — standalone, signal-based, `OnPush`, tree-shakeable. No `NgModule`.\n\n## Install\n\n```bash\nnpm install @archeion/ngx-schema-builder\n```\n\n**Peer dependencies:** `@angular/common`, `@angular/core` (^21.2.0). The embedded code editor\n(CodeMirror) and the validator (AJV) ship bundled — no extra peer dependency or web-worker setup.\n\n## Quick start\n\n**1. Register the provider** (the analog of React's `<SchemaBuilderProvider>`):\n\n```ts\nimport { bootstrapApplication } from '@angular/platform-browser';\nimport { provideSchemaBuilder, en } from '@archeion/ngx-schema-builder';\n\nbootstrapApplication(AppComponent, {\n  providers: [provideSchemaBuilder({ locale: en })],\n});\n```\n\n**2. Add the stylesheet** to your app's global styles (e.g. in `angular.json`):\n\n```jsonc\n\"styles\": [\n  \"node_modules/@archeion/ngx-schema-builder/assets/styles/jsonjoy.css\",\n  \"src/styles.css\" // your app styles, after jsonjoy.css\n]\n```\n\n**3. Drop the component in a template** (`value` is a two-way binding):\n\n```ts\nimport { Component, signal } from '@angular/core';\nimport { SchemaBuilderComponent, type JsonSchema } from '@archeion/ngx-schema-builder';\n\n@Component({\n  selector: 'app-root',\n  imports: [SchemaBuilderComponent],\n  template: `<lib-jsonjoy-schema-builder [(value)]=\"schema\" mode=\"both\" />`,\n})\nexport class AppComponent {\n  readonly schema = signal<JsonSchema>({\n    type: 'object',\n    properties: { name: { type: 'string' } },\n    required: ['name'],\n  });\n}\n```\n\nThat's it — edits flow back into your `schema` signal as immutable copies.\n\n## Styles and theming\n\nThe library ships a **precompiled, scoped** stylesheet — not raw Tailwind. Every rule is scoped\nunder the `.jsonjoy` class that each component applies automatically, and Tailwind's preflight is\nomitted, so the editor's styles can't collide with your app's. **Load order doesn't matter.** (The\nfew unavoidable global at-rules, like `@keyframes`, are namespaced to stay clash-free.)\n\n### Theming\n\nThe base palette is light/dark and works with no configuration. The **only** override surface is\nthe `--jsonjoy-*` token list — set any of them on `.jsonjoy` or an ancestor to retheme the editor\n(your app's own `--color-*` are intentionally not read):\n\n```css\n.jsonjoy {\n  --jsonjoy-color-primary: #2563eb;\n  --jsonjoy-color-border: #e5e7eb;\n  --jsonjoy-radius-md: 0.5rem;\n}\n```\n\n**Dark mode:** add the `dark` class to the editor or any ancestor (e.g. `<html class=\"dark\">`) and\nthe editor switches to its dark palette automatically.\n\n## API reference\n\n### `<lib-jsonjoy-schema-builder>`\n\nThe entry component. State is signal-based — use `[(value)]` for two-way binding.\n\n| Input          | Type                            | Default      | Description                                              |\n| -------------- | ------------------------------- | ------------ | -------------------------------------------------------- |\n| `value`        | `JsonSchema` (model)            | `{ type: 'object' }` | The edited schema. Two-way bindable.             |\n| `mode`         | `'visual' \\| 'json' \\| 'both'` (model) | `'both'` | Active editing view. Two-way bindable.             |\n| `defaultValue` | `JsonSchema \\| undefined`       | `undefined`  | Initial schema used when `value` is not provided.        |\n| `readOnly`     | `boolean`                       | `false`      | Render the editor in read-only mode.                     |\n| `autoFocus`    | `boolean`                       | `true`       | Focus the first editable field on mount.                 |\n| `className`    | `string \\| undefined`           | `undefined`  | Extra classes merged onto the host (via `cn()`).         |\n| `locale`       | `Translation \\| undefined`      | `undefined`  | Per-instance locale override (see [Localization](#localization)). |\n| `messages`     | `Partial<Translation> \\| undefined` | `undefined` | Per-instance message overrides.                      |\n\n### Public exports\n\nConsumers may import only what `public-api.ts` re-exports. The most useful surface:\n\n```ts\nimport {\n  // Components\n  SchemaBuilderComponent,\n  SchemaFieldsEditorComponent, // visual tree only\n  SchemaJsonEditorComponent, // JSON source only\n  InferSchemaDialogComponent,\n  ValidateJsonDialogComponent,\n\n  // Providers & config\n  provideSchemaBuilder,\n  provideSchemaBuilderRefSuggestions,\n\n  // Types\n  type JsonSchema,\n  type SchemaBuilderMode,\n  type RefSuggestion,\n  type Translation,\n\n  // Pure helpers\n  inferSchema,\n  createSchemaFromJson,\n  validateJson,\n  isObjectSchema,\n  getEditorType,\n\n  // Locales\n  en,\n  it,\n} from '@archeion/ngx-schema-builder';\n```\n\n## Inferring and validating\n\nTwo optional, standalone dialogs cover the common \"round-trip\" workflows.\n\n**Infer a schema from a sample document:**\n\n```html\n<lib-jsonjoy-infer-schema-dialog\n  [(open)]=\"inferOpen\"\n  (inferred)=\"schema.set($event)\"\n/>\n```\n\n| Member     | Type                  | Description                                  |\n| ---------- | --------------------- | -------------------------------------------- |\n| `open`     | `boolean` (model)     | Dialog visibility. Two-way bindable.         |\n| `inferred` | `output<JsonSchema>`  | Emits the inferred schema on submit.         |\n\n**Validate a JSON document against the current schema** (AJV, lazy-loaded):\n\n```html\n<lib-jsonjoy-validate-json-dialog [(open)]=\"validateOpen\" [schema]=\"schema()\" />\n```\n\n| Member   | Type                  | Description                          |\n| -------- | --------------------- | ------------------------------------ |\n| `open`   | `boolean` (model)     | Dialog visibility. Two-way bindable. |\n| `schema` | `JsonSchema` (required) | Schema to validate documents against. |\n\nBoth also expose `inferSchema` / `validateJson` as pure functions if you'd rather drive them\nyourself.\n\n## $ref suggestions\n\nRegister a suggestion source (e.g. a list of available schemas from your backend). The factory\nruns **inside the injection context**, so it may `inject()` host services:\n\n```ts\nimport { provideSchemaBuilderRefSuggestions } from '@archeion/ngx-schema-builder';\n\nproviders: [\n  provideSchemaBuilderRefSuggestions(() => inject(MyBlueprintsService).refSuggestions),\n];\n```\n\nThe reference editor then offers those entries as a clickable list when the user selects the\n`$ref` field type.\n\n## Localization\n\nLocalization layers in three steps: an `en` baseline ← a provider `locale` ← provider `messages`,\nthen optional per-component overrides. Pass a built-in locale, or your own partial messages:\n\n```ts\nimport { provideSchemaBuilder, it } from '@archeion/ngx-schema-builder';\n\nproviders: [\n  provideSchemaBuilder({\n    locale: it,\n    messages: { addField: 'Aggiungi campo' }, // override individual keys\n  }),\n];\n```\n\n`en` and `it` are shipped. To add a locale, implement the `Translation` interface (use `en` as the\ncanonical key list) and pass it as `locale`.\n\n## Acknowledgements\n\nThis library is an Angular port of **[jsonjoy-builder](https://github.com/lovasoa/jsonjoy-builder)**\nby [Ophir LOJKINE](https://github.com/lovasoa). The visual editor's concept, component shape,\ntheming approach and most of the JSON-Schema editor semantics come directly from that React\nproject — without it, this Angular port would not exist. The original work is MIT-licensed; the\nsame notice is preserved in [`LICENSE`](./LICENSE) alongside our derivative copyright.\n\n## License\n\n[MIT](./LICENSE) © Archeion\n","readmeFilename":"README.md"}