🎥 Make videos programmatically with React
export parsePath
Jonny Burger48fb38b9f28a
diff --git a/packages/paths/src/get-bounding-box.ts b/packages/paths/src/get-bounding-box.tsindex f223ef63a8..16e3455904 100644--- a/packages/paths/src/get-bounding-box.ts+++ b/packages/paths/src/get-bounding-box.ts@@ -1,8 +1,8 @@-import {parsePath} from './helpers/parse';import type {AbsoluteInstruction, BoundingBox} from './helpers/types';import {removeArcInstructions} from './helpers/unarc';import {unshort} from './helpers/unshort';import {normalizePath} from './normalize-path';+import {parsePath} from './parse-path';type minMax = [min: number, max: number];diff --git a/packages/paths/src/get-subpaths.ts b/packages/paths/src/get-subpaths.tsindex 6d4036328d..253c9fd4e8 100644--- a/packages/paths/src/get-subpaths.ts+++ b/packages/paths/src/get-subpaths.ts@@ -1,5 +1,5 @@import {construct} from './helpers/construct';-import {serializeInstructions} from './helpers/serialize';+import {serializeInstructions} from './serialize-instructions';/*** Splits a valid SVG path into it's parts.diff --git a/packages/paths/src/helpers/construct.ts b/packages/paths/src/helpers/construct.tsindex aa3844f87b..1f18221f25 100644--- a/packages/paths/src/helpers/construct.ts+++ b/packages/paths/src/helpers/construct.ts@@ -1,9 +1,9 @@// Copied from: https://github.com/rveciana/svg-path-properties+import {parsePath} from '../parse-path';import {makeArc} from './arc';import {makeBezier} from './bezier';import {makeLinearPosition} from './linear';-import {parsePath} from './parse';import type {Instruction, Point, PointArray, Properties} from './types';export const construct = (string: string) => {diff --git a/packages/paths/src/index.ts b/packages/paths/src/index.tsindex 7b3e371517..70f944df74 100644--- a/packages/paths/src/index.ts+++ b/packages/paths/src/index.ts@@ -6,10 +6,11 @@ export {getParts} from './get-parts';export {getPointAtLength} from './get-point-at-length';export {getSubpaths} from './get-subpaths';export {getTangentAtLength} from './get-tangent-at-length';-export {serializeInstructions} from './helpers/serialize';export {BoundingBox, Instruction, Part} from './helpers/types';export {interpolatePath} from './interpolate-path';export {normalizePath} from './normalize-path';+export {parsePath} from './parse-path';export {resetPath} from './reset-path';export {reversePath} from './reverse-path';+export {serializeInstructions} from './serialize-instructions';export {translatePath} from './translate-path';diff --git a/packages/paths/src/helpers/parse.ts b/packages/paths/src/parse-path.tssimilarity index 100%rename from packages/paths/src/helpers/parse.tsrename to packages/paths/src/parse-path.tsdiff --git a/packages/paths/src/helpers/serialize.ts b/packages/paths/src/serialize-instructions.tssimilarity index 98%rename from packages/paths/src/helpers/serialize.tsrename to packages/paths/src/serialize-instructions.tsindex 3c35798fba..3a5782528e 100644--- a/packages/paths/src/helpers/serialize.ts+++ b/packages/paths/src/serialize-instructions.ts@@ -1,4 +1,4 @@-import type {Instruction} from './types';+import type {Instruction} from './helpers/types';const serializeInstruction = (instruction: Instruction): string => {if (instruction.type === 'A') {diff --git a/packages/paths/src/translate-path.ts b/packages/paths/src/translate-path.tsindex 332a8910d7..e89c7f4e72 100644--- a/packages/paths/src/translate-path.ts+++ b/packages/paths/src/translate-path.ts@@ -1,7 +1,7 @@// Copied partially from https://github.com/michaelrhodes/translate-svg-path/blob/master/index.js-import {parsePath} from './helpers/parse';-import {serializeInstructions} from './helpers/serialize';import type {Instruction} from './helpers/types';+import {parsePath} from './parse-path';+import {serializeInstructions} from './serialize-instructions';const translateSegments = (segments: Instruction[], x: number, y: number) => {return segments.map((segment): Instruction => {