@storybook/react-native 10.0.0-beta.0 → 10.0.0-beta.8

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.js CHANGED
@@ -39,9 +39,33 @@ __export(index_exports, {
39
39
  module.exports = __toCommonJS(index_exports);
40
40
  var import_react_native_theming3 = require("@storybook/react-native-theming");
41
41
 
42
+ // ../../node_modules/react-native-web/dist/exports/Platform/index.js
43
+ var Platform = {
44
+ OS: "web",
45
+ select: (obj) => "web" in obj ? obj.web : obj.default,
46
+ get isTesting() {
47
+ if (process.env.NODE_ENV === "test") {
48
+ return true;
49
+ }
50
+ return false;
51
+ }
52
+ };
53
+ var Platform_default = Platform;
54
+
55
+ // src/polyfill.ts
56
+ if (Platform_default.OS !== "web") {
57
+ try {
58
+ let params = new URLSearchParams({ test: "1" });
59
+ params.get("test");
60
+ } catch {
61
+ const { setupURLPolyfill } = require("react-native-url-polyfill");
62
+ setupURLPolyfill();
63
+ }
64
+ }
65
+
42
66
  // src/Start.tsx
43
67
  var import_react_native4 = require("react-native");
44
- var import_manager_api2 = require("storybook/internal/manager-api");
68
+ var import_manager_api2 = require("storybook/manager-api");
45
69
  var import_preview_api2 = require("storybook/internal/preview-api");
46
70
  var import_csf2 = require("storybook/internal/csf");
47
71
  var import_channels2 = require("storybook/internal/channels");
@@ -52,7 +76,7 @@ var import_react_native_theming2 = require("@storybook/react-native-theming");
52
76
  var import_react_native_ui_common = require("@storybook/react-native-ui-common");
53
77
  var import_channels = require("storybook/internal/channels");
54
78
  var import_core_events = require("storybook/internal/core-events");
55
- var import_manager_api = require("storybook/internal/manager-api");
79
+ var import_manager_api = require("storybook/manager-api");
56
80
  var import_preview_api = require("storybook/internal/preview-api");
57
81
  var import_dedent = __toESM(require("dedent"));
58
82
  var import_deepmerge = __toESM(require("deepmerge"));
@@ -1148,15 +1172,6 @@ var View3 = class {
1148
1172
 
1149
1173
  // src/Start.tsx
1150
1174
  var import_jsx_runtime4 = require("react/jsx-runtime");
1151
- if (import_react_native4.Platform.OS !== "web") {
1152
- try {
1153
- let params = new URLSearchParams({ test: "1" });
1154
- params.get("test");
1155
- } catch {
1156
- const { setupURLPolyfill } = require("react-native-url-polyfill");
1157
- setupURLPolyfill();
1158
- }
1159
- }
1160
1175
  globalThis.FEATURES = {
1161
1176
  measure: false,
1162
1177
  outline: false,
@@ -1223,7 +1238,8 @@ function prepareStories({
1223
1238
  title,
1224
1239
  importPath: `${root}/${filename.substring(2)}`,
1225
1240
  // FIXME: use normalize function here
1226
- tags: ["story"]
1241
+ tags: ["story"],
1242
+ subtype: "story"
1227
1243
  };
1228
1244
  const importedStories = req(filename);
1229
1245
  const stories = Object.entries(importedStories).reduce(
@@ -1293,7 +1309,7 @@ function start({
1293
1309
  options,
1294
1310
  storySort: composedAnnotations.parameters?.options?.storySort
1295
1311
  });
1296
- const channel = (0, import_channels2.createBrowserChannel)({ page: "preview" });
1312
+ const channel = new import_channels2.Channel({});
1297
1313
  import_manager_api2.addons.setChannel(channel);
1298
1314
  import_preview_api2.addons.setChannel(channel);
1299
1315
  const previewView = {
@@ -243,6 +243,8 @@ export const view${useJs ? "" : ": View"} = global.view;
243
243
  var path = __toESM(require("path"));
244
244
  var import_generate = __toESM(require_generate());
245
245
  var import_ws = require("ws");
246
+ var import_common = require("storybook/internal/common");
247
+ var import_telemetry = require("storybook/internal/telemetry");
246
248
  function withStorybook(config, options = {
247
249
  enabled: true,
248
250
  useJs: false,
@@ -259,6 +261,12 @@ function withStorybook(config, options = {
259
261
  docTools = true,
260
262
  liteMode = false
261
263
  } = options;
264
+ const disableTelemetry = (0, import_common.optionalEnvToBoolean)(process.env.STORYBOOK_DISABLE_TELEMETRY);
265
+ if (!disableTelemetry && enabled) {
266
+ const event = process.env.NODE_ENV === "production" ? "build" : "dev";
267
+ (0, import_telemetry.telemetry)(event, {}).catch((e) => {
268
+ });
269
+ }
262
270
  if (!enabled) {
263
271
  if (onDisabledRemoveStorybook) {
264
272
  return {
@@ -254,6 +254,8 @@ module.exports = __toCommonJS(withStorybookConfig_exports);
254
254
  var path = __toESM(require("path"));
255
255
  var import_generate = __toESM(require_generate());
256
256
  var import_ws = require("ws");
257
+ var import_common = require("storybook/internal/common");
258
+ var import_telemetry = require("storybook/internal/telemetry");
257
259
  function withStorybookConfig(config, options = {
258
260
  useJs: false,
259
261
  removeStorybook: false,
@@ -269,6 +271,12 @@ function withStorybookConfig(config, options = {
269
271
  docTools = true,
270
272
  liteMode = false
271
273
  } = options;
274
+ const disableTelemetry = (0, import_common.optionalEnvToBoolean)(process.env.STORYBOOK_DISABLE_TELEMETRY);
275
+ if (!disableTelemetry && !removeStorybook) {
276
+ const event = process.env.NODE_ENV === "production" ? "build" : "dev";
277
+ (0, import_telemetry.telemetry)(event, {}).catch((e) => {
278
+ });
279
+ }
272
280
  if (removeStorybook) {
273
281
  return {
274
282
  ...config,
@@ -0,0 +1 @@
1
+ module.exports = require('../dist/metro/withStorybookConfig.js');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@storybook/react-native",
3
- "version": "10.0.0-beta.0",
3
+ "version": "10.0.0-beta.8",
4
4
  "description": "A better way to develop React Native Components for your app",
5
5
  "keywords": [
6
6
  "react",
@@ -49,10 +49,10 @@
49
49
  },
50
50
  "dependencies": {
51
51
  "@storybook/global": "^5.0.0",
52
- "@storybook/react": "10.0.0-beta.0",
53
- "@storybook/react-native-theming": "^10.0.0-beta.0",
54
- "@storybook/react-native-ui": "^10.0.0-beta.0",
55
- "@storybook/react-native-ui-common": "^10.0.0-beta.0",
52
+ "@storybook/react": "10.0.0-beta.8",
53
+ "@storybook/react-native-theming": "^10.0.0-beta.8",
54
+ "@storybook/react-native-ui": "^10.0.0-beta.8",
55
+ "@storybook/react-native-ui-common": "^10.0.0-beta.8",
56
56
  "commander": "^8.2.0",
57
57
  "dedent": "^1.5.1",
58
58
  "deepmerge": "^4.3.0",
@@ -70,11 +70,11 @@
70
70
  "babel-jest": "^29.7.0",
71
71
  "babel-preset-expo": "^12.0.9",
72
72
  "jest": "^29.7.0",
73
- "jest-expo": "~54.0.1",
73
+ "jest-expo": "~54.0.12",
74
74
  "jotai": "^2.6.2",
75
75
  "react": "19.1.0",
76
- "react-native": "0.81.0",
77
- "storybook": "10.0.0-beta.0",
76
+ "react-native": "0.81.4",
77
+ "storybook": "10.0.0-beta.8",
78
78
  "tsup": "^8.5.0",
79
79
  "typescript": "~5.9.2",
80
80
  "universal-test-renderer": "^0.6.0"
@@ -108,5 +108,5 @@
108
108
  "publishConfig": {
109
109
  "access": "public"
110
110
  },
111
- "gitHead": "2a6a4f7e68024b71178cad8ea0dc08cbba7dca1b"
111
+ "gitHead": "18834e54853a10911b05fb67d78d5ad3f1f35635"
112
112
  }