[{"data":1,"prerenderedAt":3311},["ShallowReactive",2],{"navigation_docs":3,"-developers-frameworks-render":613,"-developers-frameworks-render-surround":3308},[4,39,101,378,540,562,584,606],{"title":5,"icon":6,"path":7,"stem":8,"children":9,"page":38},"Start","i-lucide-rocket","\u002Fstart","1.start",[10,14,18,22,26,30,34],{"title":11,"path":12,"stem":13},"Our approach","\u002Fstart\u002Four-approach","1.start\u002F0.our-approach",{"title":15,"path":16,"stem":17},"Introduction","\u002Fstart\u002Fintroduction","1.start\u002F1.introduction",{"title":19,"path":20,"stem":21},"Concepts","\u002Fstart\u002Fconcepts","1.start\u002F2.concepts",{"title":23,"path":24,"stem":25},"Glossary","\u002Fstart\u002Fglossary","1.start\u002F3.glossary",{"title":27,"path":28,"stem":29},"Try it locally","\u002Fstart\u002Ftry-it-locally","1.start\u002F4.try-it-locally",{"title":31,"path":32,"stem":33},"Features","\u002Fstart\u002Ffeatures","1.start\u002F5.features",{"title":35,"path":36,"stem":37},"Questions","\u002Fstart\u002Ffaq","1.start\u002F6.faq",false,{"title":40,"icon":41,"path":42,"stem":43,"children":44,"page":38},"Run SHADE","i-lucide-server","\u002Frun","2.run",[45,49,53,57,61,65,69,73,77,81,85,89,93,97],{"title":46,"path":47,"stem":48},"Setting up an instance (Coolify)","\u002Frun\u002Fcoolify","2.run\u002F1.coolify",{"title":50,"path":51,"stem":52},"Console commands","\u002Frun\u002Fconsole","2.run\u002F10.console",{"title":54,"path":55,"stem":56},"Rotating APP_SECRET","\u002Frun\u002Frotating-app-secret","2.run\u002F11.rotating-app-secret",{"title":58,"path":59,"stem":60},"Checking an instance","\u002Frun\u002Fdoctor","2.run\u002F12.doctor",{"title":62,"path":63,"stem":64},"Self-hosting by hand","\u002Frun\u002Fown-server-by-hand","2.run\u002F13.own-server-by-hand",{"title":66,"path":67,"stem":68},"NixOS (experimental)","\u002Frun\u002Fnixos","2.run\u002F14.nixos",{"title":70,"path":71,"stem":72},"Self-hosting without Coolify","\u002Frun\u002Fown-server","2.run\u002F2.own-server",{"title":74,"path":75,"stem":76},"Hosting the site on a static host","\u002Frun\u002Fstatic-hosts","2.run\u002F3.static-hosts",{"title":78,"path":79,"stem":80},"Licence","\u002Frun\u002Flicence","2.run\u002F4.licence",{"title":82,"path":83,"stem":84},"Updating and backups","\u002Frun\u002Fupdating-and-backups","2.run\u002F5.updating-and-backups",{"title":86,"path":87,"stem":88},"Troubleshooting","\u002Frun\u002Ftroubleshooting","2.run\u002F6.troubleshooting",{"title":90,"path":91,"stem":92},"Logs, request ids, traces and metrics","\u002Frun\u002Flogs","2.run\u002F7.logs",{"title":94,"path":95,"stem":96},"Maintenance mode","\u002Frun\u002Fmaintenance-mode","2.run\u002F8.maintenance-mode",{"title":98,"path":99,"stem":100},"Usage limits","\u002Frun\u002Fusage-limits","2.run\u002F9.usage-limits",{"title":102,"icon":103,"path":104,"stem":105,"children":106},"Guide","i-lucide-book-open","\u002Fguide","3.guide",[107,109,147,192,210,280,310,364],{"title":102,"path":104,"stem":108},"3.guide\u002Findex",{"title":110,"icon":111,"path":112,"stem":113,"children":114,"page":38},"Content","i-lucide-file-text","\u002Fguide\u002Fcontent","3.guide\u002F1.content",[115,119,123,127,131,135,139,143],{"title":116,"path":117,"stem":118},"Collections and entries","\u002Fguide\u002Fcontent\u002Fcollections","3.guide\u002F1.content\u002F1.collections",{"title":120,"path":121,"stem":122},"Field types","\u002Fguide\u002Fcontent\u002Ffields","3.guide\u002F1.content\u002F2.fields",{"title":124,"path":125,"stem":126},"Drafts, publishing and version history","\u002Fguide\u002Fcontent\u002Fversions","3.guide\u002F1.content\u002F3.versions",{"title":128,"path":129,"stem":130},"Languages","\u002Fguide\u002Fcontent\u002Flanguages","3.guide\u002F1.content\u002F4.languages",{"title":132,"path":133,"stem":134},"Data sources","\u002Fguide\u002Fcontent\u002Fdata-sources","3.guide\u002F1.content\u002F5.data-sources",{"title":136,"path":137,"stem":138},"Media","\u002Fguide\u002Fcontent\u002Fmedia","3.guide\u002F1.content\u002F6.media",{"title":140,"path":141,"stem":142},"Search","\u002Fguide\u002Fcontent\u002Fsearch","3.guide\u002F1.content\u002F7.search",{"title":144,"path":145,"stem":146},"Trash","\u002Fguide\u002Fcontent\u002Ftrash","3.guide\u002F1.content\u002F8.trash",{"title":148,"icon":149,"path":150,"stem":151,"children":152,"page":38},"Website","i-lucide-globe","\u002Fguide\u002Fwebsite","3.guide\u002F2.website",[153,156,160,164,168,172,176,180,184,188],{"title":148,"path":154,"stem":155},"\u002Fguide\u002Fwebsite\u002Fwebsite","3.guide\u002F2.website\u002F1.website",{"title":157,"path":158,"stem":159},"Scroll scenes","\u002Fguide\u002Fwebsite\u002Fscroll-scenes","3.guide\u002F2.website\u002F10.scroll-scenes",{"title":161,"path":162,"stem":163},"Pages and posts","\u002Fguide\u002Fwebsite\u002Fpages","3.guide\u002F2.website\u002F2.pages",{"title":165,"path":166,"stem":167},"The visual editor","\u002Fguide\u002Fwebsite\u002Fvisual-editor","3.guide\u002F2.website\u002F3.visual-editor",{"title":169,"path":170,"stem":171},"Roles and locks","\u002Fguide\u002Fwebsite\u002Froles-and-locks","3.guide\u002F2.website\u002F4.roles-and-locks",{"title":173,"path":174,"stem":175},"Header and footer","\u002Fguide\u002Fwebsite\u002Fheader-and-footer","3.guide\u002F2.website\u002F5.header-and-footer",{"title":177,"path":178,"stem":179},"Theme","\u002Fguide\u002Fwebsite\u002Ftheme","3.guide\u002F2.website\u002F6.theme",{"title":181,"path":182,"stem":183},"Redirects","\u002Fguide\u002Fwebsite\u002Fredirects","3.guide\u002F2.website\u002F7.redirects",{"title":185,"path":186,"stem":187},"Site settings","\u002Fguide\u002Fwebsite\u002Fsite-settings","3.guide\u002F2.website\u002F8.site-settings",{"title":189,"path":190,"stem":191},"The site","\u002Fguide\u002Fwebsite\u002Fthe-site","3.guide\u002F2.website\u002F9.the-site",{"title":193,"icon":194,"path":195,"stem":196,"children":197,"page":38},"Publishing","i-lucide-send","\u002Fguide\u002Fpublishing","3.guide\u002F3.publishing",[198,202,206],{"title":199,"path":200,"stem":201},"Publishing and preview","\u002Fguide\u002Fpublishing\u002Fpublishing","3.guide\u002F3.publishing\u002F1.publishing",{"title":203,"path":204,"stem":205},"Builds","\u002Fguide\u002Fpublishing\u002Fbuilds","3.guide\u002F3.publishing\u002F2.builds",{"title":207,"path":208,"stem":209},"CDN caches","\u002Fguide\u002Fpublishing\u002Fcaches","3.guide\u002F3.publishing\u002F3.caches",{"title":211,"icon":212,"path":213,"stem":214,"children":215,"page":38},"People, security and privacy","i-lucide-shield","\u002Fguide\u002Fpeople-and-security","3.guide\u002F4.people-and-security",[216,220,224,228,232,236,240,244,248,252,256,260,264,268,272,276],{"title":217,"path":218,"stem":219},"People in SHADE","\u002Fguide\u002Fpeople-and-security\u002Fpeople-in-shade","3.guide\u002F4.people-and-security\u002F0.people-in-shade",{"title":221,"path":222,"stem":223},"Team and roles","\u002Fguide\u002Fpeople-and-security\u002Fteam","3.guide\u002F4.people-and-security\u002F1.team",{"title":225,"path":226,"stem":227},"Errors and security alerts","\u002Fguide\u002Fpeople-and-security\u002Ferrors","3.guide\u002F4.people-and-security\u002F10.errors",{"title":229,"path":230,"stem":231},"Exporting an instance","\u002Fguide\u002Fpeople-and-security\u002Fexporting","3.guide\u002F4.people-and-security\u002F11.exporting",{"title":233,"path":234,"stem":235},"Organisations","\u002Fguide\u002Fpeople-and-security\u002Forganisations","3.guide\u002F4.people-and-security\u002F12.organisations",{"title":237,"path":238,"stem":239},"Signing in through an identity provider (team)","\u002Fguide\u002Fpeople-and-security\u002Fidentity-providers","3.guide\u002F4.people-and-security\u002F13.identity-providers",{"title":241,"path":242,"stem":243},"System status","\u002Fguide\u002Fpeople-and-security\u002Fsystem-status","3.guide\u002F4.people-and-security\u002F14.system-status",{"title":245,"path":246,"stem":247},"Appearance","\u002Fguide\u002Fpeople-and-security\u002Fappearance","3.guide\u002F4.people-and-security\u002F15.appearance",{"title":249,"path":250,"stem":251},"Accounts and personal pages","\u002Fguide\u002Fpeople-and-security\u002Faccounts","3.guide\u002F4.people-and-security\u002F2.accounts",{"title":253,"path":254,"stem":255},"Signing in (team)","\u002Fguide\u002Fpeople-and-security\u002Fsign-in","3.guide\u002F4.people-and-security\u002F3.sign-in",{"title":257,"path":258,"stem":259},"API tokens","\u002Fguide\u002Fpeople-and-security\u002Fapi-tokens","3.guide\u002F4.people-and-security\u002F4.api-tokens",{"title":261,"path":262,"stem":263},"Audit log","\u002Fguide\u002Fpeople-and-security\u002Faudit","3.guide\u002F4.people-and-security\u002F5.audit",{"title":265,"path":266,"stem":267},"Request protection","\u002Fguide\u002Fpeople-and-security\u002Fprotection","3.guide\u002F4.people-and-security\u002F6.protection",{"title":269,"path":270,"stem":271},"Personal data per person","\u002Fguide\u002Fpeople-and-security\u002Fprivacy","3.guide\u002F4.people-and-security\u002F7.privacy",{"title":273,"path":274,"stem":275},"Data retention","\u002Fguide\u002Fpeople-and-security\u002Fretention","3.guide\u002F4.people-and-security\u002F8.retention",{"title":277,"path":278,"stem":279},"Consent banner","\u002Fguide\u002Fpeople-and-security\u002Fconsent","3.guide\u002F4.people-and-security\u002F9.consent",{"title":281,"icon":282,"path":283,"stem":284,"children":285,"page":38},"Services","i-lucide-plug","\u002Fguide\u002Fservices","3.guide\u002F5.services",[286,290,294,298,302,306],{"title":287,"path":288,"stem":289},"Email","\u002Fguide\u002Fservices\u002Femail","3.guide\u002F5.services\u002F1.email",{"title":291,"path":292,"stem":293},"Opening hours","\u002Fguide\u002Fservices\u002Fopening-hours","3.guide\u002F5.services\u002F4.opening-hours",{"title":295,"path":296,"stem":297},"Webhooks","\u002Fguide\u002Fservices\u002Fwebhooks","3.guide\u002F5.services\u002F5.webhooks",{"title":299,"path":300,"stem":301},"Locations","\u002Fguide\u002Fservices\u002Flocations","3.guide\u002F5.services\u002F6.locations",{"title":303,"path":304,"stem":305},"VAT rates","\u002Fguide\u002Fservices\u002Fvat-rates","3.guide\u002F5.services\u002F7.vat-rates",{"title":307,"path":308,"stem":309},"Channels","\u002Fguide\u002Fservices\u002Fchannels","3.guide\u002F5.services\u002F8.channels",{"title":311,"icon":312,"path":313,"stem":314,"children":315,"page":38},"InstalledModules","i-lucide-puzzle","\u002Fguide\u002Fmodules","3.guide\u002F6.modules",[316,320,324,328,332,336,340,344,348,352,356,360],{"title":317,"path":318,"stem":319},"Modules","\u002Fguide\u002Fmodules\u002Fmanaging","3.guide\u002F6.modules\u002F1.managing",{"title":321,"path":322,"stem":323},"Dutch services (module)","\u002Fguide\u002Fmodules\u002Fnl","3.guide\u002F6.modules\u002F10.nl",{"title":325,"path":326,"stem":327},"Editorial (module)","\u002Fguide\u002Fmodules\u002Feditorial","3.guide\u002F6.modules\u002F11.editorial",{"title":329,"path":330,"stem":331},"Appointments (module)","\u002Fguide\u002Fmodules\u002Fappointments","3.guide\u002F6.modules\u002F2.appointments",{"title":333,"path":334,"stem":335},"Shop (the commerce module)","\u002Fguide\u002Fmodules\u002Fshop","3.guide\u002F6.modules\u002F3.shop",{"title":337,"path":338,"stem":339},"Untrusted modules","\u002Fguide\u002Fmodules\u002Funtrusted","3.guide\u002F6.modules\u002F4.untrusted",{"title":341,"path":342,"stem":343},"Analytics (module)","\u002Fguide\u002Fmodules\u002Fanalytics","3.guide\u002F6.modules\u002F5.analytics",{"title":345,"path":346,"stem":347},"Error forwarding (module)","\u002Fguide\u002Fmodules\u002Ferror-forwarding","3.guide\u002F6.modules\u002F6.error-forwarding",{"title":349,"path":350,"stem":351},"Client programs","\u002Fguide\u002Fmodules\u002Fprograms","3.guide\u002F6.modules\u002F7.programs",{"title":353,"path":354,"stem":355},"Import and export (module)","\u002Fguide\u002Fmodules\u002Fimport","3.guide\u002F6.modules\u002F8.import",{"title":357,"path":358,"stem":359},"Payments (module)","\u002Fguide\u002Fmodules\u002Fpayments","3.guide\u002F6.modules\u002F8.payments",{"title":361,"path":362,"stem":363},"Forms (module)","\u002Fguide\u002Fmodules\u002Fforms","3.guide\u002F6.modules\u002F9.forms",{"title":365,"icon":366,"path":367,"stem":368,"children":369,"page":38},"AI assistants","i-lucide-bot","\u002Fguide\u002Fai","3.guide\u002F7.ai",[370,374],{"title":371,"path":372,"stem":373},"AI assistants (MCP)","\u002Fguide\u002Fai\u002Fassistants","3.guide\u002F7.ai\u002F1.assistants",{"title":375,"path":376,"stem":377},"Connecting an AI assistant","\u002Fguide\u002Fai\u002Fconnecting","3.guide\u002F7.ai\u002F2.connecting",{"title":379,"icon":380,"path":381,"stem":382,"children":383,"page":38},"Developers","i-lucide-code","\u002Fdevelopers","4.developers",[384,388,392,396,400,404,408,412,416,420,424,428,432,435,489,493,497,501,536],{"title":385,"path":386,"stem":387},"Architecture","\u002Fdevelopers\u002Farchitecture","4.developers\u002F1.architecture",{"title":389,"path":390,"stem":391},"Capabilities","\u002Fdevelopers\u002Fcapabilities","4.developers\u002F10.capabilities",{"title":393,"path":394,"stem":395},"Trust","\u002Fdevelopers\u002Ftrust","4.developers\u002F11.trust",{"title":397,"path":398,"stem":399},"Redis and the ports","\u002Fdevelopers\u002Fredis","4.developers\u002F12.redis",{"title":401,"path":402,"stem":403},"The worker container role","\u002Fdevelopers\u002Fworker","4.developers\u002F13.worker",{"title":405,"path":406,"stem":407},"kv: a module's own key-value storage","\u002Fdevelopers\u002Fkv","4.developers\u002F14.kv",{"title":409,"path":410,"stem":411},"Processes: long-running work on the worker","\u002Fdevelopers\u002Fprocesses","4.developers\u002F15.processes",{"title":413,"path":414,"stem":415},"Network: a module's outgoing calls","\u002Fdevelopers\u002Fnetwork","4.developers\u002F16.network",{"title":417,"path":418,"stem":419},"Realtime","\u002Fdevelopers\u002Frealtime","4.developers\u002F17.realtime",{"title":421,"path":422,"stem":423},"Private files","\u002Fdevelopers\u002Ffiles","4.developers\u002F18.files",{"title":425,"path":426,"stem":427},"Notify","\u002Fdevelopers\u002Fnotify","4.developers\u002F19.notify",{"title":429,"path":430,"stem":431},"Collections","\u002Fdevelopers\u002Fcollections","4.developers\u002F2.collections",{"title":337,"path":433,"stem":434},"\u002Fdevelopers\u002Funtrusted","4.developers\u002F20.untrusted",{"title":436,"icon":312,"path":437,"stem":438,"children":439},"Writing a plugin","\u002Fdevelopers\u002Fmodules","4.developers\u002F3.modules\u002Findex",[440,442,446,450,454,458,462,466,470,473,477,481,485],{"title":441,"path":437,"stem":438},"Writing a module",{"title":443,"path":444,"stem":445},"Module SDK and tooling","\u002Fdevelopers\u002Fmodules\u002Fsdk-and-tooling","4.developers\u002F3.modules\u002F1.sdk-and-tooling",{"title":447,"path":448,"stem":449},"Connecting accounts with OAuth2","\u002Fdevelopers\u002Fmodules\u002Foauth","4.developers\u002F3.modules\u002F10.oauth",{"title":451,"path":452,"stem":453},"Calls between modules","\u002Fdevelopers\u002Fmodules\u002Fcalls-between-modules","4.developers\u002F3.modules\u002F11.calls-between-modules",{"title":455,"path":456,"stem":457},"Experimental parts","\u002Fdevelopers\u002Fmodules\u002Fexperimental-parts","4.developers\u002F3.modules\u002F12.experimental-parts",{"title":459,"path":460,"stem":461},"The manifest","\u002Fdevelopers\u002Fmodules\u002Fmanifest","4.developers\u002F3.modules\u002F2.manifest",{"title":463,"path":464,"stem":465},"Routes","\u002Fdevelopers\u002Fmodules\u002Froutes","4.developers\u002F3.modules\u002F3.routes",{"title":467,"path":468,"stem":469},"Admin screens and the site part","\u002Fdevelopers\u002Fmodules\u002Fadmin-and-site","4.developers\u002F3.modules\u002F4.admin-and-site",{"title":110,"path":471,"stem":472},"\u002Fdevelopers\u002Fmodules\u002Fcontent","4.developers\u002F3.modules\u002F5.content",{"title":474,"path":475,"stem":476},"Background work and services","\u002Fdevelopers\u002Fmodules\u002Fbackground-and-services","4.developers\u002F3.modules\u002F6.background-and-services",{"title":478,"path":479,"stem":480},"SDK reference","\u002Fdevelopers\u002Fmodules\u002Fsdk-reference","4.developers\u002F3.modules\u002F7.sdk-reference",{"title":482,"path":483,"stem":484},"The website module's SDK","\u002Fdevelopers\u002Fmodules\u002Fwebsite-sdk","4.developers\u002F3.modules\u002F8.website-sdk",{"title":486,"path":487,"stem":488},"Incoming webhooks","\u002Fdevelopers\u002Fmodules\u002Fincoming-webhooks","4.developers\u002F3.modules\u002F9.incoming-webhooks",{"title":490,"path":491,"stem":492},"Core and the website module","\u002Fdevelopers\u002Fcore-and-website-module","4.developers\u002F4.core-and-website-module",{"title":494,"path":495,"stem":496},"The API","\u002Fdevelopers\u002Fapi","4.developers\u002F6.api",{"title":498,"path":499,"stem":500},"API reference","\u002Fdevelopers\u002Fapi-reference","4.developers\u002F6.api-reference",{"title":502,"icon":503,"path":504,"stem":505,"children":506},"Sites in other frameworks","i-lucide-layout-template","\u002Fdevelopers\u002Fframeworks","4.developers\u002F7.frameworks\u002Findex",[507,508,512,516,520,524,528,532],{"title":502,"path":504,"stem":505},{"title":509,"path":510,"stem":511},"Accounts: sign-in and modules' routes","\u002Fdevelopers\u002Fframeworks\u002Faccounts","4.developers\u002F7.frameworks\u002F1.accounts",{"title":513,"path":514,"stem":515},"`@shadestack\u002Ftree`","\u002Fdevelopers\u002Fframeworks\u002Ftree","4.developers\u002F7.frameworks\u002F2.tree",{"title":517,"path":518,"stem":519},"Expressions and styles","\u002Fdevelopers\u002Fframeworks\u002Fexpressions-and-styles","4.developers\u002F7.frameworks\u002F3.expressions-and-styles",{"title":521,"path":522,"stem":523},"`@shadestack\u002Frender`","\u002Fdevelopers\u002Fframeworks\u002Frender","4.developers\u002F7.frameworks\u002F4.render",{"title":525,"path":526,"stem":527},"`@shadestack\u002Finteractions`","\u002Fdevelopers\u002Fframeworks\u002Finteractions","4.developers\u002F7.frameworks\u002F5.interactions",{"title":529,"path":530,"stem":531},"`@shadestack\u002Fa11y`","\u002Fdevelopers\u002Fframeworks\u002Fa11y","4.developers\u002F7.frameworks\u002F6.a11y",{"title":533,"path":534,"stem":535},"Your own page for SHADE's links","\u002Fdevelopers\u002Fframeworks\u002Flinks","4.developers\u002F7.frameworks\u002F7.links",{"title":537,"path":538,"stem":539},"Build a client module","\u002Fdevelopers\u002Fclient-module","4.developers\u002F9.client-module",{"title":541,"icon":542,"path":543,"stem":544,"children":545,"page":38},"Security","i-lucide-shield-check","\u002Fsecurity","5.security",[546,550,554,558],{"title":547,"path":548,"stem":549},"Reporting a vulnerability","\u002Fsecurity\u002Freporting","5.security\u002F0.reporting",{"title":551,"path":552,"stem":553},"Security testing","\u002Fsecurity\u002Ftesting","5.security\u002F1.testing",{"title":555,"path":556,"stem":557},"Hardening a production instance","\u002Fsecurity\u002Fhardening","5.security\u002F2.hardening",{"title":559,"path":560,"stem":561},"Manual testing with Kali Linux","\u002Fsecurity\u002Fmanual-testing","5.security\u002F3.manual-testing",{"title":563,"icon":564,"path":565,"stem":566,"children":567,"page":38},"Contributing","i-lucide-git-pull-request","\u002Fcontributing","6.contributing",[568,572,576,580],{"title":569,"path":570,"stem":571},"Reading the code","\u002Fcontributing\u002Freading-the-code","6.contributing\u002F1.reading-the-code",{"title":573,"path":574,"stem":575},"Docs site","\u002Fcontributing\u002Fdocs-site","6.contributing\u002F2.docs-site",{"title":577,"path":578,"stem":579},"Releases","\u002Fcontributing\u002Freleases","6.contributing\u002F3.releases",{"title":581,"path":582,"stem":583},"Load tests","\u002Fcontributing\u002Fload-tests","6.contributing\u002F4.load-tests",{"title":585,"icon":586,"path":587,"stem":588,"children":589,"page":38},"Project","i-lucide-map","\u002Fproject","7.project",[590,594,598,602],{"title":591,"path":592,"stem":593},"Roadmap","\u002Fproject\u002Froadmap","7.project\u002F1.roadmap",{"title":595,"path":596,"stem":597},"Known issues","\u002Fproject\u002Fknown-issues","7.project\u002F2.known-issues",{"title":599,"path":600,"stem":601},"Changelog","\u002Fproject\u002Fchangelog","7.project\u002F3.changelog",{"title":603,"path":604,"stem":605},"Decisions","\u002Fproject\u002Fdecisions","7.project\u002F4.decisions",{"title":607,"path":608,"stem":609,"children":610,"icon":612},"Community","\u002Fcommunity","8.community\u002Findex",[611],{"title":607,"path":608,"stem":609},"i-lucide-users",{"id":614,"title":521,"body":615,"description":645,"extension":3303,"links":3304,"meta":3305,"navigation":702,"path":522,"seo":3306,"stem":523,"__hash__":3307},"docs\u002F4.developers\u002F7.frameworks\u002F4.render.md",{"type":616,"value":617,"toc":3298},"minimark",[618,639,1147,2127,2136,2321,2324,2439,2471,2571,2574,2584,2629,2659,2679,2682,2778,2810,2814,2817,2875,3143,3198,3251,3286,3290,3295],[619,620,621,622,626,627,630,631,634,635,638],"p",{},"The website editor's rendering core. Framework-free, on ",[623,624,625],"code",{},"@shadestack\u002Ftree",",\n",[623,628,629],{},"@shadestack\u002Fexpressions"," and ",[623,632,633],{},"@shadestack\u002Fstyles","; the four framework packages render what it gives with their own\ncomponents (",[623,636,637],{},"ShadeTree"," in each, below). Everything is decided on the server; the frameworks only write it.",[640,641,646],"pre",{"className":642,"code":643,"language":644,"meta":645,"style":645},"language-ts shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","import { headData, pageSources, resolvePage, sourceKey } from '@shadestack\u002Frender'\n\n\u002F\u002F The data sources the tree and its components name, fetched first (rendering is synchronous).\nconst sources = new Map(await Promise.all(pageSources(tree, library).map(async source => [sourceKey(source), await fetchItems(source)] as const)))\n\nconst result = resolvePage({\n  tree, \u002F\u002F the page's tree, as stored (any schema version)\n  treeId: page.id, \u002F\u002F what its local styles are keyed by\n  components: library, \u002F\u002F { card: { tree, interface, defaults, variants, treeId } }\n  entry, site, \u002F\u002F plain data\n  visitor, \u002F\u002F the account's allow-listed projection, made on the server; read only in server islands, with `signedIn` added\n  sources: source => sources.get(sourceKey(source)),\n  locale: 'nl', defaultLocale: 'nl', timeZone: 'Europe\u002FAmsterdam', translations,\n  media: id => media[id], \u002F\u002F { url, width, height, alt, variants }\n  localStyles: styles.local, \u002F\u002F which nodes get data-s\n  edit: false \u002F\u002F true: every element gets data-shade-node (and data-shade-instance) and its data-s key\n})\nresult.nodes \u002F\u002F the resolved tree: elements, texts and islands\nresult.classes \u002F\u002F the style classes used (the CSS is compileStyles', linked once)\nresult.issues \u002F\u002F what wasn't rendered and where: codes and paths, never the data's values (every ShadeTree tells them on the server)\nconst head = headData({ title, description, canonical, alternates, language: 'nl', image })\n","ts","",[623,647,648,697,704,711,806,811,828,839,862,878,894,905,934,984,1005,1026,1041,1050,1064,1077,1090],{"__ignoreMap":645},[649,650,653,657,661,665,668,671,673,676,678,681,684,687,690,694],"span",{"class":651,"line":652},"line",1,[649,654,656],{"class":655},"s7zQu","import",[649,658,660],{"class":659},"sMK4o"," {",[649,662,664],{"class":663},"sTEyZ"," headData",[649,666,667],{"class":659},",",[649,669,670],{"class":663}," pageSources",[649,672,667],{"class":659},[649,674,675],{"class":663}," resolvePage",[649,677,667],{"class":659},[649,679,680],{"class":663}," sourceKey",[649,682,683],{"class":659}," }",[649,685,686],{"class":655}," from",[649,688,689],{"class":659}," '",[649,691,693],{"class":692},"sfazB","@shadestack\u002Frender",[649,695,696],{"class":659},"'\n",[649,698,700],{"class":651,"line":699},2,[649,701,703],{"emptyLinePlaceholder":702},true,"\n",[649,705,707],{"class":651,"line":706},3,[649,708,710],{"class":709},"sHwdD","\u002F\u002F The data sources the tree and its components name, fetched first (rendering is synchronous).\n",[649,712,714,718,721,724,727,731,734,737,741,744,747,749,752,755,757,760,762,765,767,770,774,777,780,783,786,788,791,794,797,800,803],{"class":651,"line":713},4,[649,715,717],{"class":716},"spNyl","const",[649,719,720],{"class":663}," sources ",[649,722,723],{"class":659},"=",[649,725,726],{"class":659}," new",[649,728,730],{"class":729},"s2Zo4"," Map",[649,732,733],{"class":663},"(",[649,735,736],{"class":655},"await",[649,738,740],{"class":739},"sBMFI"," Promise",[649,742,743],{"class":659},".",[649,745,746],{"class":729},"all",[649,748,733],{"class":663},[649,750,751],{"class":729},"pageSources",[649,753,754],{"class":663},"(tree",[649,756,667],{"class":659},[649,758,759],{"class":663}," library)",[649,761,743],{"class":659},[649,763,764],{"class":729},"map",[649,766,733],{"class":663},[649,768,769],{"class":716},"async",[649,771,773],{"class":772},"sHdIc"," source",[649,775,776],{"class":716}," =>",[649,778,779],{"class":663}," [",[649,781,782],{"class":729},"sourceKey",[649,784,785],{"class":663},"(source)",[649,787,667],{"class":659},[649,789,790],{"class":655}," await",[649,792,793],{"class":729}," fetchItems",[649,795,796],{"class":663},"(source)] ",[649,798,799],{"class":655},"as",[649,801,802],{"class":716}," const",[649,804,805],{"class":663},")))\n",[649,807,809],{"class":651,"line":808},5,[649,810,703],{"emptyLinePlaceholder":702},[649,812,814,816,819,821,823,825],{"class":651,"line":813},6,[649,815,717],{"class":716},[649,817,818],{"class":663}," result ",[649,820,723],{"class":659},[649,822,675],{"class":729},[649,824,733],{"class":663},[649,826,827],{"class":659},"{\n",[649,829,831,834,836],{"class":651,"line":830},7,[649,832,833],{"class":663},"  tree",[649,835,667],{"class":659},[649,837,838],{"class":709}," \u002F\u002F the page's tree, as stored (any schema version)\n",[649,840,842,846,849,852,854,857,859],{"class":651,"line":841},8,[649,843,845],{"class":844},"swJcz","  treeId",[649,847,848],{"class":659},":",[649,850,851],{"class":663}," page",[649,853,743],{"class":659},[649,855,856],{"class":663},"id",[649,858,667],{"class":659},[649,860,861],{"class":709}," \u002F\u002F what its local styles are keyed by\n",[649,863,865,868,870,873,875],{"class":651,"line":864},9,[649,866,867],{"class":844},"  components",[649,869,848],{"class":659},[649,871,872],{"class":663}," library",[649,874,667],{"class":659},[649,876,877],{"class":709}," \u002F\u002F { card: { tree, interface, defaults, variants, treeId } }\n",[649,879,881,884,886,889,891],{"class":651,"line":880},10,[649,882,883],{"class":663},"  entry",[649,885,667],{"class":659},[649,887,888],{"class":663}," site",[649,890,667],{"class":659},[649,892,893],{"class":709}," \u002F\u002F plain data\n",[649,895,897,900,902],{"class":651,"line":896},11,[649,898,899],{"class":663},"  visitor",[649,901,667],{"class":659},[649,903,904],{"class":709}," \u002F\u002F the account's allow-listed projection, made on the server; read only in server islands, with `signedIn` added\n",[649,906,908,911,913,915,917,920,922,925,927,929,932],{"class":651,"line":907},12,[649,909,910],{"class":729},"  sources",[649,912,848],{"class":659},[649,914,773],{"class":772},[649,916,776],{"class":716},[649,918,919],{"class":663}," sources",[649,921,743],{"class":659},[649,923,924],{"class":729},"get",[649,926,733],{"class":663},[649,928,782],{"class":729},[649,930,931],{"class":663},"(source))",[649,933,626],{"class":659},[649,935,937,940,942,944,947,950,952,955,957,959,961,963,965,968,970,972,975,977,979,982],{"class":651,"line":936},13,[649,938,939],{"class":844},"  locale",[649,941,848],{"class":659},[649,943,689],{"class":659},[649,945,946],{"class":692},"nl",[649,948,949],{"class":659},"'",[649,951,667],{"class":659},[649,953,954],{"class":844}," defaultLocale",[649,956,848],{"class":659},[649,958,689],{"class":659},[649,960,946],{"class":692},[649,962,949],{"class":659},[649,964,667],{"class":659},[649,966,967],{"class":844}," timeZone",[649,969,848],{"class":659},[649,971,689],{"class":659},[649,973,974],{"class":692},"Europe\u002FAmsterdam",[649,976,949],{"class":659},[649,978,667],{"class":659},[649,980,981],{"class":663}," translations",[649,983,626],{"class":659},[649,985,987,990,992,995,997,1000,1002],{"class":651,"line":986},14,[649,988,989],{"class":729},"  media",[649,991,848],{"class":659},[649,993,994],{"class":772}," id",[649,996,776],{"class":716},[649,998,999],{"class":663}," media[id]",[649,1001,667],{"class":659},[649,1003,1004],{"class":709}," \u002F\u002F { url, width, height, alt, variants }\n",[649,1006,1008,1011,1013,1016,1018,1021,1023],{"class":651,"line":1007},15,[649,1009,1010],{"class":844},"  localStyles",[649,1012,848],{"class":659},[649,1014,1015],{"class":663}," styles",[649,1017,743],{"class":659},[649,1019,1020],{"class":663},"local",[649,1022,667],{"class":659},[649,1024,1025],{"class":709}," \u002F\u002F which nodes get data-s\n",[649,1027,1029,1032,1034,1038],{"class":651,"line":1028},16,[649,1030,1031],{"class":844},"  edit",[649,1033,848],{"class":659},[649,1035,1037],{"class":1036},"sfNiH"," false",[649,1039,1040],{"class":709}," \u002F\u002F true: every element gets data-shade-node (and data-shade-instance) and its data-s key\n",[649,1042,1044,1047],{"class":651,"line":1043},17,[649,1045,1046],{"class":659},"}",[649,1048,1049],{"class":663},")\n",[649,1051,1053,1056,1058,1061],{"class":651,"line":1052},18,[649,1054,1055],{"class":663},"result",[649,1057,743],{"class":659},[649,1059,1060],{"class":663},"nodes ",[649,1062,1063],{"class":709},"\u002F\u002F the resolved tree: elements, texts and islands\n",[649,1065,1067,1069,1071,1074],{"class":651,"line":1066},19,[649,1068,1055],{"class":663},[649,1070,743],{"class":659},[649,1072,1073],{"class":663},"classes ",[649,1075,1076],{"class":709},"\u002F\u002F the style classes used (the CSS is compileStyles', linked once)\n",[649,1078,1080,1082,1084,1087],{"class":651,"line":1079},20,[649,1081,1055],{"class":663},[649,1083,743],{"class":659},[649,1085,1086],{"class":663},"issues ",[649,1088,1089],{"class":709},"\u002F\u002F what wasn't rendered and where: codes and paths, never the data's values (every ShadeTree tells them on the server)\n",[649,1091,1093,1095,1098,1100,1102,1104,1107,1110,1112,1115,1117,1120,1122,1125,1127,1130,1132,1134,1136,1138,1140,1143,1145],{"class":651,"line":1092},21,[649,1094,717],{"class":716},[649,1096,1097],{"class":663}," head ",[649,1099,723],{"class":659},[649,1101,664],{"class":729},[649,1103,733],{"class":663},[649,1105,1106],{"class":659},"{",[649,1108,1109],{"class":663}," title",[649,1111,667],{"class":659},[649,1113,1114],{"class":663}," description",[649,1116,667],{"class":659},[649,1118,1119],{"class":663}," canonical",[649,1121,667],{"class":659},[649,1123,1124],{"class":663}," alternates",[649,1126,667],{"class":659},[649,1128,1129],{"class":844}," language",[649,1131,848],{"class":659},[649,1133,689],{"class":659},[649,1135,946],{"class":692},[649,1137,949],{"class":659},[649,1139,667],{"class":659},[649,1141,1142],{"class":663}," image ",[649,1144,1046],{"class":659},[649,1146,1049],{"class":663},[1148,1149,1150,1201,1236,1279,1322,1467,1517,1530,1927,1981,2037,2054,2060,2091,2105],"ul",{},[1151,1152,1153,1157,1158,1161,1162,1165,1166,1169,1170,1173,1174,1177,1178,1181,1182,1185,1186,1189,1190,1193,1194,1157,1197,1200],"li",{},[1154,1155,1156],"strong",{},"The resolved tree"," (",[623,1159,1160],{},"resolved.ts",") is plain elements with checked attribute values and texts (never HTML: every\nframework escapes them, and ",[623,1163,1164],{},"toHtml",", the core's own writer, does too), and islands. Bindings are evaluated with\nthe expressions' interpreter; ",[1154,1167,1168],{},"every URL place"," (links, quotations, media, a media library image and its\n",[623,1171,1172],{},"srcset",", a menu item, ",[623,1175,1176],{},"navigate",") goes through the runtime's ",[623,1179,1180],{},"url"," with its own schemes, literal or bound, also for\na tree that skipped the save gate; a link value or a media library image there is its address (an entry's through\n",[623,1183,1184],{},"links","). If keeps only the branch that holds; Each repeats per item of a list or a data source, with its ",[623,1187,1188],{},"empty","\nbranch; component instances render their tree with their properties (literal, bound or the component's\n",[623,1191,1192],{},"defaults","), their slots' content in the scope it was written in and their variant's classes on the top elements.\nA ",[1154,1195,1196],{},"bound property is held to its declared type",[623,1198,1199],{},"boundProperty",": a choice one of its choices, a number finite…),\nor gets its empty value and an issue. A failure shows nothing in its place and is reported.",[1151,1202,1203,1206,1207,1210,1211,1214,1215,1218,1219,1222,1223,1225,1226,1229,1230,1232,1233,743],{},[1154,1204,1205],{},"Rich text"," bound to a text node renders from its schema's nodes and marks only (",[623,1208,1209],{},"richTextNodes","; headings are\n",[623,1212,1213],{},"h2",", ",[623,1216,1217],{},"h3"," or ",[623,1220,1221],{},"h4",", a level rounded and held to them, ",[623,1224,1213],{}," for one that is no number), as much as may stand there: blocks in a ",[623,1227,1228],{},"div",", texts and marks with line breaks in a ",[623,1231,619],{},", its text in an ",[623,1234,1235],{},"option",[1151,1237,1238,1241,1242,1244,1245,1248,1249,1252,1253,1256,1257,1260,1261,1214,1264,1267,1268,1271,1272,1275,1276,1278],{},[1154,1239,1240],{},"Images"," from the media library get ",[623,1243,1172],{}," (the original among the sizes), the tree's ",[623,1246,1247],{},"sizes"," (default\n",[623,1250,1251],{},"100vw","), dimensions, ",[623,1254,1255],{},"loading=\"lazy\"",", the library's alt text, and a ",[623,1258,1259],{},"\u003Cpicture>"," with a source per other format\n(a variant's ",[623,1262,1263],{},"type",[623,1265,1266],{},"image\u002Favif"," before ",[623,1269,1270],{},"image\u002Fwebp","). An image without alt text is written with ",[623,1273,1274],{},"alt=\"\""," and\nreported; ",[623,1277,1274],{}," in the tree marks it decorative.",[1151,1280,1281,1284,1285,1288,1289,1292,1293,1157,1296,1299,1300,1303,1304,1307,1308,1311,1312,1315,1316,1321],{},[1154,1282,1283],{},"Server islands"," read ",[623,1286,1287],{},"visitor","; outside them it is not in scope. They render with the visitor by default (pass\nit on a dynamic route); the page is then the visitor's (",[623,1290,1291],{},"result.personal",") and each package sends it with\n",[623,1294,1295],{},"Cache-Control: private, no-store",[623,1297,1298],{},"cacheHeaders(result)","; in Astro ",[623,1301,1302],{},"applyCacheHeaders(Astro, result)"," in the\npage's frontmatter). ",[623,1305,1306],{},"serverIslands: 'defer'"," makes placeholders for\nAstro's ",[623,1309,1310],{},"server:defer",", rendered per request by ",[623,1313,1314],{},"renderServerIsland(serverIslandPayload(result, key), { visitor })",",\nwhich reads only the visitor fields the payload names. A payload holds what only some visitors may see, so it is\nnever part of the result's data: a result sent as a framework's page data, copied or cloned has none. Next, Nuxt\nand SvelteKit seal it instead (",[1317,1318,1320],"a",{"href":1319},"#deferred-server-islands","Deferred server islands",", below).",[1151,1323,1324,1327,1328,1331,1332,1335,1336,1339,1340,1343,1344,630,1347,1350,1351,1353,1354,1356,1357,1360,1361,1364,1365,1368,1369,1343,1372,1375,1376,1214,1379,1360,1382,1368,1384,1387,1388,1391,1392,1218,1395,1398,1399,1402,1403,1406,1407,1410,1411,1414,1415,1418,1419,1422,1423,1426,1427,1430,1431,1434,1435,1438,1439,1442,1443,1157,1445,1448,1449,1452,1453,1456,1457,1459,1460,1462,1463,1466],{},[1154,1325,1326],{},"Client islands"," carry ",[623,1329,1330],{},"ClientIslandData",": their state's first values and types and a template with everything\ndecided but what depends on the state, an event or a live loop's item. Each live expression carries only the fields\nit reads of the entry, the site, the props and the loops around it, never the visitor. ",[623,1333,1334],{},"createIsland(data, { callRoute, navigate, onError })"," is the islands' runtime all four use: ",[623,1337,1338],{},"view()"," for the nodes to show (elements\nanswering events marked ",[623,1341,1342],{},"data-shade-on","), ",[623,1345,1346],{},"dispatch",[623,1348,1349],{},"start"," for the actions (",[623,1352,1176],{},"\nchecked with ",[623,1355,1180],{}," before it goes, ",[623,1358,1359],{},"callRoute"," through ",[623,1362,1363],{},"callAccountRoute",", its answer and status kept, an idempotent call's key kept until it is done, a\nrepeating call made again through ",[623,1366,1367],{},"schedule"," (by default ",[623,1370,1371],{},"setTimeout",[623,1373,1374],{},"playInteraction"," dispatching\n",[623,1377,1378],{},"shade:interaction",[623,1380,1381],{},"account",[623,1383,1381],{},[623,1385,1386],{},"accountStep"," at ",[623,1389,1390],{},"accountApiBase()",", which reads an email\nlink's ",[623,1393,1394],{},"#confirm=",[623,1396,1397],{},"#reset="," once with ",[623,1400,1401],{},"accountLink",", takes it off the address bar and gives it only to its step,\nand empties the step's password fields after it); kept state read from ",[623,1404,1405],{},"storage",", by default local storage (",[623,1408,1409],{},"sessionStorage"," for ",[623,1412,1413],{},"kept: 'session'",", by default session storage), once the island starts, so the\nfirst view stays the server's), and ",[623,1416,1417],{},"connectIsland(island, wrapper, onChange)"," to run it there: subscribed, its events caught on the wrapper (",[623,1420,1421],{},"listenIsland",") and started, with what stops it all. Islands stand\nin a ",[623,1424,1425],{},"\u003Cshade-island>"," wrapper. On a server the default ",[623,1428,1429],{},"onError"," reports nothing (a throw there would stop the\nserver): what fails in an island's first view is an issue of ",[623,1432,1433],{},"resolvePage","'s, with the island's key. In the browser\nthe packages load ",[623,1436,1437],{},"@shadestack\u002Frender\u002Fisland",", the islands' runtime alone (no resolver, sanitiser or schemas;\n",[623,1440,1441],{},"island-entry.test.ts"," holds what they load to a budget). Two parts are chunks of their own, fetched only on a page\nthat uses them: ",[623,1444,1363],{},[623,1446,1447],{},"@shadestack\u002Fclient\u002Faccount",") on an island's first route call, ",[623,1450,1451],{},"solveChallenge","\n(",[623,1454,1455],{},"@shadestack\u002Fclient\u002Fchallenge",", the island host's ",[623,1458,1451],{}," option) on a ",[623,1461,1359],{}," with ",[623,1464,1465],{},"challenge",", and the account\naction's code when an island shows or runs an account step. A chunk that doesn't load fails its action like any\nother error: it is reported and the actions after it don't run.",[1151,1468,1469,1472,1473,1476,1477,1214,1480,1214,1483,1214,1486,1489,1490,1214,1493,1214,1496,1498,1499,1502,1503,1506,1507,1509,1510,630,1513,1516],{},[1154,1470,1471],{},"Embeds"," are sanitised into elements (",[623,1474,1475],{},"sanitizeEmbed","): a strict allow-list with its own tokenizer; scripts,\nstyles, ",[623,1478,1479],{},"iframe",[623,1481,1482],{},"object",[623,1484,1485],{},"svg",[623,1487,1488],{},"math",", forms and the like go with their content; no ",[623,1491,1492],{},"on…",[623,1494,1495],{},"style",[623,1497,1172],{},";\nURLs through the scheme allow-lists; ids that would clobber the DOM and ",[623,1500,1501],{},"shade-","\u002F",[623,1504,1505],{},"site-"," classes dropped. It\napplies the tree's nesting rules from where the embed stands, as a browser does (a link in a link unwrapped, a ",[623,1508,619],{},"\nclosed before a block, a table's ",[623,1511,1512],{},"tbody",[623,1514,1515],{},"tr"," added), so a browser builds exactly what it gives.",[1151,1518,1519,1157,1522,1525,1526,1529],{},[1154,1520,1521],{},"Limits",[623,1523,1524],{},"RENDER_LIMITS","): components 16 deep (one inside itself refused at once), 1,000 items per loop,\n20,000 nodes and 2,000,000 characters per render, counting texts, attribute values, an embed's attributes and what\nclient islands carry. The client islands' first views (what the server renders of them) share the page's budget:\ntogether they get what the page left of its nodes and characters. Past the depth or a loop's limit, that component or loop gives nothing; past the nodes or the\ncharacters, the whole render gives nothing (islands included) and a ",[623,1527,1528],{},"too-large"," issue.",[1151,1531,1532,1535,1536,1539,1540,1542,1543,1546,1547,630,1550,1157,1553,1556,1557,1560,1561,1564,1565,1462,1568,1214,1571,1462,1574,1577,1578,1581,1582,1585,1586,1589,1590,1593,1594,1597,1598,1601,1602,1605,1606,1157,1609,1612,1613,1615,1616,1619,1620,1623,1624,1612,1627,1630,1631,1634,1635,1637,1638,1641,1642,1645,1646,1649,1650,1653,1654,1157,1657,1660,1661,1664,1665,1668,1669,1672,1673,1676,1677,1680,1681,1684,1685,1214,1687,1690,1691,1693,1694,1697,1698,1701,1702,1705,1706,1709,1710,1713,1714,1157,1717,1214,1720,1214,1722,1214,1725,1728,1729,1732,1733,1736,1737,1741,1742,1744,1745,1748,1749,1751,1752,1756,1757,1760,1761,1764,1765,1214,1768,1214,1771,626,1774,1214,1777,1214,1780,630,1783,1786,1787,1539,1790,1792,1793,1795,1796,1214,1799,1214,1802,1805,1806,1795,1808,626,1811,1214,1813,1805,1816,1795,1818,1214,1821,1214,1824,1805,1827,1795,1829,1214,1832,1834,1835,1795,1837,1214,1839,1214,1842,1214,1844,1214,1847,1805,1850,630,1852,1795,1854,1856,1857,1157,1860,1863,1864,1214,1867,630,1870,1873,1874,1214,1877,1880,1881,1884,1885,1887,1888,1890,1891,1894,1895,1897,1898,1900,1901,1880,1904,1907,1908,1910,1911,1914,1915,1918,1919,1922,1923,1926],{},[1154,1533,1534],{},"Widgets"," a tree names by a reserved id (",[623,1537,1538],{},"WIDGETS",", in ",[623,1541,625],{}," so a check knows them without the\nrenderer, holds their interfaces for the tree's ",[623,1544,1545],{},"ComponentLookup","):\n",[623,1548,1549],{},"shade:disclosure",[623,1551,1552],{},"shade:accordion",[623,1554,1555],{},"\u003Cdetails>",", no script), ",[623,1558,1559],{},"shade:dialog"," (a modal ",[623,1562,1563],{},"\u003Cdialog>"," with its\nbutton), ",[623,1566,1567],{},"shade:tabs",[623,1569,1570],{},"shade:tab",[623,1572,1573],{},"shade:menu",[623,1575,1576],{},"shade:menu-item"," (links), each with ARIA's pattern (until the script runs, every tab panel\nshows and a menu's links are a plain list, so nothing is out of reach without it), and\n",[623,1579,1580],{},"shade:skip-link"," (to ",[623,1583,1584],{},"#main",", shown when it has focus) for the top of the header part; ",[623,1587,1588],{},"shade:navigation",", a\nlabelled ",[623,1591,1592],{},"\u003Cnav>"," (its ",[623,1595,1596],{},"items"," slot) with a ",[1154,1599,1600],{},"Menu"," button below 48rem that Escape and a click outside close, or\nbelow one of the site's breakpoints when its ",[623,1603,1604],{},"foldAt"," names it, or never with ",[623,1607,1608],{},"foldAt: \"none\"",[623,1610,1611],{},"NO_FOLD"," of\n",[623,1614,633],{},", which no breakpoint may be called). It is written as ",[623,1617,1618],{},"data-shade-fold"," on the element; the\nrules are in the site's ",[623,1621,1622],{},"styles.css",", which the website module writes with ",[623,1625,1626],{},"navigationFoldCss",[623,1628,1629],{},"@shadestack\u002Frender\u002Fnavigation-fold"," for the breakpoints its live navigations name. ",[623,1632,1633],{},"render.css"," stands a navigation\nwith ",[623,1636,1618],{}," in a row (its button hidden) at every width, and the fold rules, more specific, fold it below\nits breakpoint and stack its menu there; so one set to ",[623,1639,1640],{},"none",", or whose breakpoint has no rules, never folds and stays\nin a row. ",[623,1643,1644],{},"@shadestack\u002Fa11y"," warns of the second (",[623,1647,1648],{},"navigation-fold","); and\n",[623,1651,1652],{},"shade:icon",", a Lucide icon by ",[623,1655,1656],{},"name",[623,1658,1659],{},"@iconify-json\u002Flucide","), hidden from screen readers unless it has a ",[623,1662,1663],{},"label",",\nin a client island only with a fixed name (its SVG travels in the island's template); and ",[623,1666,1667],{},"shade:year",", this year as the render's (in ",[623,1670,1671],{},"timeZone",", at ",[623,1674,1675],{},"now","), which the\nvisitor's browser sets to its own; ",[623,1678,1679],{},"shade:mode-switch",", a button showing the page's light or dark mode and switching it; ",[623,1682,1683],{},"shade:code",", a code sample\n(",[623,1686,623],{},[623,1688,1689],{},"language",") highlighted on the server with Prism's tokenizer into ",[623,1692,649],{},"s classed by kind, never in a client\nisland; and ",[623,1695,1696],{},"shade:pause-motion",", a button\n(its ",[623,1699,1700],{},"pauseMotion"," word by default) hidden until its script shows it, pressed while the page's animations are paused:\na press keeps the choice (",[623,1703,1704],{},"localStorage['shade-motion']",") and sends ",[623,1707,1708],{},"shade:motion"," on ",[623,1711,1712],{},"document",", which the\ninteractions runtime follows; never in a client island; and ",[623,1715,1716],{},"shade:embed",[623,1718,1719],{},"category",[623,1721,1180],{},[623,1723,1724],{},"title",[623,1726,1727],{},"ratio","), an\noutside player or map behind the visitor's consent: give the render ",[623,1730,1731],{},"consent"," (the site data's categories,\n",[623,1734,1735],{},"renderInputFor"," does) and it renders a notice from one of the category's hosts, which the consent runtime turns\ninto the frame once allowed (",[1317,1738,1740],{"href":1739},"\u002Fdevelopers\u002Fframeworks#the-consent-banner","The consent banner","). The words a widget says when the\neditor gave none (a dialog's close button, the skip link, the navigation's name and ",[1154,1743,1600],{}," button, the mode\nswitch, the pause control, an embed's notice) are the render's ",[623,1746,1747],{},"words",": the site data's, in the page's language,\nwhich ",[623,1750,1735],{}," gives (",[1317,1753,1755],{"href":1754},"\u002Fdevelopers\u002Fframeworks#the-sites-words","The site's words","). Without them such a widget is left\nout, with an issue. Their behaviour is\n",[623,1758,1759],{},"defineWidgets()"," of ",[623,1762,1763],{},"@shadestack\u002Frender\u002Fdom",": custom elements ",[623,1766,1767],{},"shade-dialog",[623,1769,1770],{},"shade-tabs",[623,1772,1773],{},"shade-menu",[623,1775,1776],{},"shade-mode-switch",[623,1778,1779],{},"shade-navigation",[623,1781,1782],{},"shade-pause-motion",[623,1784,1785],{},"shade-year",", the same\nfor every framework (each package loads it). An instance's classes go on its widget's outermost element, after\nthe widget's own (a tab's on its tab, a menu item's on its list item). A widget names the inner elements a site may\nstyle (",[623,1788,1789],{},"ComponentInterface.parts",[623,1791,1538],{},"): ",[623,1794,1567],{}," ",[623,1797,1798],{},"list",[623,1800,1801],{},"tab",[623,1803,1804],{},"panel","; ",[623,1807,1573],{},[623,1809,1810],{},"button",[623,1812,1798],{},[623,1814,1815],{},"item",[623,1817,1588],{},[623,1819,1820],{},"toggle",[623,1822,1823],{},"nav",[623,1825,1826],{},"content",[623,1828,1549],{},[623,1830,1831],{},"summary",[623,1833,1826],{},";\n",[623,1836,1559],{},[623,1838,1810],{},[623,1840,1841],{},"dialog",[623,1843,1724],{},[623,1845,1846],{},"close",[623,1848,1849],{},"body",[623,1851,1679],{},[623,1853,1696],{},[623,1855,1810],{},".\nAn instance's ",[623,1858,1859],{},"parts",[623,1861,1862],{},"{ tab: ['pill'] }",") puts those classes on them, after the widget's own class, and the\nstyles' states ",[623,1865,1866],{},"selected",[623,1868,1869],{},"expanded",[623,1871,1872],{},"current"," (experimental) match their ",[623,1875,1876],{},"aria-selected",[623,1878,1879],{},"aria-expanded"," and\n",[623,1882,1883],{},"aria-current",". Their buttons are 24px high at least (",[623,1886,1633],{},"). ",[623,1889,1573],{}," takes an ",[623,1892,1893],{},"icon"," (a Lucide name)\nbefore its label, and its items may come from an Each; a ",[623,1896,1576],{},"'s ",[623,1899,1689],{}," writes its link's ",[623,1902,1903],{},"hreflang",[623,1905,1906],{},"lang",", and ",[623,1909,1872],{}," its ",[623,1912,1913],{},"aria-current=\"page\"",". The accessibility check sees a widget's own classes, its parts'\nclasses and the labels an instance gives it, so their contrast is checked in every state. Their ids are ",[623,1916,1917],{},"shade:\u003CidScope>:\u003Cn>",", the scope the render's ",[623,1920,1921],{},"treeId","\nunless ",[623,1924,1925],{},"idScope"," names one: resolve each part of a page (header, page, footer) with its own.",[1151,1928,1929,1932,1933,1935,1936,1939,1940,1935,1942,1944,1945,1947,1948,1214,1951,630,1953,1956,1957,1959,1960,1962,1963,1966,1967,1969,1970,1972,1973,1976,1977,1980],{},[1154,1930,1931],{},"Code components",": components a frontend registers in its own code, by name. Give their names to\n",[623,1934,1433],{}," as ",[623,1937,1938],{},"codeComponents"," and the components to the package's ",[623,1941,637],{},[623,1943,623],{},". An instance naming one\nresolves to a ",[623,1946,623],{}," node: its properties now (a binding evaluated), its slots' content resolved like the rest; the\npackage renders the frontend's component there (Astro gives it ",[623,1949,1950],{},"node",[623,1952,623],{},[623,1954,1955],{},"context",", the page's ",[623,1958,1955],{},"\npassed along; React ",[623,1961,1950],{}," and its rendered ",[623,1964,1965],{},"slots","; Vue ",[623,1968,1950],{}," and Vue slots; Svelte ",[623,1971,1950],{},", with ",[623,1974,1975],{},"ShadeNode"," for\nthe slots). In edit mode it stands in a ",[623,1978,1979],{},"\u003Cshade-code>"," wrapper with its markers. Code components render on the\nserver only (never in an island or a live part); a name the library has too is refused; they take no classes and\ntheir properties are plain data.",[1151,1982,1983,1157,1986,1989,1990,1462,1992,1995,1996,1999,2000,1935,2003,2006,2007,2010,2011,2014,2015,2018,2019,1157,2022,2024,2025,1214,2028,1218,2031,2034,2035,743],{},[1154,1984,1985],{},"Head data",[623,1987,1988],{},"headData","): title, description, canonical, ",[623,1991,1903],{},[623,1993,1994],{},"x-default",", Open Graph and\n",[623,1997,1998],{},"structuredData"," (JSON-LD objects, written by ",[623,2001,2002],{},"scriptJson",[623,2004,2005],{},"jsonLd",", which nothing can end); absolute http(s)\naddresses only (an image https). Each package writes it through its framework's head API, and each JSON-LD writer\n(Next's ",[623,2008,2009],{},"ShadeJsonLd",", Astro's and Svelte's ",[623,2012,2013],{},"ShadeHead",", Nuxt's ",[623,2016,2017],{},"shadeHead",") leaves out an entry that\n",[623,2020,2021],{},"isScriptJson",[623,2023,1437],{},") refuses: one with a ",[623,2026,2027],{},"\u003C",[623,2029,2030],{},">",[623,2032,2033],{},"&",", which didn't come from ",[623,2036,2002],{},[1151,2038,2039,1157,2042,2045,2046,2049,2050,2053],{},[1154,2040,2041],{},"Sitemap",[623,2043,2044],{},"sitemapXml(entries)","): the sitemap protocol's XML with each page's other languages, every address\nchecked, for a route of the site's own (an Astro endpoint, Next's ",[623,2047,2048],{},"app\u002Fsitemap.xml\u002Froute.ts",", a Nuxt server route,\na SvelteKit ",[623,2051,2052],{},"+server.ts",").",[1151,2055,2056,2059],{},[623,2057,2058],{},"@shadestack\u002Frender\u002Frender.css",": the islands' wrappers and the widgets' few styles, in the theme's variables. Link\nit once.",[1151,2061,2062,2064,2065,1214,2067,1880,2070,2073,2074,2076,2077,2080,2081,2083,2084,2086,2087,2090],{},[623,2063,1763],{},": the browser side without a framework: ",[623,2066,1759],{},[623,2068,2069],{},"mountIsland",[623,2071,2072],{},"defineIslands()"," (a client island patched in place, used by Astro). A renderer that writes the ",[623,2075,1425],{},"\nwrapper by hand writes its data after it with ",[623,2078,2079],{},"islandDataScript(island)"," from ",[623,2082,693],{},", never by hand:\nit is ",[623,2085,2002],{},"'s output in the script element ",[623,2088,2089],{},"defineIslands"," reads.",[1151,2092,2093,2096,2097,2100,2101,2104],{},[623,2094,2095],{},"@shadestack\u002Frender\u002Fserver-islands",": ",[623,2098,2099],{},"loadServerIslands({ base })",", which fills a static page's deferred server\nislands in Next, Nuxt and SvelteKit from ",[623,2102,2103],{},"\u003Cbase>\u002Fshade-island"," (its own chunk, loaded only by a page that has some).",[1151,2106,2107,2096,2110,2113,2114,630,2117,2120,2121,2123,2124,2126],{},[623,2108,2109],{},"@shadestack\u002Frender\u002Fconformance",[623,2111,2112],{},"FIXTURES"," (trees with the HTML every renderer must give, XSS and URL fixtures\namong them), ",[623,2115,2116],{},"fixtureResult",[623,2118,2119],{},"normalizeHtml",". A renderer passes when every fixture's result (",[623,2122,2116],{},":\nits ",[623,2125,1433],{}," result, or that result tampered with, for what a renderer must check again), rendered, normalises\nto the fixture's HTML; the core, Astro, Next, Nuxt and SvelteKit are all held to it.",[619,2128,2129,2130,2132,2133,2135],{},"Each framework package's ",[623,2131,637],{}," renders a ",[623,2134,1433],{}," result:",[2137,2138,2139,2159],"table",{},[2140,2141,2142],"thead",{},[1515,2143,2144,2148,2151,2153,2156],{},[2145,2146,2147],"th",{},"Package",[2145,2149,2150],{},"Component",[2145,2152,1326],{},[2145,2154,2155],{},"Head",[2145,2157,2158],{},"A visitor's page",[1512,2160,2161,2209,2254,2289],{},[1515,2162,2163,2169,2174,2195,2204],{},[2164,2165,2166],"td",{},[623,2167,2168],{},"@shadestack\u002Fastro\u002Ftree",[2164,2170,2171],{},[623,2172,2173],{},"\u003CShadeTree result accountApi>",[2164,2175,2176,2177,1157,2179,2181,2182,1157,2184,2187,2188,630,2191,2194],{},"their first view, their data as JSON after it, patched by ",[623,2178,1425],{},[623,2180,1763],{},"); deferred server islands with ",[623,2183,1310],{},[623,2185,2186],{},"accountApi",": the site's ",[623,2189,2190],{},"SHADE_API_URL",[623,2192,2193],{},"SHADE_ACCOUNT_URL",")",[2164,2196,2197,2200,2201],{},[623,2198,2199],{},"\u003CShadeHead head>"," in ",[623,2202,2203],{},"\u003Chead>",[2164,2205,2206,2208],{},[623,2207,1302],{}," in the page's frontmatter",[1515,2210,2211,2216,2222,2231,2246],{},[2164,2212,2213],{},[623,2214,2215],{},"@shadestack\u002Fnext",[2164,2217,2218,2221],{},[623,2219,2220],{},"\u003CShadeTree result>"," (a server component)",[2164,2223,2224,2227,2228],{},[623,2225,2226],{},"ShadeClientIsland",", a client component on ",[623,2229,2230],{},"useSyncExternalStore",[2164,2232,2233,2080,2236,2239,2240,1343,2243],{},[623,2234,2235],{},"shadeMetadata(head)",[623,2237,2238],{},"generateMetadata"," (robots as it says; meta it has no field for in ",[623,2241,2242],{},"other",[623,2244,2245],{},"\u003CShadeJsonLd head>",[2164,2247,2248,1157,2251,2253],{},[623,2249,2250],{},"await shadeNoStore(result)",[623,2252,637],{}," warns once of a personal result it never saw)",[1515,2255,2256,2261,2267,2272,2277],{},[2164,2257,2258],{},[623,2259,2260],{},"@shadestack\u002Fnuxt",[2164,2262,2263,2266],{},[623,2264,2265],{},"\u003CShadeTree :result>"," (registered by the module)",[2164,2268,2269,2271],{},[623,2270,2226],{},", state in a ref, hydrated with the page",[2164,2273,2274],{},[623,2275,2276],{},"useHead(shadeHead(head))",[2164,2278,2279,2281,2282,1805,2285,2288],{},[623,2280,637],{}," sends the HTML with ",[623,2283,2284],{},"no-store",[623,2286,2287],{},"shadeNoStore(event, result)"," in the server route sends its JSON so",[1515,2290,2291,2296,2301,2306,2311],{},[2164,2292,2293],{},[623,2294,2295],{},"@shadestack\u002Fsveltekit",[2164,2297,2298],{},[623,2299,2300],{},"\u003CShadeTree {result}>",[2164,2302,2303,2305],{},[623,2304,2226],{},", state in runes",[2164,2307,2308],{},[623,2309,2310],{},"\u003CShadeHead {head} \u002F>",[2164,2312,2313,2200,2316,1157,2319,2253],{},[623,2314,2315],{},"shadeNoStore(result, setHeaders)",[623,2317,2318],{},"load",[623,2320,637],{},[619,2322,2323],{},"The same in every package (review rendering 7):",[1148,2325,2326,2336,2356,2388,2399,2415,2429],{},[1151,2327,2328,2331,2332,2335],{},[1154,2329,2330],{},"What it renders",": the input of ",[623,2333,2334],{},"@shadestack\u002Fclient\u002Frender"," (above), on the server.",[1151,2337,2338,2342,2343,1214,2345,2347,2348,2350,2351,2353,2354,2053],{},[1154,2339,2340],{},[623,2341,623],{},": the frontend's code components (above), as each framework writes components (Astro's get ",[623,2344,1950],{},[623,2346,623],{},"\nand ",[623,2349,1955],{},"; React's ",[623,2352,1950],{}," and their slots rendered; Vue's and Svelte's ",[623,2355,1950],{},[1151,2357,2358,2363,2364,2367,2368,1214,2371,2374,2375,2378,2379,2381,2382,2384,2385,743],{},[1154,2359,2360],{},[623,2361,2362],{},"interactions",": a page's interactions. Astro writes them as the page's JSON script (",[623,2365,2366],{},"pageInteractionsJson",") and\nloads the runtime in a script of its own; Next, Nuxt and SvelteKit load the runtime once the page is mounted, only\nfor a page that has some (",[623,2369,2370],{},"hasPageInteractions",[623,2372,2373],{},"@shadestack\u002Finteractions\u002Fpresent","), and give it the interactions as\ndata, again with the next page's when the framework keeps the page's component. All four start it the same way\n(",[623,2376,2377],{},"bootPageInteractions","), which also plays what an island's ",[623,2380,1374],{}," asks for: the island's\n",[623,2383,1378],{}," event, with its tree and the element whose action ran, reaches the runtime's ",[623,2386,2387],{},"play()",[1151,2389,2390,2393,2394,1157,2397,2053],{},[1154,2391,2392],{},"Islands",": each runs its client islands through ",[623,2395,2396],{},"connectIsland",[623,2398,1437],{},[1151,2400,2401,2404,2405,2408,2409,1214,2412,2053],{},[1154,2402,2403],{},"Issues",": each tells a result's ",[623,2406,2407],{},"issues"," on the server, once per issue (",[623,2410,2411],{},"reportRenderIssues",[623,2413,2414],{},"issueText",[1151,2416,2417,2096,2420,630,2423,1157,2426,2428],{},[1154,2418,2419],{},"A page by its path",[623,2421,2422],{},"findPage(client, …)",[623,2424,2425],{},"shadeFromEnv(env)",[623,2427,2334],{},"'s; SvelteKit takes\nthe rest route's path as one string).",[1151,2430,2431,2433,2434,2436,2437,743],{},[1154,2432,1320],{},": Astro's are ",[623,2435,1310],{},"'s; Next, Nuxt and SvelteKit seal them into their\nplaceholders and fill them from the site's island route (below). On a page rendered per request, all four can\ninstead give the visitor to ",[623,2438,1433],{},[619,2440,2441,2442,2445,2446,2448,2449,2452,2453,626,2456,1214,2458,1214,2460,630,2462,1907,2465,2468,2469,2053],{},"None of them sets HTML from a string but an icon's SVG, and only once ",[623,2443,2444],{},"isIconSvg"," says it is the icon set's own (its\nstart tag and Lucide's shapes, nothing that links, runs or styles); structured data, ",[623,2447,2002],{},"'s output, is a\nscript's text as it is. Each checks every tag and attribute name again (",[623,2450,2451],{},"isWritableTag",", which also refuses ",[623,2454,2455],{},"script",[623,2457,1495],{},[623,2459,1479],{},[623,2461,1482],{},[623,2463,2464],{},"embed",[623,2466,2467],{},"writableAttributes",") and leaves out what fails, an icon that isn't the\nset's too, and keys each client island by its key, so new data (the next page of a route, a refresh) makes a new\nisland. The conformance suite holds them to it with a result tampered with (",[623,2470,2116],{},[619,2472,2473,2474,2096,2477,1157,2480,1214,2483,1214,2486,1214,2489,1214,2492,1880,2495,1214,2498,630,2501,1214,2504,1214,2507,1214,2510,1214,2513,626,2516,1214,2519,630,2522,1214,2525,1214,2528,2531,2532,2535,2536,2539,2540,1214,2543,626,2546,1214,2549,2552,2553,2556,2557,2560,2561,2564,2565,1897,2567,2570],{},"Code, in ",[623,2475,2476],{},"shade-frontend",[623,2478,2479],{},"packages\u002Frender\u002Fsrc\u002F",[623,2481,2482],{},"resolve.ts",[623,2484,2485],{},"properties.ts",[623,2487,2488],{},"richtext.ts",[623,2490,2491],{},"template.ts",[623,2493,2494],{},"island.ts",[623,2496,2497],{},"island-entry.ts",[623,2499,2500],{},"sanitize.ts",[623,2502,2503],{},"tokenize.ts",[623,2505,2506],{},"attributes.ts",[623,2508,2509],{},"names.ts",[623,2511,2512],{},"widgets.ts",[623,2514,2515],{},"head.ts",[623,2517,2518],{},"sitemap.ts",[623,2520,2521],{},"defer.ts",[623,2523,2524],{},"seal.ts",[623,2526,2527],{},"dom\u002F",[623,2529,2530],{},"conformance\u002F","), and each package's ",[623,2533,2534],{},"tree"," files. Tests: ",[623,2537,2538],{},"packages\u002Frender\u002Ftest\u002F*.test.ts",", the\nconformance suite in each package (",[623,2541,2542],{},"packages\u002Fnext\u002Ftest\u002Ftree.test.tsx",[623,2544,2545],{},"packages\u002Fnuxt\u002Ftest\u002Ftree.test.ts",[623,2547,2548],{},"packages\u002Fsveltekit\u002Ftest\u002Ftree.test.ts",[623,2550,2551],{},"packages\u002Fastro\u002Ftest\u002Ftree\u002Ftree.test.ts","), the widgets and the DOM runtime in a\nreal browser (",[623,2554,2555],{},"e2e\u002Ftests\u002Frender-dom.spec.ts","), and one island page hydrated by React, Vue, Svelte and the DOM runtime\nin a real browser (",[623,2558,2559],{},"e2e\u002Ftests\u002Frender-frameworks.spec.ts",", built from the packages' sources by ",[623,2562,2563],{},"e2e\u002Frender-bundles.ts","). These browser tests need no SHADE instance: they are in ",[623,2566,2476],{},[623,2568,2569],{},"e2e\u002F",", with its own Playwright.",[1213,2572,1320],{"id":2573},"deferred-server-islands",[619,2575,2576,2577,1157,2579,1462,2581,2583],{},"A statically built page shows its server islands (\"Welcome back, Sam\", a cart count, \"My bookings\") per visitor in\nevery framework. Astro renders them with ",[623,2578,1310],{},[623,2580,637],{},[623,2582,2186],{},"). Next, Nuxt and SvelteKit do\nthe same in three steps:",[2585,2586,2587,2611,2621],"ol",{},[1151,2588,2589,2590,1157,2592,2595,2596,2599,2600,2603,2604,2607,2608,2610],{},"Resolve the page with ",[623,2591,1306],{},[623,2593,2594],{},"renderPublishedPage(page, context, { deferIslands: true })","), then\nseal it on the server: ",[623,2597,2598],{},"await deferServerIslands(result)"," (SvelteKit: ",[623,2601,2602],{},"deferServerIslands(result, env)","). Each\nisland becomes an empty ",[623,2605,2606],{},"\u003Cshade-island data-shade-defer=\"…\">"," holding its payload sealed with the site's secret.\nRender that result with ",[623,2609,637],{},"; it may go through the framework's page data.",[1151,2612,2613,2614,2617,2618,2053],{},"Add the island route, ",[623,2615,2616],{},"GET \u002Fshade-island"," on the site's own origin, under its base path if it has one (the setup\nper framework is in ",[1317,2619,2620],{"href":504},"the frameworks' pages",[1151,2622,2623,2625,2626,2628],{},[623,2624,637],{}," loads ",[623,2627,2095],{}," once the page is mounted, on a page that has deferred\nislands. It asks the route once per island, with the visitor's sign-in cookie, and puts the answer in the island.",[619,2630,2631,2632,2634,2635,2637,2638,2641,2642,2645,2646,1760,2649,2652,2653,1157,2655,2658],{},"A site under a base path has its island route there too: ",[623,2633,637],{}," tells the loader the base, and it asks\n",[623,2636,2103],{},". Nuxt (",[623,2639,2640],{},"app.baseURL",") and SvelteKit (",[623,2643,2644],{},"paths.base",") give it on their own; in Next, pass the\n",[623,2647,2648],{},"basePath",[623,2650,2651],{},"next.config"," to ",[623,2654,637],{},[623,2656,2657],{},"\u003CShadeTree result={result} basePath=\"\u002Fdocs\" \u002F>","; default none).",[619,2660,2661,2662,2665,2666,2669,2670,2672,2673,2675,2676,2053],{},"Set ",[623,2663,2664],{},"SHADE_ISLAND_SECRET"," (at least 32 characters, made with ",[623,2667,2668],{},"openssl rand -base64 48",") in the build's environment\nand the server's, the same in both. ",[623,2671,2190],{}," (or ",[623,2674,2193],{}," when the account API has its own address) tells\nthe route where to ask who is signed in. The account API must be on the site's origin for the cookie to come along, as\nfor every visitor route (",[1317,2677,2678],{"href":510},"accounts",[619,2680,2681],{},"How it holds:",[1148,2683,2684,2690,2703,2723,2739,2749,2768],{},[1151,2685,2686,2689],{},[1154,2687,2688],{},"Sealed, not signed."," A payload holds both branches of a condition on the visitor (what a signed-in visitor sees,\nand what nobody does), so it is encrypted with AES-256-GCM (Web Crypto; the key derived from the secret with\nHKDF-SHA-256). Nobody can read it in the page or change it: the route refuses a payload that doesn't open.\nChanging the secret refuses every earlier page's islands until the next build.",[1151,2691,2692,2695,2696,2699,2700,2702],{},[1154,2693,2694],{},"Bounded."," A sealed payload is at most 8,000 characters (",[623,2697,2698],{},"SERVER_ISLAND_TOKEN_LIMIT","), since it travels in the\naddress. A larger island stays empty, for nobody, with a ",[623,2701,1528],{}," issue in the build's log.",[1151,2704,2705,2708,2709,2712,2713,2716,2717,2719,2720,2722],{},[1154,2706,2707],{},"Deny by default."," The route answers GET only (405 otherwise), refuses a request whose ",[623,2710,2711],{},"Sec-Fetch-Site"," is not\n",[623,2714,2715],{},"same-origin"," (403) and a payload missing, too long or changed (400), always with an empty body. Its answer is the\nisland's HTML (the core's ",[623,2718,1164],{},") with ",[623,2721,1295],{},". A render that fails answers an empty\n500; the reason is only in the server's log.",[1151,2724,2725,2728,2729,2731,2732,1214,2735,2738],{},[1154,2726,2727],{},"Same origin."," The base path comes from the framework's own setting, never from the page or its tree. The loader\nrefuses, before asking anything, a base that isn't empty or a path starting with ",[623,2730,1502],{}," (no ",[623,2733,2734],{},"\u002F\u002F",[623,2736,2737],{},"\\",", scheme, query\nor fragment).",[1151,2740,2741,2744,2745,2748],{},[1154,2742,2743],{},"For a year."," A seal carries when it was made, and the route refuses one older than a year\n(",[623,2746,2747],{},"SERVER_ISLAND_MAX_AGE","), so a token copied from a page stops working in time. Build a static page again within a\nyear, or its islands stay empty, for nobody.",[1151,2750,2751,2754,2755,2758,2759,1214,2761,1214,2764,2767],{},[1154,2752,2753],{},"Only what it reads."," The visitor is the account API's session for the request's ",[623,2756,2757],{},"shade_account.*"," cookies (the site's\nothers stay with the site), projected to the fields the island reads (",[623,2760,1656],{},[623,2762,2763],{},"email",[623,2765,2766],{},"signedIn","); nobody without\na session, or when the API can't say within 3 seconds.",[1151,2769,2770,2773,2774,2777],{},[1154,2771,2772],{},"Accessible."," Until it is filled, and when the request fails, the island is an empty wrapper, as Astro's fallback:\nnothing is announced, and filling it announces nothing either. Calling ",[623,2775,2776],{},"loadServerIslands"," again asks again for an\nisland whose request failed.",[619,2779,2780,2781,630,2784,1157,2787,2789,2790,630,2793,1157,2796,2798,2799,2801,2802,2805,2806,2809],{},"The functions are ",[623,2782,2783],{},"sealServerIslands(result, secret)",[623,2785,2786],{},"openServerIsland(token, secret, maxAge?)",[623,2788,693],{},"),\n",[623,2791,2792],{},"answerServerIsland(request, options)",[623,2794,2795],{},"serverIslandRoute(env)",[623,2797,2334],{},"), and\n",[623,2800,2099],{},". The conformance suite's ",[623,2803,2804],{},"DEFERRED_FIXTURES"," hold the core and the three packages to the same\nplaceholders and the same answers for a signed-in visitor and for nobody, and to refusing a changed payload;\n",[623,2807,2808],{},"e2e\u002Ftests\u002Frender-deferred.spec.ts"," fills an island with React, Vue and Svelte in a real browser, at the root and under a base path.",[1213,2811,2813],{"id":2812},"the-website-editors-canvas","The website editor's canvas",[619,2815,2816],{},"The website editor edits a page over the frontend itself. A frontend that supports it\nhas two routes:",[1148,2818,2819,2860],{},[1151,2820,2821,1157,2824,2827,2828,2831,2832,2835,2836,2839,2840,1452,2843,1214,2845,1214,2848,2851,2852,2855,2856,2859],{},[1154,2822,2823],{},"The edit route",[623,2825,2826],{},"\u002Fpreview\u002Fcanvas?token=…"," on SHADE's site): reads the draft with the preview token\n(",[623,2829,2830],{},"shade.canvas(token)",", the website module's ",[623,2833,2834],{},"\u002Fapi\u002Fv1\u002Fcontent\u002Fwebsite\u002Fcanvas",": the page and its stored node tree),\nrenders the tree with ",[623,2837,2838],{},"resolvePage({ …, edit: true })"," in the site's layout, sends ",[623,2841,2842],{},"canvasHeaders(adminOrigin)",[623,2844,2284],{},[623,2846,2847],{},"noindex",[623,2849,2850],{},"no-referrer",", so the address with its token goes nowhere, and ",[623,2853,2854],{},"frame-ancestors"," for the\nadmin) and starts ",[623,2857,2858],{},"connectCanvas"," in the browser.",[1151,2861,2862,1157,2865,1792,2868,2871,2872,743],{},[1154,2863,2864],{},"The render route",[623,2866,2867],{},"POST \u002Fpreview\u002Fcanvas\u002Frender",[623,2869,2870],{},"readCanvasRequest(request)"," (same host, at most 2 MB, a\ntoken and a tree; else the response to answer with), then the same render without the layout: what goes inside\n",[623,2873,2874],{},"\u003Cmain>",[640,2876,2878],{"className":642,"code":2877,"language":644,"meta":645,"style":645},"import { connectCanvas } from '@shadestack\u002Fclient\u002Fcanvas'\n\nconnectCanvas({\n  adminOrigin, \u002F\u002F the only origin the canvas listens to and answers (of an address, only its origin counts)\n  async render(body) { \u002F\u002F { token, tree }: the editor's draft\n    const response = await fetch('\u002Fpreview\u002Fcanvas\u002Frender', { method: 'POST', headers: { 'content-type': 'application\u002Fjson' }, body: JSON.stringify(body) })\n    if (response.status === 401) return { error: 'expired' }\n    return response.ok ? { html: await response.text() } : { error: 'failed' }\n  }\n})\n",[623,2879,2880,2900,2904,2912,2922,2941,3034,3078,3132,3137],{"__ignoreMap":645},[649,2881,2882,2884,2886,2889,2891,2893,2895,2898],{"class":651,"line":652},[649,2883,656],{"class":655},[649,2885,660],{"class":659},[649,2887,2888],{"class":663}," connectCanvas",[649,2890,683],{"class":659},[649,2892,686],{"class":655},[649,2894,689],{"class":659},[649,2896,2897],{"class":692},"@shadestack\u002Fclient\u002Fcanvas",[649,2899,696],{"class":659},[649,2901,2902],{"class":651,"line":699},[649,2903,703],{"emptyLinePlaceholder":702},[649,2905,2906,2908,2910],{"class":651,"line":706},[649,2907,2858],{"class":729},[649,2909,733],{"class":663},[649,2911,827],{"class":659},[649,2913,2914,2917,2919],{"class":651,"line":713},[649,2915,2916],{"class":663},"  adminOrigin",[649,2918,667],{"class":659},[649,2920,2921],{"class":709}," \u002F\u002F the only origin the canvas listens to and answers (of an address, only its origin counts)\n",[649,2923,2924,2927,2930,2932,2934,2936,2938],{"class":651,"line":808},[649,2925,2926],{"class":716},"  async",[649,2928,2929],{"class":844}," render",[649,2931,733],{"class":659},[649,2933,1849],{"class":772},[649,2935,2194],{"class":659},[649,2937,660],{"class":659},[649,2939,2940],{"class":709}," \u002F\u002F { token, tree }: the editor's draft\n",[649,2942,2943,2946,2949,2952,2954,2957,2959,2961,2964,2966,2968,2970,2973,2975,2977,2980,2982,2984,2987,2989,2991,2993,2996,2998,3000,3002,3005,3007,3010,3013,3015,3018,3020,3023,3025,3027,3030,3032],{"class":651,"line":813},[649,2944,2945],{"class":716},"    const",[649,2947,2948],{"class":663}," response",[649,2950,2951],{"class":659}," =",[649,2953,790],{"class":655},[649,2955,2956],{"class":729}," fetch",[649,2958,733],{"class":844},[649,2960,949],{"class":659},[649,2962,2963],{"class":692},"\u002Fpreview\u002Fcanvas\u002Frender",[649,2965,949],{"class":659},[649,2967,667],{"class":659},[649,2969,660],{"class":659},[649,2971,2972],{"class":844}," method",[649,2974,848],{"class":659},[649,2976,689],{"class":659},[649,2978,2979],{"class":692},"POST",[649,2981,949],{"class":659},[649,2983,667],{"class":659},[649,2985,2986],{"class":844}," headers",[649,2988,848],{"class":659},[649,2990,660],{"class":659},[649,2992,689],{"class":659},[649,2994,2995],{"class":844},"content-type",[649,2997,949],{"class":659},[649,2999,848],{"class":659},[649,3001,689],{"class":659},[649,3003,3004],{"class":692},"application\u002Fjson",[649,3006,949],{"class":659},[649,3008,3009],{"class":659}," },",[649,3011,3012],{"class":844}," body",[649,3014,848],{"class":659},[649,3016,3017],{"class":663}," JSON",[649,3019,743],{"class":659},[649,3021,3022],{"class":729},"stringify",[649,3024,733],{"class":844},[649,3026,1849],{"class":663},[649,3028,3029],{"class":844},") ",[649,3031,1046],{"class":659},[649,3033,1049],{"class":844},[649,3035,3036,3039,3041,3044,3046,3049,3052,3056,3058,3061,3063,3066,3068,3070,3073,3075],{"class":651,"line":830},[649,3037,3038],{"class":655},"    if",[649,3040,1157],{"class":844},[649,3042,3043],{"class":663},"response",[649,3045,743],{"class":659},[649,3047,3048],{"class":663},"status",[649,3050,3051],{"class":659}," ===",[649,3053,3055],{"class":3054},"sbssI"," 401",[649,3057,3029],{"class":844},[649,3059,3060],{"class":655},"return",[649,3062,660],{"class":659},[649,3064,3065],{"class":844}," error",[649,3067,848],{"class":659},[649,3069,689],{"class":659},[649,3071,3072],{"class":692},"expired",[649,3074,949],{"class":659},[649,3076,3077],{"class":659}," }\n",[649,3079,3080,3083,3085,3087,3090,3093,3095,3098,3100,3102,3104,3106,3109,3112,3114,3117,3119,3121,3123,3125,3128,3130],{"class":651,"line":841},[649,3081,3082],{"class":655},"    return",[649,3084,2948],{"class":663},[649,3086,743],{"class":659},[649,3088,3089],{"class":663},"ok",[649,3091,3092],{"class":659}," ?",[649,3094,660],{"class":659},[649,3096,3097],{"class":844}," html",[649,3099,848],{"class":659},[649,3101,790],{"class":655},[649,3103,2948],{"class":663},[649,3105,743],{"class":659},[649,3107,3108],{"class":729},"text",[649,3110,3111],{"class":844},"() ",[649,3113,1046],{"class":659},[649,3115,3116],{"class":659}," :",[649,3118,660],{"class":659},[649,3120,3065],{"class":844},[649,3122,848],{"class":659},[649,3124,689],{"class":659},[649,3126,3127],{"class":692},"failed",[649,3129,949],{"class":659},[649,3131,3077],{"class":659},[649,3133,3134],{"class":651,"line":864},[649,3135,3136],{"class":659},"  }\n",[649,3138,3139,3141],{"class":651,"line":880},[649,3140,1046],{"class":659},[649,3142,1049],{"class":663},[619,3144,3145,3146,3148,3149,3152,3153,3155,3156,2200,3159,3161,3162,3165,3166,3169,3170,3173,3174,1709,3177,3180,3181,1880,3184,1157,3187,1972,3190,3193,3194,3197],{},"The admin owns the tree: it sends the whole draft once (",[623,3147,2534],{},"), then each change as tree operations (",[623,3150,3151],{},"patch",") on the\nrevision the canvas has; the canvas applies them with ",[623,3154,625],{},"'s operations (",[623,3157,3158],{},"applyEditorMessage",[623,3160,2897],{},"), asks for\nthe tree again when it can't (",[623,3163,3164],{},"resync","), renders one draft at a time (the newest wins) and swaps in the top-level\nnodes that changed. It outlines the selected and hovered nodes (a ",[623,3167,3168],{},"display: contents"," wrapper is measured by its\nchildren), selects the outermost component instance around a click, asks for the element menu on a right-click (",[623,3171,3172],{},"contextmenu","\nwith the point; Shift keeps the browser's menu), stops links and forms, sets the colour mode\n(",[623,3175,3176],{},"data-shade-mode",[623,3178,3179],{},"\u003Chtml>",") and scrolls to a node on request. The messages are ",[623,3182,3183],{},"EditorToCanvasMessage",[623,3185,3186],{},"CanvasToEditorMessage",[623,3188,3189],{},"@shadestack\u002Ftree\u002Fcanvas",[623,3191,3192],{},"CANVAS_PROTOCOL_VERSION","; core and the module SDK don't\nhave them), version 2 of the canvas protocol, with its origin rules. The theme\nscreen uses the canvas too: it sends the home page's tree and, as ",[623,3195,3196],{},"styles",", the theme with the site's styles.",[619,3199,3200,3201,3203,3204,1462,3207,1539,3210,3213,3214,3217,3218,2096,3221,3223,3224,3227,3228,3231,3232,3235,3236,3239,3240,3243,3244,3247,3248,3250],{},"The canvas writes no inline styles: its outlines' CSS and the editor's ",[623,3202,3196],{}," go into constructed style sheets\n(",[623,3205,3206],{},"CSSStyleSheet",[623,3208,3209],{},"replaceSync",[623,3211,3212],{},"document.adoptedStyleSheets","), which a Content-Security-Policy's ",[623,3215,3216],{},"style-src","\ndoesn't restrict. Nor does it need ",[623,3219,3220],{},"'unsafe-eval'",[623,3222,2897],{}," first imports ",[623,3225,3226],{},"@shadestack\u002Ftree\u002Fjitless",",\nwhich runs zod without compiled parsers in the browser, so the tree's schemas never try ",[623,3229,3230],{},"new Function",", in every\nframework. The edit route's policy can name its ",[623,3233,3234],{},"\u003Cstyle>"," blocks by hash and leave out ",[623,3237,3238],{},"'unsafe-inline'","\n(SHADE's site: ",[623,3241,3242],{},"previewPolicy","). The page's own ",[623,3245,3246],{},"\u003Cstyle data-shade-styles>"," draws the first paint; the first ",[623,3249,3196],{},"\nmessage removes it once the adopted sheet holds the styles. Adopted sheets come after the page's own style sheets, so\nthe editor's styles come after the saved theme.",[619,3252,3253,3254,1214,3257,1214,3260,626,3263,3266,3267,2096,3269,1214,3272,1157,3275,3277,3278,3281,3282,3285],{},"SHADE's site: ",[623,3255,3256],{},"src\u002Fpages\u002Fpreview\u002Fcanvas.astro",[623,3258,3259],{},"src\u002Fpages\u002Fpreview\u002Fcanvas\u002Frender.astro",[623,3261,3262],{},"src\u002Flib\u002Fcanvas.ts",[623,3264,3265],{},"src\u002Fscripts\u002Fcanvas.ts",". Code, in ",[623,3268,2476],{},[623,3270,3271],{},"packages\u002Fclient\u002Fsrc\u002Fcanvas.ts",[623,3273,3274],{},"packages\u002Ftree\u002Fsrc\u002Fcanvas.ts",[623,3276,3189],{},"). Tests:\n",[623,3279,3280],{},"packages\u002Fclient\u002Ftest\u002Fcanvas.test.ts",", and the website module's ",[623,3283,3284],{},"e2e\u002Fsite\u002Fcanvas.spec.ts"," on the built site.",[1213,3287,3289],{"id":3288},"details","Details",[1148,3291,3292],{},[1151,3293,3294],{},"A formula that can't give its value when a page is rendered shows nothing in its place, and the problem is reported\nwithout the data in it (the report never carries the page's or visitor's values).",[1495,3296,3297],{},"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 .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 .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 .sBMFI, html code.shiki .sBMFI{--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B}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 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 .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 .sbssI, html code.shiki .sbssI{--shiki-light:#F76D47;--shiki-default:#F78C6C;--shiki-dark:#F78C6C}",{"title":645,"searchDepth":699,"depth":699,"links":3299},[3300,3301,3302],{"id":2573,"depth":699,"text":1320},{"id":2812,"depth":699,"text":2813},{"id":3288,"depth":699,"text":3289},"md",null,{},{"title":521,"description":645},"zzhkerTAThthj09bdMW6RBV23fJJp3W9jco-YH8NaBA",[3309,3310],{"title":517,"path":518,"stem":519,"description":645,"children":-1},{"title":525,"path":526,"stem":527,"description":645,"children":-1},1796500157084]