@barzhsieh/nuxt-content-mermaid 2.2.1 → 2.2.3

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/module.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "compatibility": {
5
5
  "nuxt": "^3.20.1 || ^4.1.0"
6
6
  },
7
- "version": "2.2.1",
7
+ "version": "2.2.3",
8
8
  "builder": {
9
9
  "@nuxt/module-builder": "1.0.2",
10
10
  "unbuild": "3.6.1"
package/dist/module.mjs CHANGED
@@ -4,7 +4,16 @@ import { DEFAULT_MERMAID_CONFIG, DEFAULT_TOOLBAR_OPTIONS, DEFAULT_EXPAND_OPTIONS
4
4
  import { parseInlineAttrs, parseMermaidFrontmatter, extractMermaidInlineOverrides, applyMermaidFrontmatterOverrides, mergeToolbarProps, extractToolbarProps } from '../dist/runtime/utils/mermaid-transform.js';
5
5
  import { isNonEmptyRecord, stringifyInlineValue } from '../dist/runtime/utils/index.js';
6
6
 
7
- const SANITIZE_URL_PACKAGE = "@braintree/sanitize-url";
7
+ const MODULE_NAME = "@barzhsieh/nuxt-content-mermaid";
8
+ const MERMAID_OPTIMIZE_DEPS = [
9
+ "mermaid",
10
+ "@braintree/sanitize-url",
11
+ "dayjs",
12
+ "dayjs/plugin/isoWeek.js",
13
+ "dayjs/plugin/customParseFormat.js",
14
+ "dayjs/plugin/advancedFormat.js",
15
+ "dayjs/plugin/duration.js"
16
+ ];
8
17
  const MERMAID_FENCE_RE = /^[ \t]*(?:`{3,}|~{3,})[ \t]*mermaid(?:$|[ \t{[])/im;
9
18
  const DEFAULTS = {
10
19
  enabled: true,
@@ -26,7 +35,7 @@ const DEFAULTS = {
26
35
  };
27
36
  const module$1 = defineNuxtModule({
28
37
  meta: {
29
- name: "@barzhsieh/nuxt-content-mermaid",
38
+ name: MODULE_NAME,
30
39
  configKey: "contentMermaid",
31
40
  compatibility: {
32
41
  nuxt: "^3.20.1 || ^4.1.0"
@@ -72,7 +81,9 @@ const module$1 = defineNuxtModule({
72
81
  if (name === "client") {
73
82
  config.optimizeDeps ||= {};
74
83
  config.optimizeDeps.include ||= [];
75
- config.optimizeDeps.include.push(SANITIZE_URL_PACKAGE);
84
+ config.optimizeDeps.include.push(
85
+ ...MERMAID_OPTIMIZE_DEPS.map((dep) => `${MODULE_NAME} > ${dep}`)
86
+ );
76
87
  }
77
88
  }
78
89
  }));
@@ -1,11 +1,11 @@
1
1
  import type { MermaidConfig } from 'mermaid';
2
- import type { MermaidToolbarOptions } from '~/src/types/mermaid';
2
+ import type { MermaidToolbarOptions } from '../../types/mermaid.js';
3
3
  type __VLS_Props = {
4
4
  config?: MermaidConfig | string | unknown;
5
5
  toolbar?: MermaidToolbarOptions;
6
6
  code?: string;
7
7
  };
8
- declare var __VLS_1: {}, __VLS_9: {}, __VLS_52: {}, __VLS_54: {}, __VLS_62: {
8
+ declare var __VLS_1: {}, __VLS_9: {}, __VLS_51: {}, __VLS_53: {}, __VLS_60: {
9
9
  error: unknown;
10
10
  source: string;
11
11
  };
@@ -14,11 +14,11 @@ type __VLS_Slots = {} & {
14
14
  } & {
15
15
  default?: (props: typeof __VLS_9) => any;
16
16
  } & {
17
- default?: (props: typeof __VLS_52) => any;
17
+ default?: (props: typeof __VLS_51) => any;
18
18
  } & {
19
- loading?: (props: typeof __VLS_54) => any;
19
+ loading?: (props: typeof __VLS_53) => any;
20
20
  } & {
21
- error?: (props: typeof __VLS_62) => any;
21
+ error?: (props: typeof __VLS_60) => any;
22
22
  };
23
23
  declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
24
24
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
@@ -1,11 +1,11 @@
1
1
  import type { MermaidConfig } from 'mermaid';
2
- import type { MermaidToolbarOptions } from '~/src/types/mermaid';
2
+ import type { MermaidToolbarOptions } from '../../types/mermaid.js';
3
3
  type __VLS_Props = {
4
4
  config?: MermaidConfig | string | unknown;
5
5
  toolbar?: MermaidToolbarOptions;
6
6
  code?: string;
7
7
  };
8
- declare var __VLS_1: {}, __VLS_9: {}, __VLS_52: {}, __VLS_54: {}, __VLS_62: {
8
+ declare var __VLS_1: {}, __VLS_9: {}, __VLS_51: {}, __VLS_53: {}, __VLS_60: {
9
9
  error: unknown;
10
10
  source: string;
11
11
  };
@@ -14,11 +14,11 @@ type __VLS_Slots = {} & {
14
14
  } & {
15
15
  default?: (props: typeof __VLS_9) => any;
16
16
  } & {
17
- default?: (props: typeof __VLS_52) => any;
17
+ default?: (props: typeof __VLS_51) => any;
18
18
  } & {
19
- loading?: (props: typeof __VLS_54) => any;
19
+ loading?: (props: typeof __VLS_53) => any;
20
20
  } & {
21
- error?: (props: typeof __VLS_62) => any;
21
+ error?: (props: typeof __VLS_60) => any;
22
22
  };
23
23
  declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
24
24
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@barzhsieh/nuxt-content-mermaid",
3
- "version": "2.2.1",
3
+ "version": "2.2.3",
4
4
  "description": "A Nuxt module designed for integrating Mermaid with `@nuxt/content`. It automatically converts `mermaid` code blocks in Markdown into responsive chart components, and supports lazy loading and dark/light theme switching.",
5
5
  "keywords": [
6
6
  "nuxt",
@@ -21,7 +21,8 @@
21
21
  "exports": {
22
22
  ".": {
23
23
  "types": "./dist/types.d.mts",
24
- "import": "./dist/module.mjs"
24
+ "import": "./dist/module.mjs",
25
+ "default": "./dist/module.mjs"
25
26
  }
26
27
  },
27
28
  "main": "./dist/module.mjs",
@@ -36,10 +37,10 @@
36
37
  "dist"
37
38
  ],
38
39
  "dependencies": {
39
- "@nuxt/kit": "4.2.1",
40
+ "@nuxt/kit": "4.3.1",
40
41
  "defu": "^6.1.4",
41
42
  "destr": "^2.0.5",
42
- "mermaid": "^11.12.2",
43
+ "mermaid": "^11.12.3",
43
44
  "yaml": "^2.8.2"
44
45
  },
45
46
  "peerDependencies": {
@@ -47,21 +48,21 @@
47
48
  "nuxt": "^3.20.1 || ^4.1.0"
48
49
  },
49
50
  "devDependencies": {
50
- "@nuxt/content": "^3.9.0",
51
- "@nuxt/devtools": "3.1.1",
52
- "@nuxt/eslint-config": "1.11.0",
51
+ "@nuxt/content": "^3.11.2",
52
+ "@nuxt/devtools": "3.2.1",
53
+ "@nuxt/eslint-config": "1.15.1",
53
54
  "@nuxt/module-builder": "1.0.2",
54
- "@nuxt/schema": "4.2.1",
55
- "@nuxt/test-utils": "^3.21.0",
55
+ "@nuxt/schema": "4.3.1",
56
+ "@nuxt/test-utils": "^4.0.0",
56
57
  "@nuxtjs/color-mode": "4.0.0",
57
- "@types/node": "^24.10.1",
58
+ "@types/node": "^25.3.0",
58
59
  "changelogen": "^0.6.2",
59
- "eslint": "^9.39.1",
60
- "nuxt": "4.2.1",
61
- "playwright": "^1.57.0",
60
+ "eslint": "^10.0.1",
61
+ "nuxt": "4.3.1",
62
+ "playwright": "^1.58.2",
62
63
  "typescript": "~5.9.3",
63
- "vitest": "^4.0.15",
64
- "vue-tsc": "^3.1.7"
64
+ "vitest": "^4.0.18",
65
+ "vue-tsc": "^3.2.5"
65
66
  },
66
67
  "volta": {
67
68
  "node": "22.21.1"