Skip to content

Commit

Permalink
fix: schema
Browse files Browse the repository at this point in the history
  • Loading branch information
Aidosmf committed Aug 29, 2024
1 parent dff793e commit bda29aa
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 2 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
51 changes: 49 additions & 2 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:18:22 UTC
*
* Generated by an automated process. DO NOT EDIT!
*
Expand Down Expand Up @@ -871,6 +871,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 +1003,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 +1821,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 +3015,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 +3165,12 @@ interface Animation
*/
markers?: Marker[];
mb?: MotionBlur;
/**
* Available property overrides
*/
slots?: {
[key: Helpers.SlotID]: Slot;
};
}

declare namespace Asset {
Expand Down Expand Up @@ -3188,6 +3228,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 +3296,7 @@ export {
Shape,
ShapeDirection,
ShapeType,
Slot,
StrokeDashType,
Style,
Text,
Expand Down

0 comments on commit bda29aa

Please sign in to comment.