eddev 2.0.0-beta.133 → 2.0.0-beta.134

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.
@@ -1 +1 @@
1
- {"version":3,"file":"installGutenbergHooks.d.ts","sourceRoot":"","sources":["../../../../../src/app/lib/blocks/editor/installGutenbergHooks.tsx"],"names":[],"mappings":"AA2BA,eAAO,MAAM,oBAAoB;;CAAgC,CAAA;AAEjE,wBAAgB,iBAAiB,kBAsBhC;AAED,wBAAgB,uBAAuB,SAqNtC"}
1
+ {"version":3,"file":"installGutenbergHooks.d.ts","sourceRoot":"","sources":["../../../../../src/app/lib/blocks/editor/installGutenbergHooks.tsx"],"names":[],"mappings":"AA2BA,eAAO,MAAM,oBAAoB;;CAAgC,CAAA;AAEjE,wBAAgB,iBAAiB,kBAsBhC;AAED,wBAAgB,uBAAuB,SAyMtC"}
@@ -124,19 +124,7 @@ export function installEDGutenbergHooks() {
124
124
  item.attributes.inline = { type: "object" };
125
125
  item.attributes.values = { type: "object" };
126
126
  item.attributes.isFromTemplate = { type: "boolean" };
127
- item.supports.mode = false;
128
127
  item.supports.customClassName = false;
129
- // item.transforms = {
130
- // to: [
131
- // {
132
- // type: "block",
133
- // blocks: ["core/paragraph"],
134
- // transform: (attributes: any) => {
135
- // return wp.blocks.createBlock("core/paragraph", { content: JSON.stringify(attributes) })
136
- // },
137
- // },
138
- // ],
139
- // }
140
128
  item.edit = function (props) {
141
129
  const self = this;
142
130
  useEffect(() => {
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "2.0.0-beta.133";
1
+ export declare const VERSION = "2.0.0-beta.134";
2
2
  //# sourceMappingURL=version.d.ts.map
@@ -1 +1 @@
1
- export const VERSION = "2.0.0-beta.133";
1
+ export const VERSION = "2.0.0-beta.134";
@@ -53,11 +53,11 @@ export class BuildInfoWriter {
53
53
  align_text: false,
54
54
  align_center: false,
55
55
  multiple: block.allowMultiple ? true : false,
56
- mode: block.mode ?? "preview",
56
+ mode: block.mode === "both" ? true : false,
57
57
  customClassName: false,
58
58
  inserter: block.inserter,
59
59
  },
60
- mode: block.mode ?? "preview",
60
+ mode: block.mode === "edit" ? "edit" : "preview",
61
61
  canCache: block.cache,
62
62
  frontendMode: block.frontendMode,
63
63
  postmeta: block.postMetaBlock,
@@ -130,6 +130,7 @@ function readBlockDataAsJSONExport(file, contents) {
130
130
  result.types = userData.conditions?.postTypes;
131
131
  result.templates = userData.conditions?.templates;
132
132
  result.allowMultiple = userData.conditions?.multiple === false ? false : true;
133
+ result.mode = userData.editMode;
133
134
  result.inserter = userData.inserter;
134
135
  result.frontendMode = userData.frontendMode;
135
136
  if (userData.postMetaBlock) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eddev",
3
- "version": "2.0.0-beta.133",
3
+ "version": "2.0.0-beta.134",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "type": "module",
package/types.meta.d.ts CHANGED
@@ -161,6 +161,17 @@ declare global {
161
161
  from?: AnyBlockTransform[]
162
162
  to?: AnyBlockTransform[]
163
163
  }
164
+
165
+ /**
166
+ * Controls how the ACF edit mode is handled.
167
+ *
168
+ * - Set to "preview" (default) to only allow ACF editing in the sidebar
169
+ * - Set to "edit" to prevent any visual previewing of the block, only ever showing the ACF form
170
+ * - Set to "both" to allow the user to toggle between ACF editing and visual preview
171
+ *
172
+ * @default "preview"
173
+ */
174
+ editMode?: "preview" | "edit" | "both"
164
175
  }
165
176
  }
166
177
  type BlockIcon =