@storybook/react-native 10.4.7 → 10.4.8-canary-20260711115827

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.
@@ -260,7 +260,8 @@ function createMcpHandler(configPath, wss) {
260
260
  const manifestProvider = async (_request, manifestPath) => {
261
261
  if (manifestPath.includes("docs.json")) throw new Error("Docs manifest not available in React Native Storybook");
262
262
  const index = await buildIndex({ configPath });
263
- const manifest = await experimental_manifests({}, { manifestEntries: Object.values(index.entries) });
263
+ const entries = Object.values(index.entries);
264
+ const manifest = await experimental_manifests({}, { manifestEntries: entries });
264
265
  return JSON.stringify(manifest.components);
265
266
  };
266
267
  const server = new McpServer({
@@ -1,5 +1,5 @@
1
1
  const require_rolldown_runtime = require("./rolldown-runtime-Bd6kNlEP.js");
2
- const require_channelServer = require("./channelServer-D4z8ZcuA.js");
2
+ const require_channelServer = require("./channelServer-D-IaG_dn.js");
3
3
  //#region scripts/require-interop.js
4
4
  var require_require_interop = /* @__PURE__ */ require_rolldown_runtime.__commonJSMin(((exports, module) => {
5
5
  let registered = false;
@@ -1,3 +1,4 @@
1
+ import "storybook/internal/types";
1
2
  //#region src/types/index.d.ts
2
3
  /**
3
4
  * Options for configuring WebSockets used for syncing storybook instances or sending events to storybook.
package/dist/index.d.ts CHANGED
@@ -5,7 +5,6 @@ import { SBUI } from "@storybook/react-native-ui-common";
5
5
  import { Channel } from "storybook/internal/channels";
6
6
  import { StoryContext } from "storybook/internal/csf";
7
7
  import { PreviewWithSelection, SelectionStore } from "storybook/internal/preview-api";
8
-
9
8
  //#region src/View.d.ts
10
9
  interface Storage {
11
10
  getItem: (key: string) => Promise<string | null> | string | null;
@@ -23,7 +22,7 @@ type InitialSelection = `${StoryKind}--${StoryName}` | {
23
22
  */
24
23
  name: StoryName;
25
24
  };
26
- type DeepPartial<T> = T extends object ? { [P in keyof T]?: DeepPartial<T[P]> } : T;
25
+ type DeepPartial<T> = T extends object ? { [P in keyof T]?: DeepPartial<T[P]>; } : T;
27
26
  type ThemePartial = DeepPartial<Theme$1>;
28
27
  type Params = {
29
28
  onDeviceUI?: boolean;
@@ -38,14 +37,20 @@ type Params = {
38
37
  * default: automatically enabled when a websocket config is injected via storybook.requires (i.e. when STORYBOOK_WS_HOST is set), otherwise false
39
38
  */
40
39
  enableWebsockets?: boolean;
41
- query?: string; /** The host for the websocket server. default: localhost */
42
- host?: string; /** The port for the websocket server. default: 7007 */
40
+ query?: string;
41
+ /** The host for the websocket server. default: localhost */
42
+ host?: string;
43
+ /** The port for the websocket server. default: 7007 */
43
44
  port?: number;
44
- secured?: boolean; /** The initial story */
45
- initialSelection?: InitialSelection; /** Whether to persist story selection. default: true */
45
+ secured?: boolean;
46
+ /** The initial story */
47
+ initialSelection?: InitialSelection;
48
+ /** Whether to persist story selection. default: true */
46
49
  shouldPersistSelection?: boolean;
47
- theme: ThemePartial; /** Used for persisting story selection. required. */
48
- storage?: Storage; /** The custom UI component to use instead of the default UI */
50
+ theme: ThemePartial;
51
+ /** Used for persisting story selection. required. */
52
+ storage?: Storage;
53
+ /** The custom UI component to use instead of the default UI */
49
54
  CustomUIComponent?: SBUI;
50
55
  };
51
56
  declare class View {
@@ -62,17 +67,11 @@ declare class View {
62
67
  _idToPrepared: Record<string, PreparedStory<ReactRenderer>>;
63
68
  constructor(preview: PreviewWithSelection<ReactRenderer>, channel: Channel, options: any);
64
69
  _storyIdExists: (storyId: string) => boolean;
65
- _selectInitialStory: ({
66
- selectionSpecifier,
67
- storyIdFromUrl
68
- }: {
70
+ _selectInitialStory: ({ selectionSpecifier, storyIdFromUrl }: {
69
71
  selectionSpecifier: NonNullable<SelectionStore["selectionSpecifier"]>;
70
72
  storyIdFromUrl?: string | null;
71
73
  }) => Promise<void>;
72
- _getInitialStory: ({
73
- initialSelection,
74
- shouldPersistSelection
75
- }?: Partial<Params>) => Promise<NonNullable<SelectionStore["selectionSpecifier"]>>;
74
+ _getInitialStory: ({ initialSelection, shouldPersistSelection }?: Partial<Params>) => Promise<NonNullable<SelectionStore["selectionSpecifier"]>>;
76
75
  _getHost: (params?: Partial<Params>) => any;
77
76
  __getPort: (params?: Partial<Params>) => any;
78
77
  _isSecureConnection: (params?: Partial<Params>) => any;
@@ -89,11 +88,7 @@ interface ReactNativeOptions {
89
88
  */
90
89
  playFn?: boolean;
91
90
  }
92
- declare function prepareStories({
93
- storyEntries,
94
- options,
95
- storySort
96
- }: {
91
+ declare function prepareStories({ storyEntries, options, storySort }: {
97
92
  storyEntries: (NormalizedStoriesSpecifier & {
98
93
  req: any;
99
94
  })[];
@@ -115,11 +110,7 @@ type StoryEntry = NormalizedStoriesSpecifier & {
115
110
  };
116
111
  };
117
112
  declare const getProjectAnnotations: (view: View, annotations: ModuleExports[]) => () => Promise<NormalizedProjectAnnotations<ReactRenderer>>;
118
- declare function start({
119
- annotations,
120
- storyEntries,
121
- options
122
- }: {
113
+ declare function start({ annotations, storyEntries, options }: {
123
114
  storyEntries: StoryEntry[];
124
115
  annotations: ModuleExports[];
125
116
  options?: ReactNativeOptions;
@@ -136,7 +127,8 @@ declare const STORYBOOK_STORY_ID_PARAM = "STORYBOOK_STORY_ID";
136
127
  //#endregion
137
128
  //#region src/index.d.ts
138
129
  type Features = {
139
- /** Enable the built-in on-device backgrounds addon panel. */ondeviceBackgrounds?: boolean;
130
+ /** Enable the built-in on-device backgrounds addon panel. */
131
+ ondeviceBackgrounds?: boolean;
140
132
  };
141
133
  type Addon = string | {
142
134
  name: string;
@@ -1,10 +1,8 @@
1
- import { t as WebsocketsOptions } from "../index-BX3DD1iT.js";
1
+ import { t as WebsocketsOptions } from "../index-BJ1RN0YK.js";
2
2
  import { HandleFunction, IncomingMessage, Server } from "connect";
3
3
  import EventEmitter from "events";
4
4
  import { Readable } from "stream";
5
5
  import { IncomingMessage as IncomingMessage$1, ServerResponse } from "http";
6
-
7
- //#region \0rolldown/runtime.js
8
6
  //#endregion
9
7
  //#region ../../node_modules/metro-cache/src/types.d.ts
10
8
  /**
@@ -21,7 +19,7 @@ import { IncomingMessage as IncomingMessage$1, ServerResponse } from "http";
21
19
  * Original file: packages/metro-cache/src/types.js
22
20
  * To regenerate, run:
23
21
  * js1 build metro-ts-defs (internal) OR
24
- * yarn run build-ts-defs (OSS)
22
+ * yarn run build-ts-defs (OSS)
25
23
  */
26
24
  interface CacheStore<T> {
27
25
  name?: string;
@@ -60,7 +58,7 @@ declare class Cache<T> {
60
58
  * Original file: packages/metro-cache/src/stableHash.js
61
59
  * To regenerate, run:
62
60
  * js1 build metro-ts-defs (internal) OR
63
- * yarn run build-ts-defs (OSS)
61
+ * yarn run build-ts-defs (OSS)
64
62
  */
65
63
  declare function stableHash(value: unknown): Buffer;
66
64
  //#endregion
@@ -79,7 +77,7 @@ declare function stableHash(value: unknown): Buffer;
79
77
  * Original file: packages/metro-cache/src/stores/FileStore.js
80
78
  * To regenerate, run:
81
79
  * js1 build metro-ts-defs (internal) OR
82
- * yarn run build-ts-defs (OSS)
80
+ * yarn run build-ts-defs (OSS)
83
81
  */
84
82
  type Options$3 = Readonly<{
85
83
  root: string;
@@ -125,7 +123,7 @@ declare class AutoCleanFileStore<T> extends FileStore<T> {
125
123
  * Original file: packages/metro-cache/src/stores/HttpError.js
126
124
  * To regenerate, run:
127
125
  * js1 build metro-ts-defs (internal) OR
128
- * yarn run build-ts-defs (OSS)
126
+ * yarn run build-ts-defs (OSS)
129
127
  */
130
128
  declare class HttpError extends Error {
131
129
  code: number;
@@ -146,7 +144,7 @@ declare class HttpError extends Error {
146
144
  * Original file: packages/metro-cache/src/stores/NetworkError.js
147
145
  * To regenerate, run:
148
146
  * js1 build metro-ts-defs (internal) OR
149
- * yarn run build-ts-defs (OSS)
147
+ * yarn run build-ts-defs (OSS)
150
148
  */
151
149
  declare class NetworkError extends Error {
152
150
  code: string;
@@ -698,7 +696,7 @@ type MixedSourceMap = IndexMap | BasicSourceMap;
698
696
  * Original file: packages/metro/src/lib/CountingSet.js
699
697
  * To regenerate, run:
700
698
  * js1 build metro-ts-defs (internal) OR
701
- * yarn run build-ts-defs (OSS)
699
+ * yarn run build-ts-defs (OSS)
702
700
  */
703
701
  interface ReadOnlyCountingSet<T> extends Iterable<T> {
704
702
  has(item: T): boolean;
@@ -894,10 +892,14 @@ type JsTransformerConfig = Readonly<{
894
892
  unstable_dependencyMapReservedName: null | undefined | string;
895
893
  unstable_disableModuleWrapping: boolean;
896
894
  unstable_disableNormalizePseudoGlobals: boolean;
897
- unstable_compactOutput: boolean; /** Enable `require.context` statements which can be used to import multiple files in a directory. */
898
- unstable_allowRequireContext: boolean; /** With inlineRequires, enable a module-scope memo var and inline as (v || v=require('foo')) */
899
- unstable_memoizeInlineRequires?: boolean; /** With inlineRequires, do not memoize these module specifiers */
900
- unstable_nonMemoizedInlineRequires?: ReadonlyArray<string>; /** Whether to rename scoped `require` functions to `_$$_REQUIRE`, usually an extraneous operation when serializing to iife (default). */
895
+ unstable_compactOutput: boolean;
896
+ /** Enable `require.context` statements which can be used to import multiple files in a directory. */
897
+ unstable_allowRequireContext: boolean;
898
+ /** With inlineRequires, enable a module-scope memo var and inline as (v || v=require('foo')) */
899
+ unstable_memoizeInlineRequires?: boolean;
900
+ /** With inlineRequires, do not memoize these module specifiers */
901
+ unstable_nonMemoizedInlineRequires?: ReadonlyArray<string>;
902
+ /** Whether to rename scoped `require` functions to `_$$_REQUIRE`, usually an extraneous operation when serializing to iife (default). */
901
903
  unstable_renameRequire?: boolean;
902
904
  }>;
903
905
  type JsTransformOptions = Readonly<{
@@ -1002,7 +1004,8 @@ type ContextFilter = Readonly<{
1002
1004
  }>;
1003
1005
  type RequireContextParams = Readonly<{
1004
1006
  recursive: boolean;
1005
- filter: Readonly<ContextFilter>; /** Mode for resolving dynamic dependencies. Defaults to `sync` */
1007
+ filter: Readonly<ContextFilter>;
1008
+ /** Mode for resolving dynamic dependencies. Defaults to `sync` */
1006
1009
  mode: ContextMode;
1007
1010
  }>;
1008
1011
  type DynamicRequiresBehavior = 'throwAtRuntime' | 'reject';
@@ -1010,8 +1013,10 @@ type DynamicRequiresBehavior = 'throwAtRuntime' | 'reject';
1010
1013
  //#region ../../node_modules/metro/src/lib/contextModule.d.ts
1011
1014
  type RequireContext = Readonly<{
1012
1015
  recursive: boolean;
1013
- filter: RegExp; /** Mode for resolving dynamic dependencies. Defaults to `sync` */
1014
- mode: ContextMode; /** Absolute path of the directory to search in */
1016
+ filter: RegExp;
1017
+ /** Mode for resolving dynamic dependencies. Defaults to `sync` */
1018
+ mode: ContextMode;
1019
+ /** Absolute path of the directory to search in */
1015
1020
  from: string;
1016
1021
  }>;
1017
1022
  //#endregion
@@ -1048,7 +1053,8 @@ type TransformResultDependency = Readonly<{
1048
1053
  * The dependency is enclosed in a try/catch block.
1049
1054
  */
1050
1055
  isOptional?: boolean;
1051
- locs: ReadonlyArray<ReadonlySourceLocation>; /** Context for requiring a collection of modules. */
1056
+ locs: ReadonlyArray<ReadonlySourceLocation>;
1057
+ /** Context for requiring a collection of modules. */
1052
1058
  contextParams?: RequireContextParams;
1053
1059
  }>;
1054
1060
  }>;
@@ -1231,7 +1237,8 @@ type ResolutionContext = Readonly<{
1231
1237
  doesFileExist: DoesFileExist;
1232
1238
  extraNodeModules: null | undefined | {
1233
1239
  [$$Key$$: string]: string;
1234
- }; /** Is resolving for a development bundle. */
1240
+ };
1241
+ /** Is resolving for a development bundle. */
1235
1242
  dev: boolean;
1236
1243
  /**
1237
1244
  * Get the parsed contents of the specified `package.json` file.
@@ -2081,7 +2088,8 @@ type MetalConfigT = {
2081
2088
  };
2082
2089
  type CacheStoresConfigT = ReadonlyArray<CacheStore<TransformResult>>;
2083
2090
  type ServerConfigT = {
2084
- /** @deprecated */enhanceMiddleware: ($$PARAM_0$$: Middleware, $$PARAM_1$$: Server$1) => Middleware | Server;
2091
+ /** @deprecated */
2092
+ enhanceMiddleware: ($$PARAM_0$$: Middleware, $$PARAM_1$$: Server$1) => Middleware | Server;
2085
2093
  forwardClientLogs: boolean;
2086
2094
  port: number;
2087
2095
  rewriteRequestUrl: ($$PARAM_0$$: string) => string;
@@ -1,7 +1,7 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
2
  const require_rolldown_runtime = require("../rolldown-runtime-Bd6kNlEP.js");
3
- const require_channelServer = require("../channelServer-D4z8ZcuA.js");
4
- const require_env_tools = require("../env-tools-D5ChBsme.js");
3
+ const require_channelServer = require("../channelServer-D-IaG_dn.js");
4
+ const require_env_tools = require("../env-tools-Bo-isXVU.js");
5
5
  let path = require("path");
6
6
  path = require_rolldown_runtime.__toESM(path);
7
7
  let storybook_internal_common = require("storybook/internal/common");
package/dist/node.d.ts CHANGED
@@ -1,6 +1,5 @@
1
1
  import { StoryIndex } from "storybook/internal/types";
2
2
  import { WebSocketServer } from "ws";
3
-
4
3
  //#region src/metro/channelServer.d.ts
5
4
  interface ChannelServerSecureOptions {
6
5
  ca?: string | Buffer | Array<string | Buffer>;
@@ -70,21 +69,10 @@ interface ChannelServerOptions {
70
69
  * @param options.keepAlive - Whether the channel server should keep the Node.js process alive.
71
70
  * @returns The created WebSocketServer instance, or null when websockets are disabled.
72
71
  */
73
- declare function createChannelServer({
74
- port,
75
- host,
76
- configPath,
77
- experimental_mcp,
78
- websockets,
79
- secured,
80
- ssl,
81
- keepNodeProcessAlive
82
- }: ChannelServerOptions): WebSocketServer | null;
72
+ declare function createChannelServer({ port, host, configPath, experimental_mcp, websockets, secured, ssl, keepNodeProcessAlive }: ChannelServerOptions): WebSocketServer | null;
83
73
  //#endregion
84
74
  //#region src/metro/buildIndex.d.ts
85
- declare function buildIndex({
86
- configPath
87
- }: {
75
+ declare function buildIndex({ configPath }: {
88
76
  configPath: string;
89
77
  }): Promise<StoryIndex>;
90
78
  //#endregion
package/dist/node.js CHANGED
@@ -1,5 +1,5 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
2
  require("./rolldown-runtime-Bd6kNlEP.js");
3
- const require_channelServer = require("./channelServer-D4z8ZcuA.js");
3
+ const require_channelServer = require("./channelServer-D-IaG_dn.js");
4
4
  exports.buildIndex = require_channelServer.buildIndex;
5
5
  exports.createChannelServer = require_channelServer.createChannelServer;
package/dist/preview.d.ts CHANGED
@@ -1,5 +1,4 @@
1
1
  import { Preview } from "@storybook/react";
2
-
3
2
  //#region src/preview.d.ts
4
3
  declare const preview: Preview;
5
4
  export = preview;
package/dist/preview.js CHANGED
@@ -1,14 +1,14 @@
1
1
  require("./rolldown-runtime-Bd6kNlEP.js");
2
2
  let react_native = require("react-native");
3
- let _storybook_react_entry_preview_docs = require("@storybook/react/entry-preview-docs");
3
+ let _storybook_react_entry_preview_argtypes = require("@storybook/react/entry-preview-argtypes");
4
4
  //#region src/preview.ts
5
5
  if (react_native.Platform.OS === "web") {
6
6
  globalThis.ProgressTransitionRegister = {};
7
7
  globalThis.UpdatePropsManager = {};
8
8
  }
9
9
  const preview = {
10
- argTypesEnhancers: _storybook_react_entry_preview_docs.argTypesEnhancers,
11
- parameters: { docs: { extractArgTypes: _storybook_react_entry_preview_docs.parameters.docs.extractArgTypes } }
10
+ argTypesEnhancers: _storybook_react_entry_preview_argtypes.argTypesEnhancers,
11
+ parameters: { docs: { extractArgTypes: _storybook_react_entry_preview_argtypes.parameters.docs.extractArgTypes } }
12
12
  };
13
13
  //#endregion
14
14
  module.exports = preview;
@@ -1,5 +1,4 @@
1
- import { t as WebsocketsOptions } from "../index-BX3DD1iT.js";
2
-
1
+ import { t as WebsocketsOptions } from "../index-BJ1RN0YK.js";
3
2
  //#region src/repack/withStorybook.d.ts
4
3
  /**
5
4
  * Minimal compiler types for webpack/rspack compatibility.
@@ -1,7 +1,7 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
2
  const require_rolldown_runtime = require("../rolldown-runtime-Bd6kNlEP.js");
3
- const require_channelServer = require("../channelServer-D4z8ZcuA.js");
4
- const require_env_tools = require("../env-tools-D5ChBsme.js");
3
+ const require_channelServer = require("../channelServer-D-IaG_dn.js");
4
+ const require_env_tools = require("../env-tools-Bo-isXVU.js");
5
5
  let path = require("path");
6
6
  path = require_rolldown_runtime.__toESM(path);
7
7
  let storybook_internal_telemetry = require("storybook/internal/telemetry");
@@ -1,5 +1,4 @@
1
- import { t as WebsocketsOptions } from "./index-BX3DD1iT.js";
2
-
1
+ import { t as WebsocketsOptions } from "./index-BJ1RN0YK.js";
3
2
  //#region src/metro/utils.d.ts
4
3
  interface WithStorybookOptions {
5
4
  configPath?: string;
@@ -1,7 +1,7 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
2
  const require_rolldown_runtime = require("./rolldown-runtime-Bd6kNlEP.js");
3
- const require_channelServer = require("./channelServer-D4z8ZcuA.js");
4
- const require_env_tools = require("./env-tools-D5ChBsme.js");
3
+ const require_channelServer = require("./channelServer-D-IaG_dn.js");
4
+ const require_env_tools = require("./env-tools-Bo-isXVU.js");
5
5
  let path = require("path");
6
6
  path = require_rolldown_runtime.__toESM(path);
7
7
  let fs = require("fs");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@storybook/react-native",
3
- "version": "10.4.7",
3
+ "version": "10.4.8-canary-20260711115827",
4
4
  "description": "A better way to develop React Native Components for your app",
5
5
  "keywords": [
6
6
  "react",
@@ -44,11 +44,11 @@
44
44
  "metro/**/*"
45
45
  ],
46
46
  "dependencies": {
47
- "@storybook/mcp": "^0.7.0",
48
- "@storybook/react": "^10.4.6",
49
- "@storybook/react-native-theming": "^10.4.7",
50
- "@storybook/react-native-ui": "^10.4.7",
51
- "@storybook/react-native-ui-common": "^10.4.7",
47
+ "@storybook/mcp": "^0.8.0",
48
+ "@storybook/react": "^10.5.0",
49
+ "@storybook/react-native-theming": "10.4.8-canary-20260711115827",
50
+ "@storybook/react-native-ui": "10.4.8-canary-20260711115827",
51
+ "@storybook/react-native-ui-common": "10.4.8-canary-20260711115827",
52
52
  "@tmcp/adapter-valibot": "^0.1.6",
53
53
  "@tmcp/transport-http": "^0.8.6",
54
54
  "commander": "^14.0.2",
@@ -59,24 +59,25 @@
59
59
  "react-native-url-polyfill": "^3.0.0",
60
60
  "setimmediate": "^1.0.5",
61
61
  "tmcp": "^1.19.4",
62
- "valibot": "^1.4.1",
62
+ "valibot": "^1.4.2",
63
63
  "ws": "^8.21.0"
64
64
  },
65
65
  "devDependencies": {
66
+ "@babel/core": "^7.29.7",
66
67
  "@react-native/jest-preset": "0.85.3",
67
68
  "@types/jest": "^29.5.13",
68
69
  "@types/react": "~19.2.14",
69
70
  "babel-jest": "^29.7.0",
70
- "babel-preset-expo": "^55.0.22",
71
+ "babel-preset-expo": "^57.0.2",
71
72
  "jest": "^29.7.0",
72
- "jest-expo": "~56.0.5",
73
+ "jest-expo": "~57.0.1",
73
74
  "jotai": "^2.20.1",
74
75
  "react": "19.2.3",
75
- "react-native": "0.85.3",
76
- "storybook": "^10.4.6",
76
+ "react-native": "0.86.0",
77
+ "storybook": "^10.5.0",
77
78
  "sucrase": "^3.35.1",
78
79
  "test-renderer": "^0.15.0",
79
- "tsdown": "^0.22.3",
80
+ "tsdown": "^0.22.4",
80
81
  "typescript": "~6.0.3"
81
82
  },
82
83
  "peerDependencies": {