MCPcopy Index your code
hub / github.com/dialectlabs/react

github.com/dialectlabs/react @v0.1.0

Chat with this repo
repository ↗ · DeepWiki ↗ · release v0.1.0 ↗ · + Follow
1,682 symbols 5,494 edges 74 files 1 documented · 0%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Dialect

React components to use Dialect's web3 notifications.

Installation

npm:

npm install @dialectlabs/react @dialectlabs/react-ui --save

yarn:

yarn add @dialectlabs/react @dialectlabs/react-ui

Development

Prerequisites

  • Git
  • Yarn (<2)
  • Nodejs (>=15.10 <17)

Get Started

This repo utilizes Yarn Workspaces. Publishable packages are located under packages directory. examples directory contains projects to demonstrate how can Dialect be used.

For development, you implement necessary component inside the packages and use them in examples to visualize them.

To get started, launch example's next dev server:

yarn # in root dir
cd examples/basic
yarn dev

Now you have a hot reload of the packages in the workspace.

Convert svg icons to React Components (via svgr)

Store original svgs in Icon/source/, then run inside Icon directory to convert:

  npx @svgr/cli --typescript --out-dir . -- source

Import Icon as a React Component from Icon, e.g. (import {BackArrow} from '/Icon/'). See SVGR Command Line guide for more details.

Publishing

TBD

Know-hows

  • Currently every npm project inside the packages and examples directories, becomes part of the workspaces. Referencing other workspace package can be done by using npm project's name (in package.json)
  • Root package.json MAY contain references to child npm projects to simplify ci commands: e.g. in root package.json - yarn build:react-ui which would call the packages/dialect-react-ui's build command.
  • Linting configuration in located in repo's root and takes over the code style for all projects.

Extension points exported contracts — how you extend this code

Message (Interface)
(no doc)
packages/dialect-react/components/DialectContext/index.tsx
ParsedErrorData (Interface)
(no doc)
packages/dialect-react/utils/errors.ts

Core symbols most depended-on inside this repo

push
called by 338
examples/dialect.to/static-build/_next/static/chunks/254-c71c050656c6dd7c.js
n
called by 267
examples/dialect.to/static-build/_next/static/chunks/254-c71c050656c6dd7c.js
r
called by 260
examples/dialect.to/static-build/_next/static/chunks/254-c71c050656c6dd7c.js
e
called by 163
examples/dialect.to/static-build/_next/static/chunks/254-c71c050656c6dd7c.js
s
called by 160
examples/dialect.to/static-build/_next/static/chunks/254-c71c050656c6dd7c.js
i
called by 127
examples/dialect.to/static-build/_next/static/chunks/254-c71c050656c6dd7c.js
kt
called by 127
examples/dialect.to/static-build/_next/static/chunks/polyfills-5cd94c89d3acac5f.js
r
called by 120
examples/dialect.to/static-build/_next/static/chunks/main-bbb0886e5a3ed16d.js

Shape

Function 1,007
Method 516
Class 157
Interface 2

Languages

TypeScript100%

Modules by API surface

examples/dialect.to/static-build/_next/static/chunks/254-c71c050656c6dd7c.js573 symbols
examples/dialect.to/static-build/_next/static/chunks/51c52c66-70115da660ac25e7.js352 symbols
examples/dialect.to/static-build/_next/static/chunks/framework-c4190dd27fdc6a34.js316 symbols
examples/dialect.to/static-build/_next/static/chunks/polyfills-5cd94c89d3acac5f.js179 symbols
examples/dialect.to/static-build/_next/static/chunks/pages/index-936a409c0665cffe.js72 symbols
examples/dialect.to/static-build/_next/static/chunks/765fdf9a-95f48a423237f416.js60 symbols
examples/dialect.to/static-build/_next/static/chunks/main-bbb0886e5a3ed16d.js59 symbols
packages/dialect-react-ui/components/common/index.tsx7 symbols
packages/dialect-react-ui/components/NotificationCenter/index.tsx5 symbols
packages/dialect-react/components/DialectContext/index.tsx4 symbols
packages/dialect-react-ui/components/NotificationCenterButton/index.tsx4 symbols
examples/dialect.to/pages/_document.jsx4 symbols

For agents

$ claude mcp add react \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact