Skip to content

Commit c9f1975

Browse files
authored
feat: direct domestic transfers on evm and better docs (#2947)
2 parents 0d1ac9c + e737272 commit c9f1975

40 files changed

+9975
-9116
lines changed

app/app.nix

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
{
1010
packages = {
1111
app = unstablePkgs.buildNpmPackage {
12-
npmDepsHash = "sha256-KIxRD0SCb5yex5HmoZ3BbmNzyt7Y5RuZKdwuc3gtX78=";
12+
npmDepsHash = "sha256-DD7rjuzM5RSfubkK8hNH3qKAmEf3oy1e7hyR3gi9Kb0=";
1313
src = ./.;
1414
sourceRoot = "app";
1515
npmFlags = [ "--enable-pre-post-scripts" ];

app/package-lock.json

+4-4
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

app/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
"@tanstack/svelte-query": "^5.55.4",
2828
"@tanstack/svelte-table": "^8.20.5",
2929
"@tanstack/svelte-virtual": "^3.10.7",
30-
"@unionlabs/client": "^0.0.25",
30+
"@unionlabs/client": "^0.0.26",
3131
"@wagmi/connectors": "^5.1.11",
3232
"@wagmi/core": "^2.13.5",
3333
"bits-ui": "^0.21.13",

devShell.nix

+2-7
Original file line numberDiff line numberDiff line change
@@ -20,19 +20,14 @@
2020
2121
2222
echo "Applying biome fmt"
23-
${lib.getExe biome} format . \
23+
${lib.getExe biome} check . --write --unsafe \
2424
--log-level="info" \
2525
--log-kind="pretty" \
26-
--error-on-warnings \
27-
--diagnostic-level="info" \
28-
--write
26+
--diagnostic-level="info"
2927
3028
echo "Checking spelling"
3129
nix build .\#checks.${pkgs.system}.spellcheck -L
3230
33-
echo "Running biome lint"
34-
nix build .\#checks.${pkgs.system}.biome-lint -L
35-
3631
echo "Running Site Check"
3732
nix run .\#site-check
3833

dictionary.txt

+6
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ Beriker
1717
Bitfield
1818
Bitvector
1919
Bkpvid
20+
Blex
2021
Blured
2122
Boiron
2223
Boneh
@@ -43,8 +44,10 @@ Cosmoverse
4344
Counterparties
4445
Counterparty
4546
Cpath
47+
Cpolygon
4648
Creds
4749
Cryptopunkssvg
50+
Csvg
4851
Cypherpunk
4952
DATADIR
5053
DYLD
@@ -69,7 +72,9 @@ Fil
6972
Filenaming
7073
Founderheads
7174
Frontmatter
75+
Fsvg
7276
Fuga
77+
Fwww
7378
GOARCH
7479
GOPATH
7580
GOPRIVATE
@@ -990,6 +995,7 @@ redelegates
990995
redelegating
991996
redelegation
992997
redelegations
998+
redy
993999
reencode
9941000
reencoded
9951001
reentrancy

docs/astro.config.ts

+11-122
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,10 @@ import vue from "@astrojs/vue"
33
import svelte from "@astrojs/svelte"
44
import sitemap from "@astrojs/sitemap"
55
import tailwind from "@astrojs/tailwind"
6-
import starlight from "@astrojs/starlight"
76
import { defineConfig } from "astro/config"
7+
import { starlightConfig } from "./starlight.config.ts"
88
import { markdownConfiguration } from "./markdown.config.ts"
9-
import starlightHeadingBadges from "starlight-heading-badges"
10-
import starlightLinksValidator from "starlight-links-validator"
9+
import starlightLinksValidatorPlugin from "starlight-links-validator"
1110

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

@@ -28,6 +27,13 @@ export default defineConfig({
2827
},
2928
trailingSlash: "ignore",
3029
markdown: markdownConfiguration,
30+
vite: {
31+
experimental: {},
32+
optimizeDeps: {
33+
include: ["@xterm/xterm"],
34+
esbuildOptions: { target: "es2022" }
35+
}
36+
},
3137
server: _ => ({
3238
port: Number(PORT),
3339
/**
@@ -43,125 +49,8 @@ export default defineConfig({
4349
prefetch: { prefetchAll: true, defaultStrategy: "viewport" },
4450
redirects: { "/logo": "/union-logo.zip" },
4551
integrations: [
46-
starlight({
47-
title: "Union",
48-
tagline: "Connecting blockchains trustlessly",
49-
description:
50-
"Union is a hyper-efficient, zero-knowledge interoperability layer that connects Appchains, Layer 1, and Layer 2 networks.",
51-
favicon: "/favicon.svg",
52-
lastUpdated: true,
53-
editLink: {
54-
baseUrl: "https://github.com/unionlabs/union/edit/main/docs/"
55-
},
56-
social: {
57-
github: "https://github.com/unionlabs",
58-
discord: "https://discord.union.build",
59-
"x.com": "https://x.com/union_build"
60-
},
61-
head: [
62-
{
63-
tag: "meta",
64-
attrs: {
65-
name: "description",
66-
content: "The Modular ZK Interoperability Layer"
67-
}
68-
},
69-
{
70-
tag: "meta",
71-
attrs: { property: "og:image", content: `${SITE_URL}/og.png` }
72-
},
73-
{
74-
tag: "meta",
75-
attrs: { property: "twitter:image", content: `${SITE_URL}/og.png` }
76-
},
77-
{
78-
tag: "script",
79-
attrs: { src: "/scripts/anchor-targets.js" }
80-
}
81-
],
82-
locales: {
83-
root: { label: "English", lang: "en" }
84-
},
85-
defaultLocale: "root",
86-
logo: {
87-
alt: "Union Logo",
88-
dark: "./src/assets/union-logo/union-logo-transparent.svg",
89-
light: "./src/assets/union-logo/union-logo-white-transparent.svg"
90-
},
91-
sidebar: [
92-
{
93-
label: "Introduction",
94-
link: "/"
95-
},
96-
{
97-
label: "Architecture",
98-
autogenerate: {
99-
directory: "/architecture"
100-
}
101-
},
102-
{
103-
label: "Concepts",
104-
autogenerate: {
105-
directory: "/concepts"
106-
}
107-
},
108-
{
109-
label: "Infrastructure",
110-
items: [
111-
{
112-
label: "Node Operators",
113-
collapsed: true,
114-
autogenerate: {
115-
directory: "/infrastructure/node-operators"
116-
}
117-
}
118-
]
119-
},
120-
{
121-
label: "Integrations",
122-
items: [
123-
{
124-
label: "Getting Started",
125-
link: "/integrations/getting-started"
126-
},
127-
{
128-
label: "TypeScript SDK",
129-
link: "/integrations/typescript",
130-
badge: { variant: "note", text: "new" }
131-
},
132-
{
133-
label: "API",
134-
collapsed: true,
135-
autogenerate: {
136-
directory: "/integrations/api"
137-
}
138-
},
139-
{
140-
label: "CometBFT",
141-
collapsed: true,
142-
autogenerate: {
143-
directory: "/integrations/cometbft"
144-
}
145-
}
146-
]
147-
},
148-
{
149-
label: "Joining the Testnet",
150-
collapsed: true,
151-
autogenerate: {
152-
directory: "/joining-testnet"
153-
}
154-
}
155-
],
156-
plugins: [starlightLinksValidator(), starlightHeadingBadges()],
157-
customCss: [
158-
"./src/styles/index.css",
159-
"./src/styles/fonts.css",
160-
"./src/styles/tailwind.css",
161-
"./src/styles/starlight.css",
162-
"./node_modules/katex/dist/katex.min.css"
163-
]
164-
}),
52+
starlightConfig,
53+
starlightLinksValidatorPlugin(),
16554
sitemap(),
16655
tailwind({
16756
applyBaseStyles: false,

docs/docs.nix

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
{
1010
packages = {
1111
docs = mkCi false (unstablePkgs.buildNpmPackage {
12-
npmDepsHash = "sha256-YHawlfw4E8kaXb49bTSxgItGgUKTlHxAUqqkp2SZQkI=";
12+
npmDepsHash = "sha256-kWiBtd+T9TLhtl4anOnGuBrT6TBVxFcgUncOUlLbfqI=";
1313
src = ./.;
1414
srcs = [ ./. ./../evm/. ./../networks/genesis/. ./../versions/. ];
1515
sourceRoot = "docs";

docs/ec.config.mjs

-18
This file was deleted.

docs/markdown.config.ts

+40-4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
1+
import {
2+
transformerNotationDiff,
3+
transformerMetaHighlight,
4+
transformerNotationFocus,
5+
transformerMetaWordHighlight,
6+
transformerNotationHighlight,
7+
transformerNotationErrorLevel,
8+
transformerNotationWordHighlight
9+
} from "@shikijs/transformers"
110
import remarkToc from "remark-toc"
211
import rehypeSlug from "rehype-slug"
312
import { visit } from "unist-util-visit"
@@ -8,25 +17,52 @@ import remarkSmartypants from "remark-smartypants"
817
import type { AstroUserConfig } from "astro/config"
918
import { escapeHTML } from "astro/runtime/server/escape.js"
1019
import rehypeAutolinkHeadings from "rehype-autolink-headings"
11-
import { rehypeHeadingIds, type RemarkPlugin } from "@astrojs/markdown-remark"
20+
// import { transformerCopyButton } from "@rehype-pretty/transformers"
21+
import { rendererRich, transformerTwoslash } from "@shikijs/twoslash"
22+
import { rehypeHeadingIds, type RemarkPlugin, type ShikiConfig } from "@astrojs/markdown-remark"
1223

1324
type Markdown = AstroUserConfig["markdown"]
1425

26+
export const shikiConfig = {
27+
theme: "houston",
28+
transformers: [
29+
transformerTwoslash({
30+
explicitTrigger: /\btwoslash\b/,
31+
renderer: rendererRich({ jsdoc: true })
32+
}),
33+
transformerNotationDiff(),
34+
transformerMetaHighlight(),
35+
transformerNotationFocus(),
36+
transformerMetaWordHighlight(),
37+
transformerNotationHighlight(),
38+
transformerNotationErrorLevel(),
39+
transformerNotationWordHighlight()
40+
// transformerCopyButton({ visibility: "hover", feedbackDuration: 3_000 })
41+
]
42+
} satisfies ShikiConfig
43+
1544
export const markdownConfiguration = {
1645
gfm: true,
46+
shikiConfig,
1747
smartypants: false,
48+
syntaxHighlight: "shiki",
49+
remarkRehype: {
50+
allowDangerousHtml: true,
51+
clobberPrefix: "union-docs-",
52+
passThrough: ["code", "root"]
53+
},
1854
remarkPlugins: [
1955
mermaid(),
2056
remarkMathPlugin,
2157
remarkSmartypants as RemarkPlugin,
2258
[remarkToc, { heading: "contents", prefix: "toc-" }]
2359
],
2460
rehypePlugins: [
25-
rehypeHeadingIds,
2661
rehypeSlug,
27-
[rehypeAutolinkHeadings, { behavior: "wrap" }],
62+
rehypeHeadingIds,
2863
rehypeKatexPlugin,
29-
rehypeMathjaxPlugin
64+
rehypeMathjaxPlugin,
65+
[rehypeAutolinkHeadings, { behavior: "wrap" }]
3066
]
3167
} satisfies Markdown
3268

0 commit comments

Comments
 (0)