@thesage/mcp 0.7.0 → 0.8.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -8,7 +8,7 @@ var COMPONENT_CATEGORIES = {
8
8
  forms: {
9
9
  label: "Forms",
10
10
  description: "Input controls for data collection",
11
- count: 18
11
+ count: 19
12
12
  },
13
13
  navigation: {
14
14
  label: "Navigation",
@@ -18,17 +18,17 @@ var COMPONENT_CATEGORIES = {
18
18
  overlays: {
19
19
  label: "Overlays",
20
20
  description: "Contextual content that appears above the main UI",
21
- count: 11
21
+ count: 12
22
22
  },
23
23
  feedback: {
24
24
  label: "Feedback",
25
25
  description: "Communicating system state and user action results",
26
- count: 7
26
+ count: 9
27
27
  },
28
28
  "data-display": {
29
29
  label: "Data Display",
30
30
  description: "Presenting information in structured formats",
31
- count: 16
31
+ count: 19
32
32
  },
33
33
  layout: {
34
34
  label: "Layout",
@@ -2160,6 +2160,170 @@ const toRef = useRef(null)
2160
2160
  export default function OGImage() {
2161
2161
  return <OpenGraphCard title="My Page" description="A great description" variant="primary" />
2162
2162
  }`
2163
+ },
2164
+ // ============================================================================
2165
+ // PHASE 16 - MISSING COMPONENTS
2166
+ // ============================================================================
2167
+ "stat-card": {
2168
+ name: "StatCard",
2169
+ category: "data-display",
2170
+ description: "Displays key metrics and statistics with label, value, trend indicator, and optional icon. Ideal for dashboards, analytics views, and KPI displays.",
2171
+ keywords: ["stat", "metric", "kpi", "dashboard", "analytics", "number", "trend", "card"],
2172
+ useCases: [
2173
+ "Dashboard metric displays",
2174
+ "KPI tracking panels",
2175
+ "Analytics summary cards",
2176
+ "Revenue/user count displays"
2177
+ ],
2178
+ dependencies: ["class-variance-authority"],
2179
+ props: {
2180
+ label: { type: "string", description: 'The metric label (e.g. "Revenue")', required: true },
2181
+ value: { type: "string | number", description: 'The metric value (e.g. "$45,231")', required: true },
2182
+ change: { type: "number", description: "Percentage change (e.g. 5.2 or -3.1)" },
2183
+ trend: { type: "'up' | 'down' | 'flat'", description: "Direction of the trend" },
2184
+ icon: { type: "ReactNode", description: "Optional icon displayed in the top-right" },
2185
+ description: { type: "string", description: "Additional description text below the value" },
2186
+ variant: { type: "'default' | 'outline' | 'glass'", default: "'default'", description: "Visual style variant" },
2187
+ size: { type: "'sm' | 'default' | 'lg'", default: "'default'", description: "Size variant" }
2188
+ },
2189
+ subComponents: ["StatCardGroup"],
2190
+ example: `<StatCard label="Total Revenue" value="$45,231" change={12.5} trend="up" description="from last month" />`
2191
+ },
2192
+ "empty-state": {
2193
+ name: "EmptyState",
2194
+ category: "feedback",
2195
+ description: "Placeholder for empty content areas with icon, title, description, and call-to-action. Use when no data is available or a search returns no results.",
2196
+ keywords: ["empty", "placeholder", "no-data", "no-results", "blank", "zero-state"],
2197
+ useCases: [
2198
+ "Empty search results",
2199
+ "Empty inbox/messages",
2200
+ "No data available state",
2201
+ "First-time user onboarding prompt"
2202
+ ],
2203
+ dependencies: ["class-variance-authority"],
2204
+ props: {
2205
+ icon: { type: "ReactNode", description: "Icon displayed above the title" },
2206
+ title: { type: "string", description: "Primary message", required: true },
2207
+ description: { type: "string", description: "Secondary explanation text" },
2208
+ action: { type: "ReactNode", description: "Call-to-action element (e.g. Button)" },
2209
+ size: { type: "'sm' | 'default' | 'lg'", default: "'default'", description: "Size variant" }
2210
+ },
2211
+ example: `<EmptyState
2212
+ icon={<Inbox />}
2213
+ title="No messages yet"
2214
+ description="When you receive messages, they will appear here."
2215
+ action={<Button>Send a message</Button>}
2216
+ />`
2217
+ },
2218
+ "timeline": {
2219
+ name: "Timeline",
2220
+ category: "data-display",
2221
+ description: "Chronological event display with connecting lines, icons, and status indicators.",
2222
+ keywords: ["timeline", "events", "history", "chronological", "activity", "log"],
2223
+ useCases: ["Activity feeds", "Order tracking", "Project milestones", "Event history"],
2224
+ dependencies: ["class-variance-authority"],
2225
+ props: {
2226
+ orientation: { type: "'vertical' | 'horizontal'", default: "'vertical'", description: "Layout orientation" }
2227
+ },
2228
+ subComponents: ["TimelineItem"],
2229
+ example: `<Timeline>
2230
+ <TimelineItem title="Order placed" timestamp="Jan 1" status="completed" />
2231
+ <TimelineItem title="Shipped" status="active" />
2232
+ <TimelineItem title="Delivered" status="pending" isLast />
2233
+ </Timeline>`
2234
+ },
2235
+ "stepper": {
2236
+ name: "Stepper",
2237
+ category: "feedback",
2238
+ description: "Multi-step progress indicator for wizards and multi-step forms.",
2239
+ keywords: ["stepper", "wizard", "steps", "progress", "multi-step", "workflow"],
2240
+ useCases: ["Multi-step forms", "Checkout flows", "Onboarding wizards", "Setup processes"],
2241
+ dependencies: ["class-variance-authority"],
2242
+ props: {
2243
+ currentStep: { type: "number", description: "Zero-based index of the current step", required: true },
2244
+ orientation: { type: "'horizontal' | 'vertical'", default: "'horizontal'", description: "Layout orientation" },
2245
+ size: { type: "'sm' | 'default' | 'lg'", default: "'default'", description: "Size variant" },
2246
+ clickable: { type: "boolean", default: "false", description: "Allow clicking steps to navigate" }
2247
+ },
2248
+ subComponents: ["StepperStep"],
2249
+ example: `<Stepper currentStep={1}>
2250
+ <StepperStep label="Account" />
2251
+ <StepperStep label="Profile" />
2252
+ <StepperStep label="Complete" />
2253
+ </Stepper>`
2254
+ },
2255
+ "file-upload": {
2256
+ name: "FileUpload",
2257
+ category: "forms",
2258
+ description: "Drag-and-drop file upload zone with validation, file list, and remove functionality",
2259
+ keywords: ["file", "upload", "drag", "drop", "dropzone", "attachment", "browse"],
2260
+ useCases: ["Document uploads", "Image uploads", "Form attachments", "Bulk file import"],
2261
+ dependencies: ["react-dropzone", "class-variance-authority"],
2262
+ props: {
2263
+ accept: { type: "Record<string, string[]>", description: "Accepted file types (MIME types)" },
2264
+ maxSize: { type: "number", description: "Max file size in bytes" },
2265
+ maxFiles: { type: "number", description: "Max number of files" },
2266
+ multiple: { type: "boolean", default: "false", description: "Allow multiple file selection" },
2267
+ disabled: { type: "boolean", default: "false", description: "Disabled state" },
2268
+ onFilesSelected: { type: "(files: File[]) => void", description: "Callback when valid files are selected" },
2269
+ onFilesRejected: { type: "(rejections: FileRejection[]) => void", description: "Callback when files are rejected" },
2270
+ label: { type: "string", description: "Label text" },
2271
+ description: { type: "string", description: "Description text shown in the drop zone" },
2272
+ size: { type: "'sm' | 'default' | 'lg'", default: "'default'", description: "Size variant" }
2273
+ },
2274
+ example: `<FileUpload
2275
+ label="Upload documents"
2276
+ accept={{ 'image/*': ['.png', '.jpg'] }}
2277
+ maxSize={5 * 1024 * 1024}
2278
+ onFilesSelected={(files) => handleUpload(files)}
2279
+ />`
2280
+ },
2281
+ "tree-view": {
2282
+ name: "TreeView",
2283
+ category: "data-display",
2284
+ description: "Hierarchical data display with expand/collapse, keyboard navigation, and selection",
2285
+ keywords: ["tree", "hierarchy", "file browser", "nested", "expand", "collapse", "folder"],
2286
+ useCases: ["File browsers", "Category hierarchies", "Organizational charts", "Navigation trees"],
2287
+ dependencies: ["class-variance-authority"],
2288
+ props: {
2289
+ nodes: { type: "TreeNode[]", description: "Array of tree nodes", required: true },
2290
+ expanded: { type: "string[]", description: "Controlled expanded node IDs" },
2291
+ defaultExpanded: { type: "string[]", description: "Initially expanded node IDs" },
2292
+ onExpandChange: { type: "(expanded: string[]) => void", description: "Callback on expand state change" },
2293
+ selected: { type: "string", description: "Currently selected node ID" },
2294
+ onSelectChange: { type: "(nodeId: string) => void", description: "Callback on selection change" }
2295
+ },
2296
+ example: `<TreeView
2297
+ nodes={[
2298
+ { id: 'src', label: 'src', children: [
2299
+ { id: 'index', label: 'index.ts' },
2300
+ ]},
2301
+ ]}
2302
+ onSelectChange={(id) => console.log(id)}
2303
+ />`
2304
+ },
2305
+ "notification-center": {
2306
+ name: "NotificationCenter",
2307
+ category: "overlays",
2308
+ description: "Dropdown notification panel with grouped notifications, read/unread state, and actions",
2309
+ keywords: ["notification", "bell", "alert", "inbox", "unread", "badge", "messages"],
2310
+ useCases: ["App notifications", "Activity feeds", "System alerts", "Message center"],
2311
+ dependencies: [],
2312
+ props: {
2313
+ notifications: { type: "NotificationItem[]", description: "Array of notification items", required: true },
2314
+ onMarkRead: { type: "(id: string) => void", description: "Callback when a notification is marked as read" },
2315
+ onMarkAllRead: { type: "() => void", description: "Callback to mark all notifications as read" },
2316
+ onDismiss: { type: "(id: string) => void", description: "Callback when a notification is dismissed" },
2317
+ trigger: { type: "ReactNode", description: "Custom trigger element" },
2318
+ maxHeight: { type: "number", default: "400", description: "Maximum height of the notification list" },
2319
+ emptyMessage: { type: "string", default: "'No notifications'", description: "Message shown when empty" }
2320
+ },
2321
+ example: `<NotificationCenter
2322
+ notifications={[
2323
+ { id: '1', title: 'New message', timestamp: new Date(), read: false },
2324
+ ]}
2325
+ onMarkRead={(id) => markAsRead(id)}
2326
+ />`
2163
2327
  }
2164
2328
  };
2165
2329
  function getComponentsByCategory(category) {