From 9ee0b0204ff78c03240914ba041f29326d494fdc Mon Sep 17 00:00:00 2001 From: Rohit Agrawal Date: Sun, 17 Dec 2023 11:26:08 -0800 Subject: [PATCH] fix: Fixed type export issue and broken expo snacks in the docs --- docs/docs/components/feedback/Badge.mdx | 2 +- docs/docs/components/feedback/Skeleton.mdx | 2 +- docs/docs/components/feedback/Spinner.mdx | 2 +- docs/docs/components/forms/Button.mdx | 2 +- docs/docs/components/forms/CheckBox.mdx | 2 +- docs/docs/components/forms/Input.mdx | 2 +- docs/docs/components/forms/Pressable.mdx | 2 +- docs/docs/components/forms/Radio.mdx | 2 +- docs/docs/components/forms/Textarea.mdx | 2 +- docs/docs/components/layout/Divider.mdx | 2 +- docs/docs/components/layout/Screen.mdx | 2 +- docs/docs/components/layout/Spacer.mdx | 2 +- docs/docs/components/layout/Stack.mdx | 2 +- docs/docs/components/media/Avatar.mdx | 2 +- docs/docs/components/media/Icon.mdx | 2 +- docs/docs/components/media/Image.mdx | 2 +- docs/docs/components/media/Video.mdx | 2 +- docs/docs/components/typography/Text.mdx | 2 +- .../overview/getting-started/installation.md | 18 ++++++++++++++++++ package.json | 3 ++- src/theme/index.ts | 3 +-- 21 files changed, 39 insertions(+), 21 deletions(-) diff --git a/docs/docs/components/feedback/Badge.mdx b/docs/docs/components/feedback/Badge.mdx index 581c98ed..a1b27ce9 100644 --- a/docs/docs/components/feedback/Badge.mdx +++ b/docs/docs/components/feedback/Badge.mdx @@ -111,7 +111,7 @@ The `Badge` component supports a [variety of style props](#supported-style-props import Snack from "../../../src/components/ExpoSnack"; - + ## Badge Component Properties diff --git a/docs/docs/components/feedback/Skeleton.mdx b/docs/docs/components/feedback/Skeleton.mdx index 11414934..caa5975c 100644 --- a/docs/docs/components/feedback/Skeleton.mdx +++ b/docs/docs/components/feedback/Skeleton.mdx @@ -88,7 +88,7 @@ The `Skeleton` component supports a variety of style props which can be used to import Snack from "../../../src/components/ExpoSnack"; - + ## Skeleton Component Properties diff --git a/docs/docs/components/feedback/Spinner.mdx b/docs/docs/components/feedback/Spinner.mdx index b75b7309..eab5e5f2 100644 --- a/docs/docs/components/feedback/Spinner.mdx +++ b/docs/docs/components/feedback/Spinner.mdx @@ -106,7 +106,7 @@ The `Spinner` component supports a [variety of style props](#supported-style-pro import Snack from "../../../src/components/ExpoSnack"; - + ## Accessibility diff --git a/docs/docs/components/forms/Button.mdx b/docs/docs/components/forms/Button.mdx index 7e2a21c8..256ef8da 100644 --- a/docs/docs/components/forms/Button.mdx +++ b/docs/docs/components/forms/Button.mdx @@ -158,7 +158,7 @@ The `Button` component supports a [variety of style props](#supported-style-prop import Snack from "../../../src/components/ExpoSnack"; - + ## Accessibility diff --git a/docs/docs/components/forms/CheckBox.mdx b/docs/docs/components/forms/CheckBox.mdx index 32452721..5fb95624 100644 --- a/docs/docs/components/forms/CheckBox.mdx +++ b/docs/docs/components/forms/CheckBox.mdx @@ -204,7 +204,7 @@ The `CheckBox` component supports a [variety of style props](#supported-style-pr import Snack from "../../../src/components/ExpoSnack"; - + ## Accessibility diff --git a/docs/docs/components/forms/Input.mdx b/docs/docs/components/forms/Input.mdx index ac75e457..8e2ca22e 100644 --- a/docs/docs/components/forms/Input.mdx +++ b/docs/docs/components/forms/Input.mdx @@ -164,7 +164,7 @@ The `Input` component supports a variety of style props which can be used to ove import Snack from "../../../src/components/ExpoSnack"; - + ## Accessibility diff --git a/docs/docs/components/forms/Pressable.mdx b/docs/docs/components/forms/Pressable.mdx index 2d73bb03..21d77979 100644 --- a/docs/docs/components/forms/Pressable.mdx +++ b/docs/docs/components/forms/Pressable.mdx @@ -77,7 +77,7 @@ The `Pressable` component allows you to customize the appearance of the componen import Snack from "../../../src/components/ExpoSnack"; - + ## Accessibility diff --git a/docs/docs/components/forms/Radio.mdx b/docs/docs/components/forms/Radio.mdx index 980181b3..2c3c5932 100644 --- a/docs/docs/components/forms/Radio.mdx +++ b/docs/docs/components/forms/Radio.mdx @@ -153,7 +153,7 @@ You can override the default styles of the `Radio` component by passing style pr import Snack from "../../../src/components/ExpoSnack"; - + ## Accessibility diff --git a/docs/docs/components/forms/Textarea.mdx b/docs/docs/components/forms/Textarea.mdx index d7403826..085d2f77 100644 --- a/docs/docs/components/forms/Textarea.mdx +++ b/docs/docs/components/forms/Textarea.mdx @@ -128,7 +128,7 @@ The `Textarea` component supports a variety of style props which can be used to import Snack from "../../../src/components/ExpoSnack"; - + ## Accessibility diff --git a/docs/docs/components/layout/Divider.mdx b/docs/docs/components/layout/Divider.mdx index 44417b28..f4e435a8 100644 --- a/docs/docs/components/layout/Divider.mdx +++ b/docs/docs/components/layout/Divider.mdx @@ -67,7 +67,7 @@ The `Divider` component supports a variety of style props which can be used to o import Snack from "../../../src/components/ExpoSnack"; - + ## Component Properties diff --git a/docs/docs/components/layout/Screen.mdx b/docs/docs/components/layout/Screen.mdx index 5766e9d4..19533662 100644 --- a/docs/docs/components/layout/Screen.mdx +++ b/docs/docs/components/layout/Screen.mdx @@ -72,7 +72,7 @@ Here are examples of the `Screen` component in both light and dark themes: import Snack from "../../../src/components/ExpoSnack"; - + ## Component Properties diff --git a/docs/docs/components/layout/Spacer.mdx b/docs/docs/components/layout/Spacer.mdx index 20697751..4c180802 100644 --- a/docs/docs/components/layout/Spacer.mdx +++ b/docs/docs/components/layout/Spacer.mdx @@ -54,7 +54,7 @@ import { Spacer } from "pearl-ui"; import Snack from "../../../src/components/ExpoSnack"; - + ## Component Properties diff --git a/docs/docs/components/layout/Stack.mdx b/docs/docs/components/layout/Stack.mdx index 187bad69..5db7aa14 100644 --- a/docs/docs/components/layout/Stack.mdx +++ b/docs/docs/components/layout/Stack.mdx @@ -131,7 +131,7 @@ Here are some examples of how you can use the `Stack` components in your project import Snack from "../../../src/components/ExpoSnack"; - + ## Stack Component Properties diff --git a/docs/docs/components/media/Avatar.mdx b/docs/docs/components/media/Avatar.mdx index 35e5a463..8fa8c6ca 100644 --- a/docs/docs/components/media/Avatar.mdx +++ b/docs/docs/components/media/Avatar.mdx @@ -180,7 +180,7 @@ The `Avatar` component supports a variety of style props which can be used to ov import Snack from "../../../src/components/ExpoSnack"; - + ## Accessibility diff --git a/docs/docs/components/media/Icon.mdx b/docs/docs/components/media/Icon.mdx index 1e52a806..4b46ca7d 100644 --- a/docs/docs/components/media/Icon.mdx +++ b/docs/docs/components/media/Icon.mdx @@ -70,7 +70,7 @@ The `Icon` component supports a variety of style props which can be used to over import Snack from "../../../src/components/ExpoSnack"; - + ## Accessibility diff --git a/docs/docs/components/media/Image.mdx b/docs/docs/components/media/Image.mdx index 7ce9cf0d..0b53f185 100644 --- a/docs/docs/components/media/Image.mdx +++ b/docs/docs/components/media/Image.mdx @@ -228,7 +228,7 @@ The `Image` component supports a variety of style props that can be used to over import Snack from "../../../src/components/ExpoSnack"; - + ## Accessibility diff --git a/docs/docs/components/media/Video.mdx b/docs/docs/components/media/Video.mdx index 0dd7f6ad..2c2a435d 100644 --- a/docs/docs/components/media/Video.mdx +++ b/docs/docs/components/media/Video.mdx @@ -199,7 +199,7 @@ The `Video` component supports a variety of style props that can be used to over import Snack from "../../../src/components/ExpoSnack"; - + ## Accessibility diff --git a/docs/docs/components/typography/Text.mdx b/docs/docs/components/typography/Text.mdx index 2f7fbc80..4b80c2ce 100644 --- a/docs/docs/components/typography/Text.mdx +++ b/docs/docs/components/typography/Text.mdx @@ -58,7 +58,7 @@ The `Text` component supports a wide range of style props that can be used to ov import Snack from "../../../src/components/ExpoSnack"; - + ## Accessibility diff --git a/docs/docs/overview/getting-started/installation.md b/docs/docs/overview/getting-started/installation.md index 75b146ac..4450e50a 100644 --- a/docs/docs/overview/getting-started/installation.md +++ b/docs/docs/overview/getting-started/installation.md @@ -38,8 +38,26 @@ yarn add pearl-ui +## Add the reanimated plugin in the babel configuration + +To add the reanimated plugin, modify your `babel.config.js` file as follows: + +```jsx +module.exports = function (api) { + api.cache(true); + return { + presets: ["babel-preset-expo"], + plugins: ["react-native-reanimated/plugin"], + }; +}; +``` + ## Setting up Pearl UI +:::info +For optimal performance, we recommend using the **"hermes"** JavaScript engine. You may encounter issues with the "jsc" engine. +::: + To get started with Pearl UI, you need to set up the theme provider and load the required fonts. This guide will walk you through the process. ### Setting up the Theme Provider diff --git a/package.json b/package.json index 1d87f944..9b7d9464 100644 --- a/package.json +++ b/package.json @@ -146,10 +146,11 @@ "dist/**/*.{js,ts}", "package.json", "package-lock.json", + "yarn.lock", "CHANGELOG.md" ], "message": "chore(release): ${nextRelease.version} [skip ci]nn${nextRelease.notes}" } ] } -} +} \ No newline at end of file diff --git a/src/theme/index.ts b/src/theme/index.ts index ee3b0b0b..b899df84 100644 --- a/src/theme/index.ts +++ b/src/theme/index.ts @@ -9,5 +9,4 @@ export { baseTheme, extendTheme } from "./src/base/index"; export { generatePalette } from "./utils/utils"; // Types -export type * from "./src/types"; -export type * from "./src/style-functions"; +export * from "./src/types";