@huyooo/vite-markdown 0.3.9 → 0.3.11

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.js CHANGED
@@ -1,21 +1,27 @@
1
- import MarkdownItAnchor from 'markdown-it-anchor';
2
- import MarkdownItContainer from 'markdown-it-container';
3
- import MarkdownItCopy from 'markdown-it-copy';
4
- import { full as emoji } from 'markdown-it-emoji';
5
- import MarkdownItPrism from 'markdown-it-prism';
6
- import MarkdownItTocDoneRight from 'markdown-it-toc-done-right';
7
- import Markdown from 'unplugin-vue-markdown/vite';
8
- export function createMarkdownPlugin() {
9
- return Markdown({
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.createMarkdownPlugin = createMarkdownPlugin;
7
+ const markdown_it_anchor_1 = __importDefault(require("markdown-it-anchor"));
8
+ const markdown_it_container_1 = __importDefault(require("markdown-it-container"));
9
+ const markdown_it_copy_1 = __importDefault(require("markdown-it-copy"));
10
+ const markdown_it_emoji_1 = require("markdown-it-emoji");
11
+ const markdown_it_prism_1 = __importDefault(require("markdown-it-prism"));
12
+ const markdown_it_toc_done_right_1 = __importDefault(require("markdown-it-toc-done-right"));
13
+ const vite_1 = __importDefault(require("unplugin-vue-markdown/vite"));
14
+ function createMarkdownPlugin() {
15
+ return (0, vite_1.default)({
10
16
  markdownItOptions: {
11
17
  html: true,
12
18
  linkify: true,
13
19
  typographer: true,
14
20
  },
15
21
  markdownItSetup(md) {
16
- md.use(MarkdownItAnchor);
17
- md.use(MarkdownItPrism);
18
- md.use(MarkdownItCopy, {
22
+ md.use(markdown_it_anchor_1.default);
23
+ md.use(markdown_it_prism_1.default);
24
+ md.use(markdown_it_copy_1.default, {
19
25
  btnText: '<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24"><g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"><path d="M7 9.667A2.667 2.667 0 0 1 9.667 7h8.666A2.667 2.667 0 0 1 21 9.667v8.666A2.667 2.667 0 0 1 18.333 21H9.667A2.667 2.667 0 0 1 7 18.333z"/><path d="M4.012 16.737A2 2 0 0 1 3 15V5c0-1.1.9-2 2-2h10c.75 0 1.158.385 1.5 1"/></g></svg>',
20
26
  successText: '复制成功',
21
27
  failText: '复制失败',
@@ -23,12 +29,12 @@ export function createMarkdownPlugin() {
23
29
  showCodeLanguage: true,
24
30
  extraHtmlBeforeBtn: '',
25
31
  });
26
- md.use(MarkdownItContainer, 'info');
27
- md.use(MarkdownItContainer, 'tip');
28
- md.use(MarkdownItContainer, 'warning');
29
- md.use(MarkdownItContainer, 'danger');
30
- md.use(emoji);
31
- md.use(MarkdownItTocDoneRight, {
32
+ md.use(markdown_it_container_1.default, 'info');
33
+ md.use(markdown_it_container_1.default, 'tip');
34
+ md.use(markdown_it_container_1.default, 'warning');
35
+ md.use(markdown_it_container_1.default, 'danger');
36
+ md.use(markdown_it_emoji_1.full);
37
+ md.use(markdown_it_toc_done_right_1.default, {
32
38
  level: [1, 2, 3],
33
39
  containerClass: 'toc',
34
40
  });
package/dist/package.json CHANGED
@@ -1,9 +1,18 @@
1
1
  {
2
2
  "name": "@huyooo/vite-markdown",
3
- "version": "0.3.8",
3
+ "version": "0.3.10",
4
4
  "private": false,
5
5
  "description": "MCP server for fetching and parsing Hacker News stories",
6
- "type": "module",
6
+ "main": "dist/index.js",
7
+ "module": "dist/index.mjs",
8
+ "types": "dist/types/index.d.ts",
9
+ "exports": {
10
+ ".": {
11
+ "import": "./dist/index.mjs",
12
+ "require": "./dist/index.js",
13
+ "types": "./dist/types/index.d.ts"
14
+ }
15
+ },
7
16
  "files": [
8
17
  "dist"
9
18
  ],
@@ -1 +1 @@
1
- export declare function createMarkdownPlugin(): import("vite").Plugin<any> | import("vite").Plugin<any>[];
1
+ export declare function createMarkdownPlugin(): import("vite", { with: { "resolution-mode": "import" } }).Plugin<any> | import("vite", { with: { "resolution-mode": "import" } }).Plugin<any>[];
package/package.json CHANGED
@@ -1,9 +1,18 @@
1
1
  {
2
2
  "name": "@huyooo/vite-markdown",
3
- "version": "0.3.9",
3
+ "version": "0.3.11",
4
4
  "private": false,
5
5
  "description": "MCP server for fetching and parsing Hacker News stories",
6
- "type": "module",
6
+ "main": "dist/index.js",
7
+ "module": "dist/index.mjs",
8
+ "types": "dist/types/index.d.ts",
9
+ "exports": {
10
+ ".": {
11
+ "import": "./dist/index.mjs",
12
+ "require": "./dist/index.js",
13
+ "types": "./dist/types/index.d.ts"
14
+ }
15
+ },
7
16
  "files": [
8
17
  "dist"
9
18
  ],
@@ -39,5 +48,5 @@
39
48
  "url": "https://github.com/pskill9/hn-server/issues"
40
49
  },
41
50
  "homepage": "https://github.com/pskill9/hn-server#readme",
42
- "gitHead": "5496f0b7309c42f28de698fb257145e53d6a0cad"
51
+ "gitHead": "8bc37f6b100f7f4ae6adc26296a3fdd582215859"
43
52
  }