[{"data":1,"prerenderedAt":526},["ShallowReactive",2],{"navigation_docs":3,"-guide-canvas":233,"-guide-canvas-surround":522},[4,27,77,127,161,219],{"title":5,"icon":6,"path":7,"stem":8,"children":9,"page":26},"Get started","majesticons:rocket-3-start-line","\u002Fget-started","1.get-started",[10,14,18,22],{"title":11,"path":12,"stem":13},"How it works","\u002Fget-started\u002Fhow-it-works","1.get-started\u002F10.how-it-works",{"title":15,"path":16,"stem":17},"Play online","\u002Fget-started\u002Fplay-online","1.get-started\u002F20.play-online",{"title":19,"path":20,"stem":21},"Create a new project","\u002Fget-started\u002Fcreate-new-project","1.get-started\u002F30.create-new-project",{"title":23,"path":24,"stem":25},"First steps","\u002Fget-started\u002Ffirst-steps","1.get-started\u002F40.first-steps",false,{"title":28,"icon":29,"path":30,"stem":31,"children":32,"page":26},"Guide","mdi:book-open-page-variant-outline","\u002Fguide","2.guide",[33,37,41,45,49,53,57,61,65,69,73],{"title":34,"path":35,"stem":36},"Customized API Output","\u002Fguide\u002Fcustomized-api-output","2.guide\u002F05.customized-api-output",{"title":38,"path":39,"stem":40},"Pages & Routing","\u002Fguide\u002Fpages-routing","2.guide\u002F10.pages-routing",{"title":42,"path":43,"stem":44},"Site layout & Menus","\u002Fguide\u002Fsite-layout-menus","2.guide\u002F20.site-layout-menus",{"title":46,"path":47,"stem":48},"Authentication","\u002Fguide\u002Fauthentication","2.guide\u002F40.authentication",{"title":50,"path":51,"stem":52},"Metatags & Local tasks","\u002Fguide\u002Fmetatags-local-tasks","2.guide\u002F50.metatags-local-tasks",{"title":54,"path":55,"stem":56},"Breadcrumbs & Messages","\u002Fguide\u002Fbreadcrumbs-messages","2.guide\u002F60.breadcrumbs-messages",{"title":58,"path":59,"stem":60},"Redirects","\u002Fguide\u002Fredirects","2.guide\u002F65.redirects",{"title":62,"path":63,"stem":64},"Editorial previews","\u002Fguide\u002Feditorial-previews","2.guide\u002F70.editorial-previews",{"title":66,"path":67,"stem":68},"Layout builder","\u002Fguide\u002Flayout-builder","2.guide\u002F80.layout-builder",{"title":70,"path":71,"stem":72},"Drupal Canvas","\u002Fguide\u002Fcanvas","2.guide\u002F90.canvas",{"title":74,"path":75,"stem":76},"Drupal CMS","\u002Fguide\u002Fdrupal-cms","2.guide\u002F95.drupal-cms",{"title":78,"icon":79,"path":80,"stem":81,"children":82,"page":26},"Advanced topics","bi:diagram-3","\u002Fadvanced-topics","3.advanced-topics",[83,87,91,95,99,103,107,111,115,119,123],{"title":84,"path":85,"stem":86},"Multi-frontend","\u002Fadvanced-topics\u002Fmulti-frontend","3.advanced-topics\u002F05.multi-frontend",{"title":88,"path":89,"stem":90},"Listings, Views","\u002Fadvanced-topics\u002Flistings-views","3.advanced-topics\u002F10.listings-views",{"title":92,"path":93,"stem":94},"Searches","\u002Fadvanced-topics\u002Fsearches","3.advanced-topics\u002F20.searches",{"title":96,"path":97,"stem":98},"JSON-API & GraphQL","\u002Fadvanced-topics\u002Fjsonapi-graphql","3.advanced-topics\u002F30.jsonapi-graphql",{"title":100,"path":101,"stem":102},"Caching","\u002Fadvanced-topics\u002Fcaching","3.advanced-topics\u002F40.caching",{"title":104,"path":105,"stem":106},"Error pages","\u002Fadvanced-topics\u002Ferror-pages","3.advanced-topics\u002F50.error-pages",{"title":108,"path":109,"stem":110},"Drupal forms","\u002Fadvanced-topics\u002Fdrupal-forms","3.advanced-topics\u002F60.drupal-forms",{"title":112,"path":113,"stem":114},"Drupal JavaScript","\u002Fadvanced-topics\u002Fdrupal-javascript","3.advanced-topics\u002F62.drupal-javascript",{"title":116,"path":117,"stem":118},"Site Templates","\u002Fadvanced-topics\u002Fsite-templates","3.advanced-topics\u002F65.site-templates",{"title":120,"path":121,"stem":122},"Block layout","\u002Fadvanced-topics\u002Fblock-layout","3.advanced-topics\u002F70.block-layout",{"title":124,"path":125,"stem":126},"Debugging API requests","\u002Fadvanced-topics\u002Fdebugging","3.advanced-topics\u002F80.debugging",{"title":128,"icon":129,"path":130,"stem":131,"children":132,"page":26},"Drupal","simple-icons:drupal","\u002Fdrupal","4.drupal",[133,137,141,145,149,153,157],{"title":134,"path":135,"stem":136},"Key modules","\u002Fdrupal\u002Fkey-modules","4.drupal\u002F10.key-modules",{"title":138,"path":139,"stem":140},"Custom elements","\u002Fdrupal\u002Fcustom-elements","4.drupal\u002F20.custom-elements",{"title":142,"path":143,"stem":144},"Routes","\u002Fdrupal\u002Froutes","4.drupal\u002F30.routes",{"title":146,"path":147,"stem":148},"Providing blocks","\u002Fdrupal\u002Fproviding-blocks","4.drupal\u002F40.providing-blocks",{"title":150,"path":151,"stem":152},"Custom Element Processors","\u002Fdrupal\u002Fcustom-element-processors","4.drupal\u002F50.custom-element-processors",{"title":154,"path":155,"stem":156},"Adding Drupal forms","\u002Fdrupal\u002Fadd-drupal-forms","4.drupal\u002F60.add-drupal-forms",{"title":158,"path":159,"stem":160},"Providing themes","\u002Fdrupal\u002Fthemes","4.drupal\u002F70.themes",{"title":162,"icon":163,"path":164,"stem":165,"children":166,"page":26},"Nuxt","simple-icons:nuxtdotjs","\u002Fnuxt","5.nuxt",[167,171,175,179,183,187,191,195,199,203,207,211,215],{"title":168,"path":169,"stem":170},"Introduction","\u002Fnuxt\u002Fintroduction","5.nuxt\u002F10.introduction",{"title":172,"path":173,"stem":174},"Setup","\u002Fnuxt\u002Fsetup","5.nuxt\u002F20.setup",{"title":176,"path":177,"stem":178},"Rendering Custom Elements","\u002Fnuxt\u002Frender-custom-elements","5.nuxt\u002F30.render-custom-elements",{"title":180,"path":181,"stem":182},"Default components","\u002Fnuxt\u002Fdefault-components","5.nuxt\u002F32.default-components",{"title":184,"path":185,"stem":186},"Composables","\u002Fnuxt\u002Fcomposables","5.nuxt\u002F35.composables",{"title":188,"path":189,"stem":190},"Drupal JS libraries","\u002Fnuxt\u002Fdrupal-libraries","5.nuxt\u002F37.drupal-libraries",{"title":192,"path":193,"stem":194},"Custom Routes","\u002Fnuxt\u002Fcustom-routes","5.nuxt\u002F40.custom-routes",{"title":196,"path":197,"stem":198},"Page Layouts","\u002Fnuxt\u002Fpage-layouts","5.nuxt\u002F50.page-layouts",{"title":200,"path":201,"stem":202},"Component Previews","\u002Fnuxt\u002Fcomponent-previews","5.nuxt\u002F55.component-previews",{"title":204,"path":205,"stem":206},"Component Index","\u002Fnuxt\u002Fcanvas-components","5.nuxt\u002F57.canvas-components",{"title":208,"path":209,"stem":210},"Rendering modes","\u002Fnuxt\u002Frendering-modes","5.nuxt\u002F60.rendering-modes",{"title":212,"path":213,"stem":214},"Deployment options","\u002Fnuxt\u002Fdeployment","5.nuxt\u002F70.deployment",{"title":216,"path":217,"stem":218},"Resources","\u002Fnuxt\u002Fresources","5.nuxt\u002F90.resources",{"title":220,"icon":221,"path":222,"stem":223,"children":224,"page":26},"Deployment","solar:server-square-cloud-linear","\u002Fdeployment","6.deployment",[225,229],{"title":226,"path":227,"stem":228},"Deployment Strategies","\u002Fdeployment\u002Fdeployment-strategy","6.deployment\u002F10.deployment-strategy",{"title":230,"path":231,"stem":232},"Unified Hosting","\u002Fdeployment\u002Funified-hosting","6.deployment\u002F20.unified-hosting",{"id":234,"title":70,"body":235,"description":515,"extension":516,"links":517,"meta":518,"navigation":519,"path":71,"seo":520,"stem":72,"__hash__":521},"docs\u002F2.guide\u002F90.canvas.md",{"type":236,"value":237,"toc":501},"minimark",[238,243,259,264,276,279,290,294,303,340,354,359,372,376,389,419,427,431,435,438,445,449,452,487,490,494,497],[239,240,242],"h1",{"id":241},"decoupling-drupal-canvas","Decoupling Drupal Canvas",[244,245,246,252,253,258],"p",{},[247,248,70],"a",{"href":249,"rel":250},"https:\u002F\u002Fwww.drupal.org\u002Fproject\u002Fcanvas",[251],"nofollow"," is Drupal's modern page builder (",[247,254,257],{"href":255,"rel":256},"https:\u002F\u002Fproject.pages.drupalcode.org\u002Fcanvas\u002F",[251],"docs","). When paired with Lupus Decoupled, Canvas becomes a powerful decoupled page builder that supports varying frontend frameworks.",[260,261,263],"h2",{"id":262},"how-it-works","How It Works",[244,265,266,267,271,272,275],{},"Canvas pages are built from components in Drupal's Canvas editor. In this context, a component can be a custom element (a Vue\u002FReact component provided by the frontend) or a regular Drupal block — which can render any Drupal content, including Views blocks that themselves output custom elements. While editing, the editor renders live previews of components via JavaScript using a preview provider (i.e. the frontend). Once published, the page is served through the CE API like any other content (e.g. ",[268,269,270],"code",{},"\u002Fce-api\u002Fpage\u002F{id}","), as regular ",[247,273,274],{"href":139},"custom elements API"," output, so components are regularly rendered by the frontend.",[260,277,74],{"id":278},"drupal-cms",[244,280,281,282,285,286,289],{},"When using ",[247,283,284],{"href":117},"Lupus Decoupled Starter"," or a similar site template based upon Lupus Decoupled, you get a fully working setup with Canvas pre-configured. Refer to the ",[247,287,288],{"href":75},"Drupal CMS page"," for details.",[260,291,293],{"id":292},"manual-setup","Manual Setup",[244,295,296,297,302],{},"Apply the ",[247,298,301],{"href":299,"rel":300},"https:\u002F\u002Fwww.drupal.org\u002Fproject\u002Flupus_decoupled_recipe_canvas",[251],"Lupus Decoupled Canvas Recipe"," to set up the module and its dependencies with a single recipe apply:",[304,305,310],"pre",{"className":306,"code":307,"language":308,"meta":309,"style":309},"language-bash shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","composer require drupal\u002Flupus_decoupled_recipe_canvas\ndrush recipe ..\u002Frecipes\u002Flupus_decoupled_recipe_canvas\n","bash","",[268,311,312,328],{"__ignoreMap":309},[313,314,317,321,325],"span",{"class":315,"line":316},"line",1,[313,318,320],{"class":319},"sBMFI","composer",[313,322,324],{"class":323},"sfazB"," require",[313,326,327],{"class":323}," drupal\u002Flupus_decoupled_recipe_canvas\n",[313,329,331,334,337],{"class":315,"line":330},2,[313,332,333],{"class":319},"drush",[313,335,336],{"class":323}," recipe",[313,338,339],{"class":323}," ..\u002Frecipes\u002Flupus_decoupled_recipe_canvas\n",[244,341,342,343,347,348,353],{},"This installs and configures ",[247,344,346],{"href":249,"rel":345},[251],"Canvas",", ",[247,349,352],{"href":350,"rel":351},"https:\u002F\u002Fwww.drupal.org\u002Fproject\u002Fcanvas_extjs",[251],"Canvas ExtJS",", and the Lupus Decoupled Canvas sub-module.",[355,356,358],"h3",{"id":357},"configuring-the-editor-theme","Configuring the Editor Theme",[244,360,361,362,365,366,371],{},"Configure the theme used for Canvas editor previews at ",[268,363,364],{},"\u002Fadmin\u002Fconfig\u002Fsystem\u002Flupus-decoupled\u002Fsettings"," under \"Lupus Decoupled theme\". A minimal theme like Stark or ",[247,367,370],{"href":368,"rel":369},"https:\u002F\u002Fwww.drupal.org\u002Fproject\u002Flupus_stark",[251],"Lupus Stark"," is recommended.",[260,373,375],{"id":374},"providing-components","Providing Components",[244,377,378,379,383,384,388],{},"Components are provided via a ",[380,381,382],"strong",{},"component index",": a JSON file listing available components, their props, and metadata. ",[247,385,387],{"href":350,"rel":386},[251],"Canvas External JS Components"," (a Canvas extension for integrating external JavaScript components) reads this index and makes the components available in the Canvas editor UI.",[390,391,392,410],"ul",{},[393,394,395,398,399,404,405,407,408],"li",{},[247,396,397],{"href":205},"Vue\u002FNuxt",": very well supported via ",[247,400,403],{"href":401,"rel":402},"https:\u002F\u002Fgithub.com\u002Fdrunomics\u002Fnuxt-component-preview",[251],"nuxt-component-preview",", see ",[247,406,204],{"href":205}," and ",[247,409,200],{"href":201},[393,411,412,413,418],{},"React: no ready-made setup yet. ",[247,414,417],{"href":415,"rel":416},"https:\u002F\u002Fgithub.com\u002Ffullfatthings\u002Fdrupal-canvas-react",[251],"fullfatthings\u002Fdrupal-canvas-react"," provides a library for exposing React components and generating a component index, but some integration work is required to wire everything together.",[244,420,421,422,426],{},"For documentation on how to integrate other frontend frameworks, see ",[247,423,425],{"href":424},"\u002Fadvanced-topics\u002Fmulti-frontend#canvas-support","Multi-Frontend",".",[260,428,430],{"id":429},"component-registration","Component Registration",[355,432,434],{"id":433},"automatic-registration-via-lupus-csr-themes","Automatic Registration via Lupus CSR Themes",[244,436,437],{},"When a Lupus CSR-based theme is installed, components are automatically registered from the theme's bundled component-index. No manual steps are needed.",[244,439,440,441,444],{},"Automatic registration also works with a decoupled frontend when the ",[268,442,443],{},"lupus_decoupled_canvas"," module is installed, provided the configured frontend exposes a component index at the configured frontend base URL.",[355,446,448],{"id":447},"decoupled-frontends","Decoupled Frontends",[244,450,451],{},"When using a decoupled frontend (e.g. a dev server), component registration must be triggered manually:",[390,453,454,468,477],{},[393,455,456,459,460,463,464,467],{},[380,457,458],{},"UI",": Go to ",[380,461,462],{},"Administration > Appearance > Components > External JS"," (",[268,465,466],{},"\u002Fadmin\u002Fappearance\u002Fcomponent\u002Fextjs",")",[393,469,470,473,474],{},[380,471,472],{},"Drush",": ",[268,475,476],{},"drush canvas:extjs-auto-register",[393,478,479,482,483,486],{},[380,480,481],{},"Recipe config action",": Use ",[268,484,485],{},"lupus_decoupled_canvas:registerComponents"," after configuring the preview provider URL",[244,488,489],{},"When the frontend base URL is changed via the Lupus Decoupled settings form, a prompt will remind you to update the component registration.",[260,491,493],{"id":492},"relationship-to-canvas-code-components","Relationship to Canvas Code Components",[244,495,496],{},"Drupal Canvas has built-in support for (P)React \"code components\" with their own bundler. These components are purely client-side rendered and currently do not integrate with Lupus Decoupled's CE API pipeline. Adding support for embedding them as custom elements would be straightforward, but is not implemented yet.",[498,499,500],"style",{},"html pre.shiki code .sBMFI, html code.shiki .sBMFI{--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B}html pre.shiki code .sfazB, html code.shiki .sfazB{--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D}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);}",{"title":309,"searchDepth":330,"depth":330,"links":502},[503,504,505,509,510,514],{"id":262,"depth":330,"text":263},{"id":278,"depth":330,"text":74},{"id":292,"depth":330,"text":293,"children":506},[507],{"id":357,"depth":508,"text":358},3,{"id":374,"depth":330,"text":375},{"id":429,"depth":330,"text":430,"children":511},[512,513],{"id":433,"depth":508,"text":434},{"id":447,"depth":508,"text":448},{"id":492,"depth":330,"text":493},"Drupal Canvas is Drupal's modern page builder (docs). When paired with Lupus Decoupled, Canvas becomes a powerful decoupled page builder that supports varying frontend frameworks.","md",null,{},true,{"title":70,"description":515},"8dauv4eVoXkWq0fK6v_i3CTUdua_md7Wuo-Y32AHjb0",[523,524],{"title":66,"path":67,"stem":68,"description":309,"children":-1},{"title":74,"path":75,"stem":76,"description":525,"children":-1},"Drupal CMS is Drupal's user-friendly distribution aimed at marketers and content teams. Lupus Decoupled supports it via site templates, providing a fully decoupled setup out of the box.",1786631275586]