Skip to content

Commit f74dafa

Browse files
committed
feat: union and object types
1 parent b7c1d17 commit f74dafa

File tree

43 files changed

+8533
-686
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+8533
-686
lines changed

docs/.gitignore

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
dist
2+
.wrangler
3+
.output
4+
.vercel
5+
.netlify
6+
.vinxi
7+
app.config.timestamp_*.js
8+
9+
# Environment
10+
.env
11+
.env*.local
12+
13+
# dependencies
14+
/node_modules
15+
16+
# IDEs and editors
17+
/.idea
18+
.project
19+
.classpath
20+
*.launch
21+
.settings/
22+
23+
# Temp
24+
gitignore
25+
26+
# System Files
27+
.DS_Store
28+
Thumbs.db

docs/README.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# SolidStart
2+
3+
Everything you need to build a Solid project, powered by [`solid-start`](https://start.solidjs.com);
4+
5+
## Creating a project
6+
7+
```bash
8+
# create a new project in the current directory
9+
npm init solid@latest
10+
11+
# create a new project in my-app
12+
npm init solid@latest my-app
13+
```
14+
15+
## Developing
16+
17+
Once you've created a project and installed dependencies with `npm install` (or `pnpm install` or `yarn`), start a development server:
18+
19+
```bash
20+
npm run dev
21+
22+
# or start the server and open the app in a new browser tab
23+
npm run dev -- --open
24+
```
25+
26+
## Building
27+
28+
Solid apps are built with _presets_, which optimise your project for deployment to different environments.
29+
30+
By default, `npm run build` will generate a Node app that you can run with `npm start`. To use a different preset, add it to the `devDependencies` in `package.json` and specify in your `app.config.js`.
31+
32+
## This project was created with the [Solid CLI](https://solid-cli.netlify.app)

docs/app.config.ts

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
import { withSolidBase } from "@kobalte/solidbase/config";
2+
import { defineConfig } from "@solidjs/start/config";
3+
4+
export default defineConfig(withSolidBase(
5+
{},
6+
{
7+
title: "Solid-Docgen",
8+
description: "Documentation for Solid-Docgen",
9+
themeConfig: {
10+
nav: [
11+
{
12+
text: "Docs",
13+
link: "/guide",
14+
},
15+
{
16+
text: "Playground",
17+
link: "/playground",
18+
},
19+
],
20+
sidebar: {
21+
"/guide": {
22+
items: [
23+
{
24+
title: "Overview",
25+
collapsed: false,
26+
items: [
27+
{
28+
title: "About",
29+
link: "/",
30+
},
31+
{
32+
title: "Getting Started",
33+
link: "/getting-started",
34+
},
35+
],
36+
},
37+
],
38+
},
39+
},
40+
},
41+
}
42+
));

docs/package.json

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{
2+
"name": "solid-docgen-docs",
3+
"type": "module",
4+
"scripts": {
5+
"dev": "vinxi dev",
6+
"build": "vinxi build",
7+
"start": "vinxi start"
8+
},
9+
"dependencies": {
10+
"@kobalte/solidbase": "^0.2.6",
11+
"@solidjs/router": "^0.15.3",
12+
"@solidjs/start": "^1.1.0",
13+
"solid-js": "^1.9.5",
14+
"vinxi": "^0.5.3",
15+
"vite": "6.1.2"
16+
},
17+
"engines": {
18+
"node": ">=22"
19+
}
20+
}

docs/public/favicon.ico

664 Bytes
Binary file not shown.

docs/src/app.tsx

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import { SolidBaseRoot } from "@kobalte/solidbase/client";
2+
import { Router } from "@solidjs/router";
3+
import { FileRoutes } from "@solidjs/start/router";
4+
5+
export default function App() {
6+
return (
7+
<Router root={SolidBaseRoot}>
8+
<FileRoutes />
9+
</Router>
10+
);
11+
}

docs/src/entry-client.tsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
// @refresh reload
2+
import { mount, StartClient } from "@solidjs/start/client";
3+
4+
mount(() => <StartClient />, document.getElementById("app")!);

docs/src/entry-server.tsx

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
// @refresh reload
2+
import { getHtmlProps } from "@kobalte/solidbase/server";
3+
import { createHandler, StartServer } from "@solidjs/start/server";
4+
5+
export default createHandler(() => (
6+
<StartServer
7+
document={({ assets, children, scripts }) => (
8+
<html {...getHtmlProps()}>
9+
<head>
10+
<meta charset="utf-8" />
11+
<meta name="viewport" content="width=device-width, initial-scale=1" />
12+
<link rel="icon" href="/favicon.ico" />
13+
{assets}
14+
</head>
15+
<body>
16+
<div id="app">{children}</div>
17+
{scripts}
18+
</body>
19+
</html>
20+
)}
21+
/>
22+
));

docs/src/global.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/// <reference types="@solidjs/start/env" />

docs/src/routes/[...404].mdx

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
import { mdxComponents } from "@kobalte/solidbase/client";
2+
import { Dynamic } from "solid-js/web";
3+
4+
<HttpStatusCode code={404} />
5+
6+
# 404
7+
8+
:::danger[]
9+
No page here
10+
:::
11+
12+
Go <Dynamic component={mdxComponents.a} onClick={() => history.back()} href="#">back</Dynamic> or return [Home](/).

0 commit comments

Comments
 (0)