@wpnuxt/blocks 0.0.16 → 0.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/dist/module.d.mts +2 -1
- package/dist/module.json +3 -3
- package/dist/module.mjs +3 -3
- package/dist/runtime/components/BlockComponent.d.vue.ts +7 -0
- package/dist/runtime/components/BlockComponent.vue +16 -20
- package/dist/runtime/components/BlockComponent.vue.d.ts +7 -0
- package/dist/runtime/components/BlockRenderer.d.vue.ts +7 -0
- package/dist/runtime/components/BlockRenderer.vue +5 -7
- package/dist/runtime/components/BlockRenderer.vue.d.ts +7 -0
- package/dist/runtime/components/blocks/CoreButton.d.vue.ts +7 -0
- package/dist/runtime/components/blocks/CoreButton.vue +8 -13
- package/dist/runtime/components/blocks/CoreButton.vue.d.ts +7 -0
- package/dist/runtime/components/blocks/CoreButtons.d.vue.ts +7 -0
- package/dist/runtime/components/blocks/CoreButtons.vue +4 -6
- package/dist/runtime/components/blocks/CoreButtons.vue.d.ts +7 -0
- package/dist/runtime/components/blocks/CoreGallery.d.vue.ts +7 -0
- package/dist/runtime/components/blocks/CoreGallery.vue +9 -11
- package/dist/runtime/components/blocks/CoreGallery.vue.d.ts +7 -0
- package/dist/runtime/components/blocks/CoreHeading.d.vue.ts +7 -0
- package/dist/runtime/components/blocks/CoreHeading.vue +6 -8
- package/dist/runtime/components/blocks/CoreHeading.vue.d.ts +7 -0
- package/dist/runtime/components/blocks/CoreImage.d.vue.ts +7 -0
- package/dist/runtime/components/blocks/CoreImage.vue +5 -9
- package/dist/runtime/components/blocks/CoreImage.vue.d.ts +7 -0
- package/dist/runtime/components/blocks/CoreParagraph.d.vue.ts +7 -0
- package/dist/runtime/components/blocks/CoreParagraph.vue +5 -7
- package/dist/runtime/components/blocks/CoreParagraph.vue.d.ts +7 -0
- package/dist/runtime/components/blocks/CoreQuote.d.vue.ts +7 -0
- package/dist/runtime/components/blocks/CoreQuote.vue +4 -6
- package/dist/runtime/components/blocks/CoreQuote.vue.d.ts +7 -0
- package/dist/runtime/components/blocks/CoreSpacer.d.vue.ts +7 -0
- package/dist/runtime/components/blocks/CoreSpacer.vue +9 -11
- package/dist/runtime/components/blocks/CoreSpacer.vue.d.ts +7 -0
- package/dist/runtime/components/blocks/EditorBlock.d.vue.ts +7 -0
- package/dist/runtime/components/blocks/EditorBlock.vue +4 -6
- package/dist/runtime/components/blocks/EditorBlock.vue.d.ts +7 -0
- package/dist/types.d.mts +3 -1
- package/package.json +25 -25
- package/dist/module.cjs +0 -5
- package/dist/module.d.ts +0 -8
- package/dist/types.d.ts +0 -1
package/dist/module.d.mts
CHANGED
package/dist/module.json
CHANGED
package/dist/module.mjs
CHANGED
|
@@ -3,9 +3,9 @@ import { defineNuxtModule, createResolver, installModule, addComponentsDir, addT
|
|
|
3
3
|
import { genDynamicImport } from 'knitwork';
|
|
4
4
|
|
|
5
5
|
const name = "@wpnuxt/blocks";
|
|
6
|
-
const version = "0.0.
|
|
6
|
+
const version = "0.0.17";
|
|
7
7
|
|
|
8
|
-
const module = defineNuxtModule({
|
|
8
|
+
const module$1 = defineNuxtModule({
|
|
9
9
|
meta: {
|
|
10
10
|
name,
|
|
11
11
|
version,
|
|
@@ -76,4 +76,4 @@ const module = defineNuxtModule({
|
|
|
76
76
|
}
|
|
77
77
|
});
|
|
78
78
|
|
|
79
|
-
export { module as default };
|
|
79
|
+
export { module$1 as default };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { EditorBlock } from '#wpnuxt/blocks';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
block: EditorBlock;
|
|
4
|
+
};
|
|
5
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
6
|
+
declare const _default: typeof __VLS_export;
|
|
7
|
+
export default _default;
|
|
@@ -1,29 +1,25 @@
|
|
|
1
|
-
<script setup
|
|
2
|
-
import { pascalCase } from
|
|
3
|
-
import { resolveComponent } from
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
const props = defineProps<{
|
|
9
|
-
block: EditorBlock
|
|
10
|
-
}>()
|
|
1
|
+
<script setup>
|
|
2
|
+
import { pascalCase } from "scule";
|
|
3
|
+
import { resolveComponent } from "#imports";
|
|
4
|
+
const manifest = await import("#wpnuxt/blocks").catch(() => ({}));
|
|
5
|
+
const props = defineProps({
|
|
6
|
+
block: { type: null, required: true }
|
|
7
|
+
});
|
|
11
8
|
const findComponentToRender = async () => {
|
|
12
|
-
|
|
13
|
-
if (props.block.parentClientId === null || props.block.parentClientId === undefined) {
|
|
9
|
+
if (props.block.parentClientId === null || props.block.parentClientId === void 0) {
|
|
14
10
|
if (props.block.name) {
|
|
15
|
-
const componentName = pascalCase(props.block.name)
|
|
16
|
-
const componentImporter = manifest[componentName]
|
|
17
|
-
if (typeof componentImporter ===
|
|
18
|
-
return await componentImporter()
|
|
11
|
+
const componentName = pascalCase(props.block.name);
|
|
12
|
+
const componentImporter = manifest[componentName];
|
|
13
|
+
if (typeof componentImporter === "function") {
|
|
14
|
+
return await componentImporter();
|
|
19
15
|
}
|
|
20
16
|
}
|
|
21
|
-
return resolveComponent(
|
|
17
|
+
return resolveComponent("EditorBlock");
|
|
22
18
|
} else {
|
|
23
|
-
return
|
|
19
|
+
return void 0;
|
|
24
20
|
}
|
|
25
|
-
}
|
|
26
|
-
const componentToRender = await findComponentToRender()
|
|
21
|
+
};
|
|
22
|
+
const componentToRender = await findComponentToRender();
|
|
27
23
|
</script>
|
|
28
24
|
|
|
29
25
|
<template>
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { EditorBlock } from '#wpnuxt/blocks';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
block: EditorBlock;
|
|
4
|
+
};
|
|
5
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
6
|
+
declare const _default: typeof __VLS_export;
|
|
7
|
+
export default _default;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { NodeWithEditorBlocksFragment } from '#build/graphql-operations';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
node: NodeWithEditorBlocksFragment;
|
|
4
|
+
};
|
|
5
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
6
|
+
declare const _default: typeof __VLS_export;
|
|
7
|
+
export default _default;
|
|
@@ -1,10 +1,8 @@
|
|
|
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>
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { NodeWithEditorBlocksFragment } from '#build/graphql-operations';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
node: NodeWithEditorBlocksFragment;
|
|
4
|
+
};
|
|
5
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
6
|
+
declare const _default: typeof __VLS_export;
|
|
7
|
+
export default _default;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { CoreButton } from '#wpnuxt/blocks';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
block: CoreButton;
|
|
4
|
+
};
|
|
5
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
6
|
+
declare const _default: typeof __VLS_export;
|
|
7
|
+
export default _default;
|
|
@@ -1,17 +1,12 @@
|
|
|
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 } 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
|
-
variant.value = props.block.attributes?.metadata?.replaceAll('"',
|
|
9
|
+
variant.value = props.block.attributes?.metadata?.replaceAll('"', "");
|
|
15
10
|
}
|
|
16
11
|
</script>
|
|
17
12
|
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { CoreButton } from '#wpnuxt/blocks';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
block: CoreButton;
|
|
4
|
+
};
|
|
5
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
6
|
+
declare const _default: typeof __VLS_export;
|
|
7
|
+
export default _default;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { CoreButtons } from '#wpnuxt/blocks';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
block: CoreButtons;
|
|
4
|
+
};
|
|
5
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
6
|
+
declare const _default: typeof __VLS_export;
|
|
7
|
+
export default _default;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { CoreButtons } from '#wpnuxt/blocks';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
block: CoreButtons;
|
|
4
|
+
};
|
|
5
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
6
|
+
declare const _default: typeof __VLS_export;
|
|
7
|
+
export default _default;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { CoreGallery } from '#wpnuxt/blocks';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
block: CoreGallery;
|
|
4
|
+
};
|
|
5
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
6
|
+
declare const _default: typeof __VLS_export;
|
|
7
|
+
export default _default;
|
|
@@ -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>
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { CoreGallery } from '#wpnuxt/blocks';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
block: CoreGallery;
|
|
4
|
+
};
|
|
5
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
6
|
+
declare const _default: typeof __VLS_export;
|
|
7
|
+
export default _default;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { CoreHeading } from '#wpnuxt/blocks';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
block: CoreHeading;
|
|
4
|
+
};
|
|
5
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
6
|
+
declare const _default: typeof __VLS_export;
|
|
7
|
+
export default _default;
|
|
@@ -1,11 +1,9 @@
|
|
|
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>
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { CoreHeading } from '#wpnuxt/blocks';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
block: CoreHeading;
|
|
4
|
+
};
|
|
5
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
6
|
+
declare const _default: typeof __VLS_export;
|
|
7
|
+
export default _default;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { CoreImage } from '#graphql-operations';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
block: CoreImage;
|
|
4
|
+
};
|
|
5
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
6
|
+
declare const _default: typeof __VLS_export;
|
|
7
|
+
export default _default;
|
|
@@ -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>
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { CoreImage } from '#graphql-operations';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
block: CoreImage;
|
|
4
|
+
};
|
|
5
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
6
|
+
declare const _default: typeof __VLS_export;
|
|
7
|
+
export default _default;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { CoreParagraph } from '#wpnuxt/blocks';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
block: CoreParagraph;
|
|
4
|
+
};
|
|
5
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
6
|
+
declare const _default: typeof __VLS_export;
|
|
7
|
+
export default _default;
|
|
@@ -1,10 +1,8 @@
|
|
|
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>
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { CoreParagraph } from '#wpnuxt/blocks';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
block: CoreParagraph;
|
|
4
|
+
};
|
|
5
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
6
|
+
declare const _default: typeof __VLS_export;
|
|
7
|
+
export default _default;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { CoreQuote } from '#wpnuxt/blocks';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
block: CoreQuote;
|
|
4
|
+
};
|
|
5
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
6
|
+
declare const _default: typeof __VLS_export;
|
|
7
|
+
export default _default;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { CoreQuote } from '#wpnuxt/blocks';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
block: CoreQuote;
|
|
4
|
+
};
|
|
5
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
6
|
+
declare const _default: typeof __VLS_export;
|
|
7
|
+
export default _default;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { CoreSpacer } from '#wpnuxt/blocks';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
block: CoreSpacer;
|
|
4
|
+
};
|
|
5
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
6
|
+
declare const _default: typeof __VLS_export;
|
|
7
|
+
export default _default;
|
|
@@ -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,
|
|
14
|
+
width: block.attributes?.spacerWidth
|
|
15
|
+
}"
|
|
18
16
|
/>
|
|
19
17
|
</template>
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { CoreSpacer } from '#wpnuxt/blocks';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
block: CoreSpacer;
|
|
4
|
+
};
|
|
5
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
6
|
+
declare const _default: typeof __VLS_export;
|
|
7
|
+
export default _default;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { EditorBlock } from '#wpnuxt/blocks';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
block: EditorBlock;
|
|
4
|
+
};
|
|
5
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
6
|
+
declare const _default: typeof __VLS_export;
|
|
7
|
+
export default _default;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { EditorBlock } from '#wpnuxt/blocks';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
block: EditorBlock;
|
|
4
|
+
};
|
|
5
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
6
|
+
declare const _default: typeof __VLS_export;
|
|
7
|
+
export default _default;
|
package/dist/types.d.mts
CHANGED
package/package.json
CHANGED
|
@@ -1,19 +1,17 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wpnuxt/blocks",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.17",
|
|
4
4
|
"description": "WPNuxt Blocks",
|
|
5
5
|
"repository": "wpnuxt/wpnuxt-blocks",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"type": "module",
|
|
8
8
|
"exports": {
|
|
9
9
|
".": {
|
|
10
|
-
"types": "./dist/types.d.
|
|
11
|
-
"import": "./dist/module.mjs"
|
|
12
|
-
"require": "./dist/module.cjs"
|
|
10
|
+
"types": "./dist/types.d.mts",
|
|
11
|
+
"import": "./dist/module.mjs"
|
|
13
12
|
}
|
|
14
13
|
},
|
|
15
|
-
"main": "./dist/module.
|
|
16
|
-
"types": "./dist/types.d.ts",
|
|
14
|
+
"main": "./dist/module.mjs",
|
|
17
15
|
"files": [
|
|
18
16
|
"dist"
|
|
19
17
|
],
|
|
@@ -37,29 +35,31 @@
|
|
|
37
35
|
"start": "pnpm run wp-env:create && pnpm run dev"
|
|
38
36
|
},
|
|
39
37
|
"dependencies": {
|
|
40
|
-
"@nuxt/image": "^
|
|
41
|
-
"@nuxt/kit": "^
|
|
42
|
-
"@nuxt/ui": "^3.0
|
|
43
|
-
"@wpnuxt/core": "1.0.0-edge.
|
|
38
|
+
"@nuxt/image": "^2.0.0",
|
|
39
|
+
"@nuxt/kit": "^4.2.2",
|
|
40
|
+
"@nuxt/ui": "^4.3.0",
|
|
41
|
+
"@wpnuxt/core": "1.0.0-edge.30"
|
|
44
42
|
},
|
|
45
43
|
"devDependencies": {
|
|
46
|
-
"@nuxt/devtools": "^
|
|
47
|
-
"@nuxt/eslint-config": "^1.
|
|
48
|
-
"@nuxt/module-builder": "^0.
|
|
49
|
-
"@nuxt/schema": "^
|
|
50
|
-
"@nuxt/test-utils": "^3.
|
|
51
|
-
"@tailwindcss/typography": "^0.5.
|
|
52
|
-
"@types/node": "^
|
|
53
|
-
"@wordpress/env": "^10.
|
|
54
|
-
"changelogen": "^0.6.
|
|
55
|
-
"eslint": "^9.
|
|
56
|
-
"nuxt": "^
|
|
57
|
-
"release-it": "^
|
|
58
|
-
"typescript": "5.
|
|
59
|
-
"vitest": "^
|
|
44
|
+
"@nuxt/devtools": "^3.1.1",
|
|
45
|
+
"@nuxt/eslint-config": "^1.12.1",
|
|
46
|
+
"@nuxt/module-builder": "^1.0.2",
|
|
47
|
+
"@nuxt/schema": "^4.2.2",
|
|
48
|
+
"@nuxt/test-utils": "^3.21.0",
|
|
49
|
+
"@tailwindcss/typography": "^0.5.19",
|
|
50
|
+
"@types/node": "^25.0.3",
|
|
51
|
+
"@wordpress/env": "^10.36.0",
|
|
52
|
+
"changelogen": "^0.6.2",
|
|
53
|
+
"eslint": "^9.39.2",
|
|
54
|
+
"nuxt": "^4.2.2",
|
|
55
|
+
"release-it": "^19.1.0",
|
|
56
|
+
"typescript": "5.9.3",
|
|
57
|
+
"vitest": "^4.0.16",
|
|
58
|
+
"vue-tsc": "^3.1.8"
|
|
60
59
|
},
|
|
61
60
|
"peerDependencies": {
|
|
62
61
|
"knitwork": "^1.2.0",
|
|
63
62
|
"pathe": "^2.0.1"
|
|
64
|
-
}
|
|
63
|
+
},
|
|
64
|
+
"packageManager": "pnpm@10.26.0+sha512.3b3f6c725ebe712506c0ab1ad4133cf86b1f4b687effce62a9b38b4d72e3954242e643190fc51fa1642949c735f403debd44f5cb0edd657abe63a8b6a7e1e402"
|
|
65
65
|
}
|
package/dist/module.cjs
DELETED
package/dist/module.d.ts
DELETED
package/dist/types.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { type ModuleOptions, default } from './module'
|