@docsector/docsector-reader 4.0.1 โ 4.2.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/README.md +19 -0
- package/bin/docsector.js +1 -1
- package/package.json +1 -1
- package/public/api/manual/http-client.json +91 -0
- package/public/quasar-api/QSeparator.json +39 -0
- package/src/components/DBlockApi.vue +634 -0
- package/src/components/DBlockApiEntry.js +623 -0
- package/src/components/DBlockCodeExample.vue +445 -0
- package/src/components/DBlockSourceCode.vue +3 -11
- package/src/components/DMenu.vue +70 -25
- package/src/components/DPageTokens.vue +22 -0
- package/src/components/api-block-model.js +326 -0
- package/src/components/code-block-highlighting.js +16 -0
- package/src/components/code-example-source.js +363 -0
- package/src/components/page-section-tokens.js +141 -1
- package/src/components/source-code-lines.js +17 -0
- package/src/examples/manual/code-examples/BasicCounter.vue +63 -0
- package/src/examples/manual/code-examples/InlineNotice.vue +60 -0
- package/src/pages/manual/content/blocks/api-reference.overview.en-US.md +40 -0
- package/src/pages/manual/content/blocks/api-reference.overview.pt-BR.md +40 -0
- package/src/pages/manual/content/blocks/api-reference.showcase.en-US.md +33 -0
- package/src/pages/manual/content/blocks/api-reference.showcase.pt-BR.md +33 -0
- package/src/pages/manual/content/blocks/code-examples.overview.en-US.md +56 -0
- package/src/pages/manual/content/blocks/code-examples.overview.pt-BR.md +56 -0
- package/src/pages/manual/content/blocks/code-examples.showcase.en-US.md +38 -0
- package/src/pages/manual/content/blocks/code-examples.showcase.pt-BR.md +38 -0
- package/src/pages/manual.index.js +56 -0
- package/src/quasar.factory.js +77 -0
- package/src/store/Page.js +26 -2
package/README.md
CHANGED
|
@@ -75,10 +75,13 @@ Transform Markdown content into beautiful, navigable documentation sites โ wit
|
|
|
75
75
|
- ๐ **Embedded URL Blocks** โ Use `<d-block-embedded-url url="https://...">...</d-block-embedded-url>` to render curated embeds for YouTube, Vimeo, Spotify, and CodePen with a safe link-card fallback for unsupported URLs
|
|
76
76
|
- ๐งญ **Quick Links Custom Element** โ Use `<d-block-quick-links>` and `<d-block-quick-link>` in Markdown to render rich home navigation cards
|
|
77
77
|
- ๐๏ธ **Cards Custom Element** โ Use `<d-block-cards>` and `<d-block-card>` in Markdown to render linked content cards with optional cover images
|
|
78
|
+
- ๐งพ **API JSON Reference Block** โ Use `<d-block-api src="..." />` in Markdown to render Quasar-compatible API reference UIs from public JSON assets without inventing a new schema
|
|
78
79
|
- ๐๏ธ **API Catalog Well-Known** โ Auto-generates `/.well-known/api-catalog` as Linkset JSON for machine-readable API discovery
|
|
79
80
|
- ๐๏ธ **Multi-Version History** โ Archive older major versions under `src/pages/.old/<version>/` and expose them at prefixed routes (e.g. `/v0.x/guide/...`) while keeping the current docs at unprefixed routes
|
|
80
81
|
- ๐ท๏ธ **Version Selector Badges** โ Every version in the sidebar selector displays a color-coded badge: green for released, orange for draft, red for deprecated; fully customizable via `badge: { label, color, textColor }`
|
|
81
82
|
- ๐ **Tabbed Code Blocks** โ Group consecutive fenced code blocks into tabs using the `group` and `tab` attributes in the fence info line
|
|
83
|
+
- ๐งช **Live Code Example Blocks** โ Use `<d-block-code-example src="..." />` to render bundled Vue SFC examples with a live preview, GitHub source link, source toggle, and CodePen export for compatible examples
|
|
84
|
+
- ๐ **Accurate Source Code Line Counts** โ Code example headers count visible lines correctly across LF, CRLF, and terminal newlines without inflating the total
|
|
82
85
|
- ๐ **Breadcrumb Path Display** โ Show a file path breadcrumb above code blocks with the `breadcrumb` attribute; renders as clickable path segments
|
|
83
86
|
- ๐จ **File Type Icons** โ Automatically resolves file extension or filename to a Material Icon Theme SVG icon, shown inline in tabs and beside the last breadcrumb segment
|
|
84
87
|
- โ๏ธ **Single Config File** โ Customize branding, links, and languages via `docsector.config.js`
|
|
@@ -1023,6 +1026,22 @@ Notes:
|
|
|
1023
1026
|
Supported alert types: `NOTE`, `TIP`, `IMPORTANT`, `WARNING`, `CAUTION`.
|
|
1024
1027
|
Regular blockquotes without `[!TYPE]` continue to work normally.
|
|
1025
1028
|
|
|
1029
|
+
### Code Example Blocks
|
|
1030
|
+
|
|
1031
|
+
```html
|
|
1032
|
+
<d-block-code-example src="manual/code-examples/basic-counter" title="Basic counter">
|
|
1033
|
+
Optional caption rendered as inline Markdown.
|
|
1034
|
+
</d-block-code-example>
|
|
1035
|
+
```
|
|
1036
|
+
|
|
1037
|
+
Notes:
|
|
1038
|
+
|
|
1039
|
+
- Store live examples as Vue SFCs under `src/examples/**/*.vue`; for example, `src="manual/code-examples/basic-counter"` resolves `src/examples/manual/code-examples/BasicCounter.vue` after kebab-case normalization.
|
|
1040
|
+
- Readers get a live preview, a GitHub button for the example SFC, a source button with Template / Script / Style / All tabs, and a CodePen button when the example can be exported safely.
|
|
1041
|
+
- Use `expanded="true"` only when the source code should be visible by default.
|
|
1042
|
+
- CodePen export currently supports plain Vue SFCs with a template, optional style, and an Options API `export default` script. Named imports from `vue` and `quasar` are converted to browser globals.
|
|
1043
|
+
- Examples using `<script setup>`, TypeScript scripts, or local imports still render in Docsector, but the CodePen action is disabled. Use `codepen="false"` to hide it intentionally.
|
|
1044
|
+
|
|
1026
1045
|
### File Attachment Blocks
|
|
1027
1046
|
|
|
1028
1047
|
```html
|
package/bin/docsector.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@docsector/docsector-reader",
|
|
3
|
-
"version": "4.0
|
|
3
|
+
"version": "4.2.0",
|
|
4
4
|
"description": "A documentation rendering engine built with Vue 3, Quasar v2 and Vite. Transform Markdown into beautiful, navigable documentation sites.",
|
|
5
5
|
"productName": "Docsector Reader",
|
|
6
6
|
"author": "Rodrigo de Araujo Vieira",
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
{
|
|
2
|
+
"meta": {
|
|
3
|
+
"docsUrl": "https://example.com/sdk/http-client"
|
|
4
|
+
},
|
|
5
|
+
"props": {
|
|
6
|
+
"baseUrl": {
|
|
7
|
+
"type": "String",
|
|
8
|
+
"desc": "Base URL used by the client.",
|
|
9
|
+
"default": "https://api.example.com",
|
|
10
|
+
"examples": ["https://api.example.com", "https://staging.example.com"],
|
|
11
|
+
"category": "configuration"
|
|
12
|
+
},
|
|
13
|
+
"timeout": {
|
|
14
|
+
"type": "Number",
|
|
15
|
+
"desc": "Request timeout in milliseconds.",
|
|
16
|
+
"default": 10000,
|
|
17
|
+
"category": "configuration"
|
|
18
|
+
},
|
|
19
|
+
"retries": {
|
|
20
|
+
"type": "Number",
|
|
21
|
+
"desc": "Retry attempts for idempotent calls.",
|
|
22
|
+
"default": 2,
|
|
23
|
+
"category": "behavior"
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
"methods": {
|
|
27
|
+
"request": {
|
|
28
|
+
"desc": "Perform an HTTP request.",
|
|
29
|
+
"params": {
|
|
30
|
+
"options": {
|
|
31
|
+
"type": "Object",
|
|
32
|
+
"desc": "Request options.",
|
|
33
|
+
"required": true,
|
|
34
|
+
"definition": {
|
|
35
|
+
"url": {
|
|
36
|
+
"type": "String",
|
|
37
|
+
"desc": "Absolute or relative URL.",
|
|
38
|
+
"required": true,
|
|
39
|
+
"examples": ["/status", "https://example.com/health"]
|
|
40
|
+
},
|
|
41
|
+
"method": {
|
|
42
|
+
"type": "String",
|
|
43
|
+
"desc": "HTTP method.",
|
|
44
|
+
"default": "GET",
|
|
45
|
+
"examples": ["GET", "POST"]
|
|
46
|
+
},
|
|
47
|
+
"headers": {
|
|
48
|
+
"type": "Object",
|
|
49
|
+
"desc": "Additional request headers.",
|
|
50
|
+
"required": false
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
},
|
|
55
|
+
"returns": {
|
|
56
|
+
"type": "Promise<ResponseLike>",
|
|
57
|
+
"desc": "Resolves with the parsed response wrapper."
|
|
58
|
+
},
|
|
59
|
+
"examples": ["client.request({ url: '/status' })"]
|
|
60
|
+
},
|
|
61
|
+
"cancelAll": {
|
|
62
|
+
"desc": "Abort all in-flight requests.",
|
|
63
|
+
"returns": {
|
|
64
|
+
"type": "void",
|
|
65
|
+
"desc": "No return value."
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
},
|
|
69
|
+
"events": {
|
|
70
|
+
"response": {
|
|
71
|
+
"desc": "Emitted after a response is resolved.",
|
|
72
|
+
"params": {
|
|
73
|
+
"payload": {
|
|
74
|
+
"type": "Object",
|
|
75
|
+
"desc": "Resolved response payload.",
|
|
76
|
+
"required": true
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
},
|
|
80
|
+
"error": {
|
|
81
|
+
"desc": "Emitted when a request fails.",
|
|
82
|
+
"params": {
|
|
83
|
+
"error": {
|
|
84
|
+
"type": "Error",
|
|
85
|
+
"desc": "The original request error.",
|
|
86
|
+
"required": true
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
{
|
|
2
|
+
"meta": {
|
|
3
|
+
"docsUrl": "https://v2.quasar.dev/vue-components/separator"
|
|
4
|
+
},
|
|
5
|
+
|
|
6
|
+
"props": {
|
|
7
|
+
"dark": {
|
|
8
|
+
"extends": "dark"
|
|
9
|
+
},
|
|
10
|
+
|
|
11
|
+
"spaced": {
|
|
12
|
+
"type": ["Boolean", "String"],
|
|
13
|
+
"desc": "If set to true, the corresponding direction margins will be set to 8px; It can also be set to a size in CSS units, including unit name, or one of the xs|sm|md|lg|xl predefined sizes",
|
|
14
|
+
"examples": ["'12px'", "'sm'", "'md'"],
|
|
15
|
+
"category": "content"
|
|
16
|
+
},
|
|
17
|
+
|
|
18
|
+
"inset": {
|
|
19
|
+
"type": ["Boolean", "String"],
|
|
20
|
+
"desc": "If set to Boolean true, the left and right margins will be set to 16px. If set to 'item' then it will match a QItem's design. If set to 'item-thumbnail' then it will match the design of a QItem with a thumbnail on the left side",
|
|
21
|
+
"values": ["true", "false", "'item'", "'item-thumbnail'"],
|
|
22
|
+
"category": "content"
|
|
23
|
+
},
|
|
24
|
+
|
|
25
|
+
"vertical": {
|
|
26
|
+
"type": "Boolean",
|
|
27
|
+
"desc": "If set to true, the separator will be vertical.",
|
|
28
|
+
"category": "content"
|
|
29
|
+
},
|
|
30
|
+
|
|
31
|
+
"size": {
|
|
32
|
+
"extends": "size"
|
|
33
|
+
},
|
|
34
|
+
|
|
35
|
+
"color": {
|
|
36
|
+
"extends": "color"
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
}
|