@storybook/react-native-ui-lite 10.0.2-alpha.0 → 10.0.2

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
@@ -7,8 +7,8 @@ import { Item, ExpandAction, CombinedDataset, Selection, SBUI } from '@storybook
7
7
  import { State, StoriesHash } from 'storybook/manager-api';
8
8
  import { API_LoadedRefData, API_IndexHash } from 'storybook/internal/types';
9
9
  import * as react_jsx_runtime from 'react/jsx-runtime';
10
- import { StoryContext, Args } from 'storybook/internal/csf';
11
10
  import { ReactRenderer } from '@storybook/react';
11
+ import { StoryContext, Args } from 'storybook/internal/csf';
12
12
 
13
13
  interface NodeProps$1 {
14
14
  children: React.ReactNode | React.ReactNode[];
package/dist/index.js CHANGED
@@ -49,7 +49,6 @@ module.exports = __toCommonJS(index_exports);
49
49
  var import_react_native_theming2 = require("@storybook/react-native-theming");
50
50
  var import_react2 = __toESM(require("react"));
51
51
  var import_polished = require("polished");
52
- var import_react_native2 = require("react-native");
53
52
 
54
53
  // src/icon/iconDataUris.tsx
55
54
  var import_react = require("react");
@@ -388,12 +387,11 @@ var GroupNode = import_react2.default.memo(function GroupNode2({
388
387
  const color = (0, import_react2.useMemo)(() => {
389
388
  return theme.base === "dark" ? theme.color.primary : theme.color.ultraviolet;
390
389
  }, [theme.base, theme.color.primary, theme.color.ultraviolet]);
391
- const wrapperProps = import_react_native2.Platform.OS === "macos" ? { key: `${props.id}-${color}` } : {};
392
390
  return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(BranchNode, { isExpandable, ...props, children: [
393
- /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(Wrapper, { ...wrapperProps, children: [
391
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(Wrapper, { children: [
394
392
  isExpandable && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(CollapseIcon, { isExpanded }),
395
393
  /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(GroupIcon, { width: 14, height: 14, color })
396
- ] }),
394
+ ] }, `group-${props.id}-${color}`),
397
395
  /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(BranchNodeText, { children })
398
396
  ] });
399
397
  });
@@ -403,12 +401,11 @@ var ComponentNode = import_react2.default.memo(
403
401
  const color = (0, import_react2.useMemo)(() => {
404
402
  return theme.color.secondary;
405
403
  }, [theme.color.secondary]);
406
- const wrapperProps = import_react_native2.Platform.OS === "macos" ? { key: `${props.id}-${color}` } : {};
407
404
  return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(BranchNode, { isExpandable, ...props, children: [
408
- /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(Wrapper, { ...wrapperProps, children: [
405
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(Wrapper, { children: [
409
406
  isExpandable && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(CollapseIcon, { isExpanded }),
410
407
  /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(ComponentIcon, { width: 12, height: 12, color })
411
- ] }),
408
+ ] }, `component-${props.id}-${color}`),
412
409
  /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(BranchNodeText, { children })
413
410
  ] });
414
411
  }
@@ -419,9 +416,8 @@ var StoryNode = import_react2.default.memo(
419
416
  const color = (0, import_react2.useMemo)(() => {
420
417
  return props.selected ? theme.color.lightest : theme.color.seafoam;
421
418
  }, [props.selected, theme.color.lightest, theme.color.seafoam]);
422
- const wrapperProps = import_react_native2.Platform.OS === "macos" ? { key: `${props.id}-${color}` } : {};
423
419
  return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(LeafNode, { ...props, ref, children: [
424
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Wrapper, { ...wrapperProps, children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(StoryIcon, { width: 14, height: 14, color }) }),
420
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Wrapper, { children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(StoryIcon, { width: 14, height: 14, color }) }, `story-${props.id}-${color}`),
425
421
  /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(LeafNodeText, { selected: props.selected, children })
426
422
  ] });
427
423
  })
@@ -848,7 +844,7 @@ var Ref = import_react5.default.memo(
848
844
  );
849
845
 
850
846
  // src/Explorer.tsx
851
- var import_react_native3 = require("react-native");
847
+ var import_react_native2 = require("react-native");
852
848
  var import_jsx_runtime6 = require("react/jsx-runtime");
853
849
  var import_react7 = require("react");
854
850
  var Explorer = import_react6.default.memo(function Explorer2({
@@ -859,7 +855,7 @@ var Explorer = import_react6.default.memo(function Explorer2({
859
855
  setSelection
860
856
  }) {
861
857
  const containerRef = (0, import_react6.useRef)(null);
862
- return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_react_native3.View, { ref: containerRef, id: "storybook-explorer-tree", children: dataset.entries.map(([refId, ref]) => /* @__PURE__ */ (0, import_react7.createElement)(
858
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_react_native2.View, { ref: containerRef, id: "storybook-explorer-tree", children: dataset.entries.map(([refId, ref]) => /* @__PURE__ */ (0, import_react7.createElement)(
863
859
  Ref,
864
860
  {
865
861
  ...ref,
@@ -876,7 +872,7 @@ var Explorer = import_react6.default.memo(function Explorer2({
876
872
  var import_react_native_theming7 = require("@storybook/react-native-theming");
877
873
  var import_react_native_ui_common5 = require("@storybook/react-native-ui-common");
878
874
  var import_react11 = __toESM(require("react"));
879
- var import_react_native6 = require("react-native");
875
+ var import_react_native5 = require("react-native");
880
876
 
881
877
  // src/constants.ts
882
878
  var BREAKPOINT = 1e3;
@@ -887,7 +883,7 @@ var DEFAULT_REF_ID = "storybook_internal";
887
883
  var import_react_native_theming5 = require("@storybook/react-native-theming");
888
884
  var import_fuse = __toESM(require("fuse.js"));
889
885
  var import_react8 = __toESM(require("react"));
890
- var import_react_native4 = require("react-native");
886
+ var import_react_native3 = require("react-native");
891
887
  var import_react_native_ui_common3 = require("@storybook/react-native-ui-common");
892
888
  var import_jsx_runtime7 = require("react/jsx-runtime");
893
889
  var DEFAULT_MAX_SEARCH_RESULTS = 50;
@@ -923,7 +919,7 @@ var SearchField = import_react_native_theming5.styled.View({
923
919
  flexDirection: "column",
924
920
  position: "relative"
925
921
  });
926
- var inputPlatformSpecificStyles = import_react_native4.Platform.select({
922
+ var inputPlatformSpecificStyles = import_react_native3.Platform.select({
927
923
  macos: {
928
924
  paddingVertical: 6
929
925
  },
@@ -935,7 +931,7 @@ var inputPlatformSpecificStyles = import_react_native4.Platform.select({
935
931
  height: 32
936
932
  }
937
933
  });
938
- var Input = (0, import_react_native_theming5.styled)(import_react_native4.TextInput)(({ theme }) => ({
934
+ var Input = (0, import_react_native_theming5.styled)(import_react_native3.TextInput)(({ theme }) => ({
939
935
  ...inputPlatformSpecificStyles,
940
936
  paddingLeft: 28,
941
937
  paddingRight: 28,
@@ -1056,7 +1052,7 @@ var Search = import_react8.default.memo(function Search2({ children, dataset, se
1056
1052
  const deferredQuery = (0, import_react8.useDeferredValue)(inputValue);
1057
1053
  const input = deferredQuery ? deferredQuery.trim() : "";
1058
1054
  const results = input ? getResults(input) : [];
1059
- return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(import_react_native4.View, { style: { flex: 1 }, children: [
1055
+ return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(import_react_native3.View, { style: { flex: 1 }, children: [
1060
1056
  /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(SearchField, { children: [
1061
1057
  /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(SearchIconWrapper, { children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(SearchIcon, {}) }),
1062
1058
  /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
@@ -1096,7 +1092,7 @@ var import_react_native_theming6 = require("@storybook/react-native-theming");
1096
1092
  var import_react_native_ui_common4 = require("@storybook/react-native-ui-common");
1097
1093
  var import_polished2 = require("polished");
1098
1094
  var import_react9 = __toESM(require("react"));
1099
- var import_react_native5 = require("react-native");
1095
+ var import_react_native4 = require("react-native");
1100
1096
  var import_jsx_runtime8 = require("react/jsx-runtime");
1101
1097
  var import_react10 = require("react");
1102
1098
  var ResultsList = import_react_native_theming6.styled.View({
@@ -1223,7 +1219,7 @@ var Result = import_react9.default.memo(function Result2({
1223
1219
  /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(Title, { children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(Highlight, { match: nameMatch, children: item.name }, "search-result-item--label-highlight") }),
1224
1220
  /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(Path, { children: item.path.map((group, index) => {
1225
1221
  const pathSeparator = index === item.path.length - 1 ? "" : "/";
1226
- return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_react_native5.View, { style: { flexShrink: 1 }, children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(PathText, { children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
1222
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_react_native4.View, { style: { flexShrink: 1 }, children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(PathText, { children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
1227
1223
  Highlight,
1228
1224
  {
1229
1225
  match: pathMatches.find((match) => match.refIndex === index),
@@ -1254,7 +1250,7 @@ var SearchResults = import_react9.default.memo(function SearchResults2({
1254
1250
  /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(Text, { children: "Recently opened" }),
1255
1251
  /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_react_native_ui_common4.IconButton, { onPress: handleClearLastViewed })
1256
1252
  ] }) : null,
1257
- results.length === 0 && query ? /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_react_native5.View, { children: /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(NoResults, { children: [
1253
+ results.length === 0 && query ? /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_react_native4.View, { children: /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(NoResults, { children: [
1258
1254
  /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(Text, { style: { marginBottom: 8 }, children: "No components found" }),
1259
1255
  /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(Text, { children: "Find components by name or path." })
1260
1256
  ] }) }) : null,
@@ -1307,8 +1303,8 @@ var Swap = import_react11.default.memo(function Swap2({
1307
1303
  }) {
1308
1304
  const [a, b] = import_react11.default.Children.toArray(children);
1309
1305
  return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(import_jsx_runtime9.Fragment, { children: [
1310
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_react_native6.View, { style: { display: condition ? "flex" : "none" }, children: a }),
1311
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_react_native6.View, { style: { display: condition ? "none" : "flex" }, children: b })
1306
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_react_native5.View, { style: { display: condition ? "flex" : "none" }, children: a }),
1307
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_react_native5.View, { style: { display: condition ? "none" : "flex" }, children: b })
1312
1308
  ] });
1313
1309
  });
1314
1310
  var useCombination = (index, indexError, previewInitialized, status, refs) => {
@@ -1369,10 +1365,12 @@ var Sidebar = import_react11.default.memo(function Sidebar2({
1369
1365
  });
1370
1366
 
1371
1367
  // src/Layout.tsx
1368
+ var import_portal = require("@gorhom/portal");
1372
1369
  var import_react_native_theming10 = require("@storybook/react-native-theming");
1373
1370
  var import_react_native_ui_common7 = require("@storybook/react-native-ui-common");
1374
1371
  var import_react16 = require("react");
1375
- var import_react_native11 = require("react-native");
1372
+ var import_react_native10 = require("react-native");
1373
+ var import_react_native_safe_area_context2 = require("react-native-safe-area-context");
1376
1374
  var import_core_events = require("storybook/internal/core-events");
1377
1375
  var import_manager_api2 = require("storybook/manager-api");
1378
1376
 
@@ -1380,17 +1378,17 @@ var import_manager_api2 = require("storybook/manager-api");
1380
1378
  var import_react_native_theming8 = require("@storybook/react-native-theming");
1381
1379
  var import_react_native_ui_common6 = require("@storybook/react-native-ui-common");
1382
1380
  var import_react13 = require("react");
1383
- var import_react_native8 = require("react-native");
1381
+ var import_react_native7 = require("react-native");
1384
1382
  var import_manager_api = require("storybook/manager-api");
1385
1383
  var import_types = require("storybook/internal/types");
1386
1384
 
1387
1385
  // src/useAnimatedValue.ts
1388
1386
  var import_react12 = require("react");
1389
- var import_react_native7 = require("react-native");
1387
+ var import_react_native6 = require("react-native");
1390
1388
  function useAnimatedValue(initialValue, config) {
1391
1389
  const ref = (0, import_react12.useRef)(null);
1392
1390
  if (ref.current == null) {
1393
- ref.current = new import_react_native7.Animated.Value(initialValue, config);
1391
+ ref.current = new import_react_native6.Animated.Value(initialValue, config);
1394
1392
  }
1395
1393
  return ref.current;
1396
1394
  }
@@ -1401,7 +1399,7 @@ var import_jsx_runtime10 = require("react/jsx-runtime");
1401
1399
  var MobileAddonsPanel = (0, import_react13.forwardRef)(
1402
1400
  ({ storyId }, ref) => {
1403
1401
  const theme = (0, import_react_native_theming8.useTheme)();
1404
- const { height } = (0, import_react_native8.useWindowDimensions)();
1402
+ const { height } = (0, import_react_native7.useWindowDimensions)();
1405
1403
  const panelHeight = useAnimatedValue(0);
1406
1404
  const positionBottomAnimation = useAnimatedValue(height / 2);
1407
1405
  const [isOpen, setIsOpen] = (0, import_react13.useState)(false);
@@ -1409,34 +1407,34 @@ var MobileAddonsPanel = (0, import_react13.forwardRef)(
1409
1407
  (open) => {
1410
1408
  setIsOpen(open);
1411
1409
  if (open) {
1412
- import_react_native8.Animated.parallel([
1413
- import_react_native8.Animated.timing(positionBottomAnimation, {
1410
+ import_react_native7.Animated.parallel([
1411
+ import_react_native7.Animated.timing(positionBottomAnimation, {
1414
1412
  toValue: 0,
1415
1413
  // Negative to move up
1416
1414
  duration: 350,
1417
1415
  useNativeDriver: false,
1418
- easing: import_react_native8.Easing.inOut(import_react_native8.Easing.cubic)
1416
+ easing: import_react_native7.Easing.inOut(import_react_native7.Easing.cubic)
1419
1417
  }),
1420
- import_react_native8.Animated.timing(panelHeight, {
1418
+ import_react_native7.Animated.timing(panelHeight, {
1421
1419
  toValue: height / 2,
1422
1420
  duration: 350,
1423
1421
  useNativeDriver: false,
1424
- easing: import_react_native8.Easing.inOut(import_react_native8.Easing.cubic)
1422
+ easing: import_react_native7.Easing.inOut(import_react_native7.Easing.cubic)
1425
1423
  })
1426
1424
  ]).start();
1427
1425
  } else {
1428
- import_react_native8.Animated.parallel([
1429
- import_react_native8.Animated.timing(positionBottomAnimation, {
1426
+ import_react_native7.Animated.parallel([
1427
+ import_react_native7.Animated.timing(positionBottomAnimation, {
1430
1428
  toValue: height / 2,
1431
1429
  duration: 350,
1432
1430
  useNativeDriver: false,
1433
- easing: import_react_native8.Easing.inOut(import_react_native8.Easing.cubic)
1431
+ easing: import_react_native7.Easing.inOut(import_react_native7.Easing.cubic)
1434
1432
  }),
1435
- import_react_native8.Animated.timing(panelHeight, {
1433
+ import_react_native7.Animated.timing(panelHeight, {
1436
1434
  toValue: 0,
1437
1435
  duration: 350,
1438
1436
  useNativeDriver: false,
1439
- easing: import_react_native8.Easing.inOut(import_react_native8.Easing.cubic)
1437
+ easing: import_react_native7.Easing.inOut(import_react_native7.Easing.cubic)
1440
1438
  })
1441
1439
  ]).start();
1442
1440
  }
@@ -1446,46 +1444,46 @@ var MobileAddonsPanel = (0, import_react13.forwardRef)(
1446
1444
  (0, import_react13.useEffect)(() => {
1447
1445
  const handleKeyboardShow = ({ endCoordinates, duration, easing }) => {
1448
1446
  if (isOpen) {
1449
- import_react_native8.Animated.parallel([
1450
- import_react_native8.Animated.timing(panelHeight, {
1447
+ import_react_native7.Animated.parallel([
1448
+ import_react_native7.Animated.timing(panelHeight, {
1451
1449
  toValue: (height - endCoordinates.height) / 2,
1452
1450
  duration,
1453
1451
  useNativeDriver: false,
1454
- easing: import_react_native8.Easing[easing] || import_react_native8.Easing.out(import_react_native8.Easing.ease)
1452
+ easing: import_react_native7.Easing[easing] || import_react_native7.Easing.out(import_react_native7.Easing.ease)
1455
1453
  }),
1456
- import_react_native8.Animated.timing(positionBottomAnimation, {
1454
+ import_react_native7.Animated.timing(positionBottomAnimation, {
1457
1455
  toValue: -endCoordinates.height,
1458
1456
  // Negative to move up
1459
1457
  duration,
1460
1458
  useNativeDriver: false,
1461
- easing: import_react_native8.Easing[easing] || import_react_native8.Easing.out(import_react_native8.Easing.ease)
1459
+ easing: import_react_native7.Easing[easing] || import_react_native7.Easing.out(import_react_native7.Easing.ease)
1462
1460
  })
1463
1461
  ]).start();
1464
1462
  }
1465
1463
  };
1466
1464
  const handleKeyboardHide = ({ duration, easing }) => {
1467
1465
  if (isOpen) {
1468
- import_react_native8.Animated.parallel([
1469
- import_react_native8.Animated.timing(positionBottomAnimation, {
1466
+ import_react_native7.Animated.parallel([
1467
+ import_react_native7.Animated.timing(positionBottomAnimation, {
1470
1468
  toValue: 0,
1471
1469
  // Back to original position
1472
1470
  duration,
1473
1471
  useNativeDriver: false,
1474
- easing: import_react_native8.Easing[easing] || import_react_native8.Easing.out(import_react_native8.Easing.ease)
1472
+ easing: import_react_native7.Easing[easing] || import_react_native7.Easing.out(import_react_native7.Easing.ease)
1475
1473
  }),
1476
- import_react_native8.Animated.timing(panelHeight, {
1474
+ import_react_native7.Animated.timing(panelHeight, {
1477
1475
  toValue: height / 2,
1478
1476
  duration,
1479
1477
  useNativeDriver: false,
1480
- easing: import_react_native8.Easing[easing] || import_react_native8.Easing.out(import_react_native8.Easing.ease)
1478
+ easing: import_react_native7.Easing[easing] || import_react_native7.Easing.out(import_react_native7.Easing.ease)
1481
1479
  })
1482
1480
  ]).start();
1483
1481
  }
1484
1482
  };
1485
- const showSubscription = import_react_native8.Keyboard.addListener("keyboardDidShow", handleKeyboardShow);
1486
- const willShowSubscription = import_react_native8.Keyboard.addListener("keyboardWillShow", handleKeyboardShow);
1487
- const hideSubscription = import_react_native8.Keyboard.addListener("keyboardWillHide", handleKeyboardHide);
1488
- const didHideSubscription = import_react_native8.Keyboard.addListener("keyboardDidHide", handleKeyboardHide);
1483
+ const showSubscription = import_react_native7.Keyboard.addListener("keyboardDidShow", handleKeyboardShow);
1484
+ const willShowSubscription = import_react_native7.Keyboard.addListener("keyboardWillShow", handleKeyboardShow);
1485
+ const hideSubscription = import_react_native7.Keyboard.addListener("keyboardWillHide", handleKeyboardHide);
1486
+ const didHideSubscription = import_react_native7.Keyboard.addListener("keyboardDidHide", handleKeyboardHide);
1489
1487
  return () => {
1490
1488
  showSubscription.remove();
1491
1489
  willShowSubscription.remove();
@@ -1503,7 +1501,7 @@ var MobileAddonsPanel = (0, import_react13.forwardRef)(
1503
1501
  }
1504
1502
  }));
1505
1503
  return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
1506
- import_react_native8.Animated.View,
1504
+ import_react_native7.Animated.View,
1507
1505
  {
1508
1506
  style: {
1509
1507
  position: "absolute",
@@ -1514,13 +1512,13 @@ var MobileAddonsPanel = (0, import_react13.forwardRef)(
1514
1512
  transform: [{ translateY: positionBottomAnimation }]
1515
1513
  },
1516
1514
  children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
1517
- import_react_native8.View,
1515
+ import_react_native7.View,
1518
1516
  {
1519
1517
  style: {
1520
1518
  justifyContent: "flex-end"
1521
1519
  },
1522
1520
  children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
1523
- import_react_native8.View,
1521
+ import_react_native7.View,
1524
1522
  {
1525
1523
  style: {
1526
1524
  height: "100%",
@@ -1528,7 +1526,7 @@ var MobileAddonsPanel = (0, import_react13.forwardRef)(
1528
1526
  paddingTop: 10,
1529
1527
  borderTopColor: theme.appBorderColor,
1530
1528
  borderTopWidth: 1,
1531
- paddingBottom: import_react_native8.Platform.OS === "android" ? 16 : 0
1529
+ paddingBottom: import_react_native7.Platform.OS === "android" ? 16 : 0
1532
1530
  },
1533
1531
  children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
1534
1532
  AddonsTabs,
@@ -1579,10 +1577,10 @@ var AddonsTabs = ({ onClose, storyId }) => {
1579
1577
  const [addonSelected, setAddonSelected] = (0, import_react13.useState)(Object.keys(panels)[0]);
1580
1578
  const panel = (0, import_react13.useMemo)(() => {
1581
1579
  if (!storyId) {
1582
- return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_react_native8.View, { style: centeredStyle, children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_react_native8.Text, { children: "No Story Selected" }) });
1580
+ return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_react_native7.View, { style: centeredStyle, children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_react_native7.Text, { children: "No Story Selected" }) });
1583
1581
  }
1584
1582
  if (Object.keys(panels).length === 0) {
1585
- return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_react_native8.View, { style: centeredStyle, children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_react_native8.Text, { children: "No addons loaded." }) });
1583
+ return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_react_native7.View, { style: centeredStyle, children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_react_native7.Text, { children: "No addons loaded." }) });
1586
1584
  }
1587
1585
  return panels[addonSelected].render({ active: true });
1588
1586
  }, [addonSelected, panels, storyId]);
@@ -1592,10 +1590,10 @@ var AddonsTabs = ({ onClose, storyId }) => {
1592
1590
  }),
1593
1591
  [insets]
1594
1592
  );
1595
- return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(import_react_native8.View, { style: addonsTabsContainerStyle, children: [
1596
- /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(import_react_native8.View, { style: addonsTabsStyle, children: [
1593
+ return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(import_react_native7.View, { style: addonsTabsContainerStyle, children: [
1594
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(import_react_native7.View, { style: addonsTabsStyle, children: [
1597
1595
  /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
1598
- import_react_native8.ScrollView,
1596
+ import_react_native7.ScrollView,
1599
1597
  {
1600
1598
  horizontal: true,
1601
1599
  showsHorizontalScrollIndicator: false,
@@ -1625,7 +1623,7 @@ var AddonsTabs = ({ onClose, storyId }) => {
1625
1623
  )
1626
1624
  ] }),
1627
1625
  /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
1628
- import_react_native8.ScrollView,
1626
+ import_react_native7.ScrollView,
1629
1627
  {
1630
1628
  style: addonsScrollStyle,
1631
1629
  contentContainerStyle: scrollContentContainerStyle,
@@ -1657,49 +1655,49 @@ var TabText = import_react_native_theming8.styled.Text(({ theme, active }) => ({
1657
1655
  // src/MobileMenuDrawer.tsx
1658
1656
  var import_react_native_theming9 = require("@storybook/react-native-theming");
1659
1657
  var import_react14 = require("react");
1660
- var import_react_native9 = require("react-native");
1658
+ var import_react_native8 = require("react-native");
1661
1659
  var import_jsx_runtime11 = require("react/jsx-runtime");
1662
1660
  var useAnimatedModalHeight = () => {
1663
- const { height } = (0, import_react_native9.useWindowDimensions)();
1661
+ const { height } = (0, import_react_native8.useWindowDimensions)();
1664
1662
  const animatedHeight = useAnimatedValue(0.65 * height);
1665
1663
  (0, import_react14.useEffect)(() => {
1666
1664
  const modalHeight = 0.65 * height;
1667
1665
  const maxModalHeight = 0.85 * height;
1668
- const expand = (duration = 250) => import_react_native9.Animated.timing(animatedHeight, {
1666
+ const expand = (duration = 250) => import_react_native8.Animated.timing(animatedHeight, {
1669
1667
  toValue: maxModalHeight,
1670
1668
  duration,
1671
1669
  useNativeDriver: false
1672
1670
  }).start();
1673
- const collapse = (duration = 250) => import_react_native9.Animated.timing(animatedHeight, {
1671
+ const collapse = (duration = 250) => import_react_native8.Animated.timing(animatedHeight, {
1674
1672
  toValue: modalHeight,
1675
1673
  duration,
1676
1674
  useNativeDriver: false
1677
1675
  }).start();
1678
1676
  const handleKeyboardWillShow = (e) => {
1679
- if (import_react_native9.Platform.OS === "ios") {
1677
+ if (import_react_native8.Platform.OS === "ios") {
1680
1678
  expand(e.duration);
1681
1679
  }
1682
1680
  };
1683
1681
  const handleKeyboardDidShow = (e) => {
1684
- if (import_react_native9.Platform.OS === "android") {
1682
+ if (import_react_native8.Platform.OS === "android") {
1685
1683
  expand();
1686
1684
  }
1687
1685
  };
1688
1686
  const handleKeyboardWillHide = (e) => {
1689
- if (import_react_native9.Platform.OS === "ios") {
1687
+ if (import_react_native8.Platform.OS === "ios") {
1690
1688
  collapse(e.duration);
1691
1689
  }
1692
1690
  };
1693
1691
  const handleKeyboardDidHide = (e) => {
1694
- if (import_react_native9.Platform.OS === "android") {
1692
+ if (import_react_native8.Platform.OS === "android") {
1695
1693
  collapse();
1696
1694
  }
1697
1695
  };
1698
1696
  const subscriptions = [
1699
- import_react_native9.Keyboard.addListener("keyboardWillShow", handleKeyboardWillShow),
1700
- import_react_native9.Keyboard.addListener("keyboardDidShow", handleKeyboardDidShow),
1701
- import_react_native9.Keyboard.addListener("keyboardWillHide", handleKeyboardWillHide),
1702
- import_react_native9.Keyboard.addListener("keyboardDidHide", handleKeyboardDidHide)
1697
+ import_react_native8.Keyboard.addListener("keyboardWillShow", handleKeyboardWillShow),
1698
+ import_react_native8.Keyboard.addListener("keyboardDidShow", handleKeyboardDidShow),
1699
+ import_react_native8.Keyboard.addListener("keyboardWillHide", handleKeyboardWillHide),
1700
+ import_react_native8.Keyboard.addListener("keyboardDidHide", handleKeyboardDidHide)
1703
1701
  ];
1704
1702
  return () => {
1705
1703
  subscriptions.forEach((subscription) => subscription.remove());
@@ -1715,7 +1713,7 @@ var MobileMenuDrawer = (0, import_react14.memo)(
1715
1713
  const animatedHeight = useAnimatedModalHeight();
1716
1714
  const dragY = useAnimatedValue(0);
1717
1715
  const panResponder = (0, import_react14.useRef)(
1718
- import_react_native9.PanResponder.create({
1716
+ import_react_native8.PanResponder.create({
1719
1717
  onStartShouldSetPanResponder: () => true,
1720
1718
  onMoveShouldSetPanResponder: (_, gestureState) => {
1721
1719
  return gestureState.dy > 0;
@@ -1727,10 +1725,10 @@ var MobileMenuDrawer = (0, import_react14.memo)(
1727
1725
  },
1728
1726
  onPanResponderRelease: (_, gestureState) => {
1729
1727
  if (gestureState.dy > 50) {
1730
- import_react_native9.Keyboard.dismiss();
1728
+ import_react_native8.Keyboard.dismiss();
1731
1729
  setMobileMenuOpen(false);
1732
1730
  }
1733
- import_react_native9.Animated.timing(dragY, {
1731
+ import_react_native8.Animated.timing(dragY, {
1734
1732
  toValue: 0,
1735
1733
  duration: 300,
1736
1734
  useNativeDriver: true
@@ -1745,7 +1743,7 @@ var MobileMenuDrawer = (0, import_react14.memo)(
1745
1743
  scrollToSelectedNode();
1746
1744
  setMobileMenuOpen(true);
1747
1745
  } else {
1748
- import_react_native9.Keyboard.dismiss();
1746
+ import_react_native8.Keyboard.dismiss();
1749
1747
  setMobileMenuOpen(false);
1750
1748
  }
1751
1749
  }
@@ -1763,66 +1761,60 @@ var MobileMenuDrawer = (0, import_react14.memo)(
1763
1761
  [theme.color.mediumdark]
1764
1762
  );
1765
1763
  return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
1766
- import_react_native9.Modal,
1764
+ import_react_native8.Modal,
1767
1765
  {
1768
1766
  visible: mobileMenuOpen,
1769
1767
  animationType: "slide",
1770
1768
  transparent: true,
1771
1769
  statusBarTranslucent: true,
1772
1770
  onRequestClose: () => setMobileMenuOpen(false),
1773
- children: /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(import_react_native9.Animated.View, { style: { flex: 1 }, children: [
1774
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_react_native9.View, { style: { flex: 1 }, children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_react_native9.Pressable, { style: { flex: 1 }, onPress: () => setMobileMenuOpen(false) }) }),
1775
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
1776
- import_react_native9.Animated.View,
1771
+ children: /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(import_react_native8.Animated.View, { style: { flex: 1 }, children: [
1772
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_react_native8.View, { style: { flex: 1 }, children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_react_native8.Pressable, { style: { flex: 1 }, onPress: () => setMobileMenuOpen(false) }) }),
1773
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_react_native8.Animated.View, { style: { height: animatedHeight }, children: /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(
1774
+ import_react_native8.Animated.View,
1777
1775
  {
1778
- style: { backgroundColor: theme.background.content, height: animatedHeight },
1779
- children: /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(
1780
- import_react_native9.Animated.View,
1776
+ style: [
1781
1777
  {
1782
- style: [
1783
- {
1778
+ flex: 1,
1779
+ borderTopColor: theme.appBorderColor,
1780
+ borderTopWidth: 1,
1781
+ borderStyle: "solid",
1782
+ backgroundColor: theme.background.content,
1783
+ elevation: 8
1784
+ },
1785
+ { transform: [{ translateY: dragY }] }
1786
+ ],
1787
+ children: [
1788
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
1789
+ import_react_native8.View,
1790
+ {
1791
+ ...panResponder.panHandlers,
1792
+ style: {
1793
+ alignItems: "center",
1794
+ justifyContent: "center",
1795
+ backgroundColor: theme.background.content
1796
+ },
1797
+ children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_react_native8.View, { style: handleStyle })
1798
+ }
1799
+ ),
1800
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
1801
+ import_react_native8.ScrollView,
1802
+ {
1803
+ ref: scrollRef,
1804
+ keyboardShouldPersistTaps: "handled",
1805
+ style: {
1784
1806
  flex: 1,
1785
- borderTopColor: theme.appBorderColor,
1786
- borderTopWidth: 1,
1787
- borderStyle: "solid",
1788
- backgroundColor: theme.background.content,
1789
- elevation: 8
1807
+ paddingBottom: 150,
1808
+ alignSelf: "flex-end",
1809
+ width: "100%",
1810
+ backgroundColor: theme.background.content
1790
1811
  },
1791
- { transform: [{ translateY: dragY }] }
1792
- ],
1793
- children: [
1794
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
1795
- import_react_native9.View,
1796
- {
1797
- ...panResponder.panHandlers,
1798
- style: {
1799
- alignItems: "center",
1800
- justifyContent: "center",
1801
- backgroundColor: theme.background.content
1802
- },
1803
- children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_react_native9.View, { style: handleStyle })
1804
- }
1805
- ),
1806
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
1807
- import_react_native9.ScrollView,
1808
- {
1809
- ref: scrollRef,
1810
- keyboardShouldPersistTaps: "handled",
1811
- style: {
1812
- flex: 1,
1813
- paddingBottom: 150,
1814
- alignSelf: "flex-end",
1815
- width: "100%",
1816
- backgroundColor: theme.background.content
1817
- },
1818
- children
1819
- }
1820
- )
1821
- ]
1822
- }
1823
- )
1812
+ children
1813
+ }
1814
+ )
1815
+ ]
1824
1816
  }
1825
- )
1817
+ ) })
1826
1818
  ] })
1827
1819
  }
1828
1820
  );
@@ -1831,7 +1823,7 @@ var MobileMenuDrawer = (0, import_react14.memo)(
1831
1823
 
1832
1824
  // src/StorybookLogo.tsx
1833
1825
  var import_react15 = require("react");
1834
- var import_react_native10 = require("react-native");
1826
+ var import_react_native9 = require("react-native");
1835
1827
  var import_jsx_runtime12 = require("react/jsx-runtime");
1836
1828
  var WIDTH = 125;
1837
1829
  var HEIGHT = 25;
@@ -1855,7 +1847,7 @@ var BrandLogo = ({ theme }) => {
1855
1847
  return theme.brand.image;
1856
1848
  }
1857
1849
  const image = /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
1858
- import_react_native10.Image,
1850
+ import_react_native9.Image,
1859
1851
  {
1860
1852
  source: theme.brand.image,
1861
1853
  resizeMode: theme.brand.resizeMode ?? "contain",
@@ -1864,10 +1856,10 @@ var BrandLogo = ({ theme }) => {
1864
1856
  );
1865
1857
  if (theme.brand.url) {
1866
1858
  return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
1867
- import_react_native10.TouchableOpacity,
1859
+ import_react_native9.TouchableOpacity,
1868
1860
  {
1869
1861
  onPress: () => {
1870
- if (theme.brand.url) import_react_native10.Linking.openURL(theme.brand.url);
1862
+ if (theme.brand.url) import_react_native9.Linking.openURL(theme.brand.url);
1871
1863
  },
1872
1864
  children: image
1873
1865
  }
@@ -1885,13 +1877,13 @@ var BrandTitle = ({ theme }) => {
1885
1877
  fontSize: theme.typography.size.m1
1886
1878
  };
1887
1879
  }, [theme]);
1888
- const title = /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_react_native10.Text, { style: brandTitleStyle, numberOfLines: 1, ellipsizeMode: "tail", children: theme.brand.title });
1880
+ const title = /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_react_native9.Text, { style: brandTitleStyle, numberOfLines: 1, ellipsizeMode: "tail", children: theme.brand.title });
1889
1881
  if (theme.brand.url) {
1890
1882
  return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
1891
- import_react_native10.TouchableOpacity,
1883
+ import_react_native9.TouchableOpacity,
1892
1884
  {
1893
1885
  onPress: () => {
1894
- if (theme.brand.url) import_react_native10.Linking.openURL(theme.brand.url);
1886
+ if (theme.brand.url) import_react_native9.Linking.openURL(theme.brand.url);
1895
1887
  },
1896
1888
  children: title
1897
1889
  }
@@ -1913,8 +1905,6 @@ var StorybookLogo = ({ theme }) => {
1913
1905
  };
1914
1906
 
1915
1907
  // src/Layout.tsx
1916
- var import_react_native_safe_area_context2 = require("react-native-safe-area-context");
1917
- var import_portal = require("@gorhom/portal");
1918
1908
  var import_jsx_runtime13 = require("react/jsx-runtime");
1919
1909
  var desktopLogoContainer = {
1920
1910
  flexDirection: "row",
@@ -2022,9 +2012,9 @@ var Layout = ({
2022
2012
  const channel = import_manager_api2.addons.getChannel();
2023
2013
  channel.emit(import_core_events.SET_CURRENT_STORY, { storyId: newStoryId });
2024
2014
  }, []);
2025
- return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_react_native11.View, { style: containerStyle, children: [
2026
- isDesktop ? /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_react_native11.View, { style: desktopSidebarStyle, children: desktopSidebarOpen ? /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_react_native11.ScrollView, { keyboardShouldPersistTaps: "handled", children: [
2027
- /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_react_native11.View, { style: desktopLogoContainer, children: [
2015
+ return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_react_native10.View, { style: containerStyle, children: [
2016
+ isDesktop ? /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_react_native10.View, { style: desktopSidebarStyle, children: desktopSidebarOpen ? /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_react_native10.ScrollView, { keyboardShouldPersistTaps: "handled", children: [
2017
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_react_native10.View, { style: desktopLogoContainer, children: [
2028
2018
  /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(StorybookLogo, { theme }),
2029
2019
  /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_react_native_ui_common7.IconButton, { onPress: () => setDesktopSidebarOpen(false), Icon: MenuIcon })
2030
2020
  ] }),
@@ -2042,17 +2032,17 @@ var Layout = ({
2042
2032
  }
2043
2033
  )
2044
2034
  ] }) : /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_react_native_ui_common7.IconButton, { onPress: () => setDesktopSidebarOpen(true), Icon: MenuIcon }) }) : null,
2045
- /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_react_native11.View, { style: mobileContentStyle, children: [
2046
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_react_native11.View, { style: contentContainerStyle, children }),
2035
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_react_native10.View, { style: mobileContentStyle, children: [
2036
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_react_native10.View, { style: contentContainerStyle, children }),
2047
2037
  story?.parameters?.hideFullScreenButton || isDesktop ? null : /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
2048
- import_react_native11.TouchableOpacity,
2038
+ import_react_native10.TouchableOpacity,
2049
2039
  {
2050
2040
  style: fullScreenButtonStyle,
2051
2041
  onPress: () => setUiHidden((prev) => !prev),
2052
2042
  children: uiHidden ? /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(CloseFullscreenIcon, { color: theme.color.mediumdark }) : /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(FullscreenIcon, { color: theme.color.mediumdark })
2053
2043
  }
2054
2044
  ),
2055
- isDesktop ? /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_react_native11.View, { style: desktopAddonsPanelStyle, children: desktopAddonsPanelOpen ? /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(AddonsTabs, { storyId: story?.id, onClose: () => setDesktopAddonsPanelOpen(false) }) : /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
2045
+ isDesktop ? /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_react_native10.View, { style: desktopAddonsPanelStyle, children: desktopAddonsPanelOpen ? /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(AddonsTabs, { storyId: story?.id, onClose: () => setDesktopAddonsPanelOpen(false) }) : /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
2056
2046
  import_react_native_ui_common7.IconButton,
2057
2047
  {
2058
2048
  style: iconFloatRightStyle,
@@ -2071,7 +2061,7 @@ var Layout = ({
2071
2061
  onPress: () => mobileMenuDrawerRef.current?.setMobileMenuOpen(true),
2072
2062
  children: [
2073
2063
  /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(MenuIcon, { color: theme.color.mediumdark }),
2074
- /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_react_native11.Text, { style: navButtonTextStyle, numberOfLines: 1, children: [
2064
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_react_native10.Text, { style: navButtonTextStyle, numberOfLines: 1, children: [
2075
2065
  story?.title,
2076
2066
  "/",
2077
2067
  story?.name
@@ -2089,7 +2079,7 @@ var Layout = ({
2089
2079
  )
2090
2080
  ] }) }) : null,
2091
2081
  isDesktop ? null : /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(SelectedNodeProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(MobileMenuDrawer, { ref: mobileMenuDrawerRef, children: [
2092
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_react_native11.View, { style: mobileMenuDrawerContentStyle, children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(StorybookLogo, { theme }) }),
2082
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_react_native10.View, { style: mobileMenuDrawerContentStyle, children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(StorybookLogo, { theme }) }),
2093
2083
  /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
2094
2084
  Sidebar,
2095
2085
  {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@storybook/react-native-ui-lite",
3
- "version": "10.0.2-alpha.0",
3
+ "version": "10.0.2",
4
4
  "description": "lightweight ui components for react native storybook",
5
5
  "keywords": [
6
6
  "react",
@@ -59,9 +59,9 @@
59
59
  },
60
60
  "dependencies": {
61
61
  "@gorhom/portal": "^1.0.14",
62
- "@storybook/react": "^10.0.1",
63
- "@storybook/react-native-theming": "^10.0.2-alpha.0",
64
- "@storybook/react-native-ui-common": "^10.0.2-alpha.0",
62
+ "@storybook/react": "^10.0.2",
63
+ "@storybook/react-native-theming": "^10.0.2",
64
+ "@storybook/react-native-ui-common": "^10.0.2",
65
65
  "fuse.js": "^7.1.0",
66
66
  "polished": "^4.3.1",
67
67
  "react-native-safe-area-context": "^5"
@@ -77,5 +77,5 @@
77
77
  "publishConfig": {
78
78
  "access": "public"
79
79
  },
80
- "gitHead": "f88cc47d0ddc9958f4a8b029f8366de9184bfc8e"
80
+ "gitHead": "73ee48de3fba05ca66288b335059e1ec944b162b"
81
81
  }
package/src/Layout.tsx CHANGED
@@ -1,4 +1,4 @@
1
- import type { Args, StoryContext } from 'storybook/internal/csf';
1
+ import { PortalHost, PortalProvider } from '@gorhom/portal';
2
2
  import type { ReactRenderer } from '@storybook/react';
3
3
  import { styled, ThemeProvider, useTheme } from '@storybook/react-native-theming';
4
4
  import {
@@ -12,9 +12,11 @@ import {
12
12
  } from '@storybook/react-native-ui-common';
13
13
  import { ReactElement, ReactNode, useCallback, useRef, useState } from 'react';
14
14
  import { ScrollView, Text, TouchableOpacity, View, ViewStyle } from 'react-native';
15
+ import { SafeAreaProvider, useSafeAreaInsets } from 'react-native-safe-area-context';
15
16
  import { SET_CURRENT_STORY } from 'storybook/internal/core-events';
16
- import { addons } from 'storybook/manager-api';
17
+ import type { Args, StoryContext } from 'storybook/internal/csf';
17
18
  import { type API_IndexHash } from 'storybook/internal/types';
19
+ import { addons } from 'storybook/manager-api';
18
20
  import { AddonsTabs, MobileAddonsPanel, MobileAddonsPanelRef } from './MobileAddonsPanel';
19
21
  import { MobileMenuDrawer, MobileMenuDrawerRef } from './MobileMenuDrawer';
20
22
  import { SelectedNodeProvider } from './SelectedNodeProvider';
@@ -27,8 +29,6 @@ import {
27
29
  FullscreenIcon,
28
30
  MenuIcon,
29
31
  } from './icon/iconDataUris';
30
- import { SafeAreaProvider, useSafeAreaInsets } from 'react-native-safe-area-context';
31
- import { Portal, PortalHost, PortalProvider } from '@gorhom/portal';
32
32
 
33
33
  const desktopLogoContainer = {
34
34
  flexDirection: 'row',
@@ -173,9 +173,7 @@ export const MobileMenuDrawer = memo(
173
173
  <Pressable style={{ flex: 1 }} onPress={() => setMobileMenuOpen(false)}></Pressable>
174
174
  </View>
175
175
 
176
- <Animated.View
177
- style={{ backgroundColor: theme.background.content, height: animatedHeight }}
178
- >
176
+ <Animated.View style={{ height: animatedHeight }}>
179
177
  <Animated.View
180
178
  style={[
181
179
  {
package/src/TreeNode.tsx CHANGED
@@ -2,7 +2,7 @@ import { styled, useTheme } from '@storybook/react-native-theming';
2
2
 
3
3
  import React, { ComponentProps, FC, forwardRef, useMemo } from 'react';
4
4
  import { transparentize } from 'polished';
5
- import { Platform, View } from 'react-native';
5
+ import { View } from 'react-native';
6
6
  import { CollapseIcon, ComponentIcon, GroupIcon, StoryIcon } from './icon/iconDataUris';
7
7
 
8
8
  export interface NodeProps {
@@ -98,12 +98,9 @@ export const GroupNode: FC<
98
98
  return theme.base === 'dark' ? theme.color.primary : theme.color.ultraviolet;
99
99
  }, [theme.base, theme.color.primary, theme.color.ultraviolet]);
100
100
 
101
- const wrapperProps = Platform.OS === 'macos' ? { key: `${props.id}-${color}` } : {};
102
-
103
101
  return (
104
102
  <BranchNode isExpandable={isExpandable} {...props}>
105
- {/* workaround for macos icon color bug */}
106
- <Wrapper {...wrapperProps}>
103
+ <Wrapper key={`group-${props.id}-${color}`}>
107
104
  {isExpandable && <CollapseIcon isExpanded={isExpanded} />}
108
105
  <GroupIcon width={14} height={14} color={color} />
109
106
  </Wrapper>
@@ -120,12 +117,10 @@ export const ComponentNode: FC<ComponentProps<typeof BranchNode>> = React.memo(
120
117
  return theme.color.secondary;
121
118
  }, [theme.color.secondary]);
122
119
 
123
- const wrapperProps = Platform.OS === 'macos' ? { key: `${props.id}-${color}` } : {};
124
-
125
120
  return (
126
121
  <BranchNode isExpandable={isExpandable} {...props}>
127
122
  {/* workaround for macos icon color bug */}
128
- <Wrapper {...wrapperProps}>
123
+ <Wrapper key={`component-${props.id}-${color}`}>
129
124
  {isExpandable && <CollapseIcon isExpanded={isExpanded} />}
130
125
  <ComponentIcon width={12} height={12} color={color} />
131
126
  </Wrapper>
@@ -146,12 +141,9 @@ export const StoryNode = React.memo(
146
141
  return props.selected ? theme.color.lightest : theme.color.seafoam;
147
142
  }, [props.selected, theme.color.lightest, theme.color.seafoam]);
148
143
 
149
- const wrapperProps = Platform.OS === 'macos' ? { key: `${props.id}-${color}` } : {};
150
-
151
144
  return (
152
145
  <LeafNode {...props} ref={ref}>
153
- {/* workaround for macos icon color bug */}
154
- <Wrapper {...wrapperProps}>
146
+ <Wrapper key={`story-${props.id}-${color}`}>
155
147
  <StoryIcon width={14} height={14} color={color} />
156
148
  </Wrapper>
157
149
  <LeafNodeText selected={props.selected}>{children}</LeafNodeText>