@knowcode/doc-builder 1.1.12 → 1.2.1
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 +63 -0
- package/assets/css/notion-style.css +264 -49
- package/lib/core-builder.js +317 -68
- package/lib/deploy.js +12 -55
- package/package.json +1 -1
- package/temp-test/docs/README.md +69 -0
- package/temp-test/docs/test-file.md +1 -0
- package/temp-test/html/README.html +164 -0
- package/temp-test/html/css/notion-style.css +1758 -0
- package/temp-test/html/css/style.css +1974 -0
- package/temp-test/html/js/auth.js +65 -0
- package/temp-test/html/js/main.js +1333 -0
- package/temp-test/html/test-file.html +101 -0
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,69 @@ 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.2.1] - 2025-07-19
|
|
9
|
+
|
|
10
|
+
### Added
|
|
11
|
+
- **Auto-generated README.md** - System now automatically creates a helpful placeholder README.md when missing
|
|
12
|
+
- Comprehensive placeholder content with getting started guide and documentation standards
|
|
13
|
+
- Clear instructions for users on how to customize their documentation
|
|
14
|
+
- Built-in Mermaid diagram example in generated README
|
|
15
|
+
- Documentation structure recommendations and best practices
|
|
16
|
+
|
|
17
|
+
### Fixed
|
|
18
|
+
- **Eliminated ugly file listing** on index page when no README exists
|
|
19
|
+
- Improved first-time user experience with welcoming placeholder content
|
|
20
|
+
- Better guidance for documentation creation and organization
|
|
21
|
+
|
|
22
|
+
### Changed
|
|
23
|
+
- Simplified deployment logic - removed complex HTML file listing generation
|
|
24
|
+
- Build process now checks and creates README.md before scanning files
|
|
25
|
+
- Deploy process simplified since README.html will always exist
|
|
26
|
+
|
|
27
|
+
### Technical Improvements
|
|
28
|
+
- Added `createPlaceholderReadme()` function to core-builder.js
|
|
29
|
+
- Integrated README generation into main build workflow
|
|
30
|
+
- Enhanced build logging to show when placeholder is generated
|
|
31
|
+
- Exported new function for potential external usage
|
|
32
|
+
|
|
33
|
+
## [1.2.0] - 2025-07-19
|
|
34
|
+
|
|
35
|
+
### Added (MAJOR FEATURE RELEASE)
|
|
36
|
+
- **Complete feature parity** with original JUNO documentation system
|
|
37
|
+
- **Preview banner** with dismissible functionality and localStorage
|
|
38
|
+
- **Breadcrumb navigation** automatically generated from URL structure
|
|
39
|
+
- **Advanced sidebar** with filter/search functionality
|
|
40
|
+
- **Hierarchical navigation** with collapsible folders and proper icons
|
|
41
|
+
- **Rich tooltip system** with folder descriptions and hover information
|
|
42
|
+
- **Resize handle** for adjustable sidebar width
|
|
43
|
+
- **Icon mapping** for different content types and folders
|
|
44
|
+
- **Folder descriptions** for better UX and navigation
|
|
45
|
+
- **Logical folder ordering** (strategic content first, technical content later)
|
|
46
|
+
|
|
47
|
+
### Enhanced Navigation Features
|
|
48
|
+
- **Smart folder detection** and hierarchical structuring
|
|
49
|
+
- **Active section auto-expansion** for current page context
|
|
50
|
+
- **Collapsible navigation sections** with smooth animations
|
|
51
|
+
- **File type icons** (documents, folders, special content types)
|
|
52
|
+
- **Improved file naming** and title generation
|
|
53
|
+
- **README.md as folder overviews** with proper linking
|
|
54
|
+
- **Filter/search** through navigation items
|
|
55
|
+
|
|
56
|
+
### Layout Improvements
|
|
57
|
+
- **Complete layout restructure** matching original design
|
|
58
|
+
- **Fixed positioning** for banner, breadcrumbs, and sidebar
|
|
59
|
+
- **Responsive design** with mobile-friendly collapsible layout
|
|
60
|
+
- **Proper content area** with max-width and centered layout
|
|
61
|
+
- **Smooth transitions** and hover effects throughout
|
|
62
|
+
- **Dark mode support** for all new components
|
|
63
|
+
|
|
64
|
+
### Technical Enhancements
|
|
65
|
+
- **Rich HTML structure** with semantic navigation
|
|
66
|
+
- **CSS Grid and Flexbox** layout system
|
|
67
|
+
- **Modern CSS variables** and consistent spacing
|
|
68
|
+
- **Optimized mobile experience** with adaptive layouts
|
|
69
|
+
- **Performance optimized** animations and transitions
|
|
70
|
+
|
|
8
71
|
## [1.1.12] - 2025-07-19
|
|
9
72
|
|
|
10
73
|
### Fixed (MAJOR)
|
|
@@ -372,32 +372,194 @@ pre code {
|
|
|
372
372
|
font-size: var(--text-sm);
|
|
373
373
|
}
|
|
374
374
|
|
|
375
|
-
/*
|
|
376
|
-
.
|
|
375
|
+
/* Preview Banner */
|
|
376
|
+
.preview-banner {
|
|
377
|
+
background: var(--color-accent-yellow-bg);
|
|
378
|
+
border-bottom: 1px solid var(--color-accent-yellow);
|
|
379
|
+
color: var(--color-text-primary);
|
|
380
|
+
padding: var(--space-2) 0;
|
|
381
|
+
position: fixed;
|
|
382
|
+
top: var(--header-height);
|
|
383
|
+
left: 0;
|
|
384
|
+
right: 0;
|
|
385
|
+
z-index: 1000;
|
|
386
|
+
transition: transform var(--duration-normal);
|
|
387
|
+
}
|
|
388
|
+
|
|
389
|
+
.preview-banner.hidden {
|
|
390
|
+
transform: translateY(-100%);
|
|
391
|
+
}
|
|
392
|
+
|
|
393
|
+
.banner-content {
|
|
394
|
+
display: flex;
|
|
395
|
+
align-items: center;
|
|
396
|
+
justify-content: center;
|
|
397
|
+
gap: var(--space-2);
|
|
398
|
+
max-width: 1400px;
|
|
399
|
+
margin: 0 auto;
|
|
400
|
+
padding: 0 var(--space-4);
|
|
401
|
+
}
|
|
402
|
+
|
|
403
|
+
.banner-icon {
|
|
404
|
+
color: var(--color-accent-yellow);
|
|
405
|
+
font-size: var(--text-sm);
|
|
406
|
+
}
|
|
407
|
+
|
|
408
|
+
.banner-text {
|
|
409
|
+
font-size: var(--text-sm);
|
|
410
|
+
font-weight: var(--font-medium);
|
|
411
|
+
}
|
|
412
|
+
|
|
413
|
+
.banner-dismiss {
|
|
414
|
+
background: none;
|
|
415
|
+
border: none;
|
|
416
|
+
color: var(--color-text-secondary);
|
|
417
|
+
cursor: pointer;
|
|
418
|
+
padding: var(--space-1);
|
|
419
|
+
margin-left: auto;
|
|
420
|
+
border-radius: var(--radius-sm);
|
|
421
|
+
transition: all var(--duration-fast);
|
|
422
|
+
}
|
|
423
|
+
|
|
424
|
+
.banner-dismiss:hover {
|
|
425
|
+
background: var(--color-bg-hover);
|
|
426
|
+
color: var(--color-text-primary);
|
|
427
|
+
}
|
|
428
|
+
|
|
429
|
+
/* Breadcrumbs */
|
|
430
|
+
.breadcrumbs {
|
|
431
|
+
background: var(--color-bg-default);
|
|
432
|
+
border-bottom: 1px solid var(--color-border-default);
|
|
433
|
+
padding: var(--space-2) 0;
|
|
434
|
+
position: fixed;
|
|
435
|
+
top: calc(var(--header-height) + 3.5rem);
|
|
436
|
+
left: 0;
|
|
437
|
+
right: 0;
|
|
438
|
+
z-index: 900;
|
|
439
|
+
transition: top var(--duration-normal);
|
|
440
|
+
}
|
|
441
|
+
|
|
442
|
+
.breadcrumbs.banner-visible {
|
|
443
|
+
top: calc(var(--header-height) + 3.5rem);
|
|
444
|
+
}
|
|
445
|
+
|
|
446
|
+
.breadcrumbs:not(.banner-visible) {
|
|
447
|
+
top: var(--header-height);
|
|
448
|
+
}
|
|
449
|
+
|
|
450
|
+
.breadcrumb-item {
|
|
451
|
+
display: inline-flex;
|
|
452
|
+
align-items: center;
|
|
453
|
+
gap: var(--space-1);
|
|
454
|
+
color: var(--color-text-secondary);
|
|
455
|
+
text-decoration: none;
|
|
456
|
+
font-size: var(--text-sm);
|
|
457
|
+
padding: var(--space-1) var(--space-2);
|
|
458
|
+
border-radius: var(--radius-sm);
|
|
459
|
+
transition: all var(--duration-fast);
|
|
460
|
+
}
|
|
461
|
+
|
|
462
|
+
.breadcrumb-item:hover {
|
|
463
|
+
background: var(--color-bg-hover);
|
|
464
|
+
color: var(--color-text-primary);
|
|
465
|
+
}
|
|
466
|
+
|
|
467
|
+
.breadcrumb-item.current {
|
|
468
|
+
color: var(--color-text-primary);
|
|
469
|
+
font-weight: var(--font-medium);
|
|
470
|
+
}
|
|
471
|
+
|
|
472
|
+
.breadcrumb-separator {
|
|
473
|
+
color: var(--color-text-tertiary);
|
|
474
|
+
font-size: var(--text-xs);
|
|
475
|
+
margin: 0 var(--space-1);
|
|
476
|
+
}
|
|
477
|
+
|
|
478
|
+
/* Main Wrapper */
|
|
479
|
+
.main-wrapper {
|
|
377
480
|
display: flex;
|
|
378
|
-
height: calc(100vh - var(--header-height));
|
|
481
|
+
height: calc(100vh - var(--header-height) - var(--breadcrumb-height));
|
|
482
|
+
margin-top: calc(var(--header-height) + var(--breadcrumb-height));
|
|
379
483
|
overflow: hidden;
|
|
380
484
|
}
|
|
381
485
|
|
|
382
|
-
|
|
383
|
-
.
|
|
486
|
+
.main-wrapper.banner-visible {
|
|
487
|
+
height: calc(100vh - var(--header-height) - var(--breadcrumb-height) - 3.5rem);
|
|
488
|
+
margin-top: calc(var(--header-height) + var(--breadcrumb-height) + 3.5rem);
|
|
489
|
+
}
|
|
490
|
+
|
|
491
|
+
/* Sidebar */
|
|
492
|
+
.sidebar {
|
|
384
493
|
width: var(--sidebar-width);
|
|
385
494
|
background: var(--color-bg-secondary);
|
|
386
495
|
border-right: 1px solid var(--color-border-default);
|
|
496
|
+
display: flex;
|
|
497
|
+
flex-direction: column;
|
|
498
|
+
position: relative;
|
|
499
|
+
}
|
|
500
|
+
|
|
501
|
+
.sidebar-header {
|
|
502
|
+
padding: var(--space-3);
|
|
503
|
+
border-bottom: 1px solid var(--color-border-default);
|
|
504
|
+
}
|
|
505
|
+
|
|
506
|
+
.filter-box {
|
|
507
|
+
position: relative;
|
|
508
|
+
display: flex;
|
|
509
|
+
align-items: center;
|
|
510
|
+
}
|
|
511
|
+
|
|
512
|
+
.filter-input {
|
|
513
|
+
width: 100%;
|
|
514
|
+
padding: var(--space-2) var(--space-8) var(--space-2) var(--space-3);
|
|
515
|
+
border: 1px solid var(--color-border-default);
|
|
516
|
+
border-radius: var(--radius-md);
|
|
517
|
+
background: var(--color-bg-default);
|
|
518
|
+
color: var(--color-text-primary);
|
|
519
|
+
font-size: var(--text-sm);
|
|
520
|
+
transition: all var(--duration-fast);
|
|
521
|
+
}
|
|
522
|
+
|
|
523
|
+
.filter-input:focus {
|
|
524
|
+
outline: none;
|
|
525
|
+
border-color: var(--color-border-focus);
|
|
526
|
+
box-shadow: 0 0 0 2px var(--color-accent-blue-bg);
|
|
527
|
+
}
|
|
528
|
+
|
|
529
|
+
.filter-icon {
|
|
530
|
+
position: absolute;
|
|
531
|
+
right: var(--space-3);
|
|
532
|
+
color: var(--color-text-tertiary);
|
|
533
|
+
pointer-events: none;
|
|
534
|
+
}
|
|
535
|
+
|
|
536
|
+
/* Navigation */
|
|
537
|
+
.navigation {
|
|
538
|
+
flex: 1;
|
|
387
539
|
padding: var(--space-2);
|
|
388
540
|
overflow-y: auto;
|
|
389
541
|
overflow-x: visible;
|
|
390
|
-
position: fixed;
|
|
391
|
-
top: var(--header-height);
|
|
392
|
-
left: 0;
|
|
393
|
-
height: calc(100vh - var(--header-height));
|
|
394
|
-
z-index: 100;
|
|
395
542
|
|
|
396
543
|
/* Scrollbar styling */
|
|
397
544
|
scrollbar-width: thin;
|
|
398
545
|
scrollbar-color: var(--color-border-default) transparent;
|
|
399
546
|
}
|
|
400
547
|
|
|
548
|
+
.resize-handle {
|
|
549
|
+
width: 4px;
|
|
550
|
+
background: transparent;
|
|
551
|
+
cursor: col-resize;
|
|
552
|
+
position: absolute;
|
|
553
|
+
top: 0;
|
|
554
|
+
right: 0;
|
|
555
|
+
bottom: 0;
|
|
556
|
+
transition: background var(--duration-fast);
|
|
557
|
+
}
|
|
558
|
+
|
|
559
|
+
.resize-handle:hover {
|
|
560
|
+
background: var(--color-border-focus);
|
|
561
|
+
}
|
|
562
|
+
|
|
401
563
|
.navigation::-webkit-scrollbar {
|
|
402
564
|
width: 6px;
|
|
403
565
|
}
|
|
@@ -543,15 +705,14 @@ pre code {
|
|
|
543
705
|
|
|
544
706
|
.content {
|
|
545
707
|
flex: 1;
|
|
546
|
-
margin-left: var(--sidebar-width);
|
|
547
708
|
padding: var(--space-6) var(--space-8);
|
|
548
709
|
overflow-y: auto;
|
|
549
|
-
|
|
550
|
-
max-width: none;
|
|
710
|
+
background: var(--color-bg-default);
|
|
551
711
|
}
|
|
552
712
|
|
|
553
713
|
.content-inner {
|
|
554
714
|
max-width: 65rem;
|
|
715
|
+
margin: 0 auto;
|
|
555
716
|
}
|
|
556
717
|
|
|
557
718
|
/* Tables */
|
|
@@ -1474,70 +1635,124 @@ tr:hover {
|
|
|
1474
1635
|
display: none;
|
|
1475
1636
|
}
|
|
1476
1637
|
|
|
1477
|
-
.
|
|
1638
|
+
.main-wrapper {
|
|
1478
1639
|
flex-direction: column;
|
|
1640
|
+
height: auto;
|
|
1641
|
+
min-height: calc(100vh - var(--header-height) - var(--breadcrumb-height));
|
|
1479
1642
|
}
|
|
1480
1643
|
|
|
1481
|
-
.
|
|
1482
|
-
position: relative;
|
|
1644
|
+
.sidebar {
|
|
1483
1645
|
width: 100%;
|
|
1484
|
-
height:
|
|
1485
|
-
max-height: 200px;
|
|
1486
|
-
top: 0;
|
|
1487
|
-
left: 0;
|
|
1646
|
+
max-height: 250px;
|
|
1488
1647
|
border-right: none;
|
|
1489
1648
|
border-bottom: 1px solid var(--color-border-default);
|
|
1490
1649
|
}
|
|
1491
1650
|
|
|
1492
1651
|
.content {
|
|
1493
|
-
|
|
1494
|
-
|
|
1495
|
-
|
|
1652
|
+
padding: var(--space-4);
|
|
1653
|
+
}
|
|
1654
|
+
|
|
1655
|
+
.content-inner {
|
|
1656
|
+
max-width: none;
|
|
1657
|
+
}
|
|
1658
|
+
|
|
1659
|
+
.preview-banner {
|
|
1660
|
+
position: relative;
|
|
1661
|
+
top: 0;
|
|
1662
|
+
}
|
|
1663
|
+
|
|
1664
|
+
.breadcrumbs {
|
|
1665
|
+
position: relative;
|
|
1666
|
+
top: 0;
|
|
1496
1667
|
}
|
|
1497
1668
|
}
|
|
1498
1669
|
|
|
1499
|
-
/* Navigation
|
|
1500
|
-
.nav-
|
|
1501
|
-
margin-bottom: var(--space-
|
|
1670
|
+
/* Navigation Sections */
|
|
1671
|
+
.nav-section {
|
|
1672
|
+
margin-bottom: var(--space-1);
|
|
1502
1673
|
}
|
|
1503
1674
|
|
|
1504
|
-
.nav-
|
|
1505
|
-
display:
|
|
1506
|
-
|
|
1507
|
-
|
|
1675
|
+
.nav-title {
|
|
1676
|
+
display: flex;
|
|
1677
|
+
align-items: center;
|
|
1678
|
+
gap: var(--space-2);
|
|
1679
|
+
padding: var(--space-2);
|
|
1680
|
+
color: var(--color-text-primary);
|
|
1508
1681
|
text-decoration: none;
|
|
1509
|
-
border-radius: var(--border-radius-md);
|
|
1510
|
-
transition: all 0.2s ease;
|
|
1511
1682
|
font-size: var(--text-sm);
|
|
1512
|
-
font-weight:
|
|
1683
|
+
font-weight: var(--font-medium);
|
|
1684
|
+
border-radius: var(--radius-md);
|
|
1685
|
+
transition: all var(--duration-fast);
|
|
1686
|
+
cursor: pointer;
|
|
1513
1687
|
}
|
|
1514
1688
|
|
|
1515
|
-
.nav-
|
|
1689
|
+
.nav-title:hover {
|
|
1516
1690
|
background: var(--color-bg-hover);
|
|
1517
|
-
color: var(--color-text-primary);
|
|
1518
1691
|
}
|
|
1519
1692
|
|
|
1520
|
-
.nav-
|
|
1521
|
-
|
|
1522
|
-
background: var(--color-accent-blue-bg);
|
|
1523
|
-
color: var(--color-accent-blue);
|
|
1524
|
-
font-weight: 500;
|
|
1693
|
+
.nav-title.collapsible {
|
|
1694
|
+
position: relative;
|
|
1525
1695
|
}
|
|
1526
1696
|
|
|
1527
|
-
|
|
1528
|
-
|
|
1529
|
-
|
|
1697
|
+
.nav-title .collapse-icon {
|
|
1698
|
+
transition: transform var(--duration-fast);
|
|
1699
|
+
color: var(--color-text-tertiary);
|
|
1700
|
+
font-size: var(--text-xs);
|
|
1701
|
+
}
|
|
1702
|
+
|
|
1703
|
+
.nav-title.expanded .collapse-icon {
|
|
1704
|
+
transform: rotate(90deg);
|
|
1530
1705
|
}
|
|
1531
1706
|
|
|
1532
1707
|
.nav-content {
|
|
1533
|
-
padding-left: var(--space-
|
|
1708
|
+
padding-left: var(--space-4);
|
|
1709
|
+
overflow: hidden;
|
|
1710
|
+
transition: max-height var(--duration-normal), opacity var(--duration-normal);
|
|
1534
1711
|
}
|
|
1535
1712
|
|
|
1536
|
-
|
|
1537
|
-
|
|
1538
|
-
|
|
1713
|
+
.nav-content.collapsed {
|
|
1714
|
+
max-height: 0;
|
|
1715
|
+
opacity: 0;
|
|
1716
|
+
pointer-events: none;
|
|
1539
1717
|
}
|
|
1540
1718
|
|
|
1541
|
-
.
|
|
1542
|
-
|
|
1719
|
+
.nav-content:not(.collapsed) {
|
|
1720
|
+
max-height: 1000px;
|
|
1721
|
+
opacity: 1;
|
|
1722
|
+
}
|
|
1723
|
+
|
|
1724
|
+
/* Navigation Items */
|
|
1725
|
+
.nav-item {
|
|
1726
|
+
display: flex;
|
|
1727
|
+
align-items: center;
|
|
1728
|
+
gap: var(--space-2);
|
|
1729
|
+
padding: var(--space-1-5) var(--space-2);
|
|
1730
|
+
color: var(--color-text-secondary);
|
|
1731
|
+
text-decoration: none;
|
|
1732
|
+
font-size: var(--text-sm);
|
|
1733
|
+
border-radius: var(--radius-md);
|
|
1734
|
+
transition: all var(--duration-fast);
|
|
1735
|
+
margin-bottom: var(--space-0-5);
|
|
1736
|
+
}
|
|
1737
|
+
|
|
1738
|
+
.nav-item:hover {
|
|
1739
|
+
background: var(--color-bg-hover);
|
|
1740
|
+
color: var(--color-text-primary);
|
|
1741
|
+
}
|
|
1742
|
+
|
|
1743
|
+
.nav-item.active {
|
|
1744
|
+
background: var(--color-accent-blue-bg);
|
|
1745
|
+
color: var(--color-accent-blue);
|
|
1746
|
+
font-weight: var(--font-medium);
|
|
1747
|
+
}
|
|
1748
|
+
|
|
1749
|
+
.nav-item i {
|
|
1750
|
+
color: var(--color-text-tertiary);
|
|
1751
|
+
font-size: var(--text-xs);
|
|
1752
|
+
width: 12px;
|
|
1753
|
+
text-align: center;
|
|
1754
|
+
}
|
|
1755
|
+
|
|
1756
|
+
.nav-item.active i {
|
|
1757
|
+
color: var(--color-accent-blue);
|
|
1543
1758
|
}
|