@docmd/ui 0.5.4 → 0.6.1
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/LICENSE +1 -1
- package/README.md +1 -0
- package/assets/css/docmd-highlight-dark.css +1 -1
- package/assets/css/docmd-highlight-light.css +1 -1
- package/assets/css/docmd-main.css +1 -1
- package/assets/js/docmd-image-lightbox.js +1 -1
- package/assets/js/docmd-main.js +1 -1
- package/dist/index.d.ts +16 -0
- package/dist/index.js +28 -0
- package/package.json +12 -4
- package/templates/layout.ejs +9 -9
- package/templates/no-style.ejs +2 -2
- package/templates/partials/menubar.ejs +1 -1
- package/templates/partials/theme-init.js +1 -1
- package/index.js +0 -25
package/LICENSE
CHANGED
package/README.md
CHANGED
|
@@ -21,6 +21,7 @@ Contains:
|
|
|
21
21
|
* [**@docmd/themes**](https://www.npmjs.com/package/@docmd/themes) - Official themes (Sky, Ruby, Retro).
|
|
22
22
|
|
|
23
23
|
**Plugins**
|
|
24
|
+
* [**@docmd/plugin-installer**](https://www.npmjs.com/package/@docmd/plugin-installer) - Plugin installer for docmd.
|
|
24
25
|
* [**@docmd/plugin-search**](https://www.npmjs.com/package/@docmd/plugin-search) - Offline full-text search.
|
|
25
26
|
* [**@docmd/plugin-pwa**](https://www.npmjs.com/package/@docmd/plugin-pwa) - Progressive Web App support.
|
|
26
27
|
* [**@docmd/plugin-mermaid**](https://www.npmjs.com/package/@docmd/plugin-mermaid) - Diagrams and flowcharts.
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* @website https://docmd.io
|
|
7
7
|
* @repository https://github.com/docmd-io/docmd
|
|
8
8
|
* @license MIT
|
|
9
|
-
* @copyright Copyright (c) 2025 docmd.io
|
|
9
|
+
* @copyright Copyright (c) 2025-present docmd.io
|
|
10
10
|
*
|
|
11
11
|
* [docmd-source] - Please do not remove this header.
|
|
12
12
|
* --------------------------------------------------------------------
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* @website https://docmd.io
|
|
7
7
|
* @repository https://github.com/docmd-io/docmd
|
|
8
8
|
* @license MIT
|
|
9
|
-
* @copyright Copyright (c) 2025 docmd.io
|
|
9
|
+
* @copyright Copyright (c) 2025-present docmd.io
|
|
10
10
|
*
|
|
11
11
|
* [docmd-source] - Please do not remove this header.
|
|
12
12
|
* --------------------------------------------------------------------
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* @website https://docmd.io
|
|
7
7
|
* @repository https://github.com/docmd-io/docmd
|
|
8
8
|
* @license MIT
|
|
9
|
-
* @copyright Copyright (c) 2025 docmd.io
|
|
9
|
+
* @copyright Copyright (c) 2025-present docmd.io
|
|
10
10
|
*
|
|
11
11
|
* [docmd-source] - Please do not remove this header.
|
|
12
12
|
* --------------------------------------------------------------------
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* @website https://docmd.io
|
|
7
7
|
* @repository https://github.com/docmd-io/docmd
|
|
8
8
|
* @license MIT
|
|
9
|
-
* @copyright Copyright (c) 2025 docmd.io
|
|
9
|
+
* @copyright Copyright (c) 2025-present docmd.io
|
|
10
10
|
*
|
|
11
11
|
* [docmd-source] - Please do not remove this header.
|
|
12
12
|
* --------------------------------------------------------------------
|
package/assets/js/docmd-main.js
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* @website https://docmd.io
|
|
7
7
|
* @repository https://github.com/docmd-io/docmd
|
|
8
8
|
* @license MIT
|
|
9
|
-
* @copyright Copyright (c) 2025 docmd.io
|
|
9
|
+
* @copyright Copyright (c) 2025-present docmd.io
|
|
10
10
|
*
|
|
11
11
|
* [docmd-source] - Please do not remove this header.
|
|
12
12
|
* --------------------------------------------------------------------
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* --------------------------------------------------------------------
|
|
3
|
+
* docmd : the minimalist, zero-config documentation generator.
|
|
4
|
+
*
|
|
5
|
+
* @package @docmd/core (and ecosystem)
|
|
6
|
+
* @website https://docmd.io
|
|
7
|
+
* @repository https://github.com/docmd-io/docmd
|
|
8
|
+
* @license MIT
|
|
9
|
+
* @copyright Copyright (c) 2025-present docmd.io
|
|
10
|
+
*
|
|
11
|
+
* [docmd-source] - Please do not remove this header.
|
|
12
|
+
* --------------------------------------------------------------------
|
|
13
|
+
*/
|
|
14
|
+
export declare function getTemplatesDir(): string;
|
|
15
|
+
export declare function getAssetsDir(): string;
|
|
16
|
+
export declare function getTemplatePath(name: string): string;
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* --------------------------------------------------------------------
|
|
3
|
+
* docmd : the minimalist, zero-config documentation generator.
|
|
4
|
+
*
|
|
5
|
+
* @package @docmd/core (and ecosystem)
|
|
6
|
+
* @website https://docmd.io
|
|
7
|
+
* @repository https://github.com/docmd-io/docmd
|
|
8
|
+
* @license MIT
|
|
9
|
+
* @copyright Copyright (c) 2025-present docmd.io
|
|
10
|
+
*
|
|
11
|
+
* [docmd-source] - Please do not remove this header.
|
|
12
|
+
* --------------------------------------------------------------------
|
|
13
|
+
*/
|
|
14
|
+
import path from 'path';
|
|
15
|
+
import { fileURLToPath } from 'url';
|
|
16
|
+
const __filename = fileURLToPath(import.meta.url);
|
|
17
|
+
const __dirname = path.dirname(__filename);
|
|
18
|
+
export function getTemplatesDir() {
|
|
19
|
+
return path.join(__dirname, '..', 'templates');
|
|
20
|
+
}
|
|
21
|
+
export function getAssetsDir() {
|
|
22
|
+
return path.join(__dirname, '..', 'assets');
|
|
23
|
+
}
|
|
24
|
+
// Helper to resolve template paths
|
|
25
|
+
export function getTemplatePath(name) {
|
|
26
|
+
const fileName = name.endsWith('.ejs') ? name : `${name}.ejs`;
|
|
27
|
+
return path.join(__dirname, '..', 'templates', fileName);
|
|
28
|
+
}
|
package/package.json
CHANGED
|
@@ -1,12 +1,20 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@docmd/ui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.6.1",
|
|
4
4
|
"description": "Base UI templates and assets for docmd.",
|
|
5
|
-
"
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "dist/index.js",
|
|
7
|
+
"types": "dist/index.d.ts",
|
|
8
|
+
"exports": {
|
|
9
|
+
".": "./dist/index.js"
|
|
10
|
+
},
|
|
11
|
+
"scripts": {
|
|
12
|
+
"build": "tsc"
|
|
13
|
+
},
|
|
6
14
|
"files": [
|
|
15
|
+
"dist",
|
|
7
16
|
"templates",
|
|
8
|
-
"assets"
|
|
9
|
-
"index.js"
|
|
17
|
+
"assets"
|
|
10
18
|
],
|
|
11
19
|
"keywords": [
|
|
12
20
|
"docmd",
|
package/templates/layout.ejs
CHANGED
|
@@ -65,7 +65,7 @@
|
|
|
65
65
|
<a href="#main-content" class="skip-link">Skip to main content</a>
|
|
66
66
|
|
|
67
67
|
<% if (locals.menubarConfig && menubarConfig?.enabled !==false && menubarConfig.position !=='header' ) { %>
|
|
68
|
-
<%- include('partials/menubar', { menubarConfig, relativePathToRoot, renderIcon, optionsMenu: locals.optionsMenu })
|
|
68
|
+
<%- await include('partials/menubar', { menubarConfig, relativePathToRoot, renderIcon, optionsMenu: locals.optionsMenu })
|
|
69
69
|
%>
|
|
70
70
|
<% } %>
|
|
71
71
|
|
|
@@ -96,12 +96,12 @@
|
|
|
96
96
|
<div class="sidebar-top-group">
|
|
97
97
|
<% if (locals.optionsMenu && optionsMenu.position==='sidebar-top' ) { %>
|
|
98
98
|
<div class="sidebar-options-wrapper">
|
|
99
|
-
<%- include('partials/options-menu', { optionsMenu }) %>
|
|
99
|
+
<%- await include('partials/options-menu', { optionsMenu }) %>
|
|
100
100
|
</div>
|
|
101
101
|
<% } %>
|
|
102
102
|
<% if (config.versions && config.versions.position==='sidebar-top' ) { %>
|
|
103
103
|
<div class="sidebar-version-wrapper">
|
|
104
|
-
<%- include('partials/version-dropdown', { versions: config.versions, activeVersion:
|
|
104
|
+
<%- await include('partials/version-dropdown', { versions: config.versions, activeVersion:
|
|
105
105
|
config._activeVersion, relativePathToRoot }) %>
|
|
106
106
|
</div>
|
|
107
107
|
<% } %>
|
|
@@ -112,13 +112,13 @@
|
|
|
112
112
|
<div class="sidebar-bottom-group mt-auto">
|
|
113
113
|
<% if (config.versions && config.versions.position==='sidebar-bottom' ) { %>
|
|
114
114
|
<div class="sidebar-version-wrapper">
|
|
115
|
-
<%- include('partials/version-dropdown', { versions: config.versions, activeVersion:
|
|
115
|
+
<%- await include('partials/version-dropdown', { versions: config.versions, activeVersion:
|
|
116
116
|
config._activeVersion, relativePathToRoot }) %>
|
|
117
117
|
</div>
|
|
118
118
|
<% } %>
|
|
119
119
|
<% if (locals.optionsMenu && optionsMenu.position==='sidebar-bottom' ) { %>
|
|
120
120
|
<div class="sidebar-options-wrapper">
|
|
121
|
-
<%- include('partials/options-menu', { optionsMenu }) %>
|
|
121
|
+
<%- await include('partials/options-menu', { optionsMenu }) %>
|
|
122
122
|
</div>
|
|
123
123
|
<% } %>
|
|
124
124
|
</div>
|
|
@@ -126,7 +126,7 @@
|
|
|
126
126
|
<% } %>
|
|
127
127
|
<div class="main-content-wrapper">
|
|
128
128
|
<% if (locals.menubarConfig && menubarConfig?.enabled !==false && menubarConfig.position==='header' ) { %>
|
|
129
|
-
<%- include('partials/menubar', { menubarConfig, relativePathToRoot, renderIcon, optionsMenu:
|
|
129
|
+
<%- await include('partials/menubar', { menubarConfig, relativePathToRoot, renderIcon, optionsMenu:
|
|
130
130
|
locals.optionsMenu }) %>
|
|
131
131
|
<% } %>
|
|
132
132
|
<% if (headerConfig?.enabled !==false) { %>
|
|
@@ -145,7 +145,7 @@
|
|
|
145
145
|
|
|
146
146
|
<div class="header-right">
|
|
147
147
|
<% if (optionsMenu?.position==='header' ) { %>
|
|
148
|
-
<%- include('partials/options-menu', { optionsMenu }) %>
|
|
148
|
+
<%- await include('partials/options-menu', { optionsMenu }) %>
|
|
149
149
|
<% } %>
|
|
150
150
|
</div>
|
|
151
151
|
</header>
|
|
@@ -189,7 +189,7 @@
|
|
|
189
189
|
<% } %>
|
|
190
190
|
</div>
|
|
191
191
|
<div class="toc-sidebar">
|
|
192
|
-
<%- include('toc', { content, headings, navigationHtml, isActivePage }) %>
|
|
192
|
+
<%- await include('toc', { content, headings, navigationHtml, isActivePage }) %>
|
|
193
193
|
</div>
|
|
194
194
|
</div>
|
|
195
195
|
<div class="page-footer-actions">
|
|
@@ -201,7 +201,7 @@
|
|
|
201
201
|
<% } %>
|
|
202
202
|
</div>
|
|
203
203
|
</main>
|
|
204
|
-
<%- include('partials/footer', { footerConfig, config, relativePathToRoot, logo, siteTitle,
|
|
204
|
+
<%- await include('partials/footer', { footerConfig, config, relativePathToRoot, logo, siteTitle,
|
|
205
205
|
footerHtml }) %>
|
|
206
206
|
</div>
|
|
207
207
|
</div>
|
package/templates/no-style.ejs
CHANGED
|
@@ -109,7 +109,7 @@
|
|
|
109
109
|
<div class="main-content"><%- content %></div>
|
|
110
110
|
<% if (frontmatter.components?.toc !==false && headings && headings.length> 0) { %>
|
|
111
111
|
<div class="toc-sidebar">
|
|
112
|
-
<%- include('toc', { content, headings, navigationHtml, isActivePage }) %>
|
|
112
|
+
<%- await include('toc', { content, headings, navigationHtml, isActivePage }) %>
|
|
113
113
|
</div>
|
|
114
114
|
<% } %>
|
|
115
115
|
</div>
|
|
@@ -172,7 +172,7 @@
|
|
|
172
172
|
<div class="main-content"><%- content %></div>
|
|
173
173
|
<% if (frontmatter.components?.toc !==false && headings && headings.length> 0) { %>
|
|
174
174
|
<div class="toc-sidebar">
|
|
175
|
-
<%- include('toc', { content, headings, navigationHtml, isActivePage }) %>
|
|
175
|
+
<%- await include('toc', { content, headings, navigationHtml, isActivePage }) %>
|
|
176
176
|
</div>
|
|
177
177
|
<% } %>
|
|
178
178
|
</div>
|
|
@@ -121,7 +121,7 @@
|
|
|
121
121
|
<% } %>
|
|
122
122
|
<% if (optionsMenu && optionsMenu.position==='menubar' ) { %>
|
|
123
123
|
<div class="menubar-options">
|
|
124
|
-
<%- include('options-menu', { optionsMenu }) %>
|
|
124
|
+
<%- await include('options-menu', { optionsMenu }) %>
|
|
125
125
|
</div>
|
|
126
126
|
<% } %>
|
|
127
127
|
</div>
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* @website https://docmd.io
|
|
7
7
|
* @repository https://github.com/docmd-io/docmd
|
|
8
8
|
* @license MIT
|
|
9
|
-
* @copyright Copyright (c) 2025 docmd.io
|
|
9
|
+
* @copyright Copyright (c) 2025-present docmd.io
|
|
10
10
|
*
|
|
11
11
|
* [docmd-source] - Please do not remove this header.
|
|
12
12
|
* --------------------------------------------------------------------
|
package/index.js
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* --------------------------------------------------------------------
|
|
3
|
-
* docmd : the minimalist, zero-config documentation generator.
|
|
4
|
-
*
|
|
5
|
-
* @package @docmd/core (and ecosystem)
|
|
6
|
-
* @website https://docmd.io
|
|
7
|
-
* @repository https://github.com/docmd-io/docmd
|
|
8
|
-
* @license MIT
|
|
9
|
-
* @copyright Copyright (c) 2025 docmd.io
|
|
10
|
-
*
|
|
11
|
-
* [docmd-source] - Please do not remove this header.
|
|
12
|
-
* --------------------------------------------------------------------
|
|
13
|
-
*/
|
|
14
|
-
|
|
15
|
-
const path = require('path');
|
|
16
|
-
|
|
17
|
-
module.exports = {
|
|
18
|
-
getTemplatesDir: () => path.join(__dirname, 'templates'),
|
|
19
|
-
getAssetsDir: () => path.join(__dirname, 'assets'),
|
|
20
|
-
// Helper to resolve template paths
|
|
21
|
-
getTemplatePath: (name) => {
|
|
22
|
-
const fileName = name.endsWith('.ejs') ? name : `${name}.ejs`;
|
|
23
|
-
return path.join(__dirname, 'templates', fileName);
|
|
24
|
-
}
|
|
25
|
-
};
|