@particle-academy/fancy-cms-ui 0.3.0 → 0.3.1

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-FV_extlw.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-BQtAHLHl.cjs';
2
2
  import { ReactNode, ReactElement } from 'react';
3
3
  import { P as PageDoc, h as ElementRegistry, g as DataContext, N as Node, p as StyleProps, L as LayoutMode } from './registry-D5y5IgCR.cjs';
4
4
 
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-CyPSB3OQ.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-CpX-LbfH.js';
2
2
  import { ReactNode, ReactElement } from 'react';
3
3
  import { P as PageDoc, h as ElementRegistry, g as DataContext, N as Node, p as StyleProps, L as LayoutMode } from './registry-D5y5IgCR.js';
4
4
 
package/dist/editor.js CHANGED
@@ -1,5 +1,5 @@
1
- import { useEditor, useLatestRef, CONTAINER_TYPES, keyBetween, ADD_DEFAULTS, ADD_MENU } from './chunk-JN5MRSR2.js';
2
- export { Canvas, Editor, Inspector, LayersPanel, editorReduce, initEditor, useEditor } from './chunk-JN5MRSR2.js';
1
+ import { useEditor, useLatestRef, CONTAINER_TYPES, keyBetween, ADD_DEFAULTS, ADD_MENU } from './chunk-6Q7DKNDZ.js';
2
+ export { Canvas, Editor, Inspector, LayersPanel, editorReduce, initEditor, useEditor } from './chunk-6Q7DKNDZ.js';
3
3
  import { isBinding, childrenOf, CmsPage, defaultRegistry } from './chunk-GOXVGEKU.js';
4
4
  import { useState, useRef, useEffect, useCallback, useLayoutEffect } from 'react';
5
5
  import { ContextMenu } from '@particle-academy/react-fancy';
@@ -30,11 +30,11 @@ function NodeInspector({
30
30
  /* @__PURE__ */ jsx("span", { style: { fontSize: 10, opacity: 0.5, fontFamily: "ui-monospace, monospace", overflow: "hidden", textOverflow: "ellipsis" }, children: node.id })
31
31
  ] }),
32
32
  /* @__PURE__ */ jsx("span", { style: { flex: 1 } }),
33
- /* @__PURE__ */ jsx("button", { type: "button", style: { ...iconBtn, color: "#fca5a5" }, title: "Delete element", onClick: onRemove, children: "\u{1F5D1}" }),
33
+ /* @__PURE__ */ jsx("button", { type: "button", style: { ...iconBtn, color: "var(--fcms-danger, #fca5a5)" }, title: "Delete element", onClick: onRemove, children: "\u{1F5D1}" }),
34
34
  /* @__PURE__ */ jsx("button", { type: "button", style: iconBtn, title: "Close", onClick: onClose, children: "\u2715" })
35
35
  ] }),
36
36
  /* @__PURE__ */ jsxs("div", { style: body, children: [
37
- "content" in node.props || node.type === "richtext" ? /* @__PURE__ */ jsxs("p", { style: { fontSize: 11, color: "var(--fg-3, #94a3b8)", margin: "0 0 12px", lineHeight: 1.45, paddingBottom: 12, borderBottom: "1px solid #1e293b" }, children: [
37
+ "content" in node.props || node.type === "richtext" ? /* @__PURE__ */ jsxs("p", { style: { fontSize: 11, color: "var(--fcms-muted, #94a3b8)", margin: "0 0 12px", lineHeight: 1.45, paddingBottom: 12, borderBottom: "1px solid var(--fcms-border, #1e293b)" }, children: [
38
38
  "\u270E Edit the text ",
39
39
  /* @__PURE__ */ jsx("strong", { children: "directly on the page" }),
40
40
  " \u2014 click in and type. This panel is for layout, style, and bindings."
@@ -134,7 +134,7 @@ function NodeInspector({
134
134
  ] });
135
135
  }
136
136
  function Group({ label, children }) {
137
- return /* @__PURE__ */ jsxs("div", { style: { display: "flex", flexDirection: "column", gap: 8, paddingBottom: 12, marginBottom: 12, borderBottom: "1px solid #1e293b" }, children: [
137
+ return /* @__PURE__ */ jsxs("div", { style: { display: "flex", flexDirection: "column", gap: 8, paddingBottom: 12, marginBottom: 12, borderBottom: "1px solid var(--fcms-border, #1e293b)" }, children: [
138
138
  /* @__PURE__ */ jsx("span", { style: { fontSize: 10, letterSpacing: "0.06em", textTransform: "uppercase", opacity: 0.5 }, children: label }),
139
139
  children
140
140
  ] });
@@ -150,7 +150,7 @@ function PropField({ name, value, onChange }) {
150
150
  type: "button",
151
151
  title: bound ? "Unbind (use a literal value)" : "Bind to data (e.g. item.name)",
152
152
  onClick: () => onChange(bound ? "" : { $bind: "" }),
153
- style: { background: "none", border: "none", cursor: "pointer", padding: 0, fontSize: 11, color: bound ? "#a78bfa" : "#64748b" },
153
+ style: { background: "none", border: "none", cursor: "pointer", padding: 0, fontSize: 11, color: bound ? "var(--fcms-accent, #a78bfa)" : "var(--fcms-muted, #64748b)" },
154
154
  children: "\u{1F517}"
155
155
  }
156
156
  );
@@ -161,7 +161,7 @@ function PropField({ name, value, onChange }) {
161
161
  " ",
162
162
  link
163
163
  ] }),
164
- /* @__PURE__ */ jsx("input", { style: { ...input, borderColor: "#7c3aed" }, placeholder: "data path \xB7 e.g. item.name", value: value.$bind, onChange: (e) => onChange({ $bind: e.target.value }) })
164
+ /* @__PURE__ */ jsx("input", { style: { ...input, borderColor: "var(--fcms-accent, #7c3aed)" }, placeholder: "data path \xB7 e.g. item.name", value: value.$bind, onChange: (e) => onChange({ $bind: e.target.value }) })
165
165
  ] });
166
166
  }
167
167
  if (typeof value === "boolean") {
@@ -248,7 +248,7 @@ var panel = {
248
248
  fontFamily: "system-ui, sans-serif",
249
249
  overflow: "hidden"
250
250
  };
251
- var headRow = { display: "flex", alignItems: "center", gap: 8, padding: "10px 12px", borderBottom: "1px solid #1e293b" };
251
+ var headRow = { display: "flex", alignItems: "center", gap: 8, padding: "10px 12px", borderBottom: "1px solid var(--fcms-border, #1e293b)" };
252
252
  var body = { padding: 12, overflowY: "auto" };
253
253
  var field = { display: "flex", flexDirection: "column", gap: 4, flex: 1, minWidth: 0 };
254
254
  var fieldLabel = { fontSize: 10, opacity: 0.6 };
@@ -717,7 +717,7 @@ function DropIndicator({
717
717
  }) {
718
718
  const r = hint.rect;
719
719
  if (!r) return null;
720
- const color = "#ec4899";
720
+ const color = "var(--fcms-drop, #ec4899)";
721
721
  if (hint.edge === "inside") {
722
722
  return /* @__PURE__ */ jsx("div", { style: { position: "fixed", left: r.x, top: r.y, width: r.w, height: r.h, outline: `2px dashed ${color}`, outlineOffset: -2, borderRadius: 6, pointerEvents: "none", zIndex: Z2 + 4 } });
723
723
  }
@@ -736,9 +736,9 @@ function ElementPalette({ open, onDragChange }) {
736
736
  width: 216,
737
737
  transform: open ? "translateX(0)" : "translateX(100%)",
738
738
  transition: "transform 0.18s ease",
739
- background: "#0b1220",
740
- color: "#e2e8f0",
741
- borderLeft: "1px solid #1e293b",
739
+ background: "var(--fcms-bg, #0b1220)",
740
+ color: "var(--fcms-fg, #e2e8f0)",
741
+ borderLeft: "1px solid var(--fcms-border, #1e293b)",
742
742
  borderTopLeftRadius: 12,
743
743
  borderBottomLeftRadius: 12,
744
744
  boxShadow: "-18px 0 48px -20px rgba(0,0,0,0.6)",
@@ -768,8 +768,8 @@ function ElementPalette({ open, onDragChange }) {
768
768
  gap: 4,
769
769
  height: 56,
770
770
  borderRadius: 8,
771
- background: "#0f172a",
772
- border: "1px solid #1e293b",
771
+ background: "var(--fcms-canvas, #0f172a)",
772
+ border: "1px solid var(--fcms-border, #1e293b)",
773
773
  cursor: "grab",
774
774
  fontSize: 12,
775
775
  userSelect: "none"
@@ -896,7 +896,7 @@ function SelectionOverlay({
896
896
  top: box.y - 1,
897
897
  width: box.w + 2,
898
898
  height: box.h + 2,
899
- outline: "2px solid #8b5cf6",
899
+ outline: "2px solid var(--fcms-accent, #8b5cf6)",
900
900
  borderRadius: 4,
901
901
  pointerEvents: "none",
902
902
  zIndex: Z2
@@ -906,7 +906,7 @@ function SelectionOverlay({
906
906
  width: 12,
907
907
  height: 12,
908
908
  background: "#fff",
909
- border: "2px solid #8b5cf6",
909
+ border: "2px solid var(--fcms-accent, #8b5cf6)",
910
910
  borderRadius: 3,
911
911
  zIndex: Z2 + 1,
912
912
  touchAction: "none",