@beeintel/batch-image 1.0.1 → 1.1.0

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 (55) hide show
  1. package/README.md +186 -184
  2. package/dist/chunks/{AdjustToolPanel-BELqYSUR.js → AdjustToolPanel-DCNhkuE4.js} +29 -28
  3. package/dist/chunks/BackgroundToolPanel-D3TILm-m.js +43 -0
  4. package/dist/chunks/{BatchMaterials-niGKrga3.js → BatchMaterials-BPJeE3y9.js} +1 -1
  5. package/dist/chunks/BatchModeChoices-BuP83uOq.js +118 -0
  6. package/dist/chunks/{BatchOutputColorPicker-CCvmIF-b.js → BatchOutputColorPicker-CZoQzBII.js} +1 -1
  7. package/dist/chunks/BatchReferenceFields-B7SL__lu.js +308 -0
  8. package/dist/chunks/BeautifyToolPanel-DsTOjndh.js +220 -0
  9. package/dist/chunks/{BrandMarkToolPanel-FKxXth_3.js → BrandMarkToolPanel-Cob9bPYT.js} +319 -333
  10. package/dist/chunks/{ContentTrimControl-BQfigZPq.js → ContentTrimControl-CKNfHz_u.js} +1 -1
  11. package/dist/chunks/{CropToolPanel-BhSuHkYm.js → CropToolPanel-6MiynTP2.js} +60 -56
  12. package/dist/chunks/CutoutToolPanel-V-AUrbwz.js +78 -0
  13. package/dist/chunks/DisclosureToolPanel-DvouSIbA.js +72 -0
  14. package/dist/chunks/ExpandToolPanel-C98UZmBx.js +69 -0
  15. package/dist/chunks/{ImageEffectsToolPanel-BRLPIt4q.js → ImageEffectsToolPanel-hA0TlEix.js} +63 -52
  16. package/dist/chunks/{IpAuditToolPanel-DfY-mBSe.js → IpAuditToolPanel-BCQ8Kewh.js} +15 -13
  17. package/dist/chunks/{ListingToolPanel-B9Yh3LBK.js → ListingToolPanel-DH-xpvLp.js} +170 -184
  18. package/dist/chunks/{MaterialSelectionPlate-DhioUjdW.js → MaterialSelectionPlate-CQBIf6ZJ.js} +4 -4
  19. package/dist/chunks/MetadataToolPanel-z4RK3JCb.js +116 -0
  20. package/dist/chunks/{OrientToolPanel-BTrwaWBm.js → OrientToolPanel-BwtT0xKI.js} +2 -2
  21. package/dist/chunks/PluginActionFooter.vue_vue_type_script_setup_true_lang-DIRuJ1De.js +122 -0
  22. package/dist/chunks/ResizeToolPanel-BVeZbKJl.js +1171 -0
  23. package/dist/chunks/RetouchToolPanel-CqSzWVOK.js +358 -0
  24. package/dist/chunks/ShadowToolPanel-BgsCgLay.js +258 -0
  25. package/dist/chunks/SvgExportToolPanel-CdCXYYHF.js +208 -0
  26. package/dist/chunks/TranslationToolPanel-D4ETI6sf.js +102 -0
  27. package/dist/chunks/{UpscaleToolPanel-D0H-j2Tr.js → UpscaleToolPanel-D_hmQLEi.js} +44 -39
  28. package/dist/chunks/arrow-up-C1vBvuff.js +18 -0
  29. package/dist/chunks/{entry-DK9FjQZ_.js → entry-DVV89YMR.js} +7504 -7389
  30. package/dist/chunks/{loader-circle-UFoEem2a.js → loader-circle-GPucRX_4.js} +1 -1
  31. package/dist/chunks/{motionFeatures-D4miwXxc.js → motionFeatures-_pQ-ZW4p.js} +1 -1
  32. package/dist/chunks/{search-BjTSm1KS.js → search-CUAg5uDr.js} +1 -1
  33. package/dist/config.d.ts +6 -0
  34. package/dist/index.d.ts +1 -0
  35. package/dist/index.js +6 -5
  36. package/dist/resources.json +104 -94
  37. package/dist/slots.d.ts +2 -0
  38. package/dist/style.css +1 -1
  39. package/dist/tool-links.d.ts +10 -0
  40. package/dist/types/batch/public/config.d.ts +6 -0
  41. package/package.json +95 -95
  42. package/dist/chunks/BackgroundToolPanel-Dy_l8KFl.js +0 -41
  43. package/dist/chunks/BatchModeChoices-BRqn6zNI.js +0 -111
  44. package/dist/chunks/BatchReferenceFields-C4t7OSTw.js +0 -316
  45. package/dist/chunks/BeautifyToolPanel-Dc-ddaBC.js +0 -215
  46. package/dist/chunks/CutoutToolPanel-BfaZZSE_.js +0 -73
  47. package/dist/chunks/DisclosureToolPanel-B_oc5fld.js +0 -76
  48. package/dist/chunks/ExpandToolPanel-D_ZODTUZ.js +0 -67
  49. package/dist/chunks/MetadataToolPanel-KVrtb3K0.js +0 -104
  50. package/dist/chunks/PluginActionFooter.vue_vue_type_script_setup_true_lang-C2kJCYeA.js +0 -102
  51. package/dist/chunks/ResizeToolPanel-Ch_-WR74.js +0 -1178
  52. package/dist/chunks/RetouchToolPanel-BTS33Dsd.js +0 -350
  53. package/dist/chunks/ShadowToolPanel-DxJE4eyV.js +0 -254
  54. package/dist/chunks/SvgExportToolPanel-RHmuQARH.js +0 -219
  55. package/dist/chunks/TranslationToolPanel-B_qTA1hM.js +0 -125
@@ -0,0 +1,220 @@
1
+ import { defineComponent as O, ref as I, computed as v, watch as $, openBlock as u, createElementBlock as f, createTextVNode as P, toDisplayString as b, unref as a, createElementVNode as g, Fragment as R, renderList as j, createCommentVNode as m, createBlock as F, createVNode as p, withCtx as E } from "vue";
2
+ import { F as S, aM as N, aN as T, aO as G, az as h, _ as Y, G as H } from "./entry-DVV89YMR.js";
3
+ import { B as A } from "./BatchReferenceFields-B7SL__lu.js";
4
+ import { B as k } from "./BatchModeChoices-BuP83uOq.js";
5
+ import { u as J, a as K, b as C, _ as Q } from "./PluginActionFooter.vue_vue_type_script_setup_true_lang-DIRuJ1De.js";
6
+ const W = { class: "beautification-fields tool-fields" }, X = { key: 0 }, Z = ["aria-label", "value", "disabled"], _ = ["value", "disabled"], ee = {
7
+ key: 1,
8
+ class: "hint"
9
+ }, ae = ["aria-label", "value", "disabled", "placeholder"], te = {
10
+ key: 4,
11
+ class: "hint",
12
+ role: "alert"
13
+ }, le = /* @__PURE__ */ O({
14
+ __name: "BeautificationFields",
15
+ props: {
16
+ modelValue: {},
17
+ writer: { type: Boolean },
18
+ available: { type: Boolean, default: !0 },
19
+ candidates: { default: () => [] },
20
+ beautificationModes: { default: () => [] },
21
+ fixedMode: {}
22
+ },
23
+ emits: ["update:modelValue", "ready"],
24
+ setup(e, { emit: B }) {
25
+ const { ui: t, uiText: x, uiNotice: y } = S(), i = e, V = B, s = I(!1), n = I(!1), w = v(
26
+ () => N.find((o) => o.value === i.modelValue.mode)
27
+ ), M = v(
28
+ () => T.find((o) => o.value === w.value?.role)?.label ?? ""
29
+ ), r = v(
30
+ () => i.modelValue.mode === "staging" && i.modelValue.stagingMode === "shared_product"
31
+ ), D = v(() => ({
32
+ references: i.modelValue.productImages ?? [],
33
+ referenceUploadNeedsReview: i.modelValue.productUploadNeedsReview
34
+ })), U = v(() => {
35
+ try {
36
+ return G(i.modelValue, i.beautificationModes), "";
37
+ } catch (o) {
38
+ return o.message;
39
+ }
40
+ }), L = v(
41
+ () => i.writer && i.available && !s.value && !n.value && !U.value
42
+ );
43
+ $(L, (o) => V("ready", o), { immediate: !0 });
44
+ function c(o) {
45
+ i.writer && V("update:modelValue", { ...i.modelValue, ...o });
46
+ }
47
+ function q(o) {
48
+ c(o);
49
+ }
50
+ function z(o) {
51
+ c({
52
+ productImages: o.references,
53
+ productUploadNeedsReview: o.referenceUploadNeedsReview
54
+ });
55
+ }
56
+ return (o, d) => (u(), f("div", W, [
57
+ e.fixedMode ? m("", !0) : (u(), f("label", X, [
58
+ P(b(a(t)("tools.beautify.beautificationFields_ee800328")), 1),
59
+ g("select", {
60
+ "aria-label": a(t)("tools.beautify.beautificationFields_ee800328"),
61
+ value: e.modelValue.mode,
62
+ disabled: !e.writer,
63
+ onChange: d[0] || (d[0] = (l) => c({ mode: l.target.value }))
64
+ }, [
65
+ (u(!0), f(R, null, j(a(N), (l) => (u(), f("option", {
66
+ key: l.value,
67
+ value: l.value,
68
+ disabled: !e.beautificationModes.includes(l.value)
69
+ }, b(a(x)(l.label)) + b(e.beautificationModes.includes(l.value) ? "" : a(t)("common.toolPanel_14a718cd")), 9, _))), 128))
70
+ ], 40, Z)
71
+ ])),
72
+ e.modelValue.mode === "ghost" ? (u(), F(k, {
73
+ key: 1,
74
+ label: a(t)("tools.beautify.beautificationFields_9aaa3a96"),
75
+ "model-value": e.modelValue.viewAngle ?? "front",
76
+ disabled: !e.writer || !e.available,
77
+ options: [
78
+ {
79
+ value: "front",
80
+ label: a(t)("tools.beautify.nested_740f5e81"),
81
+ image: a(h)("mode-cards-v3/ghost-front.webp")
82
+ },
83
+ {
84
+ value: "three_quarter",
85
+ label: a(t)("tools.beautify.nested_b81b0bc4"),
86
+ image: a(h)("mode-cards-v3/ghost-three-quarter.webp")
87
+ }
88
+ ],
89
+ "onUpdate:modelValue": d[1] || (d[1] = (l) => c({ viewAngle: l }))
90
+ }, null, 8, ["label", "model-value", "disabled", "options"])) : m("", !0),
91
+ e.modelValue.mode === "flatlay" ? (u(), F(k, {
92
+ key: 2,
93
+ label: a(t)("tools.beautify.beautificationFields_bf266893"),
94
+ "model-value": e.modelValue.arrangement ?? "natural",
95
+ disabled: !e.writer || !e.available,
96
+ options: [
97
+ {
98
+ value: "natural",
99
+ label: a(t)("tools.beautify.nested_ff6b653a"),
100
+ image: a(h)("mode-cards-v3/flatlay-open.webp")
101
+ },
102
+ {
103
+ value: "sleeves_in",
104
+ label: a(t)("tools.beautify.nested_d2b60c60"),
105
+ image: a(h)("mode-cards-v3/flatlay-fold.webp")
106
+ }
107
+ ],
108
+ "onUpdate:modelValue": d[2] || (d[2] = (l) => c({ arrangement: l }))
109
+ }, null, 8, ["label", "model-value", "disabled", "options"])) : m("", !0),
110
+ e.modelValue.mode === "staging" ? (u(), f(R, { key: 3 }, [
111
+ p(k, {
112
+ label: a(t)("tools.beautify.beautificationFields_422660c5"),
113
+ help: r.value ? a(t)("tools.beautify.beautificationFields_c1417394") : a(t)("tools.beautify.beautificationFields_5456e3c8"),
114
+ "model-value": e.modelValue.stagingMode ?? "shared_scene",
115
+ disabled: !e.writer || !e.available || n.value || s.value,
116
+ options: [
117
+ {
118
+ value: "shared_product",
119
+ label: a(t)("tools.beautify.nested_619f09ba"),
120
+ flow: "one-to-many"
121
+ },
122
+ {
123
+ value: "shared_scene",
124
+ label: a(t)("tools.beautify.nested_e2351240"),
125
+ flow: "many-to-one"
126
+ }
127
+ ],
128
+ "onUpdate:modelValue": d[3] || (d[3] = (l) => c({ stagingMode: l }))
129
+ }, null, 8, ["label", "help", "model-value", "disabled", "options"]),
130
+ r.value ? (u(), F(A, {
131
+ key: "products",
132
+ "model-value": D.value,
133
+ writer: e.writer && !s.value,
134
+ candidates: e.candidates,
135
+ "max-count": Math.min(4, Math.max(0, 10 - e.modelValue.references.length)),
136
+ title: a(t)("tools.beautify.beautificationFields_d432b440"),
137
+ "purpose-placeholder": "例如:正面主图,另一张提供背面细节",
138
+ "upload-label": "上传商品图",
139
+ "confirm-label": "确认当前商品集合",
140
+ description: a(t)("tools.beautify.beautificationFields_4065f2d3"),
141
+ "onUpdate:modelValue": z,
142
+ onBusy: d[4] || (d[4] = (l) => n.value = l)
143
+ }, null, 8, ["model-value", "writer", "candidates", "max-count", "title", "description"])) : m("", !0),
144
+ !r.value && e.modelValue.productUploadNeedsReview ? (u(), f("p", ee, b(a(t)("tools.beautify.beautificationFields_a4d4d704")), 1)) : m("", !0)
145
+ ], 64)) : m("", !0),
146
+ g("details", null, [
147
+ g("summary", null, b(a(t)("common.toolPanel_40c2f529")), 1),
148
+ g("label", null, [
149
+ P(b(a(t)("tools.beautify.beautificationFields_2cd79953")), 1),
150
+ g("textarea", {
151
+ "aria-label": a(t)("tools.beautify.beautificationFields_e1274129"),
152
+ value: e.modelValue.instructions,
153
+ disabled: !e.writer,
154
+ maxlength: "8000",
155
+ rows: "3",
156
+ placeholder: a(t)("tools.beautify.beautificationFields_f1fbcc5d"),
157
+ onInput: d[5] || (d[5] = (l) => c({ instructions: l.target.value }))
158
+ }, null, 40, ae)
159
+ ])
160
+ ]),
161
+ p(A, {
162
+ key: "references",
163
+ "model-value": e.modelValue,
164
+ writer: e.writer && !n.value,
165
+ candidates: e.candidates,
166
+ roles: a(T),
167
+ "default-role-label": M.value,
168
+ "max-count": r.value ? Math.max(0, 10 - (e.modelValue.productImages?.length ?? 0)) : 10,
169
+ "number-offset": r.value ? 2 + (e.modelValue.productImages?.length ?? 0) : 2,
170
+ title: r.value ? a(t)("tools.beautify.beautificationFields_95a5b7ca") : a(t)("tools.beautify.beautificationFields_ba115652"),
171
+ description: r.value ? a(t)("tools.beautify.beautificationFields_359388b6") : a(t)("tools.beautify.beautificationFields_9d5eff9a"),
172
+ "onUpdate:modelValue": q,
173
+ onBusy: d[6] || (d[6] = (l) => s.value = l)
174
+ }, null, 8, ["model-value", "writer", "candidates", "roles", "default-role-label", "max-count", "number-offset", "title", "description"]),
175
+ U.value && !s.value && !n.value ? (u(), f("p", te, b(a(y)(U.value)), 1)) : m("", !0)
176
+ ]));
177
+ }
178
+ }), oe = /* @__PURE__ */ Y(le, [["__scopeId", "data-v-c0784fc8"]]), re = /* @__PURE__ */ O({
179
+ __name: "BeautifyToolPanel",
180
+ props: {
181
+ context: {}
182
+ },
183
+ setup(e) {
184
+ const { ui: B, uiText: t } = S(), x = e, y = J(() => x.context), i = I(!1), V = v(
185
+ () => [
186
+ t(N.find((n) => n.value === y.value.beautify.mode)?.description),
187
+ B("tools.beautify.beautificationFields_154226a1")
188
+ ].join(`
189
+ `)
190
+ ), s = K(() => x.context, "beautify");
191
+ return (n, w) => (u(), F(H, {
192
+ context: e.context,
193
+ layout: "contained",
194
+ help: V.value
195
+ }, {
196
+ actions: E(() => [
197
+ p(Q, {
198
+ context: e.context,
199
+ available: a(C)(e.context),
200
+ ready: i.value
201
+ }, null, 8, ["context", "available", "ready"])
202
+ ]),
203
+ default: E(() => [
204
+ p(oe, {
205
+ "model-value": a(y).beautify,
206
+ writer: !e.context.readonly,
207
+ available: a(C)(e.context),
208
+ "beautification-modes": e.context.view.beautificationModes,
209
+ "fixed-mode": e.context.entryId ? a(y).beautify.mode : void 0,
210
+ "onUpdate:modelValue": a(s),
211
+ onReady: w[0] || (w[0] = (M) => i.value = M)
212
+ }, null, 8, ["model-value", "writer", "available", "beautification-modes", "fixed-mode", "onUpdate:modelValue"])
213
+ ]),
214
+ _: 1
215
+ }, 8, ["context", "help"]));
216
+ }
217
+ });
218
+ export {
219
+ re as default
220
+ };