easy-email-extensions 3.1.33 → 3.1.38

Sign up to get free protection for your applications and to get access to all the features.
package/lib/index2.js CHANGED
@@ -56,11 +56,11 @@ var __async = (__this, __arguments, generator) => {
56
56
  import * as React from "react";
57
57
  import React__default, { Children, isValidElement, cloneElement, createContext, useContext, Component, useMemo, memo, forwardRef, useEffect, useRef, useLayoutEffect, useState, createRef, useImperativeHandle, PureComponent, useCallback, useReducer, Fragment, createElement, Suspense } from "react";
58
58
  import { IconFont, useEditorProps, Stack as Stack$6, getBlockNodeByIdx, useBlock, getEditNode, getEditContent, TextStyle, useFocusIdx, useEditorContext, getShadowRoot, FIXED_CONTAINER_ID, useFocusBlockLayout, scrollBlockEleIntoView, useHoverIdx, useDataTransfer, useRefState, getBlockNodeByChildEle, getDirectionPosition, DATA_ATTRIBUTE_DROP_CONTAINER, BlockAvatarWrapper, getEditorRoot, useActiveTab, ActiveTabKeys } from "easy-email-editor";
59
- import { BasicType, ImageManager, BlockManager, getParentIdx, createBlockDataByType, getParentByIdx, getValueByIdx, getIndexByIdx, getSiblingIdx, getNodeIdxFromClassName, getNodeIdxClassName, getPageIdx, getChildIdx, MjmlToJson, JsonToMjml, getNodeTypeFromClassName } from "easy-email-core";
59
+ import { BasicType, ImageManager, BlockManager, createBlockDataByType, getParentByIdx, getParentIdx, getValueByIdx, getIndexByIdx, getSiblingIdx, getNodeIdxFromClassName, getNodeIdxClassName, getPageIdx, getChildIdx, MjmlToJson, JsonToMjml, getNodeTypeFromClassName } from "easy-email-core";
60
60
  import ReactDOM, { findDOMNode, createPortal } from "react-dom";
61
61
  import { useField, Field, useForm as useForm$1, Form as Form$3, version as version$2, useFormState } from "react-final-form";
62
62
  var index$2 = "";
63
- const title = "_title_15yi1_1";
63
+ const title = "_title_15b2l_1";
64
64
  var styles$6 = {
65
65
  title
66
66
  };
@@ -30737,6 +30737,13 @@ function BlockTree(props) {
30737
30737
  const dragNode = useRef(null);
30738
30738
  const { treeData, allowDrop, onContextMenu, selectedKeys } = props;
30739
30739
  const treeDataRef = useRef(treeData);
30740
+ const {
30741
+ onDragStart: propsDragStart,
30742
+ onDrop: propsDrop,
30743
+ renderTitle: propsRenderTitle,
30744
+ onDragEnd: propsDragEnd,
30745
+ onSelect: propsSelect
30746
+ } = props;
30740
30747
  const [expandedKeys, setExpandedKeys] = useState([]);
30741
30748
  const onExpand = useCallback((keys2) => {
30742
30749
  setExpandedKeys(keys2);
@@ -30757,7 +30764,6 @@ function BlockTree(props) {
30757
30764
  setExpandedKeys((keys2) => props.expandedKeys ? [...keys2, ...props.expandedKeys] : keys2);
30758
30765
  }, [props.expandedKeys]);
30759
30766
  const onDragStart = useCallback((e, node) => {
30760
- var _a;
30761
30767
  e.dataTransfer.dropEffect = "none";
30762
30768
  const dragNodeData = node.props.dataRef;
30763
30769
  dragNode.current = {
@@ -30766,8 +30772,8 @@ function BlockTree(props) {
30766
30772
  key: node.props._key,
30767
30773
  parentKey: node.props.parentKey
30768
30774
  };
30769
- (_a = props.onDragStart) == null ? void 0 : _a.call(props);
30770
- }, [props.onDragStart]);
30775
+ propsDragStart == null ? void 0 : propsDragStart();
30776
+ }, [propsDragStart]);
30771
30777
  const onDragMove = useCallback((option) => {
30772
30778
  if (!dragNode.current)
30773
30779
  return false;
@@ -30787,7 +30793,7 @@ function BlockTree(props) {
30787
30793
  return true;
30788
30794
  }
30789
30795
  return false;
30790
- }, [dragNode]);
30796
+ }, [allowDrop]);
30791
30797
  const onDrop = useCallback((info2) => {
30792
30798
  const { dropNode, dropPosition, e } = info2;
30793
30799
  e.dataTransfer.dropEffect = "move";
@@ -30804,22 +30810,21 @@ function BlockTree(props) {
30804
30810
  },
30805
30811
  dropPosition
30806
30812
  };
30807
- props.onDrop(currentDropData);
30808
- }, []);
30813
+ propsDrop(currentDropData);
30814
+ }, [propsDrop]);
30809
30815
  const renderTitle = useCallback((nodeData) => {
30810
30816
  return /* @__PURE__ */ React__default.createElement("div", {
30811
30817
  style: { display: "inline-flex", width: "100%" },
30812
30818
  onContextMenu: (ev) => onContextMenu && onContextMenu(nodeData, ev)
30813
- }, props.renderTitle(nodeData));
30814
- }, [onContextMenu]);
30819
+ }, propsRenderTitle(nodeData));
30820
+ }, [onContextMenu, propsRenderTitle]);
30815
30821
  const onDragEnd = useCallback(() => {
30816
- var _a;
30817
30822
  dragNode.current = null;
30818
- (_a = props.onDragEnd) == null ? void 0 : _a.call(props);
30819
- }, [props.onDragEnd]);
30823
+ propsDragEnd == null ? void 0 : propsDragEnd();
30824
+ }, [propsDragEnd]);
30820
30825
  const onSelect = useCallback((selectedKeys2) => {
30821
- props.onSelect(selectedKeys2[0]);
30822
- }, [props.onSelect]);
30826
+ propsSelect(selectedKeys2[0]);
30827
+ }, [propsSelect]);
30823
30828
  useEffect(() => {
30824
30829
  if (blockTreeRef) {
30825
30830
  blockTreeRef.addEventListener("dragover", (e) => {
@@ -31272,10 +31277,10 @@ function previewLoadImage(url) {
31272
31277
  });
31273
31278
  }
31274
31279
  const defaultImagesMap$1 = {
31275
- IMAGE_59: "https://assets.maocanhua.cn/06ca521d-9728-4de6-a709-1b75a828bfc3-2a9b1224-3d71-43b8-b52f-e7cdcdc9107b.png",
31276
- AttributePanel_01: "https://assets.maocanhua.cn/e22f78f2-aa76-408d-ba94-c95c7abe1908-image.png",
31277
- AttributePanel_02: "https://assets.maocanhua.cn/3e952a6e-2506-470e-b395-3e0d995157c5.png",
31278
- AttributePanel_03: "https://assets.maocanhua.cn/Fi_vI4vyLhTM-Tp6ivq4dR_ieGHk"
31280
+ IMAGE_59: "https://easy-email-m-ryan.vercel.app/images/06ca521d-9728-4de6-a709-1b75a828bfc3-2a9b1224-3d71-43b8-b52f-e7cdcdc9107b.png",
31281
+ AttributePanel_01: "https://easy-email-m-ryan.vercel.app/images/e22f78f2-aa76-408d-ba94-c95c7abe1908-image.png",
31282
+ AttributePanel_02: "https://easy-email-m-ryan.vercel.app/images/3e952a6e-2506-470e-b395-3e0d995157c5.png",
31283
+ AttributePanel_03: "https://easy-email-m-ryan.vercel.app/images/Fi_vI4vyLhTM-Tp6ivq4dR_ieGHk"
31279
31284
  };
31280
31285
  ImageManager.add(defaultImagesMap$1);
31281
31286
  function getImg$1(name) {
@@ -38458,9 +38463,7 @@ function enhancer(Component2, changeAdapter) {
38458
38463
  const [currentValue, setCurrentValue] = useState(value);
38459
38464
  const debounceCallbackChange = useCallback(lodash.exports.debounce((val) => {
38460
38465
  onChange(val);
38461
- }, 100, {
38462
- maxWait: 500
38463
- }), [onChange]);
38466
+ }, 500, {}), [onChange]);
38464
38467
  useEffect(() => {
38465
38468
  setCurrentValue(value);
38466
38469
  }, [value]);
@@ -38477,7 +38480,7 @@ function enhancer(Component2, changeAdapter) {
38477
38480
  setCurrentValue(newVal);
38478
38481
  debounceCallbackChange(newVal);
38479
38482
  onBlur3();
38480
- }, [onBlur3, onChangeAdapter, debounceCallbackChange]);
38483
+ }, [onBlur3]);
38481
38484
  if (!wrapper2)
38482
38485
  return /* @__PURE__ */ React__default.createElement(Component2, __spreadProps(__spreadValues({}, rest), {
38483
38486
  id,
@@ -38549,10 +38552,15 @@ function enhancer(Component2, changeAdapter) {
38549
38552
  };
38550
38553
  }
38551
38554
  function Input(props) {
38552
- const { quickchange, value = "", onKeyDown: onPropsKeyDown } = props;
38555
+ const {
38556
+ quickchange,
38557
+ value = "",
38558
+ onKeyDown: onPropsKeyDown,
38559
+ onChange: propsOnChange
38560
+ } = props;
38553
38561
  const onChange = useCallback((val) => {
38554
- props.onChange(val);
38555
- }, [props.onChange]);
38562
+ propsOnChange(val);
38563
+ }, [propsOnChange]);
38556
38564
  const onKeyDown = useCallback((ev) => {
38557
38565
  if (onPropsKeyDown) {
38558
38566
  onPropsKeyDown == null ? void 0 : onPropsKeyDown(ev);
@@ -38632,9 +38640,6 @@ function InputWithUnit(props) {
38632
38640
  unit: arr[3] || unitOptions[0].value
38633
38641
  };
38634
38642
  }, [value, unitOptions]);
38635
- useCallback((val) => {
38636
- props.onChange(val);
38637
- }, [props.onChange]);
38638
38643
  return /* @__PURE__ */ React__default.createElement(Input, __spreadProps(__spreadValues({
38639
38644
  value
38640
38645
  }, restProps), {
@@ -39150,105 +39155,10 @@ function AddFont() {
39150
39155
  }
39151
39156
  });
39152
39157
  }
39153
- function getContextMergeTags(mergeTags2, context, idx) {
39154
- const loop2 = (currentIdx, combineMergeTags) => {
39155
- var _a, _b;
39156
- const parentBlockData = lodash.exports.get(context, currentIdx);
39157
- if (!parentBlockData)
39158
- return combineMergeTags;
39159
- const parentBlock = BlockManager.getBlockByType(parentBlockData.type);
39160
- if (parentBlock && parentBlock.render) {
39161
- const dataSource = (_b = (_a = parentBlockData.data) == null ? void 0 : _a.value) == null ? void 0 : _b.dataSource;
39162
- if (!dataSource)
39163
- return combineMergeTags;
39164
- Object.keys(dataSource).forEach((key) => {
39165
- let formatKey = dataSource[key];
39166
- const loopFormatKey = (currentLoopKeyIdx) => {
39167
- const currentParentIdx = getParentIdx(currentLoopKeyIdx);
39168
- if (currentParentIdx) {
39169
- const currentBlockData = lodash.exports.get(context, currentParentIdx);
39170
- if (!currentBlockData)
39171
- return formatKey;
39172
- currentBlockData.data.value.dataSource && Object.keys(currentBlockData.data.value.dataSource).forEach((item2) => {
39173
- formatKey = formatKey.replace(item2, currentBlockData.data.value.dataSource[item2].replace(/{{([^}}]+)}}/g, "$1"));
39174
- });
39175
- loopFormatKey(currentParentIdx);
39176
- }
39177
- };
39178
- loopFormatKey(currentIdx);
39179
- const dataSourcePath = formatKey.replace(/{{([^}}]+)}}/g, "$1");
39180
- combineMergeTags = __spreadValues({
39181
- [key]: lodash.exports.get(combineMergeTags, dataSourcePath)
39182
- }, combineMergeTags);
39183
- });
39184
- }
39185
- const parentIdx = getParentIdx(currentIdx);
39186
- if (!parentIdx)
39187
- return combineMergeTags;
39188
- return loop2(parentIdx, combineMergeTags);
39189
- };
39190
- return loop2(idx, lodash.exports.cloneDeep(mergeTags2));
39191
- }
39192
- const MergeTags = React__default.memo((props) => {
39193
- const { focusIdx: focusIdx2 } = useFocusIdx();
39194
- const {
39195
- mergeTags: mergeTags2 = {},
39196
- mergeTagGenerate = (m) => `{{${m}}}`,
39197
- renderMergeTagContent
39198
- } = useEditorProps();
39199
- const { values: values2 } = useBlock();
39200
- const contextMergeTags = useMemo(() => getContextMergeTags(mergeTags2, values2, focusIdx2), [mergeTags2, values2, focusIdx2]);
39201
- const treeOptions = useMemo(() => {
39202
- const treeData = [];
39203
- const deep = (key, title2, parent2, mapData = []) => {
39204
- const currentMapData = {
39205
- key: mergeTagGenerate(key),
39206
- value: mergeTagGenerate(key),
39207
- title: title2,
39208
- disabled: lodash.exports.isObject(parent2[key]) || !parent2[title2],
39209
- children: []
39210
- };
39211
- mapData.push(currentMapData);
39212
- const current = parent2[title2];
39213
- if (current && typeof current === "object") {
39214
- Object.keys(current).map((childKey) => deep(key + "." + childKey, childKey, current, currentMapData.children));
39215
- }
39216
- };
39217
- Object.keys(contextMergeTags).map((key) => deep(key, key, contextMergeTags, treeData));
39218
- return treeData;
39219
- }, [contextMergeTags]);
39220
- const onSelect = useCallback((value) => {
39221
- return props.onChange(value);
39222
- }, [props]);
39223
- const mergeTagContent = useMemo(() => renderMergeTagContent ? renderMergeTagContent({
39224
- onChange: props.onChange,
39225
- isSelect: Boolean(props.isSelect),
39226
- value: props.value
39227
- }) : /* @__PURE__ */ React__default.createElement(React__default.Fragment, null), [renderMergeTagContent, props.onChange, props.isSelect, props.value]);
39228
- if (renderMergeTagContent) {
39229
- return /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, mergeTagContent);
39230
- }
39231
- return /* @__PURE__ */ React__default.createElement("div", {
39232
- style: { color: "#333" }
39233
- }, props.isSelect ? /* @__PURE__ */ React__default.createElement(TreeSelect$1, {
39234
- value: props.value,
39235
- size: "small",
39236
- dropdownMenuStyle: { maxHeight: 400, overflow: "auto" },
39237
- placeholder: "Please select",
39238
- treeData: treeOptions,
39239
- onChange: (val) => onSelect(val)
39240
- }) : /* @__PURE__ */ React__default.createElement(Tree$1, {
39241
- defaultExpandedKeys: [],
39242
- selectedKeys: [],
39243
- treeData: treeOptions,
39244
- onSelect: (vals) => onSelect(vals[0])
39245
- }));
39246
- });
39247
39158
  const AttributesPanelWrapper = (props) => {
39248
39159
  const { focusBlock: focusBlock2, setFocusBlock } = useBlock();
39249
- const { mergeTags: mergeTags2 } = useEditorProps();
39250
39160
  const block2 = focusBlock2 && BlockManager.getBlockByType(focusBlock2.type);
39251
- const onChangeHidden = useCallback((val) => {
39161
+ useCallback((val) => {
39252
39162
  if (!focusBlock2)
39253
39163
  return;
39254
39164
  focusBlock2.data.hidden = val;
@@ -39276,13 +39186,7 @@ const AttributesPanelWrapper = (props) => {
39276
39186
  }, /* @__PURE__ */ React__default.createElement(EyeIcon, null), /* @__PURE__ */ React__default.createElement(TextStyle, {
39277
39187
  variation: "strong",
39278
39188
  size: "large"
39279
- }, `${block2.name} attributes`)), /* @__PURE__ */ React__default.createElement(Stack$6.Item, null, props.extra))), Boolean(focusBlock2.data.hidden) && mergeTags2 && /* @__PURE__ */ React__default.createElement(Stack$6, {
39280
- spacing: "extraTight"
39281
- }, /* @__PURE__ */ React__default.createElement(TextStyle, null, "Hide if"), /* @__PURE__ */ React__default.createElement(MergeTags, {
39282
- isSelect: true,
39283
- onChange: onChangeHidden,
39284
- value: String(focusBlock2.data.hidden)
39285
- })))), /* @__PURE__ */ React__default.createElement("div", {
39189
+ }, `${block2.name} attributes`)), /* @__PURE__ */ React__default.createElement(Stack$6.Item, null, props.extra))))), /* @__PURE__ */ React__default.createElement("div", {
39286
39190
  style: __spreadValues({ padding: "0px" }, props.style)
39287
39191
  }, props.children));
39288
39192
  };
@@ -39355,12 +39259,6 @@ function Page() {
39355
39259
  helpText: "Allows you to control on which breakpoint the layout should go desktop/mobile.",
39356
39260
  name: `${focusIdx2}.data.value.breakpoint`,
39357
39261
  inline: true
39358
- }), /* @__PURE__ */ React__default.createElement(SwitchField, {
39359
- inline: true,
39360
- label: "Responsive",
39361
- name: `${focusIdx2}.data.value.responsive`,
39362
- checkedText: "True",
39363
- uncheckedText: "False"
39364
39262
  }))), /* @__PURE__ */ React__default.createElement(Collapse$1.Item, {
39365
39263
  name: "1",
39366
39264
  header: "Theme Setting"
@@ -39408,22 +39306,20 @@ function Padding(props = {}) {
39408
39306
  const defaultConfig = useMemo(() => type ? createBlockDataByType(type) : void 0, [type]);
39409
39307
  const paddingValue = focusBlock2 == null ? void 0 : focusBlock2.attributes[attributeName];
39410
39308
  const defaultPaddingValue = defaultConfig == null ? void 0 : defaultConfig.attributes[attributeName];
39411
- const paddingList = paddingValue == null ? void 0 : paddingValue.split(" ");
39412
- const defaultPaddingList = defaultPaddingValue == null ? void 0 : defaultPaddingValue.split(" ");
39413
39309
  const paddingFormValues = useMemo(() => {
39414
- const paddingList2 = paddingValue == null ? void 0 : paddingValue.split(" ");
39415
- const defaultPaddingList2 = defaultPaddingValue == null ? void 0 : defaultPaddingValue.split(" ");
39416
- const top = paddingList2 ? paddingList2[0] : (defaultPaddingList2 == null ? void 0 : defaultPaddingList2[0]) || "";
39417
- const right = paddingList2 ? paddingList2[1] : (defaultPaddingList2 == null ? void 0 : defaultPaddingList2[1]) || "";
39418
- const bottom = paddingList2 ? paddingList2[2] : (defaultPaddingList2 == null ? void 0 : defaultPaddingList2[2]) || "";
39419
- const left = paddingList2 ? paddingList2[3] : (defaultPaddingList2 == null ? void 0 : defaultPaddingList2[3]) || "";
39310
+ const paddingList = paddingValue == null ? void 0 : paddingValue.split(" ");
39311
+ const defaultPaddingList = defaultPaddingValue == null ? void 0 : defaultPaddingValue.split(" ");
39312
+ const top = paddingList ? paddingList[0] : (defaultPaddingList == null ? void 0 : defaultPaddingList[0]) || "";
39313
+ const right = paddingList ? paddingList[1] : (defaultPaddingList == null ? void 0 : defaultPaddingList[1]) || "";
39314
+ const bottom = paddingList ? paddingList[2] : (defaultPaddingList == null ? void 0 : defaultPaddingList[2]) || "";
39315
+ const left = paddingList ? paddingList[3] : (defaultPaddingList == null ? void 0 : defaultPaddingList[3]) || "";
39420
39316
  return {
39421
39317
  top,
39422
39318
  left,
39423
39319
  bottom,
39424
39320
  right
39425
39321
  };
39426
- }, [paddingList, defaultPaddingList, defaultPaddingValue, paddingValue]);
39322
+ }, [defaultPaddingValue, paddingValue]);
39427
39323
  const onChancePadding = useCallback((val) => {
39428
39324
  change(focusIdx2 + `.attributes[${attributeName}]`, val);
39429
39325
  }, [focusIdx2, attributeName, change]);
@@ -39470,9 +39366,10 @@ const PaddingChangeWrapper = (props) => {
39470
39366
  const {
39471
39367
  values: { top, right, bottom, left }
39472
39368
  } = useFormState();
39369
+ const { onChange } = props;
39473
39370
  useEffect(() => {
39474
- props.onChange([top, right, bottom, left].join(" "));
39475
- }, [top, right, bottom, left]);
39371
+ onChange([top, right, bottom, left].join(" "));
39372
+ }, [top, right, bottom, left, onChange]);
39476
39373
  return /* @__PURE__ */ React__default.createElement(React__default.Fragment, null);
39477
39374
  };
39478
39375
  function BackgroundColor({
@@ -40297,6 +40194,117 @@ function BorderColor() {
40297
40194
  });
40298
40195
  }, [focusIdx2]);
40299
40196
  }
40197
+ function getContextMergeTags(mergeTags2, context, idx) {
40198
+ const loop2 = (currentIdx, combineMergeTags) => {
40199
+ var _a, _b;
40200
+ const parentBlockData = lodash.exports.get(context, currentIdx);
40201
+ if (!parentBlockData)
40202
+ return combineMergeTags;
40203
+ const parentBlock = BlockManager.getBlockByType(parentBlockData.type);
40204
+ if (parentBlock && parentBlock.render) {
40205
+ const dataSource = (_b = (_a = parentBlockData.data) == null ? void 0 : _a.value) == null ? void 0 : _b.dataSource;
40206
+ if (!dataSource)
40207
+ return combineMergeTags;
40208
+ Object.keys(dataSource).forEach((key) => {
40209
+ let formatKey = dataSource[key];
40210
+ const loopFormatKey = (currentLoopKeyIdx) => {
40211
+ const currentParentIdx = getParentIdx(currentLoopKeyIdx);
40212
+ if (currentParentIdx) {
40213
+ const currentBlockData = lodash.exports.get(context, currentParentIdx);
40214
+ if (!currentBlockData)
40215
+ return formatKey;
40216
+ currentBlockData.data.value.dataSource && Object.keys(currentBlockData.data.value.dataSource).forEach((item2) => {
40217
+ formatKey = formatKey.replace(item2, currentBlockData.data.value.dataSource[item2].replace(/{{([^}}]+)}}/g, "$1"));
40218
+ });
40219
+ loopFormatKey(currentParentIdx);
40220
+ }
40221
+ };
40222
+ loopFormatKey(currentIdx);
40223
+ const dataSourcePath = formatKey.replace(/{{([^}}]+)}}/g, "$1");
40224
+ combineMergeTags = __spreadValues({
40225
+ [key]: lodash.exports.get(combineMergeTags, dataSourcePath)
40226
+ }, combineMergeTags);
40227
+ });
40228
+ }
40229
+ const parentIdx = getParentIdx(currentIdx);
40230
+ if (!parentIdx)
40231
+ return combineMergeTags;
40232
+ return loop2(parentIdx, combineMergeTags);
40233
+ };
40234
+ return loop2(idx, lodash.exports.cloneDeep(mergeTags2));
40235
+ }
40236
+ const MergeTags = React__default.memo((props) => {
40237
+ const [expandedKeys, setExpandedKeys] = useState([]);
40238
+ const { focusIdx: focusIdx2 } = useFocusIdx();
40239
+ const {
40240
+ mergeTags: mergeTags2 = {},
40241
+ mergeTagGenerate = (m) => `{{${m}}}`,
40242
+ renderMergeTagContent
40243
+ } = useEditorProps();
40244
+ const { values: values2 } = useBlock();
40245
+ const contextMergeTags = useMemo(() => getContextMergeTags(mergeTags2, values2, focusIdx2), [mergeTags2, values2, focusIdx2]);
40246
+ const treeOptions = useMemo(() => {
40247
+ const treeData = [];
40248
+ const deep = (key, title2, parent2, mapData = []) => {
40249
+ const currentMapData = {
40250
+ key,
40251
+ value: key,
40252
+ title: title2,
40253
+ children: []
40254
+ };
40255
+ mapData.push(currentMapData);
40256
+ const current = parent2[title2];
40257
+ if (current && typeof current === "object") {
40258
+ Object.keys(current).map((childKey) => deep(key + "." + childKey, childKey, current, currentMapData.children));
40259
+ }
40260
+ };
40261
+ Object.keys(contextMergeTags).map((key) => deep(key, key, contextMergeTags, treeData));
40262
+ return treeData;
40263
+ }, [contextMergeTags]);
40264
+ const onSelect = useCallback((key) => {
40265
+ const value = lodash.exports.get(contextMergeTags, key);
40266
+ if (lodash.exports.isObject(value)) {
40267
+ setExpandedKeys((keys2) => {
40268
+ console.log("keys", keys2, key);
40269
+ if (keys2.includes(key)) {
40270
+ return keys2.filter((k) => k !== key);
40271
+ } else {
40272
+ return [...keys2, key];
40273
+ }
40274
+ });
40275
+ return;
40276
+ }
40277
+ return props.onChange(mergeTagGenerate(value));
40278
+ }, [contextMergeTags, props, mergeTagGenerate]);
40279
+ const mergeTagContent = useMemo(() => renderMergeTagContent ? renderMergeTagContent({
40280
+ onChange: props.onChange,
40281
+ isSelect: Boolean(props.isSelect),
40282
+ value: props.value
40283
+ }) : /* @__PURE__ */ React__default.createElement(React__default.Fragment, null), [renderMergeTagContent, props.onChange, props.isSelect, props.value]);
40284
+ if (renderMergeTagContent) {
40285
+ return /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, mergeTagContent);
40286
+ }
40287
+ return /* @__PURE__ */ React__default.createElement("div", {
40288
+ style: { color: "#333" }
40289
+ }, props.isSelect ? /* @__PURE__ */ React__default.createElement(TreeSelect$1, {
40290
+ value: props.value,
40291
+ size: "small",
40292
+ dropdownMenuStyle: { maxHeight: 400, overflow: "auto" },
40293
+ placeholder: "Please select",
40294
+ treeData: treeOptions,
40295
+ onChange: (val) => onSelect(val)
40296
+ }) : /* @__PURE__ */ React__default.createElement(Tree$1, {
40297
+ expandedKeys,
40298
+ onExpand: setExpandedKeys,
40299
+ selectedKeys: [],
40300
+ treeData: treeOptions,
40301
+ onSelect: (vals) => onSelect(vals[0]),
40302
+ style: {
40303
+ maxHeight: 400,
40304
+ overflow: "auto"
40305
+ }
40306
+ }));
40307
+ });
40300
40308
  const borderStyleOptions = [
40301
40309
  {
40302
40310
  value: "dashed",
@@ -41316,7 +41324,9 @@ function AttributePanel() {
41316
41324
  const shadowRoot = getShadowRoot();
41317
41325
  if (!value || !initialized)
41318
41326
  return null;
41319
- return /* @__PURE__ */ React__default.createElement(PresetColorsProvider, null, Com ? /* @__PURE__ */ React__default.createElement(Com, null) : /* @__PURE__ */ React__default.createElement("div", {
41327
+ return /* @__PURE__ */ React__default.createElement(PresetColorsProvider, null, Com ? /* @__PURE__ */ React__default.createElement(Com, {
41328
+ key: focusIdx2
41329
+ }) : /* @__PURE__ */ React__default.createElement("div", {
41320
41330
  style: { marginTop: 200, padding: "0 50px" }
41321
41331
  }, /* @__PURE__ */ React__default.createElement(TextStyle, {
41322
41332
  size: "extraLarge"
@@ -41710,6 +41720,7 @@ function ContextMenu({
41710
41720
  const { blockData, left, top } = contextMenuData;
41711
41721
  const idx = blockData.id;
41712
41722
  const { modal, modalVisible, setModalVisible } = useAddToCollection();
41723
+ const props = useEditorProps();
41713
41724
  const ref = useRef(null);
41714
41725
  const handleMoveUp = () => {
41715
41726
  moveBlock(idx, getSiblingIdx(idx, -1));
@@ -41768,7 +41779,7 @@ function ContextMenu({
41768
41779
  }, /* @__PURE__ */ React__default.createElement(IconFont, {
41769
41780
  iconName: "icon-copy",
41770
41781
  style: { marginRight: 10 }
41771
- }), " ", /* @__PURE__ */ React__default.createElement(TextStyle, null, "Copy")), /* @__PURE__ */ React__default.createElement("div", {
41782
+ }), " ", /* @__PURE__ */ React__default.createElement(TextStyle, null, "Copy")), props.onAddCollection && /* @__PURE__ */ React__default.createElement("div", {
41772
41783
  className: styles$5.listItem,
41773
41784
  onClick: handleAddToCollection
41774
41785
  }, /* @__PURE__ */ React__default.createElement(IconFont, {
@@ -41845,7 +41856,7 @@ function useAvatarWrapperDrop() {
41845
41856
  setDirection("");
41846
41857
  setHoverIdx("");
41847
41858
  return false;
41848
- }, [setDirection, setHoverIdx, removeHightLightClassName]);
41859
+ }, [setDirection, setHoverIdx, valuesRef]);
41849
41860
  useEffect(() => {
41850
41861
  if (blockLayerRef) {
41851
41862
  const onDragOver = lodash.exports.debounce((ev) => {
@@ -41935,7 +41946,16 @@ function useAvatarWrapperDrop() {
41935
41946
  blockLayerRef.removeEventListener("dragleave", onDragend);
41936
41947
  };
41937
41948
  }
41938
- }, [blockLayerRef, dataTransferRef, valuesRef, removeHightLightClassName]);
41949
+ }, [
41950
+ blockLayerRef,
41951
+ dataTransferRef,
41952
+ valuesRef,
41953
+ removeHightLightClassName,
41954
+ allowDrop,
41955
+ setDirection,
41956
+ setHoverIdx,
41957
+ setDataTransfer
41958
+ ]);
41939
41959
  return {
41940
41960
  setBlockLayerRef,
41941
41961
  blockLayerRef,
@@ -41997,7 +42017,7 @@ function BlockLayer() {
41997
42017
  blockData.data.hidden = !Boolean(blockData.data.hidden);
41998
42018
  setValueByIdx2(id, blockData);
41999
42019
  }
42000
- }, [setValueByIdx2]);
42020
+ }, [setValueByIdx2, valueRef]);
42001
42021
  const renderTitle = useCallback((data) => {
42002
42022
  const isPage = data.type === BasicType.PAGE;
42003
42023
  const title2 = getBlockTitle(data);
@@ -42073,20 +42093,27 @@ function BlockLayer() {
42073
42093
  moveBlock(dragNode.key, getChildIdx(dropNode.parentKey, dropPosition > 0 ? dropIndex + 1 : dropIndex));
42074
42094
  }
42075
42095
  }, [moveBlock]);
42076
- const blockTreeAllowDrop = useCallback((data) => {
42077
- var _a, _b;
42078
- const dropResult = allowDrop(data);
42079
- if (dropResult) {
42080
- const node = (_b = (_a = document.querySelector(`[data-tree-idx="${dropResult.key}"]`)) == null ? void 0 : _a.parentNode) == null ? void 0 : _b.parentNode;
42081
- if (node instanceof HTMLElement) {
42082
- removeHightLightClassName();
42083
- node.classList.add("arco-tree-node-title-gap-bottom");
42096
+ const blockTreeAllowDrop = useCallback((() => {
42097
+ let lastDropResult = false;
42098
+ return (data) => {
42099
+ var _a, _b;
42100
+ const dropResult = allowDrop(data);
42101
+ if (lodash.exports.isEqual(lastDropResult, dropResult)) {
42102
+ return dropResult;
42084
42103
  }
42085
- setDirection(getDirectionFormDropPosition(dropResult.position));
42086
- setHoverIdx(dropResult.key);
42087
- }
42088
- return dropResult;
42089
- }, [allowDrop]);
42104
+ lastDropResult = dropResult;
42105
+ if (dropResult) {
42106
+ const node = (_b = (_a = document.querySelector(`[data-tree-idx="${dropResult.key}"]`)) == null ? void 0 : _a.parentNode) == null ? void 0 : _b.parentNode;
42107
+ if (node instanceof HTMLElement) {
42108
+ removeHightLightClassName();
42109
+ node.classList.add("arco-tree-node-title-gap-bottom");
42110
+ }
42111
+ setDirection(getDirectionFormDropPosition(dropResult.position));
42112
+ setHoverIdx(dropResult.key);
42113
+ }
42114
+ return dropResult;
42115
+ };
42116
+ })(), [allowDrop, removeHightLightClassName, setDirection, setHoverIdx]);
42090
42117
  const selectedKeys = useMemo(() => {
42091
42118
  if (!focusIdx2)
42092
42119
  return [];
@@ -42285,70 +42312,70 @@ function TextBlockItem() {
42285
42312
  })));
42286
42313
  }
42287
42314
  const defaultImagesMap = {
42288
- IMAGE_08: "https://assets.maocanhua.cn/0046b247-3647-491f-afe1-cb0dd2a3c21c-ef84b752-f827-4546-89bf-6b63dfb67a4d.png",
42289
- IMAGE_09: "https://assets.maocanhua.cn/be34fb18-32ad-441c-84d8-3c0e9ba9f742-ad2ea5ff-5d0b-446b-bd7d-8e2ab5afdd16.png",
42290
- IMAGE_10: "https://assets.maocanhua.cn/6a1e6292-469e-452a-bbae-44e4b5ff7463-05e543b6-c951-44ce-ae27-ca1282c77f52.png",
42291
- IMAGE_11: "https://assets.maocanhua.cn/39b25f35-7ca9-4264-8502-41f430f89cf5-bcdc91c2-da3c-4fef-99c0-62b77c5a0f1f.png",
42292
- IMAGE_12: "https://assets.maocanhua.cn/eaa83007-f6f5-47d9-acbe-bb98065eaf20-b7c46090-73bd-4d4b-bd31-2368f7b4064f.png",
42293
- IMAGE_13: "https://assets.maocanhua.cn/9dec87bb-0a6d-429f-ac23-0ee636e6428d-219dee7e-85bb-4fba-9bf3-e98762e80409.png",
42294
- IMAGE_14: "https://assets.maocanhua.cn/d285da5e-b0c0-4895-84ac-42f83b4d603b-64042d20-be6a-45de-819c-8312f778a38d.png",
42295
- IMAGE_15: "https://assets.maocanhua.cn/f69f48af-5b15-40aa-91c4-81d601d1357b-083dc99d-02a6-40d9-ae28-0662bd078b5d.png",
42296
- IMAGE_16: "https://assets.maocanhua.cn/9cce6b16-5a98-4ddb-b1a1-6cec2cf56891-c3acb856-8ab8-4cfb-93f9-2a0747678b8b.png",
42297
- IMAGE_17: "https://assets.maocanhua.cn/d9795c1d-fa32-4adb-ab25-30b7cfe87936-df21314f-6f05-4550-80b3-9ab1107e8fbe.png",
42298
- IMAGE_18: "https://assets.maocanhua.cn/82f6f893-43ed-4f3d-9a17-4740bda844de-3318b36c-199d-46fe-96b8-38d1f17ef0c1.png",
42299
- IMAGE_19: "https://assets.maocanhua.cn/f1ece227-e050-4751-b064-aaeeabd5bfde-d459e9a2-b192-417b-8a77-2297b29e814e.png",
42300
- IMAGE_20: "https://assets.maocanhua.cn/585b48f6-ee7c-4d1a-8619-4d2edea09be6-07113335-5d19-464a-adef-2be50682ce72.png",
42301
- IMAGE_21: "https://assets.maocanhua.cn/9755d667-289e-405c-b84a-adf5db91ea4d-c03c409b-dd9b-40e9-840a-6a64e1df594e.png",
42302
- IMAGE_22: "https://assets.maocanhua.cn/7487ce49-cd69-4651-8da3-807c54357258-defaaf0a-1756-4b83-9a94-51dcdbfeb84f.png",
42303
- IMAGE_23: "https://assets.maocanhua.cn/c3463b9e-baff-41c8-95ee-01c5a79259bd-8062ab05-baa5-45d2-9959-4935d4ff2005.png",
42304
- IMAGE_24: "https://assets.maocanhua.cn/1f45e84a-5c84-45ce-9d27-df6ffb55bcdd-cbf126f4-b372-4ea9-a354-0dc27be4ce2f.png",
42305
- IMAGE_25: "https://assets.maocanhua.cn/6b8b234e-2306-48f9-90ed-056c13201a83-492073c3-258f-4f1b-91fa-4a8ae723aa2c.png",
42306
- IMAGE_26: "https://assets.maocanhua.cn/aa50c2c9-8e3b-4af2-b029-337ec549ec10-baacd015-2e3f-4326-b3ab-bde84a7c456b.png",
42307
- IMAGE_27: "https://assets.maocanhua.cn/9e935e54-a97e-4fbb-a2fb-73e351a35eed-479ef4d1-9460-48b2-934d-84d77044b98d.png",
42308
- IMAGE_28: "https://assets.maocanhua.cn/799564d8-3082-4fdc-86ed-8c4b3510934f-3f8ccbaa-7b6b-49b7-a836-21fa88f996fc.png",
42309
- IMAGE_29: "https://assets.maocanhua.cn/af34a548-c339-4a9e-85fe-11bf90c083eb-46fef91d-7307-4e91-aae0-460da1c48629.png",
42310
- IMAGE_30: "https://assets.maocanhua.cn/84014a93-429c-479c-b9ed-0c568f58a288-ca76cdf2-92d3-4552-bc95-3a8dd4c9cd0b.png",
42311
- IMAGE_31: "https://assets.maocanhua.cn/dd1584fb-cb60-42c9-80c7-5545e16130ca-226ba72b-ce9e-4948-ad0d-347381fb96c5.png",
42312
- IMAGE_32: "https://assets.maocanhua.cn/76e3d8e2-697d-484c-a989-715bd234b575-37bde239-2e2d-450a-8e93-d62c39cb94a3.png",
42313
- IMAGE_33: "https://assets.maocanhua.cn/898b791e-c8fc-4bc5-bf1e-47a0351284ce-fdee9617-9848-49e7-82b6-36095f417a3e.png",
42314
- IMAGE_34: "https://assets.maocanhua.cn/49662d27-6e14-4e75-a942-946f0af25a51-e9aa2ead-98e4-4f70-8073-7b5aaafaa367.png",
42315
- IMAGE_35: "https://assets.maocanhua.cn/d2905fb1-9fc1-49c0-90b0-806877c38cd2-f2e05655-4e6c-41b0-a028-990448a716dc.png",
42316
- IMAGE_36: "https://assets.maocanhua.cn/9c3e9949-1be7-42b5-ad48-44f0e1c89c2e-2ee3cbac-e45e-414d-96ad-9dae3621cf14.png",
42317
- IMAGE_37: "https://assets.maocanhua.cn/1865e3a6-a762-4bd9-9644-96ae6b27a83a-176a20c7-5768-400c-b2eb-701500cee17c.png",
42318
- IMAGE_38: "https://assets.maocanhua.cn/2a6d82e2-d1f6-4e30-ae05-1afe3cd03e70-22d186b0-c2f1-4aee-b33b-869cae26412e.png",
42319
- IMAGE_39: "https://assets.maocanhua.cn/9f97bda2-82d6-47e7-80c1-40be94d5491f-88233d55-8715-43cd-9232-246440e33cd6.png",
42320
- IMAGE_40: "https://assets.maocanhua.cn/b8f00c77-12b0-4e61-a85e-96918c0035dc-b8344b64-8e79-424d-a974-8e13e6b1e7f8.png",
42321
- IMAGE_41: "https://assets.maocanhua.cn/5fc6be85-0205-4ca9-bb9a-eb9335f94af2-2d41c4bb-2c00-4fe7-8b32-067e92df3ab3.png",
42322
- IMAGE_42: "https://assets.maocanhua.cn/f6c9c054-f35a-4af7-957f-c7a6209972eb-7e3b42bf-8d97-466d-8662-8d3b1786e8b8.png",
42323
- IMAGE_43: "https://assets.maocanhua.cn/80e108b0-3d70-442a-93c1-3fcc091253c6-3dc61b44-6072-413a-ae28-a551577b7677.png",
42324
- IMAGE_44: "https://assets.maocanhua.cn/14b9e878-7208-48f4-94d0-51161b79010a-fb55ae68-a7ce-4bae-830d-331d368f0f32.png",
42325
- IMAGE_45: "https://assets.maocanhua.cn/b42f3cd8-01fc-4650-a32d-b584b05e78c3-5e408f98-e9e6-43de-97af-91b2732760df.png",
42326
- IMAGE_46: "https://assets.maocanhua.cn/e737972a-d884-440b-96d3-66f703dd110b-9f1d0d18-fb45-4a54-a2d0-65bc5b168f8a.png",
42327
- IMAGE_47: "https://assets.maocanhua.cn/0e3ae071-247a-4e69-8b60-8009477180b9-197205c2-2ae7-420f-94aa-78440226beaa.png",
42328
- IMAGE_48: "https://assets.maocanhua.cn/0ec46619-4dd0-4293-88fb-14656ac7d33c-0936deed-a88c-4e3d-90bf-4fe67b295659",
42329
- IMAGE_49: "https://assets.maocanhua.cn/01830aec-d044-4d2a-9519-aac2901f4760-776602f7-021b-4142-a2d0-446aca5e0418",
42330
- IMAGE_50: "https://assets.maocanhua.cn/9f1cee25-f9b4-4539-b4ea-3109584c0a54-0692c4fb-46ce-452c-8573-fcce74852cba",
42331
- IMAGE_51: "https://assets.maocanhua.cn/e138143f-7071-44bc-8470-7d56850e527c-f515254e-67b8-4b68-b86f-7993e960d893",
42332
- IMAGE_52: "https://assets.maocanhua.cn/ac75b655-b57d-40b9-a201-8163eeb6a579-1f894e6f-18ac-42c4-9227-7488433586bc.png",
42333
- IMAGE_53: "https://assets.maocanhua.cn/3c505a1b-575a-40fb-83c1-6c4a11a6d478-9e466e35-af9e-406a-b4cc-b86f9d0b0419.png",
42334
- IMAGE_54: "https://assets.maocanhua.cn/7f98eeec-9422-48b5-9b57-939a24418b92-a6346a63-b393-49c2-9911-ee1a9a1ffd02.png",
42335
- IMAGE_55: "https://assets.maocanhua.cn/a7f5ae44-418b-40e1-b8a5-8162cf8bbd87-156cc8dd-3a19-4638-8c26-e28783e50952.png",
42336
- IMAGE_56: "https://assets.maocanhua.cn/efdeeced-1eb7-465f-8370-a3b000634ba2-0a4d1794-6ca7-44fa-a1c6-04e3bde8eb56.png",
42337
- IMAGE_57: "https://assets.maocanhua.cn/425c6017-2c30-41d7-8930-08300492c6d4-a0859ca3-5213-484c-9170-2d51329407cc.png",
42338
- IMAGE_58: "https://assets.maocanhua.cn/858ea699-cf65-469d-bd9e-70adea729bb4-c4e7a711-27b6-4865-9b32-516c41cebddf.png",
42339
- IMAGE_59: "https://assets.maocanhua.cn/06ca521d-9728-4de6-a709-1b75a828bfc3-2a9b1224-3d71-43b8-b52f-e7cdcdc9107b.png",
42340
- IMAGE_60: "https://assets.maocanhua.cn/199eacfa-daf8-4dd1-a356-225a265a88a4-e8432435-a2bb-4ec2-a3e9-ee1757d8b44b",
42341
- IMAGE_61: "https://assets.maocanhua.cn/f43b67dc-cc30-4533-b2ca-4689292aab4d-40bc844d-5362-451f-a839-69e86f7a3113",
42342
- IMAGE_62: "https://assets.maocanhua.cn/318e911c-a57b-4768-9c79-0e49c2953e7a-dbe0eb3c-0b4b-495a-a469-a15b46c5a0cc",
42343
- IMAGE_63: "https://assets.maocanhua.cn/ed70ddb1-1344-4245-ab1e-beae36ed44b4-21a80cb3-a928-4857-973b-98992fdec74f",
42344
- IMAGE_64: "https://assets.maocanhua.cn/fb7dd6fa-12c1-41e1-8744-91d0f861ec57-0fee9bda-2381-4c54-a24d-bd644384b9aa",
42345
- IMAGE_65: "https://assets.maocanhua.cn/7bf8c363-17bd-472d-8cca-96f5d4b64292-9ab34957-15d3-4068-8e83-cc283d8e400d",
42346
- IMAGE_66: "https://assets.maocanhua.cn/0330a1e9-e814-4be8-83f0-ee1dbabf44a0-6e35a585-92ec-4570-875b-866b59927583",
42347
- IMAGE_67: "https://assets.maocanhua.cn/a7deb6bc-db2b-4273-bf25-002bb148bf5a-ed5e9b17-15a9-4e0f-9874-c3219d48b2b4",
42348
- IMAGE_68: "https://assets.maocanhua.cn/52c50319-e3a9-401b-9057-bd6531870f10-aa79ec5d-76d2-4d48-a99e-2ccd9d9c285b",
42349
- IMAGE_69: "https://assets.maocanhua.cn/9994cef3-6205-4013-8993-b037d067df64-f5d03db4-6bb4-4af4-b35a-0b6d512eaff4",
42350
- IMAGE_70: "https://assets.maocanhua.cn/e5dd7a7e-70d7-483f-80cc-0c5b41107101-75dcedc7-4a34-4d03-97ee-bf32163afa0a",
42351
- IMAGE_71: "https://assets.maocanhua.cn/53277265-8e54-43d0-b9d0-d34cd1639861-adb7a48a-8382-43a1-ad59-7c84764a3b21.png"
42315
+ IMAGE_08: "https://easy-email-m-ryan.vercel.app/images/0046b247-3647-491f-afe1-cb0dd2a3c21c-ef84b752-f827-4546-89bf-6b63dfb67a4d.png",
42316
+ IMAGE_09: "https://easy-email-m-ryan.vercel.app/images/be34fb18-32ad-441c-84d8-3c0e9ba9f742-ad2ea5ff-5d0b-446b-bd7d-8e2ab5afdd16.png",
42317
+ IMAGE_10: "https://easy-email-m-ryan.vercel.app/images/6a1e6292-469e-452a-bbae-44e4b5ff7463-05e543b6-c951-44ce-ae27-ca1282c77f52.png",
42318
+ IMAGE_11: "https://easy-email-m-ryan.vercel.app/images/39b25f35-7ca9-4264-8502-41f430f89cf5-bcdc91c2-da3c-4fef-99c0-62b77c5a0f1f.png",
42319
+ IMAGE_12: "https://easy-email-m-ryan.vercel.app/images/eaa83007-f6f5-47d9-acbe-bb98065eaf20-b7c46090-73bd-4d4b-bd31-2368f7b4064f.png",
42320
+ IMAGE_13: "https://easy-email-m-ryan.vercel.app/images/9dec87bb-0a6d-429f-ac23-0ee636e6428d-219dee7e-85bb-4fba-9bf3-e98762e80409.png",
42321
+ IMAGE_14: "https://easy-email-m-ryan.vercel.app/images/d285da5e-b0c0-4895-84ac-42f83b4d603b-64042d20-be6a-45de-819c-8312f778a38d.png",
42322
+ IMAGE_15: "https://easy-email-m-ryan.vercel.app/images/f69f48af-5b15-40aa-91c4-81d601d1357b-083dc99d-02a6-40d9-ae28-0662bd078b5d.png",
42323
+ IMAGE_16: "https://easy-email-m-ryan.vercel.app/images/9cce6b16-5a98-4ddb-b1a1-6cec2cf56891-c3acb856-8ab8-4cfb-93f9-2a0747678b8b.png",
42324
+ IMAGE_17: "https://easy-email-m-ryan.vercel.app/images/d9795c1d-fa32-4adb-ab25-30b7cfe87936-df21314f-6f05-4550-80b3-9ab1107e8fbe.png",
42325
+ IMAGE_18: "https://easy-email-m-ryan.vercel.app/images/82f6f893-43ed-4f3d-9a17-4740bda844de-3318b36c-199d-46fe-96b8-38d1f17ef0c1.png",
42326
+ IMAGE_19: "https://easy-email-m-ryan.vercel.app/images/f1ece227-e050-4751-b064-aaeeabd5bfde-d459e9a2-b192-417b-8a77-2297b29e814e.png",
42327
+ IMAGE_20: "https://easy-email-m-ryan.vercel.app/images/585b48f6-ee7c-4d1a-8619-4d2edea09be6-07113335-5d19-464a-adef-2be50682ce72.png",
42328
+ IMAGE_21: "https://easy-email-m-ryan.vercel.app/images/9755d667-289e-405c-b84a-adf5db91ea4d-c03c409b-dd9b-40e9-840a-6a64e1df594e.png",
42329
+ IMAGE_22: "https://easy-email-m-ryan.vercel.app/images/7487ce49-cd69-4651-8da3-807c54357258-defaaf0a-1756-4b83-9a94-51dcdbfeb84f.png",
42330
+ IMAGE_23: "https://easy-email-m-ryan.vercel.app/images/c3463b9e-baff-41c8-95ee-01c5a79259bd-8062ab05-baa5-45d2-9959-4935d4ff2005.png",
42331
+ IMAGE_24: "https://easy-email-m-ryan.vercel.app/images/1f45e84a-5c84-45ce-9d27-df6ffb55bcdd-cbf126f4-b372-4ea9-a354-0dc27be4ce2f.png",
42332
+ IMAGE_25: "https://easy-email-m-ryan.vercel.app/images/6b8b234e-2306-48f9-90ed-056c13201a83-492073c3-258f-4f1b-91fa-4a8ae723aa2c.png",
42333
+ IMAGE_26: "https://easy-email-m-ryan.vercel.app/images/aa50c2c9-8e3b-4af2-b029-337ec549ec10-baacd015-2e3f-4326-b3ab-bde84a7c456b.png",
42334
+ IMAGE_27: "https://easy-email-m-ryan.vercel.app/images/9e935e54-a97e-4fbb-a2fb-73e351a35eed-479ef4d1-9460-48b2-934d-84d77044b98d.png",
42335
+ IMAGE_28: "https://easy-email-m-ryan.vercel.app/images/799564d8-3082-4fdc-86ed-8c4b3510934f-3f8ccbaa-7b6b-49b7-a836-21fa88f996fc.png",
42336
+ IMAGE_29: "https://easy-email-m-ryan.vercel.app/images/af34a548-c339-4a9e-85fe-11bf90c083eb-46fef91d-7307-4e91-aae0-460da1c48629.png",
42337
+ IMAGE_30: "https://easy-email-m-ryan.vercel.app/images/84014a93-429c-479c-b9ed-0c568f58a288-ca76cdf2-92d3-4552-bc95-3a8dd4c9cd0b.png",
42338
+ IMAGE_31: "https://easy-email-m-ryan.vercel.app/images/dd1584fb-cb60-42c9-80c7-5545e16130ca-226ba72b-ce9e-4948-ad0d-347381fb96c5.png",
42339
+ IMAGE_32: "https://easy-email-m-ryan.vercel.app/images/76e3d8e2-697d-484c-a989-715bd234b575-37bde239-2e2d-450a-8e93-d62c39cb94a3.png",
42340
+ IMAGE_33: "https://easy-email-m-ryan.vercel.app/images/898b791e-c8fc-4bc5-bf1e-47a0351284ce-fdee9617-9848-49e7-82b6-36095f417a3e.png",
42341
+ IMAGE_34: "https://easy-email-m-ryan.vercel.app/images/49662d27-6e14-4e75-a942-946f0af25a51-e9aa2ead-98e4-4f70-8073-7b5aaafaa367.png",
42342
+ IMAGE_35: "https://easy-email-m-ryan.vercel.app/images/d2905fb1-9fc1-49c0-90b0-806877c38cd2-f2e05655-4e6c-41b0-a028-990448a716dc.png",
42343
+ IMAGE_36: "https://easy-email-m-ryan.vercel.app/images/9c3e9949-1be7-42b5-ad48-44f0e1c89c2e-2ee3cbac-e45e-414d-96ad-9dae3621cf14.png",
42344
+ IMAGE_37: "https://easy-email-m-ryan.vercel.app/images/1865e3a6-a762-4bd9-9644-96ae6b27a83a-176a20c7-5768-400c-b2eb-701500cee17c.png",
42345
+ IMAGE_38: "https://easy-email-m-ryan.vercel.app/images/2a6d82e2-d1f6-4e30-ae05-1afe3cd03e70-22d186b0-c2f1-4aee-b33b-869cae26412e.png",
42346
+ IMAGE_39: "https://easy-email-m-ryan.vercel.app/images/9f97bda2-82d6-47e7-80c1-40be94d5491f-88233d55-8715-43cd-9232-246440e33cd6.png",
42347
+ IMAGE_40: "https://easy-email-m-ryan.vercel.app/images/b8f00c77-12b0-4e61-a85e-96918c0035dc-b8344b64-8e79-424d-a974-8e13e6b1e7f8.png",
42348
+ IMAGE_41: "https://easy-email-m-ryan.vercel.app/images/5fc6be85-0205-4ca9-bb9a-eb9335f94af2-2d41c4bb-2c00-4fe7-8b32-067e92df3ab3.png",
42349
+ IMAGE_42: "https://easy-email-m-ryan.vercel.app/images/f6c9c054-f35a-4af7-957f-c7a6209972eb-7e3b42bf-8d97-466d-8662-8d3b1786e8b8.png",
42350
+ IMAGE_43: "https://easy-email-m-ryan.vercel.app/images/80e108b0-3d70-442a-93c1-3fcc091253c6-3dc61b44-6072-413a-ae28-a551577b7677.png",
42351
+ IMAGE_44: "https://easy-email-m-ryan.vercel.app/images/14b9e878-7208-48f4-94d0-51161b79010a-fb55ae68-a7ce-4bae-830d-331d368f0f32.png",
42352
+ IMAGE_45: "https://easy-email-m-ryan.vercel.app/images/b42f3cd8-01fc-4650-a32d-b584b05e78c3-5e408f98-e9e6-43de-97af-91b2732760df.png",
42353
+ IMAGE_46: "https://easy-email-m-ryan.vercel.app/images/e737972a-d884-440b-96d3-66f703dd110b-9f1d0d18-fb45-4a54-a2d0-65bc5b168f8a.png",
42354
+ IMAGE_47: "https://easy-email-m-ryan.vercel.app/images/0e3ae071-247a-4e69-8b60-8009477180b9-197205c2-2ae7-420f-94aa-78440226beaa.png",
42355
+ IMAGE_48: "https://easy-email-m-ryan.vercel.app/images/0ec46619-4dd0-4293-88fb-14656ac7d33c-0936deed-a88c-4e3d-90bf-4fe67b295659",
42356
+ IMAGE_49: "https://easy-email-m-ryan.vercel.app/images/01830aec-d044-4d2a-9519-aac2901f4760-776602f7-021b-4142-a2d0-446aca5e0418",
42357
+ IMAGE_50: "https://easy-email-m-ryan.vercel.app/images/9f1cee25-f9b4-4539-b4ea-3109584c0a54-0692c4fb-46ce-452c-8573-fcce74852cba",
42358
+ IMAGE_51: "https://easy-email-m-ryan.vercel.app/images/e138143f-7071-44bc-8470-7d56850e527c-f515254e-67b8-4b68-b86f-7993e960d893",
42359
+ IMAGE_52: "https://easy-email-m-ryan.vercel.app/images/ac75b655-b57d-40b9-a201-8163eeb6a579-1f894e6f-18ac-42c4-9227-7488433586bc.png",
42360
+ IMAGE_53: "https://easy-email-m-ryan.vercel.app/images/3c505a1b-575a-40fb-83c1-6c4a11a6d478-9e466e35-af9e-406a-b4cc-b86f9d0b0419.png",
42361
+ IMAGE_54: "https://easy-email-m-ryan.vercel.app/images/7f98eeec-9422-48b5-9b57-939a24418b92-a6346a63-b393-49c2-9911-ee1a9a1ffd02.png",
42362
+ IMAGE_55: "https://easy-email-m-ryan.vercel.app/images/a7f5ae44-418b-40e1-b8a5-8162cf8bbd87-156cc8dd-3a19-4638-8c26-e28783e50952.png",
42363
+ IMAGE_56: "https://easy-email-m-ryan.vercel.app/images/efdeeced-1eb7-465f-8370-a3b000634ba2-0a4d1794-6ca7-44fa-a1c6-04e3bde8eb56.png",
42364
+ IMAGE_57: "https://easy-email-m-ryan.vercel.app/images/425c6017-2c30-41d7-8930-08300492c6d4-a0859ca3-5213-484c-9170-2d51329407cc.png",
42365
+ IMAGE_58: "https://easy-email-m-ryan.vercel.app/images/858ea699-cf65-469d-bd9e-70adea729bb4-c4e7a711-27b6-4865-9b32-516c41cebddf.png",
42366
+ IMAGE_59: "https://easy-email-m-ryan.vercel.app/images/06ca521d-9728-4de6-a709-1b75a828bfc3-2a9b1224-3d71-43b8-b52f-e7cdcdc9107b.png",
42367
+ IMAGE_60: "https://easy-email-m-ryan.vercel.app/images/199eacfa-daf8-4dd1-a356-225a265a88a4-e8432435-a2bb-4ec2-a3e9-ee1757d8b44b",
42368
+ IMAGE_61: "https://easy-email-m-ryan.vercel.app/images/f43b67dc-cc30-4533-b2ca-4689292aab4d-40bc844d-5362-451f-a839-69e86f7a3113",
42369
+ IMAGE_62: "https://easy-email-m-ryan.vercel.app/images/318e911c-a57b-4768-9c79-0e49c2953e7a-dbe0eb3c-0b4b-495a-a469-a15b46c5a0cc",
42370
+ IMAGE_63: "https://easy-email-m-ryan.vercel.app/images/ed70ddb1-1344-4245-ab1e-beae36ed44b4-21a80cb3-a928-4857-973b-98992fdec74f",
42371
+ IMAGE_64: "https://easy-email-m-ryan.vercel.app/images/fb7dd6fa-12c1-41e1-8744-91d0f861ec57-0fee9bda-2381-4c54-a24d-bd644384b9aa",
42372
+ IMAGE_65: "https://easy-email-m-ryan.vercel.app/images/7bf8c363-17bd-472d-8cca-96f5d4b64292-9ab34957-15d3-4068-8e83-cc283d8e400d",
42373
+ IMAGE_66: "https://easy-email-m-ryan.vercel.app/images/0330a1e9-e814-4be8-83f0-ee1dbabf44a0-6e35a585-92ec-4570-875b-866b59927583",
42374
+ IMAGE_67: "https://easy-email-m-ryan.vercel.app/images/a7deb6bc-db2b-4273-bf25-002bb148bf5a-ed5e9b17-15a9-4e0f-9874-c3219d48b2b4",
42375
+ IMAGE_68: "https://easy-email-m-ryan.vercel.app/images/52c50319-e3a9-401b-9057-bd6531870f10-aa79ec5d-76d2-4d48-a99e-2ccd9d9c285b",
42376
+ IMAGE_69: "https://easy-email-m-ryan.vercel.app/images/9994cef3-6205-4013-8993-b037d067df64-f5d03db4-6bb4-4af4-b35a-0b6d512eaff4",
42377
+ IMAGE_70: "https://easy-email-m-ryan.vercel.app/images/e5dd7a7e-70d7-483f-80cc-0c5b41107101-75dcedc7-4a34-4d03-97ee-bf32163afa0a",
42378
+ IMAGE_71: "https://easy-email-m-ryan.vercel.app/images/53277265-8e54-43d0-b9d0-d34cd1639861-adb7a48a-8382-43a1-ad59-7c84764a3b21.png"
42352
42379
  };
42353
42380
  ImageManager.add(defaultImagesMap);
42354
42381
  function getImg(name) {
@@ -44538,6 +44565,7 @@ function Toolbar() {
44538
44565
  const { focusIdx: focusIdx2, setFocusIdx } = useFocusIdx();
44539
44566
  const { focusBlockRect } = useFocusBlockLayout();
44540
44567
  const { modal, setModalVisible } = useAddToCollection();
44568
+ const props = useEditorProps();
44541
44569
  const isPage = (focusBlock2 == null ? void 0 : focusBlock2.type) === BasicType.PAGE;
44542
44570
  const handleAddToCollection = () => {
44543
44571
  if (document.activeElement instanceof HTMLElement) {
@@ -44615,7 +44643,7 @@ function Toolbar() {
44615
44643
  }), /* @__PURE__ */ React__default.createElement(ToolItem, {
44616
44644
  iconName: "icon-copy",
44617
44645
  onClick: handleCopy
44618
- }), /* @__PURE__ */ React__default.createElement(ToolItem, {
44646
+ }), props.onAddCollection && /* @__PURE__ */ React__default.createElement(ToolItem, {
44619
44647
  iconName: "icon-collection",
44620
44648
  onClick: handleAddToCollection
44621
44649
  }), /* @__PURE__ */ React__default.createElement(ToolItem, {