Skip to content

Commit

Permalink
feat: direct domestic transfers on evm and better docs (#2947)
Browse files Browse the repository at this point in the history
  • Loading branch information
o-az authored Sep 18, 2024
2 parents 0d1ac9c + e737272 commit c9f1975
Show file tree
Hide file tree
Showing 40 changed files with 9,975 additions and 9,116 deletions.
2 changes: 1 addition & 1 deletion app/app.nix
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
{
packages = {
app = unstablePkgs.buildNpmPackage {
npmDepsHash = "sha256-KIxRD0SCb5yex5HmoZ3BbmNzyt7Y5RuZKdwuc3gtX78=";
npmDepsHash = "sha256-DD7rjuzM5RSfubkK8hNH3qKAmEf3oy1e7hyR3gi9Kb0=";
src = ./.;
sourceRoot = "app";
npmFlags = [ "--enable-pre-post-scripts" ];
Expand Down
8 changes: 4 additions & 4 deletions app/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"@tanstack/svelte-query": "^5.55.4",
"@tanstack/svelte-table": "^8.20.5",
"@tanstack/svelte-virtual": "^3.10.7",
"@unionlabs/client": "^0.0.25",
"@unionlabs/client": "^0.0.26",
"@wagmi/connectors": "^5.1.11",
"@wagmi/core": "^2.13.5",
"bits-ui": "^0.21.13",
Expand Down
9 changes: 2 additions & 7 deletions devShell.nix
Original file line number Diff line number Diff line change
Expand Up @@ -20,19 +20,14 @@
echo "Applying biome fmt"
${lib.getExe biome} format . \
${lib.getExe biome} check . --write --unsafe \
--log-level="info" \
--log-kind="pretty" \
--error-on-warnings \
--diagnostic-level="info" \
--write
--diagnostic-level="info"
echo "Checking spelling"
nix build .\#checks.${pkgs.system}.spellcheck -L
echo "Running biome lint"
nix build .\#checks.${pkgs.system}.biome-lint -L
echo "Running Site Check"
nix run .\#site-check
Expand Down
6 changes: 6 additions & 0 deletions dictionary.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ Beriker
Bitfield
Bitvector
Bkpvid
Blex
Blured
Boiron
Boneh
Expand All @@ -43,8 +44,10 @@ Cosmoverse
Counterparties
Counterparty
Cpath
Cpolygon
Creds
Cryptopunkssvg
Csvg
Cypherpunk
DATADIR
DYLD
Expand All @@ -69,7 +72,9 @@ Fil
Filenaming
Founderheads
Frontmatter
Fsvg
Fuga
Fwww
GOARCH
GOPATH
GOPRIVATE
Expand Down Expand Up @@ -990,6 +995,7 @@ redelegates
redelegating
redelegation
redelegations
redy
reencode
reencoded
reentrancy
Expand Down
133 changes: 11 additions & 122 deletions docs/astro.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,10 @@ import vue from "@astrojs/vue"
import svelte from "@astrojs/svelte"
import sitemap from "@astrojs/sitemap"
import tailwind from "@astrojs/tailwind"
import starlight from "@astrojs/starlight"
import { defineConfig } from "astro/config"
import { starlightConfig } from "./starlight.config.ts"
import { markdownConfiguration } from "./markdown.config.ts"
import starlightHeadingBadges from "starlight-heading-badges"
import starlightLinksValidator from "starlight-links-validator"
import starlightLinksValidatorPlugin from "starlight-links-validator"

const SITE_URL = "https://docs.union.build"

Expand All @@ -28,6 +27,13 @@ export default defineConfig({
},
trailingSlash: "ignore",
markdown: markdownConfiguration,
vite: {
experimental: {},
optimizeDeps: {
include: ["@xterm/xterm"],
esbuildOptions: { target: "es2022" }
}
},
server: _ => ({
port: Number(PORT),
/**
Expand All @@ -43,125 +49,8 @@ export default defineConfig({
prefetch: { prefetchAll: true, defaultStrategy: "viewport" },
redirects: { "/logo": "/union-logo.zip" },
integrations: [
starlight({
title: "Union",
tagline: "Connecting blockchains trustlessly",
description:
"Union is a hyper-efficient, zero-knowledge interoperability layer that connects Appchains, Layer 1, and Layer 2 networks.",
favicon: "/favicon.svg",
lastUpdated: true,
editLink: {
baseUrl: "https://github.com/unionlabs/union/edit/main/docs/"
},
social: {
github: "https://github.com/unionlabs",
discord: "https://discord.union.build",
"x.com": "https://x.com/union_build"
},
head: [
{
tag: "meta",
attrs: {
name: "description",
content: "The Modular ZK Interoperability Layer"
}
},
{
tag: "meta",
attrs: { property: "og:image", content: `${SITE_URL}/og.png` }
},
{
tag: "meta",
attrs: { property: "twitter:image", content: `${SITE_URL}/og.png` }
},
{
tag: "script",
attrs: { src: "/scripts/anchor-targets.js" }
}
],
locales: {
root: { label: "English", lang: "en" }
},
defaultLocale: "root",
logo: {
alt: "Union Logo",
dark: "./src/assets/union-logo/union-logo-transparent.svg",
light: "./src/assets/union-logo/union-logo-white-transparent.svg"
},
sidebar: [
{
label: "Introduction",
link: "/"
},
{
label: "Architecture",
autogenerate: {
directory: "/architecture"
}
},
{
label: "Concepts",
autogenerate: {
directory: "/concepts"
}
},
{
label: "Infrastructure",
items: [
{
label: "Node Operators",
collapsed: true,
autogenerate: {
directory: "/infrastructure/node-operators"
}
}
]
},
{
label: "Integrations",
items: [
{
label: "Getting Started",
link: "/integrations/getting-started"
},
{
label: "TypeScript SDK",
link: "/integrations/typescript",
badge: { variant: "note", text: "new" }
},
{
label: "API",
collapsed: true,
autogenerate: {
directory: "/integrations/api"
}
},
{
label: "CometBFT",
collapsed: true,
autogenerate: {
directory: "/integrations/cometbft"
}
}
]
},
{
label: "Joining the Testnet",
collapsed: true,
autogenerate: {
directory: "/joining-testnet"
}
}
],
plugins: [starlightLinksValidator(), starlightHeadingBadges()],
customCss: [
"./src/styles/index.css",
"./src/styles/fonts.css",
"./src/styles/tailwind.css",
"./src/styles/starlight.css",
"./node_modules/katex/dist/katex.min.css"
]
}),
starlightConfig,
starlightLinksValidatorPlugin(),
sitemap(),
tailwind({
applyBaseStyles: false,
Expand Down
2 changes: 1 addition & 1 deletion docs/docs.nix
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
{
packages = {
docs = mkCi false (unstablePkgs.buildNpmPackage {
npmDepsHash = "sha256-YHawlfw4E8kaXb49bTSxgItGgUKTlHxAUqqkp2SZQkI=";
npmDepsHash = "sha256-kWiBtd+T9TLhtl4anOnGuBrT6TBVxFcgUncOUlLbfqI=";
src = ./.;
srcs = [ ./. ./../evm/. ./../networks/genesis/. ./../versions/. ];
sourceRoot = "docs";
Expand Down
18 changes: 0 additions & 18 deletions docs/ec.config.mjs

This file was deleted.

44 changes: 40 additions & 4 deletions docs/markdown.config.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
import {
transformerNotationDiff,
transformerMetaHighlight,
transformerNotationFocus,
transformerMetaWordHighlight,
transformerNotationHighlight,
transformerNotationErrorLevel,
transformerNotationWordHighlight
} from "@shikijs/transformers"
import remarkToc from "remark-toc"
import rehypeSlug from "rehype-slug"
import { visit } from "unist-util-visit"
Expand All @@ -8,25 +17,52 @@ import remarkSmartypants from "remark-smartypants"
import type { AstroUserConfig } from "astro/config"
import { escapeHTML } from "astro/runtime/server/escape.js"
import rehypeAutolinkHeadings from "rehype-autolink-headings"
import { rehypeHeadingIds, type RemarkPlugin } from "@astrojs/markdown-remark"
// import { transformerCopyButton } from "@rehype-pretty/transformers"
import { rendererRich, transformerTwoslash } from "@shikijs/twoslash"
import { rehypeHeadingIds, type RemarkPlugin, type ShikiConfig } from "@astrojs/markdown-remark"

type Markdown = AstroUserConfig["markdown"]

export const shikiConfig = {
theme: "houston",
transformers: [
transformerTwoslash({
explicitTrigger: /\btwoslash\b/,
renderer: rendererRich({ jsdoc: true })
}),
transformerNotationDiff(),
transformerMetaHighlight(),
transformerNotationFocus(),
transformerMetaWordHighlight(),
transformerNotationHighlight(),
transformerNotationErrorLevel(),
transformerNotationWordHighlight()
// transformerCopyButton({ visibility: "hover", feedbackDuration: 3_000 })
]
} satisfies ShikiConfig

export const markdownConfiguration = {
gfm: true,
shikiConfig,
smartypants: false,
syntaxHighlight: "shiki",
remarkRehype: {
allowDangerousHtml: true,
clobberPrefix: "union-docs-",
passThrough: ["code", "root"]
},
remarkPlugins: [
mermaid(),
remarkMathPlugin,
remarkSmartypants as RemarkPlugin,
[remarkToc, { heading: "contents", prefix: "toc-" }]
],
rehypePlugins: [
rehypeHeadingIds,
rehypeSlug,
[rehypeAutolinkHeadings, { behavior: "wrap" }],
rehypeHeadingIds,
rehypeKatexPlugin,
rehypeMathjaxPlugin
rehypeMathjaxPlugin,
[rehypeAutolinkHeadings, { behavior: "wrap" }]
]
} satisfies Markdown

Expand Down
Loading

0 comments on commit c9f1975

Please sign in to comment.