@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.
Files changed (41) hide show
  1. package/dist/module.d.mts +2 -1
  2. package/dist/module.json +3 -3
  3. package/dist/module.mjs +3 -3
  4. package/dist/runtime/components/BlockComponent.d.vue.ts +7 -0
  5. package/dist/runtime/components/BlockComponent.vue +16 -20
  6. package/dist/runtime/components/BlockComponent.vue.d.ts +7 -0
  7. package/dist/runtime/components/BlockRenderer.d.vue.ts +7 -0
  8. package/dist/runtime/components/BlockRenderer.vue +5 -7
  9. package/dist/runtime/components/BlockRenderer.vue.d.ts +7 -0
  10. package/dist/runtime/components/blocks/CoreButton.d.vue.ts +7 -0
  11. package/dist/runtime/components/blocks/CoreButton.vue +8 -13
  12. package/dist/runtime/components/blocks/CoreButton.vue.d.ts +7 -0
  13. package/dist/runtime/components/blocks/CoreButtons.d.vue.ts +7 -0
  14. package/dist/runtime/components/blocks/CoreButtons.vue +4 -6
  15. package/dist/runtime/components/blocks/CoreButtons.vue.d.ts +7 -0
  16. package/dist/runtime/components/blocks/CoreGallery.d.vue.ts +7 -0
  17. package/dist/runtime/components/blocks/CoreGallery.vue +9 -11
  18. package/dist/runtime/components/blocks/CoreGallery.vue.d.ts +7 -0
  19. package/dist/runtime/components/blocks/CoreHeading.d.vue.ts +7 -0
  20. package/dist/runtime/components/blocks/CoreHeading.vue +6 -8
  21. package/dist/runtime/components/blocks/CoreHeading.vue.d.ts +7 -0
  22. package/dist/runtime/components/blocks/CoreImage.d.vue.ts +7 -0
  23. package/dist/runtime/components/blocks/CoreImage.vue +5 -9
  24. package/dist/runtime/components/blocks/CoreImage.vue.d.ts +7 -0
  25. package/dist/runtime/components/blocks/CoreParagraph.d.vue.ts +7 -0
  26. package/dist/runtime/components/blocks/CoreParagraph.vue +5 -7
  27. package/dist/runtime/components/blocks/CoreParagraph.vue.d.ts +7 -0
  28. package/dist/runtime/components/blocks/CoreQuote.d.vue.ts +7 -0
  29. package/dist/runtime/components/blocks/CoreQuote.vue +4 -6
  30. package/dist/runtime/components/blocks/CoreQuote.vue.d.ts +7 -0
  31. package/dist/runtime/components/blocks/CoreSpacer.d.vue.ts +7 -0
  32. package/dist/runtime/components/blocks/CoreSpacer.vue +9 -11
  33. package/dist/runtime/components/blocks/CoreSpacer.vue.d.ts +7 -0
  34. package/dist/runtime/components/blocks/EditorBlock.d.vue.ts +7 -0
  35. package/dist/runtime/components/blocks/EditorBlock.vue +4 -6
  36. package/dist/runtime/components/blocks/EditorBlock.vue.d.ts +7 -0
  37. package/dist/types.d.mts +3 -1
  38. package/package.json +25 -25
  39. package/dist/module.cjs +0 -5
  40. package/dist/module.d.ts +0 -8
  41. package/dist/types.d.ts +0 -1
package/dist/module.d.mts CHANGED
@@ -5,4 +5,5 @@ interface ModuleOptions {
5
5
  }
6
6
  declare const _default: _nuxt_schema.NuxtModule<ModuleOptions, ModuleOptions, false>;
7
7
 
8
- export { type ModuleOptions, _default as default };
8
+ export { _default as default };
9
+ export type { ModuleOptions };
package/dist/module.json CHANGED
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "name": "@wpnuxt/blocks",
3
- "version": "0.0.16",
3
+ "version": "0.0.17",
4
4
  "configKey": "wpNuxtBlocks",
5
5
  "builder": {
6
- "@nuxt/module-builder": "0.8.4",
7
- "unbuild": "2.0.0"
6
+ "@nuxt/module-builder": "1.0.2",
7
+ "unbuild": "3.6.1"
8
8
  }
9
9
  }
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.16";
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 lang="ts">
2
- import { pascalCase } from 'scule'
3
- import { resolveComponent } from '#imports'
4
- import type { EditorBlock } from '#wpnuxt/blocks'
5
-
6
- const manifest = await import('#wpnuxt/blocks').catch(() => ({}))
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
- // only process top level blocks
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 === 'function') {
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('EditorBlock')
17
+ return resolveComponent("EditorBlock");
22
18
  } else {
23
- return undefined
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 lang="ts">
2
- import BlockComponent from './BlockComponent.vue'
3
- import type { NodeWithEditorBlocksFragment } from '#build/graphql-operations'
4
-
5
- defineProps<{
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 lang="ts">
2
- import { convertFontSize, getCssClasses } from '../../util'
3
- import type { CoreButton } from '#wpnuxt/blocks'
4
- import { ref } from '#imports'
5
-
6
- const props = defineProps<{
7
- block: CoreButton
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;
@@ -1,9 +1,7 @@
1
- <script setup lang="ts">
2
- import type { CoreButtons, EditorBlock } from '#wpnuxt/blocks'
3
-
4
- defineProps<{
5
- block: CoreButtons
6
- }>()
1
+ <script setup>
2
+ defineProps({
3
+ block: { type: null, required: true }
4
+ });
7
5
  </script>
8
6
 
9
7
  <template>
@@ -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 lang="ts">
2
- import type { CoreGallery, CoreImage } from '#wpnuxt/blocks'
3
-
4
- const props = defineProps<{
5
- block: CoreGallery
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 === 'core/image') {
10
- const imgBlock = innerBlock as CoreImage
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 lang="ts">
2
- import { getCssClasses } from '../../util'
3
- import type { CoreHeading } from '#wpnuxt/blocks'
4
-
5
- const props = defineProps<{
6
- block: CoreHeading
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 lang="ts">
2
- // import { getRelativeImagePath } from '../../util/images'
3
- import type { CoreImage } from '#graphql-operations'
4
-
5
- const props = defineProps<{
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 lang="ts">
2
- import { getCssClasses } from '../../util'
3
- import type { CoreParagraph } from '#wpnuxt/blocks'
4
-
5
- const props = defineProps<{
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;
@@ -1,9 +1,7 @@
1
- <script setup lang="ts">
2
- import type { CoreQuote, CoreParagraph } from '#wpnuxt/blocks'
3
-
4
- defineProps<{
5
- block: CoreQuote
6
- }>()
1
+ <script setup>
2
+ defineProps({
3
+ block: { type: null, required: true }
4
+ });
7
5
  </script>
8
6
 
9
7
  <template>
@@ -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 lang="ts">
2
- import { getCssClasses } from '../../util'
3
- import type { CoreSpacer } from '#wpnuxt/blocks'
4
-
5
- const props = defineProps<{
6
- block: CoreSpacer
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
- height: block.attributes?.spacerHeight,
16
- width: block.attributes?.spacerWidth
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;
@@ -1,9 +1,7 @@
1
- <script setup lang="ts">
2
- import type { EditorBlock } from '#wpnuxt/blocks'
3
-
4
- defineProps<{
5
- block: EditorBlock
6
- }>()
1
+ <script setup>
2
+ defineProps({
3
+ block: { type: null, required: true }
4
+ });
7
5
  </script>
8
6
 
9
7
  <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;
package/dist/types.d.mts CHANGED
@@ -1 +1,3 @@
1
- export { type ModuleOptions, default } from './module.js'
1
+ export { default } from './module.mjs'
2
+
3
+ export { type ModuleOptions } from './module.mjs'
package/package.json CHANGED
@@ -1,19 +1,17 @@
1
1
  {
2
2
  "name": "@wpnuxt/blocks",
3
- "version": "0.0.16",
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.ts",
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.cjs",
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": "^1.9.0",
41
- "@nuxt/kit": "^3.16.0",
42
- "@nuxt/ui": "^3.0.0",
43
- "@wpnuxt/core": "1.0.0-edge.28"
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": "^2.3.0",
47
- "@nuxt/eslint-config": "^1.2.0",
48
- "@nuxt/module-builder": "^0.8.4",
49
- "@nuxt/schema": "^3.16.0",
50
- "@nuxt/test-utils": "^3.17.2",
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"
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
@@ -1,5 +0,0 @@
1
- module.exports = function(...args) {
2
- return import('./module.mjs').then(m => m.default.call(this, ...args))
3
- }
4
- const _meta = module.exports.meta = require('./module.json')
5
- module.exports.getMeta = () => Promise.resolve(_meta)
package/dist/module.d.ts DELETED
@@ -1,8 +0,0 @@
1
- import * as _nuxt_schema from '@nuxt/schema';
2
-
3
- interface ModuleOptions {
4
- enabled: boolean;
5
- }
6
- declare const _default: _nuxt_schema.NuxtModule<ModuleOptions, ModuleOptions, false>;
7
-
8
- export { type ModuleOptions, _default as default };
package/dist/types.d.ts DELETED
@@ -1 +0,0 @@
1
- export { type ModuleOptions, default } from './module'