@remotion/paths 3.3.42 → 3.3.43

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/serialize.js DELETED
@@ -1,75 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.serializeInstructions = void 0;
4
- const serializeInstruction = (instruction) => {
5
- if (instruction.type === 'A') {
6
- return `A ${instruction.rx} ${instruction.ry} ${instruction.xAxisRotation} ${Number(instruction.largeArcFlag)} ${Number(instruction.sweepFlag)} ${instruction.x} ${instruction.y}`;
7
- }
8
- if (instruction.type === 'a') {
9
- return `a ${instruction.rx} ${instruction.ry} ${instruction.xAxisRotation} ${Number(instruction.largeArcFlag)} ${Number(instruction.sweepFlag)} ${instruction.dx} ${instruction.dy}`;
10
- }
11
- if (instruction.type === 'C') {
12
- return `C ${instruction.cp1x} ${instruction.cp1y} ${instruction.cp2x} ${instruction.cp2y} ${instruction.x} ${instruction.y}`;
13
- }
14
- if (instruction.type === 'c') {
15
- return `c ${instruction.cp1dx} ${instruction.cp1dy} ${instruction.cp2dx} ${instruction.cp2dy} ${instruction.dx} ${instruction.dy}`;
16
- }
17
- if (instruction.type === 'S') {
18
- return `S ${instruction.cpx} ${instruction.cpy} ${instruction.x} ${instruction.y}`;
19
- }
20
- if (instruction.type === 's') {
21
- return `s ${instruction.cpdx} ${instruction.cpdy} ${instruction.dx} ${instruction.dy}`;
22
- }
23
- if (instruction.type === 'Q') {
24
- return `Q ${instruction.cpx} ${instruction.cpy} ${instruction.x} ${instruction.y}`;
25
- }
26
- if (instruction.type === 'q') {
27
- return `q ${instruction.cpdx} ${instruction.cpdy} ${instruction.dx} ${instruction.dy}`;
28
- }
29
- if (instruction.type === 'z') {
30
- return 'z';
31
- }
32
- if (instruction.type === 'Z') {
33
- return 'Z';
34
- }
35
- if (instruction.type === 'H') {
36
- return `H ${instruction.x}`;
37
- }
38
- if (instruction.type === 'h') {
39
- return `h ${instruction.dx}`;
40
- }
41
- if (instruction.type === 'V') {
42
- return `V ${instruction.y}`;
43
- }
44
- if (instruction.type === 'v') {
45
- return `v ${instruction.dy}`;
46
- }
47
- if (instruction.type === 'L') {
48
- return `L ${instruction.x} ${instruction.y}`;
49
- }
50
- if (instruction.type === 'l') {
51
- return `l ${instruction.dx} ${instruction.dy}`;
52
- }
53
- if (instruction.type === 'M') {
54
- return `M ${instruction.x} ${instruction.y}`;
55
- }
56
- if (instruction.type === 'm') {
57
- return `m ${instruction.dx} ${instruction.dy}`;
58
- }
59
- if (instruction.type === 'T') {
60
- return `T ${instruction.x} ${instruction.y}`;
61
- }
62
- if (instruction.type === 't') {
63
- return `t ${instruction.dx} ${instruction.dy}`;
64
- }
65
- // @ts-expect-error
66
- throw new Error(`Unknown instruction type: ${instruction.type}`);
67
- };
68
- const serializeInstructions = (path) => {
69
- return path
70
- .map((p) => {
71
- return serializeInstruction(p);
72
- })
73
- .join(' ');
74
- };
75
- exports.serializeInstructions = serializeInstructions;
@@ -1,2 +0,0 @@
1
- import type { Instruction, ReducedInstruction } from './helpers/types';
2
- export declare const reduceInstructions: (instruction: Instruction[]) => ReducedInstruction[];
@@ -1,10 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.reduceInstructions = void 0;
4
- const remove_a_s_t_curves_1 = require("./helpers/remove-a-s-t-curves");
5
- const normalize_path_1 = require("./normalize-path");
6
- const reduceInstructions = (instruction) => {
7
- const simplified = (0, normalize_path_1.normalizeInstructions)(instruction);
8
- return (0, remove_a_s_t_curves_1.removeATSHVInstructions)(simplified);
9
- };
10
- exports.reduceInstructions = reduceInstructions;