@fleox/agentphoto 0.0.0-stage → 0.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/LICENSE +143 -0
- package/README.md +229 -2
- package/changelog.json +17 -0
- package/dist/agent/agentphoto.mjs +3307 -0
- package/dist/agent/chunks/assets-CDQo3VqD.mjs +151 -0
- package/dist/agent/chunks/catalog-DIZ5dnH5.mjs +953 -0
- package/dist/agent/chunks/context-DoLoLF9f.mjs +75 -0
- package/dist/agent/chunks/doc-BjY_j4Su.mjs +773 -0
- package/dist/agent/chunks/export-CLmpFART.mjs +140 -0
- package/dist/agent/chunks/ids-DAmiNwd9.mjs +28 -0
- package/dist/agent/chunks/imageInfo-QxAfu8R6.mjs +173 -0
- package/dist/agent/chunks/jsonPath-B7vAPXsi.mjs +155 -0
- package/dist/agent/chunks/library-C_EXiphj.mjs +16 -0
- package/dist/agent/chunks/models-C4i_hicr.mjs +387 -0
- package/dist/agent/chunks/output-3F12IR9O.mjs +130 -0
- package/dist/agent/chunks/package-DSmAxrla.mjs +71 -0
- package/dist/agent/chunks/project-CUykGysG.mjs +198 -0
- package/dist/agent/chunks/rolldown-runtime-CMQPkI6i.mjs +18 -0
- package/dist/agent/chunks/server-I0trf5tM.mjs +241 -0
- package/dist/agent/chunks/templates--YGpGuHh.mjs +40 -0
- package/dist/agent/chunks/tools-Dnh8g6F9.mjs +1354 -0
- package/dist/agent/chunks/tree-DO7N0UDV.mjs +127 -0
- package/dist/agent/chunks/types-DOK7tAAu.mjs +30 -0
- package/dist/agent/chunks/validate-CXPFB-i6.mjs +936 -0
- package/dist/engine/agentphoto-engine.js +2777 -0
- package/dist/engine/chunks/transformers.web-D5Vsg6-A.js +18494 -0
- package/dist/engine/ort/ort-wasm-simd-threaded.asyncify.mjs +124 -0
- package/dist/engine/ort/ort-wasm-simd-threaded.asyncify.wasm +0 -0
- package/dist/studio/assets/index-Be8JnaFy.js +28 -0
- package/dist/studio/assets/index-DwPms2S5.css +1 -0
- package/dist/studio/assets/transformers.web-DgnCIB_X.js +38 -0
- package/dist/studio/index.html +15 -0
- package/dist/studio/library/LICENSES.md +57 -0
- package/dist/studio/library/fonts/OFL.txt +90 -0
- package/dist/studio/library/fonts/anton/anton-latin-400-normal.woff2 +0 -0
- package/dist/studio/library/fonts/anton/anton-latin-ext-400-normal.woff2 +0 -0
- package/dist/studio/library/fonts/archivo-black/archivo-black-latin-400-normal.woff2 +0 -0
- package/dist/studio/library/fonts/archivo-black/archivo-black-latin-ext-400-normal.woff2 +0 -0
- package/dist/studio/library/fonts/bebas-neue/bebas-neue-latin-400-normal.woff2 +0 -0
- package/dist/studio/library/fonts/bebas-neue/bebas-neue-latin-ext-400-normal.woff2 +0 -0
- package/dist/studio/library/fonts/caveat/caveat-latin-400-normal.woff2 +0 -0
- package/dist/studio/library/fonts/caveat/caveat-latin-700-normal.woff2 +0 -0
- package/dist/studio/library/fonts/caveat/caveat-latin-ext-400-normal.woff2 +0 -0
- package/dist/studio/library/fonts/caveat/caveat-latin-ext-700-normal.woff2 +0 -0
- package/dist/studio/library/fonts/dm-serif/dm-serif-display-latin-400-normal.woff2 +0 -0
- package/dist/studio/library/fonts/dm-serif/dm-serif-display-latin-ext-400-normal.woff2 +0 -0
- package/dist/studio/library/fonts/inter/inter-latin-400-normal.woff2 +0 -0
- package/dist/studio/library/fonts/inter/inter-latin-600-normal.woff2 +0 -0
- package/dist/studio/library/fonts/inter/inter-latin-700-normal.woff2 +0 -0
- package/dist/studio/library/fonts/inter/inter-latin-800-normal.woff2 +0 -0
- package/dist/studio/library/fonts/inter/inter-latin-ext-400-normal.woff2 +0 -0
- package/dist/studio/library/fonts/inter/inter-latin-ext-600-normal.woff2 +0 -0
- package/dist/studio/library/fonts/inter/inter-latin-ext-700-normal.woff2 +0 -0
- package/dist/studio/library/fonts/inter/inter-latin-ext-800-normal.woff2 +0 -0
- package/dist/studio/library/fonts/jetbrains-mono/jetbrains-mono-latin-400-normal.woff2 +0 -0
- package/dist/studio/library/fonts/jetbrains-mono/jetbrains-mono-latin-700-normal.woff2 +0 -0
- package/dist/studio/library/fonts/jetbrains-mono/jetbrains-mono-latin-ext-400-normal.woff2 +0 -0
- package/dist/studio/library/fonts/jetbrains-mono/jetbrains-mono-latin-ext-700-normal.woff2 +0 -0
- package/dist/studio/library/fonts/lobster/lobster-latin-400-normal.woff2 +0 -0
- package/dist/studio/library/fonts/lobster/lobster-latin-ext-400-normal.woff2 +0 -0
- package/dist/studio/library/fonts/montserrat/montserrat-latin-400-normal.woff2 +0 -0
- package/dist/studio/library/fonts/montserrat/montserrat-latin-700-normal.woff2 +0 -0
- package/dist/studio/library/fonts/montserrat/montserrat-latin-800-normal.woff2 +0 -0
- package/dist/studio/library/fonts/montserrat/montserrat-latin-ext-400-normal.woff2 +0 -0
- package/dist/studio/library/fonts/montserrat/montserrat-latin-ext-700-normal.woff2 +0 -0
- package/dist/studio/library/fonts/montserrat/montserrat-latin-ext-800-normal.woff2 +0 -0
- package/dist/studio/library/fonts/oswald/oswald-latin-400-normal.woff2 +0 -0
- package/dist/studio/library/fonts/oswald/oswald-latin-600-normal.woff2 +0 -0
- package/dist/studio/library/fonts/oswald/oswald-latin-ext-400-normal.woff2 +0 -0
- package/dist/studio/library/fonts/oswald/oswald-latin-ext-600-normal.woff2 +0 -0
- package/dist/studio/library/fonts/pacifico/pacifico-latin-400-normal.woff2 +0 -0
- package/dist/studio/library/fonts/pacifico/pacifico-latin-ext-400-normal.woff2 +0 -0
- package/dist/studio/library/fonts/playfair/playfair-display-latin-400-italic.woff2 +0 -0
- package/dist/studio/library/fonts/playfair/playfair-display-latin-400-normal.woff2 +0 -0
- package/dist/studio/library/fonts/playfair/playfair-display-latin-700-normal.woff2 +0 -0
- package/dist/studio/library/fonts/playfair/playfair-display-latin-ext-400-italic.woff2 +0 -0
- package/dist/studio/library/fonts/playfair/playfair-display-latin-ext-400-normal.woff2 +0 -0
- package/dist/studio/library/fonts/playfair/playfair-display-latin-ext-700-normal.woff2 +0 -0
- package/dist/studio/library/fonts/poppins/poppins-latin-400-normal.woff2 +0 -0
- package/dist/studio/library/fonts/poppins/poppins-latin-600-normal.woff2 +0 -0
- package/dist/studio/library/fonts/poppins/poppins-latin-700-normal.woff2 +0 -0
- package/dist/studio/library/fonts/poppins/poppins-latin-ext-400-normal.woff2 +0 -0
- package/dist/studio/library/fonts/poppins/poppins-latin-ext-600-normal.woff2 +0 -0
- package/dist/studio/library/fonts/poppins/poppins-latin-ext-700-normal.woff2 +0 -0
- package/dist/studio/library/fonts/roboto-slab/LICENSE.txt +202 -0
- package/dist/studio/library/fonts/roboto-slab/roboto-slab-latin-400-normal.woff2 +0 -0
- package/dist/studio/library/fonts/roboto-slab/roboto-slab-latin-700-normal.woff2 +0 -0
- package/dist/studio/library/fonts/roboto-slab/roboto-slab-latin-ext-400-normal.woff2 +0 -0
- package/dist/studio/library/fonts/roboto-slab/roboto-slab-latin-ext-700-normal.woff2 +0 -0
- package/dist/studio/library/fonts/space-grotesk/space-grotesk-latin-500-normal.woff2 +0 -0
- package/dist/studio/library/fonts/space-grotesk/space-grotesk-latin-700-normal.woff2 +0 -0
- package/dist/studio/library/fonts/space-grotesk/space-grotesk-latin-ext-500-normal.woff2 +0 -0
- package/dist/studio/library/fonts/space-grotesk/space-grotesk-latin-ext-700-normal.woff2 +0 -0
- package/dist/studio/library/images/city.jpg +0 -0
- package/dist/studio/library/images/food.jpg +0 -0
- package/dist/studio/library/images/landscape.jpg +0 -0
- package/dist/studio/library/images/pet.jpg +0 -0
- package/dist/studio/library/images/portrait.jpg +0 -0
- package/dist/studio/library/images/product.jpg +0 -0
- package/dist/studio/library/index.json +752 -0
- package/dist/studio/templates/avatar-pro/assets/masks/photo-cutout.png +0 -0
- package/dist/studio/templates/avatar-pro/photo.json +13 -0
- package/dist/studio/templates/avatar-pro/preview.jpg +0 -0
- package/dist/studio/templates/avatar-pro/template.json +1 -0
- package/dist/studio/templates/index.json +1 -0
- package/dist/studio/templates/og-article/photo.json +13 -0
- package/dist/studio/templates/og-article/preview.jpg +0 -0
- package/dist/studio/templates/og-article/template.json +1 -0
- package/dist/studio/templates/polaroid/photo.json +13 -0
- package/dist/studio/templates/polaroid/preview.jpg +0 -0
- package/dist/studio/templates/polaroid/template.json +1 -0
- package/dist/studio/templates/product-white/assets/masks/photo-cutout.png +0 -0
- package/dist/studio/templates/product-white/photo.json +72 -0
- package/dist/studio/templates/product-white/preview.jpg +0 -0
- package/dist/studio/templates/product-white/template.json +1 -0
- package/dist/studio/templates/sale-banner/photo.json +125 -0
- package/dist/studio/templates/sale-banner/preview.jpg +0 -0
- package/dist/studio/templates/sale-banner/template.json +1 -0
- package/dist/studio/templates/social-quote/photo.json +13 -0
- package/dist/studio/templates/social-quote/preview.jpg +0 -0
- package/dist/studio/templates/social-quote/template.json +1 -0
- package/dist/studio/templates/story-promo/photo.json +13 -0
- package/dist/studio/templates/story-promo/preview.jpg +0 -0
- package/dist/studio/templates/story-promo/template.json +1 -0
- package/dist/studio/templates/youtube-thumbnail/photo.json +12 -0
- package/dist/studio/templates/youtube-thumbnail/preview.jpg +0 -0
- package/dist/studio/templates/youtube-thumbnail/template.json +1 -0
- package/library/LICENSES.md +57 -0
- package/library/fonts/OFL.txt +90 -0
- package/library/fonts/anton/anton-latin-400-normal.woff2 +0 -0
- package/library/fonts/anton/anton-latin-ext-400-normal.woff2 +0 -0
- package/library/fonts/archivo-black/archivo-black-latin-400-normal.woff2 +0 -0
- package/library/fonts/archivo-black/archivo-black-latin-ext-400-normal.woff2 +0 -0
- package/library/fonts/bebas-neue/bebas-neue-latin-400-normal.woff2 +0 -0
- package/library/fonts/bebas-neue/bebas-neue-latin-ext-400-normal.woff2 +0 -0
- package/library/fonts/caveat/caveat-latin-400-normal.woff2 +0 -0
- package/library/fonts/caveat/caveat-latin-700-normal.woff2 +0 -0
- package/library/fonts/caveat/caveat-latin-ext-400-normal.woff2 +0 -0
- package/library/fonts/caveat/caveat-latin-ext-700-normal.woff2 +0 -0
- package/library/fonts/dm-serif/dm-serif-display-latin-400-normal.woff2 +0 -0
- package/library/fonts/dm-serif/dm-serif-display-latin-ext-400-normal.woff2 +0 -0
- package/library/fonts/inter/inter-latin-400-normal.woff2 +0 -0
- package/library/fonts/inter/inter-latin-600-normal.woff2 +0 -0
- package/library/fonts/inter/inter-latin-700-normal.woff2 +0 -0
- package/library/fonts/inter/inter-latin-800-normal.woff2 +0 -0
- package/library/fonts/inter/inter-latin-ext-400-normal.woff2 +0 -0
- package/library/fonts/inter/inter-latin-ext-600-normal.woff2 +0 -0
- package/library/fonts/inter/inter-latin-ext-700-normal.woff2 +0 -0
- package/library/fonts/inter/inter-latin-ext-800-normal.woff2 +0 -0
- package/library/fonts/jetbrains-mono/jetbrains-mono-latin-400-normal.woff2 +0 -0
- package/library/fonts/jetbrains-mono/jetbrains-mono-latin-700-normal.woff2 +0 -0
- package/library/fonts/jetbrains-mono/jetbrains-mono-latin-ext-400-normal.woff2 +0 -0
- package/library/fonts/jetbrains-mono/jetbrains-mono-latin-ext-700-normal.woff2 +0 -0
- package/library/fonts/lobster/lobster-latin-400-normal.woff2 +0 -0
- package/library/fonts/lobster/lobster-latin-ext-400-normal.woff2 +0 -0
- package/library/fonts/montserrat/montserrat-latin-400-normal.woff2 +0 -0
- package/library/fonts/montserrat/montserrat-latin-700-normal.woff2 +0 -0
- package/library/fonts/montserrat/montserrat-latin-800-normal.woff2 +0 -0
- package/library/fonts/montserrat/montserrat-latin-ext-400-normal.woff2 +0 -0
- package/library/fonts/montserrat/montserrat-latin-ext-700-normal.woff2 +0 -0
- package/library/fonts/montserrat/montserrat-latin-ext-800-normal.woff2 +0 -0
- package/library/fonts/oswald/oswald-latin-400-normal.woff2 +0 -0
- package/library/fonts/oswald/oswald-latin-600-normal.woff2 +0 -0
- package/library/fonts/oswald/oswald-latin-ext-400-normal.woff2 +0 -0
- package/library/fonts/oswald/oswald-latin-ext-600-normal.woff2 +0 -0
- package/library/fonts/pacifico/pacifico-latin-400-normal.woff2 +0 -0
- package/library/fonts/pacifico/pacifico-latin-ext-400-normal.woff2 +0 -0
- package/library/fonts/playfair/playfair-display-latin-400-italic.woff2 +0 -0
- package/library/fonts/playfair/playfair-display-latin-400-normal.woff2 +0 -0
- package/library/fonts/playfair/playfair-display-latin-700-normal.woff2 +0 -0
- package/library/fonts/playfair/playfair-display-latin-ext-400-italic.woff2 +0 -0
- package/library/fonts/playfair/playfair-display-latin-ext-400-normal.woff2 +0 -0
- package/library/fonts/playfair/playfair-display-latin-ext-700-normal.woff2 +0 -0
- package/library/fonts/poppins/poppins-latin-400-normal.woff2 +0 -0
- package/library/fonts/poppins/poppins-latin-600-normal.woff2 +0 -0
- package/library/fonts/poppins/poppins-latin-700-normal.woff2 +0 -0
- package/library/fonts/poppins/poppins-latin-ext-400-normal.woff2 +0 -0
- package/library/fonts/poppins/poppins-latin-ext-600-normal.woff2 +0 -0
- package/library/fonts/poppins/poppins-latin-ext-700-normal.woff2 +0 -0
- package/library/fonts/roboto-slab/LICENSE.txt +202 -0
- package/library/fonts/roboto-slab/roboto-slab-latin-400-normal.woff2 +0 -0
- package/library/fonts/roboto-slab/roboto-slab-latin-700-normal.woff2 +0 -0
- package/library/fonts/roboto-slab/roboto-slab-latin-ext-400-normal.woff2 +0 -0
- package/library/fonts/roboto-slab/roboto-slab-latin-ext-700-normal.woff2 +0 -0
- package/library/fonts/space-grotesk/space-grotesk-latin-500-normal.woff2 +0 -0
- package/library/fonts/space-grotesk/space-grotesk-latin-700-normal.woff2 +0 -0
- package/library/fonts/space-grotesk/space-grotesk-latin-ext-500-normal.woff2 +0 -0
- package/library/fonts/space-grotesk/space-grotesk-latin-ext-700-normal.woff2 +0 -0
- package/library/images/city.jpg +0 -0
- package/library/images/food.jpg +0 -0
- package/library/images/landscape.jpg +0 -0
- package/library/images/pet.jpg +0 -0
- package/library/images/portrait.jpg +0 -0
- package/library/images/product.jpg +0 -0
- package/library/index.json +752 -0
- package/package.json +65 -4
- package/plugin/.claude-plugin/plugin.json +19 -0
- package/plugin/skills/agentphoto-cutout/SKILL.md +132 -0
- package/plugin/skills/agentphoto-design/SKILL.md +104 -0
- package/plugin/skills/agentphoto-design/references/layouts.md +60 -0
- package/plugin/skills/agentphoto-publish/SKILL.md +79 -0
- package/plugin/skills/agentphoto-retouch/SKILL.md +144 -0
- package/plugin/skills/agentphoto-retouch/references/filters.md +51 -0
- package/plugin/skills/agentphoto-retouch/references/patch-ops.md +66 -0
- package/plugin/skills/agentphoto-retouch/references/recipes.md +129 -0
- package/templates/avatar-pro/assets/masks/photo-cutout.png +0 -0
- package/templates/avatar-pro/photo.json +13 -0
- package/templates/avatar-pro/preview.jpg +0 -0
- package/templates/avatar-pro/template.json +1 -0
- package/templates/og-article/photo.json +13 -0
- package/templates/og-article/preview.jpg +0 -0
- package/templates/og-article/template.json +1 -0
- package/templates/polaroid/photo.json +13 -0
- package/templates/polaroid/preview.jpg +0 -0
- package/templates/polaroid/template.json +1 -0
- package/templates/product-white/assets/masks/photo-cutout.png +0 -0
- package/templates/product-white/photo.json +72 -0
- package/templates/product-white/preview.jpg +0 -0
- package/templates/product-white/template.json +1 -0
- package/templates/sale-banner/photo.json +125 -0
- package/templates/sale-banner/preview.jpg +0 -0
- package/templates/sale-banner/template.json +1 -0
- package/templates/social-quote/photo.json +13 -0
- package/templates/social-quote/preview.jpg +0 -0
- package/templates/social-quote/template.json +1 -0
- package/templates/story-promo/photo.json +13 -0
- package/templates/story-promo/preview.jpg +0 -0
- package/templates/story-promo/template.json +1 -0
- package/templates/youtube-thumbnail/photo.json +12 -0
- package/templates/youtube-thumbnail/preview.jpg +0 -0
- package/templates/youtube-thumbnail/template.json +1 -0
|
@@ -0,0 +1,953 @@
|
|
|
1
|
+
import { createRequire as __apRequire } from "node:module";
|
|
2
|
+
import { fileURLToPath as __apPath } from "node:url";
|
|
3
|
+
import { dirname as __apDirname } from "node:path";
|
|
4
|
+
__apRequire(import.meta.url);
|
|
5
|
+
const __filename = __apPath(import.meta.url);
|
|
6
|
+
__apDirname(__filename);
|
|
7
|
+
import { t as BLEND_MODES } from "./types-DOK7tAAu.mjs";
|
|
8
|
+
// src/core/catalog.ts
|
|
9
|
+
var n = (name, description, def, min, max, extra = {}) => ({
|
|
10
|
+
name,
|
|
11
|
+
type: "number",
|
|
12
|
+
description,
|
|
13
|
+
default: def,
|
|
14
|
+
min,
|
|
15
|
+
max,
|
|
16
|
+
...extra
|
|
17
|
+
});
|
|
18
|
+
var i = (name, description, def, min, max, extra = {}) => ({
|
|
19
|
+
name,
|
|
20
|
+
type: "int",
|
|
21
|
+
description,
|
|
22
|
+
default: def,
|
|
23
|
+
min,
|
|
24
|
+
max,
|
|
25
|
+
step: 1,
|
|
26
|
+
...extra
|
|
27
|
+
});
|
|
28
|
+
var b = (name, description, def) => ({
|
|
29
|
+
name,
|
|
30
|
+
type: "boolean",
|
|
31
|
+
description,
|
|
32
|
+
default: def
|
|
33
|
+
});
|
|
34
|
+
var c = (name, description, def) => ({
|
|
35
|
+
name,
|
|
36
|
+
type: "color",
|
|
37
|
+
description,
|
|
38
|
+
default: def
|
|
39
|
+
});
|
|
40
|
+
var e = (name, description, def, options) => ({
|
|
41
|
+
name,
|
|
42
|
+
type: "enum",
|
|
43
|
+
description,
|
|
44
|
+
default: def,
|
|
45
|
+
options
|
|
46
|
+
});
|
|
47
|
+
var rgb = (name, description) => ({
|
|
48
|
+
name,
|
|
49
|
+
type: "rgb",
|
|
50
|
+
description,
|
|
51
|
+
default: [
|
|
52
|
+
0,
|
|
53
|
+
0,
|
|
54
|
+
0
|
|
55
|
+
],
|
|
56
|
+
min: -100,
|
|
57
|
+
max: 100
|
|
58
|
+
});
|
|
59
|
+
var LOOKS = [
|
|
60
|
+
{
|
|
61
|
+
id: "bw",
|
|
62
|
+
title: "B&W",
|
|
63
|
+
description: "Neutral black & white."
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
id: "noir",
|
|
67
|
+
title: "Noir",
|
|
68
|
+
description: "Contrasty black & white with a dark vignette."
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
id: "sepia",
|
|
72
|
+
title: "Sepia",
|
|
73
|
+
description: "Warm brown monochrome, old print."
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
id: "vintage",
|
|
77
|
+
title: "Vintage",
|
|
78
|
+
description: "Faded warm colours, soft contrast, light vignette."
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
id: "polaroid",
|
|
82
|
+
title: "Polaroid",
|
|
83
|
+
description: "Warm, slightly washed instant-film look."
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
id: "lomo",
|
|
87
|
+
title: "Lomo",
|
|
88
|
+
description: "Saturated, contrasty, strong vignette."
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
id: "warm",
|
|
92
|
+
title: "Warm",
|
|
93
|
+
description: "Golden warm cast."
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
id: "cool",
|
|
97
|
+
title: "Cool",
|
|
98
|
+
description: "Blue cool cast."
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
id: "sunset",
|
|
102
|
+
title: "Sunset",
|
|
103
|
+
description: "Orange-pink evening glow."
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
id: "fade",
|
|
107
|
+
title: "Fade",
|
|
108
|
+
description: "Lifted blacks, matte pastel finish."
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
id: "punch",
|
|
112
|
+
title: "Punch",
|
|
113
|
+
description: "Vivid colours and extra contrast."
|
|
114
|
+
},
|
|
115
|
+
{
|
|
116
|
+
id: "cinema",
|
|
117
|
+
title: "Cinema",
|
|
118
|
+
description: "Teal shadows, orange highlights (blockbuster grade)."
|
|
119
|
+
},
|
|
120
|
+
{
|
|
121
|
+
id: "cyberpunk",
|
|
122
|
+
title: "Cyberpunk",
|
|
123
|
+
description: "Magenta / cyan neon grade."
|
|
124
|
+
},
|
|
125
|
+
{
|
|
126
|
+
id: "cross-process",
|
|
127
|
+
title: "Cross process",
|
|
128
|
+
description: "Green shadows, warm highlights (XPro film)."
|
|
129
|
+
},
|
|
130
|
+
{
|
|
131
|
+
id: "dramatic",
|
|
132
|
+
title: "Dramatic",
|
|
133
|
+
description: "Desaturated, hard contrast, dark edges."
|
|
134
|
+
},
|
|
135
|
+
{
|
|
136
|
+
id: "dreamy",
|
|
137
|
+
title: "Dreamy",
|
|
138
|
+
description: "Soft, airy, pastel lift."
|
|
139
|
+
},
|
|
140
|
+
{
|
|
141
|
+
id: "matte",
|
|
142
|
+
title: "Matte",
|
|
143
|
+
description: "Flat matte finish with lifted shadows and gentle colours."
|
|
144
|
+
},
|
|
145
|
+
{
|
|
146
|
+
id: "golden-hour",
|
|
147
|
+
title: "Golden hour",
|
|
148
|
+
description: "Late-afternoon warmth with soft highlights."
|
|
149
|
+
},
|
|
150
|
+
{
|
|
151
|
+
id: "film",
|
|
152
|
+
title: "Film",
|
|
153
|
+
description: "Subtle film emulation: soft contrast, warm mids, fine grain."
|
|
154
|
+
},
|
|
155
|
+
{
|
|
156
|
+
id: "clean",
|
|
157
|
+
title: "Clean",
|
|
158
|
+
description: "Bright, crisp, slightly cool — product / e-commerce."
|
|
159
|
+
}
|
|
160
|
+
];
|
|
161
|
+
var FILTERS = [
|
|
162
|
+
{
|
|
163
|
+
id: "brightnessContrast",
|
|
164
|
+
title: "Brightness / Contrast",
|
|
165
|
+
group: "light",
|
|
166
|
+
description: "Lighten or darken the image and increase or reduce contrast.",
|
|
167
|
+
params: [n("brightness", "-100 (darker) … 100 (lighter).", 0, -100, 100), n("contrast", "-100 (flat) … 100 (punchy).", 0, -100, 100)],
|
|
168
|
+
example: {
|
|
169
|
+
type: "brightnessContrast",
|
|
170
|
+
brightness: 10,
|
|
171
|
+
contrast: 15
|
|
172
|
+
},
|
|
173
|
+
cost: 1
|
|
174
|
+
},
|
|
175
|
+
{
|
|
176
|
+
id: "exposure",
|
|
177
|
+
title: "Exposure",
|
|
178
|
+
group: "light",
|
|
179
|
+
description: "Photographic exposure in stops (linear light), with offset and gamma.",
|
|
180
|
+
params: [
|
|
181
|
+
n("exposure", "Stops: +1 doubles the light.", 0, -5, 5, { step: .05 }),
|
|
182
|
+
n("offset", "Lifts (+) or crushes (−) the blacks.", 0, -.5, .5, { step: .01 }),
|
|
183
|
+
n("gamma", "Midtone gamma (1 = unchanged).", 1, .1, 5, { step: .01 })
|
|
184
|
+
],
|
|
185
|
+
example: {
|
|
186
|
+
type: "exposure",
|
|
187
|
+
exposure: .5
|
|
188
|
+
},
|
|
189
|
+
cost: 1
|
|
190
|
+
},
|
|
191
|
+
{
|
|
192
|
+
id: "shadowsHighlights",
|
|
193
|
+
title: "Shadows / Highlights",
|
|
194
|
+
group: "light",
|
|
195
|
+
description: "Open up dark areas and recover bright ones, using local luminance (backlit portraits, skies).",
|
|
196
|
+
params: [
|
|
197
|
+
n("shadows", "How much to lighten the shadows.", 35, 0, 100),
|
|
198
|
+
n("highlights", "How much to darken the highlights.", 0, 0, 100),
|
|
199
|
+
n("radius", "Neighbourhood size, px.", 30, 1, 200, { px: true })
|
|
200
|
+
],
|
|
201
|
+
example: {
|
|
202
|
+
type: "shadowsHighlights",
|
|
203
|
+
shadows: 40,
|
|
204
|
+
highlights: 20
|
|
205
|
+
},
|
|
206
|
+
cost: 4
|
|
207
|
+
},
|
|
208
|
+
{
|
|
209
|
+
id: "levels",
|
|
210
|
+
title: "Levels",
|
|
211
|
+
group: "tone",
|
|
212
|
+
description: "Input black / white points and midtone gamma, output range.",
|
|
213
|
+
params: [
|
|
214
|
+
n("black", "Input black point.", 0, 0, 254),
|
|
215
|
+
n("white", "Input white point.", 255, 1, 255),
|
|
216
|
+
n("gamma", "Midtones (>1 lighter).", 1, .1, 9.99, { step: .01 }),
|
|
217
|
+
n("outBlack", "Output black.", 0, 0, 255),
|
|
218
|
+
n("outWhite", "Output white.", 255, 0, 255)
|
|
219
|
+
],
|
|
220
|
+
example: {
|
|
221
|
+
type: "levels",
|
|
222
|
+
black: 12,
|
|
223
|
+
white: 240,
|
|
224
|
+
gamma: 1.1
|
|
225
|
+
},
|
|
226
|
+
cost: 1
|
|
227
|
+
},
|
|
228
|
+
{
|
|
229
|
+
id: "curves",
|
|
230
|
+
title: "Curves",
|
|
231
|
+
group: "tone",
|
|
232
|
+
description: "Tone curves through control points [input, output] (0..255), smooth (monotone cubic). `rgb` affects all channels; `red` / `green` / `blue` affect one.",
|
|
233
|
+
params: [
|
|
234
|
+
{
|
|
235
|
+
name: "rgb",
|
|
236
|
+
type: "curve",
|
|
237
|
+
description: "Master curve points, e.g. [[0,0],[64,50],[192,210],[255,255]] (an S-curve).",
|
|
238
|
+
default: [[0, 0], [255, 255]]
|
|
239
|
+
},
|
|
240
|
+
{
|
|
241
|
+
name: "red",
|
|
242
|
+
type: "curve",
|
|
243
|
+
description: "Red channel curve (optional)."
|
|
244
|
+
},
|
|
245
|
+
{
|
|
246
|
+
name: "green",
|
|
247
|
+
type: "curve",
|
|
248
|
+
description: "Green channel curve (optional)."
|
|
249
|
+
},
|
|
250
|
+
{
|
|
251
|
+
name: "blue",
|
|
252
|
+
type: "curve",
|
|
253
|
+
description: "Blue channel curve (optional)."
|
|
254
|
+
}
|
|
255
|
+
],
|
|
256
|
+
example: {
|
|
257
|
+
type: "curves",
|
|
258
|
+
rgb: [
|
|
259
|
+
[0, 0],
|
|
260
|
+
[64, 52],
|
|
261
|
+
[192, 206],
|
|
262
|
+
[255, 255]
|
|
263
|
+
]
|
|
264
|
+
},
|
|
265
|
+
cost: 1
|
|
266
|
+
},
|
|
267
|
+
{
|
|
268
|
+
id: "hueSaturation",
|
|
269
|
+
title: "Hue / Saturation",
|
|
270
|
+
group: "color",
|
|
271
|
+
description: "Rotate hues, change saturation and lightness. `colorize` tints the whole image with one hue.",
|
|
272
|
+
params: [
|
|
273
|
+
n("hue", "Hue rotation, degrees.", 0, -180, 180),
|
|
274
|
+
n("saturation", "-100 (grey) … 100.", 0, -100, 100),
|
|
275
|
+
n("lightness", "-100 … 100.", 0, -100, 100),
|
|
276
|
+
b("colorize", "Tint everything with `hue` (0..360 then) at `saturation`.", false)
|
|
277
|
+
],
|
|
278
|
+
example: {
|
|
279
|
+
type: "hueSaturation",
|
|
280
|
+
saturation: 20
|
|
281
|
+
},
|
|
282
|
+
cost: 2
|
|
283
|
+
},
|
|
284
|
+
{
|
|
285
|
+
id: "vibrance",
|
|
286
|
+
title: "Vibrance",
|
|
287
|
+
group: "color",
|
|
288
|
+
description: "Boost muted colours more than saturated ones (skin-safe saturation).",
|
|
289
|
+
params: [n("vibrance", "-100 … 100.", 30, -100, 100), n("saturation", "Plain saturation on top, -100 … 100.", 0, -100, 100)],
|
|
290
|
+
example: {
|
|
291
|
+
type: "vibrance",
|
|
292
|
+
vibrance: 30
|
|
293
|
+
},
|
|
294
|
+
cost: 1
|
|
295
|
+
},
|
|
296
|
+
{
|
|
297
|
+
id: "temperature",
|
|
298
|
+
title: "White balance",
|
|
299
|
+
group: "color",
|
|
300
|
+
description: "Colour temperature (blue ↔ yellow) and tint (green ↔ magenta). Fixes colour casts.",
|
|
301
|
+
params: [n("temperature", "-100 (cooler) … 100 (warmer).", 0, -100, 100), n("tint", "-100 (green) … 100 (magenta).", 0, -100, 100)],
|
|
302
|
+
example: {
|
|
303
|
+
type: "temperature",
|
|
304
|
+
temperature: 15
|
|
305
|
+
},
|
|
306
|
+
cost: 1
|
|
307
|
+
},
|
|
308
|
+
{
|
|
309
|
+
id: "colorBalance",
|
|
310
|
+
title: "Color balance",
|
|
311
|
+
group: "color",
|
|
312
|
+
description: "Shift shadows, midtones and highlights towards cyan/red, magenta/green, yellow/blue: [r, g, b] each -100..100.",
|
|
313
|
+
params: [
|
|
314
|
+
rgb("shadows", "[cyan↔red, magenta↔green, yellow↔blue] for the shadows."),
|
|
315
|
+
rgb("midtones", "Same for the midtones."),
|
|
316
|
+
rgb("highlights", "Same for the highlights."),
|
|
317
|
+
b("preserveLuminosity", "Keep the brightness unchanged.", true)
|
|
318
|
+
],
|
|
319
|
+
example: {
|
|
320
|
+
type: "colorBalance",
|
|
321
|
+
shadows: [
|
|
322
|
+
-10,
|
|
323
|
+
0,
|
|
324
|
+
10
|
|
325
|
+
],
|
|
326
|
+
highlights: [
|
|
327
|
+
10,
|
|
328
|
+
0,
|
|
329
|
+
-10
|
|
330
|
+
]
|
|
331
|
+
},
|
|
332
|
+
cost: 1
|
|
333
|
+
},
|
|
334
|
+
{
|
|
335
|
+
id: "photoFilter",
|
|
336
|
+
title: "Photo filter",
|
|
337
|
+
group: "color",
|
|
338
|
+
description: "Warming / cooling / coloured lens filter.",
|
|
339
|
+
params: [
|
|
340
|
+
c("color", "Filter colour (warming #ec8a00, cooling #006dff…).", "#ec8a00"),
|
|
341
|
+
n("density", "Strength, 0 … 100.", 25, 0, 100),
|
|
342
|
+
b("preserveLuminosity", "Keep the brightness unchanged.", true)
|
|
343
|
+
],
|
|
344
|
+
example: {
|
|
345
|
+
type: "photoFilter",
|
|
346
|
+
color: "#ec8a00",
|
|
347
|
+
density: 25
|
|
348
|
+
},
|
|
349
|
+
cost: 1
|
|
350
|
+
},
|
|
351
|
+
{
|
|
352
|
+
id: "gradientMap",
|
|
353
|
+
title: "Gradient map",
|
|
354
|
+
group: "color",
|
|
355
|
+
description: "Map luminance to a gradient (duotones, tritones): shadows take the first stop, highlights the last.",
|
|
356
|
+
params: [{
|
|
357
|
+
name: "stops",
|
|
358
|
+
type: "stops",
|
|
359
|
+
description: "Colours dark → light: [\"#1b1340\", \"#ff7a59\"] or [[0,\"#000\"],[1,\"#fff\"]].",
|
|
360
|
+
default: ["#000000", "#ffffff"]
|
|
361
|
+
}],
|
|
362
|
+
example: {
|
|
363
|
+
type: "gradientMap",
|
|
364
|
+
stops: [
|
|
365
|
+
"#1b1340",
|
|
366
|
+
"#ff7a59",
|
|
367
|
+
"#fff3d6"
|
|
368
|
+
]
|
|
369
|
+
},
|
|
370
|
+
cost: 1
|
|
371
|
+
},
|
|
372
|
+
{
|
|
373
|
+
id: "grayscale",
|
|
374
|
+
title: "Black & white",
|
|
375
|
+
group: "color",
|
|
376
|
+
description: "Convert to grey with adjustable channel weights (red / green / blue contributions, %).",
|
|
377
|
+
params: [
|
|
378
|
+
n("red", "Red contribution.", 30, -200, 300),
|
|
379
|
+
n("green", "Green contribution.", 59, -200, 300),
|
|
380
|
+
n("blue", "Blue contribution.", 11, -200, 300)
|
|
381
|
+
],
|
|
382
|
+
example: { type: "grayscale" },
|
|
383
|
+
cost: 1
|
|
384
|
+
},
|
|
385
|
+
{
|
|
386
|
+
id: "sepia",
|
|
387
|
+
title: "Sepia",
|
|
388
|
+
group: "color",
|
|
389
|
+
description: "Brown monochrome tone.",
|
|
390
|
+
params: [n("intensity", "0 … 100.", 100, 0, 100)],
|
|
391
|
+
example: {
|
|
392
|
+
type: "sepia",
|
|
393
|
+
intensity: 80
|
|
394
|
+
},
|
|
395
|
+
cost: 1
|
|
396
|
+
},
|
|
397
|
+
{
|
|
398
|
+
id: "invert",
|
|
399
|
+
title: "Invert",
|
|
400
|
+
group: "color",
|
|
401
|
+
description: "Negative image.",
|
|
402
|
+
params: [],
|
|
403
|
+
example: { type: "invert" },
|
|
404
|
+
cost: 1
|
|
405
|
+
},
|
|
406
|
+
{
|
|
407
|
+
id: "threshold",
|
|
408
|
+
title: "Threshold",
|
|
409
|
+
group: "stylize",
|
|
410
|
+
description: "Pure black & white at a luminance level.",
|
|
411
|
+
params: [n("level", "0 … 255.", 128, 0, 255)],
|
|
412
|
+
example: {
|
|
413
|
+
type: "threshold",
|
|
414
|
+
level: 128
|
|
415
|
+
},
|
|
416
|
+
cost: 1
|
|
417
|
+
},
|
|
418
|
+
{
|
|
419
|
+
id: "posterize",
|
|
420
|
+
title: "Posterize",
|
|
421
|
+
group: "stylize",
|
|
422
|
+
description: "Reduce the number of tones per channel.",
|
|
423
|
+
params: [i("levels", "Tones per channel.", 6, 2, 32)],
|
|
424
|
+
example: {
|
|
425
|
+
type: "posterize",
|
|
426
|
+
levels: 5
|
|
427
|
+
},
|
|
428
|
+
cost: 1
|
|
429
|
+
},
|
|
430
|
+
{
|
|
431
|
+
id: "blur",
|
|
432
|
+
title: "Gaussian blur",
|
|
433
|
+
group: "blur",
|
|
434
|
+
description: "Soft blur (backgrounds, depth of field when masked, privacy).",
|
|
435
|
+
params: [n("radius", "Radius, px.", 6, 0, 250, { px: true })],
|
|
436
|
+
example: {
|
|
437
|
+
type: "blur",
|
|
438
|
+
radius: 12
|
|
439
|
+
},
|
|
440
|
+
cost: 3
|
|
441
|
+
},
|
|
442
|
+
{
|
|
443
|
+
id: "motionBlur",
|
|
444
|
+
title: "Motion blur",
|
|
445
|
+
group: "blur",
|
|
446
|
+
description: "Directional blur (speed, panning).",
|
|
447
|
+
params: [n("angle", "Direction, degrees.", 0, -180, 180), n("distance", "Length, px.", 20, 0, 400, { px: true })],
|
|
448
|
+
example: {
|
|
449
|
+
type: "motionBlur",
|
|
450
|
+
angle: 0,
|
|
451
|
+
distance: 30
|
|
452
|
+
},
|
|
453
|
+
cost: 6
|
|
454
|
+
},
|
|
455
|
+
{
|
|
456
|
+
id: "surfaceBlur",
|
|
457
|
+
title: "Surface blur",
|
|
458
|
+
group: "blur",
|
|
459
|
+
description: "Edge-preserving smoothing (skin retouch, noise): flattens texture while keeping edges sharp. Usually masked to the area to smooth.",
|
|
460
|
+
params: [n("radius", "Neighbourhood, px.", 8, 1, 60, { px: true }), n("threshold", "Edge sensitivity, 1 (only flat areas) … 100 (smooth everything).", 25, 1, 100)],
|
|
461
|
+
example: {
|
|
462
|
+
type: "surfaceBlur",
|
|
463
|
+
radius: 8,
|
|
464
|
+
threshold: 25
|
|
465
|
+
},
|
|
466
|
+
cost: 6
|
|
467
|
+
},
|
|
468
|
+
{
|
|
469
|
+
id: "sharpen",
|
|
470
|
+
title: "Sharpen",
|
|
471
|
+
group: "detail",
|
|
472
|
+
description: "Unsharp mask: amount %, radius px, threshold (skip low-contrast detail such as skin / noise).",
|
|
473
|
+
params: [
|
|
474
|
+
n("amount", "Strength, %.", 80, 0, 500),
|
|
475
|
+
n("radius", "Px.", 1.2, .3, 20, {
|
|
476
|
+
px: true,
|
|
477
|
+
step: .1
|
|
478
|
+
}),
|
|
479
|
+
n("threshold", "0 … 255.", 2, 0, 255)
|
|
480
|
+
],
|
|
481
|
+
example: {
|
|
482
|
+
type: "sharpen",
|
|
483
|
+
amount: 80,
|
|
484
|
+
radius: 1.2
|
|
485
|
+
},
|
|
486
|
+
cost: 3
|
|
487
|
+
},
|
|
488
|
+
{
|
|
489
|
+
id: "clarity",
|
|
490
|
+
title: "Clarity",
|
|
491
|
+
group: "detail",
|
|
492
|
+
description: "Local midtone contrast (texture, punch) — negative values soften.",
|
|
493
|
+
params: [n("amount", "-100 … 100.", 30, -100, 100), n("radius", "Px.", 24, 2, 200, { px: true })],
|
|
494
|
+
example: {
|
|
495
|
+
type: "clarity",
|
|
496
|
+
amount: 25
|
|
497
|
+
},
|
|
498
|
+
cost: 4
|
|
499
|
+
},
|
|
500
|
+
{
|
|
501
|
+
id: "noise",
|
|
502
|
+
title: "Grain / noise",
|
|
503
|
+
group: "stylize",
|
|
504
|
+
description: "Film grain (deterministic: same seed, same grain).",
|
|
505
|
+
params: [
|
|
506
|
+
n("amount", "0 … 100.", 12, 0, 100),
|
|
507
|
+
b("monochrome", "Grey grain instead of colour.", true),
|
|
508
|
+
i("seed", "Random seed.", 1, 0, 999999),
|
|
509
|
+
n("size", "Grain size, px.", 1, 1, 8, {
|
|
510
|
+
px: true,
|
|
511
|
+
step: .5
|
|
512
|
+
})
|
|
513
|
+
],
|
|
514
|
+
example: {
|
|
515
|
+
type: "noise",
|
|
516
|
+
amount: 10
|
|
517
|
+
},
|
|
518
|
+
cost: 1
|
|
519
|
+
},
|
|
520
|
+
{
|
|
521
|
+
id: "pixelate",
|
|
522
|
+
title: "Pixelate",
|
|
523
|
+
group: "stylize",
|
|
524
|
+
description: "Big square pixels (mosaic, anonymise a face when masked).",
|
|
525
|
+
params: [n("size", "Cell size, px.", 16, 2, 400, { px: true })],
|
|
526
|
+
example: {
|
|
527
|
+
type: "pixelate",
|
|
528
|
+
size: 20
|
|
529
|
+
},
|
|
530
|
+
cost: 1
|
|
531
|
+
},
|
|
532
|
+
{
|
|
533
|
+
id: "vignette",
|
|
534
|
+
title: "Vignette",
|
|
535
|
+
group: "stylize",
|
|
536
|
+
description: "Darken (or lighten, negative amount) the edges to draw the eye to the centre.",
|
|
537
|
+
params: [
|
|
538
|
+
n("amount", "-100 (white) … 100 (dark).", 40, -100, 100),
|
|
539
|
+
n("size", "Clear centre size, 0 … 100.", 50, 0, 100),
|
|
540
|
+
n("feather", "Softness, 0 … 100.", 60, 0, 100),
|
|
541
|
+
c("color", "Edge colour.", "#000000")
|
|
542
|
+
],
|
|
543
|
+
example: {
|
|
544
|
+
type: "vignette",
|
|
545
|
+
amount: 40
|
|
546
|
+
},
|
|
547
|
+
cost: 1
|
|
548
|
+
},
|
|
549
|
+
{
|
|
550
|
+
id: "autoTone",
|
|
551
|
+
title: "Auto tone",
|
|
552
|
+
group: "auto",
|
|
553
|
+
description: "Stretch each channel's range (clips 0.5 % at each end) — fixes dull / hazy photos and colour casts.",
|
|
554
|
+
params: [n("clip", "Percent clipped at each end.", .5, 0, 5, { step: .1 })],
|
|
555
|
+
example: { type: "autoTone" },
|
|
556
|
+
cost: 1
|
|
557
|
+
},
|
|
558
|
+
{
|
|
559
|
+
id: "autoContrast",
|
|
560
|
+
title: "Auto contrast",
|
|
561
|
+
group: "auto",
|
|
562
|
+
description: "Stretch the luminance range without changing colours.",
|
|
563
|
+
params: [n("clip", "Percent clipped at each end.", .5, 0, 5, { step: .1 })],
|
|
564
|
+
example: { type: "autoContrast" },
|
|
565
|
+
cost: 1
|
|
566
|
+
},
|
|
567
|
+
{
|
|
568
|
+
id: "autoColor",
|
|
569
|
+
title: "Auto color",
|
|
570
|
+
group: "auto",
|
|
571
|
+
description: "Neutralise the colour cast (grey-world white balance) and stretch contrast.",
|
|
572
|
+
params: [],
|
|
573
|
+
example: { type: "autoColor" },
|
|
574
|
+
cost: 1
|
|
575
|
+
},
|
|
576
|
+
{
|
|
577
|
+
id: "look",
|
|
578
|
+
title: "Look",
|
|
579
|
+
group: "look",
|
|
580
|
+
description: "One-click photo grade (Instagram-style preset). Use `amount` (0..1) to dial it in.",
|
|
581
|
+
params: [e("look", "Look id.", "vintage", LOOKS.map((l) => l.id))],
|
|
582
|
+
example: {
|
|
583
|
+
type: "look",
|
|
584
|
+
look: "cinema",
|
|
585
|
+
amount: .7
|
|
586
|
+
},
|
|
587
|
+
cost: 2
|
|
588
|
+
}
|
|
589
|
+
];
|
|
590
|
+
var COMMON_FILTER_PARAMS = [b("enabled", "false = keep the filter but skip it.", true), n("amount", "Blend with the unfiltered pixels, 0 … 1.", 1, 0, 1, { step: .01 })];
|
|
591
|
+
var EFFECTS = [
|
|
592
|
+
{
|
|
593
|
+
id: "dropShadow",
|
|
594
|
+
title: "Drop shadow",
|
|
595
|
+
description: "Shadow cast by the layer's shape (cut-outs, text, stickers).",
|
|
596
|
+
params: [
|
|
597
|
+
c("color", "Shadow colour.", "#000000"),
|
|
598
|
+
n("opacity", "0 … 1.", .5, 0, 1, { step: .01 }),
|
|
599
|
+
n("angle", "Light angle, degrees (135 = shadow down-right).", 135, -180, 180),
|
|
600
|
+
n("distance", "Offset, px.", 12, 0, 500, { px: true }),
|
|
601
|
+
n("blur", "Softness, px.", 16, 0, 250, { px: true }),
|
|
602
|
+
n("spread", "Grow before blurring, px.", 0, 0, 100, { px: true })
|
|
603
|
+
]
|
|
604
|
+
},
|
|
605
|
+
{
|
|
606
|
+
id: "outerGlow",
|
|
607
|
+
title: "Outer glow",
|
|
608
|
+
description: "Soft halo around the layer (neon, separation from the background).",
|
|
609
|
+
params: [
|
|
610
|
+
c("color", "Glow colour.", "#ffffff"),
|
|
611
|
+
n("opacity", "0 … 1.", .6, 0, 1, { step: .01 }),
|
|
612
|
+
n("blur", "Size, px.", 20, 0, 250, { px: true }),
|
|
613
|
+
n("spread", "Grow before blurring, px.", 0, 0, 100, { px: true })
|
|
614
|
+
]
|
|
615
|
+
},
|
|
616
|
+
{
|
|
617
|
+
id: "innerShadow",
|
|
618
|
+
title: "Inner shadow",
|
|
619
|
+
description: "Shadow inside the layer's edges (inset, pressed look).",
|
|
620
|
+
params: [
|
|
621
|
+
c("color", "Shadow colour.", "#000000"),
|
|
622
|
+
n("opacity", "0 … 1.", .5, 0, 1, { step: .01 }),
|
|
623
|
+
n("angle", "Light angle, degrees.", 135, -180, 180),
|
|
624
|
+
n("distance", "Offset, px.", 6, 0, 200, { px: true }),
|
|
625
|
+
n("blur", "Softness, px.", 10, 0, 200, { px: true })
|
|
626
|
+
]
|
|
627
|
+
},
|
|
628
|
+
{
|
|
629
|
+
id: "stroke",
|
|
630
|
+
title: "Stroke",
|
|
631
|
+
description: "Outline around the layer's shape (sticker outline, text outline).",
|
|
632
|
+
params: [
|
|
633
|
+
c("color", "Outline colour.", "#ffffff"),
|
|
634
|
+
n("width", "Px.", 6, 0, 200, { px: true }),
|
|
635
|
+
e("position", "Where the outline sits.", "outside", [
|
|
636
|
+
"outside",
|
|
637
|
+
"center",
|
|
638
|
+
"inside"
|
|
639
|
+
]),
|
|
640
|
+
n("opacity", "0 … 1.", 1, 0, 1, { step: .01 })
|
|
641
|
+
]
|
|
642
|
+
},
|
|
643
|
+
{
|
|
644
|
+
id: "colorOverlay",
|
|
645
|
+
title: "Color overlay",
|
|
646
|
+
description: "Fill the layer's shape with a colour (recolour icons / silhouettes).",
|
|
647
|
+
params: [
|
|
648
|
+
c("color", "Colour.", "#ffffff"),
|
|
649
|
+
n("opacity", "0 … 1.", 1, 0, 1, { step: .01 }),
|
|
650
|
+
e("blend", "Blend mode of the overlay.", "normal", BLEND_MODES)
|
|
651
|
+
]
|
|
652
|
+
}
|
|
653
|
+
];
|
|
654
|
+
var FONTS = [
|
|
655
|
+
{
|
|
656
|
+
id: "inter",
|
|
657
|
+
family: "Inter",
|
|
658
|
+
weights: [
|
|
659
|
+
400,
|
|
660
|
+
600,
|
|
661
|
+
700,
|
|
662
|
+
800
|
|
663
|
+
],
|
|
664
|
+
style: "sans",
|
|
665
|
+
description: "Neutral modern sans — UI, body text, clean headlines."
|
|
666
|
+
},
|
|
667
|
+
{
|
|
668
|
+
id: "montserrat",
|
|
669
|
+
family: "Montserrat",
|
|
670
|
+
weights: [
|
|
671
|
+
400,
|
|
672
|
+
700,
|
|
673
|
+
800
|
|
674
|
+
],
|
|
675
|
+
style: "sans",
|
|
676
|
+
description: "Geometric sans — bold marketing headlines."
|
|
677
|
+
},
|
|
678
|
+
{
|
|
679
|
+
id: "poppins",
|
|
680
|
+
family: "Poppins",
|
|
681
|
+
weights: [
|
|
682
|
+
400,
|
|
683
|
+
600,
|
|
684
|
+
700
|
|
685
|
+
],
|
|
686
|
+
style: "sans",
|
|
687
|
+
description: "Friendly geometric sans — social posts, thumbnails."
|
|
688
|
+
},
|
|
689
|
+
{
|
|
690
|
+
id: "space-grotesk",
|
|
691
|
+
family: "Space Grotesk",
|
|
692
|
+
weights: [500, 700],
|
|
693
|
+
style: "sans",
|
|
694
|
+
description: "Techy grotesk — startups, tech."
|
|
695
|
+
},
|
|
696
|
+
{
|
|
697
|
+
id: "playfair",
|
|
698
|
+
family: "Playfair Display",
|
|
699
|
+
weights: [400, 700],
|
|
700
|
+
italic: [400],
|
|
701
|
+
style: "serif",
|
|
702
|
+
description: "Elegant high-contrast serif — luxury, editorial, quotes."
|
|
703
|
+
},
|
|
704
|
+
{
|
|
705
|
+
id: "dm-serif",
|
|
706
|
+
family: "DM Serif Display",
|
|
707
|
+
weights: [400],
|
|
708
|
+
style: "serif",
|
|
709
|
+
description: "Display serif — magazine covers, titles."
|
|
710
|
+
},
|
|
711
|
+
{
|
|
712
|
+
id: "roboto-slab",
|
|
713
|
+
family: "Roboto Slab",
|
|
714
|
+
weights: [400, 700],
|
|
715
|
+
style: "slab",
|
|
716
|
+
description: "Sturdy slab serif — posters, labels."
|
|
717
|
+
},
|
|
718
|
+
{
|
|
719
|
+
id: "bebas-neue",
|
|
720
|
+
family: "Bebas Neue",
|
|
721
|
+
weights: [400],
|
|
722
|
+
style: "display",
|
|
723
|
+
description: "Tall all-caps condensed — YouTube thumbnails, posters, sports."
|
|
724
|
+
},
|
|
725
|
+
{
|
|
726
|
+
id: "anton",
|
|
727
|
+
family: "Anton",
|
|
728
|
+
weights: [400],
|
|
729
|
+
style: "display",
|
|
730
|
+
description: "Heavy condensed — impact headlines."
|
|
731
|
+
},
|
|
732
|
+
{
|
|
733
|
+
id: "oswald",
|
|
734
|
+
family: "Oswald",
|
|
735
|
+
weights: [400, 600],
|
|
736
|
+
style: "display",
|
|
737
|
+
description: "Condensed gothic — banners, sale tags."
|
|
738
|
+
},
|
|
739
|
+
{
|
|
740
|
+
id: "archivo-black",
|
|
741
|
+
family: "Archivo Black",
|
|
742
|
+
weights: [400],
|
|
743
|
+
style: "display",
|
|
744
|
+
description: "Very bold grotesk — loud short words."
|
|
745
|
+
},
|
|
746
|
+
{
|
|
747
|
+
id: "lobster",
|
|
748
|
+
family: "Lobster",
|
|
749
|
+
weights: [400],
|
|
750
|
+
style: "script",
|
|
751
|
+
description: "Retro bold script — food, vintage, fun."
|
|
752
|
+
},
|
|
753
|
+
{
|
|
754
|
+
id: "pacifico",
|
|
755
|
+
family: "Pacifico",
|
|
756
|
+
weights: [400],
|
|
757
|
+
style: "script",
|
|
758
|
+
description: "Surf brush script — casual, summer."
|
|
759
|
+
},
|
|
760
|
+
{
|
|
761
|
+
id: "caveat",
|
|
762
|
+
family: "Caveat",
|
|
763
|
+
weights: [400, 700],
|
|
764
|
+
style: "script",
|
|
765
|
+
description: "Handwriting — notes, annotations, personal touch."
|
|
766
|
+
},
|
|
767
|
+
{
|
|
768
|
+
id: "jetbrains-mono",
|
|
769
|
+
family: "JetBrains Mono",
|
|
770
|
+
weights: [400, 700],
|
|
771
|
+
style: "mono",
|
|
772
|
+
description: "Monospace — code, tech labels."
|
|
773
|
+
}
|
|
774
|
+
];
|
|
775
|
+
var SIZE_PRESETS = [
|
|
776
|
+
{
|
|
777
|
+
id: "og",
|
|
778
|
+
title: "Open Graph / link preview",
|
|
779
|
+
width: 1200,
|
|
780
|
+
height: 630,
|
|
781
|
+
description: "Facebook, LinkedIn, Slack, iMessage link cards."
|
|
782
|
+
},
|
|
783
|
+
{
|
|
784
|
+
id: "square",
|
|
785
|
+
title: "Square post",
|
|
786
|
+
width: 1080,
|
|
787
|
+
height: 1080,
|
|
788
|
+
description: "Instagram / Facebook feed."
|
|
789
|
+
},
|
|
790
|
+
{
|
|
791
|
+
id: "portrait",
|
|
792
|
+
title: "Portrait post",
|
|
793
|
+
width: 1080,
|
|
794
|
+
height: 1350,
|
|
795
|
+
description: "Instagram 4:5 feed."
|
|
796
|
+
},
|
|
797
|
+
{
|
|
798
|
+
id: "story",
|
|
799
|
+
title: "Story / Reel / TikTok",
|
|
800
|
+
width: 1080,
|
|
801
|
+
height: 1920,
|
|
802
|
+
description: "9:16 vertical."
|
|
803
|
+
},
|
|
804
|
+
{
|
|
805
|
+
id: "landscape",
|
|
806
|
+
title: "Full HD",
|
|
807
|
+
width: 1920,
|
|
808
|
+
height: 1080,
|
|
809
|
+
description: "16:9 slides, hero images, wallpapers."
|
|
810
|
+
},
|
|
811
|
+
{
|
|
812
|
+
id: "youtube",
|
|
813
|
+
title: "YouTube thumbnail",
|
|
814
|
+
width: 1280,
|
|
815
|
+
height: 720,
|
|
816
|
+
description: "16:9 video thumbnail."
|
|
817
|
+
},
|
|
818
|
+
{
|
|
819
|
+
id: "twitter",
|
|
820
|
+
title: "X / Twitter post",
|
|
821
|
+
width: 1600,
|
|
822
|
+
height: 900,
|
|
823
|
+
description: "16:9 in-feed image."
|
|
824
|
+
},
|
|
825
|
+
{
|
|
826
|
+
id: "pinterest",
|
|
827
|
+
title: "Pinterest pin",
|
|
828
|
+
width: 1e3,
|
|
829
|
+
height: 1500,
|
|
830
|
+
description: "2:3 pin."
|
|
831
|
+
},
|
|
832
|
+
{
|
|
833
|
+
id: "banner",
|
|
834
|
+
title: "Web banner",
|
|
835
|
+
width: 1920,
|
|
836
|
+
height: 600,
|
|
837
|
+
description: "Wide hero / header banner."
|
|
838
|
+
},
|
|
839
|
+
{
|
|
840
|
+
id: "linkedin-banner",
|
|
841
|
+
title: "LinkedIn banner",
|
|
842
|
+
width: 1584,
|
|
843
|
+
height: 396,
|
|
844
|
+
description: "Profile cover."
|
|
845
|
+
},
|
|
846
|
+
{
|
|
847
|
+
id: "avatar",
|
|
848
|
+
title: "Avatar",
|
|
849
|
+
width: 800,
|
|
850
|
+
height: 800,
|
|
851
|
+
description: "Profile picture (often shown round)."
|
|
852
|
+
},
|
|
853
|
+
{
|
|
854
|
+
id: "product",
|
|
855
|
+
title: "Product shot",
|
|
856
|
+
width: 2e3,
|
|
857
|
+
height: 2e3,
|
|
858
|
+
description: "E-commerce square on white."
|
|
859
|
+
},
|
|
860
|
+
{
|
|
861
|
+
id: "a4",
|
|
862
|
+
title: "A4 portrait (150 dpi)",
|
|
863
|
+
width: 1240,
|
|
864
|
+
height: 1754,
|
|
865
|
+
description: "Flyer / print at 150 dpi."
|
|
866
|
+
}
|
|
867
|
+
];
|
|
868
|
+
var MODELS = [
|
|
869
|
+
{
|
|
870
|
+
id: "rmbg-1.4",
|
|
871
|
+
task: "background-removal",
|
|
872
|
+
repo: "briaai/RMBG-1.4",
|
|
873
|
+
sizeMb: 168,
|
|
874
|
+
license: "bria-rmbg-1.4 (non-commercial)",
|
|
875
|
+
description: "General background removal — products, people, animals, objects. Best default."
|
|
876
|
+
},
|
|
877
|
+
{
|
|
878
|
+
id: "modnet",
|
|
879
|
+
task: "background-removal",
|
|
880
|
+
repo: "Xenova/modnet",
|
|
881
|
+
sizeMb: 25,
|
|
882
|
+
license: "Apache-2.0",
|
|
883
|
+
description: "Portrait matting — people only, soft hair edges."
|
|
884
|
+
},
|
|
885
|
+
{
|
|
886
|
+
id: "slimsam",
|
|
887
|
+
task: "segmentation",
|
|
888
|
+
repo: "Xenova/slimsam-77-uniform",
|
|
889
|
+
sizeMb: 30,
|
|
890
|
+
license: "Apache-2.0",
|
|
891
|
+
description: "Segment Anything (light): select an object from points or a box."
|
|
892
|
+
},
|
|
893
|
+
{
|
|
894
|
+
id: "sam-base",
|
|
895
|
+
task: "segmentation",
|
|
896
|
+
repo: "Xenova/sam-vit-base",
|
|
897
|
+
sizeMb: 100,
|
|
898
|
+
license: "Apache-2.0",
|
|
899
|
+
description: "Segment Anything (base): more precise selections, slower."
|
|
900
|
+
}
|
|
901
|
+
];
|
|
902
|
+
var DEFAULT_MODELS = {
|
|
903
|
+
"background-removal": "rmbg-1.4",
|
|
904
|
+
segmentation: "slimsam"
|
|
905
|
+
};
|
|
906
|
+
var CATALOG = {
|
|
907
|
+
layerTypes: [
|
|
908
|
+
{
|
|
909
|
+
id: "image",
|
|
910
|
+
description: "A photo / bitmap from the project (assets/…) or the library (library:<id>), placed in a box (x, y, width, height, rotation, flip), optionally cropped (crop) and fitted (fit: fill | cover | contain)."
|
|
911
|
+
},
|
|
912
|
+
{
|
|
913
|
+
id: "text",
|
|
914
|
+
description: "Live text: text, font (catalog id), size, weight, italic, color (colour or gradient), align, valign, lineHeight, letterSpacing, transform, width (wrap), background (label box)."
|
|
915
|
+
},
|
|
916
|
+
{
|
|
917
|
+
id: "shape",
|
|
918
|
+
description: "Vector shape: shape rect | ellipse | line | polygon | star, fill (colour or gradient, null = none), stroke {color, width, dash}, radius, sides, innerRadius."
|
|
919
|
+
},
|
|
920
|
+
{
|
|
921
|
+
id: "fill",
|
|
922
|
+
description: "Solid colour or gradient covering the canvas (backgrounds, colour washes; use a mask to shape it)."
|
|
923
|
+
},
|
|
924
|
+
{
|
|
925
|
+
id: "adjustment",
|
|
926
|
+
description: "Applies its filters to everything below it (inside its group) — non-destructive global corrections."
|
|
927
|
+
},
|
|
928
|
+
{
|
|
929
|
+
id: "group",
|
|
930
|
+
description: "Groups layers (children, bottom → top): opacity, blend, mask and filters apply to the group as a whole."
|
|
931
|
+
}
|
|
932
|
+
],
|
|
933
|
+
blendModes: BLEND_MODES,
|
|
934
|
+
filters: FILTERS,
|
|
935
|
+
commonFilterParams: COMMON_FILTER_PARAMS,
|
|
936
|
+
looks: LOOKS,
|
|
937
|
+
effects: EFFECTS,
|
|
938
|
+
shapes: [
|
|
939
|
+
"rect",
|
|
940
|
+
"ellipse",
|
|
941
|
+
"line",
|
|
942
|
+
"polygon",
|
|
943
|
+
"star"
|
|
944
|
+
],
|
|
945
|
+
fonts: FONTS,
|
|
946
|
+
sizes: SIZE_PRESETS,
|
|
947
|
+
models: MODELS
|
|
948
|
+
};
|
|
949
|
+
var filterDef = (id) => FILTERS.find((f) => f.id === id);
|
|
950
|
+
var fontDef = (id) => FONTS.find((f) => f.id === id);
|
|
951
|
+
var sizePreset = (id) => SIZE_PRESETS.find((s) => s.id === id);
|
|
952
|
+
var modelDef = (id) => MODELS.find((m) => m.id === id);
|
|
953
|
+
export { FONTS as a, filterDef as c, sizePreset as d, EFFECTS as i, fontDef as l, COMMON_FILTER_PARAMS as n, MODELS as o, DEFAULT_MODELS as r, SIZE_PRESETS as s, CATALOG as t, modelDef as u };
|