@pixodesk/svg-animator-react 1.0.29 → 1.0.30
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/index.umd.js +11 -11
- package/dist/index.umd.js.map +1 -1
- package/package.json +2 -2
package/dist/index.umd.js
CHANGED
|
@@ -2790,7 +2790,7 @@ var PixodeskAnimatorReact = (() => {
|
|
|
2790
2790
|
auto: "auto",
|
|
2791
2791
|
exact: "exact"
|
|
2792
2792
|
};
|
|
2793
|
-
var
|
|
2793
|
+
var PxStrokeTrimSubPaths = {
|
|
2794
2794
|
separate: "separate",
|
|
2795
2795
|
combined: "combined"
|
|
2796
2796
|
};
|
|
@@ -3028,10 +3028,10 @@ var PixodeskAnimatorReact = (() => {
|
|
|
3028
3028
|
d: PxAnimatableStringSchema.optional(),
|
|
3029
3029
|
animate: PxPropertyAnimationSchema.optional()
|
|
3030
3030
|
}));
|
|
3031
|
-
var
|
|
3031
|
+
var PxStrokeTrimEffectSchema = implementsInterface()(px.object({
|
|
3032
3032
|
offset: PxAnimatableNumberSchema.optional(),
|
|
3033
3033
|
range: PxAnimatableVec2Schema.optional(),
|
|
3034
|
-
subPaths: px.enum([
|
|
3034
|
+
subPaths: px.enum([PxStrokeTrimSubPaths.separate, PxStrokeTrimSubPaths.combined]).optional()
|
|
3035
3035
|
}));
|
|
3036
3036
|
var PxRetimeEffectSchema = implementsInterface()(px.object({
|
|
3037
3037
|
sourceId: px.string().optional(),
|
|
@@ -3085,7 +3085,7 @@ var PixodeskAnimatorReact = (() => {
|
|
|
3085
3085
|
repeater: PxRepeaterEffectSchema.optional(),
|
|
3086
3086
|
maskedBy: PxMaskedByEffectSchema.optional(),
|
|
3087
3087
|
clipPath: PxClipPathEffectSchema.optional(),
|
|
3088
|
-
|
|
3088
|
+
strokeTrim: PxStrokeTrimEffectSchema.optional(),
|
|
3089
3089
|
clone: PxCloneEffectSchema.optional(),
|
|
3090
3090
|
fillGradient: PxFillGradientEffectSchema.optional(),
|
|
3091
3091
|
strokeGradient: PxStrokeGradientEffectSchema.optional(),
|
|
@@ -6587,9 +6587,9 @@ var PixodeskAnimatorReact = (() => {
|
|
|
6587
6587
|
}
|
|
6588
6588
|
return materialiseGlyphTextAlongPath(node, pathD, startOffset, { glyphs: ctx.glyphs, warnings: ctx.warnings }, textLength, pathOverflow);
|
|
6589
6589
|
}
|
|
6590
|
-
function
|
|
6591
|
-
if (!
|
|
6592
|
-
const combined =
|
|
6590
|
+
function applyStrokeTrimEffect(node, strokeTrim, ctx) {
|
|
6591
|
+
if (!strokeTrim) return node;
|
|
6592
|
+
const combined = strokeTrim.subPaths === PxStrokeTrimSubPaths.combined;
|
|
6593
6593
|
const leafEntries = [];
|
|
6594
6594
|
const measure = (n) => {
|
|
6595
6595
|
if (Array.isArray(n.children) && n.children.length > 0) {
|
|
@@ -6620,9 +6620,9 @@ var PixodeskAnimatorReact = (() => {
|
|
|
6620
6620
|
}
|
|
6621
6621
|
const chainLengthPx = acc;
|
|
6622
6622
|
if (combined && chainLengthPx < 1e-3) return node;
|
|
6623
|
-
const offsetReadRaw = readAnimatable(
|
|
6623
|
+
const offsetReadRaw = readAnimatable(strokeTrim.offset);
|
|
6624
6624
|
const offsetRead = offsetReadRaw.kind === "absent" ? { kind: "static", value: 0 } : offsetReadRaw;
|
|
6625
|
-
const rangeReadRaw = readRangeWithCrossings(
|
|
6625
|
+
const rangeReadRaw = readRangeWithCrossings(strokeTrim.range);
|
|
6626
6626
|
const rangeRead = rangeReadRaw.kind === "absent" ? { kind: "static", value: [0, 1] } : rangeReadRaw;
|
|
6627
6627
|
const offsetValues = readScalarValues(offsetRead);
|
|
6628
6628
|
const minOffset = offsetValues.length ? Math.min(...offsetValues) : 0;
|
|
@@ -6952,7 +6952,7 @@ var PixodeskAnimatorReact = (() => {
|
|
|
6952
6952
|
const originalId = typeof node.id === "string" ? node.id : void 0;
|
|
6953
6953
|
const innerIdForContentRef = originalId ? ctx.contentRefInnerIds.get(originalId) : void 0;
|
|
6954
6954
|
if (!fx && !innerIdForContentRef) return node;
|
|
6955
|
-
const { transformBy, repeater, maskedBy, clipPath,
|
|
6955
|
+
const { transformBy, repeater, maskedBy, clipPath, strokeTrim, clone: cloneFx, fillGradient, strokeGradient, textPath, text } = fx != null ? fx : {};
|
|
6956
6956
|
if (fx) delete node.effects;
|
|
6957
6957
|
let n = node;
|
|
6958
6958
|
let consumedByGlyphs = false;
|
|
@@ -6972,7 +6972,7 @@ var PixodeskAnimatorReact = (() => {
|
|
|
6972
6972
|
if (!consumedByGlyphs) n = applyTextPathEffect(n, textPath, ctx);
|
|
6973
6973
|
n = applyFillGradientEffect(n, fillGradient, ctx);
|
|
6974
6974
|
n = applyStrokeGradientEffect(n, strokeGradient, ctx);
|
|
6975
|
-
n =
|
|
6975
|
+
n = applyStrokeTrimEffect(n, strokeTrim, ctx);
|
|
6976
6976
|
n = applyRepeaterEffect(n, repeater, ctx);
|
|
6977
6977
|
n = applyMaskedByEffect(n, maskedBy, transformBy, ctx);
|
|
6978
6978
|
n = applyClipPathEffect(n, clipPath, ctx);
|