Skip to content

Commit

Permalink
feat: upgrade to docusaurus v3
Browse files Browse the repository at this point in the history
  • Loading branch information
FedeIlLeone committed Nov 14, 2023
1 parent d4207ef commit e464a86
Show file tree
Hide file tree
Showing 51 changed files with 4,637 additions and 3,288 deletions.
2 changes: 1 addition & 1 deletion docs/plugins/devtools.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ diagnostics about the result.
For plaintext patches to work, your patch MUST have a `find`! The extension was not made to parse
patches without them.

```js
```ts
export default [
{
find: "SOMETHING",
Expand Down
4 changes: 2 additions & 2 deletions docs/plugins/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ be changed to the username and repository of your plugin. For example, the plugi
at https://github.com/replugged-org/plugin-template, so the `updater.id` is
`replugged-org/plugin-template`.

:::caution
:::warning

Make sure you update the `updater.id` key to your plugin's repository. If you don't, Replugged will
try to update your plugin to the plugin template. Your users will have to uninstall and reinstall
Expand Down Expand Up @@ -147,7 +147,7 @@ and how to request approval, please see [this page](/docs/store).

You can create a link to install your plugin which will automatically open Replugged and prompt the
user to confirm the installation. For example:
<https://replugged.dev/install?identifier=replugged-org/plugin-template&source=github>.
https://replugged.dev/install?identifier=replugged-org/plugin-template&source=github.

- `identifier` - same as `updater.id` in the manifest
- `source` - same as `updater.source` in the manifest. Currently, `github` and `store` are
Expand Down
6 changes: 3 additions & 3 deletions docs/plugins/injecting.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -169,12 +169,12 @@ The props of this component extend the attributes of the `div` element.
| `channel` | <APIReferences.Channel /> | | Channel of the message with the button popover; automatically added with the injection |
| `dangerous` | boolean | `false` | Whether the icon color is red |
| `disabled` | boolean | `false` | Whether the button is disabled |
| `icon` | <Required /> ComponentType<unknown\> | | Icon component |
| `iconProps` | Record<string,&nbsp;unknown> | | Props for the icon component |
| `icon` | <Required /> ComponentType\<unknown> | | Icon component |
| `iconProps` | Record\<string,&nbsp;unknown> | | Props for the icon component |
| `key` | string | | Button popover key; automatically added with the injection |
| `label` | <Required /> string | | Tooltip text |
| `message` | <APIReferences.Message /> | | Message with the button popover; automatically added with the injection |
| `onClick` | <Required /> (channel: <APIReferences.Channel />, message: <APIReferences.Message />, event: MouseEvent<HTMLDivElement\>) => void | | Function ran on button click |
| `onClick` | <Required /> (channel: <APIReferences.Channel />, message: <APIReferences.Message />, event: MouseEvent\<HTMLDivElement>) => void | | Function ran on button click |
| `selected` | boolean | `false` | Whether the button is selected |
| `separator` | boolean | `false` | Whether the button shows a divider among others |
| `sparkle` | boolean | `false` | Whether the button shows a sparkle effect |
Expand Down
2 changes: 1 addition & 1 deletion docs/plugins/modules/common/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Replugged comes with a bunch of modules that are commonly used. You can access t
import { common } from "replugged";
```

:::caution
:::warning

Your editor may suggest importing a module directly from within `replugged/dist/whatever`, but this
will not work. You should always import from `replugged` itself and destructure the module you want.
Expand Down
14 changes: 7 additions & 7 deletions docs/plugins/modules/common/stores/channels.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -21,23 +21,23 @@ import RequiredNotice from "@site/src/components/RequiredNotice.mdx";
| `getDMFromUserId` | <Required /> `userId`: string | string \| undefined | Gets the DM channel id by its user id |
| `getDMUserIds` | | string[] | Gets all DM channel ids |
| `getGuildChannelsVersion` | <Required /> `guildId`: string | number | Gets the channel version by guild id |
| `getInitialOverlayState` | | Record<string,&nbsp;<APIReferences.Channel />> | Gets all guild and DM channels |
| `getInitialOverlayState` | | Record\<string,&nbsp;<APIReferences.Channel />> | Gets all guild and DM channels |
| `getLastChannelFollowingDestination` | | [`LastChannelFollowingDestination`](#LastChannelFollowingDestination) | Gets information on the last channel follow |
| `getLastSelectedChannelId` | `guildId`: string | string \| undefined | Gets the last selected channel id |
| `getLastSelectedChannels` | <Required /> `guildId`: string | string \| undefined | Gets the last selected channel id by its guild id |
| `getMostRecentSelectedTextChannelId` | `guildId`: string | string \| null | Gets the last selected text channel id by its guild id |
| `getMutableBasicGuildChannelsForGuild` | <Required /> `guildId`: string | Record<string,&nbsp;<APIReferences.Channel />> | Gets all basic channels by its guild id |
| `getMutableGuildChannelsForGuild` | <Required /> `guildId`: string | Record<string,&nbsp;<APIReferences.Channel />> | Gets all channels by its guild id |
| `getMutablePrivateChannels` | | Record<string,&nbsp;<APIReferences.Channel />> | Gets all DM channels |
| `getMutableBasicGuildChannelsForGuild` | <Required /> `guildId`: string | Record\<string,&nbsp;<APIReferences.Channel />> | Gets all basic channels by its guild id |
| `getMutableGuildChannelsForGuild` | <Required /> `guildId`: string | Record\<string,&nbsp;<APIReferences.Channel />> | Gets all channels by its guild id |
| `getMutablePrivateChannels` | | Record\<string,&nbsp;<APIReferences.Channel />> | Gets all DM channels |
| `getPrivateChannelsVersion` | | number | Gets the DM channel version |
| `getSortedPrivateChannels` | | <APIReferences.Channel />[] | Gets all DM channels sorted by the last message |
| `getVoiceChannelId` | | string \| null | Gets the current voice channel id |
| `hasChannel` | <Required /> `channelId`: string | boolean | Checks if the channel id is registered in the channel store |
| `loadAllGuildAndPrivateChannelsFromDisk` | | Record<string,&nbsp;<APIReferences.Channel />> | Gets all guild and DM channels |
| `loadAllGuildAndPrivateChannelsFromDisk` | | Record\<string,&nbsp;<APIReferences.Channel />> | Gets all guild and DM channels |

### Types {#channels-types}
### Types \{#channels-types}

#### `LastChannelFollowingDestination` {#LastChannelFollowingDestination}
#### `LastChannelFollowingDestination` \{#LastChannelFollowingDestination}

| Name | Type | Description |
| ----------- | ------ | --------------------------------------- |
Expand Down
36 changes: 18 additions & 18 deletions docs/plugins/modules/common/stores/guilds.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -10,25 +10,25 @@ import RequiredNotice from "@site/src/components/RequiredNotice.mdx";

### Functions

| Name | Parameters | Return Type | Description |
| -------------------------- | ------------------------------ | -------------------------------------------- | ------------------------------------------------------------------- |
| `getCurrentGuild` | | <APIReferences.Guild /> \| undefined | Gets the currently selected guild object |
| `getGuild` | <Required /> `guildId`: string | <APIReferences.Guild /> \| undefined | Gets the guild by its id |
| `getGuildCount` | | number | Gets the number of how many guilds the current user is in |
| `getGuildId` | | string \| null | Gets the id of the currently selected guild |
| `getGuildIds` | | string[] | Gets all guild ids |
| `getGuilds` | | Record<string,&nbsp;<APIReferences.Guild />> | Gets all guilds |
| `getLastSelectedGuildId` | | string \| null | Gets the last selected guild id |
| `getLastSelectedTimestamp` | <Required /> `guildId`: string | number | Gets the timestamp of when a specific guild was last selected |
| `getState` | | [`State`](#state) | Gets an object containing some information about guild selections |
| `isLoaded` | | boolean | Gets a value indicating whether all initial guilds have been loaded |
| Name | Parameters | Return Type | Description |
| -------------------------- | ------------------------------ | --------------------------------------------- | ------------------------------------------------------------------- |
| `getCurrentGuild` | | <APIReferences.Guild /> \| undefined | Gets the currently selected guild object |
| `getGuild` | <Required /> `guildId`: string | <APIReferences.Guild /> \| undefined | Gets the guild by its id |
| `getGuildCount` | | number | Gets the number of how many guilds the current user is in |
| `getGuildId` | | string \| null | Gets the id of the currently selected guild |
| `getGuildIds` | | string[] | Gets all guild ids |
| `getGuilds` | | Record\<string,&nbsp;<APIReferences.Guild />> | Gets all guilds |
| `getLastSelectedGuildId` | | string \| null | Gets the last selected guild id |
| `getLastSelectedTimestamp` | <Required /> `guildId`: string | number | Gets the timestamp of when a specific guild was last selected |
| `getState` | | [`State`](#state) | Gets an object containing some information about guild selections |
| `isLoaded` | | boolean | Gets a value indicating whether all initial guilds have been loaded |

### Types {#guilds-types}
### Types \{#guilds-types}

#### `State`

| Name | Type | Description |
| ------------------------------ | --------------------------- | --------------------------------------------------------- |
| `lastSelectedGuildId` | string | Last selected guild id |
| `selectedGuildId` | string | Current selected guild id |
| `selectedGuildTimestampMillis` | Record<string,&nbsp;number> | Object containing timestamps of when guilds were selected |
| Name | Type | Description |
| ------------------------------ | ---------------------------- | --------------------------------------------------------- |
| `lastSelectedGuildId` | string | Last selected guild id |
| `selectedGuildId` | string | Current selected guild id |
| `selectedGuildTimestampMillis` | Record\<string,&nbsp;number> | Object containing timestamps of when guilds were selected |
Loading

0 comments on commit e464a86

Please sign in to comment.