@aussieljk/forkbook 0.0.1-1 → 0.0.1-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/_browser-chunks/{Color-OEKZ7XSW.js → Color-PCLE2J36.js} +1 -1
- package/dist/_browser-chunks/{WithTooltip-GZSSFOG3.js → WithTooltip-XSQFTBMB.js} +1 -1
- package/dist/_browser-chunks/{chunk-73OX2G56.js → chunk-JYVGARBG.js} +11 -11
- package/dist/_browser-chunks/{chunk-VVWPND3J.js → chunk-KQ7CRO2B.js} +1 -1
- package/dist/_browser-chunks/{chunk-PP4R7USA.js → chunk-P6PK47TQ.js} +215 -412
- package/dist/_node-chunks/{attached-runtime-O4YTVUKE.js → attached-runtime-I2G4WLJI.js} +29 -29
- package/dist/_node-chunks/{builder-manager-FPV2L36T.js → builder-manager-VVHYQXCH.js} +12 -12
- package/dist/_node-chunks/{chunk-4PK3LUHM.js → chunk-2BUPBPFB.js} +7 -7
- package/dist/_node-chunks/{chunk-Y2GH4XO7.js → chunk-2DSIDINN.js} +7 -7
- package/dist/_node-chunks/{chunk-WVCU34IS.js → chunk-2RU7BKEW.js} +6 -6
- package/dist/_node-chunks/{chunk-7TSL7D5D.js → chunk-34EO2PUT.js} +6 -6
- package/dist/_node-chunks/{chunk-Y2DEKWVE.js → chunk-3BKIBF5S.js} +8 -8
- package/dist/_node-chunks/{chunk-6EJ5NPEM.js → chunk-3SDUYDXH.js} +7 -7
- package/dist/_node-chunks/{chunk-BE6ULVPN.js → chunk-3T4ZSNPH.js} +8 -8
- package/dist/_node-chunks/{chunk-ZMEGPR47.js → chunk-3W7F2B7P.js} +6 -6
- package/dist/_node-chunks/{chunk-MDKFZRYG.js → chunk-3Y6AAY5H.js} +8 -8
- package/dist/_node-chunks/{chunk-HKQEE62W.js → chunk-42UWAGPW.js} +8 -8
- package/dist/_node-chunks/{chunk-YWMICX2T.js → chunk-4FEANXWU.js} +10 -10
- package/dist/_node-chunks/{chunk-SVZ6Q3CS.js → chunk-5DQFEZEA.js} +6 -6
- package/dist/_node-chunks/{chunk-ILWHW4HU.js → chunk-6KEHV53S.js} +14 -14
- package/dist/_node-chunks/{chunk-TB6Y6NSL.js → chunk-6LMWA44H.js} +8 -8
- package/dist/_node-chunks/{chunk-4TV3Z3S3.js → chunk-6YKBRP72.js} +6 -6
- package/dist/_node-chunks/{chunk-GVSFRNWZ.js → chunk-7GUDZVRQ.js} +6 -6
- package/dist/_node-chunks/{chunk-5J3O7EDY.js → chunk-B5J7Q7J4.js} +6 -6
- package/dist/_node-chunks/{chunk-GT5EHMNM.js → chunk-BS2WMZMR.js} +7 -7
- package/dist/_node-chunks/{chunk-QMU5ODXZ.js → chunk-BSKFCWQD.js} +7 -7
- package/dist/_node-chunks/{chunk-356LV3NX.js → chunk-BXVYT7SB.js} +6 -6
- package/dist/_node-chunks/{chunk-RHG33T7C.js → chunk-CCOTJ4FC.js} +8 -8
- package/dist/_node-chunks/{chunk-XCGMRAV5.js → chunk-CQKMLL5J.js} +7 -7
- package/dist/_node-chunks/{chunk-NKAUZU4C.js → chunk-CXRU72ET.js} +6 -6
- package/dist/_node-chunks/{chunk-RJUHZH32.js → chunk-DC7DKR5K.js} +6 -6
- package/dist/_node-chunks/{chunk-M2BRIUUP.js → chunk-DHJFTB4K.js} +7 -7
- package/dist/_node-chunks/{chunk-2QTI45JU.js → chunk-DUR55DJJ.js} +9 -9
- package/dist/_node-chunks/{chunk-IZISFDKM.js → chunk-E6YESGLX.js} +27 -27
- package/dist/_node-chunks/{chunk-VXDWOVWD.js → chunk-EHUNOMDD.js} +10 -10
- package/dist/_node-chunks/{chunk-RQVK2TOI.js → chunk-ET7PWEO7.js} +7 -7
- package/dist/_node-chunks/{chunk-X6OWHTYE.js → chunk-EWOX7HPJ.js} +6 -6
- package/dist/_node-chunks/{chunk-ILVD64RB.js → chunk-F3ZFKBHY.js} +7 -7
- package/dist/_node-chunks/{chunk-MJ2UD7FU.js → chunk-FK7KGTV7.js} +6 -6
- package/dist/_node-chunks/{chunk-5RNOGGO6.js → chunk-FPZB5OI7.js} +6 -6
- package/dist/_node-chunks/{chunk-2BJIHWOK.js → chunk-FW2HQUBQ.js} +6 -6
- package/dist/_node-chunks/chunk-FY6UXW6G.js +11 -0
- package/dist/_node-chunks/{chunk-GP5YLBNS.js → chunk-GEFQN7K3.js} +8 -8
- package/dist/_node-chunks/{chunk-5GN5N22E.js → chunk-GRBLDJCR.js} +19 -19
- package/dist/_node-chunks/{chunk-AANHLH5M.js → chunk-H32DYT6P.js} +6 -6
- package/dist/_node-chunks/{chunk-PEIAGMSR.js → chunk-H4PPVMP5.js} +6 -6
- package/dist/_node-chunks/{chunk-XTTAS346.js → chunk-HMP2G23X.js} +6 -6
- package/dist/_node-chunks/{chunk-XJSYJTBD.js → chunk-ICPBH3E7.js} +7 -7
- package/dist/_node-chunks/{chunk-FUYZNTIS.js → chunk-IDEL2J23.js} +6 -6
- package/dist/_node-chunks/{chunk-7LLQDMVS.js → chunk-IK4FGZLR.js} +6 -6
- package/dist/_node-chunks/{chunk-NZ3GOT7V.js → chunk-JDXXX6LB.js} +6 -6
- package/dist/_node-chunks/{chunk-JEC2OK5B.js → chunk-JGGFYIG5.js} +7 -7
- package/dist/_node-chunks/{chunk-CSXS6LVI.js → chunk-JPAZLYJ3.js} +6 -6
- package/dist/_node-chunks/{chunk-NIHZECYO.js → chunk-JZOO7GGC.js} +6 -6
- package/dist/_node-chunks/{chunk-U4GKV7GZ.js → chunk-KISMCCP5.js} +10 -10
- package/dist/_node-chunks/{chunk-JE6JEGXA.js → chunk-LCK4ZQKG.js} +8 -8
- package/dist/_node-chunks/{chunk-HKUNJELN.js → chunk-LO56I6E2.js} +8 -8
- package/dist/_node-chunks/{chunk-URRTQ2QM.js → chunk-LXBD4UL4.js} +6 -6
- package/dist/_node-chunks/{chunk-CXLL2F6O.js → chunk-MA24JW6C.js} +8 -8
- package/dist/_node-chunks/{chunk-ZBAIFZNB.js → chunk-MK2KYAI6.js} +12 -12
- package/dist/_node-chunks/{chunk-BENYUF74.js → chunk-NDWKJ4CL.js} +14 -19
- package/dist/_node-chunks/{chunk-A724RK5H.js → chunk-NIBT7XDZ.js} +6 -6
- package/dist/_node-chunks/{chunk-R7CY5LX6.js → chunk-NPO45IMH.js} +6 -6
- package/dist/_node-chunks/{chunk-B6SKX4JF.js → chunk-OISX4AGQ.js} +7 -7
- package/dist/_node-chunks/{chunk-2UG3IYCC.js → chunk-OUW6R7C3.js} +6 -6
- package/dist/_node-chunks/{chunk-SRXCCL2O.js → chunk-OWNFOGTA.js} +7 -7
- package/dist/_node-chunks/{chunk-PBMWZVLD.js → chunk-Q7QNUM5H.js} +6 -6
- package/dist/_node-chunks/{chunk-5BTU7UZ5.js → chunk-QEQLR22M.js} +7 -7
- package/dist/_node-chunks/{chunk-CWD5A6NI.js → chunk-RRN2V55B.js} +7 -7
- package/dist/_node-chunks/{chunk-AWJOXJAZ.js → chunk-RWFIFGO5.js} +7 -7
- package/dist/_node-chunks/{chunk-CDRLLNRQ.js → chunk-RXNJDRGO.js} +6 -6
- package/dist/_node-chunks/{chunk-AWXGCPW6.js → chunk-RZMQ7S3L.js} +6 -6
- package/dist/_node-chunks/{chunk-5J3BMBMY.js → chunk-SIEXZVCR.js} +6 -6
- package/dist/_node-chunks/{chunk-ULW4SLMN.js → chunk-SLWQNBGO.js} +10 -10
- package/dist/_node-chunks/{chunk-KGOAOPKR.js → chunk-SVTBJ7Q3.js} +6 -6
- package/dist/_node-chunks/{chunk-XURIZ7IC.js → chunk-SWO5CDYU.js} +6 -6
- package/dist/_node-chunks/{chunk-3CLITGI2.js → chunk-TD5PLLQG.js} +6 -6
- package/dist/_node-chunks/{chunk-G6PUNHCI.js → chunk-TEQGGSP7.js} +6 -6
- package/dist/_node-chunks/{chunk-ICADUNQM.js → chunk-TFCEV2XX.js} +6 -6
- package/dist/_node-chunks/{chunk-JVQYQTTM.js → chunk-TFEWM4E3.js} +18 -39
- package/dist/_node-chunks/{chunk-G5OYQQDY.js → chunk-TINO74G5.js} +6 -6
- package/dist/_node-chunks/{chunk-QVMUIU7S.js → chunk-TNJIXE37.js} +6 -6
- package/dist/_node-chunks/{chunk-WQ7PSP6H.js → chunk-TWI4GVH7.js} +6 -6
- package/dist/_node-chunks/{chunk-CYPPELO4.js → chunk-U5W53R2J.js} +8 -8
- package/dist/_node-chunks/{chunk-2JSABFAM.js → chunk-UBOGWBEA.js} +10 -10
- package/dist/_node-chunks/{chunk-I2ANCID7.js → chunk-UMUBKI6E.js} +23 -23
- package/dist/_node-chunks/{chunk-7BVUZZIY.js → chunk-UVINFLGY.js} +7 -7
- package/dist/_node-chunks/{chunk-ASJFOW6O.js → chunk-V2DY426G.js} +8 -8
- package/dist/_node-chunks/{chunk-US7L4S72.js → chunk-VLOXOXXE.js} +9 -9
- package/dist/_node-chunks/{chunk-5WHA37KG.js → chunk-W4OMYLSP.js} +23 -23
- package/dist/_node-chunks/chunk-WAXVSN3O.js +18 -0
- package/dist/_node-chunks/{chunk-DWE36J35.js → chunk-WCULS5TP.js} +7 -7
- package/dist/_node-chunks/{chunk-2XDUXZGI.js → chunk-WNZ2UMFM.js} +8 -8
- package/dist/_node-chunks/{chunk-R5FYRP6X.js → chunk-WZJF2OUH.js} +7 -7
- package/dist/_node-chunks/{chunk-6APBQVEX.js → chunk-XGIUVY52.js} +7 -7
- package/dist/_node-chunks/{chunk-7DCDBICW.js → chunk-XHL2LVBM.js} +9 -9
- package/dist/_node-chunks/{chunk-JBCKN6P4.js → chunk-XI6B6P47.js} +6 -6
- package/dist/_node-chunks/{chunk-EWXASIWR.js → chunk-XLP2ZKXV.js} +7 -7
- package/dist/_node-chunks/{chunk-IJL5JOLL.js → chunk-YCMRA6RX.js} +7 -7
- package/dist/_node-chunks/{chunk-RJXEPYEN.js → chunk-YZFWBA5L.js} +8 -8
- package/dist/_node-chunks/{chunk-VQEQ7ZLS.js → chunk-ZMAMXQKP.js} +7 -7
- package/dist/_node-chunks/{chunk-GSWBRZLU.js → chunk-ZWBCQ4MJ.js} +6 -6
- package/dist/_node-chunks/dist-VTSTZKUB.js +16 -0
- package/dist/_node-chunks/{globby-HWZL7XSQ.js → globby-OEMHPBFY.js} +10 -10
- package/dist/_node-chunks/{jiti-GNDCTFYU.js → jiti-NFX6UU74.js} +7 -7
- package/dist/_node-chunks/{lib-DI662U2R.js → lib-MDVARD7W.js} +7 -7
- package/dist/_node-chunks/{local-runtime-4UNT5EZJ.js → local-runtime-NTKIN2QT.js} +20 -20
- package/dist/_node-chunks/{mdx-plugin-ZY6XLLA4.js → mdx-plugin-MWISDWDQ.js} +14 -14
- package/dist/_node-chunks/{monorepo-B65J4UFS.js → monorepo-LIRFMQXE.js} +11 -11
- package/dist/_node-chunks/{monorepo-optimized-tests-relaxed-limits-no-story-deletion-45ZTNWJS.js → monorepo-optimized-tests-relaxed-limits-no-story-deletion-CPDW4XTW.js} +11 -11
- package/dist/_node-chunks/optimized-tests-HDOLR3EY.js +22 -0
- package/dist/_node-chunks/{pattern-copy-play-LOHSM7ID.js → pattern-copy-play-EKHIUAU2.js} +9 -9
- package/dist/_node-chunks/postinstallAddon-GYGMWDL6.js +20 -0
- package/dist/_node-chunks/{rehype-external-links-22ZBI6K4.js → rehype-external-links-BUN3HUCO.js} +9 -9
- package/dist/_node-chunks/{rehype-slug-ROZVEEFZ.js → rehype-slug-PLADX223.js} +9 -9
- package/dist/_node-chunks/{relaxed-limits-EDE2B34G.js → relaxed-limits-GBHW6KIQ.js} +11 -11
- package/dist/_node-chunks/{run-IR3BRDJV.js → run-KDTIZNSY.js} +17 -17
- package/dist/_node-chunks/{run-372BSBV5.js → run-NL66VTNR.js} +13 -13
- package/dist/_node-chunks/session-id-KIIVOQLR.js +23 -0
- package/dist/_node-chunks/{setup-6TMCKUTA.js → setup-MGC7BQO6.js} +8 -8
- package/dist/_node-chunks/{vitest.config.4.template-QJBEVCKG.js → vitest.config.4.template-JH2THZFG.js} +7 -7
- package/dist/addon-a11y/manager.js +4 -4
- package/dist/addon-a11y/preset.js +7 -7
- package/dist/addon-docs/blocks.js +10 -10
- package/dist/addon-docs/manager.js +2 -2
- package/dist/addon-docs/preset.js +10 -10
- package/dist/addon-mcp/preset.js +8 -8
- package/dist/addon-mcp/tools/preview-stories/preview-stories-app-script.js +12 -33
- package/dist/addon-ondevice-controls/index.js +1 -1
- package/dist/addon-ondevice-controls/register.js +1 -1
- package/dist/addon-themes/postinstall.js +7 -7
- package/dist/addon-vitest/constants.js +8 -8
- package/dist/addon-vitest/manager.js +2 -2
- package/dist/addon-vitest/node/coverage-reporter.js +8 -8
- package/dist/addon-vitest/node/vitest.js +16 -16
- package/dist/addon-vitest/postinstall.js +10 -10
- package/dist/addon-vitest/preset.js +14 -14
- package/dist/addon-vitest/vitest-plugin/global-setup.js +7 -7
- package/dist/addon-vitest/vitest-plugin/index.js +13 -13
- package/dist/babel/index.js +12 -12
- package/dist/bin/core.js +58 -58
- package/dist/bin/dispatcher.js +10 -10
- package/dist/bin/loader.js +8 -8
- package/dist/builder-vite/index.js +15 -15
- package/dist/builder-vite/preset.js +13 -13
- package/dist/cli/index.js +24 -24
- package/dist/cli/tools/sdk/child-host.js +17 -17
- package/dist/cli/tools/sdk/index.js +18 -18
- package/dist/cli-commands/bin/index.js +7 -7
- package/dist/common/index.js +37 -37
- package/dist/components/index.js +23 -23
- package/dist/core-server/index.js +71 -71
- package/dist/core-server/presets/common-manager.js +7 -7
- package/dist/core-server/presets/common-override-preset.js +9 -9
- package/dist/core-server/presets/common-preset.js +40 -40
- package/dist/create/bin/index.js +7 -7
- package/dist/create/index.js +15 -15
- package/dist/csf-tools/index.js +12 -12
- package/dist/manager/_manager-chunks/{globals-runtime-B0I9dSVs.js → globals-runtime-DpNYC-qi.js} +72 -72
- package/dist/manager/_manager-chunks/{globals-runtime-BQCkfH1B.js → globals-runtime-Rp_zjGnh.js} +1 -1
- package/dist/manager/_manager-chunks/{globals-runtime-CXoVXiJA.js → globals-runtime-qKvCZHFY.js} +4 -4
- package/dist/manager/_manager-chunks/{globals-runtime-f5oIrim0.js → globals-runtime-sGpNlIJ1.js} +2 -2
- package/dist/manager/_manager-chunks/{runtime-DpgBAFGf.js → runtime-BK0zF7FN.js} +1 -1
- package/dist/manager/_manager-chunks/{runtime-DcJBhKG9.js → runtime-BhkT2CXl.js} +4 -4
- package/dist/manager/_manager-chunks/{runtime-DtyerpFe.js → runtime-D0UOWx0U.js} +14 -14
- package/dist/manager/_manager-chunks/{runtime-Bry1Biu7.js → runtime-cp5pazY2.js} +118 -118
- package/dist/manager/globals-runtime.js +1 -1
- package/dist/manager/runtime.js +1 -1
- package/dist/mcp/index.js +8 -8
- package/dist/mocking-utils/index.js +9 -9
- package/dist/nextjs-vite/node/index.js +7 -7
- package/dist/nextjs-vite/preset.js +11 -11
- package/dist/nextjs-vite/vite-plugin/index.js +7 -7
- package/dist/nextjs-vite-plugin/index.js +8 -8
- package/dist/nextjs-vite-plugin/mocks/storybook.global.js +8 -8
- package/dist/node-logger/index.js +9 -9
- package/dist/oxc-parser/index.js +10 -10
- package/dist/oxc-parser/worker.js +10 -10
- package/dist/react/docgen/docgen-worker.js +12 -12
- package/dist/react/preset.js +14 -14
- package/dist/react-native/bin/get-stories.js +8 -8
- package/dist/react-native/metro/node.js +9 -9
- package/dist/react-native/metro/withStorybook.d.ts +1 -1
- package/dist/react-native/metro/withStorybook.js +10 -10
- package/dist/react-native/scripts/generate.js +8 -8
- package/dist/react-native-ui/index.js +204 -621
- package/dist/react-vite/node/index.js +7 -7
- package/dist/react-vite/preset.js +7 -7
- package/dist/server-errors.js +9 -9
- package/dist/shared/open-service/services/docgen/worker/docgen-worker.js +9 -9
- package/dist/telemetry/index.js +45 -45
- package/package.json +9 -30
- package/dist/_node-chunks/chunk-BCRWDMAU.js +0 -11
- package/dist/_node-chunks/chunk-DUOXRUVQ.js +0 -18
- package/dist/_node-chunks/dist-ZGSN23B7.js +0 -16
- package/dist/_node-chunks/optimized-tests-ZMNICF4R.js +0 -22
- package/dist/_node-chunks/postinstallAddon-NT5XE7IT.js +0 -20
- package/dist/_node-chunks/session-id-OO2WQF5N.js +0 -23
|
@@ -8,82 +8,36 @@ import "../_browser-chunks/chunk-LE2LTDW3.js";
|
|
|
8
8
|
import "../_browser-chunks/chunk-IMSF75WX.js";
|
|
9
9
|
|
|
10
10
|
// src/react-native-ui/TreeNode.tsx
|
|
11
|
-
import { styled as styled2, useTheme } from "@aussieljk/forkbook/internal/react-native-theming";
|
|
11
|
+
import { styled as styled2, useTheme as useTheme2 } from "@aussieljk/forkbook/internal/react-native-theming";
|
|
12
|
+
import React, { forwardRef, useMemo } from "react";
|
|
12
13
|
|
|
13
|
-
// src/react-native-ui/icon/
|
|
14
|
-
import
|
|
14
|
+
// src/react-native-ui/icon/index.tsx
|
|
15
|
+
import { styled, useTheme } from "@aussieljk/forkbook/internal/react-native-theming";
|
|
16
|
+
import { SymbolView } from "expo-symbols";
|
|
15
17
|
import { jsx } from "react/jsx-runtime";
|
|
16
|
-
function
|
|
17
|
-
return
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
// src/react-native-ui/icon/GroupIcon.tsx
|
|
29
|
-
import Svg2, { Path as Path2 } from "react-native-svg";
|
|
30
|
-
import { jsx as jsx2 } from "react/jsx-runtime";
|
|
31
|
-
function GroupIcon({ color = "#6F2CAC", ...props }) {
|
|
32
|
-
return jsx2(Svg2, { width: 15, height: 15, viewBox: "0 0 15 15", fill: "none", ...props, children: jsx2(
|
|
33
|
-
Path2,
|
|
34
|
-
{
|
|
35
|
-
fillRule: "evenodd",
|
|
36
|
-
clipRule: "evenodd",
|
|
37
|
-
d: "M6.962 3.704L5.376 2.118H1.057v9.514h12.685V3.704h-6.78zM7.4 2.647L6.124 1.37a1.057 1.057 0 00-.748-.31H.53A.529.529 0 000 1.59v10.57c0 .292.237.529.529.529H14.27a.529.529 0 00.528-.529V3.175a.529.529 0 00-.528-.528H7.4z",
|
|
38
|
-
fill: color
|
|
39
|
-
}
|
|
40
|
-
) });
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
// src/react-native-ui/icon/StoryIcon.tsx
|
|
44
|
-
import Svg3, { Path as Path3 } from "react-native-svg";
|
|
45
|
-
import { jsx as jsx3 } from "react/jsx-runtime";
|
|
46
|
-
function StoryIcon({ color = "#37D5D3", ...props }) {
|
|
47
|
-
return jsx3(Svg3, { width: 12, height: 12, viewBox: "0 0 12 12", fill: "none", ...props, children: jsx3(
|
|
48
|
-
Path3,
|
|
49
|
-
{
|
|
50
|
-
fillRule: "evenodd",
|
|
51
|
-
clipRule: "evenodd",
|
|
52
|
-
d: "M3 0h6c.237 0 .428.192.428.429V11.57c0 .224-.17.407-.389.427a.396.396 0 01-.318-.101L6 9.565l-2.721 2.332a.395.395 0 01-.325.1.429.429 0 01-.383-.426V.43C2.571.192 2.763 0 3 0zm.428 10.64l2.284-1.958.034-.028a.39.39 0 01.289-.081c.087.007.172.04.244.102L8.57 10.64V.857H3.428v9.783z",
|
|
53
|
-
fill: color
|
|
54
|
-
}
|
|
55
|
-
) });
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
// src/react-native-ui/icon/CollapseIcon.tsx
|
|
59
|
-
import { styled } from "@aussieljk/forkbook/internal/react-native-theming";
|
|
60
|
-
import Svg4, { Path as Path4 } from "react-native-svg";
|
|
61
|
-
import { jsx as jsx4 } from "react/jsx-runtime";
|
|
62
|
-
var CollapseIconWrapper = styled.View(
|
|
63
|
-
({ theme, isExpanded }) => ({
|
|
64
|
-
width: 8,
|
|
65
|
-
height: 8,
|
|
66
|
-
display: "flex",
|
|
67
|
-
justifyContent: "center",
|
|
68
|
-
alignItems: "center",
|
|
69
|
-
color: theme.textMutedColor,
|
|
70
|
-
transform: isExpanded ? "rotateZ(90deg)" : "none",
|
|
71
|
-
transition: "transform .1s ease-out"
|
|
72
|
-
})
|
|
73
|
-
), CollapseIcon = ({ isExpanded }) => jsx4(CollapseIconWrapper, { isExpanded, children: jsx4(CollapseSVG, {}) });
|
|
74
|
-
function CollapseSVG(props) {
|
|
75
|
-
return jsx4(Svg4, { width: 8, height: 8, fill: "none", ...props, children: jsx4(
|
|
76
|
-
Path4,
|
|
77
|
-
{
|
|
78
|
-
fill: "#73828C",
|
|
79
|
-
d: "M1.896 7.146a.5.5 0 10.708.708l3.5-3.5a.5.5 0 000-.708l-3.5-3.5a.5.5 0 10-.708.708L5.043 4 1.896 7.146z"
|
|
80
|
-
}
|
|
81
|
-
) });
|
|
18
|
+
function symbolIcon(name, size, defaultColor) {
|
|
19
|
+
return ({ color, width }) => {
|
|
20
|
+
let theme = useTheme();
|
|
21
|
+
return jsx(
|
|
22
|
+
SymbolView,
|
|
23
|
+
{
|
|
24
|
+
name,
|
|
25
|
+
size: Number(width ?? size),
|
|
26
|
+
tintColor: color === "currentColor" || !color ? defaultColor(theme) : color
|
|
27
|
+
}
|
|
28
|
+
);
|
|
29
|
+
};
|
|
82
30
|
}
|
|
31
|
+
var text = (theme) => theme.color.defaultText, SearchIcon = symbolIcon("magnifyingglass", 14, (theme) => theme.color.dark), CloseIcon = symbolIcon("xmark.circle", 14, text), MenuIcon = symbolIcon("line.3.horizontal", 14, text), FullscreenIcon = symbolIcon("arrow.up.left.and.arrow.down.right", 14, text), CloseFullscreenIcon = symbolIcon("arrow.down.right.and.arrow.up.left", 14, text), BottomBarToggleIcon = symbolIcon("rectangle.bottomthird.inset.filled", 14, text), ExpandAllIcon = symbolIcon("rectangle.expand.vertical", 14, text), CollapseAllIcon = symbolIcon("rectangle.compress.vertical", 14, text), ComponentIcon = symbolIcon("square.grid.2x2", 12, () => "#029CFD"), GroupIcon = symbolIcon("folder", 14, () => "#6F2CAC"), StoryIcon = symbolIcon("bookmark", 12, () => "#37D5D3"), Chevron = symbolIcon("chevron.right", 8, (theme) => theme.textMutedColor), CollapseIconWrapper = styled.View(({ isExpanded }) => ({
|
|
32
|
+
width: 8,
|
|
33
|
+
height: 8,
|
|
34
|
+
justifyContent: "center",
|
|
35
|
+
alignItems: "center",
|
|
36
|
+
transform: isExpanded ? "rotateZ(90deg)" : "none"
|
|
37
|
+
})), CollapseIcon = ({ isExpanded }) => jsx(CollapseIconWrapper, { isExpanded, children: jsx(Chevron, {}) });
|
|
83
38
|
|
|
84
39
|
// src/react-native-ui/TreeNode.tsx
|
|
85
|
-
import
|
|
86
|
-
import { jsx as jsx5, jsxs } from "react/jsx-runtime";
|
|
40
|
+
import { jsx as jsx2, jsxs } from "react/jsx-runtime";
|
|
87
41
|
var BranchNodeText = styled2.Text(({ theme }) => ({
|
|
88
42
|
textAlign: "left",
|
|
89
43
|
fontSize: theme.typography.size.s2,
|
|
@@ -145,13 +99,13 @@ var BranchNodeText = styled2.Text(({ theme }) => ({
|
|
|
145
99
|
isExpandable = !1,
|
|
146
100
|
...props
|
|
147
101
|
}) {
|
|
148
|
-
let theme =
|
|
102
|
+
let theme = useTheme2(), color = useMemo(() => theme.base === "dark" ? theme.color.primary : theme.color.ultraviolet, [theme.base, theme.color.primary, theme.color.ultraviolet]);
|
|
149
103
|
return jsxs(BranchNode, { isExpandable, ...props, children: [
|
|
150
104
|
jsxs(Wrapper, { children: [
|
|
151
|
-
isExpandable &&
|
|
152
|
-
|
|
105
|
+
isExpandable && jsx2(CollapseIcon, { isExpanded: !!isExpanded }),
|
|
106
|
+
jsx2(GroupIcon, { width: 14, height: 14, color })
|
|
153
107
|
] }),
|
|
154
|
-
|
|
108
|
+
jsx2(BranchNodeText, { children })
|
|
155
109
|
] });
|
|
156
110
|
}), ComponentNode = React.memo(function({
|
|
157
111
|
children,
|
|
@@ -159,20 +113,20 @@ var BranchNodeText = styled2.Text(({ theme }) => ({
|
|
|
159
113
|
isExpandable,
|
|
160
114
|
...props
|
|
161
115
|
}) {
|
|
162
|
-
let theme =
|
|
116
|
+
let theme = useTheme2(), color = useMemo(() => theme.color.secondary, [theme.color.secondary]);
|
|
163
117
|
return jsxs(BranchNode, { isExpandable, ...props, children: [
|
|
164
118
|
jsxs(Wrapper, { children: [
|
|
165
|
-
isExpandable &&
|
|
166
|
-
|
|
119
|
+
isExpandable && jsx2(CollapseIcon, { isExpanded: !!isExpanded }),
|
|
120
|
+
jsx2(ComponentIcon, { width: 12, height: 12, color })
|
|
167
121
|
] }),
|
|
168
|
-
|
|
122
|
+
jsx2(BranchNodeText, { children })
|
|
169
123
|
] });
|
|
170
124
|
}), StoryNode = React.memo(
|
|
171
125
|
forwardRef(function({ children, ...props }, ref) {
|
|
172
|
-
let theme =
|
|
126
|
+
let theme = useTheme2(), color = useMemo(() => props.selected ? theme.color.lightest : theme.color.seafoam, [props.selected, theme.color.lightest, theme.color.seafoam]);
|
|
173
127
|
return jsxs(LeafNode, { ...props, ref, children: [
|
|
174
|
-
|
|
175
|
-
|
|
128
|
+
jsx2(Wrapper, { children: jsx2(StoryIcon, { width: 14, height: 14, color }) }),
|
|
129
|
+
jsx2(LeafNodeText, { selected: props.selected, children })
|
|
176
130
|
] });
|
|
177
131
|
})
|
|
178
132
|
);
|
|
@@ -180,7 +134,7 @@ StoryNode.displayName = "StoryNode";
|
|
|
180
134
|
|
|
181
135
|
// src/react-native-ui/Tree.tsx
|
|
182
136
|
import { styled as styled3 } from "@aussieljk/forkbook/internal/react-native-theming";
|
|
183
|
-
import React2, { useCallback as useCallback2, useMemo as
|
|
137
|
+
import React2, { useCallback as useCallback2, useMemo as useMemo2, useRef as useRef2 } from "react";
|
|
184
138
|
import {
|
|
185
139
|
IconButton,
|
|
186
140
|
useExpanded,
|
|
@@ -191,53 +145,9 @@ import {
|
|
|
191
145
|
startCase
|
|
192
146
|
} from "@aussieljk/forkbook/internal/react-native-ui-common";
|
|
193
147
|
|
|
194
|
-
// src/react-native-ui/icon/CollapseAllIcon.tsx
|
|
195
|
-
import { Path as Path5, Svg as Svg5 } from "react-native-svg";
|
|
196
|
-
import { useTheme as useTheme2 } from "@aussieljk/forkbook/internal/react-native-theming";
|
|
197
|
-
import { useMemo as useMemo2 } from "react";
|
|
198
|
-
import { jsx as jsx6 } from "react/jsx-runtime";
|
|
199
|
-
var CollapseAllIcon = ({
|
|
200
|
-
color,
|
|
201
|
-
//= '#2E3438',
|
|
202
|
-
width = 14,
|
|
203
|
-
height = 14,
|
|
204
|
-
...props
|
|
205
|
-
}) => {
|
|
206
|
-
let theme = useTheme2(), fillColor = useMemo2(() => color ?? theme.color.defaultText, [color, theme.color.defaultText]);
|
|
207
|
-
return jsx6(Svg5, { width, height, viewBox: "0 0 14 14", fill: "none", ...props, children: jsx6(
|
|
208
|
-
Path5,
|
|
209
|
-
{
|
|
210
|
-
d: "M3.354.146a.5.5 0 10-.708.708l4 4a.5.5 0 00.708 0l4-4a.5.5 0 00-.708-.708L7 3.793 3.354.146zM6.646 9.146a.5.5 0 01.708 0l4 4a.5.5 0 01-.708.708L7 10.207l-3.646 3.647a.5.5 0 01-.708-.708l4-4z",
|
|
211
|
-
fill: fillColor
|
|
212
|
-
}
|
|
213
|
-
) });
|
|
214
|
-
};
|
|
215
|
-
|
|
216
|
-
// src/react-native-ui/icon/ExpandAllIcon.tsx
|
|
217
|
-
import { Path as Path6, Svg as Svg6 } from "react-native-svg";
|
|
218
|
-
import { useTheme as useTheme3 } from "@aussieljk/forkbook/internal/react-native-theming";
|
|
219
|
-
import { useMemo as useMemo3 } from "react";
|
|
220
|
-
import { jsx as jsx7 } from "react/jsx-runtime";
|
|
221
|
-
var ExpandAllIcon = ({
|
|
222
|
-
color,
|
|
223
|
-
//= '#2E3438',
|
|
224
|
-
width = 14,
|
|
225
|
-
height = 14,
|
|
226
|
-
...props
|
|
227
|
-
}) => {
|
|
228
|
-
let theme = useTheme3(), fillColor = useMemo3(() => color ?? theme.color.defaultText, [color, theme.color.defaultText]);
|
|
229
|
-
return jsx7(Svg6, { width, height, viewBox: "0 0 14 14", fill: "none", ...props, children: jsx7(
|
|
230
|
-
Path6,
|
|
231
|
-
{
|
|
232
|
-
d: "M7.354.146l4 4a.5.5 0 01-.708.708L7 1.207 3.354 4.854a.5.5 0 11-.708-.708l4-4a.5.5 0 01.708 0zM11.354 9.146a.5.5 0 010 .708l-4 4a.5.5 0 01-.708 0l-4-4a.5.5 0 11.708-.708L7 12.793l3.646-3.647a.5.5 0 01.708 0z",
|
|
233
|
-
fill: fillColor
|
|
234
|
-
}
|
|
235
|
-
) });
|
|
236
|
-
};
|
|
237
|
-
|
|
238
148
|
// src/react-native-ui/SelectedNodeProvider.tsx
|
|
239
149
|
import { createContext, useCallback, useContext, useRef } from "react";
|
|
240
|
-
import { jsx as
|
|
150
|
+
import { jsx as jsx3 } from "react/jsx-runtime";
|
|
241
151
|
var SelectedNodeContext = createContext({
|
|
242
152
|
nodeRef: { current: null },
|
|
243
153
|
setNodeRef: () => {
|
|
@@ -259,7 +169,7 @@ var SelectedNodeContext = createContext({
|
|
|
259
169
|
}
|
|
260
170
|
}, 100);
|
|
261
171
|
}, []);
|
|
262
|
-
return
|
|
172
|
+
return jsx3(
|
|
263
173
|
SelectedNodeContext.Provider,
|
|
264
174
|
{
|
|
265
175
|
value: {
|
|
@@ -274,7 +184,7 @@ var SelectedNodeContext = createContext({
|
|
|
274
184
|
}, useSelectedNode = () => useContext(SelectedNodeContext);
|
|
275
185
|
|
|
276
186
|
// src/react-native-ui/Tree.tsx
|
|
277
|
-
import { jsx as
|
|
187
|
+
import { jsx as jsx4, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
278
188
|
var Node = React2.memo(function({
|
|
279
189
|
item,
|
|
280
190
|
refId,
|
|
@@ -298,7 +208,7 @@ var Node = React2.memo(function({
|
|
|
298
208
|
return null;
|
|
299
209
|
let id = createId(item.id, refId);
|
|
300
210
|
if (item.type === "story")
|
|
301
|
-
return
|
|
211
|
+
return jsx4(LeafNodeStyleWrapper, { children: jsx4(
|
|
302
212
|
StoryNode,
|
|
303
213
|
{
|
|
304
214
|
ref: setRef,
|
|
@@ -323,12 +233,12 @@ var Node = React2.memo(function({
|
|
|
323
233
|
},
|
|
324
234
|
"aria-expanded": isExpanded,
|
|
325
235
|
children: [
|
|
326
|
-
|
|
327
|
-
|
|
236
|
+
jsx4(CollapseIcon, { isExpanded }),
|
|
237
|
+
jsx4(RootNodeText, { children: startCase(item.name) })
|
|
328
238
|
]
|
|
329
239
|
}
|
|
330
240
|
),
|
|
331
|
-
isExpanded &&
|
|
241
|
+
isExpanded && jsx4(
|
|
332
242
|
IconButton,
|
|
333
243
|
{
|
|
334
244
|
"aria-label": isFullyExpanded ? "Expand" : "Collapse",
|
|
@@ -337,13 +247,13 @@ var Node = React2.memo(function({
|
|
|
337
247
|
onPress: (event) => {
|
|
338
248
|
event.preventDefault(), setFullyExpanded?.();
|
|
339
249
|
},
|
|
340
|
-
children: isFullyExpanded ?
|
|
250
|
+
children: isFullyExpanded ? jsx4(CollapseAllIcon, {}) : jsx4(ExpandAllIcon, {})
|
|
341
251
|
}
|
|
342
252
|
)
|
|
343
253
|
] }, id);
|
|
344
254
|
if (item.type === "component" || item.type === "group") {
|
|
345
255
|
let BranchNode2 = item.type === "component" ? ComponentNode : GroupNode;
|
|
346
|
-
return
|
|
256
|
+
return jsx4(
|
|
347
257
|
BranchNode2,
|
|
348
258
|
{
|
|
349
259
|
id,
|
|
@@ -399,7 +309,7 @@ var Node = React2.memo(function({
|
|
|
399
309
|
cursor: "pointer",
|
|
400
310
|
height: 28
|
|
401
311
|
})), Tree = React2.memo(function({ isMain, refId, data, status, docsMode, selectedStoryId, onSelectStoryId }) {
|
|
402
|
-
let containerRef = useRef2(null), [rootIds, orphanIds, initialExpanded] =
|
|
312
|
+
let containerRef = useRef2(null), [rootIds, orphanIds, initialExpanded] = useMemo2(
|
|
403
313
|
() => Object.keys(data).reduce(
|
|
404
314
|
(acc, id) => {
|
|
405
315
|
let item = data[id];
|
|
@@ -408,23 +318,23 @@ var Node = React2.memo(function({
|
|
|
408
318
|
[[], [], {}]
|
|
409
319
|
),
|
|
410
320
|
[data]
|
|
411
|
-
), { expandableDescendants } =
|
|
321
|
+
), { expandableDescendants } = useMemo2(() => [...orphanIds, ...rootIds].reduce(
|
|
412
322
|
(acc, nodeId) => (acc.expandableDescendants[nodeId] = getDescendantIds(data, nodeId, !1).filter(
|
|
413
323
|
(d) => !["story", "docs"].includes(data[d].type)
|
|
414
324
|
), acc),
|
|
415
325
|
{ orphansFirst: [], expandableDescendants: {} }
|
|
416
|
-
), [data, rootIds, orphanIds]), singleStoryComponentIds =
|
|
326
|
+
), [data, rootIds, orphanIds]), singleStoryComponentIds = useMemo2(() => Object.keys(data).filter((id) => {
|
|
417
327
|
let entry = data[id];
|
|
418
328
|
if (entry.type !== "component") return !1;
|
|
419
329
|
let { children = [], name } = entry;
|
|
420
330
|
if (children.length !== 1) return !1;
|
|
421
331
|
let onlyChild = data[children[0]];
|
|
422
332
|
return onlyChild.type === "docs" ? !0 : onlyChild.type === "story" ? isStoryHoistable(onlyChild.name, name) : !1;
|
|
423
|
-
}), [data]), collapsedItems =
|
|
333
|
+
}), [data]), collapsedItems = useMemo2(
|
|
424
334
|
() => Object.keys(data).filter((id) => !singleStoryComponentIds.includes(id)),
|
|
425
335
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
426
336
|
[singleStoryComponentIds]
|
|
427
|
-
), collapsedData =
|
|
337
|
+
), collapsedData = useMemo2(() => singleStoryComponentIds.reduce(
|
|
428
338
|
(acc, id) => {
|
|
429
339
|
let { children, parent, name } = data[id], [childId] = children;
|
|
430
340
|
if (parent) {
|
|
@@ -439,7 +349,7 @@ var Node = React2.memo(function({
|
|
|
439
349
|
}, acc;
|
|
440
350
|
},
|
|
441
351
|
{ ...data }
|
|
442
|
-
), [data]), ancestry =
|
|
352
|
+
), [data]), ancestry = useMemo2(() => collapsedItems.reduce(
|
|
443
353
|
(acc, id) => Object.assign(acc, { [id]: getAncestorIds(collapsedData, id) }),
|
|
444
354
|
{}
|
|
445
355
|
), [collapsedItems, collapsedData]), [expanded, setExpanded] = useExpanded({
|
|
@@ -449,11 +359,11 @@ var Node = React2.memo(function({
|
|
|
449
359
|
rootIds,
|
|
450
360
|
selectedStoryId,
|
|
451
361
|
onSelectStoryId
|
|
452
|
-
}), treeItems =
|
|
362
|
+
}), treeItems = useMemo2(() => collapsedItems.map((itemId) => {
|
|
453
363
|
let item = collapsedData[itemId], id = createId(itemId, refId);
|
|
454
364
|
if (item.type === "root") {
|
|
455
365
|
let descendants = expandableDescendants[item.id], isFullyExpanded = descendants.every((d) => expanded[d]);
|
|
456
|
-
return
|
|
366
|
+
return jsx4(
|
|
457
367
|
Root,
|
|
458
368
|
{
|
|
459
369
|
item,
|
|
@@ -474,7 +384,7 @@ var Node = React2.memo(function({
|
|
|
474
384
|
);
|
|
475
385
|
}
|
|
476
386
|
let isDisplayed = !item.parent || ancestry[itemId].every((a) => expanded[a]);
|
|
477
|
-
return
|
|
387
|
+
return jsx4(
|
|
478
388
|
Node,
|
|
479
389
|
{
|
|
480
390
|
item,
|
|
@@ -505,7 +415,7 @@ var Node = React2.memo(function({
|
|
|
505
415
|
setExpanded,
|
|
506
416
|
status
|
|
507
417
|
]);
|
|
508
|
-
return
|
|
418
|
+
return jsx4(Container, { ref: containerRef, hasOrphans: isMain && orphanIds.length > 0, children: treeItems });
|
|
509
419
|
}), Container = styled3.View((props) => ({
|
|
510
420
|
marginTop: props.hasOrphans ? 20 : 0,
|
|
511
421
|
marginBottom: 20
|
|
@@ -519,7 +429,7 @@ var Node = React2.memo(function({
|
|
|
519
429
|
() => setExpanded({ ids: expandableDescendants, value: !isFullyExpanded }),
|
|
520
430
|
[setExpanded, isFullyExpanded, expandableDescendants]
|
|
521
431
|
);
|
|
522
|
-
return
|
|
432
|
+
return jsx4(
|
|
523
433
|
Node,
|
|
524
434
|
{
|
|
525
435
|
...props,
|
|
@@ -534,10 +444,10 @@ var Node = React2.memo(function({
|
|
|
534
444
|
import React4, { useRef as useRef3 } from "react";
|
|
535
445
|
|
|
536
446
|
// src/react-native-ui/Refs.tsx
|
|
537
|
-
import React3, { useMemo as
|
|
447
|
+
import React3, { useMemo as useMemo3, useCallback as useCallback3, useEffect, useState } from "react";
|
|
538
448
|
import { styled as styled4 } from "@aussieljk/forkbook/internal/react-native-theming";
|
|
539
449
|
import { getStateType } from "@aussieljk/forkbook/internal/react-native-ui-common";
|
|
540
|
-
import { Fragment, jsx as
|
|
450
|
+
import { Fragment, jsx as jsx5 } from "react/jsx-runtime";
|
|
541
451
|
var Wrapper2 = styled4.View(() => ({
|
|
542
452
|
position: "relative"
|
|
543
453
|
})), Ref = React3.memo(
|
|
@@ -555,7 +465,7 @@ var Wrapper2 = styled4.View(() => ({
|
|
|
555
465
|
indexError,
|
|
556
466
|
previewInitialized,
|
|
557
467
|
setSelection
|
|
558
|
-
} = props, length =
|
|
468
|
+
} = props, length = useMemo3(() => index ? Object.keys(index).length : 0, [index]), isLoading = isLoadingMain || (type === "auto-inject" && !previewInitialized || type === "server-checked") || type === "unknown", state = getStateType(isLoading, !!loginUrl && length === 0, !!indexError, !isLoading && length === 0), [isExpanded, setExpanded] = useState(expanded);
|
|
559
469
|
useEffect(() => {
|
|
560
470
|
index && selectedStoryId && index[selectedStoryId] && setExpanded(!0);
|
|
561
471
|
}, [setExpanded, index, selectedStoryId]);
|
|
@@ -565,7 +475,7 @@ var Wrapper2 = styled4.View(() => ({
|
|
|
565
475
|
},
|
|
566
476
|
[refId, setSelection]
|
|
567
477
|
);
|
|
568
|
-
return
|
|
478
|
+
return jsx5(Fragment, { children: isExpanded && jsx5(Wrapper2, { "data-title": title, isMain: !0, children: state === "ready" && jsx5(
|
|
569
479
|
Tree,
|
|
570
480
|
{
|
|
571
481
|
status: props.status,
|
|
@@ -583,7 +493,7 @@ var Wrapper2 = styled4.View(() => ({
|
|
|
583
493
|
|
|
584
494
|
// src/react-native-ui/Explorer.tsx
|
|
585
495
|
import { View } from "react-native";
|
|
586
|
-
import { jsx as
|
|
496
|
+
import { jsx as jsx6 } from "react/jsx-runtime";
|
|
587
497
|
import { createElement } from "react";
|
|
588
498
|
var Explorer = React4.memo(function({
|
|
589
499
|
isLoading,
|
|
@@ -593,7 +503,7 @@ var Explorer = React4.memo(function({
|
|
|
593
503
|
setSelection
|
|
594
504
|
}) {
|
|
595
505
|
let containerRef = useRef3(null);
|
|
596
|
-
return
|
|
506
|
+
return jsx6(View, { ref: containerRef, id: "storybook-explorer-tree", children: dataset.entries.map(([refId, ref]) => createElement(
|
|
597
507
|
Ref,
|
|
598
508
|
{
|
|
599
509
|
...ref,
|
|
@@ -607,71 +517,25 @@ var Explorer = React4.memo(function({
|
|
|
607
517
|
});
|
|
608
518
|
|
|
609
519
|
// src/react-native-ui/Sidebar.tsx
|
|
610
|
-
import React7, { useMemo as
|
|
520
|
+
import React7, { useMemo as useMemo5 } from "react";
|
|
611
521
|
import { styled as styled7 } from "@aussieljk/forkbook/internal/react-native-theming";
|
|
612
522
|
|
|
613
523
|
// src/react-native-ui/Search.tsx
|
|
614
|
-
import { BottomSheetTextInput, useBottomSheetInternal } from "@gorhom/bottom-sheet";
|
|
615
524
|
import { styled as styled5 } from "@aussieljk/forkbook/internal/react-native-theming";
|
|
616
525
|
import { useFuzzySearchList } from "@nozbe/microfuzz/react";
|
|
617
526
|
import React5, {
|
|
618
527
|
useCallback as useCallback4,
|
|
619
528
|
useDeferredValue,
|
|
620
|
-
useMemo as
|
|
529
|
+
useMemo as useMemo4,
|
|
621
530
|
useRef as useRef4,
|
|
622
531
|
useState as useState2
|
|
623
532
|
} from "react";
|
|
624
|
-
import {
|
|
625
|
-
|
|
626
|
-
// src/react-native-ui/icon/CloseIcon.tsx
|
|
627
|
-
import { Path as Path7, Svg as Svg7 } from "react-native-svg";
|
|
628
|
-
import { jsx as jsx12, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
629
|
-
var CloseIcon = ({
|
|
630
|
-
color = "currentColor",
|
|
631
|
-
width = 14,
|
|
632
|
-
height = 14,
|
|
633
|
-
...props
|
|
634
|
-
}) => jsxs3(Svg7, { width, height, viewBox: "0 0 14 14", fill: "none", ...props, children: [
|
|
635
|
-
jsx12(
|
|
636
|
-
Path7,
|
|
637
|
-
{
|
|
638
|
-
d: "M9.854 4.146a.5.5 0 010 .708L7.707 7l2.147 2.146a.5.5 0 01-.708.708L7 7.707 4.854 9.854a.5.5 0 01-.708-.708L6.293 7 4.146 4.854a.5.5 0 11.708-.708L7 6.293l2.146-2.147a.5.5 0 01.708 0z",
|
|
639
|
-
fill: color
|
|
640
|
-
}
|
|
641
|
-
),
|
|
642
|
-
jsx12(
|
|
643
|
-
Path7,
|
|
644
|
-
{
|
|
645
|
-
fillRule: "evenodd",
|
|
646
|
-
clipRule: "evenodd",
|
|
647
|
-
d: "M7 14A7 7 0 107 0a7 7 0 000 14zm0-1A6 6 0 107 1a6 6 0 000 12z",
|
|
648
|
-
fill: color
|
|
649
|
-
}
|
|
650
|
-
)
|
|
651
|
-
] });
|
|
652
|
-
|
|
653
|
-
// src/react-native-ui/icon/SearchIcon.tsx
|
|
654
|
-
import { Path as Path8, Svg as Svg8 } from "react-native-svg";
|
|
655
|
-
import { useTheme as useTheme4 } from "@aussieljk/forkbook/internal/react-native-theming";
|
|
656
|
-
import { jsx as jsx13 } from "react/jsx-runtime";
|
|
657
|
-
var SearchIcon = ({ width = 14, height = 14, ...props }) => {
|
|
658
|
-
let theme = useTheme4();
|
|
659
|
-
return jsx13(Svg8, { width, height, viewBox: "0 0 14 14", fill: theme.color.dark, ...props, children: jsx13(
|
|
660
|
-
Path8,
|
|
661
|
-
{
|
|
662
|
-
fillRule: "evenodd",
|
|
663
|
-
clipRule: "evenodd",
|
|
664
|
-
d: "M9.544 10.206a5.5 5.5 0 11.662-.662.5.5 0 01.148.102l3 3a.5.5 0 01-.708.708l-3-3a.5.5 0 01-.102-.148zM10.5 6a4.5 4.5 0 11-9 0 4.5 4.5 0 019 0z"
|
|
665
|
-
}
|
|
666
|
-
) });
|
|
667
|
-
};
|
|
668
|
-
|
|
669
|
-
// src/react-native-ui/Search.tsx
|
|
533
|
+
import { TextInput, View as View2 } from "react-native";
|
|
670
534
|
import {
|
|
671
535
|
isExpandType,
|
|
672
536
|
searchItem
|
|
673
537
|
} from "@aussieljk/forkbook/internal/react-native-ui-common";
|
|
674
|
-
import { jsx as
|
|
538
|
+
import { jsx as jsx7, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
675
539
|
var DEFAULT_MAX_SEARCH_RESULTS = 50, SearchIconWrapper = styled5.View({
|
|
676
540
|
position: "absolute",
|
|
677
541
|
top: 0,
|
|
@@ -686,20 +550,7 @@ var DEFAULT_MAX_SEARCH_RESULTS = 50, SearchIconWrapper = styled5.View({
|
|
|
686
550
|
display: "flex",
|
|
687
551
|
flexDirection: "column",
|
|
688
552
|
position: "relative"
|
|
689
|
-
}),
|
|
690
|
-
height: 32,
|
|
691
|
-
paddingLeft: 28,
|
|
692
|
-
paddingRight: 28,
|
|
693
|
-
paddingTop: Platform.OS === "android" ? 0 : void 0,
|
|
694
|
-
paddingBottom: Platform.OS === "android" ? 0 : void 0,
|
|
695
|
-
borderWidth: 1,
|
|
696
|
-
borderColor: theme.appBorderColor,
|
|
697
|
-
backgroundColor: "transparent",
|
|
698
|
-
borderRadius: 4,
|
|
699
|
-
fontSize: theme.typography.size.s1 + 1,
|
|
700
|
-
color: theme.color.defaultText,
|
|
701
|
-
width: "100%"
|
|
702
|
-
})), Input = styled5(TextInput)(({ theme }) => ({
|
|
553
|
+
}), Input = styled5(TextInput)(({ theme }) => ({
|
|
703
554
|
height: 32,
|
|
704
555
|
paddingLeft: 28,
|
|
705
556
|
paddingRight: 28,
|
|
@@ -723,7 +574,7 @@ var DEFAULT_MAX_SEARCH_RESULTS = 50, SearchIconWrapper = styled5.View({
|
|
|
723
574
|
justifyContent: "center",
|
|
724
575
|
height: "100%"
|
|
725
576
|
})), Search = React5.memo(function({ children, dataset, setSelection, getLastViewed, initialQuery = "" }) {
|
|
726
|
-
let
|
|
577
|
+
let inputRef = useRef4(null), [inputValue, setInputValue] = useState2(initialQuery), [isOpen, setIsOpen] = useState2(!1), [allComponents, showAllComponents] = useState2(!1), { scrollToSelectedNode } = useSelectedNode(), selectStory = useCallback4(
|
|
727
578
|
(id, refId) => {
|
|
728
579
|
setSelection({ storyId: id, refId }), inputRef.current?.blur(), setIsOpen(!1), showAllComponents(!1), scrollToSelectedNode();
|
|
729
580
|
},
|
|
@@ -740,9 +591,9 @@ var DEFAULT_MAX_SEARCH_RESULTS = 50, SearchIconWrapper = styled5.View({
|
|
|
740
591
|
isHighlighted: !1
|
|
741
592
|
}),
|
|
742
593
|
[selectStory]
|
|
743
|
-
), deferredDataset = useDeferredValue(dataset), searchList =
|
|
594
|
+
), deferredDataset = useDeferredValue(dataset), searchList = useMemo4(() => deferredDataset.entries.reduce((acc, [refId, { index }]) => (index && acc.push(
|
|
744
595
|
...Object.values(index).map((item) => searchItem(item, deferredDataset.hash[refId]))
|
|
745
|
-
), acc), []), [deferredDataset]), deferredQuery = useDeferredValue(inputValue), queryText =
|
|
596
|
+
), acc), []), [deferredDataset]), deferredQuery = useDeferredValue(inputValue), queryText = useMemo4(() => deferredQuery ? deferredQuery.trim() : "", [deferredQuery]), getText = useCallback4((item) => [item.name, item.path?.join(" ") ?? ""], []), mapResultItem = useCallback4(
|
|
746
597
|
({ item, score, matches }) => ({
|
|
747
598
|
item,
|
|
748
599
|
score,
|
|
@@ -754,7 +605,7 @@ var DEFAULT_MAX_SEARCH_RESULTS = 50, SearchIconWrapper = styled5.View({
|
|
|
754
605
|
queryText,
|
|
755
606
|
getText,
|
|
756
607
|
mapResultItem
|
|
757
|
-
}), results =
|
|
608
|
+
}), results = useMemo4(() => {
|
|
758
609
|
if (!queryText) return [];
|
|
759
610
|
let maxResults = allComponents ? 1e3 : DEFAULT_MAX_SEARCH_RESULTS, processedResults = [], resultIds = /* @__PURE__ */ new Set(), totalDistinctCount = 0;
|
|
760
611
|
for (let result of fuzzyResults) {
|
|
@@ -768,25 +619,25 @@ var DEFAULT_MAX_SEARCH_RESULTS = 50, SearchIconWrapper = styled5.View({
|
|
|
768
619
|
moreCount: totalDistinctCount - DEFAULT_MAX_SEARCH_RESULTS
|
|
769
620
|
}), processedResults;
|
|
770
621
|
}, [queryText, fuzzyResults, allComponents]);
|
|
771
|
-
return
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
622
|
+
return jsxs3(View2, { style: { flex: 1 }, children: [
|
|
623
|
+
jsxs3(SearchField, { children: [
|
|
624
|
+
jsx7(SearchIconWrapper, { children: jsx7(SearchIcon, {}) }),
|
|
625
|
+
jsx7(
|
|
626
|
+
Input,
|
|
776
627
|
{
|
|
777
628
|
ref: inputRef,
|
|
778
629
|
onChangeText: setInputValue,
|
|
779
630
|
onFocus: () => setIsOpen(!0),
|
|
780
631
|
onBlur: () => setIsOpen(!1)
|
|
781
632
|
}
|
|
782
|
-
)
|
|
783
|
-
isOpen &&
|
|
633
|
+
),
|
|
634
|
+
isOpen && jsx7(
|
|
784
635
|
ClearIcon,
|
|
785
636
|
{
|
|
786
637
|
onPress: () => {
|
|
787
638
|
setInputValue(""), inputRef.current?.clear();
|
|
788
639
|
},
|
|
789
|
-
children:
|
|
640
|
+
children: jsx7(CloseIcon, {})
|
|
790
641
|
}
|
|
791
642
|
)
|
|
792
643
|
] }),
|
|
@@ -812,7 +663,7 @@ import {
|
|
|
812
663
|
Button
|
|
813
664
|
} from "@aussieljk/forkbook/internal/react-native-ui-common";
|
|
814
665
|
import { View as View3 } from "react-native";
|
|
815
|
-
import { jsx as
|
|
666
|
+
import { jsx as jsx8, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
816
667
|
import { createElement as createElement2 } from "react";
|
|
817
668
|
var ResultsList = styled6.View({
|
|
818
669
|
margin: 0,
|
|
@@ -872,19 +723,19 @@ var ResultsList = styled6.View({
|
|
|
872
723
|
marginBottom: 4,
|
|
873
724
|
alignItems: "center"
|
|
874
725
|
})), Highlight = React6.memo(
|
|
875
|
-
function({ children, text, ranges }) {
|
|
876
|
-
if (!ranges || ranges.length === 0) return
|
|
726
|
+
function({ children, text: text2, ranges }) {
|
|
727
|
+
if (!ranges || ranges.length === 0) return jsx8(Text, { children: children ?? text2 });
|
|
877
728
|
let { nodes: result } = ranges.reduce(
|
|
878
|
-
({ cursor, nodes }, [start, end], index, { length }) => (cursor < start && nodes.push(
|
|
729
|
+
({ cursor, nodes }, [start, end], index, { length }) => (cursor < start && nodes.push(jsx8(Text, { children: text2.slice(cursor, start) }, `text-${index}`)), nodes.push(jsx8(Mark, { children: text2.slice(start, end + 1) }, `mark-${index}`)), index === length - 1 && end + 1 < text2.length && nodes.push(jsx8(Text, { children: text2.slice(end + 1) }, `last-${index}`)), { cursor: end + 1, nodes }),
|
|
879
730
|
{ cursor: 0, nodes: [] }
|
|
880
731
|
);
|
|
881
|
-
return
|
|
732
|
+
return jsx8(Text, { children: result });
|
|
882
733
|
}
|
|
883
734
|
), Title = styled6.Text(({ theme }) => ({
|
|
884
735
|
justifyContent: "flex-start",
|
|
885
736
|
color: theme.textMutedColor,
|
|
886
737
|
fontSize: theme.typography.size.s2
|
|
887
|
-
})),
|
|
738
|
+
})), Path = styled6.View(({ theme }) => ({
|
|
888
739
|
justifyContent: "flex-start",
|
|
889
740
|
marginVertical: 2,
|
|
890
741
|
color: theme.textMutedColor,
|
|
@@ -906,14 +757,14 @@ var ResultsList = styled6.View({
|
|
|
906
757
|
},
|
|
907
758
|
[onPress]
|
|
908
759
|
), nameHighlights = matches?.[0], pathString = item.path?.join(" ") ?? "";
|
|
909
|
-
return
|
|
910
|
-
|
|
911
|
-
item.type === "component" &&
|
|
912
|
-
item.type === "story" &&
|
|
760
|
+
return jsxs4(ResultRow, { ...props, onPress: press, children: [
|
|
761
|
+
jsxs4(IconWrapper, { children: [
|
|
762
|
+
item.type === "component" && jsx8(ComponentIcon, { width: "14", height: "14" }),
|
|
763
|
+
item.type === "story" && jsx8(StoryIcon, { width: "14", height: "14" })
|
|
913
764
|
] }),
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
765
|
+
jsxs4(ResultRowContent, { testID: "search-result-item--label", children: [
|
|
766
|
+
jsx8(Title, { children: jsx8(Highlight, { text: item.name, ranges: nameHighlights, children: item.name }) }),
|
|
767
|
+
jsx8(Path, { children: jsx8(PathText, { children: jsx8(Highlight, { text: pathString, ranges: matches?.[1], children: item.path?.join(" / ") }) }) })
|
|
917
768
|
] })
|
|
918
769
|
] });
|
|
919
770
|
}), Text = styled6.Text(({ theme }) => ({
|
|
@@ -929,18 +780,18 @@ var ResultsList = styled6.View({
|
|
|
929
780
|
let handleClearLastViewed = () => {
|
|
930
781
|
clearLastViewed?.(), closeMenu();
|
|
931
782
|
};
|
|
932
|
-
return
|
|
933
|
-
results.length > 0 && !query ?
|
|
934
|
-
|
|
935
|
-
|
|
783
|
+
return jsxs4(ResultsList, { children: [
|
|
784
|
+
results.length > 0 && !query ? jsxs4(RecentlyOpenedTitle, { children: [
|
|
785
|
+
jsx8(Text, { children: "Recently opened" }),
|
|
786
|
+
jsx8(IconButton2, { onPress: handleClearLastViewed })
|
|
936
787
|
] }) : null,
|
|
937
|
-
results.length === 0 && query ?
|
|
938
|
-
|
|
939
|
-
|
|
788
|
+
results.length === 0 && query ? jsx8(View3, { children: jsxs4(NoResults, { children: [
|
|
789
|
+
jsx8(Text, { style: { marginBottom: 8 }, children: "No components found" }),
|
|
790
|
+
jsx8(Text, { children: "Find components by name or path." })
|
|
940
791
|
] }) }) : null,
|
|
941
792
|
results.map((result, index) => {
|
|
942
793
|
if (isExpandType2(result))
|
|
943
|
-
return
|
|
794
|
+
return jsx8(MoreWrapper, { children: jsx8(
|
|
944
795
|
Button,
|
|
945
796
|
{
|
|
946
797
|
...result,
|
|
@@ -971,7 +822,7 @@ var DEFAULT_REF_ID = "storybook_internal";
|
|
|
971
822
|
|
|
972
823
|
// src/react-native-ui/Sidebar.tsx
|
|
973
824
|
import { View as View4 } from "react-native";
|
|
974
|
-
import { Fragment as Fragment2, jsx as
|
|
825
|
+
import { Fragment as Fragment2, jsx as jsx9, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
975
826
|
var Container2 = styled7.View(({ theme }) => ({
|
|
976
827
|
width: "100%",
|
|
977
828
|
height: "100%",
|
|
@@ -989,12 +840,12 @@ var Container2 = styled7.View(({ theme }) => ({
|
|
|
989
840
|
condition
|
|
990
841
|
}) {
|
|
991
842
|
let [a, b] = React7.Children.toArray(children);
|
|
992
|
-
return
|
|
993
|
-
|
|
994
|
-
|
|
843
|
+
return jsxs5(Fragment2, { children: [
|
|
844
|
+
jsx9(View4, { style: { display: condition ? "flex" : "none" }, children: a }),
|
|
845
|
+
jsx9(View4, { style: { display: condition ? "none" : "flex" }, children: b })
|
|
995
846
|
] });
|
|
996
847
|
}), useCombination = (index, indexError, previewInitialized, status, refs) => {
|
|
997
|
-
let hash =
|
|
848
|
+
let hash = useMemo5(
|
|
998
849
|
() => ({
|
|
999
850
|
[DEFAULT_REF_ID]: {
|
|
1000
851
|
index,
|
|
@@ -1009,7 +860,7 @@ var Container2 = styled7.View(({ theme }) => ({
|
|
|
1009
860
|
}),
|
|
1010
861
|
[refs, index, indexError, previewInitialized, status]
|
|
1011
862
|
);
|
|
1012
|
-
return
|
|
863
|
+
return useMemo5(() => ({ hash, entries: Object.entries(hash) }), [hash]);
|
|
1013
864
|
}, Sidebar = React7.memo(function({
|
|
1014
865
|
storyId,
|
|
1015
866
|
refId = DEFAULT_REF_ID,
|
|
@@ -1020,12 +871,12 @@ var Container2 = styled7.View(({ theme }) => ({
|
|
|
1020
871
|
refs = {},
|
|
1021
872
|
setSelection
|
|
1022
873
|
}) {
|
|
1023
|
-
let selected =
|
|
874
|
+
let selected = useMemo5(
|
|
1024
875
|
() => storyId ? { storyId, refId } : null,
|
|
1025
876
|
[storyId, refId]
|
|
1026
877
|
), dataset = useCombination(index, indexError, previewInitialized, status, refs), lastViewedProps = useLastViewed(selected);
|
|
1027
|
-
return
|
|
1028
|
-
|
|
878
|
+
return jsx9(Container2, { style: { paddingHorizontal: 10 }, children: jsx9(Top, { children: jsx9(Search, { dataset, setSelection, ...lastViewedProps, children: ({ query, results, isBrowsing, closeMenu, getItemProps, highlightedIndex }) => jsxs5(Swap, { condition: isBrowsing, children: [
|
|
879
|
+
jsx9(
|
|
1029
880
|
Explorer,
|
|
1030
881
|
{
|
|
1031
882
|
dataset,
|
|
@@ -1035,7 +886,7 @@ var Container2 = styled7.View(({ theme }) => ({
|
|
|
1035
886
|
setSelection
|
|
1036
887
|
}
|
|
1037
888
|
),
|
|
1038
|
-
|
|
889
|
+
jsx9(
|
|
1039
890
|
SearchResults,
|
|
1040
891
|
{
|
|
1041
892
|
query,
|
|
@@ -1051,8 +902,7 @@ var Container2 = styled7.View(({ theme }) => ({
|
|
|
1051
902
|
});
|
|
1052
903
|
|
|
1053
904
|
// src/react-native-ui/Layout.tsx
|
|
1054
|
-
import {
|
|
1055
|
-
import { styled as styled9, ThemeProvider, useTheme as useTheme9 } from "@aussieljk/forkbook/internal/react-native-theming";
|
|
905
|
+
import { styled as styled9, ThemeProvider, useTheme as useTheme5 } from "@aussieljk/forkbook/internal/react-native-theming";
|
|
1056
906
|
import {
|
|
1057
907
|
IconButton as IconButton4,
|
|
1058
908
|
LayoutProvider,
|
|
@@ -1061,9 +911,8 @@ import {
|
|
|
1061
911
|
useStoreBooleanState,
|
|
1062
912
|
useStyle as useStyle2
|
|
1063
913
|
} from "@aussieljk/forkbook/internal/react-native-ui-common";
|
|
1064
|
-
import { useCallback as useCallback7, useLayoutEffect, useMemo as
|
|
1065
|
-
import { ScrollView as
|
|
1066
|
-
import { GestureHandlerRootView } from "react-native-gesture-handler";
|
|
914
|
+
import { useCallback as useCallback7, useLayoutEffect, useMemo as useMemo9, useRef as useRef7, useState as useState4 } from "react";
|
|
915
|
+
import { ScrollView as ScrollView3, Text as Text4, TouchableOpacity as TouchableOpacity2, View as View6 } from "react-native";
|
|
1067
916
|
import { SafeAreaProvider, useSafeAreaInsets as useSafeAreaInsets3 } from "react-native-safe-area-context";
|
|
1068
917
|
import { SET_CURRENT_STORY } from "@aussieljk/forkbook/internal/core-events";
|
|
1069
918
|
import {
|
|
@@ -1071,139 +920,36 @@ import {
|
|
|
1071
920
|
} from "@aussieljk/forkbook/internal/types";
|
|
1072
921
|
import { addons as addons2 } from "@aussieljk/forkbook/manager-api";
|
|
1073
922
|
|
|
1074
|
-
// src/react-native-ui/icon/BottomBarToggleIcon.tsx
|
|
1075
|
-
import { Path as Path10, Svg as Svg9 } from "react-native-svg";
|
|
1076
|
-
import { jsx as jsx17, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
1077
|
-
var BottomBarToggleIcon = ({
|
|
1078
|
-
color = "currentColor",
|
|
1079
|
-
width = 14,
|
|
1080
|
-
height = 14,
|
|
1081
|
-
...props
|
|
1082
|
-
}) => jsxs7(Svg9, { width, height, viewBox: "0 0 14 14", fill: "none", ...props, children: [
|
|
1083
|
-
jsx17(
|
|
1084
|
-
Path10,
|
|
1085
|
-
{
|
|
1086
|
-
d: "M3.5 10.004a.5.5 0 000 1h1a.5.5 0 000-1h-1zM6 10.504a.5.5 0 01.5-.5h1a.5.5 0 010 1h-1a.5.5 0 01-.5-.5zM9.5 10.004a.5.5 0 000 1h1a.5.5 0 000-1h-1z",
|
|
1087
|
-
fill: color
|
|
1088
|
-
}
|
|
1089
|
-
),
|
|
1090
|
-
jsx17(
|
|
1091
|
-
Path10,
|
|
1092
|
-
{
|
|
1093
|
-
fillRule: "evenodd",
|
|
1094
|
-
clipRule: "evenodd",
|
|
1095
|
-
d: "M1 12.504v-11a.5.5 0 01.5-.5h11a.5.5 0 01.5.5v11a.5.5 0 01-.5.5h-11a.5.5 0 01-.5-.5zm1-.5v-3h10v3H2zm4.5-4H2v-6h10v6H7.5V5.21l.646.646a.5.5 0 10.708-.707l-1.5-1.5a.5.5 0 00-.708 0l-1.5 1.5a.5.5 0 10.708.707l.646-.646v2.793z",
|
|
1096
|
-
fill: color
|
|
1097
|
-
}
|
|
1098
|
-
)
|
|
1099
|
-
] });
|
|
1100
|
-
|
|
1101
|
-
// src/react-native-ui/icon/CloseFullscreenIcon.tsx
|
|
1102
|
-
import { useMemo as useMemo8 } from "react";
|
|
1103
|
-
import Svg10, { Path as Path11 } from "react-native-svg";
|
|
1104
|
-
import { useTheme as useTheme5 } from "@aussieljk/forkbook/internal/react-native-theming";
|
|
1105
|
-
import { jsx as jsx18 } from "react/jsx-runtime";
|
|
1106
|
-
function CloseFullscreenIcon({ color, width = 14, height = 14, ...props }) {
|
|
1107
|
-
let theme = useTheme5(), fillColor = useMemo8(() => color ?? theme.color.defaultText, [color, theme.color.defaultText]);
|
|
1108
|
-
return jsx18(Svg10, { fill: fillColor, height, viewBox: "0 0 16 16", width, ...props, children: jsx18(Path11, { d: "M5.5 0a.5.5 0 01.5.5v4A1.5 1.5 0 014.5 6h-4a.5.5 0 010-1h4a.5.5 0 00.5-.5v-4a.5.5 0 01.5-.5zm5 0a.5.5 0 01.5.5v4a.5.5 0 00.5.5h4a.5.5 0 010 1h-4A1.5 1.5 0 0110 4.5v-4a.5.5 0 01.5-.5zM0 10.5a.5.5 0 01.5-.5h4A1.5 1.5 0 016 11.5v4a.5.5 0 01-1 0v-4a.5.5 0 00-.5-.5h-4a.5.5 0 01-.5-.5zm10 1a1.5 1.5 0 011.5-1.5h4a.5.5 0 010 1h-4a.5.5 0 00-.5.5v4a.5.5 0 01-1 0v-4z" }) });
|
|
1109
|
-
}
|
|
1110
|
-
|
|
1111
|
-
// src/react-native-ui/icon/FullscreenIcon.tsx
|
|
1112
|
-
import Svg11, { Path as Path12 } from "react-native-svg";
|
|
1113
|
-
import { useTheme as useTheme6 } from "@aussieljk/forkbook/internal/react-native-theming";
|
|
1114
|
-
import { useMemo as useMemo9 } from "react";
|
|
1115
|
-
import { jsx as jsx19 } from "react/jsx-runtime";
|
|
1116
|
-
function FullscreenIcon({ color, width = 14, height = 14, ...props }) {
|
|
1117
|
-
let theme = useTheme6(), fillColor = useMemo9(() => color ?? theme.color.defaultText, [color, theme.color.defaultText]);
|
|
1118
|
-
return jsx19(Svg11, { width, height, viewBox: "0 0 14 14", fill: "none", ...props, children: jsx19(
|
|
1119
|
-
Path12,
|
|
1120
|
-
{
|
|
1121
|
-
d: "M1.5 1h2a.5.5 0 010 1h-.793l3.147 3.146a.5.5 0 11-.708.708L2 2.707V3.5a.5.5 0 01-1 0v-2a.5.5 0 01.5-.5zm8.5.5a.5.5 0 01.5-.5h2a.5.5 0 01.5.5v2a.5.5 0 01-1 0v-.793L8.854 5.854a.5.5 0 11-.708-.708L11.293 2H10.5a.5.5 0 01-.5-.5zm2.5 8.5a.5.5 0 01.5.5v2a.5.5 0 01-.5.5h-2a.5.5 0 010-1h.793L8.146 8.854a.5.5 0 11.708-.708L12 11.293V10.5a.5.5 0 01.5-.5zM2 11.293V10.5a.5.5 0 00-1 0v2a.5.5 0 00.5.5h2a.5.5 0 000-1h-.793l3.147-3.146a.5.5 0 10-.708-.708L2 11.293z",
|
|
1122
|
-
fill: fillColor
|
|
1123
|
-
}
|
|
1124
|
-
) });
|
|
1125
|
-
}
|
|
1126
|
-
|
|
1127
|
-
// src/react-native-ui/icon/MenuIcon.tsx
|
|
1128
|
-
import { Path as Path13, Svg as Svg12 } from "react-native-svg";
|
|
1129
|
-
import { jsx as jsx20 } from "react/jsx-runtime";
|
|
1130
|
-
var MenuIcon = ({
|
|
1131
|
-
color = "currentColor",
|
|
1132
|
-
width = 14,
|
|
1133
|
-
height = 14,
|
|
1134
|
-
...props
|
|
1135
|
-
}) => jsx20(Svg12, { width, height, viewBox: "0 0 14 14", fill: "none", ...props, children: jsx20(
|
|
1136
|
-
Path13,
|
|
1137
|
-
{
|
|
1138
|
-
d: "M13 3.5a.5.5 0 010 1H1a.5.5 0 010-1h12zM13.5 10a.5.5 0 00-.5-.5H1a.5.5 0 000 1h12a.5.5 0 00.5-.5zM13 6.5a.5.5 0 010 1H1a.5.5 0 010-1h12z",
|
|
1139
|
-
fill: color
|
|
1140
|
-
}
|
|
1141
|
-
) });
|
|
1142
|
-
|
|
1143
923
|
// src/react-native-ui/MobileAddonsPanel.tsx
|
|
1144
|
-
import { BottomSheetModal } from "@
|
|
924
|
+
import { BottomSheetModal } from "@expo/ui/community/bottom-sheet";
|
|
1145
925
|
import { addons } from "@aussieljk/forkbook/manager-api";
|
|
1146
|
-
import { styled as styled8, useTheme as
|
|
926
|
+
import { styled as styled8, useTheme as useTheme3 } from "@aussieljk/forkbook/internal/react-native-theming";
|
|
1147
927
|
import {
|
|
1148
928
|
Addon_TypesEnum
|
|
1149
929
|
} from "@aussieljk/forkbook/internal/types";
|
|
1150
|
-
import { forwardRef as forwardRef2, useImperativeHandle, useMemo as
|
|
1151
|
-
import {
|
|
1152
|
-
import { ScrollView } from "react-native-gesture-handler";
|
|
1153
|
-
import Animated, {
|
|
1154
|
-
useAnimatedKeyboard,
|
|
1155
|
-
useAnimatedStyle,
|
|
1156
|
-
useReducedMotion,
|
|
1157
|
-
useSharedValue
|
|
1158
|
-
} from "react-native-reanimated";
|
|
930
|
+
import { forwardRef as forwardRef2, useImperativeHandle, useMemo as useMemo6, useRef as useRef5, useState as useState3 } from "react";
|
|
931
|
+
import { ScrollView, Text as Text2, View as View5 } from "react-native";
|
|
1159
932
|
import { useSafeAreaInsets } from "react-native-safe-area-context";
|
|
1160
933
|
import { IconButton as IconButton3, useStyle } from "@aussieljk/forkbook/internal/react-native-ui-common";
|
|
1161
|
-
import { jsx as
|
|
1162
|
-
var
|
|
1163
|
-
paddingTop: 8
|
|
1164
|
-
}, contentStyle = {
|
|
1165
|
-
flex: 1
|
|
1166
|
-
}, MobileAddonsPanel = forwardRef2(
|
|
934
|
+
import { jsx as jsx10, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
935
|
+
var snapPoints = ["25%", "50%", "75%"], MobileAddonsPanel = forwardRef2(
|
|
1167
936
|
({ storyId, parameters }, ref) => {
|
|
1168
|
-
let theme =
|
|
1169
|
-
|
|
937
|
+
let theme = useTheme3(), addonsPanelBottomSheetRef = useRef5(null);
|
|
938
|
+
useImperativeHandle(ref, () => ({
|
|
1170
939
|
setAddonsPanelOpen: (open) => {
|
|
1171
940
|
open ? addonsPanelBottomSheetRef.current?.present() : addonsPanelBottomSheetRef.current?.dismiss();
|
|
1172
941
|
}
|
|
1173
942
|
}));
|
|
1174
|
-
let
|
|
1175
|
-
|
|
1176
|
-
return {
|
|
1177
|
-
maxHeight: height - animatedPosition.value - extraPadding
|
|
1178
|
-
};
|
|
1179
|
-
}, [animatedPosition, height, insets.bottom]), backgroundStyle = useStyle(() => ({
|
|
1180
|
-
borderRadius: 0,
|
|
1181
|
-
borderTopColor: theme.appBorderColor,
|
|
1182
|
-
borderTopWidth: 1,
|
|
1183
|
-
backgroundColor: theme.background.content
|
|
1184
|
-
})), handleIndicatorStyle = useStyle(() => ({
|
|
1185
|
-
backgroundColor: theme.textMutedColor
|
|
1186
|
-
}));
|
|
1187
|
-
return jsx21(
|
|
943
|
+
let backgroundStyle = useStyle(() => ({ backgroundColor: theme.background.content }));
|
|
944
|
+
return jsx10(
|
|
1188
945
|
BottomSheetModal,
|
|
1189
946
|
{
|
|
1190
947
|
ref: addonsPanelBottomSheetRef,
|
|
1191
948
|
index: 1,
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
style: bottomSheetStyle,
|
|
1195
|
-
animatedPosition,
|
|
949
|
+
snapPoints,
|
|
950
|
+
enablePanDownToClose: !0,
|
|
1196
951
|
backgroundStyle,
|
|
1197
|
-
|
|
1198
|
-
keyboardBehavior: "extend",
|
|
1199
|
-
enableDismissOnClose: !0,
|
|
1200
|
-
enableHandlePanningGesture: !0,
|
|
1201
|
-
stackBehavior: "replace",
|
|
1202
|
-
enableDynamicSizing: !1,
|
|
1203
|
-
accessible: !1,
|
|
1204
|
-
accessibilityLabel: null,
|
|
1205
|
-
accessibilityRole: null,
|
|
1206
|
-
children: jsx21(Animated.View, { style: [contentStyle, adjustedBottomSheetSize], children: jsx21(
|
|
952
|
+
children: jsx10(
|
|
1207
953
|
AddonsTabs,
|
|
1208
954
|
{
|
|
1209
955
|
onClose: () => {
|
|
@@ -1212,7 +958,7 @@ var bottomSheetStyle = {
|
|
|
1212
958
|
storyId,
|
|
1213
959
|
parameters
|
|
1214
960
|
}
|
|
1215
|
-
)
|
|
961
|
+
)
|
|
1216
962
|
}
|
|
1217
963
|
);
|
|
1218
964
|
}
|
|
@@ -1243,17 +989,17 @@ var addonsTabsContainerStyle = {
|
|
|
1243
989
|
storyId,
|
|
1244
990
|
parameters
|
|
1245
991
|
}) => {
|
|
1246
|
-
let panels =
|
|
992
|
+
let panels = useMemo6(() => {
|
|
1247
993
|
let allPanels = addons.getElements(Addon_TypesEnum.PANEL);
|
|
1248
994
|
return Object.fromEntries(
|
|
1249
995
|
Object.entries(allPanels).filter(([, p]) => !p.paramKey || !parameters?.[p.paramKey]?.disable)
|
|
1250
996
|
);
|
|
1251
997
|
}, [parameters]), [addonSelected, setAddonSelected] = useState3(Object.keys(panels)[0]), insets = useSafeAreaInsets(), scrollContentContainerStyle = useStyle(() => ({
|
|
1252
998
|
paddingBottom: insets.bottom + 16
|
|
1253
|
-
})), panelEntries =
|
|
1254
|
-
return
|
|
1255
|
-
|
|
1256
|
-
|
|
999
|
+
})), panelEntries = useMemo6(() => Object.entries(panels), [panels]), activeAddonId = panels[addonSelected] ? addonSelected : panelEntries[0]?.[0];
|
|
1000
|
+
return jsxs6(View5, { style: addonsTabsContainerStyle, children: [
|
|
1001
|
+
jsxs6(View5, { style: addonsTabsStyle, children: [
|
|
1002
|
+
jsx10(
|
|
1257
1003
|
ScrollView,
|
|
1258
1004
|
{
|
|
1259
1005
|
horizontal: !0,
|
|
@@ -1261,7 +1007,7 @@ var addonsTabsContainerStyle = {
|
|
|
1261
1007
|
contentContainerStyle: addonsTabsContentContainerStyle,
|
|
1262
1008
|
children: Object.values(panels).map(({ id, title }) => {
|
|
1263
1009
|
let resolvedTitle = typeof title == "function" ? title({}) : title;
|
|
1264
|
-
return
|
|
1010
|
+
return jsx10(
|
|
1265
1011
|
Tab,
|
|
1266
1012
|
{
|
|
1267
1013
|
active: id === activeAddonId,
|
|
@@ -1273,7 +1019,7 @@ var addonsTabsContainerStyle = {
|
|
|
1273
1019
|
})
|
|
1274
1020
|
}
|
|
1275
1021
|
),
|
|
1276
|
-
|
|
1022
|
+
jsx10(
|
|
1277
1023
|
IconButton3,
|
|
1278
1024
|
{
|
|
1279
1025
|
style: closeIconStyle,
|
|
@@ -1284,18 +1030,11 @@ var addonsTabsContainerStyle = {
|
|
|
1284
1030
|
}
|
|
1285
1031
|
)
|
|
1286
1032
|
] }),
|
|
1287
|
-
|
|
1288
|
-
ScrollView,
|
|
1289
|
-
{
|
|
1290
|
-
style: addonsScrollStyle,
|
|
1291
|
-
contentContainerStyle: scrollContentContainerStyle,
|
|
1292
|
-
children: storyId ? panelEntries.length === 0 ? jsx21(View5, { style: centeredStyle, children: jsx21(Text2, { children: "No addons loaded." }) }) : panelEntries.map(([id, p]) => jsx21(View5, { style: id === activeAddonId ? void 0 : hiddenStyle, children: jsx21(PanelRenderer, { panel: p }) }, id)) : jsx21(View5, { style: centeredStyle, children: jsx21(Text2, { children: "No Story Selected" }) })
|
|
1293
|
-
}
|
|
1294
|
-
)
|
|
1033
|
+
jsx10(ScrollView, { style: addonsScrollStyle, contentContainerStyle: scrollContentContainerStyle, children: storyId ? panelEntries.length === 0 ? jsx10(View5, { style: centeredStyle, children: jsx10(Text2, { children: "No addons loaded." }) }) : panelEntries.map(([id, p]) => jsx10(View5, { style: id === activeAddonId ? void 0 : hiddenStyle, children: jsx10(PanelRenderer, { panel: p }) }, id)) : jsx10(View5, { style: centeredStyle, children: jsx10(Text2, { children: "No Story Selected" }) }) })
|
|
1295
1034
|
] });
|
|
1296
|
-
}, PanelRenderer = ({ panel }) => panel.render({ active: !0 }), Tab = ({ active, onPress, text }) => {
|
|
1297
|
-
let testID = `addon-tab-${
|
|
1298
|
-
return
|
|
1035
|
+
}, PanelRenderer = ({ panel }) => panel.render({ active: !0 }), Tab = ({ active, onPress, text: text2 }) => {
|
|
1036
|
+
let testID = `addon-tab-${text2.toLowerCase().replace(/[^a-z0-9]+/g, "-")}`;
|
|
1037
|
+
return jsx10(
|
|
1299
1038
|
TabButton,
|
|
1300
1039
|
{
|
|
1301
1040
|
active,
|
|
@@ -1304,8 +1043,8 @@ var addonsTabsContainerStyle = {
|
|
|
1304
1043
|
accessible: !0,
|
|
1305
1044
|
accessibilityRole: "tab",
|
|
1306
1045
|
accessibilityState: { selected: active },
|
|
1307
|
-
accessibilityLabel:
|
|
1308
|
-
children:
|
|
1046
|
+
accessibilityLabel: text2,
|
|
1047
|
+
children: jsx10(TabText, { active, children: text2 })
|
|
1309
1048
|
}
|
|
1310
1049
|
);
|
|
1311
1050
|
}, TabButton = styled8.TouchableOpacity(({ theme, active }) => ({
|
|
@@ -1324,47 +1063,22 @@ var addonsTabsContainerStyle = {
|
|
|
1324
1063
|
}));
|
|
1325
1064
|
|
|
1326
1065
|
// src/react-native-ui/MobileMenuDrawer.tsx
|
|
1327
|
-
import BottomSheet
|
|
1328
|
-
|
|
1329
|
-
BottomSheetScrollView
|
|
1330
|
-
} from "@gorhom/bottom-sheet";
|
|
1331
|
-
import { useTheme as useTheme8 } from "@aussieljk/forkbook/internal/react-native-theming";
|
|
1066
|
+
import BottomSheet from "@expo/ui/community/bottom-sheet";
|
|
1067
|
+
import { useTheme as useTheme4 } from "@aussieljk/forkbook/internal/react-native-theming";
|
|
1332
1068
|
import {
|
|
1333
1069
|
forwardRef as forwardRef3,
|
|
1334
1070
|
memo,
|
|
1335
1071
|
useCallback as useCallback6,
|
|
1336
1072
|
useImperativeHandle as useImperativeHandle2,
|
|
1337
|
-
useMemo as
|
|
1073
|
+
useMemo as useMemo7,
|
|
1338
1074
|
useRef as useRef6
|
|
1339
1075
|
} from "react";
|
|
1340
|
-
import { Keyboard,
|
|
1341
|
-
import { useAnimatedStyle as useAnimatedStyle2, useReducedMotion as useReducedMotion2 } from "react-native-reanimated";
|
|
1076
|
+
import { Keyboard, ScrollView as ScrollView2 } from "react-native";
|
|
1342
1077
|
import { useSafeAreaInsets as useSafeAreaInsets2 } from "react-native-safe-area-context";
|
|
1343
|
-
import { jsx as
|
|
1344
|
-
var
|
|
1345
|
-
let androidTouchEventFix = useAnimatedStyle2(() => Platform3.OS === "android" ? {
|
|
1346
|
-
zIndex: backdropComponentProps.animatedIndex.value >= 0 ? 0 : -1
|
|
1347
|
-
} : {});
|
|
1348
|
-
return jsx22(
|
|
1349
|
-
BottomSheetBackdrop,
|
|
1350
|
-
{
|
|
1351
|
-
...backdropComponentProps,
|
|
1352
|
-
appearsOnIndex: 0,
|
|
1353
|
-
disappearsOnIndex: -1,
|
|
1354
|
-
pressBehavior: "close",
|
|
1355
|
-
style: [
|
|
1356
|
-
backdropComponentProps.style,
|
|
1357
|
-
androidTouchEventFix,
|
|
1358
|
-
{
|
|
1359
|
-
backgroundColor: "rgba(0,0,0,0.5)",
|
|
1360
|
-
paddingTop: Platform3.OS === "android" ? 1 : void 0
|
|
1361
|
-
}
|
|
1362
|
-
]
|
|
1363
|
-
}
|
|
1364
|
-
);
|
|
1365
|
-
}, snapPoints = ["50%", "75%"], MobileMenuDrawer = memo(
|
|
1078
|
+
import { jsx as jsx11 } from "react/jsx-runtime";
|
|
1079
|
+
var snapPoints2 = ["50%", "75%"], MobileMenuDrawer = memo(
|
|
1366
1080
|
forwardRef3(({ children }, ref) => {
|
|
1367
|
-
let
|
|
1081
|
+
let insets = useSafeAreaInsets2(), theme = useTheme4(), menuBottomSheetRef = useRef6(null), { scrollToSelectedNode, scrollRef } = useSelectedNode(), shouldScrollOnOpen = useRef6(!1), handleSheetChange = useCallback6(
|
|
1368
1082
|
(index) => {
|
|
1369
1083
|
index >= 0 && shouldScrollOnOpen.current && (shouldScrollOnOpen.current = !1, scrollToSelectedNode());
|
|
1370
1084
|
},
|
|
@@ -1375,26 +1089,18 @@ var BottomSheetBackdropComponent = (backdropComponentProps) => {
|
|
|
1375
1089
|
open ? (shouldScrollOnOpen.current = !0, menuBottomSheetRef.current?.snapToIndex(1)) : (Keyboard.dismiss(), menuBottomSheetRef.current?.close());
|
|
1376
1090
|
}
|
|
1377
1091
|
}));
|
|
1378
|
-
let bgColorStyle =
|
|
1379
|
-
return
|
|
1092
|
+
let bgColorStyle = useMemo7(() => ({ backgroundColor: theme.background.content }), [theme.background.content]), contentContainerStyle = useMemo7(() => ({ paddingBottom: insets.bottom }), [insets.bottom]);
|
|
1093
|
+
return jsx11(
|
|
1380
1094
|
BottomSheet,
|
|
1381
1095
|
{
|
|
1382
1096
|
ref: menuBottomSheetRef,
|
|
1383
1097
|
index: -1,
|
|
1384
|
-
|
|
1385
|
-
snapPoints,
|
|
1386
|
-
enableHandlePanningGesture: !0,
|
|
1387
|
-
enableContentPanningGesture: !0,
|
|
1388
|
-
enableDynamicSizing: !1,
|
|
1389
|
-
keyboardBehavior: "extend",
|
|
1390
|
-
keyboardBlurBehavior: "restore",
|
|
1098
|
+
snapPoints: snapPoints2,
|
|
1391
1099
|
enablePanDownToClose: !0,
|
|
1392
|
-
backdropComponent: BottomSheetBackdropComponent,
|
|
1393
1100
|
backgroundStyle: bgColorStyle,
|
|
1394
|
-
handleIndicatorStyle,
|
|
1395
1101
|
onChange: handleSheetChange,
|
|
1396
|
-
children:
|
|
1397
|
-
|
|
1102
|
+
children: jsx11(
|
|
1103
|
+
ScrollView2,
|
|
1398
1104
|
{
|
|
1399
1105
|
ref: scrollRef,
|
|
1400
1106
|
keyboardShouldPersistTaps: "handled",
|
|
@@ -1408,144 +1114,21 @@ var BottomSheetBackdropComponent = (backdropComponentProps) => {
|
|
|
1408
1114
|
);
|
|
1409
1115
|
|
|
1410
1116
|
// src/react-native-ui/StorybookLogo.tsx
|
|
1411
|
-
import { isValidElement, useEffect as useEffect2, useMemo as
|
|
1117
|
+
import { isValidElement, useEffect as useEffect2, useMemo as useMemo8 } from "react";
|
|
1412
1118
|
import { Image, Linking, Text as Text3, TouchableOpacity } from "react-native";
|
|
1413
|
-
|
|
1414
|
-
|
|
1415
|
-
|
|
1416
|
-
|
|
1417
|
-
|
|
1418
|
-
|
|
1419
|
-
|
|
1420
|
-
|
|
1421
|
-
|
|
1422
|
-
|
|
1423
|
-
|
|
1424
|
-
|
|
1425
|
-
|
|
1426
|
-
),
|
|
1427
|
-
jsx23(
|
|
1428
|
-
Path14,
|
|
1429
|
-
{
|
|
1430
|
-
id: "c",
|
|
1431
|
-
d: "M1.848 54.92L.002 5.723A2.997 2.997 0 012.81 2.621L44.654.006a2.997 2.997 0 013.183 2.99v53.607a2.997 2.997 0 01-3.13 2.994l-40-1.796a2.997 2.997 0 01-2.86-2.882z"
|
|
1432
|
-
}
|
|
1433
|
-
)
|
|
1434
|
-
] }),
|
|
1435
|
-
jsxs9(G, { fill: "none", fillRule: "evenodd", children: [
|
|
1436
|
-
jsx23(
|
|
1437
|
-
Path14,
|
|
1438
|
-
{
|
|
1439
|
-
fill: "#FFF",
|
|
1440
|
-
fillRule: "nonzero",
|
|
1441
|
-
d: "M80.387 47.178c-2.543 0-4.99-.342-7.343-1.025-2.352-.684-4.307-1.63-5.864-2.837l2.384-5.293c3.242 2.257 6.882 3.386 10.919 3.386 2.097 0 3.71-.342 4.84-1.026 1.128-.683 1.692-1.629 1.692-2.836 0-1.081-.517-1.924-1.55-2.528-1.033-.603-2.869-1.192-5.507-1.764-2.956-.604-5.316-1.335-7.08-2.193-1.765-.858-3.052-1.915-3.862-3.17-.811-1.256-1.216-2.806-1.216-4.65 0-2.034.564-3.846 1.692-5.435 1.129-1.59 2.71-2.837 4.744-3.743 2.035-.906 4.387-1.359 7.057-1.359 2.384 0 4.68.35 6.89 1.05 2.21.699 3.965 1.636 5.269 2.812l-2.384 5.293c-3.084-2.257-6.326-3.385-9.727-3.385-1.94 0-3.465.373-4.577 1.12-1.113.747-1.67 1.772-1.67 3.075 0 .763.215 1.391.644 1.884.43.492 1.145.93 2.146 1.31 1.001.382 2.424.78 4.267 1.193 4.323.954 7.43 2.177 9.322 3.671 1.891 1.494 2.837 3.56 2.837 6.199 0 3.178-1.224 5.682-3.672 7.51-2.447 1.827-5.864 2.74-10.25 2.74zm31.183-5.34c.731 0 1.494-.048 2.289-.143l-.382 5.244c-.922.128-1.844.191-2.765.191-3.56 0-6.159-.779-7.796-2.336-1.637-1.558-2.456-3.926-2.456-7.104v-8.964h-4.434v-5.388h4.434v-6.866h7.2v6.866h5.865v5.388h-5.865v8.916c0 2.797 1.303 4.196 3.91 4.196zm16.736 5.292c-2.48 0-4.657-.5-6.533-1.502-1.875-1.001-3.321-2.416-4.338-4.243-1.018-1.828-1.526-3.982-1.526-6.46 0-2.48.508-4.634 1.526-6.462 1.017-1.827 2.463-3.234 4.338-4.22 1.876-.985 4.053-1.477 6.533-1.477 2.479 0 4.656.492 6.532 1.478 1.875.985 3.321 2.392 4.339 4.22 1.017 1.827 1.525 3.98 1.525 6.46s-.508 4.633-1.525 6.46c-1.018 1.828-2.464 3.243-4.34 4.244-1.875 1.002-4.052 1.502-6.531 1.502zm0-5.483c3.496 0 5.244-2.24 5.244-6.723 0-2.257-.453-3.941-1.358-5.054-.906-1.113-2.202-1.669-3.886-1.669-3.497 0-5.245 2.241-5.245 6.723 0 4.482 1.748 6.723 5.245 6.723zm32.327-12.969l-4.053.43c-2.003.19-3.417.754-4.244 1.692-.826.938-1.24 2.185-1.24 3.743v12.206h-7.199V23.338h6.914v3.957c1.176-2.702 3.607-4.18 7.295-4.434l2.098-.143.429 5.96zm20.92-5.292h7.056L174.496 55.33H167.2l4.481-9.87-9.63-22.075h7.485l5.912 14.876 6.103-14.876zm23.744-.62c2.034 0 3.83.492 5.388 1.478 1.557.985 2.773 2.392 3.647 4.22.874 1.827 1.311 3.949 1.311 6.365 0 2.416-.437 4.553-1.31 6.413-.875 1.86-2.099 3.306-3.672 4.339-1.574 1.033-3.362 1.55-5.364 1.55-1.621 0-3.083-.343-4.387-1.026-1.303-.683-2.304-1.629-3.004-2.837v3.48h-7.104V13.135h7.2v13.35c.7-1.175 1.692-2.09 2.98-2.74 1.287-.652 2.726-.978 4.315-.978zm-2.098 18.881c1.685 0 2.988-.596 3.91-1.788.922-1.192 1.382-2.869 1.382-5.03 0-2.13-.46-3.759-1.382-4.887-.922-1.129-2.225-1.693-3.91-1.693s-2.988.58-3.91 1.74c-.922 1.16-1.383 2.805-1.383 4.935 0 2.162.461 3.822 1.383 4.983.922 1.16 2.225 1.74 3.91 1.74zm28.083 5.483c-2.479 0-4.656-.5-6.532-1.502-1.875-1.001-3.321-2.416-4.339-4.243-1.017-1.828-1.525-3.982-1.525-6.46 0-2.48.508-4.634 1.525-6.462 1.018-1.827 2.464-3.234 4.34-4.22 1.875-.985 4.052-1.477 6.531-1.477 2.48 0 4.657.492 6.533 1.478 1.875.985 3.321 2.392 4.339 4.22 1.017 1.827 1.525 3.98 1.525 6.46s-.508 4.633-1.525 6.46c-1.018 1.828-2.464 3.243-4.34 4.244-1.875 1.002-4.052 1.502-6.532 1.502zm0-5.483c3.497 0 5.245-2.24 5.245-6.723 0-2.257-.453-3.941-1.359-5.054-.906-1.113-2.2-1.669-3.886-1.669-3.496 0-5.244 2.241-5.244 6.723 0 4.482 1.748 6.723 5.244 6.723zm26.844 5.483c-2.48 0-4.656-.5-6.532-1.502-1.875-1.001-3.322-2.416-4.339-4.243-1.017-1.828-1.525-3.982-1.525-6.46 0-2.48.508-4.634 1.525-6.462 1.017-1.827 2.464-3.234 4.34-4.22 1.875-.985 4.052-1.477 6.531-1.477 2.48 0 4.657.492 6.532 1.478 1.876.985 3.322 2.392 4.34 4.22 1.017 1.827 1.525 3.98 1.525 6.46s-.508 4.633-1.526 6.46c-1.017 1.828-2.463 3.243-4.339 4.244-1.875 1.002-4.052 1.502-6.532 1.502zm0-5.483c3.497 0 5.245-2.24 5.245-6.723 0-2.257-.453-3.941-1.359-5.054-.906-1.113-2.201-1.669-3.886-1.669-3.496 0-5.244 2.241-5.244 6.723 0 4.482 1.748 6.723 5.244 6.723zM299 46.749h-8.82l-8.965-10.442v10.442h-7.2V13.134h7.2v20.217l8.63-9.965h8.583l-9.822 11.157L299 46.749z"
|
|
1442
|
-
}
|
|
1443
|
-
),
|
|
1444
|
-
jsx23(
|
|
1445
|
-
Path14,
|
|
1446
|
-
{
|
|
1447
|
-
d: "M48.831 2.81c.004.062.006.124.006.187v53.606a2.997 2.997 0 01-3.13 2.994l-40-1.796a2.997 2.997 0 01-2.86-2.882L1.002 5.724A2.997 2.997 0 013.81 2.621L36.609.57l-.285 6.756a.447.447 0 00.05.223l.04.066c.15.196.43.235.627.085l2.623-1.99 2.217 1.746a.447.447 0 00.723-.367L42.356.211l3.298-.205A2.997 2.997 0 0148.83 2.81z",
|
|
1448
|
-
fill: "#FF4785",
|
|
1449
|
-
fillRule: "nonzero"
|
|
1450
|
-
}
|
|
1451
|
-
),
|
|
1452
|
-
jsxs9(G, { transform: "translate(1)", children: [
|
|
1453
|
-
jsx23(Mask, { id: "b", fill: "#fff", children: jsx23(Use, { xlinkHref: "#a" }) }),
|
|
1454
|
-
jsx23(
|
|
1455
|
-
Path14,
|
|
1456
|
-
{
|
|
1457
|
-
fill: "#FFF",
|
|
1458
|
-
fillRule: "nonzero",
|
|
1459
|
-
d: "M35.324 7.326L35.61.569l5.746-.36.248 6.88a.447.447 0 01-.723.367L38.664 5.71 36.041 7.7a.447.447 0 01-.717-.374z",
|
|
1460
|
-
mask: "url(#b)"
|
|
1461
|
-
}
|
|
1462
|
-
)
|
|
1463
|
-
] }),
|
|
1464
|
-
jsxs9(G, { transform: "translate(1)", children: [
|
|
1465
|
-
jsx23(Mask, { id: "d", fill: "#fff", children: jsx23(Use, { xlinkHref: "#c" }) }),
|
|
1466
|
-
jsx23(
|
|
1467
|
-
Path14,
|
|
1468
|
-
{
|
|
1469
|
-
fill: "#FFF",
|
|
1470
|
-
fillRule: "nonzero",
|
|
1471
|
-
d: "M27.975 22.464c0 1.166 7.853.607 8.907-.212 0-7.939-4.26-12.11-12.06-12.11-7.801 0-12.172 4.236-12.172 10.591 0 11.069 14.938 11.28 14.938 17.318 0 1.695-.83 2.7-2.656 2.7-2.379 0-3.32-1.214-3.209-5.345 0-.896-9.073-1.175-9.35 0-.704 10.01 5.533 12.898 12.67 12.898 6.915 0 12.337-3.686 12.337-10.36 0-11.862-15.159-11.544-15.159-17.423 0-2.383 1.77-2.7 2.822-2.7 1.106 0 3.098.194 2.932 4.643z",
|
|
1472
|
-
mask: "url(#d)"
|
|
1473
|
-
}
|
|
1474
|
-
)
|
|
1475
|
-
] })
|
|
1476
|
-
] })
|
|
1477
|
-
] });
|
|
1478
|
-
}
|
|
1479
|
-
|
|
1480
|
-
// src/react-native-ui/icon/Logo.tsx
|
|
1481
|
-
import Svg14, { Defs as Defs2, G as G2, Mask as Mask2, Path as Path15, Use as Use2 } from "react-native-svg";
|
|
1482
|
-
import { jsx as jsx24, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
1483
|
-
function Logo({ width = 300, height = 60, ...props }) {
|
|
1484
|
-
return jsxs10(Svg14, { width, height, viewBox: "0 0 300 60", ...props, children: [
|
|
1485
|
-
jsxs10(Defs2, { children: [
|
|
1486
|
-
jsx24(
|
|
1487
|
-
Path15,
|
|
1488
|
-
{
|
|
1489
|
-
id: "a",
|
|
1490
|
-
d: "M1.848 54.92L.002 5.723A2.997 2.997 0 012.81 2.621L44.654.006a2.997 2.997 0 013.183 2.99v53.607a2.997 2.997 0 01-3.13 2.994l-40-1.796a2.997 2.997 0 01-2.86-2.882z"
|
|
1491
|
-
}
|
|
1492
|
-
),
|
|
1493
|
-
jsx24(
|
|
1494
|
-
Path15,
|
|
1495
|
-
{
|
|
1496
|
-
id: "c",
|
|
1497
|
-
d: "M1.848 54.92L.002 5.723A2.997 2.997 0 012.81 2.621L44.654.006a2.997 2.997 0 013.183 2.99v53.607a2.997 2.997 0 01-3.13 2.994l-40-1.796a2.997 2.997 0 01-2.86-2.882z"
|
|
1498
|
-
}
|
|
1499
|
-
)
|
|
1500
|
-
] }),
|
|
1501
|
-
jsxs10(G2, { fill: "none", fillRule: "evenodd", children: [
|
|
1502
|
-
jsx24(
|
|
1503
|
-
Path15,
|
|
1504
|
-
{
|
|
1505
|
-
fill: "#333",
|
|
1506
|
-
fillRule: "nonzero",
|
|
1507
|
-
d: "M80.387 47.178c-2.543 0-4.99-.342-7.343-1.025-2.352-.684-4.307-1.63-5.864-2.837l2.384-5.293c3.242 2.257 6.882 3.386 10.919 3.386 2.097 0 3.71-.342 4.84-1.026 1.128-.683 1.692-1.629 1.692-2.836 0-1.081-.517-1.924-1.55-2.528-1.033-.603-2.869-1.192-5.507-1.764-2.956-.604-5.316-1.335-7.08-2.193-1.765-.858-3.052-1.915-3.862-3.17-.811-1.256-1.216-2.806-1.216-4.65 0-2.034.564-3.846 1.692-5.435 1.129-1.59 2.71-2.837 4.744-3.743 2.035-.906 4.387-1.359 7.057-1.359 2.384 0 4.68.35 6.89 1.05 2.21.699 3.965 1.636 5.269 2.812l-2.384 5.293c-3.084-2.257-6.326-3.385-9.727-3.385-1.94 0-3.465.373-4.577 1.12-1.113.747-1.67 1.772-1.67 3.075 0 .763.215 1.391.644 1.884.43.492 1.145.93 2.146 1.31 1.001.382 2.424.78 4.267 1.193 4.323.954 7.43 2.177 9.322 3.671 1.891 1.494 2.837 3.56 2.837 6.199 0 3.178-1.224 5.682-3.672 7.51-2.447 1.827-5.864 2.74-10.25 2.74zm31.183-5.34c.731 0 1.494-.048 2.289-.143l-.382 5.244c-.922.128-1.844.191-2.765.191-3.56 0-6.159-.779-7.796-2.336-1.637-1.558-2.456-3.926-2.456-7.104v-8.964h-4.434v-5.388h4.434v-6.866h7.2v6.866h5.865v5.388h-5.865v8.916c0 2.797 1.303 4.196 3.91 4.196zm16.736 5.292c-2.48 0-4.657-.5-6.533-1.502-1.875-1.001-3.321-2.416-4.338-4.243-1.018-1.828-1.526-3.982-1.526-6.46 0-2.48.508-4.634 1.526-6.462 1.017-1.827 2.463-3.234 4.338-4.22 1.876-.985 4.053-1.477 6.533-1.477 2.479 0 4.656.492 6.532 1.478 1.875.985 3.321 2.392 4.339 4.22 1.017 1.827 1.525 3.98 1.525 6.46s-.508 4.633-1.525 6.46c-1.018 1.828-2.464 3.243-4.34 4.244-1.875 1.002-4.052 1.502-6.531 1.502zm0-5.483c3.496 0 5.244-2.24 5.244-6.723 0-2.257-.453-3.941-1.358-5.054-.906-1.113-2.202-1.669-3.886-1.669-3.497 0-5.245 2.241-5.245 6.723 0 4.482 1.748 6.723 5.245 6.723zm32.327-12.969l-4.053.43c-2.003.19-3.417.754-4.244 1.692-.826.938-1.24 2.185-1.24 3.743v12.206h-7.199V23.338h6.914v3.957c1.176-2.702 3.607-4.18 7.295-4.434l2.098-.143.429 5.96zm20.92-5.292h7.056L174.496 55.33H167.2l4.481-9.87-9.63-22.075h7.485l5.912 14.876 6.103-14.876zm23.744-.62c2.034 0 3.83.492 5.388 1.478 1.557.985 2.773 2.392 3.647 4.22.874 1.827 1.311 3.949 1.311 6.365 0 2.416-.437 4.553-1.31 6.413-.875 1.86-2.099 3.306-3.672 4.339-1.574 1.033-3.362 1.55-5.364 1.55-1.621 0-3.083-.343-4.387-1.026-1.303-.683-2.304-1.629-3.004-2.837v3.48h-7.104V13.135h7.2v13.35c.7-1.175 1.692-2.09 2.98-2.74 1.287-.652 2.726-.978 4.315-.978zm-2.098 18.881c1.685 0 2.988-.596 3.91-1.788.922-1.192 1.382-2.869 1.382-5.03 0-2.13-.46-3.759-1.382-4.887-.922-1.129-2.225-1.693-3.91-1.693s-2.988.58-3.91 1.74c-.922 1.16-1.383 2.805-1.383 4.935 0 2.162.461 3.822 1.383 4.983.922 1.16 2.225 1.74 3.91 1.74zm28.083 5.483c-2.479 0-4.656-.5-6.532-1.502-1.875-1.001-3.321-2.416-4.339-4.243-1.017-1.828-1.525-3.982-1.525-6.46 0-2.48.508-4.634 1.525-6.462 1.018-1.827 2.464-3.234 4.34-4.22 1.875-.985 4.052-1.477 6.531-1.477 2.48 0 4.657.492 6.533 1.478 1.875.985 3.321 2.392 4.339 4.22 1.017 1.827 1.525 3.98 1.525 6.46s-.508 4.633-1.525 6.46c-1.018 1.828-2.464 3.243-4.34 4.244-1.875 1.002-4.052 1.502-6.532 1.502zm0-5.483c3.497 0 5.245-2.24 5.245-6.723 0-2.257-.453-3.941-1.359-5.054-.906-1.113-2.2-1.669-3.886-1.669-3.496 0-5.244 2.241-5.244 6.723 0 4.482 1.748 6.723 5.244 6.723zm26.844 5.483c-2.48 0-4.656-.5-6.532-1.502-1.875-1.001-3.322-2.416-4.339-4.243-1.017-1.828-1.525-3.982-1.525-6.46 0-2.48.508-4.634 1.525-6.462 1.017-1.827 2.464-3.234 4.34-4.22 1.875-.985 4.052-1.477 6.531-1.477 2.48 0 4.657.492 6.532 1.478 1.876.985 3.322 2.392 4.34 4.22 1.017 1.827 1.525 3.98 1.525 6.46s-.508 4.633-1.526 6.46c-1.017 1.828-2.463 3.243-4.339 4.244-1.875 1.002-4.052 1.502-6.532 1.502zm0-5.483c3.497 0 5.245-2.24 5.245-6.723 0-2.257-.453-3.941-1.359-5.054-.906-1.113-2.201-1.669-3.886-1.669-3.496 0-5.244 2.241-5.244 6.723 0 4.482 1.748 6.723 5.244 6.723zM299 46.749h-8.82l-8.965-10.442v10.442h-7.2V13.134h7.2v20.217l8.63-9.965h8.583l-9.822 11.157L299 46.749z"
|
|
1508
|
-
}
|
|
1509
|
-
),
|
|
1510
|
-
jsx24(
|
|
1511
|
-
Path15,
|
|
1512
|
-
{
|
|
1513
|
-
d: "M48.831 2.81c.004.062.006.124.006.187v53.606a2.997 2.997 0 01-3.13 2.994l-40-1.796a2.997 2.997 0 01-2.86-2.882L1.002 5.724A2.997 2.997 0 013.81 2.621L36.609.57l-.285 6.756a.447.447 0 00.05.223l.04.066c.15.196.43.235.627.085l2.623-1.99 2.217 1.746a.447.447 0 00.723-.367L42.356.211l3.298-.205A2.997 2.997 0 0148.83 2.81z",
|
|
1514
|
-
fill: "#FF4785",
|
|
1515
|
-
fillRule: "nonzero"
|
|
1516
|
-
}
|
|
1517
|
-
),
|
|
1518
|
-
jsxs10(G2, { transform: "translate(1)", children: [
|
|
1519
|
-
jsx24(Mask2, { id: "b", fill: "#fff", children: jsx24(Use2, { xlinkHref: "#a" }) }),
|
|
1520
|
-
jsx24(
|
|
1521
|
-
Path15,
|
|
1522
|
-
{
|
|
1523
|
-
fill: "#FFF",
|
|
1524
|
-
fillRule: "nonzero",
|
|
1525
|
-
d: "M35.324 7.326L35.61.569l5.746-.36.248 6.88a.447.447 0 01-.723.367L38.664 5.71 36.041 7.7a.447.447 0 01-.717-.374z",
|
|
1526
|
-
mask: "url(#b)"
|
|
1527
|
-
}
|
|
1528
|
-
)
|
|
1529
|
-
] }),
|
|
1530
|
-
jsxs10(G2, { transform: "translate(1)", children: [
|
|
1531
|
-
jsx24(Mask2, { id: "d", fill: "#fff", children: jsx24(Use2, { xlinkHref: "#c" }) }),
|
|
1532
|
-
jsx24(
|
|
1533
|
-
Path15,
|
|
1534
|
-
{
|
|
1535
|
-
fill: "#FFF",
|
|
1536
|
-
fillRule: "nonzero",
|
|
1537
|
-
d: "M27.975 22.464c0 1.166 7.853.607 8.907-.212 0-7.939-4.26-12.11-12.06-12.11-7.801 0-12.172 4.236-12.172 10.591 0 11.069 14.938 11.28 14.938 17.318 0 1.695-.83 2.7-2.656 2.7-2.379 0-3.32-1.214-3.209-5.345 0-.896-9.073-1.175-9.35 0-.704 10.01 5.533 12.898 12.67 12.898 6.915 0 12.337-3.686 12.337-10.36 0-11.862-15.159-11.544-15.159-17.423 0-2.383 1.77-2.7 2.822-2.7 1.106 0 3.098.194 2.932 4.643z",
|
|
1538
|
-
mask: "url(#d)"
|
|
1539
|
-
}
|
|
1540
|
-
)
|
|
1541
|
-
] })
|
|
1542
|
-
] })
|
|
1543
|
-
] });
|
|
1544
|
-
}
|
|
1545
|
-
|
|
1546
|
-
// src/react-native-ui/StorybookLogo.tsx
|
|
1547
|
-
import { jsx as jsx25 } from "react/jsx-runtime";
|
|
1548
|
-
var WIDTH = 125, HEIGHT = 25, NoBrandLogo = ({ theme }) => theme.base === "light" ? jsx25(Logo, { height: HEIGHT, width: WIDTH }) : jsx25(DarkLogo, { height: HEIGHT, width: WIDTH });
|
|
1119
|
+
import { jsx as jsx12 } from "react/jsx-runtime";
|
|
1120
|
+
var WIDTH = 125, HEIGHT = 25, NoBrandLogo = ({ theme }) => jsx12(
|
|
1121
|
+
Text3,
|
|
1122
|
+
{
|
|
1123
|
+
style: {
|
|
1124
|
+
height: HEIGHT,
|
|
1125
|
+
color: theme.color.defaultText,
|
|
1126
|
+
fontSize: theme.typography.size.m1,
|
|
1127
|
+
fontWeight: "bold"
|
|
1128
|
+
},
|
|
1129
|
+
children: "Forkbook"
|
|
1130
|
+
}
|
|
1131
|
+
);
|
|
1549
1132
|
function isElement(value) {
|
|
1550
1133
|
return isValidElement(value);
|
|
1551
1134
|
}
|
|
@@ -1560,7 +1143,7 @@ For example: brand: { image: { uri: 'https://sb.com/img.png', height: 25, width
|
|
|
1560
1143
|
return null;
|
|
1561
1144
|
if (isElement(brand.image))
|
|
1562
1145
|
return brand.image;
|
|
1563
|
-
let image =
|
|
1146
|
+
let image = jsx12(
|
|
1564
1147
|
Image,
|
|
1565
1148
|
{
|
|
1566
1149
|
source: brand.image,
|
|
@@ -1568,7 +1151,7 @@ For example: brand: { image: { uri: 'https://sb.com/img.png', height: 25, width
|
|
|
1568
1151
|
style: imageHasNoWidthOrHeight ? { width: WIDTH, height: HEIGHT } : void 0
|
|
1569
1152
|
}
|
|
1570
1153
|
);
|
|
1571
|
-
return brand.url ?
|
|
1154
|
+
return brand.url ? jsx12(
|
|
1572
1155
|
TouchableOpacity,
|
|
1573
1156
|
{
|
|
1574
1157
|
onPress: () => {
|
|
@@ -1578,13 +1161,13 @@ For example: brand: { image: { uri: 'https://sb.com/img.png', height: 25, width
|
|
|
1578
1161
|
}
|
|
1579
1162
|
) : image;
|
|
1580
1163
|
}, BrandTitle = ({ theme }) => {
|
|
1581
|
-
let brandTitleStyle =
|
|
1164
|
+
let brandTitleStyle = useMemo8(() => ({
|
|
1582
1165
|
width: WIDTH,
|
|
1583
1166
|
height: HEIGHT,
|
|
1584
1167
|
color: theme.color.defaultText,
|
|
1585
1168
|
fontSize: theme.typography.size.m1
|
|
1586
|
-
}), [theme]), title =
|
|
1587
|
-
return theme.brand?.url ?
|
|
1169
|
+
}), [theme]), title = jsx12(Text3, { style: brandTitleStyle, numberOfLines: 1, ellipsizeMode: "tail", children: theme.brand?.title });
|
|
1170
|
+
return theme.brand?.url ? jsx12(
|
|
1588
1171
|
TouchableOpacity,
|
|
1589
1172
|
{
|
|
1590
1173
|
onPress: () => {
|
|
@@ -1594,12 +1177,12 @@ For example: brand: { image: { uri: 'https://sb.com/img.png', height: 25, width
|
|
|
1594
1177
|
}
|
|
1595
1178
|
) : title;
|
|
1596
1179
|
}, StorybookLogo = ({ theme }) => {
|
|
1597
|
-
let image =
|
|
1598
|
-
return image ?
|
|
1180
|
+
let image = useMemo8(() => theme.brand?.image, [theme.brand?.image]), title = useMemo8(() => theme.brand?.title, [theme.brand?.title]);
|
|
1181
|
+
return image ? jsx12(BrandLogo, { theme }) : title ? jsx12(BrandTitle, { theme }) : jsx12(NoBrandLogo, { theme });
|
|
1599
1182
|
};
|
|
1600
1183
|
|
|
1601
1184
|
// src/react-native-ui/Layout.tsx
|
|
1602
|
-
import { jsx as
|
|
1185
|
+
import { jsx as jsx13, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
1603
1186
|
var desktopLogoContainer = {
|
|
1604
1187
|
flexDirection: "row",
|
|
1605
1188
|
alignItems: "center",
|
|
@@ -1619,8 +1202,8 @@ var desktopLogoContainer = {
|
|
|
1619
1202
|
story,
|
|
1620
1203
|
storyBackgroundColor,
|
|
1621
1204
|
children
|
|
1622
|
-
}) =>
|
|
1623
|
-
|
|
1205
|
+
}) => jsx13(ThemeProvider, { theme, children: jsx13(SafeAreaProvider, { children: jsx13(View6, { style: flex1, children: jsx13(StorageProvider, { storage, children: jsxs7(LayoutProvider, { children: [
|
|
1206
|
+
jsx13(
|
|
1624
1207
|
Layout,
|
|
1625
1208
|
{
|
|
1626
1209
|
storyHash,
|
|
@@ -1629,20 +1212,20 @@ var desktopLogoContainer = {
|
|
|
1629
1212
|
children
|
|
1630
1213
|
}
|
|
1631
1214
|
),
|
|
1632
|
-
|
|
1633
|
-
] }) }) }) }) })
|
|
1215
|
+
jsx13(PortalHost, { name: "storybook-lite-ui-root" })
|
|
1216
|
+
] }) }) }) }) }), Layout = ({
|
|
1634
1217
|
storyHash,
|
|
1635
1218
|
story,
|
|
1636
1219
|
storyBackgroundColor,
|
|
1637
1220
|
children
|
|
1638
1221
|
}) => {
|
|
1639
|
-
let theme =
|
|
1222
|
+
let theme = useTheme5(), mobileMenuDrawerRef = useRef7(null), addonPanelRef = useRef7(null), insets = useSafeAreaInsets3(), { isDesktop } = useLayout(), [desktopSidebarOpen, setDesktopSidebarOpen] = useStoreBooleanState(
|
|
1640
1223
|
"desktopSidebarState",
|
|
1641
1224
|
!0
|
|
1642
1225
|
), [desktopAddonsPanelOpen, setDesktopAddonsPanelOpen] = useStoreBooleanState(
|
|
1643
1226
|
"desktopPanelState",
|
|
1644
1227
|
!0
|
|
1645
|
-
), hasEnabledPanels =
|
|
1228
|
+
), hasEnabledPanels = useMemo9(() => {
|
|
1646
1229
|
let allPanels = addons2.getElements(Addon_TypesEnum2.PANEL);
|
|
1647
1230
|
return Object.values(allPanels).some(
|
|
1648
1231
|
(p) => !p.paramKey || !story?.parameters?.[p.paramKey]?.disable
|
|
@@ -1725,18 +1308,18 @@ var desktopLogoContainer = {
|
|
|
1725
1308
|
let newStoryId = selection.storyId;
|
|
1726
1309
|
addons2.getChannel().emit(SET_CURRENT_STORY, { storyId: newStoryId });
|
|
1727
1310
|
}, []);
|
|
1728
|
-
return
|
|
1729
|
-
isDesktop ?
|
|
1730
|
-
|
|
1311
|
+
return jsxs7(View6, { style: containerStyle, children: [
|
|
1312
|
+
isDesktop ? jsx13(View6, { style: desktopSidebarStyle, children: desktopSidebarOpen ? jsxs7(
|
|
1313
|
+
ScrollView3,
|
|
1731
1314
|
{
|
|
1732
1315
|
keyboardShouldPersistTaps: "handled",
|
|
1733
1316
|
contentContainerStyle: desktopScrollViewContentContainerStyle,
|
|
1734
1317
|
children: [
|
|
1735
|
-
|
|
1736
|
-
|
|
1737
|
-
|
|
1318
|
+
jsxs7(View6, { style: desktopLogoContainer, children: [
|
|
1319
|
+
jsx13(StorybookLogo, { theme }),
|
|
1320
|
+
jsx13(IconButton4, { onPress: () => setDesktopSidebarOpen(!1), Icon: MenuIcon })
|
|
1738
1321
|
] }),
|
|
1739
|
-
|
|
1322
|
+
jsx13(
|
|
1740
1323
|
Sidebar,
|
|
1741
1324
|
{
|
|
1742
1325
|
previewInitialized: !0,
|
|
@@ -1751,25 +1334,25 @@ var desktopLogoContainer = {
|
|
|
1751
1334
|
)
|
|
1752
1335
|
]
|
|
1753
1336
|
}
|
|
1754
|
-
) :
|
|
1755
|
-
|
|
1756
|
-
|
|
1757
|
-
story?.parameters?.hideFullScreenButton || isDesktop ? null :
|
|
1337
|
+
) : jsx13(IconButton4, { onPress: () => setDesktopSidebarOpen(!0), Icon: MenuIcon }) }) : null,
|
|
1338
|
+
jsxs7(View6, { style: mobileContentStyle, children: [
|
|
1339
|
+
jsx13(View6, { style: storyContentStyle, children }),
|
|
1340
|
+
story?.parameters?.hideFullScreenButton || isDesktop ? null : jsx13(
|
|
1758
1341
|
TouchableOpacity2,
|
|
1759
1342
|
{
|
|
1760
1343
|
style: fullScreenButtonStyle,
|
|
1761
1344
|
onPress: () => setUiHidden((prev) => !prev),
|
|
1762
|
-
children: uiHidden ?
|
|
1345
|
+
children: uiHidden ? jsx13(CloseFullscreenIcon, { color: theme.color.mediumdark }) : jsx13(FullscreenIcon, { color: theme.color.mediumdark })
|
|
1763
1346
|
}
|
|
1764
1347
|
),
|
|
1765
|
-
isDesktop && hasEnabledPanels ?
|
|
1348
|
+
isDesktop && hasEnabledPanels ? jsx13(View6, { style: desktopAddonsPanelStyle, children: desktopAddonsPanelOpen ? jsx13(
|
|
1766
1349
|
AddonsTabs,
|
|
1767
1350
|
{
|
|
1768
1351
|
storyId: story?.id,
|
|
1769
1352
|
parameters: story?.parameters,
|
|
1770
1353
|
onClose: () => setDesktopAddonsPanelOpen(!1)
|
|
1771
1354
|
}
|
|
1772
|
-
) :
|
|
1355
|
+
) : jsx13(
|
|
1773
1356
|
IconButton4,
|
|
1774
1357
|
{
|
|
1775
1358
|
style: iconFloatRightStyle,
|
|
@@ -1778,8 +1361,8 @@ var desktopLogoContainer = {
|
|
|
1778
1361
|
}
|
|
1779
1362
|
) }) : null
|
|
1780
1363
|
] }),
|
|
1781
|
-
!uiHidden && !isDesktop ?
|
|
1782
|
-
|
|
1364
|
+
!uiHidden && !isDesktop ? jsx13(Container3, { style: menuContainerStyle, children: jsxs7(Nav, { children: [
|
|
1365
|
+
jsxs7(
|
|
1783
1366
|
Button2,
|
|
1784
1367
|
{
|
|
1785
1368
|
testID: "mobile-menu-button",
|
|
@@ -1787,8 +1370,8 @@ var desktopLogoContainer = {
|
|
|
1787
1370
|
hitSlop: navButtonHitSlop,
|
|
1788
1371
|
onPress: openMobileMenu,
|
|
1789
1372
|
children: [
|
|
1790
|
-
|
|
1791
|
-
|
|
1373
|
+
jsx13(MenuIcon, { color: theme.color.mediumdark }),
|
|
1374
|
+
jsxs7(Text4, { style: navButtonTextStyle, numberOfLines: 1, children: [
|
|
1792
1375
|
story?.title,
|
|
1793
1376
|
"/",
|
|
1794
1377
|
story?.name
|
|
@@ -1796,7 +1379,7 @@ var desktopLogoContainer = {
|
|
|
1796
1379
|
]
|
|
1797
1380
|
}
|
|
1798
1381
|
),
|
|
1799
|
-
hasEnabledPanels &&
|
|
1382
|
+
hasEnabledPanels && jsx13(
|
|
1800
1383
|
IconButton4,
|
|
1801
1384
|
{
|
|
1802
1385
|
testID: "mobile-addons-button",
|
|
@@ -1806,9 +1389,9 @@ var desktopLogoContainer = {
|
|
|
1806
1389
|
}
|
|
1807
1390
|
)
|
|
1808
1391
|
] }) }) : null,
|
|
1809
|
-
isDesktop ? null :
|
|
1810
|
-
|
|
1811
|
-
|
|
1392
|
+
isDesktop ? null : jsx13(SelectedNodeProvider, { children: jsxs7(MobileMenuDrawer, { ref: mobileMenuDrawerRef, children: [
|
|
1393
|
+
jsx13(View6, { style: mobileMenuDrawerContentStyle, children: jsx13(StorybookLogo, { theme }) }),
|
|
1394
|
+
jsx13(
|
|
1812
1395
|
Sidebar,
|
|
1813
1396
|
{
|
|
1814
1397
|
previewInitialized: !0,
|
|
@@ -1822,7 +1405,7 @@ var desktopLogoContainer = {
|
|
|
1822
1405
|
}
|
|
1823
1406
|
)
|
|
1824
1407
|
] }) }),
|
|
1825
|
-
!isDesktop && hasEnabledPanels ?
|
|
1408
|
+
!isDesktop && hasEnabledPanels ? jsx13(MobileAddonsPanel, { ref: addonPanelRef, storyId: story?.id, parameters: story?.parameters }) : null
|
|
1826
1409
|
] });
|
|
1827
1410
|
}, Nav = styled9.View({
|
|
1828
1411
|
display: "flex",
|