@onderwijsin/nuxt-markdown-renderer 0.2.1 → 0.2.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/README.md CHANGED
@@ -17,15 +17,19 @@ components, and component metadata for the Directus Markdown editor.
17
17
 
18
18
  - Nuxt `^4.0.0`
19
19
  - Node.js 24 or newer
20
- - Nuxt UI 4 and Comark are installed automatically as Nuxt module dependencies.
20
+ - Vue `^3.5.0`, Nuxt UI `^4.0.0`, and `@comark/nuxt`, `@comark/vue`, and `comark` `>=0.6.2` are peer
21
+ dependencies.
21
22
 
22
23
  The renderer can be used alongside `@onderwijsin/nuxt-webmanifest` and Schema.org components without
23
24
  installing `@unhead/schema-org` separately. Renderer component metadata remains available.
24
25
 
26
+ Use the application's Vue runtime and keep all three Comark packages on the same version. Separate
27
+ Vue copies can cause missing Prose styles and SSR hydration mismatches.
28
+
25
29
  ## Installation
26
30
 
27
31
  ```sh
28
- pnpm add @onderwijsin/nuxt-markdown-renderer
32
+ pnpm add @onderwijsin/nuxt-markdown-renderer @nuxt/ui @comark/nuxt @comark/vue comark
29
33
  ```
30
34
 
31
35
  Register the module:
@@ -233,6 +237,9 @@ Component-set values use the public Markdown node names. Passing `component-set=
233
237
  URL returns only that set. An unknown set prevents custom component resolution and its metadata URL
234
238
  returns HTTP 404.
235
239
 
240
+ The reserved `Reference` node always resolves regardless of the selected set, including empty or
241
+ unknown sets. It remains excluded from all metadata endpoints and does not need a set entry.
242
+
236
243
  Omit `component-set` to allow every discovered renderer component.
237
244
 
238
245
  ## Directus metadata endpoint
package/dist/module.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@onderwijsin/nuxt-markdown-renderer",
3
3
  "configKey": "markdownRenderer",
4
- "version": "0.2.1",
4
+ "version": "0.2.2",
5
5
  "compatibility": {
6
6
  "nuxt": "^4.0.0"
7
7
  },
package/dist/module.mjs CHANGED
@@ -6,7 +6,7 @@ import { isRecord, isString, fromEntries, toEntries } from '@onderwijsin/nuxt-mo
6
6
  import { z } from 'zod';
7
7
  import { EditorComponentInputSchema, EditorComponentEnrichmentSchema, SPECIAL_INPUT_TAG_NAME } from '../dist/schema/editor-component-schema.js';
8
8
 
9
- const version = "0.2.1";
9
+ const version = "0.2.2";
10
10
 
11
11
  function resolveRendererNodeName(filePath) {
12
12
  const fileName = basename(filePath, extname(filePath));
@@ -140,7 +140,7 @@ const module$1 = defineNuxtModule({
140
140
  corsOrigin: "*"
141
141
  },
142
142
  moduleDependencies: (nuxt) => moduleDependenciesWhenEnabled(nuxt.options.markdownRenderer, {
143
- "@comark/nuxt": { version: ">=0.7.0" },
143
+ "@comark/nuxt": { version: ">=0.6.2" },
144
144
  "@nuxt/ui": { version: ">=4.0.0" },
145
145
  "nuxt-component-meta": {
146
146
  version: ">=0.18.0",
@@ -8,7 +8,7 @@ export function createRendererManifest(componentLoaders, componentSets) {
8
8
  resolveRendererComponent(name, componentSet) {
9
9
  const normalizedName = resolveComponentName(name);
10
10
  const allowedComponents = componentSet ? componentSets[componentSet] : void 0;
11
- if (componentSet && (!allowedComponents || !allowedComponents.includes(normalizedName))) {
11
+ if (normalizedName !== "Reference" && componentSet && (!allowedComponents || !allowedComponents.includes(normalizedName))) {
12
12
  return null;
13
13
  }
14
14
  return componentLoaders[normalizedName]?.() ?? null;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@onderwijsin/nuxt-markdown-renderer",
3
- "version": "0.2.1",
3
+ "version": "0.2.2",
4
4
  "description": "Nuxt module for rendering Markdown content.",
5
5
  "homepage": "https://github.com/onderwijsin/nuxt-modules#readme",
6
6
  "bugs": {
@@ -37,11 +37,8 @@
37
37
  "access": "public"
38
38
  },
39
39
  "dependencies": {
40
- "@comark/nuxt": "0.7.0",
41
- "@comark/vue": "0.7.0",
42
40
  "@nuxt/kit": "4.5.2",
43
41
  "@nuxt/schema": "4.5.2",
44
- "@nuxt/ui": "4.10.0",
45
42
  "@shikijs/themes": "4.4.3",
46
43
  "add": "2.0.9",
47
44
  "h3": "1.15.11",
@@ -49,17 +46,27 @@
49
46
  "pathe": "2.0.3",
50
47
  "shiki": "4.4.3",
51
48
  "ufo": "1.6.4",
52
- "vue": "3.5.41",
53
49
  "zod": "4.4.3",
54
50
  "@onderwijsin/nuxt-module-utils": "^0.5.1"
55
51
  },
56
52
  "devDependencies": {
53
+ "@comark/nuxt": "0.7.0",
54
+ "@comark/vue": "0.7.0",
57
55
  "@nuxt/module-builder": "1.0.3",
58
56
  "@nuxt/test-utils": "4.1.0",
57
+ "@nuxt/ui": "4.10.0",
59
58
  "comark": "0.7.0",
60
59
  "nuxt": "4.5.2",
61
60
  "typescript": "5.9.3",
62
- "unbuild": "3.6.1"
61
+ "unbuild": "3.6.1",
62
+ "vue": "3.5.41"
63
+ },
64
+ "peerDependencies": {
65
+ "@comark/nuxt": ">=0.6.2",
66
+ "@comark/vue": ">=0.6.2",
67
+ "@nuxt/ui": "^4.0.0",
68
+ "comark": ">=0.6.2",
69
+ "vue": "^3.5.0"
63
70
  },
64
71
  "engines": {
65
72
  "node": ">=24"