easy-email-pro-theme 1.52.0 → 1.53.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.
Files changed (25) hide show
  1. package/lib/index.js +487 -68
  2. package/lib/style.css +27 -14
  3. package/lib/typings/components/ConfigurationPanel/Schemas/Blockquote.d.ts +2 -0
  4. package/lib/typings/components/ConfigurationPanel/Schemas/Button.d.ts +2 -0
  5. package/lib/typings/components/ConfigurationPanel/Schemas/Column.d.ts +2 -0
  6. package/lib/typings/components/ConfigurationPanel/Schemas/Divider.d.ts +2 -0
  7. package/lib/typings/components/ConfigurationPanel/Schemas/Group.d.ts +2 -0
  8. package/lib/typings/components/ConfigurationPanel/Schemas/Hero.d.ts +2 -0
  9. package/lib/typings/components/ConfigurationPanel/Schemas/Image.d.ts +2 -0
  10. package/lib/typings/components/ConfigurationPanel/Schemas/Navbar.d.ts +2 -0
  11. package/lib/typings/components/ConfigurationPanel/Schemas/Page.d.ts +2 -0
  12. package/lib/typings/components/ConfigurationPanel/Schemas/Section.d.ts +2 -0
  13. package/lib/typings/components/ConfigurationPanel/Schemas/Social.d.ts +2 -0
  14. package/lib/typings/components/ConfigurationPanel/Schemas/Spacer.d.ts +2 -0
  15. package/lib/typings/components/ConfigurationPanel/Schemas/Table.d.ts +2 -0
  16. package/lib/typings/components/ConfigurationPanel/Schemas/Table2.d.ts +2 -0
  17. package/lib/typings/components/ConfigurationPanel/Schemas/Text.d.ts +2 -0
  18. package/lib/typings/components/ConfigurationPanel/Schemas/Wrapper.d.ts +2 -0
  19. package/lib/typings/components/ConfigurationPanel/Schemas/index.d.ts +7 -0
  20. package/lib/typings/components/ConfigurationPanel/components/SchemaPanelRenderer.d.ts +9 -0
  21. package/lib/typings/components/index.d.ts +1 -0
  22. package/lib/typings/typings/custom-types.d.ts +1 -0
  23. package/lib/typings/typings/index.d.ts +1 -0
  24. package/lib/typings/typings/schema.d.ts +46 -0
  25. package/package.json +1 -1
package/lib/index.js CHANGED
@@ -54,7 +54,7 @@ var __async = (__this, __arguments, generator) => {
54
54
  step((generator = generator.apply(__this, __arguments)).next());
55
55
  });
56
56
  };
57
- import { classnames, useEditorActions, useDragNodePath, useStandaloneElementEditing, useEditorProps, useRefState, isDOMElement, useMergeTagsData, useLockState, useEventCallback, useSelectedNodePath, useSelectedNode, useSetSelectedNodePath, useSetHoverNodePath, useUniversalElementEditing, useUniversalElementPath, useStandaloneElementPath, useStandaloneElement, useActiveTab, ActiveTabKeys, toggleFormat, TextFormat, useUniversalElement, isFormatActive, validation, CustomEvent, getDynamicImagePlaceholder, EmailEditorProvider, EmailEditor, useEditorState, useForceUpdate, useEqualState, IframeComponent, HtmlStringToReactNodes, useStandaloneElementSaveButton, ExternalComponents, useDragoverDirection } from "easy-email-pro-editor";
57
+ import { classnames, useEditorActions, useDragNodePath, useStandaloneElementEditing, useEditorProps, useRefState, isDOMElement, useMergeTagsData, useLockState, useEventCallback, useSelectedNodePath, useSelectedNode, useSetSelectedNodePath, useSetHoverNodePath, useUniversalElementEditing, useUniversalElementPath, useStandaloneElementPath, useStandaloneElement, useEditorState, useActiveTab, ActiveTabKeys, toggleFormat, TextFormat, useUniversalElement, isFormatActive, validation, CustomEvent, getDynamicImagePlaceholder, EmailEditorProvider, EmailEditor, useForceUpdate, useEqualState, IframeComponent, HtmlStringToReactNodes, useStandaloneElementSaveButton, ExternalComponents, useDragoverDirection } from "easy-email-pro-editor";
58
58
  import { useSlate, ReactEditor, useSlateStatic, useSelected } from "slate-react";
59
59
  import * as React$2 from "react";
60
60
  import React__default, { useRef, useState, useEffect, useCallback, useMemo, createContext, useContext, useLayoutEffect, memo, useReducer, cloneElement, forwardRef, Suspense, Component, createElement } from "react";
@@ -63,7 +63,7 @@ import { cloneDeep, get, isEqual, set, omit as omit$2, merge as merge$1, debounc
63
63
  import { Editor, Range, Node, Transforms, Path, Text as Text$2, createEditor } from "slate";
64
64
  import { nanoid } from "nanoid";
65
65
  import { Form, Input, Modal, Collapse, Space, Empty, Card, Grid, Button as Button$2, Drawer, Switch, Typography as Typography$1, Tabs, Radio, Tooltip, Divider as Divider$2, Alert, Popconfirm, Message, PageHeader, Spin, Layout as Layout$2, Popover, Select as Select$1, Slider, InputNumber, Tag, Link as Link$3, List as List$1, Skeleton, Trigger } from "@arco-design/web-react";
66
- import { IconPlus, IconDelete, IconEdit, IconLeft, IconDownload, IconCopy, IconUndo, IconRedo, IconMinus, IconEye, IconSubscribeAdd, IconClose, IconCheckCircleFill, IconDragArrow, IconPalette, IconLock, IconUnlock, IconImage, IconQuestionCircle, IconLink, IconCloud, IconDragDotVertical, IconSend, IconDown } from "@arco-design/web-react/icon";
66
+ import { IconPlus, IconCopy, IconDelete, IconEdit, IconLeft, IconDownload, IconUndo, IconRedo, IconMinus, IconEye, IconSubscribeAdd, IconClose, IconCheckCircleFill, IconDragArrow, IconPalette, IconLock, IconUnlock, IconImage, IconQuestionCircle, IconLink, IconCloud, IconDragDotVertical, IconSend, IconDown } from "@arco-design/web-react/icon";
67
67
  import { unstable_batchedUpdates, createPortal } from "react-dom";
68
68
  import mjml from "mjml-browser";
69
69
  import { HistoryEditor } from "slate-history";
@@ -7095,19 +7095,23 @@ function normalizeLocalDisabled(localDisabled, globalDisabled) {
7095
7095
  };
7096
7096
  }
7097
7097
  [KeyboardCode.Down, KeyboardCode.Right, KeyboardCode.Up, KeyboardCode.Left];
7098
- const item$2 = "_item_14paa_1";
7099
- const itemContent = "_itemContent_14paa_8";
7100
- const itemActions = "_itemActions_14paa_26";
7101
- const itemLabelWrapper = "_itemLabelWrapper_14paa_30";
7102
- const itemLabel = "_itemLabel_14paa_30";
7103
- const action = "_action_14paa_43";
7104
- const itemTitle = "_itemTitle_14paa_60";
7105
- const itemCollapse = "_itemCollapse_14paa_66";
7106
- const itemChildren = "_itemChildren_14paa_87";
7098
+ const item$2 = "_item_7uv5l_1";
7099
+ const itemContent = "_itemContent_7uv5l_8";
7100
+ const itemActions = "_itemActions_7uv5l_26";
7101
+ const itemHovered = "_itemHovered_7uv5l_30";
7102
+ const itemSelected = "_itemSelected_7uv5l_34";
7103
+ const itemLabelWrapper = "_itemLabelWrapper_7uv5l_43";
7104
+ const itemLabel = "_itemLabel_7uv5l_43";
7105
+ const action = "_action_7uv5l_56";
7106
+ const itemTitle = "_itemTitle_7uv5l_73";
7107
+ const itemCollapse = "_itemCollapse_7uv5l_79";
7108
+ const itemChildren = "_itemChildren_7uv5l_100";
7107
7109
  const styles$4 = {
7108
7110
  item: item$2,
7109
7111
  itemContent,
7110
7112
  itemActions,
7113
+ itemHovered,
7114
+ itemSelected,
7111
7115
  itemLabelWrapper,
7112
7116
  itemLabel,
7113
7117
  action,
@@ -7320,21 +7324,41 @@ function ComponentItem({
7320
7324
  onToggleCollapse,
7321
7325
  dragHandleProps = {}
7322
7326
  }) {
7323
- const { setSelectedNodePath } = useEditorActions();
7324
- const { deleteBlock } = useElementInteract();
7327
+ const { setSelectedNodePath, setHoverNodePath } = useEditorActions();
7328
+ const { hoverNodePath, selectedNodePath } = useEditorState();
7329
+ const { deleteBlock, copyBlock } = useElementInteract();
7325
7330
  const editor = useSlateStatic();
7331
+ const path2 = useMemo(() => {
7332
+ try {
7333
+ return ReactEditor.findPath(editor, component.block);
7334
+ } catch (error2) {
7335
+ return null;
7336
+ }
7337
+ }, [component.block, editor]);
7326
7338
  const onClick = () => {
7327
- let path2 = ReactEditor.findPath(editor, component.block);
7339
+ if (!path2)
7340
+ return;
7341
+ let newPath = path2;
7328
7342
  if (NodeUtils.isUnsetElement(component.block)) {
7329
- path2 = Path.parent(path2);
7343
+ newPath = Path.parent(newPath);
7330
7344
  }
7331
- setSelectedNodePath(path2);
7345
+ setSelectedNodePath(newPath);
7332
7346
  };
7333
7347
  const onRemove = (e) => {
7348
+ try {
7349
+ e.stopPropagation();
7350
+ const path22 = ReactEditor.findPath(editor, component.block);
7351
+ deleteBlock(path22);
7352
+ setSelectedNodePath(null);
7353
+ } catch (error2) {
7354
+ console.error(error2);
7355
+ }
7356
+ };
7357
+ const onCopy = (e) => {
7334
7358
  e.stopPropagation();
7335
- const path2 = ReactEditor.findPath(editor, component.block);
7336
- deleteBlock(path2);
7337
- setSelectedNodePath(null);
7359
+ if (!path2)
7360
+ return;
7361
+ copyBlock(path2);
7338
7362
  };
7339
7363
  const hasBlockChildren = component.block.children.every(
7340
7364
  (child) => NodeUtils.isBlockElement(child)
@@ -7369,56 +7393,99 @@ function ComponentItem({
7369
7393
  }
7370
7394
  return text;
7371
7395
  }, [component.block, label]);
7372
- return /* @__PURE__ */ React__default.createElement("div", { className: styles$4.item, onClick }, /* @__PURE__ */ React__default.createElement("div", { className: styles$4.itemContent }, /* @__PURE__ */ React__default.createElement("div", { className: styles$4.itemTitle }, /* @__PURE__ */ React__default.createElement(
7396
+ const isHovered = useMemo(() => {
7397
+ if (!path2 || !hoverNodePath)
7398
+ return false;
7399
+ return Path.equals(path2, hoverNodePath);
7400
+ }, [path2, hoverNodePath]);
7401
+ const isSelected = useMemo(() => {
7402
+ if (!path2 || !selectedNodePath)
7403
+ return false;
7404
+ return Path.equals(path2, selectedNodePath);
7405
+ }, [path2, selectedNodePath]);
7406
+ const handleMouseEnter = () => {
7407
+ if (path2) {
7408
+ setHoverNodePath(path2);
7409
+ }
7410
+ };
7411
+ const handleMouseLeave = () => {
7412
+ setHoverNodePath(null);
7413
+ };
7414
+ const itemClassName = useMemo(() => {
7415
+ const classes = [styles$4.item];
7416
+ if (isHovered)
7417
+ classes.push(styles$4.itemHovered);
7418
+ if (isSelected)
7419
+ classes.push(styles$4.itemSelected);
7420
+ return classes.join(" ");
7421
+ }, [isHovered, isSelected]);
7422
+ return /* @__PURE__ */ React__default.createElement(
7373
7423
  "div",
7374
7424
  {
7375
- className: styles$4.itemCollapse,
7376
- style: { opacity: hasBlockChildren ? 1 : 0 },
7377
- onClick: handleCollapseClick
7425
+ className: itemClassName,
7426
+ onClick,
7427
+ onMouseEnter: handleMouseEnter,
7428
+ onMouseLeave: handleMouseLeave
7378
7429
  },
7379
- /* @__PURE__ */ React__default.createElement(
7430
+ /* @__PURE__ */ React__default.createElement("div", { className: styles$4.itemContent }, /* @__PURE__ */ React__default.createElement("div", { className: styles$4.itemTitle }, /* @__PURE__ */ React__default.createElement(
7380
7431
  "div",
7381
7432
  {
7382
- style: {
7383
- transform: isCollapsed ? "rotate(-90deg)" : "rotate(0)",
7384
- transition: "transform 0.2s"
7385
- }
7433
+ className: styles$4.itemCollapse,
7434
+ style: { opacity: hasBlockChildren ? 1 : 0 },
7435
+ onClick: handleCollapseClick
7386
7436
  },
7387
- collapseIcon
7388
- )
7389
- ), /* @__PURE__ */ React__default.createElement("div", { className: styles$4.itemLabelWrapper }, /* @__PURE__ */ React__default.createElement(
7390
- SharedComponents.ElementIcon,
7391
- {
7392
- type: component.block.type,
7393
- width: 16,
7394
- height: 16
7395
- }
7396
- ), /* @__PURE__ */ React__default.createElement("div", { className: styles$4.itemLabel }, displayLabel))), /* @__PURE__ */ React__default.createElement(
7397
- "div",
7398
- {
7399
- className: styles$4.itemActions,
7400
- onClick: (e) => e.stopPropagation()
7401
- },
7402
- /* @__PURE__ */ React__default.createElement("div", { className: styles$4.action, onClick: onRemove }, /* @__PURE__ */ React__default.createElement(IconDelete, null)),
7403
- /* @__PURE__ */ React__default.createElement(
7404
- "div",
7405
- __spreadValues({
7406
- style: {
7407
- cursor: "grab"
7437
+ /* @__PURE__ */ React__default.createElement(
7438
+ "div",
7439
+ {
7440
+ style: {
7441
+ transform: isCollapsed ? "rotate(-90deg)" : "rotate(0)",
7442
+ transition: "transform 0.2s"
7443
+ }
7408
7444
  },
7409
- className: styles$4.action
7410
- }, dragHandleProps),
7411
- /* @__PURE__ */ React__default.createElement("svg", { viewBox: "0 0 20 20", width: "12" }, /* @__PURE__ */ React__default.createElement("path", { d: "M7 2a2 2 0 1 0 .001 4.001A2 2 0 0 0 7 2zm0 6a2 2 0 1 0 .001 4.001A2 2 0 0 0 7 8zm0 6a2 2 0 1 0 .001 4.001A2 2 0 0 0 7 14zm6-8a2 2 0 1 0-.001-4.001A2 2 0 0 0 13 6zm0 2a2 2 0 1 0 .001 4.001A2 2 0 0 0 13 8zm0 6a2 2 0 1 0 .001 4.001A2 2 0 0 0 13 14z" }))
7412
- )
7413
- )));
7445
+ collapseIcon
7446
+ )
7447
+ ), /* @__PURE__ */ React__default.createElement("div", { className: styles$4.itemLabelWrapper }, /* @__PURE__ */ React__default.createElement(
7448
+ SharedComponents.ElementIcon,
7449
+ {
7450
+ type: component.block.type,
7451
+ width: 16,
7452
+ height: 16
7453
+ }
7454
+ ), /* @__PURE__ */ React__default.createElement("div", { className: styles$4.itemLabel }, displayLabel))), /* @__PURE__ */ React__default.createElement(
7455
+ "div",
7456
+ {
7457
+ className: styles$4.itemActions,
7458
+ onClick: (e) => e.stopPropagation()
7459
+ },
7460
+ /* @__PURE__ */ React__default.createElement("div", { className: styles$4.action, onClick: onCopy }, /* @__PURE__ */ React__default.createElement(IconCopy, null)),
7461
+ /* @__PURE__ */ React__default.createElement("div", { className: styles$4.action, onClick: onRemove }, /* @__PURE__ */ React__default.createElement(IconDelete, null)),
7462
+ /* @__PURE__ */ React__default.createElement(
7463
+ "div",
7464
+ __spreadValues({
7465
+ style: {
7466
+ cursor: "grab"
7467
+ },
7468
+ className: styles$4.action
7469
+ }, dragHandleProps),
7470
+ /* @__PURE__ */ React__default.createElement("svg", { viewBox: "0 0 20 20", width: "12" }, /* @__PURE__ */ React__default.createElement("path", { d: "M7 2a2 2 0 1 0 .001 4.001A2 2 0 0 0 7 2zm0 6a2 2 0 1 0 .001 4.001A2 2 0 0 0 7 8zm0 6a2 2 0 1 0 .001 4.001A2 2 0 0 0 7 14zm6-8a2 2 0 1 0-.001-4.001A2 2 0 0 0 13 6zm0 2a2 2 0 1 0 .001 4.001A2 2 0 0 0 13 8zm0 6a2 2 0 1 0 .001 4.001A2 2 0 0 0 13 14z" }))
7471
+ )
7472
+ ))
7473
+ );
7414
7474
  }
7415
7475
  const collapseIcon = /* @__PURE__ */ React__default.createElement("svg", { width: "10", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 70 41" }, /* @__PURE__ */ React__default.createElement("path", { d: "M30.76 39.2402C31.885 40.3638 33.41 40.995 35 40.995C36.59 40.995 38.115 40.3638 39.24 39.2402L68.24 10.2402C69.2998 9.10284 69.8768 7.59846 69.8494 6.04406C69.822 4.48965 69.1923 3.00657 68.093 1.90726C66.9937 0.807959 65.5106 0.178263 63.9562 0.150837C62.4018 0.123411 60.8974 0.700397 59.76 1.76024L35 26.5102L10.24 1.76024C9.10259 0.700397 7.59822 0.123411 6.04381 0.150837C4.4894 0.178263 3.00632 0.807959 1.90702 1.90726C0.807714 3.00657 0.178019 4.48965 0.150593 6.04406C0.123167 7.59846 0.700153 9.10284 1.75999 10.2402L30.76 39.2402Z" }));
7416
7476
  const BlockLayer = () => {
7417
7477
  const { values, inited } = useEditorContext();
7418
7478
  const pageElement = values.content;
7419
- const [allCollapsed, setAllCollapsed] = useState(false);
7479
+ const { layerDefaultCollapsed, enabledAutoComplete } = useEditorProps();
7480
+ const defaultCollapsedAll = useMemo(() => {
7481
+ if (enabledAutoComplete && isUndefined$1(layerDefaultCollapsed)) {
7482
+ return true;
7483
+ }
7484
+ return Boolean(layerDefaultCollapsed);
7485
+ }, [enabledAutoComplete, layerDefaultCollapsed]);
7486
+ const [allCollapsed, setAllCollapsed] = useState(defaultCollapsedAll);
7420
7487
  const [collapsedItems, setCollapsedItems] = useState(/* @__PURE__ */ new Set());
7421
- const handleCollapseToggle = (checked) => {
7488
+ const handleCollapseToggle = useEventCallback((checked) => {
7422
7489
  setAllCollapsed(checked);
7423
7490
  if (checked) {
7424
7491
  const newCollapsedItems = /* @__PURE__ */ new Set();
@@ -7440,7 +7507,7 @@ const BlockLayer = () => {
7440
7507
  } else {
7441
7508
  setCollapsedItems(/* @__PURE__ */ new Set());
7442
7509
  }
7443
- };
7510
+ });
7444
7511
  const toggleItemCollapse = (itemId, block) => {
7445
7512
  setCollapsedItems((prev) => {
7446
7513
  const newCollapsed = new Set(prev);
@@ -7464,6 +7531,11 @@ const BlockLayer = () => {
7464
7531
  });
7465
7532
  setAllCollapsed(false);
7466
7533
  };
7534
+ useEffect(() => {
7535
+ if (defaultCollapsedAll) {
7536
+ handleCollapseToggle(defaultCollapsedAll);
7537
+ }
7538
+ }, [defaultCollapsedAll, handleCollapseToggle]);
7467
7539
  if (!inited)
7468
7540
  return null;
7469
7541
  return /* @__PURE__ */ React__default.createElement("div", { onMouseOut: (e) => e.stopPropagation() }, /* @__PURE__ */ React__default.createElement(
@@ -32277,7 +32349,7 @@ function AttributesContainer$9({
32277
32349
  tabPosition: "top",
32278
32350
  name: `children`,
32279
32351
  label: "",
32280
- renderItem: (item2, index2) => /* @__PURE__ */ React__default.createElement(NavbarLink, { index: index2, path: [...nodePath, index2] }),
32352
+ renderItem: (item2, index2) => /* @__PURE__ */ React__default.createElement(NavbarLink$1, { index: index2, path: [...nodePath, index2] }),
32281
32353
  renderHeader: (item2, index2) => {
32282
32354
  return get(item2, "children.0.text") || "Custom";
32283
32355
  }
@@ -32323,7 +32395,7 @@ function AttributesContainer$9({
32323
32395
  }
32324
32396
  )));
32325
32397
  }
32326
- function NavbarLink({ index: index2, path: path2 }) {
32398
+ function NavbarLink$1({ index: index2, path: path2 }) {
32327
32399
  return /* @__PURE__ */ React__default.createElement("div", { className: "NavbarLink" }, /* @__PURE__ */ React__default.createElement("div", { style: { marginTop: 10 } }), /* @__PURE__ */ React__default.createElement(
32328
32400
  AttributeField.TextField,
32329
32401
  {
@@ -32519,7 +32591,7 @@ function AttributesContainer$8({
32519
32591
  tabPosition: "top",
32520
32592
  name: `children`,
32521
32593
  label: "",
32522
- renderItem: (item2, index2) => /* @__PURE__ */ React__default.createElement(SocialItem$1, { index: index2, path: [...nodePath, index2] }),
32594
+ renderItem: (item2, index2) => /* @__PURE__ */ React__default.createElement(SocialItem$2, { index: index2, path: [...nodePath, index2] }),
32523
32595
  renderHeader: (item2, index2) => item2.content || "Custom"
32524
32596
  }
32525
32597
  ), /* @__PURE__ */ React__default.createElement(Collapse.Item, { name: "0", header: t("Dimension") }, /* @__PURE__ */ React__default.createElement(
@@ -32590,7 +32662,7 @@ function AttributesContainer$8({
32590
32662
  }
32591
32663
  )));
32592
32664
  }
32593
- function SocialItem$1({ index: index2, path: path2 }) {
32665
+ function SocialItem$2({ index: index2, path: path2 }) {
32594
32666
  return /* @__PURE__ */ React__default.createElement("div", { className: "SocialItem" }, /* @__PURE__ */ React__default.createElement("div", { style: { marginTop: 10 } }), /* @__PURE__ */ React__default.createElement(
32595
32667
  AttributeField.ImageUrl,
32596
32668
  {
@@ -33550,17 +33622,346 @@ const ConfigPanelsMap = {
33550
33622
  [ElementType.STANDARD_TABLE2]: Table2,
33551
33623
  [ElementType.STANDARD_BLOCK_QUOTE]: Blockquote
33552
33624
  };
33625
+ const BlockSchemasMap = {
33626
+ // // Text elements
33627
+ // [ElementType.TEXT]: TextSchema,
33628
+ // [ElementType.STANDARD_TEXT]: TextSchema,
33629
+ // [ElementType.STANDARD_PARAGRAPH]: TextSchema,
33630
+ // [ElementType.STANDARD_TEXT_LIST]: TextSchema,
33631
+ // [ElementType.STANDARD_H1]: TextSchema,
33632
+ // [ElementType.STANDARD_H2]: TextSchema,
33633
+ // [ElementType.STANDARD_H3]: TextSchema,
33634
+ // [ElementType.STANDARD_H4]: TextSchema,
33635
+ // // Button
33636
+ // [ElementType.STANDARD_BUTTON]: ButtonSchema,
33637
+ // // Section
33638
+ // [ElementType.STANDARD_SECTION]: SectionSchema,
33639
+ // // Image
33640
+ // [ElementType.STANDARD_IMAGE]: ImageSchema,
33641
+ // // Page
33642
+ // [ElementType.PAGE]: PageSchema,
33643
+ // // Column
33644
+ // [ElementType.STANDARD_COLUMN]: ColumnSchema,
33645
+ // // Wrapper
33646
+ // [ElementType.STANDARD_WRAPPER]: WrapperSchema,
33647
+ // // Divider
33648
+ // [ElementType.STANDARD_DIVIDER]: DividerSchema,
33649
+ // // Spacer
33650
+ // [ElementType.STANDARD_SPACER]: SpacerSchema,
33651
+ // // Group
33652
+ // [ElementType.STANDARD_GROUP]: GroupSchema,
33653
+ // // Blockquote
33654
+ // [ElementType.STANDARD_BLOCK_QUOTE]: BlockquoteSchema,
33655
+ // // Table
33656
+ // [ElementType.STANDARD_TABLE]: TableSchema,
33657
+ // [ElementType.STANDARD_TABLE2]: Table2Schema,
33658
+ // // Hero
33659
+ // [ElementType.STANDARD_HERO]: HeroSchema,
33660
+ // // Navbar
33661
+ // [ElementType.STANDARD_NAVBAR]: NavbarSchema,
33662
+ // // Social
33663
+ // [ElementType.STANDARD_SOCIAL]: SocialSchema,
33664
+ // Note: Code and Widget components are too complex for schema-based approach
33665
+ // They will continue to use component-based configuration
33666
+ };
33667
+ const SchemaPanelRenderer = ({
33668
+ schema,
33669
+ nodePath
33670
+ }) => {
33671
+ const isResponsive = isResponsiveTabsSchema(schema);
33672
+ const desktop = useMemo(() => {
33673
+ if (isResponsive) {
33674
+ return /* @__PURE__ */ React__default.createElement(
33675
+ SchemaFieldsRenderer,
33676
+ {
33677
+ fields: schema.desktop,
33678
+ nodePath,
33679
+ mode: ActiveTabKeys.DESKTOP
33680
+ }
33681
+ );
33682
+ }
33683
+ return null;
33684
+ }, [isResponsive, schema, nodePath]);
33685
+ const mobile = useMemo(() => {
33686
+ if (isResponsive) {
33687
+ const responsiveSchema = schema;
33688
+ const mobileFields = responsiveSchema.mobile || responsiveSchema.desktop;
33689
+ return /* @__PURE__ */ React__default.createElement(
33690
+ SchemaFieldsRenderer,
33691
+ {
33692
+ fields: mobileFields,
33693
+ nodePath,
33694
+ mode: ActiveTabKeys.MOBILE
33695
+ }
33696
+ );
33697
+ }
33698
+ return null;
33699
+ }, [isResponsive, schema, nodePath]);
33700
+ const regularFields = useMemo(() => {
33701
+ if (!isResponsive) {
33702
+ return /* @__PURE__ */ React__default.createElement(
33703
+ SchemaFieldsRenderer,
33704
+ {
33705
+ fields: schema,
33706
+ nodePath
33707
+ }
33708
+ );
33709
+ }
33710
+ return null;
33711
+ }, [isResponsive, schema, nodePath]);
33712
+ if (isResponsive) {
33713
+ return /* @__PURE__ */ React__default.createElement(AttributesPanelWrapper, null, /* @__PURE__ */ React__default.createElement(ResponsiveTabs, { desktop, mobile }));
33714
+ }
33715
+ return /* @__PURE__ */ React__default.createElement(AttributesPanelWrapper, null, regularFields);
33716
+ };
33717
+ const SchemaFieldsRenderer = ({
33718
+ fields,
33719
+ nodePath,
33720
+ mode
33721
+ }) => {
33722
+ const { selectedNode } = useSelectedNode();
33723
+ const editorProps = useEditorProps();
33724
+ const defaultActiveKeys = useMemo(() => {
33725
+ const keys2 = [];
33726
+ fields.filter((field) => field.type === "CollapseGroup").filter((field) => field.defaultActive !== false).forEach((field) => {
33727
+ keys2.push(field.name);
33728
+ });
33729
+ fields.filter((field) => field.type === "EditPanelListField").forEach((field) => {
33730
+ const headerKey = field.headerKey;
33731
+ if (headerKey) {
33732
+ keys2.push(headerKey);
33733
+ }
33734
+ });
33735
+ return keys2;
33736
+ }, [fields]);
33737
+ return /* @__PURE__ */ React__default.createElement(CollapseWrapper$1, { defaultActiveKey: defaultActiveKeys }, fields.map((field, index2) => {
33738
+ if (field.type === "CollapseGroup") {
33739
+ return /* @__PURE__ */ React__default.createElement(
33740
+ Collapse.Item,
33741
+ {
33742
+ key: field.name || index2,
33743
+ name: field.name,
33744
+ header: field.header,
33745
+ extra: field.extra
33746
+ },
33747
+ /* @__PURE__ */ React__default.createElement(
33748
+ SchemaFieldsRenderer,
33749
+ {
33750
+ fields: field.children,
33751
+ nodePath,
33752
+ mode
33753
+ }
33754
+ )
33755
+ );
33756
+ }
33757
+ return /* @__PURE__ */ React__default.createElement(
33758
+ SchemaFieldRenderer,
33759
+ {
33760
+ key: index2,
33761
+ field,
33762
+ nodePath,
33763
+ mode,
33764
+ selectedNode,
33765
+ editorProps
33766
+ }
33767
+ );
33768
+ }));
33769
+ };
33770
+ const SchemaFieldRenderer = ({
33771
+ field,
33772
+ nodePath,
33773
+ mode,
33774
+ selectedNode,
33775
+ editorProps
33776
+ }) => {
33777
+ const actualPath = useMemo(() => {
33778
+ if (field.path === "textPath") {
33779
+ return [...nodePath, 0];
33780
+ }
33781
+ if (field.path === "nodePath") {
33782
+ return nodePath;
33783
+ }
33784
+ return nodePath;
33785
+ }, [field.path, nodePath]);
33786
+ const FieldComponent = getFieldComponent(field.type);
33787
+ if (!FieldComponent) {
33788
+ console.warn(`Unknown field type: ${field.type}`);
33789
+ return null;
33790
+ }
33791
+ const componentProps = __spreadValues({
33792
+ path: actualPath,
33793
+ name: field.name || ""
33794
+ }, field);
33795
+ if (field.type === "Typography" || field.type === "Buttons") {
33796
+ const fieldMode = field.mode === "desktop" ? ActiveTabKeys.DESKTOP : field.mode === "mobile" ? ActiveTabKeys.MOBILE : mode;
33797
+ componentProps.mode = fieldMode;
33798
+ componentProps.type = field.elementType || (selectedNode == null ? void 0 : selectedNode.type);
33799
+ if (field.hidePadding !== void 0) {
33800
+ componentProps.hidePadding = field.hidePadding;
33801
+ }
33802
+ }
33803
+ if (field.type === "Heading") {
33804
+ const currentMode = mode || ActiveTabKeys.DESKTOP;
33805
+ if (currentMode === ActiveTabKeys.MOBILE) {
33806
+ return null;
33807
+ }
33808
+ if (selectedNode && NodeUtils.isTextListElement(selectedNode)) {
33809
+ return null;
33810
+ }
33811
+ }
33812
+ if (field.type === "ButtonIcon") {
33813
+ if (!(editorProps == null ? void 0 : editorProps.enabledButtonIcon)) {
33814
+ return null;
33815
+ }
33816
+ }
33817
+ if (field.type === "EditPanelListField") {
33818
+ if ((selectedNode == null ? void 0 : selectedNode.type) === ElementType.STANDARD_SOCIAL) {
33819
+ componentProps.renderItem = (item2, index2) => /* @__PURE__ */ React__default.createElement(SocialItem$1, { index: index2, path: [...nodePath, index2] });
33820
+ componentProps.renderHeader = (item2) => item2.content || "Custom";
33821
+ } else if ((selectedNode == null ? void 0 : selectedNode.type) === ElementType.STANDARD_NAVBAR) {
33822
+ componentProps.renderItem = (item2, index2) => /* @__PURE__ */ React__default.createElement(NavbarLink, { index: index2, path: [...nodePath, index2] });
33823
+ componentProps.renderHeader = (item2) => get(item2, "children.0.text") || "Custom";
33824
+ }
33825
+ }
33826
+ if (field.type === "EditPanelListField" && mode === ActiveTabKeys.MOBILE) {
33827
+ return null;
33828
+ }
33829
+ if (field.type === "SyncChildrenField" && mode) {
33830
+ componentProps.mode = mode;
33831
+ }
33832
+ if (field.responsive) {
33833
+ return /* @__PURE__ */ React__default.createElement(
33834
+ ResponsiveField,
33835
+ __spreadProps(__spreadValues({
33836
+ component: FieldComponent
33837
+ }, componentProps), {
33838
+ mode
33839
+ })
33840
+ );
33841
+ }
33842
+ return /* @__PURE__ */ React__default.createElement(FieldComponent, __spreadValues({}, componentProps));
33843
+ };
33844
+ const SocialItem$1 = ({ path: path2 }) => {
33845
+ return /* @__PURE__ */ React__default.createElement("div", { className: "SocialItem" }, /* @__PURE__ */ React__default.createElement("div", { style: { marginTop: 10 } }), /* @__PURE__ */ React__default.createElement(
33846
+ AttributeField.ImageUrl,
33847
+ {
33848
+ path: path2,
33849
+ label: t("Icon"),
33850
+ name: `attributes.src`
33851
+ }
33852
+ ), /* @__PURE__ */ React__default.createElement(Divider$2, null), /* @__PURE__ */ React__default.createElement(
33853
+ AttributeField.ColorPickerField,
33854
+ {
33855
+ path: path2,
33856
+ label: t("Background color"),
33857
+ name: `attributes.background-color`
33858
+ }
33859
+ ), /* @__PURE__ */ React__default.createElement(
33860
+ AttributeField.BorderRadius,
33861
+ {
33862
+ path: path2,
33863
+ label: t("Border radius"),
33864
+ name: `attributes.border-radius`
33865
+ }
33866
+ ), /* @__PURE__ */ React__default.createElement(
33867
+ AttributeField.TextField,
33868
+ {
33869
+ path: [...path2, 0],
33870
+ label: t("Text"),
33871
+ name: `text`,
33872
+ fallbackValue: ""
33873
+ }
33874
+ ), /* @__PURE__ */ React__default.createElement(AttributeField.Link, { required: true, path: path2, name: `attributes.href` }));
33875
+ };
33876
+ const NavbarLink = ({ path: path2 }) => {
33877
+ return /* @__PURE__ */ React__default.createElement("div", { className: "NavbarLink" }, /* @__PURE__ */ React__default.createElement("div", { style: { marginTop: 10 } }), /* @__PURE__ */ React__default.createElement(
33878
+ AttributeField.TextField,
33879
+ {
33880
+ path: [...path2, 0],
33881
+ label: t("Text"),
33882
+ name: `text`
33883
+ }
33884
+ ), /* @__PURE__ */ React__default.createElement(AttributeField.Link, { required: true, path: path2, name: `attributes.href` }));
33885
+ };
33886
+ function isResponsiveTabsSchema(schema) {
33887
+ return typeof schema === "object" && "type" in schema && schema.type === "ResponsiveTabs";
33888
+ }
33889
+ function getFieldComponent(fieldType) {
33890
+ const fieldMap = {
33891
+ // Basic fields
33892
+ TextField: AttributeField.TextField,
33893
+ NumberField: AttributeField.NumberField,
33894
+ ColorPickerField: AttributeField.ColorPickerField,
33895
+ SelectField: AttributeField.SelectField,
33896
+ SwitchField: AttributeField.SwitchField,
33897
+ SliderField: AttributeField.SliderField,
33898
+ PixelField: AttributeField.PixelField,
33899
+ ImageUploaderField: AttributeField.ImageUploaderField,
33900
+ RichTextField: AttributeField.RichTextField,
33901
+ TextAreaField: AttributeField.TextAreaField,
33902
+ ButtonGroupField: AttributeField.ButtonGroupField,
33903
+ GradientGeneratorField: AttributeField.GradientGeneratorField,
33904
+ MergeTagSelectInputField: AttributeField.MergeTagSelectInputField,
33905
+ EditPanelListField: AttributeField.EditPanelListField,
33906
+ EditPanelTabsField: AttributeField.EditPanelTabsField,
33907
+ SyncChildrenField: AttributeField.SyncChildrenField,
33908
+ FieldItem: AttributeField.FieldItem,
33909
+ // Composite fields
33910
+ Typography: AttributeField.Typography,
33911
+ Padding: AttributeField.Padding,
33912
+ Border: AttributeField.Border,
33913
+ BackgroundColor: AttributeField.BackgroundColor,
33914
+ TextAlign: AttributeField.TextAlign,
33915
+ Height: AttributeField.Height,
33916
+ Width: AttributeField.Width,
33917
+ Link: AttributeField.Link,
33918
+ ButtonContent: AttributeField.ButtonContent,
33919
+ BorderRadius: AttributeField.BorderRadius,
33920
+ BackgroundImage: AttributeField.BackgroundImage,
33921
+ FontFamily: AttributeField.FontFamily,
33922
+ FontSize: AttributeField.FontSize,
33923
+ Heading: AttributeField.Heading,
33924
+ ButtonIcon: AttributeField.ButtonIcon,
33925
+ Buttons: AttributeField.Buttons,
33926
+ ImageUrl: AttributeField.ImageUrl,
33927
+ VerticalAlign: AttributeField.VerticalAlign,
33928
+ Direction: AttributeField.Direction,
33929
+ DisplayOptions: AttributeField.DisplayOptions,
33930
+ Columns: AttributeField.Columns,
33931
+ BackgroundGradient: AttributeField.BackgroundGradient,
33932
+ LetterSpacing: AttributeField.LetterSpacing,
33933
+ LineHeight: AttributeField.LineHeight,
33934
+ FontWeight: AttributeField.FontWeight,
33935
+ TextAndHeadingStyle: AttributeField.TextAndHeadingStyle,
33936
+ GlobalLink: AttributeField.GlobalLink,
33937
+ ButtonCategory: AttributeField.ButtonCategory,
33938
+ BackgroundPosition: AttributeField.BackgroundPosition,
33939
+ StackOnMobile: AttributeField.StackOnMobile,
33940
+ DividerLine: AttributeField.DividerLine,
33941
+ RTLDirection: AttributeField.RTLDirection,
33942
+ TableLayout: AttributeField.TableLayout,
33943
+ Preheader: AttributeField.Preheader,
33944
+ ImageWidth: AttributeField.ImageWidth,
33945
+ TextAndHeadingList: AttributeField.TextAndHeadingList,
33946
+ WebFonts: AttributeField.WebFonts,
33947
+ PixelAndPercentField: AttributeField.PixelAndPercentField
33948
+ };
33949
+ return fieldMap[fieldType] || null;
33950
+ }
33553
33951
  const AttributePanel = () => {
33554
33952
  const { selectedNode } = useSelectedNode();
33555
33953
  const selectedNodePath = useSelectedNodePath();
33556
33954
  const { setSelectedNodePath } = useEditorActions();
33557
33955
  const editor = useSlateStatic();
33558
33956
  const nodePath = useMemo(() => selectedNodePath, [selectedNodePath]);
33957
+ const schema = selectedNode && BlockSchemasMap[selectedNode.type];
33559
33958
  const Com = selectedNode && ConfigPanelsMap[selectedNode.type];
33959
+ const hasSchema = !!schema;
33960
+ const hasComponent = !!Com;
33560
33961
  useEffect(() => {
33561
33962
  if (!nodePath)
33562
33963
  return;
33563
- if (!Com) {
33964
+ if (!hasSchema && !hasComponent) {
33564
33965
  console.log(
33565
33966
  `The current component was not found and has been switched to the previous level.`
33566
33967
  );
@@ -33568,7 +33969,7 @@ const AttributePanel = () => {
33568
33969
  let path2 = Path.parent(nodePath);
33569
33970
  let parent2 = Node.get(editor, path2);
33570
33971
  while (parent2) {
33571
- if (ConfigPanelsMap[parent2.type]) {
33972
+ if (BlockSchemasMap[parent2.type] || ConfigPanelsMap[parent2.type]) {
33572
33973
  setSelectedNodePath(path2);
33573
33974
  return;
33574
33975
  } else {
@@ -33579,14 +33980,31 @@ const AttributePanel = () => {
33579
33980
  } catch (error2) {
33580
33981
  }
33581
33982
  }
33582
- }, [Com, editor, nodePath, setSelectedNodePath]);
33983
+ }, [hasSchema, hasComponent, editor, nodePath, setSelectedNodePath]);
33583
33984
  return useMemo(() => {
33584
33985
  if (!selectedNode || !nodePath)
33585
33986
  return null;
33586
- if (!Com)
33587
- return /* @__PURE__ */ React__default.createElement("div", null, "No match component ", selectedNode.type);
33588
- return /* @__PURE__ */ React__default.createElement(Com, { nodePath, key: selectedNode.type + nodePath.toString() });
33589
- }, [Com, nodePath, selectedNode]);
33987
+ if (hasSchema) {
33988
+ return /* @__PURE__ */ React__default.createElement(
33989
+ SchemaPanelRenderer,
33990
+ {
33991
+ schema,
33992
+ nodePath,
33993
+ key: selectedNode.type + nodePath.toString()
33994
+ }
33995
+ );
33996
+ }
33997
+ if (hasComponent) {
33998
+ return /* @__PURE__ */ React__default.createElement(
33999
+ Com,
34000
+ {
34001
+ nodePath,
34002
+ key: selectedNode.type + nodePath.toString()
34003
+ }
34004
+ );
34005
+ }
34006
+ return /* @__PURE__ */ React__default.createElement("div", null, "No match component ", selectedNode.type);
34007
+ }, [hasSchema, hasComponent, schema, Com, nodePath, selectedNode]);
33590
34008
  };
33591
34009
  const ConfigurationSideBar = ({ height }) => {
33592
34010
  const standaloneElementEditing = useStandaloneElementEditing();
@@ -40822,6 +41240,7 @@ const Minimalist = { useCreateConfig, Layout };
40822
41240
  export {
40823
41241
  AttributeField,
40824
41242
  AttributesPanelWrapper,
41243
+ BlockSchemasMap,
40825
41244
  CollapseWrapper$1 as CollapseWrapper,
40826
41245
  ConfigPanelsMap,
40827
41246
  ControllerProvider,
package/lib/style.css CHANGED
@@ -197,14 +197,14 @@
197
197
  .block-list-grid-item:nth-last-child(2),
198
198
  .block-list-grid-item:nth-last-child(3) {
199
199
  margin-bottom: 0px;
200
- }._item_14paa_1 {
200
+ }._item_7uv5l_1 {
201
201
  display: flex;
202
202
  justify-content: space-between;
203
203
  flex-direction: column;
204
204
  width: 100%;
205
205
  }
206
206
 
207
- ._itemContent_14paa_8 {
207
+ ._itemContent_7uv5l_8 {
208
208
  display: flex;
209
209
  width: 100%;
210
210
  padding: 5px 10px 5px 5px;
@@ -219,27 +219,40 @@
219
219
  color: #222;
220
220
  box-sizing: border-box;
221
221
  }
222
- ._itemContent_14paa_8:hover {
222
+ ._itemContent_7uv5l_8:hover {
223
223
  background-color: #f5f5f5;
224
224
  }
225
- ._itemContent_14paa_8:hover ._itemActions_14paa_26 {
225
+ ._itemContent_7uv5l_8:hover ._itemActions_7uv5l_26 {
226
226
  opacity: 1;
227
227
  }
228
228
 
229
- ._itemLabelWrapper_14paa_30 {
229
+ ._itemHovered_7uv5l_30 ._itemContent_7uv5l_8 {
230
+ background-color: rgba(var(--primary-6), 0.1);
231
+ }
232
+
233
+ ._itemSelected_7uv5l_34 ._itemContent_7uv5l_8 {
234
+ background-color: rgba(var(--primary-6), 0.1);
235
+ border-left: 3px solid var(--primary-6);
236
+ }
237
+
238
+ ._itemSelected_7uv5l_34._itemHovered_7uv5l_30 ._itemContent_7uv5l_8 {
239
+ background-color: #d4e9f0;
240
+ }
241
+
242
+ ._itemLabelWrapper_7uv5l_43 {
230
243
  display: flex;
231
244
  align-items: center;
232
245
  gap: 10px;
233
246
  }
234
247
 
235
- ._itemLabel_14paa_30 {
248
+ ._itemLabel_7uv5l_43 {
236
249
  overflow: hidden;
237
250
  text-overflow: ellipsis;
238
251
  white-space: nowrap;
239
252
  width: 200px;
240
253
  }
241
254
 
242
- ._action_14paa_43 {
255
+ ._action_7uv5l_56 {
243
256
  display: flex;
244
257
  width: 30px;
245
258
  height: 30px;
@@ -248,21 +261,21 @@
248
261
  cursor: pointer;
249
262
  border-radius: 4px;
250
263
  }
251
- ._action_14paa_43 svg {
264
+ ._action_7uv5l_56 svg {
252
265
  width: 16px;
253
266
  height: 16px;
254
267
  }
255
- ._action_14paa_43:hover {
268
+ ._action_7uv5l_56:hover {
256
269
  background-color: rgba(0, 0, 0, 0.05);
257
270
  }
258
271
 
259
- ._itemTitle_14paa_60 {
272
+ ._itemTitle_7uv5l_73 {
260
273
  display: flex;
261
274
  align-items: center;
262
275
  width: 100%;
263
276
  }
264
277
 
265
- ._itemCollapse_14paa_66 {
278
+ ._itemCollapse_7uv5l_79 {
266
279
  display: flex;
267
280
  width: 30px;
268
281
  height: 30px;
@@ -271,11 +284,11 @@
271
284
  cursor: pointer;
272
285
  border-radius: 4px;
273
286
  }
274
- ._itemCollapse_14paa_66:hover {
287
+ ._itemCollapse_7uv5l_79:hover {
275
288
  background-color: rgba(0, 0, 0, 0.05);
276
289
  }
277
290
 
278
- ._itemActions_14paa_26 {
291
+ ._itemActions_7uv5l_26 {
279
292
  display: flex;
280
293
  align-items: center;
281
294
  opacity: 0;
@@ -283,7 +296,7 @@
283
296
  right: 10px;
284
297
  }
285
298
 
286
- ._itemChildren_14paa_87 {
299
+ ._itemChildren_7uv5l_100 {
287
300
  display: flex;
288
301
  flex-direction: column;
289
302
  padding-left: 20px;
@@ -0,0 +1,2 @@
1
+ import { BlockSchema } from "../../../typings";
2
+ export declare const BlockquoteSchema: BlockSchema;
@@ -0,0 +1,2 @@
1
+ import { BlockSchema } from "../../../typings";
2
+ export declare const ButtonSchema: BlockSchema;
@@ -0,0 +1,2 @@
1
+ import { BlockSchema } from "../../../typings";
2
+ export declare const ColumnSchema: BlockSchema;
@@ -0,0 +1,2 @@
1
+ import { BlockSchema } from "../../../typings";
2
+ export declare const DividerSchema: BlockSchema;
@@ -0,0 +1,2 @@
1
+ import { BlockSchema } from "../../../typings";
2
+ export declare const GroupSchema: BlockSchema;
@@ -0,0 +1,2 @@
1
+ import { BlockSchema } from "../../../typings";
2
+ export declare const HeroSchema: BlockSchema;
@@ -0,0 +1,2 @@
1
+ import { BlockSchema } from "../../../typings";
2
+ export declare const ImageSchema: BlockSchema;
@@ -0,0 +1,2 @@
1
+ import { BlockSchema } from "../../../typings";
2
+ export declare const NavbarSchema: BlockSchema;
@@ -0,0 +1,2 @@
1
+ import { BlockSchema } from "../../../typings";
2
+ export declare const PageSchema: BlockSchema;
@@ -0,0 +1,2 @@
1
+ import { BlockSchema } from "../../../typings";
2
+ export declare const SectionSchema: BlockSchema;
@@ -0,0 +1,2 @@
1
+ import { BlockSchema } from "../../../typings";
2
+ export declare const SocialSchema: BlockSchema;
@@ -0,0 +1,2 @@
1
+ import { BlockSchema } from "../../../typings";
2
+ export declare const SpacerSchema: BlockSchema;
@@ -0,0 +1,2 @@
1
+ import { BlockSchema } from "../../../typings";
2
+ export declare const TableSchema: BlockSchema;
@@ -0,0 +1,2 @@
1
+ import { BlockSchema } from "../../../typings";
2
+ export declare const Table2Schema: BlockSchema;
@@ -0,0 +1,2 @@
1
+ import { BlockSchema } from "../../../typings";
2
+ export declare const TextSchema: BlockSchema;
@@ -0,0 +1,2 @@
1
+ import { BlockSchema } from "../../../typings";
2
+ export declare const WrapperSchema: BlockSchema;
@@ -0,0 +1,7 @@
1
+ import { BlockSchema } from "../../../typings";
2
+ /**
3
+ * BlockSchemasMap stores schema definitions for each block
4
+ * If a block has a schema definition, it will be used to render the configuration panel
5
+ * If no schema exists, it will fallback to ConfigPanelsMap
6
+ */
7
+ export declare const BlockSchemasMap: Record<string, BlockSchema>;
@@ -0,0 +1,9 @@
1
+ import React from "react";
2
+ import { Path } from "slate";
3
+ import { BlockSchema } from "../../../typings";
4
+ interface SchemaPanelRendererProps {
5
+ schema: BlockSchema;
6
+ nodePath: Path;
7
+ }
8
+ export declare const SchemaPanelRenderer: React.FC<SchemaPanelRendererProps>;
9
+ export {};
@@ -149,6 +149,7 @@ export { CollapseWrapper } from "./ConfigurationPanel/components/CollapseWrapper
149
149
  export { AttributesPanelWrapper } from "./ConfigurationPanel/components/AttributesPanelWrapper";
150
150
  export { AttributeField } from "./ConfigurationPanel/components/AttributeField";
151
151
  export { ConfigPanelsMap } from "./ConfigurationPanel/Elements";
152
+ export { BlockSchemasMap } from "./ConfigurationPanel/Schemas";
152
153
  export { WidgetTypeOptions };
153
154
  export { ElementStyles } from "./ElementStyleGallery";
154
155
  export { ResponsiveField, ResponsiveTabs, } from "./ConfigurationPanel/components/ResponsiveTabs";
@@ -156,6 +156,7 @@ export interface PluginsCustomEditorTypes {
156
156
  enabledPreviewEmailSubjectEdit?: boolean;
157
157
  enabledGradientImage?: boolean;
158
158
  enabledButtonIcon?: boolean;
159
+ layerDefaultCollapsed?: boolean;
159
160
  hideSectionBackgroundImage?: boolean;
160
161
  layerConfig?: {
161
162
  scrollWhenSelect?: boolean;
@@ -1 +1,2 @@
1
1
  export * from "./custom-types";
2
+ export * from "./schema";
@@ -0,0 +1,46 @@
1
+ import { Element } from "easy-email-pro-core";
2
+ import { ActiveTabKeys } from "easy-email-pro-editor";
3
+ import React from "react";
4
+ export type BasicFieldType = "TextField" | "NumberField" | "ColorPickerField" | "SelectField" | "SwitchField" | "SliderField" | "PixelField" | "ImageUploaderField" | "RichTextField" | "TextAreaField" | "ButtonGroupField" | "GradientGeneratorField" | "MergeTagSelectInputField" | "EditPanelListField" | "EditPanelTabsField" | "PixelAndPercentField" | "SyncChildrenField" | "FieldItem";
5
+ export type CompositeFieldType = "Typography" | "Padding" | "Border" | "BackgroundColor" | "TextAlign" | "Height" | "Width" | "Link" | "ButtonContent" | "BorderRadius" | "BackgroundImage" | "FontFamily" | "FontSize" | "Heading" | "ButtonIcon" | "Buttons" | "ImageUrl" | "VerticalAlign" | "Direction" | "DisplayOptions" | "Columns" | "BackgroundGradient" | "LetterSpacing" | "LineHeight" | "FontWeight" | "TextAndHeadingStyle" | "GlobalLink" | "ButtonCategory" | "BackgroundPosition" | "StackOnMobile" | "DividerLine" | "RTLDirection" | "TableLayout" | "Preheader" | "ImageWidth" | "TextAndHeadingList" | "WebFonts" | "PixelAndPercentField" | "SyncChildrenField" | "FieldItem";
6
+ export interface BasicFieldSchema {
7
+ type: BasicFieldType;
8
+ name: string;
9
+ label?: string;
10
+ path?: string;
11
+ responsive?: boolean;
12
+ options?: Array<{
13
+ label: string;
14
+ value: any;
15
+ }>;
16
+ formItem?: any;
17
+ [key: string]: any;
18
+ }
19
+ export interface CompositeFieldSchema {
20
+ type: CompositeFieldType;
21
+ name?: string;
22
+ label?: string;
23
+ path?: string;
24
+ responsive?: boolean;
25
+ fieldName?: string;
26
+ mode?: ActiveTabKeys | "desktop" | "mobile";
27
+ elementType?: Element["type"];
28
+ hidePadding?: boolean;
29
+ [key: string]: any;
30
+ }
31
+ export interface CollapseGroupSchema {
32
+ type: "CollapseGroup";
33
+ name: string;
34
+ header: string;
35
+ defaultActive?: boolean;
36
+ extra?: React.ReactNode;
37
+ children: SchemaField[];
38
+ }
39
+ export interface ResponsiveTabsSchema {
40
+ type: "ResponsiveTabs";
41
+ responsive: true;
42
+ desktop: SchemaField[];
43
+ mobile?: SchemaField[];
44
+ }
45
+ export type SchemaField = BasicFieldSchema | CompositeFieldSchema | CollapseGroupSchema;
46
+ export type BlockSchema = SchemaField[] | ResponsiveTabsSchema;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "easy-email-pro-theme",
3
- "version": "1.52.0",
3
+ "version": "1.53.0",
4
4
  "description": "",
5
5
  "files": [
6
6
  "lib"