@particle-academy/fancy-cms-ui 0.5.1 → 0.6.0

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/index.cjs CHANGED
@@ -86,7 +86,7 @@ function reduce(doc, op, opts = {}) {
86
86
  seq: doc.seq + 1
87
87
  };
88
88
  }
89
- case "set_props": {
89
+ case "set_node_props": {
90
90
  if (!doc.nodes[op.id]) return invalid("node not found");
91
91
  return patchNode(doc, op.id, {
92
92
  props: { ...doc.nodes[op.id].props, ...op.patch }
@@ -186,12 +186,12 @@ function invert(doc, op) {
186
186
  }
187
187
  return back;
188
188
  }
189
- case "set_props": {
189
+ case "set_node_props": {
190
190
  const node = doc.nodes[op.id];
191
191
  if (!node) return [];
192
192
  const prev = {};
193
193
  for (const k of Object.keys(op.patch)) prev[k] = node.props[k];
194
- return [{ t: "set_props", id: op.id, patch: prev }];
194
+ return [{ t: "set_node_props", id: op.id, patch: prev }];
195
195
  }
196
196
  case "set_layout": {
197
197
  const node = doc.nodes[op.id];
@@ -746,7 +746,7 @@ function Inspector({ doc, selection, apply }) {
746
746
  }
747
747
  const s = node.style.base;
748
748
  const setStyle = (patch) => apply({ t: "set_style", id: node.id, breakpoint: "base", patch });
749
- const setProp = (key, value) => apply({ t: "set_props", id: node.id, patch: { [key]: value } });
749
+ const setProp = (key, value) => apply({ t: "set_node_props", id: node.id, patch: { [key]: value } });
750
750
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { overflow: "auto", padding: 16, fontFamily: "system-ui, sans-serif", height: "100%", boxSizing: "border-box" }, children: [
751
751
  /* @__PURE__ */ jsxRuntime.jsx("div", { style: { fontSize: 13, fontWeight: 600, color: "var(--fcms-fg)" }, children: node.type }),
752
752
  /* @__PURE__ */ jsxRuntime.jsx("div", { style: { fontSize: 11, color: "var(--fcms-muted)", marginBottom: 8 }, children: node.id }),