{"_id":"@astronomic-dev/search","_rev":"10-a73f5d5c53f051b6840b73ab9253008d","name":"@astronomic-dev/search","dist-tags":{"latest":"0.2.6"},"versions":{"0.0.0-stage":{"name":"@astronomic-dev/search","version":"0.0.0-stage","_id":"@astronomic-dev/search@0.0.0-stage","stub":true,"maintainers":[{"name":"astronomic-dev","email":"npm@astronomic.dev"}],"dist":{"shasum":"4bb94754bc1f037bdefa7ff31dfeabc6bc0d6f1b","tarball":"https://registry.npmjs.org/@astronomic-dev/search/-/search-0.0.0-stage.tgz","fileCount":2,"integrity":"sha512-/wg5w9iXI/QJEdqrTKZ/CmGQ5/M9BOf46cjwYA0VQ8q5V4vqTtT3AnjilpSfLmvIKzL1dbKUYmhJn6ATbA/y3g==","signatures":[{"sig":"MEUCIQCRop9fkDH3ocs3Uo4xgSu/cR2rn9pMjnFeMWFq6c8cRgIgbqBylsnWqdGWmPMNcrMX97qdwtLY/LZV5AX6jMhnuIE=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":344},"_npmUser":{"name":"astronomic-dev","email":"npm@astronomic.dev"},"description":"Temporary package placeholder for staged publishing","directories":{}},"0.1.0":{"name":"@astronomic-dev/search","version":"0.1.0","keywords":["astro","astro-component","astro-integration","withastro","search","site-search","fuzzy-search"],"license":"MIT","_id":"@astronomic-dev/search@0.1.0","maintainers":[{"name":"astronomic-dev","email":"npm@astronomic.dev"}],"homepage":"https://astronomic.dev/plugins/search","bugs":{"url":"https://github.com/astronomic-dev/search/issues"},"dist":{"shasum":"739a7fa6faced447dca8591ef428429a6cc2a1f4","tarball":"https://registry.npmjs.org/@astronomic-dev/search/-/search-0.1.0.tgz","fileCount":150,"integrity":"sha512-chgwpIGL9gOnmptw76hscha069Ehk91JZH6XvEV4/pIOypF2agLyI71stBO0l1VsT47Es8L1xuQj/lSONcE9PQ==","signatures":[{"sig":"MEYCIQDQybagIEgxhfmkrlwcbEf0hihvcJ/yE8T2czZWl8GLdAIhAOLiG0V+2FlY/mNeYJqVdx6io9x5VMIxqXfLxiMBv6a8","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"sig":"MEUCIH5o+/nO1MZ9m419IWZJjBh8xlzH5LLxgWQ/vSevZRMQAiEA+pm33fZKs8DqmnRPwJ4y71cao0erxT4J3NdI4HuWClM=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":744245},"type":"module","exports":{"./ui":{"types":"./dist/ui/index.d.ts","default":"./dist/ui/index.js"},"./dom":{"types":"./dist/dom/index.d.ts","default":"./dist/dom/index.js"},"./boot":{"types":"./dist/browser/start.d.ts","default":"./dist/browser/start.js"},"./core":{"types":"./dist/core/index.d.ts","default":"./dist/core/index.js"},"./page":{"types":"./dist/page/index.d.ts","default":"./dist/page/index.js"},"./astro":{"types":"./dist/astro/index.d.ts","default":"./dist/astro/index.js"},"./results":{"types":"./dist/results/index.d.ts","default":"./dist/results/index.js"},"./controller":{"types":"./dist/controller/index.d.ts","default":"./dist/controller/index.js"},"./astro/virtual":{"types":"./dist/astro/virtual.d.ts"},"./astro/records-route":{"types":"./dist/astro/records-route.d.ts","default":"./dist/astro/records-route.js"},"./astro/SearchLink.astro":"./dist/astro/SearchLink.astro","./astro/SearchPage.astro":"./dist/astro/SearchPage.astro","./astro/SearchNoscript.astro":"./dist/astro/SearchNoscript.astro"},"scripts":{"test":"node --test --test-reporter=dot test/*.test.ts","build":"node scripts/build.mjs"},"_npmUser":{"name":"astronomic-dev","email":"npm@astronomic.dev"},"repository":{"url":"git+https://github.com/astronomic-dev/search.git","type":"git"},"description":"Fuzzy site search in a dialog for Astro: a build-time index that loads on first use, a headless controller, accessible browser behavior and a default dialog.","directories":{},"_nodeVersion":"26.7.0","dependencies":{"ultrahtml":"1.7.0","minisearch":"7.2.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"astro":"^7.3.5","esbuild":"0.28.2","axe-core":"4.13.0","typescript":"6.0.3","@types/node":"26.6.3","@playwright/test":"1.63.0"},"peerDependencies":{"astro":"^7.0.0"},"peerDependenciesMeta":{"astro":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/search_0.1.0_1795466510146_0.8256146125351272","host":"s3://npm-registry-packages-npm-production"}},"0.1.1":{"name":"@astronomic-dev/search","version":"0.1.1","keywords":["astro","astro-component","astro-integration","withastro","search","site-search","fuzzy-search"],"license":"MIT","_id":"@astronomic-dev/search@0.1.1","maintainers":[{"name":"astronomic-dev","email":"npm@astronomic.dev"}],"homepage":"https://astronomic.dev/plugins/search","bugs":{"url":"https://github.com/astronomic-dev/search/issues"},"dist":{"shasum":"4d5eed7160875b6381cf43325feae87f3a92340b","tarball":"https://registry.npmjs.org/@astronomic-dev/search/-/search-0.1.1.tgz","fileCount":150,"integrity":"sha512-8GxPfIZ9Olrh9jFRQMf6wHXlgOihJ+TZnY4JV0tFPNG++UOXU9K+KLxaWbAU+qwDLulfBI5gnSdGmY3dRVdhbA==","signatures":[{"sig":"MEQCIH74fh98auEslLgjhZnBoZmXBHw3ELQPvC3FWfLKCMPEAiAzMSxuA1f9zi9XbjnDgRbKIIQC+qa2u06UHvsjYeuXpQ==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"sig":"MEQCIFxGZQJ9r1pXwkkRDgdK3pPZkfl8I5yNQn07C24hjbI+AiBmLCT+SVtpx6mJu52NKM4IkjcKLp0Yg0RKK+mRQVJ3aA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":746858},"type":"module","exports":{"./ui":{"types":"./dist/ui/index.d.ts","default":"./dist/ui/index.js"},"./dom":{"types":"./dist/dom/index.d.ts","default":"./dist/dom/index.js"},"./boot":{"types":"./dist/browser/start.d.ts","default":"./dist/browser/start.js"},"./core":{"types":"./dist/core/index.d.ts","default":"./dist/core/index.js"},"./page":{"types":"./dist/page/index.d.ts","default":"./dist/page/index.js"},"./astro":{"types":"./dist/astro/index.d.ts","default":"./dist/astro/index.js"},"./results":{"types":"./dist/results/index.d.ts","default":"./dist/results/index.js"},"./controller":{"types":"./dist/controller/index.d.ts","default":"./dist/controller/index.js"},"./astro/virtual":{"types":"./dist/astro/virtual.d.ts"},"./astro/records-route":{"types":"./dist/astro/records-route.d.ts","default":"./dist/astro/records-route.js"},"./astro/SearchLink.astro":"./dist/astro/SearchLink.astro","./astro/SearchPage.astro":"./dist/astro/SearchPage.astro","./astro/SearchNoscript.astro":"./dist/astro/SearchNoscript.astro"},"scripts":{"test":"node --test --test-reporter=dot test/*.test.ts","build":"node scripts/build.mjs"},"_npmUser":{"name":"astronomic-dev","email":"npm@astronomic.dev"},"repository":{"url":"git+https://github.com/astronomic-dev/search.git","type":"git"},"description":"Fuzzy site search in a dialog for Astro: a build-time index that loads on first use, a headless controller, accessible browser behavior and a default dialog.","directories":{},"_nodeVersion":"26.7.0","dependencies":{"ultrahtml":"1.7.0","minisearch":"7.2.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"astro":"^7.3.5","esbuild":"0.28.2","axe-core":"4.13.0","typescript":"6.0.3","@types/node":"26.6.3","@playwright/test":"1.63.0"},"peerDependencies":{"astro":"^7.0.0"},"peerDependenciesMeta":{"astro":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/search_0.1.1_1795473375855_0.6500788541015194","host":"s3://npm-registry-packages-npm-production"}},"0.2.0":{"name":"@astronomic-dev/search","version":"0.2.0","keywords":["astro","astro-component","astro-integration","withastro","search","site-search","fuzzy-search","emdash","emdash-plugin"],"license":"MIT","_id":"@astronomic-dev/search@0.2.0","maintainers":[{"name":"astronomic-dev","email":"npm@astronomic.dev"}],"homepage":"https://astronomic.dev/plugins/search","bugs":{"url":"https://github.com/astronomic-dev/search/issues"},"dist":{"shasum":"e3b7e262c308d807ffae7ba63b938867f4677a2e","tarball":"https://registry.npmjs.org/@astronomic-dev/search/-/search-0.2.0.tgz","fileCount":182,"integrity":"sha512-FW9ptkYQVv5JNk6WPo+JZY9pzfBCP+sscO5FuG3s6/fkQDzKxDPDpfN9eBhuZikJm32us2z3mqm3f6E4Azv10Q==","signatures":[{"sig":"MEUCIBNjlOEOhkLxTr9Ns8vruCXgI2EYYBEqiVZ9H4qTCVnjAiEAiAymybckOHWYtdKeRrBOO1F+CgxvZukuV4Tz6UU7ioA=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"sig":"MEUCIHdUWrYYNUZs6YYjbLALE++mQgY6ecqOSVRPGTzynRfEAiEAxZcn/G+lWiRZsJCHtypS1hHj8Pytw3YMR9UZ8hAKSzM=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@astronomic-dev%2fsearch@0.2.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":945841},"type":"module","_from":"file:packed/astronomic-dev-search-0.2.0.tgz","exports":{"./ui":{"types":"./dist/ui/index.d.ts","default":"./dist/ui/index.js"},"./dom":{"types":"./dist/dom/index.d.ts","default":"./dist/dom/index.js"},"./boot":{"types":"./dist/browser/start.d.ts","default":"./dist/browser/start.js"},"./core":{"types":"./dist/core/index.d.ts","default":"./dist/core/index.js"},"./page":{"types":"./dist/page/index.d.ts","default":"./dist/page/index.js"},"./astro":{"types":"./dist/astro/index.d.ts","default":"./dist/astro/index.js"},"./emdash":{"types":"./dist/emdash/index.d.ts","default":"./dist/emdash/index.js"},"./results":{"types":"./dist/results/index.d.ts","default":"./dist/results/index.js"},"./controller":{"types":"./dist/controller/index.d.ts","default":"./dist/controller/index.js"},"./emdash/admin":{"types":"./dist/emdash/admin/index.d.ts","default":"./dist/emdash/admin/index.js"},"./emdash/astro":{"types":"./dist/emdash/astro/index.d.ts","default":"./dist/emdash/astro/index.js"},"./astro/virtual":{"types":"./dist/astro/virtual.d.ts"},"./astro/records-route":{"types":"./dist/astro/records-route.d.ts","default":"./dist/astro/records-route.js"},"./astro/SearchLink.astro":"./dist/astro/SearchLink.astro","./astro/SearchPage.astro":"./dist/astro/SearchPage.astro","./astro/SearchNoscript.astro":"./dist/astro/SearchNoscript.astro","./emdash/astro/SearchResults.astro":"./dist/emdash/astro/SearchResults.astro"},"scripts":{"test":"node --test --test-reporter=dot test/*.test.ts","build":"node scripts/build.mjs"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"36917dfe-e2dc-4a73-959d-bcd870f6bbaa"}},"_resolved":"/home/runner/work/search/search/packed/astronomic-dev-search-0.2.0.tgz","_integrity":"sha512-FW9ptkYQVv5JNk6WPo+JZY9pzfBCP+sscO5FuG3s6/fkQDzKxDPDpfN9eBhuZikJm32us2z3mqm3f6E4Azv10Q==","repository":{"url":"git+https://github.com/astronomic-dev/search.git","type":"git"},"_npmVersion":"11.19.1","description":"Fuzzy site search in a dialog for Astro and EmDash: a search index that loads on first use, a headless controller, accessible browser behavior and a default dialog.","directories":{},"_nodeVersion":"24.22.3","dependencies":{"ultrahtml":"1.7.0","minisearch":"7.2.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"astro":"^7.3.5","react":"19.3.0","emdash":"1.4.0","esbuild":"0.28.2","axe-core":"4.13.0","typescript":"6.0.3","@types/node":"26.6.3","@types/react":"19.3.0","@cloudflare/kumo":"2.6.0","@playwright/test":"1.63.0","@phosphor-icons/react":"2.1.10"},"peerDependencies":{"astro":"^7.0.0","react":"^18.0.0 || ^19.0.0","emdash":"^1.4.0","@cloudflare/kumo":"^2.6.0","@phosphor-icons/react":"^2.1.10"},"peerDependenciesMeta":{"astro":{"optional":true},"react":{"optional":true},"emdash":{"optional":true},"@cloudflare/kumo":{"optional":true},"@phosphor-icons/react":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/search_0.2.0_1795546421993_0.21716351289896496","host":"s3://npm-registry-packages-npm-production"}},"0.2.1":{"name":"@astronomic-dev/search","version":"0.2.1","keywords":["astro","astro-component","astro-integration","withastro","search","site-search","fuzzy-search","emdash","emdash-plugin"],"license":"MIT","_id":"@astronomic-dev/search@0.2.1","maintainers":[{"name":"astronomic-dev","email":"npm@astronomic.dev"}],"homepage":"https://astronomic.dev/plugins/search","bugs":{"url":"https://github.com/astronomic-dev/search/issues"},"dist":{"shasum":"0ca33958ff63265a2c2aa0f793da2f5db33d2b59","tarball":"https://registry.npmjs.org/@astronomic-dev/search/-/search-0.2.1.tgz","fileCount":182,"integrity":"sha512-GUK8dcfWoXxXBg1OKXkqDVr3EYadQG7ZiYyYZbAXPO1zbSnkL3nkSUHDhIo5xZ5/GmoZlWGSOFi0h+sgzYPiTg==","signatures":[{"sig":"MEYCIQDjSDH6dKwe5JHfETN+owLUGOHar1LyqEDiZ2akO/g9+QIhAKA6LIhR2BgDXyoygdUTVDBYulJ67tt/qagFMS/DhzjQ","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"sig":"MEQCIHvurcFfJB01v4Bo9n4osQVhkH727s67Uk0ERswonEKJAiBc6/QkjlPHXs2iL+lwvn+FaW4IQqE6+AZrLh7GYddMIw==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@astronomic-dev%2fsearch@0.2.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":949096},"type":"module","_from":"file:packed/astronomic-dev-search-0.2.1.tgz","exports":{"./ui":{"types":"./dist/ui/index.d.ts","default":"./dist/ui/index.js"},"./dom":{"types":"./dist/dom/index.d.ts","default":"./dist/dom/index.js"},"./boot":{"types":"./dist/browser/start.d.ts","default":"./dist/browser/start.js"},"./core":{"types":"./dist/core/index.d.ts","default":"./dist/core/index.js"},"./page":{"types":"./dist/page/index.d.ts","default":"./dist/page/index.js"},"./astro":{"types":"./dist/astro/index.d.ts","default":"./dist/astro/index.js"},"./emdash":{"types":"./dist/emdash/index.d.ts","default":"./dist/emdash/index.js"},"./results":{"types":"./dist/results/index.d.ts","default":"./dist/results/index.js"},"./controller":{"types":"./dist/controller/index.d.ts","default":"./dist/controller/index.js"},"./emdash/admin":{"types":"./dist/emdash/admin/index.d.ts","default":"./dist/emdash/admin/index.js"},"./emdash/astro":{"types":"./dist/emdash/astro/index.d.ts","default":"./dist/emdash/astro/index.js"},"./astro/virtual":{"types":"./dist/astro/virtual.d.ts"},"./astro/records-route":{"types":"./dist/astro/records-route.d.ts","default":"./dist/astro/records-route.js"},"./astro/SearchLink.astro":"./dist/astro/SearchLink.astro","./astro/SearchPage.astro":"./dist/astro/SearchPage.astro","./astro/SearchNoscript.astro":"./dist/astro/SearchNoscript.astro","./emdash/astro/SearchResults.astro":"./dist/emdash/astro/SearchResults.astro"},"scripts":{"test":"node --test --test-reporter=dot test/*.test.ts","build":"node scripts/build.mjs"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"36917dfe-e2dc-4a73-959d-bcd870f6bbaa"}},"_resolved":"/home/runner/work/search/search/packed/astronomic-dev-search-0.2.1.tgz","_integrity":"sha512-GUK8dcfWoXxXBg1OKXkqDVr3EYadQG7ZiYyYZbAXPO1zbSnkL3nkSUHDhIo5xZ5/GmoZlWGSOFi0h+sgzYPiTg==","repository":{"url":"git+https://github.com/astronomic-dev/search.git","type":"git"},"_npmVersion":"11.19.1","description":"Fuzzy site search in a dialog for Astro and EmDash: a search index that loads on first use, a headless controller, accessible browser behavior and a default dialog.","directories":{},"_nodeVersion":"24.22.3","dependencies":{"ultrahtml":"1.7.0","minisearch":"7.2.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"astro":"^7.3.5","react":"19.3.0","emdash":"1.4.0","esbuild":"0.28.2","axe-core":"4.13.0","typescript":"6.0.3","@types/node":"26.6.3","@types/react":"19.3.0","@cloudflare/kumo":"2.6.0","@playwright/test":"1.63.0","@phosphor-icons/react":"2.1.10"},"peerDependencies":{"astro":"^7.0.0","react":"^18.0.0 || ^19.0.0","emdash":"^1.4.0","@cloudflare/kumo":"^2.6.0","@phosphor-icons/react":"^2.1.10"},"peerDependenciesMeta":{"astro":{"optional":true},"react":{"optional":true},"emdash":{"optional":true},"@cloudflare/kumo":{"optional":true},"@phosphor-icons/react":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/search_0.2.1_1795578535512_0.15229196529824873","host":"s3://npm-registry-packages-npm-production"}},"0.2.2":{"name":"@astronomic-dev/search","version":"0.2.2","keywords":["astro","astro-component","astro-integration","withastro","search","site-search","fuzzy-search","emdash","emdash-plugin"],"license":"MIT","_id":"@astronomic-dev/search@0.2.2","maintainers":[{"name":"astronomic-dev","email":"npm@astronomic.dev"}],"homepage":"https://astronomic.dev/plugins/search","bugs":{"url":"https://github.com/astronomic-dev/search/issues"},"dist":{"shasum":"2bb876a949fe7fdc108c68d708cfed95f398da14","tarball":"https://registry.npmjs.org/@astronomic-dev/search/-/search-0.2.2.tgz","fileCount":194,"integrity":"sha512-SF8iftGESmCCgJayTDtl1oG+RnuXBx8CYYjDo4/KpNbGGCzxl0C3yqahG7SkoqH6uIPsGSraKEtjD5E4VIE9JQ==","signatures":[{"sig":"MEYCIQDaHe3D4pg50+6+wRBrmgCdvj67N6Y7oblBY+N/NJp6mgIhAIIBbKFtLKJUTrPMl9jzDde0K2WVGwNoiLkDuT14nhNO","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"sig":"MEQCIHj9Z1n5sVtJrWVZdVZL2XNB1BcP4n02E/2UwN1dJE/VAiAyCP0Fv9vWcx7jhJgugFBmnmgY5uAJz1QfOtVk079bTA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@astronomic-dev%2fsearch@0.2.2","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":1011608},"type":"module","_from":"file:packed/astronomic-dev-search-0.2.2.tgz","exports":{"./ui":{"types":"./dist/ui/index.d.ts","default":"./dist/ui/index.js"},"./dom":{"types":"./dist/dom/index.d.ts","default":"./dist/dom/index.js"},"./boot":{"types":"./dist/browser/start.d.ts","default":"./dist/browser/start.js"},"./core":{"types":"./dist/core/index.d.ts","default":"./dist/core/index.js"},"./page":{"types":"./dist/page/index.d.ts","default":"./dist/page/index.js"},"./astro":{"types":"./dist/astro/index.d.ts","default":"./dist/astro/index.js"},"./emdash":{"types":"./dist/emdash/index.d.ts","default":"./dist/emdash/index.js"},"./results":{"types":"./dist/results/index.d.ts","default":"./dist/results/index.js"},"./controller":{"types":"./dist/controller/index.d.ts","default":"./dist/controller/index.js"},"./emdash/admin":{"types":"./dist/emdash/admin/index.d.ts","default":"./dist/emdash/admin/index.js"},"./emdash/astro":{"types":"./dist/emdash/astro/index.d.ts","default":"./dist/emdash/astro/index.js"},"./astro/virtual":{"types":"./dist/astro/virtual.d.ts"},"./astro/records-route":{"types":"./dist/astro/records-route.d.ts","default":"./dist/astro/records-route.js"},"./astro/SearchLink.astro":"./dist/astro/SearchLink.astro","./astro/SearchPage.astro":"./dist/astro/SearchPage.astro","./astro/SearchNoscript.astro":"./dist/astro/SearchNoscript.astro","./emdash/astro/SearchResults.astro":"./dist/emdash/astro/SearchResults.astro"},"scripts":{"test":"node --test --test-reporter=dot test/*.test.ts","build":"node scripts/build.mjs"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"36917dfe-e2dc-4a73-959d-bcd870f6bbaa"}},"_resolved":"/home/runner/work/search/search/packed/astronomic-dev-search-0.2.2.tgz","_integrity":"sha512-SF8iftGESmCCgJayTDtl1oG+RnuXBx8CYYjDo4/KpNbGGCzxl0C3yqahG7SkoqH6uIPsGSraKEtjD5E4VIE9JQ==","repository":{"url":"git+https://github.com/astronomic-dev/search.git","type":"git"},"_npmVersion":"11.19.1","description":"Fuzzy site search in a dialog for Astro and EmDash: a search index that loads on first use, a headless controller, accessible browser behavior and a default dialog.","directories":{},"_nodeVersion":"24.22.3","dependencies":{"ultrahtml":"1.7.0","minisearch":"7.2.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"astro":"^7.3.5","react":"19.3.0","emdash":"1.4.0","esbuild":"0.28.2","axe-core":"4.13.0","typescript":"6.0.3","@types/node":"26.6.3","@types/react":"19.3.0","@cloudflare/kumo":"2.6.0","@playwright/test":"1.63.0","@phosphor-icons/react":"2.1.10"},"peerDependencies":{"astro":"^7.0.0","react":"^18.0.0 || ^19.0.0","emdash":"^1.4.0","@cloudflare/kumo":"^2.6.0","@phosphor-icons/react":"^2.1.10"},"peerDependenciesMeta":{"astro":{"optional":true},"react":{"optional":true},"emdash":{"optional":true},"@cloudflare/kumo":{"optional":true},"@phosphor-icons/react":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/search_0.2.2_1795656181018_0.37924260391686637","host":"s3://npm-registry-packages-npm-production"}},"0.2.3":{"name":"@astronomic-dev/search","version":"0.2.3","keywords":["astro","astro-component","astro-integration","withastro","search","site-search","fuzzy-search","emdash","emdash-plugin"],"license":"MIT","_id":"@astronomic-dev/search@0.2.3","maintainers":[{"name":"astronomic-dev","email":"npm@astronomic.dev"}],"homepage":"https://astronomic.dev/plugins/search","bugs":{"url":"https://github.com/astronomic-dev/search/issues"},"dist":{"shasum":"bb1762451e846df21a8860b8c485e84095e601f6","tarball":"https://registry.npmjs.org/@astronomic-dev/search/-/search-0.2.3.tgz","fileCount":198,"integrity":"sha512-6y+obGCXQuDivNvtb4m+uJvC3Yf29hr2WUpGsyJaNozntRAvBddXwu9UGXKUKxMLXB+YzSv+vf4t8AGZJ5rI7g==","signatures":[{"sig":"MEQCIHdFdpRnICHiDr9jPbI0i4bzUaFowGFjGqlRscKsqp3jAiBsnmfl1mgUEoJVzSGOj3Ri1Tlp4/oZvXofA3zh/07DFQ==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"sig":"MEUCIHrgQzV2ZaoAyJPNrvr53pREicXAyPCSqRijsrvGQ0DgAiEAxov+MibNIcxgqm58aw5KMB7PzLhR2iwXhi9vzofcLxg=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@astronomic-dev%2fsearch@0.2.3","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":1042464},"type":"module","_from":"file:packed/astronomic-dev-search-0.2.3.tgz","exports":{"./ui":{"types":"./dist/ui/index.d.ts","default":"./dist/ui/index.js"},"./dom":{"types":"./dist/dom/index.d.ts","default":"./dist/dom/index.js"},"./boot":{"types":"./dist/browser/start.d.ts","default":"./dist/browser/start.js"},"./core":{"types":"./dist/core/index.d.ts","default":"./dist/core/index.js"},"./page":{"types":"./dist/page/index.d.ts","default":"./dist/page/index.js"},"./astro":{"types":"./dist/astro/index.d.ts","default":"./dist/astro/index.js"},"./emdash":{"types":"./dist/emdash/index.d.ts","default":"./dist/emdash/index.js"},"./results":{"types":"./dist/results/index.d.ts","default":"./dist/results/index.js"},"./controller":{"types":"./dist/controller/index.d.ts","default":"./dist/controller/index.js"},"./emdash/admin":{"types":"./dist/emdash/admin/index.d.ts","default":"./dist/emdash/admin/index.js"},"./emdash/astro":{"types":"./dist/emdash/astro/index.d.ts","default":"./dist/emdash/astro/index.js"},"./astro/virtual":{"types":"./dist/astro/virtual.d.ts"},"./astro/records-route":{"types":"./dist/astro/records-route.d.ts","default":"./dist/astro/records-route.js"},"./astro/SearchLink.astro":"./dist/astro/SearchLink.astro","./astro/SearchPage.astro":"./dist/astro/SearchPage.astro","./astro/SearchNoscript.astro":"./dist/astro/SearchNoscript.astro","./emdash/astro/SearchResults.astro":"./dist/emdash/astro/SearchResults.astro"},"scripts":{"test":"node --test --test-reporter=dot test/*.test.ts","build":"node scripts/build.mjs"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"36917dfe-e2dc-4a73-959d-bcd870f6bbaa"}},"_resolved":"/home/runner/work/search/search/packed/astronomic-dev-search-0.2.3.tgz","_integrity":"sha512-6y+obGCXQuDivNvtb4m+uJvC3Yf29hr2WUpGsyJaNozntRAvBddXwu9UGXKUKxMLXB+YzSv+vf4t8AGZJ5rI7g==","repository":{"url":"git+https://github.com/astronomic-dev/search.git","type":"git"},"_npmVersion":"11.19.1","description":"Fuzzy site search in a dialog for Astro and EmDash: a search index that loads on first use, a headless controller, accessible browser behavior and a default dialog.","directories":{},"_nodeVersion":"24.22.3","dependencies":{"ultrahtml":"1.7.0","minisearch":"7.2.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"astro":"^7.3.5","react":"19.3.0","emdash":"1.4.0","esbuild":"0.28.2","axe-core":"4.13.0","typescript":"6.0.3","@types/node":"26.6.3","@types/react":"19.3.0","@cloudflare/kumo":"2.6.0","@playwright/test":"1.63.0","@phosphor-icons/react":"2.1.10"},"peerDependencies":{"astro":"^7.0.0","react":"^18.0.0 || ^19.0.0","emdash":"^1.4.0","@cloudflare/kumo":"^2.6.0","@phosphor-icons/react":"^2.1.10"},"peerDependenciesMeta":{"astro":{"optional":true},"react":{"optional":true},"emdash":{"optional":true},"@cloudflare/kumo":{"optional":true},"@phosphor-icons/react":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/search_0.2.3_1795807528945_0.7051085811777293","host":"s3://npm-registry-packages-npm-production"}},"0.2.4":{"name":"@astronomic-dev/search","version":"0.2.4","keywords":["astro","astro-component","astro-integration","withastro","search","site-search","fuzzy-search","emdash","emdash-plugin"],"license":"MIT","_id":"@astronomic-dev/search@0.2.4","maintainers":[{"name":"astronomic-dev","email":"npm@astronomic.dev"}],"homepage":"https://astronomic.dev/plugins/search","bugs":{"url":"https://github.com/astronomic-dev/search/issues"},"dist":{"shasum":"99fa758f017070d3718c800463f8ff95d5f96d57","tarball":"https://registry.npmjs.org/@astronomic-dev/search/-/search-0.2.4.tgz","fileCount":198,"integrity":"sha512-F2V9go6wOcmQZLe8SgvQv0hF8GZrf7MZZBXep+c9KtsMV/ypeNniifX7uqQJIt72erjiwKs7Na8nj1wfQQpxrQ==","signatures":[{"sig":"MEQCIB19hWTMczr4DuXjYRcR0r+dgMG1dHHgoAa47sASLW8wAiBjS/yuOJtocIDw/6wIx1AjLBAdwTCIhXPaQ3JF5kPl8A==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"sig":"MEUCIFGcgooWsEGKwKxcKwEvxl6ZPPV1hDiQRmC762+/ppDwAiEA3crdal4XufZJ6cGATkbKmyiM5VjAN+OsSuvbIqG93gU=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@astronomic-dev%2fsearch@0.2.4","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":1055779},"type":"module","_from":"file:packed/astronomic-dev-search-0.2.4.tgz","exports":{"./ui":{"types":"./dist/ui/index.d.ts","default":"./dist/ui/index.js"},"./dom":{"types":"./dist/dom/index.d.ts","default":"./dist/dom/index.js"},"./boot":{"types":"./dist/browser/start.d.ts","default":"./dist/browser/start.js"},"./core":{"types":"./dist/core/index.d.ts","default":"./dist/core/index.js"},"./page":{"types":"./dist/page/index.d.ts","default":"./dist/page/index.js"},"./astro":{"types":"./dist/astro/index.d.ts","default":"./dist/astro/index.js"},"./emdash":{"types":"./dist/emdash/index.d.ts","default":"./dist/emdash/index.js"},"./results":{"types":"./dist/results/index.d.ts","default":"./dist/results/index.js"},"./controller":{"types":"./dist/controller/index.d.ts","default":"./dist/controller/index.js"},"./emdash/admin":{"types":"./dist/emdash/admin/index.d.ts","default":"./dist/emdash/admin/index.js"},"./emdash/astro":{"types":"./dist/emdash/astro/index.d.ts","default":"./dist/emdash/astro/index.js"},"./astro/virtual":{"types":"./dist/astro/virtual.d.ts"},"./astro/records-route":{"types":"./dist/astro/records-route.d.ts","default":"./dist/astro/records-route.js"},"./astro/SearchLink.astro":"./dist/astro/SearchLink.astro","./astro/SearchPage.astro":"./dist/astro/SearchPage.astro","./astro/SearchNoscript.astro":"./dist/astro/SearchNoscript.astro","./emdash/astro/SearchResults.astro":"./dist/emdash/astro/SearchResults.astro"},"scripts":{"test":"node --test --test-reporter=dot test/*.test.ts","build":"node scripts/build.mjs"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"36917dfe-e2dc-4a73-959d-bcd870f6bbaa"}},"_resolved":"/home/runner/work/search/search/packed/astronomic-dev-search-0.2.4.tgz","_integrity":"sha512-F2V9go6wOcmQZLe8SgvQv0hF8GZrf7MZZBXep+c9KtsMV/ypeNniifX7uqQJIt72erjiwKs7Na8nj1wfQQpxrQ==","repository":{"url":"git+https://github.com/astronomic-dev/search.git","type":"git"},"_npmVersion":"11.19.1","description":"Fuzzy site search in a dialog for Astro and EmDash: a search index that loads on first use, a headless controller, accessible browser behavior and a default dialog.","directories":{},"_nodeVersion":"24.22.3","dependencies":{"ultrahtml":"1.7.0","minisearch":"7.2.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"astro":"^7.3.5","react":"19.3.0","emdash":"1.4.0","esbuild":"0.28.2","axe-core":"4.13.0","typescript":"6.0.3","@types/node":"26.6.3","@types/react":"19.3.0","@cloudflare/kumo":"2.6.0","@playwright/test":"1.63.0","@phosphor-icons/react":"2.1.10"},"peerDependencies":{"astro":"^7.0.0","react":"^18.0.0 || ^19.0.0","emdash":"^1.4.0","@cloudflare/kumo":"^2.6.0","@phosphor-icons/react":"^2.1.10"},"peerDependenciesMeta":{"astro":{"optional":true},"react":{"optional":true},"emdash":{"optional":true},"@cloudflare/kumo":{"optional":true},"@phosphor-icons/react":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/search_0.2.4_1795905367449_0.4598292218479696","host":"s3://npm-registry-packages-npm-production"}},"0.2.5":{"name":"@astronomic-dev/search","version":"0.2.5","keywords":["astro","astro-component","astro-integration","withastro","search","site-search","fuzzy-search","emdash","emdash-plugin"],"license":"MIT","_id":"@astronomic-dev/search@0.2.5","maintainers":[{"name":"astronomic-dev","email":"npm@astronomic.dev"}],"homepage":"https://astronomic.dev/plugins/search","bugs":{"url":"https://github.com/astronomic-dev/search/issues"},"dist":{"shasum":"a0dc979c77d34070c3ea5877aded752d972a6c81","tarball":"https://registry.npmjs.org/@astronomic-dev/search/-/search-0.2.5.tgz","fileCount":202,"integrity":"sha512-IGj8Y6NhMJTcdn5owTRfqty5qGogaV9JGvsCadpwtFxws2f5PaopuRZRjsXH2e46xw+Gwk77J9SVXmTNtzIgSA==","signatures":[{"sig":"MEUCIC0vkFMUdquN8AcdByuvhHTHQGrq6DQuN10bmqcavvbiAiEA4qgFVgmyXpy7UvLt6tBCkAba4NRtZfBqdIaFfazRhJY=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"sig":"MEQCICem6BQjEUQzZ0n8+0dW1oTpE3KJITkZxW3AYjAmpyQRAiBvd11gztkx6BE5gZxW56sh4olaod6GrLsOR3SVMVq9HQ==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@astronomic-dev%2fsearch@0.2.5","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":1098920},"type":"module","_from":"file:packed/astronomic-dev-search-0.2.5.tgz","exports":{"./ui":{"types":"./dist/ui/index.d.ts","default":"./dist/ui/index.js"},"./dom":{"types":"./dist/dom/index.d.ts","default":"./dist/dom/index.js"},"./boot":{"types":"./dist/browser/start.d.ts","default":"./dist/browser/start.js"},"./core":{"types":"./dist/core/index.d.ts","default":"./dist/core/index.js"},"./page":{"types":"./dist/page/index.d.ts","default":"./dist/page/index.js"},"./astro":{"types":"./dist/astro/index.d.ts","default":"./dist/astro/index.js"},"./emdash":{"types":"./dist/emdash/index.d.ts","default":"./dist/emdash/index.js"},"./results":{"types":"./dist/results/index.d.ts","default":"./dist/results/index.js"},"./controller":{"types":"./dist/controller/index.d.ts","default":"./dist/controller/index.js"},"./emdash/admin":{"types":"./dist/emdash/admin/index.d.ts","default":"./dist/emdash/admin/index.js"},"./emdash/astro":{"types":"./dist/emdash/astro/index.d.ts","default":"./dist/emdash/astro/index.js"},"./astro/virtual":{"types":"./dist/astro/virtual.d.ts"},"./astro/records-route":{"types":"./dist/astro/records-route.d.ts","default":"./dist/astro/records-route.js"},"./astro/SearchLink.astro":"./dist/astro/SearchLink.astro","./astro/SearchPage.astro":"./dist/astro/SearchPage.astro","./astro/SearchNoscript.astro":"./dist/astro/SearchNoscript.astro","./emdash/astro/SearchResults.astro":"./dist/emdash/astro/SearchResults.astro"},"scripts":{"test":"node --test --test-reporter=dot test/*.test.ts","build":"node scripts/build.mjs"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"36917dfe-e2dc-4a73-959d-bcd870f6bbaa"}},"_resolved":"/home/runner/work/search/search/packed/astronomic-dev-search-0.2.5.tgz","_integrity":"sha512-IGj8Y6NhMJTcdn5owTRfqty5qGogaV9JGvsCadpwtFxws2f5PaopuRZRjsXH2e46xw+Gwk77J9SVXmTNtzIgSA==","repository":{"url":"git+https://github.com/astronomic-dev/search.git","type":"git"},"_npmVersion":"11.19.1","description":"Fuzzy site search in a dialog for Astro and EmDash: a search index that loads on first use, a headless controller, accessible browser behavior and a default dialog.","directories":{},"_nodeVersion":"24.22.3","dependencies":{"ultrahtml":"1.7.0","minisearch":"7.2.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"astro":"^7.3.5","react":"19.3.0","emdash":"1.4.0","esbuild":"0.28.2","axe-core":"4.13.0","typescript":"6.0.3","@types/node":"26.6.3","@types/react":"19.3.0","@cloudflare/kumo":"2.6.0","@playwright/test":"1.63.0","@phosphor-icons/react":"2.1.10"},"peerDependencies":{"astro":"^7.0.0","react":"^18.0.0 || ^19.0.0","emdash":"^1.4.0","@cloudflare/kumo":"^2.6.0","@phosphor-icons/react":"^2.1.10"},"peerDependenciesMeta":{"astro":{"optional":true},"react":{"optional":true},"emdash":{"optional":true},"@cloudflare/kumo":{"optional":true},"@phosphor-icons/react":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/search_0.2.5_1796002145549_0.24060398482091816","host":"s3://npm-registry-packages-npm-production"}},"0.2.6":{"_id":"@astronomic-dev/search@0.2.6","bugs":{"url":"https://github.com/astronomic-dev/search/issues"},"dist":{"shasum":"1a7bb2c08ffa50ff15fababb0857fed564aad9a2","tarball":"https://registry.npmjs.org/@astronomic-dev/search/-/search-0.2.6.tgz","fileCount":204,"integrity":"sha512-gVZrrzy/YHMbvnh4VpQNmjUxydcYSfaxmk9k1NnuCPqTiEMO7BqCzCcwAwqODvHNccISuWHzG6I/QAASMIuLLg==","signatures":[{"sig":"MEYCIQDdol8bDpWqjCsDCeRIPpw+VRlN7UGaohw/Ka/4OODldAIhAP3+p6jJzmOLzRIoWt2I4MYE1vF+OL1+XdOrmSBUKcWP","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQDbNLkEN1OHpTi1tFWZZUephmY1hhijAPj8u7dN3wBFQwIhAJ4Ck/M+8wF02Q2bz7ZHWfBAJGKz6pamwlQYxAvUnBvV"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@astronomic-dev%2fsearch@0.2.6","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":1119611},"name":"@astronomic-dev/search","type":"module","_from":"file:packed/astronomic-dev-search-0.2.6.tgz","exports":{"./ui":{"types":"./dist/ui/index.d.ts","default":"./dist/ui/index.js"},"./dom":{"types":"./dist/dom/index.d.ts","default":"./dist/dom/index.js"},"./boot":{"types":"./dist/browser/start.d.ts","default":"./dist/browser/start.js"},"./core":{"types":"./dist/core/index.d.ts","default":"./dist/core/index.js"},"./page":{"types":"./dist/page/index.d.ts","default":"./dist/page/index.js"},"./astro":{"types":"./dist/astro/index.d.ts","default":"./dist/astro/index.js"},"./emdash":{"types":"./dist/emdash/index.d.ts","default":"./dist/emdash/index.js"},"./results":{"types":"./dist/results/index.d.ts","default":"./dist/results/index.js"},"./controller":{"types":"./dist/controller/index.d.ts","default":"./dist/controller/index.js"},"./emdash/admin":{"types":"./dist/emdash/admin/index.d.ts","default":"./dist/emdash/admin/index.js"},"./emdash/astro":{"types":"./dist/emdash/astro/index.d.ts","default":"./dist/emdash/astro/index.js"},"./astro/virtual":{"types":"./dist/astro/virtual.d.ts"},"./astro/records-route":{"types":"./dist/astro/records-route.d.ts","default":"./dist/astro/records-route.js"},"./astro/SearchLink.astro":"./dist/astro/SearchLink.astro","./astro/SearchPage.astro":"./dist/astro/SearchPage.astro","./astro/SearchNoscript.astro":"./dist/astro/SearchNoscript.astro","./emdash/astro/SearchResults.astro":"./dist/emdash/astro/SearchResults.astro"},"license":"MIT","scripts":{"test":"node --test --test-reporter=dot test/*.test.ts","build":"node scripts/build.mjs"},"version":"0.2.6","_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"36917dfe-e2dc-4a73-959d-bcd870f6bbaa"}},"homepage":"https://astronomic.dev/plugins/search","keywords":["astro","astro-component","astro-integration","withastro","search","site-search","fuzzy-search","emdash","emdash-plugin"],"_resolved":"/home/runner/work/search/search/packed/astronomic-dev-search-0.2.6.tgz","_integrity":"sha512-gVZrrzy/YHMbvnh4VpQNmjUxydcYSfaxmk9k1NnuCPqTiEMO7BqCzCcwAwqODvHNccISuWHzG6I/QAASMIuLLg==","repository":{"url":"git+https://github.com/astronomic-dev/search.git","type":"git"},"_npmVersion":"11.19.1","description":"Fuzzy site search in a dialog for Astro and EmDash: a search index that loads on first use, a headless controller, accessible browser behavior and a default dialog.","directories":{},"maintainers":[{"name":"astronomic-dev","email":"npm@astronomic.dev"}],"_nodeVersion":"24.22.3","dependencies":{"ultrahtml":"1.7.0","minisearch":"7.2.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"astro":"^7.3.5","react":"19.3.0","emdash":"1.4.0","esbuild":"0.28.2","axe-core":"4.13.0","typescript":"6.0.3","@types/node":"26.6.3","@types/react":"19.3.0","@cloudflare/kumo":"2.6.0","@playwright/test":"1.63.0","@phosphor-icons/react":"2.1.10"},"peerDependencies":{"astro":"^7.0.0","react":"^18.0.0 || ^19.0.0","emdash":"^1.4.0","@cloudflare/kumo":"^2.6.0","@phosphor-icons/react":"^2.1.10"},"peerDependenciesMeta":{"astro":{"optional":true},"react":{"optional":true},"emdash":{"optional":true},"@cloudflare/kumo":{"optional":true},"@phosphor-icons/react":{"optional":true}},"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/search_0.2.6_1796065716347_0.00002091852641117331"}}},"time":{"created":"2026-11-23T20:39:43.478Z","modified":"2026-11-30T19:08:36.856Z","0.0.0-stage":"2026-11-23T20:39:43.478Z","0.1.0":"2026-11-23T20:41:50.272Z","0.1.1":"2026-11-23T22:36:15.971Z","0.2.0":"2026-11-24T18:53:42.116Z","0.2.1":"2026-11-25T03:48:55.628Z","0.2.2":"2026-11-26T01:23:01.118Z","0.2.3":"2026-11-27T19:25:29.040Z","0.2.4":"2026-11-28T22:36:07.558Z","0.2.5":"2026-11-30T01:29:05.656Z","0.2.6":"2026-11-30T19:08:36.482Z"},"bugs":{"url":"https://github.com/astronomic-dev/search/issues"},"license":"MIT","homepage":"https://astronomic.dev/plugins/search","keywords":["astro","astro-component","astro-integration","withastro","search","site-search","fuzzy-search","emdash","emdash-plugin"],"repository":{"url":"git+https://github.com/astronomic-dev/search.git","type":"git"},"description":"Fuzzy site search in a dialog for Astro and EmDash: a search index that loads on first use, a headless controller, accessible browser behavior and a default dialog.","maintainers":[{"name":"astronomic-dev","email":"npm@astronomic.dev"}],"readme":"# @astronomic-dev/search\n\n[![The Astronomic Search page on astronomic.dev: the headline “Lightning-fast, typo-tolerant search for Astro” over a live search for “prodution”, a typo, with type filters and results that match “production”, beside a panel that sets the mode, accent, corners and font](https://raw.githubusercontent.com/astronomic-dev/search/main/.github/hero.webp)](https://astronomic.dev/plugins/search)\n\nSee it live: [search for Astro](https://astronomic.dev/plugins/search) and [search for EmDash](https://astronomic.dev/plugins/emdash-search).\n\nFull docs, for Astro and EmDash: [astronomic.dev/docs/search](https://astronomic.dev/docs/search).\n\nFuzzy search in a dialog for any Astro site. It indexes your pages and their headings at build time, ships the index as a hashed file, and loads it only when a visitor reaches for search: on hover, focus, a click or the shortcut. Typos still find the page (\"nortwind\" finds \"Northwind rebrand\"), and a match inside a section links straight to its heading. Only real matches are marked: a word that a query word equals or starts (\"lodes\" marks \"Lodestar\"). A word found only by a typo match shows its result with no mark, so \"code\" never marks \"come\" and \"button\" never marks \"bottom\" (nor \"lodestr\" \"Lodestar\").\n\n- **Records first.** Everything becomes the same small record (a page, a heading's section, or an action), whatever it came from: content collections, built HTML, or your own code.\n- **Three layers.** A headless controller, accessible browser behavior, and a default dialog. Use the dialog as is, or build your own on the lower layers.\n- **No JavaScript needed to get somewhere.** The search button is a real link to `/search` (or a page you pick), and a `<noscript>` part shows your browse links.\n- **Strict CSP friendly.** Scripts ship as files and styles as a constructable stylesheet, so `script-src 'self'; style-src 'self'` works.\n\n## Install\n\n```sh\npnpm add @astronomic-dev/search\n```\n\nnpm and yarn work too. Search adds no dependency with an install script (its browser scripts come bundled), so it brings no `pnpm approve-builds` step of its own. Needs Astro 7 for the integration and components; the core, controller and dom layers work anywhere.\n\nAdd the integration to `astro.config.mjs`, then put the search button where your header has room:\n\n```js\n// astro.config.mjs\nimport { defineConfig } from \"astro/config\";\nimport search, { collections, html } from \"@astronomic-dev/search/astro\";\n\nexport default defineConfig({\n\tsite: \"https://example.com\",\n\tintegrations: [\n\t\tsearch({\n\t\t\tsources: [collections({ docs: { label: \"Docs\" } }), html({ include: [\"/\", \"/pricing\"] })],\n\t\t\tbrowse: [{ label: \"Docs\", href: \"/docs\" }],\n\t\t}),\n\t],\n});\n```\n\n```astro\n---\nimport SearchLink from \"@astronomic-dev/search/astro/SearchLink.astro\";\nimport SearchNoscript from \"@astronomic-dev/search/astro/SearchNoscript.astro\";\n---\n\n<header>\n\t<SearchLink class=\"search-button\">Search</SearchLink>\n\t<SearchNoscript />\n</header>\n```\n\nThe build writes the index, the manifest and two scripts to `/_search/`, and the button opens the dialog. Last, add the search page.\n\n### The search page\n\nThe button is a link to `/search` (with your `base`, and a trailing slash when `trailingSlash` is `\"always\"`, or `\"ignore\"` with the default `build.format`). Visitors land there with JavaScript off, and from \"See all results\" in the dialog, which adds the query as `?q=`. Add the page with the `SearchPage` component, inside your own layout. It reads `?q=`, lists the matching pages, and shows your browse links with JavaScript off. It takes `heading` (default \"Search\", `\"\"` for none), `label` (the search box's label, default \"Search this site\"), `button` (default \"Search\") and `class`. It reads `<html lang>` to pick the index's language:\n\n```astro\n---\n// src/pages/search.astro: where \"See all results\" and the no-JavaScript link go. Use your own layout in place of\n// this html shell, and keep the noindex tag.\nimport SearchPage from \"@astronomic-dev/search/astro/SearchPage.astro\";\n---\n\n<html lang=\"en\">\n\t<head>\n\t\t<meta charset=\"utf-8\" />\n\t\t<meta name=\"viewport\" content=\"width=device-width, initial-scale=1\" />\n\t\t<meta name=\"robots\" content=\"noindex\" />\n\t\t<title>Search</title>\n\t</head>\n\t<body>\n\t\t<main>\n\t\t\t<SearchPage />\n\t\t</main>\n\t</body>\n</html>\n```\n\nIt searches the default index and ignores the `type` and filter parameters a trigger may add. It shows one list by score (so `group.page` has no effect here), lists the first 50 matches while its status line counts them all, and fires no analytics events (on plain Astro only the dialog does). For another index or other markup, write the page yourself: start from `dist/astro/SearchPage.astro` in the package, change its relative imports to the package's own (`@astronomic-dev/search/astro/SearchNoscript.astro`, `@astronomic-dev/search/controller` and `@astronomic-dev/search/core`; keep `virtual:astronomic-search/assets`), and put another index name in place of `assets.index`. If your search page lives somewhere else, set `href` on `SearchLink` (see The dialog element).\n\n## Settings\n\nThe settings come in two forms.\n\n**One index.** Put the index settings at the top level. The index is named `default`.\n\n```js\nsearch({\n\tsources: [collections({ docs: { label: \"Docs\", facets: [\"theme\"] } }), html({ include: [\"/\", \"/pricing\"] })],\n\tweights: { title: 3, heading: 2, text: 1, keywords: 1 },\n\tgroup: { dialog: \"type\" },\n\ttypes: { docs: { weight: 1.5 } },\n\tshortcut: { keys: [\"mod+k\", \"/\"] },\n\tbrowse: [{ label: \"Docs\", href: \"/docs\" }],\n});\n```\n\n**Named indexes.** Each index gets its own files, so a big part of the site (a component catalog, for example) does not slow down the main search.\n\n```js\nsearch({\n\tindexes: {\n\t\tsite: { sources: [collections({ docs: {} }), html()] },\n\t\tkit: { sources: [records(loadParts, { types: { kit: { label: \"Kit parts\" } } })], group: { dialog: false } },\n\t},\n\tdefault: \"site\",\n});\n```\n\n| Setting | Where | What it does |\n| --- | --- | --- |\n| `sources` | index | Where the records come from (see Adapters). Required. |\n| `weights` | index | Field boosts: `title`, `heading`, `text`, `keywords` (a page's keywords and its facet values). Default 3, 2, 1, 1. |\n| `group` | index | `{ dialog, page }`: `\"type\"`, a facet name, or `false` (one list by score). Default: by type in the dialog, mixed on a page. The plain Astro `SearchPage` ignores `page`. |\n| `groupOrder` | index | `\"best\"` (the group with the best match first) or a fixed list of group keys, first to last; groups it leaves out follow, best first. With a list, the type tabs (in the dialog and on the results page) follow it too: the types it names first, in its order, then the rest by name. With `\"best\"` the tabs are in type-name order. |\n| `types` | index | Per type: a `label` and a score `weight` (default 1). |\n| `facets` | index | Per facet: a `label` and labels for its `values`. No source or index may name a facet `type` (the content type) or `q` (the search page reads `?q=` as the query); the build fails on one. |\n| `budget` | index | `{ gzipKB }`: a build warning when the index file grows past it. Default 300 KB. |\n| `clip` | index | Characters of each section's text the index file keeps, at least 200: for a smaller file on a large site. Leave out to keep the text whole (the default). Words past the cut are still found, and a result still links to their section, but its preview shows the start of the section. The first 1,000 characters of a section rank higher than the rest, with or without `clip`. |\n| `suggested` | index | Links the dialog shows in an empty box, under \"Suggested\" and before recent searches: `[{ label, href, type? }]`, at most 8. One list for every locale, or one per locale (`{ en: [...], fr: [...] }`; a locale the map leaves out shows none). Each `href` must be a canonical URL on this site, as a record's, and `type` one of the index's types; the build fails otherwise. |\n| `synonyms` | index | Groups of words that match each other, one word each: `[[\"docs\", \"documentation\"], [\"price\", \"cost\"]]`. A query word in a group is searched as any word of its group, and a page that matches the other word counts as matching it. Case and accents do not matter. |\n| `pinned` | index | A whole query to pages shown first, in that order: `{ \"get started\": [\"/docs/install\", \"/docs/first-steps\"] }`. The query is matched whole, ignoring case, accents and extra spaces, not word by word. A pinned page shows even if the words do not match it, but only when it passes the type tab, the dialog's `types` and the filters, and it counts once in the counts like any page. Each URL must be a canonical page URL in the index; the build fails otherwise (the dev server warns, since it does not scan built HTML). |\n| `indexes` | site | Named indexes: `{ name: { sources, ... } }`, each with the index settings above. A name is letters, digits, `-` and `_`, starts with a letter or digit, and is unique ignoring case (it becomes part of the index's file names). Built-in object keys (`__proto__`, `constructor`, `prototype`, `toString` and the other `Object.prototype` names) are reserved; the build fails on one. |\n| `default` | site | The index a button uses when it names none. |\n| `shortcut` | site | `{ keys: [...] }` or `false`. Default `[\"mod+k\", \"/\"]`. |\n| `strings` | site | Labels that replace the US English defaults (see Strings). |\n| `browse` | site | Links for the error state and the no-JavaScript part: `[{ label, href }]`. Each `href` must be a canonical URL on this site (with `trailingSlash: \"ignore\"`, either slash); the build fails otherwise. |\n| `theme` | site | `\"light\"` or `\"dark\"`: the dialog's colors, whatever the visitor's device is set to. Left out, it follows the device. See [Light, dark and toggles](#light-dark-and-toggles). |\n| `credit` | site | One link at the end of the dialog's footer, such as `{ label: \"Powered by Acme\", href: \"https://example.org/\" }`. It opens in a new tab. The `label` must not be blank, and the `href` must be an absolute `http:` or `https:` URL; the build fails otherwise. The search page has no credit. Left out, the footer has none. |\n| `trailingSlash` | site | `\"always\"`, `\"never\"` or `\"ignore\"`: the address form search uses, in place of Astro's `trailingSlash`. Search writes record URLs and the search page's URL in this form. `browse`, `suggested` and `pinned` links are not rewritten: each must already be in this form, or the build fails (\"is not canonical\"); with `\"ignore\"`, a `browse` link may have either slash. For a site that leaves Astro at `\"ignore\"`, so both forms answer, but links its pages without a slash: `trailingSlash: \"never\"`, and write those links without a slash too. Left out, it follows Astro's setting (`\"ignore\"` follows `build.format`). Your routing does not change. Any other value fails the build. |\n\n## Adapters\n\n- **`collections({ name: spec })`** reads Astro content collections. Each entry is a page record, and each heading (levels 2 and 3 by default) starts a section record with its rendered anchor. A spec takes `type` (the records' type, so two collections can share one: `hubs: { type: \"learn\" }` makes hubs Learn results; default the collection's name), `label` (the type's label; collections of one type may not set different labels, and one without a label takes the other's), `url` (the page's URL pattern: `{id}` is the entry's id, `{slug}` its `slug` field or else its id; default `/<collection>/{id}`, so `docs: {}` gives `/docs/getting-started`; set it to match your route, such as `blog: { url: \"/posts/{slug}\" }`; your `base` and `trailingSlash` are applied for you), `facets`, `fields` (extra data fields to index, for data-only collections), `title`, `depths`, `keywords` (see Keywords) and `filter`. Drafts and `noindex` entries are always left out. An entry whose `url` gives a URL on another site (a slug of `/other.example/x` with the pattern `/{slug}`) fails the build, naming the collection and entry.\n\n  `filter: (entry) => boolean` keeps the entries it returns `true` for, as a page route's `getStaticPaths` does: `docs: { url: \"/docs/{id}\", filter: (e) => !unlisted.has(e.id.split(\"/\")[0]) }`. It sees `{ id, collection, data }`. It runs in the integration after the records route, so `data` is the entry's data as JSON (a date is an ISO string), and it must not need `astro:content`.\n- **`html({ include, exclude, type, label, selector, canonical })`** scans the built HTML. It reads `[data-search-body]`, else `main`, else the body, and splits the page at its headings. Dialogs (`<dialog>`, `[data-search-dialog]`, `<astronomic-search>`) are never page text, nor is anything `hidden`, `aria-hidden=\"true\"` or `[data-search-ignore]`. Pages with `noindex` are left out. With a `selector`, a page where nothing matches it (outside a dialog) is left out too, title and keywords included, so a list page without a marked body never becomes a result. The text gets a space between block elements, at `<br>`, and between the items of a flex or grid container (a `flex` or `grid` class, with any variant prefix, or an inline `display` style), so cards and badges side by side do not run together; inline tags (`span`, `b`, `em` and the like) join with no space. A path segment `*` matches any one segment.\n\n  A page whose `<link rel=\"canonical\">` is another page of the site is indexed at that page's URL (a canonical on another site is ignored). When your pages can set a canonical of their own, such as an entry's SEO field, pass `canonical: false` and each page is indexed at its own built path, whatever its canonical says. A `noindex` page is still left out.\n- **`records(hook, { types, facets })`** takes records your own code returns: a CMS this package does not know, a component catalog, or actions with no URL (an action has a `command` and the dialog fires a `search:command` event).\n\nWhen two sources give the same URL, the collection record wins over the scanned page.\n\nAfter the build, every collection and `html()` record URL must be a built page (`<path>.html` or `<path>/index.html`), and every section's anchor an `id` that page renders; the build fails with a list otherwise, so a `url` pattern that misses its route, or a page left out of `getStaticPaths` but not by `filter`, never makes a dead result. With `output: \"server\"` a page may be rendered on demand, so these are warnings. A `records()` hook's URLs are its own and are not checked. The dev server has no built pages and does not check.\n\n### Result title\n\nA scanned page's result title is its `<h1>`, else its `<title>`. A page can set another one in its head, so a home page whose headline is a slogan shows as \"Home\":\n\n```html\n<meta name=\"search:title\" content=\"Home\">\n```\n\nThe `<h1>`'s words still find the page: they lead its text, so the visible headline searches as it did.\n\n### Result type\n\nA scanned page takes its source's `type`. A page can set its own in its head, so one `html()` source can read pages of several types that share a route, such as posts and pages both at `/<slug>`:\n\n```html\n<meta name=\"search:type\" content=\"posts\">\n```\n\nThe type must be one a source of the index declares (`html({ type: \"posts\" })`, a collection, or a `records()` type). Another value is a build warning, and the page keeps its source's type. Its heading records take the page's type.\n\n### Keywords\n\nA page can carry extra words that people search for but the page does not use, so \"start\" finds a page titled \"Lodestar\". Keywords are indexed in the `keywords` field, with the page's facet values. Each source has its own way to set them:\n\n```md\n---\ntitle: Lodestar\nsearchKeywords: [start, guide, north]   # or \"start, guide, north\"\n---\n```\n\n```html\n<meta name=\"search:keywords\" content=\"start, guide, north\">\n```\n\n```js\ncollections({ docs: { keywords: \"tags\" } });  // read another field\ncollections({ docs: { keywords: false } });   // no keywords\nrecords(() => [{ id: \"en:/ui/button\", kind: \"page\", url: \"/ui/button\", type: \"kit\", title: \"Button\", text: \"\", keywords: [\"cta\"] }]);\n```\n\nOnly page records take keywords, not headings. Each keyword is trimmed and empty ones are left out. A page keeps its first 20 keywords, and the build warns about any page with more. When a collection page replaces a scanned page, it keeps its own keywords and none of the scanned ones.\n\n## The three layers\n\n| Layer | Import | Use it when |\n| --- | --- | --- |\n| Default dialog | `@astronomic-dev/search/ui` (loaded for you by `SearchLink`) | You want search working today and will theme it with custom properties and parts. |\n| Browser behavior | `@astronomic-dev/search/dom` | You render your own markup and want the dialog, combobox, tabs, shortcut and live region done right. `mountSearch({ trigger, dialog, input, listbox, live, controller, idFor, keys })` returns an `unbind()`. With `newTab: true`, every result opens in a new tab and the dialog stays open; put `target=\"_blank\" rel=\"noopener\"` on your own result links, and the browser follows a click on one itself, so a pop-up blocker never stops it. |\n| Controller | `@astronomic-dev/search/controller` | You want only the state: query, loading, results, the active option, type tabs, facet picks and recent searches. No DOM, so it runs anywhere. In an empty dialog box, `state.options` holds the index's suggested links (`kind: \"suggested\"`, with `url`, `label` and `type`), so a recipe renders them as options. |\n\nThe core (`@astronomic-dev/search/core`) holds the record types, the engine and `createSearch`, for code that searches an index without any UI. The dom layer also exports `marked(document, text, ranges, attrs?)`, the one way to render result text: text nodes with a `<mark>` (with `attrs`, default `part=\"mark\"`) around each matched range, never markup.\n\n### Build your own dialog\n\nA dialog of your own still gets the lazy load: call `startBoot({ selector, keys, load })` from `@astronomic-dev/search/boot` in your button's script. It listens for hover, focus, a click and the shortcut, calls `load()` on first use (your app, through `import()`), calls the app's `prepare(trigger, keys)`, then replays the held click or key; if the load fails, a held click follows the link. To fetch the index while your app loads, pass `preload(trigger)` as well: call `prefetch({ index, lang, manifestUrl, fetch })` from `@astronomic-dev/search/controller` there, and hand what it returns to your app's `loadSearcher` as `prefetch`. `loadSearcher` uses it once, and only for the same index and manifest URL. Give your buttons `data-search-ui=\"yours\"` and pass `selector: '[data-search-trigger][data-search-ui=\"yours\"]'`: the default dialog's boot and app skip any trigger with a `data-search-ui`, so the two never take each other's buttons. Use one kind of dialog per page. The integration's settings reach your code through `virtual:astronomic-search/assets`, which exports `{ boot, app, manifest, index, shortcut, browse, strings }` (`strings` holds the `strings` setting's overrides only); for its types, add `/// <reference types=\"@astronomic-dev/search/astro/virtual\" />` to the file that imports it.\n\nOn a phone, a dialog that opens after the tap gets no keyboard: iOS opens it only for a focus made inside the tap. For that, pass `touch: touchOpens(view)`, also from `@astronomic-dev/search/boot`. On a tap, `view.show(trigger)` makes and mounts a stand-in box that looks like your dialog's search field, and returns `{ host, input }` (not focused yet, with the text your dialog opens on), or `null` for an ordinary open. The helper focuses it inside the tap, and once your app is in and the box has held focus 150 ms, it calls your app's `openTouch(trigger, draft)`. That opens the dialog, focuses its input, puts in `draft.value` (`draft.changed` says if it differs from the start text) and the caret (`draft.start`, `draft.end`, `draft.direction`), and returns `true` when the input took the focus (on `false` the helper does nothing more, since your dialog may be open already). An app with no `openTouch` gets a click on the trigger instead, and the text typed in the box is lost. The helper also handles Escape and focus leaving the box (the open is dropped), a client router's page swap, an unfinished input method composition (it waits for it to end), and a failed load: the link is followed, and if `show` also returned `searchPage` (your search page's URL) and the link goes there (the same origin and path), the typed text goes along as `q`; a trigger with its own `data-search-href` keeps its link as it is. It adds about 0.7 KB gzip to your boot script, and none of the default dialog's stand-in. A boot without `touch` does not grow.\n\n```ts\nimport { startBoot, touchOpens } from \"@astronomic-dev/search/boot\";\n\nstartBoot({\n\tselector: '[data-search-trigger][data-search-ui=\"yours\"]',\n\tkeys: [\"mod+k\"],\n\ttouch: touchOpens({\n\t\tshow(trigger) {\n\t\t\tconst host = document.createElement(\"div\");\n\t\t\thost.className = \"my-search-stand-in\";\n\t\t\tconst input = host.appendChild(document.createElement(\"input\"));\n\t\t\tinput.setAttribute(\"aria-label\", \"Search\");\n\t\t\tdocument.body.append(host);\n\t\t\treturn { host, input, searchPage: \"/search\" };\n\t\t},\n\t}),\n\tload: () => import(\"./my-search-app.ts\"), // exports prepare(trigger, keys) and openTouch(trigger, draft)\n});\n```\n\nFor a worked example, see the Search family in [`@astronomic-dev/ui`](https://astronomic.dev/ui): the shell [`Search.astro`](https://github.com/astronomic-dev/astronomic-ui/blob/main/src/components/Search.astro) (its markup, templates and boot script), the glue [`lib/search-app.ts`](https://github.com/astronomic-dev/astronomic-ui/blob/main/src/lib/search-app.ts) on `controller` and `dom`, and the [`SearchClassic`](https://github.com/astronomic-dev/astronomic-ui/blob/main/src/components/SearchClassic.astro) recipe, which sets only class hooks.\n\n## The dialog element\n\n`SearchLink` loads a small boot script. On first use it loads the app, which defines `<astronomic-search>` and adds one to the page per kind of button. At the same time it fetches the manifest, then the index file the manifest names, so the index is often in by the time the app is. You can also place it yourself.\n\n| Attribute | What it does |\n| --- | --- |\n| `index` | The index to search. Default: the `default` setting. |\n| `types` | A comma list of the types this dialog shows. Default: all of the index's types. |\n| `group` | `type`, a facet name, or `false`: overrides the index's `group.dialog` for this dialog. |\n| `theme` | `light` or `dark`. Default: the `theme` setting, else the visitor's system setting. On an element you place yourself, only this attribute counts. |\n\n`SearchLink` takes the same choices as props (`index`, `types`, `group`), plus `main` (the button the shortcut belongs to; default the first on the page) and `class`. Its slot is the label.\n\n`href` sets where the link goes with no JavaScript, and where \"See all results\" goes (with `?q=` and the query added). Default: `/search` under your `base`, with a trailing slash when your `trailingSlash` setting calls for one. Set it when your search page lives elsewhere, or when you have none and want the link to go to a docs index instead:\n\n```astro\n<SearchLink href=\"/docs\">Search the docs</SearchLink>\n```\n\nThe build checks the default. When a page has a `SearchLink` with no `href` and the build wrote no search page (`search/index.html` or `search.html`), it logs one warning: add a `/search` page, or set `href`. It is a warning, not an error, because the dialog still works. A `/search` page rendered on demand writes no file, so it warns too; set `href=\"/search\"` to quiet it.\n\nWith `build.format: \"file\"`, Astro writes `search.html`, and result links have no `.html`. Most hosts (Cloudflare Pages, Netlify, Vercel) serve `/search` from `search.html` for you. On a host that does not, turn on its clean-URL or rewrite setting.\n\nAn action record (a `command`, no URL) fires a `search:command` event when it is picked. The event bubbles out of the dialog's shadow root, so listen on the element or on the document: `document.addEventListener(\"search:command\", (e) => run(e.detail.command))`.\n\n### Open on a search\n\nA trigger can open the dialog with a search already typed. Give it any of these attributes; they replace what the box held, and a trigger with none of them opens on the last search. Point its `href` at the same search on your `/search` page, so the link still works with no JavaScript.\n\n| Attribute | What it does |\n| --- | --- |\n| `data-search-query` | The words in the box. |\n| `data-search-type` | The type tab to select. Default: all types. |\n| `data-search-filters` | Facet picks in the search page's URL form: `theme=lodestar`, a name repeated for several values (`theme=lodestar&theme=vega`). Ignored by an engine with no facets. |\n\n```astro\n<SearchLink href=\"/search?q=dark+mode&type=docs&theme=lodestar\" data-search-query=\"dark mode\" data-search-type=\"docs\" data-search-filters=\"theme=lodestar\">\n\tDark mode in the Lodestar docs\n</SearchLink>\n```\n\nAny trigger works, the kit's too: the dom layer's `bindTrigger` reads them (`triggerStart()` from `@astronomic-dev/search/dom`) and calls `controller.open(start)`, which takes `{ query, type, picks }`. The dialog a trigger opens is still the one its `index`, `types` and `group` name, so these links share the page's one dialog and its shortcut.\n\n### Light, dark and toggles\n\nThe dialog follows the visitor's device. To keep it light or dark for everyone, set `theme`:\n\n```js\nsearch({\n\tsources: [collections({ docs: {} })],\n\ttheme: \"light\", // or \"dark\"\n});\n```\n\nIt applies to every dialog `SearchLink` adds, on every page. A change to the `theme` attribute afterwards stays, through view transitions too. An `<astronomic-search>` you place yourself takes its own `theme` attribute, not this setting. The plain Astro `SearchPage` takes your page's colors, so `theme` does not change it.\n\n**A site with its own light and dark toggle.** Search cannot know what your toggle changes, so leave `theme` out and set the dialog's `theme` attribute with a small script. This one reads `<html data-theme=\"dark\">` or `<html class=\"dark\">`. Change the `dark` line if yours differs:\n\n```js\n// src/scripts/search-theme.js\n// Keeps the search dialog's theme the same as the site's toggle.\nconst root = document.documentElement;\n\nfunction sync() {\n\tconst dark = root.dataset.theme === \"dark\" || root.classList.contains(\"dark\");\n\tfor (const el of document.querySelectorAll(\"astronomic-search, [data-search-proxy]\")) el.setAttribute(\"theme\", dark ? \"dark\" : \"light\");\n}\n\nconst observer = new MutationObserver(sync);\n// The toggle.\nobserver.observe(root, { attributes: true, attributeFilter: [\"data-theme\", \"class\"] });\n// The dialog, which joins the page on first use, and its stand-in on a phone.\nobserver.observe(document, { childList: true, subtree: true });\n// A dialog already on the page.\nsync();\n```\n\nLoad it from your layout, so every page has it:\n\n```astro\n<script>\n\timport \"../scripts/search-theme.js\";\n</script>\n```\n\nIt also sets a dialog that is made later, and it keeps working with Astro's `<ClientRouter />`.\n\nIf your colors are already custom properties that your toggle changes, you can point the dialog's [custom properties](#custom-properties) at them instead, with no script. Use your own names for the ones on the right:\n\n```css\nastronomic-search,\n[data-search-proxy] {\n\t--search-bg: var(--page);\n\t--search-fg: var(--ink);\n\t--search-muted: var(--ink-soft);\n\t--search-border: var(--line);\n\t--search-accent: var(--brand);\n\t--search-accent-fg: var(--on-brand);\n\t--search-focus: var(--brand);\n\t--search-mark-bg: color-mix(in srgb, var(--brand) 25%, transparent);\n\t--search-mark-fg: var(--ink);\n\tcolor-scheme: inherit;\n}\n```\n\n`color-scheme: inherit` takes the page's own `color-scheme`, so the scrollbar matches. Any color you leave out still follows `theme`, or the device.\n\n### Custom properties\n\nSet these on `astronomic-search` or any ancestor. Each has a light default and a dark one. If you set them on `astronomic-search` itself, name `[data-search-proxy]` in the same rule: it is the box that stands in for the dialog on a phone (see [Keyboard](#keyboard)).\n\n| Property | Default (light) | Use |\n| --- | --- | --- |\n| `--search-font` | system UI font | Every text in the dialog |\n| `--search-bg` | `#ffffff` | Dialog background |\n| `--search-fg` | `#16181d` | Text |\n| `--search-muted` | `#5c6370` | Snippets, labels, hints |\n| `--search-border` | `#dfe2e7` | Lines and outlines |\n| `--search-line` | the border, 60% toward the background | The rail beside heading results |\n| `--search-accent` | `#2c5fd6` | Links, picked filters, the active option's tint |\n| `--search-active` | the accent at 10% on the background | The active option's fill (the one the arrow keys picked): a color |\n| `--search-active-edge` | none (`transparent`) | A 2px bar on the active option's start side, in this color: for a fill too faint to see on its own |\n| `--search-accent-fg` | `#ffffff` | Text on the accent |\n| `--search-mark-bg` | `#fdeaa6` | Matched words |\n| `--search-mark-fg` | `inherit` | Matched words' text |\n| `--search-radius` | `0.75rem` | Dialog corners (inner corners follow) |\n| `--search-shadow` | soft drop shadow | Dialog shadow |\n| `--search-width` | `40rem` | Dialog width on wide screens |\n| `--search-backdrop` | dark, 45% | The backdrop behind the dialog |\n| `--search-focus` | `#2c5fd6` | Focus rings |\n| `--search-density` | `1` | A unitless number from `0.5` to `2` (clamped; a value with units is invalid) that scales the results list's spacing: each option's top and bottom padding and its title-to-snippet gap, the gap between options and between groups, and the group labels' bottom padding. Try `0.75` for compact and `1.3` for roomy. A label's top padding, the loading, empty and error messages, recent searches, the search box, header, tabs, filters and footer stay fixed. Options are at least `2.25rem` tall; with a mouse and no touch screen, a density under `1` lowers that floor with it, never under 24px or `1.5rem`, so compact `0.75` gives about 27px. With any touch pointer it does not drop: a mouse-first device that also has a touch screen keeps `2.25rem`, and a device whose main pointer is touch gets `2.75rem`. Tabs, filters and links keep their heights. Same in both themes. |\n\nOn screens up to `40rem` wide the dialog fills the screen and respects the safe areas. With reduced motion it opens without animation.\n\n### Parts\n\nStyle any piece with `astronomic-search::part(name)`. These names are stable.\n\n| Part | Element |\n| --- | --- |\n| `dialog` | The `<dialog>` |\n| `panel` | The box inside it |\n| `header` | The row with the search box and the close button |\n| `input` | The search box |\n| `close` | The close button |\n| `tabs` | The type tabs row |\n| `tab` | One type tab |\n| `facets` | The filter row |\n| `facet` | One filter button |\n| `filters-toggle` | On narrow screens, the button beside the type tabs that shows or hides the filter row, with the picked count |\n| `results` | The results list |\n| `group` | One group of results |\n| `group-label` | A group's heading: its name, then the group's count (`group-count`) on the right |\n| `group-count` | A group's count, in its `group-label`: grouped by type, the type's match count (as on its tab); else the pages listed |\n| `option` | One result (a page or a heading; `data-kind` says which), or a suggested link (`data-kind=\"suggested\"`) |\n| `option-title` | A page result's title |\n| `option-heading` | A heading result's heading |\n| `snippet` | The text under a result |\n| `mark` | A matched word |\n| `type-label` | A result's type, when results are not grouped |\n| `empty` | The no-results message |\n| `error` | The \"not available\" message |\n| `recent` | Recent searches |\n| `suggested` | The suggested links in an empty box: also a `group`, with a `group-label` and `option` links |\n| `footer` | The bottom row |\n| `see-all` | The \"See all results\" link |\n| `new-tab` | The notice that links open in a new tab, in a dialog whose links do |\n| `credit` | The credit link at the end of the footer, in a dialog that has one (the `credit` setting or config key) |\n| `kbd` | A key in the footer hints |\n| `status` | The live region (visually hidden) |\n\n## Strings\n\nEvery label has a US English default. Replace any of them with the `strings` setting.\n\n| Key | Default |\n| --- | --- |\n| `dialogLabel` | Search |\n| `placeholder` | Search |\n| `close` | Close |\n| `allTypes` | All |\n| `seeAll` | See all results |\n| `newTab` | Links open in a new tab (the dialog's notice, when its links do) |\n| `loading` | Loading… |\n| `unavailable` | Search is not available right now. |\n| `retry` | Try again |\n| `noResults` | No results for “{query}” |\n| `searchAllTypes` | Search all types |\n| `recent` | Recent searches |\n| `suggested` | Suggested |\n| `browse` | Browse |\n| `facetsLabel` | Filters |\n| `typesLabel` | Content types |\n| `other` | Other |\n| `results` | `{ zero: \"No results\", one: \"1 result\", other: \"{count} results\" }` |\n| `keys` | `{ move: \"to move\", open: \"to open\", close: \"to close\" }` |\n\nThe results page (the embed's [results mount](#the-results-mount) and EmDash's `<SearchResults>`) takes the same `strings`, plus its own words:\n\n| Key | Default |\n| --- | --- |\n| `label` | Search (the box's label, visually hidden) |\n| `submit` | Search (the form's button) |\n| `showMore` | Show more results |\n| `moreShown` | Result {position} of {total}: {title} (read after \"Show more results\") |\n| `headingMark` | # (before a section result's heading, hidden from screen readers) |\n| `crumbMark` | › (between the parts of a breadcrumb, hidden from screen readers) |\n| `typeText` | Type (the visible label before the type tabs) |\n\nOn EmDash, the admin page sets only `placeholder` (Search box text); every other string keeps its default.\n\n## Keyboard\n\n- `mod+k` (Cmd+K on Apple devices, Ctrl+K elsewhere) opens or closes the search. In a text field (including an element with the role `textbox`, `searchbox`, `combobox` or `spinbutton`, such as a custom component or an editor) or another open dialog it only closes an open search, so it never opens a second search from another search box.\n- `/` opens it, except while typing in a text field, a textarea, an editable area or an element with one of those roles.\n- Up and Down move through the results; focus stays in the box. Enter opens the result; Cmd or Ctrl+Enter opens it in a new tab.\n- Escape clears the box, then closes the dialog. Focus returns to the button that opened it.\n- Tab moves to the type tabs (Left and Right switch them), the filters, and \"See all results\".\n- Nothing runs while an input method is still composing text.\n\nOn a touch screen, a tap on a `SearchLink` button first shows a small box that looks like the dialog's (`[data-search-proxy]`, with the same `--search-*` custom properties and `theme`), as iOS opens its keyboard only for a field focused inside the tap. When the dialog is ready, and at least 150 ms later, the text and caret move to it.\n\nSet `shortcut: false` to turn the shortcut off, or `shortcut: { keys: [\"mod+k\"] }` to keep only one.\n\n## Analytics\n\nThe search sends nothing anywhere. It dispatches three DOM events, which bubble out of the dialog (and out of its shadow root) to `document`, so you can pass them on to your own analytics. They fire from the browser layer, so every dialog built on it sends them too.\n\n| Event | When | `detail` |\n| --- | --- | --- |\n| `search:query` | Once typing stops (the same quiet time as the live result count, 600 ms), for each new query or type tab. A query still waiting fires at once when a result is opened or the dialog closes. | `{ query, index, locale, total, type }`: `total` counts the matching pages, `type` is the active type tab (`null` for all). |\n| `search:noresults` | Right after `search:query`, when that query found nothing. | `{ query, index }` |\n| `search:select` | When a result or a suggested link is opened: Enter, a click, or a new tab. | `{ query, index, id, url, type, position }`: `position` starts at 1, in screen order. A suggested link has `id: null` and `query: \"\"`. |\n\nNothing fires for an empty box or while an input method is still composing text. `mountSearch({ events: false })` turns them off. The embed's results page (and EmDash's `<SearchResults>`) fires the same three events from its mount, so one set of listeners covers the dialog and the page. The plain Astro `SearchPage` fires none. More examples: [astronomic.dev/docs/search/analytics](https://astronomic.dev/docs/search/analytics).\n\nPlausible:\n\n```js\ndocument.addEventListener(\"search:query\", (e) => {\n\tconst { query, total } = e.detail;\n\twindow.plausible?.(\"Search\", { props: { query, results: String(total) } });\n});\ndocument.addEventListener(\"search:noresults\", (e) => {\n\twindow.plausible?.(\"Search: no results\", { props: { query: e.detail.query } });\n});\ndocument.addEventListener(\"search:select\", (e) => {\n\twindow.plausible?.(\"Search: open\", { props: { query: e.detail.query, url: e.detail.url ?? \"\", position: String(e.detail.position) } });\n});\n```\n\nGoogle Analytics 4 (its recommended `search` event, plus two of your own):\n\n```js\ndocument.addEventListener(\"search:query\", (e) => {\n\twindow.gtag?.(\"event\", \"search\", { search_term: e.detail.query, results: e.detail.total });\n});\ndocument.addEventListener(\"search:noresults\", (e) => {\n\twindow.gtag?.(\"event\", \"search_no_results\", { search_term: e.detail.query });\n});\ndocument.addEventListener(\"search:select\", (e) => {\n\tconst { query, url, position } = e.detail;\n\twindow.gtag?.(\"event\", \"select_search_result\", { search_term: query, link_url: url, position });\n});\n```\n\n## Embed on any server\n\nThe embed is a second browser build for a page not built with Astro, such as a CMS theme. It reads its settings at run time from one JSON tag the server prints, so it needs no build step on that site. It uses the same index files, manifest, dialog and `--search-*` custom properties as the integration.\n\nNever load the embed on an Astro page that uses the integration or the kit's search page. Each has its own boot.\n\n### Build output\n\n```sh\npnpm --dir packages/search build:embed   # or: node scripts/build-embed.mjs <outDir>\n```\n\n`pnpm build` writes the same folder, and the npm package ships it as `dist/embed/`:\n\n- `search-embed.js`: the boot. It has a fixed name and no imports, so load it as a plain module: `<script type=\"module\" src=\"/search/search-embed.js?ver=1\">`. Change `?ver=` on each release.\n- `chunks/embed-app-<hash>.js` and `chunks/embed-results-<hash>.js`: the dialog and the results page. They load only when needed, relative to the boot, so copy the whole folder. Each chunk holds all its own code (there is no shared chunk). Cache them for a year.\n- `engine.json`: the engine the chunks carry (`schema`, `engine`, `engineVersion`). Check that your index files were built for it.\n- `files.json`: `{ \"boot\": \"search-embed.js\", \"files\": [...] }`, every file written. When you deploy a new build, keep the files the previous `files.json` lists for one more release: a cached page or an open tab may still load old chunk names.\n\nThe build writes to a staging folder and swaps it in only when it is complete, so a failed build leaves the old output as it was.\n\n### The config tag\n\nPrint one tag per page, before or after the boot:\n\n```html\n<script type=\"application/json\" data-search-config>\n{\n  \"manifest\": \"/search-data/manifest.json\",\n  \"index\": \"default\",\n  \"results\": \"/search\",\n  \"queryParam\": \"q\",\n  \"paramPrefix\": \"\",\n  \"keys\": [\"mod+k\", \"/\"],\n  \"strings\": { \"placeholder\": \"Search the site\" },\n  \"browse\": [{ \"label\": \"All guides\", \"href\": \"/guides\" }],\n  \"takeover\": { \"enabled\": true, \"inputName\": \"q\", \"skip\": \".no-search-takeover\", \"allowFields\": [\"lang\"] }\n}\n</script>\n```\n\nEscape `<`, `>` and `&` in the JSON so it cannot close the tag. Only `manifest` is required (an absolute `http(s)` URL or a root-relative path). Every other value has a default, and a wrong value falls back to it:\n\n| Key | Default | What it does |\n| --- | --- | --- |\n| `manifest` | (required) | The manifest URL. With no usable manifest, or a tag that is not JSON, the embed does nothing. |\n| `index` | `\"default\"` | The index for the shortcut, takeover, the results page, and placements with no `data-search-index`. |\n| `lang` | `<html lang>` | Picks the index locale. |\n| `results` | `\"/search\"` | The results page URL, for \"See all results\" and the takeover check. Relative or http(s); any other scheme takes the default. |\n| `queryParam` | `\"q\"` | The query parameter on the results URL. |\n| `paramPrefix` | `\"\"` | Goes before the type, index and facet parameters. Letters, digits, `_` and `-` only. |\n| `keys` | `[]` | Shortcut keys, such as `[\"mod+k\", \"/\"]`. They open the default index's dialog. |\n| `strings` | `{}` | Dialog and results page text (see [Strings](#strings)). |\n| `browse` | `[]` | Links shown when the index cannot load, under the retry button. A link whose `href` is not relative or http(s) is dropped. With a working index, an empty dialog shows suggested links and recent searches instead; set those links with the index's `suggested` setting where the index is built. |\n| `takeover.enabled` | `false` | Take over the theme's own search form. |\n| `takeover.inputName` | `\"q\"` | The name of the theme form's search input. Letters, digits, `_`, `-` and `[]` only. |\n| `takeover.skip` | `\".no-search-takeover\"` | Forms that match this selector, or are inside it, are left alone. |\n| `takeover.allowFields` | `[\"lang\"]` | Hidden input names a form may carry and still be taken over. |\n| `standDown` | `null` | The name of another live search on the page. When set, takeover is off. Placements still work. |\n| `theme` | none | `\"light\"` or `\"dark\"`. The dialogs and the takeover's stand-in box use it whatever the device's color scheme. Left out (or any other value), they follow the device. The results page has no colors of its own, so it always follows the page. |\n| `links` | none | `\"new-tab\"`: every link in the dialog opens in a new tab, and the dialog stays open. Left out (or any other value), a result opens in the same tab. See [Links in a new tab](#links-in-a-new-tab). |\n| `credit` | none | `{ \"label\": \"Powered by Acme\", \"href\": \"https://example.org/\" }`: one link at the end of the dialog's footer, small and muted, that opens in a new tab. A long label stays on one line and ends in an ellipsis. Both values are trimmed. A blank `label`, or an `href` that is not an absolute `http:` or `https:` URL, drops the whole credit, with no error. The results page has no credit. |\n\nThe embed does nothing in a browser without constructable stylesheets (Safari before 16.4). Every form and link stays native there.\n\n### Placements\n\nA placement is a container the server prints and styles. The package draws no field. It adds behavior only, and both kinds work with no JavaScript.\n\n```html\n<!-- Inline: a real search field. Typing opens the dialog with the text. -->\n<div data-search-placement data-search-open=\"inline\" data-search-index=\"main\" data-search-placeholder=\"Search products\">\n\t<form role=\"search\" method=\"get\" action=\"/search\">\n\t\t<label for=\"product-q\">Search</label>\n\t\t<input id=\"product-q\" type=\"search\" name=\"q\">\n\t\t<button>Search</button>\n\t</form>\n</div>\n\n<!-- Modal: a plain link. A click or tap opens the dialog. -->\n<div data-search-placement data-search-open=\"modal\">\n\t<a href=\"/search\">Search</a>\n</div>\n```\n\n- The inline field's `name` must equal `takeover.inputName`. An inline placement has no results list of its own.\n- Do not put `data-search-trigger` on the modal link.\n- `data-search-index` and `data-search-placeholder` are optional, and are read at each open. Two placements on one index each show their own placeholder.\n- A modified click on the modal link (Cmd, Ctrl, Shift, Alt or the middle button) opens the results page as usual.\n- Escape returns focus to the field or link that opened the dialog.\n- Enter in the inline field opens the dialog. If search cannot load, or the dialog's index fails (a 503 before the first build), or both are not ready within 4 seconds, the field's form submits natively with the text typed meanwhile, as the browser's own Enter would, so the results page answers.\n- Placements added after the page loads work too.\n\n### Links in a new tab\n\nFor a page people should not leave, such as an admin screen with a \"try a search\" box, set `\"links\": \"new-tab\"`. Leave it out on pages for visitors. Results, suggested links, \"See all results\" and the error state's links then open in a new tab, and the dialog stays open with its query. The dialog's footer says so (the `newTab` string). Theme takeover's form submit and the results page are not affected. Keep the config tag on the page until search first loads: the key is read then, and with no tag left the links open in the same tab.\n\n### Theme takeover\n\nWith `takeover.enabled`, the theme's own search form opens the dialog. A form is taken over only when all of these hold:\n\n- It is a GET form to the `results` URL (same origin and path), with no target other than `_self`.\n- It has exactly one control named `inputName`, a text or search input.\n- Its only other named controls are hidden inputs in `allowFields` and submit buttons with no `formaction`, `formmethod` or `formtarget`.\n- It is not inside `skip` and not inside a placement.\n\nA taken field is read-only, with `aria-haspopup=\"dialog\"`, while the embed owns it. Both go back to what they were when it is given back (search cannot load, its index is not there, or its form no longer qualifies); a field that was read-only of its own is read-only again. It still takes focus: a printable key, a paste, a click, Enter or an IME's key opens the dialog, and the text goes into the dialog's box. Closing the dialog puts focus back on the field. Tab, Escape and the arrow keys do not open it. Known limit: Firefox does not start an input method (Chinese, Japanese, Korean) in a read-only field, so after the dialog closes, click the field or press Enter, and compose in the dialog.\n\nAny other form is left alone, so product filters, POST forms and forms that go elsewhere keep working. A submit from a button with `formaction`, `formmethod` or `formtarget` submits natively.\n\nOn submit, if the app or the index fails to load, or both are not ready within 4 seconds, the form submits natively with the text typed so far. If the index fails to load after the theme's field (or the `LiveSearch` box) opened the dialog, for example before the first build, the dialog closes and the text typed so far goes back into the field, which stays the theme's for the rest of the page.\n\nEmDash's `LiveSearch` box (`emdash/ui/search`, in EmDash's blog template) has no form. With takeover on, its field opens the dialog too, unless it is inside `skip`, and its own results dropdown stays shut. Other inputs with no form stay native.\n\nWhen `strings.placeholder` is set, the embed also writes it onto the field of each form it takes over, and onto a taken `LiveSearch` box, so the theme's box shows the same text as the dialog. With takeover off, the theme's fields are never touched.\n\nWith takeover on, the shortcut keys win over the theme's own (a theme script that binds Cmd+K to its header box, as EmDash's blog template does): a press that opens or closes search never reaches the theme's listeners. Other keys, and every key with takeover off, stay the theme's. The embed listens in the window's capture phase and stops the press there, so a theme listener in that same phase added after it never sees the press. One added earlier still runs first: before the embed's script ran, or before search first loads (the first open, hover or focus), when the embed adds its listener again.\n\n### First tap on phones\n\niOS opens the keyboard only for a field focused inside the tap itself. So every touch open shows a small field (the proxy) that looks like the dialog's box and focuses it at once. When the dialog is ready, and at least 150 ms later, the text and caret move to the real input. Style the proxy with the same `--search-*` custom properties as the dialog.\n\n### The results mount\n\nOn the results page, print a mount with your own plain result list inside it:\n\n```html\n<div data-search-results data-search-index=\"main\" data-search-query=\"lighthouse\">\n\t<ol>\n\t\t<li><a href=\"/guides/lighthouse\">Lighthouse guide</a></li>\n\t</ol>\n</div>\n```\n\n- The boot loads the results chunk at once on a page with a mount. Once the index is loaded and the first render is built, the page draws in a shadow root and your list stops showing. If anything fails, your list stays.\n- `data-search-query` is the server's query, for pretty URLs such as `/search/lighthouse/`. It applies only to the page's first history entry.\n- `data-search-index` is optional. The URL's `${paramPrefix}index` comes first, then this attribute, then the config's `index`.\n- `data-search-types` is optional: a comma-separated list of the types the page shows.\n- The theme's global CSS for `ol`, `li`, `a` or `button` does not reach the results. Style them with `--search-*` and `::part()`. Font and color inherit from the page.\n- The results page has no colors of its own, so it matches the theme. Lines, fills, matched words and the Search button come from the page's text color, and the button is an outline. To fill the button with your brand color, set `--search-accent` on the mount or an ancestor. Its text is white or black to contrast with the accent; set `--search-accent-fg` to choose it.\n- It reads the dialog's `--search-font`, `--search-fg`, `--search-muted`, `--search-border`, `--search-line`, `--search-mark-bg`, `--search-mark-fg`, `--search-radius`, `--search-focus` and `--search-density` (here it scales each result's top and bottom padding and the gap between its breadcrumb, title and snippet, the group labels' top and bottom padding, the gap between groups, and the matched sections' spacing: the gap between them and above the first. A section link's own padding and height, the space between a section's title and its snippet, the messages, the suggested links, the form, tabs, filters and \"Show more\" stay fixed), each color defaulting to the page's text color mixed lighter, plus three of its own: `--search-rule` (the lines between results, text color at 9%), `--search-band` (the band behind each group's heading, 4%) and `--search-selected` (a picked tab or filter, 12%). See [astronomic.dev/docs/search/customize](https://astronomic.dev/docs/search/customize).\n- The results page draws its own search field. Replace the body of the theme's search page with the mount, and keep the mount inside the theme's container. If you keep the theme's own field outside the mount, the page shows two search fields. Put the theme's form and list inside the mount instead: they show when the script does not run.\n- Each change replaces the history entry, and a submit adds one, so Back returns to the last submitted search.\n\nThe same page is a module: `mountResultsPage(root, config)` from `@astronomic-dev/search/results` returns an unmount function. After an unmount, your list shows again.\n\n### URL names\n\nThe results URL uses `queryParam` for the query, `${paramPrefix}type` for the type tab, `${paramPrefix}index` for the index and `${paramPrefix}<facet>` for each facet pick. \"See all results\" from a dialog always writes the index, so the results page searches the same one.\n\nThese three names are reserved. A facet whose URL name equals the query, type or index name is not read from or written to the URL. A `queryParam` equal to the type or index name falls back to `\"q\"`. Use `paramPrefix` when the host already uses short names (such as `tag` or `paged`) for its own parameters.\n\n## EmDash\n\nA free EmDash plugin ships in the same package. It builds the index from your EmDash content, keeps it fresh when you publish, serves it as JSON and prints the [embed](#embed-on-any-server) on every public page. It adds one admin page, **Search**, with the index status, a Rebuild now button and the settings. Tested on EmDash 1.4.0 and 1.6.0, including EmDash's default blog template (`create-emdash`).\n\nSee it first: [astronomic.dev/plugins/emdash-search](https://astronomic.dev/plugins/emdash-search) has a live demo: search a sample site, and change the dialog's mode, color, corners and font.\n\nIt is a native (trusted) plugin, installed from npm. It is not in EmDash's plugin registry, which lists sandboxed plugins only.\n\n### Install\n\n```sh\npnpm add @astronomic-dev/search\n```\n\n```js\n// astro.config.mjs\nimport { defineConfig } from \"astro/config\";\nimport emdash from \"emdash/astro\";\nimport { search } from \"@astronomic-dev/search/emdash\";\nimport { searchFiles } from \"@astronomic-dev/search/emdash/astro\";\n\nexport default defineConfig({\n\tintegrations: [\n\t\temdash({\n\t\t\t// your existing EmDash options (database, storage, ...)\n\t\t\tplugins: [search()],\n\t\t}),\n\t\tsearchFiles(),\n\t],\n});\n```\n\nIn an existing config, keep your EmDash options, add `search()` to its `plugins` list, and add `searchFiles()` to `integrations`.\n\n`searchFiles()` goes after `emdash()`. It copies the embed's files into your build at `/_search/embed/` and serves them in `astro dev`. Your site serves every file itself; nothing loads from us.\n\nOptions (in code only, and plain JSON only, because EmDash passes them to the plugin as JSON; a function, RegExp or Date throws):\n\n| Option | Default | What it does |\n| --- | --- | --- |\n| `collections` | every collection with search support that is routable and not hidden | The collection slugs to index. A listed collection that is not routable is skipped with a build warning. |\n| `budget` | `{ gzipKB: 300 }` | The size warning for each locale's index, gzipped. |\n| `clip` | whole text | Characters of each entry's text the index keeps. |\n| `groupOrder` | `\"best\"` | The order of the result groups and the type tabs: `\"best\"` (the group with the best match first, the tabs by collection slug) or a list of collection slugs, first to last: `[\"posts\", \"series\", \"authors\", \"pages\"]`. Collections it leaves out follow (groups best first, tabs by slug). Each slug once; a slug the index does not have is a build warning. |\n| `exclude` | none | Site paths to leave out of search, such as a page the theme has turned off: `[\"/speaking\", \"/projects/*\", \"/sitemap-*.xml\"]`. Case makes no difference. A `*` segment is any one segment; a `*` inside a segment is any run of characters there. See [Leave pages out](#leave-pages-out). |\n| `excludeWhen` | none | Site paths to leave out while a switch in a settings entry is set, such as a part the site owner has turned off in the admin: `[{ collection: \"details\", field: \"switch_areas\", values: [\"off\"], paths: [\"/areas\", \"/areas/*\"] }]`. See [Leave pages out](#leave-pages-out). |\n| `skipWhen` | none | Entries to leave out entirely by a field value or their slug, such as a home entry the theme shows at `/`: `[{ collection: \"pages\", field: \"slug\", values: [\"home\"] }]`. See [Leave pages out](#leave-pages-out). |\n| `trailingSlash` | the site's | `\"always\"`, `\"never\"` or `\"ignore\"`: the address form of record URLs and of the results page URL the page prints, in place of the site's `trailingSlash`. See [Site URL](#site-url). |\n| `listPages` | none | Pages that list whole collections, such as a talks page or a FAQ, so a search for an item finds the page. See [List pages](#list-pages). |\n| `taxonomyKeywords` | none | Taxonomies whose term labels are keywords of their entries: `[\"category\", \"tag\"]`. See [Categories and tags](#categories-and-tags). |\n| `textFields` | none | More fields to search, per collection: `{ projects: [\"problem\", \"case_*\"], areas: [\"intro\"] }`. See [More fields](#more-fields). |\n| `filesPath` | `/_search/embed/` | Where the site serves the embed. Must match `searchFiles({ path })`. |\n\n**Check the layout.** The plugin's two tags print only where your layout renders `<EmDashHead>` and `<EmDashBodyEnd page={page} />`. Most EmDash themes do, but a hand-made layout may not. To check: open a public page, view its source, and look for `data-search-config` near the end of `<body>`. If it is not there, add `<EmDashBodyEnd page={page} />` before `</body>`.\n\n### Site URL\n\nThe build needs no site URL. The index holds paths only (`/posts/hello`), so search links work on any address the site is served at. EmDash does not read Astro's `site`. Only when you set one in EmDash (`siteUrl` in `emdash({ siteUrl })`, the `SITE_URL` environment variable, Settings > General or the setup wizard) does the admin page show a \"Built for\" line with it under the index; with none, that line is not shown.\n\n**Trailing slash.** Record URLs follow the site's `trailingSlash`, as EmDash gives them. `search({ trailingSlash: \"always\" })` (or `\"never\"`, `\"ignore\"`) sets the form in place of it: record URLs, and the results page URL in the [config tag](#the-config-tag), saved with or without a slash, are written in that form (its query and hash are kept). Set it when the site redirects the other form, so a result or \"See all results\" never lands on a redirect. Left out, nothing changes: the results URL is printed as saved. Any other value throws at config load.\n\nThe first build runs by itself within a minute of install. If no collection has search turned on yet, the build waits and runs once one does.\n\n### Cloudflare\n\nOn Cloudflare, the plugin needs the Workers Paid plan. Node hosting has no such limit.\n\nA rebuild runs inside the Worker, and the Free plan allows 50 D1 queries and 10 ms of CPU per run. A build makes about 8.5 D1 queries per 100 pages (39 for a 42-page site, 89 for 1,042 pages), so the Paid plan's 1,000 queries per run fit about 11,000 pages. With `taxonomyKeywords` it is about 2 more per 100 entries. When a build hits a plan limit, the old index stays and the admin page says so.\n\nThe rebuild runs on EmDash's cron, so the Worker needs EmDash's Worker entry and a Cron Trigger every minute. Without both, no first build runs and no change is picked up.\n\n```ts\n// src/worker.ts\nexport { default, PluginBridge } from \"@emdash-cms/cloudflare/worker\";\n```\n\n```jsonc\n// wrangler.jsonc\n{\n\t\"main\": \"./src/worker.ts\",\n\t\"compatibility_flags\": [\"nodejs_compat\"],\n\t\"triggers\": { \"crons\": [\"* * * * *\"] }\n}\n```\n\nThen run `npx emdash doctor`: it checks the Worker entry. Astro 7.3 needs `@astrojs/cloudflare` 14.3.x. To test the cron locally, build the site, run `wrangler dev --test-scheduled`, then call `/cdn-cgi/handler/scheduled?cron=*+*+*+*+*` (for example `curl \"http://localhost:8787/cdn-cgi/handler/scheduled?cron=*+*+*+*+*\"`).\n\nIf the Worker fails at start with a `require` error from `postcss` (EmDash's HTML sanitizer pulls it in, and Vite 8 leaves its `require` calls to a shim that Workers lack), add a small Vite plugin that gives server chunks a `require` from `node:module`, with `nodejs_compat` on:\n\n```js\n// astro.config.mjs, in vite.plugins\n{\n\tname: \"workers-require\",\n\tapplyToEnvironment: (environment) => environment.config.consumer === \"server\",\n\trenderChunk(code) {\n\t\tif (!code.includes(\"typeof require\")) return null;\n\t\treturn { code: `import { createRequire as __cr } from \"node:module\";\\nconst require = __cr(\"/\");\\n${code}`, map: null };\n\t},\n}\n```\n\n### Settings\n\nThe admin page's settings take effect on the next page view, with no rebuild.\n\n| Setting | Default |\n| --- | --- |\n| First and second shortcut | `mod+k` and `/` |\n| Take over the theme's search form | off |\n| Search input name | `q` |\n| Search box text | `Search the site` |\n| Theme | auto |\n| Results page URL | `/search` |\n\nWith takeover on, the theme's search form and EmDash's `LiveSearch` header box open the dialog, and the shortcut keys win over the theme's own (see [Theme takeover](#theme-takeover)). The results page URL must match your search form's `action` exactly, trailing slash included. With the `trailingSlash` option set, the URL is printed in that form whatever the saved value has (see [Site URL](#site-url)), so the form's `action` must use it too.\n\nThe rest of the [config tag](#the-config-tag) is fixed on EmDash: `queryParam` is `q` and `paramPrefix` is empty (no prefix), so the results URL is `/search?q=...` with `type`, `index` and facet names as they are. Of the [strings](#strings), only `placeholder` comes from the admin page (Search box text). The index is always `default`, and `takeover.skip` and `takeover.allowFields` keep their defaults.\n\nKnown limits: Space cannot be a shortcut key. On a Mac, Ctrl records as `ctrl`, not `mod` (`mod` is Cmd on a Mac and Ctrl elsewhere).\n\n### When a build fails\n\nThe admin page shows why the last build failed, and the old index stays live. One exception: `no-collections`, when no collection is left to index, takes the old index down too, so the manifest answers 503 and the theme's own search works again. The codes (`plan-limit` for a Cloudflare plan too small, `no-collections` when no collection has search turned on, `too-large` over the size cap, `deadline` and `interrupted` for a build cut short, and the rest) and what to do about each are in [astronomic.dev/docs/search/troubleshooting](https://astronomic.dev/docs/search/troubleshooting).\n\n### What is indexed\n\n- One record per published entry in the indexed collections, one index per locale. The URL comes from EmDash itself, so URL patterns, locale paths and trailing slashes match the site.\n- The text is the first of the excerpt, summary, description and SEO description, then the fields in [`textFields`](#more-fields), then the plain text of the content. A `search_keywords` field (a list or a comma list) adds keywords, and so do the terms in [`taxonomyKeywords`](#categories-and-tags). EmDash field slugs are lowercase, so name it that way.\n- Pages in `listPages` also have the words of the entries they list. See [List pages](#list-pages).\n- Skipped: drafts, scheduled entries until they publish, entries with `seo.noIndex` on, entries with no public URL, paths in `exclude`, and entries `skipWhen` matches.\n- One record per URL. When two published entries have the same URL, the first one in `collections` order gives the record and the build warns. When that first entry has `seo.noIndex` on, the URL gets no record at all: a page that takes a post's slug hides the post, so the post is not a result either.\n- [Members-only entries](#members-only-entries) are searched by their title and term labels only.\n- No heading records yet: EmDash's renderer prints no heading ids, so a result links to the page, not a section. Heading text is still searched.\n\n### Leave pages out\n\nUse `exclude` for an entry that is published but has no page: a theme can turn a page off in its code, while the entry that words it stays published, and a result for it would be a 404.\n\n```js\nsearch({ exclude: [\"/speaking\", \"/projects/*\"] });\n```\n\n- A path is exact, in any case: `/Speaking` and `/speaking` are the same. A `*` segment is any one segment: `/projects/*` leaves out every project, but not `/projects` itself. A `*` inside a segment is any run of characters in that segment, none too: `/sitemap-*.xml` leaves out `/sitemap-0.xml` and `/sitemap-index.xml`, but not `/sitemap.xml`. An encoded `%2A` is a plain asterisk.\n- Write site paths, starting with `/`, with no base (a value that is not a list of these throws). A trailing slash makes no difference. Letters can be plain or encoded (`/café` or `/caf%C3%A9`).\n- A path with no locale prefix is left out in every locale: `/speaking` also leaves out `/fr/speaking`. To leave a page out in one locale only, write its prefix: `/fr/speaking`. A first segment that is a locale's prefix always means the locale, even if a page has the same slug. A `*` never stands for the prefix.\n- A change to an option (`exclude`, `excludeWhen`, `skipWhen`, `trailingSlash` for record URLs, `collections`, `clip`, `groupOrder`, `listPages`, `taxonomyKeywords`, `textFields`) is in your code, so EmDash sends no content event for it. It shows after the next build: click Rebuild now after you deploy, or wait for the next content change or the nightly build. A change to `locked` is the exception: see [Members-only entries](#members-only-entries).\n- `exclude` and `excludeWhen` cover this index only. EmDash's own search, which the theme's server list uses, still finds the entry.\n\n**While a switch is off.** Use `excludeWhen` when the site owner turns a part of the site on and off in the admin, with a field of a settings entry (a select of `on` and `off`, say). At each build the plugin reads that entry, and while the field holds one of `values`, the `paths` are left out as `exclude` leaves them out.\n\n```js\nsearch({\n\texcludeWhen: [{ collection: \"details\", field: \"switch_areas\", values: [\"off\"], paths: [\"/areas\", \"/areas/*\"] }],\n});\n```\n\n- `collection` is a collection with one entry. It needs no search support and no URL. The plugin reads its newest published entry, the one a theme that lists the collection gets first (EmDash lists the newest first). A second published entry is a build warning, and the newest one is read.\n- `paths` work as in `exclude`, and the two lists join: a path left out gets no page from `listPages` either.\n- An empty field and no published entry both read as `null`. Put `null` in `values` when the part is off by default.\n- `values` match exactly, as in `skipWhen`: `true` and `false` also match a boolean field stored as `1` and `0`.\n- A collection or field the site does not have, or a field that holds a list or an object, is a build warning, and the rule leaves nothing out.\n- If the entry canno","readmeFilename":"README.md"}