🚀 Big News:Socket Has Acquired Secure Annex.Learn More
Socket
Book a DemoSign in
Socket

@docmd/ui

Package Overview
Dependencies
Maintainers
1
Versions
37
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@docmd/ui - npm Package Compare versions

Comparing version
0.7.7
to
0.7.8
+1
-1
assets/css/docmd-main.css

@@ -1287,3 +1287,3 @@ /**

overflow: hidden;
box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
box-shadow: var(--shadow-sm);
background-color: var(--code-bg);

@@ -1290,0 +1290,0 @@ }

@@ -136,3 +136,3 @@ /* global XMLHttpRequest */

/**
* Switch locale — updates localStorage, reloads strings.
* Switch locale - updates localStorage, reloads strings.
* For multi-page i18n sites, redirects to the locale-prefixed URL.

@@ -139,0 +139,0 @@ * For single-page noStyle sites, swaps strings in place.

@@ -195,9 +195,9 @@ /**

if (localePages && localePages.indexOf(lookupPath) !== -1) {
// Page exists in target locale — navigate directly
// Page exists in target locale - navigate directly
window.location.href = targetHref + window.location.hash;
} else if (localePages && localePages.length > 0) {
// Locale exists but this page doesn't — go to locale root
// Locale exists but this page doesn't - go to locale root
window.location.href = base + targetLocPrefix;
} else {
// Locale has no pages at all — stay on current page
// Locale has no pages at all - stay on current page
window.location.href = base + currentPath;

@@ -208,3 +208,3 @@ }

// Fallback: no manifest available — use HEAD fetch (legacy/graceful degradation)
// Fallback: no manifest available - use HEAD fetch (legacy/graceful degradation)
fetch(targetHref, { method: 'HEAD' })

@@ -366,3 +366,3 @@ .then(function (response) {

prefetchTimer = setTimeout(() => {
// Prefetch using hash-stripped URL — the fragment is never sent to the server
// Prefetch using hash-stripped URL - the fragment is never sent to the server
const prefetchUrl = new URL(link.href);

@@ -426,3 +426,3 @@ const prefetchFetchUrl = prefetchUrl.origin + prefetchUrl.pathname + prefetchUrl.search;

// Separate hash from the fetch URL — servers don't receive fragments,
// Separate hash from the fetch URL - servers don't receive fragments,
// and res.url (finalUrl) will never contain the hash. We preserve it

@@ -534,3 +534,3 @@ // manually so pushState and the scroll both use the correct value.

if (target) target.scrollIntoView({ behavior: 'smooth' });
} catch { /* invalid selector — ignore */ }
} catch { /* invalid selector - ignore */ }
} else {

@@ -537,0 +537,0 @@ window.scrollTo(0, 0);

{
"name": "@docmd/ui",
"version": "0.7.7",
"version": "0.7.8",
"description": "Base UI templates and assets for docmd.",

@@ -5,0 +5,0 @@ "type": "module",

# @docmd/ui
The visual foundation of docmd — EJS layout templates, core CSS and JavaScript, and SVG icon sets that all official themes build upon.
The visual foundation of docmd - EJS layout templates, core CSS and JavaScript, and SVG icon sets that all official themes build upon.

@@ -5,0 +5,0 @@ Part of the **[docmd](https://github.com/docmd-io/docmd)** documentation engine.

@@ -53,2 +53,4 @@ <!--

<link rel="stylesheet" href="<%= relativePathToRoot %>assets/css/docmd-main.css?v=<%= buildHash %>">
<%# Git Plugin core CSS (injected directly since git is a core plugin) %>
<link rel="stylesheet" href="<%= relativePathToRoot %>assets/css/docmd-git.css?v=<%= buildHash %>">
<% if (config.theme?.codeHighlight !==false) { const isDarkDefault=appearance==='dark' ; %>

@@ -227,2 +229,33 @@ <link rel="stylesheet" href="<%= relativePathToRoot %>assets/css/docmd-highlight-light.css?v=<%= buildHash %>" id="hljs-light" <%=isDarkDefault ? 'disabled' : '' %>>

<div class="page-footer-actions">
<%# Git Plugin: Last updated timestamp (core plugin, always inject) %>
<% if (locals.frontmatter && locals.frontmatter._git && locals.frontmatter._git.lastUpdatedTimestamp) { %>
<span class="git-last-updated" data-timestamp="<%= locals.frontmatter._git.lastUpdatedTimestamp %>">
<svg class="git-icon" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<circle cx="12" cy="12" r="10"></circle>
<polyline points="12 6 12 12 16 14"></polyline>
</svg>
<span class="git-label"><%= typeof t === 'function' ? t('lastUpdated') : 'Last updated' %>:</span>
<span class="git-time" data-timestamp="<%= locals.frontmatter._git.lastUpdatedTimestamp %>"></span>
<% if (locals.frontmatter._git.commits && locals.frontmatter._git.commits.length > 0) { %>
<div class="git-commit-tooltip" role="tooltip">
<div class="git-tooltip-title"><%= typeof t === 'function' ? t('recentCommits') : 'Recent commits' %></div>
<ul class="git-commit-list">
<% locals.frontmatter._git.commits.slice(0, 6).forEach(function(commit) { %>
<li class="git-commit-item">
<div class="git-commit-avatar" title="<%= commit.author %>"><%= commit.author.split(' ').map(n => n[0]).join('').substring(0, 2).toUpperCase() %></div>
<div class="git-commit-details">
<div class="git-commit-message" title="<%= commit.message %>"><%= commit.message.length > 40 ? commit.message.substring(0, 37) + '...' : commit.message %></div>
<div class="git-commit-meta">
<span class="git-commit-author"><%= commit.author %></span>
<span class="git-commit-date" data-timestamp="<%= commit.timestamp %>"></span>
</div>
</div>
</li>
<% }); %>
</ul>
</div>
<% } %>
</span>
<% } %>
<span class="git-spacer"></span>
<% if (locals.editUrl) { %>

@@ -244,2 +277,4 @@ <a href="<%= editUrl %>" target="_blank" rel="noopener noreferrer" class="edit-link">

<script src="<%= relativePathToRoot %>assets/js/docmd-main.js?v=<%= buildHash %>"></script>
<%# Git Plugin core JS (injected directly since git is a core plugin) %>
<script src="<%= relativePathToRoot %>assets/js/docmd-git.js?v=<%= buildHash %>"></script>
<%- pluginBodyScriptsHtml || '' %>

@@ -246,0 +281,0 @@ <% (customJsFiles || []).forEach(jsFile=> {