Download the PHP package kevinfunk/canvas_component_manager without Composer

On this page you can find all versions of the php package kevinfunk/canvas_component_manager. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package canvas_component_manager

Canvas Component Manager

Canvas Component Manager is a Drupal module designed to streamline the management, deployment, and sharing of Canvas code components. It provides a graphical interface (UI) to export, import, audit, and version-control component configurations.

Features

Installation

Via Composer (Recommended)

This method automatically installs required dependencies (like the Canvas module).

  1. Run the command:

  2. Enable the module:

Permissions

This module defines a single permission to restrict access to sensitive operations:

Why two export types?

Canvas components are unique because they exist as both Configuration (Drupal entities with UUIDs) and Code (JavaScript/CSS). This module provides two export methods to handle different scenarios:

  1. Source Export (UUID-Agnostic)

    • What it is: A ZIP containing raw source files (index.jsx, component.yml).
    • Best for: Sharing components between unrelated sites (e.g., from a Dev sandbox to a Client site).
    • Why: It strips specific identifiers (UUIDs), forcing the target site to create a fresh instance of the component. This avoids ID conflicts.
  2. Config Export (UUID-Preserving)
    • What it is: A ZIP containing strict Drupal config files (canvas.component.js.*.yml).
    • Best for: Deployments, Recipes, and CI/CD pipelines.
    • Why: It preserves the exact UUIDs. When imported, Drupal knows it is updating the same component rather than creating a duplicate.

Usage

User Interface

Navigate to Configuration > Development > Canvas Components Overview (/admin/config/development/canvas_component_manager).

Workflows

Moving Components Between Sites (Source Export)

Use the Export Source option when you want to copy a component from Site A to Site B.

  1. Select the component(s) and click Export Source.
  2. This generates a ZIP containing the raw CLI structure (component.yml, index.jsx, dist/).
  3. Upload this ZIP to the target site using the Import tab.
  4. Why: This format is "UUID-agnostic." It will create a fresh instance of the component on the new site, avoiding configuration conflicts.

Building Recipes & Deployments (Config Export)

Use the Export Config option when you are creating a Drupal Recipe, a Feature module, or deploying changes to a staging/production environment.

  1. Select the component(s) and click Export Config.
  2. This generates a ZIP containing strict Drupal configuration files (canvas.component.js.*.yml).
  3. Extract these files into your Recipe's config folder or your module's config/install directory.
  4. Why: This preserves the exact UUIDs and system properties, ensuring that updates are tracked correctly by Drupal's configuration management system.

Default Content UI Integration

This module integrates with Default Content UI to support "Ambitious Site Builder" workflows.

If you use Default Content UI to export content (e.g., a "Home Page" node or a "Landing Page" template), Canvas Component Manager will automatically:

  1. Scan the content for any Canvas Code Components it uses.
  2. Recursively find any components those components depend on.
  3. Bundle all of them into the export automatically.

To enable this:

  1. Go to Settings (/admin/config/development/canvas_component_manager/settings).
  2. Ensure "Auto-export Canvas Code Components" is checked.
  3. Select your preferred export format (Source or Config).

Notes for Developers

Auto-Importing in Custom Modules

To bundle components with a custom module (e.g., for distribution or recipes), place your component directories inside a js_components folder in your module's root.

Structure:

When my_custom_module is installed, Canvas Component Manager will automatically scan this folder and import the components.

File Structure (Exports)

When exporting, the module generates standard YAML configuration files:

Importing Source Code

If you are importing raw source code (CLI format), ensure your ZIP archive includes the dist/ folder with compiled index.js and index.css files. If these are missing, the component may not render correctly until re-compiled via npx canvas build locally.

Requirements


All versions of canvas_component_manager with dependencies

PHP Build Version
Package Version
Requires drupal/core Version ^11.3
drupal/canvas Version ^1.8
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package kevinfunk/canvas_component_manager contains the following files

Loading the files please wait ...