@shotstack/shotstack-canvas 1.1.0 → 1.1.1

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.
@@ -144,6 +144,14 @@ type DrawOp = {
144
144
  x: number;
145
145
  y: number;
146
146
  fill: GradientSpec;
147
+ scale?: number;
148
+ gradientBBox?: {
149
+ x: number;
150
+ y: number;
151
+ w: number;
152
+ h: number;
153
+ };
154
+ isShadow?: boolean;
147
155
  } | {
148
156
  op: "StrokePath";
149
157
  path: string;
@@ -152,6 +160,7 @@ type DrawOp = {
152
160
  width: number;
153
161
  color: string;
154
162
  opacity: number;
163
+ scale?: number;
155
164
  } | {
156
165
  op: "DecorationLine";
157
166
  from: {
@@ -177,6 +186,16 @@ type Renderer = {
177
186
  toPNG?: () => Promise<Buffer>;
178
187
  };
179
188
  type ValidAsset = RichTextValidated;
189
+ declare const isShadowFill: (op: DrawOp) => op is Extract<DrawOp, {
190
+ op: "FillPath";
191
+ }> & {
192
+ isShadow: true;
193
+ };
194
+ declare const isGlyphFill: (op: DrawOp) => op is Extract<DrawOp, {
195
+ op: "FillPath";
196
+ }> & {
197
+ isShadow?: false;
198
+ };
180
199
 
181
200
  declare function createTextEngine(opts?: {
182
201
  width?: number;
@@ -205,4 +224,4 @@ declare function createTextEngine(opts?: {
205
224
  destroy(): void;
206
225
  }>;
207
226
 
208
- export { type DrawOp, type EngineInit, type Glyph, type GradientSpec, type RGBA, type Renderer, type ShapedLine, type ValidAsset, createTextEngine };
227
+ export { type DrawOp, type EngineInit, type Glyph, type GradientSpec, type RGBA, type Renderer, type ShapedLine, type ValidAsset, createTextEngine, isGlyphFill, isShadowFill };