nuxt-strapi-blocks-renderer 1.0.1 → 1.0.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/README.md +14 -1
- package/dist/module.json +1 -1
- package/dist/runtime/utils/index.d.ts +1 -0
- package/dist/types.d.mts +2 -2
- package/package.json +20 -15
package/README.md
CHANGED
|
@@ -34,7 +34,7 @@ text editor element:
|
|
|
34
34
|
|
|
35
35
|
```vue
|
|
36
36
|
<script setup lang="ts">
|
|
37
|
-
import type { BlockNode } from '
|
|
37
|
+
import type { BlockNode } from '#strapi-blocks-renderer/types';
|
|
38
38
|
import type { Restaurant } from '~/types';
|
|
39
39
|
|
|
40
40
|
const route = useRoute();
|
|
@@ -95,6 +95,19 @@ To override the default paragraph tag, we create a file called `StrapiBlocksText
|
|
|
95
95
|
|
|
96
96
|
This component assigns a custom class `my-custom-class-for-p` to the paragraph tag, which can be styled as needed.
|
|
97
97
|
|
|
98
|
+
The prefix for the custom components can be adjusted in your `nuxt.config.{js|ts}`:
|
|
99
|
+
|
|
100
|
+
```typescript
|
|
101
|
+
modules: ['nuxt-strapi-blocks-renderer'],
|
|
102
|
+
strapiBlocksRenderer: {
|
|
103
|
+
prefix: 'MyCustomPrefix'
|
|
104
|
+
blocksPrefix: 'MyCustomBlocksPrefix',
|
|
105
|
+
},
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
With this configuration, the `StrapiBlocksText` component becomes `MyCustomPrefixStrapiBlocksText` and the custom
|
|
109
|
+
paragraph node component would be named `MyCustomBlocksPrefixParagraphNode`.
|
|
110
|
+
|
|
98
111
|
#### Other Custom Tags
|
|
99
112
|
|
|
100
113
|
You can apply similar customizations to all other HTML tags used by the renderer.
|
package/dist/module.json
CHANGED
package/dist/types.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
import type { ModuleOptions } from './module'
|
|
2
|
+
import type { ModuleOptions } from './module.js'
|
|
3
3
|
|
|
4
4
|
|
|
5
5
|
declare module '@nuxt/schema' {
|
|
@@ -13,4 +13,4 @@ declare module 'nuxt/schema' {
|
|
|
13
13
|
}
|
|
14
14
|
|
|
15
15
|
|
|
16
|
-
export type { ModuleOptions, default } from './module'
|
|
16
|
+
export type { ModuleOptions, default } from './module.js'
|
package/package.json
CHANGED
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nuxt-strapi-blocks-renderer",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.3",
|
|
4
4
|
"description": "Renderer for the strapi blocks text element.",
|
|
5
5
|
"license": "MIT",
|
|
6
|
+
"repository": {
|
|
7
|
+
"type": "git",
|
|
8
|
+
"url": "https://github.com/freb97/nuxt-strapi-blocks-renderer.git"
|
|
9
|
+
},
|
|
6
10
|
"type": "module",
|
|
7
11
|
"exports": {
|
|
8
12
|
".": {
|
|
@@ -24,26 +28,27 @@
|
|
|
24
28
|
"dev:custom": "nuxi dev playground/custom",
|
|
25
29
|
"release": "npm run lint && npm run test && npm run prepack && npm publish",
|
|
26
30
|
"release:ci": "npm run prepack && npm publish",
|
|
27
|
-
"lint": "eslint './**/*.{js,ts,vue}' --max-warnings=0",
|
|
31
|
+
"lint:es": "eslint './**/*.{js,ts,vue}' --max-warnings=0",
|
|
32
|
+
"lint:types": "tsc",
|
|
28
33
|
"test": "vitest run",
|
|
29
34
|
"test:watch": "vitest watch"
|
|
30
35
|
},
|
|
31
36
|
"dependencies": {
|
|
32
|
-
"@nuxt/kit": "^3.
|
|
33
|
-
"defu": "^6.1.
|
|
37
|
+
"@nuxt/kit": "^3.10.2",
|
|
38
|
+
"defu": "^6.1.4"
|
|
34
39
|
},
|
|
35
40
|
"devDependencies": {
|
|
36
|
-
"@types/node": "^20.
|
|
37
|
-
"@nuxt/devtools": "^1.0.
|
|
41
|
+
"@types/node": "^20.11.19",
|
|
42
|
+
"@nuxt/devtools": "^1.0.8",
|
|
38
43
|
"@nuxt/eslint-config": "^0.2.0",
|
|
39
|
-
"@nuxt/module-builder": "^0.5.
|
|
40
|
-
"@nuxt/schema": "^3.
|
|
41
|
-
"@nuxt/test-utils": "^3.
|
|
42
|
-
"@stylistic/eslint-plugin": "^1.
|
|
43
|
-
"eslint": "^8.
|
|
44
|
-
"nuxt": "^3.
|
|
45
|
-
"vitest": "^1.
|
|
46
|
-
"vue": "^3.
|
|
47
|
-
"vue-eslint-parser": "^9.
|
|
44
|
+
"@nuxt/module-builder": "^0.5.5",
|
|
45
|
+
"@nuxt/schema": "^3.10.2",
|
|
46
|
+
"@nuxt/test-utils": "^3.11.0",
|
|
47
|
+
"@stylistic/eslint-plugin": "^1.6.2",
|
|
48
|
+
"eslint": "^8.56.0",
|
|
49
|
+
"nuxt": "^3.10.2",
|
|
50
|
+
"vitest": "^1.3.0",
|
|
51
|
+
"vue": "^3.4.19",
|
|
52
|
+
"vue-eslint-parser": "^9.4.2"
|
|
48
53
|
}
|
|
49
54
|
}
|