@tmagic/stage 1.3.6 → 1.3.7

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.
@@ -1,5 +1,6 @@
1
1
  import { Mode } from './const';
2
2
  import Rule from './Rule';
3
+ import type { RuleOptions } from './types';
3
4
  /**
4
5
  * 蒙层
5
6
  * @description 用于拦截页面的点击动作,避免点击时触发组件自身动作;在编辑器中点击组件应当是选中组件;
@@ -20,7 +21,7 @@ export default class StageMask extends Rule {
20
21
  private pageScrollParent;
21
22
  private intersectionObserver;
22
23
  private wrapperResizeObserver;
23
- constructor();
24
+ constructor(options?: RuleOptions);
24
25
  setMode(mode: Mode): void;
25
26
  /**
26
27
  * 初始化视窗和蒙层监听,监听元素是否在视窗区域、监听mask蒙层所在的wrapper大小变化
package/types/const.d.ts CHANGED
@@ -45,3 +45,7 @@ export declare enum Mode {
45
45
  }
46
46
  /** 选中节点的class name */
47
47
  export declare const SELECTED_CLASS = "tmagic-stage-selected-area";
48
+ export declare enum AbleActionEventType {
49
+ SELECT_PARENT = "select-parent",
50
+ REMOVE = "remove"
51
+ }
package/types/index.d.ts CHANGED
@@ -1,5 +1,6 @@
1
1
  import StageCore from './StageCore';
2
2
  export type { MoveableOptions, OnDragStart } from 'moveable';
3
+ export type { GuidesOptions } from '@scena/guides';
3
4
  export { default as StageRender } from './StageRender';
4
5
  export { default as StageMask } from './StageMask';
5
6
  export { default as StageDragResize } from './StageDragResize';
package/types/types.d.ts CHANGED
@@ -1,4 +1,5 @@
1
1
  /// <reference types="node" />
2
+ import type { GuidesOptions } from '@scena/guides';
2
3
  import type { MoveableOptions } from 'moveable';
3
4
  import Core from '@tmagic/core';
4
5
  import type { Id, MApp, MContainer, MNode } from '@tmagic/schema';
@@ -49,6 +50,8 @@ export interface StageCoreConfig {
49
50
  updateDragEl?: UpdateDragEl;
50
51
  disabledDragStart?: boolean;
51
52
  renderType?: RenderType;
53
+ guidesOptions?: Partial<GuidesOptions>;
54
+ disabledMultiSelect?: boolean;
52
55
  }
53
56
  export interface ActionManagerConfig {
54
57
  container: HTMLElement;
@@ -57,6 +60,7 @@ export interface ActionManagerConfig {
57
60
  containerHighlightType?: ContainerHighlightType;
58
61
  moveableOptions?: CustomizeMoveableOptions;
59
62
  disabledDragStart?: boolean;
63
+ disabledMultiSelect?: boolean;
60
64
  canSelect?: CanSelect;
61
65
  isContainer: IsContainer;
62
66
  getRootContainer: GetRootContainer;
@@ -210,7 +214,6 @@ export interface TargetShadowConfig {
210
214
  updateDragEl?: UpdateDragEl;
211
215
  idPrefix?: string;
212
216
  }
213
- export declare enum AbleActionEventType {
214
- SELECT_PARENT = "select-parent",
215
- REMOVE = "remove"
217
+ export interface RuleOptions {
218
+ guidesOptions?: Partial<GuidesOptions>;
216
219
  }