@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
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import { J as JsonSchema, S as SchemaValidationError } from './schema-Di0CS6Pe.js';
|
|
2
|
-
import {
|
|
2
|
+
import { f as MotionBehavior, b as AnimationLoopMode } from './evaluate-BbCeF6pt.js';
|
|
3
3
|
import { b as AnimationEasing } from './easing-lM0Xo9Ni.js';
|
|
4
|
-
import { b as AnimationLoopMode } from './evaluate-CfmT6xA3.js';
|
|
5
|
-
import { C as CanvasGradientDef } from './gradient-KDfCvhuj.js';
|
|
6
4
|
import { W as WarpStyle, a as WarpMesh } from './types-CwMPoRMU.js';
|
|
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 };
|