Docs
API Map

API Reference

Practical import map and signatures for the public API.

Package Entrypoints

Import pathUse when
featuredropCore helpers and lightweight browser adapters
featuredrop/adaptersFull adapter surface (remote, hybrid, DB, IndexedDB)
featuredrop/reactProvider, hooks, and React UI components
featuredrop/markdownMarkdown to sanitized HTML parser
featuredrop/rssRSS feed generator
featuredrop/schemavalidateManifest + schema exports
featuredrop/testingMock helpers and test wrappers
featuredrop/ciManifest diffing/CI summaries
featuredrop/cmsCMS/content adapters
featuredrop/rendererHeadless changelog renderer protocol
featuredrop/flagsFeature flag bridges
featuredrop/bridgesSlack/Discord/webhook/email/RSS bridges
featuredrop/adminManifest editor/admin components

Core Runtime (featuredrop)

import {
  isNew,
  getNewFeatures,
  getNewFeatureCount,
  hasNewFeature,
  getNewFeaturesSorted,
  LocalStorageAdapter
} from 'featuredrop'
import { parseDescription } from 'featuredrop/markdown'
import { generateRSS } from 'featuredrop/rss'
 
const storage = new LocalStorageAdapter({ prefix: 'app' })
 
const entries = getNewFeatures(manifest, storage)
const count = getNewFeatureCount(manifest, storage)
const sorted = getNewFeaturesSorted(manifest, storage)
const hasSidebarBadge = hasNewFeature(manifest, '/dashboard', storage)
 
const first = manifest[0]
if (first) {
  const active = isNew(first, storage.getWatermark(), storage.getDismissedIds())
  console.log(active)
}
 
const html = parseDescription('**Release** with `code`')
const rss = generateRSS(manifest, { title: 'Product Updates' })
HelperDescription
isNew(feature, watermark, dismissedIds, now?, userContext?, matchAudience?, appVersion?, dependencyState?, triggerContext?, flagBridge?, product?)Evaluate one feature against all gates
getNewFeatures(manifest, storage, ...)Returns eligible unseen entries
getNewFeatureCount(manifest, storage, ...)Returns unread count
hasNewFeature(manifest, sidebarKey, storage, ...)Sidebar-key check for nav badges
getNewFeaturesSorted(manifest, storage, ...)Priority + date sorted entries

Headless Renderer (featuredrop/renderer)

import { createChangelogRenderer } from 'featuredrop/renderer'
import { LocalStorageAdapter } from 'featuredrop'
 
const renderer = createChangelogRenderer({
  manifest,
  storage: new LocalStorageAdapter({ prefix: 'app' }),
  appVersion: '2.4.0'
})
 
renderer.actions.trackUsageEvent('opened-settings')
renderer.actions.markFeatureSeen('dashboard-v2')
renderer.subscribe((state) => console.log(state.newCount))

Use this when you want FeatureDrop filtering/state without React components.

Adapters (featuredrop/adapters)

import {
  RemoteAdapter,
  IndexedDBAdapter,
  HybridAdapter,
  PostgresAdapter
} from 'featuredrop/adapters'

Use this entrypoint for non-core adapters (remote, hybrid, and server-side database adapters).

RemoteAdapter also exposes flushPendingDismisses() and destroy() for aggressive queue durability and teardown-safe cleanup.

React SDK (featuredrop/react)

Provider

import { FeatureDropProvider } from 'featuredrop/react'
import { LocalStorageAdapter } from 'featuredrop'
 
<FeatureDropProvider
  manifest={manifest}
  storage={new LocalStorageAdapter({ prefix: 'app' })}
  appVersion="2.4.0"
  userContext={{ plan: 'pro', role: 'admin', region: 'us' }}
>
  {children}
</FeatureDropProvider>

Key props: manifest, storage, appVersion, userContext, matchAudience, product, throttle, flagBridge, locale, animation.

useFeatureDrop()

import { useFeatureDrop } from 'featuredrop/react'
 
function ReleaseActions() {
  const { newFeatures, newCount, dismiss, dismissAll, isNew, getFeature } = useFeatureDrop()
 
  return (
    <div>
      <span>{newCount} updates</span>
      <button onClick={() => void dismissAll()}>Mark all read</button>
      <button onClick={() => dismiss(newFeatures[0]?.id ?? '')}>Dismiss first</button>
      <span>{isNew('/dashboard') ? 'new' : 'seen'}</span>
      <span>{getFeature('/dashboard')?.label ?? 'none'}</span>
    </div>
  )
}

Core Components

Validation (featuredrop/schema)

import { validateManifest } from 'featuredrop/schema'
 
const result = validateManifest(manifest)
if (!result.valid) {
  console.error(result.errors)
  process.exit(1)
}

validateManifest checks required fields (id, label, releasedAt, showNewUntil), duplicate IDs, date ordering (showNewUntil > releasedAt), dependency cycles, URL safety, and unsafe meta keys.

CLI

npx featuredrop init --format markdown
npx featuredrop add --label "New Analytics" --category analytics --show-days 21
npx featuredrop validate --pattern "features/**/*.md"
npx featuredrop build --pattern "features/**/*.md" --out featuredrop.manifest.json
npx featuredrop doctor --pattern "features/**/*.md"
pnpm security-check
pnpm size-check

Full command flags: CLI Reference. CI patterns: CI Utilities.