@docsector/docsector-reader 4.5.0 β†’ 4.5.3

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 CHANGED
@@ -46,6 +46,7 @@ Transform Markdown content into beautiful, navigable documentation sites β€” wit
46
46
  - πŸ“‹ **Clickable Inline Code** β€” Backtick-rendered inline code snippets are clickable across pages, subpages, and AI assistant answers
47
47
  - πŸ”½ **Nested Markdown Lists** β€” Ordered and unordered lists preserve sublist hierarchy across multiple indentation levels
48
48
  - β˜‘οΈ **Markdown Task Lists** β€” GitBook-style `- [ ]` and `- [x]` items render as read-only checkboxes with nested subtasks
49
+ - ⌨️ **Keyboard Shortcut Keycaps** β€” Author GitBook-style shortcuts with raw `<kbd>...</kbd>` tags, rendered consistently across docs and AI assistant answers
49
50
  - πŸ–ΌοΈ **Block Image Captions & Zoom** β€” Standalone Markdown images render as zoomable figures, and raw `figure` / `picture` markup supports separate alt text and captions
50
51
  - 🧱 **Raw HTML in Markdown** β€” Renders inline and block HTML tags inside markdown sections (including homepage remote README content)
51
52
  - 🧩 **Mermaid Diagrams** β€” Native support for fenced ` ```mermaid ` blocks, with automatic dark/light theme switching
@@ -77,6 +78,7 @@ Transform Markdown content into beautiful, navigable documentation sites β€” wit
77
78
  - 🌍 **Remote README as Home** β€” Optional build-time remote README source for homepage with automatic local fallback and automatic primary-title handoff when the remote README already provides the project heading
78
79
  - πŸ”— **GitHub-Compatible Heading Anchors** β€” Markdown headings use GitHub-style slugs so standard README Table of Contents links work inside Docsector
79
80
  - 🧬 **Scaffolded Homepage Override Wiring** β€” New consumer projects automatically wire `virtual:docsector-homepage-override` into i18n message building
81
+ - 🧰 **Scaffolded Dev Reliability** β€” New consumer projects protect Docsector virtual registries and Markdown CommonJS plugins from Vite optimizer edge cases during dev and build
80
82
  - πŸ“– **Expandable Markdown Sections** β€” Use `<d-block-expandable title="...">...</d-block-expandable>` to collapse secondary content while keeping rich Markdown support inside the body
81
83
  - 1️⃣ **Stepper Guides** β€” Use `<d-block-stepper>` with nested `<d-block-step title="...">...</d-block-step>` items to render native Quasar vertical steppers with rich Markdown and optional per-step icon overrides
82
84
  - πŸ•’ **Timeline Updates** β€” Use `<d-block-timeline>` with nested `<d-block-timeline-item date="...">...</d-block-timeline-item>` entries and optional `<d-block-timeline-tag>` labels to publish GitBook-inspired changelog items with direct-link anchors, tag icons/colors, and rich Markdown bodies
@@ -732,6 +734,8 @@ npm install
732
734
 
733
735
  This creates a minimal project with `quasar.config.js`, `docsector.config.js`, `src/pages/`, `src/i18n/`, and `public/` β€” all powered by the docsector-reader engine.
734
736
 
737
+ The scaffolded `quasar.config.js` delegates to `createQuasarConfig()`, which registers Docsector virtual registries and keeps the engine router out of Vite dependency optimization so modules like `virtual:docsector-books` resolve during dev and build.
738
+
735
739
  ### πŸ’» Development
736
740
 
737
741
  ```bash
package/bin/docsector.js CHANGED
@@ -24,7 +24,7 @@ const packageRoot = resolve(__dirname, '..')
24
24
  const args = process.argv.slice(2)
25
25
  const command = args[0]
26
26
 
27
- const VERSION = '4.5.0'
27
+ const VERSION = '4.5.3'
28
28
  const AUTHORING_SKILL_NAME = 'docsector-documentation-authoring'
29
29
  const AUTHORING_SKILL_DESCRIPTION = 'Author Docsector documentation with Markdown, custom blocks, MCP, and WebMCP.'
30
30
  const AUTHORING_SKILL_PUBLIC_PATH = `/.well-known/agent-skills/${AUTHORING_SKILL_NAME}/SKILL.md`
@@ -437,7 +437,10 @@ export default {
437
437
  label: 'Guide',
438
438
  icon: 'school',
439
439
  order: 1,
440
- color: 'secondary'
440
+ color: {
441
+ active: 'white',
442
+ inactive: 'white'
443
+ }
441
444
  }
442
445
  `
443
446
 
@@ -82,16 +82,16 @@ export default {
82
82
  namespace: '',
83
83
  accountIdEnv: 'CLOUDFLARE_ACCOUNT_ID',
84
84
  apiTokenEnv: 'CLOUDFLARE_API_TOKEN',
85
- model: '@cf/meta/llama-3.3-70b-instruct-fp8-fast',
85
+ model: '@cf/meta/llama-4-scout-17b-16e-instruct',
86
86
  retrievalType: 'vector',
87
- maxResults: 6,
87
+ maxResults: 10,
88
88
  matchThreshold: 0.4,
89
89
  contextExpansion: 1,
90
90
  queryRewrite: {
91
91
  enabled: true
92
92
  },
93
93
  reranking: {
94
- enabled: false,
94
+ enabled: true,
95
95
  model: '@cf/baai/bge-reranker-base',
96
96
  matchThreshold: 0.4
97
97
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@docsector/docsector-reader",
3
- "version": "4.5.0",
3
+ "version": "4.5.3",
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",
@@ -309,9 +309,11 @@ Use raw HTML only when Markdown is not expressive enough or when authoring Docse
309
309
  <div data-kind="secondary-note">
310
310
  This block uses raw HTML inside the page source.
311
311
  </div>
312
+
313
+ Press <kbd>⌘</kbd> + <kbd>B</kbd> to toggle bold text.
312
314
  ```
313
315
 
314
- Prefer plain Markdown first. Keep raw markup readable because documentation content still needs maintenance.
316
+ Prefer plain Markdown first. Use `<kbd>...</kbd>` for keyboard shortcuts that should read like GitBook-style keycaps. Keep raw markup readable because documentation content still needs maintenance.
315
317
 
316
318
  ## Renderer and Parser References
317
319
 
@@ -2,7 +2,19 @@
2
2
  <footer class="d-footer" role="contentinfo">
3
3
  <div class="d-footer__content">
4
4
  <span class="d-footer__label">Powered by</span>
5
- <span class="d-footer__brand">Docsector</span>
5
+ <q-btn
6
+ class="d-footer__brand"
7
+ unelevated
8
+ dense
9
+ no-caps
10
+ color="white"
11
+ text-color="dark"
12
+ label="Docsector"
13
+ href="https://docsector.com"
14
+ target="_blank"
15
+ rel="noopener noreferrer"
16
+ aria-label="Open Docsector website"
17
+ />
6
18
  </div>
7
19
  </footer>
8
20
  </template>
@@ -15,7 +27,7 @@ defineOptions({ name: 'DFooter' })
15
27
  .d-footer
16
28
  width: 100%
17
29
  background: var(--q-primary, #655529)
18
- color: #ffffff
30
+ color: #ffffff !important
19
31
 
20
32
  .d-footer__content
21
33
  max-width: 1200px
@@ -33,7 +45,10 @@ defineOptions({ name: 'DFooter' })
33
45
  opacity: 0.84
34
46
 
35
47
  .d-footer__brand
36
- font-weight: 700
48
+ box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.1)
49
+
50
+ .q-btn__content
51
+ font-weight: 700
37
52
 
38
53
  @media (max-width: 599px)
39
54
  .d-footer
@@ -639,6 +639,8 @@ watch(() => route.fullPath, () => {
639
639
  overflow: auto
640
640
  box-shadow: -16px 0 40px rgba(15, 23, 42, 0.22)
641
641
 
642
+ .d-mobile-anchor-dialog__panel
643
+ opacity: 0.8
642
644
  body.body--dark
643
645
  .d-mobile-anchor-dialog__panel
644
646
  background: rgba(15, 23, 42, 0.9)
package/src/css/app.sass CHANGED
@@ -20,6 +20,10 @@ body.body--light
20
20
  --task-list-checkbox-checked-bg: #5e4c1f
21
21
  --task-list-checkbox-checked-border: #4f3f18
22
22
  --task-list-checkbox-check: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%23ffffff' stroke-linecap='round' stroke-linejoin='round' stroke-width='2.3' d='M3.25 8.5 6.4 11.4 12.75 4.9'/%3E%3C/svg%3E")
23
+ --kbd-color: #272b33
24
+ --kbd-background: #f7f8fa
25
+ --kbd-border: #d5dae0
26
+ --kbd-shadow: inset 0 -1px 0 #c4cad3, 0 1px 2px rgba(15, 23, 42, 0.08)
23
27
 
24
28
  --q-primary-background: #FFF !important
25
29
 
@@ -58,6 +62,10 @@ body.body--dark
58
62
  --task-list-checkbox-checked-bg: #d3b874
59
63
  --task-list-checkbox-checked-border: #ebd08a
60
64
  --task-list-checkbox-check: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%23151515' stroke-linecap='round' stroke-linejoin='round' stroke-width='2.3' d='M3.25 8.5 6.4 11.4 12.75 4.9'/%3E%3C/svg%3E")
65
+ --kbd-color: #f3f5f7
66
+ --kbd-background: #2a303a
67
+ --kbd-border: #4d5663
68
+ --kbd-shadow: inset 0 -1px 0 #3a414d, 0 1px 2px rgba(0, 0, 0, 0.45)
61
69
 
62
70
  --q-light-in-dark-1: #ababab
63
71
  --q-light-in-dark-2: #c9c9c9
@@ -199,6 +207,27 @@ body.body--dark
199
207
  display: inline
200
208
  line-height: 0.85em
201
209
 
210
+ kbd
211
+ display: inline-flex
212
+ align-items: center
213
+ justify-content: center
214
+ min-width: 1.8em
215
+ padding: 0.18rem 0.42rem
216
+ margin: 0 0.1rem
217
+ border: 1px solid var(--kbd-border)
218
+ border-radius: 0.45rem
219
+ background: var(--kbd-background)
220
+ box-shadow: var(--kbd-shadow)
221
+ color: var(--kbd-color)
222
+ font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif
223
+ font-size: 0.85em
224
+ font-weight: 600
225
+ line-height: 1.1
226
+ letter-spacing: 0.01em
227
+ vertical-align: middle
228
+ white-space: nowrap
229
+ text-transform: none
230
+
202
231
  .katex
203
232
  color: inherit
204
233
  max-width: 100%
@@ -2,7 +2,7 @@
2
2
 
3
3
  Raw HTML can be used inside Markdown when the native Markdown syntax is not expressive enough.
4
4
 
5
- This is useful for custom wrappers, inline labels, embedded elements, and Docsector-specific custom elements such as expandable blocks and quick links.
5
+ This is useful for custom wrappers, inline labels, keyboard shortcut keycaps, embedded elements, and Docsector-specific custom elements such as expandable blocks and quick links.
6
6
 
7
7
  ## Markdown Example
8
8
 
@@ -10,10 +10,13 @@ This is useful for custom wrappers, inline labels, embedded elements, and Docsec
10
10
  <div data-kind="secondary-note">
11
11
  This block uses raw HTML inside the page source.
12
12
  </div>
13
+
14
+ Press <kbd>⌘</kbd> + <kbd>B</kbd> to toggle bold text.
13
15
  ```
14
16
 
15
17
  ## Notes
16
18
 
17
19
  - Prefer plain Markdown first when it already solves the problem.
18
20
  - Use raw HTML when you need structure or attributes that Markdown does not provide.
21
+ - Author GitBook-style keyboard shortcuts with `<kbd>...</kbd>` when you want keycaps inside normal prose.
19
22
  - Keep the markup readable, because documentation content still needs to be maintained by humans.
@@ -9,4 +9,8 @@
9
9
 
10
10
  ### Inline Badge
11
11
 
12
- Use <span style="padding: 0.15rem 0.45rem; border: 1px solid currentColor; border-radius: 999px;">beta</span> labels directly inside a sentence.
12
+ Use <span style="padding: 0.15rem 0.45rem; border: 1px solid currentColor; border-radius: 999px;">beta</span> labels directly inside a sentence.
13
+
14
+ ### Keyboard Shortcuts
15
+
16
+ Use <kbd>⌘</kbd> + <kbd>B</kbd> for bold, <kbd>⌘</kbd> + <kbd>K</kbd> to open quick search, and <kbd>Shift</kbd> + <kbd>Alt</kbd> + <kbd>S</kbd> for multi-key shortcuts.
@@ -875,8 +875,8 @@ export default {
875
875
  },
876
876
  metadata: {
877
877
  tags: {
878
- 'en-US': 'raw html markup inline block custom elements markdown',
879
- 'pt-BR': 'html bruto marcaΓ§Γ£o inline bloco elementos customizados markdown'
878
+ 'en-US': 'raw html markup inline block custom elements markdown keyboard shortcut shortcuts kbd keycap gitbook',
879
+ 'pt-BR': 'html bruto marcaΓ§Γ£o inline bloco elementos customizados markdown teclado atalho atalhos kbd keycap gitbook'
880
880
  }
881
881
  }
882
882
  },
@@ -74,6 +74,28 @@ function normalizePathForMatch (path) {
74
74
 
75
75
  const CURRENT_VERSION_KEY = '__current__'
76
76
 
77
+ const DOCSECTOR_VIRTUAL_MODULE_IDS = Object.freeze([
78
+ 'virtual:docsector-books',
79
+ 'virtual:docsector-homepage-override',
80
+ 'virtual:docsector-code-examples',
81
+ 'virtual:docsector-git-dates'
82
+ ])
83
+
84
+ const DOCSECTOR_CONSUMER_OPTIMIZE_DEPS_EXCLUDE = Object.freeze([
85
+ '@docsector/docsector-reader',
86
+ '@docsector/docsector-reader/src/App.vue',
87
+ '@docsector/docsector-reader/src/router/index',
88
+ '@docsector/docsector-reader/src/router/index.js',
89
+ '@docsector/docsector-reader/src/router/routes',
90
+ '@docsector/docsector-reader/src/router/routes.js',
91
+ 'node_modules/@docsector/docsector-reader/src/App.vue',
92
+ 'node_modules/@docsector/docsector-reader/src/router/index',
93
+ 'node_modules/@docsector/docsector-reader/src/router/index.js',
94
+ 'node_modules/@docsector/docsector-reader/src/router/routes',
95
+ 'node_modules/@docsector/docsector-reader/src/router/routes.js',
96
+ ...DOCSECTOR_VIRTUAL_MODULE_IDS
97
+ ])
98
+
77
99
  function trimSlashes (value) {
78
100
  return String(value || '').replace(/^\/+|\/+$/g, '')
79
101
  }
@@ -3203,21 +3225,23 @@ export function createQuasarConfig (options = {}) {
3203
3225
  ...(viteConf.optimizeDeps.include || []),
3204
3226
  'vue', 'vue-router', 'vuex', 'vue-i18n',
3205
3227
  'prismjs', 'markdown-it', 'markdown-it-attrs',
3228
+ 'markdown-it-task-lists', 'markdown-it-texmath',
3206
3229
  'hjson', 'q-colorize-mixin', 'mermaid'
3207
3230
  ]
3208
3231
 
3209
- // Exclude boot files and the router from pre-bundling.
3232
+ // Exclude boot files and Docsector runtime entry points from pre-bundling.
3210
3233
  // Boot files (especially boot/i18n) import the consumer's src/i18n/index.js
3211
3234
  // which uses import.meta.glob β€” a compile-time Vite directive that only
3212
3235
  // works in source files. If pre-bundled, the glob calls become dead code
3213
3236
  // and no i18n messages are loaded.
3214
- // The router is excluded because routes.js imports consumer content via
3215
- // the `pages` alias. If pre-bundled, consumer content gets embedded in
3216
- // the optimizer cache whose hash doesn't track source file changes,
3217
- // causing stale routes after editing page registry files.
3237
+ // In consumer mode, the package router also imports Vite virtual modules
3238
+ // and consumer content via the `pages` alias. If pre-bundled, Vite can
3239
+ // try resolving those virtual IDs before Docsector's plugins handle them,
3240
+ // or embed stale consumer registry content in the optimizer cache.
3218
3241
  viteConf.optimizeDeps.exclude = [
3219
3242
  ...(viteConf.optimizeDeps.exclude || []),
3220
- 'boot/i18n', 'boot/store', 'boot/QZoom', 'boot/axios'
3243
+ 'boot/i18n', 'boot/store', 'boot/QZoom', 'boot/axios',
3244
+ ...(!isStandalone ? DOCSECTOR_CONSUMER_OPTIMIZE_DEPS_EXCLUDE : [])
3221
3245
  ]
3222
3246
 
3223
3247
  if (!isStandalone) {