@beeintel/batch-image 0.0.0-stage → 1.0.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/FONT-LICENSE.txt +93 -0
- package/README.md +181 -2
- 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-B6dtlFlj.js +195 -0
- package/dist/chunks/BackgroundToolPanel-C3Rr9d4S.js +41 -0
- package/dist/chunks/BatchMaterials-DDoJTaS5.js +806 -0
- package/dist/chunks/BatchModeChoices-DeBARgvY.js +111 -0
- package/dist/chunks/BatchOutputColorPicker-D7WIDS4_.js +75 -0
- package/dist/chunks/BatchReferenceFields-Cr5WgFRJ.js +316 -0
- package/dist/chunks/BeautifyToolPanel-DDZXDQKM.js +215 -0
- package/dist/chunks/BrandMarkToolPanel-vKobk_R3.js +1179 -0
- package/dist/chunks/ContentTrimControl-BKCJEst5.js +297 -0
- package/dist/chunks/CropToolPanel-C_sW5tWL.js +218 -0
- package/dist/chunks/CutoutToolPanel-B7ObmiWd.js +73 -0
- package/dist/chunks/DisclosureToolPanel-F3ccFJIF.js +76 -0
- package/dist/chunks/ExpandToolPanel-BKjj5UJA.js +67 -0
- package/dist/chunks/ImageEffectsToolPanel-CsDIBpT6.js +966 -0
- package/dist/chunks/IpAuditToolPanel-CduDfFh-.js +96 -0
- package/dist/chunks/ListingToolPanel-8pJ2_zvI.js +783 -0
- package/dist/chunks/MaterialSelectionPlate-CW7HaS6v.js +30 -0
- package/dist/chunks/MetadataToolPanel-C8XJOamN.js +104 -0
- package/dist/chunks/OrientToolPanel-C1AzQchm.js +161 -0
- package/dist/chunks/PluginActionFooter.vue_vue_type_script_setup_true_lang-BGe419qz.js +102 -0
- package/dist/chunks/ResizeToolPanel-DWikcj2G.js +1178 -0
- package/dist/chunks/RetouchToolPanel-B4eQKk2W.js +350 -0
- package/dist/chunks/ShadowToolPanel-Bbj76hQd.js +254 -0
- package/dist/chunks/SvgExportToolPanel-BRxpzd7q.js +219 -0
- package/dist/chunks/TranslationToolPanel-Bxv8U2WY.js +125 -0
- package/dist/chunks/UpscaleToolPanel-BRIgpszs.js +127 -0
- package/dist/chunks/engine-D-T-1RSx.js +69 -0
- package/dist/chunks/entry-CboOSe2r.js +42945 -0
- package/dist/chunks/gpu-CScw5MNG.js +231 -0
- package/dist/chunks/hosted-resources-COzZ7nZY.js +8196 -0
- package/dist/chunks/loader-circle-CylCgDqP.js +16 -0
- package/dist/chunks/motionFeatures-D67ghPG1.js +4405 -0
- package/dist/chunks/search-BwsDnulU.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 +91 -3
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
const u = new URL("./ort.wasm.min.mjs", import.meta.url).href;
|
|
2
|
+
let a, t, s, d = !1;
|
|
3
|
+
self.onmessage = async ({ data: i }) => {
|
|
4
|
+
const { id: n, type: f } = i;
|
|
5
|
+
if (d) {
|
|
6
|
+
self.postMessage({ id: n, error: "Already processing" });
|
|
7
|
+
return;
|
|
8
|
+
}
|
|
9
|
+
d = !0;
|
|
10
|
+
let m, l;
|
|
11
|
+
try {
|
|
12
|
+
if (f === "load") {
|
|
13
|
+
if (a = await import(
|
|
14
|
+
/* @vite-ignore */
|
|
15
|
+
u
|
|
16
|
+
), a.env.wasm.numThreads = 1, a.env.wasm.proxy = !1, a.env.wasm.wasmPaths = {
|
|
17
|
+
mjs: new URL("./ort-wasm-simd-threaded.mjs", import.meta.url).href,
|
|
18
|
+
wasm: new URL("./ort-wasm-simd-threaded.wasm", import.meta.url).href
|
|
19
|
+
}, t) throw new Error("Model already loaded");
|
|
20
|
+
s = 512, self.postMessage({ stage: "loading" });
|
|
21
|
+
const e = await fetch(new URL("./int8-full-512.ort", import.meta.url));
|
|
22
|
+
if (!e.ok) throw new Error("Model download failed");
|
|
23
|
+
let r = new Uint8Array(await e.arrayBuffer());
|
|
24
|
+
self.postMessage({ stage: "starting" }), t = await a.InferenceSession.create(r, {
|
|
25
|
+
executionProviders: ["wasm"],
|
|
26
|
+
executionMode: "sequential",
|
|
27
|
+
graphOptimizationLevel: "disabled",
|
|
28
|
+
enableCpuMemArena: !1,
|
|
29
|
+
enableMemPattern: !1,
|
|
30
|
+
// The Web WASM binding frees the input model buffer after create().
|
|
31
|
+
// Never enable initializer pointers into that freed buffer.
|
|
32
|
+
extra: {
|
|
33
|
+
session: { use_ort_model_bytes_directly: "1", use_ort_model_bytes_for_initializers: "0" }
|
|
34
|
+
}
|
|
35
|
+
}), r = void 0, self.postMessage({ id: n, ready: !0 });
|
|
36
|
+
} else if (f === "run") {
|
|
37
|
+
if (!t || i.buffer.byteLength !== s * s * 3 * 4)
|
|
38
|
+
throw new Error("Invalid input");
|
|
39
|
+
m = new a.Tensor("float32", new Float32Array(i.buffer), [1, 3, s, s]), l = await t.run({ [t.inputNames[0]]: m }, [t.outputNames[0]]);
|
|
40
|
+
const e = l[t.outputNames[0]].data;
|
|
41
|
+
if (e.length !== s * s) throw new Error("Unexpected mask");
|
|
42
|
+
const r = new Float32Array(e.length);
|
|
43
|
+
for (let o = 0; o < e.length; o++) {
|
|
44
|
+
if (!Number.isFinite(e[o])) throw new Error("Invalid mask");
|
|
45
|
+
r[o] = 1 / (1 + Math.exp(-e[o]));
|
|
46
|
+
}
|
|
47
|
+
self.postMessage({ id: n, alpha: r.buffer }, [r.buffer]);
|
|
48
|
+
} else throw new Error("Unknown action");
|
|
49
|
+
} catch {
|
|
50
|
+
self.postMessage({ id: n, error: f === "load" ? "model-load-failed" : "inference-failed" });
|
|
51
|
+
} finally {
|
|
52
|
+
if (m?.dispose(), l) for (const e of Object.values(l)) e.dispose();
|
|
53
|
+
d = !1;
|
|
54
|
+
}
|
|
55
|
+
};
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { BatchWorkspaceAdapter } from './contracts';
|
|
2
|
+
import type { WorkspaceBrowserAdapterOptions } from './resource-contracts';
|
|
3
|
+
/** Explicit browser storage/execution. Does not create a network or Demo client. */
|
|
4
|
+
export declare function createBrowserBatchAdapter(options: WorkspaceBrowserAdapterOptions): BatchWorkspaceAdapter;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { WorkspaceLocalCapability } from './contracts';
|
|
2
|
+
import type { WorkspaceCutoutResources } from './resource-contracts';
|
|
3
|
+
/** Registers the original model engines. Each executor owns its dedicated Worker/ORT realm. */
|
|
4
|
+
export declare function createBrowserCutoutCapability(config: WorkspaceCutoutResources): WorkspaceLocalCapability;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { WorkspaceLocalCapability } from './contracts';
|
|
2
|
+
/** Built-in algorithms can be combined with a consumer's assets/persistence.
|
|
3
|
+
* Executors are created per workspace; this factory owns no application state.
|
|
4
|
+
*/
|
|
5
|
+
export declare function createBrowserLocalCapabilities(): Readonly<Record<string, WorkspaceLocalCapability>>;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { BatchWorkspaceAdapter } from './contracts';
|
|
2
|
+
import type { WorkspaceConfig } from './config';
|
|
3
|
+
export interface WorkspaceCapabilityRequest {
|
|
4
|
+
toolId: string;
|
|
5
|
+
params: Readonly<Record<string, unknown>>;
|
|
6
|
+
}
|
|
7
|
+
export interface WorkspaceCapabilityResolution {
|
|
8
|
+
allowed: boolean;
|
|
9
|
+
supported: boolean;
|
|
10
|
+
execution?: 'local' | 'remote';
|
|
11
|
+
entryId?: string;
|
|
12
|
+
mode?: string;
|
|
13
|
+
}
|
|
14
|
+
/** Technical support only. Never use this to re-authorize already frozen work. */
|
|
15
|
+
export declare function workspaceExecutionSupport(adapter: BatchWorkspaceAdapter, request: WorkspaceCapabilityRequest): 'local' | 'remote' | undefined;
|
|
16
|
+
export declare function resolveWorkspaceCapability(config: WorkspaceConfig | undefined, adapter: BatchWorkspaceAdapter, request: WorkspaceCapabilityRequest): WorkspaceCapabilityResolution;
|
|
17
|
+
/** Menu visibility shares the exact entry boundary, independent of a draft's mode. */
|
|
18
|
+
export declare function workspaceToolVisible(config: WorkspaceConfig | undefined, toolId: string, entryId?: string): boolean;
|
|
@@ -0,0 +1,195 @@
|
|
|
1
|
+
import { defineComponent as k, openBlock as d, createElementBlock as h, unref as a, Fragment as B, renderList as N, createElementVNode as c, createTextVNode as _, toDisplayString as f, createBlock as V, createCommentVNode as v, normalizeStyle as F, createVNode as g, computed as I, withCtx as p } from "vue";
|
|
2
|
+
import { F as P, P as T, R as U, _ as $, G as C } from "./entry-CboOSe2r.js";
|
|
3
|
+
import { f as j, ap as D } from "./hosted-resources-COzZ7nZY.js";
|
|
4
|
+
import { u as R, a as M, c as E, _ as S, n as z } from "./PluginActionFooter.vue_vue_type_script_setup_true_lang-BGe419qz.js";
|
|
5
|
+
const L = ["disabled", "aria-label"], G = { class: "basic-adjust-label" }, H = ["aria-label", "aria-valuetext", "title", "min", "max", "value", "onInput"], J = ["aria-label", "min", "max", "value", "onInput"], O = ["aria-label"], q = /* @__PURE__ */ k({
|
|
6
|
+
__name: "BasicAdjustPanel",
|
|
7
|
+
props: {
|
|
8
|
+
modelValue: {},
|
|
9
|
+
disabled: { type: Boolean },
|
|
10
|
+
hideReset: { type: Boolean }
|
|
11
|
+
},
|
|
12
|
+
emits: ["update:modelValue"],
|
|
13
|
+
setup(t, { emit: m }) {
|
|
14
|
+
const { ui: l, uiText: n } = P(), o = t, r = m, b = [
|
|
15
|
+
{
|
|
16
|
+
key: "brightness",
|
|
17
|
+
label: "亮度",
|
|
18
|
+
min: -1,
|
|
19
|
+
max: 1,
|
|
20
|
+
neutral: 0,
|
|
21
|
+
low: "偏暗",
|
|
22
|
+
high: "偏亮",
|
|
23
|
+
gradient: "#27313e, #9099a5, #ffffff"
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
key: "contrast",
|
|
27
|
+
label: "对比度",
|
|
28
|
+
min: 0,
|
|
29
|
+
max: 2,
|
|
30
|
+
neutral: 1,
|
|
31
|
+
low: "柔和",
|
|
32
|
+
high: "强对比",
|
|
33
|
+
gradient: "#a7acb3, #bec3ca 35%, #f7f8fa 55%, #252930 75%, #111418"
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
key: "saturation",
|
|
37
|
+
label: "饱和度",
|
|
38
|
+
min: 0,
|
|
39
|
+
max: 2,
|
|
40
|
+
neutral: 1,
|
|
41
|
+
low: "灰淡",
|
|
42
|
+
high: "浓烈",
|
|
43
|
+
gradient: "#aeb4bc, #d6ad99, #ef713f, #ff4820"
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
key: "vibrance",
|
|
47
|
+
label: "鲜艳度",
|
|
48
|
+
min: -1,
|
|
49
|
+
max: 1,
|
|
50
|
+
neutral: 0,
|
|
51
|
+
low: "低彩度",
|
|
52
|
+
high: "更鲜艳",
|
|
53
|
+
gradient: "#b4b9c2, #c0b6cb, #a796dd, #e971b8"
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
key: "temperature",
|
|
57
|
+
label: "色温",
|
|
58
|
+
min: -1,
|
|
59
|
+
max: 1,
|
|
60
|
+
neutral: 0,
|
|
61
|
+
low: "偏冷",
|
|
62
|
+
high: "偏暖",
|
|
63
|
+
gradient: "#3985e4, #dce5ed 50%, #ffd34c"
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
key: "tint",
|
|
67
|
+
label: "色调",
|
|
68
|
+
min: -1,
|
|
69
|
+
max: 1,
|
|
70
|
+
neutral: 0,
|
|
71
|
+
low: "偏绿",
|
|
72
|
+
high: "偏洋红",
|
|
73
|
+
gradient: "#59b98a, #e3e5e7 50%, #db55c2"
|
|
74
|
+
}
|
|
75
|
+
];
|
|
76
|
+
function y(s) {
|
|
77
|
+
const u = o.modelValue[s.key];
|
|
78
|
+
return `${u},${n(u === s.neutral ? "中性" : u < s.neutral ? s.low : s.high)}`;
|
|
79
|
+
}
|
|
80
|
+
function x(s, u) {
|
|
81
|
+
if (o.disabled) return;
|
|
82
|
+
const e = u.target.value;
|
|
83
|
+
if (!e.trim()) return;
|
|
84
|
+
const i = Number(e);
|
|
85
|
+
if (!Number.isFinite(i)) return;
|
|
86
|
+
const A = Math.round(Math.min(s.max, Math.max(s.min, i)) * 100) / 100;
|
|
87
|
+
r("update:modelValue", { ...o.modelValue, [s.key]: A });
|
|
88
|
+
}
|
|
89
|
+
function w() {
|
|
90
|
+
o.disabled || r("update:modelValue", { ...j });
|
|
91
|
+
}
|
|
92
|
+
return (s, u) => (d(), h("fieldset", {
|
|
93
|
+
class: "basic-adjust-panel",
|
|
94
|
+
disabled: t.disabled,
|
|
95
|
+
"aria-label": a(l)("tools.adjust.basicAdjustPanel_5eff15b3")
|
|
96
|
+
}, [
|
|
97
|
+
(d(), h(B, null, N(b, (e) => c("div", {
|
|
98
|
+
key: e.key,
|
|
99
|
+
class: "basic-adjust-row"
|
|
100
|
+
}, [
|
|
101
|
+
c("span", G, [
|
|
102
|
+
_(f(a(n)(e.label)), 1),
|
|
103
|
+
e.neutral === 1 ? (d(), V(T, {
|
|
104
|
+
key: 0,
|
|
105
|
+
text: a(l)("common.audit.neutralOne")
|
|
106
|
+
}, null, 8, ["text"])) : v("", !0)
|
|
107
|
+
]),
|
|
108
|
+
c("span", {
|
|
109
|
+
class: "basic-adjust-track",
|
|
110
|
+
style: F({ "--adjust-gradient": `linear-gradient(90deg, ${e.gradient})` })
|
|
111
|
+
}, [
|
|
112
|
+
c("input", {
|
|
113
|
+
class: "basic-adjust-range",
|
|
114
|
+
type: "range",
|
|
115
|
+
"aria-label": a(n)(e.label),
|
|
116
|
+
"aria-valuetext": y(e),
|
|
117
|
+
title: a(l)("tools.adjust.basicAdjustPanel_1f9e1d20", {
|
|
118
|
+
p0: a(n)(e.label),
|
|
119
|
+
p1: a(n)(e.low),
|
|
120
|
+
p2: a(n)(e.high)
|
|
121
|
+
}),
|
|
122
|
+
min: e.min,
|
|
123
|
+
max: e.max,
|
|
124
|
+
step: "0.01",
|
|
125
|
+
value: t.modelValue[e.key],
|
|
126
|
+
onInput: (i) => x(e, i)
|
|
127
|
+
}, null, 40, H)
|
|
128
|
+
], 4),
|
|
129
|
+
c("input", {
|
|
130
|
+
class: "basic-adjust-number",
|
|
131
|
+
type: "number",
|
|
132
|
+
"aria-label": a(l)("tools.adjust.basicAdjustPanel_fb9d3a1e", { p0: a(n)(e.label) }),
|
|
133
|
+
min: e.min,
|
|
134
|
+
max: e.max,
|
|
135
|
+
step: "0.01",
|
|
136
|
+
value: t.modelValue[e.key],
|
|
137
|
+
onInput: (i) => x(e, i)
|
|
138
|
+
}, null, 40, J)
|
|
139
|
+
])), 64)),
|
|
140
|
+
t.hideReset ? v("", !0) : (d(), h("button", {
|
|
141
|
+
key: 0,
|
|
142
|
+
type: "button",
|
|
143
|
+
class: "basic-adjust-reset",
|
|
144
|
+
"aria-label": a(l)("tools.adjust.basicAdjustPanel_98f4fdf7"),
|
|
145
|
+
onClick: w
|
|
146
|
+
}, [
|
|
147
|
+
g(a(U), { size: 14 }),
|
|
148
|
+
_(f(a(l)("tools.adjust.basicAdjustPanel_98f4fdf7")), 1)
|
|
149
|
+
], 8, O))
|
|
150
|
+
], 8, L));
|
|
151
|
+
}
|
|
152
|
+
}), K = /* @__PURE__ */ $(q, [["__scopeId", "data-v-15d718ff"]]), Q = { class: "hint" }, ee = /* @__PURE__ */ k({
|
|
153
|
+
__name: "AdjustToolPanel",
|
|
154
|
+
props: {
|
|
155
|
+
context: {}
|
|
156
|
+
},
|
|
157
|
+
setup(t) {
|
|
158
|
+
const { ui: m } = P(), l = t, n = R(() => l.context), o = I(() => D(n.value.adjust));
|
|
159
|
+
function r() {
|
|
160
|
+
l.context.resetDraft({ adjust: { ...j } });
|
|
161
|
+
}
|
|
162
|
+
const b = M(() => l.context, "adjust");
|
|
163
|
+
return (y, x) => (d(), V(C, {
|
|
164
|
+
context: t.context,
|
|
165
|
+
layout: "contained",
|
|
166
|
+
changed: a(E)(a(n).adjust, a(j)),
|
|
167
|
+
onReset: r
|
|
168
|
+
}, {
|
|
169
|
+
actions: p(() => [
|
|
170
|
+
g(S, {
|
|
171
|
+
context: t.context,
|
|
172
|
+
available: a(z)(t.context),
|
|
173
|
+
ready: !o.value
|
|
174
|
+
}, {
|
|
175
|
+
default: p(() => [
|
|
176
|
+
c("p", Q, f(a(m)("common.audit.saveVersion")), 1)
|
|
177
|
+
]),
|
|
178
|
+
_: 1
|
|
179
|
+
}, 8, ["context", "available", "ready"])
|
|
180
|
+
]),
|
|
181
|
+
default: p(() => [
|
|
182
|
+
g(K, {
|
|
183
|
+
"model-value": a(n).adjust,
|
|
184
|
+
disabled: t.context.readonly,
|
|
185
|
+
"hide-reset": !0,
|
|
186
|
+
"onUpdate:modelValue": a(b)
|
|
187
|
+
}, null, 8, ["model-value", "disabled", "onUpdate:modelValue"])
|
|
188
|
+
]),
|
|
189
|
+
_: 1
|
|
190
|
+
}, 8, ["context", "changed"]));
|
|
191
|
+
}
|
|
192
|
+
});
|
|
193
|
+
export {
|
|
194
|
+
ee as default
|
|
195
|
+
};
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { defineComponent as u, openBlock as m, createBlock as f, withCtx as l, createElementVNode as o, toDisplayString as c, unref as t, createVNode as d } from "vue";
|
|
2
|
+
import { F as x, G as b, _ as p } from "./entry-CboOSe2r.js";
|
|
3
|
+
import { u as P, _ as g, n as k } from "./PluginActionFooter.vue_vue_type_script_setup_true_lang-BGe419qz.js";
|
|
4
|
+
import { B as v } from "./BatchOutputColorPicker-D7WIDS4_.js";
|
|
5
|
+
const B = ["disabled"], _ = { class: "output-color-field" }, C = /* @__PURE__ */ u({
|
|
6
|
+
__name: "BackgroundToolPanel",
|
|
7
|
+
props: {
|
|
8
|
+
context: {}
|
|
9
|
+
},
|
|
10
|
+
setup(e) {
|
|
11
|
+
const { ui: a } = x(), s = e, i = P(() => s.context);
|
|
12
|
+
return (h, n) => (m(), f(b, { context: e.context }, {
|
|
13
|
+
actions: l(() => [
|
|
14
|
+
d(g, {
|
|
15
|
+
context: e.context,
|
|
16
|
+
available: t(k)(e.context)
|
|
17
|
+
}, null, 8, ["context", "available"])
|
|
18
|
+
]),
|
|
19
|
+
default: l(() => [
|
|
20
|
+
o("fieldset", {
|
|
21
|
+
class: "tool-fields plugin-fields",
|
|
22
|
+
disabled: e.context.readonly
|
|
23
|
+
}, [
|
|
24
|
+
o("p", null, c(t(a)("common.toolPanel_018bab40")), 1),
|
|
25
|
+
o("div", _, [
|
|
26
|
+
o("span", null, c(t(a)("common.toolPanel_243779ee")), 1),
|
|
27
|
+
d(v, {
|
|
28
|
+
"model-value": t(i).backgroundColor,
|
|
29
|
+
disabled: e.context.readonly,
|
|
30
|
+
"onUpdate:modelValue": n[0] || (n[0] = (r) => e.context.updateDraft({ backgroundColor: r }))
|
|
31
|
+
}, null, 8, ["model-value", "disabled"])
|
|
32
|
+
])
|
|
33
|
+
], 8, B)
|
|
34
|
+
]),
|
|
35
|
+
_: 1
|
|
36
|
+
}, 8, ["context"]));
|
|
37
|
+
}
|
|
38
|
+
}), I = /* @__PURE__ */ p(C, [["__scopeId", "data-v-99612892"]]);
|
|
39
|
+
export {
|
|
40
|
+
I as default
|
|
41
|
+
};
|