@axerity/cli 0.1.0
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 +21 -0
- package/README.md +1 -0
- package/axerity.default.json +135 -0
- package/axerity.schema.json +268 -0
- package/bin/axerity.js +305 -0
- package/mdsvex.config.js +261 -0
- package/package.json +103 -0
- package/scripts/prepare-engine.mjs +20 -0
- package/src/app.d.ts +17 -0
- package/src/app.html +39 -0
- package/src/content/demo/api/meta.json +5 -0
- package/src/content/demo/api/pet/add-pet.md +105 -0
- package/src/content/demo/api/pet/delete-pet.md +70 -0
- package/src/content/demo/api/pet/find-by-status.md +72 -0
- package/src/content/demo/api/pet/find-by-tags.md +64 -0
- package/src/content/demo/api/pet/get-pet.md +99 -0
- package/src/content/demo/api/pet/meta.json +15 -0
- package/src/content/demo/api/pet/pet-object.md +112 -0
- package/src/content/demo/api/pet/update-pet-with-form.md +69 -0
- package/src/content/demo/api/pet/update-pet.md +79 -0
- package/src/content/demo/api/pet/upload-image.md +79 -0
- package/src/content/demo/api/store/delete-order.md +62 -0
- package/src/content/demo/api/store/get-order.md +70 -0
- package/src/content/demo/api/store/inventory.md +54 -0
- package/src/content/demo/api/store/meta.json +5 -0
- package/src/content/demo/api/store/order-object.md +77 -0
- package/src/content/demo/api/store/place-order.md +83 -0
- package/src/content/demo/api/user/create-user.md +69 -0
- package/src/content/demo/api/user/create-with-list.md +57 -0
- package/src/content/demo/api/user/delete-user.md +61 -0
- package/src/content/demo/api/user/get-user.md +69 -0
- package/src/content/demo/api/user/login.md +80 -0
- package/src/content/demo/api/user/logout.md +45 -0
- package/src/content/demo/api/user/meta.json +14 -0
- package/src/content/demo/api/user/update-user.md +69 -0
- package/src/content/demo/api/user/user-object.md +85 -0
- package/src/content/demo/changelog.md +44 -0
- package/src/content/demo/components/accordion.md +70 -0
- package/src/content/demo/components/api.md +185 -0
- package/src/content/demo/components/badge.md +34 -0
- package/src/content/demo/components/callout.md +83 -0
- package/src/content/demo/components/cards.md +88 -0
- package/src/content/demo/components/code-group.md +55 -0
- package/src/content/demo/components/columns.md +42 -0
- package/src/content/demo/components/frame.md +51 -0
- package/src/content/demo/components/icon.md +54 -0
- package/src/content/demo/components/kbd.md +28 -0
- package/src/content/demo/components/meta.json +26 -0
- package/src/content/demo/components/roadmap.md +86 -0
- package/src/content/demo/components/steps.md +72 -0
- package/src/content/demo/components/tabs.md +146 -0
- package/src/content/demo/components/tooltip.md +44 -0
- package/src/content/demo/components/tree.md +83 -0
- package/src/content/demo/components/type-table.md +77 -0
- package/src/content/demo/components/update.md +48 -0
- package/src/content/demo/components/video.md +56 -0
- package/src/content/demo/components/webhooks.md +109 -0
- package/src/content/demo/components/websockets.md +101 -0
- package/src/content/demo/configuration/ai.md +40 -0
- package/src/content/demo/configuration/cli.md +46 -0
- package/src/content/demo/configuration/deployment.md +105 -0
- package/src/content/demo/configuration/index.md +92 -0
- package/src/content/demo/configuration/layouts.md +51 -0
- package/src/content/demo/configuration/meta.json +5 -0
- package/src/content/demo/configuration/navigation.md +167 -0
- package/src/content/demo/configuration/openapi.md +103 -0
- package/src/content/demo/configuration/search.md +36 -0
- package/src/content/demo/index.md +59 -0
- package/src/content/demo/installation.md +49 -0
- package/src/content/demo/meta.json +15 -0
- package/src/content/demo/quick-start.md +47 -0
- package/src/content/demo/theming/advanced.md +116 -0
- package/src/content/demo/theming/code.md +66 -0
- package/src/content/demo/theming/colors.md +103 -0
- package/src/content/demo/theming/index.md +88 -0
- package/src/content/demo/theming/layout.md +71 -0
- package/src/content/demo/theming/meta.json +5 -0
- package/src/content/demo/theming/themes.md +99 -0
- package/src/content/demo/theming/typography.md +83 -0
- package/src/content/demo/writing/code-blocks.md +154 -0
- package/src/content/demo/writing/diagrams.md +44 -0
- package/src/content/demo/writing/frontmatter.md +33 -0
- package/src/content/demo/writing/markdown.md +62 -0
- package/src/content/demo/writing/meta.json +5 -0
- package/src/hooks.server.ts +49 -0
- package/src/lib/assets/favicon.svg +1 -0
- package/src/lib/base.ts +12 -0
- package/src/lib/components/DynamicIcon.svelte +26 -0
- package/src/lib/components/docs/Analytics.svelte +38 -0
- package/src/lib/components/docs/Banner.svelte +44 -0
- package/src/lib/components/docs/Breadcrumbs.svelte +38 -0
- package/src/lib/components/docs/CopyPageMenu.svelte +119 -0
- package/src/lib/components/docs/DocsLayout.svelte +192 -0
- package/src/lib/components/docs/Footer.svelte +60 -0
- package/src/lib/components/docs/Mermaid.svelte +39 -0
- package/src/lib/components/docs/Navbar.svelte +144 -0
- package/src/lib/components/docs/PageMeta.svelte +35 -0
- package/src/lib/components/docs/PageNav.svelte +44 -0
- package/src/lib/components/docs/SearchDialog.svelte +182 -0
- package/src/lib/components/docs/Sidebar.svelte +85 -0
- package/src/lib/components/docs/SidebarDropdown.svelte +56 -0
- package/src/lib/components/docs/SidebarFooterLinks.svelte +19 -0
- package/src/lib/components/docs/SidebarGroup.svelte +54 -0
- package/src/lib/components/docs/SidebarLink.svelte +67 -0
- package/src/lib/components/docs/TableOfContents.svelte +77 -0
- package/src/lib/components/docs/ThemeToggle.svelte +19 -0
- package/src/lib/components/docs/VersionSwitcher.svelte +80 -0
- package/src/lib/components/kit/Accordion.svelte +60 -0
- package/src/lib/components/kit/AccordionGroup.svelte +13 -0
- package/src/lib/components/kit/Badge.svelte +32 -0
- package/src/lib/components/kit/Callout.svelte +51 -0
- package/src/lib/components/kit/Card.svelte +72 -0
- package/src/lib/components/kit/CardGroup.svelte +21 -0
- package/src/lib/components/kit/CodeGroup.svelte +65 -0
- package/src/lib/components/kit/Columns.svelte +26 -0
- package/src/lib/components/kit/Event.svelte +23 -0
- package/src/lib/components/kit/EventList.svelte +9 -0
- package/src/lib/components/kit/File.svelte +15 -0
- package/src/lib/components/kit/Folder.svelte +46 -0
- package/src/lib/components/kit/Frame.svelte +81 -0
- package/src/lib/components/kit/Icon.svelte +17 -0
- package/src/lib/components/kit/Kbd.svelte +11 -0
- package/src/lib/components/kit/Roadmap.svelte +15 -0
- package/src/lib/components/kit/RoadmapItem.svelte +109 -0
- package/src/lib/components/kit/Step.svelte +63 -0
- package/src/lib/components/kit/Steps.svelte +16 -0
- package/src/lib/components/kit/Tab.svelte +27 -0
- package/src/lib/components/kit/Tabs.svelte +75 -0
- package/src/lib/components/kit/Tooltip.svelte +33 -0
- package/src/lib/components/kit/Tree.svelte +11 -0
- package/src/lib/components/kit/TypeTable.svelte +187 -0
- package/src/lib/components/kit/Update.svelte +32 -0
- package/src/lib/components/kit/Video.svelte +64 -0
- package/src/lib/components/kit/accordion-context.ts +1 -0
- package/src/lib/components/kit/api/Api.svelte +80 -0
- package/src/lib/components/kit/api/ApiExamplePanel.svelte +100 -0
- package/src/lib/components/kit/api/ApiField.svelte +124 -0
- package/src/lib/components/kit/api/Channel.svelte +121 -0
- package/src/lib/components/kit/api/Endpoint.svelte +116 -0
- package/src/lib/components/kit/api/Enum.svelte +44 -0
- package/src/lib/components/kit/api/EnumValues.svelte +35 -0
- package/src/lib/components/kit/api/Expandable.svelte +70 -0
- package/src/lib/components/kit/api/Message.svelte +67 -0
- package/src/lib/components/kit/api/ObjectExample.svelte +11 -0
- package/src/lib/components/kit/api/RequestExample.svelte +11 -0
- package/src/lib/components/kit/api/ResponseExample.svelte +11 -0
- package/src/lib/components/kit/api/Webhook.svelte +115 -0
- package/src/lib/components/kit/api/api-context.ts +15 -0
- package/src/lib/components/kit/tabs-context.ts +8 -0
- package/src/lib/components/kit/tabs-store.svelte.ts +28 -0
- package/src/lib/config/site.ts +34 -0
- package/src/lib/content/index.ts +50 -0
- package/src/lib/content/raw.ts +21 -0
- package/src/lib/content/tree.ts +169 -0
- package/src/lib/index.ts +79 -0
- package/src/lib/nav-match.ts +23 -0
- package/src/lib/openapi/generate.ts +629 -0
- package/src/lib/server/og.ts +140 -0
- package/src/lib/state/search.svelte.ts +9 -0
- package/src/lib/state/theme.svelte.ts +58 -0
- package/src/lib/types.ts +216 -0
- package/src/params/docpage.ts +3 -0
- package/src/params/mdfile.ts +3 -0
- package/src/routes/+error.svelte +46 -0
- package/src/routes/+layout.svelte +25 -0
- package/src/routes/[...path=mdfile]/+server.ts +21 -0
- package/src/routes/[...slug=docpage]/+page.svelte +63 -0
- package/src/routes/[...slug=docpage]/+page.ts +44 -0
- package/src/routes/layout.css +897 -0
- package/src/routes/llms-full.txt/+server.ts +22 -0
- package/src/routes/llms.txt/+server.ts +20 -0
- package/src/routes/og/[...slug]/+server.ts +77 -0
- package/src/routes/rss.xml/+server.ts +65 -0
- package/src/routes/search.json/+server.ts +54 -0
- package/src/routes/sitemap.xml/+server.ts +21 -0
- package/static/favicon-dark.svg +6 -0
- package/static/favicon-light.svg +6 -0
- package/static/favicon.svg +14 -0
- package/static/fonts/geist-400.ttf +0 -0
- package/static/fonts/geist-600.ttf +0 -0
- package/static/fonts/geist-700.ttf +0 -0
- package/static/og-image.png +0 -0
- package/static/robots.txt +4 -0
- package/svelte.config.js +35 -0
- package/tsconfig.json +20 -0
- package/vite.config.ts +46 -0
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Tabs
|
|
3
|
+
description: Switch between alternative content in place.
|
|
4
|
+
icon: layers
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
<script>
|
|
8
|
+
import { Tabs, Tab } from '$lib';
|
|
9
|
+
</script>
|
|
10
|
+
|
|
11
|
+
# Tabs
|
|
12
|
+
|
|
13
|
+
Tabs let readers switch between alternative content, package managers, OSes, or
|
|
14
|
+
languages, without leaving the page.
|
|
15
|
+
|
|
16
|
+
## Example
|
|
17
|
+
|
|
18
|
+
<Tabs>
|
|
19
|
+
<Tab title="pnpm">
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
pnpm add axerity
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
</Tab>
|
|
26
|
+
<Tab title="npm">
|
|
27
|
+
|
|
28
|
+
```bash
|
|
29
|
+
npm install axerity
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
</Tab>
|
|
33
|
+
<Tab title="yarn">
|
|
34
|
+
|
|
35
|
+
```bash
|
|
36
|
+
yarn add axerity
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
</Tab>
|
|
40
|
+
|
|
41
|
+
</Tabs>
|
|
42
|
+
|
|
43
|
+
The first tab is selected by default.
|
|
44
|
+
|
|
45
|
+
## Icons
|
|
46
|
+
|
|
47
|
+
Give a `Tab` an `icon` (any Lucide name) to show a glyph next to its label:
|
|
48
|
+
|
|
49
|
+
<Tabs>
|
|
50
|
+
<Tab title="TypeScript" icon="code">
|
|
51
|
+
|
|
52
|
+
```ts
|
|
53
|
+
export const x: number = 1;
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
</Tab>
|
|
57
|
+
<Tab title="Config" icon="file-text">
|
|
58
|
+
|
|
59
|
+
```json
|
|
60
|
+
{ "x": 1 }
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
</Tab>
|
|
64
|
+
|
|
65
|
+
</Tabs>
|
|
66
|
+
|
|
67
|
+
## Shared & persistent groups
|
|
68
|
+
|
|
69
|
+
Give multiple `Tabs` the same `group` and they sync, picking a tab in one
|
|
70
|
+
switches every other group on the page, and the choice is **remembered across
|
|
71
|
+
reloads** (via `localStorage`). Tabs are matched by title.
|
|
72
|
+
|
|
73
|
+
<Tabs group="pm">
|
|
74
|
+
<Tab title="pnpm">
|
|
75
|
+
|
|
76
|
+
```bash
|
|
77
|
+
pnpm add axerity
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
</Tab>
|
|
81
|
+
<Tab title="npm">
|
|
82
|
+
|
|
83
|
+
```bash
|
|
84
|
+
npm install axerity
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
</Tab>
|
|
88
|
+
|
|
89
|
+
</Tabs>
|
|
90
|
+
|
|
91
|
+
<Tabs group="pm">
|
|
92
|
+
<Tab title="pnpm">
|
|
93
|
+
|
|
94
|
+
```bash
|
|
95
|
+
pnpm dev
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
</Tab>
|
|
99
|
+
<Tab title="npm">
|
|
100
|
+
|
|
101
|
+
```bash
|
|
102
|
+
npm run dev
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
</Tab>
|
|
106
|
+
|
|
107
|
+
</Tabs>
|
|
108
|
+
|
|
109
|
+
Switch one of the two blocks above, the other follows.
|
|
110
|
+
|
|
111
|
+
## Usage
|
|
112
|
+
|
|
113
|
+
Import `Tabs` and `Tab`, then give each `Tab` a `title`. Remember the blank
|
|
114
|
+
lines around tab content so the Markdown inside is parsed:
|
|
115
|
+
|
|
116
|
+
````md
|
|
117
|
+
<script>
|
|
118
|
+
import { Tabs, Tab } from '$lib';
|
|
119
|
+
</script>
|
|
120
|
+
|
|
121
|
+
<Tabs>
|
|
122
|
+
<Tab title="pnpm">
|
|
123
|
+
|
|
124
|
+
```bash
|
|
125
|
+
pnpm add axerity
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
</Tab>
|
|
129
|
+
<Tab title="npm">
|
|
130
|
+
|
|
131
|
+
```bash
|
|
132
|
+
npm install axerity
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
</Tab>
|
|
136
|
+
|
|
137
|
+
</Tabs>
|
|
138
|
+
````
|
|
139
|
+
|
|
140
|
+
## Props
|
|
141
|
+
|
|
142
|
+
| Component | Prop | Description |
|
|
143
|
+
| --------- | ------- | ----------------------------------------------- |
|
|
144
|
+
| `Tabs` | `group` | Sync + persist selection across same-group tabs |
|
|
145
|
+
| `Tab` | `title` | Tab label (required) |
|
|
146
|
+
| `Tab` | `icon` | Optional Lucide icon name |
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Tooltip
|
|
3
|
+
description: Show a short hint when a reader hovers or focuses a word.
|
|
4
|
+
icon: message-circle
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
<script>
|
|
8
|
+
import { Tooltip } from '$lib';
|
|
9
|
+
</script>
|
|
10
|
+
|
|
11
|
+
# Tooltip
|
|
12
|
+
|
|
13
|
+
Tooltips attach a short note to a word or phrase. The note stays hidden until the
|
|
14
|
+
reader hovers the trigger or moves keyboard focus onto it. Use them for quick
|
|
15
|
+
definitions and asides that would clutter the sentence if written inline.
|
|
16
|
+
|
|
17
|
+
## Example
|
|
18
|
+
|
|
19
|
+
The request returns a <Tooltip tip="JavaScript Object Notation, a plain text data format.">JSON</Tooltip> body with the pet record. Hover the dotted word to read the hint.
|
|
20
|
+
|
|
21
|
+
## Usage
|
|
22
|
+
|
|
23
|
+
```svelte
|
|
24
|
+
<script>
|
|
25
|
+
import { Tooltip } from '$lib';
|
|
26
|
+
</script>
|
|
27
|
+
|
|
28
|
+
The request returns a <Tooltip tip="JavaScript Object Notation.">JSON</Tooltip> body.
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
The text between the tags is the trigger. It gets a dotted underline so readers
|
|
32
|
+
know there is more to see. The `tip` text is the note that appears above it.
|
|
33
|
+
|
|
34
|
+
## Keyboard and screen readers
|
|
35
|
+
|
|
36
|
+
The trigger is a real button, so it is reachable with the Tab key and the note
|
|
37
|
+
shows on focus as well as hover. The `tip` is also exposed as the button's label,
|
|
38
|
+
so screen readers announce it.
|
|
39
|
+
|
|
40
|
+
## Props
|
|
41
|
+
|
|
42
|
+
| Prop | Type | Description |
|
|
43
|
+
| ----- | -------- | ------------------------ |
|
|
44
|
+
| `tip` | `string` | The hint text (required) |
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: File tree
|
|
3
|
+
description: Show a folder and file layout the way it looks on disk.
|
|
4
|
+
icon: folder-tree
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
<script>
|
|
8
|
+
import { Tree, Folder, File } from '$lib';
|
|
9
|
+
</script>
|
|
10
|
+
|
|
11
|
+
# File tree
|
|
12
|
+
|
|
13
|
+
A file tree shows how files and folders are arranged. Use it to point readers to
|
|
14
|
+
the right place in a project without making them guess.
|
|
15
|
+
|
|
16
|
+
## Example
|
|
17
|
+
|
|
18
|
+
<Tree>
|
|
19
|
+
<Folder name="src" defaultOpen>
|
|
20
|
+
<Folder name="content">
|
|
21
|
+
<Folder name="docs">
|
|
22
|
+
<File name="index.md" />
|
|
23
|
+
<File name="installation.md" />
|
|
24
|
+
</Folder>
|
|
25
|
+
</Folder>
|
|
26
|
+
<Folder name="lib">
|
|
27
|
+
<File name="index.ts" />
|
|
28
|
+
</Folder>
|
|
29
|
+
<File name="app.html" />
|
|
30
|
+
</Folder>
|
|
31
|
+
<File name="axerity.json" />
|
|
32
|
+
<File name="package.json" />
|
|
33
|
+
</Tree>
|
|
34
|
+
|
|
35
|
+
Click a folder to open or close it. Pass `defaultOpen` to a folder to show its
|
|
36
|
+
contents on load.
|
|
37
|
+
|
|
38
|
+
## Usage
|
|
39
|
+
|
|
40
|
+
```svelte
|
|
41
|
+
<script>
|
|
42
|
+
import { Tree, Folder, File } from '$lib';
|
|
43
|
+
</script>
|
|
44
|
+
|
|
45
|
+
<Tree>
|
|
46
|
+
<Folder name="src" defaultOpen>
|
|
47
|
+
<Folder name="content">
|
|
48
|
+
<File name="index.md" />
|
|
49
|
+
</Folder>
|
|
50
|
+
<File name="app.html" />
|
|
51
|
+
</Folder>
|
|
52
|
+
<File name="package.json" />
|
|
53
|
+
</Tree>
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
## Custom icons
|
|
57
|
+
|
|
58
|
+
By default folders use a folder glyph and files use a file glyph. Pass `icon`
|
|
59
|
+
with any Lucide name to override either one.
|
|
60
|
+
|
|
61
|
+
<Tree>
|
|
62
|
+
<Folder name="images" icon="image" defaultOpen>
|
|
63
|
+
<File name="logo.svg" icon="file-image" />
|
|
64
|
+
</Folder>
|
|
65
|
+
<File name="README.md" icon="book-open" />
|
|
66
|
+
</Tree>
|
|
67
|
+
|
|
68
|
+
## Props
|
|
69
|
+
|
|
70
|
+
### Folder
|
|
71
|
+
|
|
72
|
+
| Prop | Type | Description |
|
|
73
|
+
| ------------- | --------- | ---------------------- |
|
|
74
|
+
| `name` | `string` | Folder name (required) |
|
|
75
|
+
| `icon` | `string` | Lucide icon name |
|
|
76
|
+
| `defaultOpen` | `boolean` | Expand on load |
|
|
77
|
+
|
|
78
|
+
### File
|
|
79
|
+
|
|
80
|
+
| Prop | Type | Description |
|
|
81
|
+
| ------ | -------- | -------------------- |
|
|
82
|
+
| `name` | `string` | File name (required) |
|
|
83
|
+
| `icon` | `string` | Lucide icon name |
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Type Table
|
|
3
|
+
description: Document an object's properties in a configurable table.
|
|
4
|
+
icon: tag
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
<script>
|
|
8
|
+
import { TypeTable } from '$lib';
|
|
9
|
+
</script>
|
|
10
|
+
|
|
11
|
+
# Type Table
|
|
12
|
+
|
|
13
|
+
`TypeTable` documents the shape of an object, component props, config options,
|
|
14
|
+
API parameters, from a single object. The **Default** column hides itself when
|
|
15
|
+
no property defines one.
|
|
16
|
+
|
|
17
|
+
## Example
|
|
18
|
+
|
|
19
|
+
<TypeTable
|
|
20
|
+
type={{
|
|
21
|
+
title: {
|
|
22
|
+
type: 'string',
|
|
23
|
+
description: 'The heading shown at the top.',
|
|
24
|
+
required: true
|
|
25
|
+
},
|
|
26
|
+
icon: {
|
|
27
|
+
type: 'string',
|
|
28
|
+
description: 'A Lucide icon name shown beside the title.'
|
|
29
|
+
},
|
|
30
|
+
open: {
|
|
31
|
+
type: 'boolean',
|
|
32
|
+
description: 'Whether the panel starts expanded.',
|
|
33
|
+
default: 'false'
|
|
34
|
+
},
|
|
35
|
+
variant: {
|
|
36
|
+
type: "'flat' | 'boxed'",
|
|
37
|
+
typeDescription: 'Controls the container width.',
|
|
38
|
+
default: "'flat'"
|
|
39
|
+
},
|
|
40
|
+
legacy: {
|
|
41
|
+
type: 'boolean',
|
|
42
|
+
description: 'No longer used.',
|
|
43
|
+
deprecated: true
|
|
44
|
+
}
|
|
45
|
+
}}
|
|
46
|
+
/>
|
|
47
|
+
|
|
48
|
+
## Usage
|
|
49
|
+
|
|
50
|
+
```svelte
|
|
51
|
+
<script>
|
|
52
|
+
import { TypeTable } from '$lib';
|
|
53
|
+
</script>
|
|
54
|
+
|
|
55
|
+
<TypeTable
|
|
56
|
+
type={{
|
|
57
|
+
title: { type: 'string', description: 'The heading.', required: true },
|
|
58
|
+
open: { type: 'boolean', default: 'false' }
|
|
59
|
+
}}
|
|
60
|
+
/>
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
## Per-property fields
|
|
64
|
+
|
|
65
|
+
<TypeTable
|
|
66
|
+
type={{
|
|
67
|
+
type: { type: 'string', description: 'Shown as a code chip.' },
|
|
68
|
+
description: { type: 'string', description: 'Short prose under the name.' },
|
|
69
|
+
typeDescription: {
|
|
70
|
+
type: 'string',
|
|
71
|
+
description: 'Longer note shown muted under the type.'
|
|
72
|
+
},
|
|
73
|
+
default: { type: 'string', description: 'Shown as a code chip in the Default column.' },
|
|
74
|
+
required: { type: 'boolean', description: 'Adds a "required" badge.' },
|
|
75
|
+
deprecated: { type: 'boolean', description: 'Strikes the name and adds a badge.' }
|
|
76
|
+
}}
|
|
77
|
+
/>
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Update
|
|
3
|
+
description: A timeline entry for changelogs and release notes.
|
|
4
|
+
icon: history
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
<script>
|
|
8
|
+
import { Update, Badge } from '$lib';
|
|
9
|
+
</script>
|
|
10
|
+
|
|
11
|
+
# Update
|
|
12
|
+
|
|
13
|
+
`Update` renders a single entry on a vertical timeline. Stack several to build a
|
|
14
|
+
changelog. Pair it with a `date` in the page frontmatter.
|
|
15
|
+
|
|
16
|
+
## Example
|
|
17
|
+
|
|
18
|
+
<Update label="v1.1.0" date="June 1, 2026">
|
|
19
|
+
|
|
20
|
+
Added the `Update` component. <Badge color="success">new</Badge>
|
|
21
|
+
|
|
22
|
+
- Timeline entries with a label and optional date.
|
|
23
|
+
- Reads nicely on a dedicated changelog page.
|
|
24
|
+
|
|
25
|
+
</Update>
|
|
26
|
+
|
|
27
|
+
<Update label="v1.0.0" date="May 1, 2026">
|
|
28
|
+
|
|
29
|
+
The first stable release.
|
|
30
|
+
|
|
31
|
+
</Update>
|
|
32
|
+
|
|
33
|
+
## Usage
|
|
34
|
+
|
|
35
|
+
```svelte
|
|
36
|
+
<script>
|
|
37
|
+
import { Update } from '$lib';
|
|
38
|
+
</script>
|
|
39
|
+
|
|
40
|
+
<Update label="v1.1.0" date="June 1, 2026">What changed in this release.</Update>
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
## Props
|
|
44
|
+
|
|
45
|
+
| Prop | Type | Description |
|
|
46
|
+
| ------- | -------- | ------------------------------------- |
|
|
47
|
+
| `label` | `string` | Heading, usually a version (required) |
|
|
48
|
+
| `date` | `string` | Optional date shown next to the label |
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Video
|
|
3
|
+
description: Embed a YouTube video in a responsive player.
|
|
4
|
+
icon: play
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
<script>
|
|
8
|
+
import { Video } from '$lib';
|
|
9
|
+
</script>
|
|
10
|
+
|
|
11
|
+
# Video
|
|
12
|
+
|
|
13
|
+
The `Video` component renders a responsive 16:9 player. It works with hosted
|
|
14
|
+
files and with the common providers, and picks the right player for whatever you
|
|
15
|
+
give it:
|
|
16
|
+
|
|
17
|
+
- A direct video file (`.mp4`, `.webm`, `.ogg`, `.mov`, `.m4v`) plays in the
|
|
18
|
+
browser's native player.
|
|
19
|
+
- A YouTube link or id embeds through the privacy friendly `youtube-nocookie`
|
|
20
|
+
host.
|
|
21
|
+
- A Vimeo link embeds through the Vimeo player.
|
|
22
|
+
|
|
23
|
+
## YouTube
|
|
24
|
+
|
|
25
|
+
<Video src="https://youtu.be/oRdxUFDoQe0" title="Michael Jackson - Beat It" />
|
|
26
|
+
|
|
27
|
+
A full watch link, a short `youtu.be` link, or a bare video id all work:
|
|
28
|
+
|
|
29
|
+
```svelte
|
|
30
|
+
<Video src="https://youtu.be/oRdxUFDoQe0" title="Michael Jackson - Beat It" />
|
|
31
|
+
<Video src="https://www.youtube.com/watch?v=oRdxUFDoQe0" />
|
|
32
|
+
<Video src="oRdxUFDoQe0" />
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
## Hosted file
|
|
36
|
+
|
|
37
|
+
Point `src` at a video file and it plays inline with native controls. Pass
|
|
38
|
+
`poster` for a still frame to show before playback:
|
|
39
|
+
|
|
40
|
+
```svelte
|
|
41
|
+
<Video src="/media/demo.mp4" poster="/media/demo-poster.jpg" title="Product demo" />
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
## Vimeo
|
|
45
|
+
|
|
46
|
+
```svelte
|
|
47
|
+
<Video src="https://vimeo.com/76979871" title="Vimeo example" />
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
## Props
|
|
51
|
+
|
|
52
|
+
| Prop | Type | Description |
|
|
53
|
+
| -------- | -------- | ------------------------------------------------ |
|
|
54
|
+
| `src` | `string` | File URL, provider URL, or YouTube id (required) |
|
|
55
|
+
| `title` | `string` | Label for screen readers (default `Video`) |
|
|
56
|
+
| `poster` | `string` | Still frame for hosted files, shown before play |
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Webhooks
|
|
3
|
+
description: Document the events your API sends to a customer's endpoint.
|
|
4
|
+
icon: webhook
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
<script>
|
|
8
|
+
import { Webhook, EventList, Event, ResponseField, ResponseExample } from '$lib';
|
|
9
|
+
</script>
|
|
10
|
+
|
|
11
|
+
# Webhooks
|
|
12
|
+
|
|
13
|
+
Webhook docs read differently from endpoints: you are documenting an event your
|
|
14
|
+
service sends to the customer's server. The `Webhook` component lays out the
|
|
15
|
+
event, its payload, and an example, with the same sticky rail as the API kit.
|
|
16
|
+
|
|
17
|
+
## An event
|
|
18
|
+
|
|
19
|
+
<Webhook event="invoice.paid" method="POST" description="Sent when an invoice is paid in full.">
|
|
20
|
+
|
|
21
|
+
## Payload
|
|
22
|
+
|
|
23
|
+
<ResponseField name="id" type="string">
|
|
24
|
+
|
|
25
|
+
Unique id for the event.
|
|
26
|
+
|
|
27
|
+
</ResponseField>
|
|
28
|
+
|
|
29
|
+
<ResponseField name="type" type="string">
|
|
30
|
+
|
|
31
|
+
The event type, always `invoice.paid` here.
|
|
32
|
+
|
|
33
|
+
</ResponseField>
|
|
34
|
+
|
|
35
|
+
<ResponseField name="data" type="object">
|
|
36
|
+
|
|
37
|
+
The invoice that was paid.
|
|
38
|
+
|
|
39
|
+
</ResponseField>
|
|
40
|
+
|
|
41
|
+
<ResponseExample title="Example event">
|
|
42
|
+
|
|
43
|
+
```json
|
|
44
|
+
{
|
|
45
|
+
"id": "evt_1abc",
|
|
46
|
+
"type": "invoice.paid",
|
|
47
|
+
"data": { "id": "in_9xy", "amount": 4200, "currency": "usd" }
|
|
48
|
+
}
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
</ResponseExample>
|
|
52
|
+
|
|
53
|
+
</Webhook>
|
|
54
|
+
|
|
55
|
+
## Usage
|
|
56
|
+
|
|
57
|
+
Wrap the event in `<Webhook>` and document the payload with `ResponseField`, then
|
|
58
|
+
add a `ResponseExample` (or `ObjectExample`) with a fenced code block for the
|
|
59
|
+
sample event:
|
|
60
|
+
|
|
61
|
+
```svelte
|
|
62
|
+
<Webhook event="invoice.paid" method="POST" description="Sent when an invoice is paid.">
|
|
63
|
+
## Payload
|
|
64
|
+
|
|
65
|
+
<ResponseField name="id" type="string">Unique id for the event.</ResponseField>
|
|
66
|
+
|
|
67
|
+
<ResponseExample title="Example event">
|
|
68
|
+
(a fenced json block with the sample payload)
|
|
69
|
+
</ResponseExample>
|
|
70
|
+
</Webhook>
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
It works just like the [API components](/components/api), so any of
|
|
74
|
+
`ResponseField`, `ResponseExample`, and `ObjectExample` are available inside.
|
|
75
|
+
|
|
76
|
+
## Listing events
|
|
77
|
+
|
|
78
|
+
`EventList` renders an index of every event you send. Link each one to its
|
|
79
|
+
detail page.
|
|
80
|
+
|
|
81
|
+
<EventList>
|
|
82
|
+
<Event name="invoice.paid" href="/components/webhooks">An invoice was paid in full.</Event>
|
|
83
|
+
<Event name="invoice.payment_failed" href="/components/webhooks">A payment attempt failed.</Event>
|
|
84
|
+
<Event name="customer.created" href="/components/webhooks">A new customer was created.</Event>
|
|
85
|
+
</EventList>
|
|
86
|
+
|
|
87
|
+
```svelte
|
|
88
|
+
<EventList>
|
|
89
|
+
<Event name="invoice.paid" href="/webhooks/invoice-paid">An invoice was paid.</Event>
|
|
90
|
+
<Event name="customer.created" href="/webhooks/customer-created">A customer was created.</Event>
|
|
91
|
+
</EventList>
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
## Props
|
|
95
|
+
|
|
96
|
+
### Webhook
|
|
97
|
+
|
|
98
|
+
| Prop | Type | Description |
|
|
99
|
+
| ------------- | -------- | ------------------------------------- |
|
|
100
|
+
| `event` | `string` | The event type, e.g. `invoice.paid` |
|
|
101
|
+
| `method` | `string` | Delivery method (default `POST`) |
|
|
102
|
+
| `description` | `string` | Short summary of when the event fires |
|
|
103
|
+
|
|
104
|
+
### Event
|
|
105
|
+
|
|
106
|
+
| Prop | Type | Description |
|
|
107
|
+
| ------ | -------- | ------------------------------- |
|
|
108
|
+
| `name` | `string` | The event type (required) |
|
|
109
|
+
| `href` | `string` | Link to the event's detail page |
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: WebSockets
|
|
3
|
+
description: Document channels and messages for WebSocket and AsyncAPI services.
|
|
4
|
+
icon: radio
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
<script>
|
|
8
|
+
import { Channel, Message, ResponseField, ResponseExample } from '$lib';
|
|
9
|
+
</script>
|
|
10
|
+
|
|
11
|
+
# WebSockets
|
|
12
|
+
|
|
13
|
+
Event-driven APIs are documented as channels and messages, not requests and
|
|
14
|
+
responses. `Channel` lays out a connection and its messages with the same sticky
|
|
15
|
+
rail as the API kit, and `Message` marks the direction of each one.
|
|
16
|
+
|
|
17
|
+
## A channel
|
|
18
|
+
|
|
19
|
+
<Channel address={'/chat/{roomId}'} protocol="wss" server="wss://api.example.com" description="Real-time chat for a room.">
|
|
20
|
+
|
|
21
|
+
<Message direction="receive" name="message.created">
|
|
22
|
+
|
|
23
|
+
A new chat message arrived.
|
|
24
|
+
|
|
25
|
+
## Payload
|
|
26
|
+
|
|
27
|
+
<ResponseField name="id" type="string">
|
|
28
|
+
|
|
29
|
+
Unique id for the message.
|
|
30
|
+
|
|
31
|
+
</ResponseField>
|
|
32
|
+
|
|
33
|
+
<ResponseField name="body" type="string">
|
|
34
|
+
|
|
35
|
+
The message text.
|
|
36
|
+
|
|
37
|
+
</ResponseField>
|
|
38
|
+
|
|
39
|
+
<ResponseExample title="message.created">
|
|
40
|
+
|
|
41
|
+
```json
|
|
42
|
+
{ "id": "msg_1", "body": "hey there", "user": "ada" }
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
</ResponseExample>
|
|
46
|
+
|
|
47
|
+
</Message>
|
|
48
|
+
|
|
49
|
+
<Message direction="send" name="message.send">
|
|
50
|
+
|
|
51
|
+
Send a new message to the room.
|
|
52
|
+
|
|
53
|
+
## Payload
|
|
54
|
+
|
|
55
|
+
<ResponseField name="body" type="string" required>
|
|
56
|
+
|
|
57
|
+
The message text to send.
|
|
58
|
+
|
|
59
|
+
</ResponseField>
|
|
60
|
+
|
|
61
|
+
</Message>
|
|
62
|
+
|
|
63
|
+
</Channel>
|
|
64
|
+
|
|
65
|
+
## Usage
|
|
66
|
+
|
|
67
|
+
Wrap a channel in `<Channel>`, then mark each message with `<Message>` and
|
|
68
|
+
document its payload with `ResponseField` and `ResponseExample`:
|
|
69
|
+
|
|
70
|
+
```svelte
|
|
71
|
+
<Channel address="/chat/{roomId}" protocol="wss" server="wss://api.example.com">
|
|
72
|
+
<Message direction="receive" name="message.created">
|
|
73
|
+
## Payload
|
|
74
|
+
|
|
75
|
+
<ResponseField name="body" type="string">The message text.</ResponseField>
|
|
76
|
+
</Message>
|
|
77
|
+
|
|
78
|
+
<Message direction="send" name="message.send">Send a message to the room.</Message>
|
|
79
|
+
</Channel>
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
`receive` is server-to-client, `send` is client-to-server (the AsyncAPI
|
|
83
|
+
`publish`/`subscribe` keywords work too).
|
|
84
|
+
|
|
85
|
+
## Props
|
|
86
|
+
|
|
87
|
+
### Channel
|
|
88
|
+
|
|
89
|
+
| Prop | Type | Description |
|
|
90
|
+
| ------------- | -------- | ---------------------------------------------- |
|
|
91
|
+
| `address` | `string` | The channel or topic, e.g. `/chat/{roomId}` |
|
|
92
|
+
| `protocol` | `string` | `ws`, `wss`, `kafka`, `mqtt`, … (default `ws`) |
|
|
93
|
+
| `server` | `string` | Base server URL, prepended to the address |
|
|
94
|
+
| `description` | `string` | Short summary of the channel |
|
|
95
|
+
|
|
96
|
+
### Message
|
|
97
|
+
|
|
98
|
+
| Prop | Type | Description |
|
|
99
|
+
| ----------- | -------- | ---------------------------------------------- |
|
|
100
|
+
| `direction` | `string` | `send` or `receive` (or `publish`/`subscribe`) |
|
|
101
|
+
| `name` | `string` | The message name, e.g. `message.created` |
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: AI and LLMs
|
|
3
|
+
description: Copy page, Markdown URLs, and llms.txt.
|
|
4
|
+
icon: file-text
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# AI and LLMs
|
|
8
|
+
|
|
9
|
+
Axerity makes your docs easy to feed to a language model.
|
|
10
|
+
|
|
11
|
+
## Copy page
|
|
12
|
+
|
|
13
|
+
Every page has a copy page button at the top right. The main button copies the
|
|
14
|
+
page as clean Markdown, with the frontmatter and scripts stripped out. The
|
|
15
|
+
dropdown has more options:
|
|
16
|
+
|
|
17
|
+
- Copy page as Markdown.
|
|
18
|
+
- View as Markdown, which opens the raw Markdown in a new tab.
|
|
19
|
+
- Open in ChatGPT, with a prompt pointing at the page.
|
|
20
|
+
- Open in Claude, with the same.
|
|
21
|
+
|
|
22
|
+
## Markdown URLs
|
|
23
|
+
|
|
24
|
+
Every page is also served as raw Markdown at a `.md` URL. Add `.md` to any page
|
|
25
|
+
path:
|
|
26
|
+
|
|
27
|
+
```
|
|
28
|
+
/installation -> the rendered page
|
|
29
|
+
/installation.md -> the raw Markdown
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
These are static files, generated at build time.
|
|
33
|
+
|
|
34
|
+
## llms.txt
|
|
35
|
+
|
|
36
|
+
Two files are generated for whole site ingestion, following the
|
|
37
|
+
[llms.txt](https://llmstxt.org) convention:
|
|
38
|
+
|
|
39
|
+
- `/llms.txt` is an index of every page with links to its Markdown.
|
|
40
|
+
- `/llms-full.txt` is the full Markdown of every page in one file.
|