Skip to content

Commit

Permalink
Merge pull request #13 from lottie/mf/fix-schema-n-blend-mode
Browse files Browse the repository at this point in the history
fix: sync schema with v1.1.0 & fix blend-mode values
  • Loading branch information
Aidosmf authored Aug 30, 2024
2 parents dff793e + 404e17b commit 211b4db
Show file tree
Hide file tree
Showing 4 changed files with 65 additions and 4 deletions.
5 changes: 5 additions & 0 deletions .changeset/brown-files-punch.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@lottie-animation-community/lottie-types": minor
---

fix: properly generate schema with v1.1.0
5 changes: 5 additions & 0 deletions .changeset/twelve-turtles-hug.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@lottie-animation-community/lottie-types": patch
---

fix(blend-mode): include missing Add & HardMix"
55 changes: 52 additions & 3 deletions index.d.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*!
* @lottie-animation-community/lottie-types - v1.0.0
* Compiled Mon, 27 May 2024 16:07:20 UTC
* @lottie-animation-community/lottie-types - v1.1.0
* Compiled Thu, 29 Aug 2024 12:19:27 UTC
*
* Generated by an automated process. DO NOT EDIT!
*
Expand Down Expand Up @@ -36,7 +36,9 @@ declare namespace BlendMode {
| Hue
| Saturation
| Color
| Luminosity;
| Luminosity
| Add
| HardMix;

type Normal = 0;
type Multiply = 1;
Expand Down Expand Up @@ -871,6 +873,11 @@ declare namespace Helpers {
*/
v: number[][];
}

/**
* One of the ID in the file's slots
*/
type SlotID = string;
}

declare namespace AnimatedProperty {
Expand Down Expand Up @@ -998,6 +1005,12 @@ declare namespace AnimatedProperty {
| Helpers.Bezier
| number[]
| number;
/**
* Slot ID
*
* One of the ID in the file's slots
*/
sid?: Helpers.SlotID;
}

/**
Expand Down Expand Up @@ -1810,6 +1823,12 @@ declare namespace Text {
*/
interface AnimatedDocument extends Helpers.Expression {
k: DocumentKeyframe[];
/**
* Slot ID
*
* One of the ID in the file's slots
*/
sid?: Helpers.SlotID;
}

/**
Expand Down Expand Up @@ -2998,6 +3017,23 @@ type Marker = {
dr?: number;
};

/**
* Defines property / image asset overrides.
*/
type Slot = {
/**
* Slot Property
*/
p:
| AnimatedProperty.MultiDimensional
| AnimatedProperty.Color
| AnimatedProperty.Position
| AnimatedProperty.Shape
| AnimatedProperty.Value
| Text.AnimatedDocument
| Asset.Image;
};

/**
* Base class for layer holders
*/
Expand Down Expand Up @@ -3131,6 +3167,12 @@ interface Animation
*/
markers?: Marker[];
mb?: MotionBlur;
/**
* Available property overrides
*/
slots?: {
[key: Helpers.SlotID]: Slot;
};
}

declare namespace Asset {
Expand Down Expand Up @@ -3188,6 +3230,12 @@ declare namespace Asset {
* Marks as part of an image sequence if present
*/
t?: "seq";
/**
* Slot ID
*
* One of the ID in the file's slots
*/
sid?: Helpers.SlotID;
}

/**
Expand Down Expand Up @@ -3250,6 +3298,7 @@ export {
Shape,
ShapeDirection,
ShapeType,
Slot,
StrokeDashType,
Style,
Text,
Expand Down
4 changes: 3 additions & 1 deletion src/constants/blend-mode.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@ export declare namespace BlendMode {
| Hue
| Saturation
| Color
| Luminosity;
| Luminosity
| Add
| HardMix;

type Normal = 0;
type Multiply = 1;
Expand Down

0 comments on commit 211b4db

Please sign in to comment.