@storybook/mcp 0.1.0 → 0.1.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.
package/dist/index.d.ts CHANGED
@@ -11,7 +11,7 @@ type OutputFormat = 'xml' | 'markdown';
11
11
  * Custom context passed to MCP server and tools.
12
12
  * Contains the request object and optional manifest provider.
13
13
  */
14
- interface StorybookContext extends Record<string, unknown> {
14
+ type StorybookContext = {
15
15
  /**
16
16
  * The incoming HTTP request being processed.
17
17
  */
@@ -50,7 +50,7 @@ interface StorybookContext extends Record<string, unknown> {
50
50
  };
51
51
  foundComponent?: ComponentManifest;
52
52
  }) => void | Promise<void>;
53
- }
53
+ };
54
54
  declare const ComponentManifest: v.ObjectSchema<{
55
55
  readonly id: v.StringSchema<undefined>;
56
56
  readonly path: v.StringSchema<undefined>;
package/dist/index.js CHANGED
@@ -5,7 +5,7 @@ import * as v from "valibot";
5
5
 
6
6
  //#region package.json
7
7
  var name = "@storybook/mcp";
8
- var version = "0.1.0";
8
+ var version = "0.1.1";
9
9
  var description = "MCP server that serves knowledge about your components based on your Storybook stories and documentation";
10
10
 
11
11
  //#endregion
@@ -123,6 +123,17 @@ async function defaultManifestProvider(request, path) {
123
123
 
124
124
  //#endregion
125
125
  //#region src/utils/dedent.ts
126
+ /**
127
+ * Copied from https://github.com/tamino-martinius/node-ts-dedent/blob/18c4736c79806d7fe78bdaaaf5ae307b79f9574a/src/index.ts
128
+ *
129
+ * Rationale for vendoring instead of using the ts-dedent package:
130
+ * 1. The package has a broken ESM distribution - the IDE auto-imports as
131
+ * `import dedent from 'ts-dedent'` but that breaks at runtime, requiring
132
+ * manual changes to named imports. See:
133
+ * - https://github.com/tamino-martinius/node-ts-dedent/issues/42
134
+ * - https://github.com/tamino-martinius/node-ts-dedent/pull/41
135
+ * 2. Keeps bundle size smaller for such a simple utility (avoid "is-even" syndrome)
136
+ */
126
137
  function dedent(templ, ...values) {
127
138
  let strings = Array.from(typeof templ === "string" ? [templ] : templ);
128
139
  strings[strings.length - 1] = strings.at(-1).replace(/\r?\n([\t ]*)$/, "");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@storybook/mcp",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "MCP server that serves knowledge about your components based on your Storybook stories and documentation",
5
5
  "keywords": [
6
6
  "storybook",
@@ -28,7 +28,7 @@
28
28
  "@tmcp/adapter-valibot": "^0.1.4",
29
29
  "@tmcp/transport-http": "^0.8.0",
30
30
  "tmcp": "^1.16.0",
31
- "valibot": "1.1.0"
31
+ "valibot": "1.2.0"
32
32
  },
33
33
  "devDependencies": {
34
34
  "@tmcp/transport-stdio": "^0.4.1",