Skip to content

Added react widget & SDK#22

Merged
gagdiez merged 4 commits intomainfrom
add-dev-kit
Mar 2, 2026
Merged

Added react widget & SDK#22
gagdiez merged 4 commits intomainfrom
add-dev-kit

Conversation

@gagdiez
Copy link
Collaborator

@gagdiez gagdiez commented Mar 2, 2026

Added not-in-depth information on the SDK and React Widget. Will expand later, but at least this would help us surface libraries and tools that already exist.

@coderabbitai
Copy link

coderabbitai bot commented Mar 2, 2026

Warning

Rate limit exceeded

@gagdiez has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 6 minutes and 15 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

📥 Commits

Reviewing files that changed from the base of the PR and between 5f76e53 and 554487f.

📒 Files selected for processing (4)
  • docs.json
  • integration/devkit/react-widget.mdx
  • integration/devkit/sdk.mdx
  • integration/devkit/skills.mdx

Walkthrough

Navigation tabs and groups are renamed to reflect a "Swaps" focus. Two new developer toolkit documentation pages are added covering React Widget integration and SDK libraries. The landing page is reorganized to prominently feature these new resources alongside the 1-Click Swap API, with updated styling adjustments.

Changes

Cohort / File(s) Summary
Navigation & Site Structure
docs.json, style.css
Tab renamed to "Swaps", group "1Click API" renamed to "Swap API", new "Developer ToolKit" group added. CSS adjusted: .landing code max-height reduced to 190px, new .swap-widget-preview rule added.
Landing Page
index.mdx
Header changed from "1-Click API" to "1-Click Swap API". Restructured with CodeGroup containing multi-language samples. Added React Widget and SDK Libraries feature blocks. "Browse By Topic" section expanded with new "React Widget" and "SDK Libraries" cards alongside existing content.
Developer Toolkit Documentation
integration/devkit/react-widget.mdx, integration/devkit/sdk.mdx
Two new comprehensive guides added. React Widget guide covers installation, usage examples (WidgetSwap, WidgetTransfer, WidgetWithdraw), styling, and wallet integration. SDK guide documents TypeScript, Go, and Rust SDK quickstart, client configuration, token querying, quote requests, deposit submission, and status monitoring.
API Documentation Update
integration/distribution-channels/1click-api/about-1click-api.mdx
Sidebar title changed from "What is 1Click Swap?" to "Overview". SDKs section removed. Swap Statuses table reformatted. Dry parameter usage guidance removed from API Reference tip.

Possibly related PRs

Poem

🐰 The docs now bloom with swaps so bright,
New widget guides and SDK light,
Navigation flows with clarity grand,
Developer ToolKit, carefully planned!
From "Intents" past to "Swaps" divine,
Integration paths now truly shine.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title 'Added react widget & SDK' directly corresponds to the main changes in the pull request, which add new documentation for a React Widget and SDK Libraries with multiple language support.
Description check ✅ Passed The description is related to the changeset, noting that SDK and React Widget information were added with the intent to expand later, which aligns with the actual documentation additions across multiple files.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch add-dev-kit

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Nitpick comments (8)
integration/devkit/react-widget.mdx (5)

20-34: Remove redundant numbering from Step titles.

The <Steps> component auto-numbers steps, so "1. Install package" should be "Install package" to avoid double-numbering in the rendered output.

♻️ Suggested fix
-  <Step title="1. Install package">
+  <Step title="Install package">
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@integration/devkit/react-widget.mdx` around lines 20 - 34, The Step titles
currently include manual numbering (e.g., "1. Install package") which duplicates
the auto-numbering from the Steps component; update the Step title strings in
the React widget docs (the Step elements, e.g., the Step with title "1. Install
package") to remove the leading numeric prefix so titles read "Install package"
(and similarly for any other Step components in this file) so the rendered
output shows only the component's automatic numbering.

113-115: Consider adding a <CardGroup> for next steps.

As per coding guidelines, use <CardGroup> and <Card> components for navigation cards and related page links, particularly at the end of pages for 'next steps'.

♻️ Suggested enhancement
 ## Next steps

-Explore the [Widget Docs](https://docs.intents.aurora.dev/readme-1-1) for detailed information on configuration options, theming, and advanced usage examples.
+<CardGroup cols={2}>
+  <Card title="Widget Configuration" icon="gear" href="https://docs.intents.aurora.dev/readme-1-1">
+    Explore configuration options and advanced usage
+  </Card>
+  <Card title="Theming" icon="palette" href="https://docs.intents.aurora.dev/theming">
+    Customize colors and appearance
+  </Card>
+</CardGroup>
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@integration/devkit/react-widget.mdx` around lines 113 - 115, Replace the
plain "Next steps" link list with a CardGroup containing one or more Card
components: create a <CardGroup> wrapper and inside add <Card> items for each
next-step link (e.g., "Widget Docs") using Card title, description and link
props or children; ensure the CardGroup is placed where the existing "Next
steps" heading and link are and follow the project's Card/CardGroup usage
patterns (use the same prop names and import if necessary) so navigation cards
render consistently with other pages.

35-36: Same issue: Remove "2." prefix.

♻️ Suggested fix
-  <Step title="2. Set up">
+  <Step title="Set up">
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@integration/devkit/react-widget.mdx` around lines 35 - 36, The Step component
title contains an unnecessary numeric prefix; update the <Step title="2. Set
up"> instance so the title reads "Set up" (remove the "2." prefix) in the
integration/devkit/react-widget.mdx file and ensure any other occurrences of
<Step title="2. ..."> are similarly updated to <Step title="..."> so headings no
longer include prefixed step numbers.

60-61: Same issue: Remove "3." prefix.

♻️ Suggested fix
-  <Step title="3. Styling">
+  <Step title="Styling">
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@integration/devkit/react-widget.mdx` around lines 60 - 61, The Step component
title includes a numeric prefix ("3. Styling"); remove the "3." prefix so the
title reads "Styling" (update the Step element with title="3. Styling" to
title="Styling"), and search for any other Step components in this file that
follow the same pattern to remove numeric prefixes for consistency.

75-76: Same issue: Remove "4." prefix.

♻️ Suggested fix
-  <Step title="4. Connect a wallet">
+  <Step title="Connect a wallet">
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@integration/devkit/react-widget.mdx` around lines 75 - 76, The Step component
title contains a leading "4." prefix; update the Step title prop in
integration/devkit/react-widget.mdx from title="4. Connect a wallet" to
title="Connect a wallet" (search for the Step component with title="4. Connect a
wallet" and remove the numeric prefix so it reads "Connect a wallet").
index.mdx (1)

27-35: Consider clarifying truncated request body.

The ... in the JSON body may confuse readers. Consider adding a comment or linking to the full API reference for required fields.

💡 Suggested improvement
           "amount": "100000000000000000000000",
-          ...
+          "slippageTolerance": 100,
+          "refundTo": "...",
+          "recipient": "..."
         }'

Or add a brief comment above noting this is a partial example.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@index.mdx` around lines 27 - 35, The JSON request body shown (fields like
"swapType", "originAsset", "depositType", "destinationAsset", "amount") is
truncated with "..." which may confuse readers; replace the ellipsis by either
adding a short inline comment above the block stating "partial example — see
full API reference" or append a link to the full API spec, or expand to include
the remaining required fields from the API; update the surrounding text to
clearly label the snippet as a partial example if you choose the comment/link
approach.
docs.json (1)

1-9: Consider adding appearance.strict: true to the configuration.

As per coding guidelines, the docs.json should enable appearance.strict: true. This ensures consistent theming behavior.

♻️ Suggested addition
 {
   "$schema": "https://mintlify.com/docs.json",
   "theme": "maple",
   "name": "NEAR Intents",
+  "appearance": {
+    "strict": true
+  },
   "colors": {
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs.json` around lines 1 - 9, Add the missing appearance.strict setting to
the docs.json configuration: update the top-level configuration object (in
docs.json) to include an "appearance" key with "strict": true (e.g., add
appearance.strict: true) so the theme behavior is enforced consistently; ensure
the new property is placed alongside existing top-level keys like "$schema",
"theme", "name", and "colors".
integration/devkit/sdk.mdx (1)

40-56: Rust installation instructions are non-standard.

The Rust SDK uses git clone + path dependency rather than a published crate. This friction may discourage adoption. Consider publishing to crates.io or adding a note explaining why this approach is used.

💡 Suggested clarification
 ```bash Rust
 # Clone the repo next to your project
 git clone https://github.com/defuse-protocol/one-click-sdk-rs.git

 # Add to your Cargo.toml under [dependencies]
 # one-click-sdk-rs = { path = "./one-click-sdk-rs" }
+
+# Note: A crates.io release is planned for easier installation

Alternatively, if the crate is already published, update the instructions to use cargo add.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@integration/devkit/sdk.mdx` around lines 40 - 56, Update the Rust
installation instructions in the Rust code block (the fenced "Rust" entry inside
the CodeGroup) to remove friction: either replace the git clone + path
dependency example with a published-crate workflow using `cargo add
one-click-sdk-rs` (if the crate is already published), or keep the existing
git-clone snippet but append a single-line note stating that a crates.io release
is planned (e.g., "Note: A crates.io release is planned for easier
installation") so users understand the reason for the path dependency; edit the
Rust fenced block in the sdk.mdx CodeGroup accordingly.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@integration/devkit/sdk.mdx`:
- Line 7: Update the internal link in integration/devkit/sdk.mdx: locate the
markdown link text "[1Click Swap API]" and change its target URL by removing the
".mdx" suffix so it points to
"/integration/distribution-channels/1click-api/about-1click-api" instead of
"/integration/distribution-channels/1click-api/about-1click-api.mdx"; verify the
link renders and navigates correctly in the site.

---

Nitpick comments:
In `@docs.json`:
- Around line 1-9: Add the missing appearance.strict setting to the docs.json
configuration: update the top-level configuration object (in docs.json) to
include an "appearance" key with "strict": true (e.g., add appearance.strict:
true) so the theme behavior is enforced consistently; ensure the new property is
placed alongside existing top-level keys like "$schema", "theme", "name", and
"colors".

In `@index.mdx`:
- Around line 27-35: The JSON request body shown (fields like "swapType",
"originAsset", "depositType", "destinationAsset", "amount") is truncated with
"..." which may confuse readers; replace the ellipsis by either adding a short
inline comment above the block stating "partial example — see full API
reference" or append a link to the full API spec, or expand to include the
remaining required fields from the API; update the surrounding text to clearly
label the snippet as a partial example if you choose the comment/link approach.

In `@integration/devkit/react-widget.mdx`:
- Around line 20-34: The Step titles currently include manual numbering (e.g.,
"1. Install package") which duplicates the auto-numbering from the Steps
component; update the Step title strings in the React widget docs (the Step
elements, e.g., the Step with title "1. Install package") to remove the leading
numeric prefix so titles read "Install package" (and similarly for any other
Step components in this file) so the rendered output shows only the component's
automatic numbering.
- Around line 113-115: Replace the plain "Next steps" link list with a CardGroup
containing one or more Card components: create a <CardGroup> wrapper and inside
add <Card> items for each next-step link (e.g., "Widget Docs") using Card title,
description and link props or children; ensure the CardGroup is placed where the
existing "Next steps" heading and link are and follow the project's
Card/CardGroup usage patterns (use the same prop names and import if necessary)
so navigation cards render consistently with other pages.
- Around line 35-36: The Step component title contains an unnecessary numeric
prefix; update the <Step title="2. Set up"> instance so the title reads "Set up"
(remove the "2." prefix) in the integration/devkit/react-widget.mdx file and
ensure any other occurrences of <Step title="2. ..."> are similarly updated to
<Step title="..."> so headings no longer include prefixed step numbers.
- Around line 60-61: The Step component title includes a numeric prefix ("3.
Styling"); remove the "3." prefix so the title reads "Styling" (update the Step
element with title="3. Styling" to title="Styling"), and search for any other
Step components in this file that follow the same pattern to remove numeric
prefixes for consistency.
- Around line 75-76: The Step component title contains a leading "4." prefix;
update the Step title prop in integration/devkit/react-widget.mdx from title="4.
Connect a wallet" to title="Connect a wallet" (search for the Step component
with title="4. Connect a wallet" and remove the numeric prefix so it reads
"Connect a wallet").

In `@integration/devkit/sdk.mdx`:
- Around line 40-56: Update the Rust installation instructions in the Rust code
block (the fenced "Rust" entry inside the CodeGroup) to remove friction: either
replace the git clone + path dependency example with a published-crate workflow
using `cargo add one-click-sdk-rs` (if the crate is already published), or keep
the existing git-clone snippet but append a single-line note stating that a
crates.io release is planned (e.g., "Note: A crates.io release is planned for
easier installation") so users understand the reason for the path dependency;
edit the Rust fenced block in the sdk.mdx CodeGroup accordingly.

ℹ️ Review info

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between dc37fbf and 5f76e53.

⛔ Files ignored due to path filters (1)
  • images/widget/swap-widget.png is excluded by !**/*.png
📒 Files selected for processing (6)
  • docs.json
  • index.mdx
  • integration/devkit/react-widget.mdx
  • integration/devkit/sdk.mdx
  • integration/distribution-channels/1click-api/about-1click-api.mdx
  • style.css

Guillermo Alejandro Gallardo Diez added 2 commits March 3, 2026 00:11
@gagdiez gagdiez merged commit f4626ac into main Mar 2, 2026
3 checks passed
@gagdiez gagdiez deleted the add-dev-kit branch March 2, 2026 23:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant