@storybook/react-native-ui 10.4.0 → 10.4.1-canary-20260510001247

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.
Files changed (3) hide show
  1. package/dist/index.d.ts +109 -91
  2. package/dist/index.js +1725 -2048
  3. package/package.json +6 -6
package/dist/index.d.ts CHANGED
@@ -1,118 +1,136 @@
1
- import * as _storybook_react_native_theming from '@storybook/react-native-theming';
2
- import { useTheme } from '@storybook/react-native-theming';
3
- import * as react_native from 'react-native';
4
- import { View } from 'react-native';
5
- import React, { FC, ComponentProps, ReactNode } from 'react';
6
- import { State, StoriesHash } from 'storybook/manager-api';
7
- import { Item, ExpandAction, CombinedDataset, Selection, SBUI } from '@storybook/react-native-ui-common';
8
- import { API_LoadedRefData, API_IndexHash } from 'storybook/internal/types';
9
- import * as react_jsx_runtime from 'react/jsx-runtime';
10
- import { ReactRenderer } from '@storybook/react';
11
- import { StoryContext, Args } from 'storybook/internal/csf';
1
+ import * as _$react_native0 from "react-native";
2
+ import { View } from "react-native";
3
+ import * as _$_storybook_react_native_theming0 from "@storybook/react-native-theming";
4
+ import React, { ComponentProps, FC, ReactNode } from "react";
5
+ import { State, StoriesHash } from "storybook/manager-api";
6
+ import { CombinedDataset, ExpandAction, Item, SBUI, Selection } from "@storybook/react-native-ui-common";
7
+ import * as _$react_jsx_runtime0 from "react/jsx-runtime";
8
+ import { API_IndexHash, API_LoadedRefData } from "storybook/internal/types";
9
+ import { ReactRenderer } from "@storybook/react";
10
+ import { Args, StoryContext } from "storybook/internal/csf";
12
11
 
13
- interface NodeProps$1 {
14
- children: React.ReactNode | React.ReactNode[];
15
- isExpandable?: boolean;
16
- isExpanded?: boolean;
12
+ //#region src/TreeNode.d.ts
13
+ interface NodeProps {
14
+ children: React.ReactNode | React.ReactNode[];
15
+ isExpandable?: boolean;
16
+ isExpanded?: boolean;
17
17
  }
18
- declare const BranchNode: _storybook_react_native_theming.StyledComponent<react_native.TouchableOpacityProps & React.RefAttributes<View> & {
19
- theme?: useTheme;
20
- as?: React.ElementType;
18
+ declare const BranchNode: _$_storybook_react_native_theming0.StyledComponent<_$react_native0.TouchableOpacityProps & React.RefAttributes<View> & {
19
+ theme?: _$_storybook_react_native_theming0.Theme;
20
+ as?: React.ElementType;
21
21
  } & {
22
- depth?: number;
23
- isExpandable?: boolean;
24
- isExpanded?: boolean;
25
- isComponent?: boolean;
26
- isSelected?: boolean;
22
+ depth?: number;
23
+ isExpandable?: boolean;
24
+ isExpanded?: boolean;
25
+ isComponent?: boolean;
26
+ isSelected?: boolean;
27
27
  }, {}, {
28
- ref?: React.Ref<any>;
28
+ ref?: React.Ref<any>;
29
29
  }>;
30
30
  declare const GroupNode: FC<ComponentProps<typeof BranchNode> & {
31
- isExpanded?: boolean;
32
- isExpandable?: boolean;
31
+ isExpanded?: boolean;
32
+ isExpandable?: boolean;
33
33
  }>;
34
34
  declare const ComponentNode: FC<ComponentProps<typeof BranchNode>>;
35
- declare const StoryNode: React.NamedExoticComponent<Omit<react_native.TouchableOpacityProps & React.RefAttributes<View> & {
36
- theme?: useTheme;
37
- as?: React.ElementType;
35
+ declare const StoryNode: React.NamedExoticComponent<Omit<_$react_native0.TouchableOpacityProps & React.RefAttributes<View> & {
36
+ theme?: _$_storybook_react_native_theming0.Theme;
37
+ as?: React.ElementType;
38
38
  } & {
39
- depth?: number;
40
- selected?: boolean;
39
+ depth?: number;
40
+ selected?: boolean;
41
41
  } & {
42
- ref?: React.Ref<any>;
42
+ ref?: React.Ref<any>;
43
43
  }, "ref"> & React.RefAttributes<View>>;
44
-
45
- interface NodeProps {
46
- item: Item;
47
- refId: string;
48
- docsMode: boolean;
49
- isOrphan: boolean;
50
- isDisplayed: boolean;
51
- color: string | undefined;
52
- isSelected: boolean;
53
- isFullyExpanded?: boolean;
54
- isExpanded: boolean;
55
- setExpanded: (action: ExpandAction) => void;
56
- setFullyExpanded?: () => void;
57
- onSelectStoryId: (itemId: string) => void;
58
- status: State['status'][keyof State['status']];
44
+ //#endregion
45
+ //#region src/Tree.d.ts
46
+ interface NodeProps$1 {
47
+ item: Item;
48
+ refId: string;
49
+ docsMode: boolean;
50
+ isOrphan: boolean;
51
+ isDisplayed: boolean;
52
+ color: string | undefined;
53
+ isSelected: boolean;
54
+ isFullyExpanded?: boolean;
55
+ isExpanded: boolean;
56
+ setExpanded: (action: ExpandAction) => void;
57
+ setFullyExpanded?: () => void;
58
+ onSelectStoryId: (itemId: string) => void;
59
+ status: State['status'][keyof State['status']];
59
60
  }
60
- declare const Node: React.NamedExoticComponent<NodeProps>;
61
- declare const LeafNodeStyleWrapper: _storybook_react_native_theming.StyledComponent<react_native.ViewProps & {
62
- theme?: Theme;
63
- as?: React.ElementType;
61
+ declare const Node: React.NamedExoticComponent<NodeProps$1>;
62
+ declare const LeafNodeStyleWrapper: _$_storybook_react_native_theming0.StyledComponent<_$react_native0.ViewProps & {
63
+ theme?: _$_storybook_react_native_theming0.Theme;
64
+ as?: React.ElementType;
64
65
  }, {}, {
65
- ref?: React.Ref<View>;
66
+ ref?: React.Ref<View>;
66
67
  }>;
67
- declare const RootNode: _storybook_react_native_theming.StyledComponent<react_native.ViewProps & {
68
- theme?: Theme;
69
- as?: React.ElementType;
68
+ declare const RootNode: _$_storybook_react_native_theming0.StyledComponent<_$react_native0.ViewProps & {
69
+ theme?: _$_storybook_react_native_theming0.Theme;
70
+ as?: React.ElementType;
70
71
  }, {}, {
71
- ref?: React.Ref<View>;
72
+ ref?: React.Ref<View>;
72
73
  }>;
73
- declare const RootNodeText: _storybook_react_native_theming.StyledComponent<react_native.TextProps & {
74
- theme?: Theme;
75
- as?: React.ElementType;
74
+ declare const RootNodeText: _$_storybook_react_native_theming0.StyledComponent<_$react_native0.TextProps & {
75
+ theme?: _$_storybook_react_native_theming0.Theme;
76
+ as?: React.ElementType;
76
77
  }, {}, {
77
- ref?: React.Ref<react_native.Text>;
78
+ ref?: React.Ref<_$react_native0.Text>;
78
79
  }>;
79
80
  declare const Tree: React.NamedExoticComponent<{
80
- isBrowsing: boolean;
81
- isMain: boolean;
82
- status?: State["status"];
83
- refId: string;
84
- data: StoriesHash;
85
- docsMode: boolean;
86
- selectedStoryId: string | null;
87
- onSelectStoryId: (storyId: string) => void;
81
+ isBrowsing: boolean;
82
+ isMain: boolean;
83
+ status?: State["status"];
84
+ refId: string;
85
+ data: StoriesHash;
86
+ docsMode: boolean;
87
+ selectedStoryId: string | null;
88
+ onSelectStoryId: (storyId: string) => void;
88
89
  }>;
89
-
90
+ //#endregion
91
+ //#region src/Explorer.d.ts
90
92
  interface ExplorerProps {
91
- isLoading: boolean;
92
- isBrowsing: boolean;
93
- dataset: CombinedDataset;
94
- selected: Selection;
95
- setSelection: (selection: Selection) => void;
93
+ isLoading: boolean;
94
+ isBrowsing: boolean;
95
+ dataset: CombinedDataset;
96
+ selected: Selection;
97
+ setSelection: (selection: Selection) => void;
96
98
  }
97
99
  declare const Explorer: FC<ExplorerProps>;
98
-
100
+ //#endregion
101
+ //#region src/Sidebar.d.ts
99
102
  declare const useCombination: (index: SidebarProps["index"], indexError: SidebarProps["indexError"], previewInitialized: SidebarProps["previewInitialized"], status: SidebarProps["status"], refs: SidebarProps["refs"]) => CombinedDataset;
100
103
  interface SidebarProps extends API_LoadedRefData {
101
- refs: State['refs'];
102
- status: State['status'];
103
- storyId?: string;
104
- refId?: string;
105
- menuHighlighted?: boolean;
106
- setSelection: (selection: Selection) => void;
104
+ refs: State['refs'];
105
+ status: State['status'];
106
+ storyId?: string;
107
+ refId?: string;
108
+ menuHighlighted?: boolean;
109
+ setSelection: (selection: Selection) => void;
107
110
  }
108
- declare const Sidebar: React.NamedExoticComponent<SidebarProps>;
109
-
111
+ declare const Sidebar: React.MemoExoticComponent<({
112
+ storyId,
113
+ refId,
114
+ index,
115
+ indexError,
116
+ status,
117
+ previewInitialized,
118
+ refs,
119
+ setSelection
120
+ }: SidebarProps) => _$react_jsx_runtime0.JSX.Element>;
121
+ //#endregion
122
+ //#region src/Layout.d.ts
110
123
  declare const FullUI: SBUI;
111
- declare const Layout: ({ storyHash, story, storyBackgroundColor, children, }: {
112
- storyHash: API_IndexHash | undefined;
113
- story?: StoryContext<ReactRenderer, Args>;
114
- storyBackgroundColor?: string;
115
- children: ReactNode | ReactNode[];
116
- }) => react_jsx_runtime.JSX.Element;
117
-
118
- export { ComponentNode, Explorer, type ExplorerProps, FullUI, GroupNode, Layout, LeafNodeStyleWrapper, Node, type NodeProps$1 as NodeProps, RootNode, RootNodeText, Sidebar, type SidebarProps, StoryNode, Tree, useCombination };
124
+ declare const Layout: ({
125
+ storyHash,
126
+ story,
127
+ storyBackgroundColor,
128
+ children
129
+ }: {
130
+ storyHash: API_IndexHash | undefined;
131
+ story?: StoryContext<ReactRenderer, Args>;
132
+ storyBackgroundColor?: string;
133
+ children: ReactNode | ReactNode[];
134
+ }) => _$react_jsx_runtime0.JSX.Element;
135
+ //#endregion
136
+ export { ComponentNode, Explorer, ExplorerProps, FullUI, GroupNode, Layout, LeafNodeStyleWrapper, Node, NodeProps, RootNode, RootNodeText, Sidebar, SidebarProps, StoryNode, Tree, useCombination };