@pixerate/editor 0.134.0 → 0.136.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 (113) hide show
  1. package/dist/animation-editor/index.cjs +58 -55
  2. package/dist/animation-editor/index.cjs.map +1 -1
  3. package/dist/animation-editor/index.d.cts +8 -5
  4. package/dist/animation-editor/index.d.ts +8 -5
  5. package/dist/animation-editor/index.js +5 -2
  6. package/dist/animation-editor/index.js.map +1 -1
  7. package/dist/{bezier-J8i4uqSH.d.cts → bezier-CdccFsF8.d.cts} +1 -1
  8. package/dist/{bezier-lNEOp0Jx.d.ts → bezier-DG9qNZQV.d.ts} +1 -1
  9. package/dist/canvas/index.d.cts +10 -7
  10. package/dist/canvas/index.d.ts +10 -7
  11. package/dist/{chunk-Z2H7KECK.cjs → chunk-2R3UW57U.cjs} +13 -2
  12. package/dist/chunk-2R3UW57U.cjs.map +1 -0
  13. package/dist/{chunk-ESIWZMMK.js → chunk-6QQR4LKE.js} +2 -2
  14. package/dist/chunk-A3BVTI3G.js +150 -0
  15. package/dist/chunk-A3BVTI3G.js.map +1 -0
  16. package/dist/{chunk-T6TV6HY6.cjs → chunk-B2CUCM7Y.cjs} +36 -36
  17. package/dist/{chunk-T6TV6HY6.cjs.map → chunk-B2CUCM7Y.cjs.map} +1 -1
  18. package/dist/chunk-ECCXGELC.cjs +727 -0
  19. package/dist/chunk-ECCXGELC.cjs.map +1 -0
  20. package/dist/{chunk-OXSV64JX.js → chunk-G6IKY6PL.js} +4 -4
  21. package/dist/chunk-I52DRGGJ.js +727 -0
  22. package/dist/chunk-I52DRGGJ.js.map +1 -0
  23. package/dist/{chunk-6CTZAGZ2.js → chunk-ILYFOJUN.js} +56 -1
  24. package/dist/chunk-ILYFOJUN.js.map +1 -0
  25. package/dist/{chunk-YAFS2QFZ.cjs → chunk-JLGNZMUV.cjs} +82 -82
  26. package/dist/{chunk-YAFS2QFZ.cjs.map → chunk-JLGNZMUV.cjs.map} +1 -1
  27. package/dist/{chunk-7RJ6P7MI.js → chunk-KZXLZCQ7.js} +2 -2
  28. package/dist/{chunk-HHTCDFZC.js → chunk-MAHQC3SK.js} +13 -2
  29. package/dist/chunk-MAHQC3SK.js.map +1 -0
  30. package/dist/{chunk-FWEO3HSL.js → chunk-PQQF5KOW.js} +8 -8
  31. package/dist/chunk-Q6OUXEK3.cjs +150 -0
  32. package/dist/chunk-Q6OUXEK3.cjs.map +1 -0
  33. package/dist/{chunk-P3RQ5UJE.cjs → chunk-UTQKC66X.cjs} +4 -4
  34. package/dist/{chunk-P3RQ5UJE.cjs.map → chunk-UTQKC66X.cjs.map} +1 -1
  35. package/dist/{chunk-J3B45HTA.cjs → chunk-XB25WOC2.cjs} +6 -6
  36. package/dist/{chunk-J3B45HTA.cjs.map → chunk-XB25WOC2.cjs.map} +1 -1
  37. package/dist/{chunk-NVTHUPJ6.cjs → chunk-YT3JL7YM.cjs} +71 -16
  38. package/dist/chunk-YT3JL7YM.cjs.map +1 -0
  39. package/dist/effects/index.d.cts +7 -4
  40. package/dist/effects/index.d.ts +7 -4
  41. package/dist/{export-BGdT02aL.d.cts → export-BOheWw2R.d.cts} +13 -5
  42. package/dist/{export-Dng22YB8.d.ts → export-ByKKIA2S.d.ts} +13 -5
  43. package/dist/{export-KzubBKo7.d.cts → export-CEYeRQXH.d.cts} +1 -1
  44. package/dist/{export-DMeG6E06.d.ts → export-Ds7zgGD8.d.ts} +1 -1
  45. package/dist/extensions/index.cjs +3 -3
  46. package/dist/extensions/index.cjs.map +1 -1
  47. package/dist/extensions/index.js +2 -2
  48. package/dist/generation/index.cjs +150 -945
  49. package/dist/generation/index.cjs.map +1 -1
  50. package/dist/generation/index.d.cts +3 -423
  51. package/dist/generation/index.d.ts +3 -423
  52. package/dist/generation/index.js +59 -854
  53. package/dist/generation/index.js.map +1 -1
  54. package/dist/grammar/index.cjs +3 -3
  55. package/dist/grammar/index.cjs.map +1 -1
  56. package/dist/grammar/index.js +2 -2
  57. package/dist/{helpers-Coa4e2j_.d.ts → helpers--ns3W2D7.d.ts} +7 -1
  58. package/dist/{helpers-DHl28yLO.d.cts → helpers-BVkU4oUi.d.cts} +7 -1
  59. package/dist/image-editor/index.cjs +742 -647
  60. package/dist/image-editor/index.cjs.map +1 -1
  61. package/dist/image-editor/index.d.cts +29 -11
  62. package/dist/image-editor/index.d.ts +29 -11
  63. package/dist/image-editor/index.js +107 -12
  64. package/dist/image-editor/index.js.map +1 -1
  65. package/dist/index.cjs +28 -28
  66. package/dist/index.cjs.map +1 -1
  67. package/dist/index.js +36 -36
  68. package/dist/{opentype-Dfcx6wFx.d.ts → opentype-DfoVYgmG.d.ts} +1 -1
  69. package/dist/{opentype-BWR7Qv8W.d.cts → opentype-yi-Kz4ND.d.cts} +1 -1
  70. package/dist/paint/index.cjs +10 -2
  71. package/dist/paint/index.cjs.map +1 -1
  72. package/dist/paint/index.d.cts +2 -2
  73. package/dist/paint/index.d.ts +2 -2
  74. package/dist/paint/index.js +9 -1
  75. package/dist/paint-editor/index.cjs +10 -7
  76. package/dist/paint-editor/index.cjs.map +1 -1
  77. package/dist/paint-editor/index.d.cts +10 -7
  78. package/dist/paint-editor/index.d.ts +10 -7
  79. package/dist/paint-editor/index.js +5 -2
  80. package/dist/paint-editor/index.js.map +1 -1
  81. package/dist/{pathfinder-D8KQ6blQ.d.cts → pathfinder-7JkMwYvC.d.cts} +1 -1
  82. package/dist/{pathfinder-Celbi3e6.d.ts → pathfinder-GM3UWdBZ.d.ts} +1 -1
  83. package/dist/{pool-BfuxBKTd.d.cts → pool-04qp8iW4.d.cts} +1 -1
  84. package/dist/{pool-8JZGWHvR.d.ts → pool-CkTxlLMC.d.ts} +1 -1
  85. package/dist/provenance-DmlcgdzT.d.cts +426 -0
  86. package/dist/provenance-uh5r2TQ8.d.ts +426 -0
  87. package/dist/{rand-BaqEOs1Y.d.ts → rand-BszBST4s.d.ts} +31 -1
  88. package/dist/{rand-DdpFzCo6.d.cts → rand-DOH_aMvm.d.cts} +31 -1
  89. package/dist/{svg-pwXWq6s2.d.cts → svg-BDDKvWWY.d.cts} +2 -2
  90. package/dist/{svg-CxxqG3_W.d.ts → svg-rV6_HPmn.d.ts} +2 -2
  91. package/dist/{tools-3EBjR91b.d.cts → tools-BAjSbTdY.d.cts} +1 -1
  92. package/dist/{tools-y1M6O3UT.d.ts → tools-DPYerqeR.d.ts} +1 -1
  93. package/dist/vector/index.cjs +2684 -1860
  94. package/dist/vector/index.cjs.map +1 -1
  95. package/dist/vector/index.d.cts +313 -71
  96. package/dist/vector/index.d.ts +313 -71
  97. package/dist/vector/index.js +4700 -3876
  98. package/dist/vector/index.js.map +1 -1
  99. package/dist/video-editor/index.d.cts +7 -4
  100. package/dist/video-editor/index.d.ts +7 -4
  101. package/dist/{warp-Ceqdz7kj.d.cts → warp-DQh9R7Ie.d.cts} +1 -1
  102. package/dist/{warp-C1gwu2G_.d.ts → warp-XVL6SpSh.d.ts} +1 -1
  103. package/package.json +1 -1
  104. package/skills/pixerate-image-editor/SKILL.md +4 -4
  105. package/skills/pixerate-vector/SKILL.md +20 -1
  106. package/dist/chunk-6CTZAGZ2.js.map +0 -1
  107. package/dist/chunk-HHTCDFZC.js.map +0 -1
  108. package/dist/chunk-NVTHUPJ6.cjs.map +0 -1
  109. package/dist/chunk-Z2H7KECK.cjs.map +0 -1
  110. /package/dist/{chunk-ESIWZMMK.js.map → chunk-6QQR4LKE.js.map} +0 -0
  111. /package/dist/{chunk-OXSV64JX.js.map → chunk-G6IKY6PL.js.map} +0 -0
  112. /package/dist/{chunk-7RJ6P7MI.js.map → chunk-KZXLZCQ7.js.map} +0 -0
  113. /package/dist/{chunk-FWEO3HSL.js.map → chunk-PQQF5KOW.js.map} +0 -0
@@ -0,0 +1,426 @@
1
+ import { S as SourceMapSegment } from './sourcemap-DA1Evhrv.js';
2
+ import { P as PromptValues, T as Template } from './tokens-D7yXvUU6.js';
3
+
4
+ /**
5
+ * Declarative descriptions of generative models (what a model accepts) and of
6
+ * the requests sent to them. Everything here is plain data so capabilities can
7
+ * come from a server, be merged with local presentation overlays, and be
8
+ * turned into JSON Schema for agents.
9
+ */
10
+ type GenerationMediaKind = 'image' | 'video' | 'audio' | 'text';
11
+ /** The reference roles this library knows by name (labels, aliases, schema order). */
12
+ type BuiltinReferenceRole = 'start_frame' | 'end_frame' | 'style_ref' | 'character_ref' | 'background_ref' | 'mask' | 'image_ref' | 'video_ref' | 'audio_ref';
13
+ /**
14
+ * What a reference input (an asset) is used for. The built-in roles are
15
+ * listed in {@link REFERENCE_ROLES}; models may declare any other role name
16
+ * (e.g. `subject`, `pose`) in `references.roles`, which makes it valid for
17
+ * that model. Role names match {@link REFERENCE_ROLE_NAME_REGEX}.
18
+ */
19
+ type ReferenceRole = BuiltinReferenceRole | (string & {});
20
+ /** Valid role names: a letter, then letters, digits, `_` or `-`, not ending in `_` or `-`. */
21
+ declare const REFERENCE_ROLE_NAME_REGEX: RegExp;
22
+ /** True for a string usable as a role name. */
23
+ declare function isReferenceRoleName(value: unknown): value is ReferenceRole;
24
+ /** Every built-in reference role, in a stable display order. */
25
+ declare const REFERENCE_ROLES: readonly BuiltinReferenceRole[];
26
+ /** Human-readable default labels for reference roles. */
27
+ declare const REFERENCE_ROLE_LABELS: Readonly<Record<BuiltinReferenceRole, string>>;
28
+ /**
29
+ * Friendly role names accepted wherever a role is written by hand (asset
30
+ * mentions such as `@fox:style`, agent calls). A model that declares the
31
+ * alias itself (e.g. its own `style` role) keeps it; otherwise the alias maps
32
+ * to the built-in role. Keys are lower case.
33
+ */
34
+ declare const REFERENCE_ROLE_ALIASES: Readonly<Record<string, BuiltinReferenceRole>>;
35
+ /** Display label of a role: the model's label, the built-in label, or the name made readable. */
36
+ declare function referenceRoleLabel(role: ReferenceRole, caps?: ModelCapabilities): string;
37
+ /**
38
+ * Canonical role for a hand-written name: the name itself when the model
39
+ * declares it (or, without a model, when it is built in), else its alias
40
+ * ({@link REFERENCE_ROLE_ALIASES}, case-insensitive), else the trimmed name.
41
+ */
42
+ declare function normalizeReferenceRole(role: string, caps?: ModelCapabilities): ReferenceRole;
43
+ /**
44
+ * Whether `mediaType` (a MIME type such as `image/png`, or a media kind such
45
+ * as `image`) matches one of `accepts` (`image`, `image/*`, `image/png`).
46
+ * An empty or missing `accepts` accepts everything; an unknown media type
47
+ * only matches a missing `accepts`.
48
+ */
49
+ declare function mediaTypeMatches(mediaType: string | undefined, accepts: readonly string[] | undefined): boolean;
50
+ /** A choice from a fixed list. `options` order matters (low → high where it applies). */
51
+ interface EnumCapability<T extends string | number = string> {
52
+ options: readonly T[];
53
+ default?: T;
54
+ /** Display labels by option value. */
55
+ labels?: Readonly<Record<string, string>>;
56
+ }
57
+ interface TextFieldCapability {
58
+ maxLength?: number;
59
+ }
60
+ interface PromptCapability extends TextFieldCapability {
61
+ /**
62
+ * Count the resolved prompt (templates expanded, variables substituted)
63
+ * against `maxLength` rather than the raw template text. Default `true`.
64
+ * Pass the resolved text to the planner as `resolvedPrompt`.
65
+ */
66
+ countResolved?: boolean;
67
+ /** The prompt must be non-empty. */
68
+ required?: boolean;
69
+ }
70
+ interface CountCapability {
71
+ /** Largest number of outputs per request. */
72
+ max: number;
73
+ /** Predefined choices; when given, requests snap to one of them. */
74
+ options?: readonly number[];
75
+ default?: number;
76
+ }
77
+ interface DurationCapability {
78
+ /** Seconds. */
79
+ min?: number;
80
+ max?: number;
81
+ /** Predefined choices; when given, requests snap to one of them. */
82
+ options?: readonly number[];
83
+ default?: number;
84
+ step?: number;
85
+ }
86
+ interface SeedCapability {
87
+ min?: number;
88
+ max?: number;
89
+ }
90
+ interface ReferenceRoleCapability {
91
+ /** Most references of this role. */
92
+ max: number;
93
+ /** Fewest references of this role (e.g. an image-to-video model needs a `start_frame`). */
94
+ min?: number;
95
+ label?: string;
96
+ description?: string;
97
+ /**
98
+ * Media accepted for this role: kinds (`image`), wildcards (`image/*`) or
99
+ * MIME types (`image/png`). Absent: anything. References whose
100
+ * `mediaType` does not match are dropped or rejected by the planner.
101
+ */
102
+ accepts?: readonly string[];
103
+ }
104
+ interface ReferenceCapability {
105
+ /** Supported roles and their per-role limits. Roles not listed are unsupported. */
106
+ roles: Partial<Readonly<Record<ReferenceRole, ReferenceRoleCapability>>>;
107
+ /** Most references across all roles. */
108
+ maxTotal?: number;
109
+ }
110
+ interface NumberParamSpec {
111
+ type: 'number' | 'integer';
112
+ min?: number;
113
+ max?: number;
114
+ step?: number;
115
+ default?: number;
116
+ label?: string;
117
+ description?: string;
118
+ }
119
+ interface EnumParamSpec {
120
+ type: 'enum';
121
+ options: readonly (string | number)[];
122
+ default?: string | number;
123
+ label?: string;
124
+ description?: string;
125
+ }
126
+ interface BooleanParamSpec {
127
+ type: 'boolean';
128
+ default?: boolean;
129
+ label?: string;
130
+ description?: string;
131
+ }
132
+ /** A model-specific parameter (`guidance`, `motion_strength`, `style`, …). */
133
+ type ExtraParamSpec = NumberParamSpec | EnumParamSpec | BooleanParamSpec;
134
+ /** Rough timing used for progress estimates (`expectedDurationFor`). */
135
+ interface TimingCapability {
136
+ /** Fixed cost of one request in ms. */
137
+ baseMs: number;
138
+ /** Extra ms per output beyond the first. */
139
+ perItemMs?: number;
140
+ /** Extra ms per second of requested duration (video/audio). */
141
+ perSecondMs?: number;
142
+ /** Extra ms per megapixel of the requested resolution. */
143
+ perMegapixelMs?: number;
144
+ }
145
+ /** Presentation-only fields; overlays may set these (see `mergeCapabilities`). */
146
+ interface CapabilityPresentation {
147
+ name?: string;
148
+ description?: string;
149
+ badges?: readonly string[];
150
+ icon?: string;
151
+ group?: string;
152
+ }
153
+ /** Everything a generative model accepts. Absent sections mean "unsupported". */
154
+ interface ModelCapabilities extends CapabilityPresentation {
155
+ id: string;
156
+ media: GenerationMediaKind;
157
+ prompt?: PromptCapability;
158
+ /** Negative prompt support (`true` or limits). */
159
+ negativePrompt?: boolean | TextFieldCapability;
160
+ /** System prompt support (`true` or limits). */
161
+ systemPrompt?: boolean | TextFieldCapability;
162
+ /** E.g. `['1:1', '16:9', '9:16']`. */
163
+ aspectRatios?: EnumCapability<string>;
164
+ /** E.g. `['512x512', '1024x1024']`, `['720p', '1080p']` or `['1k', '2k', '4k']`, low → high. */
165
+ resolutions?: EnumCapability<string>;
166
+ /** Ordered low → high, e.g. `['draft', 'standard', 'high']`. */
167
+ quality?: EnumCapability<string>;
168
+ count?: CountCapability;
169
+ duration?: DurationCapability;
170
+ seed?: boolean | SeedCapability;
171
+ references?: ReferenceCapability;
172
+ /** Accepts a source to edit (`mode: 'edit'`). */
173
+ editing?: boolean;
174
+ /** Accepts a source plus a `mask` reference (`mode: 'inpaint'`). */
175
+ inpainting?: boolean;
176
+ params?: Readonly<Record<string, ExtraParamSpec>>;
177
+ timing?: TimingCapability;
178
+ }
179
+ interface GenerationReference {
180
+ /** Asset id (opaque to this library). */
181
+ id: string;
182
+ role: ReferenceRole;
183
+ url?: string;
184
+ /** MIME type or media kind, checked against the role's `accepts`. */
185
+ mediaType?: string;
186
+ /** Content hash of the asset when it was referenced (used by generation records). */
187
+ contentHash?: string;
188
+ }
189
+ type GenerationMode = 'generate' | 'edit' | 'inpaint';
190
+ type GenerationParamValue = string | number | boolean;
191
+ /** A request for one model. Every field is optional; the planner fills and fixes. */
192
+ interface GenerationRequest {
193
+ model?: string;
194
+ prompt?: string;
195
+ negativePrompt?: string;
196
+ systemPrompt?: string;
197
+ aspectRatio?: string;
198
+ resolution?: string;
199
+ quality?: string;
200
+ count?: number;
201
+ /** Seconds. */
202
+ duration?: number;
203
+ seed?: number;
204
+ mode?: GenerationMode;
205
+ references?: GenerationReference[];
206
+ params?: Record<string, GenerationParamValue>;
207
+ }
208
+ /** Fields of {@link GenerationRequest} the planner knows about, in planning order. */
209
+ declare const GENERATION_REQUEST_FIELDS: readonly ["model", "prompt", "negativePrompt", "systemPrompt", "aspectRatio", "resolution", "quality", "count", "duration", "seed", "mode", "references", "params"];
210
+ /** Text field limits normalized from `boolean | TextFieldCapability`. */
211
+ declare function textFieldCapability(value: boolean | TextFieldCapability | undefined): TextFieldCapability | null;
212
+ /** Seed limits normalized from `boolean | SeedCapability`. */
213
+ declare function seedCapability(value: boolean | SeedCapability | undefined): SeedCapability | null;
214
+ /**
215
+ * Supported reference roles of a model: built-in roles in
216
+ * {@link REFERENCE_ROLES} order, then custom roles in declaration order.
217
+ */
218
+ declare function supportedReferenceRoles(caps: ModelCapabilities): ReferenceRole[];
219
+ /** Supported generation modes of a model. */
220
+ declare function supportedModes(caps: ModelCapabilities): GenerationMode[];
221
+ /** A partial model entry used to decorate (or add) models locally. */
222
+ type CapabilityOverlay = Partial<ModelCapabilities> & {
223
+ id: string;
224
+ };
225
+ /**
226
+ * Merges server-reported capabilities with a local overlay. For models the
227
+ * server knows, every capability value comes from `remote`; the overlay only
228
+ * contributes presentation fields (`name`, `description`, `badges`, `icon`,
229
+ * `group`), filling in or replacing the remote ones. Overlay entries for
230
+ * models the server does not report are appended when they are complete
231
+ * (have a `media` kind). Remote order is kept; overlay-only models follow in
232
+ * overlay order.
233
+ */
234
+ declare function mergeCapabilities(remote: readonly ModelCapabilities[], overlay?: readonly CapabilityOverlay[]): ModelCapabilities[];
235
+
236
+ /**
237
+ * How the planner treats values the model does not support:
238
+ *
239
+ * - `error`: nothing is changed; every mismatch is an error.
240
+ * - `nearest`: snap to the closest supported value (ties go to the higher
241
+ * value), clamp ranges, truncate lists, drop unsupported fields and
242
+ * unsupported references.
243
+ * - `downgrade`: like `nearest`, but ties go to the lower value.
244
+ * - `upgrade`: like `nearest`, but never drops references the model cannot
245
+ * use (that would lose intent), so those are errors.
246
+ *
247
+ * "Lower" means a narrower aspect ratio, fewer pixels, an earlier quality
248
+ * option, a smaller number.
249
+ */
250
+ type PlanStrategy = 'error' | 'upgrade' | 'downgrade' | 'nearest';
251
+ type PlanAdjustmentKind = 'snapped' | 'clamped' | 'truncated' | 'dropped' | 'defaulted';
252
+ interface PlanAdjustment {
253
+ /** Request path, e.g. `aspectRatio`, `params.guidance`, `references.style_ref`. */
254
+ field: string;
255
+ from: unknown;
256
+ to: unknown;
257
+ reason: string;
258
+ kind: PlanAdjustmentKind;
259
+ }
260
+ interface PlanError {
261
+ field: string;
262
+ value: unknown;
263
+ message: string;
264
+ }
265
+ interface GenerationPlan {
266
+ /** `true` when there are no errors and `request` can be sent. */
267
+ ok: boolean;
268
+ /** The adjusted request (always a copy; the input is never mutated). */
269
+ request: GenerationRequest;
270
+ adjustments: PlanAdjustment[];
271
+ errors: PlanError[];
272
+ /** Model the plan was made for. */
273
+ model: string;
274
+ strategy: PlanStrategy;
275
+ }
276
+ interface PlanOptions {
277
+ /** Default `nearest`. */
278
+ strategy?: PlanStrategy;
279
+ /**
280
+ * The prompt with templates and variables resolved. Measured against
281
+ * `prompt.maxLength` when the model counts resolved text (the default).
282
+ */
283
+ resolvedPrompt?: string;
284
+ /** Fill missing fields that have a capability `default` (reported as `defaulted`). */
285
+ fillDefaults?: boolean;
286
+ /** Override whether references with unsupported roles may be dropped (default: `nearest` and `downgrade` only). */
287
+ dropUnsupportedReferences?: boolean;
288
+ /**
289
+ * Assets mentioned in the prompt (e.g. from `extractMentions(text, { details: true, roles: true })`
290
+ * joined with your asset library). They are appended to `request.references`
291
+ * and validated per role like any other reference. A mention without a role
292
+ * gets `defaultMentionRole`, or the first role of the model that accepts its
293
+ * media type (reported as `defaulted`).
294
+ */
295
+ mentions?: readonly PlanAssetMention[];
296
+ /** Role for mentions that have none (see `mentions`). */
297
+ defaultMentionRole?: ReferenceRole;
298
+ }
299
+ /** An asset mention handed to the planner (see {@link PlanOptions.mentions}). */
300
+ interface PlanAssetMention {
301
+ /** Asset id. */
302
+ id: string;
303
+ role?: ReferenceRole | null;
304
+ mediaType?: string;
305
+ contentHash?: string;
306
+ url?: string;
307
+ /** The mention text, used in messages (default: the id). */
308
+ label?: string;
309
+ }
310
+ /** Numeric rank of an aspect ratio such as `16:9` (log of width / height). */
311
+ declare function aspectRatioRank(value: string): number | undefined;
312
+ /**
313
+ * Numeric rank of a resolution: `1024x768` (pixels), `720p` (16:9 pixels at
314
+ * that height) or `2k` (square of that many kibi-pixels). Log scale.
315
+ */
316
+ declare function resolutionRank(value: string): number | undefined;
317
+ /** Megapixels of a resolution string, when it can be parsed. */
318
+ declare function resolutionMegapixels(value: string): number | undefined;
319
+ /** Common quality names, low → high. Used to compare values missing from a model's options. */
320
+ declare const QUALITY_LADDER: Readonly<Record<string, number>>;
321
+ declare function qualityRank(value: string): number | undefined;
322
+ /**
323
+ * Picks the option closest to `value` by `rank`. Ties go to the lower or
324
+ * higher rank. Returns `undefined` when `value` or no option can be ranked.
325
+ */
326
+ declare function snapToOption<T>(value: unknown, options: readonly T[], rank: (value: any) => number | undefined, tie: 'lower' | 'higher'): T | undefined;
327
+ /**
328
+ * Plans `request` against a model's capabilities before sending it: snaps
329
+ * enum values (aspect ratio, resolution, quality, count/duration choices) to
330
+ * the nearest supported option, clamps ranges, truncates text and reference
331
+ * lists over their limits, drops unsupported fields, and reports every change
332
+ * in `adjustments` and every unfixable problem in `errors`.
333
+ *
334
+ * Pure and deterministic: the input is not mutated and the same input always
335
+ * gives the same plan.
336
+ */
337
+ declare function planGenerationRequest(request: GenerationRequest, caps: ModelCapabilities, options?: PlanOptions): GenerationPlan;
338
+
339
+ declare const PROVENANCE_FORMAT = "pixerate.generation-provenance";
340
+ declare const PROVENANCE_VERSION = 1;
341
+ /** The exact template body a generation used. */
342
+ interface PinnedTemplate {
343
+ name: string;
344
+ templateId?: string;
345
+ /** Version id or version label the body came from (absent for unversioned templates). */
346
+ versionId?: string;
347
+ version?: string | number;
348
+ body: string;
349
+ }
350
+ /** Everything needed to explain and reproduce one generation. */
351
+ interface GenerationProvenance {
352
+ format: typeof PROVENANCE_FORMAT;
353
+ version: typeof PROVENANCE_VERSION;
354
+ /** Raw prompt as typed, with `{{templates}}` and `{variables}`. */
355
+ rawPrompt: string;
356
+ /** Every template the prompt reached (recursively), pinned to the body used. */
357
+ templates: PinnedTemplate[];
358
+ /** Version bindings in effect (`{ templateName: versionId }`) for every pinned versioned template. */
359
+ bindings: Record<string, string>;
360
+ /** Variable values, or `null` when variables were left unresolved. */
361
+ values: PromptValues | null;
362
+ resolvedPrompt: string;
363
+ sourceMap: SourceMapSegment[];
364
+ modelId: string;
365
+ /** The planned (adjusted) request that was sent. */
366
+ request: GenerationRequest;
367
+ adjustments: PlanAdjustment[];
368
+ references: {
369
+ id: string;
370
+ role: ReferenceRole;
371
+ }[];
372
+ /** ISO timestamps. */
373
+ createdAt: string;
374
+ startedAt?: string;
375
+ completedAt?: string;
376
+ /** Ids of the outputs this generation produced. */
377
+ outputIds?: string[];
378
+ meta?: Record<string, unknown>;
379
+ }
380
+ interface CreateProvenanceOptions {
381
+ rawPrompt: string;
382
+ templates?: Template[];
383
+ /** Template version bindings (`{ templateName: versionIdOrVersion }`). */
384
+ bindings?: Record<string, string>;
385
+ values?: PromptValues;
386
+ model: string | ModelCapabilities;
387
+ /** The plan the request came from (its request and adjustments are recorded) … */
388
+ plan?: GenerationPlan;
389
+ /** … or the request that was sent. */
390
+ request?: GenerationRequest;
391
+ adjustments?: PlanAdjustment[];
392
+ /** Creation time (default `Date.now()`). */
393
+ createdAt?: Date | number | string;
394
+ startedAt?: Date | number | string;
395
+ completedAt?: Date | number | string;
396
+ outputIds?: string[];
397
+ meta?: Record<string, unknown>;
398
+ maxDepth?: number;
399
+ }
400
+ declare class ProvenanceParseError extends Error {
401
+ constructor(message: string);
402
+ }
403
+ /** Templates that reproduce the pinned bodies exactly (one single-version template each). */
404
+ declare function pinnedTemplatesToTemplates(pinned: readonly PinnedTemplate[]): Template[];
405
+ /**
406
+ * Records what produced an output: the raw prompt, the exact template bodies
407
+ * and versions it reached, variable values, the resolved prompt and its
408
+ * source map, the model, the planned settings and adjustments, and the
409
+ * references by role.
410
+ */
411
+ declare function createProvenance(options: CreateProvenanceOptions): GenerationProvenance;
412
+ /** Versioned JSON for storage next to an output. */
413
+ declare function serializeProvenance(provenance: GenerationProvenance): string;
414
+ /** Parses and checks serialized provenance. Throws {@link ProvenanceParseError}. */
415
+ declare function parseProvenance(input: string | unknown): GenerationProvenance;
416
+ /**
417
+ * Re-resolves the raw prompt against the pinned template bodies and values,
418
+ * e.g. to check a record or to open it in an editor with its source map.
419
+ */
420
+ declare function replayProvenancePrompt(provenance: GenerationProvenance): {
421
+ text: string;
422
+ map: SourceMapSegment[];
423
+ matches: boolean;
424
+ };
425
+
426
+ export { replayProvenancePrompt as $, REFERENCE_ROLE_NAME_REGEX as A, type BooleanParamSpec as B, type CreateProvenanceOptions as C, type DurationCapability as D, type EnumCapability as E, type ReferenceCapability as F, type GenerationProvenance as G, type ReferenceRoleCapability as H, type TimingCapability as I, aspectRatioRank as J, createProvenance as K, isReferenceRoleName as L, type ModelCapabilities as M, type NumberParamSpec as N, mediaTypeMatches as O, type PlanStrategy as P, QUALITY_LADDER as Q, type ReferenceRole as R, type SeedCapability as S, type TextFieldCapability as T, mergeCapabilities as U, normalizeReferenceRole as V, parseProvenance as W, pinnedTemplatesToTemplates as X, planGenerationRequest as Y, qualityRank as Z, referenceRoleLabel as _, type GenerationPlan as a, resolutionMegapixels as a0, resolutionRank as a1, seedCapability as a2, serializeProvenance as a3, snapToOption as a4, supportedModes as a5, supportedReferenceRoles as a6, textFieldCapability as a7, type GenerationRequest as b, type PlanAssetMention as c, type GenerationReference as d, type BuiltinReferenceRole as e, type CapabilityOverlay as f, type CapabilityPresentation as g, type CountCapability as h, type EnumParamSpec as i, type ExtraParamSpec as j, GENERATION_REQUEST_FIELDS as k, type GenerationMediaKind as l, type GenerationMode as m, type GenerationParamValue as n, PROVENANCE_FORMAT as o, PROVENANCE_VERSION as p, type PinnedTemplate as q, type PlanAdjustment as r, type PlanAdjustmentKind as s, type PlanError as t, type PlanOptions as u, type PromptCapability as v, ProvenanceParseError as w, REFERENCE_ROLES as x, REFERENCE_ROLE_ALIASES as y, REFERENCE_ROLE_LABELS as z };
@@ -1115,6 +1115,36 @@ interface PixelSource {
1115
1115
  /** Straight RGBA 0..255 of document pixel (x, y) into `out`; false (and `out` zeroed) where there is nothing. */
1116
1116
  sample(x: number, y: number, out: number[]): boolean;
1117
1117
  }
1118
+ /**
1119
+ * Photoshop's Clone Source transform: the cloned pixels appear scaled by `scaleX` / `scaleY`
1120
+ * (negative flips) and rotated by `rotate` degrees (clockwise) about the stroke's start.
1121
+ */
1122
+ interface CloneTransform {
1123
+ scaleX: number;
1124
+ scaleY: number;
1125
+ rotate: number;
1126
+ }
1127
+ declare const IDENTITY_CLONE_TRANSFORM: CloneTransform;
1128
+ declare function isIdentityCloneTransform(t: CloneTransform): boolean;
1129
+ /**
1130
+ * Where a clone samples for target point (`x`, `y`): `source + M⁻¹ · (p − anchor)`, with `M` the
1131
+ * transform (scale then rotate) and `anchor` the target point that maps onto the source point.
1132
+ */
1133
+ declare function cloneSamplePoint(t: CloneTransform, source: {
1134
+ x: number;
1135
+ y: number;
1136
+ }, anchor: {
1137
+ x: number;
1138
+ y: number;
1139
+ }, x: number, y: number): [number, number];
1140
+ /** A source seen through a map from document points to source points (bilinear, premultiplied). */
1141
+ declare class TransformedPixelSource implements PixelSource {
1142
+ private readonly inner;
1143
+ private readonly map;
1144
+ private readonly px;
1145
+ constructor(inner: PixelSource, map: (x: number, y: number) => [number, number]);
1146
+ sample(x: number, y: number, out: number[]): boolean;
1147
+ }
1118
1148
  /**
1119
1149
  * A source over raster tiles (layer pixels, a mask, or composite tiles): `readTile` gives tile
1120
1150
  * (tx, ty) in source space or `null` when it is empty; source pixel = document pixel − `offset`.
@@ -2107,4 +2137,4 @@ declare function hash2(x: number, y: number, salt: number): number;
2107
2137
  /** Uniform in [0, 1) from a seed, an index and a stream (one stream per random quantity). */
2108
2138
  declare function rand01(seed: number, index: number, stream: number): number;
2109
2139
 
2110
- export { type PaintGradientSample as $, PAINT_COLOR_JSON_SCHEMA as A, type BrushSettings as B, CoverageMap as C, type Dab as D, PAINT_GRADIENT_FULL_SPEED as E, PAINT_GRADIENT_JSON_SCHEMA as F, PAINT_GRADIENT_KIT as G, PAINT_GRADIENT_MAPPINGS as H, PAINT_GRADIENT_MAPPING_LABELS as I, PAINT_GRADIENT_PRESETS as J, PAINT_GRADIENT_REPEATS as K, PAINT_GRADIENT_REPEAT_LABELS as L, type MixerSettings as M, PAINT_GRADIENT_SPACES as N, PAINT_GRADIENT_SPACE_LABELS as O, type PaintSource as P, PAINT_SOURCE_JSON_SCHEMA as Q, type RetouchSettings as R, StrokeCoverage as S, TileMedium as T, type PaintColorSource as U, type PaintDabParams as V, WetWorld as W, type PaintGradientKit as X, type PaintGradientMapping as Y, type PaintGradientMappingKind as Z, type PaintGradientRepeat as _, type MixerLoad as a, PLANE as a$, PaintGradientSampler as a0, type PaintGradientSpace as a1, type PaintGradientStop as a2, type PaintRgb as a3, PaintSourceError as a4, WET_FLOW_KINDS as a5, WET_PARAM_KEYS as a6, type WetFlowKind as a7, type WetSupport as a8, addPaintGradientStop as a9, DEFAULT_WET_PAPER as aA, DRY_EPS as aB, DabWalker as aC, EMPTY_MIXER_LOAD as aD, EX as aE, EY as aF, type ExchangeRates as aG, FLAG_ALIVE as aH, FLAG_BOTTOM as aI, FLAG_LEFT as aJ, FLAG_RIGHT as aK, FLAG_TOP as aL, FLAG_WET as aM, FLAT as aN, FREE_INTERVAL as aO, MAX_BATCH as aP, MAX_TILT_ACCEL as aQ, MAX_WET_LANES as aR, MAX_WET_SLOTS as aS, MIXER_DRAIN as aT, MIXER_PICKUP_RATE as aU, MIXING_MODELS as aV, OPP as aW, PAPER_CAPACITY as aX, PARAM as aY, PARAM_FLOATS as aZ, PIGMENT_CHANNELS as a_, hash2 as aa, hexToPaintRgb as ab, isGradientPaint as ac, mix32 as ad, normalizeFlow as ae, normalizeHexColor as af, normalizeWetParams as ag, paintGradientMappingFor as ah, paintSourceColor as ai, paintSourceCss as aj, parsePaintSource as ak, rand01 as al, readPaintSource as am, removePaintGradientStop as an, resolvePaintGradient as ao, reversePaintGradient as ap, scalePaintGradient as aq, solidPaint as ar, updatePaintGradientStop as as, wetSupport as at, type BlenderScratch as au, DEFAULT_BLENDER as av, DEFAULT_BRUSH as aw, DEFAULT_MIXER as ax, DEFAULT_RETOUCH as ay, DEFAULT_SMUDGE as az, type MixerTarget as b, dodgeBurn as b$, PLANE_BYTES as b0, P_D0 as b1, P_EDGE as b2, P_FX as b3, P_FY as b4, P_H as b5, P_P0 as b6, P_RHO as b7, P_SW as b8, P_UX as b9, W9 as bA, WET_TILE as bB, type WetFlowField as bC, WetGpuEngine as bD, type WetGpuJob as bE, type WetGpuSupport as bF, type WetKernelKind as bG, type WetLaneOptions as bH, type WetLaneStats as bI, type WetPaper as bJ, type WetWorkerLayout as bK, WetWorkerPool as bL, WetWorldError as bM, applyRetouchToTile as bN, applyStrokeToDeepTile as bO, applyStrokeToTile as bP, applyToneToDeepTile as bQ, blendRadius as bR, blenderDab as bS, boxBlurPixels as bT, canShareMemory as bU, cleanMixer as bV, coverageTileCoord as bW, createBlenderScratch as bX, createWetGpuEngine as bY, dabCoverage as bZ, dabRect as b_, P_UY as ba, PaintExchange as bb, type PaintMedium as bc, type PaintPixels as bd, type PaintSample as be, type PixelSource as bf, RETOUCH_SAMPLES as bg, RegionPixelSource as bh, type RetouchDabEffect as bi, RetouchDabStroke as bj, type RetouchSample as bk, SET_PLANES as bl, SLOT_BYTES as bm, SLOT_PLANES as bn, SLOT_SIDE as bo, SPOT_HEAL_TYPES as bp, STRIP as bq, type SmudgeDab as br, SmudgeTip as bs, type SpotHealType as bt, TIP_GRADIENT_STEPS as bu, TONE_RANGES as bv, type TileMediumOptions as bw, TilePixelSource as bx, type ToneRange as by, U_MAX as bz, MixerStroke as c, dodgeBurnCurve as c0, dsincos as c1, edgeBits as c2, exchangeRates as c3, findWebGpu as c4, flowField as c5, gradientDabColor as c6, healPixels as c7, latticeViscosity as c8, loadMixer as c9, toneOf as cA, walkDabs as cB, wetGpuSupport as cC, wetSimdSupported as cD, loadWetKernel as ca, luma as cb, mixerRates as cc, normalizeBlender as cd, normalizeBrush as ce, normalizeMixer as cf, normalizeRetouch as cg, normalizeSmudge as ch, normalizeTilt as ci, packWetParams as cj, perDabStrength as ck, put255 as cl, rasterizeDab as cm, readSourceRegion as cn, retouchFilter as co, rgbaViewOfGrey as cp, saturationOf as cq, smoothPoints as cr, smudgeEffect as cs, sponge as ct, spongeEffect as cu, spotHealPixels as cv, spotHealWindow as cw, tipFalloff as cx, tipReach as cy, tipShape as cz, type RetouchApply as d, type StrokePoint as e, type RetouchPaint as f, type PaintTileTarget as g, type StrokeApply as h, type PaintGradientSource as i, type MixingModel as j, type BlenderSettings as k, type SmudgeSettings as l, type WetTilt as m, type WetParams as n, type WetFlowSpec as o, type RgbTriple as p, type WetWorldOptions as q, type WetGpuProvider as r, type WetBackendInfo as s, type WetSnapshot as t, type WetPaperInput as u, DEFAULT_FLOW as v, DEFAULT_PAINT_GRADIENT as w, DEFAULT_PAINT_GRADIENT_MAPPING as x, DEFAULT_WET_PARAMS as y, MAX_BRUSH_SIZE as z };
2140
+ export { type PaintGradientRepeat as $, MAX_BRUSH_SIZE as A, type BrushSettings as B, type CloneTransform as C, type Dab as D, PAINT_COLOR_JSON_SCHEMA as E, PAINT_GRADIENT_FULL_SPEED as F, PAINT_GRADIENT_JSON_SCHEMA as G, PAINT_GRADIENT_KIT as H, PAINT_GRADIENT_MAPPINGS as I, PAINT_GRADIENT_MAPPING_LABELS as J, PAINT_GRADIENT_PRESETS as K, PAINT_GRADIENT_REPEATS as L, type MixerSettings as M, PAINT_GRADIENT_REPEAT_LABELS as N, PAINT_GRADIENT_SPACES as O, type PaintSource as P, PAINT_GRADIENT_SPACE_LABELS as Q, type RetouchSettings as R, StrokeCoverage as S, TileMedium as T, PAINT_SOURCE_JSON_SCHEMA as U, type PaintColorSource as V, WetWorld as W, type PaintDabParams as X, type PaintGradientKit as Y, type PaintGradientMapping as Z, type PaintGradientMappingKind as _, type MixerLoad as a, PARAM_FLOATS as a$, type PaintGradientSample as a0, PaintGradientSampler as a1, type PaintGradientSpace as a2, type PaintGradientStop as a3, type PaintRgb as a4, PaintSourceError as a5, WET_FLOW_KINDS as a6, WET_PARAM_KEYS as a7, type WetFlowKind as a8, type WetSupport as a9, DEFAULT_SMUDGE as aA, DEFAULT_WET_PAPER as aB, DRY_EPS as aC, DabWalker as aD, EMPTY_MIXER_LOAD as aE, EX as aF, EY as aG, type ExchangeRates as aH, FLAG_ALIVE as aI, FLAG_BOTTOM as aJ, FLAG_LEFT as aK, FLAG_RIGHT as aL, FLAG_TOP as aM, FLAG_WET as aN, FLAT as aO, FREE_INTERVAL as aP, IDENTITY_CLONE_TRANSFORM as aQ, MAX_BATCH as aR, MAX_TILT_ACCEL as aS, MAX_WET_LANES as aT, MAX_WET_SLOTS as aU, MIXER_DRAIN as aV, MIXER_PICKUP_RATE as aW, MIXING_MODELS as aX, OPP as aY, PAPER_CAPACITY as aZ, PARAM as a_, addPaintGradientStop as aa, hash2 as ab, hexToPaintRgb as ac, isGradientPaint as ad, mix32 as ae, normalizeFlow as af, normalizeHexColor as ag, normalizeWetParams as ah, paintGradientMappingFor as ai, paintSourceColor as aj, paintSourceCss as ak, parsePaintSource as al, rand01 as am, readPaintSource as an, removePaintGradientStop as ao, resolvePaintGradient as ap, reversePaintGradient as aq, scalePaintGradient as ar, solidPaint as as, updatePaintGradientStop as at, wetSupport as au, type BlenderScratch as av, DEFAULT_BLENDER as aw, DEFAULT_BRUSH as ax, DEFAULT_MIXER as ay, DEFAULT_RETOUCH as az, type MixerTarget as b, createBlenderScratch as b$, PIGMENT_CHANNELS as b0, PLANE as b1, PLANE_BYTES as b2, P_D0 as b3, P_EDGE as b4, P_FX as b5, P_FY as b6, P_H as b7, P_P0 as b8, P_RHO as b9, type ToneRange as bA, TransformedPixelSource as bB, U_MAX as bC, W9 as bD, WET_TILE as bE, type WetFlowField as bF, WetGpuEngine as bG, type WetGpuJob as bH, type WetGpuSupport as bI, type WetKernelKind as bJ, type WetLaneOptions as bK, type WetLaneStats as bL, type WetPaper as bM, type WetWorkerLayout as bN, WetWorkerPool as bO, WetWorldError as bP, applyRetouchToTile as bQ, applyStrokeToDeepTile as bR, applyStrokeToTile as bS, applyToneToDeepTile as bT, blendRadius as bU, blenderDab as bV, boxBlurPixels as bW, canShareMemory as bX, cleanMixer as bY, cloneSamplePoint as bZ, coverageTileCoord as b_, P_SW as ba, P_UX as bb, P_UY as bc, PaintExchange as bd, type PaintMedium as be, type PaintPixels as bf, type PaintSample as bg, type PixelSource as bh, RETOUCH_SAMPLES as bi, RegionPixelSource as bj, type RetouchDabEffect as bk, RetouchDabStroke as bl, type RetouchSample as bm, SET_PLANES as bn, SLOT_BYTES as bo, SLOT_PLANES as bp, SLOT_SIDE as bq, SPOT_HEAL_TYPES as br, STRIP as bs, type SmudgeDab as bt, SmudgeTip as bu, type SpotHealType as bv, TIP_GRADIENT_STEPS as bw, TONE_RANGES as bx, type TileMediumOptions as by, TilePixelSource as bz, MixerStroke as c, createWetGpuEngine as c0, dabCoverage as c1, dabRect as c2, dodgeBurn as c3, dodgeBurnCurve as c4, dsincos as c5, edgeBits as c6, exchangeRates as c7, findWebGpu as c8, flowField as c9, spotHealPixels as cA, spotHealWindow as cB, tipFalloff as cC, tipReach as cD, tipShape as cE, toneOf as cF, walkDabs as cG, wetGpuSupport as cH, wetSimdSupported as cI, gradientDabColor as ca, healPixels as cb, isIdentityCloneTransform as cc, latticeViscosity as cd, loadMixer as ce, loadWetKernel as cf, luma as cg, mixerRates as ch, normalizeBlender as ci, normalizeBrush as cj, normalizeMixer as ck, normalizeRetouch as cl, normalizeSmudge as cm, normalizeTilt as cn, packWetParams as co, perDabStrength as cp, put255 as cq, rasterizeDab as cr, readSourceRegion as cs, retouchFilter as ct, rgbaViewOfGrey as cu, saturationOf as cv, smoothPoints as cw, smudgeEffect as cx, sponge as cy, spongeEffect as cz, type RetouchApply as d, type StrokePoint as e, type RetouchPaint as f, CoverageMap as g, type PaintTileTarget as h, type StrokeApply as i, type PaintGradientSource as j, type MixingModel as k, type BlenderSettings as l, type SmudgeSettings as m, type WetTilt as n, type WetParams as o, type WetFlowSpec as p, type RgbTriple as q, type WetWorldOptions as r, type WetGpuProvider as s, type WetBackendInfo as t, type WetSnapshot as u, type WetPaperInput as v, DEFAULT_FLOW as w, DEFAULT_PAINT_GRADIENT as x, DEFAULT_PAINT_GRADIENT_MAPPING as y, DEFAULT_WET_PARAMS as z };
@@ -1115,6 +1115,36 @@ interface PixelSource {
1115
1115
  /** Straight RGBA 0..255 of document pixel (x, y) into `out`; false (and `out` zeroed) where there is nothing. */
1116
1116
  sample(x: number, y: number, out: number[]): boolean;
1117
1117
  }
1118
+ /**
1119
+ * Photoshop's Clone Source transform: the cloned pixels appear scaled by `scaleX` / `scaleY`
1120
+ * (negative flips) and rotated by `rotate` degrees (clockwise) about the stroke's start.
1121
+ */
1122
+ interface CloneTransform {
1123
+ scaleX: number;
1124
+ scaleY: number;
1125
+ rotate: number;
1126
+ }
1127
+ declare const IDENTITY_CLONE_TRANSFORM: CloneTransform;
1128
+ declare function isIdentityCloneTransform(t: CloneTransform): boolean;
1129
+ /**
1130
+ * Where a clone samples for target point (`x`, `y`): `source + M⁻¹ · (p − anchor)`, with `M` the
1131
+ * transform (scale then rotate) and `anchor` the target point that maps onto the source point.
1132
+ */
1133
+ declare function cloneSamplePoint(t: CloneTransform, source: {
1134
+ x: number;
1135
+ y: number;
1136
+ }, anchor: {
1137
+ x: number;
1138
+ y: number;
1139
+ }, x: number, y: number): [number, number];
1140
+ /** A source seen through a map from document points to source points (bilinear, premultiplied). */
1141
+ declare class TransformedPixelSource implements PixelSource {
1142
+ private readonly inner;
1143
+ private readonly map;
1144
+ private readonly px;
1145
+ constructor(inner: PixelSource, map: (x: number, y: number) => [number, number]);
1146
+ sample(x: number, y: number, out: number[]): boolean;
1147
+ }
1118
1148
  /**
1119
1149
  * A source over raster tiles (layer pixels, a mask, or composite tiles): `readTile` gives tile
1120
1150
  * (tx, ty) in source space or `null` when it is empty; source pixel = document pixel − `offset`.
@@ -2107,4 +2137,4 @@ declare function hash2(x: number, y: number, salt: number): number;
2107
2137
  /** Uniform in [0, 1) from a seed, an index and a stream (one stream per random quantity). */
2108
2138
  declare function rand01(seed: number, index: number, stream: number): number;
2109
2139
 
2110
- export { type PaintGradientSample as $, PAINT_COLOR_JSON_SCHEMA as A, type BrushSettings as B, CoverageMap as C, type Dab as D, PAINT_GRADIENT_FULL_SPEED as E, PAINT_GRADIENT_JSON_SCHEMA as F, PAINT_GRADIENT_KIT as G, PAINT_GRADIENT_MAPPINGS as H, PAINT_GRADIENT_MAPPING_LABELS as I, PAINT_GRADIENT_PRESETS as J, PAINT_GRADIENT_REPEATS as K, PAINT_GRADIENT_REPEAT_LABELS as L, type MixerSettings as M, PAINT_GRADIENT_SPACES as N, PAINT_GRADIENT_SPACE_LABELS as O, type PaintSource as P, PAINT_SOURCE_JSON_SCHEMA as Q, type RetouchSettings as R, StrokeCoverage as S, TileMedium as T, type PaintColorSource as U, type PaintDabParams as V, WetWorld as W, type PaintGradientKit as X, type PaintGradientMapping as Y, type PaintGradientMappingKind as Z, type PaintGradientRepeat as _, type MixerLoad as a, PLANE as a$, PaintGradientSampler as a0, type PaintGradientSpace as a1, type PaintGradientStop as a2, type PaintRgb as a3, PaintSourceError as a4, WET_FLOW_KINDS as a5, WET_PARAM_KEYS as a6, type WetFlowKind as a7, type WetSupport as a8, addPaintGradientStop as a9, DEFAULT_WET_PAPER as aA, DRY_EPS as aB, DabWalker as aC, EMPTY_MIXER_LOAD as aD, EX as aE, EY as aF, type ExchangeRates as aG, FLAG_ALIVE as aH, FLAG_BOTTOM as aI, FLAG_LEFT as aJ, FLAG_RIGHT as aK, FLAG_TOP as aL, FLAG_WET as aM, FLAT as aN, FREE_INTERVAL as aO, MAX_BATCH as aP, MAX_TILT_ACCEL as aQ, MAX_WET_LANES as aR, MAX_WET_SLOTS as aS, MIXER_DRAIN as aT, MIXER_PICKUP_RATE as aU, MIXING_MODELS as aV, OPP as aW, PAPER_CAPACITY as aX, PARAM as aY, PARAM_FLOATS as aZ, PIGMENT_CHANNELS as a_, hash2 as aa, hexToPaintRgb as ab, isGradientPaint as ac, mix32 as ad, normalizeFlow as ae, normalizeHexColor as af, normalizeWetParams as ag, paintGradientMappingFor as ah, paintSourceColor as ai, paintSourceCss as aj, parsePaintSource as ak, rand01 as al, readPaintSource as am, removePaintGradientStop as an, resolvePaintGradient as ao, reversePaintGradient as ap, scalePaintGradient as aq, solidPaint as ar, updatePaintGradientStop as as, wetSupport as at, type BlenderScratch as au, DEFAULT_BLENDER as av, DEFAULT_BRUSH as aw, DEFAULT_MIXER as ax, DEFAULT_RETOUCH as ay, DEFAULT_SMUDGE as az, type MixerTarget as b, dodgeBurn as b$, PLANE_BYTES as b0, P_D0 as b1, P_EDGE as b2, P_FX as b3, P_FY as b4, P_H as b5, P_P0 as b6, P_RHO as b7, P_SW as b8, P_UX as b9, W9 as bA, WET_TILE as bB, type WetFlowField as bC, WetGpuEngine as bD, type WetGpuJob as bE, type WetGpuSupport as bF, type WetKernelKind as bG, type WetLaneOptions as bH, type WetLaneStats as bI, type WetPaper as bJ, type WetWorkerLayout as bK, WetWorkerPool as bL, WetWorldError as bM, applyRetouchToTile as bN, applyStrokeToDeepTile as bO, applyStrokeToTile as bP, applyToneToDeepTile as bQ, blendRadius as bR, blenderDab as bS, boxBlurPixels as bT, canShareMemory as bU, cleanMixer as bV, coverageTileCoord as bW, createBlenderScratch as bX, createWetGpuEngine as bY, dabCoverage as bZ, dabRect as b_, P_UY as ba, PaintExchange as bb, type PaintMedium as bc, type PaintPixels as bd, type PaintSample as be, type PixelSource as bf, RETOUCH_SAMPLES as bg, RegionPixelSource as bh, type RetouchDabEffect as bi, RetouchDabStroke as bj, type RetouchSample as bk, SET_PLANES as bl, SLOT_BYTES as bm, SLOT_PLANES as bn, SLOT_SIDE as bo, SPOT_HEAL_TYPES as bp, STRIP as bq, type SmudgeDab as br, SmudgeTip as bs, type SpotHealType as bt, TIP_GRADIENT_STEPS as bu, TONE_RANGES as bv, type TileMediumOptions as bw, TilePixelSource as bx, type ToneRange as by, U_MAX as bz, MixerStroke as c, dodgeBurnCurve as c0, dsincos as c1, edgeBits as c2, exchangeRates as c3, findWebGpu as c4, flowField as c5, gradientDabColor as c6, healPixels as c7, latticeViscosity as c8, loadMixer as c9, toneOf as cA, walkDabs as cB, wetGpuSupport as cC, wetSimdSupported as cD, loadWetKernel as ca, luma as cb, mixerRates as cc, normalizeBlender as cd, normalizeBrush as ce, normalizeMixer as cf, normalizeRetouch as cg, normalizeSmudge as ch, normalizeTilt as ci, packWetParams as cj, perDabStrength as ck, put255 as cl, rasterizeDab as cm, readSourceRegion as cn, retouchFilter as co, rgbaViewOfGrey as cp, saturationOf as cq, smoothPoints as cr, smudgeEffect as cs, sponge as ct, spongeEffect as cu, spotHealPixels as cv, spotHealWindow as cw, tipFalloff as cx, tipReach as cy, tipShape as cz, type RetouchApply as d, type StrokePoint as e, type RetouchPaint as f, type PaintTileTarget as g, type StrokeApply as h, type PaintGradientSource as i, type MixingModel as j, type BlenderSettings as k, type SmudgeSettings as l, type WetTilt as m, type WetParams as n, type WetFlowSpec as o, type RgbTriple as p, type WetWorldOptions as q, type WetGpuProvider as r, type WetBackendInfo as s, type WetSnapshot as t, type WetPaperInput as u, DEFAULT_FLOW as v, DEFAULT_PAINT_GRADIENT as w, DEFAULT_PAINT_GRADIENT_MAPPING as x, DEFAULT_WET_PARAMS as y, MAX_BRUSH_SIZE as z };
2140
+ export { type PaintGradientRepeat as $, MAX_BRUSH_SIZE as A, type BrushSettings as B, type CloneTransform as C, type Dab as D, PAINT_COLOR_JSON_SCHEMA as E, PAINT_GRADIENT_FULL_SPEED as F, PAINT_GRADIENT_JSON_SCHEMA as G, PAINT_GRADIENT_KIT as H, PAINT_GRADIENT_MAPPINGS as I, PAINT_GRADIENT_MAPPING_LABELS as J, PAINT_GRADIENT_PRESETS as K, PAINT_GRADIENT_REPEATS as L, type MixerSettings as M, PAINT_GRADIENT_REPEAT_LABELS as N, PAINT_GRADIENT_SPACES as O, type PaintSource as P, PAINT_GRADIENT_SPACE_LABELS as Q, type RetouchSettings as R, StrokeCoverage as S, TileMedium as T, PAINT_SOURCE_JSON_SCHEMA as U, type PaintColorSource as V, WetWorld as W, type PaintDabParams as X, type PaintGradientKit as Y, type PaintGradientMapping as Z, type PaintGradientMappingKind as _, type MixerLoad as a, PARAM_FLOATS as a$, type PaintGradientSample as a0, PaintGradientSampler as a1, type PaintGradientSpace as a2, type PaintGradientStop as a3, type PaintRgb as a4, PaintSourceError as a5, WET_FLOW_KINDS as a6, WET_PARAM_KEYS as a7, type WetFlowKind as a8, type WetSupport as a9, DEFAULT_SMUDGE as aA, DEFAULT_WET_PAPER as aB, DRY_EPS as aC, DabWalker as aD, EMPTY_MIXER_LOAD as aE, EX as aF, EY as aG, type ExchangeRates as aH, FLAG_ALIVE as aI, FLAG_BOTTOM as aJ, FLAG_LEFT as aK, FLAG_RIGHT as aL, FLAG_TOP as aM, FLAG_WET as aN, FLAT as aO, FREE_INTERVAL as aP, IDENTITY_CLONE_TRANSFORM as aQ, MAX_BATCH as aR, MAX_TILT_ACCEL as aS, MAX_WET_LANES as aT, MAX_WET_SLOTS as aU, MIXER_DRAIN as aV, MIXER_PICKUP_RATE as aW, MIXING_MODELS as aX, OPP as aY, PAPER_CAPACITY as aZ, PARAM as a_, addPaintGradientStop as aa, hash2 as ab, hexToPaintRgb as ac, isGradientPaint as ad, mix32 as ae, normalizeFlow as af, normalizeHexColor as ag, normalizeWetParams as ah, paintGradientMappingFor as ai, paintSourceColor as aj, paintSourceCss as ak, parsePaintSource as al, rand01 as am, readPaintSource as an, removePaintGradientStop as ao, resolvePaintGradient as ap, reversePaintGradient as aq, scalePaintGradient as ar, solidPaint as as, updatePaintGradientStop as at, wetSupport as au, type BlenderScratch as av, DEFAULT_BLENDER as aw, DEFAULT_BRUSH as ax, DEFAULT_MIXER as ay, DEFAULT_RETOUCH as az, type MixerTarget as b, createBlenderScratch as b$, PIGMENT_CHANNELS as b0, PLANE as b1, PLANE_BYTES as b2, P_D0 as b3, P_EDGE as b4, P_FX as b5, P_FY as b6, P_H as b7, P_P0 as b8, P_RHO as b9, type ToneRange as bA, TransformedPixelSource as bB, U_MAX as bC, W9 as bD, WET_TILE as bE, type WetFlowField as bF, WetGpuEngine as bG, type WetGpuJob as bH, type WetGpuSupport as bI, type WetKernelKind as bJ, type WetLaneOptions as bK, type WetLaneStats as bL, type WetPaper as bM, type WetWorkerLayout as bN, WetWorkerPool as bO, WetWorldError as bP, applyRetouchToTile as bQ, applyStrokeToDeepTile as bR, applyStrokeToTile as bS, applyToneToDeepTile as bT, blendRadius as bU, blenderDab as bV, boxBlurPixels as bW, canShareMemory as bX, cleanMixer as bY, cloneSamplePoint as bZ, coverageTileCoord as b_, P_SW as ba, P_UX as bb, P_UY as bc, PaintExchange as bd, type PaintMedium as be, type PaintPixels as bf, type PaintSample as bg, type PixelSource as bh, RETOUCH_SAMPLES as bi, RegionPixelSource as bj, type RetouchDabEffect as bk, RetouchDabStroke as bl, type RetouchSample as bm, SET_PLANES as bn, SLOT_BYTES as bo, SLOT_PLANES as bp, SLOT_SIDE as bq, SPOT_HEAL_TYPES as br, STRIP as bs, type SmudgeDab as bt, SmudgeTip as bu, type SpotHealType as bv, TIP_GRADIENT_STEPS as bw, TONE_RANGES as bx, type TileMediumOptions as by, TilePixelSource as bz, MixerStroke as c, createWetGpuEngine as c0, dabCoverage as c1, dabRect as c2, dodgeBurn as c3, dodgeBurnCurve as c4, dsincos as c5, edgeBits as c6, exchangeRates as c7, findWebGpu as c8, flowField as c9, spotHealPixels as cA, spotHealWindow as cB, tipFalloff as cC, tipReach as cD, tipShape as cE, toneOf as cF, walkDabs as cG, wetGpuSupport as cH, wetSimdSupported as cI, gradientDabColor as ca, healPixels as cb, isIdentityCloneTransform as cc, latticeViscosity as cd, loadMixer as ce, loadWetKernel as cf, luma as cg, mixerRates as ch, normalizeBlender as ci, normalizeBrush as cj, normalizeMixer as ck, normalizeRetouch as cl, normalizeSmudge as cm, normalizeTilt as cn, packWetParams as co, perDabStrength as cp, put255 as cq, rasterizeDab as cr, readSourceRegion as cs, retouchFilter as ct, rgbaViewOfGrey as cu, saturationOf as cv, smoothPoints as cw, smudgeEffect as cx, sponge as cy, spongeEffect as cz, type RetouchApply as d, type StrokePoint as e, type RetouchPaint as f, CoverageMap as g, type PaintTileTarget as h, type StrokeApply as i, type PaintGradientSource as j, type MixingModel as k, type BlenderSettings as l, type SmudgeSettings as m, type WetTilt as n, type WetParams as o, type WetFlowSpec as p, type RgbTriple as q, type WetWorldOptions as r, type WetGpuProvider as s, type WetBackendInfo as t, type WetSnapshot as u, type WetPaperInput as v, DEFAULT_FLOW as w, DEFAULT_PAINT_GRADIENT as x, DEFAULT_PAINT_GRADIENT_MAPPING as y, DEFAULT_WET_PARAMS as z };
@@ -1,5 +1,5 @@
1
- import { B as BezierPath, A as AffineMatrix } from './bezier-J8i4uqSH.cjs';
2
- import { V as VectorEffectType, H as VectorEffectParamsMap, I as VectorPathNode, J as VectorFillRule, K as VectorBooleanOperation, L as VectorNode, M as VectorEffect, N as VectorGroupNode, O as VectorBounds, P as VectorWarpMesh, Q as VectorInstanceNode, R as VectorFilterType, T as VectorFilterParamsMap, U as VectorFilter, W as VectorGradient, X as Vec2, Y as VectorGradientUnits, S as SvgGradientDef, Z as VectorGradientSpread, _ as VectorGradientType, $ as VectorPaint, a0 as VectorMatrix, a1 as VectorGradientStop, a2 as VectorStrokeAlign, a3 as VectorSubpath, a4 as VectorDocument, a5 as VectorWidthPoint } from './helpers-DHl28yLO.cjs';
1
+ import { B as BezierPath, A as AffineMatrix } from './bezier-CdccFsF8.cjs';
2
+ import { V as VectorEffectType, H as VectorEffectParamsMap, I as VectorPathNode, J as VectorFillRule, K as VectorBooleanOperation, L as VectorNode, M as VectorEffect, N as VectorGroupNode, O as VectorBounds, P as VectorWarpMesh, Q as VectorInstanceNode, R as VectorFilterType, T as VectorFilterParamsMap, U as VectorFilter, W as VectorGradient, X as Vec2, Y as VectorGradientUnits, S as SvgGradientDef, Z as VectorGradientSpread, _ as VectorGradientType, $ as VectorPaint, a0 as VectorMatrix, a1 as VectorGradientStop, a2 as VectorStrokeAlign, a3 as VectorSubpath, a4 as VectorDocument, a5 as VectorWidthPoint } from './helpers-BVkU4oUi.cjs';
3
3
 
4
4
  /**
5
5
  * Live appearance: path effect stacks and live boolean groups, evaluated on demand while the
@@ -1,5 +1,5 @@
1
- import { B as BezierPath, A as AffineMatrix } from './bezier-lNEOp0Jx.js';
2
- import { V as VectorEffectType, H as VectorEffectParamsMap, I as VectorPathNode, J as VectorFillRule, K as VectorBooleanOperation, L as VectorNode, M as VectorEffect, N as VectorGroupNode, O as VectorBounds, P as VectorWarpMesh, Q as VectorInstanceNode, R as VectorFilterType, T as VectorFilterParamsMap, U as VectorFilter, W as VectorGradient, X as Vec2, Y as VectorGradientUnits, S as SvgGradientDef, Z as VectorGradientSpread, _ as VectorGradientType, $ as VectorPaint, a0 as VectorMatrix, a1 as VectorGradientStop, a2 as VectorStrokeAlign, a3 as VectorSubpath, a4 as VectorDocument, a5 as VectorWidthPoint } from './helpers-Coa4e2j_.js';
1
+ import { B as BezierPath, A as AffineMatrix } from './bezier-DG9qNZQV.js';
2
+ import { V as VectorEffectType, H as VectorEffectParamsMap, I as VectorPathNode, J as VectorFillRule, K as VectorBooleanOperation, L as VectorNode, M as VectorEffect, N as VectorGroupNode, O as VectorBounds, P as VectorWarpMesh, Q as VectorInstanceNode, R as VectorFilterType, T as VectorFilterParamsMap, U as VectorFilter, W as VectorGradient, X as Vec2, Y as VectorGradientUnits, S as SvgGradientDef, Z as VectorGradientSpread, _ as VectorGradientType, $ as VectorPaint, a0 as VectorMatrix, a1 as VectorGradientStop, a2 as VectorStrokeAlign, a3 as VectorSubpath, a4 as VectorDocument, a5 as VectorWidthPoint } from './helpers--ns3W2D7.js';
3
3
 
4
4
  /**
5
5
  * Live appearance: path effect stacks and live boolean groups, evaluated on demand while the
@@ -1,6 +1,6 @@
1
1
  import { A as AgentTool, a as AgentToolProvider } from './registry-BqA1AZt0.cjs';
2
2
  import { J as JsonSchema } from './schema-Di0CS6Pe.cjs';
3
- import { E as EffectProvider, c as EffectUse } from './helpers-DHl28yLO.cjs';
3
+ import { E as EffectProvider, c as EffectUse } from './helpers-BVkU4oUi.cjs';
4
4
 
5
5
  /**
6
6
  * The agent tools for provider effects, shared by every editor that takes an `EffectProvider`:
@@ -1,6 +1,6 @@
1
1
  import { A as AgentTool, a as AgentToolProvider } from './registry-D-4fit9C.js';
2
2
  import { J as JsonSchema } from './schema-Di0CS6Pe.js';
3
- import { E as EffectProvider, c as EffectUse } from './helpers-Coa4e2j_.js';
3
+ import { E as EffectProvider, c as EffectUse } from './helpers--ns3W2D7.js';
4
4
 
5
5
  /**
6
6
  * The agent tools for provider effects, shared by every editor that takes an `EffectProvider`: