x-print-designer 0.4.43 → 0.4.44

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,4 +1,4 @@
1
- import { getDefaultExportFromCjs } from "./index-D0VBGasE.js";
1
+ import { getDefaultExportFromCjs } from "./index-Cv-SJHCX.js";
2
2
  function _mergeNamespaces(n, m) {
3
3
  for (var i = 0; i < m.length; i++) {
4
4
  const e = m[i];
@@ -1,4 +1,4 @@
1
- import { getDefaultExportFromCjs } from "./vue-CxEJwmEz.js";
1
+ import { getDefaultExportFromCjs } from "./vue-BQ1HUDd3.js";
2
2
  function _mergeNamespaces(n, m) {
3
3
  for (var i = 0; i < m.length; i++) {
4
4
  const e = m[i];
@@ -1,4 +1,4 @@
1
- import { getDefaultExportFromCjs } from "./vue-CxEJwmEz.js";
1
+ import { getDefaultExportFromCjs } from "./vue-BQ1HUDd3.js";
2
2
  function _mergeNamespaces(n, m) {
3
3
  for (var i = 0; i < m.length; i++) {
4
4
  const e = m[i];
@@ -1,4 +1,4 @@
1
- import { getDefaultExportFromCjs } from "./index-D0VBGasE.js";
1
+ import { getDefaultExportFromCjs } from "./index-Cv-SJHCX.js";
2
2
  function _mergeNamespaces(n, m) {
3
3
  for (var i = 0; i < m.length; i++) {
4
4
  const e = m[i];
@@ -1,4 +1,4 @@
1
- import { getDefaultExportFromCjs } from "./index-D0VBGasE.js";
1
+ import { getDefaultExportFromCjs } from "./index-Cv-SJHCX.js";
2
2
  function _mergeNamespaces(n, m) {
3
3
  for (var i = 0; i < m.length; i++) {
4
4
  const e = m[i];
@@ -1,4 +1,4 @@
1
- import { defineComponent, h, shallowRef, computed, onUnmounted, watch, loader, ref, onMounted, nextTick } from "./index-D0VBGasE.js";
1
+ import { defineComponent, h, shallowRef, computed, onUnmounted, watch, loader, ref, onMounted, nextTick } from "./index-Cv-SJHCX.js";
2
2
  var __defProp$2 = Object.defineProperty;
3
3
  var __defProps = Object.defineProperties;
4
4
  var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
@@ -25623,9 +25623,6 @@ const useDesignerStore = /* @__PURE__ */ defineStore("designer", {
25623
25623
  this.selectedElementId = id;
25624
25624
  this.selectedElementIds = id ? [id] : [];
25625
25625
  }
25626
- if (this.selectedElementIds.length > 0) {
25627
- this.bringElementsToFront(this.selectedElementIds);
25628
- }
25629
25626
  if (id) {
25630
25627
  const pageIndex = this.pages.findIndex((p2) => p2.elements.some((e) => e.id === id));
25631
25628
  if (pageIndex !== -1) {
@@ -25647,9 +25644,6 @@ const useDesignerStore = /* @__PURE__ */ defineStore("designer", {
25647
25644
  }
25648
25645
  this.selectedElementIds = ids;
25649
25646
  this.selectedElementId = ids.length > 0 ? ids[ids.length - 1] : null;
25650
- if (ids.length > 0) {
25651
- this.bringElementsToFront(ids);
25652
- }
25653
25647
  if (ids.length > 0) {
25654
25648
  const pageIndex = this.pages.findIndex((p2) => p2.elements.some((e) => e.id === this.selectedElementId));
25655
25649
  if (pageIndex !== -1) {
@@ -28580,6 +28574,9 @@ const _sfc_main$Y = /* @__PURE__ */ defineComponent({
28580
28574
  overflow: isTableElement ? useAutoHeight ? "visible" : "hidden" : "hidden",
28581
28575
  ...props.element.style
28582
28576
  };
28577
+ if (actualIsSelected && store.isDragging) {
28578
+ baseStyle.zIndex = (props.element.style.zIndex || 1) + 1e4;
28579
+ }
28583
28580
  const selfBorderedTypes = [ElementType.TABLE, ElementType.CUSTOM_TABLE, ElementType.LINE, ElementType.RECT, ElementType.CIRCLE];
28584
28581
  const isSelfBordered = selfBorderedTypes.includes(props.element.type);
28585
28582
  if (isSelfBordered) {
@@ -28671,9 +28668,6 @@ const _sfc_main$Y = /* @__PURE__ */ defineComponent({
28671
28668
  store.selectElement(props.element.id, false);
28672
28669
  }
28673
28670
  }
28674
- if (store.selectedElementIds.includes(props.element.id)) {
28675
- store.bringElementsToFront(store.selectedElementIds);
28676
- }
28677
28671
  if (props.element.locked) return;
28678
28672
  isDragging = true;
28679
28673
  store.setDragging(true);
@@ -28815,6 +28809,7 @@ const _sfc_main$Y = /* @__PURE__ */ defineComponent({
28815
28809
  const initialWidth = props.element.width;
28816
28810
  const initialHeight = props.element.height;
28817
28811
  hasSnapshot = false;
28812
+ store.setDragging(true);
28818
28813
  const handleResizeMove = (moveEvent) => {
28819
28814
  const dx = (moveEvent.clientX - startX2) / props.zoom;
28820
28815
  const dy = (moveEvent.clientY - startY2) / props.zoom;
@@ -28840,6 +28835,7 @@ const _sfc_main$Y = /* @__PURE__ */ defineComponent({
28840
28835
  const handleResizeUp = () => {
28841
28836
  window.removeEventListener("mousemove", handleResizeMove);
28842
28837
  window.removeEventListener("mouseup", handleResizeUp);
28838
+ store.setDragging(false);
28843
28839
  };
28844
28840
  window.addEventListener("mousemove", handleResizeMove);
28845
28841
  window.addEventListener("mouseup", handleResizeUp);
@@ -35214,7 +35210,7 @@ const _sfc_main$P = /* @__PURE__ */ defineComponent({
35214
35210
  const renderBarcode = async () => {
35215
35211
  if (!barcodeRef.value) return;
35216
35212
  try {
35217
- const jsBarcodeModule = await import("./JsBarcode-Dnf_op4_.js").then((n) => n.JsBarcode);
35213
+ const jsBarcodeModule = await import("./JsBarcode-CUSWbmPW.js").then((n) => n.JsBarcode);
35218
35214
  const JsBarcode = (jsBarcodeModule == null ? void 0 : jsBarcodeModule.default) || jsBarcodeModule;
35219
35215
  const content = resolvedContent.value;
35220
35216
  if (!content) return;
@@ -35369,7 +35365,7 @@ const _sfc_main$O = /* @__PURE__ */ defineComponent({
35369
35365
  });
35370
35366
  const renderQR = async () => {
35371
35367
  try {
35372
- const qrcodeModule = await import("./browser-BLHea5Aw.js").then((n) => n.browser);
35368
+ const qrcodeModule = await import("./browser-hdgt6jOx.js").then((n) => n.browser);
35373
35369
  const QRCode = (qrcodeModule == null ? void 0 : qrcodeModule.default) || qrcodeModule;
35374
35370
  const content = resolvedContent.value;
35375
35371
  if (!content) {
@@ -38740,7 +38736,7 @@ const usePrint = () => {
38740
38736
  const svgToCanvas = async (root) => {
38741
38737
  const svgs = root.querySelectorAll("svg");
38742
38738
  if (svgs.length === 0) return;
38743
- const { Canvg } = await import("./index.es-B0VApSHa.js");
38739
+ const { Canvg } = await import("./index.es-DRUO_g4b.js");
38744
38740
  svgs.forEach((svg) => {
38745
38741
  const parent = svg.parentElement;
38746
38742
  if (!parent) return;
@@ -39328,7 +39324,7 @@ const usePrint = () => {
39328
39324
  }
39329
39325
  try {
39330
39326
  const generatePageImage = async (page2) => {
39331
- const domToImageModule = await import("./dom-to-image-more.min-DlvotgXD.js").then((n) => n.domToImageMore_min);
39327
+ const domToImageModule = await import("./dom-to-image-more.min-DxrDS65t.js").then((n) => n.domToImageMore_min);
39332
39328
  const domtoimage = (domToImageModule == null ? void 0 : domToImageModule.default) || domToImageModule;
39333
39329
  const canvas = await domtoimage.toCanvas(page2, {
39334
39330
  filter: (node) => {
@@ -39386,7 +39382,7 @@ const usePrint = () => {
39386
39382
  cleanup = source.cleanup;
39387
39383
  const { container, tempWrapper: wrapper } = await processContentForImage(source.content, width, height, true, source.getComputedStyleFn);
39388
39384
  tempWrapper = wrapper;
39389
- const jsPdfModule = await import("./jspdf.es.min-B1AjmqV8.js");
39385
+ const jsPdfModule = await import("./jspdf.es.min-De5r7mEj.js");
39390
39386
  const jsPDF = (jsPdfModule == null ? void 0 : jsPdfModule.default) || (jsPdfModule == null ? void 0 : jsPdfModule.jsPDF) || jsPdfModule;
39391
39387
  const pdf = new jsPDF({
39392
39388
  orientation: width > height ? "l" : "p",
@@ -39798,7 +39794,7 @@ const usePrint = () => {
39798
39794
  link.click();
39799
39795
  document.body.removeChild(link);
39800
39796
  } else {
39801
- const jsZipModule = await import("./jszip.min-BiBtg7ph.js").then((n) => n.jszip_min);
39797
+ const jsZipModule = await import("./jszip.min-C2EJyYJw.js").then((n) => n.jszip_min);
39802
39798
  const JSZip = (jsZipModule == null ? void 0 : jsZipModule.default) || jsZipModule;
39803
39799
  const zip = new JSZip();
39804
39800
  await Promise.all(pageImages.map(async (dataUrl, index2) => {
@@ -40607,7 +40603,7 @@ const _sfc_main$v = /* @__PURE__ */ defineComponent({
40607
40603
  },
40608
40604
  emits: ["update:visible", "update:value", "close"],
40609
40605
  setup(__props, { emit: __emit }) {
40610
- const Editor = /* @__PURE__ */ defineAsyncComponent(() => import("./index-YnuXIFL6.js").then((m) => m.Editor));
40606
+ const Editor = /* @__PURE__ */ defineAsyncComponent(() => import("./index-CFwMsAjW.js").then((m) => m.Editor));
40611
40607
  const { t } = useI18n();
40612
40608
  const { isDark: isDark2 } = useTheme();
40613
40609
  const modalContainer = inject("modal-container", ref(null));
@@ -43703,7 +43699,7 @@ function render$K(_ctx, _cache) {
43703
43699
  }
43704
43700
  const InfoIcon = markRaw({ name: "material-symbols-info", render: render$K });
43705
43701
  const name = "x-print-designer";
43706
- const version = "0.4.43";
43702
+ const version = "0.4.44";
43707
43703
  const dependencies = { "@guolao/vue-monaco-editor": "^1.6.0", "canvg": "^3.0.11", "dom-to-image-more": "^3.7.2", "echarts": "^6.0.0", "jsbarcode": "^3.12.3", "jspdf": "4.2", "jszip": "^3.10.1", "lodash": "^4.17.21", "qrcode": "^1.5.4", "uuid": "^11.0.3" };
43708
43704
  const devDependencies = { "@iconify-json/material-symbols": "^1.2.53", "@types/jsbarcode": "^3.11.4", "@types/lodash": "^4.17.13", "@types/node": "^22.10.2", "@types/qrcode": "^1.5.6", "@types/uuid": "^10.0.0", "@vitejs/plugin-vue": "^5.2.1", "@vue/tsconfig": "^0.7.0", "autoprefixer": "^10.4.20", "postcss": "^8.4.49", "pinia": "2.3.0", "rollup-plugin-visualizer": "^7.0.1", "sharp": "^0.34.5", "tailwindcss": "^3.4.17", "terser": "^5.46.1", "typescript": "~5.6.2", "unplugin-icons": "^23.0.1", "vite": "^6.0.1", "vue": "3.5.13", "vue-i18n": "11.2.8", "vue-tsc": "^2.1.10" };
43709
43705
  const pkg = {
@@ -46458,7 +46454,7 @@ const _sfc_main$i = /* @__PURE__ */ defineComponent({
46458
46454
  },
46459
46455
  emits: ["update:value"],
46460
46456
  setup(__props, { emit: __emit }) {
46461
- const Editor = /* @__PURE__ */ defineAsyncComponent(() => import("./index-YnuXIFL6.js").then((m) => m.Editor));
46457
+ const Editor = /* @__PURE__ */ defineAsyncComponent(() => import("./index-CFwMsAjW.js").then((m) => m.Editor));
46462
46458
  const emit2 = __emit;
46463
46459
  useDesignerStore();
46464
46460
  const { isDark: isDark2 } = useTheme();
@@ -51247,7 +51243,7 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
51247
51243
  };
51248
51244
  const renderBarcodeDataUrl = async (element) => {
51249
51245
  try {
51250
- const jsBarcodeModule = await import("./JsBarcode-Dnf_op4_.js").then((n) => n.JsBarcode);
51246
+ const jsBarcodeModule = await import("./JsBarcode-CUSWbmPW.js").then((n) => n.JsBarcode);
51251
51247
  const JsBarcode = (jsBarcodeModule == null ? void 0 : jsBarcodeModule.default) || jsBarcodeModule;
51252
51248
  const canvas = document.createElement("canvas");
51253
51249
  const style = element.style || {};
@@ -51274,7 +51270,7 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
51274
51270
  const renderQrDataUrl = async (element) => {
51275
51271
  var _a2, _b;
51276
51272
  try {
51277
- const qrcodeModule = await import("./browser-BLHea5Aw.js").then((n) => n.browser);
51273
+ const qrcodeModule = await import("./browser-hdgt6jOx.js").then((n) => n.browser);
51278
51274
  const QRCode = (qrcodeModule == null ? void 0 : qrcodeModule.default) || qrcodeModule;
51279
51275
  return await QRCode.toDataURL(getResolvedContent(element), {
51280
51276
  margin: 0,
@@ -1,4 +1,4 @@
1
- import { commonjsGlobal, getDefaultExportFromCjs } from "./index-D0VBGasE.js";
1
+ import { commonjsGlobal, getDefaultExportFromCjs } from "./index-Cv-SJHCX.js";
2
2
  import { _typeof as _typeof$1 } from "./typeof-DxTVrAEz.js";
3
3
  var es_promise = {};
4
4
  var es_promise_constructor = {};
@@ -10832,7 +10832,7 @@ function le() {
10832
10832
  var h2 = l2.getContext("2d");
10833
10833
  h2.fillStyle = "#fff", h2.fillRect(0, 0, l2.width, l2.height);
10834
10834
  var f2 = { ignoreMouse: true, ignoreAnimation: true, ignoreDimensions: true }, d2 = this;
10835
- return (i.canvg ? Promise.resolve(i.canvg) : import("./index.es-B0VApSHa.js")).catch(function(t3) {
10835
+ return (i.canvg ? Promise.resolve(i.canvg) : import("./index.es-DRUO_g4b.js")).catch(function(t3) {
10836
10836
  return Promise.reject(new Error("Could not load canvg: " + t3));
10837
10837
  }).then(function(t3) {
10838
10838
  return t3.default ? t3.default : t3;
@@ -1,4 +1,4 @@
1
- import { commonjsGlobal, getDefaultExportFromCjs } from "./index-D0VBGasE.js";
1
+ import { commonjsGlobal, getDefaultExportFromCjs } from "./index-Cv-SJHCX.js";
2
2
  function _mergeNamespaces(n, m) {
3
3
  for (var i = 0; i < m.length; i++) {
4
4
  const e = m[i];
@@ -1,4 +1,4 @@
1
- import { PrintDesignerElement, _sfc_main, adapterPresets, buildFieldDictionary, createRestfulAdapter, diagnoseIntegration, exportDiagnosticReport, generateDiagnosticReport, getFieldLabel, getPreset, mergeFieldDictionaries, mergePreset, presets, useDesigner } from "./index-D0VBGasE.js";
1
+ import { PrintDesignerElement, _sfc_main, adapterPresets, buildFieldDictionary, createRestfulAdapter, diagnoseIntegration, exportDiagnosticReport, generateDiagnosticReport, getFieldLabel, getPreset, mergeFieldDictionaries, mergePreset, presets, useDesigner } from "./index-Cv-SJHCX.js";
2
2
  export {
3
3
  PrintDesignerElement,
4
4
  _sfc_main as XPrintDesigner,