@dynamic-labs-sdk/droplet-mcp 1.28.0 → 1.30.0

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.
@@ -1,9 +1,11 @@
1
1
  import type { ComponentsManifest } from '../manifest-types.js';
2
+ type ListComponentsResult = {
3
+ description: string;
4
+ name: string;
5
+ }[];
2
6
  /**
3
7
  * Returns a lightweight summary (name + description) for every component in the manifest.
4
8
  * @notInstrumented
5
9
  */
6
- export declare const listComponents: (m: ComponentsManifest) => {
7
- description: string;
8
- name: string;
9
- }[];
10
+ export declare const listComponents: (m: ComponentsManifest) => ListComponentsResult;
11
+ export {};
@@ -8,12 +8,13 @@ export type SearchComponentsParams = {
8
8
  /** Keyword to match against name, description, variant values, and prop names. */
9
9
  query: string;
10
10
  };
11
+ export type SearchComponentsResult = {
12
+ description: string;
13
+ name: string;
14
+ }[];
11
15
  /**
12
16
  * Searches components by matching the query against name, description, variant values,
13
17
  * and prop names. Returns an empty array when the query is blank.
14
18
  * @notInstrumented
15
19
  */
16
- export declare const searchComponents: ({ manifest, query }: SearchComponentsParams) => {
17
- description: string;
18
- name: string;
19
- }[];
20
+ export declare const searchComponents: ({ manifest, query, }: SearchComponentsParams) => SearchComponentsResult;
@@ -3,7 +3,7 @@
3
3
  * and prop names. Returns an empty array when the query is blank.
4
4
  * @notInstrumented
5
5
  */
6
- export const searchComponents = ({ manifest, query }) => {
6
+ export const searchComponents = ({ manifest, query, }) => {
7
7
  const q = query.trim().toLowerCase();
8
8
  if (!q)
9
9
  return [];
@@ -16,6 +16,8 @@ export const searchComponents = ({ manifest, query }) => {
16
16
  .some((v) => v.toLowerCase().includes(q))
17
17
  : false) ||
18
18
  // Also match if any prop name contains the query
19
- (c.props ? c.props.some((p) => p.name.toLowerCase().includes(q)) : false))
19
+ (c.props
20
+ ? c.props.some((p) => p.name.toLowerCase().includes(q))
21
+ : false))
20
22
  .map((c) => ({ description: c.description ?? '', name: c.name }));
21
23
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dynamic-labs-sdk/droplet-mcp",
3
- "version": "1.28.0",
3
+ "version": "1.30.0",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "droplet-mcp": "./dist/index.js"