@pixerate/editor 0.249.0 → 0.251.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (158) hide show
  1. package/dist/agent/index.cjs +40 -41
  2. package/dist/agent/index.js +9 -10
  3. package/dist/animation/index.cjs +6 -7
  4. package/dist/animation/index.js +5 -6
  5. package/dist/animation-editor/index.cjs +124 -123
  6. package/dist/animation-editor/index.js +15 -14
  7. package/dist/brushes/index.cjs +1406 -0
  8. package/dist/brushes/index.d.cts +12 -0
  9. package/dist/brushes/index.d.ts +12 -0
  10. package/dist/brushes/index.js +1406 -0
  11. package/dist/brushes/migrate.d.cts +17 -0
  12. package/dist/brushes/migrate.d.ts +17 -0
  13. package/dist/brushes/normalize.d.cts +15 -0
  14. package/dist/brushes/normalize.d.ts +15 -0
  15. package/dist/brushes/presets.d.cts +12 -0
  16. package/dist/brushes/presets.d.ts +12 -0
  17. package/dist/brushes/resolve.d.cts +56 -0
  18. package/dist/brushes/resolve.d.ts +56 -0
  19. package/dist/brushes/schema.d.cts +29 -0
  20. package/dist/brushes/schema.d.ts +29 -0
  21. package/dist/brushes/types.d.cts +323 -0
  22. package/dist/brushes/types.d.ts +323 -0
  23. package/dist/{brushstrokeRender-T3JZST44.js → brushstrokeRender-5PYSKZIJ.js} +9 -8
  24. package/dist/{brushstrokeRender-GCKK7V2I.cjs → brushstrokeRender-7FLLSQEC.cjs} +15 -14
  25. package/dist/canvas/index.cjs +120 -65
  26. package/dist/canvas/index.d.cts +1 -0
  27. package/dist/canvas/index.d.ts +1 -0
  28. package/dist/canvas/index.js +88 -33
  29. package/dist/canvas/stickers.d.cts +35 -0
  30. package/dist/canvas/stickers.d.ts +35 -0
  31. package/dist/chart/index.cjs +159 -160
  32. package/dist/chart/index.js +9 -10
  33. package/dist/{chunk-RXZL4NG5.js → chunk-226QDRO3.js} +1 -1
  34. package/dist/{chunk-DOIU7VJG.js → chunk-2ZJ4DT3M.js} +1 -1
  35. package/dist/{chunk-XZNU4DUX.cjs → chunk-3NS5C7FB.cjs} +76 -76
  36. package/dist/{chunk-UTI5IITZ.cjs → chunk-4ZC5QJE2.cjs} +3 -3
  37. package/dist/{chunk-L3JFOTBQ.js → chunk-5E2Q7ZHI.js} +1 -1
  38. package/dist/{chunk-6BIDVPED.js → chunk-5JNA6LLY.js} +1 -1
  39. package/dist/{chunk-RD7RX52G.cjs → chunk-5UEFBM2M.cjs} +207 -18
  40. package/dist/{chunk-WA44NKPF.js → chunk-62Z5WLRA.js} +1 -1
  41. package/dist/{chunk-BVRRIW7F.js → chunk-6GRUVGKU.js} +3 -3
  42. package/dist/{chunk-QARCM66V.js → chunk-6ZZKRH7R.js} +3 -3
  43. package/dist/{chunk-BP6KSGVD.js → chunk-7272D3K2.js} +4 -6
  44. package/dist/{chunk-O75V4ZS3.js → chunk-7P6VF3FG.js} +2 -2
  45. package/dist/{chunk-AU6MWQKZ.js → chunk-ABL7IWFZ.js} +1 -1
  46. package/dist/{chunk-5RH3VXAK.js → chunk-APX63ILU.js} +4 -100
  47. package/dist/{chunk-W7L4HUT2.cjs → chunk-CJ6TBL2N.cjs} +16 -16
  48. package/dist/{chunk-7PT4RJL5.cjs → chunk-EUIDTZNQ.cjs} +111 -113
  49. package/dist/{chunk-CXXXAZ7H.js → chunk-F6R67I3A.js} +1 -1
  50. package/dist/{chunk-I7NJPHWV.cjs → chunk-FQPUF2W2.cjs} +35 -606
  51. package/dist/{chunk-D5KGAO4Z.js → chunk-GCVFEPJG.js} +2 -573
  52. package/dist/{chunk-LEQKZGQI.js → chunk-GOBOCZZI.js} +1 -1
  53. package/dist/{chunk-PZP2SZIZ.js → chunk-GYMMNCFT.js} +3 -3
  54. package/dist/{chunk-NUTMINJZ.cjs → chunk-H7ET2ISK.cjs} +52 -52
  55. package/dist/chunk-HS6QDWDF.cjs +1029 -0
  56. package/dist/{chunk-T7KQEMAE.cjs → chunk-HUAISCUX.cjs} +18 -18
  57. package/dist/{chunk-YGQVCQTG.js → chunk-ILP77UD6.js} +1 -1
  58. package/dist/{chunk-GHCSC2WP.cjs → chunk-ISIO63Q5.cjs} +21 -15
  59. package/dist/{chunk-S6OT6CTS.cjs → chunk-IWEVV63O.cjs} +31 -33
  60. package/dist/{chunk-OFH6Q67U.js → chunk-JA57JIT5.js} +9 -3
  61. package/dist/{chunk-LP2MCSBE.cjs → chunk-JFHBXNR2.cjs} +88 -88
  62. package/dist/{chunk-IOFVM3L3.cjs → chunk-JPEHXIB5.cjs} +10 -10
  63. package/dist/chunk-JSDND7DF.cjs +173 -0
  64. package/dist/{chunk-36ZTV7WO.js → chunk-L6Y7TSQ4.js} +1 -1
  65. package/dist/{chunk-KYX7NZ5V.cjs → chunk-LFMKWGFL.cjs} +1 -1
  66. package/dist/{chunk-V6DT2CDH.js → chunk-M2TPMYJE.js} +1 -1
  67. package/dist/{chunk-LJZRHVZV.cjs → chunk-M5GLQQWG.cjs} +2 -2
  68. package/dist/{chunk-JEGJP4OW.js → chunk-MHLU6GRJ.js} +196 -7
  69. package/dist/{chunk-KMPM5JM5.js → chunk-MONXNVZK.js} +4 -6
  70. package/dist/chunk-MTKY6K3Q.js +1029 -0
  71. package/dist/{chunk-MOW3JMNG.cjs → chunk-N76AMOKE.cjs} +42 -42
  72. package/dist/{chunk-75K3W4D6.cjs → chunk-NKGB64CW.cjs} +16 -16
  73. package/dist/{chunk-SGPIVHJB.js → chunk-P3K2JCJA.js} +3 -3
  74. package/dist/chunk-PXDIAYB6.cjs +594 -0
  75. package/dist/{chunk-UBRJOIR5.js → chunk-QC3OXRE4.js} +9 -9
  76. package/dist/{chunk-QOBCBGGI.cjs → chunk-QKXO6JPP.cjs} +14 -14
  77. package/dist/{chunk-WLJZZHUZ.cjs → chunk-QLSGTCYT.cjs} +23 -23
  78. package/dist/{chunk-7YW7T5TJ.js → chunk-RHPSE2YR.js} +2 -2
  79. package/dist/{chunk-44BMJJVA.cjs → chunk-RUONPPMC.cjs} +8 -8
  80. package/dist/{chunk-LJRCU3BJ.cjs → chunk-SABJMH6M.cjs} +150 -15
  81. package/dist/{chunk-XWOLPNBW.cjs → chunk-SOSBOS5T.cjs} +22 -22
  82. package/dist/chunk-SZTI6EER.js +13 -0
  83. package/dist/{chunk-PPFJHTW5.cjs → chunk-TFF2GTGN.cjs} +22 -24
  84. package/dist/{chunk-2SMMZDMG.cjs → chunk-TLOGFIIV.cjs} +37 -37
  85. package/dist/chunk-TXFWZ5ZJ.js +594 -0
  86. package/dist/chunk-U67EN7GG.cjs +13 -0
  87. package/dist/{chunk-GXAK6Q5J.js → chunk-UFEDHACQ.js} +2 -2
  88. package/dist/{chunk-GA4EU4P3.cjs → chunk-UXETV2NC.cjs} +4 -4
  89. package/dist/{chunk-N4DFDI73.js → chunk-WKMUBATU.js} +1 -1
  90. package/dist/{chunk-3R5P3DVY.cjs → chunk-WRZ6C4TU.cjs} +6 -6
  91. package/dist/{chunk-EJLRBS5Q.js → chunk-WZOGDKCQ.js} +137 -2
  92. package/dist/{chunk-6ADHGQ73.js → chunk-YBAPT7NL.js} +2 -4
  93. package/dist/{chunk-K5DS2JTA.cjs → chunk-Z3BRH4JK.cjs} +6 -6
  94. package/dist/{chunk-XNZFVYC2.cjs → chunk-ZBCT5MEA.cjs} +7 -7
  95. package/dist/color/index.cjs +4 -6
  96. package/dist/color/index.js +7 -9
  97. package/dist/effects/helpers.d.cts +6 -0
  98. package/dist/effects/helpers.d.ts +6 -0
  99. package/dist/effects/index.cjs +62 -60
  100. package/dist/effects/index.js +5 -3
  101. package/dist/effects/tools.d.cts +6 -0
  102. package/dist/effects/tools.d.ts +6 -0
  103. package/dist/export/index.cjs +7 -8
  104. package/dist/export/index.js +6 -7
  105. package/dist/extensions/index.cjs +10 -11
  106. package/dist/extensions/index.js +9 -10
  107. package/dist/gradient/index.cjs +33 -34
  108. package/dist/gradient/index.js +4 -5
  109. package/dist/image-editor/effects.d.cts +1 -1
  110. package/dist/image-editor/effects.d.ts +1 -1
  111. package/dist/image-editor/index.cjs +887 -863
  112. package/dist/image-editor/index.d.cts +1 -0
  113. package/dist/image-editor/index.d.ts +1 -0
  114. package/dist/image-editor/index.js +69 -45
  115. package/dist/image-editor/stickers.d.cts +9 -0
  116. package/dist/image-editor/stickers.d.ts +9 -0
  117. package/dist/index.cjs +16 -17
  118. package/dist/index.js +10 -11
  119. package/dist/paint/index.cjs +6 -4
  120. package/dist/paint/index.js +21 -19
  121. package/dist/paint-editor/brushes.d.cts +1 -2
  122. package/dist/paint-editor/brushes.d.ts +1 -2
  123. package/dist/paint-editor/index.cjs +2199 -699
  124. package/dist/paint-editor/index.js +1577 -77
  125. package/dist/paint-editor/mark-settings.d.cts +104 -0
  126. package/dist/paint-editor/mark-settings.d.ts +104 -0
  127. package/dist/paint-editor/procedural.d.cts +2 -75
  128. package/dist/paint-editor/procedural.d.ts +2 -75
  129. package/dist/paint-editor/stickers.d.cts +1 -22
  130. package/dist/paint-editor/stickers.d.ts +1 -22
  131. package/dist/raster/index.cjs +2 -2
  132. package/dist/raster/index.js +9 -9
  133. package/dist/stickers/index.cjs +22 -16
  134. package/dist/stickers/index.d.cts +1 -1
  135. package/dist/stickers/index.d.ts +1 -1
  136. package/dist/stickers/index.js +14 -8
  137. package/dist/stickers/tools.d.cts +57 -1
  138. package/dist/stickers/tools.d.ts +57 -1
  139. package/dist/tokens/index.cjs +3 -4
  140. package/dist/tokens/index.js +2 -3
  141. package/dist/typography/index.cjs +7 -8
  142. package/dist/typography/index.js +2 -3
  143. package/dist/vector/index.cjs +1011 -977
  144. package/dist/vector/index.d.cts +1 -0
  145. package/dist/vector/index.d.ts +1 -0
  146. package/dist/vector/index.js +47 -13
  147. package/dist/vector/stickers.d.cts +11 -0
  148. package/dist/vector/stickers.d.ts +11 -0
  149. package/dist/video-editor/index.cjs +349 -350
  150. package/dist/video-editor/index.js +9 -10
  151. package/package.json +11 -1
  152. package/skills/pixerate-image-editor/SKILL.md +1 -1
  153. package/skills/pixerate-stickers/SKILL.md +13 -1
  154. package/dist/chunk-7AHBW2CQ.cjs +0 -200
  155. package/dist/chunk-F67XMVDI.js +0 -200
  156. package/dist/chunk-H4AOUUBE.cjs +0 -2635
  157. package/dist/chunk-J7T5QZ45.js +0 -2635
  158. package/dist/chunk-ZEYMKDYS.cjs +0 -269
@@ -1,12 +1,12 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
2
2
 
3
- var _chunk7PT4RJL5cjs = require('./chunk-7PT4RJL5.cjs');
3
+ var _chunkEUIDTZNQcjs = require('./chunk-EUIDTZNQ.cjs');
4
4
 
5
5
 
6
- var _chunkPPFJHTW5cjs = require('./chunk-PPFJHTW5.cjs');
6
+ var _chunkTFF2GTGNcjs = require('./chunk-TFF2GTGN.cjs');
7
7
 
8
8
 
9
- var _chunk7AHBW2CQcjs = require('./chunk-7AHBW2CQ.cjs');
9
+ var _chunk5UEFBM2Mcjs = require('./chunk-5UEFBM2M.cjs');
10
10
 
11
11
  // src/chart/color.ts
12
12
  var NAMED = {
@@ -83,18 +83,18 @@ function chartTextOn(fill, fallback, dark = "#0f172a", light = "#ffffff") {
83
83
  return darkRatio >= lightRatio ? dark : light;
84
84
  }
85
85
  function chartRgbToOklab(rgb) {
86
- const lab = _chunk7AHBW2CQcjs.rgbToOklab.call(void 0, { r: rgb[0], g: rgb[1], b: rgb[2], a: 1 });
86
+ const lab = _chunk5UEFBM2Mcjs.rgbToOklab.call(void 0, { r: rgb[0], g: rgb[1], b: rgb[2], a: 1 });
87
87
  return [lab.l, lab.a, lab.b];
88
88
  }
89
89
  function chartColorDistance(a, b) {
90
- return _chunkPPFJHTW5cjs.deltaEOK.call(void 0,
90
+ return _chunkTFF2GTGNcjs.deltaEOK.call(void 0,
91
91
  { r: a[0], g: a[1], b: a[2], a: 1 },
92
92
  { r: b[0], g: b[1], b: b[2], a: 1 }
93
93
  );
94
94
  }
95
95
  function simulateChartVision(rgb, vision) {
96
96
  if (vision === "normal") return rgb;
97
- const c = _chunk7PT4RJL5cjs.simulateColorVision.call(void 0, { r: rgb[0], g: rgb[1], b: rgb[2], a: 1 }, vision);
97
+ const c = _chunkEUIDTZNQcjs.simulateColorVision.call(void 0, { r: rgb[0], g: rgb[1], b: rgb[2], a: 1 }, vision);
98
98
  return [c.r, c.g, c.b];
99
99
  }
100
100
  function checkChartColors(colors, options = {}) {
@@ -1,15 +1,144 @@
1
1
  import {
2
2
  EDITOR_STICKERS_ID,
3
+ MAX_STICKER_PAGE,
3
4
  STAMP_KINDS,
4
- StickerError,
5
+ closestStickerRefs,
6
+ parseStickerRef,
5
7
  stampCoverage,
8
+ stickerIdFor,
6
9
  stickerPage,
7
10
  stickerRefOf
8
- } from "./chunk-5RH3VXAK.js";
11
+ } from "./chunk-APX63ILU.js";
12
+ import {
13
+ StickerError
14
+ } from "./chunk-SZTI6EER.js";
9
15
  import {
10
16
  pngDataUrl
11
17
  } from "./chunk-OTTT5N3K.js";
12
18
 
19
+ // src/stickers/tools.ts
20
+ var READ = { readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false };
21
+ var WRITE = { readOnlyHint: false, destructiveHint: false, idempotentHint: false, openWorldHint: false };
22
+ function stickerForAgent(provider, s) {
23
+ const { id, thumbnail: _thumbnail, ...rest } = s;
24
+ return { ref: stickerRefOf(provider, id), ...rest };
25
+ }
26
+ async function knownRefs(provider, cap = 500) {
27
+ const refs = [];
28
+ let after;
29
+ while (refs.length < cap) {
30
+ const page = await provider.list({ limit: MAX_STICKER_PAGE, ...after ? { after } : {} });
31
+ refs.push(...page.items.map((s) => stickerRefOf(provider, s.id)));
32
+ if (!page.next || !page.items.length) break;
33
+ after = page.next;
34
+ }
35
+ return refs;
36
+ }
37
+ async function describeStickerRef(provider, ref) {
38
+ parseStickerRef(ref);
39
+ const id = stickerIdFor(provider, ref);
40
+ const found = id === null ? void 0 : await provider.describe(id);
41
+ if (found) return found;
42
+ const near = closestStickerRefs(ref, await knownRefs(provider));
43
+ const owner = parseStickerRef(ref).provider;
44
+ const where = id === null && !provider.namespaced ? ` The sticker library is "${provider.id}", not "${owner}".` : "";
45
+ throw new StickerError("unknown_sticker", `No sticker "${ref}".${where} Closest: ${near.join(", ") || "none"}; find_stickers lists them.`);
46
+ }
47
+ function createStickerTools(options) {
48
+ const find = {
49
+ name: "find_stickers",
50
+ title: "Find stickers",
51
+ description: "Searches the sticker library (the editor's own stamps unless the host plugged in its own): words in the name, tags, category or description, filtered by category, tags and commercial licence, a small page at a time. Returns each sticker's ref (provider:id, for the tools that spray or place stickers), name, category, tags, natural width and height, formats, whether it is tintable (recoloured to the paint colour) and its licence, plus total and next (pass as after for the next page) and the categories. Changes nothing.",
52
+ inputSchema: {
53
+ type: "object",
54
+ properties: {
55
+ query: { type: "string", maxLength: 200, description: "Words to match (default: list everything)." },
56
+ category: { type: "string", description: "Only this category (the result lists them)." },
57
+ tags: { type: "array", maxItems: 10, items: { type: "string", description: "A tag." }, description: "Only stickers with every one of these tags." },
58
+ commercial: { type: "boolean", description: "true: only stickers whose licence allows commercial use." },
59
+ limit: { type: "integer", minimum: 1, maximum: MAX_STICKER_PAGE, description: "Page size (default 24)." },
60
+ after: { type: "string", description: "next from the previous page." }
61
+ },
62
+ additionalProperties: false
63
+ },
64
+ annotations: { title: "Find stickers", ...READ },
65
+ handler: async ({ query, category, tags, commercial, limit, after }) => {
66
+ const p = options.provider();
67
+ const categories = await p.categories?.() ?? null;
68
+ if (category !== void 0 && categories && !categories.some((c) => c.id === category)) {
69
+ throw new StickerError("invalid_argument", `No category "${category}" in "${p.name}"; categories: ${categories.map((c) => c.id).join(", ")}.`);
70
+ }
71
+ const o = { ...category !== void 0 ? { category } : {}, ...tags ? { tags } : {}, ...commercial ? { licence: { commercial: true } } : {}, ...limit !== void 0 ? { limit } : {}, ...after !== void 0 ? { after } : {} };
72
+ const q = typeof query === "string" ? query.trim() : "";
73
+ if (q && !p.capabilities.supportsSearch) throw new StickerError("invalid_argument", `"${p.name}" can't search; leave query out and filter by category instead.`);
74
+ const page = q ? await p.search(q, o) : await p.list(o);
75
+ return { provider: p.id, items: page.items.map((s) => stickerForAgent(p, s)), total: page.total, ...page.next ? { next: page.next } : {}, ...categories ? { categories } : {} };
76
+ }
77
+ };
78
+ const describe = {
79
+ name: "describe_sticker",
80
+ title: "Describe a sticker",
81
+ description: "Everything about one sticker by ref (from find_stickers): name, category, tags, natural size, formats, tintable, licence (with any attribution it asks for), dominant colours, variants and its outline as SVG path data (silhouette). An unknown ref is refused with the closest refs. Changes nothing.",
82
+ inputSchema: { type: "object", properties: { ref: { type: "string", description: "Sticker ref provider:id from find_stickers (e.g. editor:star)." } }, required: ["ref"], additionalProperties: false },
83
+ annotations: { title: "Describe a sticker", ...READ },
84
+ handler: async ({ ref }) => {
85
+ const p = options.provider();
86
+ const d = await describeStickerRef(p, ref);
87
+ const { thumbnail: _thumbnail, id, ...rest } = d;
88
+ return { ref: stickerRefOf(p, id), ...rest };
89
+ }
90
+ };
91
+ return options.insert ? [find, describe, createInsertStickerTool(options.provider, options.insert)] : [find, describe];
92
+ }
93
+ async function loadForHost(provider, ref, d, host, colour, size) {
94
+ const id = stickerIdFor(provider, ref);
95
+ const format = d.formats.includes(host.format) ? host.format : d.formats[0] ?? host.format;
96
+ return provider.load(id, { format, ...format === "png" ? { size: Math.max(8, Math.min(provider.capabilities.maxSize ?? 1024, Math.round(size))) } : {}, ...colour && d.tintable ? { colour } : {} });
97
+ }
98
+ async function insertSticker(provider, host, options) {
99
+ const d = await describeStickerRef(provider, options.ref);
100
+ if (options.color !== void 0 && !d.tintable) throw new StickerError("invalid_argument", `"${options.ref}" is not tintable (its art has its own colours); leave color out, or pick a tintable sticker (find_stickers lists tintable).`);
101
+ if (options.width !== void 0 && !(options.width > 0)) throw new StickerError("invalid_argument", `width must be a positive size, got ${options.width}.`);
102
+ const w = options.width ?? d.width;
103
+ const h = w * d.height / d.width;
104
+ const centre = host.defaultCentre();
105
+ const asset = await loadForHost(provider, options.ref, d, host, options.color, Math.max(w, h));
106
+ const ref = stickerRefOf(provider, d.id);
107
+ const made = await host.insert({ ref, description: d, asset, x: options.x ?? centre.x, y: options.y ?? centre.y, width: w, height: h, ...options.color ? { colour: options.color.toLowerCase() } : {} });
108
+ return { ...made, ref, width: w, height: h, licence: d.licence };
109
+ }
110
+ function createInsertStickerTool(provider, host) {
111
+ return {
112
+ name: "insert_sticker",
113
+ title: "Insert a sticker",
114
+ description: `Puts one sticker from the sticker library (ref from find_stickers) into the document as a new ${host.noun}, centred at x, y and width wide (its natural aspect kept; default its natural size), tinted to color when the sticker is tintable. Its art is loaded first; an unknown ref is refused with the closest ones. One undo step. Returns the new ${host.noun}'s id (for the editor's own tools, such as effects on it), the ref and its licence (credit any attribution it asks for).`,
115
+ inputSchema: {
116
+ type: "object",
117
+ properties: {
118
+ ref: { type: "string", minLength: 1, description: "Sticker ref provider:id from find_stickers (e.g. editor:star)." },
119
+ x: { type: "number", description: "Centre x in document units (default the middle of the view or document)." },
120
+ y: { type: "number", description: "Centre y in document units (default the middle of the view or document)." },
121
+ width: { type: "number", exclusiveMinimum: 0, maximum: 1e4, description: "Width in document units (default the natural width); the height follows the aspect." },
122
+ color: { type: "string", pattern: "^#[0-9a-fA-F]{6}$", description: "Tint #rrggbb for tintable stickers (default the sticker's own colour); refused for stickers that are not tintable." }
123
+ },
124
+ required: ["ref"],
125
+ additionalProperties: false
126
+ },
127
+ annotations: { title: "Insert a sticker", ...WRITE },
128
+ handler: ({ ref, x, y, width, color }) => insertSticker(provider(), host, { ref, x, y, width, color })
129
+ };
130
+ }
131
+ function createStickerToolProvider(options) {
132
+ return {
133
+ id: options.id ?? "stickers",
134
+ namespace: options.namespace,
135
+ title: "Stickers",
136
+ description: "Find and describe stickers from the sticker library, by ref (provider:id), for the editors that spray or place them.",
137
+ skill: "pixerate-stickers",
138
+ tools: createStickerTools(options)
139
+ };
140
+ }
141
+
13
142
  // src/stickers/editor.ts
14
143
  var BOX = 100;
15
144
  var GRID = 128;
@@ -294,6 +423,12 @@ var StickerBrowser = class {
294
423
  };
295
424
 
296
425
  export {
426
+ stickerForAgent,
427
+ describeStickerRef,
428
+ createStickerTools,
429
+ insertSticker,
430
+ createInsertStickerTool,
431
+ createStickerToolProvider,
297
432
  stampOutline,
298
433
  stampPixels,
299
434
  editorStickers,
@@ -1,18 +1,16 @@
1
1
  import {
2
2
  contrastLevel,
3
3
  contrastRatio,
4
- parseColor
5
- } from "./chunk-JEGJP4OW.js";
6
- import {
7
4
  linearSrgbToDisplayP3,
8
5
  linearToSrgb,
9
6
  oklabToOklch,
10
7
  oklabToRgb,
11
8
  oklchToOklab,
9
+ parseColor,
12
10
  rgbToHsl,
13
11
  rgbToOklab,
14
12
  srgbToLinear
15
- } from "./chunk-F67XMVDI.js";
13
+ } from "./chunk-MHLU6GRJ.js";
16
14
 
17
15
  // src/color/gamut.ts
18
16
  var clamp01 = (v) => Math.min(1, Math.max(0, v));
@@ -4,7 +4,7 @@
4
4
 
5
5
 
6
6
 
7
- var _chunkGHCSC2WPcjs = require('./chunk-GHCSC2WP.cjs');
7
+ var _chunkISIO63Q5cjs = require('./chunk-ISIO63Q5.cjs');
8
8
 
9
9
  // src/effects/templates.ts
10
10
  var SLOT_NAME = /^[A-Za-z][\w-]*$/;
@@ -133,7 +133,7 @@ function searchTemplateSummaries(catalog, options = {}) {
133
133
  const words = (_nullishCoalesce(options.query, () => ( ""))).toLowerCase().split(/\s+/).filter(Boolean);
134
134
  const scored = [];
135
135
  for (const t of catalog) {
136
- if (!_chunkGHCSC2WPcjs.hasEffectTags.call(void 0, t, options.tags)) continue;
136
+ if (!_chunkISIO63Q5cjs.hasEffectTags.call(void 0, t, options.tags)) continue;
137
137
  let score = 0;
138
138
  const name = t.name.toLowerCase();
139
139
  const rest = [t.id, ..._nullishCoalesce(t.tags, () => ( [])), t.description].join(" ").toLowerCase();
@@ -200,7 +200,7 @@ function checkEffectSequence(sequence, catalog) {
200
200
  const p = effectSubjectProblem(layer.subject);
201
201
  if (p) problems.push(`${where}: ${p}.`);
202
202
  }
203
- if (layer.role !== void 0 && !_chunkGHCSC2WPcjs.EFFECT_LAYER_ROLES.includes(layer.role)) problems.push(`${where}: role is one of ${_chunkGHCSC2WPcjs.EFFECT_LAYER_ROLES.join(", ")}.`);
203
+ if (layer.role !== void 0 && !_chunkISIO63Q5cjs.EFFECT_LAYER_ROLES.includes(layer.role)) problems.push(`${where}: role is one of ${_chunkISIO63Q5cjs.EFFECT_LAYER_ROLES.join(", ")}.`);
204
204
  if (layer.rect !== void 0 && !isRect(layer.rect)) problems.push(`${where}: rect must be { x, y, width, height } with width and height > 0.`);
205
205
  for (const k of ["from", "until"]) if (layer[k] !== void 0 && !isLayerTime(layer[k])) problems.push(`${where}: ${k} is ms \u2265 0 or { shots: n } with n \u2265 1.`);
206
206
  if (layer.opacity !== void 0 && !(typeof layer.opacity === "number" && layer.opacity >= 0 && layer.opacity <= 1)) problems.push(`${where}: opacity is 0\u20131.`);
@@ -235,8 +235,8 @@ function effectSequenceSlots(sequence) {
235
235
  return [...out];
236
236
  }
237
237
  async function fillEffectTemplate(provider, id, values = {}, options = {}) {
238
- if (!provider) throw new (0, _chunkGHCSC2WPcjs.NoEffectsProviderError)();
239
- if (!provider.capabilities.supportsTemplates || !provider.describeTemplate || !provider.instantiateTemplate) throw new (0, _chunkGHCSC2WPcjs.EffectUnsupportedError)(`${provider.name} has no sequence templates (capabilities.supportsTemplates is not set).`);
238
+ if (!provider) throw new (0, _chunkISIO63Q5cjs.NoEffectsProviderError)();
239
+ if (!provider.capabilities.supportsTemplates || !provider.describeTemplate || !provider.instantiateTemplate) throw new (0, _chunkISIO63Q5cjs.EffectUnsupportedError)(`${provider.name} has no sequence templates (capabilities.supportsTemplates is not set).`);
240
240
  const template = await provider.describeTemplate(id);
241
241
  const errors = checkTemplateValues(template.slots, values);
242
242
  if (errors.length) throw new Error(`${errors.join(" ")} describe_template lists what each slot takes.`);
@@ -256,7 +256,7 @@ function effectSequenceTiming(sequence) {
256
256
  const leadIns = [];
257
257
  let t = 0;
258
258
  sequence.shots.forEach((shot, i) => {
259
- const transition = i > 0 && shot.transition ? _nullishCoalesce(shot.transition.ms, () => ( _chunkGHCSC2WPcjs.EFFECT_TRANSITION_MS)) : 0;
259
+ const transition = i > 0 && shot.transition ? _nullishCoalesce(shot.transition.ms, () => ( _chunkISIO63Q5cjs.EFFECT_TRANSITION_MS)) : 0;
260
260
  const move = typeof _optionalChain([shot, 'access', _4 => _4.camera, 'optionalAccess', _5 => _5.in]) === "object" && i > 0 ? _nullishCoalesce(shot.camera.in.ms, () => ( 0)) : 0;
261
261
  const lead = Math.max(transition, move);
262
262
  starts.push(t);
@@ -7,7 +7,7 @@ var _chunkPY4GWSE2cjs = require('./chunk-PY4GWSE2.cjs');
7
7
 
8
8
 
9
9
 
10
- var _chunkGHCSC2WPcjs = require('./chunk-GHCSC2WP.cjs');
10
+ var _chunkISIO63Q5cjs = require('./chunk-ISIO63Q5.cjs');
11
11
 
12
12
 
13
13
  var _chunkWOFXZ3XUcjs = require('./chunk-WOFXZ3XU.cjs');
@@ -1316,12 +1316,12 @@ function videoEffectLayerKey(layer, width, height) {
1316
1316
  }
1317
1317
  function mixEffectPixels(a, b, k) {
1318
1318
  if (k >= 1) return b;
1319
- const out = _chunkGHCSC2WPcjs.createEffectPixels.call(void 0, a.width, a.height);
1319
+ const out = _chunkISIO63Q5cjs.createEffectPixels.call(void 0, a.width, a.height);
1320
1320
  for (let i = 0; i < out.data.length; i++) out.data[i] = a.data[i] + (b.data[i] - a.data[i]) * k;
1321
1321
  return out;
1322
1322
  }
1323
1323
  function overEffectPixels(base, top, opacity = 1) {
1324
- const out = _chunkGHCSC2WPcjs.createEffectPixels.call(void 0, base.width, base.height);
1324
+ const out = _chunkISIO63Q5cjs.createEffectPixels.call(void 0, base.width, base.height);
1325
1325
  const o = out.data;
1326
1326
  const b = base.data;
1327
1327
  const t = top.data;
@@ -1366,7 +1366,7 @@ var VideoEffectsEngine = (_class2 = class {
1366
1366
  __init10() {this.generation = 0}
1367
1367
 
1368
1368
  constructor(options = {}) {;_class2.prototype.__init5.call(this);_class2.prototype.__init6.call(this);_class2.prototype.__init7.call(this);_class2.prototype.__init8.call(this);_class2.prototype.__init9.call(this);_class2.prototype.__init10.call(this);
1369
- this.slot = _nullishCoalesce(options.slot, () => ( new (0, _chunkGHCSC2WPcjs.EffectsSlot)()));
1369
+ this.slot = _nullishCoalesce(options.slot, () => ( new (0, _chunkISIO63Q5cjs.EffectsSlot)()));
1370
1370
  this.maxEntries = _nullishCoalesce(options.maxEntries, () => ( 120));
1371
1371
  this.toImage = _nullishCoalesce(options.toImage, () => ( defaultToImage));
1372
1372
  this.pool = new (0, _chunkPY4GWSE2cjs.EffectRendererPool)({ maxRenderers: options.maxRenderers });
@@ -1508,7 +1508,7 @@ function checkVideoEffectPlace(d, place) {
1508
1508
  if (d.kind === "motion" || !d.uses.some((u) => allowed.includes(u))) {
1509
1509
  const where = place === "clip" ? "on a clip" : place === "transition" ? "as a transition" : "as an effect clip";
1510
1510
  const instead = d.uses.includes("transition") ? "set_video_effect_transition" : d.uses.some((u) => VIDEO_EFFECT_PLACES.generator.includes(u)) ? "add_video_effect_clip" : d.uses.some((u) => u === "filter") ? "apply_effect" : null;
1511
- throw new (0, _chunkGHCSC2WPcjs.EffectUnsupportedError)(
1511
+ throw new (0, _chunkISIO63Q5cjs.EffectUnsupportedError)(
1512
1512
  `"${d.id}" (${d.name}) is a ${d.uses.join(" / ")} effect and cannot be used ${where}, which takes ${allowed.join(" or ")} effects${instead ? `; use ${instead} instead` : ""}. search_effects with use "${allowed[0]}" lists ones that fit.`,
1513
1513
  d.id
1514
1514
  );
@@ -1529,12 +1529,12 @@ function checkVideoEffectValues(d, values, options = {}) {
1529
1529
  else if (type !== "number" && type !== "integer") errors.push({ path: `/${k}`, message: "only number controls can be keyframed." });
1530
1530
  else for (const [i, key] of v.keys.entries()) for (const e of _chunkWOFXZ3XUcjs.validateJsonSchema.call(void 0, key.v, schema)) errors.push({ path: `/${k}/keys/${i}/v`, message: e.message });
1531
1531
  }
1532
- for (const e of _chunkGHCSC2WPcjs.effectValueErrors.call(void 0, d, plain)) {
1532
+ for (const e of _chunkISIO63Q5cjs.effectValueErrors.call(void 0, d, plain)) {
1533
1533
  const name = e.path.split("/")[1];
1534
1534
  const about = name && _optionalChain([d, 'access', _46 => _46.controls, 'access', _47 => _47.properties, 'access', _48 => _48[name], 'optionalAccess', _49 => _49.description]);
1535
1535
  errors.push(about ? { path: e.path, message: `${e.message} (${about})` } : e);
1536
1536
  }
1537
- if (errors.length) throw new (0, _chunkGHCSC2WPcjs.EffectControlError)(d.id, errors);
1537
+ if (errors.length) throw new (0, _chunkISIO63Q5cjs.EffectControlError)(d.id, errors);
1538
1538
  return { ..._nullishCoalesce(options.base, () => ( d.defaults)), ..._nullishCoalesce(values, () => ( {})) };
1539
1539
  }
1540
1540
 
@@ -29,7 +29,7 @@
29
29
 
30
30
 
31
31
 
32
- var _chunk7PT4RJL5cjs = require('../chunk-7PT4RJL5.cjs');
32
+ var _chunkEUIDTZNQcjs = require('../chunk-EUIDTZNQ.cjs');
33
33
 
34
34
 
35
35
 
@@ -38,7 +38,7 @@ var _chunk7PT4RJL5cjs = require('../chunk-7PT4RJL5.cjs');
38
38
 
39
39
 
40
40
 
41
- var _chunkPPFJHTW5cjs = require('../chunk-PPFJHTW5.cjs');
41
+ var _chunkTFF2GTGNcjs = require('../chunk-TFF2GTGN.cjs');
42
42
 
43
43
 
44
44
 
@@ -47,7 +47,6 @@ var _chunkPPFJHTW5cjs = require('../chunk-PPFJHTW5.cjs');
47
47
 
48
48
 
49
49
 
50
- var _chunkRD7RX52Gcjs = require('../chunk-RD7RX52G.cjs');
51
50
 
52
51
 
53
52
 
@@ -60,8 +59,7 @@ var _chunkRD7RX52Gcjs = require('../chunk-RD7RX52G.cjs');
60
59
 
61
60
 
62
61
 
63
-
64
- var _chunk7AHBW2CQcjs = require('../chunk-7AHBW2CQ.cjs');
62
+ var _chunk5UEFBM2Mcjs = require('../chunk-5UEFBM2M.cjs');
65
63
  require('../chunk-IPJ3TEYR.cjs');
66
64
 
67
65
 
@@ -120,4 +118,4 @@ require('../chunk-IPJ3TEYR.cjs');
120
118
 
121
119
 
122
120
 
123
- exports.DEFAULT_SCHEME_SURFACES = _chunk7PT4RJL5cjs.DEFAULT_SCHEME_SURFACES; exports.HARMONY_KINDS = _chunk7PT4RJL5cjs.HARMONY_KINDS; exports.NAMED_COLORS = _chunkRD7RX52Gcjs.NAMED_COLORS; exports.PICKER_HUE_BACKGROUND = _chunk7PT4RJL5cjs.PICKER_HUE_BACKGROUND; exports.checkDualColorContrast = _chunk7PT4RJL5cjs.checkDualColorContrast; exports.checkPaletteColors = _chunk7PT4RJL5cjs.checkPaletteColors; exports.colorHarmony = _chunk7PT4RJL5cjs.colorHarmony; exports.contrastLevel = _chunkRD7RX52Gcjs.contrastLevel; exports.contrastRatio = _chunkRD7RX52Gcjs.contrastRatio; exports.createColorToolProvider = _chunk7PT4RJL5cjs.createColorToolProvider; exports.deltaEOK = _chunkPPFJHTW5cjs.deltaEOK; exports.deriveDualColor = _chunk7PT4RJL5cjs.deriveDualColor; exports.displayP3ToLinearSrgb = _chunk7AHBW2CQcjs.displayP3ToLinearSrgb; exports.dualColorsToCss = _chunk7PT4RJL5cjs.dualColorsToCss; exports.dualPickerView = _chunk7PT4RJL5cjs.dualPickerView; exports.formatColor = _chunkPPFJHTW5cjs.formatColor; exports.formatDualColor = _chunk7PT4RJL5cjs.formatDualColor; exports.formatHex = _chunkPPFJHTW5cjs.formatHex; exports.hslToRgb = _chunk7AHBW2CQcjs.hslToRgb; exports.hsvToRgb = _chunk7AHBW2CQcjs.hsvToRgb; exports.hueToWheel = _chunk7PT4RJL5cjs.hueToWheel; exports.inSrgbGamut = _chunkPPFJHTW5cjs.inSrgbGamut; exports.isColor = _chunkRD7RX52Gcjs.isColor; exports.isDualColor = _chunk7PT4RJL5cjs.isDualColor; exports.isSameInBothSchemes = _chunk7PT4RJL5cjs.isSameInBothSchemes; exports.linearSrgbToDisplayP3 = _chunk7AHBW2CQcjs.linearSrgbToDisplayP3; exports.linearToSrgb = _chunk7AHBW2CQcjs.linearToSrgb; exports.mixColors = _chunk7PT4RJL5cjs.mixColors; exports.normalizeColor = _chunkPPFJHTW5cjs.normalizeColor; exports.normalizeDualColor = _chunk7PT4RJL5cjs.normalizeDualColor; exports.oklabToOklch = _chunk7AHBW2CQcjs.oklabToOklch; exports.oklabToRgb = _chunk7AHBW2CQcjs.oklabToRgb; exports.oklchToOklab = _chunk7AHBW2CQcjs.oklchToOklab; exports.parseColor = _chunkRD7RX52Gcjs.parseColor; exports.parseDualColor = _chunk7PT4RJL5cjs.parseDualColor; exports.pickerAlphaBackground = _chunk7PT4RJL5cjs.pickerAlphaBackground; exports.pickerAreaBackground = _chunk7PT4RJL5cjs.pickerAreaBackground; exports.pickerKeyStep = _chunk7PT4RJL5cjs.pickerKeyStep; exports.pickerStateFromAlpha = _chunk7PT4RJL5cjs.pickerStateFromAlpha; exports.pickerStateFromArea = _chunk7PT4RJL5cjs.pickerStateFromArea; exports.pickerStateFromColor = _chunk7PT4RJL5cjs.pickerStateFromColor; exports.pickerStateFromHue = _chunk7PT4RJL5cjs.pickerStateFromHue; exports.pickerStateToHex = _chunk7PT4RJL5cjs.pickerStateToHex; exports.pushRecentColor = _chunk7PT4RJL5cjs.pushRecentColor; exports.readableTextColor = _chunkRD7RX52Gcjs.readableTextColor; exports.relativeLuminance = _chunkRD7RX52Gcjs.relativeLuminance; exports.resolveColor = _chunk7PT4RJL5cjs.resolveColor; exports.rgbToHsl = _chunk7AHBW2CQcjs.rgbToHsl; exports.rgbToHsv = _chunk7AHBW2CQcjs.rgbToHsv; exports.rgbToOklab = _chunk7AHBW2CQcjs.rgbToOklab; exports.setDualColorSide = _chunk7PT4RJL5cjs.setDualColorSide; exports.simulateColorVision = _chunk7PT4RJL5cjs.simulateColorVision; exports.srgbToLinear = _chunk7AHBW2CQcjs.srgbToLinear; exports.suggestAccessibleForeground = _chunkPPFJHTW5cjs.suggestAccessibleForeground; exports.toSrgbGamut = _chunkPPFJHTW5cjs.toSrgbGamut; exports.wheelToHue = _chunk7PT4RJL5cjs.wheelToHue;
121
+ exports.DEFAULT_SCHEME_SURFACES = _chunkEUIDTZNQcjs.DEFAULT_SCHEME_SURFACES; exports.HARMONY_KINDS = _chunkEUIDTZNQcjs.HARMONY_KINDS; exports.NAMED_COLORS = _chunk5UEFBM2Mcjs.NAMED_COLORS; exports.PICKER_HUE_BACKGROUND = _chunkEUIDTZNQcjs.PICKER_HUE_BACKGROUND; exports.checkDualColorContrast = _chunkEUIDTZNQcjs.checkDualColorContrast; exports.checkPaletteColors = _chunkEUIDTZNQcjs.checkPaletteColors; exports.colorHarmony = _chunkEUIDTZNQcjs.colorHarmony; exports.contrastLevel = _chunk5UEFBM2Mcjs.contrastLevel; exports.contrastRatio = _chunk5UEFBM2Mcjs.contrastRatio; exports.createColorToolProvider = _chunkEUIDTZNQcjs.createColorToolProvider; exports.deltaEOK = _chunkTFF2GTGNcjs.deltaEOK; exports.deriveDualColor = _chunkEUIDTZNQcjs.deriveDualColor; exports.displayP3ToLinearSrgb = _chunk5UEFBM2Mcjs.displayP3ToLinearSrgb; exports.dualColorsToCss = _chunkEUIDTZNQcjs.dualColorsToCss; exports.dualPickerView = _chunkEUIDTZNQcjs.dualPickerView; exports.formatColor = _chunkTFF2GTGNcjs.formatColor; exports.formatDualColor = _chunkEUIDTZNQcjs.formatDualColor; exports.formatHex = _chunkTFF2GTGNcjs.formatHex; exports.hslToRgb = _chunk5UEFBM2Mcjs.hslToRgb; exports.hsvToRgb = _chunk5UEFBM2Mcjs.hsvToRgb; exports.hueToWheel = _chunkEUIDTZNQcjs.hueToWheel; exports.inSrgbGamut = _chunkTFF2GTGNcjs.inSrgbGamut; exports.isColor = _chunk5UEFBM2Mcjs.isColor; exports.isDualColor = _chunkEUIDTZNQcjs.isDualColor; exports.isSameInBothSchemes = _chunkEUIDTZNQcjs.isSameInBothSchemes; exports.linearSrgbToDisplayP3 = _chunk5UEFBM2Mcjs.linearSrgbToDisplayP3; exports.linearToSrgb = _chunk5UEFBM2Mcjs.linearToSrgb; exports.mixColors = _chunkEUIDTZNQcjs.mixColors; exports.normalizeColor = _chunkTFF2GTGNcjs.normalizeColor; exports.normalizeDualColor = _chunkEUIDTZNQcjs.normalizeDualColor; exports.oklabToOklch = _chunk5UEFBM2Mcjs.oklabToOklch; exports.oklabToRgb = _chunk5UEFBM2Mcjs.oklabToRgb; exports.oklchToOklab = _chunk5UEFBM2Mcjs.oklchToOklab; exports.parseColor = _chunk5UEFBM2Mcjs.parseColor; exports.parseDualColor = _chunkEUIDTZNQcjs.parseDualColor; exports.pickerAlphaBackground = _chunkEUIDTZNQcjs.pickerAlphaBackground; exports.pickerAreaBackground = _chunkEUIDTZNQcjs.pickerAreaBackground; exports.pickerKeyStep = _chunkEUIDTZNQcjs.pickerKeyStep; exports.pickerStateFromAlpha = _chunkEUIDTZNQcjs.pickerStateFromAlpha; exports.pickerStateFromArea = _chunkEUIDTZNQcjs.pickerStateFromArea; exports.pickerStateFromColor = _chunkEUIDTZNQcjs.pickerStateFromColor; exports.pickerStateFromHue = _chunkEUIDTZNQcjs.pickerStateFromHue; exports.pickerStateToHex = _chunkEUIDTZNQcjs.pickerStateToHex; exports.pushRecentColor = _chunkEUIDTZNQcjs.pushRecentColor; exports.readableTextColor = _chunk5UEFBM2Mcjs.readableTextColor; exports.relativeLuminance = _chunk5UEFBM2Mcjs.relativeLuminance; exports.resolveColor = _chunkEUIDTZNQcjs.resolveColor; exports.rgbToHsl = _chunk5UEFBM2Mcjs.rgbToHsl; exports.rgbToHsv = _chunk5UEFBM2Mcjs.rgbToHsv; exports.rgbToOklab = _chunk5UEFBM2Mcjs.rgbToOklab; exports.setDualColorSide = _chunkEUIDTZNQcjs.setDualColorSide; exports.simulateColorVision = _chunkEUIDTZNQcjs.simulateColorVision; exports.srgbToLinear = _chunk5UEFBM2Mcjs.srgbToLinear; exports.suggestAccessibleForeground = _chunkTFF2GTGNcjs.suggestAccessibleForeground; exports.toSrgbGamut = _chunkTFF2GTGNcjs.toSrgbGamut; exports.wheelToHue = _chunkEUIDTZNQcjs.wheelToHue;
@@ -29,7 +29,7 @@ import {
29
29
  setDualColorSide,
30
30
  simulateColorVision,
31
31
  wheelToHue
32
- } from "../chunk-BP6KSGVD.js";
32
+ } from "../chunk-7272D3K2.js";
33
33
  import {
34
34
  deltaEOK,
35
35
  formatColor,
@@ -38,30 +38,28 @@ import {
38
38
  normalizeColor,
39
39
  suggestAccessibleForeground,
40
40
  toSrgbGamut
41
- } from "../chunk-6ADHGQ73.js";
41
+ } from "../chunk-YBAPT7NL.js";
42
42
  import {
43
43
  NAMED_COLORS,
44
44
  contrastLevel,
45
45
  contrastRatio,
46
- isColor,
47
- parseColor,
48
- readableTextColor,
49
- relativeLuminance
50
- } from "../chunk-JEGJP4OW.js";
51
- import {
52
46
  displayP3ToLinearSrgb,
53
47
  hslToRgb,
54
48
  hsvToRgb,
49
+ isColor,
55
50
  linearSrgbToDisplayP3,
56
51
  linearToSrgb,
57
52
  oklabToOklch,
58
53
  oklabToRgb,
59
54
  oklchToOklab,
55
+ parseColor,
56
+ readableTextColor,
57
+ relativeLuminance,
60
58
  rgbToHsl,
61
59
  rgbToHsv,
62
60
  rgbToOklab,
63
61
  srgbToLinear
64
- } from "../chunk-F67XMVDI.js";
62
+ } from "../chunk-MHLU6GRJ.js";
65
63
  import "../chunk-6ONMQ6WF.js";
66
64
  export {
67
65
  DEFAULT_SCHEME_SURFACES,
@@ -56,6 +56,12 @@ export declare function encodeEffectFloat(pixels: EffectPixels): EffectPixels;
56
56
  * provider does not `supportsMask`. All three must have the same size.
57
57
  */
58
58
  export declare function applyEffectMask(result: EffectPixels, mask: EffectPixels, source?: EffectPixels): EffectPixels;
59
+ /**
60
+ * The image input an editor feeds a layer, node or sticker to when it applies `d` to it:
61
+ * `source` (a filter's picture) when the effect has it, else its first required image input,
62
+ * else its first image input; `null` when it takes no picture.
63
+ */
64
+ export declare function layerImageInput(d: Pick<EffectDescription, 'inputs'>): string | null;
59
65
  /**
60
66
  * Holds an editor's effects provider. Controllers expose it as `effectsProvider`,
61
67
  * `setEffectsProvider(provider | null)` and `useEffects(provider)`; listeners hear every change.
@@ -56,6 +56,12 @@ export declare function encodeEffectFloat(pixels: EffectPixels): EffectPixels;
56
56
  * provider does not `supportsMask`. All three must have the same size.
57
57
  */
58
58
  export declare function applyEffectMask(result: EffectPixels, mask: EffectPixels, source?: EffectPixels): EffectPixels;
59
+ /**
60
+ * The image input an editor feeds a layer, node or sticker to when it applies `d` to it:
61
+ * `source` (a filter's picture) when the effect has it, else its first required image input,
62
+ * else its first image input; `null` when it takes no picture.
63
+ */
64
+ export declare function layerImageInput(d: Pick<EffectDescription, 'inputs'>): string | null;
59
65
  /**
60
66
  * Holds an editor's effects provider. Controllers expose it as `effectsProvider`,
61
67
  * `setEffectsProvider(provider | null)` and `useEffects(provider)`; listeners hear every change.