Skip to content

Commit 4e4519d

Browse files
committed
chore: Update docs and packages
1 parent 62cffd1 commit 4e4519d

File tree

10 files changed

+895
-881
lines changed

10 files changed

+895
-881
lines changed

docs/api/attributes.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ keywords: [react, chat, chatbot, chatbotify]
77

88
# Attributes
99

10-
This page documents all the attributes that may be used in a conversation [**Block**](/docs/introduction/Conversations#block). Take note that [**Attributes**](/docs/introduction/conversations#attributes) are divided into **pre-processing** and **post-processing** as listed in the tables below. For a brief example on the usage of attributes, you may refer to the **sample flow** in the dropdown which uses `message` and `path`.
10+
This page documents all the attributes that may be used in a conversation [**Block**](/docs/concepts/conversations#block). Take note that [**Attributes**](/docs/concepts/conversations#attributes) are divided into **pre-processing** and **post-processing** as listed in the tables below. For a brief example on the usage of attributes, you may refer to the **sample flow** in the dropdown which uses `message` and `path`.
1111

1212
<details>
1313
<summary>Click to view sample flow</summary>

docs/api/params.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ The following table provides details about the parameters available for attribut
1818
| userInput | string | All Attributes | A string representing the user's input in the chat. |
1919
| prevPath | string | All Attributes | A string representing the previous path in the chat (can be null if not found). |
2020
| goToPath | function | All Attributes | A utility function for immediately pathing to another block. |
21-
| injectMessage | async function | All Attributes | A utility function used to inject a message into the chat which takes in 3 properties as represented by the [**Message**](/docs/introduction/conversations#message) type. | |
22-
| streamMessage | async function | All Attributes | A utility function used to stream messages into the chat which takes in 3 properties as represented by the [**Message**](/docs/introduction/conversations#message) type and you may refer to [**this example**](/docs/examples/real_time_stream) for more details. | |
21+
| injectMessage | async function | All Attributes | A utility function used to inject a message into the chat which takes in 3 properties as represented by the [**Message**](/docs/concepts/conversations#message) type. | |
22+
| streamMessage | async function | All Attributes | A utility function used to stream messages into the chat which takes in 3 properties as represented by the [**Message**](/docs/concepts/conversations#message) type and you may refer to [**this example**](/docs/examples/real_time_stream) for more details. | |
2323
| openChat | function | All Attributes | A utility function used to control the visibility of the chat component. It takes one parameter: <ul><li>`isOpen`:</li> A boolean indicating whether the chat should be opened (`true`) or closed (`false`).</ul> |
2424
| files | FileList | Only `file` Attribute | A list of file(s) uploaded by the user.
2525

docs/concepts/conversations.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ For details and usage on each of these parameters, you may consult the [**API do
148148
![RCB Message](./img/rcb-message.png)
149149
</div>
150150

151-
Not to be confused with `message` from the section on [**Attributes**](/docs/introduction/conversations#attributes), the `Message` component here represents the interactions between the user and the bot. Every element in the chatbot body (including custom components) are considered a Message (as **outlined in red** on the image above). Within a message you will find 3 properties:
151+
Not to be confused with `message` from the section on [**Attributes**](/docs/concepts/conversations#attributes), the `Message` component here represents the interactions between the user and the bot. Every element in the chatbot body (including custom components) are considered a Message (as **outlined in red** on the image above). Within a message you will find 3 properties:
152152

153153
- content (required) - a string or JSX.Element representing the content of the message
154154
- sender (required) - string representing message sender (can be `user`, `bot` or `system`)

docs/concepts/themes.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ keywords: [react, chat, chatbot, chatbotify]
77

88
# Themes
99

10-
A newly added feature in **v2** of the chatbot, the [**`themes`**](/docs/api/themes) prop allows users a quick and convenient way to customize their chatbot. Browsing of themes can be done on [**React ChatBotify Gallery**](https://gallery.react-chatbotify.com) or manually via the [**GitHub Themes Repository**](https://github.com/tjtanjin/react-chatbotify-themes/tree/main/themes).
10+
A newly added feature in **v2** of the chatbot, the `themes` prop allows users a quick and convenient way to customize their chatbot. Browsing of themes can be done on [**React ChatBotify Gallery**](https://gallery.react-chatbotify.com) or manually via the [**GitHub Themes Repository**](https://github.com/tjtanjin/react-chatbotify-themes/tree/main/themes).
1111

1212
The `theme` prop can accept a single **Theme** object or a list of it. A Theme object contains the following fields:
1313
- **id**: id of the theme

docs/examples/basic_form.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ keywords: [react, chat, chatbot, chatbotify]
77

88
# Basic Form
99

10-
The following example is a basic recruitment form for a pet store. Note that there are no validations performed for the user input. If you wish to look at an example with validation, you may look at the [**Advanced Form**](/docs/examples/advanced_form).
10+
The following example is a basic recruitment form for a pet store. Note that there are no validations performed for the user input. If you wish to look at an example with validation, you may look at the [**Advanced Form**](/docs/examples/complex_form).
1111

1212
```jsx live noInline title=MyChatBot.js
1313
const MyChatBot = () => {

docs/examples/single_theme.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ keywords: [react, chat, chatbot, chatbotify]
77

88
# Single Theme
99

10-
The following is an example of configuring the chatbot with a single `terminal` theme. You can experiment with various themes available for browsing at [**React ChatBotify Gallery**](https://gallery.react-chatbotify.com).
10+
The following is an example of configuring the chatbot with a single `terminal` theme. For multiple themes, you may look at this [**example**](/docs/examples/multiple_themes). You can experiment with various themes available for browsing at [**React ChatBotify Gallery**](https://gallery.react-chatbotify.com).
1111

1212
```jsx live noInline title=MyChatBot.js
1313
const MyChatBot = () => {

docs/introduction/migration_v2.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -45,21 +45,21 @@ Changes Required:
4545
- Remove all imports of `react-chatbotify.css`
4646

4747
### Renamed BotOptions to Settings
48-
The term **BotOptions** was previously used for the [**`options`**](/legacy/v1/docs/introduction/bot_options) prop, causing confusion with the [**`options attribute`**](/legacy/v1/docs/api/attributes#pre-processing-attributes) in conversation blocks. To minimize the potential for confusion, **BotOptions** is now simply called **Settings**.
48+
The term **BotOptions** was previously used for the [**`options`**](https://react-chatbotify.com/legacy/v1/docs/introduction/bot_options) prop, causing confusion with the [**`options attribute`**](https://react-chatbotify.com/legacy/v1/docs/api/attributes#pre-processing-attributes) in conversation blocks. To minimize the potential for confusion, **BotOptions** is now simply called **Settings**.
4949

5050
Changes Required:
5151
- Replace `BotOptionsContext` with `SettingsContext`
5252
- Replace `Options` (BotOptions) type with `Settings` type
5353
- Replace `getDefaultBotOptions` with `getDefaultSettings`
5454

5555
### Renamed Theme Section to General Section
56-
In version 1, the [**`theme`**](/legacy/v1/docs/api/bot_options#theme) section within `options` (now `settings`) configured generic properties. With the introduction of a `themes` prop in version 2, this section is now called [**`general`**](/docs/api/settings#general) to avoid confusion.
56+
In version 1, the [**`theme`**](https://react-chatbotify.com/legacy/v1/docs/api/bot_options#theme) section within `options` (now `settings`) configured generic properties. With the introduction of a `themes` prop in version 2, this section is now called [**`general`**](/docs/api/settings#general) to avoid confusion.
5757

5858
Changes Required:
5959
- Replace `theme` section with `general` section inside `settings` prop
6060

6161
### Renamed Render Attribute to Component Attribute
62-
The [**`render`**](/legacy/v1/docs/api/attributes#pre-processing-attributes) is understandably poorly named and has been a source of confusion for some users who mistakenly tried using `component` instead. Indeed, the purpose of this attribute was to allow users to provide their own components. With that said, it felt appropriate to update the name of this attribute to [**`component`**](/docs/api/attributes#pre-processing-attributes).
62+
The [**`render`**](https://react-chatbotify.com/legacy/v1/docs/api/attributes#pre-processing-attributes) is understandably poorly named and has been a source of confusion for some users who mistakenly tried using `component` instead. Indeed, the purpose of this attribute was to allow users to provide their own components. With that said, it felt appropriate to update the name of this attribute to [**`component`**](/docs/api/attributes#pre-processing-attributes).
6363

6464
Changes Required:
6565
- Replace `render` attribute with `component` attribute inside all applicable conversation blocks
@@ -115,7 +115,7 @@ New Additions:
115115
Following the removal of `styles` from **BotOptions**, a new [**`styles`**](/docs/concepts/styles) prop has been introduced for tweaking chatbot styles.
116116

117117
New Additions:
118-
- Added [**`styles`**](/docs/concepts/styles) prop (essentially the style sections previously under [**`BotOptions`**](/legacy/v1/docs/api/bot_options#styles))
118+
- Added [**`styles`**](/docs/concepts/styles) prop (essentially the style sections previously under [**`BotOptions`**](https://react-chatbotify.com/legacy/v1/docs/api/bot_options#styles))
119119
- Added `getDefaultStyles` which provides an empty default list of styles
120120

121121
### Custom Buttons in Header, Chat Input, and Footer

docs/introduction/quickstart.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -41,13 +41,13 @@ const MyComponent = () => {
4141

4242
:::info Info
4343

44-
If you are using [**NextJS**](https://nextjs.org/) and running into errors, look [**here**](/docs/introduction/faq#q8-i-am-using-nextjs-and-running-into-referenceerror-window-is-not-defined-errors-how-can-i-fix-this)!
44+
If you are using [**NextJS**](https://nextjs.org/) and running into errors, look [**here**](/docs/faq#q8-i-am-using-nextjs-and-running-into-referenceerror-window-is-not-defined-errors-how-can-i-fix-this)!
4545

4646
:::
4747

4848
## Theming (Optional)
4949

50-
If you are looking for a quick way to customize your chatbot, consider browsing for [**`themes`**](/docs/concepts/themes) on [**React ChatBotify Gallery**](https://gallery.react-chatbotify.com). You may then further refine the themes via [**`settings`**](/docs/concepts/settings) and [**`styles`**](/docs/concepts/styles). An example for this can be found [**here**](/docs/examples/basic_theme).
50+
If you are looking for a quick way to customize your chatbot, consider browsing for [**`themes`**](/docs/concepts/themes) on [**React ChatBotify Gallery**](https://gallery.react-chatbotify.com). You may then further refine the themes via [**`settings`**](/docs/concepts/settings) and [**`styles`**](/docs/concepts/styles). An example for this can be found [**here**](/docs/examples/single_theme).
5151

5252
Alternatively, you may also experiment with the `primaryColor` and `secondaryColor` properties in the `general` section of [**`settings`**](/docs/concepts/settings).
5353

0 commit comments

Comments
 (0)