@stacksjs/components 0.2.130 → 0.2.132

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.
@@ -467,18 +467,7 @@ defineExpose({ collapsed, toggle: toggleCollapse, syncRouteSelection })
467
467
  <div class="relative z-10 min-h-0 flex-1">
468
468
  <div data-sidebar-scroll class="{{ scrollAreaClasses }} h-full stx-sidebar-scroll">
469
469
  @if(sectionList.length > 0)
470
- <nav class="flex flex-col">
471
- @foreach(sectionList as section)
472
- <SidebarSection
473
- :id="section.id"
474
- :label="section.label"
475
- :items="section.items"
476
- :collapsible="section.collapsible"
477
- :collapsed="section.collapsed"
478
- :theme="theme"
479
- />
480
- @endforeach
481
- </nav>
470
+ <SidebarSections :sections="sectionList" :theme="theme" />
482
471
  @else
483
472
  <slot />
484
473
  @endif
@@ -1,4 +1,4 @@
1
- <script server>
1
+ <script server cache>
2
2
  import { resolveIconColor, resolveSidebarTheme } from './themes'
3
3
 
4
4
  export const id = $props.id || ''
@@ -1,4 +1,4 @@
1
- <script server>
1
+ <script server cache>
2
2
  import { resolveSidebarTheme } from './themes'
3
3
 
4
4
  export const id = $props.id || ''
package/dist/index.js CHANGED
@@ -1,11 +1,11 @@
1
1
  // @bun
2
- // ../../../../../../../tmp/stx-components-build-rWAWMP/stubs/stub-0.js
2
+ // ../../../../../../../tmp/stx-components-build-OwrhFC/stubs/stub-0.js
3
3
  var stub_0_default = { __stx: true, src: "./components/CodeBlock.stx" };
4
- // ../../../../../../../tmp/stx-components-build-rWAWMP/stubs/stub-1.js
4
+ // ../../../../../../../tmp/stx-components-build-OwrhFC/stubs/stub-1.js
5
5
  var stub_1_default = { __stx: true, src: "./components/Footer.stx" };
6
- // ../../../../../../../tmp/stx-components-build-rWAWMP/stubs/stub-2.js
6
+ // ../../../../../../../tmp/stx-components-build-OwrhFC/stubs/stub-2.js
7
7
  var stub_2_default = { __stx: true, src: "./components/Hero.stx" };
8
- // ../../../../../../../tmp/stx-components-build-rWAWMP/stubs/stub-3.js
8
+ // ../../../../../../../tmp/stx-components-build-OwrhFC/stubs/stub-3.js
9
9
  var stub_3_default = { __stx: true, src: "./components/Installation.stx" };
10
10
  // src/composables/useCopyCode.ts
11
11
  function useCopyCode(options) {
@@ -1132,17 +1132,17 @@ var RadioGroupOption_default = "./RadioGroupOption-s1d6r221.stx";
1132
1132
  // src/ui/select/Select.stx
1133
1133
  var Select_default = "./Select-1vnd0brz.stx";
1134
1134
  // src/ui/sidebar/Sidebar.stx
1135
- var Sidebar_default = "./Sidebar-vgckg8f7.stx";
1135
+ var Sidebar_default = "./Sidebar-56px4jha.stx";
1136
1136
  // src/ui/sidebar/SidebarFooter.stx
1137
1137
  var SidebarFooter_default = "./SidebarFooter-s7skj92y.stx";
1138
1138
  // src/ui/sidebar/SidebarHeader.stx
1139
1139
  var SidebarHeader_default = "./SidebarHeader-sa9mtdst.stx";
1140
1140
  // src/ui/sidebar/SidebarItem.stx
1141
- var SidebarItem_default = "./SidebarItem-9rvbwhxr.stx";
1141
+ var SidebarItem_default = "./SidebarItem-2a6n0be3.stx";
1142
1142
  // src/ui/sidebar/SidebarPinned.stx
1143
1143
  var SidebarPinned_default = "./SidebarPinned-tvj28bm0.stx";
1144
1144
  // src/ui/sidebar/SidebarSection.stx
1145
- var SidebarSection_default = "./SidebarSection-qf8fhy55.stx";
1145
+ var SidebarSection_default = "./SidebarSection-zd9z35ch.stx";
1146
1146
  // src/ui/sidebar/SidebarSpace.stx
1147
1147
  var SidebarSpace_default = "./SidebarSpace-61b662jx.stx";
1148
1148
  // src/ui/sidebar/SidebarSpaces.stx
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@stacksjs/components",
3
3
  "type": "module",
4
- "version": "0.2.130",
4
+ "version": "0.2.132",
5
5
  "description": "A modern component library built with STX, featuring headwind utility classes and TypeScript syntax highlighting.",
6
6
  "author": "Chris Breuer <chris@stacksjs.org>",
7
7
  "license": "MIT",
@@ -63,8 +63,8 @@
63
63
  },
64
64
  "dependencies": {
65
65
  "@cwcss/crosswind": "^0.2.12",
66
- "@stacksjs/stx": "0.2.130",
67
- "bun-plugin-stx": "0.2.130",
66
+ "@stacksjs/stx": "0.2.132",
67
+ "bun-plugin-stx": "0.2.132",
68
68
  "ts-syntax-highlighter": "^0.2.1"
69
69
  },
70
70
  "devDependencies": {
@@ -467,18 +467,7 @@ defineExpose({ collapsed, toggle: toggleCollapse, syncRouteSelection })
467
467
  <div class="relative z-10 min-h-0 flex-1">
468
468
  <div data-sidebar-scroll class="{{ scrollAreaClasses }} h-full stx-sidebar-scroll">
469
469
  @if(sectionList.length > 0)
470
- <nav class="flex flex-col">
471
- @foreach(sectionList as section)
472
- <SidebarSection
473
- :id="section.id"
474
- :label="section.label"
475
- :items="section.items"
476
- :collapsible="section.collapsible"
477
- :collapsed="section.collapsed"
478
- :theme="theme"
479
- />
480
- @endforeach
481
- </nav>
470
+ <SidebarSections :sections="sectionList" :theme="theme" />
482
471
  @else
483
472
  <slot />
484
473
  @endif
@@ -1,4 +1,4 @@
1
- <script server>
1
+ <script server cache>
2
2
  import { resolveIconColor, resolveSidebarTheme } from './themes'
3
3
 
4
4
  export const id = $props.id || ''
@@ -1,4 +1,4 @@
1
- <script server>
1
+ <script server cache>
2
2
  import { resolveSidebarTheme } from './themes'
3
3
 
4
4
  export const id = $props.id || ''
@@ -0,0 +1,17 @@
1
+ <script server cache>
2
+ export const sections = $props.sections || []
3
+ export const theme = $props.theme || 'macos'
4
+ </script>
5
+
6
+ <nav class="flex flex-col">
7
+ @foreach(sections as section)
8
+ <SidebarSection
9
+ :id="section.id"
10
+ :label="section.label"
11
+ :items="section.items"
12
+ :collapsible="section.collapsible"
13
+ :collapsed="section.collapsed"
14
+ :theme="theme"
15
+ />
16
+ @endforeach
17
+ </nav>