@remotion/paths
Advanced tools
Comparing version 4.0.244 to 4.0.245
@@ -1,7 +0,1 @@ | ||
/** | ||
* @description Animates an SVG from being invisible to it's full length. | ||
* @param {string} path A valid SVG path | ||
* @param {number} progress The first valid SVG path | ||
* @see [Documentation](https://remotion.dev/docs/paths/evolve-path) | ||
*/ | ||
export declare const evolvePath: (progress: number, path: string) => { | ||
@@ -8,0 +2,0 @@ strokeDasharray: string; |
@@ -5,7 +5,5 @@ "use strict"; | ||
const get_length_1 = require("./get-length"); | ||
/** | ||
* @description Animates an SVG from being invisible to it's full length. | ||
* @param {string} path A valid SVG path | ||
* @param {number} progress The first valid SVG path | ||
* @see [Documentation](https://remotion.dev/docs/paths/evolve-path) | ||
/* | ||
* @description Animates an SVG path from being invisible to its full length. | ||
* @see [Documentation](https://www.remotion.dev/docs/paths/evolve-path) | ||
*/ | ||
@@ -12,0 +10,0 @@ const evolvePath = (progress, path) => { |
@@ -1,6 +0,1 @@ | ||
/** | ||
* @description Extends a viewbox in all directions by a scale factor. | ||
* @param {string} currentViewBox A valid SVG viewBox | ||
* @see [Documentation](https://remotion.dev/docs/paths/extend-viewbox) | ||
*/ | ||
export declare const extendViewBox: (currentViewBox: string, scale: number) => string; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.extendViewBox = void 0; | ||
/** | ||
* @description Extends a viewbox in all directions by a scale factor. | ||
* @param {string} currentViewBox A valid SVG viewBox | ||
* @see [Documentation](https://remotion.dev/docs/paths/extend-viewbox) | ||
/* | ||
* @description Widens an SVG viewBox in all directions by a certain scale factor. | ||
* @see [Documentation](https://www.remotion.dev/docs/paths/extend-viewbox) | ||
*/ | ||
@@ -9,0 +8,0 @@ const extendViewBox = (currentViewBox, scale) => { |
import type { BoundingBox, ReducedInstruction } from './helpers/types'; | ||
export declare const getBoundingBoxFromInstructions: (instructions: ReducedInstruction[]) => BoundingBox; | ||
/** | ||
* @description Returns the bounding box of the given path, suitable for calculating the viewBox value that you need to pass to an SVG. | ||
* @param {string} d | ||
* @see [Documentation](https://www.remotion.dev/docs/paths/get-bounding-box) | ||
*/ | ||
export declare const getBoundingBox: (d: string) => BoundingBox; |
@@ -156,5 +156,4 @@ "use strict"; | ||
exports.getBoundingBoxFromInstructions = getBoundingBoxFromInstructions; | ||
/** | ||
/* | ||
* @description Returns the bounding box of the given path, suitable for calculating the viewBox value that you need to pass to an SVG. | ||
* @param {string} d | ||
* @see [Documentation](https://www.remotion.dev/docs/paths/get-bounding-box) | ||
@@ -161,0 +160,0 @@ */ |
@@ -7,11 +7,3 @@ import type { Constructed } from './helpers/construct'; | ||
export declare const getInstructionIndexAtLengthFromConstructed: (constructed: Constructed, fractionLength: number) => InstructionAtLength; | ||
/** | ||
* @description Gets the index of the instruction and the part length into the instruction at a specified length along an SVG path. | ||
* @see [Documentation](https://remotion.dev/docs/paths/get-instruction-index-at-length) | ||
* @param path The SVG path data as a string. | ||
* @param length The length along the path at which to find the instruction index and the part length into the instruction. | ||
* @returns {InstructionAtLength} Object containing the index of the instruction and the part length into the instruction at the given length. | ||
* @throws {Error} If the given length is less than 0 or greater than the total length of the path, or if the path is invalid. | ||
*/ | ||
export declare const getInstructionIndexAtLength: (path: string, length: number) => InstructionAtLength; | ||
export {}; |
@@ -22,9 +22,5 @@ "use strict"; | ||
exports.getInstructionIndexAtLengthFromConstructed = getInstructionIndexAtLengthFromConstructed; | ||
/** | ||
/* | ||
* @description Gets the index of the instruction and the part length into the instruction at a specified length along an SVG path. | ||
* @see [Documentation](https://remotion.dev/docs/paths/get-instruction-index-at-length) | ||
* @param path The SVG path data as a string. | ||
* @param length The length along the path at which to find the instruction index and the part length into the instruction. | ||
* @returns {InstructionAtLength} Object containing the index of the instruction and the part length into the instruction at the given length. | ||
* @throws {Error} If the given length is less than 0 or greater than the total length of the path, or if the path is invalid. | ||
* @see [Documentation](https://www.remotion.dev/docs/paths/get-instruction-index-at-length) | ||
*/ | ||
@@ -31,0 +27,0 @@ const getInstructionIndexAtLength = (path, length) => { |
@@ -1,6 +0,1 @@ | ||
/** | ||
* @description Gets the length of an SVG path. | ||
* @param {string} path A valid SVG path | ||
* @see [Documentation](https://remotion.dev/docs/paths/get-length) | ||
*/ | ||
export declare const getLength: (path: string) => number; |
@@ -6,6 +6,5 @@ "use strict"; | ||
const construct_1 = require("./helpers/construct"); | ||
/** | ||
/* | ||
* @description Gets the length of an SVG path. | ||
* @param {string} path A valid SVG path | ||
* @see [Documentation](https://remotion.dev/docs/paths/get-length) | ||
* @see [Documentation](https://www.remotion.dev/docs/paths/get-length) | ||
*/ | ||
@@ -12,0 +11,0 @@ const getLength = (path) => { |
@@ -1,7 +0,1 @@ | ||
/** | ||
* @description Gets the coordinates of a point which is on an SVG path. | ||
* @param {string} path A valid SVG path | ||
* @param {number} length The length at which the point should be sampled | ||
* @see [Documentation](https://remotion.dev/docs/paths/get-point-at-length) | ||
*/ | ||
export declare const getPointAtLength: (path: string, length: number) => import("./helpers/types").Point; |
@@ -6,7 +6,5 @@ "use strict"; | ||
const construct_1 = require("./helpers/construct"); | ||
/** | ||
/* | ||
* @description Gets the coordinates of a point which is on an SVG path. | ||
* @param {string} path A valid SVG path | ||
* @param {number} length The length at which the point should be sampled | ||
* @see [Documentation](https://remotion.dev/docs/paths/get-point-at-length) | ||
* @see [Documentation](https://www.remotion.dev/docs/paths/get-point-at-length) | ||
*/ | ||
@@ -13,0 +11,0 @@ const getPointAtLength = (path, length) => { |
@@ -1,6 +0,1 @@ | ||
/** | ||
* @description Splits a valid SVG path into it's parts. | ||
* @param {string} path A valid SVG path | ||
* @see [Documentation](https://remotion.dev/docs/paths/get-subpaths) | ||
*/ | ||
export declare const getSubpaths: (path: string) => string[]; |
@@ -7,6 +7,5 @@ "use strict"; | ||
const serialize_instructions_1 = require("./serialize-instructions"); | ||
/** | ||
* @description Splits a valid SVG path into it's parts. | ||
* @param {string} path A valid SVG path | ||
* @see [Documentation](https://remotion.dev/docs/paths/get-subpaths) | ||
/* | ||
* @description Takes an SVG path and returns an array of subpaths, splitting the path by `M` and `m` statements. | ||
* @see [Documentation](https://www.remotion.dev/docs/paths/get-subpaths) | ||
*/ | ||
@@ -13,0 +12,0 @@ const getSubpaths = (path) => { |
@@ -1,7 +0,1 @@ | ||
/** | ||
* @description Gets tangent values x and y of a point which is on an SVG path | ||
* @param {string} path A valid SVG path | ||
* @param {number} length The length at which the tangent should be sampled | ||
* @see [Documentation](https://remotion.dev/docs/paths/get-tangent-at-length) | ||
*/ | ||
export declare const getTangentAtLength: (path: string, length: number) => import("./helpers/types").Point; |
@@ -6,7 +6,5 @@ "use strict"; | ||
const construct_1 = require("./helpers/construct"); | ||
/** | ||
* @description Gets tangent values x and y of a point which is on an SVG path | ||
* @param {string} path A valid SVG path | ||
* @param {number} length The length at which the tangent should be sampled | ||
* @see [Documentation](https://remotion.dev/docs/paths/get-tangent-at-length) | ||
/* | ||
* @description Gets tangent values x and y of a point which is on an SVG path. | ||
* @see [Documentation](https://www.remotion.dev/docs/paths/get-tangent-at-length) | ||
*/ | ||
@@ -13,0 +11,0 @@ const getTangentAtLength = (path, length) => { |
@@ -1,8 +0,1 @@ | ||
/** | ||
* @description Interpolates between two SVG paths. | ||
* @param {number} value A number - 0 means first path, 1 means second path, any other values will be interpolated | ||
* @param {string} firstPath The first valid SVG path | ||
* @param {string} secondPath The second valid SVG path | ||
* @see [Documentation](https://remotion.dev/docs/paths/interpolate-path) | ||
*/ | ||
export declare const interpolatePath: (value: number, firstPath: string, secondPath: string) => string; |
@@ -40,8 +40,5 @@ "use strict"; | ||
const interpolate_instructions_1 = require("./interpolate-instructions"); | ||
/** | ||
* @description Interpolates between two SVG paths. | ||
* @param {number} value A number - 0 means first path, 1 means second path, any other values will be interpolated | ||
* @param {string} firstPath The first valid SVG path | ||
* @param {string} secondPath The second valid SVG path | ||
* @see [Documentation](https://remotion.dev/docs/paths/interpolate-path) | ||
/* | ||
* @description Interpolates between two SVG paths based on the provided value, transitioning from the first path to the second. | ||
* @see [Documentation](https://www.remotion.dev/docs/paths/interpolate-path) | ||
*/ | ||
@@ -48,0 +45,0 @@ const interpolatePath = (value, firstPath, secondPath) => { |
import type { AbsoluteInstruction, Instruction } from './helpers/types'; | ||
export declare const normalizeInstructions: (instructions: Instruction[]) => AbsoluteInstruction[]; | ||
/** | ||
* @description Removes all relative coordinates from an SVG path and converts them into absolute coordinates. | ||
* @see [Documentation](https://remotion.dev/docs/paths/normalize-path) | ||
* @param {string} path A valid SVG path | ||
* @returns {string} A string representation of the SVG path with absolute coordinates. | ||
*/ | ||
export declare const normalizePath: (path: string) => string; |
@@ -154,7 +154,5 @@ "use strict"; | ||
exports.normalizeInstructions = normalizeInstructions; | ||
/** | ||
* @description Removes all relative coordinates from an SVG path and converts them into absolute coordinates. | ||
* @see [Documentation](https://remotion.dev/docs/paths/normalize-path) | ||
* @param {string} path A valid SVG path | ||
* @returns {string} A string representation of the SVG path with absolute coordinates. | ||
/* | ||
* @description Removes all relative coordinates from a path and converts them into absolute coordinates. | ||
* @see [Documentation](https://www.remotion.dev/docs/paths/normalize-path) | ||
*/ | ||
@@ -161,0 +159,0 @@ const normalizePath = (path) => { |
import type { Instruction } from './helpers/types'; | ||
/** | ||
* @description Parses an SVG string path into an array of Instruction's. | ||
* @param {string} path | ||
* @returns an array of objects containing the Instructions | ||
* @see [Documentation](https://www.remotion.dev/docs/paths/parse-path) | ||
*/ | ||
export declare const parsePath: (path: string) => Instruction[]; |
@@ -59,6 +59,4 @@ "use strict"; | ||
}; | ||
/** | ||
/* | ||
* @description Parses an SVG string path into an array of Instruction's. | ||
* @param {string} path | ||
* @returns an array of objects containing the Instructions | ||
* @see [Documentation](https://www.remotion.dev/docs/paths/parse-path) | ||
@@ -65,0 +63,0 @@ */ |
import type { Instruction, ReducedInstruction } from './helpers/types'; | ||
/** | ||
* @description Takes an array of Instruction's and reduces the amount of instruction types them so the path only consists of M, L, C, Q and Z instructions. | ||
* @param {Array} instruction | ||
* @see [Documentation](https://www.remotion.dev/docs/paths/reduce-instructions) | ||
*/ | ||
export declare const reduceInstructions: (instruction: Instruction[]) => ReducedInstruction[]; |
@@ -6,5 +6,4 @@ "use strict"; | ||
const normalize_path_1 = require("./normalize-path"); | ||
/** | ||
* @description Takes an array of Instruction's and reduces the amount of instruction types them so the path only consists of M, L, C, Q and Z instructions. | ||
* @param {Array} instruction | ||
/* | ||
* @description Takes an array of Instruction's and reduces the amount of instruction types so that the path only consists of M, L, C, and Z instructions. | ||
* @see [Documentation](https://www.remotion.dev/docs/paths/reduce-instructions) | ||
@@ -11,0 +10,0 @@ */ |
@@ -1,6 +0,1 @@ | ||
/** | ||
* @description Translates an SVG path so that the top-left corner of the bounding box is at 0, 0. | ||
* @param {string} d a valid SVG path | ||
* @see [Documentation](https://www.remotion.dev/docs/paths/reset-path) | ||
*/ | ||
export declare const resetPath: (d: string) => string; |
@@ -6,5 +6,4 @@ "use strict"; | ||
const translate_path_1 = require("./translate-path"); | ||
/** | ||
/* | ||
* @description Translates an SVG path so that the top-left corner of the bounding box is at 0, 0. | ||
* @param {string} d a valid SVG path | ||
* @see [Documentation](https://www.remotion.dev/docs/paths/reset-path) | ||
@@ -11,0 +10,0 @@ */ |
@@ -7,7 +7,2 @@ /** | ||
*/ | ||
/** | ||
* @description Reverses a path so the end and start are switched. | ||
* @param {string} path A valid SVG path | ||
* @see [Documentation](https://remotion.dev/docs/paths/reverse-path) | ||
*/ | ||
export declare const reversePath: (path: string) => string; |
@@ -85,6 +85,5 @@ "use strict"; | ||
} | ||
/** | ||
/* | ||
* @description Reverses a path so the end and start are switched. | ||
* @param {string} path A valid SVG path | ||
* @see [Documentation](https://remotion.dev/docs/paths/reverse-path) | ||
* @see [Documentation](https://www.remotion.dev/docs/paths/reverse-path) | ||
*/ | ||
@@ -91,0 +90,0 @@ const reversePath = (path) => { |
@@ -1,10 +0,1 @@ | ||
/** | ||
* @description Allows you to grow or shrink the size of a path. | ||
* @param {string} path A valid SVG path | ||
* @param {string} d | ||
* @param {Number} scaleX | ||
* @param {Number} scaleY | ||
* @returns a new path with respect to the scale values provided | ||
* @see [Documentation](https://www.remotion.dev/docs/paths/scale-path) | ||
*/ | ||
export declare const scalePath: (d: string, scaleX: number, scaleY: number) => string; |
@@ -9,9 +9,4 @@ "use strict"; | ||
const translate_path_1 = require("./translate-path"); | ||
/** | ||
/* | ||
* @description Allows you to grow or shrink the size of a path. | ||
* @param {string} path A valid SVG path | ||
* @param {string} d | ||
* @param {Number} scaleX | ||
* @param {Number} scaleY | ||
* @returns a new path with respect to the scale values provided | ||
* @see [Documentation](https://www.remotion.dev/docs/paths/scale-path) | ||
@@ -18,0 +13,0 @@ */ |
import type { Instruction } from './helpers/types'; | ||
export declare const translateSegments: (segments: Instruction[], x: number, y: number) => Instruction[]; | ||
/** | ||
* @description Translates the path by the given x and y coordinates. | ||
* @param {string} path the originalSVG path | ||
* @param {Number} x the amount of horizontal translation | ||
* @param {Number} y the amount of vertical translation | ||
* @returns a new string containing a path, if it is valid | ||
* @see [Documentation](https://www.remotion.dev/docs/paths/translate-path) | ||
*/ | ||
export declare const translatePath: (path: string, x: number, y: number) => string; |
@@ -105,8 +105,4 @@ "use strict"; | ||
exports.translateSegments = translateSegments; | ||
/** | ||
/* | ||
* @description Translates the path by the given x and y coordinates. | ||
* @param {string} path the originalSVG path | ||
* @param {Number} x the amount of horizontal translation | ||
* @param {Number} y the amount of vertical translation | ||
* @returns a new string containing a path, if it is valid | ||
* @see [Documentation](https://www.remotion.dev/docs/paths/translate-path) | ||
@@ -113,0 +109,0 @@ */ |
import type { WarpPathFn } from './warp-helpers'; | ||
/** | ||
* @description This function works by splitting SVG instructions into many smaller SVG instructions and then remapping the coordinates of each instruction. | ||
* @param {string} path an SVG path string | ||
* @see [Documentation](https://www.remotion.dev/docs/paths/warp-path) | ||
*/ | ||
export declare const warpPath: (path: string, transformer: WarpPathFn, options?: { | ||
@@ -8,0 +3,0 @@ interpolationThreshold?: number; |
@@ -14,5 +14,4 @@ "use strict"; | ||
}; | ||
/** | ||
* @description This function works by splitting SVG instructions into many smaller SVG instructions and then remapping the coordinates of each instruction. | ||
* @param {string} path an SVG path string | ||
/* | ||
* @description Allows you to remap the coordinates of an SVG using a function in order to create a warp effect. | ||
* @see [Documentation](https://www.remotion.dev/docs/paths/warp-path) | ||
@@ -19,0 +18,0 @@ */ |
@@ -6,3 +6,3 @@ { | ||
"name": "@remotion/paths", | ||
"version": "4.0.244", | ||
"version": "4.0.245", | ||
"description": "Utilities for working with SVG paths", | ||
@@ -25,3 +25,3 @@ "main": "dist/index.js", | ||
"eslint": "9.14.0", | ||
"@remotion/eslint-config-internal": "4.0.244" | ||
"@remotion/eslint-config-internal": "4.0.245" | ||
}, | ||
@@ -28,0 +28,0 @@ "exports": { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
288765
8561