@beeintel/batch-image 1.0.0 → 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.
- package/README.md +7 -3
- package/dist/chunks/{AdjustToolPanel-B6dtlFlj.js → AdjustToolPanel-DCNhkuE4.js} +21 -20
- package/dist/chunks/BackgroundToolPanel-D3TILm-m.js +43 -0
- package/dist/chunks/{BatchMaterials-DDoJTaS5.js → BatchMaterials-BPJeE3y9.js} +1 -1
- package/dist/chunks/BatchModeChoices-BuP83uOq.js +118 -0
- package/dist/chunks/{BatchOutputColorPicker-D7WIDS4_.js → BatchOutputColorPicker-CZoQzBII.js} +2 -2
- package/dist/chunks/BatchReferenceFields-B7SL__lu.js +308 -0
- package/dist/chunks/BeautifyToolPanel-DsTOjndh.js +220 -0
- package/dist/chunks/{BrandMarkToolPanel-vKobk_R3.js → BrandMarkToolPanel-Cob9bPYT.js} +319 -333
- package/dist/chunks/{ContentTrimControl-BKCJEst5.js → ContentTrimControl-CKNfHz_u.js} +2 -2
- package/dist/chunks/{CropToolPanel-C_sW5tWL.js → CropToolPanel-6MiynTP2.js} +60 -56
- package/dist/chunks/CutoutToolPanel-V-AUrbwz.js +78 -0
- package/dist/chunks/DisclosureToolPanel-DvouSIbA.js +72 -0
- package/dist/chunks/ExpandToolPanel-C98UZmBx.js +69 -0
- package/dist/chunks/{ImageEffectsToolPanel-CsDIBpT6.js → ImageEffectsToolPanel-hA0TlEix.js} +63 -52
- package/dist/chunks/{IpAuditToolPanel-CduDfFh-.js → IpAuditToolPanel-BCQ8Kewh.js} +15 -13
- package/dist/chunks/{ListingToolPanel-8pJ2_zvI.js → ListingToolPanel-DH-xpvLp.js} +170 -184
- package/dist/chunks/{MaterialSelectionPlate-CW7HaS6v.js → MaterialSelectionPlate-CQBIf6ZJ.js} +4 -4
- package/dist/chunks/MetadataToolPanel-z4RK3JCb.js +116 -0
- package/dist/chunks/{OrientToolPanel-C1AzQchm.js → OrientToolPanel-BwtT0xKI.js} +3 -3
- package/dist/chunks/PluginActionFooter.vue_vue_type_script_setup_true_lang-DIRuJ1De.js +122 -0
- package/dist/chunks/ResizeToolPanel-BVeZbKJl.js +1171 -0
- package/dist/chunks/RetouchToolPanel-CqSzWVOK.js +358 -0
- package/dist/chunks/ShadowToolPanel-BgsCgLay.js +258 -0
- package/dist/chunks/SvgExportToolPanel-CdCXYYHF.js +208 -0
- package/dist/chunks/TranslationToolPanel-D4ETI6sf.js +102 -0
- package/dist/chunks/{UpscaleToolPanel-BRIgpszs.js → UpscaleToolPanel-D_hmQLEi.js} +44 -39
- package/dist/chunks/arrow-up-C1vBvuff.js +18 -0
- package/dist/chunks/{entry-CboOSe2r.js → entry-DVV89YMR.js} +7614 -7498
- package/dist/chunks/{loader-circle-CylCgDqP.js → loader-circle-GPucRX_4.js} +1 -1
- package/dist/chunks/{motionFeatures-D67ghPG1.js → motionFeatures-_pQ-ZW4p.js} +1 -1
- package/dist/chunks/{search-BwsDnulU.js → search-CUAg5uDr.js} +1 -1
- package/dist/config.d.ts +6 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +6 -5
- package/dist/node/cli.mjs +0 -0
- package/dist/resources.json +104 -94
- package/dist/slots.d.ts +2 -0
- package/dist/style.css +1 -1
- package/dist/tool-links.d.ts +10 -0
- package/dist/types/batch/public/config.d.ts +6 -0
- package/package.json +9 -8
- package/dist/chunks/BackgroundToolPanel-C3Rr9d4S.js +0 -41
- package/dist/chunks/BatchModeChoices-DeBARgvY.js +0 -111
- package/dist/chunks/BatchReferenceFields-Cr5WgFRJ.js +0 -316
- package/dist/chunks/BeautifyToolPanel-DDZXDQKM.js +0 -215
- package/dist/chunks/CutoutToolPanel-B7ObmiWd.js +0 -73
- package/dist/chunks/DisclosureToolPanel-F3ccFJIF.js +0 -76
- package/dist/chunks/ExpandToolPanel-BKjj5UJA.js +0 -67
- package/dist/chunks/MetadataToolPanel-C8XJOamN.js +0 -104
- package/dist/chunks/PluginActionFooter.vue_vue_type_script_setup_true_lang-BGe419qz.js +0 -102
- package/dist/chunks/ResizeToolPanel-DWikcj2G.js +0 -1178
- package/dist/chunks/RetouchToolPanel-B4eQKk2W.js +0 -350
- package/dist/chunks/ShadowToolPanel-Bbj76hQd.js +0 -254
- package/dist/chunks/SvgExportToolPanel-BRxpzd7q.js +0 -219
- package/dist/chunks/TranslationToolPanel-Bxv8U2WY.js +0 -125
|
@@ -1,215 +0,0 @@
|
|
|
1
|
-
import { defineComponent as T, ref as U, computed as v, watch as $, openBlock as u, createElementBlock as b, createTextVNode as k, toDisplayString as n, unref as e, createElementVNode as s, Fragment as I, renderList as z, createCommentVNode as m, createBlock as h, createVNode as F, withCtx as N } from "vue";
|
|
2
|
-
import { F as G, aN as R, aO as A, aP as Y, aA as x, _ as j, G as H } from "./entry-CboOSe2r.js";
|
|
3
|
-
import { B as E } from "./BatchReferenceFields-Cr5WgFRJ.js";
|
|
4
|
-
import { B as M } from "./BatchModeChoices-DeBARgvY.js";
|
|
5
|
-
import { u as J, a as K, b as C, _ as Q } from "./PluginActionFooter.vue_vue_type_script_setup_true_lang-BGe419qz.js";
|
|
6
|
-
const W = { class: "beautification-fields tool-fields" }, X = { key: 0 }, Z = ["aria-label", "value", "disabled"], _ = ["value", "disabled"], ee = { class: "hint" }, ae = { class: "tool-note" }, te = {
|
|
7
|
-
key: 1,
|
|
8
|
-
class: "hint"
|
|
9
|
-
}, le = ["aria-label", "value", "disabled", "placeholder"], oe = {
|
|
10
|
-
key: 4,
|
|
11
|
-
class: "hint",
|
|
12
|
-
role: "alert"
|
|
13
|
-
}, ie = { class: "tool-note" }, de = /* @__PURE__ */ T({
|
|
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(a, { emit: w }) {
|
|
25
|
-
const { ui: t, uiText: y, uiNotice: B } = G(), d = a, g = w, r = U(!1), V = U(!1), P = v(
|
|
26
|
-
() => R.find((o) => o.value === d.modelValue.mode)
|
|
27
|
-
), O = v(
|
|
28
|
-
() => A.find((o) => o.value === P.value?.role)?.label ?? ""
|
|
29
|
-
), c = v(
|
|
30
|
-
() => d.modelValue.mode === "staging" && d.modelValue.stagingMode === "shared_product"
|
|
31
|
-
), S = v(() => ({
|
|
32
|
-
references: d.modelValue.productImages ?? [],
|
|
33
|
-
referenceUploadNeedsReview: d.modelValue.productUploadNeedsReview
|
|
34
|
-
})), p = v(() => {
|
|
35
|
-
try {
|
|
36
|
-
return Y(d.modelValue, d.beautificationModes), "";
|
|
37
|
-
} catch (o) {
|
|
38
|
-
return o.message;
|
|
39
|
-
}
|
|
40
|
-
}), D = v(
|
|
41
|
-
() => d.writer && d.available && !r.value && !V.value && !p.value
|
|
42
|
-
);
|
|
43
|
-
$(D, (o) => g("ready", o), { immediate: !0 });
|
|
44
|
-
function f(o) {
|
|
45
|
-
d.writer && g("update:modelValue", { ...d.modelValue, ...o });
|
|
46
|
-
}
|
|
47
|
-
function L(o) {
|
|
48
|
-
f(o);
|
|
49
|
-
}
|
|
50
|
-
function q(o) {
|
|
51
|
-
f({
|
|
52
|
-
productImages: o.references,
|
|
53
|
-
productUploadNeedsReview: o.referenceUploadNeedsReview
|
|
54
|
-
});
|
|
55
|
-
}
|
|
56
|
-
return (o, i) => (u(), b("div", W, [
|
|
57
|
-
a.fixedMode ? m("", !0) : (u(), b("label", X, [
|
|
58
|
-
k(n(e(t)("tools.beautify.beautificationFields_ee800328")), 1),
|
|
59
|
-
s("select", {
|
|
60
|
-
"aria-label": e(t)("tools.beautify.beautificationFields_ee800328"),
|
|
61
|
-
value: a.modelValue.mode,
|
|
62
|
-
disabled: !a.writer,
|
|
63
|
-
onChange: i[0] || (i[0] = (l) => f({ mode: l.target.value }))
|
|
64
|
-
}, [
|
|
65
|
-
(u(!0), b(I, null, z(e(R), (l) => (u(), b("option", {
|
|
66
|
-
key: l.value,
|
|
67
|
-
value: l.value,
|
|
68
|
-
disabled: !a.beautificationModes.includes(l.value)
|
|
69
|
-
}, n(e(y)(l.label)) + n(a.beautificationModes.includes(l.value) ? "" : e(t)("common.toolPanel_14a718cd")), 9, _))), 128))
|
|
70
|
-
], 40, Z)
|
|
71
|
-
])),
|
|
72
|
-
s("p", ee, n(e(y)(P.value?.description)), 1),
|
|
73
|
-
a.modelValue.mode === "ghost" ? (u(), h(M, {
|
|
74
|
-
key: 1,
|
|
75
|
-
label: e(t)("tools.beautify.beautificationFields_9aaa3a96"),
|
|
76
|
-
"model-value": a.modelValue.viewAngle ?? "front",
|
|
77
|
-
disabled: !a.writer || !a.available,
|
|
78
|
-
options: [
|
|
79
|
-
{
|
|
80
|
-
value: "front",
|
|
81
|
-
label: e(t)("tools.beautify.nested_740f5e81"),
|
|
82
|
-
image: e(x)("mode-cards-v3/ghost-front.webp")
|
|
83
|
-
},
|
|
84
|
-
{
|
|
85
|
-
value: "three_quarter",
|
|
86
|
-
label: e(t)("tools.beautify.nested_b81b0bc4"),
|
|
87
|
-
image: e(x)("mode-cards-v3/ghost-three-quarter.webp")
|
|
88
|
-
}
|
|
89
|
-
],
|
|
90
|
-
"onUpdate:modelValue": i[1] || (i[1] = (l) => f({ viewAngle: l }))
|
|
91
|
-
}, null, 8, ["label", "model-value", "disabled", "options"])) : m("", !0),
|
|
92
|
-
a.modelValue.mode === "flatlay" ? (u(), h(M, {
|
|
93
|
-
key: 2,
|
|
94
|
-
label: e(t)("tools.beautify.beautificationFields_bf266893"),
|
|
95
|
-
"model-value": a.modelValue.arrangement ?? "natural",
|
|
96
|
-
disabled: !a.writer || !a.available,
|
|
97
|
-
options: [
|
|
98
|
-
{
|
|
99
|
-
value: "natural",
|
|
100
|
-
label: e(t)("tools.beautify.nested_ff6b653a"),
|
|
101
|
-
image: e(x)("mode-cards-v3/flatlay-open.webp")
|
|
102
|
-
},
|
|
103
|
-
{
|
|
104
|
-
value: "sleeves_in",
|
|
105
|
-
label: e(t)("tools.beautify.nested_d2b60c60"),
|
|
106
|
-
image: e(x)("mode-cards-v3/flatlay-fold.webp")
|
|
107
|
-
}
|
|
108
|
-
],
|
|
109
|
-
"onUpdate:modelValue": i[2] || (i[2] = (l) => f({ arrangement: l }))
|
|
110
|
-
}, null, 8, ["label", "model-value", "disabled", "options"])) : m("", !0),
|
|
111
|
-
a.modelValue.mode === "staging" ? (u(), b(I, { key: 3 }, [
|
|
112
|
-
F(M, {
|
|
113
|
-
label: e(t)("tools.beautify.beautificationFields_422660c5"),
|
|
114
|
-
"model-value": a.modelValue.stagingMode ?? "shared_scene",
|
|
115
|
-
disabled: !a.writer || !a.available || V.value || r.value,
|
|
116
|
-
options: [
|
|
117
|
-
{
|
|
118
|
-
value: "shared_product",
|
|
119
|
-
label: e(t)("tools.beautify.nested_619f09ba"),
|
|
120
|
-
flow: "one-to-many"
|
|
121
|
-
},
|
|
122
|
-
{
|
|
123
|
-
value: "shared_scene",
|
|
124
|
-
label: e(t)("tools.beautify.nested_e2351240"),
|
|
125
|
-
flow: "many-to-one"
|
|
126
|
-
}
|
|
127
|
-
],
|
|
128
|
-
"onUpdate:modelValue": i[3] || (i[3] = (l) => f({ stagingMode: l }))
|
|
129
|
-
}, null, 8, ["label", "model-value", "disabled", "options"]),
|
|
130
|
-
s("p", ae, n(c.value ? e(t)("tools.beautify.beautificationFields_c1417394") : e(t)("tools.beautify.beautificationFields_5456e3c8")), 1),
|
|
131
|
-
c.value ? (u(), h(E, {
|
|
132
|
-
key: "products",
|
|
133
|
-
"model-value": S.value,
|
|
134
|
-
writer: a.writer && !r.value,
|
|
135
|
-
candidates: a.candidates,
|
|
136
|
-
"max-count": Math.min(4, Math.max(0, 10 - a.modelValue.references.length)),
|
|
137
|
-
title: e(t)("tools.beautify.beautificationFields_d432b440"),
|
|
138
|
-
"purpose-placeholder": "例如:正面主图,另一张提供背面细节",
|
|
139
|
-
"upload-label": "上传商品图",
|
|
140
|
-
"confirm-label": "确认当前商品集合",
|
|
141
|
-
description: e(t)("tools.beautify.beautificationFields_4065f2d3"),
|
|
142
|
-
"onUpdate:modelValue": q,
|
|
143
|
-
onBusy: i[4] || (i[4] = (l) => V.value = l)
|
|
144
|
-
}, null, 8, ["model-value", "writer", "candidates", "max-count", "title", "description"])) : m("", !0),
|
|
145
|
-
!c.value && a.modelValue.productUploadNeedsReview ? (u(), b("p", te, n(e(t)("tools.beautify.beautificationFields_a4d4d704")), 1)) : m("", !0)
|
|
146
|
-
], 64)) : m("", !0),
|
|
147
|
-
s("details", null, [
|
|
148
|
-
s("summary", null, n(e(t)("common.toolPanel_40c2f529")), 1),
|
|
149
|
-
s("label", null, [
|
|
150
|
-
k(n(e(t)("tools.beautify.beautificationFields_2cd79953")), 1),
|
|
151
|
-
s("textarea", {
|
|
152
|
-
"aria-label": e(t)("tools.beautify.beautificationFields_e1274129"),
|
|
153
|
-
value: a.modelValue.instructions,
|
|
154
|
-
disabled: !a.writer,
|
|
155
|
-
maxlength: "8000",
|
|
156
|
-
rows: "3",
|
|
157
|
-
placeholder: e(t)("tools.beautify.beautificationFields_f1fbcc5d"),
|
|
158
|
-
onInput: i[5] || (i[5] = (l) => f({ instructions: l.target.value }))
|
|
159
|
-
}, null, 40, le)
|
|
160
|
-
])
|
|
161
|
-
]),
|
|
162
|
-
F(E, {
|
|
163
|
-
key: "references",
|
|
164
|
-
"model-value": a.modelValue,
|
|
165
|
-
writer: a.writer && !V.value,
|
|
166
|
-
candidates: a.candidates,
|
|
167
|
-
roles: e(A),
|
|
168
|
-
"default-role-label": O.value,
|
|
169
|
-
"max-count": c.value ? Math.max(0, 10 - (a.modelValue.productImages?.length ?? 0)) : 10,
|
|
170
|
-
"number-offset": c.value ? 2 + (a.modelValue.productImages?.length ?? 0) : 2,
|
|
171
|
-
title: c.value ? e(t)("tools.beautify.beautificationFields_95a5b7ca") : e(t)("tools.beautify.beautificationFields_ba115652"),
|
|
172
|
-
description: c.value ? e(t)("tools.beautify.beautificationFields_359388b6") : e(t)("tools.beautify.beautificationFields_9d5eff9a"),
|
|
173
|
-
"onUpdate:modelValue": L,
|
|
174
|
-
onBusy: i[6] || (i[6] = (l) => r.value = l)
|
|
175
|
-
}, null, 8, ["model-value", "writer", "candidates", "roles", "default-role-label", "max-count", "number-offset", "title", "description"]),
|
|
176
|
-
p.value && !r.value && !V.value ? (u(), b("p", oe, n(e(B)(p.value)), 1)) : m("", !0),
|
|
177
|
-
s("p", ie, n(e(t)("tools.beautify.beautificationFields_154226a1")), 1)
|
|
178
|
-
]));
|
|
179
|
-
}
|
|
180
|
-
}), ue = /* @__PURE__ */ j(de, [["__scopeId", "data-v-3d736997"]]), be = /* @__PURE__ */ T({
|
|
181
|
-
__name: "BeautifyToolPanel",
|
|
182
|
-
props: {
|
|
183
|
-
context: {}
|
|
184
|
-
},
|
|
185
|
-
setup(a) {
|
|
186
|
-
const w = a, t = J(() => w.context), y = U(!1), B = K(() => w.context, "beautify");
|
|
187
|
-
return (d, g) => (u(), h(H, {
|
|
188
|
-
context: a.context,
|
|
189
|
-
layout: "contained"
|
|
190
|
-
}, {
|
|
191
|
-
actions: N(() => [
|
|
192
|
-
F(Q, {
|
|
193
|
-
context: a.context,
|
|
194
|
-
available: e(C)(a.context),
|
|
195
|
-
ready: y.value
|
|
196
|
-
}, null, 8, ["context", "available", "ready"])
|
|
197
|
-
]),
|
|
198
|
-
default: N(() => [
|
|
199
|
-
F(ue, {
|
|
200
|
-
"model-value": e(t).beautify,
|
|
201
|
-
writer: !a.context.readonly,
|
|
202
|
-
available: e(C)(a.context),
|
|
203
|
-
"beautification-modes": a.context.view.beautificationModes,
|
|
204
|
-
"fixed-mode": a.context.entryId ? e(t).beautify.mode : void 0,
|
|
205
|
-
"onUpdate:modelValue": e(B),
|
|
206
|
-
onReady: g[0] || (g[0] = (r) => y.value = r)
|
|
207
|
-
}, null, 8, ["model-value", "writer", "available", "beautification-modes", "fixed-mode", "onUpdate:modelValue"])
|
|
208
|
-
]),
|
|
209
|
-
_: 1
|
|
210
|
-
}, 8, ["context"]));
|
|
211
|
-
}
|
|
212
|
-
});
|
|
213
|
-
export {
|
|
214
|
-
be as default
|
|
215
|
-
};
|
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
import { defineComponent as p, useId as C, ref as g, computed as P, openBlock as c, createBlock as T, withCtx as x, createElementVNode as l, unref as t, createElementBlock as b, Fragment as y, renderList as k, toDisplayString as r, createVNode as s } from "vue";
|
|
2
|
-
import { F as D, G as h, a3 as B, _ as M } from "./entry-CboOSe2r.js";
|
|
3
|
-
import { u as w, _ as V } from "./PluginActionFooter.vue_vue_type_script_setup_true_lang-BGe419qz.js";
|
|
4
|
-
import { B as E } from "./BatchOutputColorPicker-D7WIDS4_.js";
|
|
5
|
-
import { C as I } from "./ContentTrimControl-BKCJEst5.js";
|
|
6
|
-
const U = ["disabled"], F = ["aria-label"], O = ["name", "value", "checked", "disabled", "onChange"], S = { class: "output-color-field" }, A = /* @__PURE__ */ p({
|
|
7
|
-
__name: "CutoutToolPanel",
|
|
8
|
-
props: {
|
|
9
|
-
context: {}
|
|
10
|
-
},
|
|
11
|
-
setup(o) {
|
|
12
|
-
const { ui: d, uiText: u } = D(), v = C(), m = o, n = w(() => m.context), f = g(!0), i = P(() => m.context.view.availableCutoutModes ?? ["isnet_fp16"]);
|
|
13
|
-
return (G, a) => (c(), T(h, { context: o.context }, {
|
|
14
|
-
actions: x(() => [
|
|
15
|
-
s(V, {
|
|
16
|
-
context: o.context,
|
|
17
|
-
available: i.value.includes(t(n).cutoutModel),
|
|
18
|
-
ready: f.value,
|
|
19
|
-
"unavailable-reason": o.context.view.aiAvailable === !1 ? void 0 : t(d)("common.toolPanel_d6b2b599")
|
|
20
|
-
}, null, 8, ["context", "available", "ready", "unavailable-reason"])
|
|
21
|
-
]),
|
|
22
|
-
default: x(() => [
|
|
23
|
-
l("fieldset", {
|
|
24
|
-
class: "tool-fields plugin-fields",
|
|
25
|
-
disabled: o.context.readonly
|
|
26
|
-
}, [
|
|
27
|
-
l("div", {
|
|
28
|
-
class: "mode-cards",
|
|
29
|
-
role: "radiogroup",
|
|
30
|
-
"aria-label": t(d)("common.toolPanel_4fcda57d")
|
|
31
|
-
}, [
|
|
32
|
-
(c(!0), b(y, null, k(t(B).filter((e) => o.context.modeAllowed?.(e.model) !== !1), (e) => (c(), b("label", {
|
|
33
|
-
class: "mode-card",
|
|
34
|
-
key: e.model
|
|
35
|
-
}, [
|
|
36
|
-
l("input", {
|
|
37
|
-
type: "radio",
|
|
38
|
-
name: t(v),
|
|
39
|
-
value: e.model,
|
|
40
|
-
checked: t(n).cutoutModel === e.model,
|
|
41
|
-
disabled: !i.value.includes(e.model),
|
|
42
|
-
onChange: (N) => o.context.updateDraft({ cutoutModel: e.model })
|
|
43
|
-
}, null, 40, O),
|
|
44
|
-
l("span", null, r(t(u)(e.label)) + r(i.value.includes(e.model) ? "" : t(d)("common.toolPanel_14a718cd")), 1)
|
|
45
|
-
]))), 128))
|
|
46
|
-
], 8, F),
|
|
47
|
-
l("div", S, [
|
|
48
|
-
l("span", null, r(t(d)("common.toolPanel_243779ee")), 1),
|
|
49
|
-
s(E, {
|
|
50
|
-
"model-value": t(n).outputColor,
|
|
51
|
-
disabled: o.context.readonly,
|
|
52
|
-
"onUpdate:modelValue": a[0] || (a[0] = (e) => o.context.updateDraft({ outputColor: e }))
|
|
53
|
-
}, null, 8, ["model-value", "disabled"])
|
|
54
|
-
]),
|
|
55
|
-
s(I, {
|
|
56
|
-
enabled: t(n).cutoutTrimTransparent === !0,
|
|
57
|
-
padding: t(n).cutoutTrimPadding ?? 0,
|
|
58
|
-
disabled: o.context.readonly,
|
|
59
|
-
source: o.context.view.currentImageSource,
|
|
60
|
-
help: t(u)("默认保留画布;开启后先裁透明边,再填底色,新增边距保持透明。") + " " + t(u)("预览当前图边距;抠图后的内容范围以实际结果为准。新增边距保持透明。"),
|
|
61
|
-
onEnabled: a[1] || (a[1] = (e) => o.context.updateDraft({ cutoutTrimTransparent: e })),
|
|
62
|
-
onPadding: a[2] || (a[2] = (e) => o.context.updateDraft({ cutoutTrimPadding: e })),
|
|
63
|
-
onValidity: a[3] || (a[3] = (e) => f.value = e)
|
|
64
|
-
}, null, 8, ["enabled", "padding", "disabled", "source", "help"])
|
|
65
|
-
], 8, U)
|
|
66
|
-
]),
|
|
67
|
-
_: 1
|
|
68
|
-
}, 8, ["context"]));
|
|
69
|
-
}
|
|
70
|
-
}), H = /* @__PURE__ */ M(A, [["__scopeId", "data-v-40a534d4"]]);
|
|
71
|
-
export {
|
|
72
|
-
H as default
|
|
73
|
-
};
|
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
import { defineComponent as p, computed as d, useId as P, openBlock as a, createBlock as g, withCtx as v, createElementVNode as c, createElementBlock as s, toDisplayString as u, unref as e, createCommentVNode as m, Fragment as k, renderList as y, createTextVNode as w, createVNode as D } from "vue";
|
|
2
|
-
import { F as N, G as V, _ as C } from "./entry-CboOSe2r.js";
|
|
3
|
-
import { u as M, b as B, _ as I } from "./PluginActionFooter.vue_vue_type_script_setup_true_lang-BGe419qz.js";
|
|
4
|
-
const T = ["disabled"], F = {
|
|
5
|
-
key: 0,
|
|
6
|
-
class: "disclosure-state",
|
|
7
|
-
role: "status"
|
|
8
|
-
}, A = { key: 0 }, E = ["aria-label"], G = ["name", "value", "checked", "onChange"], $ = {
|
|
9
|
-
key: 1,
|
|
10
|
-
class: "hint"
|
|
11
|
-
}, L = {
|
|
12
|
-
key: 2,
|
|
13
|
-
class: "hint"
|
|
14
|
-
}, S = { key: 3 }, U = ["value"], j = /* @__PURE__ */ p({
|
|
15
|
-
__name: "DisclosureToolPanel",
|
|
16
|
-
props: {
|
|
17
|
-
context: {}
|
|
18
|
-
},
|
|
19
|
-
setup(l) {
|
|
20
|
-
const { ui: t, uiText: x } = N(), i = l, r = M(() => i.context), f = d(() => i.context.view.currentName), n = d(() => i.context.view.currentDisclosure), h = P(), b = d(() => r.value.disclosureMode === "manual" || B(i.context));
|
|
21
|
-
return (q, _) => (a(), g(V, { context: l.context }, {
|
|
22
|
-
actions: v(() => [
|
|
23
|
-
D(I, {
|
|
24
|
-
context: l.context,
|
|
25
|
-
available: b.value
|
|
26
|
-
}, null, 8, ["context", "available"])
|
|
27
|
-
]),
|
|
28
|
-
default: v(() => [
|
|
29
|
-
c("fieldset", {
|
|
30
|
-
class: "tool-fields plugin-fields",
|
|
31
|
-
disabled: l.context.readonly
|
|
32
|
-
}, [
|
|
33
|
-
n.value ? (a(), s("div", F, [
|
|
34
|
-
c("p", null, u(n.value?.status === "verified" ? n.value.method === "manual" ? e(t)("common.toolPanel_30447085") : e(t)("common.imageViewer_91b98855") : n.value?.status === "review" ? e(t)("common.imageViewer_7d383a32") : n.value?.status === "unchanged" ? e(t)("common.toolPanel_f9be9593") : f.value ? e(t)("common.toolPanel_3ec579b3") : e(t)("common.toolPanel_cb6df471")), 1),
|
|
35
|
-
n.value ? (a(), s("small", A, u(e(x)(n.value.reason)), 1)) : m("", !0)
|
|
36
|
-
])) : m("", !0),
|
|
37
|
-
c("div", {
|
|
38
|
-
class: "mode-cards",
|
|
39
|
-
role: "radiogroup",
|
|
40
|
-
"aria-label": e(t)("common.toolPanel_171d09fa")
|
|
41
|
-
}, [
|
|
42
|
-
(a(!0), s(k, null, y(["manual", "ai"].filter(
|
|
43
|
-
(o) => l.context.modeAllowed?.(o) !== !1
|
|
44
|
-
), (o) => (a(), s("label", {
|
|
45
|
-
key: o,
|
|
46
|
-
class: "mode-card"
|
|
47
|
-
}, [
|
|
48
|
-
c("input", {
|
|
49
|
-
type: "radio",
|
|
50
|
-
name: e(h),
|
|
51
|
-
value: o,
|
|
52
|
-
checked: e(r).disclosureMode === o,
|
|
53
|
-
onChange: (z) => l.context.updateDraft({ disclosureMode: o })
|
|
54
|
-
}, null, 40, G),
|
|
55
|
-
c("span", null, u(e(t)(o === "manual" ? "common.toolPanel_a88eb6b9" : "common.toolPanel_09794da0")), 1)
|
|
56
|
-
]))), 128))
|
|
57
|
-
], 8, E),
|
|
58
|
-
e(r).disclosureMode === "manual" ? (a(), s("p", $, u(e(t)("common.toolPanel_290eab0a")), 1)) : (a(), s("p", L, u(e(t)("common.toolPanel_2c0993e5")), 1)),
|
|
59
|
-
e(r).disclosureMode === "ai" ? (a(), s("label", S, [
|
|
60
|
-
w(u(e(t)("common.toolPanel_6d793364")), 1),
|
|
61
|
-
c("textarea", {
|
|
62
|
-
value: e(r).context,
|
|
63
|
-
maxlength: "2000",
|
|
64
|
-
rows: "3",
|
|
65
|
-
onInput: _[0] || (_[0] = (o) => l.context.updateDraft({ context: o.target.value }))
|
|
66
|
-
}, null, 40, U)
|
|
67
|
-
])) : m("", !0)
|
|
68
|
-
], 8, T)
|
|
69
|
-
]),
|
|
70
|
-
_: 1
|
|
71
|
-
}, 8, ["context"]));
|
|
72
|
-
}
|
|
73
|
-
}), O = /* @__PURE__ */ C(j, [["__scopeId", "data-v-e564a010"]]);
|
|
74
|
-
export {
|
|
75
|
-
O as default
|
|
76
|
-
};
|
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
import { defineComponent as b, computed as p, watch as h, openBlock as c, createBlock as g, withCtx as x, createElementVNode as n, createTextVNode as f, toDisplayString as s, unref as e, createVNode as v, createElementBlock as i, Fragment as k, renderList as y, createCommentVNode as P } from "vue";
|
|
2
|
-
import { F as C, H as D, G as I, P as w, I as B, _ as E } from "./entry-CboOSe2r.js";
|
|
3
|
-
import { u as N, _ as T, b as V } from "./PluginActionFooter.vue_vue_type_script_setup_true_lang-BGe419qz.js";
|
|
4
|
-
const F = ["disabled"], R = ["aria-label", "value"], A = { key: 0 }, H = ["value", "placeholder"], O = { class: "hint" }, S = {
|
|
5
|
-
key: 1,
|
|
6
|
-
class: "tool-note"
|
|
7
|
-
}, G = /* @__PURE__ */ b({
|
|
8
|
-
__name: "ExpandToolPanel",
|
|
9
|
-
props: {
|
|
10
|
-
context: {}
|
|
11
|
-
},
|
|
12
|
-
setup(t) {
|
|
13
|
-
const { ui: o } = C(), l = t, r = N(() => l.context), _ = D(), d = p(() => _?.config.value.toolOptions?.expand), m = p(() => l.context.view.skippedCount);
|
|
14
|
-
return h(
|
|
15
|
-
() => [d.value, r.value.expandPrompt, l.context.readonly],
|
|
16
|
-
() => {
|
|
17
|
-
d.value?.prompt === !1 && r.value.expandPrompt && !l.context.readonly && l.context.updateDraft({ expandPrompt: "" });
|
|
18
|
-
},
|
|
19
|
-
{ immediate: !0 }
|
|
20
|
-
), (L, u) => (c(), g(I, { context: t.context }, {
|
|
21
|
-
actions: x(() => [
|
|
22
|
-
v(T, {
|
|
23
|
-
context: t.context,
|
|
24
|
-
available: e(V)(t.context)
|
|
25
|
-
}, null, 8, ["context", "available"])
|
|
26
|
-
]),
|
|
27
|
-
default: x(() => [
|
|
28
|
-
n("fieldset", {
|
|
29
|
-
class: "tool-fields plugin-fields",
|
|
30
|
-
disabled: t.context.readonly
|
|
31
|
-
}, [
|
|
32
|
-
n("label", null, [
|
|
33
|
-
n("span", null, [
|
|
34
|
-
f(s(e(o)("common.toolPanel_16e195aa")), 1),
|
|
35
|
-
v(w, {
|
|
36
|
-
text: e(o)("common.toolPanel_c3c522b1")
|
|
37
|
-
}, null, 8, ["text"])
|
|
38
|
-
]),
|
|
39
|
-
n("select", {
|
|
40
|
-
"aria-label": e(o)("common.toolPanel_16e195aa"),
|
|
41
|
-
value: e(r).aspectRatio,
|
|
42
|
-
onChange: u[0] || (u[0] = (a) => t.context.updateDraft({ aspectRatio: a.target.value }))
|
|
43
|
-
}, [
|
|
44
|
-
(c(!0), i(k, null, y(d.value?.ratios ?? e(B), (a) => (c(), i("option", { key: a }, s(a), 1))), 128))
|
|
45
|
-
], 40, R)
|
|
46
|
-
]),
|
|
47
|
-
d.value?.prompt !== !1 ? (c(), i("label", A, [
|
|
48
|
-
f(s(e(o)("common.toolPanel_40c2f529")), 1),
|
|
49
|
-
n("textarea", {
|
|
50
|
-
value: e(r).expandPrompt,
|
|
51
|
-
maxlength: "2000",
|
|
52
|
-
rows: "3",
|
|
53
|
-
placeholder: e(o)("common.toolPanel_7ab546ce"),
|
|
54
|
-
onInput: u[1] || (u[1] = (a) => t.context.updateDraft({ expandPrompt: a.target.value }))
|
|
55
|
-
}, null, 40, H)
|
|
56
|
-
])) : P("", !0),
|
|
57
|
-
n("p", O, s(e(o)("common.toolPanel_f3ddc1b3")), 1),
|
|
58
|
-
m.value ? (c(), i("p", S, s(e(o)("common.toolPanel_e9af8109", { p0: m.value })), 1)) : P("", !0)
|
|
59
|
-
], 8, F)
|
|
60
|
-
]),
|
|
61
|
-
_: 1
|
|
62
|
-
}, 8, ["context"]));
|
|
63
|
-
}
|
|
64
|
-
}), j = /* @__PURE__ */ E(G, [["__scopeId", "data-v-da190148"]]);
|
|
65
|
-
export {
|
|
66
|
-
j as default
|
|
67
|
-
};
|
|
@@ -1,104 +0,0 @@
|
|
|
1
|
-
import { defineComponent as h, openBlock as x, createElementBlock as P, unref as a, createElementVNode as e, toDisplayString as n, createVNode as s, createBlock as k, withCtx as _ } from "vue";
|
|
2
|
-
import { F as g, a4 as b, _ as V, G as v, a5 as f } from "./entry-CboOSe2r.js";
|
|
3
|
-
import { u as y, a as C, c as T, _ as A } from "./PluginActionFooter.vue_vue_type_script_setup_true_lang-BGe419qz.js";
|
|
4
|
-
const B = ["disabled", "aria-label"], D = { class: "metadata-default" }, M = ["aria-label", "disabled", "checked"], U = ["aria-label", "disabled", "checked"], E = /* @__PURE__ */ h({
|
|
5
|
-
__name: "MetadataPanel",
|
|
6
|
-
props: {
|
|
7
|
-
modelValue: {},
|
|
8
|
-
disabled: { type: Boolean }
|
|
9
|
-
},
|
|
10
|
-
emits: ["update:modelValue"],
|
|
11
|
-
setup(l, { emit: o }) {
|
|
12
|
-
const { ui: t, uiText: i } = g(), c = l, r = o;
|
|
13
|
-
function m(p, d) {
|
|
14
|
-
c.disabled || r("update:modelValue", {
|
|
15
|
-
...c.modelValue,
|
|
16
|
-
[p]: d.target.checked
|
|
17
|
-
});
|
|
18
|
-
}
|
|
19
|
-
return (p, d) => (x(), P("fieldset", {
|
|
20
|
-
class: "metadata-panel",
|
|
21
|
-
disabled: l.disabled,
|
|
22
|
-
"aria-label": a(t)("tools.metadata_cleanup.metadataPanel_a48b2f8f")
|
|
23
|
-
}, [
|
|
24
|
-
e("div", D, [
|
|
25
|
-
e("strong", null, n(a(t)("tools.metadata_cleanup.metadataPanel_07bee879")), 1),
|
|
26
|
-
e("p", null, n(a(t)("tools.metadata_cleanup.metadataPanel_77ca0e65")), 1),
|
|
27
|
-
e("p", null, n(a(t)("tools.metadata_cleanup.metadataPanel_81215dfc")), 1)
|
|
28
|
-
]),
|
|
29
|
-
e("label", null, [
|
|
30
|
-
s(a(b), {
|
|
31
|
-
class: "metadata-check",
|
|
32
|
-
size: 14,
|
|
33
|
-
"aria-hidden": "true"
|
|
34
|
-
}),
|
|
35
|
-
e("input", {
|
|
36
|
-
type: "checkbox",
|
|
37
|
-
"aria-label": a(t)("tools.metadata_cleanup.metadataPanel_e6c30387"),
|
|
38
|
-
disabled: l.disabled,
|
|
39
|
-
checked: l.modelValue.removeTime,
|
|
40
|
-
onChange: d[0] || (d[0] = (u) => m("removeTime", u))
|
|
41
|
-
}, null, 40, M),
|
|
42
|
-
e("span", null, [
|
|
43
|
-
e("strong", null, n(a(t)("tools.metadata_cleanup.metadataPanel_e6c30387")), 1),
|
|
44
|
-
e("small", null, n(a(t)("tools.metadata_cleanup.metadataPanel_e54e326a")), 1)
|
|
45
|
-
])
|
|
46
|
-
]),
|
|
47
|
-
e("label", null, [
|
|
48
|
-
s(a(b), {
|
|
49
|
-
class: "metadata-check",
|
|
50
|
-
size: 14,
|
|
51
|
-
"aria-hidden": "true"
|
|
52
|
-
}),
|
|
53
|
-
e("input", {
|
|
54
|
-
type: "checkbox",
|
|
55
|
-
"aria-label": a(t)("tools.metadata_cleanup.metadataPanel_cceb9076"),
|
|
56
|
-
disabled: l.disabled,
|
|
57
|
-
checked: l.modelValue.removeAuthorComments,
|
|
58
|
-
onChange: d[1] || (d[1] = (u) => m("removeAuthorComments", u))
|
|
59
|
-
}, null, 40, U),
|
|
60
|
-
e("span", null, [
|
|
61
|
-
e("strong", null, n(a(t)("tools.metadata_cleanup.metadataPanel_cceb9076")), 1),
|
|
62
|
-
e("small", null, n(a(t)("tools.metadata_cleanup.metadataPanel_5303f066")), 1)
|
|
63
|
-
])
|
|
64
|
-
])
|
|
65
|
-
], 8, B));
|
|
66
|
-
}
|
|
67
|
-
}), F = /* @__PURE__ */ V(E, [["__scopeId", "data-v-4045f702"]]), $ = /* @__PURE__ */ h({
|
|
68
|
-
__name: "MetadataToolPanel",
|
|
69
|
-
props: {
|
|
70
|
-
context: {}
|
|
71
|
-
},
|
|
72
|
-
setup(l) {
|
|
73
|
-
const o = l, t = y(() => o.context);
|
|
74
|
-
function i() {
|
|
75
|
-
o.context.resetDraft({ metadata: { ...f } });
|
|
76
|
-
}
|
|
77
|
-
const c = C(() => o.context, "metadata");
|
|
78
|
-
return (r, m) => (x(), k(v, {
|
|
79
|
-
context: l.context,
|
|
80
|
-
layout: "contained",
|
|
81
|
-
changed: a(T)(a(t).metadata, a(f)),
|
|
82
|
-
onReset: i
|
|
83
|
-
}, {
|
|
84
|
-
actions: _(() => [
|
|
85
|
-
s(A, {
|
|
86
|
-
context: l.context,
|
|
87
|
-
available: !0,
|
|
88
|
-
ready: !0
|
|
89
|
-
}, null, 8, ["context"])
|
|
90
|
-
]),
|
|
91
|
-
default: _(() => [
|
|
92
|
-
s(F, {
|
|
93
|
-
"model-value": a(t).metadata,
|
|
94
|
-
disabled: l.context.readonly,
|
|
95
|
-
"onUpdate:modelValue": a(c)
|
|
96
|
-
}, null, 8, ["model-value", "disabled", "onUpdate:modelValue"])
|
|
97
|
-
]),
|
|
98
|
-
_: 1
|
|
99
|
-
}, 8, ["context", "changed"]));
|
|
100
|
-
}
|
|
101
|
-
});
|
|
102
|
-
export {
|
|
103
|
-
$ as default
|
|
104
|
-
};
|
|
@@ -1,102 +0,0 @@
|
|
|
1
|
-
import { computed as r, defineComponent as k, openBlock as l, createElementBlock as s, createTextVNode as b, toDisplayString as i, unref as a, createCommentVNode as u, createElementVNode as x, renderSlot as g, createVNode as w, withCtx as P } from "vue";
|
|
2
|
-
import { F as A, H as S, aU as I, au as B, av as N } from "./entry-CboOSe2r.js";
|
|
3
|
-
function m(e) {
|
|
4
|
-
return Array.isArray(e) ? e.map(m) : e && typeof e == "object" ? Object.fromEntries(Object.entries(e).map(([t, n]) => [t, m(n)])) : e;
|
|
5
|
-
}
|
|
6
|
-
function W(e) {
|
|
7
|
-
return r(() => m(e().draft));
|
|
8
|
-
}
|
|
9
|
-
const q = (e, t) => Object.entries(t).some(([n, c]) => e[n] !== c), z = (e, t = e.toolId) => e.executionAvailable ?? (e.view.availableNodeTools ?? ["resize", "background"]).includes(t), H = (e) => e.executionAvailable ?? (e.view.aiAvailable !== !1 && e.view.availableTools.includes(e.toolId));
|
|
10
|
-
function $(e, t) {
|
|
11
|
-
return r(() => {
|
|
12
|
-
const n = e();
|
|
13
|
-
return (c) => {
|
|
14
|
-
const o = {};
|
|
15
|
-
return o[t] = c, n.updateDraft(o);
|
|
16
|
-
};
|
|
17
|
-
});
|
|
18
|
-
}
|
|
19
|
-
const j = { class: "execution-box" }, F = {
|
|
20
|
-
key: 0,
|
|
21
|
-
class: "hint"
|
|
22
|
-
}, T = { key: 0 }, V = {
|
|
23
|
-
key: 1,
|
|
24
|
-
class: "hint"
|
|
25
|
-
}, D = {
|
|
26
|
-
key: 2,
|
|
27
|
-
class: "service-status",
|
|
28
|
-
role: "status"
|
|
29
|
-
}, E = { class: "hint" }, O = ["disabled"], G = /* @__PURE__ */ k({
|
|
30
|
-
__name: "PluginActionFooter",
|
|
31
|
-
props: {
|
|
32
|
-
context: {},
|
|
33
|
-
available: { type: Boolean, default: !0 },
|
|
34
|
-
ready: { type: Boolean, default: !0 },
|
|
35
|
-
label: {},
|
|
36
|
-
unavailableReason: {},
|
|
37
|
-
showServiceStatus: { type: Boolean, default: !0 }
|
|
38
|
-
},
|
|
39
|
-
setup(e) {
|
|
40
|
-
const { ui: t, uiText: n } = A(), c = S(), o = e, d = r(
|
|
41
|
-
() => o.context.readonly || o.context.executionAvailable === !1 || !o.context.view.count || !o.available || !o.ready || o.context.submitting
|
|
42
|
-
), y = r(
|
|
43
|
-
() => o.context.submitting ? t("common.toolPanel_cfe317f2") : o.label ?? (o.context.view.waitingCount ? t("common.toolPanel_a699267c", { p0: o.context.view.count }) : t("common.toolPanel_5d31495f", { p0: o.context.view.count }))
|
|
44
|
-
);
|
|
45
|
-
async function v() {
|
|
46
|
-
return !d.value && await o.context.requestSubmit();
|
|
47
|
-
}
|
|
48
|
-
return (h, f) => (l(), s("div", j, [
|
|
49
|
-
e.context.view.waitingCount ? (l(), s("p", F, [
|
|
50
|
-
b(i(a(t)("common.toolPanel_0441f4b7", { p0: e.context.view.availableCount ?? 0 })), 1),
|
|
51
|
-
(e.context.view.waitingCount ?? 0) > (e.context.view.blockedCount ?? 0) ? (l(), s("span", T, i(a(t)("common.toolPanel_2d6c7046", {
|
|
52
|
-
p0: (e.context.view.waitingCount ?? 0) - (e.context.view.blockedCount ?? 0)
|
|
53
|
-
})), 1)) : u("", !0),
|
|
54
|
-
b(i(a(t)("common.toolPanel_0eeb8448")), 1)
|
|
55
|
-
])) : u("", !0),
|
|
56
|
-
e.context.view.blockedCount ? (l(), s("p", V, i(a(t)("common.toolPanel_8c81c328", { p0: e.context.view.blockedCount })), 1)) : u("", !0),
|
|
57
|
-
!e.available && e.showServiceStatus && a(c)?.config.value.visibility?.serviceStatus !== !1 ? (l(), s("div", D, [
|
|
58
|
-
x("p", E, i(e.unavailableReason || (e.context.view.aiAvailable === !1 ? a(n)(e.context.view.aiFeedback) || a(t)("common.toolPanel_8665eaa2") : a(t)("common.toolPanel_6afbb9ca"))), 1),
|
|
59
|
-
x("button", {
|
|
60
|
-
disabled: e.context.view.aiChecking,
|
|
61
|
-
onClick: f[0] || (f[0] = //@ts-ignore
|
|
62
|
-
(...C) => e.context.refreshCapabilities && e.context.refreshCapabilities(...C))
|
|
63
|
-
}, i(e.context.view.aiChecking ? a(t)("common.toolPanel_e8b970bc") : a(t)("common.toolPanel_107e25c0")), 9, O)
|
|
64
|
-
])) : u("", !0),
|
|
65
|
-
g(h.$slots, "default"),
|
|
66
|
-
w(a(I), {
|
|
67
|
-
name: "mainAction",
|
|
68
|
-
action: {
|
|
69
|
-
toolId: e.context.toolId,
|
|
70
|
-
entryId: e.context.entryId,
|
|
71
|
-
params: e.context.submissionParams,
|
|
72
|
-
count: e.context.view.count,
|
|
73
|
-
disabled: d.value,
|
|
74
|
-
submit: v
|
|
75
|
-
}
|
|
76
|
-
}, null, 8, ["action"]),
|
|
77
|
-
w(a(B).button, {
|
|
78
|
-
"data-onboarding": "tool-submit",
|
|
79
|
-
"data-material-action": "primary",
|
|
80
|
-
"data-tool-id": e.context.toolId,
|
|
81
|
-
class: "primary-action",
|
|
82
|
-
disabled: d.value,
|
|
83
|
-
"while-press": { scale: 0.97 },
|
|
84
|
-
transition: a(N),
|
|
85
|
-
onClick: v
|
|
86
|
-
}, {
|
|
87
|
-
default: P(() => [
|
|
88
|
-
b(i(y.value), 1)
|
|
89
|
-
]),
|
|
90
|
-
_: 1
|
|
91
|
-
}, 8, ["data-tool-id", "disabled", "transition"])
|
|
92
|
-
]));
|
|
93
|
-
}
|
|
94
|
-
});
|
|
95
|
-
export {
|
|
96
|
-
G as _,
|
|
97
|
-
$ as a,
|
|
98
|
-
H as b,
|
|
99
|
-
q as c,
|
|
100
|
-
z as n,
|
|
101
|
-
W as u
|
|
102
|
-
};
|