@knowcode/doc-builder 1.9.13 → 1.9.14

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.
@@ -459,6 +459,43 @@ pre code {
459
459
  color: var(--color-text-primary);
460
460
  }
461
461
 
462
+ /* Banner types */
463
+ .banner-warning {
464
+ background: var(--color-accent-yellow-bg);
465
+ border-bottom: 1px solid var(--color-accent-yellow);
466
+ }
467
+
468
+ .banner-warning .banner-icon {
469
+ color: var(--color-accent-yellow);
470
+ }
471
+
472
+ .banner-info {
473
+ background: var(--color-accent-blue-bg);
474
+ border-bottom: 1px solid var(--color-accent-blue);
475
+ }
476
+
477
+ .banner-info .banner-icon {
478
+ color: var(--color-accent-blue);
479
+ }
480
+
481
+ .banner-success {
482
+ background: var(--color-accent-green-bg);
483
+ border-bottom: 1px solid var(--color-accent-green);
484
+ }
485
+
486
+ .banner-success .banner-icon {
487
+ color: var(--color-accent-green);
488
+ }
489
+
490
+ .banner-error {
491
+ background: var(--color-accent-red-bg);
492
+ border-bottom: 1px solid var(--color-accent-red);
493
+ }
494
+
495
+ .banner-error .banner-icon {
496
+ color: var(--color-accent-red);
497
+ }
498
+
462
499
  /* Breadcrumbs - definition moved to line 888 to avoid duplication */
463
500
 
464
501
  .breadcrumb-item {
package/lib/config.js CHANGED
@@ -39,7 +39,8 @@ const defaultConfig = {
39
39
  attachments: true, // Copy attachments (Excel, PDF, etc.) to output
40
40
  dynamicNavIcons: true, // Use status-based icons in navigation
41
41
  subtleColors: true, // Apply subtle colors to status icons
42
- privateDirectoryAuth: false // Enable auth for private directories only (auto-detected)
42
+ privateDirectoryAuth: false, // Enable auth for private directories only (auto-detected)
43
+ banner: false // Show preview banner at top of pages
43
44
  },
44
45
 
45
46
  // Authentication - Supabase only (basic auth removed for security)
@@ -54,6 +55,15 @@ const defaultConfig = {
54
55
  enabled: true
55
56
  },
56
57
 
58
+ // Banner configuration
59
+ banner: {
60
+ enabled: false,
61
+ text: 'This documentation is a preview version - some content may be incomplete',
62
+ icon: 'fas fa-exclamation-triangle',
63
+ type: 'warning', // warning, info, success, error
64
+ dismissible: true
65
+ },
66
+
57
67
  // Navigation configuration
58
68
  folderOrder: [],
59
69
  folderDescriptions: {},
@@ -127,7 +137,8 @@ const notionInspiredPreset = {
127
137
  normalizeTitle: true,
128
138
  showPdfDownload: true,
129
139
  menuDefaultOpen: true,
130
- attachments: true
140
+ attachments: true,
141
+ banner: false // Show preview banner at top of pages
131
142
  },
132
143
 
133
144
  auth: {
@@ -140,6 +151,15 @@ const notionInspiredPreset = {
140
151
  enabled: true
141
152
  },
142
153
 
154
+ // Banner configuration
155
+ banner: {
156
+ enabled: false,
157
+ text: 'This documentation is a preview version - some content may be incomplete',
158
+ icon: 'fas fa-exclamation-triangle',
159
+ type: 'warning',
160
+ dismissible: true
161
+ },
162
+
143
163
  // Folder descriptions from existing code
144
164
  folderDescriptions: {
145
165
  'product-roadmap': 'Strategic vision, timeline, and feature planning',
@@ -296,6 +316,9 @@ function migrateConfig(userConfig, targetVersion) {
296
316
  if (!userConfig.features?.phosphorSize) {
297
317
  newFeatures.push('Phosphor icon sizing');
298
318
  }
319
+ if (userConfig.features?.banner === undefined) {
320
+ newFeatures.push('Configurable preview banner');
321
+ }
299
322
 
300
323
  if (newFeatures.length > 0) {
301
324
  console.log(chalk.green(`✨ Added new features: ${newFeatures.join(', ')}`));
@@ -548,16 +548,20 @@ ${seoTags}
548
548
  </div>
549
549
  </header>
550
550
 
551
+ ${config.banner?.enabled || config.features?.banner ? `
551
552
  <!-- Preview Banner -->
552
- <div id="preview-banner" class="preview-banner">
553
+ <div id="preview-banner" class="preview-banner banner-${config.banner?.type || 'warning'}">
553
554
  <div class="banner-content">
554
- <i class="fas fa-exclamation-triangle banner-icon"></i>
555
- <span class="banner-text">This documentation is a preview version - some content may be incomplete</span>
555
+ <i class="${config.banner?.icon || 'fas fa-exclamation-triangle'} banner-icon"></i>
556
+ <span class="banner-text">${config.banner?.text || 'This documentation is a preview version - some content may be incomplete'}</span>
557
+ ${config.banner?.dismissible !== false ? `
556
558
  <button id="dismiss-banner" class="banner-dismiss" aria-label="Dismiss banner">
557
559
  <i class="fas fa-times"></i>
558
560
  </button>
561
+ ` : ''}
559
562
  </div>
560
563
  </div>
564
+ ` : ''}
561
565
 
562
566
  <!-- Breadcrumbs -->
563
567
  <nav class="breadcrumbs" id="breadcrumbs">
@@ -570,7 +574,7 @@ ${seoTags}
570
574
  <aside class="sidebar">
571
575
  <div class="sidebar-header">
572
576
  <div class="filter-box">
573
- <input type="text" placeholder="Filter items..." class="filter-input" id="nav-filter">
577
+ <input type="text" placeholder="Search menu..." class="filter-input" id="nav-filter">
574
578
  <i class="fas fa-search filter-icon"></i>
575
579
  </div>
576
580
  </div>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@knowcode/doc-builder",
3
- "version": "1.9.13",
3
+ "version": "1.9.14",
4
4
  "description": "Reusable documentation builder for markdown-based sites with Vercel deployment support",
5
5
  "main": "index.js",
6
6
  "bin": {