@nuxtjs/mdc 0.17.0 → 0.17.2

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
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@nuxtjs/mdc",
3
3
  "configKey": "mdc",
4
- "version": "0.17.0",
4
+ "version": "0.17.2",
5
5
  "builder": {
6
6
  "@nuxt/module-builder": "1.0.1",
7
7
  "unbuild": "3.5.0"
package/dist/module.mjs CHANGED
@@ -12,7 +12,7 @@ const registerMDCSlotTransformer = (resolver) => {
12
12
  const compilerOptions = config.vue.template.compilerOptions;
13
13
  compilerOptions.nodeTransforms = [
14
14
  function viteMDCSlot(node, context) {
15
- const isVueSlotWithUnwrap = node.tag === "slot" && node.props.find((p) => p.name === "mdc-unwrap" || p.name === "bind" && p.rawName === ":mdc-unwrap");
15
+ const isVueSlotWithUnwrap = node.tag === "slot" && node.props.find((p) => p.name === "mdc-unwrap" || p.name === "mdcUnwrap" || p.name === "bind" && p.rawName === ":mdc-unwrap");
16
16
  const isMDCSlot = node.tag === "MDCSlot";
17
17
  if (isVueSlotWithUnwrap || isMDCSlot) {
18
18
  const transform = context.ssr ? context.nodeTransforms.find((nt) => nt.name === "ssrTransformSlotOutlet") : context.nodeTransforms.find((nt) => nt.name === "transformSlotOutlet");
@@ -350,7 +350,7 @@ const module = defineNuxtModule({
350
350
  filename: "mdc-image-component.mjs",
351
351
  write: true,
352
352
  getContents: ({ app }) => {
353
- const image = app.components.find((c) => c.pascalName === "NuxtImg" && !c.filePath.includes("nuxt/dist/app"));
353
+ const image = app.components.find((c) => c.pascalName === "NuxtImg" && !c.filePath.includes("nuxt/dist/app") && !c.filePath.includes("nuxt-nightly/dist/app"));
354
354
  return image ? `export { default } from "${image.filePath}"` : 'export default "img"';
355
355
  }
356
356
  });
@@ -1,4 +1,4 @@
1
- import { type PropType } from 'vue';
1
+ import type { PropType } from 'vue';
2
2
  import type { MDCParseOptions } from '@nuxtjs/mdc';
3
3
  declare var __VLS_1: {
4
4
  data: any;
@@ -1,4 +1,4 @@
1
- import { type PropType, type DefineComponent } from 'vue';
1
+ import type { PropType, DefineComponent } from 'vue';
2
2
  import type { MDCParseOptions } from '@nuxtjs/mdc';
3
3
  declare var __VLS_1: {
4
4
  data: any;
@@ -13,6 +13,7 @@ const rxModel = /^v-model/;
13
13
  const nativeInputs = ["select", "textarea", "input"];
14
14
  const specialParentTags = ["math", "svg"];
15
15
  const proseComponentMap = Object.fromEntries(["p", "a", "blockquote", "code", "pre", "code", "em", "h1", "h2", "h3", "h4", "h5", "h6", "hr", "img", "ul", "ol", "li", "strong", "table", "thead", "tbody", "td", "th", "tr", "script"].map((t) => [t, `prose-${t}`]));
16
+ const dangerousTags = ["script", "base"];
16
17
  export default defineComponent({
17
18
  name: "MDCRenderer",
18
19
  props: {
@@ -138,11 +139,11 @@ function _renderNode(node, h2, options, keyInParent) {
138
139
  return renderBinding(node, h2, documentMeta, parentScope);
139
140
  }
140
141
  const _resolveComponent = isUnresolvableTag(renderTag) ? (component2) => component2 : resolveComponent;
141
- if (renderTag === "script") {
142
+ if (dangerousTags.includes(renderTag)) {
142
143
  return h2(
143
144
  "pre",
144
- { class: "script-to-pre" },
145
- "<script>\n" + nodeTextContent(node) + "\n<\/script>"
145
+ { class: "mdc-renderer-dangerous-tag" },
146
+ "<" + renderTag + ">" + nodeTextContent(node) + "</" + renderTag + ">"
146
147
  );
147
148
  }
148
149
  const component = _resolveComponent(renderTag);
@@ -1,7 +1,7 @@
1
1
  import type { PropType } from 'vue';
2
- declare var __VLS_6: {};
2
+ declare var __VLS_7: {};
3
3
  type __VLS_Slots = {} & {
4
- default?: (props: typeof __VLS_6) => any;
4
+ default?: (props: typeof __VLS_7) => any;
5
5
  };
6
6
  declare const __VLS_component: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
7
7
  href: {
@@ -1,4 +1,4 @@
1
- import { type Processor } from 'unified';
1
+ import type { Processor } from 'unified';
2
2
  import type { MDCStringifyOptions, MDCRoot } from '@nuxtjs/mdc';
3
3
  export declare function createStringifyProcessor(options?: MDCStringifyOptions): Processor<undefined, import("hast").Root, import("unist").Node, import("mdast").Root, string>;
4
4
  export declare function createMarkdownStringifier(options?: MDCStringifyOptions): (value: any, data?: Record<string, any>) => Promise<string>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nuxtjs/mdc",
3
- "version": "0.17.0",
3
+ "version": "0.17.2",
4
4
  "description": "Nuxt MDC module",
5
5
  "repository": "nuxt-modules/mdc",
6
6
  "license": "MIT",
@@ -68,15 +68,15 @@
68
68
  "verify": "npm run dev:prepare && npm run lint && npm run test && npm run typecheck"
69
69
  },
70
70
  "dependencies": {
71
- "@nuxt/kit": "^3.16.2",
72
- "@shikijs/langs": "^3.3.0",
73
- "@shikijs/themes": "^3.3.0",
74
- "@shikijs/transformers": "^3.3.0",
71
+ "@nuxt/kit": "^3.17.7",
72
+ "@shikijs/langs": "^3.8.0",
73
+ "@shikijs/themes": "^3.8.0",
74
+ "@shikijs/transformers": "^3.8.0",
75
75
  "@types/hast": "^3.0.4",
76
76
  "@types/mdast": "^4.0.4",
77
- "@vue/compiler-core": "^3.5.13",
77
+ "@vue/compiler-core": "^3.5.17",
78
78
  "consola": "^3.4.2",
79
- "debug": "4.4.0",
79
+ "debug": "^4.4.1",
80
80
  "defu": "^6.1.4",
81
81
  "destr": "^2.0.5",
82
82
  "detab": "^3.0.2",
@@ -86,9 +86,9 @@
86
86
  "hast-util-to-string": "^3.0.1",
87
87
  "mdast-util-to-hast": "^13.2.0",
88
88
  "micromark-util-sanitize-uri": "^2.0.1",
89
- "parse5": "^7.3.0",
89
+ "parse5": "^8.0.0",
90
90
  "pathe": "^2.0.3",
91
- "property-information": "^7.0.0",
91
+ "property-information": "^7.1.0",
92
92
  "rehype-external-links": "^3.0.0",
93
93
  "rehype-minify-whitespace": "^6.0.2",
94
94
  "rehype-raw": "^7.0.0",
@@ -103,7 +103,7 @@
103
103
  "remark-rehype": "^11.1.2",
104
104
  "remark-stringify": "^11.0.0",
105
105
  "scule": "^1.3.0",
106
- "shiki": "^3.3.0",
106
+ "shiki": "^3.8.0",
107
107
  "ufo": "^1.6.1",
108
108
  "unified": "^11.0.5",
109
109
  "unist-builder": "^4.0.0",
@@ -112,26 +112,26 @@
112
112
  "vfile": "^6.0.3"
113
113
  },
114
114
  "devDependencies": {
115
- "@nuxt/devtools": "^2.4.0",
116
- "@nuxt/eslint-config": "^1.3.0",
115
+ "@nuxt/devtools": "^2.6.2",
116
+ "@nuxt/eslint-config": "^1.5.2",
117
117
  "@nuxt/module-builder": "^1.0.1",
118
- "@nuxt/schema": "^3.16.2",
119
- "@nuxt/test-utils": "^3.17.2",
120
- "@nuxt/ui": "^3.0.2",
118
+ "@nuxt/schema": "^3.17.7",
119
+ "@nuxt/test-utils": "^3.19.2",
120
+ "@nuxt/ui": "^3.2.0",
121
121
  "@nuxtjs/mdc": "link:.",
122
- "@types/node": "^22.14.1",
123
- "eslint": "^9.25.1",
124
- "nuxt": "^3.16.2",
122
+ "@types/node": "^24.0.13",
123
+ "eslint": "^9.31.0",
124
+ "nuxt": "^3.17.7",
125
125
  "rehype": "^13.0.2",
126
- "release-it": "^19.0.1",
126
+ "release-it": "^19.0.3",
127
127
  "typescript": "5.8.3",
128
- "vitest": "^3.1.2",
129
- "vue-tsc": "^2.2.10"
128
+ "vitest": "^3.2.4",
129
+ "vue-tsc": "^3.0.1"
130
130
  },
131
131
  "resolutions": {
132
132
  "@nuxtjs/mdc": "workspace:*"
133
133
  },
134
- "packageManager": "pnpm@10.9.0",
134
+ "packageManager": "pnpm@10.13.1",
135
135
  "release-it": {
136
136
  "git": {
137
137
  "commitMessage": "chore(release): release v${version}"