@storybook/react-native 10.4.6 → 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.
- package/dist/{channelServer-D4z8ZcuA.js → channelServer-D-IaG_dn.js} +2 -1
- package/dist/{env-tools-D5ChBsme.js → env-tools-Bo-isXVU.js} +1 -1
- package/dist/{index-BX3DD1iT.d.ts → index-BJ1RN0YK.d.ts} +1 -0
- package/dist/index.d.ts +19 -27
- package/dist/metro/withStorybook.d.ts +27 -19
- package/dist/metro/withStorybook.js +8 -5
- package/dist/node.d.ts +2 -14
- package/dist/node.js +1 -1
- package/dist/preview.d.ts +0 -1
- package/dist/preview.js +3 -3
- package/dist/repack/withStorybook.d.ts +1 -2
- package/dist/repack/withStorybook.js +4 -3
- package/dist/withStorybook.d.ts +1 -2
- package/dist/withStorybook.js +2 -2
- package/package.json +13 -12
|
@@ -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
|
|
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-
|
|
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;
|
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]
|
|
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;
|
|
42
|
-
|
|
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;
|
|
45
|
-
|
|
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;
|
|
48
|
-
|
|
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. */
|
|
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-
|
|
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;
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
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>;
|
|
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;
|
|
1014
|
-
|
|
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>;
|
|
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
|
-
};
|
|
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 */
|
|
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-
|
|
4
|
-
const require_env_tools = require("../env-tools-
|
|
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");
|
|
@@ -86,7 +86,9 @@ function withStorybook(config, options = {
|
|
|
86
86
|
configPath: path.resolve(process.cwd(), "./.rnstorybook")
|
|
87
87
|
}) {
|
|
88
88
|
const { configPath = path.resolve(process.cwd(), "./.rnstorybook"), websockets, useJs = false, enabled = true, docTools = true, liteMode = false, experimental_mcp = false } = options;
|
|
89
|
-
|
|
89
|
+
const disableTelemetry = (0, storybook_internal_common.optionalEnvToBoolean)(process.env.STORYBOOK_DISABLE_TELEMETRY);
|
|
90
|
+
const server = require_env_tools.envVariableToBoolean(process.env.STORYBOOK_SERVER, true);
|
|
91
|
+
if (!disableTelemetry && enabled) (0, storybook_internal_telemetry.telemetry)("dev", {}).catch((e) => {});
|
|
90
92
|
if (!enabled) return {
|
|
91
93
|
...config,
|
|
92
94
|
resolver: {
|
|
@@ -112,12 +114,13 @@ function withStorybook(config, options = {
|
|
|
112
114
|
const generateHost = resolvedWs.host ?? (websockets === "auto" && !process.env.STORYBOOK_WS_HOST ? "auto" : void 0);
|
|
113
115
|
const port = resolvedWs.port ?? 7007;
|
|
114
116
|
const secured = resolvedWs.secured;
|
|
115
|
-
|
|
117
|
+
const channelWebsocketsEnabled = Boolean(websockets) || Boolean(process.env.STORYBOOK_WS_HOST) || Boolean(resolvedWs.host);
|
|
118
|
+
if (server) require_channelServer.createChannelServer({
|
|
116
119
|
port,
|
|
117
120
|
host: bindHost,
|
|
118
121
|
configPath,
|
|
119
122
|
experimental_mcp,
|
|
120
|
-
websockets:
|
|
123
|
+
websockets: channelWebsocketsEnabled,
|
|
121
124
|
secured,
|
|
122
125
|
ssl: websockets && websockets !== "auto" ? {
|
|
123
126
|
key: websockets.key,
|
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-
|
|
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
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
|
|
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:
|
|
11
|
-
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,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-
|
|
4
|
-
const require_env_tools = require("../env-tools-
|
|
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");
|
|
@@ -73,12 +73,13 @@ var StorybookPlugin = class {
|
|
|
73
73
|
*/
|
|
74
74
|
applyEnabled(compiler, { configPath, websockets, useJs, docTools, liteMode, experimental_mcp }) {
|
|
75
75
|
const resolvedWs = require_env_tools.loadWebsocketEnvOverrides(websockets);
|
|
76
|
+
const server = require_env_tools.envVariableToBoolean(process.env.STORYBOOK_SERVER, true);
|
|
76
77
|
const bindHost = websockets === "auto" && !process.env.STORYBOOK_WS_HOST ? void 0 : resolvedWs.host;
|
|
77
78
|
const generateHost = resolvedWs.host ?? (websockets === "auto" && !process.env.STORYBOOK_WS_HOST ? "auto" : void 0);
|
|
78
79
|
const port = resolvedWs.port ?? 7007;
|
|
79
80
|
const secured = resolvedWs.secured;
|
|
80
81
|
const channelWebsocketsEnabled = Boolean(websockets) || Boolean(process.env.STORYBOOK_WS_HOST) || Boolean(resolvedWs.host);
|
|
81
|
-
if ((experimental_mcp || websockets != null || process.env.STORYBOOK_WS_HOST) && !this.serverStarted) {
|
|
82
|
+
if ((experimental_mcp || websockets != null || process.env.STORYBOOK_WS_HOST) && !this.serverStarted && server) {
|
|
82
83
|
this.serverStarted = true;
|
|
83
84
|
require_channelServer.createChannelServer({
|
|
84
85
|
port,
|
package/dist/withStorybook.d.ts
CHANGED
package/dist/withStorybook.js
CHANGED
|
@@ -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-
|
|
4
|
-
const require_env_tools = require("./env-tools-
|
|
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.
|
|
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.
|
|
48
|
-
"@storybook/react": "^10.
|
|
49
|
-
"@storybook/react-native-theming": "
|
|
50
|
-
"@storybook/react-native-ui": "
|
|
51
|
-
"@storybook/react-native-ui-common": "
|
|
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.
|
|
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": "^
|
|
71
|
+
"babel-preset-expo": "^57.0.2",
|
|
71
72
|
"jest": "^29.7.0",
|
|
72
|
-
"jest-expo": "~
|
|
73
|
+
"jest-expo": "~57.0.1",
|
|
73
74
|
"jotai": "^2.20.1",
|
|
74
75
|
"react": "19.2.3",
|
|
75
|
-
"react-native": "0.
|
|
76
|
-
"storybook": "^10.
|
|
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.
|
|
80
|
+
"tsdown": "^0.22.4",
|
|
80
81
|
"typescript": "~6.0.3"
|
|
81
82
|
},
|
|
82
83
|
"peerDependencies": {
|