@knowcode/doc-builder 1.4.15 → 1.4.17

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.
@@ -17,7 +17,9 @@
17
17
  "Bash(npx:*)",
18
18
  "Bash(grep:*)",
19
19
  "Bash(npm cache clean:*)",
20
- "Bash(ls:*)"
20
+ "Bash(ls:*)",
21
+ "Bash(npm run build:*)",
22
+ "Bash(npm view:*)"
21
23
  ],
22
24
  "deny": []
23
25
  }
package/CHANGELOG.md CHANGED
@@ -5,6 +5,31 @@ All notable changes to @knowcode/doc-builder will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [1.4.17] - 2025-07-21
9
+
10
+ ### Improved
11
+ - Enhanced tooltip extraction to show content from Overview/Summary sections
12
+ - Tooltips now display the actual overview text from documents
13
+ - Provides more meaningful previews when hovering over menu items
14
+
15
+ ### Background
16
+ - Previously tooltips showed just the first few words from documents
17
+ - Now extracts content specifically from "Overview" or "Summary" sections
18
+ - Falls back to first paragraph if no Overview/Summary section exists
19
+ - Provides better context about what each document contains
20
+
21
+ ## [1.4.16] - 2025-07-21
22
+
23
+ ### Improved
24
+ - Enhanced menu tooltips to show clean text previews instead of raw markdown
25
+ - Tooltips now display properly formatted text with markdown syntax removed
26
+ - Better preview experience for document summaries
27
+
28
+ ### Background
29
+ - Previously tooltips showed raw markdown including asterisks, links, etc.
30
+ - Now provides clean, readable text excerpts from document content
31
+ - Improves user experience when hovering over menu items
32
+
8
33
  ## [1.4.15] - 2025-07-21
9
34
 
10
35
  ### Fixed
package/html/README.html CHANGED
@@ -29,7 +29,7 @@
29
29
 
30
30
  <div class="header-actions">
31
31
  <div class="deployment-info">
32
- <span class="deployment-date" title="Built with doc-builder v1.4.14">Last updated: Jul 21, 2025, 04:05 PM UTC</span>
32
+ <span class="deployment-date" title="Built with doc-builder v1.4.17">Last updated: Jul 21, 2025, 04:26 PM UTC</span>
33
33
  </div>
34
34
 
35
35
 
@@ -78,15 +78,15 @@
78
78
  <i class="fas fa-home"></i> Documentation
79
79
  </a>
80
80
  <div class="nav-content" >
81
- <a href="/README.html" class="nav-item active" data-tooltip="&gt; Transform your markdown documentation into beautiful, searchable websites with Notion-inspired styling Create stunning documentation sites in minute..."><i class="fas fa-file-alt"></i> Overview</a>
82
- <a href="/claude-workflow-guide.html" class="nav-item" data-tooltip="**Generated**: 2025-07-21 10:00 UTC **Status**: Complete **Verified**: ✅ This guide demonstrates an efficient workflow for using Claude Code with a re..."><i class="fas fa-file-alt"></i> Claude Workflow Guide</a>
83
- <a href="/documentation-index.html" class="nav-item" data-tooltip="**Generated**: 2025-07-21 18:00 UTC **Status**: Complete **Verified**: ✅ This directory contains additional documentation for the @knowcode/doc-builde..."><i class="fas fa-file-alt"></i> Documentation Index</a></div></div>
81
+ <a href="/README.html" class="nav-item active" data-tooltip="@knowcode/doc-builder."><i class="fas fa-file-alt"></i> Overview</a>
82
+ <a href="/claude-workflow-guide.html" class="nav-item" data-tooltip="This guide demonstrates an efficient workflow for using Claude Code with a refined CLAUDE.md file to create high-quality documentation and deploy it..."><i class="fas fa-file-alt"></i> Claude Workflow Guide</a>
83
+ <a href="/documentation-index.html" class="nav-item" data-tooltip="This directory contains additional documentation for the @knowcode/doc-builder project, organized by topic and purpose."><i class="fas fa-file-alt"></i> Documentation Index</a></div></div>
84
84
  <div class="nav-section" data-level="1">
85
85
  <a class="nav-title collapsible expanded" href="#" data-target="nav-guides-1" >
86
86
  <i class="fas fa-chevron-right collapse-icon"></i><i class="fas fa-folder"></i> Guides
87
87
  </a>
88
88
  <div class="nav-content" id="nav-guides-1">
89
- <a href="/guides/document-standards.html" class="nav-item" data-tooltip="**Generated**: 2025-07-21 18:00 UTC **Status**: Complete **Verified**: ✅ This document defines the documentation standards and conventions for the @kn..."><i class="fas fa-file-alt"></i> Document Standards</a></div></div>
89
+ <a href="/guides/DOCUMENT-STANDARDS.html" class="nav-item" data-tooltip="This document defines the documentation standards and conventions for the @knowcode/doc-builder project."><i class="fas fa-file-alt"></i> DOCUMENT STANDARDS</a></div></div>
90
90
  </nav>
91
91
  <div class="resize-handle"></div>
92
92
  </aside>
@@ -29,7 +29,7 @@
29
29
 
30
30
  <div class="header-actions">
31
31
  <div class="deployment-info">
32
- <span class="deployment-date" title="Built with doc-builder v1.4.14">Last updated: Jul 21, 2025, 04:05 PM UTC</span>
32
+ <span class="deployment-date" title="Built with doc-builder v1.4.17">Last updated: Jul 21, 2025, 04:26 PM UTC</span>
33
33
  </div>
34
34
 
35
35
 
@@ -78,15 +78,15 @@
78
78
  <i class="fas fa-home"></i> Documentation
79
79
  </a>
80
80
  <div class="nav-content" >
81
- <a href="/README.html" class="nav-item" data-tooltip="&gt; Transform your markdown documentation into beautiful, searchable websites with Notion-inspired styling Create stunning documentation sites in minute..."><i class="fas fa-file-alt"></i> Overview</a>
82
- <a href="/claude-workflow-guide.html" class="nav-item active" data-tooltip="**Generated**: 2025-07-21 10:00 UTC **Status**: Complete **Verified**: ✅ This guide demonstrates an efficient workflow for using Claude Code with a re..."><i class="fas fa-file-alt"></i> Claude Workflow Guide</a>
83
- <a href="/documentation-index.html" class="nav-item" data-tooltip="**Generated**: 2025-07-21 18:00 UTC **Status**: Complete **Verified**: ✅ This directory contains additional documentation for the @knowcode/doc-builde..."><i class="fas fa-file-alt"></i> Documentation Index</a></div></div>
81
+ <a href="/README.html" class="nav-item" data-tooltip="@knowcode/doc-builder."><i class="fas fa-file-alt"></i> Overview</a>
82
+ <a href="/claude-workflow-guide.html" class="nav-item active" data-tooltip="This guide demonstrates an efficient workflow for using Claude Code with a refined CLAUDE.md file to create high-quality documentation and deploy it..."><i class="fas fa-file-alt"></i> Claude Workflow Guide</a>
83
+ <a href="/documentation-index.html" class="nav-item" data-tooltip="This directory contains additional documentation for the @knowcode/doc-builder project, organized by topic and purpose."><i class="fas fa-file-alt"></i> Documentation Index</a></div></div>
84
84
  <div class="nav-section" data-level="1">
85
85
  <a class="nav-title collapsible" href="#" data-target="nav-guides-1" >
86
86
  <i class="fas fa-chevron-right collapse-icon"></i><i class="fas fa-folder"></i> Guides
87
87
  </a>
88
88
  <div class="nav-content collapsed" id="nav-guides-1">
89
- <a href="/guides/document-standards.html" class="nav-item" data-tooltip="**Generated**: 2025-07-21 18:00 UTC **Status**: Complete **Verified**: ✅ This document defines the documentation standards and conventions for the @kn..."><i class="fas fa-file-alt"></i> Document Standards</a></div></div>
89
+ <a href="/guides/DOCUMENT-STANDARDS.html" class="nav-item" data-tooltip="This document defines the documentation standards and conventions for the @knowcode/doc-builder project."><i class="fas fa-file-alt"></i> DOCUMENT STANDARDS</a></div></div>
90
90
  </nav>
91
91
  <div class="resize-handle"></div>
92
92
  </aside>
@@ -29,7 +29,7 @@
29
29
 
30
30
  <div class="header-actions">
31
31
  <div class="deployment-info">
32
- <span class="deployment-date" title="Built with doc-builder v1.4.14">Last updated: Jul 21, 2025, 04:05 PM UTC</span>
32
+ <span class="deployment-date" title="Built with doc-builder v1.4.17">Last updated: Jul 21, 2025, 04:26 PM UTC</span>
33
33
  </div>
34
34
 
35
35
 
@@ -78,15 +78,15 @@
78
78
  <i class="fas fa-home"></i> Documentation
79
79
  </a>
80
80
  <div class="nav-content" >
81
- <a href="/README.html" class="nav-item" data-tooltip="&gt; Transform your markdown documentation into beautiful, searchable websites with Notion-inspired styling Create stunning documentation sites in minute..."><i class="fas fa-file-alt"></i> Overview</a>
82
- <a href="/claude-workflow-guide.html" class="nav-item" data-tooltip="**Generated**: 2025-07-21 10:00 UTC **Status**: Complete **Verified**: ✅ This guide demonstrates an efficient workflow for using Claude Code with a re..."><i class="fas fa-file-alt"></i> Claude Workflow Guide</a>
83
- <a href="/documentation-index.html" class="nav-item active" data-tooltip="**Generated**: 2025-07-21 18:00 UTC **Status**: Complete **Verified**: ✅ This directory contains additional documentation for the @knowcode/doc-builde..."><i class="fas fa-file-alt"></i> Documentation Index</a></div></div>
81
+ <a href="/README.html" class="nav-item" data-tooltip="@knowcode/doc-builder."><i class="fas fa-file-alt"></i> Overview</a>
82
+ <a href="/claude-workflow-guide.html" class="nav-item" data-tooltip="This guide demonstrates an efficient workflow for using Claude Code with a refined CLAUDE.md file to create high-quality documentation and deploy it..."><i class="fas fa-file-alt"></i> Claude Workflow Guide</a>
83
+ <a href="/documentation-index.html" class="nav-item active" data-tooltip="This directory contains additional documentation for the @knowcode/doc-builder project, organized by topic and purpose."><i class="fas fa-file-alt"></i> Documentation Index</a></div></div>
84
84
  <div class="nav-section" data-level="1">
85
85
  <a class="nav-title collapsible" href="#" data-target="nav-guides-1" >
86
86
  <i class="fas fa-chevron-right collapse-icon"></i><i class="fas fa-folder"></i> Guides
87
87
  </a>
88
88
  <div class="nav-content collapsed" id="nav-guides-1">
89
- <a href="/guides/document-standards.html" class="nav-item" data-tooltip="**Generated**: 2025-07-21 18:00 UTC **Status**: Complete **Verified**: ✅ This document defines the documentation standards and conventions for the @kn..."><i class="fas fa-file-alt"></i> Document Standards</a></div></div>
89
+ <a href="/guides/DOCUMENT-STANDARDS.html" class="nav-item" data-tooltip="This document defines the documentation standards and conventions for the @knowcode/doc-builder project."><i class="fas fa-file-alt"></i> DOCUMENT STANDARDS</a></div></div>
90
90
  </nav>
91
91
  <div class="resize-handle"></div>
92
92
  </aside>
@@ -29,7 +29,7 @@
29
29
 
30
30
  <div class="header-actions">
31
31
  <div class="deployment-info">
32
- <span class="deployment-date" title="Built with doc-builder v1.4.14">Last updated: Jul 21, 2025, 04:05 PM UTC</span>
32
+ <span class="deployment-date" title="Built with doc-builder v1.4.17">Last updated: Jul 21, 2025, 04:26 PM UTC</span>
33
33
  </div>
34
34
 
35
35
 
@@ -78,15 +78,15 @@
78
78
  <i class="fas fa-home"></i> Documentation
79
79
  </a>
80
80
  <div class="nav-content" >
81
- <a href="/README.html" class="nav-item" data-tooltip="&gt; Transform your markdown documentation into beautiful, searchable websites with Notion-inspired styling Create stunning documentation sites in minute..."><i class="fas fa-file-alt"></i> Overview</a>
82
- <a href="/claude-workflow-guide.html" class="nav-item" data-tooltip="**Generated**: 2025-07-21 10:00 UTC **Status**: Complete **Verified**: ✅ This guide demonstrates an efficient workflow for using Claude Code with a re..."><i class="fas fa-file-alt"></i> Claude Workflow Guide</a>
83
- <a href="/documentation-index.html" class="nav-item" data-tooltip="**Generated**: 2025-07-21 18:00 UTC **Status**: Complete **Verified**: ✅ This directory contains additional documentation for the @knowcode/doc-builde..."><i class="fas fa-file-alt"></i> Documentation Index</a></div></div>
81
+ <a href="/README.html" class="nav-item" data-tooltip="@knowcode/doc-builder."><i class="fas fa-file-alt"></i> Overview</a>
82
+ <a href="/claude-workflow-guide.html" class="nav-item" data-tooltip="This guide demonstrates an efficient workflow for using Claude Code with a refined CLAUDE.md file to create high-quality documentation and deploy it..."><i class="fas fa-file-alt"></i> Claude Workflow Guide</a>
83
+ <a href="/documentation-index.html" class="nav-item" data-tooltip="This directory contains additional documentation for the @knowcode/doc-builder project, organized by topic and purpose."><i class="fas fa-file-alt"></i> Documentation Index</a></div></div>
84
84
  <div class="nav-section" data-level="1">
85
85
  <a class="nav-title collapsible expanded" href="#" data-target="nav-guides-1" >
86
86
  <i class="fas fa-chevron-right collapse-icon"></i><i class="fas fa-folder"></i> Guides
87
87
  </a>
88
88
  <div class="nav-content" id="nav-guides-1">
89
- <a href="/guides/document-standards.html" class="nav-item active" data-tooltip="**Generated**: 2025-07-21 18:00 UTC **Status**: Complete **Verified**: ✅ This document defines the documentation standards and conventions for the @kn..."><i class="fas fa-file-alt"></i> Document Standards</a></div></div>
89
+ <a href="/guides/DOCUMENT-STANDARDS.html" class="nav-item active" data-tooltip="This document defines the documentation standards and conventions for the @knowcode/doc-builder project."><i class="fas fa-file-alt"></i> DOCUMENT STANDARDS</a></div></div>
90
90
  </nav>
91
91
  <div class="resize-handle"></div>
92
92
  </aside>
package/html/index.html CHANGED
@@ -29,7 +29,7 @@
29
29
 
30
30
  <div class="header-actions">
31
31
  <div class="deployment-info">
32
- <span class="deployment-date" title="Built with doc-builder v1.4.14">Last updated: Jul 21, 2025, 04:05 PM UTC</span>
32
+ <span class="deployment-date" title="Built with doc-builder v1.4.17">Last updated: Jul 21, 2025, 04:26 PM UTC</span>
33
33
  </div>
34
34
 
35
35
 
@@ -78,15 +78,15 @@
78
78
  <i class="fas fa-home"></i> Documentation
79
79
  </a>
80
80
  <div class="nav-content" >
81
- <a href="/README.html" class="nav-item active" data-tooltip="&gt; Transform your markdown documentation into beautiful, searchable websites with Notion-inspired styling Create stunning documentation sites in minute..."><i class="fas fa-file-alt"></i> Overview</a>
82
- <a href="/claude-workflow-guide.html" class="nav-item" data-tooltip="**Generated**: 2025-07-21 10:00 UTC **Status**: Complete **Verified**: ✅ This guide demonstrates an efficient workflow for using Claude Code with a re..."><i class="fas fa-file-alt"></i> Claude Workflow Guide</a>
83
- <a href="/documentation-index.html" class="nav-item" data-tooltip="**Generated**: 2025-07-21 18:00 UTC **Status**: Complete **Verified**: ✅ This directory contains additional documentation for the @knowcode/doc-builde..."><i class="fas fa-file-alt"></i> Documentation Index</a></div></div>
81
+ <a href="/README.html" class="nav-item active" data-tooltip="@knowcode/doc-builder."><i class="fas fa-file-alt"></i> Overview</a>
82
+ <a href="/claude-workflow-guide.html" class="nav-item" data-tooltip="This guide demonstrates an efficient workflow for using Claude Code with a refined CLAUDE.md file to create high-quality documentation and deploy it..."><i class="fas fa-file-alt"></i> Claude Workflow Guide</a>
83
+ <a href="/documentation-index.html" class="nav-item" data-tooltip="This directory contains additional documentation for the @knowcode/doc-builder project, organized by topic and purpose."><i class="fas fa-file-alt"></i> Documentation Index</a></div></div>
84
84
  <div class="nav-section" data-level="1">
85
85
  <a class="nav-title collapsible expanded" href="#" data-target="nav-guides-1" >
86
86
  <i class="fas fa-chevron-right collapse-icon"></i><i class="fas fa-folder"></i> Guides
87
87
  </a>
88
88
  <div class="nav-content" id="nav-guides-1">
89
- <a href="/guides/document-standards.html" class="nav-item" data-tooltip="**Generated**: 2025-07-21 18:00 UTC **Status**: Complete **Verified**: ✅ This document defines the documentation standards and conventions for the @kn..."><i class="fas fa-file-alt"></i> Document Standards</a></div></div>
89
+ <a href="/guides/DOCUMENT-STANDARDS.html" class="nav-item" data-tooltip="This document defines the documentation standards and conventions for the @knowcode/doc-builder project."><i class="fas fa-file-alt"></i> DOCUMENT STANDARDS</a></div></div>
90
90
  </nav>
91
91
  <div class="resize-handle"></div>
92
92
  </aside>
@@ -29,26 +29,105 @@ function extractSummary(content, maxLength = 150) {
29
29
  // Remove front matter
30
30
  content = content.replace(/^---[\s\S]*?---\n/, '');
31
31
 
32
- // Remove headers
33
- content = content.replace(/^#+\s+.+$/gm, '');
32
+ // First, try to find Overview or Summary sections
33
+ const overviewMatch = content.match(/##\s+(Overview|Summary)\s*\n+([\s\S]*?)(?=\n##|\n#[^#]|$)/i);
34
+ if (overviewMatch) {
35
+ // Extract the content under Overview/Summary section
36
+ let summaryContent = overviewMatch[2];
37
+
38
+ // Clean up the extracted content
39
+ summaryContent = summaryContent.replace(/```[\s\S]*?```/g, ''); // Remove code blocks
40
+ summaryContent = summaryContent.replace(/`[^`]+`/g, ''); // Remove inline code
41
+ summaryContent = summaryContent.replace(/!\[[^\]]*\]\([^)]*\)/g, ''); // Remove images
42
+ summaryContent = summaryContent.replace(/\[([^\]]*)\]\([^)]*\)/g, '$1'); // Convert links to text
43
+ summaryContent = summaryContent.replace(/<[^>]+>/g, ''); // Remove HTML
44
+ summaryContent = summaryContent.replace(/\*\*([^*]+)\*\*/g, '$1'); // Remove bold
45
+ summaryContent = summaryContent.replace(/\*([^*]+)\*/g, '$1'); // Remove italic
46
+ summaryContent = summaryContent.replace(/__([^_]+)__/g, '$1'); // Remove bold alt
47
+ summaryContent = summaryContent.replace(/_([^_]+)_/g, '$1'); // Remove italic alt
48
+ summaryContent = summaryContent.replace(/~~([^~]+)~~/g, '$1'); // Remove strikethrough
49
+ summaryContent = summaryContent.replace(/^>\s*/gm, ''); // Remove blockquotes
50
+ summaryContent = summaryContent.replace(/^[-*+]\s+/gm, ''); // Remove list markers
51
+ summaryContent = summaryContent.replace(/^\d+\.\s+/gm, ''); // Remove numbered lists
52
+ summaryContent = summaryContent.replace(/^---+$/gm, ''); // Remove horizontal rules
53
+ summaryContent = summaryContent.replace(/^\*\*\*+$/gm, ''); // Remove horizontal rules alt
54
+
55
+ // Normalize whitespace
56
+ summaryContent = summaryContent.trim().replace(/\s+/g, ' ');
57
+
58
+ // Get the first sentence or paragraph
59
+ const sentences = summaryContent.split(/\.\s+/);
60
+ if (sentences.length > 0 && sentences[0].trim().length > 10) {
61
+ summaryContent = sentences[0].trim();
62
+ if (!summaryContent.endsWith('.')) {
63
+ summaryContent += '.';
64
+ }
65
+
66
+ // Truncate if needed
67
+ if (summaryContent.length > maxLength) {
68
+ const cutIndex = summaryContent.lastIndexOf(' ', maxLength);
69
+ summaryContent = summaryContent.substring(0, cutIndex > 0 ? cutIndex : maxLength).trim() + '...';
70
+ }
71
+
72
+ return summaryContent;
73
+ }
74
+ }
75
+
76
+ // Fallback to original logic if no Overview/Summary section found
77
+ // Remove headers but keep their text
78
+ content = content.replace(/^#+\s+(.+)$/gm, '$1. ');
34
79
 
35
80
  // Remove code blocks
36
81
  content = content.replace(/```[\s\S]*?```/g, '');
37
82
  content = content.replace(/`[^`]+`/g, '');
38
83
 
39
- // Remove images and links
84
+ // Remove images
40
85
  content = content.replace(/!\[[^\]]*\]\([^)]*\)/g, '');
41
- content = content.replace(/\[[^\]]*\]\([^)]*\)/g, '');
86
+
87
+ // Convert links to just their text
88
+ content = content.replace(/\[([^\]]*)\]\([^)]*\)/g, '$1');
42
89
 
43
90
  // Remove HTML tags
44
91
  content = content.replace(/<[^>]+>/g, '');
45
92
 
46
- // Remove extra whitespace
93
+ // Remove markdown formatting
94
+ content = content.replace(/\*\*([^*]+)\*\*/g, '$1'); // Bold
95
+ content = content.replace(/\*([^*]+)\*/g, '$1'); // Italic
96
+ content = content.replace(/__([^_]+)__/g, '$1'); // Bold
97
+ content = content.replace(/_([^_]+)_/g, '$1'); // Italic
98
+ content = content.replace(/~~([^~]+)~~/g, '$1'); // Strikethrough
99
+
100
+ // Remove blockquotes
101
+ content = content.replace(/^>\s*/gm, '');
102
+
103
+ // Remove list markers
104
+ content = content.replace(/^[-*+]\s+/gm, '');
105
+ content = content.replace(/^\d+\.\s+/gm, '');
106
+
107
+ // Remove horizontal rules
108
+ content = content.replace(/^---+$/gm, '');
109
+ content = content.replace(/^\*\*\*+$/gm, '');
110
+
111
+ // Remove extra whitespace and normalize
47
112
  content = content.trim().replace(/\s+/g, ' ');
48
113
 
114
+ // Skip common metadata patterns at the start
115
+ content = content.replace(/^(Generated|Status|Verified|Date|Author|Version|Updated|Created):\s*[^\n]+\s*/gi, '');
116
+
117
+ // Find the first meaningful content paragraph
118
+ const paragraphs = content.split(/\.\s+/).filter(p => p.trim().length > 20);
119
+ if (paragraphs.length > 0) {
120
+ content = paragraphs[0].trim();
121
+ if (!content.endsWith('.')) {
122
+ content += '.';
123
+ }
124
+ }
125
+
49
126
  // Truncate if needed
50
127
  if (content.length > maxLength) {
51
- content = content.substring(0, maxLength).trim() + '...';
128
+ // Try to cut at a word boundary
129
+ const cutIndex = content.lastIndexOf(' ', maxLength);
130
+ content = content.substring(0, cutIndex > 0 ? cutIndex : maxLength).trim() + '...';
52
131
  }
53
132
 
54
133
  return content || 'No description available';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@knowcode/doc-builder",
3
- "version": "1.4.15",
3
+ "version": "1.4.17",
4
4
  "description": "Reusable documentation builder for markdown-based sites with Vercel deployment support",
5
5
  "main": "index.js",
6
6
  "bin": {
File without changes