vue-print-designer 1.8.2 → 1.8.5

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.
package/README.md CHANGED
@@ -117,7 +117,7 @@ PrintDot Client 是本项目的配套桌面客户端,用于连接本地打印
117
117
  - 业务端发送 `print_label` 消息,把设计器导出的模板 JSON 原样转发即可,无需二次加工;
118
118
  - 在客户端打印预览窗口勾选「标签打印」即可本地出标(需设计器预览模式为 JSON);选中标签机时会自动识别指令集并勾选,识别结果可随时手动推翻。
119
119
  - **批量与多页**:模板一页即一张标签;`labels[]` 可一次提交整批数据,每条数据独立设置份数,相邻标签之间可配置间隔。
120
- - **可追溯**:打印记录以 `label` 类型保存任务,并保留下发的指令内容,便于复查。
120
+ - **打印记录**:每次标签打印都会记入客户端的打印记录,可查看打印机、份数、状态与时间,失败任务可重试。
121
121
 
122
122
  #### 打印效果一致性比对
123
123
 
@@ -147,9 +147,7 @@ PrintDot Client 是本项目的配套桌面客户端,用于连接本地打印
147
147
  </tr>
148
148
  </table>
149
149
 
150
- 以上图片由测试工具自动生成,不是手工截图。修改标签相关代码后,工具会将 ZPL 指令提交至 Labelary 逐点比对,差异超过 0.5% 时给出告警;无网络环境下自动跳过远端比对并输出提示,不影响本地打印任务。
151
-
152
- > 边界说明:彩色与灰度按黑白抖动输出;`pageNumber` 元素、水印 / 渐变 / 阴影、自定义 JS 脚本在标签路径下会被忽略且不阻断任务;ESC-POS 依赖机型支持 page mode 与 `ESC *` 位图。文字版式跨机器一致(客户端内嵌字体渲染),几何误差约 0.5 dot(203 dpi 下约 0.06 mm)。
150
+ > 说明:标签纸只能打印黑白,彩色图片会自动转成黑白效果。页码、水印、渐变和阴影在标签上不会显示。使用 ESC/POS 指令集的打印机需支持 page mode。文字排版在不同电脑上保持一致,位置误差不超过 0.06 mm(203 dpi 下)。
153
151
 
154
152
  ---
155
153
 
@@ -1,6 +1,6 @@
1
- import { l as defineComponent, a3 as inject, L as ref, j as computed, w as watch, N as onMounted, O as onBeforeUnmount, o as openBlock, E as createBlock, T as Teleport, q as unref, g as createBaseVNode, A as toDisplayString, t as createVNode, C as CloseIcon, x as withDirectives, z as vModelText, y as withKeys, p as withModifiers, ad as _sfc_main$2, n as normalizeClass, D as ChevronIcon, f as createElementBlock, F as Fragment, ae as vModelCheckbox, B as createTextVNode, v as createCommentVNode, a as useI18n, e as useTemplateStore, af as AddIcon, r as renderList, J as EditIcon, K as DeleteIcon } from "./web-component-Ch6T6yFD.js";
2
- import { r as requestAiTemplate, A as AiRequestError, u as useAiStore, a as activeAiProfile } from "./client-BdMMFNKL.js";
3
- import { u as useAiLocale } from "./index-B6xcGTY_.js";
1
+ import { l as defineComponent, a3 as inject, L as ref, j as computed, w as watch, N as onMounted, O as onBeforeUnmount, o as openBlock, E as createBlock, T as Teleport, q as unref, g as createBaseVNode, A as toDisplayString, t as createVNode, C as CloseIcon, x as withDirectives, z as vModelText, y as withKeys, p as withModifiers, ae as _sfc_main$2, n as normalizeClass, D as ChevronIcon, f as createElementBlock, F as Fragment, af as vModelCheckbox, B as createTextVNode, v as createCommentVNode, a as useI18n, e as useTemplateStore, ag as AddIcon, r as renderList, J as EditIcon, K as DeleteIcon } from "./web-component-B0eG-RHU.js";
2
+ import { r as requestAiTemplate, A as AiRequestError, u as useAiStore, a as activeAiProfile } from "./client-D5tYYOnQ.js";
3
+ import { u as useAiLocale } from "./index-vLb1q487.js";
4
4
  const _hoisted_1$1 = { class: "flex h-[34rem] max-h-[85vh] w-[32rem] flex-col overflow-hidden rounded-lg bg-white shadow-xl" };
5
5
  const _hoisted_2$1 = { class: "flex shrink-0 items-center justify-between border-b border-gray-200 px-4 py-3" };
6
6
  const _hoisted_3$1 = { class: "text-sm font-semibold text-gray-800" };
@@ -1,8 +1,8 @@
1
- import { m as markRaw, o as openBlock, f as createElementBlock, g as createBaseVNode, h as uuidv4, u as useDesignerStore, e as useTemplateStore, a as useI18n, j as computed, c as cloneDeep, k as uiConfirm, l as defineComponent, w as watch, n as normalizeClass, p as withModifiers, F as Fragment, r as renderList, q as unref, t as createVNode, C as CloseIcon, v as createCommentVNode, x as withDirectives, y as withKeys, z as vModelText, A as toDisplayString, I as ImageIcon, B as createTextVNode, D as ChevronIcon, E as createBlock, G as CheckIcon, H as CopyIcon, J as EditIcon, K as DeleteIcon, L as ref, M as nextTick, T as Teleport, S as SparkleIcon, N as onMounted, O as onBeforeUnmount, P as ChevronRightIcon, Q as useFloatingTooltip, R as FEATURE_FLAGS_CHANGE_EVENT, U as vShow, V as HistoryIcon, W as Settings, X as normalizeStyle, Y as resolveDynamicComponent, Z as ArrowUpIcon, _ as PanelResizeIcon } from "./web-component-Ch6T6yFD.js";
2
- import { R as RefreshIcon, F as FinanceIcon, S as ShippingIcon, O as OfficeIcon } from "./refresh-DV7QQgv5.js";
3
- import { u as useAiStore, i as isAiConfigReady, a as activeAiProfile, r as requestAiTemplate, A as AiRequestError } from "./client-BdMMFNKL.js";
4
- import { c as createActionText, u as useAiLocale } from "./index-B6xcGTY_.js";
5
- import { e as extractJsonText, f as dropPreview, a as cancelPreview, c as commitPreview, r as resolveLocalAction, g as getActionDefinition, b as buildSystemPrompt, h as getPromptLanguage, d as buildUserMessage, n as normalizeTemplate, i as beginPreview } from "./preview-6xanSdC7.js";
1
+ import { m as markRaw, o as openBlock, f as createElementBlock, g as createBaseVNode, h as uuidv4, u as useDesignerStore, e as useTemplateStore, a as useI18n, j as computed, c as cloneDeep, k as uiConfirm, l as defineComponent, w as watch, n as normalizeClass, p as withModifiers, F as Fragment, r as renderList, q as unref, t as createVNode, C as CloseIcon, v as createCommentVNode, x as withDirectives, y as withKeys, z as vModelText, A as toDisplayString, I as ImageIcon, B as createTextVNode, D as ChevronIcon, E as createBlock, G as CheckIcon, H as CopyIcon, J as EditIcon, K as DeleteIcon, L as ref, M as nextTick, T as Teleport, S as SparkleIcon, N as onMounted, O as onBeforeUnmount, P as ChevronRightIcon, Q as useFloatingTooltip, R as FEATURE_FLAGS_CHANGE_EVENT, U as vShow, V as HistoryIcon, W as Settings, X as normalizeStyle, Y as resolveDynamicComponent, Z as ArrowUpIcon, _ as PanelResizeIcon } from "./web-component-B0eG-RHU.js";
2
+ import { R as RefreshIcon, F as FinanceIcon, S as ShippingIcon, O as OfficeIcon } from "./refresh-BaQKuMcs.js";
3
+ import { u as useAiStore, i as isAiConfigReady, a as activeAiProfile, r as requestAiTemplate, A as AiRequestError } from "./client-D5tYYOnQ.js";
4
+ import { c as createActionText, u as useAiLocale } from "./index-vLb1q487.js";
5
+ import { e as extractJsonText, f as dropPreview, a as cancelPreview, c as commitPreview, r as resolveLocalAction, g as getActionDefinition, b as buildSystemPrompt, h as getPromptLanguage, d as buildUserMessage, n as normalizeTemplate, i as beginPreview } from "./preview-BH2udxZE.js";
6
6
  const _hoisted_1$a = {
7
7
  viewBox: "0 0 24 24",
8
8
  width: "1.2em",
@@ -1725,10 +1725,10 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
1725
1725
  }
1726
1726
  });
1727
1727
  const _hoisted_1 = {
1728
- class: "relative min-h-[64px] cursor-move select-none rounded-t border-b border-gray-200 bg-gray-50 p-4 pr-28 dark:border-gray-700 dark:bg-gray-800",
1728
+ class: "relative min-h-[64px] cursor-move select-none rounded-t border-b border-gray-200 bg-gray-50 p-4 dark:border-gray-700 dark:bg-gray-800",
1729
1729
  "data-floating-panel-drag-handle": "true"
1730
1730
  };
1731
- const _hoisted_2 = { class: "text-sm font-semibold text-gray-900 dark:text-gray-100" };
1731
+ const _hoisted_2 = { class: "text-sm font-semibold text-gray-900 dark:text-gray-100 pr-32" };
1732
1732
  const _hoisted_3 = { class: "mt-1 text-xs text-gray-500 dark:text-gray-400" };
1733
1733
  const _hoisted_4 = { class: "absolute right-0 top-0 z-20 flex items-center" };
1734
1734
  const _hoisted_5 = ["title", "disabled"];
@@ -1,4 +1,4 @@
1
- import { ag as getDefaultExportFromCjs } from "./web-component-Ch6T6yFD.js";
1
+ import { ah as getDefaultExportFromCjs } from "./web-component-B0eG-RHU.js";
2
2
  function _mergeNamespaces(n, m) {
3
3
  for (var i = 0; i < m.length; i++) {
4
4
  const e = m[i];
@@ -1,6 +1,6 @@
1
- import { m as markRaw, o as openBlock, f as createElementBlock, g as createBaseVNode, l as defineComponent, w as watch, j as computed, n as normalizeClass, t as createVNode, q as unref, p as withModifiers, a2 as ZoomIcon, v as createCommentVNode, A as toDisplayString, F as Fragment, r as renderList, L as ref, a3 as inject, E as createBlock, T as Teleport, C as CloseIcon, B as createTextVNode, u as useDesignerStore, a4 as AppsIcon, N as onMounted, M as nextTick, O as onBeforeUnmount, Y as resolveDynamicComponent, x as withDirectives, z as vModelText, a5 as StorefrontIcon } from "./web-component-Ch6T6yFD.js";
2
- import { R as RefreshIcon, O as OfficeIcon, F as FinanceIcon, S as ShippingIcon } from "./refresh-DV7QQgv5.js";
3
- import { u as useMarketLocale, a as useMarketStore, b as buildMarketCoverUrl, i as isVersionCompatible, g as getMarketErrorKey } from "./store-Vzc-Gh2u.js";
1
+ import { m as markRaw, o as openBlock, f as createElementBlock, g as createBaseVNode, l as defineComponent, w as watch, j as computed, n as normalizeClass, t as createVNode, q as unref, p as withModifiers, a2 as ZoomIcon, v as createCommentVNode, A as toDisplayString, F as Fragment, r as renderList, L as ref, a3 as inject, E as createBlock, T as Teleport, C as CloseIcon, B as createTextVNode, a4 as createStaticVNode, u as useDesignerStore, a5 as AppsIcon, N as onMounted, M as nextTick, O as onBeforeUnmount, Y as resolveDynamicComponent, x as withDirectives, z as vModelText, a6 as StorefrontIcon } from "./web-component-B0eG-RHU.js";
2
+ import { R as RefreshIcon, O as OfficeIcon, F as FinanceIcon, S as ShippingIcon } from "./refresh-BaQKuMcs.js";
3
+ import { u as useMarketLocale, a as useMarketStore, b as buildMarketCoverUrl, i as isVersionCompatible, g as getMarketErrorKey } from "./store-CP64a7wy.js";
4
4
  const _hoisted_1$c = {
5
5
  viewBox: "0 0 24 24",
6
6
  width: "1.2em",
@@ -523,16 +523,12 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
523
523
  const errorText = computed(() => t(getMarketErrorKey(props.errorCode)));
524
524
  return (_ctx, _cache) => {
525
525
  return __props.state === "loading" ? (openBlock(), createElementBlock("div", _hoisted_1$1, [
526
- (openBlock(), createElementBlock(Fragment, null, renderList(8, (index) => {
526
+ (openBlock(), createElementBlock(Fragment, null, renderList(20, (index) => {
527
527
  return createBaseVNode("div", {
528
528
  key: index,
529
529
  class: "overflow-hidden rounded-lg border border-gray-200 bg-white dark:border-gray-700 dark:bg-gray-800"
530
530
  }, [..._cache[2] || (_cache[2] = [
531
- createBaseVNode("div", { class: "aspect-[4/3] animate-pulse bg-gray-100 dark:bg-gray-700" }, null, -1),
532
- createBaseVNode("div", { class: "space-y-2 p-3" }, [
533
- createBaseVNode("div", { class: "h-3 w-3/4 animate-pulse rounded bg-gray-100 dark:bg-gray-700" }),
534
- createBaseVNode("div", { class: "h-3 w-1/2 animate-pulse rounded bg-gray-100 dark:bg-gray-700" })
535
- ], -1)
531
+ createStaticVNode('<div class="aspect-[4/3] animate-pulse bg-gray-100 dark:bg-gray-700"></div><div class="space-y-1 border-t border-gray-200 p-3 dark:border-gray-700"><div class="h-5 w-3/4 animate-pulse rounded bg-gray-100 dark:bg-gray-700"></div><div class="h-4 w-1/2 animate-pulse rounded bg-gray-100 dark:bg-gray-700"></div><div class="flex gap-1"><div class="h-5 w-10 animate-pulse rounded bg-gray-100 dark:bg-gray-700"></div><div class="h-5 w-12 animate-pulse rounded bg-gray-100 dark:bg-gray-700"></div></div></div>', 2)
536
532
  ])]);
537
533
  }), 64))
538
534
  ])) : __props.state === "empty" ? (openBlock(), createElementBlock("div", _hoisted_2$1, [
@@ -1,6 +1,6 @@
1
- import { s as setAiEnabled, i as isAiEnabled, u as useDesignerStore, a as useI18n, c as cloneDeep, b as isModuleHidden, d as setModuleHidden, e as useTemplateStore } from "./web-component-Ch6T6yFD.js";
2
- import { l as loadAiConfig, u as useAiStore, n as normalizeAiConfig, a as activeAiProfile, g as getBuiltinModels, r as requestAiTemplate, s as saveAiConfig, b as setBuiltinModels } from "./client-BdMMFNKL.js";
3
- import { c as commitPreview, a as cancelPreview, b as buildSystemPrompt, d as buildUserMessage, n as normalizeTemplate } from "./preview-6xanSdC7.js";
1
+ import { s as setAiEnabled, i as isAiEnabled, u as useDesignerStore, a as useI18n, c as cloneDeep, b as isModuleHidden, d as setModuleHidden, e as useTemplateStore } from "./web-component-B0eG-RHU.js";
2
+ import { l as loadAiConfig, u as useAiStore, n as normalizeAiConfig, a as activeAiProfile, g as getBuiltinModels, r as requestAiTemplate, s as saveAiConfig, b as setBuiltinModels } from "./client-D5tYYOnQ.js";
3
+ import { c as commitPreview, a as cancelPreview, b as buildSystemPrompt, d as buildUserMessage, n as normalizeTemplate } from "./preview-BH2udxZE.js";
4
4
  const resolveScopeId = (scopeId) => {
5
5
  if (scopeId) return scopeId;
6
6
  try {
@@ -1,4 +1,4 @@
1
- import { ag as getDefaultExportFromCjs } from "./web-component-Ch6T6yFD.js";
1
+ import { ah as getDefaultExportFromCjs } from "./web-component-B0eG-RHU.js";
2
2
  function _mergeNamespaces(n, m) {
3
3
  for (var i = 0; i < m.length; i++) {
4
4
  const e = m[i];
@@ -1,7 +1,7 @@
1
1
  var __defProp = Object.defineProperty;
2
2
  var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3
3
  var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
4
- import { h as uuidv4, a7 as defineStore } from "./web-component-Ch6T6yFD.js";
4
+ import { h as uuidv4, a8 as defineStore } from "./web-component-B0eG-RHU.js";
5
5
  const STORAGE_PREFIX = "print-designer-ai-config";
6
6
  const LEGACY_DEFAULT_MODEL = "gpt-4o-mini";
7
7
  const clampNumber = (value, min, max, fallback) => {
@@ -1,4 +1,4 @@
1
- import { l as defineComponent, ah as h, j as computed, ai as onUnmounted, w as watch, aj as shallowRef, ak as loader, N as onMounted, M as nextTick, L as ref } from "./web-component-Ch6T6yFD.js";
1
+ import { l as defineComponent, ai as h, j as computed, aj as onUnmounted, w as watch, ak as shallowRef, al as loader, N as onMounted, M as nextTick, L as ref } from "./web-component-B0eG-RHU.js";
2
2
  var __defProp$2 = Object.defineProperty;
3
3
  var __defProps = Object.defineProperties;
4
4
  var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
@@ -1,4 +1,4 @@
1
- import { a as useI18n, j as computed } from "./web-component-Ch6T6yFD.js";
1
+ import { a as useI18n, j as computed } from "./web-component-B0eG-RHU.js";
2
2
  const en = {
3
3
  title: "AI Assistant",
4
4
  subtitle: "Generate and refine templates with natural language",
@@ -1,4 +1,4 @@
1
- import { c as cloneDeep, h as uuidv4, $ as normalizeVariableKey, a0 as ElementType, u as useDesignerStore, a1 as HISTORY_ACTION } from "./web-component-Ch6T6yFD.js";
1
+ import { c as cloneDeep, h as uuidv4, $ as normalizeVariableKey, a0 as ElementType, u as useDesignerStore, a1 as HISTORY_ACTION } from "./web-component-B0eG-RHU.js";
2
2
  const registry = /* @__PURE__ */ new Map();
3
3
  const registerAction = (definition) => {
4
4
  registry.set(definition.id, definition);
@@ -1,4 +1,4 @@
1
- import { al } from "./web-component-Ch6T6yFD.js";
1
+ import { am } from "./web-component-B0eG-RHU.js";
2
2
  export {
3
- al as PrintDesignerElement
3
+ am as PrintDesignerElement
4
4
  };