@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/{chunk-5VNXIAHG.js → chunk-LVOBZ2OO.js} +4 -4
- package/dist/chunk-LVOBZ2OO.js.map +1 -0
- package/dist/{chunk-FDCP3LVR.js → chunk-TG5O4K75.js} +5 -5
- package/dist/chunk-TG5O4K75.js.map +1 -0
- package/dist/{chunk-Z2X7B6YL.js → chunk-W525ACX7.js} +3 -3
- package/dist/{chunk-Z2X7B6YL.js.map → chunk-W525ACX7.js.map} +1 -1
- package/dist/editor.cjs +4 -4
- package/dist/editor.cjs.map +1 -1
- package/dist/editor.d.cts +1 -1
- package/dist/editor.d.ts +1 -1
- package/dist/editor.js +5 -5
- package/dist/editor.js.map +1 -1
- package/dist/index.cjs +4 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +3 -3
- package/dist/react.cjs.map +1 -1
- package/dist/react.js +2 -2
- package/dist/{useEditor-BGKnLQuK.d.ts → useEditor-DFHy1dWc.d.ts} +17 -2
- package/dist/{useEditor-Dr_Gg7gu.d.cts → useEditor-DLBWS6j0.d.cts} +17 -2
- package/package.json +2 -2
- package/dist/chunk-5VNXIAHG.js.map +0 -1
- package/dist/chunk-FDCP3LVR.js.map +0 -1
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 "
|
|
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 "
|
|
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: "
|
|
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: "
|
|
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 }),
|