@remotion/paths 4.0.84 → 4.0.86

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@remotion/paths",
3
- "version": "4.0.84",
3
+ "version": "4.0.86",
4
4
  "description": "Utility functions for SVG paths",
5
5
  "main": "dist/index.js",
6
6
  "sideEffects": false,
@@ -1,8 +0,0 @@
1
- import type { Constructed } from './helpers/construct';
2
- type SegmentAtLength = {
3
- index: number;
4
- fraction: number;
5
- };
6
- export declare const getInstructionIndexAtLengthFromConstructed: (constructed: Constructed, fractionLength: number) => SegmentAtLength;
7
- export declare const getInstructionIndexAtLength: (path: string, length: number) => SegmentAtLength;
8
- export {};
@@ -1,27 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getInstructionIndexAtLength = exports.getInstructionIndexAtLengthFromConstructed = void 0;
4
- const construct_1 = require("./helpers/construct");
5
- const getInstructionIndexAtLengthFromConstructed = (constructed, fractionLength) => {
6
- if (fractionLength < 0) {
7
- fractionLength = 0;
8
- }
9
- else if (fractionLength > constructed.length) {
10
- fractionLength = constructed.length;
11
- }
12
- let index = constructed.partialLengths.length - 1;
13
- while (constructed.partialLengths[index] >= fractionLength && index > 0) {
14
- index--;
15
- }
16
- index++;
17
- return {
18
- fraction: fractionLength - constructed.partialLengths[index - 1],
19
- index,
20
- };
21
- };
22
- exports.getInstructionIndexAtLengthFromConstructed = getInstructionIndexAtLengthFromConstructed;
23
- const getInstructionIndexAtLength = (path, length) => {
24
- const constructed = (0, construct_1.construct)(path);
25
- return (0, exports.getInstructionIndexAtLengthFromConstructed)(constructed, length);
26
- };
27
- exports.getInstructionIndexAtLength = getInstructionIndexAtLength;