@tmagic/editor 1.1.0-beta.0 → 1.1.0-beta.1

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,8 +1,8 @@
1
1
  (function (global, factory) {
2
- typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('vue'), require('serialize-javascript'), require('@element-plus/icons'), require('lodash-es'), require('monaco-editor'), require('@tmagic/stage'), require('@tmagic/schema'), require('@tmagic/utils'), require('events'), require('@tmagic/core'), require('gesto'), require('element-plus'), require('keycon')) :
3
- typeof define === 'function' && define.amd ? define(['exports', 'vue', 'serialize-javascript', '@element-plus/icons', 'lodash-es', 'monaco-editor', '@tmagic/stage', '@tmagic/schema', '@tmagic/utils', 'events', '@tmagic/core', 'gesto', 'element-plus', 'keycon'], factory) :
4
- (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.TMagicEditor = {}, global.Vue, global.serialize, global.icons, global.lodashEs, global.monaco, global.StageCore, global.schema, global.utils, global.events, global.core, global.Gesto, global.ElementPlus, global.KeyController));
5
- })(this, (function (exports, vue, serialize, icons, lodashEs, monaco, StageCore, schema, utils, events, core, Gesto, elementPlus, KeyController) { 'use strict';
2
+ typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('vue'), require('serialize-javascript'), require('@element-plus/icons-vue'), require('lodash-es'), require('monaco-editor'), require('@tmagic/stage'), require('@tmagic/schema'), require('@tmagic/utils'), require('events'), require('@tmagic/core'), require('gesto'), require('element-plus'), require('keycon')) :
3
+ typeof define === 'function' && define.amd ? define(['exports', 'vue', 'serialize-javascript', '@element-plus/icons-vue', 'lodash-es', 'monaco-editor', '@tmagic/stage', '@tmagic/schema', '@tmagic/utils', 'events', '@tmagic/core', 'gesto', 'element-plus', 'keycon'], factory) :
4
+ (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.TMagicEditor = {}, global.Vue, global.serialize, global.iconsVue, global.lodashEs, global.monaco, global.StageCore, global.schema, global.utils, global.events, global.core, global.Gesto, global.ElementPlus, global.KeyController));
5
+ })(this, (function (exports, vue, serialize, iconsVue, lodashEs, monaco, StageCore, schema, utils, events, core, Gesto, elementPlus, KeyController) { 'use strict';
6
6
 
7
7
  function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
8
8
 
@@ -179,9 +179,9 @@
179
179
  }
180
180
  };
181
181
  return {
182
- Delete: vue.markRaw(icons.Delete),
183
- Pointer: vue.markRaw(icons.Pointer),
184
- Close: vue.markRaw(icons.Close),
182
+ Delete: vue.markRaw(iconsVue.Delete),
183
+ Pointer: vue.markRaw(iconsVue.Pointer),
184
+ Close: vue.markRaw(iconsVue.Close),
185
185
  val,
186
186
  uiSelectMode,
187
187
  toName: vue.computed(() => {
@@ -1643,7 +1643,7 @@
1643
1643
  };
1644
1644
 
1645
1645
  const _sfc_main$i = vue.defineComponent({
1646
- components: { Plus: icons.Plus },
1646
+ components: { Plus: iconsVue.Plus },
1647
1647
  setup() {
1648
1648
  const services = vue.inject("services");
1649
1649
  return {
@@ -1823,7 +1823,7 @@
1823
1823
 
1824
1824
  const _sfc_main$f = vue.defineComponent({
1825
1825
  name: "m-icon",
1826
- components: { Edit: icons.Edit },
1826
+ components: { Edit: iconsVue.Edit },
1827
1827
  props: {
1828
1828
  icon: {
1829
1829
  type: [String, Object]
@@ -1860,7 +1860,7 @@
1860
1860
  var MIcon = /* @__PURE__ */ _export_sfc(_sfc_main$f, [["render", _sfc_render$f]]);
1861
1861
 
1862
1862
  const _sfc_main$e = vue.defineComponent({
1863
- components: { MIcon, ArrowDown: icons.ArrowDown },
1863
+ components: { MIcon, ArrowDown: iconsVue.ArrowDown },
1864
1864
  props: {
1865
1865
  data: {
1866
1866
  type: [Object, String],
@@ -1899,7 +1899,7 @@
1899
1899
  case "delete":
1900
1900
  return {
1901
1901
  type: "button",
1902
- icon: vue.markRaw(icons.Delete),
1902
+ icon: vue.markRaw(iconsVue.Delete),
1903
1903
  tooltip: "\u522A\u9664",
1904
1904
  disabled: () => services?.editorService.get("node")?.type === schema.NodeType.PAGE,
1905
1905
  handler: () => services?.editorService.remove(services?.editorService.get("node"))
@@ -1907,7 +1907,7 @@
1907
1907
  case "undo":
1908
1908
  return {
1909
1909
  type: "button",
1910
- icon: vue.markRaw(icons.Back),
1910
+ icon: vue.markRaw(iconsVue.Back),
1911
1911
  tooltip: "\u540E\u9000",
1912
1912
  disabled: () => !services?.historyService.state.canUndo,
1913
1913
  handler: () => services?.editorService.undo()
@@ -1915,7 +1915,7 @@
1915
1915
  case "redo":
1916
1916
  return {
1917
1917
  type: "button",
1918
- icon: vue.markRaw(icons.Right),
1918
+ icon: vue.markRaw(iconsVue.Right),
1919
1919
  tooltip: "\u524D\u8FDB",
1920
1920
  disabled: () => !services?.historyService.state.canRedo,
1921
1921
  handler: () => services?.editorService.redo()
@@ -1923,28 +1923,28 @@
1923
1923
  case "zoom-in":
1924
1924
  return {
1925
1925
  type: "button",
1926
- icon: vue.markRaw(icons.ZoomIn),
1926
+ icon: vue.markRaw(iconsVue.ZoomIn),
1927
1927
  tooltip: "\u653E\u5927",
1928
1928
  handler: zoomInHandler
1929
1929
  };
1930
1930
  case "zoom-out":
1931
1931
  return {
1932
1932
  type: "button",
1933
- icon: vue.markRaw(icons.ZoomOut),
1933
+ icon: vue.markRaw(iconsVue.ZoomOut),
1934
1934
  tooltip: "\u7E2E\u5C0F",
1935
1935
  handler: zoomOutHandler
1936
1936
  };
1937
1937
  case "rule":
1938
1938
  return {
1939
1939
  type: "button",
1940
- icon: vue.markRaw(icons.ScaleToOriginal),
1940
+ icon: vue.markRaw(iconsVue.ScaleToOriginal),
1941
1941
  tooltip: showRule.value ? "\u9690\u85CF\u6807\u5C3A" : "\u663E\u793A\u6807\u5C3A",
1942
1942
  handler: () => uiService?.set("showRule", !showRule.value)
1943
1943
  };
1944
1944
  case "guides":
1945
1945
  return {
1946
1946
  type: "button",
1947
- icon: vue.markRaw(icons.Grid),
1947
+ icon: vue.markRaw(iconsVue.Grid),
1948
1948
  tooltip: showGuides.value ? "\u9690\u85CF\u53C2\u8003\u7EBF" : "\u663E\u793A\u53C2\u8003\u7EBF",
1949
1949
  handler: () => uiService?.set("showGuides", !showGuides.value)
1950
1950
  };
@@ -1973,8 +1973,8 @@
1973
1973
  }
1974
1974
  };
1975
1975
  return {
1976
- ZoomIn: vue.markRaw(icons.ZoomIn),
1977
- ZoomOut: vue.markRaw(icons.ZoomOut),
1976
+ ZoomIn: vue.markRaw(iconsVue.ZoomIn),
1977
+ ZoomOut: vue.markRaw(iconsVue.ZoomOut),
1978
1978
  item,
1979
1979
  zoom,
1980
1980
  disabled,
@@ -2551,7 +2551,7 @@
2551
2551
  {
2552
2552
  text: "\u6807\u7B7E\u9875",
2553
2553
  type: "button",
2554
- icon: icons.Files,
2554
+ icon: iconsVue.Files,
2555
2555
  handler: () => {
2556
2556
  services?.editorService.add({
2557
2557
  type: "tab-pane"
@@ -2576,14 +2576,14 @@
2576
2576
  {
2577
2577
  type: "button",
2578
2578
  text: "\u65B0\u589E",
2579
- icon: vue.markRaw(icons.Plus),
2579
+ icon: vue.markRaw(iconsVue.Plus),
2580
2580
  display: () => node.value?.items,
2581
2581
  items: getSubMenuData.value
2582
2582
  },
2583
2583
  {
2584
2584
  type: "button",
2585
2585
  text: "\u590D\u5236",
2586
- icon: vue.markRaw(icons.DocumentCopy),
2586
+ icon: vue.markRaw(iconsVue.DocumentCopy),
2587
2587
  display: () => !isRoot.value,
2588
2588
  handler: () => {
2589
2589
  node.value && services?.editorService.copy(node.value);
@@ -2592,7 +2592,7 @@
2592
2592
  {
2593
2593
  type: "button",
2594
2594
  text: "\u5220\u9664",
2595
- icon: vue.markRaw(icons.Delete),
2595
+ icon: vue.markRaw(iconsVue.Delete),
2596
2596
  display: () => !isRoot.value && !isPage.value,
2597
2597
  handler: () => {
2598
2598
  node.value && services?.editorService.remove(node.value);
@@ -2835,7 +2835,7 @@
2835
2835
  case "component-list":
2836
2836
  return {
2837
2837
  type: "component",
2838
- icon: icons.Coin,
2838
+ icon: iconsVue.Coin,
2839
2839
  text: "\u7EC4\u4EF6",
2840
2840
  component: ComponentListPanel,
2841
2841
  slots: {}
@@ -2843,7 +2843,7 @@
2843
2843
  case "layer":
2844
2844
  return {
2845
2845
  type: "component",
2846
- icon: icons.Files,
2846
+ icon: iconsVue.Files,
2847
2847
  text: "\u5DF2\u9009\u7EC4\u4EF6",
2848
2848
  component: LayerPanel,
2849
2849
  slots: {}
@@ -3028,14 +3028,14 @@
3028
3028
  };
3029
3029
  };
3030
3030
  const _sfc_main$5 = vue.defineComponent({
3031
- components: { ArrowLeftBold: icons.ArrowLeftBold, ArrowRightBold: icons.ArrowRightBold, CaretBottom: icons.CaretBottom, Plus: icons.Plus, ToolButton },
3031
+ components: { ArrowLeftBold: iconsVue.ArrowLeftBold, ArrowRightBold: iconsVue.ArrowRightBold, CaretBottom: iconsVue.CaretBottom, Plus: iconsVue.Plus, ToolButton },
3032
3032
  setup() {
3033
3033
  const services = vue.inject("services");
3034
3034
  const editorService = services?.editorService;
3035
3035
  const root = vue.computed(() => editorService?.get("root"));
3036
3036
  return {
3037
- Delete: vue.markRaw(icons.Delete),
3038
- DocumentCopy: vue.markRaw(icons.DocumentCopy),
3037
+ Delete: vue.markRaw(iconsVue.Delete),
3038
+ DocumentCopy: vue.markRaw(iconsVue.DocumentCopy),
3039
3039
  ...useScroll(root),
3040
3040
  root,
3041
3041
  page: vue.computed(() => editorService?.get("page")),
@@ -3440,7 +3440,7 @@
3440
3440
  {
3441
3441
  type: "button",
3442
3442
  text: "\u590D\u5236",
3443
- icon: vue.markRaw(icons.DocumentCopy),
3443
+ icon: vue.markRaw(iconsVue.DocumentCopy),
3444
3444
  handler: () => {
3445
3445
  node.value && editorService?.copy(node.value);
3446
3446
  canPaste.value = true;
@@ -3473,7 +3473,7 @@
3473
3473
  {
3474
3474
  type: "button",
3475
3475
  text: "\u4E0A\u79FB\u4E00\u5C42",
3476
- icon: vue.markRaw(icons.Top),
3476
+ icon: vue.markRaw(iconsVue.Top),
3477
3477
  display: () => !isPage.value,
3478
3478
  handler: () => {
3479
3479
  editorService?.moveLayer(1);
@@ -3482,7 +3482,7 @@
3482
3482
  {
3483
3483
  type: "button",
3484
3484
  text: "\u4E0B\u79FB\u4E00\u5C42",
3485
- icon: vue.markRaw(icons.Bottom),
3485
+ icon: vue.markRaw(iconsVue.Bottom),
3486
3486
  display: () => !isPage.value,
3487
3487
  handler: () => {
3488
3488
  editorService?.moveLayer(-1);
@@ -3512,7 +3512,7 @@
3512
3512
  {
3513
3513
  type: "button",
3514
3514
  text: "\u5220\u9664",
3515
- icon: icons.Delete,
3515
+ icon: iconsVue.Delete,
3516
3516
  display: () => !isPage.value,
3517
3517
  handler: () => {
3518
3518
  node.value && editorService?.remove(node.value);