Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@remotion/shapes

Package Overview
Dependencies
Maintainers
1
Versions
357
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@remotion/shapes - npm Package Compare versions

Comparing version 3.3.39 to 3.3.40

2

dist/components/render-svg.d.ts

@@ -0,3 +1,3 @@

import type { Instruction } from '@remotion/paths/dist/helpers/types';
import React from 'react';
import type { Instruction } from '../utils/instructions';
export declare type AllShapesProps = Omit<React.SVGProps<SVGPathElement>, 'width' | 'height' | 'd'> & {

@@ -4,0 +4,0 @@ debug?: boolean;

@@ -25,3 +25,14 @@ "use strict";

: instructions[index - 1];
if (prevInstruction.type === 'z') {
if (prevInstruction.type === 'V' ||
prevInstruction.type === 'H' ||
prevInstruction.type === 'a' ||
prevInstruction.type === 'Z' ||
prevInstruction.type === 't' ||
prevInstruction.type === 'q' ||
prevInstruction.type === 'l' ||
prevInstruction.type === 'c' ||
prevInstruction.type === 'm' ||
prevInstruction.type === 'h' ||
prevInstruction.type === 's' ||
prevInstruction.type === 'v') {
return null;

@@ -28,0 +39,0 @@ }

@@ -0,1 +1,2 @@

export { Instruction } from '@remotion/paths';
export { Circle, CircleProps } from './components/circle';

@@ -7,3 +8,2 @@ export { Ellipse, EllipseProps } from './components/ellipse';

export { Triangle, TriangleProps } from './components/triangle';
export { Instruction } from './utils/instructions';
export { makeCircle, MakeCircleProps } from './utils/make-circle';

@@ -10,0 +10,0 @@ export { makeEllipse, MakeEllipseOptions } from './utils/make-ellipse';

@@ -1,2 +0,2 @@

import type { Instruction } from './instructions';
import type { Instruction } from '@remotion/paths';
export declare const joinPoints: (points: [

@@ -3,0 +3,0 @@ number,

@@ -30,13 +30,17 @@ "use strict";

if (edgeRoundness !== null) {
return {
return [
{
type: 'M',
x: middleOfLine[0],
y: middleOfLine[1],
},
];
}
return [
{
type: 'M',
x: middleOfLine[0],
y: middleOfLine[1],
};
}
return {
type: 'M',
x,
y,
};
x,
y,
},
];
}

@@ -50,7 +54,9 @@ const prevVector = [x - prevPoint[0], y - prevPoint[1]];

if (cornerRadius === 0) {
return {
type: 'L',
x,
y,
};
return [
{
type: 'L',
x,
y,
},
];
}

@@ -76,4 +82,4 @@ const prevVectorMinusRadius = shortenVector(prevVector, cornerRadius);

xAxisRotation: 0,
x: prevVectorLenght[0] + nextVectorMinusRadius[0],
y: prevVectorLenght[1] + nextVectorMinusRadius[1],
dx: prevVectorLenght[0] + nextVectorMinusRadius[0],
dy: prevVectorLenght[1] + nextVectorMinusRadius[1],
largeArcFlag: false,

@@ -101,11 +107,13 @@ sweepFlag: true,

];
return {
type: 'C',
cp1x: controlPoint1[0],
cp1y: controlPoint1[1],
cp2x: controlPoint2[0],
cp2y: controlPoint2[1],
x: middleOfLine[0],
y: middleOfLine[1],
};
return [
{
type: 'C',
cp1x: controlPoint1[0],
cp1y: controlPoint1[1],
cp2x: controlPoint2[0],
cp2y: controlPoint2[1],
x: middleOfLine[0],
y: middleOfLine[1],
},
];
})

@@ -112,0 +120,0 @@ .flat(1);

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.makeCircle = void 0;
const instructions_1 = require("./instructions");
const paths_1 = require("@remotion/paths");
const makeCircle = ({ radius }) => {

@@ -19,4 +19,4 @@ const instructions = [

sweepFlag: false,
x: radius * 2,
y: 0,
dx: radius * 2,
dy: 0,
},

@@ -30,10 +30,10 @@ {

sweepFlag: false,
x: -radius * 2,
y: 0,
dx: -radius * 2,
dy: 0,
},
{
type: 'z',
type: 'Z',
},
];
const path = (0, instructions_1.serializeInstructions)(instructions);
const path = (0, paths_1.serializeInstructions)(instructions);
return {

@@ -40,0 +40,0 @@ height: radius * 2,

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.makeEllipse = void 0;
const instructions_1 = require("./instructions");
const paths_1 = require("@remotion/paths");
const makeEllipse = ({ rx, ry }) => {

@@ -19,10 +19,10 @@ const instructions = [

sweepFlag: false,
x: 1,
y: 0,
dx: 1,
dy: 0,
},
{
type: 'z',
type: 'Z',
},
];
const path = (0, instructions_1.serializeInstructions)(instructions);
const path = (0, paths_1.serializeInstructions)(instructions);
return {

@@ -29,0 +29,0 @@ width: rx * 2,

@@ -1,2 +0,2 @@

import type { Instruction } from './instructions';
import type { Instruction } from '@remotion/paths';
export declare type MakePieProps = {

@@ -3,0 +3,0 @@ radius: number;

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.makePie = void 0;
const instructions_1 = require("./instructions");
const paths_1 = require("@remotion/paths");
const getCoord = ({ counterClockwise, actualProgress, rotation, radius, coord, }) => {

@@ -97,7 +97,7 @@ const factor = counterClockwise ? -1 : 1;

? {
type: 'z',
type: 'Z',
}
: null,
].filter(Boolean);
const path = (0, instructions_1.serializeInstructions)(instructions);
const path = (0, paths_1.serializeInstructions)(instructions);
return {

@@ -104,0 +104,0 @@ height: radius * 2,

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.makeRect = void 0;
const instructions_1 = require("./instructions");
const paths_1 = require("@remotion/paths");
const join_points_1 = require("./join-points");

@@ -17,6 +17,6 @@ const makeRect = ({ width, height, edgeRoundness = null, cornerRadius = 0, }) => {

{
type: 'z',
type: 'Z',
},
];
const path = (0, instructions_1.serializeInstructions)(instructions);
const path = (0, paths_1.serializeInstructions)(instructions);
return {

@@ -23,0 +23,0 @@ width,

@@ -5,3 +5,3 @@ "use strict";

exports.makeStar = void 0;
const instructions_1 = require("./instructions");
const paths_1 = require("@remotion/paths");
const join_points_1 = require("./join-points");

@@ -25,3 +25,3 @@ const star = ({ centerX, centerY, points, innerRadius, outerRadius, cornerRadius, edgeRoundness, }) => {

}),
{ type: 'z' },
{ type: 'Z' },
];

@@ -44,3 +44,3 @@ };

return {
path: (0, instructions_1.serializeInstructions)(starPathInstructions),
path: (0, paths_1.serializeInstructions)(starPathInstructions),
width,

@@ -47,0 +47,0 @@ height,

@@ -5,3 +5,3 @@ "use strict";

exports.makeTriangle = void 0;
const instructions_1 = require("./instructions");
const paths_1 = require("@remotion/paths");
const join_points_1 = require("./join-points");

@@ -56,6 +56,6 @@ const makeTriangle = ({ length, direction = 'right', edgeRoundness = null, cornerRadius = 0, }) => {

{
type: 'z',
type: 'Z',
},
];
const path = (0, instructions_1.serializeInstructions)(instructions);
const path = (0, paths_1.serializeInstructions)(instructions);
return {

@@ -62,0 +62,0 @@ path,

@@ -1,2 +0,2 @@

import type { Instruction } from './instructions';
import type { Instruction } from '@remotion/paths';
export declare type ShapeInfo = {

@@ -3,0 +3,0 @@ path: string;

{
"name": "@remotion/shapes",
"version": "3.3.39",
"version": "3.3.40",
"description": "Utility functions and components for SVG shapes",

@@ -47,3 +47,6 @@ "main": "dist/index.js",

},
"gitHead": "5a07260074fe3a6db2cdba0001503c665951414d"
"dependencies": {
"@remotion/paths": "3.3.40"
},
"gitHead": "be5f606a81761f7f8e1e191ebabd5f8d225d8c09"
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc