@zhangqingcq/vgce 0.0.14 → 0.0.15

Sign up to get free protection for your applications and to get access to all the features.
Files changed (134) hide show
  1. package/README.md +3 -1
  2. package/dist/vgce.js +5 -12
  3. package/dist/vgce.umd.cjs +2 -2
  4. package/package.json +3 -2
  5. package/src/App.vue +11 -0
  6. package/src/assets/base.less +49 -0
  7. package/src/assets/icons/add.svg +1 -0
  8. package/src/assets/icons/delete.svg +12 -0
  9. package/src/assets/icons/export.svg +1 -0
  10. package/src/assets/icons/group.svg +13 -0
  11. package/src/assets/icons/import.svg +1 -0
  12. package/src/assets/icons/lock.svg +7 -0
  13. package/src/assets/icons/menu-fold.svg +9 -0
  14. package/src/assets/icons/menu-unfold.svg +9 -0
  15. package/src/assets/icons/preview.svg +6 -0
  16. package/src/assets/icons/redo.svg +8 -0
  17. package/src/assets/icons/return.svg +8 -0
  18. package/src/assets/icons/rotate.svg +1 -0
  19. package/src/assets/icons/save.svg +9 -0
  20. package/src/assets/icons/setting.svg +6 -0
  21. package/src/assets/icons/undo.svg +7 -0
  22. package/src/assets/icons/ungroup.svg +16 -0
  23. package/src/assets/icons/unlock.svg +7 -0
  24. package/src/assets/main.less +6 -0
  25. package/src/assets/svgs/alternator.svg +8 -0
  26. package/src/assets/svgs/bot-12.svg +1 -0
  27. package/src/assets/svgs/bot-2.svg +1 -0
  28. package/src/assets/svgs/bot-3.svg +1 -0
  29. package/src/assets/svgs/bot-7.svg +1 -0
  30. package/src/assets/svgs/bot-9.svg +94 -0
  31. package/src/assets/svgs/car.svg +1 -0
  32. package/src/assets/svgs/circuit-breaker.svg +11 -0
  33. package/src/assets/svgs/clock-a.svg +23 -0
  34. package/src/assets/svgs/common-table.svg +7 -0
  35. package/src/assets/svgs/el-button.svg +10 -0
  36. package/src/assets/svgs/el-tag.svg +13 -0
  37. package/src/assets/svgs/hospital.svg +1 -0
  38. package/src/assets/svgs/house.svg +1 -0
  39. package/src/assets/svgs/light.svg +24 -0
  40. package/src/assets/svgs/now-time.svg +9 -0
  41. package/src/assets/svgs/package.svg +1 -0
  42. package/src/assets/svgs/pie-charts.svg +10 -0
  43. package/src/assets/svgs/progress-a.svg +1 -0
  44. package/src/assets/svgs/reservoir.svg +10 -0
  45. package/src/assets/svgs/svg-text.svg +5 -0
  46. package/src/assets/svgs/switch-a.svg +5 -0
  47. package/src/assets/svgs/traction-transformer.svg +11 -0
  48. package/src/components/ace-edit/index.ts +27 -0
  49. package/src/components/config/index.ts +450 -0
  50. package/src/components/config/types.ts +25 -0
  51. package/src/components/svg-analysis/index.vue +11 -0
  52. package/src/components/svg-editor/center-panel/index.vue +867 -0
  53. package/src/components/svg-editor/center-panel/types.ts +11 -0
  54. package/src/components/svg-editor/component-tree/index.vue +33 -0
  55. package/src/components/svg-editor/connection-line/index.vue +125 -0
  56. package/src/components/svg-editor/connection-panel/index.vue +198 -0
  57. package/src/components/svg-editor/export-json/index.vue +37 -0
  58. package/src/components/svg-editor/handle-panel/index.vue +342 -0
  59. package/src/components/svg-editor/import-json/index.vue +37 -0
  60. package/src/components/svg-editor/index.vue +280 -0
  61. package/src/components/svg-editor/left-panel/index.vue +83 -0
  62. package/src/components/svg-editor/right-panel/code-edit-modal.vue +50 -0
  63. package/src/components/svg-editor/right-panel/common-animate.vue +96 -0
  64. package/src/components/svg-editor/right-panel/condition.vue +101 -0
  65. package/src/components/svg-editor/right-panel/dynamic-el-form-item.vue +97 -0
  66. package/src/components/svg-editor/right-panel/index.vue +304 -0
  67. package/src/components/svg-editor/right-panel/list.vue +86 -0
  68. package/src/components/svg-editor/top-panel/index.vue +139 -0
  69. package/src/components/svg-editor/types.ts +22 -0
  70. package/src/components/svg-viewer/index.vue +340 -0
  71. package/src/components/vue3-ruler-tool/index.vue +506 -0
  72. package/src/config/files/clock-a.vue +66 -0
  73. package/src/config/files/common-table.vue +49 -0
  74. package/src/config/files/light-a.vue +72 -0
  75. package/src/config/files/now-time.vue +53 -0
  76. package/src/config/files/pie-charts.vue +72 -0
  77. package/src/config/files/progress.vue +40 -0
  78. package/src/config/files/svg-text.vue +39 -0
  79. package/src/config/files/switch-a.vue +45 -0
  80. package/src/config/index.ts +28 -0
  81. package/src/config/svg/animation/index.ts +8 -0
  82. package/src/config/svg/animation/reservoir.ts +32 -0
  83. package/src/config/svg/custom/clock-a.ts +23 -0
  84. package/src/config/svg/custom/index.ts +11 -0
  85. package/src/config/svg/custom/light.ts +29 -0
  86. package/src/config/svg/custom/svg-text.ts +54 -0
  87. package/src/config/svg/custom/switch-a.ts +29 -0
  88. package/src/config/svg/index.ts +12 -0
  89. package/src/config/svg/stateful/circuit-breaker.ts +38 -0
  90. package/src/config/svg/stateful/index.ts +8 -0
  91. package/src/config/svg/stateless/alternator.ts +28 -0
  92. package/src/config/svg/stateless/bot-12.ts +22 -0
  93. package/src/config/svg/stateless/bot-2.ts +22 -0
  94. package/src/config/svg/stateless/bot-3.ts +22 -0
  95. package/src/config/svg/stateless/bot-7.ts +22 -0
  96. package/src/config/svg/stateless/bot-9.ts +22 -0
  97. package/src/config/svg/stateless/car.ts +22 -0
  98. package/src/config/svg/stateless/hospital.ts +22 -0
  99. package/src/config/svg/stateless/house.ts +22 -0
  100. package/src/config/svg/stateless/index.ts +30 -0
  101. package/src/config/svg/stateless/package.ts +22 -0
  102. package/src/config/svg/stateless/traction-transformer.ts +28 -0
  103. package/src/config/types.ts +126 -0
  104. package/src/config/vue/component/button.ts +57 -0
  105. package/src/config/vue/component/common-table.ts +124 -0
  106. package/src/config/vue/component/index.ts +13 -0
  107. package/src/config/vue/component/now-time.ts +29 -0
  108. package/src/config/vue/component/progress.ts +29 -0
  109. package/src/config/vue/component/tag.ts +46 -0
  110. package/src/config/vue/echarts/index.ts +8 -0
  111. package/src/config/vue/echarts/pie-charts.ts +60 -0
  112. package/src/config/vue/index.ts +5 -0
  113. package/src/hooks.ts +47 -0
  114. package/src/index.ts +14 -0
  115. package/src/main.ts +15 -0
  116. package/src/router.ts +24 -0
  117. package/src/stores/config/index.ts +44 -0
  118. package/src/stores/config/types.ts +27 -0
  119. package/src/stores/global/index.ts +109 -0
  120. package/src/stores/global/types.ts +115 -0
  121. package/src/stores/main.ts +10 -0
  122. package/src/stores/svg-edit-layout/index.ts +17 -0
  123. package/src/stores/svg-edit-layout/types.ts +8 -0
  124. package/src/stores/system/index.ts +174 -0
  125. package/src/stores/system/types.ts +43 -0
  126. package/src/utils/fetch.ts +351 -0
  127. package/src/utils/file-read-write.ts +26 -0
  128. package/src/utils/index.ts +397 -0
  129. package/src/utils/mqtt-net.ts +48 -0
  130. package/src/utils/proxy.ts +7 -0
  131. package/src/utils/scale-core.ts +214 -0
  132. package/src/utils/types.ts +13 -0
  133. package/src/views/EditorS.vue +18 -0
  134. package/src/views/Preview.vue +12 -0
package/README.md CHANGED
@@ -35,7 +35,9 @@ Vector graphics configure editor. 矢量图组态编辑器。
35
35
  ```
36
36
 
37
37
  5.custom toolbar
38
- copy src/config/ and change as you want
38
+ * copy `src/config/` and change as you want
39
+ * put svg files into `src/asset/svgs` , then file name need to be same with config.name
40
+ * put custom parts file into `src/config/files`, then import in `src/config/index.ts` and export with `vueComp`
39
41
  ```
40
42
  <script setup lang="ts">
41
43
  import {SvgEditor} from '@zhangqingcq/vgce'
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 }
@@ -37886,7 +37886,7 @@ 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
- }, config = [...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: () => ({
@@ -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}`);