@codecavepro/brand 2.5.1 → 2.5.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.
@@ -3,46 +3,21 @@ import { computed } from 'vue';
3
3
  import { type MenuItem } from '../lib/menus/menuTypes';
4
4
 
5
5
  interface Props {
6
- /** The MAIN item name this page sits under. */
7
- section?: string;
8
- /** The SUB item name to mark current, if any. */
9
- current?: string;
10
- /** '../' repeated once per directory level below the docs root. */
11
- up: string;
12
- items: Record<string, MenuItem[]>;
13
-
6
+ items: MenuItem[];
14
7
  }
15
-
16
8
  const props = defineProps<Props>();
17
-
18
- const subNavBarItems = computed<MenuItem[]>(() => {
19
- return (props.section && props.items[props.section]) || [];
20
- });
21
-
22
- /* An unknown `current` is a typo that would otherwise render a bar with
23
- nothing marked, which looks exactly like a page that is legitimately not
24
- in the bar, so fail early instead. */
25
- if (
26
- props.current &&
27
- !subNavBarItems.value.some((item) => item.name === props.current)
28
- ) {
29
- throw new Error(
30
- `SubNav: no item named "${props.current}" in SUB["${props.section}"].\n` +
31
- `Available: ${subNavBarItems.value.map((item) => item.name).join(', ') || '(none)'}`
32
- );
33
- }
34
9
  </script>
35
10
 
36
11
  <template>
37
12
  <nav
38
- v-if="subNavBarItems.length > 0"
13
+ v-if="items.length > 0"
39
14
  class="ds-subnav"
40
15
  aria-label="Section"
41
16
  >
42
17
  <div class="page-container ds-subnav-inner">
43
18
  <ul>
44
19
  <li
45
- v-for="item in subNavBarItems"
20
+ v-for="item in items"
46
21
  :key="item.name"
47
22
  >
48
23
  <a
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@codecavepro/brand",
3
- "version": "2.5.1",
3
+ "version": "2.5.2",
4
4
  "description": "CODECAVE design system — colour, typography and layout tokens as CSS custom properties and as a typed module.",
5
5
  "license": "Unlicense",
6
6
  "type": "module",