{"_id":"@considered-vision/sanity-hierarchical-document-list","_rev":"6-a98d21a818245081a940712478edf39d","name":"@considered-vision/sanity-hierarchical-document-list","dist-tags":{"latest":"3.3.0"},"versions":{"3.0.0":{"name":"@considered-vision/sanity-hierarchical-document-list","version":"3.0.0","keywords":["sanity","sanity-plugin"],"author":{"name":"Our Org","email":"dev@our-org.com"},"license":"MIT","_id":"@considered-vision/sanity-hierarchical-document-list@3.0.0","maintainers":[{"name":"s1nny0ur","email":"sean.taaffe@juicebox.com.au"}],"homepage":"https://github.com/s1nny0ur/sanity-hierarchical-document-list#readme","bugs":{"url":"https://github.com/s1nny0ur/sanity-hierarchical-document-list/issues"},"dist":{"shasum":"b1bb8a9d933dc5464495da358bfaa34f8f456a02","tarball":"https://registry.npmjs.org/@considered-vision/sanity-hierarchical-document-list/-/sanity-hierarchical-document-list-3.0.0.tgz","fileCount":43,"integrity":"sha512-zCY+HeUOhadF/i7C08SmKKJgAUtBehjBWY+8ZvigXt015S5NXxCW/GOcUUnBqDso5q47PTCh6BCEJ2WdxJw45A==","signatures":[{"sig":"MEQCIFZRPwVNEnFNJoYx4+pFTAuxBNv6YGVOCR+jvi7C54q6AiBial32bSE3hDLy6iaDNkTd0DgpBfAAm/XuCacq90RGgg==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":445489},"main":"./dist/index.js","type":"commonjs","types":"./dist/index.d.ts","module":"./dist/index.mjs","engines":{"node":">=14"},"exports":{".":{"import":"./dist/index.mjs","source":"./src/index.ts","default":"./dist/index.mjs","require":"./dist/index.js"},"./package.json":"./package.json"},"gitHead":"146d355d3178b2c97b9c1acae48838b9e340d5a6","scripts":{"dev":"sanity dev","lint":"eslint .","build":"run-s clean && pkg-utils build --strict && pkg-utils --strict","clean":"rimraf dist","watch":"pkg-utils watch --strict","format":"prettier --write --cache --ignore-unknown .","prepare":"npm run build && husky install","link-watch":"plugin-kit link-watch","prepublishOnly":"run-s build"},"_npmUser":{"name":"s1nny0ur","email":"sean.taaffe@juicebox.com.au"},"overrides":{"react":"$react","react-is":"$react-is","react-dom":"$react-dom"},"repository":{"url":"git+https://github.com/s1nny0ur/sanity-hierarchical-document-list.git","type":"git"},"_npmVersion":"11.6.2","description":"Fork of @sanity/hierarchical-document-list with maintained dependencies","directories":{},"_nodeVersion":"24.11.1","dependencies":{"@sanity/ui":"^2.15.2","@sanity/util":"^3.78.1","@dnd-kit/core":"^6.3.1","@sanity/icons":"^3.7.0","@sanity/mutator":"^3.78.1","@dnd-kit/sortable":"^10.0.0","@dnd-kit/utilities":"^3.2.2","@sanity/incompatible-plugin":"^1.0.5"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"husky":"^8.0.3","react":"^19.0.0","eslint":"^8.55.0","rimraf":"^5.0.5","sanity":"^3.78.1","prettier":"^3.1.0","react-is":"^19.0.0","react-dom":"^19.0.0","typescript":"5.8.x","lint-staged":"^15.2.0","npm-run-all":"^4.1.5","@types/react":"^19.0.10","@sanity/vision":"^3.78.1","@commitlint/cli":"^18.4.3","@sanity/pkg-utils":"^7.0.4","styled-components":"^6.1.15","@sanity/plugin-kit":"^4.0.19","eslint-plugin-react":"^7.33.2","eslint-config-sanity":"^7.0.1","eslint-config-prettier":"^9.1.0","eslint-plugin-prettier":"^5.0.1","@typescript-eslint/parser":"^6.13.1","eslint-plugin-react-hooks":"^4.6.0","prettier-plugin-packagejson":"^2.4.7","@commitlint/config-conventional":"^18.4.3","@sanity/semantic-release-preset":"^4.1.6","@typescript-eslint/eslint-plugin":"^6.13.1"},"peerDependencies":{"react":"^18.3 || ^19","sanity":"^3 || ^4.0.0-0","react-is":"^18.3 || ^19","react-dom":"^18.3 || ^19","styled-components":"^6.1"},"_npmOperationalInternal":{"tmp":"tmp/sanity-hierarchical-document-list_3.0.0_1764561350145_0.7926714077480772","host":"s3://npm-registry-packages-npm-production"}},"3.0.1":{"name":"@considered-vision/sanity-hierarchical-document-list","version":"3.0.1","keywords":["sanity","sanity-plugin"],"author":{"name":"Our Org","email":"dev@our-org.com"},"license":"MIT","_id":"@considered-vision/sanity-hierarchical-document-list@3.0.1","maintainers":[{"name":"s1nny0ur","email":"sean.taaffe@juicebox.com.au"}],"homepage":"https://github.com/s1nny0ur/sanity-hierarchical-document-list#readme","bugs":{"url":"https://github.com/s1nny0ur/sanity-hierarchical-document-list/issues"},"dist":{"shasum":"5d621a5b8f8697cb3ffb420cf5df6e44845f8255","tarball":"https://registry.npmjs.org/@considered-vision/sanity-hierarchical-document-list/-/sanity-hierarchical-document-list-3.0.1.tgz","fileCount":44,"integrity":"sha512-c82mda9IJtzSp6CpKM+qioTIQ7C63EypKoJFExSgdJZo2cuSHHWx42OWbNufVYfUAZQPqr5Mirf8ulmBdeB0Aw==","signatures":[{"sig":"MEUCICS49nQwD/L7V6CX14GxJG1RRxsftu4EW1OYgFJBiM10AiEAjUtYa/nr1ICoADZGQ3NmltGnVqJT9nVfd8cs5eair6w=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":473353},"main":"./dist/index.js","type":"commonjs","types":"./dist/index.d.ts","module":"./dist/index.mjs","engines":{"node":">=14"},"exports":{".":{"import":"./dist/index.mjs","source":"./src/index.ts","default":"./dist/index.mjs","require":"./dist/index.js"},"./package.json":"./package.json"},"gitHead":"03af4bf7b1f07fccdd58fb65fe15535fdfc201df","release":{"extends":"@sanity/semantic-release-preset"},"scripts":{"dev":"sanity dev","lint":"eslint .","build":"run-s clean && pkg-utils build --strict && pkg-utils --strict","clean":"rimraf dist","watch":"pkg-utils watch --strict","format":"prettier --write --cache --ignore-unknown .","prepare":"npm run build && husky install","link-watch":"plugin-kit link-watch","prepublishOnly":"run-s build"},"_npmUser":{"name":"s1nny0ur","email":"sean.taaffe@juicebox.com.au"},"overrides":{"react":"$react","react-is":"$react-is","react-dom":"$react-dom"},"repository":{"url":"git+https://github.com/s1nny0ur/sanity-hierarchical-document-list.git","type":"git"},"_npmVersion":"10.9.4","description":"Fork of @sanity/hierarchical-document-list with maintained dependencies","directories":{},"_nodeVersion":"24.11.1","dependencies":{"@sanity/ui":"^2.15.2","@sanity/util":"^3.78.1","@dnd-kit/core":"^6.3.1","@sanity/icons":"^3.7.0","@sanity/mutator":"^3.78.1","@dnd-kit/sortable":"^10.0.0","@dnd-kit/utilities":"^3.2.2","@sanity/incompatible-plugin":"^1.0.5"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"husky":"^8.0.3","react":"^19.0.0","eslint":"^8.55.0","rimraf":"^5.0.5","sanity":"^3.78.1","prettier":"^3.1.0","react-is":"^19.0.0","react-dom":"^19.0.0","typescript":"5.8.x","lint-staged":"^15.2.0","npm-run-all":"^4.1.5","@types/react":"^19.0.10","@sanity/vision":"^3.78.1","@commitlint/cli":"^18.4.3","@sanity/pkg-utils":"^7.0.4","styled-components":"^6.1.15","@sanity/plugin-kit":"^4.0.19","eslint-plugin-react":"^7.33.2","eslint-config-sanity":"^7.0.1","eslint-config-prettier":"^9.1.0","eslint-plugin-prettier":"^5.0.1","@typescript-eslint/parser":"^6.13.1","eslint-plugin-react-hooks":"^4.6.0","prettier-plugin-packagejson":"^2.4.7","@commitlint/config-conventional":"^18.4.3","@sanity/semantic-release-preset":"^4.1.6","@typescript-eslint/eslint-plugin":"^6.13.1"},"peerDependencies":{"react":"^18.3 || ^19","sanity":"^3 || ^4.0.0-0","react-is":"^18.3 || ^19","react-dom":"^18.3 || ^19","styled-components":"^6.1"},"_npmOperationalInternal":{"tmp":"tmp/sanity-hierarchical-document-list_3.0.1_1764570554241_0.98799375458569","host":"s3://npm-registry-packages-npm-production"}},"3.1.0":{"name":"@considered-vision/sanity-hierarchical-document-list","version":"3.1.0","keywords":["sanity","sanity-plugin"],"author":{"name":"Our Org","email":"dev@our-org.com"},"license":"MIT","_id":"@considered-vision/sanity-hierarchical-document-list@3.1.0","maintainers":[{"name":"s1nny0ur","email":"sean.taaffe@juicebox.com.au"}],"homepage":"https://github.com/s1nny0ur/sanity-hierarchical-document-list#readme","bugs":{"url":"https://github.com/s1nny0ur/sanity-hierarchical-document-list/issues"},"dist":{"shasum":"c78b5a5ea2f81d5820d363208b67576dddfd4340","tarball":"https://registry.npmjs.org/@considered-vision/sanity-hierarchical-document-list/-/sanity-hierarchical-document-list-3.1.0.tgz","fileCount":45,"integrity":"sha512-C7IYwR0FrLMSJwN9g9qqOWtT2h3/md23kJ/5O3hyh22V5rxqKxF/4QqngKqvVPPEIetPRB2jUDkAfnU8KUy5xA==","signatures":[{"sig":"MEYCIQCdHarpaFNkCUS83YYrHMN6g07bcYmZSFg6MPuI6JTeNwIhAM1/ws4eXfWgCXtPxgrOJh99tPICSxfptnpubX3LSQ1h","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":508284},"main":"./dist/index.js","type":"commonjs","types":"./dist/index.d.ts","module":"./dist/index.mjs","engines":{"node":">=14"},"exports":{".":{"import":"./dist/index.mjs","source":"./src/index.ts","default":"./dist/index.mjs","require":"./dist/index.js"},"./package.json":"./package.json"},"gitHead":"73c3cfb6ac9e3b3366118caa72cbc69887faeb36","release":{"extends":"@sanity/semantic-release-preset"},"scripts":{"dev":"sanity dev","lint":"eslint .","build":"run-s clean && pkg-utils build --strict && pkg-utils --strict","clean":"rimraf dist","watch":"pkg-utils watch --strict","format":"prettier --write --cache --ignore-unknown .","prepare":"npm run build && husky install","link-watch":"plugin-kit link-watch","prepublishOnly":"run-s build"},"_npmUser":{"name":"s1nny0ur","email":"sean.taaffe@juicebox.com.au"},"overrides":{"react":"$react","react-is":"$react-is","react-dom":"$react-dom"},"repository":{"url":"git+https://github.com/s1nny0ur/sanity-hierarchical-document-list.git","type":"git"},"_npmVersion":"10.9.4","description":"Fork of @sanity/hierarchical-document-list with maintained dependencies","directories":{},"_nodeVersion":"24.11.1","dependencies":{"@sanity/ui":"^2.15.2","@sanity/util":"^3.78.1","@dnd-kit/core":"^6.3.1","@sanity/icons":"^3.7.0","@sanity/mutator":"^3.78.1","@dnd-kit/sortable":"^10.0.0","@dnd-kit/utilities":"^3.2.2","@sanity/incompatible-plugin":"^1.0.5"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"husky":"^8.0.3","react":"^19.0.0","eslint":"^8.55.0","rimraf":"^5.0.5","sanity":"^3.78.1","prettier":"^3.1.0","react-is":"^19.0.0","react-dom":"^19.0.0","typescript":"5.8.x","lint-staged":"^15.2.0","npm-run-all":"^4.1.5","@types/react":"^19.0.10","@sanity/vision":"^3.78.1","@commitlint/cli":"^18.4.3","@sanity/pkg-utils":"^7.0.4","styled-components":"^6.1.15","@sanity/plugin-kit":"^4.0.19","eslint-plugin-react":"^7.33.2","eslint-config-sanity":"^7.0.1","eslint-config-prettier":"^9.1.0","eslint-plugin-prettier":"^5.0.1","@typescript-eslint/parser":"^6.13.1","eslint-plugin-react-hooks":"^4.6.0","prettier-plugin-packagejson":"^2.4.7","@commitlint/config-conventional":"^18.4.3","@sanity/semantic-release-preset":"^4.1.6","@typescript-eslint/eslint-plugin":"^6.13.1"},"peerDependencies":{"react":"^18.3 || ^19","sanity":"^3 || ^4.0.0-0","react-is":"^18.3 || ^19","react-dom":"^18.3 || ^19","styled-components":"^6.1"},"_npmOperationalInternal":{"tmp":"tmp/sanity-hierarchical-document-list_3.1.0_1764638086461_0.22222033391349094","host":"s3://npm-registry-packages-npm-production"}},"3.2.0":{"name":"@considered-vision/sanity-hierarchical-document-list","version":"3.2.0","keywords":["sanity","sanity-plugin"],"author":{"name":"Our Org","email":"dev@our-org.com"},"license":"MIT","_id":"@considered-vision/sanity-hierarchical-document-list@3.2.0","maintainers":[{"name":"s1nny0ur","email":"sean.taaffe@juicebox.com.au"}],"homepage":"https://github.com/s1nny0ur/sanity-hierarchical-document-list#readme","bugs":{"url":"https://github.com/s1nny0ur/sanity-hierarchical-document-list/issues"},"dist":{"shasum":"7680979e233ffa0ab62011b5de2bf03398949a2d","tarball":"https://registry.npmjs.org/@considered-vision/sanity-hierarchical-document-list/-/sanity-hierarchical-document-list-3.2.0.tgz","fileCount":45,"integrity":"sha512-XdNcCN4YMaCki1XS9qnLSF7mq180Bei2Aw7dnY2IR7wAYhjnbgHky+rZLsTxcKaXUv9pRuStAme91GMu+WNbqw==","signatures":[{"sig":"MEUCIF10M9wnBjIbbpsqVlnT8+K2MS7z2dtiB3telhfvlEabAiEA4L6HwWuclLeCLQFcGx3G9EE8E/fH47S850NqDigsT1U=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":541275},"main":"./dist/index.js","type":"commonjs","types":"./dist/index.d.ts","module":"./dist/index.mjs","engines":{"node":">=14"},"exports":{".":{"import":"./dist/index.mjs","source":"./src/index.ts","default":"./dist/index.mjs","require":"./dist/index.js"},"./package.json":"./package.json"},"gitHead":"22f3aa68551544e69b8f00c309b327bd848d913d","release":{"extends":"@sanity/semantic-release-preset"},"scripts":{"dev":"sanity dev","lint":"eslint .","build":"run-s clean && pkg-utils build --strict && pkg-utils --strict","clean":"rimraf dist","watch":"pkg-utils watch --strict","format":"prettier --write --cache --ignore-unknown .","prepare":"npm run build && husky install","link-watch":"plugin-kit link-watch","prepublishOnly":"run-s build"},"_npmUser":{"name":"s1nny0ur","email":"sean.taaffe@juicebox.com.au"},"overrides":{"react":"$react","react-is":"$react-is","react-dom":"$react-dom"},"repository":{"url":"git+https://github.com/s1nny0ur/sanity-hierarchical-document-list.git","type":"git"},"_npmVersion":"10.9.4","description":"Fork of @sanity/hierarchical-document-list with maintained dependencies","directories":{},"_nodeVersion":"24.11.1","dependencies":{"@sanity/ui":"^2.15.2","@sanity/util":"^3.78.1","@dnd-kit/core":"^6.3.1","@sanity/icons":"^3.7.0","@sanity/mutator":"^3.78.1","@dnd-kit/sortable":"^10.0.0","@dnd-kit/utilities":"^3.2.2","@sanity/incompatible-plugin":"^1.0.5"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"husky":"^8.0.3","react":"^19.0.0","eslint":"^8.55.0","rimraf":"^5.0.5","sanity":"^3.78.1","prettier":"^3.1.0","react-is":"^19.0.0","react-dom":"^19.0.0","typescript":"5.8.x","lint-staged":"^15.2.0","npm-run-all":"^4.1.5","@types/react":"^19.0.10","@sanity/vision":"^3.78.1","@commitlint/cli":"^18.4.3","@sanity/pkg-utils":"^7.0.4","styled-components":"^6.1.15","@sanity/plugin-kit":"^4.0.19","eslint-plugin-react":"^7.33.2","eslint-config-sanity":"^7.0.1","eslint-config-prettier":"^9.1.0","eslint-plugin-prettier":"^5.0.1","@typescript-eslint/parser":"^6.13.1","eslint-plugin-react-hooks":"^4.6.0","prettier-plugin-packagejson":"^2.4.7","@commitlint/config-conventional":"^18.4.3","@sanity/semantic-release-preset":"^4.1.6","@typescript-eslint/eslint-plugin":"^6.13.1"},"peerDependencies":{"react":"^18.3 || ^19","sanity":"^3 || ^4.0.0-0","react-is":"^18.3 || ^19","react-dom":"^18.3 || ^19","styled-components":"^6.1"},"_npmOperationalInternal":{"tmp":"tmp/sanity-hierarchical-document-list_3.2.0_1764640681991_0.24069067621548657","host":"s3://npm-registry-packages-npm-production"}},"3.2.1":{"name":"@considered-vision/sanity-hierarchical-document-list","version":"3.2.1","keywords":["sanity","sanity-plugin"],"author":{"name":"Our Org","email":"dev@our-org.com"},"license":"MIT","_id":"@considered-vision/sanity-hierarchical-document-list@3.2.1","maintainers":[{"name":"s1nny0ur","email":"sean.taaffe@juicebox.com.au"}],"homepage":"https://github.com/s1nny0ur/sanity-hierarchical-document-list#readme","bugs":{"url":"https://github.com/s1nny0ur/sanity-hierarchical-document-list/issues"},"dist":{"shasum":"e11f0a54274dffe46d622053be06f07ce3197489","tarball":"https://registry.npmjs.org/@considered-vision/sanity-hierarchical-document-list/-/sanity-hierarchical-document-list-3.2.1.tgz","fileCount":45,"integrity":"sha512-xIsadk6YfDHn5uX4/TmMfFnvC2xxMdh3H4w2GGdpg8gXcMNXNzQkGZ3TukPyM0LjRxkYauEEpQqCh7ic5dEn5w==","signatures":[{"sig":"MEYCIQChaZcz+9gZ5PfasmLq7CO1Ifv4tMjjcKv8Dnuw2eR4bAIhAOpSQ7+NRhVGwVs8oxLtkJPd9+uE9VRR9LO9MdwJdAi4","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":555593},"main":"./dist/index.js","type":"commonjs","types":"./dist/index.d.ts","module":"./dist/index.mjs","engines":{"node":">=14"},"exports":{".":{"import":"./dist/index.mjs","source":"./src/index.ts","default":"./dist/index.mjs","require":"./dist/index.js"},"./package.json":"./package.json"},"gitHead":"09161057963cf4306b56ea37df99f32bcca41dde","release":{"extends":"@sanity/semantic-release-preset"},"scripts":{"dev":"sanity dev","lint":"eslint .","build":"run-s clean && pkg-utils build --strict && pkg-utils --strict","clean":"rimraf dist","watch":"pkg-utils watch --strict","format":"prettier --write --cache --ignore-unknown .","prepare":"npm run build && husky install","link-watch":"plugin-kit link-watch","prepublishOnly":"run-s build"},"_npmUser":{"name":"s1nny0ur","email":"sean.taaffe@juicebox.com.au"},"overrides":{"react":"$react","react-is":"$react-is","react-dom":"$react-dom"},"repository":{"url":"git+https://github.com/s1nny0ur/sanity-hierarchical-document-list.git","type":"git"},"_npmVersion":"10.9.4","description":"Fork of @sanity/hierarchical-document-list with maintained dependencies","directories":{},"_nodeVersion":"24.11.1","dependencies":{"@sanity/ui":"^2.15.2","@sanity/util":"^3.78.1","@dnd-kit/core":"^6.3.1","@sanity/icons":"^3.7.0","@sanity/mutator":"^3.78.1","@dnd-kit/sortable":"^10.0.0","@dnd-kit/utilities":"^3.2.2","@sanity/incompatible-plugin":"^1.0.5"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"husky":"^8.0.3","react":"^19.0.0","eslint":"^8.55.0","rimraf":"^5.0.5","sanity":"^3.78.1","prettier":"^3.1.0","react-is":"^19.0.0","react-dom":"^19.0.0","typescript":"5.8.x","lint-staged":"^15.2.0","npm-run-all":"^4.1.5","@types/react":"^19.0.10","@sanity/vision":"^3.78.1","@commitlint/cli":"^18.4.3","@sanity/pkg-utils":"^7.0.4","styled-components":"^6.1.15","@sanity/plugin-kit":"^4.0.19","eslint-plugin-react":"^7.33.2","eslint-config-sanity":"^7.0.1","eslint-config-prettier":"^9.1.0","eslint-plugin-prettier":"^5.0.1","@typescript-eslint/parser":"^6.13.1","eslint-plugin-react-hooks":"^4.6.0","prettier-plugin-packagejson":"^2.4.7","@commitlint/config-conventional":"^18.4.3","@sanity/semantic-release-preset":"^4.1.6","@typescript-eslint/eslint-plugin":"^6.13.1"},"peerDependencies":{"react":"^18.3 || ^19","sanity":"^3 || ^4.0.0-0","react-is":"^18.3 || ^19","react-dom":"^18.3 || ^19","styled-components":"^6.1"},"_npmOperationalInternal":{"tmp":"tmp/sanity-hierarchical-document-list_3.2.1_1764662857332_0.9040555640174042","host":"s3://npm-registry-packages-npm-production"}},"3.3.0":{"name":"@considered-vision/sanity-hierarchical-document-list","version":"3.3.0","description":"Fork of @sanity/hierarchical-document-list with maintained dependencies","keywords":["sanity","sanity-plugin"],"homepage":"https://github.com/s1nny0ur/sanity-hierarchical-document-list#readme","bugs":{"url":"https://github.com/s1nny0ur/sanity-hierarchical-document-list/issues"},"type":"commonjs","repository":{"type":"git","url":"git+https://github.com/s1nny0ur/sanity-hierarchical-document-list.git"},"license":"MIT","author":{"name":"Our Org","email":"dev@our-org.com"},"publishConfig":{"access":"public"},"exports":{".":{"source":"./src/index.ts","import":"./dist/index.mjs","require":"./dist/index.js","default":"./dist/index.mjs"},"./package.json":"./package.json"},"main":"./dist/index.js","module":"./dist/index.mjs","types":"./dist/index.d.ts","scripts":{"dev":"sanity dev","prepare":"npm run build && husky install","build":"run-s clean && pkg-utils build --strict && pkg-utils --strict","prepublishOnly":"run-s build","clean":"rimraf dist","format":"prettier --write --cache --ignore-unknown .","link-watch":"plugin-kit link-watch","lint":"eslint .","watch":"pkg-utils watch --strict"},"dependencies":{"@dnd-kit/core":"^6.3.1","@dnd-kit/sortable":"^10.0.0","@dnd-kit/utilities":"^3.2.2","@sanity/icons":"^3.7.0","@sanity/incompatible-plugin":"^1.0.5","@sanity/mutator":"^3.78.1","@sanity/ui":"^2.15.2","@sanity/util":"^3.78.1"},"devDependencies":{"@commitlint/cli":"^18.4.3","@commitlint/config-conventional":"^18.4.3","@sanity/pkg-utils":"^7.0.4","@sanity/plugin-kit":"^4.0.19","@sanity/semantic-release-preset":"^4.1.6","@sanity/vision":"^3.78.1","@types/react":"^19.0.10","@typescript-eslint/eslint-plugin":"^6.13.1","@typescript-eslint/parser":"^6.13.1","eslint":"^8.55.0","eslint-config-prettier":"^9.1.0","eslint-config-sanity":"^7.0.1","eslint-plugin-prettier":"^5.0.1","eslint-plugin-react":"^7.33.2","eslint-plugin-react-hooks":"^4.6.0","husky":"^8.0.3","lint-staged":"^15.2.0","npm-run-all":"^4.1.5","prettier":"^3.1.0","prettier-plugin-packagejson":"^2.4.7","react":"^19.0.0","react-dom":"^19.0.0","react-is":"^19.0.0","rimraf":"^5.0.5","sanity":"^3.78.1","styled-components":"^6.1.15","typescript":"5.8.x"},"peerDependencies":{"react":"^18.3 || ^19","react-dom":"^18.3 || ^19","react-is":"^18.3 || ^19","sanity":"^3 || ^4 || ^5.0.0-0","styled-components":"^6.1"},"overrides":{"react":"$react","react-dom":"$react-dom","react-is":"$react-is"},"engines":{"node":">=14"},"release":{"extends":"@sanity/semantic-release-preset"},"_id":"@considered-vision/sanity-hierarchical-document-list@3.3.0","gitHead":"88a0f8c0b4419f881e5232b8a2f65fc132be3d85","_nodeVersion":"24.13.0","_npmVersion":"10.9.4","dist":{"integrity":"sha512-4qenUGzwBFwAsz2Emci3D4iX7W7N2XYclYf/WsNHNvCSovqsnXIQPJZgfC3j1cATyqgej+o5+byc32MLEmqYaA==","shasum":"89d7e3891f9cea17e36e761b43fc727f27e5203b","tarball":"https://registry.npmjs.org/@considered-vision/sanity-hierarchical-document-list/-/sanity-hierarchical-document-list-3.3.0.tgz","fileCount":45,"unpackedSize":557982,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIHHfAFuW9ED7QEMA/DS346VnCFxot0JNInameLF3GqhZAiEAtKm0kGljD+afadIaztYEYHv8pf/JL/0piajwN8YcBpA="}]},"_npmUser":{"name":"s1nny0ur","email":"sean.taaffe@juicebox.com.au"},"directories":{},"maintainers":[{"name":"s1nny0ur","email":"sean.taaffe@juicebox.com.au"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/sanity-hierarchical-document-list_3.3.0_1770190728942_0.41159424524727894"},"_hasShrinkwrap":false}},"time":{"created":"2025-12-01T03:55:49.980Z","modified":"2026-02-04T07:38:49.246Z","3.0.0":"2025-12-01T03:55:50.359Z","3.0.1":"2025-12-01T06:29:14.429Z","3.1.0":"2025-12-02T01:14:46.651Z","3.2.0":"2025-12-02T01:58:02.192Z","3.2.1":"2025-12-02T08:07:37.613Z","3.3.0":"2026-02-04T07:38:49.124Z"},"bugs":{"url":"https://github.com/s1nny0ur/sanity-hierarchical-document-list/issues"},"author":{"name":"Our Org","email":"dev@our-org.com"},"license":"MIT","homepage":"https://github.com/s1nny0ur/sanity-hierarchical-document-list#readme","keywords":["sanity","sanity-plugin"],"repository":{"type":"git","url":"git+https://github.com/s1nny0ur/sanity-hierarchical-document-list.git"},"description":"Fork of @sanity/hierarchical-document-list with maintained dependencies","maintainers":[{"name":"s1nny0ur","email":"sean.taaffe@juicebox.com.au"}],"readme":"# @considered-vision/sanity-hierarchical-document-list\n\n> **Fork of [@sanity/hierarchical-document-list](https://github.com/sanity-io/hierarchical-document-list)** with maintained dependencies and dnd-kit-based tree view.\n\n**Compatibility:** Sanity v3, v4, and v5 | React 18.3+ and 19+\n\nPlugin for visually organizing documents as hierarchies in the [Sanity studio](https://www.sanity.io/docs/sanity-studio). Applications include:\n\n- Tables of content - such as a book's sections and chapters\n- Navigational structure & menus - a website mega-menu with multiple levels, for example\n- Taxonomy inheritance - \"_Carbs_ is a parent of _Legumes_ which is a parent of _Beans_\"\n\n![Screenshot of the plugin](/screenshot-1.jpg)\n\nIf you're looking for a way to order documents on a flat list, refer to [@sanity/orderable-document-list](https://github.com/sanity-io/orderable-document-list).\n\n## Installation\n\n```bash\n# From the root of your sanity project\nnpm i @considered-vision/sanity-hierarchical-document-list\n```\n\n## Usage\n\n### 1. Add the plugin and the default documentType to the sanity.config.ts\n\n```js\n// sanity.config.js\nimport {defineConfig} from 'sanity'\nimport {\n  hierarchicalDocumentList,\n  hierarchyTree\n} from '@considered-vision/sanity-hierarchical-document-list'\n\nexport default defineConfig({\n  // ...\n  plugins: [hierarchicalDocumentList()],\n  schema: {\n    types: [\n      //...,\n      hierarchyTree\n    ]\n  }\n})\n```\n\n### 2. Add one or more hierarchy documents to your Structure Builder.\n\n💡 _To learn about custom structures, refer to the [Structure Builder docs](https://www.sanity.io/docs/overview-structure-builder)._\n\n```ts\n// sanity.config.ts\nimport {defineConfig} from 'sanity'\nimport {structureTool} from 'sanity/structure'\nimport {\n  createDeskHierarchy,\n  hierarchicalDocumentList,\n  hierarchyTree\n} from '@considered-vision/sanity-hierarchical-document-list'\n\nexport default defineConfig({\n  // ...\n  plugins: [\n    structureTool({\n      // NOTE: You MUST pass S and Context along to createDeskHierarchy as props\n      structure: (S, context) =>\n        S.list()\n          .title('Content')\n          .items([\n            ...S.documentTypeListItems(), // or whatever other structure you have\n            createDeskHierarchy({\n              //prop drill S and context:\n              S,\n              context,\n\n              //configure plugin\n\n              title: 'Main table of contents',\n\n              // The hierarchy will be stored in this document ID 👇\n              documentId: 'main-table-of-contents',\n\n              // Document types editors should be able to include in the hierarchy\n              referenceTo: ['site.page', 'site.post', 'docs.article', 'social.youtubeVideo'],\n\n              // ❓ Optional: provide filters and/or parameters for narrowing which documents can be added\n              referenceOptions: {\n                filter: 'status in $acceptedStatuses',\n                filterParams: {\n                  acceptedStatuses: ['published', 'approved']\n                }\n              },\n\n              // ❓ Optional: limit the depth of your hierarachies\n              maxDepth: 3,\n\n              // ❓ Optional: subarray of referenceTo, when it should not be possible to create new types from all referenceTo types\n              creatableTypes: ['site.page']\n            })\n          ])\n    }),\n    hierarchicalDocumentList()\n  ],\n  schema: {\n    types: [\n      //...,\n      hierarchyTree\n    ]\n  }\n})\n```\n\n## How it works\n\nThe hierarchical data is stored in a centralized document with the `documentId` of your choosing. As compared to storing parent/child relationships in each individual document in the hierarchy, this makes it easier to implement different hierarchies for the same content according to the context.\n\nThis approach also simplifies querying the full structure - as you'll see in [querying data](#querying-data) below.\n\nKeep in mind that this specified **document is live-edited**, meaning it has no draft and every change by editors will directly affect its published version.\n\nInstead of requiring editors to manually add items one-by-one, the plugin will create a [GROQ](https://www.sanity.io/docs/overview-groq) query that matches all documents with a `_type` in the `referenceTo` option you specify, that also match the optional `referenceOptions.filter`. From these documents, editors are able to drag, nest and re-order them at will from the \"Add more items\" list.\n\nIf a document in the tree doesn't match the filters set, it'll keep existing in the data. This can happen if the document has a new, unfitting value, the configuration changed or it was deleted. Although the tree will still be publishable, editors will get a warning and won't be able to drag these faulty entries around.\n\n## Querying data\n\nThe plugin stores flat arrays which represent your hierarchical data through `parent` keys. Here's an example of one top-level item with one child:\n\n```json\n[\n  {\n    \"_key\": \"741b9edde2ba\",\n    \"_type\": \"hierarchy.node\",\n    \"value\": {\n      \"reference\": {\n        \"_ref\": \"75c47994-e6bb-487a-b8c9-b283f2436031\",\n        \"_type\": \"reference\",\n        \"_weak\": true // This plugin includes weak references by default\n      },\n      \"docType\": \"docs.article\"\n    }\n    // no `parent`, this item is top-level\n  },\n  {\n    \"_key\": \"f92eaeec96f7\",\n    \"_type\": \"hierarchy.node\",\n    \"value\": {\n      \"reference\": {\n        \"_ref\": \"7ad60a02-5d6e-47d8-92e2-6724cc130058\",\n        \"_type\": \"reference\",\n        \"_weak\": true\n      },\n      \"docType\": \"site.post\"\n    },\n    // The `parent` property points to the _key of the parent node where this one is nested\n    \"parent\": \"741b9edde2ba\"\n  }\n]\n```\n\n📌 If using GraphQL, refer to [Usage with GraphQL](#usage-with-graphql).\n\nFrom the the above, we know how to expand referenced documents in GROQ:\n\n```groq\n*[_id == \"main-table-of-contents\"][0]{\n  tree[] {\n    // Make sure you include each item's _key and parent\n    _key,\n    parent,\n\n    // \"Expand\" the reference to the node\n    value {\n      reference->{\n        // Get whatever property you need from your documents\n        title,\n        slug,\n      }\n    }\n  }\n}\n```\n\nThe query above will then need to be converted from flat data to a tree. Refer to [Using the data](#using-the-data).\n\n<!-- ### Other query scenarios\n\nFind a given document in a hierarchy and get its parent - useful for rendering breadcrumbs:\n\n```groq\n// Works starting from Content Lake V2021-03-25\n*[_id == \"main-table-of-contents\"][0]{\n  // From the tree, get the 1st node that references a given document _id\n  tree[node._ref == \"my-book-section\"][0] {\n    _key,\n    \"section\": node.reference->{\n      title,\n    },\n    // Then, from the tree get the element matching the `parent` _key of the found node\n    \"parentChapter\": ^.tree[_key == ^.parent][0]{\n      _key,\n      \"chapter\": node.reference->{\n        title,\n        contributors,\n      }\n    },\n  }\n}\n```\n\n---- -->\n\n## Using the data\n\nFrom the flat data queried, you'll need to convert it to a nested tree with `flatDataToTree`:\n\n```js\nimport {flatDataToTree} from '@considered-vision/sanity-hierarchical-document-list'\n\nconst hierarchyDocument = await client.fetch(`*[_id == \"book-v3-review-a\"][0]{\n  tree[] {\n    // Make sure you include each item's _key and parent\n    _key,\n    parent,\n    value {\n      reference->{\n        title,\n        slug,\n        content,\n      }\n    }\n  }\n}`)\nconst tree = flatDataToTree(data.tree)\n\n/* Results in a recursively nested structure. Using the example data above:\n{\n  \"_key\": \"741b9edde2ba\",\n  \"_type\": \"hierarchy.node\",\n  \"value\": {\n    \"reference\": {\n      \"_ref\": \"75c47994-e6bb-487a-b8c9-b283f2436031\",\n      \"_type\": \"reference\",\n      \"_weak\": true\n    },\n    \"docType\": \"docs.article\"\n  },\n  \"parent\": null,\n  \"children\": [\n    {\n      \"_key\": \"f92eaeec96f7\",\n      \"_type\": \"hierarchy.node\",\n      \"value\": {\n        \"reference\": {\n          \"_ref\": \"7ad60a02-5d6e-47d8-92e2-6724cc130058\",\n          \"_type\": \"reference\",\n          \"_weak\": true\n        },\n        \"docType\": \"site.post\"\n      },\n      \"parent\": \"741b9edde2ba\"\n    }\n  ]\n}\n*/\n```\n\nAfter the transformation above, nodes with nested entries will include a `children` array. This data structure is recursive.\n\n## Usage with GraphQL\n\nBy default, this plugin will create and update documents of `_type: hierarchy.tree`, with a `tree` field holding the hierarchical data. When deploying a [GraphQL Sanity endpoint](https://www.sanity.io/docs/graphql), however, you'll need an explicit document type in your schema so that you get the proper types for querying.\n\nTo add this document type, create a set of schemas with the `createHierarchicalSchemas`:\n\n```js\n// hierarchicalSchemas.js\nimport {createHierarchicalSchemas} from '@considered-vision/sanity-hierarchical-document-list'\n\nexport const hierarchicalOptions = {\n  // choose the document type name that suits you best\n  documentType: 'myCustomHierarchicalType',\n\n  // key for the tree field in the document - \"tree\" by default\n  fieldKeyInDocument: 'customTreeDataKey',\n\n  // Document types editors should be able to include in the hierarchy\n  referenceTo: ['site.page', 'site.post', 'docs.article', 'social.youtubeVideo'],\n\n  // ❓ Optional: provide filters and/or parameters for narrowing which documents can be added\n  referenceOptions: {\n    filter: 'status in $acceptedStatuses',\n    filterParams: {\n      acceptedStatuses: ['published', 'approved']\n    }\n  },\n\n  // ❓ Optional: limit the depth of your hierarachies\n  maxDept: 3\n}\n\nexport default createHierarchicalSchemas(hierarchicalOptions)\n```\n\nAnd add these schemas to your studio:\n\n```js\nimport createSchema from 'part:@sanity/base/schema-creator'\nimport schemaTypes from 'all:part:@sanity/base/schema-type'\nimport hierarchicalSchemas from './hierarchicalSchemas'\n\nexport default createSchema({\n  name: 'default',\n  types: schemaTypes.concat([\n    // ...Other schemas\n    ...hierarchicalSchemas // add all items in the array of hierarchical schemas\n  ])\n})\n```\n\nThen, in your desk structure where you added the hierarchical document(s), include the right `documentType` and `fieldKeyInDocument` properties:\n\n```js\ncreateDeskHierarchy({\n  // Include whatever values you defined in your schema in the step above\n  documentType: 'myCustomHierarchicalType', // the name of your document type\n  fieldKeyInDocument: 'customTreeDataKey' // the name of the hierarchical field\n  // ...\n})\n\n// Ideally, use the same configuration object you defined in your schemas:\nimport {hierarchicalOptions} from './hierarchicalSchemas'\n\ncreateDeskHierarchy({\n  ...hierarchicalOptions\n  // ...\n})\n```\n\n---\n\n📌 **Note:** you can also use the method above to add hierarchies inside the schema of documents and objects, which would be editable outside the desk structure.\n\nWe're considering adapting this input to support any type of nest-able data, not only references. Until then, avoid using the generated schemas in nested schemas as, in these contexts, it lacks the necessary affordances for a good editing experience.\n\n---\n\n## Tree Change Callback\n\nThe `onTreeChange` callback allows you to react to tree mutations in real-time. This is useful for syncing hierarchy data back to individual documents, such as updating slugs, breadcrumbs, or path fields.\n\n### Basic Usage\n\n```ts\nimport {createDeskHierarchy} from '@considered-vision/sanity-hierarchical-document-list'\n\ncreateDeskHierarchy({\n  S,\n  context,\n  title: 'Main Navigation',\n  documentId: 'main-nav',\n  referenceTo: ['page', 'article'],\n\n  onTreeChange: async (event) => {\n    console.log(`Tree ${event.operation}:`, event.affectedDocIds)\n    console.log('All paths:', event.paths)\n  }\n})\n```\n\n### Callback Event Properties\n\nThe `TreeChangeEvent` object passed to your callback includes:\n\n| Property         | Type                                                      | Description                                                 |\n| ---------------- | --------------------------------------------------------- | ----------------------------------------------------------- |\n| `treeDocId`      | `string`                                                  | The tree document ID                                        |\n| `tree`           | `StoredTreeItem[]`                                        | Full tree state after the mutation                          |\n| `operation`      | `'add' \\| 'remove' \\| 'move' \\| 'duplicate' \\| 'reorder'` | Type of operation that triggered the change                 |\n| `affectedDocIds` | `string[]`                                                | Document IDs affected by this change (includes descendants) |\n| `paths`          | `DocumentPathInfo[]`                                      | Computed paths for ALL documents in tree                    |\n\nEach `DocumentPathInfo` object contains:\n\n| Property           | Type                    | Description                                                                |\n| ------------------ | ----------------------- | -------------------------------------------------------------------------- |\n| `docId`            | `string`                | Published document `_id`                                                   |\n| `docType`          | `string`                | Document `_type`                                                           |\n| `ancestors`        | `string[]`              | Ordered array of ancestor document `_id`s (root to parent)                 |\n| `nodeKey`          | `string`                | This document's `_key` in the tree                                         |\n| `parentNodeKey`    | `string \\| null`        | Parent's `_key` in the tree (`null` if root level)                         |\n| `depth`            | `number`                | Zero-based depth in hierarchy                                              |\n| `siblingIndex`     | `number`                | Position among siblings (zero-based)                                       |\n| `slug`             | `string \\| undefined`   | Document's slug (when `slugField` is configured)                           |\n| `ancestorSlugs`    | `string[] \\| undefined` | Ordered array of ancestor slugs (when `slugField` is configured)           |\n| `computedPath`     | `string \\| undefined`   | Full URL path, e.g., `/parent/child/page` (when `slugField` is configured) |\n| `computedSegments` | `string[] \\| undefined` | Array of path segments (when `slugField` is configured)                    |\n\n### Slug/Path Computation\n\nThe plugin can automatically compute URL paths from document slugs. This eliminates the need for additional queries or duplicating path logic in your callbacks.\n\n#### Configuration\n\nAdd `slugField` to your hierarchy configuration:\n\n```ts\ncreateDeskHierarchy({\n  S,\n  context,\n  title: 'Main Navigation',\n  documentId: 'main-nav',\n  referenceTo: ['page', 'article'],\n\n  // Simple string path for slug field\n  slugField: 'slug.current',\n\n  // Optional: customize path separator (default: '/')\n  pathSeparator: '/',\n\n  onTreeChange: async (event) => {\n    for (const pathInfo of event.paths) {\n      console.log(pathInfo.slug) // 'about-us'\n      console.log(pathInfo.ancestorSlugs) // ['services']\n      console.log(pathInfo.computedPath) // '/services/about-us'\n      console.log(pathInfo.computedSegments) // ['services', 'about-us']\n    }\n  }\n})\n```\n\n#### Using a Function for Complex Slug Resolution\n\nFor documents with varying slug field locations or custom logic:\n\n```ts\ncreateDeskHierarchy({\n  // ...\n  slugField: (doc) => {\n    // Try slugOverride first, fall back to slug.current\n    if (doc.slugOverride) {\n      return doc.slugOverride\n    }\n    return doc.slug?.current\n  },\n\n  onTreeChange: async (event) => {\n    // Paths now include computed slugs from your custom logic\n  }\n})\n```\n\n#### Type-Specific Slug Resolution\n\n```ts\ncreateDeskHierarchy({\n  // ...\n  slugField: (doc) => {\n    switch (doc._type) {\n      case 'page':\n        return doc.slug?.current\n      case 'article':\n        return doc.urlPath || doc.slug?.current\n      case 'category':\n        return doc.handle\n      default:\n        return doc.slug?.current\n    }\n  }\n})\n```\n\n#### Slug Field Options\n\n| Option          | Type                                                       | Description                                        |\n| --------------- | ---------------------------------------------------------- | -------------------------------------------------- |\n| `slugField`     | `string \\| ((doc: SanityDocument) => string \\| undefined)` | Field path or function to extract slugs            |\n| `pathSeparator` | `string`                                                   | Separator for joining path segments (default: `/`) |\n\nWhen `slugField` is configured, the plugin will:\n\n- Fetch the necessary slug data from documents (no additional queries needed)\n- Compute `slug`, `ancestorSlugs`, `computedPath`, and `computedSegments` for each document\n- Include this data in every `DocumentPathInfo` object passed to your callback\n\n### Syncing Paths to Documents\n\nA common use case is syncing hierarchy information back to individual documents:\n\n```ts\nimport {createDeskHierarchy} from '@considered-vision/sanity-hierarchical-document-list'\n\nexport const structure = (S, context) => {\n  const client = context.getClient({apiVersion: '2023-01-01'})\n\n  return S.list()\n    .title('Content')\n    .items([\n      createDeskHierarchy({\n        S,\n        context,\n        title: 'Main Navigation',\n        documentId: 'main-nav',\n        referenceTo: ['page', 'article'],\n\n        // Enable slug computation\n        slugField: 'slug.current',\n\n        onTreeChange: async (event) => {\n          const transaction = client.transaction()\n\n          for (const pathInfo of event.paths) {\n            // Only update documents that were affected by this change\n            if (event.affectedDocIds.includes(pathInfo.docId)) {\n              transaction.patch(pathInfo.docId, {\n                set: {\n                  _hierarchy: {\n                    ancestors: pathInfo.ancestors,\n                    depth: pathInfo.depth,\n                    siblingIndex: pathInfo.siblingIndex,\n                    treeId: event.treeDocId,\n                    // Slug data is now included!\n                    path: pathInfo.computedPath,\n                    breadcrumbs: pathInfo.ancestorSlugs\n                  }\n                }\n              })\n            }\n          }\n\n          await transaction.commit()\n        }\n      })\n    ])\n}\n```\n\n### Enabling/Disabling the Callback\n\nUse `enableTreeChangeCallback` to conditionally enable or disable the callback:\n\n```ts\ncreateDeskHierarchy({\n  // ...\n  onTreeChange: handleTreeChange,\n  enableTreeChangeCallback: false // Callback will not fire\n})\n```\n\n| `onTreeChange` | `enableTreeChangeCallback` | Result                   |\n| -------------- | -------------------------- | ------------------------ |\n| undefined      | undefined                  | No callback              |\n| undefined      | true                       | No callback              |\n| defined        | undefined                  | Callback fires (default) |\n| defined        | true                       | Callback fires           |\n| defined        | false                      | No callback              |\n\n**Environment-based toggle:**\n\n```ts\ncreateDeskHierarchy({\n  // ...\n  onTreeChange: handleTreeChange,\n  enableTreeChangeCallback: process.env.SANITY_STUDIO_ENABLE_TREE_SYNC === 'true'\n})\n```\n\n**Role-based toggle:**\n\n```ts\ncreateDeskHierarchy({\n  // ...\n  onTreeChange: handleTreeChange,\n  enableTreeChangeCallback: context.currentUser?.roles.some((r) => r.name === 'administrator')\n})\n```\n\n### TypeScript Types\n\nThe plugin exports all relevant types for TypeScript users:\n\n```ts\nimport type {\n  TreeChangeEvent,\n  TreeChangeCallback,\n  DocumentPathInfo,\n  TreeOperationMeta,\n  SlugExtractor,\n  SlugFieldConfig,\n  ComputePathsOptions\n} from '@considered-vision/sanity-hierarchical-document-list'\n```\n\n| Type                  | Description                                                  |\n| --------------------- | ------------------------------------------------------------ |\n| `TreeChangeEvent`     | Event payload passed to the `onTreeChange` callback          |\n| `TreeChangeCallback`  | Function type for the callback                               |\n| `DocumentPathInfo`    | Information about a document's position in the tree          |\n| `TreeOperationMeta`   | Metadata about tree operations                               |\n| `SlugExtractor`       | Function type `(doc: SanityDocument) => string \\| undefined` |\n| `SlugFieldConfig`     | Union type: `string \\| SlugExtractor`                        |\n| `ComputePathsOptions` | Options for the `computeAllPaths` utility                    |\n\n### Important Notes\n\n- **Non-blocking**: Callback errors are caught and logged to console, they will not break tree operations\n- **Async support**: Both sync and async callbacks are supported\n- **No debouncing**: Each tree mutation fires the callback independently. Implement your own debouncing if needed\n- **Desk structure only**: The callback is only supported when using `createDeskHierarchy`. Form field inputs do not support callbacks\n\n---\n\n## In-Tree Status Sync\n\nThe plugin can track which documents belong to the tree by syncing a boolean field on each document. This enables powerful schema patterns like conditional `readOnly` fields.\n\n### Use Cases\n\n- **Lock slugs for tree-managed documents**: Prevent direct slug edits that would break computed paths\n- **Show visual indicators**: Display badges or messages for tree-managed documents\n- **Filter queries**: Query only documents that are (or aren't) in a hierarchy\n\n### Configuration Options\n\n| Option           | Type      | Description                                        |\n| ---------------- | --------- | -------------------------------------------------- |\n| `inTreeField`    | `string`  | Field name on documents to sync (e.g., `'inTree'`) |\n| `autoSyncInTree` | `boolean` | When `true`, plugin auto-patches documents         |\n\n### Auto-Sync Mode (Simple)\n\nThe plugin handles everything automatically:\n\n```ts\ncreateDeskHierarchy({\n  S,\n  context,\n  title: 'Main Navigation',\n  documentId: 'main-nav',\n  referenceTo: ['page'],\n\n  // Enable auto-sync\n  inTreeField: 'inTree',\n  autoSyncInTree: true\n})\n```\n\nWhen documents are added to the tree, `inTree` is set to `true`.\nWhen removed, `inTree` is set to `false`.\n\n### Manual Sync Mode (More Control)\n\nHandle syncing yourself using the callback:\n\n```ts\ncreateDeskHierarchy({\n  S,\n  context,\n  title: 'Main Navigation',\n  documentId: 'main-nav',\n  referenceTo: ['page'],\n\n  inTreeField: 'inTree',\n  autoSyncInTree: false, // default\n\n  onTreeChange: async (event) => {\n    const client = context.getClient({apiVersion: '2024-01-01'})\n    const transaction = client.transaction()\n\n    // Set inTree: true for documents in tree\n    for (const pathInfo of event.paths) {\n      transaction.patch(pathInfo.docId, {\n        set: {inTree: true}\n      })\n    }\n\n    // Set inTree: false for removed documents\n    for (const docId of event.removedDocIds) {\n      transaction.patch(docId, {\n        set: {inTree: false}\n      })\n    }\n\n    await transaction.commit()\n  }\n})\n```\n\n### Schema Pattern: Conditional Read-Only Slugs\n\nUse `inTree` to lock slug fields for documents managed by the hierarchy:\n\n```ts\n// page.ts schema\nimport {defineType, defineField} from 'sanity'\n\nexport default defineType({\n  name: 'page',\n  title: 'Page',\n  type: 'document',\n  fields: [\n    defineField({\n      name: 'title',\n      type: 'string'\n    }),\n    defineField({\n      name: 'slug',\n      type: 'slug',\n      options: {source: 'title'},\n      readOnly: ({document}) => document?.inTree === true,\n      description: ({document}) =>\n        document?.inTree\n          ? 'Slug is managed by the navigation hierarchy. Remove from tree to edit.'\n          : undefined\n    }),\n    defineField({\n      name: 'inTree',\n      type: 'boolean',\n      hidden: true, // Managed by plugin\n      initialValue: false\n    })\n  ]\n})\n```\n\n### TreeChangeEvent: removedDocIds\n\nThe callback event now includes `removedDocIds`:\n\n| Property        | Type       | Description                                   |\n| --------------- | ---------- | --------------------------------------------- |\n| `removedDocIds` | `string[]` | Documents removed from tree in this operation |\n\nThis array is populated when documents are removed from the tree, allowing you to update their `inTree` status accordingly.\n\n---\n\n## License\n\nMIT-licensed. See LICENSE.\n\n## License\n\n[MIT](LICENSE) © Sanity\n\n## Develop & test\n\nThis plugin uses [@sanity/plugin-kit](https://github.com/sanity-io/plugin-kit)\nwith default configuration for build & watch scripts.\n\nSee [Testing a plugin in Sanity Studio](https://github.com/sanity-io/plugin-kit#testing-a-plugin-in-sanity-studio)\non how to run this plugin with hotreload in the studio.\n\n### Release new version\n\nRun [\"CI & Release\" workflow](https://github.com/sanity-io/hierarchical-document-list/actions/workflows/main.yml).\nMake sure to select the main branch and check \"Release new version\".\n\nSemantic release will only release on configured branches, so it is safe to run release on any branch.\n","readmeFilename":"README.md"}