@storybook/react-native-ui 9.0.0-alpha.8 → 9.0.0-beta.1

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
@@ -4,7 +4,7 @@ import { View, PressableProps, TouchableOpacityProps } from 'react-native';
4
4
  import * as React$1 from 'react';
5
5
  import React__default, { FC, ComponentProps, ReactElement, PropsWithChildren, ReactNode } from 'react';
6
6
  import { State, StoriesHash, API } from 'storybook/internal/manager-api';
7
- import { StatusesByStoryIdAndTypeId, StatusValue, API_LoadedRefData, Addon_SidebarTopType, Addon_SidebarBottomType, API_IndexHash, StoryContext, Args, API_PreparedStoryIndex, StoryIndexV2, StoryIndexV3, API_Provider, DocsOptions } from 'storybook/internal/types';
7
+ import { StatusesByStoryIdAndTypeId, StatusValue, API_LoadedRefData, API_IndexHash, StoryContext, Args, API_PreparedStoryIndex, StoryIndexV2, StoryIndexV3, API_Provider, DocsOptions } from 'storybook/internal/types';
8
8
  import * as Fuse from 'fuse.js';
9
9
  import * as react_jsx_runtime from 'react/jsx-runtime';
10
10
  import { SvgProps } from 'react-native-svg';
@@ -193,8 +193,6 @@ declare const useCombination: (index: SidebarProps["index"], indexError: Sidebar
193
193
  interface SidebarProps extends API_LoadedRefData {
194
194
  refs: State['refs'];
195
195
  status: State['status'];
196
- extra: Addon_SidebarTopType[];
197
- bottom?: Addon_SidebarBottomType[];
198
196
  storyId?: string;
199
197
  refId?: string;
200
198
  menuHighlighted?: boolean;
package/dist/index.js CHANGED
@@ -5153,7 +5153,6 @@ var desktopLogoContainer = {
5153
5153
  var contentContainerStyle = { flex: 1, overflow: "hidden" };
5154
5154
  var mobileContentStyle = { flex: 1, overflow: "hidden" };
5155
5155
  var placeholderObject = {};
5156
- var placeholderArray = [];
5157
5156
  var iconFloatRightStyle = { marginLeft: "auto" };
5158
5157
  var navButtonStyle = { flexShrink: 1 };
5159
5158
  var navButtonHitSlop = { bottom: 10, left: 10, right: 10, top: 10 };
@@ -5268,7 +5267,6 @@ var Layout = ({
5268
5267
  /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
5269
5268
  Sidebar,
5270
5269
  {
5271
- extra: placeholderArray,
5272
5270
  previewInitialized: true,
5273
5271
  indexError: void 0,
5274
5272
  refs: placeholderObject,
@@ -5333,7 +5331,6 @@ var Layout = ({
5333
5331
  /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
5334
5332
  Sidebar,
5335
5333
  {
5336
- extra: placeholderArray,
5337
5334
  previewInitialized: true,
5338
5335
  indexError: void 0,
5339
5336
  refs: placeholderObject,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@storybook/react-native-ui",
3
- "version": "9.0.0-alpha.8",
3
+ "version": "9.0.0-beta.1",
4
4
  "description": "ui components for react native storybook",
5
5
  "keywords": [
6
6
  "react",
@@ -58,8 +58,8 @@
58
58
  "typescript": "^5.3.3"
59
59
  },
60
60
  "dependencies": {
61
- "@storybook/react": "9.0.0-alpha.8",
62
- "@storybook/react-native-theming": "^9.0.0-alpha.8",
61
+ "@storybook/react": "9.0.0-beta.4",
62
+ "@storybook/react-native-theming": "^9.0.0-beta.1",
63
63
  "fuse.js": "^7.0.0",
64
64
  "memoizerific": "^1.11.3",
65
65
  "polished": "^4.3.1",
@@ -73,7 +73,7 @@
73
73
  "react-native-reanimated": ">=3",
74
74
  "react-native-safe-area-context": "*",
75
75
  "react-native-svg": ">=14",
76
- "storybook": "9.0.0-alpha.8"
76
+ "storybook": "9.0.0-beta.4"
77
77
  },
78
78
  "engines": {
79
79
  "node": ">=18.0.0"
@@ -81,5 +81,5 @@
81
81
  "publishConfig": {
82
82
  "access": "public"
83
83
  },
84
- "gitHead": "16659266d8aa9816490af41d0a840579a2f96805"
84
+ "gitHead": "41dd93e39512d4df2258fd68055b54fc361962f3"
85
85
  }
package/src/Layout.tsx CHANGED
@@ -30,14 +30,13 @@ const desktopLogoContainer = {
30
30
  paddingRight: 10,
31
31
  justifyContent: 'space-between',
32
32
  } satisfies ViewStyle;
33
+
33
34
  const contentContainerStyle = { flex: 1, overflow: 'hidden' } satisfies ViewStyle;
34
35
 
35
36
  const mobileContentStyle = { flex: 1, overflow: 'hidden' } satisfies ViewStyle;
36
37
 
37
38
  const placeholderObject = {};
38
39
 
39
- const placeholderArray = [];
40
-
41
40
  const iconFloatRightStyle = { marginLeft: 'auto' } satisfies ViewStyle;
42
41
 
43
42
  const navButtonStyle = { flexShrink: 1 } satisfies ViewStyle;
@@ -177,7 +176,6 @@ export const Layout = ({
177
176
  </View>
178
177
 
179
178
  <Sidebar
180
- extra={placeholderArray}
181
179
  previewInitialized
182
180
  indexError={undefined}
183
181
  refs={placeholderObject}
@@ -257,7 +255,6 @@ export const Layout = ({
257
255
  </View>
258
256
 
259
257
  <Sidebar
260
- extra={placeholderArray}
261
258
  previewInitialized
262
259
  indexError={undefined}
263
260
  refs={placeholderObject}
@@ -1,16 +1,12 @@
1
+ import type { Meta, StoryObj } from '@storybook/react';
1
2
  import React from 'react';
2
3
  import type { IndexHash, State } from 'storybook/internal/manager-api';
3
- import { types } from 'storybook/internal/manager-api';
4
- import type { StoryObj, Meta } from '@storybook/react';
5
- import type { Addon_SidebarTopType } from 'storybook/internal/types';
4
+ import { Button } from './Button';
5
+ import { LayoutProvider } from './LayoutProvider';
6
6
  import { Sidebar } from './Sidebar';
7
+ import { DEFAULT_REF_ID } from './constants';
7
8
  import { mockDataset } from './mockdata';
8
9
  import type { RefType } from './types';
9
- import { LayoutProvider } from './LayoutProvider';
10
- import { Button } from './Button';
11
- import { IconButton } from './IconButton';
12
- import { FaceHappyIcon } from './icon/FaceHappyIcon';
13
- import { DEFAULT_REF_ID } from './constants';
14
10
 
15
11
  const index = mockDataset.withRoot as IndexHash;
16
12
  const storyId = 'root-1-child-a2--grandchild-a1-1';
@@ -22,7 +18,6 @@ const meta = {
22
18
  parameters: { layout: 'fullscreen' },
23
19
  args: {
24
20
  previewInitialized: true,
25
- extra: [] as Addon_SidebarTopType[],
26
21
  index: index,
27
22
  storyId,
28
23
  refId: DEFAULT_REF_ID,
@@ -159,37 +154,6 @@ export const Searching: Story = {
159
154
  parameters: { chromatic: { delay: 2200 } },
160
155
  };
161
156
 
162
- export const Bottom: Story = {
163
- args: {
164
- bottom: [
165
- {
166
- id: '1',
167
- type: types.experimental_SIDEBAR_BOTTOM,
168
- render: () => (
169
- <Button>
170
- <FaceHappyIcon />
171
- Custom addon A
172
- </Button>
173
- ),
174
- },
175
- {
176
- id: '2',
177
- type: types.experimental_SIDEBAR_BOTTOM,
178
- render: () => <Button text="Custom addon B" Icon={FaceHappyIcon} />,
179
- },
180
- {
181
- id: '3',
182
- type: types.experimental_SIDEBAR_BOTTOM,
183
- render: () => (
184
- <IconButton>
185
- <FaceHappyIcon />
186
- </IconButton>
187
- ),
188
- },
189
- ],
190
- },
191
- };
192
-
193
157
  /**
194
158
  * Given the following sequence of events:
195
159
  * 1. Story is selected at the top of the sidebar
package/src/Sidebar.tsx CHANGED
@@ -1,11 +1,7 @@
1
1
  import React, { useMemo } from 'react';
2
2
  import { styled } from '@storybook/react-native-theming';
3
3
  import type { State } from 'storybook/internal/manager-api';
4
- import type {
5
- Addon_SidebarBottomType,
6
- Addon_SidebarTopType,
7
- API_LoadedRefData,
8
- } from 'storybook/internal/types';
4
+ import type { API_LoadedRefData } from 'storybook/internal/types';
9
5
  import { Explorer } from './Explorer';
10
6
  import { Search } from './Search';
11
7
  import { SearchResults } from './SearchResults';
@@ -74,8 +70,6 @@ export const useCombination = (
74
70
  export interface SidebarProps extends API_LoadedRefData {
75
71
  refs: State['refs'];
76
72
  status: State['status'];
77
- extra: Addon_SidebarTopType[];
78
- bottom?: Addon_SidebarBottomType[];
79
73
  storyId?: string;
80
74
  refId?: string;
81
75
  menuHighlighted?: boolean;