@knowcode/doc-builder 1.3.10 → 1.3.12
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/CHANGELOG.md +33 -0
- package/assets/css/notion-style.css +1 -11
- package/assets/js/main.js +16 -25
- package/lib/core-builder.js +0 -2
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,39 @@ 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.3.12] - 2025-07-19
|
|
9
|
+
|
|
10
|
+
### Fixed
|
|
11
|
+
- Fixed tooltip positioning by using `position: fixed` to match original implementation
|
|
12
|
+
- Updated tooltip JavaScript to match simpler original approach
|
|
13
|
+
- Fixed content-inner wrapper already present in HTML generation
|
|
14
|
+
- Improved tooltip initialization with console logging for debugging
|
|
15
|
+
|
|
16
|
+
### Technical Details
|
|
17
|
+
- Tooltips now use fixed positioning with CSS variables for placement
|
|
18
|
+
- Simplified event handling for tooltip hover events
|
|
19
|
+
- Added debug logging to help diagnose tooltip initialization issues
|
|
20
|
+
- Content structure matches original with proper content-inner wrapper
|
|
21
|
+
|
|
22
|
+
## [1.3.11] - 2025-07-19
|
|
23
|
+
|
|
24
|
+
### Fixed
|
|
25
|
+
- **CRITICAL FIX**: Removed duplicate CSS file loading that was causing style conflicts
|
|
26
|
+
- Now only loads `notion-style.css` matching the original working build
|
|
27
|
+
- This fixes both tooltip functionality and spacing issues
|
|
28
|
+
|
|
29
|
+
### Root Cause
|
|
30
|
+
- The npm package was loading both `notion-style.css` AND `style.css`
|
|
31
|
+
- The `style.css` file was overriding proper styles from `notion-style.css`
|
|
32
|
+
- This caused spacing conflicts and broke tooltip positioning
|
|
33
|
+
- The original cybersolstice build only loads `notion-style.css`
|
|
34
|
+
|
|
35
|
+
### Impact
|
|
36
|
+
- Tooltips now work correctly with proper positioning
|
|
37
|
+
- Navigation spacing matches the original design
|
|
38
|
+
- No more CSS variable conflicts between themes
|
|
39
|
+
- Consistent styling throughout the application
|
|
40
|
+
|
|
8
41
|
## [1.3.10] - 2025-07-19
|
|
9
42
|
|
|
10
43
|
### Fixed
|
|
@@ -690,17 +690,7 @@ pre code {
|
|
|
690
690
|
}
|
|
691
691
|
|
|
692
692
|
/* Main Content */
|
|
693
|
-
.main-wrapper
|
|
694
|
-
display: flex;
|
|
695
|
-
padding-top: calc(var(--header-height) + var(--breadcrumb-height));
|
|
696
|
-
min-height: 100vh;
|
|
697
|
-
transition: padding-top var(--duration-normal);
|
|
698
|
-
}
|
|
699
|
-
|
|
700
|
-
/* Adjust layout when banner is visible */
|
|
701
|
-
.main-wrapper.banner-visible {
|
|
702
|
-
padding-top: calc(var(--header-height) + var(--breadcrumb-height) + 3.5rem);
|
|
703
|
-
}
|
|
693
|
+
/* Removed duplicate .main-wrapper - using the one defined earlier */
|
|
704
694
|
|
|
705
695
|
.content {
|
|
706
696
|
flex: 1;
|
package/assets/js/main.js
CHANGED
|
@@ -1332,33 +1332,24 @@ function generateBreadcrumbs() {
|
|
|
1332
1332
|
|
|
1333
1333
|
// Initialize tooltip positioning for navigation items
|
|
1334
1334
|
function initTooltips() {
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
if (!navigation) return;
|
|
1335
|
+
const tooltipElements = document.querySelectorAll('[data-tooltip]');
|
|
1336
|
+
console.log('[Tooltips] Found', tooltipElements.length, 'elements with tooltips');
|
|
1338
1337
|
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
|
|
1344
|
-
|
|
1345
|
-
|
|
1346
|
-
|
|
1347
|
-
|
|
1348
|
-
const leftPos = rect.right + 10;
|
|
1349
|
-
const topPos = rect.top + rect.height / 2;
|
|
1350
|
-
|
|
1351
|
-
tooltipElement.style.setProperty('--tooltip-left', `${leftPos}px`);
|
|
1352
|
-
tooltipElement.style.setProperty('--tooltip-top', `${topPos}px`);
|
|
1353
|
-
}, true); // Use capture phase
|
|
1354
|
-
|
|
1355
|
-
navigation.addEventListener('mouseleave', function(e) {
|
|
1356
|
-
const tooltipElement = e.target.closest('[data-tooltip]');
|
|
1357
|
-
if (!tooltipElement) return;
|
|
1338
|
+
tooltipElements.forEach(element => {
|
|
1339
|
+
element.addEventListener('mouseenter', function(e) {
|
|
1340
|
+
const rect = element.getBoundingClientRect();
|
|
1341
|
+
|
|
1342
|
+
// Position the tooltip using CSS variables
|
|
1343
|
+
element.style.setProperty('--tooltip-left', `${rect.right + 10}px`);
|
|
1344
|
+
element.style.setProperty('--tooltip-top', `${rect.top + rect.height / 2}px`);
|
|
1345
|
+
console.log('[Tooltip] Positioned at:', rect.right + 10, rect.top + rect.height / 2);
|
|
1346
|
+
});
|
|
1358
1347
|
|
|
1359
|
-
|
|
1360
|
-
|
|
1361
|
-
|
|
1348
|
+
element.addEventListener('mouseleave', function(e) {
|
|
1349
|
+
element.style.removeProperty('--tooltip-left');
|
|
1350
|
+
element.style.removeProperty('--tooltip-top');
|
|
1351
|
+
});
|
|
1352
|
+
});
|
|
1362
1353
|
}
|
|
1363
1354
|
|
|
1364
1355
|
// Initialize on DOM Load
|
package/lib/core-builder.js
CHANGED
|
@@ -83,7 +83,6 @@ function generateHTML(title, content, navigation, currentPath = '', config = {})
|
|
|
83
83
|
|
|
84
84
|
<!-- Styles -->
|
|
85
85
|
<link rel="stylesheet" href="/css/notion-style.css">
|
|
86
|
-
<link rel="stylesheet" href="/css/style.css">
|
|
87
86
|
|
|
88
87
|
<!-- Favicon -->
|
|
89
88
|
<link rel="icon" href="data:image/svg+xml,<svg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 100 100%22><text y=%22.9em%22 font-size=%2290%22>📚</text></svg>">
|
|
@@ -821,7 +820,6 @@ async function createDefaultIndexPage(outputDir, config, version) {
|
|
|
821
820
|
<title>Welcome to ${siteName}</title>
|
|
822
821
|
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap" rel="stylesheet">
|
|
823
822
|
<link rel="stylesheet" href="/css/notion-style.css">
|
|
824
|
-
<link rel="stylesheet" href="/css/style.css">
|
|
825
823
|
<style>
|
|
826
824
|
.welcome-container {
|
|
827
825
|
max-width: 800px;
|