@storybook/react-native 7.6.12 → 7.6.13
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/V6.js +28 -7
- package/dist/index.js +28 -7
- package/package.json +3 -3
package/dist/V6.js
CHANGED
|
@@ -1256,12 +1256,26 @@ var ErrorBoundary = class extends import_react4.default.Component {
|
|
|
1256
1256
|
static getDerivedStateFromError(_error) {
|
|
1257
1257
|
return { hasError: true };
|
|
1258
1258
|
}
|
|
1259
|
-
componentDidCatch(error,
|
|
1260
|
-
|
|
1259
|
+
componentDidCatch(error, info) {
|
|
1260
|
+
this.props.onError(error, info.componentStack);
|
|
1261
1261
|
}
|
|
1262
1262
|
render() {
|
|
1263
1263
|
if (this.state.hasError) {
|
|
1264
|
-
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
1264
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
1265
|
+
import_react_native3.View,
|
|
1266
|
+
{
|
|
1267
|
+
style: {
|
|
1268
|
+
margin: 16,
|
|
1269
|
+
padding: 16,
|
|
1270
|
+
borderColor: "red",
|
|
1271
|
+
borderWidth: 2,
|
|
1272
|
+
alignItems: "center",
|
|
1273
|
+
justifyContent: "center",
|
|
1274
|
+
borderRadius: 4
|
|
1275
|
+
},
|
|
1276
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react_native3.Text, { style: { fontWeight: "bold" }, children: "Something went wrong rendering your story" })
|
|
1277
|
+
}
|
|
1278
|
+
);
|
|
1265
1279
|
}
|
|
1266
1280
|
return this.props.children;
|
|
1267
1281
|
}
|
|
@@ -1285,7 +1299,15 @@ var StoryView = () => {
|
|
|
1285
1299
|
style: { flex: 1, backgroundColor },
|
|
1286
1300
|
testID: id,
|
|
1287
1301
|
onStartShouldSetResponder: dismissOnStartResponder,
|
|
1288
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
1302
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
1303
|
+
ErrorBoundary,
|
|
1304
|
+
{
|
|
1305
|
+
onError: () => {
|
|
1306
|
+
console.log(`Error rendering story for ${context.title} ${context.name}`);
|
|
1307
|
+
},
|
|
1308
|
+
children: StoryComponent && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(StoryComponent, { ...context })
|
|
1309
|
+
}
|
|
1310
|
+
)
|
|
1289
1311
|
},
|
|
1290
1312
|
id
|
|
1291
1313
|
);
|
|
@@ -2003,7 +2025,7 @@ function getHost(hostname) {
|
|
|
2003
2025
|
// src/View.tsx
|
|
2004
2026
|
var import_jsx_runtime16 = require("react/jsx-runtime");
|
|
2005
2027
|
var STORAGE_KEY = "lastOpenedStory";
|
|
2006
|
-
var
|
|
2028
|
+
var View11 = class {
|
|
2007
2029
|
_storyIndex;
|
|
2008
2030
|
_setStory = () => {
|
|
2009
2031
|
};
|
|
@@ -2069,7 +2091,6 @@ var View10 = class {
|
|
|
2069
2091
|
this._idToPrepared[storyId] = await this._preview.storyStore.loadStory({ storyId });
|
|
2070
2092
|
})
|
|
2071
2093
|
);
|
|
2072
|
-
console.log("Storybook: Finished building story index");
|
|
2073
2094
|
};
|
|
2074
2095
|
getStorybookUI = (params = {}) => {
|
|
2075
2096
|
const {
|
|
@@ -2300,7 +2321,7 @@ function start() {
|
|
|
2300
2321
|
preview.onStoriesChanged({ storyIndex });
|
|
2301
2322
|
view2._storyIndex = storyIndex;
|
|
2302
2323
|
}
|
|
2303
|
-
const view2 = new
|
|
2324
|
+
const view2 = new View11(preview, channel);
|
|
2304
2325
|
return {
|
|
2305
2326
|
view: view2,
|
|
2306
2327
|
forceReRender: () => channel.emit(import_core_events3.default.FORCE_RE_RENDER),
|
package/dist/index.js
CHANGED
|
@@ -1249,12 +1249,26 @@ var ErrorBoundary = class extends import_react4.default.Component {
|
|
|
1249
1249
|
static getDerivedStateFromError(_error) {
|
|
1250
1250
|
return { hasError: true };
|
|
1251
1251
|
}
|
|
1252
|
-
componentDidCatch(error,
|
|
1253
|
-
|
|
1252
|
+
componentDidCatch(error, info) {
|
|
1253
|
+
this.props.onError(error, info.componentStack);
|
|
1254
1254
|
}
|
|
1255
1255
|
render() {
|
|
1256
1256
|
if (this.state.hasError) {
|
|
1257
|
-
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
1257
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
1258
|
+
import_react_native3.View,
|
|
1259
|
+
{
|
|
1260
|
+
style: {
|
|
1261
|
+
margin: 16,
|
|
1262
|
+
padding: 16,
|
|
1263
|
+
borderColor: "red",
|
|
1264
|
+
borderWidth: 2,
|
|
1265
|
+
alignItems: "center",
|
|
1266
|
+
justifyContent: "center",
|
|
1267
|
+
borderRadius: 4
|
|
1268
|
+
},
|
|
1269
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react_native3.Text, { style: { fontWeight: "bold" }, children: "Something went wrong rendering your story" })
|
|
1270
|
+
}
|
|
1271
|
+
);
|
|
1258
1272
|
}
|
|
1259
1273
|
return this.props.children;
|
|
1260
1274
|
}
|
|
@@ -1278,7 +1292,15 @@ var StoryView = () => {
|
|
|
1278
1292
|
style: { flex: 1, backgroundColor },
|
|
1279
1293
|
testID: id,
|
|
1280
1294
|
onStartShouldSetResponder: dismissOnStartResponder,
|
|
1281
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
1295
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
1296
|
+
ErrorBoundary,
|
|
1297
|
+
{
|
|
1298
|
+
onError: () => {
|
|
1299
|
+
console.log(`Error rendering story for ${context.title} ${context.name}`);
|
|
1300
|
+
},
|
|
1301
|
+
children: StoryComponent && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(StoryComponent, { ...context })
|
|
1302
|
+
}
|
|
1303
|
+
)
|
|
1282
1304
|
},
|
|
1283
1305
|
id
|
|
1284
1306
|
);
|
|
@@ -1996,7 +2018,7 @@ function getHost(hostname) {
|
|
|
1996
2018
|
// src/View.tsx
|
|
1997
2019
|
var import_jsx_runtime16 = require("react/jsx-runtime");
|
|
1998
2020
|
var STORAGE_KEY = "lastOpenedStory";
|
|
1999
|
-
var
|
|
2021
|
+
var View11 = class {
|
|
2000
2022
|
_storyIndex;
|
|
2001
2023
|
_setStory = () => {
|
|
2002
2024
|
};
|
|
@@ -2062,7 +2084,6 @@ var View10 = class {
|
|
|
2062
2084
|
this._idToPrepared[storyId] = await this._preview.storyStore.loadStory({ storyId });
|
|
2063
2085
|
})
|
|
2064
2086
|
);
|
|
2065
|
-
console.log("Storybook: Finished building story index");
|
|
2066
2087
|
};
|
|
2067
2088
|
getStorybookUI = (params = {}) => {
|
|
2068
2089
|
const {
|
|
@@ -2279,7 +2300,7 @@ function start({
|
|
|
2279
2300
|
}
|
|
2280
2301
|
};
|
|
2281
2302
|
const preview = new import_preview_web.PreviewWithSelection(urlStore, previewView);
|
|
2282
|
-
const view = new
|
|
2303
|
+
const view = new View11(preview, channel);
|
|
2283
2304
|
if (global) {
|
|
2284
2305
|
global.__STORYBOOK_ADDONS_CHANNEL__ = channel;
|
|
2285
2306
|
global.__STORYBOOK_PREVIEW__ = preview;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@storybook/react-native",
|
|
3
|
-
"version": "7.6.
|
|
3
|
+
"version": "7.6.13",
|
|
4
4
|
"description": "A better way to develop React Native Components for your app",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react",
|
|
@@ -63,7 +63,7 @@
|
|
|
63
63
|
"@storybook/preview-api": "^7.6.10",
|
|
64
64
|
"@storybook/preview-web": "^7.6.10",
|
|
65
65
|
"@storybook/react": "^7.6.10",
|
|
66
|
-
"@storybook/react-native-theming": "^7.6.
|
|
66
|
+
"@storybook/react-native-theming": "^7.6.13",
|
|
67
67
|
"chokidar": "^3.5.1",
|
|
68
68
|
"commander": "^8.2.0",
|
|
69
69
|
"dedent": "^1.5.1",
|
|
@@ -97,5 +97,5 @@
|
|
|
97
97
|
"publishConfig": {
|
|
98
98
|
"access": "public"
|
|
99
99
|
},
|
|
100
|
-
"gitHead": "
|
|
100
|
+
"gitHead": "65a036af0a3bdb8a3c48e8acc2b7a935165ddbb8"
|
|
101
101
|
}
|