@pixerate/editor 0.126.0 → 0.128.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/agent/index.cjs +2 -2
- package/dist/agent/index.d.cts +3 -3
- package/dist/agent/index.d.ts +3 -3
- package/dist/agent/index.js +1 -1
- package/dist/animation/index.d.cts +2 -3
- package/dist/animation/index.d.ts +2 -3
- package/dist/animation-editor/index.cjs +63 -63
- package/dist/animation-editor/index.cjs.map +1 -1
- package/dist/animation-editor/index.d.cts +7 -9
- package/dist/animation-editor/index.d.ts +7 -9
- package/dist/animation-editor/index.js +10 -10
- package/dist/{arrange-BlfgJ_wt.d.ts → arrange-BUREmgD9.d.ts} +1 -1
- package/dist/{arrange-CD6Gh-pd.d.cts → arrange-CKXK_hf7.d.cts} +1 -1
- package/dist/{bezier-CWv6LQal.d.ts → bezier-CvgQiYRg.d.cts} +23 -3
- package/dist/{bezier-CBzKKDjl.d.cts → bezier-DP4NnJp3.d.ts} +23 -3
- package/dist/{brushTypes-IG7ZZjIN.d.cts → brushTypes-C7N3EBK7.d.cts} +56 -1
- package/dist/{brushTypes-IG7ZZjIN.d.ts → brushTypes-C7N3EBK7.d.ts} +56 -1
- package/dist/{brushstrokeRender-EELTV7U4.cjs → brushstrokeRender-JNHVEUFG.cjs} +29 -10
- package/dist/brushstrokeRender-JNHVEUFG.cjs.map +1 -0
- package/dist/{brushstrokeRender-LRV7GXGD.js → brushstrokeRender-SII6MG4R.js} +25 -6
- package/dist/brushstrokeRender-SII6MG4R.js.map +1 -0
- package/dist/{builtins-DMIsnNst.d.cts → builtins-Cc-bH-3U.d.cts} +3 -2
- package/dist/{builtins-B5-ipm5u.d.ts → builtins-ZU1GJnUA.d.ts} +3 -2
- package/dist/canvas/index.cjs +435 -38
- package/dist/canvas/index.cjs.map +1 -1
- package/dist/canvas/index.d.cts +206 -16
- package/dist/canvas/index.d.ts +206 -16
- package/dist/canvas/index.js +408 -11
- package/dist/canvas/index.js.map +1 -1
- package/dist/{chunk-MPQAO33O.js → chunk-A6KHMKI4.js} +3 -3
- package/dist/{chunk-V5YGPRCZ.cjs → chunk-BEGEWQHD.cjs} +41 -41
- package/dist/{chunk-V5YGPRCZ.cjs.map → chunk-BEGEWQHD.cjs.map} +1 -1
- package/dist/{chunk-N3FVUOZD.cjs → chunk-BJTCSLF6.cjs} +7 -7
- package/dist/{chunk-N3FVUOZD.cjs.map → chunk-BJTCSLF6.cjs.map} +1 -1
- package/dist/{chunk-7LQO6OHH.cjs → chunk-DDSO4HS7.cjs} +9 -5
- package/dist/chunk-DDSO4HS7.cjs.map +1 -0
- package/dist/{chunk-AKU2KQ47.cjs → chunk-DFSZO2B5.cjs} +70 -3
- package/dist/chunk-DFSZO2B5.cjs.map +1 -0
- package/dist/{chunk-WUDPFWAN.js → chunk-F7Q2NE2Y.js} +3 -3
- package/dist/{chunk-GUZ47CJM.cjs → chunk-IZ4WRXZA.cjs} +1 -1
- package/dist/{chunk-GUZ47CJM.cjs.map → chunk-IZ4WRXZA.cjs.map} +1 -1
- package/dist/{chunk-GLWZXQ4Q.js → chunk-KHNZ6MOU.js} +1 -1
- package/dist/chunk-KHNZ6MOU.js.map +1 -0
- package/dist/{chunk-GCJWMEYW.cjs → chunk-KSJLDRHK.cjs} +46 -46
- package/dist/{chunk-GCJWMEYW.cjs.map → chunk-KSJLDRHK.cjs.map} +1 -1
- package/dist/{chunk-2SDGZAJR.js → chunk-LSXXAJG3.js} +70 -3
- package/dist/chunk-LSXXAJG3.js.map +1 -0
- package/dist/{chunk-QQKTOA4U.cjs → chunk-ORE334I6.cjs} +132 -132
- package/dist/{chunk-QQKTOA4U.cjs.map → chunk-ORE334I6.cjs.map} +1 -1
- package/dist/{chunk-X6KTSFAE.js → chunk-Q4NBEVV5.js} +2 -2
- package/dist/{chunk-FPRIUR4T.js → chunk-ROZFX4QI.js} +3 -3
- package/dist/{chunk-J67OLQUQ.js → chunk-SVYE5HIM.js} +7 -3
- package/dist/chunk-SVYE5HIM.js.map +1 -0
- package/dist/{chunk-O5RVCDEC.cjs → chunk-XLUYXUBD.cjs} +88 -88
- package/dist/{chunk-O5RVCDEC.cjs.map → chunk-XLUYXUBD.cjs.map} +1 -1
- package/dist/{chunk-FG274FYT.js → chunk-YGJIER2R.js} +2 -2
- package/dist/commands/index.cjs +2 -2
- package/dist/commands/index.d.cts +3 -3
- package/dist/commands/index.d.ts +3 -3
- package/dist/commands/index.js +1 -1
- package/dist/effects/index.d.cts +6 -38
- package/dist/effects/index.d.ts +6 -38
- package/dist/evaluate-BbCeF6pt.d.ts +114 -0
- package/dist/evaluate-BsxYieLN.d.cts +114 -0
- package/dist/{export-Bp7ji2r4.d.cts → export-BkYQvV56.d.cts} +4 -4
- package/dist/{export-DVl4fWy5.d.cts → export-Cbr9IqpJ.d.cts} +1 -1
- package/dist/{export-C1s4eolZ.d.ts → export-ClPKUB-v.d.ts} +1 -1
- package/dist/{export-DAyPY94f.d.ts → export-DHrFJ8r_.d.ts} +4 -4
- package/dist/{helpers-i95Ob6Vi.d.cts → helpers-C5aAd44p.d.cts} +67 -4
- package/dist/{helpers-BBLlekuM.d.ts → helpers-CPWcK504.d.ts} +67 -4
- package/dist/image-editor/index.cjs +606 -606
- package/dist/image-editor/index.cjs.map +1 -1
- package/dist/image-editor/index.d.cts +12 -14
- package/dist/image-editor/index.d.ts +12 -14
- package/dist/image-editor/index.js +4 -4
- package/dist/{opentype-D80AVmMu.d.cts → opentype-BOewaGQx.d.cts} +1 -1
- package/dist/{opentype-14PDI5D2.d.ts → opentype-sQrF3Ry1.d.ts} +1 -1
- package/dist/paint/index.d.cts +2 -2
- package/dist/paint/index.d.ts +2 -2
- package/dist/paint-editor/index.cjs +9 -9
- package/dist/paint-editor/index.cjs.map +1 -1
- package/dist/paint-editor/index.d.cts +9 -11
- package/dist/paint-editor/index.d.ts +9 -11
- package/dist/paint-editor/index.js +4 -4
- package/dist/{pathfinder-DjISxkUv.d.ts → pathfinder-BwJx0_zM.d.ts} +2 -2
- package/dist/{pathfinder-C0UoFypx.d.cts → pathfinder-CnkW7zLI.d.cts} +2 -2
- package/dist/{player-cGLrngL_.d.ts → player-BK2kKbfd.d.ts} +1 -1
- package/dist/{player-CBtEoU2x.d.cts → player-CmbY3218.d.cts} +1 -1
- package/dist/pool-C7GtrL34.d.cts +34 -0
- package/dist/pool-CTrtciaN.d.ts +34 -0
- package/dist/{rand-CfinE-1c.d.cts → rand-DTXAssW1.d.cts} +4 -4
- package/dist/{rand-DtazXGOB.d.ts → rand-pQQ2sJTk.d.ts} +4 -4
- package/dist/{svg-DJKriJ4A.d.ts → svg-C4LlFnEw.d.cts} +2 -3
- package/dist/{svg-BkRL-fZJ.d.cts → svg-CUzZa0EO.d.ts} +2 -3
- package/dist/{tools-CM8Oe8F3.d.ts → tools-AugT22z3.d.ts} +1 -1
- package/dist/{tools-DZCv2kX1.d.cts → tools-BpCmUNxb.d.cts} +1 -1
- package/dist/vector/index.cjs +918 -918
- package/dist/vector/index.cjs.map +1 -1
- package/dist/vector/index.d.cts +11 -13
- package/dist/vector/index.d.ts +11 -13
- package/dist/vector/index.js +11 -11
- package/dist/video-editor/index.d.cts +6 -8
- package/dist/video-editor/index.d.ts +6 -8
- package/dist/{warp-k_PdtXOG.d.ts → warp-CIsO617e.d.ts} +1 -1
- package/dist/{warp-CH9MM435.d.cts → warp-D62N_5VK.d.cts} +1 -1
- package/package.json +1 -1
- package/skills/pixerate-canvas/SKILL.md +30 -2
- package/dist/behavior-Ymbld6jL.d.cts +0 -60
- package/dist/behavior-Ymbld6jL.d.ts +0 -60
- package/dist/brushstrokeRender-EELTV7U4.cjs.map +0 -1
- package/dist/brushstrokeRender-LRV7GXGD.js.map +0 -1
- package/dist/chunk-2SDGZAJR.js.map +0 -1
- package/dist/chunk-7LQO6OHH.cjs.map +0 -1
- package/dist/chunk-AKU2KQ47.cjs.map +0 -1
- package/dist/chunk-GLWZXQ4Q.js.map +0 -1
- package/dist/chunk-J67OLQUQ.js.map +0 -1
- package/dist/evaluate-2S3vSPLy.d.cts +0 -55
- package/dist/evaluate-CfmT6xA3.d.ts +0 -55
- package/dist/gradient-KDfCvhuj.d.cts +0 -66
- package/dist/gradient-KDfCvhuj.d.ts +0 -66
- /package/dist/{chunk-MPQAO33O.js.map → chunk-A6KHMKI4.js.map} +0 -0
- /package/dist/{chunk-WUDPFWAN.js.map → chunk-F7Q2NE2Y.js.map} +0 -0
- /package/dist/{chunk-X6KTSFAE.js.map → chunk-Q4NBEVV5.js.map} +0 -0
- /package/dist/{chunk-FPRIUR4T.js.map → chunk-ROZFX4QI.js.map} +0 -0
- /package/dist/{chunk-FG274FYT.js.map → chunk-YGJIER2R.js.map} +0 -0
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
formatNumber,
|
|
4
4
|
parseSvgPath,
|
|
5
5
|
polygonToSvgPath
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-KHNZ6MOU.js";
|
|
7
7
|
|
|
8
8
|
// src/canvas/pathops/bezier.ts
|
|
9
9
|
var sub = (a, b) => [a[0] - b[0], a[1] - b[1]];
|
|
@@ -2706,4 +2706,4 @@ export {
|
|
|
2706
2706
|
outlineStroke,
|
|
2707
2707
|
offsetPath
|
|
2708
2708
|
};
|
|
2709
|
-
//# sourceMappingURL=chunk-
|
|
2709
|
+
//# sourceMappingURL=chunk-YGJIER2R.js.map
|
package/dist/commands/index.cjs
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
|
|
11
|
-
var
|
|
11
|
+
var _chunkDFSZO2B5cjs = require('../chunk-DFSZO2B5.cjs');
|
|
12
12
|
|
|
13
13
|
|
|
14
14
|
|
|
@@ -982,5 +982,5 @@ function createCanvasAnimationCommands(controller, options = {}) {
|
|
|
982
982
|
|
|
983
983
|
|
|
984
984
|
|
|
985
|
-
exports.CommandRegistry = CommandRegistry; exports.CommandRegistryError = CommandRegistryError; exports.DEFAULT_HISTORY_SHORTCUTS =
|
|
985
|
+
exports.CommandRegistry = CommandRegistry; exports.CommandRegistryError = CommandRegistryError; exports.DEFAULT_HISTORY_SHORTCUTS = _chunkDFSZO2B5cjs.DEFAULT_HISTORY_SHORTCUTS; exports.DEFAULT_RECENT_LIMIT = DEFAULT_RECENT_LIMIT; exports.PLATFORMS = _chunk26BVFKHUcjs.PLATFORMS; exports.ShortcutMap = _chunk26BVFKHUcjs.ShortcutMap; exports.chordToString = _chunk26BVFKHUcjs.chordToString; exports.codeFromKey = _chunk26BVFKHUcjs.codeFromKey; exports.codeToKeyText = _chunk26BVFKHUcjs.codeToKeyText; exports.createArrangeCommands = _chunkDFSZO2B5cjs.createArrangeCommands; exports.createCanvasAnimationCommands = createCanvasAnimationCommands; exports.createCommandPaletteController = createCommandPaletteController; exports.createCommandRegistry = createCommandRegistry; exports.createCommandToolProvider = createCommandToolProvider; exports.createComponentCommands = _chunkDFSZO2B5cjs.createComponentCommands; exports.createDrawCommands = _chunkDFSZO2B5cjs.createDrawCommands; exports.createHistoryCommands = _chunkDFSZO2B5cjs.createHistoryCommands; exports.createShapeCommands = _chunkDFSZO2B5cjs.createShapeCommands; exports.createSpreadsheetCommands = _chunkDFSZO2B5cjs.createSpreadsheetCommands; exports.defineCommand = defineCommand; exports.detectPlatform = _chunk26BVFKHUcjs.detectPlatform; exports.effectiveChord = _chunk26BVFKHUcjs.effectiveChord; exports.effectiveChordKey = _chunk26BVFKHUcjs.effectiveChordKey; exports.eventCode = _chunk26BVFKHUcjs.eventCode; exports.exactBonus = exactBonus; exports.formatShortcut = _chunk26BVFKHUcjs.formatShortcut; exports.fuzzyMatch = fuzzyMatch; exports.fuzzyScore = fuzzyScore; exports.hasVariantCommands = _chunkDFSZO2B5cjs.hasVariantCommands; exports.isEditableEventTarget = _chunk26BVFKHUcjs.isEditableEventTarget; exports.keyToCode = _chunk26BVFKHUcjs.keyToCode; exports.matchHistoryShortcut = _chunkDFSZO2B5cjs.matchHistoryShortcut; exports.matchPaletteHotkey = matchPaletteHotkey; exports.normalizeChord = _chunk26BVFKHUcjs.normalizeChord; exports.parseChord = _chunk26BVFKHUcjs.parseChord; exports.pushRecent = pushRecent; exports.rankCommands = rankCommands; exports.shortcutCode = _chunk26BVFKHUcjs.shortcutCode; exports.toShortcutBindings = _chunk26BVFKHUcjs.toShortcutBindings;
|
|
986
986
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { a as CommandRegistry, P as Platform, b as CommandResult, c as CommandEntry, K as KeyboardEventLike, C as CommandSpec } from '../registry-CaR7LC6W.cjs';
|
|
2
2
|
export { d as Chord, e as CommandErrorCode, f as CommandHistoryTarget, g as CommandListOptions, h as CommandParamsSchema, i as CommandRegistryError, j as CommandRegistryOptions, E as EffectiveChord, k as PLATFORMS, S as ShortcutBinding, l as ShortcutConflict, m as ShortcutInput, n as ShortcutMap, o as ShortcutMapOptions, p as ShortcutMatch, q as ShortcutResolveOptions, r as chordToString, s as codeFromKey, t as codeToKeyText, u as createCommandRegistry, v as defineCommand, w as detectPlatform, x as effectiveChord, y as effectiveChordKey, z as eventCode, A as formatShortcut, B as isEditableEventTarget, D as keyToCode, F as normalizeChord, G as parseChord, H as shortcutCode, I as toShortcutBindings } from '../registry-CaR7LC6W.cjs';
|
|
3
3
|
import { a as AgentToolProvider } from '../registry-BqA1AZt0.cjs';
|
|
4
|
-
export { A as ArrangeCommandOptions, a as ArrangeCommandTarget, C as ComponentCommandOptions, b as ComponentCommandTarget, D as DEFAULT_HISTORY_SHORTCUTS, c as DrawCommandOptions, d as DrawCommandTarget, H as HistoryCommandOptions, e as HistoryCommandTarget, S as ShapeCommandOptions, f as ShapeCommandTarget, g as SpreadsheetCommandOptions, h as SpreadsheetCommandTarget, i as createArrangeCommands, j as createComponentCommands, k as createDrawCommands, l as createHistoryCommands, m as createShapeCommands, n as createSpreadsheetCommands, o as hasVariantCommands, p as matchHistoryShortcut } from '../builtins-
|
|
4
|
+
export { A as ArrangeCommandOptions, a as ArrangeCommandTarget, C as ComponentCommandOptions, b as ComponentCommandTarget, D as DEFAULT_HISTORY_SHORTCUTS, c as DrawCommandOptions, d as DrawCommandTarget, H as HistoryCommandOptions, e as HistoryCommandTarget, S as ShapeCommandOptions, f as ShapeCommandTarget, g as SpreadsheetCommandOptions, h as SpreadsheetCommandTarget, i as createArrangeCommands, j as createComponentCommands, k as createDrawCommands, l as createHistoryCommands, m as createShapeCommands, n as createSpreadsheetCommands, o as hasVariantCommands, p as matchHistoryShortcut } from '../builtins-Cc-bH-3U.cjs';
|
|
5
5
|
import '../schema-Di0CS6Pe.cjs';
|
|
6
6
|
import '../types-DsiXGmjo.cjs';
|
|
7
|
-
import '../arrange-
|
|
8
|
-
import '../brushTypes-
|
|
7
|
+
import '../arrange-CKXK_hf7.cjs';
|
|
8
|
+
import '../brushTypes-C7N3EBK7.cjs';
|
|
9
9
|
|
|
10
10
|
/** The fields `rankCommands` searches (a `CommandEntry` satisfies it). */
|
|
11
11
|
interface RankableCommand {
|
package/dist/commands/index.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { a as CommandRegistry, P as Platform, b as CommandResult, c as CommandEntry, K as KeyboardEventLike, C as CommandSpec } from '../registry-rVtFJjRM.js';
|
|
2
2
|
export { d as Chord, e as CommandErrorCode, f as CommandHistoryTarget, g as CommandListOptions, h as CommandParamsSchema, i as CommandRegistryError, j as CommandRegistryOptions, E as EffectiveChord, k as PLATFORMS, S as ShortcutBinding, l as ShortcutConflict, m as ShortcutInput, n as ShortcutMap, o as ShortcutMapOptions, p as ShortcutMatch, q as ShortcutResolveOptions, r as chordToString, s as codeFromKey, t as codeToKeyText, u as createCommandRegistry, v as defineCommand, w as detectPlatform, x as effectiveChord, y as effectiveChordKey, z as eventCode, A as formatShortcut, B as isEditableEventTarget, D as keyToCode, F as normalizeChord, G as parseChord, H as shortcutCode, I as toShortcutBindings } from '../registry-rVtFJjRM.js';
|
|
3
3
|
import { a as AgentToolProvider } from '../registry-D-4fit9C.js';
|
|
4
|
-
export { A as ArrangeCommandOptions, a as ArrangeCommandTarget, C as ComponentCommandOptions, b as ComponentCommandTarget, D as DEFAULT_HISTORY_SHORTCUTS, c as DrawCommandOptions, d as DrawCommandTarget, H as HistoryCommandOptions, e as HistoryCommandTarget, S as ShapeCommandOptions, f as ShapeCommandTarget, g as SpreadsheetCommandOptions, h as SpreadsheetCommandTarget, i as createArrangeCommands, j as createComponentCommands, k as createDrawCommands, l as createHistoryCommands, m as createShapeCommands, n as createSpreadsheetCommands, o as hasVariantCommands, p as matchHistoryShortcut } from '../builtins-
|
|
4
|
+
export { A as ArrangeCommandOptions, a as ArrangeCommandTarget, C as ComponentCommandOptions, b as ComponentCommandTarget, D as DEFAULT_HISTORY_SHORTCUTS, c as DrawCommandOptions, d as DrawCommandTarget, H as HistoryCommandOptions, e as HistoryCommandTarget, S as ShapeCommandOptions, f as ShapeCommandTarget, g as SpreadsheetCommandOptions, h as SpreadsheetCommandTarget, i as createArrangeCommands, j as createComponentCommands, k as createDrawCommands, l as createHistoryCommands, m as createShapeCommands, n as createSpreadsheetCommands, o as hasVariantCommands, p as matchHistoryShortcut } from '../builtins-ZU1GJnUA.js';
|
|
5
5
|
import '../schema-Di0CS6Pe.js';
|
|
6
6
|
import '../types-DsiXGmjo.js';
|
|
7
|
-
import '../arrange-
|
|
8
|
-
import '../brushTypes-
|
|
7
|
+
import '../arrange-BUREmgD9.js';
|
|
8
|
+
import '../brushTypes-C7N3EBK7.js';
|
|
9
9
|
|
|
10
10
|
/** The fields `rankCommands` searches (a `CommandEntry` satisfies it). */
|
|
11
11
|
interface RankableCommand {
|
package/dist/commands/index.js
CHANGED
package/dist/effects/index.d.cts
CHANGED
|
@@ -1,12 +1,11 @@
|
|
|
1
|
-
import { E as EffectProvider,
|
|
2
|
-
export {
|
|
1
|
+
import { E as EffectProvider, d as EffectProviderCapabilities, a as EffectRenderRequest, c as EffectUse, e as EffectValue, f as EffectDescription, b as EffectPixels, g as EffectSummary } from '../helpers-C5aAd44p.cjs';
|
|
2
|
+
export { h as EFFECT_KINDS, i as EFFECT_USES, j as EffectControlSchema, k as EffectImageSource, l as EffectInputSpec, m as EffectKind, n as EffectPreset, o as EffectRenderer, p as EffectRendererOptions, q as EffectSearchOptions, r as EffectSvgAnimation, s as EffectValues, t as EffectVectorMotion, u as EffectVectorTarget, v as EffectsSlot, w as applyEffectMask, x as createEffectPixels, y as effectValueErrors, z as encodeEffectFloat, A as isEffectPixels, B as linearToSrgb, D as resolveEffectValues, F as searchEffectSummaries, G as srgbToLinear } from '../helpers-C5aAd44p.cjs';
|
|
3
3
|
import { S as SchemaValidationError, J as JsonSchema } from '../schema-Di0CS6Pe.cjs';
|
|
4
|
-
export { A as AppliedEffectInfo, E as EffectChangeResult, a as EffectTargetEffects, b as EffectToolContext, c as EffectToolHost, d as createEffectToolProvider } from '../tools-
|
|
4
|
+
export { A as AppliedEffectInfo, E as EffectChangeResult, a as EffectTargetEffects, b as EffectToolContext, c as EffectToolHost, d as createEffectToolProvider } from '../tools-BpCmUNxb.cjs';
|
|
5
5
|
import { P as ParameterField, a as ParameterValue } from '../types-DMcf_z4J.cjs';
|
|
6
|
-
|
|
6
|
+
export { E as EffectRendererPool, a as EffectRendererPoolOptions } from '../pool-C7GtrL34.cjs';
|
|
7
|
+
import '../evaluate-BsxYieLN.cjs';
|
|
7
8
|
import '../easing-lM0Xo9Ni.cjs';
|
|
8
|
-
import '../evaluate-2S3vSPLy.cjs';
|
|
9
|
-
import '../gradient-KDfCvhuj.cjs';
|
|
10
9
|
import '../types-CwMPoRMU.cjs';
|
|
11
10
|
import '../registry-BqA1AZt0.cjs';
|
|
12
11
|
|
|
@@ -128,35 +127,4 @@ declare function groupEffectsByCategory<T extends EffectSummary>(effects: readon
|
|
|
128
127
|
effects: T[];
|
|
129
128
|
}[];
|
|
130
129
|
|
|
131
|
-
|
|
132
|
-
* `EffectRendererPool`: keeps a few live renderers, reused per effect, size and depth.
|
|
133
|
-
*
|
|
134
|
-
* GPU providers hold one graphics context per renderer, and browsers allow only about sixteen
|
|
135
|
-
* WebGL contexts at a time (the oldest is lost after that). So the pool keeps at most
|
|
136
|
-
* `maxRenderers` renderers. It disposes the least recently used one once its renders finish, and it
|
|
137
|
-
* runs one render at a time per renderer, as the contract requires.
|
|
138
|
-
*/
|
|
139
|
-
|
|
140
|
-
interface EffectRendererPoolOptions {
|
|
141
|
-
/** Most live renderers (default 4). */
|
|
142
|
-
maxRenderers?: number;
|
|
143
|
-
}
|
|
144
|
-
declare class EffectRendererPool {
|
|
145
|
-
private readonly entries;
|
|
146
|
-
private readonly maxRenderers;
|
|
147
|
-
constructor(options?: EffectRendererPoolOptions);
|
|
148
|
-
/** Live renderers now. */
|
|
149
|
-
get size(): number;
|
|
150
|
-
/** Renders `request` with the provider's renderer for this effect, size and depth (made on first use). */
|
|
151
|
-
render(provider: EffectProvider, id: string, size: {
|
|
152
|
-
width: number;
|
|
153
|
-
height: number;
|
|
154
|
-
depth?: 8 | 16 | 32;
|
|
155
|
-
}, request: EffectRenderRequest): Promise<EffectPixels>;
|
|
156
|
-
/** Disposes the least recently used renderers over the limit, after their queued renders. */
|
|
157
|
-
private evict;
|
|
158
|
-
/** Disposes every renderer (after its queued renders). */
|
|
159
|
-
clear(): void;
|
|
160
|
-
}
|
|
161
|
-
|
|
162
|
-
export { EFFECT_ERROR_CODES, EFFECT_USE_LABELS, type EffectConformanceIssue, type EffectConformanceOptions, EffectControlError, EffectDescription, EffectDisposedError, EffectError, type EffectErrorCode, EffectPixels, EffectProvider, EffectProviderCapabilities, EffectRenderRequest, EffectRendererPool, type EffectRendererPoolOptions, EffectSummary, EffectUnsupportedError, EffectUse, EffectValue, type FakeEffectProviderOptions, NoEffectsProviderError, UnknownEffectError, checkEffectProvider, createFakeEffectProvider, effectControlField, effectFieldValue, effectParameterFields, effectSamplePicture, groupEffectsByCategory, isEffectError, renderEffectThumbnail };
|
|
130
|
+
export { EFFECT_ERROR_CODES, EFFECT_USE_LABELS, type EffectConformanceIssue, type EffectConformanceOptions, EffectControlError, EffectDescription, EffectDisposedError, EffectError, type EffectErrorCode, EffectPixels, EffectProvider, EffectProviderCapabilities, EffectRenderRequest, EffectSummary, EffectUnsupportedError, EffectUse, EffectValue, type FakeEffectProviderOptions, NoEffectsProviderError, UnknownEffectError, checkEffectProvider, createFakeEffectProvider, effectControlField, effectFieldValue, effectParameterFields, effectSamplePicture, groupEffectsByCategory, isEffectError, renderEffectThumbnail };
|
package/dist/effects/index.d.ts
CHANGED
|
@@ -1,12 +1,11 @@
|
|
|
1
|
-
import { E as EffectProvider,
|
|
2
|
-
export {
|
|
1
|
+
import { E as EffectProvider, d as EffectProviderCapabilities, a as EffectRenderRequest, c as EffectUse, e as EffectValue, f as EffectDescription, b as EffectPixels, g as EffectSummary } from '../helpers-CPWcK504.js';
|
|
2
|
+
export { h as EFFECT_KINDS, i as EFFECT_USES, j as EffectControlSchema, k as EffectImageSource, l as EffectInputSpec, m as EffectKind, n as EffectPreset, o as EffectRenderer, p as EffectRendererOptions, q as EffectSearchOptions, r as EffectSvgAnimation, s as EffectValues, t as EffectVectorMotion, u as EffectVectorTarget, v as EffectsSlot, w as applyEffectMask, x as createEffectPixels, y as effectValueErrors, z as encodeEffectFloat, A as isEffectPixels, B as linearToSrgb, D as resolveEffectValues, F as searchEffectSummaries, G as srgbToLinear } from '../helpers-CPWcK504.js';
|
|
3
3
|
import { S as SchemaValidationError, J as JsonSchema } from '../schema-Di0CS6Pe.js';
|
|
4
|
-
export { A as AppliedEffectInfo, E as EffectChangeResult, a as EffectTargetEffects, b as EffectToolContext, c as EffectToolHost, d as createEffectToolProvider } from '../tools-
|
|
4
|
+
export { A as AppliedEffectInfo, E as EffectChangeResult, a as EffectTargetEffects, b as EffectToolContext, c as EffectToolHost, d as createEffectToolProvider } from '../tools-AugT22z3.js';
|
|
5
5
|
import { P as ParameterField, a as ParameterValue } from '../types-D3-J3TFf.js';
|
|
6
|
-
|
|
6
|
+
export { E as EffectRendererPool, a as EffectRendererPoolOptions } from '../pool-CTrtciaN.js';
|
|
7
|
+
import '../evaluate-BbCeF6pt.js';
|
|
7
8
|
import '../easing-lM0Xo9Ni.js';
|
|
8
|
-
import '../evaluate-CfmT6xA3.js';
|
|
9
|
-
import '../gradient-KDfCvhuj.js';
|
|
10
9
|
import '../types-CwMPoRMU.js';
|
|
11
10
|
import '../registry-D-4fit9C.js';
|
|
12
11
|
|
|
@@ -128,35 +127,4 @@ declare function groupEffectsByCategory<T extends EffectSummary>(effects: readon
|
|
|
128
127
|
effects: T[];
|
|
129
128
|
}[];
|
|
130
129
|
|
|
131
|
-
|
|
132
|
-
* `EffectRendererPool`: keeps a few live renderers, reused per effect, size and depth.
|
|
133
|
-
*
|
|
134
|
-
* GPU providers hold one graphics context per renderer, and browsers allow only about sixteen
|
|
135
|
-
* WebGL contexts at a time (the oldest is lost after that). So the pool keeps at most
|
|
136
|
-
* `maxRenderers` renderers. It disposes the least recently used one once its renders finish, and it
|
|
137
|
-
* runs one render at a time per renderer, as the contract requires.
|
|
138
|
-
*/
|
|
139
|
-
|
|
140
|
-
interface EffectRendererPoolOptions {
|
|
141
|
-
/** Most live renderers (default 4). */
|
|
142
|
-
maxRenderers?: number;
|
|
143
|
-
}
|
|
144
|
-
declare class EffectRendererPool {
|
|
145
|
-
private readonly entries;
|
|
146
|
-
private readonly maxRenderers;
|
|
147
|
-
constructor(options?: EffectRendererPoolOptions);
|
|
148
|
-
/** Live renderers now. */
|
|
149
|
-
get size(): number;
|
|
150
|
-
/** Renders `request` with the provider's renderer for this effect, size and depth (made on first use). */
|
|
151
|
-
render(provider: EffectProvider, id: string, size: {
|
|
152
|
-
width: number;
|
|
153
|
-
height: number;
|
|
154
|
-
depth?: 8 | 16 | 32;
|
|
155
|
-
}, request: EffectRenderRequest): Promise<EffectPixels>;
|
|
156
|
-
/** Disposes the least recently used renderers over the limit, after their queued renders. */
|
|
157
|
-
private evict;
|
|
158
|
-
/** Disposes every renderer (after its queued renders). */
|
|
159
|
-
clear(): void;
|
|
160
|
-
}
|
|
161
|
-
|
|
162
|
-
export { EFFECT_ERROR_CODES, EFFECT_USE_LABELS, type EffectConformanceIssue, type EffectConformanceOptions, EffectControlError, EffectDescription, EffectDisposedError, EffectError, type EffectErrorCode, EffectPixels, EffectProvider, EffectProviderCapabilities, EffectRenderRequest, EffectRendererPool, type EffectRendererPoolOptions, EffectSummary, EffectUnsupportedError, EffectUse, EffectValue, type FakeEffectProviderOptions, NoEffectsProviderError, UnknownEffectError, checkEffectProvider, createFakeEffectProvider, effectControlField, effectFieldValue, effectParameterFields, effectSamplePicture, groupEffectsByCategory, isEffectError, renderEffectThumbnail };
|
|
130
|
+
export { EFFECT_ERROR_CODES, EFFECT_USE_LABELS, type EffectConformanceIssue, type EffectConformanceOptions, EffectControlError, EffectDescription, EffectDisposedError, EffectError, type EffectErrorCode, EffectPixels, EffectProvider, EffectProviderCapabilities, EffectRenderRequest, EffectSummary, EffectUnsupportedError, EffectUse, EffectValue, type FakeEffectProviderOptions, NoEffectsProviderError, UnknownEffectError, checkEffectProvider, createFakeEffectProvider, effectControlField, effectFieldValue, effectParameterFields, effectSamplePicture, groupEffectsByCategory, isEffectError, renderEffectThumbnail };
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
import { b as AnimationEasing } from './easing-lM0Xo9Ni.js';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Behaviours: how a change gets from `from` to `to` other than straight along its ease (a
|
|
5
|
+
* pulse there and back, an oscillation, a seeded wriggle, a springy overshoot). Ported from
|
|
6
|
+
* `@pixerate/flair` (MIT): `SvgBehavior` and `behaviorProgress` in `vector/motion.ts`, the
|
|
7
|
+
* oscillate and overshoot evaluators in `scene/behavior.ts` and the noise in `time/noise.ts`.
|
|
8
|
+
* The numbers must stay identical to Flair's, so a behaviour exported to Flair plays the same
|
|
9
|
+
* frames there as here (the animation editor writes them as Flair `behavior`s, Flair ≥ 0.38).
|
|
10
|
+
*/
|
|
11
|
+
/**
|
|
12
|
+
* A behaviour: its progress `u` at each moment, where 0 is `from`, 1 is `to`, and numbers go
|
|
13
|
+
* past either. `t` is the change's time, 0–1, through its ease (linear unless given).
|
|
14
|
+
*
|
|
15
|
+
* - `pulse`: there and back `count` times (default 1): u = sin²(π·count·t).
|
|
16
|
+
* - `oscillate`: swings round `from`, out to `to` and as far the other way, `count` times
|
|
17
|
+
* (default 1), dying away by (1 − t)^`decay` (default 0, no decay).
|
|
18
|
+
* - `wriggle`: wanders round `from` by up to about `to − from`, as seeded smooth fractal noise
|
|
19
|
+
* at `frequency` Hz (default 2) with `octaves` layers (default 2); each number in a value
|
|
20
|
+
* wanders on its own channel. It eases out of and back to rest over the first and last 15%
|
|
21
|
+
* of its time. The same `seed` (default 42) gives the same wander.
|
|
22
|
+
* - `overshoot`: goes to `to`, past it and back, settling like a spring:
|
|
23
|
+
* u = 1 − e^(−damping·t)·cos(cycles·π·t) (default 3 cycles, damping 4).
|
|
24
|
+
*/
|
|
25
|
+
type MotionBehavior = {
|
|
26
|
+
type: 'pulse';
|
|
27
|
+
count?: number;
|
|
28
|
+
} | {
|
|
29
|
+
type: 'oscillate';
|
|
30
|
+
count?: number;
|
|
31
|
+
decay?: number;
|
|
32
|
+
wave?: 'sine' | 'triangle' | 'square' | 'sawtooth';
|
|
33
|
+
} | {
|
|
34
|
+
type: 'wriggle';
|
|
35
|
+
frequency?: number;
|
|
36
|
+
octaves?: number;
|
|
37
|
+
seed?: number;
|
|
38
|
+
} | {
|
|
39
|
+
type: 'overshoot';
|
|
40
|
+
cycles?: number;
|
|
41
|
+
damping?: number;
|
|
42
|
+
};
|
|
43
|
+
/** Every `MotionBehavior` type. */
|
|
44
|
+
declare const MOTION_BEHAVIORS: readonly ["pulse", "oscillate", "wriggle", "overshoot"];
|
|
45
|
+
/**
|
|
46
|
+
* A behaviour's progress at `t` (0–1, eased) of a change lasting `ms`, for the `index`-th number
|
|
47
|
+
* in a value (only a wriggle tells numbers apart).
|
|
48
|
+
*/
|
|
49
|
+
declare function behaviorProgress(behavior: MotionBehavior, t: number, index?: number, ms?: number): number;
|
|
50
|
+
/** Whether `value` is a well-formed `MotionBehavior`. */
|
|
51
|
+
declare function isMotionBehavior(value: unknown): value is MotionBehavior;
|
|
52
|
+
/** A seed from an id (FNV-1a), so each element wriggles its own way: Flair's `seedOf`. */
|
|
53
|
+
declare function motionSeedFromId(id: string): number;
|
|
54
|
+
/** 6t⁵ − 15t⁴ + 10t³: zero slope and curvature at 0 and 1. */
|
|
55
|
+
declare function quinticFade(t: number): number;
|
|
56
|
+
/**
|
|
57
|
+
* Multi-octave smooth noise (After Effects' `wiggle`): the sum over `octaves` of
|
|
58
|
+
* amp·ampMult^k · noise(freq·2^k·t), each octave and `dimension` seeded apart. `t` in seconds.
|
|
59
|
+
*/
|
|
60
|
+
declare function fractalWiggle(freq: number, amp: number, octaves?: number, ampMult?: number, t?: number, seed?: number, dimension?: number): number;
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* Keyframe tracks, independent of what they animate: each track is a list of keyframes
|
|
64
|
+
* `{ time (ms), value, easing }`, where the easing governs the segment *leaving* the keyframe
|
|
65
|
+
* (filmcraft / After Effects convention).
|
|
66
|
+
*/
|
|
67
|
+
/** Keyframe times closer than this (ms) are the same time. */
|
|
68
|
+
declare const ANIMATION_TIME_EPSILON = 0.000001;
|
|
69
|
+
/** A keyframe value: a number, or a CSS colour for colour properties. */
|
|
70
|
+
type AnimationValue = number | string;
|
|
71
|
+
interface AnimationKeyframe {
|
|
72
|
+
/** Time in milliseconds from the start of the timeline. */
|
|
73
|
+
time: number;
|
|
74
|
+
value: AnimationValue;
|
|
75
|
+
/** Easing of the segment from this keyframe to the next (default `linear`). */
|
|
76
|
+
easing?: AnimationEasing;
|
|
77
|
+
}
|
|
78
|
+
interface AnimationTrack {
|
|
79
|
+
keyframes: AnimationKeyframe[];
|
|
80
|
+
/** Disabled tracks keep their keyframes but do not animate (default `true`). */
|
|
81
|
+
enabled?: boolean;
|
|
82
|
+
}
|
|
83
|
+
/** How a track's values interpolate: numbers linearly, colours in OKLab. */
|
|
84
|
+
type AnimationValueType = 'number' | 'color';
|
|
85
|
+
/** Whether `value` is a well-formed keyframe. */
|
|
86
|
+
declare function isAnimationKeyframe(value: unknown): value is AnimationKeyframe;
|
|
87
|
+
/**
|
|
88
|
+
* Keyframes sorted by time, invalid entries dropped and duplicate times merged (the *later*
|
|
89
|
+
* entry in the array wins, so appending a keyframe replaces one at the same time). Cached per
|
|
90
|
+
* array (revalidated by element identity), so evaluating every frame does not re-sort; treat
|
|
91
|
+
* keyframe objects as immutable.
|
|
92
|
+
*/
|
|
93
|
+
declare function normalizeKeyframes(keyframes: readonly AnimationKeyframe[] | undefined | null): AnimationKeyframe[];
|
|
94
|
+
|
|
95
|
+
/** How time past the end of the timeline maps back into it. */
|
|
96
|
+
type AnimationLoopMode = 'none' | 'loop' | 'ping-pong';
|
|
97
|
+
/**
|
|
98
|
+
* Interpolates between two keyframe values: numbers linearly, colours in OKLab (premultiplied
|
|
99
|
+
* alpha). Mismatched or unreadable values hold `from` until `t` reaches 1.
|
|
100
|
+
*/
|
|
101
|
+
declare function interpolateAnimationValue(from: AnimationValue, to: AnimationValue, t: number, type?: AnimationValueType): AnimationValue;
|
|
102
|
+
/**
|
|
103
|
+
* A track's value at `time`. Before the first keyframe it holds the first value, after the
|
|
104
|
+
* last the last value. Keyframes may be unsorted or share times (see `normalizeKeyframes`).
|
|
105
|
+
* Returns `undefined` for a track without valid keyframes.
|
|
106
|
+
*/
|
|
107
|
+
declare function evaluateTrack(track: AnimationTrack | readonly AnimationKeyframe[] | undefined | null, time: number, type?: AnimationValueType): AnimationValue | undefined;
|
|
108
|
+
/**
|
|
109
|
+
* Maps a running time onto the timeline `[0, duration]`: clamped (`none`), wrapped (`loop`)
|
|
110
|
+
* or bounced (`ping-pong`).
|
|
111
|
+
*/
|
|
112
|
+
declare function wrapAnimationTime(time: number, duration: number, loop?: AnimationLoopMode): number;
|
|
113
|
+
|
|
114
|
+
export { ANIMATION_TIME_EPSILON as A, MOTION_BEHAVIORS as M, type AnimationKeyframe as a, type AnimationLoopMode as b, type AnimationTrack as c, type AnimationValue as d, type AnimationValueType as e, type MotionBehavior as f, behaviorProgress as g, evaluateTrack as h, fractalWiggle as i, interpolateAnimationValue as j, isAnimationKeyframe as k, isMotionBehavior as l, motionSeedFromId as m, normalizeKeyframes as n, quinticFade as q, wrapAnimationTime as w };
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
import { b as AnimationEasing } from './easing-lM0Xo9Ni.cjs';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Behaviours: how a change gets from `from` to `to` other than straight along its ease (a
|
|
5
|
+
* pulse there and back, an oscillation, a seeded wriggle, a springy overshoot). Ported from
|
|
6
|
+
* `@pixerate/flair` (MIT): `SvgBehavior` and `behaviorProgress` in `vector/motion.ts`, the
|
|
7
|
+
* oscillate and overshoot evaluators in `scene/behavior.ts` and the noise in `time/noise.ts`.
|
|
8
|
+
* The numbers must stay identical to Flair's, so a behaviour exported to Flair plays the same
|
|
9
|
+
* frames there as here (the animation editor writes them as Flair `behavior`s, Flair ≥ 0.38).
|
|
10
|
+
*/
|
|
11
|
+
/**
|
|
12
|
+
* A behaviour: its progress `u` at each moment, where 0 is `from`, 1 is `to`, and numbers go
|
|
13
|
+
* past either. `t` is the change's time, 0–1, through its ease (linear unless given).
|
|
14
|
+
*
|
|
15
|
+
* - `pulse`: there and back `count` times (default 1): u = sin²(π·count·t).
|
|
16
|
+
* - `oscillate`: swings round `from`, out to `to` and as far the other way, `count` times
|
|
17
|
+
* (default 1), dying away by (1 − t)^`decay` (default 0, no decay).
|
|
18
|
+
* - `wriggle`: wanders round `from` by up to about `to − from`, as seeded smooth fractal noise
|
|
19
|
+
* at `frequency` Hz (default 2) with `octaves` layers (default 2); each number in a value
|
|
20
|
+
* wanders on its own channel. It eases out of and back to rest over the first and last 15%
|
|
21
|
+
* of its time. The same `seed` (default 42) gives the same wander.
|
|
22
|
+
* - `overshoot`: goes to `to`, past it and back, settling like a spring:
|
|
23
|
+
* u = 1 − e^(−damping·t)·cos(cycles·π·t) (default 3 cycles, damping 4).
|
|
24
|
+
*/
|
|
25
|
+
type MotionBehavior = {
|
|
26
|
+
type: 'pulse';
|
|
27
|
+
count?: number;
|
|
28
|
+
} | {
|
|
29
|
+
type: 'oscillate';
|
|
30
|
+
count?: number;
|
|
31
|
+
decay?: number;
|
|
32
|
+
wave?: 'sine' | 'triangle' | 'square' | 'sawtooth';
|
|
33
|
+
} | {
|
|
34
|
+
type: 'wriggle';
|
|
35
|
+
frequency?: number;
|
|
36
|
+
octaves?: number;
|
|
37
|
+
seed?: number;
|
|
38
|
+
} | {
|
|
39
|
+
type: 'overshoot';
|
|
40
|
+
cycles?: number;
|
|
41
|
+
damping?: number;
|
|
42
|
+
};
|
|
43
|
+
/** Every `MotionBehavior` type. */
|
|
44
|
+
declare const MOTION_BEHAVIORS: readonly ["pulse", "oscillate", "wriggle", "overshoot"];
|
|
45
|
+
/**
|
|
46
|
+
* A behaviour's progress at `t` (0–1, eased) of a change lasting `ms`, for the `index`-th number
|
|
47
|
+
* in a value (only a wriggle tells numbers apart).
|
|
48
|
+
*/
|
|
49
|
+
declare function behaviorProgress(behavior: MotionBehavior, t: number, index?: number, ms?: number): number;
|
|
50
|
+
/** Whether `value` is a well-formed `MotionBehavior`. */
|
|
51
|
+
declare function isMotionBehavior(value: unknown): value is MotionBehavior;
|
|
52
|
+
/** A seed from an id (FNV-1a), so each element wriggles its own way: Flair's `seedOf`. */
|
|
53
|
+
declare function motionSeedFromId(id: string): number;
|
|
54
|
+
/** 6t⁵ − 15t⁴ + 10t³: zero slope and curvature at 0 and 1. */
|
|
55
|
+
declare function quinticFade(t: number): number;
|
|
56
|
+
/**
|
|
57
|
+
* Multi-octave smooth noise (After Effects' `wiggle`): the sum over `octaves` of
|
|
58
|
+
* amp·ampMult^k · noise(freq·2^k·t), each octave and `dimension` seeded apart. `t` in seconds.
|
|
59
|
+
*/
|
|
60
|
+
declare function fractalWiggle(freq: number, amp: number, octaves?: number, ampMult?: number, t?: number, seed?: number, dimension?: number): number;
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* Keyframe tracks, independent of what they animate: each track is a list of keyframes
|
|
64
|
+
* `{ time (ms), value, easing }`, where the easing governs the segment *leaving* the keyframe
|
|
65
|
+
* (filmcraft / After Effects convention).
|
|
66
|
+
*/
|
|
67
|
+
/** Keyframe times closer than this (ms) are the same time. */
|
|
68
|
+
declare const ANIMATION_TIME_EPSILON = 0.000001;
|
|
69
|
+
/** A keyframe value: a number, or a CSS colour for colour properties. */
|
|
70
|
+
type AnimationValue = number | string;
|
|
71
|
+
interface AnimationKeyframe {
|
|
72
|
+
/** Time in milliseconds from the start of the timeline. */
|
|
73
|
+
time: number;
|
|
74
|
+
value: AnimationValue;
|
|
75
|
+
/** Easing of the segment from this keyframe to the next (default `linear`). */
|
|
76
|
+
easing?: AnimationEasing;
|
|
77
|
+
}
|
|
78
|
+
interface AnimationTrack {
|
|
79
|
+
keyframes: AnimationKeyframe[];
|
|
80
|
+
/** Disabled tracks keep their keyframes but do not animate (default `true`). */
|
|
81
|
+
enabled?: boolean;
|
|
82
|
+
}
|
|
83
|
+
/** How a track's values interpolate: numbers linearly, colours in OKLab. */
|
|
84
|
+
type AnimationValueType = 'number' | 'color';
|
|
85
|
+
/** Whether `value` is a well-formed keyframe. */
|
|
86
|
+
declare function isAnimationKeyframe(value: unknown): value is AnimationKeyframe;
|
|
87
|
+
/**
|
|
88
|
+
* Keyframes sorted by time, invalid entries dropped and duplicate times merged (the *later*
|
|
89
|
+
* entry in the array wins, so appending a keyframe replaces one at the same time). Cached per
|
|
90
|
+
* array (revalidated by element identity), so evaluating every frame does not re-sort; treat
|
|
91
|
+
* keyframe objects as immutable.
|
|
92
|
+
*/
|
|
93
|
+
declare function normalizeKeyframes(keyframes: readonly AnimationKeyframe[] | undefined | null): AnimationKeyframe[];
|
|
94
|
+
|
|
95
|
+
/** How time past the end of the timeline maps back into it. */
|
|
96
|
+
type AnimationLoopMode = 'none' | 'loop' | 'ping-pong';
|
|
97
|
+
/**
|
|
98
|
+
* Interpolates between two keyframe values: numbers linearly, colours in OKLab (premultiplied
|
|
99
|
+
* alpha). Mismatched or unreadable values hold `from` until `t` reaches 1.
|
|
100
|
+
*/
|
|
101
|
+
declare function interpolateAnimationValue(from: AnimationValue, to: AnimationValue, t: number, type?: AnimationValueType): AnimationValue;
|
|
102
|
+
/**
|
|
103
|
+
* A track's value at `time`. Before the first keyframe it holds the first value, after the
|
|
104
|
+
* last the last value. Keyframes may be unsorted or share times (see `normalizeKeyframes`).
|
|
105
|
+
* Returns `undefined` for a track without valid keyframes.
|
|
106
|
+
*/
|
|
107
|
+
declare function evaluateTrack(track: AnimationTrack | readonly AnimationKeyframe[] | undefined | null, time: number, type?: AnimationValueType): AnimationValue | undefined;
|
|
108
|
+
/**
|
|
109
|
+
* Maps a running time onto the timeline `[0, duration]`: clamped (`none`), wrapped (`loop`)
|
|
110
|
+
* or bounced (`ping-pong`).
|
|
111
|
+
*/
|
|
112
|
+
declare function wrapAnimationTime(time: number, duration: number, loop?: AnimationLoopMode): number;
|
|
113
|
+
|
|
114
|
+
export { ANIMATION_TIME_EPSILON as A, MOTION_BEHAVIORS as M, type AnimationKeyframe as a, type AnimationLoopMode as b, type AnimationTrack as c, type AnimationValue as d, type AnimationValueType as e, type MotionBehavior as f, behaviorProgress as g, evaluateTrack as h, fractalWiggle as i, interpolateAnimationValue as j, isAnimationKeyframe as k, isMotionBehavior as l, motionSeedFromId as m, normalizeKeyframes as n, quinticFade as q, wrapAnimationTime as w };
|
|
@@ -2,10 +2,10 @@ import { a2 as RasterLayerBase, a3 as RasterMask$1, a5 as RasterPixelLayer, H as
|
|
|
2
2
|
import { c as PixelSurface, a as BlendMode, T as TiledSurface, R as RasterRect } from './surface-1MRncXpF.cjs';
|
|
3
3
|
import { b as BuiltinProfileId, j as Intent, P as Profile, T as Transform, d as ColorSpace } from './builtin-CY97ppKM.cjs';
|
|
4
4
|
import { A as AffineMatrix, Q as Quad, a as WarpMesh, V as Vec2, H as Homography } from './types-CwMPoRMU.cjs';
|
|
5
|
-
import { B as BezierPath } from './bezier-
|
|
6
|
-
import { b as TextRun, P as ParagraphRun, T as TextShaper, c as ParagraphStyle, d as TextStyle, L as LaidFragment, W as WarpPreset, e as TextLayout } from './warp-
|
|
7
|
-
import {
|
|
8
|
-
import { B as BrushSettings, P as PaintSource, M as MixerSettings, a as MixerLoad, R as RetouchSettings, S as StrokeCoverage, b as MixerTarget, c as MixerStroke, d as RetouchApply, e as StrokePoint, f as RetouchPaint, C as CoverageMap, g as PaintTileTarget, h as StrokeApply } from './rand-
|
|
5
|
+
import { B as BezierPath } from './bezier-CvgQiYRg.cjs';
|
|
6
|
+
import { b as TextRun, P as ParagraphRun, T as TextShaper, c as ParagraphStyle, d as TextStyle, L as LaidFragment, W as WarpPreset, e as TextLayout } from './warp-D62N_5VK.cjs';
|
|
7
|
+
import { e as EffectValue, a3 as VectorSubpath, v as EffectsSlot, E as EffectProvider, b as EffectPixels, f as EffectDescription, X as Vec2$1 } from './helpers-C5aAd44p.cjs';
|
|
8
|
+
import { B as BrushSettings, P as PaintSource, M as MixerSettings, a as MixerLoad, R as RetouchSettings, S as StrokeCoverage, b as MixerTarget, c as MixerStroke, d as RetouchApply, e as StrokePoint, f as RetouchPaint, C as CoverageMap, g as PaintTileTarget, h as StrokeApply } from './rand-DTXAssW1.cjs';
|
|
9
9
|
|
|
10
10
|
/**
|
|
11
11
|
* A selection: one 8-bit coverage value per image pixel (0 = not selected, 255 = fully
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { e as EffectValue, v as EffectsSlot, b as EffectPixels, E as EffectProvider, f as EffectDescription } from './helpers-C5aAd44p.cjs';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* Keyframes for a clip's opacity, volume and transform. A property is either a plain number or
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { e as EffectValue, v as EffectsSlot, b as EffectPixels, E as EffectProvider, f as EffectDescription } from './helpers-CPWcK504.js';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* Keyframes for a clip's opacity, volume and transform. A property is either a plain number or
|
|
@@ -2,10 +2,10 @@ import { a2 as RasterLayerBase, a3 as RasterMask$1, a5 as RasterPixelLayer, H as
|
|
|
2
2
|
import { c as PixelSurface, a as BlendMode, T as TiledSurface, R as RasterRect } from './surface-1MRncXpF.js';
|
|
3
3
|
import { b as BuiltinProfileId, j as Intent, P as Profile, T as Transform, d as ColorSpace } from './builtin-CY97ppKM.js';
|
|
4
4
|
import { A as AffineMatrix, Q as Quad, a as WarpMesh, V as Vec2, H as Homography } from './types-CwMPoRMU.js';
|
|
5
|
-
import { B as BezierPath } from './bezier-
|
|
6
|
-
import { b as TextRun, P as ParagraphRun, T as TextShaper, c as ParagraphStyle, d as TextStyle, L as LaidFragment, W as WarpPreset, e as TextLayout } from './warp-
|
|
7
|
-
import {
|
|
8
|
-
import { B as BrushSettings, P as PaintSource, M as MixerSettings, a as MixerLoad, R as RetouchSettings, S as StrokeCoverage, b as MixerTarget, c as MixerStroke, d as RetouchApply, e as StrokePoint, f as RetouchPaint, C as CoverageMap, g as PaintTileTarget, h as StrokeApply } from './rand-
|
|
5
|
+
import { B as BezierPath } from './bezier-DP4NnJp3.js';
|
|
6
|
+
import { b as TextRun, P as ParagraphRun, T as TextShaper, c as ParagraphStyle, d as TextStyle, L as LaidFragment, W as WarpPreset, e as TextLayout } from './warp-CIsO617e.js';
|
|
7
|
+
import { e as EffectValue, a3 as VectorSubpath, v as EffectsSlot, E as EffectProvider, b as EffectPixels, f as EffectDescription, X as Vec2$1 } from './helpers-CPWcK504.js';
|
|
8
|
+
import { B as BrushSettings, P as PaintSource, M as MixerSettings, a as MixerLoad, R as RetouchSettings, S as StrokeCoverage, b as MixerTarget, c as MixerStroke, d as RetouchApply, e as StrokePoint, f as RetouchPaint, C as CoverageMap, g as PaintTileTarget, h as StrokeApply } from './rand-pQQ2sJTk.js';
|
|
9
9
|
|
|
10
10
|
/**
|
|
11
11
|
* A selection: one 8-bit coverage value per image pixel (0 = not selected, 255 = fully
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import { J as JsonSchema, S as SchemaValidationError } from './schema-Di0CS6Pe.cjs';
|
|
2
|
-
import {
|
|
2
|
+
import { f as MotionBehavior, b as AnimationLoopMode } from './evaluate-BsxYieLN.cjs';
|
|
3
3
|
import { b as AnimationEasing } from './easing-lM0Xo9Ni.cjs';
|
|
4
|
-
import { b as AnimationLoopMode } from './evaluate-2S3vSPLy.cjs';
|
|
5
|
-
import { C as CanvasGradientDef } from './gradient-KDfCvhuj.cjs';
|
|
6
4
|
import { W as WarpStyle, a as WarpMesh } from './types-CwMPoRMU.cjs';
|
|
7
5
|
|
|
8
6
|
/**
|
|
@@ -383,6 +381,71 @@ interface EffectProvider {
|
|
|
383
381
|
applyVectorEffect?(id: string, target: EffectVectorTarget, values?: EffectValues): MaybePromise<EffectVectorMotion>;
|
|
384
382
|
}
|
|
385
383
|
|
|
384
|
+
/**
|
|
385
|
+
* Canvas gradient models, parsing, presets, and SVG defs generation.
|
|
386
|
+
* Supports linear and radial gradients for shape fills, strokes, and freehand drawing.
|
|
387
|
+
*/
|
|
388
|
+
interface GradientStop {
|
|
389
|
+
offset: number;
|
|
390
|
+
color: string;
|
|
391
|
+
opacity?: number;
|
|
392
|
+
}
|
|
393
|
+
interface CanvasLinearGradient {
|
|
394
|
+
type: 'linear';
|
|
395
|
+
angle?: number;
|
|
396
|
+
stops: GradientStop[];
|
|
397
|
+
}
|
|
398
|
+
interface CanvasRadialGradient {
|
|
399
|
+
type: 'radial';
|
|
400
|
+
cx?: number;
|
|
401
|
+
cy?: number;
|
|
402
|
+
r?: number;
|
|
403
|
+
stops: GradientStop[];
|
|
404
|
+
}
|
|
405
|
+
type CanvasGradientDef = CanvasLinearGradient | CanvasRadialGradient;
|
|
406
|
+
interface SvgGradientStop {
|
|
407
|
+
offset: string;
|
|
408
|
+
stopColor: string;
|
|
409
|
+
stopOpacity?: number;
|
|
410
|
+
}
|
|
411
|
+
interface SvgGradientDef {
|
|
412
|
+
id: string;
|
|
413
|
+
type: 'linear' | 'radial';
|
|
414
|
+
attrs: Record<string, string | number>;
|
|
415
|
+
stops: SvgGradientStop[];
|
|
416
|
+
}
|
|
417
|
+
declare const PIXERATE_BRAND_GRADIENT: CanvasLinearGradient;
|
|
418
|
+
declare const CANVAS_GRADIENT_PRESETS: Record<string, CanvasLinearGradient>;
|
|
419
|
+
/** Whether an arbitrary value matches a CanvasGradientDef object. */
|
|
420
|
+
declare function isCanvasGradient(value: unknown): value is CanvasGradientDef;
|
|
421
|
+
/**
|
|
422
|
+
* Parses CSS linear-gradient or radial-gradient strings into CanvasGradientDef.
|
|
423
|
+
* Supports forms like:
|
|
424
|
+
* - linear-gradient(90deg, #ff0000 0%, #0000ff 100%)
|
|
425
|
+
* - linear-gradient(to right, red, blue)
|
|
426
|
+
* - radial-gradient(circle, red 0%, blue 100%)
|
|
427
|
+
*/
|
|
428
|
+
declare function parseCssGradient(css: string): CanvasGradientDef | null;
|
|
429
|
+
/**
|
|
430
|
+
* Resolves a paint value (which could be a CSS color, preset name, CSS gradient string, or CanvasGradientDef)
|
|
431
|
+
* into either a CanvasGradientDef (if gradient) or null (if solid color or invalid).
|
|
432
|
+
*/
|
|
433
|
+
declare function resolveCanvasGradient(value: unknown): CanvasGradientDef | null;
|
|
434
|
+
/**
|
|
435
|
+
* Converts degrees clockwise (CSS angle: 0 = top, 90 = right, 180 = bottom, 270 = left)
|
|
436
|
+
* to SVG linearGradient vector coordinates (x1, y1, x2, y2) normalized [0, 1].
|
|
437
|
+
*/
|
|
438
|
+
declare function angleToSvgLinearCoords(angleDeg?: number): {
|
|
439
|
+
x1: number;
|
|
440
|
+
y1: number;
|
|
441
|
+
x2: number;
|
|
442
|
+
y2: number;
|
|
443
|
+
};
|
|
444
|
+
/**
|
|
445
|
+
* Converts a CanvasGradientDef to an SvgGradientDef descriptor ready for rendering `<linearGradient>` / `<radialGradient>`.
|
|
446
|
+
*/
|
|
447
|
+
declare function gradientToSvgDef(gradient: CanvasGradientDef, id: string): SvgGradientDef;
|
|
448
|
+
|
|
386
449
|
/** An affine matrix `[a, b, c, d, e, f]`: `x' = a·x + c·y + e`, `y' = b·x + d·y + f` (SVG order). */
|
|
387
450
|
type VectorMatrix = readonly [number, number, number, number, number, number];
|
|
388
451
|
/** A point in document coordinates. */
|
|
@@ -2006,4 +2069,4 @@ declare class EffectsSlot {
|
|
|
2006
2069
|
subscribe(listener: (provider: EffectProvider | null) => void): () => void;
|
|
2007
2070
|
}
|
|
2008
2071
|
|
|
2009
|
-
export {
|
|
2072
|
+
export { type VectorPaint as $, isEffectPixels as A, linearToSrgb as B, type CanvasGradientDef as C, resolveEffectValues as D, type EffectProvider as E, searchEffectSummaries as F, srgbToLinear as G, type VectorEffectParamsMap as H, type VectorPathNode as I, type VectorFillRule as J, type VectorBooleanOperation as K, type VectorNode as L, type VectorEffect as M, type VectorGroupNode as N, type VectorBounds as O, type VectorWarpMesh as P, type VectorInstanceNode as Q, type VectorFilterType as R, type SvgGradientDef as S, type VectorFilterParamsMap as T, type VectorFilter as U, type VectorEffectType as V, type VectorGradient as W, type Vec2 as X, type VectorGradientUnits as Y, type VectorGradientSpread as Z, type VectorGradientType as _, type EffectRenderRequest as a, type MotionEffectCommand as a$, type VectorMatrix as a0, type VectorGradientStop as a1, type VectorStrokeAlign as a2, type VectorSubpath as a3, type VectorDocument as a4, type VectorWidthPoint as a5, type MotionCommand as a6, type MotionShot as a7, type MotionScene as a8, type MotionDirection as a9, FLAIR_EXPORT_VERSION as aA, type FlairEase as aB, type FlairEaseName as aC, type FlairSpringEase as aD, type FlairSvgAnimation as aE, MOTION_BLENDS as aF, MOTION_CAMERA_MS as aG, MOTION_CASCADES as aH, MOTION_CLIP_TARGET as aI, MOTION_COMMAND_TYPES as aJ, MOTION_DEFAULT_DURATIONS as aK, MOTION_DEFAULT_HOLD as aL, MOTION_DIRECTIONS as aM, MOTION_DRAW_MS_PER_UNIT as aN, MOTION_DRAW_RANGE as aO, MOTION_DRIVEN_PROPERTIES as aP, MOTION_ENTER_STYLES as aQ, MOTION_EXIT_STYLES as aR, MOTION_IRIS_SHAPES as aS, MOTION_REPEAT_MODES as aT, MOTION_SPLIT_ORIENTATIONS as aU, MOTION_TEXT_UNITS as aV, MOTION_TRIGGERS as aW, type MotionColorPulseCommand as aX, type MotionCommandBase as aY, type MotionDrawCommand as aZ, type MotionDrawOrder as a_, type MotionIrisShape as aa, type MotionSplitOrientation as ab, type MotionDriver as ac, type MotionDrivenProperty as ad, type MotionRect as ae, type MotionBeatGrid as af, type MotionCue as ag, type MotionCamera as ah, type MotionTextUnit as ai, type MotionCascade as aj, type MotionBlur as ak, type MotionControl as al, type MotionPreset as am, type MotionClip as an, type FlairSvgMotion as ao, type FlairVectorEffect as ap, type MotionEffectSource as aq, type FlairExportOptions as ar, type FlairMotionExport as as, type FlairEffectOptions as at, type FlairEffectDocument as au, type MotionEnterStyle as av, type MotionExitStyle as aw, type MotionCommandType as ax, type MotionNarration as ay, FLAIR_EASES as az, type EffectPixels as b, type VectorResizing as b$, type MotionEnterCommand as b0, type MotionExitCommand as b1, type MotionFadeCommand as b2, type MotionFollowCommand as b3, type MotionMatchCommand as b4, type MotionMorphCommand as b5, type MotionMoveCommand as b6, type MotionPlayCommand as b7, type MotionPulseCommand as b8, type MotionRotateCommand as b9, type VectorCharacterStyle as bA, type VectorTextRun as bB, type VectorParagraphStyle as bC, type VectorTextFrame as bD, type VectorTransformHandle as bE, type VectorAnchorRef as bF, type VectorPathfinderOperation as bG, type VectorTool as bH, type VectorDefaults as bI, type VectorTextAlign as bJ, type VectorStyle as bK, type VectorHandleRef as bL, type VectorSegmentRef as bM, type VectorBlendOptions as bN, type VectorModifiers as bO, type VectorProviderEffect as bP, type VectorBlendMode as bQ, type VectorAlign as bR, type VectorDistribute as bS, type VectorArrange as bT, type VectorMaskType as bU, type VectorSymmetryMode as bV, type VectorSymmetry as bW, type VectorFreeformPoint as bX, type VectorMeshGradient as bY, type VectorFreeformGradient as bZ, type VectorArrowhead as b_, type MotionScaleCommand as ba, type MotionShakeCommand as bb, type MotionStyleCommand as bc, type MotionTeeterCommand as bd, type MotionTrigger as be, type MotionWaitCommand as bf, type MotionWaveCommand as bg, type MotionWiggleCommand as bh, flairAtLeast as bi, flairCurveFor as bj, flairEaseFor as bk, motionFlairPrimitive as bl, toFlairEffectDocument as bm, toFlairSvgMotion as bn, toFlairVectorEffect as bo, type VectorAnchor as bp, type VectorTextNode as bq, type VectorAnchorType as br, type VectorCornerKind as bs, type VectorViewport as bt, type VectorConnectorRoute as bu, type VectorConnectorSide as bv, type VectorConnectorEnd as bw, type VectorConnector as bx, type VectorConstraintKind as by, type VectorConstraint as bz, type EffectUse as c, type VectorFrame as c0, type VectorHorizontalResizing as c1, type VectorVerticalResizing as c2, type VectorMask as c3, type VectorAverageAxis as c4, type VectorSymbol as c5, type VectorParameter as c6, type VectorBlendSpacing as c7, type VectorGradientInterpolation as c8, type VectorStrokeGradientMode as c9, VECTOR_SYMMETRY_MODES as cA, VECTOR_TEXT_ALIGNS as cB, VECTOR_TOOLS as cC, VECTOR_TRANSFORM_HANDLES as cD, VECTOR_VERTICAL_RESIZING as cE, type VectorCorner as cF, type VectorGeomRef as cG, type VectorLineCap as cH, type VectorPathTextBaseline as cI, type VectorStrokeLayerKind as cJ, type VectorTextRunStyle as cK, type VectorWarpStyle as cL, CANVAS_GRADIENT_PRESETS as cM, type CanvasLinearGradient as cN, type CanvasRadialGradient as cO, type GradientStop as cP, PIXERATE_BRAND_GRADIENT as cQ, type SvgGradientStop as cR, angleToSvgLinearCoords as cS, gradientToSvgDef as cT, isCanvasGradient as cU, parseCssGradient as cV, resolveCanvasGradient as cW, type VectorArrowAlign as ca, type VectorPaintLayer as cb, type VectorStrokeLayer as cc, type VectorBlend as cd, type VectorMergeMode as ce, type VectorLineJoin as cf, type VectorStrokeSettings as cg, type VectorInstanceOverrides as ch, VECTOR_ARROWHEADS as ci, VECTOR_BLEND_MODES as cj, VECTOR_BLEND_SPACINGS as ck, VECTOR_CONNECTOR_ROUTES as cl, VECTOR_CONNECTOR_SIDES as cm, VECTOR_CONSTRAINT_KINDS as cn, VECTOR_CORNER_KINDS as co, VECTOR_EFFECT_TYPES as cp, VECTOR_FILTER_TYPES as cq, VECTOR_GRADIENT_INTERPOLATIONS as cr, VECTOR_GRADIENT_SPREADS as cs, VECTOR_GRADIENT_TYPES as ct, VECTOR_HORIZONTAL_RESIZING as cu, VECTOR_MASK_TYPES as cv, VECTOR_MERGE_MODES as cw, VECTOR_PATHFINDER_OPERATIONS as cx, VECTOR_PATH_TEXT_BASELINES as cy, VECTOR_STROKE_GRADIENT_MODES as cz, type EffectProviderCapabilities as d, type EffectValue as e, type EffectDescription as f, type EffectSummary as g, EFFECT_KINDS as h, EFFECT_USES as i, type EffectControlSchema as j, type EffectImageSource as k, type EffectInputSpec as l, type EffectKind as m, type EffectPreset as n, type EffectRenderer as o, type EffectRendererOptions as p, type EffectSearchOptions as q, type EffectSvgAnimation as r, type EffectValues as s, type EffectVectorMotion as t, type EffectVectorTarget as u, EffectsSlot as v, applyEffectMask as w, createEffectPixels as x, effectValueErrors as y, encodeEffectFloat as z };
|