@docsector/docsector-reader 4.4.4 → 4.4.5

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
@@ -57,7 +57,7 @@ Transform Markdown content into beautiful, navigable documentation sites — wit
57
57
  - 🔗 **Anchor Navigation** — Right-side source-ordered Table of Contents tree with stable scroll tracking, resize-safe drawer state, auto-scroll to the active section, and active-heading resolution based on the last heading that crossed the content threshold
58
58
  - 🖱️ **Active Menu Item UX** — Active menu entries keep pointer cursor, clear URL hash without redundant navigation, and prevent accidental label text selection
59
59
  - 🔎 **Search** — Menu search across all documentation content and tags
60
- - 💬 **Assistant Chat UX Enhancements** — Long conversations keep focus on recent messages, load earlier history progressively, deduplicate repeated sources, include per-message copy actions, and show a floating quick return to the bottom
60
+ - 💬 **Assistant Chat UX Enhancements** — Long conversations keep focus on recent messages, load earlier history progressively, deduplicate repeated sources, preserve the assistant panel open state across reloads, include per-message copy actions, and show a floating quick return to the bottom
61
61
  - 📱 **Responsive** — Mobile-friendly with collapsible sidebar and drawers
62
62
  - 📚 **Book Tabs with Per-State Colors** — Define `*.book.js` tabs with icons, order, and `color.active` / `color.inactive`
63
63
  - 🔀 **Internal Shortcut Pages** — Route entries can redirect with `config.link.to`, keeping localized titles while inheriting icon/status from the destination page
@@ -298,7 +298,7 @@ Check `checks.discovery.webMcp.status` equals `"pass"`.
298
298
 
299
299
  Docsector Reader can add an opt-in assistant panel for documentation Q&A. Users open it from the global header while reading pages and subpages; it is not a dedicated documentation route. The drawer posts to a same-origin Cloudflare Pages Function, and that function calls Cloudflare AI Search so secrets, rate-limit strategy, provider errors, and future auth stay server-side.
300
300
 
301
- The panel is disabled by default. When enabled, desktop pages get a dedicated right-side assistant rail that can sit beside the table of contents on wide screens. Mobile uses a fullscreen dialog. Conversations restore at the latest message, reveal earlier history progressively in long chats, deduplicate repeated source links, and provide per-message copy actions.
301
+ The panel is disabled by default. When enabled, desktop pages get a dedicated right-side assistant rail that can sit beside the table of contents on wide screens. Mobile uses a fullscreen dialog. Conversations restore at the latest message, reveal earlier history progressively in long chats, deduplicate repeated source links, preserve the panel open state across page reloads, and provide per-message copy actions.
302
302
 
303
303
  ### Configure
304
304
 
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.4.4'
27
+ const VERSION = '4.4.5'
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`
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@docsector/docsector-reader",
3
- "version": "4.4.4",
3
+ "version": "4.4.5",
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",
@@ -1,7 +1,35 @@
1
- export default {
2
- namespaced: true,
1
+ export const LAYOUT_ASSISTANT_STORAGE_KEY = 'docsector.layout.assistant.v1'
2
+
3
+ function getStorage (storage = null) {
4
+ if (storage) return storage
5
+ if (typeof window === 'undefined') return null
6
+ return window.localStorage || null
7
+ }
8
+
9
+ export function loadPersistedAssistantLayout ({ storage = null, key = LAYOUT_ASSISTANT_STORAGE_KEY } = {}) {
10
+ const target = getStorage(storage)
11
+ if (!target) return false
12
+
13
+ try {
14
+ return target.getItem(key) === 'true'
15
+ } catch {
16
+ return false
17
+ }
18
+ }
19
+
20
+ export function savePersistedAssistantLayout (value, { storage = null, key = LAYOUT_ASSISTANT_STORAGE_KEY } = {}) {
21
+ const target = getStorage(storage)
22
+ if (!target) return
3
23
 
4
- state: {
24
+ try {
25
+ target.setItem(key, value ? 'true' : 'false')
26
+ } catch {
27
+ // Ignore storage failures so layout keeps working in memory.
28
+ }
29
+ }
30
+
31
+ export function createLayoutState () {
32
+ return {
5
33
  header: true,
6
34
  footer: true,
7
35
  left: false,
@@ -30,9 +58,15 @@ export default {
30
58
  scrolling: true,
31
59
  meta: true,
32
60
  metaToggle: false,
33
- assistant: false,
61
+ assistant: loadPersistedAssistantLayout(),
34
62
  assistantWidth: 380
35
- },
63
+ }
64
+ }
65
+
66
+ export default {
67
+ namespaced: true,
68
+
69
+ state: createLayoutState,
36
70
  getters: {
37
71
  view (state) {
38
72
  const
@@ -122,7 +156,8 @@ export default {
122
156
  state.metaToggle = val
123
157
  },
124
158
  setAssistant (state, val) {
125
- state.assistant = val
159
+ state.assistant = Boolean(val)
160
+ savePersistedAssistantLayout(state.assistant)
126
161
  },
127
162
  setAssistantWidth (state, val) {
128
163
  state.assistantWidth = val