@particle-academy/fancy-cms-ui 0.5.0 → 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/editor.d.cts CHANGED
@@ -1,4 +1,4 @@
1
- export { C as Canvas, a as CanvasProps, E as Editor, b as EditorAction, c as EditorApi, d as EditorProps, e as EditorState, I as Inspector, f as InspectorProps, L as LayersPanel, g as LayersPanelProps, i as editorReduce, j as initEditor, u as useEditor } from './useEditor-Dr_Gg7gu.cjs';
1
+ export { C as Canvas, a as CanvasProps, E as Editor, b as EditorAction, c as EditorApi, d as EditorProps, e as EditorState, I as Inspector, f as InspectorProps, L as LayersPanel, g as LayersPanelProps, i as editorReduce, j as initEditor, u as useEditor } from './useEditor-DLBWS6j0.cjs';
2
2
  import { ReactNode, ReactElement } from 'react';
3
3
  import { P as PageDoc, h as ElementRegistry, g as DataContext, N as Node, q as StyleProps, L as LayoutMode } from './registry-CvzbUd5E.cjs';
4
4
  import '@particle-academy/fancy-doc-commons';
@@ -77,4 +77,4 @@ interface NodeInspectorProps {
77
77
  */
78
78
  declare function NodeInspector({ node, transform, measured, onProps, onStyle, onLayout, onTransform, onRemove, onClose, }: NodeInspectorProps): ReactElement;
79
79
 
80
- export { EditablePage, type EditablePageProps, NodeInspector, type NodeInspectorProps };
80
+ export { EditablePage, type EditablePageProps, NodeInspector, type NodeInspectorProps, type NodeTransform };
package/dist/editor.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- export { C as Canvas, a as CanvasProps, E as Editor, b as EditorAction, c as EditorApi, d as EditorProps, e as EditorState, I as Inspector, f as InspectorProps, L as LayersPanel, g as LayersPanelProps, i as editorReduce, j as initEditor, u as useEditor } from './useEditor-BGKnLQuK.js';
1
+ export { C as Canvas, a as CanvasProps, E as Editor, b as EditorAction, c as EditorApi, d as EditorProps, e as EditorState, I as Inspector, f as InspectorProps, L as LayersPanel, g as LayersPanelProps, i as editorReduce, j as initEditor, u as useEditor } from './useEditor-DFHy1dWc.js';
2
2
  import { ReactNode, ReactElement } from 'react';
3
3
  import { P as PageDoc, h as ElementRegistry, g as DataContext, N as Node, q as StyleProps, L as LayoutMode } from './registry-CvzbUd5E.js';
4
4
  import '@particle-academy/fancy-doc-commons';
@@ -77,4 +77,4 @@ interface NodeInspectorProps {
77
77
  */
78
78
  declare function NodeInspector({ node, transform, measured, onProps, onStyle, onLayout, onTransform, onRemove, onClose, }: NodeInspectorProps): ReactElement;
79
79
 
80
- export { EditablePage, type EditablePageProps, NodeInspector, type NodeInspectorProps };
80
+ export { EditablePage, type EditablePageProps, NodeInspector, type NodeInspectorProps, type NodeTransform };
package/dist/editor.js CHANGED
@@ -1,6 +1,6 @@
1
- import { useEditor, useLatestRef, CONTAINER_TYPES, ADD_DEFAULTS, ADD_MENU } from './chunk-5VNXIAHG.js';
2
- export { Canvas, Editor, Inspector, LayersPanel, editorReduce, initEditor, useEditor } from './chunk-5VNXIAHG.js';
3
- import { isBinding, lastRootId, childrenOf, CmsPage, defaultRegistry } from './chunk-FDCP3LVR.js';
1
+ import { useEditor, useLatestRef, CONTAINER_TYPES, ADD_DEFAULTS, ADD_MENU } from './chunk-LVOBZ2OO.js';
2
+ export { Canvas, Editor, Inspector, LayersPanel, editorReduce, initEditor, useEditor } from './chunk-LVOBZ2OO.js';
3
+ import { isBinding, lastRootId, childrenOf, CmsPage, defaultRegistry } from './chunk-TG5O4K75.js';
4
4
  import { useState, useRef, useEffect, useCallback, useLayoutEffect } from 'react';
5
5
  import { ContextMenu } from '@particle-academy/react-fancy';
6
6
  import { fractionalKey } from '@particle-academy/fancy-doc-commons';
@@ -458,7 +458,7 @@ function EditablePage({
458
458
  el.setAttribute("contenteditable", "true");
459
459
  el.style.outline = "none";
460
460
  el.focus();
461
- const commit = () => ed.apply({ t: "set_props", id: selection, patch: isRich ? { html: el.innerHTML } : { content: el.innerText } });
461
+ const commit = () => ed.apply({ t: "set_node_props", id: selection, patch: isRich ? { html: el.innerHTML } : { content: el.innerText } });
462
462
  el.addEventListener("blur", commit);
463
463
  return () => {
464
464
  el.removeEventListener("blur", commit);
@@ -562,7 +562,7 @@ function EditablePage({
562
562
  setDraggingEl(false);
563
563
  };
564
564
  const setStyle = (patch) => selection && ed.apply({ t: "set_style", id: selection, breakpoint: "base", patch });
565
- const setProps = (patch) => selection && ed.apply({ t: "set_props", id: selection, patch });
565
+ const setProps = (patch) => selection && ed.apply({ t: "set_node_props", id: selection, patch });
566
566
  const setLayout = (layout) => selection && ed.apply({ t: "set_layout", id: selection, layout });
567
567
  const removeSelected = () => {
568
568
  if (!selection) return;