@docmd/themes 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 CHANGED
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2025 docmd.io
3
+ Copyright (c) 2025-present docmd.io
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
package/README.md CHANGED
@@ -32,6 +32,7 @@ module.exports = {
32
32
  * [**@docmd/themes**](https://www.npmjs.com/package/@docmd/themes) - Official themes (Sky, Ruby, Retro).
33
33
 
34
34
  **Plugins**
35
+ * [**@docmd/plugin-installer**](https://www.npmjs.com/package/@docmd/plugin-installer) - Plugin installer for docmd.
35
36
  * [**@docmd/plugin-search**](https://www.npmjs.com/package/@docmd/plugin-search) - Offline full-text search.
36
37
  * [**@docmd/plugin-pwa**](https://www.npmjs.com/package/@docmd/plugin-pwa) - Progressive Web App support.
37
38
  * [**@docmd/plugin-mermaid**](https://www.npmjs.com/package/@docmd/plugin-mermaid) - Diagrams and flowcharts.
@@ -0,0 +1,24 @@
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
+ /**
15
+ * Returns the absolute path to the requested theme CSS file.
16
+ * @param {string} themeName - 'sky', 'retro', 'ruby'
17
+ * @returns {string} Absolute path to css file
18
+ */
19
+ declare function getThemePath(themeName: string): string;
20
+ /**
21
+ * Returns the directory containing all themes
22
+ */
23
+ declare function getThemesDir(): string;
24
+ export { getThemePath, getThemesDir };
package/dist/index.js ADDED
@@ -0,0 +1,34 @@
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
+ /**
19
+ * Returns the absolute path to the requested theme CSS file.
20
+ * @param {string} themeName - 'sky', 'retro', 'ruby'
21
+ * @returns {string} Absolute path to css file
22
+ */
23
+ function getThemePath(themeName) {
24
+ const cleanName = themeName.toLowerCase();
25
+ // Using path.join(__dirname, '..', 'src') because this file runs from dist/
26
+ return path.join(__dirname, '..', 'src', `docmd-theme-${cleanName}.css`);
27
+ }
28
+ /**
29
+ * Returns the directory containing all themes
30
+ */
31
+ function getThemesDir() {
32
+ return path.join(__dirname, '..', 'src');
33
+ }
34
+ export { getThemePath, getThemesDir };
package/package.json CHANGED
@@ -1,11 +1,19 @@
1
1
  {
2
2
  "name": "@docmd/themes",
3
- "version": "0.5.4",
3
+ "version": "0.6.1",
4
4
  "description": "Official themes for docmd.",
5
- "main": "index.js",
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": [
7
- "src",
8
- "index.js"
15
+ "dist",
16
+ "src"
9
17
  ],
10
18
  "keywords": [
11
19
  "docmd",
@@ -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,13 +6,17 @@
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
  * --------------------------------------------------------------------
13
13
  */
14
14
 
15
- const path = require('path');
15
+ import path from 'path';
16
+ import { fileURLToPath } from 'url';
17
+
18
+ const __filename = fileURLToPath(import.meta.url);
19
+ const __dirname = path.dirname(__filename);
16
20
 
17
21
  /**
18
22
  * Returns the absolute path to the requested theme CSS file.
@@ -20,20 +24,20 @@ const path = require('path');
20
24
  * @returns {string} Absolute path to css file
21
25
  */
22
26
 
23
- function getThemePath(themeName) {
27
+ function getThemePath(themeName: string) {
24
28
  const cleanName = themeName.toLowerCase();
25
- // We point to src for now, or dist if you plan to add a build step later
26
- return path.join(__dirname, 'src', `${cleanName}.css`);
29
+ // Using path.join(__dirname, '..', 'src') because this file runs from dist/
30
+ return path.join(__dirname, '..', 'src', `docmd-theme-${cleanName}.css`);
27
31
  }
28
32
 
29
33
  /**
30
34
  * Returns the directory containing all themes
31
35
  */
32
36
  function getThemesDir() {
33
- return path.join(__dirname, 'src');
37
+ return path.join(__dirname, '..', 'src');
34
38
  }
35
39
 
36
- module.exports = {
40
+ export {
37
41
  getThemePath,
38
42
  getThemesDir
39
43
  };