Skip to content

Commit b0fb706

Browse files
authored
Upgrade Docusaurus to v3 (#14)
* ⭐ Requested changes * ⭐ Requested changes
1 parent 316295b commit b0fb706

20 files changed

+4858
-4551
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
4444
- Updated the "Overview" doc;
4545
- Transferred the project to GitHub;
4646
- Navigation system to product-based;
47+
- Docusaurus version to 3.1.0 (and all packages);
48+
- Color of highlighted line in <code> block;
4749

4850
### Fixed
4951

docs/products/bridging-protocol/api-reference.mdx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,21 +5,21 @@
55

66
The Rarimo SDK checkout packages provide tools to send transactions to blockchains.
77

8-
For information about creating transactions, see [Creating NFT checkout transactions](/bridging-protocol/creating-nft-checkout-transactions).
8+
For information about creating transactions, see [Creating NFT checkout transactions](/products/bridging-protocol/creating-nft-checkout-transactions).
99

1010
For example applications, see [rarimo/js-sdk-examples](https://github.com/rarimo/js-sdk-examples/) on GitHub.
1111

1212
## @rarimo/nft-checkout
1313

1414
The [@rarimo/nft-checkout](https://www.npmjs.com/package/@rarimo/nft-checkout) package provides tools that swap tokens and create cross-chain transactions based on the Rarimo protocol.
1515

16-
For information about swapping tokens, see [Swapping tokens](/bridging-protocol/swapping-tokens).
16+
For information about swapping tokens, see [Swapping tokens](/products/bridging-protocol/swapping-tokens).
1717

1818
## @rarimo/react-nft-checkout
1919

2020
The [@rarimo/react-nft-checkout](https://www.npmjs.com/package/@rarimo/react-nft-checkout) package provides React components that you can use in your UI to create cross-chain transactions with the Rarimo protocol.
2121

22-
For information about creating transactions with this package, see [Creating NFT checkout transactions](/bridging-protocol/creating-nft-checkout-transactions).
22+
For information about creating transactions with this package, see [Creating NFT checkout transactions](/products/bridging-protocol/creating-nft-checkout-transactions).
2323

2424
For example applications, see [rarimo/js-sdk-examples](https://github.com/rarimo/js-sdk-examples/) on GitHub.
2525

@@ -51,7 +51,7 @@ If the wallet has enough of the selected token, the dialog shows the transaction
5151

5252
The Rarimo SDK provider packages provide tools to interact with in-browser wallets.
5353

54-
For information about connecting to wallets, see [Connecting to wallets](/bridging-protocol/connecting-to-wallets).
54+
For information about connecting to wallets, see [Connecting to wallets](/products/bridging-protocol/connecting-to-wallets).
5555

5656
For example applications, see [rarimo/js-sdk-examples](https://github.com/rarimo/js-sdk-examples/) on GitHub.
5757

docs/products/bridging-protocol/bridge-protocol-contracts.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,9 @@ At the high level, cross-chain token bridging consists of the following steps:
3131

3232
Currently, there are three implementations of a Rarimo bridge contract:
3333

34-
- [EVM bridge](bridging-protocol/smart-contracts-reference/evm);
35-
- [Solana bridge](bridging-protocol/smart-contracts-reference/solana);
36-
- [Near bridge](bridging-protocol/smart-contracts-reference/near);
34+
- [EVM bridge](/products/bridging-protocol/smart-contracts-reference/evm);
35+
- [Solana bridge](/products/bridging-protocol/smart-contracts-reference/solana);
36+
- [Near bridge](/products/bridging-protocol/smart-contracts-reference/near);
3737

3838
## Deployments
3939

docs/products/bridging-protocol/creating-nft-checkout-transactions.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,7 @@ To create a transaction with the React components, follow these general steps:
247247
}).current
248248
```
249249

250-
For more information about bundling transactions, see [Bundling](/bridging-protocol/guide-how-to-bundle-transactions).
250+
For more information about bundling transactions, see [Bundling](/products/bridging-protocol/guide-how-to-bundle-transactions).
251251

252252
1. Add the `DappContextProvider` and `RarimoPayButton` components to the page and pass the parameters and the transaction bundle function:
253253

@@ -335,4 +335,4 @@ const App = () => {
335335
export default App
336336
```
337337

338-
For information about the flow of the components that appear through the checkout process, see [Checkout packages](/bridging-protocol/api-reference).
338+
For information about the flow of the components that appear through the checkout process, see [Checkout packages](/products/bridging-protocol/api-reference).

docs/products/bridging-protocol/guide-how-to-bundle-transactions.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ Our bundled transactions handle these steps efficiently with a single request, i
4444
## Creating bundled transactions
4545

4646
To bundle transactions together with the SDK, follow these general steps.
47-
For a complete example, see [SDK](/bridging-protocol/js-sdk-reference).
47+
For a complete example, see [SDK](/products/bridging-protocol/js-sdk-reference).
4848

4949
1. Connect to a wallet and create a transaction operation with the [`createCheckoutOperation()`](https://rarimo.github.io/js-sdk/functions/_rarimo_nft_checkout.createCheckoutOperation.html) function:
5050

@@ -65,7 +65,7 @@ For a complete example, see [SDK](/bridging-protocol/js-sdk-reference).
6565
```
6666

6767
1. Initialize the operation as usual with the operation object's [`init()`](https://rarimo.github.io/js-sdk/interfaces/_rarimo_nft_checkout.CheckoutOperation.html#init) method.
68-
This step assumes that you have set the target transaction and chain for the operation as described in [SDK](/bridging-protocol/js-sdk-reference):
68+
This step assumes that you have set the target transaction and chain for the operation as described in [SDK](/products/bridging-protocol/js-sdk-reference):
6969

7070
```ts
7171
const params: CheckoutOperationParams = {

docs/products/bridging-protocol/js-sdk-reference.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ For complete reference information about the SDK packages, see the [SDK referenc
1313
The SDK provides these groups of packages:
1414

1515
- [Packages that provide access to wallets](/products/rarimo-protocol/api-reference)
16-
- [Packages that send transactions to blockchains](/bridging-protocol/api-reference)
17-
- [Packages that provide resources for other packages](/bridging-protocol/packages-base)
16+
- [Packages that send transactions to blockchains](/products/bridging-protocol/api-reference)
17+
- [Packages that provide resources for other packages](/products/bridging-protocol/packages-base)
1818

1919
## Prerequisites
2020

docs/products/bridging-protocol/overview.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,4 +61,4 @@ Fundamentally, the product provides four capabilities:
6161

6262
By combining these features, developers can implement cross-chain use cases such as fungible token payments, NFT minting, staking, token swaps, and more.
6363

64-
The solution is available as a ready-to-use [React widget](/bridging-protocol/api-reference#@rarimo/react-nft-checkout) that requires little effort for integration. Alternatively, a custom integration can be built using the [JS SDK](/bridging-protocol/api-reference#@rarimo/nft-checkout).
64+
The solution is available as a ready-to-use [React widget](/products/bridging-protocol/api-reference#@rarimo/react-nft-checkout) that requires little effort for integration. Alternatively, a custom integration can be built using the [JS SDK](/products/bridging-protocol/api-reference#@rarimo/nft-checkout).

docs/products/bridging-protocol/swapping-tokens.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Rarimo can make these basic token swaps:
99
- ERC-20 tokens to other ERC-20 tokens
1010
- Native tokens to ERC-20 tokens
1111

12-
For more details and limitations about swaps, see [Bridging Protocol](/bridging-protocol/overview).
12+
For more details and limitations about swaps, see [Bridging Protocol](/products/bridging-protocol/overview).
1313

1414
To set up a token swap, create a Rarimo transaction and specify the token and amount that you want to receive, as in this example:
1515

docs/products/polygon-id-state-replication/api-reference.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
# API Reference
55

6-
This page contains technical resources related to the [Polygon ID State Replication](/polygon-id-state-replication/overview).
6+
This page contains technical resources related to the [Polygon ID State Replication](/products/polygon-id-state-replication/overview).
77

88
## Demo DApp
99

docs/products/polygon-id-state-replication/overview.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,6 @@ To complete the demo and claim a soulbound token on Ethereum's Sepolia Testnet,
4242
Polygon ID x Rarimo integration is experimental and hasn't been audited yet. Please refrain from using it in production applications for now!
4343
:::
4444

45-
If you run an identity issuer for Polygon ID and want to enable the usage of ZKPs on Ethereum or another EVM-compatible network, follow this [guide](/polygon-id-state-replication/guide-how-to-set-up-polygon-id-state-replication).
45+
If you run an identity issuer for Polygon ID and want to enable the usage of ZKPs on Ethereum or another EVM-compatible network, follow this [guide](/products/polygon-id-state-replication/guide-how-to-set-up-polygon-id-state-replication).
4646

4747
Once the state replication is ready, the DApps can use the ZKPs by following the [Polygon's on-chain verification guide](https://0xpolygonid.github.io/tutorials/verifier/on-chain-verification/overview/#on-chain-verification-flow).

docs/products/rarimo-protocol/threshold-signature.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ If party has not received a minimum amount of acceptances, it will catch up with
5858
Every party should have the following public endpoints:
5959

6060
- Get current session information (pool, proposer, steps with time bounds, accepted parties list, signed parties list, status) - for example /session/current
61-
- Get session by id information. (pool, proposer, steps with time bounds, accepted parties list, signed parties list, status) - for example /session/{id}
61+
- Get session by id information. (pool, proposer, steps with time bounds, accepted parties list, signed parties list, status) - for example /session/\{id\}
6262

6363
Every party should have the following protected endpoints (reachable by other parties with their ECDSA signature)
6464

docs/products/token-agnostic-payments/overview.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,11 +56,11 @@ Let's walk through a [demo](https://nft-checkout.rarimo.com/) and buy an NFT pri
5656

5757
Token-agnostic payments can be added to your DApp using one of these options:
5858

59-
- [Customizable react component](/bridging-protocol/creating-nft-checkout-transactions#react-applications)
59+
- [Customizable react component](/products/bridging-protocol/creating-nft-checkout-transactions#react-applications)
6060

6161
![Token-agnostic button for buying](/img/token-agnostic-button.png)
6262

63-
- [TypeScript SDK](/bridging-protocol/creating-nft-checkout-transactions#javascript)
63+
- [TypeScript SDK](/products/bridging-protocol/creating-nft-checkout-transactions#javascript)
6464

6565
## Fees
6666

docs/resources/glossary.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,12 @@
77

88
Bridge contracts are a group of smart contracts that are deployed to different chains that enable you to transfer value from one chain to another.
99
The user submits a deposit transaction to the bridge contract on the source chain, and the bridge contract on the target chain withdraws tokens on the target chain.
10-
See [Bridge overview](/bridging-protocol/bridge-protocol-contracts).
10+
See [Bridge overview](/products/bridging-protocol/bridge-protocol-contracts).
1111

1212
## Bundling
1313

1414
Bundling is the process of combining multiple transactions into a single transaction.
15-
See [Bundling](/bridging-protocol/guide-how-to-bundle-transactions).
15+
See [Bundling](/products/bridging-protocol/guide-how-to-bundle-transactions).
1616

1717
## Decentralized application (DApp)
1818

@@ -83,7 +83,7 @@ See [Oracles](/products/rarimo-protocol/oracles).
8383
## Provider
8484

8585
A provider is an object that represents a user's wallet, so you can interact with it in your code.
86-
See [Connecting to wallets](/bridging-protocol/connecting-to-wallets).
86+
See [Connecting to wallets](/products/bridging-protocol/connecting-to-wallets).
8787

8888
## Rarimo
8989

docs/use-cases/cross-chain-proofs.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,12 @@ You should contact the team to register your specific tokens in Rarimo Protocol.
1414
For transferrable tokens, you have to lock them in the Rarimo bridge smart contract.
1515

1616
1. Approve bridge smart contract to transfer NFT using `setApprovalForAll` method from [ERC721](https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/token/ERC721/ERC721.sol#L136) or [ERC1155](https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/token/ERC1155/ERC1155.sol#L100) standard. It should be done only the first time for each NFT contract;
17-
1. Call the deposit method on the bridge contract. For ERC721 [`depositERC721`](/bridging-protocol/smart-contracts-reference/evm#depositerc721), for ERC1155 [`depositERC1155`](/bridging-protocol/smart-contracts-reference/evm#depositerc1155). Note that you could specify some code that should be called on destination chain using [bundling feature](/bridging-protocol/guide-how-to-bundle-transactions);
17+
1. Call the deposit method on the bridge contract. For ERC721 [`depositERC721`](/products/bridging-protocol/smart-contracts-reference/evm#depositerc721), for ERC1155 [`depositERC1155`](/products/bridging-protocol/smart-contracts-reference/evm#depositerc1155). Note that you could specify some code that should be called on destination chain using [bundling feature](/products/bridging-protocol/guide-how-to-bundle-transactions);
1818
1. Once the transaction is processed, Rarimo relayers will automatically mint a wrapped NFT on the destination network;
1919

2020
## Soulbound Tokens
2121

2222
SBTs are non-transferable, so they can't be locked. Thus the bridge needs to verify the sender's ownership of the token. The tokens must follow the [ERC-5192 standard](https://eips.ethereum.org/EIPS/eip-5192).
2323

24-
1. Call the [`depositSBT`](/bridging-protocol/smart-contracts-reference/evm#depositsbt) method on the bridge contract. It checks the SBT ownership and triggers the corresponding event in the Rarimo Core;
24+
1. Call the [`depositSBT`](/products/bridging-protocol/smart-contracts-reference/evm#depositsbt) method on the bridge contract. It checks the SBT ownership and triggers the corresponding event in the Rarimo Core;
2525
1. Once the transaction is processed, Rarimo relayers will automatically mint an SBT ownership token on the destination network;

docs/use-cases/overview-of-use-cases.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,14 @@ Learn about the use cases of Rarimo and check out the case studies of existing i
1010

1111
- [Proof of Humanity](/products/proof-of-humanity/overview)
1212
- [Self-Sovereign Identity(SSI)](/use-cases/self-sovereign-identities)
13-
- [Polygon ID Cross-Chain State Replication](/polygon-id-state-replication/overview)
13+
- [Polygon ID Cross-Chain State Replication](/products/polygon-id-state-replication/overview)
1414
- [Social Graphs](/use-cases/social-graphs)
1515
- [Gaming Profiles](/use-cases/gaming-profiles)
1616
- [SBT Ownership Proofs](/use-cases/cross-chain-proofs)
1717
- [Rarimo x Identity State Replication](/use-cases/identity-protocol-state-replication)
1818

1919
## Bridging Use Cases
2020

21-
- [Token Agnostic Payments Widget](/token-agnostic-payments/overview)
21+
- [Token Agnostic Payments Widget](/products/token-agnostic-payments/overview)
2222
- [Multi-Chain Token Mints](/use-cases/multi-chain-mints)
23-
- [Circle CCTP Integration for Managing USDC Liquidity](/bridging-protocol/circle-cctp-integration)
23+
- [Circle CCTP Integration for Managing USDC Liquidity](/products/bridging-protocol/circle-cctp-integration)

docs/whitepaper/problem_statement.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
# Problem Statement
55

6-
As mentioned, the most current multi-chain solutions focus on cases where token transfers (bridging) suffice. Only a
6+
As mentioned, the most current multi-chain solutions focus on cases where token transfers (products/bridging) suffice. Only a
77
few solutions are suitable for transferring different data types, including cross-chain calls. Still, even then, they
88
can only act as postmen for this data and cannot provide an additional layer of optimization and aggregation.
99

docusaurus.config.js

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
/* eslint-disable @typescript-eslint/no-var-requires */
33

44
// @TODO - make our own themes, i guess
5-
const darkCodeTheme = require('prism-react-renderer/themes/dracula')
6-
const lightCodeTheme = require('prism-react-renderer/themes/github')
5+
const darkCodeTheme = require('prism-react-renderer').themes.dracula
6+
const lightCodeTheme = require('prism-react-renderer').themes.github
77

88
function getUrl() {
99
return process.env.URL || 'http://localhost:3000'
@@ -55,8 +55,6 @@ module.exports = {
5555
breadcrumbs: false,
5656
showLastUpdateTime: true,
5757
editUrl: 'https://github.com/rarimo/docs/blob/main',
58-
docLayoutComponent: '@theme/DocPage',
59-
docItemComponent: '@theme/ApiItem',
6058
remarkPlugins: [
6159
[require('@docusaurus/remark-plugin-npm2yarn'), { sync: true }],
6260
],
@@ -258,6 +256,4 @@ module.exports = {
258256

259257
/** Plugins https://docusaurus.io/docs/using-plugins */
260258
plugins: [],
261-
262-
themes: ['docusaurus-theme-openapi-docs'], // Allows use of @theme/ApiItem and other components
263259
}

package.json

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -17,24 +17,25 @@
1717
"typecheck": "tsc"
1818
},
1919
"dependencies": {
20-
"@docusaurus/core": "^2.2.0",
21-
"@docusaurus/preset-classic": "^2.2.0",
22-
"@docusaurus/remark-plugin-npm2yarn": "^3.0.1",
23-
"@mdx-js/react": "^1.6.22",
20+
"@docusaurus/core": "^3.1.0",
21+
"@docusaurus/preset-classic": "^3.1.0",
22+
"@docusaurus/remark-plugin-npm2yarn": "^3.1.0",
23+
"@mdx-js/react": "^3.0.0",
2424
"aos": "^3.0.0-beta.6",
2525
"clsx": "^1.2.1",
26-
"docusaurus-plugin-openapi-docs": "^1.4.1",
27-
"docusaurus-theme-openapi-docs": "^1.4.1",
28-
"prism-react-renderer": "^1.3.5",
29-
"react": "^17.0.2",
30-
"react-dom": "^17.0.2",
31-
"redocusaurus": "^1.4.0",
26+
"mermaid": "^10.7.0",
27+
"prism-react-renderer": "^2.3.1",
28+
"react": "^18.2.0",
29+
"react-dom": "^18.2.0",
30+
"react-live": "^4.1.5",
31+
"redocusaurus": "^2.0.0",
32+
"remark-emoji": "^4.0.1",
3233
"swiper": "^11.0.5"
3334
},
3435
"devDependencies": {
35-
"@docusaurus/eslint-plugin": "^2.2.0",
36-
"@docusaurus/module-type-aliases": "^2.2.0",
37-
"@tsconfig/docusaurus": "^1.0.5",
36+
"@docusaurus/eslint-plugin": "^3.1.0",
37+
"@docusaurus/module-type-aliases": "^3.1.0",
38+
"@docusaurus/tsconfig": "^3.1.0",
3839
"@typescript-eslint/eslint-plugin": "^5.40.1",
3940
"@typescript-eslint/parser": "^5.40.1",
4041
"eslint": "^8.25.0",
@@ -44,7 +45,7 @@
4445
"eslint-plugin-react": "^7.31.10",
4546
"eslint-plugin-simple-import-sort": "^8.0.0",
4647
"prettier": "^2.7.1",
47-
"typescript": "^4.8.4"
48+
"typescript": "^5.3.3"
4849
},
4950
"browserslist": {
5051
"production": [

src/css/custom.css

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
}
4141

4242
/* For readability concerns, you should choose a lighter palette in dark mode. */
43-
[data-theme='dark'] {
43+
html[data-theme='dark'] {
4444
--primary-main: #8ab5a4;
4545
--ifm-color-primary: var(--primary-main);
4646
--ifm-color-primary-dark: #28c3b7;
@@ -80,7 +80,7 @@
8080
color: var(--secondary-text-color-dark);
8181
}
8282

83-
[data-theme='light'] {
83+
html[data-theme='light'] {
8484
--primary-text-color-dark: #fff;
8585
--primary-text-color: #8f8f8f;
8686
--primary-text-color-light: #0d0d0d;
@@ -163,6 +163,10 @@
163163
color: var(--primary-text-color);
164164
}
165165

166+
[data-theme='light'] pre code {
167+
--docusaurus-highlighted-code-line-bg: rgba(0, 0, 0, 0.1);
168+
}
169+
166170
[data-theme='light'] .menu__splitter {
167171
background: rgba(0, 0, 0, 0.1);
168172
}
@@ -179,6 +183,7 @@
179183
}
180184

181185
pre code {
186+
--docusaurus-highlighted-code-line-bg: rgba(255, 255, 255, 0.1);
182187
background-color: var(--ifm-code-background);
183188
padding: 0.5rem;
184189
}

0 commit comments

Comments
 (0)