@clidey/dory 0.24.0 → 0.29.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 (34) hide show
  1. package/bin/dist/dory.js +41 -3
  2. package/bin/dist/dory.js.map +1 -1
  3. package/bin/dory.ts +44 -3
  4. package/dist/index.html +8 -8
  5. package/package.json +1 -1
  6. package/src/components/search.tsx +5 -5
  7. package/src/components/store.ts +1 -1
  8. package/src/mdx/card.tsx +7 -7
  9. package/src/mdx/step.tsx +6 -4
  10. package/src/plugins/docs-assets.ts +79 -0
  11. package/src/plugins/html-metadata-injector.ts +76 -0
  12. package/src/theme.scss +5 -1
  13. package/src/ui/header.tsx +1 -1
  14. package/src/ui/layout.tsx +47 -14
  15. package/src/ui/table-of-content.tsx +1 -1
  16. package/src/utils/colors.ts +1 -1
  17. package/src/utils/fonts.ts +1 -1
  18. package/vite.config.ts +8 -1
  19. package/dist/api-playground-demo.mdx +0 -119
  20. package/dist/api-reference/asyncapi.json +0 -324
  21. package/dist/api-reference/openapi.json +0 -366
  22. package/dist/api-reference/operations/create.mdx +0 -5
  23. package/dist/api-reference/operations/delete.mdx +0 -5
  24. package/dist/api-reference/operations/get.mdx +0 -5
  25. package/dist/api-reference/operations/update.mdx +0 -5
  26. package/dist/api-reference/websocket-operations/receive-chat-message.mdx +0 -5
  27. package/dist/api-reference/websocket-operations/receive-notifications.mdx +0 -5
  28. package/dist/api-reference/websocket-operations/receive-presence-update.mdx +0 -5
  29. package/dist/api-reference/websocket-operations/send-chat-message.mdx +0 -5
  30. package/dist/api-reference/websocket-operations/send-presence-update.mdx +0 -5
  31. package/dist/dory.json +0 -64
  32. package/dist/features.mdx +0 -440
  33. package/dist/introduction.mdx +0 -44
  34. package/dist/websocket-playground-demo.mdx +0 -135
package/dist/features.mdx DELETED
@@ -1,440 +0,0 @@
1
- ---
2
- title: 'Features'
3
- description: 'Overview of available components and features'
4
- ---
5
-
6
- ## Headings Examples
7
-
8
- ```mdx
9
- # Heading 1
10
- ```
11
- # Heading 1
12
-
13
- ```mdx
14
- ## Heading 2
15
- ```
16
- # Heading 2
17
-
18
- ```mdx
19
- ### Heading 3
20
- ```
21
- # Heading 3
22
- ```mdx
23
- #### Heading 4
24
- ```
25
- # Heading 4
26
- ```mdx
27
- ##### Heading 5
28
- ```
29
- # Heading 5
30
- ```mdx
31
- ###### Heading 6
32
- ```
33
- # Heading 6
34
-
35
- <br />
36
-
37
- ## Lists Examples
38
-
39
- ```mdx
40
- - List item 1
41
- - List item 2
42
- - List item 3
43
- ```
44
-
45
- - List item 1
46
- - List item 2
47
- - List item 3
48
-
49
- ```mdx
50
- 1. List item 1
51
- 2. List item 2
52
- 3. List item 3
53
- ```
54
-
55
- 1. List item 1
56
- 2. List item 2
57
- 3. List item 3
58
-
59
-
60
-
61
- <br />
62
-
63
- ### Images
64
-
65
- ```mdx
66
- <img src="./assets/dory.jpeg" alt="Example image" className="object-cover w-64 h-64" />
67
- ```
68
-
69
- <img src="./assets/dory.jpeg" alt="Example image" className="object-cover w-64 h-64" />
70
-
71
-
72
- <br />
73
- <br />
74
- <br />
75
-
76
- ## Code Components
77
-
78
- ### Code Block
79
- ```typescript
80
- function example() {
81
- return "Hello World";
82
- }
83
- ```
84
-
85
- ### Code Group Block
86
-
87
- <CodeGroup>
88
- ```typescript
89
- function example(): string {
90
- return "Hello World";
91
- }
92
- ```
93
- ```javascript
94
- function example() {
95
- return "Hello World";
96
- }
97
- ```
98
- </CodeGroup>
99
-
100
-
101
- <br />
102
- <br />
103
- <br />
104
-
105
-
106
- ## Interactive Components
107
-
108
- ### Mermaid
109
-
110
- ```mdx
111
- mermaid
112
- graph TD
113
-
114
- %% Main Start
115
- Start([Start Process]) --> Validate[Validate Input]
116
-
117
- %% Decision Point
118
- Validate -->|Valid| ProcessData{Is Data Clean?}
119
- Validate -->|Invalid| Error[Show Error Message]
120
-
121
- %% Clean Data Branch
122
- ProcessData -->|Yes| Clean[Clean Data]
123
- Clean --> Analyze[Analyze Data]
124
-
125
- %% Dirty Data Branch
126
- ProcessData -->|No| Notify[Notify User]
127
- Notify --> Wait[Wait for Input]
128
- Wait --> Validate
129
-
130
- %% Parallel Branches After Analysis
131
- Analyze --> Split1 & Split2
132
-
133
- subgraph Parallel Tasks
134
- Split1[Generate Report] --> Merge
135
- Split2[Update Dashboard] --> Merge
136
- end
137
-
138
- Merge --> Decision2{Is More Input Needed?}
139
- Decision2 -->|Yes| WaitMore[Wait for More Input]
140
- WaitMore --> Validate
141
- Decision2 -->|No| End([End Process])
142
-
143
- %% Style and Class Definitions
144
- classDef decision fill:#f9f,stroke:#333,stroke-width:2px;
145
- class ProcessData,Decision2 decision;
146
-
147
- ```
148
-
149
- <strong>
150
- <p>Note: Mermaid should be inside a code block with type "mermaid"</p>
151
- </strong>
152
-
153
- ```mermaid
154
- graph TD
155
-
156
- %% Main Start
157
- Start([Start Process]) --> Validate[Validate Input]
158
-
159
- %% Decision Point
160
- Validate -->|Valid| ProcessData{Is Data Clean?}
161
- Validate -->|Invalid| Error[Show Error Message]
162
-
163
- %% Clean Data Branch
164
- ProcessData -->|Yes| Clean[Clean Data]
165
- Clean --> Analyze[Analyze Data]
166
-
167
- %% Dirty Data Branch
168
- ProcessData -->|No| Notify[Notify User]
169
- Notify --> Wait[Wait for Input]
170
- Wait --> Validate
171
-
172
- %% Parallel Branches After Analysis
173
- Analyze --> Split1 & Split2
174
-
175
- subgraph Parallel Tasks
176
- Split1[Generate Report] --> Merge
177
- Split2[Update Dashboard] --> Merge
178
- end
179
-
180
- Merge --> Decision2{Is More Input Needed?}
181
- Decision2 -->|Yes| WaitMore[Wait for More Input]
182
- WaitMore --> Validate
183
- Decision2 -->|No| End([End Process])
184
-
185
- %% Style and Class Definitions
186
- classDef decision fill:#f9f,stroke:#333,stroke-width:2px;
187
- class ProcessData,Decision2 decision;
188
-
189
- ```
190
-
191
- ### Accordion
192
-
193
- ```mdx
194
- <AccordionGroup>
195
- <Accordion title="First Section" icon="DocumentIcon">
196
- This is the content of the first accordion section.
197
- </Accordion>
198
- <Accordion title="Second Section" icon="CodeBracketIcon">
199
- This is the content of the second accordion section.
200
- </Accordion>
201
- </AccordionGroup>
202
- ```
203
-
204
- <AccordionGroup>
205
- <Accordion title="First Section" icon="DocumentIcon">
206
- This is the content of the first accordion section.
207
- </Accordion>
208
- <Accordion title="Second Section" icon="CodeBracketIcon">
209
- This is the content of the second accordion section.
210
- </Accordion>
211
- </AccordionGroup>
212
-
213
- ### Callouts
214
-
215
- ```mdx
216
- <Note>
217
- This is a note callout with important information.
218
- </Note>
219
- ```
220
-
221
- <Note>
222
- This is a note callout with important information.
223
- </Note>
224
-
225
- ```mdx
226
- <Warning>
227
- This is a warning callout for critical information.
228
- </Warning>
229
- ```
230
-
231
- <Warning>
232
- This is a warning callout for critical information.
233
- </Warning>
234
-
235
- ```mdx
236
- <Info>
237
- This is an info callout for general information.
238
- </Info>
239
- ```
240
-
241
- <Info>
242
- This is an info callout for general information.
243
- </Info>
244
-
245
- ```mdx
246
- <Tip>
247
- This is a tip callout for helpful suggestions.
248
- </Tip>
249
- ```
250
-
251
- <Tip>
252
- This is a tip callout for helpful suggestions.
253
- </Tip>
254
-
255
- ```mdx
256
- <Check>
257
- This is a check callout for completed items.
258
- </Check>
259
- ```
260
-
261
- <Check>
262
- This is a check callout for completed items.
263
- </Check>
264
-
265
-
266
- <br />
267
-
268
- ### Cards
269
- ```mdx
270
- <CardGroup cols={2}>
271
- <Card
272
- title="Example Card"
273
- description="This is an example card component with an icon and title."
274
- icon="FileText"
275
- href="#"
276
- />
277
- <Card
278
- title="Another Card"
279
- description="This is another example card with different content."
280
- icon="Code"
281
- href="#"
282
- />
283
- </CardGroup>
284
- ```
285
-
286
- <CardGroup cols={2}>
287
- <Card
288
- title="Example Card"
289
- description="This is an example card component with an icon and title."
290
- icon="FileText"
291
- href="#"
292
- />
293
- <Card
294
- title="Another Card"
295
- description="This is another example card with different content."
296
- icon="Code"
297
- href="#"
298
- />
299
- </CardGroup>
300
-
301
- <br />
302
-
303
- ### Expandable
304
-
305
- ```mdx
306
- <Expandable title="Click to Expand">
307
- This is an expandable section that can be toggled.
308
- </Expandable>
309
- ```
310
-
311
- <Expandable title="Click to Expand">
312
- This is an expandable section that can be toggled.
313
- </Expandable>
314
-
315
- ### Source
316
-
317
- ```mdx
318
- <Source url="https://github.com/clidey/dory" paths={[
319
- { path: "src/mdx/source.tsx", range: "1-46" },
320
- { path: "docs/features.mdx", range: "318-322" },
321
- ]} />
322
- ```
323
-
324
- <Source url="https://github.com/clidey/dory" paths={[
325
- { path: "src/mdx/source.tsx", range: "1-46" },
326
- { path: "docs/features.mdx", range: "318-322" },
327
- ]} />
328
-
329
- <br />
330
- <br />
331
- <br />
332
-
333
-
334
- ## Special Components
335
-
336
- ### Grids
337
-
338
- #### Rows
339
- ```mdx
340
- <Row cols={2}>
341
- <Icon icon="FileText" />
342
- <Icon icon="CheckCircle" />
343
- </Row>
344
- ```
345
-
346
- <Row cols={2}>
347
- <Icon icon="FileText" />
348
- <Icon icon="CheckCircle" />
349
- </Row>
350
-
351
- <br />
352
-
353
- #### Columns
354
-
355
- ```mdx
356
- <Col>
357
- <Icon icon="FileText" />
358
- <Icon icon="FileText" />
359
- </Col>
360
- ```
361
-
362
- <Col>
363
- <Icon icon="FileText" />
364
- <Icon icon="FileText" />
365
- </Col>
366
-
367
- <br />
368
- <br />
369
- <br />
370
-
371
- ### Latex
372
-
373
- ```mdx
374
- <Latex>
375
- E = mc^2
376
- </Latex>
377
- ```
378
-
379
- <Latex>
380
- E = mc^2
381
- </Latex>
382
-
383
- <br />
384
- <br />
385
- <br />
386
-
387
- ### Tables
388
-
389
- ```mdx
390
- | Property | Description |
391
- | -------- | ------------------------------------- |
392
- | Name | Full name of user |
393
- | Age | Reported age |
394
- | Joined | Whether the user joined the community |
395
- ```
396
-
397
- | Property | Description |
398
- | -------- | ------------------------------------- |
399
- | Name | Full name of user |
400
- | Age | Reported age |
401
- | Joined | Whether the user joined the community |
402
-
403
-
404
- ### Steps
405
-
406
- ```mdx
407
- <Steps>
408
- <Step title="First Step">
409
- This is the first step in the process.
410
- </Step>
411
- <Step title="Second Step">
412
- This is the second step in the process.
413
- </Step>
414
- </Steps>
415
- ```
416
-
417
- <Steps>
418
- <Step title="First Step">
419
- This is the first step in the process.
420
- </Step>
421
- <Step title="Second Step">
422
- This is the second step in the process.
423
- </Step>
424
- </Steps>
425
-
426
- ### Icons
427
-
428
- ```mdx
429
- <Col rows={2}>
430
- <Icon icon="Code" />
431
- <Icon icon="FileText" />
432
- <Icon icon="CheckCircle" />
433
- </Col>
434
- ```
435
-
436
- <Row cols={3}>
437
- <Icon icon="Code" />
438
- <Icon icon="FileText" />
439
- <Icon icon="CheckCircle" />
440
- </Row>
@@ -1,44 +0,0 @@
1
- ---
2
- title: 'Introduction'
3
- description: 'Welcome to Docucod and Dory documentation'
4
- ---
5
-
6
- # Introduction
7
-
8
- ## Welcome to Docucod and Dory
9
-
10
- This documentation is powered by two complementary tools:
11
-
12
- 1. **Docucod** - An AI-powered documentation assistant that automatically generates and maintains documentation
13
- 2. **Dory** - A lightweight static site generator specifically designed to deploy dory-generated documentation
14
-
15
- ## What is Docucod?
16
-
17
- Docucod analyzes your codebase and automatically:
18
- - Generates comprehensive documentation
19
- - Updates existing documentation when code changes
20
- - Maintains consistent style and formatting
21
- - Ensures accuracy and completeness
22
-
23
- ## What is Dory?
24
-
25
- Dory is a lightweight static site generator built for developers who want fast, clean, and customizable documentation. It was created specifically to deploy dory-generated documentation with:
26
-
27
- - 🧠 **Simple** — Drop in `.mdx` files and configure one `dory.json`
28
- - ⚡ **Fast** — Instant hot reload in dev, quick static builds for prod
29
- - 🌐 **Portable** — No SSR, no lock-in, deploy anywhere
30
- - 🧩 **Flexible** — Hackable theme, readable codebase, minimal magic
31
-
32
- ## Documentation Structure
33
-
34
- This documentation is organized to help you:
35
- - Get started quickly with both Docucod and Dory
36
- - Understand core concepts and features
37
- - Follow best practices and examples
38
- - Find detailed API references
39
-
40
- Let's begin exploring Docucod and Dory's capabilities!
41
-
42
- <br/>
43
- <br/>
44
- <br/>
@@ -1,135 +0,0 @@
1
- ---
2
- title: 'WebSocket Playground Demo'
3
- description: 'Interactive WebSocket playground for testing real-time connections'
4
- ---
5
-
6
- # WebSocket Playground Demo
7
-
8
- This page demonstrates the WebSocket playground component with various configuration options and real-time connection testing capabilities.
9
-
10
- ## Basic WebSocket Connection
11
-
12
- <WebSocketPlayground
13
- url="/ws/chat"
14
- title="Basic Chat WebSocket"
15
- description="Connect to a WebSocket server and send/receive messages in real-time"
16
- servers={[
17
- {
18
- url: "wss://echo.websocket.org",
19
- description: "WebSocket Echo Server"
20
- },
21
- {
22
- url: "wss://ws.postman-echo.com/raw",
23
- description: "Postman Echo WebSocket"
24
- }
25
- ]}
26
- />
27
-
28
- ## WebSocket with Subprotocols
29
-
30
- <WebSocketPlayground
31
- url="/ws/protocol"
32
- title="WebSocket with Subprotocols"
33
- description="WebSocket connection with custom subprotocols for specialized communication"
34
- subprotocols={["chat", "v1.0"]}
35
- servers={[
36
- {
37
- url: "wss://echo.websocket.org",
38
- description: "Echo Server with Subprotocols"
39
- }
40
- ]}
41
- />
42
-
43
- ## WebSocket with Authentication
44
-
45
- <WebSocketPlayground
46
- url="/ws/secure"
47
- title="Authenticated WebSocket"
48
- description="WebSocket connection with authentication headers"
49
- authType="bearer"
50
- headers={{
51
- "User-Agent": "Dory WebSocket Client",
52
- "X-Client-Version": "1.0.0"
53
- }}
54
- servers={[
55
- {
56
- url: "wss://echo.websocket.org",
57
- description: "Secure Echo Server"
58
- }
59
- ]}
60
- />
61
-
62
- ## Real-time Chat Example
63
-
64
- <WebSocketPlayground
65
- url="/chat"
66
- title="Real-time Chat"
67
- description="Connect to a chat server and participate in real-time conversations"
68
- subprotocols={["chat.v1", "json"]}
69
- headers={{
70
- "X-Client-Type": "web",
71
- "X-Protocol-Version": "1.0"
72
- }}
73
- servers={[
74
- {
75
- url: "wss://echo.websocket.org",
76
- description: "Chat Echo Server"
77
- }
78
- ]}
79
- />
80
-
81
- ## Testing Instructions
82
-
83
- 1. **Connect**: Click the "Connect" button to establish a WebSocket connection
84
- 2. **Send Messages**: Type messages in the input field and click "Send" or press Enter
85
- 3. **View Messages**: All sent and received messages appear in the message history with timestamps
86
- 4. **Configuration**: Use the tabs to configure headers, subprotocols, and authentication
87
- 5. **Server Selection**: Choose different servers from the dropdown to test various endpoints
88
-
89
- ## Features
90
-
91
- - **Real-time Connection**: Live WebSocket connection with status indicators
92
- - **Message History**: View all sent/received messages with timestamps
93
- - **Custom Headers**: Add authentication and custom headers
94
- - **Subprotocols**: Configure WebSocket subprotocols
95
- - **Multiple Servers**: Easy switching between different WebSocket endpoints
96
- - **Error Handling**: Clear error messages for connection issues
97
- - **Binary Support**: Handles both text and binary messages
98
-
99
- ## Message Types
100
-
101
- The playground supports different message types:
102
- - **Sent**: Messages you send (blue background)
103
- - **Received**: Messages from the server (green background)
104
- - **Error**: Connection or sending errors (red background)
105
- - **System**: Connection status updates (gray background)
106
-
107
- ## Example Messages
108
-
109
- Try sending these JSON messages to test structured data:
110
-
111
- ```json
112
- {
113
- "type": "chat",
114
- "message": "Hello, WebSocket!",
115
- "userId": "user123",
116
- "timestamp": "2024-01-15T10:30:00Z"
117
- }
118
- ```
119
-
120
- ```json
121
- {
122
- "type": "presence",
123
- "status": "online",
124
- "userId": "user123"
125
- }
126
- ```
127
-
128
- ```json
129
- {
130
- "type": "notification",
131
- "title": "Test Notification",
132
- "message": "This is a test notification",
133
- "level": "info"
134
- }
135
- ```