@tmagic/stage 1.3.6 → 1.3.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +5432 -0
- package/dist/tmagic-stage.js +144 -106
- package/dist/tmagic-stage.js.map +1 -1
- package/dist/tmagic-stage.umd.cjs +144 -106
- package/dist/tmagic-stage.umd.cjs.map +1 -1
- package/package.json +10 -10
- package/src/ActionManager.ts +121 -81
- package/src/MoveableActionsAble.ts +1 -1
- package/src/MoveableOptionsManager.ts +2 -2
- package/src/Rule.ts +7 -2
- package/src/StageCore.ts +14 -1
- package/src/StageMask.ts +3 -2
- package/src/StageRender.ts +0 -6
- package/src/const.ts +5 -0
- package/src/index.ts +1 -0
- package/src/types.ts +6 -3
- package/types/ActionManager.d.ts +8 -6
- package/types/MoveableActionsAble.d.ts +1 -1
- package/types/MoveableOptionsManager.d.ts +1 -1
- package/types/Rule.d.ts +3 -1
- package/types/StageCore.d.ts +2 -0
- package/types/StageMask.d.ts +2 -1
- package/types/const.d.ts +4 -0
- package/types/index.d.ts +1 -0
- package/types/types.d.ts +6 -3
package/types/StageMask.d.ts
CHANGED
|
@@ -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
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
|
|
214
|
-
|
|
215
|
-
REMOVE = "remove"
|
|
217
|
+
export interface RuleOptions {
|
|
218
|
+
guidesOptions?: Partial<GuidesOptions>;
|
|
216
219
|
}
|