npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

@orsetra/karavan-designer

v4.11.16

Published

Apache Camel Karavan Designer - Visual integration designer for Apache Camel with IBM Carbon Design System and Tailwind CSS

Downloads

100

Readme

Karavan Designer

Apache Camel Karavan Designer - Visual integration designer for Apache Camel

Installation

npm install karavan-designer
# or
pnpm add karavan-designer
# or
yarn add karavan-designer

Peer Dependencies

This package requires the following peer dependencies:

{
  "react": "^18.0.0",
  "react-dom": "^18.0.0",
  "@orsetra/karavan-core": "^4.14.0"
}

Usage

Basic Usage

import { KaravanApp } from '@orsetra/karavan-designer';
import { FetchDataProvider } from '@orsetra/karavan-designer/providers';
import '@patternfly/patternfly/patternfly.css';
import '@orsetra/karavan-designer/styles.css';

function App() {
  const dataProvider = new FetchDataProvider();

  return (
    <KaravanApp 
      dataProvider={dataProvider}
    />
  );
}

With Custom Providers

import { KaravanApp, DefaultCoreProvider } from 'karavan-designer';
import { FetchDataProvider } from 'karavan-designer/providers';

function App() {
  const coreProvider = new DefaultCoreProvider();
  const dataProvider = new FetchDataProvider();

  return (
    <KaravanApp 
      coreProvider={coreProvider}
      dataProvider={dataProvider}
    />
  );
}

Using Individual Components

import { KaravanLayout, MenuItem } from 'karavan-designer';
import { BlueprintIcon } from '@patternfly/react-icons';

function MyApp() {
  const pages = [
    new MenuItem("designer", "Designer", <BlueprintIcon/>),
    // ... more pages
  ];

  return (
    <KaravanLayout 
      loaded={true}
      pages={pages}
    >
      {(pageId, setPageId) => <YourPageContent />}
    </KaravanLayout>
  );
}

Provider System

Karavan Designer uses a provider system to separate data loading from UI logic.

CoreProvider

Interface for loading Camel core components:

interface CoreProvider {
  loadComponents(): Promise<string[]>;
  loadKamelets(): Promise<string[]>;
  loadBeans(): Promise<string[]>;
  loadTemplates(): Promise<Map<string, string>>;
}

DefaultCoreProvider is used automatically if no coreProvider is specified.

DataProvider

Interface for loading project data:

interface DataProvider {
  loadData(): Promise<ProjectFile[]>;
  saveFile(filename: string, code: string, propertyOnly: boolean): Promise<void>;
}

Creating Custom Providers

import { DataProvider, ProjectFile } from 'karavan-designer/providers';

export class ApiDataProvider implements DataProvider {
  constructor(private apiUrl: string) {}

  async loadData(): Promise<ProjectFile[]> {
    const response = await fetch(`${this.apiUrl}/projects`);
    return response.json();
  }

  async saveFile(filename: string, code: string): Promise<void> {
    await fetch(`${this.apiUrl}/files/${filename}`, {
      method: 'PUT',
      body: code
    });
  }
}

Components

KaravanApp

Main application component with data loading and routing.

Props:

  • coreProvider?: CoreProvider - Optional, defaults to DefaultCoreProvider
  • dataProvider: DataProvider - Required

KaravanLayout

Layout component with navigation and page management.

Props:

  • loaded: boolean - Loading state
  • initialPageId?: string - Initial page to display
  • pages: MenuItem[] - Available pages
  • onPageChange?: (pageId: string) => void - Page change callback
  • children: (pageId: string, setPageId: (pageId: string) => void) => React.ReactNode - Render prop

DesignerPage

Visual designer for Apache Camel routes.

KnowledgebaseHome

Documentation and reference for Camel components and patterns.

Styling

The package includes all necessary styles bundled in a single file for easy import.

Simple Import (Recommended)

Import all styles at once:

import '@patternfly/patternfly/patternfly.css';
import '@orsetra/karavan-designer/styles.css';

This single import includes all Karavan Designer styles:

  • Base styles
  • Designer components
  • Properties panels
  • Expression editors
  • Topology views
  • Knowledgebase

Granular Import (Advanced)

For advanced users who want more control, individual CSS files are also available:

// Import only specific styles
import '@orsetra/karavan-designer/dist/designer/karavan.css';
import '@orsetra/karavan-designer/dist/designer/route/DslElement.css';
// ... other specific styles

Required Peer Styles

PatternFly styles are required and must be imported separately:

npm install @patternfly/patternfly
import '@patternfly/patternfly/patternfly.css';

License

Apache-2.0

Links