{"_id":"@visual-json/core","_rev":"7-a98c7d9ed175b8f839d5ec54af9499ea","name":"@visual-json/core","dist-tags":{"latest":"0.4.0"},"versions":{"0.1.0":{"name":"@visual-json/core","version":"0.1.0","keywords":["json","editor","tree","schema","visual"],"license":"Apache-2.0","_id":"@visual-json/core@0.1.0","maintainers":[{"name":"ctate","email":"chris@studiotate.com"}],"dist":{"shasum":"76fa689a0a75445d850cedf6ee9b45b0e7f993f2","tarball":"https://registry.npmjs.org/@visual-json/core/-/core-0.1.0.tgz","fileCount":8,"integrity":"sha512-uKUO/LMJV47H6oPNOTEOBVl7z+/yTBCTxwZd0Sh80Kaxtto06BwAHCcctGRa7g7e6dYEDnEt7T/6Cb4NXc8SKg==","signatures":[{"sig":"MEQCID3rKDdaJkLm605BR4WH5dt9izSDZqn5nykBozihs/F7AiB2n93LVW/uXDpRwysAoskEJE/e7JggFMiPMqckpDeFYQ==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":165557},"main":"./dist/index.js","types":"./dist/index.d.ts","module":"./dist/index.mjs","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.js"}},"gitHead":"26133264371771e8b0522b6a21e13adeaf499a16","scripts":{"dev":"tsup --watch","lint":"eslint .","build":"tsup","format":"prettier --write \"**/*.{ts,tsx}\"","check-types":"tsc --noEmit"},"_npmUser":{"name":"ctate","email":"chris@studiotate.com"},"_npmVersion":"10.9.0","description":"Headless core for visual-json — the visual JSON editor. Schema-aware, embeddable, extensible.","directories":{},"_nodeVersion":"22.12.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.5.1","typescript":"5.9.3"},"_npmOperationalInternal":{"tmp":"tmp/core_0.1.0_1771641194106_0.2785695615831516","host":"s3://npm-registry-packages-npm-production"}},"0.1.1":{"name":"@visual-json/core","version":"0.1.1","keywords":["json","editor","tree","schema","visual"],"license":"Apache-2.0","_id":"@visual-json/core@0.1.1","maintainers":[{"name":"ctate","email":"chris@studiotate.com"}],"dist":{"shasum":"2ea009de0b87ca233a0e02fd58b96be977730664","tarball":"https://registry.npmjs.org/@visual-json/core/-/core-0.1.1.tgz","fileCount":9,"integrity":"sha512-VLARpQnjJU1SnnYk1NiXScGfp2FyAwyZS2kA8hIJV5OzkaH2oS1dTHsaB8vOiyi14/L7jsbpA4g/EwzRWbxQmg==","signatures":[{"sig":"MEYCIQCaZ/yhk3hMQsjaOFCnTOMBMJ8u93JNSr36u9RinRyo0gIhAJiaOWyWbJ2JfxBPFodx6zPF/upwUpp8u/TQmqFCid1/","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":176867},"main":"./dist/index.js","_from":"file:visual-json-core-0.1.1.tgz","types":"./dist/index.d.ts","module":"./dist/index.mjs","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.js"}},"scripts":{"dev":"tsup --watch","lint":"eslint .","build":"tsup","format":"prettier --write \"**/*.{ts,tsx}\"","check-types":"tsc --noEmit"},"_npmUser":{"name":"ctate","email":"chris@studiotate.com"},"_resolved":"/private/var/folders/bw/l_mkbwg9061dn0frt5258s180000gn/T/5557982428b459157d338296ebf8df0e/visual-json-core-0.1.1.tgz","_integrity":"sha512-VLARpQnjJU1SnnYk1NiXScGfp2FyAwyZS2kA8hIJV5OzkaH2oS1dTHsaB8vOiyi14/L7jsbpA4g/EwzRWbxQmg==","_npmVersion":"10.9.0","description":"Headless core for visual-json — the visual JSON editor. Schema-aware, embeddable, extensible.","directories":{},"_nodeVersion":"22.12.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.5.1","typescript":"5.9.3"},"_npmOperationalInternal":{"tmp":"tmp/core_0.1.1_1771736626022_0.030244526182251263","host":"s3://npm-registry-packages-npm-production"}},"0.2.0":{"name":"@visual-json/core","version":"0.2.0","keywords":["json","editor","tree","schema","visual"],"license":"Apache-2.0","_id":"@visual-json/core@0.2.0","maintainers":[{"name":"ctate","email":"chris@studiotate.com"}],"dist":{"shasum":"3b248b6024a20040a476cb40a560d2cd78765ef3","tarball":"https://registry.npmjs.org/@visual-json/core/-/core-0.2.0.tgz","fileCount":8,"integrity":"sha512-kcHNR7sb63fnfc7DnFxdMDBQ4L+DWV/UTA3pRbxY+sba0mmdA9P0T/ZpvtVgSBMLhjmZQRmQhHLrQOxRqO8kKA==","signatures":[{"sig":"MEYCIQDOWwOjsNH9xcLTiKUHgrqar4NlkVQQ4e/xdTKZRrc8nAIhAKzAYs5EuOUhDZHkyWnnbqLMCFheWkXaAatZuBSGShHm","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":187856},"main":"./dist/index.js","types":"./dist/index.d.ts","module":"./dist/index.mjs","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.js"}},"gitHead":"e9d4da6a460648cdd44849063908c70202c0f261","scripts":{"dev":"tsup --watch","lint":"eslint .","build":"tsup","format":"prettier --write \"**/*.{ts,tsx}\"","check-types":"tsc --noEmit"},"_npmUser":{"name":"ctate","email":"chris@studiotate.com"},"_npmVersion":"10.9.0","description":"Headless core for visual-json — the visual JSON editor. Schema-aware, embeddable, extensible.","directories":{},"_nodeVersion":"22.12.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.5.1","typescript":"5.9.3"},"_npmOperationalInternal":{"tmp":"tmp/core_0.2.0_1772162032102_0.3618481465235155","host":"s3://npm-registry-packages-npm-production"}},"0.3.0":{"name":"@visual-json/core","version":"0.3.0","keywords":["json","editor","tree","schema","visual"],"license":"Apache-2.0","_id":"@visual-json/core@0.3.0","maintainers":[{"name":"ctate","email":"chris@studiotate.com"}],"dist":{"shasum":"2729ab4745a166d9fe6fbaf67ac21fa17e44cb31","tarball":"https://registry.npmjs.org/@visual-json/core/-/core-0.3.0.tgz","fileCount":8,"integrity":"sha512-fUkzVVDnMamMFox5T865uuXnBei0ZXzA+insG/rec9yDMJYAmifbgIBTeUVk4F+WdKOfYic78VQDbidR7plhOA==","signatures":[{"sig":"MEUCIQDCoH24ECc26mj8Qpbk48321kCzD0lWZNtYq0+bSKquaAIgM2+ea8ASGanX2tTOYbTzYyU0MnNZg9mCTBpb48nh7gI=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":187910},"main":"./dist/index.js","types":"./dist/index.d.ts","module":"./dist/index.mjs","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.js"}},"gitHead":"2b465ac85c31a7b50ebe1ce26548b99b5c2eaf31","scripts":{"dev":"tsup --watch","lint":"eslint .","build":"tsup","format":"prettier --write \"**/*.{ts,tsx}\"","check-types":"tsc --noEmit"},"_npmUser":{"name":"ctate","email":"chris@studiotate.com"},"_npmVersion":"10.9.0","description":"Headless core for visual-json — the visual JSON editor. Schema-aware, embeddable, extensible.","directories":{},"_nodeVersion":"22.12.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.5.1","typescript":"5.9.3"},"_npmOperationalInternal":{"tmp":"tmp/core_0.3.0_1772519506846_0.8861715620851476","host":"s3://npm-registry-packages-npm-production"}},"0.3.1":{"name":"@visual-json/core","version":"0.3.1","keywords":["json","editor","tree","schema","visual"],"license":"Apache-2.0","_id":"@visual-json/core@0.3.1","maintainers":[{"name":"ctate","email":"chris@studiotate.com"}],"dist":{"shasum":"803d9dfb14a89b853ee1976d4aa97ba682e3b1e5","tarball":"https://registry.npmjs.org/@visual-json/core/-/core-0.3.1.tgz","fileCount":9,"integrity":"sha512-rjRbcCbKBixuQpXqVPgzKl3Nfk0QLD1NJhuHittM0ASYETozxTsou4fL6g/IWz/BaYiAAjKnrkb8aasbzJGcvg==","signatures":[{"sig":"MEUCIQDz3b7LtNDfxTXKr+2j1m/kT2siXdF1xsG5INusNLqnIwIgN00X/b7M4FOSHPOzot2ZhrOB+xgV9DLOK+NuXSCjxfU=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":199188},"main":"./dist/index.js","_from":"file:visual-json-core-0.3.1.tgz","types":"./dist/index.d.ts","module":"./dist/index.mjs","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.js"}},"scripts":{"dev":"tsup --watch","lint":"eslint .","build":"tsup","format":"prettier --write \"**/*.{ts,tsx}\"","check-types":"tsc --noEmit"},"_npmUser":{"name":"ctate","email":"chris@studiotate.com"},"_resolved":"/private/var/folders/bw/l_mkbwg9061dn0frt5258s180000gn/T/975f9f90975a259812e90e5102385d75/visual-json-core-0.3.1.tgz","_integrity":"sha512-rjRbcCbKBixuQpXqVPgzKl3Nfk0QLD1NJhuHittM0ASYETozxTsou4fL6g/IWz/BaYiAAjKnrkb8aasbzJGcvg==","_npmVersion":"10.9.0","description":"Headless core for visual-json — the visual JSON editor. Schema-aware, embeddable, extensible.","directories":{},"_nodeVersion":"22.12.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.5.1","typescript":"5.9.3"},"_npmOperationalInternal":{"tmp":"tmp/core_0.3.1_1772546006450_0.2884379420341845","host":"s3://npm-registry-packages-npm-production"}},"0.4.0":{"name":"@visual-json/core","version":"0.4.0","license":"Apache-2.0","description":"Headless core for visual-json — the visual JSON editor. Schema-aware, embeddable, extensible.","keywords":["json","editor","tree","schema","visual"],"publishConfig":{"access":"public"},"main":"./dist/index.js","module":"./dist/index.mjs","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.js"}},"devDependencies":{"tsup":"^8.5.1","typescript":"5.9.3"},"scripts":{"build":"tsup","dev":"tsup --watch","check-types":"tsc --noEmit","lint":"eslint .","format":"prettier --write \"**/*.{ts,tsx}\""},"_id":"@visual-json/core@0.4.0","_integrity":"sha512-T/HvRIp7r6SehxVnO+akV72NLv2OMBEoQdYTFbpwMi6uU2TaXQOpIOHBG4r9XBz7OqC2e8aedOwal/NtqtzyCg==","_resolved":"/tmp/39348a5de21ea5c72b8530c15d654893/visual-json-core-0.4.0.tgz","_from":"file:visual-json-core-0.4.0.tgz","_nodeVersion":"22.22.2","_npmVersion":"10.9.7","dist":{"integrity":"sha512-T/HvRIp7r6SehxVnO+akV72NLv2OMBEoQdYTFbpwMi6uU2TaXQOpIOHBG4r9XBz7OqC2e8aedOwal/NtqtzyCg==","shasum":"1508aa23c3c9109b4a621f1094aef2f87c915f78","tarball":"https://registry.npmjs.org/@visual-json/core/-/core-0.4.0.tgz","fileCount":9,"unpackedSize":207926,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQDX+U7UD5Jpqvg7CsZBzjUqd1pFygmSXGjK0N7Nx94wEgIhAMmWhvrsskm6YYvM4aACCyOBmSDtddZTGD/7QM8119Cm"}]},"_npmUser":{"name":"vercel-release-bot","email":"infra+release@vercel.com"},"directories":{},"maintainers":[{"name":"ctate","email":"chris@studiotate.com"},{"name":"vercel-release-bot","email":"infra+release@vercel.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/core_0.4.0_1775669083353_0.316557127113553"},"_hasShrinkwrap":false}},"time":{"created":"2026-02-21T02:33:14.002Z","modified":"2026-04-08T17:24:43.705Z","0.1.0":"2026-02-21T02:33:14.296Z","0.1.1":"2026-02-22T05:03:46.173Z","0.2.0":"2026-02-27T03:13:52.248Z","0.3.0":"2026-03-03T06:31:46.994Z","0.3.1":"2026-03-03T13:53:26.642Z","0.4.0":"2026-04-08T17:24:43.541Z"},"license":"Apache-2.0","keywords":["json","editor","tree","schema","visual"],"description":"Headless core for visual-json — the visual JSON editor. Schema-aware, embeddable, extensible.","maintainers":[{"name":"ctate","email":"chris@studiotate.com"},{"name":"vercel-release-bot","email":"infra+release@vercel.com"}],"readme":"# @visual-json/core\n\nHeadless core for [visual-json](https://github.com/vercel-labs/visual-json) — the visual JSON editor. Schema-aware, embeddable, extensible.\n\nThis package is framework-agnostic — it provides the data layer without any UI dependencies.\n\n## Install\n\n```bash\nnpm install @visual-json/core\n```\n\n## Usage\n\n```ts\nimport { fromJson, toJson, setValue, addProperty } from \"@visual-json/core\";\n\n// Convert a JSON value into an editable tree\nconst tree = fromJson({ name: \"my-app\", version: \"1.0.0\" });\n\n// Mutate immutably — returns a new tree with structural sharing\nconst updated = setValue(tree, tree.root.children[0].id, \"new-app\");\n\n// Convert back to plain JSON\nconst json = toJson(updated.root);\n```\n\n## API\n\n### Tree\n\n<table>\n  <thead>\n    <tr>\n      <th>Export</th>\n      <th>Description</th>\n    </tr>\n  </thead>\n  <tbody>\n    <tr>\n      <td><code>fromJson(value)</code></td>\n      <td>Parse a <code>JsonValue</code> into a <code>TreeState</code></td>\n    </tr>\n    <tr>\n      <td><code>toJson(node)</code></td>\n      <td>Serialize a <code>TreeNode</code> back to a <code>JsonValue</code></td>\n    </tr>\n    <tr>\n      <td><code>findNode(state, id)</code></td>\n      <td>Look up a node by ID</td>\n    </tr>\n    <tr>\n      <td><code>findNodeByPath(state, path)</code></td>\n      <td>Look up a node by JSON path</td>\n    </tr>\n  </tbody>\n</table>\n\n### Operations\n\nAll operations return a new `TreeState` with structural sharing.\n\n<table>\n  <thead>\n    <tr>\n      <th>Export</th>\n      <th>Description</th>\n    </tr>\n  </thead>\n  <tbody>\n    <tr>\n      <td><code>setValue(state, nodeId, value)</code></td>\n      <td>Set a node's value</td>\n    </tr>\n    <tr>\n      <td><code>setKey(state, nodeId, newKey)</code></td>\n      <td>Rename an object key</td>\n    </tr>\n    <tr>\n      <td><code>addProperty(state, parentId, key, value)</code></td>\n      <td>Add a child to an object or array</td>\n    </tr>\n    <tr>\n      <td><code>insertProperty(state, parentId, key, value, index)</code></td>\n      <td>Insert a child at a specific index</td>\n    </tr>\n    <tr>\n      <td><code>insertNode(state, parentId, node, index)</code></td>\n      <td>Insert an existing node subtree at a specific index, preserving IDs</td>\n    </tr>\n    <tr>\n      <td><code>removeNode(state, nodeId)</code></td>\n      <td>Remove a node</td>\n    </tr>\n    <tr>\n      <td><code>moveNode(state, nodeId, newParentId, index?)</code></td>\n      <td>Move a node to a new parent</td>\n    </tr>\n    <tr>\n      <td><code>reorderChildren(state, parentId, from, to)</code></td>\n      <td>Reorder children within a parent</td>\n    </tr>\n    <tr>\n      <td><code>reorderChildrenMulti(state, parentId, movedIds, targetSiblingId, position)</code></td>\n      <td>Reorder multiple children relative to a sibling</td>\n    </tr>\n    <tr>\n      <td><code>changeType(state, nodeId, newType)</code></td>\n      <td>Convert a node to a different type</td>\n    </tr>\n    <tr>\n      <td><code>duplicateNode(state, nodeId)</code></td>\n      <td>Duplicate a node as a sibling</td>\n    </tr>\n  </tbody>\n</table>\n\n### Schema\n\n<table>\n  <thead>\n    <tr>\n      <th>Export</th>\n      <th>Description</th>\n    </tr>\n  </thead>\n  <tbody>\n    <tr>\n      <td><code>resolveSchema(value, filename)</code></td>\n      <td>Auto-detect and fetch a JSON Schema for a file</td>\n    </tr>\n    <tr>\n      <td><code>getPropertySchema(schema, path)</code></td>\n      <td>Get the schema for a specific path</td>\n    </tr>\n    <tr>\n      <td><code>validateNode(node, schema)</code></td>\n      <td>Validate a node against a schema</td>\n    </tr>\n  </tbody>\n</table>\n\n### Search & Diff\n\n<table>\n  <thead>\n    <tr>\n      <th>Export</th>\n      <th>Description</th>\n    </tr>\n  </thead>\n  <tbody>\n    <tr>\n      <td><code>searchNodes(state, query)</code></td>\n      <td>Full-text search across keys and values</td>\n    </tr>\n    <tr>\n      <td><code>computeDiff(a, b)</code></td>\n      <td>Compute a structural diff between two JSON values</td>\n    </tr>\n    <tr>\n      <td><code>History</code></td>\n      <td>Undo/redo stack for <code>TreeState</code></td>\n    </tr>\n  </tbody>\n</table>\n\n## License\n\nApache-2.0\n","readmeFilename":"README.md"}