picocrank 1.21.1 → 1.21.2

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": "picocrank",
3
- "version": "1.21.1",
3
+ "version": "1.21.2",
4
4
  "description": "A set of zero dependency Vue components built on the Femtocrank global CSS theme.",
5
5
  "main": "vite.config.js",
6
6
  "scripts": {
@@ -140,28 +140,35 @@ function toggleSection(sectionId) {
140
140
 
141
141
  const navigationGroups = computed(() => {
142
142
  const ungrouped = []
143
+ const trailingUngrouped = []
143
144
  const sections = []
144
145
  let currentSection = null
146
+ let afterSeparator = false
145
147
 
146
148
  for (const link of navigationLinks.value) {
147
149
  if (link.type === 'section') {
148
150
  currentSection = { id: link.name, title: link.title, items: [] }
149
151
  sections.push(currentSection)
152
+ afterSeparator = false
150
153
  continue
151
154
  }
152
155
 
153
156
  if (link.type === 'separator') {
157
+ currentSection = null
158
+ afterSeparator = true
154
159
  continue
155
160
  }
156
161
 
157
162
  if (currentSection) {
158
163
  currentSection.items.push(link)
164
+ } else if (afterSeparator) {
165
+ trailingUngrouped.push(link)
159
166
  } else {
160
167
  ungrouped.push(link)
161
168
  }
162
169
  }
163
170
 
164
- return { ungrouped, sections }
171
+ return { ungrouped, trailingUngrouped, sections }
165
172
  })
166
173
 
167
174
  const visibleNavItems = computed(() => {
@@ -191,6 +198,10 @@ const visibleNavItems = computed(() => {
191
198
  }
192
199
  }
193
200
 
201
+ for (const link of navigationGroups.value.trailingUngrouped) {
202
+ items.push({ key: link.name, kind: 'link', link })
203
+ }
204
+
194
205
  return items
195
206
  })
196
207