@knowcode/doc-builder 1.3.11 → 1.3.13
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 +26 -0
- package/assets/css/notion-style.css +3 -13
- package/assets/js/main.js +16 -25
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,32 @@ 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.13] - 2025-07-19
|
|
9
|
+
|
|
10
|
+
### Fixed
|
|
11
|
+
- Made content body left-aligned instead of centered
|
|
12
|
+
- Made navigation menu top-aligned by removing top padding
|
|
13
|
+
- Simplified layout for better compatibility
|
|
14
|
+
|
|
15
|
+
### Changed
|
|
16
|
+
- `.content-inner` now uses `margin: 0` instead of `margin: 0 auto` for left alignment
|
|
17
|
+
- `.navigation` padding changed from all sides to only bottom/left/right
|
|
18
|
+
- Removed unnecessary centering that was causing layout issues
|
|
19
|
+
|
|
20
|
+
## [1.3.12] - 2025-07-19
|
|
21
|
+
|
|
22
|
+
### Fixed
|
|
23
|
+
- Fixed tooltip positioning by using `position: fixed` to match original implementation
|
|
24
|
+
- Updated tooltip JavaScript to match simpler original approach
|
|
25
|
+
- Fixed content-inner wrapper already present in HTML generation
|
|
26
|
+
- Improved tooltip initialization with console logging for debugging
|
|
27
|
+
|
|
28
|
+
### Technical Details
|
|
29
|
+
- Tooltips now use fixed positioning with CSS variables for placement
|
|
30
|
+
- Simplified event handling for tooltip hover events
|
|
31
|
+
- Added debug logging to help diagnose tooltip initialization issues
|
|
32
|
+
- Content structure matches original with proper content-inner wrapper
|
|
33
|
+
|
|
8
34
|
## [1.3.11] - 2025-07-19
|
|
9
35
|
|
|
10
36
|
### Fixed
|
|
@@ -535,7 +535,7 @@ pre code {
|
|
|
535
535
|
/* Navigation */
|
|
536
536
|
.navigation {
|
|
537
537
|
flex: 1;
|
|
538
|
-
padding: var(--space-2);
|
|
538
|
+
padding: 0 var(--space-2) var(--space-2) var(--space-2); /* No top padding */
|
|
539
539
|
overflow-y: auto;
|
|
540
540
|
overflow-x: visible;
|
|
541
541
|
|
|
@@ -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;
|
|
@@ -713,7 +703,7 @@ pre code {
|
|
|
713
703
|
|
|
714
704
|
.content-inner {
|
|
715
705
|
max-width: 65rem;
|
|
716
|
-
margin: 0
|
|
706
|
+
margin: 0; /* Left aligned instead of centered */
|
|
717
707
|
}
|
|
718
708
|
|
|
719
709
|
/* Tables */
|
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
|