@pixodesk/svg-animator-web 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 CHANGED
@@ -1045,7 +1045,7 @@ var PixodeskAnimator = (() => {
1045
1045
  auto: "auto",
1046
1046
  exact: "exact"
1047
1047
  };
1048
- var PxTrimSubPaths = {
1048
+ var PxStrokeTrimSubPaths = {
1049
1049
  separate: "separate",
1050
1050
  combined: "combined"
1051
1051
  };
@@ -1285,10 +1285,10 @@ var PixodeskAnimator = (() => {
1285
1285
  d: PxAnimatableStringSchema.optional(),
1286
1286
  animate: PxPropertyAnimationSchema.optional()
1287
1287
  }));
1288
- var PxTrimPathEffectSchema = implementsInterface()(px.object({
1288
+ var PxStrokeTrimEffectSchema = implementsInterface()(px.object({
1289
1289
  offset: PxAnimatableNumberSchema.optional(),
1290
1290
  range: PxAnimatableVec2Schema.optional(),
1291
- subPaths: px.enum([PxTrimSubPaths.separate, PxTrimSubPaths.combined]).optional()
1291
+ subPaths: px.enum([PxStrokeTrimSubPaths.separate, PxStrokeTrimSubPaths.combined]).optional()
1292
1292
  }));
1293
1293
  var PxRetimeEffectSchema = implementsInterface()(px.object({
1294
1294
  sourceId: px.string().optional(),
@@ -1342,7 +1342,7 @@ var PixodeskAnimator = (() => {
1342
1342
  repeater: PxRepeaterEffectSchema.optional(),
1343
1343
  maskedBy: PxMaskedByEffectSchema.optional(),
1344
1344
  clipPath: PxClipPathEffectSchema.optional(),
1345
- trimPath: PxTrimPathEffectSchema.optional(),
1345
+ strokeTrim: PxStrokeTrimEffectSchema.optional(),
1346
1346
  clone: PxCloneEffectSchema.optional(),
1347
1347
  fillGradient: PxFillGradientEffectSchema.optional(),
1348
1348
  strokeGradient: PxStrokeGradientEffectSchema.optional(),
@@ -4878,10 +4878,10 @@ var PixodeskAnimator = (() => {
4878
4878
  return materialiseGlyphTextAlongPath(node, pathD, startOffset, { glyphs: ctx.glyphs, warnings: ctx.warnings }, textLength, pathOverflow);
4879
4879
  }
4880
4880
 
4881
- // ../svg-animator-core/src/effects/trimPathEffect.ts
4882
- function applyTrimPathEffect(node, trimPath, ctx) {
4883
- if (!trimPath) return node;
4884
- const combined = trimPath.subPaths === PxTrimSubPaths.combined;
4881
+ // ../svg-animator-core/src/effects/strokeTrimEffect.ts
4882
+ function applyStrokeTrimEffect(node, strokeTrim, ctx) {
4883
+ if (!strokeTrim) return node;
4884
+ const combined = strokeTrim.subPaths === PxStrokeTrimSubPaths.combined;
4885
4885
  const leafEntries = [];
4886
4886
  const measure = (n) => {
4887
4887
  if (Array.isArray(n.children) && n.children.length > 0) {
@@ -4912,9 +4912,9 @@ var PixodeskAnimator = (() => {
4912
4912
  }
4913
4913
  const chainLengthPx = acc;
4914
4914
  if (combined && chainLengthPx < 1e-3) return node;
4915
- const offsetReadRaw = readAnimatable(trimPath.offset);
4915
+ const offsetReadRaw = readAnimatable(strokeTrim.offset);
4916
4916
  const offsetRead = offsetReadRaw.kind === "absent" /* Absent */ ? { kind: "static" /* Static */, value: 0 } : offsetReadRaw;
4917
- const rangeReadRaw = readRangeWithCrossings(trimPath.range);
4917
+ const rangeReadRaw = readRangeWithCrossings(strokeTrim.range);
4918
4918
  const rangeRead = rangeReadRaw.kind === "absent" /* Absent */ ? { kind: "static" /* Static */, value: [0, 1] } : rangeReadRaw;
4919
4919
  const offsetValues = readScalarValues(offsetRead);
4920
4920
  const minOffset = offsetValues.length ? Math.min(...offsetValues) : 0;
@@ -5246,7 +5246,7 @@ var PixodeskAnimator = (() => {
5246
5246
  const originalId = typeof node.id === "string" ? node.id : void 0;
5247
5247
  const innerIdForContentRef = originalId ? ctx.contentRefInnerIds.get(originalId) : void 0;
5248
5248
  if (!fx && !innerIdForContentRef) return node;
5249
- const { transformBy, repeater, maskedBy, clipPath, trimPath, clone: cloneFx, fillGradient, strokeGradient, textPath, text } = fx != null ? fx : {};
5249
+ const { transformBy, repeater, maskedBy, clipPath, strokeTrim, clone: cloneFx, fillGradient, strokeGradient, textPath, text } = fx != null ? fx : {};
5250
5250
  if (fx) delete node.effects;
5251
5251
  let n = node;
5252
5252
  let consumedByGlyphs = false;
@@ -5266,7 +5266,7 @@ var PixodeskAnimator = (() => {
5266
5266
  if (!consumedByGlyphs) n = applyTextPathEffect(n, textPath, ctx);
5267
5267
  n = applyFillGradientEffect(n, fillGradient, ctx);
5268
5268
  n = applyStrokeGradientEffect(n, strokeGradient, ctx);
5269
- n = applyTrimPathEffect(n, trimPath, ctx);
5269
+ n = applyStrokeTrimEffect(n, strokeTrim, ctx);
5270
5270
  n = applyRepeaterEffect(n, repeater, ctx);
5271
5271
  n = applyMaskedByEffect(n, maskedBy, transformBy, ctx);
5272
5272
  n = applyClipPathEffect(n, clipPath, ctx);