@tmagic/stage 1.5.5 → 1.5.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.
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "1.5.5",
2
+ "version": "1.5.7",
3
3
  "name": "@tmagic/stage",
4
4
  "type": "module",
5
5
  "main": "dist/tmagic-stage.umd.cjs",
@@ -38,24 +38,15 @@
38
38
  },
39
39
  "devDependencies": {
40
40
  "@types/events": "^3.0.0",
41
- "@types/lodash-es": "^4.17.4",
42
- "@types/node": "^18.19.0",
43
- "rimraf": "^3.0.2",
44
- "sass": "^1.83.0",
45
- "vite": "^6.0.3"
41
+ "@types/lodash-es": "^4.17.4"
46
42
  },
47
43
  "peerDependencies": {
48
44
  "typescript": "*",
49
- "@tmagic/core": "1.5.5",
50
- "@tmagic/utils": "1.5.5",
51
- "@tmagic/schema": "1.5.5"
45
+ "@tmagic/core": "1.5.7"
52
46
  },
53
47
  "peerDependenciesMeta": {
54
48
  "typescript": {
55
49
  "optional": true
56
50
  }
57
- },
58
- "scripts": {
59
- "build": "vite build"
60
51
  }
61
52
  }
@@ -21,9 +21,8 @@ import KeyController from 'keycon';
21
21
  import { throttle } from 'lodash-es';
22
22
  import type { MoveableOptions, OnDragStart } from 'moveable';
23
23
 
24
- import { Env } from '@tmagic/core';
25
- import type { Id } from '@tmagic/schema';
26
- import { addClassName, getDocument, getIdFromEl, removeClassNameByClassName } from '@tmagic/utils';
24
+ import type { Id } from '@tmagic/core';
25
+ import { addClassName, Env, getDocument, getIdFromEl, removeClassNameByClassName } from '@tmagic/core';
27
26
 
28
27
  import {
29
28
  AbleActionEventType,
@@ -32,7 +32,7 @@ import type {
32
32
  } from 'moveable';
33
33
  import MoveableHelper from 'moveable-helper';
34
34
 
35
- import { calcValueByFontsize, getIdFromEl, setIdToEl } from '@tmagic/utils';
35
+ import { calcValueByFontsize, getIdFromEl, setIdToEl } from '@tmagic/core';
36
36
 
37
37
  import { DRAG_EL_ID_PREFIX, GHOST_EL_ID_PREFIX, Mode, ZIndex } from './const';
38
38
  import TargetShadow from './TargetShadow';
package/src/StageCore.ts CHANGED
@@ -20,8 +20,8 @@ import { EventEmitter } from 'events';
20
20
 
21
21
  import type { MoveableOptions, OnDragStart } from 'moveable';
22
22
 
23
- import type { Id } from '@tmagic/schema';
24
- import { getIdFromEl } from '@tmagic/utils';
23
+ import type { Id } from '@tmagic/core';
24
+ import { getIdFromEl } from '@tmagic/core';
25
25
 
26
26
  import ActionManager from './ActionManager';
27
27
  import { DEFAULT_ZOOM } from './const';
@@ -19,7 +19,7 @@
19
19
  /* eslint-disable no-param-reassign */
20
20
  import Moveable, { MoveableOptions } from 'moveable';
21
21
 
22
- import { getIdFromEl } from '@tmagic/utils';
22
+ import { getIdFromEl } from '@tmagic/core';
23
23
 
24
24
  import { Mode, StageDragStatus } from './const';
25
25
  import type DragResizeHelper from './DragResizeHelper';
package/src/StageMask.ts CHANGED
@@ -16,7 +16,7 @@
16
16
  * limitations under the License.
17
17
  */
18
18
 
19
- import { createDiv, getDocument, injectStyle } from '@tmagic/utils';
19
+ import { createDiv, getDocument, injectStyle } from '@tmagic/core';
20
20
 
21
21
  import { Mode, ZIndex } from './const';
22
22
  import Rule from './Rule';
@@ -18,7 +18,7 @@
18
18
 
19
19
  import Moveable from 'moveable';
20
20
 
21
- import { getIdFromEl } from '@tmagic/utils';
21
+ import { getIdFromEl } from '@tmagic/core';
22
22
 
23
23
  import { DRAG_EL_ID_PREFIX, Mode, StageDragStatus } from './const';
24
24
  import DragResizeHelper from './DragResizeHelper';
@@ -18,8 +18,8 @@
18
18
 
19
19
  import { EventEmitter } from 'events';
20
20
 
21
- import { Id } from '@tmagic/schema';
22
- import { getElById, getHost, injectStyle, isSameDomain } from '@tmagic/utils';
21
+ import type { Id } from '@tmagic/core';
22
+ import { getElById, getHost, injectStyle, isSameDomain } from '@tmagic/core';
23
23
 
24
24
  import { DEFAULT_ZOOM, RenderType } from './const';
25
25
  import style from './style.css?raw';
@@ -15,7 +15,7 @@
15
15
  * See the License for the specific language governing permissions and
16
16
  * limitations under the License.
17
17
  */
18
- import { getElById, getIdFromEl, guid, setIdToEl } from '@tmagic/utils';
18
+ import { getElById, getIdFromEl, guid, setIdToEl } from '@tmagic/core';
19
19
 
20
20
  import { Mode, ZIndex } from './const';
21
21
  import type { TargetElement as ShadowElement, TargetShadowConfig, UpdateDragEl } from './types';
package/src/types.ts CHANGED
@@ -19,8 +19,8 @@
19
19
  import type { GuidesOptions } from '@scena/guides';
20
20
  import type { MoveableOptions, OnDragStart } from 'moveable';
21
21
 
22
+ import type { Id, MApp, MContainer, MNode } from '@tmagic/core';
22
23
  import Core from '@tmagic/core';
23
- import type { Id, MApp, MContainer, MNode } from '@tmagic/schema';
24
24
 
25
25
  import { AbleActionEventType, ContainerHighlightType, GuidesType, RenderType, ZIndex } from './const';
26
26
  import DragResizeHelper from './DragResizeHelper';
package/src/util.ts CHANGED
@@ -15,7 +15,7 @@
15
15
  * See the License for the specific language governing permissions and
16
16
  * limitations under the License.
17
17
  */
18
- import { getIdFromEl, removeClassName } from '@tmagic/utils';
18
+ import { getIdFromEl, removeClassName } from '@tmagic/core';
19
19
 
20
20
  import { GHOST_EL_ID_PREFIX, Mode, SELECTED_CLASS, ZIndex } from './const';
21
21
  import type { Offset, SortEventData, TargetElement } from './types';
package/types/index.d.ts CHANGED
@@ -2,10 +2,9 @@ import * as _tmagic_editor from '@tmagic/editor';
2
2
  import EventEmitter, { EventEmitter as EventEmitter$1 } from 'events';
3
3
  import { OnResizeStart, OnResize, OnDragStart, OnDrag, OnRotateStart, OnRotate, OnScaleStart, OnScale, OnResizeGroupStart, OnResizeGroup, OnDragGroupStart, OnDragGroup, MoveableOptions, Renderer, MoveableManagerInterface } from 'moveable';
4
4
  export * from 'moveable';
5
- import { Id, MApp, MNode, MContainer } from '@tmagic/schema';
5
+ import Core, { Id, MApp, MNode, MContainer } from '@tmagic/core';
6
6
  import Guides, { GuidesOptions } from '@scena/guides';
7
7
  export { GuidesOptions } from '@scena/guides';
8
- import Core from '@tmagic/core';
9
8
  import MoveableHelper from 'moveable-helper';
10
9
 
11
10
  /** 流式布局下拖动时需要clone一个镜像节点,镜像节点的id前缀 */