[{"data":1,"prerenderedAt":2944},["ShallowReactive",2],{"navigation_docs":3,"-docs-guide-recipes-write-a-plugin":478,"-docs-guide-recipes-write-a-plugin-surround":2939},[4,352,446],{"title":5,"icon":6,"path":7,"stem":8,"children":9,"page":6},"Docs",false,"\u002Fdocs\u002Fcore","docs\u002F1.core",[10,35,141,174,195,212,242,318],{"title":11,"icon":6,"path":12,"stem":13,"children":14,"page":6},"Getting Started","\u002Fdocs\u002Fcore\u002Fgetting-started","docs\u002F1.core\u002F1.getting-started",[15,19,23,27,31],{"title":16,"path":17,"stem":18},"Introduction","\u002Fdocs\u002Fcore\u002Fgetting-started\u002Fintroduction","docs\u002F1.core\u002F1.getting-started\u002F1.introduction",{"title":20,"path":21,"stem":22},"Quick Start","\u002Fdocs\u002Fcore\u002Fgetting-started\u002Fquick-start","docs\u002F1.core\u002F1.getting-started\u002F2.quick-start",{"title":24,"path":25,"stem":26},"Add to an Existing Site","\u002Fdocs\u002Fcore\u002Fgetting-started\u002Fexisting-site","docs\u002F1.core\u002F1.getting-started\u002F3.existing-site",{"title":28,"path":29,"stem":30},"Configuration","\u002Fdocs\u002Fcore\u002Fgetting-started\u002Fconfiguration","docs\u002F1.core\u002F1.getting-started\u002F4.configuration",{"title":32,"path":33,"stem":34},"How Tenon works","\u002Fdocs\u002Fcore\u002Fgetting-started\u002Fhow-tenon-works","docs\u002F1.core\u002F1.getting-started\u002F5.how-tenon-works",{"title":36,"icon":6,"path":37,"stem":38,"children":39,"page":6},"Content Modeling","\u002Fdocs\u002Fcore\u002Fcontent-modeling","docs\u002F1.core\u002F2.content-modeling",[40,44,111,115,119],{"title":41,"path":42,"stem":43},"Collections and Globals","\u002Fdocs\u002Fcore\u002Fcontent-modeling\u002Fcollections-and-globals","docs\u002F1.core\u002F2.content-modeling\u002F1.collections-and-globals",{"title":45,"icon":6,"path":46,"stem":47,"children":48},"Fields","\u002Fdocs\u002Fcore\u002Fcontent-modeling\u002Ffields","docs\u002F1.core\u002F2.content-modeling\u002F2.fields\u002Findex",[49,51,55,59,63,67,71,75,79,83,87,91,95,99,103,107],{"title":50,"path":46,"stem":47},"Overview",{"title":52,"path":53,"stem":54},"Array","\u002Fdocs\u002Fcore\u002Fcontent-modeling\u002Ffields\u002Farray","docs\u002F1.core\u002F2.content-modeling\u002F2.fields\u002F01.array",{"title":56,"path":57,"stem":58},"Blocks","\u002Fdocs\u002Fcore\u002Fcontent-modeling\u002Ffields\u002Fblocks","docs\u002F1.core\u002F2.content-modeling\u002F2.fields\u002F02.blocks",{"title":60,"path":61,"stem":62},"Boolean","\u002Fdocs\u002Fcore\u002Fcontent-modeling\u002Ffields\u002Fboolean","docs\u002F1.core\u002F2.content-modeling\u002F2.fields\u002F03.boolean",{"title":64,"path":65,"stem":66},"Date","\u002Fdocs\u002Fcore\u002Fcontent-modeling\u002Ffields\u002Fdate","docs\u002F1.core\u002F2.content-modeling\u002F2.fields\u002F04.date",{"title":68,"path":69,"stem":70},"File","\u002Fdocs\u002Fcore\u002Fcontent-modeling\u002Ffields\u002Ffile","docs\u002F1.core\u002F2.content-modeling\u002F2.fields\u002F05.file",{"title":72,"path":73,"stem":74},"Group","\u002Fdocs\u002Fcore\u002Fcontent-modeling\u002Ffields\u002Fgroup","docs\u002F1.core\u002F2.content-modeling\u002F2.fields\u002F06.group",{"title":76,"path":77,"stem":78},"Image","\u002Fdocs\u002Fcore\u002Fcontent-modeling\u002Ffields\u002Fimage","docs\u002F1.core\u002F2.content-modeling\u002F2.fields\u002F07.image",{"title":80,"path":81,"stem":82},"Link","\u002Fdocs\u002Fcore\u002Fcontent-modeling\u002Ffields\u002Flink","docs\u002F1.core\u002F2.content-modeling\u002F2.fields\u002F08.link",{"title":84,"path":85,"stem":86},"Number","\u002Fdocs\u002Fcore\u002Fcontent-modeling\u002Ffields\u002Fnumber","docs\u002F1.core\u002F2.content-modeling\u002F2.fields\u002F09.number",{"title":88,"path":89,"stem":90},"Relation","\u002Fdocs\u002Fcore\u002Fcontent-modeling\u002Ffields\u002Frelation","docs\u002F1.core\u002F2.content-modeling\u002F2.fields\u002F10.relation",{"title":92,"path":93,"stem":94},"Rich text","\u002Fdocs\u002Fcore\u002Fcontent-modeling\u002Ffields\u002Frich-text","docs\u002F1.core\u002F2.content-modeling\u002F2.fields\u002F11.rich-text",{"title":96,"path":97,"stem":98},"Select","\u002Fdocs\u002Fcore\u002Fcontent-modeling\u002Ffields\u002Fselect","docs\u002F1.core\u002F2.content-modeling\u002F2.fields\u002F12.select",{"title":100,"path":101,"stem":102},"Size","\u002Fdocs\u002Fcore\u002Fcontent-modeling\u002Ffields\u002Fsize","docs\u002F1.core\u002F2.content-modeling\u002F2.fields\u002F13.size",{"title":104,"path":105,"stem":106},"Slug","\u002Fdocs\u002Fcore\u002Fcontent-modeling\u002Ffields\u002Fslug","docs\u002F1.core\u002F2.content-modeling\u002F2.fields\u002F14.slug",{"title":108,"path":109,"stem":110},"Text","\u002Fdocs\u002Fcore\u002Fcontent-modeling\u002Ffields\u002Ftext","docs\u002F1.core\u002F2.content-modeling\u002F2.fields\u002F15.text",{"title":112,"path":113,"stem":114},"Relations","\u002Fdocs\u002Fcore\u002Fcontent-modeling\u002Frelations","docs\u002F1.core\u002F2.content-modeling\u002F3.relations",{"title":116,"path":117,"stem":118},"Media","\u002Fdocs\u002Fcore\u002Fcontent-modeling\u002Fmedia","docs\u002F1.core\u002F2.content-modeling\u002F4.media",{"title":120,"icon":6,"path":121,"stem":122,"children":123},"Presets","\u002Fdocs\u002Fcore\u002Fcontent-modeling\u002Fpresets","docs\u002F1.core\u002F2.content-modeling\u002F5.presets\u002Findex",[124,125,129,133,137],{"title":50,"path":121,"stem":122},{"title":126,"path":127,"stem":128},"Menu","\u002Fdocs\u002Fcore\u002Fcontent-modeling\u002Fpresets\u002Fmenu","docs\u002F1.core\u002F2.content-modeling\u002F5.presets\u002F1.menu",{"title":130,"path":131,"stem":132},"Pages","\u002Fdocs\u002Fcore\u002Fcontent-modeling\u002Fpresets\u002Fpages","docs\u002F1.core\u002F2.content-modeling\u002F5.presets\u002F2.pages",{"title":134,"path":135,"stem":136},"Settings","\u002Fdocs\u002Fcore\u002Fcontent-modeling\u002Fpresets\u002Fsettings","docs\u002F1.core\u002F2.content-modeling\u002F5.presets\u002F3.settings",{"title":138,"path":139,"stem":140},"Strings","\u002Fdocs\u002Fcore\u002Fcontent-modeling\u002Fpresets\u002Fstrings","docs\u002F1.core\u002F2.content-modeling\u002F5.presets\u002F4.strings",{"title":142,"icon":6,"path":143,"stem":144,"children":145,"page":6},"Working with Content","\u002Fdocs\u002Fcore\u002Fworking-with-content","docs\u002F1.core\u002F3.working-with-content",[146,150,154,158,162,166,170],{"title":147,"path":148,"stem":149},"Reading","\u002Fdocs\u002Fcore\u002Fworking-with-content\u002Freading","docs\u002F1.core\u002F3.working-with-content\u002F1.reading",{"title":151,"path":152,"stem":153},"Writing and Drafts","\u002Fdocs\u002Fcore\u002Fworking-with-content\u002Fwriting","docs\u002F1.core\u002F3.working-with-content\u002F2.writing",{"title":155,"path":156,"stem":157},"Scheduled publishing","\u002Fdocs\u002Fcore\u002Fworking-with-content\u002Fscheduled-publishing","docs\u002F1.core\u002F3.working-with-content\u002F3.scheduled-publishing",{"title":159,"path":160,"stem":161},"HTTP API and Client","\u002Fdocs\u002Fcore\u002Fworking-with-content\u002Fhttp-api-and-client","docs\u002F1.core\u002F3.working-with-content\u002F4.http-api-and-client",{"title":163,"path":164,"stem":165},"Headless","\u002Fdocs\u002Fcore\u002Fworking-with-content\u002Fheadless","docs\u002F1.core\u002F3.working-with-content\u002F5.headless",{"title":167,"path":168,"stem":169},"Localization","\u002Fdocs\u002Fcore\u002Fworking-with-content\u002Flocalization","docs\u002F1.core\u002F3.working-with-content\u002F6.localization",{"title":171,"path":172,"stem":173},"Hooks","\u002Fdocs\u002Fcore\u002Fworking-with-content\u002Fhooks","docs\u002F1.core\u002F3.working-with-content\u002F7.hooks",{"title":175,"icon":6,"path":176,"stem":177,"children":178,"page":6},"Building Your Site","\u002Fdocs\u002Fcore\u002Fbuilding-your-site","docs\u002F1.core\u002F4.building-your-site",[179,183,187,191],{"title":180,"path":181,"stem":182},"Pages and SEO","\u002Fdocs\u002Fcore\u002Fbuilding-your-site\u002Fpages-and-seo","docs\u002F1.core\u002F4.building-your-site\u002F1.pages-and-seo",{"title":184,"path":185,"stem":186},"Components","\u002Fdocs\u002Fcore\u002Fbuilding-your-site\u002Fcomponents","docs\u002F1.core\u002F4.building-your-site\u002F2.components",{"title":188,"path":189,"stem":190},"Menus","\u002Fdocs\u002Fcore\u002Fbuilding-your-site\u002Fmenus","docs\u002F1.core\u002F4.building-your-site\u002F3.menus",{"title":192,"path":193,"stem":194},"Live Preview","\u002Fdocs\u002Fcore\u002Fbuilding-your-site\u002Flive-preview","docs\u002F1.core\u002F4.building-your-site\u002F4.live-preview",{"title":196,"icon":6,"path":197,"stem":198,"children":199,"page":6},"Users and Access","\u002Fdocs\u002Fcore\u002Fusers-and-access","docs\u002F1.core\u002F5.users-and-access",[200,204,208],{"title":201,"path":202,"stem":203},"Authentication","\u002Fdocs\u002Fcore\u002Fusers-and-access\u002Fauthentication","docs\u002F1.core\u002F5.users-and-access\u002F1.authentication",{"title":205,"path":206,"stem":207},"Access Control","\u002Fdocs\u002Fcore\u002Fusers-and-access\u002Faccess-control","docs\u002F1.core\u002F5.users-and-access\u002F2.access-control",{"title":209,"path":210,"stem":211},"API Keys","\u002Fdocs\u002Fcore\u002Fusers-and-access\u002Fapi-keys","docs\u002F1.core\u002F5.users-and-access\u002F3.api-keys",{"title":213,"icon":6,"path":214,"stem":215,"children":216},"Customization","\u002Fdocs\u002Fcore\u002Fcustomization","docs\u002F1.core\u002F6.customization\u002Findex",[217,218,222,226,230,234,238],{"title":50,"path":214,"stem":215},{"title":219,"path":220,"stem":221},"Admin","\u002Fdocs\u002Fcore\u002Fcustomization\u002Fadmin","docs\u002F1.core\u002F6.customization\u002F1.admin",{"title":223,"path":224,"stem":225},"Custom Fields","\u002Fdocs\u002Fcore\u002Fcustomization\u002Fcustom-fields","docs\u002F1.core\u002F6.customization\u002F2.custom-fields",{"title":227,"path":228,"stem":229},"Custom Pages and Actions","\u002Fdocs\u002Fcore\u002Fcustomization\u002Fcustom-pages-and-actions","docs\u002F1.core\u002F6.customization\u002F3.custom-pages-and-actions",{"title":231,"path":232,"stem":233},"Styles and UI Libraries","\u002Fdocs\u002Fcore\u002Fcustomization\u002Fstyles-and-ui-libraries","docs\u002F1.core\u002F6.customization\u002F4.styles-and-ui-libraries",{"title":235,"path":236,"stem":237},"Rich Text Extensions","\u002Fdocs\u002Fcore\u002Fcustomization\u002Frich-text-extensions","docs\u002F1.core\u002F6.customization\u002F5.rich-text-extensions",{"title":239,"path":240,"stem":241},"Plugins","\u002Fdocs\u002Fcore\u002Fcustomization\u002Fplugins","docs\u002F1.core\u002F6.customization\u002F6.plugins",{"title":243,"icon":6,"path":244,"stem":245,"children":246},"Operations","\u002Fdocs\u002Fcore\u002Foperations","docs\u002F1.core\u002F7.operations\u002Findex",[247,248,266,288,306,310,314],{"title":50,"path":244,"stem":245},{"title":249,"icon":6,"path":250,"stem":251,"children":252},"Email","\u002Fdocs\u002Fcore\u002Foperations\u002Femail","docs\u002F1.core\u002F7.operations\u002F1.email\u002Findex",[253,254,258,262],{"title":50,"path":250,"stem":251},{"title":255,"path":256,"stem":257},"SMTP","\u002Fdocs\u002Fcore\u002Foperations\u002Femail\u002Fsmtp","docs\u002F1.core\u002F7.operations\u002F1.email\u002F1.smtp",{"title":259,"path":260,"stem":261},"Cloudflare","\u002Fdocs\u002Fcore\u002Foperations\u002Femail\u002Fcloudflare","docs\u002F1.core\u002F7.operations\u002F1.email\u002F2.cloudflare",{"title":263,"path":264,"stem":265},"Custom adapter","\u002Fdocs\u002Fcore\u002Foperations\u002Femail\u002Fcustom-adapter","docs\u002F1.core\u002F7.operations\u002F1.email\u002F3.custom-adapter",{"title":267,"icon":6,"path":268,"stem":269,"children":270},"Jobs","\u002Fdocs\u002Fcore\u002Foperations\u002Fjobs","docs\u002F1.core\u002F7.operations\u002F2.jobs\u002Findex",[271,272,276,280,284],{"title":50,"path":268,"stem":269},{"title":273,"path":274,"stem":275},"Queue jobs","\u002Fdocs\u002Fcore\u002Foperations\u002Fjobs\u002Fqueue-jobs","docs\u002F1.core\u002F7.operations\u002F2.jobs\u002F1.queue-jobs",{"title":277,"path":278,"stem":279},"Recurring jobs","\u002Fdocs\u002Fcore\u002Foperations\u002Fjobs\u002Frecurring-jobs","docs\u002F1.core\u002F7.operations\u002F2.jobs\u002F2.recurring-jobs",{"title":281,"path":282,"stem":283},"The clock","\u002Fdocs\u002Fcore\u002Foperations\u002Fjobs\u002Fclock","docs\u002F1.core\u002F7.operations\u002F2.jobs\u002F3.clock",{"title":285,"path":286,"stem":287},"Manage jobs","\u002Fdocs\u002Fcore\u002Foperations\u002Fjobs\u002Fmanage-jobs","docs\u002F1.core\u002F7.operations\u002F2.jobs\u002F4.manage-jobs",{"title":289,"icon":6,"path":290,"stem":291,"children":292},"Webhooks","\u002Fdocs\u002Fcore\u002Foperations\u002Fwebhooks","docs\u002F1.core\u002F7.operations\u002F3.webhooks\u002Findex",[293,294,298,302],{"title":50,"path":290,"stem":291},{"title":295,"path":296,"stem":297},"Send webhooks","\u002Fdocs\u002Fcore\u002Foperations\u002Fwebhooks\u002Fsend-webhooks","docs\u002F1.core\u002F7.operations\u002F3.webhooks\u002F1.send-webhooks",{"title":299,"path":300,"stem":301},"Receive webhooks","\u002Fdocs\u002Fcore\u002Foperations\u002Fwebhooks\u002Freceive-webhooks","docs\u002F1.core\u002F7.operations\u002F3.webhooks\u002F2.receive-webhooks",{"title":303,"path":304,"stem":305},"Rebuild on publish","\u002Fdocs\u002Fcore\u002Foperations\u002Fwebhooks\u002Frebuild-on-publish","docs\u002F1.core\u002F7.operations\u002F3.webhooks\u002F3.rebuild-on-publish",{"title":307,"path":308,"stem":309},"Backup and Restore","\u002Fdocs\u002Fcore\u002Foperations\u002Fbackup-and-restore","docs\u002F1.core\u002F7.operations\u002F4.backup-and-restore",{"title":311,"path":312,"stem":313},"Lifecycle Hooks","\u002Fdocs\u002Fcore\u002Foperations\u002Flifecycle-hooks","docs\u002F1.core\u002F7.operations\u002F5.lifecycle-hooks",{"title":315,"path":316,"stem":317},"Upgrades and Schema Changes","\u002Fdocs\u002Fcore\u002Foperations\u002Fupgrades-and-schema-changes","docs\u002F1.core\u002F7.operations\u002F6.upgrades-and-schema-changes",{"title":319,"icon":6,"path":320,"stem":321,"children":322,"page":6},"Reference","\u002Fdocs\u002Fcore\u002Freference","docs\u002F1.core\u002F8.reference",[323,326,344,348],{"title":28,"path":324,"stem":325},"\u002Fdocs\u002Fcore\u002Freference\u002Fconfiguration","docs\u002F1.core\u002F8.reference\u002F1.configuration",{"title":327,"icon":6,"path":328,"stem":329,"children":330},"API","\u002Fdocs\u002Fcore\u002Freference\u002Fapi","docs\u002F1.core\u002F8.reference\u002F2.api\u002Findex",[331,332,336,340],{"title":50,"path":328,"stem":329},{"title":333,"path":334,"stem":335},"Local API","\u002Fdocs\u002Fcore\u002Freference\u002Fapi\u002Flocal-api","docs\u002F1.core\u002F8.reference\u002F2.api\u002F1.local-api",{"title":337,"path":338,"stem":339},"Client","\u002Fdocs\u002Fcore\u002Freference\u002Fapi\u002Fclient","docs\u002F1.core\u002F8.reference\u002F2.api\u002F2.client",{"title":341,"path":342,"stem":343},"HTTP routes","\u002Fdocs\u002Fcore\u002Freference\u002Fapi\u002Fhttp-routes","docs\u002F1.core\u002F8.reference\u002F2.api\u002F3.http-routes",{"title":345,"path":346,"stem":347},"Errors and types","\u002Fdocs\u002Fcore\u002Freference\u002Ferrors-and-types","docs\u002F1.core\u002F8.reference\u002F3.errors-and-types",{"title":349,"path":350,"stem":351},"Package exports","\u002Fdocs\u002Fcore\u002Freference\u002Fpackage-exports","docs\u002F1.core\u002F8.reference\u002F4.package-exports",{"title":353,"icon":6,"path":354,"stem":355,"children":356,"page":6},"Guide","\u002Fdocs\u002Fguide","docs\u002F2.guide",[357,383,400,417],{"title":358,"icon":6,"path":359,"stem":360,"children":361},"Frameworks","\u002Fdocs\u002Fguide\u002Fframeworks","docs\u002F2.guide\u002F1.frameworks\u002Findex",[362,363,367,371,375,379],{"title":50,"path":359,"stem":360},{"title":364,"path":365,"stem":366},"Astro","\u002Fdocs\u002Fguide\u002Fframeworks\u002Fastro","docs\u002F2.guide\u002F1.frameworks\u002F1.astro",{"title":368,"path":369,"stem":370},"Nuxt","\u002Fdocs\u002Fguide\u002Fframeworks\u002Fnuxt","docs\u002F2.guide\u002F1.frameworks\u002F2.nuxt",{"title":372,"path":373,"stem":374},"TanStack Start","\u002Fdocs\u002Fguide\u002Fframeworks\u002Ftanstack-start","docs\u002F2.guide\u002F1.frameworks\u002F3.tanstack-start",{"title":376,"path":377,"stem":378},"Standalone","\u002Fdocs\u002Fguide\u002Fframeworks\u002Fstandalone","docs\u002F2.guide\u002F1.frameworks\u002F4.standalone",{"title":380,"path":381,"stem":382},"Other Frameworks","\u002Fdocs\u002Fguide\u002Fframeworks\u002Fother-frameworks","docs\u002F2.guide\u002F1.frameworks\u002F5.other-frameworks",{"title":384,"icon":6,"path":385,"stem":386,"children":387},"Deployment","\u002Fdocs\u002Fguide\u002Fdeployment","docs\u002F2.guide\u002F2.deployment\u002Findex",[388,389,393,397],{"title":50,"path":385,"stem":386},{"title":390,"path":391,"stem":392},"Node","\u002Fdocs\u002Fguide\u002Fdeployment\u002Fnode","docs\u002F2.guide\u002F2.deployment\u002F1.node",{"title":394,"path":395,"stem":396},"Vercel","\u002Fdocs\u002Fguide\u002Fdeployment\u002Fvercel","docs\u002F2.guide\u002F2.deployment\u002F2.vercel",{"title":259,"path":398,"stem":399},"\u002Fdocs\u002Fguide\u002Fdeployment\u002Fcloudflare","docs\u002F2.guide\u002F2.deployment\u002F3.cloudflare",{"title":401,"icon":6,"path":402,"stem":403,"children":404,"page":6},"Databases and Storage","\u002Fdocs\u002Fguide\u002Fdatabases-and-storage","docs\u002F2.guide\u002F3.databases-and-storage",[405,409,413],{"title":406,"path":407,"stem":408},"Databases","\u002Fdocs\u002Fguide\u002Fdatabases-and-storage\u002Fdatabases","docs\u002F2.guide\u002F3.databases-and-storage\u002F1.databases",{"title":410,"path":411,"stem":412},"Media Storage","\u002Fdocs\u002Fguide\u002Fdatabases-and-storage\u002Fmedia-storage","docs\u002F2.guide\u002F3.databases-and-storage\u002F2.media-storage",{"title":414,"path":415,"stem":416},"Image Providers","\u002Fdocs\u002Fguide\u002Fdatabases-and-storage\u002Fimage-providers","docs\u002F2.guide\u002F3.databases-and-storage\u002F3.image-providers",{"title":418,"icon":6,"path":419,"stem":420,"children":421,"page":6},"Recipes","\u002Fdocs\u002Fguide\u002Frecipes","docs\u002F2.guide\u002F4.recipes",[422,426,430,434,438,442],{"title":423,"path":424,"stem":425},"Seed Content","\u002Fdocs\u002Fguide\u002Frecipes\u002Fseed-content","docs\u002F2.guide\u002F4.recipes\u002F1.seed-content",{"title":427,"path":428,"stem":429},"Tracking and Consent","\u002Fdocs\u002Fguide\u002Frecipes\u002Ftracking-and-consent","docs\u002F2.guide\u002F4.recipes\u002F2.tracking-and-consent",{"title":431,"path":432,"stem":433},"Build a Custom Field","\u002Fdocs\u002Fguide\u002Frecipes\u002Fbuild-a-custom-field","docs\u002F2.guide\u002F4.recipes\u002F3.build-a-custom-field",{"title":435,"path":436,"stem":437},"Write a Plugin","\u002Fdocs\u002Fguide\u002Frecipes\u002Fwrite-a-plugin","docs\u002F2.guide\u002F4.recipes\u002F4.write-a-plugin",{"title":439,"path":440,"stem":441},"Build a Headless Site with Next.js","\u002Fdocs\u002Fguide\u002Frecipes\u002Fbuild-a-headless-site-with-nextjs","docs\u002F2.guide\u002F4.recipes\u002F5.build-a-headless-site-with-nextjs",{"title":443,"path":444,"stem":445},"Troubleshooting","\u002Fdocs\u002Fguide\u002Frecipes\u002Ftroubleshooting","docs\u002F2.guide\u002F4.recipes\u002F6.troubleshooting",{"title":447,"icon":6,"path":448,"stem":449,"children":450,"page":6},"CLI","\u002Fdocs\u002Fcli","docs\u002F3.cli",[451,454,458,462,466,470,474],{"title":50,"path":452,"stem":453},"\u002Fdocs\u002Fcli\u002Foverview","docs\u002F3.cli\u002F1.overview",{"title":455,"path":456,"stem":457},"create-tenoncms","\u002Fdocs\u002Fcli\u002Fcreate-tenoncms","docs\u002F3.cli\u002F2.create-tenoncms",{"title":459,"path":460,"stem":461},"tenon backup","\u002Fdocs\u002Fcli\u002Fbackup","docs\u002F3.cli\u002F3.backup",{"title":463,"path":464,"stem":465},"tenon users","\u002Fdocs\u002Fcli\u002Fusers","docs\u002F3.cli\u002F4.users",{"title":467,"path":468,"stem":469},"tenon media","\u002Fdocs\u002Fcli\u002Fmedia","docs\u002F3.cli\u002F5.media",{"title":471,"path":472,"stem":473},"tenon upgrade","\u002Fdocs\u002Fcli\u002Fupgrade","docs\u002F3.cli\u002F6.upgrade",{"title":475,"path":476,"stem":477},"tenon login","\u002Fdocs\u002Fcli\u002Flogin","docs\u002F3.cli\u002F7.login",{"id":479,"title":435,"body":480,"description":2933,"extension":2934,"links":2935,"meta":2936,"navigation":596,"path":436,"seo":2937,"stem":437,"__hash__":2938},"docs\u002Fdocs\u002F2.guide\u002F4.recipes\u002F4.write-a-plugin.md",{"type":481,"value":482,"toc":2918},"minimark",[483,487,492,511,515,523,1344,1358,1362,1373,1377,1387,2593,2607,2690,2703,2709,2726,2839,2868,2874,2878,2915],[484,485,486],"p",{},"A plugin keeps one feature in one place: its collections, hooks, routes and admin pieces. This recipe writes a small plugin in your project, then shows what else a plugin can define and how to publish one on npm.",[488,489,491],"h2",{"id":490},"before-you-start","Before you start",[493,494,495,503],"ul",{},[496,497,498,499,502],"li",{},"Read ",[500,501,239],"a",{"href":240}," for how a site uses a plugin.",[496,504,505,506,510],{},"The ",[500,507,509],{"href":508},"\u002Fdocs\u002Fcore\u002Fcustomization\u002Fplugins#the-example-plugin","example plugin"," uses every option once. Its source is a good model to copy.",[488,512,514],{"id":513},"a-first-plugin","A first plugin",[484,516,517,518,522],{},"This plugin adds an ",[519,520,521],"code",{},"announcements"," collection and a public route that returns the active announcement.",[524,525,527,532,539,972,997,1001,1099,1107,1111,1114,1171,1174,1210,1214,1221,1341],"steps",{"level":526},"3",[528,529,531],"h3",{"id":530},"define-the-plugin","Define the plugin",[484,533,534,535,538],{},"A plugin is a function that returns ",[519,536,537],{},"definePlugin()",". The function takes the plugin's options:",[540,541,547],"pre",{"className":542,"code":543,"filename":544,"language":545,"meta":546,"style":546},"language-ts shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","import { defineCollection, definePlugin } from \"tenoncms\";\n\nexport function AnnouncementsPlugin() {\n  return definePlugin({\n    name: \"announcements\",\n    collections: {\n      announcements: defineCollection({\n        titleField: \"text\",\n        fields: {\n          text: { type: \"text\", required: true },\n          active: { type: \"boolean\" },\n        },\n      }),\n    },\n    publicRoutes: (api) =>\n      api.get(\"\u002Fcurrent\", async (c) => {\n        const current = await c.var.cms.findOne(\"announcements\", { where: { active: true } });\n        return current ? c.json(current) : c.notFound();\n      }),\n  });\n}\n","cms\u002Fplugins\u002Fannouncements.ts","ts","",[519,548,549,591,598,618,633,651,661,675,692,702,737,760,766,777,783,803,841,908,947,956,966],{"__ignoreMap":546},[550,551,554,558,562,566,569,572,575,578,581,585,588],"span",{"class":552,"line":553},"line",1,[550,555,557],{"class":556},"s7zQu","import",[550,559,561],{"class":560},"sMK4o"," {",[550,563,565],{"class":564},"sTEyZ"," defineCollection",[550,567,568],{"class":560},",",[550,570,571],{"class":564}," definePlugin",[550,573,574],{"class":560}," }",[550,576,577],{"class":556}," from",[550,579,580],{"class":560}," \"",[550,582,584],{"class":583},"sfazB","tenoncms",[550,586,587],{"class":560},"\"",[550,589,590],{"class":560},";\n",[550,592,594],{"class":552,"line":593},2,[550,595,597],{"emptyLinePlaceholder":596},true,"\n",[550,599,601,604,608,612,615],{"class":552,"line":600},3,[550,602,603],{"class":556},"export",[550,605,607],{"class":606},"spNyl"," function",[550,609,611],{"class":610},"s2Zo4"," AnnouncementsPlugin",[550,613,614],{"class":560},"()",[550,616,617],{"class":560}," {\n",[550,619,621,624,626,630],{"class":552,"line":620},4,[550,622,623],{"class":556},"  return",[550,625,571],{"class":610},[550,627,629],{"class":628},"swJcz","(",[550,631,632],{"class":560},"{\n",[550,634,636,639,642,644,646,648],{"class":552,"line":635},5,[550,637,638],{"class":628},"    name",[550,640,641],{"class":560},":",[550,643,580],{"class":560},[550,645,521],{"class":583},[550,647,587],{"class":560},[550,649,650],{"class":560},",\n",[550,652,654,657,659],{"class":552,"line":653},6,[550,655,656],{"class":628},"    collections",[550,658,641],{"class":560},[550,660,617],{"class":560},[550,662,664,667,669,671,673],{"class":552,"line":663},7,[550,665,666],{"class":628},"      announcements",[550,668,641],{"class":560},[550,670,565],{"class":610},[550,672,629],{"class":628},[550,674,632],{"class":560},[550,676,678,681,683,685,688,690],{"class":552,"line":677},8,[550,679,680],{"class":628},"        titleField",[550,682,641],{"class":560},[550,684,580],{"class":560},[550,686,687],{"class":583},"text",[550,689,587],{"class":560},[550,691,650],{"class":560},[550,693,695,698,700],{"class":552,"line":694},9,[550,696,697],{"class":628},"        fields",[550,699,641],{"class":560},[550,701,617],{"class":560},[550,703,705,708,710,712,715,717,719,721,723,725,728,730,734],{"class":552,"line":704},10,[550,706,707],{"class":628},"          text",[550,709,641],{"class":560},[550,711,561],{"class":560},[550,713,714],{"class":628}," type",[550,716,641],{"class":560},[550,718,580],{"class":560},[550,720,687],{"class":583},[550,722,587],{"class":560},[550,724,568],{"class":560},[550,726,727],{"class":628}," required",[550,729,641],{"class":560},[550,731,733],{"class":732},"sfNiH"," true",[550,735,736],{"class":560}," },\n",[550,738,740,743,745,747,749,751,753,756,758],{"class":552,"line":739},11,[550,741,742],{"class":628},"          active",[550,744,641],{"class":560},[550,746,561],{"class":560},[550,748,714],{"class":628},[550,750,641],{"class":560},[550,752,580],{"class":560},[550,754,755],{"class":583},"boolean",[550,757,587],{"class":560},[550,759,736],{"class":560},[550,761,763],{"class":552,"line":762},12,[550,764,765],{"class":560},"        },\n",[550,767,769,772,775],{"class":552,"line":768},13,[550,770,771],{"class":560},"      }",[550,773,774],{"class":628},")",[550,776,650],{"class":560},[550,778,780],{"class":552,"line":779},14,[550,781,782],{"class":560},"    },\n",[550,784,786,789,791,794,798,800],{"class":552,"line":785},15,[550,787,788],{"class":610},"    publicRoutes",[550,790,641],{"class":560},[550,792,793],{"class":560}," (",[550,795,797],{"class":796},"sHdIc","api",[550,799,774],{"class":560},[550,801,802],{"class":606}," =>\n",[550,804,806,809,812,815,817,819,822,824,826,829,831,834,836,839],{"class":552,"line":805},16,[550,807,808],{"class":564},"      api",[550,810,811],{"class":560},".",[550,813,814],{"class":610},"get",[550,816,629],{"class":628},[550,818,587],{"class":560},[550,820,821],{"class":583},"\u002Fcurrent",[550,823,587],{"class":560},[550,825,568],{"class":560},[550,827,828],{"class":606}," async",[550,830,793],{"class":560},[550,832,833],{"class":796},"c",[550,835,774],{"class":560},[550,837,838],{"class":606}," =>",[550,840,617],{"class":560},[550,842,844,847,850,853,856,859,861,864,866,869,871,874,876,878,880,882,884,886,889,891,893,896,898,900,902,904,906],{"class":552,"line":843},17,[550,845,846],{"class":606},"        const",[550,848,849],{"class":564}," current",[550,851,852],{"class":560}," =",[550,854,855],{"class":556}," await",[550,857,858],{"class":564}," c",[550,860,811],{"class":560},[550,862,863],{"class":564},"var",[550,865,811],{"class":560},[550,867,868],{"class":564},"cms",[550,870,811],{"class":560},[550,872,873],{"class":610},"findOne",[550,875,629],{"class":628},[550,877,587],{"class":560},[550,879,521],{"class":583},[550,881,587],{"class":560},[550,883,568],{"class":560},[550,885,561],{"class":560},[550,887,888],{"class":628}," where",[550,890,641],{"class":560},[550,892,561],{"class":560},[550,894,895],{"class":628}," active",[550,897,641],{"class":560},[550,899,733],{"class":732},[550,901,574],{"class":560},[550,903,574],{"class":560},[550,905,774],{"class":628},[550,907,590],{"class":560},[550,909,911,914,916,919,921,923,926,928,931,934,936,938,940,943,945],{"class":552,"line":910},18,[550,912,913],{"class":556},"        return",[550,915,849],{"class":564},[550,917,918],{"class":560}," ?",[550,920,858],{"class":564},[550,922,811],{"class":560},[550,924,925],{"class":610},"json",[550,927,629],{"class":628},[550,929,930],{"class":564},"current",[550,932,933],{"class":628},") ",[550,935,641],{"class":560},[550,937,858],{"class":564},[550,939,811],{"class":560},[550,941,942],{"class":610},"notFound",[550,944,614],{"class":628},[550,946,590],{"class":560},[550,948,950,952,954],{"class":552,"line":949},19,[550,951,771],{"class":560},[550,953,774],{"class":628},[550,955,650],{"class":560},[550,957,959,962,964],{"class":552,"line":958},20,[550,960,961],{"class":560},"  }",[550,963,774],{"class":628},[550,965,590],{"class":560},[550,967,969],{"class":552,"line":968},21,[550,970,971],{"class":560},"}\n",[493,973,974,987],{},[496,975,976,979,980,983,984,811],{},[519,977,978],{},"name"," is lowercase letters, digits and ",[519,981,982],{},"-",". It prefixes the routes: this one answers at ",[519,985,986],{},"\u002F_tenon\u002Fannouncements\u002Fcurrent",[496,988,989,992,993,996],{},[519,990,991],{},"publicRoutes"," run without a session, so ",[519,994,995],{},"c.var.cms"," has no user, and the access rules deny writes.",[528,998,1000],{"id":999},"add-it-to-the-config","Add it to the config",[540,1002,1005],{"className":542,"code":1003,"filename":1004,"language":545,"meta":546,"style":546},"import { defineCms } from \"tenoncms\";\nimport { AnnouncementsPlugin } from \".\u002Fcms\u002Fplugins\u002Fannouncements\";\n\nexport default defineCms({\n  \u002F\u002F ...\n  plugins: [AnnouncementsPlugin()],\n});\n","tenon.config.ts",[519,1006,1007,1028,1049,1053,1066,1072,1090],{"__ignoreMap":546},[550,1008,1009,1011,1013,1016,1018,1020,1022,1024,1026],{"class":552,"line":553},[550,1010,557],{"class":556},[550,1012,561],{"class":560},[550,1014,1015],{"class":564}," defineCms",[550,1017,574],{"class":560},[550,1019,577],{"class":556},[550,1021,580],{"class":560},[550,1023,584],{"class":583},[550,1025,587],{"class":560},[550,1027,590],{"class":560},[550,1029,1030,1032,1034,1036,1038,1040,1042,1045,1047],{"class":552,"line":593},[550,1031,557],{"class":556},[550,1033,561],{"class":560},[550,1035,611],{"class":564},[550,1037,574],{"class":560},[550,1039,577],{"class":556},[550,1041,580],{"class":560},[550,1043,1044],{"class":583},".\u002Fcms\u002Fplugins\u002Fannouncements",[550,1046,587],{"class":560},[550,1048,590],{"class":560},[550,1050,1051],{"class":552,"line":600},[550,1052,597],{"emptyLinePlaceholder":596},[550,1054,1055,1057,1060,1062,1064],{"class":552,"line":620},[550,1056,603],{"class":556},[550,1058,1059],{"class":556}," default",[550,1061,1015],{"class":610},[550,1063,629],{"class":564},[550,1065,632],{"class":560},[550,1067,1068],{"class":552,"line":635},[550,1069,1071],{"class":1070},"sHwdD","  \u002F\u002F ...\n",[550,1073,1074,1077,1079,1082,1085,1088],{"class":552,"line":653},[550,1075,1076],{"class":628},"  plugins",[550,1078,641],{"class":560},[550,1080,1081],{"class":564}," [",[550,1083,1084],{"class":610},"AnnouncementsPlugin",[550,1086,1087],{"class":564},"()]",[550,1089,650],{"class":560},[550,1091,1092,1095,1097],{"class":552,"line":663},[550,1093,1094],{"class":560},"}",[550,1096,774],{"class":564},[550,1098,590],{"class":560},[484,1100,1101,1102,1106],{},"Start the dev server. The admin lists ",[1103,1104,1105],"strong",{},"Announcements"," in the sidebar.",[528,1108,1110],{"id":1109},"read-it","Read it",[484,1112,1113],{},"The collection is typed like your own, so server code reads it directly:",[540,1115,1117],{"className":542,"code":1116,"language":545,"meta":546,"style":546},"const current = await cms.findOne(\"announcements\", { where: { active: true } });\n",[519,1118,1119],{"__ignoreMap":546},[550,1120,1121,1124,1127,1130,1132,1135,1137,1139,1141,1143,1145,1147,1149,1151,1153,1155,1157,1159,1161,1163,1165,1167,1169],{"class":552,"line":553},[550,1122,1123],{"class":606},"const",[550,1125,1126],{"class":564}," current ",[550,1128,1129],{"class":560},"=",[550,1131,855],{"class":556},[550,1133,1134],{"class":564}," cms",[550,1136,811],{"class":560},[550,1138,873],{"class":610},[550,1140,629],{"class":564},[550,1142,587],{"class":560},[550,1144,521],{"class":583},[550,1146,587],{"class":560},[550,1148,568],{"class":560},[550,1150,561],{"class":560},[550,1152,888],{"class":628},[550,1154,641],{"class":560},[550,1156,561],{"class":560},[550,1158,895],{"class":628},[550,1160,641],{"class":560},[550,1162,733],{"class":732},[550,1164,574],{"class":560},[550,1166,574],{"class":560},[550,1168,774],{"class":564},[550,1170,590],{"class":560},[484,1172,1173],{},"A site on another origin calls the route:",[540,1175,1177],{"className":542,"code":1176,"language":545,"meta":546,"style":546},"const current = await client.request(\"\u002Fannouncements\u002Fcurrent\");\n",[519,1178,1179],{"__ignoreMap":546},[550,1180,1181,1183,1185,1187,1189,1192,1194,1197,1199,1201,1204,1206,1208],{"class":552,"line":553},[550,1182,1123],{"class":606},[550,1184,1126],{"class":564},[550,1186,1129],{"class":560},[550,1188,855],{"class":556},[550,1190,1191],{"class":564}," client",[550,1193,811],{"class":560},[550,1195,1196],{"class":610},"request",[550,1198,629],{"class":564},[550,1200,587],{"class":560},[550,1202,1203],{"class":583},"\u002Fannouncements\u002Fcurrent",[550,1205,587],{"class":560},[550,1207,774],{"class":564},[550,1209,590],{"class":560},[528,1211,1213],{"id":1212},"install-a-default","Install a default",[484,1215,1216,1217,1220],{},"A plugin's ",[519,1218,1219],{},"seed"," runs the first time the plugin starts on a database, also on one that has content. Use it to install defaults:",[540,1222,1224],{"className":542,"code":1223,"filename":544,"language":545,"meta":546,"style":546},"return definePlugin({\n  name: \"announcements\",\n  \u002F\u002F ...\n  seed: async ({ cms }) => {\n    await cms.create(\"announcements\", { text: \"Welcome to the new site\", active: false });\n  },\n});\n",[519,1225,1226,1237,1252,1256,1277,1328,1333],{"__ignoreMap":546},[550,1227,1228,1231,1233,1235],{"class":552,"line":553},[550,1229,1230],{"class":556},"return",[550,1232,571],{"class":610},[550,1234,629],{"class":564},[550,1236,632],{"class":560},[550,1238,1239,1242,1244,1246,1248,1250],{"class":552,"line":593},[550,1240,1241],{"class":628},"  name",[550,1243,641],{"class":560},[550,1245,580],{"class":560},[550,1247,521],{"class":583},[550,1249,587],{"class":560},[550,1251,650],{"class":560},[550,1253,1254],{"class":552,"line":600},[550,1255,1071],{"class":1070},[550,1257,1258,1261,1263,1265,1268,1270,1273,1275],{"class":552,"line":620},[550,1259,1260],{"class":610},"  seed",[550,1262,641],{"class":560},[550,1264,828],{"class":606},[550,1266,1267],{"class":560}," ({",[550,1269,1134],{"class":796},[550,1271,1272],{"class":560}," })",[550,1274,838],{"class":606},[550,1276,617],{"class":560},[550,1278,1279,1282,1284,1286,1289,1291,1293,1295,1297,1299,1301,1304,1306,1308,1311,1313,1315,1317,1319,1322,1324,1326],{"class":552,"line":635},[550,1280,1281],{"class":556},"    await",[550,1283,1134],{"class":564},[550,1285,811],{"class":560},[550,1287,1288],{"class":610},"create",[550,1290,629],{"class":628},[550,1292,587],{"class":560},[550,1294,521],{"class":583},[550,1296,587],{"class":560},[550,1298,568],{"class":560},[550,1300,561],{"class":560},[550,1302,1303],{"class":628}," text",[550,1305,641],{"class":560},[550,1307,580],{"class":560},[550,1309,1310],{"class":583},"Welcome to the new site",[550,1312,587],{"class":560},[550,1314,568],{"class":560},[550,1316,895],{"class":628},[550,1318,641],{"class":560},[550,1320,1321],{"class":732}," false",[550,1323,574],{"class":560},[550,1325,774],{"class":628},[550,1327,590],{"class":560},[550,1329,1330],{"class":552,"line":653},[550,1331,1332],{"class":560},"  },\n",[550,1334,1335,1337,1339],{"class":552,"line":663},[550,1336,1094],{"class":560},[550,1338,774],{"class":564},[550,1340,590],{"class":560},[484,1342,1343],{},"A plugin that is removed and added again does not seed again.",[484,1345,1346,1347,1350,1351,1354,1355,811],{},"To add an input, a page or an admin bar item, import browser code from a ",[519,1348,1349],{},".client.ts"," module, as in your own config. See ",[500,1352,1353],{"href":224},"Custom fields"," and ",[500,1356,1357],{"href":432},"Build a custom field",[488,1359,1361],{"id":1360},"what-a-plugin-can-define","What a plugin can define",[484,1363,1364,1365,1368,1369,1372],{},"A plugin's additions merge before yours, in the order of ",[519,1366,1367],{},"plugins",". See ",[500,1370,239],{"href":1371},"\u002Fdocs\u002Fcore\u002Fcustomization\u002Fplugins#what-a-plugin-can-define"," for a more information.",[488,1374,1376],{"id":1375},"publish-it","Publish it",[484,1378,1379,1380,1382,1383,1386],{},"A plugin on npm is an ordinary package with two halves: the server half from ",[519,1381,537],{},", and the browser half behind its ",[519,1384,1385],{},"clientRef()"," calls.",[1388,1389,1391,1661,1888,2009,2143],"code-tree",{"default-value":1390},"package.json",[540,1392,1395],{"className":1393,"code":1394,"filename":1390,"language":925,"meta":546,"style":546},"language-json shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","{\n  \"name\": \"cms-plugin-quotes\",\n  \"type\": \"module\",\n  \"exports\": {\n    \".\": { \"types\": \".\u002Fdist\u002Findex.d.mts\", \"default\": \".\u002Fdist\u002Findex.mjs\" },\n    \".\u002Fadmin\": { \"types\": \".\u002Fdist\u002Fadmin\u002Findex.d.mts\", \"default\": \".\u002Fdist\u002Fadmin\u002Findex.mjs\" },\n    \".\u002Fadmin\u002Fbar\": { \"types\": \".\u002Fdist\u002Fadmin\u002Fbar.d.mts\", \"default\": \".\u002Fdist\u002Fadmin\u002Fbar.mjs\" }\n  },\n  \"files\": [\"dist\"],\n  \"peerDependencies\": { \"tenoncms\": \"^0.28.0\" }\n}\n",[519,1396,1397,1401,1421,1441,1454,1505,1552,1600,1604,1627,1657],{"__ignoreMap":546},[550,1398,1399],{"class":552,"line":553},[550,1400,632],{"class":560},[550,1402,1403,1406,1408,1410,1412,1414,1417,1419],{"class":552,"line":593},[550,1404,1405],{"class":560},"  \"",[550,1407,978],{"class":606},[550,1409,587],{"class":560},[550,1411,641],{"class":560},[550,1413,580],{"class":560},[550,1415,1416],{"class":583},"cms-plugin-quotes",[550,1418,587],{"class":560},[550,1420,650],{"class":560},[550,1422,1423,1425,1428,1430,1432,1434,1437,1439],{"class":552,"line":600},[550,1424,1405],{"class":560},[550,1426,1427],{"class":606},"type",[550,1429,587],{"class":560},[550,1431,641],{"class":560},[550,1433,580],{"class":560},[550,1435,1436],{"class":583},"module",[550,1438,587],{"class":560},[550,1440,650],{"class":560},[550,1442,1443,1445,1448,1450,1452],{"class":552,"line":620},[550,1444,1405],{"class":560},[550,1446,1447],{"class":606},"exports",[550,1449,587],{"class":560},[550,1451,641],{"class":560},[550,1453,617],{"class":560},[550,1455,1456,1459,1462,1464,1466,1468,1470,1474,1476,1478,1480,1483,1485,1487,1489,1492,1494,1496,1498,1501,1503],{"class":552,"line":635},[550,1457,1458],{"class":560},"    \"",[550,1460,811],{"class":1461},"sBMFI",[550,1463,587],{"class":560},[550,1465,641],{"class":560},[550,1467,561],{"class":560},[550,1469,580],{"class":560},[550,1471,1473],{"class":1472},"sbssI","types",[550,1475,587],{"class":560},[550,1477,641],{"class":560},[550,1479,580],{"class":560},[550,1481,1482],{"class":583},".\u002Fdist\u002Findex.d.mts",[550,1484,587],{"class":560},[550,1486,568],{"class":560},[550,1488,580],{"class":560},[550,1490,1491],{"class":1472},"default",[550,1493,587],{"class":560},[550,1495,641],{"class":560},[550,1497,580],{"class":560},[550,1499,1500],{"class":583},".\u002Fdist\u002Findex.mjs",[550,1502,587],{"class":560},[550,1504,736],{"class":560},[550,1506,1507,1509,1512,1514,1516,1518,1520,1522,1524,1526,1528,1531,1533,1535,1537,1539,1541,1543,1545,1548,1550],{"class":552,"line":653},[550,1508,1458],{"class":560},[550,1510,1511],{"class":1461},".\u002Fadmin",[550,1513,587],{"class":560},[550,1515,641],{"class":560},[550,1517,561],{"class":560},[550,1519,580],{"class":560},[550,1521,1473],{"class":1472},[550,1523,587],{"class":560},[550,1525,641],{"class":560},[550,1527,580],{"class":560},[550,1529,1530],{"class":583},".\u002Fdist\u002Fadmin\u002Findex.d.mts",[550,1532,587],{"class":560},[550,1534,568],{"class":560},[550,1536,580],{"class":560},[550,1538,1491],{"class":1472},[550,1540,587],{"class":560},[550,1542,641],{"class":560},[550,1544,580],{"class":560},[550,1546,1547],{"class":583},".\u002Fdist\u002Fadmin\u002Findex.mjs",[550,1549,587],{"class":560},[550,1551,736],{"class":560},[550,1553,1554,1556,1559,1561,1563,1565,1567,1569,1571,1573,1575,1578,1580,1582,1584,1586,1588,1590,1592,1595,1597],{"class":552,"line":663},[550,1555,1458],{"class":560},[550,1557,1558],{"class":1461},".\u002Fadmin\u002Fbar",[550,1560,587],{"class":560},[550,1562,641],{"class":560},[550,1564,561],{"class":560},[550,1566,580],{"class":560},[550,1568,1473],{"class":1472},[550,1570,587],{"class":560},[550,1572,641],{"class":560},[550,1574,580],{"class":560},[550,1576,1577],{"class":583},".\u002Fdist\u002Fadmin\u002Fbar.d.mts",[550,1579,587],{"class":560},[550,1581,568],{"class":560},[550,1583,580],{"class":560},[550,1585,1491],{"class":1472},[550,1587,587],{"class":560},[550,1589,641],{"class":560},[550,1591,580],{"class":560},[550,1593,1594],{"class":583},".\u002Fdist\u002Fadmin\u002Fbar.mjs",[550,1596,587],{"class":560},[550,1598,1599],{"class":560}," }\n",[550,1601,1602],{"class":552,"line":677},[550,1603,1332],{"class":560},[550,1605,1606,1608,1611,1613,1615,1617,1619,1622,1624],{"class":552,"line":694},[550,1607,1405],{"class":560},[550,1609,1610],{"class":606},"files",[550,1612,587],{"class":560},[550,1614,641],{"class":560},[550,1616,1081],{"class":560},[550,1618,587],{"class":560},[550,1620,1621],{"class":583},"dist",[550,1623,587],{"class":560},[550,1625,1626],{"class":560},"],\n",[550,1628,1629,1631,1634,1636,1638,1640,1642,1644,1646,1648,1650,1653,1655],{"class":552,"line":704},[550,1630,1405],{"class":560},[550,1632,1633],{"class":606},"peerDependencies",[550,1635,587],{"class":560},[550,1637,641],{"class":560},[550,1639,561],{"class":560},[550,1641,580],{"class":560},[550,1643,584],{"class":1461},[550,1645,587],{"class":560},[550,1647,641],{"class":560},[550,1649,580],{"class":560},[550,1651,1652],{"class":583},"^0.28.0",[550,1654,587],{"class":560},[550,1656,1599],{"class":560},[550,1658,1659],{"class":552,"line":739},[550,1660,971],{"class":560},[540,1662,1665],{"className":542,"code":1663,"filename":1664,"language":545,"meta":546,"style":546},"import { clientRef } from \"tenoncms\u002Fadmin\";\nimport { definePlugin } from \"tenoncms\";\n\nexport function QuotesPlugin() {\n  return definePlugin({\n    name: \"quotes\",\n    admin: {\n      pages: {\n        stats: { mount: clientRef(\"cms-plugin-quotes\u002Fadmin#mountStats\") },\n      },\n      adminBar: {\n        items: {\n          count: { label: \"Quotes\", mount: clientRef(\"cms-plugin-quotes\u002Fadmin\u002Fbar#mountCount\") },\n        },\n      },\n    },\n  });\n}\n","src\u002Findex.ts",[519,1666,1667,1689,1709,1713,1726,1736,1751,1760,1769,1799,1804,1813,1822,1864,1868,1872,1876,1884],{"__ignoreMap":546},[550,1668,1669,1671,1673,1676,1678,1680,1682,1685,1687],{"class":552,"line":553},[550,1670,557],{"class":556},[550,1672,561],{"class":560},[550,1674,1675],{"class":564}," clientRef",[550,1677,574],{"class":560},[550,1679,577],{"class":556},[550,1681,580],{"class":560},[550,1683,1684],{"class":583},"tenoncms\u002Fadmin",[550,1686,587],{"class":560},[550,1688,590],{"class":560},[550,1690,1691,1693,1695,1697,1699,1701,1703,1705,1707],{"class":552,"line":593},[550,1692,557],{"class":556},[550,1694,561],{"class":560},[550,1696,571],{"class":564},[550,1698,574],{"class":560},[550,1700,577],{"class":556},[550,1702,580],{"class":560},[550,1704,584],{"class":583},[550,1706,587],{"class":560},[550,1708,590],{"class":560},[550,1710,1711],{"class":552,"line":600},[550,1712,597],{"emptyLinePlaceholder":596},[550,1714,1715,1717,1719,1722,1724],{"class":552,"line":620},[550,1716,603],{"class":556},[550,1718,607],{"class":606},[550,1720,1721],{"class":610}," QuotesPlugin",[550,1723,614],{"class":560},[550,1725,617],{"class":560},[550,1727,1728,1730,1732,1734],{"class":552,"line":635},[550,1729,623],{"class":556},[550,1731,571],{"class":610},[550,1733,629],{"class":628},[550,1735,632],{"class":560},[550,1737,1738,1740,1742,1744,1747,1749],{"class":552,"line":653},[550,1739,638],{"class":628},[550,1741,641],{"class":560},[550,1743,580],{"class":560},[550,1745,1746],{"class":583},"quotes",[550,1748,587],{"class":560},[550,1750,650],{"class":560},[550,1752,1753,1756,1758],{"class":552,"line":663},[550,1754,1755],{"class":628},"    admin",[550,1757,641],{"class":560},[550,1759,617],{"class":560},[550,1761,1762,1765,1767],{"class":552,"line":677},[550,1763,1764],{"class":628},"      pages",[550,1766,641],{"class":560},[550,1768,617],{"class":560},[550,1770,1771,1774,1776,1778,1781,1783,1785,1787,1789,1792,1794,1796],{"class":552,"line":694},[550,1772,1773],{"class":628},"        stats",[550,1775,641],{"class":560},[550,1777,561],{"class":560},[550,1779,1780],{"class":628}," mount",[550,1782,641],{"class":560},[550,1784,1675],{"class":610},[550,1786,629],{"class":628},[550,1788,587],{"class":560},[550,1790,1791],{"class":583},"cms-plugin-quotes\u002Fadmin#mountStats",[550,1793,587],{"class":560},[550,1795,933],{"class":628},[550,1797,1798],{"class":560},"},\n",[550,1800,1801],{"class":552,"line":704},[550,1802,1803],{"class":560},"      },\n",[550,1805,1806,1809,1811],{"class":552,"line":739},[550,1807,1808],{"class":628},"      adminBar",[550,1810,641],{"class":560},[550,1812,617],{"class":560},[550,1814,1815,1818,1820],{"class":552,"line":762},[550,1816,1817],{"class":628},"        items",[550,1819,641],{"class":560},[550,1821,617],{"class":560},[550,1823,1824,1827,1829,1831,1834,1836,1838,1841,1843,1845,1847,1849,1851,1853,1855,1858,1860,1862],{"class":552,"line":768},[550,1825,1826],{"class":628},"          count",[550,1828,641],{"class":560},[550,1830,561],{"class":560},[550,1832,1833],{"class":628}," label",[550,1835,641],{"class":560},[550,1837,580],{"class":560},[550,1839,1840],{"class":583},"Quotes",[550,1842,587],{"class":560},[550,1844,568],{"class":560},[550,1846,1780],{"class":628},[550,1848,641],{"class":560},[550,1850,1675],{"class":610},[550,1852,629],{"class":628},[550,1854,587],{"class":560},[550,1856,1857],{"class":583},"cms-plugin-quotes\u002Fadmin\u002Fbar#mountCount",[550,1859,587],{"class":560},[550,1861,933],{"class":628},[550,1863,1798],{"class":560},[550,1865,1866],{"class":552,"line":779},[550,1867,765],{"class":560},[550,1869,1870],{"class":552,"line":785},[550,1871,1803],{"class":560},[550,1873,1874],{"class":552,"line":805},[550,1875,782],{"class":560},[550,1877,1878,1880,1882],{"class":552,"line":843},[550,1879,961],{"class":560},[550,1881,774],{"class":628},[550,1883,590],{"class":560},[550,1885,1886],{"class":552,"line":910},[550,1887,971],{"class":560},[540,1889,1892],{"className":542,"code":1890,"filename":1891,"language":545,"meta":546,"style":546},"import type { Mount, PageContext } from \"tenoncms\u002Fadmin\";\n\nexport const mountStats: Mount\u003CPageContext> = (el) => {\n  el.textContent = \"Quote statistics\";\n  return () => el.replaceChildren();\n};\n","src\u002Fadmin\u002Findex.ts",[519,1893,1894,1922,1926,1962,1983,2004],{"__ignoreMap":546},[550,1895,1896,1898,1900,1902,1905,1907,1910,1912,1914,1916,1918,1920],{"class":552,"line":553},[550,1897,557],{"class":556},[550,1899,714],{"class":556},[550,1901,561],{"class":560},[550,1903,1904],{"class":564}," Mount",[550,1906,568],{"class":560},[550,1908,1909],{"class":564}," PageContext",[550,1911,574],{"class":560},[550,1913,577],{"class":556},[550,1915,580],{"class":560},[550,1917,1684],{"class":583},[550,1919,587],{"class":560},[550,1921,590],{"class":560},[550,1923,1924],{"class":552,"line":593},[550,1925,597],{"emptyLinePlaceholder":596},[550,1927,1928,1930,1933,1936,1938,1940,1943,1946,1949,1951,1953,1956,1958,1960],{"class":552,"line":600},[550,1929,603],{"class":556},[550,1931,1932],{"class":606}," const",[550,1934,1935],{"class":564}," mountStats",[550,1937,641],{"class":560},[550,1939,1904],{"class":1461},[550,1941,1942],{"class":560},"\u003C",[550,1944,1945],{"class":1461},"PageContext",[550,1947,1948],{"class":560},">",[550,1950,852],{"class":560},[550,1952,793],{"class":560},[550,1954,1955],{"class":796},"el",[550,1957,774],{"class":560},[550,1959,838],{"class":606},[550,1961,617],{"class":560},[550,1963,1964,1967,1969,1972,1974,1976,1979,1981],{"class":552,"line":620},[550,1965,1966],{"class":564},"  el",[550,1968,811],{"class":560},[550,1970,1971],{"class":564},"textContent",[550,1973,852],{"class":560},[550,1975,580],{"class":560},[550,1977,1978],{"class":583},"Quote statistics",[550,1980,587],{"class":560},[550,1982,590],{"class":560},[550,1984,1985,1987,1990,1992,1995,1997,2000,2002],{"class":552,"line":635},[550,1986,623],{"class":556},[550,1988,1989],{"class":560}," ()",[550,1991,838],{"class":606},[550,1993,1994],{"class":564}," el",[550,1996,811],{"class":560},[550,1998,1999],{"class":610},"replaceChildren",[550,2001,614],{"class":628},[550,2003,590],{"class":560},[550,2005,2006],{"class":552,"line":653},[550,2007,2008],{"class":560},"};\n",[540,2010,2013],{"className":542,"code":2011,"filename":2012,"language":545,"meta":546,"style":546},"import type { AdminBarItemContext, Mount } from \"tenoncms\u002Fadmin\";\n\nexport const mountCount: Mount\u003CAdminBarItemContext> = (el) => {\n  el.textContent = \"Quotes\";\n  el.style.fontWeight = \"600\";\n  return () => el.replaceChildren();\n};\n","src\u002Fadmin\u002Fbar.ts",[519,2014,2015,2042,2046,2078,2096,2121,2139],{"__ignoreMap":546},[550,2016,2017,2019,2021,2023,2026,2028,2030,2032,2034,2036,2038,2040],{"class":552,"line":553},[550,2018,557],{"class":556},[550,2020,714],{"class":556},[550,2022,561],{"class":560},[550,2024,2025],{"class":564}," AdminBarItemContext",[550,2027,568],{"class":560},[550,2029,1904],{"class":564},[550,2031,574],{"class":560},[550,2033,577],{"class":556},[550,2035,580],{"class":560},[550,2037,1684],{"class":583},[550,2039,587],{"class":560},[550,2041,590],{"class":560},[550,2043,2044],{"class":552,"line":593},[550,2045,597],{"emptyLinePlaceholder":596},[550,2047,2048,2050,2052,2055,2057,2059,2061,2064,2066,2068,2070,2072,2074,2076],{"class":552,"line":600},[550,2049,603],{"class":556},[550,2051,1932],{"class":606},[550,2053,2054],{"class":564}," mountCount",[550,2056,641],{"class":560},[550,2058,1904],{"class":1461},[550,2060,1942],{"class":560},[550,2062,2063],{"class":1461},"AdminBarItemContext",[550,2065,1948],{"class":560},[550,2067,852],{"class":560},[550,2069,793],{"class":560},[550,2071,1955],{"class":796},[550,2073,774],{"class":560},[550,2075,838],{"class":606},[550,2077,617],{"class":560},[550,2079,2080,2082,2084,2086,2088,2090,2092,2094],{"class":552,"line":620},[550,2081,1966],{"class":564},[550,2083,811],{"class":560},[550,2085,1971],{"class":564},[550,2087,852],{"class":560},[550,2089,580],{"class":560},[550,2091,1840],{"class":583},[550,2093,587],{"class":560},[550,2095,590],{"class":560},[550,2097,2098,2100,2102,2105,2107,2110,2112,2114,2117,2119],{"class":552,"line":635},[550,2099,1966],{"class":564},[550,2101,811],{"class":560},[550,2103,2104],{"class":564},"style",[550,2106,811],{"class":560},[550,2108,2109],{"class":564},"fontWeight",[550,2111,852],{"class":560},[550,2113,580],{"class":560},[550,2115,2116],{"class":583},"600",[550,2118,587],{"class":560},[550,2120,590],{"class":560},[550,2122,2123,2125,2127,2129,2131,2133,2135,2137],{"class":552,"line":653},[550,2124,623],{"class":556},[550,2126,1989],{"class":560},[550,2128,838],{"class":606},[550,2130,1994],{"class":564},[550,2132,811],{"class":560},[550,2134,1999],{"class":610},[550,2136,614],{"class":628},[550,2138,590],{"class":560},[550,2140,2141],{"class":552,"line":663},[550,2142,2008],{"class":560},[540,2144,2147],{"className":542,"code":2145,"filename":2146,"language":545,"meta":546,"style":546},"import { defineConfig } from \"tsdown\";\nimport Vue from \"unplugin-vue\u002Frolldown\";\n\n\u002F\u002F Bundled into the admin chunks, so the host installs neither Vue nor React.\nconst bundled = \u002F^(vue|react|react-dom|scheduler)(\\\u002F|$)|^@vue\\\u002F|^tenoncms\\\u002Fadmin\\\u002F(vue|react)$\u002F;\n\nexport default defineConfig({\n  plugins: [Vue({ isProduction: true })],\n  entry: [\"src\u002Findex.ts\", \"src\u002Fadmin\u002Findex.ts\", \"src\u002Fadmin\u002Fbar.ts\"],\n  platform: \"neutral\",\n  fixedExtension: true,\n  \u002F\u002F Everything else, like `tenoncms` and `hono`, comes from the host.\n  external: (id, importer) => !!importer && !id.startsWith(\".\") && !bundled.test(id),\n  \u002F\u002F One CSS file per chunk, so only styled entries load CSS.\n  css: { inject: true, splitting: true },\n  define: {\n    \"process.env.NODE_ENV\": '\"production\"',\n    __VUE_OPTIONS_API__: \"true\",\n    __VUE_PROD_DEVTOOLS__: \"false\",\n  },\n  dts: { vue: true },\n});\n","tsdown.config.ts",[519,2148,2149,2171,2190,2194,2199,2286,2290,2302,2332,2368,2384,2395,2400,2467,2472,2499,2508,2530,2546,2562,2566,2584],{"__ignoreMap":546},[550,2150,2151,2153,2155,2158,2160,2162,2164,2167,2169],{"class":552,"line":553},[550,2152,557],{"class":556},[550,2154,561],{"class":560},[550,2156,2157],{"class":564}," defineConfig",[550,2159,574],{"class":560},[550,2161,577],{"class":556},[550,2163,580],{"class":560},[550,2165,2166],{"class":583},"tsdown",[550,2168,587],{"class":560},[550,2170,590],{"class":560},[550,2172,2173,2175,2178,2181,2183,2186,2188],{"class":552,"line":593},[550,2174,557],{"class":556},[550,2176,2177],{"class":564}," Vue ",[550,2179,2180],{"class":556},"from",[550,2182,580],{"class":560},[550,2184,2185],{"class":583},"unplugin-vue\u002Frolldown",[550,2187,587],{"class":560},[550,2189,590],{"class":560},[550,2191,2192],{"class":552,"line":600},[550,2193,597],{"emptyLinePlaceholder":596},[550,2195,2196],{"class":552,"line":620},[550,2197,2198],{"class":1070},"\u002F\u002F Bundled into the admin chunks, so the host installs neither Vue nor React.\n",[550,2200,2201,2203,2206,2208,2211,2214,2216,2219,2222,2225,2227,2230,2232,2235,2238,2241,2243,2246,2249,2251,2254,2256,2258,2260,2262,2264,2267,2269,2271,2273,2275,2277,2279,2281,2284],{"class":552,"line":635},[550,2202,1123],{"class":606},[550,2204,2205],{"class":564}," bundled ",[550,2207,1129],{"class":560},[550,2209,2210],{"class":560}," \u002F",[550,2212,2213],{"class":556},"^",[550,2215,629],{"class":560},[550,2217,2218],{"class":583},"vue",[550,2220,2221],{"class":560},"|",[550,2223,2224],{"class":583},"react",[550,2226,2221],{"class":560},[550,2228,2229],{"class":583},"react-dom",[550,2231,2221],{"class":560},[550,2233,2234],{"class":583},"scheduler",[550,2236,2237],{"class":560},")(",[550,2239,2240],{"class":564},"\\\u002F",[550,2242,2221],{"class":560},[550,2244,2245],{"class":556},"$",[550,2247,2248],{"class":560},")|",[550,2250,2213],{"class":556},[550,2252,2253],{"class":583},"@vue",[550,2255,2240],{"class":564},[550,2257,2221],{"class":560},[550,2259,2213],{"class":556},[550,2261,584],{"class":583},[550,2263,2240],{"class":564},[550,2265,2266],{"class":583},"admin",[550,2268,2240],{"class":564},[550,2270,629],{"class":560},[550,2272,2218],{"class":583},[550,2274,2221],{"class":560},[550,2276,2224],{"class":583},[550,2278,774],{"class":560},[550,2280,2245],{"class":556},[550,2282,2283],{"class":560},"\u002F",[550,2285,590],{"class":560},[550,2287,2288],{"class":552,"line":653},[550,2289,597],{"emptyLinePlaceholder":596},[550,2291,2292,2294,2296,2298,2300],{"class":552,"line":663},[550,2293,603],{"class":556},[550,2295,1059],{"class":556},[550,2297,2157],{"class":610},[550,2299,629],{"class":564},[550,2301,632],{"class":560},[550,2303,2304,2306,2308,2310,2313,2315,2318,2321,2323,2325,2327,2330],{"class":552,"line":677},[550,2305,1076],{"class":628},[550,2307,641],{"class":560},[550,2309,1081],{"class":564},[550,2311,2312],{"class":610},"Vue",[550,2314,629],{"class":564},[550,2316,2317],{"class":560},"{",[550,2319,2320],{"class":628}," isProduction",[550,2322,641],{"class":560},[550,2324,733],{"class":732},[550,2326,574],{"class":560},[550,2328,2329],{"class":564},")]",[550,2331,650],{"class":560},[550,2333,2334,2337,2339,2341,2343,2345,2347,2349,2351,2353,2355,2357,2359,2361,2363,2366],{"class":552,"line":694},[550,2335,2336],{"class":628},"  entry",[550,2338,641],{"class":560},[550,2340,1081],{"class":564},[550,2342,587],{"class":560},[550,2344,1664],{"class":583},[550,2346,587],{"class":560},[550,2348,568],{"class":560},[550,2350,580],{"class":560},[550,2352,1891],{"class":583},[550,2354,587],{"class":560},[550,2356,568],{"class":560},[550,2358,580],{"class":560},[550,2360,2012],{"class":583},[550,2362,587],{"class":560},[550,2364,2365],{"class":564},"]",[550,2367,650],{"class":560},[550,2369,2370,2373,2375,2377,2380,2382],{"class":552,"line":704},[550,2371,2372],{"class":628},"  platform",[550,2374,641],{"class":560},[550,2376,580],{"class":560},[550,2378,2379],{"class":583},"neutral",[550,2381,587],{"class":560},[550,2383,650],{"class":560},[550,2385,2386,2389,2391,2393],{"class":552,"line":739},[550,2387,2388],{"class":628},"  fixedExtension",[550,2390,641],{"class":560},[550,2392,733],{"class":732},[550,2394,650],{"class":560},[550,2396,2397],{"class":552,"line":762},[550,2398,2399],{"class":1070},"  \u002F\u002F Everything else, like `tenoncms` and `hono`, comes from the host.\n",[550,2401,2402,2405,2407,2409,2412,2414,2417,2419,2421,2424,2427,2430,2433,2435,2437,2440,2442,2444,2446,2448,2450,2452,2454,2457,2459,2462,2465],{"class":552,"line":768},[550,2403,2404],{"class":610},"  external",[550,2406,641],{"class":560},[550,2408,793],{"class":560},[550,2410,2411],{"class":796},"id",[550,2413,568],{"class":560},[550,2415,2416],{"class":796}," importer",[550,2418,774],{"class":560},[550,2420,838],{"class":606},[550,2422,2423],{"class":560}," !!",[550,2425,2426],{"class":564},"importer ",[550,2428,2429],{"class":560},"&&",[550,2431,2432],{"class":560}," !",[550,2434,2411],{"class":564},[550,2436,811],{"class":560},[550,2438,2439],{"class":610},"startsWith",[550,2441,629],{"class":564},[550,2443,587],{"class":560},[550,2445,811],{"class":583},[550,2447,587],{"class":560},[550,2449,933],{"class":564},[550,2451,2429],{"class":560},[550,2453,2432],{"class":560},[550,2455,2456],{"class":564},"bundled",[550,2458,811],{"class":560},[550,2460,2461],{"class":610},"test",[550,2463,2464],{"class":564},"(id)",[550,2466,650],{"class":560},[550,2468,2469],{"class":552,"line":779},[550,2470,2471],{"class":1070},"  \u002F\u002F One CSS file per chunk, so only styled entries load CSS.\n",[550,2473,2474,2477,2479,2481,2484,2486,2488,2490,2493,2495,2497],{"class":552,"line":785},[550,2475,2476],{"class":628},"  css",[550,2478,641],{"class":560},[550,2480,561],{"class":560},[550,2482,2483],{"class":628}," inject",[550,2485,641],{"class":560},[550,2487,733],{"class":732},[550,2489,568],{"class":560},[550,2491,2492],{"class":628}," splitting",[550,2494,641],{"class":560},[550,2496,733],{"class":732},[550,2498,736],{"class":560},[550,2500,2501,2504,2506],{"class":552,"line":805},[550,2502,2503],{"class":628},"  define",[550,2505,641],{"class":560},[550,2507,617],{"class":560},[550,2509,2510,2512,2515,2517,2519,2522,2525,2528],{"class":552,"line":843},[550,2511,1458],{"class":560},[550,2513,2514],{"class":628},"process.env.NODE_ENV",[550,2516,587],{"class":560},[550,2518,641],{"class":560},[550,2520,2521],{"class":560}," '",[550,2523,2524],{"class":583},"\"production\"",[550,2526,2527],{"class":560},"'",[550,2529,650],{"class":560},[550,2531,2532,2535,2537,2539,2542,2544],{"class":552,"line":910},[550,2533,2534],{"class":628},"    __VUE_OPTIONS_API__",[550,2536,641],{"class":560},[550,2538,580],{"class":560},[550,2540,2541],{"class":583},"true",[550,2543,587],{"class":560},[550,2545,650],{"class":560},[550,2547,2548,2551,2553,2555,2558,2560],{"class":552,"line":949},[550,2549,2550],{"class":628},"    __VUE_PROD_DEVTOOLS__",[550,2552,641],{"class":560},[550,2554,580],{"class":560},[550,2556,2557],{"class":583},"false",[550,2559,587],{"class":560},[550,2561,650],{"class":560},[550,2563,2564],{"class":552,"line":958},[550,2565,1332],{"class":560},[550,2567,2568,2571,2573,2575,2578,2580,2582],{"class":552,"line":968},[550,2569,2570],{"class":628},"  dts",[550,2572,641],{"class":560},[550,2574,561],{"class":560},[550,2576,2577],{"class":628}," vue",[550,2579,641],{"class":560},[550,2581,733],{"class":732},[550,2583,736],{"class":560},[550,2585,2587,2589,2591],{"class":552,"line":2586},22,[550,2588,1094],{"class":560},[550,2590,774],{"class":564},[550,2592,590],{"class":560},[484,2594,2595,2596,2598,2599,2602,2603,2606],{},"The build uses ",[519,2597,2166],{},", ",[519,2600,2601],{},"@tsdown\u002Fcss",", and ",[519,2604,2605],{},"unplugin-vue"," for Vue components. Every published plugin MUST get these right:",[493,2608,2609,2623,2637,2652,2666,2678],{},[496,2610,2611,2616,2617,2619,2620,2622],{},[1103,2612,2613,2615],{},[519,2614,584],{}," is a peer dependency and stays external."," A bundled copy gives the host two copies of core, which breaks ",[519,2618,1385],{}," and the types. ",[519,2621,1684],{}," is the only core import the browser half needs.",[496,2624,2625,2628,2629,2632,2633,2636],{},[1103,2626,2627],{},"Ship the browser half compiled."," The host's build does not compile ",[519,2630,2631],{},".vue",", JSX or TypeScript from ",[519,2634,2635],{},"node_modules",". Bundle Vue or React into the admin chunks, as above, or write plain DOM. The host then installs no extra package.",[496,2638,2639,2644,2645,2648,2649,2651],{},[1103,2640,2641,2643],{},[519,2642,1385],{}," takes a package path, as a literal string."," ",[519,2646,2647],{},"clientRef(\"cms-plugin-quotes\u002Fadmin#mountStats\")"," resolves from the host's project root, so the host installs the plugin there. The adapters find the call by reading the module graph of ",[519,2650,1004],{},", so the config MUST import the plugin statically.",[496,2653,2654,2657,2658,2661,2662,2665],{},[1103,2655,2656],{},"Give the admin bar its own entry."," The bar loads on every page of the site. Everything it reaches MUST be free of CSS and of Vue ",[519,2659,2660],{},"\u003Cstyle>"," blocks, and the bar's shadow root gets no page CSS. Keep the bar mounts in a file like ",[519,2663,2664],{},"admin\u002Fbar"," and style them inline. The adapters reject a plugin that breaks this at startup.",[496,2667,2668,2671,2672,1368,2675,811],{},[1103,2669,2670],{},"Scope the plugin's CSS."," The admin's Tailwind does not scan plugin code, and plugin CSS applies to the whole admin. Scope every selector: a page class, scoped styles or a Tailwind ",[519,2673,2674],{},"prefix()",[500,2676,2677],{"href":232},"Styles and UI libraries",[496,2679,2680,2644,2683,2685,2686,2689],{},[1103,2681,2682],{},"Build the types.",[519,2684,537],{}," keeps the collection and global names, so the host gets ",[519,2687,2688],{},"cms.find(\"quotes\")"," typed.",[484,2691,2692,2693,2696,2697,2699,2700,2702],{},"Before you publish, run ",[519,2694,2695],{},"npm pack",", install the tarball in a test site and start its dev server once. A wrong ",[519,2698,1447],{}," entry, a bundled copy of ",[519,2701,584],{}," or CSS in the bar's graph shows up there.",[528,2704,2706,2707],{"id":2705},"import-browser-code-instead-of-clientref","Import browser code instead of ",[519,2708,1385],{},[484,2710,2711,2712,2714,2715,2718,2719,2722,2723,2725],{},"A plugin in your project imports ",[519,2713,1349],{}," modules like your config does. A published plugin builds its server and browser halves apart, so its server build needs ",[519,2716,2717],{},"clientModules()"," from ",[519,2720,2721],{},"tenoncms\u002Fvite",". It turns the imports into ",[519,2724,1385],{}," calls with the package path:",[540,2727,2729],{"className":542,"code":2728,"filename":2146,"language":545,"meta":546,"style":546},"import { clientModules } from \"tenoncms\u002Fvite\";\n\nconst serverPlugin = clientModules({\n  root: import.meta.dirname,\n  server: true,\n  references: { \".\u002Fsrc\u002Fstats.client.ts\": \"cms-plugin-quotes\u002Fadmin\" },\n});\n",[519,2730,2731,2752,2756,2771,2793,2804,2831],{"__ignoreMap":546},[550,2732,2733,2735,2737,2740,2742,2744,2746,2748,2750],{"class":552,"line":553},[550,2734,557],{"class":556},[550,2736,561],{"class":560},[550,2738,2739],{"class":564}," clientModules",[550,2741,574],{"class":560},[550,2743,577],{"class":556},[550,2745,580],{"class":560},[550,2747,2721],{"class":583},[550,2749,587],{"class":560},[550,2751,590],{"class":560},[550,2753,2754],{"class":552,"line":593},[550,2755,597],{"emptyLinePlaceholder":596},[550,2757,2758,2760,2763,2765,2767,2769],{"class":552,"line":600},[550,2759,1123],{"class":606},[550,2761,2762],{"class":564}," serverPlugin ",[550,2764,1129],{"class":560},[550,2766,2739],{"class":610},[550,2768,629],{"class":564},[550,2770,632],{"class":560},[550,2772,2773,2776,2778,2781,2783,2786,2788,2791],{"class":552,"line":620},[550,2774,2775],{"class":628},"  root",[550,2777,641],{"class":560},[550,2779,2780],{"class":556}," import",[550,2782,811],{"class":560},[550,2784,2785],{"class":564},"meta",[550,2787,811],{"class":560},[550,2789,2790],{"class":564},"dirname",[550,2792,650],{"class":560},[550,2794,2795,2798,2800,2802],{"class":552,"line":635},[550,2796,2797],{"class":628},"  server",[550,2799,641],{"class":560},[550,2801,733],{"class":732},[550,2803,650],{"class":560},[550,2805,2806,2809,2811,2813,2815,2818,2820,2822,2824,2827,2829],{"class":552,"line":653},[550,2807,2808],{"class":628},"  references",[550,2810,641],{"class":560},[550,2812,561],{"class":560},[550,2814,580],{"class":560},[550,2816,2817],{"class":628},".\u002Fsrc\u002Fstats.client.ts",[550,2819,587],{"class":560},[550,2821,641],{"class":560},[550,2823,580],{"class":560},[550,2825,2826],{"class":583},"cms-plugin-quotes\u002Fadmin",[550,2828,587],{"class":560},[550,2830,736],{"class":560},[550,2832,2833,2835,2837],{"class":552,"line":663},[550,2834,1094],{"class":560},[550,2836,774],{"class":564},[550,2838,590],{"class":560},[493,2840,2841,2855,2858],{},[496,2842,2843,2844,2847,2848,2850,2851,2854],{},"Add ",[519,2845,2846],{},"serverPlugin"," to the ",[519,2849,1367],{}," of the server build only. Never use ",[519,2852,2853],{},"server: true"," in the browser build.",[496,2856,2857],{},"Map every browser module that the server build reaches. A module without an entry would point into the host's project.",[496,2859,2860,2861,2864,2865,2867],{},"Build ",[519,2862,2863],{},"src\u002Fstats.client.ts"," as the browser entry behind the ",[519,2866,1511],{}," export, and ship the types of both halves.",[484,2869,2870,2871,2873],{},"Plain ",[519,2872,1385],{}," calls need no extra build step.",[488,2875,2877],{"id":2876},"related-resources","Related resources",[493,2879,2880,2885,2896,2902,2907],{},[496,2881,2882,2884],{},[500,2883,239],{"href":240},": use a plugin, and the bundled plugins.",[496,2886,2887,2890,2891,2893,2894,811],{},[500,2888,213],{"href":2889},"\u002Fdocs\u002Fcore\u002Fcustomization#browser-modules",": ",[519,2892,1349],{}," modules and ",[519,2895,1385],{},[496,2897,2898,2901],{},[500,2899,2900],{"href":228},"Custom pages and actions",": the admin pages a plugin adds.",[496,2903,2904,2906],{},[500,2905,267],{"href":268},": tasks and schedules.",[496,2908,2909,2890,2912,2914],{},[500,2910,2911],{"href":312},"Lifecycle hooks",[519,2913,1219],{}," and the other start hooks.",[2104,2916,2917],{},"html pre.shiki code .s7zQu, html code.shiki .s7zQu{--shiki-light:#39ADB5;--shiki-light-font-style:italic;--shiki-default:#89DDFF;--shiki-default-font-style:italic;--shiki-dark:#89DDFF;--shiki-dark-font-style:italic}html pre.shiki code .sMK4o, html code.shiki .sMK4o{--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF}html pre.shiki code .sTEyZ, html code.shiki .sTEyZ{--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8}html pre.shiki code .sfazB, html code.shiki .sfazB{--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D}html pre.shiki code .spNyl, html code.shiki .spNyl{--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA}html pre.shiki code .s2Zo4, html code.shiki .s2Zo4{--shiki-light:#6182B8;--shiki-default:#82AAFF;--shiki-dark:#82AAFF}html pre.shiki code .swJcz, html code.shiki .swJcz{--shiki-light:#E53935;--shiki-default:#F07178;--shiki-dark:#F07178}html pre.shiki code .sfNiH, html code.shiki .sfNiH{--shiki-light:#FF5370;--shiki-default:#FF9CAC;--shiki-dark:#FF9CAC}html pre.shiki code .sHdIc, html code.shiki .sHdIc{--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#EEFFFF;--shiki-default-font-style:italic;--shiki-dark:#BABED8;--shiki-dark-font-style:italic}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .sHwdD, html code.shiki .sHwdD{--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#546E7A;--shiki-default-font-style:italic;--shiki-dark:#676E95;--shiki-dark-font-style:italic}html pre.shiki code .sBMFI, html code.shiki .sBMFI{--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B}html pre.shiki code .sbssI, html code.shiki .sbssI{--shiki-light:#F76D47;--shiki-default:#F78C6C;--shiki-dark:#F78C6C}",{"title":546,"searchDepth":593,"depth":593,"links":2919},[2920,2921,2927,2928,2932],{"id":490,"depth":593,"text":491},{"id":513,"depth":593,"text":514,"children":2922},[2923,2924,2925,2926],{"id":530,"depth":600,"text":531},{"id":999,"depth":600,"text":1000},{"id":1109,"depth":600,"text":1110},{"id":1212,"depth":600,"text":1213},{"id":1360,"depth":593,"text":1361},{"id":1375,"depth":593,"text":1376,"children":2929},[2930],{"id":2705,"depth":600,"text":2931},"Import browser code instead of clientRef()",{"id":2876,"depth":593,"text":2877},"Package schema, routes and admin pieces for reuse.","md",null,{},{"title":435,"description":2933},"rhon339WYpmV1RFAlwS3fHOpnsnwp8loq8UfjO6wDTc",[2940,2942],{"title":431,"path":432,"stem":433,"description":2941,"children":-1},"A field input with server data, updates, translations and its own styles.",{"title":439,"path":440,"stem":441,"description":2943,"children":-1},"A Next.js site that reads from a standalone Tenon CMS, with drafts, the admin bar and the live preview.",1795884698705]