@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/{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 +2 -2
- package/dist/editor.d.ts +2 -2
- 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 +3 -3
- package/dist/chunk-5VNXIAHG.js.map +0 -1
- package/dist/chunk-FDCP3LVR.js.map +0 -1
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-
|
|
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-
|
|
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-
|
|
2
|
-
export { Canvas, Editor, Inspector, LayersPanel, editorReduce, initEditor, useEditor } from './chunk-
|
|
3
|
-
import { isBinding, lastRootId, childrenOf, CmsPage, defaultRegistry } from './chunk-
|
|
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: "
|
|
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: "
|
|
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;
|