@pixodesk/svg-animator-web 1.0.18 → 1.0.19

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.d.cts CHANGED
@@ -270,6 +270,11 @@ declare const PxLoopSchema: PxSchema<{} & {
270
270
  alternate: PxSchema<boolean | undefined, true>;
271
271
  };
272
272
  };
273
+ /**
274
+ * Defines how a property's keyframe animation is extended beyond its defined keyframe range
275
+ * by continuously repeating a chosen segment of the sequence.
276
+ */
277
+ type PxLoop = PxInfer<typeof PxLoopSchema>;
273
278
  declare const PxPropertyAnimationSchema: PxSchema<{} & {
274
279
  keyframes?: ({} & {
275
280
  time?: number | undefined;
@@ -1824,9 +1829,10 @@ declare const PxStrokeGradientEffectSchema: PxSchema<{
1824
1829
  };
1825
1830
  };
1826
1831
  type PxStrokeGradientEffect = PxFillGradientEffect;
1827
- declare const PxTextAlongPathEffectSchema: PxSchema<{
1828
- href: string;
1832
+ declare const PxTextPathEffectSchema: PxSchema<{
1833
+ path: string;
1829
1834
  } & {
1835
+ pathOverflow?: string | undefined;
1830
1836
  lengthAdjust?: string | undefined;
1831
1837
  method?: string | undefined;
1832
1838
  spacing?: string | undefined;
@@ -1870,7 +1876,8 @@ declare const PxTextAlongPathEffectSchema: PxSchema<{
1870
1876
  }) | undefined;
1871
1877
  }, false> & {
1872
1878
  readonly _shape: {
1873
- href: PxSchema<string, false>;
1879
+ path: PxSchema<string, false>;
1880
+ pathOverflow: PxSchema<string | undefined, true>;
1874
1881
  lengthAdjust: PxSchema<string | undefined, true>;
1875
1882
  method: PxSchema<string | undefined, true>;
1876
1883
  spacing: PxSchema<string | undefined, true>;
@@ -1914,7 +1921,7 @@ declare const PxTextAlongPathEffectSchema: PxSchema<{
1914
1921
  }) | undefined, true>;
1915
1922
  };
1916
1923
  };
1917
- type PxTextAlongPathEffect = PxInfer<typeof PxTextAlongPathEffectSchema>;
1924
+ type PxTextPathEffect = PxInfer<typeof PxTextPathEffectSchema>;
1918
1925
  declare const PxTextEffectSchema: PxSchema<{} & {
1919
1926
  useGlyphs?: boolean | undefined;
1920
1927
  }, false> & {
@@ -2227,9 +2234,10 @@ declare const PxEffectsSchema: PxSchema<{} & {
2227
2234
  spreadMethod?: string | undefined;
2228
2235
  gradientTransform?: string | undefined;
2229
2236
  }) | undefined;
2230
- textAlongPath?: ({
2231
- href: string;
2237
+ textPath?: ({
2238
+ path: string;
2232
2239
  } & {
2240
+ pathOverflow?: string | undefined;
2233
2241
  lengthAdjust?: string | undefined;
2234
2242
  method?: string | undefined;
2235
2243
  spacing?: string | undefined;
@@ -2581,9 +2589,10 @@ declare const PxEffectsSchema: PxSchema<{} & {
2581
2589
  spreadMethod?: string | undefined;
2582
2590
  gradientTransform?: string | undefined;
2583
2591
  }) | undefined, true>;
2584
- textAlongPath: PxSchema<({
2585
- href: string;
2592
+ textPath: PxSchema<({
2593
+ path: string;
2586
2594
  } & {
2595
+ pathOverflow?: string | undefined;
2587
2596
  lengthAdjust?: string | undefined;
2588
2597
  method?: string | undefined;
2589
2598
  spacing?: string | undefined;
@@ -2960,9 +2969,10 @@ declare const PxNodeBase: PxSchema<{
2960
2969
  spreadMethod?: string | undefined;
2961
2970
  gradientTransform?: string | undefined;
2962
2971
  }) | undefined;
2963
- textAlongPath?: ({
2964
- href: string;
2972
+ textPath?: ({
2973
+ path: string;
2965
2974
  } & {
2975
+ pathOverflow?: string | undefined;
2966
2976
  lengthAdjust?: string | undefined;
2967
2977
  method?: string | undefined;
2968
2978
  spacing?: string | undefined;
@@ -3389,9 +3399,10 @@ declare const PxNodeBase: PxSchema<{
3389
3399
  spreadMethod?: string | undefined;
3390
3400
  gradientTransform?: string | undefined;
3391
3401
  }) | undefined;
3392
- textAlongPath?: ({
3393
- href: string;
3402
+ textPath?: ({
3403
+ path: string;
3394
3404
  } & {
3405
+ pathOverflow?: string | undefined;
3395
3406
  lengthAdjust?: string | undefined;
3396
3407
  method?: string | undefined;
3397
3408
  spacing?: string | undefined;
@@ -4259,9 +4270,10 @@ declare const PxAnimatedSvgDocumentSchema: PxSchema<{
4259
4270
  spreadMethod?: string | undefined;
4260
4271
  gradientTransform?: string | undefined;
4261
4272
  }) | undefined;
4262
- textAlongPath?: ({
4263
- href: string;
4273
+ textPath?: ({
4274
+ path: string;
4264
4275
  } & {
4276
+ pathOverflow?: string | undefined;
4265
4277
  lengthAdjust?: string | undefined;
4266
4278
  method?: string | undefined;
4267
4279
  spacing?: string | undefined;
@@ -4823,9 +4835,10 @@ declare const PxAnimatedSvgDocumentSchema: PxSchema<{
4823
4835
  spreadMethod?: string | undefined;
4824
4836
  gradientTransform?: string | undefined;
4825
4837
  }) | undefined;
4826
- textAlongPath?: ({
4827
- href: string;
4838
+ textPath?: ({
4839
+ path: string;
4828
4840
  } & {
4841
+ pathOverflow?: string | undefined;
4829
4842
  lengthAdjust?: string | undefined;
4830
4843
  method?: string | undefined;
4831
4844
  spacing?: string | undefined;
@@ -5319,7 +5332,7 @@ interface GlyphMaterialiseOpts<E = any> {
5319
5332
  warnings?: Array<string>;
5320
5333
  }
5321
5334
  declare function materialiseGlyphTextHorizontal<E = any>(node: PxNode, opts: GlyphMaterialiseOpts<E>): E;
5322
- declare function materialiseGlyphTextAlongPath<E = any>(node: PxNode, pathD: string | undefined, startOffset: PxAnimatable<number> | undefined, opts: GlyphMaterialiseOpts<E>, textLength?: number): E | null;
5335
+ declare function materialiseGlyphTextAlongPath<E = any>(node: PxNode, pathD: string | undefined, startOffset: PxAnimatable<number> | undefined, opts: GlyphMaterialiseOpts<E>, textLength?: number, pathOverflow?: string): E | null;
5323
5336
  /** Single entry the EDITOR calls: materialises a glyph `<text>` node into the
5324
5337
  * factory's element type, choosing along-path when `alongPath` is given. */
5325
5338
  declare function materialiseGlyphText<E = any>(node: PxNode, opts: GlyphMaterialiseOpts<E> & {
@@ -5327,9 +5340,38 @@ declare function materialiseGlyphText<E = any>(node: PxNode, opts: GlyphMaterial
5327
5340
  pathD?: string;
5328
5341
  startOffset?: PxAnimatable<number>;
5329
5342
  textLength?: number;
5343
+ pathOverflow?: string;
5330
5344
  };
5331
5345
  }): E | null;
5332
5346
 
5347
+ /** Inputs for {@link extendedPathForBrowser}. `advance` = the text run-width used to
5348
+ * size the end extension (caller-measured; the player estimates it from the node,
5349
+ * the editor from its text model — browser fonts have no glyph metrics available). */
5350
+ interface ExtendPathOpts {
5351
+ pathOverflow?: string;
5352
+ startOffset?: PxAnimatable<number>;
5353
+ textLength?: PxAnimatable<number>;
5354
+ advance?: number;
5355
+ }
5356
+ /** Result of {@link extendedPathForBrowser}: the (possibly) extended `d`, plus
5357
+ * `startShift` — the length of the prepended START lead-in. Because that lead-in
5358
+ * moves the `<textPath>` origin back by `startShift`, EVERY `startOffset` (all
5359
+ * keyframes) MUST be shifted by `+startShift` so the text lands where it would on
5360
+ * the un-extended path (`extend` only adds a tail, it must never move the text). */
5361
+ interface ExtendedPath {
5362
+ d: string;
5363
+ startShift: number;
5364
+ }
5365
+ /** Shift a `PxAnimatable<number>` by a constant (all keyframes). No-op for `0`. */
5366
+ declare function shiftAnimatable(v: PxAnimatable<number> | undefined, by: number): PxAnimatable<number> | undefined;
5367
+ /** For `pathOverflow:'extend'` (browser-font): extend an OPEN path along its endpoint
5368
+ * tangents so the browser lays overflow glyphs onto the straight extension (matching
5369
+ * glyph-mode's tangent behavior) instead of dropping them. `'clip'`/closed paths are
5370
+ * returned unchanged (browser clips natively). Shared by the player's browser-font
5371
+ * applier and the editor's live/heavy `<textPath>` def mint (single source of truth).
5372
+ * Returns the extended `d` AND `startShift` — see {@link ExtendedPath}. */
5373
+ declare function extendedPathForBrowser(pathD: string, opts: ExtendPathOpts): ExtendedPath;
5374
+
5333
5375
  /**
5334
5376
  * Creates an animator instance that uses the native Web Animations API.
5335
5377
  *
@@ -5381,4 +5423,4 @@ interface EffectDiff {
5381
5423
  */
5382
5424
  declare function diffInEffect(a: VmNode, b: VmNode): Array<EffectDiff>;
5383
5425
 
5384
- export { type ApplyResult, COLOUR_ATTR_NAMES, type FillMode, type GlyphMaterialiseOpts, type JsMode, type KeysMatch, type MaterialiseAllOptions, type MotionPathMaterialisationOptions, type MotionPathSample, type OutAction, PX_ANIMATOR_DATA_KEY, PX_ANIM_ATTR_NAME, PX_ANIM_SRC_ATTR_NAME, PX_TRANSFORM_PART_KEYS, type PlaybackDirection, type PxAnimatable, type PxAnimatedSvgDocument, PxAnimatedSvgDocumentSchema, type PxAnimationDefinition, PxAnimationDefinitionSchema, type PxAnimatorAPI, type PxAnimatorCallbacksConfig, type PxAnimatorConfig, PxAnimatorConfigSchema, PxAnimatorEngine, PxAnimatorMode, type PxAnimatorOptions, type PxAttrValue, PxAttrValueSchema, type PxBezierPath, PxBezierPathSchema, type PxBinding, PxBindingSchema, type PxCloneEffect, PxCloneEffectSchema, type PxCreateElement, type PxDefs, PxDefsSchema, PxEasingOrRefSchema, type PxEffects, PxEffectsSchema, type PxElementAnimation, PxElementAnimationSchema, type PxFillGradientEffect, PxFillGradientEffectSchema, type PxGlyph, type PxGlyphFont, PxGradientSpreadMethod, type PxGradientStop, PxGradientStopSchema, PxGradientType, PxGradientUnits, type PxInfer, type PxKeyframe, PxKeyframeSchema, PxLoopSchema, type PxMaskedByEffect, PxMaskedByEffectSchema, type PxNode, PxNodeBase, PxNodeSchema, type PxPlatformAdapter, type PxPropertyAnimation, PxPropertyAnimationSchema, type PxRepeaterEffect, PxRepeaterEffectSchema, type PxRetimeEffect, PxRetimeEffectSchema, type PxSchema, type PxSchemaDesc, type PxStrokeGradientEffect, PxStrokeGradientEffectSchema, type PxSvgNode, PxSvgNodeExtra, type PxTextAlongPathEffect, PxTextAlongPathEffectSchema, PxTextEffectSchema, type PxTransformPartKey, type PxTransformParts, PxTransformPartsSchema, type PxTransformValue, PxTransformValueSchema, type PxTransformationEffect, PxTransformationEffectSchema, type PxTrigger, PxTriggerSchema, type PxTrimPathEffect, PxTrimPathEffectSchema, type PxValidationContext, type PxValidationResult, type RemoveIndex, STYLE_ATTR_NAMES, type StartOn, TRANSFORM_FN_NAMES, type Vec2, applyPlayerEffects, calcAnimationValues, camelCaseToKebabWordIfNeeded, collectSampleTimes, createAnimator, createAnimatorImpl, createBasicFrameLoopAnimator, createFrameLoopAnimator, createWebApiAnimator, describeSchema, diffInEffect, evaluateMotionPathSegment, generateNewIds, getAnimatorConfig, getBindings, getChildren, getDefs, getNormalizedProps, isPxElementFileFormat, isPxElementFileFormatDeep, jsonElementFactory, loadTagAnimators, materialiseAllInTree, materialiseAnimatedUseInstances, materialiseGlyphText, materialiseGlyphTextAlongPath, materialiseGlyphTextHorizontal, materialiseInternalLoopsInPropAnim, materialiseInternalLoopsInTree, materialiseMotionPathInPropAnim, materialiseMotionPathsInTree, getNormalisedBindings as normalizeDocument, propAnimIsMotionPath, px, renderNode, schemaKeys, setupAnimationTriggers, toRGBA, validateNodeEffects, visualModelAt };
5426
+ export { type ApplyResult, COLOUR_ATTR_NAMES, type ExtendPathOpts, type ExtendedPath, type FillMode, type GlyphMaterialiseOpts, type JsMode, type KeysMatch, type MaterialiseAllOptions, type MotionPathMaterialisationOptions, type MotionPathSample, type OutAction, PX_ANIMATOR_DATA_KEY, PX_ANIM_ATTR_NAME, PX_ANIM_SRC_ATTR_NAME, PX_TRANSFORM_PART_KEYS, type PlaybackDirection, type PxAnimatable, type PxAnimatedSvgDocument, PxAnimatedSvgDocumentSchema, type PxAnimationDefinition, PxAnimationDefinitionSchema, type PxAnimatorAPI, type PxAnimatorCallbacksConfig, type PxAnimatorConfig, PxAnimatorConfigSchema, PxAnimatorEngine, PxAnimatorMode, type PxAnimatorOptions, type PxAttrValue, PxAttrValueSchema, type PxBezierPath, PxBezierPathSchema, type PxBinding, PxBindingSchema, type PxCloneEffect, PxCloneEffectSchema, type PxCreateElement, type PxDefs, PxDefsSchema, PxEasingOrRefSchema, type PxEffects, PxEffectsSchema, type PxElementAnimation, PxElementAnimationSchema, type PxFillGradientEffect, PxFillGradientEffectSchema, type PxGlyph, type PxGlyphFont, PxGradientSpreadMethod, type PxGradientStop, PxGradientStopSchema, PxGradientType, PxGradientUnits, type PxInfer, type PxKeyframe, PxKeyframeSchema, type PxLoop, PxLoopSchema, type PxMaskedByEffect, PxMaskedByEffectSchema, type PxNode, PxNodeBase, PxNodeSchema, type PxPlatformAdapter, type PxPropertyAnimation, PxPropertyAnimationSchema, type PxRepeaterEffect, PxRepeaterEffectSchema, type PxRetimeEffect, PxRetimeEffectSchema, type PxSchema, type PxSchemaDesc, type PxStrokeGradientEffect, PxStrokeGradientEffectSchema, type PxSvgNode, PxSvgNodeExtra, PxTextEffectSchema, type PxTextPathEffect, PxTextPathEffectSchema, type PxTransformPartKey, type PxTransformParts, PxTransformPartsSchema, type PxTransformValue, PxTransformValueSchema, type PxTransformationEffect, PxTransformationEffectSchema, type PxTrigger, PxTriggerSchema, type PxTrimPathEffect, PxTrimPathEffectSchema, type PxValidationContext, type PxValidationResult, type RemoveIndex, STYLE_ATTR_NAMES, type StartOn, TRANSFORM_FN_NAMES, type Vec2, applyPlayerEffects, calcAnimationValues, camelCaseToKebabWordIfNeeded, collectSampleTimes, createAnimator, createAnimatorImpl, createBasicFrameLoopAnimator, createFrameLoopAnimator, createWebApiAnimator, describeSchema, diffInEffect, evaluateMotionPathSegment, extendedPathForBrowser, generateNewIds, getAnimatorConfig, getBindings, getChildren, getDefs, getNormalizedProps, isPxElementFileFormat, isPxElementFileFormatDeep, jsonElementFactory, loadTagAnimators, materialiseAllInTree, materialiseAnimatedUseInstances, materialiseGlyphText, materialiseGlyphTextAlongPath, materialiseGlyphTextHorizontal, materialiseInternalLoopsInPropAnim, materialiseInternalLoopsInTree, materialiseMotionPathInPropAnim, materialiseMotionPathsInTree, getNormalisedBindings as normalizeDocument, propAnimIsMotionPath, px, renderNode, schemaKeys, setupAnimationTriggers, shiftAnimatable, toRGBA, validateNodeEffects, visualModelAt };
package/dist/index.d.ts CHANGED
@@ -270,6 +270,11 @@ declare const PxLoopSchema: PxSchema<{} & {
270
270
  alternate: PxSchema<boolean | undefined, true>;
271
271
  };
272
272
  };
273
+ /**
274
+ * Defines how a property's keyframe animation is extended beyond its defined keyframe range
275
+ * by continuously repeating a chosen segment of the sequence.
276
+ */
277
+ type PxLoop = PxInfer<typeof PxLoopSchema>;
273
278
  declare const PxPropertyAnimationSchema: PxSchema<{} & {
274
279
  keyframes?: ({} & {
275
280
  time?: number | undefined;
@@ -1824,9 +1829,10 @@ declare const PxStrokeGradientEffectSchema: PxSchema<{
1824
1829
  };
1825
1830
  };
1826
1831
  type PxStrokeGradientEffect = PxFillGradientEffect;
1827
- declare const PxTextAlongPathEffectSchema: PxSchema<{
1828
- href: string;
1832
+ declare const PxTextPathEffectSchema: PxSchema<{
1833
+ path: string;
1829
1834
  } & {
1835
+ pathOverflow?: string | undefined;
1830
1836
  lengthAdjust?: string | undefined;
1831
1837
  method?: string | undefined;
1832
1838
  spacing?: string | undefined;
@@ -1870,7 +1876,8 @@ declare const PxTextAlongPathEffectSchema: PxSchema<{
1870
1876
  }) | undefined;
1871
1877
  }, false> & {
1872
1878
  readonly _shape: {
1873
- href: PxSchema<string, false>;
1879
+ path: PxSchema<string, false>;
1880
+ pathOverflow: PxSchema<string | undefined, true>;
1874
1881
  lengthAdjust: PxSchema<string | undefined, true>;
1875
1882
  method: PxSchema<string | undefined, true>;
1876
1883
  spacing: PxSchema<string | undefined, true>;
@@ -1914,7 +1921,7 @@ declare const PxTextAlongPathEffectSchema: PxSchema<{
1914
1921
  }) | undefined, true>;
1915
1922
  };
1916
1923
  };
1917
- type PxTextAlongPathEffect = PxInfer<typeof PxTextAlongPathEffectSchema>;
1924
+ type PxTextPathEffect = PxInfer<typeof PxTextPathEffectSchema>;
1918
1925
  declare const PxTextEffectSchema: PxSchema<{} & {
1919
1926
  useGlyphs?: boolean | undefined;
1920
1927
  }, false> & {
@@ -2227,9 +2234,10 @@ declare const PxEffectsSchema: PxSchema<{} & {
2227
2234
  spreadMethod?: string | undefined;
2228
2235
  gradientTransform?: string | undefined;
2229
2236
  }) | undefined;
2230
- textAlongPath?: ({
2231
- href: string;
2237
+ textPath?: ({
2238
+ path: string;
2232
2239
  } & {
2240
+ pathOverflow?: string | undefined;
2233
2241
  lengthAdjust?: string | undefined;
2234
2242
  method?: string | undefined;
2235
2243
  spacing?: string | undefined;
@@ -2581,9 +2589,10 @@ declare const PxEffectsSchema: PxSchema<{} & {
2581
2589
  spreadMethod?: string | undefined;
2582
2590
  gradientTransform?: string | undefined;
2583
2591
  }) | undefined, true>;
2584
- textAlongPath: PxSchema<({
2585
- href: string;
2592
+ textPath: PxSchema<({
2593
+ path: string;
2586
2594
  } & {
2595
+ pathOverflow?: string | undefined;
2587
2596
  lengthAdjust?: string | undefined;
2588
2597
  method?: string | undefined;
2589
2598
  spacing?: string | undefined;
@@ -2960,9 +2969,10 @@ declare const PxNodeBase: PxSchema<{
2960
2969
  spreadMethod?: string | undefined;
2961
2970
  gradientTransform?: string | undefined;
2962
2971
  }) | undefined;
2963
- textAlongPath?: ({
2964
- href: string;
2972
+ textPath?: ({
2973
+ path: string;
2965
2974
  } & {
2975
+ pathOverflow?: string | undefined;
2966
2976
  lengthAdjust?: string | undefined;
2967
2977
  method?: string | undefined;
2968
2978
  spacing?: string | undefined;
@@ -3389,9 +3399,10 @@ declare const PxNodeBase: PxSchema<{
3389
3399
  spreadMethod?: string | undefined;
3390
3400
  gradientTransform?: string | undefined;
3391
3401
  }) | undefined;
3392
- textAlongPath?: ({
3393
- href: string;
3402
+ textPath?: ({
3403
+ path: string;
3394
3404
  } & {
3405
+ pathOverflow?: string | undefined;
3395
3406
  lengthAdjust?: string | undefined;
3396
3407
  method?: string | undefined;
3397
3408
  spacing?: string | undefined;
@@ -4259,9 +4270,10 @@ declare const PxAnimatedSvgDocumentSchema: PxSchema<{
4259
4270
  spreadMethod?: string | undefined;
4260
4271
  gradientTransform?: string | undefined;
4261
4272
  }) | undefined;
4262
- textAlongPath?: ({
4263
- href: string;
4273
+ textPath?: ({
4274
+ path: string;
4264
4275
  } & {
4276
+ pathOverflow?: string | undefined;
4265
4277
  lengthAdjust?: string | undefined;
4266
4278
  method?: string | undefined;
4267
4279
  spacing?: string | undefined;
@@ -4823,9 +4835,10 @@ declare const PxAnimatedSvgDocumentSchema: PxSchema<{
4823
4835
  spreadMethod?: string | undefined;
4824
4836
  gradientTransform?: string | undefined;
4825
4837
  }) | undefined;
4826
- textAlongPath?: ({
4827
- href: string;
4838
+ textPath?: ({
4839
+ path: string;
4828
4840
  } & {
4841
+ pathOverflow?: string | undefined;
4829
4842
  lengthAdjust?: string | undefined;
4830
4843
  method?: string | undefined;
4831
4844
  spacing?: string | undefined;
@@ -5319,7 +5332,7 @@ interface GlyphMaterialiseOpts<E = any> {
5319
5332
  warnings?: Array<string>;
5320
5333
  }
5321
5334
  declare function materialiseGlyphTextHorizontal<E = any>(node: PxNode, opts: GlyphMaterialiseOpts<E>): E;
5322
- declare function materialiseGlyphTextAlongPath<E = any>(node: PxNode, pathD: string | undefined, startOffset: PxAnimatable<number> | undefined, opts: GlyphMaterialiseOpts<E>, textLength?: number): E | null;
5335
+ declare function materialiseGlyphTextAlongPath<E = any>(node: PxNode, pathD: string | undefined, startOffset: PxAnimatable<number> | undefined, opts: GlyphMaterialiseOpts<E>, textLength?: number, pathOverflow?: string): E | null;
5323
5336
  /** Single entry the EDITOR calls: materialises a glyph `<text>` node into the
5324
5337
  * factory's element type, choosing along-path when `alongPath` is given. */
5325
5338
  declare function materialiseGlyphText<E = any>(node: PxNode, opts: GlyphMaterialiseOpts<E> & {
@@ -5327,9 +5340,38 @@ declare function materialiseGlyphText<E = any>(node: PxNode, opts: GlyphMaterial
5327
5340
  pathD?: string;
5328
5341
  startOffset?: PxAnimatable<number>;
5329
5342
  textLength?: number;
5343
+ pathOverflow?: string;
5330
5344
  };
5331
5345
  }): E | null;
5332
5346
 
5347
+ /** Inputs for {@link extendedPathForBrowser}. `advance` = the text run-width used to
5348
+ * size the end extension (caller-measured; the player estimates it from the node,
5349
+ * the editor from its text model — browser fonts have no glyph metrics available). */
5350
+ interface ExtendPathOpts {
5351
+ pathOverflow?: string;
5352
+ startOffset?: PxAnimatable<number>;
5353
+ textLength?: PxAnimatable<number>;
5354
+ advance?: number;
5355
+ }
5356
+ /** Result of {@link extendedPathForBrowser}: the (possibly) extended `d`, plus
5357
+ * `startShift` — the length of the prepended START lead-in. Because that lead-in
5358
+ * moves the `<textPath>` origin back by `startShift`, EVERY `startOffset` (all
5359
+ * keyframes) MUST be shifted by `+startShift` so the text lands where it would on
5360
+ * the un-extended path (`extend` only adds a tail, it must never move the text). */
5361
+ interface ExtendedPath {
5362
+ d: string;
5363
+ startShift: number;
5364
+ }
5365
+ /** Shift a `PxAnimatable<number>` by a constant (all keyframes). No-op for `0`. */
5366
+ declare function shiftAnimatable(v: PxAnimatable<number> | undefined, by: number): PxAnimatable<number> | undefined;
5367
+ /** For `pathOverflow:'extend'` (browser-font): extend an OPEN path along its endpoint
5368
+ * tangents so the browser lays overflow glyphs onto the straight extension (matching
5369
+ * glyph-mode's tangent behavior) instead of dropping them. `'clip'`/closed paths are
5370
+ * returned unchanged (browser clips natively). Shared by the player's browser-font
5371
+ * applier and the editor's live/heavy `<textPath>` def mint (single source of truth).
5372
+ * Returns the extended `d` AND `startShift` — see {@link ExtendedPath}. */
5373
+ declare function extendedPathForBrowser(pathD: string, opts: ExtendPathOpts): ExtendedPath;
5374
+
5333
5375
  /**
5334
5376
  * Creates an animator instance that uses the native Web Animations API.
5335
5377
  *
@@ -5381,4 +5423,4 @@ interface EffectDiff {
5381
5423
  */
5382
5424
  declare function diffInEffect(a: VmNode, b: VmNode): Array<EffectDiff>;
5383
5425
 
5384
- export { type ApplyResult, COLOUR_ATTR_NAMES, type FillMode, type GlyphMaterialiseOpts, type JsMode, type KeysMatch, type MaterialiseAllOptions, type MotionPathMaterialisationOptions, type MotionPathSample, type OutAction, PX_ANIMATOR_DATA_KEY, PX_ANIM_ATTR_NAME, PX_ANIM_SRC_ATTR_NAME, PX_TRANSFORM_PART_KEYS, type PlaybackDirection, type PxAnimatable, type PxAnimatedSvgDocument, PxAnimatedSvgDocumentSchema, type PxAnimationDefinition, PxAnimationDefinitionSchema, type PxAnimatorAPI, type PxAnimatorCallbacksConfig, type PxAnimatorConfig, PxAnimatorConfigSchema, PxAnimatorEngine, PxAnimatorMode, type PxAnimatorOptions, type PxAttrValue, PxAttrValueSchema, type PxBezierPath, PxBezierPathSchema, type PxBinding, PxBindingSchema, type PxCloneEffect, PxCloneEffectSchema, type PxCreateElement, type PxDefs, PxDefsSchema, PxEasingOrRefSchema, type PxEffects, PxEffectsSchema, type PxElementAnimation, PxElementAnimationSchema, type PxFillGradientEffect, PxFillGradientEffectSchema, type PxGlyph, type PxGlyphFont, PxGradientSpreadMethod, type PxGradientStop, PxGradientStopSchema, PxGradientType, PxGradientUnits, type PxInfer, type PxKeyframe, PxKeyframeSchema, PxLoopSchema, type PxMaskedByEffect, PxMaskedByEffectSchema, type PxNode, PxNodeBase, PxNodeSchema, type PxPlatformAdapter, type PxPropertyAnimation, PxPropertyAnimationSchema, type PxRepeaterEffect, PxRepeaterEffectSchema, type PxRetimeEffect, PxRetimeEffectSchema, type PxSchema, type PxSchemaDesc, type PxStrokeGradientEffect, PxStrokeGradientEffectSchema, type PxSvgNode, PxSvgNodeExtra, type PxTextAlongPathEffect, PxTextAlongPathEffectSchema, PxTextEffectSchema, type PxTransformPartKey, type PxTransformParts, PxTransformPartsSchema, type PxTransformValue, PxTransformValueSchema, type PxTransformationEffect, PxTransformationEffectSchema, type PxTrigger, PxTriggerSchema, type PxTrimPathEffect, PxTrimPathEffectSchema, type PxValidationContext, type PxValidationResult, type RemoveIndex, STYLE_ATTR_NAMES, type StartOn, TRANSFORM_FN_NAMES, type Vec2, applyPlayerEffects, calcAnimationValues, camelCaseToKebabWordIfNeeded, collectSampleTimes, createAnimator, createAnimatorImpl, createBasicFrameLoopAnimator, createFrameLoopAnimator, createWebApiAnimator, describeSchema, diffInEffect, evaluateMotionPathSegment, generateNewIds, getAnimatorConfig, getBindings, getChildren, getDefs, getNormalizedProps, isPxElementFileFormat, isPxElementFileFormatDeep, jsonElementFactory, loadTagAnimators, materialiseAllInTree, materialiseAnimatedUseInstances, materialiseGlyphText, materialiseGlyphTextAlongPath, materialiseGlyphTextHorizontal, materialiseInternalLoopsInPropAnim, materialiseInternalLoopsInTree, materialiseMotionPathInPropAnim, materialiseMotionPathsInTree, getNormalisedBindings as normalizeDocument, propAnimIsMotionPath, px, renderNode, schemaKeys, setupAnimationTriggers, toRGBA, validateNodeEffects, visualModelAt };
5426
+ export { type ApplyResult, COLOUR_ATTR_NAMES, type ExtendPathOpts, type ExtendedPath, type FillMode, type GlyphMaterialiseOpts, type JsMode, type KeysMatch, type MaterialiseAllOptions, type MotionPathMaterialisationOptions, type MotionPathSample, type OutAction, PX_ANIMATOR_DATA_KEY, PX_ANIM_ATTR_NAME, PX_ANIM_SRC_ATTR_NAME, PX_TRANSFORM_PART_KEYS, type PlaybackDirection, type PxAnimatable, type PxAnimatedSvgDocument, PxAnimatedSvgDocumentSchema, type PxAnimationDefinition, PxAnimationDefinitionSchema, type PxAnimatorAPI, type PxAnimatorCallbacksConfig, type PxAnimatorConfig, PxAnimatorConfigSchema, PxAnimatorEngine, PxAnimatorMode, type PxAnimatorOptions, type PxAttrValue, PxAttrValueSchema, type PxBezierPath, PxBezierPathSchema, type PxBinding, PxBindingSchema, type PxCloneEffect, PxCloneEffectSchema, type PxCreateElement, type PxDefs, PxDefsSchema, PxEasingOrRefSchema, type PxEffects, PxEffectsSchema, type PxElementAnimation, PxElementAnimationSchema, type PxFillGradientEffect, PxFillGradientEffectSchema, type PxGlyph, type PxGlyphFont, PxGradientSpreadMethod, type PxGradientStop, PxGradientStopSchema, PxGradientType, PxGradientUnits, type PxInfer, type PxKeyframe, PxKeyframeSchema, type PxLoop, PxLoopSchema, type PxMaskedByEffect, PxMaskedByEffectSchema, type PxNode, PxNodeBase, PxNodeSchema, type PxPlatformAdapter, type PxPropertyAnimation, PxPropertyAnimationSchema, type PxRepeaterEffect, PxRepeaterEffectSchema, type PxRetimeEffect, PxRetimeEffectSchema, type PxSchema, type PxSchemaDesc, type PxStrokeGradientEffect, PxStrokeGradientEffectSchema, type PxSvgNode, PxSvgNodeExtra, PxTextEffectSchema, type PxTextPathEffect, PxTextPathEffectSchema, type PxTransformPartKey, type PxTransformParts, PxTransformPartsSchema, type PxTransformValue, PxTransformValueSchema, type PxTransformationEffect, PxTransformationEffectSchema, type PxTrigger, PxTriggerSchema, type PxTrimPathEffect, PxTrimPathEffectSchema, type PxValidationContext, type PxValidationResult, type RemoveIndex, STYLE_ATTR_NAMES, type StartOn, TRANSFORM_FN_NAMES, type Vec2, applyPlayerEffects, calcAnimationValues, camelCaseToKebabWordIfNeeded, collectSampleTimes, createAnimator, createAnimatorImpl, createBasicFrameLoopAnimator, createFrameLoopAnimator, createWebApiAnimator, describeSchema, diffInEffect, evaluateMotionPathSegment, extendedPathForBrowser, generateNewIds, getAnimatorConfig, getBindings, getChildren, getDefs, getNormalizedProps, isPxElementFileFormat, isPxElementFileFormatDeep, jsonElementFactory, loadTagAnimators, materialiseAllInTree, materialiseAnimatedUseInstances, materialiseGlyphText, materialiseGlyphTextAlongPath, materialiseGlyphTextHorizontal, materialiseInternalLoopsInPropAnim, materialiseInternalLoopsInTree, materialiseMotionPathInPropAnim, materialiseMotionPathsInTree, getNormalisedBindings as normalizeDocument, propAnimIsMotionPath, px, renderNode, schemaKeys, setupAnimationTriggers, shiftAnimatable, toRGBA, validateNodeEffects, visualModelAt };