@beeintel/batch-image 0.0.0-stage → 1.0.1
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/FONT-LICENSE.txt +93 -0
- package/README.md +184 -3
- package/dist/assets/11st-D7qGO5e4.webp +0 -0
- package/dist/assets/UPNG-CPfdwFSy.js +2298 -0
- package/dist/assets/adjust-card-B63b81iV.webp +0 -0
- package/dist/assets/adjust-final.worker-C2JbTvv5.js +6945 -0
- package/dist/assets/amazon-CjTtpZTq.webp +0 -0
- package/dist/assets/ascii_art-B4UGbtGs.webp +0 -0
- package/dist/assets/auction-j26eVUQO.webp +0 -0
- package/dist/assets/background-DGdZUdkL.webp +0 -0
- package/dist/assets/background-card-wK7DRpvM.png +0 -0
- package/dist/assets/body-CUFdRg8w.webp +0 -0
- package/dist/assets/bounded-cutout.worker-BZR6mbaI.js +9615 -0
- package/dist/assets/brand-mark-card-cFUeDeO2.webp +0 -0
- package/dist/assets/buyma-dAxYNjow.webp +0 -0
- package/dist/assets/codec.worker-7W6hmsm6.js +7349 -0
- package/dist/assets/contour_lines-C_CqrgV1.webp +0 -0
- package/dist/assets/creema-B1tWyCPx.webp +0 -0
- package/dist/assets/crop-final.worker-Owin7TvX.js +7035 -0
- package/dist/assets/cutout-CzMvV5An.webp +0 -0
- package/dist/assets/cutout-card-CN4gNFBz.png +0 -0
- package/dist/assets/cutout.worker-DyH6Prbn.js +3894 -0
- package/dist/assets/depop-CkVC5Fn1.webp +0 -0
- package/dist/assets/dewrinkle-kFzP6LqD.webp +0 -0
- package/dist/assets/dither-CcxmO2e6.webp +0 -0
- package/dist/assets/douyin-CP_HwBDF.webp +0 -0
- package/dist/assets/download.worker-DnGSB6P_.js +17779 -0
- package/dist/assets/duotone-Cdg_3fQf.webp +0 -0
- package/dist/assets/ebay-CxLfrRAf.webp +0 -0
- package/dist/assets/edit-Cv-txfZm.webp +0 -0
- package/dist/assets/effect.worker-qu1eCcII.js +9227 -0
- package/dist/assets/engraving-BENh1O2O.webp +0 -0
- package/dist/assets/etsy-CSvz9GpY.webp +0 -0
- package/dist/assets/expand-C60VE9nK.webp +0 -0
- package/dist/assets/facebook-Ca2nJJiQ.webp +0 -0
- package/dist/assets/film_stock-Bqauwcq4.webp +0 -0
- package/dist/assets/final.worker-BnzJ3N5C.js +7035 -0
- package/dist/assets/final.worker-Csc1zoYS.js +7054 -0
- package/dist/assets/final.worker-DzBFT9xk.js +6922 -0
- package/dist/assets/final.worker-XpgKnlaz.js +7217 -0
- package/dist/assets/flatlay-CPiVmlAa.webp +0 -0
- package/dist/assets/flatlay-fold-B-CRYy87.webp +0 -0
- package/dist/assets/flatlay-open-Dzas8okC.webp +0 -0
- package/dist/assets/g-market-DXuYK_JH.webp +0 -0
- package/dist/assets/ghost-BCEAx_Zx.webp +0 -0
- package/dist/assets/ghost-front-WFgA4sUo.webp +0 -0
- package/dist/assets/ghost-three-quarter-Rt8cXj34.webp +0 -0
- package/dist/assets/gif-CObOIITx.js +303 -0
- package/dist/assets/glass_tiles-3IXP-Hmg.webp +0 -0
- package/dist/assets/glitch_art-D1i3qben.webp +0 -0
- package/dist/assets/glitch_blur-C4q_9zyq.webp +0 -0
- package/dist/assets/glow-Bv9EHBU5.webp +0 -0
- package/dist/assets/gradient_map-BR-UVYMP.webp +0 -0
- package/dist/assets/halftone-CWdKu2_6.webp +0 -0
- package/dist/assets/holo_sticker-BQDikLg2.webp +0 -0
- package/dist/assets/idus-7diqRNPs.webp +0 -0
- package/dist/assets/imagetracer.worker-CgunQTPG.js +7096 -0
- package/dist/assets/instagram-Bf0IVidT.webp +0 -0
- package/dist/assets/kakao-talk-Df79L_Mv.webp +0 -0
- package/dist/assets/kaleidoscope-BxqMZuWo.webp +0 -0
- package/dist/assets/karrot-BXFPhDwt.webp +0 -0
- package/dist/assets/kaufland-BDDy6e0C.webp +0 -0
- package/dist/assets/lazada-ConR4e1O.webp +0 -0
- package/dist/assets/lens_flare-DgyiAv_j.webp +0 -0
- package/dist/assets/light_leak-kUdpoFuC.webp +0 -0
- package/dist/assets/line-Dr1j___B.webp +0 -0
- package/dist/assets/linkedin-4s_9Wh03.webp +0 -0
- package/dist/assets/lo_fi-DSdl3yY_.webp +0 -0
- package/dist/assets/logo-preparation.worker-D9oa7SME.js +420 -0
- package/dist/assets/mercado-libre-C8CskEiS.webp +0 -0
- package/dist/assets/mercari-jp-DHj7nz4O.webp +0 -0
- package/dist/assets/metadata.worker-B_9_BgN1.js +6456 -0
- package/dist/assets/mirror_collage-JtSKCeSh.webp +0 -0
- package/dist/assets/model-BbeF-fsf.webp +0 -0
- package/dist/assets/model-BjWhieit.webp +0 -0
- package/dist/assets/momo-BWXO_8Df.webp +0 -0
- package/dist/assets/motion_blur-B8YUHeSg.webp +0 -0
- package/dist/assets/naver-xQKL8lWg.webp +0 -0
- package/dist/assets/nuvemshop-DPt6rnA-.webp +0 -0
- package/dist/assets/olx-B87gp-Il.webp +0 -0
- package/dist/assets/orient-card-Da0ii6mX.webp +0 -0
- package/dist/assets/orient-final.worker-CdF5Y5zD.js +6909 -0
- package/dist/assets/orientation-preview.worker-B7uFzz3J.js +6865 -0
- package/dist/assets/ort.bundle.min-CreFV8V1.js +9311 -0
- package/dist/assets/ort.webgpu.bundle.min-CAudaHZO.js +9311 -0
- package/dist/assets/otto-market-DWZyNKJn.webp +0 -0
- package/dist/assets/paper_texture-CXphyIrs.webp +0 -0
- package/dist/assets/pinterest-ByZqih2J.webp +0 -0
- package/dist/assets/polish-DFy6LNG7.webp +0 -0
- package/dist/assets/poshmark-DnZi2vA1.webp +0 -0
- package/dist/assets/posterize-SpLVGq1s.webp +0 -0
- package/dist/assets/preview.worker-DcrCKKWl.js +380 -0
- package/dist/assets/qoo10-C1pq81Jx.webp +0 -0
- package/dist/assets/rakuten-ulYog1hL.webp +0 -0
- package/dist/assets/recolor-mBX7vdFT.webp +0 -0
- package/dist/assets/resize-DVEAl0Um.webp +0 -0
- package/dist/assets/runtime-0663b902fb3937883a34.wasm +0 -0
- package/dist/assets/runtime-355a5c80c7bfdf8737de.mjs +2817 -0
- package/dist/assets/runtime-49871f5a4409519797e1.wasm +0 -0
- package/dist/assets/runtime-74cf72f9a2b7befc115a.mjs +2817 -0
- package/dist/assets/shadow-card-DTZEH60r.png +0 -0
- package/dist/assets/shopee-Bxfei6sj.webp +0 -0
- package/dist/assets/shopify-wVaBafcF.webp +0 -0
- package/dist/assets/shopline-DMoaJ7Bh.webp +0 -0
- package/dist/assets/sparkle-CD5GSGip.webp +0 -0
- package/dist/assets/ssg-DQoFx5u5.webp +0 -0
- package/dist/assets/staging-CIc8pQJ6.webp +0 -0
- package/dist/assets/standard-cutout.worker-BYLzdpR-.js +1261 -0
- package/dist/assets/text-DQW2mBGp.webp +0 -0
- package/dist/assets/textured_glass-D2coxp7n.webp +0 -0
- package/dist/assets/tga-VGxWDes0.js +752 -0
- package/dist/assets/tilt_shift-BKs46yeX.webp +0 -0
- package/dist/assets/transformers.web-DB57cIO5.js +28891 -0
- package/dist/assets/tritone-CcR4qizk.webp +0 -0
- package/dist/assets/upscale-BrLadyUk.webp +0 -0
- package/dist/assets/upscale-creative-DnZnQufJ.webp +0 -0
- package/dist/assets/upscale-crisp-Ckdmbsnn.webp +0 -0
- package/dist/assets/vinted-1QDsxvC6.webp +0 -0
- package/dist/assets/watercolor-CV67zYNE.webp +0 -0
- package/dist/assets/watermark-CpPrxaT5.webp +0 -0
- package/dist/assets/wave_distortion-CV5jVfK4.webp +0 -0
- package/dist/assets/whatsapp-CWJxqzR6.webp +0 -0
- package/dist/assets/worker-DfrCFP3O.js +55 -0
- package/dist/assets/xerox_noise-CbbHY1S1.webp +0 -0
- package/dist/assets/youtube-DS12d5mi.webp +0 -0
- package/dist/assets/zalando-CenfWOwz.webp +0 -0
- package/dist/browser-adapter.d.ts +4 -0
- package/dist/browser-cutout-capability.d.ts +4 -0
- package/dist/browser-cutout-resources.d.ts +3 -0
- package/dist/browser-local-capabilities.d.ts +5 -0
- package/dist/capabilities.d.ts +18 -0
- package/dist/chunks/AdjustToolPanel-BELqYSUR.js +195 -0
- package/dist/chunks/BackgroundToolPanel-Dy_l8KFl.js +41 -0
- package/dist/chunks/BatchMaterials-niGKrga3.js +806 -0
- package/dist/chunks/BatchModeChoices-BRqn6zNI.js +111 -0
- package/dist/chunks/BatchOutputColorPicker-CCvmIF-b.js +75 -0
- package/dist/chunks/BatchReferenceFields-C4t7OSTw.js +316 -0
- package/dist/chunks/BeautifyToolPanel-Dc-ddaBC.js +215 -0
- package/dist/chunks/BrandMarkToolPanel-FKxXth_3.js +1179 -0
- package/dist/chunks/ContentTrimControl-BQfigZPq.js +297 -0
- package/dist/chunks/CropToolPanel-BhSuHkYm.js +218 -0
- package/dist/chunks/CutoutToolPanel-BfaZZSE_.js +73 -0
- package/dist/chunks/DisclosureToolPanel-B_oc5fld.js +76 -0
- package/dist/chunks/ExpandToolPanel-D_ZODTUZ.js +67 -0
- package/dist/chunks/ImageEffectsToolPanel-BRLPIt4q.js +966 -0
- package/dist/chunks/IpAuditToolPanel-DfY-mBSe.js +96 -0
- package/dist/chunks/ListingToolPanel-B9Yh3LBK.js +783 -0
- package/dist/chunks/MaterialSelectionPlate-DhioUjdW.js +30 -0
- package/dist/chunks/MetadataToolPanel-KVrtb3K0.js +104 -0
- package/dist/chunks/OrientToolPanel-BTrwaWBm.js +161 -0
- package/dist/chunks/PluginActionFooter.vue_vue_type_script_setup_true_lang-C2kJCYeA.js +102 -0
- package/dist/chunks/ResizeToolPanel-Ch_-WR74.js +1178 -0
- package/dist/chunks/RetouchToolPanel-BTS33Dsd.js +350 -0
- package/dist/chunks/ShadowToolPanel-DxJE4eyV.js +254 -0
- package/dist/chunks/SvgExportToolPanel-RHmuQARH.js +219 -0
- package/dist/chunks/TranslationToolPanel-B_qTA1hM.js +125 -0
- package/dist/chunks/UpscaleToolPanel-D0H-j2Tr.js +127 -0
- package/dist/chunks/engine-D-T-1RSx.js +69 -0
- package/dist/chunks/entry-DK9FjQZ_.js +42946 -0
- package/dist/chunks/gpu-CScw5MNG.js +231 -0
- package/dist/chunks/hosted-resources-COzZ7nZY.js +8196 -0
- package/dist/chunks/loader-circle-UFoEem2a.js +16 -0
- package/dist/chunks/motionFeatures-D4miwXxc.js +4405 -0
- package/dist/chunks/search-BjTSm1KS.js +18 -0
- package/dist/chunks/standard-cutout-vPpP6xBc.js +45 -0
- package/dist/chunks/static-logo-2F9ORZWc.js +34 -0
- package/dist/config.d.ts +66 -0
- package/dist/contracts.d.ts +272 -0
- package/dist/index.d.ts +23 -0
- package/dist/index.js +13 -0
- package/dist/node/catalog.mjs +45 -0
- package/dist/node/cli.mjs +11 -0
- package/dist/node/index.d.mts +20 -0
- package/dist/node/index.mjs +2 -0
- package/dist/node/prepare.mjs +114 -0
- package/dist/node/vite.mjs +46 -0
- package/dist/processing.d.ts +1 -0
- package/dist/processing.js +12105 -0
- package/dist/remote-contracts.d.ts +114 -0
- package/dist/resource-contracts.d.ts +40 -0
- package/dist/resources/cutout/9ae2e5375a34fa413530954dc20d085d175faffc86108c13619220d0557f80bf.json +1 -0
- package/dist/resources/cutout/f119dabecc64bc436d3d08425dde96ec2598fd40541eba97d8d53a4e8bbdcaea.json +1 -0
- package/dist/resources/cutout/resources.json +195 -0
- package/dist/resources/cutout/sources.json +294 -0
- package/dist/resources.json +1191 -0
- package/dist/service-contracts.d.ts +43 -0
- package/dist/slots.d.ts +21 -0
- package/dist/style.css +1 -0
- package/dist/types/batch/api.d.ts +89 -0
- package/dist/types/batch/cutout-output.d.ts +2 -0
- package/dist/types/batch/features/background/engine.d.mts +12 -0
- package/dist/types/batch/features/basic-edit/contracts.d.ts +87 -0
- package/dist/types/batch/features/basic-edit/engine.d.mts +96 -0
- package/dist/types/batch/features/brand-mark/contracts.d.ts +84 -0
- package/dist/types/batch/features/brand-mark/engine.d.mts +68 -0
- package/dist/types/batch/features/export-compression/contracts.d.ts +44 -0
- package/dist/types/batch/features/export-compression/gifenc.d.ts +33 -0
- package/dist/types/batch/features/export-compression/plan.d.ts +45 -0
- package/dist/types/batch/features/export-compression/presentation.d.ts +70 -0
- package/dist/types/batch/features/export-compression/upng.d.ts +6 -0
- package/dist/types/batch/features/final-image/resize.d.mts +15 -0
- package/dist/types/batch/features/image-effects/contracts.d.ts +58 -0
- package/dist/types/batch/features/image-effects/gpu-pixel-runtime.d.ts +15 -0
- package/dist/types/batch/features/image-effects/photo-audit.d.ts +21 -0
- package/dist/types/batch/features/image-effects/photo-v7-cpu.d.ts +9 -0
- package/dist/types/batch/features/image-effects/profiles-v4.d.ts +157 -0
- package/dist/types/batch/features/image-effects/profiles-v5.d.ts +20 -0
- package/dist/types/batch/features/image-effects/profiles-v6.d.ts +14 -0
- package/dist/types/batch/features/image-effects/profiles-v7.d.ts +53 -0
- package/dist/types/batch/features/image-effects/profiles-v8.d.ts +113 -0
- package/dist/types/batch/features/image-effects/profiles-v9.d.ts +20 -0
- package/dist/types/batch/features/image-translation/params.d.ts +257 -0
- package/dist/types/batch/features/listing-remake/transport.d.ts +21 -0
- package/dist/types/batch/features/metadata/bytes.d.mts +13 -0
- package/dist/types/batch/features/metadata/containers.d.mts +20 -0
- package/dist/types/batch/features/metadata/declaration.d.mts +5 -0
- package/dist/types/batch/features/metadata/engine.d.mts +9 -0
- package/dist/types/batch/features/metadata/exchange.d.mts +48 -0
- package/dist/types/batch/features/shadow/contracts.d.ts +43 -0
- package/dist/types/batch/features/shadow/engine.d.mts +33 -0
- package/dist/types/batch/features/svg-export/download-contract.d.ts +33 -0
- package/dist/types/batch/features/svg-export/download-prepare.d.ts +2 -0
- package/dist/types/batch/features/svg-export/download.d.ts +7 -0
- package/dist/types/batch/features/svg-export/imagetracer.d.ts +6 -0
- package/dist/types/batch/features/svg-export/optimizer.d.ts +2 -0
- package/dist/types/batch/ids.d.ts +1 -0
- package/dist/types/batch/model.d.ts +317 -0
- package/dist/types/batch/public/config.d.ts +66 -0
- package/dist/types/batch/public/contracts.d.ts +272 -0
- package/dist/types/batch/public/remote-contracts.d.ts +114 -0
- package/dist/types/batch/public/resource-contracts.d.ts +40 -0
- package/dist/types/batch/public/service-contracts.d.ts +43 -0
- package/dist/types/batch/queue.d.ts +34 -0
- package/dist/types/batch/receipts.d.ts +85 -0
- package/dist/types/batch/retention.d.ts +13 -0
- package/dist/types/onnxruntime-web.d.ts +5 -0
- package/dist/types/plugins/cutout/core/hosted-resources.d.ts +11 -0
- package/dist/types/processing.d.ts +18 -0
- package/dist/types/shared/svg-security.d.mts +4 -0
- package/dist/types/workspace-worker.d.ts +2 -0
- package/package.json +95 -6
|
@@ -0,0 +1,350 @@
|
|
|
1
|
+
import { defineComponent as T, ref as k, useId as A, computed as P, watch as N, openBlock as a, createElementBlock as s, createElementVNode as u, unref as t, createVNode as S, toDisplayString as r, createCommentVNode as f, withCtx as M, Fragment as I, renderList as B, createTextVNode as _, normalizeStyle as U, createBlock as O, resolveDynamicComponent as H, withDirectives as L, vShow as K } from "vue";
|
|
2
|
+
import { F as J, aA as w, aB as X, aC as j, aD as q, aE as Q, aF as W, aG as Y, aH as Z, aI as ee, _ as z, aJ as D, aK as te, G as oe } from "./entry-DK9FjQZ_.js";
|
|
3
|
+
import { B as le } from "./BatchReferenceFields-C4t7OSTw.js";
|
|
4
|
+
import { u as ae, a as ue, b as G, _ as se } from "./PluginActionFooter.vue_vue_type_script_setup_true_lang-C2kJCYeA.js";
|
|
5
|
+
const re = { class: "edit-shortcuts" }, de = ["disabled", "aria-expanded", "aria-controls"], ie = {
|
|
6
|
+
key: 0,
|
|
7
|
+
class: "shortcut-receipt"
|
|
8
|
+
}, ne = { "aria-live": "polite" }, ce = ["disabled"], he = { class: "shortcut-grid" }, me = ["disabled", "aria-label", "onClick"], fe = ["src"], ve = {
|
|
9
|
+
key: 0,
|
|
10
|
+
role: "alert",
|
|
11
|
+
class: "shortcut-error"
|
|
12
|
+
}, be = {
|
|
13
|
+
key: 1,
|
|
14
|
+
role: "alert",
|
|
15
|
+
class: "shortcut-review"
|
|
16
|
+
}, pe = ["disabled"], ye = /* @__PURE__ */ T({
|
|
17
|
+
__name: "EditShortcuts",
|
|
18
|
+
props: {
|
|
19
|
+
modelValue: {},
|
|
20
|
+
writer: { type: Boolean },
|
|
21
|
+
busy: { type: Boolean }
|
|
22
|
+
},
|
|
23
|
+
emits: ["update:modelValue"],
|
|
24
|
+
setup(e, { emit: F }) {
|
|
25
|
+
const { ui: o, uiText: p } = J(), n = e, i = F, x = k(), c = k(!1), R = k(""), y = A(), v = P(() => !n.writer || n.busy), V = k(), $ = k(""), E = {
|
|
26
|
+
lighting: w("tool-cards/ai-v2/polish.webp"),
|
|
27
|
+
colors: w("tool-cards/ai-v2/recolor.webp"),
|
|
28
|
+
model: w("tool-cards/shortcuts-v3/model.webp"),
|
|
29
|
+
ghost: w("tool-cards/ai-v2/ghost.webp"),
|
|
30
|
+
flatlay: w("tool-cards/ai-v2/flatlay.webp"),
|
|
31
|
+
body: w("tool-cards/shortcuts-v3/body.webp"),
|
|
32
|
+
white_product: w("tool-cards/ai-v2/polish.webp"),
|
|
33
|
+
watermark: w("tool-cards/shortcuts-v3/watermark.webp"),
|
|
34
|
+
text: w("tool-cards/shortcuts-v3/text.webp")
|
|
35
|
+
};
|
|
36
|
+
N(v, (m) => {
|
|
37
|
+
m && (c.value = !1);
|
|
38
|
+
}), N(
|
|
39
|
+
() => n.modelValue.instructions,
|
|
40
|
+
(m) => {
|
|
41
|
+
V.value && m !== $.value && (V.value = void 0);
|
|
42
|
+
},
|
|
43
|
+
{ flush: "sync" }
|
|
44
|
+
);
|
|
45
|
+
const b = P(() => X(n.modelValue));
|
|
46
|
+
function h(m) {
|
|
47
|
+
if (!(v.value || !c.value))
|
|
48
|
+
try {
|
|
49
|
+
const g = Y(n.modelValue, m, Z(m), "replace");
|
|
50
|
+
V.value = JSON.parse(
|
|
51
|
+
JSON.stringify({
|
|
52
|
+
instructions: n.modelValue.instructions,
|
|
53
|
+
finalPersonCheck: n.modelValue.finalPersonCheck,
|
|
54
|
+
shortcuts: n.modelValue.shortcuts
|
|
55
|
+
})
|
|
56
|
+
), $.value = g.instructions, i("update:modelValue", g), R.value = "", c.value = !1;
|
|
57
|
+
} catch (g) {
|
|
58
|
+
R.value = g.message;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
function d() {
|
|
62
|
+
if (v.value || !V.value) return;
|
|
63
|
+
const m = V.value;
|
|
64
|
+
V.value = void 0, i("update:modelValue", {
|
|
65
|
+
...n.modelValue,
|
|
66
|
+
instructions: m.instructions,
|
|
67
|
+
finalPersonCheck: m.finalPersonCheck,
|
|
68
|
+
shortcuts: m.shortcuts
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
function l() {
|
|
72
|
+
v.value || i("update:modelValue", {
|
|
73
|
+
...n.modelValue,
|
|
74
|
+
shortcuts: {
|
|
75
|
+
...n.modelValue.shortcuts,
|
|
76
|
+
appliedReferenceOrder: ee(n.modelValue.references)
|
|
77
|
+
}
|
|
78
|
+
});
|
|
79
|
+
}
|
|
80
|
+
return (m, g) => (a(), s("section", re, [
|
|
81
|
+
u("button", {
|
|
82
|
+
ref_key: "trigger",
|
|
83
|
+
ref: x,
|
|
84
|
+
type: "button",
|
|
85
|
+
class: "shortcut-trigger",
|
|
86
|
+
disabled: v.value,
|
|
87
|
+
"aria-expanded": c.value,
|
|
88
|
+
"aria-controls": t(y),
|
|
89
|
+
onClick: g[0] || (g[0] = (C) => {
|
|
90
|
+
c.value = !c.value, R.value = "";
|
|
91
|
+
})
|
|
92
|
+
}, [
|
|
93
|
+
S(t(j), { size: 16 }),
|
|
94
|
+
u("span", null, r(t(o)("tools.retouch.editShortcuts_aaaf8f24")), 1),
|
|
95
|
+
S(t(q), { size: 16 })
|
|
96
|
+
], 8, de),
|
|
97
|
+
V.value ? (a(), s("div", ie, [
|
|
98
|
+
u("span", ne, r(t(o)("tools.retouch.editShortcuts_aec291ff")), 1),
|
|
99
|
+
u("button", {
|
|
100
|
+
type: "button",
|
|
101
|
+
disabled: v.value,
|
|
102
|
+
onClick: d
|
|
103
|
+
}, r(t(o)("tools.retouch.editShortcuts_6b581989")), 9, ce)
|
|
104
|
+
])) : f("", !0),
|
|
105
|
+
S(Q, {
|
|
106
|
+
id: t(y),
|
|
107
|
+
open: c.value,
|
|
108
|
+
anchor: x.value,
|
|
109
|
+
title: t(o)("tools.retouch.editShortcuts_aaaf8f24"),
|
|
110
|
+
onClose: g[1] || (g[1] = (C) => c.value = !1)
|
|
111
|
+
}, {
|
|
112
|
+
default: M(() => [
|
|
113
|
+
u("div", he, [
|
|
114
|
+
(a(!0), s(I, null, B(t(W), (C) => (a(), s("button", {
|
|
115
|
+
key: C.id,
|
|
116
|
+
type: "button",
|
|
117
|
+
class: "shortcut-card",
|
|
118
|
+
disabled: v.value,
|
|
119
|
+
"aria-label": t(o)("tools.retouch.editShortcuts_18fc4e7b", { p0: t(p)(C.label) }),
|
|
120
|
+
onClick: (Je) => h(C.id)
|
|
121
|
+
}, [
|
|
122
|
+
u("img", {
|
|
123
|
+
src: E[C.id],
|
|
124
|
+
alt: ""
|
|
125
|
+
}, null, 8, fe),
|
|
126
|
+
u("span", null, r(t(p)(C.label)), 1)
|
|
127
|
+
], 8, me))), 128))
|
|
128
|
+
]),
|
|
129
|
+
R.value ? (a(), s("p", ve, r(t(p)(R.value)), 1)) : f("", !0)
|
|
130
|
+
]),
|
|
131
|
+
_: 1
|
|
132
|
+
}, 8, ["id", "open", "anchor", "title"]),
|
|
133
|
+
b.value ? (a(), s("div", be, [
|
|
134
|
+
u("p", null, r(t(o)("tools.retouch.editShortcuts_6f8ae939")), 1),
|
|
135
|
+
u("button", {
|
|
136
|
+
type: "button",
|
|
137
|
+
disabled: v.value,
|
|
138
|
+
onClick: l
|
|
139
|
+
}, r(t(o)("tools.retouch.editShortcuts_01373195")), 9, pe)
|
|
140
|
+
])) : f("", !0)
|
|
141
|
+
]));
|
|
142
|
+
}
|
|
143
|
+
}), Ve = /* @__PURE__ */ z(ye, [["__scopeId", "data-v-bd800860"]]), ge = { class: "retouch-fields tool-fields" }, we = { key: 0 }, xe = ["aria-label", "value", "disabled"], ke = ["value", "disabled"], Re = { class: "hint" }, Ce = {
|
|
144
|
+
key: 1,
|
|
145
|
+
class: "hint"
|
|
146
|
+
}, Fe = { key: 2 }, $e = ["aria-label", "value", "disabled", "placeholder"], Se = {
|
|
147
|
+
key: 3,
|
|
148
|
+
class: "retouch-color"
|
|
149
|
+
}, _e = ["aria-label", "value", "disabled"], Pe = ["aria-label", "value", "disabled"], Ie = {
|
|
150
|
+
key: 4,
|
|
151
|
+
class: "color-presets"
|
|
152
|
+
}, Be = ["aria-label", "disabled", "onClick"], Me = { key: 0 }, Ee = ["aria-label", "disabled", "onClick"], Ne = { key: 0 }, Oe = ["aria-label", "value", "disabled", "placeholder"], Te = {
|
|
153
|
+
key: 6,
|
|
154
|
+
class: "hint"
|
|
155
|
+
}, Ue = { class: "tool-note" }, De = /* @__PURE__ */ T({
|
|
156
|
+
__name: "PromptRetouchFields",
|
|
157
|
+
props: {
|
|
158
|
+
modelValue: {},
|
|
159
|
+
writer: { type: Boolean },
|
|
160
|
+
candidates: { default: () => [] },
|
|
161
|
+
available: { type: Boolean, default: !0 },
|
|
162
|
+
retouchModes: { default: () => ["edit"] },
|
|
163
|
+
fixedMode: {}
|
|
164
|
+
},
|
|
165
|
+
emits: ["update:modelValue", "ready"],
|
|
166
|
+
setup(e, { emit: F }) {
|
|
167
|
+
const { ui: o, uiText: p, uiNotice: n } = J(), i = e, x = F, c = k(!1), R = ["#ffffff", "#000000", "#d44a3a", "#3366cc", "#2e7d5b", "#f4c65d"], y = k([]);
|
|
168
|
+
try {
|
|
169
|
+
const h = JSON.parse(localStorage.getItem("beepop-batch-recent-colors") ?? "[]");
|
|
170
|
+
Array.isArray(h) && (y.value = h.filter((d) => typeof d == "string" && /^#[\da-f]{6}$/i.test(d)).slice(0, 6));
|
|
171
|
+
} catch {
|
|
172
|
+
}
|
|
173
|
+
function v() {
|
|
174
|
+
if (/^#[\da-f]{6}$/i.test(i.modelValue.color)) {
|
|
175
|
+
y.value = [
|
|
176
|
+
i.modelValue.color.toLowerCase(),
|
|
177
|
+
...y.value.filter((h) => h !== i.modelValue.color.toLowerCase())
|
|
178
|
+
].slice(0, 6);
|
|
179
|
+
try {
|
|
180
|
+
localStorage.setItem("beepop-batch-recent-colors", JSON.stringify(y.value));
|
|
181
|
+
} catch {
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
const V = P(
|
|
186
|
+
() => D.find((h) => h.value === i.modelValue.mode)?.protection
|
|
187
|
+
), $ = P(() => {
|
|
188
|
+
try {
|
|
189
|
+
return te(i.modelValue, i.retouchModes), "";
|
|
190
|
+
} catch (h) {
|
|
191
|
+
return h.message;
|
|
192
|
+
}
|
|
193
|
+
}), E = P(
|
|
194
|
+
() => i.writer && i.available && !c.value && !$.value && (i.modelValue.mode !== "edit" || !i.modelValue.referenceUploadNeedsReview)
|
|
195
|
+
);
|
|
196
|
+
N(E, (h) => x("ready", h), { immediate: !0 });
|
|
197
|
+
function b(h) {
|
|
198
|
+
i.writer && x("update:modelValue", { ...i.modelValue, ...h });
|
|
199
|
+
}
|
|
200
|
+
return (h, d) => (a(), s("div", ge, [
|
|
201
|
+
e.fixedMode ? f("", !0) : (a(), s("label", we, [
|
|
202
|
+
_(r(t(o)("tools.retouch.promptRetouchFields_fa55a4d4")), 1),
|
|
203
|
+
u("select", {
|
|
204
|
+
"aria-label": t(o)("tools.retouch.promptRetouchFields_fa55a4d4"),
|
|
205
|
+
value: e.modelValue.mode,
|
|
206
|
+
disabled: !e.writer,
|
|
207
|
+
onChange: d[0] || (d[0] = (l) => b({ mode: l.target.value }))
|
|
208
|
+
}, [
|
|
209
|
+
(a(!0), s(I, null, B(t(D), (l) => (a(), s("option", {
|
|
210
|
+
key: l.value,
|
|
211
|
+
value: l.value,
|
|
212
|
+
disabled: !e.retouchModes.includes(l.value)
|
|
213
|
+
}, r(t(p)(l.label)) + r(e.retouchModes.includes(l.value) ? "" : t(o)("common.toolPanel_14a718cd")), 9, ke))), 128))
|
|
214
|
+
], 40, xe)
|
|
215
|
+
])),
|
|
216
|
+
u("p", Re, r(t(p)(V.value)), 1),
|
|
217
|
+
e.modelValue.mode !== "edit" ? (a(), s("p", Ce, r(t(o)("tools.retouch.promptRetouchFields_bfa4c81f")), 1)) : f("", !0),
|
|
218
|
+
e.modelValue.mode !== "edit" ? (a(), s("label", Fe, [
|
|
219
|
+
_(r(e.modelValue.mode === "recolor" ? t(o)("tools.retouch.promptRetouchFields_c401caf2") : t(o)("tools.retouch.promptRetouchFields_9fb527d5")) + " ", 1),
|
|
220
|
+
u("textarea", {
|
|
221
|
+
"aria-label": t(o)("tools.retouch.promptRetouchFields_62624132"),
|
|
222
|
+
value: e.modelValue.target,
|
|
223
|
+
disabled: !e.writer,
|
|
224
|
+
maxlength: "500",
|
|
225
|
+
rows: "2",
|
|
226
|
+
placeholder: t(o)("tools.retouch.promptRetouchFields_877eff9a"),
|
|
227
|
+
onInput: d[1] || (d[1] = (l) => b({ target: l.target.value }))
|
|
228
|
+
}, null, 40, $e)
|
|
229
|
+
])) : f("", !0),
|
|
230
|
+
e.modelValue.mode === "recolor" ? (a(), s("div", Se, [
|
|
231
|
+
u("label", null, [
|
|
232
|
+
_(r(t(o)("tools.retouch.promptRetouchFields_af0d5323")), 1),
|
|
233
|
+
u("input", {
|
|
234
|
+
type: "color",
|
|
235
|
+
"aria-label": t(o)("tools.retouch.promptRetouchFields_3d8f2f39"),
|
|
236
|
+
value: /^#[\da-f]{6}$/i.test(e.modelValue.color) ? e.modelValue.color : "#ffffff",
|
|
237
|
+
disabled: !e.writer,
|
|
238
|
+
onInput: d[2] || (d[2] = (l) => b({ color: l.target.value })),
|
|
239
|
+
onChange: v
|
|
240
|
+
}, null, 40, _e)
|
|
241
|
+
]),
|
|
242
|
+
u("label", null, [
|
|
243
|
+
d[6] || (d[6] = _("HEX", -1)),
|
|
244
|
+
u("input", {
|
|
245
|
+
"aria-label": t(o)("tools.retouch.promptRetouchFields_637e9335"),
|
|
246
|
+
value: e.modelValue.color,
|
|
247
|
+
disabled: !e.writer,
|
|
248
|
+
maxlength: "7",
|
|
249
|
+
placeholder: "#RRGGBB",
|
|
250
|
+
onInput: d[3] || (d[3] = (l) => b({ color: l.target.value })),
|
|
251
|
+
onChange: v
|
|
252
|
+
}, null, 40, Pe)
|
|
253
|
+
])
|
|
254
|
+
])) : f("", !0),
|
|
255
|
+
e.fixedMode === "recolor" ? (a(), s("div", Ie, [
|
|
256
|
+
u("span", null, r(t(o)("tools.retouch.promptRetouchFields_cd5d1ca5")), 1),
|
|
257
|
+
(a(), s(I, null, B(R, (l) => u("button", {
|
|
258
|
+
key: l,
|
|
259
|
+
type: "button",
|
|
260
|
+
style: U({ background: l }),
|
|
261
|
+
"aria-label": t(o)("tools.retouch.promptRetouchFields_89688793", { p0: l }),
|
|
262
|
+
disabled: !e.writer,
|
|
263
|
+
onClick: (m) => b({ color: l })
|
|
264
|
+
}, null, 12, Be)), 64)),
|
|
265
|
+
y.value.length ? (a(), s("span", Me, r(t(o)("tools.retouch.promptRetouchFields_6692f486")), 1)) : f("", !0),
|
|
266
|
+
(a(!0), s(I, null, B(y.value, (l) => (a(), s("button", {
|
|
267
|
+
key: `recent-${l}`,
|
|
268
|
+
type: "button",
|
|
269
|
+
style: U({ background: l }),
|
|
270
|
+
"aria-label": t(o)("tools.retouch.promptRetouchFields_a651beb5", { p0: l }),
|
|
271
|
+
disabled: !e.writer,
|
|
272
|
+
onClick: (m) => b({ color: l })
|
|
273
|
+
}, null, 12, Ee))), 128))
|
|
274
|
+
])) : f("", !0),
|
|
275
|
+
e.modelValue.mode === "edit" ? (a(), O(Ve, {
|
|
276
|
+
key: 5,
|
|
277
|
+
"model-value": e.modelValue,
|
|
278
|
+
writer: e.writer && e.available,
|
|
279
|
+
busy: c.value,
|
|
280
|
+
"onUpdate:modelValue": b
|
|
281
|
+
}, null, 8, ["model-value", "writer", "busy"])) : f("", !0),
|
|
282
|
+
(a(), O(H(e.fixedMode && e.fixedMode !== "edit" ? "details" : "div"), null, {
|
|
283
|
+
default: M(() => [
|
|
284
|
+
e.fixedMode && e.fixedMode !== "edit" ? (a(), s("summary", Ne, r(t(o)("common.toolPanel_40c2f529")), 1)) : f("", !0),
|
|
285
|
+
u("label", null, [
|
|
286
|
+
_(r(e.modelValue.mode === "edit" ? t(o)("tools.retouch.promptRetouchFields_28c29060") : t(o)("common.toolPanel_40c2f529")) + " ", 1),
|
|
287
|
+
u("textarea", {
|
|
288
|
+
"aria-label": t(o)("tools.retouch.promptRetouchFields_28c29060"),
|
|
289
|
+
value: e.modelValue.instructions,
|
|
290
|
+
disabled: !e.writer,
|
|
291
|
+
maxlength: "8000",
|
|
292
|
+
rows: "4",
|
|
293
|
+
placeholder: e.modelValue.mode === "edit" ? t(o)("tools.retouch.promptRetouchFields_852bdbfa") : t(o)("tools.retouch.promptRetouchFields_319915db"),
|
|
294
|
+
onInput: d[4] || (d[4] = (l) => b({ instructions: l.target.value }))
|
|
295
|
+
}, null, 40, Oe)
|
|
296
|
+
])
|
|
297
|
+
]),
|
|
298
|
+
_: 1
|
|
299
|
+
})),
|
|
300
|
+
L(S(le, {
|
|
301
|
+
"model-value": e.modelValue,
|
|
302
|
+
writer: e.writer,
|
|
303
|
+
candidates: e.candidates,
|
|
304
|
+
"onUpdate:modelValue": b,
|
|
305
|
+
onBusy: d[5] || (d[5] = (l) => c.value = l)
|
|
306
|
+
}, null, 8, ["model-value", "writer", "candidates"]), [
|
|
307
|
+
[K, e.modelValue.mode === "edit"]
|
|
308
|
+
]),
|
|
309
|
+
$.value && !c.value ? (a(), s("p", Te, r(t(n)($.value)), 1)) : f("", !0),
|
|
310
|
+
u("p", Ue, r(t(o)("tools.retouch.promptRetouchFields_08c692fa", {
|
|
311
|
+
p0: e.modelValue.mode === "edit" ? e.modelValue.finalPersonCheck ? t(o)("tools.retouch.nested_2823b8fb") : t(o)("tools.retouch.nested_acc6bb91") : t(o)("tools.retouch.nested_2f4af360")
|
|
312
|
+
})), 1)
|
|
313
|
+
]));
|
|
314
|
+
}
|
|
315
|
+
}), Ge = /* @__PURE__ */ z(De, [["__scopeId", "data-v-2055fef8"]]), Ke = /* @__PURE__ */ T({
|
|
316
|
+
__name: "RetouchToolPanel",
|
|
317
|
+
props: {
|
|
318
|
+
context: {}
|
|
319
|
+
},
|
|
320
|
+
setup(e) {
|
|
321
|
+
const F = e, o = ae(() => F.context), p = k(!1), n = ue(() => F.context, "retouch");
|
|
322
|
+
return (i, x) => (a(), O(oe, {
|
|
323
|
+
context: e.context,
|
|
324
|
+
layout: "contained"
|
|
325
|
+
}, {
|
|
326
|
+
actions: M(() => [
|
|
327
|
+
S(se, {
|
|
328
|
+
context: e.context,
|
|
329
|
+
available: t(G)(e.context),
|
|
330
|
+
ready: p.value
|
|
331
|
+
}, null, 8, ["context", "available", "ready"])
|
|
332
|
+
]),
|
|
333
|
+
default: M(() => [
|
|
334
|
+
S(Ge, {
|
|
335
|
+
"model-value": t(o).retouch,
|
|
336
|
+
writer: !e.context.readonly,
|
|
337
|
+
available: t(G)(e.context),
|
|
338
|
+
"retouch-modes": e.context.view.retouchModes,
|
|
339
|
+
"fixed-mode": e.context.entryId ? t(o).retouch.mode : void 0,
|
|
340
|
+
"onUpdate:modelValue": t(n),
|
|
341
|
+
onReady: x[0] || (x[0] = (c) => p.value = c)
|
|
342
|
+
}, null, 8, ["model-value", "writer", "available", "retouch-modes", "fixed-mode", "onUpdate:modelValue"])
|
|
343
|
+
]),
|
|
344
|
+
_: 1
|
|
345
|
+
}, 8, ["context"]));
|
|
346
|
+
}
|
|
347
|
+
});
|
|
348
|
+
export {
|
|
349
|
+
Ke as default
|
|
350
|
+
};
|
|
@@ -0,0 +1,254 @@
|
|
|
1
|
+
import { defineComponent as N, openBlock as r, createElementBlock as h, unref as a, createElementVNode as o, toDisplayString as i, Fragment as g, renderList as C, normalizeStyle as $, createVNode as P, createTextVNode as I, createCommentVNode as _, computed as y, createBlock as U, withCtx as k } from "vue";
|
|
2
|
+
import { F as S, R as B, _ as R, G as z } from "./entry-DK9FjQZ_.js";
|
|
3
|
+
import { m as V } from "./hosted-resources-COzZ7nZY.js";
|
|
4
|
+
import { u as L, c as E, a as M, _ as T, n as H } from "./PluginActionFooter.vue_vue_type_script_setup_true_lang-C2kJCYeA.js";
|
|
5
|
+
const K = ["disabled", "aria-label"], G = { class: "shadow-hint" }, O = { class: "shadow-lock" }, W = ["aria-label", "checked", "disabled"], X = { class: "shadow-hint" }, Y = { class: "shadow-color-field" }, j = ["aria-label"], q = ["aria-label", "title", "aria-pressed", "disabled", "onClick"], J = ["title"], Q = ["aria-label", "disabled", "value"], Z = { class: "shadow-field-heading" }, ee = ["aria-label", "disabled", "min", "max", "step", "value", "onInput"], ae = ["aria-label", "aria-valuetext", "title", "disabled", "min", "max", "step", "value", "onInput"], te = { class: "shadow-field-tip" }, le = ["aria-label", "disabled"], oe = /* @__PURE__ */ N({
|
|
6
|
+
__name: "ShadowPanel",
|
|
7
|
+
props: {
|
|
8
|
+
modelValue: {},
|
|
9
|
+
disabled: { type: Boolean },
|
|
10
|
+
hideReset: { type: Boolean }
|
|
11
|
+
},
|
|
12
|
+
emits: ["update:modelValue"],
|
|
13
|
+
setup(t, { emit: u }) {
|
|
14
|
+
const { ui: l, uiText: s } = S(), d = t, m = u, x = [
|
|
15
|
+
{ label: "黑色", value: "#000000" },
|
|
16
|
+
{ label: "白色", value: "#ffffff" },
|
|
17
|
+
{ label: "红色", value: "#ff0000" },
|
|
18
|
+
{ label: "青色", value: "#00ffff" },
|
|
19
|
+
{ label: "黄色", value: "#ffff00" },
|
|
20
|
+
{ label: "紫色", value: "#8000ff" }
|
|
21
|
+
], v = [
|
|
22
|
+
{
|
|
23
|
+
key: "offsetX",
|
|
24
|
+
label: "横向偏移",
|
|
25
|
+
min: -256,
|
|
26
|
+
max: 256,
|
|
27
|
+
step: 1,
|
|
28
|
+
unit: "px",
|
|
29
|
+
tip: "负值向左,正值向右"
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
key: "offsetY",
|
|
33
|
+
label: "纵向偏移",
|
|
34
|
+
min: -256,
|
|
35
|
+
max: 256,
|
|
36
|
+
step: 1,
|
|
37
|
+
unit: "px",
|
|
38
|
+
tip: "负值向上,正值向下"
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
key: "blur",
|
|
42
|
+
label: "模糊",
|
|
43
|
+
min: 0,
|
|
44
|
+
max: 100,
|
|
45
|
+
step: 1,
|
|
46
|
+
unit: "px",
|
|
47
|
+
tip: "数值越大,投影边缘越柔和"
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
key: "opacity",
|
|
51
|
+
label: "不透明度",
|
|
52
|
+
min: 0,
|
|
53
|
+
max: 100,
|
|
54
|
+
step: 0.1,
|
|
55
|
+
unit: "%",
|
|
56
|
+
tip: "0% 不添加投影,100% 最浓"
|
|
57
|
+
}
|
|
58
|
+
];
|
|
59
|
+
function w(n) {
|
|
60
|
+
return n.key === "opacity" ? Number((d.modelValue.opacity * 100).toFixed(1)) : d.modelValue[n.key];
|
|
61
|
+
}
|
|
62
|
+
function p(n, b) {
|
|
63
|
+
if (d.disabled) return;
|
|
64
|
+
const e = b.target.value;
|
|
65
|
+
if (!e.trim() || !Number.isFinite(Number(e))) return;
|
|
66
|
+
const c = Math.round(Math.min(n.max, Math.max(n.min, Number(e))) / n.step) * n.step;
|
|
67
|
+
m("update:modelValue", {
|
|
68
|
+
...d.modelValue,
|
|
69
|
+
[n.key]: n.key === "opacity" ? Number((c / 100).toFixed(3)) : c
|
|
70
|
+
});
|
|
71
|
+
}
|
|
72
|
+
function f(n) {
|
|
73
|
+
!d.disabled && /^#[0-9a-f]{6}$/i.test(n) && m("update:modelValue", {
|
|
74
|
+
...d.modelValue,
|
|
75
|
+
color: n.toLowerCase()
|
|
76
|
+
});
|
|
77
|
+
}
|
|
78
|
+
function D(n) {
|
|
79
|
+
[
|
|
80
|
+
"ArrowLeft",
|
|
81
|
+
"ArrowRight",
|
|
82
|
+
"ArrowUp",
|
|
83
|
+
"ArrowDown",
|
|
84
|
+
"Home",
|
|
85
|
+
"End",
|
|
86
|
+
"PageUp",
|
|
87
|
+
"PageDown"
|
|
88
|
+
].includes(n.key) && n.stopPropagation();
|
|
89
|
+
}
|
|
90
|
+
function F() {
|
|
91
|
+
d.disabled || m("update:modelValue", { ...V });
|
|
92
|
+
}
|
|
93
|
+
function A(n) {
|
|
94
|
+
d.disabled || m("update:modelValue", {
|
|
95
|
+
...d.modelValue,
|
|
96
|
+
lockSize: n.target.checked
|
|
97
|
+
});
|
|
98
|
+
}
|
|
99
|
+
return (n, b) => (r(), h("fieldset", {
|
|
100
|
+
class: "shadow-panel",
|
|
101
|
+
disabled: t.disabled,
|
|
102
|
+
"aria-label": a(l)("tools.shadow.shadowPanel_1b01b881")
|
|
103
|
+
}, [
|
|
104
|
+
o("p", G, i(a(l)("tools.shadow.shadowPanel_5778f51c")), 1),
|
|
105
|
+
o("label", O, [
|
|
106
|
+
o("input", {
|
|
107
|
+
type: "checkbox",
|
|
108
|
+
"aria-label": a(l)("tools.shadow.shadowPanel_208fc432"),
|
|
109
|
+
checked: !!t.modelValue.lockSize,
|
|
110
|
+
disabled: t.disabled,
|
|
111
|
+
onChange: A
|
|
112
|
+
}, null, 40, W),
|
|
113
|
+
o("span", null, i(a(l)("tools.shadow.shadowPanel_208fc432")), 1)
|
|
114
|
+
]),
|
|
115
|
+
o("p", X, i(t.modelValue.lockSize ? a(l)("tools.shadow.shadowPanel_12f52a89") : a(l)("tools.shadow.shadowPanel_5f85fdc3")), 1),
|
|
116
|
+
o("div", Y, [
|
|
117
|
+
o("span", null, i(a(l)("tools.shadow.shadowPanel_d6319362")), 1),
|
|
118
|
+
o("div", {
|
|
119
|
+
class: "shadow-colors",
|
|
120
|
+
role: "group",
|
|
121
|
+
"aria-label": a(l)("tools.shadow.shadowPanel_1ba46530")
|
|
122
|
+
}, [
|
|
123
|
+
(r(), h(g, null, C(x, (e) => o("button", {
|
|
124
|
+
key: e.value,
|
|
125
|
+
type: "button",
|
|
126
|
+
"aria-label": a(l)("tools.shadow.shadowPanel_f5b7f132", { p0: a(s)(e.label) }),
|
|
127
|
+
title: `${a(s)(e.label)} ${e.value}`,
|
|
128
|
+
"aria-pressed": t.modelValue.color.toLowerCase() === e.value,
|
|
129
|
+
disabled: t.disabled,
|
|
130
|
+
style: $({ "--shadow-color": e.value }),
|
|
131
|
+
onClick: (c) => f(e.value)
|
|
132
|
+
}, [...b[1] || (b[1] = [
|
|
133
|
+
o("span", null, null, -1)
|
|
134
|
+
])], 12, q)), 64)),
|
|
135
|
+
o("label", {
|
|
136
|
+
class: "shadow-custom-color",
|
|
137
|
+
title: a(l)("tools.shadow.shadowPanel_3d4a10aa", { p0: t.modelValue.color })
|
|
138
|
+
}, [
|
|
139
|
+
o("span", {
|
|
140
|
+
style: $({ backgroundColor: t.modelValue.color })
|
|
141
|
+
}, null, 4),
|
|
142
|
+
o("input", {
|
|
143
|
+
type: "color",
|
|
144
|
+
"aria-label": a(l)("tools.shadow.shadowPanel_784af391"),
|
|
145
|
+
disabled: t.disabled,
|
|
146
|
+
value: t.modelValue.color,
|
|
147
|
+
onInput: b[0] || (b[0] = (e) => f(e.target.value))
|
|
148
|
+
}, null, 40, Q)
|
|
149
|
+
], 8, J)
|
|
150
|
+
], 8, j)
|
|
151
|
+
]),
|
|
152
|
+
(r(), h(g, null, C(v, (e) => o("div", {
|
|
153
|
+
key: e.key,
|
|
154
|
+
class: "shadow-field"
|
|
155
|
+
}, [
|
|
156
|
+
o("div", Z, [
|
|
157
|
+
o("span", null, i(a(s)(e.label)), 1),
|
|
158
|
+
o("label", null, [
|
|
159
|
+
o("input", {
|
|
160
|
+
type: "number",
|
|
161
|
+
"aria-label": a(l)("tools.shadow.shadowPanel_9d931511", { p0: a(s)(e.label), p1: e.unit }),
|
|
162
|
+
disabled: t.disabled,
|
|
163
|
+
min: e.min,
|
|
164
|
+
max: e.max,
|
|
165
|
+
step: e.step,
|
|
166
|
+
value: w(e),
|
|
167
|
+
onInput: (c) => p(e, c)
|
|
168
|
+
}, null, 40, ee),
|
|
169
|
+
o("small", null, i(e.unit), 1)
|
|
170
|
+
])
|
|
171
|
+
]),
|
|
172
|
+
o("input", {
|
|
173
|
+
type: "range",
|
|
174
|
+
"aria-label": a(s)(e.label),
|
|
175
|
+
"aria-valuetext": `${w(e)} ${e.unit},${a(s)(e.tip)}`,
|
|
176
|
+
title: a(s)(e.tip),
|
|
177
|
+
disabled: t.disabled,
|
|
178
|
+
min: e.min,
|
|
179
|
+
max: e.max,
|
|
180
|
+
step: e.step,
|
|
181
|
+
value: w(e),
|
|
182
|
+
onInput: (c) => p(e, c),
|
|
183
|
+
onKeydown: D
|
|
184
|
+
}, null, 40, ae),
|
|
185
|
+
o("small", te, i(a(s)(e.tip)), 1)
|
|
186
|
+
])), 64)),
|
|
187
|
+
t.hideReset ? _("", !0) : (r(), h("button", {
|
|
188
|
+
key: 0,
|
|
189
|
+
type: "button",
|
|
190
|
+
class: "shadow-reset",
|
|
191
|
+
"aria-label": a(l)("tools.shadow.shadowPanel_29de98dd"),
|
|
192
|
+
disabled: t.disabled,
|
|
193
|
+
onClick: F
|
|
194
|
+
}, [
|
|
195
|
+
P(a(B), { size: 14 }),
|
|
196
|
+
I(i(a(l)("tools.shadow.shadowPanel_29de98dd")), 1)
|
|
197
|
+
], 8, le))
|
|
198
|
+
], 8, K));
|
|
199
|
+
}
|
|
200
|
+
}), ne = /* @__PURE__ */ R(oe, [["__scopeId", "data-v-9ed3f41c"]]), se = {
|
|
201
|
+
key: 0,
|
|
202
|
+
class: "hint"
|
|
203
|
+
}, de = {
|
|
204
|
+
key: 1,
|
|
205
|
+
class: "hint"
|
|
206
|
+
}, me = /* @__PURE__ */ N({
|
|
207
|
+
__name: "ShadowToolPanel",
|
|
208
|
+
props: {
|
|
209
|
+
context: {}
|
|
210
|
+
},
|
|
211
|
+
setup(t) {
|
|
212
|
+
const { ui: u } = S(), l = t, s = L(() => l.context), d = y(() => s.value.shadow.opacity === 0), m = y(
|
|
213
|
+
() => E(s.value.shadow, V) || !!l.context.view.appliedCount
|
|
214
|
+
), x = y(
|
|
215
|
+
() => l.context.view.waitingCount ? void 0 : u("common.historyDrawer_500cba39", {
|
|
216
|
+
p0: l.context.view.appliedCount ? u("common.toolPanel_474c2513") : u("common.toolPanel_fab8cc8f"),
|
|
217
|
+
p1: l.context.view.count
|
|
218
|
+
})
|
|
219
|
+
), v = M(() => l.context, "shadow");
|
|
220
|
+
return (w, p) => (r(), U(z, {
|
|
221
|
+
context: t.context,
|
|
222
|
+
layout: "contained",
|
|
223
|
+
changed: m.value,
|
|
224
|
+
onReset: p[0] || (p[0] = (f) => t.context.resetDraft({ shadow: { ...a(V) } }))
|
|
225
|
+
}, {
|
|
226
|
+
actions: k(() => [
|
|
227
|
+
P(T, {
|
|
228
|
+
context: t.context,
|
|
229
|
+
available: a(H)(t.context),
|
|
230
|
+
ready: !d.value,
|
|
231
|
+
label: x.value
|
|
232
|
+
}, {
|
|
233
|
+
default: k(() => [
|
|
234
|
+
t.context.view.appliedCount ? (r(), h("p", se, i(a(u)("common.toolPanel_32b1782c", { p0: t.context.view.appliedCount })), 1)) : _("", !0),
|
|
235
|
+
d.value ? (r(), h("p", de, i(a(u)("common.toolPanel_508186e2")), 1)) : _("", !0)
|
|
236
|
+
]),
|
|
237
|
+
_: 1
|
|
238
|
+
}, 8, ["context", "available", "ready", "label"])
|
|
239
|
+
]),
|
|
240
|
+
default: k(() => [
|
|
241
|
+
P(ne, {
|
|
242
|
+
"model-value": a(s).shadow,
|
|
243
|
+
"hide-reset": !0,
|
|
244
|
+
disabled: t.context.readonly,
|
|
245
|
+
"onUpdate:modelValue": a(v)
|
|
246
|
+
}, null, 8, ["model-value", "disabled", "onUpdate:modelValue"])
|
|
247
|
+
]),
|
|
248
|
+
_: 1
|
|
249
|
+
}, 8, ["context", "changed"]));
|
|
250
|
+
}
|
|
251
|
+
});
|
|
252
|
+
export {
|
|
253
|
+
me as default
|
|
254
|
+
};
|