eddev 2.0.0-beta.51 → 2.0.0-beta.52

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.
@@ -34,7 +34,6 @@ export function configureEditorBlocks(config) {
34
34
  blocks = transformTemplateToBlocks(config.defaultBlocks, false);
35
35
  }
36
36
  let newBlocks = [...header, ...blocks, ...footer];
37
- // console.log("Configuring", newBlocks)
38
37
  wp.data.dispatch("core/block-editor").resetBlocks(newBlocks);
39
38
  function syncBlocks(blocks) {
40
39
  return blocks.map((block) => {
@@ -174,7 +173,6 @@ function setWrapperBlock(blockName, blocks) {
174
173
  }
175
174
  function setTemplate(template) {
176
175
  const wp = window.wp;
177
- // console.log("Setting template", template)
178
176
  let currentBlocks = wp.data.select("core/block-editor").getBlocks();
179
177
  wp.data.dispatch("core/block-editor").updateSettings({
180
178
  templateLock: "all",
@@ -1 +1 @@
1
- export declare const VERSION = "2.0.0-beta.51";
1
+ export declare const VERSION = "2.0.0-beta.52";
@@ -1 +1 @@
1
- export const VERSION = "2.0.0-beta.51";
1
+ export const VERSION = "2.0.0-beta.52";
@@ -134,6 +134,7 @@ function readBlockDataAsJSONExport(file, contents) {
134
134
  result.frontendMode = userData.frontendMode;
135
135
  if (userData.postMetaBlock) {
136
136
  result.postMetaBlock = {
137
+ postTypes: userData.postMetaBlock.postTypes,
137
138
  fieldName: userData.postMetaBlock.fieldName,
138
139
  };
139
140
  result.types = userData.postMetaBlock.postTypes;
@@ -23,10 +23,13 @@ export declare const BlockMetaSchema: z.ZodObject<{
23
23
  cache: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
24
24
  allowMultiple: z.ZodDefault<z.ZodBoolean>;
25
25
  postMetaBlock: z.ZodOptional<z.ZodObject<{
26
+ postTypes: z.ZodArray<z.ZodString, "many">;
26
27
  fieldName: z.ZodString;
27
28
  }, "strip", z.ZodTypeAny, {
29
+ postTypes: string[];
28
30
  fieldName: string;
29
31
  }, {
32
+ postTypes: string[];
30
33
  fieldName: string;
31
34
  }>>;
32
35
  frontendMode: z.ZodDefault<z.ZodEnum<["hidden", "childrenOnly", "default"]>>;
@@ -56,6 +59,7 @@ export declare const BlockMetaSchema: z.ZodObject<{
56
59
  keywords?: string[] | undefined;
57
60
  templates?: string[] | null | undefined;
58
61
  postMetaBlock?: {
62
+ postTypes: string[];
59
63
  fieldName: string;
60
64
  } | undefined;
61
65
  }, {
@@ -81,6 +85,7 @@ export declare const BlockMetaSchema: z.ZodObject<{
81
85
  dynamic?: boolean | undefined;
82
86
  allowMultiple?: boolean | undefined;
83
87
  postMetaBlock?: {
88
+ postTypes: string[];
84
89
  fieldName: string;
85
90
  } | undefined;
86
91
  frontendMode?: "hidden" | "childrenOnly" | "default" | undefined;
@@ -27,6 +27,7 @@ export const BlockMetaSchema = z.object({
27
27
  allowMultiple: z.boolean().default(true),
28
28
  postMetaBlock: z
29
29
  .object({
30
+ postTypes: z.array(z.string()),
30
31
  fieldName: z.string(),
31
32
  })
32
33
  .optional(),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eddev",
3
- "version": "2.0.0-beta.51",
3
+ "version": "2.0.0-beta.52",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "type": "module",