@invisibleloop/pulse 0.20.49 → 0.20.51

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@invisibleloop/pulse",
3
- "version": "0.20.49",
3
+ "version": "0.20.51",
4
4
  "type": "module",
5
5
  "description": "AI-first frontend framework. The spec is the source of truth.",
6
6
  "license": "MIT",
@@ -1 +1 @@
1
- 0.20.49
1
+ 0.20.51
@@ -644,13 +644,13 @@ function renderHTML({ title, content, slugs, activeSlug, activeTab, hasBoth }) {
644
644
 
645
645
  const tabs = activeSlug && hasBoth ? `
646
646
  <div class="tabs">
647
- <a href="/${activeSlug}" class="tab${activeTab === 'perf' ? ' active' : ''}">Performance</a>
648
- <a href="/${activeSlug}/load" class="tab${activeTab === 'load' ? ' active' : ''}">Load Tests</a>
647
+ <a href="/${esc(activeSlug)}" class="tab${activeTab === 'perf' ? ' active' : ''}">Performance</a>
648
+ <a href="/${esc(activeSlug)}/load" class="tab${activeTab === 'load' ? ' active' : ''}">Load Tests</a>
649
649
  </div>` : activeSlug ? `
650
650
  <div class="tabs">
651
651
  ${hasBoth === false && activeTab === 'perf'
652
- ? `<a href="/${activeSlug}" class="tab active">Performance</a><a href="/${activeSlug}/load" class="tab" style="opacity:.4">Load Tests</a>`
653
- : `<a href="/${activeSlug}" class="tab" style="opacity:.4">Performance</a><a href="/${activeSlug}/load" class="tab active">Load Tests</a>`
652
+ ? `<a href="/${esc(activeSlug)}" class="tab active">Performance</a><a href="/${esc(activeSlug)}/load" class="tab" style="opacity:.4">Load Tests</a>`
653
+ : `<a href="/${esc(activeSlug)}" class="tab" style="opacity:.4">Performance</a><a href="/${esc(activeSlug)}/load" class="tab active">Load Tests</a>`
654
654
  }
655
655
  </div>` : ''
656
656
 
@@ -693,7 +693,7 @@ http.createServer((req, res) => {
693
693
  const tab = parts[1] || 'perf' // 'perf' | 'load'
694
694
  const slugs = allSlugs()
695
695
 
696
- let title, content, activeTab = tab, hasBoth = false
696
+ let title, content, activeTab = tab === 'load' ? 'load' : 'perf', hasBoth = false
697
697
 
698
698
  if (!slug) {
699
699
  title = 'Overview'