@tmagic/editor 1.2.0-beta.25 → 1.2.0-beta.26

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.
@@ -2026,8 +2026,16 @@
2026
2026
  const config = await storageService.getItem(COPY_STORAGE_KEY);
2027
2027
  if (!Array.isArray(config))
2028
2028
  return;
2029
+ const node = this.get("node");
2030
+ let parent = void 0;
2031
+ if (config.length === 1 && config[0].id === node.id) {
2032
+ parent = this.get("parent");
2033
+ if (parent.type === schema.NodeType.ROOT) {
2034
+ parent = this.get("page");
2035
+ }
2036
+ }
2029
2037
  const pasteConfigs = await this.doPaste(config, position);
2030
- return this.add(pasteConfigs, this.get("parent"));
2038
+ return this.add(pasteConfigs, parent);
2031
2039
  }
2032
2040
  async doPaste(config, position = {}) {
2033
2041
  const pasteConfigs = await beforePaste(position, lodashEs.cloneDeep(config));
@@ -2615,6 +2623,7 @@
2615
2623
  containerHighlightClassName: stageOptions.containerHighlightClassName,
2616
2624
  containerHighlightDuration: stageOptions.containerHighlightDuration,
2617
2625
  containerHighlightType: stageOptions.containerHighlightType,
2626
+ disabledDragStart: stageOptions.disabledDragStart,
2618
2627
  canSelect: (el, event, stop) => {
2619
2628
  const elCanSelect = stageOptions.canSelect(el);
2620
2629
  if (uiSelectMode.value && elCanSelect && event.type === "mousedown") {
@@ -5811,7 +5820,7 @@
5811
5820
  const _sfc_main = vue.defineComponent({
5812
5821
  name: "m-editor",
5813
5822
  components: {
5814
- NavMenu: _sfc_main$j,
5823
+ TMagicNavMenu: _sfc_main$j,
5815
5824
  Sidebar: _sfc_main$9,
5816
5825
  Workspace: _sfc_main$1,
5817
5826
  PropsPanel: _sfc_main$i,
@@ -5894,6 +5903,9 @@
5894
5903
  },
5895
5904
  updateDragEl: {
5896
5905
  type: Function
5906
+ },
5907
+ disabledDragStart: {
5908
+ type: Boolean
5897
5909
  }
5898
5910
  },
5899
5911
  emits: ["props-panel-mounted", "update:modelValue"],
@@ -6009,7 +6021,8 @@
6009
6021
  isContainer: props.isContainer,
6010
6022
  containerHighlightClassName: props.containerHighlightClassName,
6011
6023
  containerHighlightDuration: props.containerHighlightDuration,
6012
- containerHighlightType: props.containerHighlightType
6024
+ containerHighlightType: props.containerHighlightType,
6025
+ disabledDragStart: props.disabledDragStart
6013
6026
  })
6014
6027
  );
6015
6028
  return services;
@@ -6025,7 +6038,7 @@
6025
6038
  };
6026
6039
 
6027
6040
  function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
6028
- const _component_NavMenu = vue.resolveComponent("NavMenu");
6041
+ const _component_TMagicNavMenu = vue.resolveComponent("TMagicNavMenu");
6029
6042
  const _component_Sidebar = vue.resolveComponent("Sidebar");
6030
6043
  const _component_Workspace = vue.resolveComponent("Workspace");
6031
6044
  const _component_PropsPanel = vue.resolveComponent("PropsPanel");
@@ -6033,7 +6046,7 @@
6033
6046
  return vue.openBlock(), vue.createBlock(_component_Framework, { "code-options": _ctx.codeOptions }, {
6034
6047
  nav: vue.withCtx(() => [
6035
6048
  vue.renderSlot(_ctx.$slots, "nav", { editorService: _ctx.editorService }, () => [
6036
- vue.createVNode(_component_NavMenu, { data: _ctx.menu }, null, 8, ["data"])
6049
+ vue.createVNode(_component_TMagicNavMenu, { data: _ctx.menu }, null, 8, ["data"])
6037
6050
  ])
6038
6051
  ]),
6039
6052
  sidebar: vue.withCtx(() => [