@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.
- package/dist/entry.node.cjs +560 -283
- package/dist/entry.node.cjs.map +1 -1
- package/dist/entry.node.d.cts +20 -1
- package/dist/entry.node.d.ts +20 -1
- package/dist/entry.node.js +557 -282
- package/dist/entry.node.js.map +1 -1
- package/dist/entry.web.d.ts +20 -1
- package/dist/entry.web.js +525 -258
- package/dist/entry.web.js.map +1 -1
- package/package.json +10 -4
package/dist/entry.node.d.cts
CHANGED
|
@@ -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
|
interface VideoGenerationOptions {
|
|
182
201
|
width: number;
|
|
@@ -227,4 +246,4 @@ declare function createTextEngine(opts?: {
|
|
|
227
246
|
destroy(): void;
|
|
228
247
|
}>;
|
|
229
248
|
|
|
230
|
-
export { type DrawOp, type EngineInit, type Glyph, type GradientSpec, type RGBA, type Renderer, type ShapedLine, type ValidAsset, createTextEngine };
|
|
249
|
+
export { type DrawOp, type EngineInit, type Glyph, type GradientSpec, type RGBA, type Renderer, type ShapedLine, type ValidAsset, createTextEngine, isGlyphFill, isShadowFill };
|
package/dist/entry.node.d.ts
CHANGED
|
@@ -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
|
interface VideoGenerationOptions {
|
|
182
201
|
width: number;
|
|
@@ -227,4 +246,4 @@ declare function createTextEngine(opts?: {
|
|
|
227
246
|
destroy(): void;
|
|
228
247
|
}>;
|
|
229
248
|
|
|
230
|
-
export { type DrawOp, type EngineInit, type Glyph, type GradientSpec, type RGBA, type Renderer, type ShapedLine, type ValidAsset, createTextEngine };
|
|
249
|
+
export { type DrawOp, type EngineInit, type Glyph, type GradientSpec, type RGBA, type Renderer, type ShapedLine, type ValidAsset, createTextEngine, isGlyphFill, isShadowFill };
|