@lexibase/rdx-next 0.0.0-stage → 1.0.0-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +8 -0
- package/README.md +5 -2
- package/bin/rdx.mjs +50 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +0 -0
- package/dist/runtime/index.d.ts +13 -0
- package/dist/runtime/index.js +100 -0
- package/package.json +62 -3
- package/templates/runtime/app/docs/[[...slug]]/page.tsx +16 -0
- package/templates/runtime/app/globals.css +214 -0
- package/templates/runtime/app/layout.tsx +21 -0
- package/templates/runtime/app/page.tsx +5 -0
- package/templates/runtime/next.config.mjs +9 -0
- package/templates/runtime/tsconfig.json +17 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
The MIT License (MIT)
|
|
2
|
+
Copyright © 2025 Lexibase
|
|
3
|
+
|
|
4
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
5
|
+
|
|
6
|
+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
7
|
+
|
|
8
|
+
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,3 +1,6 @@
|
|
|
1
|
-
#
|
|
1
|
+
# `@rdx/next`
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
The official Next.js runtime for RDX documentation projects.
|
|
4
|
+
|
|
5
|
+
It exposes the `rdx` command used by generated projects to create their
|
|
6
|
+
internal `.rdx` application and run Next.js.
|
package/bin/rdx.mjs
ADDED
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
import { spawn } from 'node:child_process'
|
|
4
|
+
import { createRequire } from 'node:module'
|
|
5
|
+
import { cp, mkdir } from 'node:fs/promises'
|
|
6
|
+
import path from 'node:path'
|
|
7
|
+
import { fileURLToPath } from 'node:url'
|
|
8
|
+
import process from 'node:process'
|
|
9
|
+
|
|
10
|
+
const supportedCommands = new Set(['dev', 'build', 'start'])
|
|
11
|
+
const command = process.argv[2]
|
|
12
|
+
const commandArgs = process.argv.slice(3)
|
|
13
|
+
const projectRoot = process.cwd()
|
|
14
|
+
const packageRoot = path.resolve(
|
|
15
|
+
path.dirname(fileURLToPath(import.meta.url)),
|
|
16
|
+
'..'
|
|
17
|
+
)
|
|
18
|
+
const runtimeTemplate = path.join(packageRoot, 'templates', 'runtime')
|
|
19
|
+
const runtimeDirectory = path.join(projectRoot, '.rdx')
|
|
20
|
+
|
|
21
|
+
async function prepareRuntime() {
|
|
22
|
+
await mkdir(runtimeDirectory, { recursive: true })
|
|
23
|
+
await cp(runtimeTemplate, runtimeDirectory, { force: true, recursive: true })
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
if (command === 'prepare') {
|
|
27
|
+
await prepareRuntime()
|
|
28
|
+
console.log('RDX runtime prepared in .rdx/')
|
|
29
|
+
process.exit(0)
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
if (!command || !supportedCommands.has(command)) {
|
|
33
|
+
console.error('Usage: rdx <dev|build|start|prepare>')
|
|
34
|
+
process.exit(1)
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
await prepareRuntime()
|
|
38
|
+
|
|
39
|
+
const projectRequire = createRequire(path.join(projectRoot, 'package.json'))
|
|
40
|
+
const nextCli = projectRequire.resolve('next/dist/bin/next')
|
|
41
|
+
const child = spawn(
|
|
42
|
+
process.execPath,
|
|
43
|
+
[nextCli, command, runtimeDirectory, ...commandArgs],
|
|
44
|
+
{ cwd: projectRoot, stdio: 'inherit' }
|
|
45
|
+
)
|
|
46
|
+
|
|
47
|
+
child.on('exit', (code, signal) => {
|
|
48
|
+
if (signal) process.kill(process.pid, signal)
|
|
49
|
+
process.exit(code ?? 1)
|
|
50
|
+
})
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { RdxRuntimeConfig } from '@lexibase/rdx-types';
|
package/dist/index.js
ADDED
|
File without changes
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import { ReactNode } from 'react';
|
|
3
|
+
import { RdxRuntimeConfig } from '@lexibase/rdx-types';
|
|
4
|
+
|
|
5
|
+
declare function RdxLayout({ children, config, }: {
|
|
6
|
+
children: ReactNode;
|
|
7
|
+
config: RdxRuntimeConfig;
|
|
8
|
+
}): react_jsx_runtime.JSX.Element;
|
|
9
|
+
declare function DocsPage({ slug }: {
|
|
10
|
+
slug?: string[];
|
|
11
|
+
}): Promise<react_jsx_runtime.JSX.Element>;
|
|
12
|
+
|
|
13
|
+
export { DocsPage, RdxLayout };
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
// src/runtime/index.tsx
|
|
2
|
+
import { getDocument, getDocsIndex, getDocsPaths } from "@lexibase/rdx-core";
|
|
3
|
+
import { compileMDX } from "next-mdx-remote/rsc";
|
|
4
|
+
import Link from "next/link";
|
|
5
|
+
import { notFound } from "next/navigation";
|
|
6
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
7
|
+
var mdxComponents = {
|
|
8
|
+
h1: (props) => /* @__PURE__ */ jsx("h1", { ...props }),
|
|
9
|
+
h2: (props) => /* @__PURE__ */ jsx("h2", { ...props }),
|
|
10
|
+
h3: (props) => /* @__PURE__ */ jsx("h3", { ...props }),
|
|
11
|
+
p: (props) => /* @__PURE__ */ jsx("p", { ...props }),
|
|
12
|
+
ul: (props) => /* @__PURE__ */ jsx("ul", { ...props }),
|
|
13
|
+
ol: (props) => /* @__PURE__ */ jsx("ol", { ...props }),
|
|
14
|
+
li: (props) => /* @__PURE__ */ jsx("li", { ...props }),
|
|
15
|
+
blockquote: (props) => /* @__PURE__ */ jsx("blockquote", { ...props }),
|
|
16
|
+
pre: (props) => /* @__PURE__ */ jsx("pre", { ...props }),
|
|
17
|
+
code: (props) => /* @__PURE__ */ jsx("code", { ...props }),
|
|
18
|
+
a: ({ href, ...props }) => {
|
|
19
|
+
const isExternal = href?.startsWith("http");
|
|
20
|
+
return /* @__PURE__ */ jsx(
|
|
21
|
+
"a",
|
|
22
|
+
{
|
|
23
|
+
href,
|
|
24
|
+
rel: isExternal ? "noreferrer" : void 0,
|
|
25
|
+
target: isExternal ? "_blank" : void 0,
|
|
26
|
+
...props
|
|
27
|
+
}
|
|
28
|
+
);
|
|
29
|
+
}
|
|
30
|
+
};
|
|
31
|
+
function RdxLayout({
|
|
32
|
+
children,
|
|
33
|
+
config
|
|
34
|
+
}) {
|
|
35
|
+
const brand = config.navbar?.title || config.title;
|
|
36
|
+
return /* @__PURE__ */ jsx("html", { lang: "en", children: /* @__PURE__ */ jsxs("body", { children: [
|
|
37
|
+
/* @__PURE__ */ jsxs("header", { className: "rdx-header", children: [
|
|
38
|
+
/* @__PURE__ */ jsx(Link, { className: "rdx-brand", href: "/docs", children: brand }),
|
|
39
|
+
config.navbar?.actions?.github?.visible && config.navbar.actions.github.url && /* @__PURE__ */ jsx(
|
|
40
|
+
"a",
|
|
41
|
+
{
|
|
42
|
+
className: "rdx-github-link",
|
|
43
|
+
href: config.navbar.actions.github.url,
|
|
44
|
+
rel: "noreferrer",
|
|
45
|
+
target: "_blank",
|
|
46
|
+
children: "GitHub"
|
|
47
|
+
}
|
|
48
|
+
)
|
|
49
|
+
] }),
|
|
50
|
+
children
|
|
51
|
+
] }) });
|
|
52
|
+
}
|
|
53
|
+
async function DocsPage({ slug }) {
|
|
54
|
+
const categories = getDocsIndex();
|
|
55
|
+
const currentSlug = slug?.join("/") || getDocsPaths()[0];
|
|
56
|
+
if (!currentSlug) {
|
|
57
|
+
return /* @__PURE__ */ jsxs("main", { className: "rdx-empty-state", children: [
|
|
58
|
+
/* @__PURE__ */ jsx("h1", { children: "Your documentation is ready." }),
|
|
59
|
+
/* @__PURE__ */ jsx("p", { children: "Add an `.mdx` file inside `docs/` to create your first page." })
|
|
60
|
+
] });
|
|
61
|
+
}
|
|
62
|
+
const document = getDocument(currentSlug);
|
|
63
|
+
if (!document) notFound();
|
|
64
|
+
const { content } = await compileMDX({
|
|
65
|
+
source: document.content,
|
|
66
|
+
components: mdxComponents
|
|
67
|
+
});
|
|
68
|
+
const title = typeof document.frontmatter.title === "string" ? document.frontmatter.title : currentSlug;
|
|
69
|
+
const description = typeof document.frontmatter.description === "string" ? document.frontmatter.description : null;
|
|
70
|
+
return /* @__PURE__ */ jsxs("div", { className: "rdx-docs-layout", children: [
|
|
71
|
+
/* @__PURE__ */ jsx("aside", { className: "rdx-sidebar", "aria-label": "Documentation navigation", children: categories.map((category) => /* @__PURE__ */ jsxs("section", { className: "rdx-sidebar-category", children: [
|
|
72
|
+
/* @__PURE__ */ jsx("h2", { children: category.title }),
|
|
73
|
+
/* @__PURE__ */ jsx("ul", { children: category.pages.map((page) => {
|
|
74
|
+
const href = `/docs/${page.slug}`;
|
|
75
|
+
const isCurrentPage = page.slug === currentSlug;
|
|
76
|
+
return /* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsx(
|
|
77
|
+
Link,
|
|
78
|
+
{
|
|
79
|
+
"aria-current": isCurrentPage ? "page" : void 0,
|
|
80
|
+
className: isCurrentPage ? "is-active" : void 0,
|
|
81
|
+
href,
|
|
82
|
+
children: page.title
|
|
83
|
+
}
|
|
84
|
+
) }, page.slug);
|
|
85
|
+
}) })
|
|
86
|
+
] }, category.id)) }),
|
|
87
|
+
/* @__PURE__ */ jsxs("main", { className: "rdx-document", children: [
|
|
88
|
+
/* @__PURE__ */ jsxs("header", { className: "rdx-document-header", children: [
|
|
89
|
+
/* @__PURE__ */ jsx("p", { className: "rdx-breadcrumb", children: currentSlug }),
|
|
90
|
+
/* @__PURE__ */ jsx("h1", { children: title }),
|
|
91
|
+
description && /* @__PURE__ */ jsx("p", { className: "rdx-description", children: description })
|
|
92
|
+
] }),
|
|
93
|
+
/* @__PURE__ */ jsx("article", { className: "rdx-mdx-content", children: content })
|
|
94
|
+
] })
|
|
95
|
+
] });
|
|
96
|
+
}
|
|
97
|
+
export {
|
|
98
|
+
DocsPage,
|
|
99
|
+
RdxLayout
|
|
100
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,65 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lexibase/rdx-next",
|
|
3
|
-
"version": "
|
|
4
|
-
"
|
|
5
|
-
"
|
|
3
|
+
"version": "1.0.0-beta.1",
|
|
4
|
+
"description": "The Next.js runtime for RDX documentation projects.",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"type": "module",
|
|
7
|
+
"bin": {
|
|
8
|
+
"rdx": "./bin/rdx.mjs"
|
|
9
|
+
},
|
|
10
|
+
"exports": {
|
|
11
|
+
".": {
|
|
12
|
+
"types": "./dist/index.d.ts",
|
|
13
|
+
"import": "./dist/index.js"
|
|
14
|
+
},
|
|
15
|
+
"./runtime": {
|
|
16
|
+
"types": "./dist/runtime/index.d.ts",
|
|
17
|
+
"import": "./dist/runtime/index.js"
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
"files": [
|
|
21
|
+
"bin",
|
|
22
|
+
"dist",
|
|
23
|
+
"templates",
|
|
24
|
+
"README.md"
|
|
25
|
+
],
|
|
26
|
+
"dependencies": {
|
|
27
|
+
"next-mdx-remote": "^5.0.0",
|
|
28
|
+
"@lexibase/rdx-types": "1.0.0-beta.0",
|
|
29
|
+
"@lexibase/rdx-core": "1.0.0-beta.0"
|
|
30
|
+
},
|
|
31
|
+
"peerDependencies": {
|
|
32
|
+
"next": "^15.5.0",
|
|
33
|
+
"react": "^19.1.0",
|
|
34
|
+
"react-dom": "^19.1.0"
|
|
35
|
+
},
|
|
36
|
+
"publishConfig": {
|
|
37
|
+
"access": "public"
|
|
38
|
+
},
|
|
39
|
+
"repository": {
|
|
40
|
+
"type": "git",
|
|
41
|
+
"url": "git+https://github.com/lexibase/rdx.git",
|
|
42
|
+
"directory": "packages/rdx-next"
|
|
43
|
+
},
|
|
44
|
+
"bugs": {
|
|
45
|
+
"url": "https://github.com/lexibase/rdx/issues"
|
|
46
|
+
},
|
|
47
|
+
"homepage": "https://github.com/lexibase/rdx#readme",
|
|
48
|
+
"devDependencies": {
|
|
49
|
+
"@types/node": "^22.15.3",
|
|
50
|
+
"@types/react": "19.1.0",
|
|
51
|
+
"@types/react-dom": "19.1.1",
|
|
52
|
+
"eslint": "^9.34.0",
|
|
53
|
+
"next": "^15.5.0",
|
|
54
|
+
"react": "19.1.0",
|
|
55
|
+
"react-dom": "19.1.0",
|
|
56
|
+
"typescript": "5.9.2",
|
|
57
|
+
"@rdx/eslint-config": "1.0.0",
|
|
58
|
+
"@rdx/typescript-config": "1.0.0"
|
|
59
|
+
},
|
|
60
|
+
"scripts": {
|
|
61
|
+
"build": "tsup src/index.ts src/runtime/index.tsx --format esm --dts --clean --external @lexibase/rdx-core --external @lexibase/rdx-types --external next --external react --external react-dom --external next-mdx-remote",
|
|
62
|
+
"lint": "eslint . --max-warnings 0",
|
|
63
|
+
"check-types": "tsc --noEmit"
|
|
64
|
+
}
|
|
6
65
|
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { DocsPage } from '@lexibase/rdx-next/runtime'
|
|
2
|
+
import { getDocsPaths } from '@lexibase/rdx-core'
|
|
3
|
+
|
|
4
|
+
export function generateStaticParams() {
|
|
5
|
+
return getDocsPaths().map((slug) => ({ slug: slug.split('/') }))
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
export default async function DocumentationPage({
|
|
9
|
+
params,
|
|
10
|
+
}: {
|
|
11
|
+
params: Promise<{ slug?: string[] }>
|
|
12
|
+
}) {
|
|
13
|
+
const { slug } = await params
|
|
14
|
+
|
|
15
|
+
return <DocsPage slug={slug} />
|
|
16
|
+
}
|
|
@@ -0,0 +1,214 @@
|
|
|
1
|
+
:root {
|
|
2
|
+
--rdx-background: #ffffff;
|
|
3
|
+
--rdx-foreground: #171717;
|
|
4
|
+
--rdx-muted: #666666;
|
|
5
|
+
--rdx-border: #e7e7e7;
|
|
6
|
+
--rdx-accent: #f5f5f5;
|
|
7
|
+
--rdx-link: #0f5ed8;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
@media (prefers-color-scheme: dark) {
|
|
11
|
+
:root {
|
|
12
|
+
--rdx-background: #121212;
|
|
13
|
+
--rdx-foreground: #f4f4f5;
|
|
14
|
+
--rdx-muted: #a1a1aa;
|
|
15
|
+
--rdx-border: #303033;
|
|
16
|
+
--rdx-accent: #202022;
|
|
17
|
+
--rdx-link: #7bb0ff;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
* {
|
|
22
|
+
box-sizing: border-box;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
html,
|
|
26
|
+
body {
|
|
27
|
+
margin: 0;
|
|
28
|
+
min-height: 100%;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
body {
|
|
32
|
+
background: var(--rdx-background);
|
|
33
|
+
color: var(--rdx-foreground);
|
|
34
|
+
font-family: Arial, Helvetica, sans-serif;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
a {
|
|
38
|
+
color: inherit;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.rdx-header {
|
|
42
|
+
align-items: center;
|
|
43
|
+
border-bottom: 1px solid var(--rdx-border);
|
|
44
|
+
display: flex;
|
|
45
|
+
height: 60px;
|
|
46
|
+
justify-content: space-between;
|
|
47
|
+
padding: 0 24px;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.rdx-brand {
|
|
51
|
+
font-size: 1.1rem;
|
|
52
|
+
font-weight: 700;
|
|
53
|
+
text-decoration: none;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
.rdx-github-link {
|
|
57
|
+
color: var(--rdx-muted);
|
|
58
|
+
font-size: 0.9rem;
|
|
59
|
+
text-decoration: none;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
.rdx-docs-layout {
|
|
63
|
+
display: grid;
|
|
64
|
+
grid-template-columns: minmax(190px, 250px) minmax(0, 1fr);
|
|
65
|
+
min-height: calc(100vh - 60px);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
.rdx-sidebar {
|
|
69
|
+
border-right: 1px solid var(--rdx-border);
|
|
70
|
+
padding: 24px;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
.rdx-sidebar-category + .rdx-sidebar-category {
|
|
74
|
+
border-top: 1px solid var(--rdx-border);
|
|
75
|
+
margin-top: 20px;
|
|
76
|
+
padding-top: 20px;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
.rdx-sidebar h2 {
|
|
80
|
+
color: var(--rdx-muted);
|
|
81
|
+
font-size: 0.72rem;
|
|
82
|
+
letter-spacing: 0.08em;
|
|
83
|
+
margin: 0 0 8px;
|
|
84
|
+
text-transform: uppercase;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
.rdx-sidebar ul {
|
|
88
|
+
list-style: none;
|
|
89
|
+
margin: 0;
|
|
90
|
+
padding: 0;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
.rdx-sidebar a {
|
|
94
|
+
border-radius: 6px;
|
|
95
|
+
display: block;
|
|
96
|
+
font-size: 0.92rem;
|
|
97
|
+
padding: 7px 8px;
|
|
98
|
+
text-decoration: none;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
.rdx-sidebar a:hover,
|
|
102
|
+
.rdx-sidebar a.is-active {
|
|
103
|
+
background: var(--rdx-accent);
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
.rdx-sidebar a.is-active {
|
|
107
|
+
font-weight: 600;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
.rdx-document,
|
|
111
|
+
.rdx-empty-state {
|
|
112
|
+
margin: 0 auto;
|
|
113
|
+
max-width: 860px;
|
|
114
|
+
padding: 56px 40px 80px;
|
|
115
|
+
width: 100%;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
.rdx-document-header {
|
|
119
|
+
border-bottom: 1px solid var(--rdx-border);
|
|
120
|
+
margin-bottom: 36px;
|
|
121
|
+
padding-bottom: 28px;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
.rdx-document-header h1,
|
|
125
|
+
.rdx-mdx-content h1 {
|
|
126
|
+
font-size: clamp(2rem, 5vw, 3rem);
|
|
127
|
+
letter-spacing: -0.04em;
|
|
128
|
+
line-height: 1.1;
|
|
129
|
+
margin: 0;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
.rdx-breadcrumb {
|
|
133
|
+
color: var(--rdx-muted);
|
|
134
|
+
font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
|
|
135
|
+
font-size: 0.8rem;
|
|
136
|
+
margin: 0 0 12px;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
.rdx-description {
|
|
140
|
+
color: var(--rdx-muted);
|
|
141
|
+
font-size: 1.05rem;
|
|
142
|
+
line-height: 1.6;
|
|
143
|
+
margin: 14px 0 0;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
.rdx-mdx-content {
|
|
147
|
+
font-size: 1rem;
|
|
148
|
+
line-height: 1.75;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
.rdx-mdx-content h2,
|
|
152
|
+
.rdx-mdx-content h3 {
|
|
153
|
+
letter-spacing: -0.02em;
|
|
154
|
+
line-height: 1.25;
|
|
155
|
+
margin: 2.2em 0 0.7em;
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
.rdx-mdx-content p,
|
|
159
|
+
.rdx-mdx-content ul,
|
|
160
|
+
.rdx-mdx-content ol {
|
|
161
|
+
margin: 1em 0;
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
.rdx-mdx-content li + li {
|
|
165
|
+
margin-top: 0.4em;
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
.rdx-mdx-content a {
|
|
169
|
+
color: var(--rdx-link);
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
.rdx-mdx-content blockquote {
|
|
173
|
+
border-left: 3px solid var(--rdx-border);
|
|
174
|
+
color: var(--rdx-muted);
|
|
175
|
+
margin: 1.5em 0;
|
|
176
|
+
padding-left: 16px;
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
.rdx-mdx-content code {
|
|
180
|
+
background: var(--rdx-accent);
|
|
181
|
+
border-radius: 4px;
|
|
182
|
+
font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
|
|
183
|
+
font-size: 0.9em;
|
|
184
|
+
padding: 0.16em 0.35em;
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
.rdx-mdx-content pre {
|
|
188
|
+
background: var(--rdx-accent);
|
|
189
|
+
border: 1px solid var(--rdx-border);
|
|
190
|
+
border-radius: 8px;
|
|
191
|
+
overflow-x: auto;
|
|
192
|
+
padding: 16px;
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
.rdx-mdx-content pre code {
|
|
196
|
+
background: transparent;
|
|
197
|
+
padding: 0;
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
@media (max-width: 720px) {
|
|
201
|
+
.rdx-docs-layout {
|
|
202
|
+
display: block;
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
.rdx-sidebar {
|
|
206
|
+
border-bottom: 1px solid var(--rdx-border);
|
|
207
|
+
border-right: 0;
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
.rdx-document,
|
|
211
|
+
.rdx-empty-state {
|
|
212
|
+
padding: 36px 24px 60px;
|
|
213
|
+
}
|
|
214
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { Metadata } from 'next'
|
|
2
|
+
|
|
3
|
+
import { RdxLayout } from '@lexibase/rdx-next/runtime'
|
|
4
|
+
|
|
5
|
+
import config from '../../rdx.config'
|
|
6
|
+
|
|
7
|
+
import './globals.css'
|
|
8
|
+
|
|
9
|
+
export const metadata: Metadata = {
|
|
10
|
+
title: {
|
|
11
|
+
default: config.title,
|
|
12
|
+
template: `%s | ${config.title}`,
|
|
13
|
+
},
|
|
14
|
+
description: config.description,
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export default function RootLayout({
|
|
18
|
+
children,
|
|
19
|
+
}: Readonly<{ children: React.ReactNode }>) {
|
|
20
|
+
return <RdxLayout config={config}>{children}</RdxLayout>
|
|
21
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"allowJs": true,
|
|
4
|
+
"esModuleInterop": true,
|
|
5
|
+
"jsx": "preserve",
|
|
6
|
+
"lib": ["dom", "dom.iterable", "esnext"],
|
|
7
|
+
"module": "esnext",
|
|
8
|
+
"moduleResolution": "bundler",
|
|
9
|
+
"noEmit": true,
|
|
10
|
+
"plugins": [{ "name": "next" }],
|
|
11
|
+
"resolveJsonModule": true,
|
|
12
|
+
"strict": true,
|
|
13
|
+
"target": "esnext"
|
|
14
|
+
},
|
|
15
|
+
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"],
|
|
16
|
+
"exclude": ["node_modules"]
|
|
17
|
+
}
|