eddev 2.3.3 → 2.3.4

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,7 +1,7 @@
1
1
  import { createElement as _createElement } from "react";
2
2
  import { jsx as _jsx } from "react/jsx-runtime";
3
3
  import { forwardRef, Fragment, useEffect, useMemo } from "react";
4
- import { ref, subscribe, useSnapshot } from "valtio";
4
+ import { proxy, ref, subscribe, useSnapshot } from "valtio";
5
5
  import { proxyMap } from "valtio/utils";
6
6
  import { addBlockMetadata, getBlockMetadata } from "../block-utils.js";
7
7
  import { registerBuiltinBlocks } from "../builtin-blocks.js";
@@ -281,10 +281,10 @@ export function installEDGutenbergHooks() {
281
281
  acf.addFilter("blocks/preview/render", (data) => {
282
282
  try {
283
283
  const key = String(data);
284
- const existing = BlockPropsStore.get(data.__clientId);
284
+ const existing = BlockPropsStore.blocks.get(data.__clientId);
285
285
  if (!existing || existing.key !== data.__key) {
286
286
  const payload = JSON.parse(data);
287
- BlockPropsStore.set(payload.__clientId, {
287
+ BlockPropsStore.blocks.set(payload.__clientId, {
288
288
  payload: payload ? ref(payload) : null,
289
289
  key: key,
290
290
  });
@@ -299,9 +299,11 @@ export function installEDGutenbergHooks() {
299
299
  if (acf.jsxNameReplacements) {
300
300
  acf.jsxNameReplacements["edblock"] = forwardRef(function EDBlock(props, ref) {
301
301
  const block = useBlockContext();
302
- const payload = useSnapshot(BlockPropsStore).get(block?.clientId)?.payload;
302
+ const payload = useSnapshot(BlockPropsStore).blocks.get(block?.clientId)?.payload;
303
303
  return useMemo(() => _jsx(EditableBlock, { payload: payload }), [payload]);
304
304
  });
305
305
  }
306
306
  }
307
- const BlockPropsStore = proxyMap();
307
+ const BlockPropsStore = proxy({
308
+ blocks: proxyMap(),
309
+ });
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "2.3.3";
1
+ export declare const VERSION = "2.3.4";
2
2
  //# sourceMappingURL=version.d.ts.map
@@ -1 +1 @@
1
- export const VERSION = "2.3.3";
1
+ export const VERSION = "2.3.4";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eddev",
3
- "version": "2.3.3",
3
+ "version": "2.3.4",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -129,7 +129,7 @@
129
129
  "ufo": "^1.3.1",
130
130
  "undent": "^0.1.0",
131
131
  "undici": "6.21.0",
132
- "valtio": "^2.1.2",
132
+ "valtio": "^2.3.1",
133
133
  "vinxi": "^0.5.8",
134
134
  "vite-plugin-glsl": "^1.5.5",
135
135
  "vite-tsconfig-paths": "4.3.2",