@majeanson/lac 3.4.2 → 3.4.4
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/index.mjs +19 -8
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -21014,10 +21014,10 @@ function generateUserGuide(features, projectName) {
|
|
|
21014
21014
|
const draftCount = pages.filter((p) => p.feature.status === "draft").length;
|
|
21015
21015
|
const skippedCount = features.length - guideFeatures.length;
|
|
21016
21016
|
function navItem(p) {
|
|
21017
|
-
return `<
|
|
21017
|
+
return `<a class="nav-item" data-id="${esc(p.id)}" href="#${esc(p.id)}">
|
|
21018
21018
|
<div class="nav-item-dot ${esc(p.feature.status)}"></div>
|
|
21019
21019
|
<span class="nav-item-name">${esc(p.feature.title)}</span>
|
|
21020
|
-
</
|
|
21020
|
+
</a>`;
|
|
21021
21021
|
}
|
|
21022
21022
|
const navGroupsHtml = domainOrder.map((domain) => {
|
|
21023
21023
|
const domainPages = pages.filter((p) => p.domain === domain);
|
|
@@ -21034,13 +21034,13 @@ function generateUserGuide(features, projectName) {
|
|
|
21034
21034
|
</div>
|
|
21035
21035
|
</div>`;
|
|
21036
21036
|
}).join("\n ");
|
|
21037
|
-
const tocCardsHtml = pages.map((p) => `<
|
|
21037
|
+
const tocCardsHtml = pages.map((p) => `<a class="toc-card" href="#${esc(p.id)}">
|
|
21038
21038
|
<div class="toc-pip" style="background:${p.color}"></div>
|
|
21039
21039
|
<div>
|
|
21040
21040
|
<div class="toc-card-title">${esc(p.feature.title)}</div>
|
|
21041
21041
|
<div class="toc-card-sub">${esc(p.domain.replace(/-/g, " "))} · <span style="color:var(--status-${esc(p.feature.status)})">${esc(p.feature.status)}</span></div>
|
|
21042
21042
|
</div>
|
|
21043
|
-
</
|
|
21043
|
+
</a>`).join("\n ");
|
|
21044
21044
|
const statCardsHtml = [
|
|
21045
21045
|
{
|
|
21046
21046
|
num: pages.length,
|
|
@@ -21213,6 +21213,7 @@ body {
|
|
|
21213
21213
|
.nav-item {
|
|
21214
21214
|
display: flex; align-items: center; gap: 8px; padding: 5px 14px 5px 24px;
|
|
21215
21215
|
cursor: pointer; border-left: 2px solid transparent; transition: background 0.1s;
|
|
21216
|
+
text-decoration: none;
|
|
21216
21217
|
}
|
|
21217
21218
|
.nav-item:hover { background: var(--bg-hover); }
|
|
21218
21219
|
.nav-item.active { background: var(--bg-active); border-left-color: var(--accent); }
|
|
@@ -21243,7 +21244,7 @@ body {
|
|
|
21243
21244
|
.stat-lbl { font-size: 11px; color: var(--text-soft); margin-top: 4px; }
|
|
21244
21245
|
.section-title { font-family: var(--mono); font-size: 9px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--text-soft); margin-bottom: 12px; padding-bottom: 6px; border-bottom: 1px solid var(--border); }
|
|
21245
21246
|
.toc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 14px; }
|
|
21246
|
-
.toc-card { padding: 12px 16px; background: var(--bg-card); border: 1px solid var(--border); border-radius: 8px; cursor: pointer; transition: border-color 0.15s, background 0.15s; display: flex; align-items: flex-start; gap: 10px; }
|
|
21247
|
+
.toc-card { padding: 12px 16px; background: var(--bg-card); border: 1px solid var(--border); border-radius: 8px; cursor: pointer; transition: border-color 0.15s, background 0.15s; display: flex; align-items: flex-start; gap: 10px; text-decoration: none; }
|
|
21247
21248
|
.toc-card:hover { background: var(--bg-hover); border-color: var(--text-soft); }
|
|
21248
21249
|
.toc-pip { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; margin-top: 4px; }
|
|
21249
21250
|
.toc-card-title { font-size: 13px; font-weight: 600; color: var(--text); line-height: 1.3; }
|
|
@@ -21380,13 +21381,23 @@ function showPage(id) {
|
|
|
21380
21381
|
}
|
|
21381
21382
|
// init
|
|
21382
21383
|
document.querySelectorAll('.feature-page').forEach(p => p.classList.add('hidden'));
|
|
21383
|
-
//
|
|
21384
|
+
// Navigate to feature on page load if hash is present
|
|
21384
21385
|
(function() {
|
|
21385
21386
|
var hash = window.location.hash.slice(1);
|
|
21386
21387
|
if (hash) { showPage(hash); }
|
|
21387
21388
|
})();
|
|
21388
|
-
//
|
|
21389
|
-
|
|
21389
|
+
// Click delegation — catch clicks on any element with data-id (nav items, TOC cards)
|
|
21390
|
+
document.addEventListener('click', function(e) {
|
|
21391
|
+
var el = e.target.closest('[data-id]');
|
|
21392
|
+
if (!el) return;
|
|
21393
|
+
var id = el.dataset.id;
|
|
21394
|
+
if (!id) return;
|
|
21395
|
+
e.preventDefault();
|
|
21396
|
+
showPage(id);
|
|
21397
|
+
history.pushState(null, '', '#' + id);
|
|
21398
|
+
});
|
|
21399
|
+
// Browser back/forward navigation
|
|
21400
|
+
window.addEventListener('popstate', function() {
|
|
21390
21401
|
var hash = window.location.hash.slice(1);
|
|
21391
21402
|
showPage(hash || 'home');
|
|
21392
21403
|
});
|