@duskmoon-dev/el-breadcrumbs 1.5.6 → 1.6.0
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/dist/cjs/index.js +50 -2
- package/dist/cjs/index.js.map +3 -3
- package/dist/cjs/register.js +50 -2
- package/dist/cjs/register.js.map +3 -3
- package/dist/esm/index.js +50 -2
- package/dist/esm/index.js.map +3 -3
- package/dist/esm/register.js +50 -2
- package/dist/esm/register.js.map +3 -3
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/types/el-dm-breadcrumbs.d.ts +6 -0
- package/dist/types/el-dm-breadcrumbs.d.ts.map +1 -1
- package/package.json +4 -4
package/dist/cjs/index.js
CHANGED
|
@@ -103,6 +103,18 @@ var styles = import_el_base.css`
|
|
|
103
103
|
::slotted([slot='separator']) {
|
|
104
104
|
display: none;
|
|
105
105
|
}
|
|
106
|
+
|
|
107
|
+
::slotted([slot='item']) {
|
|
108
|
+
display: inline-flex;
|
|
109
|
+
align-items: center;
|
|
110
|
+
color: var(--color-primary);
|
|
111
|
+
font-size: 0.875rem;
|
|
112
|
+
line-height: 1.25rem;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
::slotted([slot='item'][aria-current='page']) {
|
|
116
|
+
color: var(--color-on-surface);
|
|
117
|
+
}
|
|
106
118
|
`;
|
|
107
119
|
|
|
108
120
|
class ElDmBreadcrumbs extends import_el_base.BaseElement {
|
|
@@ -110,6 +122,7 @@ class ElDmBreadcrumbs extends import_el_base.BaseElement {
|
|
|
110
122
|
items: { type: Array, reflect: false },
|
|
111
123
|
separator: { type: String, reflect: true, default: "/" }
|
|
112
124
|
};
|
|
125
|
+
_itemsObserver;
|
|
113
126
|
constructor() {
|
|
114
127
|
super();
|
|
115
128
|
this.attachStyles(styles);
|
|
@@ -137,7 +150,37 @@ class ElDmBreadcrumbs extends import_el_base.BaseElement {
|
|
|
137
150
|
div.textContent = text;
|
|
138
151
|
return div.innerHTML;
|
|
139
152
|
}
|
|
153
|
+
_hasDeclarativeItems() {
|
|
154
|
+
return this.querySelector('[slot="item"]') !== null;
|
|
155
|
+
}
|
|
156
|
+
_syncDeclarativeItems = () => {
|
|
157
|
+
const slot = this.shadowRoot?.querySelector('slot[name="item"]');
|
|
158
|
+
const items = slot?.assignedElements() ?? [];
|
|
159
|
+
items.forEach((item, index) => {
|
|
160
|
+
item.setAttribute("role", "listitem");
|
|
161
|
+
if (index === items.length - 1) {
|
|
162
|
+
item.setAttribute("aria-current", "page");
|
|
163
|
+
} else {
|
|
164
|
+
item.removeAttribute("aria-current");
|
|
165
|
+
}
|
|
166
|
+
});
|
|
167
|
+
};
|
|
168
|
+
connectedCallback() {
|
|
169
|
+
super.connectedCallback();
|
|
170
|
+
this._itemsObserver = new MutationObserver(() => this.update());
|
|
171
|
+
this._itemsObserver.observe(this, {
|
|
172
|
+
childList: true,
|
|
173
|
+
subtree: true,
|
|
174
|
+
attributes: true,
|
|
175
|
+
attributeFilter: ["slot"]
|
|
176
|
+
});
|
|
177
|
+
}
|
|
178
|
+
disconnectedCallback() {
|
|
179
|
+
this._itemsObserver?.disconnect();
|
|
180
|
+
super.disconnectedCallback();
|
|
181
|
+
}
|
|
140
182
|
render() {
|
|
183
|
+
const declarativeItems = this._hasDeclarativeItems();
|
|
141
184
|
const itemsArray = Array.isArray(this.items) ? this.items : [];
|
|
142
185
|
const separatorHtml = this._getSeparatorHtml();
|
|
143
186
|
const itemsHtml = itemsArray.map((item, index) => {
|
|
@@ -169,7 +212,7 @@ class ElDmBreadcrumbs extends import_el_base.BaseElement {
|
|
|
169
212
|
return `
|
|
170
213
|
<nav class="breadcrumbs-nav" part="nav" aria-label="Breadcrumb">
|
|
171
214
|
<ol class="breadcrumbs" part="list">
|
|
172
|
-
${itemsHtml}
|
|
215
|
+
${declarativeItems ? '<slot name="item"></slot>' : itemsHtml}
|
|
173
216
|
</ol>
|
|
174
217
|
<slot name="separator"></slot>
|
|
175
218
|
</nav>
|
|
@@ -177,6 +220,11 @@ class ElDmBreadcrumbs extends import_el_base.BaseElement {
|
|
|
177
220
|
}
|
|
178
221
|
update() {
|
|
179
222
|
super.update();
|
|
223
|
+
const itemSlot = this.shadowRoot?.querySelector('slot[name="item"]');
|
|
224
|
+
itemSlot?.addEventListener("slotchange", this._syncDeclarativeItems);
|
|
225
|
+
this._syncDeclarativeItems();
|
|
226
|
+
if (this._hasDeclarativeItems())
|
|
227
|
+
return;
|
|
180
228
|
const links = this.shadowRoot?.querySelectorAll(".breadcrumb-link");
|
|
181
229
|
links?.forEach((link) => {
|
|
182
230
|
const index = parseInt(link.getAttribute("data-index") || "0", 10);
|
|
@@ -195,5 +243,5 @@ function register() {
|
|
|
195
243
|
}
|
|
196
244
|
}
|
|
197
245
|
|
|
198
|
-
//# debugId=
|
|
246
|
+
//# debugId=67471EFB8396766264756E2164756E21
|
|
199
247
|
//# sourceMappingURL=index.js.map
|
package/dist/cjs/index.js.map
CHANGED
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/el-dm-breadcrumbs.ts", "../../src/index.ts"],
|
|
4
4
|
"sourcesContent": [
|
|
5
|
-
"/**\n * DuskMoon Breadcrumbs Element\n *\n * A hierarchical navigation breadcrumbs component for displaying the user's\n * current location within a site structure.\n *\n * @element el-dm-breadcrumbs\n *\n * @attr {string} items - JSON array of breadcrumb items [{label, href}]\n * @attr {string} separator - Separator character between items (default '/')\n *\n * @slot separator - Custom separator element to use between items\n *\n * @csspart nav - The navigation container\n * @csspart list - The ordered list element\n * @csspart item - Individual breadcrumb item container\n * @csspart link - Breadcrumb link element\n * @csspart current - Current page text (last item)\n * @csspart separator - Separator element between items\n *\n * @fires navigate - Fired when a breadcrumb link is clicked. Detail: { item, index }\n */\n\nimport { BaseElement, css } from '@duskmoon-dev/el-base';\nimport { css as navigationCSS } from '@duskmoon-dev/core/components/navigation';\n\n/**\n * Represents a single breadcrumb item\n */\nexport interface BreadcrumbItem {\n /** Display label for the breadcrumb */\n label: string;\n /** URL for the breadcrumb link (optional for last item) */\n href?: string;\n}\n\n/**\n * Event detail for the navigate event\n */\nexport interface NavigateEventDetail {\n /** The breadcrumb item that was clicked */\n item: BreadcrumbItem;\n /** The index of the clicked item */\n index: number;\n}\n\n// Strip @layer wrapper for Shadow DOM compatibility\nconst coreStyles = navigationCSS.replace(/@layer\\s+components\\s*\\{/, '').replace(/\\}\\s*$/, '');\n\nconst styles = css`\n :host {\n display: block;\n }\n\n :host([hidden]) {\n display: none !important;\n }\n\n /* Import core navigation styles */\n ${coreStyles}\n\n .breadcrumbs-nav {\n font-family: inherit;\n }\n\n /* Override core .breadcrumbs padding since we manage our own layout */\n .breadcrumbs {\n padding: 0;\n }\n\n /* Override core .breadcrumb-link with our custom colors */\n .breadcrumb-link {\n color: var(--color-primary);\n }\n\n .breadcrumb-link:hover {\n color: var(--color-primary-dark, var(--color-primary));\n }\n\n .breadcrumb-link:focus {\n outline: 2px solid var(--color-primary);\n outline-offset: 2px;\n border-radius: 2px;\n }\n\n .breadcrumb-item-active {\n color: var(--color-on-surface);\n font-size: 0.875rem;\n line-height: 1.25rem;\n }\n\n /* Hide core's separator ::before — we render separator text explicitly */\n .breadcrumb-separator::before {\n display: none;\n }\n\n .breadcrumb-separator {\n opacity: 1;\n }\n\n /* Hide slotted separator template */\n ::slotted([slot='separator']) {\n display: none;\n }\n`;\n\nexport class ElDmBreadcrumbs extends BaseElement {\n static properties = {\n items: { type: Array, reflect: false },\n separator: { type: String, reflect: true, default: '/' },\n };\n\n /** Array of breadcrumb items */\n declare items: BreadcrumbItem[];\n\n /** Separator character between items */\n declare separator: string;\n\n constructor() {\n super();\n this.attachStyles(styles);\n this.items = [];\n }\n\n /**\n * Handle click on a breadcrumb link\n */\n private _handleClick(event: Event, item: BreadcrumbItem, index: number): void {\n event.preventDefault();\n\n // emit returns true if event was not cancelled\n const notCancelled = this.emit<NavigateEventDetail>('navigate', {\n item,\n index,\n });\n\n // If event was not prevented, navigate to the href\n if (notCancelled && item.href) {\n window.location.href = item.href;\n }\n }\n\n /**\n * Get the separator HTML - either from slot or default\n */\n private _getSeparatorHtml(): string {\n const slottedSeparator = this.querySelector('[slot=\"separator\"]');\n if (slottedSeparator) {\n return slottedSeparator.outerHTML.replace('slot=\"separator\"', '');\n }\n return this.separator || '/';\n }\n\n /**\n * Escape HTML special characters to prevent XSS\n */\n private _escapeHtml(text: string): string {\n const div = document.createElement('div');\n div.textContent = text;\n return div.innerHTML;\n }\n\n render(): string {\n const itemsArray = Array.isArray(this.items) ? this.items : [];\n const separatorHtml = this._getSeparatorHtml();\n\n const itemsHtml = itemsArray\n .map((item, index) => {\n const isLast = index === itemsArray.length - 1;\n const escapedLabel = this._escapeHtml(item.label);\n\n if (isLast) {\n // Last item is current page - not clickable\n return `\n <li class=\"breadcrumb-item\" part=\"item\">\n <span\n class=\"breadcrumb-item-active\"\n part=\"current\"\n aria-current=\"page\"\n >${escapedLabel}</span>\n </li>\n `;\n }\n\n // Regular breadcrumb link\n return `\n <li class=\"breadcrumb-item\" part=\"item\">\n <a\n class=\"breadcrumb-link\"\n part=\"link\"\n href=\"${item.href || '#'}\"\n data-index=\"${index}\"\n >${escapedLabel}</a>\n <span class=\"breadcrumb-separator\" part=\"separator\" aria-hidden=\"true\">${separatorHtml}</span>\n </li>\n `;\n })\n .join('');\n\n return `\n <nav class=\"breadcrumbs-nav\" part=\"nav\" aria-label=\"Breadcrumb\">\n <ol class=\"breadcrumbs\" part=\"list\">\n ${itemsHtml}\n </ol>\n <slot name=\"separator\"></slot>\n </nav>\n `;\n }\n\n update(): void {\n super.update();\n\n // Attach click handlers to all breadcrumb links\n const links = this.shadowRoot?.querySelectorAll('.breadcrumb-link');\n links?.forEach((link) => {\n const index = parseInt(link.getAttribute('data-index') || '0', 10);\n const item = this.items[index];\n if (item) {\n link.addEventListener('click', (e) => this._handleClick(e, item, index));\n }\n });\n }\n}\n",
|
|
5
|
+
"/**\n * DuskMoon Breadcrumbs Element\n *\n * A hierarchical navigation breadcrumbs component for displaying the user's\n * current location within a site structure.\n *\n * @element el-dm-breadcrumbs\n *\n * @attr {string} items - JSON array of breadcrumb items [{label, href}]\n * @attr {string} separator - Separator character between items (default '/')\n *\n * @slot item - Declarative server-rendered breadcrumb item\n * @slot separator - Custom separator element to use between items\n *\n * @csspart nav - The navigation container\n * @csspart list - The ordered list element\n * @csspart item - Individual breadcrumb item container\n * @csspart link - Breadcrumb link element\n * @csspart current - Current page text (last item)\n * @csspart separator - Separator element between items\n *\n * @fires navigate - Fired when a breadcrumb link is clicked. Detail: { item, index }\n */\n\nimport { BaseElement, css } from '@duskmoon-dev/el-base';\nimport { css as navigationCSS } from '@duskmoon-dev/core/components/navigation';\n\n/**\n * Represents a single breadcrumb item\n */\nexport interface BreadcrumbItem {\n /** Display label for the breadcrumb */\n label: string;\n /** URL for the breadcrumb link (optional for last item) */\n href?: string;\n}\n\n/**\n * Event detail for the navigate event\n */\nexport interface NavigateEventDetail {\n /** The breadcrumb item that was clicked */\n item: BreadcrumbItem;\n /** The index of the clicked item */\n index: number;\n}\n\n// Strip @layer wrapper for Shadow DOM compatibility\nconst coreStyles = navigationCSS.replace(/@layer\\s+components\\s*\\{/, '').replace(/\\}\\s*$/, '');\n\nconst styles = css`\n :host {\n display: block;\n }\n\n :host([hidden]) {\n display: none !important;\n }\n\n /* Import core navigation styles */\n ${coreStyles}\n\n .breadcrumbs-nav {\n font-family: inherit;\n }\n\n /* Override core .breadcrumbs padding since we manage our own layout */\n .breadcrumbs {\n padding: 0;\n }\n\n /* Override core .breadcrumb-link with our custom colors */\n .breadcrumb-link {\n color: var(--color-primary);\n }\n\n .breadcrumb-link:hover {\n color: var(--color-primary-dark, var(--color-primary));\n }\n\n .breadcrumb-link:focus {\n outline: 2px solid var(--color-primary);\n outline-offset: 2px;\n border-radius: 2px;\n }\n\n .breadcrumb-item-active {\n color: var(--color-on-surface);\n font-size: 0.875rem;\n line-height: 1.25rem;\n }\n\n /* Hide core's separator ::before — we render separator text explicitly */\n .breadcrumb-separator::before {\n display: none;\n }\n\n .breadcrumb-separator {\n opacity: 1;\n }\n\n /* Hide slotted separator template */\n ::slotted([slot='separator']) {\n display: none;\n }\n\n ::slotted([slot='item']) {\n display: inline-flex;\n align-items: center;\n color: var(--color-primary);\n font-size: 0.875rem;\n line-height: 1.25rem;\n }\n\n ::slotted([slot='item'][aria-current='page']) {\n color: var(--color-on-surface);\n }\n`;\n\nexport class ElDmBreadcrumbs extends BaseElement {\n static properties = {\n items: { type: Array, reflect: false },\n separator: { type: String, reflect: true, default: '/' },\n };\n\n /** Array of breadcrumb items */\n declare items: BreadcrumbItem[];\n\n /** Separator character between items */\n declare separator: string;\n\n private _itemsObserver?: MutationObserver;\n\n constructor() {\n super();\n this.attachStyles(styles);\n this.items = [];\n }\n\n /**\n * Handle click on a breadcrumb link\n */\n private _handleClick(event: Event, item: BreadcrumbItem, index: number): void {\n event.preventDefault();\n\n // emit returns true if event was not cancelled\n const notCancelled = this.emit<NavigateEventDetail>('navigate', {\n item,\n index,\n });\n\n // If event was not prevented, navigate to the href\n if (notCancelled && item.href) {\n window.location.href = item.href;\n }\n }\n\n /**\n * Get the separator HTML - either from slot or default\n */\n private _getSeparatorHtml(): string {\n const slottedSeparator = this.querySelector('[slot=\"separator\"]');\n if (slottedSeparator) {\n return slottedSeparator.outerHTML.replace('slot=\"separator\"', '');\n }\n return this.separator || '/';\n }\n\n /**\n * Escape HTML special characters to prevent XSS\n */\n private _escapeHtml(text: string): string {\n const div = document.createElement('div');\n div.textContent = text;\n return div.innerHTML;\n }\n\n private _hasDeclarativeItems(): boolean {\n return this.querySelector('[slot=\"item\"]') !== null;\n }\n\n private _syncDeclarativeItems = (): void => {\n const slot = this.shadowRoot?.querySelector('slot[name=\"item\"]') as HTMLSlotElement | null;\n const items = slot?.assignedElements() ?? [];\n\n items.forEach((item, index) => {\n item.setAttribute('role', 'listitem');\n if (index === items.length - 1) {\n item.setAttribute('aria-current', 'page');\n } else {\n item.removeAttribute('aria-current');\n }\n });\n };\n\n connectedCallback(): void {\n super.connectedCallback();\n this._itemsObserver = new MutationObserver(() => this.update());\n this._itemsObserver.observe(this, {\n childList: true,\n subtree: true,\n attributes: true,\n attributeFilter: ['slot'],\n });\n }\n\n disconnectedCallback(): void {\n this._itemsObserver?.disconnect();\n super.disconnectedCallback();\n }\n\n render(): string {\n const declarativeItems = this._hasDeclarativeItems();\n const itemsArray = Array.isArray(this.items) ? this.items : [];\n const separatorHtml = this._getSeparatorHtml();\n\n const itemsHtml = itemsArray\n .map((item, index) => {\n const isLast = index === itemsArray.length - 1;\n const escapedLabel = this._escapeHtml(item.label);\n\n if (isLast) {\n // Last item is current page - not clickable\n return `\n <li class=\"breadcrumb-item\" part=\"item\">\n <span\n class=\"breadcrumb-item-active\"\n part=\"current\"\n aria-current=\"page\"\n >${escapedLabel}</span>\n </li>\n `;\n }\n\n // Regular breadcrumb link\n return `\n <li class=\"breadcrumb-item\" part=\"item\">\n <a\n class=\"breadcrumb-link\"\n part=\"link\"\n href=\"${item.href || '#'}\"\n data-index=\"${index}\"\n >${escapedLabel}</a>\n <span class=\"breadcrumb-separator\" part=\"separator\" aria-hidden=\"true\">${separatorHtml}</span>\n </li>\n `;\n })\n .join('');\n\n return `\n <nav class=\"breadcrumbs-nav\" part=\"nav\" aria-label=\"Breadcrumb\">\n <ol class=\"breadcrumbs\" part=\"list\">\n ${declarativeItems ? '<slot name=\"item\"></slot>' : itemsHtml}\n </ol>\n <slot name=\"separator\"></slot>\n </nav>\n `;\n }\n\n update(): void {\n super.update();\n\n const itemSlot = this.shadowRoot?.querySelector('slot[name=\"item\"]');\n itemSlot?.addEventListener('slotchange', this._syncDeclarativeItems);\n this._syncDeclarativeItems();\n\n if (this._hasDeclarativeItems()) return;\n\n // Attach click handlers to all breadcrumb links\n const links = this.shadowRoot?.querySelectorAll('.breadcrumb-link');\n links?.forEach((link) => {\n const index = parseInt(link.getAttribute('data-index') || '0', 10);\n const item = this.items[index];\n if (item) {\n link.addEventListener('click', (e) => this._handleClick(e, item, index));\n }\n });\n }\n}\n",
|
|
6
6
|
"/**\n * @duskmoon-dev/el-breadcrumbs\n *\n * DuskMoon Breadcrumbs custom element\n */\n\nimport { ElDmBreadcrumbs } from './el-dm-breadcrumbs.js';\n\nexport { ElDmBreadcrumbs };\nexport type { BreadcrumbItem, NavigateEventDetail } from './el-dm-breadcrumbs.js';\n\n/**\n * Register the el-dm-breadcrumbs custom element\n *\n * @example\n * ```ts\n * import { register } from '@duskmoon-dev/el-breadcrumbs';\n * register();\n * ```\n */\nexport function register(): void {\n if (!customElements.get('el-dm-breadcrumbs')) {\n customElements.define('el-dm-breadcrumbs', ElDmBreadcrumbs);\n }\n}\n"
|
|
7
7
|
],
|
|
8
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
9
|
-
"debugId": "
|
|
8
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAwBiC,IAAjC;AACqC,IAArC;AAuBA,IAAM,aAAa,sBAAc,QAAQ,4BAA4B,EAAE,EAAE,QAAQ,UAAU,EAAE;AAE7F,IAAM,SAAS;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAUX;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AA2DG,MAAM,wBAAwB,2BAAY;AAAA,SACxC,aAAa;AA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sBAAsB;AAAA,IAE3B,IAAI,KAAK,qBAAqB;AAAA,MAAG;AAAA,IAGjC,MAAM,QAAQ,KAAK,YAAY,iBAAiB,kBAAkB;AAAA,IAClE,OAAO,QAAQ,CAAC,SAAS;AAAA,MACvB,MAAM,QAAQ,SAAS,KAAK,aAAa,YAAY,KAAK,KAAK,EAAE;AAAA,MACjE,MAAM,OAAO,KAAK,MAAM;AAAA,MACxB,IAAI,MAAM;AAAA,QACR,KAAK,iBAAiB,SAAS,CAAC,MAAM,KAAK,aAAa,GAAG,MAAM,KAAK,CAAC;AAAA,MACzE;AAAA,KACD;AAAA;AAEL;;;AClQO,SAAS,QAAQ,GAAS;AAAA,EAC/B,IAAI,CAAC,eAAe,IAAI,mBAAmB,GAAG;AAAA,IAC5C,eAAe,OAAO,qBAAqB,eAAe;AAAA,EAC5D;AAAA;",
|
|
9
|
+
"debugId": "67471EFB8396766264756E2164756E21",
|
|
10
10
|
"names": []
|
|
11
11
|
}
|
package/dist/cjs/register.js
CHANGED
|
@@ -103,6 +103,18 @@ var styles = import_el_base.css`
|
|
|
103
103
|
::slotted([slot='separator']) {
|
|
104
104
|
display: none;
|
|
105
105
|
}
|
|
106
|
+
|
|
107
|
+
::slotted([slot='item']) {
|
|
108
|
+
display: inline-flex;
|
|
109
|
+
align-items: center;
|
|
110
|
+
color: var(--color-primary);
|
|
111
|
+
font-size: 0.875rem;
|
|
112
|
+
line-height: 1.25rem;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
::slotted([slot='item'][aria-current='page']) {
|
|
116
|
+
color: var(--color-on-surface);
|
|
117
|
+
}
|
|
106
118
|
`;
|
|
107
119
|
|
|
108
120
|
class ElDmBreadcrumbs extends import_el_base.BaseElement {
|
|
@@ -110,6 +122,7 @@ class ElDmBreadcrumbs extends import_el_base.BaseElement {
|
|
|
110
122
|
items: { type: Array, reflect: false },
|
|
111
123
|
separator: { type: String, reflect: true, default: "/" }
|
|
112
124
|
};
|
|
125
|
+
_itemsObserver;
|
|
113
126
|
constructor() {
|
|
114
127
|
super();
|
|
115
128
|
this.attachStyles(styles);
|
|
@@ -137,7 +150,37 @@ class ElDmBreadcrumbs extends import_el_base.BaseElement {
|
|
|
137
150
|
div.textContent = text;
|
|
138
151
|
return div.innerHTML;
|
|
139
152
|
}
|
|
153
|
+
_hasDeclarativeItems() {
|
|
154
|
+
return this.querySelector('[slot="item"]') !== null;
|
|
155
|
+
}
|
|
156
|
+
_syncDeclarativeItems = () => {
|
|
157
|
+
const slot = this.shadowRoot?.querySelector('slot[name="item"]');
|
|
158
|
+
const items = slot?.assignedElements() ?? [];
|
|
159
|
+
items.forEach((item, index) => {
|
|
160
|
+
item.setAttribute("role", "listitem");
|
|
161
|
+
if (index === items.length - 1) {
|
|
162
|
+
item.setAttribute("aria-current", "page");
|
|
163
|
+
} else {
|
|
164
|
+
item.removeAttribute("aria-current");
|
|
165
|
+
}
|
|
166
|
+
});
|
|
167
|
+
};
|
|
168
|
+
connectedCallback() {
|
|
169
|
+
super.connectedCallback();
|
|
170
|
+
this._itemsObserver = new MutationObserver(() => this.update());
|
|
171
|
+
this._itemsObserver.observe(this, {
|
|
172
|
+
childList: true,
|
|
173
|
+
subtree: true,
|
|
174
|
+
attributes: true,
|
|
175
|
+
attributeFilter: ["slot"]
|
|
176
|
+
});
|
|
177
|
+
}
|
|
178
|
+
disconnectedCallback() {
|
|
179
|
+
this._itemsObserver?.disconnect();
|
|
180
|
+
super.disconnectedCallback();
|
|
181
|
+
}
|
|
140
182
|
render() {
|
|
183
|
+
const declarativeItems = this._hasDeclarativeItems();
|
|
141
184
|
const itemsArray = Array.isArray(this.items) ? this.items : [];
|
|
142
185
|
const separatorHtml = this._getSeparatorHtml();
|
|
143
186
|
const itemsHtml = itemsArray.map((item, index) => {
|
|
@@ -169,7 +212,7 @@ class ElDmBreadcrumbs extends import_el_base.BaseElement {
|
|
|
169
212
|
return `
|
|
170
213
|
<nav class="breadcrumbs-nav" part="nav" aria-label="Breadcrumb">
|
|
171
214
|
<ol class="breadcrumbs" part="list">
|
|
172
|
-
${itemsHtml}
|
|
215
|
+
${declarativeItems ? '<slot name="item"></slot>' : itemsHtml}
|
|
173
216
|
</ol>
|
|
174
217
|
<slot name="separator"></slot>
|
|
175
218
|
</nav>
|
|
@@ -177,6 +220,11 @@ class ElDmBreadcrumbs extends import_el_base.BaseElement {
|
|
|
177
220
|
}
|
|
178
221
|
update() {
|
|
179
222
|
super.update();
|
|
223
|
+
const itemSlot = this.shadowRoot?.querySelector('slot[name="item"]');
|
|
224
|
+
itemSlot?.addEventListener("slotchange", this._syncDeclarativeItems);
|
|
225
|
+
this._syncDeclarativeItems();
|
|
226
|
+
if (this._hasDeclarativeItems())
|
|
227
|
+
return;
|
|
180
228
|
const links = this.shadowRoot?.querySelectorAll(".breadcrumb-link");
|
|
181
229
|
links?.forEach((link) => {
|
|
182
230
|
const index = parseInt(link.getAttribute("data-index") || "0", 10);
|
|
@@ -198,5 +246,5 @@ function register() {
|
|
|
198
246
|
// src/register.ts
|
|
199
247
|
register();
|
|
200
248
|
|
|
201
|
-
//# debugId=
|
|
249
|
+
//# debugId=B6E055679D277DA564756E2164756E21
|
|
202
250
|
//# sourceMappingURL=register.js.map
|
package/dist/cjs/register.js.map
CHANGED
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/el-dm-breadcrumbs.ts", "../../src/index.ts", "../../src/register.ts"],
|
|
4
4
|
"sourcesContent": [
|
|
5
|
-
"/**\n * DuskMoon Breadcrumbs Element\n *\n * A hierarchical navigation breadcrumbs component for displaying the user's\n * current location within a site structure.\n *\n * @element el-dm-breadcrumbs\n *\n * @attr {string} items - JSON array of breadcrumb items [{label, href}]\n * @attr {string} separator - Separator character between items (default '/')\n *\n * @slot separator - Custom separator element to use between items\n *\n * @csspart nav - The navigation container\n * @csspart list - The ordered list element\n * @csspart item - Individual breadcrumb item container\n * @csspart link - Breadcrumb link element\n * @csspart current - Current page text (last item)\n * @csspart separator - Separator element between items\n *\n * @fires navigate - Fired when a breadcrumb link is clicked. Detail: { item, index }\n */\n\nimport { BaseElement, css } from '@duskmoon-dev/el-base';\nimport { css as navigationCSS } from '@duskmoon-dev/core/components/navigation';\n\n/**\n * Represents a single breadcrumb item\n */\nexport interface BreadcrumbItem {\n /** Display label for the breadcrumb */\n label: string;\n /** URL for the breadcrumb link (optional for last item) */\n href?: string;\n}\n\n/**\n * Event detail for the navigate event\n */\nexport interface NavigateEventDetail {\n /** The breadcrumb item that was clicked */\n item: BreadcrumbItem;\n /** The index of the clicked item */\n index: number;\n}\n\n// Strip @layer wrapper for Shadow DOM compatibility\nconst coreStyles = navigationCSS.replace(/@layer\\s+components\\s*\\{/, '').replace(/\\}\\s*$/, '');\n\nconst styles = css`\n :host {\n display: block;\n }\n\n :host([hidden]) {\n display: none !important;\n }\n\n /* Import core navigation styles */\n ${coreStyles}\n\n .breadcrumbs-nav {\n font-family: inherit;\n }\n\n /* Override core .breadcrumbs padding since we manage our own layout */\n .breadcrumbs {\n padding: 0;\n }\n\n /* Override core .breadcrumb-link with our custom colors */\n .breadcrumb-link {\n color: var(--color-primary);\n }\n\n .breadcrumb-link:hover {\n color: var(--color-primary-dark, var(--color-primary));\n }\n\n .breadcrumb-link:focus {\n outline: 2px solid var(--color-primary);\n outline-offset: 2px;\n border-radius: 2px;\n }\n\n .breadcrumb-item-active {\n color: var(--color-on-surface);\n font-size: 0.875rem;\n line-height: 1.25rem;\n }\n\n /* Hide core's separator ::before — we render separator text explicitly */\n .breadcrumb-separator::before {\n display: none;\n }\n\n .breadcrumb-separator {\n opacity: 1;\n }\n\n /* Hide slotted separator template */\n ::slotted([slot='separator']) {\n display: none;\n }\n`;\n\nexport class ElDmBreadcrumbs extends BaseElement {\n static properties = {\n items: { type: Array, reflect: false },\n separator: { type: String, reflect: true, default: '/' },\n };\n\n /** Array of breadcrumb items */\n declare items: BreadcrumbItem[];\n\n /** Separator character between items */\n declare separator: string;\n\n constructor() {\n super();\n this.attachStyles(styles);\n this.items = [];\n }\n\n /**\n * Handle click on a breadcrumb link\n */\n private _handleClick(event: Event, item: BreadcrumbItem, index: number): void {\n event.preventDefault();\n\n // emit returns true if event was not cancelled\n const notCancelled = this.emit<NavigateEventDetail>('navigate', {\n item,\n index,\n });\n\n // If event was not prevented, navigate to the href\n if (notCancelled && item.href) {\n window.location.href = item.href;\n }\n }\n\n /**\n * Get the separator HTML - either from slot or default\n */\n private _getSeparatorHtml(): string {\n const slottedSeparator = this.querySelector('[slot=\"separator\"]');\n if (slottedSeparator) {\n return slottedSeparator.outerHTML.replace('slot=\"separator\"', '');\n }\n return this.separator || '/';\n }\n\n /**\n * Escape HTML special characters to prevent XSS\n */\n private _escapeHtml(text: string): string {\n const div = document.createElement('div');\n div.textContent = text;\n return div.innerHTML;\n }\n\n render(): string {\n const itemsArray = Array.isArray(this.items) ? this.items : [];\n const separatorHtml = this._getSeparatorHtml();\n\n const itemsHtml = itemsArray\n .map((item, index) => {\n const isLast = index === itemsArray.length - 1;\n const escapedLabel = this._escapeHtml(item.label);\n\n if (isLast) {\n // Last item is current page - not clickable\n return `\n <li class=\"breadcrumb-item\" part=\"item\">\n <span\n class=\"breadcrumb-item-active\"\n part=\"current\"\n aria-current=\"page\"\n >${escapedLabel}</span>\n </li>\n `;\n }\n\n // Regular breadcrumb link\n return `\n <li class=\"breadcrumb-item\" part=\"item\">\n <a\n class=\"breadcrumb-link\"\n part=\"link\"\n href=\"${item.href || '#'}\"\n data-index=\"${index}\"\n >${escapedLabel}</a>\n <span class=\"breadcrumb-separator\" part=\"separator\" aria-hidden=\"true\">${separatorHtml}</span>\n </li>\n `;\n })\n .join('');\n\n return `\n <nav class=\"breadcrumbs-nav\" part=\"nav\" aria-label=\"Breadcrumb\">\n <ol class=\"breadcrumbs\" part=\"list\">\n ${itemsHtml}\n </ol>\n <slot name=\"separator\"></slot>\n </nav>\n `;\n }\n\n update(): void {\n super.update();\n\n // Attach click handlers to all breadcrumb links\n const links = this.shadowRoot?.querySelectorAll('.breadcrumb-link');\n links?.forEach((link) => {\n const index = parseInt(link.getAttribute('data-index') || '0', 10);\n const item = this.items[index];\n if (item) {\n link.addEventListener('click', (e) => this._handleClick(e, item, index));\n }\n });\n }\n}\n",
|
|
5
|
+
"/**\n * DuskMoon Breadcrumbs Element\n *\n * A hierarchical navigation breadcrumbs component for displaying the user's\n * current location within a site structure.\n *\n * @element el-dm-breadcrumbs\n *\n * @attr {string} items - JSON array of breadcrumb items [{label, href}]\n * @attr {string} separator - Separator character between items (default '/')\n *\n * @slot item - Declarative server-rendered breadcrumb item\n * @slot separator - Custom separator element to use between items\n *\n * @csspart nav - The navigation container\n * @csspart list - The ordered list element\n * @csspart item - Individual breadcrumb item container\n * @csspart link - Breadcrumb link element\n * @csspart current - Current page text (last item)\n * @csspart separator - Separator element between items\n *\n * @fires navigate - Fired when a breadcrumb link is clicked. Detail: { item, index }\n */\n\nimport { BaseElement, css } from '@duskmoon-dev/el-base';\nimport { css as navigationCSS } from '@duskmoon-dev/core/components/navigation';\n\n/**\n * Represents a single breadcrumb item\n */\nexport interface BreadcrumbItem {\n /** Display label for the breadcrumb */\n label: string;\n /** URL for the breadcrumb link (optional for last item) */\n href?: string;\n}\n\n/**\n * Event detail for the navigate event\n */\nexport interface NavigateEventDetail {\n /** The breadcrumb item that was clicked */\n item: BreadcrumbItem;\n /** The index of the clicked item */\n index: number;\n}\n\n// Strip @layer wrapper for Shadow DOM compatibility\nconst coreStyles = navigationCSS.replace(/@layer\\s+components\\s*\\{/, '').replace(/\\}\\s*$/, '');\n\nconst styles = css`\n :host {\n display: block;\n }\n\n :host([hidden]) {\n display: none !important;\n }\n\n /* Import core navigation styles */\n ${coreStyles}\n\n .breadcrumbs-nav {\n font-family: inherit;\n }\n\n /* Override core .breadcrumbs padding since we manage our own layout */\n .breadcrumbs {\n padding: 0;\n }\n\n /* Override core .breadcrumb-link with our custom colors */\n .breadcrumb-link {\n color: var(--color-primary);\n }\n\n .breadcrumb-link:hover {\n color: var(--color-primary-dark, var(--color-primary));\n }\n\n .breadcrumb-link:focus {\n outline: 2px solid var(--color-primary);\n outline-offset: 2px;\n border-radius: 2px;\n }\n\n .breadcrumb-item-active {\n color: var(--color-on-surface);\n font-size: 0.875rem;\n line-height: 1.25rem;\n }\n\n /* Hide core's separator ::before — we render separator text explicitly */\n .breadcrumb-separator::before {\n display: none;\n }\n\n .breadcrumb-separator {\n opacity: 1;\n }\n\n /* Hide slotted separator template */\n ::slotted([slot='separator']) {\n display: none;\n }\n\n ::slotted([slot='item']) {\n display: inline-flex;\n align-items: center;\n color: var(--color-primary);\n font-size: 0.875rem;\n line-height: 1.25rem;\n }\n\n ::slotted([slot='item'][aria-current='page']) {\n color: var(--color-on-surface);\n }\n`;\n\nexport class ElDmBreadcrumbs extends BaseElement {\n static properties = {\n items: { type: Array, reflect: false },\n separator: { type: String, reflect: true, default: '/' },\n };\n\n /** Array of breadcrumb items */\n declare items: BreadcrumbItem[];\n\n /** Separator character between items */\n declare separator: string;\n\n private _itemsObserver?: MutationObserver;\n\n constructor() {\n super();\n this.attachStyles(styles);\n this.items = [];\n }\n\n /**\n * Handle click on a breadcrumb link\n */\n private _handleClick(event: Event, item: BreadcrumbItem, index: number): void {\n event.preventDefault();\n\n // emit returns true if event was not cancelled\n const notCancelled = this.emit<NavigateEventDetail>('navigate', {\n item,\n index,\n });\n\n // If event was not prevented, navigate to the href\n if (notCancelled && item.href) {\n window.location.href = item.href;\n }\n }\n\n /**\n * Get the separator HTML - either from slot or default\n */\n private _getSeparatorHtml(): string {\n const slottedSeparator = this.querySelector('[slot=\"separator\"]');\n if (slottedSeparator) {\n return slottedSeparator.outerHTML.replace('slot=\"separator\"', '');\n }\n return this.separator || '/';\n }\n\n /**\n * Escape HTML special characters to prevent XSS\n */\n private _escapeHtml(text: string): string {\n const div = document.createElement('div');\n div.textContent = text;\n return div.innerHTML;\n }\n\n private _hasDeclarativeItems(): boolean {\n return this.querySelector('[slot=\"item\"]') !== null;\n }\n\n private _syncDeclarativeItems = (): void => {\n const slot = this.shadowRoot?.querySelector('slot[name=\"item\"]') as HTMLSlotElement | null;\n const items = slot?.assignedElements() ?? [];\n\n items.forEach((item, index) => {\n item.setAttribute('role', 'listitem');\n if (index === items.length - 1) {\n item.setAttribute('aria-current', 'page');\n } else {\n item.removeAttribute('aria-current');\n }\n });\n };\n\n connectedCallback(): void {\n super.connectedCallback();\n this._itemsObserver = new MutationObserver(() => this.update());\n this._itemsObserver.observe(this, {\n childList: true,\n subtree: true,\n attributes: true,\n attributeFilter: ['slot'],\n });\n }\n\n disconnectedCallback(): void {\n this._itemsObserver?.disconnect();\n super.disconnectedCallback();\n }\n\n render(): string {\n const declarativeItems = this._hasDeclarativeItems();\n const itemsArray = Array.isArray(this.items) ? this.items : [];\n const separatorHtml = this._getSeparatorHtml();\n\n const itemsHtml = itemsArray\n .map((item, index) => {\n const isLast = index === itemsArray.length - 1;\n const escapedLabel = this._escapeHtml(item.label);\n\n if (isLast) {\n // Last item is current page - not clickable\n return `\n <li class=\"breadcrumb-item\" part=\"item\">\n <span\n class=\"breadcrumb-item-active\"\n part=\"current\"\n aria-current=\"page\"\n >${escapedLabel}</span>\n </li>\n `;\n }\n\n // Regular breadcrumb link\n return `\n <li class=\"breadcrumb-item\" part=\"item\">\n <a\n class=\"breadcrumb-link\"\n part=\"link\"\n href=\"${item.href || '#'}\"\n data-index=\"${index}\"\n >${escapedLabel}</a>\n <span class=\"breadcrumb-separator\" part=\"separator\" aria-hidden=\"true\">${separatorHtml}</span>\n </li>\n `;\n })\n .join('');\n\n return `\n <nav class=\"breadcrumbs-nav\" part=\"nav\" aria-label=\"Breadcrumb\">\n <ol class=\"breadcrumbs\" part=\"list\">\n ${declarativeItems ? '<slot name=\"item\"></slot>' : itemsHtml}\n </ol>\n <slot name=\"separator\"></slot>\n </nav>\n `;\n }\n\n update(): void {\n super.update();\n\n const itemSlot = this.shadowRoot?.querySelector('slot[name=\"item\"]');\n itemSlot?.addEventListener('slotchange', this._syncDeclarativeItems);\n this._syncDeclarativeItems();\n\n if (this._hasDeclarativeItems()) return;\n\n // Attach click handlers to all breadcrumb links\n const links = this.shadowRoot?.querySelectorAll('.breadcrumb-link');\n links?.forEach((link) => {\n const index = parseInt(link.getAttribute('data-index') || '0', 10);\n const item = this.items[index];\n if (item) {\n link.addEventListener('click', (e) => this._handleClick(e, item, index));\n }\n });\n }\n}\n",
|
|
6
6
|
"/**\n * @duskmoon-dev/el-breadcrumbs\n *\n * DuskMoon Breadcrumbs custom element\n */\n\nimport { ElDmBreadcrumbs } from './el-dm-breadcrumbs.js';\n\nexport { ElDmBreadcrumbs };\nexport type { BreadcrumbItem, NavigateEventDetail } from './el-dm-breadcrumbs.js';\n\n/**\n * Register the el-dm-breadcrumbs custom element\n *\n * @example\n * ```ts\n * import { register } from '@duskmoon-dev/el-breadcrumbs';\n * register();\n * ```\n */\nexport function register(): void {\n if (!customElements.get('el-dm-breadcrumbs')) {\n customElements.define('el-dm-breadcrumbs', ElDmBreadcrumbs);\n }\n}\n",
|
|
7
7
|
"/**\n * Auto-register el-dm-breadcrumbs custom element\n *\n * @example\n * ```ts\n * import '@duskmoon-dev/el-breadcrumbs/register';\n *\n * // Now you can use <el-dm-breadcrumbs> in HTML\n * ```\n */\nimport { register } from './index.js';\n\nregister();\n"
|
|
8
8
|
],
|
|
9
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
10
|
-
"debugId": "
|
|
9
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAwBiC,IAAjC;AACqC,IAArC;AAuBA,IAAM,aAAa,sBAAc,QAAQ,4BAA4B,EAAE,EAAE,QAAQ,UAAU,EAAE;AAE7F,IAAM,SAAS;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAUX;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;A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AA;AAAA,sBAKO,KAAK,QAAQ;AAAA,4BACP;AAAA,eACb;AAAA,qFACsE;AAAA;AAAA;AAAA,KAG9E,EACA,KAAK,EAAE;AAAA,IAEV,OAAO;AAAA;AAAA;AAAA,YAGC,mBAAmB,8BAA8B;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAO3D,MAAM,GAAS;AAAA,IACb,MAAM,OAAO;AAAA,IAEb,MAAM,WAAW,KAAK,YAAY,cAAc,mBAAmB;AAAA,IACnE,UAAU,iBAAiB,cAAc,KAAK,qBAAqB;AAAA,IACnE,KAAK,sBAAsB;AAAA,IAE3B,IAAI,KAAK,qBAAqB;AAAA,MAAG;AAAA,IAGjC,MAAM,QAAQ,KAAK,YAAY,iBAAiB,kBAAkB;AAAA,IAClE,OAAO,QAAQ,CAAC,SAAS;AAAA,MACvB,MAAM,QAAQ,SAAS,KAAK,aAAa,YAAY,KAAK,KAAK,EAAE;AAAA,MACjE,MAAM,OAAO,KAAK,MAAM;AAAA,MACxB,IAAI,MAAM;AAAA,QACR,KAAK,iBAAiB,SAAS,CAAC,MAAM,KAAK,aAAa,GAAG,MAAM,KAAK,CAAC;AAAA,MACzE;AAAA,KACD;AAAA;AAEL;;;AClQO,SAAS,QAAQ,GAAS;AAAA,EAC/B,IAAI,CAAC,eAAe,IAAI,mBAAmB,GAAG;AAAA,IAC5C,eAAe,OAAO,qBAAqB,eAAe;AAAA,EAC5D;AAAA;;;ACXF,SAAS;",
|
|
10
|
+
"debugId": "B6E055679D277DA564756E2164756E21",
|
|
11
11
|
"names": []
|
|
12
12
|
}
|
package/dist/esm/index.js
CHANGED
|
@@ -57,6 +57,18 @@ var styles = css`
|
|
|
57
57
|
::slotted([slot='separator']) {
|
|
58
58
|
display: none;
|
|
59
59
|
}
|
|
60
|
+
|
|
61
|
+
::slotted([slot='item']) {
|
|
62
|
+
display: inline-flex;
|
|
63
|
+
align-items: center;
|
|
64
|
+
color: var(--color-primary);
|
|
65
|
+
font-size: 0.875rem;
|
|
66
|
+
line-height: 1.25rem;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
::slotted([slot='item'][aria-current='page']) {
|
|
70
|
+
color: var(--color-on-surface);
|
|
71
|
+
}
|
|
60
72
|
`;
|
|
61
73
|
|
|
62
74
|
class ElDmBreadcrumbs extends BaseElement {
|
|
@@ -64,6 +76,7 @@ class ElDmBreadcrumbs extends BaseElement {
|
|
|
64
76
|
items: { type: Array, reflect: false },
|
|
65
77
|
separator: { type: String, reflect: true, default: "/" }
|
|
66
78
|
};
|
|
79
|
+
_itemsObserver;
|
|
67
80
|
constructor() {
|
|
68
81
|
super();
|
|
69
82
|
this.attachStyles(styles);
|
|
@@ -91,7 +104,37 @@ class ElDmBreadcrumbs extends BaseElement {
|
|
|
91
104
|
div.textContent = text;
|
|
92
105
|
return div.innerHTML;
|
|
93
106
|
}
|
|
107
|
+
_hasDeclarativeItems() {
|
|
108
|
+
return this.querySelector('[slot="item"]') !== null;
|
|
109
|
+
}
|
|
110
|
+
_syncDeclarativeItems = () => {
|
|
111
|
+
const slot = this.shadowRoot?.querySelector('slot[name="item"]');
|
|
112
|
+
const items = slot?.assignedElements() ?? [];
|
|
113
|
+
items.forEach((item, index) => {
|
|
114
|
+
item.setAttribute("role", "listitem");
|
|
115
|
+
if (index === items.length - 1) {
|
|
116
|
+
item.setAttribute("aria-current", "page");
|
|
117
|
+
} else {
|
|
118
|
+
item.removeAttribute("aria-current");
|
|
119
|
+
}
|
|
120
|
+
});
|
|
121
|
+
};
|
|
122
|
+
connectedCallback() {
|
|
123
|
+
super.connectedCallback();
|
|
124
|
+
this._itemsObserver = new MutationObserver(() => this.update());
|
|
125
|
+
this._itemsObserver.observe(this, {
|
|
126
|
+
childList: true,
|
|
127
|
+
subtree: true,
|
|
128
|
+
attributes: true,
|
|
129
|
+
attributeFilter: ["slot"]
|
|
130
|
+
});
|
|
131
|
+
}
|
|
132
|
+
disconnectedCallback() {
|
|
133
|
+
this._itemsObserver?.disconnect();
|
|
134
|
+
super.disconnectedCallback();
|
|
135
|
+
}
|
|
94
136
|
render() {
|
|
137
|
+
const declarativeItems = this._hasDeclarativeItems();
|
|
95
138
|
const itemsArray = Array.isArray(this.items) ? this.items : [];
|
|
96
139
|
const separatorHtml = this._getSeparatorHtml();
|
|
97
140
|
const itemsHtml = itemsArray.map((item, index) => {
|
|
@@ -123,7 +166,7 @@ class ElDmBreadcrumbs extends BaseElement {
|
|
|
123
166
|
return `
|
|
124
167
|
<nav class="breadcrumbs-nav" part="nav" aria-label="Breadcrumb">
|
|
125
168
|
<ol class="breadcrumbs" part="list">
|
|
126
|
-
${itemsHtml}
|
|
169
|
+
${declarativeItems ? '<slot name="item"></slot>' : itemsHtml}
|
|
127
170
|
</ol>
|
|
128
171
|
<slot name="separator"></slot>
|
|
129
172
|
</nav>
|
|
@@ -131,6 +174,11 @@ class ElDmBreadcrumbs extends BaseElement {
|
|
|
131
174
|
}
|
|
132
175
|
update() {
|
|
133
176
|
super.update();
|
|
177
|
+
const itemSlot = this.shadowRoot?.querySelector('slot[name="item"]');
|
|
178
|
+
itemSlot?.addEventListener("slotchange", this._syncDeclarativeItems);
|
|
179
|
+
this._syncDeclarativeItems();
|
|
180
|
+
if (this._hasDeclarativeItems())
|
|
181
|
+
return;
|
|
134
182
|
const links = this.shadowRoot?.querySelectorAll(".breadcrumb-link");
|
|
135
183
|
links?.forEach((link) => {
|
|
136
184
|
const index = parseInt(link.getAttribute("data-index") || "0", 10);
|
|
@@ -153,5 +201,5 @@ export {
|
|
|
153
201
|
ElDmBreadcrumbs
|
|
154
202
|
};
|
|
155
203
|
|
|
156
|
-
//# debugId=
|
|
204
|
+
//# debugId=C805C2F058922D2664756E2164756E21
|
|
157
205
|
//# sourceMappingURL=index.js.map
|
package/dist/esm/index.js.map
CHANGED
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/el-dm-breadcrumbs.ts", "../../src/index.ts"],
|
|
4
4
|
"sourcesContent": [
|
|
5
|
-
"/**\n * DuskMoon Breadcrumbs Element\n *\n * A hierarchical navigation breadcrumbs component for displaying the user's\n * current location within a site structure.\n *\n * @element el-dm-breadcrumbs\n *\n * @attr {string} items - JSON array of breadcrumb items [{label, href}]\n * @attr {string} separator - Separator character between items (default '/')\n *\n * @slot separator - Custom separator element to use between items\n *\n * @csspart nav - The navigation container\n * @csspart list - The ordered list element\n * @csspart item - Individual breadcrumb item container\n * @csspart link - Breadcrumb link element\n * @csspart current - Current page text (last item)\n * @csspart separator - Separator element between items\n *\n * @fires navigate - Fired when a breadcrumb link is clicked. Detail: { item, index }\n */\n\nimport { BaseElement, css } from '@duskmoon-dev/el-base';\nimport { css as navigationCSS } from '@duskmoon-dev/core/components/navigation';\n\n/**\n * Represents a single breadcrumb item\n */\nexport interface BreadcrumbItem {\n /** Display label for the breadcrumb */\n label: string;\n /** URL for the breadcrumb link (optional for last item) */\n href?: string;\n}\n\n/**\n * Event detail for the navigate event\n */\nexport interface NavigateEventDetail {\n /** The breadcrumb item that was clicked */\n item: BreadcrumbItem;\n /** The index of the clicked item */\n index: number;\n}\n\n// Strip @layer wrapper for Shadow DOM compatibility\nconst coreStyles = navigationCSS.replace(/@layer\\s+components\\s*\\{/, '').replace(/\\}\\s*$/, '');\n\nconst styles = css`\n :host {\n display: block;\n }\n\n :host([hidden]) {\n display: none !important;\n }\n\n /* Import core navigation styles */\n ${coreStyles}\n\n .breadcrumbs-nav {\n font-family: inherit;\n }\n\n /* Override core .breadcrumbs padding since we manage our own layout */\n .breadcrumbs {\n padding: 0;\n }\n\n /* Override core .breadcrumb-link with our custom colors */\n .breadcrumb-link {\n color: var(--color-primary);\n }\n\n .breadcrumb-link:hover {\n color: var(--color-primary-dark, var(--color-primary));\n }\n\n .breadcrumb-link:focus {\n outline: 2px solid var(--color-primary);\n outline-offset: 2px;\n border-radius: 2px;\n }\n\n .breadcrumb-item-active {\n color: var(--color-on-surface);\n font-size: 0.875rem;\n line-height: 1.25rem;\n }\n\n /* Hide core's separator ::before — we render separator text explicitly */\n .breadcrumb-separator::before {\n display: none;\n }\n\n .breadcrumb-separator {\n opacity: 1;\n }\n\n /* Hide slotted separator template */\n ::slotted([slot='separator']) {\n display: none;\n }\n`;\n\nexport class ElDmBreadcrumbs extends BaseElement {\n static properties = {\n items: { type: Array, reflect: false },\n separator: { type: String, reflect: true, default: '/' },\n };\n\n /** Array of breadcrumb items */\n declare items: BreadcrumbItem[];\n\n /** Separator character between items */\n declare separator: string;\n\n constructor() {\n super();\n this.attachStyles(styles);\n this.items = [];\n }\n\n /**\n * Handle click on a breadcrumb link\n */\n private _handleClick(event: Event, item: BreadcrumbItem, index: number): void {\n event.preventDefault();\n\n // emit returns true if event was not cancelled\n const notCancelled = this.emit<NavigateEventDetail>('navigate', {\n item,\n index,\n });\n\n // If event was not prevented, navigate to the href\n if (notCancelled && item.href) {\n window.location.href = item.href;\n }\n }\n\n /**\n * Get the separator HTML - either from slot or default\n */\n private _getSeparatorHtml(): string {\n const slottedSeparator = this.querySelector('[slot=\"separator\"]');\n if (slottedSeparator) {\n return slottedSeparator.outerHTML.replace('slot=\"separator\"', '');\n }\n return this.separator || '/';\n }\n\n /**\n * Escape HTML special characters to prevent XSS\n */\n private _escapeHtml(text: string): string {\n const div = document.createElement('div');\n div.textContent = text;\n return div.innerHTML;\n }\n\n render(): string {\n const itemsArray = Array.isArray(this.items) ? this.items : [];\n const separatorHtml = this._getSeparatorHtml();\n\n const itemsHtml = itemsArray\n .map((item, index) => {\n const isLast = index === itemsArray.length - 1;\n const escapedLabel = this._escapeHtml(item.label);\n\n if (isLast) {\n // Last item is current page - not clickable\n return `\n <li class=\"breadcrumb-item\" part=\"item\">\n <span\n class=\"breadcrumb-item-active\"\n part=\"current\"\n aria-current=\"page\"\n >${escapedLabel}</span>\n </li>\n `;\n }\n\n // Regular breadcrumb link\n return `\n <li class=\"breadcrumb-item\" part=\"item\">\n <a\n class=\"breadcrumb-link\"\n part=\"link\"\n href=\"${item.href || '#'}\"\n data-index=\"${index}\"\n >${escapedLabel}</a>\n <span class=\"breadcrumb-separator\" part=\"separator\" aria-hidden=\"true\">${separatorHtml}</span>\n </li>\n `;\n })\n .join('');\n\n return `\n <nav class=\"breadcrumbs-nav\" part=\"nav\" aria-label=\"Breadcrumb\">\n <ol class=\"breadcrumbs\" part=\"list\">\n ${itemsHtml}\n </ol>\n <slot name=\"separator\"></slot>\n </nav>\n `;\n }\n\n update(): void {\n super.update();\n\n // Attach click handlers to all breadcrumb links\n const links = this.shadowRoot?.querySelectorAll('.breadcrumb-link');\n links?.forEach((link) => {\n const index = parseInt(link.getAttribute('data-index') || '0', 10);\n const item = this.items[index];\n if (item) {\n link.addEventListener('click', (e) => this._handleClick(e, item, index));\n }\n });\n }\n}\n",
|
|
5
|
+
"/**\n * DuskMoon Breadcrumbs Element\n *\n * A hierarchical navigation breadcrumbs component for displaying the user's\n * current location within a site structure.\n *\n * @element el-dm-breadcrumbs\n *\n * @attr {string} items - JSON array of breadcrumb items [{label, href}]\n * @attr {string} separator - Separator character between items (default '/')\n *\n * @slot item - Declarative server-rendered breadcrumb item\n * @slot separator - Custom separator element to use between items\n *\n * @csspart nav - The navigation container\n * @csspart list - The ordered list element\n * @csspart item - Individual breadcrumb item container\n * @csspart link - Breadcrumb link element\n * @csspart current - Current page text (last item)\n * @csspart separator - Separator element between items\n *\n * @fires navigate - Fired when a breadcrumb link is clicked. Detail: { item, index }\n */\n\nimport { BaseElement, css } from '@duskmoon-dev/el-base';\nimport { css as navigationCSS } from '@duskmoon-dev/core/components/navigation';\n\n/**\n * Represents a single breadcrumb item\n */\nexport interface BreadcrumbItem {\n /** Display label for the breadcrumb */\n label: string;\n /** URL for the breadcrumb link (optional for last item) */\n href?: string;\n}\n\n/**\n * Event detail for the navigate event\n */\nexport interface NavigateEventDetail {\n /** The breadcrumb item that was clicked */\n item: BreadcrumbItem;\n /** The index of the clicked item */\n index: number;\n}\n\n// Strip @layer wrapper for Shadow DOM compatibility\nconst coreStyles = navigationCSS.replace(/@layer\\s+components\\s*\\{/, '').replace(/\\}\\s*$/, '');\n\nconst styles = css`\n :host {\n display: block;\n }\n\n :host([hidden]) {\n display: none !important;\n }\n\n /* Import core navigation styles */\n ${coreStyles}\n\n .breadcrumbs-nav {\n font-family: inherit;\n }\n\n /* Override core .breadcrumbs padding since we manage our own layout */\n .breadcrumbs {\n padding: 0;\n }\n\n /* Override core .breadcrumb-link with our custom colors */\n .breadcrumb-link {\n color: var(--color-primary);\n }\n\n .breadcrumb-link:hover {\n color: var(--color-primary-dark, var(--color-primary));\n }\n\n .breadcrumb-link:focus {\n outline: 2px solid var(--color-primary);\n outline-offset: 2px;\n border-radius: 2px;\n }\n\n .breadcrumb-item-active {\n color: var(--color-on-surface);\n font-size: 0.875rem;\n line-height: 1.25rem;\n }\n\n /* Hide core's separator ::before — we render separator text explicitly */\n .breadcrumb-separator::before {\n display: none;\n }\n\n .breadcrumb-separator {\n opacity: 1;\n }\n\n /* Hide slotted separator template */\n ::slotted([slot='separator']) {\n display: none;\n }\n\n ::slotted([slot='item']) {\n display: inline-flex;\n align-items: center;\n color: var(--color-primary);\n font-size: 0.875rem;\n line-height: 1.25rem;\n }\n\n ::slotted([slot='item'][aria-current='page']) {\n color: var(--color-on-surface);\n }\n`;\n\nexport class ElDmBreadcrumbs extends BaseElement {\n static properties = {\n items: { type: Array, reflect: false },\n separator: { type: String, reflect: true, default: '/' },\n };\n\n /** Array of breadcrumb items */\n declare items: BreadcrumbItem[];\n\n /** Separator character between items */\n declare separator: string;\n\n private _itemsObserver?: MutationObserver;\n\n constructor() {\n super();\n this.attachStyles(styles);\n this.items = [];\n }\n\n /**\n * Handle click on a breadcrumb link\n */\n private _handleClick(event: Event, item: BreadcrumbItem, index: number): void {\n event.preventDefault();\n\n // emit returns true if event was not cancelled\n const notCancelled = this.emit<NavigateEventDetail>('navigate', {\n item,\n index,\n });\n\n // If event was not prevented, navigate to the href\n if (notCancelled && item.href) {\n window.location.href = item.href;\n }\n }\n\n /**\n * Get the separator HTML - either from slot or default\n */\n private _getSeparatorHtml(): string {\n const slottedSeparator = this.querySelector('[slot=\"separator\"]');\n if (slottedSeparator) {\n return slottedSeparator.outerHTML.replace('slot=\"separator\"', '');\n }\n return this.separator || '/';\n }\n\n /**\n * Escape HTML special characters to prevent XSS\n */\n private _escapeHtml(text: string): string {\n const div = document.createElement('div');\n div.textContent = text;\n return div.innerHTML;\n }\n\n private _hasDeclarativeItems(): boolean {\n return this.querySelector('[slot=\"item\"]') !== null;\n }\n\n private _syncDeclarativeItems = (): void => {\n const slot = this.shadowRoot?.querySelector('slot[name=\"item\"]') as HTMLSlotElement | null;\n const items = slot?.assignedElements() ?? [];\n\n items.forEach((item, index) => {\n item.setAttribute('role', 'listitem');\n if (index === items.length - 1) {\n item.setAttribute('aria-current', 'page');\n } else {\n item.removeAttribute('aria-current');\n }\n });\n };\n\n connectedCallback(): void {\n super.connectedCallback();\n this._itemsObserver = new MutationObserver(() => this.update());\n this._itemsObserver.observe(this, {\n childList: true,\n subtree: true,\n attributes: true,\n attributeFilter: ['slot'],\n });\n }\n\n disconnectedCallback(): void {\n this._itemsObserver?.disconnect();\n super.disconnectedCallback();\n }\n\n render(): string {\n const declarativeItems = this._hasDeclarativeItems();\n const itemsArray = Array.isArray(this.items) ? this.items : [];\n const separatorHtml = this._getSeparatorHtml();\n\n const itemsHtml = itemsArray\n .map((item, index) => {\n const isLast = index === itemsArray.length - 1;\n const escapedLabel = this._escapeHtml(item.label);\n\n if (isLast) {\n // Last item is current page - not clickable\n return `\n <li class=\"breadcrumb-item\" part=\"item\">\n <span\n class=\"breadcrumb-item-active\"\n part=\"current\"\n aria-current=\"page\"\n >${escapedLabel}</span>\n </li>\n `;\n }\n\n // Regular breadcrumb link\n return `\n <li class=\"breadcrumb-item\" part=\"item\">\n <a\n class=\"breadcrumb-link\"\n part=\"link\"\n href=\"${item.href || '#'}\"\n data-index=\"${index}\"\n >${escapedLabel}</a>\n <span class=\"breadcrumb-separator\" part=\"separator\" aria-hidden=\"true\">${separatorHtml}</span>\n </li>\n `;\n })\n .join('');\n\n return `\n <nav class=\"breadcrumbs-nav\" part=\"nav\" aria-label=\"Breadcrumb\">\n <ol class=\"breadcrumbs\" part=\"list\">\n ${declarativeItems ? '<slot name=\"item\"></slot>' : itemsHtml}\n </ol>\n <slot name=\"separator\"></slot>\n </nav>\n `;\n }\n\n update(): void {\n super.update();\n\n const itemSlot = this.shadowRoot?.querySelector('slot[name=\"item\"]');\n itemSlot?.addEventListener('slotchange', this._syncDeclarativeItems);\n this._syncDeclarativeItems();\n\n if (this._hasDeclarativeItems()) return;\n\n // Attach click handlers to all breadcrumb links\n const links = this.shadowRoot?.querySelectorAll('.breadcrumb-link');\n links?.forEach((link) => {\n const index = parseInt(link.getAttribute('data-index') || '0', 10);\n const item = this.items[index];\n if (item) {\n link.addEventListener('click', (e) => this._handleClick(e, item, index));\n }\n });\n }\n}\n",
|
|
6
6
|
"/**\n * @duskmoon-dev/el-breadcrumbs\n *\n * DuskMoon Breadcrumbs custom element\n */\n\nimport { ElDmBreadcrumbs } from './el-dm-breadcrumbs.js';\n\nexport { ElDmBreadcrumbs };\nexport type { BreadcrumbItem, NavigateEventDetail } from './el-dm-breadcrumbs.js';\n\n/**\n * Register the el-dm-breadcrumbs custom element\n *\n * @example\n * ```ts\n * import { register } from '@duskmoon-dev/el-breadcrumbs';\n * register();\n * ```\n */\nexport function register(): void {\n if (!customElements.get('el-dm-breadcrumbs')) {\n customElements.define('el-dm-breadcrumbs', ElDmBreadcrumbs);\n }\n}\n"
|
|
7
7
|
],
|
|
8
|
-
"mappings": ";
|
|
9
|
-
"debugId": "
|
|
8
|
+
"mappings": ";AAwBA;AACA,gBAAS;AAuBT,IAAM,aAAa,cAAc,QAAQ,4BAA4B,EAAE,EAAE,QAAQ,UAAU,EAAE;AAE7F,IAAM,SAAS;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAUX;AAAA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AGA,OAAO;AAAA;AAAA;AAAA;AAAA;AAAA,sBAKO,KAAK,QAAQ;AAAA,4BACP;AAAA,eACb;AAAA,qFACsE;AAAA;AAAA;AAAA,KAG9E,EACA,KAAK,EAAE;AAAA,IAEV,OAAO;AAAA;AAAA;AAAA,YAGC,mBAAmB,8BAA8B;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAO3D,MAAM,GAAS;AAAA,IACb,MAAM,OAAO;AAAA,IAEb,MAAM,WAAW,KAAK,YAAY,cAAc,mBAAmB;AAAA,IACnE,UAAU,iBAAiB,cAAc,KAAK,qBAAqB;AAAA,IACnE,KAAK,sBAAsB;AAAA,IAE3B,IAAI,KAAK,qBAAqB;AAAA,MAAG;AAAA,IAGjC,MAAM,QAAQ,KAAK,YAAY,iBAAiB,kBAAkB;AAAA,IAClE,OAAO,QAAQ,CAAC,SAAS;AAAA,MACvB,MAAM,QAAQ,SAAS,KAAK,aAAa,YAAY,KAAK,KAAK,EAAE;AAAA,MACjE,MAAM,OAAO,KAAK,MAAM;AAAA,MACxB,IAAI,MAAM;AAAA,QACR,KAAK,iBAAiB,SAAS,CAAC,MAAM,KAAK,aAAa,GAAG,MAAM,KAAK,CAAC;AAAA,MACzE;AAAA,KACD;AAAA;AAEL;;;AClQO,SAAS,QAAQ,GAAS;AAAA,EAC/B,IAAI,CAAC,eAAe,IAAI,mBAAmB,GAAG;AAAA,IAC5C,eAAe,OAAO,qBAAqB,eAAe;AAAA,EAC5D;AAAA;",
|
|
9
|
+
"debugId": "C805C2F058922D2664756E2164756E21",
|
|
10
10
|
"names": []
|
|
11
11
|
}
|
package/dist/esm/register.js
CHANGED
|
@@ -57,6 +57,18 @@ var styles = css`
|
|
|
57
57
|
::slotted([slot='separator']) {
|
|
58
58
|
display: none;
|
|
59
59
|
}
|
|
60
|
+
|
|
61
|
+
::slotted([slot='item']) {
|
|
62
|
+
display: inline-flex;
|
|
63
|
+
align-items: center;
|
|
64
|
+
color: var(--color-primary);
|
|
65
|
+
font-size: 0.875rem;
|
|
66
|
+
line-height: 1.25rem;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
::slotted([slot='item'][aria-current='page']) {
|
|
70
|
+
color: var(--color-on-surface);
|
|
71
|
+
}
|
|
60
72
|
`;
|
|
61
73
|
|
|
62
74
|
class ElDmBreadcrumbs extends BaseElement {
|
|
@@ -64,6 +76,7 @@ class ElDmBreadcrumbs extends BaseElement {
|
|
|
64
76
|
items: { type: Array, reflect: false },
|
|
65
77
|
separator: { type: String, reflect: true, default: "/" }
|
|
66
78
|
};
|
|
79
|
+
_itemsObserver;
|
|
67
80
|
constructor() {
|
|
68
81
|
super();
|
|
69
82
|
this.attachStyles(styles);
|
|
@@ -91,7 +104,37 @@ class ElDmBreadcrumbs extends BaseElement {
|
|
|
91
104
|
div.textContent = text;
|
|
92
105
|
return div.innerHTML;
|
|
93
106
|
}
|
|
107
|
+
_hasDeclarativeItems() {
|
|
108
|
+
return this.querySelector('[slot="item"]') !== null;
|
|
109
|
+
}
|
|
110
|
+
_syncDeclarativeItems = () => {
|
|
111
|
+
const slot = this.shadowRoot?.querySelector('slot[name="item"]');
|
|
112
|
+
const items = slot?.assignedElements() ?? [];
|
|
113
|
+
items.forEach((item, index) => {
|
|
114
|
+
item.setAttribute("role", "listitem");
|
|
115
|
+
if (index === items.length - 1) {
|
|
116
|
+
item.setAttribute("aria-current", "page");
|
|
117
|
+
} else {
|
|
118
|
+
item.removeAttribute("aria-current");
|
|
119
|
+
}
|
|
120
|
+
});
|
|
121
|
+
};
|
|
122
|
+
connectedCallback() {
|
|
123
|
+
super.connectedCallback();
|
|
124
|
+
this._itemsObserver = new MutationObserver(() => this.update());
|
|
125
|
+
this._itemsObserver.observe(this, {
|
|
126
|
+
childList: true,
|
|
127
|
+
subtree: true,
|
|
128
|
+
attributes: true,
|
|
129
|
+
attributeFilter: ["slot"]
|
|
130
|
+
});
|
|
131
|
+
}
|
|
132
|
+
disconnectedCallback() {
|
|
133
|
+
this._itemsObserver?.disconnect();
|
|
134
|
+
super.disconnectedCallback();
|
|
135
|
+
}
|
|
94
136
|
render() {
|
|
137
|
+
const declarativeItems = this._hasDeclarativeItems();
|
|
95
138
|
const itemsArray = Array.isArray(this.items) ? this.items : [];
|
|
96
139
|
const separatorHtml = this._getSeparatorHtml();
|
|
97
140
|
const itemsHtml = itemsArray.map((item, index) => {
|
|
@@ -123,7 +166,7 @@ class ElDmBreadcrumbs extends BaseElement {
|
|
|
123
166
|
return `
|
|
124
167
|
<nav class="breadcrumbs-nav" part="nav" aria-label="Breadcrumb">
|
|
125
168
|
<ol class="breadcrumbs" part="list">
|
|
126
|
-
${itemsHtml}
|
|
169
|
+
${declarativeItems ? '<slot name="item"></slot>' : itemsHtml}
|
|
127
170
|
</ol>
|
|
128
171
|
<slot name="separator"></slot>
|
|
129
172
|
</nav>
|
|
@@ -131,6 +174,11 @@ class ElDmBreadcrumbs extends BaseElement {
|
|
|
131
174
|
}
|
|
132
175
|
update() {
|
|
133
176
|
super.update();
|
|
177
|
+
const itemSlot = this.shadowRoot?.querySelector('slot[name="item"]');
|
|
178
|
+
itemSlot?.addEventListener("slotchange", this._syncDeclarativeItems);
|
|
179
|
+
this._syncDeclarativeItems();
|
|
180
|
+
if (this._hasDeclarativeItems())
|
|
181
|
+
return;
|
|
134
182
|
const links = this.shadowRoot?.querySelectorAll(".breadcrumb-link");
|
|
135
183
|
links?.forEach((link) => {
|
|
136
184
|
const index = parseInt(link.getAttribute("data-index") || "0", 10);
|
|
@@ -152,5 +200,5 @@ function register() {
|
|
|
152
200
|
// src/register.ts
|
|
153
201
|
register();
|
|
154
202
|
|
|
155
|
-
//# debugId=
|
|
203
|
+
//# debugId=CC1A98C146295D2564756E2164756E21
|
|
156
204
|
//# sourceMappingURL=register.js.map
|
package/dist/esm/register.js.map
CHANGED
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/el-dm-breadcrumbs.ts", "../../src/index.ts", "../../src/register.ts"],
|
|
4
4
|
"sourcesContent": [
|
|
5
|
-
"/**\n * DuskMoon Breadcrumbs Element\n *\n * A hierarchical navigation breadcrumbs component for displaying the user's\n * current location within a site structure.\n *\n * @element el-dm-breadcrumbs\n *\n * @attr {string} items - JSON array of breadcrumb items [{label, href}]\n * @attr {string} separator - Separator character between items (default '/')\n *\n * @slot separator - Custom separator element to use between items\n *\n * @csspart nav - The navigation container\n * @csspart list - The ordered list element\n * @csspart item - Individual breadcrumb item container\n * @csspart link - Breadcrumb link element\n * @csspart current - Current page text (last item)\n * @csspart separator - Separator element between items\n *\n * @fires navigate - Fired when a breadcrumb link is clicked. Detail: { item, index }\n */\n\nimport { BaseElement, css } from '@duskmoon-dev/el-base';\nimport { css as navigationCSS } from '@duskmoon-dev/core/components/navigation';\n\n/**\n * Represents a single breadcrumb item\n */\nexport interface BreadcrumbItem {\n /** Display label for the breadcrumb */\n label: string;\n /** URL for the breadcrumb link (optional for last item) */\n href?: string;\n}\n\n/**\n * Event detail for the navigate event\n */\nexport interface NavigateEventDetail {\n /** The breadcrumb item that was clicked */\n item: BreadcrumbItem;\n /** The index of the clicked item */\n index: number;\n}\n\n// Strip @layer wrapper for Shadow DOM compatibility\nconst coreStyles = navigationCSS.replace(/@layer\\s+components\\s*\\{/, '').replace(/\\}\\s*$/, '');\n\nconst styles = css`\n :host {\n display: block;\n }\n\n :host([hidden]) {\n display: none !important;\n }\n\n /* Import core navigation styles */\n ${coreStyles}\n\n .breadcrumbs-nav {\n font-family: inherit;\n }\n\n /* Override core .breadcrumbs padding since we manage our own layout */\n .breadcrumbs {\n padding: 0;\n }\n\n /* Override core .breadcrumb-link with our custom colors */\n .breadcrumb-link {\n color: var(--color-primary);\n }\n\n .breadcrumb-link:hover {\n color: var(--color-primary-dark, var(--color-primary));\n }\n\n .breadcrumb-link:focus {\n outline: 2px solid var(--color-primary);\n outline-offset: 2px;\n border-radius: 2px;\n }\n\n .breadcrumb-item-active {\n color: var(--color-on-surface);\n font-size: 0.875rem;\n line-height: 1.25rem;\n }\n\n /* Hide core's separator ::before — we render separator text explicitly */\n .breadcrumb-separator::before {\n display: none;\n }\n\n .breadcrumb-separator {\n opacity: 1;\n }\n\n /* Hide slotted separator template */\n ::slotted([slot='separator']) {\n display: none;\n }\n`;\n\nexport class ElDmBreadcrumbs extends BaseElement {\n static properties = {\n items: { type: Array, reflect: false },\n separator: { type: String, reflect: true, default: '/' },\n };\n\n /** Array of breadcrumb items */\n declare items: BreadcrumbItem[];\n\n /** Separator character between items */\n declare separator: string;\n\n constructor() {\n super();\n this.attachStyles(styles);\n this.items = [];\n }\n\n /**\n * Handle click on a breadcrumb link\n */\n private _handleClick(event: Event, item: BreadcrumbItem, index: number): void {\n event.preventDefault();\n\n // emit returns true if event was not cancelled\n const notCancelled = this.emit<NavigateEventDetail>('navigate', {\n item,\n index,\n });\n\n // If event was not prevented, navigate to the href\n if (notCancelled && item.href) {\n window.location.href = item.href;\n }\n }\n\n /**\n * Get the separator HTML - either from slot or default\n */\n private _getSeparatorHtml(): string {\n const slottedSeparator = this.querySelector('[slot=\"separator\"]');\n if (slottedSeparator) {\n return slottedSeparator.outerHTML.replace('slot=\"separator\"', '');\n }\n return this.separator || '/';\n }\n\n /**\n * Escape HTML special characters to prevent XSS\n */\n private _escapeHtml(text: string): string {\n const div = document.createElement('div');\n div.textContent = text;\n return div.innerHTML;\n }\n\n render(): string {\n const itemsArray = Array.isArray(this.items) ? this.items : [];\n const separatorHtml = this._getSeparatorHtml();\n\n const itemsHtml = itemsArray\n .map((item, index) => {\n const isLast = index === itemsArray.length - 1;\n const escapedLabel = this._escapeHtml(item.label);\n\n if (isLast) {\n // Last item is current page - not clickable\n return `\n <li class=\"breadcrumb-item\" part=\"item\">\n <span\n class=\"breadcrumb-item-active\"\n part=\"current\"\n aria-current=\"page\"\n >${escapedLabel}</span>\n </li>\n `;\n }\n\n // Regular breadcrumb link\n return `\n <li class=\"breadcrumb-item\" part=\"item\">\n <a\n class=\"breadcrumb-link\"\n part=\"link\"\n href=\"${item.href || '#'}\"\n data-index=\"${index}\"\n >${escapedLabel}</a>\n <span class=\"breadcrumb-separator\" part=\"separator\" aria-hidden=\"true\">${separatorHtml}</span>\n </li>\n `;\n })\n .join('');\n\n return `\n <nav class=\"breadcrumbs-nav\" part=\"nav\" aria-label=\"Breadcrumb\">\n <ol class=\"breadcrumbs\" part=\"list\">\n ${itemsHtml}\n </ol>\n <slot name=\"separator\"></slot>\n </nav>\n `;\n }\n\n update(): void {\n super.update();\n\n // Attach click handlers to all breadcrumb links\n const links = this.shadowRoot?.querySelectorAll('.breadcrumb-link');\n links?.forEach((link) => {\n const index = parseInt(link.getAttribute('data-index') || '0', 10);\n const item = this.items[index];\n if (item) {\n link.addEventListener('click', (e) => this._handleClick(e, item, index));\n }\n });\n }\n}\n",
|
|
5
|
+
"/**\n * DuskMoon Breadcrumbs Element\n *\n * A hierarchical navigation breadcrumbs component for displaying the user's\n * current location within a site structure.\n *\n * @element el-dm-breadcrumbs\n *\n * @attr {string} items - JSON array of breadcrumb items [{label, href}]\n * @attr {string} separator - Separator character between items (default '/')\n *\n * @slot item - Declarative server-rendered breadcrumb item\n * @slot separator - Custom separator element to use between items\n *\n * @csspart nav - The navigation container\n * @csspart list - The ordered list element\n * @csspart item - Individual breadcrumb item container\n * @csspart link - Breadcrumb link element\n * @csspart current - Current page text (last item)\n * @csspart separator - Separator element between items\n *\n * @fires navigate - Fired when a breadcrumb link is clicked. Detail: { item, index }\n */\n\nimport { BaseElement, css } from '@duskmoon-dev/el-base';\nimport { css as navigationCSS } from '@duskmoon-dev/core/components/navigation';\n\n/**\n * Represents a single breadcrumb item\n */\nexport interface BreadcrumbItem {\n /** Display label for the breadcrumb */\n label: string;\n /** URL for the breadcrumb link (optional for last item) */\n href?: string;\n}\n\n/**\n * Event detail for the navigate event\n */\nexport interface NavigateEventDetail {\n /** The breadcrumb item that was clicked */\n item: BreadcrumbItem;\n /** The index of the clicked item */\n index: number;\n}\n\n// Strip @layer wrapper for Shadow DOM compatibility\nconst coreStyles = navigationCSS.replace(/@layer\\s+components\\s*\\{/, '').replace(/\\}\\s*$/, '');\n\nconst styles = css`\n :host {\n display: block;\n }\n\n :host([hidden]) {\n display: none !important;\n }\n\n /* Import core navigation styles */\n ${coreStyles}\n\n .breadcrumbs-nav {\n font-family: inherit;\n }\n\n /* Override core .breadcrumbs padding since we manage our own layout */\n .breadcrumbs {\n padding: 0;\n }\n\n /* Override core .breadcrumb-link with our custom colors */\n .breadcrumb-link {\n color: var(--color-primary);\n }\n\n .breadcrumb-link:hover {\n color: var(--color-primary-dark, var(--color-primary));\n }\n\n .breadcrumb-link:focus {\n outline: 2px solid var(--color-primary);\n outline-offset: 2px;\n border-radius: 2px;\n }\n\n .breadcrumb-item-active {\n color: var(--color-on-surface);\n font-size: 0.875rem;\n line-height: 1.25rem;\n }\n\n /* Hide core's separator ::before — we render separator text explicitly */\n .breadcrumb-separator::before {\n display: none;\n }\n\n .breadcrumb-separator {\n opacity: 1;\n }\n\n /* Hide slotted separator template */\n ::slotted([slot='separator']) {\n display: none;\n }\n\n ::slotted([slot='item']) {\n display: inline-flex;\n align-items: center;\n color: var(--color-primary);\n font-size: 0.875rem;\n line-height: 1.25rem;\n }\n\n ::slotted([slot='item'][aria-current='page']) {\n color: var(--color-on-surface);\n }\n`;\n\nexport class ElDmBreadcrumbs extends BaseElement {\n static properties = {\n items: { type: Array, reflect: false },\n separator: { type: String, reflect: true, default: '/' },\n };\n\n /** Array of breadcrumb items */\n declare items: BreadcrumbItem[];\n\n /** Separator character between items */\n declare separator: string;\n\n private _itemsObserver?: MutationObserver;\n\n constructor() {\n super();\n this.attachStyles(styles);\n this.items = [];\n }\n\n /**\n * Handle click on a breadcrumb link\n */\n private _handleClick(event: Event, item: BreadcrumbItem, index: number): void {\n event.preventDefault();\n\n // emit returns true if event was not cancelled\n const notCancelled = this.emit<NavigateEventDetail>('navigate', {\n item,\n index,\n });\n\n // If event was not prevented, navigate to the href\n if (notCancelled && item.href) {\n window.location.href = item.href;\n }\n }\n\n /**\n * Get the separator HTML - either from slot or default\n */\n private _getSeparatorHtml(): string {\n const slottedSeparator = this.querySelector('[slot=\"separator\"]');\n if (slottedSeparator) {\n return slottedSeparator.outerHTML.replace('slot=\"separator\"', '');\n }\n return this.separator || '/';\n }\n\n /**\n * Escape HTML special characters to prevent XSS\n */\n private _escapeHtml(text: string): string {\n const div = document.createElement('div');\n div.textContent = text;\n return div.innerHTML;\n }\n\n private _hasDeclarativeItems(): boolean {\n return this.querySelector('[slot=\"item\"]') !== null;\n }\n\n private _syncDeclarativeItems = (): void => {\n const slot = this.shadowRoot?.querySelector('slot[name=\"item\"]') as HTMLSlotElement | null;\n const items = slot?.assignedElements() ?? [];\n\n items.forEach((item, index) => {\n item.setAttribute('role', 'listitem');\n if (index === items.length - 1) {\n item.setAttribute('aria-current', 'page');\n } else {\n item.removeAttribute('aria-current');\n }\n });\n };\n\n connectedCallback(): void {\n super.connectedCallback();\n this._itemsObserver = new MutationObserver(() => this.update());\n this._itemsObserver.observe(this, {\n childList: true,\n subtree: true,\n attributes: true,\n attributeFilter: ['slot'],\n });\n }\n\n disconnectedCallback(): void {\n this._itemsObserver?.disconnect();\n super.disconnectedCallback();\n }\n\n render(): string {\n const declarativeItems = this._hasDeclarativeItems();\n const itemsArray = Array.isArray(this.items) ? this.items : [];\n const separatorHtml = this._getSeparatorHtml();\n\n const itemsHtml = itemsArray\n .map((item, index) => {\n const isLast = index === itemsArray.length - 1;\n const escapedLabel = this._escapeHtml(item.label);\n\n if (isLast) {\n // Last item is current page - not clickable\n return `\n <li class=\"breadcrumb-item\" part=\"item\">\n <span\n class=\"breadcrumb-item-active\"\n part=\"current\"\n aria-current=\"page\"\n >${escapedLabel}</span>\n </li>\n `;\n }\n\n // Regular breadcrumb link\n return `\n <li class=\"breadcrumb-item\" part=\"item\">\n <a\n class=\"breadcrumb-link\"\n part=\"link\"\n href=\"${item.href || '#'}\"\n data-index=\"${index}\"\n >${escapedLabel}</a>\n <span class=\"breadcrumb-separator\" part=\"separator\" aria-hidden=\"true\">${separatorHtml}</span>\n </li>\n `;\n })\n .join('');\n\n return `\n <nav class=\"breadcrumbs-nav\" part=\"nav\" aria-label=\"Breadcrumb\">\n <ol class=\"breadcrumbs\" part=\"list\">\n ${declarativeItems ? '<slot name=\"item\"></slot>' : itemsHtml}\n </ol>\n <slot name=\"separator\"></slot>\n </nav>\n `;\n }\n\n update(): void {\n super.update();\n\n const itemSlot = this.shadowRoot?.querySelector('slot[name=\"item\"]');\n itemSlot?.addEventListener('slotchange', this._syncDeclarativeItems);\n this._syncDeclarativeItems();\n\n if (this._hasDeclarativeItems()) return;\n\n // Attach click handlers to all breadcrumb links\n const links = this.shadowRoot?.querySelectorAll('.breadcrumb-link');\n links?.forEach((link) => {\n const index = parseInt(link.getAttribute('data-index') || '0', 10);\n const item = this.items[index];\n if (item) {\n link.addEventListener('click', (e) => this._handleClick(e, item, index));\n }\n });\n }\n}\n",
|
|
6
6
|
"/**\n * @duskmoon-dev/el-breadcrumbs\n *\n * DuskMoon Breadcrumbs custom element\n */\n\nimport { ElDmBreadcrumbs } from './el-dm-breadcrumbs.js';\n\nexport { ElDmBreadcrumbs };\nexport type { BreadcrumbItem, NavigateEventDetail } from './el-dm-breadcrumbs.js';\n\n/**\n * Register the el-dm-breadcrumbs custom element\n *\n * @example\n * ```ts\n * import { register } from '@duskmoon-dev/el-breadcrumbs';\n * register();\n * ```\n */\nexport function register(): void {\n if (!customElements.get('el-dm-breadcrumbs')) {\n customElements.define('el-dm-breadcrumbs', ElDmBreadcrumbs);\n }\n}\n",
|
|
7
7
|
"/**\n * Auto-register el-dm-breadcrumbs custom element\n *\n * @example\n * ```ts\n * import '@duskmoon-dev/el-breadcrumbs/register';\n *\n * // Now you can use <el-dm-breadcrumbs> in HTML\n * ```\n */\nimport { register } from './index.js';\n\nregister();\n"
|
|
8
8
|
],
|
|
9
|
-
"mappings": ";
|
|
10
|
-
"debugId": "
|
|
9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|
1
|
-
{"fileNames":["../../../node_modules/.bun/typescript@6.0.3/node_modules/typescript/lib/lib.es5.d.ts","../../../node_modules/.bun/typescript@6.0.3/node_modules/typescript/lib/lib.es2015.d.ts","../../../node_modules/.bun/typescript@6.0.3/node_modules/typescript/lib/lib.es2016.d.ts","../../../node_modules/.bun/typescript@6.0.3/node_modules/typescript/lib/lib.es2017.d.ts","../../../node_modules/.bun/typescript@6.0.3/node_modules/typescript/lib/lib.es2018.d.ts","../../../node_modules/.bun/typescript@6.0.3/node_modules/typescript/lib/lib.es2019.d.ts","../../../node_modules/.bun/typescript@6.0.3/node_modules/typescript/lib/lib.es2020.d.ts","../../../node_modules/.bun/typescript@6.0.3/node_modules/typescript/lib/lib.es2021.d.ts","../../../node_modules/.bun/typescript@6.0.3/node_modules/typescript/lib/lib.es2022.d.ts","../../../node_modules/.bun/typescript@6.0.3/node_modules/typescript/lib/lib.dom.d.ts","../../../node_modules/.bun/typescript@6.0.3/node_modules/typescript/lib/lib.dom.iterable.d.ts","../../../node_modules/.bun/typescript@6.0.3/node_modules/typescript/lib/lib.es2015.core.d.ts","../../../node_modules/.bun/typescript@6.0.3/node_modules/typescript/lib/lib.es2015.collection.d.ts","../../../node_modules/.bun/typescript@6.0.3/node_modules/typescript/lib/lib.es2015.generator.d.ts","../../../node_modules/.bun/typescript@6.0.3/node_modules/typescript/lib/lib.es2015.iterable.d.ts","../../../node_modules/.bun/typescript@6.0.3/node_modules/typescript/lib/lib.es2015.promise.d.ts","../../../node_modules/.bun/typescript@6.0.3/node_modules/typescript/lib/lib.es2015.proxy.d.ts","../../../node_modules/.bun/typescript@6.0.3/node_modules/typescript/lib/lib.es2015.reflect.d.ts","../../../node_modules/.bun/typescript@6.0.3/node_modules/typescript/lib/lib.es2015.symbol.d.ts","../../../node_modules/.bun/typescript@6.0.3/node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../../../node_modules/.bun/typescript@6.0.3/node_modules/typescript/lib/lib.es2016.array.include.d.ts","../../../node_modules/.bun/typescript@6.0.3/node_modules/typescript/lib/lib.es2016.intl.d.ts","../../../node_modules/.bun/typescript@6.0.3/node_modules/typescript/lib/lib.es2017.arraybuffer.d.ts","../../../node_modules/.bun/typescript@6.0.3/node_modules/typescript/lib/lib.es2017.date.d.ts","../../../node_modules/.bun/typescript@6.0.3/node_modules/typescript/lib/lib.es2017.object.d.ts","../../../node_modules/.bun/typescript@6.0.3/node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../../../node_modules/.bun/typescript@6.0.3/node_modules/typescript/lib/lib.es2017.string.d.ts","../../../node_modules/.bun/typescript@6.0.3/node_modules/typescript/lib/lib.es2017.intl.d.ts","../../../node_modules/.bun/typescript@6.0.3/node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../../../node_modules/.bun/typescript@6.0.3/node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../../../node_modules/.bun/typescript@6.0.3/node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../../../node_modules/.bun/typescript@6.0.3/node_modules/typescript/lib/lib.es2018.intl.d.ts","../../../node_modules/.bun/typescript@6.0.3/node_modules/typescript/lib/lib.es2018.promise.d.ts","../../../node_modules/.bun/typescript@6.0.3/node_modules/typescript/lib/lib.es2018.regexp.d.ts","../../../node_modules/.bun/typescript@6.0.3/node_modules/typescript/lib/lib.es2019.array.d.ts","../../../node_modules/.bun/typescript@6.0.3/node_modules/typescript/lib/lib.es2019.object.d.ts","../../../node_modules/.bun/typescript@6.0.3/node_modules/typescript/lib/lib.es2019.string.d.ts","../../../node_modules/.bun/typescript@6.0.3/node_modules/typescript/lib/lib.es2019.symbol.d.ts","../../../node_modules/.bun/typescript@6.0.3/node_modules/typescript/lib/lib.es2019.intl.d.ts","../../../node_modules/.bun/typescript@6.0.3/node_modules/typescript/lib/lib.es2020.bigint.d.ts","../../../node_modules/.bun/typescript@6.0.3/node_modules/typescript/lib/lib.es2020.date.d.ts","../../../node_modules/.bun/typescript@6.0.3/node_modules/typescript/lib/lib.es2020.promise.d.ts","../../../node_modules/.bun/typescript@6.0.3/node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","../../../node_modules/.bun/typescript@6.0.3/node_modules/typescript/lib/lib.es2020.string.d.ts","../../../node_modules/.bun/typescript@6.0.3/node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","../../../node_modules/.bun/typescript@6.0.3/node_modules/typescript/lib/lib.es2020.intl.d.ts","../../../node_modules/.bun/typescript@6.0.3/node_modules/typescript/lib/lib.es2020.number.d.ts","../../../node_modules/.bun/typescript@6.0.3/node_modules/typescript/lib/lib.es2021.promise.d.ts","../../../node_modules/.bun/typescript@6.0.3/node_modules/typescript/lib/lib.es2021.string.d.ts","../../../node_modules/.bun/typescript@6.0.3/node_modules/typescript/lib/lib.es2021.weakref.d.ts","../../../node_modules/.bun/typescript@6.0.3/node_modules/typescript/lib/lib.es2021.intl.d.ts","../../../node_modules/.bun/typescript@6.0.3/node_modules/typescript/lib/lib.es2022.array.d.ts","../../../node_modules/.bun/typescript@6.0.3/node_modules/typescript/lib/lib.es2022.error.d.ts","../../../node_modules/.bun/typescript@6.0.3/node_modules/typescript/lib/lib.es2022.intl.d.ts","../../../node_modules/.bun/typescript@6.0.3/node_modules/typescript/lib/lib.es2022.object.d.ts","../../../node_modules/.bun/typescript@6.0.3/node_modules/typescript/lib/lib.es2022.string.d.ts","../../../node_modules/.bun/typescript@6.0.3/node_modules/typescript/lib/lib.es2022.regexp.d.ts","../../../node_modules/.bun/typescript@6.0.3/node_modules/typescript/lib/lib.decorators.d.ts","../../../node_modules/.bun/typescript@6.0.3/node_modules/typescript/lib/lib.decorators.legacy.d.ts","../src/duskmoon-core.d.ts","../../../packages/base/dist/types/base-element.d.ts","../../../packages/base/dist/types/styles.d.ts","../../../packages/base/dist/types/animations.d.ts","../../../packages/base/dist/types/themes.d.ts","../../../packages/base/dist/types/mixins.d.ts","../../../packages/base/dist/types/types.d.ts","../../../packages/base/dist/types/validation.d.ts","../../../packages/base/dist/types/performance.d.ts","../../../packages/base/dist/types/index.d.ts","../src/el-dm-breadcrumbs.ts","../src/index.ts","../src/register.ts"],"fileIdsList":[[60,69],[70],[71],[61,62,63,64,65,66,67,68],[61],[66]],"fileInfos":[{"version":"bcd24271a113971ba9eb71ff8cb01bc6b0f872a85c23fdbe5d93065b375933cd","affectsGlobalScope":true,"impliedFormat":1},{"version":"3f88bedbeb09c6f5a6645cb24c7c55f1aa22d19ae96c8e6959cbd8b85a707bc6","impliedFormat":1},{"version":"7fe93b39b810eadd916be8db880dd7f0f7012a5cc6ffb62de8f62a2117fa6f1f","impliedFormat":1},{"version":"bb0074cc08b84a2374af33d8bf044b80851ccc9e719a5e202eacf40db2c31600","impliedFormat":1},{"version":"1a7daebe4f45fb03d9ec53d60008fbf9ac45a697fdc89e4ce218bc94b94f94d6","impliedFormat":1},{"version":"f94b133a3cb14a288803be545ac2683e0d0ff6661bcd37e31aaaec54fc382aed","impliedFormat":1},{"version":"f59d0650799f8782fd74cf73c19223730c6d1b9198671b1c5b3a38e1188b5953","impliedFormat":1},{"version":"8a15b4607d9a499e2dbeed9ec0d3c0d7372c850b2d5f1fb259e8f6d41d468a84","impliedFormat":1},{"version":"26e0fe14baee4e127f4365d1ae0b276f400562e45e19e35fd2d4c296684715e6","impliedFormat":1},{"version":"d6b1eba8496bdd0eed6fc8a685768fe01b2da4a0388b5fe7df558290bffcf32f","affectsGlobalScope":true,"impliedFormat":1},{"version":"7f57fc4404ff020bc45b9c620aff2b40f700b95fe31164024c453a5e3c163c54","impliedFormat":1},{"version":"eadcffda2aa84802c73938e589b9e58248d74c59cb7fcbca6474e3435ac15504","affectsGlobalScope":true,"impliedFormat":1},{"version":"105ba8ff7ba746404fe1a2e189d1d3d2e0eb29a08c18dded791af02f29fb4711","affectsGlobalScope":true,"impliedFormat":1},{"version":"00343ca5b2e3d48fa5df1db6e32ea2a59afab09590274a6cccb1dbae82e60c7c","affectsGlobalScope":true,"impliedFormat":1},{"version":"ebd9f816d4002697cb2864bea1f0b70a103124e18a8cd9645eeccc09bdf80ab4","affectsGlobalScope":true,"impliedFormat":1},{"version":"2c1afac30a01772cd2a9a298a7ce7706b5892e447bb46bdbeef720f7b5da77ad","affectsGlobalScope":true,"impliedFormat":1},{"version":"7b0225f483e4fa685625ebe43dd584bb7973bbd84e66a6ba7bbe175ee1048b4f","affectsGlobalScope":true,"impliedFormat":1},{"version":"c0a4b8ac6ce74679c1da2b3795296f5896e31c38e888469a8e0f99dc3305de60","affectsGlobalScope":true,"impliedFormat":1},{"version":"3084a7b5f569088e0146533a00830e206565de65cae2239509168b11434cd84f","affectsGlobalScope":true,"impliedFormat":1},{"version":"c5079c53f0f141a0698faa903e76cb41cd664e3efb01cc17a5c46ec2eb0bef42","affectsGlobalScope":true,"impliedFormat":1},{"version":"32cafbc484dea6b0ab62cf8473182bbcb23020d70845b406f80b7526f38ae862","affectsGlobalScope":true,"impliedFormat":1},{"version":"fca4cdcb6d6c5ef18a869003d02c9f0fd95df8cfaf6eb431cd3376bc034cad36","affectsGlobalScope":true,"impliedFormat":1},{"version":"b93ec88115de9a9dc1b602291b85baf825c85666bf25985cc5f698073892b467","affectsGlobalScope":true,"impliedFormat":1},{"version":"f5c06dcc3fe849fcb297c247865a161f995cc29de7aa823afdd75aaaddc1419b","affectsGlobalScope":true,"impliedFormat":1},{"version":"b77e16112127a4b169ef0b8c3a4d730edf459c5f25fe52d5e436a6919206c4d7","affectsGlobalScope":true,"impliedFormat":1},{"version":"fbffd9337146eff822c7c00acbb78b01ea7ea23987f6c961eba689349e744f8c","affectsGlobalScope":true,"impliedFormat":1},{"version":"a995c0e49b721312f74fdfb89e4ba29bd9824c770bbb4021d74d2bf560e4c6bd","affectsGlobalScope":true,"impliedFormat":1},{"version":"c7b3542146734342e440a84b213384bfa188835537ddbda50d30766f0593aff9","affectsGlobalScope":true,"impliedFormat":1},{"version":"ce6180fa19b1cccd07ee7f7dbb9a367ac19c0ed160573e4686425060b6df7f57","affectsGlobalScope":true,"impliedFormat":1},{"version":"3f02e2476bccb9dbe21280d6090f0df17d2f66b74711489415a8aa4df73c9675","affectsGlobalScope":true,"impliedFormat":1},{"version":"45e3ab34c1c013c8ab2dc1ba4c80c780744b13b5676800ae2e3be27ae862c40c","affectsGlobalScope":true,"impliedFormat":1},{"version":"805c86f6cca8d7702a62a844856dbaa2a3fd2abef0536e65d48732441dde5b5b","affectsGlobalScope":true,"impliedFormat":1},{"version":"e42e397f1a5a77994f0185fd1466520691456c772d06bf843e5084ceb879a0ad","affectsGlobalScope":true,"impliedFormat":1},{"version":"f4c2b41f90c95b1c532ecc874bd3c111865793b23aebcc1c3cbbabcd5d76ffb0","affectsGlobalScope":true,"impliedFormat":1},{"version":"ab26191cfad5b66afa11b8bf935ef1cd88fabfcb28d30b2dfa6fad877d050332","affectsGlobalScope":true,"impliedFormat":1},{"version":"2088bc26531e38fb05eedac2951480db5309f6be3fa4a08d2221abb0f5b4200d","affectsGlobalScope":true,"impliedFormat":1},{"version":"cb9d366c425fea79716a8fb3af0d78e6b22ebbab3bd64d25063b42dc9f531c1e","affectsGlobalScope":true,"impliedFormat":1},{"version":"500934a8089c26d57ebdb688fc9757389bb6207a3c8f0674d68efa900d2abb34","affectsGlobalScope":true,"impliedFormat":1},{"version":"689da16f46e647cef0d64b0def88910e818a5877ca5379ede156ca3afb780ac3","affectsGlobalScope":true,"impliedFormat":1},{"version":"bc21cc8b6fee4f4c2440d08035b7ea3c06b3511314c8bab6bef7a92de58a2593","affectsGlobalScope":true,"impliedFormat":1},{"version":"7ca53d13d2957003abb47922a71866ba7cb2068f8d154877c596d63c359fed25","affectsGlobalScope":true,"impliedFormat":1},{"version":"54725f8c4df3d900cb4dac84b64689ce29548da0b4e9b7c2de61d41c79293611","affectsGlobalScope":true,"impliedFormat":1},{"version":"e5594bc3076ac29e6c1ebda77939bc4c8833de72f654b6e376862c0473199323","affectsGlobalScope":true,"impliedFormat":1},{"version":"2f3eb332c2d73e729f3364fcc0c2b375e72a121e8157d25a82d67a138c83a95c","affectsGlobalScope":true,"impliedFormat":1},{"version":"6f4427f9642ce8d500970e4e69d1397f64072ab73b97e476b4002a646ac743b1","affectsGlobalScope":true,"impliedFormat":1},{"version":"48915f327cd1dea4d7bd358d9dc7732f58f9e1626a29cc0c05c8c692419d9bb7","affectsGlobalScope":true,"impliedFormat":1},{"version":"b7bf9377723203b5a6a4b920164df22d56a43f593269ba6ae1fdc97774b68855","affectsGlobalScope":true,"impliedFormat":1},{"version":"db9709688f82c9e5f65a119c64d835f906efe5f559d08b11642d56eb85b79357","affectsGlobalScope":true,"impliedFormat":1},{"version":"4b25b8c874acd1a4cf8444c3617e037d444d19080ac9f634b405583fd10ce1f7","affectsGlobalScope":true,"impliedFormat":1},{"version":"37be57d7c90cf1f8112ee2636a068d8fd181289f82b744160ec56a7dc158a9f5","affectsGlobalScope":true,"impliedFormat":1},{"version":"a917a49ac94cd26b754ab84e113369a75d1a47a710661d7cd25e961cc797065f","affectsGlobalScope":true,"impliedFormat":1},{"version":"6d3261badeb7843d157ef3e6f5d1427d0eeb0af0cf9df84a62cfd29fd47ac86e","affectsGlobalScope":true,"impliedFormat":1},{"version":"195daca651dde22f2167ac0d0a05e215308119a3100f5e6268e8317d05a92526","affectsGlobalScope":true,"impliedFormat":1},{"version":"8b11e4285cd2bb164a4dc09248bdec69e9842517db4ca47c1ba913011e44ff2f","affectsGlobalScope":true,"impliedFormat":1},{"version":"0508571a52475e245b02bc50fa1394065a0a3d05277fbf5120c3784b85651799","affectsGlobalScope":true,"impliedFormat":1},{"version":"8f9af488f510c3015af3cc8c267a9e9d96c4dd38a1fdff0e11dc5a544711415b","affectsGlobalScope":true,"impliedFormat":1},{"version":"fc611fea8d30ea72c6bbfb599c9b4d393ce22e2f5bfef2172534781e7d138104","affectsGlobalScope":true,"impliedFormat":1},{"version":"1ce14b81c5cc821994aa8ec1d42b220dd41b27fcc06373bce3958af7421b77d4","affectsGlobalScope":true,"impliedFormat":1},{"version":"b3a048b3e9302ef9a34ef4ebb9aecfb28b66abb3bce577206a79fee559c230da","affectsGlobalScope":true,"impliedFormat":1},"a4ed29835008d94d5772bba39627757d60f4e645d5b2e8aac0a16918a4697cda","42526b6de804c10fd86f1cf55a6c660a74ee448e381f0f78356f223b75982280","28914adcfb92fa94199e1c887da7d67a7d9d736d9571627d6b02e55ff82f577b","b0a69607a92876948c2a42e3aa6703b0d724699468ed7e3c6e2a237d119a9db9","cdacb8e4ac607a46494d1187e073382c43e7269e8bf698502a285a8ccb470925","f5091ebbd718ea236a7f503df569deb07aff0621aa8f73ed90e419de88f006aa","d3a328c0eccf652bc8b6c14515a8b848a558b9d684e15a7c0c2e15de5016df57","1b5193795ee478857bf1115fed004151284dd4da883a5a4f22e62631c3b414ad","3be01044afc63501423c361deb531d3e95f5c2677f1f7a628802bd346988d62c","78d8d1ca7d54a437702c8a8c08764b6a49f2cf2ca357d0e459bfe89a06abf50a",{"version":"e54291496825c662ed54baedcf8d8dbc5c6420f8b45982d9400a4794b6c9eb31","signature":"7c99bb78cf79241658fe6c16167c167f74a4500de45d681d1114d684f956ee89"},{"version":"f99a79385a98123cab90100ca7b831c910fa655b8dc8a8ecada7ced1c98dde7d","signature":"00e9e25d6ce75973373834f8a4ea6cb9e175869f88126eef20eca3b5fe230e8e"},{"version":"887c5201c509f0e4b8d6c51f90704f510fb72388f0bf7c950a302dd83c214d07","signature":"8e609bb71c20b858c77f0e9f90bb1319db8477b13f9f965f1a1e18524bf50881"}],"root":[60,[70,72]],"options":{"composite":true,"declaration":true,"declarationMap":true,"emitDeclarationOnly":true,"esModuleInterop":true,"module":99,"outDir":"./types","rootDir":"../src","skipLibCheck":true,"sourceMap":true,"strict":true,"target":9},"referencedMap":[[70,1],[71,2],[72,3],[69,4],[65,5],[67,6]],"latestChangedDtsFile":"./types/register.d.ts","version":"6.0.3"}
|
|
1
|
+
{"fileNames":["../../../node_modules/.bun/typescript@6.0.3/node_modules/typescript/lib/lib.es5.d.ts","../../../node_modules/.bun/typescript@6.0.3/node_modules/typescript/lib/lib.es2015.d.ts","../../../node_modules/.bun/typescript@6.0.3/node_modules/typescript/lib/lib.es2016.d.ts","../../../node_modules/.bun/typescript@6.0.3/node_modules/typescript/lib/lib.es2017.d.ts","../../../node_modules/.bun/typescript@6.0.3/node_modules/typescript/lib/lib.es2018.d.ts","../../../node_modules/.bun/typescript@6.0.3/node_modules/typescript/lib/lib.es2019.d.ts","../../../node_modules/.bun/typescript@6.0.3/node_modules/typescript/lib/lib.es2020.d.ts","../../../node_modules/.bun/typescript@6.0.3/node_modules/typescript/lib/lib.es2021.d.ts","../../../node_modules/.bun/typescript@6.0.3/node_modules/typescript/lib/lib.es2022.d.ts","../../../node_modules/.bun/typescript@6.0.3/node_modules/typescript/lib/lib.dom.d.ts","../../../node_modules/.bun/typescript@6.0.3/node_modules/typescript/lib/lib.dom.iterable.d.ts","../../../node_modules/.bun/typescript@6.0.3/node_modules/typescript/lib/lib.es2015.core.d.ts","../../../node_modules/.bun/typescript@6.0.3/node_modules/typescript/lib/lib.es2015.collection.d.ts","../../../node_modules/.bun/typescript@6.0.3/node_modules/typescript/lib/lib.es2015.generator.d.ts","../../../node_modules/.bun/typescript@6.0.3/node_modules/typescript/lib/lib.es2015.iterable.d.ts","../../../node_modules/.bun/typescript@6.0.3/node_modules/typescript/lib/lib.es2015.promise.d.ts","../../../node_modules/.bun/typescript@6.0.3/node_modules/typescript/lib/lib.es2015.proxy.d.ts","../../../node_modules/.bun/typescript@6.0.3/node_modules/typescript/lib/lib.es2015.reflect.d.ts","../../../node_modules/.bun/typescript@6.0.3/node_modules/typescript/lib/lib.es2015.symbol.d.ts","../../../node_modules/.bun/typescript@6.0.3/node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../../../node_modules/.bun/typescript@6.0.3/node_modules/typescript/lib/lib.es2016.array.include.d.ts","../../../node_modules/.bun/typescript@6.0.3/node_modules/typescript/lib/lib.es2016.intl.d.ts","../../../node_modules/.bun/typescript@6.0.3/node_modules/typescript/lib/lib.es2017.arraybuffer.d.ts","../../../node_modules/.bun/typescript@6.0.3/node_modules/typescript/lib/lib.es2017.date.d.ts","../../../node_modules/.bun/typescript@6.0.3/node_modules/typescript/lib/lib.es2017.object.d.ts","../../../node_modules/.bun/typescript@6.0.3/node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../../../node_modules/.bun/typescript@6.0.3/node_modules/typescript/lib/lib.es2017.string.d.ts","../../../node_modules/.bun/typescript@6.0.3/node_modules/typescript/lib/lib.es2017.intl.d.ts","../../../node_modules/.bun/typescript@6.0.3/node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../../../node_modules/.bun/typescript@6.0.3/node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../../../node_modules/.bun/typescript@6.0.3/node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../../../node_modules/.bun/typescript@6.0.3/node_modules/typescript/lib/lib.es2018.intl.d.ts","../../../node_modules/.bun/typescript@6.0.3/node_modules/typescript/lib/lib.es2018.promise.d.ts","../../../node_modules/.bun/typescript@6.0.3/node_modules/typescript/lib/lib.es2018.regexp.d.ts","../../../node_modules/.bun/typescript@6.0.3/node_modules/typescript/lib/lib.es2019.array.d.ts","../../../node_modules/.bun/typescript@6.0.3/node_modules/typescript/lib/lib.es2019.object.d.ts","../../../node_modules/.bun/typescript@6.0.3/node_modules/typescript/lib/lib.es2019.string.d.ts","../../../node_modules/.bun/typescript@6.0.3/node_modules/typescript/lib/lib.es2019.symbol.d.ts","../../../node_modules/.bun/typescript@6.0.3/node_modules/typescript/lib/lib.es2019.intl.d.ts","../../../node_modules/.bun/typescript@6.0.3/node_modules/typescript/lib/lib.es2020.bigint.d.ts","../../../node_modules/.bun/typescript@6.0.3/node_modules/typescript/lib/lib.es2020.date.d.ts","../../../node_modules/.bun/typescript@6.0.3/node_modules/typescript/lib/lib.es2020.promise.d.ts","../../../node_modules/.bun/typescript@6.0.3/node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","../../../node_modules/.bun/typescript@6.0.3/node_modules/typescript/lib/lib.es2020.string.d.ts","../../../node_modules/.bun/typescript@6.0.3/node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","../../../node_modules/.bun/typescript@6.0.3/node_modules/typescript/lib/lib.es2020.intl.d.ts","../../../node_modules/.bun/typescript@6.0.3/node_modules/typescript/lib/lib.es2020.number.d.ts","../../../node_modules/.bun/typescript@6.0.3/node_modules/typescript/lib/lib.es2021.promise.d.ts","../../../node_modules/.bun/typescript@6.0.3/node_modules/typescript/lib/lib.es2021.string.d.ts","../../../node_modules/.bun/typescript@6.0.3/node_modules/typescript/lib/lib.es2021.weakref.d.ts","../../../node_modules/.bun/typescript@6.0.3/node_modules/typescript/lib/lib.es2021.intl.d.ts","../../../node_modules/.bun/typescript@6.0.3/node_modules/typescript/lib/lib.es2022.array.d.ts","../../../node_modules/.bun/typescript@6.0.3/node_modules/typescript/lib/lib.es2022.error.d.ts","../../../node_modules/.bun/typescript@6.0.3/node_modules/typescript/lib/lib.es2022.intl.d.ts","../../../node_modules/.bun/typescript@6.0.3/node_modules/typescript/lib/lib.es2022.object.d.ts","../../../node_modules/.bun/typescript@6.0.3/node_modules/typescript/lib/lib.es2022.string.d.ts","../../../node_modules/.bun/typescript@6.0.3/node_modules/typescript/lib/lib.es2022.regexp.d.ts","../../../node_modules/.bun/typescript@6.0.3/node_modules/typescript/lib/lib.decorators.d.ts","../../../node_modules/.bun/typescript@6.0.3/node_modules/typescript/lib/lib.decorators.legacy.d.ts","../src/duskmoon-core.d.ts","../../../packages/base/dist/types/base-element.d.ts","../../../packages/base/dist/types/styles.d.ts","../../../packages/base/dist/types/animations.d.ts","../../../packages/base/dist/types/themes.d.ts","../../../packages/base/dist/types/mixins.d.ts","../../../packages/base/dist/types/types.d.ts","../../../packages/base/dist/types/validation.d.ts","../../../packages/base/dist/types/performance.d.ts","../../../packages/base/dist/types/index.d.ts","../src/el-dm-breadcrumbs.ts","../src/index.ts","../src/register.ts"],"fileIdsList":[[60,69],[70],[71],[61,62,63,64,65,66,67,68],[61],[66]],"fileInfos":[{"version":"bcd24271a113971ba9eb71ff8cb01bc6b0f872a85c23fdbe5d93065b375933cd","affectsGlobalScope":true,"impliedFormat":1},{"version":"3f88bedbeb09c6f5a6645cb24c7c55f1aa22d19ae96c8e6959cbd8b85a707bc6","impliedFormat":1},{"version":"7fe93b39b810eadd916be8db880dd7f0f7012a5cc6ffb62de8f62a2117fa6f1f","impliedFormat":1},{"version":"bb0074cc08b84a2374af33d8bf044b80851ccc9e719a5e202eacf40db2c31600","impliedFormat":1},{"version":"1a7daebe4f45fb03d9ec53d60008fbf9ac45a697fdc89e4ce218bc94b94f94d6","impliedFormat":1},{"version":"f94b133a3cb14a288803be545ac2683e0d0ff6661bcd37e31aaaec54fc382aed","impliedFormat":1},{"version":"f59d0650799f8782fd74cf73c19223730c6d1b9198671b1c5b3a38e1188b5953","impliedFormat":1},{"version":"8a15b4607d9a499e2dbeed9ec0d3c0d7372c850b2d5f1fb259e8f6d41d468a84","impliedFormat":1},{"version":"26e0fe14baee4e127f4365d1ae0b276f400562e45e19e35fd2d4c296684715e6","impliedFormat":1},{"version":"d6b1eba8496bdd0eed6fc8a685768fe01b2da4a0388b5fe7df558290bffcf32f","affectsGlobalScope":true,"impliedFormat":1},{"version":"7f57fc4404ff020bc45b9c620aff2b40f700b95fe31164024c453a5e3c163c54","impliedFormat":1},{"version":"eadcffda2aa84802c73938e589b9e58248d74c59cb7fcbca6474e3435ac15504","affectsGlobalScope":true,"impliedFormat":1},{"version":"105ba8ff7ba746404fe1a2e189d1d3d2e0eb29a08c18dded791af02f29fb4711","affectsGlobalScope":true,"impliedFormat":1},{"version":"00343ca5b2e3d48fa5df1db6e32ea2a59afab09590274a6cccb1dbae82e60c7c","affectsGlobalScope":true,"impliedFormat":1},{"version":"ebd9f816d4002697cb2864bea1f0b70a103124e18a8cd9645eeccc09bdf80ab4","affectsGlobalScope":true,"impliedFormat":1},{"version":"2c1afac30a01772cd2a9a298a7ce7706b5892e447bb46bdbeef720f7b5da77ad","affectsGlobalScope":true,"impliedFormat":1},{"version":"7b0225f483e4fa685625ebe43dd584bb7973bbd84e66a6ba7bbe175ee1048b4f","affectsGlobalScope":true,"impliedFormat":1},{"version":"c0a4b8ac6ce74679c1da2b3795296f5896e31c38e888469a8e0f99dc3305de60","affectsGlobalScope":true,"impliedFormat":1},{"version":"3084a7b5f569088e0146533a00830e206565de65cae2239509168b11434cd84f","affectsGlobalScope":true,"impliedFormat":1},{"version":"c5079c53f0f141a0698faa903e76cb41cd664e3efb01cc17a5c46ec2eb0bef42","affectsGlobalScope":true,"impliedFormat":1},{"version":"32cafbc484dea6b0ab62cf8473182bbcb23020d70845b406f80b7526f38ae862","affectsGlobalScope":true,"impliedFormat":1},{"version":"fca4cdcb6d6c5ef18a869003d02c9f0fd95df8cfaf6eb431cd3376bc034cad36","affectsGlobalScope":true,"impliedFormat":1},{"version":"b93ec88115de9a9dc1b602291b85baf825c85666bf25985cc5f698073892b467","affectsGlobalScope":true,"impliedFormat":1},{"version":"f5c06dcc3fe849fcb297c247865a161f995cc29de7aa823afdd75aaaddc1419b","affectsGlobalScope":true,"impliedFormat":1},{"version":"b77e16112127a4b169ef0b8c3a4d730edf459c5f25fe52d5e436a6919206c4d7","affectsGlobalScope":true,"impliedFormat":1},{"version":"fbffd9337146eff822c7c00acbb78b01ea7ea23987f6c961eba689349e744f8c","affectsGlobalScope":true,"impliedFormat":1},{"version":"a995c0e49b721312f74fdfb89e4ba29bd9824c770bbb4021d74d2bf560e4c6bd","affectsGlobalScope":true,"impliedFormat":1},{"version":"c7b3542146734342e440a84b213384bfa188835537ddbda50d30766f0593aff9","affectsGlobalScope":true,"impliedFormat":1},{"version":"ce6180fa19b1cccd07ee7f7dbb9a367ac19c0ed160573e4686425060b6df7f57","affectsGlobalScope":true,"impliedFormat":1},{"version":"3f02e2476bccb9dbe21280d6090f0df17d2f66b74711489415a8aa4df73c9675","affectsGlobalScope":true,"impliedFormat":1},{"version":"45e3ab34c1c013c8ab2dc1ba4c80c780744b13b5676800ae2e3be27ae862c40c","affectsGlobalScope":true,"impliedFormat":1},{"version":"805c86f6cca8d7702a62a844856dbaa2a3fd2abef0536e65d48732441dde5b5b","affectsGlobalScope":true,"impliedFormat":1},{"version":"e42e397f1a5a77994f0185fd1466520691456c772d06bf843e5084ceb879a0ad","affectsGlobalScope":true,"impliedFormat":1},{"version":"f4c2b41f90c95b1c532ecc874bd3c111865793b23aebcc1c3cbbabcd5d76ffb0","affectsGlobalScope":true,"impliedFormat":1},{"version":"ab26191cfad5b66afa11b8bf935ef1cd88fabfcb28d30b2dfa6fad877d050332","affectsGlobalScope":true,"impliedFormat":1},{"version":"2088bc26531e38fb05eedac2951480db5309f6be3fa4a08d2221abb0f5b4200d","affectsGlobalScope":true,"impliedFormat":1},{"version":"cb9d366c425fea79716a8fb3af0d78e6b22ebbab3bd64d25063b42dc9f531c1e","affectsGlobalScope":true,"impliedFormat":1},{"version":"500934a8089c26d57ebdb688fc9757389bb6207a3c8f0674d68efa900d2abb34","affectsGlobalScope":true,"impliedFormat":1},{"version":"689da16f46e647cef0d64b0def88910e818a5877ca5379ede156ca3afb780ac3","affectsGlobalScope":true,"impliedFormat":1},{"version":"bc21cc8b6fee4f4c2440d08035b7ea3c06b3511314c8bab6bef7a92de58a2593","affectsGlobalScope":true,"impliedFormat":1},{"version":"7ca53d13d2957003abb47922a71866ba7cb2068f8d154877c596d63c359fed25","affectsGlobalScope":true,"impliedFormat":1},{"version":"54725f8c4df3d900cb4dac84b64689ce29548da0b4e9b7c2de61d41c79293611","affectsGlobalScope":true,"impliedFormat":1},{"version":"e5594bc3076ac29e6c1ebda77939bc4c8833de72f654b6e376862c0473199323","affectsGlobalScope":true,"impliedFormat":1},{"version":"2f3eb332c2d73e729f3364fcc0c2b375e72a121e8157d25a82d67a138c83a95c","affectsGlobalScope":true,"impliedFormat":1},{"version":"6f4427f9642ce8d500970e4e69d1397f64072ab73b97e476b4002a646ac743b1","affectsGlobalScope":true,"impliedFormat":1},{"version":"48915f327cd1dea4d7bd358d9dc7732f58f9e1626a29cc0c05c8c692419d9bb7","affectsGlobalScope":true,"impliedFormat":1},{"version":"b7bf9377723203b5a6a4b920164df22d56a43f593269ba6ae1fdc97774b68855","affectsGlobalScope":true,"impliedFormat":1},{"version":"db9709688f82c9e5f65a119c64d835f906efe5f559d08b11642d56eb85b79357","affectsGlobalScope":true,"impliedFormat":1},{"version":"4b25b8c874acd1a4cf8444c3617e037d444d19080ac9f634b405583fd10ce1f7","affectsGlobalScope":true,"impliedFormat":1},{"version":"37be57d7c90cf1f8112ee2636a068d8fd181289f82b744160ec56a7dc158a9f5","affectsGlobalScope":true,"impliedFormat":1},{"version":"a917a49ac94cd26b754ab84e113369a75d1a47a710661d7cd25e961cc797065f","affectsGlobalScope":true,"impliedFormat":1},{"version":"6d3261badeb7843d157ef3e6f5d1427d0eeb0af0cf9df84a62cfd29fd47ac86e","affectsGlobalScope":true,"impliedFormat":1},{"version":"195daca651dde22f2167ac0d0a05e215308119a3100f5e6268e8317d05a92526","affectsGlobalScope":true,"impliedFormat":1},{"version":"8b11e4285cd2bb164a4dc09248bdec69e9842517db4ca47c1ba913011e44ff2f","affectsGlobalScope":true,"impliedFormat":1},{"version":"0508571a52475e245b02bc50fa1394065a0a3d05277fbf5120c3784b85651799","affectsGlobalScope":true,"impliedFormat":1},{"version":"8f9af488f510c3015af3cc8c267a9e9d96c4dd38a1fdff0e11dc5a544711415b","affectsGlobalScope":true,"impliedFormat":1},{"version":"fc611fea8d30ea72c6bbfb599c9b4d393ce22e2f5bfef2172534781e7d138104","affectsGlobalScope":true,"impliedFormat":1},{"version":"1ce14b81c5cc821994aa8ec1d42b220dd41b27fcc06373bce3958af7421b77d4","affectsGlobalScope":true,"impliedFormat":1},{"version":"b3a048b3e9302ef9a34ef4ebb9aecfb28b66abb3bce577206a79fee559c230da","affectsGlobalScope":true,"impliedFormat":1},"a4ed29835008d94d5772bba39627757d60f4e645d5b2e8aac0a16918a4697cda","42526b6de804c10fd86f1cf55a6c660a74ee448e381f0f78356f223b75982280","28914adcfb92fa94199e1c887da7d67a7d9d736d9571627d6b02e55ff82f577b","b0a69607a92876948c2a42e3aa6703b0d724699468ed7e3c6e2a237d119a9db9","cdacb8e4ac607a46494d1187e073382c43e7269e8bf698502a285a8ccb470925","f5091ebbd718ea236a7f503df569deb07aff0621aa8f73ed90e419de88f006aa","d3a328c0eccf652bc8b6c14515a8b848a558b9d684e15a7c0c2e15de5016df57","1b5193795ee478857bf1115fed004151284dd4da883a5a4f22e62631c3b414ad","3be01044afc63501423c361deb531d3e95f5c2677f1f7a628802bd346988d62c","78d8d1ca7d54a437702c8a8c08764b6a49f2cf2ca357d0e459bfe89a06abf50a",{"version":"2400957113740deebef88bb5c54e05e0364ae03b9badf1cf0850575bfceabc64","signature":"16d6e02c2993472617845bf64ae4776abe80b596bdcf73f10bec56c6cc73a917"},{"version":"f99a79385a98123cab90100ca7b831c910fa655b8dc8a8ecada7ced1c98dde7d","signature":"00e9e25d6ce75973373834f8a4ea6cb9e175869f88126eef20eca3b5fe230e8e"},{"version":"887c5201c509f0e4b8d6c51f90704f510fb72388f0bf7c950a302dd83c214d07","signature":"8e609bb71c20b858c77f0e9f90bb1319db8477b13f9f965f1a1e18524bf50881"}],"root":[60,[70,72]],"options":{"composite":true,"declaration":true,"declarationMap":true,"emitDeclarationOnly":true,"esModuleInterop":true,"module":99,"outDir":"./types","rootDir":"../src","skipLibCheck":true,"sourceMap":true,"strict":true,"target":9},"referencedMap":[[70,1],[71,2],[72,3],[69,4],[65,5],[67,6]],"latestChangedDtsFile":"./types/register.d.ts","version":"6.0.3"}
|
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
* @attr {string} items - JSON array of breadcrumb items [{label, href}]
|
|
10
10
|
* @attr {string} separator - Separator character between items (default '/')
|
|
11
11
|
*
|
|
12
|
+
* @slot item - Declarative server-rendered breadcrumb item
|
|
12
13
|
* @slot separator - Custom separator element to use between items
|
|
13
14
|
*
|
|
14
15
|
* @csspart nav - The navigation container
|
|
@@ -55,6 +56,7 @@ export declare class ElDmBreadcrumbs extends BaseElement {
|
|
|
55
56
|
items: BreadcrumbItem[];
|
|
56
57
|
/** Separator character between items */
|
|
57
58
|
separator: string;
|
|
59
|
+
private _itemsObserver?;
|
|
58
60
|
constructor();
|
|
59
61
|
/**
|
|
60
62
|
* Handle click on a breadcrumb link
|
|
@@ -68,6 +70,10 @@ export declare class ElDmBreadcrumbs extends BaseElement {
|
|
|
68
70
|
* Escape HTML special characters to prevent XSS
|
|
69
71
|
*/
|
|
70
72
|
private _escapeHtml;
|
|
73
|
+
private _hasDeclarativeItems;
|
|
74
|
+
private _syncDeclarativeItems;
|
|
75
|
+
connectedCallback(): void;
|
|
76
|
+
disconnectedCallback(): void;
|
|
71
77
|
render(): string;
|
|
72
78
|
update(): void;
|
|
73
79
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"el-dm-breadcrumbs.d.ts","sourceRoot":"","sources":["../../src/el-dm-breadcrumbs.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"el-dm-breadcrumbs.d.ts","sourceRoot":"","sources":["../../src/el-dm-breadcrumbs.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH,OAAO,EAAE,WAAW,EAAO,MAAM,uBAAuB,CAAC;AAGzD;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B,uCAAuC;IACvC,KAAK,EAAE,MAAM,CAAC;IACd,2DAA2D;IAC3D,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAClC,2CAA2C;IAC3C,IAAI,EAAE,cAAc,CAAC;IACrB,oCAAoC;IACpC,KAAK,EAAE,MAAM,CAAC;CACf;AA0ED,qBAAa,eAAgB,SAAQ,WAAW;IAC9C,MAAM,CAAC,UAAU;;;;;;;;;;MAGf;IAEF,gCAAgC;IACxB,KAAK,EAAE,cAAc,EAAE,CAAC;IAEhC,wCAAwC;IAChC,SAAS,EAAE,MAAM,CAAC;IAE1B,OAAO,CAAC,cAAc,CAAC,CAAmB;;IAQ1C;;OAEG;IACH,OAAO,CAAC,YAAY;IAepB;;OAEG;IACH,OAAO,CAAC,iBAAiB;IAQzB;;OAEG;IACH,OAAO,CAAC,WAAW;IAMnB,OAAO,CAAC,oBAAoB;IAI5B,OAAO,CAAC,qBAAqB,CAY3B;IAEF,iBAAiB,IAAI,IAAI;IAWzB,oBAAoB,IAAI,IAAI;IAK5B,MAAM,IAAI,MAAM;IAgDhB,MAAM,IAAI,IAAI;CAmBf"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@duskmoon-dev/el-breadcrumbs",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.6.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/cjs/index.js",
|
|
6
6
|
"module": "./dist/esm/index.js",
|
|
@@ -39,11 +39,11 @@
|
|
|
39
39
|
"release:dry-run": "bun publish --dry-run"
|
|
40
40
|
},
|
|
41
41
|
"dependencies": {
|
|
42
|
-
"@duskmoon-dev/el-base": "1.
|
|
43
|
-
"@duskmoon-dev/core": "1.17.
|
|
42
|
+
"@duskmoon-dev/el-base": "1.6.0",
|
|
43
|
+
"@duskmoon-dev/core": "1.17.2"
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|
|
46
|
-
"typescript": "
|
|
46
|
+
"typescript": "6.0.3"
|
|
47
47
|
},
|
|
48
48
|
"publishConfig": {
|
|
49
49
|
"access": "public"
|