@xenterprises/nuxt-x-marketing 1.4.9 → 1.4.11
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/CHANGELOG.md
CHANGED
|
@@ -30,6 +30,18 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
30
30
|
section and its sample product data were dropped with them. Every other section of the
|
|
31
31
|
demo page is unchanged.
|
|
32
32
|
|
|
33
|
+
## [1.4.11] - 2026-09-06
|
|
34
|
+
|
|
35
|
+
### Changed
|
|
36
|
+
|
|
37
|
+
- `XMarkFAQ` accordion defaults `allowMultiple` to `true` so multiple items may stay open (marketing page standard).
|
|
38
|
+
|
|
39
|
+
## [1.4.10] - 2026-09-06
|
|
40
|
+
|
|
41
|
+
### Added
|
|
42
|
+
|
|
43
|
+
- `XMarkBreadcrumb` for Docs/Academy articles: default trail is Home > Docs|Academy > current page (last crumb unlinked). Pass `items` to override. Built on `UBreadcrumb`.
|
|
44
|
+
|
|
33
45
|
## [1.4.9] - 2026-09-06
|
|
34
46
|
|
|
35
47
|
### Fixed
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<nav class="x-mark-breadcrumb" aria-label="Breadcrumb">
|
|
3
|
+
<UBreadcrumb :items="resolvedItems" />
|
|
4
|
+
</nav>
|
|
5
|
+
</template>
|
|
6
|
+
|
|
7
|
+
<script setup>
|
|
8
|
+
/**
|
|
9
|
+
* XMarkBreadcrumb — Docs/Academy article breadcrumbs (marketing page standard).
|
|
10
|
+
* Prefer section + current for the default Home > Docs|Academy > page trail.
|
|
11
|
+
* Pass items to fully override. Last item is the current page (no link).
|
|
12
|
+
*/
|
|
13
|
+
const props = defineProps({
|
|
14
|
+
/** Full trail [{ label, to? }]. When set, overrides section/current builders. */
|
|
15
|
+
items: {
|
|
16
|
+
type: Array,
|
|
17
|
+
default: null,
|
|
18
|
+
},
|
|
19
|
+
/** Section root: docs or academy (builds Home > Section > current). */
|
|
20
|
+
section: {
|
|
21
|
+
type: String,
|
|
22
|
+
default: "docs",
|
|
23
|
+
validator: (v) => ["docs", "academy"].includes(v),
|
|
24
|
+
},
|
|
25
|
+
/** Current page label (required for the default trail when items is null). */
|
|
26
|
+
current: {
|
|
27
|
+
type: String,
|
|
28
|
+
default: "",
|
|
29
|
+
},
|
|
30
|
+
/** Home crumb label */
|
|
31
|
+
homeLabel: {
|
|
32
|
+
type: String,
|
|
33
|
+
default: "Home",
|
|
34
|
+
},
|
|
35
|
+
/** Home crumb path */
|
|
36
|
+
homeTo: {
|
|
37
|
+
type: String,
|
|
38
|
+
default: "/",
|
|
39
|
+
},
|
|
40
|
+
/** Override section crumb label */
|
|
41
|
+
sectionLabel: {
|
|
42
|
+
type: String,
|
|
43
|
+
default: "",
|
|
44
|
+
},
|
|
45
|
+
/** Override section crumb path */
|
|
46
|
+
sectionTo: {
|
|
47
|
+
type: String,
|
|
48
|
+
default: "",
|
|
49
|
+
},
|
|
50
|
+
});
|
|
51
|
+
|
|
52
|
+
const sectionDefaults = {
|
|
53
|
+
docs: { label: "Docs", to: "/docs" },
|
|
54
|
+
academy: { label: "Academy", to: "/academy" },
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
const resolvedItems = computed(() => {
|
|
58
|
+
if (Array.isArray(props.items) && props.items.length) {
|
|
59
|
+
return props.items.map((item, index, arr) => {
|
|
60
|
+
const isLast = index === arr.length - 1;
|
|
61
|
+
return {
|
|
62
|
+
label: item.label,
|
|
63
|
+
...(isLast || !item.to ? {} : { to: item.to }),
|
|
64
|
+
};
|
|
65
|
+
});
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
const section = sectionDefaults[props.section] || sectionDefaults.docs;
|
|
69
|
+
const sectionLabel = props.sectionLabel || section.label;
|
|
70
|
+
const sectionTo = props.sectionTo || section.to;
|
|
71
|
+
const current = props.current || "Article";
|
|
72
|
+
|
|
73
|
+
return [
|
|
74
|
+
{ label: props.homeLabel, to: props.homeTo },
|
|
75
|
+
{ label: sectionLabel, to: sectionTo },
|
|
76
|
+
{ label: current },
|
|
77
|
+
];
|
|
78
|
+
});
|
|
79
|
+
</script>
|