nuxt-strapi-blocks-renderer 1.0.12 → 1.0.14

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,9 +1,9 @@
1
1
  {
2
2
  "name": "nuxt-strapi-blocks-renderer",
3
3
  "configKey": "strapiBlocksRenderer",
4
- "version": "1.0.12",
4
+ "version": "1.0.14",
5
5
  "builder": {
6
- "@nuxt/module-builder": "0.8.3",
6
+ "@nuxt/module-builder": "0.8.4",
7
7
  "unbuild": "2.0.0"
8
8
  }
9
9
  }
@@ -1,18 +1,18 @@
1
1
  <script setup lang="ts">
2
- import type { VNode } from 'vue';
3
- import type { BlockNode } from '#strapi-blocks-renderer/types';
2
+ import type { BlockNode } from '#strapi-blocks-renderer/types';
3
+ import type { VNode } from 'vue';
4
4
 
5
- import { useBlocksText } from '#strapi-blocks-renderer/composables/useBlocksText';
5
+ import { useBlocksText } from '#strapi-blocks-renderer/composables/useBlocksText';
6
6
 
7
- const props = defineProps<{
8
- nodes: BlockNode[]
9
- }>();
7
+ const props = defineProps<{
8
+ nodes: BlockNode[];
9
+ }>();
10
10
 
11
- const { text } = useBlocksText(props.nodes);
11
+ const { text } = useBlocksText(props.nodes);
12
12
 
13
- const RenderText = (): VNode[] => {
14
- return text;
15
- };
13
+ const RenderText = (): VNode[] => {
14
+ return text;
15
+ };
16
16
  </script>
17
17
 
18
18
  <template>
@@ -1,7 +1,7 @@
1
1
  <script setup lang="ts">
2
- const props = defineProps<{
3
- image: any
4
- }>();
2
+ const props = defineProps<{
3
+ image: Record<string, string>;
4
+ }>();
5
5
  </script>
6
6
 
7
7
  <template>
@@ -1,7 +1,7 @@
1
1
  <script setup lang="ts">
2
- const props = defineProps<{
3
- url: string
4
- }>();
2
+ const props = defineProps<{
3
+ url: string;
4
+ }>();
5
5
  </script>
6
6
 
7
7
  <template>
@@ -1,5 +1,5 @@
1
- import type { VNode } from 'vue';
2
1
  import type { BlockNode } from '#strapi-blocks-renderer/types';
2
+ import type { VNode } from 'vue';
3
3
  export interface UseBlocksTextReturn {
4
4
  text: VNode[];
5
5
  }
@@ -1,24 +1,24 @@
1
1
  // Inline nodes
2
2
 
3
3
  export interface TextInlineNode {
4
- type: 'text'
5
- text: string
6
- bold?: boolean
7
- italic?: boolean
8
- underline?: boolean
9
- strikethrough?: boolean
10
- code?: boolean
4
+ type: 'text';
5
+ text: string;
6
+ bold?: boolean;
7
+ italic?: boolean;
8
+ underline?: boolean;
9
+ strikethrough?: boolean;
10
+ code?: boolean;
11
11
  }
12
12
 
13
13
  export interface LinkInlineNode {
14
- type: 'link'
15
- url: string
16
- children: TextInlineNode[]
14
+ type: 'link';
15
+ url: string;
16
+ children: TextInlineNode[];
17
17
  }
18
18
 
19
19
  export interface ListItemInlineNode {
20
- type: 'list-item'
21
- children: DefaultInlineNode[]
20
+ type: 'list-item';
21
+ children: DefaultInlineNode[];
22
22
  }
23
23
 
24
24
  export type DefaultInlineNode = TextInlineNode | LinkInlineNode;
@@ -26,42 +26,42 @@ export type DefaultInlineNode = TextInlineNode | LinkInlineNode;
26
26
  // Typed nodes
27
27
 
28
28
  export interface ParagraphBlockNode {
29
- type: 'paragraph'
30
- children: DefaultInlineNode[]
29
+ type: 'paragraph';
30
+ children: DefaultInlineNode[];
31
31
  }
32
32
 
33
33
  export interface HeadingBlockNode {
34
- type: 'heading'
35
- level: 1 | 2 | 3 | 4 | 5 | 6
36
- children: DefaultInlineNode[]
34
+ type: 'heading';
35
+ level: 1 | 2 | 3 | 4 | 5 | 6;
36
+ children: DefaultInlineNode[];
37
37
  }
38
38
 
39
39
  export interface ListBlockNode {
40
- type: 'list'
41
- format: 'ordered' | 'unordered'
42
- children: (ListItemInlineNode | ListBlockNode)[]
40
+ type: 'list';
41
+ format: 'ordered' | 'unordered';
42
+ children: (ListItemInlineNode | ListBlockNode)[];
43
43
  }
44
44
 
45
45
  export interface QuoteBlockNode {
46
- type: 'quote'
47
- children: DefaultInlineNode[]
46
+ type: 'quote';
47
+ children: DefaultInlineNode[];
48
48
  }
49
49
 
50
50
  export interface CodeBlockNode {
51
- type: 'code'
52
- children: TextInlineNode[]
51
+ type: 'code';
52
+ children: TextInlineNode[];
53
53
  }
54
54
 
55
55
  export interface ImageBlockNode {
56
- type: 'image'
57
- image: any
58
- children: [{ type: 'text', text: '' }]
56
+ type: 'image';
57
+ image: Record<string, string>;
58
+ children: [{ type: 'text'; text: '' }];
59
59
  }
60
60
 
61
61
  export type BlockNode =
62
- ParagraphBlockNode |
63
- QuoteBlockNode |
64
- CodeBlockNode |
65
- HeadingBlockNode |
66
- ListBlockNode |
67
- ImageBlockNode;
62
+ ParagraphBlockNode |
63
+ QuoteBlockNode |
64
+ CodeBlockNode |
65
+ HeadingBlockNode |
66
+ ListBlockNode |
67
+ ImageBlockNode;
@@ -1,5 +1,5 @@
1
- import type { VNode } from 'vue';
2
1
  import type { BlockNode, CodeBlockNode, DefaultInlineNode, HeadingBlockNode, ImageBlockNode, LinkInlineNode, ListBlockNode, ListItemInlineNode, ParagraphBlockNode, QuoteBlockNode, TextInlineNode } from '#strapi-blocks-renderer/types';
2
+ import type { VNode } from 'vue';
3
3
  export declare const textInlineNode: (node: TextInlineNode) => (VNode | string)[] | VNode;
4
4
  export declare const linkInlineNode: (node: LinkInlineNode) => VNode;
5
5
  export declare const defaultInlineNode: (node: DefaultInlineNode) => (VNode | string)[] | VNode | undefined;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nuxt-strapi-blocks-renderer",
3
- "version": "1.0.12",
3
+ "version": "1.0.14",
4
4
  "description": "Renderer for the strapi CMS blocks text content element.",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -39,20 +39,20 @@
39
39
  "renovate:config:validate": "renovate-config-validator"
40
40
  },
41
41
  "dependencies": {
42
- "@nuxt/kit": "^3.13.0",
42
+ "@nuxt/kit": "^3.14.1592",
43
43
  "defu": "^6.1.4"
44
44
  },
45
45
  "devDependencies": {
46
- "@antfu/eslint-config": "^2.27.1",
47
- "@nuxt/devtools": "^1.3.14",
48
- "@nuxt/module-builder": "^0.8.3",
49
- "@nuxt/schema": "^3.13.0",
50
- "@nuxt/test-utils": "^3.14.1",
51
- "eslint": "^8.57.0",
52
- "nuxt": "^3.13.0",
53
- "renovate": "^38.51.1",
54
- "vitest": "^2.0.5",
55
- "vue-tsc": "^2.0.29"
46
+ "@nuxt/devtools": "^1.6.1",
47
+ "@nuxt/eslint-config": "^0.7.2",
48
+ "@nuxt/module-builder": "^0.8.4",
49
+ "@nuxt/schema": "^3.14.1592",
50
+ "@nuxt/test-utils": "^3.14.4",
51
+ "eslint": "^9.16.0",
52
+ "nuxt": "^3.14.1592",
53
+ "renovate": "^39.42.4",
54
+ "vitest": "^2.1.6",
55
+ "vue-tsc": "^2.1.10"
56
56
  },
57
57
  "keywords": [
58
58
  "nuxt",
@@ -62,7 +62,9 @@
62
62
  "strapi",
63
63
  "strapi-cms",
64
64
  "json",
65
- "blocks"
65
+ "blocks",
66
+ "text",
67
+ "renderer"
66
68
  ],
67
69
  "engines": {
68
70
  "node": "^18.x || ^20.x || ^22.x"