x-print-designer 0.4.95 → 0.4.97

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 "./vue-Dewzjm8R.js";
1
+ import { getDefaultExportFromCjs } from "./vue-BKqSErqo.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-B9nIjkgJ.js";
1
+ import { getDefaultExportFromCjs } from "./index-CgktOepo.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-B9nIjkgJ.js";
1
+ import { getDefaultExportFromCjs } from "./index-CgktOepo.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-Dewzjm8R.js";
1
+ import { getDefaultExportFromCjs } from "./vue-BKqSErqo.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-B9nIjkgJ.js";
1
+ import { getDefaultExportFromCjs } from "./index-CgktOepo.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-B9nIjkgJ.js";
1
+ import { defineComponent, h, shallowRef, computed, onUnmounted, watch, loader, ref, onMounted, nextTick } from "./index-CgktOepo.js";
2
2
  var __defProp$2 = Object.defineProperty;
3
3
  var __defProps = Object.defineProperties;
4
4
  var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
@@ -12774,7 +12774,8 @@ const en = {
12774
12774
  uploadTip: "Max 2MB, converts to Base64",
12775
12775
  sizeError: "Image size must be less than 2MB",
12776
12776
  readError: "Failed to read file",
12777
- placeholder: "Double-click to upload"
12777
+ placeholder: "Double-click to upload",
12778
+ emptyPlaceholder: "Image placeholder"
12778
12779
  },
12779
12780
  align: {
12780
12781
  left: "Align Left",
@@ -13943,7 +13944,8 @@ const zh = {
13943
13944
  uploadTip: "最大 2MB,自动转换为 Base64",
13944
13945
  sizeError: "图片大小不能超过 2MB",
13945
13946
  readError: "读取文件失败",
13946
- placeholder: "双击上传图片"
13947
+ placeholder: "双击上传图片",
13948
+ emptyPlaceholder: "图片占位"
13947
13949
  },
13948
13950
  align: {
13949
13951
  left: "左对齐",
@@ -29208,7 +29210,7 @@ const _hoisted_1$1T = ["src"];
29208
29210
  const _hoisted_2$E = ["src"];
29209
29211
  const _hoisted_3$C = {
29210
29212
  key: 1,
29211
- class: "image-empty-placeholder flex items-center justify-center w-full h-full"
29213
+ class: "text-gray-400 text-xs"
29212
29214
  };
29213
29215
  const _hoisted_4$A = {
29214
29216
  key: 2,
@@ -29466,41 +29468,7 @@ const _sfc_main$T = /* @__PURE__ */ defineComponent({
29466
29468
  src: resolvedContent.value,
29467
29469
  class: normalizeClass(["w-full h-full pointer-events-none", imageFitClass.value]),
29468
29470
  alt: "Element"
29469
- }, null, 10, _hoisted_2$E)) : unref(isPreviewRender) ? (openBlock(), createElementBlock("span", _hoisted_3$C, _cache[0] || (_cache[0] = [
29470
- createBaseVNode("svg", {
29471
- viewBox: "0 0 48 48",
29472
- width: "40",
29473
- height: "40",
29474
- fill: "none",
29475
- xmlns: "http://www.w3.org/2000/svg"
29476
- }, [
29477
- createBaseVNode("rect", {
29478
- x: "5.5",
29479
- y: "8.5",
29480
- width: "37",
29481
- height: "31",
29482
- rx: "3",
29483
- stroke: "#B7BEC9",
29484
- "stroke-opacity": "0.9",
29485
- "stroke-width": "2.5",
29486
- "stroke-dasharray": "4 3"
29487
- }),
29488
- createBaseVNode("circle", {
29489
- cx: "17",
29490
- cy: "18.5",
29491
- r: "3.5",
29492
- fill: "#B7BEC9"
29493
- }),
29494
- createBaseVNode("path", {
29495
- d: "M10.5 33.5 L20 24 L27 31 L32 26 L37.5 31.5",
29496
- stroke: "#B7BEC9",
29497
- "stroke-opacity": "0.9",
29498
- "stroke-width": "2.5",
29499
- "stroke-linecap": "round",
29500
- "stroke-linejoin": "round"
29501
- })
29502
- ], -1)
29503
- ]))) : (openBlock(), createElementBlock("span", _hoisted_4$A, toDisplayString$1(placeholderText.value), 1))
29471
+ }, null, 10, _hoisted_2$E)) : unref(isPreviewRender) ? (openBlock(), createElementBlock("span", _hoisted_3$C, toDisplayString$1(unref(t)("properties.image.emptyPlaceholder")), 1)) : (openBlock(), createElementBlock("span", _hoisted_4$A, toDisplayString$1(placeholderText.value), 1))
29504
29472
  ], 64)),
29505
29473
  createBaseVNode("input", {
29506
29474
  ref_key: "fileInputRef",
@@ -32989,7 +32957,7 @@ const _sfc_main$P = /* @__PURE__ */ defineComponent({
32989
32957
  const renderBarcode = async () => {
32990
32958
  if (!barcodeRef.value) return;
32991
32959
  try {
32992
- const jsBarcodeModule = await import("./JsBarcode-CflhDvv6.js").then((n) => n.JsBarcode);
32960
+ const jsBarcodeModule = await import("./JsBarcode-DCwuK6ec.js").then((n) => n.JsBarcode);
32993
32961
  const JsBarcode = (jsBarcodeModule == null ? void 0 : jsBarcodeModule.default) || jsBarcodeModule;
32994
32962
  const content = resolvedContent.value;
32995
32963
  if (!content) return;
@@ -33144,7 +33112,7 @@ const _sfc_main$O = /* @__PURE__ */ defineComponent({
33144
33112
  });
33145
33113
  const renderQR = async () => {
33146
33114
  try {
33147
- const qrcodeModule = await import("./browser-CNo-C7o3.js").then((n) => n.browser);
33115
+ const qrcodeModule = await import("./browser-Ch15j3h8.js").then((n) => n.browser);
33148
33116
  const QRCode = (qrcodeModule == null ? void 0 : qrcodeModule.default) || qrcodeModule;
33149
33117
  const content = resolvedContent.value;
33150
33118
  if (!content) {
@@ -36621,7 +36589,7 @@ const usePrint = () => {
36621
36589
  const svgToCanvas = async (root) => {
36622
36590
  const svgs = root.querySelectorAll("svg");
36623
36591
  if (svgs.length === 0) return;
36624
- const { Canvg } = await import("./index.es-CvC9ApD2.js");
36592
+ const { Canvg } = await import("./index.es-Di2ovrCT.js");
36625
36593
  svgs.forEach((svg) => {
36626
36594
  const parent = svg.parentElement;
36627
36595
  if (!parent) return;
@@ -37210,7 +37178,7 @@ const usePrint = () => {
37210
37178
  }
37211
37179
  try {
37212
37180
  const generatePageImage = async (page2) => {
37213
- const domToImageModule = await import("./dom-to-image-more.min-CTzOk17S.js").then((n) => n.domToImageMore_min);
37181
+ const domToImageModule = await import("./dom-to-image-more.min-D7Mr0Fb7.js").then((n) => n.domToImageMore_min);
37214
37182
  const domtoimage = (domToImageModule == null ? void 0 : domToImageModule.default) || domToImageModule;
37215
37183
  const canvas = await domtoimage.toCanvas(page2, {
37216
37184
  filter: (node) => {
@@ -37268,7 +37236,7 @@ const usePrint = () => {
37268
37236
  cleanup = source.cleanup;
37269
37237
  const { container, tempWrapper: wrapper } = await processContentForImage(source.content, width, height, true, source.getComputedStyleFn);
37270
37238
  tempWrapper = wrapper;
37271
- const jsPdfModule = await import("./jspdf.es.min-CuSHyK0x.js");
37239
+ const jsPdfModule = await import("./jspdf.es.min-CiEQ9Qem.js");
37272
37240
  const jsPDF = (jsPdfModule == null ? void 0 : jsPdfModule.default) || (jsPdfModule == null ? void 0 : jsPdfModule.jsPDF) || jsPdfModule;
37273
37241
  const pdf = new jsPDF({
37274
37242
  orientation: width > height ? "l" : "p",
@@ -37680,7 +37648,7 @@ const usePrint = () => {
37680
37648
  link.click();
37681
37649
  document.body.removeChild(link);
37682
37650
  } else {
37683
- const jsZipModule = await import("./jszip.min-B50lyd5y.js").then((n) => n.jszip_min);
37651
+ const jsZipModule = await import("./jszip.min-ClukAAj8.js").then((n) => n.jszip_min);
37684
37652
  const JSZip = (jsZipModule == null ? void 0 : jsZipModule.default) || jsZipModule;
37685
37653
  const zip = new JSZip();
37686
37654
  await Promise.all(pageImages.map(async (dataUrl, index2) => {
@@ -38489,7 +38457,7 @@ const _sfc_main$v = /* @__PURE__ */ defineComponent({
38489
38457
  },
38490
38458
  emits: ["update:visible", "update:value", "close"],
38491
38459
  setup(__props, { emit: __emit }) {
38492
- const Editor = /* @__PURE__ */ defineAsyncComponent(() => import("./index-vQG3NPAj.js").then((m) => m.Editor));
38460
+ const Editor = /* @__PURE__ */ defineAsyncComponent(() => import("./index-BVdz-moU.js").then((m) => m.Editor));
38493
38461
  const { t } = useI18n();
38494
38462
  const { isDark: isDark2 } = useTheme();
38495
38463
  const modalContainer = inject("modal-container", ref(null));
@@ -41073,7 +41041,7 @@ function render$K(_ctx, _cache) {
41073
41041
  ])]);
41074
41042
  }
41075
41043
  const InfoIcon = markRaw({ name: "material-symbols-info", render: render$K });
41076
- const version = "0.4.95";
41044
+ const version = "0.4.97";
41077
41045
  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" };
41078
41046
  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" };
41079
41047
  const pkg = {
@@ -43861,7 +43829,7 @@ const _sfc_main$i = /* @__PURE__ */ defineComponent({
43861
43829
  },
43862
43830
  emits: ["update:value"],
43863
43831
  setup(__props, { emit: __emit }) {
43864
- const Editor = /* @__PURE__ */ defineAsyncComponent(() => import("./index-vQG3NPAj.js").then((m) => m.Editor));
43832
+ const Editor = /* @__PURE__ */ defineAsyncComponent(() => import("./index-BVdz-moU.js").then((m) => m.Editor));
43865
43833
  const emit2 = __emit;
43866
43834
  useDesignerStore();
43867
43835
  const { isDark: isDark2 } = useTheme();
@@ -48822,7 +48790,7 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
48822
48790
  };
48823
48791
  const renderBarcodeDataUrl = async (element) => {
48824
48792
  try {
48825
- const jsBarcodeModule = await import("./JsBarcode-CflhDvv6.js").then((n) => n.JsBarcode);
48793
+ const jsBarcodeModule = await import("./JsBarcode-DCwuK6ec.js").then((n) => n.JsBarcode);
48826
48794
  const JsBarcode = (jsBarcodeModule == null ? void 0 : jsBarcodeModule.default) || jsBarcodeModule;
48827
48795
  const canvas = document.createElement("canvas");
48828
48796
  const style = element.style || {};
@@ -48849,7 +48817,7 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
48849
48817
  const renderQrDataUrl = async (element) => {
48850
48818
  var _a2, _b;
48851
48819
  try {
48852
- const qrcodeModule = await import("./browser-CNo-C7o3.js").then((n) => n.browser);
48820
+ const qrcodeModule = await import("./browser-Ch15j3h8.js").then((n) => n.browser);
48853
48821
  const QRCode = (qrcodeModule == null ? void 0 : qrcodeModule.default) || qrcodeModule;
48854
48822
  return await QRCode.toDataURL(getResolvedContent(element), {
48855
48823
  margin: 0,
@@ -1,4 +1,4 @@
1
- import { commonjsGlobal, getDefaultExportFromCjs } from "./index-B9nIjkgJ.js";
1
+ import { commonjsGlobal, getDefaultExportFromCjs } from "./index-CgktOepo.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-CvC9ApD2.js")).catch(function(t3) {
10835
+ return (i.canvg ? Promise.resolve(i.canvg) : import("./index.es-Di2ovrCT.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-B9nIjkgJ.js";
1
+ import { commonjsGlobal, getDefaultExportFromCjs } from "./index-CgktOepo.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-B9nIjkgJ.js";
1
+ import { PrintDesignerElement, _sfc_main, adapterPresets, buildFieldDictionary, createRestfulAdapter, diagnoseIntegration, exportDiagnosticReport, generateDiagnosticReport, getFieldLabel, getPreset, mergeFieldDictionaries, mergePreset, presets, useDesigner } from "./index-CgktOepo.js";
2
2
  export {
3
3
  PrintDesignerElement,
4
4
  _sfc_main as XPrintDesigner,