@zhangqingcq/vgce 0.0.13 → 0.0.15

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.
Files changed (135) hide show
  1. package/README.md +16 -2
  2. package/dist/style.css +1 -1
  3. package/dist/vgce.js +28 -34
  4. package/dist/vgce.umd.cjs +5 -5
  5. package/package.json +3 -2
  6. package/src/App.vue +11 -0
  7. package/src/assets/base.less +49 -0
  8. package/src/assets/icons/add.svg +1 -0
  9. package/src/assets/icons/delete.svg +12 -0
  10. package/src/assets/icons/export.svg +1 -0
  11. package/src/assets/icons/group.svg +13 -0
  12. package/src/assets/icons/import.svg +1 -0
  13. package/src/assets/icons/lock.svg +7 -0
  14. package/src/assets/icons/menu-fold.svg +9 -0
  15. package/src/assets/icons/menu-unfold.svg +9 -0
  16. package/src/assets/icons/preview.svg +6 -0
  17. package/src/assets/icons/redo.svg +8 -0
  18. package/src/assets/icons/return.svg +8 -0
  19. package/src/assets/icons/rotate.svg +1 -0
  20. package/src/assets/icons/save.svg +9 -0
  21. package/src/assets/icons/setting.svg +6 -0
  22. package/src/assets/icons/undo.svg +7 -0
  23. package/src/assets/icons/ungroup.svg +16 -0
  24. package/src/assets/icons/unlock.svg +7 -0
  25. package/src/assets/main.less +6 -0
  26. package/src/assets/svgs/alternator.svg +8 -0
  27. package/src/assets/svgs/bot-12.svg +1 -0
  28. package/src/assets/svgs/bot-2.svg +1 -0
  29. package/src/assets/svgs/bot-3.svg +1 -0
  30. package/src/assets/svgs/bot-7.svg +1 -0
  31. package/src/assets/svgs/bot-9.svg +94 -0
  32. package/src/assets/svgs/car.svg +1 -0
  33. package/src/assets/svgs/circuit-breaker.svg +11 -0
  34. package/src/assets/svgs/clock-a.svg +23 -0
  35. package/src/assets/svgs/common-table.svg +7 -0
  36. package/src/assets/svgs/el-button.svg +10 -0
  37. package/src/assets/svgs/el-tag.svg +13 -0
  38. package/src/assets/svgs/hospital.svg +1 -0
  39. package/src/assets/svgs/house.svg +1 -0
  40. package/src/assets/svgs/light.svg +24 -0
  41. package/src/assets/svgs/now-time.svg +9 -0
  42. package/src/assets/svgs/package.svg +1 -0
  43. package/src/assets/svgs/pie-charts.svg +10 -0
  44. package/src/assets/svgs/progress-a.svg +1 -0
  45. package/src/assets/svgs/reservoir.svg +10 -0
  46. package/src/assets/svgs/svg-text.svg +5 -0
  47. package/src/assets/svgs/switch-a.svg +5 -0
  48. package/src/assets/svgs/traction-transformer.svg +11 -0
  49. package/src/components/ace-edit/index.ts +27 -0
  50. package/src/components/config/index.ts +450 -0
  51. package/src/components/config/types.ts +25 -0
  52. package/src/components/svg-analysis/index.vue +11 -0
  53. package/src/components/svg-editor/center-panel/index.vue +867 -0
  54. package/src/components/svg-editor/center-panel/types.ts +11 -0
  55. package/src/components/svg-editor/component-tree/index.vue +33 -0
  56. package/src/components/svg-editor/connection-line/index.vue +125 -0
  57. package/src/components/svg-editor/connection-panel/index.vue +198 -0
  58. package/src/components/svg-editor/export-json/index.vue +37 -0
  59. package/src/components/svg-editor/handle-panel/index.vue +342 -0
  60. package/src/components/svg-editor/import-json/index.vue +37 -0
  61. package/src/components/svg-editor/index.vue +280 -0
  62. package/src/components/svg-editor/left-panel/index.vue +83 -0
  63. package/src/components/svg-editor/right-panel/code-edit-modal.vue +50 -0
  64. package/src/components/svg-editor/right-panel/common-animate.vue +96 -0
  65. package/src/components/svg-editor/right-panel/condition.vue +101 -0
  66. package/src/components/svg-editor/right-panel/dynamic-el-form-item.vue +97 -0
  67. package/src/components/svg-editor/right-panel/index.vue +304 -0
  68. package/src/components/svg-editor/right-panel/list.vue +86 -0
  69. package/src/components/svg-editor/top-panel/index.vue +139 -0
  70. package/src/components/svg-editor/types.ts +22 -0
  71. package/src/components/svg-viewer/index.vue +340 -0
  72. package/src/components/vue3-ruler-tool/index.vue +506 -0
  73. package/src/config/files/clock-a.vue +66 -0
  74. package/src/config/files/common-table.vue +49 -0
  75. package/src/config/files/light-a.vue +72 -0
  76. package/src/config/files/now-time.vue +53 -0
  77. package/src/config/files/pie-charts.vue +72 -0
  78. package/src/config/files/progress.vue +40 -0
  79. package/src/config/files/svg-text.vue +39 -0
  80. package/src/config/files/switch-a.vue +45 -0
  81. package/src/config/index.ts +28 -0
  82. package/src/config/svg/animation/index.ts +8 -0
  83. package/src/config/svg/animation/reservoir.ts +32 -0
  84. package/src/config/svg/custom/clock-a.ts +23 -0
  85. package/src/config/svg/custom/index.ts +11 -0
  86. package/src/config/svg/custom/light.ts +29 -0
  87. package/src/config/svg/custom/svg-text.ts +54 -0
  88. package/src/config/svg/custom/switch-a.ts +29 -0
  89. package/src/config/svg/index.ts +12 -0
  90. package/src/config/svg/stateful/circuit-breaker.ts +38 -0
  91. package/src/config/svg/stateful/index.ts +8 -0
  92. package/src/config/svg/stateless/alternator.ts +28 -0
  93. package/src/config/svg/stateless/bot-12.ts +22 -0
  94. package/src/config/svg/stateless/bot-2.ts +22 -0
  95. package/src/config/svg/stateless/bot-3.ts +22 -0
  96. package/src/config/svg/stateless/bot-7.ts +22 -0
  97. package/src/config/svg/stateless/bot-9.ts +22 -0
  98. package/src/config/svg/stateless/car.ts +22 -0
  99. package/src/config/svg/stateless/hospital.ts +22 -0
  100. package/src/config/svg/stateless/house.ts +22 -0
  101. package/src/config/svg/stateless/index.ts +30 -0
  102. package/src/config/svg/stateless/package.ts +22 -0
  103. package/src/config/svg/stateless/traction-transformer.ts +28 -0
  104. package/src/config/types.ts +126 -0
  105. package/src/config/vue/component/button.ts +57 -0
  106. package/src/config/vue/component/common-table.ts +124 -0
  107. package/src/config/vue/component/index.ts +13 -0
  108. package/src/config/vue/component/now-time.ts +29 -0
  109. package/src/config/vue/component/progress.ts +29 -0
  110. package/src/config/vue/component/tag.ts +46 -0
  111. package/src/config/vue/echarts/index.ts +8 -0
  112. package/src/config/vue/echarts/pie-charts.ts +60 -0
  113. package/src/config/vue/index.ts +5 -0
  114. package/src/hooks.ts +47 -0
  115. package/src/index.ts +14 -0
  116. package/src/main.ts +15 -0
  117. package/src/router.ts +24 -0
  118. package/src/stores/config/index.ts +44 -0
  119. package/src/stores/config/types.ts +27 -0
  120. package/src/stores/global/index.ts +109 -0
  121. package/src/stores/global/types.ts +115 -0
  122. package/src/stores/main.ts +10 -0
  123. package/src/stores/svg-edit-layout/index.ts +17 -0
  124. package/src/stores/svg-edit-layout/types.ts +8 -0
  125. package/src/stores/system/index.ts +174 -0
  126. package/src/stores/system/types.ts +43 -0
  127. package/src/utils/fetch.ts +351 -0
  128. package/src/utils/file-read-write.ts +26 -0
  129. package/src/utils/index.ts +397 -0
  130. package/src/utils/mqtt-net.ts +48 -0
  131. package/src/utils/proxy.ts +7 -0
  132. package/src/utils/scale-core.ts +214 -0
  133. package/src/utils/types.ts +13 -0
  134. package/src/views/EditorS.vue +18 -0
  135. package/src/views/Preview.vue +12 -0
package/dist/vgce.js CHANGED
@@ -18860,7 +18860,7 @@ const useConfigStore = defineStore("config-store", {
18860
18860
  groupType: "custom_svg_group",
18861
18861
  title: "SVG组件",
18862
18862
  list: [svg_text, switch_a, light_a, clock_a]
18863
- }, svg_config_center = Object.seal([
18863
+ }, svg_config = Object.seal([
18864
18864
  stateless_group,
18865
18865
  stateful_group,
18866
18866
  animation_group,
@@ -19194,7 +19194,7 @@ const useConfigStore = defineStore("config-store", {
19194
19194
  groupType: "echarts",
19195
19195
  title: "图表",
19196
19196
  list: [pie_charts]
19197
- }, vue_config_center = Object.seal([components, echarts_group]), _sfc_main$q = /* @__PURE__ */ defineComponent({
19197
+ }, vue_config = Object.seal([components, echarts_group]), _sfc_main$q = /* @__PURE__ */ defineComponent({
19198
19198
  __name: "progress",
19199
19199
  props: {
19200
19200
  percentage: { default: 10 }
@@ -37709,12 +37709,12 @@ const _sfc_main$l = /* @__PURE__ */ defineComponent({
37709
37709
  autoresize: ""
37710
37710
  }, null, 8, ["option"]));
37711
37711
  }
37712
- }), pieCharts_vue_vue_type_style_index_0_scoped_702730c3_lang = "", _export_sfc = (i, n) => {
37712
+ }), pieCharts_vue_vue_type_style_index_0_scoped_2dc3e6cb_lang = "", _export_sfc = (i, n) => {
37713
37713
  const r = i.__vccOpts || i;
37714
37714
  for (const [g, k] of n)
37715
37715
  r[g] = k;
37716
37716
  return r;
37717
- }, PieCharts = /* @__PURE__ */ _export_sfc(_sfc_main$l, [["__scopeId", "data-v-702730c3"]]), _hoisted_1$g = ["id"], _hoisted_2$e = ["id"], _hoisted_3$c = ["fill"], _hoisted_4$9 = ["fill"], _hoisted_5$8 = ["fill"], _hoisted_6$5 = /* @__PURE__ */ createElementVNode("path", {
37717
+ }, PieCharts = /* @__PURE__ */ _export_sfc(_sfc_main$l, [["__scopeId", "data-v-2dc3e6cb"]]), _hoisted_1$g = ["id"], _hoisted_2$e = ["id"], _hoisted_3$c = ["fill"], _hoisted_4$9 = ["fill"], _hoisted_5$8 = ["fill"], _hoisted_6$5 = /* @__PURE__ */ createElementVNode("path", {
37718
37718
  d: "M375.466667 709.214815l-25.6 137.481481c0 2.844444 1.896296 5.688889 7.585185 10.42963l65.422222 54.992593c5.688889 4.740741 15.17037 8.533333 23.703704 10.429629l36.029629-193.422222-107.14074-19.911111z",
37719
37719
  fill: "#2D4375"
37720
37720
  }, null, -1), _hoisted_7$5 = /* @__PURE__ */ createElementVNode("path", {
@@ -37886,11 +37886,11 @@ const _sfc_main$l = /* @__PURE__ */ defineComponent({
37886
37886
  "now-time": _sfc_main$m,
37887
37887
  "light-a": _sfc_main$k,
37888
37888
  "clock-a": _sfc_main$j
37889
- }, configCenter = [...svg_config_center, ...vue_config_center];
37889
+ }, config = [...svg_config, ...vue_config];
37890
37890
  var EGlobalStoreIntention = /* @__PURE__ */ ((i) => (i.None = "None", i.Create = "Create", i.Move = "Move", i.MoveCanvas = "MoveCanvas", i.Select = "Select", i.Zoom = "Zoom", i.Rotate = "Rotate", i.Connection = "Connection", i.SetConnectionLineNode = "SetConnectionLineNode", i.ContextMenu = "ContextMenu", i))(EGlobalStoreIntention || {}), EMouseInfoState = /* @__PURE__ */ ((i) => (i.Down = "Down", i.Up = "Up", i))(EMouseInfoState || {}), EScaleInfoType = /* @__PURE__ */ ((i) => (i.None = "", i.TopLeft = "TopLeft", i.TopCenter = "TopCenter", i.TopRight = "TopRight", i.Left = "Left", i.Right = "Right", i.BottomLeft = "BottomLeft", i.BottomCenter = "BottomCenter", i.BottomRight = "BottomRight", i))(EScaleInfoType || {});
37891
37891
  const useGlobalStore = defineStore("global-store", {
37892
37892
  state: () => ({
37893
- config_center: configCenter,
37893
+ config_center: config,
37894
37894
  intention: EGlobalStoreIntention.None,
37895
37895
  create_svg_info: null,
37896
37896
  done_json: [],
@@ -38094,15 +38094,8 @@ const useEditPrivateStore = defineStore("edit-private-store", {
38094
38094
  }, _hoisted_1$e = { "aria-hidden": "true" }, _hoisted_2$c = ["xlink:href"], _sfc_main$i = /* @__PURE__ */ defineComponent({
38095
38095
  __name: "index",
38096
38096
  props: {
38097
- name: {
38098
- type: String,
38099
- required: !0
38100
- },
38101
- props: {
38102
- type: Object,
38103
- default: () => {
38104
- }
38105
- }
38097
+ name: {},
38098
+ props: { default: () => ({}) }
38106
38099
  },
38107
38100
  setup(i) {
38108
38101
  const n = i, r = computed$1(() => `#svg-${n.name}`);
@@ -38288,11 +38281,11 @@ const _withScopeId$3 = (i) => (pushScopeId("data-v-b0ad1445"), i = i(), popScope
38288
38281
  }), index_vue_vue_type_style_index_0_scoped_b0ad1445_lang = "", TopPanel = /* @__PURE__ */ _export_sfc(_sfc_main$h, [["__scopeId", "data-v-b0ad1445"]]), _hoisted_1$c = { style: { "font-weight": "bold" } }, _hoisted_2$a = { class: "component-group flex flex-wrap" }, _hoisted_3$9 = ["onDragstart", "title"], _sfc_main$g = /* @__PURE__ */ defineComponent({
38289
38282
  __name: "index",
38290
38283
  props: {
38291
- customToolBar: {}
38284
+ customToolbar: {}
38292
38285
  },
38293
38286
  setup(i) {
38294
38287
  const n = i, r = useGlobalStore(pinia), g = ref(
38295
- n.customToolBar && Object.keys(n.customToolBar).length > 0 ? n.customToolBar : r.config_center
38288
+ n.customToolbar && Object.keys(n.customToolbar).length > 0 ? n.customToolbar : r.config_center
38296
38289
  ), k = ref([
38297
38290
  "stateful",
38298
38291
  "stateless",
@@ -38355,7 +38348,7 @@ const _withScopeId$3 = (i) => (pushScopeId("data-v-b0ad1445"), i = i(), popScope
38355
38348
  }, 8, ["modelValue"])
38356
38349
  ]));
38357
38350
  }
38358
- }), index_vue_vue_type_style_index_0_scoped_e50f27fa_lang = "", LeftPanel = /* @__PURE__ */ _export_sfc(_sfc_main$g, [["__scopeId", "data-v-e50f27fa"]]), calculateLeftTop = (i, n, r) => {
38351
+ }), index_vue_vue_type_style_index_0_scoped_e00305dc_lang = "", LeftPanel = /* @__PURE__ */ _export_sfc(_sfc_main$g, [["__scopeId", "data-v-e00305dc"]]), calculateLeftTop = (i, n, r) => {
38359
38352
  const g = getCenterPoint(i, n), k = calculateRotatedPointCoordinate(i, g, -r), V = calculateRotatedPointCoordinate(n, g, -r);
38360
38353
  return {
38361
38354
  width: V.x - k.x,
@@ -38907,7 +38900,7 @@ const _withScopeId$3 = (i) => (pushScopeId("data-v-b0ad1445"), i = i(), popScope
38907
38900
  ]);
38908
38901
  };
38909
38902
  }
38910
- }), _withScopeId$2 = (i) => (pushScopeId("data-v-cc758a32"), i = i(), popScopeId(), i), _hoisted_1$8 = /* @__PURE__ */ _withScopeId$2(() => /* @__PURE__ */ createElementVNode("defs", null, [
38903
+ }), _withScopeId$2 = (i) => (pushScopeId("data-v-b0d244b1"), i = i(), popScopeId(), i), _hoisted_1$8 = /* @__PURE__ */ _withScopeId$2(() => /* @__PURE__ */ createElementVNode("defs", null, [
38911
38904
  /* @__PURE__ */ createElementVNode("pattern", {
38912
38905
  id: "pattern_grid",
38913
38906
  patternUnits: "userSpaceOnUse",
@@ -38933,7 +38926,7 @@ const _withScopeId$3 = (i) => (pushScopeId("data-v-b0ad1445"), i = i(), popScope
38933
38926
  __name: "index",
38934
38927
  setup(i) {
38935
38928
  useCssVars((Ue) => ({
38936
- "4438ab04": Ce.value
38929
+ "36a85969": Ce.value
38937
38930
  }));
38938
38931
  const n = getCurrentInstance();
38939
38932
  Object.keys(vueComp).forEach((Ue) => {
@@ -39344,7 +39337,7 @@ const _withScopeId$3 = (i) => (pushScopeId("data-v-b0ad1445"), i = i(), popScope
39344
39337
  ])
39345
39338
  ], 544));
39346
39339
  }
39347
- }), index_vue_vue_type_style_index_0_scoped_cc758a32_lang = "", CenterPanel = /* @__PURE__ */ _export_sfc(_sfc_main$c, [["__scopeId", "data-v-cc758a32"]]);
39340
+ }), index_vue_vue_type_style_index_0_scoped_b0d244b1_lang = "", CenterPanel = /* @__PURE__ */ _export_sfc(_sfc_main$c, [["__scopeId", "data-v-b0d244b1"]]);
39348
39341
  var ace$2 = { exports: {} };
39349
39342
  (function(i, n) {
39350
39343
  (function() {
@@ -52681,7 +52674,7 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
52681
52674
  }, 1032, ["label"])) : createCommentVNode("", !0)
52682
52675
  ]))), 128));
52683
52676
  }
52684
- }), dynamicElFormItem_vue_vue_type_style_index_0_scoped_fdc5f310_lang = "", dynamicElFormItem_vue_vue_type_style_index_1_lang = "", DynamicElFormItem = /* @__PURE__ */ _export_sfc(_sfc_main$a, [["__scopeId", "data-v-fdc5f310"]]), _hoisted_1$6 = { style: { height: "100%" } }, _hoisted_2$4 = { class: "flex flex-wrap" }, _hoisted_3$3 = ["onMouseenter", "onClick"], _sfc_main$9 = /* @__PURE__ */ defineComponent({
52677
+ }), dynamicElFormItem_vue_vue_type_style_index_0_scoped_a1ba665e_lang = "", dynamicElFormItem_vue_vue_type_style_index_1_lang = "", DynamicElFormItem = /* @__PURE__ */ _export_sfc(_sfc_main$a, [["__scopeId", "data-v-a1ba665e"]]), _hoisted_1$6 = { style: { height: "100%" } }, _hoisted_2$4 = { class: "flex flex-wrap" }, _hoisted_3$3 = ["onMouseenter", "onClick"], _sfc_main$9 = /* @__PURE__ */ defineComponent({
52685
52678
  __name: "common-animate",
52686
52679
  props: {
52687
52680
  val: {}
@@ -52796,7 +52789,7 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
52796
52789
  "current-node-key": r.value
52797
52790
  }, null, 8, ["data", "current-node-key"]));
52798
52791
  }
52799
- }), _withScopeId$1 = (i) => (pushScopeId("data-v-80b9cb5a"), i = i(), popScopeId(), i), _hoisted_1$5 = { class: "wall-l" }, _hoisted_2$3 = { class: "head-l" }, _hoisted_3$2 = /* @__PURE__ */ _withScopeId$1(() => /* @__PURE__ */ createElementVNode("span", null, "key", -1)), _hoisted_4$1 = /* @__PURE__ */ _withScopeId$1(() => /* @__PURE__ */ createElementVNode("span", null, "value", -1)), _hoisted_5$1 = { class: "row-l" }, _sfc_main$7 = /* @__PURE__ */ defineComponent({
52792
+ }), _withScopeId$1 = (i) => (pushScopeId("data-v-8ce989ed"), i = i(), popScopeId(), i), _hoisted_1$5 = { class: "wall-l" }, _hoisted_2$3 = { class: "head-l" }, _hoisted_3$2 = /* @__PURE__ */ _withScopeId$1(() => /* @__PURE__ */ createElementVNode("span", null, "key", -1)), _hoisted_4$1 = /* @__PURE__ */ _withScopeId$1(() => /* @__PURE__ */ createElementVNode("span", null, "value", -1)), _hoisted_5$1 = { class: "row-l" }, _sfc_main$7 = /* @__PURE__ */ defineComponent({
52800
52793
  __name: "list",
52801
52794
  props: {
52802
52795
  modelValue: { default: () => [
@@ -52866,7 +52859,7 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
52866
52859
  ]))), 256))
52867
52860
  ]));
52868
52861
  }
52869
- }), list_vue_vue_type_style_index_0_scoped_80b9cb5a_lang = "", List = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["__scopeId", "data-v-80b9cb5a"]]), _hoisted_1$4 = { class: "c-wall-d" }, _sfc_main$6 = /* @__PURE__ */ defineComponent({
52862
+ }), list_vue_vue_type_style_index_0_scoped_8ce989ed_lang = "", List = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["__scopeId", "data-v-8ce989ed"]]), _hoisted_1$4 = { class: "c-wall-d" }, _sfc_main$6 = /* @__PURE__ */ defineComponent({
52870
52863
  __name: "condition",
52871
52864
  props: {
52872
52865
  modelValue: { default: () => ({ type: EConditionType.None }) }
@@ -53013,7 +53006,7 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
53013
53006
  ]);
53014
53007
  };
53015
53008
  }
53016
- }), condition_vue_vue_type_style_index_0_scoped_78b20d94_lang = "", Condition = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["__scopeId", "data-v-78b20d94"]]), _withScopeId = (i) => (pushScopeId("data-v-2e831e17"), i = i(), popScopeId(), i), _hoisted_1$3 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ createElementVNode("span", { style: { "font-weight": "bold" } }, "MQTT", -1)), _hoisted_2$2 = { class: "events-title" }, _hoisted_3$1 = { key: 1 }, _sfc_main$5 = /* @__PURE__ */ defineComponent({
53009
+ }), condition_vue_vue_type_style_index_0_scoped_a72b6fe7_lang = "", Condition = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["__scopeId", "data-v-a72b6fe7"]]), _withScopeId = (i) => (pushScopeId("data-v-bdbaeafd"), i = i(), popScopeId(), i), _hoisted_1$3 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ createElementVNode("span", { style: { "font-weight": "bold" } }, "MQTT", -1)), _hoisted_2$2 = { class: "events-title" }, _hoisted_3$1 = { key: 1 }, _sfc_main$5 = /* @__PURE__ */ defineComponent({
53017
53010
  __name: "index",
53018
53011
  setup(i) {
53019
53012
  const n = useConfigStore(pinia), r = useGlobalStore(pinia), g = ref("page"), k = ref("style"), V = (ae, le) => {
@@ -53736,7 +53729,7 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
53736
53729
  _: 1
53737
53730
  }, 8, ["modelValue"])) : createCommentVNode("", !0);
53738
53731
  }
53739
- }), index_vue_vue_type_style_index_0_scoped_2e831e17_lang = "", index_vue_vue_type_style_index_1_lang = "", RightPanel = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["__scopeId", "data-v-2e831e17"]]), _sfc_main$4 = /* @__PURE__ */ defineComponent({
53732
+ }), index_vue_vue_type_style_index_0_scoped_bdbaeafd_lang = "", index_vue_vue_type_style_index_1_lang = "", RightPanel = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["__scopeId", "data-v-bdbaeafd"]]), _sfc_main$4 = /* @__PURE__ */ defineComponent({
53740
53733
  __name: "index",
53741
53734
  setup(i) {
53742
53735
  const n = ref(""), r = useGlobalStore(pinia), g = useSvgEditLayoutStore(pinia), k = useConfigStore(pinia);
@@ -54073,8 +54066,9 @@ function fileRead(i) {
54073
54066
  const _hoisted_1$1 = { class: "canvas-main-pc" }, _sfc_main$1 = /* @__PURE__ */ defineComponent({
54074
54067
  __name: "index",
54075
54068
  props: {
54076
- customToolBar: {},
54077
- data: {}
54069
+ customToolbar: {},
54070
+ data: {},
54071
+ saveFile: { type: Boolean, default: !1 }
54078
54072
  },
54079
54073
  emits: ["onReturn", "onPreview", "onSave"],
54080
54074
  setup(i, { expose: n, emit: r }) {
@@ -54102,11 +54096,11 @@ const _hoisted_1$1 = { class: "canvas-main-pc" }, _sfc_main$1 = /* @__PURE__ */
54102
54096
  });
54103
54097
  const { appContext: ue } = getCurrentInstance();
54104
54098
  function Ne(he) {
54105
- ElMessageBox.prompt("请输入文件名", "保存", { cancelButtonText: "取消", confirmButtonText: "保存" }, ue).then((pe) => {
54099
+ g.saveFile ? ElMessageBox.prompt("请输入文件名", "保存", { cancelButtonText: "取消", confirmButtonText: "保存" }, ue).then((pe) => {
54106
54100
  fileWrite(he, pe.value.trim()), r("onSave", he);
54107
54101
  }).catch((pe) => {
54108
54102
  console.log(pe);
54109
- });
54103
+ }) : r("onSave", he);
54110
54104
  }
54111
54105
  return (he, pe) => (openBlock(), createElementBlock("div", null, [
54112
54106
  createVNode$1(unref(ElContainer), null, {
@@ -54132,8 +54126,8 @@ const _hoisted_1$1 = { class: "canvas-main-pc" }, _sfc_main$1 = /* @__PURE__ */
54132
54126
  default: withCtx(() => [
54133
54127
  createVNode$1(LeftPanel, {
54134
54128
  class: "content-left",
54135
- "custom-tool-bar": g.customToolBar
54136
- }, null, 8, ["custom-tool-bar"])
54129
+ "custom-toolbar": g.customToolbar
54130
+ }, null, 8, ["custom-toolbar"])
54137
54131
  ]),
54138
54132
  _: 1
54139
54133
  })
@@ -54242,7 +54236,7 @@ const _hoisted_1$1 = { class: "canvas-main-pc" }, _sfc_main$1 = /* @__PURE__ */
54242
54236
  }, 8, ["modelValue"])
54243
54237
  ]));
54244
54238
  }
54245
- }), index_vue_vue_type_style_index_0_scoped_4da50b34_lang = "", index$1 = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-4da50b34"]]);
54239
+ }), index_vue_vue_type_style_index_0_scoped_acde8f01_lang = "", index$1 = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-acde8f01"]]);
54246
54240
  function commonjsRequire(i) {
54247
54241
  throw new Error('Could not dynamically require "' + i + '". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.');
54248
54242
  }
@@ -63375,7 +63369,7 @@ const sub = (i, n, r, g, k) => {
63375
63369
  ], 4))
63376
63370
  ], 32));
63377
63371
  }
63378
- }), index_vue_vue_type_style_index_0_scoped_aefb5edf_lang = "", index = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-aefb5edf"]]);
63372
+ }), index_vue_vue_type_style_index_0_scoped_a4451d40_lang = "", index = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-a4451d40"]]);
63379
63373
  export {
63380
63374
  index$1 as SvgEditor,
63381
63375
  index as SvgViewer