@mad-kitty-shared/funnel-lib (0.1.0)
Published 2026-04-10 10:28:36 +00:00 by techb
Installation
@mad-kitty-shared:registry=npm install @mad-kitty-shared/funnel-lib@0.1.0"@mad-kitty-shared/funnel-lib": "0.1.0"About this package
@mad-kitty-shared/funnel-lib
Shared publishable utilities for all site templates.
Required Env Vars
The funnel app's .env must define these — funnel-lib reads them automatically, agent never passes them as props:
VITE_BT_PUBLIC_KEY— Basis Theory public key (required for any checkout)VITE_APPLE_PAY_MERCHANT_ID— optional, enables Apple PayVITE_APPLE_PAY_DISPLAY_NAME— optional, shown on the Apple Pay sheetVITE_PROJECT_SLUG— used bycreateFunnelRouter(must match a project slug in the database)
If VITE_BT_PUBLIC_KEY is missing, checkout throws at runtime. If Apple Pay env vars are missing, supportsApplePay() returns false and the method is hidden.
Vite Setup
// vite.config.ts
import { flowRouterPlugin } from '@mad-kitty-shared/funnel-lib/flow-vite-plugin'
import { planPublishPlugin } from '@mad-kitty-shared/funnel-lib/plan-publish-plugin'
export default {
plugins: [
flowRouterPlugin(),
planPublishPlugin({
apiUrl: 'https://app.example.com/api/trpc',
projectSlug: process.env.PROJECT_SLUG!,
}),
],
}
Dependencies
Dependencies
| ID | Version |
|---|---|
| typescript | ^5.7.2 |
| ws | ^8.18.3 |
Development Dependencies
| ID | Version |
|---|---|
| @pi-wrapper/trpc | workspace:* |
| @tanstack/react-router | ^1.168.10 |
| @trpc/client | ^11.16.0 |
| @trpc/server | ^11.16.0 |
| @types/node | ^22.10.2 |
| @types/react | ^19.2.14 |
| @types/react-dom | ^19.2.3 |
| @types/ws | ^8.5.13 |
| react | ^19.2.5 |
| react-dom | ^19.2.5 |
| vite | ^7.3.1 |
Peer Dependencies
| ID | Version |
|---|---|
| @basis-theory/react-elements | ^2.11.1 |
| lucide-react | ^1.8.0 |
| vite | ^7.0.0 |