Skip to content

Commit

Permalink
feat: sharable graphql queries & doc theme (#2986)
Browse files Browse the repository at this point in the history
  • Loading branch information
cor authored Sep 27, 2024
2 parents 6c66b24 + 9a79d89 commit 5278188
Show file tree
Hide file tree
Showing 32 changed files with 1,488 additions and 463 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -78,3 +78,6 @@ db.sqlite3*
*/.movement
move/*/build
.tsup
docs/generated
dev-dist
.zed
43 changes: 38 additions & 5 deletions biome.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,18 @@
".sqlx",
"result",
"vendor",
".vercel",
"testdata",
"generated",
".svelte-kit",
"node_modules",
"**/generated/**",
"light-clients/**",
"package-lock.json",
"networks/genesis/**",
"./app/src/generated",
"lib/scroll-verifier/**",
"lib/ethereum-verifier/**",
"lib/tendermint-verifier/**",
"./lib/poseidon-rs/constants.json"
]
},
Expand Down Expand Up @@ -105,13 +110,19 @@
".sqlx",
"result",
"vendor",
".vercel",

"testdata",
"generated",
".svelte-kit",
"node_modules",
"**/generated/**",
"light-clients/**",
"package-lock.json",
"networks/genesis/**",
"./app/src/generated",
"lib/scroll-verifier/**",
"lib/ethereum-verifier/**",
"lib/tendermint-verifier/**",
"./lib/poseidon-rs/constants.json"
]
},
Expand Down Expand Up @@ -163,13 +174,19 @@
".sqlx",
"result",
"vendor",
".vercel",

"testdata",
"generated",
".svelte-kit",
"node_modules",
"**/generated/**",
"light-clients/**",
"package-lock.json",
"networks/genesis/**",
"./app/src/generated",
"lib/scroll-verifier/**",
"lib/ethereum-verifier/**",
"lib/tendermint-verifier/**",
"./lib/poseidon-rs/constants.json"
]
},
Expand Down Expand Up @@ -221,6 +238,7 @@
"correctness": {
"all": true,
"noNodejsModules": "off",
"noUnknownFunction": "off",
"noUnusedVariables": "off",
"noUndeclaredVariables": "off",
"noUndeclaredDependencies": "off"
Expand Down Expand Up @@ -277,14 +295,19 @@
".sqlx",
"result",
"vendor",
".vercel",

"testdata",
"generated",
"*-env.d.ts",
".svelte-kit",
"node_modules",
"**/generated/**",
"light-clients/**",
"package-lock.json",
"networks/genesis/**",
"./app/src/generated",
"lib/scroll-verifier/**",
"lib/ethereum-verifier/**",
"lib/tendermint-verifier/**",
"./lib/poseidon-rs/constants.json"
]
},
Expand Down Expand Up @@ -366,6 +389,16 @@
}
}
},
{
"include": ["*.jsx", "*.tsx"],
"linter": {
"rules": {
"suspicious": {
"noReactSpecificProps": "off"
}
}
}
},
{
"include": ["./app/src/lib/polyfill.ts"],
"linter": {
Expand Down
15 changes: 15 additions & 0 deletions dictionary.txt
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,7 @@ QUMGLDJ
Quickstart
Qyby
RUSTFLAGS
Rapide
Recvs
Redelegate
Redelegates
Expand Down Expand Up @@ -557,6 +558,7 @@ feegrants
fetchurl
fetchzip
fields
file
fileset
finalizer
flamegraph
Expand All @@ -571,6 +573,7 @@ founderheads
fpkmyvw
frontends
frunk
fullscreen
functionx
fuzzer
galois
Expand Down Expand Up @@ -620,6 +623,7 @@ gowork
graphcache
graphqlsp
graphqurl
grayscale
grecaptcha
groomlake
groth
Expand Down Expand Up @@ -740,6 +744,7 @@ keyof
keypair
keypairs
keypreimage
keyup
keyval
kichain
kujira
Expand Down Expand Up @@ -794,6 +799,7 @@ lowp
lspec
lucide
mapstructure
matchall
mathjax
maxage
maxdepth
Expand Down Expand Up @@ -832,8 +838,10 @@ monniker
monomorphized
moreutils
mosmo
mousedown
mouseleave
mousemove
mouseup
msgservice
msvc
muldefs
Expand Down Expand Up @@ -1009,6 +1017,7 @@ qxrx
qypy
rabby
randao
rapide
ratelimit
ratelimited
rawfile
Expand Down Expand Up @@ -1040,6 +1049,7 @@ relpath
repellendus
repr
reqwest
resizer
restaking
retryable
rgba
Expand Down Expand Up @@ -1212,6 +1222,7 @@ testificate
testkeeper
testkey
testutil
textbox
textclip
tfbindings
tfkeeper
Expand Down Expand Up @@ -1255,6 +1266,7 @@ tsdbadmin
tsqd
tsup
ttpfu
tutorialkit
twoslash
txes
txfees
Expand Down Expand Up @@ -1350,6 +1362,7 @@ valoper
valoperpub
vals
valset
vanillajs
varint
vaul
vercel
Expand All @@ -1374,6 +1387,7 @@ wasmtypes
wasmvm
wasmvmstatic
wasmvmtypes
weakref
webcontainer
webgl
webkit
Expand All @@ -1389,6 +1403,7 @@ xbonlulu
xion
xkaiserkarel
xkown
xlink
xlpa
xnever
xpla
Expand Down
67 changes: 50 additions & 17 deletions docs/astro.config.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { loadEnv } from "vite"
import vue from "@astrojs/vue"
import react from "@astrojs/react"
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 starlightThemeRapide from "starlight-theme-rapide"
import starlightUtils from "@lorenzo_lewis/starlight-utils"
import { markdownConfiguration } from "./markdown.config.ts"
import starlightHeadingBadges from "starlight-heading-badges"
Expand All @@ -31,10 +31,17 @@ export default defineConfig({
trailingSlash: "ignore",
markdown: markdownConfiguration,
vite: {
experimental: {},
ssr: {
noExternal: ["monaco-editor"]
},
optimizeDeps: {
include: ["@xterm/xterm"],
esbuildOptions: { target: "es2022" }
},
resolve: {
alias: {
path: "rollup-plugin-node-polyfills/polyfills/path"
}
}
},
server: _ => ({
Expand All @@ -59,6 +66,7 @@ export default defineConfig({
"Union is a hyper-efficient, zero-knowledge interoperability layer that connects Appchains, Layer 1, and Layer 2 networks.",
favicon: "/favicon.svg",
lastUpdated: true,
expressiveCode: false,
editLink: {
baseUrl: "https://github.com/unionlabs/union/edit/main/docs/"
},
Expand All @@ -71,18 +79,11 @@ export default defineConfig({
locales: { root: { label: "English", lang: "en" } },
logo: {
alt: "Union Logo",
dark: "./src/assets/union-logo/union-logo-transparent.svg",
light: "./src/assets/union-logo/union-logo-white-transparent.svg"
replacesTitle: true,
dark: "./src/assets/union-logo/union-logo-white.svg",
light: "./src/assets/union-logo/union-logo-black.svg"
},
expressiveCode: false,
head: [
{
tag: "meta",
attrs: {
name: "description",
content: "The Modular ZK Interoperability Layer"
}
},
{
tag: "meta",
attrs: { property: "og:image", content: "/og.png" }
Expand All @@ -94,6 +95,35 @@ export default defineConfig({
{
tag: "script",
attrs: { src: "/scripts/anchor-targets.js" }
},
{
tag: "link",
attrs: {
rel: "apple-touch-icon",
href: "/pwa-192x192.png"
}
},
{
tag: "link",
attrs: {
rel: "mask-icon",
href: "/favicon.svg",
color: "#FFFFFF"
}
},
{
tag: "meta",
attrs: {
name: "msapplication-TileColor",
content: "#131313"
}
},
{
tag: "meta",
attrs: {
name: "theme-color",
content: "#131313"
}
}
],
sidebar: [
Expand Down Expand Up @@ -177,6 +207,7 @@ export default defineConfig({
}
],
plugins: [
starlightThemeRapide(),
starlightUtils({
multiSidebar: {
switcherStyle: "horizontalList"
Expand All @@ -189,10 +220,10 @@ export default defineConfig({
"./src/styles/index.css",
"./src/styles/fonts.css",
"./src/styles/tailwind.css",
"./src/styles/twoslash.css",
// "./src/styles/twoslash.css",
"./src/styles/starlight.css",
"./node_modules/katex/dist/katex.min.css",
"./node_modules/@shikijs/twoslash/style-rich.css"
"./node_modules/katex/dist/katex.min.css"
// "./node_modules/@shikijs/twoslash/style-rich.css"
]
}),
sitemap(),
Expand All @@ -201,7 +232,9 @@ export default defineConfig({
configFile: "tailwind.config.ts"
}),
svelte(),
vue({ jsx: true, devtools: true }),
react({ experimentalReactChildren: true })
react({
include: ["**/react/**"],
experimentalReactChildren: true
})
]
})
6 changes: 3 additions & 3 deletions docs/docs.nix
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
_: {
perSystem =
{
lib,
pkgs,
mkCi,
unstablePkgs,
lib,
ensureAtRepositoryRoot,
mkCi,
...
}:
let
Expand All @@ -21,7 +21,7 @@ _: {
packages = {
docs = mkCi false (
unstablePkgs.buildNpmPackage {
npmDepsHash = "sha256-w9BqWfAUS+Ll1Im2plzzfQTPWLDCrKpAeJgjEhUEbH0=";
npmDepsHash = "sha256-bUGt5KeXa7O82cbG7XHYdmuMW/2YXMq3KcGp6HF2z9w=";
src = ./.;
srcs = [
./.
Expand Down
Loading

0 comments on commit 5278188

Please sign in to comment.