@storybook/react-native-ui 9.1.0 → 9.1.1-alpha.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 +1 -1
- package/dist/index.js +14 -25
- package/package.json +6 -6
package/dist/index.d.ts
CHANGED
|
@@ -113,4 +113,4 @@ declare const Layout: ({ storyHash, story, children, }: {
|
|
|
113
113
|
children: ReactNode | ReactNode[];
|
|
114
114
|
}) => react_jsx_runtime.JSX.Element;
|
|
115
115
|
|
|
116
|
-
export { ComponentNode, Explorer, ExplorerProps, FullUI, GroupNode, Layout, LeafNodeStyleWrapper, Node, NodeProps$1 as NodeProps, RootNode, RootNodeText, Sidebar, SidebarProps, StoryNode, Tree, useCombination };
|
|
116
|
+
export { ComponentNode, Explorer, type ExplorerProps, FullUI, GroupNode, Layout, LeafNodeStyleWrapper, Node, type NodeProps$1 as NodeProps, RootNode, RootNodeText, Sidebar, type SidebarProps, StoryNode, Tree, useCombination };
|
package/dist/index.js
CHANGED
|
@@ -27,8 +27,8 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
27
27
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
28
28
|
|
|
29
29
|
// src/index.tsx
|
|
30
|
-
var
|
|
31
|
-
__export(
|
|
30
|
+
var index_exports = {};
|
|
31
|
+
__export(index_exports, {
|
|
32
32
|
ComponentNode: () => ComponentNode,
|
|
33
33
|
Explorer: () => Explorer,
|
|
34
34
|
FullUI: () => FullUI,
|
|
@@ -43,7 +43,7 @@ __export(src_exports, {
|
|
|
43
43
|
Tree: () => Tree,
|
|
44
44
|
useCombination: () => useCombination
|
|
45
45
|
});
|
|
46
|
-
module.exports = __toCommonJS(
|
|
46
|
+
module.exports = __toCommonJS(index_exports);
|
|
47
47
|
|
|
48
48
|
// src/TreeNode.tsx
|
|
49
49
|
var import_react_native_theming2 = require("@storybook/react-native-theming");
|
|
@@ -478,12 +478,9 @@ var Tree = import_react5.default.memo(function Tree2({ isMain, refId, data, stat
|
|
|
478
478
|
() => Object.keys(data).reduce(
|
|
479
479
|
(acc, id) => {
|
|
480
480
|
const item = data[id];
|
|
481
|
-
if (item.type === "root")
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
acc[1].push(id);
|
|
485
|
-
if (item.type === "root" && item.startCollapsed)
|
|
486
|
-
acc[2][id] = false;
|
|
481
|
+
if (item.type === "root") acc[0].push(id);
|
|
482
|
+
else if (!item.parent) acc[1].push(id);
|
|
483
|
+
if (item.type === "root" && item.startCollapsed) acc[2][id] = false;
|
|
487
484
|
return acc;
|
|
488
485
|
},
|
|
489
486
|
[[], [], {}]
|
|
@@ -504,16 +501,12 @@ var Tree = import_react5.default.memo(function Tree2({ isMain, refId, data, stat
|
|
|
504
501
|
const singleStoryComponentIds = (0, import_react5.useMemo)(() => {
|
|
505
502
|
return Object.keys(data).filter((id) => {
|
|
506
503
|
const entry = data[id];
|
|
507
|
-
if (entry.type !== "component")
|
|
508
|
-
return false;
|
|
504
|
+
if (entry.type !== "component") return false;
|
|
509
505
|
const { children = [], name } = entry;
|
|
510
|
-
if (children.length !== 1)
|
|
511
|
-
return false;
|
|
506
|
+
if (children.length !== 1) return false;
|
|
512
507
|
const onlyChild = data[children[0]];
|
|
513
|
-
if (onlyChild.type === "docs")
|
|
514
|
-
|
|
515
|
-
if (onlyChild.type === "story")
|
|
516
|
-
return (0, import_react_native_ui_common.isStoryHoistable)(onlyChild.name, name);
|
|
508
|
+
if (onlyChild.type === "docs") return true;
|
|
509
|
+
if (onlyChild.type === "story") return (0, import_react_native_ui_common.isStoryHoistable)(onlyChild.name, name);
|
|
517
510
|
return false;
|
|
518
511
|
});
|
|
519
512
|
}, [data]);
|
|
@@ -920,8 +913,7 @@ var Search = import_react9.default.memo(function Search2({ children, dataset, se
|
|
|
920
913
|
const getResults = (0, import_react9.useCallback)(
|
|
921
914
|
(input2) => {
|
|
922
915
|
const fuse = makeFuse();
|
|
923
|
-
if (!input2)
|
|
924
|
-
return [];
|
|
916
|
+
if (!input2) return [];
|
|
925
917
|
let results2 = [];
|
|
926
918
|
const resultIds = /* @__PURE__ */ new Set();
|
|
927
919
|
const distinctResults = fuse.search(input2).filter(({ item }) => {
|
|
@@ -1072,8 +1064,7 @@ var RecentlyOpenedTitle = import_react_native_theming9.styled.View(({ theme }) =
|
|
|
1072
1064
|
}));
|
|
1073
1065
|
var Highlight = import_react10.default.memo(
|
|
1074
1066
|
function Highlight2({ children, match }) {
|
|
1075
|
-
if (!match)
|
|
1076
|
-
return children;
|
|
1067
|
+
if (!match) return children;
|
|
1077
1068
|
const { value, indices } = match;
|
|
1078
1069
|
const { nodes: result } = indices.reduce(
|
|
1079
1070
|
({ cursor, nodes }, [start, end], index, { length }) => {
|
|
@@ -1811,8 +1802,7 @@ var BrandLogo = ({ theme }) => {
|
|
|
1811
1802
|
import_react_native7.TouchableOpacity,
|
|
1812
1803
|
{
|
|
1813
1804
|
onPress: () => {
|
|
1814
|
-
if (theme.brand.url)
|
|
1815
|
-
import_react_native7.Linking.openURL(theme.brand.url);
|
|
1805
|
+
if (theme.brand.url) import_react_native7.Linking.openURL(theme.brand.url);
|
|
1816
1806
|
},
|
|
1817
1807
|
children: image
|
|
1818
1808
|
}
|
|
@@ -1836,8 +1826,7 @@ var BrandTitle = ({ theme }) => {
|
|
|
1836
1826
|
import_react_native7.TouchableOpacity,
|
|
1837
1827
|
{
|
|
1838
1828
|
onPress: () => {
|
|
1839
|
-
if (theme.brand.url)
|
|
1840
|
-
import_react_native7.Linking.openURL(theme.brand.url);
|
|
1829
|
+
if (theme.brand.url) import_react_native7.Linking.openURL(theme.brand.url);
|
|
1841
1830
|
},
|
|
1842
1831
|
children: title
|
|
1843
1832
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@storybook/react-native-ui",
|
|
3
|
-
"version": "9.1.
|
|
3
|
+
"version": "9.1.1-alpha.1",
|
|
4
4
|
"description": "ui components for react native storybook",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react",
|
|
@@ -54,13 +54,13 @@
|
|
|
54
54
|
"jest": "^29.7.0",
|
|
55
55
|
"react-test-renderer": "^19.1.0",
|
|
56
56
|
"ts-dedent": "^2.2.0",
|
|
57
|
-
"tsup": "^
|
|
57
|
+
"tsup": "^8.5.0",
|
|
58
58
|
"typescript": "~5.8.3"
|
|
59
59
|
},
|
|
60
60
|
"dependencies": {
|
|
61
|
-
"@storybook/react": "^9.1.
|
|
62
|
-
"@storybook/react-native-theming": "^9.1.
|
|
63
|
-
"@storybook/react-native-ui-common": "^9.1.
|
|
61
|
+
"@storybook/react": "^9.1.2",
|
|
62
|
+
"@storybook/react-native-theming": "^9.1.1-alpha.1",
|
|
63
|
+
"@storybook/react-native-ui-common": "^9.1.1-alpha.1",
|
|
64
64
|
"es-toolkit": "^1.38.0",
|
|
65
65
|
"fuse.js": "^7.0.0",
|
|
66
66
|
"memoizerific": "^1.11.3",
|
|
@@ -83,5 +83,5 @@
|
|
|
83
83
|
"publishConfig": {
|
|
84
84
|
"access": "public"
|
|
85
85
|
},
|
|
86
|
-
"gitHead": "
|
|
86
|
+
"gitHead": "cc38bfb53177171ffb92d228c0bcde0e4d01d767"
|
|
87
87
|
}
|