nuxt-strapi-blocks-renderer 1.0.16 → 1.0.17
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 +49 -39
- package/dist/module.json +1 -1
- package/dist/runtime/composables/useBlocksText.js +3 -1
- package/dist/runtime/utils/index.d.ts +11 -11
- package/dist/runtime/utils/index.js +41 -45
- package/package.json +3 -2
package/README.md
CHANGED
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
<p align="center">
|
|
2
|
+
<img width="320" src="https://raw.githubusercontent.com/freb97/nuxt-strapi-blocks-renderer/refs/heads/main/.github/public/nuxt-strapi-blocks-renderer.png">
|
|
3
|
+
</p>
|
|
4
|
+
|
|
1
5
|
# Nuxt Strapi Blocks Renderer
|
|
2
6
|
|
|
3
7
|
[![Github Actions][github-actions-src]][github-actions-href]
|
|
@@ -10,7 +14,7 @@ A fully customizable Nuxt 3 module for rendering text with the new Blocks rich t
|
|
|
10
14
|
The implementation is based on Strapi's [Blocks React Renderer](https://github.com/strapi/blocks-react-renderer/).
|
|
11
15
|
|
|
12
16
|
- ✨ [Release notes](/CHANGELOG.md)
|
|
13
|
-
- 🏀 [Online stackblitz playground](https://stackblitz.com/github/freb97/nuxt-strapi-blocks-renderer?file=playground%
|
|
17
|
+
- 🏀 [Online stackblitz playground](https://stackblitz.com/github/freb97/nuxt-strapi-blocks-renderer?file=playground%2Fcustom%2Fpages%2Findex.vue)
|
|
14
18
|
|
|
15
19
|
## Installation
|
|
16
20
|
|
|
@@ -23,7 +27,9 @@ The implementation is based on Strapi's [Blocks React Renderer](https://github.c
|
|
|
23
27
|
2. Add the module to `nuxt.config.{ts|js}`:
|
|
24
28
|
|
|
25
29
|
```typescript
|
|
26
|
-
|
|
30
|
+
export default defineNuxtConfig({
|
|
31
|
+
modules: [ 'nuxt-strapi-blocks-renderer' ]
|
|
32
|
+
})
|
|
27
33
|
```
|
|
28
34
|
|
|
29
35
|
## Usage
|
|
@@ -73,15 +79,18 @@ This step is crucial for your custom components to be recognized and used by the
|
|
|
73
79
|
|
|
74
80
|
In your Nuxt configuration (`nuxt.config.{js|ts}`), add:
|
|
75
81
|
|
|
76
|
-
```
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
},
|
|
82
|
+
```ts
|
|
83
|
+
export default defineNuxtConfig({
|
|
84
|
+
components: {
|
|
85
|
+
dirs: [
|
|
86
|
+
{
|
|
87
|
+
path: '~/components/blocks',
|
|
88
|
+
pathPrefix: false,
|
|
89
|
+
global: true,
|
|
90
|
+
},
|
|
91
|
+
],
|
|
92
|
+
},
|
|
93
|
+
})
|
|
85
94
|
```
|
|
86
95
|
|
|
87
96
|
#### Customizing the Paragraph Tag
|
|
@@ -90,8 +99,8 @@ To customize the rendering of the paragraph (`<p>`) tag, you need to create a co
|
|
|
90
99
|
The name of the component follows a predefined pattern: `'StrapiBlocksText' + [NodeName] + 'Node.vue'`.
|
|
91
100
|
To override the default paragraph tag, we create a file called `StrapiBlocksTextParagraphNode.vue`.
|
|
92
101
|
|
|
93
|
-
```
|
|
94
|
-
<!-- components/StrapiBlocksTextParagraphNode.vue -->
|
|
102
|
+
```html
|
|
103
|
+
<!-- components/blocks/StrapiBlocksTextParagraphNode.vue -->
|
|
95
104
|
<template>
|
|
96
105
|
<p class="my-custom-class-for-p">
|
|
97
106
|
<slot />
|
|
@@ -103,12 +112,13 @@ This component assigns a custom class `my-custom-class-for-p` to the paragraph t
|
|
|
103
112
|
|
|
104
113
|
The prefix for the custom components can be adjusted in your `nuxt.config.{js|ts}`:
|
|
105
114
|
|
|
106
|
-
```
|
|
107
|
-
|
|
108
|
-
strapiBlocksRenderer: {
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
},
|
|
115
|
+
```ts
|
|
116
|
+
export default defineNuxtConfig({
|
|
117
|
+
strapiBlocksRenderer: {
|
|
118
|
+
prefix: 'MyCustomPrefix',
|
|
119
|
+
blocksPrefix: 'MyCustomBlocksPrefix',
|
|
120
|
+
},
|
|
121
|
+
})
|
|
112
122
|
```
|
|
113
123
|
|
|
114
124
|
With this configuration, the `StrapiBlocksText` component becomes `MyCustomPrefixStrapiBlocksText` and the custom
|
|
@@ -123,15 +133,15 @@ You can apply similar customizations to all other HTML tags used by the renderer
|
|
|
123
133
|
|
|
124
134
|
Custom heading tags (`<h1>`, `<h2>`, `<h3>`, etc.):
|
|
125
135
|
|
|
126
|
-
```
|
|
127
|
-
<!-- components/StrapiBlocksTextHeading1Node.vue -->
|
|
136
|
+
```html
|
|
137
|
+
<!-- components/blocks/StrapiBlocksTextHeading1Node.vue -->
|
|
128
138
|
<template>
|
|
129
139
|
<h1 class="my-custom-class-for-h1">
|
|
130
140
|
<slot />
|
|
131
141
|
</h1>
|
|
132
142
|
</template>
|
|
133
143
|
|
|
134
|
-
<!-- components/StrapiBlocksTextHeading2Node.vue -->
|
|
144
|
+
<!-- components/blocks/StrapiBlocksTextHeading2Node.vue -->
|
|
135
145
|
<template>
|
|
136
146
|
<h2 class="my-custom-class-for-h2">
|
|
137
147
|
<slot />
|
|
@@ -147,22 +157,22 @@ This pattern also extends to the `h3`, `h4`, `h5` and `h6` tags.
|
|
|
147
157
|
|
|
148
158
|
Custom list tags (`<ol>`, `<ul>` and `<li>`):
|
|
149
159
|
|
|
150
|
-
```
|
|
151
|
-
<!-- components/StrapiBlocksTextOrderedListNode.vue -->
|
|
160
|
+
```html
|
|
161
|
+
<!-- components/blocks/StrapiBlocksTextOrderedListNode.vue -->
|
|
152
162
|
<template>
|
|
153
163
|
<ol class="my-custom-class-for-ol">
|
|
154
164
|
<slot />
|
|
155
165
|
</ol>
|
|
156
166
|
</template>
|
|
157
167
|
|
|
158
|
-
<!-- components/StrapiBlocksTextUnorderedListNode.vue -->
|
|
168
|
+
<!-- components/blocks/StrapiBlocksTextUnorderedListNode.vue -->
|
|
159
169
|
<template>
|
|
160
170
|
<ul class="my-custom-class-for-ul">
|
|
161
171
|
<slot />
|
|
162
172
|
</ul>
|
|
163
173
|
</template>
|
|
164
174
|
|
|
165
|
-
<!-- components/StrapiBlocksTextListItemInlineNode.vue -->
|
|
175
|
+
<!-- components/blocks/StrapiBlocksTextListItemInlineNode.vue -->
|
|
166
176
|
<template>
|
|
167
177
|
<li class="my-custom-class-for-li">
|
|
168
178
|
<slot />
|
|
@@ -176,15 +186,15 @@ Custom list tags (`<ol>`, `<ul>` and `<li>`):
|
|
|
176
186
|
|
|
177
187
|
Custom blockquote and code tags (`<blockquote>`, `<pre>`):
|
|
178
188
|
|
|
179
|
-
```
|
|
180
|
-
<!-- components/StrapiBlocksTextQuoteNode.vue -->
|
|
189
|
+
```html
|
|
190
|
+
<!-- components/blocks/StrapiBlocksTextQuoteNode.vue -->
|
|
181
191
|
<template>
|
|
182
192
|
<blockquote class="my-custom-class-for-blockquote">
|
|
183
193
|
<slot />
|
|
184
194
|
</blockquote>
|
|
185
195
|
</template>
|
|
186
196
|
|
|
187
|
-
<!-- components/StrapiBlocksTextCodeNode.vue -->
|
|
197
|
+
<!-- components/blocks/StrapiBlocksTextCodeNode.vue -->
|
|
188
198
|
<template>
|
|
189
199
|
<pre class="my-custom-class-for-pre"><slot /></pre>
|
|
190
200
|
</template>
|
|
@@ -196,36 +206,36 @@ Custom blockquote and code tags (`<blockquote>`, `<pre>`):
|
|
|
196
206
|
|
|
197
207
|
Custom inline text nodes (`<strong>`, `<em>`, `<u>`, `<del>`, `<code>`):
|
|
198
208
|
|
|
199
|
-
```
|
|
200
|
-
<!-- components/StrapiBlocksTextBoldInlineNode.vue -->
|
|
209
|
+
```html
|
|
210
|
+
<!-- components/blocks/StrapiBlocksTextBoldInlineNode.vue -->
|
|
201
211
|
<template>
|
|
202
212
|
<strong class="my-custom-class-for-strong">
|
|
203
213
|
<slot />
|
|
204
214
|
</strong>
|
|
205
215
|
</template>
|
|
206
216
|
|
|
207
|
-
<!-- components/StrapiBlocksTextItalicInlineNode
|
|
217
|
+
<!-- components/blocks/StrapiBlocksTextItalicInlineNode -->
|
|
208
218
|
<template>
|
|
209
219
|
<em class="my-custom-class-for-em">
|
|
210
220
|
<slot />
|
|
211
221
|
</em>
|
|
212
222
|
</template>
|
|
213
223
|
|
|
214
|
-
<!-- components/StrapiBlocksTextUnderlineInlineNode
|
|
224
|
+
<!-- components/blocks/StrapiBlocksTextUnderlineInlineNode -->
|
|
215
225
|
<template>
|
|
216
226
|
<u class="my-custom-class-for-u">
|
|
217
227
|
<slot />
|
|
218
228
|
</u>
|
|
219
229
|
</template>
|
|
220
230
|
|
|
221
|
-
<!-- components/StrapiBlocksTextStrikethroughInlineNode
|
|
231
|
+
<!-- components/blocks/StrapiBlocksTextStrikethroughInlineNode -->
|
|
222
232
|
<template>
|
|
223
233
|
<del class="my-custom-class-for-del">
|
|
224
234
|
<slot />
|
|
225
235
|
</del>
|
|
226
236
|
</template>
|
|
227
237
|
|
|
228
|
-
<!-- components/StrapiBlocksTextCodeInlineNode.vue -->
|
|
238
|
+
<!-- components/blocks/StrapiBlocksTextCodeInlineNode.vue -->
|
|
229
239
|
<template>
|
|
230
240
|
<code class="my-custom-class-for-code">
|
|
231
241
|
<slot />
|
|
@@ -239,8 +249,8 @@ Custom inline text nodes (`<strong>`, `<em>`, `<u>`, `<del>`, `<code>`):
|
|
|
239
249
|
|
|
240
250
|
Custom link tag (`<a>`):
|
|
241
251
|
|
|
242
|
-
```
|
|
243
|
-
<!-- components/StrapiBlocksTextLinkInlineNode.vue -->
|
|
252
|
+
```html
|
|
253
|
+
<!-- components/blocks/StrapiBlocksTextLinkInlineNode.vue -->
|
|
244
254
|
<script setup lang="ts">
|
|
245
255
|
const props = defineProps<{
|
|
246
256
|
url: string;
|
|
@@ -262,8 +272,8 @@ When rendering a link tag, the url gets passed as the `url` component property.
|
|
|
262
272
|
|
|
263
273
|
Custom image tag (`<img>`):
|
|
264
274
|
|
|
265
|
-
```
|
|
266
|
-
<!-- components/StrapiBlocksTextImageNode.vue -->
|
|
275
|
+
```html
|
|
276
|
+
<!-- components/blocks/StrapiBlocksTextImageNode.vue -->
|
|
267
277
|
<script setup lang="ts">
|
|
268
278
|
const props = defineProps<{
|
|
269
279
|
image: any;
|
package/dist/module.json
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
|
+
import { useRuntimeConfig } from "#imports";
|
|
1
2
|
import { renderBlocks } from "#strapi-blocks-renderer/utils";
|
|
2
3
|
export const useBlocksText = (blockNodes) => {
|
|
3
|
-
const
|
|
4
|
+
const prefix = useRuntimeConfig().public.strapiBlocksRenderer.blocksPrefix;
|
|
5
|
+
const textNodes = renderBlocks(blockNodes, prefix);
|
|
4
6
|
return {
|
|
5
7
|
text: textNodes
|
|
6
8
|
};
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import type { BlockNode, CodeBlockNode, DefaultInlineNode, HeadingBlockNode, ImageBlockNode, LinkInlineNode, ListBlockNode, ListItemInlineNode, ParagraphBlockNode, QuoteBlockNode, TextInlineNode } from '#strapi-blocks-renderer/types';
|
|
2
2
|
import type { VNode } from 'vue';
|
|
3
|
-
export declare const textInlineNode: (node: TextInlineNode) => (VNode | string)[] | VNode;
|
|
4
|
-
export declare const linkInlineNode: (node: LinkInlineNode) => VNode;
|
|
5
|
-
export declare const defaultInlineNode: (node: DefaultInlineNode) => (VNode | string)[] | VNode | undefined;
|
|
6
|
-
export declare const listItemInlineNode: (node: ListItemInlineNode) => VNode;
|
|
7
|
-
export declare const headingBlockNode: (node: HeadingBlockNode) => VNode;
|
|
8
|
-
export declare const paragraphBlockNode: (node: ParagraphBlockNode) => VNode;
|
|
9
|
-
export declare const codeBlockNode: (node: CodeBlockNode) => VNode;
|
|
10
|
-
export declare const quoteBlockNode: (node: QuoteBlockNode) => VNode;
|
|
11
|
-
export declare const listBlockNode: (node: ListBlockNode) => VNode;
|
|
12
|
-
export declare const imageBlockNode: (node: ImageBlockNode) => VNode;
|
|
13
|
-
export declare const renderBlocks: (blockNodes: BlockNode[]) => VNode[];
|
|
3
|
+
export declare const textInlineNode: (node: TextInlineNode, prefix: string) => (VNode | string)[] | VNode;
|
|
4
|
+
export declare const linkInlineNode: (node: LinkInlineNode, prefix: string) => VNode;
|
|
5
|
+
export declare const defaultInlineNode: (node: DefaultInlineNode, prefix: string) => (VNode | string)[] | VNode | undefined;
|
|
6
|
+
export declare const listItemInlineNode: (node: ListItemInlineNode, prefix: string) => VNode;
|
|
7
|
+
export declare const headingBlockNode: (node: HeadingBlockNode, prefix: string) => VNode;
|
|
8
|
+
export declare const paragraphBlockNode: (node: ParagraphBlockNode, prefix: string) => VNode;
|
|
9
|
+
export declare const codeBlockNode: (node: CodeBlockNode, prefix: string) => VNode;
|
|
10
|
+
export declare const quoteBlockNode: (node: QuoteBlockNode, prefix: string) => VNode;
|
|
11
|
+
export declare const listBlockNode: (node: ListBlockNode, prefix: string) => VNode;
|
|
12
|
+
export declare const imageBlockNode: (node: ImageBlockNode, prefix: string) => VNode;
|
|
13
|
+
export declare const renderBlocks: (blockNodes: BlockNode[], prefix: string) => VNode[];
|
|
@@ -1,8 +1,4 @@
|
|
|
1
|
-
import { h, resolveComponent
|
|
2
|
-
const prefix = () => {
|
|
3
|
-
const { public: { strapiBlocksRenderer } } = useRuntimeConfig();
|
|
4
|
-
return strapiBlocksRenderer.blocksPrefix;
|
|
5
|
-
};
|
|
1
|
+
import { h, resolveComponent } from "vue";
|
|
6
2
|
const getNodeText = (node) => {
|
|
7
3
|
const lines = [];
|
|
8
4
|
node.text.split("\n").forEach((line, index, array) => {
|
|
@@ -13,91 +9,91 @@ const getNodeText = (node) => {
|
|
|
13
9
|
});
|
|
14
10
|
return lines;
|
|
15
11
|
};
|
|
16
|
-
export const textInlineNode = (node) => {
|
|
12
|
+
export const textInlineNode = (node, prefix) => {
|
|
17
13
|
const text = getNodeText(node);
|
|
18
|
-
if (node.bold) return h(resolveComponent(`${prefix
|
|
19
|
-
if (node.italic) return h(resolveComponent(`${prefix
|
|
20
|
-
if (node.underline) return h(resolveComponent(`${prefix
|
|
21
|
-
if (node.strikethrough) return h(resolveComponent(`${prefix
|
|
22
|
-
if (node.code) return h(resolveComponent(`${prefix
|
|
14
|
+
if (node.bold) return h(resolveComponent(`${prefix}BoldInlineNode`), () => text);
|
|
15
|
+
if (node.italic) return h(resolveComponent(`${prefix}ItalicInlineNode`), () => text);
|
|
16
|
+
if (node.underline) return h(resolveComponent(`${prefix}UnderlineInlineNode`), () => text);
|
|
17
|
+
if (node.strikethrough) return h(resolveComponent(`${prefix}StrikethroughInlineNode`), () => text);
|
|
18
|
+
if (node.code) return h(resolveComponent(`${prefix}CodeInlineNode`), () => text);
|
|
23
19
|
return text;
|
|
24
20
|
};
|
|
25
|
-
export const linkInlineNode = (node) => {
|
|
26
|
-
const linkComponent = resolveComponent(`${prefix
|
|
21
|
+
export const linkInlineNode = (node, prefix) => {
|
|
22
|
+
const linkComponent = resolveComponent(`${prefix}LinkInlineNode`);
|
|
27
23
|
return h(linkComponent, { url: node.url }, () => node.children.map((childNode) => {
|
|
28
|
-
return textInlineNode(childNode);
|
|
24
|
+
return textInlineNode(childNode, prefix);
|
|
29
25
|
}));
|
|
30
26
|
};
|
|
31
|
-
export const defaultInlineNode = (node) => {
|
|
27
|
+
export const defaultInlineNode = (node, prefix) => {
|
|
32
28
|
if (node.type === "link") {
|
|
33
|
-
return linkInlineNode(node);
|
|
29
|
+
return linkInlineNode(node, prefix);
|
|
34
30
|
} else if (node.type === "text") {
|
|
35
|
-
return textInlineNode(node);
|
|
31
|
+
return textInlineNode(node, prefix);
|
|
36
32
|
}
|
|
37
33
|
};
|
|
38
|
-
export const listItemInlineNode = (node) => {
|
|
39
|
-
const listItemComponent = resolveComponent(`${prefix
|
|
34
|
+
export const listItemInlineNode = (node, prefix) => {
|
|
35
|
+
const listItemComponent = resolveComponent(`${prefix}ListItemInlineNode`);
|
|
40
36
|
return h(listItemComponent, () => node.children.map(
|
|
41
|
-
(childNode) => defaultInlineNode(childNode)
|
|
37
|
+
(childNode) => defaultInlineNode(childNode, prefix)
|
|
42
38
|
));
|
|
43
39
|
};
|
|
44
|
-
export const headingBlockNode = (node) => {
|
|
45
|
-
const headingComponent = resolveComponent(`${prefix
|
|
40
|
+
export const headingBlockNode = (node, prefix) => {
|
|
41
|
+
const headingComponent = resolveComponent(`${prefix}Heading${node.level}Node`);
|
|
46
42
|
return h(headingComponent, () => node.children.map(
|
|
47
|
-
(childNode) => defaultInlineNode(childNode)
|
|
43
|
+
(childNode) => defaultInlineNode(childNode, prefix)
|
|
48
44
|
));
|
|
49
45
|
};
|
|
50
|
-
export const paragraphBlockNode = (node) => {
|
|
51
|
-
const paragraphComponent = resolveComponent(`${prefix
|
|
46
|
+
export const paragraphBlockNode = (node, prefix) => {
|
|
47
|
+
const paragraphComponent = resolveComponent(`${prefix}ParagraphNode`);
|
|
52
48
|
return h(paragraphComponent, () => node.children.map(
|
|
53
|
-
(childNode) => defaultInlineNode(childNode)
|
|
49
|
+
(childNode) => defaultInlineNode(childNode, prefix)
|
|
54
50
|
));
|
|
55
51
|
};
|
|
56
|
-
export const codeBlockNode = (node) => {
|
|
57
|
-
const codeComponent = resolveComponent(`${prefix
|
|
52
|
+
export const codeBlockNode = (node, prefix) => {
|
|
53
|
+
const codeComponent = resolveComponent(`${prefix}CodeNode`);
|
|
58
54
|
return h(codeComponent, () => node.children.map(
|
|
59
|
-
(childNode) => textInlineNode(childNode)
|
|
55
|
+
(childNode) => textInlineNode(childNode, prefix)
|
|
60
56
|
));
|
|
61
57
|
};
|
|
62
|
-
export const quoteBlockNode = (node) => {
|
|
63
|
-
const quoteComponent = resolveComponent(`${prefix
|
|
58
|
+
export const quoteBlockNode = (node, prefix) => {
|
|
59
|
+
const quoteComponent = resolveComponent(`${prefix}QuoteNode`);
|
|
64
60
|
return h(quoteComponent, () => node.children.map(
|
|
65
|
-
(childNode) => defaultInlineNode(childNode)
|
|
61
|
+
(childNode) => defaultInlineNode(childNode, prefix)
|
|
66
62
|
));
|
|
67
63
|
};
|
|
68
|
-
export const listBlockNode = (node) => {
|
|
64
|
+
export const listBlockNode = (node, prefix) => {
|
|
69
65
|
const listType = node.format === "ordered" ? "OrderedListNode" : "UnorderedListNode";
|
|
70
|
-
const listComponent = resolveComponent(prefix
|
|
66
|
+
const listComponent = resolveComponent(`${prefix}${listType}`);
|
|
71
67
|
return h(listComponent, () => node.children.map(
|
|
72
68
|
(childNode) => {
|
|
73
69
|
if (childNode.type === "list-item") {
|
|
74
|
-
return listItemInlineNode(childNode);
|
|
70
|
+
return listItemInlineNode(childNode, prefix);
|
|
75
71
|
}
|
|
76
|
-
return listBlockNode(childNode);
|
|
72
|
+
return listBlockNode(childNode, prefix);
|
|
77
73
|
}
|
|
78
74
|
));
|
|
79
75
|
};
|
|
80
|
-
export const imageBlockNode = (node) => {
|
|
81
|
-
const imageComponent = resolveComponent(`${prefix
|
|
76
|
+
export const imageBlockNode = (node, prefix) => {
|
|
77
|
+
const imageComponent = resolveComponent(`${prefix}ImageNode`);
|
|
82
78
|
return h(imageComponent, {
|
|
83
79
|
image: node.image
|
|
84
80
|
});
|
|
85
81
|
};
|
|
86
|
-
export const renderBlocks = (blockNodes) => {
|
|
82
|
+
export const renderBlocks = (blockNodes, prefix) => {
|
|
87
83
|
return blockNodes.map((blockNode) => {
|
|
88
84
|
switch (blockNode.type) {
|
|
89
85
|
case "heading":
|
|
90
|
-
return headingBlockNode(blockNode);
|
|
86
|
+
return headingBlockNode(blockNode, prefix);
|
|
91
87
|
case "code":
|
|
92
|
-
return codeBlockNode(blockNode);
|
|
88
|
+
return codeBlockNode(blockNode, prefix);
|
|
93
89
|
case "list":
|
|
94
|
-
return listBlockNode(blockNode);
|
|
90
|
+
return listBlockNode(blockNode, prefix);
|
|
95
91
|
case "quote":
|
|
96
|
-
return quoteBlockNode(blockNode);
|
|
92
|
+
return quoteBlockNode(blockNode, prefix);
|
|
97
93
|
case "image":
|
|
98
|
-
return imageBlockNode(blockNode);
|
|
94
|
+
return imageBlockNode(blockNode, prefix);
|
|
99
95
|
default:
|
|
100
|
-
return paragraphBlockNode(blockNode);
|
|
96
|
+
return paragraphBlockNode(blockNode, prefix);
|
|
101
97
|
}
|
|
102
98
|
});
|
|
103
99
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nuxt-strapi-blocks-renderer",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.17",
|
|
4
4
|
"description": "Renderer for the strapi CMS blocks text content element.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -53,6 +53,7 @@
|
|
|
53
53
|
"@nuxt/module-builder": "^1.0.1",
|
|
54
54
|
"@nuxt/schema": "^3.16.2",
|
|
55
55
|
"@nuxt/test-utils": "^3.17.2",
|
|
56
|
+
"@nuxtjs/tailwindcss": "^6.13.2",
|
|
56
57
|
"eslint": "^9.24.0",
|
|
57
58
|
"nuxt": "^3.16.2",
|
|
58
59
|
"renovate": "^39.240.1",
|
|
@@ -75,6 +76,6 @@
|
|
|
75
76
|
"node": "^18.x || ^20.x || ^22.x"
|
|
76
77
|
},
|
|
77
78
|
"stackblitz": {
|
|
78
|
-
"startCommand": "npm run dev:prepare && npm run dev"
|
|
79
|
+
"startCommand": "npm run dev:prepare && npm run dev:custom"
|
|
79
80
|
}
|
|
80
81
|
}
|