@wpnuxt/blocks 0.0.16 → 2.0.0-alpha.1
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.d.mts +20 -4
- package/dist/module.json +3 -3
- package/dist/module.mjs +132 -39
- package/dist/runtime/components/BlockComponent.d.vue.ts +0 -0
- package/dist/runtime/components/BlockComponent.vue +15 -22
- package/dist/runtime/components/BlockComponent.vue.d.ts +0 -0
- package/dist/runtime/components/BlockRenderer.d.vue.ts +0 -0
- package/dist/runtime/components/BlockRenderer.vue +12 -10
- package/dist/runtime/components/BlockRenderer.vue.d.ts +0 -0
- package/dist/runtime/components/blocks/CoreButton.d.vue.ts +0 -0
- package/dist/runtime/components/blocks/CoreButton.vue +38 -16
- package/dist/runtime/components/blocks/CoreButton.vue.d.ts +0 -0
- package/dist/runtime/components/blocks/CoreButtons.d.vue.ts +0 -0
- package/dist/runtime/components/blocks/CoreButtons.vue +14 -14
- package/dist/runtime/components/blocks/CoreButtons.vue.d.ts +0 -0
- package/dist/runtime/components/blocks/CoreDetails.d.vue.ts +0 -0
- package/dist/runtime/components/blocks/CoreDetails.vue +25 -0
- package/dist/runtime/components/blocks/CoreDetails.vue.d.ts +0 -0
- package/dist/runtime/components/blocks/CoreGallery.d.vue.ts +0 -0
- package/dist/runtime/components/blocks/CoreGallery.vue +10 -12
- package/dist/runtime/components/blocks/CoreGallery.vue.d.ts +0 -0
- package/dist/runtime/components/blocks/CoreHeading.d.vue.ts +0 -0
- package/dist/runtime/components/blocks/CoreHeading.vue +18 -20
- package/dist/runtime/components/blocks/CoreHeading.vue.d.ts +0 -0
- package/dist/runtime/components/blocks/CoreImage.d.vue.ts +0 -0
- package/dist/runtime/components/blocks/CoreImage.vue +9 -13
- package/dist/runtime/components/blocks/CoreImage.vue.d.ts +0 -0
- package/dist/runtime/components/blocks/CoreParagraph.d.vue.ts +0 -0
- package/dist/runtime/components/blocks/CoreParagraph.vue +8 -10
- package/dist/runtime/components/blocks/CoreParagraph.vue.d.ts +0 -0
- package/dist/runtime/components/blocks/CoreQuote.d.vue.ts +0 -0
- package/dist/runtime/components/blocks/CoreQuote.vue +5 -7
- package/dist/runtime/components/blocks/CoreQuote.vue.d.ts +0 -0
- package/dist/runtime/components/blocks/CoreSpacer.d.vue.ts +0 -0
- package/dist/runtime/components/blocks/CoreSpacer.vue +9 -11
- package/dist/runtime/components/blocks/CoreSpacer.vue.d.ts +0 -0
- package/dist/runtime/components/blocks/EditorBlock.d.vue.ts +0 -0
- package/dist/runtime/components/blocks/EditorBlock.vue +5 -7
- package/dist/runtime/components/blocks/EditorBlock.vue.d.ts +0 -0
- package/dist/runtime/queries/fragments/CoreDetails.fragment.gql +15 -0
- package/dist/runtime/queries/fragments/EditorBlock.fragment.gql +7 -7
- package/dist/runtime/queries/fragments/NodeWithEditorBlocks.fragment.gql +1 -1
- package/dist/runtime/types/index.d.ts +0 -0
- package/dist/runtime/types/index.js +0 -0
- package/dist/runtime/util/attributeColor.d.ts +0 -1
- package/dist/runtime/util/attributeFontSize.d.ts +0 -1
- package/dist/runtime/util/index.d.ts +0 -4
- package/dist/types.d.mts +9 -1
- package/package.json +43 -45
- package/README.md +0 -70
- package/dist/module.cjs +0 -5
- package/dist/module.d.ts +0 -8
- package/dist/runtime/queries/fragments/Page.fragment.gql +0 -17
- package/dist/runtime/queries/fragments/Post.fragment.gql +0 -13
- package/dist/runtime/server/tsconfig.json +0 -3
- package/dist/types.d.ts +0 -1
package/dist/module.d.mts
CHANGED
|
@@ -1,8 +1,24 @@
|
|
|
1
1
|
import * as _nuxt_schema from '@nuxt/schema';
|
|
2
2
|
|
|
3
|
-
interface
|
|
4
|
-
|
|
3
|
+
interface WPNuxtBlocksConfig {
|
|
4
|
+
/**
|
|
5
|
+
* Enable or disable the module
|
|
6
|
+
* @default true
|
|
7
|
+
*/
|
|
8
|
+
enabled?: boolean;
|
|
9
|
+
/**
|
|
10
|
+
* Domains to allow for @nuxt/image
|
|
11
|
+
* @default []
|
|
12
|
+
*/
|
|
13
|
+
imageDomains?: string[];
|
|
14
|
+
/**
|
|
15
|
+
* Enable Nuxt UI integration for enhanced button styling
|
|
16
|
+
* Set to false to use native HTML elements
|
|
17
|
+
* @default 'auto' - uses Nuxt UI if available
|
|
18
|
+
*/
|
|
19
|
+
nuxtUI?: boolean | 'auto';
|
|
5
20
|
}
|
|
6
|
-
declare const _default: _nuxt_schema.NuxtModule<
|
|
21
|
+
declare const _default: _nuxt_schema.NuxtModule<WPNuxtBlocksConfig, WPNuxtBlocksConfig, false>;
|
|
7
22
|
|
|
8
|
-
export {
|
|
23
|
+
export { _default as default };
|
|
24
|
+
export type { WPNuxtBlocksConfig };
|
package/dist/module.json
CHANGED
package/dist/module.mjs
CHANGED
|
@@ -1,30 +1,36 @@
|
|
|
1
|
-
import { promises } from 'node:fs';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { existsSync, cpSync, promises } from 'node:fs';
|
|
2
|
+
import { join } from 'node:path';
|
|
3
|
+
import { defineNuxtModule, createResolver, hasNuxtModule, installModule, addComponentsDir, addTemplate } from '@nuxt/kit';
|
|
4
4
|
|
|
5
|
-
const
|
|
6
|
-
const version = "0.0.16";
|
|
7
|
-
|
|
8
|
-
const module = defineNuxtModule({
|
|
5
|
+
const module$1 = defineNuxtModule({
|
|
9
6
|
meta: {
|
|
10
|
-
name,
|
|
11
|
-
version,
|
|
7
|
+
name: "@wpnuxt/blocks",
|
|
12
8
|
configKey: "wpNuxtBlocks"
|
|
13
9
|
},
|
|
14
|
-
// Default configuration options of the Nuxt module
|
|
15
10
|
defaults: {
|
|
16
|
-
enabled: true
|
|
11
|
+
enabled: true,
|
|
12
|
+
imageDomains: [],
|
|
13
|
+
nuxtUI: "auto"
|
|
17
14
|
},
|
|
18
|
-
async setup(
|
|
15
|
+
async setup(options, nuxt) {
|
|
16
|
+
if (!options.enabled) {
|
|
17
|
+
return;
|
|
18
|
+
}
|
|
19
19
|
const { resolve } = createResolver(import.meta.url);
|
|
20
20
|
const resolveRuntimeModule = (path) => resolve("./runtime", path);
|
|
21
|
-
console.log("::: Setting up @wpnuxt/blocks module");
|
|
22
21
|
nuxt.options.alias["#wpnuxt/blocks"] = resolve(nuxt.options.buildDir, "wpnuxt/blocks");
|
|
23
|
-
|
|
22
|
+
if (options.nuxtUI === true || options.nuxtUI === "auto" && hasNuxtModule("@nuxt/ui")) {
|
|
23
|
+
await installModule("@nuxt/ui");
|
|
24
|
+
}
|
|
24
25
|
await installModule("@nuxt/image", {
|
|
25
|
-
|
|
26
|
-
domains: ["wordpress.wpnuxt.com"]
|
|
26
|
+
domains: options.imageDomains
|
|
27
27
|
});
|
|
28
|
+
await installModule("@radya/nuxt-dompurify");
|
|
29
|
+
const blocksQueriesPath = resolveRuntimeModule("./queries");
|
|
30
|
+
const mergedQueriesFolder = join(nuxt.options.srcDir, ".queries");
|
|
31
|
+
if (existsSync(mergedQueriesFolder) && existsSync(blocksQueriesPath)) {
|
|
32
|
+
cpSync(blocksQueriesPath, mergedQueriesFolder, { recursive: true });
|
|
33
|
+
}
|
|
28
34
|
addComponentsDir({
|
|
29
35
|
path: resolveRuntimeModule("./components"),
|
|
30
36
|
pathPrefix: false,
|
|
@@ -47,33 +53,120 @@ const module = defineNuxtModule({
|
|
|
47
53
|
});
|
|
48
54
|
}
|
|
49
55
|
}
|
|
50
|
-
const componentsContext = { components: [] };
|
|
51
|
-
nuxt.hook("components:extend", (newComponents) => {
|
|
52
|
-
const moduleBlocksDir = resolveRuntimeModule("./components");
|
|
53
|
-
const userBlocksDir = (nuxt.options.srcDir || nuxt.options.rootDir) + "/components/blocks";
|
|
54
|
-
componentsContext.components = newComponents.filter((c) => {
|
|
55
|
-
if (c.filePath.startsWith(moduleBlocksDir) || c.filePath.startsWith(userBlocksDir)) {
|
|
56
|
-
return true;
|
|
57
|
-
}
|
|
58
|
-
return false;
|
|
59
|
-
});
|
|
60
|
-
});
|
|
61
56
|
addTemplate({
|
|
62
57
|
write: true,
|
|
63
58
|
filename: "wpnuxt/blocks.mjs",
|
|
64
|
-
getContents(
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
59
|
+
getContents() {
|
|
60
|
+
return `// Generated by @wpnuxt/blocks
|
|
61
|
+
export * from '#build/graphql-operations'
|
|
62
|
+
`;
|
|
63
|
+
}
|
|
64
|
+
});
|
|
65
|
+
addTemplate({
|
|
66
|
+
write: true,
|
|
67
|
+
filename: "wpnuxt/blocks.d.ts",
|
|
68
|
+
getContents() {
|
|
69
|
+
return `// Generated by @wpnuxt/blocks
|
|
70
|
+
export * from '#build/graphql-operations'
|
|
71
|
+
|
|
72
|
+
export interface EditorBlock {
|
|
73
|
+
__typename?: string
|
|
74
|
+
name?: string | null
|
|
75
|
+
clientId?: string | null
|
|
76
|
+
parentClientId?: string | null
|
|
77
|
+
renderedHtml?: string | null
|
|
78
|
+
attributes?: Record<string, unknown> | null
|
|
79
|
+
innerBlocks?: (EditorBlock | null)[] | null
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
export interface CoreParagraph extends EditorBlock {
|
|
83
|
+
__typename?: 'CoreParagraph'
|
|
84
|
+
attributes?: {
|
|
85
|
+
content?: string | null
|
|
86
|
+
anchor?: string | null
|
|
87
|
+
className?: string | null
|
|
88
|
+
fontSize?: string | null
|
|
89
|
+
textColor?: string | null
|
|
90
|
+
style?: string | null
|
|
91
|
+
} | null
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
export interface CoreHeading extends EditorBlock {
|
|
95
|
+
__typename?: 'CoreHeading'
|
|
96
|
+
attributes: {
|
|
97
|
+
content?: string | null
|
|
98
|
+
level: number
|
|
99
|
+
anchor?: string | null
|
|
100
|
+
className?: string | null
|
|
101
|
+
fontSize?: string | null
|
|
102
|
+
textColor?: string | null
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
export interface CoreImage extends EditorBlock {
|
|
107
|
+
__typename?: 'CoreImage'
|
|
108
|
+
attributes?: {
|
|
109
|
+
url?: string | null
|
|
110
|
+
alt?: string | null
|
|
111
|
+
width?: number | null
|
|
112
|
+
height?: number | null
|
|
113
|
+
scale?: string | null
|
|
114
|
+
caption?: string | null
|
|
115
|
+
className?: string | null
|
|
116
|
+
} | null
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
export interface CoreButton extends EditorBlock {
|
|
120
|
+
__typename?: 'CoreButton'
|
|
121
|
+
attributes: {
|
|
122
|
+
url?: string | null
|
|
123
|
+
text?: string | null
|
|
124
|
+
linkTarget?: string | null
|
|
125
|
+
rel?: string | null
|
|
126
|
+
style?: string | null
|
|
127
|
+
fontSize?: string | null
|
|
128
|
+
className?: string | null
|
|
129
|
+
cssClassName?: string | null
|
|
130
|
+
metadata?: string | null
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
export interface CoreButtons extends EditorBlock {
|
|
135
|
+
__typename?: 'CoreButtons'
|
|
136
|
+
innerBlocks?: (CoreButton | null)[] | null
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
export interface CoreQuote extends EditorBlock {
|
|
140
|
+
__typename?: 'CoreQuote'
|
|
141
|
+
innerBlocks?: (CoreParagraph | null)[] | null
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
export interface CoreGallery extends EditorBlock {
|
|
145
|
+
__typename?: 'CoreGallery'
|
|
146
|
+
innerBlocks?: (CoreImage | null)[] | null
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
export interface CoreSpacer extends EditorBlock {
|
|
150
|
+
__typename?: 'CoreSpacer'
|
|
151
|
+
attributes?: {
|
|
152
|
+
spacerHeight?: string | null
|
|
153
|
+
spacerWidth?: string | null
|
|
154
|
+
className?: string | null
|
|
155
|
+
} | null
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
export interface CoreDetails extends EditorBlock {
|
|
159
|
+
__typename?: 'CoreDetails'
|
|
160
|
+
attributes?: {
|
|
161
|
+
summary?: string | null
|
|
162
|
+
showContent?: boolean | null
|
|
163
|
+
className?: string | null
|
|
164
|
+
} | null
|
|
165
|
+
}
|
|
166
|
+
`;
|
|
167
|
+
}
|
|
75
168
|
});
|
|
76
169
|
}
|
|
77
170
|
});
|
|
78
171
|
|
|
79
|
-
export { module as default };
|
|
172
|
+
export { module$1 as default };
|
|
File without changes
|
|
@@ -1,29 +1,22 @@
|
|
|
1
|
-
<script setup
|
|
2
|
-
import { pascalCase } from
|
|
3
|
-
import { resolveComponent } from
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
block: EditorBlock
|
|
10
|
-
}>()
|
|
11
|
-
const findComponentToRender = async () => {
|
|
12
|
-
// only process top level blocks
|
|
13
|
-
if (props.block.parentClientId === null || props.block.parentClientId === undefined) {
|
|
1
|
+
<script setup>
|
|
2
|
+
import { pascalCase } from "scule";
|
|
3
|
+
import { resolveComponent } from "#imports";
|
|
4
|
+
const props = defineProps({
|
|
5
|
+
block: { type: null, required: true }
|
|
6
|
+
});
|
|
7
|
+
const componentToRender = (() => {
|
|
8
|
+
if (props.block.parentClientId === null || props.block.parentClientId === void 0) {
|
|
14
9
|
if (props.block.name) {
|
|
15
|
-
const componentName = pascalCase(props.block.name)
|
|
16
|
-
const
|
|
17
|
-
if (typeof
|
|
18
|
-
return
|
|
10
|
+
const componentName = pascalCase(props.block.name);
|
|
11
|
+
const resolved = resolveComponent(componentName);
|
|
12
|
+
if (typeof resolved !== "string") {
|
|
13
|
+
return resolved;
|
|
19
14
|
}
|
|
20
15
|
}
|
|
21
|
-
return resolveComponent(
|
|
22
|
-
} else {
|
|
23
|
-
return undefined
|
|
16
|
+
return resolveComponent("EditorBlock");
|
|
24
17
|
}
|
|
25
|
-
|
|
26
|
-
|
|
18
|
+
return void 0;
|
|
19
|
+
})();
|
|
27
20
|
</script>
|
|
28
21
|
|
|
29
22
|
<template>
|
|
File without changes
|
|
File without changes
|
|
@@ -1,18 +1,20 @@
|
|
|
1
|
-
<script setup
|
|
2
|
-
import BlockComponent from
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
node: NodeWithEditorBlocksFragment
|
|
7
|
-
}>()
|
|
1
|
+
<script setup>
|
|
2
|
+
import BlockComponent from "./BlockComponent.vue";
|
|
3
|
+
defineProps({
|
|
4
|
+
node: { type: null, required: true }
|
|
5
|
+
});
|
|
8
6
|
</script>
|
|
9
7
|
|
|
10
8
|
<template>
|
|
11
9
|
<div>
|
|
12
|
-
<
|
|
10
|
+
<template
|
|
13
11
|
v-for="block, index in node.editorBlocks"
|
|
14
12
|
:key="index"
|
|
15
|
-
|
|
16
|
-
|
|
13
|
+
>
|
|
14
|
+
<BlockComponent
|
|
15
|
+
v-if="block"
|
|
16
|
+
:block="block"
|
|
17
|
+
/>
|
|
18
|
+
</template>
|
|
17
19
|
</div>
|
|
18
20
|
</template>
|
|
File without changes
|
|
File without changes
|
|
@@ -1,30 +1,52 @@
|
|
|
1
|
-
<script setup
|
|
2
|
-
import { convertFontSize, getCssClasses } from
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
}>()
|
|
9
|
-
const variant = ref('solid')
|
|
10
|
-
/* if (props.block.attributes?.cssClassName?.includes('is-style-outline')) {
|
|
11
|
-
variant.value = 'outline'
|
|
12
|
-
} */
|
|
1
|
+
<script setup>
|
|
2
|
+
import { convertFontSize, getCssClasses } from "../../util";
|
|
3
|
+
import { ref, useNuxtApp } from "#imports";
|
|
4
|
+
const props = defineProps({
|
|
5
|
+
block: { type: null, required: true }
|
|
6
|
+
});
|
|
7
|
+
const variant = ref("solid");
|
|
13
8
|
if (props.block.attributes?.metadata) {
|
|
14
|
-
|
|
9
|
+
const metadataVariant = props.block.attributes?.metadata?.replaceAll('"', "");
|
|
10
|
+
if (["solid", "outline", "soft", "subtle", "ghost", "link"].includes(metadataVariant)) {
|
|
11
|
+
variant.value = metadataVariant;
|
|
12
|
+
}
|
|
15
13
|
}
|
|
14
|
+
const nuxtApp = useNuxtApp();
|
|
15
|
+
const hasNuxtUI = !!nuxtApp.vueApp.component("UButton");
|
|
16
16
|
</script>
|
|
17
17
|
|
|
18
18
|
<template>
|
|
19
|
+
<!-- Use Nuxt UI UButton when available -->
|
|
19
20
|
<UButton
|
|
20
|
-
|
|
21
|
+
v-if="hasNuxtUI"
|
|
22
|
+
:to="block.attributes.url ?? void 0"
|
|
21
23
|
:target="block.attributes.linkTarget"
|
|
22
24
|
:rel="block.attributes.rel"
|
|
23
25
|
:style="block.attributes.style"
|
|
24
26
|
:variant
|
|
25
27
|
:class="getCssClasses(block)"
|
|
26
|
-
:size="convertFontSize(block.attributes?.fontSize, '', 'md')"
|
|
28
|
+
:size="convertFontSize(block.attributes?.fontSize ?? void 0, '', 'md')"
|
|
27
29
|
>
|
|
28
|
-
<span v-sanitize="block.attributes.text" />
|
|
30
|
+
<span v-sanitize-html="block.attributes.text" />
|
|
29
31
|
</UButton>
|
|
32
|
+
|
|
33
|
+
<!-- Fallback to native link/button when Nuxt UI is not available -->
|
|
34
|
+
<a
|
|
35
|
+
v-else-if="block.attributes.url"
|
|
36
|
+
:href="block.attributes.url"
|
|
37
|
+
:target="block.attributes.linkTarget ?? void 0"
|
|
38
|
+
:rel="block.attributes.rel ?? void 0"
|
|
39
|
+
:style="block.attributes.style"
|
|
40
|
+
:class="['wp-block-button__link', getCssClasses(block)]"
|
|
41
|
+
>
|
|
42
|
+
<span v-sanitize-html="block.attributes.text" />
|
|
43
|
+
</a>
|
|
44
|
+
<button
|
|
45
|
+
v-else
|
|
46
|
+
type="button"
|
|
47
|
+
:style="block.attributes.style"
|
|
48
|
+
:class="['wp-block-button__link', getCssClasses(block)]"
|
|
49
|
+
>
|
|
50
|
+
<span v-sanitize-html="block.attributes.text" />
|
|
51
|
+
</button>
|
|
30
52
|
</template>
|
|
File without changes
|
|
File without changes
|
|
@@ -1,9 +1,7 @@
|
|
|
1
|
-
<script setup
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
block: CoreButtons
|
|
6
|
-
}>()
|
|
1
|
+
<script setup>
|
|
2
|
+
defineProps({
|
|
3
|
+
block: { type: null, required: true }
|
|
4
|
+
});
|
|
7
5
|
</script>
|
|
8
6
|
|
|
9
7
|
<template>
|
|
@@ -12,14 +10,16 @@ defineProps<{
|
|
|
12
10
|
v-for="innerBlock, index in block.innerBlocks"
|
|
13
11
|
:key="index"
|
|
14
12
|
>
|
|
15
|
-
<
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
13
|
+
<template v-if="innerBlock">
|
|
14
|
+
<CoreButton
|
|
15
|
+
v-if="innerBlock.name === 'core/button'"
|
|
16
|
+
:block="innerBlock"
|
|
17
|
+
/>
|
|
18
|
+
<EditorBlock
|
|
19
|
+
v-else
|
|
20
|
+
:block="innerBlock"
|
|
21
|
+
/>
|
|
22
|
+
</template>
|
|
23
23
|
</template>
|
|
24
24
|
</div>
|
|
25
25
|
</template>
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
defineProps({
|
|
3
|
+
block: { type: Object, required: true }
|
|
4
|
+
});
|
|
5
|
+
</script>
|
|
6
|
+
|
|
7
|
+
<template>
|
|
8
|
+
<details
|
|
9
|
+
:open="block.attributes?.showContent ?? false"
|
|
10
|
+
:class="block.attributes?.className ?? void 0"
|
|
11
|
+
>
|
|
12
|
+
<summary v-sanitize-html="block.attributes?.summary" />
|
|
13
|
+
<div v-if="block.innerBlocks?.length">
|
|
14
|
+
<template
|
|
15
|
+
v-for="(innerBlock, index) in block.innerBlocks"
|
|
16
|
+
:key="innerBlock?.clientId ?? index"
|
|
17
|
+
>
|
|
18
|
+
<BlockComponent
|
|
19
|
+
v-if="innerBlock"
|
|
20
|
+
:block="innerBlock"
|
|
21
|
+
/>
|
|
22
|
+
</template>
|
|
23
|
+
</div>
|
|
24
|
+
</details>
|
|
25
|
+
</template>
|
|
File without changes
|
|
File without changes
|
|
@@ -1,16 +1,14 @@
|
|
|
1
|
-
<script setup
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
}>()
|
|
7
|
-
const imageBlocks: CoreImage[] = []
|
|
1
|
+
<script setup>
|
|
2
|
+
const props = defineProps({
|
|
3
|
+
block: { type: null, required: true }
|
|
4
|
+
});
|
|
5
|
+
const imageBlocks = [];
|
|
8
6
|
props.block?.innerBlocks?.forEach((innerBlock) => {
|
|
9
|
-
if (innerBlock && innerBlock.name ===
|
|
10
|
-
const imgBlock = innerBlock
|
|
11
|
-
imageBlocks.push(imgBlock)
|
|
7
|
+
if (innerBlock && innerBlock.name === "core/image") {
|
|
8
|
+
const imgBlock = innerBlock;
|
|
9
|
+
imageBlocks.push(imgBlock);
|
|
12
10
|
}
|
|
13
|
-
})
|
|
11
|
+
});
|
|
14
12
|
</script>
|
|
15
13
|
|
|
16
14
|
<template>
|
|
@@ -22,7 +20,7 @@ props.block?.innerBlocks?.forEach((innerBlock) => {
|
|
|
22
20
|
>
|
|
23
21
|
<div
|
|
24
22
|
v-if="imgBlock"
|
|
25
|
-
class="galleryImgWrapper rounded-lg overflow-hidden relative mb-4 md:mb-6
|
|
23
|
+
class="galleryImgWrapper rounded-lg overflow-hidden relative mb-4 md:mb-6 shadow-md hover:shadow-xl"
|
|
26
24
|
>
|
|
27
25
|
<CoreImage
|
|
28
26
|
:block="imgBlock"
|
|
File without changes
|
|
File without changes
|
|
@@ -1,53 +1,51 @@
|
|
|
1
|
-
<script setup
|
|
2
|
-
import { getCssClasses } from
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
}>()
|
|
8
|
-
const cssClass = getCssClasses(props.block)
|
|
1
|
+
<script setup>
|
|
2
|
+
import { getCssClasses } from "../../util";
|
|
3
|
+
const props = defineProps({
|
|
4
|
+
block: { type: null, required: true }
|
|
5
|
+
});
|
|
6
|
+
const cssClass = getCssClasses(props.block);
|
|
9
7
|
</script>
|
|
10
8
|
|
|
11
9
|
<template>
|
|
12
10
|
<template v-if="block.attributes.level === 1">
|
|
13
11
|
<h1
|
|
14
|
-
:id="block?.attributes?.anchor"
|
|
15
|
-
v-sanitize="block.attributes.content"
|
|
12
|
+
:id="block?.attributes?.anchor ?? void 0"
|
|
13
|
+
v-sanitize-html="block.attributes.content"
|
|
16
14
|
:class="cssClass"
|
|
17
15
|
/>
|
|
18
16
|
</template>
|
|
19
17
|
<template v-else-if="block.attributes.level === 2">
|
|
20
18
|
<h2
|
|
21
|
-
:id="block?.attributes?.anchor"
|
|
22
|
-
v-sanitize="block.attributes.content"
|
|
19
|
+
:id="block?.attributes?.anchor ?? void 0"
|
|
20
|
+
v-sanitize-html="block.attributes.content"
|
|
23
21
|
:class="cssClass"
|
|
24
22
|
/>
|
|
25
23
|
</template>
|
|
26
24
|
<template v-else-if="block.attributes.level === 3">
|
|
27
25
|
<h3
|
|
28
|
-
:id="block?.attributes?.anchor"
|
|
29
|
-
v-sanitize="block.attributes.content"
|
|
26
|
+
:id="block?.attributes?.anchor ?? void 0"
|
|
27
|
+
v-sanitize-html="block.attributes.content"
|
|
30
28
|
:class="cssClass"
|
|
31
29
|
/>
|
|
32
30
|
</template>
|
|
33
31
|
<template v-else-if="block.attributes.level === 4">
|
|
34
32
|
<h4
|
|
35
|
-
:id="block?.attributes?.anchor"
|
|
36
|
-
v-sanitize="block.attributes.content"
|
|
33
|
+
:id="block?.attributes?.anchor ?? void 0"
|
|
34
|
+
v-sanitize-html="block.attributes.content"
|
|
37
35
|
:class="cssClass"
|
|
38
36
|
/>
|
|
39
37
|
</template>
|
|
40
38
|
<template v-else-if="block.attributes.level === 5">
|
|
41
39
|
<h5
|
|
42
|
-
:id="block?.attributes?.anchor"
|
|
43
|
-
v-sanitize="block.attributes.content"
|
|
40
|
+
:id="block?.attributes?.anchor ?? void 0"
|
|
41
|
+
v-sanitize-html="block.attributes.content"
|
|
44
42
|
:class="cssClass"
|
|
45
43
|
/>
|
|
46
44
|
</template>
|
|
47
45
|
<template v-else-if="block.attributes.level === 6">
|
|
48
46
|
<h6
|
|
49
|
-
:id="block?.attributes?.anchor"
|
|
50
|
-
v-sanitize="block.attributes.content"
|
|
47
|
+
:id="block?.attributes?.anchor ?? void 0"
|
|
48
|
+
v-sanitize-html="block.attributes.content"
|
|
51
49
|
:class="cssClass"
|
|
52
50
|
/>
|
|
53
51
|
</template>
|
|
File without changes
|
|
File without changes
|
|
@@ -1,12 +1,8 @@
|
|
|
1
|
-
<script setup
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
const
|
|
6
|
-
block: CoreImage
|
|
7
|
-
}>()
|
|
8
|
-
// const imgUrl = getRelativeImagePath(props.block?.attributes?.url)
|
|
9
|
-
const imgUrl = props.block?.attributes?.url
|
|
1
|
+
<script setup>
|
|
2
|
+
const props = defineProps({
|
|
3
|
+
block: { type: null, required: true }
|
|
4
|
+
});
|
|
5
|
+
const imgUrl = props.block?.attributes?.url;
|
|
10
6
|
</script>
|
|
11
7
|
|
|
12
8
|
<template>
|
|
@@ -15,13 +11,13 @@ const imgUrl = props.block?.attributes?.url
|
|
|
15
11
|
v-if="imgUrl"
|
|
16
12
|
:src="imgUrl"
|
|
17
13
|
:alt="block?.attributes?.alt"
|
|
18
|
-
:width="block?.attributes?.width"
|
|
19
|
-
:height="block?.attributes?.height"
|
|
20
|
-
:fit="block?.attributes?.scale"
|
|
14
|
+
:width="block?.attributes?.width ?? void 0"
|
|
15
|
+
:height="block?.attributes?.height ?? void 0"
|
|
16
|
+
:fit="block?.attributes?.scale ?? void 0"
|
|
21
17
|
/>
|
|
22
18
|
<div
|
|
23
19
|
v-else
|
|
24
|
-
v-sanitize="block?.renderedHtml"
|
|
20
|
+
v-sanitize-html="block?.renderedHtml"
|
|
25
21
|
/>
|
|
26
22
|
</div>
|
|
27
23
|
</template>
|
|
File without changes
|
|
File without changes
|
|
@@ -1,17 +1,15 @@
|
|
|
1
|
-
<script setup
|
|
2
|
-
import { getCssClasses } from
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
block: CoreParagraph
|
|
7
|
-
}>()
|
|
1
|
+
<script setup>
|
|
2
|
+
import { getCssClasses } from "../../util";
|
|
3
|
+
const props = defineProps({
|
|
4
|
+
block: { type: null, required: true }
|
|
5
|
+
});
|
|
8
6
|
</script>
|
|
9
7
|
|
|
10
8
|
<template>
|
|
11
9
|
<p
|
|
12
|
-
:id="block?.attributes?.anchor"
|
|
13
|
-
v-sanitize="block?.attributes?.content"
|
|
10
|
+
:id="block?.attributes?.anchor ?? void 0"
|
|
11
|
+
v-sanitize-html="block?.attributes?.content"
|
|
14
12
|
:class="getCssClasses(props.block)"
|
|
15
|
-
:style="block?.attributes?.style"
|
|
13
|
+
:style="block?.attributes?.style ?? void 0"
|
|
16
14
|
/>
|
|
17
15
|
</template>
|
|
File without changes
|
|
File without changes
|
|
@@ -1,9 +1,7 @@
|
|
|
1
|
-
<script setup
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
block: CoreQuote
|
|
6
|
-
}>()
|
|
1
|
+
<script setup>
|
|
2
|
+
defineProps({
|
|
3
|
+
block: { type: null, required: true }
|
|
4
|
+
});
|
|
7
5
|
</script>
|
|
8
6
|
|
|
9
7
|
<template>
|
|
@@ -12,7 +10,7 @@ defineProps<{
|
|
|
12
10
|
:key="index"
|
|
13
11
|
>
|
|
14
12
|
<CoreParagraph
|
|
15
|
-
v-if="innerBlock.name === 'core/paragraph'"
|
|
13
|
+
v-if="innerBlock && innerBlock.name === 'core/paragraph'"
|
|
16
14
|
class="text-sm text-primary-500"
|
|
17
15
|
:block="innerBlock"
|
|
18
16
|
/>
|
|
File without changes
|
|
File without changes
|
|
@@ -1,19 +1,17 @@
|
|
|
1
|
-
<script setup
|
|
2
|
-
import { getCssClasses } from
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
}>()
|
|
8
|
-
const cssClass = getCssClasses(props.block)
|
|
1
|
+
<script setup>
|
|
2
|
+
import { getCssClasses } from "../../util";
|
|
3
|
+
const props = defineProps({
|
|
4
|
+
block: { type: null, required: true }
|
|
5
|
+
});
|
|
6
|
+
const cssClass = getCssClasses(props.block);
|
|
9
7
|
</script>
|
|
10
8
|
|
|
11
9
|
<template>
|
|
12
10
|
<div
|
|
13
11
|
:class="cssClass"
|
|
14
12
|
:style="{
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
13
|
+
height: block.attributes?.spacerHeight ?? void 0,
|
|
14
|
+
width: block.attributes?.spacerWidth ?? void 0
|
|
15
|
+
}"
|
|
18
16
|
/>
|
|
19
17
|
</template>
|
|
File without changes
|
|
File without changes
|
|
@@ -1,11 +1,9 @@
|
|
|
1
|
-
<script setup
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
block: EditorBlock
|
|
6
|
-
}>()
|
|
1
|
+
<script setup>
|
|
2
|
+
defineProps({
|
|
3
|
+
block: { type: null, required: true }
|
|
4
|
+
});
|
|
7
5
|
</script>
|
|
8
6
|
|
|
9
7
|
<template>
|
|
10
|
-
<div v-sanitize="block.renderedHtml" />
|
|
8
|
+
<div v-sanitize-html="block.renderedHtml" />
|
|
11
9
|
</template>
|
|
File without changes
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
#import
|
|
2
|
-
#import
|
|
3
|
-
#import
|
|
4
|
-
#import
|
|
5
|
-
#import
|
|
6
|
-
#import
|
|
7
|
-
#import
|
|
1
|
+
#import "~/.queries/fragments/CoreButton.fragment.gql"
|
|
2
|
+
#import "~/.queries/fragments/CoreGallery.fragment.gql"
|
|
3
|
+
#import "~/.queries/fragments/CoreHeading.fragment.gql"
|
|
4
|
+
#import "~/.queries/fragments/CoreImage.fragment.gql"
|
|
5
|
+
#import "~/.queries/fragments/CoreParagraph.fragment.gql"
|
|
6
|
+
#import "~/.queries/fragments/CoreQuote.fragment.gql"
|
|
7
|
+
#import "~/.queries/fragments/CoreSpacer.fragment.gql"
|
|
8
8
|
|
|
9
9
|
fragment EditorBlock on EditorBlock {
|
|
10
10
|
apiVersion
|
|
File without changes
|
|
File without changes
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const getColor: (textColor?: string) => string;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const convertFontSize: (fontSize: string, prefix?: string, defaultSize?: string) => string;
|
package/dist/types.d.mts
CHANGED
|
@@ -1 +1,9 @@
|
|
|
1
|
-
|
|
1
|
+
import type { NuxtModule } from '@nuxt/schema'
|
|
2
|
+
|
|
3
|
+
import type { default as Module } from './module.mjs'
|
|
4
|
+
|
|
5
|
+
export type ModuleOptions = typeof Module extends NuxtModule<infer O> ? Partial<O> : Record<string, any>
|
|
6
|
+
|
|
7
|
+
export { default } from './module.mjs'
|
|
8
|
+
|
|
9
|
+
export { type WPNuxtBlocksConfig } from './module.mjs'
|
package/package.json
CHANGED
|
@@ -1,65 +1,63 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wpnuxt/blocks",
|
|
3
|
-
"version": "0.0.
|
|
4
|
-
"description": "
|
|
5
|
-
"
|
|
3
|
+
"version": "2.0.0-alpha.1",
|
|
4
|
+
"description": "Vue components for rendering WordPress Gutenberg blocks in Nuxt",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"nuxt",
|
|
7
|
+
"nuxt-module",
|
|
8
|
+
"wordpress",
|
|
9
|
+
"gutenberg",
|
|
10
|
+
"blocks",
|
|
11
|
+
"vue",
|
|
12
|
+
"typescript"
|
|
13
|
+
],
|
|
14
|
+
"repository": {
|
|
15
|
+
"type": "git",
|
|
16
|
+
"url": "git+https://github.com/wpnuxt/wpnuxt.git",
|
|
17
|
+
"directory": "packages/blocks"
|
|
18
|
+
},
|
|
6
19
|
"license": "MIT",
|
|
7
20
|
"type": "module",
|
|
8
21
|
"exports": {
|
|
9
22
|
".": {
|
|
10
|
-
"types": "./dist/types.d.
|
|
11
|
-
"import": "./dist/module.mjs"
|
|
12
|
-
"require": "./dist/module.cjs"
|
|
23
|
+
"types": "./dist/types.d.mts",
|
|
24
|
+
"import": "./dist/module.mjs"
|
|
13
25
|
}
|
|
14
26
|
},
|
|
15
|
-
"main": "./dist/module.
|
|
16
|
-
"types": "./dist/types.d.
|
|
27
|
+
"main": "./dist/module.mjs",
|
|
28
|
+
"types": "./dist/types.d.mts",
|
|
17
29
|
"files": [
|
|
18
30
|
"dist"
|
|
19
31
|
],
|
|
20
32
|
"publishConfig": {
|
|
21
33
|
"access": "public"
|
|
22
34
|
},
|
|
23
|
-
"scripts": {
|
|
24
|
-
"prepack": "nuxt-module-build build",
|
|
25
|
-
"dev": "nuxi dev playground",
|
|
26
|
-
"dev:build": "nuxi build playground",
|
|
27
|
-
"dev:prepare": "nuxt-module-build build --stub && nuxt-module-build prepare && nuxt prepare playground",
|
|
28
|
-
"release": "pnpm run lint && pnpm run test && pnpm run prepack; release-it --git.tagExclude='*[-edge]*'",
|
|
29
|
-
"release-edge": "pnpm run lint && pnpm run test && pnpm run prepack; release-it --preRelease=edge --config .release-it-edge.json",
|
|
30
|
-
"lint": "eslint .",
|
|
31
|
-
"lint:fix": "eslint . --fix",
|
|
32
|
-
"test": "vitest run",
|
|
33
|
-
"test:watch": "vitest watch",
|
|
34
|
-
"test:types": "vue-tsc --noEmit && cd playground && vue-tsc --noEmit",
|
|
35
|
-
"wp-env": "wp-env",
|
|
36
|
-
"wp-env:create": "wp-env start --update && ./wordpress/wp-env-cli.sh",
|
|
37
|
-
"start": "pnpm run wp-env:create && pnpm run dev"
|
|
38
|
-
},
|
|
39
35
|
"dependencies": {
|
|
40
|
-
"@nuxt/
|
|
41
|
-
"@nuxt/
|
|
42
|
-
"@nuxt
|
|
43
|
-
"
|
|
36
|
+
"@nuxt/kit": "4.2.2",
|
|
37
|
+
"@nuxt/image": "^2.0.0",
|
|
38
|
+
"@radya/nuxt-dompurify": "^1.0.5",
|
|
39
|
+
"scule": "^1.3.0"
|
|
44
40
|
},
|
|
45
41
|
"devDependencies": {
|
|
46
|
-
"@nuxt/
|
|
47
|
-
"@nuxt/
|
|
48
|
-
"@
|
|
49
|
-
"
|
|
50
|
-
"
|
|
51
|
-
"@tailwindcss/typography": "^0.5.16",
|
|
52
|
-
"@types/node": "^22.13.10",
|
|
53
|
-
"@wordpress/env": "^10.20.0",
|
|
54
|
-
"changelogen": "^0.6.1",
|
|
55
|
-
"eslint": "^9.22.0",
|
|
56
|
-
"nuxt": "^3.16.0",
|
|
57
|
-
"release-it": "^18.1.2",
|
|
58
|
-
"typescript": "5.6.3",
|
|
59
|
-
"vitest": "^3.0.8"
|
|
42
|
+
"@nuxt/module-builder": "^1.0.2",
|
|
43
|
+
"@nuxt/schema": "4.2.2",
|
|
44
|
+
"@types/node": "^25.0.3",
|
|
45
|
+
"nuxt": "4.2.2",
|
|
46
|
+
"vue-tsc": "^3.2.1"
|
|
60
47
|
},
|
|
61
48
|
"peerDependencies": {
|
|
62
|
-
"
|
|
63
|
-
"
|
|
49
|
+
"nuxt": "^4.0.0",
|
|
50
|
+
"@nuxt/ui": "^4.0.0"
|
|
51
|
+
},
|
|
52
|
+
"peerDependenciesMeta": {
|
|
53
|
+
"@nuxt/ui": {
|
|
54
|
+
"optional": true
|
|
55
|
+
}
|
|
56
|
+
},
|
|
57
|
+
"scripts": {
|
|
58
|
+
"build": "nuxt-module-build build",
|
|
59
|
+
"dev:prepare": "nuxt-module-build build --stub && nuxt-module-build prepare",
|
|
60
|
+
"typecheck": "vue-tsc --noEmit",
|
|
61
|
+
"clean": "rm -rf dist .nuxt node_modules"
|
|
64
62
|
}
|
|
65
|
-
}
|
|
63
|
+
}
|
package/README.md
DELETED
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
# WPNuxt Blocks
|
|
2
|
-
|
|
3
|
-
[![npm version][npm-version-src]][npm-version-href]
|
|
4
|
-
[![npm downloads][npm-downloads-src]][npm-downloads-href]
|
|
5
|
-
[![License][license-src]][license-href]
|
|
6
|
-
[![Nuxt][nuxt-src]][nuxt-href]
|
|
7
|
-
|
|
8
|
-
A set of components to render Gutenberg Blocks with the WPNuxt module
|
|
9
|
-
|
|
10
|
-
Allows to override each block component to be overriden by a custom component to have full control over how every Gutenberg Block is rendered in Nuxt.
|
|
11
|
-
|
|
12
|
-
- [✨ Release Notes](/CHANGELOG.md)
|
|
13
|
-
- [🏀 Online playground](https://stackblitz.com/github/wpnuxt/wpnuxt-blocks?file=playground%2Fapp%2Fpages%2F%5B...slug%5D.vue)
|
|
14
|
-
- [📖 Documentation](https://wpnuxt.com)
|
|
15
|
-
|
|
16
|
-
## Quick Setup
|
|
17
|
-
|
|
18
|
-
Install the module to your Nuxt application with one command:
|
|
19
|
-
|
|
20
|
-
```bash
|
|
21
|
-
npx nuxi module add @wpnuxt/blocks
|
|
22
|
-
```
|
|
23
|
-
|
|
24
|
-
That's it! You can now use WPNuxt Blocks in your Nuxt app ✨
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
## Contribution
|
|
28
|
-
|
|
29
|
-
<details>
|
|
30
|
-
<summary>Local development</summary>
|
|
31
|
-
|
|
32
|
-
```bash
|
|
33
|
-
# Install dependencies
|
|
34
|
-
pnpm install
|
|
35
|
-
|
|
36
|
-
# Generate type stubs
|
|
37
|
-
pnpm run dev:prepare
|
|
38
|
-
|
|
39
|
-
# Develop with the playground
|
|
40
|
-
pnpm run dev
|
|
41
|
-
|
|
42
|
-
# Build the playground
|
|
43
|
-
pnpm run dev:build
|
|
44
|
-
|
|
45
|
-
# Run ESLint
|
|
46
|
-
pnpm run lint
|
|
47
|
-
|
|
48
|
-
# Run Vitest
|
|
49
|
-
pnpm run test
|
|
50
|
-
pnpm run test:watch
|
|
51
|
-
|
|
52
|
-
# Release new version
|
|
53
|
-
pnpm run release
|
|
54
|
-
```
|
|
55
|
-
|
|
56
|
-
</details>
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
<!-- Badges -->
|
|
60
|
-
[npm-version-src]: https://img.shields.io/npm/v/@wpnuxt/core/latest.svg?style=flat&colorA=020420&colorB=00DC82
|
|
61
|
-
[npm-version-href]: https://www.npmjs.com/package/@wpnuxt/core
|
|
62
|
-
|
|
63
|
-
[npm-downloads-src]: https://img.shields.io/npm/dm/@wpnuxt/core.svg?style=flat&colorA=020420&colorB=00DC82
|
|
64
|
-
[npm-downloads-href]: https://npmjs.com/package/@wpnuxt/core
|
|
65
|
-
|
|
66
|
-
[license-src]: https://img.shields.io/npm/l/@wpnuxt/core.svg?style=flat&colorA=020420&colorB=00DC82
|
|
67
|
-
[license-href]: https://npmjs.com/package/@wpnuxt/core
|
|
68
|
-
|
|
69
|
-
[nuxt-src]: https://img.shields.io/badge/Nuxt-18181B?logo=nuxt.js
|
|
70
|
-
[nuxt-href]: https://nuxt.com
|
package/dist/module.cjs
DELETED
package/dist/module.d.ts
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
#import '~/.queries/fragments/ContentNode.fragment.gql';
|
|
2
|
-
#import '~/.queries/fragments/NodeWithFeaturedImage.fragment.gql';
|
|
3
|
-
#import '~/.queries/fragments/NodeWithEditorBlocks.fragment.gql';
|
|
4
|
-
|
|
5
|
-
fragment Page on Page {
|
|
6
|
-
...ContentNode
|
|
7
|
-
...NodeWithFeaturedImage
|
|
8
|
-
...NodeWithEditorBlocks
|
|
9
|
-
content
|
|
10
|
-
isFrontPage
|
|
11
|
-
isPostsPage
|
|
12
|
-
isPreview
|
|
13
|
-
isPrivacyPage
|
|
14
|
-
isRestricted
|
|
15
|
-
isRevision
|
|
16
|
-
title
|
|
17
|
-
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
#import "~/.queries/fragments/NodeWithExcerpt.fragment.gql";
|
|
2
|
-
#import '~/.queries/fragments/ContentNode.fragment.gql';
|
|
3
|
-
#import '~/.queries/fragments/NodeWithFeaturedImage.fragment.gql';
|
|
4
|
-
#import '~/.queries/fragments/NodeWithEditorBlocks.fragment.gql';
|
|
5
|
-
|
|
6
|
-
fragment Post on Post {
|
|
7
|
-
...NodeWithExcerpt
|
|
8
|
-
...ContentNode
|
|
9
|
-
...NodeWithFeaturedImage
|
|
10
|
-
...NodeWithEditorBlocks
|
|
11
|
-
content
|
|
12
|
-
title
|
|
13
|
-
}
|
package/dist/types.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { type ModuleOptions, default } from './module'
|