Nasaq

Workflow marketplace

A store of workflow steps and ready-made presets with search, categories, a kind switch, a detail sheet and install, built on the shared catalog store.

PreviewOpen ↗

Code

import { WorkflowMarketplace } from "@fadymondy/nasaq/web";import { Mail } from "lucide-react";<WorkflowMarketplace  categories={[{ id: "comms", label: "Messaging" }]}  listings={[    {      id: "send-email", kind: "step", name: "Send email", summary: "Send a templated email.", category: "comms", icon: Mail,      step: { inputs: ["Contact"], outputs: ["Message id"], fields: [{ name: "to", label: "To", kind: "text", required: true }] },    },  ]}  onInstall={async (l) => { await api.install(l.id); }}/>;

Workflow · beta

Live examples and controls: Workflow marketplace in the lab.

Install

npx shadcn@latest add https://docs.nasaqui.com/r/workflow-marketplace.json

Browse and install the building blocks of automations. A listing is either a single step (a trigger or action you can add to any workflow) or a preset (a ready-made workflow of several steps). Steps show what they take, give and ask for; presets show the diagram they install. It is a thin layer over CatalogStore, so the card and detail layout matches any other Nasaq store.

When to use

  • Letting people add steps to the palette of WorkflowCanvas or start from a template.

When not to use

Import

import { WorkflowMarketplace } from "@fadymondy/nasaq/web";
// inside this monorepo: "@nasaq/web"

Quick start

import { WorkflowMarketplace } from "@fadymondy/nasaq/web";
import { Mail } from "lucide-react";

<WorkflowMarketplace
  categories={[{ id: "comms", label: "Messaging" }]}
  listings={[
    {
      id: "send-email", kind: "step", name: "Send email", summary: "Send a templated email.", category: "comms", icon: Mail,
      step: { inputs: ["Contact"], outputs: ["Message id"], fields: [{ name: "to", label: "To", kind: "text", required: true }] },
    },
  ]}
  onInstall={async (l) => { await api.install(l.id); }}
/>;

Anatomy

WorkflowMarketplace      (a CatalogStore)
├─ toolbar               search, kind ToggleGroup (All, Steps, Presets), sort
├─ categories            chips with counts, Installed
├─ cards                 badge: Preset, Trigger or Action
└─ detail sheet          step: takes, gives, settings; preset: the WorkflowNetwork diagram

API

PropTypeDefaultDescription
listingsWorkflowListing[]requiredCatalogItem fields plus kind: "step" | "preset", step?: { role?, fields?, inputs?, outputs? }, preset?: { steps, links? }.
categoriesCatalogCategory[]required{ id, label, icon? }.
onInstall?(listing) => Promise<void | { error?: string }>noneReturn { error } to show why it failed.
onUninstall?(listing) => Promise<...>noneAdds Uninstall to installed items.
onOpen?(listing) => voidnone"Open" once installed.
labels?Partial<WorkflowMarketplaceLabels> & { store?: Partial<CatalogLabels> }en/arOverride strings.

Accessibility

Inherits the catalog store's: named chip and toggle groups, a live result count, a focus-trapped sheet, role="alert" install errors. The preset diagram is real text in cards.

RTL & i18n

English and Arabic built in for the marketplace and the store. Field kinds and other code stay left-to-right; the preset diagram follows the reading direction.

Styling & tokens

Same tokens as the catalog store and workflow network. No raw hex.

Do / Don't

  • Do give presets a short steps list (under ten) so the sheet diagram stays readable.
  • Don't put secrets in step.fields; it lists names and kinds only.

Lab

https://docs.nasaqui.com/?path=/docs/components-workflow-workflow-marketplace--docs

On this page