@clidey/dory 1.0.8 → 1.9.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.
Files changed (198) hide show
  1. package/README.md +12 -1
  2. package/bin/chat-server.ts +270 -0
  3. package/bin/dist/analytics-server.d.ts +11 -0
  4. package/bin/dist/analytics-server.d.ts.map +1 -0
  5. package/bin/dist/analytics-server.js +121 -0
  6. package/bin/dist/analytics-server.js.map +1 -0
  7. package/bin/dist/automation.d.ts +35 -0
  8. package/bin/dist/automation.d.ts.map +1 -0
  9. package/bin/dist/automation.js +259 -0
  10. package/bin/dist/automation.js.map +1 -0
  11. package/bin/dist/chat-server.d.ts +8 -0
  12. package/bin/dist/chat-server.d.ts.map +1 -0
  13. package/bin/dist/chat-server.js +322 -0
  14. package/bin/dist/chat-server.js.map +1 -0
  15. package/bin/dist/check.d.ts +16 -0
  16. package/bin/dist/check.d.ts.map +1 -0
  17. package/bin/dist/check.js +247 -0
  18. package/bin/dist/check.js.map +1 -0
  19. package/bin/dist/dory.js +252 -402
  20. package/bin/dist/dory.js.map +1 -1
  21. package/bin/dist/i18n-init.d.ts +6 -0
  22. package/bin/dist/i18n-init.d.ts.map +1 -0
  23. package/bin/dist/i18n-init.js +56 -0
  24. package/bin/dist/i18n-init.js.map +1 -0
  25. package/bin/dist/mcp-http.d.ts +8 -0
  26. package/bin/dist/mcp-http.d.ts.map +1 -0
  27. package/bin/dist/mcp-http.js +72 -0
  28. package/bin/dist/mcp-http.js.map +1 -0
  29. package/bin/dist/mcp.d.ts +2 -0
  30. package/bin/dist/mcp.d.ts.map +1 -0
  31. package/bin/dist/mcp.js +81 -0
  32. package/bin/dist/mcp.js.map +1 -0
  33. package/bin/dist/preview-entry.d.ts +2 -0
  34. package/bin/dist/preview-entry.d.ts.map +1 -0
  35. package/bin/dist/preview-entry.js +6 -0
  36. package/bin/dist/preview-entry.js.map +1 -0
  37. package/bin/dist/preview-server.d.ts +5 -0
  38. package/bin/dist/preview-server.d.ts.map +1 -0
  39. package/bin/dist/preview-server.js +159 -0
  40. package/bin/dist/preview-server.js.map +1 -0
  41. package/bin/dist/project-config.d.ts +22 -0
  42. package/bin/dist/project-config.d.ts.map +1 -0
  43. package/bin/dist/project-config.js +44 -0
  44. package/bin/dist/project-config.js.map +1 -0
  45. package/dist/index.html +57 -0
  46. package/dist/runtime/dory-runtime.css +2 -0
  47. package/dist/runtime/dory-runtime.html +14 -0
  48. package/dist/runtime/dory-runtime.js +5490 -0
  49. package/docs/api-playground-demo.mdx +119 -0
  50. package/docs/api-reference/asyncapi.json +324 -0
  51. package/docs/api-reference/openapi.json +366 -0
  52. package/docs/api-reference/operations/create.mdx +5 -0
  53. package/docs/api-reference/operations/delete.mdx +5 -0
  54. package/docs/api-reference/operations/get.mdx +5 -0
  55. package/docs/api-reference/operations/update.mdx +5 -0
  56. package/docs/api-reference/websocket-operations/receive-chat-message.mdx +5 -0
  57. package/docs/api-reference/websocket-operations/receive-notifications.mdx +5 -0
  58. package/docs/api-reference/websocket-operations/receive-presence-update.mdx +5 -0
  59. package/docs/api-reference/websocket-operations/send-chat-message.mdx +5 -0
  60. package/docs/api-reference/websocket-operations/send-presence-update.mdx +5 -0
  61. package/docs/assets/dory.jpeg +0 -0
  62. package/docs/components/accordion.mdx +145 -0
  63. package/docs/components/callouts.mdx +134 -0
  64. package/docs/components/cards.mdx +153 -0
  65. package/docs/components/code-blocks.mdx +281 -0
  66. package/docs/components/expandable.mdx +189 -0
  67. package/docs/components/icons.mdx +71 -0
  68. package/docs/components/images.mdx +82 -0
  69. package/docs/components/latex.mdx +148 -0
  70. package/docs/components/layout.mdx +175 -0
  71. package/docs/components/lists.mdx +134 -0
  72. package/docs/components/mermaid.mdx +149 -0
  73. package/docs/components/overview.mdx +81 -0
  74. package/docs/components/source.mdx +130 -0
  75. package/docs/components/steps.mdx +122 -0
  76. package/docs/components/tables.mdx +114 -0
  77. package/docs/components/tags.mdx +179 -0
  78. package/docs/components/typography.mdx +185 -0
  79. package/docs/configuration/analytics.mdx +45 -0
  80. package/docs/configuration/chat.mdx +59 -0
  81. package/docs/configuration/dory-json.mdx +278 -0
  82. package/docs/configuration/embed.mdx +73 -0
  83. package/docs/configuration/fonts.mdx +86 -0
  84. package/docs/configuration/internationalization.mdx +61 -0
  85. package/docs/configuration/navigation.mdx +217 -0
  86. package/docs/configuration/theming.mdx +166 -0
  87. package/docs/dory.json +129 -0
  88. package/docs/embed-example.html +176 -0
  89. package/docs/favicon.svg +18 -0
  90. package/docs/features.mdx +440 -0
  91. package/docs/getting-started/automation.mdx +76 -0
  92. package/docs/getting-started/configuration.mdx +95 -0
  93. package/docs/getting-started/installation.mdx +88 -0
  94. package/docs/getting-started/quick-start.mdx +53 -0
  95. package/docs/getting-started/whodb-ee-apps.mdx +122 -0
  96. package/docs/introduction.mdx +50 -0
  97. package/docs/logo/logo.svg +18 -0
  98. package/docs/playgrounds/api-playground.mdx +122 -0
  99. package/docs/playgrounds/websocket-playground.mdx +98 -0
  100. package/docs/social-card.png +0 -0
  101. package/docs/social-card.svg +17 -0
  102. package/docs/websocket-playground-demo.mdx +135 -0
  103. package/package.json +23 -17
  104. package/scripts/verify-runtime-parity.mjs +146 -0
  105. package/src/app.css +19 -1
  106. package/src/assets/fonts/HankenGrotesk.ttf +0 -0
  107. package/src/assets/fonts/OFL.txt +94 -0
  108. package/src/components/chat-assistant.tsx +229 -0
  109. package/src/components/dropdown.tsx +3 -3
  110. package/src/components/error-boundary.tsx +2 -2
  111. package/src/components/hooks.tsx +20 -1
  112. package/src/components/navigation.tsx +82 -51
  113. package/src/components/notification.tsx +2 -3
  114. package/src/components/routes.tsx +17 -19
  115. package/src/components/search-index.test.ts +15 -0
  116. package/src/components/search-index.ts +49 -48
  117. package/src/components/search.tsx +208 -104
  118. package/src/components/store.ts +27 -9
  119. package/src/config/mdx-common.ts +11 -0
  120. package/src/config/mdx.ts +10 -11
  121. package/src/embed/loader.ts +0 -3
  122. package/src/embed/types.ts +0 -2
  123. package/src/embed/widget-iframe.ts +19 -21
  124. package/src/embedded-runtime/config.ts +138 -0
  125. package/src/embedded-runtime/index.tsx +680 -0
  126. package/src/embedded-runtime/runtime.html +14 -0
  127. package/src/entry-server.tsx +46 -124
  128. package/src/main.tsx +16 -4
  129. package/src/mdx/accordion.tsx +3 -3
  130. package/src/mdx/api-playground.tsx +18 -16
  131. package/src/mdx/async-api.tsx +2 -2
  132. package/src/mdx/card.tsx +3 -2
  133. package/src/mdx/code.tsx +11 -9
  134. package/src/mdx/fence.tsx +6 -5
  135. package/src/mdx/icon-grid.tsx +4 -1
  136. package/src/mdx/icon-names.test.ts +15 -0
  137. package/src/mdx/icon-names.ts +60 -0
  138. package/src/mdx/icon-source-variants.ts +102 -0
  139. package/src/mdx/icon.tsx +12 -73
  140. package/src/mdx/latex.tsx +3 -2
  141. package/src/mdx/mdx.tsx +1 -1
  142. package/src/mdx/mermaid.tsx +12 -6
  143. package/src/mdx/open-api.tsx +130 -74
  144. package/src/mdx/preprocess.test.ts +16 -0
  145. package/src/mdx/preprocess.ts +61 -0
  146. package/src/mdx/processor.ts +4 -96
  147. package/src/mdx/source.tsx +5 -4
  148. package/src/mdx/specimen.tsx +38 -6
  149. package/src/mdx/tabs.tsx +29 -21
  150. package/src/mdx/text.tsx +9 -9
  151. package/src/mdx/try-it-panel.tsx +284 -0
  152. package/src/mdx/type-scale.tsx +4 -4
  153. package/src/mdx/websocket-playground.tsx +21 -14
  154. package/src/plugins/analytics-injector.ts +8 -0
  155. package/src/plugins/chat-dev-server.ts +32 -0
  156. package/src/plugins/docs-assets.test.ts +25 -0
  157. package/src/plugins/docs-assets.ts +6 -2
  158. package/src/plugins/frontmatter-dev-server.ts +2 -2
  159. package/src/plugins/frontmatter-generator.ts +1 -1
  160. package/src/plugins/html-files-middleware.test.ts +21 -1
  161. package/src/plugins/html-files-middleware.ts +26 -6
  162. package/src/plugins/html-metadata-injector.ts +24 -4
  163. package/src/plugins/llm-txt-dev-server.ts +2 -2
  164. package/src/plugins/llm-txt-generator.ts +21 -4
  165. package/src/plugins/prerender.ts +47 -20
  166. package/src/plugins/robots-generator.ts +1 -1
  167. package/src/plugins/sanitize.ts +1 -1
  168. package/src/plugins/shared.ts +6 -18
  169. package/src/plugins/sitemap-generator.ts +1 -1
  170. package/src/plugins/social-preview.test.ts +71 -0
  171. package/src/plugins/social-preview.ts +87 -0
  172. package/src/plugins/unified-mdx-plugin.ts +1 -1
  173. package/src/theme.scss +630 -207
  174. package/src/types/config.ts +53 -1
  175. package/src/ui/breadcrumb.tsx +17 -0
  176. package/src/ui/docs-header-view.tsx +32 -0
  177. package/src/ui/docs-navigation-view.tsx +69 -0
  178. package/src/ui/docs-page-frame.tsx +50 -0
  179. package/src/ui/dory-mark.tsx +9 -0
  180. package/src/ui/header.tsx +33 -90
  181. package/src/ui/layout.tsx +99 -153
  182. package/src/ui/mobile-navigation.tsx +10 -8
  183. package/src/ui/page-actions.tsx +67 -0
  184. package/src/ui/page-feedback.tsx +50 -0
  185. package/src/ui/page-footer.tsx +23 -0
  186. package/src/ui/prev-next-link.tsx +15 -69
  187. package/src/ui/prev-next-view.tsx +27 -0
  188. package/src/ui/table-of-content-view.tsx +167 -0
  189. package/src/ui/table-of-content.tsx +25 -183
  190. package/src/utils/analytics.test.ts +36 -0
  191. package/src/utils/analytics.ts +35 -0
  192. package/src/utils/colors.ts +7 -0
  193. package/src/utils/content-scope.test.ts +26 -0
  194. package/src/utils/content-scope.ts +39 -0
  195. package/src/utils/search-content.ts +12 -0
  196. package/src/utils/theme.ts +1 -7
  197. package/vite.config.ssr.ts +3 -3
  198. package/vite.config.ts +21 -15
@@ -0,0 +1,134 @@
1
+ ---
2
+ title: 'Lists'
3
+ description: 'Styled unordered and ordered lists using standard Markdown or explicit list components.'
4
+ ---
5
+
6
+ # Lists
7
+
8
+ Dory supports standard Markdown lists and provides explicit `<UnorderedList>`, `<OrderedList>`, and `<ListItem>` components.
9
+
10
+ ## Unordered List
11
+
12
+ Use standard Markdown syntax:
13
+
14
+ <Specimen label="- item">
15
+
16
+ ```mdx
17
+ - First item
18
+ - Second item
19
+ - Nested item
20
+ - Another nested item
21
+ - Third item
22
+ ```
23
+
24
+ - First item
25
+ - Second item
26
+ - Nested item
27
+ - Another nested item
28
+ - Third item
29
+
30
+ </Specimen>
31
+
32
+ ## Ordered List
33
+
34
+ <Specimen label="1. item">
35
+
36
+ ```mdx
37
+ 1. Clone the repository
38
+ 2. Install dependencies
39
+ 3. Configure your environment
40
+ 4. Run the development server
41
+ ```
42
+
43
+ 1. Clone the repository
44
+ 2. Install dependencies
45
+ 3. Configure your environment
46
+ 4. Run the development server
47
+
48
+ </Specimen>
49
+
50
+ ## Mixed Lists
51
+
52
+ Combine ordered and unordered lists:
53
+
54
+ <Specimen label="1. item - nested">
55
+
56
+ ```mdx
57
+ 1. Choose an authentication method:
58
+ - Bearer token (recommended)
59
+ - API key in query string
60
+ - Basic authentication
61
+ 2. Generate credentials in the dashboard
62
+ 3. Include credentials in every request
63
+ ```
64
+
65
+ 1. Choose an authentication method:
66
+ - Bearer token (recommended)
67
+ - API key in query string
68
+ - Basic authentication
69
+ 2. Generate credentials in the dashboard
70
+ 3. Include credentials in every request
71
+
72
+ </Specimen>
73
+
74
+ ## Explicit Components
75
+
76
+ Use explicit components when building lists programmatically or with dynamic content:
77
+
78
+ <Specimen label="&lt;UnorderedList&gt; &lt;ListItem&gt;">
79
+
80
+ ```mdx
81
+ <UnorderedList>
82
+ <ListItem>Supports 20+ programming languages</ListItem>
83
+ <ListItem>Copy button on all code blocks</ListItem>
84
+ <ListItem>Multi-language tab groups</ListItem>
85
+ </UnorderedList>
86
+ ```
87
+
88
+ <UnorderedList>
89
+ <ListItem>Supports 20+ programming languages</ListItem>
90
+ <ListItem>Copy button on all code blocks</ListItem>
91
+ <ListItem>Multi-language tab groups</ListItem>
92
+ </UnorderedList>
93
+
94
+ </Specimen>
95
+
96
+ <Specimen label="&lt;OrderedList&gt; &lt;ListItem&gt;">
97
+
98
+ ```mdx
99
+ <OrderedList>
100
+ <ListItem>Install the Dory CLI</ListItem>
101
+ <ListItem>Create your dory.json config</ListItem>
102
+ <ListItem>Write MDX pages</ListItem>
103
+ <ListItem>Run dory build</ListItem>
104
+ </OrderedList>
105
+ ```
106
+
107
+ <OrderedList>
108
+ <ListItem>Install the Dory CLI</ListItem>
109
+ <ListItem>Create your dory.json config</ListItem>
110
+ <ListItem>Write MDX pages</ListItem>
111
+ <ListItem>Run dory build</ListItem>
112
+ </OrderedList>
113
+
114
+ </Specimen>
115
+
116
+ ## Rich List Items
117
+
118
+ Standard Markdown list items support inline formatting:
119
+
120
+ <Specimen label="- **bold** *italic* `code`">
121
+
122
+ ```mdx
123
+ - **Bold item** — important information
124
+ - *Italic item* — supplementary detail
125
+ - Item with `inline code` — technical terms
126
+ - Item with a [link](https://dory.clidey.com) — external reference
127
+ ```
128
+
129
+ - **Bold item** — important information
130
+ - *Italic item* — supplementary detail
131
+ - Item with `inline code` — technical terms
132
+ - Item with a [link](https://dory.clidey.com) — external reference
133
+
134
+ </Specimen>
@@ -0,0 +1,149 @@
1
+ ---
2
+ title: 'Mermaid Diagrams'
3
+ description: 'Render flowcharts, sequence diagrams, ER diagrams, and more using Mermaid syntax in code blocks.'
4
+ ---
5
+
6
+ # Mermaid Diagrams
7
+
8
+ Use fenced code blocks with the `mermaid` language identifier to render diagrams. Dory automatically detects mermaid syntax and renders it using the [Mermaid](https://mermaid.js.org) library.
9
+
10
+ **Syntax:**
11
+
12
+ ````mdx
13
+ ```mermaid
14
+ flowchart TD
15
+ A[Start] --> B[End]
16
+ ```
17
+ ````
18
+
19
+ ## Diagrams
20
+
21
+ Any code block tagged `mermaid` renders as a diagram using the site palette. It re-renders when the theme changes.
22
+
23
+ <Specimen label="```mermaid">
24
+
25
+ ````mdx
26
+ ```mermaid
27
+ flowchart TD
28
+ A[Start] --> B{Is data clean?}
29
+ B -->|Yes| C[Analyze]
30
+ B -->|No| D[Clean data]
31
+ ```
32
+ ````
33
+
34
+ <Tabs>
35
+ <Tab title="Flowchart">
36
+
37
+ ```mermaid
38
+ flowchart TD
39
+ A[User writes MDX] --> B[dory build]
40
+ B --> C{Build successful?}
41
+ C -->|Yes| D[Static site in dist/]
42
+ C -->|No| E[Fix errors]
43
+ E --> B
44
+ D --> F[Deploy to hosting]
45
+ ```
46
+
47
+ </Tab>
48
+ <Tab title="Sequence">
49
+
50
+ ```mermaid
51
+ sequenceDiagram
52
+ participant Client
53
+ participant API
54
+ participant Database
55
+
56
+ Client->>API: POST /api/users
57
+ API->>Database: INSERT user
58
+ Database-->>API: user_id
59
+ API-->>Client: 201 Created
60
+ ```
61
+
62
+ </Tab>
63
+ <Tab title="Entity relationship">
64
+
65
+ ```mermaid
66
+ erDiagram
67
+ USER {
68
+ string id PK
69
+ string email
70
+ string name
71
+ datetime created_at
72
+ }
73
+ WORKSPACE {
74
+ string id PK
75
+ string name
76
+ string owner_id FK
77
+ }
78
+ DOCUMENT {
79
+ string id PK
80
+ string title
81
+ string workspace_id FK
82
+ }
83
+ USER ||--o{ WORKSPACE : owns
84
+ WORKSPACE ||--o{ DOCUMENT : contains
85
+ ```
86
+
87
+ </Tab>
88
+ </Tabs>
89
+
90
+ </Specimen>
91
+
92
+ ## State Diagram
93
+
94
+ ```mermaid
95
+ stateDiagram-v2
96
+ [*] --> Disconnected
97
+ Disconnected --> Connecting: connect()
98
+ Connecting --> Connected: WebSocket open
99
+ Connecting --> Error: Connection failed
100
+ Connected --> Disconnected: disconnect()
101
+ Connected --> Error: Connection lost
102
+ Error --> Connecting: retry
103
+ Error --> [*]: give up
104
+ ```
105
+
106
+ ## Git Graph
107
+
108
+ ```mermaid
109
+ gitGraph
110
+ commit id: "Initial commit"
111
+ branch feature/auth
112
+ checkout feature/auth
113
+ commit id: "Add OAuth"
114
+ commit id: "Add JWT"
115
+ checkout main
116
+ merge feature/auth
117
+ commit id: "v1.0.0"
118
+ ```
119
+
120
+ ## Pie Chart
121
+
122
+ ```mermaid
123
+ pie title Documentation Page Types
124
+ "Getting Started" : 4
125
+ "Components" : 17
126
+ "Playgrounds" : 2
127
+ "Configuration" : 6
128
+ ```
129
+
130
+ ## Supported Diagram Types
131
+
132
+ | Type | Identifier | Description |
133
+ | --- | --- | --- |
134
+ | Flowchart | `flowchart` | Process flows and decision trees |
135
+ | Sequence | `sequenceDiagram` | Interaction between participants |
136
+ | Class | `classDiagram` | Object-oriented class structures |
137
+ | State | `stateDiagram-v2` | State machine transitions |
138
+ | ER Diagram | `erDiagram` | Database entity relationships |
139
+ | Git Graph | `gitGraph` | Git branch history |
140
+ | Gantt | `gantt` | Project timelines |
141
+ | Pie Chart | `pie` | Proportional data |
142
+
143
+ ## Fullscreen Mode
144
+
145
+ Click any rendered diagram to view it fullscreen. This is useful for complex diagrams that are hard to read at the default size.
146
+
147
+ <Note>
148
+ Mermaid diagrams are lazy-loaded. The first render on a page may take a moment while the Mermaid library initializes.
149
+ </Note>
@@ -0,0 +1,81 @@
1
+ ---
2
+ title: 'Components Overview'
3
+ description: 'All 24 built-in MDX components in Dory — from basic typography to interactive API playgrounds.'
4
+ lead: 'Everything Dory renders from MDX, in one place. Each specimen shows the rendered output, the source behind it, and the props it accepts.'
5
+ meta:
6
+ Components: 24 built in
7
+ Theme: From dory.json
8
+ Updated: 2026-10-21
9
+ ---
10
+
11
+ # Components Overview
12
+
13
+ Dory ships with **24 built-in MDX components** you can use directly in `.mdx` files without any imports. Components range from basic typography helpers to full interactive API testing tools.
14
+
15
+ ## Content Components
16
+
17
+ <CardGroup cols={2}>
18
+ <Card title="Typography" href="/components/typography" icon="type" description="Headings, paragraphs, inline code, and anchor links." />
19
+ <Card title="Code Blocks" href="/components/code-blocks" icon="code-2" description="Syntax-highlighted code with multi-language tabs and copy button." />
20
+ <Card title="Callouts" href="/components/callouts" icon="alert-circle" description="Note, Warning, Info, Tip, and Check callout boxes." />
21
+ <Card title="Cards" href="/components/cards" icon="layout-grid" description="Linked and informational cards in responsive grid layouts." />
22
+ </CardGroup>
23
+
24
+ ## Structure Components
25
+
26
+ <CardGroup cols={2}>
27
+ <Card title="Accordion" href="/components/accordion" icon="chevrons-down-up" description="Collapsible content sections with optional icons." />
28
+ <Card title="Expandable" href="/components/expandable" icon="maximize-2" description="Expandable sections for nested properties and response fields." />
29
+ <Card title="Steps" href="/components/steps" icon="list-ordered" description="Numbered step-by-step guides with visual connectors." />
30
+ <Card title="Tables" href="/components/tables" icon="table" description="Responsive tables with styled headers and cells." />
31
+ </CardGroup>
32
+
33
+ ## Media & Visual Components
34
+
35
+ <CardGroup cols={2}>
36
+ <Card title="Mermaid Diagrams" href="/components/mermaid" icon="git-branch" description="Flowcharts, sequence diagrams, ER diagrams, and more." />
37
+ <Card title="LaTeX Math" href="/components/latex" icon="sigma" description="Render mathematical expressions using KaTeX." />
38
+ <Card title="Images" href="/components/images" icon="image" description="Clickable images with fullscreen modal overlay." />
39
+ <Card title="Icons" href="/components/icons" icon="star" description="Inline icons from the WhoDB suite." />
40
+ </CardGroup>
41
+
42
+ ## Utility Components
43
+
44
+ <CardGroup cols={2}>
45
+ <Card title="Lists" href="/components/lists" icon="list" description="Styled unordered and ordered lists." />
46
+ <Card title="Tags" href="/components/tags" icon="tag" description="HTTP method badges and custom color tags." />
47
+ <Card title="Layout" href="/components/layout" icon="columns-2" description="Row and Col for multi-column grid layouts." />
48
+ <Card title="Source Links" href="/components/source" icon="git-pull-request" description="Direct links to source code on GitHub, GitLab, or Bitbucket." />
49
+ </CardGroup>
50
+
51
+ ## Interactive Playgrounds
52
+
53
+ <CardGroup cols={2}>
54
+ <Card title="API Playground" href="/playgrounds/api-playground" icon="play-circle" description="Interactive HTTP request testing with headers, auth, and response display." />
55
+ <Card title="WebSocket Playground" href="/playgrounds/websocket-playground" icon="activity" description="Live WebSocket connection tester with message history." />
56
+ </CardGroup>
57
+
58
+ ## Using Components
59
+
60
+ All components are available in `.mdx` files without any imports:
61
+
62
+ ```mdx
63
+ ---
64
+ title: 'My Page'
65
+ ---
66
+
67
+ # My Page
68
+
69
+ <Note>
70
+ This is a note callout — no import needed.
71
+ </Note>
72
+
73
+ <CardGroup cols={2}>
74
+ <Card title="Getting Started" icon="rocket" description="Set up your project." />
75
+ <Card title="Configuration" icon="settings" description="Customize your site." />
76
+ </CardGroup>
77
+ ```
78
+
79
+ <Note>
80
+ All components are built into Dory. You never need to install or import anything — just use them directly in your pages.
81
+ </Note>
@@ -0,0 +1,130 @@
1
+ ---
2
+ title: 'Source Links'
3
+ description: 'Link directly to source code files on GitHub, GitLab, or Bitbucket with optional line ranges.'
4
+ ---
5
+
6
+ # Source Links
7
+
8
+ The `<Source>` component renders styled links that point directly to source code on your repository host. It supports GitHub, GitLab, and Bitbucket with optional line range anchors.
9
+
10
+ ## Basic Usage
11
+
12
+ Link to a single file:
13
+
14
+ <Specimen label="&lt;Source&gt;">
15
+
16
+ ```mdx
17
+ <Source
18
+ url="https://github.com/clidey/dory"
19
+ branch="main"
20
+ paths={[{ path: "src/mdx/code.tsx" }]}
21
+ />
22
+ ```
23
+
24
+ <Source
25
+ url="https://github.com/clidey/dory"
26
+ branch="main"
27
+ paths={[{ path: "src/mdx/code.tsx" }]}
28
+ />
29
+
30
+ </Specimen>
31
+
32
+ ## Multiple Files
33
+
34
+ Link to multiple files at once:
35
+
36
+ <Specimen label="&lt;Source&gt;">
37
+
38
+ ```mdx
39
+ <Source
40
+ url="https://github.com/clidey/dory"
41
+ branch="main"
42
+ paths={[
43
+ { path: "src/mdx/accordion.tsx" },
44
+ { path: "src/mdx/callout.tsx" },
45
+ { path: "src/mdx/card.tsx" }
46
+ ]}
47
+ />
48
+ ```
49
+
50
+ <Source
51
+ url="https://github.com/clidey/dory"
52
+ branch="main"
53
+ paths={[
54
+ { path: "src/mdx/accordion.tsx" },
55
+ { path: "src/mdx/callout.tsx" },
56
+ { path: "src/mdx/card.tsx" }
57
+ ]}
58
+ />
59
+
60
+ </Specimen>
61
+
62
+ ## With Line Range
63
+
64
+ Link to a specific range of lines:
65
+
66
+ <Specimen label="&lt;Source&gt;">
67
+
68
+ ```mdx
69
+ <Source
70
+ url="https://github.com/clidey/dory"
71
+ branch="main"
72
+ paths={[{ path: "src/mdx/code.tsx", range: "1-50" }]}
73
+ />
74
+ ```
75
+
76
+ <Source
77
+ url="https://github.com/clidey/dory"
78
+ branch="main"
79
+ paths={[{ path: "src/mdx/code.tsx", range: "1-50" }]}
80
+ />
81
+
82
+ </Specimen>
83
+
84
+ ## Platform Support
85
+
86
+ | Platform | URL Format | Line Anchor Format |
87
+ | --- | --- | --- |
88
+ | GitHub | `github.com/owner/repo` | `#L{start}-L{end}` |
89
+ | GitLab | `gitlab.com/owner/repo` | `#L{range}` |
90
+ | Bitbucket | `bitbucket.org/owner/repo` | `#lines-{start}:{end}` |
91
+
92
+ Dory automatically detects the platform from the URL and formats the link accordingly.
93
+
94
+ ## Use Case: Inline Source References
95
+
96
+ Source links are ideal for documentation that references implementation details:
97
+
98
+ <Specimen label="&lt;Source&gt;">
99
+
100
+ ```mdx
101
+ The MDX preprocessing pipeline is defined here:
102
+
103
+ <Source
104
+ url="https://github.com/clidey/dory"
105
+ branch="main"
106
+ paths={[{ path: "src/mdx/processor.ts" }]}
107
+ />
108
+
109
+ This file is the single source of truth for MDX compilation settings.
110
+ ```
111
+
112
+ The MDX preprocessing pipeline is defined here:
113
+
114
+ <Source
115
+ url="https://github.com/clidey/dory"
116
+ branch="main"
117
+ paths={[{ path: "src/mdx/processor.ts" }]}
118
+ />
119
+
120
+ This file is the single source of truth for MDX compilation settings.
121
+
122
+ </Specimen>
123
+
124
+ ## Props Reference
125
+
126
+ | Prop | Type | Default | Description |
127
+ | --- | --- | --- | --- |
128
+ | `url` | `string` | — | Base URL of the repository (e.g. `https://github.com/owner/repo`). |
129
+ | `branch` | `string` | `"main"` | Branch name. |
130
+ | `paths` | `Array<{ path: string, range?: string }>` | — | Files to link. `range` format: `"start-end"` (e.g. `"10-50"`). |
@@ -0,0 +1,122 @@
1
+ ---
2
+ title: 'Steps'
3
+ description: 'Numbered step-by-step guides with visual connectors between steps.'
4
+ ---
5
+
6
+ # Steps
7
+
8
+ Use `<Steps>` and `<Step>` to present multi-step processes with numbered indicators and a vertical connection line.
9
+
10
+ ## Basic Steps
11
+
12
+ <Specimen label="&lt;Steps&gt; &lt;Step&gt;">
13
+
14
+ ```mdx
15
+ <Steps>
16
+ <Step title="Install Dory">
17
+ Install the CLI globally with npm or pnpm.
18
+ </Step>
19
+ <Step title="Create dory.json">
20
+ Create a configuration file in your docs directory.
21
+ </Step>
22
+ <Step title="Write your first page">
23
+ Create introduction.mdx with frontmatter and content.
24
+ </Step>
25
+ <Step title="Build and preview">
26
+ Run the CLI to build and preview your site.
27
+ </Step>
28
+ </Steps>
29
+ ```
30
+
31
+ <Steps>
32
+ <Step title="Install Dory">
33
+ Install the CLI globally: `npm install -g @clidey/dory`
34
+ </Step>
35
+ <Step title="Create dory.json">
36
+ Create a configuration file with your site name, colors, and navigation structure.
37
+ </Step>
38
+ <Step title="Write your first page">
39
+ Create `introduction.mdx` with a frontmatter block (`title`, `description`) and your content.
40
+ </Step>
41
+ <Step title="Build and preview">
42
+ Run `dory build` then `dory preview` to see your site at `http://localhost:3000`.
43
+ </Step>
44
+ </Steps>
45
+
46
+ </Specimen>
47
+
48
+ ## Steps with Rich Content
49
+
50
+ Each `<Step>` supports full MDX content including callouts and inline code:
51
+
52
+ <Specimen label="&lt;Steps&gt; &lt;Step&gt;">
53
+
54
+ ```mdx
55
+ <Steps>
56
+ <Step title="Generate an API key">
57
+ Log in to your dashboard and navigate to Settings > API Keys.
58
+
59
+ Store the key securely — it is shown only once.
60
+ </Step>
61
+ <Step title="Configure authentication">
62
+ Add your API key to the Authorization header on every request.
63
+ </Step>
64
+ <Step title="Make your first request">
65
+ Test the connection with a simple GET request to verify your credentials.
66
+ </Step>
67
+ </Steps>
68
+ ```
69
+
70
+ <Steps>
71
+ <Step title="Generate an API key">
72
+ Log in to your dashboard and navigate to **Settings → API Keys**.
73
+
74
+ <Warning>
75
+ API keys are shown only once. Copy it immediately and store it securely.
76
+ </Warning>
77
+ </Step>
78
+ <Step title="Configure authentication">
79
+ Add your API key to the `Authorization` header: `Authorization: Bearer YOUR_API_KEY`
80
+ </Step>
81
+ <Step title="Make your first request">
82
+ Test the connection with `GET /api/v1/me` to verify your credentials work.
83
+
84
+ <Check>
85
+ If you see your user object, authentication is working correctly.
86
+ </Check>
87
+ </Step>
88
+ </Steps>
89
+
90
+ </Specimen>
91
+
92
+ ## Authentication Setup Example
93
+
94
+ <Steps>
95
+ <Step title="Create an account">
96
+ Sign up at the dashboard. Verify your email to activate your account.
97
+ </Step>
98
+ <Step title="Install the SDK">
99
+ Install the client library for your language: `npm install @example/sdk`
100
+ </Step>
101
+ <Step title="Initialize the client">
102
+ Import and configure the SDK with your API key from the dashboard.
103
+ </Step>
104
+ <Step title="Make your first API call">
105
+ Call any endpoint to verify the integration is working correctly.
106
+ </Step>
107
+ </Steps>
108
+
109
+ ## Props Reference
110
+
111
+ ### Steps Props
112
+
113
+ | Prop | Type | Description |
114
+ | --- | --- | --- |
115
+ | `children` | `ReactNode` | One or more `Step` components. |
116
+
117
+ ### Step Props
118
+
119
+ | Prop | Type | Description |
120
+ | --- | --- | --- |
121
+ | `title` | `string` | Step heading shown next to the step number. |
122
+ | `children` | `ReactNode` | Step content. Supports full MDX. |